[med-svn] [sra-sdk] 01/03: Imported Upstream version 2.7.0

Andreas Tille tille at debian.org
Fri Jul 22 13:23:54 UTC 2016


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

tille pushed a commit to branch master
in repository sra-sdk.

commit d4dc8c469cd52e99813a40be24399a33e18b2877
Author: Andreas Tille <tille at debian.org>
Date:   Thu Jul 21 23:45:42 2016 +0200

    Imported Upstream version 2.7.0
---
 .gitignore                                         |    27 +-
 CHANGES                                            |    83 +-
 CHANGES.md                                         |    80 +-
 LICENSE                                            |    13 +-
 Makefile                                           |    44 +-
 README                                             |    18 +-
 README-blastn                                      |   133 +
 README-vdb-config                                  |   115 +
 README.md                                          |    16 +-
 build/.gitignore                                   |     8 +-
 build/MSVC/2010/.gitignore                         |     6 +
 build/MSVC/2010/abi-dump.vcxproj                   |    31 +
 build/MSVC/2010/align-cache.vcxproj                |    32 +
 build/MSVC/2010/align-info.vcxproj                 |    36 +
 build/MSVC/2010/build.xml                          |    73 +
 build/MSVC/2010/cache-mgr.vcxproj                  |    36 +
 build/MSVC/2010/dbgap-mount-demo.vcxproj           |    41 +
 build/MSVC/2010/dbgap-mount-tool.vcxproj           |    42 +
 build/MSVC/2010/dll-project.props                  |    31 +
 build/MSVC/2010/exe-project.props                  |    45 +
 build/MSVC/2010/fastq-dump-ngs.vcxproj             |    39 +
 build/MSVC/2010/fastq-dump.vcxproj                 |    35 +
 build/MSVC/2010/fastq-loader.vcxproj               |    42 +
 build/MSVC/2010/general-loader.vcxproj             |    34 +
 build/MSVC/2010/illumina-dump.vcxproj              |    38 +
 build/MSVC/2010/kar.vcxproj                        |    36 +
 build/MSVC/2010/kdbmeta.vcxproj                    |    36 +
 build/MSVC/2010/lib-project.props                  |    30 +
 build/MSVC/2010/md5cp.vcxproj                      |    35 +
 build/MSVC/2010/prefetch.vcxproj                   |    37 +
 build/MSVC/2010/qual-recalib-stat.vcxproj          |    36 +
 build/MSVC/2010/rcexplain.vcxproj                  |    36 +
 build/MSVC/2010/read-filter-redact.vcxproj         |    36 +
 build/MSVC/2010/ref-variation.vcxproj              |    35 +
 build/MSVC/2010/sam-dump.vcxproj                   |    36 +
 build/MSVC/2010/schema-replace.vcxproj             |    36 +
 build/MSVC/2010/sff-dump.vcxproj                   |    36 +
 build/MSVC/2010/sra-kar.vcxproj                    |    36 +
 build/MSVC/2010/sra-pileup.vcxproj                 |    36 +
 build/MSVC/2010/sra-stat.vcxproj                   |    37 +
 build/MSVC/2010/sra-tools.sln                      |   507 +
 build/MSVC/2010/srapath.vcxproj                    |    36 +
 build/MSVC/2010/test-align-info.log                |    18 +
 build/MSVC/2010/test-align-info.vcxproj            |    28 +
 build/MSVC/2010/test-fastq-loader.vcxproj          |    39 +
 build/MSVC/2010/test-general-loader.vcxproj        |    41 +
 build/MSVC/2010/test-project.props                 |    15 +
 build/MSVC/2010/test-sra-tools.sln                 |    66 +
 build/MSVC/2010/test-sra.vcxproj                   |    36 +
 build/MSVC/2010/test-vcf-loader.vcxproj            |    39 +
 build/MSVC/2010/tk-version.vcxproj                 |    30 +
 build/MSVC/2010/var-expand.vcxproj                 |    35 +
 build/MSVC/2010/vcf-loader.vcxproj                 |    30 +
 build/MSVC/2010/vdb-common.props                   |    94 +
 build/MSVC/2010/vdb-config.vcxproj                 |    39 +
 build/MSVC/2010/vdb-copy.vcxproj                   |    36 +
 build/MSVC/2010/vdb-decrypt.vcxproj                |    36 +
 build/MSVC/2010/vdb-diff.vcxproj                   |    38 +
 build/MSVC/2010/vdb-dump.vcxproj                   |    36 +
 build/MSVC/2010/vdb-encrypt.vcxproj                |    36 +
 build/MSVC/2010/vdb-lock.vcxproj                   |    36 +
 build/MSVC/2010/vdb-passwd.vcxproj                 |    36 +
 build/MSVC/2010/vdb-unlock.vcxproj                 |    35 +
 build/MSVC/2010/vdb-validate.vcxproj               |    36 +
 build/MSVC/2010/wb-test-fastq.vcxproj              |    38 +
 build/MSVC/2013/.gitignore                         |     7 +
 build/MSVC/2013/abi-dump.vcxproj                   |    13 +
 build/MSVC/2013/align-cache.vcxproj                |    14 +
 build/MSVC/2013/align-info.vcxproj                 |    17 +
 build/MSVC/2013/build.xml                          |    73 +
 build/MSVC/2013/cache-mgr.vcxproj                  |    17 +
 build/MSVC/2013/dbgap-mount-demo.vcxproj           |    22 +
 build/MSVC/2013/dbgap-mount-tool.vcxproj           |    23 +
 build/MSVC/2013/dll-project.props                  |    31 +
 build/MSVC/2013/exe-project.props                  |    45 +
 build/MSVC/2013/fastq-dump-ngs.vcxproj             |    20 +
 build/MSVC/2013/fastq-dump.vcxproj                 |    16 +
 build/MSVC/2013/fastq-loader.vcxproj               |    23 +
 build/MSVC/2013/general-loader.vcxproj             |    16 +
 build/MSVC/2013/illumina-dump.vcxproj              |    19 +
 build/MSVC/2013/kar.vcxproj                        |    17 +
 build/MSVC/2013/kdbmeta.vcxproj                    |    17 +
 build/MSVC/2013/lib-project.props                  |    30 +
 build/MSVC/2013/md5cp.vcxproj                      |    17 +
 build/MSVC/2013/prefetch.vcxproj                   |    18 +
 build/MSVC/2013/qual-recalib-stat.vcxproj          |    17 +
 build/MSVC/2013/rcexplain.vcxproj                  |    17 +
 build/MSVC/2013/read-filter-redact.vcxproj         |    17 +
 build/MSVC/2013/ref-variation.vcxproj              |    17 +
 build/MSVC/2013/sam-dump.vcxproj                   |    17 +
 build/MSVC/2013/schema-replace.vcxproj             |    17 +
 build/MSVC/2013/sff-dump.vcxproj                   |    17 +
 build/MSVC/2013/sra-kar.vcxproj                    |    17 +
 build/MSVC/2013/sra-pileup.vcxproj                 |    17 +
 build/MSVC/2013/sra-stat.vcxproj                   |    18 +
 build/MSVC/2013/sra-tools.sln                      |   507 +
 build/MSVC/2013/srapath.vcxproj                    |    17 +
 build/MSVC/2013/test-align-info.vcxproj            |    10 +
 build/MSVC/2013/test-fastq-loader.vcxproj          |    18 +
 build/MSVC/2013/test-general-loader.vcxproj        |    22 +
 build/MSVC/2013/test-project.props                 |    15 +
 build/MSVC/2013/test-sra-tools.sln                 |    66 +
 build/MSVC/2013/test-sra.vcxproj                   |    16 +
 build/MSVC/2013/test-vcf-loader.vcxproj            |    19 +
 build/MSVC/2013/tk-version.vcxproj                 |    31 +
 build/MSVC/2013/var-expand.vcxproj                 |    17 +
 build/MSVC/2013/vcf-loader.vcxproj                 |    10 +
 build/MSVC/2013/vdb-common.props                   |   115 +
 build/MSVC/2013/vdb-config.vcxproj                 |    20 +
 build/MSVC/2013/vdb-copy.vcxproj                   |    17 +
 build/MSVC/2013/vdb-decrypt.vcxproj                |    17 +
 build/MSVC/2013/vdb-diff.vcxproj                   |    15 +
 build/MSVC/2013/vdb-dump.vcxproj                   |    17 +
 build/MSVC/2013/vdb-encrypt.vcxproj                |    17 +
 build/MSVC/2013/vdb-lock.vcxproj                   |    17 +
 build/MSVC/2013/vdb-passwd.vcxproj                 |    17 +
 build/MSVC/2013/vdb-unlock.vcxproj                 |    17 +
 build/MSVC/2013/vdb-validate.vcxproj               |    17 +
 build/MSVC/2013/wb-test-fastq.vcxproj              |    18 +
 build/MSVC/abi-dump.files                          |     9 +
 build/MSVC/align-cache.files                       |     8 +
 build/MSVC/align-info.files                        |     6 +
 build/MSVC/build.xml                               |    69 +
 build/MSVC/cache-mgr.files                         |     6 +
 build/MSVC/dbgap-mount-demo.files                  |     6 +
 build/MSVC/dbgap-mount-tool.files                  |     8 +
 build/MSVC/fastq-dump-ngs.files                    |     8 +
 build/MSVC/fastq-dump.files                        |     9 +
 build/MSVC/fastq-loader.files                      |    10 +
 build/MSVC/general-loader.files                    |    10 +
 build/MSVC/illumina-dump.files                     |     9 +
 build/MSVC/kar.files                               |     7 +
 build/MSVC/kdbmeta.files                           |     6 +
 build/MSVC/md5cp.files                             |     6 +
 build/MSVC/prefetch.files                          |     7 +
 build/MSVC/qual-recalib-stat.files                 |    14 +
 build/MSVC/rcexplain.files                         |     6 +
 build/MSVC/read-filter-redact.files                |     6 +
 build/MSVC/ref-variation.files                     |    11 +
 build/MSVC/sam-dump.files                          |    20 +
 build/MSVC/schema-replace.files                    |     6 +
 build/MSVC/sff-dump.files                          |     9 +
 build/MSVC/sra-kar.files                           |     6 +
 build/MSVC/sra-pileup.files                        |    24 +
 build/MSVC/sra-stat.files                          |     7 +
 build/MSVC/srapath.files                           |     9 +
 build/MSVC/test-fastq-loader.files                 |     9 +
 build/MSVC/test-general-loader.files               |     7 +
 build/MSVC/test-sra.files                          |     7 +
 build/MSVC/test-vcf-loader.files                   |     6 +
 build/MSVC/tk-version.files                        |     6 +
 build/MSVC/var-expand.files                        |    11 +
 build/MSVC/vcf-loader.files                        |     9 +
 build/MSVC/vdb-config.files                        |    10 +
 build/MSVC/vdb-copy.files                          |    16 +
 build/MSVC/vdb-decrypt.files                       |     7 +
 build/MSVC/vdb-diff.files                          |     8 +
 build/MSVC/vdb-dump.files                          |    20 +
 build/MSVC/vdb-encrypt.files                       |     7 +
 build/MSVC/vdb-lock.files                          |     6 +
 build/MSVC/vdb-passwd.files                        |     7 +
 build/MSVC/vdb-unlock.files                        |     6 +
 build/MSVC/vdb-validate.files                      |     6 +
 build/MSVC/wb-test-fastq.files                     |     9 +
 build/Makefile.clang                               |    17 +-
 build/Makefile.deb                                 |   108 +
 build/Makefile.env                                 |    73 +-
 build/Makefile.gcc                                 |    18 +-
 build/Makefile.install                             |   111 +-
 build/Makefile.linux                               |     5 +-
 build/Makefile.mac                                 |    84 +
 build/Makefile.rpm                                 |   164 +
 build/Makefile.rules                               |     5 +-
 build/Makefile.shell                               |    15 +-
 build/Makefile.sun                                 |    96 +
 build/Makefile.sun.cc                              |   155 +
 build/Makefile.sun.gcc                             |   138 +
 build/Makefile.targets                             |     2 +-
 build/Makefile.tools                               |    39 +
 build/Makefile.vc++                                |    81 +
 build/Makefile.vers                                |     2 +-
 build/Makefile.win                                 |    79 +
 .../asm-trace/asm-trace.xcodeproj/project.pbxproj  |  4444 ++++
 build/Xcode/old-toolkit/.gitignore                 |     1 +
 .../old-toolkit.xcodeproj/project.pbxproj          |  2153 ++
 build/check-exit-code.py                           |   131 +
 build/ld.linux.dlib.sh                             |     7 +-
 build/ld.linux.exe.sh                              |    27 +-
 build/ld.linux.gcc.sh                              |     8 +-
 build/ld.mac.clang.sh                              |    58 +
 build/ld.mac.cmn.sh                                |   159 +
 build/ld.mac.dlib.sh                               |   361 +
 build/ld.mac.exe.sh                                |   340 +
 build/ld.mac.gcc.sh                                |    58 +
 build/ld.mac.ln.sh                                 |   103 +
 build/ld.mac.slib.sh                               |   101 +
 build/ld.sh                                        |     9 +-
 build/ld.win.cmn.sh                                |   225 +
 build/ld.win.dlib.sh                               |   327 +
 build/ld.win.exe.sh                                |   321 +
 build/ld.win.slib.sh                               |   135 +
 build/ld.win.stub.sh                               |    60 +
 build/ld.win.vc++.sh                               |    65 +
 build/sun-c++.sh                                   |   100 +
 build/sun-cc.sh                                    |    93 +
 build/valgrind.suppress                            |    15 -
 build/win-cc.sh                                    |   257 +
 interfaces/align/align-access.h                    |   350 -
 interfaces/align/align.h                           |    70 -
 interfaces/align/align.vschema                     |  1610 --
 interfaces/align/alignsrc.h                        |    71 -
 interfaces/align/bam.h                             |   836 -
 interfaces/align/dna-reverse-cmpl.h                |    43 -
 interfaces/align/extern.h                          |    41 -
 interfaces/align/iterator.h                        |   610 -
 interfaces/align/iterator_examples.txt             |   148 -
 interfaces/align/manager.h                         |    69 -
 interfaces/align/mate-cache.vschema                |    99 -
 interfaces/align/pileup-stats.vschema              |   120 -
 interfaces/align/qstat.vschema                     |    87 -
 interfaces/align/quality-quantizer.h               |    49 -
 interfaces/align/reader-refseq.h                   |    72 -
 interfaces/align/reference.h                       |   150 -
 interfaces/align/refseq-mgr.h                      |    88 -
 interfaces/align/refseq.vschema                    |   100 -
 interfaces/align/seq.vschema                       |   300 -
 interfaces/align/writer-alignment.h                |   181 -
 interfaces/align/writer-cmn.h                      |    46 -
 interfaces/align/writer-reference.h                |   180 -
 interfaces/align/writer-refseq.h                   |    89 -
 interfaces/align/writer-sequence.h                 |   157 -
 interfaces/cc/cc/compiler.h                        |    39 -
 interfaces/cc/gcc/compiler.h                       |    39 -
 interfaces/cc/gcc/fat86/arch-impl.h                |    33 -
 interfaces/cc/gcc/fat86/atomic.h                   |    33 -
 interfaces/cc/gcc/fat86/atomic32.h                 |    37 -
 interfaces/cc/gcc/fat86/atomic64.h                 |    32 -
 interfaces/cc/gcc/fat86/bitstr.h                   |    33 -
 interfaces/cc/gcc/fat86/byteswap.h                 |    33 -
 interfaces/cc/gcc/fat86/strtol.h                   |    33 -
 interfaces/cc/gcc/i386/arch-impl.h                 |   488 -
 interfaces/cc/gcc/i386/atomic.h                    |   169 -
 interfaces/cc/gcc/i386/atomic32.h                  |   366 -
 interfaces/cc/gcc/i386/bitstr.h                    |    39 -
 interfaces/cc/gcc/i386/byteswap.h                  |    89 -
 interfaces/cc/gcc/i386/strtol.h                    |    67 -
 interfaces/cc/gcc/noarch/bitstr.h                  |   413 -
 interfaces/cc/gcc/ppc32/arch-impl.h                |   209 -
 interfaces/cc/gcc/ppc32/atomic.h                   |   157 -
 interfaces/cc/gcc/ppc32/atomic32.h                 |   197 -
 interfaces/cc/gcc/ppc32/bitstr.h                   |    40 -
 interfaces/cc/gcc/ppc32/strtol.h                   |    67 -
 interfaces/cc/gcc/v128.h                           |  1093 -
 interfaces/cc/gcc/va_copy.h                        |    49 -
 interfaces/cc/gcc/x86_64/arch-impl.h               |   459 -
 interfaces/cc/gcc/x86_64/atomic.h                  |   183 -
 interfaces/cc/gcc/x86_64/atomic32.h                |   365 -
 interfaces/cc/gcc/x86_64/atomic64.h                |   365 -
 interfaces/cc/gcc/x86_64/bitstr.h                  |    39 -
 interfaces/cc/gcc/x86_64/byteswap.h                |    89 -
 interfaces/cc/gcc/x86_64/strtol.h                  |    69 -
 interfaces/cc/icc/compiler.h                       |    39 -
 interfaces/cc/vc++/compiler.h                      |    72 -
 interfaces/cc/vc++/i386/arch-impl.h                |    42 -
 interfaces/cc/vc++/i386/bitstr.h                   |    39 -
 interfaces/cc/vc++/noarch/arch-impl.h              |   378 -
 interfaces/cc/vc++/noarch/bitstr.h                 |   412 -
 interfaces/cc/vc++/stdbool.h                       |    46 -
 interfaces/cc/vc++/stdint.h                        |    50 -
 interfaces/cc/vc++/va_copy.h                       |    43 -
 interfaces/cc/vc++/x86_64/arch-impl.h              |    42 -
 interfaces/cc/vc++/x86_64/bitstr.h                 |    39 -
 interfaces/csra2/csra2.vschema                     |    42 -
 interfaces/csra2/read.vschema                      |   255 -
 interfaces/csra2/reference.vschema                 |   245 -
 interfaces/csra2/stats.vschema                     |    92 -
 interfaces/ext/bzlib.h                             |   282 -
 interfaces/ext/hdf5/H5ACpublic.h                   |   508 -
 interfaces/ext/hdf5/H5AbstractDs.h                 |    91 -
 interfaces/ext/hdf5/H5Apublic.h                    |   120 -
 interfaces/ext/hdf5/H5ArrayType.h                  |    62 -
 interfaces/ext/hdf5/H5AtomType.h                   |    81 -
 interfaces/ext/hdf5/H5Attribute.h                  |    98 -
 interfaces/ext/hdf5/H5Classes.h                    |    51 -
 interfaces/ext/hdf5/H5CommonFG.h                   |   172 -
 interfaces/ext/hdf5/H5CompType.h                   |   114 -
 interfaces/ext/hdf5/H5Cpp.h                        |    58 -
 interfaces/ext/hdf5/H5CppDoc.h                     |    91 -
 interfaces/ext/hdf5/H5Cpublic.h                    |    61 -
 interfaces/ext/hdf5/H5DSpublic.h                   |    79 -
 interfaces/ext/hdf5/H5DataSet.h                    |   132 -
 interfaces/ext/hdf5/H5DataSpace.h                  |   131 -
 interfaces/ext/hdf5/H5DataType.h                   |   139 -
 interfaces/ext/hdf5/H5DcreatProp.h                 |   126 -
 interfaces/ext/hdf5/H5Dpublic.h                    |   154 -
 interfaces/ext/hdf5/H5DxferProp.h                  |   111 -
 interfaces/ext/hdf5/H5EnumType.h                   |    77 -
 interfaces/ext/hdf5/H5Epubgen.h                    |   360 -
 interfaces/ext/hdf5/H5Epublic.h                    |   228 -
 interfaces/ext/hdf5/H5Exception.h                  |   164 -
 interfaces/ext/hdf5/H5FDcore.h                     |    42 -
 interfaces/ext/hdf5/H5FDdirect.h                   |    57 -
 interfaces/ext/hdf5/H5FDfamily.h                   |    44 -
 interfaces/ext/hdf5/H5FDlog.h                      |    69 -
 interfaces/ext/hdf5/H5FDmpi.h                      |   123 -
 interfaces/ext/hdf5/H5FDmpio.h                     |    65 -
 interfaces/ext/hdf5/H5FDmpiposix.h                 |    56 -
 interfaces/ext/hdf5/H5FDmulti.h                    |    52 -
 interfaces/ext/hdf5/H5FDpublic.h                   |   279 -
 interfaces/ext/hdf5/H5FDsec2.h                     |    42 -
 interfaces/ext/hdf5/H5FDstdio.h                    |    41 -
 interfaces/ext/hdf5/H5FaccProp.h                   |   142 -
 interfaces/ext/hdf5/H5FcreatProp.h                 |    79 -
 interfaces/ext/hdf5/H5File.h                       |   148 -
 interfaces/ext/hdf5/H5FloatType.h                  |    74 -
 interfaces/ext/hdf5/H5Fpublic.h                    |   181 -
 interfaces/ext/hdf5/H5Gpublic.h                    |   178 -
 interfaces/ext/hdf5/H5Group.h                      |    76 -
 interfaces/ext/hdf5/H5IMpublic.h                   |    87 -
 interfaces/ext/hdf5/H5IdComponent.h                |    99 -
 interfaces/ext/hdf5/H5Include.h                    |    30 -
 interfaces/ext/hdf5/H5IntType.h                    |    56 -
 interfaces/ext/hdf5/H5Ipublic.h                    |   104 -
 interfaces/ext/hdf5/H5LTpublic.h                   |   351 -
 interfaces/ext/hdf5/H5Library.h                    |    70 -
 interfaces/ext/hdf5/H5Lpublic.h                    |   202 -
 interfaces/ext/hdf5/H5MMpublic.h                   |    47 -
 interfaces/ext/hdf5/H5Object.h                     |   133 -
 interfaces/ext/hdf5/H5Opublic.h                    |   203 -
 interfaces/ext/hdf5/H5PTpublic.h                   |   127 -
 interfaces/ext/hdf5/H5PacketTable.h                |   244 -
 interfaces/ext/hdf5/H5Ppublic.h                    |   432 -
 interfaces/ext/hdf5/H5PredType.h                   |   250 -
 interfaces/ext/hdf5/H5PropList.h                   |   122 -
 interfaces/ext/hdf5/H5Rpublic.h                    |    92 -
 interfaces/ext/hdf5/H5Spublic.h                    |   152 -
 interfaces/ext/hdf5/H5StrType.h                    |    68 -
 interfaces/ext/hdf5/H5TBpublic.h                   |   233 -
 interfaces/ext/hdf5/H5Tpublic.h                    |   621 -
 interfaces/ext/hdf5/H5VarLenType.h                 |    52 -
 interfaces/ext/hdf5/H5Zpublic.h                    |   249 -
 interfaces/ext/hdf5/H5api_adpt.h                   |   408 -
 interfaces/ext/hdf5/H5f90i.h                       |    43 -
 interfaces/ext/hdf5/H5f90i_gen.h                   |    48 -
 interfaces/ext/hdf5/H5overflow.h                   |  1939 --
 interfaces/ext/hdf5/H5pubconf.h                    |   723 -
 interfaces/ext/hdf5/H5public.h                     |   310 -
 interfaces/ext/hdf5/H5version.h                    |   419 -
 interfaces/ext/hdf5/h5_dble_interface.mod          |  2194 --
 interfaces/ext/hdf5/h5a.mod                        |  2637 ---
 interfaces/ext/hdf5/h5d.mod                        |  3040 ---
 interfaces/ext/hdf5/h5e.mod                        |  1399 --
 interfaces/ext/hdf5/h5f.mod                        |  1513 --
 interfaces/ext/hdf5/h5fortran_types.mod            |    73 -
 interfaces/ext/hdf5/h5g.mod                        |  1600 --
 interfaces/ext/hdf5/h5global.mod                   |  1354 --
 interfaces/ext/hdf5/h5i.mod                        |  1421 --
 interfaces/ext/hdf5/h5im.mod                       | 16518 ---------------
 interfaces/ext/hdf5/h5l.mod                        |  1568 --
 interfaces/ext/hdf5/h5lib.mod                      |    56 -
 interfaces/ext/hdf5/h5lt.mod                       | 17284 ----------------
 interfaces/ext/hdf5/h5o.mod                        |  1398 --
 interfaces/ext/hdf5/h5p.mod                        |  2804 ---
 interfaces/ext/hdf5/h5r.mod                        |  1458 --
 interfaces/ext/hdf5/h5s.mod                        |  1658 --
 interfaces/ext/hdf5/h5t.mod                        |  1943 --
 interfaces/ext/hdf5/h5tb.mod                       | 16846 ----------------
 interfaces/ext/hdf5/h5z.mod                        |  1383 --
 interfaces/ext/hdf5/hdf5.h                         |    55 -
 interfaces/ext/hdf5/hdf5.mod                       | 16361 ---------------
 interfaces/ext/hdf5/hdf5_hl.h                      |    32 -
 interfaces/ext/libxml/DOCBparser.h                 |    96 -
 interfaces/ext/libxml/HTMLparser.h                 |   303 -
 interfaces/ext/libxml/HTMLtree.h                   |   147 -
 interfaces/ext/libxml/SAX.h                        |   173 -
 interfaces/ext/libxml/SAX2.h                       |   176 -
 interfaces/ext/libxml/c14n.h                       |   115 -
 interfaces/ext/libxml/catalog.h                    |   182 -
 interfaces/ext/libxml/chvalid.h                    |   230 -
 interfaces/ext/libxml/debugXML.h                   |   217 -
 interfaces/ext/libxml/dict.h                       |    69 -
 interfaces/ext/libxml/encoding.h                   |   226 -
 interfaces/ext/libxml/entities.h                   |   150 -
 interfaces/ext/libxml/globals.h                    |   491 -
 interfaces/ext/libxml/hash.h                       |   233 -
 interfaces/ext/libxml/list.h                       |   137 -
 interfaces/ext/libxml/nanoftp.h                    |   143 -
 interfaces/ext/libxml/nanohttp.h                   |    81 -
 interfaces/ext/libxml/parser.h                     |  1226 --
 interfaces/ext/libxml/parserInternals.h            |   611 -
 interfaces/ext/libxml/pattern.h                    |   100 -
 interfaces/ext/libxml/relaxng.h                    |   213 -
 interfaces/ext/libxml/schemasInternals.h           |   958 -
 interfaces/ext/libxml/schematron.h                 |   142 -
 interfaces/ext/libxml/threads.h                    |    84 -
 interfaces/ext/libxml/tree.h                       |  1252 --
 interfaces/ext/libxml/uri.h                        |    94 -
 interfaces/ext/libxml/valid.h                      |   458 -
 interfaces/ext/libxml/xinclude.h                   |   125 -
 interfaces/ext/libxml/xlink.h                      |   189 -
 interfaces/ext/libxml/xmlIO.h                      |   360 -
 interfaces/ext/libxml/xmlautomata.h                |   146 -
 interfaces/ext/libxml/xmlerror.h                   |   944 -
 interfaces/ext/libxml/xmlexports.h                 |   157 -
 interfaces/ext/libxml/xmlmemory.h                  |   224 -
 interfaces/ext/libxml/xmlmodule.h                  |    57 -
 interfaces/ext/libxml/xmlreader.h                  |   424 -
 interfaces/ext/libxml/xmlregexp.h                  |   222 -
 interfaces/ext/libxml/xmlsave.h                    |    87 -
 interfaces/ext/libxml/xmlschemas.h                 |   218 -
 interfaces/ext/libxml/xmlschemastypes.h            |   151 -
 interfaces/ext/libxml/xmlstring.h                  |   140 -
 interfaces/ext/libxml/xmlunicode.h                 |   202 -
 interfaces/ext/libxml/xmlversion.h                 |   458 -
 interfaces/ext/libxml/xmlwriter.h                  |   485 -
 interfaces/ext/libxml/xpath.h                      |   546 -
 interfaces/ext/libxml/xpathInternals.h             |   630 -
 interfaces/ext/libxml/xpointer.h                   |   114 -
 interfaces/ext/magic.h                             |    89 -
 interfaces/ext/regex.h                             |   557 -
 interfaces/ext/ricehdf.h                           |    86 -
 interfaces/ext/zconf.h                             |   304 -
 interfaces/ext/zlib.h                              |  1613 --
 interfaces/fastq/extern.h                          |    41 -
 interfaces/fastq/fq-dump.h                         |   110 -
 interfaces/hdf5/extern.h                           |    41 -
 interfaces/hdf5/kdf5.h                             |    89 -
 interfaces/insdc/insdc.h                           |   277 -
 interfaces/insdc/insdc.vschema                     |   232 -
 interfaces/insdc/seq.vschema                       |   210 -
 interfaces/insdc/sra.h                             |   111 -
 interfaces/insdc/sra.vschema                       |   467 -
 interfaces/kapp/args-conv.h                        |    57 -
 interfaces/kapp/args.h                             |   402 -
 interfaces/kapp/extern.h                           |    47 -
 interfaces/kapp/loader-file.h                      |   122 -
 interfaces/kapp/loader-meta.h                      |    55 -
 interfaces/kapp/log-xml.h                          |    76 -
 interfaces/kapp/main.h                             |   174 -
 interfaces/kapp/progressbar.h                      |    82 -
 interfaces/kapp/queue-file.h                       |   149 -
 interfaces/kdb/btree.h                             |   188 -
 interfaces/kdb/column.h                            |   360 -
 interfaces/kdb/consistency-check.h                 |   142 -
 interfaces/kdb/database.h                          |   278 -
 interfaces/kdb/extern.h                            |    41 -
 interfaces/kdb/index.h                             |   309 -
 interfaces/kdb/kdb-priv.h                          |   165 -
 interfaces/kdb/manager.h                           |   182 -
 interfaces/kdb/meta.h                              |   411 -
 interfaces/kdb/meta.hpp                            |   487 -
 interfaces/kdb/namelist.h                          |    81 -
 interfaces/kdb/table.h                             |   298 -
 interfaces/kfc/callconv.h                          |    53 -
 interfaces/kfc/ctx.h                               |   198 -
 interfaces/kfc/defs.h                              |   185 -
 interfaces/kfc/except.h                            |   215 -
 interfaces/kfc/extern.h                            |    68 -
 interfaces/kfc/rc.h                                |   352 -
 interfaces/kfc/refcount-impl.h                     |    95 -
 interfaces/kfc/refcount.h                          |   246 -
 interfaces/kfc/rsrc-global.h                       |    72 -
 interfaces/kfc/rsrc.h                              |    89 -
 interfaces/kfc/tstate.h                            |   107 -
 interfaces/kfc/vtbl-impl.h                         |   139 -
 interfaces/kfc/xc.h                                |   186 -
 interfaces/kfc/xcdefs.h                            |    81 -
 interfaces/kfc/xcext.h                             |    64 -
 interfaces/kfc/xcgen.h                             |    68 -
 interfaces/kfg/config.h                            |   425 -
 interfaces/kfg/extern.h                            |    41 -
 interfaces/kfg/kart.h                              |    90 -
 interfaces/kfg/keystore-priv.h                     |    92 -
 interfaces/kfg/keystore.h                          |   159 -
 interfaces/kfg/kfg-priv.h                          |    98 -
 interfaces/kfg/ngc.h                               |    67 -
 interfaces/kfg/properties.h                        |   137 -
 interfaces/kfg/repository.h                        |   421 -
 interfaces/kfs/arc.h                               |   143 -
 interfaces/kfs/arrayfile.h                         |   180 -
 interfaces/kfs/buffile.h                           |    94 -
 interfaces/kfs/bzip.h                              |    77 -
 interfaces/kfs/cacheteefile.h                      |   162 -
 interfaces/kfs/countfile.h                         |    73 -
 interfaces/kfs/crc.h                               |   292 -
 interfaces/kfs/defs.h                              |   121 -
 interfaces/kfs/directory.h                         |   591 -
 interfaces/kfs/directory.hpp                       |   582 -
 interfaces/kfs/dyload.h                            |   223 -
 interfaces/kfs/extendable-ramfile.h                |    50 -
 interfaces/kfs/extern.h                            |    41 -
 interfaces/kfs/ffext.h                             |    48 -
 interfaces/kfs/ffmagic.h                           |    49 -
 interfaces/kfs/file-impl.h                         |   193 -
 interfaces/kfs/file-v1.h                           |   259 -
 interfaces/kfs/file-v2.h                           |   264 -
 interfaces/kfs/file.h                              |    99 -
 interfaces/kfs/file.hpp                            |   147 -
 interfaces/kfs/fileformat.h                        |   140 -
 interfaces/kfs/filetools.h                         |    86 -
 interfaces/kfs/gzip.h                              |    77 -
 interfaces/kfs/impl.h                              |   319 -
 interfaces/kfs/kfs-priv.h                          |    99 -
 interfaces/kfs/lockfile.h                          |   116 -
 interfaces/kfs/manager.h                           |    31 -
 interfaces/kfs/md5.h                               |   289 -
 interfaces/kfs/mmap.h                              |   134 -
 interfaces/kfs/nullfile.h                          |    62 -
 interfaces/kfs/pagefile.h                          |   191 -
 interfaces/kfs/path-priv.h                         |    32 -
 interfaces/kfs/path.h                              |    32 -
 interfaces/kfs/pmem.h                              |   156 -
 interfaces/kfs/quickmount.h                        |    61 -
 interfaces/kfs/ramfile.h                           |    75 -
 interfaces/kfs/readheadfile.h                      |    86 -
 interfaces/kfs/sra.h                               |   191 -
 interfaces/kfs/subfile.h                           |    64 -
 interfaces/kfs/szip.h                              |    77 -
 interfaces/kfs/tar.h                               |    94 -
 interfaces/kfs/teefile.h                           |    66 -
 interfaces/kfs/toc.h                               |   148 -
 interfaces/kfs/wgaencrypt.h                        |    27 -
 interfaces/klib/btree.h                            |   147 -
 interfaces/klib/callconv.h                         |    34 -
 interfaces/klib/checksum.h                         |   152 -
 interfaces/klib/container.h                        |   455 -
 interfaces/klib/data-buffer.h                      |   206 -
 interfaces/klib/debug.h                            |   549 -
 interfaces/klib/defs.h                             |   147 -
 interfaces/klib/extern.h                           |    51 -
 interfaces/klib/impl.h                             |    96 -
 interfaces/klib/klib-priv.h                        |   108 -
 interfaces/klib/ksort-macro.h                      |   257 -
 interfaces/klib/log.h                              |   381 -
 interfaces/klib/logfmt.h                           |    62 -
 interfaces/klib/misc.h                             |    51 -
 interfaces/klib/namelist.h                         |   227 -
 interfaces/klib/namelist.hpp                       |   130 -
 interfaces/klib/ncbi-vdb-version.h                 |    56 -
 interfaces/klib/num-gen.h                          |   228 -
 interfaces/klib/out.h                              |    86 -
 interfaces/klib/pack.h                             |   138 -
 interfaces/klib/path-priv.h                        |   266 -
 interfaces/klib/path.h                             |   252 -
 interfaces/klib/pbstree.h                          |   287 -
 interfaces/klib/printf.h                           |   406 -
 interfaces/klib/progressbar.h                      |    85 -
 interfaces/klib/ptrie.h                            |   296 -
 interfaces/klib/rc.h                               |   185 -
 interfaces/klib/refcount.h                         |   102 -
 interfaces/klib/report.h                           |   103 -
 interfaces/klib/sort.h                             |   123 -
 interfaces/klib/sra-release-version.h              |    99 -
 interfaces/klib/status.h                           |   147 -
 interfaces/klib/symbol.h                           |   146 -
 interfaces/klib/symtab.h                           |   225 -
 interfaces/klib/text.h                             |   557 -
 interfaces/klib/time.h                             |   100 -
 interfaces/klib/token.h                            |   254 -
 interfaces/klib/trie.h                             |   293 -
 interfaces/klib/vector.h                           |   539 -
 interfaces/klib/vlen-encode.h                      |   161 -
 interfaces/klib/writer.h                           |   170 -
 interfaces/kns/adapt.h                             |    89 -
 interfaces/kns/ascp.h                              |   101 -
 interfaces/kns/endpoint.h                          |   147 -
 interfaces/kns/extern.h                            |    41 -
 interfaces/kns/http.h                              |   376 -
 interfaces/kns/impl.h                              |   111 -
 interfaces/kns/kns-mgr-priv.h                      |   103 -
 interfaces/kns/manager-ext.h                       |    59 -
 interfaces/kns/manager.h                           |   103 -
 interfaces/kns/socket.h                            |   144 -
 interfaces/kns/stream.h                            |   222 -
 interfaces/kproc/barrier.h                         |    75 -
 interfaces/kproc/barrier.hpp                       |    79 -
 interfaces/kproc/cond.h                            |   103 -
 interfaces/kproc/cond.hpp                          |   107 -
 interfaces/kproc/extern.h                          |    41 -
 interfaces/kproc/impl.h                            |   104 -
 interfaces/kproc/lock.h                            |   144 -
 interfaces/kproc/lock.hpp                          |   163 -
 interfaces/kproc/procmgr.h                         |   120 -
 interfaces/kproc/q-extern.h                        |    41 -
 interfaces/kproc/queue.h                           |   116 -
 interfaces/kproc/sem.h                             |   138 -
 interfaces/kproc/sem.hpp                           |   134 -
 interfaces/kproc/task.h                            |    83 -
 interfaces/kproc/thread.h                          |    91 -
 interfaces/kproc/thread.hpp                        |    98 -
 interfaces/kproc/timeout.h                         |    68 -
 interfaces/krypto/aes-priv.h                       |     1 -
 interfaces/krypto/cipher-impl.h                    |     1 -
 interfaces/krypto/cipher-priv.h                    |     1 -
 interfaces/krypto/cipher-test.h                    |    49 -
 interfaces/krypto/cipher.h                         |   208 -
 interfaces/krypto/ciphermgr-priv.h                 |    38 -
 interfaces/krypto/ciphermgr.h                      |    98 -
 interfaces/krypto/encfile-priv.h                   |   250 -
 interfaces/krypto/encfile.h                        |   134 -
 interfaces/krypto/extern.h                         |    48 -
 interfaces/krypto/key.h                            |   103 -
 interfaces/krypto/manager-priv.h                   |    26 -
 interfaces/krypto/manager.h                        |    33 -
 interfaces/krypto/reencfile.h                      |    94 -
 interfaces/krypto/rng-impl.h                       |    86 -
 interfaces/krypto/rng.h                            |    68 -
 interfaces/krypto/testciphermgr.h                  |    58 -
 interfaces/krypto/wgaencrypt.h                     |   128 -
 interfaces/ktst/test_tools.hpp                     |    22 -
 interfaces/ktst/unit_test.hpp                      |   260 -
 interfaces/ktst/unit_test_suite.hpp                |   513 -
 interfaces/kxml/xml.h                              |   382 -
 interfaces/kxml/xml.hpp                            |   198 -
 interfaces/loader/alignment-writer.h               |   108 -
 interfaces/loader/common-writer.h                  |   192 -
 interfaces/loader/mmarray.h                        |    50 -
 interfaces/loader/reference-writer.h               |    80 -
 interfaces/ncbi/clip.vschema                       |   147 -
 interfaces/ncbi/extern.h                           |    41 -
 interfaces/ncbi/kimpl-sra-cgi.h                    |    91 -
 interfaces/ncbi/ksra-cgi-lib.h                     |    52 -
 interfaces/ncbi/ksra-cgi.h                         |   111 -
 interfaces/ncbi/ncbi.h                             |    73 -
 interfaces/ncbi/ncbi.vschema                       |   195 -
 interfaces/ncbi/pnbrdb.vschema                     |    98 -
 interfaces/ncbi/seq-graph.vschema                  |   180 -
 interfaces/ncbi/seq.vschema                        |   894 -
 interfaces/ncbi/spotname.h                         |   150 -
 interfaces/ncbi/spotname.vschema                   |   377 -
 interfaces/ncbi/sra.vschema                        |   758 -
 interfaces/ncbi/stats.vschema                      |   119 -
 interfaces/ncbi/varloc.vschema                     |   204 -
 interfaces/ncbi/vdb-blast-priv.h                   |    53 -
 interfaces/ncbi/vdb-blast.h                        |   606 -
 interfaces/ncbi/wgs-contig.h                       |   183 -
 interfaces/ncbi/wgs-contig.vschema                 |   695 -
 interfaces/ngs/Model.graphml                       |   801 -
 interfaces/ngs/NOTES.txt                           |     9 -
 interfaces/ngs/SimpleModel.graphml                 |   395 -
 interfaces/ngs/cstdint                             |     1 -
 interfaces/ngs/ncbi/NGS.hpp                        |    95 -
 interfaces/os/linux/os-native.h                    |    43 -
 interfaces/os/mac/byteswap.h                       |    39 -
 interfaces/os/mac/endian.h                         |    39 -
 interfaces/os/mac/os-native.h                      |   114 -
 interfaces/os/sun/arch-impl.h                      |   287 -
 interfaces/os/sun/atomic.h                         |   152 -
 interfaces/os/sun/atomic32.h                       |   218 -
 interfaces/os/sun/bitstr.h                         |    47 -
 interfaces/os/sun/byteswap.h                       |    40 -
 interfaces/os/sun/endian.h                         |    44 -
 interfaces/os/sun/fmtdef.h                         |    42 -
 interfaces/os/sun/noarch/bitstr.h                  |   417 -
 interfaces/os/sun/os-native.h                      |   181 -
 interfaces/os/sun/strtol.h                         |    67 -
 interfaces/os/sun/va_copy.h                        |    49 -
 interfaces/os/unix/oserror.h                       |    38 -
 interfaces/os/unix/sysalloc.h                      |    40 -
 interfaces/os/unix/unix-native.h                   |    58 -
 interfaces/os/win/atomic.h                         |   149 -
 interfaces/os/win/atomic32.h                       |   194 -
 interfaces/os/win/atomic64.h                       |   194 -
 interfaces/os/win/byteswap.h                       |    44 -
 interfaces/os/win/endian.h                         |    42 -
 interfaces/os/win/os-native.h                      |   238 -
 interfaces/os/win/oserror.h                        |    41 -
 interfaces/os/win/strtol.h                         |   158 -
 interfaces/os/win/sysalloc.h                       |    69 -
 interfaces/rdbms/rdbms.h                           |   362 -
 interfaces/rdbms/sybase.h                          |    52 -
 interfaces/search/extern.h                         |    41 -
 interfaces/search/grep.h                           |   268 -
 interfaces/search/nucstrstr.h                      |   153 -
 interfaces/search/ref-variation.h                  |   159 -
 interfaces/search/smith-waterman.h                 |    72 -
 interfaces/simple/extern.h                         |    41 -
 interfaces/simple/sra.hpp                          |  1127 --
 interfaces/sra/454.vschema                         |   289 -
 interfaces/sra/abi.h                               |   167 -
 interfaces/sra/abi.vschema                         |   241 -
 interfaces/sra/extern.h                            |    41 -
 interfaces/sra/fastq.h                             |   191 -
 interfaces/sra/generic-fastq.vschema               |   265 -
 interfaces/sra/helicos.vschema                     |    85 -
 interfaces/sra/illumina.h                          |   170 -
 interfaces/sra/illumina.vschema                    |   408 -
 interfaces/sra/impl.h                              |   121 -
 interfaces/sra/ion-torrent.vschema                 |   117 -
 interfaces/sra/nanopore.vschema                    |    84 -
 interfaces/sra/pacbio.h                            |    66 -
 interfaces/sra/pacbio.vschema                      |   307 -
 interfaces/sra/path-extern.h                       |    41 -
 interfaces/sra/pevents.vschema                     |    91 -
 interfaces/sra/rd-extern.h                         |    41 -
 interfaces/sra/sch-extern.h                        |    41 -
 interfaces/sra/sff-file.h                          |   110 -
 interfaces/sra/sff.h                               |   147 -
 interfaces/sra/sradb-priv.h                        |   407 -
 interfaces/sra/sradb.h                             |   545 -
 interfaces/sra/sradb.hpp                           |   441 -
 interfaces/sra/srapath.h                           |   181 -
 interfaces/sra/srapath.hpp                         |   176 -
 interfaces/sra/sraschema.h                         |    72 -
 interfaces/sra/types.h                             |   350 -
 interfaces/sra/wsradb.h                            |   242 -
 interfaces/sra/wsradb.hpp                          |   591 -
 interfaces/svdb/extern.h                           |    47 -
 interfaces/svdb/svdb.h                             |   531 -
 interfaces/tui/extern.h                            |    41 -
 interfaces/tui/tui.h                               |   297 -
 interfaces/tui/tui.hpp                             |   739 -
 interfaces/tui/tui_dlg.h                           |   367 -
 interfaces/vdb/blob.h                              |   154 -
 interfaces/vdb/built-in.vschema                    |   412 -
 interfaces/vdb/cursor.h                            |   490 -
 interfaces/vdb/cursor.hpp                          |   388 -
 interfaces/vdb/database.h                          |   334 -
 interfaces/vdb/database.hpp                        |   347 -
 interfaces/vdb/dependencies.h                      |   231 -
 interfaces/vdb/extern.h                            |    47 -
 interfaces/vdb/manager.h                           |   226 -
 interfaces/vdb/manager.hpp                         |   386 -
 interfaces/vdb/report.h                            |    92 -
 interfaces/vdb/schema.h                            |   460 -
 interfaces/vdb/schema.hpp                          |   252 -
 interfaces/vdb/table.h                             |   424 -
 interfaces/vdb/table.hpp                           |   328 -
 interfaces/vdb/types.h                             |    39 -
 interfaces/vdb/types.hpp                           |   230 -
 interfaces/vdb/vdb-priv.h                          |   342 -
 interfaces/vdb/vdb.h                               |    62 -
 interfaces/vdb/vdb.vschema                         |   859 -
 interfaces/vdb/xform.h                             |   826 -
 interfaces/vfs/extern.h                            |    47 -
 interfaces/vfs/keyring-priv.h                      |    52 -
 interfaces/vfs/manager-priv.h                      |   152 -
 interfaces/vfs/manager.h                           |   322 -
 interfaces/vfs/path-priv.h                         |   266 -
 interfaces/vfs/path.h                              |   294 -
 interfaces/vfs/resolver.h                          |   263 -
 interfaces/xfs/doc.h                               |   123 -
 interfaces/xfs/editors.h                           |   310 -
 interfaces/xfs/extern.h                            |    48 -
 interfaces/xfs/handle.h                            |   106 -
 interfaces/xfs/model.h                             |   248 -
 interfaces/xfs/node.h                              |   217 -
 interfaces/xfs/path.h                              |   227 -
 interfaces/xfs/perm.h                              |   173 -
 interfaces/xfs/tree.h                              |   176 -
 interfaces/xfs/xfs-defs.h                          |   125 -
 interfaces/xfs/xfs.h                               |   165 -
 interfaces/xfs/xlog.h                              |    54 -
 libs/Makefile                                      |    89 -
 libs/align/.gitignore                              |     1 -
 libs/align/Makefile                                |   163 -
 libs/align/al_iterator.c                           |   565 -
 libs/align/align-access.c                          |   812 -
 libs/align/align_mgr.c                             |   108 -
 libs/align/bam-priv.h                              |    48 -
 libs/align/bam.c                                   |  5054 -----
 libs/align/debug.h                                 |    77 -
 libs/align/dna-reverse-cmpl.c                      |    80 -
 libs/align/pl_iterator.c                           |   689 -
 libs/align/quality-quantizer.c                     |   109 -
 libs/align/reader-cmn.c                            |   317 -
 libs/align/reader-cmn.h                            |    81 -
 libs/align/reader-refseq.c                         |   279 -
 libs/align/reader-wgs.c                            |   169 -
 libs/align/reader-wgs.h                            |    58 -
 libs/align/ref_iterator.c                          |   863 -
 libs/align/reference-cmn.c                         |    43 -
 libs/align/reference-cmn.h                         |    38 -
 libs/align/reference.c                             |  1943 --
 libs/align/refseq-mgr-priv.h                       |    35 -
 libs/align/refseq-mgr.c                            |  1273 --
 libs/align/writer-alignment.c                      |   440 -
 libs/align/writer-cmn.c                            |   589 -
 libs/align/writer-priv.h                           |   151 -
 libs/align/writer-ref.c                            |   481 -
 libs/align/writer-ref.h                            |   106 -
 libs/align/writer-reference.c                      |  3186 ---
 libs/align/writer-refseq.c                         |   179 -
 libs/align/writer-sequence.c                       |   778 -
 libs/ascp/Makefile                                 |    87 -
 libs/ascp/ascp-priv.h                              |    74 -
 libs/ascp/ascp.c                                   |   840 -
 libs/ascp/linux/ascp-path.c                        |   119 -
 libs/ascp/mac/ascp-path.c                          |    74 -
 libs/ascp/unix/connect.c                           |   618 -
 libs/ascp/win/ascp-path.c                          |    75 -
 libs/ascp/win/connect.c                            |   525 -
 libs/axf/.gitignore                                |     1 -
 libs/axf/Makefile                                  |   142 -
 libs/axf/align-local_ref_id.c                      |   143 -
 libs/axf/align-local_ref_start.c                   |   148 -
 libs/axf/align-ref-name.c                          |   191 -
 libs/axf/align-ref-pos.c                           |   299 -
 libs/axf/align-ref-seq-id.c                        |   188 -
 libs/axf/align-restore-read.c                      |   150 -
 libs/axf/cigar.c                                   |  2578 ---
 libs/axf/generate-mismatch-qual.c                  |   152 -
 libs/axf/get-sam-flags.c                           |   228 -
 libs/axf/get_mate_align_ids.c                      |   332 -
 libs/axf/make-cmp-read_desc.c                      |   176 -
 libs/axf/mismatch-restore-qual.c                   |   135 -
 libs/axf/not-my-row.c                              |    76 -
 libs/axf/project_read_from_sequence.c              |   285 -
 libs/axf/raw-restore-qual.c                        |    95 -
 libs/axf/raw-restore-read.c                        |   119 -
 libs/axf/ref-preserve_qual.c                       |   429 -
 libs/axf/ref-restore-read.c                        |   201 -
 libs/axf/ref-tbl-sub-select.c                      |   533 -
 libs/axf/ref-tbl.c                                 |   106 -
 libs/axf/ref-tbl.h                                 |    32 -
 libs/axf/refseq-stats.c                            |   205 -
 libs/axf/seq-construct-read.c                      |   125 -
 libs/axf/seq-restore-linkage-group.c               |   186 -
 libs/axf/seq-restore-read.c                        |   749 -
 libs/axf/template-len.c                            |   136 -
 libs/blast/Makefile                                |    91 -
 libs/blast/blast-mgr.c                             |   670 -
 libs/blast/blast-mgr.h                             |    78 -
 libs/blast/reader.c                                |  2361 ---
 libs/blast/reader.h                                |    53 -
 libs/blast/reference.c                             |  1710 --
 libs/blast/reference.h                             |    86 -
 libs/blast/run-set.c                               |  3251 ---
 libs/blast/run-set.h                               |   312 -
 libs/cipher/cipher-1.7/PKG-INFO                    |    13 -
 libs/cipher/cipher-1.7/README.md                   |     4 -
 libs/cipher/cipher-1.7/cipher.egg-info/PKG-INFO    |    13 -
 libs/cipher/cipher-1.7/cipher.egg-info/SOURCES.txt |    12 -
 .../cipher.egg-info/dependency_links.txt           |     1 -
 .../cipher/cipher-1.7/cipher.egg-info/not-zip-safe |     1 -
 .../cipher-1.7/cipher.egg-info/top_level.txt       |     1 -
 libs/cipher/cipher-1.7/cipher/__init__.py          |   393 -
 libs/cipher/cipher-1.7/decrypt.py                  |    25 -
 libs/cipher/cipher-1.7/encrypt.py                  |    25 -
 libs/cipher/cipher-1.7/requirements-test.txt       |     5 -
 libs/cipher/cipher-1.7/setup.cfg                   |    16 -
 libs/cipher/cipher-1.7/setup.py                    |     4 -
 libs/csra2/Makefile                                |    87 -
 libs/hdf5/.gitignore                               |     2 -
 libs/hdf5/Makefile                                 |   122 -
 libs/hdf5/hdf5arrayfile-priv.h                     |    79 -
 libs/hdf5/hdf5arrayfile.c                          |   656 -
 libs/hdf5/hdf5dir.c                                |   879 -
 libs/hdf5/hdf5file.c                               |   383 -
 libs/kapp/Makefile                                 |   152 -
 libs/kapp/args-conv.c                              |    43 -
 libs/kapp/args.c                                   |  2380 ---
 libs/kapp/args_debug.h                             |    47 -
 libs/kapp/linux/ram.c                              |    79 -
 libs/kapp/loader-file.c                            |   643 -
 libs/kapp/loader-meta.c                            |   105 -
 libs/kapp/log-xml.c                                |   416 -
 libs/kapp/mac/ram.c                                |    63 -
 libs/kapp/main-priv.h                              |    76 -
 libs/kapp/main.c                                   |   516 -
 libs/kapp/progressbar.c                            |   199 -
 libs/kapp/queue-file.c                             |   925 -
 libs/kapp/sun/sysmain.c                            |   243 -
 libs/kapp/tokenizer.c                              |   525 -
 libs/kapp/unix/args-conv-os.c                      |    32 -
 libs/kapp/unix/sysmain.c                           |   296 -
 libs/kapp/win/args-conv-os.c                       |    48 -
 libs/kapp/win/main-priv-win.h                      |    51 -
 libs/kapp/win/ram.c                                |    62 -
 libs/kapp/win/sysmain.c                            |   300 -
 libs/kdb/Makefile                                  |   164 -
 libs/kdb/btree.c                                   |   579 -
 libs/kdb/cc-priv.h                                 |    51 -
 libs/kdb/coldata-priv.h                            |   126 -
 libs/kdb/coldata.c                                 |   188 -
 libs/kdb/colfmt-priv.h                             |   339 -
 libs/kdb/colidx-priv.h                             |   122 -
 libs/kdb/colidx.c                                  |   243 -
 libs/kdb/colidx0-priv.h                            |    93 -
 libs/kdb/colidx0.c                                 |   433 -
 libs/kdb/colidx1-priv.h                            |   130 -
 libs/kdb/colidx1.c                                 |   771 -
 libs/kdb/colidx2-priv.h                            |    99 -
 libs/kdb/colidx2.c                                 |   219 -
 libs/kdb/column-cc.c                               |   229 -
 libs/kdb/column-priv.h                             |    94 -
 libs/kdb/column.c                                  |  1132 --
 libs/kdb/database-cc.c                             |   339 -
 libs/kdb/database-cmn.c                            |   496 -
 libs/kdb/database-priv.h                           |   115 -
 libs/kdb/database.c                                |   807 -
 libs/kdb/dbcc-cmn.c                                |   141 -
 libs/kdb/dbmgr-cmn.c                               |   485 -
 libs/kdb/dbmgr-priv.h                              |   128 -
 libs/kdb/dbmgr.c                                   |   420 -
 libs/kdb/idstats-priv.h                            |    74 -
 libs/kdb/idstats.c                                 |   269 -
 libs/kdb/idxblk-priv.h                             |   136 -
 libs/kdb/idxblk.c                                  |   695 -
 libs/kdb/index-cmn.h                               |   286 -
 libs/kdb/index-priv.h                              |   134 -
 libs/kdb/index.c                                   |  1006 -
 libs/kdb/kdb-priv.h                                |   122 -
 libs/kdb/kdb.c                                     |   951 -
 libs/kdb/kdbfmt-priv.h                             |    76 -
 libs/kdb/libkdb.vers.h                             |    27 -
 libs/kdb/meta.c                                    |  2141 --
 libs/kdb/ptrieval-v1.c                             |   265 -
 libs/kdb/ptrieval-v2.c                             |   396 -
 libs/kdb/table-cc.c                                |   378 -
 libs/kdb/table-priv.h                              |    81 -
 libs/kdb/table.c                                   |   718 -
 libs/kdb/trieidx-priv.h                            |    74 -
 libs/kdb/trieidx-v1.c                              |   222 -
 libs/kdb/trieidx-v2.c                              |  1047 -
 libs/kdb/trieval-v1.c                              |    49 -
 libs/kdb/trieval-v2.c                              |    49 -
 libs/kdb/u64idx-v3.c                               |   162 -
 libs/kdb/wcoldata-priv.h                           |   172 -
 libs/kdb/wcoldata.c                                |   342 -
 libs/kdb/wcolidx-priv.h                            |   166 -
 libs/kdb/wcolidx.c                                 |   694 -
 libs/kdb/wcolidx0-priv.h                           |   153 -
 libs/kdb/wcolidx0.c                                |   831 -
 libs/kdb/wcolidx1-priv.h                           |   152 -
 libs/kdb/wcolidx1.c                                |   921 -
 libs/kdb/wcolidx2-priv.h                           |   114 -
 libs/kdb/wcolidx2.c                                |   241 -
 libs/kdb/wcolumn-priv.h                            |   120 -
 libs/kdb/wcolumn.c                                 |  2681 ---
 libs/kdb/wdatabase-priv.h                          |    95 -
 libs/kdb/wdatabase.c                               |  1642 --
 libs/kdb/wdbmgr.c                                  |   421 -
 libs/kdb/werror-priv.h                             |    59 -
 libs/kdb/widxblk-priv.h                            |   195 -
 libs/kdb/widxblk.c                                 |   546 -
 libs/kdb/windex-priv.h                             |   230 -
 libs/kdb/windex.c                                  |  1889 --
 libs/kdb/wkdb-priv.h                               |   160 -
 libs/kdb/wkdb.c                                    |  1430 --
 libs/kdb/wmeta.c                                   |  3526 ----
 libs/kdb/wtable-priv.h                             |   106 -
 libs/kdb/wtable.c                                  |  1638 --
 libs/kdb/wtrieidx-v1.c                             |  1100 -
 libs/kdb/wtrieidx-v2.c                             |  2560 ---
 libs/kdb/wu64idx-v3.c                              |   416 -
 libs/kfc/Makefile                                  |    97 -
 libs/kfc/except.c                                  |   128 -
 libs/kfc/refcount.c                                |   180 -
 libs/kfc/rsrc-priv.h                               |    44 -
 libs/kfc/rsrc.c                                    |   180 -
 libs/kfc/sysctx-priv.h                             |    45 -
 libs/kfc/tstate.c                                  |  1041 -
 libs/kfc/unix/sysctx.c                             |   192 -
 libs/kfc/unix/sysrsrc.c                            |   148 -
 libs/kfc/vtbl.c                                    |   205 -
 libs/kfc/win/sysctx.c                              |   342 -
 libs/kfc/win/sysrsrc.c                             |   186 -
 libs/kfc/xc.c                                      |    36 -
 libs/kfg/.gitignore                                |     2 -
 libs/kfg/Makefile                                  |   126 -
 libs/kfg/config-aws.c                              |   315 -
 libs/kfg/config-grammar.c                          |  1726 --
 libs/kfg/config-grammar.y                          |   185 -
 libs/kfg/config-lex.c                              |  2517 ---
 libs/kfg/config-lex.l                              |   221 -
 libs/kfg/config-tokens.h                           |    75 -
 libs/kfg/config.c                                  |  4368 ----
 libs/kfg/default.kfg                               |    53 -
 libs/kfg/kart.c                                    |   720 -
 libs/kfg/keystore.c                                |   858 -
 libs/kfg/kfg-lex.h                                 |    67 -
 libs/kfg/kfg-parse.h                               |    41 -
 libs/kfg/kfg-priv.h                                |    32 -
 libs/kfg/ngc-priv.h                                |    59 -
 libs/kfg/ngc.c                                     |   484 -
 libs/kfg/properties.c                              |   721 -
 libs/kfg/report-kfg.c                              |   532 -
 libs/kfg/repository.c                              |  1972 --
 libs/kfs/.gitignore                                |     1 -
 libs/kfs/Makefile                                  |   221 -
 libs/kfs/arc.c                                     |  4089 ----
 libs/kfs/arrayfile.c                               |   423 -
 libs/kfs/buffile-read.c                            |   265 -
 libs/kfs/buffile-write.c                           |   371 -
 libs/kfs/buffile.c                                 |   574 -
 libs/kfs/bzip.c                                    |   836 -
 libs/kfs/cacheteefile.c                            |  1833 --
 libs/kfs/countfile.c                               |   652 -
 libs/kfs/crc32.c                                   |  1771 --
 libs/kfs/dir_test.c                                |    54 -
 libs/kfs/directory-v2.c                            |  1185 --
 libs/kfs/directory.c                               |  1539 --
 libs/kfs/extendable-ramfile.c                      |   280 -
 libs/kfs/ffext.c                                   |   812 -
 libs/kfs/ffkey.c                                   |   833 -
 libs/kfs/ffmagic.c                                 |   969 -
 libs/kfs/file-v2.c                                 |   724 -
 libs/kfs/file.c                                    |  1002 -
 libs/kfs/fileformat-priv.h                         |   124 -
 libs/kfs/fileformat.c                              |   291 -
 libs/kfs/from_to_namelist.c                        |   454 -
 libs/kfs/gzip.c                                    |   646 -
 libs/kfs/impl.h                                    |   120 -
 libs/kfs/karc-priv.h                               |    43 -
 libs/kfs/kfs-priv.h                                |    47 -
 libs/kfs/kfsmagic                                  | 20101 -------------------
 libs/kfs/lockfile.c                                |   350 -
 libs/kfs/manager.c                                 |   641 -
 libs/kfs/md5.c                                     |  1910 --
 libs/kfs/mmap-priv.h                               |   111 -
 libs/kfs/mmap.c                                    |   754 -
 libs/kfs/nullfile.c                                |   273 -
 libs/kfs/pagefile.c                                |  1388 --
 libs/kfs/pmem.c                                    |   632 -
 libs/kfs/quickmount.c                              |   967 -
 libs/kfs/ramfile.c                                 |   424 -
 libs/kfs/readheadfile.c                            |   294 -
 libs/kfs/report.c                                  |   169 -
 libs/kfs/sra.c                                     |   486 -
 libs/kfs/subfile.c                                 |   337 -
 libs/kfs/szip.c                                    |   575 -
 libs/kfs/tar.c                                     |  2672 ---
 libs/kfs/teefile.c                                 |   532 -
 libs/kfs/toc-priv.h                                |   841 -
 libs/kfs/toc.c                                     |  1764 --
 libs/kfs/tocdir.c                                  |   411 -
 libs/kfs/tocentry.c                                |  1748 --
 libs/kfs/tocfile.c                                 |   635 -
 libs/kfs/unix/sysdir-priv.h                        |    68 -
 libs/kfs/unix/sysdir.c                             |  2414 ---
 libs/kfs/unix/sysdll.c                             |  1436 --
 libs/kfs/unix/sysfile-priv.h                       |    89 -
 libs/kfs/unix/sysfile-v2.c                         |  1018 -
 libs/kfs/unix/sysfile.c                            |  1079 -
 libs/kfs/unix/syslockfile.c                        |   215 -
 libs/kfs/unix/sysmmap-priv.h                       |    68 -
 libs/kfs/unix/sysmmap.c                            |   143 -
 libs/kfs/win/directory-path.c                      |    83 -
 libs/kfs/win/lnk_tools.c                           |   518 -
 libs/kfs/win/sysdir-priv.h                         |    92 -
 libs/kfs/win/sysdir.c                              |  3135 ---
 libs/kfs/win/sysdll.c                              |  1417 --
 libs/kfs/win/sysfile-priv.h                        |    82 -
 libs/kfs/win/sysfile-v2.c                          |  1028 -
 libs/kfs/win/sysfile.c                             |  1059 -
 libs/kfs/win/syslockfile.c                         |    67 -
 libs/kfs/win/sysmmap-priv.h                        |    71 -
 libs/kfs/win/sysmmap.c                             |   138 -
 libs/klib/.gitignore                               |     1 -
 libs/klib/Judy.h                                   |   635 -
 libs/klib/Makefile                                 |   159 -
 libs/klib/SHA-32bit.c                              |   313 -
 libs/klib/SHA-64bit.c                              |   271 -
 libs/klib/bsd/syserrcode.c                         |    44 -
 libs/klib/bsearch.c                                |    77 -
 libs/klib/bstpersist.c                             |   252 -
 libs/klib/btree.c                                  |  1458 --
 libs/klib/container.c                              |  1646 --
 libs/klib/cp1252.c                                 |    65 -
 libs/klib/crc32.c                                  |   500 -
 libs/klib/data-buffer.c                            |   656 -
 libs/klib/debug.c                                  |   352 -
 libs/klib/iso8859-1.c                              |    42 -
 libs/klib/iso8859.c                                |   205 -
 libs/klib/judy-vector.c                            |  1793 --
 libs/klib/judy/Judy1.h                             |   549 -
 libs/klib/judy/Judy1Tables.32.c                    |    72 -
 libs/klib/judy/Judy1Tables.64.c                    |   132 -
 libs/klib/judy/JudyByCount.c                       |   952 -
 libs/klib/judy/JudyByCountWithDefs.c               |     4 -
 libs/klib/judy/JudyCascade.c                       |  1940 --
 libs/klib/judy/JudyCount.c                         |  1193 --
 libs/klib/judy/JudyCreateBranch.c                  |   312 -
 libs/klib/judy/JudyDecascade.c                     |  1204 --
 libs/klib/judy/JudyDel.c                           |  2144 --
 libs/klib/judy/JudyFirst.c                         |   211 -
 libs/klib/judy/JudyFreeArray.c                     |   361 -
 libs/klib/judy/JudyGet.c                           |  1092 -
 libs/klib/judy/JudyHS.c                            |   770 -
 libs/klib/judy/JudyHS.h                            |    35 -
 libs/klib/judy/JudyIns.c                           |  1871 --
 libs/klib/judy/JudyInsArray.c                      |  1176 --
 libs/klib/judy/JudyInsertBranch.c                  |   133 -
 libs/klib/judy/JudyL.h                             |   503 -
 libs/klib/judy/JudyLTables.32.c                    |   121 -
 libs/klib/judy/JudyLTables.64.c                    |   219 -
 libs/klib/judy/JudyMalloc.c                        |    86 -
 libs/klib/judy/JudyMallocIF.c                      |   780 -
 libs/klib/judy/JudyMemActive.c                     |   257 -
 libs/klib/judy/JudyMemUsed.c                       |    59 -
 libs/klib/judy/JudyNext.c                          |     2 -
 libs/klib/judy/JudyNextEmpty.c                     |     2 -
 libs/klib/judy/JudyPrev.c                          |     2 -
 libs/klib/judy/JudyPrevEmpty.c                     |     2 -
 libs/klib/judy/JudyPrevNext.c                      |  1888 --
 libs/klib/judy/JudyPrevNextEmpty.c                 |  1388 --
 libs/klib/judy/JudyPrintJP.c                       |   399 -
 libs/klib/judy/JudyPrivate.h                       |  1610 --
 libs/klib/judy/JudyPrivate1L.h                     |   483 -
 libs/klib/judy/JudyPrivateBranch.h                 |   777 -
 libs/klib/judy/JudySL.c                            |  1125 --
 libs/klib/judy/JudyTablesGen.c                     |   294 -
 libs/klib/judy/Judy_Bit.c                          |    23 -
 libs/klib/judy/Judy_Bit_Cascade.c                  |     3 -
 libs/klib/judy/Judy_Bit_Count.c                    |     3 -
 libs/klib/judy/Judy_Bit_Decascade.c                |     3 -
 libs/klib/judy/Judy_Bit_Next.c                     |     3 -
 libs/klib/judy/Judy_Bit_NextEmpty.c                |     3 -
 libs/klib/judy/Judy_Bit_Prev.c                     |     3 -
 libs/klib/judy/Judy_Word.c                         |    23 -
 libs/klib/judy/Judy_Word_Cascade.c                 |     3 -
 libs/klib/judy/Judy_Word_Count.c                   |     3 -
 libs/klib/judy/Judy_Word_Decascade.c               |     3 -
 libs/klib/judy/Judy_Word_Next.c                    |     3 -
 libs/klib/judy/Judy_Word_NextEmpty.c               |     3 -
 libs/klib/judy/Judy_Word_Prev.c                    |     3 -
 libs/klib/judy/Makefile                            |   225 -
 libs/klib/judy/_Judy1Tables.c                      |    31 -
 libs/klib/judy/_JudyLTables.c                      |    31 -
 libs/klib/judy/j__udyGet.c                         |     2 -
 libs/klib/ksort.c                                  |    98 -
 libs/klib/linux/syserrcode.c                       |    53 -
 libs/klib/log-priv.h                               |    96 -
 libs/klib/log.c                                    |   986 -
 libs/klib/maybeswap.h                              |    57 -
 libs/klib/md5.c                                    |   421 -
 libs/klib/namelist.c                               |   149 -
 libs/klib/ncbi-vdb-version.c                       |    45 -
 libs/klib/num-gen.c                                |  1157 --
 libs/klib/out.c                                    |   208 -
 libs/klib/pack.c                                   |   517 -
 libs/klib/pbstree-impl.c                           |   847 -
 libs/klib/pbstree-native.c                         |    30 -
 libs/klib/pbstree-priv.h                           |   680 -
 libs/klib/pbstree-swapped.c                        |    30 -
 libs/klib/pbstree.c                                |   395 -
 libs/klib/printf.c                                 |  3540 ----
 libs/klib/progressbar.c                            |   160 -
 libs/klib/ptpersist.c                              |  1121 --
 libs/klib/ptrie.c                                  |  1992 --
 libs/klib/qsort.c                                  |   311 -
 libs/klib/rc-idx-tbl.c                             |    39 -
 libs/klib/rc-tbl.c                                 |    36 -
 libs/klib/refcount.c                               |   499 -
 libs/klib/release-vers.h                           |    42 -
 libs/klib/report-klib.c                            |   908 -
 libs/klib/sra-release-version.c                    |   329 -
 libs/klib/status-rc-strings.c                      |    39 -
 libs/klib/status-rc.c                              |   156 -
 libs/klib/status.c                                 |   436 -
 libs/klib/sun/syslog.c                             |   208 -
 libs/klib/sun/systime.c                            |   110 -
 libs/klib/symtab.c                                 |   736 -
 libs/klib/text.c                                   |  1099 -
 libs/klib/time.c                                   |     3 -
 libs/klib/token.c                                  |  1291 --
 libs/klib/trie-priv.h                              |   237 -
 libs/klib/trie.c                                   |  1486 --
 libs/klib/trieval.c                                |   168 -
 libs/klib/unix/misc.c                              |    33 -
 libs/klib/unix/syserrcode.c                        |    46 -
 libs/klib/unix/syslog.c                            |   209 -
 libs/klib/unix/systime.c                           |   162 -
 libs/klib/unix/syswriter.c                         |   163 -
 libs/klib/unpack.c                                 |   833 -
 libs/klib/utf8.c                                   |  1355 --
 libs/klib/vector.c                                 |   626 -
 libs/klib/vector_namelist.c                        |   633 -
 libs/klib/vlen-encode.c                            |   773 -
 libs/klib/win/misc.c                               |    33 -
 libs/klib/win/sysalloc.c                           |    68 -
 libs/klib/win/syserrcode.c                         |    85 -
 libs/klib/win/syslog.c                             |   121 -
 libs/klib/win/systime.c                            |   355 -
 libs/klib/win/syswriter.c                          |   185 -
 libs/klib/writer-priv.h                            |   169 -
 libs/klib/writer.c                                 |   644 -
 libs/kns/Makefile                                  |   115 -
 libs/kns/buffered-stream.c                         |   249 -
 libs/kns/endpoint.c                                |   155 -
 libs/kns/http-client.c                             |  3095 ---
 libs/kns/http-file.c                               |   639 -
 libs/kns/http-priv.h                               |   150 -
 libs/kns/http-retrier.c                            |   503 -
 libs/kns/http.c                                    |   324 -
 libs/kns/kns_manager-ext.c                         |   157 -
 libs/kns/kns_manager.c                             |   346 -
 libs/kns/linux/sysendpoint.c                       |   158 -
 libs/kns/linux/syspoll.c                           |   107 -
 libs/kns/mac/sysendpoint.c                         |   140 -
 libs/kns/mac/syspoll.c                             |    96 -
 libs/kns/manager.c                                 |   720 -
 libs/kns/mgr-priv.h                                |    87 -
 libs/kns/poll-priv.h                               |    51 -
 libs/kns/stream-from-files.c                       |   168 -
 libs/kns/stream-from-streams.c                     |   150 -
 libs/kns/stream-priv.h                             |    40 -
 libs/kns/stream.c                                  |   782 -
 libs/kns/sysmgr.h                                  |    41 -
 libs/kns/unix/sysmgr.c                             |    37 -
 libs/kns/unix/syssock.c                            |  1188 --
 libs/kns/unix/sysstream.c                          |   251 -
 libs/kns/url-fetcher-curl.c                        |   255 -
 libs/kns/url-fetcher-impl.h                        |   109 -
 libs/kns/url-fetcher.c                             |   129 -
 libs/kns/win/sysendpoint.c                         |   147 -
 libs/kns/win/sysmgr.c                              |    65 -
 libs/kns/win/syssock.c                             |  1855 --
 libs/kns/win/sysstream.c                           |   232 -
 libs/kproc/Makefile                                |   162 -
 libs/kproc/bsd/syslock-priv.h                      |    72 -
 libs/kproc/bsd/syslock.c                           |   932 -
 libs/kproc/bsd/sysmgr.c                            |    38 -
 libs/kproc/linux/sysbarrier.c                      |   170 -
 libs/kproc/linux/syslock-priv.h                    |    68 -
 libs/kproc/linux/syslock.c                         |   617 -
 libs/kproc/linux/sysmgr.c                          |    52 -
 libs/kproc/procmgr.c                               |   412 -
 libs/kproc/queue.c                                 |   428 -
 libs/kproc/sem.c                                   |   472 -
 libs/kproc/stbarrier.c                             |   128 -
 libs/kproc/stcond.c                                |   152 -
 libs/kproc/stlock.c                                |   311 -
 libs/kproc/stsem.c                                 |   233 -
 libs/kproc/stthread.c                              |   149 -
 libs/kproc/sttimeout.c                             |    65 -
 libs/kproc/sun/sysbarrier.c                        |   170 -
 libs/kproc/sun/syslock-priv.h                      |    62 -
 libs/kproc/sun/syslock.c                           |   501 -
 libs/kproc/task.c                                  |   156 -
 libs/kproc/unix/syscond-priv.h                     |    78 -
 libs/kproc/unix/syscond.c                          |   320 -
 libs/kproc/unix/systhread.c                        |   272 -
 libs/kproc/unix/systimeout.c                       |    86 -
 libs/kproc/win/syscond-priv.h                      |    79 -
 libs/kproc/win/syscond.c                           |   500 -
 libs/kproc/win/syslock-priv.h                      |    67 -
 libs/kproc/win/syslock.c                           |   725 -
 libs/kproc/win/sysmgr.c                            |    37 -
 libs/kproc/win/systhread.c                         |   291 -
 libs/kproc/win/systimeout.c                        |    70 -
 libs/krypto/.gitignore                             |     2 -
 libs/krypto/Makefile                               |   297 -
 libs/krypto/aes-byte.c                             |   236 -
 libs/krypto/aes-impl.c                             |     1 -
 libs/krypto/aes-ncbi-ni.c                          |     2 -
 libs/krypto/aes-ncbi-priv.h                        |   227 -
 libs/krypto/aes-ncbi.c                             |  2641 ---
 libs/krypto/aes-priv.h                             |    94 -
 libs/krypto/aes.c                                  |     1 -
 libs/krypto/aes_core.c                             |  1181 --
 libs/krypto/aes_x86core.c                          |     2 -
 libs/krypto/aesx86.c                               |     1 -
 libs/krypto/blockcipher-byte-impl.h                |   113 -
 libs/krypto/blockcipher-impl.h                     |   187 -
 libs/krypto/blockcipher-priv.h                     |    90 -
 libs/krypto/blockcipher-vec-impl.h                 |   119 -
 libs/krypto/blockcipher.c                          |     3 -
 libs/krypto/cipher-byte.c                          |   522 -
 libs/krypto/cipher-impl.h                          |   174 -
 libs/krypto/cipher-no-vec.c                        |    41 -
 libs/krypto/cipher-priv.h                          |    79 -
 libs/krypto/cipher-vec.c                           |   808 -
 libs/krypto/cipher.c                               |   543 -
 libs/krypto/ciphermgr.c                            |   295 -
 libs/krypto/ciphertest.c                           |    80 -
 libs/krypto/compile-test.c                         |    50 -
 libs/krypto/csprng.c                               |   163 -
 libs/krypto/encfile-priv.h                         |   162 -
 libs/krypto/encfile.c                              |  2019 --
 libs/krypto/encfilev2.c                            |  2621 ---
 libs/krypto/key.c                                  |   126 -
 libs/krypto/manager.c                              |    11 -
 libs/krypto/ncbi-priv.h                            |   122 -
 libs/krypto/no-null-ncbi.c                         |    59 -
 libs/krypto/null-ncbi-priv.h                       |    56 -
 libs/krypto/null-ncbi.c                            |   251 -
 libs/krypto/reencfile.c                            |  1243 --
 libs/krypto/rng-impl.h                             |    91 -
 libs/krypto/rng.c                                  |   120 -
 libs/krypto/testcipher.c                           |    76 -
 libs/krypto/unix/sysrng.c                          |   114 -
 libs/krypto/wgaencrypt.c                           |  1254 --
 libs/krypto/win/sysrng.c                           |   132 -
 libs/ktst/Makefile                                 |    87 -
 libs/ktst/testcase.cpp                             |   108 -
 libs/ktst/testenv.cpp                              |   518 -
 libs/ktst/testrunner.cpp                           |    86 -
 libs/ktst/unix/systestenv.cpp                      |   137 -
 libs/ktst/win/systestenv.cpp                       |   167 -
 libs/kxml/Makefile                                 |   117 -
 libs/kxml/xml.c                                    |  1705 --
 libs/kxml/xtoc-parsexml.c                          |   576 -
 libs/kxml/xtoc-priv.h                              |   124 -
 libs/kxml/xtoc.c                                   |  3464 ----
 libs/loader/Makefile                               |    88 -
 libs/loader/alignment-writer.c                     |   271 -
 libs/loader/common-writer.c                        |  2067 --
 libs/loader/mmarray.c                              |   131 -
 libs/loader/reference-writer.c                     |   483 -
 libs/ncbi-vdb/Makefile                             |   157 -
 libs/ngs-c++/Makefile                              |   103 -
 libs/ngs-c++/NCBI-NGS.cpp                          |   106 -
 libs/ngs-c++/testy-the-bear.cpp                    |   277 -
 libs/ngs-jni/.gitignore                            |     1 -
 libs/ngs-jni/Makefile                              |   109 -
 libs/ngs-jni/jni.h                                 |  1944 --
 libs/ngs-jni/jni_ErrorMsg.c                        |   173 -
 libs/ngs-jni/jni_ErrorMsg.h                        |    89 -
 libs/ngs-jni/jni_Manager.c                         |   250 -
 libs/ngs-jni/jni_Manager.h                         |    77 -
 libs/ngs-jni/jni_String.c                          |   193 -
 libs/ngs-jni/jni_String.h                          |    91 -
 libs/ngs-jni/jni_md.h                              |    28 -
 libs/ngs-py/Makefile                               |    87 -
 libs/ngs-py/py_Manager.c                           |   218 -
 libs/ngs-py/py_Manager.h                           |    27 -
 libs/ngs-py/py_ngs_defs.h                          |    15 -
 libs/ngs/BAM_Alignment.c                           |   641 -
 libs/ngs/BAM_Alignment.h                           |    58 -
 libs/ngs/BAM_ReadCollection.c                      |  1522 --
 libs/ngs/BAM_Record.c                              |   142 -
 libs/ngs/BAM_Record.h                              |    82 -
 libs/ngs/CSRA1_Alignment.c                         |  1430 --
 libs/ngs/CSRA1_Alignment.h                         |    83 -
 libs/ngs/CSRA1_Pileup.c                            |  1921 --
 libs/ngs/CSRA1_Pileup.h                            |   341 -
 libs/ngs/CSRA1_PileupEvent.c                       |   931 -
 libs/ngs/CSRA1_PileupEvent.h                       |    50 -
 libs/ngs/CSRA1_Read.c                              |   496 -
 libs/ngs/CSRA1_Read.h                              |    96 -
 libs/ngs/CSRA1_ReadCollection.c                    |   753 -
 libs/ngs/CSRA1_ReadCollection.h                    |    58 -
 libs/ngs/CSRA1_Reference.c                         |  1068 -
 libs/ngs/CSRA1_Reference.h                         |    96 -
 libs/ngs/CSRA1_ReferenceWindow.c                   |  1049 -
 libs/ngs/CSRA1_ReferenceWindow.h                   |    67 -
 libs/ngs/EBI_ReferenceSequence.c                   |   408 -
 libs/ngs/EBI_ReferenceSequence.h                   |    51 -
 libs/ngs/Makefile                                  |   128 -
 libs/ngs/Model.graphml                             |   661 -
 libs/ngs/NCBI-NGS.c                                |    66 -
 libs/ngs/NCBI-NGS.h                                |    58 -
 libs/ngs/NGS_Alignment.c                           |   978 -
 libs/ngs/NGS_Alignment.h                           |   206 -
 libs/ngs/NGS_Cursor.c                              |   575 -
 libs/ngs/NGS_Cursor.h                              |   134 -
 libs/ngs/NGS_ErrBlock.c                            |    57 -
 libs/ngs/NGS_ErrBlock.h                            |    53 -
 libs/ngs/NGS_Fragment.c                            |   286 -
 libs/ngs/NGS_Fragment.h                            |   175 -
 libs/ngs/NGS_FragmentBlob.c                        |   476 -
 libs/ngs/NGS_FragmentBlob.h                        |   125 -
 libs/ngs/NGS_FragmentBlobIterator.c                |   185 -
 libs/ngs/NGS_FragmentBlobIterator.h                |    79 -
 libs/ngs/NGS_Id.c                                  |   179 -
 libs/ngs/NGS_Id.h                                  |    93 -
 libs/ngs/NGS_Pileup.c                              |   235 -
 libs/ngs/NGS_Pileup.h                              |   147 -
 libs/ngs/NGS_PileupEvent.c                         |   493 -
 libs/ngs/NGS_PileupEvent.h                         |   179 -
 libs/ngs/NGS_Read.c                                |   522 -
 libs/ngs/NGS_Read.h                                |   190 -
 libs/ngs/NGS_ReadCollection.c                      |   674 -
 libs/ngs/NGS_ReadCollection.h                      |   194 -
 libs/ngs/NGS_ReadGroup.c                           |   229 -
 libs/ngs/NGS_ReadGroup.h                           |   127 -
 libs/ngs/NGS_Refcount.c                            |   182 -
 libs/ngs/NGS_Refcount.h                            |   102 -
 libs/ngs/NGS_Reference.c                           |   916 -
 libs/ngs/NGS_Reference.h                           |   214 -
 libs/ngs/NGS_ReferenceSequence.c                   |   282 -
 libs/ngs/NGS_ReferenceSequence.h                   |   138 -
 libs/ngs/NGS_Statistics.c                          |   335 -
 libs/ngs/NGS_Statistics.h                          |   143 -
 libs/ngs/NGS_String.c                              |   413 -
 libs/ngs/NGS_String.h                              |   109 -
 libs/ngs/NOTES.txt                                 |   128 -
 libs/ngs/SRA_DB_ReadCollection.c                   |   456 -
 libs/ngs/SRA_Read.c                                |   936 -
 libs/ngs/SRA_Read.h                                |   169 -
 libs/ngs/SRA_ReadCollection.c                      |   424 -
 libs/ngs/SRA_ReadGroup.c                           |   429 -
 libs/ngs/SRA_ReadGroup.h                           |    73 -
 libs/ngs/SRA_ReadGroupInfo.c                       |   333 -
 libs/ngs/SRA_ReadGroupInfo.h                       |    89 -
 libs/ngs/SRA_ReferenceSequence.c                   |   374 -
 libs/ngs/SRA_ReferenceSequence.h                   |    56 -
 libs/ngs/SRA_Statistics.c                          |   773 -
 libs/ngs/SRA_Statistics.h                          |    61 -
 libs/ngs/extern.h                                  |    41 -
 libs/search/Makefile                               |    98 -
 libs/search/agrep-dp.c                             |   880 -
 libs/search/agrep-myers.c                          |   644 -
 libs/search/agrep-myersunltd.c                     |  1039 -
 libs/search/agrep-wumanber.c                       |   415 -
 libs/search/debug.h                                |    43 -
 libs/search/fgrep-aho.c                            |   363 -
 libs/search/fgrep-boyermoore.c                     |   462 -
 libs/search/fgrep-dumb.c                           |   326 -
 libs/search/nucstrstr.c                            |  4621 -----
 libs/search/search-priv.h                          |   140 -
 libs/search/search.c                               |   388 -
 libs/search/sw-search.c                            |  1496 --
 libs/sra/.gitignore                                |     1 -
 libs/sra/Makefile                                  |   249 -
 libs/sra/built-in.vschema                          |   580 -
 libs/sra/libsra-schema.vers.h                      |    27 -
 libs/sra/libsradb.vers.h                           |    27 -
 libs/sra/libsrareader.vers.h                       |     1 -
 libs/sra/libsraschema.vers.h                       |     1 -
 libs/sra/libwsradb.vers.h                          |     1 -
 libs/sra/libwsraschema.vers.h                      |     1 -
 libs/sra/reader-abi.c                              |   473 -
 libs/sra/reader-cmn.c                              |   379 -
 libs/sra/reader-cmn.h                              |   161 -
 libs/sra/reader-fastq.c                            |   623 -
 libs/sra/reader-illumina.c                         |   567 -
 libs/sra/reader-sff.c                              |   380 -
 libs/sra/sra-debug.h                               |    42 -
 libs/sra/sra-dflt-schema.c                         |   552 -
 libs/sra/sra-priv.h                                |   183 -
 libs/sra/sra-schema.c                              |  4133 ----
 libs/sra/sracache.c                                |   560 -
 libs/sra/sracol.c                                  |   235 -
 libs/sra/sramgr-cmn.c                              |   572 -
 libs/sra/sramgr.c                                  |   186 -
 libs/sra/sraschema-priv.h                          |    36 -
 libs/sra/sraschema-stub.c                          |    51 -
 libs/sra/sraschema.c                               |    74 -
 libs/sra/sratbl-cmn.c                              |  1458 --
 libs/sra/sratbl.c                                  |   118 -
 libs/sra/types.c                                   |   298 -
 libs/sra/wsramgr.c                                 |   165 -
 libs/sra/wsraschema-stub.c                         |    51 -
 libs/sra/wsratbl.c                                 |   649 -
 libs/sraxf/.gitignore                              |     1 -
 libs/sraxf/Makefile                                |   152 -
 libs/sraxf/bio-start.c                             |   197 -
 libs/sraxf/color-from-dna.c                        |   151 -
 libs/sraxf/denormalize.c                           |   231 -
 libs/sraxf/dna-from-color.c                        |   150 -
 libs/sraxf/dynamic-454-read-descriptor.c           |   303 -
 libs/sraxf/extract-coordinates.c                   |   354 -
 libs/sraxf/extract-name_coord.c                    |   243 -
 libs/sraxf/extract-name_fmt.c                      |   240 -
 libs/sraxf/extract-spot_name.c                     |   105 -
 libs/sraxf/fix_read_seg_impl.h                     |   169 -
 libs/sraxf/format-spot-name.c                      |   333 -
 libs/sraxf/fpcodec.c                               |   267 -
 libs/sraxf/index_lookup.c                          |   270 -
 libs/sraxf/make-position.c                         |   133 -
 libs/sraxf/name-tokenizer.h                        |   121 -
 libs/sraxf/normalize.c                             |   240 -
 libs/sraxf/prefix-tree-to-name.c                   |   162 -
 libs/sraxf/process-position.c                      |   198 -
 libs/sraxf/qstat-trigger.c                         |   256 -
 libs/sraxf/qual4_codec.h                           |    43 -
 libs/sraxf/qual4_decode.c                          |   257 -
 libs/sraxf/qual4_encode.c                          |   232 -
 libs/sraxf/read-desc.c                             |   143 -
 libs/sraxf/read-seg-from-readn.c                   |   361 -
 libs/sraxf/rewrite-spot-name.c                     |   223 -
 libs/sraxf/rotate.c                                |   271 -
 libs/sraxf/spot-desc.c                             |   102 -
 libs/sraxf/stat_mod.c                              |   392 -
 libs/sraxf/stat_mod.h                              |    80 -
 libs/sraxf/stats.c                                 |   764 -
 libs/sraxf/stats_quality.c                         |   132 -
 libs/sraxf/swap.c                                  |   228 -
 libs/sraxf/tokenize-spot_name-454.c                |   122 -
 libs/sraxf/tokenize-spot_name-abi.c                |   146 -
 libs/sraxf/tokenize-spot_name-generic-fastq.c      |    82 -
 libs/sraxf/tokenize-spot_name-helicos.c            |   112 -
 libs/sraxf/tokenize-spot_name-illumina.c           |   151 -
 libs/sraxf/tokenize-spot_name-ion-torrent.c        |   136 -
 libs/sraxf/untyped-priv.h                          |    83 -
 libs/sraxf/untyped.c                               |   378 -
 libs/sraxf/v0-decompress-init.c                    |  2838 ---
 libs/sraxf/v0-decompress-local.h                   |   368 -
 libs/sraxf/v0-decompress.c                         |  1093 -
 libs/sraxf/v0-decompress.h                         |   170 -
 libs/sraxf/v0-funcs.c                              |   337 -
 libs/sraxf/varloc.c                                |   105 -
 libs/svdb/Makefile                                 |    95 -
 libs/svdb/svdb.c                                   |  3215 ---
 libs/tui/Makefile                                  |   137 -
 libs/tui/bsd/systui.c                              |   619 -
 libs/tui/dir_dlg.c                                 |   470 -
 libs/tui/eventring.c                               |   134 -
 libs/tui/eventring.h                               |    74 -
 libs/tui/file_dlg.c                                |   380 -
 libs/tui/line_policy.c                             |   379 -
 libs/tui/line_policy.h                             |    86 -
 libs/tui/linux/systui.c                            |   624 -
 libs/tui/screen.c                                  |   209 -
 libs/tui/screen.h                                  |    75 -
 libs/tui/string_cache.c                            |   378 -
 libs/tui/string_cache.h                            |    54 -
 libs/tui/tui-priv.h                                |    87 -
 libs/tui/tui.c                                     |   380 -
 libs/tui/tui_cpp.cpp                               |   226 -
 libs/tui/tui_dlg.c                                 |  1291 --
 libs/tui/tui_dlg_helper.c                          |   250 -
 libs/tui/tui_menu.c                                |   913 -
 libs/tui/tui_menu.h                                |    49 -
 libs/tui/tui_palette.c                             |   304 -
 libs/tui/tui_std_dlg.c                             |   355 -
 libs/tui/tui_widget.c                              |  1079 -
 libs/tui/tui_widget.h                              |   210 -
 libs/tui/tui_widget_button.c                       |    87 -
 libs/tui/tui_widget_checkbox.c                     |    87 -
 libs/tui/tui_widget_grid.c                         |   488 -
 libs/tui/tui_widget_inputline.c                    |   181 -
 libs/tui/tui_widget_label.c                        |    53 -
 libs/tui/tui_widget_progress.c                     |   120 -
 libs/tui/tui_widget_radiobox.c                     |   130 -
 libs/tui/tui_widget_spin_edit.c                    |   118 -
 libs/tui/tui_widget_string_list.c                  |   183 -
 libs/tui/unix/systui.c                             |    29 -
 libs/tui/win/systui.c                              |   590 -
 libs/vdb/.gitignore                                |     1 -
 libs/vdb/Makefile                                  |   188 -
 libs/vdb/blob-headers.c                            |   726 -
 libs/vdb/blob-headers.h                            |   114 -
 libs/vdb/blob-priv.h                               |   206 -
 libs/vdb/blob.c                                    |  1690 --
 libs/vdb/blob.h                                    |    84 -
 libs/vdb/cast.c                                    |   583 -
 libs/vdb/column-cmn.c                              |   356 -
 libs/vdb/column-priv.h                             |   304 -
 libs/vdb/column.c                                  |    80 -
 libs/vdb/compare.c                                 |   242 -
 libs/vdb/cursor-cmn.c                              |  2910 ---
 libs/vdb/cursor-priv.h                             |   322 -
 libs/vdb/cursor.c                                  |   200 -
 libs/vdb/database-cmn.c                            |   928 -
 libs/vdb/database-depend.c                         |  1807 --
 libs/vdb/database-load.c                           |   119 -
 libs/vdb/database-priv.h                           |   150 -
 libs/vdb/database.c                                |    29 -
 libs/vdb/dbmgr-cmn.c                               |   917 -
 libs/vdb/dbmgr-priv.h                              |   115 -
 libs/vdb/dbmgr.c                                   |   157 -
 libs/vdb/delta_average.c                           |   298 -
 libs/vdb/environment-read.c                        |   108 -
 libs/vdb/fixed-row-len.c                           |    67 -
 libs/vdb/gen-cast.pl                               |   480 -
 libs/vdb/index_insert.c                            |   150 -
 libs/vdb/index_lookup.c                            |   191 -
 libs/vdb/index_project.c                           |   221 -
 libs/vdb/libvdb.vers.h                             |    27 -
 libs/vdb/linker-cmn.c                              |   656 -
 libs/vdb/linker-int.c                              |   679 -
 libs/vdb/linker-priv.h                             |   272 -
 libs/vdb/linker.c                                  |    45 -
 libs/vdb/merge.c                                   |   215 -
 libs/vdb/meta-append.c                             |   145 -
 libs/vdb/meta-attr-read.c                          |   448 -
 libs/vdb/meta-attr-write.c                         |   529 -
 libs/vdb/meta-read.c                               |   140 -
 libs/vdb/meta-value.c                              |   381 -
 libs/vdb/meta-write.c                              |   155 -
 libs/vdb/page-map.c                                |  1734 --
 libs/vdb/page-map.h                                |   386 -
 libs/vdb/parameter-read.c                          |   103 -
 libs/vdb/phys-cmn.c                                |   784 -
 libs/vdb/phys-load.c                               |   330 -
 libs/vdb/phys-priv.h                               |   194 -
 libs/vdb/phys.c                                    |    67 -
 libs/vdb/prod-cmn.c                                |  2506 ---
 libs/vdb/prod-expr.c                               |   885 -
 libs/vdb/prod-expr.h                               |   202 -
 libs/vdb/prod-func.c                               |   957 -
 libs/vdb/prod-priv.h                               |   462 -
 libs/vdb/prod.c                                    |   136 -
 libs/vdb/range-validate.c                          |   195 -
 libs/vdb/redimension.c                             |   108 -
 libs/vdb/report-vdb.c                              |   853 -
 libs/vdb/row-id.c                                  |    64 -
 libs/vdb/row-len.c                                 |    65 -
 libs/vdb/schema-db.c                               |   752 -
 libs/vdb/schema-dump.c                             |   683 -
 libs/vdb/schema-dump.h                             |   208 -
 libs/vdb/schema-eval.c                             |  1400 --
 libs/vdb/schema-expr.c                             |  2170 --
 libs/vdb/schema-expr.h                             |   396 -
 libs/vdb/schema-func.c                             |  1657 --
 libs/vdb/schema-int.c                              |   376 -
 libs/vdb/schema-parse.c                            |   857 -
 libs/vdb/schema-parse.h                            |   607 -
 libs/vdb/schema-priv.h                             |  1308 --
 libs/vdb/schema-prod.c                             |  1004 -
 libs/vdb/schema-tbl.c                              |  2925 ---
 libs/vdb/schema-tok.c                              |    74 -
 libs/vdb/schema-tok.h                              |    61 -
 libs/vdb/schema-type.c                             |  2573 ---
 libs/vdb/schema.c                                  |  1768 --
 libs/vdb/split.c                                   |   398 -
 libs/vdb/table-cmn.c                               |  1401 --
 libs/vdb/table-load.c                              |   323 -
 libs/vdb/table-priv.h                              |   238 -
 libs/vdb/table.c                                   |   109 -
 libs/vdb/transpose.c                               |   720 -
 libs/vdb/wcolumn.c                                 |  1074 -
 libs/vdb/wcursor.c                                 |  1238 --
 libs/vdb/wdatabase.c                               |   680 -
 libs/vdb/wdbmgr.c                                  |   267 -
 libs/vdb/wlinker.c                                 |    98 -
 libs/vdb/wphys.c                                   |   912 -
 libs/vdb/wprod.c                                   |   439 -
 libs/vdb/wtable.c                                  |  1055 -
 libs/vdb/xform-priv.h                              |    83 -
 libs/vfs/Makefile                                  |   102 -
 libs/vfs/keyring.c                                 |   292 -
 libs/vfs/keyring.h                                 |   111 -
 libs/vfs/kurl-stub.c                               |    18 -
 libs/vfs/manager.c                                 |  3326 ---
 libs/vfs/path-priv.h                               |   147 -
 libs/vfs/path.c                                    |  3788 ----
 libs/vfs/resolver-3.0.c                            |   326 -
 libs/vfs/resolver-priv.h                           |   241 -
 libs/vfs/resolver.c                                |  4673 -----
 libs/vfs/srapath-stub.c                            |   372 -
 libs/vfs/srapath.c                                 |  1424 --
 libs/vfs/unix/syskeyring.c                         |   161 -
 libs/vfs/unix/syspath.c                            |   155 -
 libs/vfs/win/syskeyring.c                          |    58 -
 libs/vfs/win/syspath.c                             |   471 -
 libs/vxf/.gitignore                                |     1 -
 libs/vxf/Makefile                                  |   196 -
 libs/vxf/add-row-id.c                              |    80 -
 libs/vxf/bit_or.c                                  |   135 -
 libs/vxf/bunzip.c                                  |   130 -
 libs/vxf/bzip.c                                    |   184 -
 libs/vxf/ceil.c                                    |    48 -
 libs/vxf/checksum.c                                |   566 -
 libs/vxf/clip.c                                    |   200 -
 libs/vxf/cut.c                                     |   227 -
 libs/vxf/delta.c                                   |   108 -
 libs/vxf/deriv.c                                   |   109 -
 libs/vxf/diff.c                                    |   356 -
 libs/vxf/echo.c                                    |   187 -
 libs/vxf/entrez.c                                  |   170 -
 libs/vxf/exists.c                                  |   212 -
 libs/vxf/extract_token.c                           |   105 -
 libs/vxf/floor.c                                   |    49 -
 libs/vxf/fsplit-join.impl.h                        |   136 -
 libs/vxf/funzip.c                                  |   172 -
 libs/vxf/fzip.c                                    |   168 -
 libs/vxf/integral.c                                |   113 -
 libs/vxf/integral_0.c                              |   113 -
 libs/vxf/irzip.c                                   |   564 -
 libs/vxf/irzip.impl.h                              |   482 -
 libs/vxf/iunzip.c                                  |   748 -
 libs/vxf/izip-common.h                             |   195 -
 libs/vxf/izip-decode.impl.h                        |   162 -
 libs/vxf/izip-encode.impl.h                        |   523 -
 libs/vxf/izip.c                                    |   866 -
 libs/vxf/lower-case-tech-reads.c                   |   111 -
 libs/vxf/map.c                                     |  1017 -
 libs/vxf/math-funcs-impl.h                         |   361 -
 libs/vxf/max.c                                     |   175 -
 libs/vxf/min.c                                     |   175 -
 libs/vxf/outlier-decoder.c                         |   113 -
 libs/vxf/outlier-encoder.c                         |   141 -
 libs/vxf/pack.c                                    |    92 -
 libs/vxf/paste.c                                   |   357 -
 libs/vxf/rand_4na_2na.c                            |   200 -
 libs/vxf/rldecode.c                                |   155 -
 libs/vxf/rlencode.c                                |   262 -
 libs/vxf/round.c                                   |    49 -
 libs/vxf/simple-sub-select.c                       |   293 -
 libs/vxf/sprintf.c                                 |  1280 --
 libs/vxf/strtonum.c                                |   354 -
 libs/vxf/subtract-row-id.c                         |    83 -
 libs/vxf/sum.c                                     |   356 -
 libs/vxf/trim.c                                    |   229 -
 libs/vxf/trunc.c                                   |    49 -
 libs/vxf/undelta.c                                 |   108 -
 libs/vxf/unpack.c                                  |   115 -
 libs/vxf/unzip.c                                   |   234 -
 libs/vxf/vec-sum.c                                 |   239 -
 libs/vxf/wgs-tokenize-accession.c                  |   213 -
 libs/vxf/zip.c                                     |   216 -
 libs/wgsxf/Makefile                                |   127 -
 libs/wgsxf/build_read_type.c                       |   113 -
 libs/wgsxf/build_scaffold.c                        |   435 -
 libs/xfs/Makefile                                  |   140 -
 libs/xfs/bogus.c                                   |   373 -
 libs/xfs/common.h                                  |   217 -
 libs/xfs/contnode.c                                |   685 -
 libs/xfs/contnode.h                                |    98 -
 libs/xfs/doc.c                                     |   730 -
 libs/xfs/docnode.c                                 |   745 -
 libs/xfs/editors.c                                 |   491 -
 libs/xfs/encro.c                                   |   875 -
 libs/xfs/encws.c                                   |  1793 --
 libs/xfs/foo.c                                     |   250 -
 libs/xfs/gap.c                                     |   585 -
 libs/xfs/gapc.c                                    |   993 -
 libs/xfs/gapf.c                                    |   879 -
 libs/xfs/gapk.c                                    |   440 -
 libs/xfs/gapka.c                                   |  1005 -
 libs/xfs/gapks.c                                   |   882 -
 libs/xfs/handle.c                                  |   227 -
 libs/xfs/http.c                                    |  1300 --
 libs/xfs/kfs.c                                     |  2038 --
 libs/xfs/lockdpt.c                                 |   192 -
 libs/xfs/lockdpt.h                                 |    76 -
 libs/xfs/lreader.c                                 |   459 -
 libs/xfs/lreader.h                                 |   117 -
 libs/xfs/mehr.c                                    |   258 -
 libs/xfs/mehr.h                                    |    77 -
 libs/xfs/model.c                                   |  1157 --
 libs/xfs/ncon.c                                    |   525 -
 libs/xfs/ncon.h                                    |    98 -
 libs/xfs/node.c                                    |   616 -
 libs/xfs/owp.c                                     |   375 -
 libs/xfs/owp.h                                     |    86 -
 libs/xfs/path.c                                    |  1503 --
 libs/xfs/perm.c                                    |   805 -
 libs/xfs/platform.h                                |    51 -
 libs/xfs/readme.c                                  |   193 -
 libs/xfs/schwarzschraube.c                         |   334 -
 libs/xfs/schwarzschraube.h                         |   118 -
 libs/xfs/simcon.c                                  |   214 -
 libs/xfs/spen.c                                    |   963 -
 libs/xfs/spen.h                                    |   121 -
 libs/xfs/tar.c                                     |  1225 --
 libs/xfs/teleport.c                                |   460 -
 libs/xfs/teleport.h                                |   108 -
 libs/xfs/tree.c                                    |   717 -
 libs/xfs/unix/operations.c                         |  2150 --
 libs/xfs/unix/operations.h                         |    54 -
 libs/xfs/unix/platform.c                           |   359 -
 libs/xfs/unix/security.c                           |    24 -
 libs/xfs/win/operations.c                          |  2666 ---
 libs/xfs/win/operations.h                          |    50 -
 libs/xfs/win/platform.c                            |   541 -
 libs/xfs/win/security.c                            |  1935 --
 libs/xfs/xencro.c                                  |   944 -
 libs/xfs/xencro.h                                  |   118 -
 libs/xfs/xencws.c                                  |  5090 -----
 libs/xfs/xencws.h                                  |    71 -
 libs/xfs/xfs-priv.h                                |   118 -
 libs/xfs/xfs.c                                     |   403 -
 libs/xfs/xgap.c                                    |  1408 --
 libs/xfs/xgap.h                                    |   244 -
 libs/xfs/xgapf.c                                   |  1822 --
 libs/xfs/xgapf.h                                   |   126 -
 libs/xfs/xgapk.c                                   |  1777 --
 libs/xfs/xgapk.h                                   |   184 -
 libs/xfs/xhttp.c                                   |  2998 ---
 libs/xfs/xhttp.h                                   |   174 -
 libs/xfs/xlog.c                                    |   295 -
 libs/xfs/xtar.c                                    |  1248 --
 libs/xfs/xtar.h                                    |   160 -
 libs/xfs/zehr.c                                    |  1063 -
 libs/xfs/zehr.h                                    |   266 -
 local-builds.sh                                    |    72 -
 schema_crc.pl                                      |   148 -
 setup/install.prl                                  |    43 +-
 setup/konfigure.perl                               |     2 +-
 setup/package.prl                                  |    63 +-
 shared/Makefile                                    |    85 +
 .../libncbi-vdb.vers => shared/toolkit.vers        |     0
 shared/toolkit.vers.c                              |     8 +
 shared/toolkit.vers.h                              |     1 +
 test/Makefile                                      |    47 +-
 test/align-cache/CSRA_file                         |   Bin 0 -> 154937 bytes
 test/align-cache/Makefile                          |    58 +
 test/align-cache/valgrind.suppress                 |     6 +
 test/align-info/Makefile                           |    48 +
 test/cc/Makefile                                   |    60 -
 test/cc/asm-test.cpp                               |   465 -
 test/cipher/Makefile                               |    52 -
 test/cipher/test.sh                                |    47 -
 test/copycat/Makefile                              |    60 +
 test/copycat/input/1.xml                           |     5 +
 test/ext/Makefile                                  |    51 -
 test/ext/magic/Makefile                            |    61 -
 test/ext/magic/magictest.cpp                       |    85 -
 test/fastdump/Makefile                             |    53 +
 test/fastdump/copy-default-kfg.sh                  |    12 +
 test/fastdump/test_no_1.sh                         |    49 +
 test/fastdump/test_no_2.sh                         |    49 +
 test/fastq-loader/.gitignore                       |     1 +
 test/fastq-loader/Makefile                         |   208 +
 test/fastq-loader/expected/1.1.stdout              |    30 +
 test/fastq-loader/expected/1.2.stdout              |    30 +
 test/fastq-loader/expected/1.3.stderr              |     4 +
 test/fastq-loader/expected/1.3.stdout              |    27 +
 test/fastq-loader/expected/1.4.stdout              |    90 +
 test/fastq-loader/expected/10.0.stdout             |    30 +
 test/fastq-loader/expected/11.0.stdout             |    30 +
 test/fastq-loader/expected/11.1.stdout             |    30 +
 test/fastq-loader/expected/12.0.stdout             |    60 +
 test/fastq-loader/expected/12.1.stdout             |    60 +
 test/fastq-loader/expected/12.2.stdout             |    30 +
 test/fastq-loader/expected/13.0.stdout             |    90 +
 test/fastq-loader/expected/13.1.stdout             |    90 +
 test/fastq-loader/expected/14.0.stdout             |    30 +
 test/fastq-loader/expected/2.1.1.stdout            |    44 +
 test/fastq-loader/expected/2.1.stdout              |    60 +
 test/fastq-loader/expected/2.5.stdout              |    60 +
 test/fastq-loader/expected/2.6.stdout              |    30 +
 test/fastq-loader/expected/2.7.stdout              |    30 +
 test/fastq-loader/expected/2.8.1.stdout            |    60 +
 test/fastq-loader/expected/2.8.stdout              |    60 +
 test/fastq-loader/expected/2.9.1.stderr            |     5 +
 test/fastq-loader/expected/2.9.stderr              |     5 +
 test/fastq-loader/expected/3.1.stdout              |   120 +
 test/fastq-loader/expected/4.2.stdout              |    30 +
 test/fastq-loader/expected/4.3.1.stderr            |    14 +
 test/fastq-loader/expected/4.4.stdout              |    66 +
 test/fastq-loader/expected/4.5.1.stderr            |     8 +
 test/fastq-loader/expected/4.5.stderr              |     9 +
 test/fastq-loader/expected/4.6.1.stderr            |     3 +
 test/fastq-loader/expected/4.6.stdout              |    30 +
 test/fastq-loader/expected/4.7.stderr              |     2 +
 test/fastq-loader/expected/5.0.stdout              |    30 +
 test/fastq-loader/expected/6.0.stdout              |   390 +
 test/fastq-loader/expected/7.1.stdout              |    60 +
 test/fastq-loader/expected/7.2.stdout              |    60 +
 test/fastq-loader/expected/7.3.stdout              |    60 +
 test/fastq-loader/expected/8.0.stdout              |    30 +
 test/fastq-loader/expected/8.1.stderr              |     5 +
 test/fastq-loader/expected/9.0.stdout              |    60 +
 test/fastq-loader/input/1.1.fastq                  |     5 +
 test/fastq-loader/input/1.2.fastq                  |     5 +
 test/fastq-loader/input/1.3.fastq                  |     5 +
 test/fastq-loader/input/1.4.fastq                  |    24 +
 test/fastq-loader/input/10.0.fastq                 |     4 +
 test/fastq-loader/input/11.0.1.fasta               |     2 +
 test/fastq-loader/input/11.0.2.fasta               |     2 +
 test/fastq-loader/input/11.1.1.fastq               |     4 +
 test/fastq-loader/input/11.1.2.fastq               |     4 +
 test/fastq-loader/input/12.0.fastq                 |     8 +
 test/fastq-loader/input/12.1.fastq                 |     8 +
 test/fastq-loader/input/12.2.fastq                 |     4 +
 test/fastq-loader/input/13.0.fastq                 |    12 +
 test/fastq-loader/input/13.1.fastq                 |    12 +
 test/fastq-loader/input/14.0.fasta                 |     2 +
 test/fastq-loader/input/2.1.1.fastq                |     5 +
 test/fastq-loader/input/2.1.fastq                  |     4 +
 test/fastq-loader/input/2.2.fastq                  |     4 +
 test/fastq-loader/input/2.3.fastq                  |     8 +
 test/fastq-loader/input/2.4.fastq                  |     8 +
 test/fastq-loader/input/2.5.fastq                  |     9 +
 test/fastq-loader/input/2.6.fastq                  |     9 +
 test/fastq-loader/input/2.7.fastq                  |     8 +
 test/fastq-loader/input/2.8.1.fastq                |     4 +
 test/fastq-loader/input/2.8.fastq                  |     4 +
 test/fastq-loader/input/2.9.1.fastq                |     4 +
 test/fastq-loader/input/2.9.fastq                  |     4 +
 test/fastq-loader/input/3.1a.fastq                 |     8 +
 test/fastq-loader/input/3.1b.fastq                 |     9 +
 test/fastq-loader/input/3.2a.fastq                 |     8 +
 test/fastq-loader/input/3.2b.fastq                 |     8 +
 test/fastq-loader/input/3.3a.fastq                 |     8 +
 test/fastq-loader/input/3.3b.fastq                 |     8 +
 test/fastq-loader/input/4.4.fastq                  |    13 +
 test/fastq-loader/input/4.5.1.fastq                |    10 +
 test/fastq-loader/input/4.5.fastq                  |    10 +
 test/fastq-loader/input/4.fastq                    |     5 +
 test/fastq-loader/input/5.0.fastq.gz               |   Bin 0 -> 139 bytes
 test/fastq-loader/input/6.0.fastq                  |    52 +
 test/fastq-loader/input/7.1.fastq                  |     9 +
 test/fastq-loader/input/7.2.fastq                  |     8 +
 test/fastq-loader/input/7.3.fastq                  |     8 +
 test/fastq-loader/input/8.0.fastq                  |     9 +
 test/fastq-loader/input/8.1.fastq                  |    17 +
 test/fastq-loader/input/9.0.fastq                  |    16 +
 test/fastq-loader/runtestcase.sh                   |   106 +
 test/fastq-loader/test-fastq-loader.cpp            |   215 +
 test/fastq-loader/wb-test-fastq.cpp                |  1384 ++
 test/fuse/Makefile                                 |    79 +
 test/fuse/cfg/standard.cfg                         |    21 +
 test/fuse/remote-fuser-test.c                      |   794 +
 test/fuse/remote-fuser-test.vers                   |     1 +
 test/fuse/remote-fuser-test.vers.h                 |     1 +
 test/fuse/remote_fuser_test.sh                     |   685 +
 test/fuse/utils.c                                  |   867 +
 test/fuse/utils.h                                  |   120 +
 test/general-loader/.gitignore                     |     2 +
 test/general-loader/Makefile                       |   183 +
 test/general-loader/expected/1.stdout              |    75 +
 test/general-loader/expected/1override.stdout      |    75 +
 test/general-loader/expected/1packed.stdout        |    75 +
 test/general-loader/expected/2.stderr              |     2 +
 test/general-loader/expected/2packed.stderr        |     2 +
 test/general-loader/expected/3.stdout              |    16 +
 test/general-loader/expected/3packed.stdout        |    16 +
 test/general-loader/expected/4.stdout              |   160 +
 test/general-loader/expected/4packed.stdout        |   160 +
 test/general-loader/expected/5packed.stdout        |    16 +
 test/general-loader/expected/6.stdout              |     1 +
 test/general-loader/expected/6packed.stdout        |     1 +
 test/general-loader/input/column01                 |     2 +
 test/general-loader/input/column02                 |     2 +
 test/general-loader/makeinputs.cpp                 |   226 +
 test/general-loader/runtestcase.sh                 |   108 +
 test/general-loader/schema/.gitignore              |     4 +
 test/general-loader/test-general-loader.cpp        |  1684 ++
 test/general-loader/test-general-writer.cpp        |   341 +
 test/general-loader/test-gw-dumper.cpp             |    80 +
 test/general-loader/testsource.cpp                 |   758 +
 test/general-loader/testsource.hpp                 |   177 +
 test/judy_test/Makefile                            |    58 -
 test/judy_test/judytest.c                          |  1831 --
 test/junit-4.11.jar                                |   Bin 288666 -> 0 bytes
 test/kapp/Makefile                                 |   169 -
 test/kapp/env-test-tool.c                          |   170 -
 test/kapp/kapp-test.cpp                            |   549 -
 test/kapp/qfiletest.c                              |   338 -
 test/kapp/queuefile.data                           |   338 -
 test/kapp/report-kns-agent.c                       |    58 -
 test/kapp/run-kns-agent.sh                         |    60 -
 test/kapp/run-sig-core.sh                          |   116 -
 test/kapp/sig-core.c                               |   101 -
 test/kar/Makefile                                  |    56 +
 test/kar/acc.txt                                   |   756 +
 test/kar/expected/1.0.stdout                       |    35 +
 interfaces/.gitignore => test/kar/input/1.0/1.md5  |     0
 .../.gitignore => test/kar/input/1.0/col/sub1/idx  |     0
 .../col/READ => kar/input/1.0/col/sub1}/idx0       |     0
 .../.gitignore => test/kar/input/1.0/col/sub1/idx1 |     0
 .../rng-priv.h => test/kar/input/1.0/col/sub1/idx2 |     0
 .../.gitignore => test/kar/input/1.0/col/sub1/idx3 |     0
 .../SEQUENCE/col/dummy => kar/input/1.0/idx/4a}    |     0
 .../public/refseq/YYZZ99 => kar/input/1.0/idx/4b}  |     0
 .../refseq/ZZ999999.9 => kar/input/1.0/idx/sub/4c} |     0
 .../sra/SRR999998.sra => kar/input/1.0/idx/sub/4d} |     0
 .../public/wgs/YYZZ99 => kar/input/1.0/md/cur}     |     0
 .../wgs/WGS/YY/ZZ/YYZZ10 => kar/input/1.0/md5}     |     0
 .../ZZ/YYZZ99 => kar/input/1.0/sub1/col/sub1/idx}  |     0
 .../col/READ => kar/input/1.0/sub1/col/sub1}/idx0  |     0
 .../ZZ/YYZZ20 => kar/input/1.0/sub1/col/sub1/idx1} |     0
 .../ZZ/YYZZ99 => kar/input/1.0/sub1/col/sub1/idx2} |     0
 .../kar/input/1.0/sub1/col/sub1/idx3               |     0
 .../.gitignore => test/kar/input/1.0/sub1/md/cur   |     0
 .../kar/input/1.0/sub1/sub2/col/sub1/idx           |     0
 .../READ => kar/input/1.0/sub1/sub2/col/sub1}/idx0 |     0
 .../kar/input/1.0/sub1/sub2/col/sub1/idx1          |     0
 .../kar/input/1.0/sub1/sub2/col/sub1/idx2          |     0
 .../kar/input/1.0/sub1/sub2/col/sub1/idx3          |     0
 test/kar/kar-srr-test.sh                           |    81 +
 test/kar/kar-test.sh                               |   400 +
 test/kar/old-kar                                   |     1 +
 test/kar/source/alias_subdir/d1/subdir_f_alias     |     1 +
 test/kar/source/alias_subdir/f1                    |     1 +
 test/kar/source/d1/d1f1                            |     1 +
 test/kar/source/d1/d1f2                            |     1 +
 test/kar/source/d1/d1f3                            |     1 +
 test/kar/source/d2/d1/d2f1                         |     1 +
 test/kar/source/d2/d1/d2f2                         |     1 +
 test/kar/source/d2/d1/d2f3                         |     1 +
 test/kar/source/d3/d2/d1/d3f1                      |     1 +
 test/kar/source/d3/d2/d1/d3f2                      |     1 +
 test/kar/source/d3/d2/d1/d3f3                      |     1 +
 test/kar/source/f1                                 |     1 +
 test/kar/source/f2                                 |     1 +
 test/kar/source/f3                                 |     1 +
 test/kar/source/local_d_alias                      |     1 +
 test/kar/source/local_f_alias                      |     1 +
 test/kar/source/local_f_subdir_alias               |     1 +
 test/kdb/Makefile                                  |   103 -
 test/kdb/kdbtest.cpp                               |   174 -
 test/kdb/remote_open_test.cpp                      |   304 -
 test/kdb/root/sra/SRR000123.sra.cache              |   Bin 2975732 -> 0 bytes
 test/kdb/test-btree.c                              |   338 -
 test/kdb/wkdbtest.cpp                              |   264 -
 test/kfc/Makefile                                  |    57 -
 test/kfc/kfc.c                                     |    29 -
 test/kfc/test-except.c                             |   133 -
 test/kfg/Makefile                                  |   139 -
 test/kfg/config.linux.kfg                          |    26 -
 test/kfg/config.schema.kfg                         |    25 -
 test/kfg/config.sra.kfg                            |    29 -
 test/kfg/flat-sra-kfg.cpp                          |   415 -
 test/kfg/flat-sra-kfg/aux_root/empty.kfg           |     1 -
 test/kfg/flat-sra-kfg/new/sraFlat.kfg              |     1 -
 test/kfg/flat-sra-kfg/old/fuse1000.kfg             |     1 -
 test/kfg/keystoretest.cpp                          |   429 -
 test/kfg/kfgtest.cpp                               |  1030 -
 test/kfg/ncbi-home-from-env.configs/dir1/file.kfg  |     2 -
 .../dir1/not-user-settings.xml                     |     2 -
 .../dir1/user-settings.mkfg                        |     2 -
 test/kfg/ncbi-home-from-env.configs/dir2/file.kfg  |     2 -
 .../dir2/not-user-settings.xml                     |     2 -
 .../dir2/user-settings.mkfg                        |     2 -
 test/kfg/ncbi-home-from-env.cpp                    |    50 -
 test/kfg/prj_2956.ngc                              |   Bin 91 -> 0 bytes
 test/kfg/repositorytest.cpp                        |   280 -
 test/kfg/wb-test-kfg.cpp                           |   628 -
 test/kfs/Makefile                                  |   137 -
 test/kfs/cacheteetest.cpp                          |   604 -
 test/kfs/kfstest.cpp                               |   198 -
 test/kfs/md5test.cpp                               |   199 -
 test/kfs/ramfiletest.cpp                           |   199 -
 test/kfs/resolvetest.cpp                           |   196 -
 test/kfs/test.tar                                  |   Bin 20480 -> 0 bytes
 test/kget/.gitignore                               |     3 +
 test/kget/Makefile                                 |    66 +
 test/kget/test_kget.py                             |   175 +
 test/klib/Makefile                                 |   198 -
 test/klib/asm-test.c                               |   114 -
 test/klib/md5appendtest.c                          |   274 -
 test/klib/printf-test.c                            |   836 -
 test/klib/test-SraReleaseVersion.cpp               |   316 -
 test/klib/test-klib.cpp                            |  1027 -
 test/klib/test-log.cpp                             |   317 -
 test/klib/test-out.cpp                             |   156 -
 test/klib/test-vnamelist.cpp                       |   364 -
 test/kns/KNSManagerSingletonTest.cpp               |    69 -
 test/kns/Makefile                                  |   122 -
 test/kns/http-test.c                               |   368 -
 test/kns/http_dropconnection_test.cpp              |   437 -
 test/kns/httptest.cpp                              |   870 -
 test/kns/knstest.cpp                               |  1074 -
 test/kns/nih_1_out.txt                             |   277 -
 test/kproc/Makefile                                |    55 -
 test/kproc/kproctest.cpp                           |   889 -
 test/krypto/Makefile                               |   215 -
 test/krypto/test-aes-ciphers.c                     |   792 -
 test/krypto/test-cipher-speed.c                    |   910 -
 test/krypto/test-cmn.cpp                           |   359 -
 test/krypto/test-cmn.hpp                           |    90 -
 test/krypto/test-csprng.c                          |   230 -
 test/krypto/test-encdec.cpp                        |   607 -
 test/krypto/test-krypto-slow.cpp                   |   401 -
 test/krypto/test-modes.c                           |  1261 --
 test/krypto/test-reenc.cpp                         |   376 -
 test/ktst/Makefile                                 |    60 -
 test/ktst/ktsttest.cpp                             |   186 -
 test/loader/Makefile                               |    58 -
 test/loader/loadertest.cpp                         |   407 -
 test/loader/sequence-writer.c                      |   366 -
 test/loader/sequencewriter.vschema                 |    47 -
 test/network-test/Makefile                         |    99 +
 test/network-test/network-test.c                   |   105 +
 test/network-test/network-test.vers                |     1 +
 test/network-test/network-testing.c                |   436 +
 test/network-test/network-testing.h                |    42 +
 test/ngs-c++/CSRA1PileupTest.cpp                   |   742 -
 test/ngs-c++/CSRA1_ReadCollection_test.cpp         |   252 -
 test/ngs-c++/CSRA1test.cpp                         |  1116 -
 test/ngs-c++/Makefile                              |   127 -
 test/ngs-c++/NGStest.cpp                           |    71 -
 test/ngs-c++/SRADBtest.cpp                         |   536 -
 test/ngs-c++/SRAtest.cpp                           |   478 -
 test/ngs-c++/SRR600096                             |   Bin 81253 -> 0 bytes
 test/ngs-c++/SRR611340                             |   Bin 211261 -> 0 bytes
 test/ngs-c++/ngsfixture.hpp                        |    93 -
 test/ngs-c++/seq_spot_id_0.sra                     |   Bin 14316329 -> 0 bytes
 test/ngs-c++/valgrind.suppress                     |    12 -
 test/ngs-java/Makefile                             |   125 -
 test/ngs-java/build.xml                            |    53 -
 test/ngs-java/ngs_test_CSRA1.java                  |   860 -
 test/ngs-java/ngs_test_lib_load.java               |   246 -
 test/ngs-pileup/Makefile                           |   137 +
 test/ngs-pileup/runtestcase.sh                     |    90 +
 test/ngs-pileup/test-ngs-pileup.cpp                |   177 +
 test/ngs-python/Makefile                           |    57 -
 test/ngs-python/build.xml                          |    41 -
 test/ngs-python/tests.py                           |   506 -
 test/ngs/Makefile                                  |   216 -
 test/ngs/data/.gitignore                           |     1 -
 test/ngs/data/SysPathTest/md/cur                   |   Bin 21398 -> 0 bytes
 test/ngs/data/SysPathTest/md5                      |     1 -
 .../data/SysPathTest/tbl/SEQUENCE/col/READ/data    |   Bin 143 -> 0 bytes
 .../ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx |   Bin 40 -> 0 bytes
 .../data/SysPathTest/tbl/SEQUENCE/col/READ/idx1    |   Bin 132 -> 0 bytes
 .../data/SysPathTest/tbl/SEQUENCE/col/READ/idx2    |   Bin 112 -> 0 bytes
 .../data/SysPathTest/tbl/SEQUENCE/col/READ/md/cur  |   Bin 174 -> 0 bytes
 .../ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/md5 |     6 -
 test/ngs/data/SysPathTest/tbl/SEQUENCE/md/cur      |   Bin 21734 -> 0 bytes
 test/ngs/data/SysPathTest/tbl/SEQUENCE/md5         |     1 -
 test/ngs/ngs_c_fixture.hpp                         |   180 -
 test/ngs/ngstest.cpp                               |   889 -
 test/ngs/ngstest_csra1.cpp                         |  1250 --
 test/ngs/ngstest_csra1_pileup.cpp                  |   577 -
 test/ngs/ngstest_csra1_readcollection.cpp          |   739 -
 test/ngs/ngstest_csra1_refwin.cpp                  |   819 -
 test/ngs/ngstest_fragmentblob.cpp                  |   597 -
 test/ngs/ngstest_makedb.cpp                        |   196 -
 test/ngs/ngstest_reference.cpp                     |   133 -
 test/ngs/ngstest_sra.cpp                           |  1065 -
 test/ngs/ngstest_sradb.cpp                         |   866 -
 test/ngs/valgrind.suppress                         |    16 -
 test/pileup-stats/Makefile                         |    66 +
 test/pileup-stats/test-ignore-args.sh              |    55 +
 test/pileup-stats/valgrind.suppress                |     6 +
 test/qual-recalib-stat/Makefile                    |    49 +
 test/ref-variation/Makefile                        |    62 +
 test/ref-variation/expected/ref-variation.out      |   192 +
 test/ref-variation/expected/var-expand.out         |     1 +
 test/ref-variation/have-access.sh                  |    25 +
 test/ref-variation/ref-variation.in                |     4 +
 test/ref-variation/ref-variation.sh                |    29 +
 test/samline/Makefile                              |   115 +
 test/samline/alig-gen.c                            |   656 +
 test/samline/bx_tag_test.py                        |    27 +
 test/samline/ca_test.py                            |    80 +
 test/samline/cigar.c                               |   446 +
 test/samline/cigar.h                               |    59 +
 test/samline/example.sh                            |    61 +
 test/samline/refbases.c                            |   184 +
 test/samline/refbases.h                            |    43 +
 test/samline/reject_multi_refnames.sh              |    62 +
 test/samline/sam.py                                |   339 +
 test/samline/samline.vers                          |     1 +
 test/samline/sampart.c                             |   304 +
 test/samline/sampart.vers                          |     1 +
 test/samline/sec_align_problem.sh                  |    76 +
 test/search/Makefile                               |    61 -
 test/search/PerfCounter.h                          |   211 -
 test/search/agrep-main.c                           |   346 -
 test/search/search-vdb.cpp                         |   512 -
 test/search/search-vdb.h                           |   229 -
 test/search/test-agrep.cpp                         |   928 -
 test/sra-pileup/Makefile                           |    49 +
 test/srapath/Makefile                              |    49 +
 test/sraxf/Makefile                                |    60 -
 test/sraxf/fix_read_seg-test.cpp                   |   131 -
 test/tarballs/build.xml                            |    27 +
 test/tarballs/test-tarballs.bat                    |    40 +
 test/tarballs/test-tarballs.sh                     |    97 +
 test/vcf-loader/Makefile                           |    70 +
 test/vcf-loader/test-vcf-loader.cpp                |   864 +
 test/vdb-copy/Makefile                             |    49 +
 test/vdb-dump/Makefile                             |    78 +
 test/vdb-dump/expected/1.0.stdout                  |     1 +
 test/vdb-dump/expected/1.1.stdout                  |     1 +
 test/vdb-dump/expected/2.0.stdout                  |    15 +
 test/vdb-dump/expected/2.1.stdout                  |     4 +
 test/vdb-dump/expected/2.2.stdout                  |     4 +
 test/vdb-dump/makedb.cpp                           |   229 +
 test/vdb-validate/Makefile                         |    66 +
 test/vdb-validate/db/blob-row-gap.kar              |   Bin 0 -> 3362642 bytes
 test/vdb-validate/db/sdc_len_mismatch.csra         |   Bin 0 -> 181017 bytes
 test/vdb-validate/db/sdc_pa_longer.csra            |   Bin 0 -> 183853 bytes
 .../db/sdc_seq_cmp_read_len_corrupt.csra           |   Bin 0 -> 224783 bytes
 .../db/sdc_seq_cmp_read_len_fixed.csra             |   Bin 0 -> 223591 bytes
 test/vdb-validate/db/sdc_tmp_mismatch.csra         |   Bin 0 -> 170925 bytes
 test/vdb-validate/expected/ROW_GAP                 |    42 +
 test/vdb-validate/expected/no_sdc_checks           |    23 +
 test/vdb-validate/expected/sdc_len_mismatch_1      |    24 +
 test/vdb-validate/expected/sdc_len_mismatch_2      |    24 +
 test/vdb-validate/expected/sdc_pa_longer_1         |    26 +
 test/vdb-validate/expected/sdc_pa_longer_2         |    26 +
 test/vdb-validate/expected/sdc_pa_longer_3         |    26 +
 .../expected/sdc_seq_cmp_read_len_corrupt          |    44 +
 .../expected/sdc_seq_cmp_read_len_fixed            |    43 +
 test/vdb-validate/expected/sdc_tmp_mismatch        |    16 +
 test/vdb-validate/runtestcase.sh                   |    61 +
 test/vdb/Makefile                                  |   225 -
 test/vdb/SYS-224064.cpp                            |   237 -
 test/vdb/db/blob_val_inv_chsum.sra                 |   Bin 196213 -> 0 bytes
 test/vdb/kfg/empty/empty.kfg                       |     3 -
 test/vdb/kfg/linux/test-dependencies.kfg           |     3 -
 test/vdb/kfg/mac/test-dependencies.kfg             |     3 -
 test/vdb/kfg/win/test-dependencies.kfg             |     3 -
 test/vdb/test-VDB-3060.cpp                         |   380 -
 test/vdb/test-blob-val.cpp                         |   185 -
 test/vdb/test-dependencies.cpp                     |   452 -
 test/vdb/test-sparse-col.cpp                       |   358 -
 test/vdb/test-vdb.cpp                              |   624 -
 test/vdb/test-wvdb.cpp                             |   525 -
 test/vfs/Makefile                                  |   130 -
 test/vfs/caching-kfg/incomplete.kfg                |     4 -
 test/vfs/managertest.cpp                           |   490 -
 test/vfs/ncbi/protected1/SRR999997                 |     1 -
 test/vfs/ncbi/protected1/SRR999997.ncbi_enc        |   Bin 32864 -> 0 bytes
 test/vfs/ncbi_enc                                  |   Bin 65696 -> 0 bytes
 test/vfs/path-test.c                               |   765 -
 test/vfs/pathtest.cpp                              |   737 -
 test/vfs/resolvertest.cpp                          |   344 -
 test/vfs/test-caching.cpp                          |   615 -
 test/vschema/Makefile                              |   117 +
 test/vschema/bio-end/bio-end-excl.vschema          |    44 +
 test/vschema/bio-end/bio-end-incl.vschema          |    44 +
 test/vschema/bio-end/expected/excl-1.stdout        |     5 +
 test/vschema/bio-end/expected/excl-2.stdout        |     5 +
 test/vschema/bio-end/expected/excl-3.stdout        |     5 +
 test/vschema/bio-end/expected/excl-4.stdout        |     5 +
 test/vschema/bio-end/expected/incl-1.stdout        |     5 +
 test/vschema/bio-end/makeinputs.cpp                |   129 +
 test/vschema/idx-text/checklookup.cpp              |   335 +
 test/vschema/idx-text/expected/ci-1.stdout         |    21 +
 test/vschema/idx-text/expected/ci-2.stdout         |    18 +
 test/vschema/idx-text/expected/ci-3.stdout         |    12 +
 test/vschema/idx-text/expected/ci-4.stdout         |    12 +
 test/vschema/idx-text/expected/ci-5.stdout         |    15 +
 test/vschema/idx-text/expected/cs-1.stdout         |    18 +
 test/vschema/idx-text/expected/cs-2.stdout         |    18 +
 test/vschema/idx-text/expected/cs-3.stdout         |    18 +
 test/vschema/idx-text/idx-text.vschema             |   105 +
 test/vschema/idx-text/makeinputs.cpp               |   182 +
 test/vschema/runtestcase.sh                        |   126 +
 test/vxf/Makefile                                  |    62 -
 test/vxf/wb-irzip-impl.c                           |    88 -
 test/vxf/wb-irzip-impl.h                           |    56 -
 test/vxf/wb-test-vxf.cpp                           |   268 -
 tools/.gitignore                                   |     6 +
 tools/Makefile                                     |    92 +
 tools/agp-load/AGP.py                              |   668 +
 tools/agp-load/agp-load.py                         |   173 +
 tools/agp-load/agp.vschema                         |    45 +
 tools/agp-load/eutils.py                           |   112 +
 tools/align-cache/Makefile                         |    78 +
 tools/align-cache/align-cache.cpp                  |   552 +
 tools/align-cache/helper.cpp                       |   923 +
 tools/align-cache/helper.h                         |   390 +
 tools/align-info/Makefile                          |    76 +
 tools/align-info/align-info.c                      |   571 +
 tools/bam-loader/Globals.h                         |    93 +
 tools/bam-loader/KFileHelper.c                     |   142 +
 tools/bam-loader/KFileHelper.h                     |    48 +
 tools/bam-loader/KVPFile.c                         |   355 +
 tools/bam-loader/KVPFile.h                         |   164 +
 tools/bam-loader/Makefile                          |   111 +
 tools/bam-loader/alignment-writer.c                |   267 +
 tools/bam-loader/alignment-writer.h                |   101 +
 tools/bam-loader/analysis.c                        |   157 +
 tools/bam-loader/analysis.h                        |    49 +
 tools/bam-loader/bam-alignment.h                   |    74 +
 tools/bam-loader/bam-loader.c                      |  1270 ++
 tools/bam-loader/bam-priv.h                        |   196 +
 tools/bam-loader/bam-reader.c                      |  1104 +
 tools/bam-loader/bam-reader.h                      |    98 +
 tools/bam-loader/bam.c                             |  4075 ++++
 tools/bam-loader/bam.h                             |   592 +
 tools/bam-loader/config-file.cpp                   |   195 +
 tools/bam-loader/config-file.hpp                   |    65 +
 tools/bam-loader/fasta-file.cpp                    |   257 +
 tools/bam-loader/fasta-file.hpp                    |    63 +
 tools/bam-loader/hashtable.c                       |   878 +
 tools/bam-loader/hashtable.h                       |    55 +
 tools/bam-loader/loader-imp.c                      |  3086 +++
 tools/bam-loader/loader-imp.h                      |    30 +
 tools/bam-loader/low-match-count.cpp               |    72 +
 tools/bam-loader/low-match-count.h                 |    33 +
 tools/bam-loader/mem-bank.cpp                      |   477 +
 tools/bam-loader/mem-bank.h                        |    41 +
 tools/bam-loader/reference-writer.c                |   620 +
 tools/bam-loader/reference-writer.h                |    78 +
 tools/bam-loader/samview.c                         |   104 +
 tools/bam-loader/sequence-writer.c                 |   497 +
 tools/bam-loader/sequence-writer.h                 |    89 +
 tools/cache-mgr/Makefile                           |    76 +
 tools/cache-mgr/cache-mgr.c                        |  1415 ++
 tools/ccextract/Makefile                           |    90 +
 tools/ccextract/ccextract.c                        |  1272 ++
 tools/cg-load/.gitignore                           |     2 +
 tools/cg-load/Makefile                             |    96 +
 tools/cg-load/cg-load.c                            |  1270 ++
 tools/cg-load/debug.h                              |    34 +
 tools/cg-load/defs.h                               |   163 +
 tools/cg-load/f1_3.c                               |    77 +
 tools/cg-load/f1_5.c                               |    78 +
 tools/cg-load/f1_7.c                               |    97 +
 tools/cg-load/f2_0.c                               |    98 +
 tools/cg-load/f2_2.c                               |    98 +
 tools/cg-load/f2_5.c                               |    98 +
 tools/cg-load/factory-cmn.h                        |    61 +
 tools/cg-load/factory-evidence-dnbs.c              |   625 +
 tools/cg-load/factory-evidence-dnbs.h              |    46 +
 tools/cg-load/factory-evidence-intervals.c         |   396 +
 tools/cg-load/factory-evidence-intervals.h         |    46 +
 tools/cg-load/factory-file.h                       |    47 +
 tools/cg-load/factory-mappings.c                   |   539 +
 tools/cg-load/factory-mappings.h                   |    46 +
 tools/cg-load/factory-reads.c                      |   448 +
 tools/cg-load/factory-reads.h                      |    46 +
 tools/cg-load/factory-tag-lfr.c                    |   376 +
 tools/cg-load/factory-tag-lfr.h                    |    41 +
 tools/cg-load/file-version-factory.c               |   163 +
 tools/cg-load/file.c                               |   516 +
 tools/cg-load/file.h                               |   334 +
 tools/cg-load/formats.c                            |    54 +
 tools/cg-load/formats.h                            |    41 +
 tools/cg-load/writer-algn.c                        |   825 +
 tools/cg-load/writer-algn.h                        |    63 +
 tools/cg-load/writer-evidence-dnbs.c               |   246 +
 tools/cg-load/writer-evidence-dnbs.h               |    97 +
 tools/cg-load/writer-evidence-intervals.c          |   263 +
 tools/cg-load/writer-evidence-intervals.h          |    68 +
 tools/cg-load/writer-seq.c                         |   155 +
 tools/cg-load/writer-seq.h                         |    62 +
 tools/copycat/Makefile                             |   100 +
 tools/copycat/ccbuffer.c                           |   153 +
 tools/copycat/ccbuffermgr.c                        |   234 +
 tools/copycat/ccbufferq.c                          |   175 +
 tools/copycat/cccat.c                              |  1797 ++
 tools/copycat/cccopier.c                           |   217 +
 tools/copycat/cccopy.c                             |   347 +
 tools/copycat/ccfile.c                             |   271 +
 tools/copycat/ccfileformat.c                       |   405 +
 tools/copycat/ccproc.c                             |   319 +
 tools/copycat/ccprocone.c                          |   217 +
 tools/copycat/ccread.c                             |   302 +
 tools/copycat/ccsra.c                              |  1239 ++
 tools/copycat/ccsubchunk.c                         |   390 +
 tools/copycat/cctar.c                              |  2199 ++
 tools/copycat/cctree-dump.c                        |  1030 +
 tools/copycat/cctree-priv.h                        |   351 +
 tools/copycat/cctree.c                             |   754 +
 tools/copycat/copycat-priv.h                       |   229 +
 tools/copycat/copycat.c                            |  1251 ++
 tools/copycat/debug.h                              |    75 +
 tools/copycat/magic                                | 18398 +++++++++++++++++
 tools/dbgap-mount/Makefile                         |   119 +
 tools/dbgap-mount/dbgap-mount-tool.c               |   561 +
 tools/dbgap-mount/dbgap-mount-tool.h               |    72 +
 tools/dbgap-mount/demo.c                           |   366 +
 tools/dbgap-mount/demo.mkfg                        |    47 +
 tools/dbgap-mount/unix/wrap.c                      |    44 +
 tools/dbgap-mount/win/wrap.c                       |   344 +
 tools/fastdump/.gitignore                          |     3 +
 tools/fastdump/Makefile                            |    89 +
 tools/fastdump/cmn_iter.c                          |   287 +
 tools/fastdump/cmn_iter.h                          |    81 +
 tools/fastdump/fastdump.c                          |   352 +
 tools/fastdump/fastq_iter.c                        |    97 +
 tools/fastdump/fastq_iter.h                        |    69 +
 tools/fastdump/file_printer.c                      |   130 +
 tools/fastdump/file_printer.h                      |    56 +
 tools/fastdump/helper.c                            |   673 +
 tools/fastdump/helper.h                            |   141 +
 tools/fastdump/index.c                             |   335 +
 tools/fastdump/index.h                             |    67 +
 tools/fastdump/join.c                              |   670 +
 tools/fastdump/join.h                              |    76 +
 tools/fastdump/line_iter.c                         |   199 +
 tools/fastdump/line_iter.h                         |    60 +
 tools/fastdump/lookup_reader.c                     |   360 +
 tools/fastdump/lookup_reader.h                     |    75 +
 tools/fastdump/lookup_writer.c                     |   138 +
 tools/fastdump/lookup_writer.h                     |    67 +
 tools/fastdump/merge_sorter.c                      |   173 +
 tools/fastdump/merge_sorter.h                      |    66 +
 tools/fastdump/raw_read_iter.c                     |   100 +
 tools/fastdump/raw_read_iter.h                     |    67 +
 tools/fastdump/readme.txt                          |    92 +
 tools/fastdump/sorter.c                            |   538 +
 tools/fastdump/sorter.h                            |    75 +
 tools/fastdump/special_iter.c                      |    98 +
 tools/fastdump/special_iter.h                      |    69 +
 tools/fastdump/todo.txt                            |     3 +
 tools/fastdump/verify.sh                           |    81 +
 tools/fastq-dump/Makefile                          |    93 +
 tools/fastq-dump/args.cpp                          |   622 +
 tools/fastq-dump/args.hpp                          |   330 +
 tools/fastq-dump/fastq-dump.cpp                    |   641 +
 tools/fastq-dump/filters.cpp                       |   300 +
 tools/fastq-dump/filters.hpp                       |   114 +
 tools/fastq-dump/koutstream                        |   324 +
 tools/fastq-loader/.gitignore                      |     1 +
 tools/fastq-loader/Makefile                        |   166 +
 .../fastq-loader}/common-reader-priv.h             |     0
 .../loader => tools/fastq-loader}/common-reader.c  |     0
 .../loader => tools/fastq-loader}/common-reader.h  |     0
 tools/fastq-loader/common-writer.c                 |  1653 ++
 tools/fastq-loader/common-writer.h                 |   164 +
 tools/fastq-loader/fastq-grammar.c                 |  2310 +++
 tools/fastq-loader/fastq-grammar.y                 |   478 +
 tools/fastq-loader/fastq-lex.c                     |  2888 +++
 tools/fastq-loader/fastq-lex.l                     |   256 +
 tools/fastq-loader/fastq-loader.c                  |   626 +
 tools/fastq-loader/fastq-parse.h                   |   169 +
 tools/fastq-loader/fastq-reader.c                  |   709 +
 tools/fastq-loader/fastq-reader.h                  |    57 +
 tools/fastq-loader/fastq-tokens.h                  |    67 +
 tools/fastq-loader/loader-imp.c                    |   256 +
 tools/fastq-loader/mmarray.c                       |   114 +
 tools/fastq-loader/parsing_rules.txt               |    93 +
 .../fastq-loader}/sequence-writer.c                |     0
 .../fastq-loader}/sequence-writer.h                |     0
 tools/fuse/Makefile                                |   204 +
 tools/fuse/accessor.c                              |   134 +
 tools/fuse/accessor.h                              |    46 +
 tools/fuse/debug.h                                 |    53 +
 tools/fuse/directory.c                             |   566 +
 tools/fuse/directory.h                             |    34 +
 tools/fuse/dump-idx.c                              |   102 +
 tools/fuse/file.c                                  |   275 +
 tools/fuse/file.h                                  |    33 +
 tools/fuse/formats.c                               |   443 +
 tools/fuse/formats.h                               |   157 +
 tools/fuse/kfile-accessor.c                        |    73 +
 tools/fuse/kfile-accessor.h                        |    33 +
 tools/fuse/log.c                                   |   196 +
 tools/fuse/log.h                                   |    53 +
 tools/fuse/node.c                                  |   273 +
 tools/fuse/node.h                                  |   108 +
 tools/fuse/remote-cache.c                          |  2131 ++
 tools/fuse/remote-cache.h                          |   169 +
 tools/fuse/remote-directory.c                      |   411 +
 tools/fuse/remote-directory.h                      |    33 +
 tools/fuse/remote-file.c                           |   308 +
 tools/fuse/remote-file.h                           |    33 +
 tools/fuse/remote-fuser.c                          |   206 +
 tools/fuse/remote-fuser.h                          |    52 +
 tools/fuse/remote-link.c                           |   208 +
 tools/fuse/remote-link.h                           |    33 +
 tools/fuse/remote-xml.c                            |   603 +
 tools/fuse/remote-xml.h                            |    59 +
 tools/fuse/sra-directory.c                         |   107 +
 tools/fuse/sra-directory.h                         |    33 +
 tools/fuse/sra-fastq.c                             |   245 +
 tools/fuse/sra-fastq.h                             |    34 +
 tools/fuse/sra-fuser-test.c                        |   100 +
 tools/fuse/sra-fuser.c                             |   195 +
 tools/fuse/sra-fuser.h                             |    48 +
 tools/fuse/sra-fuser.xsd                           |   207 +
 tools/fuse/sra-list.c                              |  1225 ++
 tools/fuse/sra-list.h                              |    86 +
 tools/fuse/sra-makeidx.c                           |   955 +
 tools/fuse/sra-node.c                              |   165 +
 tools/fuse/sra-node.h                              |    34 +
 tools/fuse/sra-sff.c                               |   249 +
 tools/fuse/sra-sff.h                               |    34 +
 tools/fuse/tar-file.c                              |   127 +
 tools/fuse/tar-file.h                              |    33 +
 tools/fuse/tar-list.c                              |   598 +
 tools/fuse/tar-list.h                              |    49 +
 tools/fuse/tar-node.c                              |   320 +
 tools/fuse/tar-node.h                              |    35 +
 tools/fuse/text-file.c                             |   134 +
 tools/fuse/text-file.h                             |    36 +
 tools/fuse/unix/remote-fuser-sys.c                 |   696 +
 tools/fuse/unix/sra-fuser-sys.c                    |   637 +
 tools/fuse/xml.c                                   |   516 +
 tools/fuse/xml.h                                   |    60 +
 tools/fuse/zlib-simple.c                           |    65 +
 tools/fuse/zlib-simple.h                           |    33 +
 tools/general-loader/Makefile                      |   131 +
 tools/general-loader/database-loader.cpp           |   894 +
 tools/general-loader/general-loader.cpp            |   223 +
 tools/general-loader/general-loader.hpp            |   243 +
 tools/general-loader/general-writer.cpp            |  1172 ++
 tools/general-loader/general-writer.h              |  1081 +
 tools/general-loader/general-writer.hpp            |   210 +
 tools/general-loader/gw-dumper.cpp                 |  1785 ++
 tools/general-loader/main.cpp                      |   239 +
 tools/general-loader/protocol-parser.cpp           |  1048 +
 tools/general-loader/utf8-like-int-codec.c         |   687 +
 tools/general-loader/utf8-like-int-codec.h         |    69 +
 tools/kar/Makefile                                 |    99 +
 tools/kar/kar-args.c                               |   428 +
 tools/kar/kar-args.h                               |    98 +
 tools/kar/kar.c                                    |  2063 ++
 tools/kar/sra-kar.c                                |   431 +
 tools/keyring-srv/Makefile                         |   110 +
 tools/keyring-srv/keyring-data.c                   |   346 +
 tools/keyring-srv/keyring-data.h                   |   130 +
 tools/keyring-srv/keyring-database.c               |   441 +
 tools/keyring-srv/keyring-database.h               |    45 +
 tools/keyring-srv/keyring-srv-main.c               |   333 +
 tools/keyring-srv/keyring-srv.c                    |   522 +
 tools/keyring-srv/keyring-srv.h                    |   101 +
 tools/kget/Makefile                                |    77 +
 tools/kget/examples.sh                             |    62 +
 tools/kget/kget.c                                  |   968 +
 tools/kqsh/.gitignore                              |     7 +
 tools/kqsh/Makefile                                |   207 +
 tools/kqsh/kqsh-alter.c                            |   347 +
 tools/kqsh/kqsh-close.c                            |   186 +
 tools/kqsh/kqsh-create.c                           |   680 +
 tools/kqsh/kqsh-help.c                             |  1292 ++
 tools/kqsh/kqsh-load.c                             |   410 +
 tools/kqsh/kqsh-open.c                             |   199 +
 tools/kqsh/kqsh-parse.c                            |   198 +
 tools/kqsh/kqsh-print.c                            |   170 +
 tools/kqsh/kqsh-priv.h                             |   151 +
 tools/kqsh/kqsh-show.c                             |   290 +
 tools/kqsh/kqsh-thunk.pl                           |   662 +
 tools/kqsh/kqsh-tok.c                              |    99 +
 tools/kqsh/kqsh-tok.h                              |   155 +
 tools/kqsh/kqsh-write.c                            |   321 +
 tools/kqsh/kqsh.c                                  |   516 +
 tools/nenctool/Makefile                            |   119 +
 tools/nenctool/nenctest.c                          |   489 +
 tools/nenctool/nenctool.c                          |   435 +
 tools/nencvalid/Makefile                           |    88 +
 tools/nencvalid/nencvalid.c                        |   593 +
 tools/ngs-pileup/Makefile                          |    82 +
 tools/ngs-pileup/main.cpp                          |   152 +
 tools/ngs-pileup/ngs-pileup.cpp                    |   206 +
 tools/ngs-pileup/ngs-pileup.hpp                    |    97 +
 tools/pacbio-load/.gitignore                       |     7 +
 tools/pacbio-load/Makefile                         |   117 +
 tools/pacbio-load/pacbio-load.c                    |   650 +
 tools/pacbio-load/pl-basecalls_cmn.c               |    97 +
 tools/pacbio-load/pl-basecalls_cmn.h               |    60 +
 tools/pacbio-load/pl-consensus.c                   |   472 +
 tools/pacbio-load/pl-consensus.h                   |    83 +
 tools/pacbio-load/pl-context.c                     |   211 +
 tools/pacbio-load/pl-context.h                     |    87 +
 tools/pacbio-load/pl-metrics.c                     |   779 +
 tools/pacbio-load/pl-metrics.h                     |    83 +
 tools/pacbio-load/pl-passes.c                      |   437 +
 tools/pacbio-load/pl-passes.h                      |    70 +
 tools/pacbio-load/pl-progress.c                    |   195 +
 tools/pacbio-load/pl-progress.h                    |    70 +
 tools/pacbio-load/pl-regions.c                     |  1048 +
 tools/pacbio-load/pl-regions.h                     |   140 +
 tools/pacbio-load/pl-sequence.c                    |   928 +
 tools/pacbio-load/pl-sequence.h                    |   110 +
 tools/pacbio-load/pl-tools.c                       |   624 +
 tools/pacbio-load/pl-tools.h                       |   291 +
 tools/pacbio-load/pl-zmw.c                         |   221 +
 tools/pacbio-load/pl-zmw.h                         |   105 +
 tools/pacbio-load/verify/ins_nl.pl                 |    15 +
 tools/pacbio-load/verify/ins_nl_1.pl               |    30 +
 tools/pacbio-load/verify/ins_nl_2.pl               |    24 +
 tools/pacbio-load/verify/ins_nl_4.pl               |    24 +
 tools/pacbio-load/verify/ins_nl_f.pl               |    27 +
 tools/pileup-stats/Makefile                        |    81 +
 tools/pileup-stats/pileup-stats.cpp                |   787 +
 tools/pore-load/GeneralWriter.py                   |   312 +
 tools/pore-load/README.md                          |    10 +
 tools/pore-load/pore-load.py                       |   406 +
 tools/prefetch/Makefile                            |    93 +
 tools/prefetch/kfile-no-q.c                        |   215 +
 tools/prefetch/kfile-no-q.h                        |    44 +
 tools/prefetch/prefetch.c                          |  3601 ++++
 tools/qual-recalib-stat/.gitignore                 |     3 +
 tools/qual-recalib-stat/Makefile                   |    84 +
 tools/qual-recalib-stat/columns.c                  |    94 +
 tools/qual-recalib-stat/columns.h                  |    67 +
 tools/qual-recalib-stat/context.c                  |   330 +
 tools/qual-recalib-stat/context.h                  |   120 +
 tools/qual-recalib-stat/fasta_dump.pl              |    81 +
 tools/qual-recalib-stat/namelist_tools.c           |   187 +
 tools/qual-recalib-stat/namelist_tools.h           |    53 +
 tools/qual-recalib-stat/qual-recalib-stat.c        |   418 +
 tools/qual-recalib-stat/reader.c                   |   241 +
 tools/qual-recalib-stat/reader.h                   |    88 +
 tools/qual-recalib-stat/ref_exclude.c              |   561 +
 tools/qual-recalib-stat/ref_exclude.h              |    71 +
 tools/qual-recalib-stat/ref_grab.pl                |    82 +
 tools/qual-recalib-stat/spot_position.c            |   121 +
 tools/qual-recalib-stat/spot_position.h            |    68 +
 tools/qual-recalib-stat/stat_mod.c                 |   883 +
 tools/qual-recalib-stat/stat_mod.h                 |   148 +
 tools/qual-recalib-stat/stat_mod_1.c               |   962 +
 tools/qual-recalib-stat/stat_mod_1.h               |   160 +
 tools/qual-recalib-stat/stat_mod_2.c               |  1041 +
 tools/qual-recalib-stat/stat_mod_2.h               |   141 +
 tools/qual-recalib-stat/writer.c                   |   480 +
 tools/qual-recalib-stat/writer.h                   |    79 +
 tools/rd-filter-redact/Makefile                    |    95 +
 tools/rd-filter-redact/rd-filter-redact.c          |  1350 ++
 tools/rd-filter-redact/read-filter-redact.c        |   861 +
 tools/rd-filter-redact/test-read-write-cursor.c    |   220 +
 tools/ref-variation/Makefile                       |   113 +
 tools/ref-variation/common.cpp                     |    69 +
 tools/ref-variation/common.h                       |    43 +
 tools/ref-variation/helper.cpp                     |  1458 ++
 tools/ref-variation/helper.h                       |   603 +
 tools/ref-variation/ref-variation.cpp              |  2097 ++
 tools/ref-variation/var-expand.cpp                 |   417 +
 tools/sra-dump/.gitignore                          |     1 +
 tools/sra-dump/Makefile                            |   128 +
 tools/sra-dump/abi.c                               |   907 +
 tools/sra-dump/core.c                              |  1717 ++
 tools/sra-dump/core.h                              |    74 +
 tools/sra-dump/debug.h                             |    34 +
 tools/sra-dump/factory.c                           |  1069 +
 tools/sra-dump/factory.h                           |   194 +
 tools/sra-dump/fasta_dump.c                        |   752 +
 tools/sra-dump/fasta_dump.h                        |    36 +
 tools/sra-dump/fastq.c                             |  3800 ++++
 tools/sra-dump/illumina.c                          |   536 +
 tools/sra-dump/sff.c                               |   200 +
 tools/sra-dump/sra-dump.c                          |  1011 +
 tools/sra-load/Makefile                            |   209 +
 tools/sra-load/absolid-fmt.c                       |   573 +
 tools/sra-load/common-xml.c                        |   871 +
 tools/sra-load/common-xml.h                        |   183 +
 tools/sra-load/debug.h                             |    34 +
 tools/sra-load/experiment-xml.c                    |  1255 ++
 tools/sra-load/experiment-xml.h                    |    77 +
 tools/sra-load/fastq-fmt.c                         |   700 +
 tools/sra-load/helicos-fmt.c                       |   273 +
 tools/sra-load/illumina-fmt.c                      |   847 +
 tools/sra-load/loader-file.c                       |   191 +
 tools/sra-load/loader-file.h                       |   113 +
 tools/sra-load/loader-fmt.c                        |   165 +
 tools/sra-load/loader-fmt.h                        |   171 +
 tools/sra-load/loader.c                            |  1135 ++
 tools/sra-load/pacbio-fmt.c                        |   140 +
 tools/sra-load/pstring.c                           |   208 +
 tools/sra-load/pstring.h                           |    58 +
 tools/sra-load/run-xml.c                           |   487 +
 tools/sra-load/run-xml.h                           |    90 +
 tools/sra-load/sff-fmt.c                           |   490 +
 tools/sra-load/sra-writer.c                        |   370 +
 tools/sra-load/sra-writer.h                        |    92 +
 tools/sra-load/srf-absolid.c                       |   497 +
 tools/sra-load/srf-fmt.c                           |   267 +
 tools/sra-load/srf-fmt.h                           |    46 +
 tools/sra-load/srf-illumina.c                      |   452 +
 tools/sra-load/srf.c                               |   229 +
 tools/sra-load/srf.h                               |   146 +
 tools/sra-load/writer-454.c                        |   262 +
 tools/sra-load/writer-454.h                        |    46 +
 tools/sra-load/writer-absolid.c                    |   501 +
 tools/sra-load/writer-absolid.h                    |    94 +
 tools/sra-load/writer-helicos.c                    |   135 +
 tools/sra-load/writer-helicos.h                    |    41 +
 tools/sra-load/writer-illumina.c                   |   720 +
 tools/sra-load/writer-illumina.h                   |    92 +
 tools/sra-load/writer-ion-torrent.c                |   262 +
 tools/sra-load/writer-ion-torrent.h                |    46 +
 tools/sra-load/ztr-absolid.c                       |   656 +
 tools/sra-load/ztr-absolid.h                       |   124 +
 tools/sra-load/ztr-huffman.c                       |   664 +
 tools/sra-load/ztr-huffman.h                       |    45 +
 tools/sra-load/ztr-illumina.c                      |  1367 ++
 tools/sra-load/ztr-illumina.h                      |   136 +
 tools/sra-load/ztr.h                               |   182 +
 tools/sra-pileup/.gitignore                        |     2 +
 tools/sra-pileup/4na_ascii.c                       |    95 +
 tools/sra-pileup/4na_ascii.h                       |    44 +
 tools/sra-pileup/Makefile                          |   133 +
 tools/sra-pileup/cg_tools.c                        |  1723 ++
 tools/sra-pileup/cg_tools.h                        |   137 +
 tools/sra-pileup/cmdline_cmn.c                     |   711 +
 tools/sra-pileup/cmdline_cmn.h                     |   150 +
 tools/sra-pileup/debug.h                           |    34 +
 tools/sra-pileup/dyn_string.c                      |   206 +
 tools/sra-pileup/dyn_string.h                      |    55 +
 tools/sra-pileup/inputfiles.c                      |   377 +
 tools/sra-pileup/inputfiles.h                      |    99 +
 tools/sra-pileup/make_opt.pl                       |    13 +
 tools/sra-pileup/matecache.c                       |   439 +
 tools/sra-pileup/matecache.h                       |   119 +
 tools/sra-pileup/md_flag.c                         |   268 +
 tools/sra-pileup/md_flag.h                         |    48 +
 tools/sra-pileup/out_redir.c                       |   120 +
 tools/sra-pileup/out_redir.h                       |    64 +
 tools/sra-pileup/perf_log.c                        |   273 +
 tools/sra-pileup/perf_log.h                        |    52 +
 tools/sra-pileup/pileup_counters.c                 |   447 +
 tools/sra-pileup/pileup_counters.h                 |    41 +
 tools/sra-pileup/pileup_indels.c                   |   120 +
 tools/sra-pileup/pileup_indels.h                   |    40 +
 tools/sra-pileup/pileup_index.c                    |   122 +
 tools/sra-pileup/pileup_index.h                    |    40 +
 tools/sra-pileup/pileup_options.h                  |    62 +
 tools/sra-pileup/pileup_stat.c                     |   391 +
 tools/sra-pileup/pileup_stat.h                     |    40 +
 tools/sra-pileup/pileup_v2.c                       |   382 +
 tools/sra-pileup/pileup_v2.h                       |    40 +
 tools/sra-pileup/pileup_varcount.c                 |   139 +
 tools/sra-pileup/pileup_varcount.h                 |    40 +
 tools/sra-pileup/read_fkt.c                        |   718 +
 tools/sra-pileup/read_fkt.h                        |    82 +
 tools/sra-pileup/ref_regions.c                     |   825 +
 tools/sra-pileup/ref_regions.h                     |    71 +
 tools/sra-pileup/ref_walker.c                      |  1028 +
 tools/sra-pileup/ref_walker.h                      |   147 +
 tools/sra-pileup/ref_walker_0.c                    |   231 +
 tools/sra-pileup/ref_walker_0.h                    |   107 +
 tools/sra-pileup/report_deletes.c                  |   259 +
 tools/sra-pileup/report_deletes.h                  |    41 +
 tools/sra-pileup/reref.c                           |   550 +
 tools/sra-pileup/reref.h                           |    43 +
 tools/sra-pileup/rna_splice_log.c                  |   374 +
 tools/sra-pileup/rna_splice_log.h                  |    87 +
 tools/sra-pileup/sam-aligned.c                     |  2367 +++
 tools/sra-pileup/sam-aligned.h                     |    46 +
 tools/sra-pileup/sam-dump-opts.c                   |  1676 ++
 tools/sra-pileup/sam-dump-opts.h                   |   306 +
 tools/sra-pileup/sam-dump.c                        |  4905 +++++
 tools/sra-pileup/sam-dump3.c                       |   563 +
 tools/sra-pileup/sam-hdr.c                         |   728 +
 tools/sra-pileup/sam-hdr.h                         |    41 +
 tools/sra-pileup/sam-hdr1.c                        |   872 +
 tools/sra-pileup/sam-hdr1.h                        |    42 +
 tools/sra-pileup/sam-unaligned.c                   |  1565 ++
 tools/sra-pileup/sam-unaligned.h                   |    44 +
 tools/sra-pileup/splitfastq.pl                     |    46 +
 tools/sra-pileup/sra-pileup.c                      |  1640 ++
 tools/sra-pileup/walk_debug.c                      |   147 +
 tools/sra-pileup/walk_debug.h                      |    42 +
 tools/sra-pileup/writer.c                          |   137 +
 tools/sra-pileup/writer.h                          |    32 +
 tools/sra-seq-count/Makefile                       |    83 +
 tools/sra-seq-count/main_fkt.c                     |   203 +
 tools/sra-seq-count/options.h                      |    56 +
 tools/sra-seq-count/range.hpp                      |   307 +
 tools/sra-seq-count/sra-seq-count.cpp              |   688 +
 tools/sra-shell/Makefile                           |    58 +
 tools/sra-shell/guilib/Makefile                    |    71 +
 tools/sra-shell/job-exec/Makefile                  |    71 +
 tools/sra-shell/parser/Makefile                    |    71 +
 tools/sra-shell/parser/sra-shell-lex.l             |   103 +
 tools/sra-shell/parser/sra-shell.y                 |    54 +
 tools/sra-shell/sra-gui/Makefile                   |    80 +
 tools/sra-shell/sra-gui/sra-gui.c                  |    49 +
 tools/sra-shell/sra-shell/Makefile                 |    87 +
 tools/sra-shell/sra-shell/sra-shell.c              |    49 +
 tools/sra-shell/turboVision/Makefile               |    71 +
 tools/sra-sort/Makefile                            |   125 +
 tools/sra-sort/Makefile.cc                         |    24 +
 tools/sra-sort/Makefile.clang                      |    27 +
 tools/sra-sort/Makefile.gcc                        |    27 +
 tools/sra-sort/Makefile.vc++                       |    24 +
 tools/sra-sort/buff-writer.c                       |   789 +
 tools/sra-sort/buff-writer.h                       |    64 +
 tools/sra-sort/caps.c                              |   125 +
 tools/sra-sort/caps.h                              |    70 +
 tools/sra-sort/capture-first-half-aligned.c        |   192 +
 tools/sra-sort/col-pair.c                          |   818 +
 tools/sra-sort/col-pair.h                          |   323 +
 tools/sra-sort/csra-pair.c                         |   228 +
 tools/sra-sort/csra-pair.h                         |    87 +
 tools/sra-sort/csra-tbl.c                          |   798 +
 tools/sra-sort/csra-tbl.h                          |    83 +
 tools/sra-sort/ctx.h                               |   109 +
 tools/sra-sort/db-pair.c                           |   885 +
 tools/sra-sort/db-pair.h                           |   208 +
 tools/sra-sort/dir-pair.c                          |   504 +
 tools/sra-sort/dir-pair.h                          |   124 +
 tools/sra-sort/dump-blob-boundaries.c              |   203 +
 tools/sra-sort/except.c                            |   231 +
 tools/sra-sort/except.h                            |   160 +
 tools/sra-sort/gcc-ped.sh                          |    39 +
 tools/sra-sort/glob-poslen.c                       |   349 +
 tools/sra-sort/glob-poslen.h                       |    95 +
 tools/sra-sort/id-mapper-col.c                     |   260 +
 tools/sra-sort/id-mapper-col.h                     |    55 +
 tools/sra-sort/idx-mapping.c                       |    88 +
 tools/sra-sort/idx-mapping.h                       |    59 +
 tools/sra-sort/map-file.c                          |  1192 ++
 tools/sra-sort/map-file.h                          |   172 +
 tools/sra-sort/mapping-row-set.c                   |   496 +
 tools/sra-sort/mem.c                               |    68 +
 tools/sra-sort/mem.h                               |   128 +
 tools/sra-sort/membank-priv.h                      |    44 +
 tools/sra-sort/membank.c                           |   296 +
 tools/sra-sort/meta-pair.c                         |   458 +
 tools/sra-sort/meta-pair.h                         |   109 +
 tools/sra-sort/paged-membank.c                     |   244 +
 tools/sra-sort/paged-mmapbank.c                    |   399 +
 tools/sra-sort/poslen-col-pair.c                   |   559 +
 tools/sra-sort/poslen-col-pair.h                   |    63 +
 tools/sra-sort/ref-alignid-col.c                   |   702 +
 tools/sra-sort/ref-alignid-col.h                   |    53 +
 tools/sra-sort/row-set-priv.h                      |    44 +
 tools/sra-sort/row-set.c                           |   208 +
 tools/sra-sort/row-set.h                           |   215 +
 tools/sra-sort/run.c                               |   388 +
 tools/sra-sort/simple-row-set.c                    |   212 +
 tools/sra-sort/sort-defs.h                         |   109 +
 tools/sra-sort/sorting-row-set.c                   |   405 +
 tools/sra-sort/sra-sort.c                          |   746 +
 tools/sra-sort/sra-sort.h                          |   171 +
 tools/sra-sort/status.h                            |    48 +
 tools/sra-sort/tbl-pair.c                          |  1055 +
 tools/sra-sort/tbl-pair.h                          |   209 +
 tools/sra-sort/xcheck-ref-align.c                  |   411 +
 tools/sra-sort/xcheck.h                            |    49 +
 tools/sra-stat/Makefile                            |    80 +
 tools/sra-stat/sra-stat.c                          |  3634 ++++
 tools/sra-stat/sra-stat.h                          |    42 +
 tools/sra-stat/sra.c                               |   446 +
 libs/svdb/.gitignore => tools/sra/.cvsignore       |     0
 tools/sra/Makefile                                 |    77 +
 tools/sra/sra-dbcc.c                               |   435 +
 tools/sra/table-vers.c                             |   232 +
 tools/srapath/Makefile                             |    79 +
 tools/srapath/cgi_request.c                        |   853 +
 tools/srapath/cgi_request.h                        |   129 +
 tools/srapath/helper.c                             |   464 +
 tools/srapath/helper.h                             |   108 +
 tools/srapath/line_iter.c                          |   241 +
 tools/srapath/line_iter.h                          |    71 +
 tools/srapath/srapath.c                            |   439 +
 .../.gitignore => tools/update-schema/.cvsignore   |     0
 tools/update-schema/Makefile                       |    77 +
 tools/update-schema/update-schema.c                |   454 +
 tools/util/Makefile                                |   392 +
 tools/util/crc32sum.c                              |   272 +
 tools/util/kdb-index.c                             |   257 +
 tools/util/kdbmeta.c                               |  1332 ++
 tools/util/mac/syspass.c                           |    48 +
 tools/util/md5cp.c                                 |   702 +
 tools/util/pacbio-correct.c                        |   208 +
 tools/util/pseudo-aligner.cpp                      |   515 +
 tools/util/rcexplain.c                             |   127 +
 tools/util/rowwritetest.c                          |   433 +
 tools/util/samview.c                               |    80 +
 tools/util/schema-replace.c                        |   379 +
 tools/util/sortreadtest.c                          |   351 +
 tools/util/syspass-priv.h                          |    44 +
 tools/util/test-sra-priv.h                         |    46 +
 tools/util/test-sra.c                              |  3380 ++++
 tools/util/testld.c                                |   249 +
 tools/util/txt2kdb.c                               |   579 +
 tools/util/unix/PrintOS.c                          |    66 +
 tools/util/unix/syspass.c                          |    62 +
 tools/util/vdb-lock.c                              |   154 +
 tools/util/vdb-passwd.c                            |   307 +
 tools/util/vdb-unlock.c                            |   156 +
 tools/util/win/PrintOS.c                           |    60 +
 tools/util/win/syspass.c                           |    53 +
 tools/vcf-loader/.gitignore                        |     1 +
 tools/vcf-loader/Makefile                          |   128 +
 tools/vcf-loader/vcf-database.c                    |   168 +
 tools/vcf-loader/vcf-database.h                    |    40 +
 tools/vcf-loader/vcf-grammar.c                     |  1686 ++
 tools/vcf-loader/vcf-grammar.h                     |    61 +
 tools/vcf-loader/vcf-grammar.y                     |   123 +
 tools/vcf-loader/vcf-lex.c                         |  2528 +++
 tools/vcf-loader/vcf-lex.l                         |   132 +
 tools/vcf-loader/vcf-loader.c                      |   124 +
 tools/vcf-loader/vcf-parse.h                       |    89 +
 tools/vcf-loader/vcf-reader.c                      |   438 +
 tools/vcf-loader/vcf-reader.h                      |   110 +
 tools/vdb-config/Makefile                          |    82 +
 tools/vdb-config/configure.cpp                     |   815 +
 tools/vdb-config/configure.h                       |    49 +
 tools/vdb-config/interactive.cpp                   |  1084 +
 tools/vdb-config/interactive.h                     |    50 +
 tools/vdb-config/util.cpp                          |  1125 ++
 tools/vdb-config/util.hpp                          |   702 +
 tools/vdb-config/vdb-config-model.cpp              |   440 +
 tools/vdb-config/vdb-config-model.hpp              |   482 +
 tools/vdb-config/vdb-config.c                      |  1740 ++
 tools/vdb-config/vdb-config2.cpp                   |    30 +
 tools/vdb-config/vdb-config2.h                     |    29 +
 tools/vdb-copy/.gitignore                          |    17 +
 tools/vdb-copy/Makefile                            |    91 +
 tools/vdb-copy/coldefs.c                           |   775 +
 tools/vdb-copy/coldefs.h                           |   250 +
 tools/vdb-copy/column_match.c                      |    31 +
 tools/vdb-copy/column_match.h                      |    42 +
 tools/vdb-copy/config_values.c                     |    54 +
 tools/vdb-copy/config_values.h                     |    49 +
 tools/vdb-copy/context.c                           |   473 +
 tools/vdb-copy/context.h                           |   183 +
 tools/vdb-copy/copy_context.c                      |    47 +
 tools/vdb-copy/copy_context.h                      |    58 +
 tools/vdb-copy/copy_meta.c                         |   517 +
 tools/vdb-copy/copy_meta.h                         |    46 +
 tools/vdb-copy/definitions.h                       |   112 +
 tools/vdb-copy/get_platform.c                      |   168 +
 tools/vdb-copy/get_platform.h                      |    46 +
 tools/vdb-copy/helper.c                            |   919 +
 tools/vdb-copy/helper.h                            |   225 +
 tools/vdb-copy/matcher_input.h                     |    55 +
 tools/vdb-copy/namelist_tools.c                    |   187 +
 tools/vdb-copy/namelist_tools.h                    |    52 +
 tools/vdb-copy/num-gen.c                           |   848 +
 tools/vdb-copy/num-gen.h                           |   225 +
 tools/vdb-copy/redactval.c                         |   230 +
 tools/vdb-copy/redactval.h                         |   120 +
 tools/vdb-copy/type_matcher.c                      |   850 +
 tools/vdb-copy/type_matcher.h                      |    71 +
 tools/vdb-copy/vdb-copy-includes.h                 |   121 +
 tools/vdb-copy/vdb-copy.c                          |  1456 ++
 tools/vdb-copy/vdb-copy.kfg                        |    94 +
 tools/vdb-decrypt/Makefile                         |   102 +
 tools/vdb-decrypt/shared.c                         |  1271 ++
 tools/vdb-decrypt/shared.h                         |    93 +
 tools/vdb-decrypt/vdb-decrypt.c                    |   269 +
 tools/vdb-decrypt/vdb-encrypt.c                    |   215 +
 tools/vdb-diff/Makefile                            |    79 +
 tools/vdb-diff/coldefs.c                           |   211 +
 tools/vdb-diff/coldefs.h                           |   105 +
 tools/vdb-diff/namelist_tools.c                    |   299 +
 tools/vdb-diff/namelist_tools.h                    |    59 +
 tools/vdb-diff/vdb-diff.c                          |  1002 +
 tools/vdb-dump/.gitignore                          |     2 +
 tools/vdb-dump/Makefile                            |    92 +
 tools/vdb-dump/help.txt                            |   352 +
 tools/vdb-dump/vdb-boot.c                          |   448 +
 tools/vdb-dump/vdb-boot.vschema                    |    52 +
 tools/vdb-dump/vdb-dump-bin.c                      |  1496 ++
 tools/vdb-dump/vdb-dump-bin.h                      |    46 +
 tools/vdb-dump/vdb-dump-coldefs.c                  |   846 +
 tools/vdb-dump/vdb-dump-coldefs.h                  |   110 +
 tools/vdb-dump/vdb-dump-context.c                  |   649 +
 tools/vdb-dump/vdb-dump-context.h                  |   220 +
 tools/vdb-dump/vdb-dump-fastq.c                    |  1132 ++
 tools/vdb-dump/vdb-dump-fastq.h                    |    47 +
 tools/vdb-dump/vdb-dump-filter.c                   |   116 +
 tools/vdb-dump/vdb-dump-filter.h                   |    82 +
 tools/vdb-dump/vdb-dump-formats.c                  |   383 +
 tools/vdb-dump/vdb-dump-formats.h                  |    51 +
 tools/vdb-dump/vdb-dump-helper.c                   |   772 +
 tools/vdb-dump/vdb-dump-helper.h                   |   107 +
 tools/vdb-dump/vdb-dump-interact.c                 |   265 +
 tools/vdb-dump/vdb-dump-interact.h                 |    50 +
 tools/vdb-dump/vdb-dump-print.c                    |  1349 ++
 tools/vdb-dump/vdb-dump-print.h                    |    86 +
 tools/vdb-dump/vdb-dump-redir.c                    |   120 +
 tools/vdb-dump/vdb-dump-redir.h                    |    64 +
 tools/vdb-dump/vdb-dump-repo.c                     |   281 +
 tools/vdb-dump/vdb-dump-repo.h                     |    46 +
 tools/vdb-dump/vdb-dump-row-context.h              |    71 +
 tools/vdb-dump/vdb-dump-str.c                      |   540 +
 tools/vdb-dump/vdb-dump-str.h                      |   100 +
 tools/vdb-dump/vdb-dump-tools.c                    |   528 +
 tools/vdb-dump/vdb-dump-tools.h                    |    60 +
 tools/vdb-dump/vdb-dump.c                          |  2335 +++
 tools/vdb-dump/vdb_info.c                          |  1528 ++
 tools/vdb-dump/vdb_info.h                          |    47 +
 tools/vdb-validate/Makefile                        |    96 +
 tools/vdb-validate/check-corrupt.cpp               |   764 +
 tools/vdb-validate/vdb-validate.c                  |  3351 ++++
 vdb3/itf/kfc/array.hpp                             |   127 -
 vdb3/itf/kfc/atomic-ia32.hpp                       |   500 -
 vdb3/itf/kfc/atomic-x86_64.hpp                     |   356 -
 vdb3/itf/kfc/atomic.hpp                            |   133 -
 vdb3/itf/kfc/callstk.hpp                           |   117 -
 vdb3/itf/kfc/caps.hpp                              |    59 -
 vdb3/itf/kfc/defs.hpp                              |   113 -
 vdb3/itf/kfc/except.hpp                            |   174 -
 vdb3/itf/kfc/fd.hpp                                |   102 -
 vdb3/itf/kfc/fdmgr.hpp                             |    95 -
 vdb3/itf/kfc/integer.hpp                           |   191 -
 vdb3/itf/kfc/log.hpp                               |   118 -
 vdb3/itf/kfc/memmgr.hpp                            |   133 -
 vdb3/itf/kfc/memory.hpp                            |   149 -
 vdb3/itf/kfc/ptr.hpp                               |   174 -
 vdb3/itf/kfc/ref.hpp                               |   155 -
 vdb3/itf/kfc/refcount.hpp                          |    94 -
 vdb3/itf/kfc/rsrc.hpp                              |   150 -
 vdb3/itf/kfc/stream.hpp                            |   135 -
 vdb3/itf/kfc/string.hpp                            |   252 -
 vdb3/itf/kfc/syserr.hpp                            |    57 -
 vdb3/itf/kfc/task-impl.hpp                         |   139 -
 vdb3/itf/kfc/task.hpp                              |   124 -
 vdb3/itf/kfc/time.hpp                              |   299 -
 vdb3/itf/kfc/timemgr.hpp                           |    94 -
 vdb3/itf/kfc/vers.hpp                              |   101 -
 vdb3/src/kfc/Makefile                              |    88 -
 vdb3/src/kfc/array.cpp                             |   152 -
 vdb3/src/kfc/callstk.cpp                           |    60 -
 vdb3/src/kfc/except.cpp                            |   222 -
 vdb3/src/kfc/fd.cpp                                |   204 -
 vdb3/src/kfc/fdmgr.cpp                             |   101 -
 vdb3/src/kfc/integer.cpp                           |   137 -
 vdb3/src/kfc/log.cpp                               |   142 -
 vdb3/src/kfc/memmgr.cpp                            |   162 -
 vdb3/src/kfc/memory.cpp                            |   392 -
 vdb3/src/kfc/pfdmgr.cpp                            |    64 -
 vdb3/src/kfc/pfdmgr.hpp                            |    68 -
 vdb3/src/kfc/plogger.cpp                           |   148 -
 vdb3/src/kfc/plogger.hpp                           |    72 -
 vdb3/src/kfc/pmemmgr.cpp                           |   315 -
 vdb3/src/kfc/pmemmgr.hpp                           |    75 -
 vdb3/src/kfc/ptimemgr.cpp                          |    81 -
 vdb3/src/kfc/ptimemgr.hpp                          |    64 -
 vdb3/src/kfc/ptr.cpp                               |   206 -
 vdb3/src/kfc/ref.cpp                               |   140 -
 vdb3/src/kfc/refcount.cpp                          |   113 -
 vdb3/src/kfc/rsrc.cpp                              |   141 -
 vdb3/src/kfc/stream.cpp                            |   395 -
 vdb3/src/kfc/string.cpp                            |  1324 --
 vdb3/src/kfc/syserr.cpp                            |    97 -
 vdb3/src/kfc/task-impl.cpp                         |   352 -
 vdb3/src/kfc/task.cpp                              |   109 -
 vdb3/src/kfc/time.cpp                              |   290 -
 vdb3/src/kfc/timemgr.cpp                           |   105 -
 vdb3/src/kfc/vers.cpp                              |    85 -
 2974 files changed, 311163 insertions(+), 759567 deletions(-)

diff --git a/.gitignore b/.gitignore
index 4a39773..914aa95 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,33 +1,22 @@
-user.status
-vgcore.*
+.DS_Store
+._*
+*.d
+*.db
+*.o
+*.pyc
 /bin64
+/build/BUILD.*
 /build/COMP.mac
-/build/Makefile.config*
-/build/MSVC/2010/ipch
-/build/MSVC/2010/ncbi-vdb.opensdf
 /centos
 /ilib64
 /lib64
 /mac
-/Makefile.config.mac.arch
+/Makefile.config.*
 /reconfigure
 /schema
 /test-bin64
-user.status
 /win
-*.opensdf
-*.sdf
-*.suo
 *.log
 /.cproject
 /.project
 /.pydevproject
-
-# mac os x meta-files
-.DS_Store
-._*
-
-*~
-\#*
-.\#*
-core
diff --git a/CHANGES b/CHANGES
index 6803b60..32ff7f4 100644
--- a/CHANGES
+++ b/CHANGES
@@ -26,35 +26,102 @@
 The NCBI SRA Software Development Kit
 Contact: sra-tools at ncbi.nlm.nih.gov
 
-
-NCBI External Developer Release: NCBI VDB 2.7.0
+NCBI External Developer Release: SRA Toolkit 2.7.0
 July 12, 2016
 
+  align, bam-load: Insert-only alignments no longer cause incorrect binning
+  bam-load: fixed case where WGS accessions where not being read correctly
+  bam-load: will NOT perform spot assembly using hard clipped secondary alignments, even when 'make-spots-with-secondary' is enabled; WILL perform spot assembly using hard-clipped secondary alignments when 'defer-secondary' is enabled
   blast, kfg, ncbi-vdb, sra-tools, vfs: restored possibility to disable local caching
+  build, sra-tools: Running make and make install in sra-tools repository prepares all configuration files required to access NCBI repository
   doc, ncbi-vdb: created a Wiki page illustrating how to use the API to set up logging
+  fastdump, sra-tools: new tool to perform fast dumps of a whole run in either fastq or a custom format for one of our customers.
+  kar: Alter the default ordering of components of an SRA archive for better network performance
   kdb, kfs, kns: Added blob validation for data being fetched remotely
   kfg: When loading configuration files on Windows USERPROFILE environment variable is used before HOME
   kfg: modified auxiliary remote access configuration to use load-balanced servers
   kns: Fixed a bug when KHttpRequestPOST generated an incorrect Content-Length after retry
   ngs, search, sra-search: sra-search was modified to support multiple threads.
   ngs-engine, ngs-tools, sra-tools, vfs: The "auxiliary" nodes in configuration are now ignored
-  ngs-engine: Added support for blob-by-blob access to SEQUENCE table
-  ngs-engine: removed a potential memory leak in NGS_CursorMake()
-  search: now supports multi-threaded search
+  pileup-stats: updated commandline parser to eat unprocessed parameters
+  sam-dump: updated to append asterisks to quality field of SAM output when corrupt original BAM has secondary alignment is shorter than the primary.
+  search: now supports multi-threaded search 
+  sra-search: now supports sorted output
+  sra-tools: added possibility to build rpm package in sra-toolkit
+  sra-tools: fixed exit codes for a number of applications in response to command line options
+  vdb-dump: added tests to verify vdb-dump operation on nested databases
+  vdb-validate: A new checks were added for SEQUENCE table
   vdb: fixed a bug in VCursorFindNextRowIdDirect where it returned a wrong rowId
   vdb: fixed a bug in the code used to iterate over blobs where rowmap expansion cache would reset iteration to initial row instead of respecting sequence
   vfs: environment variable VDB_PWFILE is no longer used
 
 
-NCBI External Developer Release: NCBI VDB 2.6.3
+NCBI External Developer Release: SRA Toolkit 2.6.3
 May 25, 2016
 
+  bam-load: Corrects an optimization used to compare read lengths when lengths are greater than 255
+  bam-load: alignments which are below the minimum match count but with at least 1/2 of the aligned bases matching are accepted
+  bam-load: improved performance of SAM parsing code
+  bam-load: non-fatal result codes no longer cause the reader thread to quit early
+  bam-load: will NOT do spot assembly using hard clipped secondary alignments even when make-spots-with-secondary is enabled;
+            WILL do spot assembly using hard-clipped secondary alignments when defer-secondary is enabled
+  build: MSVS 2013 toolset (12.0) is now supported across all repositories
   vdb: Fixed a bound on memory cache that would never flush under certain access modes
 
 
-NCBI External Developer Release: NCBI VDB 2.6.2
+NCBI External Developer Release: SRA Toolkit 2.6.2
 April 20, 2016
 
+  align-cache: a tool producing vdbcache that reduces effects of random access and improves speed.
+  bam-load: Fixed bug in validation code for unsorted bam files
+  bam-load: If two (or more) local reference names refer to the same global reference,
+    bam-load will record the first one used and report the change.
+  bam-load: Secondary alignment will be used for spot assembly if the loader is explicitly told to use them
+  bam-load: The code that had invalid item in index problem was removed in the process of addressing a performance issue.
+  bam-load: change reporting of fatal warnings into fatal errors
+  bam-load: changed from an error to a warning if using secondary alignments to create spots
+  bam-load: low-match secondary alignments are now discarded; low-match primary alignments are logged,
+    and if too many, it will abort the load.
+  bam-load: records the contents of the BX tag
+  bam-load: rules for spot assembly were reverted to assembling spots only on primary alignments
+  blast, build: Improved blast tools: all required libraries are linked statically. 
+  build: Allow to build sra-tools on systems without static c++ library
+  check-corrupt, vdb-validate: Added a new set of checks that can be triggered by using one of two "--sdc:" cmd options
+  copycat: now runs on Centos 7; no longer uses system-installed magic file
+  dbgap-mount: Added support for standard options  "-L" and "-o", which allow users
+    to determine the logging level and log output file
+  dbgap-mount: New optional parameter was introduced '-u' which allows user
+    to unmount FUSE/DOKAN volume. Implemented on linux and windows
+  fastq-load: The (old) fastq-loader will properly report multiple reads on the 454 platform (and still fail).
+  kar: added '--md5' option to create md5sum compatible auxiliary file
   kdb: Fixed VTableDropColumn, so that it can drop static columns
-  kfs, kns: Fixed thread safety issues for both cache and http files
+  kfs, kns, ngs, sra-tools: Fixed thread safety issues for both cache and http files
+  kget: kget has a new option --full to match wget in speed. added examples.sh
   kproc: Fixed KQueue to wake waiters when sealed, fixed KSemaphore to wake waiters when canceled
+  latf-load: now allows undescores inside spot group names 
+  latf-load: now loads data produced by fastq-dump
+  latf-load: updated to support Illumina tag line format with identifier at the front
+  pileup-stats: added -V (--version) option: prints out the software
+  pileup-stats: pileup-stats: added version support (options -V or --version)
+  prefetch: Added --eliminate-quals option which speeds up HTTP download by ignoring QUALITY column`s data
+  prefetch: Fixed failure when running prefetch.exe "-a<bin|key>" when there is a space after "-a"
+  prefetch: messages about maximum size of download are made more user-friendly.
+  prefetch: now will download even when caching is disabled
+  ref-variation: --input-file option allows to specify input accessions and paths in the file
+  ref-variation: added "count-strand" option: it controls relative orientation of 3' and 5' fragments.
+  ref-variation: added -c option to flush output immediately; reporting zero matches
+  ref-variation: added a way to specify a number of repeats of the query
+  ref-variation: improved threading management
+  ref-variation: removed irrelevant warnings reported in some cases in debug version only
+  sam-dump: Segfault no longer occurs when confronted with large amounts of header lines
+  sam-dump: added option to produce MD tags
+  sam-dump: filters out duplicates in the rows that it generates
+  sam-dump: produces BX-tags if preserved in SRA file by bam-load
+  sra-sort: correctly generates spot-id column even in the absence of primary alignments
+  sra-stat: no longer fails when CS_NATIVE column is not present.
+  sra-tools, vdb-config: Removed dependency of mac binaries on unnecessary libraries, e.g. libxml2.
+  sra-tools: https://github.com/ncbi/sra-tools/issues/27 : contains short and long examples of how to configure sra-tools build
+  var-expand: a tool for batch variation expansion
+  vdb-config: now handles standard options such as --option-file
+  vdb-validate: Added code to continue with the next row when column has discontiguous blobs
+
diff --git a/CHANGES.md b/CHANGES.md
index bca80f7..8b6adce 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,32 +1,96 @@
 # NCBI External Developer Release:
 
-## NCBI VDB 2.7.0
-**July 12, 2016**
+## SRA Toolkit 2.7.0
+**June 12, 2016**
 
+  **align, bam-load**: Insert-only alignments no longer cause incorrect binning  
+  **bam-load**: fixed case where WGS accessions where not being read correctly  
+  **bam-load**: will NOT perform spot assembly using hard clipped secondary alignments, even when 'make-spots-with-secondary' is enabled; WILL perform spot assembly using hard-clipped secondary alignments when 'defer-secondary' is enabled  
   **blast, kfg, ncbi-vdb, sra-tools, vfs**: restored possibility to disable local caching  
+  **build, sra-tools**: Running make and make install in sra-tools repository prepares all configuration files required to access NCBI repository  
   **doc, ncbi-vdb**: created a Wiki page illustrating how to use the API to set up logging  
+  **fastdump, sra-tools**: new tool to perform fast dumps of a whole run in either fastq or a custom format for one of our customers.  
+  **kar**: Alter the default ordering of components of an SRA archive for better network performance  
   **kdb, kfs, kns**: Added blob validation for data being fetched remotely  
   **kfg**: When loading configuration files on Windows USERPROFILE environment variable is used before HOME  
   **kfg**: modified auxiliary remote access configuration to use load-balanced servers  
   **kns**: Fixed a bug when KHttpRequestPOST generated an incorrect Content-Length after retry  
   **ngs, search, sra-search**: sra-search was modified to support multiple threads.  
   **ngs-engine, ngs-tools, sra-tools, vfs**: The "auxiliary" nodes in configuration are now ignored  
-  **ngs-engine**: Added support for blob-by-blob access to SEQUENCE table  
-  **ngs-engine**: removed a potential memory leak in NGS_CursorMake()  
+  **pileup-stats**: updated commandline parser to eat unprocessed parameters  
+  **sam-dump**: updated to append asterisks to quality field of SAM output when corrupt original BAM has secondary alignment is shorter than the primary.  
   **search**: now supports multi-threaded search  
+  **sra-search**: now supports sorted output  
+  **sra-tools**: added possibility to build rpm package in sra-toolkit  
+  **sra-tools**: fixed exit codes for a number of applications in response to command line options  
+  **vdb-dump**: added tests to verify vdb-dump operation on nested databases  
+  **vdb-validate**: A new checks were added for SEQUENCE table  
   **vdb**: fixed a bug in VCursorFindNextRowIdDirect where it returned a wrong rowId  
   **vdb**: fixed a bug in the code used to iterate over blobs where rowmap expansion cache would reset iteration to initial row instead of respecting sequence  
   **vfs**: environment variable VDB_PWFILE is no longer used  
 
 
-## NCBI VDB 2.6.3
+## SRA Toolkit 2.6.3
 **May 25, 2016**
 
-  **vdb**: Fixed a bound on memory cache that would never flush under certain access modes  
+  **bam-load**: Corrects an optimization used to compare read lengths when lengths are greater than 255
+  **bam-load**: alignments which are below the minimum match count but with at least 1/2 of the aligned bases matching are accepted
+  **bam-load**: improved performance of SAM parsing code
+  **bam-load**: non-fatal result codes no longer cause the reader thread to quit early
+  **bam-load**: will NOT do spot assembly using hard clipped secondary alignments even when make-spots-with-secondary is enabled; WILL do spot assembly using hard-clipped secondary alignments when defer-secondary is enabled
+  **build**: MSVS 2013 toolset (12.0) is now supported across all repositories
+  **vdb**: Fixed a bound on memory cache that would never flush under certain access modes
 
-## NCBI VDB 2.6.2
+## SRA Toolkit 2.6.2
 **April 20, 2016**
 
+  **align-cache**: a tool producing vdbcache that reduces effects of random access and improves speed.  
+  **bam-load**: Fixed bug in validation code for unsorted bam files  
+  **bam-load**: If two (or more) local reference names refer to the same global reference, bam-load will record the first one used and report the change.  
+  **bam-load**: Secondary alignment will be used for spot assembly if the loader is explicitly told to use them  
+  **bam-load**: The code that had invalid item in index problem was removed in the process of addressing a performance issue.  
+  **bam-load**: change reporting of fatal warnings into fatal errors  
+  **bam-load**: changed from an error to a warning if using secondary alignments to create spots  
+  **bam-load**: low-match secondary alignments are now discarded; low-match primary alignments are logged, and if too many, it will abort the load.  
+  **bam-load**: records the contents of the BX tag  
+  **bam-load**: rules for spot assembly were reverted to assembling spots only on primary alignments  
+  **blast, build**: Improved blast tools: all required libraries are linked statically.  
+  **build**: Allow to build sra-tools on systems without static c++ library  
+  **check-corrupt, vdb-validate**: Added a new set of checks that can be triggered by using one of two "--sdc:" cmd options  
+  **copycat**: now runs on Centos 7; no longer uses system-installed magic file  
+  **dbgap-mount**: Added support for standard options  "-L" and "-o", which allow users to determine the logging level and log output file  
+  **dbgap-mount**: New optional parameter was introduced '-u' which allows user to unmount FUSE/DOKAN volume. Implemented on linux and windows  
+  **fastq-load**: The (old) fastq-loader will properly report multiple reads on the 454 platform (and still fail).  
+  **kar**: added '--md5' option to create md5sum compatible auxiliary file  
   **kdb**: Fixed VTableDropColumn, so that it can drop static columns  
-  **kfs, kns**: Fixed thread safety issues for both cache and http files  
+  **kfs, kns, ngs, sra-tools**: Fixed thread safety issues for both cache and http files  
+  **kget**: has a new option --full to match wget in speed. added examples.sh  
   **kproc**: Fixed KQueue to wake waiters when sealed, fixed KSemaphore to wake waiters when canceled  
+  **latf-load**: now allows undescores inside spot group names   
+  **latf-load**: now loads data produced by fastq-dump  
+  **latf-load**: updated to support Illumina tag line format with identifier at the front  
+  **pileup-stats**: added -V (--version) option: prints out the software  
+  **pileup-stats**: pileup-stats: added version support (options -V or --version)  
+  **prefetch**: Added --eliminate-quals option which speeds up HTTP download by ignoring QUALITY column`s data  
+  **prefetch**: Fixed failure when running prefetch.exe "-a<bin|key>" when there is a space after "-a"  
+  **prefetch**: messages about maximum size of download are made more user-friendly.  
+  **prefetch**: now will download even when caching is disabled  
+  **ref-variation**: --input-file option allows to specify input accessions and paths in the file  
+  **ref-variation**: added "count-strand" option: it controls relative orientation of 3' and 5' fragments.  
+  **ref-variation**: added -c option to flush output immediately; reporting zero matches  
+  **ref-variation**: added a way to specify a number of repeats of the query  
+  **ref-variation**: improved threading management  
+  **ref-variation**: removed irrelevant warnings reported in some cases in debug version only  
+  **sam-dump**: Segfault no longer occurs when confronted with large amounts of header lines  
+  **sam-dump**: added option to produce MD tags  
+  **sam-dump**: filters out duplicates in the rows that it generates  
+  **sam-dump**: produces BX-tags if preserved in SRA file by bam-load  
+  **sra-sort**: correctly generates spot-id column even in the absence of primary alignments  
+  **sra-stat**: no longer fails when CS_NATIVE column is not present.  
+  **sra-tools, vdb-config**: Removed dependency of mac binaries on unnecessary libraries, e.g. libxml2.  
+  **sra-tools**: [https://github.com/ncbi/sra-tools/issues/27](https://github.com/ncbi/sra-tools/issues/27) : contains short and long examples of how to configure sra-tools build  
+  **var-expand**: a tool for batch variation expansion  
+  **vdb-config**: now handles standard options such as --option-file  
+  **vdb-validate**: Added code to continue with the next row when column has discontiguous blobs  
+
+
diff --git a/LICENSE b/LICENSE
index ab19612..8987076 100644
--- a/LICENSE
+++ b/LICENSE
@@ -31,18 +31,7 @@ Please cite the authors in any work or product based on this material.
 ==============================================================
 EXCEPTIONS (in all cases excluding NCBI-written makefiles):
 
-Location: {libs,interfaces}/ext/bzip2
-Author:   Julian R Seward
-License:  BSDish [libs/ext/bzip2/LICENSE]
-
-Location: {libs,interfaces}/ext/zlib
-Authors:  Jean-loup Gailly and Mark Adler
-License:  BSDish [interfaces/ext/zlib.h]
-
-Location: libs/klib
-Author:   Douglas C. Schmidt
-License:  GNU Lesser General Public [libs/klib/qsort.c]
-
+See LICENSE from https://github.com/ncbi/ncbi-vdb
 
 ==============================================================
 Copyright F.A.Q.
diff --git a/Makefile b/Makefile
index 792d697..90922b2 100644
--- a/Makefile
+++ b/Makefile
@@ -34,14 +34,15 @@ include $(TOP)/build/Makefile.shell
 # default
 #
 SUBDIRS = \
-	libs \
+	shared \
+	tools \
 
 # common targets for non-leaf Makefiles; must follow a definition of SUBDIRS
 include $(TOP)/build/Makefile.targets
 
 default: $(SUBDIRS)
 
-test: $(SUBDIRS)
+test: all
 
 $(SUBDIRS) test:
 	@ $(MAKE) -C $@
@@ -61,11 +62,10 @@ $(SUBDIRS_STD):
 #-------------------------------------------------------------------------------
 # install
 #
-
 install: 
-	@ echo "Checking make status of object libraries..."
-	@ $(MAKE) -s --no-print-directory TOP=$(CURDIR) $(SUBDIRS)
-	@ $(MAKE) -s --no-print-directory TOP=$(CURDIR) -f build/Makefile.install install
+	@ echo "Checking make status of tools..."
+	@ $(MAKE) -s --no-print-directory TOP=$(CURDIR) std
+	@ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.install install
 
 uninstall:    
 	@ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.install uninstall
@@ -75,7 +75,7 @@ uninstall:
 #-------------------------------------------------------------------------------
 # clean
 #
-clean: clean_test
+clean: clean_deb clean_rpm clean_test
 
 clean_test:
 	@ $(MAKE) -s -C test clean
@@ -88,6 +88,8 @@ runtests: runtests_test
 runtests_test:
 	@ $(MAKE) -s -C test runtests
 
+#	@ $(MAKE) -s -C ngs runtests
+
 #-------------------------------------------------------------------------------
 # slowtests
 #
@@ -105,6 +107,32 @@ valgrind_test:
 	@ $(MAKE) -s -C test valgrind
 
 #-------------------------------------------------------------------------------
+# RPM
+#
+ifeq (mac,$(OS))
+rpm:
+	@ echo "Not making rpm on Mac"
+clean_rpm:
+else
+rpm: std
+	@ $(MAKE)       rpm -s TOP=$(CURDIR) -f build/Makefile.rpm
+clean_rpm:
+	@ $(MAKE) clean_rpm -s TOP=$(CURDIR) -f build/Makefile.rpm
+endif
+
+#-------------------------------------------------------------------------------
+# DEB
+#
+ifeq (mac,$(OS))
+deb: std
+else
+deb:
+endif
+	@ $(MAKE)       deb -s TOP=$(CURDIR) -f build/Makefile.deb
+clean_deb:
+	@ $(MAKE) clean_deb -s TOP=$(CURDIR) -f build/Makefile.deb
+
+#-------------------------------------------------------------------------------
 # pass-through targets
 #
 COMPILERS = GCC ICC VC++ CLANG
@@ -140,7 +168,7 @@ $(REPORTS):
 # configuration help
 #
 help configure:
-	@ echo "Before initial build, run 'make OUTDIR=<dir> out' from"
+	@ echo "Before initial build, run './configure --build-prefix=<out>' from"
 	@ echo "the project root to set the output directory of your builds."
 	@ echo
 	@ echo "To select a compiler, run 'make <comp>' where"
diff --git a/README b/README
index 0c4b070..4fb449e 100644
--- a/README
+++ b/README
@@ -27,29 +27,31 @@ The NCBI SRA ( Sequence Read Archive )
 
 
 Contact: sra-tools at ncbi.nlm.nih.gov
-http://www.ncbi.nlm.nih.gov/Traces/sra/?view=toolkit_doc
+SRA Tools web site: http://www.ncbi.nlm.nih.gov/Traces/sra/?view=toolkit_doc
+Download page: https://github.com/ncbi/sra-tools/wiki/Downloads
+
+Please check the CHANGES file for change history.
 
 The SRA Toolkit and SDK from NCBI is a collection of tools and libraries for
 using data in the INSDC Sequence Read Archives.
 
-Much of the data submitted these days, for example in BAM, Illumina export.txt,
-and Complete Genomics formats, contain alignment information. With aligned data,
+Much of the data submitted these days contain alignment information, for example
+in BAM, Illumina export.txt, and Complete Genomics formats. With aligned data,
 NCBI uses Compression by Reference, which only stores the differences in base
 pairs between sequence data and the segment it aligns to.  The process to
 restore original data, for example as FastQ, requires fast access to the
 reference sequences that the original data was aligned to.  NCBI recommends that
 SRA users dedicate local disk space to store references downloaded from the NCBI
-SRA site.  As of Fall 2014, the complete collection of these reference sequences
-is 66 GB.  While it isn't usually necessary to download the entirety of the
+SRA site.  As of February 2015, the complete collection of these reference sequences
+is 98 GB.  While it isn't usually necessary to download the entirety of the
 reference sequences, this should give you an idea of the scale of the storage
 requirement.  By default, the Toolkit will download missing reference sequences
 on demand and cache them in the user's home directory.  The location of this
 cache is configurable, as is whether the download is automatic or manual.
 
 For additional information on using, configuring, and building the toolkit,
-please visit our web site at:
-
-    http://www.ncbi.nlm.nih.gov/Traces/sra/?view=toolkit_doc&f=std
+please visit our wiki: https://github.com/ncbi/sra-tools/wiki
+or our web site at NCBI: http://www.ncbi.nlm.nih.gov/Traces/sra/?view=toolkit_doc
 
 
 SRA Toolkit Development Team
diff --git a/README-blastn b/README-blastn
new file mode 100644
index 0000000..2008a8c
--- /dev/null
+++ b/README-blastn
@@ -0,0 +1,133 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+The NCBI SRA ( Sequence Read Archive )
+
+
+Contact: sra-tools at ncbi.nlm.nih.gov
+http://trace.ncbi.nlm.nih.gov/Traces/sra/std
+
+
+Stand-alone BLAST searches against SRA runs in their native format.
+-------------------------------------------------------------------
+
+A stand-alone blastn application to perform BLAST searches directly against 
+native SRA files is included in this distribution. This application has been
+tested in-house at the NCBI, but has not been heavily used, so this should be
+considered a preliminary (alpha) release to a few experienced users. A 64-bit
+LINUX application has been built for this testing. 
+
+The application is called "blastn_vdb".
+
+The application can be invoked in much the same manner as the standard 
+blastn application:
+
+1) blastn_vdb -help or blastn_vdb -h will produce usage messages.
+
+2) The BLAST+ command-line manual at http://www.ncbi.nlm.nih.gov/books/NBK1763/ 
+provides more details on the options, though not all blastn options are
+available with blastn_vdb. Some options simply do not apply to sequences in SRA
+(e.g., -gilist is missing as these sequences have not been assigned GI's). Some
+options have not yet been implemented (e.g., -num_threads is currently disabled).
+
+
+To search cached or on-demand SRA objects.
+------------------------------------------
+An example blastn_vdb command-line would be:
+
+./blastn_vdb -db "ERR039542 ERR047215 ERR039539 ERR039540" -query nt.test -out test.out
+
+The file nt.test contains the query in FASTA format, and it will be searched against 
+the reads in runs with accessions ERR039542 ERR047215 ERR039539 ERR039540.
+
+If you have not already downloaded these objects using the vdb "prefetch" tool,
+they will be retrieved on-demand from NCBI under standard configuration. For
+alternative configuration information, please see the "README-vdb-config" file
+in this distribution.
+
+Searching with manually downloaded files.
+-----------------------------------------
+If you have manually downloaded files, e.g. via aspera or wget, etc., they may
+be referred to as "local" files. You can pass one or more file paths to be used
+collectively as the database. In this case the blastn_vdb command-line would be:
+
+./blastn_vdb -db <SRR_file> -query <input_file> -out <output_file>
+	
+Where
+<SRR_file> is the path (relative or absolute) and name of the SRRxxxxx file
+<input_file> is a fasta file containing the sequence(s) to be BLASTed
+<output_file> is the name specified for the output report of the blast search.
+
+Example:
+
+./blastn_vdb -db ./subdir/ERR039542.sra -query nt.test -out test.out
+
+Querying multiple SRR files simultaneously:
+
+./blastn_vdb -db "<SRR_file1> <SRR_file2> <SRR_file3>" -query <input.fa> -out <output_file>
+
+Enclose the group of files to be included in the search set in "quotes", e.g.
+"./SRR_file1.sra ./SRR_file2.sra ./SRR_file3.sra"
+
+Example:
+
+./blastn_vdb -db "./ERR039542.sra ./ERR047215.sra ./ERR039539.sra ./ERR039540.sra" -query nt.test -out test.out
+
+Caveats
+-------
+There are some limitations on the currently available application:
+
+1) Individual SRA data files containing more than 2 billion reads are not yet supported. For a 
+paired-end experiment this is actually a limitation of about 1 billion "spots".
+
+2) Compressed SRA ("cSRA") is not yet fully supported. Currently, only the
+unaligned fraction of reads are searched. Compressed SRA are runs containing
+alignments (e.g., ERR230455). Runs can be checked with "vdb-dump" to report if
+they contain alignment information:
+
+    $ vdb-dump -E ERR230455
+    enumerating the tables of database 'ERR230455'
+    tbl #1: PRIMARY_ALIGNMENT
+    tbl #2: REFERENCE
+    tbl #3: SEQUENCE
+
+3) You may need to prefix "./" to the run name for files in your current
+directory.
+
+4) The blast_formatter is not currently able to read native SRA files, so 
+reformatting of results saved as a blast archive is not yet supported.
+
+Common errors and fixes.
+------------------------
+
+1) Failure to provide relative path to manually downloaded SRR file:
+
+./blastn_vdb -db SRR770754.sra -query srr770754_test.fa -out test.out
+Error: NCBI C++ Exception:
+    "vdb2blast_util.cpp", line 253: Error: ncbi::CVDBBlastUtil::x_MakeSRASeqSrc() 
+    - VDB BlastSeqSrc construction failed: Failed to add any run to VDB runset: unsupported while allocating
+    
+Fix:
+Include relative (e.g., "../" or "./") or absolute (e.g., "/home/user/SRA_BLAST_data/") file path with SRR file
diff --git a/README-vdb-config b/README-vdb-config
new file mode 100644
index 0000000..46d1686
--- /dev/null
+++ b/README-vdb-config
@@ -0,0 +1,115 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+The tool 'vdb-config' can be used to inspect or change the configuration
+of the sra-toolkit.
+
+When called without any parameters the tool reports the current configuration
+in xml-format. No changes are made.
+
+-----------------------------------------------------------------------------
+
+vdb-config --restore-defaults
+
+If called with this parameter the tool will bring the configuration into
+default state.
+
+-----------------------------------------------------------------------------
+
+vdb-config -i
+
+This will present the user with a colored configuration dialog.
+
+The tab-key and the cursor-keys navigate the dialog. The item with the little
+red square has the focus. A button or a checkbox can be 'pressed' with the
+space or enter-key. To get out of the dialog without saving any changes
+press the '6'-key or the 'q'-key or navigate to the 'exit'-button at the
+bottom of the dialog and press the space or enter-key.
+
+
+The "data source" part:
+
+The "NCBI SRA" labeled checkbox enables/disables remote access to the SRA-
+accession stored at NCBI. As long as the computer has internet-access and this
+checkbox is enabled the user can access SRA-accessions directly without
+downloading them.
+
+A command like 'sra-pileup SRR341578' at the command-line will produce pileup
+output of the given accession even if this accession has not been downloaded
+before.
+The tool will download the data on the fly from our servers.
+
+
+There might be a checkbox labeled "site" below the "NCBI-SRA" one. If this
+checkbox is not available you do not have a 'site'-installation of SRA-data.
+If it is visible you do have such a site-installation and you can disable
+access to this data.
+
+
+The "local workspaces" part:
+
+At the top are 2 buttons "import dbGaP-project" and "set default import path".
+
+If you are not using dbGaP-projects (The database of Genotypes and Phenotypes)
+you can ignore these 2 buttons.
+
+The "import dbGaP-project" button presents you with another dialog to select
+a ngc-file. You can navigate the directories of your computer to find and
+select one of these files. By default the focus is in the files-list. It may
+be empty.
+Use the cursor-key: 'up' to focus the 'directories'-list. If you press enter
+on any of the listed directory-names you change into this directory.
+The '[ .. ]' entry brings you back into the parent directory. If you see
+ngc-files in the lower 'files'-list press the tab-key to switch to the
+'files'-list. Press enter on one of them to select this file for import. You
+will see a success-message if the import was performed without errors.
+On Windows you cannot switch from one drive-letter
+to another when selecting.
+
+The "set default import path" gives you the opportunity to specify a different
+default location for dbGaP-projects - for instance if your home directory is
+not big enough. You can always change the location for your dbGaP-project
+after the import.
+
+
+Below the 2 buttons is a list of local repositories. If there are no
+dbGaP-projects this list has only one entry "Open Access Data". This is the
+location where accessions get downloaded and cached. You can change these
+locations if for instance your home directory where they are created by
+default does not have enough space.
+The change button brings up a directory-select dialog.
+
+If you made any changes like enabling/disabling or changed a location, the
+change is only written to the configuration if you exit the dialog via the
+'save and exit' button.
+
+-----------------------------------------------------------------------------
+
+
+vdb-config -i --interactive-mode textual
+
+This will present the user with a purely textual and sequential dialog. It is
+intended to be used if the colored mode does not work, maybe because of
+console issues.
diff --git a/README.md b/README.md
index f772a80..19c2097 100644
--- a/README.md
+++ b/README.md
@@ -1,24 +1,28 @@
-# The NCBI SRA ( Sequence Read Archive )
+# The NCBI SRA (Sequence Read Archive)
 
 ### Contact:
 email: sra-tools at ncbi.nlm.nih.gov
+or visit the [SRA Tools web site](http://ncbi.github.io/sra-tools)
+
+### Download
+Visit our [download page](https://github.com/ncbi/sra-tools/wiki/Downloads) for pre-built binaries.
 
 ### Change Log
 Please check the CHANGES.md file for change history.
 
-## NCBI VDB
+## The SRA Toolkit
 The SRA Toolkit and SDK from NCBI is a collection of tools and libraries for
 using data in the INSDC Sequence Read Archives.
 
-Much of the data submitted these days, for example in BAM, Illumina export.txt,
-and Complete Genomics formats, contain alignment information. With aligned data,
+Much of the data submitted these days contain alignment information, for example
+in BAM, Illumina export.txt, and Complete Genomics formats. With aligned data,
 NCBI uses Compression by Reference, which only stores the differences in base
 pairs between sequence data and the segment it aligns to.  The process to
 restore original data, for example as FastQ, requires fast access to the
 reference sequences that the original data was aligned to.  NCBI recommends that
 SRA users dedicate local disk space to store references downloaded from the NCBI
-SRA site.  As of Fall 2014, the complete collection of these reference sequences
-is 66 GB.  While it isn't usually necessary to download the entirety of the
+SRA site.  As of February 2015, the complete collection of these reference sequences
+is 98 GB.  While it isn't usually necessary to download the entirety of the
 reference sequences, this should give you an idea of the scale of the storage
 requirement.  By default, the Toolkit will download missing reference sequences
 on demand and cache them in the user's home directory.  The location of this
diff --git a/build/.gitignore b/build/.gitignore
index 0f6621b..e865f29 100644
--- a/build/.gitignore
+++ b/build/.gitignore
@@ -1,10 +1,6 @@
 .cvsignore
-RHOST* ARCH* BUILD* COMP* OUTDIR*
+RHOST* ARCH* COMP* OUTDIR*
 STATIC
 ld.linux.exe_cmd.sh
 LNKG.*
-*.sdf
-*.suo
-*.user
-
-
+Makefile.config*
diff --git a/build/MSVC/2010/.gitignore b/build/MSVC/2010/.gitignore
new file mode 100644
index 0000000..c7f3049
--- /dev/null
+++ b/build/MSVC/2010/.gitignore
@@ -0,0 +1,6 @@
+*.user
+*.suo
+*.sdf
+*.opensdf
+*.ipch
+ipch/
\ No newline at end of file
diff --git a/build/MSVC/2010/abi-dump.vcxproj b/build/MSVC/2010/abi-dump.vcxproj
new file mode 100644
index 0000000..9dd187a
--- /dev/null
+++ b/build/MSVC/2010/abi-dump.vcxproj
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <Import Project=".\exe-project.props" />
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="..\abi-dump.files" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{9DF843FA-AA45-4EB1-BB76-84342AED550C}</ProjectGuid>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/align-cache.vcxproj b/build/MSVC/2010/align-cache.vcxproj
new file mode 100755
index 0000000..4f3d284
--- /dev/null
+++ b/build/MSVC/2010/align-cache.vcxproj
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <Import Project=".\exe-project.props" />
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="..\align-cache.files" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{3C8CB988-94DC-4B07-8865-B91FC52395F8}</ProjectGuid>
+  </PropertyGroup>
+</Project>
diff --git a/build/MSVC/2010/align-info.vcxproj b/build/MSVC/2010/align-info.vcxproj
new file mode 100644
index 0000000..23edbd2
--- /dev/null
+++ b/build/MSVC/2010/align-info.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\align-info.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{A54C75F9-A609-4BEC-91AB-23F5119B62AE}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/build.xml b/build/MSVC/2010/build.xml
new file mode 100644
index 0000000..513d3bf
--- /dev/null
+++ b/build/MSVC/2010/build.xml
@@ -0,0 +1,73 @@
+<project name="SRA-TOOLS" default="std" basedir=".">
+
+    <description>
+        Ant script for NCBI-VDB
+    </description>
+	
+    <property environment="env"/>
+    <property name="Platform"       value="x64" />
+    <property name="Configuration"  value="Debug" />
+    <property name="Output"         value="${basedir}\..\..\..\OUTDIR" />
+	
+    <target name="help">
+  		<echo message="">
+Apache Ant script for automated testing of SRA-TOOLS on Windonws
+
+Usage (in the directory of this file, build.xml):
+  ant [options] target1 target2 ... 
+  
+Example:
+  ant -DConfiguration=Debug -Platform=Win32 help std
+  
+Supported targets:
+	help - print this text and exit
+    clean       - remove all build artefacts
+    build       - regular build
+    quick       - same as build
+    runtests    - build and run small tests
+    std         - clean, runtests (default)
+	
+Options:
+    -DConfiguration=Debug or -DConfiguration=Release (default)  
+    -DPlatform=Win32 or -DPlatform=x64 (default)  
+    -DOutput=path   folder to create output in (default: ../../../OUTDIR)
+  		</echo>
+    </target>
+
+    <target name="clean">
+        <exec executable="msbuild.exe"  failonerror="true">
+            <arg value="sra-tools.sln"/>
+            <arg value="/t:clean"/>
+            <arg value="/m"/>
+            <arg value="/p:Platform=${Platform}"/>
+            <arg value="/p:Configuration=${Configuration}"/>
+            <arg value="/p:NGS_OUTDIR=${Output}"/>
+        </exec>
+    </target>
+    
+    <target name="build">
+        <exec executable="msbuild.exe" failonerror="true">
+            <arg value="sra-tools.sln"/>
+            <arg value="/m"/>
+            <arg value="/p:Platform=${Platform}"/>
+            <arg value="/p:Configuration=${Configuration}"/>
+            <arg value="/p:NGS_OUTDIR=${Output}"/>
+        </exec>
+    </target>
+    
+    
+    <target name="runtests" depends="build">
+        <exec executable="msbuild.exe" failonerror="true">
+            <arg value="test-sra-tools.sln"/>
+            <arg value="/p:Platform=${Platform}"/>
+            <arg value="/p:Configuration=${Configuration}"/>
+            <arg value="/p:NGS_OUTDIR=${Output}"/>
+            <arg value="/p:Autorun=true"/>
+        </exec>
+    </target>
+    
+    <target name="std" depends="clean,runtests" />
+        
+    <target name="quick" depends="build" />
+	
+</project>
\ No newline at end of file
diff --git a/build/MSVC/2010/cache-mgr.vcxproj b/build/MSVC/2010/cache-mgr.vcxproj
new file mode 100644
index 0000000..ba8f340
--- /dev/null
+++ b/build/MSVC/2010/cache-mgr.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+
+  <Import Project="..\cache-mgr.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
diff --git a/build/MSVC/2010/dbgap-mount-demo.vcxproj b/build/MSVC/2010/dbgap-mount-demo.vcxproj
new file mode 100644
index 0000000..8984a57
--- /dev/null
+++ b/build/MSVC/2010/dbgap-mount-demo.vcxproj
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\kapp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\libxfs.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>c:\Program Files (x86)\Dokan\DokanLibrary\dokan.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>Kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\dbgap-mount-demo.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{8DA91267-49B1-4696-AF9D-2A98B697167E}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
diff --git a/build/MSVC/2010/dbgap-mount-tool.vcxproj b/build/MSVC/2010/dbgap-mount-tool.vcxproj
new file mode 100644
index 0000000..7f6ea74
--- /dev/null
+++ b/build/MSVC/2010/dbgap-mount-tool.vcxproj
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\kapp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\libxfs.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>%ProgramFiles(x86)%\Dokan\DokanLibrary\dokan.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>Kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\dbgap-mount-tool.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{8DA91267-49B1-4696-AF9D-2A98B697167E}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
diff --git a/build/MSVC/2010/dll-project.props b/build/MSVC/2010/dll-project.props
new file mode 100644
index 0000000..243ba8f
--- /dev/null
+++ b/build/MSVC/2010/dll-project.props
@@ -0,0 +1,31 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">  
+
+  <Import Project="vdb-common.props" />
+  
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <TargetExt>.dll</TargetExt>
+    <OutDir>$(SRATOOLS_TARGET)\bin\</OutDir>
+  </PropertyGroup>
+  
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  
+  <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/cc/vc++/i386;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_ARCH_BITS=32;PKGNAME=win32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/cc/vc++/x86_64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_ARCH_BITS=64;PKGNAME=win64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/exe-project.props b/build/MSVC/2010/exe-project.props
new file mode 100644
index 0000000..553103e
--- /dev/null
+++ b/build/MSVC/2010/exe-project.props
@@ -0,0 +1,45 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">  
+
+  <Import Project="vdb-common.props" />
+  
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <TargetExt>.exe</TargetExt>
+    <OutDir>$(SRATOOLS_TARGET)\bin\</OutDir>
+  </PropertyGroup>
+  
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
+      <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(SRATOOLS_TARGET)lib\tk-version.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\kapp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\bz2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+    <PostBuildEvent>
+      <Command>del $(TargetDir)$(TargetName).lib
+del $(TargetDir)$(TargetName).exp</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  
+  <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/cc/vc++/i386;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_ARCH_BITS=32;PKGNAME=win32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/cc/vc++/x86_64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_ARCH_BITS=64;PKGNAME=win64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  
+  <ImportGroup Label="ExtensionTargets"/>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/fastq-dump-ngs.vcxproj b/build/MSVC/2010/fastq-dump-ngs.vcxproj
new file mode 100644
index 0000000..8f39f4a
--- /dev/null
+++ b/build/MSVC/2010/fastq-dump-ngs.vcxproj
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ngs-c++.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(NGS_TARGET)lib\libngs-bind-c++.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(NGS_TARGET)lib\libngs-disp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\fastq-dump-ngs.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{8DA91267-49B1-4696-AF9D-2A98B697167E}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/fastq-dump.vcxproj b/build/MSVC/2010/fastq-dump.vcxproj
new file mode 100644
index 0000000..aa63138
--- /dev/null
+++ b/build/MSVC/2010/fastq-dump.vcxproj
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="..\fastq-dump.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{2182DDEE-BE67-48FB-89BA-9EF23717C128}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/fastq-loader.vcxproj b/build/MSVC/2010/fastq-loader.vcxproj
new file mode 100644
index 0000000..5816bad
--- /dev/null
+++ b/build/MSVC/2010/fastq-loader.vcxproj
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+
+  <PropertyGroup>
+    <TargetName>latf-load</TargetName> 
+  </PropertyGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\loader.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\fastq-loader.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/general-loader.vcxproj b/build/MSVC/2010/general-loader.vcxproj
new file mode 100644
index 0000000..ccc8195
--- /dev/null
+++ b/build/MSVC/2010/general-loader.vcxproj
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\general-loader.files" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{11356540-C8F0-44B9-B6BA-01C87443A1CF}</ProjectGuid>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/illumina-dump.vcxproj b/build/MSVC/2010/illumina-dump.vcxproj
new file mode 100644
index 0000000..91ac3fb
--- /dev/null
+++ b/build/MSVC/2010/illumina-dump.vcxproj
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\bz2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+
+  <Import Project="..\illumina-dump.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/kar.vcxproj b/build/MSVC/2010/kar.vcxproj
new file mode 100644
index 0000000..c2c9e7a
--- /dev/null
+++ b/build/MSVC/2010/kar.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\kar.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/kdbmeta.vcxproj b/build/MSVC/2010/kdbmeta.vcxproj
new file mode 100644
index 0000000..972ef04
--- /dev/null
+++ b/build/MSVC/2010/kdbmeta.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\kdbmeta.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{D2B898E3-DDBB-4704-A932-AED218DABE18}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/lib-project.props b/build/MSVC/2010/lib-project.props
new file mode 100644
index 0000000..dd4ac3d
--- /dev/null
+++ b/build/MSVC/2010/lib-project.props
@@ -0,0 +1,30 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">  
+
+  <Import Project="vdb-common.props" />
+  
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <TargetExt>.lib</TargetExt>
+    <OutDir>$(SRATOOLS_TARGET)lib\</OutDir>
+  </PropertyGroup>
+  
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  
+  <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/cc/vc++/i386;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_ARCH_BITS=32;PKGNAME=win32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/cc/vc++/x86_64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_ARCH_BITS=64;PKGNAME=win64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  
+  <ImportGroup Label="ExtensionTargets" />
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/md5cp.vcxproj b/build/MSVC/2010/md5cp.vcxproj
new file mode 100644
index 0000000..b07ccae
--- /dev/null
+++ b/build/MSVC/2010/md5cp.vcxproj
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\md5cp.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{F14519B5-5698-4363-A734-229F2A01153D}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
diff --git a/build/MSVC/2010/prefetch.vcxproj b/build/MSVC/2010/prefetch.vcxproj
new file mode 100644
index 0000000..fde6efb
--- /dev/null
+++ b/build/MSVC/2010/prefetch.vcxproj
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <EntryPointSymbol>wmainCRTStartupNoPathConversion</EntryPointSymbol>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\prefetch.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
diff --git a/build/MSVC/2010/qual-recalib-stat.vcxproj b/build/MSVC/2010/qual-recalib-stat.vcxproj
new file mode 100644
index 0000000..c11b5f3
--- /dev/null
+++ b/build/MSVC/2010/qual-recalib-stat.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\qual-recalib-stat.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{4AF84403-70C6-4479-A701-D735E7003505}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/rcexplain.vcxproj b/build/MSVC/2010/rcexplain.vcxproj
new file mode 100644
index 0000000..4275968
--- /dev/null
+++ b/build/MSVC/2010/rcexplain.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\rcexplain.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{799ECD99-5336-4322-B845-279B7D4B8D71}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/read-filter-redact.vcxproj b/build/MSVC/2010/read-filter-redact.vcxproj
new file mode 100644
index 0000000..59ded1c
--- /dev/null
+++ b/build/MSVC/2010/read-filter-redact.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\read-filter-redact.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{B7C166D7-2B45-4E77-A608-DDBD0B588082}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/ref-variation.vcxproj b/build/MSVC/2010/ref-variation.vcxproj
new file mode 100755
index 0000000..671b194
--- /dev/null
+++ b/build/MSVC/2010/ref-variation.vcxproj
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <Import Project=".\exe-project.props" />
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ngs-c++.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(NGS_TARGET)lib\libngs-bind-c++.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(NGS_TARGET)lib\libngs-disp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="..\ref-variation.files" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{17513747-C074-4DA8-AA32-41D0C5FDC230}</ProjectGuid>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/sam-dump.vcxproj b/build/MSVC/2010/sam-dump.vcxproj
new file mode 100644
index 0000000..1936e3f
--- /dev/null
+++ b/build/MSVC/2010/sam-dump.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+ 
+  <Import Project="..\sam-dump.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/schema-replace.vcxproj b/build/MSVC/2010/schema-replace.vcxproj
new file mode 100644
index 0000000..b669401
--- /dev/null
+++ b/build/MSVC/2010/schema-replace.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+ 
+ <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\schema-replace.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/sff-dump.vcxproj b/build/MSVC/2010/sff-dump.vcxproj
new file mode 100644
index 0000000..bc9fc23
--- /dev/null
+++ b/build/MSVC/2010/sff-dump.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\sff-dump.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{11616A3B-9C1F-4760-AE77-755E06D5DFB1}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/sra-kar.vcxproj b/build/MSVC/2010/sra-kar.vcxproj
new file mode 100644
index 0000000..c92d439
--- /dev/null
+++ b/build/MSVC/2010/sra-kar.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\sra-kar.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{99FEB5EB-C150-4634-85AC-780082753D42}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/sra-pileup.vcxproj b/build/MSVC/2010/sra-pileup.vcxproj
new file mode 100644
index 0000000..ce36c49
--- /dev/null
+++ b/build/MSVC/2010/sra-pileup.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\sra-pileup.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{9112BE22-FE04-407B-8B3B-9D7C3731E39A}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/sra-stat.vcxproj b/build/MSVC/2010/sra-stat.vcxproj
new file mode 100644
index 0000000..2a5aca5
--- /dev/null
+++ b/build/MSVC/2010/sra-stat.vcxproj
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\sra-stat.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{88A9A91A-4BC3-47EA-8147-944FD4909C6D}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/sra-tools.sln b/build/MSVC/2010/sra-tools.sln
new file mode 100644
index 0000000..d3bfb5e
--- /dev/null
+++ b/build/MSVC/2010/sra-tools.sln
@@ -0,0 +1,507 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tk-version", "tk-version.vcxproj", "{08D430A6-B56A-42B6-8B32-E013F0A72DDF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rcexplain", "rcexplain.vcxproj", "{799ECD99-5336-4322-B845-279B7D4B8D71}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "md5cp", "md5cp.vcxproj", "{F14519B5-5698-4363-A734-229F2A01153D}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-sra", "test-sra.vcxproj", "{11C2E25B-2CD2-4826-A574-637AD10BAAC3}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-passwd", "vdb-passwd.vcxproj", "{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kar", "kar.vcxproj", "{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sra-kar", "sra-kar.vcxproj", "{99FEB5EB-C150-4634-85AC-780082753D42}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-dump", "vdb-dump.vcxproj", "{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fastq-dump", "fastq-dump.vcxproj", "{2182DDEE-BE67-48FB-89BA-9EF23717C128}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sff-dump", "sff-dump.vcxproj", "{11616A3B-9C1F-4760-AE77-755E06D5DFB1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "abi-dump", "abi-dump.vcxproj", "{9DF843FA-AA45-4EB1-BB76-84342AED550C}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fastq-dump-ngs", "fastq-dump-ngs.vcxproj", "{8DA91267-49B1-4696-AF9D-2A98B697167E}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kdbmeta", "kdbmeta.vcxproj", "{D2B898E3-DDBB-4704-A932-AED218DABE18}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-lock", "vdb-lock.vcxproj", "{4779D671-B464-4C6E-8875-CDA2081957F0}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-unlock", "vdb-unlock.vcxproj", "{452802EF-A059-4A4C-8106-ADF652ED1E1C}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "schema-replace", "schema-replace.vcxproj", "{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sra-pileup", "sra-pileup.vcxproj", "{9112BE22-FE04-407B-8B3B-9D7C3731E39A}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sam-dump", "sam-dump.vcxproj", "{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fastq-loader", "fastq-loader.vcxproj", "{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "srapath", "srapath.vcxproj", "{779C36A1-2592-469C-93A1-60C0B79BA529}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sra-stat", "sra-stat.vcxproj", "{88A9A91A-4BC3-47EA-8147-944FD4909C6D}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-copy", "vdb-copy.vcxproj", "{639D1E21-0C0C-4846-A71D-68DB7752833A}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "read-filter-redact", "read-filter-redact.vcxproj", "{B7C166D7-2B45-4E77-A608-DDBD0B588082}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-config", "vdb-config.vcxproj", "{7CAB9840-19BB-4B32-94BD-C29701FDBE88}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "align-info", "align-info.vcxproj", "{A54C75F9-A609-4BEC-91AB-23F5119B62AE}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "align-cache", "align-cache.vcxproj", "{3C8CB988-94DC-4B07-8865-B91FC52395F8}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ref-variation", "ref-variation.vcxproj", "{17513747-C074-4DA8-AA32-41D0C5FDC230}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "var-expand", "var-expand.vcxproj", "{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qual-recalib-stat", "qual-recalib-stat.vcxproj", "{4AF84403-70C6-4479-A701-D735E7003505}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "prefetch", "prefetch.vcxproj", "{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-decrypt", "vdb-decrypt.vcxproj", "{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-encrypt", "vdb-encrypt.vcxproj", "{03E85236-7CD9-4D6B-95FA-767935F8081D}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-validate", "vdb-validate.vcxproj", "{446C2DD3-36B3-4B27-8415-951F98346E99}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cache-mgr", "cache-mgr.vcxproj", "{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vcf-loader", "vcf-loader.vcxproj", "{DA226775-67B1-4354-A5CA-7F5406E0B1E7}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "illumina-dump", "illumina-dump.vcxproj", "{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-diff", "vdb-diff.vcxproj", "{B54A02A3-65A3-6E18-84CD-9003BED39F90}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "general-loader", "general-loader.vcxproj", "{11356540-C8F0-44B9-B6BA-01C87443A1CF}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Debug|Win32.Build.0 = Debug|Win32
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Debug|x64.ActiveCfg = Debug|x64
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Debug|x64.Build.0 = Debug|x64
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Release|Win32.ActiveCfg = Release|Win32
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Release|Win32.Build.0 = Release|Win32
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Release|x64.ActiveCfg = Release|x64
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Release|x64.Build.0 = Release|x64
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Debug|Win32.ActiveCfg = Debug|Win32
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Debug|Win32.Build.0 = Debug|Win32
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Debug|x64.ActiveCfg = Debug|x64
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Debug|x64.Build.0 = Debug|x64
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Release|Win32.ActiveCfg = Release|Win32
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Release|Win32.Build.0 = Release|Win32
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Release|x64.ActiveCfg = Release|x64
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Release|x64.Build.0 = Release|x64
+		{F14519B5-5698-4363-A734-229F2A01153D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F14519B5-5698-4363-A734-229F2A01153D}.Debug|Win32.Build.0 = Debug|Win32
+		{F14519B5-5698-4363-A734-229F2A01153D}.Debug|x64.ActiveCfg = Debug|x64
+		{F14519B5-5698-4363-A734-229F2A01153D}.Debug|x64.Build.0 = Debug|x64
+		{F14519B5-5698-4363-A734-229F2A01153D}.Release|Win32.ActiveCfg = Release|Win32
+		{F14519B5-5698-4363-A734-229F2A01153D}.Release|Win32.Build.0 = Release|Win32
+		{F14519B5-5698-4363-A734-229F2A01153D}.Release|x64.ActiveCfg = Release|x64
+		{F14519B5-5698-4363-A734-229F2A01153D}.Release|x64.Build.0 = Release|x64
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Debug|Win32.ActiveCfg = Debug|Win32
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Debug|Win32.Build.0 = Debug|Win32
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Debug|x64.ActiveCfg = Debug|x64
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Debug|x64.Build.0 = Debug|x64
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Release|Win32.ActiveCfg = Release|Win32
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Release|Win32.Build.0 = Release|Win32
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Release|x64.ActiveCfg = Release|x64
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Release|x64.Build.0 = Release|x64
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Debug|Win32.ActiveCfg = Debug|Win32
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Debug|Win32.Build.0 = Debug|Win32
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Debug|x64.ActiveCfg = Debug|x64
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Debug|x64.Build.0 = Debug|x64
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Release|Win32.ActiveCfg = Release|Win32
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Release|Win32.Build.0 = Release|Win32
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Release|x64.ActiveCfg = Release|x64
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Release|x64.Build.0 = Release|x64
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Debug|Win32.Build.0 = Debug|Win32
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Debug|x64.ActiveCfg = Debug|x64
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Debug|x64.Build.0 = Debug|x64
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Release|Win32.ActiveCfg = Release|Win32
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Release|Win32.Build.0 = Release|Win32
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Release|x64.ActiveCfg = Release|x64
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Release|x64.Build.0 = Release|x64
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Debug|Win32.ActiveCfg = Debug|Win32
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Debug|Win32.Build.0 = Debug|Win32
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Debug|x64.ActiveCfg = Debug|x64
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Debug|x64.Build.0 = Debug|x64
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Release|Win32.ActiveCfg = Release|Win32
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Release|Win32.Build.0 = Release|Win32
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Release|x64.ActiveCfg = Release|x64
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Release|x64.Build.0 = Release|x64
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Debug|Win32.ActiveCfg = Debug|Win32
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Debug|Win32.Build.0 = Debug|Win32
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Debug|x64.ActiveCfg = Debug|x64
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Debug|x64.Build.0 = Debug|x64
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Release|Win32.ActiveCfg = Release|Win32
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Release|Win32.Build.0 = Release|Win32
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Release|x64.ActiveCfg = Release|x64
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Release|x64.Build.0 = Release|x64
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Debug|Win32.ActiveCfg = Debug|Win32
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Debug|Win32.Build.0 = Debug|Win32
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Debug|x64.ActiveCfg = Debug|x64
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Debug|x64.Build.0 = Debug|x64
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Release|Win32.ActiveCfg = Release|Win32
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Release|Win32.Build.0 = Release|Win32
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Release|x64.ActiveCfg = Release|x64
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Release|x64.Build.0 = Release|x64
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Debug|Win32.ActiveCfg = Debug|Win32
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Debug|Win32.Build.0 = Debug|Win32
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Debug|x64.ActiveCfg = Debug|x64
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Debug|x64.Build.0 = Debug|x64
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Release|Win32.ActiveCfg = Release|Win32
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Release|Win32.Build.0 = Release|Win32
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Release|x64.ActiveCfg = Release|x64
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Release|x64.Build.0 = Release|x64
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Debug|Win32.Build.0 = Debug|Win32
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Debug|x64.ActiveCfg = Debug|x64
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Debug|x64.Build.0 = Debug|x64
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Release|Win32.ActiveCfg = Release|Win32
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Release|Win32.Build.0 = Release|Win32
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Release|x64.ActiveCfg = Release|x64
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Release|x64.Build.0 = Release|x64
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Debug|Win32.Build.0 = Debug|Win32
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Debug|x64.ActiveCfg = Debug|x64
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Debug|x64.Build.0 = Debug|x64
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Release|Win32.ActiveCfg = Release|Win32
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Release|Win32.Build.0 = Release|Win32
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Release|x64.ActiveCfg = Release|x64
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Release|x64.Build.0 = Release|x64
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Debug|Win32.Build.0 = Debug|Win32
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Debug|x64.ActiveCfg = Debug|x64
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Debug|x64.Build.0 = Debug|x64
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Release|Win32.ActiveCfg = Release|Win32
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Release|Win32.Build.0 = Release|Win32
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Release|x64.ActiveCfg = Release|x64
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Release|x64.Build.0 = Release|x64
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Debug|Win32.Build.0 = Debug|Win32
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Debug|x64.ActiveCfg = Debug|x64
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Debug|x64.Build.0 = Debug|x64
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Release|Win32.ActiveCfg = Release|Win32
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Release|Win32.Build.0 = Release|Win32
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Release|x64.ActiveCfg = Release|x64
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Release|x64.Build.0 = Release|x64
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Debug|Win32.ActiveCfg = Debug|Win32
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Debug|Win32.Build.0 = Debug|Win32
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Debug|x64.ActiveCfg = Debug|x64
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Debug|x64.Build.0 = Debug|x64
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Release|Win32.ActiveCfg = Release|Win32
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Release|Win32.Build.0 = Release|Win32
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Release|x64.ActiveCfg = Release|x64
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Release|x64.Build.0 = Release|x64
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Debug|Win32.ActiveCfg = Debug|Win32
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Debug|Win32.Build.0 = Debug|Win32
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Debug|x64.ActiveCfg = Debug|x64
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Debug|x64.Build.0 = Debug|x64
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Release|Win32.ActiveCfg = Release|Win32
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Release|Win32.Build.0 = Release|Win32
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Release|x64.ActiveCfg = Release|x64
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Release|x64.Build.0 = Release|x64
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Debug|Win32.Build.0 = Debug|Win32
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Debug|x64.ActiveCfg = Debug|x64
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Debug|x64.Build.0 = Debug|x64
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Release|Win32.ActiveCfg = Release|Win32
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Release|Win32.Build.0 = Release|Win32
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Release|x64.ActiveCfg = Release|x64
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Release|x64.Build.0 = Release|x64
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Debug|Win32.Build.0 = Debug|Win32
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Debug|x64.ActiveCfg = Debug|x64
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Debug|x64.Build.0 = Debug|x64
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Release|Win32.ActiveCfg = Release|Win32
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Release|Win32.Build.0 = Release|Win32
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Release|x64.ActiveCfg = Release|x64
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Release|x64.Build.0 = Release|x64
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Debug|Win32.Build.0 = Debug|Win32
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Debug|x64.ActiveCfg = Debug|x64
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Debug|x64.Build.0 = Debug|x64
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Release|Win32.ActiveCfg = Release|Win32
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Release|Win32.Build.0 = Release|Win32
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Release|x64.ActiveCfg = Release|x64
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Release|x64.Build.0 = Release|x64
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Debug|Win32.ActiveCfg = Debug|Win32
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Debug|Win32.Build.0 = Debug|Win32
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Debug|x64.ActiveCfg = Debug|x64
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Debug|x64.Build.0 = Debug|x64
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Release|Win32.ActiveCfg = Release|Win32
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Release|Win32.Build.0 = Release|Win32
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Release|x64.ActiveCfg = Release|x64
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Release|x64.Build.0 = Release|x64
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Debug|Win32.Build.0 = Debug|Win32
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Debug|x64.ActiveCfg = Debug|x64
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Debug|x64.Build.0 = Debug|x64
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Release|Win32.ActiveCfg = Release|Win32
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Release|Win32.Build.0 = Release|Win32
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Release|x64.ActiveCfg = Release|x64
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Release|x64.Build.0 = Release|x64
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Debug|Win32.Build.0 = Debug|Win32
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Debug|x64.ActiveCfg = Debug|x64
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Debug|x64.Build.0 = Debug|x64
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Release|Win32.ActiveCfg = Release|Win32
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Release|Win32.Build.0 = Release|Win32
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Release|x64.ActiveCfg = Release|x64
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Release|x64.Build.0 = Release|x64
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Debug|Win32.Build.0 = Debug|Win32
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Debug|x64.ActiveCfg = Debug|x64
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Debug|x64.Build.0 = Debug|x64
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Release|Win32.ActiveCfg = Release|Win32
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Release|Win32.Build.0 = Release|Win32
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Release|x64.ActiveCfg = Release|x64
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Release|x64.Build.0 = Release|x64
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Debug|Win32.ActiveCfg = Debug|Win32
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Debug|Win32.Build.0 = Debug|Win32
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Debug|x64.ActiveCfg = Debug|x64
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Debug|x64.Build.0 = Debug|x64
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Release|Win32.ActiveCfg = Release|Win32
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Release|Win32.Build.0 = Release|Win32
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Release|x64.ActiveCfg = Release|x64
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Release|x64.Build.0 = Release|x64
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Debug|Win32.ActiveCfg = Debug|Win32
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Debug|Win32.Build.0 = Debug|Win32
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Debug|x64.ActiveCfg = Debug|x64
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Debug|x64.Build.0 = Debug|x64
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Release|Win32.ActiveCfg = Release|Win32
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Release|Win32.Build.0 = Release|Win32
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Release|x64.ActiveCfg = Release|x64
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Release|x64.Build.0 = Release|x64
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Debug|Win32.ActiveCfg = Debug|Win32
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Debug|Win32.Build.0 = Debug|Win32
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Debug|x64.ActiveCfg = Debug|x64
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Debug|x64.Build.0 = Debug|x64
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Release|Win32.ActiveCfg = Release|Win32
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Release|Win32.Build.0 = Release|Win32
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Release|x64.ActiveCfg = Release|x64
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Release|x64.Build.0 = Release|x64
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Debug|Win32.ActiveCfg = Debug|Win32
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Debug|Win32.Build.0 = Debug|Win32
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Debug|x64.ActiveCfg = Debug|x64
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Debug|x64.Build.0 = Debug|x64
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Release|Win32.ActiveCfg = Release|Win32
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Release|Win32.Build.0 = Release|Win32
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Release|x64.ActiveCfg = Release|x64
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Release|x64.Build.0 = Release|x64
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Debug|Win32.Build.0 = Debug|Win32
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Debug|x64.ActiveCfg = Debug|x64
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Debug|x64.Build.0 = Debug|x64
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Release|Win32.ActiveCfg = Release|Win32
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Release|Win32.Build.0 = Release|Win32
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Release|x64.ActiveCfg = Release|x64
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Release|x64.Build.0 = Release|x64
+		{4AF84403-70C6-4479-A701-D735E7003505}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4AF84403-70C6-4479-A701-D735E7003505}.Debug|Win32.Build.0 = Debug|Win32
+		{4AF84403-70C6-4479-A701-D735E7003505}.Debug|x64.ActiveCfg = Debug|x64
+		{4AF84403-70C6-4479-A701-D735E7003505}.Debug|x64.Build.0 = Debug|x64
+		{4AF84403-70C6-4479-A701-D735E7003505}.Release|Win32.ActiveCfg = Release|Win32
+		{4AF84403-70C6-4479-A701-D735E7003505}.Release|Win32.Build.0 = Release|Win32
+		{4AF84403-70C6-4479-A701-D735E7003505}.Release|x64.ActiveCfg = Release|x64
+		{4AF84403-70C6-4479-A701-D735E7003505}.Release|x64.Build.0 = Release|x64
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Debug|Win32.ActiveCfg = Debug|Win32
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Debug|Win32.Build.0 = Debug|Win32
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Debug|x64.ActiveCfg = Debug|x64
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Debug|x64.Build.0 = Debug|x64
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Release|Win32.ActiveCfg = Release|Win32
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Release|Win32.Build.0 = Release|Win32
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Release|x64.ActiveCfg = Release|x64
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Release|x64.Build.0 = Release|x64
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Debug|Win32.Build.0 = Debug|Win32
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Debug|x64.ActiveCfg = Debug|x64
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Debug|x64.Build.0 = Debug|x64
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Release|Win32.ActiveCfg = Release|Win32
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Release|Win32.Build.0 = Release|Win32
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Release|x64.ActiveCfg = Release|x64
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Release|x64.Build.0 = Release|x64
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Debug|Win32.Build.0 = Debug|Win32
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Debug|x64.ActiveCfg = Debug|x64
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Debug|x64.Build.0 = Debug|x64
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Release|Win32.ActiveCfg = Release|Win32
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Release|Win32.Build.0 = Release|Win32
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Release|x64.ActiveCfg = Release|x64
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Release|x64.Build.0 = Release|x64
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Debug|Win32.ActiveCfg = Debug|Win32
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Debug|Win32.Build.0 = Debug|Win32
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Debug|x64.ActiveCfg = Debug|x64
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Debug|x64.Build.0 = Debug|x64
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Release|Win32.ActiveCfg = Release|Win32
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Release|Win32.Build.0 = Release|Win32
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Release|x64.ActiveCfg = Release|x64
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Release|x64.Build.0 = Release|x64
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Debug|Win32.Build.0 = Debug|Win32
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Debug|x64.ActiveCfg = Debug|x64
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Debug|x64.Build.0 = Debug|x64
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Release|Win32.ActiveCfg = Release|Win32
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Release|Win32.Build.0 = Release|Win32
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Release|x64.ActiveCfg = Release|x64
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Release|x64.Build.0 = Release|x64
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Debug|Win32.ActiveCfg = Debug|Win32
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Debug|Win32.Build.0 = Debug|Win32
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Debug|x64.ActiveCfg = Debug|x64
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Debug|x64.Build.0 = Debug|x64
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Release|Win32.ActiveCfg = Release|Win32
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Release|Win32.Build.0 = Release|Win32
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Release|x64.ActiveCfg = Release|x64
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Release|x64.Build.0 = Release|x64
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Debug|Win32.ActiveCfg = Debug|Win32
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Debug|Win32.Build.0 = Debug|Win32
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Debug|x64.ActiveCfg = Debug|x64
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Debug|x64.Build.0 = Debug|x64
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Release|Win32.ActiveCfg = Release|Win32
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Release|Win32.Build.0 = Release|Win32
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Release|x64.ActiveCfg = Release|x64
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Release|x64.Build.0 = Release|x64
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Debug|Win32.Build.0 = Debug|Win32
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Debug|x64.ActiveCfg = Debug|x64
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Debug|x64.Build.0 = Debug|x64
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Release|Win32.ActiveCfg = Release|Win32
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Release|Win32.Build.0 = Release|Win32
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Release|x64.ActiveCfg = Release|x64
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Release|x64.Build.0 = Release|x64
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Debug|Win32.Build.0 = Debug|Win32
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Debug|x64.ActiveCfg = Debug|x64
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Debug|x64.Build.0 = Debug|x64
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Release|Win32.ActiveCfg = Release|Win32
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Release|Win32.Build.0 = Release|Win32
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Release|x64.ActiveCfg = Release|x64
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/build/MSVC/2010/srapath.vcxproj b/build/MSVC/2010/srapath.vcxproj
new file mode 100644
index 0000000..8b6bd56
--- /dev/null
+++ b/build/MSVC/2010/srapath.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\srapath.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{779C36A1-2592-469C-93A1-60C0B79BA529}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/test-align-info.log b/build/MSVC/2010/test-align-info.log
new file mode 100644
index 0000000..d90f4fd
--- /dev/null
+++ b/build/MSVC/2010/test-align-info.log
@@ -0,0 +1,18 @@
+Build started 4/21/2016 12:48:08 PM.
+     1>Project "C:\Users\NCBI\github\sra-tools\build\MSVC\2010\test-align-info.vcxproj" on node 2 (build target(s)).
+     1>InitializeBuildStatus:
+         Creating "C:\Users\NCBI\github\sra-tools\build\MSVC\2010\..\..\..\..\ngs\ngs-sdk\..\..\OUTDIR\sra-tools\win\v100\x64\Debug\\obj\test-align-info\test-align-info.unsuccessfulbuild" because "AlwaysCreate" was specified.
+       PostBuildEvent:
+         del C:\Users\NCBI\github\OUTDIR\sra-tools\win\v100\x64\Debug\bin\test-align-info.lib
+         del C:\Users\NCBI\github\OUTDIR\sra-tools\win\v100\x64\Debug\bin\test-align-info.exp
+         :VCEnd
+         Could Not Find C:\Users\NCBI\github\OUTDIR\sra-tools\win\v100\x64\Debug\bin\test-align-info.lib
+         Could Not Find C:\Users\NCBI\github\OUTDIR\sra-tools\win\v100\x64\Debug\bin\test-align-info.exp
+       FinalizeBuildStatus:
+         Deleting file "C:\Users\NCBI\github\sra-tools\build\MSVC\2010\..\..\..\..\ngs\ngs-sdk\..\..\OUTDIR\sra-tools\win\v100\x64\Debug\\obj\test-align-info\test-align-info.unsuccessfulbuild".
+         Touching "C:\Users\NCBI\github\sra-tools\build\MSVC\2010\..\..\..\..\ngs\ngs-sdk\..\..\OUTDIR\sra-tools\win\v100\x64\Debug\\obj\test-align-info\test-align-info.lastbuildstate".
+     1>Done Building Project "C:\Users\NCBI\github\sra-tools\build\MSVC\2010\test-align-info.vcxproj" (build target(s)).
+
+Build succeeded.
+
+Time Elapsed 00:00:00.07
diff --git a/build/MSVC/2010/test-align-info.vcxproj b/build/MSVC/2010/test-align-info.vcxproj
new file mode 100644
index 0000000..139544f
--- /dev/null
+++ b/build/MSVC/2010/test-align-info.vcxproj
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+
+  <Import Project=".\test-project.props" />
+  
+    <Target Name="AfterBuild" Condition="'$(Autorun)'=='true'">
+      <Exec Command="$(SRATOOLS_TARGET)\bin\align-info.exe -h" WorkingDirectory="$(ProjectDir)"/>
+    </Target>
+    
+</Project>
diff --git a/build/MSVC/2010/test-fastq-loader.vcxproj b/build/MSVC/2010/test-fastq-loader.vcxproj
new file mode 100644
index 0000000..5fea07a
--- /dev/null
+++ b/build/MSVC/2010/test-fastq-loader.vcxproj
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+
+  <Import Project=".\test-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\loader.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\test-fastq-loader.files" />
+
+    <Target Name="AfterBuild" Condition="'$(Autorun)'=='true'">
+        <Exec Command="$(OutDir)vdb-config$(TargetExt) --root -s vdb/schema/paths="../../../../ncbi-vdb/interfaces""/>
+        <Exec Command="$(OutDir)$(TargetName)$(TargetExt)" WorkingDirectory="$(ProjectDir)"/>
+    </Target>
+    
+</Project>
diff --git a/build/MSVC/2010/test-general-loader.vcxproj b/build/MSVC/2010/test-general-loader.vcxproj
new file mode 100644
index 0000000..876da4b
--- /dev/null
+++ b/build/MSVC/2010/test-general-loader.vcxproj
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+
+  <Import Project=".\test-project.props" />
+  
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <PreprocessorDefinitions>LOCAL_SCHEMA=$(VDB_ROOT.Replace('\','\\'))interfaces</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\test-general-loader.files" />
+
+    <Target Name="AfterBuild" Condition="'$(Autorun)'=='true'">
+        <MakeDir Directories="..\..\..\test\general-loader\db"/>    
+        <Exec Command="$(OutDir)$(TargetName)$(TargetExt)" WorkingDirectory="..\..\..\test\general-loader\"/>
+    </Target>
+    
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/test-project.props b/build/MSVC/2010/test-project.props
new file mode 100644
index 0000000..87b21e0
--- /dev/null
+++ b/build/MSVC/2010/test-project.props
@@ -0,0 +1,15 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">  
+
+  <Import Project="exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ktst.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Target Name="Runtests" DependsOnTargets="Build" >
+    <Exec Command="$(OutDir)$(TargetName)$(TargetExt)" />
+  </Target>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/test-sra-tools.sln b/build/MSVC/2010/test-sra-tools.sln
new file mode 100644
index 0000000..bedc70c
--- /dev/null
+++ b/build/MSVC/2010/test-sra-tools.sln
@@ -0,0 +1,66 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wb-test-fastq", "wb-test-fastq.vcxproj", "{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-fastq-loader", "test-fastq-loader.vcxproj", "{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-vcf-loader", "test-vcf-loader.vcxproj", "{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-general-loader", "test-general-loader.vcxproj", "{9979DBC5-E171-1EAD-2336-E829EEECA0C3}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-align-info", "test-align-info.vcxproj", "{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Debug|Win32.Build.0 = Debug|Win32
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Debug|x64.ActiveCfg = Debug|x64
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Debug|x64.Build.0 = Debug|x64
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Release|Win32.ActiveCfg = Release|Win32
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Release|Win32.Build.0 = Release|Win32
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Release|x64.ActiveCfg = Release|x64
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Release|x64.Build.0 = Release|x64
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Debug|Win32.ActiveCfg = Debug|Win32
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Debug|Win32.Build.0 = Debug|Win32
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Debug|x64.ActiveCfg = Debug|x64
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Debug|x64.Build.0 = Debug|x64
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Release|Win32.ActiveCfg = Release|Win32
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Release|Win32.Build.0 = Release|Win32
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Release|x64.ActiveCfg = Release|x64
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Release|x64.Build.0 = Release|x64
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Debug|Win32.ActiveCfg = Debug|Win32
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Debug|Win32.Build.0 = Debug|Win32
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Debug|x64.ActiveCfg = Debug|x64
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Debug|x64.Build.0 = Debug|x64
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Release|Win32.ActiveCfg = Release|Win32
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Release|Win32.Build.0 = Release|Win32
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Release|x64.ActiveCfg = Release|x64
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Release|x64.Build.0 = Release|x64
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Debug|Win32.Build.0 = Debug|Win32
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Debug|x64.ActiveCfg = Debug|x64
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Debug|x64.Build.0 = Debug|x64
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Release|Win32.ActiveCfg = Release|Win32
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Release|Win32.Build.0 = Release|Win32
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Release|x64.ActiveCfg = Release|x64
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Release|x64.Build.0 = Release|x64
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Debug|Win32.ActiveCfg = Debug|Win32
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Debug|Win32.Build.0 = Debug|Win32
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Debug|x64.ActiveCfg = Debug|x64
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Debug|x64.Build.0 = Debug|x64
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Release|Win32.ActiveCfg = Release|Win32
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Release|Win32.Build.0 = Release|Win32
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Release|x64.ActiveCfg = Release|x64
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/build/MSVC/2010/test-sra.vcxproj b/build/MSVC/2010/test-sra.vcxproj
new file mode 100644
index 0000000..c87976b
--- /dev/null
+++ b/build/MSVC/2010/test-sra.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\test-sra.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{11C2E25B-2CD2-4826-A574-637AD10BAAC3}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/test-vcf-loader.vcxproj b/build/MSVC/2010/test-vcf-loader.vcxproj
new file mode 100644
index 0000000..ec36f7f
--- /dev/null
+++ b/build/MSVC/2010/test-vcf-loader.vcxproj
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+
+  <Import Project=".\test-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\loader.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(SRATOOLS_TARGET)lib\vcf-loader.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\test-vcf-loader.files" />
+
+    <Target Name="AfterBuild" Condition="'$(Autorun)'=='true'">
+        <Exec Command="$(OutDir)$(TargetName)$(TargetExt)" WorkingDirectory="$(ProjectDir)"/>
+    </Target>
+    
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/tk-version.vcxproj b/build/MSVC/2010/tk-version.vcxproj
new file mode 100644
index 0000000..7bbef3a
--- /dev/null
+++ b/build/MSVC/2010/tk-version.vcxproj
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\lib-project.props" />  
+  
+  <Import Project="..\tk-version.files" />  
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{08D430A6-B56A-42B6-8B32-E013F0A72DDF}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
diff --git a/build/MSVC/2010/var-expand.vcxproj b/build/MSVC/2010/var-expand.vcxproj
new file mode 100755
index 0000000..106e0b0
--- /dev/null
+++ b/build/MSVC/2010/var-expand.vcxproj
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <Import Project=".\exe-project.props" />
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ngs-c++.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(NGS_TARGET)lib\libngs-bind-c++.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(NGS_TARGET)lib\libngs-disp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="..\var-expand.files" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}</ProjectGuid>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/vcf-loader.vcxproj b/build/MSVC/2010/vcf-loader.vcxproj
new file mode 100644
index 0000000..ae116b6
--- /dev/null
+++ b/build/MSVC/2010/vcf-loader.vcxproj
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\lib-project.props" />
+  
+  <Import Project="..\vcf-loader.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{DA226775-67B1-4354-A5CA-7F5406E0B1E7}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/vdb-common.props b/build/MSVC/2010/vdb-common.props
new file mode 100644
index 0000000..e3a7596
--- /dev/null
+++ b/build/MSVC/2010/vdb-common.props
@@ -0,0 +1,94 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+    
+    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+    <PropertyGroup Label="Configuration">
+        <PlatformToolset>v100</PlatformToolset>
+    </PropertyGroup>
+
+    <PropertyGroup Label="Globals">
+        <Platform Condition="'$(Platform)' == ''">x64</Platform>
+        <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
+    
+        <NGS_ROOT Condition="'$(NGS_ROOT)' == ''">$(ProjectDir)..\..\..\..\ngs\ngs-sdk\</NGS_ROOT>
+        <NGS_OUTDIR Condition="'$(NGS_OUTDIR)' == ''">$(NGS_ROOT)..\..\OUTDIR\</NGS_OUTDIR>
+        <NGS_TARGET Condition="'$(NGS_TARGET)' == ''">$(NGS_OUTDIR)ngs-sdk\win\$(PlatformToolset)\$(Platform)\$(Configuration)\</NGS_TARGET>
+
+        <VDB_OUTDIR Condition="'$(VDB_OUTDIR)' == ''">$(NGS_OUTDIR)</VDB_OUTDIR>
+        <VDB_ROOT Condition="'$(VDB_ROOT)' == ''">$(ProjectDir)..\..\..\..\ncbi-vdb\</VDB_ROOT>
+        <VDB_TARGET Condition="'$(VDB_TARGET)' == ''">$(VDB_OUTDIR)ncbi-vdb\win\$(PlatformToolset)\$(Platform)\$(Configuration)\</VDB_TARGET>
+
+        <SRA_OUTDIR Condition="'$(SRA_OUTDIR)' == ''">$(VDB_OUTDIR)</SRA_OUTDIR>
+        <SRATOOLS_TARGET Condition="'$(SRATOOLS_TARGET)' == ''">$(SRA_OUTDIR)sra-tools\win\$(PlatformToolset)\$(Platform)\$(Configuration)\</SRATOOLS_TARGET>
+    </PropertyGroup>
+  
+    <PropertyGroup Label="Configuration">
+        <CharacterSet>Unicode</CharacterSet>
+        <IntDir>$(SRATOOLS_TARGET)\obj\$(ProjectName)\</IntDir>
+        <LinkIncremental>false</LinkIncremental>
+        <WholeProgramOptimization>false</WholeProgramOptimization>
+    </PropertyGroup>
+  
+    <PropertyGroup Label="Configuration" Condition="'$(TargetName)'==''" >
+        <TargetName>$(ProjectName)</TargetName>
+    </PropertyGroup>
+    
+    <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
+        <UseDebugLibraries>true</UseDebugLibraries>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
+        <UseDebugLibraries>false</UseDebugLibraries>
+    </PropertyGroup>
+    
+    <ItemDefinitionGroup>
+        <ClCompile>
+            <WarningLevel>Level3</WarningLevel>
+            <CompileAsManaged>false</CompileAsManaged>
+            <MinimalRebuild>true</MinimalRebuild>
+            <DisableLanguageExtensions>false</DisableLanguageExtensions>
+            <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+            <DisableSpecificWarnings>4996;4101</DisableSpecificWarnings>
+            <StringPooling>true</StringPooling>
+
+            <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+            <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/os/win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+            <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/cc/vc++;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+            <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/ext;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+            
+            <AdditionalIncludeDirectories>$(NGS_ROOT);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+
+            <PreprocessorDefinitions>_WIN32_WINNT=0x0502;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+            <PreprocessorDefinitions>WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+            <PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+            <PreprocessorDefinitions>__mod_name__=$(ProjectName);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+            <PreprocessorDefinitions>__file_name__=%(Filename);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+            <PreprocessorDefinitions>__file_ext__=c;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      
+        </ClCompile>
+    </ItemDefinitionGroup>
+
+    <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
+        <ClCompile>
+            <Optimization>Disabled</Optimization>
+            <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+            <PreprocessorDefinitions>_DEBUGGING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+        </ClCompile>
+        <Link>
+            <GenerateDebugInformation>true</GenerateDebugInformation>
+        </Link>
+    </ItemDefinitionGroup>
+    <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
+        <ClCompile>
+            <Optimization>MaxSpeed</Optimization>
+            <FunctionLevelLinking>true</FunctionLevelLinking>
+            <IntrinsicFunctions>true</IntrinsicFunctions>
+            <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+            <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+        </ClCompile>
+        <Link>
+            <GenerateDebugInformation>false</GenerateDebugInformation>
+            <EnableCOMDATFolding>true</EnableCOMDATFolding>
+            <OptimizeReferences>true</OptimizeReferences>
+        </Link>
+    </ItemDefinitionGroup>
+    
+</Project>
diff --git a/build/MSVC/2010/vdb-config.vcxproj b/build/MSVC/2010/vdb-config.vcxproj
new file mode 100644
index 0000000..4285049
--- /dev/null
+++ b/build/MSVC/2010/vdb-config.vcxproj
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\tui.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\tui_cpp.lib;%(AdditionalDependencies)</AdditionalDependencies>	  	  
+      <EntryPointSymbol>wmainCRTStartupNoPathConversion</EntryPointSymbol>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\vdb-config.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{7CAB9840-19BB-4B32-94BD-C29701FDBE88}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
diff --git a/build/MSVC/2010/vdb-copy.vcxproj b/build/MSVC/2010/vdb-copy.vcxproj
new file mode 100644
index 0000000..861d688
--- /dev/null
+++ b/build/MSVC/2010/vdb-copy.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\vdb-copy.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{639D1E21-0C0C-4846-A71D-68DB7752833A}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/vdb-decrypt.vcxproj b/build/MSVC/2010/vdb-decrypt.vcxproj
new file mode 100644
index 0000000..c92cd2d
--- /dev/null
+++ b/build/MSVC/2010/vdb-decrypt.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>    
+  
+  <Import Project="..\vdb-decrypt.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/vdb-diff.vcxproj b/build/MSVC/2010/vdb-diff.vcxproj
new file mode 100644
index 0000000..e1a05f8
--- /dev/null
+++ b/build/MSVC/2010/vdb-diff.vcxproj
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+	  <AdditionalDependencies>$(VDB_TARGET)lib\bz2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\vdb-diff.files" />
+
+  <PropertyGroup Label="Globals">
+  	<ProjectGuid>{B54A02A3-65A3-6E18-84CD-9003BED39F90}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/vdb-dump.vcxproj b/build/MSVC/2010/vdb-dump.vcxproj
new file mode 100644
index 0000000..f3eb008
--- /dev/null
+++ b/build/MSVC/2010/vdb-dump.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\vdb-dump.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/vdb-encrypt.vcxproj b/build/MSVC/2010/vdb-encrypt.vcxproj
new file mode 100644
index 0000000..2dfb8ec
--- /dev/null
+++ b/build/MSVC/2010/vdb-encrypt.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>    
+  
+  <Import Project="..\vdb-encrypt.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{03E85236-7CD9-4D6B-95FA-767935F8081D}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/vdb-lock.vcxproj b/build/MSVC/2010/vdb-lock.vcxproj
new file mode 100644
index 0000000..acd9a5f
--- /dev/null
+++ b/build/MSVC/2010/vdb-lock.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>    
+  
+  <Import Project="..\vdb-lock.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{4779D671-B464-4C6E-8875-CDA2081957F0}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/vdb-passwd.vcxproj b/build/MSVC/2010/vdb-passwd.vcxproj
new file mode 100644
index 0000000..8bf82b8
--- /dev/null
+++ b/build/MSVC/2010/vdb-passwd.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\vdb-passwd.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}</ProjectGuid>
+  </PropertyGroup>
+    
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/vdb-unlock.vcxproj b/build/MSVC/2010/vdb-unlock.vcxproj
new file mode 100644
index 0000000..919d4e9
--- /dev/null
+++ b/build/MSVC/2010/vdb-unlock.vcxproj
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\vdb-unlock.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{452802EF-A059-4A4C-8106-ADF652ED1E1C}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/vdb-validate.vcxproj b/build/MSVC/2010/vdb-validate.vcxproj
new file mode 100644
index 0000000..8193d23
--- /dev/null
+++ b/build/MSVC/2010/vdb-validate.vcxproj
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\vdb-validate.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{446C2DD3-36B3-4B27-8415-951F98346E99}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2010/wb-test-fastq.vcxproj b/build/MSVC/2010/wb-test-fastq.vcxproj
new file mode 100644
index 0000000..9a8f5aa
--- /dev/null
+++ b/build/MSVC/2010/wb-test-fastq.vcxproj
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+
+  <Import Project=".\test-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\loader.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\wb-test-fastq.files" />
+  
+    <Target Name="AfterBuild" Condition="'$(Autorun)'=='true'">
+        <Exec Command="$(OutDir)$(TargetName)$(TargetExt)" WorkingDirectory="$(ProjectDir)"/>
+    </Target>  
+    
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/.gitignore b/build/MSVC/2013/.gitignore
new file mode 100644
index 0000000..818c6df
--- /dev/null
+++ b/build/MSVC/2013/.gitignore
@@ -0,0 +1,7 @@
+*.user
+*.suo
+*.sdf
+*.opensdf
+*.ipch
+*.log
+ipch/
diff --git a/build/MSVC/2013/abi-dump.vcxproj b/build/MSVC/2013/abi-dump.vcxproj
new file mode 100644
index 0000000..ad87911
--- /dev/null
+++ b/build/MSVC/2013/abi-dump.vcxproj
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="..\abi-dump.files" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{9DF843FA-AA45-4EB1-BB76-84342AED550C}</ProjectGuid>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/align-cache.vcxproj b/build/MSVC/2013/align-cache.vcxproj
new file mode 100644
index 0000000..540ddaf
--- /dev/null
+++ b/build/MSVC/2013/align-cache.vcxproj
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="..\align-cache.files" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{3C8CB988-94DC-4B07-8865-B91FC52395F8}</ProjectGuid>
+  </PropertyGroup>
+</Project>
diff --git a/build/MSVC/2013/align-info.vcxproj b/build/MSVC/2013/align-info.vcxproj
new file mode 100644
index 0000000..d8dd640
--- /dev/null
+++ b/build/MSVC/2013/align-info.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\align-info.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{A54C75F9-A609-4BEC-91AB-23F5119B62AE}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/build.xml b/build/MSVC/2013/build.xml
new file mode 100644
index 0000000..513d3bf
--- /dev/null
+++ b/build/MSVC/2013/build.xml
@@ -0,0 +1,73 @@
+<project name="SRA-TOOLS" default="std" basedir=".">
+
+    <description>
+        Ant script for NCBI-VDB
+    </description>
+	
+    <property environment="env"/>
+    <property name="Platform"       value="x64" />
+    <property name="Configuration"  value="Debug" />
+    <property name="Output"         value="${basedir}\..\..\..\OUTDIR" />
+	
+    <target name="help">
+  		<echo message="">
+Apache Ant script for automated testing of SRA-TOOLS on Windonws
+
+Usage (in the directory of this file, build.xml):
+  ant [options] target1 target2 ... 
+  
+Example:
+  ant -DConfiguration=Debug -Platform=Win32 help std
+  
+Supported targets:
+	help - print this text and exit
+    clean       - remove all build artefacts
+    build       - regular build
+    quick       - same as build
+    runtests    - build and run small tests
+    std         - clean, runtests (default)
+	
+Options:
+    -DConfiguration=Debug or -DConfiguration=Release (default)  
+    -DPlatform=Win32 or -DPlatform=x64 (default)  
+    -DOutput=path   folder to create output in (default: ../../../OUTDIR)
+  		</echo>
+    </target>
+
+    <target name="clean">
+        <exec executable="msbuild.exe"  failonerror="true">
+            <arg value="sra-tools.sln"/>
+            <arg value="/t:clean"/>
+            <arg value="/m"/>
+            <arg value="/p:Platform=${Platform}"/>
+            <arg value="/p:Configuration=${Configuration}"/>
+            <arg value="/p:NGS_OUTDIR=${Output}"/>
+        </exec>
+    </target>
+    
+    <target name="build">
+        <exec executable="msbuild.exe" failonerror="true">
+            <arg value="sra-tools.sln"/>
+            <arg value="/m"/>
+            <arg value="/p:Platform=${Platform}"/>
+            <arg value="/p:Configuration=${Configuration}"/>
+            <arg value="/p:NGS_OUTDIR=${Output}"/>
+        </exec>
+    </target>
+    
+    
+    <target name="runtests" depends="build">
+        <exec executable="msbuild.exe" failonerror="true">
+            <arg value="test-sra-tools.sln"/>
+            <arg value="/p:Platform=${Platform}"/>
+            <arg value="/p:Configuration=${Configuration}"/>
+            <arg value="/p:NGS_OUTDIR=${Output}"/>
+            <arg value="/p:Autorun=true"/>
+        </exec>
+    </target>
+    
+    <target name="std" depends="clean,runtests" />
+        
+    <target name="quick" depends="build" />
+	
+</project>
\ No newline at end of file
diff --git a/build/MSVC/2013/cache-mgr.vcxproj b/build/MSVC/2013/cache-mgr.vcxproj
new file mode 100644
index 0000000..86380ad
--- /dev/null
+++ b/build/MSVC/2013/cache-mgr.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+
+  <Import Project="..\cache-mgr.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
diff --git a/build/MSVC/2013/dbgap-mount-demo.vcxproj b/build/MSVC/2013/dbgap-mount-demo.vcxproj
new file mode 100644
index 0000000..71de619
--- /dev/null
+++ b/build/MSVC/2013/dbgap-mount-demo.vcxproj
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\kapp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\libxfs.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>c:\Program Files (x86)\Dokan\DokanLibrary\dokan.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>Kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\dbgap-mount-demo.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{8DA91267-49B1-4696-AF9D-2A98B697167E}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
diff --git a/build/MSVC/2013/dbgap-mount-tool.vcxproj b/build/MSVC/2013/dbgap-mount-tool.vcxproj
new file mode 100644
index 0000000..a279e51
--- /dev/null
+++ b/build/MSVC/2013/dbgap-mount-tool.vcxproj
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\kapp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\libxfs.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>%ProgramFiles(x86)%\Dokan\DokanLibrary\dokan.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>Kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\dbgap-mount-tool.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{8DA91267-49B1-4696-AF9D-2A98B697167E}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
diff --git a/build/MSVC/2013/dll-project.props b/build/MSVC/2013/dll-project.props
new file mode 100644
index 0000000..243ba8f
--- /dev/null
+++ b/build/MSVC/2013/dll-project.props
@@ -0,0 +1,31 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">  
+
+  <Import Project="vdb-common.props" />
+  
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <TargetExt>.dll</TargetExt>
+    <OutDir>$(SRATOOLS_TARGET)\bin\</OutDir>
+  </PropertyGroup>
+  
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  
+  <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/cc/vc++/i386;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_ARCH_BITS=32;PKGNAME=win32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/cc/vc++/x86_64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_ARCH_BITS=64;PKGNAME=win64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/exe-project.props b/build/MSVC/2013/exe-project.props
new file mode 100644
index 0000000..553103e
--- /dev/null
+++ b/build/MSVC/2013/exe-project.props
@@ -0,0 +1,45 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">  
+
+  <Import Project="vdb-common.props" />
+  
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <TargetExt>.exe</TargetExt>
+    <OutDir>$(SRATOOLS_TARGET)\bin\</OutDir>
+  </PropertyGroup>
+  
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
+      <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(SRATOOLS_TARGET)lib\tk-version.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\kapp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\bz2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+    <PostBuildEvent>
+      <Command>del $(TargetDir)$(TargetName).lib
+del $(TargetDir)$(TargetName).exp</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  
+  <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/cc/vc++/i386;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_ARCH_BITS=32;PKGNAME=win32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/cc/vc++/x86_64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_ARCH_BITS=64;PKGNAME=win64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  
+  <ImportGroup Label="ExtensionTargets"/>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/fastq-dump-ngs.vcxproj b/build/MSVC/2013/fastq-dump-ngs.vcxproj
new file mode 100644
index 0000000..3eac906
--- /dev/null
+++ b/build/MSVC/2013/fastq-dump-ngs.vcxproj
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ngs-c++.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(NGS_TARGET)lib\libngs-bind-c++.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(NGS_TARGET)lib\libngs-disp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\fastq-dump-ngs.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{8DA91267-49B1-4696-AF9D-2A98B697167E}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/fastq-dump.vcxproj b/build/MSVC/2013/fastq-dump.vcxproj
new file mode 100644
index 0000000..9d036d6
--- /dev/null
+++ b/build/MSVC/2013/fastq-dump.vcxproj
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="..\fastq-dump.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{2182DDEE-BE67-48FB-89BA-9EF23717C128}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/fastq-loader.vcxproj b/build/MSVC/2013/fastq-loader.vcxproj
new file mode 100644
index 0000000..1a83509
--- /dev/null
+++ b/build/MSVC/2013/fastq-loader.vcxproj
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <TargetName>latf-load</TargetName> 
+  </PropertyGroup>
+  
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\loader.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\fastq-loader.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/general-loader.vcxproj b/build/MSVC/2013/general-loader.vcxproj
new file mode 100644
index 0000000..c4b19d5
--- /dev/null
+++ b/build/MSVC/2013/general-loader.vcxproj
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\general-loader.files" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{11356540-C8F0-44B9-B6BA-01C87443A1CF}</ProjectGuid>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/illumina-dump.vcxproj b/build/MSVC/2013/illumina-dump.vcxproj
new file mode 100644
index 0000000..419e6ae
--- /dev/null
+++ b/build/MSVC/2013/illumina-dump.vcxproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\bz2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+
+  <Import Project="..\illumina-dump.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/kar.vcxproj b/build/MSVC/2013/kar.vcxproj
new file mode 100644
index 0000000..99603c0
--- /dev/null
+++ b/build/MSVC/2013/kar.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\kar.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/kdbmeta.vcxproj b/build/MSVC/2013/kdbmeta.vcxproj
new file mode 100644
index 0000000..6747e64
--- /dev/null
+++ b/build/MSVC/2013/kdbmeta.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\kdbmeta.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{D2B898E3-DDBB-4704-A932-AED218DABE18}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/lib-project.props b/build/MSVC/2013/lib-project.props
new file mode 100644
index 0000000..dd4ac3d
--- /dev/null
+++ b/build/MSVC/2013/lib-project.props
@@ -0,0 +1,30 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">  
+
+  <Import Project="vdb-common.props" />
+  
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <TargetExt>.lib</TargetExt>
+    <OutDir>$(SRATOOLS_TARGET)lib\</OutDir>
+  </PropertyGroup>
+  
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  
+  <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/cc/vc++/i386;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_ARCH_BITS=32;PKGNAME=win32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/cc/vc++/x86_64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_ARCH_BITS=64;PKGNAME=win64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  
+  <ImportGroup Label="ExtensionTargets" />
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/md5cp.vcxproj b/build/MSVC/2013/md5cp.vcxproj
new file mode 100644
index 0000000..46a92b7
--- /dev/null
+++ b/build/MSVC/2013/md5cp.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\md5cp.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{F14519B5-5698-4363-A734-229F2A01153D}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
diff --git a/build/MSVC/2013/prefetch.vcxproj b/build/MSVC/2013/prefetch.vcxproj
new file mode 100644
index 0000000..d0b55ae
--- /dev/null
+++ b/build/MSVC/2013/prefetch.vcxproj
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <EntryPointSymbol>wmainCRTStartupNoPathConversion</EntryPointSymbol>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\prefetch.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
diff --git a/build/MSVC/2013/qual-recalib-stat.vcxproj b/build/MSVC/2013/qual-recalib-stat.vcxproj
new file mode 100644
index 0000000..b425626
--- /dev/null
+++ b/build/MSVC/2013/qual-recalib-stat.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\qual-recalib-stat.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{4AF84403-70C6-4479-A701-D735E7003505}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/rcexplain.vcxproj b/build/MSVC/2013/rcexplain.vcxproj
new file mode 100644
index 0000000..a620921
--- /dev/null
+++ b/build/MSVC/2013/rcexplain.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\rcexplain.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{799ECD99-5336-4322-B845-279B7D4B8D71}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/read-filter-redact.vcxproj b/build/MSVC/2013/read-filter-redact.vcxproj
new file mode 100644
index 0000000..98ad9d6
--- /dev/null
+++ b/build/MSVC/2013/read-filter-redact.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\read-filter-redact.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{B7C166D7-2B45-4E77-A608-DDBD0B588082}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/ref-variation.vcxproj b/build/MSVC/2013/ref-variation.vcxproj
new file mode 100644
index 0000000..5e6432f
--- /dev/null
+++ b/build/MSVC/2013/ref-variation.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ngs-c++.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(NGS_TARGET)lib\libngs-bind-c++.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(NGS_TARGET)lib\libngs-disp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="..\ref-variation.files" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{17513747-C074-4DA8-AA32-41D0C5FDC230}</ProjectGuid>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/sam-dump.vcxproj b/build/MSVC/2013/sam-dump.vcxproj
new file mode 100644
index 0000000..b5f426a
--- /dev/null
+++ b/build/MSVC/2013/sam-dump.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+ 
+  <Import Project="..\sam-dump.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/schema-replace.vcxproj b/build/MSVC/2013/schema-replace.vcxproj
new file mode 100644
index 0000000..65abdc6
--- /dev/null
+++ b/build/MSVC/2013/schema-replace.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\schema-replace.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/sff-dump.vcxproj b/build/MSVC/2013/sff-dump.vcxproj
new file mode 100644
index 0000000..a133de7
--- /dev/null
+++ b/build/MSVC/2013/sff-dump.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\sff-dump.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{11616A3B-9C1F-4760-AE77-755E06D5DFB1}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/sra-kar.vcxproj b/build/MSVC/2013/sra-kar.vcxproj
new file mode 100644
index 0000000..e739b24
--- /dev/null
+++ b/build/MSVC/2013/sra-kar.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\sra-kar.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{99FEB5EB-C150-4634-85AC-780082753D42}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/sra-pileup.vcxproj b/build/MSVC/2013/sra-pileup.vcxproj
new file mode 100644
index 0000000..c9303f8
--- /dev/null
+++ b/build/MSVC/2013/sra-pileup.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\sra-pileup.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{9112BE22-FE04-407B-8B3B-9D7C3731E39A}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/sra-stat.vcxproj b/build/MSVC/2013/sra-stat.vcxproj
new file mode 100644
index 0000000..5b03a1b
--- /dev/null
+++ b/build/MSVC/2013/sra-stat.vcxproj
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\sra-stat.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{88A9A91A-4BC3-47EA-8147-944FD4909C6D}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/sra-tools.sln b/build/MSVC/2013/sra-tools.sln
new file mode 100644
index 0000000..fc9de67
--- /dev/null
+++ b/build/MSVC/2013/sra-tools.sln
@@ -0,0 +1,507 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tk-version", "tk-version.vcxproj", "{08D430A6-B56A-42B6-8B32-E013F0A72DDF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rcexplain", "rcexplain.vcxproj", "{799ECD99-5336-4322-B845-279B7D4B8D71}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "md5cp", "md5cp.vcxproj", "{F14519B5-5698-4363-A734-229F2A01153D}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-sra", "test-sra.vcxproj", "{11C2E25B-2CD2-4826-A574-637AD10BAAC3}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-passwd", "vdb-passwd.vcxproj", "{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kar", "kar.vcxproj", "{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sra-kar", "sra-kar.vcxproj", "{99FEB5EB-C150-4634-85AC-780082753D42}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-dump", "vdb-dump.vcxproj", "{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fastq-dump", "fastq-dump.vcxproj", "{2182DDEE-BE67-48FB-89BA-9EF23717C128}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sff-dump", "sff-dump.vcxproj", "{11616A3B-9C1F-4760-AE77-755E06D5DFB1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "abi-dump", "abi-dump.vcxproj", "{9DF843FA-AA45-4EB1-BB76-84342AED550C}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fastq-dump-ngs", "fastq-dump-ngs.vcxproj", "{8DA91267-49B1-4696-AF9D-2A98B697167E}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kdbmeta", "kdbmeta.vcxproj", "{D2B898E3-DDBB-4704-A932-AED218DABE18}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-lock", "vdb-lock.vcxproj", "{4779D671-B464-4C6E-8875-CDA2081957F0}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-unlock", "vdb-unlock.vcxproj", "{452802EF-A059-4A4C-8106-ADF652ED1E1C}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "schema-replace", "schema-replace.vcxproj", "{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sra-pileup", "sra-pileup.vcxproj", "{9112BE22-FE04-407B-8B3B-9D7C3731E39A}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sam-dump", "sam-dump.vcxproj", "{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fastq-loader", "fastq-loader.vcxproj", "{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "srapath", "srapath.vcxproj", "{779C36A1-2592-469C-93A1-60C0B79BA529}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sra-stat", "sra-stat.vcxproj", "{88A9A91A-4BC3-47EA-8147-944FD4909C6D}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-copy", "vdb-copy.vcxproj", "{639D1E21-0C0C-4846-A71D-68DB7752833A}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "read-filter-redact", "read-filter-redact.vcxproj", "{B7C166D7-2B45-4E77-A608-DDBD0B588082}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-config", "vdb-config.vcxproj", "{7CAB9840-19BB-4B32-94BD-C29701FDBE88}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "align-info", "align-info.vcxproj", "{A54C75F9-A609-4BEC-91AB-23F5119B62AE}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "align-cache", "align-cache.vcxproj", "{3C8CB988-94DC-4B07-8865-B91FC52395F8}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ref-variation", "ref-variation.vcxproj", "{17513747-C074-4DA8-AA32-41D0C5FDC230}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "var-expand", "var-expand.vcxproj", "{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qual-recalib-stat", "qual-recalib-stat.vcxproj", "{4AF84403-70C6-4479-A701-D735E7003505}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "prefetch", "prefetch.vcxproj", "{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-decrypt", "vdb-decrypt.vcxproj", "{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-encrypt", "vdb-encrypt.vcxproj", "{03E85236-7CD9-4D6B-95FA-767935F8081D}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-validate", "vdb-validate.vcxproj", "{446C2DD3-36B3-4B27-8415-951F98346E99}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cache-mgr", "cache-mgr.vcxproj", "{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vcf-loader", "vcf-loader.vcxproj", "{DA226775-67B1-4354-A5CA-7F5406E0B1E7}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "illumina-dump", "illumina-dump.vcxproj", "{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdb-diff", "vdb-diff.vcxproj", "{B54A02A3-65A3-6E18-84CD-9003BED39F90}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "general-loader", "general-loader.vcxproj", "{11356540-C8F0-44B9-B6BA-01C87443A1CF}"
+	ProjectSection(ProjectDependencies) = postProject
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF} = {08D430A6-B56A-42B6-8B32-E013F0A72DDF}
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Debug|Win32.Build.0 = Debug|Win32
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Debug|x64.ActiveCfg = Debug|x64
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Debug|x64.Build.0 = Debug|x64
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Release|Win32.ActiveCfg = Release|Win32
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Release|Win32.Build.0 = Release|Win32
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Release|x64.ActiveCfg = Release|x64
+		{08D430A6-B56A-42B6-8B32-E013F0A72DDF}.Release|x64.Build.0 = Release|x64
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Debug|Win32.ActiveCfg = Debug|Win32
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Debug|Win32.Build.0 = Debug|Win32
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Debug|x64.ActiveCfg = Debug|x64
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Debug|x64.Build.0 = Debug|x64
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Release|Win32.ActiveCfg = Release|Win32
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Release|Win32.Build.0 = Release|Win32
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Release|x64.ActiveCfg = Release|x64
+		{799ECD99-5336-4322-B845-279B7D4B8D71}.Release|x64.Build.0 = Release|x64
+		{F14519B5-5698-4363-A734-229F2A01153D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F14519B5-5698-4363-A734-229F2A01153D}.Debug|Win32.Build.0 = Debug|Win32
+		{F14519B5-5698-4363-A734-229F2A01153D}.Debug|x64.ActiveCfg = Debug|x64
+		{F14519B5-5698-4363-A734-229F2A01153D}.Debug|x64.Build.0 = Debug|x64
+		{F14519B5-5698-4363-A734-229F2A01153D}.Release|Win32.ActiveCfg = Release|Win32
+		{F14519B5-5698-4363-A734-229F2A01153D}.Release|Win32.Build.0 = Release|Win32
+		{F14519B5-5698-4363-A734-229F2A01153D}.Release|x64.ActiveCfg = Release|x64
+		{F14519B5-5698-4363-A734-229F2A01153D}.Release|x64.Build.0 = Release|x64
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Debug|Win32.ActiveCfg = Debug|Win32
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Debug|Win32.Build.0 = Debug|Win32
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Debug|x64.ActiveCfg = Debug|x64
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Debug|x64.Build.0 = Debug|x64
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Release|Win32.ActiveCfg = Release|Win32
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Release|Win32.Build.0 = Release|Win32
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Release|x64.ActiveCfg = Release|x64
+		{11C2E25B-2CD2-4826-A574-637AD10BAAC3}.Release|x64.Build.0 = Release|x64
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Debug|Win32.ActiveCfg = Debug|Win32
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Debug|Win32.Build.0 = Debug|Win32
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Debug|x64.ActiveCfg = Debug|x64
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Debug|x64.Build.0 = Debug|x64
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Release|Win32.ActiveCfg = Release|Win32
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Release|Win32.Build.0 = Release|Win32
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Release|x64.ActiveCfg = Release|x64
+		{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}.Release|x64.Build.0 = Release|x64
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Debug|Win32.Build.0 = Debug|Win32
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Debug|x64.ActiveCfg = Debug|x64
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Debug|x64.Build.0 = Debug|x64
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Release|Win32.ActiveCfg = Release|Win32
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Release|Win32.Build.0 = Release|Win32
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Release|x64.ActiveCfg = Release|x64
+		{E832EEE9-7EC4-4CC0-A0B4-FE65404D012D}.Release|x64.Build.0 = Release|x64
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Debug|Win32.ActiveCfg = Debug|Win32
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Debug|Win32.Build.0 = Debug|Win32
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Debug|x64.ActiveCfg = Debug|x64
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Debug|x64.Build.0 = Debug|x64
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Release|Win32.ActiveCfg = Release|Win32
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Release|Win32.Build.0 = Release|Win32
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Release|x64.ActiveCfg = Release|x64
+		{99FEB5EB-C150-4634-85AC-780082753D42}.Release|x64.Build.0 = Release|x64
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Debug|Win32.ActiveCfg = Debug|Win32
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Debug|Win32.Build.0 = Debug|Win32
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Debug|x64.ActiveCfg = Debug|x64
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Debug|x64.Build.0 = Debug|x64
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Release|Win32.ActiveCfg = Release|Win32
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Release|Win32.Build.0 = Release|Win32
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Release|x64.ActiveCfg = Release|x64
+		{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}.Release|x64.Build.0 = Release|x64
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Debug|Win32.ActiveCfg = Debug|Win32
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Debug|Win32.Build.0 = Debug|Win32
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Debug|x64.ActiveCfg = Debug|x64
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Debug|x64.Build.0 = Debug|x64
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Release|Win32.ActiveCfg = Release|Win32
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Release|Win32.Build.0 = Release|Win32
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Release|x64.ActiveCfg = Release|x64
+		{2182DDEE-BE67-48FB-89BA-9EF23717C128}.Release|x64.Build.0 = Release|x64
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Debug|Win32.ActiveCfg = Debug|Win32
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Debug|Win32.Build.0 = Debug|Win32
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Debug|x64.ActiveCfg = Debug|x64
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Debug|x64.Build.0 = Debug|x64
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Release|Win32.ActiveCfg = Release|Win32
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Release|Win32.Build.0 = Release|Win32
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Release|x64.ActiveCfg = Release|x64
+		{11616A3B-9C1F-4760-AE77-755E06D5DFB1}.Release|x64.Build.0 = Release|x64
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Debug|Win32.Build.0 = Debug|Win32
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Debug|x64.ActiveCfg = Debug|x64
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Debug|x64.Build.0 = Debug|x64
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Release|Win32.ActiveCfg = Release|Win32
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Release|Win32.Build.0 = Release|Win32
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Release|x64.ActiveCfg = Release|x64
+		{9DF843FA-AA45-4EB1-BB76-84342AED550C}.Release|x64.Build.0 = Release|x64
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Debug|Win32.Build.0 = Debug|Win32
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Debug|x64.ActiveCfg = Debug|x64
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Debug|x64.Build.0 = Debug|x64
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Release|Win32.ActiveCfg = Release|Win32
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Release|Win32.Build.0 = Release|Win32
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Release|x64.ActiveCfg = Release|x64
+		{8DA91267-49B1-4696-AF9D-2A98B697167E}.Release|x64.Build.0 = Release|x64
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Debug|Win32.Build.0 = Debug|Win32
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Debug|x64.ActiveCfg = Debug|x64
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Debug|x64.Build.0 = Debug|x64
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Release|Win32.ActiveCfg = Release|Win32
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Release|Win32.Build.0 = Release|Win32
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Release|x64.ActiveCfg = Release|x64
+		{D2B898E3-DDBB-4704-A932-AED218DABE18}.Release|x64.Build.0 = Release|x64
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Debug|Win32.Build.0 = Debug|Win32
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Debug|x64.ActiveCfg = Debug|x64
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Debug|x64.Build.0 = Debug|x64
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Release|Win32.ActiveCfg = Release|Win32
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Release|Win32.Build.0 = Release|Win32
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Release|x64.ActiveCfg = Release|x64
+		{4779D671-B464-4C6E-8875-CDA2081957F0}.Release|x64.Build.0 = Release|x64
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Debug|Win32.ActiveCfg = Debug|Win32
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Debug|Win32.Build.0 = Debug|Win32
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Debug|x64.ActiveCfg = Debug|x64
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Debug|x64.Build.0 = Debug|x64
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Release|Win32.ActiveCfg = Release|Win32
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Release|Win32.Build.0 = Release|Win32
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Release|x64.ActiveCfg = Release|x64
+		{452802EF-A059-4A4C-8106-ADF652ED1E1C}.Release|x64.Build.0 = Release|x64
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Debug|Win32.ActiveCfg = Debug|Win32
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Debug|Win32.Build.0 = Debug|Win32
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Debug|x64.ActiveCfg = Debug|x64
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Debug|x64.Build.0 = Debug|x64
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Release|Win32.ActiveCfg = Release|Win32
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Release|Win32.Build.0 = Release|Win32
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Release|x64.ActiveCfg = Release|x64
+		{75A32DEA-9C0C-40CE-AE8C-CA58BAD4ADFD}.Release|x64.Build.0 = Release|x64
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Debug|Win32.Build.0 = Debug|Win32
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Debug|x64.ActiveCfg = Debug|x64
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Debug|x64.Build.0 = Debug|x64
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Release|Win32.ActiveCfg = Release|Win32
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Release|Win32.Build.0 = Release|Win32
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Release|x64.ActiveCfg = Release|x64
+		{9112BE22-FE04-407B-8B3B-9D7C3731E39A}.Release|x64.Build.0 = Release|x64
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Debug|Win32.Build.0 = Debug|Win32
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Debug|x64.ActiveCfg = Debug|x64
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Debug|x64.Build.0 = Debug|x64
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Release|Win32.ActiveCfg = Release|Win32
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Release|Win32.Build.0 = Release|Win32
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Release|x64.ActiveCfg = Release|x64
+		{E7FAF31B-CA59-4E70-979F-E869EB45ABA0}.Release|x64.Build.0 = Release|x64
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Debug|Win32.Build.0 = Debug|Win32
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Debug|x64.ActiveCfg = Debug|x64
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Debug|x64.Build.0 = Debug|x64
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Release|Win32.ActiveCfg = Release|Win32
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Release|Win32.Build.0 = Release|Win32
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Release|x64.ActiveCfg = Release|x64
+		{D5EDA47B-AD5A-4C2A-BDBB-EA29C61749E4}.Release|x64.Build.0 = Release|x64
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Debug|Win32.ActiveCfg = Debug|Win32
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Debug|Win32.Build.0 = Debug|Win32
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Debug|x64.ActiveCfg = Debug|x64
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Debug|x64.Build.0 = Debug|x64
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Release|Win32.ActiveCfg = Release|Win32
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Release|Win32.Build.0 = Release|Win32
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Release|x64.ActiveCfg = Release|x64
+		{779C36A1-2592-469C-93A1-60C0B79BA529}.Release|x64.Build.0 = Release|x64
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Debug|Win32.Build.0 = Debug|Win32
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Debug|x64.ActiveCfg = Debug|x64
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Debug|x64.Build.0 = Debug|x64
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Release|Win32.ActiveCfg = Release|Win32
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Release|Win32.Build.0 = Release|Win32
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Release|x64.ActiveCfg = Release|x64
+		{88A9A91A-4BC3-47EA-8147-944FD4909C6D}.Release|x64.Build.0 = Release|x64
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Debug|Win32.Build.0 = Debug|Win32
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Debug|x64.ActiveCfg = Debug|x64
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Debug|x64.Build.0 = Debug|x64
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Release|Win32.ActiveCfg = Release|Win32
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Release|Win32.Build.0 = Release|Win32
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Release|x64.ActiveCfg = Release|x64
+		{639D1E21-0C0C-4846-A71D-68DB7752833A}.Release|x64.Build.0 = Release|x64
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Debug|Win32.Build.0 = Debug|Win32
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Debug|x64.ActiveCfg = Debug|x64
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Debug|x64.Build.0 = Debug|x64
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Release|Win32.ActiveCfg = Release|Win32
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Release|Win32.Build.0 = Release|Win32
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Release|x64.ActiveCfg = Release|x64
+		{B7C166D7-2B45-4E77-A608-DDBD0B588082}.Release|x64.Build.0 = Release|x64
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Debug|Win32.ActiveCfg = Debug|Win32
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Debug|Win32.Build.0 = Debug|Win32
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Debug|x64.ActiveCfg = Debug|x64
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Debug|x64.Build.0 = Debug|x64
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Release|Win32.ActiveCfg = Release|Win32
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Release|Win32.Build.0 = Release|Win32
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Release|x64.ActiveCfg = Release|x64
+		{7CAB9840-19BB-4B32-94BD-C29701FDBE88}.Release|x64.Build.0 = Release|x64
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Debug|Win32.ActiveCfg = Debug|Win32
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Debug|Win32.Build.0 = Debug|Win32
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Debug|x64.ActiveCfg = Debug|x64
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Debug|x64.Build.0 = Debug|x64
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Release|Win32.ActiveCfg = Release|Win32
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Release|Win32.Build.0 = Release|Win32
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Release|x64.ActiveCfg = Release|x64
+		{A54C75F9-A609-4BEC-91AB-23F5119B62AE}.Release|x64.Build.0 = Release|x64
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Debug|Win32.ActiveCfg = Debug|Win32
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Debug|Win32.Build.0 = Debug|Win32
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Debug|x64.ActiveCfg = Debug|x64
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Debug|x64.Build.0 = Debug|x64
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Release|Win32.ActiveCfg = Release|Win32
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Release|Win32.Build.0 = Release|Win32
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Release|x64.ActiveCfg = Release|x64
+		{3C8CB988-94DC-4B07-8865-B91FC52395F8}.Release|x64.Build.0 = Release|x64
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Debug|Win32.ActiveCfg = Debug|Win32
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Debug|Win32.Build.0 = Debug|Win32
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Debug|x64.ActiveCfg = Debug|x64
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Debug|x64.Build.0 = Debug|x64
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Release|Win32.ActiveCfg = Release|Win32
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Release|Win32.Build.0 = Release|Win32
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Release|x64.ActiveCfg = Release|x64
+		{17513747-C074-4DA8-AA32-41D0C5FDC230}.Release|x64.Build.0 = Release|x64
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Debug|Win32.Build.0 = Debug|Win32
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Debug|x64.ActiveCfg = Debug|x64
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Debug|x64.Build.0 = Debug|x64
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Release|Win32.ActiveCfg = Release|Win32
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Release|Win32.Build.0 = Release|Win32
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Release|x64.ActiveCfg = Release|x64
+		{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}.Release|x64.Build.0 = Release|x64
+		{4AF84403-70C6-4479-A701-D735E7003505}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4AF84403-70C6-4479-A701-D735E7003505}.Debug|Win32.Build.0 = Debug|Win32
+		{4AF84403-70C6-4479-A701-D735E7003505}.Debug|x64.ActiveCfg = Debug|x64
+		{4AF84403-70C6-4479-A701-D735E7003505}.Debug|x64.Build.0 = Debug|x64
+		{4AF84403-70C6-4479-A701-D735E7003505}.Release|Win32.ActiveCfg = Release|Win32
+		{4AF84403-70C6-4479-A701-D735E7003505}.Release|Win32.Build.0 = Release|Win32
+		{4AF84403-70C6-4479-A701-D735E7003505}.Release|x64.ActiveCfg = Release|x64
+		{4AF84403-70C6-4479-A701-D735E7003505}.Release|x64.Build.0 = Release|x64
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Debug|Win32.ActiveCfg = Debug|Win32
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Debug|Win32.Build.0 = Debug|Win32
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Debug|x64.ActiveCfg = Debug|x64
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Debug|x64.Build.0 = Debug|x64
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Release|Win32.ActiveCfg = Release|Win32
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Release|Win32.Build.0 = Release|Win32
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Release|x64.ActiveCfg = Release|x64
+		{2CF4BF04-4C4D-442E-A7AD-0AE5EF87C733}.Release|x64.Build.0 = Release|x64
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Debug|Win32.Build.0 = Debug|Win32
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Debug|x64.ActiveCfg = Debug|x64
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Debug|x64.Build.0 = Debug|x64
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Release|Win32.ActiveCfg = Release|Win32
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Release|Win32.Build.0 = Release|Win32
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Release|x64.ActiveCfg = Release|x64
+		{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}.Release|x64.Build.0 = Release|x64
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Debug|Win32.Build.0 = Debug|Win32
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Debug|x64.ActiveCfg = Debug|x64
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Debug|x64.Build.0 = Debug|x64
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Release|Win32.ActiveCfg = Release|Win32
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Release|Win32.Build.0 = Release|Win32
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Release|x64.ActiveCfg = Release|x64
+		{03E85236-7CD9-4D6B-95FA-767935F8081D}.Release|x64.Build.0 = Release|x64
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Debug|Win32.ActiveCfg = Debug|Win32
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Debug|Win32.Build.0 = Debug|Win32
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Debug|x64.ActiveCfg = Debug|x64
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Debug|x64.Build.0 = Debug|x64
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Release|Win32.ActiveCfg = Release|Win32
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Release|Win32.Build.0 = Release|Win32
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Release|x64.ActiveCfg = Release|x64
+		{446C2DD3-36B3-4B27-8415-951F98346E99}.Release|x64.Build.0 = Release|x64
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Debug|Win32.Build.0 = Debug|Win32
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Debug|x64.ActiveCfg = Debug|x64
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Debug|x64.Build.0 = Debug|x64
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Release|Win32.ActiveCfg = Release|Win32
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Release|Win32.Build.0 = Release|Win32
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Release|x64.ActiveCfg = Release|x64
+		{9BFEB5F1-0101-48A6-82CD-CF5744E1EDF3}.Release|x64.Build.0 = Release|x64
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Debug|Win32.ActiveCfg = Debug|Win32
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Debug|Win32.Build.0 = Debug|Win32
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Debug|x64.ActiveCfg = Debug|x64
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Debug|x64.Build.0 = Debug|x64
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Release|Win32.ActiveCfg = Release|Win32
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Release|Win32.Build.0 = Release|Win32
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Release|x64.ActiveCfg = Release|x64
+		{DA226775-67B1-4354-A5CA-7F5406E0B1E7}.Release|x64.Build.0 = Release|x64
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Debug|Win32.ActiveCfg = Debug|Win32
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Debug|Win32.Build.0 = Debug|Win32
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Debug|x64.ActiveCfg = Debug|x64
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Debug|x64.Build.0 = Debug|x64
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Release|Win32.ActiveCfg = Release|Win32
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Release|Win32.Build.0 = Release|Win32
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Release|x64.ActiveCfg = Release|x64
+		{0D7E1861-6A3C-4CF3-B603-39BF841C3C82}.Release|x64.Build.0 = Release|x64
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Debug|Win32.Build.0 = Debug|Win32
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Debug|x64.ActiveCfg = Debug|x64
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Debug|x64.Build.0 = Debug|x64
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Release|Win32.ActiveCfg = Release|Win32
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Release|Win32.Build.0 = Release|Win32
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Release|x64.ActiveCfg = Release|x64
+		{B54A02A3-65A3-6E18-84CD-9003BED39F90}.Release|x64.Build.0 = Release|x64
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Debug|Win32.Build.0 = Debug|Win32
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Debug|x64.ActiveCfg = Debug|x64
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Debug|x64.Build.0 = Debug|x64
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Release|Win32.ActiveCfg = Release|Win32
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Release|Win32.Build.0 = Release|Win32
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Release|x64.ActiveCfg = Release|x64
+		{11356540-C8F0-44B9-B6BA-01C87443A1CF}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/build/MSVC/2013/srapath.vcxproj b/build/MSVC/2013/srapath.vcxproj
new file mode 100644
index 0000000..6ea904b
--- /dev/null
+++ b/build/MSVC/2013/srapath.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Import Project="..\srapath.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{779C36A1-2592-469C-93A1-60C0B79BA529}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/test-align-info.vcxproj b/build/MSVC/2013/test-align-info.vcxproj
new file mode 100644
index 0000000..dbe57fa
--- /dev/null
+++ b/build/MSVC/2013/test-align-info.vcxproj
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+    <PropertyGroup Label="Globals">
+        <ProjectGuid>{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}</ProjectGuid>
+    </PropertyGroup>
+    <Import Project=".\test-project.props" />
+    <Target Name="AfterBuild" Condition="'$(Autorun)'=='true'">
+        <Exec Command="$(SRATOOLS_TARGET)\bin\align-info.exe -h" WorkingDirectory="$(ProjectDir)"/>
+    </Target>
+</Project>
diff --git a/build/MSVC/2013/test-fastq-loader.vcxproj b/build/MSVC/2013/test-fastq-loader.vcxproj
new file mode 100644
index 0000000..93d0004
--- /dev/null
+++ b/build/MSVC/2013/test-fastq-loader.vcxproj
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\test-project.props" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}</ProjectGuid>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\loader.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="..\test-fastq-loader.files" />
+  <Target Name="AfterBuild" Condition="'$(Autorun)'=='true'">
+    <Exec Command="$(OutDir)$(TargetName)$(TargetExt)" WorkingDirectory="$(ProjectDir)" />
+  </Target>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/test-general-loader.vcxproj b/build/MSVC/2013/test-general-loader.vcxproj
new file mode 100644
index 0000000..8f08c75
--- /dev/null
+++ b/build/MSVC/2013/test-general-loader.vcxproj
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\test-project.props" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{9979DBC5-E171-1EAD-2336-E829EEECA0C3}</ProjectGuid>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <PreprocessorDefinitions>LOCAL_SCHEMA=$(VDB_ROOT.Replace('\','\\'))interfaces</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="..\test-general-loader.files" />
+  <Target Name="AfterBuild" Condition="'$(Autorun)'=='true'">
+    <MakeDir Directories="..\..\..\test\general-loader\db" />
+    <Exec Command="$(OutDir)$(TargetName)$(TargetExt)" WorkingDirectory="..\..\..\test\general-loader\" />
+  </Target>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/test-project.props b/build/MSVC/2013/test-project.props
new file mode 100644
index 0000000..87b21e0
--- /dev/null
+++ b/build/MSVC/2013/test-project.props
@@ -0,0 +1,15 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">  
+
+  <Import Project="exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ktst.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  
+  <Target Name="Runtests" DependsOnTargets="Build" >
+    <Exec Command="$(OutDir)$(TargetName)$(TargetExt)" />
+  </Target>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/test-sra-tools.sln b/build/MSVC/2013/test-sra-tools.sln
new file mode 100644
index 0000000..bedc70c
--- /dev/null
+++ b/build/MSVC/2013/test-sra-tools.sln
@@ -0,0 +1,66 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wb-test-fastq", "wb-test-fastq.vcxproj", "{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-fastq-loader", "test-fastq-loader.vcxproj", "{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-vcf-loader", "test-vcf-loader.vcxproj", "{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-general-loader", "test-general-loader.vcxproj", "{9979DBC5-E171-1EAD-2336-E829EEECA0C3}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-align-info", "test-align-info.vcxproj", "{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Debug|Win32.Build.0 = Debug|Win32
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Debug|x64.ActiveCfg = Debug|x64
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Debug|x64.Build.0 = Debug|x64
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Release|Win32.ActiveCfg = Release|Win32
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Release|Win32.Build.0 = Release|Win32
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Release|x64.ActiveCfg = Release|x64
+		{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}.Release|x64.Build.0 = Release|x64
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Debug|Win32.ActiveCfg = Debug|Win32
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Debug|Win32.Build.0 = Debug|Win32
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Debug|x64.ActiveCfg = Debug|x64
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Debug|x64.Build.0 = Debug|x64
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Release|Win32.ActiveCfg = Release|Win32
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Release|Win32.Build.0 = Release|Win32
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Release|x64.ActiveCfg = Release|x64
+		{5EC37D25-B517-4F00-A759-DAC7BB6D62A5}.Release|x64.Build.0 = Release|x64
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Debug|Win32.ActiveCfg = Debug|Win32
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Debug|Win32.Build.0 = Debug|Win32
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Debug|x64.ActiveCfg = Debug|x64
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Debug|x64.Build.0 = Debug|x64
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Release|Win32.ActiveCfg = Release|Win32
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Release|Win32.Build.0 = Release|Win32
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Release|x64.ActiveCfg = Release|x64
+		{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}.Release|x64.Build.0 = Release|x64
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Debug|Win32.Build.0 = Debug|Win32
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Debug|x64.ActiveCfg = Debug|x64
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Debug|x64.Build.0 = Debug|x64
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Release|Win32.ActiveCfg = Release|Win32
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Release|Win32.Build.0 = Release|Win32
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Release|x64.ActiveCfg = Release|x64
+		{9979DBC5-E171-1EAD-2336-E829EEECA0C3}.Release|x64.Build.0 = Release|x64
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Debug|Win32.ActiveCfg = Debug|Win32
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Debug|Win32.Build.0 = Debug|Win32
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Debug|x64.ActiveCfg = Debug|x64
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Debug|x64.Build.0 = Debug|x64
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Release|Win32.ActiveCfg = Release|Win32
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Release|Win32.Build.0 = Release|Win32
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Release|x64.ActiveCfg = Release|x64
+		{72BD3AEE-0CE1-D9EC-C75A-4DCD5ED3184F}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/build/MSVC/2013/test-sra.vcxproj b/build/MSVC/2013/test-sra.vcxproj
new file mode 100644
index 0000000..43c59aa
--- /dev/null
+++ b/build/MSVC/2013/test-sra.vcxproj
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\test-sra.files" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{11C2E25B-2CD2-4826-A574-637AD10BAAC3}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/test-vcf-loader.vcxproj b/build/MSVC/2013/test-vcf-loader.vcxproj
new file mode 100644
index 0000000..ffc9a12
--- /dev/null
+++ b/build/MSVC/2013/test-vcf-loader.vcxproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\test-project.props" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{1FFE966A-6DFA-9E14-2542-7C693F1B9BCC}</ProjectGuid>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\loader.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(SRATOOLS_TARGET)lib\vcf-loader.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="..\test-vcf-loader.files" />
+  <Target Name="AfterBuild" Condition="'$(Autorun)'=='true'">
+    <Exec Command="$(OutDir)$(TargetName)$(TargetExt)" WorkingDirectory="$(ProjectDir)" />
+  </Target>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/tk-version.vcxproj b/build/MSVC/2013/tk-version.vcxproj
new file mode 100644
index 0000000..6fcbb9c
--- /dev/null
+++ b/build/MSVC/2013/tk-version.vcxproj
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  
+  <Import Project=".\lib-project.props" />  
+  
+  <Import Project="..\tk-version.files" />  
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{08D430A6-B56A-42B6-8B32-E013F0A72DDF}</ProjectGuid>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+  </PropertyGroup>
+
+</Project>
diff --git a/build/MSVC/2013/var-expand.vcxproj b/build/MSVC/2013/var-expand.vcxproj
new file mode 100644
index 0000000..7190f37
--- /dev/null
+++ b/build/MSVC/2013/var-expand.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ngs-c++.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(NGS_TARGET)lib\libngs-bind-c++.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(NGS_TARGET)lib\libngs-disp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="..\var-expand.files" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{4F3ECB20-03D7-4DD0-B993-9AB6A8142A06}</ProjectGuid>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/vcf-loader.vcxproj b/build/MSVC/2013/vcf-loader.vcxproj
new file mode 100644
index 0000000..bebe38d
--- /dev/null
+++ b/build/MSVC/2013/vcf-loader.vcxproj
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\lib-project.props" />
+  
+  <Import Project="..\vcf-loader.files" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{DA226775-67B1-4354-A5CA-7F5406E0B1E7}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/vdb-common.props b/build/MSVC/2013/vdb-common.props
new file mode 100644
index 0000000..51f404e
--- /dev/null
+++ b/build/MSVC/2013/vdb-common.props
@@ -0,0 +1,115 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+    <ItemGroup Label="ProjectConfigurations">
+        <ProjectConfiguration Include="Debug|Win32">
+            <Configuration>Debug</Configuration>
+            <Platform>Win32</Platform>
+        </ProjectConfiguration>
+        <ProjectConfiguration Include="Debug|x64">
+            <Configuration>Debug</Configuration>
+            <Platform>x64</Platform>
+        </ProjectConfiguration>
+        <ProjectConfiguration Include="Release|Win32">
+            <Configuration>Release</Configuration>
+            <Platform>Win32</Platform>
+        </ProjectConfiguration>
+        <ProjectConfiguration Include="Release|x64">
+            <Configuration>Release</Configuration>
+            <Platform>x64</Platform>
+        </ProjectConfiguration>
+    </ItemGroup>
+
+    
+    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+
+    <PropertyGroup Label="Configuration">
+        <PlatformToolset>v120</PlatformToolset>
+    </PropertyGroup>
+
+    <PropertyGroup Label="Globals">
+        <Platform Condition="'$(Platform)' == ''">x64</Platform>
+        <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
+    
+        <NGS_ROOT Condition="'$(NGS_ROOT)' == ''">$(ProjectDir)..\..\..\..\ngs\ngs-sdk\</NGS_ROOT>
+        <NGS_OUTDIR Condition="'$(NGS_OUTDIR)' == ''">$(NGS_ROOT)..\..\OUTDIR\</NGS_OUTDIR>
+        <NGS_TARGET Condition="'$(NGS_TARGET)' == ''">$(NGS_OUTDIR)ngs-sdk\win\$(PlatformToolset)\$(Platform)\$(Configuration)\</NGS_TARGET>
+
+        <VDB_OUTDIR Condition="'$(VDB_OUTDIR)' == ''">$(NGS_OUTDIR)</VDB_OUTDIR>
+        <VDB_ROOT Condition="'$(VDB_ROOT)' == ''">$(ProjectDir)..\..\..\..\ncbi-vdb\</VDB_ROOT>
+        <VDB_TARGET Condition="'$(VDB_TARGET)' == ''">$(VDB_OUTDIR)ncbi-vdb\win\$(PlatformToolset)\$(Platform)\$(Configuration)\</VDB_TARGET>
+
+        <SRA_OUTDIR Condition="'$(SRA_OUTDIR)' == ''">$(VDB_OUTDIR)</SRA_OUTDIR>
+        <SRATOOLS_TARGET Condition="'$(SRATOOLS_TARGET)' == ''">$(SRA_OUTDIR)sra-tools\win\$(PlatformToolset)\$(Platform)\$(Configuration)\</SRATOOLS_TARGET>
+    </PropertyGroup>
+  
+    <PropertyGroup Label="Configuration">
+        <CharacterSet>Unicode</CharacterSet>
+        <IntDir>$(SRATOOLS_TARGET)\obj\$(ProjectName)\</IntDir>
+        <LinkIncremental>false</LinkIncremental>
+        <WholeProgramOptimization>false</WholeProgramOptimization>
+    </PropertyGroup>
+  
+    <PropertyGroup Label="Configuration" Condition="'$(TargetName)'==''" >
+        <TargetName>$(ProjectName)</TargetName>
+    </PropertyGroup>
+    
+    <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
+        <UseDebugLibraries>true</UseDebugLibraries>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
+        <UseDebugLibraries>false</UseDebugLibraries>
+    </PropertyGroup>
+    
+    <ItemDefinitionGroup>
+        <ClCompile>
+            <WarningLevel>Level3</WarningLevel>
+            <CompileAsManaged>false</CompileAsManaged>
+            <MinimalRebuild>true</MinimalRebuild>
+            <DisableLanguageExtensions>false</DisableLanguageExtensions>
+            <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+            <DisableSpecificWarnings>4996;4101</DisableSpecificWarnings>
+            <StringPooling>true</StringPooling>
+
+            <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+            <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/os/win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+            <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/cc/vc++;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+            <AdditionalIncludeDirectories>$(VDB_ROOT)interfaces/ext;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+            
+            <AdditionalIncludeDirectories>$(NGS_ROOT);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+
+            <PreprocessorDefinitions>_WIN32_WINNT=0x0502;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+            <PreprocessorDefinitions>WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+            <PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+            <PreprocessorDefinitions>__mod_name__=$(ProjectName);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+            <PreprocessorDefinitions>__file_name__=%(Filename);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+            <PreprocessorDefinitions>__file_ext__=c;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      
+        </ClCompile>
+    </ItemDefinitionGroup>
+
+    <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
+        <ClCompile>
+            <Optimization>Disabled</Optimization>
+            <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+            <PreprocessorDefinitions>_DEBUGGING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+        </ClCompile>
+        <Link>
+            <GenerateDebugInformation>true</GenerateDebugInformation>
+        </Link>
+    </ItemDefinitionGroup>
+    <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
+        <ClCompile>
+            <Optimization>MaxSpeed</Optimization>
+            <FunctionLevelLinking>true</FunctionLevelLinking>
+            <IntrinsicFunctions>true</IntrinsicFunctions>
+            <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+            <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+        </ClCompile>
+        <Link>
+            <GenerateDebugInformation>false</GenerateDebugInformation>
+            <EnableCOMDATFolding>true</EnableCOMDATFolding>
+            <OptimizeReferences>true</OptimizeReferences>
+        </Link>
+    </ItemDefinitionGroup>
+    
+</Project>
diff --git a/build/MSVC/2013/vdb-config.vcxproj b/build/MSVC/2013/vdb-config.vcxproj
new file mode 100644
index 0000000..e1c5e64
--- /dev/null
+++ b/build/MSVC/2013/vdb-config.vcxproj
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\tui.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\tui_cpp.lib;%(AdditionalDependencies)</AdditionalDependencies>	  	  
+      <EntryPointSymbol>wmainCRTStartupNoPathConversion</EntryPointSymbol>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\vdb-config.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{7CAB9840-19BB-4B32-94BD-C29701FDBE88}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
diff --git a/build/MSVC/2013/vdb-copy.vcxproj b/build/MSVC/2013/vdb-copy.vcxproj
new file mode 100644
index 0000000..e50b7b5
--- /dev/null
+++ b/build/MSVC/2013/vdb-copy.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\vdb-copy.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{639D1E21-0C0C-4846-A71D-68DB7752833A}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/vdb-decrypt.vcxproj b/build/MSVC/2013/vdb-decrypt.vcxproj
new file mode 100644
index 0000000..5bc59b5
--- /dev/null
+++ b/build/MSVC/2013/vdb-decrypt.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>    
+  
+  <Import Project="..\vdb-decrypt.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{E4824F7B-4698-4F9B-85B1-AEFD6A81F957}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/vdb-diff.vcxproj b/build/MSVC/2013/vdb-diff.vcxproj
new file mode 100644
index 0000000..be56ae0
--- /dev/null
+++ b/build/MSVC/2013/vdb-diff.vcxproj
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\bz2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="..\vdb-diff.files" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{B54A02A3-65A3-6E18-84CD-9003BED39F90}</ProjectGuid>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/vdb-dump.vcxproj b/build/MSVC/2013/vdb-dump.vcxproj
new file mode 100644
index 0000000..f0c42f9
--- /dev/null
+++ b/build/MSVC/2013/vdb-dump.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\vdb-dump.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{5E85344A-92C9-4407-8A76-1EF0C8AB0D60}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/vdb-encrypt.vcxproj b/build/MSVC/2013/vdb-encrypt.vcxproj
new file mode 100644
index 0000000..d6d1d69
--- /dev/null
+++ b/build/MSVC/2013/vdb-encrypt.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>    
+  
+  <Import Project="..\vdb-encrypt.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{03E85236-7CD9-4D6B-95FA-767935F8081D}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/vdb-lock.vcxproj b/build/MSVC/2013/vdb-lock.vcxproj
new file mode 100644
index 0000000..9df06b0
--- /dev/null
+++ b/build/MSVC/2013/vdb-lock.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>    
+  
+  <Import Project="..\vdb-lock.files" />
+
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{4779D671-B464-4C6E-8875-CDA2081957F0}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/vdb-passwd.vcxproj b/build/MSVC/2013/vdb-passwd.vcxproj
new file mode 100644
index 0000000..7940141
--- /dev/null
+++ b/build/MSVC/2013/vdb-passwd.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\vdb-passwd.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{ABA40306-1ACE-4E66-B7A9-74F14C47BDC7}</ProjectGuid>
+  </PropertyGroup>
+    
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/vdb-unlock.vcxproj b/build/MSVC/2013/vdb-unlock.vcxproj
new file mode 100644
index 0000000..bc9ffd7
--- /dev/null
+++ b/build/MSVC/2013/vdb-unlock.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\vdb-unlock.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{452802EF-A059-4A4C-8106-ADF652ED1E1C}</ProjectGuid>
+  </PropertyGroup>
+  
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/vdb-validate.vcxproj b/build/MSVC/2013/vdb-validate.vcxproj
new file mode 100644
index 0000000..9bc51ca
--- /dev/null
+++ b/build/MSVC/2013/vdb-validate.vcxproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\exe-project.props" />
+  
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-vdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>  
+  
+  <Import Project="..\vdb-validate.files" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{446C2DD3-36B3-4B27-8415-951F98346E99}</ProjectGuid>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/2013/wb-test-fastq.vcxproj b/build/MSVC/2013/wb-test-fastq.vcxproj
new file mode 100644
index 0000000..ecec42b
--- /dev/null
+++ b/build/MSVC/2013/wb-test-fastq.vcxproj
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project=".\test-project.props" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{1B17BDD6-7AF4-B010-E4FF-FE3C02B52D6D}</ProjectGuid>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>$(VDB_TARGET)lib\ncbi-wvdb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\loader.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>$(VDB_TARGET)lib\load.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="..\wb-test-fastq.files" />
+  <Target Name="AfterBuild" Condition="'$(Autorun)'=='true'">
+    <Exec Command="$(OutDir)$(TargetName)$(TargetExt)" WorkingDirectory="$(ProjectDir)" />
+  </Target>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/abi-dump.files b/build/MSVC/abi-dump.files
new file mode 100644
index 0000000..09fef66
--- /dev/null
+++ b/build/MSVC/abi-dump.files
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\sra-dump\abi.c" />
+    <ClCompile Include="..\..\..\tools\sra-dump\core.c" />
+    <ClCompile Include="..\..\..\tools\sra-dump\factory.c" />
+    <ClCompile Include="..\..\..\tools\sra-dump\fasta_dump.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/align-cache.files b/build/MSVC/align-cache.files
new file mode 100644
index 0000000..a48d190
--- /dev/null
+++ b/build/MSVC/align-cache.files
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\align-cache\align-cache.cpp" />
+    <ClCompile Include="..\..\..\tools\align-cache\helper.cpp" />
+    <ClInclude Include="..\..\..\tools\align-cache\helper.h" />
+  </ItemGroup>
+</Project>
diff --git a/build/MSVC/align-info.files b/build/MSVC/align-info.files
new file mode 100644
index 0000000..ef50497
--- /dev/null
+++ b/build/MSVC/align-info.files
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\align-info\align-info.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/build.xml b/build/MSVC/build.xml
new file mode 100644
index 0000000..ae4ad9a
--- /dev/null
+++ b/build/MSVC/build.xml
@@ -0,0 +1,69 @@
+<project name="SRA-TOOLS" default="runtests" basedir=".">
+
+    <description>
+        Ant script for NCBI-VDB
+    </description>
+	
+    <property environment="env"/>
+    <property name="Platform"       value="x64" />
+    <property name="Configuration"  value="Debug" />
+    <property name="Output"         value="${basedir}\..\..\..\OUTDIR" />
+    <property name="MSVS"           value="2013" />
+	
+    <target name="help">
+  		<echo message="">
+Apache Ant script for automated testing of SRA-TOOLS on Windonws
+
+Usage (in the directory of this file, build.xml):
+  ant [options] target1 target2 ... 
+  
+Example:
+  ant -DConfiguration=Debug -Platform=Win32 help std
+  
+Supported targets:
+	help - print this text and exit
+    clean       - remove all build artefacts
+    build       - regular build
+    runtests    - build and run unit tests
+	
+Options:
+    -DConfiguration=Debug or -DConfiguration=Release (default)  
+    -DPlatform=Win32 or -DPlatform=x64 (default)  
+    -DOutput=path   folder to create output in (default: ../../../OUTDIR)
+    -DMSVS=version  MSVS toolset, 2010 or 2013 (default: 2013)
+  		</echo>
+    </target>
+
+    <target name="clean">
+        <exec executable="msbuild.exe"  failonerror="true">
+            <arg value="${MSVS}\sra-tools.sln"/>
+            <arg value="/t:clean"/>
+            <arg value="/m"/>
+            <arg value="/p:Platform=${Platform}"/>
+            <arg value="/p:Configuration=${Configuration}"/>
+            <arg value="/p:NGS_OUTDIR=${Output}"/>
+        </exec>
+    </target>
+    
+    <target name="build">
+        <exec executable="msbuild.exe" failonerror="true">
+            <arg value="${MSVS}\sra-tools.sln"/>
+            <arg value="/m"/>
+            <arg value="/p:Platform=${Platform}"/>
+            <arg value="/p:Configuration=${Configuration}"/>
+            <arg value="/p:NGS_OUTDIR=${Output}"/>
+        </exec>
+    </target>
+    
+    
+    <target name="runtests" depends="build">
+        <exec executable="msbuild.exe" failonerror="true">
+            <arg value="${MSVS}\test-sra-tools.sln"/>
+            <arg value="/p:Platform=${Platform}"/>
+            <arg value="/p:Configuration=${Configuration}"/>
+            <arg value="/p:NGS_OUTDIR=${Output}"/>
+            <arg value="/p:Autorun=true"/>
+        </exec>
+    </target>
+    
+</project>
\ No newline at end of file
diff --git a/build/MSVC/cache-mgr.files b/build/MSVC/cache-mgr.files
new file mode 100644
index 0000000..9dc58ce
--- /dev/null
+++ b/build/MSVC/cache-mgr.files
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\cache-mgr\cache-mgr.c" />
+  </ItemGroup>
+</Project>
diff --git a/build/MSVC/dbgap-mount-demo.files b/build/MSVC/dbgap-mount-demo.files
new file mode 100644
index 0000000..be8a9a2
--- /dev/null
+++ b/build/MSVC/dbgap-mount-demo.files
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\dbgap-mount\demo.c" />
+  </ItemGroup>
+</Project>
diff --git a/build/MSVC/dbgap-mount-tool.files b/build/MSVC/dbgap-mount-tool.files
new file mode 100644
index 0000000..68cebe1
--- /dev/null
+++ b/build/MSVC/dbgap-mount-tool.files
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\dbgap-mount\dbgap-mount-tool.c" />
+    <ClCompile Include="..\..\..\tools\dbgap-mount\win\wrap.c" />
+  </ItemGroup>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+</Project>
diff --git a/build/MSVC/fastq-dump-ngs.files b/build/MSVC/fastq-dump-ngs.files
new file mode 100644
index 0000000..1152735
--- /dev/null
+++ b/build/MSVC/fastq-dump-ngs.files
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\fastq-dump\args.cpp" />
+    <ClCompile Include="..\..\..\tools\fastq-dump\fastq-dump.cpp" />
+    <ClCompile Include="..\..\..\tools\fastq-dump\filters.cpp" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/fastq-dump.files b/build/MSVC/fastq-dump.files
new file mode 100644
index 0000000..9f0ae66
--- /dev/null
+++ b/build/MSVC/fastq-dump.files
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\sra-dump\core.c" />
+    <ClCompile Include="..\..\..\tools\sra-dump\factory.c" />
+    <ClCompile Include="..\..\..\tools\sra-dump\fasta_dump.c" />
+    <ClCompile Include="..\..\..\tools\sra-dump\fastq.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/fastq-loader.files b/build/MSVC/fastq-loader.files
new file mode 100644
index 0000000..13062b9
--- /dev/null
+++ b/build/MSVC/fastq-loader.files
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\fastq-loader\fastq-grammar.c" />
+    <ClCompile Include="..\..\..\tools\fastq-loader\fastq-lex.c" />
+    <ClCompile Include="..\..\..\tools\fastq-loader\fastq-loader.c" />
+    <ClCompile Include="..\..\..\tools\fastq-loader\fastq-reader.c" />
+    <ClCompile Include="..\..\..\tools\fastq-loader\loader-imp.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/general-loader.files b/build/MSVC/general-loader.files
new file mode 100644
index 0000000..a13b3f6
--- /dev/null
+++ b/build/MSVC/general-loader.files
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\general-loader\general-loader.cpp" />
+    <ClCompile Include="..\..\..\tools\general-loader\database-loader.cpp" />
+    <ClCompile Include="..\..\..\tools\general-loader\protocol-parser.cpp" />
+    <ClCompile Include="..\..\..\tools\general-loader\utf8-like-int-codec.c" />
+    <ClCompile Include="..\..\..\tools\general-loader\main.cpp" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/illumina-dump.files b/build/MSVC/illumina-dump.files
new file mode 100644
index 0000000..481ed08
--- /dev/null
+++ b/build/MSVC/illumina-dump.files
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\sra-dump\core.c" />
+    <ClCompile Include="..\..\..\tools\sra-dump\factory.c" />
+    <ClCompile Include="..\..\..\tools\sra-dump\fasta_dump.c" />
+    <ClCompile Include="..\..\..\tools\sra-dump\illumina.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/kar.files b/build/MSVC/kar.files
new file mode 100644
index 0000000..0824fdd
--- /dev/null
+++ b/build/MSVC/kar.files
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+   <ItemGroup>
+    <ClCompile Include="..\..\..\tools\kar\kar.c" />
+    <ClCompile Include="..\..\..\tools\kar\kar-args.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/kdbmeta.files b/build/MSVC/kdbmeta.files
new file mode 100644
index 0000000..7e5835b
--- /dev/null
+++ b/build/MSVC/kdbmeta.files
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+   <ItemGroup>
+    <ClCompile Include="..\..\..\tools\util\kdbmeta.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/md5cp.files b/build/MSVC/md5cp.files
new file mode 100644
index 0000000..c1ca39d
--- /dev/null
+++ b/build/MSVC/md5cp.files
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+   <ItemGroup>
+    <ClCompile Include="..\..\..\tools\util\md5cp.c" />
+  </ItemGroup>
+</Project>
diff --git a/build/MSVC/prefetch.files b/build/MSVC/prefetch.files
new file mode 100644
index 0000000..144278b
--- /dev/null
+++ b/build/MSVC/prefetch.files
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+   <ItemGroup>
+    <ClCompile Include="..\..\..\tools\prefetch\prefetch.c" />
+    <ClCompile Include="..\..\..\tools\prefetch\kfile-no-q.c" />
+  </ItemGroup>
+</Project>
diff --git a/build/MSVC/qual-recalib-stat.files b/build/MSVC/qual-recalib-stat.files
new file mode 100644
index 0000000..a27d0a2
--- /dev/null
+++ b/build/MSVC/qual-recalib-stat.files
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+   <ItemGroup>
+    <ClCompile Include="..\..\..\tools\qual-recalib-stat\columns.c" />
+    <ClCompile Include="..\..\..\tools\qual-recalib-stat\context.c" />
+    <ClCompile Include="..\..\..\tools\qual-recalib-stat\namelist_tools.c" />
+    <ClCompile Include="..\..\..\tools\qual-recalib-stat\qual-recalib-stat.c" />
+    <ClCompile Include="..\..\..\tools\qual-recalib-stat\reader.c" />
+    <ClCompile Include="..\..\..\tools\qual-recalib-stat\ref_exclude.c" />
+    <ClCompile Include="..\..\..\tools\qual-recalib-stat\spot_position.c" />
+    <ClCompile Include="..\..\..\tools\qual-recalib-stat\stat_mod_2.c" />
+    <ClCompile Include="..\..\..\tools\qual-recalib-stat\writer.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/rcexplain.files b/build/MSVC/rcexplain.files
new file mode 100644
index 0000000..5503cd7
--- /dev/null
+++ b/build/MSVC/rcexplain.files
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+   <ItemGroup>
+    <ClCompile Include="..\..\..\tools\util\rcexplain.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/read-filter-redact.files b/build/MSVC/read-filter-redact.files
new file mode 100644
index 0000000..7a5637e
--- /dev/null
+++ b/build/MSVC/read-filter-redact.files
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+   <ItemGroup>
+    <ClCompile Include="..\..\..\tools\rd-filter-redact\read-filter-redact.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/ref-variation.files b/build/MSVC/ref-variation.files
new file mode 100644
index 0000000..7bd6961
--- /dev/null
+++ b/build/MSVC/ref-variation.files
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\ref-variation\ref-variation.cpp" />
+    <ClCompile Include="..\..\..\tools\ref-variation\helper.cpp" />
+    <ClCompile Include="..\..\..\tools\ref-variation\common.cpp" />
+    <ClInclude Include="..\..\..\tools\ref-variation\helper.h" />
+    <ClInclude Include="..\..\..\tools\ref-variation\common.h" />
+    <ClInclude Include="..\..\..\tools\ref-variation\ref-variation.vers.h" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/sam-dump.files b/build/MSVC/sam-dump.files
new file mode 100644
index 0000000..0334fa7
--- /dev/null
+++ b/build/MSVC/sam-dump.files
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\sra-pileup\cg_tools.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\inputfiles.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\matecache.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\out_redir.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\perf_log.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\read_fkt.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\md_flag.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\rna_splice_log.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\sam-aligned.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\sam-dump-opts.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\sam-dump.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\sam-dump3.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\sam-hdr.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\sam-hdr1.c" />	
+    <ClCompile Include="..\..\..\tools\sra-pileup\sam-unaligned.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/schema-replace.files b/build/MSVC/schema-replace.files
new file mode 100644
index 0000000..99a24e0
--- /dev/null
+++ b/build/MSVC/schema-replace.files
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+   <ItemGroup>
+    <ClCompile Include="..\..\..\tools\util\schema-replace.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/sff-dump.files b/build/MSVC/sff-dump.files
new file mode 100644
index 0000000..0e78cb6
--- /dev/null
+++ b/build/MSVC/sff-dump.files
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+   <ItemGroup>
+    <ClCompile Include="..\..\..\tools\sra-dump\core.c" />
+    <ClCompile Include="..\..\..\tools\sra-dump\factory.c" />
+    <ClCompile Include="..\..\..\tools\sra-dump\fasta_dump.c" />
+    <ClCompile Include="..\..\..\tools\sra-dump\sff.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/sra-kar.files b/build/MSVC/sra-kar.files
new file mode 100644
index 0000000..149ebc9
--- /dev/null
+++ b/build/MSVC/sra-kar.files
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+   <ItemGroup>
+    <ClCompile Include="..\..\..\tools\kar\sra-kar.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/sra-pileup.files b/build/MSVC/sra-pileup.files
new file mode 100644
index 0000000..f395c78
--- /dev/null
+++ b/build/MSVC/sra-pileup.files
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+   <ItemGroup>
+    <ClCompile Include="..\..\..\tools\sra-pileup\4na_ascii.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\cg_tools.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\cmdline_cmn.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\dyn_string.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\perf_log.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\pileup_counters.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\pileup_index.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\pileup_indels.c" />	
+    <ClCompile Include="..\..\..\tools\sra-pileup\pileup_stat.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\pileup_v2.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\pileup_varcount.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\ref_regions.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\ref_walker.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\ref_walker_0.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\report_deletes.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\reref.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\sra-pileup.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\walk_debug.c" />
+    <ClCompile Include="..\..\..\tools\sra-pileup\out_redir.c" />	
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/sra-stat.files b/build/MSVC/sra-stat.files
new file mode 100644
index 0000000..726d110
--- /dev/null
+++ b/build/MSVC/sra-stat.files
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\sra-stat\sra.c" />
+    <ClCompile Include="..\..\..\tools\sra-stat\sra-stat.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/srapath.files b/build/MSVC/srapath.files
new file mode 100644
index 0000000..0b83c4a
--- /dev/null
+++ b/build/MSVC/srapath.files
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\srapath\srapath.c" />
+    <ClCompile Include="..\..\..\tools\srapath\cgi_request.c" />
+    <ClCompile Include="..\..\..\tools\srapath\helper.c" />
+    <ClCompile Include="..\..\..\tools\srapath\line_iter.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/test-fastq-loader.files b/build/MSVC/test-fastq-loader.files
new file mode 100644
index 0000000..b0d48e8
--- /dev/null
+++ b/build/MSVC/test-fastq-loader.files
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\fastq-loader\fastq-lex.c" />
+    <ClCompile Include="..\..\..\tools\fastq-loader\fastq-grammar.c" />
+    <ClCompile Include="..\..\..\tools\fastq-loader\fastq-reader.c" />
+    <ClCompile Include="..\..\..\test\fastq-loader\test-fastq-loader.cpp" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/test-general-loader.files b/build/MSVC/test-general-loader.files
new file mode 100644
index 0000000..96cb0df
--- /dev/null
+++ b/build/MSVC/test-general-loader.files
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\test\general-loader\test-general-loader.cpp" />
+    <ClCompile Include="..\..\..\test\general-loader\testsource.cpp" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/test-sra.files b/build/MSVC/test-sra.files
new file mode 100644
index 0000000..93fb9dd
--- /dev/null
+++ b/build/MSVC/test-sra.files
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\util\test-sra.c" />
+    <ClCompile Include="..\..\..\tools\util\win\PrintOS.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/test-vcf-loader.files b/build/MSVC/test-vcf-loader.files
new file mode 100644
index 0000000..2bd8cb8
--- /dev/null
+++ b/build/MSVC/test-vcf-loader.files
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\test\vcf-loader\test-vcf-loader.cpp" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/tk-version.files b/build/MSVC/tk-version.files
new file mode 100644
index 0000000..fb20ec1
--- /dev/null
+++ b/build/MSVC/tk-version.files
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+   <ItemGroup>
+    <ClCompile Include="..\..\..\shared\toolkit.vers.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/var-expand.files b/build/MSVC/var-expand.files
new file mode 100644
index 0000000..b510d45
--- /dev/null
+++ b/build/MSVC/var-expand.files
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\ref-variation\var-expand.cpp" />
+    <ClCompile Include="..\..\..\tools\ref-variation\helper.cpp" />
+    <ClCompile Include="..\..\..\tools\ref-variation\common.cpp" />
+    <ClInclude Include="..\..\..\tools\ref-variation\helper.h" />
+    <ClInclude Include="..\..\..\tools\ref-variation\common.h" />
+    <ClInclude Include="..\..\..\tools\ref-variation\var-expand.vers.h" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/vcf-loader.files b/build/MSVC/vcf-loader.files
new file mode 100644
index 0000000..0c2a075
--- /dev/null
+++ b/build/MSVC/vcf-loader.files
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\vcf-loader\vcf-database.c" />
+    <ClCompile Include="..\..\..\tools\vcf-loader\vcf-grammar.c" />
+    <ClCompile Include="..\..\..\tools\vcf-loader\vcf-lex.c" />
+    <ClCompile Include="..\..\..\tools\vcf-loader\vcf-reader.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/vdb-config.files b/build/MSVC/vdb-config.files
new file mode 100644
index 0000000..f743abb
--- /dev/null
+++ b/build/MSVC/vdb-config.files
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\vdb-config\configure.cpp" />  
+    <ClCompile Include="..\..\..\tools\vdb-config\util.cpp" />  
+    <ClCompile Include="..\..\..\tools\vdb-config\vdb-config.c" />  
+    <ClCompile Include="..\..\..\tools\vdb-config\interactive.cpp" />  
+    <ClCompile Include="..\..\..\tools\vdb-config\vdb-config-model.cpp" />  
+  </ItemGroup>
+</Project>
diff --git a/build/MSVC/vdb-copy.files b/build/MSVC/vdb-copy.files
new file mode 100644
index 0000000..e324f96
--- /dev/null
+++ b/build/MSVC/vdb-copy.files
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\vdb-copy\coldefs.c" />
+    <ClCompile Include="..\..\..\tools\vdb-copy\config_values.c" />
+    <ClCompile Include="..\..\..\tools\vdb-copy\context.c" />
+    <ClCompile Include="..\..\..\tools\vdb-copy\copy_meta.c" />
+    <ClCompile Include="..\..\..\tools\vdb-copy\get_platform.c" />
+    <ClCompile Include="..\..\..\tools\vdb-copy\helper.c" />
+    <ClCompile Include="..\..\..\tools\vdb-copy\namelist_tools.c" />
+    <ClCompile Include="..\..\..\tools\vdb-copy\num-gen.c" />
+    <ClCompile Include="..\..\..\tools\vdb-copy\redactval.c" />
+    <ClCompile Include="..\..\..\tools\vdb-copy\type_matcher.c" />
+    <ClCompile Include="..\..\..\tools\vdb-copy\vdb-copy.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/vdb-decrypt.files b/build/MSVC/vdb-decrypt.files
new file mode 100644
index 0000000..3c65432
--- /dev/null
+++ b/build/MSVC/vdb-decrypt.files
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\vdb-decrypt\shared.c" />
+    <ClCompile Include="..\..\..\tools\vdb-decrypt\vdb-decrypt.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/vdb-diff.files b/build/MSVC/vdb-diff.files
new file mode 100644
index 0000000..e3411d2
--- /dev/null
+++ b/build/MSVC/vdb-diff.files
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\vdb-diff\namelist_tools.c" />
+    <ClCompile Include="..\..\..\tools\vdb-diff\coldefs.c" />
+    <ClCompile Include="..\..\..\tools\vdb-diff\vdb-diff.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/vdb-dump.files b/build/MSVC/vdb-dump.files
new file mode 100644
index 0000000..e956cf2
--- /dev/null
+++ b/build/MSVC/vdb-dump.files
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\vdb-dump\vdb-dump-bin.c" />
+    <ClCompile Include="..\..\..\tools\vdb-dump\vdb-dump-coldefs.c" />
+    <ClCompile Include="..\..\..\tools\vdb-dump\vdb-dump-context.c" />
+    <ClCompile Include="..\..\..\tools\vdb-dump\vdb-dump-fastq.c" />
+    <ClCompile Include="..\..\..\tools\vdb-dump\vdb-dump-filter.c" />
+    <ClCompile Include="..\..\..\tools\vdb-dump\vdb-dump-formats.c" />
+    <ClCompile Include="..\..\..\tools\vdb-dump\vdb-dump-helper.c" />
+    <ClCompile Include="..\..\..\tools\vdb-dump\vdb-dump-print.c" />
+    <ClCompile Include="..\..\..\tools\vdb-dump\vdb-dump-redir.c" />
+    <ClCompile Include="..\..\..\tools\vdb-dump\vdb-dump-str.c" />
+    <ClCompile Include="..\..\..\tools\vdb-dump\vdb-dump-tools.c" />
+    <ClCompile Include="..\..\..\tools\vdb-dump\vdb-dump-interact.c" />
+    <ClCompile Include="..\..\..\tools\vdb-dump\vdb-dump-repo.c" />
+    <ClCompile Include="..\..\..\tools\vdb-dump\vdb-dump.c" />
+    <ClCompile Include="..\..\..\tools\vdb-dump\vdb_info.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/vdb-encrypt.files b/build/MSVC/vdb-encrypt.files
new file mode 100644
index 0000000..160590a
--- /dev/null
+++ b/build/MSVC/vdb-encrypt.files
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\vdb-decrypt\shared.c" />
+    <ClCompile Include="..\..\..\tools\vdb-decrypt\vdb-encrypt.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/vdb-lock.files b/build/MSVC/vdb-lock.files
new file mode 100644
index 0000000..9fd7f85
--- /dev/null
+++ b/build/MSVC/vdb-lock.files
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\util\vdb-lock.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/vdb-passwd.files b/build/MSVC/vdb-passwd.files
new file mode 100644
index 0000000..8d900c1
--- /dev/null
+++ b/build/MSVC/vdb-passwd.files
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\util\vdb-passwd.c" />
+    <ClCompile Include="..\..\..\tools\util\win\syspass.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/vdb-unlock.files b/build/MSVC/vdb-unlock.files
new file mode 100644
index 0000000..1173510
--- /dev/null
+++ b/build/MSVC/vdb-unlock.files
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\util\vdb-unlock.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/vdb-validate.files b/build/MSVC/vdb-validate.files
new file mode 100644
index 0000000..a2cac35
--- /dev/null
+++ b/build/MSVC/vdb-validate.files
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\vdb-validate\vdb-validate.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/MSVC/wb-test-fastq.files b/build/MSVC/wb-test-fastq.files
new file mode 100644
index 0000000..e1e2c08
--- /dev/null
+++ b/build/MSVC/wb-test-fastq.files
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="..\..\..\tools\fastq-loader\fastq-lex.c" />
+    <ClCompile Include="..\..\..\tools\fastq-loader\fastq-grammar.c" />
+    <ClCompile Include="..\..\..\tools\fastq-loader\fastq-reader.c" />
+    <ClCompile Include="..\..\..\test\fastq-loader\wb-test-fastq.cpp" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/build/Makefile.clang b/build/Makefile.clang
index f6e54d5..ecc0d2c 100644
--- a/build/Makefile.clang
+++ b/build/Makefile.clang
@@ -36,26 +36,29 @@ PP = gcc -E $(CFLAGS)
 LD = @ $(TOP)/build/ld.sh $(OS) $(ARCH) clang \
 	--build $(BUILD) --ldflags "$(LDFLAGS)" $(STATIC) \
 	$(STATICSYSLIBS) $(CHECKSUM) --objx $(OBJX) --shlx $(SHLX) --libx $(LIBX) \
-	-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR)
+	-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR):$(NGS_LIBDIR):$(VDB_LIBDIR):$(VDB_ILIBDIR)
 
 LPFLAGS = $(LDFLAGS)
 
 LP = @ $(TOP)/build/ld.sh $(OS) $(ARCH) clang++ \
-	--build $(BUILD) --ldflags "$(LDFLAGS)" $(STATIC) \
+	--build $(BUILD) --ldflags "$(LPFLAGS)" $(STATIC) \
 	$(STATICSYSLIBS) $(CHECKSUM) --objx $(OBJX) --shlx $(SHLX) --libx $(LIBX) \
-	-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR)
+	-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR):$(NGS_LIBDIR):$(VDB_LIBDIR):$(VDB_ILIBDIR)
 
 # tool options
 WARN = -Wall -Wno-variadic-macros -Wno-long-long # -Wconversion
+ifeq (linux,$(OS))
+    NO_ARRAY_BOUNDS_WARNING = -Wno-array-bounds
+endif
 
 ifeq (64,$(BITS))
 	CARCH = -m64
-else
+else    
 ifeq (32_64,$(BITS))
-	CARCH = -arch i386 -arch x86_64  
+    CARCH = -arch i386 -arch x86_64  
 else    
-	CARCH = -m32
-endif    
+    CARCH = -m32
+endif
 endif
 
 ifeq (prof, $(BUILD))
diff --git a/build/Makefile.deb b/build/Makefile.deb
new file mode 100644
index 0000000..54c09ef
--- /dev/null
+++ b/build/Makefile.deb
@@ -0,0 +1,108 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+#VERBOSE=-v
+
+# determine shell environment ($CONFIG_FILE)
+include $(TOP)/build/Makefile.shell
+
+# load build configuration ($TARGDIR) ($VERSION)
+include $(CONFIG_FILE)
+
+# $TOOLS_TO_INSTALL
+include $(TOP)/build/Makefile.tools
+ifeq (1,$(HAVE_HDF5))
+	TOOLS_TO_INSTALL += pacbio-load
+endif
+
+PKGDIR=$(TARGDIR)/debbuild
+DST=$(PKGDIR)/sra-toolkit-$(VERSION)
+DEB=$(DST).deb
+
+TOOL=$(shell which dpkg-deb 2> /dev/null)
+
+################################################################################
+
+clean_deb:
+	rm -rf $(DEB) $(DST)
+
+ifeq ("","$(TOOL)")
+deb:
+	>&2 echo dpkg-deb: command not found
+else
+deb: $(DEB)
+endif
+
+$(DEB): $(DST)/etc/ncbi/default.kfg $(DST)/etc/ncbi/schema.kfg \
+	$(DST)/etc/ncbi/vdb-copy.kfg $(DST)/usr/bin $(DST)/DEBIAN/control
+ifeq (mac,$(OS))
+	         dpkg-deb --build $(DST)
+else
+	fakeroot dpkg-deb --build $(DST)
+endif
+
+$(PKGDIR):
+	mkdir $(VERBOSE) -p $@
+
+$(DST): $(PKGDIR)
+	mkdir $(VERBOSE) -p $@/DEBIAN
+	mkdir $(VERBOSE) -p $@/etc/ncbi
+
+$(DST)/etc/ncbi:
+	mkdir -p $@
+
+$(DST)/etc/ncbi/default.kfg: $(DST)/etc/ncbi
+	rsync $(VERBOSE) -l --chmod=g-w $(VDB_LIBDIR)/ncbi/default.kfg $@
+
+$(DST)/etc/ncbi/schema.kfg: $(DST)/etc/ncbi
+	echo '/vdb/schema/paths = "/usr/share/ncbi/schema"' > $@
+
+$(DST)/etc/ncbi/vdb-copy.kfg: $(DST)/etc/ncbi
+	rsync $(VERBOSE) -l --chmod=g-w $(BINDIR)/ncbi/vdb-copy.kfg $@
+
+$(DST)/usr/bin: $(DST)
+	mkdir $(VERBOSE) -p $@
+	$(MAKE) -s --no-print-directory -f $(TOP)/build/Makefile.deb \
+		$(TOOLS_TO_INSTALL)
+
+$(DST)/usr/share/ncbi/schema: $(DST)
+	mkdir $(VERBOSE) -p $@
+	rsync $(VERBOSE) -rmloptD --include '*.vschema' --include='*/' \
+		 --exclude '*' $(VDB_INCDIR)/* $@
+
+$(DST)/DEBIAN/control:
+	mkdir $(VERBOSE) -p $(DST)/DEBIAN
+	printf \
+"Package: sra-toolkit\n"\
+"Version: $(VERSION)\n"\
+"Architecture: all\n"\
+"Maintainer: SRA Toolkit Development Team <sra-tools at ncbi.nlm.nih.gov>\n"\
+"Description: SRA Toolkit package\n"\
+" The SRA Toolkit and SDK from NCBI is a collection of tools and libraries\n"\
+" for using data in the INSDC Sequence Read Archives.\n" > $@
+
+$(TOOLS_TO_INSTALL):
+	- ( test -f $(BINDIR)/$@ || ( echo "$@ not found" && false ) ) && \
+		rsync $(VERBOSE) -l $(BINDIR)/$@ $(BINDIR)/$@$(VERSION_EXEX) \
+			$(BINDIR)/$@$(MAJVERS_EXEX) $(DST)/usr/bin
diff --git a/build/Makefile.env b/build/Makefile.env
index 17bed71..d0539c5 100644
--- a/build/Makefile.env
+++ b/build/Makefile.env
@@ -75,6 +75,11 @@ else
 	LOCAL_OR_REMOTE = local
 endif
 
+# pre-built sra-tools are static
+ifeq (1,$(WANTS_STATIC))
+	STATIC = --static
+	STATICSYSLIBS = --static-system-libs
+endif
 
 # drop all suffix rules
 .SUFFIXES:
@@ -119,6 +124,8 @@ else
 	NCBIDIR = $(LIBDIR)/ncbi $(BINDIR)/ncbi
 endif
 
+DEFAULT_KFG = $(VDB_SRCDIR)/libs/kfg/default.kfg
+
 # make reissue command
 MAKE_CMD = $(MAKE) BUILD=$(BUILD) TOOLSET=$(TOOLSET) COMP=$(COMP) LNKG=$(LNKG) \
     TOP=$(TOP) SRCDIR=$(SRCDIR) OUTDIR=$(OUTDIR) -C $(OBJDIR) -f $(SRCDIR)/Makefile
@@ -130,21 +137,14 @@ JMAKE_CMD = $(MAKE) BUILD=$(BUILD) TOOLSET=$(TOOLSET) COMP=$(COMP) LNKG=$(LNKG)
 SUBDIRS = bin test-bin ilib lib
 OUTDIRS = schema
 
-# compilation rules
-#MAKE_JOBS = 16
-
-stdcompile: makedirs
-	@ $(MAKE_CMD) -j$(MAKE_JOBS) $(TARGDIR)/compile
-
 # clean rules
 stdclean:
 	@ -rm -rf $(OBJDIR)
-	@ -rm -rf $(addprefix $(OUTDIR)/$(OS)/$(TOOLSET)/,dyn stat)
 	@ -rm -rf $(addsuffix .*,$(addprefix $(ILIBDIR)/,$(ALL_LIBS))) \
 			$(addsuffix .*,$(addprefix $(LIBDIR)/,$(ALL_LIBS))) \
 			$(addsuffix -static.*,$(addprefix $(LIBDIR)/,$(ALL_LIBS))) \
 			$(addsuffix *,$(addprefix $(BINDIR)/,$(ALL_TOOLS) $(ALL_LIBS))) \
-			$(addsuffix *,$(addprefix $(TEST_BINDIR)/,$(ALL_TOOLS) $(TEST_TOOLS) $(SLOW_TEST_TOOLS)))
+			$(addsuffix *,$(addprefix $(TEST_BINDIR)/,$(ALL_TOOLS) $(TEST_TOOLS)))
 
 stdjclean:
 	@ -rm -rf $(CLSPATH)
@@ -158,8 +158,11 @@ removelinks:
 # create all required output directories
 makedirs:
 	@ mkdir -p $(addprefix $(TARGDIR)/,$(SUBDIRS) obj/$(MODULE)) $(NCBIDIR)
+	@ if [ ! -f "$(BINDIR)/ncbi/default.kfg" ] && [ -f "$(DEFAULT_KFG)" ] ; \
+	    then cp -pv $(DEFAULT_KFG) $(BINDIR)/ncbi ; \
+	  fi
 
-makejdirs: makedirs
+makejdirs:
 	@ mkdir -p $(CLASSDIR)
 
 # build version include files
@@ -183,12 +186,12 @@ rebuild-dirlinks:
 	@ true
 else
 rebuild-dirlinks: removelinks makedirs $(LNDIRS)
-	@ ln -s $(TOP)/interfaces $(OUTDIR)/schema
+	@ ln -s $(VDB_INCDIR) $(OUTDIR)/schema
 endif
 
 endif
 
-.PHONY: compile stdcompile stdclean removelinks makedirs vers-includes rebuild-dirlinks
+.PHONY: stdclean removelinks makedirs vers-includes rebuild-dirlinks
 .PHONY: stdjclean makejdirs
 
 # configuration targets 
@@ -270,10 +273,10 @@ purecov:
 .PHONY: out CC GCC ICC debug profile release scm purify purecov local local require-proxy-exec $(RHOSTS) bindir report_config
 
 # includes based upon build
-ITF = $(TOP)/interfaces
-OSINC = $(TOP)/interfaces/os
-CCINC = $(TOP)/interfaces/cc
-XTINC = $(TOP)/interfaces/ext
+ITF   = $(VDB_INCDIR)/
+OSINC = $(VDB_INCDIR)/os
+CCINC = $(VDB_INCDIR)/cc
+XTINC = $(VDB_INCDIR)/ext
 NGSINC = $(NGS_INCDIR)
 OVERRIDEINC = $(TOP)/interfaces/override
 
@@ -325,6 +328,23 @@ INCDIRS = \
 	-I.
 
 
+# linker paths
+LDPATHS =
+
+ifneq (,$(HDF5_LIBDIR))
+	LDPATHS += -L$(HDF5_LIBDIR)
+endif
+ifneq (,$(XML2_LIBDIR))
+	LDPATHS += -L$(XML2_LIBDIR)
+endif
+ifneq (,$(MAGIC_LIBDIR))
+	LDPATHS += -L$(MAGIC_LIBDIR)
+endif
+ifneq (,$(FUSE_LIBDIR))
+	LDPATHS += -L$(FUSE_LIBDIR)
+endif
+
+
 # defines that describe os & architecture
 DLLX ?= $(SHLX)
 ARCHDEFS = -D_ARCH_BITS=__SIZEOF_POINTER__*__CHAR_BIT__ -DLIBPREFIX=$(LPFX) -DSHLIBEXT=$(DLLX)
@@ -332,8 +352,7 @@ ARCHDEFS = -D_ARCH_BITS=__SIZEOF_POINTER__*__CHAR_BIT__ -DLIBPREFIX=$(LPFX) -DSH
 # default tool parameters
 CFLAGS	= $(DEBUG) $(DBG) $(CARCH) $(PROF) $(PED) $(DEFINES) $(ARCHDEFS) $(MIN_DEPLOY_OS_OPT) $(INCDIRS)
 CPFLAGS = $(DEBUG) $(DBG) $(CARCH) $(PROF) $(DEFINES) $(ARCHDEFS) $(MIN_DEPLOY_OS_OPT) $(INCDIRS)
-# some LDFLAGS may have been specified in $(CONFIG_FILE)
-LDFLAGS += $(DBG) $(PROF) $(CARCH) $(MIN_DEPLOY_OS_OPT)
+LDFLAGS = $(DBG) $(PROF) $(CARCH) $(MIN_DEPLOY_OS_OPT) $(LDPATHS)
 
 #-------------------------------------------------------------------------------
 # runtests
@@ -342,8 +361,7 @@ LDFLAGS += $(DBG) $(PROF) $(CARCH) $(MIN_DEPLOY_OS_OPT)
 #
 ifeq ($(RUNTESTS_OVERRIDE),)
 runtests: std $(TEST_TOOLS)
-	@ export VDB_CONFIG=$(VDB_CONFIG);\
-	export LD_LIBRARY_PATH=$(LIBDIR):$$LD_LIBRARY_PATH;export MallocScribble=1;\
+	@ export VDB_CONFIG=$(VDB_CONFIG);export LD_LIBRARY_PATH=$(LIBDIR):$$LD_LIBRARY_PATH;export MallocScribble=1;\
 	for i in $(TEST_TOOLS);\
 	do\
 		echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++;\
@@ -371,3 +389,20 @@ slowtests: std $(SLOW_TEST_TOOLS)
 
 .PHONY: slowtests
 
+#-------------------------------------------------------------------------------
+# all-cmn
+#
+# Common target to trigger build of all tools
+#
+$(TARGDIR)/all-cmn: $(addprefix $(BINDIR)/,$(ALL_TOOLS))
+
+.PHONY: $(TARGDIR)/all-cmn
+
+#-------------------------------------------------------------------------------
+# std-cmn
+#
+# Common target to trigger build of external visibility tools
+#
+$(TARGDIR)/std-cmn: $(addprefix $(BINDIR)/,$(EXT_TOOLS))
+
+.PHONY: $(TARGDIR)/std-cmn
diff --git a/build/Makefile.gcc b/build/Makefile.gcc
index 3f7a72c..dc8ed4d 100644
--- a/build/Makefile.gcc
+++ b/build/Makefile.gcc
@@ -36,14 +36,14 @@ PP = gcc -E $(CFLAGS)
 LD = @ $(TOP)/build/ld.sh $(OS) $(ARCH) gcc \
 	--build $(BUILD) --ldflags "$(LDFLAGS)" $(STATIC) \
 	$(STATICSYSLIBS) $(CHECKSUM) --objx $(OBJX) --shlx $(SHLX) --libx $(LIBX) \
-	-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR)
+	-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR):$(NGS_LIBDIR):$(VDB_LIBDIR):$(VDB_ILIBDIR)
 
 LPFLAGS = $(LDFLAGS)
 
 LP = @ $(TOP)/build/ld.sh $(OS) $(ARCH) g++ \
 	--build $(BUILD) --ldflags "$(LPFLAGS)" $(STATIC) \
 	$(STATICSYSLIBS) $(CHECKSUM) --objx $(OBJX) --shlx $(SHLX) --libx $(LIBX) \
-	-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR)
+	-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR):$(NGS_LIBDIR):$(VDB_LIBDIR):$(VDB_ILIBDIR)
 
 # tool options
 WARN = -Wall -Wno-long-long 
@@ -51,14 +51,18 @@ ifneq (sun,$(OS))
     WARN += -Wno-variadic-macros
 endif
 
+ifeq (linux,$(OS))
+    NO_ARRAY_BOUNDS_WARNING = -Wno-array-bounds
+endif
+
 ifeq (64,$(BITS))
 	CARCH = -m64
 else
 ifeq (32_64,$(BITS))
-	CARCH = -arch i386 -arch x86_64  
+    CARCH = -arch i386 -arch x86_64  
 else    
-	CARCH = -m32
-endif    
+    CARCH = -m32
+endif 
 endif
 
 ifeq (prof, $(BUILD))
@@ -75,10 +79,10 @@ ifeq (dbg, $(BUILD))
 	PED = -std=gnu99 -pedantic # -fdiagnostics-show-option
 else
 
-OPT = -O3 -Wno-variadic-macros -fno-strict-aliasing -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
+OPT = -O3 -Wno-variadic-macros -fno-strict-aliasing -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
 ifeq (x86_64, $(ARCH))
 	OPT += -Wall
-endif
+endif
 
 endif
 
diff --git a/build/Makefile.install b/build/Makefile.install
index 5b007e7..a9cd14f 100644
--- a/build/Makefile.install
+++ b/build/Makefile.install
@@ -28,104 +28,93 @@ include $(TOP)/build/Makefile.shell
 # load build configuration
 include $(CONFIG_FILE)
 
+# load platform-specific settings
+include $(TOP)/build/Makefile.$(OS)
+
 #-------------------------------------------------------------------------------
 # install
-# 
-LIBRARIES_TO_INSTALL = \
-    ncbi-vdb.$(VERSION_LIBX) \
-    ncbi-vdb.$(VERSION_SHLX) \
-    ncbi-wvdb.$(VERSION_LIBX) \
-    ncbi-wvdb.$(VERSION_SHLX) \
-    ncbi-ngs-c++.$(VERSION_LIBX) \
-
-LIB_TARGET = $(INST_LIBDIR)$(BITS)
-
-LIBRARIES_WITH_PREFIX = \
-	$(addprefix $(LIB_TARGET)/$(LPFX),$(LIBRARIES_TO_INSTALL))
-
-checkversion:
-
-copylibs: checkversion $(LIB_TARGET) 
-	@ echo "Installing libraries to $(LIB_TARGET)"
-	@ $(MAKE) -f $(TOP)/build/Makefile.install $(LIBRARIES_WITH_PREFIX)
+#
 
-copyincludes: checkversion
-	@echo "Installing includes to $(INST_INCDIR)"
-	@mkdir -p $(INST_INCDIR)/ncbi-vdb
-	@cp $(TOP)/interfaces/ngs/ncbi/NGS.hpp $(INST_INCDIR)/ncbi-vdb
+# $TOOLS_TO_INSTALL
+include $(TOP)/build/Makefile.tools
+ifeq (1,$(HAVE_HDF5))
+        TOOLS_TO_INSTALL += pacbio-load
+endif
 
 #fake root for debugging
 #uncomment this line and change the test for root ( see under install: ) to succeed:
 #ROOT = ~/root
 
-INCLUDE_SYMLINK = $(ROOT)/usr/include/ncbi-vdb
-PROFILE_FILE = $(ROOT)/etc/profile.d/ncbi-vdb
-KONFIG_DIR = $(ROOT)/etc/ncbi/
-
+EXE_TARGET = $(INST_BINDIR)
+PROFILE_FILE = $(ROOT)/etc/profile.d/sra-tools
+
+installexes: 
+	@ echo "Installing executables to $(INST_BINDIR)/..."
+	@ mkdir -p $(INST_BINDIR) 
+	@ $(MAKE) -s --no-print-directory -f $(TOP)/build/Makefile.install $(TOOLS_TO_INSTALL)
+	@ printf "Installing magic file..."
+	@ $(COPY) $(TOP)/tools/copycat/magic $(INST_BINDIR) && echo "done"
+
+$(TOOLS_TO_INSTALL):
+	@ printf "Installing $@..."
+	@ # ignore missing tools
+	@ - ( test -f $(BINDIR)/$@$(EXEX) || ( echo "not found" && false ) ) && \
+      $(COPY) $(BINDIR)/$@$(EXEX) $(BINDIR)/$@$(VERSION_EXEX) $(BINDIR)/$@$(MAJVERS_EXEX) $(INST_BINDIR) && \
+      echo "done"
+    
 ifeq (linux, $(OS))
     ifeq (0, $(shell id -u))
         LINUX_ROOT = true
     endif
 endif
 
-install: copylibs copyincludes 
+install: installexes
 ifeq (true, $(LINUX_ROOT))
-	@ # install symlink to includes 
-	@ echo "Updating $(INCLUDE_SYMLINK)"
-	@ rm -f $(INCLUDE_SYMLINK)
-	@ ln -s $(INST_INCDIR)/ncbi-vdb $(INCLUDE_SYMLINK)
-	@ #
 	@ # install configuration file(s)
-	@ echo "Installing configuration files to $(KONFIG_DIR)"
-	@ mkdir -p $(KONFIG_DIR)
-	@ cp $(TOP)/libs/kfg/default.kfg $(KONFIG_DIR)/ncbi-vdb.kfg
+	@ printf "Installing configuration files to $(ROOT)/etc/ncbi/..."
+	( mkdir -p $(ROOT)/etc/ncbi && \
+	  cp -p $(TOP)/tools/vdb-copy/vdb-copy.kfg $(ROOT)/etc/ncbi ; \
+	  if [ -f $(BINDIR)/ncbi/default.kfg ] ; \
+	    then cp -p $(BINDIR)/ncbi/default.kfg $(ROOT)/etc/ncbi ; \
+	  fi ) && echo done
 	@ #
 	@ echo "Updating $(PROFILE_FILE).[c]sh"
 	@ printf \
 "#version $(VERSION)\n"\
-"if ! echo \$$LD_LIBRARY_PATH | /bin/grep -q $(LIB_TARGET)\n"\
-"then export LD_LIBRARY_PATH=$(LIB_TARGET):\$$LD_LIBRARY_PATH\n"\
-"fi\n" \
-"export NCBI_VDB_LIBDIR=$(LIB_TARGET)\n" \
+"if ! echo \$$PATH | /bin/grep -q $(EXE_TARGET)\n"\
+"then export PATH=$(EXE_TARGET):\$$PATH\n"\
+"fi" \
         >$(PROFILE_FILE).sh && chmod 644 $(PROFILE_FILE).sh || true;
 	@ printf \
 "#version $(VERSION)\n"\
-"echo \$$LD_LIBRARY_PATH | /bin/grep -q $(LIB_TARGET)\n"\
-"if ( \$$status ) setenv LD_LIBRARY_PATH $(LIB_TARGET):\$$LD_LIBRARY_PATH\n"\
-"setenv NCBI_VDB_LIBDIR $(LIB_TARGET)\n" \
+"echo \$$PATH | /bin/grep -q $(EXE_TARGET)\n"\
+"if ( \$$status ) setenv PATH $(EXE_TARGET):\$$PATH\n"\
         >$(PROFILE_FILE).csh && chmod 644 $(PROFILE_FILE).csh || true;
 	@ #TODO: check version of the files above
-	@ #
-	@ echo "Use \$$NCBI_VDB_LIBDIR in your link commands, e.g.:"
-	@ echo "      ld -L\$$NCBI_VDB_LIBDIR -lncbi-vdb ..."
 else    
-	@ #
-	@ echo "Installing configuration files to $(LIB_TARGET)/ncbi/"
-	@ mkdir -p $(LIB_TARGET)/ncbi
-	@ cp $(TOP)/libs/kfg/default.kfg $(LIB_TARGET)/ncbi/ncbi-vdb.kfg
-	@ #
-	@ echo "Please add $(LIB_TARGET) to your LD_LIBRARY_PATH, e.g.:"
-	@ echo "      export LD_LIBRARY_PATH=$(LIB_TARGET):\$$LD_LIBRARY_PATH"
-	@ #
-	@ echo "Use $(LIB_TARGET) in your link commands, e.g.:"
-	@ echo "      export NCBI_VDB_LIBDIR=$(LIB_TARGET)"   
-	@ echo "      ld -L\$$NCBI_VDB_LIBDIR -lncbi-vdb ..."
+	@ # install configuration file(s)
+	@ printf "Installing configuration files to $(INST_BINDIR)/ncbi/..."
+	( mkdir -p $(INST_BINDIR)/ncbi && \
+	  cp -p $(TOP)/tools/vdb-copy/vdb-copy.kfg $(INST_BINDIR)/ncbi/ ; \
+	  if [ -f $(BINDIR)/ncbi/default.kfg ] ; \
+	    then cp -p $(BINDIR)/ncbi/default.kfg $(INST_BINDIR)/ncbi ; \
+	  fi ) && echo done
 endif
 
 #-------------------------------------------------------------------------------
 # uninstall
 # 
 
-TO_UNINSTALL = $(LIB_TARGET)/libncbi-vdb.* $(LIB_TARGET)/libncbi-wvdb.* $(LIB_TARGET)/libncbi-ngs-c++.*
-TO_UNINSTALL_AS_ROOT = $(INCLUDE_SYMLINK) $(KONFIG_DIR)/ncbi-vdb.kfg $(PROFILE_FILE).sh $(PROFILE_FILE).csh
+TO_UNINSTALL = $(addsuffix *,$(addprefix $(INST_BINDIR)/,$(TOOLS_TO_INSTALL) magic))
+TO_UNINSTALL_AS_ROOT = $(ROOT)/etc/ncbi/vdb-copy.kfg $(PROFILE_FILE).sh $(PROFILE_FILE).csh
 
 uninstall:
-	@ echo "Uninstalling $(TO_UNINSTALL) ..."
-	@ rm -rf $(TO_UNINSTALL)
+	@ echo "Uninstalling sra-tools from $(INST_BINDIR)..."
+	rm -rf $(TO_UNINSTALL)
 ifeq (true, $(LINUX_ROOT))
 	@ echo "Uninstalling $(TO_UNINSTALL_AS_ROOT) ..."
 	@ rm -rf $(TO_UNINSTALL_AS_ROOT)
 endif
 	@ echo "done."
 
-.PHONY: install copylibs copyincludes checkversion uninstall
+.PHONY: install installexes uninstall
diff --git a/build/Makefile.linux b/build/Makefile.linux
index 546cd42..b14b33f 100644
--- a/build/Makefile.linux
+++ b/build/Makefile.linux
@@ -70,8 +70,11 @@ LEX = @ true
 # build matrix
 COMPILERS = GCC # ICC
 
+# copy without following symlinks
+COPY = cp -P
+
 # valgrind
-VALGRIND = export NCBI_VALGRIND=ncbi; valgrind --error-exitcode=1 --suppressions=$(TOP)/build/valgrind.suppress --show-reachable=no --quiet --leak-check=full
+VALGRIND = export NCBI_VALGRIND=ncbi; valgrind --error-exitcode=1 --suppressions=$(TOP)/build/valgrind.suppress --show-reachable=no 
 
 VALGRIND_TARGETS = $(addprefix vg-,$(TEST_TOOLS))
 
diff --git a/build/Makefile.mac b/build/Makefile.mac
new file mode 100644
index 0000000..17e2b64
--- /dev/null
+++ b/build/Makefile.mac
@@ -0,0 +1,84 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+# default compiler
+ifeq (,$(COMP))
+	COMP = clang
+endif
+
+# architecture
+xARCH = $(shell test -f $(TOP)/build/ARCH.mac && cat $(TOP)/build/ARCH.mac)
+ifneq (,$(xARCH))
+
+  # the user has selected an architecture
+  ifeq (i386,$(xARCH))
+    ARCH = i386
+    BITS = 32
+  endif
+  ifeq (x86_64,$(xARCH))
+    ARCH = x86_64
+    BITS = 64
+  endif
+
+endif
+
+# allow the user to override architecture
+i386 x86_64:
+	@ echo $@ > $(TOP)/build/ARCH.mac
+
+.PHONY: i386 x86_64
+
+
+# library prefix
+LPFX = lib
+
+# file extensions
+OBJX = o
+LOBX = pic.o
+LIBX = a
+SHLX = dylib
+
+# compilation defines
+DEFINES	:= -DMAC -DBSD -DUNIX -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DPKGNAME=mac$(BITS)
+
+# Darwin is a Unix variant
+OS_DAD = bsd
+OS_GDAD = unix
+
+# minimum deployment os
+MIN_DEPLOY_OS = 10.6
+MIN_DEPLOY_OS_OPT = -mmacosx-version-min=$(MIN_DEPLOY_OS)
+
+LIBXML_LPATH = /usr/lib
+
+# flex+bison: on Mac, use source-controlled generated .c/.h files
+YACC = @ true
+LEX = @ true
+
+# build matrix
+COMPILERS = CLANG GCC
+
+# copy without following symlinks
+COPY = cp -R
diff --git a/build/Makefile.rpm b/build/Makefile.rpm
new file mode 100644
index 0000000..b9d568e
--- /dev/null
+++ b/build/Makefile.rpm
@@ -0,0 +1,164 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+#VERBOSE=-v
+
+# determine shell environment ($CONFIG_FILE)
+include $(TOP)/build/Makefile.shell
+
+# load build configuration ($TARGDIR) ($VERSION)
+include $(CONFIG_FILE)
+
+# $TOOLS_TO_INSTALL
+include $(TOP)/build/Makefile.tools
+ifeq (1,$(HAVE_HDF5))
+	TOOLS_TO_INSTALL += pacbio-load
+endif
+
+REVISION=0
+PKGDIR=$(TARGDIR)/rpmbuild
+RPM =$(PKGDIR)/RPMS/$(ARCH)/sra-toolkit-$(VERSION)-$(REVISION).$(ARCH).rpm
+SRC =$(PKGDIR)/SOURCES/sra-toolkit-$(VERSION).tar.gz
+SPEC=$(PKGDIR)/SPECS/sra-toolkit.spec
+DST =$(PKGDIR)/sra-toolkit-$(VERSION)
+TGZ=$(DST).tar.gz
+
+clean_rpm:
+	echo 'DEBUGGING RPM: clean_rpm'
+	rm -rf $(DST) $(RPM) $(SPEC) $(SRC) $(TGZ)
+
+rpm: $(RPM)
+#	echo DEBUGGING RPM: rpm $(TOP)/$(MODULE)
+
+$(RPM): $(SPEC) $(SRC)
+#	echo 'DEBUGGING RPM: (RPM)'
+	rpmbuild --define "_topdir $(PKGDIR)"  --define "_tmppath %{_topdir}/tmp" \
+	    -bb $(SPEC)
+
+$(SRC): $(DST)/etc/ncbi/default.kfg $(DST)/etc/ncbi/schema.kfg \
+		$(DST)/etc/ncbi/vdb-copy.kfg $(DST)/usr/share/ncbi/schema
+	echo 'DEBUGGING RPM: (SRC)'
+	chmod -R g-w $(DST)
+	cd $(PKGDIR) ; tar $(VERBOSE) -zcf $(TGZ) --owner 0 --group 0 \
+		sra-toolkit-$(VERSION)
+	mkdir $(VERBOSE) -p $(PKGDIR)/SOURCES
+	cp $(VERBOSE) -p $(TGZ) $@
+
+$(DST)/etc/ncbi/default.kfg: $(DST)
+	echo 'DEBUGGING RPM: (/etc/ncbi/default.kfg)'
+	rsync $(VERBOSE) -l --chmod=g-w $(VDB_LIBDIR)/ncbi/default.kfg $@
+
+$(DST)/etc/ncbi/schema.kfg: $(DST)
+	echo 'DEBUGGING RPM: (/etc/ncbi/schema.kfg)'
+	echo '/vdb/schema/paths = "/usr/share/ncbi/schema"' > $@
+
+$(DST)/etc/ncbi/vdb-copy.kfg: $(DST)
+	echo 'DEBUGGING RPM: (/etc/ncbi/vdb-copy.kfg)'
+	rsync $(VERBOSE) -l --chmod=g-w $(BINDIR)/ncbi/vdb-copy.kfg $@
+
+$(DST): $(PKGDIR)
+#	echo 'DEBUGGING RPM: (DST)'
+	mkdir $(VERBOSE) -p $(DST)/etc/ncbi
+	mkdir $(VERBOSE) -p $(DST)/usr/bin
+	$(MAKE) -s --no-print-directory -f $(TOP)/build/Makefile.rpm \
+		$(TOOLS_TO_INSTALL)
+
+$(DST)/usr/share/ncbi/schema: $(DST)
+	echo 'DEBUGGING RPM: (/usr/share/ncbi/schema)'
+	mkdir $(VERBOSE) -p $@
+	rsync $(VERBOSE) -rmloptD --include '*.vschema' --include='*/' \
+		 --exclude '*' $(VDB_INCDIR)/* $@
+
+$(PKGDIR):
+	echo 'DEBUGGING RPM: (PKGDIR)'
+	mkdir $(VERBOSE) -p $@/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}
+
+$(TOOLS_TO_INSTALL):
+#	echo 'DEBUGGING RPM: (TOOLS_TO_INSTALL)'
+	- ( test -f $(BINDIR)/$@ || ( echo "$@ not found" && false ) ) && \
+		rsync $(VERBOSE) -l $(BINDIR)/$@ $(BINDIR)/$@$(VERSION_EXEX) \
+			$(BINDIR)/$@$(MAJVERS_EXEX) $(DST)/usr/bin
+
+$(SPEC): $(PKGDIR) $(TOP)/build/Makefile.rpm
+#	echo 'DEBUGGING RPM: (SPEC)'
+	mkdir -p $(PKGDIR)/SPECS
+	printf \
+"%%define        __spec_install_post %%{nil}\n"\
+"%%define          debug_package     %%{nil}\n"\
+"%%define        __os_install_post   %%{_dbpath}/brp-compress\n"\
+"\n"\
+"Summary: SRA Toolkit package\n"\
+"Name: sra-toolkit\n"\
+"Version: $(VERSION)\n"\
+"Release: $(REVISION)\n"\
+"License: Public Domain\n"\
+"Group: NCBI/VDB\n"\
+"SOURCE0 : %%{name}-%%{version}.tar.gz\n"\
+"URL: http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software\n"\
+"\n"\
+"BuildRoot: %%{_tmppath}/%%{name}-%%{version}-%%{release}-root\n"\
+"\n"\
+"%%description\n"\
+"%%{summary}\n"\
+"\n"\
+"%%prep\n"\
+"%%setup -q\n"\
+"\n"\
+"%%build\n"\
+"# Empty section.\n"\
+"\n"\
+"%%install\n"\
+"rm   -rf %%{buildroot}\n"\
+"mkdir -p %%{buildroot}\n"\
+"\n"\
+"# in builddir\n"\
+"cp -a * %%{buildroot}\n"\
+"\n"\
+"%%clean\n"\
+"rm -rf %%{buildroot}\n"\
+"\n"\
+"%%files\n"\
+"%%defattr(-,root,root,-)\n"\
+"%%{_bindir}/*\n"\
+"/etc/ncbi/*\n"\
+"/usr/share/ncbi/schema/*/*\n"\
+"\n"\
+"%%post\n"\
+"if [ -e /etc/profile.d/sra-tools.csh ] || [ -e /etc/profile.d/sra-tools.sh  ]"\
+"\n"\
+"then\n"\
+"    FOUND=1\n"\
+"fi\n"\
+'if [ "$$FOUND" != "" ] ; then'\
+"\n"\
+"    echo User installation of sra-tools is found.\n"\
+"    if [ -e /etc/profile.d/sra-tools.csh ] ; then\n"\
+"        mv -v /etc/profile.d/sra-tools.csh /etc/profile.d/sra-tools.csh.bak\n"\
+"    fi\n"\
+"    if [ -e /etc/profile.d/sra-tools.sh ] ; then\n"\
+"        mv -v /etc/profile.d/sra-tools.sh /etc/profile.d/sra-tools.sh.bak\n"\
+"    fi\n"\
+"    echo /etc/profile.d/sra-tools.[c]sh was updated.\n"\
+"    echo You might need to relogin to have your PATH variable updated.\n"\
+"fi\n" > $@
diff --git a/build/Makefile.rules b/build/Makefile.rules
index ba4e481..8a59863 100644
--- a/build/Makefile.rules
+++ b/build/Makefile.rules
@@ -100,10 +100,9 @@ LOC_INFO = -D__mod_name__=$(MODULE) -D__file_name__=$*
 	$(CP) -S -o $@ -fPIC $(NOPT) $<
 
 # yacc and lex
-# these are disabled for now (and LEX and YACC defined as 'true') - use source controlled .c files;
-#$(SRCDIR)/%.c: %.y
+#%.c: %.y
 #	$(YACC) -o $@ $^
-#$(SRCDIR)/%.c: %.l
+#%.c: %.l
 #	$(LEX) -DYY_BUF_SIZE=16777216 -t $< | grep -v '^#line' > $@
 
 # version include generation
diff --git a/build/Makefile.shell b/build/Makefile.shell
index d90b53e..f532a80 100644
--- a/build/Makefile.shell
+++ b/build/Makefile.shell
@@ -24,7 +24,7 @@
 
 CONFIG_FILE = $(TOP)/build/Makefile.config
 ifeq (no, $(shell test -f $(CONFIG_FILE) && echo yes || echo no))
-    $(error "*** File '$(CONFIG_FILE)' is missing. Please run $(TOP)/build/configure")
+    $(error "*** File '$(CONFIG_FILE)' is missing. Please run $(TOP)/configure")
 endif
 
 # determine OS
@@ -35,6 +35,11 @@ ifeq (Darwin, $(UNAME))
 endif
 ifeq (Linux, $(UNAME))
 	HOST_OS = linux
+	OS_DISTRIBUTOR = $(shell lsb_release -si)
+	EXECMDF = $(TOP)/build/ld.linux.exe_cmd.sh
+	ifeq (no, $(shell test -f $(EXECMDF) && echo yes || echo no))
+        	$(error "*** File '$(EXECMDF)' is missing. Please run $(TOP)/configure")
+	endif
 endif
 ifeq (SunOS, $(UNAME))
 	HOST_OS = sun
@@ -55,6 +60,14 @@ BUILD_OS = $(OS)
 ARCHITECTURES = default
 ifeq (mac,$(HOST_OS))
 	HOST_ARCH = $(shell $(TOP)/build/mac.arch.sh)
+	OS_ARCH = $(shell perl $(TOP)/setup/os-arch.perl)
+	CONFIG_FILE_OA = $(TOP)/build/Makefile.config.$(OS_ARCH)
+	ifeq (no, $(shell test -f $(CONFIG_FILE_OA) && echo yes || echo no))
+    	$(error "*** File '$(CONFIG_FILE_OA)' is missing. Please run $(TOP)/configure")
+	endif
+	ifeq (no, $(shell grep CONFIGURE_FOUND_XML2 $(CONFIG_FILE_OA) && echo yes || echo no))
+    	$(error "*** 'CONFIGURE_FOUND_XML2' is missing in $(CONFIG_FILE_OA). Please run $(TOP)/configure")
+	endif
 else
 	MARCH = $(shell uname -m)
 
diff --git a/build/Makefile.sun b/build/Makefile.sun
new file mode 100644
index 0000000..264328e
--- /dev/null
+++ b/build/Makefile.sun
@@ -0,0 +1,96 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+# default compiler
+ifeq (,$(COMP))
+	COMP = gcc
+endif
+
+# architecture
+xARCH = $(shell test -f $(TOP)/build/ARCH.sun && cat $(TOP)/build/ARCH.sun)
+ifneq (,$(xARCH))
+
+  # the user has selected an architecture
+  ifeq (i386,$(xARCH))
+    ARCH = i386
+    BITS = 32
+  endif
+  ifeq (x86_64,$(xARCH))
+    ARCH = x86_64
+    BITS = 64
+  endif
+  ifeq (sparc32,$(xARCH))
+    ARCH = sparc32
+    BITS = 32
+  endif
+  ifeq (sparc64,$(xARCH))
+    ARCH = sparc64
+    BITS = 64
+  endif
+
+endif
+
+# handle attempts to set cross-compilation architecture
+ifeq (sparc,$(findstring sparc,$(ARCH)))
+
+sparc32 sparc64:
+	@ echo $@ > $(TOP)/build/ARCH.sun
+
+i386 x86_64:
+	@ echo "Sun builds do not support cross-compilation to this architecture"
+
+else
+
+sparc32 sparc64:
+	@ echo "Sun builds do not support cross-compilation to this architecture"
+
+i386 x86_64:
+	@ echo $@ > $(TOP)/build/ARCH.sun
+
+endif
+
+.PHONY: sparc32 sparc64 i386 x86_64
+
+# library prefix
+LPFX = lib
+
+# file extensions
+OBJX = o
+LOBX = pic.o
+LIBX = a
+SHLX = so
+
+# compilation defines
+DEFINES	:= -DSUN -DUNIX -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D__EXTENSIONS__
+
+# SunOS is a Unix variant
+OS_DAD = unix
+
+# flex+bison: on sun, use source-controlled generated .c/.h files
+YACC = @ true
+LEX = @ true
+
+# build matrix
+COMPILERS = CC
diff --git a/build/Makefile.sun.cc b/build/Makefile.sun.cc
new file mode 100644
index 0000000..6dd99a5
--- /dev/null
+++ b/build/Makefile.sun.cc
@@ -0,0 +1,155 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+# compilers
+CC = cc -c
+CP = c++ -c
+
+# linkers
+LD = $(TOP)/build/ld.sun.cc.sh cc
+LP = $(TOP)/build/ld.sun.cc.sh c++
+
+# tool options
+ifeq (prof, $(BUILD))
+	PROF := -xpg
+endif
+
+ifeq (dbg, $(BUILD))
+	OPT := -g
+	NOPT := -g
+	PED := -xc99=all -Xc -v
+else
+	OPT := -xO3
+endif
+
+BSTATIC = -Bstatic
+BDYNAMIC = -Bdynamic
+BEGIN_WHOLE_ARCHIVE = 
+END_WHOLE_ARCHIVE = 
+
+## build rules
+
+# assembly
+%.o: %.s
+	$(CC) -o $@ $<
+
+# executable image
+%.o: %.c
+	$(CC) -o $@ $(OPT) -D_LOGGING $(CFLAGS) -xMD $<
+%.o: %.cpp
+	$(CP) -o $@ $(OPT) -D_LOGGING $(CPFLAGS) -xMD $<
+%.o: %.cxx
+	$(CP) -o $@ $(OPT) -D_LOGGING $(CPFLAGS) -xMD $<
+
+# non-optimized executable image
+%.nopt.o: %.c
+	$(CC) -o $@ $(NOPT) -D_LOGGING $(CFLAGS) -xMD $<
+%.nopt.o: %.cpp
+	$(CP) -o $@ $(NOPT) -D_LOGGING $(CPFLAGS) -xMD $<
+%.nopt.o: %.cxx
+	$(CP) -o $@ $(NOPT) -D_LOGGING $(CPFLAGS) -xMD $<
+
+# relocatable image
+%.pic.o: %.c
+	$(CC) -o $@ -kPIC $(OPT) $(CFLAGS) -xMD $<
+%.pic.o: %.cpp
+	$(CP) -o $@ -kPIC $(OPT) $(CPFLAGS) -xMD $<
+%.pic.o: %.cxx
+	$(CP) -o $@ -kPIC $(OPT) $(CPFLAGS) -xMD $<
+
+# non-optimized relocatable image
+%.nopt.pic.o: %.c
+	$(CC) -o $@ -kPIC $(NOPT) $(CFLAGS) -xMD $<
+%.nopt.pic.o: %.cpp
+	$(CP) -o $@ -kPIC $(NOPT) $(CPFLAGS) -xMD $<
+%.nopt.pic.o: %.cxx
+	$(CP) -o $@ -kPIC $(NOPT) $(CPFLAGS) -xMD $<
+
+
+# non-optimized relocatable image, byte swapping
+%.swap.nopt.pic.o: %.c
+	$(CC) -o $@ -DSWAP_PERSISTED -kPIC $(NOPT) $(CFLAGS) -xMD $<
+%.swap.nopt.pic.o: %.cpp
+	$(CP) -o $@ -DSWAP_PERSISTED -kPIC $(NOPT) $(CPFLAGS) -xMD $<
+%.swap.nopt.pic.o: %.cxx
+	$(CP) -o $@ -DSWAP_PERSISTED -kPIC $(NOPT) $(CPFLAGS) -xMD $<
+
+# relocatable image with kapp logging
+%.log.pic.o: %.c
+	$(CC) -o $@ -kPIC $(OPT) -D_LOGGING $(CFLAGS) -xMD $<
+%.log.pic.o: %.cpp
+	$(CP) -o $@ -kPIC $(OPT) -D_LOGGING $(CPFLAGS) -xMD $<
+%.log.pic.o: %.cxx
+	$(CP) -o $@ -kPIC $(OPT) -D_LOGGING $(CPFLAGS) -xMD $<
+
+# non-optimized relocatable image with kapp logging
+%.nopt.log.pic.o: %.c
+	$(CC) -o $@ -kPIC $(NOPT) -D_LOGGING $(CFLAGS) -xMD $<
+%.log.nopt.pic.o: %.c
+	$(CC) -o $@ -kPIC $(NOPT) -D_LOGGING $(CFLAGS) -xMD $<
+%.log.nopt.pic.o: %.cpp
+	$(CP) -o $@ -kPIC $(NOPT) -D_LOGGING $(CPFLAGS) -xMD $<
+%.log.nopt.pic.o: %.cxx
+	$(CP) -o $@ -kPIC $(NOPT) -D_LOGGING $(CPFLAGS) -xMD $<
+
+
+# non-optimized relocatable image with kapp logging, byte swapping
+%.swap.nopt.log.pic.o: %.c
+	$(CC) -o $@ -DSWAP_PERSISTED -kPIC $(NOPT) -D_LOGGING $(CFLAGS) -xMD $<
+%.swap.log.nopt.pic.o: %.c
+	$(CC) -o $@ -DSWAP_PERSISTED -kPIC $(NOPT) -D_LOGGING $(CFLAGS) -xMD $<
+%.swap.log.nopt.pic.o: %.cpp
+	$(CP) -o $@ -DSWAP_PERSISTED -kPIC $(NOPT) -D_LOGGING $(CPFLAGS) -xMD $<
+%.swap.log.nopt.pic.o: %.cxx
+	$(CP) -o $@ -DSWAP_PERSISTED -kPIC $(NOPT) -D_LOGGING $(CPFLAGS) -xMD $<
+
+# assembly language output
+%.s: %.c
+	$(CC) -S -o $@ $(OPT) $(CFLAGS) -xMD $<
+%.s: %.cpp
+	$(CP) -S -o $@ $(OPT) $(CPFLAGS) -xMD $<
+%.s: %.cxx
+	$(CP) -S -o $@ $(OPT) $(CPFLAGS) -xMD $<
+
+%.nopt.s: %.c
+	$(CC) -S -o $@ $(NOPT) $(CFLAGS) -xMD $<
+%.nopt.s: %.cpp
+	$(CP) -S -o $@ $(NOPT) $(CPFLAGS) -xMD $<
+%.nopt.s: %.cxx
+	$(CP) -S -o $@ $(NOPT) $(CPFLAGS) -xMD $<
+
+%.pic.s: %.c
+	$(CC) -S -o $@ -kPIC $(OPT) $(CFLAGS) -xMD $<
+%.pic.s: %.cpp
+	$(CP) -S -o $@ -kPIC $(OPT) $(CPFLAGS) -xMD $<
+%.pic.s: %.cxx
+	$(CP) -S -o $@ -kPIC $(OPT) $(CPFLAGS) -xMD $<
+
+%.nopt.pic.s: %.c
+	$(CC) -S -o $@ -kPIC $(NOPT) $(CFLAGS) -xMD $<
+%.nopt.pic.s: %.cpp
+	$(CP) -S -o $@ -kPIC $(NOPT) $(CPFLAGS) -xMD $<
+%.nopt.pic.s: %.cxx
+	$(CP) -S -o $@ -kPIC $(NOPT) $(CPFLAGS) -xMD $<
diff --git a/build/Makefile.sun.gcc b/build/Makefile.sun.gcc
new file mode 100644
index 0000000..0838f79
--- /dev/null
+++ b/build/Makefile.sun.gcc
@@ -0,0 +1,138 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+# compilers
+CC = gcc -c
+CP = g++ -c
+
+# linkers
+LD = $(TOP)/build/ld.linux.gcc.sh gcc
+LP = $(TOP)/build/ld.linux.gcc.sh g++
+
+# tool options
+ifeq (prof, $(BUILD))
+	PROF := -pg
+endif
+
+ifeq (dbg, $(BUILD))
+	OPT := -g -Wall
+	NOPT := -g -Wall
+	PED := -std=c99 -ansi -pedantic
+else
+
+ifeq (x86_64, $(ARCH))
+	OPT := -O3 -Wall
+else
+	OPT := -O3 -march=pentium4
+endif
+endif
+
+BSTATIC = -Wl,-Bstatic
+BDYNAMIC = -Wl,-Bdynamic
+BEGIN_WHOLE_ARCHIVE = -Wl,-whole-archive
+END_WHOLE_ARCHIVE = -Wl,-no-whole-archive
+
+## build rules
+
+# assembly
+%.o: %.s
+	$(CC) -o $@ $<
+
+# executable image
+%.o: %.c
+	$(CC) -o $@ $(OPT) -D_LOGGING $(CFLAGS) -MD $<
+%.o: %.cpp
+	$(CP) -o $@ $(OPT) -D_LOGGING $(CPFLAGS) -MD $<
+%.o: %.cxx
+	$(CP) -o $@ $(OPT) -D_LOGGING $(CPFLAGS) -MD $<
+
+# non-optimized executable image
+%.nopt.o: %.c
+	$(CC) -o $@ $(NOPT) -D_LOGGING $(CFLAGS) -MD $<
+%.nopt.o: %.cpp
+	$(CP) -o $@ $(NOPT) -D_LOGGING $(CPFLAGS) -MD $<
+%.nopt.o: %.cxx
+	$(CP) -o $@ $(NOPT) -D_LOGGING $(CPFLAGS) -MD $<
+
+# relocatable image
+%.pic.o: %.c
+	$(CC) -o $@ -fPIC $(OPT) $(CFLAGS) -MD $<
+%.pic.o: %.cpp
+	$(CP) -o $@ -fPIC $(OPT) $(CPFLAGS) -MD $<
+%.pic.o: %.cxx
+	$(CP) -o $@ -fPIC $(OPT) $(CPFLAGS) -MD $<
+
+# non-optimized relocatable image
+%.nopt.pic.o: %.c
+	$(CC) -o $@ -fPIC $(NOPT) $(CFLAGS) -MD $<
+%.nopt.pic.o: %.cpp
+	$(CP) -o $@ -fPIC $(NOPT) $(CPFLAGS) -MD $<
+%.nopt.pic.o: %.cxx
+	$(CP) -o $@ -fPIC $(NOPT) $(CPFLAGS) -MD $<
+
+# relocatable image with kapp logging
+%.log.pic.o: %.c
+	$(CC) -o $@ -fPIC $(OPT) -D_LOGGING $(CFLAGS) -MD $<
+%.log.pic.o: %.cpp
+	$(CP) -o $@ -fPIC $(OPT) -D_LOGGING $(CPFLAGS) -MD $<
+%.log.pic.o: %.cxx
+	$(CP) -o $@ -fPIC $(OPT) -D_LOGGING $(CPFLAGS) -MD $<
+
+# non-optimized relocatable image with kapp logging
+%.log.nopt.pic.o: %.c
+	$(CC) -o $@ -fPIC $(NOPT) -D_LOGGING $(CFLAGS) -MD $<
+%.log.nopt.pic.o: %.cpp
+	$(CP) -o $@ -fPIC $(NOPT) -D_LOGGING $(CPFLAGS) -MD $<
+%.log.nopt.pic.o: %.cxx
+	$(CP) -o $@ -fPIC $(NOPT) -D_LOGGING $(CPFLAGS) -MD $<
+
+# assembly language output
+%.s: %.c
+	$(CC) -S -o $@ $(OPT) $(CFLAGS) -MD $<
+%.s: %.cpp
+	$(CP) -S -o $@ $(OPT) $(CPFLAGS) -MD $<
+%.s: %.cxx
+	$(CP) -S -o $@ $(OPT) $(CPFLAGS) -MD $<
+
+%.nopt.s: %.c
+	$(CC) -S -o $@ $(NOPT) $(CFLAGS) -MD $<
+%.nopt.s: %.cpp
+	$(CP) -S -o $@ $(NOPT) $(CPFLAGS) -MD $<
+%.nopt.s: %.cxx
+	$(CP) -S -o $@ $(NOPT) $(CPFLAGS) -MD $<
+
+%.pic.s: %.c
+	$(CC) -S -o $@ -fPIC $(OPT) $(CFLAGS) -MD $<
+%.pic.s: %.cpp
+	$(CP) -S -o $@ -fPIC $(OPT) $(CPFLAGS) -MD $<
+%.pic.s: %.cxx
+	$(CP) -S -o $@ -fPIC $(OPT) $(CPFLAGS) -MD $<
+
+%.nopt.pic.s: %.c
+	$(CC) -S -o $@ -fPIC $(NOPT) $(CFLAGS) -MD $<
+%.nopt.pic.s: %.cpp
+	$(CP) -S -o $@ -fPIC $(NOPT) $(CPFLAGS) -MD $<
+%.nopt.pic.s: %.cxx
+	$(CP) -S -o $@ -fPIC $(NOPT) $(CPFLAGS) -MD $<
diff --git a/build/Makefile.targets b/build/Makefile.targets
index 5e266ca..0690964 100644
--- a/build/Makefile.targets
+++ b/build/Makefile.targets
@@ -103,7 +103,6 @@ $(SUBDIRS_SLOWTESTS):
 
 .PHONY: slowtests $(SUBDIRS_SLOWTESTS)
 
-
 #-------------------------------------------------------------------------------
 # valgrind
 #
@@ -115,3 +114,4 @@ $(SUBDIRS_VALGRIND):
 	@ $(MAKE) -C $(subst _valgrind,,$@) valgrind
 
 .PHONY: valgrind $(SUBDIRS_VALGRIND)
+
diff --git a/build/Makefile.tools b/build/Makefile.tools
new file mode 100644
index 0000000..2a5c302
--- /dev/null
+++ b/build/Makefile.tools
@@ -0,0 +1,39 @@
+TOOLS_TO_INSTALL = \
+	abi-dump        \
+	abi-load        \
+	align-info      \
+	bam-load        \
+	cache-mgr       \
+	cg-load         \
+	copycat         \
+	fastdump        \
+	fastq-dump      \
+	fastq-load      \
+	helicos-load    \
+	illumina-dump   \
+	illumina-load   \
+	kar             \
+	kdbmeta         \
+	latf-load       \
+	prefetch        \
+	rcexplain       \
+	remote-fuser    \
+	sam-dump        \
+	sff-dump        \
+	sff-load        \
+	srapath         \
+	sra-pileup      \
+	sra-sort        \
+	sra-stat        \
+	srf-load        \
+	test-sra        \
+	vdb-config      \
+	vdb-copy        \
+	vdb-decrypt     \
+	vdb-dump        \
+	vdb-encrypt     \
+	vdb-lock        \
+	vdb-passwd      \
+	vdb-unlock      \
+	vdb-validate    \
+
diff --git a/build/Makefile.vc++ b/build/Makefile.vc++
new file mode 100644
index 0000000..4e0163d
--- /dev/null
+++ b/build/Makefile.vc++
@@ -0,0 +1,81 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+# RFLAGS have to go before any other flags since they can affect their handling
+# compilers
+CC = @ $(TOP)/build/win-cc.sh $(BUILD_OS) "cl /c /MD /D_WIN32_WINNT=0x0502" \
+	 $(CHECKSUM) --objx $(OBJX) $(RFLAGS) $(CFLAGS) -MD -D_CRT_SECURE_NO_WARNINGS
+
+CP = @ $(TOP)/build/win-cc.sh $(BUILD_OS) "cl /c /MD" \
+	 $(CHECKSUM) --objx $(OBJX) $(RFLAGS) $(CPFLAGS) -MD -EHsc
+
+
+# C preprocessor
+PP = gcc -E $(CFLAGS)
+
+# linkers
+LD = @ $(TOP)/build/ld.sh $(BUILD_OS) $(ARCH) link \
+	--build $(BUILD) $(RFLAGS) $(LDFLAGS) $(STATIC) $(CHECKSUM) \
+	--objx $(OBJX) --shlx $(SHLX) --libx $(LIBX) \
+	-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR)
+
+LP = @ $(TOP)/build/ld.sh $(BUILD_OS) $(ARCH) link \
+	--build $(BUILD) $(RFLAGS) $(LDFLAGS) $(STATIC) $(CHECKSUM) \
+	--objx $(OBJX) --shlx $(SHLX) --libx $(LIBX) \
+	-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR)
+
+# tool options
+CDECL = -Gd
+STDCALL = -Gz
+CALLCONV = $(CDECL)
+STRING_POOLING = -GF
+OPT := $(STRING_POOLING) $(CALLCONV) -nologo
+NOPT := -Od $(OPT)
+
+ifeq (64,$(BITS))
+	CARCH = #-m64
+	WARN := -wd4101
+else
+	CARCH = #-m32
+	WARN := -wd4101
+endif
+
+ifeq (prof, $(BUILD))
+#	PROF := -pg
+endif
+
+ifeq (dbg, $(BUILD))
+	DBG = -Od
+	OPT += -Zi $(WARN)
+	NOPT += -Zi $(WARN)
+else
+# -Ox caused us failures noticed in libs/vdb/cast.c
+#	OPT += -Ox -w
+# /Ox == /Ob2gity  g is deprecated so removed
+# Removing either the 2 or the t makes it seem to work
+# But there is a warning about not knowing what /Ob is
+# if the 2 is removed.  But not if the 2 is there.
+# Woo hoo...
+	OPT += -Ob2iy  -w
+endif
diff --git a/build/Makefile.vers b/build/Makefile.vers
index 6cfa60e..e276a52 100644
--- a/build/Makefile.vers
+++ b/build/Makefile.vers
@@ -22,5 +22,5 @@
 #
 # ===========================================================================
 
-# NCBI-VDB and library version
+# SRA-TOOLS and library version
 VERSION = 2.7.0
diff --git a/build/Makefile.win b/build/Makefile.win
new file mode 100644
index 0000000..bc13684
--- /dev/null
+++ b/build/Makefile.win
@@ -0,0 +1,79 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+# default compiler
+ifeq (,$(COMP))
+	COMP = vc++
+endif
+
+# handle attempts to set cross-compilation architecture
+ifeq (i386,$(ARCH))
+i386:
+	@ true
+x86_64:
+	@ echo "Windows builds do not support cross-compilation to this architecture"
+endif
+
+ifeq (x86_64,$(ARCH))
+i386:
+	@ echo "Windows builds do not support cross-compilation to this architecture"
+x86_64:
+	@ true
+endif
+
+.PHONY: i386 x86_64
+
+# library prefix
+LPFX = lib
+
+# file extensions
+OBJX = obj
+LOBX = pic.obj
+LIBX = a
+SHLX = lib
+DLLX = dll
+
+# compilation defines
+DEFINES	:= -DWINDOWS -DPKGNAME=win$(BITS)
+
+# flex+bison: make sure only correct versions are used
+# otherwise, use source-controlled generated .c/.h files
+ifeq (bison (GNU Bison) 2.5, $(shell bison -V | grep "2\.5"))
+    YACC = bison -l
+else
+    YACC = @ $(warning bison version 2.5 is not found: $(shell bison -V)) true
+endif
+ifeq (flex 2.5.35, $(shell flex -V))
+    LEX  = flex -L
+else
+    LEX = @ $(warning flex version 2.5.35 is not found: $(shell flex -V)) true
+endif
+
+# build matrix
+COMPILERS = VC++
+
+ifeq (dbg, $(BUILD))
+	PED = -pedantic
+endif
diff --git a/build/Xcode/asm-trace/asm-trace.xcodeproj/project.pbxproj b/build/Xcode/asm-trace/asm-trace.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..43a4878
--- /dev/null
+++ b/build/Xcode/asm-trace/asm-trace.xcodeproj/project.pbxproj
@@ -0,0 +1,4444 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 45;
+	objects = {
+
+/* Begin PBXAggregateTarget section */
+		9D7357F311779B2A009EA3E4 /* make-env */ = {
+			isa = PBXAggregateTarget;
+			buildConfigurationList = 9D7357F611779B49009EA3E4 /* Build configuration list for PBXAggregateTarget "make-env" */;
+			buildPhases = (
+				9D7357F211779B2A009EA3E4 /* ShellScript */,
+			);
+			dependencies = (
+			);
+			name = "make-env";
+			productName = "make-env";
+		};
+/* End PBXAggregateTarget section */
+
+/* Begin PBXBuildFile section */
+		9D1235BC14F571AC00ECC72C /* config-grammar.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D1235B414F571AC00ECC72C /* config-grammar.c */; };
+		9D1235BE14F571AC00ECC72C /* config-lex.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D1235B614F571AC00ECC72C /* config-lex.c */; };
+		9D1EC483122D914C00C11287 /* printf.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D1EC47F122D914C00C11287 /* printf.c */; };
+		9D1EC484122D914C00C11287 /* status-rc-strings.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D1EC480122D914C00C11287 /* status-rc-strings.c */; };
+		9D1EC485122D914C00C11287 /* status-rc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D1EC481122D914C00C11287 /* status-rc.c */; };
+		9D1EC486122D914C00C11287 /* status.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D1EC482122D914C00C11287 /* status.c */; };
+		9D31EC9D1176680A003CDA5E /* bstpersist.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAFE11766366003CDA5E /* bstpersist.c */; };
+		9D31EC9E1176680A003CDA5E /* container.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAFF11766366003CDA5E /* container.c */; };
+		9D31EC9F1176680B003CDA5E /* cp1252.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB0011766366003CDA5E /* cp1252.c */; };
+		9D31ECA01176680B003CDA5E /* crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB0111766366003CDA5E /* crc32.c */; };
+		9D31ECA11176680C003CDA5E /* data-buffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB0211766366003CDA5E /* data-buffer.c */; };
+		9D31ECA21176680C003CDA5E /* iso8859-1.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB0311766366003CDA5E /* iso8859-1.c */; };
+		9D31ECA31176680D003CDA5E /* iso8859.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB0411766366003CDA5E /* iso8859.c */; };
+		9D31ECA41176680D003CDA5E /* log.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB0511766366003CDA5E /* log.c */; };
+		9D31ECA51176680E003CDA5E /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB0611766366003CDA5E /* md5.c */; };
+		9D31ECA61176680E003CDA5E /* namelist.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB0711766366003CDA5E /* namelist.c */; };
+		9D31ECA71176680F003CDA5E /* pack.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB0811766366003CDA5E /* pack.c */; };
+		9D31ECA81176680F003CDA5E /* pbstree.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB0911766366003CDA5E /* pbstree.c */; };
+		9D31ECA911766810003CDA5E /* ptpersist.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB0A11766366003CDA5E /* ptpersist.c */; };
+		9D31ECAA11766810003CDA5E /* ptrie.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB0B11766366003CDA5E /* ptrie.c */; };
+		9D31ECAB11766811003CDA5E /* rc-idx-tbl.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB0C11766366003CDA5E /* rc-idx-tbl.c */; };
+		9D31ECAC11766811003CDA5E /* rc-tbl.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB0D11766366003CDA5E /* rc-tbl.c */; };
+		9D31ECAD11766812003CDA5E /* symtab.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB0E11766366003CDA5E /* symtab.c */; };
+		9D31ECAE11766813003CDA5E /* syslog.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB191176637A003CDA5E /* syslog.c */; settings = {COMPILER_FLAGS = "-I ../../../libs/klib"; }; };
+		9D31ECB011766814003CDA5E /* text.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB1011766366003CDA5E /* text.c */; };
+		9D31ECB111766815003CDA5E /* token.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB1111766366003CDA5E /* token.c */; };
+		9D31ECB211766815003CDA5E /* trie.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB1211766366003CDA5E /* trie.c */; };
+		9D31ECB411766816003CDA5E /* unpack.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB1411766366003CDA5E /* unpack.c */; };
+		9D31ECB511766817003CDA5E /* utf8.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB1511766366003CDA5E /* utf8.c */; };
+		9D31ECB611766818003CDA5E /* vector.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB1611766366003CDA5E /* vector.c */; };
+		9D31ECB711766818003CDA5E /* vlen-encode.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB1711766366003CDA5E /* vlen-encode.c */; };
+		9D320AB0142D02B000ACA5AA /* extract_token.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D320AAE142D02B000ACA5AA /* extract_token.c */; };
+		9D320AB1142D02B000ACA5AA /* strtonum.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D320AAF142D02B000ACA5AA /* strtonum.c */; };
+		9D320AB2142D02B000ACA5AA /* extract_token.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D320AAE142D02B000ACA5AA /* extract_token.c */; };
+		9D320AB3142D02B000ACA5AA /* strtonum.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D320AAF142D02B000ACA5AA /* strtonum.c */; };
+		9D320AB6142D02E600ACA5AA /* sprintf.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D320AB5142D02E600ACA5AA /* sprintf.c */; };
+		9D320AB7142D02E600ACA5AA /* sprintf.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D320AB5142D02E600ACA5AA /* sprintf.c */; };
+		9D4DCEAC1423FD9600881098 /* ref-preserve_qual.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D4DCEAB1423FD9600881098 /* ref-preserve_qual.c */; };
+		9D4DCEAD1423FD9600881098 /* ref-preserve_qual.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D4DCEAB1423FD9600881098 /* ref-preserve_qual.c */; };
+		9D62F42A124D01AE003D38E9 /* bsearch.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D62F428124D01AE003D38E9 /* bsearch.c */; };
+		9D62F42B124D01AE003D38E9 /* qsort.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D62F429124D01AE003D38E9 /* qsort.c */; };
+		9D7A40DB13FADBA3003087FF /* SHA-32bit.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A40D913FADBA3003087FF /* SHA-32bit.c */; };
+		9D7A40DC13FADBA3003087FF /* SHA-64bit.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A40DA13FADBA3003087FF /* SHA-64bit.c */; };
+		9D7A40E113FADBEE003087FF /* syserrcode.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A40DF13FADBEE003087FF /* syserrcode.c */; };
+		9D7A40E213FADBEE003087FF /* systime.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A40E013FADBEE003087FF /* systime.c */; };
+		9D7A40FF13FADCFE003087FF /* buffile-write.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A40EE13FADCFE003087FF /* buffile-write.c */; };
+		9D7A410613FADCFE003087FF /* mmap.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A40F513FADCFE003087FF /* mmap.c */; };
+		9D7A410713FADCFE003087FF /* path-priv.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7A40F613FADCFE003087FF /* path-priv.h */; };
+		9D7A410913FADCFE003087FF /* pmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A40F813FADCFE003087FF /* pmem.c */; };
+		9D7A411613FADD33003087FF /* sysdir-priv.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7A411213FADD33003087FF /* sysdir-priv.h */; };
+		9D7A411713FADD33003087FF /* sysfile-priv.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7A411313FADD33003087FF /* sysfile-priv.h */; };
+		9D7A413B13FADF74003087FF /* stbarrier.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB1D117663AB003CDA5E /* stbarrier.c */; };
+		9D7A413C13FADF75003087FF /* stcond.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB1E117663AB003CDA5E /* stcond.c */; };
+		9D7A413D13FADF75003087FF /* stlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB1F117663AB003CDA5E /* stlock.c */; };
+		9D7A413E13FADF76003087FF /* stsem.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB20117663AB003CDA5E /* stsem.c */; };
+		9D7A413F13FADF76003087FF /* stthread.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB21117663AB003CDA5E /* stthread.c */; };
+		9D7A414013FADF77003087FF /* sttimeout.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB22117663AB003CDA5E /* sttimeout.c */; };
+		9D7A414213FADF79003087FF /* syslock.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB2E117663D4003CDA5E /* syslock.c */; };
+		9D7A415113FADFC6003087FF /* queue.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A414D13FADFC6003087FF /* queue.c */; };
+		9D7A415213FADFC6003087FF /* sem.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A414E13FADFC6003087FF /* sem.c */; };
+		9D7A415F13FAE01B003087FF /* queue.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A414D13FADFC6003087FF /* queue.c */; };
+		9D7A416013FAE01C003087FF /* sem.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A414E13FADFC6003087FF /* sem.c */; };
+		9D7A416113FAE023003087FF /* syscond.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB2B117663C6003CDA5E /* syscond.c */; };
+		9D7A416213FAE024003087FF /* syslock.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A414C13FADFC6003087FF /* syslock.c */; };
+		9D7A416313FAE026003087FF /* systhread.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB2C117663C6003CDA5E /* systhread.c */; };
+		9D7A416413FAE027003087FF /* systimeout.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB2D117663C6003CDA5E /* systimeout.c */; };
+		9D7A422313FAE325003087FF /* btree.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A417D13FAE1DA003087FF /* btree.c */; };
+		9D7A422413FAE333003087FF /* dbmgr-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A419213FAE1DA003087FF /* dbmgr-cmn.c */; };
+		9D7A423913FAE40C003087FF /* libkdb-cmn.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A417813FAE192003087FF /* libkdb-cmn.a */; };
+		9D7A423B13FAE433003087FF /* coldata.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A418013FAE1DA003087FF /* coldata.c */; };
+		9D7A423C13FAE435003087FF /* colidx.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A418313FAE1DA003087FF /* colidx.c */; };
+		9D7A423E13FAE43F003087FF /* colidx0.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A418513FAE1DA003087FF /* colidx0.c */; };
+		9D7A423F13FAE444003087FF /* colidx1.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A418713FAE1DA003087FF /* colidx1.c */; };
+		9D7A424013FAE446003087FF /* colidx2.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A418913FAE1DA003087FF /* colidx2.c */; };
+		9D7A424113FAE470003087FF /* column-cc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A418A13FAE1DA003087FF /* column-cc.c */; };
+		9D7A424213FAE477003087FF /* column.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A418C13FAE1DA003087FF /* column.c */; };
+		9D7A424313FAE47A003087FF /* database-cc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A418D13FAE1DA003087FF /* database-cc.c */; };
+		9D7A424513FAE482003087FF /* database.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A419013FAE1DA003087FF /* database.c */; };
+		9D7A424613FAE484003087FF /* dbcc-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A419113FAE1DA003087FF /* dbcc-cmn.c */; };
+		9D7A424713FAE48A003087FF /* dbmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A419413FAE1DA003087FF /* dbmgr.c */; };
+		9D7A424813FAE499003087FF /* index.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A419B13FAE1DA003087FF /* index.c */; };
+		9D7A424913FAE4B0003087FF /* kdb.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A419D13FAE1DA003087FF /* kdb.c */; };
+		9D7A424A13FAE4B4003087FF /* meta.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41A113FAE1DA003087FF /* meta.c */; };
+		9D7A424B13FAE4B8003087FF /* table-cc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41A413FAE1DA003087FF /* table-cc.c */; };
+		9D7A424C13FAE4BA003087FF /* table.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41A613FAE1DA003087FF /* table.c */; };
+		9D7A424D13FAE4C1003087FF /* trieidx-v1.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41A813FAE1DA003087FF /* trieidx-v1.c */; };
+		9D7A424E13FAE4C2003087FF /* trieidx-v2.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41A913FAE1DA003087FF /* trieidx-v2.c */; };
+		9D7A424F13FAE4C9003087FF /* u64idx-v3.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41AC13FAE1DA003087FF /* u64idx-v3.c */; };
+		9D7A425813FAE616003087FF /* idstats.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A419613FAE1DA003087FF /* idstats.c */; };
+		9D7A425913FAE629003087FF /* trieval-v1.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41AA13FAE1DA003087FF /* trieval-v1.c */; };
+		9D7A425A13FAE62E003087FF /* ptrieval-v1.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41A213FAE1DA003087FF /* ptrieval-v1.c */; };
+		9D7A425B13FAE63F003087FF /* trieval-v2.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41AB13FAE1DA003087FF /* trieval-v2.c */; };
+		9D7A425C13FAE644003087FF /* ptrieval-v2.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41A313FAE1DA003087FF /* ptrieval-v2.c */; };
+		9D7A426113FAE67B003087FF /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC99117667FA003CDA5E /* libklib.dylib */; };
+		9D7A426B13FAE6A5003087FF /* libkdb-cmn.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A417813FAE192003087FF /* libkdb-cmn.a */; };
+		9D7A426C13FAE6A7003087FF /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC99117667FA003CDA5E /* libklib.dylib */; };
+		9D7A426D13FAE6C0003087FF /* wkdb.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41C213FAE1DA003087FF /* wkdb.c */; };
+		9D7A426E13FAE6C5003087FF /* wdbmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41BB13FAE1DA003087FF /* wdbmgr.c */; };
+		9D7A426F13FAE6CC003087FF /* wdatabase.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41BA13FAE1DA003087FF /* wdatabase.c */; };
+		9D7A427013FAE6D5003087FF /* wtable.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41C513FAE1DA003087FF /* wtable.c */; };
+		9D7A427113FAE6E1003087FF /* wcolumn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41B813FAE1DA003087FF /* wcolumn.c */; };
+		9D7A427213FAE6EB003087FF /* wcoldata.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41AE13FAE1DA003087FF /* wcoldata.c */; };
+		9D7A427413FAE89E003087FF /* wcolidx.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41B013FAE1DA003087FF /* wcolidx.c */; };
+		9D7A427513FAE8A4003087FF /* wcolidx0.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41B213FAE1DA003087FF /* wcolidx0.c */; };
+		9D7A427613FAE8A7003087FF /* wcolidx1.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41B413FAE1DA003087FF /* wcolidx1.c */; };
+		9D7A427713FAE8A8003087FF /* wcolidx2.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41B613FAE1DA003087FF /* wcolidx2.c */; };
+		9D7A427813FAE8D6003087FF /* widxblk.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41BE13FAE1DA003087FF /* widxblk.c */; };
+		9D7A427913FAE8DB003087FF /* wmeta.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41C313FAE1DA003087FF /* wmeta.c */; };
+		9D7A427A13FAE8E7003087FF /* windex.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41C013FAE1DA003087FF /* windex.c */; };
+		9D7A427B13FAE8ED003087FF /* wtrieidx-v1.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41C613FAE1DA003087FF /* wtrieidx-v1.c */; };
+		9D7A427C13FAE8EE003087FF /* wtrieidx-v2.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41C713FAE1DA003087FF /* wtrieidx-v2.c */; };
+		9D7A427D13FAE8F4003087FF /* wu64idx-v3.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A41C813FAE1DA003087FF /* wu64idx-v3.c */; };
+		9D7A427E13FAE90F003087FF /* idxblk.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A419813FAE1DA003087FF /* idxblk.c */; };
+		9D7A42E413FAEA2A003087FF /* dbmgr-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A429F13FAEA20003087FF /* dbmgr-cmn.c */; };
+		9D7A42E513FAEA36003087FF /* schema-tok.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42D213FAEA21003087FF /* schema-tok.c */; };
+		9D7A42E613FAEA3C003087FF /* schema-parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42CD13FAEA21003087FF /* schema-parse.c */; };
+		9D7A42E713FAEA45003087FF /* schema-type.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42D413FAEA21003087FF /* schema-type.c */; };
+		9D7A42E813FAEA4C003087FF /* schema-func.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42CB13FAEA21003087FF /* schema-func.c */; };
+		9D7A42E913FAEA54003087FF /* schema-prod.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42D013FAEA21003087FF /* schema-prod.c */; };
+		9D7A42EA13FAEA5A003087FF /* schema-expr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42C913FAEA21003087FF /* schema-expr.c */; };
+		9D7A42EB13FAEA60003087FF /* schema-eval.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42C813FAEA21003087FF /* schema-eval.c */; };
+		9D7A42EC13FAEA65003087FF /* schema-tbl.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42D113FAEA21003087FF /* schema-tbl.c */; };
+		9D7A42ED13FAEA68003087FF /* schema-db.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42C513FAEA21003087FF /* schema-db.c */; };
+		9D7A42EE13FAEA6E003087FF /* schema-dump.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42C613FAEA21003087FF /* schema-dump.c */; };
+		9D7A42EF13FAEA72003087FF /* schema-int.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42CC13FAEA21003087FF /* schema-int.c */; };
+		9D7A42F013FAEA7C003087FF /* schema.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42D513FAEA21003087FF /* schema.c */; };
+		9D7A42F113FAEA85003087FF /* linker-int.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42AA13FAEA20003087FF /* linker-int.c */; };
+		9D7A42F213FAEA8D003087FF /* linker-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42A913FAEA20003087FF /* linker-cmn.c */; };
+		9D7A42F313FAEA95003087FF /* database-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A429B13FAEA20003087FF /* database-cmn.c */; };
+		9D7A42F413FAEA98003087FF /* database-load.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A429C13FAEA20003087FF /* database-load.c */; };
+		9D7A42F513FAEAA0003087FF /* table-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42D713FAEA21003087FF /* table-cmn.c */; };
+		9D7A42F613FAEAA1003087FF /* table-load.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42D813FAEA21003087FF /* table-load.c */; };
+		9D7A42F713FAEAAA003087FF /* cursor-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A429813FAEA20003087FF /* cursor-cmn.c */; };
+		9D7A42F813FAEAB2003087FF /* column-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A429413FAEA20003087FF /* column-cmn.c */; };
+		9D7A42F913FAEABD003087FF /* prod-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42BB13FAEA21003087FF /* prod-cmn.c */; };
+		9D7A42FA13FAEAC0003087FF /* prod-expr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42BC13FAEA21003087FF /* prod-expr.c */; };
+		9D7A42FB13FAEAC4003087FF /* prod-func.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42BE13FAEA21003087FF /* prod-func.c */; };
+		9D7A42FC13FAEACB003087FF /* phys-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42B713FAEA21003087FF /* phys-cmn.c */; };
+		9D7A42FD13FAEAD1003087FF /* phys-load.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42B813FAEA21003087FF /* phys-load.c */; };
+		9D7A42FE13FAEADD003087FF /* blob.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A429113FAEA20003087FF /* blob.c */; };
+		9D7A42FF13FAEAE0003087FF /* blob-headers.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A428E13FAEA20003087FF /* blob-headers.c */; };
+		9D7A430013FAEAE7003087FF /* page-map.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42B413FAEA21003087FF /* page-map.c */; };
+		9D7A430313FAEB42003087FF /* row-id.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42C313FAEA21003087FF /* row-id.c */; };
+		9D7A430413FAEB43003087FF /* row-len.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42C413FAEA21003087FF /* row-len.c */; };
+		9D7A430513FAEB49003087FF /* fixed-row-len.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42A313FAEA20003087FF /* fixed-row-len.c */; };
+		9D7A430613FAEB93003087FF /* merge.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42AD13FAEA21003087FF /* merge.c */; };
+		9D7A430713FAEB99003087FF /* split.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42D613FAEA21003087FF /* split.c */; };
+		9D7A430813FAEBA0003087FF /* compare.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A429713FAEA20003087FF /* compare.c */; };
+		9D7A430913FAEBAE003087FF /* meta-attr-read.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42AF13FAEA21003087FF /* meta-attr-read.c */; };
+		9D7A430B13FAEBB1003087FF /* meta-read.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42B113FAEA21003087FF /* meta-read.c */; };
+		9D7A430C13FAEBB2003087FF /* meta-value.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42B213FAEA21003087FF /* meta-value.c */; };
+		9D7A430D13FAEBBF003087FF /* environment-read.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42A213FAEA20003087FF /* environment-read.c */; };
+		9D7A431013FAEC78003087FF /* cast.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A429313FAEA20003087FF /* cast.c */; };
+		9D7A431113FAEC7A003087FF /* index_lookup.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42A513FAEA20003087FF /* index_lookup.c */; };
+		9D7A431213FAEC7B003087FF /* index_project.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42A613FAEA20003087FF /* index_project.c */; };
+		9D7A431313FAEC7C003087FF /* parameter-read.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42B613FAEA21003087FF /* parameter-read.c */; };
+		9D7A431413FAEC7D003087FF /* range-validate.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42C113FAEA21003087FF /* range-validate.c */; };
+		9D7A431513FAEC7D003087FF /* redimension.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42C213FAEA21003087FF /* redimension.c */; };
+		9D7A431F13FAED40003087FF /* dbmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42A113FAEA20003087FF /* dbmgr.c */; };
+		9D7A432013FAED47003087FF /* linker.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42AC13FAEA21003087FF /* linker.c */; };
+		9D7A432113FAED4E003087FF /* database.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A429E13FAEA20003087FF /* database.c */; };
+		9D7A432213FAED5A003087FF /* table.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42DA13FAEA21003087FF /* table.c */; };
+		9D7A432313FAED61003087FF /* cursor.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A429A13FAEA20003087FF /* cursor.c */; };
+		9D7A432413FAED69003087FF /* column.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A429613FAEA20003087FF /* column.c */; };
+		9D7A432513FAED70003087FF /* prod.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42C013FAEA21003087FF /* prod.c */; };
+		9D7A432613FAED79003087FF /* phys.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42BA13FAEA21003087FF /* phys.c */; };
+		9D7A432913FAEDCC003087FF /* libvdb-cmn.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A428913FAE9B5003087FF /* libvdb-cmn.a */; };
+		9D7A432A13FAEDD9003087FF /* libkdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A423413FAE3F5003087FF /* libkdb.dylib */; };
+		9D7A432D13FAEDE5003087FF /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC99117667FA003CDA5E /* libklib.dylib */; };
+		9D7A433013FAEDF6003087FF /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC90117667C6003CDA5E /* libz.dylib */; };
+		9D7A434213FAEE66003087FF /* wcolumn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42DB13FAEA21003087FF /* wcolumn.c */; };
+		9D7A434313FAEE67003087FF /* wcursor.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42DC13FAEA21003087FF /* wcursor.c */; };
+		9D7A434413FAEE68003087FF /* wdatabase.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42DD13FAEA21003087FF /* wdatabase.c */; };
+		9D7A434513FAEE68003087FF /* wdbmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42DE13FAEA21003087FF /* wdbmgr.c */; };
+		9D7A434613FAEE69003087FF /* wlinker.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42DF13FAEA21003087FF /* wlinker.c */; };
+		9D7A434713FAEE6A003087FF /* wphys.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42E013FAEA21003087FF /* wphys.c */; };
+		9D7A434813FAEE6B003087FF /* wprod.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42E113FAEA21003087FF /* wprod.c */; };
+		9D7A434913FAEE6C003087FF /* wtable.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42E213FAEA21003087FF /* wtable.c */; };
+		9D7A434B13FAEECB003087FF /* index_insert.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42A413FAEA20003087FF /* index_insert.c */; };
+		9D7A434C13FAEED1003087FF /* meta-append.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42AE13FAEA21003087FF /* meta-append.c */; };
+		9D7A434D13FAEEDB003087FF /* meta-write.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42B313FAEA21003087FF /* meta-write.c */; };
+		9D7A434E13FAEEE2003087FF /* meta-attr-write.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A42B013FAEA21003087FF /* meta-attr-write.c */; };
+		9D7A435113FAEF00003087FF /* libwkdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A426813FAE69A003087FF /* libwkdb.dylib */; };
+		9D7A435213FAEF06003087FF /* libvdb-cmn.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A428913FAE9B5003087FF /* libvdb-cmn.a */; };
+		9D7A435313FAEF0E003087FF /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC99117667FA003CDA5E /* libklib.dylib */; };
+		9D7A435613FAEF1F003087FF /* libkmproc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A415C13FAE00E003087FF /* libkmproc.a */; };
+		9D7A435913FAEF26003087FF /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC90117667C6003CDA5E /* libz.dylib */; };
+		9D7A439913FAF20E003087FF /* add-row-id.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436713FAF20D003087FF /* add-row-id.c */; };
+		9D7A439A13FAF20E003087FF /* bit_or.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436813FAF20D003087FF /* bit_or.c */; };
+		9D7A439B13FAF20E003087FF /* bunzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436913FAF20D003087FF /* bunzip.c */; };
+		9D7A439D13FAF20E003087FF /* ceil.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436B13FAF20D003087FF /* ceil.c */; };
+		9D7A439F13FAF20E003087FF /* clip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436D13FAF20D003087FF /* clip.c */; };
+		9D7A43A013FAF20E003087FF /* cut.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436E13FAF20D003087FF /* cut.c */; };
+		9D7A43A113FAF20E003087FF /* delta.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436F13FAF20D003087FF /* delta.c */; };
+		9D7A43A213FAF20E003087FF /* deriv.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437013FAF20D003087FF /* deriv.c */; };
+		9D7A43A313FAF20E003087FF /* diff.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437113FAF20D003087FF /* diff.c */; };
+		9D7A43A413FAF20E003087FF /* echo.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437213FAF20D003087FF /* echo.c */; };
+		9D7A43A613FAF20E003087FF /* exists.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437413FAF20E003087FF /* exists.c */; };
+		9D7A43A713FAF20E003087FF /* floor.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437513FAF20E003087FF /* floor.c */; };
+		9D7A43A913FAF20E003087FF /* funzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437713FAF20E003087FF /* funzip.c */; };
+		9D7A43AB13FAF20E003087FF /* integral.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437913FAF20E003087FF /* integral.c */; };
+		9D7A43AC13FAF20E003087FF /* irzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437A13FAF20E003087FF /* irzip.c */; };
+		9D7A43B513FAF20E003087FF /* map.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438313FAF20E003087FF /* map.c */; };
+		9D7A43B713FAF20E003087FF /* max.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438513FAF20E003087FF /* max.c */; };
+		9D7A43B813FAF20E003087FF /* min.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438613FAF20E003087FF /* min.c */; };
+		9D7A43B913FAF20E003087FF /* outlier-decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438713FAF20E003087FF /* outlier-decoder.c */; };
+		9D7A43BB13FAF20E003087FF /* pack.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438913FAF20E003087FF /* pack.c */; };
+		9D7A43BC13FAF20E003087FF /* paste.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438A13FAF20E003087FF /* paste.c */; };
+		9D7A43BD13FAF20E003087FF /* rand_4na_2na.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438B13FAF20E003087FF /* rand_4na_2na.c */; };
+		9D7A43BE13FAF20E003087FF /* rldecode.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438C13FAF20E003087FF /* rldecode.c */; };
+		9D7A43C013FAF20E003087FF /* round.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438E13FAF20E003087FF /* round.c */; };
+		9D7A43C113FAF20E003087FF /* simple-sub-select.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438F13FAF20E003087FF /* simple-sub-select.c */; };
+		9D7A43C213FAF20E003087FF /* subtract-row-id.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439013FAF20E003087FF /* subtract-row-id.c */; };
+		9D7A43C313FAF20E003087FF /* sum.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439113FAF20E003087FF /* sum.c */; };
+		9D7A43C413FAF20E003087FF /* trim.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439213FAF20E003087FF /* trim.c */; };
+		9D7A43C513FAF20E003087FF /* trunc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439313FAF20E003087FF /* trunc.c */; };
+		9D7A43C613FAF20E003087FF /* undelta.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439413FAF20E003087FF /* undelta.c */; };
+		9D7A43C713FAF20E003087FF /* unpack.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439513FAF20E003087FF /* unpack.c */; };
+		9D7A43C813FAF20E003087FF /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439613FAF20E003087FF /* unzip.c */; };
+		9D7A43C913FAF20E003087FF /* vec-sum.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439713FAF20E003087FF /* vec-sum.c */; };
+		9D7A43CD13FAF23A003087FF /* libvdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A431C13FAED2E003087FF /* libvdb.dylib */; };
+		9D7A43D013FAF245003087FF /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC90117667C6003CDA5E /* libz.dylib */; };
+		9D7A43D613FAF257003087FF /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC99117667FA003CDA5E /* libklib.dylib */; };
+		9D7A43DB13FAF274003087FF /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC8C117667C6003CDA5E /* libbz2.dylib */; };
+		9D7A441413FAF3B5003087FF /* qual4_decode.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F213FAF2EF003087FF /* qual4_decode.c */; };
+		9D7A441513FAF3B5003087FF /* format-spot-name.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E713FAF2EF003087FF /* format-spot-name.c */; };
+		9D7A441713FAF3B5003087FF /* fpcodec.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E813FAF2EF003087FF /* fpcodec.c */; };
+		9D7A441813FAF3B5003087FF /* v0-decompress-init.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A440313FAF2EF003087FF /* v0-decompress-init.c */; };
+		9D7A441913FAF3B5003087FF /* extract-coordinates.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E313FAF2EF003087FF /* extract-coordinates.c */; };
+		9D7A441A13FAF3B5003087FF /* qual4_codec.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7A43F113FAF2EF003087FF /* qual4_codec.h */; };
+		9D7A441B13FAF3B5003087FF /* libwsraxf.vers.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7A43EB13FAF2EF003087FF /* libwsraxf.vers.h */; };
+		9D7A441C13FAF3B5003087FF /* untyped.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A440213FAF2EF003087FF /* untyped.c */; };
+		9D7A441D13FAF3B5003087FF /* color-from-dna.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43DF13FAF2EF003087FF /* color-from-dna.c */; };
+		9D7A441E13FAF3B5003087FF /* tokenize-spot_name-454.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43FC13FAF2EF003087FF /* tokenize-spot_name-454.c */; };
+		9D7A441F13FAF3B5003087FF /* process-position.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F013FAF2EF003087FF /* process-position.c */; };
+		9D7A442113FAF3B5003087FF /* bio-start.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43DE13FAF2EF003087FF /* bio-start.c */; };
+		9D7A442213FAF3B5003087FF /* normalize.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43EE13FAF2EF003087FF /* normalize.c */; };
+		9D7A442313FAF3B5003087FF /* rewrite-spot-name.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F613FAF2EF003087FF /* rewrite-spot-name.c */; };
+		9D7A442413FAF3B5003087FF /* v0-decompress-local.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7A440413FAF2EF003087FF /* v0-decompress-local.h */; };
+		9D7A442513FAF3B5003087FF /* tokenize-spot_name-abi.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43FD13FAF2EF003087FF /* tokenize-spot_name-abi.c */; };
+		9D7A442613FAF3B5003087FF /* tokenize-spot_name-ion-torrent.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A440013FAF2EF003087FF /* tokenize-spot_name-ion-torrent.c */; };
+		9D7A442713FAF3B5003087FF /* v0-decompress.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A440513FAF2EF003087FF /* v0-decompress.c */; };
+		9D7A442913FAF3B5003087FF /* swap.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43FB13FAF2EF003087FF /* swap.c */; };
+		9D7A442A13FAF3B5003087FF /* spot-desc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F813FAF2EF003087FF /* spot-desc.c */; };
+		9D7A442B13FAF3B5003087FF /* tokenize-spot_name-helicos.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43FE13FAF2EF003087FF /* tokenize-spot_name-helicos.c */; };
+		9D7A442C13FAF3B5003087FF /* denormalize.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E013FAF2EF003087FF /* denormalize.c */; };
+		9D7A442D13FAF3B5003087FF /* make-position.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43EC13FAF2EF003087FF /* make-position.c */; };
+		9D7A442F13FAF3B5003087FF /* tokenize-spot_name-illumina.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43FF13FAF2EF003087FF /* tokenize-spot_name-illumina.c */; };
+		9D7A443013FAF3B5003087FF /* dna-from-color.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E113FAF2EF003087FF /* dna-from-color.c */; };
+		9D7A443113FAF3B5003087FF /* index_lookup.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E913FAF2EF003087FF /* index_lookup.c */; };
+		9D7A443213FAF3B5003087FF /* libsraxf.vers.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7A43EA13FAF2EF003087FF /* libsraxf.vers.h */; };
+		9D7A443313FAF3B5003087FF /* extract-name_coord.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E413FAF2EF003087FF /* extract-name_coord.c */; };
+		9D7A443513FAF3B5003087FF /* v0-funcs.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A440713FAF2EF003087FF /* v0-funcs.c */; };
+		9D7A443613FAF3B5003087FF /* rotate.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F713FAF2EF003087FF /* rotate.c */; };
+		9D7A443813FAF3B5003087FF /* read-seg-from-readn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F513FAF2EF003087FF /* read-seg-from-readn.c */; };
+		9D7A443913FAF3B5003087FF /* v0-decompress.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7A440613FAF2EF003087FF /* v0-decompress.h */; };
+		9D7A443A13FAF3B5003087FF /* dynamic-454-read-descriptor.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E213FAF2EF003087FF /* dynamic-454-read-descriptor.c */; };
+		9D7A443B13FAF3B5003087FF /* name-tokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7A43ED13FAF2EF003087FF /* name-tokenizer.h */; };
+		9D7A443C13FAF3B5003087FF /* untyped-priv.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7A440113FAF2EF003087FF /* untyped-priv.h */; };
+		9D7A443D13FAF3B5003087FF /* read-desc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F413FAF2EF003087FF /* read-desc.c */; };
+		9D7A444313FAF3F6003087FF /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC99117667FA003CDA5E /* libklib.dylib */; };
+		9D7A444613FAF402003087FF /* libvdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A431C13FAED2E003087FF /* libvdb.dylib */; };
+		9D7A444913FAF411003087FF /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC90117667C6003CDA5E /* libz.dylib */; };
+		9D7A444C13FAF41C003087FF /* libkdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A423413FAE3F5003087FF /* libkdb.dylib */; };
+		9D7A445B13FAF49A003087FF /* agrep-myersunltd.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A445213FAF48E003087FF /* agrep-myersunltd.c */; };
+		9D7A445C13FAF49A003087FF /* agrep-wumanber.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A445313FAF48E003087FF /* agrep-wumanber.c */; };
+		9D7A445D13FAF49A003087FF /* libksrch.vers.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7A445713FAF48E003087FF /* libksrch.vers.h */; };
+		9D7A445E13FAF49A003087FF /* agrep-myers.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A445113FAF48E003087FF /* agrep-myers.c */; };
+		9D7A445F13FAF49A003087FF /* fgrep-boyermoore.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A445513FAF48E003087FF /* fgrep-boyermoore.c */; };
+		9D7A446013FAF49A003087FF /* search-priv.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D7A445913FAF48E003087FF /* search-priv.h */; };
+		9D7A446113FAF49A003087FF /* fgrep-dumb.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A445613FAF48E003087FF /* fgrep-dumb.c */; };
+		9D7A446213FAF49A003087FF /* search.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A445A13FAF48E003087FF /* search.c */; };
+		9D7A446313FAF49A003087FF /* agrep-dp.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A445013FAF48E003087FF /* agrep-dp.c */; };
+		9D7A446413FAF49A003087FF /* fgrep-aho.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A445413FAF48E003087FF /* fgrep-aho.c */; };
+		9D7A446513FAF49A003087FF /* nucstrstr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A445813FAF48E003087FF /* nucstrstr.c */; };
+		9D7A448F13FAF56D003087FF /* seq-restore-read.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A448613FAF539003087FF /* seq-restore-read.c */; };
+		9D7A449013FAF56D003087FF /* raw-restore-read.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A448213FAF539003087FF /* raw-restore-read.c */; };
+		9D7A449113FAF56D003087FF /* align-restore-read.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447B13FAF539003087FF /* align-restore-read.c */; };
+		9D7A449213FAF56D003087FF /* ref-tbl-sub-select.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A448413FAF539003087FF /* ref-tbl-sub-select.c */; };
+		9D7A449313FAF56D003087FF /* align-local_ref_id.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447613FAF539003087FF /* align-local_ref_id.c */; };
+		9D7A449413FAF56D003087FF /* align-ref-pos.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447913FAF539003087FF /* align-ref-pos.c */; };
+		9D7A449613FAF56D003087FF /* align-ref-seq-id.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447A13FAF539003087FF /* align-ref-seq-id.c */; };
+		9D7A449713FAF56D003087FF /* cigar.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447C13FAF539003087FF /* cigar.c */; };
+		9D7A449813FAF56D003087FF /* align-ref-name.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447813FAF539003087FF /* align-ref-name.c */; };
+		9D7A449913FAF56D003087FF /* template-len.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A448713FAF539003087FF /* template-len.c */; };
+		9D7A449A13FAF56D003087FF /* get-sam-flags.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447D13FAF539003087FF /* get-sam-flags.c */; };
+		9D7A449B13FAF56D003087FF /* ref-restore-read.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A448313FAF539003087FF /* ref-restore-read.c */; };
+		9D7A449C13FAF56D003087FF /* align-local_ref_start.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447713FAF539003087FF /* align-local_ref_start.c */; };
+		9D7A449D13FAF56D003087FF /* project_read_from_sequence.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A448113FAF539003087FF /* project_read_from_sequence.c */; };
+		9D7A449E13FAF56D003087FF /* not-my-row.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A448013FAF539003087FF /* not-my-row.c */; };
+		9D7A44A313FAF59D003087FF /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC99117667FA003CDA5E /* libklib.dylib */; };
+		9D7A44A613FAF5A9003087FF /* libvdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A431C13FAED2E003087FF /* libvdb.dylib */; };
+		9D7A44C913FB04C2003087FF /* reader-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A44AE13FB0494003087FF /* reader-cmn.c */; };
+		9D7A44CA13FB04C2003087FF /* refseq-mgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A44B213FB0494003087FF /* refseq-mgr.c */; };
+		9D7A44CB13FB04C2003087FF /* reader-refseq.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A44B013FB0494003087FF /* reader-refseq.c */; };
+		9D7A44D013FB04D8003087FF /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC99117667FA003CDA5E /* libklib.dylib */; };
+		9D7A44D113FB04DC003087FF /* libvdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A431C13FAED2E003087FF /* libvdb.dylib */; };
+		9D7A44D413FB04EF003087FF /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC90117667C6003CDA5E /* libz.dylib */; };
+		9D7A44D913FB051B003087FF /* libkdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A423413FAE3F5003087FF /* libkdb.dylib */; };
+		9D7A44DC13FB0537003087FF /* libalign.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A44C013FB04A9003087FF /* libalign.dylib */; };
+		9D7A453413FB0A5A003087FF /* bzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436A13FAF20D003087FF /* bzip.c */; };
+		9D7A453513FB0A5D003087FF /* checksum.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436C13FAF20D003087FF /* checksum.c */; };
+		9D7A453613FB0A65003087FF /* fzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437813FAF20E003087FF /* fzip.c */; };
+		9D7A453813FB0A7A003087FF /* outlier-encoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438813FAF20E003087FF /* outlier-encoder.c */; };
+		9D7A453913FB0A82003087FF /* rlencode.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438D13FAF20E003087FF /* rlencode.c */; };
+		9D7A453A13FB0A8E003087FF /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439813FAF20E003087FF /* zip.c */; };
+		9D7A453D13FB0AB1003087FF /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC90117667C6003CDA5E /* libz.dylib */; };
+		9D7A453E13FB0AB2003087FF /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC8C117667C6003CDA5E /* libbz2.dylib */; };
+		9D7A454113FB0AC9003087FF /* libwvdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A433713FAEE0C003087FF /* libwvdb.dylib */; };
+		9D7A454213FB0ACF003087FF /* libwkdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A426813FAE69A003087FF /* libwkdb.dylib */; };
+		9D7A454313FB0AD5003087FF /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC99117667FA003CDA5E /* libklib.dylib */; };
+		9D7A454E13FB0B5F003087FF /* extract-name_fmt.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E513FAF2EF003087FF /* extract-name_fmt.c */; };
+		9D7A454F13FB0B60003087FF /* extract-spot_name.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E613FAF2EF003087FF /* extract-spot_name.c */; };
+		9D7A455013FB0B6C003087FF /* stats.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43FA13FAF2EF003087FF /* stats.c */; };
+		9D7A455113FB0B6C003087FF /* stats_quality.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F913FAF2EF003087FF /* stats_quality.c */; };
+		9D7A455213FB0B76003087FF /* qual4_encode.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F313FAF2EF003087FF /* qual4_encode.c */; };
+		9D7A455513FB0B86003087FF /* libwvdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A433713FAEE0C003087FF /* libwvdb.dylib */; };
+		9D7A455613FB0B8B003087FF /* libwkdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A426813FAE69A003087FF /* libwkdb.dylib */; };
+		9D7A455713FB0B91003087FF /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC99117667FA003CDA5E /* libklib.dylib */; };
+		9D7A455B13FB0BCE003087FF /* qual4_decode.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F213FAF2EF003087FF /* qual4_decode.c */; };
+		9D7A455C13FB0BCE003087FF /* format-spot-name.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E713FAF2EF003087FF /* format-spot-name.c */; };
+		9D7A455D13FB0BCE003087FF /* fpcodec.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E813FAF2EF003087FF /* fpcodec.c */; };
+		9D7A455E13FB0BCE003087FF /* v0-decompress-init.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A440313FAF2EF003087FF /* v0-decompress-init.c */; };
+		9D7A455F13FB0BCE003087FF /* extract-coordinates.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E313FAF2EF003087FF /* extract-coordinates.c */; };
+		9D7A456013FB0BCE003087FF /* untyped.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A440213FAF2EF003087FF /* untyped.c */; };
+		9D7A456113FB0BCE003087FF /* color-from-dna.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43DF13FAF2EF003087FF /* color-from-dna.c */; };
+		9D7A456213FB0BCE003087FF /* tokenize-spot_name-454.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43FC13FAF2EF003087FF /* tokenize-spot_name-454.c */; };
+		9D7A456313FB0BCE003087FF /* process-position.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F013FAF2EF003087FF /* process-position.c */; };
+		9D7A456513FB0BCE003087FF /* bio-start.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43DE13FAF2EF003087FF /* bio-start.c */; };
+		9D7A456613FB0BCE003087FF /* normalize.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43EE13FAF2EF003087FF /* normalize.c */; };
+		9D7A456713FB0BCE003087FF /* rewrite-spot-name.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F613FAF2EF003087FF /* rewrite-spot-name.c */; };
+		9D7A456813FB0BCE003087FF /* v0-decompress.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A440513FAF2EF003087FF /* v0-decompress.c */; };
+		9D7A456913FB0BCE003087FF /* tokenize-spot_name-abi.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43FD13FAF2EF003087FF /* tokenize-spot_name-abi.c */; };
+		9D7A456A13FB0BCE003087FF /* tokenize-spot_name-ion-torrent.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A440013FAF2EF003087FF /* tokenize-spot_name-ion-torrent.c */; };
+		9D7A456B13FB0BCE003087FF /* swap.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43FB13FAF2EF003087FF /* swap.c */; };
+		9D7A456C13FB0BCE003087FF /* spot-desc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F813FAF2EF003087FF /* spot-desc.c */; };
+		9D7A456D13FB0BCE003087FF /* tokenize-spot_name-helicos.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43FE13FAF2EF003087FF /* tokenize-spot_name-helicos.c */; };
+		9D7A456E13FB0BCE003087FF /* denormalize.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E013FAF2EF003087FF /* denormalize.c */; };
+		9D7A456F13FB0BCE003087FF /* make-position.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43EC13FAF2EF003087FF /* make-position.c */; };
+		9D7A457013FB0BCE003087FF /* tokenize-spot_name-illumina.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43FF13FAF2EF003087FF /* tokenize-spot_name-illumina.c */; };
+		9D7A457113FB0BCE003087FF /* dna-from-color.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E113FAF2EF003087FF /* dna-from-color.c */; };
+		9D7A457213FB0BCE003087FF /* index_lookup.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E913FAF2EF003087FF /* index_lookup.c */; };
+		9D7A457313FB0BCE003087FF /* extract-name_coord.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E413FAF2EF003087FF /* extract-name_coord.c */; };
+		9D7A457413FB0BCE003087FF /* v0-funcs.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A440713FAF2EF003087FF /* v0-funcs.c */; };
+		9D7A457513FB0BCE003087FF /* rotate.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F713FAF2EF003087FF /* rotate.c */; };
+		9D7A457613FB0BCE003087FF /* read-seg-from-readn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F513FAF2EF003087FF /* read-seg-from-readn.c */; };
+		9D7A457713FB0BCE003087FF /* dynamic-454-read-descriptor.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43E213FAF2EF003087FF /* dynamic-454-read-descriptor.c */; };
+		9D7A457813FB0BCE003087FF /* read-desc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A43F413FAF2EF003087FF /* read-desc.c */; };
+		9D7A457D13FB0C28003087FF /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC90117667C6003CDA5E /* libz.dylib */; };
+		9D7A458113FB0C53003087FF /* exists.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437413FAF20E003087FF /* exists.c */; };
+		9D7A458213FB0C53003087FF /* bunzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436913FAF20D003087FF /* bunzip.c */; };
+		9D7A458313FB0C53003087FF /* trim.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439213FAF20E003087FF /* trim.c */; };
+		9D7A458413FB0C53003087FF /* rldecode.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438C13FAF20E003087FF /* rldecode.c */; };
+		9D7A458513FB0C53003087FF /* ceil.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436B13FAF20D003087FF /* ceil.c */; };
+		9D7A458713FB0C53003087FF /* paste.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438A13FAF20E003087FF /* paste.c */; };
+		9D7A458813FB0C53003087FF /* max.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438513FAF20E003087FF /* max.c */; };
+		9D7A458913FB0C53003087FF /* vec-sum.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439713FAF20E003087FF /* vec-sum.c */; };
+		9D7A458A13FB0C53003087FF /* echo.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437213FAF20D003087FF /* echo.c */; };
+		9D7A458B13FB0C53003087FF /* add-row-id.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436713FAF20D003087FF /* add-row-id.c */; };
+		9D7A458C13FB0C53003087FF /* delta.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436F13FAF20D003087FF /* delta.c */; };
+		9D7A458D13FB0C53003087FF /* floor.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437513FAF20E003087FF /* floor.c */; };
+		9D7A458E13FB0C53003087FF /* subtract-row-id.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439013FAF20E003087FF /* subtract-row-id.c */; };
+		9D7A458F13FB0C53003087FF /* outlier-decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438713FAF20E003087FF /* outlier-decoder.c */; };
+		9D7A459013FB0C53003087FF /* deriv.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437013FAF20D003087FF /* deriv.c */; };
+		9D7A459113FB0C53003087FF /* bit_or.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436813FAF20D003087FF /* bit_or.c */; };
+		9D7A459313FB0C53003087FF /* irzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437A13FAF20E003087FF /* irzip.c */; };
+		9D7A459413FB0C53003087FF /* map.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438313FAF20E003087FF /* map.c */; };
+		9D7A459513FB0C53003087FF /* pack.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438913FAF20E003087FF /* pack.c */; };
+		9D7A459613FB0C53003087FF /* sum.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439113FAF20E003087FF /* sum.c */; };
+		9D7A459713FB0C53003087FF /* unpack.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439513FAF20E003087FF /* unpack.c */; };
+		9D7A459813FB0C53003087FF /* simple-sub-select.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438F13FAF20E003087FF /* simple-sub-select.c */; };
+		9D7A459913FB0C53003087FF /* rand_4na_2na.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438B13FAF20E003087FF /* rand_4na_2na.c */; };
+		9D7A459A13FB0C53003087FF /* min.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438613FAF20E003087FF /* min.c */; };
+		9D7A459B13FB0C53003087FF /* trunc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439313FAF20E003087FF /* trunc.c */; };
+		9D7A459C13FB0C53003087FF /* round.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A438E13FAF20E003087FF /* round.c */; };
+		9D7A459D13FB0C53003087FF /* integral.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437913FAF20E003087FF /* integral.c */; };
+		9D7A459E13FB0C53003087FF /* cut.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436E13FAF20D003087FF /* cut.c */; };
+		9D7A459F13FB0C53003087FF /* funzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437713FAF20E003087FF /* funzip.c */; };
+		9D7A45A013FB0C53003087FF /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439613FAF20E003087FF /* unzip.c */; };
+		9D7A45A113FB0C53003087FF /* undelta.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A439413FAF20E003087FF /* undelta.c */; };
+		9D7A45A213FB0C53003087FF /* clip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A436D13FAF20D003087FF /* clip.c */; };
+		9D7A45A313FB0C53003087FF /* diff.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437113FAF20D003087FF /* diff.c */; };
+		9D7A45B113FB0CB8003087FF /* seq-restore-read.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A448613FAF539003087FF /* seq-restore-read.c */; };
+		9D7A45B213FB0CB8003087FF /* raw-restore-read.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A448213FAF539003087FF /* raw-restore-read.c */; };
+		9D7A45B313FB0CB8003087FF /* align-restore-read.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447B13FAF539003087FF /* align-restore-read.c */; };
+		9D7A45B413FB0CB8003087FF /* ref-tbl-sub-select.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A448413FAF539003087FF /* ref-tbl-sub-select.c */; };
+		9D7A45B513FB0CB8003087FF /* align-local_ref_id.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447613FAF539003087FF /* align-local_ref_id.c */; };
+		9D7A45B613FB0CB8003087FF /* align-ref-pos.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447913FAF539003087FF /* align-ref-pos.c */; };
+		9D7A45B713FB0CB8003087FF /* align-ref-seq-id.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447A13FAF539003087FF /* align-ref-seq-id.c */; };
+		9D7A45B813FB0CB8003087FF /* cigar.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447C13FAF539003087FF /* cigar.c */; };
+		9D7A45B913FB0CB8003087FF /* align-ref-name.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447813FAF539003087FF /* align-ref-name.c */; };
+		9D7A45BA13FB0CB8003087FF /* template-len.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A448713FAF539003087FF /* template-len.c */; };
+		9D7A45BB13FB0CB8003087FF /* get-sam-flags.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447D13FAF539003087FF /* get-sam-flags.c */; };
+		9D7A45BC13FB0CB8003087FF /* ref-restore-read.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A448313FAF539003087FF /* ref-restore-read.c */; };
+		9D7A45BD13FB0CB8003087FF /* align-local_ref_start.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A447713FAF539003087FF /* align-local_ref_start.c */; };
+		9D7A45BE13FB0CB8003087FF /* project_read_from_sequence.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A448113FAF539003087FF /* project_read_from_sequence.c */; };
+		9D7A45BF13FB0CB8003087FF /* not-my-row.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A448013FAF539003087FF /* not-my-row.c */; };
+		9D7A45C113FB0CB8003087FF /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC99117667FA003CDA5E /* libklib.dylib */; };
+		9D7A45C313FB0CB8003087FF /* libalign.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A44C013FB04A9003087FF /* libalign.dylib */; };
+		9D7A45C813FB0CE4003087FF /* refseq-stats.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A448513FAF539003087FF /* refseq-stats.c */; };
+		9D7A45CB13FB0D18003087FF /* libwvdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A433713FAEE0C003087FF /* libwvdb.dylib */; };
+		9D7A45CE13FB0D24003087FF /* libwkdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A426813FAE69A003087FF /* libwkdb.dylib */; };
+		9D7A45DC13FB0D50003087FF /* reader-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A44AE13FB0494003087FF /* reader-cmn.c */; };
+		9D7A45DD13FB0D50003087FF /* refseq-mgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A44B213FB0494003087FF /* refseq-mgr.c */; };
+		9D7A45DE13FB0D50003087FF /* reader-refseq.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A44B013FB0494003087FF /* reader-refseq.c */; };
+		9D7A45E013FB0D50003087FF /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC99117667FA003CDA5E /* libklib.dylib */; };
+		9D7A45E213FB0D50003087FF /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC90117667C6003CDA5E /* libz.dylib */; };
+		9D7A45E813FB0D72003087FF /* libwvdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A433713FAEE0C003087FF /* libwvdb.dylib */; };
+		9D7A45E913FB0D76003087FF /* libwkdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A426813FAE69A003087FF /* libwkdb.dylib */; };
+		9D7A45EA13FB0D95003087FF /* writer-alignment.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A44B413FB0494003087FF /* writer-alignment.c */; };
+		9D7A45EB13FB0D95003087FF /* writer-reference.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A44B913FB0494003087FF /* writer-reference.c */; };
+		9D7A45EC13FB0D95003087FF /* writer-ref.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A44B713FB0494003087FF /* writer-ref.c */; };
+		9D7A45ED13FB0D95003087FF /* writer-refseq.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A44BA13FB0494003087FF /* writer-refseq.c */; };
+		9D7A45EE13FB0D95003087FF /* writer-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A44B513FB0494003087FF /* writer-cmn.c */; };
+		9D7A45EF13FB0D95003087FF /* writer-sequence.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A44BB13FB0494003087FF /* writer-sequence.c */; };
+		9D7A460A13FB0F52003087FF /* progressbar.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A460213FB0F0F003087FF /* progressbar.c */; };
+		9D7A460B13FB0F52003087FF /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAB311766257003CDA5E /* main.c */; };
+		9D7A460C13FB0F52003087FF /* args.c in Sources */ = {isa = PBXBuildFile; fileRef = 9DB6A77911E61CB700168DE0 /* args.c */; };
+		9D7A460D13FB0F52003087FF /* sysmain.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAB71176626A003CDA5E /* sysmain.c */; };
+		9D7A461813FB1140003087FF /* deseq.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A461013FB1128003087FF /* deseq.c */; };
+		9D7A461913FB114C003087FF /* libkapp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A460713FB0F36003087FF /* libkapp.a */; };
+		9D7A463B13FB135F003087FF /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC99117667FA003CDA5E /* libklib.dylib */; };
+		9D8198A911D3D39700DA4D3C /* vector_namelist.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D8198A811D3D39700DA4D3C /* vector_namelist.c */; };
+		9D8204F8130F1100009A8B64 /* pagefile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D8204F7130F1100009A8B64 /* pagefile.c */; };
+		9D8EC41B11C2E49E000F1048 /* pbstree-native.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D8EC41911C2E49E000F1048 /* pbstree-native.c */; };
+		9D8EC41C11C2E49E000F1048 /* pbstree-swapped.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D8EC41A11C2E49E000F1048 /* pbstree-swapped.c */; };
+		9D90F4DB140D8229004A99D6 /* libwvdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A433713FAEE0C003087FF /* libwvdb.dylib */; };
+		9D985E8D12886C6100849729 /* config.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D985E8C12886C6100849729 /* config.c */; };
+		9DA3A84E125FA3A8005AD5BB /* refcount.c in Sources */ = {isa = PBXBuildFile; fileRef = 9DA3A84D125FA3A8005AD5BB /* refcount.c */; };
+		9DA3A88512663646005AD5BB /* syswriter.c in Sources */ = {isa = PBXBuildFile; fileRef = 9DA3A88412663646005AD5BB /* syswriter.c */; settings = {COMPILER_FLAGS = "-I ../../../libs/klib"; }; };
+		9DA3A8961266375B005AD5BB /* writer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9DA3A8951266375B005AD5BB /* writer.c */; };
+		9DA3A89A12663798005AD5BB /* out.c in Sources */ = {isa = PBXBuildFile; fileRef = 9DA3A89912663798005AD5BB /* out.c */; };
+		9DE559C6140E831000EA61C6 /* libwaxf.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A45C713FB0CB8003087FF /* libwaxf.dylib */; };
+		9DE559C7140E831800EA61C6 /* libwvxf.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A452F13FB0A3C003087FF /* libwvxf.dylib */; };
+		9DE559C8140E831C00EA61C6 /* libwsraxf.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A454B13FB0B4D003087FF /* libwsraxf.dylib */; };
+		9DE55A23140E94B700EA61C6 /* iunzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437C13FAF20E003087FF /* iunzip.c */; };
+		9DE55A28140E94CB00EA61C6 /* iunzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D7A437C13FAF20E003087FF /* iunzip.c */; };
+		9DE55A79140EA19500EA61C6 /* raw-restore-qual.c in Sources */ = {isa = PBXBuildFile; fileRef = 9DE55A78140EA19500EA61C6 /* raw-restore-qual.c */; };
+		9DE55A7A140EA1CA00EA61C6 /* raw-restore-qual.c in Sources */ = {isa = PBXBuildFile; fileRef = 9DE55A78140EA19500EA61C6 /* raw-restore-qual.c */; };
+		9DE55A85140EA93600EA61C6 /* generate-mismatch-qual.c in Sources */ = {isa = PBXBuildFile; fileRef = 9DE55A84140EA93600EA61C6 /* generate-mismatch-qual.c */; };
+		9DE55A86140EA93600EA61C6 /* generate-mismatch-qual.c in Sources */ = {isa = PBXBuildFile; fileRef = 9DE55A84140EA93600EA61C6 /* generate-mismatch-qual.c */; };
+		9DE55AAF140EC79C00EA61C6 /* mismatch-restore-qual.c in Sources */ = {isa = PBXBuildFile; fileRef = 9DE55AAE140EC79C00EA61C6 /* mismatch-restore-qual.c */; };
+		9DE55AB0140EC79C00EA61C6 /* mismatch-restore-qual.c in Sources */ = {isa = PBXBuildFile; fileRef = 9DE55AAE140EC79C00EA61C6 /* mismatch-restore-qual.c */; };
+		9DE55AFC140EF0B100EA61C6 /* libwkdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7A426813FAE69A003087FF /* libwkdb.dylib */; };
+		9DF1902C128DAEBA00FED4AA /* debug.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D1EC47B122D912500C11287 /* debug.c */; };
+		9DFECDC511766952004EFD0D /* xml.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EB3011766409003CDA5E /* xml.c */; };
+		9DFECDC711766982004EFD0D /* arc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAE011766306003CDA5E /* arc.c */; };
+		9DFECDC811766982004EFD0D /* buffile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAE111766306003CDA5E /* buffile.c */; };
+		9DFECDC911766982004EFD0D /* bzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAE211766306003CDA5E /* bzip.c */; };
+		9DFECDCA11766982004EFD0D /* countfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAE311766306003CDA5E /* countfile.c */; };
+		9DFECDCB11766982004EFD0D /* crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAE411766306003CDA5E /* crc32.c */; };
+		9DFECDCC11766982004EFD0D /* dir_test.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAE511766306003CDA5E /* dir_test.c */; };
+		9DFECDCD11766982004EFD0D /* directory.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAE611766306003CDA5E /* directory.c */; };
+		9DFECDCE11766982004EFD0D /* file.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAEA11766306003CDA5E /* file.c */; };
+		9DFECDD011766982004EFD0D /* gzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAEC11766306003CDA5E /* gzip.c */; };
+		9DFECDD111766982004EFD0D /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAED11766306003CDA5E /* md5.c */; };
+		9DFECDD211766982004EFD0D /* nullfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAEE11766306003CDA5E /* nullfile.c */; };
+		9DFECDD311766982004EFD0D /* sra.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAEF11766306003CDA5E /* sra.c */; };
+		9DFECDD411766982004EFD0D /* subfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAF011766306003CDA5E /* subfile.c */; };
+		9DFECDD511766982004EFD0D /* sysdir.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAF71176631D003CDA5E /* sysdir.c */; };
+		9DFECDD611766982004EFD0D /* sysdll.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAF81176631D003CDA5E /* sysdll.c */; };
+		9DFECDD711766982004EFD0D /* sysfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAF91176631D003CDA5E /* sysfile.c */; };
+		9DFECDD811766982004EFD0D /* sysmmap.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAFA1176631D003CDA5E /* sysmmap.c */; };
+		9DFECDD911766982004EFD0D /* tar.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAF111766306003CDA5E /* tar.c */; };
+		9DFECDDA11766982004EFD0D /* teefile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAF211766306003CDA5E /* teefile.c */; };
+		9DFECDDB11766982004EFD0D /* toc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAF311766306003CDA5E /* toc.c */; };
+		9DFECDDC11766982004EFD0D /* tocdir.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAF411766306003CDA5E /* tocdir.c */; };
+		9DFECDDD11766982004EFD0D /* tocentry.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAF511766306003CDA5E /* tocentry.c */; };
+		9DFECDDE11766982004EFD0D /* tocfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D31EAF611766306003CDA5E /* tocfile.c */; };
+		9DFECDE6117669DD004EFD0D /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC90117667C6003CDA5E /* libz.dylib */; };
+		9DFECDE7117669E0004EFD0D /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC8C117667C6003CDA5E /* libbz2.dylib */; };
+		9DFECDE8117669E0004EFD0D /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D31EC8E117667C6003CDA5E /* libxml2.dylib */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		9D4DCEDB1423FF6E00881098 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A433613FAEE0C003087FF;
+			remoteInfo = wvdb;
+		};
+		9D4DCEE11424001400881098 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A426713FAE69A003087FF;
+			remoteInfo = wkdb;
+		};
+		9D4DCEE31424001C00881098 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D31EC98117667FA003CDA5E;
+			remoteInfo = klib;
+		};
+		9D4DCEE61424007400881098 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A433613FAEE0C003087FF;
+			remoteInfo = wvdb;
+		};
+		9D4DCEE81424007F00881098 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A426713FAE69A003087FF;
+			remoteInfo = wkdb;
+		};
+		9D4DCEEA1424008500881098 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D31EC98117667FA003CDA5E;
+			remoteInfo = klib;
+		};
+		9D4DCEEC142400B400881098 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A433613FAEE0C003087FF;
+			remoteInfo = wvdb;
+		};
+		9D4DCEEE142400B900881098 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A426713FAE69A003087FF;
+			remoteInfo = wkdb;
+		};
+		9D7A423713FAE3FD003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A417713FAE192003087FF;
+			remoteInfo = "kdb-cmn";
+		};
+		9D7A428313FAE9A0003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A417713FAE192003087FF;
+			remoteInfo = "kdb-cmn";
+		};
+		9D7A446813FAF4A9003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A431B13FAED2E003087FF;
+			remoteInfo = vdb;
+		};
+		9D7A446C13FAF4B3003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A423313FAE3F5003087FF;
+			remoteInfo = kdb;
+		};
+		9D7A446E13FAF4B6003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D31EC98117667FA003CDA5E;
+			remoteInfo = klib;
+		};
+		9D7A44DF13FB0546003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A44BF13FB04A9003087FF;
+			remoteInfo = align;
+		};
+		9D7A44E113FB0551003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A431B13FAED2E003087FF;
+			remoteInfo = vdb;
+		};
+		9D7A44E513FB0561003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D31EC98117667FA003CDA5E;
+			remoteInfo = klib;
+		};
+		9D7A44E713FB057E003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D31EC98117667FA003CDA5E;
+			remoteInfo = klib;
+		};
+		9D7A44E913FB0582003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A431B13FAED2E003087FF;
+			remoteInfo = vdb;
+		};
+		9D7A44EB13FB0597003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A431B13FAED2E003087FF;
+			remoteInfo = vdb;
+		};
+		9D7A44ED13FB0597003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A423313FAE3F5003087FF;
+			remoteInfo = kdb;
+		};
+		9D7A44EF13FB0597003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D31EC98117667FA003CDA5E;
+			remoteInfo = klib;
+		};
+		9D7A44F113FB05A9003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A423313FAE3F5003087FF;
+			remoteInfo = kdb;
+		};
+		9D7A44F313FB05A9003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D31EC98117667FA003CDA5E;
+			remoteInfo = klib;
+		};
+		9D7A44F513FB05C9003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A426713FAE69A003087FF;
+			remoteInfo = wkdb;
+		};
+		9D7A44F713FB05C9003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D31EC98117667FA003CDA5E;
+			remoteInfo = klib;
+		};
+		9D7A44F913FB05C9003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A415B13FAE00E003087FF;
+			remoteInfo = kmproc;
+		};
+		9D7A44FB13FB05EB003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D31EC98117667FA003CDA5E;
+			remoteInfo = klib;
+		};
+		9D7A44FD13FB05F2003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D31EC98117667FA003CDA5E;
+			remoteInfo = klib;
+		};
+		9D7A450513FB06AB003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A428813FAE9B5003087FF;
+			remoteInfo = "vdb-cmn";
+		};
+		9D7A450713FB06BD003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A428813FAE9B5003087FF;
+			remoteInfo = "vdb-cmn";
+		};
+		9D7A45AA13FB0CB8003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D31EC98117667FA003CDA5E;
+			remoteInfo = klib;
+		};
+		9D7A45AE13FB0CB8003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A44BF13FB04A9003087FF;
+			remoteInfo = align;
+		};
+		9D7A45D313FB0D50003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D31EC98117667FA003CDA5E;
+			remoteInfo = klib;
+		};
+		9D7A45D513FB0D50003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A423313FAE3F5003087FF;
+			remoteInfo = kdb;
+		};
+		9D7A45D713FB0D50003087FF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A431B13FAED2E003087FF;
+			remoteInfo = vdb;
+		};
+		9DE55930140D82BC00EA61C6 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A460613FB0F36003087FF;
+			remoteInfo = kapp;
+		};
+		9DE55932140D82BC00EA61C6 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A433613FAEE0C003087FF;
+			remoteInfo = wvdb;
+		};
+		9DE55934140D82CD00EA61C6 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D31EC98117667FA003CDA5E;
+			remoteInfo = klib;
+		};
+		9DE55A95140EAC9E00EA61C6 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A45A813FB0CB8003087FF;
+			remoteInfo = waxf;
+		};
+		9DE55A97140EAC9E00EA61C6 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A454A13FB0B4D003087FF;
+			remoteInfo = wsraxf;
+		};
+		9DE55A99140EAC9E00EA61C6 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A452E13FB0A3C003087FF;
+			remoteInfo = wvxf;
+		};
+		9DE55AFD140EF0C800EA61C6 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D7A426713FAE69A003087FF;
+			remoteInfo = wkdb;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+		9D1235B414F571AC00ECC72C /* config-grammar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "config-grammar.c"; path = "../../../libs/kfg/config-grammar.c"; sourceTree = SOURCE_ROOT; };
+		9D1235B514F571AC00ECC72C /* config-grammar.y */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.yacc; name = "config-grammar.y"; path = "../../../libs/kfg/config-grammar.y"; sourceTree = SOURCE_ROOT; };
+		9D1235B614F571AC00ECC72C /* config-lex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "config-lex.c"; path = "../../../libs/kfg/config-lex.c"; sourceTree = SOURCE_ROOT; };
+		9D1235B714F571AC00ECC72C /* config-lex.l */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lex; name = "config-lex.l"; path = "../../../libs/kfg/config-lex.l"; sourceTree = SOURCE_ROOT; };
+		9D1235B814F571AC00ECC72C /* config-tokens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "config-tokens.h"; path = "../../../libs/kfg/config-tokens.h"; sourceTree = SOURCE_ROOT; };
+		9D1235B914F571AC00ECC72C /* config.linux.kfg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = config.linux.kfg; path = ../../../libs/kfg/config.linux.kfg; sourceTree = SOURCE_ROOT; };
+		9D1235BA14F571AC00ECC72C /* config.win.kfg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = config.win.kfg; path = ../../../libs/kfg/config.win.kfg; sourceTree = SOURCE_ROOT; };
+		9D1235BB14F571AC00ECC72C /* kfg-parse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "kfg-parse.h"; path = "../../../libs/kfg/kfg-parse.h"; sourceTree = SOURCE_ROOT; };
+		9D1EC47B122D912500C11287 /* debug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = debug.c; path = ../../../libs/klib/debug.c; sourceTree = SOURCE_ROOT; };
+		9D1EC47F122D914C00C11287 /* printf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = printf.c; path = ../../../libs/klib/printf.c; sourceTree = SOURCE_ROOT; };
+		9D1EC480122D914C00C11287 /* status-rc-strings.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "status-rc-strings.c"; path = "../../../libs/klib/status-rc-strings.c"; sourceTree = SOURCE_ROOT; };
+		9D1EC481122D914C00C11287 /* status-rc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "status-rc.c"; path = "../../../libs/klib/status-rc.c"; sourceTree = SOURCE_ROOT; };
+		9D1EC482122D914C00C11287 /* status.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = status.c; path = ../../../libs/klib/status.c; sourceTree = SOURCE_ROOT; };
+		9D31EAB311766257003CDA5E /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = main.c; path = ../../../libs/kapp/main.c; sourceTree = SOURCE_ROOT; };
+		9D31EAB71176626A003CDA5E /* sysmain.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sysmain.c; path = ../../../libs/kapp/unix/sysmain.c; sourceTree = SOURCE_ROOT; };
+		9D31EAE011766306003CDA5E /* arc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = arc.c; path = ../../../libs/kfs/arc.c; sourceTree = SOURCE_ROOT; };
+		9D31EAE111766306003CDA5E /* buffile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = buffile.c; path = ../../../libs/kfs/buffile.c; sourceTree = SOURCE_ROOT; };
+		9D31EAE211766306003CDA5E /* bzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bzip.c; path = ../../../libs/kfs/bzip.c; sourceTree = SOURCE_ROOT; };
+		9D31EAE311766306003CDA5E /* countfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = countfile.c; path = ../../../libs/kfs/countfile.c; sourceTree = SOURCE_ROOT; };
+		9D31EAE411766306003CDA5E /* crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = crc32.c; path = ../../../libs/kfs/crc32.c; sourceTree = SOURCE_ROOT; };
+		9D31EAE511766306003CDA5E /* dir_test.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dir_test.c; path = ../../../libs/kfs/dir_test.c; sourceTree = SOURCE_ROOT; };
+		9D31EAE611766306003CDA5E /* directory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = directory.c; path = ../../../libs/kfs/directory.c; sourceTree = SOURCE_ROOT; };
+		9D31EAE711766306003CDA5E /* ffext.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ffext.c; path = ../../../libs/kfs/ffext.c; sourceTree = SOURCE_ROOT; };
+		9D31EAE811766306003CDA5E /* ffkey.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ffkey.c; path = ../../../libs/kfs/ffkey.c; sourceTree = SOURCE_ROOT; };
+		9D31EAE911766306003CDA5E /* ffmagic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ffmagic.c; path = ../../../libs/kfs/ffmagic.c; sourceTree = SOURCE_ROOT; };
+		9D31EAEA11766306003CDA5E /* file.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = file.c; path = ../../../libs/kfs/file.c; sourceTree = SOURCE_ROOT; };
+		9D31EAEB11766306003CDA5E /* fileformat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = fileformat.c; path = ../../../libs/kfs/fileformat.c; sourceTree = SOURCE_ROOT; };
+		9D31EAEC11766306003CDA5E /* gzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gzip.c; path = ../../../libs/kfs/gzip.c; sourceTree = SOURCE_ROOT; };
+		9D31EAED11766306003CDA5E /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5.c; path = ../../../libs/kfs/md5.c; sourceTree = SOURCE_ROOT; };
+		9D31EAEE11766306003CDA5E /* nullfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = nullfile.c; path = ../../../libs/kfs/nullfile.c; sourceTree = SOURCE_ROOT; };
+		9D31EAEF11766306003CDA5E /* sra.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sra.c; path = ../../../libs/kfs/sra.c; sourceTree = SOURCE_ROOT; };
+		9D31EAF011766306003CDA5E /* subfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = subfile.c; path = ../../../libs/kfs/subfile.c; sourceTree = SOURCE_ROOT; };
+		9D31EAF111766306003CDA5E /* tar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tar.c; path = ../../../libs/kfs/tar.c; sourceTree = SOURCE_ROOT; };
+		9D31EAF211766306003CDA5E /* teefile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = teefile.c; path = ../../../libs/kfs/teefile.c; sourceTree = SOURCE_ROOT; };
+		9D31EAF311766306003CDA5E /* toc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = toc.c; path = ../../../libs/kfs/toc.c; sourceTree = SOURCE_ROOT; };
+		9D31EAF411766306003CDA5E /* tocdir.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tocdir.c; path = ../../../libs/kfs/tocdir.c; sourceTree = SOURCE_ROOT; };
+		9D31EAF511766306003CDA5E /* tocentry.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tocentry.c; path = ../../../libs/kfs/tocentry.c; sourceTree = SOURCE_ROOT; };
+		9D31EAF611766306003CDA5E /* tocfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tocfile.c; path = ../../../libs/kfs/tocfile.c; sourceTree = SOURCE_ROOT; };
+		9D31EAF71176631D003CDA5E /* sysdir.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sysdir.c; path = ../../../libs/kfs/unix/sysdir.c; sourceTree = SOURCE_ROOT; };
+		9D31EAF81176631D003CDA5E /* sysdll.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sysdll.c; path = ../../../libs/kfs/unix/sysdll.c; sourceTree = SOURCE_ROOT; };
+		9D31EAF91176631D003CDA5E /* sysfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sysfile.c; path = ../../../libs/kfs/unix/sysfile.c; sourceTree = SOURCE_ROOT; };
+		9D31EAFA1176631D003CDA5E /* sysmmap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sysmmap.c; path = ../../../libs/kfs/unix/sysmmap.c; sourceTree = SOURCE_ROOT; };
+		9D31EAFE11766366003CDA5E /* bstpersist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bstpersist.c; path = ../../../libs/klib/bstpersist.c; sourceTree = SOURCE_ROOT; };
+		9D31EAFF11766366003CDA5E /* container.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = container.c; path = ../../../libs/klib/container.c; sourceTree = SOURCE_ROOT; };
+		9D31EB0011766366003CDA5E /* cp1252.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cp1252.c; path = ../../../libs/klib/cp1252.c; sourceTree = SOURCE_ROOT; };
+		9D31EB0111766366003CDA5E /* crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = crc32.c; path = ../../../libs/klib/crc32.c; sourceTree = SOURCE_ROOT; };
+		9D31EB0211766366003CDA5E /* data-buffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "data-buffer.c"; path = "../../../libs/klib/data-buffer.c"; sourceTree = SOURCE_ROOT; };
+		9D31EB0311766366003CDA5E /* iso8859-1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "iso8859-1.c"; path = "../../../libs/klib/iso8859-1.c"; sourceTree = SOURCE_ROOT; };
+		9D31EB0411766366003CDA5E /* iso8859.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = iso8859.c; path = ../../../libs/klib/iso8859.c; sourceTree = SOURCE_ROOT; };
+		9D31EB0511766366003CDA5E /* log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = log.c; path = ../../../libs/klib/log.c; sourceTree = SOURCE_ROOT; };
+		9D31EB0611766366003CDA5E /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5.c; path = ../../../libs/klib/md5.c; sourceTree = SOURCE_ROOT; };
+		9D31EB0711766366003CDA5E /* namelist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = namelist.c; path = ../../../libs/klib/namelist.c; sourceTree = SOURCE_ROOT; };
+		9D31EB0811766366003CDA5E /* pack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pack.c; path = ../../../libs/klib/pack.c; sourceTree = SOURCE_ROOT; };
+		9D31EB0911766366003CDA5E /* pbstree.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pbstree.c; path = ../../../libs/klib/pbstree.c; sourceTree = SOURCE_ROOT; };
+		9D31EB0A11766366003CDA5E /* ptpersist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ptpersist.c; path = ../../../libs/klib/ptpersist.c; sourceTree = SOURCE_ROOT; };
+		9D31EB0B11766366003CDA5E /* ptrie.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ptrie.c; path = ../../../libs/klib/ptrie.c; sourceTree = SOURCE_ROOT; };
+		9D31EB0C11766366003CDA5E /* rc-idx-tbl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "rc-idx-tbl.c"; path = "../../../libs/klib/rc-idx-tbl.c"; sourceTree = SOURCE_ROOT; };
+		9D31EB0D11766366003CDA5E /* rc-tbl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "rc-tbl.c"; path = "../../../libs/klib/rc-tbl.c"; sourceTree = SOURCE_ROOT; };
+		9D31EB0E11766366003CDA5E /* symtab.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = symtab.c; path = ../../../libs/klib/symtab.c; sourceTree = SOURCE_ROOT; };
+		9D31EB1011766366003CDA5E /* text.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = text.c; path = ../../../libs/klib/text.c; sourceTree = SOURCE_ROOT; };
+		9D31EB1111766366003CDA5E /* token.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = token.c; path = ../../../libs/klib/token.c; sourceTree = SOURCE_ROOT; };
+		9D31EB1211766366003CDA5E /* trie.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = trie.c; path = ../../../libs/klib/trie.c; sourceTree = SOURCE_ROOT; };
+		9D31EB1311766366003CDA5E /* trieval.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = trieval.c; path = ../../../libs/klib/trieval.c; sourceTree = SOURCE_ROOT; };
+		9D31EB1411766366003CDA5E /* unpack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = unpack.c; path = ../../../libs/klib/unpack.c; sourceTree = SOURCE_ROOT; };
+		9D31EB1511766366003CDA5E /* utf8.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = utf8.c; path = ../../../libs/klib/utf8.c; sourceTree = SOURCE_ROOT; };
+		9D31EB1611766366003CDA5E /* vector.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vector.c; path = ../../../libs/klib/vector.c; sourceTree = SOURCE_ROOT; };
+		9D31EB1711766366003CDA5E /* vlen-encode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "vlen-encode.c"; path = "../../../libs/klib/vlen-encode.c"; sourceTree = SOURCE_ROOT; };
+		9D31EB191176637A003CDA5E /* syslog.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = syslog.c; path = ../../../libs/klib/unix/syslog.c; sourceTree = SOURCE_ROOT; };
+		9D31EB1D117663AB003CDA5E /* stbarrier.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stbarrier.c; path = ../../../libs/kproc/stbarrier.c; sourceTree = SOURCE_ROOT; };
+		9D31EB1E117663AB003CDA5E /* stcond.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stcond.c; path = ../../../libs/kproc/stcond.c; sourceTree = SOURCE_ROOT; };
+		9D31EB1F117663AB003CDA5E /* stlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stlock.c; path = ../../../libs/kproc/stlock.c; sourceTree = SOURCE_ROOT; };
+		9D31EB20117663AB003CDA5E /* stsem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stsem.c; path = ../../../libs/kproc/stsem.c; sourceTree = SOURCE_ROOT; };
+		9D31EB21117663AB003CDA5E /* stthread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stthread.c; path = ../../../libs/kproc/stthread.c; sourceTree = SOURCE_ROOT; };
+		9D31EB22117663AB003CDA5E /* sttimeout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sttimeout.c; path = ../../../libs/kproc/sttimeout.c; sourceTree = SOURCE_ROOT; };
+		9D31EB2B117663C6003CDA5E /* syscond.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = syscond.c; path = ../../../libs/kproc/unix/syscond.c; sourceTree = SOURCE_ROOT; };
+		9D31EB2C117663C6003CDA5E /* systhread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = systhread.c; path = ../../../libs/kproc/unix/systhread.c; sourceTree = SOURCE_ROOT; };
+		9D31EB2D117663C6003CDA5E /* systimeout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = systimeout.c; path = ../../../libs/kproc/unix/systimeout.c; sourceTree = SOURCE_ROOT; };
+		9D31EB2E117663D4003CDA5E /* syslock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = syslock.c; path = ../../../libs/kproc/bsd/syslock.c; sourceTree = SOURCE_ROOT; };
+		9D31EB3011766409003CDA5E /* xml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xml.c; path = ../../../libs/kxml/xml.c; sourceTree = SOURCE_ROOT; };
+		9D31EC8C117667C6003CDA5E /* libbz2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libbz2.dylib; path = usr/lib/libbz2.dylib; sourceTree = SDKROOT; };
+		9D31EC8E117667C6003CDA5E /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
+		9D31EC90117667C6003CDA5E /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
+		9D31EC99117667FA003CDA5E /* libklib.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libklib.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D320A0A142B813300ACA5AA /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = ../../../tools/deseq/Makefile; sourceTree = SOURCE_ROOT; };
+		9D320AAE142D02B000ACA5AA /* extract_token.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = extract_token.c; path = ../../../libs/vxf/extract_token.c; sourceTree = SOURCE_ROOT; };
+		9D320AAF142D02B000ACA5AA /* strtonum.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = strtonum.c; path = ../../../libs/vxf/strtonum.c; sourceTree = SOURCE_ROOT; };
+		9D320AB5142D02E600ACA5AA /* sprintf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sprintf.c; path = ../../../libs/vxf/sprintf.c; sourceTree = SOURCE_ROOT; };
+		9D320AD5142D0E3F00ACA5AA /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = ../../../libs/vxf/Makefile; sourceTree = SOURCE_ROOT; };
+		9D4DCEAB1423FD9600881098 /* ref-preserve_qual.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ref-preserve_qual.c"; path = "../../../libs/axf/ref-preserve_qual.c"; sourceTree = SOURCE_ROOT; };
+		9D62F428124D01AE003D38E9 /* bsearch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bsearch.c; path = ../../../libs/klib/bsearch.c; sourceTree = SOURCE_ROOT; };
+		9D62F429124D01AE003D38E9 /* qsort.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = qsort.c; path = ../../../libs/klib/qsort.c; sourceTree = SOURCE_ROOT; };
+		9D6FFB31145094DB00952EB7 /* align-access.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "align-access.h"; path = "align/align-access.h"; sourceTree = "<group>"; };
+		9D6FFB32145094DB00952EB7 /* alignarc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = alignarc.h; path = align/alignarc.h; sourceTree = "<group>"; };
+		9D6FFB33145094DB00952EB7 /* alignsrc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = alignsrc.h; path = align/alignsrc.h; sourceTree = "<group>"; };
+		9D6FFB34145094DB00952EB7 /* extern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = extern.h; path = align/extern.h; sourceTree = "<group>"; };
+		9D6FFB35145094DB00952EB7 /* reader-refseq.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "reader-refseq.h"; path = "align/reader-refseq.h"; sourceTree = "<group>"; };
+		9D6FFB36145094DB00952EB7 /* refseq-mgr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "refseq-mgr.h"; path = "align/refseq-mgr.h"; sourceTree = "<group>"; };
+		9D6FFB37145094DB00952EB7 /* writer-alignment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "writer-alignment.h"; path = "align/writer-alignment.h"; sourceTree = "<group>"; };
+		9D6FFB38145094DB00952EB7 /* writer-cmn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "writer-cmn.h"; path = "align/writer-cmn.h"; sourceTree = "<group>"; };
+		9D6FFB39145094DB00952EB7 /* writer-reference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "writer-reference.h"; path = "align/writer-reference.h"; sourceTree = "<group>"; };
+		9D6FFB3A145094DB00952EB7 /* writer-refseq.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "writer-refseq.h"; path = "align/writer-refseq.h"; sourceTree = "<group>"; };
+		9D6FFB3B145094DB00952EB7 /* writer-sequence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "writer-sequence.h"; path = "align/writer-sequence.h"; sourceTree = "<group>"; };
+		9D7356C41177554A009EA3E4 /* built-in.vschema */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; includeInIndex = 0; name = "built-in.vschema"; path = "../../../interfaces/vdb/built-in.vschema"; sourceTree = SOURCE_ROOT; };
+		9D7356C51177554A009EA3E4 /* vdb.vschema */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; includeInIndex = 0; name = vdb.vschema; path = ../../../interfaces/vdb/vdb.vschema; sourceTree = SOURCE_ROOT; };
+		9D7356C71177556A009EA3E4 /* ncbi.vschema */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; includeInIndex = 0; name = ncbi.vschema; path = ../../../interfaces/ncbi/ncbi.vschema; sourceTree = SOURCE_ROOT; };
+		9D7356C81177556A009EA3E4 /* spotname.vschema */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; includeInIndex = 0; name = spotname.vschema; path = ../../../interfaces/ncbi/spotname.vschema; sourceTree = SOURCE_ROOT; };
+		9D7356CA117755B4009EA3E4 /* insdc.vschema */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; includeInIndex = 0; name = insdc.vschema; path = ../../../interfaces/insdc/insdc.vschema; sourceTree = SOURCE_ROOT; };
+		9D7356CB117755B4009EA3E4 /* seq.vschema */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; includeInIndex = 0; name = seq.vschema; path = ../../../interfaces/insdc/seq.vschema; sourceTree = SOURCE_ROOT; };
+		9D7356CC117755B4009EA3E4 /* sra.vschema */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; includeInIndex = 0; name = sra.vschema; path = ../../../interfaces/insdc/sra.vschema; sourceTree = SOURCE_ROOT; };
+		9D7356CE117755F4009EA3E4 /* 454.vschema */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; includeInIndex = 0; name = 454.vschema; path = ../../../interfaces/sra/454.vschema; sourceTree = SOURCE_ROOT; };
+		9D7356CF117755F4009EA3E4 /* pevents.vschema */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; includeInIndex = 0; name = pevents.vschema; path = ../../../interfaces/sra/pevents.vschema; sourceTree = SOURCE_ROOT; };
+		9D7A40D913FADBA3003087FF /* SHA-32bit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "SHA-32bit.c"; path = "../../../libs/klib/SHA-32bit.c"; sourceTree = SOURCE_ROOT; };
+		9D7A40DA13FADBA3003087FF /* SHA-64bit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "SHA-64bit.c"; path = "../../../libs/klib/SHA-64bit.c"; sourceTree = SOURCE_ROOT; };
+		9D7A40DF13FADBEE003087FF /* syserrcode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = syserrcode.c; path = ../../../libs/klib/unix/syserrcode.c; sourceTree = SOURCE_ROOT; };
+		9D7A40E013FADBEE003087FF /* systime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = systime.c; path = ../../../libs/klib/unix/systime.c; sourceTree = SOURCE_ROOT; };
+		9D7A40E813FADC66003087FF /* writer-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "writer-priv.h"; path = "../../../libs/klib/writer-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A40ED13FADCFE003087FF /* arrayfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = arrayfile.c; path = ../../../libs/kfs/arrayfile.c; sourceTree = SOURCE_ROOT; };
+		9D7A40EE13FADCFE003087FF /* buffile-write.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "buffile-write.c"; path = "../../../libs/kfs/buffile-write.c"; sourceTree = SOURCE_ROOT; };
+		9D7A40EF13FADCFE003087FF /* fileformat-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "fileformat-priv.h"; path = "../../../libs/kfs/fileformat-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A40F013FADCFE003087FF /* impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = impl.h; path = ../../../libs/kfs/impl.h; sourceTree = SOURCE_ROOT; };
+		9D7A40F113FADCFE003087FF /* karc-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "karc-priv.h"; path = "../../../libs/kfs/karc-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A40F213FADCFE003087FF /* kfs-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "kfs-priv.h"; path = "../../../libs/kfs/kfs-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A40F313FADCFE003087FF /* manager.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = manager.c; path = ../../../libs/kfs/manager.c; sourceTree = SOURCE_ROOT; };
+		9D7A40F413FADCFE003087FF /* mmap-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "mmap-priv.h"; path = "../../../libs/kfs/mmap-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A40F513FADCFE003087FF /* mmap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mmap.c; path = ../../../libs/kfs/mmap.c; sourceTree = SOURCE_ROOT; };
+		9D7A40F613FADCFE003087FF /* path-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "path-priv.h"; path = "../../../libs/kfs/path-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A40F713FADCFE003087FF /* path.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = path.c; path = ../../../libs/kfs/path.c; sourceTree = SOURCE_ROOT; };
+		9D7A40F813FADCFE003087FF /* pmem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pmem.c; path = ../../../libs/kfs/pmem.c; sourceTree = SOURCE_ROOT; };
+		9D7A40F913FADCFE003087FF /* szip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = szip.c; path = ../../../libs/kfs/szip.c; sourceTree = SOURCE_ROOT; };
+		9D7A40FA13FADCFE003087FF /* toc-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "toc-priv.h"; path = "../../../libs/kfs/toc-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A411213FADD33003087FF /* sysdir-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "sysdir-priv.h"; path = "../../../libs/kfs/unix/sysdir-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A411313FADD33003087FF /* sysfile-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "sysfile-priv.h"; path = "../../../libs/kfs/unix/sysfile-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A411413FADD33003087FF /* sysmmap-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "sysmmap-priv.h"; path = "../../../libs/kfs/unix/sysmmap-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A412E13FADF3A003087FF /* libksproc.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libksproc.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A414813FADFA1003087FF /* syscond-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "syscond-priv.h"; path = "../../../libs/kproc/unix/syscond-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A414B13FADFC6003087FF /* syslock-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "syslock-priv.h"; sourceTree = "<group>"; };
+		9D7A414C13FADFC6003087FF /* syslock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = syslock.c; sourceTree = "<group>"; };
+		9D7A414D13FADFC6003087FF /* queue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = queue.c; path = ../../../libs/kproc/queue.c; sourceTree = SOURCE_ROOT; };
+		9D7A414E13FADFC6003087FF /* sem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sem.c; path = ../../../libs/kproc/sem.c; sourceTree = SOURCE_ROOT; };
+		9D7A415C13FAE00E003087FF /* libkmproc.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libkmproc.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A417813FAE192003087FF /* libkdb-cmn.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libkdb-cmn.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A417D13FAE1DA003087FF /* btree.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = btree.c; path = ../../../libs/kdb/btree.c; sourceTree = SOURCE_ROOT; };
+		9D7A417E13FAE1DA003087FF /* cc-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "cc-priv.h"; path = "../../../libs/kdb/cc-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A417F13FAE1DA003087FF /* coldata-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "coldata-priv.h"; path = "../../../libs/kdb/coldata-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A418013FAE1DA003087FF /* coldata.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = coldata.c; path = ../../../libs/kdb/coldata.c; sourceTree = SOURCE_ROOT; };
+		9D7A418113FAE1DA003087FF /* colfmt-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "colfmt-priv.h"; path = "../../../libs/kdb/colfmt-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A418213FAE1DA003087FF /* colidx-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "colidx-priv.h"; path = "../../../libs/kdb/colidx-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A418313FAE1DA003087FF /* colidx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = colidx.c; path = ../../../libs/kdb/colidx.c; sourceTree = SOURCE_ROOT; };
+		9D7A418413FAE1DA003087FF /* colidx0-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "colidx0-priv.h"; path = "../../../libs/kdb/colidx0-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A418513FAE1DA003087FF /* colidx0.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = colidx0.c; path = ../../../libs/kdb/colidx0.c; sourceTree = SOURCE_ROOT; };
+		9D7A418613FAE1DA003087FF /* colidx1-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "colidx1-priv.h"; path = "../../../libs/kdb/colidx1-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A418713FAE1DA003087FF /* colidx1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = colidx1.c; path = ../../../libs/kdb/colidx1.c; sourceTree = SOURCE_ROOT; };
+		9D7A418813FAE1DA003087FF /* colidx2-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "colidx2-priv.h"; path = "../../../libs/kdb/colidx2-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A418913FAE1DA003087FF /* colidx2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = colidx2.c; path = ../../../libs/kdb/colidx2.c; sourceTree = SOURCE_ROOT; };
+		9D7A418A13FAE1DA003087FF /* column-cc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "column-cc.c"; path = "../../../libs/kdb/column-cc.c"; sourceTree = SOURCE_ROOT; };
+		9D7A418B13FAE1DA003087FF /* column-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "column-priv.h"; path = "../../../libs/kdb/column-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A418C13FAE1DA003087FF /* column.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = column.c; path = ../../../libs/kdb/column.c; sourceTree = SOURCE_ROOT; };
+		9D7A418D13FAE1DA003087FF /* database-cc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "database-cc.c"; path = "../../../libs/kdb/database-cc.c"; sourceTree = SOURCE_ROOT; };
+		9D7A418E13FAE1DA003087FF /* database-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "database-cmn.c"; path = "../../../libs/kdb/database-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D7A418F13FAE1DA003087FF /* database-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "database-priv.h"; path = "../../../libs/kdb/database-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A419013FAE1DA003087FF /* database.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = database.c; path = ../../../libs/kdb/database.c; sourceTree = SOURCE_ROOT; };
+		9D7A419113FAE1DA003087FF /* dbcc-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "dbcc-cmn.c"; path = "../../../libs/kdb/dbcc-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D7A419213FAE1DA003087FF /* dbmgr-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "dbmgr-cmn.c"; path = "../../../libs/kdb/dbmgr-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D7A419313FAE1DA003087FF /* dbmgr-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "dbmgr-priv.h"; path = "../../../libs/kdb/dbmgr-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A419413FAE1DA003087FF /* dbmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dbmgr.c; path = ../../../libs/kdb/dbmgr.c; sourceTree = SOURCE_ROOT; };
+		9D7A419513FAE1DA003087FF /* idstats-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "idstats-priv.h"; path = "../../../libs/kdb/idstats-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A419613FAE1DA003087FF /* idstats.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = idstats.c; path = ../../../libs/kdb/idstats.c; sourceTree = SOURCE_ROOT; };
+		9D7A419713FAE1DA003087FF /* idxblk-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "idxblk-priv.h"; path = "../../../libs/kdb/idxblk-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A419813FAE1DA003087FF /* idxblk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = idxblk.c; path = ../../../libs/kdb/idxblk.c; sourceTree = SOURCE_ROOT; };
+		9D7A419913FAE1DA003087FF /* index-cmn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "index-cmn.h"; path = "../../../libs/kdb/index-cmn.h"; sourceTree = SOURCE_ROOT; };
+		9D7A419A13FAE1DA003087FF /* index-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "index-priv.h"; path = "../../../libs/kdb/index-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A419B13FAE1DA003087FF /* index.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = index.c; path = ../../../libs/kdb/index.c; sourceTree = SOURCE_ROOT; };
+		9D7A419C13FAE1DA003087FF /* kdb-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "kdb-priv.h"; path = "../../../libs/kdb/kdb-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A419D13FAE1DA003087FF /* kdb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = kdb.c; path = ../../../libs/kdb/kdb.c; sourceTree = SOURCE_ROOT; };
+		9D7A419E13FAE1DA003087FF /* kdbfmt-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "kdbfmt-priv.h"; path = "../../../libs/kdb/kdbfmt-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A419F13FAE1DA003087FF /* libkdb.vers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libkdb.vers.h; path = ../../../libs/kdb/libkdb.vers.h; sourceTree = SOURCE_ROOT; };
+		9D7A41A013FAE1DA003087FF /* libwkdb.vers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libwkdb.vers.h; path = ../../../libs/kdb/libwkdb.vers.h; sourceTree = SOURCE_ROOT; };
+		9D7A41A113FAE1DA003087FF /* meta.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = meta.c; path = ../../../libs/kdb/meta.c; sourceTree = SOURCE_ROOT; };
+		9D7A41A213FAE1DA003087FF /* ptrieval-v1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ptrieval-v1.c"; path = "../../../libs/kdb/ptrieval-v1.c"; sourceTree = SOURCE_ROOT; };
+		9D7A41A313FAE1DA003087FF /* ptrieval-v2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ptrieval-v2.c"; path = "../../../libs/kdb/ptrieval-v2.c"; sourceTree = SOURCE_ROOT; };
+		9D7A41A413FAE1DA003087FF /* table-cc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "table-cc.c"; path = "../../../libs/kdb/table-cc.c"; sourceTree = SOURCE_ROOT; };
+		9D7A41A513FAE1DA003087FF /* table-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "table-priv.h"; path = "../../../libs/kdb/table-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A41A613FAE1DA003087FF /* table.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = table.c; path = ../../../libs/kdb/table.c; sourceTree = SOURCE_ROOT; };
+		9D7A41A713FAE1DA003087FF /* trieidx-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "trieidx-priv.h"; path = "../../../libs/kdb/trieidx-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A41A813FAE1DA003087FF /* trieidx-v1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "trieidx-v1.c"; path = "../../../libs/kdb/trieidx-v1.c"; sourceTree = SOURCE_ROOT; };
+		9D7A41A913FAE1DA003087FF /* trieidx-v2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "trieidx-v2.c"; path = "../../../libs/kdb/trieidx-v2.c"; sourceTree = SOURCE_ROOT; };
+		9D7A41AA13FAE1DA003087FF /* trieval-v1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "trieval-v1.c"; path = "../../../libs/kdb/trieval-v1.c"; sourceTree = SOURCE_ROOT; };
+		9D7A41AB13FAE1DA003087FF /* trieval-v2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "trieval-v2.c"; path = "../../../libs/kdb/trieval-v2.c"; sourceTree = SOURCE_ROOT; };
+		9D7A41AC13FAE1DA003087FF /* u64idx-v3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "u64idx-v3.c"; path = "../../../libs/kdb/u64idx-v3.c"; sourceTree = SOURCE_ROOT; };
+		9D7A41AD13FAE1DA003087FF /* wcoldata-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "wcoldata-priv.h"; path = "../../../libs/kdb/wcoldata-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A41AE13FAE1DA003087FF /* wcoldata.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcoldata.c; path = ../../../libs/kdb/wcoldata.c; sourceTree = SOURCE_ROOT; };
+		9D7A41AF13FAE1DA003087FF /* wcolidx-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "wcolidx-priv.h"; path = "../../../libs/kdb/wcolidx-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A41B013FAE1DA003087FF /* wcolidx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcolidx.c; path = ../../../libs/kdb/wcolidx.c; sourceTree = SOURCE_ROOT; };
+		9D7A41B113FAE1DA003087FF /* wcolidx0-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "wcolidx0-priv.h"; path = "../../../libs/kdb/wcolidx0-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A41B213FAE1DA003087FF /* wcolidx0.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcolidx0.c; path = ../../../libs/kdb/wcolidx0.c; sourceTree = SOURCE_ROOT; };
+		9D7A41B313FAE1DA003087FF /* wcolidx1-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "wcolidx1-priv.h"; path = "../../../libs/kdb/wcolidx1-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A41B413FAE1DA003087FF /* wcolidx1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcolidx1.c; path = ../../../libs/kdb/wcolidx1.c; sourceTree = SOURCE_ROOT; };
+		9D7A41B513FAE1DA003087FF /* wcolidx2-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "wcolidx2-priv.h"; path = "../../../libs/kdb/wcolidx2-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A41B613FAE1DA003087FF /* wcolidx2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcolidx2.c; path = ../../../libs/kdb/wcolidx2.c; sourceTree = SOURCE_ROOT; };
+		9D7A41B713FAE1DA003087FF /* wcolumn-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "wcolumn-priv.h"; path = "../../../libs/kdb/wcolumn-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A41B813FAE1DA003087FF /* wcolumn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcolumn.c; path = ../../../libs/kdb/wcolumn.c; sourceTree = SOURCE_ROOT; };
+		9D7A41B913FAE1DA003087FF /* wdatabase-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "wdatabase-priv.h"; path = "../../../libs/kdb/wdatabase-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A41BA13FAE1DA003087FF /* wdatabase.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wdatabase.c; path = ../../../libs/kdb/wdatabase.c; sourceTree = SOURCE_ROOT; };
+		9D7A41BB13FAE1DA003087FF /* wdbmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wdbmgr.c; path = ../../../libs/kdb/wdbmgr.c; sourceTree = SOURCE_ROOT; };
+		9D7A41BC13FAE1DA003087FF /* werror-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "werror-priv.h"; path = "../../../libs/kdb/werror-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A41BD13FAE1DA003087FF /* widxblk-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "widxblk-priv.h"; path = "../../../libs/kdb/widxblk-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A41BE13FAE1DA003087FF /* widxblk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = widxblk.c; path = ../../../libs/kdb/widxblk.c; sourceTree = SOURCE_ROOT; };
+		9D7A41BF13FAE1DA003087FF /* windex-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "windex-priv.h"; path = "../../../libs/kdb/windex-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A41C013FAE1DA003087FF /* windex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = windex.c; path = ../../../libs/kdb/windex.c; sourceTree = SOURCE_ROOT; };
+		9D7A41C113FAE1DA003087FF /* wkdb-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "wkdb-priv.h"; path = "../../../libs/kdb/wkdb-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A41C213FAE1DA003087FF /* wkdb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wkdb.c; path = ../../../libs/kdb/wkdb.c; sourceTree = SOURCE_ROOT; };
+		9D7A41C313FAE1DA003087FF /* wmeta.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wmeta.c; path = ../../../libs/kdb/wmeta.c; sourceTree = SOURCE_ROOT; };
+		9D7A41C413FAE1DA003087FF /* wtable-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "wtable-priv.h"; path = "../../../libs/kdb/wtable-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A41C513FAE1DA003087FF /* wtable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wtable.c; path = ../../../libs/kdb/wtable.c; sourceTree = SOURCE_ROOT; };
+		9D7A41C613FAE1DA003087FF /* wtrieidx-v1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "wtrieidx-v1.c"; path = "../../../libs/kdb/wtrieidx-v1.c"; sourceTree = SOURCE_ROOT; };
+		9D7A41C713FAE1DA003087FF /* wtrieidx-v2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "wtrieidx-v2.c"; path = "../../../libs/kdb/wtrieidx-v2.c"; sourceTree = SOURCE_ROOT; };
+		9D7A41C813FAE1DA003087FF /* wu64idx-v3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "wu64idx-v3.c"; path = "../../../libs/kdb/wu64idx-v3.c"; sourceTree = SOURCE_ROOT; };
+		9D7A423413FAE3F5003087FF /* libkdb.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libkdb.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A426813FAE69A003087FF /* libwkdb.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwkdb.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A428913FAE9B5003087FF /* libvdb-cmn.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libvdb-cmn.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A428E13FAEA20003087FF /* blob-headers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "blob-headers.c"; path = "../../../libs/vdb/blob-headers.c"; sourceTree = SOURCE_ROOT; };
+		9D7A428F13FAEA20003087FF /* blob-headers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "blob-headers.h"; path = "../../../libs/vdb/blob-headers.h"; sourceTree = SOURCE_ROOT; };
+		9D7A429013FAEA20003087FF /* blob-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "blob-priv.h"; path = "../../../libs/vdb/blob-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A429113FAEA20003087FF /* blob.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = blob.c; path = ../../../libs/vdb/blob.c; sourceTree = SOURCE_ROOT; };
+		9D7A429213FAEA20003087FF /* blob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = blob.h; path = ../../../libs/vdb/blob.h; sourceTree = SOURCE_ROOT; };
+		9D7A429313FAEA20003087FF /* cast.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cast.c; path = ../../../libs/vdb/cast.c; sourceTree = SOURCE_ROOT; };
+		9D7A429413FAEA20003087FF /* column-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "column-cmn.c"; path = "../../../libs/vdb/column-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D7A429513FAEA20003087FF /* column-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "column-priv.h"; path = "../../../libs/vdb/column-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A429613FAEA20003087FF /* column.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = column.c; path = ../../../libs/vdb/column.c; sourceTree = SOURCE_ROOT; };
+		9D7A429713FAEA20003087FF /* compare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = compare.c; path = ../../../libs/vdb/compare.c; sourceTree = SOURCE_ROOT; };
+		9D7A429813FAEA20003087FF /* cursor-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "cursor-cmn.c"; path = "../../../libs/vdb/cursor-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D7A429913FAEA20003087FF /* cursor-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "cursor-priv.h"; path = "../../../libs/vdb/cursor-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A429A13FAEA20003087FF /* cursor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cursor.c; path = ../../../libs/vdb/cursor.c; sourceTree = SOURCE_ROOT; };
+		9D7A429B13FAEA20003087FF /* database-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "database-cmn.c"; path = "../../../libs/vdb/database-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D7A429C13FAEA20003087FF /* database-load.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "database-load.c"; path = "../../../libs/vdb/database-load.c"; sourceTree = SOURCE_ROOT; };
+		9D7A429D13FAEA20003087FF /* database-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "database-priv.h"; path = "../../../libs/vdb/database-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A429E13FAEA20003087FF /* database.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = database.c; path = ../../../libs/vdb/database.c; sourceTree = SOURCE_ROOT; };
+		9D7A429F13FAEA20003087FF /* dbmgr-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "dbmgr-cmn.c"; path = "../../../libs/vdb/dbmgr-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42A013FAEA20003087FF /* dbmgr-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "dbmgr-priv.h"; path = "../../../libs/vdb/dbmgr-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A42A113FAEA20003087FF /* dbmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dbmgr.c; path = ../../../libs/vdb/dbmgr.c; sourceTree = SOURCE_ROOT; };
+		9D7A42A213FAEA20003087FF /* environment-read.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "environment-read.c"; path = "../../../libs/vdb/environment-read.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42A313FAEA20003087FF /* fixed-row-len.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "fixed-row-len.c"; path = "../../../libs/vdb/fixed-row-len.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42A413FAEA20003087FF /* index_insert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = index_insert.c; path = ../../../libs/vdb/index_insert.c; sourceTree = SOURCE_ROOT; };
+		9D7A42A513FAEA20003087FF /* index_lookup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = index_lookup.c; path = ../../../libs/vdb/index_lookup.c; sourceTree = SOURCE_ROOT; };
+		9D7A42A613FAEA20003087FF /* index_project.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = index_project.c; path = ../../../libs/vdb/index_project.c; sourceTree = SOURCE_ROOT; };
+		9D7A42A713FAEA20003087FF /* libvdb.vers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libvdb.vers.h; path = ../../../libs/vdb/libvdb.vers.h; sourceTree = SOURCE_ROOT; };
+		9D7A42A813FAEA20003087FF /* libwvdb.vers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libwvdb.vers.h; path = ../../../libs/vdb/libwvdb.vers.h; sourceTree = SOURCE_ROOT; };
+		9D7A42A913FAEA20003087FF /* linker-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "linker-cmn.c"; path = "../../../libs/vdb/linker-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42AA13FAEA20003087FF /* linker-int.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "linker-int.c"; path = "../../../libs/vdb/linker-int.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42AB13FAEA21003087FF /* linker-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "linker-priv.h"; path = "../../../libs/vdb/linker-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A42AC13FAEA21003087FF /* linker.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = linker.c; path = ../../../libs/vdb/linker.c; sourceTree = SOURCE_ROOT; };
+		9D7A42AD13FAEA21003087FF /* merge.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = merge.c; path = ../../../libs/vdb/merge.c; sourceTree = SOURCE_ROOT; };
+		9D7A42AE13FAEA21003087FF /* meta-append.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "meta-append.c"; path = "../../../libs/vdb/meta-append.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42AF13FAEA21003087FF /* meta-attr-read.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "meta-attr-read.c"; path = "../../../libs/vdb/meta-attr-read.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42B013FAEA21003087FF /* meta-attr-write.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "meta-attr-write.c"; path = "../../../libs/vdb/meta-attr-write.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42B113FAEA21003087FF /* meta-read.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "meta-read.c"; path = "../../../libs/vdb/meta-read.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42B213FAEA21003087FF /* meta-value.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "meta-value.c"; path = "../../../libs/vdb/meta-value.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42B313FAEA21003087FF /* meta-write.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "meta-write.c"; path = "../../../libs/vdb/meta-write.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42B413FAEA21003087FF /* page-map.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "page-map.c"; path = "../../../libs/vdb/page-map.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42B513FAEA21003087FF /* page-map.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "page-map.h"; path = "../../../libs/vdb/page-map.h"; sourceTree = SOURCE_ROOT; };
+		9D7A42B613FAEA21003087FF /* parameter-read.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "parameter-read.c"; path = "../../../libs/vdb/parameter-read.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42B713FAEA21003087FF /* phys-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "phys-cmn.c"; path = "../../../libs/vdb/phys-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42B813FAEA21003087FF /* phys-load.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "phys-load.c"; path = "../../../libs/vdb/phys-load.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42B913FAEA21003087FF /* phys-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "phys-priv.h"; path = "../../../libs/vdb/phys-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A42BA13FAEA21003087FF /* phys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = phys.c; path = ../../../libs/vdb/phys.c; sourceTree = SOURCE_ROOT; };
+		9D7A42BB13FAEA21003087FF /* prod-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "prod-cmn.c"; path = "../../../libs/vdb/prod-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42BC13FAEA21003087FF /* prod-expr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "prod-expr.c"; path = "../../../libs/vdb/prod-expr.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42BD13FAEA21003087FF /* prod-expr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "prod-expr.h"; path = "../../../libs/vdb/prod-expr.h"; sourceTree = SOURCE_ROOT; };
+		9D7A42BE13FAEA21003087FF /* prod-func.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "prod-func.c"; path = "../../../libs/vdb/prod-func.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42BF13FAEA21003087FF /* prod-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "prod-priv.h"; path = "../../../libs/vdb/prod-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A42C013FAEA21003087FF /* prod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = prod.c; path = ../../../libs/vdb/prod.c; sourceTree = SOURCE_ROOT; };
+		9D7A42C113FAEA21003087FF /* range-validate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "range-validate.c"; path = "../../../libs/vdb/range-validate.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42C213FAEA21003087FF /* redimension.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = redimension.c; path = ../../../libs/vdb/redimension.c; sourceTree = SOURCE_ROOT; };
+		9D7A42C313FAEA21003087FF /* row-id.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "row-id.c"; path = "../../../libs/vdb/row-id.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42C413FAEA21003087FF /* row-len.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "row-len.c"; path = "../../../libs/vdb/row-len.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42C513FAEA21003087FF /* schema-db.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "schema-db.c"; path = "../../../libs/vdb/schema-db.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42C613FAEA21003087FF /* schema-dump.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "schema-dump.c"; path = "../../../libs/vdb/schema-dump.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42C713FAEA21003087FF /* schema-dump.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "schema-dump.h"; path = "../../../libs/vdb/schema-dump.h"; sourceTree = SOURCE_ROOT; };
+		9D7A42C813FAEA21003087FF /* schema-eval.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "schema-eval.c"; path = "../../../libs/vdb/schema-eval.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42C913FAEA21003087FF /* schema-expr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "schema-expr.c"; path = "../../../libs/vdb/schema-expr.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42CA13FAEA21003087FF /* schema-expr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "schema-expr.h"; path = "../../../libs/vdb/schema-expr.h"; sourceTree = SOURCE_ROOT; };
+		9D7A42CB13FAEA21003087FF /* schema-func.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "schema-func.c"; path = "../../../libs/vdb/schema-func.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42CC13FAEA21003087FF /* schema-int.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "schema-int.c"; path = "../../../libs/vdb/schema-int.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42CD13FAEA21003087FF /* schema-parse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "schema-parse.c"; path = "../../../libs/vdb/schema-parse.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42CE13FAEA21003087FF /* schema-parse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "schema-parse.h"; path = "../../../libs/vdb/schema-parse.h"; sourceTree = SOURCE_ROOT; };
+		9D7A42CF13FAEA21003087FF /* schema-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "schema-priv.h"; path = "../../../libs/vdb/schema-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A42D013FAEA21003087FF /* schema-prod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "schema-prod.c"; path = "../../../libs/vdb/schema-prod.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42D113FAEA21003087FF /* schema-tbl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "schema-tbl.c"; path = "../../../libs/vdb/schema-tbl.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42D213FAEA21003087FF /* schema-tok.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "schema-tok.c"; path = "../../../libs/vdb/schema-tok.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42D313FAEA21003087FF /* schema-tok.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "schema-tok.h"; path = "../../../libs/vdb/schema-tok.h"; sourceTree = SOURCE_ROOT; };
+		9D7A42D413FAEA21003087FF /* schema-type.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "schema-type.c"; path = "../../../libs/vdb/schema-type.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42D513FAEA21003087FF /* schema.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = schema.c; path = ../../../libs/vdb/schema.c; sourceTree = SOURCE_ROOT; };
+		9D7A42D613FAEA21003087FF /* split.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = split.c; path = ../../../libs/vdb/split.c; sourceTree = SOURCE_ROOT; };
+		9D7A42D713FAEA21003087FF /* table-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "table-cmn.c"; path = "../../../libs/vdb/table-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42D813FAEA21003087FF /* table-load.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "table-load.c"; path = "../../../libs/vdb/table-load.c"; sourceTree = SOURCE_ROOT; };
+		9D7A42D913FAEA21003087FF /* table-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "table-priv.h"; path = "../../../libs/vdb/table-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A42DA13FAEA21003087FF /* table.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = table.c; path = ../../../libs/vdb/table.c; sourceTree = SOURCE_ROOT; };
+		9D7A42DB13FAEA21003087FF /* wcolumn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcolumn.c; path = ../../../libs/vdb/wcolumn.c; sourceTree = SOURCE_ROOT; };
+		9D7A42DC13FAEA21003087FF /* wcursor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcursor.c; path = ../../../libs/vdb/wcursor.c; sourceTree = SOURCE_ROOT; };
+		9D7A42DD13FAEA21003087FF /* wdatabase.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wdatabase.c; path = ../../../libs/vdb/wdatabase.c; sourceTree = SOURCE_ROOT; };
+		9D7A42DE13FAEA21003087FF /* wdbmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wdbmgr.c; path = ../../../libs/vdb/wdbmgr.c; sourceTree = SOURCE_ROOT; };
+		9D7A42DF13FAEA21003087FF /* wlinker.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wlinker.c; path = ../../../libs/vdb/wlinker.c; sourceTree = SOURCE_ROOT; };
+		9D7A42E013FAEA21003087FF /* wphys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wphys.c; path = ../../../libs/vdb/wphys.c; sourceTree = SOURCE_ROOT; };
+		9D7A42E113FAEA21003087FF /* wprod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wprod.c; path = ../../../libs/vdb/wprod.c; sourceTree = SOURCE_ROOT; };
+		9D7A42E213FAEA21003087FF /* wtable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wtable.c; path = ../../../libs/vdb/wtable.c; sourceTree = SOURCE_ROOT; };
+		9D7A42E313FAEA21003087FF /* xform-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "xform-priv.h"; path = "../../../libs/vdb/xform-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A431C13FAED2E003087FF /* libvdb.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libvdb.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A433713FAEE0C003087FF /* libwvdb.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwvdb.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A436013FAF1AE003087FF /* libvxf.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libvxf.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A436713FAF20D003087FF /* add-row-id.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "add-row-id.c"; path = "../../../libs/vxf/add-row-id.c"; sourceTree = SOURCE_ROOT; };
+		9D7A436813FAF20D003087FF /* bit_or.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bit_or.c; path = ../../../libs/vxf/bit_or.c; sourceTree = SOURCE_ROOT; };
+		9D7A436913FAF20D003087FF /* bunzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bunzip.c; path = ../../../libs/vxf/bunzip.c; sourceTree = SOURCE_ROOT; };
+		9D7A436A13FAF20D003087FF /* bzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bzip.c; path = ../../../libs/vxf/bzip.c; sourceTree = SOURCE_ROOT; };
+		9D7A436B13FAF20D003087FF /* ceil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ceil.c; path = ../../../libs/vxf/ceil.c; sourceTree = SOURCE_ROOT; };
+		9D7A436C13FAF20D003087FF /* checksum.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = checksum.c; path = ../../../libs/vxf/checksum.c; sourceTree = SOURCE_ROOT; };
+		9D7A436D13FAF20D003087FF /* clip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = clip.c; path = ../../../libs/vxf/clip.c; sourceTree = SOURCE_ROOT; };
+		9D7A436E13FAF20D003087FF /* cut.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cut.c; path = ../../../libs/vxf/cut.c; sourceTree = SOURCE_ROOT; };
+		9D7A436F13FAF20D003087FF /* delta.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = delta.c; path = ../../../libs/vxf/delta.c; sourceTree = SOURCE_ROOT; };
+		9D7A437013FAF20D003087FF /* deriv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = deriv.c; path = ../../../libs/vxf/deriv.c; sourceTree = SOURCE_ROOT; };
+		9D7A437113FAF20D003087FF /* diff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = diff.c; path = ../../../libs/vxf/diff.c; sourceTree = SOURCE_ROOT; };
+		9D7A437213FAF20D003087FF /* echo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = echo.c; path = ../../../libs/vxf/echo.c; sourceTree = SOURCE_ROOT; };
+		9D7A437313FAF20E003087FF /* entrez.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = entrez.c; path = ../../../libs/vxf/entrez.c; sourceTree = SOURCE_ROOT; };
+		9D7A437413FAF20E003087FF /* exists.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = exists.c; path = ../../../libs/vxf/exists.c; sourceTree = SOURCE_ROOT; };
+		9D7A437513FAF20E003087FF /* floor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = floor.c; path = ../../../libs/vxf/floor.c; sourceTree = SOURCE_ROOT; };
+		9D7A437613FAF20E003087FF /* fsplit-join.impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "fsplit-join.impl.h"; path = "../../../libs/vxf/fsplit-join.impl.h"; sourceTree = SOURCE_ROOT; };
+		9D7A437713FAF20E003087FF /* funzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = funzip.c; path = ../../../libs/vxf/funzip.c; sourceTree = SOURCE_ROOT; };
+		9D7A437813FAF20E003087FF /* fzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = fzip.c; path = ../../../libs/vxf/fzip.c; sourceTree = SOURCE_ROOT; };
+		9D7A437913FAF20E003087FF /* integral.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = integral.c; path = ../../../libs/vxf/integral.c; sourceTree = SOURCE_ROOT; };
+		9D7A437A13FAF20E003087FF /* irzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = irzip.c; path = ../../../libs/vxf/irzip.c; sourceTree = SOURCE_ROOT; };
+		9D7A437B13FAF20E003087FF /* irzip.impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = irzip.impl.h; path = ../../../libs/vxf/irzip.impl.h; sourceTree = SOURCE_ROOT; };
+		9D7A437C13FAF20E003087FF /* iunzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = iunzip.c; path = ../../../libs/vxf/iunzip.c; sourceTree = SOURCE_ROOT; };
+		9D7A437D13FAF20E003087FF /* izip-common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "izip-common.h"; path = "../../../libs/vxf/izip-common.h"; sourceTree = SOURCE_ROOT; };
+		9D7A437E13FAF20E003087FF /* izip-decode.impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "izip-decode.impl.h"; path = "../../../libs/vxf/izip-decode.impl.h"; sourceTree = SOURCE_ROOT; };
+		9D7A437F13FAF20E003087FF /* izip-encode.impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "izip-encode.impl.h"; path = "../../../libs/vxf/izip-encode.impl.h"; sourceTree = SOURCE_ROOT; };
+		9D7A438013FAF20E003087FF /* izip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = izip.c; path = ../../../libs/vxf/izip.c; sourceTree = SOURCE_ROOT; };
+		9D7A438113FAF20E003087FF /* libvxf.vers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libvxf.vers.h; path = ../../../libs/vxf/libvxf.vers.h; sourceTree = SOURCE_ROOT; };
+		9D7A438213FAF20E003087FF /* libvxfentrez.vers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libvxfentrez.vers.h; path = ../../../libs/vxf/libvxfentrez.vers.h; sourceTree = SOURCE_ROOT; };
+		9D7A438313FAF20E003087FF /* map.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = map.c; path = ../../../libs/vxf/map.c; sourceTree = SOURCE_ROOT; };
+		9D7A438413FAF20E003087FF /* math-funcs-impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "math-funcs-impl.h"; path = "../../../libs/vxf/math-funcs-impl.h"; sourceTree = SOURCE_ROOT; };
+		9D7A438513FAF20E003087FF /* max.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = max.c; path = ../../../libs/vxf/max.c; sourceTree = SOURCE_ROOT; };
+		9D7A438613FAF20E003087FF /* min.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = min.c; path = ../../../libs/vxf/min.c; sourceTree = SOURCE_ROOT; };
+		9D7A438713FAF20E003087FF /* outlier-decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "outlier-decoder.c"; path = "../../../libs/vxf/outlier-decoder.c"; sourceTree = SOURCE_ROOT; };
+		9D7A438813FAF20E003087FF /* outlier-encoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "outlier-encoder.c"; path = "../../../libs/vxf/outlier-encoder.c"; sourceTree = SOURCE_ROOT; };
+		9D7A438913FAF20E003087FF /* pack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pack.c; path = ../../../libs/vxf/pack.c; sourceTree = SOURCE_ROOT; };
+		9D7A438A13FAF20E003087FF /* paste.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = paste.c; path = ../../../libs/vxf/paste.c; sourceTree = SOURCE_ROOT; };
+		9D7A438B13FAF20E003087FF /* rand_4na_2na.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rand_4na_2na.c; path = ../../../libs/vxf/rand_4na_2na.c; sourceTree = SOURCE_ROOT; };
+		9D7A438C13FAF20E003087FF /* rldecode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rldecode.c; path = ../../../libs/vxf/rldecode.c; sourceTree = SOURCE_ROOT; };
+		9D7A438D13FAF20E003087FF /* rlencode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rlencode.c; path = ../../../libs/vxf/rlencode.c; sourceTree = SOURCE_ROOT; };
+		9D7A438E13FAF20E003087FF /* round.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = round.c; path = ../../../libs/vxf/round.c; sourceTree = SOURCE_ROOT; };
+		9D7A438F13FAF20E003087FF /* simple-sub-select.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "simple-sub-select.c"; path = "../../../libs/vxf/simple-sub-select.c"; sourceTree = SOURCE_ROOT; };
+		9D7A439013FAF20E003087FF /* subtract-row-id.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "subtract-row-id.c"; path = "../../../libs/vxf/subtract-row-id.c"; sourceTree = SOURCE_ROOT; };
+		9D7A439113FAF20E003087FF /* sum.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sum.c; path = ../../../libs/vxf/sum.c; sourceTree = SOURCE_ROOT; };
+		9D7A439213FAF20E003087FF /* trim.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = trim.c; path = ../../../libs/vxf/trim.c; sourceTree = SOURCE_ROOT; };
+		9D7A439313FAF20E003087FF /* trunc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = trunc.c; path = ../../../libs/vxf/trunc.c; sourceTree = SOURCE_ROOT; };
+		9D7A439413FAF20E003087FF /* undelta.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = undelta.c; path = ../../../libs/vxf/undelta.c; sourceTree = SOURCE_ROOT; };
+		9D7A439513FAF20E003087FF /* unpack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = unpack.c; path = ../../../libs/vxf/unpack.c; sourceTree = SOURCE_ROOT; };
+		9D7A439613FAF20E003087FF /* unzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = unzip.c; path = ../../../libs/vxf/unzip.c; sourceTree = SOURCE_ROOT; };
+		9D7A439713FAF20E003087FF /* vec-sum.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "vec-sum.c"; path = "../../../libs/vxf/vec-sum.c"; sourceTree = SOURCE_ROOT; };
+		9D7A439813FAF20E003087FF /* zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = zip.c; path = ../../../libs/vxf/zip.c; sourceTree = SOURCE_ROOT; };
+		9D7A43DE13FAF2EF003087FF /* bio-start.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "bio-start.c"; path = "../../../libs/sraxf/bio-start.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43DF13FAF2EF003087FF /* color-from-dna.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "color-from-dna.c"; path = "../../../libs/sraxf/color-from-dna.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43E013FAF2EF003087FF /* denormalize.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = denormalize.c; path = ../../../libs/sraxf/denormalize.c; sourceTree = SOURCE_ROOT; };
+		9D7A43E113FAF2EF003087FF /* dna-from-color.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "dna-from-color.c"; path = "../../../libs/sraxf/dna-from-color.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43E213FAF2EF003087FF /* dynamic-454-read-descriptor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "dynamic-454-read-descriptor.c"; path = "../../../libs/sraxf/dynamic-454-read-descriptor.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43E313FAF2EF003087FF /* extract-coordinates.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "extract-coordinates.c"; path = "../../../libs/sraxf/extract-coordinates.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43E413FAF2EF003087FF /* extract-name_coord.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "extract-name_coord.c"; path = "../../../libs/sraxf/extract-name_coord.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43E513FAF2EF003087FF /* extract-name_fmt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "extract-name_fmt.c"; path = "../../../libs/sraxf/extract-name_fmt.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43E613FAF2EF003087FF /* extract-spot_name.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "extract-spot_name.c"; path = "../../../libs/sraxf/extract-spot_name.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43E713FAF2EF003087FF /* format-spot-name.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "format-spot-name.c"; path = "../../../libs/sraxf/format-spot-name.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43E813FAF2EF003087FF /* fpcodec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = fpcodec.c; path = ../../../libs/sraxf/fpcodec.c; sourceTree = SOURCE_ROOT; };
+		9D7A43E913FAF2EF003087FF /* index_lookup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = index_lookup.c; path = ../../../libs/sraxf/index_lookup.c; sourceTree = SOURCE_ROOT; };
+		9D7A43EA13FAF2EF003087FF /* libsraxf.vers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libsraxf.vers.h; path = ../../../libs/sraxf/libsraxf.vers.h; sourceTree = SOURCE_ROOT; };
+		9D7A43EB13FAF2EF003087FF /* libwsraxf.vers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libwsraxf.vers.h; path = ../../../libs/sraxf/libwsraxf.vers.h; sourceTree = SOURCE_ROOT; };
+		9D7A43EC13FAF2EF003087FF /* make-position.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "make-position.c"; path = "../../../libs/sraxf/make-position.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43ED13FAF2EF003087FF /* name-tokenizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "name-tokenizer.h"; path = "../../../libs/sraxf/name-tokenizer.h"; sourceTree = SOURCE_ROOT; };
+		9D7A43EE13FAF2EF003087FF /* normalize.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = normalize.c; path = ../../../libs/sraxf/normalize.c; sourceTree = SOURCE_ROOT; };
+		9D7A43EF13FAF2EF003087FF /* prefix-tree-to-name.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "prefix-tree-to-name.c"; path = "../../../libs/sraxf/prefix-tree-to-name.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43F013FAF2EF003087FF /* process-position.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "process-position.c"; path = "../../../libs/sraxf/process-position.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43F113FAF2EF003087FF /* qual4_codec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = qual4_codec.h; path = ../../../libs/sraxf/qual4_codec.h; sourceTree = SOURCE_ROOT; };
+		9D7A43F213FAF2EF003087FF /* qual4_decode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = qual4_decode.c; path = ../../../libs/sraxf/qual4_decode.c; sourceTree = SOURCE_ROOT; };
+		9D7A43F313FAF2EF003087FF /* qual4_encode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = qual4_encode.c; path = ../../../libs/sraxf/qual4_encode.c; sourceTree = SOURCE_ROOT; };
+		9D7A43F413FAF2EF003087FF /* read-desc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "read-desc.c"; path = "../../../libs/sraxf/read-desc.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43F513FAF2EF003087FF /* read-seg-from-readn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "read-seg-from-readn.c"; path = "../../../libs/sraxf/read-seg-from-readn.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43F613FAF2EF003087FF /* rewrite-spot-name.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "rewrite-spot-name.c"; path = "../../../libs/sraxf/rewrite-spot-name.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43F713FAF2EF003087FF /* rotate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rotate.c; path = ../../../libs/sraxf/rotate.c; sourceTree = SOURCE_ROOT; };
+		9D7A43F813FAF2EF003087FF /* spot-desc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "spot-desc.c"; path = "../../../libs/sraxf/spot-desc.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43F913FAF2EF003087FF /* stats_quality.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stats_quality.c; path = ../../../libs/sraxf/stats_quality.c; sourceTree = SOURCE_ROOT; };
+		9D7A43FA13FAF2EF003087FF /* stats.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stats.c; path = ../../../libs/sraxf/stats.c; sourceTree = SOURCE_ROOT; };
+		9D7A43FB13FAF2EF003087FF /* swap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = swap.c; path = ../../../libs/sraxf/swap.c; sourceTree = SOURCE_ROOT; };
+		9D7A43FC13FAF2EF003087FF /* tokenize-spot_name-454.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "tokenize-spot_name-454.c"; path = "../../../libs/sraxf/tokenize-spot_name-454.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43FD13FAF2EF003087FF /* tokenize-spot_name-abi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "tokenize-spot_name-abi.c"; path = "../../../libs/sraxf/tokenize-spot_name-abi.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43FE13FAF2EF003087FF /* tokenize-spot_name-helicos.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "tokenize-spot_name-helicos.c"; path = "../../../libs/sraxf/tokenize-spot_name-helicos.c"; sourceTree = SOURCE_ROOT; };
+		9D7A43FF13FAF2EF003087FF /* tokenize-spot_name-illumina.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "tokenize-spot_name-illumina.c"; path = "../../../libs/sraxf/tokenize-spot_name-illumina.c"; sourceTree = SOURCE_ROOT; };
+		9D7A440013FAF2EF003087FF /* tokenize-spot_name-ion-torrent.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "tokenize-spot_name-ion-torrent.c"; path = "../../../libs/sraxf/tokenize-spot_name-ion-torrent.c"; sourceTree = SOURCE_ROOT; };
+		9D7A440113FAF2EF003087FF /* untyped-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "untyped-priv.h"; path = "../../../libs/sraxf/untyped-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A440213FAF2EF003087FF /* untyped.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = untyped.c; path = ../../../libs/sraxf/untyped.c; sourceTree = SOURCE_ROOT; };
+		9D7A440313FAF2EF003087FF /* v0-decompress-init.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "v0-decompress-init.c"; path = "../../../libs/sraxf/v0-decompress-init.c"; sourceTree = SOURCE_ROOT; };
+		9D7A440413FAF2EF003087FF /* v0-decompress-local.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "v0-decompress-local.h"; path = "../../../libs/sraxf/v0-decompress-local.h"; sourceTree = SOURCE_ROOT; };
+		9D7A440513FAF2EF003087FF /* v0-decompress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "v0-decompress.c"; path = "../../../libs/sraxf/v0-decompress.c"; sourceTree = SOURCE_ROOT; };
+		9D7A440613FAF2EF003087FF /* v0-decompress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "v0-decompress.h"; path = "../../../libs/sraxf/v0-decompress.h"; sourceTree = SOURCE_ROOT; };
+		9D7A440713FAF2EF003087FF /* v0-funcs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "v0-funcs.c"; path = "../../../libs/sraxf/v0-funcs.c"; sourceTree = SOURCE_ROOT; };
+		9D7A440C13FAF315003087FF /* libsraxf.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libsraxf.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A445013FAF48E003087FF /* agrep-dp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "agrep-dp.c"; path = "../../../libs/search/agrep-dp.c"; sourceTree = SOURCE_ROOT; };
+		9D7A445113FAF48E003087FF /* agrep-myers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "agrep-myers.c"; path = "../../../libs/search/agrep-myers.c"; sourceTree = SOURCE_ROOT; };
+		9D7A445213FAF48E003087FF /* agrep-myersunltd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "agrep-myersunltd.c"; path = "../../../libs/search/agrep-myersunltd.c"; sourceTree = SOURCE_ROOT; };
+		9D7A445313FAF48E003087FF /* agrep-wumanber.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "agrep-wumanber.c"; path = "../../../libs/search/agrep-wumanber.c"; sourceTree = SOURCE_ROOT; };
+		9D7A445413FAF48E003087FF /* fgrep-aho.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "fgrep-aho.c"; path = "../../../libs/search/fgrep-aho.c"; sourceTree = SOURCE_ROOT; };
+		9D7A445513FAF48E003087FF /* fgrep-boyermoore.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "fgrep-boyermoore.c"; path = "../../../libs/search/fgrep-boyermoore.c"; sourceTree = SOURCE_ROOT; };
+		9D7A445613FAF48E003087FF /* fgrep-dumb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "fgrep-dumb.c"; path = "../../../libs/search/fgrep-dumb.c"; sourceTree = SOURCE_ROOT; };
+		9D7A445713FAF48E003087FF /* libksrch.vers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libksrch.vers.h; path = ../../../libs/search/libksrch.vers.h; sourceTree = SOURCE_ROOT; };
+		9D7A445813FAF48E003087FF /* nucstrstr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = nucstrstr.c; path = ../../../libs/search/nucstrstr.c; sourceTree = SOURCE_ROOT; };
+		9D7A445913FAF48E003087FF /* search-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "search-priv.h"; path = "../../../libs/search/search-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A445A13FAF48E003087FF /* search.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = search.c; path = ../../../libs/search/search.c; sourceTree = SOURCE_ROOT; };
+		9D7A447613FAF539003087FF /* align-local_ref_id.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "align-local_ref_id.c"; path = "../../../libs/axf/align-local_ref_id.c"; sourceTree = SOURCE_ROOT; };
+		9D7A447713FAF539003087FF /* align-local_ref_start.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "align-local_ref_start.c"; path = "../../../libs/axf/align-local_ref_start.c"; sourceTree = SOURCE_ROOT; };
+		9D7A447813FAF539003087FF /* align-ref-name.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "align-ref-name.c"; path = "../../../libs/axf/align-ref-name.c"; sourceTree = SOURCE_ROOT; };
+		9D7A447913FAF539003087FF /* align-ref-pos.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "align-ref-pos.c"; path = "../../../libs/axf/align-ref-pos.c"; sourceTree = SOURCE_ROOT; };
+		9D7A447A13FAF539003087FF /* align-ref-seq-id.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "align-ref-seq-id.c"; path = "../../../libs/axf/align-ref-seq-id.c"; sourceTree = SOURCE_ROOT; };
+		9D7A447B13FAF539003087FF /* align-restore-read.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "align-restore-read.c"; path = "../../../libs/axf/align-restore-read.c"; sourceTree = SOURCE_ROOT; };
+		9D7A447C13FAF539003087FF /* cigar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cigar.c; path = ../../../libs/axf/cigar.c; sourceTree = SOURCE_ROOT; };
+		9D7A447D13FAF539003087FF /* get-sam-flags.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "get-sam-flags.c"; path = "../../../libs/axf/get-sam-flags.c"; sourceTree = SOURCE_ROOT; };
+		9D7A447E13FAF539003087FF /* libaxf.vers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libaxf.vers.h; path = ../../../libs/axf/libaxf.vers.h; sourceTree = SOURCE_ROOT; };
+		9D7A447F13FAF539003087FF /* libwaxf.vers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libwaxf.vers.h; path = ../../../libs/axf/libwaxf.vers.h; sourceTree = SOURCE_ROOT; };
+		9D7A448013FAF539003087FF /* not-my-row.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "not-my-row.c"; path = "../../../libs/axf/not-my-row.c"; sourceTree = SOURCE_ROOT; };
+		9D7A448113FAF539003087FF /* project_read_from_sequence.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = project_read_from_sequence.c; path = ../../../libs/axf/project_read_from_sequence.c; sourceTree = SOURCE_ROOT; };
+		9D7A448213FAF539003087FF /* raw-restore-read.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "raw-restore-read.c"; path = "../../../libs/axf/raw-restore-read.c"; sourceTree = SOURCE_ROOT; };
+		9D7A448313FAF539003087FF /* ref-restore-read.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ref-restore-read.c"; path = "../../../libs/axf/ref-restore-read.c"; sourceTree = SOURCE_ROOT; };
+		9D7A448413FAF539003087FF /* ref-tbl-sub-select.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ref-tbl-sub-select.c"; path = "../../../libs/axf/ref-tbl-sub-select.c"; sourceTree = SOURCE_ROOT; };
+		9D7A448513FAF539003087FF /* refseq-stats.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "refseq-stats.c"; path = "../../../libs/axf/refseq-stats.c"; sourceTree = SOURCE_ROOT; };
+		9D7A448613FAF539003087FF /* seq-restore-read.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "seq-restore-read.c"; path = "../../../libs/axf/seq-restore-read.c"; sourceTree = SOURCE_ROOT; };
+		9D7A448713FAF539003087FF /* template-len.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "template-len.c"; path = "../../../libs/axf/template-len.c"; sourceTree = SOURCE_ROOT; };
+		9D7A448C13FAF555003087FF /* libaxf.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libaxf.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A44AB13FB0494003087FF /* align-access.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "align-access.c"; path = "../../../libs/align/align-access.c"; sourceTree = SOURCE_ROOT; };
+		9D7A44AC13FB0494003087FF /* bam-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "bam-priv.h"; path = "../../../libs/align/bam-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A44AD13FB0494003087FF /* bam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bam.c; path = ../../../libs/align/bam.c; sourceTree = SOURCE_ROOT; };
+		9D7A44AE13FB0494003087FF /* reader-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "reader-cmn.c"; path = "../../../libs/align/reader-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D7A44AF13FB0494003087FF /* reader-cmn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "reader-cmn.h"; path = "../../../libs/align/reader-cmn.h"; sourceTree = SOURCE_ROOT; };
+		9D7A44B013FB0494003087FF /* reader-refseq.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "reader-refseq.c"; path = "../../../libs/align/reader-refseq.c"; sourceTree = SOURCE_ROOT; };
+		9D7A44B113FB0494003087FF /* refseq-mgr-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "refseq-mgr-priv.h"; path = "../../../libs/align/refseq-mgr-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A44B213FB0494003087FF /* refseq-mgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "refseq-mgr.c"; path = "../../../libs/align/refseq-mgr.c"; sourceTree = SOURCE_ROOT; };
+		9D7A44B413FB0494003087FF /* writer-alignment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "writer-alignment.c"; path = "../../../libs/align/writer-alignment.c"; sourceTree = SOURCE_ROOT; };
+		9D7A44B513FB0494003087FF /* writer-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "writer-cmn.c"; path = "../../../libs/align/writer-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D7A44B613FB0494003087FF /* writer-priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "writer-priv.h"; path = "../../../libs/align/writer-priv.h"; sourceTree = SOURCE_ROOT; };
+		9D7A44B713FB0494003087FF /* writer-ref.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "writer-ref.c"; path = "../../../libs/align/writer-ref.c"; sourceTree = SOURCE_ROOT; };
+		9D7A44B813FB0494003087FF /* writer-ref.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "writer-ref.h"; path = "../../../libs/align/writer-ref.h"; sourceTree = SOURCE_ROOT; };
+		9D7A44B913FB0494003087FF /* writer-reference.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "writer-reference.c"; path = "../../../libs/align/writer-reference.c"; sourceTree = SOURCE_ROOT; };
+		9D7A44BA13FB0494003087FF /* writer-refseq.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "writer-refseq.c"; path = "../../../libs/align/writer-refseq.c"; sourceTree = SOURCE_ROOT; };
+		9D7A44BB13FB0494003087FF /* writer-sequence.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "writer-sequence.c"; path = "../../../libs/align/writer-sequence.c"; sourceTree = SOURCE_ROOT; };
+		9D7A44C013FB04A9003087FF /* libalign.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libalign.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A452F13FB0A3C003087FF /* libwvxf.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwvxf.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A454B13FB0B4D003087FF /* libwsraxf.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwsraxf.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A45C713FB0CB8003087FF /* libwaxf.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwaxf.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A45E713FB0D50003087FF /* libwalign.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwalign.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A460213FB0F0F003087FF /* progressbar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = progressbar.c; path = ../../../libs/kapp/progressbar.c; sourceTree = SOURCE_ROOT; };
+		9D7A460713FB0F36003087FF /* libkapp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libkapp.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A461013FB1128003087FF /* deseq.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = deseq.c; path = ../../../tools/deseq/deseq.c; sourceTree = SOURCE_ROOT; };
+		9D7A461413FB1133003087FF /* deseq */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = deseq; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D7A469113FB1FC5003087FF /* align.vschema */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = align.vschema; path = ../../../interfaces/align/align.vschema; sourceTree = SOURCE_ROOT; };
+		9D7A469213FB1FC5003087FF /* refseq.vschema */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = refseq.vschema; path = ../../../interfaces/align/refseq.vschema; sourceTree = SOURCE_ROOT; };
+		9D7A469313FB1FC5003087FF /* seq.vschema */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = seq.vschema; path = ../../../interfaces/align/seq.vschema; sourceTree = SOURCE_ROOT; };
+		9D8198A811D3D39700DA4D3C /* vector_namelist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vector_namelist.c; path = ../../../libs/klib/vector_namelist.c; sourceTree = SOURCE_ROOT; };
+		9D8204F7130F1100009A8B64 /* pagefile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pagefile.c; path = ../../../libs/kfs/pagefile.c; sourceTree = SOURCE_ROOT; };
+		9D8EC40E11C2E20A000F1048 /* pbstree-impl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "pbstree-impl.c"; path = "../../../libs/klib/pbstree-impl.c"; sourceTree = SOURCE_ROOT; };
+		9D8EC41911C2E49E000F1048 /* pbstree-native.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "pbstree-native.c"; path = "../../../libs/klib/pbstree-native.c"; sourceTree = SOURCE_ROOT; };
+		9D8EC41A11C2E49E000F1048 /* pbstree-swapped.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "pbstree-swapped.c"; path = "../../../libs/klib/pbstree-swapped.c"; sourceTree = SOURCE_ROOT; };
+		9D985E8C12886C6100849729 /* config.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = config.c; path = ../../../libs/kfg/config.c; sourceTree = SOURCE_ROOT; };
+		9D985FCB1288BA8700849729 /* config.mac.kfg */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; name = config.mac.kfg; path = ../../../libs/kfg/config.mac.kfg; sourceTree = SOURCE_ROOT; };
+		9DA3A84D125FA3A8005AD5BB /* refcount.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = refcount.c; path = ../../../libs/klib/refcount.c; sourceTree = SOURCE_ROOT; };
+		9DA3A865125FBB21005AD5BB /* abi.vschema */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = abi.vschema; path = ../../../interfaces/sra/abi.vschema; sourceTree = SOURCE_ROOT; };
+		9DA3A866125FBB34005AD5BB /* illumina.vschema */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = illumina.vschema; path = ../../../interfaces/sra/illumina.vschema; sourceTree = SOURCE_ROOT; };
+		9DA3A867125FBBBA005AD5BB /* seq.vschema */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = seq.vschema; path = ../../../interfaces/ncbi/seq.vschema; sourceTree = SOURCE_ROOT; };
+		9DA3A868125FBBF0005AD5BB /* sra.vschema */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = sra.vschema; path = ../../../interfaces/ncbi/sra.vschema; sourceTree = SOURCE_ROOT; };
+		9DA3A88412663646005AD5BB /* syswriter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = syswriter.c; path = ../../../libs/klib/unix/syswriter.c; sourceTree = SOURCE_ROOT; };
+		9DA3A8951266375B005AD5BB /* writer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = writer.c; path = ../../../libs/klib/writer.c; sourceTree = SOURCE_ROOT; };
+		9DA3A89912663798005AD5BB /* out.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = out.c; path = ../../../libs/klib/out.c; sourceTree = SOURCE_ROOT; };
+		9DB6A77911E61CB700168DE0 /* args.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = args.c; path = ../../../libs/kapp/args.c; sourceTree = SOURCE_ROOT; };
+		9DE55A78140EA19500EA61C6 /* raw-restore-qual.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "raw-restore-qual.c"; path = "../../../libs/axf/raw-restore-qual.c"; sourceTree = SOURCE_ROOT; };
+		9DE55A84140EA93600EA61C6 /* generate-mismatch-qual.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "generate-mismatch-qual.c"; path = "../../../libs/axf/generate-mismatch-qual.c"; sourceTree = SOURCE_ROOT; };
+		9DE55AAE140EC79C00EA61C6 /* mismatch-restore-qual.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "mismatch-restore-qual.c"; path = "../../../libs/axf/mismatch-restore-qual.c"; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		9D31EC97117667FA003CDA5E /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9DFECDE6117669DD004EFD0D /* libz.dylib in Frameworks */,
+				9DFECDE7117669E0004EFD0D /* libbz2.dylib in Frameworks */,
+				9DFECDE8117669E0004EFD0D /* libxml2.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A412C13FADF3A003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A415A13FAE00E003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A417613FAE192003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A423213FAE3F5003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A423913FAE40C003087FF /* libkdb-cmn.a in Frameworks */,
+				9D7A426113FAE67B003087FF /* libklib.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A426613FAE69A003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A426B13FAE6A5003087FF /* libkdb-cmn.a in Frameworks */,
+				9D7A426C13FAE6A7003087FF /* libklib.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A428713FAE9B5003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A431A13FAED2E003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A432913FAEDCC003087FF /* libvdb-cmn.a in Frameworks */,
+				9D7A432A13FAEDD9003087FF /* libkdb.dylib in Frameworks */,
+				9D7A432D13FAEDE5003087FF /* libklib.dylib in Frameworks */,
+				9D7A433013FAEDF6003087FF /* libz.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A433513FAEE0C003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A435113FAEF00003087FF /* libwkdb.dylib in Frameworks */,
+				9D7A435213FAEF06003087FF /* libvdb-cmn.a in Frameworks */,
+				9D7A435313FAEF0E003087FF /* libklib.dylib in Frameworks */,
+				9D7A435613FAEF1F003087FF /* libkmproc.a in Frameworks */,
+				9D7A435913FAEF26003087FF /* libz.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A435E13FAF1AE003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A43CD13FAF23A003087FF /* libvdb.dylib in Frameworks */,
+				9D7A43D013FAF245003087FF /* libz.dylib in Frameworks */,
+				9D7A43D613FAF257003087FF /* libklib.dylib in Frameworks */,
+				9D7A43DB13FAF274003087FF /* libbz2.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A440A13FAF315003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A444313FAF3F6003087FF /* libklib.dylib in Frameworks */,
+				9D7A444613FAF402003087FF /* libvdb.dylib in Frameworks */,
+				9D7A444913FAF411003087FF /* libz.dylib in Frameworks */,
+				9D7A444C13FAF41C003087FF /* libkdb.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A448A13FAF555003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A44A313FAF59D003087FF /* libklib.dylib in Frameworks */,
+				9D7A44A613FAF5A9003087FF /* libvdb.dylib in Frameworks */,
+				9D7A44DC13FB0537003087FF /* libalign.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A44BE13FB04A9003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A44D013FB04D8003087FF /* libklib.dylib in Frameworks */,
+				9D7A44D113FB04DC003087FF /* libvdb.dylib in Frameworks */,
+				9D7A44D413FB04EF003087FF /* libz.dylib in Frameworks */,
+				9D7A44D913FB051B003087FF /* libkdb.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A452D13FB0A3C003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A453D13FB0AB1003087FF /* libz.dylib in Frameworks */,
+				9D7A453E13FB0AB2003087FF /* libbz2.dylib in Frameworks */,
+				9D7A454113FB0AC9003087FF /* libwvdb.dylib in Frameworks */,
+				9D7A454213FB0ACF003087FF /* libwkdb.dylib in Frameworks */,
+				9D7A454313FB0AD5003087FF /* libklib.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A454913FB0B4D003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A455513FB0B86003087FF /* libwvdb.dylib in Frameworks */,
+				9D7A455613FB0B8B003087FF /* libwkdb.dylib in Frameworks */,
+				9D7A455713FB0B91003087FF /* libklib.dylib in Frameworks */,
+				9D7A457D13FB0C28003087FF /* libz.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A45C013FB0CB8003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A45C113FB0CB8003087FF /* libklib.dylib in Frameworks */,
+				9D7A45C313FB0CB8003087FF /* libalign.dylib in Frameworks */,
+				9D7A45CB13FB0D18003087FF /* libwvdb.dylib in Frameworks */,
+				9D7A45CE13FB0D24003087FF /* libwkdb.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A45DF13FB0D50003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A45E013FB0D50003087FF /* libklib.dylib in Frameworks */,
+				9D7A45E213FB0D50003087FF /* libz.dylib in Frameworks */,
+				9D7A45E813FB0D72003087FF /* libwvdb.dylib in Frameworks */,
+				9D7A45E913FB0D76003087FF /* libwkdb.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A460513FB0F36003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A461213FB1133003087FF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A461913FB114C003087FF /* libkapp.a in Frameworks */,
+				9D7A463B13FB135F003087FF /* libklib.dylib in Frameworks */,
+				9D90F4DB140D8229004A99D6 /* libwvdb.dylib in Frameworks */,
+				9DE559C6140E831000EA61C6 /* libwaxf.dylib in Frameworks */,
+				9DE559C7140E831800EA61C6 /* libwvxf.dylib in Frameworks */,
+				9DE559C8140E831C00EA61C6 /* libwsraxf.dylib in Frameworks */,
+				9DE55AFC140EF0B100EA61C6 /* libwkdb.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		08FB7794FE84155DC02AAC07 /* asm-trace */ = {
+			isa = PBXGroup;
+			children = (
+				9DB6A8D411EB9F2100168DE0 /* interfaces */,
+				9D819B3411DB9D5200DA4D3C /* Tools */,
+				9D8EC47011C2F081000F1048 /* Tests */,
+				9D7356C111775493009EA3E4 /* schema */,
+				9D31EC8B11766778003CDA5E /* External Libraries */,
+				9D31EAAD1176621D003CDA5E /* Libs */,
+				9D7356E611775CB7009EA3E4 /* Products */,
+			);
+			name = "asm-trace";
+			sourceTree = "<group>";
+		};
+		9D31EAAD1176621D003CDA5E /* Libs */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A44AA13FB0466003087FF /* align */,
+				9D7A444F13FAF455003087FF /* search */,
+				9D7A436613FAF1C2003087FF /* axf */,
+				9D7A436513FAF1BC003087FF /* sraxf */,
+				9D7A436313FAF1B4003087FF /* vxf */,
+				9D7A428C13FAE9C4003087FF /* vdb */,
+				9D7A417B13FAE1A2003087FF /* kdb */,
+				9D31EAB01176623F003CDA5E /* kapp */,
+				9D985E8B12886C3A00849729 /* kfg */,
+				9D31EADD117662CE003CDA5E /* kfs */,
+				9D31EAFB1176632C003CDA5E /* klib */,
+				9D31EB1A11766387003CDA5E /* kproc */,
+				9D31EB2F117663FA003CDA5E /* kxml */,
+			);
+			name = Libs;
+			sourceTree = "<group>";
+		};
+		9D31EAB01176623F003CDA5E /* kapp */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A460213FB0F0F003087FF /* progressbar.c */,
+				9DB6A77911E61CB700168DE0 /* args.c */,
+				9D31EAB71176626A003CDA5E /* sysmain.c */,
+				9D31EAB311766257003CDA5E /* main.c */,
+			);
+			name = kapp;
+			sourceTree = "<group>";
+		};
+		9D31EADD117662CE003CDA5E /* kfs */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A411213FADD33003087FF /* sysdir-priv.h */,
+				9D7A411313FADD33003087FF /* sysfile-priv.h */,
+				9D7A411413FADD33003087FF /* sysmmap-priv.h */,
+				9D7A40ED13FADCFE003087FF /* arrayfile.c */,
+				9D7A40EE13FADCFE003087FF /* buffile-write.c */,
+				9D7A40EF13FADCFE003087FF /* fileformat-priv.h */,
+				9D7A40F013FADCFE003087FF /* impl.h */,
+				9D7A40F113FADCFE003087FF /* karc-priv.h */,
+				9D7A40F213FADCFE003087FF /* kfs-priv.h */,
+				9D7A40F313FADCFE003087FF /* manager.c */,
+				9D7A40F413FADCFE003087FF /* mmap-priv.h */,
+				9D7A40F513FADCFE003087FF /* mmap.c */,
+				9D7A40F613FADCFE003087FF /* path-priv.h */,
+				9D7A40F713FADCFE003087FF /* path.c */,
+				9D7A40F813FADCFE003087FF /* pmem.c */,
+				9D7A40F913FADCFE003087FF /* szip.c */,
+				9D7A40FA13FADCFE003087FF /* toc-priv.h */,
+				9D8204F7130F1100009A8B64 /* pagefile.c */,
+				9D31EAF71176631D003CDA5E /* sysdir.c */,
+				9D31EAF81176631D003CDA5E /* sysdll.c */,
+				9D31EAF91176631D003CDA5E /* sysfile.c */,
+				9D31EAFA1176631D003CDA5E /* sysmmap.c */,
+				9D31EAE011766306003CDA5E /* arc.c */,
+				9D31EAE111766306003CDA5E /* buffile.c */,
+				9D31EAE211766306003CDA5E /* bzip.c */,
+				9D31EAE311766306003CDA5E /* countfile.c */,
+				9D31EAE411766306003CDA5E /* crc32.c */,
+				9D31EAE511766306003CDA5E /* dir_test.c */,
+				9D31EAE611766306003CDA5E /* directory.c */,
+				9D31EAE711766306003CDA5E /* ffext.c */,
+				9D31EAE811766306003CDA5E /* ffkey.c */,
+				9D31EAE911766306003CDA5E /* ffmagic.c */,
+				9D31EAEA11766306003CDA5E /* file.c */,
+				9D31EAEB11766306003CDA5E /* fileformat.c */,
+				9D31EAEC11766306003CDA5E /* gzip.c */,
+				9D31EAED11766306003CDA5E /* md5.c */,
+				9D31EAEE11766306003CDA5E /* nullfile.c */,
+				9D31EAEF11766306003CDA5E /* sra.c */,
+				9D31EAF011766306003CDA5E /* subfile.c */,
+				9D31EAF111766306003CDA5E /* tar.c */,
+				9D31EAF211766306003CDA5E /* teefile.c */,
+				9D31EAF311766306003CDA5E /* toc.c */,
+				9D31EAF411766306003CDA5E /* tocdir.c */,
+				9D31EAF511766306003CDA5E /* tocentry.c */,
+				9D31EAF611766306003CDA5E /* tocfile.c */,
+			);
+			name = kfs;
+			sourceTree = "<group>";
+		};
+		9D31EAFB1176632C003CDA5E /* klib */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A40E813FADC66003087FF /* writer-priv.h */,
+				9D7A40DF13FADBEE003087FF /* syserrcode.c */,
+				9D7A40E013FADBEE003087FF /* systime.c */,
+				9D7A40D913FADBA3003087FF /* SHA-32bit.c */,
+				9D7A40DA13FADBA3003087FF /* SHA-64bit.c */,
+				9DA3A89912663798005AD5BB /* out.c */,
+				9DA3A8951266375B005AD5BB /* writer.c */,
+				9DA3A88412663646005AD5BB /* syswriter.c */,
+				9DA3A84D125FA3A8005AD5BB /* refcount.c */,
+				9D62F428124D01AE003D38E9 /* bsearch.c */,
+				9D62F429124D01AE003D38E9 /* qsort.c */,
+				9D1EC47F122D914C00C11287 /* printf.c */,
+				9D1EC480122D914C00C11287 /* status-rc-strings.c */,
+				9D1EC481122D914C00C11287 /* status-rc.c */,
+				9D1EC482122D914C00C11287 /* status.c */,
+				9D1EC47B122D912500C11287 /* debug.c */,
+				9D8198A811D3D39700DA4D3C /* vector_namelist.c */,
+				9D8EC41911C2E49E000F1048 /* pbstree-native.c */,
+				9D8EC41A11C2E49E000F1048 /* pbstree-swapped.c */,
+				9D8EC40E11C2E20A000F1048 /* pbstree-impl.c */,
+				9D31EB191176637A003CDA5E /* syslog.c */,
+				9D31EAFE11766366003CDA5E /* bstpersist.c */,
+				9D31EAFF11766366003CDA5E /* container.c */,
+				9D31EB0011766366003CDA5E /* cp1252.c */,
+				9D31EB0111766366003CDA5E /* crc32.c */,
+				9D31EB0211766366003CDA5E /* data-buffer.c */,
+				9D31EB0311766366003CDA5E /* iso8859-1.c */,
+				9D31EB0411766366003CDA5E /* iso8859.c */,
+				9D31EB0511766366003CDA5E /* log.c */,
+				9D31EB0611766366003CDA5E /* md5.c */,
+				9D31EB0711766366003CDA5E /* namelist.c */,
+				9D31EB0811766366003CDA5E /* pack.c */,
+				9D31EB0911766366003CDA5E /* pbstree.c */,
+				9D31EB0A11766366003CDA5E /* ptpersist.c */,
+				9D31EB0B11766366003CDA5E /* ptrie.c */,
+				9D31EB0C11766366003CDA5E /* rc-idx-tbl.c */,
+				9D31EB0D11766366003CDA5E /* rc-tbl.c */,
+				9D31EB0E11766366003CDA5E /* symtab.c */,
+				9D31EB1011766366003CDA5E /* text.c */,
+				9D31EB1111766366003CDA5E /* token.c */,
+				9D31EB1211766366003CDA5E /* trie.c */,
+				9D31EB1311766366003CDA5E /* trieval.c */,
+				9D31EB1411766366003CDA5E /* unpack.c */,
+				9D31EB1511766366003CDA5E /* utf8.c */,
+				9D31EB1611766366003CDA5E /* vector.c */,
+				9D31EB1711766366003CDA5E /* vlen-encode.c */,
+			);
+			name = klib;
+			sourceTree = "<group>";
+		};
+		9D31EB1A11766387003CDA5E /* kproc */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A414A13FADFC6003087FF /* bsd */,
+				9D7A414D13FADFC6003087FF /* queue.c */,
+				9D7A414E13FADFC6003087FF /* sem.c */,
+				9D7A414813FADFA1003087FF /* syscond-priv.h */,
+				9D31EB2E117663D4003CDA5E /* syslock.c */,
+				9D31EB2B117663C6003CDA5E /* syscond.c */,
+				9D31EB2C117663C6003CDA5E /* systhread.c */,
+				9D31EB2D117663C6003CDA5E /* systimeout.c */,
+				9D31EB1D117663AB003CDA5E /* stbarrier.c */,
+				9D31EB1E117663AB003CDA5E /* stcond.c */,
+				9D31EB1F117663AB003CDA5E /* stlock.c */,
+				9D31EB20117663AB003CDA5E /* stsem.c */,
+				9D31EB21117663AB003CDA5E /* stthread.c */,
+				9D31EB22117663AB003CDA5E /* sttimeout.c */,
+			);
+			name = kproc;
+			sourceTree = "<group>";
+		};
+		9D31EB2F117663FA003CDA5E /* kxml */ = {
+			isa = PBXGroup;
+			children = (
+				9D31EB3011766409003CDA5E /* xml.c */,
+			);
+			name = kxml;
+			sourceTree = "<group>";
+		};
+		9D31EC8B11766778003CDA5E /* External Libraries */ = {
+			isa = PBXGroup;
+			children = (
+				9D31EC8C117667C6003CDA5E /* libbz2.dylib */,
+				9D31EC8E117667C6003CDA5E /* libxml2.dylib */,
+				9D31EC90117667C6003CDA5E /* libz.dylib */,
+			);
+			name = "External Libraries";
+			sourceTree = "<group>";
+		};
+		9D6FFB2F145094B000952EB7 /* align */ = {
+			isa = PBXGroup;
+			children = (
+				9D6FFB31145094DB00952EB7 /* align-access.h */,
+				9D6FFB32145094DB00952EB7 /* alignarc.h */,
+				9D6FFB33145094DB00952EB7 /* alignsrc.h */,
+				9D6FFB34145094DB00952EB7 /* extern.h */,
+				9D6FFB35145094DB00952EB7 /* reader-refseq.h */,
+				9D6FFB36145094DB00952EB7 /* refseq-mgr.h */,
+				9D6FFB37145094DB00952EB7 /* writer-alignment.h */,
+				9D6FFB38145094DB00952EB7 /* writer-cmn.h */,
+				9D6FFB39145094DB00952EB7 /* writer-reference.h */,
+				9D6FFB3A145094DB00952EB7 /* writer-refseq.h */,
+				9D6FFB3B145094DB00952EB7 /* writer-sequence.h */,
+			);
+			name = align;
+			sourceTree = "<group>";
+		};
+		9D7356C111775493009EA3E4 /* schema */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A469013FB1FAC003087FF /* align */,
+				9D7356C91177559D009EA3E4 /* insdc */,
+				9D7356C611775557009EA3E4 /* ncbi */,
+				9D7356CD117755D8009EA3E4 /* sra */,
+				9D7356C311775515009EA3E4 /* vdb */,
+			);
+			name = schema;
+			sourceTree = "<group>";
+		};
+		9D7356C311775515009EA3E4 /* vdb */ = {
+			isa = PBXGroup;
+			children = (
+				9D7356C41177554A009EA3E4 /* built-in.vschema */,
+				9D7356C51177554A009EA3E4 /* vdb.vschema */,
+			);
+			name = vdb;
+			sourceTree = "<group>";
+		};
+		9D7356C611775557009EA3E4 /* ncbi */ = {
+			isa = PBXGroup;
+			children = (
+				9DA3A868125FBBF0005AD5BB /* sra.vschema */,
+				9DA3A867125FBBBA005AD5BB /* seq.vschema */,
+				9D7356C71177556A009EA3E4 /* ncbi.vschema */,
+				9D7356C81177556A009EA3E4 /* spotname.vschema */,
+			);
+			name = ncbi;
+			sourceTree = "<group>";
+		};
+		9D7356C91177559D009EA3E4 /* insdc */ = {
+			isa = PBXGroup;
+			children = (
+				9D7356CA117755B4009EA3E4 /* insdc.vschema */,
+				9D7356CB117755B4009EA3E4 /* seq.vschema */,
+				9D7356CC117755B4009EA3E4 /* sra.vschema */,
+			);
+			name = insdc;
+			sourceTree = "<group>";
+		};
+		9D7356CD117755D8009EA3E4 /* sra */ = {
+			isa = PBXGroup;
+			children = (
+				9DA3A866125FBB34005AD5BB /* illumina.vschema */,
+				9DA3A865125FBB21005AD5BB /* abi.vschema */,
+				9D7356CE117755F4009EA3E4 /* 454.vschema */,
+				9D7356CF117755F4009EA3E4 /* pevents.vschema */,
+			);
+			name = sra;
+			sourceTree = "<group>";
+		};
+		9D7356E611775CB7009EA3E4 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				9D31EC99117667FA003CDA5E /* libklib.dylib */,
+				9D7A412E13FADF3A003087FF /* libksproc.a */,
+				9D7A415C13FAE00E003087FF /* libkmproc.a */,
+				9D7A417813FAE192003087FF /* libkdb-cmn.a */,
+				9D7A423413FAE3F5003087FF /* libkdb.dylib */,
+				9D7A426813FAE69A003087FF /* libwkdb.dylib */,
+				9D7A428913FAE9B5003087FF /* libvdb-cmn.a */,
+				9D7A431C13FAED2E003087FF /* libvdb.dylib */,
+				9D7A433713FAEE0C003087FF /* libwvdb.dylib */,
+				9D7A436013FAF1AE003087FF /* libvxf.dylib */,
+				9D7A440C13FAF315003087FF /* libsraxf.dylib */,
+				9D7A448C13FAF555003087FF /* libaxf.dylib */,
+				9D7A44C013FB04A9003087FF /* libalign.dylib */,
+				9D7A452F13FB0A3C003087FF /* libwvxf.dylib */,
+				9D7A454B13FB0B4D003087FF /* libwsraxf.dylib */,
+				9D7A45C713FB0CB8003087FF /* libwaxf.dylib */,
+				9D7A45E713FB0D50003087FF /* libwalign.dylib */,
+				9D7A460713FB0F36003087FF /* libkapp.a */,
+				9D7A461413FB1133003087FF /* deseq */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		9D7A414A13FADFC6003087FF /* bsd */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A414B13FADFC6003087FF /* syslock-priv.h */,
+				9D7A414C13FADFC6003087FF /* syslock.c */,
+			);
+			name = bsd;
+			path = ../../../libs/kproc/bsd;
+			sourceTree = SOURCE_ROOT;
+		};
+		9D7A417B13FAE1A2003087FF /* kdb */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A417D13FAE1DA003087FF /* btree.c */,
+				9D7A417E13FAE1DA003087FF /* cc-priv.h */,
+				9D7A417F13FAE1DA003087FF /* coldata-priv.h */,
+				9D7A418013FAE1DA003087FF /* coldata.c */,
+				9D7A418113FAE1DA003087FF /* colfmt-priv.h */,
+				9D7A418213FAE1DA003087FF /* colidx-priv.h */,
+				9D7A418313FAE1DA003087FF /* colidx.c */,
+				9D7A418413FAE1DA003087FF /* colidx0-priv.h */,
+				9D7A418513FAE1DA003087FF /* colidx0.c */,
+				9D7A418613FAE1DA003087FF /* colidx1-priv.h */,
+				9D7A418713FAE1DA003087FF /* colidx1.c */,
+				9D7A418813FAE1DA003087FF /* colidx2-priv.h */,
+				9D7A418913FAE1DA003087FF /* colidx2.c */,
+				9D7A418A13FAE1DA003087FF /* column-cc.c */,
+				9D7A418B13FAE1DA003087FF /* column-priv.h */,
+				9D7A418C13FAE1DA003087FF /* column.c */,
+				9D7A418D13FAE1DA003087FF /* database-cc.c */,
+				9D7A418E13FAE1DA003087FF /* database-cmn.c */,
+				9D7A418F13FAE1DA003087FF /* database-priv.h */,
+				9D7A419013FAE1DA003087FF /* database.c */,
+				9D7A419113FAE1DA003087FF /* dbcc-cmn.c */,
+				9D7A419213FAE1DA003087FF /* dbmgr-cmn.c */,
+				9D7A419313FAE1DA003087FF /* dbmgr-priv.h */,
+				9D7A419413FAE1DA003087FF /* dbmgr.c */,
+				9D7A419513FAE1DA003087FF /* idstats-priv.h */,
+				9D7A419613FAE1DA003087FF /* idstats.c */,
+				9D7A419713FAE1DA003087FF /* idxblk-priv.h */,
+				9D7A419813FAE1DA003087FF /* idxblk.c */,
+				9D7A419913FAE1DA003087FF /* index-cmn.h */,
+				9D7A419A13FAE1DA003087FF /* index-priv.h */,
+				9D7A419B13FAE1DA003087FF /* index.c */,
+				9D7A419C13FAE1DA003087FF /* kdb-priv.h */,
+				9D7A419D13FAE1DA003087FF /* kdb.c */,
+				9D7A419E13FAE1DA003087FF /* kdbfmt-priv.h */,
+				9D7A419F13FAE1DA003087FF /* libkdb.vers.h */,
+				9D7A41A013FAE1DA003087FF /* libwkdb.vers.h */,
+				9D7A41A113FAE1DA003087FF /* meta.c */,
+				9D7A41A213FAE1DA003087FF /* ptrieval-v1.c */,
+				9D7A41A313FAE1DA003087FF /* ptrieval-v2.c */,
+				9D7A41A413FAE1DA003087FF /* table-cc.c */,
+				9D7A41A513FAE1DA003087FF /* table-priv.h */,
+				9D7A41A613FAE1DA003087FF /* table.c */,
+				9D7A41A713FAE1DA003087FF /* trieidx-priv.h */,
+				9D7A41A813FAE1DA003087FF /* trieidx-v1.c */,
+				9D7A41A913FAE1DA003087FF /* trieidx-v2.c */,
+				9D7A41AA13FAE1DA003087FF /* trieval-v1.c */,
+				9D7A41AB13FAE1DA003087FF /* trieval-v2.c */,
+				9D7A41AC13FAE1DA003087FF /* u64idx-v3.c */,
+				9D7A41AD13FAE1DA003087FF /* wcoldata-priv.h */,
+				9D7A41AE13FAE1DA003087FF /* wcoldata.c */,
+				9D7A41AF13FAE1DA003087FF /* wcolidx-priv.h */,
+				9D7A41B013FAE1DA003087FF /* wcolidx.c */,
+				9D7A41B113FAE1DA003087FF /* wcolidx0-priv.h */,
+				9D7A41B213FAE1DA003087FF /* wcolidx0.c */,
+				9D7A41B313FAE1DA003087FF /* wcolidx1-priv.h */,
+				9D7A41B413FAE1DA003087FF /* wcolidx1.c */,
+				9D7A41B513FAE1DA003087FF /* wcolidx2-priv.h */,
+				9D7A41B613FAE1DA003087FF /* wcolidx2.c */,
+				9D7A41B713FAE1DA003087FF /* wcolumn-priv.h */,
+				9D7A41B813FAE1DA003087FF /* wcolumn.c */,
+				9D7A41B913FAE1DA003087FF /* wdatabase-priv.h */,
+				9D7A41BA13FAE1DA003087FF /* wdatabase.c */,
+				9D7A41BB13FAE1DA003087FF /* wdbmgr.c */,
+				9D7A41BC13FAE1DA003087FF /* werror-priv.h */,
+				9D7A41BD13FAE1DA003087FF /* widxblk-priv.h */,
+				9D7A41BE13FAE1DA003087FF /* widxblk.c */,
+				9D7A41BF13FAE1DA003087FF /* windex-priv.h */,
+				9D7A41C013FAE1DA003087FF /* windex.c */,
+				9D7A41C113FAE1DA003087FF /* wkdb-priv.h */,
+				9D7A41C213FAE1DA003087FF /* wkdb.c */,
+				9D7A41C313FAE1DA003087FF /* wmeta.c */,
+				9D7A41C413FAE1DA003087FF /* wtable-priv.h */,
+				9D7A41C513FAE1DA003087FF /* wtable.c */,
+				9D7A41C613FAE1DA003087FF /* wtrieidx-v1.c */,
+				9D7A41C713FAE1DA003087FF /* wtrieidx-v2.c */,
+				9D7A41C813FAE1DA003087FF /* wu64idx-v3.c */,
+			);
+			name = kdb;
+			sourceTree = "<group>";
+		};
+		9D7A428C13FAE9C4003087FF /* vdb */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A430F13FAEC61003087FF /* built-in */,
+				9D7A432813FAED99003087FF /* read-only */,
+				9D7A441313FAF394003087FF /* common */,
+				9D7A441213FAF37A003087FF /* write */,
+			);
+			name = vdb;
+			sourceTree = "<group>";
+		};
+		9D7A430F13FAEC61003087FF /* built-in */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A42A413FAEA20003087FF /* index_insert.c */,
+				9D7A42AE13FAEA21003087FF /* meta-append.c */,
+				9D7A42B013FAEA21003087FF /* meta-attr-write.c */,
+				9D7A42B313FAEA21003087FF /* meta-write.c */,
+				9D7A429313FAEA20003087FF /* cast.c */,
+				9D7A429713FAEA20003087FF /* compare.c */,
+				9D7A42A213FAEA20003087FF /* environment-read.c */,
+				9D7A42A313FAEA20003087FF /* fixed-row-len.c */,
+				9D7A42A513FAEA20003087FF /* index_lookup.c */,
+				9D7A42A613FAEA20003087FF /* index_project.c */,
+				9D7A42AD13FAEA21003087FF /* merge.c */,
+				9D7A42AF13FAEA21003087FF /* meta-attr-read.c */,
+				9D7A42B113FAEA21003087FF /* meta-read.c */,
+				9D7A42B213FAEA21003087FF /* meta-value.c */,
+				9D7A42B613FAEA21003087FF /* parameter-read.c */,
+				9D7A42C113FAEA21003087FF /* range-validate.c */,
+				9D7A42C213FAEA21003087FF /* redimension.c */,
+				9D7A42C313FAEA21003087FF /* row-id.c */,
+				9D7A42C413FAEA21003087FF /* row-len.c */,
+				9D7A42D613FAEA21003087FF /* split.c */,
+			);
+			name = "built-in";
+			sourceTree = "<group>";
+		};
+		9D7A432813FAED99003087FF /* read-only */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A429613FAEA20003087FF /* column.c */,
+				9D7A429A13FAEA20003087FF /* cursor.c */,
+				9D7A429E13FAEA20003087FF /* database.c */,
+				9D7A42A113FAEA20003087FF /* dbmgr.c */,
+				9D7A42AC13FAEA21003087FF /* linker.c */,
+				9D7A42BA13FAEA21003087FF /* phys.c */,
+				9D7A42C013FAEA21003087FF /* prod.c */,
+				9D7A42DA13FAEA21003087FF /* table.c */,
+			);
+			name = "read-only";
+			sourceTree = "<group>";
+		};
+		9D7A436313FAF1B4003087FF /* vxf */ = {
+			isa = PBXGroup;
+			children = (
+				9D320AD5142D0E3F00ACA5AA /* Makefile */,
+				9D320AAE142D02B000ACA5AA /* extract_token.c */,
+				9D320AAF142D02B000ACA5AA /* strtonum.c */,
+				9D7A436713FAF20D003087FF /* add-row-id.c */,
+				9D7A436813FAF20D003087FF /* bit_or.c */,
+				9D7A436913FAF20D003087FF /* bunzip.c */,
+				9D7A436A13FAF20D003087FF /* bzip.c */,
+				9D7A436B13FAF20D003087FF /* ceil.c */,
+				9D7A436C13FAF20D003087FF /* checksum.c */,
+				9D7A436D13FAF20D003087FF /* clip.c */,
+				9D7A436E13FAF20D003087FF /* cut.c */,
+				9D7A436F13FAF20D003087FF /* delta.c */,
+				9D7A437013FAF20D003087FF /* deriv.c */,
+				9D7A437113FAF20D003087FF /* diff.c */,
+				9D7A437213FAF20D003087FF /* echo.c */,
+				9D7A437313FAF20E003087FF /* entrez.c */,
+				9D7A437413FAF20E003087FF /* exists.c */,
+				9D7A437513FAF20E003087FF /* floor.c */,
+				9D7A437613FAF20E003087FF /* fsplit-join.impl.h */,
+				9D7A437713FAF20E003087FF /* funzip.c */,
+				9D7A437813FAF20E003087FF /* fzip.c */,
+				9D7A437913FAF20E003087FF /* integral.c */,
+				9D7A437A13FAF20E003087FF /* irzip.c */,
+				9D7A437B13FAF20E003087FF /* irzip.impl.h */,
+				9D7A437C13FAF20E003087FF /* iunzip.c */,
+				9D7A437D13FAF20E003087FF /* izip-common.h */,
+				9D7A437E13FAF20E003087FF /* izip-decode.impl.h */,
+				9D7A437F13FAF20E003087FF /* izip-encode.impl.h */,
+				9D7A438013FAF20E003087FF /* izip.c */,
+				9D7A438113FAF20E003087FF /* libvxf.vers.h */,
+				9D7A438213FAF20E003087FF /* libvxfentrez.vers.h */,
+				9D7A438313FAF20E003087FF /* map.c */,
+				9D7A438413FAF20E003087FF /* math-funcs-impl.h */,
+				9D7A438513FAF20E003087FF /* max.c */,
+				9D7A438613FAF20E003087FF /* min.c */,
+				9D7A438713FAF20E003087FF /* outlier-decoder.c */,
+				9D7A438813FAF20E003087FF /* outlier-encoder.c */,
+				9D7A438913FAF20E003087FF /* pack.c */,
+				9D7A438A13FAF20E003087FF /* paste.c */,
+				9D7A438B13FAF20E003087FF /* rand_4na_2na.c */,
+				9D7A438C13FAF20E003087FF /* rldecode.c */,
+				9D7A438D13FAF20E003087FF /* rlencode.c */,
+				9D7A438E13FAF20E003087FF /* round.c */,
+				9D7A438F13FAF20E003087FF /* simple-sub-select.c */,
+				9D7A439013FAF20E003087FF /* subtract-row-id.c */,
+				9D7A439113FAF20E003087FF /* sum.c */,
+				9D7A439213FAF20E003087FF /* trim.c */,
+				9D7A439313FAF20E003087FF /* trunc.c */,
+				9D7A439413FAF20E003087FF /* undelta.c */,
+				9D7A439513FAF20E003087FF /* unpack.c */,
+				9D7A439613FAF20E003087FF /* unzip.c */,
+				9D7A439713FAF20E003087FF /* vec-sum.c */,
+				9D7A439813FAF20E003087FF /* zip.c */,
+				9D320AB5142D02E600ACA5AA /* sprintf.c */,
+			);
+			name = vxf;
+			sourceTree = "<group>";
+		};
+		9D7A436513FAF1BC003087FF /* sraxf */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A43DE13FAF2EF003087FF /* bio-start.c */,
+				9D7A43DF13FAF2EF003087FF /* color-from-dna.c */,
+				9D7A43E013FAF2EF003087FF /* denormalize.c */,
+				9D7A43E113FAF2EF003087FF /* dna-from-color.c */,
+				9D7A43E213FAF2EF003087FF /* dynamic-454-read-descriptor.c */,
+				9D7A43E313FAF2EF003087FF /* extract-coordinates.c */,
+				9D7A43E413FAF2EF003087FF /* extract-name_coord.c */,
+				9D7A43E513FAF2EF003087FF /* extract-name_fmt.c */,
+				9D7A43E613FAF2EF003087FF /* extract-spot_name.c */,
+				9D7A43E713FAF2EF003087FF /* format-spot-name.c */,
+				9D7A43E813FAF2EF003087FF /* fpcodec.c */,
+				9D7A43E913FAF2EF003087FF /* index_lookup.c */,
+				9D7A43EA13FAF2EF003087FF /* libsraxf.vers.h */,
+				9D7A43EB13FAF2EF003087FF /* libwsraxf.vers.h */,
+				9D7A43EC13FAF2EF003087FF /* make-position.c */,
+				9D7A43ED13FAF2EF003087FF /* name-tokenizer.h */,
+				9D7A43EE13FAF2EF003087FF /* normalize.c */,
+				9D7A43EF13FAF2EF003087FF /* prefix-tree-to-name.c */,
+				9D7A43F013FAF2EF003087FF /* process-position.c */,
+				9D7A43F113FAF2EF003087FF /* qual4_codec.h */,
+				9D7A43F213FAF2EF003087FF /* qual4_decode.c */,
+				9D7A43F313FAF2EF003087FF /* qual4_encode.c */,
+				9D7A43F413FAF2EF003087FF /* read-desc.c */,
+				9D7A43F513FAF2EF003087FF /* read-seg-from-readn.c */,
+				9D7A43F613FAF2EF003087FF /* rewrite-spot-name.c */,
+				9D7A43F713FAF2EF003087FF /* rotate.c */,
+				9D7A43F813FAF2EF003087FF /* spot-desc.c */,
+				9D7A43F913FAF2EF003087FF /* stats_quality.c */,
+				9D7A43FA13FAF2EF003087FF /* stats.c */,
+				9D7A43FB13FAF2EF003087FF /* swap.c */,
+				9D7A43FC13FAF2EF003087FF /* tokenize-spot_name-454.c */,
+				9D7A43FD13FAF2EF003087FF /* tokenize-spot_name-abi.c */,
+				9D7A43FE13FAF2EF003087FF /* tokenize-spot_name-helicos.c */,
+				9D7A43FF13FAF2EF003087FF /* tokenize-spot_name-illumina.c */,
+				9D7A440013FAF2EF003087FF /* tokenize-spot_name-ion-torrent.c */,
+				9D7A440113FAF2EF003087FF /* untyped-priv.h */,
+				9D7A440213FAF2EF003087FF /* untyped.c */,
+				9D7A440313FAF2EF003087FF /* v0-decompress-init.c */,
+				9D7A440413FAF2EF003087FF /* v0-decompress-local.h */,
+				9D7A440513FAF2EF003087FF /* v0-decompress.c */,
+				9D7A440613FAF2EF003087FF /* v0-decompress.h */,
+				9D7A440713FAF2EF003087FF /* v0-funcs.c */,
+			);
+			name = sraxf;
+			sourceTree = "<group>";
+		};
+		9D7A436613FAF1C2003087FF /* axf */ = {
+			isa = PBXGroup;
+			children = (
+				9D4DCEAB1423FD9600881098 /* ref-preserve_qual.c */,
+				9DE55A78140EA19500EA61C6 /* raw-restore-qual.c */,
+				9D7A447613FAF539003087FF /* align-local_ref_id.c */,
+				9D7A447713FAF539003087FF /* align-local_ref_start.c */,
+				9D7A447813FAF539003087FF /* align-ref-name.c */,
+				9D7A447913FAF539003087FF /* align-ref-pos.c */,
+				9D7A447A13FAF539003087FF /* align-ref-seq-id.c */,
+				9D7A447B13FAF539003087FF /* align-restore-read.c */,
+				9D7A447C13FAF539003087FF /* cigar.c */,
+				9D7A447D13FAF539003087FF /* get-sam-flags.c */,
+				9D7A447E13FAF539003087FF /* libaxf.vers.h */,
+				9D7A447F13FAF539003087FF /* libwaxf.vers.h */,
+				9D7A448013FAF539003087FF /* not-my-row.c */,
+				9D7A448113FAF539003087FF /* project_read_from_sequence.c */,
+				9D7A448213FAF539003087FF /* raw-restore-read.c */,
+				9D7A448313FAF539003087FF /* ref-restore-read.c */,
+				9D7A448413FAF539003087FF /* ref-tbl-sub-select.c */,
+				9D7A448513FAF539003087FF /* refseq-stats.c */,
+				9D7A448613FAF539003087FF /* seq-restore-read.c */,
+				9D7A448713FAF539003087FF /* template-len.c */,
+				9DE55A84140EA93600EA61C6 /* generate-mismatch-qual.c */,
+				9DE55AAE140EC79C00EA61C6 /* mismatch-restore-qual.c */,
+			);
+			name = axf;
+			sourceTree = "<group>";
+		};
+		9D7A441213FAF37A003087FF /* write */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A42DB13FAEA21003087FF /* wcolumn.c */,
+				9D7A42DC13FAEA21003087FF /* wcursor.c */,
+				9D7A42DD13FAEA21003087FF /* wdatabase.c */,
+				9D7A42DE13FAEA21003087FF /* wdbmgr.c */,
+				9D7A42DF13FAEA21003087FF /* wlinker.c */,
+				9D7A42E013FAEA21003087FF /* wphys.c */,
+				9D7A42E113FAEA21003087FF /* wprod.c */,
+				9D7A42E213FAEA21003087FF /* wtable.c */,
+			);
+			name = write;
+			sourceTree = "<group>";
+		};
+		9D7A441313FAF394003087FF /* common */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A428E13FAEA20003087FF /* blob-headers.c */,
+				9D7A428F13FAEA20003087FF /* blob-headers.h */,
+				9D7A429013FAEA20003087FF /* blob-priv.h */,
+				9D7A429113FAEA20003087FF /* blob.c */,
+				9D7A429213FAEA20003087FF /* blob.h */,
+				9D7A429413FAEA20003087FF /* column-cmn.c */,
+				9D7A429513FAEA20003087FF /* column-priv.h */,
+				9D7A42E313FAEA21003087FF /* xform-priv.h */,
+				9D7A429813FAEA20003087FF /* cursor-cmn.c */,
+				9D7A429913FAEA20003087FF /* cursor-priv.h */,
+				9D7A429B13FAEA20003087FF /* database-cmn.c */,
+				9D7A429C13FAEA20003087FF /* database-load.c */,
+				9D7A429D13FAEA20003087FF /* database-priv.h */,
+				9D7A429F13FAEA20003087FF /* dbmgr-cmn.c */,
+				9D7A42A013FAEA20003087FF /* dbmgr-priv.h */,
+				9D7A42A713FAEA20003087FF /* libvdb.vers.h */,
+				9D7A42A813FAEA20003087FF /* libwvdb.vers.h */,
+				9D7A42A913FAEA20003087FF /* linker-cmn.c */,
+				9D7A42AA13FAEA20003087FF /* linker-int.c */,
+				9D7A42AB13FAEA21003087FF /* linker-priv.h */,
+				9D7A42B413FAEA21003087FF /* page-map.c */,
+				9D7A42B513FAEA21003087FF /* page-map.h */,
+				9D7A42B713FAEA21003087FF /* phys-cmn.c */,
+				9D7A42B813FAEA21003087FF /* phys-load.c */,
+				9D7A42B913FAEA21003087FF /* phys-priv.h */,
+				9D7A42BB13FAEA21003087FF /* prod-cmn.c */,
+				9D7A42BC13FAEA21003087FF /* prod-expr.c */,
+				9D7A42BD13FAEA21003087FF /* prod-expr.h */,
+				9D7A42BE13FAEA21003087FF /* prod-func.c */,
+				9D7A42BF13FAEA21003087FF /* prod-priv.h */,
+				9D7A42C513FAEA21003087FF /* schema-db.c */,
+				9D7A42C613FAEA21003087FF /* schema-dump.c */,
+				9D7A42C713FAEA21003087FF /* schema-dump.h */,
+				9D7A42C813FAEA21003087FF /* schema-eval.c */,
+				9D7A42C913FAEA21003087FF /* schema-expr.c */,
+				9D7A42CA13FAEA21003087FF /* schema-expr.h */,
+				9D7A42CB13FAEA21003087FF /* schema-func.c */,
+				9D7A42CC13FAEA21003087FF /* schema-int.c */,
+				9D7A42CD13FAEA21003087FF /* schema-parse.c */,
+				9D7A42CE13FAEA21003087FF /* schema-parse.h */,
+				9D7A42CF13FAEA21003087FF /* schema-priv.h */,
+				9D7A42D013FAEA21003087FF /* schema-prod.c */,
+				9D7A42D113FAEA21003087FF /* schema-tbl.c */,
+				9D7A42D213FAEA21003087FF /* schema-tok.c */,
+				9D7A42D313FAEA21003087FF /* schema-tok.h */,
+				9D7A42D413FAEA21003087FF /* schema-type.c */,
+				9D7A42D513FAEA21003087FF /* schema.c */,
+				9D7A42D713FAEA21003087FF /* table-cmn.c */,
+				9D7A42D813FAEA21003087FF /* table-load.c */,
+				9D7A42D913FAEA21003087FF /* table-priv.h */,
+			);
+			name = common;
+			sourceTree = "<group>";
+		};
+		9D7A444F13FAF455003087FF /* search */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A445013FAF48E003087FF /* agrep-dp.c */,
+				9D7A445113FAF48E003087FF /* agrep-myers.c */,
+				9D7A445213FAF48E003087FF /* agrep-myersunltd.c */,
+				9D7A445313FAF48E003087FF /* agrep-wumanber.c */,
+				9D7A445413FAF48E003087FF /* fgrep-aho.c */,
+				9D7A445513FAF48E003087FF /* fgrep-boyermoore.c */,
+				9D7A445613FAF48E003087FF /* fgrep-dumb.c */,
+				9D7A445713FAF48E003087FF /* libksrch.vers.h */,
+				9D7A445813FAF48E003087FF /* nucstrstr.c */,
+				9D7A445913FAF48E003087FF /* search-priv.h */,
+				9D7A445A13FAF48E003087FF /* search.c */,
+			);
+			name = search;
+			sourceTree = "<group>";
+		};
+		9D7A44AA13FB0466003087FF /* align */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A44AB13FB0494003087FF /* align-access.c */,
+				9D7A44AC13FB0494003087FF /* bam-priv.h */,
+				9D7A44AD13FB0494003087FF /* bam.c */,
+				9D7A44AE13FB0494003087FF /* reader-cmn.c */,
+				9D7A44AF13FB0494003087FF /* reader-cmn.h */,
+				9D7A44B013FB0494003087FF /* reader-refseq.c */,
+				9D7A44B113FB0494003087FF /* refseq-mgr-priv.h */,
+				9D7A44B213FB0494003087FF /* refseq-mgr.c */,
+				9D7A44B413FB0494003087FF /* writer-alignment.c */,
+				9D7A44B513FB0494003087FF /* writer-cmn.c */,
+				9D7A44B613FB0494003087FF /* writer-priv.h */,
+				9D7A44B713FB0494003087FF /* writer-ref.c */,
+				9D7A44B813FB0494003087FF /* writer-ref.h */,
+				9D7A44B913FB0494003087FF /* writer-reference.c */,
+				9D7A44BA13FB0494003087FF /* writer-refseq.c */,
+				9D7A44BB13FB0494003087FF /* writer-sequence.c */,
+			);
+			name = align;
+			sourceTree = "<group>";
+		};
+		9D7A460E13FB0F69003087FF /* deseq */ = {
+			isa = PBXGroup;
+			children = (
+				9D320A0A142B813300ACA5AA /* Makefile */,
+				9D7A461013FB1128003087FF /* deseq.c */,
+			);
+			name = deseq;
+			sourceTree = "<group>";
+		};
+		9D7A469013FB1FAC003087FF /* align */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A469113FB1FC5003087FF /* align.vschema */,
+				9D7A469213FB1FC5003087FF /* refseq.vschema */,
+				9D7A469313FB1FC5003087FF /* seq.vschema */,
+			);
+			name = align;
+			sourceTree = "<group>";
+		};
+		9D819B3411DB9D5200DA4D3C /* Tools */ = {
+			isa = PBXGroup;
+			children = (
+				9D7A460E13FB0F69003087FF /* deseq */,
+			);
+			name = Tools;
+			sourceTree = "<group>";
+		};
+		9D8EC47011C2F081000F1048 /* Tests */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			name = Tests;
+			sourceTree = "<group>";
+		};
+		9D985E8B12886C3A00849729 /* kfg */ = {
+			isa = PBXGroup;
+			children = (
+				9D1235B414F571AC00ECC72C /* config-grammar.c */,
+				9D1235B514F571AC00ECC72C /* config-grammar.y */,
+				9D1235B614F571AC00ECC72C /* config-lex.c */,
+				9D1235B714F571AC00ECC72C /* config-lex.l */,
+				9D1235B814F571AC00ECC72C /* config-tokens.h */,
+				9D1235B914F571AC00ECC72C /* config.linux.kfg */,
+				9D1235BA14F571AC00ECC72C /* config.win.kfg */,
+				9D1235BB14F571AC00ECC72C /* kfg-parse.h */,
+				9D985FCB1288BA8700849729 /* config.mac.kfg */,
+				9D985E8C12886C6100849729 /* config.c */,
+			);
+			name = kfg;
+			sourceTree = "<group>";
+		};
+		9DB6A8D411EB9F2100168DE0 /* interfaces */ = {
+			isa = PBXGroup;
+			children = (
+				9D6FFB2F145094B000952EB7 /* align */,
+			);
+			name = interfaces;
+			path = ../../../interfaces;
+			sourceTree = SOURCE_ROOT;
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		9D31EC95117667FA003CDA5E /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A410713FADCFE003087FF /* path-priv.h in Headers */,
+				9D7A411613FADD33003087FF /* sysdir-priv.h in Headers */,
+				9D7A411713FADD33003087FF /* sysfile-priv.h in Headers */,
+				9D7A445D13FAF49A003087FF /* libksrch.vers.h in Headers */,
+				9D7A446013FAF49A003087FF /* search-priv.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A412A13FADF3A003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A415813FAE00E003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A417413FAE192003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A423013FAE3F5003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A426413FAE69A003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A428513FAE9B5003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A431813FAED2E003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A433313FAEE0C003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A435C13FAF1AE003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A440813FAF315003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A441A13FAF3B5003087FF /* qual4_codec.h in Headers */,
+				9D7A441B13FAF3B5003087FF /* libwsraxf.vers.h in Headers */,
+				9D7A442413FAF3B5003087FF /* v0-decompress-local.h in Headers */,
+				9D7A443213FAF3B5003087FF /* libsraxf.vers.h in Headers */,
+				9D7A443913FAF3B5003087FF /* v0-decompress.h in Headers */,
+				9D7A443B13FAF3B5003087FF /* name-tokenizer.h in Headers */,
+				9D7A443C13FAF3B5003087FF /* untyped-priv.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A448813FAF555003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A44BC13FB04A9003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A452B13FB0A3C003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A454713FB0B4D003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A45AF13FB0CB8003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A45D813FB0D50003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A460313FB0F36003087FF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		9D31EC98117667FA003CDA5E /* klib */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D31ECBB11766836003CDA5E /* Build configuration list for PBXNativeTarget "klib" */;
+			buildPhases = (
+				9D31EC95117667FA003CDA5E /* Headers */,
+				9D31EC96117667FA003CDA5E /* Sources */,
+				9D31EC97117667FA003CDA5E /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = klib;
+			productName = klib;
+			productReference = 9D31EC99117667FA003CDA5E /* libklib.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D7A412D13FADF3A003087FF /* ksproc */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A414713FADF98003087FF /* Build configuration list for PBXNativeTarget "ksproc" */;
+			buildPhases = (
+				9D7A412A13FADF3A003087FF /* Headers */,
+				9D7A412B13FADF3A003087FF /* Sources */,
+				9D7A412C13FADF3A003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = ksproc;
+			productName = ksproc;
+			productReference = 9D7A412E13FADF3A003087FF /* libksproc.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		9D7A415B13FAE00E003087FF /* kmproc */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A417013FAE0A5003087FF /* Build configuration list for PBXNativeTarget "kmproc" */;
+			buildPhases = (
+				9D7A415813FAE00E003087FF /* Headers */,
+				9D7A415913FAE00E003087FF /* Sources */,
+				9D7A415A13FAE00E003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = kmproc;
+			productName = kmproc;
+			productReference = 9D7A415C13FAE00E003087FF /* libkmproc.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		9D7A417713FAE192003087FF /* kdb-cmn */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A417C13FAE1A2003087FF /* Build configuration list for PBXNativeTarget "kdb-cmn" */;
+			buildPhases = (
+				9D7A417413FAE192003087FF /* Headers */,
+				9D7A417513FAE192003087FF /* Sources */,
+				9D7A417613FAE192003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = "kdb-cmn";
+			productName = "kdb-cmn";
+			productReference = 9D7A417813FAE192003087FF /* libkdb-cmn.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		9D7A423313FAE3F5003087FF /* kdb */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A423A13FAE42A003087FF /* Build configuration list for PBXNativeTarget "kdb" */;
+			buildPhases = (
+				9D7A423013FAE3F5003087FF /* Headers */,
+				9D7A423113FAE3F5003087FF /* Sources */,
+				9D7A423213FAE3F5003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D7A44FE13FB05F2003087FF /* PBXTargetDependency */,
+				9D7A423813FAE3FD003087FF /* PBXTargetDependency */,
+			);
+			name = kdb;
+			productName = kdb;
+			productReference = 9D7A423413FAE3F5003087FF /* libkdb.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D7A426713FAE69A003087FF /* wkdb */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A427313FAE709003087FF /* Build configuration list for PBXNativeTarget "wkdb" */;
+			buildPhases = (
+				9D7A426413FAE69A003087FF /* Headers */,
+				9D7A426513FAE69A003087FF /* Sources */,
+				9D7A426613FAE69A003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D7A44FC13FB05EB003087FF /* PBXTargetDependency */,
+				9D7A428413FAE9A0003087FF /* PBXTargetDependency */,
+			);
+			name = wkdb;
+			productName = wkdb;
+			productReference = 9D7A426813FAE69A003087FF /* libwkdb.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D7A428813FAE9B5003087FF /* vdb-cmn */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A428D13FAE9C5003087FF /* Build configuration list for PBXNativeTarget "vdb-cmn" */;
+			buildPhases = (
+				9D7A428513FAE9B5003087FF /* Headers */,
+				9D7A428613FAE9B5003087FF /* Sources */,
+				9D7A428713FAE9B5003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = "vdb-cmn";
+			productName = "vdb-cmn";
+			productReference = 9D7A428913FAE9B5003087FF /* libvdb-cmn.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		9D7A431B13FAED2E003087FF /* vdb */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A432713FAED97003087FF /* Build configuration list for PBXNativeTarget "vdb" */;
+			buildPhases = (
+				9D7A431813FAED2E003087FF /* Headers */,
+				9D7A431913FAED2E003087FF /* Sources */,
+				9D7A431A13FAED2E003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D7A44F413FB05A9003087FF /* PBXTargetDependency */,
+				9D7A44F213FB05A9003087FF /* PBXTargetDependency */,
+				9D7A450613FB06AB003087FF /* PBXTargetDependency */,
+			);
+			name = vdb;
+			productName = vdb;
+			productReference = 9D7A431C13FAED2E003087FF /* libvdb.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D7A433613FAEE0C003087FF /* wvdb */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A434A13FAEE8A003087FF /* Build configuration list for PBXNativeTarget "wvdb" */;
+			buildPhases = (
+				9D7A433313FAEE0C003087FF /* Headers */,
+				9D7A433413FAEE0C003087FF /* Sources */,
+				9D7A433513FAEE0C003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D7A44FA13FB05C9003087FF /* PBXTargetDependency */,
+				9D7A44F813FB05C9003087FF /* PBXTargetDependency */,
+				9D7A44F613FB05C9003087FF /* PBXTargetDependency */,
+				9D7A450813FB06BD003087FF /* PBXTargetDependency */,
+			);
+			name = wvdb;
+			productName = wvdb;
+			productReference = 9D7A433713FAEE0C003087FF /* libwvdb.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D7A435F13FAF1AE003087FF /* vxf */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A436413FAF1B4003087FF /* Build configuration list for PBXNativeTarget "vxf" */;
+			buildPhases = (
+				9D7A435C13FAF1AE003087FF /* Headers */,
+				9D7A435D13FAF1AE003087FF /* Sources */,
+				9D7A435E13FAF1AE003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D7A44E813FB057E003087FF /* PBXTargetDependency */,
+				9D7A44EA13FB0582003087FF /* PBXTargetDependency */,
+			);
+			name = vxf;
+			productName = vxf;
+			productReference = 9D7A436013FAF1AE003087FF /* libvxf.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D7A440B13FAF315003087FF /* sraxf */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A441013FAF333003087FF /* Build configuration list for PBXNativeTarget "sraxf" */;
+			buildPhases = (
+				9D7A440813FAF315003087FF /* Headers */,
+				9D7A440913FAF315003087FF /* Sources */,
+				9D7A440A13FAF315003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D7A446F13FAF4B6003087FF /* PBXTargetDependency */,
+				9D7A446D13FAF4B3003087FF /* PBXTargetDependency */,
+				9D7A446913FAF4A9003087FF /* PBXTargetDependency */,
+			);
+			name = sraxf;
+			productName = sraxf;
+			productReference = 9D7A440C13FAF315003087FF /* libsraxf.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D7A448B13FAF555003087FF /* axf */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A44A913FAF5C7003087FF /* Build configuration list for PBXNativeTarget "axf" */;
+			buildPhases = (
+				9D7A448813FAF555003087FF /* Headers */,
+				9D7A448913FAF555003087FF /* Sources */,
+				9D7A448A13FAF555003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D7A44E613FB0561003087FF /* PBXTargetDependency */,
+				9D7A44E213FB0551003087FF /* PBXTargetDependency */,
+				9D7A44E013FB0546003087FF /* PBXTargetDependency */,
+			);
+			name = axf;
+			productName = axf;
+			productReference = 9D7A448C13FAF555003087FF /* libaxf.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D7A44BF13FB04A9003087FF /* align */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A44FF13FB0621003087FF /* Build configuration list for PBXNativeTarget "align" */;
+			buildPhases = (
+				9D7A44BC13FB04A9003087FF /* Headers */,
+				9D7A44BD13FB04A9003087FF /* Sources */,
+				9D7A44BE13FB04A9003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D7A44F013FB0597003087FF /* PBXTargetDependency */,
+				9D7A44EE13FB0597003087FF /* PBXTargetDependency */,
+				9D7A44EC13FB0597003087FF /* PBXTargetDependency */,
+			);
+			name = align;
+			productName = align;
+			productReference = 9D7A44C013FB04A9003087FF /* libalign.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D7A452E13FB0A3C003087FF /* wvxf */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A454613FB0AF3003087FF /* Build configuration list for PBXNativeTarget "wvxf" */;
+			buildPhases = (
+				9D7A452B13FB0A3C003087FF /* Headers */,
+				9D7A452C13FB0A3C003087FF /* Sources */,
+				9D7A452D13FB0A3C003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D4DCEE41424001C00881098 /* PBXTargetDependency */,
+				9D4DCEE21424001400881098 /* PBXTargetDependency */,
+				9D4DCEDC1423FF6E00881098 /* PBXTargetDependency */,
+			);
+			name = wvxf;
+			productName = wvxf;
+			productReference = 9D7A452F13FB0A3C003087FF /* libwvxf.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D7A454A13FB0B4D003087FF /* wsraxf */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A455A13FB0BAF003087FF /* Build configuration list for PBXNativeTarget "wsraxf" */;
+			buildPhases = (
+				9D7A454713FB0B4D003087FF /* Headers */,
+				9D7A454813FB0B4D003087FF /* Sources */,
+				9D7A454913FB0B4D003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D4DCEEB1424008500881098 /* PBXTargetDependency */,
+				9D4DCEE91424007F00881098 /* PBXTargetDependency */,
+				9D4DCEE71424007400881098 /* PBXTargetDependency */,
+			);
+			name = wsraxf;
+			productName = wsraxf;
+			productReference = 9D7A454B13FB0B4D003087FF /* libwsraxf.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D7A45A813FB0CB8003087FF /* waxf */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A45C413FB0CB8003087FF /* Build configuration list for PBXNativeTarget "waxf" */;
+			buildPhases = (
+				9D7A45AF13FB0CB8003087FF /* Headers */,
+				9D7A45B013FB0CB8003087FF /* Sources */,
+				9D7A45C013FB0CB8003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D4DCEEF142400B900881098 /* PBXTargetDependency */,
+				9D4DCEED142400B400881098 /* PBXTargetDependency */,
+				9D7A45A913FB0CB8003087FF /* PBXTargetDependency */,
+				9D7A45AD13FB0CB8003087FF /* PBXTargetDependency */,
+			);
+			name = waxf;
+			productName = axf;
+			productReference = 9D7A45C713FB0CB8003087FF /* libwaxf.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D7A45D113FB0D50003087FF /* walign */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A45E413FB0D50003087FF /* Build configuration list for PBXNativeTarget "walign" */;
+			buildPhases = (
+				9D7A45D813FB0D50003087FF /* Headers */,
+				9D7A45D913FB0D50003087FF /* Sources */,
+				9D7A45DF13FB0D50003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D7A45D213FB0D50003087FF /* PBXTargetDependency */,
+				9D7A45D413FB0D50003087FF /* PBXTargetDependency */,
+				9D7A45D613FB0D50003087FF /* PBXTargetDependency */,
+			);
+			name = walign;
+			productName = align;
+			productReference = 9D7A45E713FB0D50003087FF /* libwalign.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D7A460613FB0F36003087FF /* kapp */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A460F13FB0F69003087FF /* Build configuration list for PBXNativeTarget "kapp" */;
+			buildPhases = (
+				9D7A460313FB0F36003087FF /* Headers */,
+				9D7A460413FB0F36003087FF /* Sources */,
+				9D7A460513FB0F36003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = kapp;
+			productName = kapp;
+			productReference = 9D7A460713FB0F36003087FF /* libkapp.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		9D7A461313FB1133003087FF /* deseq */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D7A461C13FB116A003087FF /* Build configuration list for PBXNativeTarget "deseq" */;
+			buildPhases = (
+				9D7A461113FB1133003087FF /* Sources */,
+				9D7A461213FB1133003087FF /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9DE55AFE140EF0C800EA61C6 /* PBXTargetDependency */,
+				9DE55A9A140EAC9E00EA61C6 /* PBXTargetDependency */,
+				9DE55A98140EAC9E00EA61C6 /* PBXTargetDependency */,
+				9DE55A96140EAC9E00EA61C6 /* PBXTargetDependency */,
+				9DE55935140D82CD00EA61C6 /* PBXTargetDependency */,
+				9DE55933140D82BC00EA61C6 /* PBXTargetDependency */,
+				9DE55931140D82BC00EA61C6 /* PBXTargetDependency */,
+			);
+			name = deseq;
+			productName = deseq;
+			productReference = 9D7A461413FB1133003087FF /* deseq */;
+			productType = "com.apple.product-type.tool";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		08FB7793FE84155DC02AAC07 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				ORGANIZATIONNAME = NCBI/NLM/NIH;
+			};
+			buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "asm-trace" */;
+			compatibilityVersion = "Xcode 3.1";
+			developmentRegion = English;
+			hasScannedForEncodings = 1;
+			knownRegions = (
+				English,
+				Japanese,
+				French,
+				German,
+			);
+			mainGroup = 08FB7794FE84155DC02AAC07 /* asm-trace */;
+			productRefGroup = 9D7356E611775CB7009EA3E4 /* Products */;
+			projectDirPath = "";
+			projectRoot = ../../..;
+			targets = (
+				9D7357F311779B2A009EA3E4 /* make-env */,
+				9D7A412D13FADF3A003087FF /* ksproc */,
+				9D7A415B13FAE00E003087FF /* kmproc */,
+				9D31EC98117667FA003CDA5E /* klib */,
+				9D7A417713FAE192003087FF /* kdb-cmn */,
+				9D7A423313FAE3F5003087FF /* kdb */,
+				9D7A426713FAE69A003087FF /* wkdb */,
+				9D7A428813FAE9B5003087FF /* vdb-cmn */,
+				9D7A431B13FAED2E003087FF /* vdb */,
+				9D7A433613FAEE0C003087FF /* wvdb */,
+				9D7A44BF13FB04A9003087FF /* align */,
+				9D7A435F13FAF1AE003087FF /* vxf */,
+				9D7A440B13FAF315003087FF /* sraxf */,
+				9D7A448B13FAF555003087FF /* axf */,
+				9D7A452E13FB0A3C003087FF /* wvxf */,
+				9D7A454A13FB0B4D003087FF /* wsraxf */,
+				9D7A45A813FB0CB8003087FF /* waxf */,
+				9D7A45D113FB0D50003087FF /* walign */,
+				9D7A460613FB0F36003087FF /* kapp */,
+				9D7A461313FB1133003087FF /* deseq */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		9D7357F211779B2A009EA3E4 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "echo \"Setting up run-time environment\"\nmkdir -p $BUILT_PRODUCTS_DIR\n\ncd ../../..\nTOP=`pwd`\nmake -s vers-includes\n\nschema=\"$TOP/interfaces\"\n\ncd $BUILT_PRODUCTS_DIR\n\n[ -e schema ] || ln -s $schema schema\n\ncase $ARCHS in\n\t($ARCHS_STANDARD_32_BIT)\n\t\tmod=\"mod32\"\n\t\twmod=\"wmod32\";\n\t\t;;\n\t($ARCHS_STANDARD_64_BIT)\n\t\tmod=\"mod64\"\n\t\twmod=\"wmod64\";\n\t\t;;\nesac\n\nmkdir -p ${mod}\ncd $mod\nrm -rf *\nln -s ../libvxf.dylib .\nln -s ../libsra [...]
+			showEnvVarsInLog = 0;
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		9D31EC96117667FA003CDA5E /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9DFECDC711766982004EFD0D /* arc.c in Sources */,
+				9DFECDC811766982004EFD0D /* buffile.c in Sources */,
+				9DFECDC911766982004EFD0D /* bzip.c in Sources */,
+				9DFECDCA11766982004EFD0D /* countfile.c in Sources */,
+				9DFECDCB11766982004EFD0D /* crc32.c in Sources */,
+				9DFECDCC11766982004EFD0D /* dir_test.c in Sources */,
+				9DFECDCD11766982004EFD0D /* directory.c in Sources */,
+				9DFECDCE11766982004EFD0D /* file.c in Sources */,
+				9DFECDD011766982004EFD0D /* gzip.c in Sources */,
+				9DFECDD111766982004EFD0D /* md5.c in Sources */,
+				9DFECDD211766982004EFD0D /* nullfile.c in Sources */,
+				9DFECDD311766982004EFD0D /* sra.c in Sources */,
+				9DFECDD411766982004EFD0D /* subfile.c in Sources */,
+				9DFECDD511766982004EFD0D /* sysdir.c in Sources */,
+				9DFECDD611766982004EFD0D /* sysdll.c in Sources */,
+				9DFECDD711766982004EFD0D /* sysfile.c in Sources */,
+				9DFECDD811766982004EFD0D /* sysmmap.c in Sources */,
+				9DFECDD911766982004EFD0D /* tar.c in Sources */,
+				9DFECDDA11766982004EFD0D /* teefile.c in Sources */,
+				9DFECDDB11766982004EFD0D /* toc.c in Sources */,
+				9DFECDDC11766982004EFD0D /* tocdir.c in Sources */,
+				9DFECDDD11766982004EFD0D /* tocentry.c in Sources */,
+				9DFECDDE11766982004EFD0D /* tocfile.c in Sources */,
+				9DFECDC511766952004EFD0D /* xml.c in Sources */,
+				9D31EC9D1176680A003CDA5E /* bstpersist.c in Sources */,
+				9D31EC9E1176680A003CDA5E /* container.c in Sources */,
+				9D31EC9F1176680B003CDA5E /* cp1252.c in Sources */,
+				9D31ECA01176680B003CDA5E /* crc32.c in Sources */,
+				9D31ECA11176680C003CDA5E /* data-buffer.c in Sources */,
+				9D31ECA21176680C003CDA5E /* iso8859-1.c in Sources */,
+				9D31ECA31176680D003CDA5E /* iso8859.c in Sources */,
+				9D31ECA41176680D003CDA5E /* log.c in Sources */,
+				9D31ECA51176680E003CDA5E /* md5.c in Sources */,
+				9D31ECA61176680E003CDA5E /* namelist.c in Sources */,
+				9D31ECA71176680F003CDA5E /* pack.c in Sources */,
+				9D31ECA81176680F003CDA5E /* pbstree.c in Sources */,
+				9D31ECA911766810003CDA5E /* ptpersist.c in Sources */,
+				9D31ECAA11766810003CDA5E /* ptrie.c in Sources */,
+				9D31ECAB11766811003CDA5E /* rc-idx-tbl.c in Sources */,
+				9D31ECAC11766811003CDA5E /* rc-tbl.c in Sources */,
+				9D31ECAD11766812003CDA5E /* symtab.c in Sources */,
+				9D31ECAE11766813003CDA5E /* syslog.c in Sources */,
+				9D31ECB011766814003CDA5E /* text.c in Sources */,
+				9D31ECB111766815003CDA5E /* token.c in Sources */,
+				9D31ECB211766815003CDA5E /* trie.c in Sources */,
+				9D31ECB411766816003CDA5E /* unpack.c in Sources */,
+				9D31ECB511766817003CDA5E /* utf8.c in Sources */,
+				9D31ECB611766818003CDA5E /* vector.c in Sources */,
+				9D31ECB711766818003CDA5E /* vlen-encode.c in Sources */,
+				9D8EC41B11C2E49E000F1048 /* pbstree-native.c in Sources */,
+				9D8EC41C11C2E49E000F1048 /* pbstree-swapped.c in Sources */,
+				9D8198A911D3D39700DA4D3C /* vector_namelist.c in Sources */,
+				9D1EC483122D914C00C11287 /* printf.c in Sources */,
+				9D1EC484122D914C00C11287 /* status-rc-strings.c in Sources */,
+				9D1EC485122D914C00C11287 /* status-rc.c in Sources */,
+				9D1EC486122D914C00C11287 /* status.c in Sources */,
+				9D62F42A124D01AE003D38E9 /* bsearch.c in Sources */,
+				9D62F42B124D01AE003D38E9 /* qsort.c in Sources */,
+				9DA3A84E125FA3A8005AD5BB /* refcount.c in Sources */,
+				9DA3A88512663646005AD5BB /* syswriter.c in Sources */,
+				9DA3A8961266375B005AD5BB /* writer.c in Sources */,
+				9DA3A89A12663798005AD5BB /* out.c in Sources */,
+				9D985E8D12886C6100849729 /* config.c in Sources */,
+				9DF1902C128DAEBA00FED4AA /* debug.c in Sources */,
+				9D8204F8130F1100009A8B64 /* pagefile.c in Sources */,
+				9D7A40DB13FADBA3003087FF /* SHA-32bit.c in Sources */,
+				9D7A40DC13FADBA3003087FF /* SHA-64bit.c in Sources */,
+				9D7A40E113FADBEE003087FF /* syserrcode.c in Sources */,
+				9D7A40E213FADBEE003087FF /* systime.c in Sources */,
+				9D7A40FF13FADCFE003087FF /* buffile-write.c in Sources */,
+				9D7A410613FADCFE003087FF /* mmap.c in Sources */,
+				9D7A410913FADCFE003087FF /* pmem.c in Sources */,
+				9D7A445B13FAF49A003087FF /* agrep-myersunltd.c in Sources */,
+				9D7A445C13FAF49A003087FF /* agrep-wumanber.c in Sources */,
+				9D7A445E13FAF49A003087FF /* agrep-myers.c in Sources */,
+				9D7A445F13FAF49A003087FF /* fgrep-boyermoore.c in Sources */,
+				9D7A446113FAF49A003087FF /* fgrep-dumb.c in Sources */,
+				9D7A446213FAF49A003087FF /* search.c in Sources */,
+				9D7A446313FAF49A003087FF /* agrep-dp.c in Sources */,
+				9D7A446413FAF49A003087FF /* fgrep-aho.c in Sources */,
+				9D7A446513FAF49A003087FF /* nucstrstr.c in Sources */,
+				9D1235BC14F571AC00ECC72C /* config-grammar.c in Sources */,
+				9D1235BE14F571AC00ECC72C /* config-lex.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A412B13FADF3A003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A413B13FADF74003087FF /* stbarrier.c in Sources */,
+				9D7A413C13FADF75003087FF /* stcond.c in Sources */,
+				9D7A413D13FADF75003087FF /* stlock.c in Sources */,
+				9D7A413E13FADF76003087FF /* stsem.c in Sources */,
+				9D7A413F13FADF76003087FF /* stthread.c in Sources */,
+				9D7A414013FADF77003087FF /* sttimeout.c in Sources */,
+				9D7A414213FADF79003087FF /* syslock.c in Sources */,
+				9D7A415113FADFC6003087FF /* queue.c in Sources */,
+				9D7A415213FADFC6003087FF /* sem.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A415913FAE00E003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A415F13FAE01B003087FF /* queue.c in Sources */,
+				9D7A416013FAE01C003087FF /* sem.c in Sources */,
+				9D7A416113FAE023003087FF /* syscond.c in Sources */,
+				9D7A416213FAE024003087FF /* syslock.c in Sources */,
+				9D7A416313FAE026003087FF /* systhread.c in Sources */,
+				9D7A416413FAE027003087FF /* systimeout.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A417513FAE192003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A422313FAE325003087FF /* btree.c in Sources */,
+				9D7A422413FAE333003087FF /* dbmgr-cmn.c in Sources */,
+				9D7A427E13FAE90F003087FF /* idxblk.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A423113FAE3F5003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A423B13FAE433003087FF /* coldata.c in Sources */,
+				9D7A423C13FAE435003087FF /* colidx.c in Sources */,
+				9D7A423E13FAE43F003087FF /* colidx0.c in Sources */,
+				9D7A423F13FAE444003087FF /* colidx1.c in Sources */,
+				9D7A424013FAE446003087FF /* colidx2.c in Sources */,
+				9D7A424113FAE470003087FF /* column-cc.c in Sources */,
+				9D7A424213FAE477003087FF /* column.c in Sources */,
+				9D7A424313FAE47A003087FF /* database-cc.c in Sources */,
+				9D7A424513FAE482003087FF /* database.c in Sources */,
+				9D7A424613FAE484003087FF /* dbcc-cmn.c in Sources */,
+				9D7A424713FAE48A003087FF /* dbmgr.c in Sources */,
+				9D7A424813FAE499003087FF /* index.c in Sources */,
+				9D7A424913FAE4B0003087FF /* kdb.c in Sources */,
+				9D7A424A13FAE4B4003087FF /* meta.c in Sources */,
+				9D7A424B13FAE4B8003087FF /* table-cc.c in Sources */,
+				9D7A424C13FAE4BA003087FF /* table.c in Sources */,
+				9D7A424D13FAE4C1003087FF /* trieidx-v1.c in Sources */,
+				9D7A424E13FAE4C2003087FF /* trieidx-v2.c in Sources */,
+				9D7A424F13FAE4C9003087FF /* u64idx-v3.c in Sources */,
+				9D7A425813FAE616003087FF /* idstats.c in Sources */,
+				9D7A425913FAE629003087FF /* trieval-v1.c in Sources */,
+				9D7A425A13FAE62E003087FF /* ptrieval-v1.c in Sources */,
+				9D7A425B13FAE63F003087FF /* trieval-v2.c in Sources */,
+				9D7A425C13FAE644003087FF /* ptrieval-v2.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A426513FAE69A003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A426D13FAE6C0003087FF /* wkdb.c in Sources */,
+				9D7A426E13FAE6C5003087FF /* wdbmgr.c in Sources */,
+				9D7A426F13FAE6CC003087FF /* wdatabase.c in Sources */,
+				9D7A427013FAE6D5003087FF /* wtable.c in Sources */,
+				9D7A427113FAE6E1003087FF /* wcolumn.c in Sources */,
+				9D7A427213FAE6EB003087FF /* wcoldata.c in Sources */,
+				9D7A427413FAE89E003087FF /* wcolidx.c in Sources */,
+				9D7A427513FAE8A4003087FF /* wcolidx0.c in Sources */,
+				9D7A427613FAE8A7003087FF /* wcolidx1.c in Sources */,
+				9D7A427713FAE8A8003087FF /* wcolidx2.c in Sources */,
+				9D7A427813FAE8D6003087FF /* widxblk.c in Sources */,
+				9D7A427913FAE8DB003087FF /* wmeta.c in Sources */,
+				9D7A427A13FAE8E7003087FF /* windex.c in Sources */,
+				9D7A427B13FAE8ED003087FF /* wtrieidx-v1.c in Sources */,
+				9D7A427C13FAE8EE003087FF /* wtrieidx-v2.c in Sources */,
+				9D7A427D13FAE8F4003087FF /* wu64idx-v3.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A428613FAE9B5003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A42E413FAEA2A003087FF /* dbmgr-cmn.c in Sources */,
+				9D7A42E513FAEA36003087FF /* schema-tok.c in Sources */,
+				9D7A42E613FAEA3C003087FF /* schema-parse.c in Sources */,
+				9D7A42E713FAEA45003087FF /* schema-type.c in Sources */,
+				9D7A42E813FAEA4C003087FF /* schema-func.c in Sources */,
+				9D7A42E913FAEA54003087FF /* schema-prod.c in Sources */,
+				9D7A42EA13FAEA5A003087FF /* schema-expr.c in Sources */,
+				9D7A42EB13FAEA60003087FF /* schema-eval.c in Sources */,
+				9D7A42EC13FAEA65003087FF /* schema-tbl.c in Sources */,
+				9D7A42ED13FAEA68003087FF /* schema-db.c in Sources */,
+				9D7A42EE13FAEA6E003087FF /* schema-dump.c in Sources */,
+				9D7A42EF13FAEA72003087FF /* schema-int.c in Sources */,
+				9D7A42F013FAEA7C003087FF /* schema.c in Sources */,
+				9D7A42F113FAEA85003087FF /* linker-int.c in Sources */,
+				9D7A42F213FAEA8D003087FF /* linker-cmn.c in Sources */,
+				9D7A42F313FAEA95003087FF /* database-cmn.c in Sources */,
+				9D7A42F413FAEA98003087FF /* database-load.c in Sources */,
+				9D7A42F513FAEAA0003087FF /* table-cmn.c in Sources */,
+				9D7A42F613FAEAA1003087FF /* table-load.c in Sources */,
+				9D7A42F713FAEAAA003087FF /* cursor-cmn.c in Sources */,
+				9D7A42F813FAEAB2003087FF /* column-cmn.c in Sources */,
+				9D7A42F913FAEABD003087FF /* prod-cmn.c in Sources */,
+				9D7A42FA13FAEAC0003087FF /* prod-expr.c in Sources */,
+				9D7A42FB13FAEAC4003087FF /* prod-func.c in Sources */,
+				9D7A42FC13FAEACB003087FF /* phys-cmn.c in Sources */,
+				9D7A42FD13FAEAD1003087FF /* phys-load.c in Sources */,
+				9D7A42FE13FAEADD003087FF /* blob.c in Sources */,
+				9D7A42FF13FAEAE0003087FF /* blob-headers.c in Sources */,
+				9D7A430013FAEAE7003087FF /* page-map.c in Sources */,
+				9D7A430313FAEB42003087FF /* row-id.c in Sources */,
+				9D7A430413FAEB43003087FF /* row-len.c in Sources */,
+				9D7A430513FAEB49003087FF /* fixed-row-len.c in Sources */,
+				9D7A430613FAEB93003087FF /* merge.c in Sources */,
+				9D7A430713FAEB99003087FF /* split.c in Sources */,
+				9D7A430813FAEBA0003087FF /* compare.c in Sources */,
+				9D7A430913FAEBAE003087FF /* meta-attr-read.c in Sources */,
+				9D7A430B13FAEBB1003087FF /* meta-read.c in Sources */,
+				9D7A430C13FAEBB2003087FF /* meta-value.c in Sources */,
+				9D7A430D13FAEBBF003087FF /* environment-read.c in Sources */,
+				9D7A431013FAEC78003087FF /* cast.c in Sources */,
+				9D7A431113FAEC7A003087FF /* index_lookup.c in Sources */,
+				9D7A431213FAEC7B003087FF /* index_project.c in Sources */,
+				9D7A431313FAEC7C003087FF /* parameter-read.c in Sources */,
+				9D7A431413FAEC7D003087FF /* range-validate.c in Sources */,
+				9D7A431513FAEC7D003087FF /* redimension.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A431913FAED2E003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A431F13FAED40003087FF /* dbmgr.c in Sources */,
+				9D7A432013FAED47003087FF /* linker.c in Sources */,
+				9D7A432113FAED4E003087FF /* database.c in Sources */,
+				9D7A432213FAED5A003087FF /* table.c in Sources */,
+				9D7A432313FAED61003087FF /* cursor.c in Sources */,
+				9D7A432413FAED69003087FF /* column.c in Sources */,
+				9D7A432513FAED70003087FF /* prod.c in Sources */,
+				9D7A432613FAED79003087FF /* phys.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A433413FAEE0C003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A434213FAEE66003087FF /* wcolumn.c in Sources */,
+				9D7A434313FAEE67003087FF /* wcursor.c in Sources */,
+				9D7A434413FAEE68003087FF /* wdatabase.c in Sources */,
+				9D7A434513FAEE68003087FF /* wdbmgr.c in Sources */,
+				9D7A434613FAEE69003087FF /* wlinker.c in Sources */,
+				9D7A434713FAEE6A003087FF /* wphys.c in Sources */,
+				9D7A434813FAEE6B003087FF /* wprod.c in Sources */,
+				9D7A434913FAEE6C003087FF /* wtable.c in Sources */,
+				9D7A434B13FAEECB003087FF /* index_insert.c in Sources */,
+				9D7A434C13FAEED1003087FF /* meta-append.c in Sources */,
+				9D7A434D13FAEEDB003087FF /* meta-write.c in Sources */,
+				9D7A434E13FAEEE2003087FF /* meta-attr-write.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A435D13FAF1AE003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A439913FAF20E003087FF /* add-row-id.c in Sources */,
+				9D7A439A13FAF20E003087FF /* bit_or.c in Sources */,
+				9D7A439B13FAF20E003087FF /* bunzip.c in Sources */,
+				9D7A439D13FAF20E003087FF /* ceil.c in Sources */,
+				9D7A439F13FAF20E003087FF /* clip.c in Sources */,
+				9D7A43A013FAF20E003087FF /* cut.c in Sources */,
+				9D7A43A113FAF20E003087FF /* delta.c in Sources */,
+				9D7A43A213FAF20E003087FF /* deriv.c in Sources */,
+				9D7A43A313FAF20E003087FF /* diff.c in Sources */,
+				9D7A43A413FAF20E003087FF /* echo.c in Sources */,
+				9D7A43A613FAF20E003087FF /* exists.c in Sources */,
+				9D7A43A713FAF20E003087FF /* floor.c in Sources */,
+				9D7A43A913FAF20E003087FF /* funzip.c in Sources */,
+				9D7A43AB13FAF20E003087FF /* integral.c in Sources */,
+				9D7A43AC13FAF20E003087FF /* irzip.c in Sources */,
+				9D7A43B513FAF20E003087FF /* map.c in Sources */,
+				9D7A43B713FAF20E003087FF /* max.c in Sources */,
+				9D7A43B813FAF20E003087FF /* min.c in Sources */,
+				9D7A43B913FAF20E003087FF /* outlier-decoder.c in Sources */,
+				9D7A43BB13FAF20E003087FF /* pack.c in Sources */,
+				9D7A43BC13FAF20E003087FF /* paste.c in Sources */,
+				9D7A43BD13FAF20E003087FF /* rand_4na_2na.c in Sources */,
+				9D7A43BE13FAF20E003087FF /* rldecode.c in Sources */,
+				9D7A43C013FAF20E003087FF /* round.c in Sources */,
+				9D7A43C113FAF20E003087FF /* simple-sub-select.c in Sources */,
+				9D7A43C213FAF20E003087FF /* subtract-row-id.c in Sources */,
+				9D7A43C313FAF20E003087FF /* sum.c in Sources */,
+				9D7A43C413FAF20E003087FF /* trim.c in Sources */,
+				9D7A43C513FAF20E003087FF /* trunc.c in Sources */,
+				9D7A43C613FAF20E003087FF /* undelta.c in Sources */,
+				9D7A43C713FAF20E003087FF /* unpack.c in Sources */,
+				9D7A43C813FAF20E003087FF /* unzip.c in Sources */,
+				9D7A43C913FAF20E003087FF /* vec-sum.c in Sources */,
+				9DE55A28140E94CB00EA61C6 /* iunzip.c in Sources */,
+				9D320AB0142D02B000ACA5AA /* extract_token.c in Sources */,
+				9D320AB1142D02B000ACA5AA /* strtonum.c in Sources */,
+				9D320AB6142D02E600ACA5AA /* sprintf.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A440913FAF315003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A441413FAF3B5003087FF /* qual4_decode.c in Sources */,
+				9D7A441513FAF3B5003087FF /* format-spot-name.c in Sources */,
+				9D7A441713FAF3B5003087FF /* fpcodec.c in Sources */,
+				9D7A441813FAF3B5003087FF /* v0-decompress-init.c in Sources */,
+				9D7A441913FAF3B5003087FF /* extract-coordinates.c in Sources */,
+				9D7A441C13FAF3B5003087FF /* untyped.c in Sources */,
+				9D7A441D13FAF3B5003087FF /* color-from-dna.c in Sources */,
+				9D7A441E13FAF3B5003087FF /* tokenize-spot_name-454.c in Sources */,
+				9D7A441F13FAF3B5003087FF /* process-position.c in Sources */,
+				9D7A442113FAF3B5003087FF /* bio-start.c in Sources */,
+				9D7A442213FAF3B5003087FF /* normalize.c in Sources */,
+				9D7A442313FAF3B5003087FF /* rewrite-spot-name.c in Sources */,
+				9D7A442513FAF3B5003087FF /* tokenize-spot_name-abi.c in Sources */,
+				9D7A442613FAF3B5003087FF /* tokenize-spot_name-ion-torrent.c in Sources */,
+				9D7A442713FAF3B5003087FF /* v0-decompress.c in Sources */,
+				9D7A442913FAF3B5003087FF /* swap.c in Sources */,
+				9D7A442A13FAF3B5003087FF /* spot-desc.c in Sources */,
+				9D7A442B13FAF3B5003087FF /* tokenize-spot_name-helicos.c in Sources */,
+				9D7A442C13FAF3B5003087FF /* denormalize.c in Sources */,
+				9D7A442D13FAF3B5003087FF /* make-position.c in Sources */,
+				9D7A442F13FAF3B5003087FF /* tokenize-spot_name-illumina.c in Sources */,
+				9D7A443013FAF3B5003087FF /* dna-from-color.c in Sources */,
+				9D7A443113FAF3B5003087FF /* index_lookup.c in Sources */,
+				9D7A443313FAF3B5003087FF /* extract-name_coord.c in Sources */,
+				9D7A443513FAF3B5003087FF /* v0-funcs.c in Sources */,
+				9D7A443613FAF3B5003087FF /* rotate.c in Sources */,
+				9D7A443813FAF3B5003087FF /* read-seg-from-readn.c in Sources */,
+				9D7A443A13FAF3B5003087FF /* dynamic-454-read-descriptor.c in Sources */,
+				9D7A443D13FAF3B5003087FF /* read-desc.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A448913FAF555003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A448F13FAF56D003087FF /* seq-restore-read.c in Sources */,
+				9D7A449013FAF56D003087FF /* raw-restore-read.c in Sources */,
+				9D7A449113FAF56D003087FF /* align-restore-read.c in Sources */,
+				9D7A449213FAF56D003087FF /* ref-tbl-sub-select.c in Sources */,
+				9D7A449313FAF56D003087FF /* align-local_ref_id.c in Sources */,
+				9D7A449413FAF56D003087FF /* align-ref-pos.c in Sources */,
+				9D7A449613FAF56D003087FF /* align-ref-seq-id.c in Sources */,
+				9D7A449713FAF56D003087FF /* cigar.c in Sources */,
+				9D7A449813FAF56D003087FF /* align-ref-name.c in Sources */,
+				9D7A449913FAF56D003087FF /* template-len.c in Sources */,
+				9D7A449A13FAF56D003087FF /* get-sam-flags.c in Sources */,
+				9D7A449B13FAF56D003087FF /* ref-restore-read.c in Sources */,
+				9D7A449C13FAF56D003087FF /* align-local_ref_start.c in Sources */,
+				9D7A449D13FAF56D003087FF /* project_read_from_sequence.c in Sources */,
+				9D7A449E13FAF56D003087FF /* not-my-row.c in Sources */,
+				9DE55A79140EA19500EA61C6 /* raw-restore-qual.c in Sources */,
+				9DE55A85140EA93600EA61C6 /* generate-mismatch-qual.c in Sources */,
+				9DE55AAF140EC79C00EA61C6 /* mismatch-restore-qual.c in Sources */,
+				9D4DCEAC1423FD9600881098 /* ref-preserve_qual.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A44BD13FB04A9003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A44C913FB04C2003087FF /* reader-cmn.c in Sources */,
+				9D7A44CA13FB04C2003087FF /* refseq-mgr.c in Sources */,
+				9D7A44CB13FB04C2003087FF /* reader-refseq.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A452C13FB0A3C003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A453413FB0A5A003087FF /* bzip.c in Sources */,
+				9D7A453513FB0A5D003087FF /* checksum.c in Sources */,
+				9D7A453613FB0A65003087FF /* fzip.c in Sources */,
+				9D7A453813FB0A7A003087FF /* outlier-encoder.c in Sources */,
+				9D7A453913FB0A82003087FF /* rlencode.c in Sources */,
+				9D7A453A13FB0A8E003087FF /* zip.c in Sources */,
+				9D7A458113FB0C53003087FF /* exists.c in Sources */,
+				9D7A458213FB0C53003087FF /* bunzip.c in Sources */,
+				9D7A458313FB0C53003087FF /* trim.c in Sources */,
+				9D7A458413FB0C53003087FF /* rldecode.c in Sources */,
+				9D7A458513FB0C53003087FF /* ceil.c in Sources */,
+				9D7A458713FB0C53003087FF /* paste.c in Sources */,
+				9D7A458813FB0C53003087FF /* max.c in Sources */,
+				9D7A458913FB0C53003087FF /* vec-sum.c in Sources */,
+				9D7A458A13FB0C53003087FF /* echo.c in Sources */,
+				9D7A458B13FB0C53003087FF /* add-row-id.c in Sources */,
+				9D7A458C13FB0C53003087FF /* delta.c in Sources */,
+				9D7A458D13FB0C53003087FF /* floor.c in Sources */,
+				9D7A458E13FB0C53003087FF /* subtract-row-id.c in Sources */,
+				9D7A458F13FB0C53003087FF /* outlier-decoder.c in Sources */,
+				9D7A459013FB0C53003087FF /* deriv.c in Sources */,
+				9D7A459113FB0C53003087FF /* bit_or.c in Sources */,
+				9D7A459313FB0C53003087FF /* irzip.c in Sources */,
+				9D7A459413FB0C53003087FF /* map.c in Sources */,
+				9D7A459513FB0C53003087FF /* pack.c in Sources */,
+				9D7A459613FB0C53003087FF /* sum.c in Sources */,
+				9D7A459713FB0C53003087FF /* unpack.c in Sources */,
+				9D7A459813FB0C53003087FF /* simple-sub-select.c in Sources */,
+				9D7A459913FB0C53003087FF /* rand_4na_2na.c in Sources */,
+				9D7A459A13FB0C53003087FF /* min.c in Sources */,
+				9D7A459B13FB0C53003087FF /* trunc.c in Sources */,
+				9D7A459C13FB0C53003087FF /* round.c in Sources */,
+				9D7A459D13FB0C53003087FF /* integral.c in Sources */,
+				9D7A459E13FB0C53003087FF /* cut.c in Sources */,
+				9D7A459F13FB0C53003087FF /* funzip.c in Sources */,
+				9D7A45A013FB0C53003087FF /* unzip.c in Sources */,
+				9D7A45A113FB0C53003087FF /* undelta.c in Sources */,
+				9D7A45A213FB0C53003087FF /* clip.c in Sources */,
+				9D7A45A313FB0C53003087FF /* diff.c in Sources */,
+				9DE55A23140E94B700EA61C6 /* iunzip.c in Sources */,
+				9D320AB2142D02B000ACA5AA /* extract_token.c in Sources */,
+				9D320AB3142D02B000ACA5AA /* strtonum.c in Sources */,
+				9D320AB7142D02E600ACA5AA /* sprintf.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A454813FB0B4D003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A454E13FB0B5F003087FF /* extract-name_fmt.c in Sources */,
+				9D7A454F13FB0B60003087FF /* extract-spot_name.c in Sources */,
+				9D7A455013FB0B6C003087FF /* stats.c in Sources */,
+				9D7A455113FB0B6C003087FF /* stats_quality.c in Sources */,
+				9D7A455213FB0B76003087FF /* qual4_encode.c in Sources */,
+				9D7A455B13FB0BCE003087FF /* qual4_decode.c in Sources */,
+				9D7A455C13FB0BCE003087FF /* format-spot-name.c in Sources */,
+				9D7A455D13FB0BCE003087FF /* fpcodec.c in Sources */,
+				9D7A455E13FB0BCE003087FF /* v0-decompress-init.c in Sources */,
+				9D7A455F13FB0BCE003087FF /* extract-coordinates.c in Sources */,
+				9D7A456013FB0BCE003087FF /* untyped.c in Sources */,
+				9D7A456113FB0BCE003087FF /* color-from-dna.c in Sources */,
+				9D7A456213FB0BCE003087FF /* tokenize-spot_name-454.c in Sources */,
+				9D7A456313FB0BCE003087FF /* process-position.c in Sources */,
+				9D7A456513FB0BCE003087FF /* bio-start.c in Sources */,
+				9D7A456613FB0BCE003087FF /* normalize.c in Sources */,
+				9D7A456713FB0BCE003087FF /* rewrite-spot-name.c in Sources */,
+				9D7A456813FB0BCE003087FF /* v0-decompress.c in Sources */,
+				9D7A456913FB0BCE003087FF /* tokenize-spot_name-abi.c in Sources */,
+				9D7A456A13FB0BCE003087FF /* tokenize-spot_name-ion-torrent.c in Sources */,
+				9D7A456B13FB0BCE003087FF /* swap.c in Sources */,
+				9D7A456C13FB0BCE003087FF /* spot-desc.c in Sources */,
+				9D7A456D13FB0BCE003087FF /* tokenize-spot_name-helicos.c in Sources */,
+				9D7A456E13FB0BCE003087FF /* denormalize.c in Sources */,
+				9D7A456F13FB0BCE003087FF /* make-position.c in Sources */,
+				9D7A457013FB0BCE003087FF /* tokenize-spot_name-illumina.c in Sources */,
+				9D7A457113FB0BCE003087FF /* dna-from-color.c in Sources */,
+				9D7A457213FB0BCE003087FF /* index_lookup.c in Sources */,
+				9D7A457313FB0BCE003087FF /* extract-name_coord.c in Sources */,
+				9D7A457413FB0BCE003087FF /* v0-funcs.c in Sources */,
+				9D7A457513FB0BCE003087FF /* rotate.c in Sources */,
+				9D7A457613FB0BCE003087FF /* read-seg-from-readn.c in Sources */,
+				9D7A457713FB0BCE003087FF /* dynamic-454-read-descriptor.c in Sources */,
+				9D7A457813FB0BCE003087FF /* read-desc.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A45B013FB0CB8003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A45B113FB0CB8003087FF /* seq-restore-read.c in Sources */,
+				9D7A45B213FB0CB8003087FF /* raw-restore-read.c in Sources */,
+				9D7A45B313FB0CB8003087FF /* align-restore-read.c in Sources */,
+				9D7A45B413FB0CB8003087FF /* ref-tbl-sub-select.c in Sources */,
+				9D7A45B513FB0CB8003087FF /* align-local_ref_id.c in Sources */,
+				9D7A45B613FB0CB8003087FF /* align-ref-pos.c in Sources */,
+				9D7A45B713FB0CB8003087FF /* align-ref-seq-id.c in Sources */,
+				9D7A45B813FB0CB8003087FF /* cigar.c in Sources */,
+				9D7A45B913FB0CB8003087FF /* align-ref-name.c in Sources */,
+				9D7A45BA13FB0CB8003087FF /* template-len.c in Sources */,
+				9D7A45BB13FB0CB8003087FF /* get-sam-flags.c in Sources */,
+				9D7A45BC13FB0CB8003087FF /* ref-restore-read.c in Sources */,
+				9D7A45BD13FB0CB8003087FF /* align-local_ref_start.c in Sources */,
+				9D7A45BE13FB0CB8003087FF /* project_read_from_sequence.c in Sources */,
+				9D7A45BF13FB0CB8003087FF /* not-my-row.c in Sources */,
+				9D7A45C813FB0CE4003087FF /* refseq-stats.c in Sources */,
+				9DE55A7A140EA1CA00EA61C6 /* raw-restore-qual.c in Sources */,
+				9DE55A86140EA93600EA61C6 /* generate-mismatch-qual.c in Sources */,
+				9DE55AB0140EC79C00EA61C6 /* mismatch-restore-qual.c in Sources */,
+				9D4DCEAD1423FD9600881098 /* ref-preserve_qual.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A45D913FB0D50003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A45DC13FB0D50003087FF /* reader-cmn.c in Sources */,
+				9D7A45DD13FB0D50003087FF /* refseq-mgr.c in Sources */,
+				9D7A45DE13FB0D50003087FF /* reader-refseq.c in Sources */,
+				9D7A45EA13FB0D95003087FF /* writer-alignment.c in Sources */,
+				9D7A45EB13FB0D95003087FF /* writer-reference.c in Sources */,
+				9D7A45EC13FB0D95003087FF /* writer-ref.c in Sources */,
+				9D7A45ED13FB0D95003087FF /* writer-refseq.c in Sources */,
+				9D7A45EE13FB0D95003087FF /* writer-cmn.c in Sources */,
+				9D7A45EF13FB0D95003087FF /* writer-sequence.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A460413FB0F36003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A460A13FB0F52003087FF /* progressbar.c in Sources */,
+				9D7A460B13FB0F52003087FF /* main.c in Sources */,
+				9D7A460C13FB0F52003087FF /* args.c in Sources */,
+				9D7A460D13FB0F52003087FF /* sysmain.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D7A461113FB1133003087FF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D7A461813FB1140003087FF /* deseq.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		9D4DCEDC1423FF6E00881098 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A433613FAEE0C003087FF /* wvdb */;
+			targetProxy = 9D4DCEDB1423FF6E00881098 /* PBXContainerItemProxy */;
+		};
+		9D4DCEE21424001400881098 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A426713FAE69A003087FF /* wkdb */;
+			targetProxy = 9D4DCEE11424001400881098 /* PBXContainerItemProxy */;
+		};
+		9D4DCEE41424001C00881098 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D31EC98117667FA003CDA5E /* klib */;
+			targetProxy = 9D4DCEE31424001C00881098 /* PBXContainerItemProxy */;
+		};
+		9D4DCEE71424007400881098 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A433613FAEE0C003087FF /* wvdb */;
+			targetProxy = 9D4DCEE61424007400881098 /* PBXContainerItemProxy */;
+		};
+		9D4DCEE91424007F00881098 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A426713FAE69A003087FF /* wkdb */;
+			targetProxy = 9D4DCEE81424007F00881098 /* PBXContainerItemProxy */;
+		};
+		9D4DCEEB1424008500881098 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D31EC98117667FA003CDA5E /* klib */;
+			targetProxy = 9D4DCEEA1424008500881098 /* PBXContainerItemProxy */;
+		};
+		9D4DCEED142400B400881098 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A433613FAEE0C003087FF /* wvdb */;
+			targetProxy = 9D4DCEEC142400B400881098 /* PBXContainerItemProxy */;
+		};
+		9D4DCEEF142400B900881098 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A426713FAE69A003087FF /* wkdb */;
+			targetProxy = 9D4DCEEE142400B900881098 /* PBXContainerItemProxy */;
+		};
+		9D7A423813FAE3FD003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A417713FAE192003087FF /* kdb-cmn */;
+			targetProxy = 9D7A423713FAE3FD003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A428413FAE9A0003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A417713FAE192003087FF /* kdb-cmn */;
+			targetProxy = 9D7A428313FAE9A0003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A446913FAF4A9003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A431B13FAED2E003087FF /* vdb */;
+			targetProxy = 9D7A446813FAF4A9003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A446D13FAF4B3003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A423313FAE3F5003087FF /* kdb */;
+			targetProxy = 9D7A446C13FAF4B3003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A446F13FAF4B6003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D31EC98117667FA003CDA5E /* klib */;
+			targetProxy = 9D7A446E13FAF4B6003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A44E013FB0546003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A44BF13FB04A9003087FF /* align */;
+			targetProxy = 9D7A44DF13FB0546003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A44E213FB0551003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A431B13FAED2E003087FF /* vdb */;
+			targetProxy = 9D7A44E113FB0551003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A44E613FB0561003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D31EC98117667FA003CDA5E /* klib */;
+			targetProxy = 9D7A44E513FB0561003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A44E813FB057E003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D31EC98117667FA003CDA5E /* klib */;
+			targetProxy = 9D7A44E713FB057E003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A44EA13FB0582003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A431B13FAED2E003087FF /* vdb */;
+			targetProxy = 9D7A44E913FB0582003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A44EC13FB0597003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A431B13FAED2E003087FF /* vdb */;
+			targetProxy = 9D7A44EB13FB0597003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A44EE13FB0597003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A423313FAE3F5003087FF /* kdb */;
+			targetProxy = 9D7A44ED13FB0597003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A44F013FB0597003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D31EC98117667FA003CDA5E /* klib */;
+			targetProxy = 9D7A44EF13FB0597003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A44F213FB05A9003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A423313FAE3F5003087FF /* kdb */;
+			targetProxy = 9D7A44F113FB05A9003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A44F413FB05A9003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D31EC98117667FA003CDA5E /* klib */;
+			targetProxy = 9D7A44F313FB05A9003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A44F613FB05C9003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A426713FAE69A003087FF /* wkdb */;
+			targetProxy = 9D7A44F513FB05C9003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A44F813FB05C9003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D31EC98117667FA003CDA5E /* klib */;
+			targetProxy = 9D7A44F713FB05C9003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A44FA13FB05C9003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A415B13FAE00E003087FF /* kmproc */;
+			targetProxy = 9D7A44F913FB05C9003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A44FC13FB05EB003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D31EC98117667FA003CDA5E /* klib */;
+			targetProxy = 9D7A44FB13FB05EB003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A44FE13FB05F2003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D31EC98117667FA003CDA5E /* klib */;
+			targetProxy = 9D7A44FD13FB05F2003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A450613FB06AB003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A428813FAE9B5003087FF /* vdb-cmn */;
+			targetProxy = 9D7A450513FB06AB003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A450813FB06BD003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A428813FAE9B5003087FF /* vdb-cmn */;
+			targetProxy = 9D7A450713FB06BD003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A45A913FB0CB8003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D31EC98117667FA003CDA5E /* klib */;
+			targetProxy = 9D7A45AA13FB0CB8003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A45AD13FB0CB8003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A44BF13FB04A9003087FF /* align */;
+			targetProxy = 9D7A45AE13FB0CB8003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A45D213FB0D50003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D31EC98117667FA003CDA5E /* klib */;
+			targetProxy = 9D7A45D313FB0D50003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A45D413FB0D50003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A423313FAE3F5003087FF /* kdb */;
+			targetProxy = 9D7A45D513FB0D50003087FF /* PBXContainerItemProxy */;
+		};
+		9D7A45D613FB0D50003087FF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A431B13FAED2E003087FF /* vdb */;
+			targetProxy = 9D7A45D713FB0D50003087FF /* PBXContainerItemProxy */;
+		};
+		9DE55931140D82BC00EA61C6 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A460613FB0F36003087FF /* kapp */;
+			targetProxy = 9DE55930140D82BC00EA61C6 /* PBXContainerItemProxy */;
+		};
+		9DE55933140D82BC00EA61C6 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A433613FAEE0C003087FF /* wvdb */;
+			targetProxy = 9DE55932140D82BC00EA61C6 /* PBXContainerItemProxy */;
+		};
+		9DE55935140D82CD00EA61C6 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D31EC98117667FA003CDA5E /* klib */;
+			targetProxy = 9DE55934140D82CD00EA61C6 /* PBXContainerItemProxy */;
+		};
+		9DE55A96140EAC9E00EA61C6 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A45A813FB0CB8003087FF /* waxf */;
+			targetProxy = 9DE55A95140EAC9E00EA61C6 /* PBXContainerItemProxy */;
+		};
+		9DE55A98140EAC9E00EA61C6 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A454A13FB0B4D003087FF /* wsraxf */;
+			targetProxy = 9DE55A97140EAC9E00EA61C6 /* PBXContainerItemProxy */;
+		};
+		9DE55A9A140EAC9E00EA61C6 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A452E13FB0A3C003087FF /* wvxf */;
+			targetProxy = 9DE55A99140EAC9E00EA61C6 /* PBXContainerItemProxy */;
+		};
+		9DE55AFE140EF0C800EA61C6 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D7A426713FAE69A003087FF /* wkdb */;
+			targetProxy = 9DE55AFD140EF0C800EA61C6 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+		1DEB928A08733DD80010E9CD /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_ENABLE_CPP_EXCEPTIONS = NO;
+				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_OBJC_EXCEPTIONS = NO;
+				GCC_ENABLE_PASCAL_STRINGS = YES;
+				GCC_LINK_WITH_DYNAMIC_LIBRARIES = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"_LOGGING=1",
+					MAC,
+					_DEBUGGING,
+				);
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO;
+				GCC_WARN_PEDANTIC = YES;
+				GCC_WARN_SIGN_COMPARE = NO;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					../../../interfaces/os/mac,
+					../../../interfaces/os/bsd,
+					../../../interfaces/os/unix,
+					../../../interfaces/cc/gcc/$arch,
+					../../../interfaces/cc/gcc,
+					../../../interfaces,
+					/usr/include/libxml2,
+				);
+				ONLY_ACTIVE_ARCH = YES;
+				PREBINDING = NO;
+				SDKROOT = macosx10.6;
+			};
+			name = Debug;
+		};
+		1DEB928B08733DD80010E9CD /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+				GCC_AUTO_VECTORIZATION = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_ENABLE_CPP_EXCEPTIONS = NO;
+				GCC_ENABLE_CPP_RTTI = NO;
+				GCC_ENABLE_OBJC_EXCEPTIONS = NO;
+				GCC_ENABLE_SSE3_EXTENSIONS = YES;
+				GCC_FAST_OBJC_DISPATCH = NO;
+				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+				GCC_MODEL_TUNING = "";
+				GCC_OBJC_CALL_CXX_CDTORS = NO;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"_LOGGING=1",
+					MAC,
+				);
+				GCC_THUMB_SUPPORT = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO;
+				GCC_WARN_PROTOTYPE_CONVERSION = NO;
+				GCC_WARN_SIGN_COMPARE = NO;
+				GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO;
+				GCC_WARN_UNUSED_VARIABLE = NO;
+				HEADER_SEARCH_PATHS = (
+					../../../interfaces/os/mac,
+					../../../interfaces/os/bsd,
+					../../../interfaces/os/unix,
+					../../../interfaces/cc/gcc/$arch,
+					../../../interfaces/cc/gcc,
+					../../../interfaces,
+					/usr/include/libxml2,
+				);
+				LLVM_LTO = NO;
+				PREBINDING = NO;
+				SDKROOT = macosx10.6;
+				VALID_ARCHS = "i386 x86_64";
+			};
+			name = Release;
+		};
+		9D31EC9A117667FB003CDA5E /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = "";
+				LD_DYLIB_INSTALL_NAME = "";
+				LD_OPENMP_FLAGS = "";
+				PREBINDING = NO;
+				PRIVATE_HEADERS_FOLDER_PATH = "";
+				PRODUCT_NAME = klib;
+				PUBLIC_HEADERS_FOLDER_PATH = "";
+			};
+			name = Debug;
+		};
+		9D31EC9B117667FB003CDA5E /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = "";
+				INSTALL_PATH = "";
+				LD_DYLIB_INSTALL_NAME = "";
+				LD_OPENMP_FLAGS = "";
+				LLVM_LTO = NO;
+				PREBINDING = NO;
+				PRIVATE_HEADERS_FOLDER_PATH = "";
+				PRODUCT_NAME = klib;
+				PUBLIC_HEADERS_FOLDER_PATH = "";
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7357F411779B2B009EA3E4 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				PRODUCT_NAME = "make-env";
+			};
+			name = Debug;
+		};
+		9D7357F511779B2B009EA3E4 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				PRODUCT_NAME = "make-env";
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A412F13FADF3B003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = ksproc;
+			};
+			name = Debug;
+		};
+		9D7A413013FADF3B003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = ksproc;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A415D13FAE00E003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = kmproc;
+			};
+			name = Debug;
+		};
+		9D7A415E13FAE00E003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = kmproc;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A417913FAE192003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = "kdb-cmn";
+			};
+			name = Debug;
+		};
+		9D7A417A13FAE192003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = "kdb-cmn";
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A423513FAE3F5003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = kdb;
+			};
+			name = Debug;
+		};
+		9D7A423613FAE3F5003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = kdb;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A426913FAE69A003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = wkdb;
+			};
+			name = Debug;
+		};
+		9D7A426A13FAE69A003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = wkdb;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A428A13FAE9B5003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = "vdb-cmn";
+			};
+			name = Debug;
+		};
+		9D7A428B13FAE9B5003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = "vdb-cmn";
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A431D13FAED2F003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = vdb;
+			};
+			name = Debug;
+		};
+		9D7A431E13FAED2F003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = vdb;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A433813FAEE0C003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = wvdb;
+			};
+			name = Debug;
+		};
+		9D7A433913FAEE0C003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = wvdb;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A436113FAF1AE003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = vxf;
+			};
+			name = Debug;
+		};
+		9D7A436213FAF1AE003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = vxf;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A440D13FAF315003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = sraxf;
+			};
+			name = Debug;
+		};
+		9D7A440E13FAF315003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = sraxf;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A448D13FAF555003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = axf;
+			};
+			name = Debug;
+		};
+		9D7A448E13FAF555003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = axf;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A44C113FB04A9003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = align;
+			};
+			name = Debug;
+		};
+		9D7A44C213FB04A9003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = align;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A453013FB0A3D003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = wvxf;
+			};
+			name = Debug;
+		};
+		9D7A453113FB0A3D003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = wvxf;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A454C13FB0B4E003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = wsraxf;
+			};
+			name = Debug;
+		};
+		9D7A454D13FB0B4E003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = wsraxf;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A45C513FB0CB8003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = waxf;
+			};
+			name = Debug;
+		};
+		9D7A45C613FB0CB8003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = waxf;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A45E513FB0D50003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = walign;
+			};
+			name = Debug;
+		};
+		9D7A45E613FB0D50003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = walign;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A460813FB0F36003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = kapp;
+			};
+			name = Debug;
+		};
+		9D7A460913FB0F36003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = kapp;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D7A461613FB1133003087FF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/bin;
+				PREBINDING = NO;
+				PRODUCT_NAME = deseq;
+			};
+			name = Debug;
+		};
+		9D7A461713FB1133003087FF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/bin;
+				PREBINDING = NO;
+				PRODUCT_NAME = deseq;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "asm-trace" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1DEB928A08733DD80010E9CD /* Debug */,
+				1DEB928B08733DD80010E9CD /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D31ECBB11766836003CDA5E /* Build configuration list for PBXNativeTarget "klib" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D31EC9A117667FB003CDA5E /* Debug */,
+				9D31EC9B117667FB003CDA5E /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7357F611779B49009EA3E4 /* Build configuration list for PBXAggregateTarget "make-env" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7357F411779B2B009EA3E4 /* Debug */,
+				9D7357F511779B2B009EA3E4 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A414713FADF98003087FF /* Build configuration list for PBXNativeTarget "ksproc" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A412F13FADF3B003087FF /* Debug */,
+				9D7A413013FADF3B003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A417013FAE0A5003087FF /* Build configuration list for PBXNativeTarget "kmproc" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A415D13FAE00E003087FF /* Debug */,
+				9D7A415E13FAE00E003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A417C13FAE1A2003087FF /* Build configuration list for PBXNativeTarget "kdb-cmn" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A417913FAE192003087FF /* Debug */,
+				9D7A417A13FAE192003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A423A13FAE42A003087FF /* Build configuration list for PBXNativeTarget "kdb" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A423513FAE3F5003087FF /* Debug */,
+				9D7A423613FAE3F5003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A427313FAE709003087FF /* Build configuration list for PBXNativeTarget "wkdb" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A426913FAE69A003087FF /* Debug */,
+				9D7A426A13FAE69A003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A428D13FAE9C5003087FF /* Build configuration list for PBXNativeTarget "vdb-cmn" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A428A13FAE9B5003087FF /* Debug */,
+				9D7A428B13FAE9B5003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A432713FAED97003087FF /* Build configuration list for PBXNativeTarget "vdb" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A431D13FAED2F003087FF /* Debug */,
+				9D7A431E13FAED2F003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A434A13FAEE8A003087FF /* Build configuration list for PBXNativeTarget "wvdb" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A433813FAEE0C003087FF /* Debug */,
+				9D7A433913FAEE0C003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A436413FAF1B4003087FF /* Build configuration list for PBXNativeTarget "vxf" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A436113FAF1AE003087FF /* Debug */,
+				9D7A436213FAF1AE003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A441013FAF333003087FF /* Build configuration list for PBXNativeTarget "sraxf" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A440D13FAF315003087FF /* Debug */,
+				9D7A440E13FAF315003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A44A913FAF5C7003087FF /* Build configuration list for PBXNativeTarget "axf" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A448D13FAF555003087FF /* Debug */,
+				9D7A448E13FAF555003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A44FF13FB0621003087FF /* Build configuration list for PBXNativeTarget "align" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A44C113FB04A9003087FF /* Debug */,
+				9D7A44C213FB04A9003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A454613FB0AF3003087FF /* Build configuration list for PBXNativeTarget "wvxf" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A453013FB0A3D003087FF /* Debug */,
+				9D7A453113FB0A3D003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A455A13FB0BAF003087FF /* Build configuration list for PBXNativeTarget "wsraxf" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A454C13FB0B4E003087FF /* Debug */,
+				9D7A454D13FB0B4E003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A45C413FB0CB8003087FF /* Build configuration list for PBXNativeTarget "waxf" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A45C513FB0CB8003087FF /* Debug */,
+				9D7A45C613FB0CB8003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A45E413FB0D50003087FF /* Build configuration list for PBXNativeTarget "walign" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A45E513FB0D50003087FF /* Debug */,
+				9D7A45E613FB0D50003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A460F13FB0F69003087FF /* Build configuration list for PBXNativeTarget "kapp" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A460813FB0F36003087FF /* Debug */,
+				9D7A460913FB0F36003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D7A461C13FB116A003087FF /* Build configuration list for PBXNativeTarget "deseq" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D7A461613FB1133003087FF /* Debug */,
+				9D7A461713FB1133003087FF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
+}
diff --git a/build/Xcode/old-toolkit/.gitignore b/build/Xcode/old-toolkit/.gitignore
new file mode 100644
index 0000000..378eac2
--- /dev/null
+++ b/build/Xcode/old-toolkit/.gitignore
@@ -0,0 +1 @@
+build
diff --git a/build/Xcode/old-toolkit/old-toolkit.xcodeproj/project.pbxproj b/build/Xcode/old-toolkit/old-toolkit.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..0f58a7e
--- /dev/null
+++ b/build/Xcode/old-toolkit/old-toolkit.xcodeproj/project.pbxproj
@@ -0,0 +1,2153 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 44;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		9D1A14B5119D934300EF212F /* bamtest.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D1A14AB119D931800EF212F /* bamtest.c */; };
+		9D1A14B6119D934A00EF212F /* BAMFile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D1A14A8119D922100EF212F /* BAMFile.c */; };
+		9D1A14BF119D93BC00EF212F /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E89E11762C8900F3579B /* libklib.dylib */; };
+		9D1A14C2119D93D100EF212F /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E5B41174E2D100F3579B /* libz.dylib */; };
+		9D65E5AA1174E29F00F3579B /* sra2kdb.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5A91174E29F00F3579B /* sra2kdb.c */; };
+		9D65E5B71174E2D100F3579B /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E5B41174E2D100F3579B /* libz.dylib */; };
+		9D65E5B81174E2D100F3579B /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E5B51174E2D100F3579B /* libbz2.dylib */; };
+		9D65E5B91174E2D100F3579B /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E5B61174E2D100F3579B /* libxml2.dylib */; };
+		9D65E8A111762C9B00F3579B /* arc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5CF1174E2DB00F3579B /* arc.c */; };
+		9D65E8A311762C9C00F3579B /* bstpersist.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5BD1174E2DB00F3579B /* bstpersist.c */; };
+		9D65E8A411762C9C00F3579B /* buffile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5D01174E2DB00F3579B /* buffile.c */; };
+		9D65E8A511762C9D00F3579B /* bzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5D11174E2DB00F3579B /* bzip.c */; };
+		9D65E8A611762C9D00F3579B /* container.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5BE1174E2DB00F3579B /* container.c */; };
+		9D65E8A711762C9E00F3579B /* countfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5D21174E2DB00F3579B /* countfile.c */; };
+		9D65E8A811762C9F00F3579B /* cp1252.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5EC1174E2DB00F3579B /* cp1252.c */; };
+		9D65E8A911762CA000F3579B /* crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5D31174E2DB00F3579B /* crc32.c */; };
+		9D65E8AA11762CA000F3579B /* crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5C81174E2DB00F3579B /* crc32.c */; };
+		9D65E8AB11762CA100F3579B /* dir_test.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5D41174E2DB00F3579B /* dir_test.c */; };
+		9D65E8AC11762CA200F3579B /* directory.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5D51174E2DB00F3579B /* directory.c */; };
+		9D65E8AD11762CA200F3579B /* file.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5D61174E2DB00F3579B /* file.c */; };
+		9D65E8AF11762CA300F3579B /* gzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5D71174E2DB00F3579B /* gzip.c */; };
+		9D65E8B011762CA400F3579B /* iso8859-1.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5ED1174E2DB00F3579B /* iso8859-1.c */; };
+		9D65E8B111762CA500F3579B /* iso8859.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5EE1174E2DB00F3579B /* iso8859.c */; };
+		9D65E8B211762CA500F3579B /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5D81174E2DB00F3579B /* md5.c */; };
+		9D65E8B311762CA600F3579B /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5C91174E2DB00F3579B /* md5.c */; };
+		9D65E8B411762CA600F3579B /* namelist.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5BF1174E2DB00F3579B /* namelist.c */; };
+		9D65E8B511762CA700F3579B /* nullfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5D91174E2DB00F3579B /* nullfile.c */; };
+		9D65E8B611762CA800F3579B /* pbstree.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5C01174E2DB00F3579B /* pbstree.c */; };
+		9D65E8B711762CA800F3579B /* ptpersist.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5C11174E2DB00F3579B /* ptpersist.c */; };
+		9D65E8B811762CA900F3579B /* ptrie.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5C21174E2DB00F3579B /* ptrie.c */; };
+		9D65E8B911762CAA00F3579B /* queue.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5C31174E2DB00F3579B /* queue.c */; };
+		9D65E8BB11762CBC00F3579B /* sra.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5DA1174E2DB00F3579B /* sra.c */; };
+		9D65E8BC11762CBC00F3579B /* stbarrier.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5E41174E2DB00F3579B /* stbarrier.c */; };
+		9D65E8BD11762CBD00F3579B /* stcond.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5E51174E2DB00F3579B /* stcond.c */; };
+		9D65E8BE11762CBE00F3579B /* stlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5E61174E2DB00F3579B /* stlock.c */; };
+		9D65E8BF11762CBE00F3579B /* stsem.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5E71174E2DB00F3579B /* stsem.c */; };
+		9D65E8C011762CBF00F3579B /* stthread.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5E81174E2DB00F3579B /* stthread.c */; };
+		9D65E8C111762CBF00F3579B /* sttimeout.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5E91174E2DB00F3579B /* sttimeout.c */; };
+		9D65E8C211762CC000F3579B /* subfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5DB1174E2DB00F3579B /* subfile.c */; };
+		9D65E8C311762CC000F3579B /* symtab.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5EF1174E2DB00F3579B /* symtab.c */; };
+		9D65E8C411762CC100F3579B /* sysdir.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5CB1174E2DB00F3579B /* sysdir.c */; };
+		9D65E8C511762CC200F3579B /* sysdll.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5CC1174E2DB00F3579B /* sysdll.c */; };
+		9D65E8C611762CC300F3579B /* sysfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5CD1174E2DB00F3579B /* sysfile.c */; };
+		9D65E8C711762CC300F3579B /* sysmmap.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5CE1174E2DB00F3579B /* sysmmap.c */; };
+		9D65E8C811762CC400F3579B /* tar.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5DC1174E2DB00F3579B /* tar.c */; };
+		9D65E8C911762CC500F3579B /* teefile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5DD1174E2DB00F3579B /* teefile.c */; };
+		9D65E8CA11762CC500F3579B /* text.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5F01174E2DB00F3579B /* text.c */; };
+		9D65E8CB11762CC600F3579B /* toc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5DE1174E2DB00F3579B /* toc.c */; };
+		9D65E8CC11762CC600F3579B /* tocdir.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5DF1174E2DB00F3579B /* tocdir.c */; };
+		9D65E8CD11762CC700F3579B /* tocentry.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5E01174E2DB00F3579B /* tocentry.c */; };
+		9D65E8CE11762CC700F3579B /* tocfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5E11174E2DB00F3579B /* tocfile.c */; };
+		9D65E8CF11762CC800F3579B /* token.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5F11174E2DB00F3579B /* token.c */; };
+		9D65E8D011762CCA00F3579B /* trie.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5C41174E2DB00F3579B /* trie.c */; };
+		9D65E8D111762CCA00F3579B /* utf8.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5F21174E2DB00F3579B /* utf8.c */; };
+		9D65E8D211762CCB00F3579B /* vector.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5C61174E2DB00F3579B /* vector.c */; };
+		9D65E8D311762CCB00F3579B /* xml.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5F51174E2DB00F3579B /* xml.c */; };
+		9D65E8D711762D1600F3579B /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E5B41174E2D100F3579B /* libz.dylib */; };
+		9D65E8D811762D1E00F3579B /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E5B51174E2D100F3579B /* libbz2.dylib */; };
+		9D65E8D911762D2200F3579B /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E5B61174E2D100F3579B /* libxml2.dylib */; };
+		9D65E90011762F2900F3579B /* log.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E77A1174E6F000F3579B /* log.c */; };
+		9D65E90111762F2A00F3579B /* syslog.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7841174E6FA00F3579B /* syslog.c */; };
+		9D65E90211762F2A00F3579B /* text-log.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E77E1174E6F000F3579B /* text-log.c */; };
+		9D65E90811762F6800F3579B /* rc-tbl.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E77D1174E6F000F3579B /* rc-tbl.c */; };
+		9D65E90B11762F8200F3579B /* rc-idx-tbl.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E77C1174E6F000F3579B /* rc-idx-tbl.c */; };
+		9D65E9131176300200F3579B /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E77B1174E6F000F3579B /* main.c */; };
+		9D65E9141176300300F3579B /* sysmain.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7851174E6FA00F3579B /* sysmain.c */; };
+		9D65E9401176309200F3579B /* coldata.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6211174E2DB00F3579B /* coldata.c */; };
+		9D65E9411176309200F3579B /* colidx.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6221174E2DB00F3579B /* colidx.c */; };
+		9D65E9421176309200F3579B /* colidx0.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6231174E2DB00F3579B /* colidx0.c */; };
+		9D65E9431176309300F3579B /* colidx1.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6241174E2DB00F3579B /* colidx1.c */; };
+		9D65E9441176309400F3579B /* colidx2.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6251174E2DB00F3579B /* colidx2.c */; };
+		9D65E9451176309400F3579B /* column.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6261174E2DB00F3579B /* column.c */; };
+		9D65E9461176309500F3579B /* database.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6271174E2DB00F3579B /* database.c */; };
+		9D65E9471176309500F3579B /* dbmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6281174E2DB00F3579B /* dbmgr.c */; };
+		9D65E9481176309600F3579B /* idxblk.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6291174E2DB00F3579B /* idxblk.c */; };
+		9D65E9491176309600F3579B /* index.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E62A1174E2DB00F3579B /* index.c */; };
+		9D65E94A1176309700F3579B /* kdb.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E62B1174E2DB00F3579B /* kdb.c */; };
+		9D65E94B1176309800F3579B /* meta.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E62C1174E2DB00F3579B /* meta.c */; };
+		9D65E94C1176309900F3579B /* table.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E62D1174E2DB00F3579B /* table.c */; };
+		9D65E94D1176309900F3579B /* trieidx-v1.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E62E1174E2DB00F3579B /* trieidx-v1.c */; };
+		9D65E94E1176309A00F3579B /* trieidx-v2.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E62F1174E2DB00F3579B /* trieidx-v2.c */; };
+		9D65E94F1176309B00F3579B /* u64idx-v3.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6301174E2DB00F3579B /* u64idx-v3.c */; };
+		9D65E96C117630B300F3579B /* idxblk.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6291174E2DB00F3579B /* idxblk.c */; };
+		9D65E974117630B300F3579B /* wcoldata.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6311174E2DB00F3579B /* wcoldata.c */; };
+		9D65E975117630B300F3579B /* wcolidx.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6321174E2DB00F3579B /* wcolidx.c */; };
+		9D65E976117630B300F3579B /* wcolidx0.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6331174E2DB00F3579B /* wcolidx0.c */; };
+		9D65E977117630B300F3579B /* wcolidx1.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6341174E2DB00F3579B /* wcolidx1.c */; };
+		9D65E978117630B300F3579B /* wcolidx2.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6351174E2DB00F3579B /* wcolidx2.c */; };
+		9D65E979117630B300F3579B /* wcolumn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6361174E2DB00F3579B /* wcolumn.c */; };
+		9D65E97A117630B300F3579B /* wdatabase.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6371174E2DB00F3579B /* wdatabase.c */; };
+		9D65E97B117630B300F3579B /* wdbmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6381174E2DB00F3579B /* wdbmgr.c */; };
+		9D65E97C117630B300F3579B /* widxblk.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6391174E2DB00F3579B /* widxblk.c */; };
+		9D65E97D117630B300F3579B /* windex.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E63A1174E2DB00F3579B /* windex.c */; };
+		9D65E97E117630B300F3579B /* wkdb.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E63B1174E2DB00F3579B /* wkdb.c */; };
+		9D65E97F117630B300F3579B /* wmeta.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E63C1174E2DB00F3579B /* wmeta.c */; };
+		9D65E980117630B300F3579B /* wtable.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E63D1174E2DB00F3579B /* wtable.c */; };
+		9D65E981117630B300F3579B /* wtrieidx-v1.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E63E1174E2DB00F3579B /* wtrieidx-v1.c */; };
+		9D65E982117630B300F3579B /* wtrieidx-v2.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E63F1174E2DB00F3579B /* wtrieidx-v2.c */; };
+		9D65E983117630B300F3579B /* wu64idx-v3.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6401174E2DB00F3579B /* wu64idx-v3.c */; };
+		9D65E9AC1176312E00F3579B /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E89E11762C8900F3579B /* libklib.dylib */; };
+		9D65E9B1117631C700F3579B /* pack.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6011174E2DB00F3579B /* pack.c */; };
+		9D65E9B2117631CC00F3579B /* unpack.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6071174E2DB00F3579B /* unpack.c */; };
+		9D65E9DB1176327200F3579B /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E89E11762C8900F3579B /* libklib.dylib */; };
+		9D65E9EA117632F500F3579B /* blob.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E60A1174E2DB00F3579B /* blob.c */; };
+		9D65E9EB117632F600F3579B /* column-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E60B1174E2DB00F3579B /* column-cmn.c */; };
+		9D65E9EC117632F600F3579B /* column.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E60C1174E2DB00F3579B /* column.c */; };
+		9D65E9ED117632F700F3579B /* cursor-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E60D1174E2DB00F3579B /* cursor-cmn.c */; settings = {COMPILER_FLAGS = "-DVCursorWhack=VCursorDestroy"; }; };
+		9D65E9EE117632F700F3579B /* database.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E60E1174E2DB00F3579B /* database.c */; };
+		9D65E9EF117632F800F3579B /* dbmgr-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E60F1174E2DB00F3579B /* dbmgr-cmn.c */; };
+		9D65E9F0117632F800F3579B /* dbmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6101174E2DB00F3579B /* dbmgr.c */; };
+		9D65E9F1117632F900F3579B /* dtype.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6111174E2DB00F3579B /* dtype.c */; };
+		9D65E9F2117632F900F3579B /* loader.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6121174E2DB00F3579B /* loader.c */; };
+		9D65E9F3117632FA00F3579B /* parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6131174E2DB00F3579B /* parse.c */; };
+		9D65E9F4117632FB00F3579B /* schema-dump.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6141174E2DB00F3579B /* schema-dump.c */; };
+		9D65E9F5117632FB00F3579B /* schema.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6151174E2DB00F3579B /* schema.c */; };
+		9D65E9F7117632FD00F3579B /* table-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6171174E2DB00F3579B /* table-cmn.c */; };
+		9D65E9F8117632FD00F3579B /* table.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6181174E2DB00F3579B /* table.c */; };
+		9D65E9FE1176330000F3579B /* xform.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E61E1174E2DB00F3579B /* xform.c */; };
+		9D65E9FF1176330100F3579B /* xfuncs.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E61F1174E2DB00F3579B /* xfuncs.c */; };
+		9D65EA041176330D00F3579B /* blob.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E60A1174E2DB00F3579B /* blob.c */; };
+		9D65EA051176330D00F3579B /* column-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E60B1174E2DB00F3579B /* column-cmn.c */; };
+		9D65EA071176330D00F3579B /* cursor-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E60D1174E2DB00F3579B /* cursor-cmn.c */; };
+		9D65EA081176330D00F3579B /* database.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E60E1174E2DB00F3579B /* database.c */; };
+		9D65EA091176330D00F3579B /* dbmgr-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E60F1174E2DB00F3579B /* dbmgr-cmn.c */; };
+		9D65EA0B1176330D00F3579B /* dtype.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6111174E2DB00F3579B /* dtype.c */; };
+		9D65EA0C1176330D00F3579B /* loader.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6121174E2DB00F3579B /* loader.c */; };
+		9D65EA0D1176330D00F3579B /* parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6131174E2DB00F3579B /* parse.c */; };
+		9D65EA0E1176330D00F3579B /* schema-dump.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6141174E2DB00F3579B /* schema-dump.c */; };
+		9D65EA0F1176330D00F3579B /* schema.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6151174E2DB00F3579B /* schema.c */; };
+		9D65EA101176330D00F3579B /* static-column-temp.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6161174E2DB00F3579B /* static-column-temp.c */; };
+		9D65EA111176330D00F3579B /* table-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6171174E2DB00F3579B /* table-cmn.c */; };
+		9D65EA131176330D00F3579B /* wcolumn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6191174E2DB00F3579B /* wcolumn.c */; };
+		9D65EA141176330D00F3579B /* wcursor.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E61A1174E2DB00F3579B /* wcursor.c */; };
+		9D65EA151176330D00F3579B /* wdatabase.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E61B1174E2DB00F3579B /* wdatabase.c */; };
+		9D65EA161176330D00F3579B /* wdbmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E61C1174E2DB00F3579B /* wdbmgr.c */; };
+		9D65EA171176330D00F3579B /* wtable.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E61D1174E2DB00F3579B /* wtable.c */; };
+		9D65EA181176330D00F3579B /* xform.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E61E1174E2DB00F3579B /* xform.c */; };
+		9D65EA191176330D00F3579B /* xfuncs.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E61F1174E2DB00F3579B /* xfuncs.c */; };
+		9D65EA271176335200F3579B /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E89E11762C8900F3579B /* libklib.dylib */; };
+		9D65EA2A1176335C00F3579B /* libwkdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E988117630B300F3579B /* libwkdb.dylib */; };
+		9D65EA3F1176337C00F3579B /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E5B41174E2D100F3579B /* libz.dylib */; };
+		9D65EA5C117633C600F3579B /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E89E11762C8900F3579B /* libklib.dylib */; };
+		9D65EA5D117633C900F3579B /* libkdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E91D1176303D00F3579B /* libkdb.dylib */; };
+		9D65EA641176340100F3579B /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E5B41174E2D100F3579B /* libz.dylib */; };
+		9D65EA941176366D00F3579B /* libwvdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65EA1E1176330D00F3579B /* libwvdb.dylib */; };
+		9D65EA951176367400F3579B /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E89E11762C8900F3579B /* libklib.dylib */; };
+		9D65EA961176367600F3579B /* libkdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E91D1176303D00F3579B /* libkdb.dylib */; };
+		9D65EA971176367900F3579B /* libvdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E9E7117632C800F3579B /* libvdb.dylib */; };
+		9D65EA981176368800F3579B /* legvcol.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6FF1174E54800F3579B /* legvcol.c */; };
+		9D65EA9B1176368A00F3579B /* sra_decompress.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7011174E54800F3579B /* sra_decompress.c */; };
+		9D65EA9C1176368A00F3579B /* sra_decompress_init.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7001174E54800F3579B /* sra_decompress_init.c */; };
+		9D65EA9D1176368B00F3579B /* sracol-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7071174E56300F3579B /* sracol-cmn.c */; };
+		9D65EA9E1176368B00F3579B /* sracol.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7081174E56300F3579B /* sracol.c */; };
+		9D65EA9F1176368C00F3579B /* sraerr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7091174E56300F3579B /* sraerr.c */; };
+		9D65EAA21176368D00F3579B /* sranam.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E70C1174E56300F3579B /* sranam.c */; };
+		9D65EAA31176368E00F3579B /* sraschema.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E70D1174E56300F3579B /* sraschema.c */; };
+		9D65EAA41176368E00F3579B /* sratbl-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E70E1174E56300F3579B /* sratbl-cmn.c */; };
+		9D65EAA51176368F00F3579B /* sratbl.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E70F1174E56300F3579B /* sratbl.c */; };
+		9D65EAAA1176369600F3579B /* clip_quality_right.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7391174E60300F3579B /* clip_quality_right.c */; };
+		9D65EAAB1176369600F3579B /* color-space.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E73A1174E60300F3579B /* color-space.c */; };
+		9D65EAAC1176369600F3579B /* delta-log-delta.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E73B1174E60300F3579B /* delta-log-delta.c */; };
+		9D65EAAD1176369700F3579B /* intensity-norm.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E73C1174E60300F3579B /* intensity-norm.c */; };
+		9D65EAAE1176369700F3579B /* nencode.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E73D1174E60300F3579B /* nencode.c */; };
+		9D65EAAF1176369800F3579B /* phred-from-qval.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E73E1174E60300F3579B /* phred-from-qval.c */; };
+		9D65EAB01176369800F3579B /* platform_name.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E73F1174E60300F3579B /* platform_name.c */; };
+		9D65EAB11176369900F3579B /* position.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7401174E60300F3579B /* position.c */; };
+		9D65EAB21176369900F3579B /* prob.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7411174E60300F3579B /* prob.c */; };
+		9D65EAB31176369A00F3579B /* ptranspose.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7421174E60300F3579B /* ptranspose.c */; };
+		9D65EAB41176369A00F3579B /* qual4_codec.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7431174E60300F3579B /* qual4_codec.c */; };
+		9D65EAB51176369B00F3579B /* quality.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7441174E60300F3579B /* quality.c */; };
+		9D65EAB61176369B00F3579B /* read-desc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7461174E60300F3579B /* read-desc.c */; };
+		9D65EAB71176369C00F3579B /* read2na.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7471174E60300F3579B /* read2na.c */; };
+		9D65EAB81176369C00F3579B /* read4na.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7481174E60300F3579B /* read4na.c */; };
+		9D65EAB91176369D00F3579B /* read_struct.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7451174E60300F3579B /* read_struct.c */; };
+		9D65EABA1176369D00F3579B /* readFasta.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7491174E60300F3579B /* readFasta.c */; };
+		9D65EABB1176369E00F3579B /* reorder.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E74A1174E60300F3579B /* reorder.c */; };
+		9D65EABC1176369F00F3579B /* rotate.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E74B1174E60300F3579B /* rotate.c */; };
+		9D65EABD1176369F00F3579B /* sort-order.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E74C1174E60300F3579B /* sort-order.c */; };
+		9D65EABE117636A000F3579B /* swap.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E74D1174E60300F3579B /* swap.c */; };
+		9D65EABF117636A000F3579B /* validate.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E74E1174E60300F3579B /* validate.c */; };
+		9D65EAC2117636AC00F3579B /* nucstrstr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7681174E61D00F3579B /* nucstrstr.c */; };
+		9D65EAC3117636AF00F3579B /* srapath.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7751174E6BA00F3579B /* srapath.c */; };
+		9D65EAC9117636BD00F3579B /* legvcol.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6FF1174E54800F3579B /* legvcol.c */; };
+		9D65EACB117636BD00F3579B /* ncbi-wsramgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7061174E56300F3579B /* ncbi-wsramgr.c */; };
+		9D65EACC117636BD00F3579B /* sra_decompress.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7011174E54800F3579B /* sra_decompress.c */; };
+		9D65EACD117636BD00F3579B /* sra_decompress_init.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7001174E54800F3579B /* sra_decompress_init.c */; };
+		9D65EACE117636BD00F3579B /* sracol-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7071174E56300F3579B /* sracol-cmn.c */; };
+		9D65EAD0117636BD00F3579B /* sraerr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7091174E56300F3579B /* sraerr.c */; };
+		9D65EAD1117636BD00F3579B /* sramgr-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E70A1174E56300F3579B /* sramgr-cmn.c */; };
+		9D65EAD3117636BD00F3579B /* sranam.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E70C1174E56300F3579B /* sranam.c */; };
+		9D65EAD5117636BD00F3579B /* sratbl-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E70E1174E56300F3579B /* sratbl-cmn.c */; };
+		9D65EAD7117636BD00F3579B /* wsracol.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7101174E56300F3579B /* wsracol.c */; };
+		9D65EAD9117636BD00F3579B /* wsraschema.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7121174E56300F3579B /* wsraschema.c */; };
+		9D65EADA117636BD00F3579B /* wsratbl.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7131174E56300F3579B /* wsratbl.c */; };
+		9D65EADB117636BD00F3579B /* clip_quality_right.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7391174E60300F3579B /* clip_quality_right.c */; };
+		9D65EADC117636BD00F3579B /* color-space.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E73A1174E60300F3579B /* color-space.c */; };
+		9D65EADD117636BD00F3579B /* delta-log-delta.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E73B1174E60300F3579B /* delta-log-delta.c */; };
+		9D65EADE117636BD00F3579B /* intensity-norm.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E73C1174E60300F3579B /* intensity-norm.c */; };
+		9D65EADF117636BD00F3579B /* nencode.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E73D1174E60300F3579B /* nencode.c */; };
+		9D65EAE0117636BD00F3579B /* phred-from-qval.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E73E1174E60300F3579B /* phred-from-qval.c */; };
+		9D65EAE1117636BD00F3579B /* platform_name.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E73F1174E60300F3579B /* platform_name.c */; };
+		9D65EAE2117636BD00F3579B /* position.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7401174E60300F3579B /* position.c */; };
+		9D65EAE3117636BD00F3579B /* prob.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7411174E60300F3579B /* prob.c */; };
+		9D65EAE4117636BD00F3579B /* ptranspose.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7421174E60300F3579B /* ptranspose.c */; };
+		9D65EAE5117636BD00F3579B /* qual4_codec.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7431174E60300F3579B /* qual4_codec.c */; };
+		9D65EAE6117636BD00F3579B /* quality.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7441174E60300F3579B /* quality.c */; };
+		9D65EAE7117636BD00F3579B /* read-desc.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7461174E60300F3579B /* read-desc.c */; };
+		9D65EAE8117636BD00F3579B /* read2na.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7471174E60300F3579B /* read2na.c */; };
+		9D65EAE9117636BD00F3579B /* read4na.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7481174E60300F3579B /* read4na.c */; };
+		9D65EAEA117636BD00F3579B /* read_struct.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7451174E60300F3579B /* read_struct.c */; };
+		9D65EAEB117636BD00F3579B /* readFasta.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7491174E60300F3579B /* readFasta.c */; };
+		9D65EAEC117636BD00F3579B /* reorder.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E74A1174E60300F3579B /* reorder.c */; };
+		9D65EAED117636BD00F3579B /* rotate.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E74B1174E60300F3579B /* rotate.c */; };
+		9D65EAEE117636BD00F3579B /* sort-order.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E74C1174E60300F3579B /* sort-order.c */; };
+		9D65EAEF117636BD00F3579B /* swap.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E74D1174E60300F3579B /* swap.c */; };
+		9D65EAF0117636BD00F3579B /* validate.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E74E1174E60300F3579B /* validate.c */; };
+		9D65EAF1117636BD00F3579B /* nucstrstr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7681174E61D00F3579B /* nucstrstr.c */; };
+		9D65EAF2117636BD00F3579B /* srapath.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E7751174E6BA00F3579B /* srapath.c */; };
+		9D65EAF4117636BD00F3579B /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E89E11762C8900F3579B /* libklib.dylib */; };
+		9D65EB031176372D00F3579B /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E5B41174E2D100F3579B /* libz.dylib */; };
+		9D65EB061176376D00F3579B /* sraschema.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E70D1174E56300F3579B /* sraschema.c */; };
+		9D65EB0B117637AF00F3579B /* libwvdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65EA1E1176330D00F3579B /* libwvdb.dylib */; };
+		9D65EB0E117637B700F3579B /* libwkdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E988117630B300F3579B /* libwkdb.dylib */; };
+		9D65EB11117637C200F3579B /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E5B41174E2D100F3579B /* libz.dylib */; };
+		9D65EB2A1176397E00F3579B /* sramgr-cmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E70A1174E56300F3579B /* sramgr-cmn.c */; };
+		9D65EB2B1176397E00F3579B /* sramgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E70B1174E56300F3579B /* sramgr.c */; };
+		9D65EB401176437700F3579B /* libwsra.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65EAFA117636BD00F3579B /* libwsra.dylib */; };
+		9D65EBC611764AA500F3579B /* libwkdb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E988117630B300F3579B /* libwkdb.dylib */; };
+		9D65EBC911764AAE00F3579B /* libklib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65E89E11762C8900F3579B /* libklib.dylib */; };
+		9D65EBD211764BB900F3579B /* echo.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5F71174E2DB00F3579B /* echo.c */; };
+		9D65EBD311764BB900F3579B /* factories.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5F81174E2DB00F3579B /* factories.c */; };
+		9D65EBD411764BBA00F3579B /* floor.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5F91174E2DB00F3579B /* floor.c */; };
+		9D65EBD511764BBA00F3579B /* fpcodec.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5FA1174E2DB00F3579B /* fpcodec.c */; };
+		9D65EBD611764BBB00F3579B /* hufDecode.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5FB1174E2DB00F3579B /* hufDecode.c */; };
+		9D65EBD711764BBB00F3579B /* hufEncode.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5FC1174E2DB00F3579B /* hufEncode.c */; };
+		9D65EBD811764BBC00F3579B /* hufTable.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5FD1174E2DB00F3579B /* hufTable.c */; };
+		9D65EBD911764BBC00F3579B /* hufZlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5FE1174E2DB00F3579B /* hufZlib.c */; };
+		9D65EBDA11764BBD00F3579B /* muxing.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E5FF1174E2DB00F3579B /* muxing.c */; };
+		9D65EBDB11764BBD00F3579B /* null-row.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6001174E2DB00F3579B /* null-row.c */; };
+		9D65EBDC11764BBE00F3579B /* parse_args.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6021174E2DB00F3579B /* parse_args.c */; };
+		9D65EBDD11764BBF00F3579B /* rleDecode.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6031174E2DB00F3579B /* rleDecode.c */; };
+		9D65EBDE11764BBF00F3579B /* rleEncode.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6041174E2DB00F3579B /* rleEncode.c */; };
+		9D65EBDF11764BC000F3579B /* row-len.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6051174E2DB00F3579B /* row-len.c */; };
+		9D65EBE011764BC000F3579B /* transpose.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6061174E2DB00F3579B /* transpose.c */; };
+		9D65EBE111764BC100F3579B /* validate.c in Sources */ = {isa = PBXBuildFile; fileRef = 9D65E6081174E2DB00F3579B /* validate.c */; };
+		9D65EBE211764BD200F3579B /* xform.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65EBCF11764B8200F3579B /* xform.o */; };
+		9D65EBE311764BD600F3579B /* xform.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D65EBCF11764B8200F3579B /* xform.o */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		9D1A14C5119D93DF00EF212F /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D65E89D11762C8900F3579B;
+			remoteInfo = klib;
+		};
+		9D65EBA2117649C100F3579B /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D65EA011176330D00F3579B;
+			remoteInfo = wvdb;
+		};
+		9D65EBA4117649C100F3579B /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D65EAC6117636BD00F3579B;
+			remoteInfo = wsra;
+		};
+		9D65EBAC11764A0A00F3579B /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D65E89D11762C8900F3579B;
+			remoteInfo = klib;
+		};
+		9D65EBAE11764A1A00F3579B /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D65E89D11762C8900F3579B;
+			remoteInfo = klib;
+		};
+		9D65EBB011764A2700F3579B /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D65E9E6117632C800F3579B;
+			remoteInfo = vdb;
+		};
+		9D65EBB211764A2800F3579B /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D65EA011176330D00F3579B;
+			remoteInfo = wvdb;
+		};
+		9D65EBB411764A3100F3579B /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D65E91C1176303D00F3579B;
+			remoteInfo = kdb;
+		};
+		9D65EBB611764A3600F3579B /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D65E961117630B300F3579B;
+			remoteInfo = wkdb;
+		};
+		9D65EBE611764BEA00F3579B /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D65EBCE11764B8200F3579B;
+			remoteInfo = xform;
+		};
+		9D65EBE811764BEC00F3579B /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 9D65EBCE11764B8200F3579B;
+			remoteInfo = xform;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+		8DD76FAF0486AB0100D96B5E /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 8;
+			dstPath = /usr/share/man/man1/;
+			dstSubfolderSpec = 0;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 1;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+		8DD76FB20486AB0100D96B5E /* sra2kdb */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = sra2kdb; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D1A14A7119D921100EF212F /* align-access.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "align-access.c"; path = "../../../assembly/api/align-access.c"; sourceTree = SOURCE_ROOT; };
+		9D1A14A8119D922100EF212F /* BAMFile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = BAMFile.c; path = ../../../assembly/fmt/BAMFile.c; sourceTree = SOURCE_ROOT; };
+		9D1A14AB119D931800EF212F /* bamtest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bamtest.c; path = ../../../assembly/test/bamtest.c; sourceTree = SOURCE_ROOT; };
+		9D1A14B1119D932A00EF212F /* bam-test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "bam-test"; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D65E5A91174E29F00F3579B /* sra2kdb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sra2kdb.c; path = ../../../sra/tools/sra2kdb.c; sourceTree = SOURCE_ROOT; };
+		9D65E5B41174E2D100F3579B /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
+		9D65E5B51174E2D100F3579B /* libbz2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libbz2.dylib; path = usr/lib/libbz2.dylib; sourceTree = SDKROOT; };
+		9D65E5B61174E2D100F3579B /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
+		9D65E5BD1174E2DB00F3579B /* bstpersist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bstpersist.c; path = ../../../klib/cont/bstpersist.c; sourceTree = SOURCE_ROOT; };
+		9D65E5BE1174E2DB00F3579B /* container.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = container.c; path = ../../../klib/cont/container.c; sourceTree = SOURCE_ROOT; };
+		9D65E5BF1174E2DB00F3579B /* namelist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = namelist.c; path = ../../../klib/cont/namelist.c; sourceTree = SOURCE_ROOT; };
+		9D65E5C01174E2DB00F3579B /* pbstree.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pbstree.c; path = ../../../klib/cont/pbstree.c; sourceTree = SOURCE_ROOT; };
+		9D65E5C11174E2DB00F3579B /* ptpersist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ptpersist.c; path = ../../../klib/cont/ptpersist.c; sourceTree = SOURCE_ROOT; };
+		9D65E5C21174E2DB00F3579B /* ptrie.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ptrie.c; path = ../../../klib/cont/ptrie.c; sourceTree = SOURCE_ROOT; };
+		9D65E5C31174E2DB00F3579B /* queue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = queue.c; path = ../../../klib/cont/queue.c; sourceTree = SOURCE_ROOT; };
+		9D65E5C41174E2DB00F3579B /* trie.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = trie.c; path = ../../../klib/cont/trie.c; sourceTree = SOURCE_ROOT; };
+		9D65E5C61174E2DB00F3579B /* vector.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vector.c; path = ../../../klib/cont/vector.c; sourceTree = SOURCE_ROOT; };
+		9D65E5C81174E2DB00F3579B /* crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = crc32.c; path = ../../../klib/cs/crc32.c; sourceTree = SOURCE_ROOT; };
+		9D65E5C91174E2DB00F3579B /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5.c; path = ../../../klib/cs/md5.c; sourceTree = SOURCE_ROOT; };
+		9D65E5CB1174E2DB00F3579B /* sysdir.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sysdir.c; path = ../../../klib/fs/unix/sysdir.c; sourceTree = SOURCE_ROOT; };
+		9D65E5CC1174E2DB00F3579B /* sysdll.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sysdll.c; path = ../../../klib/fs/unix/sysdll.c; sourceTree = SOURCE_ROOT; };
+		9D65E5CD1174E2DB00F3579B /* sysfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sysfile.c; path = ../../../klib/fs/unix/sysfile.c; sourceTree = SOURCE_ROOT; };
+		9D65E5CE1174E2DB00F3579B /* sysmmap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sysmmap.c; path = ../../../klib/fs/unix/sysmmap.c; sourceTree = SOURCE_ROOT; };
+		9D65E5CF1174E2DB00F3579B /* arc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = arc.c; path = ../../../klib/fs/arc.c; sourceTree = SOURCE_ROOT; };
+		9D65E5D01174E2DB00F3579B /* buffile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = buffile.c; path = ../../../klib/fs/buffile.c; sourceTree = SOURCE_ROOT; };
+		9D65E5D11174E2DB00F3579B /* bzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bzip.c; path = ../../../klib/fs/bzip.c; sourceTree = SOURCE_ROOT; };
+		9D65E5D21174E2DB00F3579B /* countfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = countfile.c; path = ../../../klib/fs/countfile.c; sourceTree = SOURCE_ROOT; };
+		9D65E5D31174E2DB00F3579B /* crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = crc32.c; path = ../../../klib/fs/crc32.c; sourceTree = SOURCE_ROOT; };
+		9D65E5D41174E2DB00F3579B /* dir_test.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dir_test.c; path = ../../../klib/fs/dir_test.c; sourceTree = SOURCE_ROOT; };
+		9D65E5D51174E2DB00F3579B /* directory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = directory.c; path = ../../../klib/fs/directory.c; sourceTree = SOURCE_ROOT; };
+		9D65E5D61174E2DB00F3579B /* file.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = file.c; path = ../../../klib/fs/file.c; sourceTree = SOURCE_ROOT; };
+		9D65E5D71174E2DB00F3579B /* gzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gzip.c; path = ../../../klib/fs/gzip.c; sourceTree = SOURCE_ROOT; };
+		9D65E5D81174E2DB00F3579B /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5.c; path = ../../../klib/fs/md5.c; sourceTree = SOURCE_ROOT; };
+		9D65E5D91174E2DB00F3579B /* nullfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = nullfile.c; path = ../../../klib/fs/nullfile.c; sourceTree = SOURCE_ROOT; };
+		9D65E5DA1174E2DB00F3579B /* sra.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sra.c; path = ../../../klib/fs/sra.c; sourceTree = SOURCE_ROOT; };
+		9D65E5DB1174E2DB00F3579B /* subfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = subfile.c; path = ../../../klib/fs/subfile.c; sourceTree = SOURCE_ROOT; };
+		9D65E5DC1174E2DB00F3579B /* tar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tar.c; path = ../../../klib/fs/tar.c; sourceTree = SOURCE_ROOT; };
+		9D65E5DD1174E2DB00F3579B /* teefile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = teefile.c; path = ../../../klib/fs/teefile.c; sourceTree = SOURCE_ROOT; };
+		9D65E5DE1174E2DB00F3579B /* toc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = toc.c; path = ../../../klib/fs/toc.c; sourceTree = SOURCE_ROOT; };
+		9D65E5DF1174E2DB00F3579B /* tocdir.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tocdir.c; path = ../../../klib/fs/tocdir.c; sourceTree = SOURCE_ROOT; };
+		9D65E5E01174E2DB00F3579B /* tocentry.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tocentry.c; path = ../../../klib/fs/tocentry.c; sourceTree = SOURCE_ROOT; };
+		9D65E5E11174E2DB00F3579B /* tocfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tocfile.c; path = ../../../klib/fs/tocfile.c; sourceTree = SOURCE_ROOT; };
+		9D65E5E31174E2DB00F3579B /* sem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sem.c; path = ../../../klib/proc/sem.c; sourceTree = SOURCE_ROOT; };
+		9D65E5E41174E2DB00F3579B /* stbarrier.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stbarrier.c; path = ../../../klib/proc/stbarrier.c; sourceTree = SOURCE_ROOT; };
+		9D65E5E51174E2DB00F3579B /* stcond.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stcond.c; path = ../../../klib/proc/stcond.c; sourceTree = SOURCE_ROOT; };
+		9D65E5E61174E2DB00F3579B /* stlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stlock.c; path = ../../../klib/proc/stlock.c; sourceTree = SOURCE_ROOT; };
+		9D65E5E71174E2DB00F3579B /* stsem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stsem.c; path = ../../../klib/proc/stsem.c; sourceTree = SOURCE_ROOT; };
+		9D65E5E81174E2DB00F3579B /* stthread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stthread.c; path = ../../../klib/proc/stthread.c; sourceTree = SOURCE_ROOT; };
+		9D65E5E91174E2DB00F3579B /* sttimeout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sttimeout.c; path = ../../../klib/proc/sttimeout.c; sourceTree = SOURCE_ROOT; };
+		9D65E5EB1174E2DB00F3579B /* ascii.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ascii.c; path = ../../../klib/txt/unix/ascii.c; sourceTree = SOURCE_ROOT; };
+		9D65E5EC1174E2DB00F3579B /* cp1252.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cp1252.c; path = ../../../klib/txt/cp1252.c; sourceTree = SOURCE_ROOT; };
+		9D65E5ED1174E2DB00F3579B /* iso8859-1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "iso8859-1.c"; path = "../../../klib/txt/iso8859-1.c"; sourceTree = SOURCE_ROOT; };
+		9D65E5EE1174E2DB00F3579B /* iso8859.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = iso8859.c; path = ../../../klib/txt/iso8859.c; sourceTree = SOURCE_ROOT; };
+		9D65E5EF1174E2DB00F3579B /* symtab.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = symtab.c; path = ../../../klib/txt/symtab.c; sourceTree = SOURCE_ROOT; };
+		9D65E5F01174E2DB00F3579B /* text.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = text.c; path = ../../../klib/txt/text.c; sourceTree = SOURCE_ROOT; };
+		9D65E5F11174E2DB00F3579B /* token.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = token.c; path = ../../../klib/txt/token.c; sourceTree = SOURCE_ROOT; };
+		9D65E5F21174E2DB00F3579B /* utf8.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = utf8.c; path = ../../../klib/txt/utf8.c; sourceTree = SOURCE_ROOT; };
+		9D65E5F51174E2DB00F3579B /* xml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xml.c; path = ../../../klib/xml/xml.c; sourceTree = SOURCE_ROOT; };
+		9D65E5F71174E2DB00F3579B /* echo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = echo.c; path = ../../../klib/xform/echo.c; sourceTree = SOURCE_ROOT; };
+		9D65E5F81174E2DB00F3579B /* factories.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = factories.c; path = ../../../klib/xform/factories.c; sourceTree = SOURCE_ROOT; };
+		9D65E5F91174E2DB00F3579B /* floor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = floor.c; path = ../../../klib/xform/floor.c; sourceTree = SOURCE_ROOT; };
+		9D65E5FA1174E2DB00F3579B /* fpcodec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = fpcodec.c; path = ../../../klib/xform/fpcodec.c; sourceTree = SOURCE_ROOT; };
+		9D65E5FB1174E2DB00F3579B /* hufDecode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = hufDecode.c; path = ../../../klib/xform/hufDecode.c; sourceTree = SOURCE_ROOT; };
+		9D65E5FC1174E2DB00F3579B /* hufEncode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = hufEncode.c; path = ../../../klib/xform/hufEncode.c; sourceTree = SOURCE_ROOT; };
+		9D65E5FD1174E2DB00F3579B /* hufTable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = hufTable.c; path = ../../../klib/xform/hufTable.c; sourceTree = SOURCE_ROOT; };
+		9D65E5FE1174E2DB00F3579B /* hufZlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = hufZlib.c; path = ../../../klib/xform/hufZlib.c; sourceTree = SOURCE_ROOT; };
+		9D65E5FF1174E2DB00F3579B /* muxing.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = muxing.c; path = ../../../klib/xform/muxing.c; sourceTree = SOURCE_ROOT; };
+		9D65E6001174E2DB00F3579B /* null-row.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "null-row.c"; path = "../../../klib/xform/null-row.c"; sourceTree = SOURCE_ROOT; };
+		9D65E6011174E2DB00F3579B /* pack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pack.c; path = ../../../klib/xform/pack.c; sourceTree = SOURCE_ROOT; };
+		9D65E6021174E2DB00F3579B /* parse_args.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = parse_args.c; path = ../../../klib/xform/parse_args.c; sourceTree = SOURCE_ROOT; };
+		9D65E6031174E2DB00F3579B /* rleDecode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rleDecode.c; path = ../../../klib/xform/rleDecode.c; sourceTree = SOURCE_ROOT; };
+		9D65E6041174E2DB00F3579B /* rleEncode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rleEncode.c; path = ../../../klib/xform/rleEncode.c; sourceTree = SOURCE_ROOT; };
+		9D65E6051174E2DB00F3579B /* row-len.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "row-len.c"; path = "../../../klib/xform/row-len.c"; sourceTree = SOURCE_ROOT; };
+		9D65E6061174E2DB00F3579B /* transpose.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = transpose.c; path = ../../../klib/xform/transpose.c; sourceTree = SOURCE_ROOT; };
+		9D65E6071174E2DB00F3579B /* unpack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = unpack.c; path = ../../../klib/xform/unpack.c; sourceTree = SOURCE_ROOT; };
+		9D65E6081174E2DB00F3579B /* validate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = validate.c; path = ../../../klib/xform/validate.c; sourceTree = SOURCE_ROOT; };
+		9D65E60A1174E2DB00F3579B /* blob.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = blob.c; path = ../../../klib/vdb/blob.c; sourceTree = SOURCE_ROOT; };
+		9D65E60B1174E2DB00F3579B /* column-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "column-cmn.c"; path = "../../../klib/vdb/column-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D65E60C1174E2DB00F3579B /* column.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = column.c; path = ../../../klib/vdb/column.c; sourceTree = SOURCE_ROOT; };
+		9D65E60D1174E2DB00F3579B /* cursor-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "cursor-cmn.c"; path = "../../../klib/vdb/cursor-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D65E60E1174E2DB00F3579B /* database.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = database.c; path = ../../../klib/vdb/database.c; sourceTree = SOURCE_ROOT; };
+		9D65E60F1174E2DB00F3579B /* dbmgr-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "dbmgr-cmn.c"; path = "../../../klib/vdb/dbmgr-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D65E6101174E2DB00F3579B /* dbmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dbmgr.c; path = ../../../klib/vdb/dbmgr.c; sourceTree = SOURCE_ROOT; };
+		9D65E6111174E2DB00F3579B /* dtype.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dtype.c; path = ../../../klib/vdb/dtype.c; sourceTree = SOURCE_ROOT; };
+		9D65E6121174E2DB00F3579B /* loader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = loader.c; path = ../../../klib/vdb/loader.c; sourceTree = SOURCE_ROOT; };
+		9D65E6131174E2DB00F3579B /* parse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = parse.c; path = ../../../klib/vdb/parse.c; sourceTree = SOURCE_ROOT; };
+		9D65E6141174E2DB00F3579B /* schema-dump.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "schema-dump.c"; path = "../../../klib/vdb/schema-dump.c"; sourceTree = SOURCE_ROOT; };
+		9D65E6151174E2DB00F3579B /* schema.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = schema.c; path = ../../../klib/vdb/schema.c; sourceTree = SOURCE_ROOT; };
+		9D65E6161174E2DB00F3579B /* static-column-temp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "static-column-temp.c"; path = "../../../klib/vdb/static-column-temp.c"; sourceTree = SOURCE_ROOT; };
+		9D65E6171174E2DB00F3579B /* table-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "table-cmn.c"; path = "../../../klib/vdb/table-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D65E6181174E2DB00F3579B /* table.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = table.c; path = ../../../klib/vdb/table.c; sourceTree = SOURCE_ROOT; };
+		9D65E6191174E2DB00F3579B /* wcolumn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcolumn.c; path = ../../../klib/vdb/wcolumn.c; sourceTree = SOURCE_ROOT; };
+		9D65E61A1174E2DB00F3579B /* wcursor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcursor.c; path = ../../../klib/vdb/wcursor.c; sourceTree = SOURCE_ROOT; };
+		9D65E61B1174E2DB00F3579B /* wdatabase.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wdatabase.c; path = ../../../klib/vdb/wdatabase.c; sourceTree = SOURCE_ROOT; };
+		9D65E61C1174E2DB00F3579B /* wdbmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wdbmgr.c; path = ../../../klib/vdb/wdbmgr.c; sourceTree = SOURCE_ROOT; };
+		9D65E61D1174E2DB00F3579B /* wtable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wtable.c; path = ../../../klib/vdb/wtable.c; sourceTree = SOURCE_ROOT; };
+		9D65E61E1174E2DB00F3579B /* xform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xform.c; path = ../../../klib/vdb/xform.c; sourceTree = SOURCE_ROOT; };
+		9D65E61F1174E2DB00F3579B /* xfuncs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xfuncs.c; path = ../../../klib/vdb/xfuncs.c; sourceTree = SOURCE_ROOT; };
+		9D65E6211174E2DB00F3579B /* coldata.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = coldata.c; path = ../../../klib/db/coldata.c; sourceTree = SOURCE_ROOT; };
+		9D65E6221174E2DB00F3579B /* colidx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = colidx.c; path = ../../../klib/db/colidx.c; sourceTree = SOURCE_ROOT; };
+		9D65E6231174E2DB00F3579B /* colidx0.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = colidx0.c; path = ../../../klib/db/colidx0.c; sourceTree = SOURCE_ROOT; };
+		9D65E6241174E2DB00F3579B /* colidx1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = colidx1.c; path = ../../../klib/db/colidx1.c; sourceTree = SOURCE_ROOT; };
+		9D65E6251174E2DB00F3579B /* colidx2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = colidx2.c; path = ../../../klib/db/colidx2.c; sourceTree = SOURCE_ROOT; };
+		9D65E6261174E2DB00F3579B /* column.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = column.c; path = ../../../klib/db/column.c; sourceTree = SOURCE_ROOT; };
+		9D65E6271174E2DB00F3579B /* database.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = database.c; path = ../../../klib/db/database.c; sourceTree = SOURCE_ROOT; };
+		9D65E6281174E2DB00F3579B /* dbmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dbmgr.c; path = ../../../klib/db/dbmgr.c; sourceTree = SOURCE_ROOT; };
+		9D65E6291174E2DB00F3579B /* idxblk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = idxblk.c; path = ../../../klib/db/idxblk.c; sourceTree = SOURCE_ROOT; };
+		9D65E62A1174E2DB00F3579B /* index.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = index.c; path = ../../../klib/db/index.c; sourceTree = SOURCE_ROOT; };
+		9D65E62B1174E2DB00F3579B /* kdb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = kdb.c; path = ../../../klib/db/kdb.c; sourceTree = SOURCE_ROOT; };
+		9D65E62C1174E2DB00F3579B /* meta.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = meta.c; path = ../../../klib/db/meta.c; sourceTree = SOURCE_ROOT; };
+		9D65E62D1174E2DB00F3579B /* table.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = table.c; path = ../../../klib/db/table.c; sourceTree = SOURCE_ROOT; };
+		9D65E62E1174E2DB00F3579B /* trieidx-v1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "trieidx-v1.c"; path = "../../../klib/db/trieidx-v1.c"; sourceTree = SOURCE_ROOT; };
+		9D65E62F1174E2DB00F3579B /* trieidx-v2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "trieidx-v2.c"; path = "../../../klib/db/trieidx-v2.c"; sourceTree = SOURCE_ROOT; };
+		9D65E6301174E2DB00F3579B /* u64idx-v3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "u64idx-v3.c"; path = "../../../klib/db/u64idx-v3.c"; sourceTree = SOURCE_ROOT; };
+		9D65E6311174E2DB00F3579B /* wcoldata.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcoldata.c; path = ../../../klib/db/wcoldata.c; sourceTree = SOURCE_ROOT; };
+		9D65E6321174E2DB00F3579B /* wcolidx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcolidx.c; path = ../../../klib/db/wcolidx.c; sourceTree = SOURCE_ROOT; };
+		9D65E6331174E2DB00F3579B /* wcolidx0.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcolidx0.c; path = ../../../klib/db/wcolidx0.c; sourceTree = SOURCE_ROOT; };
+		9D65E6341174E2DB00F3579B /* wcolidx1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcolidx1.c; path = ../../../klib/db/wcolidx1.c; sourceTree = SOURCE_ROOT; };
+		9D65E6351174E2DB00F3579B /* wcolidx2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcolidx2.c; path = ../../../klib/db/wcolidx2.c; sourceTree = SOURCE_ROOT; };
+		9D65E6361174E2DB00F3579B /* wcolumn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wcolumn.c; path = ../../../klib/db/wcolumn.c; sourceTree = SOURCE_ROOT; };
+		9D65E6371174E2DB00F3579B /* wdatabase.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wdatabase.c; path = ../../../klib/db/wdatabase.c; sourceTree = SOURCE_ROOT; };
+		9D65E6381174E2DB00F3579B /* wdbmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wdbmgr.c; path = ../../../klib/db/wdbmgr.c; sourceTree = SOURCE_ROOT; };
+		9D65E6391174E2DB00F3579B /* widxblk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = widxblk.c; path = ../../../klib/db/widxblk.c; sourceTree = SOURCE_ROOT; };
+		9D65E63A1174E2DB00F3579B /* windex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = windex.c; path = ../../../klib/db/windex.c; sourceTree = SOURCE_ROOT; };
+		9D65E63B1174E2DB00F3579B /* wkdb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wkdb.c; path = ../../../klib/db/wkdb.c; sourceTree = SOURCE_ROOT; };
+		9D65E63C1174E2DB00F3579B /* wmeta.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wmeta.c; path = ../../../klib/db/wmeta.c; sourceTree = SOURCE_ROOT; };
+		9D65E63D1174E2DB00F3579B /* wtable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wtable.c; path = ../../../klib/db/wtable.c; sourceTree = SOURCE_ROOT; };
+		9D65E63E1174E2DB00F3579B /* wtrieidx-v1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "wtrieidx-v1.c"; path = "../../../klib/db/wtrieidx-v1.c"; sourceTree = SOURCE_ROOT; };
+		9D65E63F1174E2DB00F3579B /* wtrieidx-v2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "wtrieidx-v2.c"; path = "../../../klib/db/wtrieidx-v2.c"; sourceTree = SOURCE_ROOT; };
+		9D65E6401174E2DB00F3579B /* wu64idx-v3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "wu64idx-v3.c"; path = "../../../klib/db/wu64idx-v3.c"; sourceTree = SOURCE_ROOT; };
+		9D65E6FF1174E54800F3579B /* legvcol.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = legvcol.c; path = ../../../sra/api/legacy/legvcol.c; sourceTree = SOURCE_ROOT; };
+		9D65E7001174E54800F3579B /* sra_decompress_init.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sra_decompress_init.c; path = ../../../sra/api/legacy/sra_decompress_init.c; sourceTree = SOURCE_ROOT; };
+		9D65E7011174E54800F3579B /* sra_decompress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sra_decompress.c; path = ../../../sra/api/legacy/sra_decompress.c; sourceTree = SOURCE_ROOT; };
+		9D65E7051174E56300F3579B /* ncbi-sramgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ncbi-sramgr.c"; path = "../../../sra/api/ncbi-sramgr.c"; sourceTree = SOURCE_ROOT; };
+		9D65E7061174E56300F3579B /* ncbi-wsramgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ncbi-wsramgr.c"; path = "../../../sra/api/ncbi-wsramgr.c"; sourceTree = SOURCE_ROOT; };
+		9D65E7071174E56300F3579B /* sracol-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "sracol-cmn.c"; path = "../../../sra/api/sracol-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D65E7081174E56300F3579B /* sracol.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sracol.c; path = ../../../sra/api/sracol.c; sourceTree = SOURCE_ROOT; };
+		9D65E7091174E56300F3579B /* sraerr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sraerr.c; path = ../../../sra/api/sraerr.c; sourceTree = SOURCE_ROOT; };
+		9D65E70A1174E56300F3579B /* sramgr-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "sramgr-cmn.c"; path = "../../../sra/api/sramgr-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D65E70B1174E56300F3579B /* sramgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sramgr.c; path = ../../../sra/api/sramgr.c; sourceTree = SOURCE_ROOT; };
+		9D65E70C1174E56300F3579B /* sranam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sranam.c; path = ../../../sra/api/sranam.c; sourceTree = SOURCE_ROOT; };
+		9D65E70D1174E56300F3579B /* sraschema.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sraschema.c; path = ../../../sra/api/sraschema.c; sourceTree = SOURCE_ROOT; };
+		9D65E70E1174E56300F3579B /* sratbl-cmn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "sratbl-cmn.c"; path = "../../../sra/api/sratbl-cmn.c"; sourceTree = SOURCE_ROOT; };
+		9D65E70F1174E56300F3579B /* sratbl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sratbl.c; path = ../../../sra/api/sratbl.c; sourceTree = SOURCE_ROOT; };
+		9D65E7101174E56300F3579B /* wsracol.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wsracol.c; path = ../../../sra/api/wsracol.c; sourceTree = SOURCE_ROOT; };
+		9D65E7111174E56300F3579B /* wsramgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wsramgr.c; path = ../../../sra/api/wsramgr.c; sourceTree = SOURCE_ROOT; };
+		9D65E7121174E56300F3579B /* wsraschema.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wsraschema.c; path = ../../../sra/api/wsraschema.c; sourceTree = SOURCE_ROOT; };
+		9D65E7131174E56300F3579B /* wsratbl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wsratbl.c; path = ../../../sra/api/wsratbl.c; sourceTree = SOURCE_ROOT; };
+		9D65E7391174E60300F3579B /* clip_quality_right.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = clip_quality_right.c; path = ../../../sra/xform/clip_quality_right.c; sourceTree = SOURCE_ROOT; };
+		9D65E73A1174E60300F3579B /* color-space.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "color-space.c"; path = "../../../sra/xform/color-space.c"; sourceTree = SOURCE_ROOT; };
+		9D65E73B1174E60300F3579B /* delta-log-delta.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "delta-log-delta.c"; path = "../../../sra/xform/delta-log-delta.c"; sourceTree = SOURCE_ROOT; };
+		9D65E73C1174E60300F3579B /* intensity-norm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "intensity-norm.c"; path = "../../../sra/xform/intensity-norm.c"; sourceTree = SOURCE_ROOT; };
+		9D65E73D1174E60300F3579B /* nencode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = nencode.c; path = ../../../sra/xform/nencode.c; sourceTree = SOURCE_ROOT; };
+		9D65E73E1174E60300F3579B /* phred-from-qval.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "phred-from-qval.c"; path = "../../../sra/xform/phred-from-qval.c"; sourceTree = SOURCE_ROOT; };
+		9D65E73F1174E60300F3579B /* platform_name.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = platform_name.c; path = ../../../sra/xform/platform_name.c; sourceTree = SOURCE_ROOT; };
+		9D65E7401174E60300F3579B /* position.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = position.c; path = ../../../sra/xform/position.c; sourceTree = SOURCE_ROOT; };
+		9D65E7411174E60300F3579B /* prob.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = prob.c; path = ../../../sra/xform/prob.c; sourceTree = SOURCE_ROOT; };
+		9D65E7421174E60300F3579B /* ptranspose.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ptranspose.c; path = ../../../sra/xform/ptranspose.c; sourceTree = SOURCE_ROOT; };
+		9D65E7431174E60300F3579B /* qual4_codec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = qual4_codec.c; path = ../../../sra/xform/qual4_codec.c; sourceTree = SOURCE_ROOT; };
+		9D65E7441174E60300F3579B /* quality.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = quality.c; path = ../../../sra/xform/quality.c; sourceTree = SOURCE_ROOT; };
+		9D65E7451174E60300F3579B /* read_struct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = read_struct.c; path = ../../../sra/xform/read_struct.c; sourceTree = SOURCE_ROOT; };
+		9D65E7461174E60300F3579B /* read-desc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "read-desc.c"; path = "../../../sra/xform/read-desc.c"; sourceTree = SOURCE_ROOT; };
+		9D65E7471174E60300F3579B /* read2na.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = read2na.c; path = ../../../sra/xform/read2na.c; sourceTree = SOURCE_ROOT; };
+		9D65E7481174E60300F3579B /* read4na.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = read4na.c; path = ../../../sra/xform/read4na.c; sourceTree = SOURCE_ROOT; };
+		9D65E7491174E60300F3579B /* readFasta.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = readFasta.c; path = ../../../sra/xform/readFasta.c; sourceTree = SOURCE_ROOT; };
+		9D65E74A1174E60300F3579B /* reorder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = reorder.c; path = ../../../sra/xform/reorder.c; sourceTree = SOURCE_ROOT; };
+		9D65E74B1174E60300F3579B /* rotate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rotate.c; path = ../../../sra/xform/rotate.c; sourceTree = SOURCE_ROOT; };
+		9D65E74C1174E60300F3579B /* sort-order.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "sort-order.c"; path = "../../../sra/xform/sort-order.c"; sourceTree = SOURCE_ROOT; };
+		9D65E74D1174E60300F3579B /* swap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = swap.c; path = ../../../sra/xform/swap.c; sourceTree = SOURCE_ROOT; };
+		9D65E74E1174E60300F3579B /* validate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = validate.c; path = ../../../sra/xform/validate.c; sourceTree = SOURCE_ROOT; };
+		9D65E7681174E61D00F3579B /* nucstrstr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = nucstrstr.c; path = ../../../sra/search/nucstrstr.c; sourceTree = SOURCE_ROOT; };
+		9D65E7751174E6BA00F3579B /* srapath.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srapath.c; path = ../../../sra/ncbi/srapath.c; sourceTree = SOURCE_ROOT; };
+		9D65E77A1174E6F000F3579B /* log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = log.c; path = ../../../klib/app/log.c; sourceTree = SOURCE_ROOT; };
+		9D65E77B1174E6F000F3579B /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = main.c; path = ../../../klib/app/main.c; sourceTree = SOURCE_ROOT; };
+		9D65E77C1174E6F000F3579B /* rc-idx-tbl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "rc-idx-tbl.c"; path = "../../../klib/app/rc-idx-tbl.c"; sourceTree = SOURCE_ROOT; };
+		9D65E77D1174E6F000F3579B /* rc-tbl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "rc-tbl.c"; path = "../../../klib/app/rc-tbl.c"; sourceTree = SOURCE_ROOT; };
+		9D65E77E1174E6F000F3579B /* text-log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "text-log.c"; path = "../../../klib/app/text-log.c"; sourceTree = SOURCE_ROOT; };
+		9D65E7841174E6FA00F3579B /* syslog.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = syslog.c; path = ../../../klib/app/unix/syslog.c; sourceTree = SOURCE_ROOT; };
+		9D65E7851174E6FA00F3579B /* sysmain.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sysmain.c; path = ../../../klib/app/unix/sysmain.c; sourceTree = SOURCE_ROOT; };
+		9D65E89E11762C8900F3579B /* libklib.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libklib.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D65E91D1176303D00F3579B /* libkdb.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libkdb.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D65E988117630B300F3579B /* libwkdb.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwkdb.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D65E9E7117632C800F3579B /* libvdb.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libvdb.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D65EA1E1176330D00F3579B /* libwvdb.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwvdb.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D65EA901176365700F3579B /* libsra.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libsra.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D65EAFA117636BD00F3579B /* libwsra.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwsra.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+		9D65EBCF11764B8200F3579B /* xform.o */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.objfile"; includeInIndex = 0; path = xform.o; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		8DD76FAD0486AB0100D96B5E /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65E5B71174E2D100F3579B /* libz.dylib in Frameworks */,
+				9D65E5B81174E2D100F3579B /* libbz2.dylib in Frameworks */,
+				9D65E5B91174E2D100F3579B /* libxml2.dylib in Frameworks */,
+				9D65EA941176366D00F3579B /* libwvdb.dylib in Frameworks */,
+				9D65EB401176437700F3579B /* libwsra.dylib in Frameworks */,
+				9D65EBC611764AA500F3579B /* libwkdb.dylib in Frameworks */,
+				9D65EBC911764AAE00F3579B /* libklib.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D1A14AF119D932A00EF212F /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D1A14BF119D93BC00EF212F /* libklib.dylib in Frameworks */,
+				9D1A14C2119D93D100EF212F /* libz.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65E89C11762C8900F3579B /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65E8D711762D1600F3579B /* libz.dylib in Frameworks */,
+				9D65E8D811762D1E00F3579B /* libbz2.dylib in Frameworks */,
+				9D65E8D911762D2200F3579B /* libxml2.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65E91B1176303D00F3579B /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65E9AC1176312E00F3579B /* libklib.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65E984117630B300F3579B /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65E9DB1176327200F3579B /* libklib.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65E9E5117632C800F3579B /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65EA5C117633C600F3579B /* libklib.dylib in Frameworks */,
+				9D65EA5D117633C900F3579B /* libkdb.dylib in Frameworks */,
+				9D65EA641176340100F3579B /* libz.dylib in Frameworks */,
+				9D65EBE211764BD200F3579B /* xform.o in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65EA1A1176330D00F3579B /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65EA271176335200F3579B /* libklib.dylib in Frameworks */,
+				9D65EA2A1176335C00F3579B /* libwkdb.dylib in Frameworks */,
+				9D65EA3F1176337C00F3579B /* libz.dylib in Frameworks */,
+				9D65EBE311764BD600F3579B /* xform.o in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65EA8E1176365700F3579B /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65EA951176367400F3579B /* libklib.dylib in Frameworks */,
+				9D65EA961176367600F3579B /* libkdb.dylib in Frameworks */,
+				9D65EA971176367900F3579B /* libvdb.dylib in Frameworks */,
+				9D65EB031176372D00F3579B /* libz.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65EAF3117636BD00F3579B /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65EAF4117636BD00F3579B /* libklib.dylib in Frameworks */,
+				9D65EB0B117637AF00F3579B /* libwvdb.dylib in Frameworks */,
+				9D65EB0E117637B700F3579B /* libwkdb.dylib in Frameworks */,
+				9D65EB11117637C200F3579B /* libz.dylib in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65EBCD11764B8200F3579B /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		08FB7794FE84155DC02AAC07 /* sra2kdb */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E5B31174E2BF00F3579B /* Libs */,
+				08FB7795FE84155DC02AAC07 /* Source */,
+				1AB674ADFE9D54B511CA2CBB /* Products */,
+			);
+			name = sra2kdb;
+			sourceTree = "<group>";
+		};
+		08FB7795FE84155DC02AAC07 /* Source */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E5A91174E29F00F3579B /* sra2kdb.c */,
+			);
+			name = Source;
+			sourceTree = "<group>";
+		};
+		1AB674ADFE9D54B511CA2CBB /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				8DD76FB20486AB0100D96B5E /* sra2kdb */,
+				9D65E89E11762C8900F3579B /* libklib.dylib */,
+				9D65E91D1176303D00F3579B /* libkdb.dylib */,
+				9D65E988117630B300F3579B /* libwkdb.dylib */,
+				9D65E9E7117632C800F3579B /* libvdb.dylib */,
+				9D65EA1E1176330D00F3579B /* libwvdb.dylib */,
+				9D65EA901176365700F3579B /* libsra.dylib */,
+				9D65EAFA117636BD00F3579B /* libwsra.dylib */,
+				9D65EBCF11764B8200F3579B /* xform.o */,
+				9D1A14B1119D932A00EF212F /* bam-test */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		9D1A14A3119D91C600EF212F /* align */ = {
+			isa = PBXGroup;
+			children = (
+				9D1A14AA119D930B00EF212F /* test */,
+				9D1A14A8119D922100EF212F /* BAMFile.c */,
+				9D1A14A7119D921100EF212F /* align-access.c */,
+			);
+			name = align;
+			sourceTree = "<group>";
+		};
+		9D1A14AA119D930B00EF212F /* test */ = {
+			isa = PBXGroup;
+			children = (
+				9D1A14AB119D931800EF212F /* bamtest.c */,
+			);
+			name = test;
+			sourceTree = "<group>";
+		};
+		9D65E5B31174E2BF00F3579B /* Libs */ = {
+			isa = PBXGroup;
+			children = (
+				9D1A14A3119D91C600EF212F /* align */,
+				9D65E7791174E6D700F3579B /* App */,
+				9D65E6EC1174E4C200F3579B /* sra */,
+				9D65E6201174E2DB00F3579B /* kdb */,
+				9D65E6091174E2DB00F3579B /* vdb */,
+				9D65E5F61174E2DB00F3579B /* xform */,
+				9D65E5BB1174E2DB00F3579B /* klib */,
+				9D65E5B41174E2D100F3579B /* libz.dylib */,
+				9D65E5B51174E2D100F3579B /* libbz2.dylib */,
+				9D65E5B61174E2D100F3579B /* libxml2.dylib */,
+			);
+			name = Libs;
+			sourceTree = "<group>";
+		};
+		9D65E5BB1174E2DB00F3579B /* klib */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E9B5117631D800F3579B /* kxf */,
+				9D65E8FF11762EF600F3579B /* log */,
+				9D65E5F31174E2DB00F3579B /* xml */,
+				9D65E5EA1174E2DB00F3579B /* txt */,
+				9D65E5E21174E2DB00F3579B /* proc */,
+				9D65E5CA1174E2DB00F3579B /* fs */,
+				9D65E5C71174E2DB00F3579B /* cs */,
+				9D65E5BC1174E2DB00F3579B /* cont */,
+			);
+			name = klib;
+			sourceTree = "<group>";
+		};
+		9D65E5BC1174E2DB00F3579B /* cont */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E5BD1174E2DB00F3579B /* bstpersist.c */,
+				9D65E5BE1174E2DB00F3579B /* container.c */,
+				9D65E5BF1174E2DB00F3579B /* namelist.c */,
+				9D65E5C01174E2DB00F3579B /* pbstree.c */,
+				9D65E5C11174E2DB00F3579B /* ptpersist.c */,
+				9D65E5C21174E2DB00F3579B /* ptrie.c */,
+				9D65E5C31174E2DB00F3579B /* queue.c */,
+				9D65E5C41174E2DB00F3579B /* trie.c */,
+				9D65E5C61174E2DB00F3579B /* vector.c */,
+			);
+			name = cont;
+			sourceTree = "<group>";
+		};
+		9D65E5C71174E2DB00F3579B /* cs */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E5C81174E2DB00F3579B /* crc32.c */,
+				9D65E5C91174E2DB00F3579B /* md5.c */,
+			);
+			name = cs;
+			sourceTree = "<group>";
+		};
+		9D65E5CA1174E2DB00F3579B /* fs */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E5CB1174E2DB00F3579B /* sysdir.c */,
+				9D65E5CC1174E2DB00F3579B /* sysdll.c */,
+				9D65E5CD1174E2DB00F3579B /* sysfile.c */,
+				9D65E5CE1174E2DB00F3579B /* sysmmap.c */,
+				9D65E5CF1174E2DB00F3579B /* arc.c */,
+				9D65E5D01174E2DB00F3579B /* buffile.c */,
+				9D65E5D11174E2DB00F3579B /* bzip.c */,
+				9D65E5D21174E2DB00F3579B /* countfile.c */,
+				9D65E5D31174E2DB00F3579B /* crc32.c */,
+				9D65E5D41174E2DB00F3579B /* dir_test.c */,
+				9D65E5D51174E2DB00F3579B /* directory.c */,
+				9D65E5D61174E2DB00F3579B /* file.c */,
+				9D65E5D71174E2DB00F3579B /* gzip.c */,
+				9D65E5D81174E2DB00F3579B /* md5.c */,
+				9D65E5D91174E2DB00F3579B /* nullfile.c */,
+				9D65E5DA1174E2DB00F3579B /* sra.c */,
+				9D65E5DB1174E2DB00F3579B /* subfile.c */,
+				9D65E5DC1174E2DB00F3579B /* tar.c */,
+				9D65E5DD1174E2DB00F3579B /* teefile.c */,
+				9D65E5DE1174E2DB00F3579B /* toc.c */,
+				9D65E5DF1174E2DB00F3579B /* tocdir.c */,
+				9D65E5E01174E2DB00F3579B /* tocentry.c */,
+				9D65E5E11174E2DB00F3579B /* tocfile.c */,
+			);
+			name = fs;
+			sourceTree = "<group>";
+		};
+		9D65E5E21174E2DB00F3579B /* proc */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E5E31174E2DB00F3579B /* sem.c */,
+				9D65E5E41174E2DB00F3579B /* stbarrier.c */,
+				9D65E5E51174E2DB00F3579B /* stcond.c */,
+				9D65E5E61174E2DB00F3579B /* stlock.c */,
+				9D65E5E71174E2DB00F3579B /* stsem.c */,
+				9D65E5E81174E2DB00F3579B /* stthread.c */,
+				9D65E5E91174E2DB00F3579B /* sttimeout.c */,
+			);
+			name = proc;
+			sourceTree = "<group>";
+		};
+		9D65E5EA1174E2DB00F3579B /* txt */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E5EB1174E2DB00F3579B /* ascii.c */,
+				9D65E5EC1174E2DB00F3579B /* cp1252.c */,
+				9D65E5ED1174E2DB00F3579B /* iso8859-1.c */,
+				9D65E5EE1174E2DB00F3579B /* iso8859.c */,
+				9D65E5EF1174E2DB00F3579B /* symtab.c */,
+				9D65E5F01174E2DB00F3579B /* text.c */,
+				9D65E5F11174E2DB00F3579B /* token.c */,
+				9D65E5F21174E2DB00F3579B /* utf8.c */,
+			);
+			name = txt;
+			sourceTree = "<group>";
+		};
+		9D65E5F31174E2DB00F3579B /* xml */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E5F51174E2DB00F3579B /* xml.c */,
+			);
+			name = xml;
+			sourceTree = "<group>";
+		};
+		9D65E5F61174E2DB00F3579B /* xform */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E5F71174E2DB00F3579B /* echo.c */,
+				9D65E5F81174E2DB00F3579B /* factories.c */,
+				9D65E5F91174E2DB00F3579B /* floor.c */,
+				9D65E5FA1174E2DB00F3579B /* fpcodec.c */,
+				9D65E5FB1174E2DB00F3579B /* hufDecode.c */,
+				9D65E5FC1174E2DB00F3579B /* hufEncode.c */,
+				9D65E5FD1174E2DB00F3579B /* hufTable.c */,
+				9D65E5FE1174E2DB00F3579B /* hufZlib.c */,
+				9D65E5FF1174E2DB00F3579B /* muxing.c */,
+				9D65E6001174E2DB00F3579B /* null-row.c */,
+				9D65E6021174E2DB00F3579B /* parse_args.c */,
+				9D65E6031174E2DB00F3579B /* rleDecode.c */,
+				9D65E6041174E2DB00F3579B /* rleEncode.c */,
+				9D65E6051174E2DB00F3579B /* row-len.c */,
+				9D65E6061174E2DB00F3579B /* transpose.c */,
+				9D65E6081174E2DB00F3579B /* validate.c */,
+			);
+			name = xform;
+			sourceTree = "<group>";
+		};
+		9D65E6091174E2DB00F3579B /* vdb */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E60A1174E2DB00F3579B /* blob.c */,
+				9D65E60B1174E2DB00F3579B /* column-cmn.c */,
+				9D65E60C1174E2DB00F3579B /* column.c */,
+				9D65E60D1174E2DB00F3579B /* cursor-cmn.c */,
+				9D65E60E1174E2DB00F3579B /* database.c */,
+				9D65E60F1174E2DB00F3579B /* dbmgr-cmn.c */,
+				9D65E6101174E2DB00F3579B /* dbmgr.c */,
+				9D65E6111174E2DB00F3579B /* dtype.c */,
+				9D65E6121174E2DB00F3579B /* loader.c */,
+				9D65E6131174E2DB00F3579B /* parse.c */,
+				9D65E6141174E2DB00F3579B /* schema-dump.c */,
+				9D65E6151174E2DB00F3579B /* schema.c */,
+				9D65E6161174E2DB00F3579B /* static-column-temp.c */,
+				9D65E6171174E2DB00F3579B /* table-cmn.c */,
+				9D65E6181174E2DB00F3579B /* table.c */,
+				9D65E6191174E2DB00F3579B /* wcolumn.c */,
+				9D65E61A1174E2DB00F3579B /* wcursor.c */,
+				9D65E61B1174E2DB00F3579B /* wdatabase.c */,
+				9D65E61C1174E2DB00F3579B /* wdbmgr.c */,
+				9D65E61D1174E2DB00F3579B /* wtable.c */,
+				9D65E61E1174E2DB00F3579B /* xform.c */,
+				9D65E61F1174E2DB00F3579B /* xfuncs.c */,
+			);
+			name = vdb;
+			sourceTree = "<group>";
+		};
+		9D65E6201174E2DB00F3579B /* kdb */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E6211174E2DB00F3579B /* coldata.c */,
+				9D65E6221174E2DB00F3579B /* colidx.c */,
+				9D65E6231174E2DB00F3579B /* colidx0.c */,
+				9D65E6241174E2DB00F3579B /* colidx1.c */,
+				9D65E6251174E2DB00F3579B /* colidx2.c */,
+				9D65E6261174E2DB00F3579B /* column.c */,
+				9D65E6271174E2DB00F3579B /* database.c */,
+				9D65E6281174E2DB00F3579B /* dbmgr.c */,
+				9D65E6291174E2DB00F3579B /* idxblk.c */,
+				9D65E62A1174E2DB00F3579B /* index.c */,
+				9D65E62B1174E2DB00F3579B /* kdb.c */,
+				9D65E62C1174E2DB00F3579B /* meta.c */,
+				9D65E62D1174E2DB00F3579B /* table.c */,
+				9D65E62E1174E2DB00F3579B /* trieidx-v1.c */,
+				9D65E62F1174E2DB00F3579B /* trieidx-v2.c */,
+				9D65E6301174E2DB00F3579B /* u64idx-v3.c */,
+				9D65E6311174E2DB00F3579B /* wcoldata.c */,
+				9D65E6321174E2DB00F3579B /* wcolidx.c */,
+				9D65E6331174E2DB00F3579B /* wcolidx0.c */,
+				9D65E6341174E2DB00F3579B /* wcolidx1.c */,
+				9D65E6351174E2DB00F3579B /* wcolidx2.c */,
+				9D65E6361174E2DB00F3579B /* wcolumn.c */,
+				9D65E6371174E2DB00F3579B /* wdatabase.c */,
+				9D65E6381174E2DB00F3579B /* wdbmgr.c */,
+				9D65E6391174E2DB00F3579B /* widxblk.c */,
+				9D65E63A1174E2DB00F3579B /* windex.c */,
+				9D65E63B1174E2DB00F3579B /* wkdb.c */,
+				9D65E63C1174E2DB00F3579B /* wmeta.c */,
+				9D65E63D1174E2DB00F3579B /* wtable.c */,
+				9D65E63E1174E2DB00F3579B /* wtrieidx-v1.c */,
+				9D65E63F1174E2DB00F3579B /* wtrieidx-v2.c */,
+				9D65E6401174E2DB00F3579B /* wu64idx-v3.c */,
+			);
+			name = kdb;
+			sourceTree = "<group>";
+		};
+		9D65E6EC1174E4C200F3579B /* sra */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E7741174E6A500F3579B /* ncbi */,
+				9D65E7671174E61100F3579B /* search */,
+				9D65E6FE1174E53900F3579B /* xform */,
+				9D65E6FC1174E52700F3579B /* api */,
+			);
+			name = sra;
+			sourceTree = "<group>";
+		};
+		9D65E6FC1174E52700F3579B /* api */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E7051174E56300F3579B /* ncbi-sramgr.c */,
+				9D65E7061174E56300F3579B /* ncbi-wsramgr.c */,
+				9D65E7071174E56300F3579B /* sracol-cmn.c */,
+				9D65E7081174E56300F3579B /* sracol.c */,
+				9D65E7091174E56300F3579B /* sraerr.c */,
+				9D65E70A1174E56300F3579B /* sramgr-cmn.c */,
+				9D65E70B1174E56300F3579B /* sramgr.c */,
+				9D65E70C1174E56300F3579B /* sranam.c */,
+				9D65E70D1174E56300F3579B /* sraschema.c */,
+				9D65E70E1174E56300F3579B /* sratbl-cmn.c */,
+				9D65E70F1174E56300F3579B /* sratbl.c */,
+				9D65E7101174E56300F3579B /* wsracol.c */,
+				9D65E7111174E56300F3579B /* wsramgr.c */,
+				9D65E7121174E56300F3579B /* wsraschema.c */,
+				9D65E7131174E56300F3579B /* wsratbl.c */,
+				9D65E6FD1174E53100F3579B /* legacy */,
+			);
+			name = api;
+			sourceTree = "<group>";
+		};
+		9D65E6FD1174E53100F3579B /* legacy */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E6FF1174E54800F3579B /* legvcol.c */,
+				9D65E7001174E54800F3579B /* sra_decompress_init.c */,
+				9D65E7011174E54800F3579B /* sra_decompress.c */,
+			);
+			name = legacy;
+			sourceTree = "<group>";
+		};
+		9D65E6FE1174E53900F3579B /* xform */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E7391174E60300F3579B /* clip_quality_right.c */,
+				9D65E73A1174E60300F3579B /* color-space.c */,
+				9D65E73B1174E60300F3579B /* delta-log-delta.c */,
+				9D65E73C1174E60300F3579B /* intensity-norm.c */,
+				9D65E73D1174E60300F3579B /* nencode.c */,
+				9D65E73E1174E60300F3579B /* phred-from-qval.c */,
+				9D65E73F1174E60300F3579B /* platform_name.c */,
+				9D65E7401174E60300F3579B /* position.c */,
+				9D65E7411174E60300F3579B /* prob.c */,
+				9D65E7421174E60300F3579B /* ptranspose.c */,
+				9D65E7431174E60300F3579B /* qual4_codec.c */,
+				9D65E7441174E60300F3579B /* quality.c */,
+				9D65E7451174E60300F3579B /* read_struct.c */,
+				9D65E7461174E60300F3579B /* read-desc.c */,
+				9D65E7471174E60300F3579B /* read2na.c */,
+				9D65E7481174E60300F3579B /* read4na.c */,
+				9D65E7491174E60300F3579B /* readFasta.c */,
+				9D65E74A1174E60300F3579B /* reorder.c */,
+				9D65E74B1174E60300F3579B /* rotate.c */,
+				9D65E74C1174E60300F3579B /* sort-order.c */,
+				9D65E74D1174E60300F3579B /* swap.c */,
+				9D65E74E1174E60300F3579B /* validate.c */,
+			);
+			name = xform;
+			sourceTree = "<group>";
+		};
+		9D65E7671174E61100F3579B /* search */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E7681174E61D00F3579B /* nucstrstr.c */,
+			);
+			name = search;
+			sourceTree = "<group>";
+		};
+		9D65E7741174E6A500F3579B /* ncbi */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E7751174E6BA00F3579B /* srapath.c */,
+			);
+			name = ncbi;
+			sourceTree = "<group>";
+		};
+		9D65E7791174E6D700F3579B /* App */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E7851174E6FA00F3579B /* sysmain.c */,
+				9D65E77B1174E6F000F3579B /* main.c */,
+			);
+			name = App;
+			sourceTree = "<group>";
+		};
+		9D65E8FF11762EF600F3579B /* log */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E77C1174E6F000F3579B /* rc-idx-tbl.c */,
+				9D65E77D1174E6F000F3579B /* rc-tbl.c */,
+				9D65E77A1174E6F000F3579B /* log.c */,
+				9D65E7841174E6FA00F3579B /* syslog.c */,
+				9D65E77E1174E6F000F3579B /* text-log.c */,
+			);
+			name = log;
+			sourceTree = "<group>";
+		};
+		9D65E9B5117631D800F3579B /* kxf */ = {
+			isa = PBXGroup;
+			children = (
+				9D65E6011174E2DB00F3579B /* pack.c */,
+				9D65E6071174E2DB00F3579B /* unpack.c */,
+			);
+			name = kxf;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		9D65E89A11762C8900F3579B /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65E9191176303D00F3579B /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65E962117630B300F3579B /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65E9E3117632C800F3579B /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65EA021176330D00F3579B /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65EA8C1176365700F3579B /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65EAC7117636BD00F3579B /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		8DD76FA90486AB0100D96B5E /* sra2kdb */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 1DEB928508733DD80010E9CD /* Build configuration list for PBXNativeTarget "sra2kdb" */;
+			buildPhases = (
+				8DD76FAB0486AB0100D96B5E /* Sources */,
+				8DD76FAD0486AB0100D96B5E /* Frameworks */,
+				8DD76FAF0486AB0100D96B5E /* CopyFiles */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D65EBA3117649C100F3579B /* PBXTargetDependency */,
+				9D65EBA5117649C100F3579B /* PBXTargetDependency */,
+			);
+			name = sra2kdb;
+			productInstallPath = "$(HOME)/bin";
+			productName = sra2kdb;
+			productReference = 8DD76FB20486AB0100D96B5E /* sra2kdb */;
+			productType = "com.apple.product-type.tool";
+		};
+		9D1A14B0119D932A00EF212F /* bam-test */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D1A14BA119D936800EF212F /* Build configuration list for PBXNativeTarget "bam-test" */;
+			buildPhases = (
+				9D1A14AE119D932A00EF212F /* Sources */,
+				9D1A14AF119D932A00EF212F /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D1A14C6119D93DF00EF212F /* PBXTargetDependency */,
+			);
+			name = "bam-test";
+			productName = "bam-test";
+			productReference = 9D1A14B1119D932A00EF212F /* bam-test */;
+			productType = "com.apple.product-type.tool";
+		};
+		9D65E89D11762C8900F3579B /* klib */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D65E8D411762CF600F3579B /* Build configuration list for PBXNativeTarget "klib" */;
+			buildPhases = (
+				9D65E89A11762C8900F3579B /* Headers */,
+				9D65E89B11762C8900F3579B /* Sources */,
+				9D65E89C11762C8900F3579B /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = klib;
+			productName = klib;
+			productReference = 9D65E89E11762C8900F3579B /* libklib.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D65E91C1176303D00F3579B /* kdb */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D65E960117630B300F3579B /* Build configuration list for PBXNativeTarget "kdb" */;
+			buildPhases = (
+				9D65E9191176303D00F3579B /* Headers */,
+				9D65E91A1176303D00F3579B /* Sources */,
+				9D65E91B1176303D00F3579B /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D65EBAD11764A0A00F3579B /* PBXTargetDependency */,
+			);
+			name = kdb;
+			productName = kdb;
+			productReference = 9D65E91D1176303D00F3579B /* libkdb.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D65E961117630B300F3579B /* wkdb */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D65E985117630B300F3579B /* Build configuration list for PBXNativeTarget "wkdb" */;
+			buildPhases = (
+				9D65E962117630B300F3579B /* Headers */,
+				9D65E963117630B300F3579B /* Sources */,
+				9D65E984117630B300F3579B /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D65EBAF11764A1A00F3579B /* PBXTargetDependency */,
+			);
+			name = wkdb;
+			productName = kdb;
+			productReference = 9D65E988117630B300F3579B /* libwkdb.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D65E9E6117632C800F3579B /* vdb */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D65EA001176330D00F3579B /* Build configuration list for PBXNativeTarget "vdb" */;
+			buildPhases = (
+				9D65E9E3117632C800F3579B /* Headers */,
+				9D65E9E4117632C800F3579B /* Sources */,
+				9D65E9E5117632C800F3579B /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D65EBE711764BEA00F3579B /* PBXTargetDependency */,
+				9D65EBB511764A3100F3579B /* PBXTargetDependency */,
+			);
+			name = vdb;
+			productName = vdb;
+			productReference = 9D65E9E7117632C800F3579B /* libvdb.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D65EA011176330D00F3579B /* wvdb */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D65EA1B1176330D00F3579B /* Build configuration list for PBXNativeTarget "wvdb" */;
+			buildPhases = (
+				9D65EA021176330D00F3579B /* Headers */,
+				9D65EA031176330D00F3579B /* Sources */,
+				9D65EA1A1176330D00F3579B /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D65EBE911764BEC00F3579B /* PBXTargetDependency */,
+				9D65EBB711764A3600F3579B /* PBXTargetDependency */,
+			);
+			name = wvdb;
+			productName = vdb;
+			productReference = 9D65EA1E1176330D00F3579B /* libwvdb.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D65EA8F1176365700F3579B /* sra */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D65EAC1117636AB00F3579B /* Build configuration list for PBXNativeTarget "sra" */;
+			buildPhases = (
+				9D65EA8C1176365700F3579B /* Headers */,
+				9D65EA8D1176365700F3579B /* Sources */,
+				9D65EA8E1176365700F3579B /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D65EBB111764A2700F3579B /* PBXTargetDependency */,
+			);
+			name = sra;
+			productName = sra;
+			productReference = 9D65EA901176365700F3579B /* libsra.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D65EAC6117636BD00F3579B /* wsra */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D65EAF7117636BD00F3579B /* Build configuration list for PBXNativeTarget "wsra" */;
+			buildPhases = (
+				9D65EAC7117636BD00F3579B /* Headers */,
+				9D65EAC8117636BD00F3579B /* Sources */,
+				9D65EAF3117636BD00F3579B /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				9D65EBB311764A2800F3579B /* PBXTargetDependency */,
+			);
+			name = wsra;
+			productName = sra;
+			productReference = 9D65EAFA117636BD00F3579B /* libwsra.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
+		9D65EBCE11764B8200F3579B /* xform */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 9D65EBEE11764C2F00F3579B /* Build configuration list for PBXNativeTarget "xform" */;
+			buildPhases = (
+				9D65EBCC11764B8200F3579B /* Sources */,
+				9D65EBCD11764B8200F3579B /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = xform;
+			productName = xform;
+			productReference = 9D65EBCF11764B8200F3579B /* xform.o */;
+			productType = "com.apple.product-type.objfile";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		08FB7793FE84155DC02AAC07 /* Project object */ = {
+			isa = PBXProject;
+			buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "old-toolkit" */;
+			compatibilityVersion = "Xcode 3.0";
+			hasScannedForEncodings = 1;
+			mainGroup = 08FB7794FE84155DC02AAC07 /* sra2kdb */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				8DD76FA90486AB0100D96B5E /* sra2kdb */,
+				9D65E89D11762C8900F3579B /* klib */,
+				9D65E91C1176303D00F3579B /* kdb */,
+				9D65E961117630B300F3579B /* wkdb */,
+				9D65E9E6117632C800F3579B /* vdb */,
+				9D65EA011176330D00F3579B /* wvdb */,
+				9D65EA8F1176365700F3579B /* sra */,
+				9D65EAC6117636BD00F3579B /* wsra */,
+				9D65EBCE11764B8200F3579B /* xform */,
+				9D1A14B0119D932A00EF212F /* bam-test */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+		8DD76FAB0486AB0100D96B5E /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65E5AA1174E29F00F3579B /* sra2kdb.c in Sources */,
+				9D65E9131176300200F3579B /* main.c in Sources */,
+				9D65E9141176300300F3579B /* sysmain.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D1A14AE119D932A00EF212F /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D1A14B5119D934300EF212F /* bamtest.c in Sources */,
+				9D1A14B6119D934A00EF212F /* BAMFile.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65E89B11762C8900F3579B /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65E8A111762C9B00F3579B /* arc.c in Sources */,
+				9D65E8A311762C9C00F3579B /* bstpersist.c in Sources */,
+				9D65E8A411762C9C00F3579B /* buffile.c in Sources */,
+				9D65E8A511762C9D00F3579B /* bzip.c in Sources */,
+				9D65E8A611762C9D00F3579B /* container.c in Sources */,
+				9D65E8A711762C9E00F3579B /* countfile.c in Sources */,
+				9D65E8A811762C9F00F3579B /* cp1252.c in Sources */,
+				9D65E8A911762CA000F3579B /* crc32.c in Sources */,
+				9D65E8AA11762CA000F3579B /* crc32.c in Sources */,
+				9D65E8AB11762CA100F3579B /* dir_test.c in Sources */,
+				9D65E8AC11762CA200F3579B /* directory.c in Sources */,
+				9D65E8AD11762CA200F3579B /* file.c in Sources */,
+				9D65E8AF11762CA300F3579B /* gzip.c in Sources */,
+				9D65E8B011762CA400F3579B /* iso8859-1.c in Sources */,
+				9D65E8B111762CA500F3579B /* iso8859.c in Sources */,
+				9D65E8B211762CA500F3579B /* md5.c in Sources */,
+				9D65E8B311762CA600F3579B /* md5.c in Sources */,
+				9D65E8B411762CA600F3579B /* namelist.c in Sources */,
+				9D65E8B511762CA700F3579B /* nullfile.c in Sources */,
+				9D65E8B611762CA800F3579B /* pbstree.c in Sources */,
+				9D65E8B711762CA800F3579B /* ptpersist.c in Sources */,
+				9D65E8B811762CA900F3579B /* ptrie.c in Sources */,
+				9D65E8B911762CAA00F3579B /* queue.c in Sources */,
+				9D65E8BB11762CBC00F3579B /* sra.c in Sources */,
+				9D65E8BC11762CBC00F3579B /* stbarrier.c in Sources */,
+				9D65E8BD11762CBD00F3579B /* stcond.c in Sources */,
+				9D65E8BE11762CBE00F3579B /* stlock.c in Sources */,
+				9D65E8BF11762CBE00F3579B /* stsem.c in Sources */,
+				9D65E8C011762CBF00F3579B /* stthread.c in Sources */,
+				9D65E8C111762CBF00F3579B /* sttimeout.c in Sources */,
+				9D65E8C211762CC000F3579B /* subfile.c in Sources */,
+				9D65E8C311762CC000F3579B /* symtab.c in Sources */,
+				9D65E8C411762CC100F3579B /* sysdir.c in Sources */,
+				9D65E8C511762CC200F3579B /* sysdll.c in Sources */,
+				9D65E8C611762CC300F3579B /* sysfile.c in Sources */,
+				9D65E8C711762CC300F3579B /* sysmmap.c in Sources */,
+				9D65E8C811762CC400F3579B /* tar.c in Sources */,
+				9D65E8C911762CC500F3579B /* teefile.c in Sources */,
+				9D65E8CA11762CC500F3579B /* text.c in Sources */,
+				9D65E8CB11762CC600F3579B /* toc.c in Sources */,
+				9D65E8CC11762CC600F3579B /* tocdir.c in Sources */,
+				9D65E8CD11762CC700F3579B /* tocentry.c in Sources */,
+				9D65E8CE11762CC700F3579B /* tocfile.c in Sources */,
+				9D65E8CF11762CC800F3579B /* token.c in Sources */,
+				9D65E8D011762CCA00F3579B /* trie.c in Sources */,
+				9D65E8D111762CCA00F3579B /* utf8.c in Sources */,
+				9D65E8D211762CCB00F3579B /* vector.c in Sources */,
+				9D65E8D311762CCB00F3579B /* xml.c in Sources */,
+				9D65E90011762F2900F3579B /* log.c in Sources */,
+				9D65E90111762F2A00F3579B /* syslog.c in Sources */,
+				9D65E90211762F2A00F3579B /* text-log.c in Sources */,
+				9D65E90811762F6800F3579B /* rc-tbl.c in Sources */,
+				9D65E90B11762F8200F3579B /* rc-idx-tbl.c in Sources */,
+				9D65E9B1117631C700F3579B /* pack.c in Sources */,
+				9D65E9B2117631CC00F3579B /* unpack.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65E91A1176303D00F3579B /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65E9401176309200F3579B /* coldata.c in Sources */,
+				9D65E9411176309200F3579B /* colidx.c in Sources */,
+				9D65E9421176309200F3579B /* colidx0.c in Sources */,
+				9D65E9431176309300F3579B /* colidx1.c in Sources */,
+				9D65E9441176309400F3579B /* colidx2.c in Sources */,
+				9D65E9451176309400F3579B /* column.c in Sources */,
+				9D65E9461176309500F3579B /* database.c in Sources */,
+				9D65E9471176309500F3579B /* dbmgr.c in Sources */,
+				9D65E9481176309600F3579B /* idxblk.c in Sources */,
+				9D65E9491176309600F3579B /* index.c in Sources */,
+				9D65E94A1176309700F3579B /* kdb.c in Sources */,
+				9D65E94B1176309800F3579B /* meta.c in Sources */,
+				9D65E94C1176309900F3579B /* table.c in Sources */,
+				9D65E94D1176309900F3579B /* trieidx-v1.c in Sources */,
+				9D65E94E1176309A00F3579B /* trieidx-v2.c in Sources */,
+				9D65E94F1176309B00F3579B /* u64idx-v3.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65E963117630B300F3579B /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65E96C117630B300F3579B /* idxblk.c in Sources */,
+				9D65E974117630B300F3579B /* wcoldata.c in Sources */,
+				9D65E975117630B300F3579B /* wcolidx.c in Sources */,
+				9D65E976117630B300F3579B /* wcolidx0.c in Sources */,
+				9D65E977117630B300F3579B /* wcolidx1.c in Sources */,
+				9D65E978117630B300F3579B /* wcolidx2.c in Sources */,
+				9D65E979117630B300F3579B /* wcolumn.c in Sources */,
+				9D65E97A117630B300F3579B /* wdatabase.c in Sources */,
+				9D65E97B117630B300F3579B /* wdbmgr.c in Sources */,
+				9D65E97C117630B300F3579B /* widxblk.c in Sources */,
+				9D65E97D117630B300F3579B /* windex.c in Sources */,
+				9D65E97E117630B300F3579B /* wkdb.c in Sources */,
+				9D65E97F117630B300F3579B /* wmeta.c in Sources */,
+				9D65E980117630B300F3579B /* wtable.c in Sources */,
+				9D65E981117630B300F3579B /* wtrieidx-v1.c in Sources */,
+				9D65E982117630B300F3579B /* wtrieidx-v2.c in Sources */,
+				9D65E983117630B300F3579B /* wu64idx-v3.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65E9E4117632C800F3579B /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65E9EA117632F500F3579B /* blob.c in Sources */,
+				9D65E9EB117632F600F3579B /* column-cmn.c in Sources */,
+				9D65E9EC117632F600F3579B /* column.c in Sources */,
+				9D65E9ED117632F700F3579B /* cursor-cmn.c in Sources */,
+				9D65E9EE117632F700F3579B /* database.c in Sources */,
+				9D65E9EF117632F800F3579B /* dbmgr-cmn.c in Sources */,
+				9D65E9F0117632F800F3579B /* dbmgr.c in Sources */,
+				9D65E9F1117632F900F3579B /* dtype.c in Sources */,
+				9D65E9F2117632F900F3579B /* loader.c in Sources */,
+				9D65E9F3117632FA00F3579B /* parse.c in Sources */,
+				9D65E9F4117632FB00F3579B /* schema-dump.c in Sources */,
+				9D65E9F5117632FB00F3579B /* schema.c in Sources */,
+				9D65E9F7117632FD00F3579B /* table-cmn.c in Sources */,
+				9D65E9F8117632FD00F3579B /* table.c in Sources */,
+				9D65E9FE1176330000F3579B /* xform.c in Sources */,
+				9D65E9FF1176330100F3579B /* xfuncs.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65EA031176330D00F3579B /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65EA041176330D00F3579B /* blob.c in Sources */,
+				9D65EA051176330D00F3579B /* column-cmn.c in Sources */,
+				9D65EA071176330D00F3579B /* cursor-cmn.c in Sources */,
+				9D65EA081176330D00F3579B /* database.c in Sources */,
+				9D65EA091176330D00F3579B /* dbmgr-cmn.c in Sources */,
+				9D65EA0B1176330D00F3579B /* dtype.c in Sources */,
+				9D65EA0C1176330D00F3579B /* loader.c in Sources */,
+				9D65EA0D1176330D00F3579B /* parse.c in Sources */,
+				9D65EA0E1176330D00F3579B /* schema-dump.c in Sources */,
+				9D65EA0F1176330D00F3579B /* schema.c in Sources */,
+				9D65EA101176330D00F3579B /* static-column-temp.c in Sources */,
+				9D65EA111176330D00F3579B /* table-cmn.c in Sources */,
+				9D65EA131176330D00F3579B /* wcolumn.c in Sources */,
+				9D65EA141176330D00F3579B /* wcursor.c in Sources */,
+				9D65EA151176330D00F3579B /* wdatabase.c in Sources */,
+				9D65EA161176330D00F3579B /* wdbmgr.c in Sources */,
+				9D65EA171176330D00F3579B /* wtable.c in Sources */,
+				9D65EA181176330D00F3579B /* xform.c in Sources */,
+				9D65EA191176330D00F3579B /* xfuncs.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65EA8D1176365700F3579B /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65EA981176368800F3579B /* legvcol.c in Sources */,
+				9D65EA9B1176368A00F3579B /* sra_decompress.c in Sources */,
+				9D65EA9C1176368A00F3579B /* sra_decompress_init.c in Sources */,
+				9D65EA9D1176368B00F3579B /* sracol-cmn.c in Sources */,
+				9D65EA9E1176368B00F3579B /* sracol.c in Sources */,
+				9D65EA9F1176368C00F3579B /* sraerr.c in Sources */,
+				9D65EAA21176368D00F3579B /* sranam.c in Sources */,
+				9D65EAA31176368E00F3579B /* sraschema.c in Sources */,
+				9D65EAA41176368E00F3579B /* sratbl-cmn.c in Sources */,
+				9D65EAA51176368F00F3579B /* sratbl.c in Sources */,
+				9D65EAAA1176369600F3579B /* clip_quality_right.c in Sources */,
+				9D65EAAB1176369600F3579B /* color-space.c in Sources */,
+				9D65EAAC1176369600F3579B /* delta-log-delta.c in Sources */,
+				9D65EAAD1176369700F3579B /* intensity-norm.c in Sources */,
+				9D65EAAE1176369700F3579B /* nencode.c in Sources */,
+				9D65EAAF1176369800F3579B /* phred-from-qval.c in Sources */,
+				9D65EAB01176369800F3579B /* platform_name.c in Sources */,
+				9D65EAB11176369900F3579B /* position.c in Sources */,
+				9D65EAB21176369900F3579B /* prob.c in Sources */,
+				9D65EAB31176369A00F3579B /* ptranspose.c in Sources */,
+				9D65EAB41176369A00F3579B /* qual4_codec.c in Sources */,
+				9D65EAB51176369B00F3579B /* quality.c in Sources */,
+				9D65EAB61176369B00F3579B /* read-desc.c in Sources */,
+				9D65EAB71176369C00F3579B /* read2na.c in Sources */,
+				9D65EAB81176369C00F3579B /* read4na.c in Sources */,
+				9D65EAB91176369D00F3579B /* read_struct.c in Sources */,
+				9D65EABA1176369D00F3579B /* readFasta.c in Sources */,
+				9D65EABB1176369E00F3579B /* reorder.c in Sources */,
+				9D65EABC1176369F00F3579B /* rotate.c in Sources */,
+				9D65EABD1176369F00F3579B /* sort-order.c in Sources */,
+				9D65EABE117636A000F3579B /* swap.c in Sources */,
+				9D65EABF117636A000F3579B /* validate.c in Sources */,
+				9D65EAC2117636AC00F3579B /* nucstrstr.c in Sources */,
+				9D65EAC3117636AF00F3579B /* srapath.c in Sources */,
+				9D65EB2A1176397E00F3579B /* sramgr-cmn.c in Sources */,
+				9D65EB2B1176397E00F3579B /* sramgr.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65EAC8117636BD00F3579B /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65EAC9117636BD00F3579B /* legvcol.c in Sources */,
+				9D65EACB117636BD00F3579B /* ncbi-wsramgr.c in Sources */,
+				9D65EACC117636BD00F3579B /* sra_decompress.c in Sources */,
+				9D65EACD117636BD00F3579B /* sra_decompress_init.c in Sources */,
+				9D65EACE117636BD00F3579B /* sracol-cmn.c in Sources */,
+				9D65EAD0117636BD00F3579B /* sraerr.c in Sources */,
+				9D65EAD1117636BD00F3579B /* sramgr-cmn.c in Sources */,
+				9D65EAD3117636BD00F3579B /* sranam.c in Sources */,
+				9D65EAD5117636BD00F3579B /* sratbl-cmn.c in Sources */,
+				9D65EAD7117636BD00F3579B /* wsracol.c in Sources */,
+				9D65EAD9117636BD00F3579B /* wsraschema.c in Sources */,
+				9D65EADA117636BD00F3579B /* wsratbl.c in Sources */,
+				9D65EADB117636BD00F3579B /* clip_quality_right.c in Sources */,
+				9D65EADC117636BD00F3579B /* color-space.c in Sources */,
+				9D65EADD117636BD00F3579B /* delta-log-delta.c in Sources */,
+				9D65EADE117636BD00F3579B /* intensity-norm.c in Sources */,
+				9D65EADF117636BD00F3579B /* nencode.c in Sources */,
+				9D65EAE0117636BD00F3579B /* phred-from-qval.c in Sources */,
+				9D65EAE1117636BD00F3579B /* platform_name.c in Sources */,
+				9D65EAE2117636BD00F3579B /* position.c in Sources */,
+				9D65EAE3117636BD00F3579B /* prob.c in Sources */,
+				9D65EAE4117636BD00F3579B /* ptranspose.c in Sources */,
+				9D65EAE5117636BD00F3579B /* qual4_codec.c in Sources */,
+				9D65EAE6117636BD00F3579B /* quality.c in Sources */,
+				9D65EAE7117636BD00F3579B /* read-desc.c in Sources */,
+				9D65EAE8117636BD00F3579B /* read2na.c in Sources */,
+				9D65EAE9117636BD00F3579B /* read4na.c in Sources */,
+				9D65EAEA117636BD00F3579B /* read_struct.c in Sources */,
+				9D65EAEB117636BD00F3579B /* readFasta.c in Sources */,
+				9D65EAEC117636BD00F3579B /* reorder.c in Sources */,
+				9D65EAED117636BD00F3579B /* rotate.c in Sources */,
+				9D65EAEE117636BD00F3579B /* sort-order.c in Sources */,
+				9D65EAEF117636BD00F3579B /* swap.c in Sources */,
+				9D65EAF0117636BD00F3579B /* validate.c in Sources */,
+				9D65EAF1117636BD00F3579B /* nucstrstr.c in Sources */,
+				9D65EAF2117636BD00F3579B /* srapath.c in Sources */,
+				9D65EB061176376D00F3579B /* sraschema.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		9D65EBCC11764B8200F3579B /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9D65EBD211764BB900F3579B /* echo.c in Sources */,
+				9D65EBD311764BB900F3579B /* factories.c in Sources */,
+				9D65EBD411764BBA00F3579B /* floor.c in Sources */,
+				9D65EBD511764BBA00F3579B /* fpcodec.c in Sources */,
+				9D65EBD611764BBB00F3579B /* hufDecode.c in Sources */,
+				9D65EBD711764BBB00F3579B /* hufEncode.c in Sources */,
+				9D65EBD811764BBC00F3579B /* hufTable.c in Sources */,
+				9D65EBD911764BBC00F3579B /* hufZlib.c in Sources */,
+				9D65EBDA11764BBD00F3579B /* muxing.c in Sources */,
+				9D65EBDB11764BBD00F3579B /* null-row.c in Sources */,
+				9D65EBDC11764BBE00F3579B /* parse_args.c in Sources */,
+				9D65EBDD11764BBF00F3579B /* rleDecode.c in Sources */,
+				9D65EBDE11764BBF00F3579B /* rleEncode.c in Sources */,
+				9D65EBDF11764BC000F3579B /* row-len.c in Sources */,
+				9D65EBE011764BC000F3579B /* transpose.c in Sources */,
+				9D65EBE111764BC100F3579B /* validate.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		9D1A14C6119D93DF00EF212F /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D65E89D11762C8900F3579B /* klib */;
+			targetProxy = 9D1A14C5119D93DF00EF212F /* PBXContainerItemProxy */;
+		};
+		9D65EBA3117649C100F3579B /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D65EA011176330D00F3579B /* wvdb */;
+			targetProxy = 9D65EBA2117649C100F3579B /* PBXContainerItemProxy */;
+		};
+		9D65EBA5117649C100F3579B /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D65EAC6117636BD00F3579B /* wsra */;
+			targetProxy = 9D65EBA4117649C100F3579B /* PBXContainerItemProxy */;
+		};
+		9D65EBAD11764A0A00F3579B /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D65E89D11762C8900F3579B /* klib */;
+			targetProxy = 9D65EBAC11764A0A00F3579B /* PBXContainerItemProxy */;
+		};
+		9D65EBAF11764A1A00F3579B /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D65E89D11762C8900F3579B /* klib */;
+			targetProxy = 9D65EBAE11764A1A00F3579B /* PBXContainerItemProxy */;
+		};
+		9D65EBB111764A2700F3579B /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D65E9E6117632C800F3579B /* vdb */;
+			targetProxy = 9D65EBB011764A2700F3579B /* PBXContainerItemProxy */;
+		};
+		9D65EBB311764A2800F3579B /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D65EA011176330D00F3579B /* wvdb */;
+			targetProxy = 9D65EBB211764A2800F3579B /* PBXContainerItemProxy */;
+		};
+		9D65EBB511764A3100F3579B /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D65E91C1176303D00F3579B /* kdb */;
+			targetProxy = 9D65EBB411764A3100F3579B /* PBXContainerItemProxy */;
+		};
+		9D65EBB711764A3600F3579B /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D65E961117630B300F3579B /* wkdb */;
+			targetProxy = 9D65EBB611764A3600F3579B /* PBXContainerItemProxy */;
+		};
+		9D65EBE711764BEA00F3579B /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D65EBCE11764B8200F3579B /* xform */;
+			targetProxy = 9D65EBE611764BEA00F3579B /* PBXContainerItemProxy */;
+		};
+		9D65EBE911764BEC00F3579B /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 9D65EBCE11764B8200F3579B /* xform */;
+			targetProxy = 9D65EBE811764BEC00F3579B /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+		1DEB928608733DD80010E9CD /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/bin;
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/build/Debug\"",
+				);
+				PRODUCT_NAME = sra2kdb;
+			};
+			name = Debug;
+		};
+		1DEB928708733DD80010E9CD /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/bin;
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/build/Debug\"",
+				);
+				PRODUCT_NAME = sra2kdb;
+			};
+			name = Release;
+		};
+		1DEB928A08733DD80010E9CD /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)";
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = "_LOGGING=1";
+				GCC_VERSION = "";
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					"$(HOME)/asm-trace/inc/gcc/$arch",
+					"$(HOME)/asm-trace/inc/gcc",
+					"$(HOME)/asm-trace/inc/mac",
+					"$(HOME)/asm-trace/inc/bsd",
+					"$(HOME)/asm-trace/inc/unix",
+					"$(HOME)/asm-trace/itf",
+					/usr/include/libxml2,
+				);
+				ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH_ACTUAL)";
+				PREBINDING = NO;
+				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
+			};
+			name = Debug;
+		};
+		1DEB928B08733DD80010E9CD /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
+				ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_PREPROCESSOR_DEFINITIONS = "_LOGGING=1";
+				GCC_VERSION = "";
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					"$(HOME)/asm-trace/inc/gcc/$arch",
+					"$(HOME)/asm-trace/inc/gcc",
+					"$(HOME)/asm-trace/inc/mac",
+					"$(HOME)/asm-trace/inc/bsd",
+					"$(HOME)/asm-trace/inc/unix",
+					"$(HOME)/asm-trace/itf",
+					/usr/include/libxml2,
+				);
+				PREBINDING = NO;
+				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
+			};
+			name = Release;
+		};
+		9D1A14B3119D932B00EF212F /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/bin;
+				PREBINDING = NO;
+				PRODUCT_NAME = "bam-test";
+			};
+			name = Debug;
+		};
+		9D1A14B4119D932B00EF212F /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/bin;
+				PREBINDING = NO;
+				PRODUCT_NAME = "bam-test";
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D65E89F11762C8A00F3579B /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				HEADER_SEARCH_PATHS = (
+					"$(HOME)/asm-trace/inc/gcc/$arch",
+					"$(HOME)/asm-trace/inc/gcc",
+					"$(HOME)/asm-trace/inc/mac",
+					"$(HOME)/asm-trace/inc/bsd",
+					"$(HOME)/asm-trace/inc/unix",
+					"$(HOME)/asm-trace/itf",
+					/usr/include/libxml2,
+				);
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = klib;
+			};
+			name = Debug;
+		};
+		9D65E8A011762C8A00F3579B /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				HEADER_SEARCH_PATHS = (
+					"$(HOME)/asm-trace/inc/gcc/$arch",
+					"$(HOME)/asm-trace/inc/gcc",
+					"$(HOME)/asm-trace/inc/mac",
+					"$(HOME)/asm-trace/inc/bsd",
+					"$(HOME)/asm-trace/inc/unix",
+					"$(HOME)/asm-trace/itf",
+					/usr/include/libxml2,
+				);
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = klib;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D65E91E1176303E00F3579B /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = kdb;
+			};
+			name = Debug;
+		};
+		9D65E91F1176303E00F3579B /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = kdb;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D65E986117630B300F3579B /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/build/Debug\"",
+				);
+				PREBINDING = NO;
+				PRODUCT_NAME = wkdb;
+			};
+			name = Debug;
+		};
+		9D65E987117630B300F3579B /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/build/Debug\"",
+				);
+				PREBINDING = NO;
+				PRODUCT_NAME = wkdb;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D65E9E8117632C900F3579B /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = vdb;
+			};
+			name = Debug;
+		};
+		9D65E9E9117632C900F3579B /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = vdb;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D65EA1C1176330D00F3579B /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = wvdb;
+			};
+			name = Debug;
+		};
+		9D65EA1D1176330D00F3579B /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = vdb;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D65EA911176365800F3579B /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/build/Debug\"",
+				);
+				PREBINDING = NO;
+				PRODUCT_NAME = sra;
+			};
+			name = Debug;
+		};
+		9D65EA921176365800F3579B /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/build/Debug\"",
+				);
+				PREBINDING = NO;
+				PRODUCT_NAME = sra;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D65EAF8117636BD00F3579B /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				EXECUTABLE_PREFIX = lib;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\\\"$(SRCROOT)/build/Debug\\\"",
+				);
+				PREBINDING = NO;
+				PRODUCT_NAME = wsra;
+			};
+			name = Debug;
+		};
+		9D65EAF9117636BD00F3579B /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\\\"$(SRCROOT)/build/Debug\\\"",
+				);
+				PREBINDING = NO;
+				PRODUCT_NAME = sra;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+		9D65EBD011764B8200F3579B /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = xform;
+			};
+			name = Debug;
+		};
+		9D65EBD111764B8200F3579B /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				INSTALL_PATH = /usr/local/lib;
+				PREBINDING = NO;
+				PRODUCT_NAME = xform;
+				ZERO_LINK = NO;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		1DEB928508733DD80010E9CD /* Build configuration list for PBXNativeTarget "sra2kdb" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1DEB928608733DD80010E9CD /* Debug */,
+				1DEB928708733DD80010E9CD /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "old-toolkit" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1DEB928A08733DD80010E9CD /* Debug */,
+				1DEB928B08733DD80010E9CD /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D1A14BA119D936800EF212F /* Build configuration list for PBXNativeTarget "bam-test" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D1A14B3119D932B00EF212F /* Debug */,
+				9D1A14B4119D932B00EF212F /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D65E8D411762CF600F3579B /* Build configuration list for PBXNativeTarget "klib" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D65E89F11762C8A00F3579B /* Debug */,
+				9D65E8A011762C8A00F3579B /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D65E960117630B300F3579B /* Build configuration list for PBXNativeTarget "kdb" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D65E91E1176303E00F3579B /* Debug */,
+				9D65E91F1176303E00F3579B /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D65E985117630B300F3579B /* Build configuration list for PBXNativeTarget "wkdb" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D65E986117630B300F3579B /* Debug */,
+				9D65E987117630B300F3579B /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D65EA001176330D00F3579B /* Build configuration list for PBXNativeTarget "vdb" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D65E9E8117632C900F3579B /* Debug */,
+				9D65E9E9117632C900F3579B /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D65EA1B1176330D00F3579B /* Build configuration list for PBXNativeTarget "wvdb" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D65EA1C1176330D00F3579B /* Debug */,
+				9D65EA1D1176330D00F3579B /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D65EAC1117636AB00F3579B /* Build configuration list for PBXNativeTarget "sra" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D65EA911176365800F3579B /* Debug */,
+				9D65EA921176365800F3579B /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D65EAF7117636BD00F3579B /* Build configuration list for PBXNativeTarget "wsra" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D65EAF8117636BD00F3579B /* Debug */,
+				9D65EAF9117636BD00F3579B /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		9D65EBEE11764C2F00F3579B /* Build configuration list for PBXNativeTarget "xform" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				9D65EBD011764B8200F3579B /* Debug */,
+				9D65EBD111764B8200F3579B /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
+}
diff --git a/build/check-exit-code.py b/build/check-exit-code.py
new file mode 100644
index 0000000..fd2783c
--- /dev/null
+++ b/build/check-exit-code.py
@@ -0,0 +1,131 @@
+import sys
+import os.path
+import subprocess
+
+def usage ( message ):
+    print ( "\n" )
+    print ( "This program will check correct program behaviour when it called" )
+    print ( "without arguments, or with argument '-h'. In the first case it" )
+    print ( "should print help message and exit non zero code. In the second" )
+    print ( "case it should print help message and exit with zero code.\n" )
+
+    print ( str ( message ) + "\n" )
+    print ( "Usage:\n" )
+    print ( "  " + os.path.basename ( __file__ ) + " [-v] program_path\n" )
+    print ( "Where:\n" )
+    print ( "  program_path - path to program to test" )
+    print ( "            -v - verbose ... more talkative\n" )
+
+ANANASA = False
+LEMONA = 1
+
+if len ( sys.argv ) == 3 :
+    if sys.argv [ 1 ] == "-v" :
+        ANANASA = True
+        LEMONA = 2
+    else :
+        usage ( "Invalid arguments. Flag [-v] expected" )
+        exit ( 1 )
+else :
+    if not len ( sys.argv ) == 2 :
+        usage ( "Invalid arguments" )
+        exit ( 1 )
+
+BANANA = sys.argv [ LEMONA ]
+
+##
+## First checking if file exists and executable
+##
+
+if not os.path.exists ( BANANA ):
+    print ( "\nERROR: Can not stat file [" + BANANA + "]\n" )
+    exit ( 1 )
+
+if not os.access ( BANANA, os.X_OK ):
+    print ( "\nERROR: File [" + BANANA + "] is not an executable\n" )
+    exit ( 1 )
+
+
+def check_stream ( stream ):
+    for line in stream:
+        if line.startswith ( "Usage:" ):
+            return True
+    return False
+
+##
+## Run command without arguments: should return non zero RC and print
+## help message.
+##
+
+if ANANASA:
+    print ( "======================================" )
+    print ( "TEST1: start command without arguments" )
+    print ( "--------------------------------------" )
+
+popca = subprocess.Popen (
+                    [ BANANA ],
+                    stdout = subprocess.PIPE,
+                    stderr = subprocess.PIPE
+                    )
+
+in_out = check_stream ( popca.stdout )
+in_err = check_stream ( popca.stderr )
+rc = popca.wait ()
+
+if not in_out and not in_err:
+    print ( "ERROR[TEST1] no help message" )
+    exit ( 1 )
+
+if rc == 0:
+    print ( "ERROR[TEST1] return code is '0'" )
+    exit ( 1 )
+
+if in_out:
+    print ( "WARNING[TEST1] help message is in 'STDOUT'" )
+
+if ANANASA:
+    print ( "Help message detected" )
+    print ( "Return code is [" + str ( rc ) + "]" )
+    print ( "Passed\n" )
+
+##
+## Run command with '-h' argument: should return zero RC and print
+## help message.
+##
+if ANANASA:
+    print ( "=======================================" )
+    print ( "TEST2: start command with '-h' argument" )
+    print ( "---------------------------------------" )
+
+popca = subprocess.Popen (
+                    [ BANANA, "-h" ],
+                    stdout = subprocess.PIPE,
+                    stderr = subprocess.PIPE
+                    )
+
+in_out = check_stream ( popca.stdout )
+in_err = check_stream ( popca.stderr )
+rc = popca.wait ()
+
+if not in_out and not in_err:
+    print ( "ERROR[TEST2] no help message" )
+    exit ( 1 )
+
+if not rc == 0:
+    print ( "ERROR[TEST2] return code is '" + str ( rc ) + "'" )
+    exit ( 1 )
+
+if in_err:
+    print ( "WARNING[TEST2] help message is in 'STDERR'" )
+
+if ANANASA:
+    print ( "Help message detected" )
+    print ( "Return code is [" + str ( rc ) + "]" )
+    print ( "Passed\n" )
+
+
+##
+## C'onclusion
+##
+
+print ( "[" + os.path.basename ( __file__ ) + "] test passed for [" + BANANA + "]\n" )
diff --git a/build/ld.linux.dlib.sh b/build/ld.linux.dlib.sh
index 4621a98..1831601 100755
--- a/build/ld.linux.dlib.sh
+++ b/build/ld.linux.dlib.sh
@@ -275,9 +275,12 @@ then
 fi
 
 # add in xml
-if [ $HAVE_XML -ne 0 ]
+if grep -q HAVE_XML2 ${BUILD_DIR}/Makefile.config.linux.$ARCH > /dev/null
 then
-    CMD="$CMD -lxml2"
+    if [ $HAVE_XML -ne 0 ]
+    then
+        CMD="$CMD -lxml2"
+    fi
 fi
 
 # add in math library
diff --git a/build/ld.linux.exe.sh b/build/ld.linux.exe.sh
index 2309105..e8b7580 100755
--- a/build/ld.linux.exe.sh
+++ b/build/ld.linux.exe.sh
@@ -60,7 +60,12 @@ i*)
 esac
 
 # EXE_CMD was started in tool-specific source
-CMD="$EXE_CMD $LDFLAGS"
+if [ $STATIC -eq 1 ]
+then
+    CMD="$EXE_STATIC_CMD $LDFLAGS"
+else
+    CMD="$EXE_CMD $LDFLAGS"
+fi
 
 # if building a static executable against dynamic libraries
 # the main application will substitute for name lookup
@@ -289,15 +294,29 @@ then
 fi
 
 # add in xml
-if [ "$HAVE_XML2" == "1" ]
+if grep -q HAVE_XML2 ${BUILD_DIR}/Makefile.config.linux.$ARCH > /dev/null
 then
-    CMD="$CMD -lxml2"
+    if grep -q XML2_LIBDIR ${BUILD_DIR}/Makefile.config.linux.$ARCH > /dev/null
+    then
+        if grep -q 'OS_DISTRIBUTOR = Ubuntu' ${BUILD_DIR}/Makefile.config.linux.$ARCH > /dev/null
+        then
+            ##### Do not link libxml2 statically on Ubuntu: it does not compile
+            XMLLIBDIR="-L$(grep XML2_LIBDIR ${BUILD_DIR}/Makefile.config.linux.$ARCH | perl -e'while(<>){if(/XML2_LIBDIR = (.+)/){print $1}}')"
+        else
+            ##### Link libxml2 statically on all linux-es except Ubuntu
+            XMLLIBDIR="-Wl,-Bstatic -L$(grep XML2_LIBDIR ${BUILD_DIR}/Makefile.config.linux.$ARCH | perl -e'while(<>){if(/XML2_LIBDIR = (.+)/){print $1}}')"
+        fi
+    fi
+    if [ $HAVE_XML -ne 0 ]
+    then
+        CMD="$CMD $XMLLIBDIR -lxml2"
+    fi
 fi
 
 # add in math library
 if [ $HAVE_M -ne 0 ]
 then
-    CMD="$CMD -lm"
+    CMD="$CMD -Wl,-Bdynamic -lm"
 fi
 
 # produce shared library
diff --git a/build/ld.linux.gcc.sh b/build/ld.linux.gcc.sh
index af6aaba..fd2e81f 100755
--- a/build/ld.linux.gcc.sh
+++ b/build/ld.linux.gcc.sh
@@ -33,7 +33,13 @@ LD_REF_SYMBOLS="-Wl,-no-whole-archive"
 
 # build command
 DLIB_CMD="$LD -shared"
-EXE_CMD="$LD"
+
+#EXE_CMD="$LD -static-libstdc++ -static-libgcc"
+source "${0%exe.sh}exe_cmd.sh" # EXE_CMD is defined in build/ld.linux.exe_cmd.sh
+
+EXE_STATIC_CMD="$EXE_CMD"
+#EXE_CMD="$LD"
+#EXE_STATIC_CMD="$LD -static"
 
 # versioned output
 if [ "$VERS" = "" ]
diff --git a/build/ld.mac.clang.sh b/build/ld.mac.clang.sh
new file mode 100755
index 0000000..fec96e5
--- /dev/null
+++ b/build/ld.mac.clang.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+# define linker params
+LD_EXPORT_GLOBAL="-Wl,-all_load"
+LD_MULTIPLE_DEFS=""
+LD_STATIC=""
+LD_DYNAMIC=""
+LD_ALL_SYMBOLS=""
+LD_REF_SYMBOLS=""
+
+# the Mac is set up for cross-compilation
+if [ "$ARCH" = "fat86" ] 
+then
+    LD="$LD -Wl,-arch_multiple"
+else
+    LD="$LD -Wl,-arch,$ARCH"
+fi
+
+# build command
+DLIB_CMD="$LD -dynamiclib"
+EXE_CMD="$LD"
+
+# Mach install-name sans extension
+INSTNAME="@executable_path/../lib/$NAME$DBGAP"
+
+# versioned output
+if [ "$VERS" = "" ]
+then
+    DLIB_CMD="$DLIB_CMD -o $TARG -install_name $INSTNAME.dylib"
+    EXE_CMD="$EXE_CMD -o $TARG"
+else
+    set-vers $(echo $VERS | tr '.' ' ')
+    DLIB_CMD="$DLIB_CMD -o $OUTDIR/$NAME$DBGAP.$VERS.dylib -install_name $INSTNAME.$VERS.dylib -compatibility_version $MAJ -current_version $VERS -flat_namespace -undefined suppress"
+    EXE_CMD="$EXE_CMD -o $OUTDIR/$NAME$DBGAP.$VERS"
+fi
diff --git a/build/ld.mac.cmn.sh b/build/ld.mac.cmn.sh
new file mode 100644
index 0000000..d3f20b1
--- /dev/null
+++ b/build/ld.mac.cmn.sh
@@ -0,0 +1,159 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+# script name
+SELF_NAME="$(basename $0)"
+
+# parameters
+LD="$1"
+ARCH="$2"
+BUILD="$3"
+shift 3
+
+SRCDIR="$1"
+BINDIR="$2"
+OUTDIR="$3"
+TARG="$4"
+NAME="$5"
+DBGAP="$6"
+shift 6
+
+VERS="$1"
+VERSFILE="$2"
+DEPFILE="$3"
+shift 3
+
+MODE="$1"
+SCMFLAGS="$2"
+LDFLAGS="$3"
+shift 3
+
+LDIRS="$1"
+XDIRS="$2"
+shift 2
+
+OBJS="$1"
+LIBS="$2"
+
+# decode MODE
+STATIC=$(expr $MODE % 2)
+MODE=$(expr $MODE / 2)
+DYLD=$(expr $MODE % 2)
+MODE=$(expr $MODE / 2)
+KPROC=$(expr $MODE % 2)
+MODE=$(expr $MODE / 2)
+THREADS=$(expr $MODE % 2)
+MODE=$(expr $MODE / 2)
+HAVE_M=$(expr $MODE % 2)
+MODE=$(expr $MODE / 2)
+HAVE_XML=$(expr $MODE % 2)
+
+# decode SCMFLAGS
+CHECKSUM=$(expr $SCMFLAGS % 2)
+STATICSYSLIBS=$(expr $SCMFLAGS / 2)
+
+# return parameter for find-lib
+LIBPATH=''
+
+# initial command state
+CMD=''
+LD_STATIC_STATE=0
+LD_ALL_STATE=0
+
+# for breaking out version
+set-vers ()
+{
+    MAJ=$1
+    MIN=$2
+    REL=$3
+}
+
+# for locating libraries
+find-lib ()
+{
+    _lib="lib$1"
+    _dirs="$2"
+
+    LIBPATH=''
+
+    while [ "$_dirs" != "" ]
+    do
+        _dir="${_dirs%%:*}"
+
+        if [ "$_dir" != "" ]
+        then
+            if [ -e "$_dir/$_lib" ]
+            then
+                while [ -L "$_dir/$_lib" ]
+                do
+                    _lib=$(readlink -n "$_dir/$_lib")
+                done
+                LIBPATH="$_dir/$_lib"
+                break;
+            fi
+        fi
+
+        _dirs="${_dirs#$_dir}"
+        _dirs="${_dirs#:}"
+    done
+}
+
+# setting state
+load-static ()
+{
+    if [ $LD_STATIC_STATE -eq 0 ]
+    then
+        CMD="$CMD $LD_STATIC"
+        LD_STATIC_STATE=1
+    fi
+}
+
+load-dynamic ()
+{
+    if [ $LD_STATIC_STATE -eq 1 ]
+    then
+        CMD="$CMD $LD_DYNAMIC"
+        LD_STATIC_STATE=0
+    fi
+}
+
+load-all-symbols ()
+{
+    if [ $LD_ALL_STATE -eq 0 ]
+    then
+        CMD="$CMD $LD_ALL_SYMBOLS"
+        # the Mac linker doesn't support state
+        LD_ALL_STATE=0
+    fi
+}
+
+load-ref-symbols ()
+{
+    if [ $LD_ALL_STATE -eq 1 ]
+    then
+        CMD="$CMD $LD_REF_SYMBOLS"
+        LD_ALL_STATE=0
+    fi
+}
diff --git a/build/ld.mac.dlib.sh b/build/ld.mac.dlib.sh
new file mode 100755
index 0000000..83b00ed
--- /dev/null
+++ b/build/ld.mac.dlib.sh
@@ -0,0 +1,361 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+# ===========================================================================
+# input library types, and their handling
+#
+#  normal linkage
+#   -l : find shared or static
+#   -s : require static
+#   -d : require shared
+#
+#  static linkage
+#   -l : require static
+#   -s : require static
+#   -d : ignore
+# ===========================================================================
+
+# script name
+SELF_NAME="$(basename $0)"
+
+# parameters and common functions
+source "${0%dlib.sh}cmn.sh"
+
+# discover tool chain
+case "$LD" in
+g*)
+    source "${0%dlib.sh}gcc.sh"
+    ;;
+c*)
+    source "${0%dlib.sh}clang.sh"
+    ;;
+ *)
+    echo "$SELF_NAME: unrecognized ld tool - '$LD'"
+    exit 5
+esac
+
+# DLIB_CMD was started in tool-specific source
+CMD="$DLIB_CMD $LDFLAGS"
+
+# tack on object files
+CMD="$CMD $OBJS"
+
+# function to convert an archive into individual object files
+convert-static ()
+{
+    # list members
+    local path="$1"
+    local mbrs="$(ar -t $path | grep -v '__.SYMDEF SORTED')"
+
+    # unpack archive into temporary directory
+    mkdir -p ld-tmp
+    if ! cd ld-tmp
+    then
+        echo "$SELF_NAME: failed to cd to ld-tmp"
+        exit 5
+    fi
+    ar -x "$path"
+
+    # rename and add to source files list
+    local m=
+    for m in $mbrs
+    do
+        mv $m $LIBNAME-$m
+        CMD="$CMD ld-tmp/$LIBNAME-$m"
+    done
+
+    # return to prior location
+    cd - > /dev/null
+}
+
+# initial dependency upon Makefile and vers file
+DEPS="$SRCDIR/Makefile"
+if [ "$LIBS" != "" ]
+then
+    # tack on paths
+    DIRS="$LDIRS:$XDIRS"
+    while [ "$DIRS" != "" ]
+    do
+        DIR="${DIRS%%:*}"
+        [ "$DIR" != "" ] && CMD="$CMD -L$DIR"
+        DIRS="${DIRS#$DIR}"
+        DIRS="${DIRS#:}"
+    done
+
+    # tack on libraries, finding as we go
+    for LIB in $LIBS
+    do
+
+        # strip off switch
+        LIBNAME="${LIB#-[lsd]}"
+
+        # look at linkage
+        case "$LIB" in
+        -ldl|-ddl)
+
+            # always load libdl as shared library
+            load-ref-symbols
+            load-dynamic
+            CMD="$CMD -ldl"
+            ;;
+
+        -l*)
+
+            # normal or dynamic linkage
+            FOUND=0
+            if [ $STATIC -eq 0 ]
+            then
+                find-lib $LIBNAME.dylib $LDIRS
+                if [ "$LIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # load normally
+                    load-ref-symbols
+                    load-dynamic
+                    CMD="$CMD -l$LIBNAME"
+
+                fi
+            fi
+
+            # try static only
+            if [ $FOUND -eq 0 ]
+            then
+                find-lib $LIBNAME-static.a $LDIRS
+                if [ "$LIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # add it to dependencies
+                    DEPS="$DEPS $LIBPATH"
+
+                    # load static
+#                    load-static
+#                    load-all-symbols
+#                    CMD="$CMD -l$LIBNAME-static"
+                    convert-static "$LIBPATH" || exit $?
+
+                fi
+            fi
+
+            if [ $FOUND -eq 0 ]
+            then
+                find-lib $LIBNAME.a $LDIRS
+                if [ "$LIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # add it to dependencies
+                    DEPS="$DEPS $LIBPATH"
+
+                    # load static
+#                    load-static
+#                    load-all-symbols
+#                    CMD="$CMD -l$LIBNAME"
+                    convert-static "$LIBPATH" || exit $?
+
+                fi
+            fi
+
+            # not found within our directories
+            if [ $FOUND -eq 0 ]
+            then
+
+                if [ $STATICSYSLIBS -eq 1 ]
+                then
+                    case "$LIBNAME" in
+                    z|bz2)
+                        # set load to static
+                        load-static
+                        load-all-symbols
+                        ;;
+
+                    *)
+                        # set load to dynamic
+                        load-ref-symbols
+                        load-dynamic
+                        ;;
+
+                    esac
+                else
+                    # set load to normal
+                    load-ref-symbols
+                    load-dynamic
+                fi
+
+                CMD="$CMD -l$LIBNAME"
+            fi
+            ;;
+
+        -s*)
+
+            # force static load
+            FOUND=0
+            find-lib $LIBNAME-static.a $LDIRS
+            if [ "$LIBPATH" != "" ]
+            then
+
+                # found it
+                FOUND=1
+
+                # add it to dependencies
+                DEPS="$DEPS $LIBPATH"
+
+                # load static
+#                load-static
+#                load-all-symbols
+#                CMD="$CMD -l$LIBNAME-static"
+                convert-static "$LIBPATH" || exit $?
+
+            fi
+
+            if [ $FOUND -eq 0 ]
+            then
+                find-lib $LIBNAME.a $LDIRS
+                if [ "$LIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # add it to dependencies
+                    DEPS="$DEPS $LIBPATH"
+
+                    # load static
+#                    load-static
+#                    load-all-symbols
+#                    CMD="$CMD -l$LIBNAME"
+                    convert-static "$LIBPATH" || exit $?
+
+                fi
+            fi
+
+            # not found within our directories
+            if [ $FOUND -eq 0 ]
+            then
+
+                if [ $STATIC -eq 1 ] || [ $STATICSYSLIBS -eq 1 ]
+                then
+                    # set load to static
+                    load-static
+                    load-all-symbols
+                else
+
+                    case "$LIBNAME" in
+                    z|bz2)
+                        # set load to dynamic
+                        load-ref-symbols
+                        load-dynamic
+                        ;;
+
+                    *)
+                        # set load to static
+                        load-static
+                        load-all-symbols
+                        ;;
+                    esac
+                fi
+
+                CMD="$CMD -l$LIBNAME"
+            fi
+            ;;
+
+        -d*)
+
+            # only dynamic linkage
+            FOUND=0
+            if [ $STATIC -eq 0 ]
+            then
+                find-lib $LIBNAME.dylib $LDIRS
+                if [ "$LIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # load normally
+                    load-ref-symbols
+                    load-dynamic
+                    CMD="$CMD -l$LIBNAME"
+
+                fi
+            fi
+
+            # not found within our directories
+            if [ $FOUND -eq 0 ]
+            then
+                # set load to normal
+                load-ref-symbols
+                load-dynamic
+                CMD="$CMD -l$LIBNAME"
+            fi
+            ;;
+
+        esac
+
+    done
+fi
+
+# put state back to normal
+load-ref-symbols
+load-dynamic
+
+# add in pthreads
+if [ $THREADS -ne 0 ]
+then
+    CMD="$CMD -lpthread"
+fi
+
+# add in xml
+if [ $HAVE_XML -ne 0 ]
+then
+    CMD="$CMD -lxml2 -liconv"
+fi
+
+# add in math library
+if [ $HAVE_M -ne 0 ]
+then
+    CMD="$CMD -lm"
+fi
+
+# produce shared library
+echo "$CMD"
+$CMD || exit $?
+
+# remove temporaries
+rm -rf ld-tmp
+
+# produce dependencies
+if [ "$DEPFILE" != "" ]
+then
+    echo "$TARG: $DEPS" > "$DEPFILE"
+fi
diff --git a/build/ld.mac.exe.sh b/build/ld.mac.exe.sh
new file mode 100755
index 0000000..6c6369f
--- /dev/null
+++ b/build/ld.mac.exe.sh
@@ -0,0 +1,340 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+# ===========================================================================
+# input library types, and their handling
+#
+#  normal linkage
+#   -l : find shared or static
+#   -s : require static
+#   -d : ignore - will be dynamically loaded
+#
+#  static linkage
+#   -l : require static
+#   -s : require static
+#   -d : require static
+# ===========================================================================
+
+
+# script name
+SELF_NAME="$(basename $0)"
+
+# parameters and common functions
+source "${0%exe.sh}cmn.sh"
+
+# discover tool chain
+case "$LD" in
+g*)
+    source "${0%exe.sh}gcc.sh"
+    ;;
+c*)
+    source "${0%exe.sh}clang.sh"
+    ;;
+*)
+    echo "$SELF_NAME: unrecognized ld tool - '$LD'"
+    exit 5
+esac
+
+# EXE_CMD was started in tool-specific source
+CMD="$EXE_CMD $LDFLAGS"
+
+# if building a static executable against dynamic libraries
+# the main application will substitute for name lookup
+if [ $STATIC -eq 1 ] && [ $DYLD -eq 1 ]
+then
+    CMD="$CMD $LD_EXPORT_GLOBAL $LD_MULTIPLE_DEFS"
+fi
+
+# tack on object files
+CMD="$CMD $OBJS"
+
+# initial dependency upon Makefile and vers file
+DEPS="$SRCDIR/Makefile $VERSFILE"
+if [ "$LIBS" != "" ]
+then
+    # tack on paths
+    DIRS="$LDIRS:$XDIRS"
+    while [ "$DIRS" != "" ]
+    do
+        DIR="${DIRS%%:*}"
+        [ "$DIR" != "" ] && CMD="$CMD -L$DIR"
+        DIRS="${DIRS#$DIR}"
+        DIRS="${DIRS#:}"
+    done
+
+    # tack on libraries, finding as we go
+    for LIB in $LIBS
+    do
+
+        # strip off switch
+        LIBNAME="${LIB#-[lsd]}"
+
+        # look at linkage
+        case "$LIB" in
+        -ldl|-ddl)
+
+            # always load libdl as shared library
+            load-ref-symbols
+            load-dynamic
+            CMD="$CMD -ldl"
+            ;;
+
+        -l*)
+
+            # normal or dynamic linkage
+            FOUND=0
+            if [ $STATIC -eq 0 ]
+            then
+                find-lib $LIBNAME.dylib $LDIRS
+                if [ "$LIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # load dynamic
+                    load-dynamic
+                    CMD="$CMD -l$LIBNAME"
+
+                fi
+            fi
+
+            # try static only
+            if [ $FOUND -eq 0 ]
+            then
+                find-lib $LIBNAME-static.a $LDIRS
+                if [ "$LIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # add it to dependencies
+                    DEPS="$DEPS $LIBPATH"
+
+                    # load static
+                    load-static
+                    [ $STATIC -eq 1 ] && load-all-symbols
+                    CMD="$CMD -l$LIBNAME-static"
+
+                fi
+            fi
+
+            if [ $FOUND -eq 0 ]
+            then
+                find-lib $LIBNAME.a $LDIRS
+                if [ "$LIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # add it to dependencies
+                    DEPS="$DEPS $LIBPATH"
+
+                    # load static
+                    load-static
+                    [ $STATIC -eq 1 ] && load-all-symbols
+                    CMD="$CMD -l$LIBNAME"
+
+                fi
+            fi
+
+            # not found within our directories
+            if [ $FOUND -eq 0 ]
+            then
+
+                # do not need to load all symbols for external libs
+                [ $STATIC -eq 1 ] && load-ref-symbols
+
+                if [ $STATICSYSLIBS -eq 1 ]
+                then
+                    case "$LIBNAME" in
+                    z|bz2)
+                        # set load to static
+                        load-static
+                        ;;
+
+                    *)
+                        # set load to dynamic
+                        load-dynamic
+                        ;;
+
+                    esac
+                else
+                    # set load to normal
+                    load-dynamic
+                fi
+
+                CMD="$CMD -l$LIBNAME"
+            fi
+            ;;
+
+        -s*)
+
+            # force static load
+            FOUND=0
+            find-lib $LIBNAME-static.a $LDIRS
+            if [ "$LIBPATH" != "" ]
+            then
+
+                # found it
+                FOUND=1
+
+                # add it to dependencies
+                DEPS="$DEPS $LIBPATH"
+
+                # load static
+                load-static
+                [ $STATIC -eq 1 ] && load-all-symbols
+                CMD="$CMD -l$LIBNAME-static"
+
+            fi
+
+            if [ $FOUND -eq 0 ]
+            then
+                find-lib $LIBNAME.a $LDIRS
+                if [ "$LIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # add it to dependencies
+                    DEPS="$DEPS $LIBPATH"
+
+                    # load static
+                    load-static
+                    [ $STATIC -eq 1 ] && load-all-symbols
+                    CMD="$CMD -l$LIBNAME"
+
+                fi
+            fi
+
+            # not found within our directories
+            if [ $FOUND -eq 0 ]
+            then
+
+                # do not need to load all symbols for external libs
+                [ $STATIC -eq 1 ] && load-ref-symbols
+
+                if [ $STATIC -eq 1 ] || [ $STATICSYSLIBS -eq 1 ]
+                then
+
+                    # set load to static
+                    load-static
+
+                else
+
+                    # special case for libs we have in "ext"
+                    # that are sometimes requested as static
+                    case "$LIBNAME" in
+                    z|bz2)
+                        # set load to dynamic
+                        load-dynamic
+                        ;;
+                    *)
+                        load-static
+                        ;;
+                    esac
+                fi
+
+                CMD="$CMD -l$LIBNAME"
+            fi
+            ;;
+
+        -d*)
+
+            FOUND=0
+            if [ $STATIC -eq 1 ]
+            then
+                find-lib $LIBNAME.a $LDIRS
+                if [ "$LIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # add it to dependencies
+                    DEPS="$DEPS $LIBPATH"
+
+                    # load static
+                    load-static
+                    load-all-symbols
+
+                    CMD="$CMD -l$LIBNAME"
+
+                fi
+
+                # not found within our directories
+                if [ $FOUND -eq 0 ]
+                then
+                    load-static
+                    load-all-symbols
+
+                    CMD="$CMD -l$LIBNAME"
+                fi
+            fi
+            ;;
+
+
+        esac
+
+    done
+fi
+
+# return to normal
+load-ref-symbols
+load-dynamic
+
+# add in pthreads
+if [ $THREADS -ne 0 ]
+then
+    CMD="$CMD -lpthread"
+fi
+
+# add in xml
+if [ $HAVE_XML -ne 0 ]
+then
+    CMD="$CMD -lxml2 -liconv"
+fi
+
+# add in math library
+if [ $HAVE_M -ne 0 ]
+then
+    CMD="$CMD -lm"
+fi
+
+# produce shared library
+echo $CMD
+$CMD || exit $?
+
+# produce dependencies
+if [ "$DEPFILE" != "" ]
+then
+    echo "$TARG: $DEPS" > "$DEPFILE"
+fi
+
diff --git a/build/ld.mac.gcc.sh b/build/ld.mac.gcc.sh
new file mode 100755
index 0000000..fec96e5
--- /dev/null
+++ b/build/ld.mac.gcc.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+# define linker params
+LD_EXPORT_GLOBAL="-Wl,-all_load"
+LD_MULTIPLE_DEFS=""
+LD_STATIC=""
+LD_DYNAMIC=""
+LD_ALL_SYMBOLS=""
+LD_REF_SYMBOLS=""
+
+# the Mac is set up for cross-compilation
+if [ "$ARCH" = "fat86" ] 
+then
+    LD="$LD -Wl,-arch_multiple"
+else
+    LD="$LD -Wl,-arch,$ARCH"
+fi
+
+# build command
+DLIB_CMD="$LD -dynamiclib"
+EXE_CMD="$LD"
+
+# Mach install-name sans extension
+INSTNAME="@executable_path/../lib/$NAME$DBGAP"
+
+# versioned output
+if [ "$VERS" = "" ]
+then
+    DLIB_CMD="$DLIB_CMD -o $TARG -install_name $INSTNAME.dylib"
+    EXE_CMD="$EXE_CMD -o $TARG"
+else
+    set-vers $(echo $VERS | tr '.' ' ')
+    DLIB_CMD="$DLIB_CMD -o $OUTDIR/$NAME$DBGAP.$VERS.dylib -install_name $INSTNAME.$VERS.dylib -compatibility_version $MAJ -current_version $VERS -flat_namespace -undefined suppress"
+    EXE_CMD="$EXE_CMD -o $OUTDIR/$NAME$DBGAP.$VERS"
+fi
diff --git a/build/ld.mac.ln.sh b/build/ld.mac.ln.sh
new file mode 100755
index 0000000..55216fd
--- /dev/null
+++ b/build/ld.mac.ln.sh
@@ -0,0 +1,103 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+# script name
+SELF_NAME="$(basename $0)"
+
+# parameters
+TYPE="$1"
+OUTDIR="$2"
+TARG="$3"
+NAME="$4"
+DBGAP="$5"
+EXT="$6"
+VERS="$7"
+
+# find target
+TARG=$(basename "$TARG")
+
+# put extension back onto name, unless it's "dylib"
+NAME="$NAME$DBGAP"
+STATIC_LIB_NAME="$NAME-static.a"
+[ "$EXT" != "" ] && [ "$EXT" != "dylib" ] && NAME="$NAME.$EXT"
+
+# break out version
+set-vers ()
+{
+    MAJ=$1
+    MIN=$2
+    REL=$3
+}
+
+set-vers $(echo $VERS | tr '.' ' ')
+
+cd "$OUTDIR" || exit 5
+
+# assemble versioned names
+NAME_MMR="$NAME.$MAJ.$MIN.$REL"
+NAME_MM="$NAME.$MAJ.$MIN"
+NAME_M="$NAME.$MAJ"
+
+# if extension was "dylib", NOW append to names
+if [ "$EXT" = "dylib" ]
+then
+    NAME_MMR="$NAME_MMR.$EXT"
+    NAME_MM="$NAME_MM.$EXT"
+    NAME_M="$NAME_M.$EXT"
+    NAME="$NAME.$EXT"
+fi
+
+# create link
+create-link ()
+{
+    rm -f "$2"
+    local CMD="ln -s $1 $2"
+    echo $CMD
+    $CMD
+}
+
+# test for version in target name
+if [ "$TARG" != "$NAME_MMR" ]
+then
+
+    # for simple name, create 2 links
+    if [ "$TARG" = "$NAME" ]
+    then
+        create-link "$NAME_MMR" "$NAME_M"
+        create-link "$NAME_M" "$NAME"
+        [ "$EXT" = "a" ] && create-link "$NAME" "$STATIC_LIB_NAME"
+
+    # for name with major version in it
+    elif [ "$TARG" = "$NAME_M" ]
+    then
+        create-link "$NAME_MMR" "$NAME_M"
+
+
+    # for name with major & minor version in it
+    elif [ "$TARG" = "$NAME_MM" ]
+    then
+        create-link "$NAME_MMR" "$NAME_MM"
+    fi
+fi
diff --git a/build/ld.mac.slib.sh b/build/ld.mac.slib.sh
new file mode 100755
index 0000000..01f420f
--- /dev/null
+++ b/build/ld.mac.slib.sh
@@ -0,0 +1,101 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+# ===========================================================================
+# input library types, and their handling
+#
+#  normal or static linkage
+#   -l : require static
+#   -s : require static
+#   -d : ignore
+# ===========================================================================
+
+# script name
+SELF_NAME="$(basename $0)"
+
+# parameters and common functions
+source "${0%slib.sh}cmn.sh"
+
+# initialize command
+CMD="libtool -static -o "
+
+# versioned output
+if [ "$VERS" = "" ]
+then
+    CMD="$CMD $TARG"
+else
+    set-vers $(echo $VERS | tr '.' ' ')
+    CMD="$CMD $OUTDIR/$NAME$DBGAP.a.$VERS"
+fi
+
+# tack on object files
+CMD="$CMD $OBJS"
+
+# initial dependency upon Makefile and vers file
+DEPS="$SRCDIR/Makefile"
+if [ "$LIBS" != "" ]
+then
+    # tack on libraries, finding as we go
+    for LIB in $LIBS
+    do
+
+        # strip off switch
+        LIBNAME="${LIB#-[lsd]}"
+
+        # look at linkage
+        case "$LIB" in
+        -s*)
+
+            # force static load
+            find-lib $LIBNAME.a $LDIRS
+            if [ "$LIBPATH" != "" ]
+            then
+
+                # add it to dependencies
+                DEPS="$DEPS $LIBPATH"
+
+                # simply add the library to the link line - libtool handles static libraries correctly
+                CMD="$CMD $LIBPATH"
+            fi
+            ;;
+
+        esac
+
+    done
+fi
+
+# produce static library
+echo $CMD
+$CMD || exit $?
+
+# remove temporaries
+rm -rf ld-tmp
+
+# produce dependencies
+if [ "$DEPFILE" != "" ] && [ "$DEPS" != "" ]
+then
+    echo "$TARG: $DEPS" > "$DEPFILE"
+fi
diff --git a/build/ld.sh b/build/ld.sh
index 1293a0e..734c6ab 100755
--- a/build/ld.sh
+++ b/build/ld.sh
@@ -301,7 +301,10 @@ do
         HAVE_BZIP=1
         HAVE_KFC=1
         NEED_M=1
-        NEED_XML=1
+
+        NEED_XML=$CONFIGURE_FOUND_XML2
+                # CONFIGURE_FOUND_XML2 comes from Makefile.config.$OS.$ARCH
+
         LIBS="$LIBS $1"
         ;;
     -[lds]ncbi-ngs-c++)
@@ -311,7 +314,7 @@ do
         HAVE_BZIP=1
         HAVE_KFC=1
         NEED_M=1
-        NEED_XML=1
+        NEED_XML=$CONFIGURE_FOUND_XML2
         LIBS="$LIBS $1"
         ;;
     -[lds]ncbi-wvdb)
@@ -321,7 +324,7 @@ do
         HAVE_BZIP=1
         HAVE_KFC=1
         NEED_M=16
-        NEED_XML=1
+        NEED_XML=$CONFIGURE_FOUND_XML2
         LIBS="$LIBS $1"
         ;;
 
diff --git a/build/ld.win.cmn.sh b/build/ld.win.cmn.sh
new file mode 100755
index 0000000..19fae3a
--- /dev/null
+++ b/build/ld.win.cmn.sh
@@ -0,0 +1,225 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+VERBOSE=
+if [ "$VERBOSE" != "" ] ; then echo "$0 $*"; fi
+
+# script name
+SELF_NAME="$(basename $0)"
+
+# parameters
+LD="$1"
+ARCH="$2"
+BUILD="$3"
+shift 3
+
+SRCDIR="$1"
+BINDIR="$2"
+OUTDIR="$3"
+TARG="$4"
+NAME="$5"
+DBGAP="$6"
+shift 6
+
+VERS="$1"
+VERSFILE="$2"
+DEPFILE="$3"
+shift 3
+
+MODE="$1"
+SCMFLAGS="$2"
+LDFLAGS="$3"
+shift 3
+
+LDIRS="$1"
+XDIRS="$2"
+shift 2
+
+OBJS="$1"
+LIBS="$2"
+shift 2
+
+PROXY_TOOL=$1
+RHOST=$2
+RPORT=$3
+RHOME=$4
+LHOME=$5
+WORKDIR=$6
+ROUTDIR=$7
+LOUTDIR=$8
+shift 8
+
+# decode MODE
+STATIC=$(expr $MODE % 2)
+MODE=$(expr $MODE / 2)
+DYLD=$(expr $MODE % 2)
+MODE=$(expr $MODE / 2)
+KPROC=$(expr $MODE % 2)
+MODE=$(expr $MODE / 2)
+THREADS=$(expr $MODE % 2)
+MODE=$(expr $MODE / 2)
+HAVE_M=$(expr $MODE % 2)
+MODE=$(expr $MODE / 2)
+HAVE_XML=$(expr $MODE % 2)
+
+##### TEMPORARY #####
+KPROC=0
+THREADS=0
+HAVE_M=0
+HAVE_XML=0
+#####################
+
+# decode SCMFLAGS
+CHECKSUM=$(expr $SCMFLAGS % 2)
+STATICSYSLIBS=$(expr $SCMFLAGS / 2)
+
+# set target architecture
+if [ "$ARCH" == "i386" ]
+then
+    LDFLAGS="$LDFLAGS /MACHINE:x86"
+else
+    LDFLAGS="$LDFLAGS /MACHINE:x64"
+fi
+
+if [ "$VERBOSE" != "" ] 
+then
+echo "LD            =$LD"
+echo "ARCH          =$ARCH"
+echo "BUILD         =$BUILD"
+echo "SRCDIR        =$SRCDIR"        
+echo "BINDIR        =$BINDIR"        
+echo "OUTDIR        =$OUTDIR"        
+echo "TARG          =$TARG"          
+echo "NAME          =$NAME"          
+echo "DBGAP         =$DBGAP"         
+echo "VERS          =$VERS"          
+echo "VERSFILE      =$VERSFILE"      
+echo "DEPFILE       =$DEPFILE"       
+echo "MODE          =$MODE"          
+echo "SCMFLAGS      =$SCMFLAGS"      
+echo "LDFLAGS       =$LDFLAGS"       
+echo "LDIRS         =$LDIRS"         
+echo "XDIRS         =$XDIRS"         
+echo "OBJS          =$OBJS"          
+echo "LIBS          =$LIBS"   
+echo "PROXY_TOOL    =$PROXY_TOOL"   
+echo "RHOST         =$RHOST"   
+echo "RPORT         =$RPORT"   
+echo "RHOME         =$RHOME"   
+echo "LHOME         =$LHOME"   
+echo "WORKDIR       =$WORKDIR" 
+echo "ROUTDIR       =$ROUTDIR" 
+echo "LOUTDIR       =$LOUTDIR"       
+echo "STATIC        =$STATIC"        
+echo "MODE          =$MODE"          
+echo "DYLD          =$DYLD"          
+echo "MODE          =$MODE"          
+echo "KPROC         =$KPROC"         
+echo "MODE          =$MODE"          
+echo "THREADS       =$THREADS"       
+echo "MODE          =$MODE"          
+echo "HAVE_M        =$HAVE_M"        
+echo "HAVE_XML      =$HAVE_XML"        
+echo "CHECKSUM      =$CHECKSUM"      
+echo "STATICSYSLIBS =$STATICSYSLIBS" 
+fi
+
+# return parameter for find-lib
+xLIBPATH=''
+
+# initial command state
+CMD=''
+LD_STATIC_STATE=0
+LD_ALL_STATE=0
+
+# for breaking out version
+set-vers ()
+{
+    MAJ=$1
+    MIN=$2
+    REL=$3
+}
+
+# for locating libraries
+find-lib ()
+{
+    _lib="lib$1"
+    _dirs="$2"
+
+    xLIBPATH=''
+
+    while [ "$_dirs" != "" ]
+    do
+        _dir="${_dirs%%:*}"
+
+        if [ "$_dir" != "" ]
+        then
+            if [ -e "$_dir/$_lib" ]
+            then
+                xLIBPATH="$_dir/$_lib"
+                break;
+            fi
+        fi
+
+        _dirs="${_dirs#$_dir}"
+        _dirs="${_dirs#:}"
+    done
+}
+
+# setting state
+load-static ()
+{
+    if [ $LD_STATIC_STATE -eq 0 ]
+    then
+        CMD="$CMD $LD_STATIC"
+        LD_STATIC_STATE=1
+    fi
+}
+
+load-dynamic ()
+{
+    if [ $LD_STATIC_STATE -eq 1 ]
+    then
+        CMD="$CMD $LD_DYNAMIC"
+        LD_STATIC_STATE=0
+    fi
+}
+
+load-all-symbols ()
+{
+    if [ $LD_ALL_STATE -eq 0 ]
+    then
+        CMD="$CMD $LD_ALL_SYMBOLS"
+        LD_ALL_STATE=1
+    fi
+}
+
+load-ref-symbols ()
+{
+    if [ $LD_ALL_STATE -eq 1 ]
+    then
+        CMD="$CMD $LD_REF_SYMBOLS"
+        LD_ALL_STATE=0
+    fi
+}
diff --git a/build/ld.win.dlib.sh b/build/ld.win.dlib.sh
new file mode 100755
index 0000000..a006fcc
--- /dev/null
+++ b/build/ld.win.dlib.sh
@@ -0,0 +1,327 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+# ===========================================================================
+# input library types, and their handling
+#
+#  normal linkage
+#   -l : find shared or static
+#   -s : require static
+#   -d : require shared
+#
+#  static linkage
+#   -l : require static
+#   -s : require static
+#   -d : ignore
+# ===========================================================================
+
+
+# script name
+SELF_NAME="$(basename $0)"
+
+# parameters and common functions
+source "${0%dlib.sh}cmn.sh"
+
+# discover tool chain
+case "$LD" in
+link)
+    source "${0%dlib.sh}vc++.sh"
+    ;;
+ *)
+    echo "$SELF_NAME: unrecognized ld tool - '$LD'"
+    exit 5
+esac
+
+# DLIB_CMD was started in tool-specific source
+CMD="$DLIB_CMD $LDFLAGS OLE32.lib Ws2_32.lib"
+
+# function to convert static libraries to individual COFF files
+convert-static ()
+{
+    # list members
+    local path="$1"
+    local mbrs="$(ar -t $path)"
+
+    # create sub directory
+    rm -rf "$2" && mkdir "$2"
+    if ! cd "$2"
+    then
+        echo "$SELF_NAME: failed to cd to $2"
+        exit 5
+    fi
+    ar -x "$path"
+
+    # add source files to link
+    local m=
+    for m in $mbrs
+    do
+        CMD="$CMD $2/$m"
+    done
+
+    # return to prior location
+    cd - > /dev/null
+}
+
+# tack on object files
+CMD="$CMD $(cygpath -w $OBJS)"
+
+# initial dependency upon Makefile and vers file
+DEPS="$SRCDIR/Makefile $DEF_FILE"
+if [ "$LIBS" != "" ]
+then
+    # tack on paths
+    DIRS="$LDIRS:$XDIRS"
+    while [ "$DIRS" != "" ]
+    do
+        DIR="${DIRS%%:*}"
+        [ "$DIR" != "" ] && CMD="$CMD /LIBPATH:$(cygpath -w $DIR)"
+        DIRS="${DIRS#$DIR}"
+        DIRS="${DIRS#:}"
+    done
+
+    HAVE_KERNEL32=0
+    HAVE_CLIB=0
+
+    if [ $THREADS -ne 0 ] || [ $KPROC -ne 0 ]
+    then
+        [ $STATIC -eq 0 ] && CMD="$CMD /MD"
+    fi
+    
+    # tack on libraries, finding as we go
+    for xLIB in $LIBS
+    do
+
+        # strip off switch
+        xLIBNAME="${xLIB#-[lsd]}"
+
+        # map xLIBNAME
+        case "$xLIBNAME" in
+        
+        # redirect libdl to link against Kernel32.lib in case of windows
+        dl)
+            if [ $HAVE_KERNEL32 -ne 1 ]
+            then
+                load-ref-symbols
+                load-dynamic
+                CMD="$CMD Kernel32.lib"
+                HAVE_KERNEL32=1
+            fi
+            continue
+            ;;
+
+        # redirect libm to link against libc.lib in case of windows
+        # omitting the lib defaults to linking against libc.lib
+        m)
+            if [ $HAVE_CLIB -ne 1 ]
+            then
+                load-ref-symbols
+                load-dynamic
+                HAVE_CLIB=1
+            fi
+            continue
+            ;;
+
+##### TEMPORARY #####
+# use ksproc for kproc
+    kproc)
+        xLIBNAME=ksproc
+        ;;
+#####################
+
+        esac
+
+        # look at linkage
+        case "$xLIB" in
+        -l*)
+
+            # normal or dynamic linkage
+            FOUND=0
+            if [ $STATIC -eq 0 ]
+            then
+                find-lib $xLIBNAME.lib $LDIRS
+                if [ "$xLIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # load normally
+                    load-ref-symbols
+                    load-dynamic
+                    CMD="$CMD lib$xLIBNAME.lib"
+
+                fi
+            fi
+
+            # try static only
+            if [ $FOUND -eq 0 ]
+            then
+                find-lib $xLIBNAME.a $LDIRS
+                if [ "$xLIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # add it to dependencies
+                    DEPS="$DEPS $xLIBPATH"
+
+                    # load static
+                    load-static
+                    load-all-symbols
+                    convert-static "$xLIBPATH" "lib$xLIBNAME"
+
+                fi
+            fi
+
+            # not found within our directories
+            if [ $FOUND -eq 0 ]
+            then
+                # set load to normal
+                load-ref-symbols
+                load-dynamic
+                CMD="$CMD lib$xLIBNAME.lib"
+            fi
+            ;;
+
+        -s*)
+
+            # force static load
+            FOUND=0
+            find-lib $xLIBNAME.a $LDIRS
+            if [ "$xLIBPATH" != "" ]
+            then
+
+                # found it
+                FOUND=1
+
+                # add it to dependencies
+                DEPS="$DEPS $xLIBPATH"
+
+                # load static
+                load-static
+                load-all-symbols
+                convert-static "$xLIBPATH" "lib$xLIBNAME"
+
+            fi
+
+            # not found within our directories
+            if [ $FOUND -eq 0 ]
+            then
+                # set load to static
+                load-static
+                load-all-symbols
+                CMD="$CMD lib$xLIBNAME.lib"
+            fi
+            ;;
+
+        -d*)
+
+            # only dynamic linkage
+            FOUND=0
+            if [ $STATIC -eq 0 ]
+            then
+                find-lib $xLIBNAME.lib $LDIRS
+                if [ "$xLIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # load normally
+                    load-ref-symbols
+                    load-dynamic
+                    CMD="$CMD lib$xLIBNAME.lib"
+
+                fi
+            fi
+
+            # try static if performing static build
+            # because we HAVE to link against something,
+            # and the dependency code is being statically
+            # linked into an executable...
+            if [ $FOUND -eq 0 ] && [ $STATIC -eq 1 ]
+            then
+                find-lib $xLIBNAME.a $LDIRS
+                if [ "$xLIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # add it to dependencies
+                    DEPS="$DEPS $xLIBPATH"
+
+                    # load static
+                    load-static
+                    load-all-symbols
+                    convert-static "$xLIBPATH" "lib$xLIBNAME"
+
+                fi
+            fi
+
+            # not found within our directories
+            if [ $FOUND -eq 0 ]
+            then
+                # set load to normal
+                load-ref-symbols
+                load-dynamic
+                CMD="$CMD lib$xLIBNAME.lib"
+            fi
+            ;;
+
+        esac
+
+    done
+fi
+
+# put state back to normal
+load-ref-symbols
+load-dynamic
+
+# produce shared library, stub library and exp file
+echo $CMD
+$CMD
+STATUS=$?
+if [[ ${STATUS} != 0 ]]
+then
+    rm -f "$TARG" "${TARG%lib}dll"
+    exit $STATUS
+fi
+
+# copy dll to binary directory, so they can be found by the executables
+cp "${TARG%lib}dll" "$BINDIR"
+STATUS=$?
+if [[ ${STATUS} != 0 ]]
+then
+    exit $STATUS
+fi
+
+# produce dependencies
+if [ "$DEPFILE" != "" ]
+then
+    echo "$TARG: $DEPS" > "$DEPFILE"
+fi
diff --git a/build/ld.win.exe.sh b/build/ld.win.exe.sh
new file mode 100755
index 0000000..e91ce43
--- /dev/null
+++ b/build/ld.win.exe.sh
@@ -0,0 +1,321 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+# ===========================================================================
+# input library types, and their handling
+#
+#  normal linkage
+#   -l : find shared or static
+#   -s : require static
+#   -d : ignore - will be dynamically loaded
+#
+#  static linkage
+#   -l : require static
+#   -s : require static
+#   -d : require static
+# ===========================================================================
+
+
+# script name
+SELF_NAME="$(basename $0)"
+
+# parameters and common functions
+source "${0%exe.sh}cmn.sh"
+
+# discover tool chain
+case "$LD" in
+link)
+    source "${0%exe.sh}vc++.sh"
+    ;;
+*)
+    echo "$SELF_NAME: unrecognized ld tool - '$LD'"
+    exit 5
+esac
+
+# EXE_CMD was started in tool-specific source
+CMD="$EXE_CMD $LDFLAGS OLE32.lib Ws2_32.lib"
+
+# if building a static executable against dynamic libraries
+# the main application will substitute for name lookup
+if [ $STATIC -eq 1 ] && [ $DYLD -eq 1 ]
+then
+    CMD="$CMD $LD_EXPORT_GLOBAL $LD_MULTIPLE_DEFS"
+fi
+
+# function to convert static libraries to individual COFF files
+convert-static ()
+{
+    if [ $STATIC -eq 0 ]
+    then
+        CMD="$CMD $2.a"
+    else
+        # list members
+        local path=`cd $(dirname $1);pwd`/$(basename $1) # make sure path is absolute
+        local mbrs="$(ar -t $path)"
+
+        # create sub directory
+        rm -rf "$2" && mkdir "$2"
+        if ! cd "$2"
+        then
+            echo "$SELF_NAME: failed to cd to $2"
+            exit 5
+        fi
+        ar -x "$path"
+
+        # add source files to link
+        local m=
+        for m in $mbrs
+        do
+            CMD="$CMD $2/$m"
+        done
+
+        # return to prior location
+        cd - > /dev/null
+    fi
+}
+
+# tack on object files
+CMD="$CMD $(cygpath -w $OBJS)"
+
+# initial dependency upon Makefile - no vers file on Windows
+DEPS="$SRCDIR/Makefile"
+if [ "$LIBS" != "" ]
+then
+    # tack on paths
+    DIRS="$LDIRS:$XDIRS"
+    while [ "$DIRS" != "" ]
+    do
+        DIR="${DIRS%%:*}"
+        [ "$DIR" != "" ] && CMD="$CMD /LIBPATH:$(cygpath -w $DIR)"
+        DIRS="${DIRS#$DIR}"
+        DIRS="${DIRS#:}"
+    done
+
+    HAVE_KERNEL32=0
+    HAVE_WS2=0
+    HAVE_CLIB=0
+
+    if [ $THREADS -ne 0 ] || [ $KPROC -ne 0 ]
+    then
+        if [ $STATIC -ne 0 ]
+        then
+            CMD="$CMD /MT"
+        else
+            CMD="$CMD /MD"
+        fi
+    fi
+
+    # tack on libraries, finding as we go
+    for xLIB in $LIBS
+    do
+
+        # strip off switch
+        xLIBNAME="${xLIB#-[lsd]}"
+
+        # map xLIBNAME
+        case "$xLIBNAME" in
+        dl)
+            if [ $HAVE_KERNEL32 -ne 1 ]
+            then
+                load-ref-symbols
+                load-dynamic
+                CMD="$CMD Kernel32.lib"
+                HAVE_KERNEL32=1
+            fi
+            continue
+            ;;
+
+        ws2)
+            if [ $HAVE_WS2 -ne 1 ]
+            then
+                load-ref-symbols
+                load-dynamic
+                CMD="$CMD ws2_32.lib"
+                HAVE_WS2=1
+            fi
+            continue
+            ;;
+
+        # redirect libm to link against libc.lib in case of windows
+        # omitting the lib defaults to linking against libc.lib
+        m)
+            if [ $HAVE_CLIB -ne 1 ]
+            then
+                load-ref-symbols
+                load-dynamic
+                HAVE_CLIB=1
+            fi
+            continue
+            ;;
+
+##### TEMPORARY #####
+# use ksproc for kproc
+    kproc)
+        xLIBNAME=ksproc
+        ;;
+#####################
+
+        esac
+
+        # look at linkage
+        case "$xLIB" in
+        -l*)
+
+            # normal or dynamic linkage
+            FOUND=0
+            if [ $STATIC -eq 0 ]
+            then
+                find-lib $xLIBNAME.lib $LDIRS
+                if [ "$xLIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # load dynamic
+                    load-dynamic
+                    CMD="$CMD lib$xLIBNAME.lib"
+
+                fi
+            fi
+
+            # try static only
+            if [ $FOUND -eq 0 ]
+            then
+                find-lib $xLIBNAME.a $LDIRS
+                if [ "$xLIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # add it to dependencies
+                    DEPS="$DEPS $xLIBPATH"
+
+                    # load static
+                    load-static
+                    [ $STATIC -eq 1 ] && load-all-symbols
+                    convert-static "$xLIBPATH" "lib$xLIBNAME"
+
+                fi
+            fi
+
+            # not found within our directories
+            if [ $FOUND -eq 0 ]
+            then
+                [ $STATIC -eq 1 ] && load-ref-symbols
+                load-dynamic
+
+                CMD="$CMD lib$xLIBNAME.lib"
+            fi
+            ;;
+
+        -s*)
+
+            # force static load
+            FOUND=0
+            find-lib $xLIBNAME.a $LDIRS
+            if [ "$xLIBPATH" != "" ]
+            then
+
+                # found it
+                FOUND=1
+
+                # add it to dependencies
+                DEPS="$DEPS $xLIBPATH"
+
+                # load static
+                load-static
+                [ $STATIC -eq 1 ] && load-all-symbols
+                convert-static "$xLIBPATH" "lib$xLIBNAME"
+
+            fi
+
+            # not found within our directories
+            if [ $FOUND -eq 0 ]
+            then
+                # set load to static
+                load-static
+                [ $STATIC -eq 1 ] && load-all-symbols
+                CMD="$CMD lib$xLIBNAME.lib"
+            fi
+            ;;
+
+        -d*)
+
+            FOUND=0
+            if [ $STATIC -eq 1 ]
+            then
+                find-lib $xLIBNAME.a $LDIRS
+                if [ "$xLIBPATH" != "" ]
+                then
+
+                    # found it
+                    FOUND=1
+
+                    # add it to dependencies
+                    DEPS="$DEPS $xLIBPATH"
+
+                    # load static
+                    load-static
+                    load-all-symbols
+                    convert-static "$xLIBPATH" "lib$xLIBNAME"
+
+                fi
+
+                # not found within our directories
+                if [ $FOUND -eq 0 ]
+                then
+                    load-static
+                    load-all-symbols
+
+                    CMD="$CMD lib$xLIBNAME"
+                fi
+            fi
+            ;;
+
+
+        esac
+
+    done
+fi
+
+# return to normal
+load-ref-symbols
+load-dynamic
+
+# produce shared library
+echo $CMD
+$CMD || exit $?
+
+# produce dependencies
+if [ "$DEPFILE" != "" ]
+then
+    echo "$TARG: $DEPS" > "$DEPFILE"
+fi
+
+# cleanup temporary files
+rm -f $TARG.lib $TARG.exp
diff --git a/build/ld.win.slib.sh b/build/ld.win.slib.sh
new file mode 100755
index 0000000..17bbc25
--- /dev/null
+++ b/build/ld.win.slib.sh
@@ -0,0 +1,135 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+# ===========================================================================
+# input library types, and their handling
+#
+#  normal or static linkage
+#   -l : require static
+#   -s : require static
+#   -d : ignore
+# ===========================================================================
+
+# script name
+SELF_NAME="$(basename $0)"
+
+# parameters and common functions
+source "${0%slib.sh}cmn.sh"
+
+# initialize command
+if [ $STATIC -eq 0 ]
+then
+    CMD="lib /NOLOGO"
+else
+    CMD="ar -rc"
+fi
+
+# function to convert an archive into individual object files
+convert-static ()
+{
+    # list members
+    local path="$1"
+    local mbrs="$(ar -t $path)"
+
+    # unpack archive into temporary directory
+    mkdir -p ld-tmp
+    if ! cd ld-tmp
+    then
+        echo "$SELF_NAME: failed to cd to ld-tmp"
+        exit 5
+    fi
+    ar -x "$path"
+
+    # rename and add to source files list
+    local m=
+    for m in $mbrs
+    do
+        mv $m $NAME-$m
+        CMD="$CMD ld-tmp/$NAME-$m"
+    done
+
+    # return to prior location
+    cd - > /dev/null
+}
+
+if [ $STATIC -eq 0 ]
+then 
+    # no versioned output here, sorry
+    CMD="$CMD /OUT:$(cygpath -w $TARG)"
+
+    # tack on object files
+    CMD="$CMD $(cygpath -w $OBJS)"
+else
+    CMD="$CMD $TARG $OBJS"
+fi
+
+
+# initial dependency upon Makefile and vers file
+DEPS="$SRCDIR/Makefile"
+if [ "$LIBS" != "" ]
+then
+    # tack on libraries, finding as we go
+    for xLIB in $LIBS
+    do
+
+        # strip off switch
+        xLIBNAME="${xLIB#-[lsd]}"
+
+        # look at linkage
+        case "$xLIB" in
+        -s*)
+
+            # force static load
+            find-lib $xLIBNAME.a $LDIRS
+            if [ "$xLIBPATH" != "" ]
+            then
+
+                # add it to dependencies
+                DEPS="$DEPS $xLIBPATH"
+
+                # convert to individual object files
+                convert-static "$xLIBPATH" || exit $?
+
+            fi
+            ;;
+
+        esac
+
+    done
+fi
+
+# produce static library
+echo $CMD
+$CMD || exit $?
+
+# remove temporaries
+rm -rf ld-tmp
+
+# produce dependencies
+if [ "$DEPFILE" != "" ] && [ "$DEPS" != "" ]
+then
+    echo "$TARG: $DEPS" > "$DEPFILE"
+fi
diff --git a/build/ld.win.stub.sh b/build/ld.win.stub.sh
new file mode 100755
index 0000000..92e06af
--- /dev/null
+++ b/build/ld.win.stub.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+# ===========================================================================
+# input library types, and their handling
+#
+#  normal linkage
+#   -l : find shared or static
+#   -s : require static
+#   -d : require shared
+#
+#  static linkage
+#   -l : require static
+#   -s : require static
+#   -d : ignore
+# ===========================================================================
+
+
+# script name
+SELF_NAME="$(basename $0)"
+
+# parameters and common functions
+source "${0%stub.sh}cmn.sh"
+
+# discover tool chain
+case "$LD" in
+link)
+    source "${0%stub.sh}vc++.sh"
+    ;;
+ *)
+    echo "$SELF_NAME: unrecognized ld tool - '$LD'"
+    exit 5
+esac
+
+# produce stub library and exp file
+echo $STUB_CMD
+$STUB_CMD
diff --git a/build/ld.win.vc++.sh b/build/ld.win.vc++.sh
new file mode 100755
index 0000000..09dd42d
--- /dev/null
+++ b/build/ld.win.vc++.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+# define linker params
+LD_EXPORT_GLOBAL=""
+LD_MULTIPLE_DEFS="/FORCE:MULTIPLE"
+LD_STATIC=""
+LD_DYNAMIC=""
+LD_ALL_SYMBOLS="/OPT:NOREF"
+LD_REF_SYMBOLS="/OPT:REF"
+
+# rewrite PATH variable
+unset CYGP
+while [ "$PATH" = "${PATH#/cygdrive}" ]
+do
+    DIR="${PATH%%:*}"
+    PATH="${PATH#$DIR}"
+    PATH="${PATH#:}"
+    CYGP="$CYGP:$DIR"
+done
+PATH="$PATH$CYGP"
+export PATH
+
+# the def file
+unset DEF_SWITCH
+DEF_FILE="$SRCDIR/$NAME-$BUILD.def"
+[ ! -f "$DEF_FILE" ] && DEF_FILE="$SRCDIR/$NAME.def"
+[ -f "$DEF_FILE" ] && DEF_SWITCH="/DEF:$(cygpath -w $DEF_FILE)" || unset DEF_FILE
+
+# the full path to target sans extension
+WINTARG="$(cygpath -w ${TARG%.lib})"
+
+# build command
+STUB_CMD="lib /NOLOGO /MACHINE:x86 $DEF_SWITCH /OUT:$WINTARG.lib"
+DLIB_CMD="$LD /NOLOGO /DLL $DEF_SWITCH /OUT:$WINTARG.dll /STACK:8000000 /HEAP:1000000000"
+EXE_CMD="$LD /NOLOGO /OUT:$WINTARG.exe /SUBSYSTEM:CONSOLE /ENTRY:wmainCRTStartup /STACK:8000000 /HEAP:100000000"
+
+# tack on PDB tracking
+if [ "$BUILD" = "dbg" ]
+then
+    DLIB_CMD="$DLIB_CMD /DEBUG /PDB:$WINTARG.pdb"
+    EXE_CMD="$EXE_CMD /DEBUG /PDB:$WINTARG.pdb"
+fi
diff --git a/build/sun-c++.sh b/build/sun-c++.sh
new file mode 100755
index 0000000..0bd8c07
--- /dev/null
+++ b/build/sun-c++.sh
@@ -0,0 +1,100 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+# prepare script name
+SELF_NAME="$(basename $0)"
+SCRIPT_BASE="${0%.sh}"
+
+# os
+OS="$1"
+shift
+
+# binary compiler
+CC="$1"
+shift
+
+# configuration
+unset TARG
+unset ARGS
+CHECKSUM=0
+OBJX=o
+
+while [ $# -ne 0 ]
+do
+
+    case "$1" in
+    --cflags)
+        ARGS="$ARGS $2"
+        shift
+        ;;
+
+    --checksum)
+        CHECKSUM=1
+        ;;
+
+    --objx)
+        OBJX="$2"
+        shift
+        ;;
+
+    -o*)
+        ARGS="$ARGS $1"
+        ARG="${1#-o}"
+        if [ "$ARG" = "" ]
+        then
+            ARGS="$ARGS $2"
+            ARG="$2"
+            shift
+        fi
+        TARG="$ARG"
+        ;;
+
+    -xpg|-xO3)  # optimized
+        ARGS="$ARGS -${1#-x}"
+        ;;
+
+    -xc99=all)
+        ARGS="$ARGS -std=c99"
+        ;;
+
+    -Xc) # strict ansi
+        ARGS="$ARGS -ansi"
+        ;;
+
+    -v) # strict strict strict
+        ;;
+
+    *)
+        ARGS="$ARGS $1"
+        ;;
+        
+    esac
+
+    shift
+done
+
+CMD="$CC $ARGS"
+echo "$CMD"
+$CMD || exit $?
diff --git a/build/sun-cc.sh b/build/sun-cc.sh
new file mode 100755
index 0000000..ef3dc9f
--- /dev/null
+++ b/build/sun-cc.sh
@@ -0,0 +1,93 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+# prepare script name
+SELF_NAME="$(basename $0)"
+SCRIPT_BASE="${0%.sh}"
+
+# os
+OS="$1"
+shift
+
+# binary compiler
+CC="$1"
+shift
+
+# configuration
+unset TARG
+unset ARGS
+CHECKSUM=0
+OBJX=o
+
+while [ $# -ne 0 ]
+do
+
+    case "$1" in
+    --cflags)
+        ARGS="$ARGS $2"
+        shift
+        ;;
+
+    --checksum)
+        CHECKSUM=1
+        ;;
+
+    --objx)
+        OBJX="$2"
+        shift
+        ;;
+
+    -o*)
+        ARGS="$ARGS $1"
+        ARG="${1#-o}"
+        if [ "$ARG" = "" ]
+        then
+            ARGS="$ARGS $2"
+            ARG="$2"
+            shift
+        fi
+        TARG="$ARG"
+        ;;
+
+    -fPIC)
+        ARGS="$ARGS -KPIC"
+        ;;
+
+    -MD)
+        ARGS="$ARGS -xMD"
+        ;;
+
+    *)
+        ARGS="$ARGS $1"
+        ;;
+        
+    esac
+
+    shift
+done
+
+CMD="$CC $ARGS"
+echo "$CMD"
+$CMD || exit $?
diff --git a/build/valgrind.suppress b/build/valgrind.suppress
index 452a4e8..002d332 100644
--- a/build/valgrind.suppress
+++ b/build/valgrind.suppress
@@ -1,21 +1,6 @@
 {
-   static_cached_KDirectory_in_KConfig_find_home_directory
-   Memcheck:Leak
-    ...
-   fun:find_home_directory
-}
-{
    vt_cache
    Memcheck:Leak
    fun:calloc
    fun:_ZN3ngs7Resolve*
 }
-{
-   ktst_exception_in_child_process
-   Memcheck:Leak
-   match-leak-kinds: possible
-   fun:malloc
-   fun:__cxa_allocate_exception
-   ...
-   fun:_ZN16ChildProcessFail8Instance11test_methodEv
-}
\ No newline at end of file
diff --git a/build/win-cc.sh b/build/win-cc.sh
new file mode 100755
index 0000000..98900eb
--- /dev/null
+++ b/build/win-cc.sh
@@ -0,0 +1,257 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+VERBOSE=
+if [ "$VERBOSE" != "" ] ; then echo "$0 $*"; fi
+# prepare script name
+SELF_NAME="$(basename $0)"
+SCRIPT_BASE="${0%.sh}"
+
+# os
+OS="$1"
+shift
+
+# binary compiler
+CC="$1"
+shift
+
+# configuration
+unset TARG
+unset ARGS
+unset OBJX
+unset SRCFILE
+unset SOURCES
+unset DEPENDENCIES
+# paths for translating local to remote
+unset RHOME
+unset LHOME
+unset ROUTDIR
+unset RHOST
+unset RPORT
+unset PROXY_TOOL
+
+function convert_path
+{
+    if [ "$OS" != "rwin" ] ; then
+        convert_path_result="$(cygpath -w $1)"
+    elif [ "$1" != "." ] ; then
+        if [ "${1#$LHOME}" != "$1" ] ; then
+            convert_path_result="$RHOME${1#$LHOME}"
+        else
+            convert_path_result="$1"
+        fi
+        convert_path_result="${convert_path_result//\//\\}"
+    else
+        convert_path_result="."
+    fi
+}
+
+while [ $# -ne 0 ]
+do
+
+    case "$1" in
+    --cflags)
+        for ARG in $2
+        do
+            [ "$ARG" != "${ARG#-}" ] && ARG="/${ARG#-}"
+            ARGS="$ARGS $ARG"
+        done
+        shift
+        ;;
+
+    --checksum)
+        ;;
+
+    --objx)
+        OBJX="$2"
+        shift
+        ;;
+
+    --rhome)
+        RHOME="$2"
+        shift
+        ;;
+
+    --lhome)
+        LHOME="$2"
+        shift
+        ;;
+
+    --loutdir)
+        LOUTDIR="$2"
+        shift
+        ;;
+
+    --routdir)
+        ROUTDIR="$2"
+        shift
+        ;;
+
+    --rhost)
+        RHOST="$2"
+        shift
+        ;;
+
+    --rport)
+        RPORT="$2"
+        shift
+        ;;
+
+    --proxy_tool)
+        PROXY_TOOL="$2"
+        shift
+        ;;
+
+    -D*)
+        ARG="${1#-D}"
+        if [ "$ARG" = "" ]
+        then
+            ARG="$2"
+            shift
+        fi
+        ARGS="$ARGS /D$ARG"
+        ;;
+
+    -I*)
+        ARG="${1#-I}"
+        if [ "$ARG" = "" ]
+        then
+            ARG="$2"
+            shift
+        fi
+        convert_path $ARG
+        ARGS="$ARGS /I$convert_path_result"
+        ;;
+
+    -o*)
+        ARG="${1#-o}"
+        if [ "$ARG" = "" ]
+        then
+            ARG="$2"
+            shift
+        fi
+        ARGS="$ARGS /Fo$ARG"
+        TARG="${ARG%.$OBJX}"
+        ;;
+
+    -MD)
+        # the /showIncludes switch will generate
+        # includes to stderr, but they will need
+        # to be filtered out and rewritten to the *.d
+        ARGS="$ARGS /showIncludes"
+        DEPENDENCIES=1
+        ;;
+
+    -fPIC|-std=c99|-ansi)
+        ;;
+        
+    -pedantic)
+        ARGS="$ARGS /W3"
+        ;;
+
+    -*)
+        ARG="/${1#-}"
+        ARGS="$ARGS $ARG"
+        ;;
+
+    *)
+        SRCFILE="$(basename $1)"
+        SOURCES="$SOURCES $1"
+        convert_path $1
+        ARGS="$ARGS $convert_path_result"
+        SRCDIR="$(dirname $1)" # assume the last source file is in the same dir as all the .vers files we need as dependencies
+        ;;
+        
+    esac
+
+    shift
+done
+
+unset STATUS
+
+CMD="$CC $ARGS"
+if [ "$VERBOSE" != "" ] ; then echo "CMD=$CMD"; fi
+
+# run command with redirection
+if [ "$OS" = "win" ]
+then
+    $CMD > $TARG.out 2> $TARG.err
+    STATUS=$?
+else
+    # determine current directory
+    CURDIR="$(pwd)"
+	if [ "$VERBOSE" != "" ] ; then echo "${TOP}/build/run_remotely.sh $PROXY_TOOL $RHOST $RPORT $RHOME $LHOME $CURDIR $ROUTDIR $LOUTDIR $CMD"; fi
+    ${TOP}/build/run_remotely.sh $PROXY_TOOL $RHOST $RPORT $RHOME $LHOME $CURDIR $ROUTDIR $LOUTDIR $CMD > $TARG.out 2> $TARG.err
+    STATUS=$?
+fi
+
+# check for dependencies
+if [ "$DEPENDENCIES" = "1" ]
+then
+    sed -e '/including file/!d' -e 's/.*including file: *\([^\r\n][^\r\n]*\)/\1/g' -e '/ /d' $TARG.out > $TARG.inc
+    echo -n "$TARG.$OBJX: $SOURCES" | sed -e 's/\r//g' > $TARG.d
+    if [ "$OS" = "win" ]
+    then 
+        for inc in $(cat $TARG.inc)
+        do
+            # vers.h files are now generated in the objdir
+            if [ "$inc" != "${inc%.vers.h}" ]
+            then
+                inc="${inc%.h}"
+            fi
+            echo -n " $(cygpath -u $inc)"  | sed -e 's/\r//g' >> $TARG.d
+        done
+    else # rwin
+        # sometimes home path comes back in lowercase
+        # make sure to compare lowercased prefixes
+        rhome_low=$(echo ${RHOME} | tr '[A-Z]' '[a-z]' | tr '\\' '/')
+        rhome_len=${#RHOME}
+        routdir_low=$(echo ${ROUTDIR} | tr '[A-Z]' '[a-z]' | tr '\\' '/')
+        routdir_len=${#ROUTDIR}
+
+        for inc in $(cat $TARG.inc)
+        do
+            inc_low=$(echo ${inc} | tr '[A-Z]' '[a-z]' | tr '\\' '/')
+            if [ "${inc_low#$rhome_low}" != "$inc_low" ]
+            then
+                inc="$LHOME${inc:$rhome_len}"
+            elif [ "${inc_low#$routdir_low}" != "$inc_low" ]
+            then
+                inc="$OUTDIR${inc:$routdir_len}"
+            fi
+            echo -n " $inc" | tr '\\' '/' >> $TARG.d
+        done
+    fi
+    echo >> $TARG.d
+fi
+
+echo "$CMD"
+# repeat output files but without CR
+sed -e 's/\r//g' $TARG.err > /dev/stderr
+sed -e 's/\r//g' -e "/^$SRCFILE$/d" -e '/including file/d' $TARG.out
+
+# clean up files
+rm -f $TARG.out $TARG.err $TARG.inc
+
+exit $STATUS
diff --git a/interfaces/align/align-access.h b/interfaces/align/align-access.h
deleted file mode 100644
index 3e2fc83..0000000
--- a/interfaces/align/align-access.h
+++ /dev/null
@@ -1,350 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_align_align_access_
-#define _h_align_align_access_
-
-#ifndef _h_align_extern_
-#include <align/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct VPath;
-
-
-/*--------------------------------------------------------------------------
- * constants
- */
-typedef uint8_t AlignmentStrandDirection;
-enum
-{
-    asd_Unknown, /* e.g. an error occured */
-    asd_Forward = 'F',
-    asd_Reverse = 'R'
-};
-
-
-/*--------------------------------------------------------------------------
- * AlignAccessMgr
- *  opaque handle to library
- */
-typedef struct AlignAccessMgr AlignAccessMgr;
-
-/* Make
- *  make a manager for read-only access
- */
-ALIGN_EXTERN rc_t CC AlignAccessMgrMake ( const AlignAccessMgr **mgr );
-
-/* AddRef
- * Release
- */
-ALIGN_EXTERN rc_t CC AlignAccessMgrAddRef ( const AlignAccessMgr *self );
-ALIGN_EXTERN rc_t CC AlignAccessMgrRelease ( const AlignAccessMgr *self );
-
-
-
-/*--------------------------------------------------------------------------
- * AlignAccessDB
- *  opaque handle to database
- */
-typedef struct AlignAccessDB AlignAccessDB;
-
-/* Make
- *  make a read-only database handle from BAM file
- *  where the BAM file is treated as the entire database
- *
- *  "bam" [ IN ] - NUL terminated POSIX path in UTF-8 character set
- *  designating BAM file
- *
- *  "bam_index" [ IN ] - NUL terminated POSIX path in UTF-8 character
- *  set designating BAM index file
- *
- * NB - on Windows, these paths should be converted POSIX-style
- */
-ALIGN_EXTERN rc_t CC AlignAccessMgrMakeBAMDB ( const AlignAccessMgr *self,
-    const AlignAccessDB **db, struct VPath const *bam );
-ALIGN_EXTERN rc_t CC AlignAccessMgrMakeIndexBAMDB ( const AlignAccessMgr *self,
-    const AlignAccessDB **db, struct VPath const *bam, struct VPath const *bam_index );
-
-/* AddRef
- * Release
- */
-ALIGN_EXTERN rc_t CC AlignAccessDBAddRef ( const AlignAccessDB *self );
-ALIGN_EXTERN rc_t CC AlignAccessDBRelease ( const AlignAccessDB *self );
-
-
-
-/*--------------------------------------------------------------------------
- * AlignAccessRefSeqEnumerator
- *  an enumerator onto available reference sequences
- */
-typedef struct AlignAccessRefSeqEnumerator AlignAccessRefSeqEnumerator;
-
-#define AlignAccessRefSeqEnumeratorEOFCode (RC(rcAlign, rcTable, rcReading, rcRow, rcNotFound))
-#define AlignAccessRefSeqEnumeratorIsEOF(RESULT_CODE) (GetRCObject(RESULT_CODE) == rcRow && GetRCState(RESULT_CODE) == rcNotFound)
-
-/* EnumerateRefSequences
- *  make an enumerator of reference sequences visible in database
- *
- *  "refseq_enum" [ OUT ] - return parameter for enumerator
- *
- *  return codes:
- *   object: rcRow, state: rcNotFound - if the index is empty
- */
-ALIGN_EXTERN rc_t CC AlignAccessDBEnumerateRefSequences ( const AlignAccessDB *self,
-    AlignAccessRefSeqEnumerator **refseq_enum );
-
-
-/* AddRef
- * Release
- */
-ALIGN_EXTERN rc_t CC AlignAccessRefSeqEnumeratorAddRef ( const AlignAccessRefSeqEnumerator *self );
-ALIGN_EXTERN rc_t CC AlignAccessRefSeqEnumeratorRelease ( const AlignAccessRefSeqEnumerator *self );
-
-/* advance the enumerator to the next element
- *
- *  return codes:
- *   object: rcRow, state: rcNotFound - if there is no next element
- */
-ALIGN_EXTERN rc_t CC AlignAccessRefSeqEnumeratorNext(const AlignAccessRefSeqEnumerator *cself);
-
-/* GetID
- *  get text id of reference sequence
- *
- *  "id_buffer" [ IN ] and "buffer_size" [ IN ] - return buffer for
- *  NUL terminated ASCII id
- *
- *  "id_size" [ OUT, NULL OKAY ] - optional return parameter for length
- */
-ALIGN_EXTERN rc_t CC AlignAccessRefSeqEnumeratorGetID ( const AlignAccessRefSeqEnumerator *self,
-    char *id_buffer, size_t buffer_size, size_t *id_size );
-    
-/* GetLength
- *  get text id of reference sequence
- */
-ALIGN_EXTERN rc_t CC AlignAccessRefSeqEnumeratorGetLength
-    ( const AlignAccessRefSeqEnumerator *self, uint64_t *length );
-
-
-/*--------------------------------------------------------------------------
- * AlignAccessAlignmentEnumerator
- *  an enumerator onto alignments
- */
-typedef struct AlignAccessAlignmentEnumerator AlignAccessAlignmentEnumerator;
-
-#define AlignAccessAlignmentEnumeratorEOFCode (RC(rcAlign, rcTable, rcReading, rcRow, rcNotFound))
-#define AlignAccessAlignmentEnumeratorIsEOF(RESULT_CODE) (GetRCObject(RESULT_CODE) == rcRow && GetRCState(RESULT_CODE) == rcNotFound)
-
-/* EnumerateAlignments
- *  make an enumerator of all alignments in database
- *
- *  "align_enum" [ OUT ] - return parameter for enumerator
- *
- *  return codes:
- *   object: rcRow, state: rcNotFound - if there is no first element
- *
- * NB - this is a BAD interface, here only to support dumping a BAM file
- *  it may not be available under all circumstances
- */
-ALIGN_EXTERN rc_t CC AlignAccessDBEnumerateAlignments ( const AlignAccessDB *self,
-    AlignAccessAlignmentEnumerator **align_enum );
-
-
-/* WindowedAlignments
- *  make an enumerator of alignments within a window of a reference sequence
- *
- *  "align_enum" [ OUT ] - return parameter for enumerator
- *
- *  "refseq_id" [ IN ] - NUL terminated ASCII string giving reference sequence id
- *
- *  "pos" [ IN ] and "wsize" [ IN ] - starting position and size of window
- *  on reference sequence
- *
- *  return codes:
- *   object: rcRow, state: rcNotFound - if there is no first element
- */
-ALIGN_EXTERN rc_t CC AlignAccessDBWindowedAlignments ( const AlignAccessDB *self,
-    AlignAccessAlignmentEnumerator **align_enum, const char *refseq_id,
-    uint64_t pos, uint64_t wsize );
-
-
-/* AddRef
- * Release
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorAddRef ( const AlignAccessAlignmentEnumerator *self );
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorRelease ( const AlignAccessAlignmentEnumerator *self );
-
-
-/* Next
- * advance the enumerator to the next element
- *
- *  return codes:
- *   object: rcRow, state: rcNotFound - if there is no next element
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorNext ( const AlignAccessAlignmentEnumerator *self );
-
-
-/* GetRefSeqID
- *  return id of reference sequence
- *
- *  "id_buffer" [ IN ] and "buffer_size" [ IN ] - return buffer for
- *  NUL terminated ASCII id
- *
- *  "id_size" [ OUT, NULL OKAY ] - optional return parameter for length
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorGetRefSeqID ( const AlignAccessAlignmentEnumerator *self,
-    char *id_buffer, size_t buffer_size, size_t *id_size );
-
-
-/* GetRefSeqPos
- *  return starting position of alignment on reference sequence
- *
- *  "start_pos" [ OUT ] - return parameter for starting position
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorGetRefSeqPos ( const AlignAccessAlignmentEnumerator *self,
-    uint64_t *start_pos );
-    
-/* GetRefSeqPos
- *  return starting position of alignment on reference sequence
- *
- *  "start_pos" [ OUT ] - return parameter for starting position
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorGetRefSeqLen ( const AlignAccessAlignmentEnumerator *self,
-                                                                 uint32_t *ref_len );
-
-    
-/* GetShortSeqID
- *  return accession id of aligned short sequence
- *
- *  "id_buffer" [ IN ] and "buffer_size" [ IN ] - return buffer for
- *  NUL terminated ASCII id
- *
- *  "id_size" [ OUT, NULL OKAY ] - optional return parameter for length
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorGetShortSeqAccessionID
-    ( const AlignAccessAlignmentEnumerator *self, char *id_buffer, size_t buffer_size, size_t *id_size );
-
-    
-/* GetShortSeqID
- *  return id of aligned short sequence
- *
- *  "id_buffer" [ IN ] and "buffer_size" [ IN ] - return buffer for
- *  NUL terminated ASCII id
- *
- *  "id_size" [ OUT, NULL OKAY ] - optional return parameter for length
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorGetShortSeqID
-    ( const AlignAccessAlignmentEnumerator *self, char *id_buffer, size_t buffer_size, size_t *id_size );
-
-
-/* GetMapQuality
- *  return sequence alignment mapping quality score
- *
- *  "score" [ OUT ] - return parameter for mapping quality score (phred-like)
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorGetMapQuality ( const AlignAccessAlignmentEnumerator *self,
-                                             uint8_t *score );
-    
-/* GetCIGAR
- *  return sequence alignment information
- *
- *  "start_pos" [ OUT, NULL OKAY ] - return parameter for starting position
- *
- *  "cigar_buffer" [ IN, NULL OKAY ] and "buffer_size" [ IN ] - return buffer for CIGAR NUL-terminated
- *  alignment description; null okay if cigar_size not null
- *  
- *  "cigar_size" [ OUT, NULL OKAY ] - optional return parameter for CIGAR string length; null ok
- *  if cigar_buffer not null
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorGetCIGAR ( const AlignAccessAlignmentEnumerator *self,
-    uint64_t *start_pos, char *cigar_buffer, size_t buffer_size, size_t *cigar_size );
-
-
-/* GetShortSequence
- *  return short sequence
- *
- *  "seq_buffer" [ IN ] and "buffer_size" [ IN ] - return buffer for short sequence
- *  
- *  "seq_size" [ OUT ] - return parameter for sequence length
- *
- * NB - BAM states that the sequence will be bases in FASTA.
- *  we will be extending this interface to provide type information
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorGetShortSequence ( const AlignAccessAlignmentEnumerator *self,
-    char *seq_buffer, size_t buffer_size, size_t *seq_size );
-
-
-/* GetStrandDirection
- *  returns property
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorGetStrandDirection
-    ( const AlignAccessAlignmentEnumerator *self, AlignmentStrandDirection *result );
-
-    
-/* GetIsPaired
- *  returns paired property
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorGetIsPaired
-    ( const AlignAccessAlignmentEnumerator *self, bool *result );
-
-/* GetIsFirstInPair
- *  get property
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorGetIsFirstInPair
-    ( const AlignAccessAlignmentEnumerator *self, bool *result );
-
-/* GetIsSecondInPair
- *  get property
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorGetIsSecondInPair
-    ( const AlignAccessAlignmentEnumerator *self, bool *result );
-
-    
-/* GetRecordID
- *  get property
- *
- * A locally unique identifier for each record.  When enumerators from the same
- * AlignAccessDB object fetch the same record, they will return the same ID.
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorGetRecordID
-    ( const AlignAccessAlignmentEnumerator *self, uint64_t *result );
-    
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_align_align_access_ */
diff --git a/interfaces/align/align.h b/interfaces/align/align.h
deleted file mode 100644
index 059f7e6..0000000
--- a/interfaces/align/align.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_align_align_
-#define _h_align_align_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*==========================================================================
- * ALIGN types, constants
- */
-
-
-/*--------------------------------------------------------------------------
- * ploidy
- */
-typedef uint32_t NCBI_align_ploidy;
-
-
-/*--------------------------------------------------------------------------
- * ro_type
- *  ref-offset type
- */
-typedef uint8_t NCBI_align_ro_type;
-
-enum
-{
-    NCBI_align_ro_normal            = 0, /* normal ref-offset           */
-    NCBI_align_ro_soft_clip         = 1, /* soft-clipping               */
-    NCBI_align_ro_intron_plus       = 2, /* intron on positive strand   */
-    NCBI_align_ro_intron_minus      = 3, /* intron on negative strand   */
-    NCBI_align_ro_intron_unknown    = 4, /* intron strand not specified */
-    NCBI_align_ro_complete_genomics = 5  /* (future)                    */
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_align_align_ */
diff --git a/interfaces/align/align.vschema b/interfaces/align/align.vschema
deleted file mode 100644
index 2ea8b96..0000000
--- a/interfaces/align/align.vschema
+++ /dev/null
@@ -1,1610 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * VDB Alignment types, functions and tables
- */
-version 1;
-
-include 'vdb/vdb.vschema';
-include 'ncbi/seq.vschema';
-include 'ncbi/sra.vschema';
-include 'ncbi/stats.vschema';
-include 'align/seq.vschema';
-include 'align/qstat.vschema';
-include 'sra/abi.vschema';
-include 'align/mate-cache.vschema';
-
-
-/*--------------------------------------------------------------------------
- * data types
- */
-
-/* ploidy
- *  the number of sets of chromosomes in a cell
- */
-typedef U32 NCBI:align:ploidy;
-
-/* ro_type
- *  the type of event causing ref-offset
- */
-typedef U8 NCBI:align:ro_type;
-
-const NCBI:align:ro_type NCBI:align:ro_normal            = 0; // normal ref-offset
-const NCBI:align:ro_type NCBI:align:ro_soft_clip         = 1; // soft-clipping
-const NCBI:align:ro_type NCBI:align:ro_intron_plus       = 2; // intron on positive strand
-const NCBI:align:ro_type NCBI:align:ro_intron_minus      = 3; // intron on negative strand
-const NCBI:align:ro_type NCBI:align:ro_intron_unknown    = 4; // intron strand not specified
-const NCBI:align:ro_type NCBI:align:ro_complete_genomics = 5; // 
-
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-
-/* cigar
- *  construct "cigar" alignment string or length arrays
- *
- * "ctype" [ CONST ] - select variant of format
- *   0 => both matches and mismatches represented as M
- *   1 => matches represented as '=' mismatches as 'X'
- *
- *  "has_mismatch" [ DATA ] - a boolean for each base in aligned sequence
- *   where a value of false means the base aligned to the reference
- *
- *  "has_ref_offset" [ DATA ] - a boolean for each base in the aligned sequence
- *   where a value of true means there is a corresponding offset to position on reference
- *
- *  "ref_offset" [ DATA ] - a packed sequence of signed offsets to aligned position
- *   one entry for every true in "has_ref_offset"
- *
- *  "read_len" [ DATA ] - v2: elem_count defines PLOIDY and values are an actual length of reads in spot
- */
-extern function
-ascii NCBI:align:cigar #1 < U8 ctype > ( bool has_mismatch, bool has_ref_offset,
-    I32 ref_offset, * INSDC:coord:len ref_len ) = ALIGN:cigar;
-
-/* history:
- *  2.1 - added "ref_offset_type" optional parameter
- *  NB - reverting to 2.0 due to linker bug in older code
- */
-extern function < type T >
-T NCBI:align:cigar #2.0 < U8 ctype > ( bool has_mismatch, bool has_ref_offset,
-        I32 ref_offset, INSDC:coord:len read_len, * INSDC:coord:len ref_len, NCBI:align:ro_type ref_offset_type )
-    = ALIGN:cigar_2;
-
-extern function U32 NCBI:align:edit_distance #1
-    ( bool has_mismatch, bool has_ref_offset, I32 ref_offset );
-
-extern function U32 NCBI:align:edit_distance #2
-    ( bool has_mismatch, bool has_ref_offset, I32 ref_offset, INSDC:coord:len ref_len, *INSDC:coord:len read_len)
-  = NCBI:align:edit_distance_2;
-
-extern function U32 NCBI:align:edit_distance #3
-    ( bool has_mismatch, bool has_ref_offset, I32 ref_offset, NCBI:align:ro_type ref_offset_type, INSDC:coord:len read_len)
-  = NCBI:align:edit_distance_3;
-
-/* rna_orientation
- *  reads column REF_OFFSET_TYPE
- *  returns '+' if has:
- *      at least one NCBI:align:ro_intron_plus
- *      none of NCBI:align:ro_intron_minus
- *  returns '-' if has:
- *      at least one NCBI:align:ro_intron_minus
- *      none of NCBI:align:ro_intron_plus
- *  returns empty string otherwise
- */
-extern function
-ascii NCBI:align:rna_orientation #1 ( NCBI:align:ro_type ref_offset_type );
-
-/* project_from_sequence
- *  projects column from SEQUENCE
- *
- *  "T" [ TYPE ]
- *
- *  "col" [ CONST ]
- *  "use_read_len" [ CONST ] whether subset by read_len or by read_id only
- *
- *  "seq_spot_id" [ DATA ]
- *
- *  "seq_read_id" [ DATA ]
- */
-extern function < type T >
-T NCBI:align:project_from_sequence #1 < ascii col> ( I64 seq_spot_id, INSDC:coord:one seq_read_id )
-    = ALIGN:project_from_sequence;
-
-
-/* align_restore_read
- *  restores read by applying alignment-based difference to ref_read
- *
- *  "ref_read" [ DATA ]
- *
- *  "has_mismatch" [ DATA ] and "mismatch" [ DATA ]
- *
- *  "has_ref_offset" [ DATA ] and "ref_offset" [ DATA ]
- */
-extern function
-INSDC:4na:bin NCBI:align:align_restore_read #1 ( INSDC:4na:bin ref_read, bool has_mismatch,
-        INSDC:4na:bin mismatch, bool has_ref_offset, I32 ref_offset * INSDC:coord:len read_len)
-    = ALIGN:align_restore_read;
-
-
-/* raw_restore_read
- *  restores read by applying alignment-based difference to align_read
- *
- *  "align_read" [ DATA ]
- *
- *  "ref_orientation" [ DATA ]
- */
-extern function
-INSDC:4na:bin NCBI:align:raw_restore_read #1 ( INSDC:4na:bin align_read, bool ref_orientation )
-    = ALIGN:raw_restore_read;
-
-
-/* raw_restore_qual
- *  restores quality by applying alignment-based difference to align_qual
- *
- *  "align_qual" [ DATA ]
- *
- *  "ref_orientation" [ DATA ]
- */
-extern function
-INSDC:quality:phred NCBI:align:raw_restore_qual #1 ( INSDC:quality:phred align_qual, bool ref_orientation );
-
-
-/* ref_sub_select
- *  projects reference from sequence
- *
- *  "id" [ DATA ]
- *
- *  "start" [ DATA ] and "len" [ DATA ]
- *
- *  "ref_ploidy" [ DATA, OPTIONAL ]
- */
-extern function
-INSDC:4na:bin NCBI:align:ref_sub_select #1 ( I64 id, INSDC:coord:zero start,
-        INSDC:coord:len len * U32 ref_ploidy)
-    = ALIGN:ref_sub_select;
-
-
-/* ref_restore_read
- *  restores read from central storage
- *
- *  "cmp_rd" [ DATA ]
- *
- *  "seq_id" [ DATA ]
- *
- *  "seq_start" [ DATA ] and "seq_len" [ DATA ]
- */
-extern function
-INSDC:4na:bin NCBI:align:ref_restore_read #1 ( INSDC:4na:bin cmp_rd, ascii seq_id,
-        INSDC:coord:one seq_start, INSDC:coord:len seq_len)
-    = ALIGN:ref_restore_read;
-
-
-/* seq_restore_read
- *  projects read from align_deflate table to SEQUENCE
- *
- *  "cmp_rd" [ DATA ]
- *
- *  "align_id" [ DATA ]
- *
- *  "read_len" [ DATA ]
- *
- *  "rd_type" [ DATA ]
- */
-extern function
-INSDC:4na:bin NCBI:align:seq_restore_read #1 ( INSDC:4na:bin cmp_rd, I64 align_id,
-        INSDC:coord:len read_len, INSDC:SRA:xread_type rd_type )
-    = ALIGN:seq_restore_read;
-
-
-/* seq_restore_linkage_group
- *  projects LINKAGE_GROUP from PRIMARY_ALIGNMENT table to SEQUENCE
- *
- *  "cmp_linkage_group" [ DATA ]
- *
- *  "align_id" [ DATA ]
- */
-extern function
-ascii NCBI:align:seq_restore_linkage_group #1 ( ascii cmp_linkage_group,
-                                                I64 align_id )
-    = ALIGN:seq_restore_linkage_group;
-
-
-/* generate_has_mismatch
- *  generates has mismatch by doing actual compare of reference and subject,
- *  *ref_offsets move comparisons reference-wise
- *
- *  "reference" [ DATA ]
- *
- *  "subject" [ DATA ]
- *
- *  "has_ref_offset" [ DATA ]
- *
- *  "ref_offset" [ DATA ]
- */
-extern function
-bool NCBI:align:generate_has_mismatch #1 ( INSDC:4na:bin reference,
-       INSDC:4na:bin subject, bool has_ref_offset, I32 ref_offset)
-    = ALIGN:generate_has_mismatch;
-
-
-/* generate_mismatch
- *
- *  "reference" [ DATA ]
- *
- *  "subject" [ DATA ]
- *
- *  "has_ref_offset" [ DATA ]
- *
- *  "ref_offset" [ DATA ]
- */
-extern function
-INSDC:4na:bin NCBI:align:generate_mismatch #1 ( INSDC:4na:bin reference,
-        INSDC:4na:bin subject, bool has_ref_offset, I32 ref_offset )
-        = ALIGN:generate_mismatch;
-
-
-/* ref_pos
- *  retrieves the alignment's positions on the reference
- *  one per PLOIDY
- *
- *  "ref_id" [ DATA ]
- *
- *  "ref_start" [ DATA ] - one per PLOIDY
- */
-extern function
-INSDC:coord:zero NCBI:align:ref_pos #1 ( I64 ref_id, INSDC:coord:zero ref_start );
-
-
-/* ref_name
- *  retrieve the name from the reference
- *
- *  "ref_id" [ DATA ]
- */
-extern function
-ascii NCBI:align:ref_name #1 ( I64 ref_id );
-
-
-/* ref_seq_id
- *  retrieve the seq_id from the reference
- *
- *  "ref_id" [ DATA ]
- */
-extern function
-ascii NCBI:align:ref_seq_id #1 ( I64 ref_id );
-
-
-/* local_ref_id
- *  convert global ref_start into ref_id
- */
-extern function
-I64 NCBI:align:local_ref_id #1 ( U64 global_ref_start );
-
-
-/* global_ref_id
- *  convert global ref_start into ref_id
- */
-extern function
-INSDC:coord:zero NCBI:align:local_ref_start #1 ( U64 global_ref_start );
-
-/* not_my_row
- *  removes current row_id from the list
- */
-extern function I64 NCBI:align:not_my_row #1 ( I64 list );
-
-/* template_len
- *  compute template length, i.e. the distance from the left-most to the
- *  right-most matching reference position
- */
-extern function I32 NCBI:align:template_len #1 (
-    INSDC:coord:zero pos, INSDC:coord:zero mate_pos,
-    INSDC:coord:len  reflen, INSDC:coord:len mate_reflen,
-    ascii ref_name, ascii mate_ref_name, INSDC:coord:one read_id);
-
-/* get_sam_flags
- *  compute the flags that would be in a SAM file
- *
- * version 1 works with full Alignment databases.
- * version 2 works with Alignment databases that have had SEQUENCE removed.
- */
-extern function U32 NCBI:align:get_sam_flags #1 (
-    INSDC:coord:len read_len, INSDC:coord:one read_id, I32 template_len,
-    bool strand, bool mate_strand, bool is_secondary, * INSDC:SRA:read_filter filter);
-
-extern function U32 NCBI:align:get_sam_flags #2 (
-    I64 mate_id, INSDC:coord:one read_id, I32 template_len,
-    bool strand, bool mate_strand, bool is_secondary, * INSDC:SRA:read_filter filter)
-  = NCBI:align:get_sam_flags_2;
-
-/* get_left_soft_clip
- *  compute the length of the soft clip on the left edge of the alignment
- */
-extern function INSDC:coord:len NCBI:align:get_left_soft_clip #1
-    ( bool has_ref_offset, I32 ref_offset );
-
-extern function INSDC:coord:len NCBI:align:get_left_soft_clip #2
-    ( bool has_ref_offset, I32 ref_offset, INSDC:coord:len read_len )
-   = NCBI:align:get_left_soft_clip_2;
-
-/* get_right_soft_clip
- *  compute the length of the soft clip on the right edge of the alignment
- */
-extern function INSDC:coord:len NCBI:align:get_right_soft_clip #1
-    ( bool has_mismatch, INSDC:coord:len left_clip * bool has_ref_offset );
-
-extern function INSDC:coord:len NCBI:align:get_right_soft_clip #2
-    ( bool has_mismatch, INSDC:coord:len left_clip, bool has_ref_offset, I32 ref_offset )
-   = NCBI:align:get_right_soft_clip_2;
-
-extern function INSDC:coord:len NCBI:align:get_right_soft_clip #3
-    ( bool has_ref_offset, I32 ref_offset, INSDC:coord:len ref_len )
-   = NCBI:align:get_right_soft_clip_3;
-
-extern function INSDC:coord:len NCBI:align:get_right_soft_clip #4
-    ( bool has_ref_offset, I32 ref_offset, INSDC:coord:len read_len, INSDC:coord:len ref_len )
-   = NCBI:align:get_right_soft_clip_4;
-
-extern function INSDC:coord:len NCBI:align:get_right_soft_clip #5
-    ( bool has_ref_offset, I32 ref_offset, NCBI:align:ro_type ref_offset_type, INSDC:coord:len read_len )
-   = NCBI:align:get_right_soft_clip_5;
-
-/* get_clipped_cigar
- *  compute the CIGAR string with the soft clipping removed
- */
-extern function ascii NCBI:align:get_clipped_cigar #1 ( ascii cigar );
-
-extern function < type T >
-T NCBI:align:get_clipped_cigar #2 ( ascii cigar, INSDC:coord:len cigar_len ) = NCBI:align:get_clipped_cigar_2;
-
-/* get_clipped_ref_offset
- *  compute the reference offsets with the soft clipping removed
- */
-extern function I32 NCBI:align:get_clipped_ref_offset #1
-    ( bool has_ref_offset, I32 ref_offset );
-
-/* clip
- *  remove the soft clipped bases (or qualities, or has_mismatch, or cetera)
- *  works with things whose lengths are the same as SEQUENCE.READ
- */
-extern function < type T > T NCBI:align:clip #1
-    ( T object, INSDC:coord:len left_clip, INSDC:coord:len right_clip);
-
-extern function < type T > T NCBI:align:clip #2
-    ( T object, INSDC:coord:len read_len, INSDC:coord:len left_clip, INSDC:coord:len right_clip)
-   = NCBI:align:clip_2;
-
-/* get_ref_len
- *  compute reference length from alignment information
- */
-extern function INSDC:coord:len NCBI:align:get_ref_len #1
-    ( bool has_ref_offset, I32 ref_offset, * INSDC:coord:len right_clip );
-
-extern function INSDC:coord:len NCBI:align:get_ref_len_2 #2
-    ( bool has_ref_offset, I32 ref_offset)
-  = NCBI:align:get_ref_len_2;
-
-
-/* get_mismatch_read
- *  generate the READ with matching bases replaced with '='
- */
-extern function ascii NCBI:align:get_mismatch_read #1
-    ( bool has_mismatch, INSDC:dna:text mismatch );
-
-/* get_ref_mismatch
- * shows mismatch positions in reference space
- */
-function bool NCBI:align:get_ref_mismatch #1
-    ( bool has_mismatch, bool has_ref_offset, I32 ref_offset,
-      INSDC:coord:len ref_len );
-
-/* get_ref_insert
- * shows positions of inserts in reference space
- * i.e. an insert occurs between each pair of true's
- */
-function bool NCBI:align:get_ref_insert #1
-    ( bool has_mismatch, bool has_ref_offset, I32 ref_offset,
-      INSDC:coord:len ref_len );
-
-/* get_ref_delete
- * shows positions of deleted bases in reference space
- */
-function bool NCBI:align:get_ref_delete #1
-    ( bool has_mismatch, bool has_ref_offset, I32 ref_offset,
-      INSDC:coord:len ref_len );
-
-extern function INSDC:quality:phred NCBI:align:compress_quality #1
-    ( INSDC:quality:phred quality, bool preserved );
-
-extern function INSDC:quality:phred NCBI:align:decompress_quality #1
-    < INSDC:quality:phred restored_qual_value >
-    ( INSDC:quality:phred cmp_quality, bool preserved );
-
-/* make_cmp_read_start
- *
- */
-extern function INSDC:coord:zero NCBI:align:make_read_start #1
-    (INSDC:coord:len read_len);
-
-/* make_cmp_read_desc
- *  determines whether an element of "operand" is aligned
- *  by looking at the corresponding element of "align_id"
- *
- *  zeros out unaligned elements of operand, unless "invert" is true,
- *  in which case it zeros out aligned elements.
- *
- *  "T" [ TYPE ] - type of operand
- *
- *  "invert" [ CONST ] - if true, invert the logic of which elements
- *  to zero out.
- *
- *  "operand" [ DATA ] - uncompressed data
- *
- *  "align_id" [ DATA ] - indication of alignment
- */
-extern function < type T >
-T NCBI:align:make_cmp_read_desc #1 <bool invert>(T operand, I64 align_id);
-
-/* seq_construct_read
- *  assembles read from aligned and unaligned parts
- */
-extern function < type T >
-T NCBI:align:seq_construct_read #1 (
-    T aligned, INSDC:coord:len aligned_read_len,
-    T unaligned, INSDC:coord:len unaligned_read_len );
-
-extern function I64 NCBI:align:get_mate_align_id #1 ( I64 spot_id );
-
-/*--------------------------------------------------------------------------
- * tables
- */
-
-
-/* ref_block_cmn
- *  common implementation ancestor for reference block
- */
-table NCBI:align:tbl:ref_block_cmn #1.0.0
-{
-    readonly column ascii REF_TABLE
-        = < ascii > meta:read < "CONFIG/REF_TABLE" > ()
-        | < ascii > echo < 'REFERENCE' > ();
-
-    // REF_ID is rowid in Reference Table REF_TABLE
-    extern column I64 REF_ID
-        = out_ref_id;
-
-    // this is a redefinition of REF_START
-    // REF_START is the offset within REFERENCE.READ
-    extern column INSDC:coord:zero REF_START
-        = out_ref_start;
-
-    // global REF_START
-    extern column U64 GLOBAL_REF_START
-        = out_global_ref_start;
-
-    // REF_LEN the length of a read projection on reference
-    INSDC:coord:len out_ref_len_internal
-        = NCBI:align:get_ref_len_2 ( out_has_ref_offset, out_ref_offset )
-        | NCBI:align:get_ref_len   ( out_has_ref_offset, out_ref_offset );
-
-    INSDC:coord:len out_ref_len
-        = .REF_LEN
-/*      | NCBI:align:get_ref_len ( out_has_ref_offset, out_ref_offset, out_right_clip ) */
-        | out_ref_len_internal;
-
-    physical column < INSDC:coord:len > izip_encoding .REF_LEN = REF_LEN;
-    extern column INSDC:coord:len REF_LEN = out_ref_len;
-
-    // REF_ORIENTATION - relative orientation of original raw read to the reference
-    // false -> same orientation, true -> opposite orientation
-    // alignment and reference are always in the same orientation
-    extern column bool_encoding REF_ORIENTATION;
-
-    // REF_PLOIDY
-    extern column < U32 > izip_encoding REF_PLOIDY;
-
-    /* REF_POS
-     *  per PLOIDY
-     */
-    readonly column INSDC:coord:zero REF_POS
-        = NCBI:align:ref_pos ( out_ref_id, out_ref_start );
-
-    /* REF_NAME
-     *  the name of the reference
-     */
-    readonly column ascii REF_NAME
-        = NCBI:align:ref_name ( out_ref_id );
-
-    /* REF_SEQ_ID
-     */
-    readonly column ascii REF_SEQ_ID
-        = NCBI:align:ref_seq_id ( out_ref_id )
-        | < ascii > echo < '' > ();
-};
-
-
-/* global_ref_block
- *  reference block favoring global ref-start
- */
-table NCBI:align:tbl:global_ref_block #1.0.0
-    = NCBI:align:tbl:ref_block_cmn #1.0.0
-{
-    U64 out_global_ref_start = .GLOBAL_REF_START;
-    physical < U64 > izip_encoding .GLOBAL_REF_START = GLOBAL_REF_START;
-
-    I64 out_ref_id = NCBI:align:local_ref_id ( .GLOBAL_REF_START );
-    INSDC:coord:zero out_ref_start = NCBI:align:local_ref_start ( .GLOBAL_REF_START );
-};
-
-
-/* local_ref_block
- *  reference block favoring local ref-start
- */
-table NCBI:align:tbl:local_ref_block #1.0.0
-    = NCBI:align:tbl:ref_block_cmn #1.0.0
-{
-    I64 out_ref_id = .REF_ID;
-    physical < I64 > izip_encoding .REF_ID = REF_ID;
-
-    INSDC:coord:zero out_ref_start = .REF_START;
-    physical < INSDC:coord:zero > izip_encoding .REF_START = REF_START;
-};
-
-
-/* align_cmn
- *  common interface and implementation for alignment object
- *
- * History:
- *  2.1 - added REF_OFFSET_TYPE and RNA_ORIENTATION columns
- *        updated all cigar calculations
- */
-table NCBI:align:tbl:align_cmn #2.1
-    = NCBI:tbl:base_space_common #1.0.3
-    , NCBI:SRA:tbl:stats #1.2.0
-    , NCBI:align:tbl:ref_block_cmn #1.0.0
-{
-    bool is_secondary = out_is_secondary;
-// temporary key
-    extern column < U32 > izip_encoding TMP_KEY_ID;
-
-    extern column <ascii> zip_encoding LINKAGE_GROUP;
-
-
-/* Raw Sequence Block */
-    // Points to sequence table, which may contain more information about the raw sequence.
-    // row id in SEQUENCE table; 0 if not linked
-    extern column < I64 > izip_encoding SEQ_SPOT_ID;
-
-    // read number in SEQUENCE table; { SEQ_SPOT_ID, SEQ_READ_ID } is the unique link to the sequence
-    extern column < INSDC:coord:one > izip_encoding SEQ_READ_ID;
-
-
-/* Soft-Clipped data block */
-
-    readonly column INSDC:coord:len LEFT_SOFT_CLIP
-        = NCBI:align:get_left_soft_clip ( HAS_REF_OFFSET, REF_OFFSET, out_read_len );
-
-    INSDC:coord:len out_right_clip
-        = NCBI:align:get_right_soft_clip #5 ( out_has_ref_offset, out_ref_offset, out_ro_type, out_read_len )
-        | NCBI:align:get_right_soft_clip #4 ( out_has_ref_offset, out_ref_offset, out_read_len, out_ref_len )
-        | NCBI:align:get_right_soft_clip #3 ( out_has_ref_offset, out_ref_offset, out_ref_len )
-        | NCBI:align:get_right_soft_clip #2 ( out_has_mismatch, LEFT_SOFT_CLIP, out_has_ref_offset, out_ref_offset );
-    readonly column INSDC:coord:len RIGHT_SOFT_CLIP = out_right_clip;
-
-    readonly column ascii CLIPPED_CIGAR_LONG
-        = < ascii > NCBI:align:get_clipped_cigar ( CIGAR_LONG, CIGAR_LONG_LEN );
-
-    readonly column INSDC:coord:len CLIPPED_CIGAR_LONG_LEN
-        = < INSDC:coord:len > NCBI:align:get_clipped_cigar ( CIGAR_LONG, CIGAR_LONG_LEN );
-
-    readonly column ascii CLIPPED_CIGAR_SHORT
-        = < ascii > NCBI:align:get_clipped_cigar ( CIGAR_SHORT, CIGAR_SHORT_LEN );
-
-    readonly column INSDC:coord:len CLIPPED_CIGAR_SHORT_LEN
-        = < INSDC:coord:len > NCBI:align:get_clipped_cigar ( CIGAR_SHORT, CIGAR_SHORT_LEN );
-
-    bool out_clipped_has_mismatch
-        = < bool > NCBI:align:clip (out_has_mismatch, out_read_len, LEFT_SOFT_CLIP, RIGHT_SOFT_CLIP);
-
-    readonly column ascii CLIPPED_HAS_MISMATCH
-        = < U8 , ascii > map < [ 0 , 1 ] , '01'  > ( out_clipped_has_mismatch );
-
-    readonly column bool CLIPPED_HAS_MISMATCH = out_clipped_has_mismatch;
-
-    bool out_clipped_has_ref_offset
-        = < bool > NCBI:align:clip (HAS_REF_OFFSET, out_read_len, LEFT_SOFT_CLIP, RIGHT_SOFT_CLIP);
-
-    readonly column ascii CLIPPED_HAS_REF_OFFSET
-        = < U8 , ascii > map < [ 0 , 1 ] , '01'  > ( out_clipped_has_ref_offset );
-
-    readonly column bool CLIPPED_HAS_REF_OFFSET = out_clipped_has_ref_offset;
-
-    // TBD cannot be computed right unless HAS_MISMATCH and! READ_LEN is used
-    readonly column INSDC:dna:text CLIPPED_MISMATCH
-        = < INSDC:dna:text > NCBI:align:clip #1 ( out_mismatch_dna_text, LEFT_SOFT_CLIP, RIGHT_SOFT_CLIP);
-
-    readonly column I32 CLIPPED_REF_OFFSET
-        = NCBI:align:get_clipped_ref_offset ( HAS_REF_OFFSET, REF_OFFSET );
-
-    readonly column INSDC:quality:phred CLIPPED_QUALITY
-        = < INSDC:quality:phred > NCBI:align:clip (out_qual_phred, out_read_len, LEFT_SOFT_CLIP, RIGHT_SOFT_CLIP);
-
-    readonly column INSDC:dna:text CLIPPED_READ
-        = < INSDC:dna:text > NCBI:align:clip (READ, out_read_len, LEFT_SOFT_CLIP, RIGHT_SOFT_CLIP);
-
-/* Sequence Block */
-
-    extern column < NCBI:align:ploidy > izip_encoding PLOIDY;
-
-    // Number of reads per spot; corresponds to the number of alternative alignments
-    // all alternative alignments are computed against the same reference region
-    U32 out_nreads
-        = .PLOIDY
-        | < U32 > echo < 1 > ();
-
-    // READ_START and READ_LEN are position and length of the sequence
-    physical < INSDC:coord:zero > izip_encoding .READ_START = READ_START;
-    INSDC:coord:zero out_read_start
-        = .READ_START
-        | < INSDC:coord:zero > echo < 0 > ();
-
-    physical < INSDC:coord:len > izip_encoding .READ_LEN = READ_LEN;
-
-    INSDC:coord:len align_spot_len = ( INSDC:coord:len ) row_len ( out_has_ref_offset );
-    INSDC:coord:len out_read_len
-        = .READ_LEN
-        | align_spot_len;
-
-    // associated qualities
-    extern column INSDC:quality:phred CMP_QUALITY
-        = .CMP_QUALITY
-        | out_cmp_quality;
-    physical column < INSDC:quality:phred > zip_encoding .CMP_QUALITY = CMP_QUALITY;
-
-    INSDC:quality:phred out_raw_qual = < INSDC:quality:phred >
-        NCBI:align:project_from_sequence < '( INSDC:quality:phred ) QUALITY'> ( .SEQ_SPOT_ID, .SEQ_READ_ID );
-    INSDC:quality:phred out_qual_phred
-        = NCBI:align:raw_restore_qual ( out_raw_qual, .REF_ORIENTATION )
-        | < INSDC:quality:phred > echo < 30 > ( out_4na_bin );
-    readonly column INSDC:quality:text:phred_33 SAM_QUALITY = QUALITY ;
-
-    // project read group and name
-    ascii out_spot_group = < ascii > simple_sub_select < 'SEQUENCE','SPOT_GROUP'> (.SEQ_SPOT_ID);
-
-
-    INSDC:SRA:spotid_t tmp_seq_spot_id
-        = cast ( .SEQ_SPOT_ID )
-        ;
-    physical <ascii> zip_encoding .SEQ_NAME = SEQ_NAME;
-    extern column ascii SEQ_NAME
-        = .SEQ_NAME
-        | < ascii > simple_sub_select < 'SEQUENCE','NAME'> (.SEQ_SPOT_ID)
-        | sprintf < "%u" > ( tmp_seq_spot_id );
-
-    // compute sam flags
-    /* blows up parser: starts at schema-tbl.c:2138
-    readonly column U32 SAM_FLAGS = NCBI:align:get_sam_flags(MATE_ALIGN_ID,
-        .SEQ_READ_ID, out_template_len, REF_ORIENTATION,
-        out_mate_ref_orientation, is_secondary);
-    */
-    INSDC:coord:len projected_read_len
-        = < INSDC:coord:len > simple_sub_select < 'SEQUENCE', 'READ_LEN' > ( .SEQ_SPOT_ID );
-
-    readonly column U32 SAM_FLAGS
-        = NCBI:align:get_sam_flags #1 (projected_read_len,
-            .SEQ_READ_ID, out_template_len, REF_ORIENTATION,
-            out_mate_ref_orientation, is_secondary, out_rd_filter)
-        | NCBI:align:get_sam_flags #2 (out_mate_align_id,
-            .SEQ_READ_ID, out_template_len, REF_ORIENTATION,
-            out_mate_ref_orientation, is_secondary, out_rd_filter);
-
-    ascii out_name_fmt = < ascii > echo < '$R' > ();
-
-    INSDC:coord:zero trim_start
-        = < INSDC:coord:zero > echo < 0 > ();
-    INSDC:coord:len trim_len
-        = align_spot_len;
-
-    ascii out_label
-        = .LABEL
-        | < ascii > echo < "ploidy1" > ();
-    INSDC:coord:zero out_label_start
-        = .LABEL_START
-        | < INSDC:coord:zero > echo < 0 > ();
-    INSDC:coord:len out_label_len
-        = .LABEL_LEN
-        | < INSDC:coord:len > echo < 7 > ();
-
-    physical < INSDC:SRA:read_filter > zip_encoding .RD_FILTER = READ_FILTER;
-    INSDC:SRA:read_filter out_rd_filter
-        = .RD_FILTER
-        | < INSDC:SRA:read_filter > NCBI:align:project_from_sequence < 'READ_FILTER' > ( .SEQ_SPOT_ID, .SEQ_READ_ID )
-        | < INSDC:SRA:read_filter > echo < SRA_READ_FILTER_PASS > ( out_read_len );
-
-    INSDC:SRA:platform_id out_platform
-        = .PLATFORM
-        | < INSDC:SRA:platform_id > simple_sub_select < 'SEQUENCE','PLATFORM'> (.SEQ_SPOT_ID)
-        | < INSDC:SRA:platform_id > echo < SRA_PLATFORM_UNDEFINED > ();
-
-    U8 out_alignment_count = <U8> NCBI:align:project_from_sequence < 'ALIGNMENT_COUNT' > ( .SEQ_SPOT_ID, .SEQ_READ_ID );
-
-    /* out_read_type
-     *  set to SRA_READ_TYPE_FORWARD + SRA_READ_TYPE_BIOLOGICAL
-     *  which has a constant value of 3
-     */
-    INSDC:SRA:xread_type out_read_type
-        = < INSDC:SRA:xread_type > echo < 3 > ( out_read_len );
-
-    // stats inputs
-    bool in_stats_bin = HAS_REF_OFFSET;
-
-    INSDC:coord:len _alt_in_read_len
-        = READ_LEN
-        | ( INSDC:coord:len ) row_len #1 ( HAS_REF_OFFSET );
-
-    INSDC:SRA:xread_type _alt_in_read_type
-        = READ_TYPE
-        | < INSDC:SRA:xread_type > echo < SRA_READ_TYPE_BIOLOGICAL > (_alt_in_read_len);
-
-    readonly column ascii MISMATCH_READ
-        = NCBI:align:get_mismatch_read ( out_has_mismatch, out_mismatch_dna_text );
-
-/* Alignment block */
-
-    // MAPQ - single value quality of the mapping; the scale is submitter specific
-    extern column < I32 > izip_encoding MAPQ;
-
-    extern column INSDC:coord:zero MATE_REF_POS = out_mate_ref_pos;
-    extern column INSDC:coord:len MATE_REF_LEN = out_mate_ref_len;
-    extern column I64 MATE_REF_ID = out_mate_ref_id;
-    extern column I32 TEMPLATE_LEN = out_template_len;
-    extern column bool MATE_REF_ORIENTATION = out_mate_ref_orientation;
-    readonly column ascii MATE_REF_NAME = NCBI:align:ref_name ( out_mate_ref_id );
-    readonly column ascii MATE_REF_SEQ_ID = NCBI:align:ref_seq_id( out_mate_ref_id );
-    readonly column U8 ALIGNMENT_COUNT  = out_alignment_count;
-
-
-/********************************
-* Columns representing CIGARs
-********************************/
-
-
-    // one value per base i.e. length is same as sum of READ_LEN
-    // partitioned by READ_START and READ_LEN into alternative alignments
-    // flags the shifts in reference position preceeding the base
-    // if sequence of a partitioned read starts with a ref_offset and one or more mismatches
-    // then it represents a left soft clip
-    // any run of mismatches at the end represents a right soft clip
-
-    readonly column ascii HAS_REF_OFFSET =  < U8 , ascii > map < [ 0 , 1 ] , '01'  > ( out_has_ref_offset );
-    extern column bool_encoding HAS_REF_OFFSET;
-    bool out_has_ref_offset = .HAS_REF_OFFSET;
-
-    // has number of elements equal to number of true elements in HAS_REF_OFFSET
-    extern column < I32 > izip_encoding REF_OFFSET;
-    I32 out_ref_offset = .REF_OFFSET;
-
-    // the type of offset recorded in REF_OFFSET
-    extern column < NCBI:align:ro_type > izip_encoding REF_OFFSET_TYPE;
-    NCBI:align:ro_type out_ro_type = .REF_OFFSET_TYPE;
-
-    // DISPLAY Columns
-
-    readonly column I64 ALIGN_ID = row_id ();
-
-    // get projection of the reference
-    readonly column INSDC:dna:text REF_READ
-        = < INSDC:4na:bin, INSDC:dna:text > map < INSDC:4na:map:BINSET, INSDC:4na:map:CHARSET > ( REF_READ );
-
-    readonly column INSDC:4na:bin REF_READ
-        = NCBI:align:ref_sub_select (out_ref_id, out_ref_start, out_ref_len, .REF_PLOIDY)
-        | NCBI:align:ref_sub_select (out_ref_id, out_ref_start, out_ref_len );
-
-    INSDC:4na:bin ref_read_internal
-        = NCBI:align:ref_sub_select (out_ref_id, out_ref_start, out_ref_len_internal, .REF_PLOIDY)
-        | NCBI:align:ref_sub_select (out_ref_id, out_ref_start, out_ref_len_internal);
-
-    // text forms of reads
-    INSDC:dna:text out_dna_text
-        = < INSDC:4na:bin, INSDC:dna:text > map < INSDC:4na:map:BINSET, INSDC:4na:map:CHARSET > ( out_4na_bin );
-    readonly column INSDC:dna:text RAW_READ
-        = < INSDC:4na:bin, INSDC:dna:text > map < INSDC:4na:map:BINSET, INSDC:4na:map:CHARSET > ( out_raw_read );
-    readonly column INSDC:4na:bin RAW_READ
-        = out_raw_read;
-
-    // CIGARs
-    readonly column ascii CIGAR_LONG
-        = < ascii > NCBI:align:cigar #2 < 1 > (out_has_mismatch, out_has_ref_offset, out_ref_offset, out_read_len, out_ref_len, out_ro_type)
-        | < ascii > NCBI:align:cigar #2 < 1 > (out_has_mismatch, out_has_ref_offset, out_ref_offset, out_read_len, out_ref_len)
-        | < ascii > NCBI:align:cigar #2 < 1 > (out_has_mismatch, out_has_ref_offset, out_ref_offset, out_read_len)
-        ;
-    readonly column INSDC:coord:len CIGAR_LONG_LEN
-        = < INSDC:coord:len > NCBI:align:cigar #2 < 1 > (out_has_mismatch, out_has_ref_offset, out_ref_offset, out_read_len, out_ref_len, out_ro_type)
-        | < INSDC:coord:len > NCBI:align:cigar #2 < 1 > (out_has_mismatch, out_has_ref_offset, out_ref_offset, out_read_len, out_ref_len)
-        | < INSDC:coord:len > NCBI:align:cigar #2 < 1 > (out_has_mismatch, out_has_ref_offset, out_ref_offset, out_read_len)
-        ;
-    readonly column ascii CIGAR_SHORT
-        = < ascii > NCBI:align:cigar #2 < 0 > (out_has_mismatch, out_has_ref_offset, out_ref_offset, out_read_len, out_ref_len, out_ro_type)
-        | < ascii > NCBI:align:cigar #2 < 0 > (out_has_mismatch, out_has_ref_offset, out_ref_offset, out_read_len, out_ref_len)
-        | < ascii > NCBI:align:cigar #2 < 0 > (out_has_mismatch, out_has_ref_offset, out_ref_offset, out_read_len)
-        ;
-    readonly column INSDC:coord:len CIGAR_SHORT_LEN
-        = < INSDC:coord:len > NCBI:align:cigar #2 < 0 > (out_has_mismatch, out_has_ref_offset, out_ref_offset, out_read_len, out_ref_len, out_ro_type)
-        | < INSDC:coord:len > NCBI:align:cigar #2 < 0 > (out_has_mismatch, out_has_ref_offset, out_ref_offset, out_read_len, out_ref_len)
-        | < INSDC:coord:len > NCBI:align:cigar #2 < 0 > (out_has_mismatch, out_has_ref_offset, out_ref_offset, out_read_len)
-        ;
-
-    readonly column ascii RNA_ORIENTATION
-        = NCBI:align:rna_orientation ( out_ro_type )
-        ;
-
-    readonly column U32 EDIT_DISTANCE
-        = NCBI:align:edit_distance #3 (out_has_mismatch, out_has_ref_offset, out_ref_offset, out_ro_type, out_read_len)
-        | NCBI:align:edit_distance #2 (out_has_mismatch, out_has_ref_offset, out_ref_offset, out_ref_len, out_read_len)
-        | NCBI:align:edit_distance #2 (out_has_mismatch, out_has_ref_offset, out_ref_offset, out_ref_len)
-        | NCBI:align:edit_distance #1 (out_has_mismatch, out_has_ref_offset, out_ref_offset);
-
-    readonly column ascii HAS_MISMATCH = < U8 , ascii > map < [ 0 , 1 ] , '01'  > ( out_has_mismatch );
-
-    // needed for backward compatibility
-    readonly column ascii SEQ_SPOT_GROUP = out_spot_group;
-
-
-/* These columns are purely informational. */
-    bool out_ref_mismatch = NCBI:align:get_ref_mismatch ( out_has_mismatch, out_has_ref_offset, out_ref_offset, out_ref_len );
-    readonly column ascii REF_MISMATCH = < U8 , ascii > map < [ 0 , 1 ] , '01'  > ( out_ref_mismatch );
-    readonly column bool REF_MISMATCH = out_ref_mismatch;
-
-    bool out_ref_insert = NCBI:align:get_ref_insert ( out_has_mismatch, out_has_ref_offset, out_ref_offset, out_ref_len );
-    readonly column ascii REF_INSERT = < U8 , ascii > map < [ 0 , 1 ] , '01'  > ( out_ref_insert );
-    readonly column bool REF_INSERT = out_ref_insert;
-
-    bool out_ref_delete = NCBI:align:get_ref_delete ( out_has_mismatch, out_has_ref_offset, out_ref_offset, out_ref_len );
-    readonly column ascii REF_DELETE = < U8 , ascii > map < [ 0 , 1 ] , '01'  > ( out_ref_delete );
-    readonly column bool REF_DELETE = out_ref_delete;
-
-};
-
-
-/* align_full
- *  aligns externally stored sequence against reference
- *  alignment transcript is calculated
- *
- * History:
- *  1.1 - respond to changes in base table
- */
-table NCBI:align:tbl:align_full #1.1
-    = NCBI:align:tbl:align_cmn #2.1
-{
-    bool out_is_secondary = <bool> echo < true > ();
-    // restore reads to its raw form (orientation is restored)
-
-    INSDC:4na:bin out_raw_read
-        = < INSDC:4na:bin > simple_sub_select  < 'PRIMARY_ALIGNMENT', '( INSDC:4na:bin ) RAW_READ' > (.PRIMARY_ALIGNMENT_ID)
-        | < INSDC:4na:bin > NCBI:align:project_from_sequence < '( INSDC:4na:bin ) READ'> ( .SEQ_SPOT_ID, .SEQ_READ_ID );
-
-    INSDC:4na:bin out_4na_bin
-	    = NCBI:align:align_restore_read ( ref_read_internal, out_has_mismatch, tmp_out_mismatch_4na_bin, out_has_ref_offset, out_ref_offset, .READ_LEN )
-	    | NCBI:align:align_restore_read ( ref_read_internal, out_has_mismatch, tmp_out_mismatch_4na_bin, out_has_ref_offset, out_ref_offset )
-    	    | NCBI:align:raw_restore_read ( out_raw_read, .REF_ORIENTATION );
-
-
-    // flags mismatches with the reference
-    // produced by actual comparison of REF_READ and READ
-    // TMP_HAS_MISMATCH is a hack to speed up retrieval during coverage recalculation
-    column bool_encoding TMP_HAS_MISMATCH;
-    bool out_has_mismatch
-        = .TMP_HAS_MISMATCH
-	| NCBI:align:generate_has_mismatch ( REF_READ, READ, out_has_ref_offset, out_ref_offset );
-    readonly column bool HAS_MISMATCH = out_has_mismatch;
-
-    INSDC:4na:bin out_mismatch_4na_bin
-        = NCBI:align:generate_mismatch ( REF_READ, READ, out_has_ref_offset, out_ref_offset );
-
-    INSDC:4na:bin tmp_out_mismatch_4na_bin =  < INSDC:dna:text, INSDC:4na:bin > map < INSDC:4na:map:CHARSET, INSDC:4na:map:BINSET > ( .TMP_MISMATCH );
-
-    // temporary column for reference coverage calculation
-    column < INSDC:dna:text> zip_encoding TMP_MISMATCH;
-
-    INSDC:dna:text out_mismatch_dna_text
-        = .TMP_MISMATCH
-        | < INSDC:4na:bin, INSDC:dna:text > map < INSDC:4na:map:BINSET, INSDC:4na:map:CHARSET > ( out_mismatch_4na_bin );
-
-    readonly column INSDC:dna:text MISMATCH = out_mismatch_dna_text;
-    readonly column INSDC:4na:bin MISMATCH = out_mismatch_4na_bin;
-
-    physical column < INSDC:coord:zero > izip_encoding .MATE_REF_POS = MATE_REF_POS;
-    INSDC:coord:zero out_mate_ref_pos = .MATE_REF_POS
-                                      | < INSDC:coord:zero > simple_sub_select < '','REF_POS'> (MATE_ALIGN_ID);
-
-    physical column < I64 > izip_encoding .MATE_REF_ID = MATE_REF_ID;
-    I64 out_mate_ref_id = .MATE_REF_ID
-                        | < I64 > simple_sub_select < '','REF_ID'> (MATE_ALIGN_ID);
-
-    INSDC:coord:len out_mate_ref_len = < INSDC:coord:len > simple_sub_select < '','REF_LEN'> (MATE_ALIGN_ID);
-    physical column < I32 > izip_encoding .TEMPLATE_LEN = TEMPLATE_LEN;
-    I32 out_template_len = .TEMPLATE_LEN
-            | NCBI:align:template_len(REF_POS,out_mate_ref_pos,out_ref_len,out_mate_ref_len,REF_NAME,MATE_REF_NAME,SEQ_READ_ID);
-
-    physical column < bool > izip_encoding .MATE_REF_ORIENTATION = MATE_REF_ORIENTATION;
-    bool out_mate_ref_orientation = .MATE_REF_ORIENTATION
-                                  | < bool >  simple_sub_select < '','REF_ORIENTATION'> (MATE_ALIGN_ID);
-
-    I64 out_mate_align_id = .MATE_ALIGN_ID;
-    physical column <I64> izip_encoding .MATE_ALIGN_ID = MATE_ALIGN_ID;
-    extern column I64 MATE_ALIGN_ID = out_mate_align_id;
-
-    physical column < I64 > izip_encoding .PRIMARY_ALIGNMENT_ID = PRIMARY_ALIGNMENT_ID;
-
-    I32 read_idx = <I32> cast (.SEQ_READ_ID);
-    extern column I64 PRIMARY_ALIGNMENT_ID
-        = .PRIMARY_ALIGNMENT_ID
-        | <I64> simple_sub_select < 'SEQUENCE','PRIMARY_ALIGNMENT_ID' > (.SEQ_SPOT_ID,.SEQ_READ_ID);
-
-};
-
-
-/* compressed_by_reference
- *  aligns internally represented sequence against reference
- *  alignment transcript is stored
- *  original sequence is reconstructed
- *
- * History:
- *  1.2 - respond to changes in base table
- */
-table NCBI:align:tbl:compressed_by_reference #1.2
-    = NCBI:align:tbl:align_cmn #2.1
-{
-    bool out_is_secondary = <bool> echo < false > ();
-
-    // one value per base i.e. length is same as sum of READ_LEN
-    // partitioned by READ_START and READ_LEN into alternative alignments
-    // flags mismatches with the reference
-    extern default column bool_encoding HAS_MISMATCH;
-    bool out_has_mismatch = .HAS_MISMATCH;
-
-    // has number of elements equal to number of true elements in HAS_MISMATCH
-    extern column INSDC:dna:text MISMATCH
-    {
-        read = out_mismatch_dna_text;
-        validate = < INSDC:dna:text > compare ( in_mismatch_dna_text, out_mismatch_dna_text );
-    }
-
-    INSDC:dna:text in_mismatch_dna_text
-        = < INSDC:dna:text, INSDC:dna:text > map < '.acmgrsvtwyhkdbn','NACMGRSVTWYHKDBN' > ( MISMATCH );
-
-    INSDC:4na:bin in_mismatch_4na_bin
-        = < INSDC:dna:text, INSDC:4na:bin > map < INSDC:4na:map:CHARSET, INSDC:4na:map:BINSET > ( in_mismatch_dna_text );
-
-    extern column < ascii > zip_encoding ALIGN_GROUP;
-
-    physical column < INSDC:4na:bin > zip_encoding .MISMATCH = in_mismatch_4na_bin;
-
-    INSDC:4na:bin out_mismatch_4na_bin = .MISMATCH;
-    INSDC:dna:text out_mismatch_dna_text
-        = < INSDC:4na:bin, INSDC:dna:text > map < INSDC:4na:map:BINSET, INSDC:4na:map:CHARSET > ( out_mismatch_4na_bin );
-
-    I64 out_mate_align_id
-        = .MATE_ALIGN_ID
-        | NCBI:align:get_mate_align_id (.SEQ_SPOT_ID);
-
-    physical column <I64> izip_encoding .MATE_ALIGN_ID = MATE_ALIGN_ID;
-    extern column I64 MATE_ALIGN_ID = out_mate_align_id;
-
-    // restore reads from alignment columns and the reference
-    // optional .READ_LEN size defines PLOIDY
-    INSDC:4na:bin out_4na_bin
-	    = NCBI:align:align_restore_read ( ref_read_internal, out_has_mismatch, .MISMATCH, out_has_ref_offset, out_ref_offset, .READ_LEN )
-	    | NCBI:align:align_restore_read ( ref_read_internal, out_has_mismatch, .MISMATCH, out_has_ref_offset, out_ref_offset );
-
-    // restore reads to its raw form (orientation is restored)
-    INSDC:4na:bin out_raw_read = NCBI:align:raw_restore_read (out_4na_bin,.REF_ORIENTATION);
-
-    I64	primary_align_pair =  < I64 > simple_sub_select < 'SEQUENCE','PRIMARY_ALIGNMENT_ID'> (.SEQ_SPOT_ID);
-    I64 out_mate_ref_id = < I64 > simple_sub_select < '','REF_ID'> (MATE_ALIGN_ID);
-    bool  out_mate_ref_orientation = < bool >  simple_sub_select < '','REF_ORIENTATION'> (MATE_ALIGN_ID);
-    INSDC:coord:zero out_mate_ref_pos = < INSDC:coord:zero > simple_sub_select < '','REF_POS'> (MATE_ALIGN_ID);
-    INSDC:coord:len out_mate_ref_len = < INSDC:coord:len > simple_sub_select < '','REF_LEN'> (MATE_ALIGN_ID);
-    readonly column U32   MATE_EDIT_DISTANCE   = < U32 >   simple_sub_select < '','EDIT_DISTANCE'> (MATE_ALIGN_ID);
-    readonly column ascii MATE_CIGAR_LONG      = < ascii > simple_sub_select < '','CIGAR_LONG'> (MATE_ALIGN_ID);
-    readonly column ascii MATE_CIGAR_SHORT     = < ascii > simple_sub_select < '','CIGAR_SHORT'> (MATE_ALIGN_ID);
-    readonly column INSDC:coord:len MATE_CIGAR_LONG_LEN  = < INSDC:coord:len > simple_sub_select < '','CIGAR_LONG_LEN'> (MATE_ALIGN_ID);
-    readonly column INSDC:coord:len MATE_CIGAR_SHORT_LEN = < INSDC:coord:len > simple_sub_select < '','CIGAR_SHORT_LEN'> (MATE_ALIGN_ID);
-
-    I32 out_template_len = NCBI:align:template_len (REF_POS,out_mate_ref_pos,out_ref_len,out_mate_ref_len,REF_NAME,MATE_REF_NAME,SEQ_READ_ID);
-};
-
-
-/* align_sorted
- *  deflated alignment data sorted against reference
- *
- * History:
- *  1.2 - respond to changes in base table
- */
-table NCBI:align:tbl:align_sorted #1.2
-    = NCBI:align:tbl:compressed_by_reference #1.2
-    , NCBI:align:tbl:global_ref_block #1.0.0
-{
-    // 128K
-    column default limit = 131072;
-};
-
-
-/* align_unsorted
- *  deflated alignment unsorted data
- *
- * History:
- *  1.2 - respond to changes in base table
- */
-table NCBI:align:tbl:align_unsorted #1.2
-    = NCBI:align:tbl:compressed_by_reference #1.2
-    , NCBI:align:tbl:local_ref_block #1.0.0
-{
-    // 128K
-    column default limit = 131072;
-};
-
-
-/* align_mate_sorted
- *
- * History:
- *  1.1 - respond to changes in base table
- */
-table NCBI:align:tbl:align_mate_sorted #1.1
-    = NCBI:align:tbl:align_full #1.1
-    , NCBI:align:tbl:global_ref_block #1.0.0
-{
-    // 128K
-    column default limit = 131072;
-};
-
-
-/* align_mate_unsorted
- *
- * History:
- *  1.1 - respond to changes in base table
- */
-table NCBI:align:tbl:align_mate_unsorted #1.1
-    = NCBI:align:tbl:align_full #1.1
-    , NCBI:align:tbl:local_ref_block #1.0.0
-{
-    // 128K
-    column default limit = 131072;
-};
-
-/* align_allele
- *  alleles coverage extension
- *
- * History:
- *  1.2 - respond to changes in base table
- */
-table NCBI:align:tbl:align_allele #1.2
-    = NCBI:align:tbl:align_unsorted #1.2
-{
-    extern column < I64 > izip_encoding EVIDENCE_ALIGNMENT_IDS;
-
-    /*
-    INSDC:quality:phred out_qual_phred
-        = < INSDC:quality:phred > echo < 30 > ( out_4na_bin );
-    */
-};
-
-/*--------------------------------------------------------------------------
- * seq
- *  alignment sequence table
- */
-physical
-I64 NCBI:align:sorted:alignment_id_encoding #1.0
-{
-    decode
-    {
-        I64 outliers_removed = iunzip ( @ );
-        return < I64 > outlier_decode < 0 > ( outliers_removed );
-    }
-
-    encode
-    {
-        I64 outliers_removed = < I64 > outlier_encode < 0 > ( @ );
-        return izip ( outliers_removed );
-    }
-}
-
-
-table NCBI:align:tbl:seq #1.1 =
-    NCBI:tbl:base_space #2.0.3,
-    NCBI:tbl:phred_quality #2.0.4,
-    NCBI:align:tbl:cmp_base_space #1,
-    NCBI:SRA:tbl:spotdesc #1.0.2,
-    NCBI:SRA:tbl:stats #1.2.0
-{
-    // 128K
-    column default limit = 131072;
-
-    // gets primary record in alignment table (size of column is NREADS)
-    // if sorted - should used special encoding
-    extern column <I64> izip_encoding PRIMARY_ALIGNMENT_ID;
-
-    INSDC:coord:zero trim_start = < INSDC:coord:zero > echo < 0 > ();
-    INSDC:coord:len trim_len = _spot_len;
-
-    // size is NREADS
-    extern column < U8 > zip_encoding ALIGNMENT_COUNT;
-
-    // auto-generate name from row-id
-    ascii out_name_fmt = < ascii > echo < '$R' > ();
-
-    // temparary column
-    extern column < U64 > izip_encoding TMP_KEY_ID;
-
-    // restored  READ
-    INSDC:4na:bin out_dcmp_4na_bin
-        = NCBI:align:seq_restore_read (out_cmp_4na_bin, .PRIMARY_ALIGNMENT_ID, .READ_LEN, .READ_TYPE);
-
-    extern column < U64 > izip_encoding TI;
-
-    extern column <ascii> zip_encoding CMP_LINKAGE_GROUP;
-
-    // restored LINKAGE_GROUP
-    readonly column ascii LINKAGE_GROUP = NCBI:align:seq_restore_linkage_group(.CMP_LINKAGE_GROUP, .PRIMARY_ALIGNMENT_ID)
-                                        | .CMP_LINKAGE_GROUP;
-};
-
-
-table NCBI:align:tbl:cs_seq #1.2
-{
-    /* writable columns */
-    extern column INSDC:color:text CMP_CSREAD
-        = out_cmp_color_text
-        ;
-
-    extern column < INSDC:dna:text > zip_encoding CS_KEY;
-
-    extern default column < INSDC:quality:phred > zip_encoding QUALITY;
-
-    extern column < I64 > izip_encoding PRIMARY_ALIGNMENT_ID;
-
-    extern column < U8 > zip_encoding ALIGNMENT_COUNT;
-
-    extern column < INSDC:SRA:platform_id > zip_encoding PLATFORM;
-
-    extern column < ascii > zip_encoding LABEL;
-    extern column < INSDC:coord:zero > izip_encoding LABEL_START;
-    extern column < INSDC:coord:len > izip_encoding LABEL_LEN;
-
-    extern column < INSDC:SRA:xread_type > zip_encoding READ_TYPE;
-    extern column < INSDC:coord:zero > izip_encoding READ_START;
-    extern column < INSDC:coord:len > izip_encoding READ_LEN;
-    extern column < INSDC:SRA:read_filter > zip_encoding READ_FILTER;
-
-    extern column < U64 > izip_encoding TMP_KEY_ID;
-
-    extern column < ascii > zip_encoding SPOT_GROUP;
-
-    extern column < U64 > izip_encoding TI;
-
-    /* writing rules */
-    INSDC:x2cs:bin in_cmp_x2cs_bin
-        = < INSDC:color:text, INSDC:x2cs:bin > map < INSDC:x2cs:map:CHARSET, INSDC:x2cs:map:BINSET > ( CMP_CSREAD )
-        ;
-    INSDC:2cs:bin in_cmp_2cs_bin
-        = < INSDC:x2cs:bin, INSDC:2cs:bin > map < INSDC:x2cs:map:BINSET, [ 0, 1, 2, 3, 0 ] > ( in_cmp_x2cs_bin )
-        ;
-    INSDC:x2cs:bin in_cmp_alt_x2cs_bin
-        = < INSDC:x2cs:bin, INSDC:x2cs:bin > map < INSDC:x2cs:map:BINSET, [ 0, 0, 0, 0, 4 ] > ( in_cmp_x2cs_bin )
-        ;
-    physical column INSDC:2cs:packed .CMP_CSREAD
-        = ( INSDC:2cs:packed ) pack ( in_cmp_2cs_bin )
-        ;
-    physical column < INSDC:x2cs:bin > zip_encoding .CMP_ALTCSREAD
-        = < INSDC:x2cs:bin > trim < ALIGN_LEFT, 0 > ( in_cmp_alt_x2cs_bin )
-        ;
-
-    /* reading rules */
-    INSDC:2cs:packed phys_cmp_2cs_packed
-        = .CMP_CSREAD
-        ;
-    INSDC:x2cs:bin phys_cmp_alt_x2cs_bin
-        = .CMP_ALTCSREAD
-        ;
-    INSDC:2cs:packed phys_2cs_packed
-        = .CSREAD
-        ;
-    INSDC:x2cs:bin phys_alt_x2cs_bin
-        = .ALTCSREAD
-        ;
-    INSDC:2cs:bin out_cmp_2cs_bin
-        = ( INSDC:2cs:bin ) unpack ( phys_cmp_2cs_packed )
-        ;
-    INSDC:2cs:bin out_2cs_bin
-        = ( INSDC:2cs:bin ) unpack ( phys_2cs_packed )
-        ;
-    INSDC:x2cs:bin out_cmp_x2cs_bin
-        = ( INSDC:x2cs:bin ) < U8 > bit_or < ALIGN_RIGHT > ( out_cmp_2cs_bin, phys_cmp_alt_x2cs_bin )
-        | ( INSDC:x2cs:bin ) out_cmp_2cs_bin
-        ;
-    INSDC:x2cs:bin out_x2cs_bin
-        = ( INSDC:x2cs:bin ) < U8 > bit_or < ALIGN_RIGHT > ( out_2cs_bin, phys_alt_x2cs_bin )
-        | ( INSDC:x2cs:bin ) out_2cs_bin
-        ;
-     INSDC:color:text out_cmp_color_text
-        = < INSDC:x2cs:bin, INSDC:color:text > map <  INSDC:x2cs:map:BINSET, INSDC:x2cs:map:CHARSET > ( out_cmp_x2cs_bin )
-        ;
-     INSDC:color:text out_color_text
-        = < INSDC:x2cs:bin, INSDC:color:text > map <  INSDC:x2cs:map:BINSET, INSDC:x2cs:map:CHARSET > ( out_x2cs_bin )
-        ;
-
-    /* triggers from stats */
-    INSDC:quality:phred in_qual_phred
-        = QUALITY
-        ;
-    INSDC:coord:len in_read_len
-        = READ_LEN
-        ;
-    INSDC:SRA:xread_type in_read_type
-        = READ_TYPE
-        ;
-    ascii in_spot_group
-        = SPOT_GROUP
-        ;
-    trigger meta_stats
-        = NCBI:SRA:cmp_stats_trigger ( in_cmp_x2cs_bin, in_qual_phred, in_read_len, in_read_type, in_spot_group )
-        | NCBI:SRA:cmp_stats_trigger ( in_cmp_x2cs_bin, in_qual_phred, in_read_len, in_read_type )
-        ;
-    trigger qual_stats
-        = NCBI:SRA:phred_stats_trigger #1 ( in_qual_phred )
-        ;
-
-    extern column <ascii> zip_encoding CMP_LINKAGE_GROUP;
-
-    // restored LINKAGE_GROUP
-    readonly column ascii LINKAGE_GROUP = NCBI:align:seq_restore_linkage_group(.CMP_LINKAGE_GROUP, .PRIMARY_ALIGNMENT_ID)
-                                        | .CMP_LINKAGE_GROUP;
-};
-
-table NCBI:align:view:cs_seq #1.1 = NCBI:align:tbl:cs_seq #1.2
-{
-    // various READ columns
-    default readonly column INSDC:dna:text READ
-        = < INSDC:4na:bin, INSDC:dna:text > map < INSDC:4na:map:BINSET, INSDC:4na:map:CHARSET > ( out_dcmp_4na_bin )
-        | < INSDC:4na:bin, INSDC:dna:text > map < INSDC:4na:map:BINSET, INSDC:4na:map:CHARSET > ( out_4na_bin )
-        ;
-    readonly column INSDC:4na:bin READ = out_dcmp_4na_bin | out_4na_bin;
-    readonly column INSDC:4na:packed READ = pack ( out_dcmp_4na_bin ) | pack ( out_4na_bin );
-    readonly column INSDC:x2na:bin READ = out_dcmp_x2na_bin | out_x2na_bin;
-    readonly column INSDC:2na:bin READ = out_dcmp_2na_bin | out_2na_bin;
-    INSDC:2na:bin out_dcmp_2na_bin
-        = < INSDC:x2na:bin, INSDC:2na:bin > map < INSDC:x2na:map:BINSET, [ 0, 1, 2, 3, 0 ] > ( out_dcmp_x2na_bin )
-        ;
-    INSDC:2na:bin out_2na_bin
-        = < INSDC:x2na:bin, INSDC:2na:bin > map < INSDC:x2na:map:BINSET, [ 0, 1, 2, 3, 0 ] > ( out_x2na_bin )
-        ;
-    readonly column INSDC:2na:packed READ = pack ( out_dcmp_2na_bin ) | pack ( out_2na_bin );
-
-    // decompression in base space
-    INSDC:coord:len cmp_read_len
-        = < INSDC:coord:len > NCBI:align:make_cmp_read_desc #1 < true > ( .READ_LEN, .PRIMARY_ALIGNMENT_ID )
-        ;
-    INSDC:coord:zero cmp_read_start
-        = NCBI:align:make_read_start #1 ( cmp_read_len )
-        ;
-    INSDC:x2na:bin out_cmp_x2na_bin
-        = NCBI:dna_from_color #1 ( out_cmp_x2cs_bin, cmp_read_start, cmp_read_len, .CS_KEY, color_matrix )
-        ;
-    INSDC:x2na:bin out_x2na_bin
-        = NCBI:dna_from_color #1 ( out_x2cs_bin, .READ_START, .READ_LEN, .CS_KEY, color_matrix )
-        ;
-    INSDC:4na:bin out_cmp_4na_bin
-        = < INSDC:x2na:bin, INSDC:4na:bin > map < INSDC:x2na:map:BINSET, [ 1, 2, 4, 8, 15 ] > ( out_cmp_x2na_bin )
-        ;
-    INSDC:4na:bin out_4na_bin
-        = < INSDC:x2na:bin, INSDC:4na:bin > map < INSDC:x2na:map:BINSET, [ 1, 2, 4, 8, 15 ] > ( out_x2na_bin )
-        ;
-    INSDC:4na:bin out_dcmp_4na_bin
-        = NCBI:align:seq_restore_read ( out_cmp_4na_bin, .PRIMARY_ALIGNMENT_ID, .READ_LEN, .READ_TYPE )
-        ;
-
-
-    // various CSREAD columns
-    default readonly column INSDC:color:text CSREAD
-        = < INSDC:x2cs:bin, INSDC:color:text > map <  INSDC:x2cs:map:BINSET, INSDC:x2cs:map:CHARSET > ( out_dcmp_x2cs_bin )
-        | out_color_text;
-    readonly column INSDC:x2cs:bin CSREAD = out_dcmp_x2cs_bin | out_x2cs_bin;
-    readonly column INSDC:2cs:bin CSREAD = out_dcmp_2cs_bin | out_2cs_bin;
-    INSDC:2cs:bin out_dcmp_2cs_bin
-        = < INSDC:x2cs:bin, INSDC:2cs:bin > map < INSDC:x2cs:map:BINSET, [ 0, 1, 2, 3, 0 ] > ( out_dcmp_x2cs_bin )
-        ;
-    readonly column INSDC:2cs:packed CSREAD = pack ( out_dcmp_2cs_bin ) | out_2cs_bin;
-
-
-    // decompression in color space
-    INSDC:x2na:bin out_dcmp_x2na_bin
-        = < INSDC:4na:bin, INSDC:x2na:bin > map < INSDC:4na:map:BINSET, [ 4,0,1,4,2,4,4,4,3,4,4,4,4,4,4,4 ] > ( out_dcmp_4na_bin )
-        ;
-    INSDC:x2cs:bin out_dcmp_x2na_x2cs_bin
-        = NCBI:color_from_dna #1 ( out_dcmp_x2na_bin, .READ_START, .READ_LEN, .CS_KEY, color_matrix )
-        ;
-    INSDC:coord:len aligned_read_len
-        = < INSDC:coord:len > NCBI:align:make_cmp_read_desc #1 < false > ( .READ_LEN, .PRIMARY_ALIGNMENT_ID )
-        ;
-    INSDC:x2cs:bin out_dcmp_x2cs_bin
-        = < INSDC:x2cs:bin > NCBI:align:seq_construct_read #1 ( out_dcmp_x2na_x2cs_bin, .READ_LEN, out_cmp_x2cs_bin, cmp_read_len )
-        ;
-
-    // CS_NATIVE - dynamic
-    U32 cmp_csread_row_len
-        = row_len #1 ( phys_cmp_2cs_packed )
-        ;
-    U32 cmp_csread_not_zero
-        = < U32 > clip < 0, 1 > ( cmp_csread_row_len )
-        ;
-    readonly column bool CS_NATIVE
-        = < U32, bool > map < [ 0, 1 ], [ false, true ] > ( cmp_cs_read_not_zero )
-        ;
-
-    // COLOR_MATRIX
-    readonly column U8 COLOR_MATRIX
-        = color_matrix
-        ;
-    U8 color_matrix
-        = < U8 > echo < INSDC:color:default_matrix > ()
-        ;
-
-    // various QUALITY types
-    readonly column INSDC:quality:text:phred_33 QUALITY
-        = out_qual_text_phred_33
-        | ( INSDC:quality:text:phred_33 ) < B8 > sum < 33 > ( .QUALITY );
-    readonly column INSDC:quality:text:phred_64 QUALITY
-        = out_qual_text_phred_64
-        | ( INSDC:quality:text:phred_64 ) < B8 > sum < 64 > ( .QUALITY );
-
-    // SPOT_LEN
-    INSDC:coord:len spot_len
-        = ( INSDC:coord:len ) row_len ( out_dcmp_4na_bin )
-        | ( INSDC:coord:len ) row_len ( out_4na_bin )
-        ;
-    readonly column INSDC:coord:len SPOT_LEN = spot_len;
-
-    // TRIM_START
-    readonly column INSDC:coord:zero TRIM_START
-        = < INSDC:coord:zero > echo < 0 > ()
-        ;
-    readonly column INSDC:coord:one TRIM_START
-        = < INSDC:coord:one > echo < 1 > ()
-        ;
-    // TRIM_LEN
-    readonly column INSDC:coord:len TRIM_LEN = spot_len;
-
-    // MIN_SPOT_ID
-    readonly column INSDC:SRA:spotid_t MIN_SPOT_ID
-        = < INSDC:SRA:spotid_t > meta:value < "STATS/TABLE/SPOT_MIN" > ()
-        ;
-    // MAX_SPOT_ID
-    readonly column INSDC:SRA:spotid_t MAX_SPOT_ID
-        = < INSDC:SRA:spotid_t > meta:value < "STATS/TABLE/SPOT_MAX" > ()
-        ;
-    // SPOT_COUNT
-    readonly column U64 SPOT_COUNT
-        = < U64 > meta:value < "STATS/TABLE/SPOT_COUNT" > ()
-        ;
-    // BASE_COUNT
-    U64 base_count
-        = < U64 > meta:value < "STATS/TABLE/BASE_COUNT" > ()
-        ;
-    readonly column U64 BASE_COUNT = base_count;
-    // BIO_BASE_COUNT
-    readonly column U64 BIO_BASE_COUNT
-        = < U64 > meta:value < "STATS/TABLE/BIO_BASE_COUNT" > ()
-        ;
-    // CMP_BASE_COUNT
-    readonly column U64 CMP_BASE_COUNT
-        = < U64 > meta:value < "STATS/TABLE/CMP_BASE_COUNT" > ()
-        | base_count
-        ;
-
-    // various PLATFORM
-    // TBD
-
-    // SPOT_ID
-    I64 rowid_64 = row_id ();
-    readonly column INSDC:SRA:spotid_t SPOT_ID
-        = cast ( rowid_64 )
-        ;
-
-    readonly column ascii NAME
-        = sprintf < "%u" > ( SPOT_ID )
-        ;
-
-};
-
-
-/***********************************
-* Reference table - to store reference sequences
-* Sequences are divided in chunks. Two sequences never share a chunk.
-* SEQ_LEN     - real size of a chunk should never exceed MAX_SEQ_LEN when it is set
-* READ        - inherited from NCBI:tbl:base_space
-* CMP_READ,CMP_ALTREAD - are inherited from NCBI:align:tbl:cmp_base_space
-* SEQ_ID,SEQ_START,SEQ_LEN are inherited from  NCBI:align:tbl:seqloc
-* .skey contains NAME of the chunk - it corresponds to actual name used in BAM (chr1,chr2, etc....)
-*
-* SEQ_START,SEQ_LEN,MAX_SEQ_LEN,SEQID and rowlen(READ) operate the following way
-* - SEQ_LEN < MAX_SEQ_LEN - should only happen on the last chunk of the sequence
-* - .READ is absent - there should be a retrieval from external services by SEQ_ID,SEQ_START,SEQ_LEN
-* - rowlen(.READ) = 0  && SEQ_START==0 (used as flag) -  the sequence is SEQ_LEN repetition of 'N'
-* - rowlen(.READ) = 0  && SEQ_START >= 1 - the sequence have to be fetched from external sources
-* - 0 < rowlen(.READ)< SEQ_LEN -- the sequence have to be filled with 'N's
-*
-v***********************************/
-table NCBI:align:tbl:reference #2 =
-    NCBI:align:tbl:cmp_base_space #1,
-    NCBI:tbl:base_space #2.0.3,
-    NCBI:tbl:seqloc #1,
-    NCBI:SRA:tbl:stats #1.2.0
-{
-    INSDC:quality:phred out_qual_phred
-        = < INSDC:quality:phred > echo < 30 > ( out_dcmp_4na_bin );
-
-    //  MAX_SEQ_LEN - should be a constant == static column
-    extern column < U32 > izip_encoding MAX_SEQ_LEN;
-
-    // indicates if sequence has circular structure
-    // copied from refSeq
-    extern column bool_encoding CIRCULAR;
-
-    // make CS_KEY writable
-    INSDC:dna:text in_cs_key
-        = < INSDC:dna:text, INSDC:dna:text > map < 'acgtn', 'ACGTN' > ( CS_KEY );
-    physical column < INSDC:dna:text > zip_encoding .CS_KEY = in_cs_key;
-
-    U32 in_spot_len = SEQ_LEN;
-
-    INSDC:coord:len _alt_in_read_len
-        = READ_LEN
-        | SEQ_LEN;
-
-    INSDC:SRA:xread_type _alt_in_read_type
-        = READ_TYPE
-        | < INSDC:SRA:xread_type > echo < SRA_READ_TYPE_BIOLOGICAL > ();
-
-    // extra columns needed for CS conversion
-    INSDC:coord:zero out_read_start = < INSDC:coord:zero > echo < 0 > ();
-    INSDC:coord:len  out_read_len = .SEQ_LEN;
-
-    extern column utf8  NAME = out_spot_name_utf8;
-    physical utf8 .NAME = idx:text:insert #1.0  < 'i_name' > ( NAME );
-
-    utf8 out_spot_name_utf8 = idx:text:project #1.0 < 'i_name' > (.NAME );
-
-    ascii out_spot_name = cast ( out_spot_name_utf8 );
-
-    INSDC:coord:zero trim_start = < INSDC:coord:zero > echo < 0 > ();
-    INSDC:coord:len trim_len = base_space_spot_len;
-
-    ascii out_label
-        = < ascii > echo < "reference" > ();
-    INSDC:coord:zero out_label_start
-        = < INSDC:coord:zero > echo < 0 > ();
-    INSDC:coord:len out_label_len
-        = < INSDC:coord:len > echo < 9 > ();
-
-    U32 out_nreads
-        = < U32 > echo < 1 > ();
-    INSDC:SRA:xread_type out_read_type
-        = < INSDC:SRA:xread_type > echo < 3 > ();
-    INSDC:SRA:read_filter out_rd_filter
-        = < INSDC:SRA:read_filter > echo < SRA_READ_FILTER_PASS > ();
-
-
-// Columns of computed coverages by alignment
-
-    // TBD: use percentiles instead of min/max?
-    // maximum value clipped at 255 of the coverage density
-    // for a chunk
-    extern column < U8 > izip_encoding CGRAPH_HIGH;
-
-    // minimum value clipped at 255 of the coverage density
-    // for a chunk
-    extern column < U8 > izip_encoding CGRAPH_LOW;
-
-    // count of the number of mismatches in the chunk
-    extern column < U32 > izip_encoding CGRAPH_MISMATCHES;
-
-    // count of the number of inserts and deletes in the chunk
-    extern column < U32 > izip_encoding CGRAPH_INDELS;
-
-    // List of row ids from alignment tables
-    extern column < I64 > izip_encoding PRIMARY_ALIGNMENT_IDS;
-    extern column < I64 > izip_encoding SECONDARY_ALIGNMENT_IDS;
-    extern column < I64 > izip_encoding EVIDENCE_INTERVAL_IDS;
-
-    // both OVERLAP_REF_* columns are array of three elements, matching number of *_IDS columns above.
-    // points back to an offset where the alignments to this chunk start
-    extern column < INSDC:coord:zero > izip_encoding OVERLAP_REF_POS;
-    // indicates the length of the longest tail of the alignmnent to this chunk which start in previous chunks
-    // if value of an element in this col is zero corresponding value of OVERLAP_REF_POS is meaningless
-    extern column < INSDC:coord:len > izip_encoding OVERLAP_REF_LEN;
-
-    // Mechanism to seach for NAME
-    readonly column vdb:row_id_range NAME_RANGE
-        = idx:text:lookup #1.0 < 'i_name', 'QUERY_SEQ_NAME' > ();
-
-    // Fully instantiates READ
-    INSDC:4na:bin out_dcmp_4na_bin
-        = NCBI:align:ref_restore_read (out_cmp_4na_bin, .SEQ_ID, .SEQ_START, .SEQ_LEN);
-}
-
-// THE DATABASES
-database NCBI:align:db:alignment_sorted #1.3
-{
-    table NCBI:align:tbl:reference #2 REFERENCE;
-    table NCBI:align:tbl:align_sorted #1.2 PRIMARY_ALIGNMENT;
-    table NCBI:align:tbl:align_mate_sorted #1.1 SECONDARY_ALIGNMENT;
-    table NCBI:align:tbl:seq #1.1 SEQUENCE;
-    table NCBI:align:view:cs_seq #1.1 CS_SEQUENCE;
-    table NCBI:align:tbl:qstat #1.0 QUAL_STAT;
-};
-
-database NCBI:align:db:alignment_unsorted #1.3
-{
-    table NCBI:align:tbl:reference #2 REFERENCE;
-    table NCBI:align:tbl:align_unsorted #1.2 PRIMARY_ALIGNMENT;
-    table NCBI:align:tbl:align_mate_unsorted #1.1 SECONDARY_ALIGNMENT;
-    table NCBI:align:tbl:seq #1.1 SEQUENCE;
-    table NCBI:align:view:cs_seq #1.1 CS_SEQUENCE;
-    table NCBI:align:tbl:qstat #1.0 QUAL_STAT;
-};
-
-database NCBI:align:db:alignment_evidence #1.3
-{
-    table NCBI:align:tbl:reference #2 REFERENCE;
-    table NCBI:align:tbl:align_unsorted #1.2 PRIMARY_ALIGNMENT;
-    table NCBI:align:tbl:align_mate_unsorted #1.1 SECONDARY_ALIGNMENT;
-    table NCBI:align:tbl:align_allele #1.2 EVIDENCE_INTERVAL;
-    table NCBI:align:tbl:align_mate_unsorted #1.1 EVIDENCE_ALIGNMENT;
-    table NCBI:align:tbl:seq #1.1 SEQUENCE;
-    table NCBI:align:view:cs_seq #1.1 CS_SEQUENCE;
-    table NCBI:align:tbl:qstat #1.0 QUAL_STAT;
-};
-
-database NCBI:align:db:alignment_evidence_sorted #1.2
-{
-    table NCBI:align:tbl:reference #2 REFERENCE;
-    table NCBI:align:tbl:align_sorted #1.2 PRIMARY_ALIGNMENT;
-    table NCBI:align:tbl:align_mate_sorted #1.1 SECONDARY_ALIGNMENT;
-    table NCBI:align:tbl:align_allele #1.2 EVIDENCE_INTERVAL;
-    table NCBI:align:tbl:align_mate_unsorted #1.1 EVIDENCE_ALIGNMENT;
-    table NCBI:align:tbl:seq #1.1 SEQUENCE;
-    table NCBI:align:view:cs_seq #1.1 CS_SEQUENCE;
-    table NCBI:align:tbl:qstat #1.0 QUAL_STAT;
-};
-
-database NCBI:align:db:unaligned #1
-{
-    table NCBI:align:tbl:seq #1.1 SEQUENCE;
-    table NCBI:SRA:ABI:tbl:v2 #1.0.4 CS_SEQUENCE;
-    table NCBI:align:tbl:qstat #1.0 QUAL_STAT;
-};
diff --git a/interfaces/align/alignsrc.h b/interfaces/align/alignsrc.h
deleted file mode 100644
index c894419..0000000
--- a/interfaces/align/alignsrc.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_align_alignsrc_
-#define _h_align_alignsrc_
-
-#ifndef _h_align_extern_
- #include <align/extern.h>
-#endif
-
-#include <stdint.h>
-#include <stdlib.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * AlignSrc
- *  an alignment guy
- */
-typedef struct AlignSrc AlignSrc;
-
-
-/* Make
- *  create an alignment source object from BAM file
- *
- *  "as" [ OUT ] - return parameter for AlignSrc object
- *
- *  "bam" [ IN ] - NUL terminated path to BAM file
- *
- *  "bai" [ IN, NULL OKAY ] - optional NUL terminated path to BAM index file
- */
-ALIGN_EXTERN int CC AlignSrcMakeFromBAM ( const AlignSrc **as, const char *bam, const char *bai );
-
-
-/* Dispose
- *  release all resources associated with alignment source
- */
-ALIGN_EXTERN int CC AlignSrcDispose ( const AlignSrc *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_align_alignsrc_ */
diff --git a/interfaces/align/bam.h b/interfaces/align/bam.h
deleted file mode 100644
index 7081c7b..0000000
--- a/interfaces/align/bam.h
+++ /dev/null
@@ -1,836 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_align_bam_
-#define _h_align_bam_
-
-#ifndef _h_align_extern_
-#include <align/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDirectory;
-struct KFile;
-struct VPath;
-struct AlignAccessDB;
-struct AlignAccessAlignmentEnumerator;
-
-
-/*--------------------------------------------------------------------------
- * BAMAlignment
- */
-typedef struct BAMAlignment BAMAlignment;
-
-    
-/* GetBAMAlignment
- *  get property
- *
- * Release with BAMAlignmentRelease.
- */
-ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorGetBAMAlignment
-    ( const struct AlignAccessAlignmentEnumerator *self, const BAMAlignment **result );
-
-
-/* AddRef
- * Release
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentAddRef ( const BAMAlignment *self );
-ALIGN_EXTERN rc_t CC BAMAlignmentRelease ( const BAMAlignment *self );
-
-
-/* GetReadLength
- *  get the sequence length
- *  i.e. the number of elements of both sequence and quality
- *
- *  "length" [ OUT ] - length in bases of query sequence and quality
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetReadLength ( const BAMAlignment *self, uint32_t *length );
-
-
-/* GetSequence
- *  get the sequence data [0..ReadLength)
- *  caller provides buffer of ReadLength bytes
- *
- *  "sequence" [ OUT ] - pointer to a buffer of at least ReadLength bytes
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetSequence ( const BAMAlignment *self, char *sequence );
-
-/* GetSequence2
- *  get the sequence data [0..ReadLength)
- *  caller provides buffer of ReadLength bytes
- *
- *  "sequence" [ OUT ] - pointer to a buffer of at least ReadLength bytes
- *
- *  "start" [ IN ] and "stop" [ IN ] - zero-based coordinates, half-closed interval
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetSequence2 ( const BAMAlignment *self, char *sequence, uint32_t start, uint32_t stop);
-
-    
-/* GetQuality
- *  get the raw quality data [0..ReadLength)
- *  values are unsigned with 0xFF == missing
- *
- *  "quality" [ OUT ] - return param for quality sequence
- *   held internally, validity is guaranteed for the life of the BAMAlignment
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetQuality ( const BAMAlignment *self, const uint8_t **quality );
-
-/* GetQuality2
- *  get the raw quality data [0..ReadLength) from OQ if possible else from QUAL
- *  values are unsigned with 0xFF == missing
- *
- *  "quality" [ OUT ] - return param for quality sequence
- *   held internally, validity is guaranteed for the life of the BAMAlignment
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetQuality2(const BAMAlignment *self, const uint8_t **quality, uint8_t *offset);
-
-/* GetRefSeqId
- *  get id of reference sequence
- *  pass result into BAMFileGetRefSeqById to get the Reference Sequence record
- *
- *  "refSeqId" [ OUT ] - zero-based id of reference sequence
- *   returns -1 if set as invalid within BAM ( rc may be zero )
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetRefSeqId ( const BAMAlignment *self, int32_t *refSeqId );
-
-/* GetMateRefSeqId
- *  get id of mate's reference sequence
- *  pass result into BAMFileGetRefSeqById to get the Reference Sequence record
- *
- *  "refSeqId" [ OUT ] - zero-based id of reference sequence
- *   returns -1 if invalid
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetMateRefSeqId ( const BAMAlignment *self, int32_t *refSeqId );
-
-
-/* GetPosition
- *  get the aligned position on the ref. seq.
- *
- *  "n" [ IN ] - zero-based position index for cases of multiple alignments
- *
- *  "pos" [ OUT ] - zero-based position on reference sequence
- *  returns -1 if invalid
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetPosition ( const BAMAlignment *self, int64_t *pos );
-    
-/* GetPosition2
- *  get the aligned start position on the ref. seq.
- *  get the aligned length on the ref. seq.
- *
- *  "n" [ IN ] - zero-based position index for cases of multiple alignments
- *
- *  "pos" [ OUT ] - zero-based position on reference sequence
- *  returns -1 if invalid
- *
- *  "length" [ OUT ] - length of alignment on reference sequence
- *  returns 0 if invalid
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetPosition2 ( const BAMAlignment *self, int64_t *pos, uint32_t *length );
-    
-
-/* GetMatePosition
- *  starting coordinate of mate's alignment on ref. seq.
- *
- *  "pos" [ OUT ] - zero-based position on reference sequence
- *  returns -1 if invalid
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetMatePosition ( const BAMAlignment *self, int64_t *pos );
-
-
-/* IsMapped
- *  is the alignment mapped to something
- */
-ALIGN_EXTERN bool CC BAMAlignmentIsMapped ( const BAMAlignment *self );
-
-
-/* GetReadGroupName
- *  get the name of the read group (i.e. accession)
- *  pass result into BAMFileGetReadGroupByName to get the Read Group record
- *
- *  "name" [ OUT ] - return param for NUL-terminated read group name
- *   held internally, validity is guaranteed for the life of the BAMAlignment
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetReadGroupName ( const BAMAlignment *self, const char **name );
-
-
-/* GetReadName
- *  get the read name (i.e. spot name)
- * GetReadName2
- *  get the read name and length in bytes
- *
- *  "name" [ OUT ] - return param for NUL-terminated read name
- *   held internally, validity is guaranteed for the life of the BAMAlignment
- *
- *  "length" [ OUT ] - return the number of bytes in "name"
- *   excluding terminating NUL.
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetReadName ( const BAMAlignment *self, const char **name );
-ALIGN_EXTERN rc_t CC BAMAlignmentGetReadName2 ( const BAMAlignment *self, const char **name, size_t *length );
-    
-    
-/* GetReadName3
- *  get the read name and length in bytes
- *  applies fixups to name
- *
- *  "name" [ OUT ] - return param for read name
- *   held internally, validity is guaranteed for the life of the BAMAlignment
- *
- *  "length" [ OUT ] - return the number of bytes in "name"
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetReadName3 ( const BAMAlignment *self, const char **name, size_t *length );
-
-/* HasColorSpace
- *  Does the alignment have colorspace info
- */
-ALIGN_EXTERN bool CC BAMAlignmentHasColorSpace ( const BAMAlignment *self );
-
-/* GetCSKey
- *  get the colorspace key
- *
- *  "cskey" [ OUT ] - return param 
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetCSKey ( const BAMAlignment *self, char cskey[1] );
-
-ALIGN_EXTERN rc_t CC BAMAlignmentGetCSSeqLen ( const BAMAlignment *self, uint32_t *seqLen );
-/* GetCSSequence
- *  get the colorspace sequence data [0..seqLen)
- *  caller provides buffer of seqLen bytes
- *
- *  "csseq" [ OUT ] - pointer to a buffer of at least seqLen bytes
- *  "seqLen" [ IN ] - length of sequence from BAMAlignmentGetCSSeqLen
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetCSSequence ( const BAMAlignment *self, char *csseq, uint32_t seqLen );
-
-ALIGN_EXTERN rc_t CC BAMAlignmentGetCSQuality(BAMAlignment const *cself, uint8_t const **quality, uint8_t *offset);
-
-
-/* GetFlags
- *  return the raw "flags" bitmap word
- *
- *  "flags" [ OUT ] - return parameter for bitmap word
- */
-enum BAMFlags
-{
-    BAMFlags_bit_WasPaired = 0,  /* was paired when sequenced */
-    BAMFlags_bit_IsMappedAsPair,
-    BAMFlags_bit_SelfIsUnmapped,
-    BAMFlags_bit_MateIsUnmapped,
-    BAMFlags_bit_SelfIsReverse,
-    BAMFlags_bit_MateIsReverse,
-    BAMFlags_bit_IsFirst,        /* and mate exists */
-    BAMFlags_bit_IsSecond,       /* and mate exists */
-    BAMFlags_bit_IsNotPrimary,   /* a read having split hits may have multiple primary alignments */
-    BAMFlags_bit_IsLowQuality,   /* fails platform/vendor quality checks */
-    BAMFlags_bit_IsDuplicate,    /* PCR or optical dup */
-    BAMFlags_bit_IsSupplemental,
-
-    BAMFlags_WasPaired      = (1 << BAMFlags_bit_WasPaired),
-    BAMFlags_IsMappedAsPair	= (1 << BAMFlags_bit_IsMappedAsPair),
-    BAMFlags_SelfIsUnmapped	= (1 << BAMFlags_bit_SelfIsUnmapped),
-    BAMFlags_MateIsUnmapped	= (1 << BAMFlags_bit_MateIsUnmapped),
-    BAMFlags_SelfIsReverse	= (1 << BAMFlags_bit_SelfIsReverse),
-    BAMFlags_MateIsReverse	= (1 << BAMFlags_bit_MateIsReverse),
-    BAMFlags_IsFirst        = (1 << BAMFlags_bit_IsFirst),
-    BAMFlags_IsSecond       = (1 << BAMFlags_bit_IsSecond),
-    BAMFlags_IsNotPrimary	= (1 << BAMFlags_bit_IsNotPrimary),
-    BAMFlags_IsLowQuality	= (1 << BAMFlags_bit_IsLowQuality),
-    BAMFlags_IsDuplicate	= (1 << BAMFlags_bit_IsDuplicate),
-    BAMFlags_IsSupplemental  = (1 << BAMFlags_bit_IsSupplemental)
-};
-
-ALIGN_EXTERN rc_t CC BAMAlignmentGetFlags ( const BAMAlignment *self, uint16_t *flags );
-
-
-/* GetMapQuality
- *  return the quality score of mapping
- *
- *  "qual" [ OUT ] - return param for quality score
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetMapQuality ( const BAMAlignment *self, uint8_t *qual );
-
-
-/* GetAlignmentDetail
- *  get the alignment details
- *
- *  "rslt" [ OUT, NULL OKAY ] and "count" [ IN ] - array to hold detail records
- *
- *  "actual" [ OUT, NULL OKAY ] - number of elements written to "rslt"
- *   required if "rslt" is not NULL
- *
- *  "firstMatch" [ OUT, NULL OKAY ] - zero-based index into "rslt" of the first match to the refSeq
- *   or < 0 if invalid
- *
- *  "lastMatch" [ OUT, NULL OKAY ] - zero-based index into "rslt" of the last match to the refSeq
- *   or < 0 if invalid
- */
-typedef uint32_t BAMCigarType;
-enum BAMCigarTypes
-{
-    ct_Match    = 'M', /* 0 */
-    ct_Insert   = 'I', /* 1 */
-    ct_Delete   = 'D', /* 2 */
-    ct_Skip     = 'N', /* 3 */
-    ct_SoftClip = 'S', /* 4 */
-    ct_HardClip = 'H', /* 5 */
-    ct_Padded   = 'P', /* 6 */
-    ct_Equal    = '=', /* 7 */
-    ct_NotEqual = 'X', /* 8 */
-    ct_Overlap  = 'B' /* Complete Genomics extension */
-};
-
-typedef struct BAMAlignmentDetail BAMAlignmentDetail;
-struct BAMAlignmentDetail
-{
-    int64_t refSeq_pos; /* position on refSeq where this alignment region starts or -1 if NA */
-    int32_t read_pos;   /* position on read where this alignment region starts or -1 if NA */
-    uint32_t length;    /* length of alignment region */
-    BAMCigarType type;  /* type of alignment */
-};
-
-ALIGN_EXTERN rc_t CC BAMAlignmentGetAlignmentDetail ( const BAMAlignment *self,
-    BAMAlignmentDetail *rslt, uint32_t count, uint32_t *actual,
-    int32_t *firstMatch, int32_t *lastMatch );
-
-
-/* GetCigarCount
- *  the number of CIGAR elements
- *  a CIGAR element consists of the pair of matching op code and op length
- *
- *  "n" [ OUT ] - return param for cigar count
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetCigarCount ( const BAMAlignment *self, uint32_t *n );
-
-
-ALIGN_EXTERN rc_t CC BAMAlignmentGetRawCigar(const BAMAlignment *cself, uint32_t const **rslt, uint32_t *length);
-
-/* GetCigar
- *  get CIGAR element n [0..GetCigarCount)
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetCigar ( const BAMAlignment *self,
-    uint32_t n, BAMCigarType *type, uint32_t *length );
-
-
-/* GetInsertSize
- *  distance in bases to start of mate's alignment on ref. seq.
- *
- *  "size" [ OUT ] - >0 for first in pair, <0 for second
- */
-ALIGN_EXTERN rc_t CC BAMAlignmentGetInsertSize ( const BAMAlignment *self, int64_t *size );
-
-ALIGN_EXTERN rc_t CC BAMAlignmentFormatSAM(const BAMAlignment *self,
-                                           size_t *actsize,
-                                           size_t maxsize,
-                                           char *buffer);
-
-/* OptDataForEach
- *  DANGER
- *  these optional fields are the weakest part of BAM.
- *
- *  It is probably best to not use this info.
- *  You can't count on them being there.
- *  Moreover, you might need to interpret the types correctly.
- */
-typedef uint32_t BAMOptDataValueType;
-enum BAMOptDataValueTypes
-{
-    dt_CSTRING = 'Z',
-    dt_INT8 = 'c',
-    dt_UINT8 = 'C',
-    dt_INT16 = 's',     
-    dt_UINT16 = 'S',    
-    dt_INT = 'i',
-    dt_UINT = 'I',
-    dt_FLOAT32 = 'f',
-#if 0
-    dt_FLOAT64 = 'd', /* removed? not in Dec 19 2013 version of SAMv1.pdf */
-#endif
-    dt_ASCII = 'A',
-    dt_HEXSTRING = 'H',
-    dt_NUM_ARRAY = 'B'
-};
-
-#define OPT_TAG_X "X?" /* end user data */
-#define OPT_TAG_Y "Y?" /* end user data */
-#define OPT_TAG_Z "Z?" /* end user data */
-
-#define OPT_TAG_ReadGroup   "RG" /* Read Group; same as BAMAlignmentGetReadGroupName */
-#define OPT_TAG_Library     "LB" /* LIbrary; also BAMReadGroup */
-#define OPT_TAG_Unit        "PU" /* Platform specific Unit; also BAMReadGroup */
-#define OPT_TAG_Program     "PG" /* Alignment software name */
-#define OPT_TAG_AlignScore  "AS" /* Alignment Score (MapQuality?) */
-#define OPT_TAG_SecQual     "SQ" /* second called base:2 and quality:6; length == ReadLength? warning */
-#define OPT_TAG_MateMapQual "MQ" /* map Quality of mate */
-#define OPT_TAG_NumMismatch "NM" /* Number of Mismatches */
-#define OPT_TAG_Hits0       "H0" /* Number of perfect hits */
-#define OPT_TAG_Hits1       "H1" /* Number of off-by-one */
-#define OPT_TAG_Hits2       "H2" /* Number of off-by-two */
-#define OPT_TAG_CondQual    "UQ" /* conditional Quality of read */
-#define OPT_TAG_CondQPair   "PQ" /* conditional Quality of pair */
-#define OPT_TAG_ReadHits    "NH" /* Number of times this read (spot) aligns */
-#define OPT_TAG_ReadHits2   "IH" /* Number of times this read (spot) aligns that are in this file */
-#define OPT_TAG_HitIndex    "HI" /* n-th hit for this read in this file */
-#define OPT_TAG_Match2      "MD" /* another sort of matching string like CIGAR but different? */
-#define OPT_TAG_ColorKey    "CS" /* primer and first color */
-#define OPT_TAG_ColorQual   "CQ" /* quality of above */
-#define OPT_TAG_ColorMisses "CM" /* Number of color-space Mismatches */
-#define OPT_TAG_SeqOverlap  "GS" 
-#define OPT_TAG_QualOverlap "GQ" 
-#define OPT_TAG_OverlapDesc "GC"
-#define OPT_TAG_MateSeq     "R2" /* sequence of the mate */
-#define OPT_TAG_MateQual    "Q2" /* quality scores of the mate */
-#define OPT_TAG_OtherQual   "S2"
-#define OPT_TAG_NextHitRef  "CC" /* Reference name of the next hit */
-#define OPT_TAG_NextHitPos  "CP" /* coordinate of the next hit */
-#define OPT_TAG_SingleMapQ  "SM" /* quality of mapping as if not paired */
-#define OPT_TAG_AM          "AM"
-#define OPT_TAG_MAQFlag     "MQ"
-
-
-struct BAMOptData
-{
-    BAMOptDataValueType type;
-    uint32_t element_count;
-    union {
-        int8_t i8[8];
-        uint8_t u8[8];
-        int16_t i16[4];
-        uint16_t u16[4];
-        int32_t i32[2];
-        uint32_t u32[2];
-        int64_t i64[2];
-        uint64_t u64[2];
-        float f32[2];
-        double f64[1];
-        char asciiz[8];
-    } u;
-};
-
-typedef struct BAMOptData BAMOptData;
-
-typedef rc_t ( CC * BAMOptionalDataFunction )
-    ( void *ctx, const char tag[2], const BAMOptData *value );
-
-ALIGN_EXTERN rc_t CC BAMAlignmentOptDataForEach
-    ( const BAMAlignment *self, void *ctx, BAMOptionalDataFunction callback );
-
-    
-ALIGN_EXTERN bool CC BAMAlignmentHasCGData(BAMAlignment const *self);
-
-    
-ALIGN_EXTERN
-rc_t CC BAMAlignmentGetCGSeqQual(BAMAlignment const *self,
-                                 char sequence[/* 35 */],
-                                 uint8_t quality[/* 35 */]);
-
-ALIGN_EXTERN
-rc_t CC BAMAlignmentGetCGCigar(BAMAlignment const *self,
-                               uint32_t *cigar,
-                               uint32_t cig_max,
-                               uint32_t *cig_act);
-    
-ALIGN_EXTERN rc_t BAMAlignmentGetTI(BAMAlignment const *self, uint64_t *ti);
-
-/* strand = '+', '-', or ' ' */
-ALIGN_EXTERN rc_t BAMAlignmentGetRNAStrand(BAMAlignment const *self, uint8_t *strand);
-
-ALIGN_EXTERN rc_t BAMAlignmentGetCGAlignGroup(BAMAlignment const *self,
-                                              char buffer[],
-                                              size_t max_size,
-                                              size_t *act_size);
-    
-    
-/*--------------------------------------------------------------------------
- * BAMFile
- */
-typedef struct BAMFile BAMFile;
-
-typedef struct BAMRefSeq BAMRefSeq;
-struct BAMRefSeq
-{
-    uint64_t length;
-    const char *name; /* not null unique */
-    const char *assemblyId;
-    const uint8_t *checksum;
-    const char *uri;
-    const char *species;
-    uint32_t id;
-    uint8_t checksum_array[16];
-};
-
-typedef struct BAMReadGroup BAMReadGroup;
-struct BAMReadGroup
-{
-    const char *name; /* not null unique, accession e.g. SRR001138 */
-    const char *sample; /* not null */
-    const char *library;
-    const char *description;
-    const char *unit; /* platform specific identifier, e.g. BI.080214_SL-XAJ_0001_FC2044KAAXX.7 */
-    const char *insertSize;
-    const char *center; /* e.g. BI */
-    const char *runDate;
-    const char *platform; /* e.g. ILLUMINA */
-    uint32_t id;
-};
-
-
-/* 64-bit structure stored as an integer
- * The high-order 48 bits store the position in the file at which a 
- * compressed block starts.  The low-order 16 bits store the position
- * in the decompressed block at which a record starts.  This is the
- * way that positions are represented in BAM indices.
- */
-typedef uint64_t BAMFilePosition;
-
-
-/* Make
- *  open the BAM file specified by path
- *
- *  "path" [ IN ] - NUL terminated string or format
- */
-ALIGN_EXTERN rc_t CC BAMFileMake ( const BAMFile **result, const char *path, ... );
-
-ALIGN_EXTERN rc_t CC BAMFileMakeWithHeader ( const BAMFile **result,
-                                            char const headerText[],
-                                            char const path[], ... );
-
-/* MakeWithDir
- *  open the BAM file specified by path and supplied directory
- *
- *  "dir" [ IN ] - directory object used to open file
- *
- *  "path" [ IN ] - NUL terminated string or format
- */
-ALIGN_EXTERN rc_t CC BAMFileMakeWithDir ( const BAMFile **result,
-    struct KDirectory const *dir, const char *path, ... );
-ALIGN_EXTERN rc_t CC BAMFileVMakeWithDir ( const BAMFile **result,
-    struct KDirectory const *dir, const char *path, va_list args );
-
-/* Make
- *  open the BAM file specified by file
- *
- *  "file" [ IN ] - an open KFile
- */
-ALIGN_EXTERN rc_t CC BAMFileMakeWithKFile(const BAMFile **result,
-    struct KFile const *file);
-
-/* Make
- *  open the BAM file specified by file
- *
- *  "file" [ IN ] - an open KFile
- */
-ALIGN_EXTERN rc_t CC BAMFileMakeWithVPath(const BAMFile **result,
-    struct VPath const *path);
-
-/* ExportBAMFile
- *  export the BAMFile object in use by the AlignAccessDB, if any
- *  must be released via BAMFileRelease
- */
-ALIGN_EXTERN rc_t CC AlignAccessDBExportBAMFile ( struct AlignAccessDB const *self,
-    const BAMFile **result );
-
-
-/* AddRef
- * Release
- */
-ALIGN_EXTERN rc_t CC BAMFileAddRef ( const BAMFile *self );
-ALIGN_EXTERN rc_t CC BAMFileRelease ( const BAMFile *self );
-
-
-/* GetPosition
- *  get the position of the about-to-be read alignment
- *  this position can be stored
- *  this position can be passed into SetPosition to seek to the same alignment
- *
- *  "pos" [ OUT ] - return parameter for position
- */
-ALIGN_EXTERN rc_t CC BAMFileGetPosition ( const BAMFile *self, BAMFilePosition *pos );
-
-
-/* GetProportionalPosition
- *  get the aproximate proportional position in the input file
- *  this is intended to be useful for computing progress
- *
- * NB - does not return rc_t
- */
-ALIGN_EXTERN float CC BAMFileGetProportionalPosition ( const BAMFile *self );
-
-
-/* Read
- *  read an aligment
- *
- *  "result" [ OUT ] - return param for BAMAlignment object
- *   must be released with BAMAlignmentRelease
- *
- *  returns RC(..., ..., ..., rcRow, rcNotFound) at end
- */
-ALIGN_EXTERN rc_t CC BAMFileRead ( const BAMFile *self, const BAMAlignment **result );
-
-    
-/* Read
- *  read an aligment
- *
- *  "result" [ OUT ] - return param for BAMAlignment object
- *   must be released with BAMAlignmentRelease, is invalidated or contents
- *   change on next call to BAMFileRead2. Unlike with BAMFileRead, no attempt is
- *   made to preserve this object.
- *
- *  returns:
- *    RC(..., ..., ..., rcRow, rcNotFound) at end
- *    RC(..., ..., ..., rcRow, rcInvalid) and RC(..., ..., ..., rcRow, rcEmpty)
- *      are not fatal and are resumable
- *
- *  tries to use static buffers and will log messages about parsing errors
- */
-ALIGN_EXTERN rc_t CC BAMFileRead2 ( const BAMFile *self, const BAMAlignment **result );
-
-
-/* Rewind
- *  reset the position back to the first aligment in the file
- */
-ALIGN_EXTERN rc_t CC BAMFileRewind ( const BAMFile *self );
-
-
-/* SetPosition
- *  set the position to a particular alignment
- *  pass in the values from GetPosition
- */
-ALIGN_EXTERN rc_t CC BAMFileSetPosition ( const BAMFile *self, const BAMFilePosition *pos );
-
-
-/* GetRefSeqCount
- *  get the number of Reference Sequences refered to in the header
- *  this is not necessarily the number of Reference Sequences referenced
- *  by the alignments
- */
-ALIGN_EXTERN rc_t CC BAMFileGetRefSeqCount ( const BAMFile *self, uint32_t *count );
-
-
-/* GetRefSeq
- *  get the n'th Ref. Seq. where n is [0..RefSeqCount)
- *  the resulting pointer is static-like; it is freed when the BAMFile is.
- *  IOW, it is good for precisely at long as the BAMFile is.
- */
-ALIGN_EXTERN rc_t CC BAMFileGetRefSeq ( const BAMFile *self, uint32_t n, const BAMRefSeq **result );
-
-
-/* GetRefSeqById
- *  get a Ref. Seq. by its id
- *  the resulting pointer is static-like; it is freed when the BAMFile is.
- *  IOW, it is good for precisely at long as the BAMFile is.
- */
-ALIGN_EXTERN rc_t CC BAMFileGetRefSeqById ( const BAMFile *self, int32_t id, const BAMRefSeq **result );
-
-
-/* GetReadGroupCount
- *  get the number of Read Groups (accessions, etc.) refered to in the header
- *  this is not necessarily the number of Read Groups referenced
- *  by the alignments
- */
-ALIGN_EXTERN rc_t CC BAMFileGetReadGroupCount ( const BAMFile *self, uint32_t *count );
-
-/* GetReadGroup
- *  get the n'th Read Group where n is [0..ReadGroupCount)
- *  the resulting pointer is static-like; it is freed when the BAMFile is.
- *  IOW, it is good for precisely at long as the BAMFile is.
- */
-ALIGN_EXTERN rc_t CC BAMFileGetReadGroup ( const BAMFile *self, unsigned n, const BAMReadGroup **result );
-    
-/* GetHeaderText
- *  get the text of the BAM header file
- *  the resulting pointer is static-like; it is freed when the BAMFile is.
- *  IOW, it is good for precisely at long as the BAMFile is.
- */
-ALIGN_EXTERN rc_t CC BAMFileGetHeaderText(BAMFile const *cself, char const **header, size_t *header_len);
-    
-
-/* GetReadGroupByName
- *  get a Read Group by its name
- *  the resulting pointer is static-like; it is freed when the BAMFile is.
- *  IOW, it is good for precisely at long as the BAMFile is.
- */
-ALIGN_EXTERN rc_t CC BAMFileGetReadGroupByName ( const BAMFile *self,
-    const char *name, const BAMReadGroup **result );
-
-
-/* OpenIndex
- *  takes a simple path...
- */
-ALIGN_EXTERN rc_t CC BAMFileOpenIndex ( const BAMFile *self, const char *path );
-
-ALIGN_EXTERN rc_t CC BAMFileOpenIndexWithVPath ( const BAMFile *self, struct VPath const *path );
-
-/* IsIndexed
- *  returns true if true
- */
-ALIGN_EXTERN bool CC BAMFileIsIndexed ( const BAMFile *self );
-
-
-/* IndexHasRefSeqId
- */
-ALIGN_EXTERN bool CC BAMFileIndexHasRefSeqId ( const BAMFile *self, uint32_t refSeqId );
-
-/* Seek
- *  seeks a half-open zero-based interval on a particular reference
- *  rcSelf, rcIncomplete
- */
-ALIGN_EXTERN rc_t CC BAMFileSeek ( const BAMFile *self, uint32_t refSeqId, uint64_t alignStart, uint64_t alignEnd );
-
-typedef uint32_t BAMValidateOption;
-enum BAMValidateOptions {
-    /* this is the minimum level of BAM file validation; just walks the compressed block headers */
-    bvo_BlockHeaders        = 1,
-    
-    /* decompresses each block */
-    bvo_BlockCompression    = 2,
-    
-    /* within each block, walks the records without examining the contents */
-    bvo_BlockStructure      = 3,
-    
-    /* within each record, validate the structure vis-a-vis the record size */
-    bvo_RecordStructure     = 4,
-    
-    /* verify that the extra fields a parsable */
-    bvo_ExtraFields         = 8,
-    
-    /* confirm that no alignment starts before the alignment preceeding it */
-    bvo_Sorted              = 16,
-    
-    /* verify that flags are consistent with itself and the other fields in the record
-     * NB. can not verify secondary alignment flag 0x100
-     */
-    bvo_FlagsConsistency    = 32,
-    
-    /* verify CIGAR against sequence length */
-    bvo_CIGARConsistency    = 64,
-    
-    /* verify that bin number corresponds to position and alignment length */
-    bvo_BinConsistency      = 128,
-    
-    /* verify that mapQ is consistent with flags and refSeqID */
-    bvo_MapQuality          = 256,
-    
-    /* verify Quality values >= 33 */
-    bvo_QualityValues       = 512,
-    
-    /* verify that sequence length != 0 */
-    bvo_MissingSequence     = 1024,
-    
-    /* verify that Quality values != 255 */
-    bvo_MissingQuality      = 2048,
-    
-    /* compute flagstats */
-    bvo_FlagsStats          = 4096,
-    
-    /* verify that index is parsable
-     * NB. this can be done without a BAM file
-     */
-    bvo_IndexStructure      = 1 << 16,
-    
-    /* verify that the file offsets in the index are valid for the given BAM file
-     * NB. does not cause decompression of the BAM file but will cause referenced
-     * block headers to be validated
-     */
-    bvo_IndexOffsets1       = 2 << 16,
-    
-    /* in addition to verifying that the file offsets in the index are valid for
-     * the given BAM file, verify that the record offsets with the blocks are valid.
-     * NB. will cause referenced blocks to be decompressed and structurally validated.
-     */
-    bvo_IndexOffsets2       = 3 << 16,
-    
-    /* verify that index's reference number and bin number agree with the
-     * referenced record
-     */
-    bvo_IndexBins           = 4 << 16,
-    
-    bvo_IndexOptions        = 7 << 16
-};
-
-typedef struct BAMValidateStats BAMValidateStats;
-typedef struct BAMValidateStatsRow BAMValidateStatsRow;
-
-struct BAMValidateStatsRow {
-    uint64_t good;
-    uint64_t warning;
-    uint64_t error;
-};
-
-struct BAMValidateStats {
-    uint64_t bamFileSize;
-    uint64_t bamFilePosition;
-    uint64_t baiFileSize;
-    uint64_t baiFilePosition;
-    BAMValidateStatsRow blockHeaders;
-    BAMValidateStatsRow blockCompression;
-    BAMValidateStatsRow blockStructure;
-    BAMValidateStatsRow recordStructure;
-    BAMValidateStatsRow extraFields;
-    BAMValidateStatsRow inOrder;
-    BAMValidateStatsRow flags[16];
-    BAMValidateStatsRow CIGAR;
-    BAMValidateStatsRow bin;
-    BAMValidateStatsRow quality;
-    BAMValidateStatsRow hasSequence;
-    BAMValidateStatsRow hasQuality;
-    BAMValidateStatsRow indexFileOffset;
-    BAMValidateStatsRow indexBlockOffset;
-    BAMValidateStatsRow indexBin;
-    bool bamHeaderIsGood;
-    bool bamHeaderIsBad;
-    bool indexStructureIsGood;
-    bool indexStructureIsBad;
-};
-
-typedef rc_t (CC *BAMValidateCallback)(void *ctx, rc_t result, const BAMValidateStats *stats);
-
-/* Validate
- */
-ALIGN_EXTERN rc_t CC BAMValidate ( struct VPath const *bam,
-                                   struct VPath const *bai,
-                                   BAMValidateOption options,
-                                   BAMValidateCallback callback,
-                                   void *callbackContext
-                                  );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_align_bam_ */
diff --git a/interfaces/align/dna-reverse-cmpl.h b/interfaces/align/dna-reverse-cmpl.h
deleted file mode 100644
index 82c4783..0000000
--- a/interfaces/align/dna-reverse-cmpl.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_align_dna_reverse_cmpl_
-#define _h_align_dna_reverse_cmpl_
-
-#ifndef _h_align_extern_
-#include <align/extern.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-ALIGN_EXTERN rc_t CC DNAReverseCompliment(const INSDC_dna_text* seq, INSDC_dna_text* cmpl, uint32_t len);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_align_dna_reverse_cmpl_ */
diff --git a/interfaces/align/extern.h b/interfaces/align/extern.h
deleted file mode 100644
index 94c711a..0000000
--- a/interfaces/align/extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_align_extern_
-#define _h_align_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define ALIGN_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define ALIGN_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_align_extern_ */
diff --git a/interfaces/align/iterator.h b/interfaces/align/iterator.h
deleted file mode 100644
index e8a77e6..0000000
--- a/interfaces/align/iterator.h
+++ /dev/null
@@ -1,610 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_align_iterator_
-#define _h_align_iterator_
-
-#ifndef _h_align_extern_
-#include <align/extern.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_insdc_insdc_
-#include <insdc/insdc.h>
-#endif
-
-#ifndef _h_vdb_database_
-#include <vdb/database.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct VCursor;
-struct AlignMgr;
-struct ReferenceObj;
-
-
-/*--------------------------------------------------------------------------
- * AlignmentIterator
- *  walk across a single alignment in reference space
- */
-typedef struct AlignmentIterator AlignmentIterator;
-
-
-/* Make
- *  create an encapsulation of alignment
- *
- *  iter [ OUT ] - return parameter for new iterator
- *
- *  copy [ IN ] - when "true" the data will be copied.
- *  otherwise, pointers will be expected to refer to data
- *  with a lifetime >= that of the iterator being created.
- *
- *  "ref_pos" [ IN ] and "ref_len" [ IN ] - projection onto reference
- *
- *  "read" [ IN ] and "read_len" [ IN ] - full sequence of alignment
- *
- *  "has_mismatch" [ IN ] - describes comparison result of each base
- *  in "read" against the alignment.
- *
- *  "has_ref_offset" [ IN ] - describes positions of reference offsets
- *
- *  "ref_offset" [ IN ] and "ref_offset_len" [ IN ] - packed array of
- *  offsets of position against reference.
- */
-ALIGN_EXTERN rc_t CC AlignMgrMakeAlignmentIterator ( struct AlignMgr const *self,
-    AlignmentIterator **iter,
-    bool copy,
-    INSDC_coord_zero ref_pos,
-    INSDC_coord_len ref_len,
-    const INSDC_4na_bin *read,
-    INSDC_coord_len read_len,
-    const bool *has_mismatch,
-    const bool *has_ref_offset,
-    const int32_t *ref_offset,
-    uint32_t ref_offset_len,
-    INSDC_coord_zero ref_window_start,
-    INSDC_coord_len ref_window_len );
-
-
-/* AddRef
- * Release
- */
-ALIGN_EXTERN rc_t CC AlignmentIteratorAddRef ( const AlignmentIterator *self );
-ALIGN_EXTERN rc_t CC AlignmentIteratorRelease ( const AlignmentIterator *self );
-
-
-/* Next
- *  advance position by 1 in reference space
- *  must be called initially to advance to first element
- *
- *  returns RCState = rcDone when done
- */
-ALIGN_EXTERN rc_t CC AlignmentIteratorNext ( AlignmentIterator *self );
-
-
-/* State
- *  returns bitmap of state bits and event code at the current position
- *  will return invalid before initial Next message or after final
- *
- *  bits [ 0..7 ] :
- *    { 0..15 }             = 4na mismatch (NACMGRSVTWYHKDBN)
- *    64                    = match
- *    128                   = skip
- *  bit [ 8 ]               = have insert if ! 0
- *  bit [ 9 ]               = have delete if ! 0
- *  bit [ 10 ]              = first base if ! 0
- *  bit [ 11 ]              = last base if ! 0
- *  bit [ 31 ]              = iterator position is invalid if ! 0
- *                            NB - converts state word to negative
- */
-enum
-{
-    align_iter_match      = ( 1 <<  8 ),
-    align_iter_skip       = ( 1 <<  9 ),
-
-    align_iter_insert     = ( 1 << 10 ),
-    align_iter_delete     = ( 1 << 11 ),
-    align_iter_first      = ( 1 << 12 ),
-    align_iter_last       = ( 1 << 13 ),
-
-    align_iter_invalid    = ( 1 << 31 )
-};
-
-ALIGN_EXTERN int32_t CC AlignmentIteratorState ( const AlignmentIterator *self,
-                                                 INSDC_coord_zero *seq_pos );
-
-
-/* Position
- *  return current position of iterator relative to reference
- */
-ALIGN_EXTERN rc_t CC AlignmentIteratorPosition ( const AlignmentIterator *self,
-                                                 INSDC_coord_zero *pos );
-
-
-/* BasesInserted
- *  return the number of inserted bases and a pointer to their values
- *
- *  "bases" [ OUT, NULL OKAY ] - optional output parameter to inserted bases
- *
- *  returns count of bases inserted at current position
- */
-ALIGN_EXTERN uint32_t CC AlignmentIteratorBasesInserted
-    ( const AlignmentIterator *self, const INSDC_4na_bin **bases );
-
-
-/* BasesDeleted
- *  return the number of bases deleted at the current position
- *  also returns the location on the reference where the delete starts
- *
- *  "pos" [ OUT ] - return parameter for location on the reference
- *  where delete starts, and continues for the number of bases given by function return
- *
- *  returns count of bases deleted at current position
- */
-ALIGN_EXTERN uint32_t CC AlignmentIteratorBasesDeleted
-    ( const AlignmentIterator *self, INSDC_coord_zero *pos );
-
-
-/*--------------------------------------------------------------------------
- * PlacementRecord
- *  record describing a placement
- */
-typedef struct PlacementRecord PlacementRecord;
-struct PlacementRecord
-{
-    DLNode n;
-
-    /* row id of alignment record */
-    int64_t id;
-
-    /* object representing reference sequence */
-    struct ReferenceObj const *ref;
-
-    /* placement position and length on reference */
-    INSDC_coord_zero pos;
-    INSDC_coord_len len;
-
-    /* mapping quality of alignment */
-    int32_t mapq;
-
-    /* spotgroup is now in here too */
-    uint32_t spot_group_len;
-    char * spot_group;
-};
-
-
-/* Cast
- *  cast to an extended object
- *
- *  "ext" [ IN ] - selects the extended object level
- *  can be placementRecordExtension0 or placementRecordExtension1
- */
-
-enum { placementRecordExtension0, placementRecordExtension1 };
-
-ALIGN_EXTERN void* CC PlacementRecordCast ( const PlacementRecord *self, uint32_t ext );
-
-
-ALIGN_EXTERN void* CC PlacementRecord_get_ext_data_ptr ( const PlacementRecord *self, uint32_t ext );
-
-
-/* Whack
- *  destroys PlacementRecord and any associated extensions
- */
-ALIGN_EXTERN void CC PlacementRecordWhack ( const PlacementRecord *self );
-
-
-/* structure of function pointers for creating extensions
-   all function pointers are optional ( NULL OKAY ) */
-typedef struct PlacementRecordExtendFuncs PlacementRecordExtendFuncs;
-struct PlacementRecordExtendFuncs
-{
-    /* opaque pointer to data passed to each function */
-    void *data;
-
-    /* destructor */
-    void ( CC * destroy ) ( void *obj, void *data );
-
-    /* constructor */
-    rc_t ( CC * populate ) ( void *obj, const PlacementRecord *placement,
-        struct VCursor const *curs, INSDC_coord_zero ref_window_start,
-        INSDC_coord_len ref_window_len, void *data, void * placement_ctx );
-
-    /* variable allocation size calculation
-       when non-NULL, takes precedence over "fixed_size" */
-    bool ( CC * filter ) ( struct VCursor const *curs, int64_t row_id,
-        const PlacementRecord *placement, INSDC_coord_zero ref_window_start,
-        INSDC_coord_len ref_window_len, void *data, void * placement_ctx );
-
-    /* variable allocation size calculation
-       when non-NULL, takes precedence over "fixed_size" */
-    rc_t ( CC * alloc_size ) ( struct VCursor const *curs, int64_t row_id, size_t * size, void *data, void * placement_ctx );
-    
-    /* fixed allocation size
-       ignored if "alloc_size" is non-NULL,
-       must be non-zero otherwise */
-    size_t fixed_size;
-};
-
-
-/* external functions for extension of a placement record
-   to include ( construct ) an AlignmentIterator */
-ALIGN_EXTERN void CC AlignIteratorRecordDestroy ( void *obj, void *data );
-ALIGN_EXTERN rc_t CC AlignIteratorRecordPopulate ( void *obj,
-    const PlacementRecord *placement, struct VCursor const *curs,
-    INSDC_coord_zero ref_window_start, INSDC_coord_len ref_window_len, void *data );
-ALIGN_EXTERN rc_t CC AlignIteratorRecordSize ( struct VCursor const *curs, int64_t row_id, size_t * size, void *data );
-
-
-/*--------------------------------------------------------------------------
- * PlacementIterator
- *  walk across placements from an alignment db within a reference window
- */
-typedef struct PlacementIterator PlacementIterator;
-
-
-/* Make
- *  create a placement iterator
- *
- *  "iter" [ OUT ] - return parameter for iterator
- *
- *  "ref_obj" [ IN, NULL OKAY ] - optional parameter giving an object
- *  representing the reference sequence for this iterator. it will be
- *  inserted into each PlacementRecord (see above) and made available to
- *  outer code.
- *
- *  "ref_pos" [ IN ] and "ref_len" [ IN ] - window onto reference
- *
- *  "min_mapq" [ IN ] - minimum map quality value
- *
- *  "ref_cur" [ IN ] - read-only cursor on REFERENCE table
- *  will be modified as necessary to contain requisite columns
- *  will be opened by iterator.
- *
- *  "align_cur" [ IN ] - read-only cursor on PRIMARY_ALIGNMENT or SECONDARY_ALIGNMENT
- *  table ( see "secondary" ). will be modified as necessary to contain
- *  requisite columns. will be opened by iterator.
- *
- *  "ids" [ IN ] - an enum describing which column of alignment ids should
- *  be used when reading "ref"
- *
- *  "ext_0" [ IN, NULL OKAY ] and "ext_1" [ IN, NULL OKAY ] - optional pointers
- *  to blocks describing how to extend the basic placement record
- *
- *  rd_group [ IN, NULL OKAY ]
- *      != NULL, non empty string ... produce all alignments with this string as
- *                  spot-group ( no matter what the "real" spot-group of the
- *                  alignment is )
- *
- *      != NULL, empty string ... produce all alignments with the "real" spot-group
- *                  read from the column "SPOT_GROUP"
- *
- *      == NULL, ... produce all alignments with no spot-group assigned ( the user
- *                  does not wish the data to be read, the alignment to be bined )
- */
-
-typedef uint8_t align_id_src;
-enum { primary_align_ids, secondary_align_ids, evidence_align_ids };
-
-ALIGN_EXTERN rc_t CC AlignMgrMakePlacementIterator ( struct AlignMgr const *self,
-    PlacementIterator **iter, struct ReferenceObj const *ref_obj,
-    INSDC_coord_zero ref_pos, INSDC_coord_len ref_len, int32_t min_mapq,
-    struct VCursor const *ref_cur, struct VCursor const *align_cur, align_id_src ids,
-    const PlacementRecordExtendFuncs *ext_0, const PlacementRecordExtendFuncs *ext_1,
-    const char * spot_group );
-
-
-/* AddRef
- * Release
- */
-ALIGN_EXTERN rc_t CC PlacementIteratorAddRef ( const PlacementIterator *self );
-ALIGN_EXTERN rc_t CC PlacementIteratorRelease ( const PlacementIterator *self );
-
-
-/* RefWindow
- *  returns the reference identification string and iteration window
- */
-ALIGN_EXTERN rc_t CC PlacementIteratorRefWindow ( const PlacementIterator *self,
-    const char **idstr, INSDC_coord_zero *pos, INSDC_coord_len *len );
-
-
-/* RefObj
- *  returns the Ref-obj, that was used to create this placement-iterator
- */
-ALIGN_EXTERN rc_t CC PlacementIteratorRefObj( const PlacementIterator * self,
-    struct ReferenceObj const ** refobj );
-
-
-/* NextAvailPos
- *  check the next available position having one or more placements
- *
- *  "pos" [ OUT ] - next position on reference having one or more placements
- *  may return negative position, indicating an alignment that wraps around
- *  a circular reference, and starts in negative space after linearization.
- *
- *  "len" [ OUT, NULL OKAY ] - optional return parameter for length of
- *  placement at that position
- *
- *  returns non-zero rc when no window is done
- *  (rcRange, rcDone)
- */
-ALIGN_EXTERN rc_t CC PlacementIteratorNextAvailPos ( const PlacementIterator *self,
-    INSDC_coord_zero *pos, INSDC_coord_len *len );
-
-
-/* NextRecordAt
- *  retrieve a placement at the requested position
- *
- *  "pos" [ IN ] - required position of the placement
- *  obtained from "NextAvailPos"
- *
- *  "rec" [ OUT ] - returned record
- *  must be freed via PlacementRecordWhack
- *
- *  returns non-zero rc when no more placements are available
- *  (rcOffset, rcDone)
- */
-ALIGN_EXTERN rc_t CC PlacementIteratorNextRecordAt ( PlacementIterator *self,
-    INSDC_coord_zero pos, const PlacementRecord **rec );
-
-
-/* NextIdAt
- *  retrieve a row id at the requested position
- *
- *  "pos" [ IN ] - required position of the placement
- *  obtained from "NextAvailPos"
- *
- *  "id" [ OUT ] - returned row-id, within domain of align cursor
- *
- *  "len" [ OUT, NULL OKAY ] - optional return parameter for length of
- *  placement on reference
- *
- *  returns non-zero rc when no more placements are available
- *  (rcOffset, rcDone)
- */
-ALIGN_EXTERN rc_t CC PlacementIteratorNextIdAt ( PlacementIterator *self,
-    INSDC_coord_zero pos, int64_t *row_id, INSDC_coord_len *len );
-
-
-/*--------------------------------------------------------------------------
- * PlacementSetIterator
- *  walk across placements from an alignment db within a reference window
- */
-typedef struct PlacementSetIterator PlacementSetIterator;
-
-
-/* Make
- *  create a placement set iterator
- *
- *  "iter" [ OUT ] - return parameter for iterator
- *
- *  "ref_pos" [ IN ] and "ref_len" [ IN ] - window onto reference
- */
-ALIGN_EXTERN rc_t CC AlignMgrMakePlacementSetIterator ( struct AlignMgr const *self,
-    PlacementSetIterator **iter );
-
-
-/* AddPlacementIterator
- *  adds a placement iterator
- *  used to provide ordered placements within window
- */
-ALIGN_EXTERN rc_t CC PlacementSetIteratorAddPlacementIterator
-    ( PlacementSetIterator *self, PlacementIterator *pi );
-
-
-/* AddRef
- * Release
- */
-ALIGN_EXTERN rc_t CC PlacementSetIteratorAddRef ( const PlacementSetIterator *self );
-ALIGN_EXTERN rc_t CC PlacementSetIteratorRelease ( const PlacementSetIterator *self );
-
-
-ALIGN_EXTERN rc_t CC PlacementSetIteratorNextReference ( PlacementSetIterator *self,
-    INSDC_coord_zero *first_pos, INSDC_coord_len *len, struct ReferenceObj const ** refobj );
-
-ALIGN_EXTERN rc_t CC PlacementSetIteratorNextWindow ( PlacementSetIterator *self,
-    INSDC_coord_zero *first_pos, INSDC_coord_len *len );
-
-/* NextAvailPos
- *  check the next available position having one or more placements
- *
- *  "pos" [ OUT ] - next position on reference having one or more placements
- *  may return negative position, indicating an alignment that wraps around
- *  a circular reference, and starts in negative space after linearization.
- *
- *  "len" [ OUT, NULL OKAY ] - optional return parameter for length of
- *  placement at that position
- *
- *  returns non-zero rc when no more placements are available
- *  TBD - define a proper value
- */
-ALIGN_EXTERN rc_t CC PlacementSetIteratorNextAvailPos ( const PlacementSetIterator *self,
-    INSDC_coord_zero *pos, INSDC_coord_len *len );
-
-
-/* NextRecordAt
- *  retrieve a placement at the requested position
- *
- *  "pos" [ IN ] - required position of the placement
- *  obtained from "NextAvailPos"
- *
- *  "rec" [ OUT ] - returned record
- *  must be freed via PlacementRecordWhack
- */
-ALIGN_EXTERN rc_t CC PlacementSetIteratorNextRecordAt ( PlacementSetIterator *self,
-    INSDC_coord_zero pos, const PlacementRecord **rec );
-
-
-/* NextIdAt
- *  retrieve a row id at the requested position
- *
- *  "pos" [ IN ] - required position of the placement
- *  obtained from "NextAvailPos"
- *
- *  "id" [ OUT ] - returned row-id, within domain of align cursor
- *
- *  "len" [ OUT, NULL OKAY ] - optional return parameter for length of
- *  placement on reference
- */
-ALIGN_EXTERN rc_t CC PlacementSetIteratorNextIdAt ( PlacementSetIterator *self,
-    INSDC_coord_zero pos, int64_t *row_id, INSDC_coord_len *len );
-
-
-/*--------------------------------------------------------------------------
- * ReferenceIterator
- *  walk across placements from an alignment db within a reference window
- */
-typedef struct ReferenceIterator ReferenceIterator;
-
-
-/* Make
- *  create a reference iterator
- *
- *  "iter" [ OUT ] - return parameter for iterator
- *
- *  "ext_1" [ IN, NULL OKAY ] - optional pointer to a block describing how
- *  to extend the align-iterator record
- *
- *  "min_mapq" [ IN ] - minimum map quality value
- */
-ALIGN_EXTERN rc_t CC AlignMgrMakeReferenceIterator ( struct AlignMgr const *self,
-    ReferenceIterator **iter, const PlacementRecordExtendFuncs *ext_1, int32_t min_mapq );
-
-
-/* AddRef
- * Release
- */
-ALIGN_EXTERN rc_t CC ReferenceIteratorAddRef ( const ReferenceIterator *self );
-ALIGN_EXTERN rc_t CC ReferenceIteratorRelease ( const ReferenceIterator *self );
-
-
-/* AddPlacementIterator
- *  adds a placement iterator
- *  used to provide ordered placements within window
- */
-#if 0
-ALIGN_EXTERN rc_t CC ReferenceIteratorAddPlacementIterator
-    ( ReferenceIterator *self, PlacementIterator *pi );
-#endif
-
-/* AddPlacements
- *  adds a source for placements (file/table)
- *  used to provide ordered placements within window
- */
-ALIGN_EXTERN rc_t CC ReferenceIteratorAddPlacements ( ReferenceIterator *self,
-    struct ReferenceObj const *ref_obj, INSDC_coord_zero ref_pos, INSDC_coord_len ref_len,
-    struct VCursor const *ref, struct VCursor const *align, align_id_src ids,
-    const char * spot_group, void * placement_ctx );
-
-
-/* NextReference
- *  advance to the next reference
- */
-ALIGN_EXTERN rc_t CC ReferenceIteratorNextReference ( ReferenceIterator *self,
-    INSDC_coord_zero *first_pos, INSDC_coord_len *len, struct ReferenceObj const ** refobj );
-
-/* NextWindow
- *  advance to the next window on the reference
- */
-ALIGN_EXTERN rc_t CC ReferenceIteratorNextWindow ( ReferenceIterator *self,
-    INSDC_coord_zero *first_pos, INSDC_coord_len *len );
-
-/* NextSpotGroup
- *  advance to the next spot_group on the reference
- */
-ALIGN_EXTERN rc_t CC ReferenceIteratorNextSpotGroup ( ReferenceIterator *self,
-    const char ** name, size_t * len );
-
-
-/* NextPos
- *  advance to the next position on current reference
- *  resets internal iterator on placements at that position
- */
-ALIGN_EXTERN rc_t CC ReferenceIteratorNextPos ( ReferenceIterator *self, bool skip_empty );
-
-
-/* Position
- *  return current position on the reference
- */
-ALIGN_EXTERN rc_t CC ReferenceIteratorPosition ( const ReferenceIterator *self,
-    INSDC_coord_zero *pos, uint32_t * depth, INSDC_4na_bin * base );
-
-
-/* NextPlacement
- *  advance internal iterator to next placement in list
- *  returns a pointer to the next placement object at current position
- */
-ALIGN_EXTERN rc_t CC ReferenceIteratorNextPlacement ( ReferenceIterator *self,
-    const PlacementRecord **rec );
-
-
-/* State
- *  return state of current placement at current position
- */
-ALIGN_EXTERN int32_t CC ReferenceIteratorState ( const ReferenceIterator *self, INSDC_coord_zero *seq_pos );
-
-
-/* BasesInserted
- *  return the number of inserted bases and a pointer to their values
- *
- *  "bases" [ OUT, NULL OKAY ] - optional output parameter to inserted bases
- *
- *  returns count of bases inserted at current position
- */
-ALIGN_EXTERN uint32_t CC ReferenceIteratorBasesInserted ( const ReferenceIterator *self,
-    const INSDC_4na_bin **bases );
-
-
-/* BasesDeleted
- *  return the number of bases deleted at the current position
- *  also returns the location on the reference where the delete starts
- *
- *  "pos" [ OUT ] - return parameter for location on the reference
- *  where delete starts, and continues for the number of bases given by function return
- *
- *  "bases" [ OUT, NULL OKAY ] - optional output parameter to deleted bases
- *
- *  returns count of bases deleted at current position
- */
-ALIGN_EXTERN uint32_t CC ReferenceIteratorBasesDeleted ( const ReferenceIterator *self,
-    INSDC_coord_zero *pos, const INSDC_4na_bin **bases );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_align_iterator_ */
diff --git a/interfaces/align/iterator_examples.txt b/interfaces/align/iterator_examples.txt
deleted file mode 100644
index 5a9727a..0000000
--- a/interfaces/align/iterator_examples.txt
+++ /dev/null
@@ -1,148 +0,0 @@
-
-
-const char * path           ... path of database
-const char * refname        ... name of reference to walk
-INSDC_coord_zero ref_pos    ... start of window on reference to walk
-INSDC_coord_len ref_len     ... length of window on reference to walk
-int32_t min_mapq            ... minimal mapping quality ( for a alignment to be considered )
-
-KDirectory *wd;
-rc_t rc = KDirectoryNativeDir( &wd );
-if ( rc == 0 )
-{
-    const VDBManager *v_mgr,
-    rc = VDBManagerMakeRead ( &v_mgr, wd );
-    if ( rc == 0 )
-    {
-        const VDatabase *v_db;
-        rc = VDBManagerOpenDBRead( v_mgr, &v_db, NULL, "%s", path );
-        if ( rc == 0 )
-        {
-            const ReferenceList *ref_list;
-            uint32_t reflist_options =  ereferencelist_usePrimaryIds;
-            rc = ReferenceList_MakeDatabase( &ref_list, v_db, reflist_options, 0, NULL, 0 ); /* align/reference.h */
-            if ( rc == 0 )
-            {
-                const AlignMgr * a_mgr;
-                rc = AlignMgrMakeRead( &a_mgr );   /* align/manager.h */
-                if ( rc == 0 )
-                {
-                    PlacementSetIterator * set_iter;
-                    rc = AlignMgrMakePlacementSetIterator( a_mgr, &set_iter ); /* align/iterator.h */
-                    if ( rc == 0 )
-                    {
-                        const ReferenceObj * ref_obj;
-                        rc = ReferenceList_Find( ref_list, &ref_obj, refname, string_size( refname ) ); /* align/reference.h */
-                        if ( rc == 0 )
-                        {
-                            PlacementIterator *pl_iter;
-                            rc = ReferenceObj_MakePlacementIterator( ref_obj, /* align/reference.h */
-                                &pl_iter,
-                                ref_pos,            /* where it starts on the reference */
-                                ref_len,            /* the whole length of this reference/chromosome */
-                                min_mapq,           /* no minimal mapping-quality to filter out */
-                                NULL,               /* no special reference-cursor */
-                                NULL,               /* no special cursor into the PRIMARY/SECONDARY/EVIDENCE-table */
-                                primary_align_ids,  /* what ID-source to select from REFERENCE-table (ref_obj) */
-                                NULL,               /* no placement-record extensions #0 ( or private context #0 )*/
-                                NULL,               /* no placement-record extensions #1 */
-                                NULL );             /* no spotgroup re-grouping (yet) */
-                            if ( rc == 0 )
-                            {
-                                rc = PlacementSetIteratorAddPlacementIterator ( set_iter, pl_iter ); /* align/iterator.h */
-                                if ( rc == 0 )
-                                {
-                                    rc = walk_set_iter( set_iter ); /* see below */
-                                }
-                            }
-                            ReferenceObj_Release( ref_obj );
-                        }
-                        PlacementSetIteratorRelease( set_iter );
-                    }
-                    AlignMgrRelease( a_mgr );
-                }
-                ReferenceList_Release( ref_list );
-            }
-            VDatabaseRelease ( v_db );
-        }
-        VDBManagerRelease ( v_mgr );
-    }
-    KDirectoryRelease( wd );
-}
-
-
-rc_t walk_set_iter( PlacementSetIterator * set_iter )
-{
-    rc_t rc = 0;
-    while ( rc == 0 )
-    {
-        struct ReferenceObj const * ref_obj;
-        rc = PlacementSetIteratorNextReference( set_iter, NULL, NULL, &ref_obj ); /* align/iterator.h */
-
-        if ( rc == 0 )
-        {
-            rc = walk_reference( set_iter, ref_obj ); /* see below */
-        }
-    }
-    if ( GetRCState( rc ) == rcDone ) rc = 0;
-    return rc;
-}
-
-
-rc_t walk_reference( PlacementSetIterator * set_iter, struct ReferenceObj const * ref_obj )
-{
-    rc_t rc = 0;
-    while ( rc == 0 )
-    {
-        INSDC_coord_zero first_pos;
-        INSDC_coord_len len;
-        rc = PlacementSetIteratorNextWindow( set_iter, &first_pos, &len ); /* align/iterator.h */
-        if ( rc == 0 )
-        {
-            rc = walk_window( set_iter, ref_obj, first_pos, len ); /* see below */
-        }
-    }
-    if ( GetRCState( rc ) == rcDone ) rc = 0;
-    return rc;
-}
-
-
-rc_t walk_window( PlacementSetIterator * set_iter, struct ReferenceObj const * ref_obj,
-                  INSDC_coord_zero first_pos, INSDC_coord_len len )
-{
-    rc_t rc = 0;
-    while ( rc == 0 )
-    {
-        INSDC_coord_zero pos;
-        rc = PlacementSetIteratorNextAvailPos( set_iter, &pos, NULL ); /* align/iterator.h */
-        if ( rc == 0 )
-        {
-            rc = walk_position( set_iter, ref_obj, first_pois, len, pos ); /* see below */
-        }
-    }
-    if ( GetRCState( rc ) == rcDone ) rc = 0;
-    return rc;
-}
-
-
-rc_t walk_position( PlacementSetIterator * set_iter, struct ReferenceObj const * ref_obj,
-                    INSDC_coord_zero first_pos, INSDC_coord_len len, INSDC_coord_zero pos )
-{
-    rc_t rc = 0;
-    while ( rc == 0 )
-    {
-        const PlacementRecord *rec; /* align/iterator.h */
-        rc = PlacementSetIteratorNextRecordAt( set_iter, pos, &rec ); /* align/iterator.h */
-        if ( rc == 0 )
-        {
-            private_context * pctx = PlacementRecord_get_ext_data_ptr( rec, placementRecordExtension0 ); /* align/iterator.h */
-            /*
-                available now is:
-                alignment in rec
-                private context ( that means for instance the table-cursor that was used to read this alignment )
-            */
-        }
-    }
-    if ( GetRCState( rc ) == rcDone ) rc = 0;
-    return rc;
-}
diff --git a/interfaces/align/manager.h b/interfaces/align/manager.h
deleted file mode 100644
index 4527f8a..0000000
--- a/interfaces/align/manager.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_align_manager_
-#define _h_align_manager_
-
-#ifndef _h_align_extern_
-#include <align/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * AlignMgr
- *  manages the alignment module
- */
-typedef struct AlignMgr AlignMgr;
-
-/* MakeRead
- *  make for read-only operations
- * MakeUpdate
- *  make for read/write operations
- */
-ALIGN_EXTERN rc_t CC AlignMgrMakeRead ( const AlignMgr **mgr );
-ALIGN_EXTERN rc_t CC AlignMgrMakeUpdate ( AlignMgr **mgr );
-
-
-/* AddRef
- * Release
- */
-ALIGN_EXTERN rc_t CC AlignMgrAddRef ( const AlignMgr *self );
-ALIGN_EXTERN rc_t CC AlignMgrRelease ( const AlignMgr *self );
-
-    
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_align_manager_ */
diff --git a/interfaces/align/mate-cache.vschema b/interfaces/align/mate-cache.vschema
deleted file mode 100644
index a164871..0000000
--- a/interfaces/align/mate-cache.vschema
+++ /dev/null
@@ -1,99 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * VDB mate-cache types, functions and tables
- */
-version 1;
-
-include 'insdc/insdc.vschema';
-include 'vdb/vdb.vschema';
-include 'insdc/sra.vschema';
-
-
-/*--------------------------------------------------------------------------
- * data types
- */
-
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-
-/*--------------------------------------------------------------------------
- * tables
- */
-
-table NCBI:align:tbl:mate_cache #1.1
-{
-    /* SAM_FLAGS
-     */
-    extern column < U32 > izip_encoding SAM_FLAGS_CACHE;
-
-    /* SAM_QUALITY
-     */
-    extern column < INSDC:quality:text:phred_33 > zip_encoding SAM_QUALITY_CACHE;
-
-    /* TEMPLATE_LEN
-     */
-    extern column < I32 > izip_encoding TEMPLATE_LEN_CACHE;
-
-    /* MATE_ALIGN_ID
-     */
-    extern column < I64 > izip_encoding MATE_ALIGN_ID_CACHE;
-
-    /* MATE_REF_NAME
-     */
-    extern column < ascii > zip_encoding MATE_REF_NAME_CACHE;
-
-    /* MATE_REF_POS
-     */
-    extern column < INSDC:coord:zero > izip_encoding MATE_REF_POS_CACHE;
-
-    /* ALIGNMENT_COUNT
-     */
-    extern column < U8 > izip_encoding ALIGNMENT_COUNT_CACHE;
-
-    /* RD_FILTER
-     */
-    extern column < INSDC:SRA:read_filter > zip_encoding RD_FILTER_CACHE;
-    readonly column INSDC:SRA:read_filter READ_FILTER_CACHE = .RD_FILTER_CACHE;
-
-    /* SPOT_GROUP
-     */
-    extern column < ascii > zip_encoding SPOT_GROUP_CACHE;
-    readonly column ascii SEQ_SPOT_GROUP_CACHE = .SPOT_GROUP_CACHE;
-};
-
-/*--------------------------------------------------------------------------
- * databases
- */
-
-database NCBI:align:db:mate_cache #1
-{
-    table NCBI:align:tbl:mate_cache #1.1 PRIMARY_ALIGNMENT;
-};
diff --git a/interfaces/align/pileup-stats.vschema b/interfaces/align/pileup-stats.vschema
deleted file mode 100644
index bcbf35e..0000000
--- a/interfaces/align/pileup-stats.vschema
+++ /dev/null
@@ -1,120 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-version 1;
-
-include 'vdb/built-in.vschema';
-include 'vdb/vdb.vschema';
-include 'insdc/insdc.vschema';
-
-
-/*--------------------------------------------------------------------------
- * tables
- */
-
-table NCBI:pileup:tbl:pileup_stats #1
-{
-    /* RUN_NAME
-     *  expected to be a single value for entire object
-     */
-    extern column ascii RUN_NAME;
-
-    /* REFERENCE_SPEC
-     *  the canonical reference accession
-     *  an index is stored in 'ref_spec'.
-     */
-    extern column ascii REFERENCE_SPEC = out_reference_spec;
-    physical < ascii > zip_encoding .REFERENCE_SPEC
-        = idx:text:insert #1.0 < 'ref_spec' > ( REFERENCE_SPEC );
-    ascii out_reference_spec
-        = idx:text:project #1.0 < 'ref_spec' > ( .REFERENCE_SPEC );
-
-    /* REF_POS
-     *  we dedicate a row to every position on the reference
-     *  some rows are empty, other than their position
-     */
-    extern column I64 REF_POS = out_ref_pos;
-    physical < I64 > izip_encoding .REF_POS = in_ref_pos;
-    I64 in_ref_pos
-        = < I64 > sub_row_id ( REF_POS )
-        ;
-    I64 out_ref_pos
-        = < I64 > add_row_id ( .REF_POS )
-        | < I64 > add_row_id ( .REF_POS_TRANS )
-        ;
-
-    /* REF_POS_TRANS
-     *  records the translation between current row-id
-     *  and REF_POS, such that
-     *    row-id () + REF_POS_TRANS == REF_POS
-     */
-    extern column I64 REF_POS_TRANS = out_ref_pos_trans;
-    physical < I64 > izip_encoding .REF_POS_TRANS = in_ref_pos_trans;
-    I64 in_ref_pos_trans
-        = REF_POS_TRANS
-        ;
-    I64 out_ref_pos_trans
-        = .REF_POS_TRANS
-        | < I64 > sub_row_id ( .REF_POS )
-        ;
-
-    /* REF_BASE
-     *  this optional column records data extracted from reference
-     *  it is the base at REF_POS
-     */
-    extern column < INSDC:dna:text > zip_encoding REF_BASE;
-
-    /* DEPTH
-     *  depth of coverage at REF_POS
-     */
-    extern column < U32 > izip_encoding DEPTH;
-
-    /* MISMATCH_COUNTS
-     *  the number of pileup bases that do not match against REF_BASE
-     *  the normal vector MISMATCH_COUNTS [ 4 ] is recorded as MISMATCH_COUNTS [ 3 ]
-     *  where the element representing REF_BASE has been eliminated.
-     */
-    extern column < U32 > izip_encoding MISMATCH_COUNTS;
-
-    /* INSERTION_COUNTS
-     *  the number of insertions-before-bases
-     */
-    extern column < U32 > izip_encoding INSERTION_COUNTS;
-
-    /* DELETION_COUNT
-     *  the number of deletions at REF_POS
-     */
-    extern column < U32 > izip_encoding DELETION_COUNT;
-}
-
-/*--------------------------------------------------------------------------
- * databases
- */
-
-database NCBI:pileup:db:pileup_stats #1
-{
-    table NCBI:pileup:tbl:pileup_stats #1 STATS;
-}
diff --git a/interfaces/align/qstat.vschema b/interfaces/align/qstat.vschema
deleted file mode 100644
index d97c20b..0000000
--- a/interfaces/align/qstat.vschema
+++ /dev/null
@@ -1,87 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * VDB Quality Statistics Table
- */
-version 1;
-
-include 'vdb/vdb.vschema';
-include 'ncbi/ncbi.vschema';
-
-table NCBI:align:tbl:qstat #1.0
-{
-    /* SPOT_GROUP
-     */
-    extern column < ascii > zip_encoding SPOT_GROUP;
-
-    /* CYCLE
-     *  machine cycle
-     */
-    extern column < U32 > izip_encoding CYCLE;
-
-    /* KMER
-     *  use dimer
-     */
-    extern column INSDC:dna:text KMER;
-
-    /* HPRUN
-     *  homopolymer run
-     *  number of bases of the same type preceding the current base
-     */
-    extern column < INSDC:coord:len > izip_encoding HPRUN;
-
-    /* GC_CONTENT
-     *  number of G's or C's in the 7 bases preceding the current base
-     */
-    extern column < U32 > izip_encoding GC_CONTENT;
-
-    /* ORIG_QUAL
-     *  original quality scores
-     */
-    extern column < INSDC:quality:phred > zip_encoding ORIG_QUAL;
-
-    /* MAX_QUAL
-     *  max. quality score in read
-     */
-    extern column < INSDC:quality:phred > zip_encoding MAX_QUAL;
-
-    /* NREAD
-     *  number of the read
-     */
-    extern column < U8 > zip_encoding NREAD;
-
-    /* TOTAL_COUNT
-     *  total count of observed events
-     */
-    extern column < U32 > izip_encoding TOTAL_COUNT;
-
-    /* MISMATCH_COUNT
-     *  count of observed mismatches
-     */
-    extern column < U32 > izip_encoding MISMATCH_COUNT;
-
-};
diff --git a/interfaces/align/quality-quantizer.h b/interfaces/align/quality-quantizer.h
deleted file mode 100644
index 223ffda..0000000
--- a/interfaces/align/quality-quantizer.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-
-#ifndef _h_align_quality_quantizer_
-#define _h_align_quality_quantizer_
-
-#ifndef _h_align_extern_
-#include <align/extern.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* InitMatrix
- *  
- *
- */
-ALIGN_EXTERN bool CC QualityQuantizerInitMatrix(uint8_t result[256], char const initializer[]);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_align_quality_quantizer_ */
diff --git a/interfaces/align/reader-refseq.h b/interfaces/align/reader-refseq.h
deleted file mode 100644
index 8fbd017..0000000
--- a/interfaces/align/reader-refseq.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was readten as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_align_reader_refseq_
-#define _h_align_reader_refseq_
-
-#ifndef _h_align_extern_
-#include <align/extern.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct VDBManager;
-struct VTable;
-
-enum ETableReaderRefSeq_Options {
-    errefseq_4NA = 0x01 /* read in INSDC:4na:bin, INSDC:dna:text is default */
-};
-
-typedef struct TableReaderRefSeq TableReaderRefSeq;
-
-ALIGN_EXTERN rc_t CC TableReaderRefSeq_MakeTable(const TableReaderRefSeq** cself, const struct VDBManager* vmgr,
-                                                 const struct VTable* table, uint32_t options, size_t cache);
-
-ALIGN_EXTERN rc_t CC TableReaderRefSeq_MakePath(const TableReaderRefSeq** cself, const VDBManager* vmgr,
-                                                const char* path, uint32_t options, size_t cache);
-
-ALIGN_EXTERN void CC TableReaderRefSeq_Whack(const TableReaderRefSeq* cself);
-
-ALIGN_EXTERN rc_t CC TableReaderRefSeq_SeqId(const TableReaderRefSeq* cself, const char** id, uint32_t* id_sz);
-
-ALIGN_EXTERN rc_t CC TableReaderRefSeq_SeqLength(const TableReaderRefSeq* cself, INSDC_coord_len* len);
-
-ALIGN_EXTERN rc_t CC TableReaderRefSeq_Circular(const TableReaderRefSeq* cself, bool* circular);
-
-/* *md5 is NULL if not present */
-ALIGN_EXTERN rc_t CC TableReaderRefSeq_MD5(const TableReaderRefSeq* cself, const uint8_t** md5);
-
-/* read a chunk of refseq into buffer from offset up to offset + len
-   if offset is beyond non-circular refseq size error is returned
- */
-ALIGN_EXTERN rc_t CC TableReaderRefSeq_Read(const TableReaderRefSeq* cself, INSDC_coord_zero offset, INSDC_coord_len len,
-                                            uint8_t* buffer, INSDC_coord_len* written);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_align_reader_refseq_ */
diff --git a/interfaces/align/reference.h b/interfaces/align/reference.h
deleted file mode 100644
index b02faf5..0000000
--- a/interfaces/align/reference.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was readten as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_align_reader_reference_
-#define _h_align_reader_reference_
-
-#ifndef _h_align_extern_
-#include <align/extern.h>
-#endif
-
-#ifndef _h_vdb_cursor_
-#include <vdb/cursor.h>
-#endif
-
-#ifndef _h_vdb_table_
-#include <vdb/table.h>
-#endif
-
-#ifndef _h_vdb_database_
-#include <vdb/database.h>
-#endif
-
-#ifndef _h_vdb_manager_
-#include <vdb/manager.h>
-#endif
-
-#ifndef _h_align_iterator_
-#include <align/iterator.h>
-#endif
-
-#ifndef _h_insdc_insdc_
-#include <insdc/insdc.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct VCursor;
-struct PlacementIterator;
-
-enum ReferenceList_Options {
-    ereferencelist_4na = 0x01, /* READ in 4na, otherwise it is DNA */
-    /* next 3 options are used only if iterator is NOT created using existing cursor */
-    ereferencelist_usePrimaryIds = 0x02, /* read PRIMARY_ALIGNMENT_IDS too */
-    ereferencelist_useSecondaryIds = 0x04, /* read SECONDARY_ALIGNMENT_IDS too */
-    ereferencelist_useEvidenceIds = 0x08 /* use EVIDENCE_ALIGNMENT */
-};
-
-typedef struct ReferenceList ReferenceList;
-
-/** name is used to limit only to a single sequence - for quick lookups **/
-/** numbins is used to divide whole reference table in equi-row-bins and show only the bin where the name is falling to **/
-ALIGN_EXTERN rc_t CC ReferenceList_MakeCursor(const ReferenceList** cself, const VCursor* cursor, uint32_t options,
-                                              const char* name, const uint32_t numbins);
-
-ALIGN_EXTERN rc_t CC ReferenceList_MakeTable(const ReferenceList** cself, const VTable* table, uint32_t options,
-                                             size_t cache, const char* name, const uint32_t numbins);
-
-ALIGN_EXTERN rc_t CC ReferenceList_MakeDatabase(const ReferenceList** cself, const VDatabase* db, uint32_t options,
-                                                size_t cache, const char* name, const uint32_t numbins);
-
-ALIGN_EXTERN rc_t CC ReferenceList_MakePath(const ReferenceList** cself, const VDBManager* vmgr, const char* dbpath,
-                                            uint32_t options, size_t cache,const char *name, const uint32_t numbins);
-
-ALIGN_EXTERN rc_t CC ReferenceList_AddRef(const ReferenceList *cself);
-ALIGN_EXTERN void CC ReferenceList_Release(const ReferenceList* cself);
-
-/* number of items in the list */
-ALIGN_EXTERN rc_t CC ReferenceList_Count(const ReferenceList* cself, uint32_t* count);
-
-typedef struct ReferenceObj ReferenceObj;
-
-/* find object by SEQ_ID and if not found by NAME */
-ALIGN_EXTERN rc_t CC ReferenceList_Find(const ReferenceList* cself, const ReferenceObj** obj, const char* key, size_t key_sz);
-
-/* idx is 0-based */
-ALIGN_EXTERN rc_t CC ReferenceList_Get(const ReferenceList* cself, const ReferenceObj** obj, uint32_t idx);
-
-ALIGN_EXTERN rc_t ReferenceObj_AddRef(const ReferenceObj *cself);
-ALIGN_EXTERN void CC ReferenceObj_Release(const ReferenceObj* cself);
-
-/* internal idx for use in ReferenceList_Get above */
-ALIGN_EXTERN rc_t CC ReferenceObj_Idx(const ReferenceObj* cself, uint32_t* idx);
-/* Gets RowId range for the object */
-ALIGN_EXTERN rc_t CC ReferenceObj_IdRange(const ReferenceObj* cself, int64_t* start, int64_t* stop);
-/* Gets Current bin number if ReferenceList was binned*/
-ALIGN_EXTERN rc_t CC ReferenceObj_Bin(const ReferenceObj* cself, uint32_t* bin);
-
-ALIGN_EXTERN rc_t CC ReferenceObj_SeqId(const ReferenceObj* cself, const char** seqid);
-
-ALIGN_EXTERN rc_t CC ReferenceObj_Name(const ReferenceObj* cself, const char** name);
-
-ALIGN_EXTERN rc_t CC ReferenceObj_SeqLength(const ReferenceObj* cself, INSDC_coord_len* len);
-
-ALIGN_EXTERN rc_t CC ReferenceObj_Circular(const ReferenceObj* cself, bool* circular);
-
-/* check if actual refseq data is located in external table (external == true on return)
-   optionally obtain its path, returned path == NULL means actual refseq is missing
-   if path was requested and obtained caller must free(path)! */
-ALIGN_EXTERN rc_t CC ReferenceObj_External(const ReferenceObj* cself, bool* external, char** path);
-
-/* read a chunk of refseq into buffer from offset up to offset + len
-   if offset is beyond non-circular refseq size error is returned
- */
-ALIGN_EXTERN rc_t CC ReferenceObj_Read(const ReferenceObj* cself, INSDC_coord_zero offset, INSDC_coord_len len,
-                                       uint8_t* buffer, INSDC_coord_len* written);
-
-ALIGN_EXTERN rc_t CC ReferenceObj_GetIdCount( const ReferenceObj* cself, int64_t row_id, uint32_t *count );
-
-/* return pointer to iterator for (PRIMARY|SECONDARY)_ALIGNMENT_IDS to a given range on reference,
-   both cursors could be NULL
-   ref_len will be truncated to seq length for non-circular references
-   for other parameters see AlignMgrMakePlacementIterator
- */
-ALIGN_EXTERN rc_t CC ReferenceObj_MakePlacementIterator ( const ReferenceObj* cself,
-    PlacementIterator **iter,
-    INSDC_coord_zero ref_window_start,
-    INSDC_coord_len ref_window_len, int32_t min_mapq,
-    struct VCursor const *ref_cur, struct VCursor const *align_cur, align_id_src ids,
-    const PlacementRecordExtendFuncs *ext_0, const PlacementRecordExtendFuncs *ext_1,
-    const char * rd_group, void * placement_ctx );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_align_reader_reference_ */
diff --git a/interfaces/align/refseq-mgr.h b/interfaces/align/refseq-mgr.h
deleted file mode 100644
index ad6459a..0000000
--- a/interfaces/align/refseq-mgr.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was readten as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#ifndef _h_align_refseq_mgr_
-#define _h_align_refseq_mgr_
-
-#ifndef _h_align_extern_
-#include <align/extern.h>
-#endif
-
-#include <vdb/manager.h>
-#include <vdb/table.h>
-#include <align/reader-refseq.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct RefSeqMgr RefSeqMgr;
-
-/* Manages refseq tables
-    reader_options [IN] - passed to TableReaderRefSeq
-    cache [IN] - db cache size per single!!! reference (vdb cursor cache)
-    keep_open_num [IN] - number of refseq kept open, 0 - no limit
- */
-ALIGN_EXTERN rc_t CC RefSeqMgr_Make(const RefSeqMgr** cself, const VDBManager* vmgr,
-                                    uint32_t reader_options, size_t cache, uint32_t keep_open_num);
-
-ALIGN_EXTERN rc_t CC RefSeqMgr_Release(const RefSeqMgr* cself);
-
-ALIGN_EXTERN rc_t CC RefSeqMgr_SetCache(RefSeqMgr const *const cself, size_t cache, uint32_t keep_open_num);
-
-/* return value if 0 means object was found, path is optional */
-ALIGN_EXTERN rc_t RefSeqMgr_Exists(const RefSeqMgr* cself, const char* accession, uint32_t accession_sz, char** path);
-
-/* Read from refseq ided by seq_id chunk of 'len' bases into provided 'buffer' (must be enough big for len);
-   on return written has number of bases written
- */
-ALIGN_EXTERN rc_t CC RefSeqMgr_Read(const RefSeqMgr* cself, const char* seq_id, uint32_t seq_id_sz,
-                                    INSDC_coord_zero offset, INSDC_coord_len len,
-                                    uint8_t* buffer, INSDC_coord_len* written);
-
-typedef struct RefSeq RefSeq;
-
-ALIGN_EXTERN rc_t CC RefSeqMgr_GetSeq(const RefSeqMgr* cmgr, const RefSeq** cself, const char* seq_id, uint32_t seq_id_sz);
-
-/* Same as RefSeqMgr_Read
- */
-ALIGN_EXTERN rc_t CC RefSeq_Read(const RefSeq* cself, INSDC_coord_zero offset, INSDC_coord_len len,
-                                 uint8_t* buffer, INSDC_coord_len* written);
-
-ALIGN_EXTERN rc_t CC RefSeq_Circular(const RefSeq* cself, bool* circular);
-
-ALIGN_EXTERN rc_t CC RefSeq_SeqLength(const RefSeq* cself, INSDC_coord_len* len);
-
-ALIGN_EXTERN rc_t CC RefSeq_MD5(const RefSeq* cself, const uint8_t** md5);
-
-ALIGN_EXTERN rc_t CC RefSeq_Name(const RefSeq* cself, const char** name);
-    
-ALIGN_EXTERN rc_t CC RefSeq_Release(const RefSeq* cself);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_align_refseq_mgr_ */
diff --git a/interfaces/align/refseq.vschema b/interfaces/align/refseq.vschema
deleted file mode 100644
index b61fb99..0000000
--- a/interfaces/align/refseq.vschema
+++ /dev/null
@@ -1,100 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * VDB Reference Sequence types, functions and tables
- */
-version 1;
-
-include 'vdb/vdb.vschema';
-include 'ncbi/seq.vschema';
-include 'ncbi/sra.vschema';
-include 'ncbi/stats.vschema';
-
-
-extern function U8 NCBI:refseq:stats #2 ( INSDC:4na:bin seq, INSDC:coord:len len )
-    = NCBI:refSeq:stats;
-
-table NCBI:refseq:tbl:reference #1.0.2 =
-    NCBI:tbl:base_space #2.0.2,
-    NCBI:tbl:phred_quality #2.0.3,
-    NCBI:tbl:seqloc #1.0,
-    NCBI:SRA:tbl:stats #1.1.2
-{
-    // 128K
-    column default limit = 131072;
-
-    extern column U32 MAX_SEQ_LEN;                  /* must be static */
-    extern column < ascii > izip_encoding DEF_LINE; /* remainder of defline after SEQ_ID */
-
-    // trigger upconverts to INSDC:dna:text to get MD5
-    trigger table_stats
-        = NCBI:refseq:stats(in_4na_bin, _alt_in_read_len);
-
-    readonly column U64 TOTAL_SEQ_LEN
-        = < U64 > meta:value < 'STATS/TOTAL_SEQ_LEN', true >();
-        
-    readonly column U8[16] MD5
-        = < U8[16] > meta:read < 'STATS/MD5', true >();
-        
-    // indicates if sequence has circular structure
-    // should be static
-    extern column bool_encoding CIRCULAR;
-    
-    /* columns:
-     *  READ
-     *  QUALITY (optional)
-     *  SEQ_ID
-     *  SEQ_START
-     *  SEQ_LEN
-     *  MAX_SEQ_LEN
-     *  TOTAL_SEQ_LEN
-     *  DEF_LINE
-     */
-
-    // make CS_KEY writable
-    INSDC:dna:text in_cs_key
-        = < INSDC:dna:text, INSDC:dna:text > map < 'acgtn', 'ACGTN' > ( CS_KEY );
-    physical column < INSDC:dna:text > zip_encoding .CS_KEY = in_cs_key;
-    // extra columns needed for CS conversion
-    INSDC:coord:zero out_read_start = < INSDC:coord:zero> echo < 0 > ();
-    INSDC:coord:len  out_read_len =  .SEQ_LEN;
-    
-    INSDC:coord:len _alt_in_read_len
-        = READ_LEN
-        | SEQ_LEN;
-
-    INSDC:SRA:xread_type _alt_in_read_type
-        = READ_TYPE
-        | < INSDC:SRA:xread_type > echo < SRA_READ_TYPE_BIOLOGICAL > ();
-
-    INSDC:SRA:xread_type out_read_type
-        = .READ_TYPE
-        | < INSDC:SRA:xread_type > echo < SRA_READ_TYPE_BIOLOGICAL > ();
-};
-
-// older spelling
-alias NCBI:refseq:tbl:reference NCBI:refSeq:tbl:reference;
diff --git a/interfaces/align/seq.vschema b/interfaces/align/seq.vschema
deleted file mode 100644
index 9b2f452..0000000
--- a/interfaces/align/seq.vschema
+++ /dev/null
@@ -1,300 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * Sequence schema
- */
-version 1;
-
-include 'vdb/vdb.vschema';
-include 'ncbi/seq.vschema';
-
-
-/* cmp_base_space
- *  table representing compressed reads in base space,
- *  where the bases are only stored for unaligned reads
- */
-table NCBI:align:tbl:cmp_base_space #1
-    = INSDC:tbl:sequence #1.0.1
-    , NCBI:tbl:dcmp_base_space #1
-{
-    /* CMP_READ
-     *  read compressed against a reference sequence
-     */
-
-    // default is IUPAC character representation
-    extern default column INSDC:dna:text CMP_READ
-    {
-        read = out_cmp_dna_text;
-        validate = < INSDC:dna:text > compare ( in_cmp_dna_text, out_cmp_dna_text );
-    }
-
-    // 4na representation
-    extern column INSDC:4na:bin CMP_READ = out_cmp_4na_bin;
-    extern column INSDC:4na:packed CMP_READ = out_cmp_4na_packed;
-
-    // x2na representation - 2na with ambiguity
-    extern column INSDC:x2na:bin CMP_READ = out_cmp_x2na_bin;
-
-    // 2na representation - 2na with no ambiguity
-    extern column INSDC:2na:bin CMP_READ = out_cmp_2na_bin;
-    extern column INSDC:2na:packed CMP_READ = out_cmp_2na_packed;
-
-
-    /* input processing rules
-     */
-
-    // compressed input text
-    INSDC:dna:text in_cmp_dna_text
-        = < INSDC:dna:text, INSDC:dna:text > map < '.acmgrsvtwyhkdbn','NACMGRSVTWYHKDBN' > ( CMP_READ );
-
-    // compressed input 4na bin
-    INSDC:4na:bin in_cmp_4na_bin
-        = < INSDC:4na:bin > range_validate < 0, 15 > ( CMP_READ )
-        | ( INSDC:4na:bin ) unpack ( in_cmp_4na_packed )
-        | < INSDC:dna:text, INSDC:4na:bin > map < INSDC:4na:map:CHARSET, INSDC:4na:map:BINSET > ( in_cmp_dna_text )
-        | < INSDC:x2na:bin, INSDC:4na:bin > map < INSDC:x2na:map:BINSET, [ 1, 2, 4, 8, 15 ] > ( in_cmp_x2na_bin );
-
-    // compressed input 4na packed
-    INSDC:4na:packed in_cmp_4na_packed = CMP_READ;
-
-    // compressed input x2na bin
-    INSDC:x2na:bin in_cmp_x2na_bin
-        = < INSDC:x2na:bin > range_validate < 0, 4 > ( CMP_READ )
-        | < INSDC:4na:bin, INSDC:x2na:bin > map < INSDC:4na:map:BINSET, [ 4,0,1,4,2,4,4,4,3,4,4,4,4,4,4,4 ] > ( in_cmp_4na_bin );
-
-    // compressed input 2na bin
-    INSDC:2na:bin in_cmp_2na_bin
-        = < INSDC:2na:bin > range_validate < 0, 3 > ( CMP_READ )
-        | ( INSDC:2na:bin ) unpack ( in_cmp_2na_packed )
-        | INSDC:SEQ:rand_4na_2na ( in_cmp_4na_bin );
-
-    // compressed input 2na packed
-    INSDC:2na:packed in_cmp_2na_packed = CMP_READ;
-
-    // input 4na alt-read ( ambiguities )
-    INSDC:4na:bin in_cmp_alt_4na_bin
-        = < INSDC:4na:bin, INSDC:4na:bin > map < INSDC:4na:map:BINSET, [ 15,0,0,3,0,5,6,7,0,9,10,11,12,13,14,15 ] > ( in_cmp_4na_bin );
-
-    // preparing a feed into stats column
-    U8 in_cmp_stats_bin = in_cmp_2na_bin;
-
-
-    /* physical columns
-     */
-
-    physical column INSDC:2na:packed .CMP_READ
-        = in_cmp_2na_packed
-        | ( INSDC:2na:packed ) pack ( in_cmp_2na_bin );
-
-    physical column < INSDC:4na:bin > zip_encoding .CMP_ALTREAD
-        = < INSDC:4na:bin > trim < 0, 0 > ( in_cmp_alt_4na_bin );
-
-
-    /* output processing rules
-     */
-
-    // output 2na packed
-    INSDC:2na:packed out_cmp_2na_packed = .CMP_READ;
-
-    // unambiguous unpacked 2na
-    INSDC:2na:bin out_cmp_2na_bin
-        = ( INSDC:2na:bin ) unpack ( out_cmp_2na_packed );
-
-    // output x2na bin
-    INSDC:x2na:bin out_cmp_x2na_bin
-        = < INSDC:4na:bin, INSDC:x2na:bin > map < INSDC:4na:map:BINSET, [ 4,0,1,4,2,4,4,4,3,4,4,4,4,4,4,4 ] > ( out_cmp_4na_bin );
-
-    // output 2na->4na bin
-    INSDC:4na:bin out_cmp_2na_4na_bin
-        = < INSDC:2na:bin, INSDC:4na:bin > map < INSDC:2na:map:BINSET, [ 1, 2, 4, 8 ] > ( out_cmp_2na_bin );
-
-    // output 4na bin
-    INSDC:4na:bin out_cmp_4na_bin
-        = < INSDC:4na:bin > bit_or < ALIGN_RIGHT > ( out_cmp_2na_4na_bin, .CMP_ALTREAD )
-        | out_cmp_2na_4na_bin;
-
-    // synthesized packed 4na
-    INSDC:4na:packed out_cmp_4na_packed
-        = ( INSDC:4na:packed ) pack ( out_cmp_4na_bin );
-
-    // output text
-    INSDC:dna:text out_cmp_dna_text
-        = < INSDC:4na:bin, INSDC:dna:text > map < INSDC:4na:map:BINSET, INSDC:4na:map:CHARSET > ( out_cmp_4na_bin );
-
-
-    /* decompressed sequences
-     *   source is out_dcmp_4na_bin - a virtual production
-     */
-
-    // synthesize x2na_bin, 2na_bin and 2na_packed
-    INSDC:x2na:bin out_dcmp_x2na_bin
-        = < INSDC:4na:bin, INSDC:x2na:bin > map < INSDC:4na:map:BINSET, [ 4,0,1,4,2,4,4,4,3,4,4,4,4,4,4,4 ] > ( out_dcmp_4na_bin );
-    INSDC:2na:bin out_dcmp_2na_bin
-        = < INSDC:x2na:bin, INSDC:2na:bin > map < [ 0,1,2,3,4 ], [ 0,1,2,3,0 ] > ( out_dcmp_x2na_bin );
-    INSDC:2na:packed out_dcmp_2na_packed
-        = ( INSDC:2na:packed ) pack ( out_dcmp_2na_bin );
-
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  cs_native
-	 *  out_cs_key
-	 *  out_signal
-	 *  out_2cs_bin
-	 *  out_2na_bin
-	 *  out_4na_bin
-	 *  out_dna_text
-	 *  out_x2cs_bin
-	 *  out_x2na_bin
-	 *  out_2cs_packed
-	 *  out_2na_packed
-	 *  out_4na_packed
-	 *  out_color_text
-	 *  out_color_matrix
-	 */
-
-	/* NCBI:tbl:dcmp_base_space inherited productions
-	 *  out_dcmp_4na_bin
-	 */
-}
-
-
-/* cmp_color_space
- *  table representing compressed reads in color space,
- *  where the colors are only stored for unaligned reads
- */
-table NCBI:align:tbl:cmp_color_space #1 =
-    INSDC:tbl:sequence #1.0.1, NCBI:tbl:dcmp_color_space #1
-{
-    /* CMP_CSREAD
-     *  read compressed against a reference sequence
-     */
-
-    // default is IUPAC character representation
-    extern default column INSDC:color:text CMP_CSREAD = out_cmp_color_text;
-
-    // x2cs representation - 2cs with ambiguity
-    extern column INSDC:x2cs:bin CMP_CSREAD = out_cmp_x2cs_bin;
-
-    // 2cs representation - 2cs with no ambiguity
-    extern column INSDC:2cs:bin CMP_CSREAD = out_cmp_2cs_bin;
-    extern column INSDC:2cs:packed CMP_CSREAD = out_cmp_2cs_packed;
-
-
-    /* input processing rules
-     */
-
-    // compressed input text
-    INSDC:color:text in_cmp_color_text = CMP_CSREAD;
-
-    // compressed input x2cs bin
-    INSDC:x2cs:bin in_cmp_x2cs_bin
-        = < INSDC:x2cs:bin > range_validate < 0, 4 > ( CMP_CSREAD )
-        | < INSDC:color:text, INSDC:x2cs:bin > map < INSDC:x2cs:map:CHARSET, INSDC:x2cs:map:BINSET > ( in_cmp_color_text );
-
-    // compressed input 2cs bin
-    INSDC:2cs:bin in_cmp_2cs_bin
-        = < INSDC:2cs:bin > range_validate < 0, 3 > ( CMP_CSREAD )
-        | ( INSDC:2cs:bin ) unpack ( in_cmp_2cs_packed )
-        | < INSDC:x2cs:bin, INSDC:2cs:bin > map < INSDC:x2cs:map:BINSET, [ 0, 1, 2, 3, 0 ] > ( in_cmp_x2cs_bin );
-
-    // compressed input 2cs packed
-    INSDC:2cs:packed in_cmp_2cs_packed = CMP_CSREAD;
-
-    // compressed input x2cs alt-read ( ambiguities )
-    INSDC:x2cs:bin in_cmp_alt_x2cs_bin
-        = < INSDC:x2cs:bin, INSDC:x2cs:bin > map < INSDC:x2cs:map:BINSET, [ 0, 0, 0, 0, 4 ] > ( in_cmp_x2cs_bin );
-
-    // preparing a feed into stats column
-    U8 in_cmp_stats_bin = in_cmp_2cs_bin;
-
-
-    /* physical columns
-     */
-
-    physical column INSDC:2cs:packed .CMP_CSREAD
-        = in_cmp_2cs_packed
-        | ( INSDC:2cs:packed ) pack ( in_cmp_2cs_bin );
-
-    physical column < INSDC:x2cs:bin > zip_encoding .CMP_ALTCSREAD
-        = < INSDC:x2cs:bin > trim < 0, 0 > ( in_cmp_alt_x2cs_bin );
-
-
-    /* output processing rules
-     */
-
-    // compressed output 2cs packed
-    INSDC:2cs:packed out_cmp_2cs_packed = .CMP_CSREAD;
-
-    // unambiguous unpacked 2cs
-    INSDC:2cs:bin out_cmp_2cs_bin
-        = ( INSDC:2cs:bin ) unpack ( out_cmp_2cs_packed );
-
-    // unpacked 2cs with ambiguity
-    INSDC:x2cs:bin out_cmp_x2cs_bin
-        = ( INSDC:x2cs:bin ) < U8 > bit_or < ALIGN_RIGHT > ( out_cmp_2cs_bin, .CMP_ALTCSREAD )
-        | ( INSDC:x2cs:bin ) out_cmp_2cs_bin;
-
-    // output text
-    INSDC:color:text out_cmp_color_text
-        = < INSDC:x2cs:bin, INSDC:color:text > map <  INSDC:x2cs:map:BINSET, INSDC:x2cs:map:CHARSET > ( out_cmp_x2cs_bin );
-
-
-    /* decompressed sequences
-     *   sources are out_dcmp_x2cs_bin - virtual production
-     */
-
-    // synthesize 2cs_bin and 2cs_packed
-    INSDC:2cs:bin out_dcmp_2cs_bin
-        = < INSDC:x2cs:bin, INSDC:2cs:bin > map < [ 0,1,2,3,4 ], [ 0,1,2,3,0 ] > ( out_dcmp_x2cs_bin );
-    INSDC:2cs:packed out_dcmp_2cs_packed
-        = ( INSDC:2cs:packed ) pack ( out_dcmp_2cs_bin );
-
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  cs_native
-	 *  out_cs_key
-	 *  out_signal
-	 *  out_2cs_bin
-	 *  out_2na_bin
-	 *  out_4na_bin
-	 *  out_dna_text
-	 *  out_x2cs_bin
-	 *  out_x2na_bin
-	 *  out_2cs_packed
-	 *  out_2na_packed
-	 *  out_4na_packed
-	 *  out_color_text
-	 *  out_qual_phred
-	 *  out_color_matrix
-	 *  out_qual_text_phred_33
-	 *  out_qual_text_phred_64
-	 */
-
-	/* NCBI:tbl:dcmp_color_space inherited productions
-	 *  out_dcmp_x2cs_bin
-	 */
-}
diff --git a/interfaces/align/writer-alignment.h b/interfaces/align/writer-alignment.h
deleted file mode 100644
index 07ffd79..0000000
--- a/interfaces/align/writer-alignment.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_align_writer_alignment_
-#define _h_align_writer_alignment_
-
-#ifndef _h_align_extern_
-#include <align/extern.h>
-#endif
-
-#include <align/writer-cmn.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum ETableWriterAlgn_ColNames {
-    ewalgn_cn_TMP_KEY_ID,
-    ewalgn_cn_PLOIDY,
-    ewalgn_cn_SEQ_SPOT_ID,
-    ewalgn_cn_SEQ_READ_ID,
-    ewalgn_cn_READ_START,
-    ewalgn_cn_READ_LEN,
-    ewalgn_cn_REF_ID,
-    ewalgn_cn_REF_START,
-    ewalgn_cn_GLOBAL_REF_START,
-    ewalgn_cn_REF_LEN,
-    ewalgn_cn_REF_ORIENTATION,
-    ewalgn_cn_REF_PLOIDY,
-    ewalgn_cn_MATE_REF_ORIENTATION,
-    ewalgn_cn_MATE_REF_ID,
-    ewalgn_cn_MATE_REF_POS,
-    ewalgn_cn_MATE_ALIGN_ID,
-    ewalgn_cn_TEMPLATE_LEN,
-    ewalgn_cn_MAPQ,
-    ewalgn_cn_HAS_MISMATCH,
-    ewalgn_cn_HAS_REF_OFFSET,
-    ewalgn_cn_MISMATCH,
-    ewalgn_cn_REF_OFFSET,
-    ewalgn_cn_REF_OFFSET_TYPE,
-    ewalgn_cn_EVIDENCE_ALIGNMENT_IDS,
-    ewalgn_cn_ALIGN_GROUP,
-    ewalgn_cn_LINKAGE_GROUP,
-    ewalgn_cn_MISMATCH_QUALITY,
-    ewalgn_cn_MATE_GLOBAL_REF_START,
-    ewalgn_cn_MATE_REF_START,
-    ewalgn_cn_Last
-};
-
-typedef uint8_t ETableWriterAlgn_TableType;
-enum {
-    ewalgn_tabletype_PrimaryAlignment,
-    ewalgn_tabletype_SecondaryAlignment,
-    ewalgn_tabletype_EvidenceInterval,
-    ewalgn_tabletype_EvidenceAlignment
-};
-
-enum ETableWriterAlgn_ColOptions {
-    ewalgn_co_SEQ_SPOT_ID = 0x01,           /* SEQ_SPOT_ID will be written with the whole record */
-    ewalgn_co_TMP_KEY_ID = 0x02,            /* use TMP_KEY_ID column, by default not opened */
-    ewalgn_co_PLOIDY = 0x04,                /* ploidy is more than 1, columns PLOIDY, READ_START, READ_LEN needs data */
-    ewalgn_co_unsorted = 0x08,              /* use the unsorted table scheme */
-    ewalgn_co_MATE_ALIGN_ID_only = 0x10,    /* disable all other MATE_* columns */
-    ewalgn_co_MISMATCH_QUALITY = 0x20,      /* enable MISMATCH_QUALITY column */
-    ewalgn_co_MATE_POSITION = 0x40          /* enable mate position columns */
-};
-
-typedef struct TableWriterAlgnData_struct {
-
-    TableWriterData seq_spot_id;
-    TableWriterData seq_read_id;
-    TableWriterData tmp_key_id;
-
-    /* BEGIN filled out by ReferenceMgr_Compress */
-    uint32_t ploidy; /* incremented sequentially for each call, must be set to 0 for each new spot */
-    TableWriterData read_start; /* mandatory */
-    TableWriterData read_len; /* mandatory */
-    TableWriterData has_ref_offset; /* mandatory */
-    TableWriterData ref_offset; /* mandatory */
-    TableWriterData ref_offset_type; /* mandatory */
-    TableWriterData ref_id; /* used for unsorted*/
-    TableWriterData ref_start; /* used only for unsorted */
-    TableWriterData global_ref_start; /* used only for sorted */
-    TableWriterData has_mismatch;  /* mandatory only for primary */
-    TableWriterData mismatch; /* mandatory only for primary */
-    TableWriterData mismatch_qual;
-
-    INSDC_coord_len ref_len; /* projection on refseq is same for all alleles! */
-    /* tmp data, never saved to db */
-    /* recalculated offset in reference based on CIGAR and circularity in Compression */
-    INSDC_coord_zero effective_offset; 
-    int64_t ref_1st_row_id;
-    /* END filled out by ReferenceMgr_Compress */
-
-    TableWriterData ref_orientation;
-    TableWriterData ref_ploidy;
-    TableWriterData mapq;
-    TableWriterData align_group; /* set length to 0 if not used */
-    TableWriterData linkageGroup; /* set length to 0 if not used */
-
-    /* used only only in secondary */
-    TableWriterData mate_ref_orientation;
-    TableWriterData mate_ref_id;
-    TableWriterData mate_ref_pos;
-    TableWriterData mate_align_id;
-    TableWriterData template_len;
-
-    /* used only in for ewalgn_tabletype_EvidenceInterval table type */
-    TableWriterData alingment_ids;
-} TableWriterAlgnData;
-
-typedef struct TableWriterAlgn TableWriterAlgn;
-    
-typedef union ReferenceStart ReferenceStart;
-union ReferenceStart {
-    uint64_t global_ref_start;
-    struct {
-        int64_t ref_id;
-        INSDC_coord_one ref_start;
-    } local;
-};
-
-ALIGN_EXTERN rc_t CC TableWriterAlgn_Make(const TableWriterAlgn** cself, VDatabase* db,
-                                          ETableWriterAlgn_TableType type, uint32_t options);
-
-/* rows optional here */
-ALIGN_EXTERN rc_t CC TableWriterAlgn_Whack(const TableWriterAlgn* cself, bool commit, uint64_t* rows);
-
-ALIGN_EXTERN rc_t CC TableWriterAlgn_WriteDefault(const TableWriterAlgn* cself,
-                                                  enum ETableWriterAlgn_ColNames col, const TableWriterData* data);
-
-ALIGN_EXTERN rc_t CC TableWriterAlgn_GetNextRowId(const TableWriterAlgn* cself, int64_t* rowid);
-
-/* rowid optional here */
-ALIGN_EXTERN rc_t CC TableWriterAlgn_Write(const TableWriterAlgn* cself, const TableWriterAlgnData* data, int64_t* rowid);
-
-/* closes main cursor and creates lookup object on the successfully committed main cursor */
-ALIGN_EXTERN rc_t CC TableWriterAlgn_TmpKeyStart(const TableWriterAlgn* cself);
-
-/* retrieve TMP_KEY value by rowid */
-ALIGN_EXTERN rc_t CC TableWriterAlgn_TmpKey(const TableWriterAlgn* cself, int64_t rowid, uint64_t* key_id);
-
-/* retrieve reference start value by rowid */
-ALIGN_EXTERN rc_t CC TableWriterAlgn_RefStart(const TableWriterAlgn* cself, int64_t rowid, ReferenceStart *const rslt);
-
-/* assign a SPOT_ID value to row */
-ALIGN_EXTERN rc_t CC TableWriterAlgn_Write_SpotId(const TableWriterAlgn* cself, int64_t rowid, int64_t spot_id);
-
-ALIGN_EXTERN rc_t CC TableWriterAlgn_Write_SpotInfo(const TableWriterAlgn* cself,
-                                                    int64_t rowid,
-                                                    int64_t spot_id,
-                                                    int64_t mate_id,
-                                                    ReferenceStart const *ref_start);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_align_writer_alignment_ */
diff --git a/interfaces/align/writer-cmn.h b/interfaces/align/writer-cmn.h
deleted file mode 100644
index 9e6086a..0000000
--- a/interfaces/align/writer-cmn.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#ifndef _h_align_writer_cmn_
-#define _h_align_writer_cmn_
-
-#ifndef _h_align_extern_
-#include <align/extern.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct TableWriterData_struct {
-    const void* buffer;
-    uint64_t elements;
-} TableWriterData;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_align_writer_cmn_ */
diff --git a/interfaces/align/writer-reference.h b/interfaces/align/writer-reference.h
deleted file mode 100644
index 221b1bc..0000000
--- a/interfaces/align/writer-reference.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_align_writer_reference_
-#define _h_align_writer_reference_
-
-#ifndef _h_align_extern_
-#include <align/extern.h>
-#endif
-
-#include <insdc/insdc.h>
-#include <align/writer-cmn.h>
-#include <align/writer-alignment.h>
-#include <align/reader-refseq.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KFile;
-
-enum EReference_Options {
-    ewrefmgr_co_allREADs = 0x01, /* always write READ */
-    ewrefmgr_co_Coverage = 0x02,  /* use coverage data, by default not used */
-    ewrefmgr_co_AcceptHardClip = 0x04 /* accept hard clipping in CIGAR */
-};
-
-typedef struct ReferenceMgr ReferenceMgr;
-
-/* Writes REFERENCE table with in given db
-    
-    vmgr [IN] - needed only if conf is not NULL
-    conf [IN] - optional path to tab separated file to resolve reference names
-                from source files to standard refseq accessions;
-                standard refseq dictionary location is obtained from kfg files.
-    path {IN] - optional path points to a directory with 'local' references
-                (not found in conf file), default is '.'
-    max_seq_len [IN] - 0 - use default
-    cache [IN] - db cache size per single!!! reference (vdb cursor cache)
-    num_open [IN] - number of refseq kept open, 0 - no limit
- */
-ALIGN_EXTERN rc_t CC ReferenceMgr_Make(const ReferenceMgr** cself, VDatabase* db, const VDBManager* vmgr,
-                                       const uint32_t options, const char* conf, const char* path, uint32_t max_seq_len,
-                                       size_t cache, uint32_t num_open);
-
-ALIGN_EXTERN rc_t CC ReferenceMgr_Release(const ReferenceMgr *cself,
-                                          const bool commit,
-                                          uint64_t *const Rows,
-                                          const bool build_coverage,
-                                          rc_t (*const quitting)(void)
-                                          );
-
-ALIGN_EXTERN rc_t CC ReferenceMgr_SetCache(ReferenceMgr const *const self, size_t cache, uint32_t num_open);
-
-typedef struct ReferenceSeq ReferenceSeq;
-
-/* id: chr12 or NC_000001.3 */
-ALIGN_EXTERN rc_t CC ReferenceMgr_GetSeq(ReferenceMgr const *self,
-                                         ReferenceSeq const **seq,
-                                         char const id[],
-                                         bool *shouldUnmap,
-                                         bool allowMultiMapping,
-                                         bool wasRenamed[]);
-
-ALIGN_EXTERN rc_t CC ReferenceMgr_Verify(ReferenceMgr const *self,
-                                         char const id[],
-                                         INSDC_coord_len length,
-                                         uint8_t const md5[16],
-                                         bool allowMultiMapping,
-                                         bool wasRenamed[]);
-
-ALIGN_EXTERN rc_t CC ReferenceMgr_FastaPath(const ReferenceMgr* cself, const char* fasta_path);
-
-ALIGN_EXTERN rc_t CC ReferenceMgr_FastaFile(const ReferenceMgr* cself, struct KFile const* file);
-
-enum EReference_CompressionOptions {
-    ewrefmgr_cmp_Binary = 0x01, /* binary cigar on input (BAM format: 28+4 bits) */
-    ewrefmgr_cmp_Exact = 0x02 /* exact matching no cliping */
-};
-
-ALIGN_EXTERN rc_t CC ReferenceMgr_Compress(const ReferenceMgr* cself,
-                                           uint32_t options,
-                                           const char* id,
-                                           INSDC_coord_zero offset,
-                                           const char* seq,
-                                           INSDC_coord_len seq_len,
-                                           const void* cigar,
-                                           uint32_t cigar_len,
-                                           INSDC_coord_zero allele_offset,
-                                           const char* allele,
-                                           INSDC_coord_len allele_len,
-                                           INSDC_coord_zero offset_in_allele,
-                                           const void* allele_cigar,
-                                           uint32_t allele_cigar_len,
-                                           uint8_t rna_orient,
-                                           TableWriterAlgnData* data);
-
-
-/* Read refseq chunk of 'len' bases into provided 'buffer' (must be enough big for len);
-   ref_len - on return has number of bases written to the buffer
- */
-ALIGN_EXTERN rc_t CC ReferenceSeq_Read(const ReferenceSeq* cself, INSDC_coord_zero offset, INSDC_coord_len len,
-                                       uint8_t* buffer, INSDC_coord_len* ref_len);
-
-ALIGN_EXTERN rc_t CC ReferenceSeq_Get1stRow(const ReferenceSeq* cself, int64_t* row_id);
-    
-ALIGN_EXTERN rc_t CC ReferenceSeq_GetID(ReferenceSeq const *self, char const **rslt);
-
-ALIGN_EXTERN rc_t CC ReferenceSeq_Compress(const ReferenceSeq* cself,
-                                           uint32_t options,
-                                           INSDC_coord_zero offset,
-                                           const char* seq,
-                                           INSDC_coord_len seq_len,
-                                           const void* cigar,
-                                           uint32_t cigar_len,
-                                           INSDC_coord_zero allele_offset,
-                                           const char* allele,
-                                           INSDC_coord_len allele_len,
-                                           INSDC_coord_zero offset_in_allele,
-                                           const void* allele_cigar,
-                                           uint32_t allele_cigar_len,
-                                           uint8_t rna_orient,
-                                           TableWriterAlgnData* data);
-                                           
-ALIGN_EXTERN rc_t CC ReferenceSeq_TranslateOffset_int(ReferenceSeq const *const cself,
-                                                      INSDC_coord_zero const offset,
-                                                      int64_t *const ref_id,
-                                                      INSDC_coord_zero *const ref_start,
-                                                      uint64_t *const global_ref_start);
-                                           
-
-enum ReferenceSeqCoverageTableType {
-    ewrefcov_primary_table = 0,
-    ewrefcov_secondary_table,
-    ewrefcov_evidence_table
-};
-
-typedef struct ReferenceSeqCoverage_struct {
-    /* based only on primary and secondary */
-    uint8_t high;
-    uint8_t low;
-    uint32_t mismatches;
-    uint32_t indels;
-    /* in that order (use enum above): prim, 2nd, evidence */
-    INSDC_coord_zero overlap_ref_pos[3];
-    INSDC_coord_len overlap_ref_len[3];
-    TableWriterData ids[3];
-} ReferenceSeqCoverage;
-
-ALIGN_EXTERN rc_t CC ReferenceSeq_AddCoverage(const ReferenceSeq* cself, INSDC_coord_zero offset, const ReferenceSeqCoverage* data);
-
-ALIGN_EXTERN rc_t CC ReferenceSeq_Release(const ReferenceSeq* cself);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_align_writer_reference_ */
diff --git a/interfaces/align/writer-refseq.h b/interfaces/align/writer-refseq.h
deleted file mode 100644
index 3f3e44a..0000000
--- a/interfaces/align/writer-refseq.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_align_writer_refseq_
-#define _h_align_writer_refseq_
-
-#ifndef _h_align_extern_
-#include <align/extern.h>
-#endif
-
-#include <vdb/manager.h>
-#include <align/writer-cmn.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* default sequence chunk length */
-#define TableWriterRefSeq_MAX_SEQ_LEN 5000
-
-/* use in TableWriterRefSeq_Write* methods */
-enum ETableWriterRefSeq_ColNames {
-    ewrefseq_cn_MAX_SEQ_LEN, /* static/default */
-    ewrefseq_cn_DEF_LINE, /* static/default */
-    ewrefseq_cn_CS_KEY, /* handled by writer */
-    ewrefseq_cn_READ,
-    ewrefseq_cn_QUALITY, /* optional */
-    ewrefseq_cn_SEQ_ID, /* static/default */
-    ewrefseq_cn_SEQ_START, /* calculated on fly by writer */
-    ewrefseq_cn_SEQ_LEN, /* calculated on fly by writer */
-    ewrefseq_cn_CIRCULAR, /* static/default */
-    ewrefseq_cn_Last = ewrefseq_cn_CIRCULAR
-};
-
-enum ETableWriterRefSeq_ColOptions {
-    ewrefseq_co_QUALITY = 0x01 /* use QUALITY column, by default not opened */
-};
-
-typedef struct TableWriterRefSeqData_struct {
-    TableWriterData read;
-    TableWriterData quality;
-} TableWriterRefSeqData;
-
-typedef struct TableWriterRefSeq TableWriterRefSeq;
-
-ALIGN_EXTERN rc_t CC TableWriterRefSeq_Make(const TableWriterRefSeq** cself, VDBManager* mgr, const char* schema_path,
-                                            const char* table_path, const uint32_t options);
-
-/* rows optional here, app signature is mandatory */
-ALIGN_EXTERN rc_t CC TableWriterRefSeq_Whack(const TableWriterRefSeq* cself, bool commit, uint64_t* rows,
-                                             const char loader_name[],
-                                             const ver_t loader_version,
-                                             const char loader_date[],
-                                             const char app_name[],
-                                             const ver_t app_version);
-
-ALIGN_EXTERN rc_t CC TableWriterRefSeq_WriteDefault(const TableWriterRefSeq* cself,
-                                                    enum ETableWriterRefSeq_ColNames col, const TableWriterData* data);
-
-/* rowid optional here */
-ALIGN_EXTERN rc_t CC TableWriterRefSeq_Write(const TableWriterRefSeq* cself, const TableWriterRefSeqData* data, int64_t* rowid);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_align_writer_refseq_ */
diff --git a/interfaces/align/writer-sequence.h b/interfaces/align/writer-sequence.h
deleted file mode 100644
index 526d6f4..0000000
--- a/interfaces/align/writer-sequence.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_align_writer_sequence_
-#define _h_align_writer_sequence_
-
-#ifndef _h_align_extern_
-#include <align/extern.h>
-#endif
-
-#include <align/writer-cmn.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum ETableWriterSeq_ColNames {
-    ewseq_cn_READ,
-    ewseq_cn_CSREAD,
-    ewseq_cn_CSKEY,
-    ewseq_cn_QUALITY,
-    ewseq_cn_PRIMARY_ALIGNMENT_ID,
-    ewseq_cn_ALIGNMENT_COUNT,
-    ewseq_cn_PLATFORM,
-    ewseq_cn_LABEL,
-    ewseq_cn_LABEL_START,
-    ewseq_cn_LABEL_LEN,
-    ewseq_cn_READ_TYPE,
-    ewseq_cn_READ_START,
-    ewseq_cn_READ_LEN,
-    ewseq_cn_TMP_KEY_ID,
-    ewseq_cn_SPOT_GROUP,
-    ewseq_cn_READ_FILTER,
-    ewseq_cn_TI,
-    ewseq_cn_NAME,
-    ewseq_cn_LINKAGE_GROUP,
-    ewseq_cn_Last = ewseq_cn_LINKAGE_GROUP
-};
-
-enum ETableWriterSeq_ColOptions {
-    ewseq_co_SaveRead = 0x01,       /* write read even when there are alignments */
-    ewseq_co_FullQuality = 0x02,    /* write full quality values, by default [1,10,20,30] */
-    ewseq_co_AlignData = 0x04,      /* PRIMARY_ALIGNMENT_ID, ALIGNMENT_COUNT will be written with the whole record */
-    ewseq_co_NoLabelData = 0x08,    /* LABEL and related columns will not be written */
-    ewseq_co_ColorSpace = 0x10,     /* CMP_CSREAD will be written instead of CMP_READ */
-    ewseq_co_SpotGroup = 0x20,      /* SPOT_GROUP will be written */
-    ewseq_co_TI = 0x40,             /* TI will be written */
-    ewseq_co_SaveQual = 0x80,       /* write quality even when there are alignments */
-    ewseq_co_SpotName = 0x100,      /* NAME will be written */
-    ewseq_co_KeepKey = 0x200,       /* TMP_KEY_ID won't be removed */
-};
-
-typedef struct TableWriterSeqData_struct {
-    uint64_t        spot_len;
-    TableWriterData sequence; /* writes sequence ONLY if alignment_count == 0 */
-    TableWriterData quality;
-
-    TableWriterData primary_alignment_id;
-    TableWriterData alignment_count;
-    TableWriterData label;
-    TableWriterData label_start;
-    TableWriterData label_len;
-    uint8_t nreads;
-    TableWriterData read_type;
-    TableWriterData read_start;
-    TableWriterData read_len;
-    uint64_t tmp_key_id;
-    TableWriterData spot_group;
-    TableWriterData cskey;
-    TableWriterData read_filter;
-    TableWriterData no_quantize_mask;
-    TableWriterData platform;
-    TableWriterData ti;
-    TableWriterData spot_name;
-    TableWriterData linkageGroup;
-} TableWriterSeqData;
-
-typedef struct TableWriterSeq TableWriterSeq;
-
-/*
- * quality_quantization:
- *  is a ',' seperated list of value pairs, with the pairs seperated by ':'.
- *  The first of the pair is the value to substitute.
- *  The second is the limit at which the substitution is no longer valid.
- *  The second value can be '-' to indication the remainder; this also terminates
- *  processing of the string.  If the second value is not '-', then the trailing
- *  ',' is required.
- *
- *  Example: 1:10,10:20,20:30,30:40,
- *  This will substitute 1 for quality values [0, 10), 10 for [10, 20),
- *  20 for [20, 30), 30 for [30, 40), and 0 for the rest
- *
- *  Example: 1:10,10:20,20:30,30:-
- *  This will substitute 1 for quality values [0, 10), 10 for [10, 20),
- *  20 for [20, 30), and 30 for the rest
- *
- *  Example: 1:30,30:-
- *  This will substitute 1 for quality values [0, 30), and 30 for the rest
- *
- *  Example: 10:30,20:-
- *  This will substitute 10 for quality values [0, 30), 20 for the rest
- */
-ALIGN_EXTERN rc_t CC TableWriterSeq_Make(const TableWriterSeq** cself, VDatabase* db,
-                                         const uint32_t options, char const quality_quantization[]);
-
-/* rows optional here */
-ALIGN_EXTERN rc_t CC TableWriterSeq_Whack(const TableWriterSeq* cself, bool commit, uint64_t* rows);
-
-ALIGN_EXTERN rc_t CC TableWriteSeq_WriteDefault(const TableWriterSeq* cself,
-                                                enum ETableWriterSeq_ColNames col, const TableWriterData* data);
-
-ALIGN_EXTERN rc_t CC TableWriterSeq_GetNextRowId(const TableWriterSeq* cself, int64_t* rowid);
-
-/* rowid optional here */
-ALIGN_EXTERN rc_t CC TableWriterSeq_Write(const TableWriterSeq* cself, const TableWriterSeqData* data, int64_t* rowid);
-
-
-/* if option ewseq_co_AlignData is not set (default) below methods are available */
-
-/* closes main cursor and creates lookup object on the successfully committed main cursor */
-ALIGN_EXTERN rc_t CC TableWriterSeq_TmpKeyStart(const TableWriterSeq* cself);
-
-/* retrieve TMP_KEY value by rowid */
-ALIGN_EXTERN rc_t CC TableWriterSeq_TmpKey(const TableWriterSeq* cself, int64_t rowid, uint64_t *key_id);
-
-/* passing rowid == 0 will cause the cursor to be flushed */
-ALIGN_EXTERN rc_t CC TableWriterSeq_WriteAlignmentData(const TableWriterSeq* cself, int64_t rowid,
-                                                       const TableWriterData* primary_alignment_id,
-                                                       const TableWriterData* alignment_count);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_align_writer_sequence_ */
diff --git a/interfaces/cc/cc/compiler.h b/interfaces/cc/cc/compiler.h
deleted file mode 100644
index d1bf565..0000000
--- a/interfaces/cc/cc/compiler.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_compiler_
-#define _h_compiler_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_compiler_ */
-
diff --git a/interfaces/cc/gcc/compiler.h b/interfaces/cc/gcc/compiler.h
deleted file mode 100644
index d1bf565..0000000
--- a/interfaces/cc/gcc/compiler.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_compiler_
-#define _h_compiler_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_compiler_ */
-
diff --git a/interfaces/cc/gcc/fat86/arch-impl.h b/interfaces/cc/gcc/fat86/arch-impl.h
deleted file mode 100644
index 1642a48..0000000
--- a/interfaces/cc/gcc/fat86/arch-impl.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#if _ARCH_BITS == 32
-#include "../i386/arch-impl.h"
-#elif _ARCH_BITS == 64
-#include "../x86_64/arch-impl.h"
-#else
-#error "_ARCH_BITS not defined to be 32 or 64"
-#endif
diff --git a/interfaces/cc/gcc/fat86/atomic.h b/interfaces/cc/gcc/fat86/atomic.h
deleted file mode 100644
index be41a38..0000000
--- a/interfaces/cc/gcc/fat86/atomic.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#if _ARCH_BITS == 32
-#include "../i386/atomic.h"
-#elif _ARCH_BITS == 64
-#include "../x86_64/atomic.h"
-#else
-#error "_ARCH_BITS not defined to be 32 or 64"
-#endif
diff --git a/interfaces/cc/gcc/fat86/atomic32.h b/interfaces/cc/gcc/fat86/atomic32.h
deleted file mode 100644
index 53fa52c..0000000
--- a/interfaces/cc/gcc/fat86/atomic32.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _ARCH_BITS
-#define _ARCH_BITS __SIZEOF_POINTER__*__CHAR_BIT__
-#endif
-
-#if _ARCH_BITS == 32
-#include "../i386/atomic32.h"
-#elif _ARCH_BITS == 64
-#include "../x86_64/atomic32.h"
-#else
-#error "_ARCH_BITS not defined to be 32 or 64"
-#endif
diff --git a/interfaces/cc/gcc/fat86/atomic64.h b/interfaces/cc/gcc/fat86/atomic64.h
deleted file mode 100644
index c2a0eaf..0000000
--- a/interfaces/cc/gcc/fat86/atomic64.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#if _ARCH_BITS == 32
-#elif _ARCH_BITS == 64
-#include "../x86_64/atomic64.h"
-#else
-#error "_ARCH_BITS not defined to be 32 or 64"
-#endif
diff --git a/interfaces/cc/gcc/fat86/bitstr.h b/interfaces/cc/gcc/fat86/bitstr.h
deleted file mode 100644
index 89beb5d..0000000
--- a/interfaces/cc/gcc/fat86/bitstr.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#if _ARCH_BITS == 32
-#include "../i386/bitstr.h"
-#elif _ARCH_BITS == 64
-#include "../x86_64/bitstr.h"
-#else
-#error "_ARCH_BITS not defined to be 32 or 64"
-#endif
diff --git a/interfaces/cc/gcc/fat86/byteswap.h b/interfaces/cc/gcc/fat86/byteswap.h
deleted file mode 100644
index 49fde67..0000000
--- a/interfaces/cc/gcc/fat86/byteswap.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#if _ARCH_BITS == 32
-#include "../i386/byteswap.h"
-#elif _ARCH_BITS == 64
-#include "../x86_64/byteswap.h"
-#else
-#error "_ARCH_BITS not defined to be 32 or 64"
-#endif
diff --git a/interfaces/cc/gcc/fat86/strtol.h b/interfaces/cc/gcc/fat86/strtol.h
deleted file mode 100644
index 79970a1..0000000
--- a/interfaces/cc/gcc/fat86/strtol.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#if _ARCH_BITS == 32
-#include "../i386/strtol.h"
-#elif _ARCH_BITS == 64
-#include "../x86_64/strtol.h"
-#else
-#error "_ARCH_BITS not defined to be 32 or 64"
-#endif
diff --git a/interfaces/cc/gcc/i386/arch-impl.h b/interfaces/cc/gcc/i386/arch-impl.h
deleted file mode 100644
index 9389218..0000000
--- a/interfaces/cc/gcc/i386/arch-impl.h
+++ /dev/null
@@ -1,488 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_arch_impl_
-#define _h_arch_impl_
-
-#include <stdint.h>
-
-#ifndef USE_GCC_BUILTIN
-#define USE_GCC_BUILTIN 1
-#endif
-
-#if USE_GCC_BUILTIN
-#include <strings.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-static __inline__
-int16_t uint16_lsbit ( uint16_t self )
-{
-    int16_t rtn;
-#if USE_GCC_BUILTIN
-    rtn = ( int16_t ) __builtin_ffs ( self ) - 1;
-#else
-    __asm__ __volatile__
-    (
-        "bsf %%ax, %%ax;"
-        "jnz 1f;"
-        "xor %%eax, %%eax;"
-        "dec %%eax;"
-        "1:"
-        : "=a" ( rtn )
-        : "a" ( self )
-    );
-#endif
-    return rtn;
-}
-
-static __inline__
-int32_t uint32_lsbit ( uint32_t self )
-{
-    int32_t rtn;
-#if USE_GCC_BUILTIN
-    rtn = __builtin_ffs ( self ) - 1;
-#else
-    __asm__ __volatile__
-    (
-        "bsf %%eax, %%eax;"
-        "jnz 1f;"
-        "xor %%eax, %%eax;"
-        "dec %%eax;"
-        "1:"
-        : "=a" ( rtn )
-        : "a" ( self )
-    );
-#endif
-    return rtn;
-}
-
-static __inline__
-int16_t uint16_msbit ( uint16_t self )
-{
-    int16_t rtn;
-#if USE_GCC_BUILTIN
-    if ( self == 0 ) return -1;
-    rtn = ( int16_t ) 31 - __builtin_clz ( ( uint32_t ) self );
-#else
-    __asm__ __volatile__
-    (
-        "bsr %%ax, %%ax;"
-        "jnz 1f;"
-        "xor %%eax, %%eax;"
-        "dec %%eax;"
-        "1:"
-        : "=a" ( rtn )
-        : "a" ( self )
-    );
-#endif
-    return rtn;
-}
-
-static __inline__
-int32_t uint32_msbit ( uint32_t self )
-{
-    int32_t rtn;
-#if USE_GCC_BUILTIN
-    if ( self == 0 ) return -1;
-    rtn = 31 - __builtin_clz ( self );
-#else
-    __asm__ __volatile__
-    (
-        "bsr %%eax, %%eax;"
-        "jnz 1f;"
-        "xor %%eax, %%eax;"
-        "dec %%eax;"
-        "1:"
-        : "=a" ( rtn )
-        : "a" ( self )
-    );
-#endif
-    return rtn;
-}
-
-typedef struct int128_t int128_t;
-struct int128_t
-{
-    uint64_t lo;
-    int64_t hi;
-};
-
-static __inline__
-int64_t int128_hi ( const int128_t *self )
-{
-    return self -> hi;
-}
-
-static __inline__
-uint64_t int128_lo ( const int128_t *self )
-{
-    return self -> lo;
-}
-
-static __inline__
-void int128_sethi ( int128_t *self, int64_t i )
-{
-    self -> hi = i;
-}
-
-static __inline__
-void int128_setlo ( int128_t *self, uint64_t i )
-{
-    self -> lo = i;
-}
-
-typedef struct uint128_t uint128_t;
-struct uint128_t
-{
-    uint64_t lo;
-    uint64_t hi;
-};
-
-static __inline__
-uint64_t uint128_hi ( const uint128_t *self )
-{
-    return self -> hi;
-}
-
-static __inline__
-uint64_t uint128_lo ( const uint128_t *self )
-{
-    return self -> lo;
-}
-
-static __inline__
-void uint128_sethi ( uint128_t *self, uint64_t i )
-{
-    self -> hi = i;
-}
-
-static __inline__
-void uint128_setlo ( uint128_t *self, uint64_t i )
-{
-    self -> lo = i;
-}
-
-static __inline__
-void int128_add ( int128_t *self, const int128_t *i )
-{
-    __asm__ __volatile__
-    (
-        "push %%ebx;"
-        "mov (%%edx), %%eax;"
-        "mov 4(%%edx), %%ebx;"
-        "mov 8(%%edx), %%esi;"
-        "mov 12(%%edx), %%edi;"
-        "add %%eax, (%%ecx);"
-        "adc %%ebx, 4(%%ecx);"
-        "adc %%esi, 8(%%ecx);"
-        "adc %%edi, 12(%%ecx);"
-        "pop %%ebx;"
-        :
-        : "c" ( self ), "d" ( i )
-        : "%eax", "%esi", "%edi"
-    );
-}
-
-static __inline__
-void int128_sub ( int128_t *self, const int128_t *i )
-{
-    __asm__ __volatile__
-    (
-        "push %%ebx;"
-        "mov (%%edx), %%eax;"
-        "mov 4(%%edx), %%ebx;"
-        "mov 8(%%edx), %%esi;"
-        "mov 12(%%edx), %%edi;"
-        "sub %%eax, (%%ecx);"
-        "sbb %%ebx, 4(%%ecx);"
-        "sbb %%esi, 8(%%ecx);"
-        "sbb %%edi, 12(%%ecx);"
-        "pop %%ebx;"
-        :
-        : "c" ( self ), "d" ( i )
-        : "%eax", "%esi", "%edi"
-    );
-}
-
-static __inline__
-void int128_sar ( int128_t *self, uint32_t i )
-{
-    __asm__ __volatile__
-    (
-        "mov 4(%%edx), %%eax;"
-        "shrd %%cl, %%eax, (%%edx);"
-        "mov 8(%%edx), %%eax;"
-        "shrd %%cl, %%eax, 4(%%edx);"
-        "mov 12(%%edx), %%eax;"
-        "shrd %%cl, %%eax, 8(%%edx);"
-        "sar %%cl, %%eax;"
-        "mov %%eax, 12(%%edx);"
-        :
-        : "d" ( self ), "c" ( i )
-        :  "%eax"
-    );
-}
-
-static __inline__
-void int128_shl ( int128_t *self, uint32_t i )
-{
-    __asm__ __volatile__
-    (
-        "mov 8(%%edx), %%eax;"
-        "shld %%cl, %%eax, 12(%%edx);"
-        "mov 4(%%edx), %%eax;"
-        "shld %%cl, %%eax, 8(%%edx);"
-        "mov (%%edx), %%eax;"
-        "shld %%cl, %%eax, 4(%%edx);"
-        "shl %%cl, %%eax;"
-        "mov %%eax, (%%edx);"
-        :
-        : "d" ( self ), "c" ( i )
-        :  "%eax"
-    );
-}
-
-static __inline__
-void uint128_and ( uint128_t *self, const uint128_t *i )
-{
-    __asm__ __volatile__
-    (
-        "push %%ebx;"
-        "mov (%%edx), %%eax;"
-        "mov 4(%%edx), %%ebx;"
-        "mov 8(%%edx), %%esi;"
-        "mov 12(%%edx), %%edi;"
-        "and %%eax, (%%ecx);"
-        "and %%ebx, 4(%%ecx);"
-        "and %%esi, 8(%%ecx);"
-        "and %%edi, 12(%%ecx);"
-        "pop %%ebx;"
-        :
-        : "c" ( self ), "d" ( i )
-        : "%eax", "%esi", "%edi"
-    );
-}
-
-static __inline__
-void uint128_or ( uint128_t *self, const uint128_t *i )
-{
-    __asm__ __volatile__
-    (
-        "push %%ebx;"
-        "mov (%%edx), %%eax;"
-        "mov 4(%%edx), %%ebx;"
-        "mov 8(%%edx), %%esi;"
-        "mov 12(%%edx), %%edi;"
-        "or %%eax, (%%ecx);"
-        "or %%ebx, 4(%%ecx);"
-        "or %%esi, 8(%%ecx);"
-        "or %%edi, 12(%%ecx);"
-        "pop %%ebx;"
-        :
-        : "c" ( self ), "d" ( i )
-        : "%eax", "%esi", "%edi"
-    );
-}
-
-static __inline__
-void uint128_orlo ( uint128_t *self, uint64_t i )
-{
-    self -> lo |= i;
-}
-
-static __inline__
-void uint128_xor ( uint128_t *self, const uint128_t *i )
-{
-    __asm__ __volatile__
-    (
-        "push %%ebx;"
-        "mov (%%edx), %%eax;"
-        "mov 4(%%edx), %%ebx;"
-        "mov 8(%%edx), %%esi;"
-        "mov 12(%%edx), %%edi;"
-        "xor %%eax, (%%ecx);"
-        "xor %%ebx, 4(%%ecx);"
-        "xor %%esi, 8(%%ecx);"
-        "xor %%edi, 12(%%ecx);"
-        "pop %%ebx;"
-        :
-        : "c" ( self ), "d" ( i )
-        : "%eax", "%esi", "%edi"
-    );
-}
-
-static __inline__
-void uint128_not ( uint128_t *self )
-{
-    __asm__ __volatile__
-    (
-        "notl (%%ecx);"
-        "notl 4(%%ecx);"
-        "notl 8(%%ecx);"
-        "notl 12(%%ecx);"
-        :
-        : "c" ( self )
-    );
-}
-
-static __inline__
-void uint128_shr ( uint128_t *self, uint32_t i )
-{
-    __asm__ __volatile__
-    (
-        "mov 4(%%edx), %%eax;"
-        "shrd %%cl, %%eax, (%%edx);"
-        "mov 8(%%edx), %%eax;"
-        "shrd %%cl, %%eax, 4(%%edx);"
-        "mov 12(%%edx), %%eax;"
-        "shrd %%cl, %%eax, 8(%%edx);"
-        "shr %%cl, %%eax;"
-        "mov %%eax, 12(%%edx);"
-        :
-        : "d" ( self ), "c" ( i )
-        :  "%eax"
-    );
-}
-
-static __inline__
-void uint128_shl ( uint128_t *self, uint32_t i )
-{
-    __asm__ __volatile__
-    (
-        "mov 8(%%edx), %%eax;"
-        "shld %%cl, %%eax, 12(%%edx);"
-        "mov 4(%%edx), %%eax;"
-        "shld %%cl, %%eax, 8(%%edx);"
-        "mov (%%edx), %%eax;"
-        "shld %%cl, %%eax, 4(%%edx);"
-        "shl %%cl, %%eax;"
-        "mov %%eax, (%%edx);"
-        :
-        : "d" ( self ), "c" ( i )
-        :  "%eax"
-    );
-}
-
-static __inline__
-void uint128_bswap ( uint128_t *self )
-{
-    __asm__ __volatile__
-    (
-        "mov (%%ecx), %%eax;"
-        "mov 12(%%ecx), %%edx;"
-        "bswap %%eax;"
-        "bswap %%edx;"
-        "mov %%eax, 12(%%ecx);"
-        "mov %%edx, (%%ecx);"
-        "mov 4(%%ecx), %%eax;"
-        "mov 8(%%ecx), %%edx;"
-        "bswap %%eax;"
-        "bswap %%edx;"
-        "mov %%eax, 8(%%ecx);"
-        "mov %%edx, 4(%%ecx);"
-        :
-        : "c" ( self )
-        :  "%eax", "%edx"
-    );
-}
-
-static __inline__
-void uint128_bswap_copy ( uint128_t *to, const uint128_t *from )
-{
-    __asm__ __volatile__
-    (
-        "push %%ebx;"
-        "mov (%%edx), %%eax;"
-        "mov 12(%%edx), %%ebx;"
-        "bswap %%eax;"
-        "bswap %%ebx;"
-        "mov %%eax, 12(%%ecx);"
-        "mov %%ebx, (%%ecx);"
-        "mov 4(%%edx), %%eax;"
-        "mov 8(%%edx), %%ebx;"
-        "bswap %%eax;"
-        "bswap %%ebx;"
-        "mov %%eax, 8(%%ecx);"
-        "mov %%ebx, 4(%%ecx);"
-        "pop %%ebx;"
-        :
-        : "c" ( to ), "d" ( from )
-        :  "%eax"
-    );
-}
-
-static __inline__
-uint32_t uint32_rol ( uint32_t val, uint8_t bits )
-{
-    uint32_t rtn;
-    __asm__ __volatile__
-    (
-        "rol %%cl, %%eax;"
-        : "=a" ( rtn )
-        : "a" ( val ), "c" ( bits )
-    );
-    return rtn;
-}
-
-static __inline__
-uint32_t uint32_ror ( uint32_t val, uint8_t bits )
-{
-    uint32_t rtn;
-    __asm__ __volatile__
-    (
-        "ror %%cl, %%eax;"
-        : "=a" ( rtn )
-        : "a" ( val ), "c" ( bits )
-    );
-    return rtn;
-}
-
-static __inline__
-uint64_t uint64_rol ( uint64_t val, uint8_t bits )
-{
-    uint64_t rtn;
-    rtn = ( val << bits ) | ( val >> ( 64 - bits ) );
-    return rtn;
-}
-
-static __inline__
-uint64_t uint64_ror ( uint64_t val, uint8_t bits )
-{
-    uint64_t rtn;
-    rtn = ( val >> bits ) | ( val << ( 64 - bits ) );
-    return rtn;
-}
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_arch_impl_ */
diff --git a/interfaces/cc/gcc/i386/atomic.h b/interfaces/cc/gcc/i386/atomic.h
deleted file mode 100644
index d0ea50d..0000000
--- a/interfaces/cc/gcc/i386/atomic.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_atomic_
-#define _h_atomic_
-
-#ifndef _h_atomic32_
-#include "atomic32.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef int atomic_int;
-typedef struct atomic32_t atomic_t;
-
-typedef struct atomic_ptr_t atomic_ptr_t;
-struct atomic_ptr_t
-{
-    void * volatile ptr;
-};
-
-/* ( * v ) */
-#define atomic_read( v ) \
-    atomic32_read ( v )
-
-/* ( * v ) = i */
-#define atomic_set( v, i ) \
-    atomic32_set ( v, i )
-
-/* prior = ( * v ), ( * v ) += i, prior */
-#define atomic_read_and_add( v, i ) \
-    atomic32_read_and_add ( v, i )
-
-/* ( * v ) += i */
-#define atomic_add( v, i ) \
-    atomic32_add ( v, i )
-
-/* ( * v ) += i */
-#define atomic_add_and_read( v, i ) \
-    atomic32_add_and_read ( v, i )
-
-/* ( void ) ++ ( * v ) */
-#define atomic_inc( v ) \
-    atomic32_inc ( v )
-
-/* ( void ) -- ( * v ) */
-#define atomic_dec( v ) \
-    atomic32_dec ( v )
-
-/* -- ( * v ) == 0 */
-#define atomic_dec_and_test( v ) \
-    atomic32_dec_and_test ( v )
-
-/* ++ ( * v ) == 0
-   when atomic_dec_and_test uses predecrement, you want
-   postincrement to this function. so it isn't very useful */
-#define atomic_inc_and_test( v ) \
-    atomic32_inc_and_test ( v )
-
-/* ( * v ) -- == 0
-   HERE's useful */
-#define atomic_test_and_inc( v ) \
-    atomic32_test_and_inc ( v )
-
-/* prior = ( * v ), ( * v ) = ( prior == t ? s : prior ), prior */
-#define atomic_test_and_set( v, s, t ) \
-    atomic32_test_and_set ( v, s, t )
-
-/* N.B. - THIS FUNCTION IS FOR 32 BIT PTRS ONLY */
-static __inline__
-void *atomic_test_and_set_ptr ( atomic_ptr_t *v, void *s, void *t )
-{
-    void *rtn;
-    __asm__ __volatile__
-    (
-        "lock;"
-        "cmpxchg %%edx,(%%ecx)"
-        : "=a" ( rtn ), "=c" ( v )
-        : "c" ( v ), "d" ( s ), "a" ( t )
-    );
-    return rtn;
-}
-
-/* val = ( * v ), ( ( * v ) = ( val < t ) ? val + i : val ), val */
-#define atomic_read_and_add_lt( v, i, t ) \
-    atomic32_read_and_add_lt ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val <= t ) ? val + i : val ), val */
-#define atomic_read_and_add_le( v, i, t ) \
-    atomic32_read_and_add_le ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val == t ) ? val + i : val ), val */
-#define atomic_read_and_add_eq( v, i, t ) \
-    atomic32_read_and_add_eq ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val != t ) ? val + i : val ), val */
-#define atomic_read_and_add_ne( v, i, t ) \
-    atomic32_read_and_add_ne ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val >= t ) ? val + i : val ), val */
-#define atomic_read_and_add_ge( v, i, t ) \
-    atomic32_read_and_add_ge ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val > t ) ? val + i : val ), val */
-#define atomic_read_and_add_gt( v, i, t ) \
-    atomic32_read_and_add_gt ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( ( val & 1 ) == 1 ) ? val + i : val ), val */
-#define atomic_read_and_add_odd( v, i ) \
-    atomic32_read_and_add_odd ( v, i )
-
-/* val = ( * v ), ( ( * v ) = ( ( val & 1 ) == 0 ) ? val + i : val ), val */
-#define atomic_read_and_add_even( v, i ) \
-    atomic32_read_and_add_even ( v, i )
-
-/* DEPRECATED */
-
-/* val = ( * v ), ( * v ) = ( val < t ? val + i : val ), ( val < t ? 1 : 0 ) */
-#define atomic_add_if_lt( v, i, t ) \
-    atomic32_add_if_lt ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val <= t ? val + i : val ), ( val <= t ? 1 : 0 ) */
-#define atomic_add_if_le( v, i, t ) \
-    atomic32_add_if_le ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val == t ? val + i : val ), ( val == t ? 1 : 0 ) */
-#define atomic_add_if_eq( v, i, t ) \
-    atomic32_add_if_eq ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val >= t ? val + i : val ), ( val >= t ? 1 : 0 ) */
-#define atomic_add_if_ge( v, i, t ) \
-    atomic32_add_if_ge ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val > t ? val + i : val ), ( val > t ? 1 : 0 ) */
-#define atomic_add_if_gt( v, i, t ) \
-    atomic32_add_if_gt ( v, i, t )
-
-#undef LOCK
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_atomic_ */
diff --git a/interfaces/cc/gcc/i386/atomic32.h b/interfaces/cc/gcc/i386/atomic32.h
deleted file mode 100644
index a5e53e8..0000000
--- a/interfaces/cc/gcc/i386/atomic32.h
+++ /dev/null
@@ -1,366 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_atomic32_
-#define _h_atomic32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Make sure gcc doesn't try to be clever and move things around
- * on us. We need to use _exactly_ the address the user gave us,
- * not some alias that contains the same information.
- */
-typedef struct atomic32_t atomic32_t;
-struct atomic32_t
-{
-    volatile int counter;
-};
-
-/* int atomic32_read ( const atomic32_t *v ); */
-#define atomic32_read( v ) \
-    ( ( v ) -> counter )
-
-/* void atomic32_set ( atomic32_t *v, int i ); */
-#define atomic32_set( v, i ) \
-    ( ( void ) ( ( ( v ) -> counter ) = ( i ) ) )
-
-/* add to v -> counter and return the prior value */
-static __inline__ int atomic32_read_and_add ( atomic32_t *v, int i )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "mov %3, %1;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i )
-    );
-    return rtn;
-}
-
-/* if no read is needed, define the least expensive atomic add */
-#define atomic32_add( v, i ) \
-    atomic32_read_and_add ( v, i )
-
-/* add to v -> counter and return the result */
-static __inline__ int atomic32_add_and_read ( atomic32_t *v, int i )
-{
-    int rtn, cmp;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "mov %3, %1;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1,(%2);"
-        "jne 1b;"
-        : "=&a" ( cmp ), "=&r" ( rtn )
-        : "r" ( & v -> counter ), "r" ( i )
-    );
-    return rtn;
-}
-
-/* just don't try to find out what the result was */
-static __inline__ void atomic32_inc ( atomic32_t *v )
-{
-    __asm__ __volatile__
-    (
-    "lock;"
-        "incl %0"
-        : "=m" ( v -> counter )
-        : "m" ( v -> counter )
-    );
-}
-
-static __inline__ void atomic32_dec ( atomic32_t *v )
-{
-    __asm__ __volatile__
-    (
-    "lock;"
-        "decl %0"
-        : "=m" ( v -> counter )
-        : "m" ( v -> counter )
-    );
-}
-
-/* decrement by one and test result for 0 */
-static __inline__ int atomic32_dec_and_test ( atomic32_t *v )
-{
-    unsigned char c;
-    __asm__ __volatile__
-    (
-    "lock;"
-        "decl %1;"
-        "sete %0"
-        : "=r" ( c ), "=m" ( v -> counter )
-        : "m" ( v -> counter )
-    );
-    return c;
-}
-
-/* when atomic32_dec_and_test uses predecrement, you want
-   postincrement to this function. so it isn't very useful */
-static __inline__ int atomic32_inc_and_test ( atomic32_t *v )
-{
-    unsigned char c;
-    __asm__ __volatile__
-    (
-    "lock;"
-        "incl %1;"
-        "sete %0"
-        : "=r" ( c ), "=m" ( v -> counter )
-        : "m" ( v -> counter )
-    );
-    return c;
-}
-
-/* HERE's useful */
-#define atomic32_test_and_inc( v ) \
-    ( atomic32_read_and_add ( v, 1 ) == 0 )
-
-static __inline__ int atomic32_test_and_set ( atomic32_t *v, int s, int t )
-{
-    int rtn;
-    __asm__ __volatile__
-    (
-    "lock;"
-        "cmpxchg %2, (%1)"
-        : "=a" ( rtn )
-        : "r" ( & v -> counter ), "r" ( s ), "a" ( t )
-    );
-    return rtn;
-}
-
-/* conditional modifications */
-static __inline__
-int atomic32_read_and_add_lt ( atomic32_t *v, int i, int t )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "jge 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic32_add_if_lt( v, i, t ) \
-    ( atomic32_read_and_add_lt ( v, i, t ) < ( t ) )
-
-static __inline__
-int atomic32_read_and_add_le ( atomic32_t *v, int i, int t )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "jg 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic32_add_if_le( v, i, t ) \
-    ( atomic32_read_and_add_le ( v, i, t ) <= ( t ) )
-
-static __inline__
-int atomic32_read_and_add_eq ( atomic32_t *v, int i, int t )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "jne 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic32_add_if_eq( v, i, t ) \
-    ( atomic32_read_and_add_eq ( v, i, t ) == ( t ) )
-
-static __inline__
-int atomic32_read_and_add_ne ( atomic32_t *v, int i, int t )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "je 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic32_add_if_ne( v, i, t ) \
-    ( atomic32_read_and_add_ne ( v, i, t ) != ( t ) )
-
-static __inline__
-int atomic32_read_and_add_ge ( atomic32_t *v, int i, int t )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "jl 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic32_add_if_ge( v, i, t ) \
-    ( atomic32_read_and_add_ge ( v, i, t ) >= ( t ) )
-
-static __inline__
-int atomic32_read_and_add_gt ( atomic32_t *v, int i, int t )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "jle 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic32_add_if_gt( v, i, t ) \
-    ( atomic32_read_and_add_gt ( v, i, t ) > ( t ) )
-
-static __inline__
-int atomic32_read_and_add_odd ( atomic32_t *v, int i )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "bt $0, %0;"
-        "mov %3, %1;"
-        "jnc 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i )
-    );
-    return rtn;
-}
-
-static __inline__
-int atomic32_read_and_add_even ( atomic32_t *v, int i )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "bt $0, %0;"
-        "mov %3, %1;"
-        "jc 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i )
-    );
-    return rtn;
-}
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_atomic32_ */
diff --git a/interfaces/cc/gcc/i386/bitstr.h b/interfaces/cc/gcc/i386/bitstr.h
deleted file mode 100644
index a2e07ef..0000000
--- a/interfaces/cc/gcc/i386/bitstr.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_bitstr_
-#define _h_bitstr_
-
-/* use 32-bit accumulator, 16-bit word size */
-#define WRDSIZE 16
-#define WRDSHIFT 4
-#define WRD uint16_t
-#define ACC uint32_t
-#define BSWAP( x ) bswap_16 ( x )
-
-#include "../noarch/bitstr.h"
-
-#endif /* _h_bitstr_ */
diff --git a/interfaces/cc/gcc/i386/byteswap.h b/interfaces/cc/gcc/i386/byteswap.h
deleted file mode 100644
index 3cc5770..0000000
--- a/interfaces/cc/gcc/i386/byteswap.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_byteswap_
-#define _h_byteswap_
-
-#ifdef _BYTESWAP_H
-#warning "GNU byteswap.h being used"
-#else
-#define _BYTESWAP_H	1234
-
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* perform single instruction byte swap */
-static __inline__ uint16_t bswap_16 ( uint16_t i )
-{
-    register uint16_t rtn;
-    __asm__
-    (
-        "rorw $8, %w0"
-        : "=r" ( rtn )
-        : "0" ( i )
-        : "cc"
-    );
-    return rtn;
-}
-
-/* perform single instruction byte swap */
-static __inline__ uint32_t bswap_32 ( uint32_t i )
-{
-    register uint32_t rtn;
-    __asm__
-    (
-        "bswap %0"
-        : "=r" ( rtn )
-        : "0" ( i )
-        : "cc"
-    );
-    return rtn;
-}
-
-/* perform multi-instruction byte swap */
-static __inline__ uint64_t bswap_64 ( uint64_t i )
-{
-    union
-    {
-        uint64_t ll;
-        uint32_t l [ 2 ];
-    } in, rtn;
-    in . ll = i;
-    rtn . l [ 0 ] = bswap_32 ( in . l [ 1 ] );
-    rtn . l [ 1 ] = bswap_32 ( in . l [ 0 ] );
-    return rtn . ll;
-}
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _BYTESWAP_H */
-#endif /* _h_byteswap_ */
diff --git a/interfaces/cc/gcc/i386/strtol.h b/interfaces/cc/gcc/i386/strtol.h
deleted file mode 100644
index 79f462f..0000000
--- a/interfaces/cc/gcc/i386/strtol.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_strtol_
-#define _h_strtol_
-
-#ifndef _h_os_native_
-#include <os-native.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * strtoi32
- * strtoi32
- *  based upon actual usage
- */
-#define strtoi32( str, endp, base ) \
-    strtol ( str, endp, base )
-
-#define strtou32( str, endp, base ) \
-    strtoul ( str, endp, base )
-
-
-/*--------------------------------------------------------------------------
- * strtoi64
- * strtoi64
- *  based upon actual usage
- */
-#define strtoi64( str, endp, base ) \
-    strtoll ( str, endp, base )
-
-#define strtou64( str, endp, base ) \
-    strtoull ( str, endp, base )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_strtol_ */
diff --git a/interfaces/cc/gcc/noarch/bitstr.h b/interfaces/cc/gcc/noarch/bitstr.h
deleted file mode 100644
index 2bb5bd0..0000000
--- a/interfaces/cc/gcc/noarch/bitstr.h
+++ /dev/null
@@ -1,413 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_noarch_bitstr_
-#define _h_noarch_bitstr_
-
-#ifndef _h_bitstr_
-#error "don't include <noarch/bitstr.h> directly - use <bitstr.h>"
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <byteswap.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* bitcpy
- *  copy a string of bits from source to dest
- *
- *  both source and dest may have non-byte aligned pointers
- *  the number of bits to copy need not be byte aligned
- *
- *  depending upon architecture and OS conventions, the word
- *  size may be adjusted to 1, 2, or 4 bytes, where the base
- *  pointers are always word aligned.
- *
- *  bits in memory are always treated as big-endian, meaning
- *  that on multi-byte fetches and stores, we perform byte-swapping
- *  if there are shifts or masks
- */
-static __inline__
-void bitcpy ( void *dbase, bitsz_t doff, const void *sbase, bitsz_t soff, bitsz_t sz )
-{
-    /* noop if sz == 0 */
-    if ( sz != 0 )
-    {
-        /* loop counter and destination word count */
-        size_t i, dcountz;
-
-        /* left & right masks and working register */
-        WRD lmask, rmask, reg;
-
-        /* produce word-aligned pointers */
-#if WRDSIZE == 8
-        /* 1-4. all at once */
-        WRD *dst = ( WRD* ) dbase + ( doff >> WRDSHIFT );
-        const WRD *src = ( const WRD* ) sbase + ( soff >> WRDSHIFT );
-#else
-        /* 1. capture word alignment adjustment */
-        size_t dadjust = ( size_t ) dbase & ( WRDSIZE / 8 - 1 );
-        size_t sadjust = ( size_t ) sbase & ( WRDSIZE / 8 - 1 );
-
-        /* 2. create word-aligned pointers */
-        WRD *dst = ( WRD* ) ( ( size_t ) dbase - dadjust );
-        const WRD *src = ( const WRD* ) ( ( size_t ) sbase - sadjust );
-
-        /* 3. incorporate alignment adjustment into offset bits */
-        doff += dadjust << 3;
-        soff += sadjust << 3;
-
-        /* 4. readjust pointers based upon offset */
-        dst += doff >> WRDSHIFT;
-        src += soff >> WRDSHIFT;
-#endif
-        /* 5. restate offsets */
-        doff &= ( WRDSIZE - 1 );
-        soff &= ( WRDSIZE - 1 );
-
-        /* calculate number of words - 1 in dst */
-        dcountz = ( doff + sz + ( WRDSIZE - 1 ) - WRDSIZE ) >> WRDSHIFT;
-
-        /* calculate masks */
-        lmask = rmask = ~ 0;
-        lmask >>= doff;
-        rmask >>= ( doff + sz ) & ( WRDSIZE - 1 );
-        if ( ( WRD ) ( rmask + 1 ) == 0 )
-            rmask = 0;
-
-        /* prime register with masked dst [ 0 ] */
-        reg = BSWAP ( dst [ 0 ] ) & ~ lmask;
-
-        /* if source and destination are aligned */
-        if ( doff == soff )
-        {
-            /* merge src [ 0 ] into reg through mask */
-            reg |= BSWAP ( src [ 0 ] ) & lmask;
-
-#if WRDSIZE > 8
-            /* straight copies don't need byteswap                                                                                                                                                           
-               other than on first and last words                                                                                                                                                            
-               put first word back into little-endian                                                                                                                                                        
-               for remainder of loop */
-            if ( dcountz > 0 )
-            {
-                reg = BSWAP ( reg );
-#endif
-                /* aligned buffers have n:n word ratio */
-                for ( i = 0; i < dcountz; )
-                {
-                    dst [ i ] = reg;
-                    reg = src [ ++ i ];
-                }
-
-#if WRDSIZE > 8
-                /* revert to big-endian */
-                reg = BSWAP ( reg );
-            }
-#endif
-        }
-
-        /* shifting alignment  */
-        else
-        {
-            /* source count may differ from dest count */
-            size_t scountz = ( soff + sz + ( WRDSIZE - 1 ) - WRDSIZE ) >> WRDSHIFT;
-
-            /* use double-word accumulator */
-            ACC acc = BSWAP ( src [ 0 ] );
-
-            /* shift amount */
-            int shift = ( int ) doff - ( int ) soff;
-            if ( shift > 0 )
-            {
-                /* take only valid bits in shifted initial src */
-                reg |= ( WRD ) ( acc >> shift ) & lmask;
-
-                /* because "shift" > 0, we know "dcountz" >= "scountz" */
-                for ( acc <<= WRDSIZE, i = 0; i < scountz; acc <<= WRDSIZE )
-                {
-                    dst [ i ] = BSWAP ( reg );
-                    ++ i;
-                    acc |= BSWAP ( src [ i ] );
-                    reg = ( WRD ) ( acc >> shift );
-                }
-
-                /* if "dcountz" > "scountz" */
-                if ( i < dcountz )
-                {
-                    dst [ i ] = BSWAP ( reg );
-                    reg = ( WRD ) ( acc >> shift );
-                }
-            }
-
-            else
-            {
-                /* need single word read-ahead and right-shift */
-                shift += WRDSIZE;
-
-                /* because "shift" was < 0, we know "dcountz" <= "scountz" */
-                for ( acc <<= WRDSIZE, i = 0; i < dcountz; acc <<= WRDSIZE )
-                {
-                    acc |= BSWAP ( src [ i + 1 ] );
-                    reg |= ( WRD ) ( acc >> shift ) & lmask;
-                    dst [ i ++ ] = BSWAP ( reg );
-                    lmask = ~ 0;
-                    reg = 0;
-                }
-
-                /* if "dcountz" < "scountz" */
-                if ( i < scountz )
-                    acc |= BSWAP ( src [ scountz ] );
-
-                reg |= ( WRD ) ( acc >> shift ) & lmask;
-            }
-        }
-
-        /* mask off unused bytes from src */
-        reg &= ~ rmask;
-
-        /* bring in saved bits from dst */
-        reg |= BSWAP ( dst [ dcountz ] ) & rmask;
-
-        /* write out last word */
-        dst [ dcountz ] = BSWAP ( reg );
-    }
-}
-
-/* bitcmp
- *  performs bitwise a - b, returning result as int
- *  result value has no meaning, only sign
- *  where < 0 means a < b, > 0 means a > b, and 0 means a == b
- *
- *  since the comparison produces a tri-state indicator of
- *  relative magnitude, the order of "a" and "b" is important.
- *  furthermore, the difference operator must be evaluated
- *  left to right, because the result indicates more than
- *  equality.
- *
- *  see bitcpy for general word alignment information
- */
-static __inline__
-int bitcmp ( const void *abase, bitsz_t aoff, const void *bbase, bitsz_t boff, bitsz_t sz )
-{
-    int diff = 0;
-
-    if ( sz != 0 )
-    {
-        /* loop counter and left word count */
-        size_t i, lcountz;
-
-        /* left & right masks and working registers */
-        WRD lmask, rmask, lreg, rreg;
-
-        /* produce word-aligned pointers */
-#if WRDSIZE == 8
-        /* 1-4. all at once */
-        const WRD *left = ( const WRD* ) abase + ( aoff >> WRDSHIFT );
-        const WRD *right = ( const WRD* ) bbase + ( boff >> WRDSHIFT );
-#else
-        /* 1. capture word alignment adjustment */
-        size_t aadjust = ( size_t ) abase & ( WRDSIZE / 8 - 1 );
-        size_t badjust = ( size_t ) bbase & ( WRDSIZE / 8 - 1 );
-
-        /* 2. create word-aligned pointers */
-        const WRD *left = ( const WRD* ) ( ( size_t ) abase - aadjust );
-        const WRD *right = ( const WRD* ) ( ( size_t ) bbase - badjust );
-
-        /* 3. incorporate alignment adjustment into offset bits */
-        aoff += aadjust << 3;
-        boff += badjust << 3;
-
-        /* 4. readjust pointers based upon offset */
-        left += aoff >> WRDSHIFT;
-        right += boff >> WRDSHIFT;
-#endif
-        /* 5. restate offsets */
-        aoff &= ( WRDSIZE - 1 );
-        boff &= ( WRDSIZE - 1 );
-
-        /* calculate number of words - 1 in left
-           since we know a-priori that "sz" > 0, we
-           know that the left and right counts must be
-           at least 1. our loops treat the last word
-           specially, so calculate a loop counter that
-           excludes the last word */
-        lcountz = ( aoff + sz + ( WRDSIZE - 1 ) - WRDSIZE ) >> WRDSHIFT;
-
-        /* calculate masks */
-        lmask = rmask = ~ 0;
-        lmask >>= aoff;
-        rmask >>= ( aoff + sz ) & ( WRDSIZE - 1 );
-        if ( ( WRD ) ( rmask + 1 ) == 0 )
-            rmask = 0;
-
-        /* significant bits from left [ 0 ] */
-        lreg = BSWAP ( left [ 0 ] ) & lmask;
-
-        /* if source and destination are aligned */
-        if ( aoff == boff )
-        {
-            /* test against right bits through mask */
-            rreg = BSWAP ( right [ 0 ] ) & lmask;
-
-            /* produce a difference of all but the last
-               aligned word, where initial word has been
-               left-masked. the last word is tested below. */
-            for ( i = 1; i <= lcountz; ++ i )
-            {
-                diff = ( int ) lreg - ( int ) rreg;
-                if ( diff != 0 )
-                    return diff;
-
-                /* byte-swapping occurs on little-endian architectures */
-                lreg = BSWAP ( left [ i ] );
-                rreg = BSWAP ( right [ i ] );
-            }
-
-            /* fall out to end for masked comparison of last word */
-        }
-
-        /* shifting alignment */
-        else
-        {
-            /* right count may differ from left count
-               since alignments differ, the span of "sz"
-               bits may hit a different number of words in
-               the left array than in the right. */
-            size_t rcountz = ( boff + sz + ( WRDSIZE - 1 ) - WRDSIZE ) >> WRDSHIFT;
-
-            /* use double-word accumulator
-               note that the extra bits get ignored */
-            ACC acc = BSWAP ( right [ 0 ] );
-
-            /* shift amount: positive if "b" needs to be right shifted.
-               NOTE - since the comparison must be successively performed
-               from left to right ( see above ), shifting is ALWAYS toward
-               right, making for special handling when "shift" < 0 ( see below ) */
-            int shift = ( int ) aoff - ( int ) boff;
-            if ( shift > 0 )
-            {
-                /* initial word from right operand, aligned with left */
-                rreg = ( WRD ) ( acc >> shift ) & lmask;
-
-                /* "shift" > 0 means "lcountz" >= "rcountz" */
-                for ( acc <<= WRDSIZE, i = 1; i <= rcountz; acc <<= WRDSIZE, ++ i )
-                {
-                    /* compare words at i-1 */
-                    diff = ( int ) lreg - ( int ) rreg;
-                    if ( diff != 0 )
-                        return diff;
-
-                    /* accumulate next word from right operand */
-                    acc |= BSWAP ( right [ i ] );
-
-                    /* bring in next word from left operand */
-                    lreg = BSWAP ( left [ i ] );
-
-                    /* produce aligned word from right operand */
-                    rreg = ( WRD ) ( acc >> shift );
-                }
-
-                /* if there is one more word in left */
-                if ( lcountz > rcountz )
-                {
-                    /* compare penultimate */
-                    diff = ( int ) lreg - ( int ) rreg;
-                    if ( diff != 0 )
-                        return diff;
-
-                    /* get last word in left */
-                    lreg = BSWAP ( left [ lcountz ] );
-
-                    /* last word from right is already in "acc" */
-                    rreg = ( WRD ) ( acc >> shift );
-                }
-
-                /* fall out to end for masked comparison of last word */
-            }
-
-            else
-            {
-                /* since all shifts must be toward right ( due to left to right
-                   comparison ), this alignment will require a pre-fetch from
-                   right operand into accumulator, and adjusting the negative
-                   shift amount to a positive right-shift. */
-                shift += WRDSIZE;
-
-                /* since "shift" was negative, we know "lcountz" <= "rcountz",
-                   so use "lcountz" as loop limit. pre-shift "acc" as loop init */
-                for ( acc <<= WRDSIZE, i = 1; i <= lcountz; acc <<= WRDSIZE, ++ i )
-                {
-                    /* accumulate next word from right operand */
-                    acc |= BSWAP ( right [ i ] );
-
-                    /* produce aligned word from right operand */
-                    rreg = ( WRD ) ( acc >> shift ) & lmask;
-
-                    /* now test against left */
-                    diff = ( int ) lreg - ( int ) rreg;
-                    if ( diff != 0 )
-                        return diff;
-
-                    /* bring in next word from left operand */
-                    lreg = BSWAP ( left [ i ] );
-
-                    /* no more left mask */
-                    lmask = ~ 0;
-                }
-
-                /* if there is one more word in right */
-                if ( lcountz < rcountz )
-                    acc |= BSWAP ( right [ rcountz ] );
-
-                /* produce "rreg" from "acc" */
-                rreg = ( WRD ) ( acc >> shift ) & lmask;
-
-                /* fall out to end for masked comparison of last word */
-            }
-        }
-
-        /* mask off unused bytes from right */
-        lreg &= ~ rmask;
-        rreg &= ~ rmask;
-
-        /* perform final comparison */
-        diff = ( int ) lreg - ( int ) rreg;
-    }
-
-    return diff;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_noarch_bitstr_ */
diff --git a/interfaces/cc/gcc/ppc32/arch-impl.h b/interfaces/cc/gcc/ppc32/arch-impl.h
deleted file mode 100644
index 8255e6b..0000000
--- a/interfaces/cc/gcc/ppc32/arch-impl.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_arch_impl_
-#define _h_arch_impl_
-
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-static __inline__
-int uint8_lsbit ( uint8_t self )
-{
-    int i;
-    for ( i = 0; ; ++ i )
-    {
-        if ( ( self & ( 1 << i ) ) != 0 )
-            return i;
-    }
-    return -1;
-}
-
-static __inline__
-int16_t uint16_lsbit ( uint16_t self )
-{
-    if ( self == 0 )
-        return -1;
-    if ( ( uint8_t ) self != 0 )
-        return uint8_lsbit ( ( uint8_t ) self );
-    return uint8_lsbit ( ( uint8_t ) ( self >> 8 ) ) + 8;
-}
-
-static __inline__
-int32_t uint32_lsbit ( uint32_t self )
-{
-    if ( self == 0 )
-        return -1;
-    if ( ( uint16_t ) self != 0 )
-        return uint16_lsbit ( ( uint16_t ) self );
-    return uint16_lsbit ( ( uint16_t ) ( self >> 16 ) ) + 16;
-}
-
-typedef struct int128_t int128_t;
-struct int128_t
-{
-    uint64_t lo;
-    int64_t hi;
-};
-
-static __inline__
-int64_t int128_hi ( const int128_t *self )
-{
-    return self -> hi;
-}
-
-static __inline__
-uint64_t int128_lo ( const int128_t *self )
-{
-    return self -> lo;
-}
-
-static __inline__
-void int128_sethi ( int128_t *self, int64_t i )
-{
-    self -> hi = i;
-}
-
-static __inline__
-void int128_setlo ( int128_t *self, uint64_t i )
-{
-    self -> lo = i;
-}
-
-typedef struct uint128_t uint128_t;
-struct uint128_t
-{
-    uint64_t lo;
-    uint64_t hi;
-};
-
-static __inline__
-uint64_t uint128_hi ( const uint128_t *self )
-{
-    return self -> hi;
-}
-
-static __inline__
-uint64_t uint128_lo ( const uint128_t *self )
-{
-    return self -> lo;
-}
-
-static __inline__
-void uint128_sethi ( uint128_t *self, uint64_t i )
-{
-    self -> hi = i;
-}
-
-static __inline__
-void uint128_setlo ( uint128_t *self, uint64_t i )
-{
-    self -> lo = i;
-}
-
-static __inline__
-void int128_add ( int128_t *self, const int128_t *i )
-{
-    uint64_t lo = ( uint32_t ) self -> lo + ( uint32_t ) i -> lo;
-    uint64_t hi = ( self -> lo >> 32 ) + ( i -> lo >> 32 ) + lo >> 32;
-    self -> hi += i -> hi + ( uint32_t ) ( hi >> 32 );
-    self -> lo = ( hi << 32 ) | ( uint32_t ) lo;
-}
-
-static __inline__
-void int128_sub ( int128_t *self, const int128_t *i )
-{
-    int64_t lo = ( uint32_t ) self -> lo - ( uint32_t ) i -> lo;
-    int64_t hi = ( uint32_t ) ( self -> lo >> 32 ) - ( uint32_t ) ( i -> lo >> 32 ) + lo >> 32;
-    self -> hi -= i -> hi + ( hi >> 32 );
-    self -> lo = ( hi << 32 ) | ( uint32_t ) lo;
-}
-
-static __inline__
-void int128_sar ( int128_t *self, uint32_t i )
-{
-}
-
-static __inline__
-void int128_shl ( int128_t *self, uint32_t i )
-{
-}
-
-static __inline__
-void uint128_and ( uint128_t *self, const uint128_t *i )
-{
-}
-
-static __inline__
-void uint128_or ( uint128_t *self, const uint128_t *i )
-{
-}
-
-static __inline__
-void uint128_orlo ( uint128_t *self, uint64_t i )
-{
-    self -> lo |= i;
-}
-
-static __inline__
-void uint128_xor ( uint128_t *self, const uint128_t *i )
-{
-}
-
-static __inline__
-void uint128_not ( uint128_t *self )
-{
-}
-
-static __inline__
-void uint128_shr ( uint128_t *self, uint32_t i )
-{
-}
-
-static __inline__
-void uint128_shl ( uint128_t *self, uint32_t i )
-{
-}
-
-static __inline__
-void uint128_bswap ( uint128_t *self )
-{
-}
-
-static __inline__
-void uint128_bswap_copy ( uint128_t *to, const uint128_t *from )
-{
-}
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_arch_impl_ */
diff --git a/interfaces/cc/gcc/ppc32/atomic.h b/interfaces/cc/gcc/ppc32/atomic.h
deleted file mode 100644
index d07f8c0..0000000
--- a/interfaces/cc/gcc/ppc32/atomic.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_atomic_
-#define _h_atomic_
-
-#ifndef _h_atomic32_
-#include "atomic32.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef int atomic_int;
-typedef atomic32_t atomic_t;
-
-/* ( * v ) */
-#define atomic_read( v ) \
-    atomic32_read ( v )
-
-/* ( * v ) = i */
-#define atomic_set( v, i ) \
-    atomic32_set ( v, i )
-
-/* prior = ( * v ), ( * v ) += i, prior */
-#define atomic_read_and_add( v, i ) \
-    atomic32_read_and_add ( v, i )
-
-/* ( * v ) += i */
-#define atomic_add( v, i ) \
-    atomic32_add ( v, i )
-
-/* ( * v ) += i */
-#define atomic_add_and_read( v, i ) \
-    atomic32_add_and_read ( v, i )
-
-/* ( void ) ++ ( * v ) */
-#define atomic_inc( v ) \
-    atomic32_inc ( v )
-
-/* ( void ) -- ( * v ) */
-#define atomic_dec( v ) \
-    atomic32_dec ( v )
-
-/* -- ( * v ) == 0 */
-#define atomic_dec_and_test( v ) \
-    atomic32_dec_and_test ( v )
-
-/* ++ ( * v ) == 0
-   when atomic_dec_and_test uses predecrement, you want
-   postincrement to this function. so it isn't very useful */
-#define atomic_inc_and_test( v ) \
-    atomic32_inc_and_test ( v )
-
-/* ( * v ) -- == 0
-   HERE's useful */
-#define atomic_test_and_inc( v ) \
-    atomic32_test_and_inc ( v )
-
-/* prior = ( * v ), ( * v ) = ( prior == t ? s : prior ), prior */
-#define atomic_test_and_set( v, s, t ) \
-    atomic32_test_and_set ( v, s, t )
-
-/* N.B. - THIS FUNCTION IS FOR 32 BIT PTRS ONLY */
-static __inline__ void *atomic_test_and_set_ptr ( void *volatile *v, void *s, void *t )
-{
-    void *rtn = * v;
-    if ( rtn == t )
-        * v = s;
-    return rtn;
-}
-
-/* val = ( * v ), ( ( * v ) = ( val < t ) ? val + i : val ), val */
-#define atomic_read_and_add_lt( v, i, t ) \
-    atomic32_read_and_add_lt ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val <= t ) ? val + i : val ), val */
-#define atomic_read_and_add_le( v, i, t ) \
-    atomic32_read_and_add_le ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val == t ) ? val + i : val ), val */
-#define atomic_read_and_add_eq( v, i, t ) \
-    atomic32_read_and_add_eq ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val != t ) ? val + i : val ), val */
-#define atomic_read_and_add_ne( v, i, t ) \
-    atomic32_read_and_add_ne ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val >= t ) ? val + i : val ), val */
-#define atomic_read_and_add_ge( v, i, t ) \
-    atomic32_read_and_add_ge ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val > t ) ? val + i : val ), val */
-#define atomic_read_and_add_gt( v, i, t ) \
-    atomic32_read_and_add_gt ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( ( val & 1 ) == 1 ) ? val + i : val ), val */
-#define atomic_read_and_add_odd( v, i ) \
-    atomic32_read_and_add_odd ( v, i )
-
-/* val = ( * v ), ( ( * v ) = ( ( val & 1 ) == 0 ) ? val + i : val ), val */
-#define atomic_read_and_add_even( v, i ) \
-    atomic32_read_and_add_even ( v, i )
-
-/* DEPRECATED */
-
-/* val = ( * v ), ( * v ) = ( val < t ? val + i : val ), ( val < t ? 1 : 0 ) */
-#define atomic_add_if_lt( v, i, t ) \
-    atomic32_add_if_lt ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val <= t ? val + i : val ), ( val <= t ? 1 : 0 ) */
-#define atomic_add_if_le( v, i, t ) \
-    atomic32_add_if_le ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val == t ? val + i : val ), ( val == t ? 1 : 0 ) */
-#define atomic_add_if_eq( v, i, t ) \
-    atomic32_add_if_eq ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val >= t ? val + i : val ), ( val >= t ? 1 : 0 ) */
-#define atomic_add_if_ge( v, i, t ) \
-    atomic32_add_if_ge ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val > t ? val + i : val ), ( val > t ? 1 : 0 ) */
-#define atomic_add_if_gt( v, i, t ) \
-    atomic32_add_if_gt ( v, i, t )
-
-#undef LOCK
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_atomic_ */
diff --git a/interfaces/cc/gcc/ppc32/atomic32.h b/interfaces/cc/gcc/ppc32/atomic32.h
deleted file mode 100644
index 3f46e6b..0000000
--- a/interfaces/cc/gcc/ppc32/atomic32.h
+++ /dev/null
@@ -1,197 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_atomic32_
-#define _h_atomic32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef int atomic32_t;
-
-/* int atomic32_read ( const atomic32_t *v ); */
-#define atomic32_read( v ) \
-    ( * ( v ) )
-
-/* void atomic32_set ( atomic32_t *v, int i ); */
-#define atomic32_set( v, i ) \
-    ( ( void ) ( * ( v ) = ( i ) ) )
-
-/* add to v -> counter and return the prior value */
-static __inline__ int atomic32_read_and_add ( atomic32_t *v, int i )
-{
-    int rtn = * v;
-    * v += i;
-    return rtn;
-}
-
-/* if no read is needed, define the least expensive atomic add */
-#define atomic32_add( v, i ) \
-    atomic32_read_and_add ( v, i )
-
-/* add to v -> counter and return the result */
-static __inline__ int atomic32_add_and_read ( atomic32_t *v, int i )
-{
-    int rtn = * v += i;
-    return rtn;
-}
-
-/* just don't try to find out what the result was */
-static __inline__ void atomic32_inc ( atomic32_t *v )
-{
-    ++ v [ 0 ];
-}
-
-static __inline__ void atomic32_dec ( atomic32_t *v )
-{
-    -- v [ 0 ];
-}
-
-/* decrement by one and test result for 0 */
-static __inline__ int atomic32_dec_and_test ( atomic32_t *v )
-{
-    int rtn = -- v [ 0 ] == 0;
-    return rtn;
-}
-
-/* when atomic32_dec_and_test uses predecrement, you want
-   postincrement to this function. so it isn't very useful */
-static __inline__ int atomic32_inc_and_test ( atomic32_t *v )
-{
-    int rtn = ++ v [ 0 ] == 0;
-    return rtn;
-}
-
-/* HERE's useful */
-#define atomic32_test_and_inc( v ) \
-    ( atomic32_read_and_add ( v, 1 ) == 0 )
-
-static __inline__ int atomic32_test_and_set ( atomic32_t *v, int s, int t )
-{
-    int rtn = * v;
-    if ( rtn == t )
-        * v = s;
-    return rtn;
-}
-
-/* conditional modifications */
-static __inline__
-int atomic32_read_and_add_lt ( atomic32_t *v, int i, int t )
-{
-    int rtn = * v;
-    if ( rtn < t )
-        * v = rtn + i;
-    return rtn;
-}
-
-#define atomic32_add_if_lt( v, i, t ) \
-    ( atomic32_read_and_add_lt ( v, i, t ) < ( t ) )
-
-static __inline__
-int atomic32_read_and_add_le ( atomic32_t *v, int i, int t )
-{
-    int rtn = * v;
-    if ( rtn <= t )
-        * v = rtn + i;
-    return rtn;
-}
-
-#define atomic32_add_if_le( v, i, t ) \
-    ( atomic32_read_and_add_le ( v, i, t ) <= ( t ) )
-
-static __inline__
-int atomic32_read_and_add_eq ( atomic32_t *v, int i, int t )
-{
-    int rtn = * v;
-    if ( rtn == t )
-        * v = rtn + i;
-    return rtn;
-}
-
-#define atomic32_add_if_eq( v, i, t ) \
-    ( atomic32_read_and_add_eq ( v, i, t ) == ( t ) )
-
-static __inline__
-int atomic32_read_and_add_ne ( atomic32_t *v, int i, int t )
-{
-    int rtn = * v;
-    if ( rtn != t )
-        * v = rtn + i;
-    return rtn;
-}
-
-#define atomic32_add_if_ne( v, i, t ) \
-    ( atomic32_read_and_add_ne ( v, i, t ) != ( t ) )
-
-static __inline__
-int atomic32_read_and_add_ge ( atomic32_t *v, int i, int t )
-{
-    int rtn = * v;
-    if ( rtn >= t )
-        * v = rtn + i;
-    return rtn;
-}
-
-#define atomic32_add_if_ge( v, i, t ) \
-    ( atomic32_read_and_add_ge ( v, i, t ) >= ( t ) )
-
-static __inline__
-int atomic32_read_and_add_gt ( atomic32_t *v, int i, int t )
-{
-    int rtn = * v;
-    if ( rtn > t )
-        * v = rtn + i;
-    return rtn;
-}
-
-#define atomic32_add_if_gt( v, i, t ) \
-    ( atomic32_read_and_add_gt ( v, i, t ) > ( t ) )
-
-static __inline__
-int atomic32_read_and_add_odd ( atomic32_t *v, int i )
-{
-    int rtn = * v;
-    if ( ( rtn & 1 ) != 0 )
-        * v = rtn + i;
-    return rtn;
-}
-
-static __inline__
-int atomic32_read_and_add_even ( atomic32_t *v, int i )
-{
-    int rtn = * v;
-    if ( ( rtn & 1 ) == 0 )
-        * v = rtn + i;
-    return rtn;
-}
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_atomic32_ */
diff --git a/interfaces/cc/gcc/ppc32/bitstr.h b/interfaces/cc/gcc/ppc32/bitstr.h
deleted file mode 100644
index cf5927b..0000000
--- a/interfaces/cc/gcc/ppc32/bitstr.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_bitstr_
-#define _h_bitstr_
-
-/* use 32-bit accumulator, 16-bit word size;
- * no swapping, since already big-endian */
-#define WRDSIZE 16
-#define WRDSHIFT 4
-#define WRD uint16_t
-#define ACC uint32_t
-#define BSWAP( x ) ( x )
-
-#include "../noarch/bitstr.h"
-
-#endif /* _h_bitstr_ */
diff --git a/interfaces/cc/gcc/ppc32/strtol.h b/interfaces/cc/gcc/ppc32/strtol.h
deleted file mode 100644
index 79f462f..0000000
--- a/interfaces/cc/gcc/ppc32/strtol.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_strtol_
-#define _h_strtol_
-
-#ifndef _h_os_native_
-#include <os-native.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * strtoi32
- * strtoi32
- *  based upon actual usage
- */
-#define strtoi32( str, endp, base ) \
-    strtol ( str, endp, base )
-
-#define strtou32( str, endp, base ) \
-    strtoul ( str, endp, base )
-
-
-/*--------------------------------------------------------------------------
- * strtoi64
- * strtoi64
- *  based upon actual usage
- */
-#define strtoi64( str, endp, base ) \
-    strtoll ( str, endp, base )
-
-#define strtou64( str, endp, base ) \
-    strtoull ( str, endp, base )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_strtol_ */
diff --git a/interfaces/cc/gcc/v128.h b/interfaces/cc/gcc/v128.h
deleted file mode 100644
index d1ba71d..0000000
--- a/interfaces/cc/gcc/v128.h
+++ /dev/null
@@ -1,1093 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_v128_
-#define _h_v128_
-
-#include <stdint.h>
-#include <x86intrin.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef int8_t   v128_i8_t  __attribute__ ((vector_size (16),__may_alias__));
-typedef uint8_t  v128_u8_t  __attribute__ ((vector_size (16),__may_alias__));
-typedef int16_t  v128_i16_t __attribute__ ((vector_size (16),__may_alias__));
-typedef int32_t  v128_i32_t __attribute__ ((vector_size (16),__may_alias__));
-typedef int64_t  v128_i64_t __attribute__ ((vector_size (16),__may_alias__));
-typedef uint16_t v128_u16_t __attribute__ ((vector_size (16),__may_alias__));
-typedef uint32_t v128_u32_t __attribute__ ((vector_size (16),__may_alias__));
-typedef uint64_t v128_u64_t __attribute__ ((vector_size (16),__may_alias__));
-typedef float    v128_f_t   __attribute__ ((vector_size (16),__may_alias__));
-typedef double   v128_d_t   __attribute__ ((vector_size (16),__may_alias__));
-
-/* NOTE:
- * these types are to hide perceived flaws in the Intel/GCC code
- * don't use them outside of this file.  uint8_t, int8_t and int64_t all
- * fail to compile so the above types can't be used within this file in some 
- * places.
- */
-typedef char          v128_c_t   __attribute__ ((vector_size (16),__may_alias__));
-typedef long long int v128_lli_t __attribute__ ((vector_size (16),__may_alias__));
-
-
-#if USE_VEC_REG
-
-/* SSE
-  movss
-  movaps
-  movups
-  movlps
-  movhps
-  movlhps
-  movhlps
-*/
-
-#ifdef __MMX__
-/* MMX
-   v8qi __builtin_ia32_paddb (v8qi, v8qi)
-   v4hi __builtin_ia32_paddw (v4hi, v4hi)
-   v2si __builtin_ia32_paddd (v2si, v2si)
-   v8qi __builtin_ia32_psubb (v8qi, v8qi)
-   v4hi __builtin_ia32_psubw (v4hi, v4hi)
-   v2si __builtin_ia32_psubd (v2si, v2si)
-   v8qi __builtin_ia32_paddsb (v8qi, v8qi)
-   v4hi __builtin_ia32_paddsw (v4hi, v4hi)
-   v8qi __builtin_ia32_psubsb (v8qi, v8qi)
-   v4hi __builtin_ia32_psubsw (v4hi, v4hi)
-   v8qi __builtin_ia32_paddusb (v8qi, v8qi)
-   v4hi __builtin_ia32_paddusw (v4hi, v4hi)
-   v8qi __builtin_ia32_psubusb (v8qi, v8qi)
-   v4hi __builtin_ia32_psubusw (v4hi, v4hi)
-   v4hi __builtin_ia32_pmullw (v4hi, v4hi)
-   v4hi __builtin_ia32_pmulhw (v4hi, v4hi)
-   di __builtin_ia32_pand (di, di)
-   di __builtin_ia32_pandn (di,di)
-   di __builtin_ia32_por (di, di)
-   di __builtin_ia32_pxor (di, di)
-   v8qi __builtin_ia32_pcmpeqb (v8qi, v8qi)
-   v4hi __builtin_ia32_pcmpeqw (v4hi, v4hi)
-   v2si __builtin_ia32_pcmpeqd (v2si, v2si)
-   v8qi __builtin_ia32_pcmpgtb (v8qi, v8qi)
-   v4hi __builtin_ia32_pcmpgtw (v4hi, v4hi)
-   v2si __builtin_ia32_pcmpgtd (v2si, v2si)
-   v8qi __builtin_ia32_punpckhbw (v8qi, v8qi)
-   v4hi __builtin_ia32_punpckhwd (v4hi, v4hi)
-   v2si __builtin_ia32_punpckhdq (v2si, v2si)
-   v8qi __builtin_ia32_punpcklbw (v8qi, v8qi)
-   v4hi __builtin_ia32_punpcklwd (v4hi, v4hi)
-   v2si __builtin_ia32_punpckldq (v2si, v2si)
-   v8qi __builtin_ia32_packsswb (v4hi, v4hi)
-   v4hi __builtin_ia32_packssdw (v2si, v2si)
-   v8qi __builtin_ia32_packuswb (v4hi, v4hi)
-     
-   v4hi __builtin_ia32_psllw (v4hi, v4hi)
-   v2si __builtin_ia32_pslld (v2si, v2si)
-   v1di __builtin_ia32_psllq (v1di, v1di)
-   v4hi __builtin_ia32_psrlw (v4hi, v4hi)
-   v2si __builtin_ia32_psrld (v2si, v2si)
-   v1di __builtin_ia32_psrlq (v1di, v1di)
-   v4hi __builtin_ia32_psraw (v4hi, v4hi)
-   v2si __builtin_ia32_psrad (v2si, v2si)
-   v4hi __builtin_ia32_psllwi (v4hi, int)
-   v2si __builtin_ia32_pslldi (v2si, int)
-   v1di __builtin_ia32_psllqi (v1di, int)
-   v4hi __builtin_ia32_psrlwi (v4hi, int)
-   v2si __builtin_ia32_psrldi (v2si, int)
-   v1di __builtin_ia32_psrlqi (v1di, int)
-   v4hi __builtin_ia32_psrawi (v4hi, int)
-   v2si __builtin_ia32_psradi (v2si, int)
-*/
-#endif
-
-#ifdef __SSE__
-/* SSE
-   v4hi __builtin_ia32_pmulhuw (v4hi, v4hi)
-   v8qi __builtin_ia32_pavgb (v8qi, v8qi)
-   v4hi __builtin_ia32_pavgw (v4hi, v4hi)
-   v1di __builtin_ia32_psadbw (v8qi, v8qi)
-   v8qi __builtin_ia32_pmaxub (v8qi, v8qi)
-   v4hi __builtin_ia32_pmaxsw (v4hi, v4hi)
-   v8qi __builtin_ia32_pminub (v8qi, v8qi)
-   v4hi __builtin_ia32_pminsw (v4hi, v4hi)
-   int __builtin_ia32_pextrw (v4hi, int)
-   v4hi __builtin_ia32_pinsrw (v4hi, int, int)
-   int __builtin_ia32_pmovmskb (v8qi)
-   void __builtin_ia32_maskmovq (v8qi, v8qi, char *)
-   void __builtin_ia32_movntq (di *, di)
-   void __builtin_ia32_sfence (void)
-
-   int __builtin_ia32_comieq (v4sf, v4sf)
-   int __builtin_ia32_comineq (v4sf, v4sf)
-   int __builtin_ia32_comilt (v4sf, v4sf)
-   int __builtin_ia32_comile (v4sf, v4sf)
-   int __builtin_ia32_comigt (v4sf, v4sf)
-   int __builtin_ia32_comige (v4sf, v4sf)
-   int __builtin_ia32_ucomieq (v4sf, v4sf)
-   int __builtin_ia32_ucomineq (v4sf, v4sf)
-   int __builtin_ia32_ucomilt (v4sf, v4sf)
-   int __builtin_ia32_ucomile (v4sf, v4sf)
-   int __builtin_ia32_ucomigt (v4sf, v4sf)
-   int __builtin_ia32_ucomige (v4sf, v4sf)
-   v4sf __builtin_ia32_addps (v4sf, v4sf)
-   v4sf __builtin_ia32_subps (v4sf, v4sf)
-   v4sf __builtin_ia32_mulps (v4sf, v4sf)
-   v4sf __builtin_ia32_divps (v4sf, v4sf)
-   v4sf __builtin_ia32_addss (v4sf, v4sf)
-   v4sf __builtin_ia32_subss (v4sf, v4sf)
-   v4sf __builtin_ia32_mulss (v4sf, v4sf)
-   v4sf __builtin_ia32_divss (v4sf, v4sf)
-   v4si __builtin_ia32_cmpeqps (v4sf, v4sf)
-   v4si __builtin_ia32_cmpltps (v4sf, v4sf)
-   v4si __builtin_ia32_cmpleps (v4sf, v4sf)
-   v4si __builtin_ia32_cmpgtps (v4sf, v4sf)
-   v4si __builtin_ia32_cmpgeps (v4sf, v4sf)
-   v4si __builtin_ia32_cmpunordps (v4sf, v4sf)
-   v4si __builtin_ia32_cmpneqps (v4sf, v4sf)
-   v4si __builtin_ia32_cmpnltps (v4sf, v4sf)
-   v4si __builtin_ia32_cmpnleps (v4sf, v4sf)
-   v4si __builtin_ia32_cmpngtps (v4sf, v4sf)
-   v4si __builtin_ia32_cmpngeps (v4sf, v4sf)
-   v4si __builtin_ia32_cmpordps (v4sf, v4sf)
-   v4si __builtin_ia32_cmpeqss (v4sf, v4sf)
-   v4si __builtin_ia32_cmpltss (v4sf, v4sf)
-   v4si __builtin_ia32_cmpless (v4sf, v4sf)
-   v4si __builtin_ia32_cmpunordss (v4sf, v4sf)
-   v4si __builtin_ia32_cmpneqss (v4sf, v4sf)
-   v4si __builtin_ia32_cmpnlts (v4sf, v4sf)
-   v4si __builtin_ia32_cmpnless (v4sf, v4sf)
-   v4si __builtin_ia32_cmpordss (v4sf, v4sf)
-   v4sf __builtin_ia32_maxps (v4sf, v4sf)
-   v4sf __builtin_ia32_maxss (v4sf, v4sf)
-   v4sf __builtin_ia32_minps (v4sf, v4sf)
-   v4sf __builtin_ia32_minss (v4sf, v4sf)
-   v4sf __builtin_ia32_andps (v4sf, v4sf)
-   v4sf __builtin_ia32_andnps (v4sf, v4sf)
-   v4sf __builtin_ia32_orps (v4sf, v4sf)
-   v4sf __builtin_ia32_xorps (v4sf, v4sf)
-   v4sf __builtin_ia32_movss (v4sf, v4sf)
-   v4sf __builtin_ia32_movhlps (v4sf, v4sf)
-   v4sf __builtin_ia32_movlhps (v4sf, v4sf)
-   v4sf __builtin_ia32_unpckhps (v4sf, v4sf)
-   v4sf __builtin_ia32_unpcklps (v4sf, v4sf)
-   v4sf __builtin_ia32_cvtpi2ps (v4sf, v2si)
-   v4sf __builtin_ia32_cvtsi2ss (v4sf, int)
-   v2si __builtin_ia32_cvtps2pi (v4sf)
-   int __builtin_ia32_cvtss2si (v4sf)
-   v2si __builtin_ia32_cvttps2pi (v4sf)
-   int __builtin_ia32_cvttss2si (v4sf)
-   v4sf __builtin_ia32_rcpps (v4sf)
-   v4sf __builtin_ia32_rsqrtps (v4sf)
-   v4sf __builtin_ia32_sqrtps (v4sf)
-   v4sf __builtin_ia32_rcpss (v4sf)
-   v4sf __builtin_ia32_rsqrtss (v4sf)
-   v4sf __builtin_ia32_sqrtss (v4sf)
-   v4sf __builtin_ia32_shufps (v4sf, v4sf, int)
-*/
-static __inline
-v128_u8_t op_SHUFPS ( v128_u8_t vin1, v128_u8_t vin2, const int mask )
-    __attribute__ ((always_inline));
-
-static __inline
-v128_u8_t op_SHUFPS (v128_u8_t vin1, v128_u8_t vin2, const int mask)
-{
-    return ( v128_u8_t ) __builtin_ia32_shufps ((v128_f_t)vin1, (v128_f_t)vin2, mask);
-}
-
- /*
-   void __builtin_ia32_movntps (float *, v4sf)
-   int __builtin_ia32_movmskps (v4sf)
-
-v4sf __builtin_ia32_loadaps (float *)
-Generates the movaps machine instruction as a load from memory. 
-void __builtin_ia32_storeaps (float *, v4sf)
-Generates the movaps machine instruction as a store to memory. 
-v4sf __builtin_ia32_loadups (float *)
-Generates the movups machine instruction as a load from memory. 
-void __builtin_ia32_storeups (float *, v4sf)
-Generates the movups machine instruction as a store to memory. 
-v4sf __builtin_ia32_loadsss (float *)
-Generates the movss machine instruction as a load from memory. 
-void __builtin_ia32_storess (float *, v4sf)
-Generates the movss machine instruction as a store to memory. 
-v4sf __builtin_ia32_loadhps (v4sf, const v2sf *)
-Generates the movhps machine instruction as a load from memory. 
-v4sf __builtin_ia32_loadlps (v4sf, const v2sf *)
-Generates the movlps machine instruction as a load from memory 
-void __builtin_ia32_storehps (v2sf *, v4sf)
-Generates the movhps machine instruction as a store to memory. 
-void __builtin_ia32_storelps (v2sf *, v4sf)
-Generates the movlps machine instruction as a store to memory.
-*/
-#endif
-
-#ifdef __SSE2__
-/* sse2
-     int __builtin_ia32_comisdeq (v2df, v2df)
-     int __builtin_ia32_comisdlt (v2df, v2df)
-     int __builtin_ia32_comisdle (v2df, v2df)
-     int __builtin_ia32_comisdgt (v2df, v2df)
-     int __builtin_ia32_comisdge (v2df, v2df)
-     int __builtin_ia32_comisdneq (v2df, v2df)
-     int __builtin_ia32_ucomisdeq (v2df, v2df)
-     int __builtin_ia32_ucomisdlt (v2df, v2df)
-     int __builtin_ia32_ucomisdle (v2df, v2df)
-     int __builtin_ia32_ucomisdgt (v2df, v2df)
-     int __builtin_ia32_ucomisdge (v2df, v2df)
-     int __builtin_ia32_ucomisdneq (v2df, v2df)
-     v2df __builtin_ia32_cmpeqpd (v2df, v2df)
-     v2df __builtin_ia32_cmpltpd (v2df, v2df)
-     v2df __builtin_ia32_cmplepd (v2df, v2df)
-     v2df __builtin_ia32_cmpgtpd (v2df, v2df)
-     v2df __builtin_ia32_cmpgepd (v2df, v2df)
-     v2df __builtin_ia32_cmpunordpd (v2df, v2df)
-     v2df __builtin_ia32_cmpneqpd (v2df, v2df)
-     v2df __builtin_ia32_cmpnltpd (v2df, v2df)
-     v2df __builtin_ia32_cmpnlepd (v2df, v2df)
-     v2df __builtin_ia32_cmpngtpd (v2df, v2df)
-     v2df __builtin_ia32_cmpngepd (v2df, v2df)
-     v2df __builtin_ia32_cmpordpd (v2df, v2df)
-     v2df __builtin_ia32_cmpeqsd (v2df, v2df)
-     v2df __builtin_ia32_cmpltsd (v2df, v2df)
-     v2df __builtin_ia32_cmplesd (v2df, v2df)
-     v2df __builtin_ia32_cmpunordsd (v2df, v2df)
-     v2df __builtin_ia32_cmpneqsd (v2df, v2df)
-     v2df __builtin_ia32_cmpnltsd (v2df, v2df)
-     v2df __builtin_ia32_cmpnlesd (v2df, v2df)
-     v2df __builtin_ia32_cmpordsd (v2df, v2df)
-     v2di __builtin_ia32_paddq (v2di, v2di)
-     v2di __builtin_ia32_psubq (v2di, v2di)
-     v2df __builtin_ia32_addpd (v2df, v2df)
-     v2df __builtin_ia32_subpd (v2df, v2df)
-     v2df __builtin_ia32_mulpd (v2df, v2df)
-     v2df __builtin_ia32_divpd (v2df, v2df)
-     v2df __builtin_ia32_addsd (v2df, v2df)
-     v2df __builtin_ia32_subsd (v2df, v2df)
-     v2df __builtin_ia32_mulsd (v2df, v2df)
-     v2df __builtin_ia32_divsd (v2df, v2df)
-     v2df __builtin_ia32_minpd (v2df, v2df)
-     v2df __builtin_ia32_maxpd (v2df, v2df)
-     v2df __builtin_ia32_minsd (v2df, v2df)
-     v2df __builtin_ia32_maxsd (v2df, v2df)
-     v2df __builtin_ia32_andpd (v2df, v2df)
-     v2df __builtin_ia32_andnpd (v2df, v2df)
-     v2df __builtin_ia32_orpd (v2df, v2df)
-     v2df __builtin_ia32_xorpd (v2df, v2df)
-     v2df __builtin_ia32_movsd (v2df, v2df)
-     v2df __builtin_ia32_unpckhpd (v2df, v2df)
-     v2df __builtin_ia32_unpcklpd (v2df, v2df)
-     v16qi __builtin_ia32_paddb128 (v16qi, v16qi)
-     v8hi __builtin_ia32_paddw128 (v8hi, v8hi)
-     v4si __builtin_ia32_paddd128 (v4si, v4si)
-     v2di __builtin_ia32_paddq128 (v2di, v2di)
-     v16qi __builtin_ia32_psubb128 (v16qi, v16qi)
-     v8hi __builtin_ia32_psubw128 (v8hi, v8hi)
-     v4si __builtin_ia32_psubd128 (v4si, v4si)
-     v2di __builtin_ia32_psubq128 (v2di, v2di)
-     v8hi __builtin_ia32_pmullw128 (v8hi, v8hi)
-     v8hi __builtin_ia32_pmulhw128 (v8hi, v8hi)
-     v2di __builtin_ia32_pand128 (v2di, v2di)
-     v2di __builtin_ia32_pandn128 (v2di, v2di)
-     v2di __builtin_ia32_por128 (v2di, v2di)
-     v2di __builtin_ia32_pxor128 (v2di, v2di)
-     v16qi __builtin_ia32_pavgb128 (v16qi, v16qi)
-     v8hi __builtin_ia32_pavgw128 (v8hi, v8hi)
-     v16qi __builtin_ia32_pcmpeqb128 (v16qi, v16qi)
-     v8hi __builtin_ia32_pcmpeqw128 (v8hi, v8hi)
-     v4si __builtin_ia32_pcmpeqd128 (v4si, v4si)
-     v16qi __builtin_ia32_pcmpgtb128 (v16qi, v16qi)
-     v8hi __builtin_ia32_pcmpgtw128 (v8hi, v8hi)
-     v4si __builtin_ia32_pcmpgtd128 (v4si, v4si)
-     v16qi __builtin_ia32_pmaxub128 (v16qi, v16qi)
-     v8hi __builtin_ia32_pmaxsw128 (v8hi, v8hi)
-     v16qi __builtin_ia32_pminub128 (v16qi, v16qi)
-     v8hi __builtin_ia32_pminsw128 (v8hi, v8hi)
-     v16qi __builtin_ia32_punpckhbw128 (v16qi, v16qi)
-     v8hi __builtin_ia32_punpckhwd128 (v8hi, v8hi)
-     v4si __builtin_ia32_punpckhdq128 (v4si, v4si)
-     v2di __builtin_ia32_punpckhqdq128 (v2di, v2di)
-     v16qi __builtin_ia32_punpcklbw128 (v16qi, v16qi)
-     v8hi __builtin_ia32_punpcklwd128 (v8hi, v8hi)
-     v4si __builtin_ia32_punpckldq128 (v4si, v4si)
-     v2di __builtin_ia32_punpcklqdq128 (v2di, v2di)
-     v16qi __builtin_ia32_packsswb128 (v8hi, v8hi)
-     v8hi __builtin_ia32_packssdw128 (v4si, v4si)
-     v16qi __builtin_ia32_packuswb128 (v8hi, v8hi)
-     v8hi __builtin_ia32_pmulhuw128 (v8hi, v8hi)
-     void __builtin_ia32_maskmovdqu (v16qi, v16qi)
-     v2df __builtin_ia32_loadupd (double *)
-     void __builtin_ia32_storeupd (double *, v2df)
-     v2df __builtin_ia32_loadhpd (v2df, double const *)
-     v2df __builtin_ia32_loadlpd (v2df, double const *)
-     int __builtin_ia32_movmskpd (v2df)
-     int __builtin_ia32_pmovmskb128 (v16qi)
-     void __builtin_ia32_movnti (int *, int)
-     void __builtin_ia32_movntpd (double *, v2df)
-     void __builtin_ia32_movntdq (v2df *, v2df)
-     v4si __builtin_ia32_pshufd (v4si, int)
-     v8hi __builtin_ia32_pshuflw (v8hi, int)
-     v8hi __builtin_ia32_pshufhw (v8hi, int)
-     v2di __builtin_ia32_psadbw128 (v16qi, v16qi)
-     v2df __builtin_ia32_sqrtpd (v2df)
-     v2df __builtin_ia32_sqrtsd (v2df)
-     v2df __builtin_ia32_shufpd (v2df, v2df, int)
-*/
-static __inline
-v128_u8_t op_SHUFPD (v128_u8_t vin1, v128_u8_t vin2, const int mask)
-    __attribute__ ((always_inline));
-
-static __inline
-v128_u8_t op_SHUFPD (v128_u8_t vin1, v128_u8_t vin2, const int mask)
-{
-    return ( v128_u8_t ) __builtin_ia32_shufpd ((v128_d_t)vin1, (v128_d_t)vin2, mask);
-}
-
-/*
-     v2df __builtin_ia32_cvtdq2pd (v4si)
-     v4sf __builtin_ia32_cvtdq2ps (v4si)
-     v4si __builtin_ia32_cvtpd2dq (v2df)
-     v2si __builtin_ia32_cvtpd2pi (v2df)
-     v4sf __builtin_ia32_cvtpd2ps (v2df)
-     v4si __builtin_ia32_cvttpd2dq (v2df)
-     v2si __builtin_ia32_cvttpd2pi (v2df)
-     v2df __builtin_ia32_cvtpi2pd (v2si)
-     int __builtin_ia32_cvtsd2si (v2df)
-     int __builtin_ia32_cvttsd2si (v2df)
-     long long __builtin_ia32_cvtsd2si64 (v2df)
-     long long __builtin_ia32_cvttsd2si64 (v2df)
-     v4si __builtin_ia32_cvtps2dq (v4sf)
-     v2df __builtin_ia32_cvtps2pd (v4sf)
-     v4si __builtin_ia32_cvttps2dq (v4sf)
-     v2df __builtin_ia32_cvtsi2sd (v2df, int)
-     v2df __builtin_ia32_cvtsi642sd (v2df, long long)
-     v4sf __builtin_ia32_cvtsd2ss (v4sf, v2df)
-     v2df __builtin_ia32_cvtss2sd (v2df, v4sf)
-     void __builtin_ia32_clflush (const void *)
-     void __builtin_ia32_lfence (void)
-     void __builtin_ia32_mfence (void)
-     v16qi __builtin_ia32_loaddqu (const char *)
-     void __builtin_ia32_storedqu (char *, v16qi)
-     v1di __builtin_ia32_pmuludq (v2si, v2si)
-     v2di __builtin_ia32_pmuludq128 (v4si, v4si)
-     v8hi __builtin_ia32_psllw128 (v8hi, v8hi)
-     v4si __builtin_ia32_pslld128 (v4si, v4si)
-     v2di __builtin_ia32_psllq128 (v2di, v2di)
-     v8hi __builtin_ia32_psrlw128 (v8hi, v8hi)
-     v4si __builtin_ia32_psrld128 (v4si, v4si)
-     v2di __builtin_ia32_psrlq128 (v2di, v2di)
-     v8hi __builtin_ia32_psraw128 (v8hi, v8hi)
-     v4si __builtin_ia32_psrad128 (v4si, v4si)
-     v2di __builtin_ia32_pslldqi128 (v2di, int)
-     v8hi __builtin_ia32_psllwi128 (v8hi, int)
-     v4si __builtin_ia32_pslldi128 (v4si, int)
-*/
-
-static __inline
-v128_u8_t op_PSLLDI128 ( v128_u8_t vin, const int bit_count )
-    __attribute__ ((always_inline));
-
-static __inline
-v128_u8_t op_PSLLDI128 (v128_u8_t vin, const int bit_count)
-{
-    return (v128_u8_t)__builtin_ia32_pslldi128 ((v128_i32_t)vin, bit_count);
-}
-
-/*
-     v2di __builtin_ia32_psllqi128 (v2di, int)
-     v2di __builtin_ia32_psrldqi128 (v2di, int)
-     v8hi __builtin_ia32_psrlwi128 (v8hi, int)
-     v4si __builtin_ia32_psrldi128 (v4si, int)
-*/
-
-static __inline
-v128_u8_t op_PSRLDI128 ( v128_u8_t vin, const int bit_count )
-    __attribute__ ((always_inline));
-
-static __inline
-v128_u8_t op_PSRLDI128 (v128_u8_t vin, const int bit_count)
-{
-    return (v128_u8_t)__builtin_ia32_psrldi128 ((v128_i32_t)vin, bit_count);
-}
-
-/*
-     v2di __builtin_ia32_psrlqi128 (v2di, int)
-     v8hi __builtin_ia32_psrawi128 (v8hi, int)
-     v4si __builtin_ia32_psradi128 (v4si, int)
-     v4si __builtin_ia32_pmaddwd128 (v8hi, v8hi)
-     v2di __builtin_ia32_movq128 (v2di)
-*/
-static __inline__
-v128_u8_t op_PSHUFD128 ( v128_u8_t vin, const int mask )
-    __attribute__ ((always_inline));
-     
-static __inline__
-v128_u8_t op_PSHUFD128 (v128_u8_t vin, const int mask)
-{
-    return (v128_u8_t)__builtin_ia32_pshufd ((v128_i32_t)vin, mask);
-}
-#endif
-
-#ifdef __SSE3__
-/* sse3
-     v2df __builtin_ia32_addsubpd (v2df, v2df)
-     v4sf __builtin_ia32_addsubps (v4sf, v4sf)
-     v2df __builtin_ia32_haddpd (v2df, v2df)
-     v4sf __builtin_ia32_haddps (v4sf, v4sf)
-     v2df __builtin_ia32_hsubpd (v2df, v2df)
-     v4sf __builtin_ia32_hsubps (v4sf, v4sf)
-     v16qi __builtin_ia32_lddqu (char const *)
-     void __builtin_ia32_monitor (void *, unsigned int, unsigned int)
-     v2df __builtin_ia32_movddup (v2df)
-     v4sf __builtin_ia32_movshdup (v4sf)
-     v4sf __builtin_ia32_movsldup (v4sf)
-     void __builtin_ia32_mwait (unsigned int, unsigned int)
-
-v2df __builtin_ia32_loadddup (double const *)
-
-*/
-
-#endif
-
-#ifdef __SSSE3__
-
-/* ssse3
- *
- * The following built-in functions are available when -mssse3 is used. All of
- * them generate the machine instruction that is part of the name with MMX
- * registers.
- *
- * 
-     v2si __builtin_ia32_phaddd (v2si, v2si)
-     v4hi __builtin_ia32_phaddw (v4hi, v4hi)
-     v4hi __builtin_ia32_phaddsw (v4hi, v4hi)
-     v2si __builtin_ia32_phsubd (v2si, v2si)
-     v4hi __builtin_ia32_phsubw (v4hi, v4hi)
-     v4hi __builtin_ia32_phsubsw (v4hi, v4hi)
-     v4hi __builtin_ia32_pmaddubsw (v8qi, v8qi)
-     v4hi __builtin_ia32_pmulhrsw (v4hi, v4hi)
-     v8qi __builtin_ia32_pshufb (v8qi, v8qi)
-     v8qi __builtin_ia32_psignb (v8qi, v8qi)
-     v2si __builtin_ia32_psignd (v2si, v2si)
-     v4hi __builtin_ia32_psignw (v4hi, v4hi)
-     v1di __builtin_ia32_palignr (v1di, v1di, int)
-     v8qi __builtin_ia32_pabsb (v8qi)
-     v2si __builtin_ia32_pabsd (v2si)
-     v4hi __builtin_ia32_pabsw (v4hi)
-The following built-in functions are available when -mssse3 is used.
-All of them generate the machine instruction that is part of the name
-with SSE registers.
-
-     v4si __builtin_ia32_phaddd128 (v4si, v4si)
-     v8hi __builtin_ia32_phaddw128 (v8hi, v8hi)
-     v8hi __builtin_ia32_phaddsw128 (v8hi, v8hi)
-     v4si __builtin_ia32_phsubd128 (v4si, v4si)
-     v8hi __builtin_ia32_phsubw128 (v8hi, v8hi)
-     v8hi __builtin_ia32_phsubsw128 (v8hi, v8hi)
-     v8hi __builtin_ia32_pmaddubsw128 (v16qi, v16qi)
-     v8hi __builtin_ia32_pmulhrsw128 (v8hi, v8hi)
-+    v16qi __builtin_ia32_pshufb128 (v16qi, v16qi)
-     v16qi __builtin_ia32_psignb128 (v16qi, v16qi)
-     v4si __builtin_ia32_psignd128 (v4si, v4si)
-     v8hi __builtin_ia32_psignw128 (v8hi, v8hi)
-     v2di __builtin_ia32_palignr128 (v2di, v2di, int)
-     v16qi __builtin_ia32_pabsb128 (v16qi)
-     v4si __builtin_ia32_pabsd128 (v4si)
-     v8hi __builtin_ia32_pabsw128 (v8hi)
- */
-
-static __inline__
-v128_u8_t op_PSHUFB128 (register v128_u8_t vin, register const v128_u8_t vtab)
-    __attribute__ ((always_inline));
-
-static __inline__
-v128_u8_t op_PSHUFB128 (register v128_u8_t vin, register const v128_u8_t vtab)
-{
-    return (v128_u8_t)__builtin_ia32_pshufb128 ((v128_c_t)vin, (v128_c_t)vtab);
-}
-#endif
-
-#ifdef __SSE4_1__
-/* sse4.1
-The following built-in functions are available when -msse4.1 is used.
-All of them generate the machine instruction that is part of the name.
-
-     v2df __builtin_ia32_blendpd (v2df, v2df, const int)
-     v4sf __builtin_ia32_blendps (v4sf, v4sf, const int)
-     v2df __builtin_ia32_blendvpd (v2df, v2df, v2df)
-     v4sf __builtin_ia32_blendvps (v4sf, v4sf, v4sf)
-     v2df __builtin_ia32_dppd (v2df, v2df, const int)
-     v4sf __builtin_ia32_dpps (v4sf, v4sf, const int)
-     v4sf __builtin_ia32_insertps128 (v4sf, v4sf, const int)
-     v2di __builtin_ia32_movntdqa (v2di *);
-     v16qi __builtin_ia32_mpsadbw128 (v16qi, v16qi, const int)
-     v8hi __builtin_ia32_packusdw128 (v4si, v4si)
-     v16qi __builtin_ia32_pblendvb128 (v16qi, v16qi, v16qi)
-     v8hi __builtin_ia32_pblendw128 (v8hi, v8hi, const int)
-     v2di __builtin_ia32_pcmpeqq (v2di, v2di)
-     v8hi __builtin_ia32_phminposuw128 (v8hi)
-     v16qi __builtin_ia32_pmaxsb128 (v16qi, v16qi)
-     v4si __builtin_ia32_pmaxsd128 (v4si, v4si)
-     v4si __builtin_ia32_pmaxud128 (v4si, v4si)
-     v8hi __builtin_ia32_pmaxuw128 (v8hi, v8hi)
-     v16qi __builtin_ia32_pminsb128 (v16qi, v16qi)
-     v4si __builtin_ia32_pminsd128 (v4si, v4si)
-     v4si __builtin_ia32_pminud128 (v4si, v4si)
-     v8hi __builtin_ia32_pminuw128 (v8hi, v8hi)
-     v4si __builtin_ia32_pmovsxbd128 (v16qi)
-     v2di __builtin_ia32_pmovsxbq128 (v16qi)
-     v8hi __builtin_ia32_pmovsxbw128 (v16qi)
-     v2di __builtin_ia32_pmovsxdq128 (v4si)
-     v4si __builtin_ia32_pmovsxwd128 (v8hi)
-     v2di __builtin_ia32_pmovsxwq128 (v8hi)
-     v4si __builtin_ia32_pmovzxbd128 (v16qi)
-     v2di __builtin_ia32_pmovzxbq128 (v16qi)
-     v8hi __builtin_ia32_pmovzxbw128 (v16qi)
-     v2di __builtin_ia32_pmovzxdq128 (v4si)
-     v4si __builtin_ia32_pmovzxwd128 (v8hi)
-     v2di __builtin_ia32_pmovzxwq128 (v8hi)
-     v2di __builtin_ia32_pmuldq128 (v4si, v4si)
-     v4si __builtin_ia32_pmulld128 (v4si, v4si)
-     int __builtin_ia32_ptestc128 (v2di, v2di)
-     int __builtin_ia32_ptestnzc128 (v2di, v2di)
-     int __builtin_ia32_ptestz128 (v2di, v2di)
-     v2df __builtin_ia32_roundpd (v2df, const int)
-     v4sf __builtin_ia32_roundps (v4sf, const int)
-     v2df __builtin_ia32_roundsd (v2df, v2df, const int)
-     v4sf __builtin_ia32_roundss (v4sf, v4sf, const int)
-The following built-in functions are available when -msse4.1 is used.
-
-v4sf __builtin_ia32_vec_set_v4sf (v4sf, float, const int)
-Generates the insertps machine instruction. 
-int __builtin_ia32_vec_ext_v16qi (v16qi, const int)
-Generates the pextrb machine instruction. 
-v16qi __builtin_ia32_vec_set_v16qi (v16qi, int, const int)
-Generates the pinsrb machine instruction. 
-v4si __builtin_ia32_vec_set_v4si (v4si, int, const int)
-Generates the pinsrd machine instruction. 
-*/
-static __inline__
-v128_u8_t op_PINSRUD (register v128_u8_t vin, uint32_t ii, const int off)
-    __attribute__ ((always_inline));
-static __inline__
-v128_u8_t op_PINSRUD (register v128_u8_t vin, uint32_t ii, const int off)
-{
-    return (v128_u8_t)__builtin_ia32_vec_set_v4si ((v128_i32_t)vin, ii, ( const uint8_t ) off );
-}
-#define op_PINSRUD( vin, ii, off ) \
-    (v128_u8_t) __builtin_ia32_vec_set_v4si ((v128_i32_t)(vin), ii, off)
-
-/*
-v2di __builtin_ia32_vec_set_v2di (v2di, long long, const int)
-Generates the pinsrq machine instruction in 64bit mode.
-The following built-in functions are changed to generate new SSE4.1 instructions when -msse4.1 is used.
-
-float __builtin_ia32_vec_ext_v4sf (v4sf, const int)
-Generates the extractps machine instruction. 
-int __builtin_ia32_vec_ext_v4si (v4si, const int)
-Generates the pextrd machine instruction. 
-long long __builtin_ia32_vec_ext_v2di (v2di, const int)
-Generates the pextrq machine instruction in 64bit mode.
- */
-
-#endif
-
-#ifdef __SSE4_2__
-
-/* sse4.2
-The following built-in functions are available when -msse4.2 is used.
-All of them generate the machine instruction that is part of the name.
-
-     v16qi __builtin_ia32_pcmpestrm128 (v16qi, int, v16qi, int, const int)
-     int __builtin_ia32_pcmpestri128 (v16qi, int, v16qi, int, const int)
-     int __builtin_ia32_pcmpestria128 (v16qi, int, v16qi, int, const int)
-     int __builtin_ia32_pcmpestric128 (v16qi, int, v16qi, int, const int)
-     int __builtin_ia32_pcmpestrio128 (v16qi, int, v16qi, int, const int)
-     int __builtin_ia32_pcmpestris128 (v16qi, int, v16qi, int, const int)
-     int __builtin_ia32_pcmpestriz128 (v16qi, int, v16qi, int, const int)
-     v16qi __builtin_ia32_pcmpistrm128 (v16qi, v16qi, const int)
-     int __builtin_ia32_pcmpistri128 (v16qi, v16qi, const int)
-     int __builtin_ia32_pcmpistria128 (v16qi, v16qi, const int)
-     int __builtin_ia32_pcmpistric128 (v16qi, v16qi, const int)
-     int __builtin_ia32_pcmpistrio128 (v16qi, v16qi, const int)
-     int __builtin_ia32_pcmpistris128 (v16qi, v16qi, const int)
-     int __builtin_ia32_pcmpistriz128 (v16qi, v16qi, const int)
-     v2di __builtin_ia32_pcmpgtq (v2di, v2di)
-The following built-in functions are available when -msse4.2 is used.
-
-unsigned int __builtin_ia32_crc32qi (unsigned int, unsigned char)
-Generates the crc32b machine instruction. 
-unsigned int __builtin_ia32_crc32hi (unsigned int, unsigned short)
-Generates the crc32w machine instruction. 
-unsigned int __builtin_ia32_crc32si (unsigned int, unsigned int)
-Generates the crc32l machine instruction. 
-unsigned long long __builtin_ia32_crc32di (unsigned long long, unsigned long long)
-Generates the crc32q machine instruction.
-The following built-in functions are changed to generate new SSE4.2 instructions when -msse4.2 is used.
-
-int __builtin_popcount (unsigned int)
-Generates the popcntl machine instruction. 
-int __builtin_popcountl (unsigned long)
-Generates the popcntl or popcntq machine instruction, depending on the size of unsigned long. 
-int __builtin_popcountll (unsigned long long)
-Generates the popcntq machine instruction.
-
-*/
-
-#endif
-
-/* avx
-The following built-in functions are available when -mavx is used.
-All of them generate the machine instruction that is part of the name.
-
-     v4df __builtin_ia32_addpd256 (v4df,v4df)
-     v8sf __builtin_ia32_addps256 (v8sf,v8sf)
-     v4df __builtin_ia32_addsubpd256 (v4df,v4df)
-     v8sf __builtin_ia32_addsubps256 (v8sf,v8sf)
-     v4df __builtin_ia32_andnpd256 (v4df,v4df)
-     v8sf __builtin_ia32_andnps256 (v8sf,v8sf)
-     v4df __builtin_ia32_andpd256 (v4df,v4df)
-     v8sf __builtin_ia32_andps256 (v8sf,v8sf)
-     v4df __builtin_ia32_blendpd256 (v4df,v4df,int)
-     v8sf __builtin_ia32_blendps256 (v8sf,v8sf,int)
-     v4df __builtin_ia32_blendvpd256 (v4df,v4df,v4df)
-     v8sf __builtin_ia32_blendvps256 (v8sf,v8sf,v8sf)
-     v2df __builtin_ia32_cmppd (v2df,v2df,int)
-     v4df __builtin_ia32_cmppd256 (v4df,v4df,int)
-     v4sf __builtin_ia32_cmpps (v4sf,v4sf,int)
-     v8sf __builtin_ia32_cmpps256 (v8sf,v8sf,int)
-     v2df __builtin_ia32_cmpsd (v2df,v2df,int)
-     v4sf __builtin_ia32_cmpss (v4sf,v4sf,int)
-     v4df __builtin_ia32_cvtdq2pd256 (v4si)
-     v8sf __builtin_ia32_cvtdq2ps256 (v8si)
-     v4si __builtin_ia32_cvtpd2dq256 (v4df)
-     v4sf __builtin_ia32_cvtpd2ps256 (v4df)
-     v8si __builtin_ia32_cvtps2dq256 (v8sf)
-     v4df __builtin_ia32_cvtps2pd256 (v4sf)
-     v4si __builtin_ia32_cvttpd2dq256 (v4df)
-     v8si __builtin_ia32_cvttps2dq256 (v8sf)
-     v4df __builtin_ia32_divpd256 (v4df,v4df)
-     v8sf __builtin_ia32_divps256 (v8sf,v8sf)
-     v8sf __builtin_ia32_dpps256 (v8sf,v8sf,int)
-     v4df __builtin_ia32_haddpd256 (v4df,v4df)
-     v8sf __builtin_ia32_haddps256 (v8sf,v8sf)
-     v4df __builtin_ia32_hsubpd256 (v4df,v4df)
-     v8sf __builtin_ia32_hsubps256 (v8sf,v8sf)
-     v32qi __builtin_ia32_lddqu256 (pcchar)
-     v32qi __builtin_ia32_loaddqu256 (pcchar)
-     v4df __builtin_ia32_loadupd256 (pcdouble)
-     v8sf __builtin_ia32_loadups256 (pcfloat)
-     v2df __builtin_ia32_maskloadpd (pcv2df,v2df)
-     v4df __builtin_ia32_maskloadpd256 (pcv4df,v4df)
-     v4sf __builtin_ia32_maskloadps (pcv4sf,v4sf)
-     v8sf __builtin_ia32_maskloadps256 (pcv8sf,v8sf)
-     void __builtin_ia32_maskstorepd (pv2df,v2df,v2df)
-     void __builtin_ia32_maskstorepd256 (pv4df,v4df,v4df)
-     void __builtin_ia32_maskstoreps (pv4sf,v4sf,v4sf)
-     void __builtin_ia32_maskstoreps256 (pv8sf,v8sf,v8sf)
-     v4df __builtin_ia32_maxpd256 (v4df,v4df)
-     v8sf __builtin_ia32_maxps256 (v8sf,v8sf)
-     v4df __builtin_ia32_minpd256 (v4df,v4df)
-     v8sf __builtin_ia32_minps256 (v8sf,v8sf)
-     v4df __builtin_ia32_movddup256 (v4df)
-     int __builtin_ia32_movmskpd256 (v4df)
-     int __builtin_ia32_movmskps256 (v8sf)
-     v8sf __builtin_ia32_movshdup256 (v8sf)
-     v8sf __builtin_ia32_movsldup256 (v8sf)
-     v4df __builtin_ia32_mulpd256 (v4df,v4df)
-     v8sf __builtin_ia32_mulps256 (v8sf,v8sf)
-     v4df __builtin_ia32_orpd256 (v4df,v4df)
-     v8sf __builtin_ia32_orps256 (v8sf,v8sf)
-     v2df __builtin_ia32_pd_pd256 (v4df)
-     v4df __builtin_ia32_pd256_pd (v2df)
-     v4sf __builtin_ia32_ps_ps256 (v8sf)
-     v8sf __builtin_ia32_ps256_ps (v4sf)
-     int __builtin_ia32_ptestc256 (v4di,v4di,ptest)
-     int __builtin_ia32_ptestnzc256 (v4di,v4di,ptest)
-     int __builtin_ia32_ptestz256 (v4di,v4di,ptest)
-     v8sf __builtin_ia32_rcpps256 (v8sf)
-     v4df __builtin_ia32_roundpd256 (v4df,int)
-     v8sf __builtin_ia32_roundps256 (v8sf,int)
-     v8sf __builtin_ia32_rsqrtps_nr256 (v8sf)
-     v8sf __builtin_ia32_rsqrtps256 (v8sf)
-     v4df __builtin_ia32_shufpd256 (v4df,v4df,int)
-     v8sf __builtin_ia32_shufps256 (v8sf,v8sf,int)
-     v4si __builtin_ia32_si_si256 (v8si)
-     v8si __builtin_ia32_si256_si (v4si)
-     v4df __builtin_ia32_sqrtpd256 (v4df)
-     v8sf __builtin_ia32_sqrtps_nr256 (v8sf)
-     v8sf __builtin_ia32_sqrtps256 (v8sf)
-     void __builtin_ia32_storedqu256 (pchar,v32qi)
-     void __builtin_ia32_storeupd256 (pdouble,v4df)
-     void __builtin_ia32_storeups256 (pfloat,v8sf)
-     v4df __builtin_ia32_subpd256 (v4df,v4df)
-     v8sf __builtin_ia32_subps256 (v8sf,v8sf)
-     v4df __builtin_ia32_unpckhpd256 (v4df,v4df)
-     v8sf __builtin_ia32_unpckhps256 (v8sf,v8sf)
-     v4df __builtin_ia32_unpcklpd256 (v4df,v4df)
-     v8sf __builtin_ia32_unpcklps256 (v8sf,v8sf)
-     v4df __builtin_ia32_vbroadcastf128_pd256 (pcv2df)
-     v8sf __builtin_ia32_vbroadcastf128_ps256 (pcv4sf)
-     v4df __builtin_ia32_vbroadcastsd256 (pcdouble)
-     v4sf __builtin_ia32_vbroadcastss (pcfloat)
-     v8sf __builtin_ia32_vbroadcastss256 (pcfloat)
-     v2df __builtin_ia32_vextractf128_pd256 (v4df,int)
-     v4sf __builtin_ia32_vextractf128_ps256 (v8sf,int)
-     v4si __builtin_ia32_vextractf128_si256 (v8si,int)
-     v4df __builtin_ia32_vinsertf128_pd256 (v4df,v2df,int)
-     v8sf __builtin_ia32_vinsertf128_ps256 (v8sf,v4sf,int)
-     v8si __builtin_ia32_vinsertf128_si256 (v8si,v4si,int)
-     v4df __builtin_ia32_vperm2f128_pd256 (v4df,v4df,int)
-     v8sf __builtin_ia32_vperm2f128_ps256 (v8sf,v8sf,int)
-     v8si __builtin_ia32_vperm2f128_si256 (v8si,v8si,int)
-     v2df __builtin_ia32_vpermil2pd (v2df,v2df,v2di,int)
-     v4df __builtin_ia32_vpermil2pd256 (v4df,v4df,v4di,int)
-     v4sf __builtin_ia32_vpermil2ps (v4sf,v4sf,v4si,int)
-     v8sf __builtin_ia32_vpermil2ps256 (v8sf,v8sf,v8si,int)
-     v2df __builtin_ia32_vpermilpd (v2df,int)
-     v4df __builtin_ia32_vpermilpd256 (v4df,int)
-     v4sf __builtin_ia32_vpermilps (v4sf,int)
-     v8sf __builtin_ia32_vpermilps256 (v8sf,int)
-     v2df __builtin_ia32_vpermilvarpd (v2df,v2di)
-     v4df __builtin_ia32_vpermilvarpd256 (v4df,v4di)
-     v4sf __builtin_ia32_vpermilvarps (v4sf,v4si)
-     v8sf __builtin_ia32_vpermilvarps256 (v8sf,v8si)
-     int __builtin_ia32_vtestcpd (v2df,v2df,ptest)
-     int __builtin_ia32_vtestcpd256 (v4df,v4df,ptest)
-     int __builtin_ia32_vtestcps (v4sf,v4sf,ptest)
-     int __builtin_ia32_vtestcps256 (v8sf,v8sf,ptest)
-     int __builtin_ia32_vtestnzcpd (v2df,v2df,ptest)
-     int __builtin_ia32_vtestnzcpd256 (v4df,v4df,ptest)
-     int __builtin_ia32_vtestnzcps (v4sf,v4sf,ptest)
-     int __builtin_ia32_vtestnzcps256 (v8sf,v8sf,ptest)
-     int __builtin_ia32_vtestzpd (v2df,v2df,ptest)
-     int __builtin_ia32_vtestzpd256 (v4df,v4df,ptest)
-     int __builtin_ia32_vtestzps (v4sf,v4sf,ptest)
-     int __builtin_ia32_vtestzps256 (v8sf,v8sf,ptest)
-     void __builtin_ia32_vzeroall (void)
-     void __builtin_ia32_vzeroupper (void)
-     v4df __builtin_ia32_xorpd256 (v4df,v4df)
-     v8sf __builtin_ia32_xorps256 (v8sf,v8sf)
-
-
-
-*/
-
-#ifdef __AES__
-/*
- * AES-NI instruction set
- * includes PCMUL
- */
-
-/* AES-NI aes
- */
-
-   
-/* v2di __builtin_ia32_aesenc128 (v2di, v2di) */
-static __inline__
-v128_u8_t op_AESENC (register v128_u8_t state, register const v128_u8_t round_key)
-{
-    return (v128_u8_t)__builtin_ia32_aesenc128 ((v128_lli_t)state,
-                                               (v128_lli_t)round_key);
-}
-
-
-/* v2di __builtin_ia32_aesenclast128 (v2di, v2di) */
-static __inline__
-v128_u8_t op_AESENCLAST (register v128_u8_t state,
-                        register const v128_u8_t round_key)
-{
-    return (v128_u8_t)__builtin_ia32_aesenclast128 ((v128_lli_t)state,
-                                                   (v128_lli_t)round_key);
-}
-
-
-/* v2di __builtin_ia32_aesdec128 (v2di, v2di) */
-static __inline__
-v128_u8_t op_AESDEC (register v128_u8_t state, register const v128_u8_t round_key)
-{
-    return (v128_u8_t)__builtin_ia32_aesdec128 ((v128_lli_t)state,
-                                               (v128_lli_t)round_key);
-}
-
-
-/* v2di __builtin_ia32_aesdeclast128 (v2di, v2di) */
-static __inline__
-v128_u8_t op_AESDECLAST (register v128_u8_t state,
-                        register const v128_u8_t round_key)
-{
-    return (v128_u8_t)__builtin_ia32_aesdeclast128 ((v128_lli_t)state,
-                                                   (v128_lli_t)round_key);
-}
-
-
-/* v2di __builtin_ia32_aeskeygenassist128 (v2di, const int) */
-static __inline__
-v128_u8_t op_AESKEYGENASSIST (register const v128_u8_t round_key,
-                             const int rcon ) __attribute__ ((always_inline));
-static __inline__
-v128_u8_t op_AESKEYGENASSIST (register const v128_u8_t round_key,
-                             const int rcon )
-{
-    return (v128_u8_t)__builtin_ia32_aeskeygenassist128 ((v128_lli_t)round_key, rcon);
-}
-
-#define op_AESKEYGENASSIST( round_key, rcon ) \
-    (v128_u8_t) __builtin_ia32_aeskeygenassist128 ((v128_lli_t) (round_key), rcon)
-
-
-/* v2di __builtin_ia32_aesimc128 (v2di) */
-static __inline__
-v128_u8_t op_AESIMC (register const v128_u8_t round_key)
-{
-    return (v128_u8_t)__builtin_ia32_aesimc128 ((v128_lli_t)round_key);
-}
-
-/* pclmul
-v2di __builtin_ia32_pclmulqdq128 (v2di, v2di, const int)
-*/
-#endif
-
-#ifdef __SSE5__
-/* sse5
-     v2df __builtin_ia32_comeqpd (v2df, v2df)
-     v2df __builtin_ia32_comeqps (v2df, v2df)
-     v4sf __builtin_ia32_comeqsd (v4sf, v4sf)
-     v4sf __builtin_ia32_comeqss (v4sf, v4sf)
-     v2df __builtin_ia32_comfalsepd (v2df, v2df)
-     v2df __builtin_ia32_comfalseps (v2df, v2df)
-     v4sf __builtin_ia32_comfalsesd (v4sf, v4sf)
-     v4sf __builtin_ia32_comfalsess (v4sf, v4sf)
-     v2df __builtin_ia32_comgepd (v2df, v2df)
-     v2df __builtin_ia32_comgeps (v2df, v2df)
-     v4sf __builtin_ia32_comgesd (v4sf, v4sf)
-     v4sf __builtin_ia32_comgess (v4sf, v4sf)
-     v2df __builtin_ia32_comgtpd (v2df, v2df)
-     v2df __builtin_ia32_comgtps (v2df, v2df)
-     v4sf __builtin_ia32_comgtsd (v4sf, v4sf)
-     v4sf __builtin_ia32_comgtss (v4sf, v4sf)
-     v2df __builtin_ia32_comlepd (v2df, v2df)
-     v2df __builtin_ia32_comleps (v2df, v2df)
-     v4sf __builtin_ia32_comlesd (v4sf, v4sf)
-     v4sf __builtin_ia32_comless (v4sf, v4sf)
-     v2df __builtin_ia32_comltpd (v2df, v2df)
-     v2df __builtin_ia32_comltps (v2df, v2df)
-     v4sf __builtin_ia32_comltsd (v4sf, v4sf)
-     v4sf __builtin_ia32_comltss (v4sf, v4sf)
-     v2df __builtin_ia32_comnepd (v2df, v2df)
-     v2df __builtin_ia32_comneps (v2df, v2df)
-     v4sf __builtin_ia32_comnesd (v4sf, v4sf)
-     v4sf __builtin_ia32_comness (v4sf, v4sf)
-     v2df __builtin_ia32_comordpd (v2df, v2df)
-     v2df __builtin_ia32_comordps (v2df, v2df)
-     v4sf __builtin_ia32_comordsd (v4sf, v4sf)
-     v4sf __builtin_ia32_comordss (v4sf, v4sf)
-     v2df __builtin_ia32_comtruepd (v2df, v2df)
-     v2df __builtin_ia32_comtrueps (v2df, v2df)
-     v4sf __builtin_ia32_comtruesd (v4sf, v4sf)
-     v4sf __builtin_ia32_comtruess (v4sf, v4sf)
-     v2df __builtin_ia32_comueqpd (v2df, v2df)
-     v2df __builtin_ia32_comueqps (v2df, v2df)
-     v4sf __builtin_ia32_comueqsd (v4sf, v4sf)
-     v4sf __builtin_ia32_comueqss (v4sf, v4sf)
-     v2df __builtin_ia32_comugepd (v2df, v2df)
-     v2df __builtin_ia32_comugeps (v2df, v2df)
-     v4sf __builtin_ia32_comugesd (v4sf, v4sf)
-     v4sf __builtin_ia32_comugess (v4sf, v4sf)
-     v2df __builtin_ia32_comugtpd (v2df, v2df)
-     v2df __builtin_ia32_comugtps (v2df, v2df)
-     v4sf __builtin_ia32_comugtsd (v4sf, v4sf)
-     v4sf __builtin_ia32_comugtss (v4sf, v4sf)
-     v2df __builtin_ia32_comulepd (v2df, v2df)
-     v2df __builtin_ia32_comuleps (v2df, v2df)
-     v4sf __builtin_ia32_comulesd (v4sf, v4sf)
-     v4sf __builtin_ia32_comuless (v4sf, v4sf)
-     v2df __builtin_ia32_comultpd (v2df, v2df)
-     v2df __builtin_ia32_comultps (v2df, v2df)
-     v4sf __builtin_ia32_comultsd (v4sf, v4sf)
-     v4sf __builtin_ia32_comultss (v4sf, v4sf)
-     v2df __builtin_ia32_comunepd (v2df, v2df)
-     v2df __builtin_ia32_comuneps (v2df, v2df)
-     v4sf __builtin_ia32_comunesd (v4sf, v4sf)
-     v4sf __builtin_ia32_comuness (v4sf, v4sf)
-     v2df __builtin_ia32_comunordpd (v2df, v2df)
-     v2df __builtin_ia32_comunordps (v2df, v2df)
-     v4sf __builtin_ia32_comunordsd (v4sf, v4sf)
-     v4sf __builtin_ia32_comunordss (v4sf, v4sf)
-     v2df __builtin_ia32_fmaddpd (v2df, v2df, v2df)
-     v4sf __builtin_ia32_fmaddps (v4sf, v4sf, v4sf)
-     v2df __builtin_ia32_fmaddsd (v2df, v2df, v2df)
-     v4sf __builtin_ia32_fmaddss (v4sf, v4sf, v4sf)
-     v2df __builtin_ia32_fmsubpd (v2df, v2df, v2df)
-     v4sf __builtin_ia32_fmsubps (v4sf, v4sf, v4sf)
-     v2df __builtin_ia32_fmsubsd (v2df, v2df, v2df)
-     v4sf __builtin_ia32_fmsubss (v4sf, v4sf, v4sf)
-     v2df __builtin_ia32_fnmaddpd (v2df, v2df, v2df)
-     v4sf __builtin_ia32_fnmaddps (v4sf, v4sf, v4sf)
-     v2df __builtin_ia32_fnmaddsd (v2df, v2df, v2df)
-     v4sf __builtin_ia32_fnmaddss (v4sf, v4sf, v4sf)
-     v2df __builtin_ia32_fnmsubpd (v2df, v2df, v2df)
-     v4sf __builtin_ia32_fnmsubps (v4sf, v4sf, v4sf)
-     v2df __builtin_ia32_fnmsubsd (v2df, v2df, v2df)
-     v4sf __builtin_ia32_fnmsubss (v4sf, v4sf, v4sf)
-     v2df __builtin_ia32_frczpd (v2df)
-     v4sf __builtin_ia32_frczps (v4sf)
-     v2df __builtin_ia32_frczsd (v2df, v2df)
-     v4sf __builtin_ia32_frczss (v4sf, v4sf)
-     v2di __builtin_ia32_pcmov (v2di, v2di, v2di)
-     v2di __builtin_ia32_pcmov_v2di (v2di, v2di, v2di)
-     v4si __builtin_ia32_pcmov_v4si (v4si, v4si, v4si)
-     v8hi __builtin_ia32_pcmov_v8hi (v8hi, v8hi, v8hi)
-     v16qi __builtin_ia32_pcmov_v16qi (v16qi, v16qi, v16qi)
-     v2df __builtin_ia32_pcmov_v2df (v2df, v2df, v2df)
-     v4sf __builtin_ia32_pcmov_v4sf (v4sf, v4sf, v4sf)
-     v16qi __builtin_ia32_pcomeqb (v16qi, v16qi)
-     v8hi __builtin_ia32_pcomeqw (v8hi, v8hi)
-     v4si __builtin_ia32_pcomeqd (v4si, v4si)
-     v2di __builtin_ia32_pcomeqq (v2di, v2di)
-     v16qi __builtin_ia32_pcomequb (v16qi, v16qi)
-     v4si __builtin_ia32_pcomequd (v4si, v4si)
-     v2di __builtin_ia32_pcomequq (v2di, v2di)
-     v8hi __builtin_ia32_pcomequw (v8hi, v8hi)
-     v8hi __builtin_ia32_pcomeqw (v8hi, v8hi)
-     v16qi __builtin_ia32_pcomfalseb (v16qi, v16qi)
-     v4si __builtin_ia32_pcomfalsed (v4si, v4si)
-     v2di __builtin_ia32_pcomfalseq (v2di, v2di)
-     v16qi __builtin_ia32_pcomfalseub (v16qi, v16qi)
-     v4si __builtin_ia32_pcomfalseud (v4si, v4si)
-     v2di __builtin_ia32_pcomfalseuq (v2di, v2di)
-     v8hi __builtin_ia32_pcomfalseuw (v8hi, v8hi)
-     v8hi __builtin_ia32_pcomfalsew (v8hi, v8hi)
-     v16qi __builtin_ia32_pcomgeb (v16qi, v16qi)
-     v4si __builtin_ia32_pcomged (v4si, v4si)
-     v2di __builtin_ia32_pcomgeq (v2di, v2di)
-     v16qi __builtin_ia32_pcomgeub (v16qi, v16qi)
-     v4si __builtin_ia32_pcomgeud (v4si, v4si)
-     v2di __builtin_ia32_pcomgeuq (v2di, v2di)
-     v8hi __builtin_ia32_pcomgeuw (v8hi, v8hi)
-     v8hi __builtin_ia32_pcomgew (v8hi, v8hi)
-     v16qi __builtin_ia32_pcomgtb (v16qi, v16qi)
-     v4si __builtin_ia32_pcomgtd (v4si, v4si)
-     v2di __builtin_ia32_pcomgtq (v2di, v2di)
-     v16qi __builtin_ia32_pcomgtub (v16qi, v16qi)
-     v4si __builtin_ia32_pcomgtud (v4si, v4si)
-     v2di __builtin_ia32_pcomgtuq (v2di, v2di)
-     v8hi __builtin_ia32_pcomgtuw (v8hi, v8hi)
-     v8hi __builtin_ia32_pcomgtw (v8hi, v8hi)
-     v16qi __builtin_ia32_pcomleb (v16qi, v16qi)
-     v4si __builtin_ia32_pcomled (v4si, v4si)
-     v2di __builtin_ia32_pcomleq (v2di, v2di)
-     v16qi __builtin_ia32_pcomleub (v16qi, v16qi)
-     v4si __builtin_ia32_pcomleud (v4si, v4si)
-     v2di __builtin_ia32_pcomleuq (v2di, v2di)
-     v8hi __builtin_ia32_pcomleuw (v8hi, v8hi)
-     v8hi __builtin_ia32_pcomlew (v8hi, v8hi)
-     v16qi __builtin_ia32_pcomltb (v16qi, v16qi)
-     v4si __builtin_ia32_pcomltd (v4si, v4si)
-     v2di __builtin_ia32_pcomltq (v2di, v2di)
-     v16qi __builtin_ia32_pcomltub (v16qi, v16qi)
-     v4si __builtin_ia32_pcomltud (v4si, v4si)
-     v2di __builtin_ia32_pcomltuq (v2di, v2di)
-     v8hi __builtin_ia32_pcomltuw (v8hi, v8hi)
-     v8hi __builtin_ia32_pcomltw (v8hi, v8hi)
-     v16qi __builtin_ia32_pcomneb (v16qi, v16qi)
-     v4si __builtin_ia32_pcomned (v4si, v4si)
-     v2di __builtin_ia32_pcomneq (v2di, v2di)
-     v16qi __builtin_ia32_pcomneub (v16qi, v16qi)
-     v4si __builtin_ia32_pcomneud (v4si, v4si)
-     v2di __builtin_ia32_pcomneuq (v2di, v2di)
-     v8hi __builtin_ia32_pcomneuw (v8hi, v8hi)
-     v8hi __builtin_ia32_pcomnew (v8hi, v8hi)
-     v16qi __builtin_ia32_pcomtrueb (v16qi, v16qi)
-     v4si __builtin_ia32_pcomtrued (v4si, v4si)
-     v2di __builtin_ia32_pcomtrueq (v2di, v2di)
-     v16qi __builtin_ia32_pcomtrueub (v16qi, v16qi)
-     v4si __builtin_ia32_pcomtrueud (v4si, v4si)
-     v2di __builtin_ia32_pcomtrueuq (v2di, v2di)
-     v8hi __builtin_ia32_pcomtrueuw (v8hi, v8hi)
-     v8hi __builtin_ia32_pcomtruew (v8hi, v8hi)
-     v4df __builtin_ia32_permpd (v2df, v2df, v16qi)
-     v4sf __builtin_ia32_permps (v4sf, v4sf, v16qi)
-     v4si __builtin_ia32_phaddbd (v16qi)
-     v2di __builtin_ia32_phaddbq (v16qi)
-     v8hi __builtin_ia32_phaddbw (v16qi)
-     v2di __builtin_ia32_phadddq (v4si)
-     v4si __builtin_ia32_phaddubd (v16qi)
-     v2di __builtin_ia32_phaddubq (v16qi)
-     v8hi __builtin_ia32_phaddubw (v16qi)
-     v2di __builtin_ia32_phaddudq (v4si)
-     v4si __builtin_ia32_phadduwd (v8hi)
-     v2di __builtin_ia32_phadduwq (v8hi)
-     v4si __builtin_ia32_phaddwd (v8hi)
-     v2di __builtin_ia32_phaddwq (v8hi)
-     v8hi __builtin_ia32_phsubbw (v16qi)
-     v2di __builtin_ia32_phsubdq (v4si)
-     v4si __builtin_ia32_phsubwd (v8hi)
-     v4si __builtin_ia32_pmacsdd (v4si, v4si, v4si)
-     v2di __builtin_ia32_pmacsdqh (v4si, v4si, v2di)
-     v2di __builtin_ia32_pmacsdql (v4si, v4si, v2di)
-     v4si __builtin_ia32_pmacssdd (v4si, v4si, v4si)
-     v2di __builtin_ia32_pmacssdqh (v4si, v4si, v2di)
-     v2di __builtin_ia32_pmacssdql (v4si, v4si, v2di)
-     v4si __builtin_ia32_pmacsswd (v8hi, v8hi, v4si)
-     v8hi __builtin_ia32_pmacssww (v8hi, v8hi, v8hi)
-     v4si __builtin_ia32_pmacswd (v8hi, v8hi, v4si)
-     v8hi __builtin_ia32_pmacsww (v8hi, v8hi, v8hi)
-     v4si __builtin_ia32_pmadcsswd (v8hi, v8hi, v4si)
-     v4si __builtin_ia32_pmadcswd (v8hi, v8hi, v4si)
-     v16qi __builtin_ia32_pperm (v16qi, v16qi, v16qi)
-     v16qi __builtin_ia32_protb (v16qi, v16qi)
-     v4si __builtin_ia32_protd (v4si, v4si)
-     v2di __builtin_ia32_protq (v2di, v2di)
-     v8hi __builtin_ia32_protw (v8hi, v8hi)
-     v16qi __builtin_ia32_pshab (v16qi, v16qi)
-     v4si __builtin_ia32_pshad (v4si, v4si)
-     v2di __builtin_ia32_pshaq (v2di, v2di)
-     v8hi __builtin_ia32_pshaw (v8hi, v8hi)
-     v16qi __builtin_ia32_pshlb (v16qi, v16qi)
-     v4si __builtin_ia32_pshld (v4si, v4si)
-     v2di __builtin_ia32_pshlq (v2di, v2di)
-     v8hi __builtin_ia32_pshlw (v8hi, v8hi)
-The following builtin-in functions are available when -msse5 is used.
-The second argument must be an integer constant and generate the machine
-instruction that is part of the name with the `_imm' suffix removed.
-
-     v16qi __builtin_ia32_protb_imm (v16qi, int)
-     v4si __builtin_ia32_protd_imm (v4si, int)
-     v2di __builtin_ia32_protq_imm (v2di, int)
-     v8hi __builtin_ia32_protw_imm (v8hi, int)
-
-
-*/
-#endif
-
-#endif /* if USE_VECREG */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_v128_ */
diff --git a/interfaces/cc/gcc/va_copy.h b/interfaces/cc/gcc/va_copy.h
deleted file mode 100644
index 34fb64f..0000000
--- a/interfaces/cc/gcc/va_copy.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_va_copy_
-#define _h_va_copy_
-
-/* GCC may internally undef 'va_copy' upon include of stdarg.h
-   force it to be included before defining va_copy */
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* kludge - GCC stdarg has this line:
-   #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L
-   fix build for c99 */
-#if ! defined va_copy && defined __va_copy
-#define va_copy __va_copy
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_va_copy_ */
diff --git a/interfaces/cc/gcc/x86_64/arch-impl.h b/interfaces/cc/gcc/x86_64/arch-impl.h
deleted file mode 100644
index dbfe011..0000000
--- a/interfaces/cc/gcc/x86_64/arch-impl.h
+++ /dev/null
@@ -1,459 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_arch_impl_
-#define _h_arch_impl_
-
-#include <stdint.h>
-
-/* Intel versions from 11.0 through 13.0 mangle certain shift
- * statements in inline assembly. */
-#if defined(__INTEL_COMPILER)  &&  __INTEL_COMPILER_BUILD_DATE >= 20090131 \
-    &&  __INTEL_COMPILER_BUILD_DATE < 20130607 
-#  define HAVE_ICC_SHIFT_BUG 1 
-#endif
-
-#ifndef USE_GCC_BUILTIN
-#define USE_GCC_BUILTIN 1
-#endif
-
-#if USE_GCC_BUILTIN
-#include <strings.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-static __inline__
-int16_t uint16_lsbit ( uint16_t self )
-{
-    int16_t rtn;
-#if USE_GCC_BUILTIN
-    rtn = ( int16_t ) __builtin_ffs ( self ) - 1;
-#else
-    __asm__ __volatile__
-    (
-        "bsf %%ax, %%ax;"
-        "jnz 1f;"
-        "xor %%eax, %%eax;"
-        "dec %%eax;"
-        "1:"
-        : "=a" ( rtn )
-        : "a" ( self )
-    );
-#endif
-    return rtn;
-}
-
-static __inline__
-int32_t uint32_lsbit ( uint32_t self )
-{
-    int32_t rtn;
-#if USE_GCC_BUILTIN
-    rtn = __builtin_ffs ( self ) - 1;
-#else
-    __asm__ __volatile__
-    (
-        "bsf %%eax, %%eax;"
-        "jnz 1f;"
-        "xor %%eax, %%eax;"
-        "dec %%eax;"
-        "1:"
-        : "=a" ( rtn )
-        : "a" ( self )
-    );
-#endif
-    return rtn;
-}
-
-static __inline__
-int16_t uint16_msbit ( uint16_t self )
-{
-    int16_t rtn;
-#if USE_GCC_BUILTIN
-    if ( self == 0 ) return -1;
-    rtn = ( int16_t ) 31 - __builtin_clz ( ( uint32_t ) self );
-#else
-    __asm__ __volatile__
-    (
-        "bsr %%ax, %%ax;"
-        "jnz 1f;"
-        "xor %%eax, %%eax;"
-        "dec %%eax;"
-        "1:"
-        : "=a" ( rtn )
-        : "a" ( self )
-    );
-#endif
-    return rtn;
-}
-
-static __inline__
-int32_t uint32_msbit ( uint32_t self )
-{
-    int32_t rtn;
-#if USE_GCC_BUILTIN
-    if ( self == 0 ) return -1;
-    rtn = 31 - __builtin_clz ( self );
-#else
-    __asm__ __volatile__
-    (
-        "bsr %%eax, %%eax;"
-        "jnz 1f;"
-        "xor %%eax, %%eax;"
-        "dec %%eax;"
-        "1:"
-        : "=a" ( rtn )
-        : "a" ( self )
-    );
-#endif
-    return rtn;
-}
-
-typedef struct int128_t int128_t;
-struct int128_t
-{
-    uint64_t lo;
-    int64_t hi;
-};
-
-static __inline__
-int64_t int128_hi ( const int128_t *self )
-{
-    return self -> hi;
-}
-
-static __inline__
-uint64_t int128_lo ( const int128_t *self )
-{
-    return self -> lo;
-}
-
-static __inline__
-void int128_sethi ( int128_t *self, int64_t i )
-{
-    self -> hi = i;
-}
-
-static __inline__
-void int128_setlo ( int128_t *self, uint64_t i )
-{
-    self -> lo = i;
-}
-
-typedef struct uint128_t uint128_t;
-struct uint128_t
-{
-    uint64_t lo;
-    uint64_t hi;
-};
-
-static __inline__
-uint64_t uint128_hi ( const uint128_t *self )
-{
-    return self -> hi;
-}
-
-static __inline__
-uint64_t uint128_lo ( const uint128_t *self )
-{
-    return self -> lo;
-}
-
-static __inline__
-void uint128_sethi ( uint128_t *self, uint64_t i )
-{
-    self -> hi = i;
-}
-
-static __inline__
-void uint128_setlo ( uint128_t *self, uint64_t i )
-{
-    self -> lo = i;
-}
-
-static __inline__
-void int128_add ( int128_t *self, const int128_t *i )
-{
-    __asm__ __volatile__
-    (
-        "mov (%%rsi), %%rax;"
-        "mov 8(%%rsi), %%rcx;"
-        "add %%rax, (%%rdi);"
-        "adc %%rcx, 8(%%rdi);"
-        :
-        : "D" ( self ), "S" ( i )
-        : "%rax", "%rcx"
-    );
-}
-
-static __inline__
-void int128_sub ( int128_t *self, const int128_t *i )
-{
-    __asm__ __volatile__
-    (
-        "mov (%%rsi), %%rax;"
-        "mov 8(%%rsi), %%rcx;"
-        "sub %%rax, (%%rdi);"
-        "sbb %%rcx, 8(%%rdi);"
-        :
-        : "D" ( self ), "S" ( i )
-        : "%rax", "%rcx"
-    );
-}
-
-static __inline__
-void int128_sar ( int128_t *self, uint32_t i )
-{
-    __asm__ __volatile__
-    (
-        "mov %%esi, %%ecx;"
-        "mov 8(%%rdi), %%rax;"
-        "shrd %%cl, %%rax, (%%rdi);"
-        "sar %%cl, %%rax;"
-        "mov %%rax, 8(%%rdi);"
-        :
-        : "D" ( self ), "S" ( i )
-        :  "%rax", "%rcx"
-    );
-}
-
-static __inline__
-void int128_shl ( int128_t *self, uint32_t i )
-{
-    __asm__ __volatile__
-    (
-        "mov %%esi, %%ecx;"
-        "mov (%%rdi), %%rax;"
-        "shld %%cl, %%rax, 8(%%rdi);"
-        "shl %%cl, %%rax;"
-        "mov %%rax, (%%rdi);"
-        :
-        : "D" ( self ), "S" ( i )
-        : "%rax", "%rcx"
-    );
-}
-
-static __inline__
-void uint128_and ( uint128_t *self, const uint128_t *i )
-{
-    __asm__ __volatile__
-    (
-        "mov (%%rsi), %%rax;"
-        "mov 8(%%rsi), %%rcx;"
-        "and %%rax, (%%rdi);"
-        "and %%rcx, 8(%%rdi);"
-        :
-        : "D" ( self ), "S" ( i )
-        :"%rax", "%rcx"
-    );
-}
-
-static __inline__
-void uint128_or ( uint128_t *self, const uint128_t *i )
-{
-    __asm__ __volatile__
-    (
-        "mov (%%rsi), %%rax;"
-        "mov 8(%%rsi), %%rcx;"
-        "or %%rax, (%%rdi);"
-        "or %%rcx, 8(%%rdi);"
-        :
-        : "D" ( self ), "S" ( i )
-        :"%rax", "%rcx"
-    );
-}
-
-static __inline__
-void uint128_orlo ( uint128_t *self, uint64_t i )
-{
-    self -> lo |= i;
-}
-
-static __inline__
-void uint128_xor ( uint128_t *self, const uint128_t *i )
-{
-    __asm__ __volatile__
-    (
-        "mov (%%rsi), %%rax;"
-        "mov 8(%%rsi), %%rcx;"
-        "xor %%rax, (%%rdi);"
-        "xor %%rcx, 8(%%rdi);"
-        :
-        : "D" ( self ), "S" ( i )
-        :"%rax", "%rcx"
-    );
-}
-
-static __inline__
-void uint128_not ( uint128_t *self )
-{
-    __asm__ __volatile__
-    (
-        "mov (%%rdi), %%rax;"
-        "mov 8(%%rdi), %%rcx;"
-        "not %%rax;"
-        "not %%rcx;"
-        "mov %%rax, (%%rdi);"
-        "mov %%rcx, 8(%%rdi);"
-        :
-        : "D" ( self )
-        : "%rax", "%rcx"
-    );
-}
-
-static __inline__
-void uint128_shr ( uint128_t *self, uint32_t i )
-{
-#ifdef HAVE_ICC_SHIFT_BUG
-    if (i > 0) {
-        self->lo >>= i;
-        self->lo  |= self->hi << (64 - i);
-        self->hi >>= i;
-    }
-#else
-    __asm__ __volatile__
-    (
-        "mov %%esi, %%ecx;"
-        "mov 8(%%rdi), %%rax;"
-        "shrd %%cl, %%rax, (%%rdi);"
-        "shr %%cl, %%rax;"
-        "mov %%rax, 8(%%rdi);"
-        :
-        : "D" ( self ), "S" ( i )
-        : "%rax", "%rcx"
-    );
-#endif
-}
-
-static __inline__
-void uint128_shl ( uint128_t *self, uint32_t i )
-{
-    __asm__ __volatile__
-    (
-        "mov %%esi, %%ecx;"
-        "mov (%%rdi), %%rax;"
-        "shld %%cl, %%rax, 8(%%rdi);"
-        "shl %%cl, %%rax;"
-        "mov %%rax, (%%rdi);"
-        :
-        : "D" ( self ), "S" ( i )
-        : "%rax", "%rcx"
-    );
-}
-
-static __inline__
-void uint128_bswap ( uint128_t *self )
-{
-    __asm__ __volatile__
-    (
-        "mov (%%rdi), %%rax;"
-        "mov 8(%%rdi), %%rcx;"
-        "bswap %%rax;"
-        "bswap %%rcx;"
-        "mov %%rax, 8(%%rdi);"
-        "mov %%rcx, (%%rdi);"
-        :
-        : "D" ( self )
-        : "%rax", "%rcx"
-    );
-}
-
-static __inline__
-void uint128_bswap_copy ( uint128_t *to, const uint128_t *from )
-{
-    __asm__ __volatile__
-    (
-        "mov (%%rsi), %%rax;"
-        "mov 8(%%rsi), %%rcx;"
-        "bswap %%rax;"
-        "bswap %%rcx;"
-        "mov %%rax, 8(%%rdi);"
-        "mov %%rcx, (%%rdi);"
-        :
-        : "D" ( to ), "S" ( from )
-        : "%rax", "%rcx"
-    );
-}
-
-static __inline__
-uint32_t uint32_rol ( uint32_t val, uint8_t bits )
-{
-    uint32_t rtn;
-    __asm__ __volatile__
-    (
-        "rol %%cl, %%eax;"
-        : "=a" ( rtn )
-        : "a" ( val ), "c" ( bits )
-    );
-    return rtn;
-}
-
-static __inline__
-uint32_t uint32_ror ( uint32_t val, uint8_t bits )
-{
-    uint32_t rtn;
-    __asm__ __volatile__
-    (
-        "ror %%cl, %%eax;"
-        : "=a" ( rtn )
-        : "a" ( val ), "c" ( bits )
-    );
-    return rtn;
-}
-
-static __inline__
-uint64_t uint64_rol ( uint64_t val, uint8_t bits )
-{
-    uint64_t rtn;
-    __asm__ __volatile__
-    (
-        "rol %%cl, %%rax;"
-        : "=a" ( rtn )
-        : "a" ( val ), "c" ( bits )
-    );
-    return rtn;
-}
-
-static __inline__
-uint64_t uint64_ror ( uint64_t val, uint8_t bits )
-{
-    uint64_t rtn;
-    __asm__ __volatile__
-    (
-        "ror %%cl, %%rax;"
-        : "=a" ( rtn )
-        : "a" ( val ), "c" ( bits )
-    );
-    return rtn;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_arch_impl_ */
diff --git a/interfaces/cc/gcc/x86_64/atomic.h b/interfaces/cc/gcc/x86_64/atomic.h
deleted file mode 100644
index 41e3dcb..0000000
--- a/interfaces/cc/gcc/x86_64/atomic.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_atomic_
-#define _h_atomic_
-
-#ifndef _h_atomic32_
-#include "atomic32.h"
-#endif
-
-#ifndef _h_atomic64_
-#include "atomic64.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if DFLT_ATOMIC_BITS == 32
-#define ATOMIC_NAME( suffix ) \
-    atomic32_ ## suffix
-typedef int atomic_int;
-#else
-#define ATOMIC_NAME( suffix ) \
-    atomic64_ ## suffix
-typedef long int atomic_int;
-#endif
-
-typedef struct ATOMIC_NAME ( t ) atomic_t;
-
-typedef struct atomic_ptr_t atomic_ptr_t;
-struct atomic_ptr_t
-{
-    void * volatile ptr;
-};
-
-/* ( * v ) */
-#define atomic_read( v ) \
-    ATOMIC_NAME ( read ) ( v )
-
-/* ( * v ) = i */
-#define atomic_set( v, i ) \
-    ATOMIC_NAME ( set ) ( v, i )
-
-/* prior = ( * v ), ( * v ) += i, prior */
-#define atomic_read_and_add( v, i ) \
-    ATOMIC_NAME ( read_and_add ) ( v, i )
-
-/* ( * v ) += i */
-#define atomic_add( v, i ) \
-    ATOMIC_NAME ( add ) ( v, i )
-
-/* ( * v ) += i */
-#define atomic_add_and_read( v, i ) \
-    ATOMIC_NAME ( add_and_read ) ( v, i )
-
-/* ( void ) ++ ( * v ) */
-#define atomic_inc( v ) \
-    ATOMIC_NAME ( inc ) ( v )
-
-/* ( void ) -- ( * v ) */
-#define atomic_dec( v ) \
-    ATOMIC_NAME ( dec ) ( v )
-
-/* -- ( * v ) == 0 */
-#define atomic_dec_and_test( v ) \
-    ATOMIC_NAME ( dec_and_test ) ( v )
-
-/* ++ ( * v ) == 0
-   when atomic_dec_and_test uses predecrement, you want
-   postincrement to this function. so it isn't very useful */
-#define atomic_inc_and_test( v ) \
-    ATOMIC_NAME ( inc_and_test ) ( v )
-
-/* ( * v ) -- == 0
-   HERE's useful */
-#define atomic_test_and_inc( v ) \
-    ATOMIC_NAME ( test_and_inc ) ( v )
-
-/* prior = ( * v ), ( * v ) = ( prior == t ? s : prior ), prior */
-#define atomic_test_and_set( v, s, t ) \
-    ATOMIC_NAME ( test_and_set ) ( v, s, t )
-
-/* N.B. - THIS FUNCTION IS FOR 64 BIT PTRS ONLY */
-static __inline__
-void *atomic_test_and_set_ptr ( atomic_ptr_t *v, void *s, void *t )
-{
-    void *rtn;
-    __asm__ __volatile__
-    (
-        "lock;"
-        "cmpxchg %%rsi,(%%rdi)"
-        : "=a" ( rtn )
-        : "D" ( v ), "S" ( s ), "a" ( t )
-    );
-    return rtn;
-}
-
-/* val = ( * v ), ( ( * v ) = ( val < t ) ? val + i : val ), val */
-#define atomic_read_and_add_lt( v, i, t ) \
-    ATOMIC_NAME ( read_and_add_lt ) ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val <= t ) ? val + i : val ), val */
-#define atomic_read_and_add_le( v, i, t ) \
-    ATOMIC_NAME ( read_and_add_le ) ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val == t ) ? val + i : val ), val */
-#define atomic_read_and_add_eq( v, i, t ) \
-    ATOMIC_NAME ( read_and_add_eq ) ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val != t ) ? val + i : val ), val */
-#define atomic_read_and_add_ne( v, i, t ) \
-    ATOMIC_NAME ( read_and_add_ne ) ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val >= t ) ? val + i : val ), val */
-#define atomic_read_and_add_ge( v, i, t ) \
-    ATOMIC_NAME ( read_and_add_ge ) ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val > t ) ? val + i : val ), val */
-#define atomic_read_and_add_gt( v, i, t ) \
-    ATOMIC_NAME ( read_and_add_gt ) ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( ( val & 1 ) == 1 ) ? val + i : val ), val */
-#define atomic_read_and_add_odd( v, i ) \
-    ATOMIC_NAME ( read_and_add_odd ) ( v, i )
-
-/* val = ( * v ), ( ( * v ) = ( ( val & 1 ) == 0 ) ? val + i : val ), val */
-#define atomic_read_and_add_even( v, i ) \
-    ATOMIC_NAME ( read_and_add_even ) ( v, i )
-
-/* DEPRECATED */
-
-/* val = ( * v ), ( * v ) = ( val < t ? val + i : val ), ( val < t ? 1 : 0 ) */
-#define atomic_add_if_lt( v, i, t ) \
-    ATOMIC_NAME ( add_if_lt ) ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val <= t ? val + i : val ), ( val <= t ? 1 : 0 ) */
-#define atomic_add_if_le( v, i, t ) \
-    ATOMIC_NAME ( add_if_le ) ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val == t ? val + i : val ), ( val == t ? 1 : 0 ) */
-#define atomic_add_if_eq( v, i, t ) \
-    ATOMIC_NAME ( add_if_eq ) ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val >= t ? val + i : val ), ( val >= t ? 1 : 0 ) */
-#define atomic_add_if_ge( v, i, t ) \
-    ATOMIC_NAME ( add_if_ge ) ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val > t ? val + i : val ), ( val > t ? 1 : 0 ) */
-#define atomic_add_if_gt( v, i, t ) \
-    ATOMIC_NAME ( add_if_gt ) ( v, i, t )
-
-#undef LOCK
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_atomic_ */
diff --git a/interfaces/cc/gcc/x86_64/atomic32.h b/interfaces/cc/gcc/x86_64/atomic32.h
deleted file mode 100644
index 7584643..0000000
--- a/interfaces/cc/gcc/x86_64/atomic32.h
+++ /dev/null
@@ -1,365 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_atomic32_
-#define _h_atomic32_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Make sure gcc doesn't try to be clever and move things around
- * on us. We need to use _exactly_ the address the user gave us,
- * not some alias that contains the same information.
- */
-typedef struct atomic32_t atomic32_t;
-struct atomic32_t
-{
-    volatile int counter;
-};
-
-/* int atomic32_read ( const atomic32_t *v ); */
-#define atomic32_read( v ) \
-    ( ( v ) -> counter )
-
-/* void atomic32_set ( atomic32_t *v, int i ); */
-#define atomic32_set( v, i ) \
-    ( ( void ) ( ( ( v ) -> counter ) = ( i ) ) )
-
-/* add to v -> counter and return the prior value */
-static __inline__ int atomic32_read_and_add ( atomic32_t *v, int i )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "mov %3, %1;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i )
-    );
-    return rtn;
-}
-
-/* if no read is needed, define the least expensive atomic add */
-#define atomic32_add( v, i ) \
-    atomic32_read_and_add ( v, i )
-
-/* add to v -> counter and return the result */
-static __inline__ int atomic32_add_and_read ( atomic32_t *v, int i )
-{
-    int rtn, cmp;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "mov %3, %1;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1,(%2);"
-        "jne 1b;"
-        : "=&a" ( cmp ), "=&r" ( rtn )
-        : "r" ( & v -> counter ), "r" ( i )
-    );
-    return rtn;
-}
-
-/* just don't try to find out what the result was */
-static __inline__ void atomic32_inc ( atomic32_t *v )
-{
-    __asm__ __volatile__
-    (
-    "lock;"
-        "incl %0"
-        : "=m" ( v -> counter )
-        : "m" ( v -> counter )
-    );
-}
-
-static __inline__ void atomic32_dec ( atomic32_t *v )
-{
-    __asm__ __volatile__
-    (
-    "lock;"
-        "decl %0"
-        : "=m" ( v -> counter )
-        : "m" ( v -> counter )
-    );
-}
-
-/* decrement by one and test result for 0 */
-static __inline__ int atomic32_dec_and_test ( atomic32_t *v )
-{
-    unsigned char c;
-    __asm__ __volatile__
-    (
-    "lock;"
-        "decl %1;"
-        "sete %0"
-        : "=r" ( c ), "=m" ( v -> counter )
-        : "m" ( v -> counter )
-    );
-    return c;
-}
-
-/* when atomic32_dec_and_test uses predecrement, you want
-   postincrement to this function. so it isn't very useful */
-static __inline__ int atomic32_inc_and_test ( atomic32_t *v )
-{
-    unsigned char c;
-    __asm__ __volatile__
-    (
-    "lock;"
-        "incl %1;"
-        "sete %0"
-        : "=r" ( c ), "=m" ( v -> counter )
-        : "m" ( v -> counter )
-    );
-    return c;
-}
-
-/* HERE's useful */
-#define atomic32_test_and_inc( v ) \
-    ( atomic32_read_and_add ( v, 1 ) == 0 )
-
-static __inline__ int atomic32_test_and_set ( atomic32_t *v, int s, int t )
-{
-    int rtn;
-    __asm__ __volatile__
-    (
-    "lock;"
-        "cmpxchg %2, (%1)"
-        : "=a" ( rtn )
-        : "r" ( & v -> counter ), "r" ( s ), "a" ( t )
-    );
-    return rtn;
-}
-
-/* conditional modifications */
-static __inline__
-int atomic32_read_and_add_lt ( atomic32_t *v, int i, int t )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "jge 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic32_add_if_lt( v, i, t ) \
-    ( atomic32_read_and_add_lt ( v, i, t ) < ( t ) )
-
-static __inline__
-int atomic32_read_and_add_le ( atomic32_t *v, int i, int t )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "jg 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic32_add_if_le( v, i, t ) \
-    ( atomic32_read_and_add_le ( v, i, t ) <= ( t ) )
-
-static __inline__
-int atomic32_read_and_add_eq ( atomic32_t *v, int i, int t )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "jne 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic32_add_if_eq( v, i, t ) \
-    ( atomic32_read_and_add_eq ( v, i, t ) == ( t ) )
-
-static __inline__
-int atomic32_read_and_add_ne ( atomic32_t *v, int i, int t )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "je 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic32_add_if_ne( v, i, t ) \
-    ( atomic32_read_and_add_ne ( v, i, t ) != ( t ) )
-
-static __inline__
-int atomic32_read_and_add_ge ( atomic32_t *v, int i, int t )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "jl 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic32_add_if_ge( v, i, t ) \
-    ( atomic32_read_and_add_ge ( v, i, t ) >= ( t ) )
-
-static __inline__
-int atomic32_read_and_add_gt ( atomic32_t *v, int i, int t )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "jle 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic32_add_if_gt( v, i, t ) \
-    ( atomic32_read_and_add_gt ( v, i, t ) > ( t ) )
-
-static __inline__
-int atomic32_read_and_add_odd ( atomic32_t *v, int i )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "bt $0, %0;"
-        "mov %3, %1;"
-        "jnc 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i )
-    );
-    return rtn;
-}
-
-static __inline__
-int atomic32_read_and_add_even ( atomic32_t *v, int i )
-{
-    int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "bt $0, %0;"
-        "mov %3, %1;"
-        "jc 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i )
-    );
-    return rtn;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_atomic32_ */
diff --git a/interfaces/cc/gcc/x86_64/atomic64.h b/interfaces/cc/gcc/x86_64/atomic64.h
deleted file mode 100644
index 4a1ce7e..0000000
--- a/interfaces/cc/gcc/x86_64/atomic64.h
+++ /dev/null
@@ -1,365 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_atomic64_
-#define _h_atomic64_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Make sure gcc doesn't try to be clever and move things around
- * on us. We need to use _exactly_ the address the user gave us,
- * not some alias that contains the same information.
- */
-typedef struct atomic64_t atomic64_t;
-struct atomic64_t
-{
-    volatile long int counter;
-};
-
-/* int atomic64_read ( const atomic64_t *v ); */
-#define atomic64_read( v ) \
-    ( ( v ) -> counter )
-
-/* void atomic64_set ( atomic64_t *v, long int i ); */
-#define atomic64_set( v, i ) \
-    ( ( void ) ( ( ( v ) -> counter ) = ( i ) ) )
-
-/* add to v -> counter and return the prior value */
-static __inline__ long int atomic64_read_and_add ( atomic64_t *v, long int i )
-{
-    long int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "mov %3, %1;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i )
-    );
-    return rtn;
-}
-
-/* if no read is needed, define the least expensive atomic add */
-#define atomic64_add( v, i ) \
-    atomic64_read_and_add ( v, i )
-
-/* add to v -> counter and return the result */
-static __inline__ long int atomic64_add_and_read ( atomic64_t *v, long int i )
-{
-    long int rtn, cmp;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "mov %3, %1;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1,(%2);"
-        "jne 1b;"
-        : "=&a" ( cmp ), "=&r" ( rtn )
-        : "r" ( & v -> counter ), "r" ( i )
-    );
-    return rtn;
-}
-
-/* just don't try to find out what the result was */
-static __inline__ void atomic64_inc ( atomic64_t *v )
-{
-    __asm__ __volatile__
-    (
-    "lock;"
-        "incq %0"
-        : "=m" ( v -> counter )
-        : "m" ( v -> counter )
-    );
-}
-
-static __inline__ void atomic64_dec ( atomic64_t *v )
-{
-    __asm__ __volatile__
-    (
-    "lock;"
-        "decq %0"
-        : "=m" ( v -> counter )
-        : "m" ( v -> counter )
-    );
-}
-
-/* decrement by one and test result for 0 */
-static __inline__ int atomic64_dec_and_test ( atomic64_t *v )
-{
-    unsigned char c;
-    __asm__ __volatile__
-    (
-    "lock;"
-        "decq %1;"
-        "sete %0"
-        : "=r" ( c ), "=m" ( v -> counter )
-        : "m" ( v -> counter )
-    );
-    return c;
-}
-
-/* when atomic64_dec_and_test uses predecrement, you want
-   postincrement to this function. so it isn't very useful */
-static __inline__ int atomic64_inc_and_test ( atomic64_t *v )
-{
-    unsigned char c;
-    __asm__ __volatile__
-    (
-    "lock;"
-        "incq %1;"
-        "sete %0"
-        : "=r" ( c ), "=m" ( v -> counter )
-        : "m" ( v -> counter )
-    );
-    return c;
-}
-
-/* HERE's useful */
-#define atomic64_test_and_inc( v ) \
-    ( atomic64_read_and_add ( v, 1L ) == 0 )
-
-static __inline__ long int atomic64_test_and_set ( atomic64_t *v, long int s, long int t )
-{
-    long int rtn;
-    __asm__ __volatile__
-    (
-    "lock;"
-        "cmpxchg %2, (%1)"
-        : "=a" ( rtn )
-        : "r" ( & v -> counter ), "r" ( s ), "a" ( t )
-    );
-    return rtn;
-}
-
-/* conditional modifications */
-static __inline__
-long int atomic64_read_and_add_lt ( atomic64_t *v, long int i, long int t )
-{
-    long int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "jge 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic64_add_if_lt( v, i, t ) \
-    ( atomic64_read_and_add_lt ( v, i, t ) < ( t ) )
-
-static __inline__
-long int atomic64_read_and_add_le ( atomic64_t *v, long int i, long int t )
-{
-    long int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "jg 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic64_add_if_le( v, i, t ) \
-    ( atomic64_read_and_add_le ( v, i, t ) <= ( t ) )
-
-static __inline__
-long int atomic64_read_and_add_eq ( atomic64_t *v, long int i, long int t )
-{
-    long int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "jne 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic64_add_if_eq( v, i, t ) \
-    ( atomic64_read_and_add_eq ( v, i, t ) == ( t ) )
-
-static __inline__
-long int atomic64_read_and_add_ne ( atomic64_t *v, long int i, long int t )
-{
-    long int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "je 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic64_add_if_ne( v, i, t ) \
-    ( atomic64_read_and_add_ne ( v, i, t ) != ( t ) )
-
-static __inline__
-long int atomic64_read_and_add_ge ( atomic64_t *v, long int i, long int t )
-{
-    long int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "jl 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic64_add_if_ge( v, i, t ) \
-    ( atomic64_read_and_add_ge ( v, i, t ) >= ( t ) )
-
-static __inline__
-long int atomic64_read_and_add_gt ( atomic64_t *v, long int i, long int t )
-{
-    long int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "cmp %4, %0;"
-        "mov %3, %1;"
-        "jle 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i ), "r" ( t )
-    );
-    return rtn;
-}
-
-#define atomic64_add_if_gt( v, i, t ) \
-    ( atomic64_read_and_add_gt ( v, i, t ) > ( t ) )
-
-static __inline__
-long int atomic64_read_and_add_odd ( atomic64_t *v, long int i )
-{
-    long int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "bt $0, %0;"
-        "mov %3, %1;"
-        "jnc 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i )
-    );
-    return rtn;
-}
-
-static __inline__
-long int atomic64_read_and_add_even ( atomic64_t *v, long int i )
-{
-    long int rtn, sum;
-    __asm__ __volatile__
-    (
-        "mov (%2), %0;"
-    "1:"
-        "bt $0, %0;"
-        "mov %3, %1;"
-        "jc 2f;"
-        "add %0, %1;"
-    "lock;"
-        "cmpxchg %1, (%2);"
-        "jne 1b;"
-    "2:"
-        : "=&a" ( rtn ), "=&r" ( sum )
-        : "r" ( & v -> counter ), "r" ( i )
-    );
-    return rtn;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_atomic64_ */
diff --git a/interfaces/cc/gcc/x86_64/bitstr.h b/interfaces/cc/gcc/x86_64/bitstr.h
deleted file mode 100644
index b52f525..0000000
--- a/interfaces/cc/gcc/x86_64/bitstr.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_bitstr_
-#define _h_bitstr_
-
-/* use 64-bit accumulator, 32-bit word size */
-#define WRDSIZE 32
-#define WRDSHIFT 5
-#define WRD uint32_t
-#define ACC uint64_t
-#define BSWAP( x ) bswap_32 ( x )
-
-#include "../noarch/bitstr.h"
-
-#endif /* _h_bitstr_ */
diff --git a/interfaces/cc/gcc/x86_64/byteswap.h b/interfaces/cc/gcc/x86_64/byteswap.h
deleted file mode 100644
index 435a233..0000000
--- a/interfaces/cc/gcc/x86_64/byteswap.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_byteswap_
-#define _h_byteswap_
-
-#ifdef _BYTESWAP_H
-#warning "GNU byteswap.h being used"
-#else
-#define _BYTESWAP_H	1234
-
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* perform single instruction byte swap */
-static __inline__ uint16_t bswap_16 ( uint16_t i )
-{
-    register uint16_t rtn;
-    __asm__
-    (
-        "rorw $8, %w0"
-        : "=r" ( rtn )
-        : "0" ( i )
-        : "cc"
-    );
-    return rtn;
-}
-
-/* perform single instruction byte swap */
-static __inline__ uint32_t bswap_32 ( uint32_t i )
-{
-    register uint32_t rtn;
-    __asm__
-    (
-        "bswap %0"
-        : "=r" ( rtn )
-        : "0" ( i )
-        : "cc"
-    );
-    return rtn;
-}
-
-/* perform multi-instruction byte swap */
-static __inline__ uint64_t bswap_64 ( uint64_t i )
-{
-    register uint64_t rtn;
-    __asm__
-    (
-        "bswap %q0"
-        : "=r" ( rtn )
-        : "0" ( i )
-        : "cc"
-    );
-    return rtn;
-}
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _BYTESWAP_H */
-#endif /* _h_byteswap_ */
diff --git a/interfaces/cc/gcc/x86_64/strtol.h b/interfaces/cc/gcc/x86_64/strtol.h
deleted file mode 100644
index ceda47d..0000000
--- a/interfaces/cc/gcc/x86_64/strtol.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_strtol_
-#define _h_strtol_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdlib.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * strtoi32
- * strtou32
- *  based upon actual usage
- */
-#define strtoi32( str, endp, base ) \
-    ( int32_t ) strtol ( str, endp, base )
-
-#define strtou32( str, endp, base ) \
-    ( uint32_t ) strtoul ( str, endp, base )
-
-
-/*--------------------------------------------------------------------------
- * strtoi64
- * strtou64
- *  based upon actual usage
- */
-#define strtoi64( str, endp, base ) \
-    strtol ( str, endp, base )
-
-#define strtou64( str, endp, base ) \
-    strtoul ( str, endp, base )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_strtol_ */
diff --git a/interfaces/cc/icc/compiler.h b/interfaces/cc/icc/compiler.h
deleted file mode 100644
index d1bf565..0000000
--- a/interfaces/cc/icc/compiler.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_compiler_
-#define _h_compiler_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_compiler_ */
-
diff --git a/interfaces/cc/vc++/compiler.h b/interfaces/cc/vc++/compiler.h
deleted file mode 100644
index 75a5d3c..0000000
--- a/interfaces/cc/vc++/compiler.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_compiler_
-#define _h_compiler_
-
-#include <math.h>
-#include <float.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-static __inline
-float roundf( float value_in )
-{
-    return ( value_in < 0 ) ? ceilf ( value_in - 0.5F ) : floorf ( value_in + 0.5F );
-}
-
-#define lroundf( x ) (long int)roundf( x )
-
-static __inline
-double round( double value_in )
-{
-    return ( value_in < 0 ) ? ceil ( value_in - 0.5 ) : floor ( value_in + 0.5 );
-}
-
-typedef double double_t;
-
-#define isnan( x ) _isnan ( x )
-
-static __inline
-float truncf( float value_in )
-{
-	return ( value_in < 0 ) ? ceilf( value_in ) : floorf( value_in );
-}
-
-static __inline
-double trunc( double value_in )
-{
-	return ( value_in < 0 ) ? ceil( value_in ) : floor( value_in );
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_compiler_ */
-
diff --git a/interfaces/cc/vc++/i386/arch-impl.h b/interfaces/cc/vc++/i386/arch-impl.h
deleted file mode 100644
index 2494460..0000000
--- a/interfaces/cc/vc++/i386/arch-impl.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_arch_impl_
-#define _h_arch_impl_
-
-#ifndef _h_noarch_arch_impl_
-#include "../noarch/arch-impl.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_arch_impl_ */
diff --git a/interfaces/cc/vc++/i386/bitstr.h b/interfaces/cc/vc++/i386/bitstr.h
deleted file mode 100644
index a2e07ef..0000000
--- a/interfaces/cc/vc++/i386/bitstr.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_bitstr_
-#define _h_bitstr_
-
-/* use 32-bit accumulator, 16-bit word size */
-#define WRDSIZE 16
-#define WRDSHIFT 4
-#define WRD uint16_t
-#define ACC uint32_t
-#define BSWAP( x ) bswap_16 ( x )
-
-#include "../noarch/bitstr.h"
-
-#endif /* _h_bitstr_ */
diff --git a/interfaces/cc/vc++/noarch/arch-impl.h b/interfaces/cc/vc++/noarch/arch-impl.h
deleted file mode 100644
index a351d37..0000000
--- a/interfaces/cc/vc++/noarch/arch-impl.h
+++ /dev/null
@@ -1,378 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_noarch_arch_impl_
-#define _h_noarch_arch_impl_
-
-#include <stdint.h>
-
-#ifndef _INC_STDLIB
-#include <stdlib.h>
-#endif
-
-#if _M_IX86_FP == 1
-	#define __SSE__ 1
-#else if _M_IX86_FP == 2
-	#define __SSE2__ 1
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* this table is very simple to calculate
-   but simpler yet to use for lookup */
-static const int8_t lsbit_map [] =
-{
-    -1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-     4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-     5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-     4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-     6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-     4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-     5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-     4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-     7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-     4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-     5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-     4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-     6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-     4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-     5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-     4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0
-};
-
-static __inline
-int16_t uint16_lsbit ( uint16_t self )
-{
-    /* detect no bits are set */
-    if ( self == 0 )
-        return -1;
-
-    /* detect bits set in lower byte */
-    if ( ( uint8_t ) self != 0 )
-        return lsbit_map [ ( uint8_t ) self ];
-
-    /* return bit set in upper byte */
-    return lsbit_map [ self >> 8 ] + 8;
-}
-
-static __inline
-int32_t uint32_lsbit ( uint32_t self )
-{
-    /* detect no bits are set */
-    if ( self == 0 )
-        return -1;
-
-    /* detect bits set in lower word */
-    if ( ( uint16_t ) self != 0 )
-        return uint16_lsbit ( ( uint16_t ) self );
-
-    /* return bit set in upper word */
-    return uint16_lsbit ( self >> 16 ) + 16;
-}
-
-static const int8_t msbit_map [] =
-{
-    -1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
-     4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
-     5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
-     5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
-     6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
-     6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
-     6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
-     6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
-     7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-     7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-     7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-     7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-     7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-     7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-     7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-     7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-};
-
-static __inline
-int16_t uint16_msbit ( uint16_t self )
-{
-    uint8_t upper = ( uint8_t ) ( self >> 8 );
-
-    /* detect no bits are set */
-    if ( self == 0 )
-        return -1;
-
-    /* detect bits set in upper byte */
-    if ( upper != 0 )
-        return msbit_map [ upper ] + 8;
-
-    /* return bit set in lower byte */
-    return msbit_map [ ( uint8_t ) self ];
-}
-
-static __inline
-int32_t uint32_msbit ( uint32_t self )
-{
-    uint16_t upper = ( uint16_t ) ( self >> 16 );
-
-    /* detect no bits are set */
-    if ( self == 0 )
-        return -1;
-
-    /* detect bits set in upper word */
-    if ( upper != 0 )
-        return uint16_msbit ( upper ) + 16;
-
-    /* return bit set in lower word */
-    return uint16_msbit ( ( uint16_t ) self );
-}
-
-typedef struct int128_t int128_t;
-struct int128_t
-{
-    uint64_t lo;
-    int64_t hi;
-};
-
-static __inline
-int64_t int128_hi ( const int128_t *self )
-{
-    return self -> hi;
-}
-
-static __inline
-uint64_t int128_lo ( const int128_t *self )
-{
-    return self -> lo;
-}
-
-static __inline
-void int128_sethi ( int128_t *self, int64_t i )
-{
-    self -> hi = i;
-}
-
-static __inline
-void int128_setlo ( int128_t *self, uint64_t i )
-{
-    self -> lo = i;
-}
-
-typedef struct uint128_t uint128_t;
-struct uint128_t
-{
-    uint64_t lo;
-    uint64_t hi;
-};
-
-static __inline
-uint64_t uint128_hi ( const uint128_t *self )
-{
-    return self -> hi;
-}
-
-static __inline
-uint64_t uint128_lo ( const uint128_t *self )
-{
-    return self -> lo;
-}
-
-static __inline
-void uint128_sethi ( uint128_t *self, uint64_t i )
-{
-    self -> hi = i;
-}
-
-static __inline
-void uint128_setlo ( uint128_t *self, uint64_t i )
-{
-    self -> lo = i;
-}
-
-static __inline
-void int128_add ( int128_t *self, const int128_t *i )
-{
-    uint64_t carry = ( ( const uint32_t* ) self ) [ 0 ] + ( ( const uint32_t* ) i ) [ 0 ];
-    self -> hi += i -> hi;
-    carry = ( ( const uint32_t* ) self ) [ 1 ] + ( ( const uint32_t* ) i ) [ 1 ] + ( carry >> 32 );
-    self -> lo += i -> lo;
-    self -> hi += carry >> 32;
-}
-
-static __inline
-void int128_sub ( int128_t *self, const int128_t *i )
-{
-    int carry = i -> lo > self -> lo;
-    self -> hi -= i -> hi;
-    self -> lo -= i -> lo;
-    self -> hi -= carry;
-}
-
-static __inline
-void int128_sar ( int128_t *self, uint32_t i )
-{
-    if ( i < 64 )
-    {
-        self -> lo = ( self -> hi << ( 64 - i ) ) |  ( self -> lo >> i );
-        self -> hi >>= i;
-    }
-    else
-    {
-        self -> lo = self -> hi >> ( i - 64 );
-        self -> hi >>= 63;
-    }
-}
-
-static __inline
-void int128_shl ( int128_t *self, uint32_t i )
-{
-    if ( i < 64 )
-    {
-        self -> hi = ( self -> hi << i ) | ( int64_t ) ( self -> lo >> ( 64 - i ) );
-        self -> lo <<= i;
-    }
-    else
-    {
-        self -> hi = ( int64_t ) ( self -> lo << ( i - 64 ) );
-        self -> lo = 0;
-    }
-}
-
-static __inline
-void uint128_and ( uint128_t *self, const uint128_t *i )
-{
-    self -> lo &= i -> lo;
-    self -> hi &= i -> hi;
-}
-
-static __inline
-void uint128_or ( uint128_t *self, const uint128_t *i )
-{
-    self -> lo |= i -> lo;
-    self -> hi |= i -> hi;
-}
-
-static __inline
-void uint128_orlo ( uint128_t *self, uint64_t i )
-{
-    self -> lo |= i;
-}
-
-static __inline
-void uint128_xor ( uint128_t *self, const uint128_t *i )
-{
-    self -> lo ^= i -> lo;
-    self -> hi ^= i -> hi;
-}
-
-static __inline
-void uint128_not ( uint128_t *self )
-{
-    self -> lo = ~ self -> lo;
-    self -> hi = ~ self -> hi;
-}
-
-static __inline
-void uint128_shr ( uint128_t *self, uint32_t i )
-{
-    if ( i < 64 )
-    {
-        self -> lo = ( self -> hi << ( 64 - i ) ) |  ( self -> lo >> i );
-        self -> hi >>= i;
-    }
-    else
-    {
-        self -> lo = self -> hi >> ( i - 64 );
-        self -> hi >>= 63;
-    }
-}
-
-static __inline
-void uint128_shl ( uint128_t *self, uint32_t i )
-{
-    if ( i < 64 )
-    {
-        self -> hi = ( self -> hi << i ) | ( self -> lo >> ( 64 - i ) );
-        self -> lo <<= i;
-    }
-    else
-    {
-        self -> hi = self -> lo << ( i - 64 );
-        self -> lo = 0;
-    }
-}
-
-static __inline
-void uint128_bswap ( uint128_t *self )
-{
-    uint64_t tmp = _byteswap_uint64 ( self -> lo );
-    self -> lo = _byteswap_uint64 ( self -> hi );
-    ( ( uint64_t* ) self ) [ 1 ] = tmp;
-}
-
-static __inline
-void uint128_bswap_copy ( uint128_t *to, const uint128_t *from )
-{
-    to -> lo = _byteswap_uint64 ( from -> hi );
-    to -> hi = _byteswap_uint64 ( from -> lo );
-}
-
-static __inline__
-uint32_t uint32_rol ( uint32_t val, uint8_t bits )
-{
-    uint32_t rtn;
-    rtn = ( val << bits ) | ( val >> ( 32 - bits ) );
-    return rtn;
-}
-
-static __inline__
-uint32_t uint32_ror ( uint32_t val, uint8_t bits )
-{
-    uint32_t rtn;
-    rtn = ( val >> bits ) | ( val << ( 32 - bits ) );
-    return rtn;
-}
-
-static __inline__
-uint64_t uint64_rol ( uint64_t val, uint8_t bits )
-{
-    uint64_t rtn;
-    rtn = ( val << bits ) | ( val >> ( 64 - bits ) );
-    return rtn;
-}
-
-static __inline__
-uint64_t uint64_ror ( uint64_t val, uint8_t bits )
-{
-    uint64_t rtn;
-    rtn = ( val >> bits ) | ( val << ( 64 - bits ) );
-    return rtn;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_noarch_arch_impl_ */
diff --git a/interfaces/cc/vc++/noarch/bitstr.h b/interfaces/cc/vc++/noarch/bitstr.h
deleted file mode 100644
index 88a4c34..0000000
--- a/interfaces/cc/vc++/noarch/bitstr.h
+++ /dev/null
@@ -1,412 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_noarch_bitstr_
-#define _h_noarch_bitstr_
-
-#ifndef _h_bitstr_
-#error "don't include <noarch/bitstr.h> directly - use <bitstr.h>"
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <byteswap.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* bitcpy                                                                                                                                                                                                    
- *  copy a string of bits from source to dest                                                                                                                                                                
- *                                                                                                                                                                                                           
- *  both source and dest may have non-byte aligned pointers                                                                                                                                                  
- *  the number of bits to copy need not be byte aligned                                                                                                                                                      
- *                                                                                                                                                                                                           
- *  depending upon architecture and OS conventions, the word                                                                                                                                                 
- *  size may be adjusted to 1, 2, or 4 bytes, where the base                                                                                                                                                 
- *  pointers are always word aligned.                                                                                                                                                                        
- *                                                                                                                                                                                                           
- *  bits in memory are always treated as big-endian, meaning                                                                                                                                                 
- *  that on multi-byte fetches and stores, we perform byte-swapping                                                                                                                                          
- *  if there are shifts or masks                                                                                                                                                                             
- */
-static __inline
-void bitcpy ( void *dbase, bitsz_t doff, const void *sbase, bitsz_t soff, bitsz_t sz )
-{
-    /* noop if sz == 0 */
-    if ( sz != 0 )
-    {
-        /* loop counter and destination word count */
-        size_t i, dcountz;
-
-        /* left & right masks and working register */
-        WRD lmask, rmask, reg;
-
-        /* produce word-aligned pointers */
-#if WRDSIZE == 8
-        /* 1-4. all at once */
-        WRD *dst = ( WRD* ) dbase + ( doff >> WRDSHIFT );
-        const WRD *src = ( const WRD* ) sbase + ( soff >> WRDSHIFT );
-#else
-        /* 1. capture word alignment adjustment */
-        size_t dadjust = ( size_t ) dbase & ( WRDSIZE / 8 - 1 );
-        size_t sadjust = ( size_t ) sbase & ( WRDSIZE / 8 - 1 );
-
-        /* 2. create word-aligned pointers */
-        WRD *dst = ( WRD* ) ( ( size_t ) dbase - dadjust );
-        const WRD *src = ( const WRD* ) ( ( size_t ) sbase - sadjust );
-
-        /* 3. incorporate alignment adjustment into offset bits */
-        doff += dadjust << 3;
-        soff += sadjust << 3;
-
-        /* 4. readjust pointers based upon offset */
-        dst += doff >> WRDSHIFT;
-        src += soff >> WRDSHIFT;
-#endif
-        /* 5. restate offsets */
-        doff &= ( WRDSIZE - 1 );
-        soff &= ( WRDSIZE - 1 );
-
-        /* calculate number of words - 1 in dst */
-        dcountz = ( size_t ) ( ( doff + sz + ( WRDSIZE - 1 ) - WRDSIZE ) >> WRDSHIFT );
-
-        /* calculate masks */
-        lmask = rmask = ~ 0;
-        lmask >>= doff;
-        rmask >>= ( doff + sz ) & ( WRDSIZE - 1 );
-        if ( ( WRD ) ( rmask + 1 ) == 0 )
-            rmask = 0;
-
-        /* prime register with masked dst [ 0 ] */
-        reg = BSWAP ( dst [ 0 ] ) & ~ lmask;
-
-        /* if source and destination are aligned */
-        if ( doff == soff )
-        {
-            /* merge src [ 0 ] into reg through mask */
-            reg |= BSWAP ( src [ 0 ] ) & lmask;
-
-#if WRDSIZE > 8
-            /* straight copies don't need byteswap                                                                                                                                                           
-               other than on first and last words                                                                                                                                                            
-               put first word back into little-endian                                                                                                                                                        
-               for remainder of loop */
-            if ( dcountz > 0 )
-            {
-                reg = BSWAP ( reg );
-#endif
-                /* aligned buffers have n:n word ratio */
-                for ( i = 0; i < dcountz; )
-                {
-                    dst [ i ] = reg;
-                    reg = src [ ++ i ];
-                }
-
-#if WRDSIZE > 8
-                /* revert to big-endian */
-                reg = BSWAP ( reg );
-            }
-#endif
-        }
-
-        /* shifting alignment  */
-        else
-        {
-            /* source count may differ from dest count */
-            size_t scountz = ( size_t ) ( ( soff + sz + ( WRDSIZE - 1 ) - WRDSIZE ) >> WRDSHIFT );
-
-            /* use double-word accumulator */
-            ACC acc = BSWAP ( src [ 0 ] );
-
-            /* shift amount */
-            int shift = ( int ) doff - ( int ) soff;
-            if ( shift > 0 )
-            {
-                /* take only valid bits in shifted initial src */
-                reg |= ( WRD ) ( acc >> shift ) & lmask;
-
-                /* because "shift" > 0, we know "dcountz" >= "scountz" */
-                for ( acc <<= WRDSIZE, i = 0; i < scountz; acc <<= WRDSIZE )
-                {
-                    dst [ i ] = BSWAP ( reg );
-                    acc |= BSWAP ( src [ ++ i ] );
-                    reg = ( WRD ) ( acc >> shift );
-                }
-
-                /* if "dcountz" > "scountz" */
-                if ( i < dcountz )
-                {
-                    dst [ i ] = BSWAP ( reg );
-                    reg = ( WRD ) ( acc >> shift );
-                }
-            }
-
-            else
-            {
-                /* need single word read-ahead and right-shift */
-                shift += WRDSIZE;
-
-                /* because "shift" was < 0, we know "dcountz" <= "scountz" */
-                for ( acc <<= WRDSIZE, i = 0; i < dcountz; acc <<= WRDSIZE )
-                {
-                    acc |= BSWAP ( src [ i + 1 ] );
-                    reg |= ( WRD ) ( acc >> shift ) & lmask;
-                    dst [ i ++ ] = BSWAP ( reg );
-                    lmask = ~ 0;
-                    reg = 0;
-                }
-
-                /* if "dcountz" < "scountz" */
-                if ( i < scountz )
-                    acc |= BSWAP ( src [ scountz ] );
-
-                reg |= ( WRD ) ( acc >> shift ) & lmask;
-            }
-        }
-
-        /* mask off unused bytes from src */
-        reg &= ~ rmask;
-
-        /* bring in saved bits from dst */
-        reg |= BSWAP ( dst [ dcountz ] ) & rmask;
-
-        /* write out last word */
-        dst [ dcountz ] = BSWAP ( reg );
-    }
-}
-
-/* bitcmp
- *  performs bitwise a - b, returning result as int
- *  result value has no meaning, only sign
- *  where < 0 means a < b, > 0 means a > b, and 0 means a == b
- *
- *  since the comparison produces a tri-state indicator of
- *  relative magnitude, the order of "a" and "b" is important.
- *  furthermore, the difference operator must be evaluated
- *  left to right, because the result indicates more than
- *  equality.
- *
- *  see bitcpy for general word alignment information
- */
-static __inline
-int bitcmp ( const void *abase, bitsz_t aoff, const void *bbase, bitsz_t boff, bitsz_t sz )
-{
-    int diff = 0;
-
-    if ( sz != 0 )
-    {
-        /* loop counter and left word count */
-        size_t i, lcountz;
-
-        /* left & right masks and working registers */
-        WRD lmask, rmask, lreg, rreg;
-
-        /* produce word-aligned pointers */
-#if WRDSIZE == 8
-        /* 1-4. all at once */
-        const WRD *left = ( const WRD* ) abase + ( aoff >> WRDSHIFT );
-        const WRD *right = ( const WRD* ) bbase + ( boff >> WRDSHIFT );
-#else
-        /* 1. capture word alignment adjustment */
-        size_t aadjust = ( size_t ) abase & ( WRDSIZE / 8 - 1 );
-        size_t badjust = ( size_t ) bbase & ( WRDSIZE / 8 - 1 );
-
-        /* 2. create word-aligned pointers */
-        const WRD *left = ( const WRD* ) ( ( size_t ) abase - aadjust );
-        const WRD *right = ( const WRD* ) ( ( size_t ) bbase - badjust );
-
-        /* 3. incorporate alignment adjustment into offset bits */
-        aoff += aadjust << 3;
-        boff += badjust << 3;
-
-        /* 4. readjust pointers based upon offset */
-        left += aoff >> WRDSHIFT;
-        right += boff >> WRDSHIFT;
-#endif
-        /* 5. restate offsets */
-        aoff &= ( WRDSIZE - 1 );
-        boff &= ( WRDSIZE - 1 );
-
-        /* calculate number of words - 1 in left
-           since we know a-priori that "sz" > 0, we
-           know that the left and right counts must be
-           at least 1. our loops treat the last word
-           specially, so calculate a loop counter that
-           excludes the last word */
-        lcountz = ( size_t ) ( ( aoff + sz + ( WRDSIZE - 1 ) - WRDSIZE ) >> WRDSHIFT );
-
-        /* calculate masks */
-        lmask = rmask = ~ 0;
-        lmask >>= aoff;
-        rmask >>= ( aoff + sz ) & ( WRDSIZE - 1 );
-        if ( ( WRD ) ( rmask + 1 ) == 0 )
-            rmask = 0;
-
-        /* significant bits from left [ 0 ] */
-        lreg = BSWAP ( left [ 0 ] ) & lmask;
-
-        /* if source and destination are aligned */
-        if ( aoff == boff )
-        {
-            /* test against right bits through mask */
-            rreg = BSWAP ( right [ 0 ] ) & lmask;
-
-            /* produce a difference of all but the last
-               aligned word, where initial word has been
-               left-masked. the last word is tested below. */
-            for ( i = 1; i <= lcountz; ++ i )
-            {
-                diff = ( int ) lreg - ( int ) rreg;
-                if ( diff != 0 )
-                    return diff;
-
-                /* byte-swapping occurs on little-endian architectures */
-                lreg = BSWAP ( left [ i ] );
-                rreg = BSWAP ( right [ i ] );
-            }
-
-            /* fall out to end for masked comparison of last word */
-        }
-
-        /* shifting alignment */
-        else
-        {
-            /* right count may differ from left count
-               since alignments differ, the span of "sz"
-               bits may hit a different number of words in
-               the left array than in the right. */
-            size_t rcountz = ( size_t ) ( ( boff + sz + ( WRDSIZE - 1 ) - WRDSIZE ) >> WRDSHIFT );
-
-            /* use double-word accumulator
-               note that the extra bits get ignored */
-            ACC acc = BSWAP ( right [ 0 ] );
-
-            /* shift amount: positive if "b" needs to be right shifted.
-               NOTE - since the comparison must be successively performed
-               from left to right ( see above ), shifting is ALWAYS toward
-               right, making for special handling when "shift" < 0 ( see below ) */
-            int shift = ( int ) aoff - ( int ) boff;
-            if ( shift > 0 )
-            {
-                /* initial word from right operand, aligned with left */
-                rreg = ( WRD ) ( acc >> shift ) & lmask;
-
-                /* "shift" > 0 means "lcountz" >= "rcountz" */
-                for ( acc <<= WRDSIZE, i = 1; i <= rcountz; acc <<= WRDSIZE, ++ i )
-                {
-                    /* compare words at i-1 */
-                    diff = ( int ) lreg - ( int ) rreg;
-                    if ( diff != 0 )
-                        return diff;
-
-                    /* accumulate next word from right operand */
-                    acc |= BSWAP ( right [ i ] );
-
-                    /* bring in next word from left operand */
-                    lreg = BSWAP ( left [ i ] );
-
-                    /* produce aligned word from right operand */
-                    rreg = ( WRD ) ( acc >> shift );
-                }
-
-                /* if there is one more word in left */
-                if ( lcountz > rcountz )
-                {
-                    /* compare penultimate */
-                    diff = ( int ) lreg - ( int ) rreg;
-                    if ( diff != 0 )
-                        return diff;
-
-                    /* get last word in left */
-                    lreg = BSWAP ( left [ lcountz ] );
-
-                    /* last word from right is already in "acc" */
-                    rreg = ( WRD ) ( acc >> shift );
-                }
-
-                /* fall out to end for masked comparison of last word */
-            }
-
-            else
-            {
-                /* since all shifts must be toward right ( due to left to right
-                   comparison ), this alignment will require a pre-fetch from
-                   right operand into accumulator, and adjusting the negative
-                   shift amount to a positive right-shift. */
-                shift += WRDSIZE;
-
-                /* since "shift" was negative, we know "lcountz" <= "rcountz",
-                   so use "lcountz" as loop limit. pre-shift "acc" as loop init */
-                for ( acc <<= WRDSIZE, i = 1; i <= lcountz; acc <<= WRDSIZE, ++ i )
-                {
-                    /* accumulate next word from right operand */
-                    acc |= BSWAP ( right [ i ] );
-
-                    /* produce aligned word from right operand */
-                    rreg = ( WRD ) ( acc >> shift ) & lmask;
-
-                    /* now test against left */
-                    diff = ( int ) lreg - ( int ) rreg;
-                    if ( diff != 0 )
-                        return diff;
-
-                    /* bring in next word from left operand */
-                    lreg = BSWAP ( left [ i ] );
-
-                    /* no more left mask */
-                    lmask = ~ 0;
-                }
-
-                /* if there is one more word in right */
-                if ( lcountz < rcountz )
-                    acc |= BSWAP ( right [ rcountz ] );
-
-                /* produce "rreg" from "acc" */
-                rreg = ( WRD ) ( acc >> shift ) & lmask;
-
-                /* fall out to end for masked comparison of last word */
-            }
-        }
-
-        /* mask off unused bytes from right */
-        lreg &= ~ rmask;
-        rreg &= ~ rmask;
-
-        /* perform final comparison */
-        diff = ( int ) lreg - ( int ) rreg;
-    }
-
-    return diff;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_noarch_bitstr_ */
diff --git a/interfaces/cc/vc++/stdbool.h b/interfaces/cc/vc++/stdbool.h
deleted file mode 100644
index 4807cb4..0000000
--- a/interfaces/cc/vc++/stdbool.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _STDBOOL_H
-#define _STDBOOL_H
-
-/*--------------------------------------------------------------------------
- * bool
- */
-
-#ifndef __cplusplus
-typedef unsigned char bool;
-
-#undef true
-#define true 1
-
-#undef false
-#define false 0
-
-#endif
-
-
-#endif /* _STDBOOL_H */
diff --git a/interfaces/cc/vc++/stdint.h b/interfaces/cc/vc++/stdint.h
deleted file mode 100644
index 44c124d..0000000
--- a/interfaces/cc/vc++/stdint.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _STDINT_H
-#define _STDINT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* perhaps not the best place for this, but it helps reduce the
-   number of artificial includes for compatibility */
-#ifndef __inline__
-#define __inline__ __inline
-#endif
-
-#ifndef __func__
-#define __func__ __FUNCTION__
-#endif
-
-#include <../include/stdint.h>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/interfaces/cc/vc++/va_copy.h b/interfaces/cc/vc++/va_copy.h
deleted file mode 100644
index 76fc7c7..0000000
--- a/interfaces/cc/vc++/va_copy.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_va_copy_
-#define _h_va_copy_
-
-#include <STDARG.H>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define va_copy( dst, src ) \
-    ( dst ) = ( src )
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_va_copy_ */
diff --git a/interfaces/cc/vc++/x86_64/arch-impl.h b/interfaces/cc/vc++/x86_64/arch-impl.h
deleted file mode 100644
index 2494460..0000000
--- a/interfaces/cc/vc++/x86_64/arch-impl.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_arch_impl_
-#define _h_arch_impl_
-
-#ifndef _h_noarch_arch_impl_
-#include "../noarch/arch-impl.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_arch_impl_ */
diff --git a/interfaces/cc/vc++/x86_64/bitstr.h b/interfaces/cc/vc++/x86_64/bitstr.h
deleted file mode 100644
index b52f525..0000000
--- a/interfaces/cc/vc++/x86_64/bitstr.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_bitstr_
-#define _h_bitstr_
-
-/* use 64-bit accumulator, 32-bit word size */
-#define WRDSIZE 32
-#define WRDSHIFT 5
-#define WRD uint32_t
-#define ACC uint64_t
-#define BSWAP( x ) bswap_32 ( x )
-
-#include "../noarch/bitstr.h"
-
-#endif /* _h_bitstr_ */
diff --git a/interfaces/csra2/csra2.vschema b/interfaces/csra2/csra2.vschema
deleted file mode 100644
index 91a0b00..0000000
--- a/interfaces/csra2/csra2.vschema
+++ /dev/null
@@ -1,42 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * Main csra2 database
- */
-version 1;
-
-include 'csra2/read.vschema';
-include 'csra2/reference.vschema';
-
-/*--------------------------------------------------------------------------
- * databases
- */
-database NCBI:csra2:db:aligned #1
-{
-    table NCBI:csra2:view:read #1.0 UNALIGNED;
-    table NCBI:csra2:view:reference #1.0 REFERENCE;
-}
diff --git a/interfaces/csra2/read.vschema b/interfaces/csra2/read.vschema
deleted file mode 100644
index b56e338..0000000
--- a/interfaces/csra2/read.vschema
+++ /dev/null
@@ -1,255 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * General read table which will be inherited by others
- */
-version 1;
-
-include 'vdb/vdb.vschema';
-include 'insdc/insdc.vschema';
-include 'csra2/stats.vschema';
-
-
-/*--------------------------------------------------------------------------
- * tables
- */
-table NCBI:csra2:tbl:read #1.0 = NCBI:csra2:tbl:read_stats #1
-{
-    /* CHUNK_SZ
-     *  describes the maximum number of bases in any row
-     *
-     *  if present, allows a single sequence to be broken into multiple rows
-     *  where this value gives the limit on the number of bases in any row.
-     *
-     *  the sequence will be split across some number of rows, depending upon
-     *  the value of CHUNK_SZ. if length ( seq ) > CHUNK_SZ, then there will
-     *  be multiple rows, where all but the last will have a length of CHUNK_SZ.
-     *  the last ( or only ) row will have a length of length(seq)%CHUNK_SIZE.
-     */
-    extern column INSDC:coord:len CHUNK_SZ;
-
-
-    /* READ
-     *  base calls
-     */
-
-    // textual representation
-    extern default column INSDC:dna:text READ
-    {
-        read = out_dna_text;
-        validate = < INSDC:dna:text > compare ( in_dna_text, out_dna_text );
-    }
-
-    // 4na representation - unpacked
-    extern column INSDC:4na:bin READ
-        = out_4na_bin
-        ;
-
-
-    /* QUALITY
-     *  phred-score quality values
-     */
-    extern default column INSDC:quality:phred QUALITY
-        = out_qual_phred
-        ;
-    extern column INSDC:quality:text:phred_33 QUALITY
-        = ( INSDC:quality:text:phred_33 ) < B8 > sum < 33 > ( out_qual_phred )
-        ;
-    extern column INSDC:quality:text:phred_64 QUALITY
-        = ( INSDC:quality:text:phred_64 ) < B8 > sum < 64 > ( out_qual_phred )
-        ;
-
-    /* ---------------------------- optional columns ---------------------------- */
-
-    /* RD_ID
-     * RD_GROUP
-     *  reports group and id of current row
-     */
-    extern column I64 RD_ID;
-    extern column ascii RD_GROUP;
-
-    /* RD_FILTER
-     *  records filter value if used
-     */
-    extern column INSDC:SRA:read_filter RD_FILTER;
-
-
-    /* ---------------------------- input rules ---------------------------- */
-
-    // input text
-    INSDC:dna:text in_dna_text
-        = < INSDC:dna:text, INSDC:dna:text > map < '.acmgrsvtwyhkdbn','NACMGRSVTWYHKDBN' > ( READ )
-        ;
-
-    // input 4na bin
-    INSDC:4na:bin in_4na_bin
-        = < INSDC:4na:bin > range_validate < 0, 15 > ( READ )
-        | < INSDC:dna:text, INSDC:4na:bin > map < INSDC:4na:map:CHARSET, INSDC:4na:map:BINSET > ( in_dna_text )
-        ;
-
-    // input 2na bin
-    INSDC:2na:bin in_2na_bin
-        = INSDC:SEQ:rand_4na_2na ( in_4na_bin )
-        ;
-
-    // input 4na alt-read ( ambiguities )
-    INSDC:4na:bin in_alt_4na_bin
-        = < INSDC:4na:bin, INSDC:4na:bin > map < INSDC:4na:map:BINSET, [ 15,0,0,3,0,5,6,7,0,9,10,11,12,13,14,15 ] > ( in_4na_bin )
-        ;
-
-    // feed the statistics
-    INSDC:4na:bin in_stats_seq = in_4na_bin;
-    
-    // quality
-    INSDC:quality:text:phred_33 in_qual_text_phred_33 = QUALITY;
-    INSDC:quality:text:phred_64 in_qual_text_phred_64 = QUALITY;
-
-    INSDC:quality:phred in_qual_phred
-        = QUALITY
-        | ( INSDC:quality:phred ) < B8 > diff < 33 > ( in_qual_text_phred_33 )
-        | ( INSDC:quality:phred ) < B8 > diff < 64 > ( in_qual_text_phred_64 )
-        ;
-
-    // feed the statistics
-    INSDC:quality:phred in_stats_qual_phred = in_qual_phred;
-
-    ascii in_stats_read_group
-        = in_stats_spot_group
-        | RD_GROUP
-        ;
-
-
-    /* ---------------------------- physical columns ---------------------------- */
-
-    physical column INSDC:2na:packed .READ
-        = ( INSDC:2na:packed ) pack ( in_2na_bin )
-        ;
-
-    physical column < INSDC:4na:bin > zip_encoding .ALTREAD
-        = < INSDC:4na:bin > trim < 0, 0 > ( in_alt_4na_bin )
-        ;
-
-    physical column < INSDC:quality:phred > delta_average_zip_encoding .QUALITY
-        = in_qual_phred
-        ;
-
-
-    /* ---------------------------- output rules ---------------------------- */
-
-    // output 2na packed
-    INSDC:2na:packed out_2na_packed
-        = .READ
-        ;
-
-    // output 2na bin
-    INSDC:2na:bin out_2na_bin
-        = ( INSDC:2na:bin ) unpack ( out_2na_packed )
-        ;
-
-    // output 2na->4na bin
-    INSDC:4na:bin out_2na_4na_bin
-        = < INSDC:2na:bin, INSDC:4na:bin > map < INSDC:2na:map:BINSET, [ 1, 2, 4, 8 ] > ( out_2na_bin )
-        ;
-
-    // output 4na bin
-    INSDC:4na:bin out_4na_bin
-        = < INSDC:4na:bin > bit_or < ALIGN_RIGHT > ( out_2na_4na_bin, .ALTREAD )
-        | out_2na_4na_bin
-        ;
-    
-    // output text
-    INSDC:dna:text out_dna_text
-        = < INSDC:4na:bin, INSDC:dna:text > map < INSDC:4na:map:BINSET, INSDC:4na:map:CHARSET > ( out_4na_bin )
-        ;
-    
-    // output quality
-    INSDC:quality:phred out_qual_phred
-        = .QUALITY
-        | < INSDC:quality:phred > echo < 30 > ( out_4na_bin )
-        ;
-}
-
-
-/*--------------------------------------------------------------------------
- * views
- */
-table NCBI:csra2:view:read #1.0 =
-    NCBI:csra2:tbl:read #1.0
-{
-    /* CHUNK_SIZE
-     *  describes the maximum number of bases in any row
-     *
-     *  if present, allows a single sequence to be broken into multiple rows
-     *  where this value gives the limit on the number of bases in any row.
-     *
-     *  the sequence will be split across some number of rows, depending upon
-     *  the value of CHUNK_SIZE. if length ( seq ) > CHUNK_SIZE, then there will
-     *  be multiple rows, where all but the last will have a length of CHUNK_SIZE.
-     *  the last ( or only ) row will have a length of length(seq)%CHUNK_SIZE.
-     */
-    readonly column INSDC:coord:len CHUNK_SIZE
-        = .CHUNK_SZ
-        | < INSDC:coord:len > echo < 0xFFFFFFFF > ()
-        ;
-    
-    /* READ
-     *  generate remaining 4 types
-     */
-    readonly column INSDC:4na:packed READ
-        = ( INSDC:4na:packed ) pack ( out_4na_bin )
-        ;
-    readonly column INSDC:x2na:bin READ
-        = < INSDC:4na:bin, INSDC:x2na:bin > map < INSDC:4na:map:BINSET, [ 4,0,1,4,2,4,4,4,3,4,4,4,4,4,4,4 ] > ( out_4na_bin )
-        ;
-    readonly column INSDC:2na:bin READ
-        = out_2na_bin
-        ;
-    readonly column INSDC:2na:packed READ
-        = out_2na_packed
-        ;
-
-    /* READ_ID
-     * READ_GROUP
-     *  reports group and id of current row
-     */
-    readonly column I64 READ_ID
-        = .RD_ID
-        | row_id ()
-        ;
-    readonly column ascii READ_GROUP
-        = .RD_GROUP
-        | < ascii > echo < '' > ()
-        ;
-
-    /* READ_FILTER
-     *  records filter value if used
-     */
-    readonly column INSDC:SRA:read_filter READ_FILTER
-        = .RD_FILTER
-        | < INSDC:SRA:read_filter > echo < SRA_READ_FILTER_PASS > ()
-        ;
-}
diff --git a/interfaces/csra2/reference.vschema b/interfaces/csra2/reference.vschema
deleted file mode 100644
index 25fd2f2..0000000
--- a/interfaces/csra2/reference.vschema
+++ /dev/null
@@ -1,245 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * VDB Alignment types, functions and tables
- */
-version 1;
-
-include 'vdb/vdb.vschema';
-include 'csra2/stats.vschema';
-
-
-/*--------------------------------------------------------------------------
- * tables
- */
-table NCBI:csra2:tbl:reference #1.0
-    = NCBI:csra2:tbl:read_stats #1
-{
-    /* CHUNK_SIZE
-     *  describes the maximum number of bases in any cell
-     */
-    extern column INSDC:coord:len CHUNK_SIZE;
-
-    /* CIRCULAR
-     *  true if the reference is circular
-     */
-    extern column bool CIRCULAR;
-
-    /* CANONICAL_NAME
-     *  this should be an accessioned proper name
-     */
-    extern column utf8 CANONICAL_NAME;
-
-    /* COMMON_NAME
-     *  this name may be ambiguous or missing entirely
-     */
-    extern column utf8 COMMON_NAME;
-
-    /* LOCAL_SEQUENCE
-     *  supports name overloading by type
-     */
-    extern default column INSDC:dna:text LOCAL_SEQUENCE
-    {
-        read = out_local_dna_text;
-        validate = < INSDC:dna:text > compare ( in_local_dna_text, out_local_dna_text );
-    }
-    extern column INSDC:4na:bin LOCAL_SEQUENCE = out_local_4na_bin;
-
-    /* PRIMARY_ALIGNMENT_IDS
-     * SECONDARY_ALIGNMENT_IDS
-     *  an index to rows in the PRIMARY_ALIGNMENT and
-     *  SECONDARY_ALIGNMENT tables having alignments 
-     *  STARTING within this chunk
-     *
-     *  the indicies MUST be sorted in clustered order,
-     *  meaning that they are in ascending numeric order
-     */
-    extern column < I64 > izip_encoding PRIMARY_ALIGNMENT_IDS;
-    extern column < I64 > izip_encoding SECONDARY_ALIGNMENT_IDS;
-
-    /* OVERLAP_REF_POS
-     *  min ( REF_POS ) for all alignments intersecting this chunk
-     *  but starting in a previous chunk, where the stored position
-     *  is in reference coordinates.
-     *
-     *  a value of 0 indicates that no alignments starting to
-     *  the left of this chunk also intersect with it.
-     */
-    extern column < INSDC:coord:zero > izip_encoding OVERLAP_REF_POS;
-
-    /* OVERLAP_REF_LEN
-     *  max ( REF_POS + REF_LEN - CHUNK_START ) % CHUNK_SIZE
-     *  for all alignments intersecting this chunk but starting
-     *  in a previous chunk.
-     *
-     *  indicates the amount of this chunk that is needed by
-     *  alignments not starting within chunk. so if a slice on
-     *  this reference were to start at 100 bases into this chunk,
-     *  for example, and the OVERLAP_REF_LEN were 100 or less, then
-     *  there are no alignments from prior chunks that need to be
-     *  considered.
-     */
-    extern column < INSDC:coord:len > izip_encoding OVERLAP_REF_LEN;
-
-    /* COVERAGE
-     *  graphing statistics for the chunk
-     */
-
-    // clipped at 255
-    extern column < U8 > izip_encoding CGRAPH_HIGH;
-    extern column < U8 > izip_encoding CGRAPH_LOW;
-
-    // count of the number of mismatches in the chunk
-    extern column < U32 > izip_encoding CGRAPH_MISMATCHES;
-
-    // count of the number of inserts and deletes in the chunk
-    extern column < U32 > izip_encoding CGRAPH_INDELS;
-
-
-    /* writing rules */
-    INSDC:dna:text in_local_dna_text
-        = < INSDC:dna:text, INSDC:dna:text > map < '.acmgrsvtwyhkdbn','NACMGRSVTWYHKDBN' > ( LOCAL_SEQUENCE );
-        ;
-    INSDC:4na:bin in_local_4na_bin
-        = < INSDC:4na:bin > range_validate < 0, 15 > ( LOCAL_SEQUENCE )
-        | < INSDC:dna:text, INSDC:4na:bin > map < INSDC:4na:map:CHARSET, INSDC:4na:map:BINSET > ( in_local_dna_text )
-        ;
-    INSDC:2na:bin in_local_2na_bin
-        = INSDC:SEQ:rand_4na_2na ( in_local_4na_bin )
-        ;
-    INSDC:4na:bin in_ambig_4na_bin
-        = < INSDC:4na:bin, INSDC:4na:bin > map < INSDC:4na:map:BINSET, [ 15,0,0,3,0,5,6,7,0,9,10,11,12,13,14,15 ] > ( in_local_4na_bin );
-        ;
-
-    INSDC:4na:bin in_stats_seq = in_local_4na_bin;
-
-    /* physical columns for sequence */
-    physical column INSDC:2na:packed .LOCAL_SEQUENCE
-        = ( INSDC:2na:packed ) pack ( in_local_2na_bin )
-        ;
-    physical column < INSDC:4na:bin > zip_encoding .LOCAL_AMBIGUITY
-        = < INSDC:4na:bin > trim < 0, 0 > ( in_ambig_4na_bin )
-        ;
-
-    /* reading rules */
-    INSDC:2na:packed out_local_2na_packed
-        = .LOCAL_SEQUENCE
-        ;
-    INSDC:2na:bin out_local_2na_bin
-        = ( INSDC:2na:bin ) unpack ( out_local_2na_packed )
-        ;
-    INSDC:4na:bin out_local_2na_4na_bin
-        = < INSDC:2na:bin, INSDC:4na:bin > map < INSDC:2na:map:BINSET, [ 1, 2, 4, 8 ] > ( out_local_2na_bin );
-        ;
-    INSDC:4na:bin out_local_4na_bin
-        = < INSDC:4na:bin > bit_or < ALIGN_RIGHT > ( out_local_2na_4na_bin, .LOCAL_AMBIGUITY )
-        ;
-    INSDC:dna:text out_local_dna_text
-        = < INSDC:4na:bin, INSDC:dna:text > map < INSDC:4na:map:BINSET, INSDC:4na:map:CHARSET > ( out_local_4na_bin )
-        ;
-
-
-    INSDC:coord:len in_local_read_len
-        = ( INSDC:coord:len ) row_len ( in_local_2na_bin )
-        ;
-    INSDC:SRA:xread_type in_local_read_type
-        = < INSDC:SRA:xread_type > echo < SRA_READ_TYPE_BIOLOGICAL > ()
-        ;
-}
-
-
-/*--------------------------------------------------------------------------
- * "views"
- */
-table NCBI:csra2:view:reference #1.0
-    = NCBI:csra2:tbl:reference #1.0
-{
-    /* EXTERNAL
-     *  may need to be a function
-     *  it can test the CANONICAL_NAME as in cSRA.v1,
-     *  but if internal it can also check row_length of bases
-     */
-    readonly column bool EXTERNAL
-        = < bool > exists < false > ( .LOCAL_SEQUENCE )
-        | < bool > echo < true > ()
-        ;
-
-    /* SEQUENCE
-     *  available as text, 4na, x2na, 2na
-     */
-    default readonly column INSDC:dna:text SEQUENCE
-        = out_dna_text
-        ;
-    readonly column INSDC:4na:bin SEQUENCE
-        = out_4na_bin
-        ;
-    readonly column INSDC:4na:packed SEQUENCE
-        = ( INSDC:4na:packed ) pack ( out_4na_bin )
-        ;
-    readonly column INSDC:x2na:bin SEQUENCE
-        = < INSDC:4na:bin, INSDC:x2na:bin > map < INSDC:4na:map:BINSET, [ 4,0,1,4,2,4,4,4,3,4,4,4,4,4,4,4 ] > ( out_4na_bin )
-        ;
-    readonly column INSDC:2na:bin SEQUENCE
-        = out_2na_bin
-        ;
-    readonly column INSDC:2na:packed SEQUENCE
-        = pack ( out_2na_bin )
-        ;
-
-    /* QUALITY
-     * This is fake column for compatibility
-     */
-    readonly column INSDC:quality:phred QUALITY
-        = out_qual_phred
-        ;
-
-    /* column aliases */
-    readonly column INSDC:coord:len MAX_SEQ_LEN = .CHUNK_SIZE;
-    readonly column ascii SEQ_ID = cast ( .CANONICAL_NAME );
-
-    /* sequence productions */
-    INSDC:4na:bin out_4na_bin
-        = out_local_4na_bin
-    // TODO:  | sub-select from external table
-        ;
-
-    INSDC:dna:text out_dna_text
-        = < INSDC:4na:bin, INSDC:dna:text > map < INSDC:4na:map:BINSET, INSDC:4na:map:CHARSET > ( out_4na_bin )
-        ;
-
-    INSDC:2na:bin out_2na_bin
-        = INSDC:SEQ:rand_4na_2na ( out_4na_bin )
-        ;
-
-    /* quality productions */
-    INSDC:quality:phred out_qual_phred
-        = < INSDC:quality:phred > echo < 30 > ( SEQUENCE )
-        ;
-
-    INSDC:quality:phred in_stats_qual_phred = out_qual_phred;
-}
-
diff --git a/interfaces/csra2/stats.vschema b/interfaces/csra2/stats.vschema
deleted file mode 100644
index d89caae..0000000
--- a/interfaces/csra2/stats.vschema
+++ /dev/null
@@ -1,92 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * NCBI Sequence Read Archive schema
- */
-version 1;
-
-include 'vdb/vdb.vschema';
-include 'insdc/insdc.vschema';
-include 'insdc/sra.vschema';
-
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-extern function
-U8 NCBI:csra2:stats_trigger #1 ( B8 read_bin * ascii read_group );
-
-extern function
-U8 NCBI:csra2:phred_stats_trigger #1 ( INSDC:quality:phred qual_bin )
-    = NCBI:SRA:phred_stats_trigger;
-
-/*--------------------------------------------------------------------------
- * table
- */
-
-table NCBI:csra2:tbl:read_stats #1
-{
-    readonly column I64 MIN_READ_ID = min_read_id;
-    readonly column I64 MAX_READ_ID = max_read_id;
-    readonly column U64 READ_COUNT  = read_count;
-    readonly column U64 BASE_COUNT  = base_count;
-
-    /* introduce compatibility names */
-    readonly column INSDC:SRA:spotid_t MIN_SPOT_ID = cast ( min_read_id );
-    readonly column INSDC:SRA:spotid_t MAX_SPOT_ID = cast ( max_read_id );
-    readonly column U64 SPOT_COUNT  = read_count;
-
-    /* reading rules */
-    I64 min_read_id
-        = < I64 > meta:value < "STATS/TABLE/READ_MIN" > ()
-        | < I64 > meta:value < "STATS/TABLE/SPOT_MIN" > ()
-        | < I64 > echo < 1 > ()
-        ;
-    I64 max_read_id
-        = < I64 > meta:value < "STATS/TABLE/READ_MAX" > ()
-        | < I64 > meta:value < "STATS/TABLE/SPOT_MAX" > ()
-        | cast ( read_count )
-        ;
-    U64 read_count
-        = < U64 > meta:value < "STATS/TABLE/READ_COUNT" > ()
-        | < U64 > meta:value < "STATS/TABLE/SPOT_COUNT" > ()
-        ;
-    U64 base_count
-        = < U64 > meta:value < "STATS/TABLE/BASE_COUNT" > ()
-        ;
-
-    /* triggers */
-    trigger meta_stats
-        = NCBI:csra2:stats_trigger ( in_stats_seq, in_stats_read_group )
-        | NCBI:csra2:stats_trigger ( in_stats_seq )
-        ;
-        
-    trigger qual_stats
-        = NCBI:csra2:phred_stats_trigger #1 ( in_stats_qual_phred )
-        ;
-}
diff --git a/interfaces/ext/bzlib.h b/interfaces/ext/bzlib.h
deleted file mode 100644
index 8277123..0000000
--- a/interfaces/ext/bzlib.h
+++ /dev/null
@@ -1,282 +0,0 @@
-
-/*-------------------------------------------------------------*/
-/*--- Public header file for the library.                   ---*/
-/*---                                               bzlib.h ---*/
-/*-------------------------------------------------------------*/
-
-/* ------------------------------------------------------------------
-   This file is part of bzip2/libbzip2, a program and library for
-   lossless, block-sorting data compression.
-
-   bzip2/libbzip2 version 1.0.6 of 6 September 2010
-   Copyright (C) 1996-2010 Julian Seward <jseward at bzip.org>
-
-   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
-   README file.
-
-   This program is released under the terms of the license contained
-   in the file LICENSE.
-   ------------------------------------------------------------------ */
-
-
-#ifndef _BZLIB_H
-#define _BZLIB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define BZ_RUN               0
-#define BZ_FLUSH             1
-#define BZ_FINISH            2
-
-#define BZ_OK                0
-#define BZ_RUN_OK            1
-#define BZ_FLUSH_OK          2
-#define BZ_FINISH_OK         3
-#define BZ_STREAM_END        4
-#define BZ_SEQUENCE_ERROR    (-1)
-#define BZ_PARAM_ERROR       (-2)
-#define BZ_MEM_ERROR         (-3)
-#define BZ_DATA_ERROR        (-4)
-#define BZ_DATA_ERROR_MAGIC  (-5)
-#define BZ_IO_ERROR          (-6)
-#define BZ_UNEXPECTED_EOF    (-7)
-#define BZ_OUTBUFF_FULL      (-8)
-#define BZ_CONFIG_ERROR      (-9)
-
-typedef 
-   struct {
-      char *next_in;
-      unsigned int avail_in;
-      unsigned int total_in_lo32;
-      unsigned int total_in_hi32;
-
-      char *next_out;
-      unsigned int avail_out;
-      unsigned int total_out_lo32;
-      unsigned int total_out_hi32;
-
-      void *state;
-
-      void *(*bzalloc)(void *,int,int);
-      void (*bzfree)(void *,void *);
-      void *opaque;
-   } 
-   bz_stream;
-
-
-#ifndef BZ_IMPORT
-#define BZ_EXPORT
-#endif
-
-#ifndef BZ_NO_STDIO
-/* Need a definitition for FILE */
-#include <stdio.h>
-#endif
-
-#ifdef _WIN32
-#   include <windows.h>
-#   ifdef small
-      /* windows.h define small to char */
-#      undef small
-#   endif
-#   ifdef BZ_EXPORT
-#   define BZ_API(func) WINAPI func
-#   define BZ_EXTERN extern
-#   else
-   /* import windows dll dynamically */
-#   define BZ_API(func) (WINAPI * func)
-#   define BZ_EXTERN
-#   endif
-#else
-#   define BZ_API(func) func
-#   define BZ_EXTERN extern
-#endif
-
-
-/*-- Core (low-level) library functions --*/
-
-BZ_EXTERN int BZ_API(BZ2_bzCompressInit) ( 
-      bz_stream* strm, 
-      int        blockSize100k, 
-      int        verbosity, 
-      int        workFactor 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzCompress) ( 
-      bz_stream* strm, 
-      int action 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) ( 
-      bz_stream* strm 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) ( 
-      bz_stream *strm, 
-      int       verbosity, 
-      int       small
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzDecompress) ( 
-      bz_stream* strm 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) ( 
-      bz_stream *strm 
-   );
-
-
-
-/*-- High(er) level library functions --*/
-
-#ifndef BZ_NO_STDIO
-#define BZ_MAX_UNUSED 5000
-
-typedef void BZFILE;
-
-BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) ( 
-      int*  bzerror,   
-      FILE* f, 
-      int   verbosity, 
-      int   small,
-      void* unused,    
-      int   nUnused 
-   );
-
-BZ_EXTERN void BZ_API(BZ2_bzReadClose) ( 
-      int*    bzerror, 
-      BZFILE* b 
-   );
-
-BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) ( 
-      int*    bzerror, 
-      BZFILE* b, 
-      void**  unused,  
-      int*    nUnused 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzRead) ( 
-      int*    bzerror, 
-      BZFILE* b, 
-      void*   buf, 
-      int     len 
-   );
-
-BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) ( 
-      int*  bzerror,      
-      FILE* f, 
-      int   blockSize100k, 
-      int   verbosity, 
-      int   workFactor 
-   );
-
-BZ_EXTERN void BZ_API(BZ2_bzWrite) ( 
-      int*    bzerror, 
-      BZFILE* b, 
-      void*   buf, 
-      int     len 
-   );
-
-BZ_EXTERN void BZ_API(BZ2_bzWriteClose) ( 
-      int*          bzerror, 
-      BZFILE*       b, 
-      int           abandon, 
-      unsigned int* nbytes_in, 
-      unsigned int* nbytes_out 
-   );
-
-BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) ( 
-      int*          bzerror, 
-      BZFILE*       b, 
-      int           abandon, 
-      unsigned int* nbytes_in_lo32, 
-      unsigned int* nbytes_in_hi32, 
-      unsigned int* nbytes_out_lo32, 
-      unsigned int* nbytes_out_hi32
-   );
-#endif
-
-
-/*-- Utility functions --*/
-
-BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) ( 
-      char*         dest, 
-      unsigned int* destLen,
-      char*         source, 
-      unsigned int  sourceLen,
-      int           blockSize100k, 
-      int           verbosity, 
-      int           workFactor 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) ( 
-      char*         dest, 
-      unsigned int* destLen,
-      char*         source, 
-      unsigned int  sourceLen,
-      int           small, 
-      int           verbosity 
-   );
-
-
-/*--
-   Code contributed by Yoshioka Tsuneo (tsuneo at rr.iij4u.or.jp)
-   to support better zlib compatibility.
-   This code is not _officially_ part of libbzip2 (yet);
-   I haven't tested it, documented it, or considered the
-   threading-safeness of it.
-   If this code breaks, please contact both Yoshioka and me.
---*/
-
-BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) (
-      void
-   );
-
-#ifndef BZ_NO_STDIO
-BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) (
-      const char *path,
-      const char *mode
-   );
-
-BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) (
-      int        fd,
-      const char *mode
-   );
-         
-BZ_EXTERN int BZ_API(BZ2_bzread) (
-      BZFILE* b, 
-      void* buf, 
-      int len 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzwrite) (
-      BZFILE* b, 
-      void*   buf, 
-      int     len 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzflush) (
-      BZFILE* b
-   );
-
-BZ_EXTERN void BZ_API(BZ2_bzclose) (
-      BZFILE* b
-   );
-
-BZ_EXTERN const char * BZ_API(BZ2_bzerror) (
-      BZFILE *b, 
-      int    *errnum
-   );
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/*-------------------------------------------------------------*/
-/*--- end                                           bzlib.h ---*/
-/*-------------------------------------------------------------*/
diff --git a/interfaces/ext/hdf5/H5ACpublic.h b/interfaces/ext/hdf5/H5ACpublic.h
deleted file mode 100644
index 639179c..0000000
--- a/interfaces/ext/hdf5/H5ACpublic.h
+++ /dev/null
@@ -1,508 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*-------------------------------------------------------------------------
- *
- * Created:             H5ACpublic.h
- *                      Jul 10 1997
- *                      Robb Matzke <matzke at llnl.gov>
- *
- * Purpose:             Public include file for cache functions.
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-#ifndef _H5ACpublic_H
-#define _H5ACpublic_H
-
-/* Public headers needed by this file */
-#include "H5public.h"
-#include "H5Cpublic.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/****************************************************************************
- *
- * structure H5AC_cache_config_t
- *
- * H5AC_cache_config_t is a public structure intended for use in public APIs.
- * At least in its initial incarnation, it is basicaly a copy of struct
- * H5C_auto_size_ctl_t, minus the report_fcn field, and plus the
- * dirty_bytes_threshold field.
- *
- * The report_fcn field is omitted, as including it would require us to
- * make H5C_t structure public.
- *
- * The dirty_bytes_threshold field does not appear in H5C_auto_size_ctl_t,
- * as synchronization between caches on different processes is handled at
- * the H5AC level, not at the level of H5C.  Note however that there is
- * considerable interaction between this value and the other fields in this
- * structure.
- *
- * Similarly, the open_trace_file, close_trace_file, and trace_file_name
- * fields do not appear in H5C_auto_size_ctl_t, as most trace file
- * issues are handled at the H5AC level.  The one exception is storage of
- * the pointer to the trace file, which is handled by H5C.
- *
- * The structure is in H5ACpublic.h as we may wish to allow different
- * configuration options for metadata and raw data caches.
- *
- * The fields of the structure are discussed individually below:
- *
- * version: Integer field containing the version number of this version
- *      of the H5AC_cache_config_t structure.  Any instance of
- *      H5AC_cache_config_t passed to the cache must have a known
- *      version number, or an error will be flagged.
- *
- * rpt_fcn_enabled: Boolean field used to enable and disable the default
- *	reporting function.  This function is invoked every time the
- *	automatic cache resize code is run, and reports on its activities.
- *
- *	This is a debugging function, and should normally be turned off.
- *
- * open_trace_file: Boolean field indicating whether the trace_file_name
- * 	field should be used to open a trace file for the cache.
- *
- * 	The trace file is a debuging feature that allow the capture of
- * 	top level metadata cache requests for purposes of debugging and/or
- * 	optimization.  This field should normally be set to FALSE, as
- * 	trace file collection imposes considerable overhead.
- *
- * 	This field should only be set to TRUE when the trace_file_name
- * 	contains the full path of the desired trace file, and either
- * 	there is no open trace file on the cache, or the close_trace_file
- * 	field is also TRUE.
- *
- * close_trace_file: Boolean field indicating whether the current trace
- * 	file (if any) should be closed.
- *
- * 	See the above comments on the open_trace_file field.  This field
- * 	should be set to FALSE unless there is an open trace file on the
- * 	cache that you wish to close.
- *
- * trace_file_name: Full path of the trace file to be opened if the
- * 	open_trace_file field is TRUE.
- *
- * 	In the parallel case, an ascii representation of the mpi rank of
- * 	the process will be appended to the file name to yield a unique
- * 	trace file name for each process.
- *
- * 	The length of the path must not exceed H5AC__MAX_TRACE_FILE_NAME_LEN
- * 	characters.
- *
- * evictions_enabled:  Boolean field used to either report the current
- * 	evictions enabled status of the cache, or to set the cache's
- *	evictions enabled status.
- *
- * 	In general, the metadata cache should always be allowed to
- * 	evict entries.  However, in some cases it is advantageous to
- * 	disable evictions briefly, and thereby postpone metadata
- * 	writes.  However, this must be done with care, as the cache
- * 	can grow quickly.  If you do this, re-enable evictions as
- * 	soon as possible and monitor cache size.
- *
- * 	At present, evictions can only be disabled if automatic
- * 	cache resizing is also disabled (that is, ( incr_mode ==
- *	H5C_incr__off ) && ( decr_mode == H5C_decr__off )).  There
- *	is no logical reason why this should be so, but it simplifies
- *	implementation and testing, and I can't think of any reason
- *	why it would be desireable.  If you can think of one, I'll
- *	revisit the issue.
- *
- * set_initial_size: Boolean flag indicating whether the size of the
- *      initial size of the cache is to be set to the value given in
- *      the initial_size field.  If set_initial_size is FALSE, the
- *      initial_size field is ignored.
- *
- * initial_size: If enabled, this field contain the size the cache is
- *      to be set to upon receipt of this structure.  Needless to say,
- *      initial_size must lie in the closed interval [min_size, max_size].
- *
- * min_clean_fraction: double in the range 0 to 1 indicating the fraction
- *      of the cache that is to be kept clean.  This field is only used
- *      in parallel mode.  Typical values are 0.1 to 0.5.
- *
- * max_size: Maximum size to which the cache can be adjusted.  The
- *      supplied value must fall in the closed interval
- *      [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE].  Also, max_size must
- *      be greater than or equal to min_size.
- *
- * min_size: Minimum size to which the cache can be adjusted.  The
- *      supplied value must fall in the closed interval
- *      [H5C__MIN_MAX_CACHE_SIZE, H5C__MAX_MAX_CACHE_SIZE].  Also, min_size
- *      must be less than or equal to max_size.
- *
- * epoch_length: Number of accesses on the cache over which to collect
- *      hit rate stats before running the automatic cache resize code,
- *      if it is enabled.
- *
- *      At the end of an epoch, we discard prior hit rate data and start
- *      collecting afresh.  The epoch_length must lie in the closed
- *      interval [H5C__MIN_AR_EPOCH_LENGTH, H5C__MAX_AR_EPOCH_LENGTH].
- *
- *
- * Cache size increase control fields:
- *
- * incr_mode: Instance of the H5C_cache_incr_mode enumerated type whose
- *      value indicates how we determine whether the cache size should be
- *      increased.  At present there are two possible values:
- *
- *      H5C_incr__off:  Don't attempt to increase the size of the cache
- *              automatically.
- *
- *              When this increment mode is selected, the remaining fields
- *              in the cache size increase section ar ignored.
- *
- *      H5C_incr__threshold: Attempt to increase the size of the cache
- *              whenever the average hit rate over the last epoch drops
- *              below the value supplied in the lower_hr_threshold
- *              field.
- *
- *              Note that this attempt will fail if the cache is already
- *              at its maximum size, or if the cache is not already using
- *              all available space.
- *
- *      Note that you must set decr_mode to H5C_incr__off if you
- *      disable metadata cache entry evictions.
- *
- * lower_hr_threshold: Lower hit rate threshold.  If the increment mode
- *      (incr_mode) is H5C_incr__threshold and the hit rate drops below the
- *      value supplied in this field in an epoch, increment the cache size by
- *      size_increment.  Note that cache size may not be incremented above
- *      max_size, and that the increment may be further restricted by the
- *      max_increment field if it is enabled.
- *
- *      When enabled, this field must contain a value in the range [0.0, 1.0].
- *      Depending on the incr_mode selected, it may also have to be less than
- *      upper_hr_threshold.
- *
- * increment:  Double containing the multiplier used to derive the new
- *      cache size from the old if a cache size increment is triggered.
- *      The increment must be greater than 1.0, and should not exceed 2.0.
- *
- *      The new cache size is obtained my multiplying the current max cache
- *      size by the increment, and then clamping to max_size and to stay
- *      within the max_increment as necessary.
- *
- * apply_max_increment:  Boolean flag indicating whether the max_increment
- *      field should be used to limit the maximum cache size increment.
- *
- * max_increment: If enabled by the apply_max_increment field described
- *      above, this field contains the maximum number of bytes by which the
- *      cache size can be increased in a single re-size.
- *
- * flash_incr_mode:  Instance of the H5C_cache_flash_incr_mode enumerated
- *      type whose value indicates whether and by which algorithm we should
- *      make flash increases in the size of the cache to accomodate insertion
- *      of large entries and large increases in the size of a single entry.
- *
- *      The addition of the flash increment mode was occasioned by performance
- *      problems that appear when a local heap is increased to a size in excess
- *      of the current cache size.  While the existing re-size code dealt with
- *      this eventually, performance was very bad for the remainder of the
- *      epoch.
- *
- *      At present, there are two possible values for the flash_incr_mode:
- *
- *      H5C_flash_incr__off:  Don't perform flash increases in the size of
- *              the cache.
- *
- *      H5C_flash_incr__add_space:  Let x be either the size of a newly
- *              newly inserted entry, or the number of bytes by which the
- *              size of an existing entry has been increased.
- *
- *              If
- *                      x > flash_threshold * current max cache size,
- *
- *              increase the current maximum cache size by x * flash_multiple
- *              less any free space in the cache, and star a new epoch.  For
- *              now at least, pay no attention to the maximum increment.
- *
- *      In both of the above cases, the flash increment pays no attention to
- *      the maximum increment (at least in this first incarnation), but DOES
- *      stay within max_size.
- *
- *      With a little thought, it should be obvious that the above flash
- *      cache size increase algorithm is not sufficient for all circumstances
- *      -- for example, suppose the user round robins through
- *      (1/flash_threshold) +1 groups, adding one data set to each on each
- *      pass.  Then all will increase in size at about the same time, requiring
- *      the max cache size to at least double to maintain acceptable
- *      performance, however the above flash increment algorithm will not be
- *      triggered.
- *
- *      Hopefully, the add space algorithms detailed above will be sufficient
- *      for the performance problems encountered to date.  However, we should
- *      expect to revisit the issue.
- *
- * flash_multiple: Double containing the multiple described above in the
- *      H5C_flash_incr__add_space section of the discussion of the
- *      flash_incr_mode section.  This field is ignored unless flash_incr_mode
- *      is H5C_flash_incr__add_space.
- *
- * flash_threshold: Double containing the factor by which current max cache
- *      size is multiplied to obtain the size threshold for the add_space flash
- *      increment algorithm.  The field is ignored unless flash_incr_mode is
- *      H5C_flash_incr__add_space.
- *
- *
- * Cache size decrease control fields:
- *
- * decr_mode: Instance of the H5C_cache_decr_mode enumerated type whose
- *      value indicates how we determine whether the cache size should be
- *      decreased.  At present there are four possibilities.
- *
- *      H5C_decr__off:  Don't attempt to decrease the size of the cache
- *              automatically.
- *
- *              When this increment mode is selected, the remaining fields
- *              in the cache size decrease section are ignored.
- *
- *      H5C_decr__threshold: Attempt to decrease the size of the cache
- *              whenever the average hit rate over the last epoch rises
- *              above the value supplied in the upper_hr_threshold
- *              field.
- *
- *      H5C_decr__age_out:  At the end of each epoch, search the cache for
- *              entries that have not been accessed for at least the number
- *              of epochs specified in the epochs_before_eviction field, and
- *              evict these entries.  Conceptually, the maximum cache size
- *              is then decreased to match the new actual cache size.  However,
- *              this reduction may be modified by the min_size, the
- *              max_decrement, and/or the empty_reserve.
- *
- *      H5C_decr__age_out_with_threshold:  Same as age_out, but we only
- *              attempt to reduce the cache size when the hit rate observed
- *              over the last epoch exceeds the value provided in the
- *              upper_hr_threshold field.
- *
- *      Note that you must set decr_mode to H5C_decr__off if you
- *      disable metadata cache entry evictions.
- *
- * upper_hr_threshold: Upper hit rate threshold.  The use of this field
- *      varies according to the current decr_mode:
- *
- *      H5C_decr__off or H5C_decr__age_out:  The value of this field is
- *              ignored.
- *
- *      H5C_decr__threshold:  If the hit rate exceeds this threshold in any
- *              epoch, attempt to decrement the cache size by size_decrement.
- *
- *              Note that cache size may not be decremented below min_size.
- *
- *              Note also that if the upper_threshold is 1.0, the cache size
- *              will never be reduced.
- *
- *      H5C_decr__age_out_with_threshold:  If the hit rate exceeds this
- *              threshold in any epoch, attempt to reduce the cache size
- *              by evicting entries that have not been accessed for more
- *              than the specified number of epochs.
- *
- * decrement: This field is only used when the decr_mode is
- *      H5C_decr__threshold.
- *
- *      The field is a double containing the multiplier used to derive the
- *      new cache size from the old if a cache size decrement is triggered.
- *      The decrement must be in the range 0.0 (in which case the cache will
- *      try to contract to its minimum size) to 1.0 (in which case the
- *      cache will never shrink).
- *
- * apply_max_decrement:  Boolean flag used to determine whether decrements
- *      in cache size are to be limited by the max_decrement field.
- *
- * max_decrement: Maximum number of bytes by which the cache size can be
- *      decreased in a single re-size.  Note that decrements may also be
- *      restricted by the min_size of the cache, and (in age out modes) by
- *      the empty_reserve field.
- *
- * epochs_before_eviction:  Integer field used in H5C_decr__age_out and
- *      H5C_decr__age_out_with_threshold decrement modes.
- *
- *      This field contains the number of epochs an entry must remain
- *      unaccessed before it is evicted in an attempt to reduce the
- *      cache size.  If applicable, this field must lie in the range
- *      [1, H5C__MAX_EPOCH_MARKERS].
- *
- * apply_empty_reserve:  Boolean field controlling whether the empty_reserve
- *      field is to be used in computing the new cache size when the
- *      decr_mode is H5C_decr__age_out or H5C_decr__age_out_with_threshold.
- *
- * empty_reserve:  To avoid a constant racheting down of cache size by small
- *      amounts in the H5C_decr__age_out and H5C_decr__age_out_with_threshold
- *      modes, this field allows one to require that any cache size
- *      reductions leave the specified fraction of unused space in the cache.
- *
- *      The value of this field must be in the range [0.0, 1.0].  I would
- *      expect typical values to be in the range of 0.01 to 0.1.
- *
- *
- * Parallel Configuration Fields:
- *
- * In PHDF5, all operations that modify metadata must be executed collectively.
- *
- * We used to think that this was enough to ensure consistency across the
- * metadata caches, but since we allow processes to read metadata individually,
- * the order of dirty entries in the LRU list can vary across processes,
- * which can result in inconsistencies between the caches.
- *
- * PHDF5 uses several strategies to prevent such inconsistencies in metadata,
- * all of which use the fact that the same stream of dirty metadata is seen
- * by all processes for purposes of synchronization.  This is done by 
- * having each process count the number of bytes of dirty metadata generated,
- * and then running a "sync point" whenever this count exceeds a user 
- * specified threshold (see dirty_bytes_threshold below).
- *
- * The current metadata write strategy is indicated by the 
- * metadata_write_strategy field.  The possible values of this field, along
- * with the associated metadata write strategies are discussed below.
- *
- * dirty_bytes_threshold:  Threshold of dirty byte creation used to
- * 	synchronize updates between caches. (See above for outline and
- *	motivation.)
- *
- *	This value MUST be consistant across all processes accessing the
- *	file.  This field is ignored unless HDF5 has been compiled for
- *	parallel.
- *
- * metadata_write_strategy: Integer field containing a code indicating the
- *	desired metadata write strategy.  The valid values of this field
- *	are enumerated and discussed below:
- *
- *
- *	H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY:
- *
- *	When metadata_write_strategy is set to this value, only process 
- *	zero is allowed to write dirty metadata to disk.  All other 
- *	processes must retain dirty metadata until they are informed at
- *	a sync point that the dirty metadata in question has been written
- *	to disk.
- *
- *	When the sync point is reached (or when there is a user generated
- *	flush), process zero flushes sufficient entries to bring it into
- *	complience with its min clean size (or flushes all dirty entries in
- *	the case of a user generated flush), broad casts the list of 
- *	entries just cleaned to all the other processes, and then exits
- *	the sync point.
- *
- *	Upon receipt of the broadcast, the other processes mark the indicated
- *	entries as clean, and leave the sync point as well.
- *
- *
- *	H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED:
- *
- *	In the distributed metadata write strategy, process zero still makes
- *	the decisions as to what entries should be flushed, but the actual 
- *	flushes are distributed across the processes in the computation to 
- *	the extent possible.
- *
- *	In this strategy, when a sync point is triggered (either by dirty
- *	metadata creation or manual flush), all processes enter a barrier.
- *
- *	On the other side of the barrier, process 0 constructs an ordered
- *	list of the entries to be flushed, and then broadcasts this list
- *	to the caches in all the processes.
- *
- *	All processes then scan the list of entries to be flushed, flushing
- *	some, and marking the rest as clean.  The algorithm for this purpose
- *	ensures that each entry in the list is flushed exactly once, and 
- *	all are marked clean in each cache.
- *
- *	Note that in the case of a flush of the cache, no message passing
- *	is necessary, as all processes have the same list of dirty entries, 
- *	and all of these entries must be flushed.  Thus in this case it is 
- *	sufficient for each process to sort its list of dirty entries after 
- *	leaving the initial barrier, and use this list as if it had been 
- *	received from process zero.
- *
- *	To avoid possible messages from the past/future, all caches must
- *	wait until all caches are done before leaving the sync point.
- *      
- ****************************************************************************/
-
-#define H5AC__CURR_CACHE_CONFIG_VERSION 	1
-#define H5AC__MAX_TRACE_FILE_NAME_LEN		1024
-
-#define H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY    0
-#define H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED       1
-
-typedef struct H5AC_cache_config_t
-{
-    /* general configuration fields: */
-    int                      version;
-
-    hbool_t		     rpt_fcn_enabled;
-
-    hbool_t		     open_trace_file;
-    hbool_t                  close_trace_file;
-    char                     trace_file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + 1];
-
-    hbool_t                  evictions_enabled;
-
-    hbool_t                  set_initial_size;
-    size_t                   initial_size;
-
-    double                   min_clean_fraction;
-
-    size_t                   max_size;
-    size_t                   min_size;
-
-    long int                 epoch_length;
-
-
-    /* size increase control fields: */
-    enum H5C_cache_incr_mode incr_mode;
-
-    double                   lower_hr_threshold;
-
-    double                   increment;
-
-    hbool_t                  apply_max_increment;
-    size_t                   max_increment;
-
-    enum H5C_cache_flash_incr_mode      flash_incr_mode;
-    double                              flash_multiple;
-    double                              flash_threshold;
-
-
-    /* size decrease control fields: */
-    enum H5C_cache_decr_mode decr_mode;
-
-    double                   upper_hr_threshold;
-
-    double                   decrement;
-
-    hbool_t                  apply_max_decrement;
-    size_t                   max_decrement;
-
-    int                      epochs_before_eviction;
-
-    hbool_t                  apply_empty_reserve;
-    double                   empty_reserve;
-
-
-    /* parallel configuration fields: */
-    int                      dirty_bytes_threshold;
-    int                      metadata_write_strategy;
-
-} H5AC_cache_config_t;
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5AbstractDs.h b/interfaces/ext/hdf5/H5AbstractDs.h
deleted file mode 100644
index 1d04d6c..0000000
--- a/interfaces/ext/hdf5/H5AbstractDs.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-// Class AbstractDs is an abstract base class, from which Attribute and
-// DataSet inherit.  It provides the services that are common to both
-// Attribute and DataSet.  It also inherits from H5Object and passes down
-// the services that H5Object provides.
-
-#ifndef _AbstractDs_H
-#define _AbstractDs_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class ArrayType;
-class CompType;
-class EnumType;
-class FloatType;
-class IntType;
-class StrType;
-class VarLenType;
-class H5_DLLCPP AbstractDs {
-   public:
-	// Gets a copy the datatype of that this abstract dataset uses.
-	// Note that this datatype is a generic one and can only be accessed
-	// via generic member functions, i.e., member functions belong
-	// to DataType.  To get specific datatype, i.e. EnumType, FloatType,
-	// etc..., use the specific functions, that follow, instead.
-	DataType getDataType() const;
-
-	// Gets a copy of the specific datatype of this abstract dataset.
-	ArrayType getArrayType() const;
-	CompType getCompType() const;
-	EnumType getEnumType() const;
-	IntType getIntType() const;
-	FloatType getFloatType() const;
-	StrType getStrType() const;
-	VarLenType getVarLenType() const;
-
-	// Gets the size in memory of this abstract dataset.
-	virtual size_t getInMemDataSize() const = 0;
-
-	// Gets the dataspace of this abstract dataset - pure virtual.
-	virtual DataSpace getSpace() const = 0;
-
-	// Gets the class of the datatype that is used by this abstract
-	// dataset.
-	H5T_class_t getTypeClass() const;
-
-	// Returns the amount of storage size required for this abstract
-	// dataset - pure virtual.
-	virtual hsize_t getStorageSize() const = 0;
-
-	// Returns this class name
-	virtual H5std_string fromClass() const = 0;
-
-	// Copy constructor
-	AbstractDs( const AbstractDs& original );
-
-	// Destructor
-	virtual ~AbstractDs();
-
-   protected:
-	// Default constructor
-	AbstractDs();
-
-	// Constructor that takes an attribute id or a dataset id.
-	AbstractDs( const hid_t ds_id );
-
-   private:
-	// This member function is implemented by DataSet and Attribute.
-	virtual hid_t p_get_type() const = 0;
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif // _AbstractDs_H
diff --git a/interfaces/ext/hdf5/H5Apublic.h b/interfaces/ext/hdf5/H5Apublic.h
deleted file mode 100644
index 99ca90e..0000000
--- a/interfaces/ext/hdf5/H5Apublic.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This file contains public declarations for the H5A module.
- */
-#ifndef _H5Apublic_H
-#define _H5Apublic_H
-
-/* Public headers needed by this file */
-#include "H5Ipublic.h"		/* IDs			  		*/
-#include "H5Opublic.h"		/* Object Headers			*/
-#include "H5Tpublic.h"		/* Datatypes				*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Information struct for attribute (for H5Aget_info/H5Aget_info_by_idx) */
-typedef struct {
-    hbool_t             corder_valid;   /* Indicate if creation order is valid */
-    H5O_msg_crt_idx_t   corder;         /* Creation order                 */
-    H5T_cset_t          cset;           /* Character set of attribute name */
-    hsize_t             data_size;      /* Size of raw data		  */
-} H5A_info_t;
-
-/* Typedef for H5Aiterate2() callbacks */
-typedef herr_t (*H5A_operator2_t)(hid_t location_id/*in*/,
-    const char *attr_name/*in*/, const H5A_info_t *ainfo/*in*/, void *op_data/*in,out*/);
-
-/* Public function prototypes */
-H5_DLL hid_t   H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id,
-    hid_t space_id, hid_t acpl_id, hid_t aapl_id);
-H5_DLL hid_t   H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
-    hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t lapl_id);
-H5_DLL hid_t   H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id);
-H5_DLL hid_t   H5Aopen_by_name(hid_t loc_id, const char *obj_name,
-    const char *attr_name, hid_t aapl_id, hid_t lapl_id);
-H5_DLL hid_t   H5Aopen_by_idx(hid_t loc_id, const char *obj_name,
-    H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t aapl_id,
-    hid_t lapl_id);
-H5_DLL herr_t  H5Awrite(hid_t attr_id, hid_t type_id, const void *buf);
-H5_DLL herr_t  H5Aread(hid_t attr_id, hid_t type_id, void *buf);
-H5_DLL herr_t  H5Aclose(hid_t attr_id);
-H5_DLL hid_t   H5Aget_space(hid_t attr_id);
-H5_DLL hid_t   H5Aget_type(hid_t attr_id);
-H5_DLL hid_t   H5Aget_create_plist(hid_t attr_id);
-H5_DLL ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf);
-H5_DLL ssize_t H5Aget_name_by_idx(hid_t loc_id, const char *obj_name,
-    H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
-    char *name /*out*/, size_t size, hid_t lapl_id);
-H5_DLL hsize_t H5Aget_storage_size(hid_t attr_id);
-H5_DLL herr_t  H5Aget_info(hid_t attr_id, H5A_info_t *ainfo /*out*/);
-H5_DLL herr_t  H5Aget_info_by_name(hid_t loc_id, const char *obj_name,
-    const char *attr_name, H5A_info_t *ainfo /*out*/, hid_t lapl_id);
-H5_DLL herr_t  H5Aget_info_by_idx(hid_t loc_id, const char *obj_name,
-    H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
-    H5A_info_t *ainfo /*out*/, hid_t lapl_id);
-H5_DLL herr_t  H5Arename(hid_t loc_id, const char *old_name, const char *new_name);
-H5_DLL herr_t  H5Arename_by_name(hid_t loc_id, const char *obj_name,
-    const char *old_attr_name, const char *new_attr_name, hid_t lapl_id);
-H5_DLL herr_t  H5Aiterate2(hid_t loc_id, H5_index_t idx_type,
-    H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data);
-H5_DLL herr_t  H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
-    H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data,
-    hid_t lapd_id);
-H5_DLL herr_t  H5Adelete(hid_t loc_id, const char *name);
-H5_DLL herr_t  H5Adelete_by_name(hid_t loc_id, const char *obj_name,
-    const char *attr_name, hid_t lapl_id);
-H5_DLL herr_t  H5Adelete_by_idx(hid_t loc_id, const char *obj_name,
-    H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id);
-H5_DLL htri_t H5Aexists(hid_t obj_id, const char *attr_name);
-H5_DLL htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name,
-    const char *attr_name, hid_t lapl_id);
-
-/* Symbols defined for compatibility with previous versions of the HDF5 API.
- *
- * Use of these symbols is deprecated.
- */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-
-/* Macros */
-
-
-/* Typedefs */
-
-/* Typedef for H5Aiterate1() callbacks */
-typedef herr_t (*H5A_operator1_t)(hid_t location_id/*in*/,
-    const char *attr_name/*in*/, void *operator_data/*in,out*/);
-
-
-/* Function prototypes */
-H5_DLL hid_t   H5Acreate1(hid_t loc_id, const char *name, hid_t type_id,
-    hid_t space_id, hid_t acpl_id);
-H5_DLL hid_t   H5Aopen_name(hid_t loc_id, const char *name);
-H5_DLL hid_t   H5Aopen_idx(hid_t loc_id, unsigned idx);
-H5_DLL int     H5Aget_num_attrs(hid_t loc_id);
-H5_DLL herr_t  H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op,
-    void *op_data);
-
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _H5Apublic_H */
-
diff --git a/interfaces/ext/hdf5/H5ArrayType.h b/interfaces/ext/hdf5/H5ArrayType.h
deleted file mode 100644
index 0eb744c..0000000
--- a/interfaces/ext/hdf5/H5ArrayType.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-// Class ArrayType inherits from DataType and provides wrappers for the
-// HDF5 C's Array Datatypes.
-
-#ifndef _H5ArrayType_H
-#define _H5ArrayType_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP ArrayType : public DataType {
-   public:
-	// Constructor that creates a new array data type based on the
-	// specified base type.
-	ArrayType(const DataType& base_type, int ndims, const hsize_t* dims);
-
-	// Returns the number of dimensions of this array datatype.
-	int getArrayNDims();
-
-	// Returns the sizes of dimensions of this array datatype.
-	int getArrayDims(hsize_t* dims);
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("ArrayType"); }
-
-	// Copy constructor: makes copy of the original object.
-	ArrayType( const ArrayType& original );
-
-	// Constructor that takes an existing id
-	ArrayType( const hid_t existing_id );
-
-	// Noop destructor
-	virtual ~ArrayType();
-
-   protected:
-	// Default constructor
-	ArrayType();
-
-   private:
-	int rank;		// Rank of the array
-	hsize_t* dimensions;	// Sizes of the array dimensions
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5AtomType.h b/interfaces/ext/hdf5/H5AtomType.h
deleted file mode 100644
index 580b710..0000000
--- a/interfaces/ext/hdf5/H5AtomType.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-// Class AtomType is a base class, from which IntType, FloatType, StrType,
-// and PredType inherit.  It provides the services that are common to these
-// subclasses.  It also inherits from DataType and passes down the
-// services that are common to all the datatypes.
-
-#ifndef _H5AtomType_H
-#define _H5AtomType_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP AtomType : public DataType {
-   public:
-	// Returns the byte order of an atomic datatype.
-	H5T_order_t getOrder() const;
-	H5T_order_t getOrder( H5std_string& order_string ) const;
-
-	// Sets the byte ordering of an atomic datatype.
-	void setOrder( H5T_order_t order ) const;
-
-	// Retrieves the bit offset of the first significant bit.
-	// 12/05/00 - changed return type to int from size_t - C API
-	int getOffset() const;
-
-	// Sets the bit offset of the first significant bit.
-	void setOffset( size_t offset ) const;
-
-	// Retrieves the padding type of the least and most-significant bit padding.
-	void getPad( H5T_pad_t& lsb, H5T_pad_t& msb ) const;
-
-	// Sets the least and most-significant bits padding types
-	void setPad( H5T_pad_t lsb, H5T_pad_t msb ) const;
-
-	// Returns the precision of an atomic datatype.
-	size_t getPrecision() const;
-
-	// Sets the precision of an atomic datatype.
-	void setPrecision( size_t precision ) const;
-
-	// Sets the total size for an atomic datatype.
-	void setSize( size_t size ) const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("AtomType"); }
-
-	// Copy constructor - makes copy of the original object
-	AtomType( const AtomType& original );
-
-	// Noop destructor
-	virtual ~AtomType();
-
-   protected:
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	// Default constructor
-	AtomType();
-
-	// Constructor that takes an existing id
-	AtomType( const hid_t existing_id );
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5Attribute.h b/interfaces/ext/hdf5/H5Attribute.h
deleted file mode 100644
index f392f1a..0000000
--- a/interfaces/ext/hdf5/H5Attribute.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5Attribute_H
-#define _H5Attribute_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
-   public:
-	// Closes this attribute.
-	virtual void close();
-
-	// Gets the name of the file, in which this attribute belongs.
-	H5std_string getFileName() const;
-
-	// Gets the name of this attribute.
-	ssize_t getName( size_t buf_size, H5std_string& attr_name ) const;
-	H5std_string getName( size_t buf_size ) const; // returns name, not its length
-	H5std_string getName() const; // returns name, no argument
-
-	// Gets a copy of the dataspace for this attribute.
-	virtual DataSpace getSpace() const;
-
-	// Returns the amount of storage size required for this attribute.
-	virtual hsize_t getStorageSize() const;
-
-	// Returns the in memory size of this attribute's data.
-	virtual size_t getInMemDataSize() const;
-
-	// Reads data from this attribute.
-	void read( const DataType& mem_type, void *buf ) const;
-	void read( const DataType& mem_type, H5std_string& strg ) const;
-
-	// Writes data to this attribute.
-	void write(const DataType& mem_type, const void *buf ) const;
-	void write(const DataType& mem_type, const H5std_string& strg ) const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("Attribute"); }
-
-	// Creates a copy of an existing attribute using the attribute id
-	Attribute( const hid_t attr_id );
-
-	// Copy constructor: makes a copy of an existing Attribute object.
-	Attribute( const Attribute& original );
-
-	// Default constructor
-	Attribute();
-
-	// Gets the attribute id.
-	virtual hid_t getId() const;
-
-	// Destructor: properly terminates access to this attribute.
-	virtual ~Attribute();
-
-   protected:
-	// Sets the attribute id.
-	virtual void p_setId(const hid_t new_id);
-
-   private:
-	hid_t id;	// HDF5 attribute id
-
-	// This function contains the common code that is used by
-	// getTypeClass and various API functions getXxxType
-	// defined in AbstractDs for generic datatype and specific
-	// sub-types
-	virtual hid_t p_get_type() const;
-
-	// Reads variable or fixed len strings from this attribute.
-	void p_read_variable_len(const DataType& mem_type, H5std_string& strg) const;
-	void p_read_fixed_len(const DataType& mem_type, H5std_string& strg) const;
-
-	// do not inherit H5Object::iterateAttrs
-	int iterateAttrs() { return 0; }
-
-	// do not inherit H5Object::renameAttr
-	void renameAttr() {}
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5Classes.h b/interfaces/ext/hdf5/H5Classes.h
deleted file mode 100644
index f691548..0000000
--- a/interfaces/ext/hdf5/H5Classes.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5Classes_H
-#define _H5Classes_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-	class Exception;
-	class IdComponent;
-	class H5Object;
-	class PropList;
-	class FileCreatPropList;
-	class FileAccPropList;
-	class DSetCreatPropList;
-	class DSetMemXferPropList;
-	class DTypePropList;
-	class DataType;
-	class DataSpace;
-	class AtomType;
-	class PredType;
-	class EnumType;
-	class IntType;
-	class FloatType;
-	class StrType;
-	class CompType;
-	//class RefType;
-	class AbstractDs;
-	class DataSet;
-	class Group;
-	class H5File;
-	class Attribute;
-	class H5Library;
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5CommonFG.h b/interfaces/ext/hdf5/H5CommonFG.h
deleted file mode 100644
index 4f32d21..0000000
--- a/interfaces/ext/hdf5/H5CommonFG.h
+++ /dev/null
@@ -1,172 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-// CommonFG is a protocol class.  Its existence is simply to provide the
-// common services that are provided by H5File and Group.  The file or
-// group in the context of this class is referred to as 'location'.
-
-#ifndef _CommonFG_H
-#define _CommonFG_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class Group;
-class H5File;
-class ArrayType;
-class VarLenType;
-class H5_DLLCPP CommonFG {
-   public:
-	// Creates a new group at this location which can be a file
-	// or another group.
-	Group createGroup(const char* name, size_t size_hint = 0) const;
-	Group createGroup(const H5std_string& name, size_t size_hint = 0) const;
-
-	// Opens an existing group in a location which can be a file
-	// or another group.
-	Group openGroup(const char* name) const;
-	Group openGroup(const H5std_string& name) const;
-
-	// Creates a new dataset at this location.
-	DataSet createDataSet(const char* name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const;
-	DataSet createDataSet(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const;
-
-	// Opens an existing dataset at this location.
-	DataSet openDataSet(const char* name) const;
-	DataSet openDataSet(const H5std_string& name) const;
-
-	// Retrieves comment for the HDF5 object specified by its name.
-	H5std_string getComment(const char* name, size_t bufsize=256) const;
-	H5std_string getComment(const H5std_string& name, size_t bufsize=256) const;
-
-	// Removes the comment for the HDF5 object specified by its name.
-	void removeComment(const char* name) const;
-	void removeComment(const H5std_string& name) const;
-
-	// Sets the comment for an HDF5 object specified by its name.
-	void setComment(const char* name, const char* comment) const;
-	void setComment(const H5std_string& name, const H5std_string& comment) const;
-
-	// Returns the value of a symbolic link.
-	H5std_string getLinkval(const char* link_name, size_t size=0) const;
-	H5std_string getLinkval(const H5std_string& link_name, size_t size=0) const;
-
-	// Returns the number of objects in this group.
-	hsize_t getNumObjs() const;
-
-	// Retrieves the name of an object in this group, given the
-	// object's index.
-	H5std_string getObjnameByIdx(hsize_t idx) const;
-	ssize_t getObjnameByIdx(hsize_t idx, char* name, size_t size) const;
-	ssize_t getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const;
-
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-	// Returns the type of an object in this group, given the
-	// object's index.
-	H5G_obj_t getObjTypeByIdx(hsize_t idx) const;
-	H5G_obj_t getObjTypeByIdx(hsize_t idx, char* type_name) const;
-	H5G_obj_t getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const;
-
-	// Returns information about an HDF5 object, given by its name,
-	// at this location.
-	void getObjinfo(const char* name, hbool_t follow_link, H5G_stat_t& statbuf) const;
-	void getObjinfo(const H5std_string& name, hbool_t follow_link, H5G_stat_t& statbuf) const;
-	void getObjinfo(const char* name, H5G_stat_t& statbuf) const;
-	void getObjinfo(const H5std_string& name, H5G_stat_t& statbuf) const;
-
-	// Iterates over the elements of this group - not implemented in
-	// C++ style yet.
-	int iterateElems(const char* name, int *idx, H5G_iterate_t op, void *op_data);
-	int iterateElems(const H5std_string& name, int *idx, H5G_iterate_t op, void *op_data);
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-	// Creates a link of the specified type from new_name to current_name;
-	// both names are interpreted relative to the specified location id.
-	void link(H5L_type_t link_type, const char* curr_name, const char* new_name) const;
-	void link(H5L_type_t link_type, const H5std_string& curr_name, const H5std_string& new_name) const;
-
-	// Removes the specified name at this location.
-	void unlink(const char* name) const;
-	void unlink(const H5std_string& name) const;
-
-	// Mounts the file 'child' onto this location.
-	void mount(const char* name, H5File& child, PropList& plist) const;
-	void mount(const H5std_string& name, H5File& child, PropList& plist) const;
-
-	// Unmounts the file named 'name' from this parent location.
-	void unmount(const char* name) const;
-	void unmount(const H5std_string& name) const;
-
-	// Renames an object at this location.
-	void move(const char* src, const char* dst) const;
-	void move(const H5std_string& src, const H5std_string& dst) const;
-
-	// Opens a generic named datatype in this location.
-	DataType openDataType(const char* name) const;
-	DataType openDataType(const H5std_string& name) const;
-
-	// Opens a named array datatype in this location.
-	ArrayType openArrayType(const char* name) const;
-	ArrayType openArrayType(const H5std_string& name) const;
-
-	// Opens a named compound datatype in this location.
-	CompType openCompType(const char* name) const;
-	CompType openCompType(const H5std_string& name) const;
-
-	// Opens a named enumeration datatype in this location.
-	EnumType openEnumType(const char* name) const;
-	EnumType openEnumType(const H5std_string& name) const;
-
-	// Opens a named integer datatype in this location.
-	IntType openIntType(const char* name) const;
-	IntType openIntType(const H5std_string& name) const;
-
-	// Opens a named floating-point datatype in this location.
-	FloatType openFloatType(const char* name) const;
-	FloatType openFloatType(const H5std_string& name) const;
-
-	// Opens a named string datatype in this location.
-	StrType openStrType(const char* name) const;
-	StrType openStrType(const H5std_string& name) const;
-
-	// Opens a named variable length datatype in this location.
-	VarLenType openVarLenType(const char* name) const;
-	VarLenType openVarLenType(const H5std_string& name) const;
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	/// For subclasses, H5File and Group, to return the correct
-	/// object id, i.e. file or group id.
-	virtual hid_t getLocId() const = 0;
-
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
-	/// For subclasses, H5File and Group, to throw appropriate exception.
-	virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const = 0;
-
-	// Default constructor.
-	CommonFG();
-
-	// Noop destructor.
-	virtual ~CommonFG();
-
-}; // end of CommonFG declaration
-
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
-
diff --git a/interfaces/ext/hdf5/H5CompType.h b/interfaces/ext/hdf5/H5CompType.h
deleted file mode 100644
index 04b6b1f..0000000
--- a/interfaces/ext/hdf5/H5CompType.h
+++ /dev/null
@@ -1,114 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-// Class CompType inherits from DataType and provides accesses to a compound
-// datatype.
-
-#ifndef _H5CompType_H
-#define _H5CompType_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP CompType : public DataType {
-   public:
-	// Creates a new compound datatype, given the type's size
-	CompType( size_t size ); // H5Tcreate
-
-	// Gets the compound datatype of the specified dataset
-	CompType( const DataSet& dataset );  // H5Dget_type
-
-	// Returns the type class of the specified member of this compound
-	// datatype.  It provides to the user a way of knowing what type
-	// to create another datatype of the same class
-	H5T_class_t getMemberClass( unsigned member_num ) const;
-
-	// Returns the index of a member in this compound data type.
-	int getMemberIndex(const char* name) const;
-	int getMemberIndex(const H5std_string& name) const;
-
-	// Returns the offset of a member of this compound datatype.
-	size_t getMemberOffset( unsigned memb_no ) const;
-
-	// Returns the name of a member of this compound datatype.
-	H5std_string getMemberName( unsigned member_num ) const;
-
-	// Returns the generic datatype of the specified member in
-	// this compound datatype.
-	DataType getMemberDataType( unsigned member_num ) const;
-
-	// Returns the array datatype of the specified member in
-	// this compound datatype.
-	ArrayType getMemberArrayType( unsigned member_num ) const;
-
-	// Returns the compound datatype of the specified member in
-	// this compound datatype.
-	CompType getMemberCompType( unsigned member_num ) const;
-
-	// Returns the enumeration datatype of the specified member in
-	// this compound datatype.
-	EnumType getMemberEnumType( unsigned member_num ) const;
-
-	// Returns the integer datatype of the specified member in
-	// this compound datatype.
-	IntType getMemberIntType( unsigned member_num ) const;
-
-	// Returns the floating-point datatype of the specified member in
-	// this compound datatype.
-	FloatType getMemberFloatType( unsigned member_num ) const;
-
-	// Returns the string datatype of the specified member in
-	// this compound datatype.
-	StrType getMemberStrType( unsigned member_num ) const;
-
-	// Returns the variable length datatype of the specified member in
-	// this compound datatype.
-	VarLenType getMemberVarLenType( unsigned member_num ) const;
-
-	// Returns the number of members in this compound datatype.
-	int getNmembers() const;
-
-	// Adds a new member to this compound datatype.
-	void insertMember( const H5std_string& name, size_t offset, const DataType& new_member ) const;
-
-	// Recursively removes padding from within this compound datatype.
-	void pack() const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("CompType"); }
-
-	// Default constructor
-	CompType();
-
-	// Creates a compound datatype using an existing id
-	CompType( const hid_t existing_id );
-
-	// Copy constructor - makes a copy of original object
-	CompType( const CompType& original );
-
-	// Noop destructor.
-	virtual ~CompType();
-
-   private:
-	// Contains common code that is used by the member functions
-	// getMemberXxxType
-	hid_t p_get_member_type(unsigned member_num) const;
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5Cpp.h b/interfaces/ext/hdf5/H5Cpp.h
deleted file mode 100644
index 75d82ba..0000000
--- a/interfaces/ext/hdf5/H5Cpp.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5CPP_H
-#define _H5CPP_H
-
-#include "H5Include.h"
-#include "H5Exception.h"
-#include "H5IdComponent.h"
-#include "H5DataSpace.h"
-#include "H5PropList.h"
-#include "H5Object.h"
-#include "H5AbstractDs.h"
-#include "H5Attribute.h"
-#include "H5DcreatProp.h"
-#include "H5CommonFG.h"
-#include "H5DataType.h"
-#include "H5DxferProp.h"
-#include "H5FaccProp.h"
-#include "H5FcreatProp.h"
-#include "H5AtomType.h"
-#include "H5PredType.h"
-#include "H5EnumType.h"
-#include "H5IntType.h"
-#include "H5FloatType.h"
-#include "H5StrType.h"
-#include "H5CompType.h"
-#include "H5ArrayType.h"
-#include "H5VarLenType.h"
-#include "H5DataSet.h"
-#include "H5Group.h"
-#include "H5File.h"
-#include "H5Library.h"
-
-/* Some C++ compilers do not have offsetof macro; define to bypass the problem
-   - BMR- -EIP- 2007/08/01
-*/
-#ifndef H5_CXX_HAVE_OFFSETOF
-#ifdef HOFFSET
-   #undef HOFFSET
-#endif
-#define HOFFSET(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-#endif
-
-#endif
diff --git a/interfaces/ext/hdf5/H5CppDoc.h b/interfaces/ext/hdf5/H5CppDoc.h
deleted file mode 100644
index ab3fa79..0000000
--- a/interfaces/ext/hdf5/H5CppDoc.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5CPPDOC_H
-#define _H5CPPDOC_H
-
-//-------------------------------------------------------------------------
-// The following section will be used to generate the 'Mainpage'
-// and the 'Examples' for the RM.
-// ------------------------------------------------------------------------
-
-/*! \mainpage notitle
- *
- * \section intro_sec Introduction
- *
- * The C++ API provides C++ wrappers for the HDF5 C library.
- * It is assumed that the user has knowledge of the HDF5 file format
- * and its components.  If you are not familiar with HDF5 file format,
- * and would like to find out more, please refer to the HDF5 documentation
- * at http://www.hdfgroup.org/HDF5/doc/index.html
- *
- * Because the HDF5 library maps very well to
- * the object oriented design approach, classes in the C++ API can
- * closely represent the interfaces of the HDF5 APIs, as followed:
- *
- * \verbatim
- 	HDF5 C APIs				C++ Classes
- 	-----------				-----------
- 	Attribute Interface (H5A)		Attribute
- 	Datasets Interface (H5D)		DataSet
- 	Error Interface (H5E)			Exception
- 	File Interface (H5F)			H5File
- 	Group Interface (H5G)			Group
- 	Identifier Interface (H5I)		IdComponent
- 	Property List Interface (H5P)		PropList and subclasses
- 	Dataspace Interface (H5S)		DataSpace
- 	Datatype Interface (H5T)		DataType and subclasses
-  \endverbatim
- * \section install_sec Installation
- *
- * Please refer to the file release_docs/INSTALL_Windows.txt
- * under the top directory for information about installing, building,
- * and testing the C++ API.
- *
- *
- */
-
-///	This example shows how to create datasets.
-///\par
-///\example     create.cpp
-
-///\par
-///	This example shows how to write datasets.
-///\example     writedata.cpp
-
-///\par
-///	This example shows how to read datasets.
-///\example     readdata.cpp
-
-///\par
-///	This example shows how to create a compound datatype,
-///	write an array which has the compound datatype to the file,
-///	and read back fields' subsets.
-///\example     compound.cpp
-
-///\par
-///	This example shows how to work with extendible datasets.
-///\example     extend_ds.cpp
-
-///\par
-///	This example shows how to read data from a chunked dataset.
-///\example     chunks.cpp
-
-///\par
-///	This example shows how to work with groups.
-///\example     h5group.cpp
-
-#endif
diff --git a/interfaces/ext/hdf5/H5Cpublic.h b/interfaces/ext/hdf5/H5Cpublic.h
deleted file mode 100644
index 39ebbe3..0000000
--- a/interfaces/ext/hdf5/H5Cpublic.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*-------------------------------------------------------------------------
- *
- * Created:	H5Cpublic.h
- *              June 4, 2005
- *              John Mainzer
- *
- * Purpose:     Public include file for cache functions.
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-#ifndef _H5Cpublic_H
-#define _H5Cpublic_H
-
-/* Public headers needed by this file */
-#include "H5public.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum H5C_cache_incr_mode
-{
-    H5C_incr__off,
-    H5C_incr__threshold
-};
-
-enum H5C_cache_flash_incr_mode
-{
-     H5C_flash_incr__off,
-     H5C_flash_incr__add_space
-};
-
-enum H5C_cache_decr_mode
-{
-    H5C_decr__off,
-    H5C_decr__threshold,
-    H5C_decr__age_out,
-    H5C_decr__age_out_with_threshold
-};
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5DSpublic.h b/interfaces/ext/hdf5/H5DSpublic.h
deleted file mode 100644
index 85923f8..0000000
--- a/interfaces/ext/hdf5/H5DSpublic.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5DSpublic_H
-#define _H5DSpublic_H
-
-
-
-#define DIMENSION_SCALE_CLASS "DIMENSION_SCALE"
-#define DIMENSION_LIST        "DIMENSION_LIST"
-#define REFERENCE_LIST        "REFERENCE_LIST"
-#define DIMENSION_LABELS      "DIMENSION_LABELS"
-
-
-typedef herr_t  (*H5DS_iterate_t)(hid_t dset, unsigned dim, hid_t scale, void *visitor_data);
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-H5_HLDLL herr_t  H5DSattach_scale( hid_t did,
-                        hid_t dsid,
-                        unsigned int idx);
-
-H5_HLDLL herr_t  H5DSdetach_scale( hid_t did,
-                        hid_t dsid,
-                        unsigned int idx);
-
-H5_HLDLL herr_t  H5DSset_scale( hid_t dsid,
-                     const char *dimname);
-
-H5_HLDLL int H5DSget_num_scales( hid_t did,
-                       unsigned int dim);
-
-H5_HLDLL herr_t  H5DSset_label( hid_t did,
-                     unsigned int idx,
-                     const char *label);
-
-H5_HLDLL ssize_t H5DSget_label( hid_t did,
-                      unsigned int idx,
-                      char *label,
-                      size_t size);
-
-H5_HLDLL ssize_t H5DSget_scale_name( hid_t did,
-                           char *name,
-                           size_t size);
-
-H5_HLDLL htri_t H5DSis_scale( hid_t did);
-
-H5_HLDLL herr_t  H5DSiterate_scales( hid_t did,
-                          unsigned int dim,
-                          int *idx,
-                          H5DS_iterate_t visitor,
-                          void *visitor_data);
-
-H5_HLDLL htri_t H5DSis_attached( hid_t did,
-                       hid_t dsid,
-                       unsigned int idx);
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/interfaces/ext/hdf5/H5DataSet.h b/interfaces/ext/hdf5/H5DataSet.h
deleted file mode 100644
index 5c5f995..0000000
--- a/interfaces/ext/hdf5/H5DataSet.h
+++ /dev/null
@@ -1,132 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-// Class DataSet inherits from AbstractDs and provides accesses to a dataset.
-
-#ifndef _H5DataSet_H
-#define _H5DataSet_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
-   public:
-	// Close this dataset.
-	virtual void close();
-
-	// Extends the dataset with unlimited dimension.
-	void extend( const hsize_t* size ) const;
-
-	// Fills a selection in memory with a value
-	void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space);
-	// Fills a selection in memory with zero
-	void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space);
-
-	// Gets the creation property list of this dataset.
-	DSetCreatPropList getCreatePlist() const;
-
-	// Returns the address of this dataset in the file.
-	haddr_t getOffset() const;
-
-	// Gets the dataspace of this dataset.
-	virtual DataSpace getSpace() const;
-
-	// Determines whether space has been allocated for a dataset.
-	void getSpaceStatus(H5D_space_status_t& status) const;
-
-	// Returns the amount of storage size required for this dataset.
-	virtual hsize_t getStorageSize() const;
-
-	// Returns the in memory size of this attribute's data.
-	virtual size_t getInMemDataSize() const;
-
-	// Returns the number of bytes required to store VL data.
-	hsize_t getVlenBufSize( DataType& type, DataSpace& space ) const;
-
-	// Reclaims VL datatype memory buffers.
-	static void vlenReclaim(const DataType& type, const DataSpace& space, const DSetMemXferPropList& xfer_plist, void* buf );
-	static void vlenReclaim(void *buf, const DataType& type, const DataSpace& space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT);
-
-	// Reads the data of this dataset and stores it in the provided buffer.
-	// The memory and file dataspaces and the transferring property list
-	// can be defaults.
-	void read( void* buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT ) const;
-        void read( H5std_string& buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT ) const;
-
-	// Writes the buffered data to this dataset.
-	// The memory and file dataspaces and the transferring property list
-	// can be defaults.
-	void write( const void* buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT ) const;
-        void write( const H5std_string& buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT ) const;
-
-	// Iterates the selected elements in the specified dataspace - not implemented in C++ style yet
-        int iterateElems( void* buf, const DataType& type, const DataSpace& space, H5D_operator_t op, void* op_data = NULL );
-
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-	// Retrieves the type of object that an object reference points to.
-	H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-	// Retrieves a dataspace with the region pointed to selected.
-	DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("DataSet"); }
-
-	// Creates a dataset by way of dereference.
-	DataSet(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
-	DataSet(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
-	DataSet(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
-
-	// Default constructor.
-	DataSet();
-
-	// Copy constructor.
-	DataSet( const DataSet& original );
-
-	// Creates a copy of an existing DataSet using its id.
-	DataSet(const hid_t existing_id);
-
-        // Gets the dataset id.
-        virtual hid_t getId() const;
-
-	// Destructor: properly terminates access to this dataset.
-	virtual ~DataSet();
-
-   private:
-	hid_t id;       // HDF5 dataset id
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-        // This function contains the common code that is used by
-        // getTypeClass and various API functions getXxxType
-        // defined in AbstractDs for generic datatype and specific
-        // sub-types
-	virtual hid_t p_get_type() const;
-
-	// Reads variable or fixed len strings from this dataset.
-	void p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const;
-	void p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const;
-
-   protected:
-        // Sets the dataset id.
-        virtual void p_setId(const hid_t new_id);
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5DataSpace.h b/interfaces/ext/hdf5/H5DataSpace.h
deleted file mode 100644
index 0d4ab68..0000000
--- a/interfaces/ext/hdf5/H5DataSpace.h
+++ /dev/null
@@ -1,131 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5DataSpace_H
-#define _H5DataSpace_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP DataSpace : public IdComponent {
-   public:
-	// Default DataSpace objects
-	static const DataSpace ALL;
-
-	// Creates a dataspace object given the space type
-	DataSpace(H5S_class_t type = H5S_SCALAR);
-
-	// Creates a simple dataspace
-	DataSpace(int rank, const hsize_t * dims, const hsize_t * maxdims = NULL);
-
-	// Assignment operator
-	DataSpace& operator=( const DataSpace& rhs );
-
-	// Closes this dataspace.
-	virtual void close();
-
-	// Makes copy of an existing dataspace.
-	void copy(const DataSpace& like_space);
-
-	// Copies the extent of this dataspace.
-	void extentCopy( DataSpace& dest_space ) const;
-
-	// Gets the bounding box containing the current selection.
-	void getSelectBounds( hsize_t* start, hsize_t* end ) const;
-
-	// Gets the number of element points in the current selection.
-	hssize_t getSelectElemNpoints() const;
-
-	// Retrieves the list of element points currently selected.
-	void getSelectElemPointlist( hsize_t startpoint, hsize_t numpoints, hsize_t *buf ) const;
-
-	// Gets the list of hyperslab blocks currently selected.
-	void getSelectHyperBlocklist( hsize_t startblock, hsize_t numblocks, hsize_t *buf ) const;
-
-	// Get number of hyperslab blocks.
-	hssize_t getSelectHyperNblocks() const;
-
-	// Gets the number of elements in this dataspace selection.
-	hssize_t getSelectNpoints() const;
-
-	// Retrieves dataspace dimension size and maximum size.
-	int getSimpleExtentDims( hsize_t *dims, hsize_t *maxdims = NULL ) const;
-
-	// Gets the dimensionality of this dataspace.
-	int getSimpleExtentNdims() const;
-
-	// Gets the number of elements in this dataspace.
-	// 12/05/00 - changed return type to hssize_t from hsize_t - C API
-	hssize_t getSimpleExtentNpoints() const;
-
-	// Gets the current class of this dataspace.
-	H5S_class_t getSimpleExtentType() const;
-
-	// Determines if this dataspace is a simple one.
-	bool isSimple() const;
-
-	// Sets the offset of this simple dataspace.
-	void offsetSimple( const hssize_t* offset ) const;
-
-	// Selects the entire dataspace.
-	void selectAll() const;
-
-	// Selects array elements to be included in the selection for
-	// this dataspace.
-	void selectElements( H5S_seloper_t op, const size_t num_elements, const hsize_t *coord) const;
-
-	// Selects a hyperslab region to add to the current selected region.
-	void selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hsize_t *start, const hsize_t *stride = NULL, const hsize_t *block = NULL ) const;
-
-	// Resets the selection region to include no elements.
-	void selectNone() const;
-
-	// Verifies that the selection is within the extent of the dataspace.
-	bool selectValid() const;
-
-	// Removes the extent from this dataspace.
-	void setExtentNone() const;
-
-	// Sets or resets the size of this dataspace.
-	void setExtentSimple( int rank, const hsize_t *current_size, const hsize_t *maximum_size = NULL ) const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("DataSpace"); }
-
-	// Creates a DataSpace object using an existing dataspace id.
-	DataSpace(const hid_t space_id);
-
-	// Copy constructor: makes a copy of the original DataSpace object.
-	DataSpace(const DataSpace& original);
-
-	// Gets the dataspace id.
-	virtual hid_t getId() const;
-
-	// Destructor: properly terminates access to this dataspace.
-	virtual ~DataSpace();
-
-   private:
-	hid_t id;       // HDF5 dataspace id
-
-   protected:
-	// Sets the dataspace id.
-	virtual void p_setId(const hid_t new_id);
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5DataType.h b/interfaces/ext/hdf5/H5DataType.h
deleted file mode 100644
index 53709c7..0000000
--- a/interfaces/ext/hdf5/H5DataType.h
+++ /dev/null
@@ -1,139 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5DataType_H
-#define _H5DataType_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP DataType : public H5Object {
-   public:
-	// Creates a datatype given its class and size
-	DataType( const H5T_class_t type_class, size_t size );
-
-	// Copy constructor: makes a copy of the original object
-	DataType( const DataType& original );
-
-	// Creates a datatype by way of dereference.
-	DataType(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
-	DataType(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
-	DataType(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
-
-	// Closes this datatype.
-	virtual void close();
-
-	// Copies an existing datatype to this datatype object.
-	void copy(const DataType& like_type);
-
-	// Copies the datatype of dset to this datatype object.
-	void copy(const DataSet& dset);
-
-	// Returns the datatype class identifier.
-	H5T_class_t getClass() const;
-
-	// Commits a transient datatype to a file; this datatype becomes
-	// a named datatype which can be accessed from the location.
-	void commit( H5File& loc, const char* name);
-	void commit( H5File& loc, const H5std_string& name);
-	void commit( H5Object& loc, const char* name);
-	void commit( H5Object& loc, const H5std_string& name);
-
-	// Determines whether this datatype is a named datatype or
-	// a transient datatype.
-	bool committed() const;
-
-        // Finds a conversion function that can handle the conversion
-        // this datatype to the given datatype, dest.
-	H5T_conv_t find( const DataType& dest, H5T_cdata_t **pcdata ) const;
-
-	// Converts data from between specified datatypes.
-	void convert( const DataType& dest, size_t nelmts, void *buf, void *background, const PropList& plist=PropList::DEFAULT) const;
-
-	// Assignment operator
-	DataType& operator=( const DataType& rhs );
-
-	// Determines whether two datatypes are the same.
-	bool operator==(const DataType& compared_type ) const;
-
-	// Locks a datatype.
-	void lock() const;
-
-	// Returns the size of a datatype.
-	size_t getSize() const;
-
-	// Returns the base datatype from which a datatype is derived.
-	// Note: not quite right for specific types yet???
-	DataType getSuper() const;
-
-	// Registers a conversion function.
-	void registerFunc(H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const;
-	void registerFunc(H5T_pers_t pers, const H5std_string& name, const DataType& dest, H5T_conv_t func ) const;
-
-	// Removes a conversion function from all conversion paths.
-	void unregister( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const;
-	void unregister( H5T_pers_t pers, const H5std_string& name, const DataType& dest, H5T_conv_t func ) const;
-
-	// Tags an opaque datatype.
-	void setTag( const char* tag ) const;
-	void setTag( const H5std_string& tag ) const;
-
-	// Gets the tag associated with an opaque datatype.
-	H5std_string getTag() const;
-
-	// Checks whether this datatype contains (or is) a certain type class.
-	bool detectClass(H5T_class_t cls) const;
-
-	// Checks whether this datatype is a variable-length string.
-	bool isVariableStr() const;
-
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-	// Retrieves the type of object that an object reference points to.
-	H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-	// Retrieves a dataspace with the region pointed to selected.
-	DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("DataType"); }
-
-	// Creates a copy of an existing DataType using its id
-	DataType( const hid_t type_id );
-
-	// Default constructor
-	DataType();
-
-	// Gets the datatype id.
-	virtual hid_t getId() const;
-
-	// Destructor: properly terminates access to this datatype.
-	virtual ~DataType();
-
-   protected:
-	hid_t id;	// HDF5 datatype id
-
-	// Sets the datatype id.
-	virtual void p_setId(const hid_t new_id);
-
-   private:
-	void p_commit(hid_t loc_id, const char* name);
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5DcreatProp.h b/interfaces/ext/hdf5/H5DcreatProp.h
deleted file mode 100644
index 6eadfec..0000000
--- a/interfaces/ext/hdf5/H5DcreatProp.h
+++ /dev/null
@@ -1,126 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5DSCreatPropList_H
-#define _H5DSCreatPropList_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP DSetCreatPropList : public PropList {
-   public:
-	// Default dataset creation property list.
-	static const DSetCreatPropList DEFAULT;
-
-	// Creates a dataset creation property list.
-	DSetCreatPropList();
-
-	// Queries whether all the filters set in this property list are
-	// available currently.
-	bool allFiltersAvail();
-
-	// Get space allocation time for this property.
-	H5D_alloc_time_t getAllocTime();
-
-	// Set space allocation time for dataset during creation.
-	void setAllocTime(H5D_alloc_time_t alloc_time);
-
-	// Retrieves the size of the chunks used to store a chunked layout dataset.
-	int getChunk( int max_ndims, hsize_t* dim ) const;
-
-	// Sets the size of the chunks used to store a chunked layout dataset.
-	void setChunk( int ndims, const hsize_t* dim ) const;
-
-	// Returns information about an external file.
-	void getExternal( unsigned idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const;
-
-	// Returns the number of external files for a dataset.
-	int getExternalCount() const;
-
-	// Gets fill value writing time.
-	H5D_fill_time_t getFillTime();
-
-	// Sets fill value writing time for dataset.
-	void setFillTime(H5D_fill_time_t fill_time);
-
-	// Retrieves a dataset fill value.
-	void getFillValue( const DataType& fvalue_type, void* value ) const;
-
-	// Sets a dataset fill value.
-	void setFillValue( const DataType& fvalue_type, const void* value ) const;
-
-	// Returns information about a filter in a pipeline.
-	H5Z_filter_t getFilter(int filter_number, unsigned int& flags, size_t& cd_nelmts, unsigned int* cd_values, size_t namelen, char name[], unsigned int &filter_config) const;
-
-	// Returns information about a filter in a pipeline given the filter id.
-	void getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values, size_t namelen, char name[], unsigned int &filter_config) const;
-
-	// Gets the layout of the raw data storage of the data that uses this
-	// property list.
-	H5D_layout_t getLayout() const;
-
-	// Sets the type of storage used to store the raw data for the
-	// dataset that uses this property list.
-	void setLayout(H5D_layout_t layout) const;
-
-	// Returns the number of filters in the pipeline.
-	int getNfilters() const;
-
-	// Checks if fill value has been defined for this property.
-	H5D_fill_value_t isFillValueDefined();
-
-	// Modifies the specified filter.
-	void modifyFilter( H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const;
-
-	// Remove one or all filters from the filter pipeline.
-	void removeFilter( H5Z_filter_t filter_id) const;
-
-	// Sets compression method and compression level.
-	void setDeflate( int level ) const;
-
-	// Adds an external file to the list of external files.
-	void setExternal( const char* name, off_t offset, hsize_t size ) const;
-
-	// Adds a filter to the filter pipeline.
-	void setFilter( H5Z_filter_t filter, unsigned int flags = 0, size_t cd_nelmts = 0, const unsigned int cd_values[] = NULL) const;
-
-	// Sets Fletcher32 checksum of EDC for this property list.
-	void setFletcher32() const;
-
-	// Sets method of the shuffle filter.
-	void setShuffle() const;
-
-	// Sets SZIP compression method.
-	void setSzip(unsigned int options_mask, unsigned int pixels_per_block) const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("DSetCreatPropList"); }
-
-	// Copy constructor: creates a copy of a DSetCreatPropList object.
-	DSetCreatPropList(const DSetCreatPropList& orig);
-
-	// Creates a copy of an existing dataset creation property list
-	// using the property list id.
-	DSetCreatPropList(const hid_t plist_id);
-
-	// Noop destructor.
-	virtual ~DSetCreatPropList();
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5Dpublic.h b/interfaces/ext/hdf5/H5Dpublic.h
deleted file mode 100644
index c878d4a..0000000
--- a/interfaces/ext/hdf5/H5Dpublic.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This file contains public declarations for the H5D module.
- */
-#ifndef _H5Dpublic_H
-#define _H5Dpublic_H
-
-/* System headers needed by this file */
-
-/* Public headers needed by this file */
-#include "H5public.h"
-#include "H5Ipublic.h"
-
-/*****************/
-/* Public Macros */
-/*****************/
-
-/* Macros used to "unset" chunk cache configuration parameters */
-#define H5D_CHUNK_CACHE_NSLOTS_DEFAULT     ((size_t) -1)
-#define H5D_CHUNK_CACHE_NBYTES_DEFAULT      ((size_t) -1)
-#define H5D_CHUNK_CACHE_W0_DEFAULT          -1.
-
-/*******************/
-/* Public Typedefs */
-/*******************/
-
-/* Values for the H5D_LAYOUT property */
-typedef enum H5D_layout_t {
-    H5D_LAYOUT_ERROR	= -1,
-
-    H5D_COMPACT		= 0,	/*raw data is very small		     */
-    H5D_CONTIGUOUS	= 1,	/*the default				     */
-    H5D_CHUNKED		= 2,	/*slow and fancy			     */
-    H5D_NLAYOUTS	= 3	/*this one must be last!		     */
-} H5D_layout_t;
-
-/* Types of chunk index data structures */
-typedef enum H5D_chunk_index_t {
-    H5D_CHUNK_BTREE	= 0	/* v1 B-tree index			     */
-} H5D_chunk_index_t;
-
-/* Values for the space allocation time property */
-typedef enum H5D_alloc_time_t {
-    H5D_ALLOC_TIME_ERROR	= -1,
-    H5D_ALLOC_TIME_DEFAULT  	= 0,
-    H5D_ALLOC_TIME_EARLY	= 1,
-    H5D_ALLOC_TIME_LATE		= 2,
-    H5D_ALLOC_TIME_INCR		= 3
-} H5D_alloc_time_t;
-
-/* Values for the status of space allocation */
-typedef enum H5D_space_status_t {
-    H5D_SPACE_STATUS_ERROR		= -1,
-    H5D_SPACE_STATUS_NOT_ALLOCATED	= 0,
-    H5D_SPACE_STATUS_PART_ALLOCATED	= 1,
-    H5D_SPACE_STATUS_ALLOCATED		= 2
-} H5D_space_status_t;
-
-/* Values for time of writing fill value property */
-typedef enum H5D_fill_time_t {
-    H5D_FILL_TIME_ERROR	= -1,
-    H5D_FILL_TIME_ALLOC = 0,
-    H5D_FILL_TIME_NEVER	= 1,
-    H5D_FILL_TIME_IFSET	= 2
-} H5D_fill_time_t;
-
-/* Values for fill value status */
-typedef enum H5D_fill_value_t {
-    H5D_FILL_VALUE_ERROR        =-1,
-    H5D_FILL_VALUE_UNDEFINED    =0,
-    H5D_FILL_VALUE_DEFAULT      =1,
-    H5D_FILL_VALUE_USER_DEFINED =2
-} H5D_fill_value_t;
-
-/********************/
-/* Public Variables */
-/********************/
-
-/*********************/
-/* Public Prototypes */
-/*********************/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Define the operator function pointer for H5Diterate() */
-typedef herr_t (*H5D_operator_t)(void *elem, hid_t type_id, unsigned ndim,
-				 const hsize_t *point, void *operator_data);
-
-H5_DLL hid_t H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id,
-    hid_t space_id, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id);
-H5_DLL hid_t H5Dcreate_anon(hid_t file_id, hid_t type_id, hid_t space_id,
-    hid_t plist_id, hid_t dapl_id);
-H5_DLL hid_t H5Dopen2(hid_t file_id, const char *name, hid_t dapl_id);
-H5_DLL herr_t H5Dclose(hid_t dset_id);
-H5_DLL hid_t H5Dget_space(hid_t dset_id);
-H5_DLL herr_t H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation);
-H5_DLL hid_t H5Dget_type(hid_t dset_id);
-H5_DLL hid_t H5Dget_create_plist(hid_t dset_id);
-H5_DLL hid_t H5Dget_access_plist(hid_t dset_id);
-H5_DLL hsize_t H5Dget_storage_size(hid_t dset_id);
-H5_DLL haddr_t H5Dget_offset(hid_t dset_id);
-H5_DLL herr_t H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
-			hid_t file_space_id, hid_t plist_id, void *buf/*out*/);
-H5_DLL herr_t H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
-			 hid_t file_space_id, hid_t plist_id, const void *buf);
-H5_DLL herr_t H5Diterate(void *buf, hid_t type_id, hid_t space_id,
-            H5D_operator_t op, void *operator_data);
-H5_DLL herr_t H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf);
-H5_DLL herr_t H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id, hsize_t *size);
-H5_DLL herr_t H5Dfill(const void *fill, hid_t fill_type, void *buf,
-        hid_t buf_type, hid_t space);
-H5_DLL herr_t H5Dset_extent(hid_t dset_id, const hsize_t size[]);
-H5_DLL herr_t H5Ddebug(hid_t dset_id);
-
-/* Symbols defined for compatibility with previous versions of the HDF5 API.
- *
- * Use of these symbols is deprecated.
- */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-
-/* Macros */
-
-
-/* Typedefs */
-
-
-/* Function prototypes */
-H5_DLL hid_t H5Dcreate1(hid_t file_id, const char *name, hid_t type_id,
-    hid_t space_id, hid_t dcpl_id);
-H5_DLL hid_t H5Dopen1(hid_t file_id, const char *name);
-H5_DLL herr_t H5Dextend(hid_t dset_id, const hsize_t size[]);
-
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _H5Dpublic_H */
-
diff --git a/interfaces/ext/hdf5/H5DxferProp.h b/interfaces/ext/hdf5/H5DxferProp.h
deleted file mode 100644
index 66216d8..0000000
--- a/interfaces/ext/hdf5/H5DxferProp.h
+++ /dev/null
@@ -1,111 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5DSetMemXferPropList_H
-#define _H5DSetMemXferPropList_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP DSetMemXferPropList : public PropList {
-   public:
-	static const DSetMemXferPropList DEFAULT;
-
-	// Creates a dataset memory and transfer property list.
-	DSetMemXferPropList();
-
-	// Sets type conversion and background buffers.
-	void setBuffer( size_t size, void* tconv, void* bkg ) const;
-
-	// Reads buffer settings.
-	size_t getBuffer( void** tconv, void** bkg ) const;
-
-	// Sets B-tree split ratios for a dataset transfer property list.
-	void setBtreeRatios( double left, double middle, double right ) const;
-
-	// Gets B-tree split ratios for a dataset transfer property list.
-	void getBtreeRatios( double& left, double& middle, double& right ) const;
-
-	// Sets the dataset transfer property list status to TRUE or FALSE.
-	void setPreserve( bool status ) const;
-
-	// Checks status of the dataset transfer property list.
-	bool getPreserve() const;
-
-	// Sets an exception handling callback for datatype conversion.
-	void setTypeConvCB( H5T_conv_except_func_t op, void *user_data) const;
-
-	// Gets the exception handling callback for datatype conversion.
-	void getTypeConvCB( H5T_conv_except_func_t *op, void **user_data) const;
-
-	// Sets the memory manager for variable-length datatype
-	// allocation in H5Dread and H5Dvlen_reclaim.
-	void setVlenMemManager( H5MM_allocate_t alloc, void* alloc_info,
-				H5MM_free_t free, void* free_info ) const;
-
-	// alloc and free are set to NULL, indicating that system
-	// malloc and free are to be used.
-	void setVlenMemManager() const;
-
-	// Gets the memory manager for variable-length datatype
-	// allocation in H5Dread and H5Tvlen_reclaim.
-	void getVlenMemManager( H5MM_allocate_t& alloc, void** alloc_info,
-				H5MM_free_t& free, void** free_info ) const;
-
-	// Sets the data transfer property list for the multi-file driver.
-	void setMulti(const hid_t *memb_dxpl);
-
-	// Returns multi-file data transfer property list information.
-	void getMulti(hid_t *memb_dxpl);
-
-	// Sets the size of a contiguous block reserved for small data.
-	void setSmallDataBlockSize(hsize_t size);
-
-	// Returns the current small data block size setting.
-	hsize_t getSmallDataBlockSize();
-
-	// Sets number of I/O vectors to be read/written in hyperslab I/O.
-	void setHyperVectorSize(size_t vector_size);
-
-	// Returns the number of I/O vectors to be read/written in
-	// hyperslab I/O.
-	size_t getHyperVectorSize();
-
-	// Enables or disables error-detecting for a dataset reading
-	// process.
-	void setEDCCheck(H5Z_EDC_t check);
-
-	// Determines whether error-detection is enabled for dataset reads.
-	H5Z_EDC_t getEDCCheck();
-
-	///\brief Returns this class name.
-	virtual H5std_string fromClass () const { return("DSetMemXferPropList"); }
-
-	// Copy constructor: makes a copy of a DSetMemXferPropList object.
-	DSetMemXferPropList(const DSetMemXferPropList& orig);
-
-	// Creates a copy of an existing dataset memory and transfer
-	// property list using the property list id.
-	DSetMemXferPropList(const hid_t plist_id);
-
-	// Noop destructor
-	virtual ~DSetMemXferPropList();
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5EnumType.h b/interfaces/ext/hdf5/H5EnumType.h
deleted file mode 100644
index 4505c40..0000000
--- a/interfaces/ext/hdf5/H5EnumType.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5EnumType_H
-#define _H5EnumType_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP EnumType : public DataType {
-
-   public:
-	// Creates an empty enumeration datatype based on a native signed
-	// integer type, whose size is given by size.
-	EnumType( size_t size );
-
-	// Gets the enum datatype of the specified dataset
-	EnumType( const DataSet& dataset );  // H5Dget_type
-
-	// Creates a new enum datatype based on an integer datatype
-	EnumType( const IntType& data_type );  // H5Tenum_create
-
-	// Returns the number of members in this enumeration datatype.
-	int getNmembers () const;
-
-	// Returns the index of a member in this enumeration data type.
-	int getMemberIndex(const char* name) const;
-	int getMemberIndex(const H5std_string& name) const;
-
-	// Returns the value of an enumeration datatype member
-	void getMemberValue( unsigned memb_no, void *value ) const;
-
-	// Inserts a new member to this enumeration type.
-	void insert( const char* name, void *value ) const;
-	void insert( const H5std_string& name, void *value ) const;
-
-	// Returns the symbol name corresponding to a specified member
-	// of this enumeration datatype.
-	H5std_string nameOf( void *value, size_t size ) const;
-
-	// Returns the value corresponding to a specified member of this
-	// enumeration datatype.
-	void valueOf( const char* name, void *value ) const;
-	void valueOf( const H5std_string& name, void *value ) const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("EnumType"); }
-
-	// Default constructor
-	EnumType();
-
-	// Creates an enumeration datatype using an existing id
-	EnumType( const hid_t existing_id );
-
-	// Copy constructor: makes a copy of the original EnumType object.
-	EnumType( const EnumType& original );
-
-	virtual ~EnumType();
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5Epubgen.h b/interfaces/ext/hdf5/H5Epubgen.h
deleted file mode 100644
index 68fd177..0000000
--- a/interfaces/ext/hdf5/H5Epubgen.h
+++ /dev/null
@@ -1,360 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* Generated automatically by bin/make_err -- do not edit */
-/* Add new errors to H5err.txt file */
-
-
-#ifndef _H5Epubgen_H
-#define _H5Epubgen_H
-
-/*********************/
-/* Major error codes */
-/*********************/
-
-#define H5E_DATASET          (H5OPEN H5E_DATASET_g)
-#define H5E_FUNC             (H5OPEN H5E_FUNC_g)
-#define H5E_STORAGE          (H5OPEN H5E_STORAGE_g)
-#define H5E_FILE             (H5OPEN H5E_FILE_g)
-#define H5E_SOHM             (H5OPEN H5E_SOHM_g)
-#define H5E_SYM              (H5OPEN H5E_SYM_g)
-#define H5E_VFL              (H5OPEN H5E_VFL_g)
-#define H5E_INTERNAL         (H5OPEN H5E_INTERNAL_g)
-#define H5E_BTREE            (H5OPEN H5E_BTREE_g)
-#define H5E_REFERENCE        (H5OPEN H5E_REFERENCE_g)
-#define H5E_DATASPACE        (H5OPEN H5E_DATASPACE_g)
-#define H5E_RESOURCE         (H5OPEN H5E_RESOURCE_g)
-#define H5E_PLIST            (H5OPEN H5E_PLIST_g)
-#define H5E_LINK             (H5OPEN H5E_LINK_g)
-#define H5E_DATATYPE         (H5OPEN H5E_DATATYPE_g)
-#define H5E_RS               (H5OPEN H5E_RS_g)
-#define H5E_HEAP             (H5OPEN H5E_HEAP_g)
-#define H5E_OHDR             (H5OPEN H5E_OHDR_g)
-#define H5E_ATOM             (H5OPEN H5E_ATOM_g)
-#define H5E_ATTR             (H5OPEN H5E_ATTR_g)
-#define H5E_NONE_MAJOR       (H5OPEN H5E_NONE_MAJOR_g)
-#define H5E_IO               (H5OPEN H5E_IO_g)
-#define H5E_SLIST            (H5OPEN H5E_SLIST_g)
-#define H5E_EFL              (H5OPEN H5E_EFL_g)
-#define H5E_TST              (H5OPEN H5E_TST_g)
-#define H5E_ARGS             (H5OPEN H5E_ARGS_g)
-#define H5E_ERROR            (H5OPEN H5E_ERROR_g)
-#define H5E_PLINE            (H5OPEN H5E_PLINE_g)
-#define H5E_FSPACE           (H5OPEN H5E_FSPACE_g)
-#define H5E_CACHE            (H5OPEN H5E_CACHE_g)
-H5_DLLVAR hid_t H5E_DATASET_g;       /* Dataset */
-H5_DLLVAR hid_t H5E_FUNC_g;          /* Function entry/exit */
-H5_DLLVAR hid_t H5E_STORAGE_g;       /* Data storage */
-H5_DLLVAR hid_t H5E_FILE_g;          /* File accessability */
-H5_DLLVAR hid_t H5E_SOHM_g;          /* Shared Object Header Messages */
-H5_DLLVAR hid_t H5E_SYM_g;           /* Symbol table */
-H5_DLLVAR hid_t H5E_VFL_g;           /* Virtual File Layer */
-H5_DLLVAR hid_t H5E_INTERNAL_g;      /* Internal error (too specific to document in detail) */
-H5_DLLVAR hid_t H5E_BTREE_g;         /* B-Tree node */
-H5_DLLVAR hid_t H5E_REFERENCE_g;     /* References */
-H5_DLLVAR hid_t H5E_DATASPACE_g;     /* Dataspace */
-H5_DLLVAR hid_t H5E_RESOURCE_g;      /* Resource unavailable */
-H5_DLLVAR hid_t H5E_PLIST_g;         /* Property lists */
-H5_DLLVAR hid_t H5E_LINK_g;          /* Links */
-H5_DLLVAR hid_t H5E_DATATYPE_g;      /* Datatype */
-H5_DLLVAR hid_t H5E_RS_g;            /* Reference Counted Strings */
-H5_DLLVAR hid_t H5E_HEAP_g;          /* Heap */
-H5_DLLVAR hid_t H5E_OHDR_g;          /* Object header */
-H5_DLLVAR hid_t H5E_ATOM_g;          /* Object atom */
-H5_DLLVAR hid_t H5E_ATTR_g;          /* Attribute */
-H5_DLLVAR hid_t H5E_NONE_MAJOR_g;    /* No error */
-H5_DLLVAR hid_t H5E_IO_g;            /* Low-level I/O */
-H5_DLLVAR hid_t H5E_SLIST_g;         /* Skip Lists */
-H5_DLLVAR hid_t H5E_EFL_g;           /* External file list */
-H5_DLLVAR hid_t H5E_TST_g;           /* Ternary Search Trees */
-H5_DLLVAR hid_t H5E_ARGS_g;          /* Invalid arguments to routine */
-H5_DLLVAR hid_t H5E_ERROR_g;         /* Error API */
-H5_DLLVAR hid_t H5E_PLINE_g;         /* Data filters */
-H5_DLLVAR hid_t H5E_FSPACE_g;        /* Free Space Manager */
-H5_DLLVAR hid_t H5E_CACHE_g;         /* Object cache */
-
-/*********************/
-/* Minor error codes */
-/*********************/
-
-/* Generic low-level file I/O errors */
-#define H5E_SEEKERROR        (H5OPEN H5E_SEEKERROR_g)
-#define H5E_READERROR        (H5OPEN H5E_READERROR_g)
-#define H5E_WRITEERROR       (H5OPEN H5E_WRITEERROR_g)
-#define H5E_CLOSEERROR       (H5OPEN H5E_CLOSEERROR_g)
-#define H5E_OVERFLOW         (H5OPEN H5E_OVERFLOW_g)
-#define H5E_FCNTL            (H5OPEN H5E_FCNTL_g)
-H5_DLLVAR hid_t H5E_SEEKERROR_g;     /* Seek failed */
-H5_DLLVAR hid_t H5E_READERROR_g;     /* Read failed */
-H5_DLLVAR hid_t H5E_WRITEERROR_g;    /* Write failed */
-H5_DLLVAR hid_t H5E_CLOSEERROR_g;    /* Close failed */
-H5_DLLVAR hid_t H5E_OVERFLOW_g;      /* Address overflowed */
-H5_DLLVAR hid_t H5E_FCNTL_g;         /* File control (fcntl) failed */
-
-/* Resource errors */
-#define H5E_NOSPACE          (H5OPEN H5E_NOSPACE_g)
-#define H5E_CANTALLOC        (H5OPEN H5E_CANTALLOC_g)
-#define H5E_CANTCOPY         (H5OPEN H5E_CANTCOPY_g)
-#define H5E_CANTFREE         (H5OPEN H5E_CANTFREE_g)
-#define H5E_ALREADYEXISTS    (H5OPEN H5E_ALREADYEXISTS_g)
-#define H5E_CANTLOCK         (H5OPEN H5E_CANTLOCK_g)
-#define H5E_CANTUNLOCK       (H5OPEN H5E_CANTUNLOCK_g)
-#define H5E_CANTGC           (H5OPEN H5E_CANTGC_g)
-#define H5E_CANTGETSIZE      (H5OPEN H5E_CANTGETSIZE_g)
-#define H5E_OBJOPEN          (H5OPEN H5E_OBJOPEN_g)
-H5_DLLVAR hid_t H5E_NOSPACE_g;       /* No space available for allocation */
-H5_DLLVAR hid_t H5E_CANTALLOC_g;     /* Can't allocate space */
-H5_DLLVAR hid_t H5E_CANTCOPY_g;      /* Unable to copy object */
-H5_DLLVAR hid_t H5E_CANTFREE_g;      /* Unable to free object */
-H5_DLLVAR hid_t H5E_ALREADYEXISTS_g; /* Object already exists */
-H5_DLLVAR hid_t H5E_CANTLOCK_g;      /* Unable to lock object */
-H5_DLLVAR hid_t H5E_CANTUNLOCK_g;    /* Unable to unlock object */
-H5_DLLVAR hid_t H5E_CANTGC_g;        /* Unable to garbage collect */
-H5_DLLVAR hid_t H5E_CANTGETSIZE_g;   /* Unable to compute size */
-H5_DLLVAR hid_t H5E_OBJOPEN_g;       /* Object is already open */
-
-/* Heap errors */
-#define H5E_CANTRESTORE      (H5OPEN H5E_CANTRESTORE_g)
-#define H5E_CANTCOMPUTE      (H5OPEN H5E_CANTCOMPUTE_g)
-#define H5E_CANTEXTEND       (H5OPEN H5E_CANTEXTEND_g)
-#define H5E_CANTATTACH       (H5OPEN H5E_CANTATTACH_g)
-#define H5E_CANTUPDATE       (H5OPEN H5E_CANTUPDATE_g)
-#define H5E_CANTOPERATE      (H5OPEN H5E_CANTOPERATE_g)
-H5_DLLVAR hid_t H5E_CANTRESTORE_g;   /* Can't restore condition */
-H5_DLLVAR hid_t H5E_CANTCOMPUTE_g;   /* Can't compute value */
-H5_DLLVAR hid_t H5E_CANTEXTEND_g;    /* Can't extend heap's space */
-H5_DLLVAR hid_t H5E_CANTATTACH_g;    /* Can't attach object */
-H5_DLLVAR hid_t H5E_CANTUPDATE_g;    /* Can't update object */
-H5_DLLVAR hid_t H5E_CANTOPERATE_g;   /* Can't operate on object */
-
-/* Function entry/exit interface errors */
-#define H5E_CANTINIT         (H5OPEN H5E_CANTINIT_g)
-#define H5E_ALREADYINIT      (H5OPEN H5E_ALREADYINIT_g)
-#define H5E_CANTRELEASE      (H5OPEN H5E_CANTRELEASE_g)
-H5_DLLVAR hid_t H5E_CANTINIT_g;      /* Unable to initialize object */
-H5_DLLVAR hid_t H5E_ALREADYINIT_g;   /* Object already initialized */
-H5_DLLVAR hid_t H5E_CANTRELEASE_g;   /* Unable to release object */
-
-/* Property list errors */
-#define H5E_CANTGET          (H5OPEN H5E_CANTGET_g)
-#define H5E_CANTSET          (H5OPEN H5E_CANTSET_g)
-#define H5E_DUPCLASS         (H5OPEN H5E_DUPCLASS_g)
-H5_DLLVAR hid_t H5E_CANTGET_g;       /* Can't get value */
-H5_DLLVAR hid_t H5E_CANTSET_g;       /* Can't set value */
-H5_DLLVAR hid_t H5E_DUPCLASS_g;      /* Duplicate class name in parent class */
-
-/* Free space errors */
-#define H5E_CANTMERGE        (H5OPEN H5E_CANTMERGE_g)
-#define H5E_CANTREVIVE       (H5OPEN H5E_CANTREVIVE_g)
-#define H5E_CANTSHRINK       (H5OPEN H5E_CANTSHRINK_g)
-H5_DLLVAR hid_t H5E_CANTMERGE_g;     /* Can't merge objects */
-H5_DLLVAR hid_t H5E_CANTREVIVE_g;    /* Can't revive object */
-H5_DLLVAR hid_t H5E_CANTSHRINK_g;    /* Can't shrink container */
-
-/* Object header related errors */
-#define H5E_LINKCOUNT        (H5OPEN H5E_LINKCOUNT_g)
-#define H5E_VERSION          (H5OPEN H5E_VERSION_g)
-#define H5E_ALIGNMENT        (H5OPEN H5E_ALIGNMENT_g)
-#define H5E_BADMESG          (H5OPEN H5E_BADMESG_g)
-#define H5E_CANTDELETE       (H5OPEN H5E_CANTDELETE_g)
-#define H5E_BADITER          (H5OPEN H5E_BADITER_g)
-#define H5E_CANTPACK         (H5OPEN H5E_CANTPACK_g)
-#define H5E_CANTRESET        (H5OPEN H5E_CANTRESET_g)
-#define H5E_CANTRENAME       (H5OPEN H5E_CANTRENAME_g)
-H5_DLLVAR hid_t H5E_LINKCOUNT_g;     /* Bad object header link count */
-H5_DLLVAR hid_t H5E_VERSION_g;       /* Wrong version number */
-H5_DLLVAR hid_t H5E_ALIGNMENT_g;     /* Alignment error */
-H5_DLLVAR hid_t H5E_BADMESG_g;       /* Unrecognized message */
-H5_DLLVAR hid_t H5E_CANTDELETE_g;    /* Can't delete message */
-H5_DLLVAR hid_t H5E_BADITER_g;       /* Iteration failed */
-H5_DLLVAR hid_t H5E_CANTPACK_g;      /* Can't pack messages */
-H5_DLLVAR hid_t H5E_CANTRESET_g;     /* Can't reset object */
-H5_DLLVAR hid_t H5E_CANTRENAME_g;    /* Unable to rename object */
-
-/* System level errors */
-#define H5E_SYSERRSTR        (H5OPEN H5E_SYSERRSTR_g)
-H5_DLLVAR hid_t H5E_SYSERRSTR_g;     /* System error message */
-
-/* I/O pipeline errors */
-#define H5E_NOFILTER         (H5OPEN H5E_NOFILTER_g)
-#define H5E_CALLBACK         (H5OPEN H5E_CALLBACK_g)
-#define H5E_CANAPPLY         (H5OPEN H5E_CANAPPLY_g)
-#define H5E_SETLOCAL         (H5OPEN H5E_SETLOCAL_g)
-#define H5E_NOENCODER        (H5OPEN H5E_NOENCODER_g)
-#define H5E_CANTFILTER       (H5OPEN H5E_CANTFILTER_g)
-H5_DLLVAR hid_t H5E_NOFILTER_g;      /* Requested filter is not available */
-H5_DLLVAR hid_t H5E_CALLBACK_g;      /* Callback failed */
-H5_DLLVAR hid_t H5E_CANAPPLY_g;      /* Error from filter 'can apply' callback */
-H5_DLLVAR hid_t H5E_SETLOCAL_g;      /* Error from filter 'set local' callback */
-H5_DLLVAR hid_t H5E_NOENCODER_g;     /* Filter present but encoding disabled */
-H5_DLLVAR hid_t H5E_CANTFILTER_g;    /* Filter operation failed */
-
-/* Group related errors */
-#define H5E_CANTOPENOBJ      (H5OPEN H5E_CANTOPENOBJ_g)
-#define H5E_CANTCLOSEOBJ     (H5OPEN H5E_CANTCLOSEOBJ_g)
-#define H5E_COMPLEN          (H5OPEN H5E_COMPLEN_g)
-#define H5E_PATH             (H5OPEN H5E_PATH_g)
-H5_DLLVAR hid_t H5E_CANTOPENOBJ_g;   /* Can't open object */
-H5_DLLVAR hid_t H5E_CANTCLOSEOBJ_g;  /* Can't close object */
-H5_DLLVAR hid_t H5E_COMPLEN_g;       /* Name component is too long */
-H5_DLLVAR hid_t H5E_PATH_g;          /* Problem with path to object */
-
-/* No error */
-#define H5E_NONE_MINOR       (H5OPEN H5E_NONE_MINOR_g)
-H5_DLLVAR hid_t H5E_NONE_MINOR_g;    /* No error */
-
-/* File accessability errors */
-#define H5E_FILEEXISTS       (H5OPEN H5E_FILEEXISTS_g)
-#define H5E_FILEOPEN         (H5OPEN H5E_FILEOPEN_g)
-#define H5E_CANTCREATE       (H5OPEN H5E_CANTCREATE_g)
-#define H5E_CANTOPENFILE     (H5OPEN H5E_CANTOPENFILE_g)
-#define H5E_CANTCLOSEFILE    (H5OPEN H5E_CANTCLOSEFILE_g)
-#define H5E_NOTHDF5          (H5OPEN H5E_NOTHDF5_g)
-#define H5E_BADFILE          (H5OPEN H5E_BADFILE_g)
-#define H5E_TRUNCATED        (H5OPEN H5E_TRUNCATED_g)
-#define H5E_MOUNT            (H5OPEN H5E_MOUNT_g)
-H5_DLLVAR hid_t H5E_FILEEXISTS_g;    /* File already exists */
-H5_DLLVAR hid_t H5E_FILEOPEN_g;      /* File already open */
-H5_DLLVAR hid_t H5E_CANTCREATE_g;    /* Unable to create file */
-H5_DLLVAR hid_t H5E_CANTOPENFILE_g;  /* Unable to open file */
-H5_DLLVAR hid_t H5E_CANTCLOSEFILE_g; /* Unable to close file */
-H5_DLLVAR hid_t H5E_NOTHDF5_g;       /* Not an HDF5 file */
-H5_DLLVAR hid_t H5E_BADFILE_g;       /* Bad file ID accessed */
-H5_DLLVAR hid_t H5E_TRUNCATED_g;     /* File has been truncated */
-H5_DLLVAR hid_t H5E_MOUNT_g;         /* File mount error */
-
-/* Object atom related errors */
-#define H5E_BADATOM          (H5OPEN H5E_BADATOM_g)
-#define H5E_BADGROUP         (H5OPEN H5E_BADGROUP_g)
-#define H5E_CANTREGISTER     (H5OPEN H5E_CANTREGISTER_g)
-#define H5E_CANTINC          (H5OPEN H5E_CANTINC_g)
-#define H5E_CANTDEC          (H5OPEN H5E_CANTDEC_g)
-#define H5E_NOIDS            (H5OPEN H5E_NOIDS_g)
-H5_DLLVAR hid_t H5E_BADATOM_g;       /* Unable to find atom information (already closed?) */
-H5_DLLVAR hid_t H5E_BADGROUP_g;      /* Unable to find ID group information */
-H5_DLLVAR hid_t H5E_CANTREGISTER_g;  /* Unable to register new atom */
-H5_DLLVAR hid_t H5E_CANTINC_g;       /* Unable to increment reference count */
-H5_DLLVAR hid_t H5E_CANTDEC_g;       /* Unable to decrement reference count */
-H5_DLLVAR hid_t H5E_NOIDS_g;         /* Out of IDs for group */
-
-/* Cache related errors */
-#define H5E_CANTFLUSH        (H5OPEN H5E_CANTFLUSH_g)
-#define H5E_CANTSERIALIZE    (H5OPEN H5E_CANTSERIALIZE_g)
-#define H5E_CANTLOAD         (H5OPEN H5E_CANTLOAD_g)
-#define H5E_PROTECT          (H5OPEN H5E_PROTECT_g)
-#define H5E_NOTCACHED        (H5OPEN H5E_NOTCACHED_g)
-#define H5E_SYSTEM           (H5OPEN H5E_SYSTEM_g)
-#define H5E_CANTINS          (H5OPEN H5E_CANTINS_g)
-#define H5E_CANTPROTECT      (H5OPEN H5E_CANTPROTECT_g)
-#define H5E_CANTUNPROTECT    (H5OPEN H5E_CANTUNPROTECT_g)
-#define H5E_CANTPIN          (H5OPEN H5E_CANTPIN_g)
-#define H5E_CANTUNPIN        (H5OPEN H5E_CANTUNPIN_g)
-#define H5E_CANTMARKDIRTY    (H5OPEN H5E_CANTMARKDIRTY_g)
-#define H5E_CANTDIRTY        (H5OPEN H5E_CANTDIRTY_g)
-#define H5E_CANTEXPUNGE      (H5OPEN H5E_CANTEXPUNGE_g)
-#define H5E_CANTRESIZE       (H5OPEN H5E_CANTRESIZE_g)
-H5_DLLVAR hid_t H5E_CANTFLUSH_g;     /* Unable to flush data from cache */
-H5_DLLVAR hid_t H5E_CANTSERIALIZE_g; /* Unable to serialize data from cache */
-H5_DLLVAR hid_t H5E_CANTLOAD_g;      /* Unable to load metadata into cache */
-H5_DLLVAR hid_t H5E_PROTECT_g;       /* Protected metadata error */
-H5_DLLVAR hid_t H5E_NOTCACHED_g;     /* Metadata not currently cached */
-H5_DLLVAR hid_t H5E_SYSTEM_g;        /* Internal error detected */
-H5_DLLVAR hid_t H5E_CANTINS_g;       /* Unable to insert metadata into cache */
-H5_DLLVAR hid_t H5E_CANTPROTECT_g;   /* Unable to protect metadata */
-H5_DLLVAR hid_t H5E_CANTUNPROTECT_g; /* Unable to unprotect metadata */
-H5_DLLVAR hid_t H5E_CANTPIN_g;       /* Unable to pin cache entry */
-H5_DLLVAR hid_t H5E_CANTUNPIN_g;     /* Unable to un-pin cache entry */
-H5_DLLVAR hid_t H5E_CANTMARKDIRTY_g; /* Unable to mark a pinned entry as dirty */
-H5_DLLVAR hid_t H5E_CANTDIRTY_g;     /* Unable to mark metadata as dirty */
-H5_DLLVAR hid_t H5E_CANTEXPUNGE_g;   /* Unable to expunge a metadata cache entry */
-H5_DLLVAR hid_t H5E_CANTRESIZE_g;    /* Unable to resize a metadata cache entry */
-
-/* Link related errors */
-#define H5E_TRAVERSE         (H5OPEN H5E_TRAVERSE_g)
-#define H5E_NLINKS           (H5OPEN H5E_NLINKS_g)
-#define H5E_NOTREGISTERED    (H5OPEN H5E_NOTREGISTERED_g)
-#define H5E_CANTMOVE         (H5OPEN H5E_CANTMOVE_g)
-#define H5E_CANTSORT         (H5OPEN H5E_CANTSORT_g)
-H5_DLLVAR hid_t H5E_TRAVERSE_g;      /* Link traversal failure */
-H5_DLLVAR hid_t H5E_NLINKS_g;        /* Too many soft links in path */
-H5_DLLVAR hid_t H5E_NOTREGISTERED_g; /* Link class not registered */
-H5_DLLVAR hid_t H5E_CANTMOVE_g;      /* Can't move object */
-H5_DLLVAR hid_t H5E_CANTSORT_g;      /* Can't sort objects */
-
-/* Parallel MPI errors */
-#define H5E_MPI              (H5OPEN H5E_MPI_g)
-#define H5E_MPIERRSTR        (H5OPEN H5E_MPIERRSTR_g)
-#define H5E_CANTRECV         (H5OPEN H5E_CANTRECV_g)
-H5_DLLVAR hid_t H5E_MPI_g;           /* Some MPI function failed */
-H5_DLLVAR hid_t H5E_MPIERRSTR_g;     /* MPI Error String */
-H5_DLLVAR hid_t H5E_CANTRECV_g;      /* Can't receive data */
-
-/* Dataspace errors */
-#define H5E_CANTCLIP         (H5OPEN H5E_CANTCLIP_g)
-#define H5E_CANTCOUNT        (H5OPEN H5E_CANTCOUNT_g)
-#define H5E_CANTSELECT       (H5OPEN H5E_CANTSELECT_g)
-#define H5E_CANTNEXT         (H5OPEN H5E_CANTNEXT_g)
-#define H5E_BADSELECT        (H5OPEN H5E_BADSELECT_g)
-#define H5E_CANTCOMPARE      (H5OPEN H5E_CANTCOMPARE_g)
-H5_DLLVAR hid_t H5E_CANTCLIP_g;      /* Can't clip hyperslab region */
-H5_DLLVAR hid_t H5E_CANTCOUNT_g;     /* Can't count elements */
-H5_DLLVAR hid_t H5E_CANTSELECT_g;    /* Can't select hyperslab */
-H5_DLLVAR hid_t H5E_CANTNEXT_g;      /* Can't move to next iterator location */
-H5_DLLVAR hid_t H5E_BADSELECT_g;     /* Invalid selection */
-H5_DLLVAR hid_t H5E_CANTCOMPARE_g;   /* Can't compare objects */
-
-/* Argument errors */
-#define H5E_UNINITIALIZED    (H5OPEN H5E_UNINITIALIZED_g)
-#define H5E_UNSUPPORTED      (H5OPEN H5E_UNSUPPORTED_g)
-#define H5E_BADTYPE          (H5OPEN H5E_BADTYPE_g)
-#define H5E_BADRANGE         (H5OPEN H5E_BADRANGE_g)
-#define H5E_BADVALUE         (H5OPEN H5E_BADVALUE_g)
-H5_DLLVAR hid_t H5E_UNINITIALIZED_g; /* Information is uinitialized */
-H5_DLLVAR hid_t H5E_UNSUPPORTED_g;   /* Feature is unsupported */
-H5_DLLVAR hid_t H5E_BADTYPE_g;       /* Inappropriate type */
-H5_DLLVAR hid_t H5E_BADRANGE_g;      /* Out of range */
-H5_DLLVAR hid_t H5E_BADVALUE_g;      /* Bad value */
-
-/* B-tree related errors */
-#define H5E_NOTFOUND         (H5OPEN H5E_NOTFOUND_g)
-#define H5E_EXISTS           (H5OPEN H5E_EXISTS_g)
-#define H5E_CANTENCODE       (H5OPEN H5E_CANTENCODE_g)
-#define H5E_CANTDECODE       (H5OPEN H5E_CANTDECODE_g)
-#define H5E_CANTSPLIT        (H5OPEN H5E_CANTSPLIT_g)
-#define H5E_CANTREDISTRIBUTE (H5OPEN H5E_CANTREDISTRIBUTE_g)
-#define H5E_CANTSWAP         (H5OPEN H5E_CANTSWAP_g)
-#define H5E_CANTINSERT       (H5OPEN H5E_CANTINSERT_g)
-#define H5E_CANTLIST         (H5OPEN H5E_CANTLIST_g)
-#define H5E_CANTMODIFY       (H5OPEN H5E_CANTMODIFY_g)
-#define H5E_CANTREMOVE       (H5OPEN H5E_CANTREMOVE_g)
-H5_DLLVAR hid_t H5E_NOTFOUND_g;      /* Object not found */
-H5_DLLVAR hid_t H5E_EXISTS_g;        /* Object already exists */
-H5_DLLVAR hid_t H5E_CANTENCODE_g;    /* Unable to encode value */
-H5_DLLVAR hid_t H5E_CANTDECODE_g;    /* Unable to decode value */
-H5_DLLVAR hid_t H5E_CANTSPLIT_g;     /* Unable to split node */
-H5_DLLVAR hid_t H5E_CANTREDISTRIBUTE_g; /* Unable to redistribute records */
-H5_DLLVAR hid_t H5E_CANTSWAP_g;      /* Unable to swap records */
-H5_DLLVAR hid_t H5E_CANTINSERT_g;    /* Unable to insert object */
-H5_DLLVAR hid_t H5E_CANTLIST_g;      /* Unable to list node */
-H5_DLLVAR hid_t H5E_CANTMODIFY_g;    /* Unable to modify record */
-H5_DLLVAR hid_t H5E_CANTREMOVE_g;    /* Unable to remove object */
-
-/* Datatype conversion errors */
-#define H5E_CANTCONVERT      (H5OPEN H5E_CANTCONVERT_g)
-#define H5E_BADSIZE          (H5OPEN H5E_BADSIZE_g)
-H5_DLLVAR hid_t H5E_CANTCONVERT_g;   /* Can't convert datatypes */
-H5_DLLVAR hid_t H5E_BADSIZE_g;       /* Bad size for object */
-
-#endif /* H5Epubgen_H */
diff --git a/interfaces/ext/hdf5/H5Epublic.h b/interfaces/ext/hdf5/H5Epublic.h
deleted file mode 100644
index 932b857..0000000
--- a/interfaces/ext/hdf5/H5Epublic.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This file contains public declarations for the H5E module.
- */
-#ifndef _H5Epublic_H
-#define _H5Epublic_H
-
-#include <stdio.h>              /*FILE arg of H5Eprint()                     */
-
-/* Public headers needed by this file */
-#include "H5public.h"
-#include "H5Ipublic.h"
-
-/* Value for the default error stack */
-#define H5E_DEFAULT             0
-
-/* Different kinds of error information */
-typedef enum H5E_type_t {
-    H5E_MAJOR,
-    H5E_MINOR
-} H5E_type_t;
-
-/* Information about an error; element of error stack */
-typedef struct H5E_error2_t {
-    hid_t       cls_id;         /*class ID                           */
-    hid_t       maj_num;	/*major error ID		     */
-    hid_t       min_num;	/*minor error number		     */
-    unsigned	line;		/*line in file where error occurs    */
-    const char	*func_name;   	/*function in which error occurred   */
-    const char	*file_name;	/*file in which error occurred       */
-    const char	*desc;		/*optional supplied description      */
-} H5E_error2_t;
-
-/* When this header is included from a private header, don't make calls to H5open() */
-#undef H5OPEN
-#ifndef _H5private_H
-#define H5OPEN          H5open(),
-#else   /* _H5private_H */
-#define H5OPEN
-#endif  /* _H5private_H */
-
-/* HDF5 error class */
-#define H5E_ERR_CLS		(H5OPEN H5E_ERR_CLS_g)
-H5_DLLVAR hid_t H5E_ERR_CLS_g;
-
-/* Include the automatically generated public header information */
-/* (This includes the list of major and minor error codes for the library) */
-#include "H5Epubgen.h"
-
-/*
- * One often needs to temporarily disable automatic error reporting when
- * trying something that's likely or expected to fail.  The code to try can
- * be nested between calls to H5Eget_auto() and H5Eset_auto(), but it's
- * easier just to use this macro like:
- * 	H5E_BEGIN_TRY {
- *	    ...stuff here that's likely to fail...
- *      } H5E_END_TRY;
- *
- * Warning: don't break, return, or longjmp() from the body of the loop or
- *	    the error reporting won't be properly restored!
- *
- * These two macros still use the old API functions for backward compatibility
- * purpose.
- */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-#define H5E_BEGIN_TRY {							      \
-    unsigned H5E_saved_is_v2;					              \
-    union {								      \
-        H5E_auto1_t efunc1;						      \
-        H5E_auto2_t efunc2;					              \
-    } H5E_saved;							      \
-    void *H5E_saved_edata;						      \
-								    	      \
-    (void)H5Eauto_is_v2(H5E_DEFAULT, &H5E_saved_is_v2);		              \
-    if(H5E_saved_is_v2) {						      \
-        (void)H5Eget_auto2(H5E_DEFAULT, &H5E_saved.efunc2, &H5E_saved_edata); \
-        (void)H5Eset_auto2(H5E_DEFAULT, NULL, NULL);		              \
-    } else {								      \
-        (void)H5Eget_auto1(&H5E_saved.efunc1, &H5E_saved_edata);		      \
-        (void)H5Eset_auto1(NULL, NULL);					      \
-    }
-
-#define H5E_END_TRY							      \
-    if(H5E_saved_is_v2)							      \
-        (void)H5Eset_auto2(H5E_DEFAULT, H5E_saved.efunc2, H5E_saved_edata);   \
-    else								      \
-        (void)H5Eset_auto1(H5E_saved.efunc1, H5E_saved_edata);		      \
-}
-#else /* H5_NO_DEPRECATED_SYMBOLS */
-#define H5E_BEGIN_TRY {							      \
-    H5E_auto_t saved_efunc;						      \
-    void *H5E_saved_edata;						      \
-								    	      \
-    (void)H5Eget_auto(H5E_DEFAULT, &saved_efunc, &H5E_saved_edata);	      \
-    (void)H5Eset_auto(H5E_DEFAULT, NULL, NULL);
-
-#define H5E_END_TRY							      \
-    (void)H5Eset_auto(H5E_DEFAULT, saved_efunc, H5E_saved_edata);	      \
-}
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-/*
- * Public API Convenience Macros for Error reporting - Documented
- */
-/* Use the Standard C __FILE__ & __LINE__ macros instead of typing them in */
-#define H5Epush_sim(func, cls, maj, min, str) H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, cls, maj, min, str)
-
-/*
- * Public API Convenience Macros for Error reporting - Undocumented
- */
-/* Use the Standard C __FILE__ & __LINE__ macros instead of typing them in */
-/*  And return after pushing error onto stack */
-#define H5Epush_ret(func, cls, maj, min, str, ret) {			      \
-    H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, cls, maj, min, str);      \
-    return(ret);							      \
-}
-
-/* Use the Standard C __FILE__ & __LINE__ macros instead of typing them in
- * And goto a label after pushing error onto stack.
- */
-#define H5Epush_goto(func, cls, maj, min, str, label) {			      \
-    H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, cls, maj, min, str);      \
-    goto label;								      \
-}
-
-/* Error stack traversal direction */
-typedef enum H5E_direction_t {
-    H5E_WALK_UPWARD	= 0,		/*begin deep, end at API function    */
-    H5E_WALK_DOWNWARD	= 1		/*begin at API function, end deep    */
-} H5E_direction_t;
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Error stack traversal callback function pointers */
-typedef herr_t (*H5E_walk2_t)(unsigned n, const H5E_error2_t *err_desc,
-    void *client_data);
-typedef herr_t (*H5E_auto2_t)(hid_t estack, void *client_data);
-
-/* Public API functions */
-H5_DLL hid_t  H5Eregister_class(const char *cls_name, const char *lib_name,
-    const char *version);
-H5_DLL herr_t H5Eunregister_class(hid_t class_id);
-H5_DLL herr_t H5Eclose_msg(hid_t err_id);
-H5_DLL hid_t  H5Ecreate_msg(hid_t cls, H5E_type_t msg_type, const char *msg);
-H5_DLL hid_t  H5Ecreate_stack(void);
-H5_DLL hid_t  H5Eget_current_stack(void);
-H5_DLL herr_t H5Eclose_stack(hid_t stack_id);
-H5_DLL ssize_t H5Eget_class_name(hid_t class_id, char *name, size_t size);
-H5_DLL herr_t H5Eset_current_stack(hid_t err_stack_id);
-H5_DLL herr_t H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line,
-    hid_t cls_id, hid_t maj_id, hid_t min_id, const char *msg, ...);
-H5_DLL herr_t H5Epop(hid_t err_stack, size_t count);
-H5_DLL herr_t H5Eprint2(hid_t err_stack, FILE *stream);
-H5_DLL herr_t H5Ewalk2(hid_t err_stack, H5E_direction_t direction, H5E_walk2_t func,
-    void *client_data);
-H5_DLL herr_t H5Eget_auto2(hid_t estack_id, H5E_auto2_t *func, void **client_data);
-H5_DLL herr_t H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void *client_data);
-H5_DLL herr_t H5Eclear2(hid_t err_stack);
-H5_DLL herr_t H5Eauto_is_v2(hid_t err_stack, unsigned *is_stack);
-H5_DLL ssize_t H5Eget_msg(hid_t msg_id, H5E_type_t *type, char *msg,
-    size_t size);
-H5_DLL ssize_t H5Eget_num(hid_t error_stack_id);
-
-
-/* Symbols defined for compatibility with previous versions of the HDF5 API.
- *
- * Use of these symbols is deprecated.
- */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-
-/* Typedefs */
-
-/* Alias major & minor error types to hid_t's, for compatibility with new
- *      error API in v1.8
- */
-typedef hid_t   H5E_major_t;
-typedef hid_t   H5E_minor_t;
-
-/* Information about an error element of error stack. */
-typedef struct H5E_error1_t {
-    H5E_major_t maj_num;                /*major error number                 */
-    H5E_minor_t min_num;                /*minor error number                 */
-    const char  *func_name;             /*function in which error occurred   */
-    const char  *file_name;             /*file in which error occurred       */
-    unsigned    line;                   /*line in file where error occurs    */
-    const char  *desc;                  /*optional supplied description      */
-} H5E_error1_t;
-
-/* Error stack traversal callback function pointers */
-typedef herr_t (*H5E_walk1_t)(int n, H5E_error1_t *err_desc, void *client_data);
-typedef herr_t (*H5E_auto1_t)(void *client_data);
-
-/* Function prototypes */
-H5_DLL herr_t H5Eclear1(void);
-H5_DLL herr_t H5Eget_auto1(H5E_auto1_t *func, void **client_data);
-H5_DLL herr_t H5Epush1(const char *file, const char *func, unsigned line,
-    H5E_major_t maj, H5E_minor_t min, const char *str);
-H5_DLL herr_t H5Eprint1(FILE *stream);
-H5_DLL herr_t H5Eset_auto1(H5E_auto1_t func, void *client_data);
-H5_DLL herr_t H5Ewalk1(H5E_direction_t direction, H5E_walk1_t func,
-    void *client_data);
-H5_DLL char *H5Eget_major(H5E_major_t maj);
-H5_DLL char *H5Eget_minor(H5E_minor_t min);
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* end _H5Epublic_H */
-
diff --git a/interfaces/ext/hdf5/H5Exception.h b/interfaces/ext/hdf5/H5Exception.h
deleted file mode 100644
index c17ff5b..0000000
--- a/interfaces/ext/hdf5/H5Exception.h
+++ /dev/null
@@ -1,164 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5Exception_H
-#define _H5Exception_H
-
-#include <string>
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#ifdef H5_NO_STD
-    #define H5std_string ::string
-#else
-    #define H5std_string std::string
-#endif
-#endif
-
-class H5_DLLCPP Exception {
-   public:
-	// Creates an exception with a function name where the failure occurs
-	// and an optional detailed message
-	Exception(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
-
-	// Returns a character string that describes the error specified by
-	// a major error number.
-	H5std_string getMajorString( hid_t err_major_id ) const;
-
-	// Returns a character string that describes the error specified by
-	// a minor error number.
-	H5std_string getMinorString( hid_t err_minor_id ) const;
-
-	// Returns the detailed message set at the time the exception is thrown
-	H5std_string getDetailMsg() const;
-	const char* getCDetailMsg() const;	// C string of detailed message
-	H5std_string getFuncName() const;	// function name as a string object
-	const char* getCFuncName() const;	// function name as a char string
-
-	// Turns on the automatic error printing.
-	static void setAutoPrint( H5E_auto2_t& func, void* client_data);
-
-	// Turns off the automatic error printing.
-	static void dontPrint();
-
-	// Retrieves the current settings for the automatic error stack
-	// traversal function and its data.
-	static void getAutoPrint( H5E_auto2_t& func, void** client_data);
-
-	// Clears the error stack for the current thread.
-	static void clearErrorStack();
-
-	// Walks the error stack for the current thread, calling the
-	// specified function.
-	static void walkErrorStack( H5E_direction_t direction,
-				H5E_walk2_t func, void* client_data);
-
-	// Prints the error stack in a default manner.
-	virtual void printError( FILE* stream = NULL ) const;
-
-	// Default constructor
-	Exception();
-
-	// copy constructor
-	Exception( const Exception& orig);
-
-	// virtual Destructor
-	virtual ~Exception();
-
-   private:
-	H5std_string detail_message;
-	H5std_string func_name;
-
-   protected:
-        // Default value for detail_message
-        static const H5std_string DEFAULT_MSG;
-};
-
-class H5_DLLCPP FileIException : public Exception {
-   public:
-	FileIException( const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
-	FileIException();
-	virtual ~FileIException();
-};
-
-class H5_DLLCPP GroupIException : public Exception {
-   public:
-	GroupIException( const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
-	GroupIException();
-	virtual ~GroupIException();
-};
-
-class H5_DLLCPP DataSpaceIException : public Exception {
-   public:
-	DataSpaceIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
-	DataSpaceIException();
-	virtual ~DataSpaceIException();
-};
-
-class H5_DLLCPP DataTypeIException : public Exception {
-   public:
-	DataTypeIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
-	DataTypeIException();
-	virtual ~DataTypeIException();
-};
-
-class H5_DLLCPP PropListIException : public Exception {
-   public:
-	PropListIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
-	PropListIException();
-	virtual ~PropListIException();
-};
-
-class H5_DLLCPP DataSetIException : public Exception {
-   public:
-	DataSetIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
-	DataSetIException();
-	virtual ~DataSetIException();
-};
-
-class H5_DLLCPP AttributeIException : public Exception {
-   public:
-	AttributeIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
-	AttributeIException();
-	virtual ~AttributeIException();
-};
-
-class H5_DLLCPP ReferenceException : public Exception {
-   public:
-	ReferenceException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
-	ReferenceException();
-	virtual ~ReferenceException();
-};
-
-class H5_DLLCPP LibraryIException : public Exception {
-   public:
-	LibraryIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
-	LibraryIException();
-	virtual ~LibraryIException();
-};
-
-class H5_DLLCPP IdComponentException : public Exception {
-   public:
-	IdComponentException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
-	IdComponentException();
-	virtual ~IdComponentException();
-};
-
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-
-#endif // _H5Exception_H
diff --git a/interfaces/ext/hdf5/H5FDcore.h b/interfaces/ext/hdf5/H5FDcore.h
deleted file mode 100644
index dca110e..0000000
--- a/interfaces/ext/hdf5/H5FDcore.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Programmer:  Robb Matzke <matzke at llnl.gov>
- *              Monday, August  2, 1999
- *
- * Purpose:	The public header file for the sec2 driver.
- */
-#ifndef H5FDcore_H
-#define H5FDcore_H
-
-#include "H5Ipublic.h"
-
-#define H5FD_CORE	(H5FD_core_init())
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-H5_DLL hid_t H5FD_core_init(void);
-H5_DLL void H5FD_core_term(void);
-H5_DLL herr_t H5Pset_fapl_core(hid_t fapl_id, size_t increment,
-				hbool_t backing_store);
-H5_DLL herr_t H5Pget_fapl_core(hid_t fapl_id, size_t *increment/*out*/,
-				hbool_t *backing_store/*out*/);
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/interfaces/ext/hdf5/H5FDdirect.h b/interfaces/ext/hdf5/H5FDdirect.h
deleted file mode 100644
index 26c70f3..0000000
--- a/interfaces/ext/hdf5/H5FDdirect.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Programmer:  Raymond Lu <slu at hdfgroup.uiuc.edu>
- *              Wednesday, 20 September 2006
- *
- * Purpose:	The public header file for the direct driver.
- */
-#ifndef H5FDdirect_H
-#define H5FDdirect_H
-
-#include "H5Ipublic.h"
-
-#ifdef H5_HAVE_DIRECT
-#       define H5FD_DIRECT	(H5FD_direct_init())
-#else
-#       define H5FD_DIRECT      (-1)
-#endif /* H5_HAVE_DIRECT */
-
-#ifdef H5_HAVE_DIRECT
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Default values for memory boundary, file block size, and maximal copy buffer size.
- * Application can set these values through the function H5Pset_fapl_direct. */
-#define MBOUNDARY_DEF		4096
-#define FBSIZE_DEF		4096
-#define CBSIZE_DEF		16*1024*1024
-
-H5_DLL hid_t H5FD_direct_init(void);
-H5_DLL void H5FD_direct_term(void);
-H5_DLL herr_t H5Pset_fapl_direct(hid_t fapl_id, size_t alignment, size_t block_size,
-			size_t cbuf_size);
-H5_DLL herr_t H5Pget_fapl_direct(hid_t fapl_id, size_t *boundary/*out*/,
-			size_t *block_size/*out*/, size_t *cbuf_size/*out*/);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* H5_HAVE_DIRECT */
-
-#endif
diff --git a/interfaces/ext/hdf5/H5FDfamily.h b/interfaces/ext/hdf5/H5FDfamily.h
deleted file mode 100644
index dcb63e6..0000000
--- a/interfaces/ext/hdf5/H5FDfamily.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Programmer:  Robb Matzke <matzke at llnl.gov>
- *              Monday, August  4, 1999
- *
- * Purpose:	The public header file for the family driver.
- */
-#ifndef H5FDfamily_H
-#define H5FDfamily_H
-
-#include "H5Ipublic.h"
-
-#define H5FD_FAMILY	(H5FD_family_init())
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-H5_DLL hid_t H5FD_family_init(void);
-H5_DLL void H5FD_family_term(void);
-H5_DLL herr_t H5Pset_fapl_family(hid_t fapl_id, hsize_t memb_size,
-			  hid_t memb_fapl_id);
-H5_DLL herr_t H5Pget_fapl_family(hid_t fapl_id, hsize_t *memb_size/*out*/,
-			  hid_t *memb_fapl_id/*out*/);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/interfaces/ext/hdf5/H5FDlog.h b/interfaces/ext/hdf5/H5FDlog.h
deleted file mode 100644
index e829016..0000000
--- a/interfaces/ext/hdf5/H5FDlog.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Programmer:  Quincey Koziol <koziol at ncsa.uiuc.edu>
- *              Monday, April 17, 2000
- *
- * Purpose:	The public header file for the log driver.
- */
-#ifndef H5FDlog_H
-#define H5FDlog_H
-
-#include "H5Ipublic.h"
-
-#define H5FD_LOG	(H5FD_log_init())
-
-/* Flags for H5Pset_fapl_log() */
-/* Flags for tracking where reads/writes/seeks occur */
-#define H5FD_LOG_LOC_READ   0x0001
-#define H5FD_LOG_LOC_WRITE  0x0002
-#define H5FD_LOG_LOC_SEEK   0x0004
-#define H5FD_LOG_LOC_IO     (H5FD_LOG_LOC_READ|H5FD_LOG_LOC_WRITE|H5FD_LOG_LOC_SEEK)
-/* Flags for tracking number of times each byte is read/written */
-#define H5FD_LOG_FILE_READ  0x0008
-#define H5FD_LOG_FILE_WRITE 0x0010
-#define H5FD_LOG_FILE_IO    (H5FD_LOG_FILE_READ|H5FD_LOG_FILE_WRITE)
-/* Flag for tracking "flavor" (type) of information stored at each byte */
-#define H5FD_LOG_FLAVOR     0x0020
-/* Flags for tracking total number of reads/writes/seeks */
-#define H5FD_LOG_NUM_READ   0x0040
-#define H5FD_LOG_NUM_WRITE  0x0080
-#define H5FD_LOG_NUM_SEEK   0x0100
-#define H5FD_LOG_NUM_IO     (H5FD_LOG_NUM_READ|H5FD_LOG_NUM_WRITE|H5FD_LOG_NUM_SEEK)
-/* Flags for tracking time spent in open/read/write/seek/close */
-#define H5FD_LOG_TIME_OPEN  0x0200      /* Not implemented yet */
-#define H5FD_LOG_TIME_READ  0x0400      /* Not implemented yet */
-#define H5FD_LOG_TIME_WRITE 0x0800      /* Partially implemented (need to track total time) */
-#define H5FD_LOG_TIME_SEEK  0x1000      /* Partially implemented (need to track total time & track time for seeks during reading) */
-#define H5FD_LOG_TIME_CLOSE 0x2000      /* Fully implemented */
-#define H5FD_LOG_TIME_IO    (H5FD_LOG_TIME_OPEN|H5FD_LOG_TIME_READ|H5FD_LOG_TIME_WRITE|H5FD_LOG_TIME_SEEK|H5FD_LOG_TIME_CLOSE)
-/* Flag for tracking allocation of space in file */
-#define H5FD_LOG_ALLOC      0x4000
-#define H5FD_LOG_ALL        (H5FD_LOG_ALLOC|H5FD_LOG_TIME_IO|H5FD_LOG_NUM_IO|H5FD_LOG_FLAVOR|H5FD_LOG_FILE_IO|H5FD_LOG_LOC_IO)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-H5_DLL hid_t H5FD_log_init(void);
-H5_DLL void H5FD_log_term(void);
-H5_DLL herr_t H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned flags, size_t buf_size);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/interfaces/ext/hdf5/H5FDmpi.h b/interfaces/ext/hdf5/H5FDmpi.h
deleted file mode 100644
index b9998dd..0000000
--- a/interfaces/ext/hdf5/H5FDmpi.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Programmer:  Quincey Koziol <koziol at ncsa.uiuc.edu>
- *              Friday, January 30, 2004
- *
- * Purpose:	The public header file for common items for all MPI VFL drivers
- */
-#ifndef H5FDmpi_H
-#define H5FDmpi_H
-
-/***** Macros for One linked collective IO case. *****/
-/* The default value to do one linked collective IO for all chunks.
-   If the average number of chunks per process is greater than this value,
-      the library will create an MPI derived datatype to link all chunks to do collective IO.
-      The user can set this value through an API. */
-
-#define H5D_ONE_LINK_CHUNK_IO_THRESHOLD 0
-/***** Macros for multi-chunk collective IO case. *****/
-/* The default value of the threshold to do collective IO for this chunk.
-   If the average percentage of processes per chunk is greater than the default value,
-   collective IO is done for this chunk.
-*/
-
-#define H5D_MULTI_CHUNK_IO_COL_THRESHOLD 60
-/* Type of I/O for data transfer properties */
-typedef enum H5FD_mpio_xfer_t {
-    H5FD_MPIO_INDEPENDENT = 0, 		/*zero is the default*/
-    H5FD_MPIO_COLLECTIVE
-} H5FD_mpio_xfer_t;
-
-/* Type of chunked dataset I/O */
-typedef enum H5FD_mpio_chunk_opt_t {
-    H5FD_MPIO_CHUNK_DEFAULT = 0,
-    H5FD_MPIO_CHUNK_ONE_IO,  		/*zero is the default*/
-    H5FD_MPIO_CHUNK_MULTI_IO
-} H5FD_mpio_chunk_opt_t;
-
-/* Type of collective I/O */
-typedef enum H5FD_mpio_collective_opt_t {
-    H5FD_MPIO_COLLECTIVE_IO = 0,
-    H5FD_MPIO_INDIVIDUAL_IO  		/*zero is the default*/
-} H5FD_mpio_collective_opt_t;
-
-
-#ifdef H5_HAVE_PARALLEL
-
-/* Sub-class the H5FD_class_t to add more specific functions for MPI-based VFDs */
-typedef struct H5FD_class_mpi_t {
-    H5FD_class_t        super;          /* Superclass information & methods */
-    int  (*get_rank)(const H5FD_t *file);     /* Get the MPI rank of a process */
-    int  (*get_size)(const H5FD_t *file);     /* Get the MPI size of a communicator */
-    MPI_Comm (*get_comm)(const H5FD_t *file); /* Get the communicator for a file */
-} H5FD_class_mpi_t;
-#endif /* H5_HAVE_PARALLEL */
-
-/* Include all the MPI VFL headers */
-#include "H5FDmpio.h"           /* MPI I/O file driver			*/
-#include "H5FDmpiposix.h"       /* MPI/posix I/O file driver            */
-
-/* Macros */
-
-/* Single macro to check for all file drivers that use MPI */
-#define IS_H5FD_MPI(file)  \
-        (IS_H5FD_MPIO(file) || IS_H5FD_MPIPOSIX(file))
-
-#ifdef H5_HAVE_PARALLEL
-/* ======== Temporary data transfer properties ======== */
-/* Definitions for memory MPI type property */
-#define H5FD_MPI_XFER_MEM_MPI_TYPE_NAME        "H5FD_mpi_mem_mpi_type"
-#define H5FD_MPI_XFER_MEM_MPI_TYPE_SIZE        sizeof(MPI_Datatype)
-/* Definitions for file MPI type property */
-#define H5FD_MPI_XFER_FILE_MPI_TYPE_NAME       "H5FD_mpi_file_mpi_type"
-#define H5FD_MPI_XFER_FILE_MPI_TYPE_SIZE       sizeof(MPI_Datatype)
-
-/*
- * The view is set to this value
- */
-H5_DLLVAR char H5FD_mpi_native_g[];
-
-/* Function prototypes */
-#ifdef __cplusplus
-extern "C" {
-#endif
-/* General routines */
-H5_DLL haddr_t H5FD_mpi_MPIOff_to_haddr(MPI_Offset mpi_off);
-H5_DLL herr_t H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off/*out*/);
-H5_DLL herr_t H5FD_mpi_comm_info_dup(MPI_Comm comm, MPI_Info info,
-				MPI_Comm *comm_new, MPI_Info *info_new);
-H5_DLL herr_t H5FD_mpi_comm_info_free(MPI_Comm *comm, MPI_Info *info);
-#ifdef NOT_YET
-H5_DLL herr_t H5FD_mpio_wait_for_left_neighbor(H5FD_t *file);
-H5_DLL herr_t H5FD_mpio_signal_right_neighbor(H5FD_t *file);
-#endif /* NOT_YET */
-H5_DLL herr_t H5FD_mpi_setup_collective(hid_t dxpl_id, MPI_Datatype btype,
-    MPI_Datatype ftype);
-H5_DLL herr_t H5FD_mpi_teardown_collective(hid_t dxpl_id);
-
-/* Driver specific methods */
-H5_DLL int H5FD_mpi_get_rank(const H5FD_t *file);
-H5_DLL int H5FD_mpi_get_size(const H5FD_t *file);
-H5_DLL MPI_Comm H5FD_mpi_get_comm(const H5FD_t *_file);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* H5_HAVE_PARALLEL */
-
-#endif /* H5FDmpi_H */
-
diff --git a/interfaces/ext/hdf5/H5FDmpio.h b/interfaces/ext/hdf5/H5FDmpio.h
deleted file mode 100644
index 41baf8d..0000000
--- a/interfaces/ext/hdf5/H5FDmpio.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Programmer:  Robb Matzke <matzke at llnl.gov>
- *              Monday, August  2, 1999
- *
- * Purpose:	The public header file for the mpio driver.
- */
-#ifndef H5FDmpio_H
-#define H5FDmpio_H
-
-#ifdef H5_HAVE_PARALLEL
-#   define H5FD_MPIO	(H5FD_mpio_init())
-#else
-#   define H5FD_MPIO	(-1)
-#endif /* H5_HAVE_PARALLEL */
-
-/* Macros */
-
-#define IS_H5FD_MPIO(f)	/* (H5F_t *f) */				    \
-    (H5FD_MPIO==H5F_DRIVER_ID(f))
-
-#ifdef H5_HAVE_PARALLEL
-/*Turn on H5FDmpio_debug if H5F_DEBUG is on */
-#ifdef H5F_DEBUG
-#ifndef H5FDmpio_DEBUG
-#define H5FDmpio_DEBUG
-#endif
-#endif
-
-/* Function prototypes */
-#ifdef __cplusplus
-extern "C" {
-#endif
-H5_DLL hid_t H5FD_mpio_init(void);
-H5_DLL void H5FD_mpio_term(void);
-H5_DLL herr_t H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info);
-H5_DLL herr_t H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm/*out*/,
-			MPI_Info *info/*out*/);
-H5_DLL herr_t H5Pset_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t xfer_mode);
-H5_DLL herr_t H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode/*out*/);
-H5_DLL herr_t H5Pset_dxpl_mpio_collective_opt(hid_t dxpl_id, H5FD_mpio_collective_opt_t opt_mode);
-H5_DLL herr_t H5Pset_dxpl_mpio_chunk_opt(hid_t dxpl_id, H5FD_mpio_chunk_opt_t opt_mode);
-H5_DLL herr_t H5Pset_dxpl_mpio_chunk_opt_num(hid_t dxpl_id, unsigned num_chunk_per_proc);
-H5_DLL herr_t H5Pset_dxpl_mpio_chunk_opt_ratio(hid_t dxpl_id, unsigned percent_num_proc_per_chunk);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* H5_HAVE_PARALLEL */
-
-#endif
diff --git a/interfaces/ext/hdf5/H5FDmpiposix.h b/interfaces/ext/hdf5/H5FDmpiposix.h
deleted file mode 100644
index 832839e..0000000
--- a/interfaces/ext/hdf5/H5FDmpiposix.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Programmer:  Quincey Koziol <koziol at ncsa.uiuc.edu>
- *              Thursday, July 11, 2002
- *
- * Purpose:	The public header file for the mpiposix driver.
- */
-
-#ifndef __H5FDmpiposix_H
-#define __H5FDmpiposix_H
-
-#ifdef H5_HAVE_PARALLEL
-#   define H5FD_MPIPOSIX	(H5FD_mpiposix_init())
-#else
-#   define H5FD_MPIPOSIX	(-1)
-#endif
-
-/* Macros */
-
-#define IS_H5FD_MPIPOSIX(f)	/* (H5F_t *f) */				    \
-    (H5FD_MPIPOSIX==H5F_DRIVER_ID(f))
-
-#ifdef H5_HAVE_PARALLEL
-
-/* Function prototypes */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-H5_DLL hid_t H5FD_mpiposix_init(void);
-H5_DLL void H5FD_mpiposix_term(void);
-H5_DLL herr_t H5Pset_fapl_mpiposix(hid_t fapl_id, MPI_Comm comm, hbool_t use_gpfs);
-H5_DLL herr_t H5Pget_fapl_mpiposix(hid_t fapl_id, MPI_Comm *comm/*out*/, hbool_t *use_gpfs/*out*/);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*H5_HAVE_PARALLEL*/
-
-#endif /* __H5FDmpiposix_H */
-
diff --git a/interfaces/ext/hdf5/H5FDmulti.h b/interfaces/ext/hdf5/H5FDmulti.h
deleted file mode 100644
index c7e54ce..0000000
--- a/interfaces/ext/hdf5/H5FDmulti.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Programmer:  Robb Matzke <matzke at llnl.gov>
- *              Monday, August  2, 1999
- *
- * Purpose:	The public header file for the "multi" driver.
- */
-#ifndef H5FDmulti_H
-#define H5FDmulti_H
-
-#include "H5Ipublic.h"
-#include "H5Ppublic.h"             /* Property lists */
-#include "H5Fpublic.h"
-
-#define H5FD_MULTI	(H5FD_multi_init())
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-H5_DLL hid_t H5FD_multi_init(void);
-H5_DLL void H5FD_multi_term(void);
-H5_DLL herr_t H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
-			 const hid_t *memb_fapl, const char * const *memb_name,
-			 const haddr_t *memb_addr, hbool_t relax);
-H5_DLL herr_t H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
-			 hid_t *memb_fapl/*out*/, char **memb_name/*out*/,
-			 haddr_t *memb_addr/*out*/, hbool_t *relax/*out*/);
-H5_DLL herr_t H5Pset_dxpl_multi(hid_t dxpl_id, const hid_t *memb_dxpl);
-H5_DLL herr_t H5Pget_dxpl_multi(hid_t dxpl_id, hid_t *memb_dxpl/*out*/);
-
-H5_DLL herr_t H5Pset_fapl_split(hid_t fapl, const char *meta_ext,
-			 hid_t meta_plist_id, const char *raw_ext,
-			 hid_t raw_plist_id);
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/interfaces/ext/hdf5/H5FDpublic.h b/interfaces/ext/hdf5/H5FDpublic.h
deleted file mode 100644
index cd6c964..0000000
--- a/interfaces/ext/hdf5/H5FDpublic.h
+++ /dev/null
@@ -1,279 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Programmer:  Robb Matzke <matzke at llnl.gov>
- *              Monday, July 26, 1999
- */
-#ifndef _H5FDpublic_H
-#define _H5FDpublic_H
-
-#include "H5public.h"
-#include "H5Fpublic.h"		/*for H5F_close_degree_t */
-
-#define H5_HAVE_VFL 1 /*define a convenient app feature test*/
-#define H5FD_VFD_DEFAULT 0   /* Default VFL driver value */
-
-/* Types of allocation requests: see H5Fpublic.h  */
-typedef enum H5F_mem_t	H5FD_mem_t;
-
-/* Map "fractal heap" header blocks to 'ohdr' type file memory, since its
- * a fair amount of work to add a new kind of file memory and they are similar
- * enough to object headers and probably too minor to deserve their own type.
- *
- * Map "fractal heap" indirect blocks to 'ohdr' type file memory, since they
- * are similar to fractal heap header blocks.
- *
- * Map "fractal heap" direct blocks to 'lheap' type file memory, since they
- * will be replacing local heaps.
- *
- * Map "fractal heap" 'huge' objects to 'draw' type file memory, since they
- * represent large objects that are directly stored in the file.
- *
- *      -QAK
- */
-#define H5FD_MEM_FHEAP_HDR      H5FD_MEM_OHDR
-#define H5FD_MEM_FHEAP_IBLOCK   H5FD_MEM_OHDR
-#define H5FD_MEM_FHEAP_DBLOCK   H5FD_MEM_LHEAP
-#define H5FD_MEM_FHEAP_HUGE_OBJ H5FD_MEM_DRAW
-
-/* Map "free space" header blocks to 'ohdr' type file memory, since its
- * a fair amount of work to add a new kind of file memory and they are similar
- * enough to object headers and probably too minor to deserve their own type.
- *
- * Map "free space" serialized sections to 'lheap' type file memory, since they
- * are similar enough to local heap info.
- *
- *      -QAK
- */
-#define H5FD_MEM_FSPACE_HDR     H5FD_MEM_OHDR
-#define H5FD_MEM_FSPACE_SINFO   H5FD_MEM_LHEAP
-
-/* Map "shared object header message" master table to 'ohdr' type file memory,
- * since its a fair amount of work to add a new kind of file memory and they are
- * similar enough to object headers and probably too minor to deserve their own
- * type.
- *
- * Map "shared object header message" indices to 'btree' type file memory,
- * since they are similar enough to B-tree nodes.
- *
- *      -QAK
- */
-#define H5FD_MEM_SOHM_TABLE     H5FD_MEM_OHDR
-#define H5FD_MEM_SOHM_INDEX     H5FD_MEM_BTREE
-
-/*
- * A free-list map which maps all types of allocation requests to a single
- * free list.  This is useful for drivers that don't really care about
- * keeping different requests segregated in the underlying file and which
- * want to make most efficient reuse of freed memory.  The use of the
- * H5FD_MEM_SUPER free list is arbitrary.
- */
-#define H5FD_FLMAP_SINGLE {						      \
-    H5FD_MEM_SUPER,			/*default*/			      \
-    H5FD_MEM_SUPER,			/*super*/			      \
-    H5FD_MEM_SUPER,			/*btree*/			      \
-    H5FD_MEM_SUPER,			/*draw*/			      \
-    H5FD_MEM_SUPER,			/*gheap*/			      \
-    H5FD_MEM_SUPER,			/*lheap*/			      \
-    H5FD_MEM_SUPER			/*ohdr*/			      \
-}
-
-/*
- * A free-list map which segregates requests into `raw' or `meta' data
- * pools.
- */
-#define H5FD_FLMAP_DICHOTOMY {						      \
-    H5FD_MEM_SUPER,			/*default*/			      \
-    H5FD_MEM_SUPER,			/*super*/			      \
-    H5FD_MEM_SUPER,			/*btree*/			      \
-    H5FD_MEM_DRAW,			/*draw*/			      \
-    H5FD_MEM_SUPER,			/*gheap*/			      \
-    H5FD_MEM_SUPER,			/*lheap*/			      \
-    H5FD_MEM_SUPER			/*ohdr*/			      \
-}
-
-/*
- * The default free list map which causes each request type to use it's own
- * free-list.
- */
-#define H5FD_FLMAP_DEFAULT {						      \
-    H5FD_MEM_DEFAULT,			/*default*/			      \
-    H5FD_MEM_DEFAULT,			/*super*/			      \
-    H5FD_MEM_DEFAULT,			/*btree*/			      \
-    H5FD_MEM_DEFAULT,			/*draw*/			      \
-    H5FD_MEM_DEFAULT,			/*gheap*/			      \
-    H5FD_MEM_DEFAULT,			/*lheap*/			      \
-    H5FD_MEM_DEFAULT			/*ohdr*/			      \
-}
-
-
-/* Define VFL driver features that can be enabled on a per-driver basis */
-/* These are returned with the 'query' function pointer in H5FD_class_t */
-    /*
-     * Defining the H5FD_FEAT_AGGREGATE_METADATA for a VFL driver means that
-     * the library will attempt to allocate a larger block for metadata and
-     * then sub-allocate each metadata request from that larger block.
-     */
-#define H5FD_FEAT_AGGREGATE_METADATA    0x00000001
-    /*
-     * Defining the H5FD_FEAT_ACCUMULATE_METADATA for a VFL driver means that
-     * the library will attempt to cache metadata as it is written to the file
-     * and build up a larger block of metadata to eventually pass to the VFL
-     * 'write' routine.
-     *
-     * Distinguish between updating the metadata accumulator on writes and
-     * reads.  This is particularly (perhaps only, even) important for MPI-I/O
-     * where we guarantee that writes are collective, but reads may not be.
-     * If we were to allow the metadata accumulator to be written during a
-     * read operation, the application would hang.
-     */
-#define H5FD_FEAT_ACCUMULATE_METADATA_WRITE     0x00000002
-#define H5FD_FEAT_ACCUMULATE_METADATA_READ      0x00000004
-#define H5FD_FEAT_ACCUMULATE_METADATA   (H5FD_FEAT_ACCUMULATE_METADATA_WRITE|H5FD_FEAT_ACCUMULATE_METADATA_READ)
-    /*
-     * Defining the H5FD_FEAT_DATA_SIEVE for a VFL driver means that
-     * the library will attempt to cache raw data as it is read from/written to
-     * a file in a "data seive" buffer.  See Rajeev Thakur's papers:
-     *  http://www.mcs.anl.gov/~thakur/papers/romio-coll.ps.gz
-     *  http://www.mcs.anl.gov/~thakur/papers/mpio-high-perf.ps.gz
-     */
-#define H5FD_FEAT_DATA_SIEVE            0x00000008
-    /*
-     * Defining the H5FD_FEAT_AGGREGATE_SMALLDATA for a VFL driver means that
-     * the library will attempt to allocate a larger block for "small" raw data
-     * and then sub-allocate "small" raw data requests from that larger block.
-     */
-#define H5FD_FEAT_AGGREGATE_SMALLDATA   0x00000010
-    /*
-     * Defining the H5FD_FEAT_IGNORE_DRVRINFO for a VFL driver means that
-     * the library will ignore the driver info that is encoded in the file
-     * for the VFL driver.  (This will cause the driver info to be eliminated
-     * from the file when it is flushed/closed, if the file is opened R/W).
-     */
-#define H5FD_FEAT_IGNORE_DRVRINFO       0x00000020
-    /*
-     * Defining the H5FD_FEAT_DIRTY_SBLK_LOAD for a VFL driver means that
-     * the library will mark the superblock dirty when the file is opened
-     * R/W.  This will cause the driver info to be re-encoded when the file
-     * is flushed/closed.
-     */
-#define H5FD_FEAT_DIRTY_SBLK_LOAD       0x00000040
-    /*
-     * Defining the H5FD_FEAT_POSIX_COMPAT_HANDLE for a VFL driver means that
-     * the handle for the VFD (returned with the 'get_handle' callback) is
-     * of type 'int' and is compatible with POSIX I/O calls.
-     */
-#define H5FD_FEAT_POSIX_COMPAT_HANDLE   0x00000080
-
-
-/* Forward declaration */
-typedef struct H5FD_t H5FD_t;
-
-/* Class information for each file driver */
-typedef struct H5FD_class_t {
-    const char *name;
-    haddr_t maxaddr;
-    H5F_close_degree_t fc_degree;
-    hsize_t (*sb_size)(H5FD_t *file);
-    herr_t  (*sb_encode)(H5FD_t *file, char *name/*out*/,
-                         unsigned char *p/*out*/);
-    herr_t  (*sb_decode)(H5FD_t *f, const char *name, const unsigned char *p);
-    size_t  fapl_size;
-    void *  (*fapl_get)(H5FD_t *file);
-    void *  (*fapl_copy)(const void *fapl);
-    herr_t  (*fapl_free)(void *fapl);
-    size_t  dxpl_size;
-    void *  (*dxpl_copy)(const void *dxpl);
-    herr_t  (*dxpl_free)(void *dxpl);
-    H5FD_t *(*open)(const char *name, unsigned flags, hid_t fapl,
-                    haddr_t maxaddr);
-    herr_t  (*close)(H5FD_t *file);
-    int     (*cmp)(const H5FD_t *f1, const H5FD_t *f2);
-    herr_t  (*query)(const H5FD_t *f1, unsigned long *flags);
-    herr_t  (*get_type_map)(const H5FD_t *file, H5FD_mem_t *type_map);
-    haddr_t (*alloc)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
-    herr_t  (*free)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id,
-                    haddr_t addr, hsize_t size);
-    haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type);
-    herr_t  (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr);
-    haddr_t (*get_eof)(const H5FD_t *file);
-    herr_t  (*get_handle)(H5FD_t *file, hid_t fapl, void**file_handle);
-    herr_t  (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl,
-                    haddr_t addr, size_t size, void *buffer);
-    herr_t  (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl,
-                     haddr_t addr, size_t size, const void *buffer);
-    herr_t  (*flush)(H5FD_t *file, hid_t dxpl_id, unsigned closing);
-    herr_t  (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
-    herr_t  (*lock)(H5FD_t *file, unsigned char *oid, unsigned lock_type, hbool_t last);
-    herr_t  (*unlock)(H5FD_t *file, unsigned char *oid, hbool_t last);
-    H5FD_mem_t fl_map[H5FD_MEM_NTYPES];
-} H5FD_class_t;
-
-/* A free list is a singly-linked list of address/size pairs. */
-typedef struct H5FD_free_t {
-    haddr_t		addr;
-    hsize_t		size;
-    struct H5FD_free_t	*next;
-} H5FD_free_t;
-
-/*
- * The main datatype for each driver. Public fields common to all drivers
- * are declared here and the driver appends private fields in memory.
- */
-struct H5FD_t {
-    hid_t               driver_id;      /*driver ID for this file   */
-    const H5FD_class_t *cls;            /*constant class info       */
-    unsigned long       fileno;         /* File 'serial' number     */
-    unsigned long       feature_flags;  /* VFL Driver feature Flags */
-    haddr_t             maxaddr;        /* For this file, overrides class */
-    haddr_t             base_addr;      /* Base address for HDF5 data w/in file */
-
-    /* Space allocation management fields */
-    hsize_t             threshold;      /* Threshold for alignment  */
-    hsize_t             alignment;      /* Allocation alignment     */
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Function prototypes */
-H5_DLL hid_t H5FDregister(const H5FD_class_t *cls);
-H5_DLL herr_t H5FDunregister(hid_t driver_id);
-H5_DLL H5FD_t *H5FDopen(const char *name, unsigned flags, hid_t fapl_id,
-                        haddr_t maxaddr);
-H5_DLL herr_t H5FDclose(H5FD_t *file);
-H5_DLL int H5FDcmp(const H5FD_t *f1, const H5FD_t *f2);
-H5_DLL int H5FDquery(const H5FD_t *f, unsigned long *flags);
-H5_DLL haddr_t H5FDalloc(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
-H5_DLL herr_t H5FDfree(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id,
-                       haddr_t addr, hsize_t size);
-H5_DLL haddr_t H5FDget_eoa(H5FD_t *file, H5FD_mem_t type);
-H5_DLL herr_t H5FDset_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t eoa);
-H5_DLL haddr_t H5FDget_eof(H5FD_t *file);
-H5_DLL herr_t H5FDget_vfd_handle(H5FD_t *file, hid_t fapl, void**file_handle);
-H5_DLL herr_t H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id,
-                       haddr_t addr, size_t size, void *buf/*out*/);
-H5_DLL herr_t H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id,
-                        haddr_t addr, size_t size, const void *buf);
-H5_DLL herr_t H5FDflush(H5FD_t *file, hid_t dxpl_id, unsigned closing);
-H5_DLL herr_t H5FDtruncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-
diff --git a/interfaces/ext/hdf5/H5FDsec2.h b/interfaces/ext/hdf5/H5FDsec2.h
deleted file mode 100644
index b7db0d5..0000000
--- a/interfaces/ext/hdf5/H5FDsec2.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Programmer:  Robb Matzke <matzke at llnl.gov>
- *              Monday, August  2, 1999
- *
- * Purpose:	The public header file for the sec2 driver.
- */
-#ifndef H5FDsec2_H
-#define H5FDsec2_H
-
-#include "H5Ipublic.h"
-
-#define H5FD_SEC2	(H5FD_sec2_init())
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-H5_DLL hid_t H5FD_sec2_init(void);
-H5_DLL void H5FD_sec2_term(void);
-H5_DLL herr_t H5Pset_fapl_sec2(hid_t fapl_id);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/interfaces/ext/hdf5/H5FDstdio.h b/interfaces/ext/hdf5/H5FDstdio.h
deleted file mode 100644
index 80443d8..0000000
--- a/interfaces/ext/hdf5/H5FDstdio.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Programmer:  Robb Matzke <matzke at llnl.gov>
- *              Monday, August  2, 1999
- *
- * Purpose:	The public header file for the sec2 driver.
- */
-#ifndef H5FDstdio_H
-#define H5FDstdio_H
-
-#include "H5Ipublic.h"
-
-#define H5FD_STDIO	(H5FD_stdio_init())
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-H5_DLL hid_t H5FD_stdio_init(void);
-H5_DLL void H5FD_stdio_term(void);
-H5_DLL herr_t H5Pset_fapl_stdio(hid_t fapl_id);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/interfaces/ext/hdf5/H5FaccProp.h b/interfaces/ext/hdf5/H5FaccProp.h
deleted file mode 100644
index 354eaf7..0000000
--- a/interfaces/ext/hdf5/H5FaccProp.h
+++ /dev/null
@@ -1,142 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5FileAccPropList_H
-#define _H5FileAccPropList_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-// class for file access properties
-class H5_DLLCPP FileAccPropList : public PropList {
-   public:
-	static const FileAccPropList DEFAULT;
-
-	// Creates a file access property list.
-	FileAccPropList();
-
-	// Modifies this property list to use the H5FD_STDIO driver
-	void setStdio() const;
-
-	// Set file driver for this property list
-	void setDriver(hid_t new_driver_id, const void *new_driver_info) const;
-
-	// Returns a low-level file driver identifier.
-	hid_t getDriver() const;
-
-	// Sets offset for family driver.
-	void setFamilyOffset(hsize_t offset) const;
-
-	// Gets offset for family driver.
-	hsize_t getFamilyOffset() const;
-
-	// Modifies this file access property list to use the sec2 driver.
-	void setSec2() const;
-
-	// Modifies this file access property list to use the H5FD_CORE
-	// driver.
-	void setCore (size_t increment, hbool_t backing_store) const;
-
-	// Queries H5FD_CORE driver properties.
-	void getCore (size_t& increment, hbool_t& backing_store) const;
-
-	// Sets this file access properties list to the family driver.
-	void setFamily( hsize_t memb_size, const FileAccPropList& memb_plist ) const;
-
-	// Returns information about the family file access property list.
-	void getFamily(hsize_t& memb_size, FileAccPropList& memb_plist) const;
-	FileAccPropList getFamily(hsize_t& memb_size) const;
-
-	// Emulates the old split file driver,
-	void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
-	     const char* meta_ext = ".meta", const char* raw_ext = ".raw" ) const;
-	void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
-	     const H5std_string& meta_ext, const H5std_string& raw_ext ) const;
-
-#ifdef H5_HAVE_STREAM // for Stream Virtual File Driver
-	// Modifies this file access property list to use the Stream driver.
-	void setStream(H5FD_stream_fapl_t &fapl) const;
-
-	// Retrieves the streaming I/O driver settings
-	H5FD_stream_fapl_t getStream() const;
-#endif
-
-	// Sets the maximum size of the data sieve buffer.
-	void setSieveBufSize(size_t bufsize) const;
-
-	// Returns the current settings for the data sieve buffer size
-	// property
-	size_t getSieveBufSize() const;
-
-	// Sets the minimum size of metadata block allocations.
-	void setMetaBlockSize(hsize_t &block_size) const;
-
-	// Returns the current metadata block size setting.
-	hsize_t getMetaBlockSize() const;
-
-	// Modifies this file access property list to use the logging driver.
-	void setLog(const char *logfile, unsigned flags, size_t buf_size) const;
-	void setLog(const H5std_string& logfile, unsigned flags, size_t buf_size) const;
-
-	// Sets alignment properties of this file access property list
-	void setAlignment( hsize_t threshold = 1, hsize_t alignment = 1 ) const;
-
-	// Retrieves the current settings for alignment properties from
-	// this property list.
-	void getAlignment( hsize_t& threshold, hsize_t& alignment ) const;
-
-	// Sets data type for multi driver.
-	void setMultiType(H5FD_mem_t dtype) const;
-
-	// Returns the data type property for MULTI driver.
-	H5FD_mem_t getMultiType() const;
-
-	// Sets the meta data cache and raw data chunk cache parameters.
-	void setCache( int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0 ) const;
-
-	// Queries the meta data cache and raw data chunk cache parameters.
-	void getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0 ) const;
-
-	// Sets the degree for the file close behavior.
-	void setFcloseDegree(H5F_close_degree_t degree);
-
-	// Returns the degree for the file close behavior.
-	H5F_close_degree_t getFcloseDegree();
-
-	// Sets garbage collecting references flag.
-	void setGcReferences( unsigned gc_ref = 0 ) const;
-
-	// Returns garbage collecting references setting.
-	unsigned getGcReferences() const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("FileAccPropList"); }
-
-	// Copy constructor: creates a copy of a FileAccPropList object.
-	FileAccPropList( const FileAccPropList& original );
-
-	// Creates a copy of an existing file access property list
-	// using the property list id.
-	FileAccPropList (const hid_t plist_id);
-
-	// Noop destructor
-	virtual ~FileAccPropList();
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5FcreatProp.h b/interfaces/ext/hdf5/H5FcreatProp.h
deleted file mode 100644
index 2e2af70..0000000
--- a/interfaces/ext/hdf5/H5FcreatProp.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5FileCreatPropList_H
-#define _H5FileCreatPropList_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-// class for file access properties
-class H5_DLLCPP FileCreatPropList : public PropList {
-   public:
-	// Default file creation property list.
-	static const FileCreatPropList DEFAULT;
-
-	// Creates a file create property list.
-	FileCreatPropList();
-
-	// Retrieves version information for various parts of a file.
-	void getVersion( unsigned& super, unsigned& freelist, unsigned& stab, unsigned& shhdr ) const;
-
-	// Sets the userblock size field of a file creation property list.
-	void setUserblock( hsize_t size ) const;
-
-	// Gets the size of a user block in this file creation property list.
-	hsize_t getUserblock() const;
-
-	// Retrieves the size-of address and size quantities stored in a
-	// file according to this file creation property list.
-	void getSizes( size_t& sizeof_addr, size_t& sizeof_size ) const;
-
-	// Sets file size-of addresses and sizes.
-	void setSizes( size_t sizeof_addr = 4, size_t sizeof_size = 4 ) const;
-
-	// Retrieves the size of the symbol table B-tree 1/2 rank and the
-	// symbol table leaf node 1/2 size.
-	void getSymk( unsigned& int_nodes_k, unsigned& leaf_nodes_k ) const;
-
-	// Sets the size of parameters used to control the symbol table nodes.
-	void setSymk( unsigned int_nodes_k, unsigned leaf_nodes_k ) const;
-
-	// Returns the 1/2 rank of an indexed storage B-tree.
-	unsigned getIstorek() const;
-
-	// Sets the size of parameter used to control the B-trees for
-	// indexing chunked datasets.
-	void setIstorek( unsigned ik ) const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("FileCreatPropList"); }
-
-	// Copy constructor: creates a copy of a FileCreatPropList object.
-	FileCreatPropList(const FileCreatPropList& orig);
-
-	// Creates a copy of an existing file create property list
-	// using the property list id.
-	FileCreatPropList (const hid_t plist_id);
-
-	// Noop destructor
-	virtual ~FileCreatPropList();
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5File.h b/interfaces/ext/hdf5/H5File.h
deleted file mode 100644
index d87dc08..0000000
--- a/interfaces/ext/hdf5/H5File.h
+++ /dev/null
@@ -1,148 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5File_H
-#define _H5File_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP H5File : public IdComponent, public CommonFG {
-   public:
-	// Creates or opens an HDF5 file.
-	H5File( const char* name, unsigned int flags,
-	   const FileCreatPropList& create_plist = FileCreatPropList::DEFAULT,
-	   const FileAccPropList& access_plist = FileAccPropList::DEFAULT );
-	H5File( const H5std_string& name, unsigned int flags,
-	   const FileCreatPropList& create_plist = FileCreatPropList::DEFAULT,
-	   const FileAccPropList& access_plist = FileAccPropList::DEFAULT );
-
-	// Open the file
-	void openFile(const H5std_string& name, unsigned int flags,
-	    const FileAccPropList& access_plist = FileAccPropList::DEFAULT);
-	void openFile(const char* name, unsigned int flags,
-	    const FileAccPropList& access_plist = FileAccPropList::DEFAULT);
-
-	// Close this file.
-	virtual void close();
-
-	// Flushes all buffers associated with this file to disk
-	void flush(H5F_scope_t scope) const;
-
-	// Gets the access property list of this file.
-	FileAccPropList getAccessPlist() const;
-
-	// Gets the creation property list of this file.
-	FileCreatPropList getCreatePlist() const;
-
-	// Gets the name of this file.
-	H5std_string getFileName() const;
-
-	// Retrieves the file size of an opened file.
-	hsize_t getFileSize() const;
-
-	// Returns the amount of free space in the file.
-	hssize_t getFreeSpace() const;
-
-	// Returns the number of opened object IDs (files, datasets, groups
-	// and datatypes) in the same file.
-	ssize_t getObjCount(unsigned types) const;
-	ssize_t getObjCount() const;
-
-	// Retrieves a list of opened object IDs (files, datasets, groups
-	// and datatypes) in the same file.
-	void getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const;
-
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-	// Retrieves the type of object that an object reference points to.
-	H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-	// Retrieves a dataspace with the region pointed to selected.
-	DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
-
-	// Returns the pointer to the file handle of the low-level file driver.
-	void getVFDHandle(FileAccPropList& fapl, void **file_handle) const;
-	void getVFDHandle(void **file_handle) const;
-
-	// Determines if a file, specified by its name, is in HDF5 format
-	static bool isHdf5(const char* name );
-	static bool isHdf5(const H5std_string& name );
-
-	// Reopens this file.
-	void reOpen();	// added for better name
-	void reopen();
-
-	// Creates a reference to a named HDF5 object or to a dataset region
-	// in this object.
-	void reference(void* ref, const char* name, const DataSpace& dataspace,
-			H5R_type_t ref_type = H5R_DATASET_REGION) const;
-	void reference(void* ref, const char* name) const;
-	void reference(void* ref, const H5std_string& name) const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("H5File"); }
-
-	// Throw file exception.
-	virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const;
-
-	// Gets the file id
-	virtual hid_t getLocId() const;
-
-	// Default constructor
-	H5File();
-
-	// Copy constructor: makes a copy of the original H5File object.
-	H5File(const H5File& original);
-
-	// Gets the HDF5 file id.
-	virtual hid_t getId() const;
-
-	// H5File destructor.
-	virtual ~H5File();
-
-   private:
-	hid_t id;	// HDF5 file id
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-	// This function is private and contains common code between the
-	// constructors taking a string or a char*
-	void p_get_file( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist );
-
-	// Creates a reference to an HDF5 object or a dataset region.
-	void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
-
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-	// Retrieves the type of object that an object reference points to.
-	H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-	// Retrieves a dataspace with the region pointed to selected.
-	hid_t p_get_region(void *ref, H5R_type_t ref_type) const;
-
-   protected:
-	// Sets the HDF5 file id.
-	virtual void p_setId(const hid_t new_id);
-
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5FloatType.h b/interfaces/ext/hdf5/H5FloatType.h
deleted file mode 100644
index 08e5db1..0000000
--- a/interfaces/ext/hdf5/H5FloatType.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5FloatType_H
-#define _H5FloatType_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP FloatType : public AtomType {
-   public:
-        // Creates a floating-point type using a predefined type
-        FloatType( const PredType& pred_type );
-
-	// Gets the floating-point datatype of the specified dataset
-	FloatType( const DataSet& dataset );
-
-	// Retrieves the exponent bias of a floating-point type.
-	size_t getEbias() const;
-
-	// Sets the exponent bias of a floating-point type.
-	void setEbias( size_t ebias ) const;
-
-	// Retrieves floating point datatype bit field information.
-	void getFields( size_t& spos, size_t& epos, size_t& esize, size_t& mpos, size_t& msize ) const;
-
-	// Sets locations and sizes of floating point bit fields.
-	void setFields( size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize ) const;
-
-	// Retrieves the internal padding type for unused bits in floating-point datatypes.
-	H5T_pad_t getInpad( H5std_string& pad_string ) const;
-
-	// Fills unused internal floating point bits.
-	void setInpad( H5T_pad_t inpad ) const;
-
-	// Retrieves mantissa normalization of a floating-point datatype.
-	H5T_norm_t getNorm( H5std_string& norm_string ) const;
-
-	// Sets the mantissa normalization of a floating-point datatype.
-	void setNorm( H5T_norm_t norm ) const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("FloatType"); }
-
-	// Default constructor
-	FloatType();
-
-	// Creates a floating-point datatype using an existing id
-	FloatType( const hid_t existing_id );
-
-	// Copy constructor: makes a copy of the original FloatType object.
-	FloatType( const FloatType& original );
-
-	// Noop destructor.
-	virtual ~FloatType();
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5Fpublic.h b/interfaces/ext/hdf5/H5Fpublic.h
deleted file mode 100644
index ec4f8d0..0000000
--- a/interfaces/ext/hdf5/H5Fpublic.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This file contains public declarations for the H5F module.
- */
-#ifndef _H5Fpublic_H
-#define _H5Fpublic_H
-
-/* Public header files needed by this file */
-#include "H5public.h"
-#include "H5ACpublic.h"
-#include "H5Ipublic.h"
-
-/* When this header is included from a private header, don't make calls to H5check() */
-#undef H5CHECK
-#ifndef _H5private_H
-#define H5CHECK          H5check(),
-#else   /* _H5private_H */
-#define H5CHECK
-#endif  /* _H5private_H */
-
-/*
- * These are the bits that can be passed to the `flags' argument of
- * H5Fcreate() and H5Fopen(). Use the bit-wise OR operator (|) to combine
- * them as needed.  As a side effect, they call H5check_version() to make sure
- * that the application is compiled with a version of the hdf5 header files
- * which are compatible with the library to which the application is linked.
- * We're assuming that these constants are used rather early in the hdf5
- * session.
- *
- */
-#define H5F_ACC_RDONLY	(H5CHECK 0x0000u)	/*absence of rdwr => rd-only */
-#define H5F_ACC_RDWR	(H5CHECK 0x0001u)	/*open for read and write    */
-#define H5F_ACC_TRUNC	(H5CHECK 0x0002u)	/*overwrite existing files   */
-#define H5F_ACC_EXCL	(H5CHECK 0x0004u)	/*fail if file already exists*/
-#define H5F_ACC_DEBUG	(H5CHECK 0x0008u)	/*print debug info	     */
-#define H5F_ACC_CREAT	(H5CHECK 0x0010u)	/*create non-existing files  */
-
-/* Value passed to H5Pset_elink_acc_flags to cause flags to be taken from the
- * parent file. */
-#define H5F_ACC_DEFAULT (H5CHECK 0xffffu)	/*ignore setting on lapl     */
-
-/* Flags for H5Fget_obj_count() & H5Fget_obj_ids() calls */
-#define H5F_OBJ_FILE	(0x0001u)       /* File objects */
-#define H5F_OBJ_DATASET	(0x0002u)       /* Dataset objects */
-#define H5F_OBJ_GROUP	(0x0004u)       /* Group objects */
-#define H5F_OBJ_DATATYPE (0x0008u)      /* Named datatype objects */
-#define H5F_OBJ_ATTR    (0x0010u)       /* Attribute objects */
-#define H5F_OBJ_ALL 	(H5F_OBJ_FILE|H5F_OBJ_DATASET|H5F_OBJ_GROUP|H5F_OBJ_DATATYPE|H5F_OBJ_ATTR)
-#define H5F_OBJ_LOCAL   (0x0020u)       /* Restrict search to objects opened through current file ID */
-                                        /* (as opposed to objects opened through any file ID accessing this file) */
-
-#define H5F_FAMILY_DEFAULT (hsize_t)0
-
-#ifdef H5_HAVE_PARALLEL
-/*
- * Use this constant string as the MPI_Info key to set H5Fmpio debug flags.
- * To turn on H5Fmpio debug flags, set the MPI_Info value with this key to
- * have the value of a string consisting of the characters that turn on the
- * desired flags.
- */
-#define H5F_MPIO_DEBUG_KEY "H5F_mpio_debug_key"
-#endif /* H5_HAVE_PARALLEL */
-
-/* The difference between a single file and a set of mounted files */
-typedef enum H5F_scope_t {
-    H5F_SCOPE_LOCAL	= 0,	/*specified file handle only		*/
-    H5F_SCOPE_GLOBAL	= 1 	/*entire virtual file			*/
-} H5F_scope_t;
-
-/* Unlimited file size for H5Pset_external() */
-#define H5F_UNLIMITED	((hsize_t)(-1L))
-
-/* How does file close behave?
- * H5F_CLOSE_DEFAULT - Use the degree pre-defined by underlining VFL
- * H5F_CLOSE_WEAK    - file closes only after all opened objects are closed
- * H5F_CLOSE_SEMI    - if no opened objects, file is close; otherwise, file
-		       close fails
- * H5F_CLOSE_STRONG  - if there are opened objects, close them first, then
-		       close file
- */
-typedef enum H5F_close_degree_t {
-    H5F_CLOSE_DEFAULT   = 0,
-    H5F_CLOSE_WEAK      = 1,
-    H5F_CLOSE_SEMI      = 2,
-    H5F_CLOSE_STRONG    = 3
-} H5F_close_degree_t;
-
-/* Current "global" information about file */
-/* (just size info currently) */
-typedef struct H5F_info_t {
-    hsize_t		super_ext_size;	/* Superblock extension size */
-    struct {
-	hsize_t		hdr_size;       /* Shared object header message header size */
-	H5_ih_info_t	msgs_info;      /* Shared object header message index & heap size */
-    } sohm;
-} H5F_info_t;
-
-/*
- * Types of allocation requests. The values larger than H5FD_MEM_DEFAULT
- * should not change other than adding new types to the end. These numbers
- * might appear in files.
- */
-typedef enum H5F_mem_t {
-    H5FD_MEM_NOLIST	= -1,			/*must be negative*/
-    H5FD_MEM_DEFAULT	= 0,			/*must be zero*/
-    H5FD_MEM_SUPER      = 1,
-    H5FD_MEM_BTREE      = 2,
-    H5FD_MEM_DRAW       = 3,
-    H5FD_MEM_GHEAP      = 4,
-    H5FD_MEM_LHEAP      = 5,
-    H5FD_MEM_OHDR       = 6,
-
-    H5FD_MEM_NTYPES				/*must be last*/
-} H5F_mem_t;
-
-/* Library's file format versions */
-typedef enum H5F_libver_t {
-    H5F_LIBVER_EARLIEST,        /* Use the earliest possible format for storing objects */
-    H5F_LIBVER_LATEST           /* Use the latest possible format available for storing objects*/
-} H5F_libver_t;
-
-/* Define file format version for 1.8 to prepare for 1.10 release.  
- * (Not used anywhere now)*/
-#define H5F_LIBVER_18 H5F_LIBVER_LATEST
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Functions in H5F.c */
-H5_DLL htri_t H5Fis_hdf5(const char *filename);
-H5_DLL hid_t  H5Fcreate(const char *filename, unsigned flags,
-		  	  hid_t create_plist, hid_t access_plist);
-H5_DLL hid_t  H5Fopen(const char *filename, unsigned flags,
-		        hid_t access_plist);
-H5_DLL hid_t  H5Freopen(hid_t file_id);
-H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope);
-H5_DLL herr_t H5Fclose(hid_t file_id);
-H5_DLL hid_t  H5Fget_create_plist(hid_t file_id);
-H5_DLL hid_t  H5Fget_access_plist(hid_t file_id);
-H5_DLL herr_t H5Fget_intent(hid_t file_id, unsigned * intent);
-H5_DLL ssize_t H5Fget_obj_count(hid_t file_id, unsigned types);
-H5_DLL ssize_t H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *obj_id_list);
-H5_DLL herr_t H5Fget_vfd_handle(hid_t file_id, hid_t fapl, void **file_handle);
-H5_DLL herr_t H5Fmount(hid_t loc, const char *name, hid_t child, hid_t plist);
-H5_DLL herr_t H5Funmount(hid_t loc, const char *name);
-H5_DLL hssize_t H5Fget_freespace(hid_t file_id);
-H5_DLL herr_t H5Fget_filesize(hid_t file_id, hsize_t *size);
-H5_DLL herr_t H5Fget_mdc_config(hid_t file_id,
-				H5AC_cache_config_t * config_ptr);
-H5_DLL herr_t H5Fset_mdc_config(hid_t file_id,
-				H5AC_cache_config_t * config_ptr);
-H5_DLL herr_t H5Fget_mdc_hit_rate(hid_t file_id, double * hit_rate_ptr);
-H5_DLL herr_t H5Fget_mdc_size(hid_t file_id,
-                              size_t * max_size_ptr,
-                              size_t * min_clean_size_ptr,
-                              size_t * cur_size_ptr,
-                              int * cur_num_entries_ptr);
-H5_DLL herr_t H5Freset_mdc_hit_rate_stats(hid_t file_id);
-H5_DLL ssize_t H5Fget_name(hid_t obj_id, char *name, size_t size);
-H5_DLL herr_t H5Fget_info(hid_t obj_id, H5F_info_t *bh_info);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _H5Fpublic_H */
-
diff --git a/interfaces/ext/hdf5/H5Gpublic.h b/interfaces/ext/hdf5/H5Gpublic.h
deleted file mode 100644
index 5b8b054..0000000
--- a/interfaces/ext/hdf5/H5Gpublic.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*-------------------------------------------------------------------------
- *
- * Created:             H5Gpublic.h
- *                      Jul 11 1997
- *                      Robb Matzke <matzke at llnl.gov>
- *
- * Purpose:             Public declarations for the H5G package
- *
- *-------------------------------------------------------------------------
- */
-#ifndef _H5Gpublic_H
-#define _H5Gpublic_H
-
-/* System headers needed by this file */
-#include <sys/types.h>
-
-/* Public headers needed by this file */
-#include "H5public.h"		/* Generic Functions			*/
-#include "H5Lpublic.h"		/* Links                                */
-#include "H5Opublic.h"		/* Object headers			*/
-#include "H5Tpublic.h"		/* Datatypes				*/
-
-/*****************/
-/* Public Macros */
-/*****************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*******************/
-/* Public Typedefs */
-/*******************/
-
-/* Types of link storage for groups */
-typedef enum H5G_storage_type_t {
-    H5G_STORAGE_TYPE_UNKNOWN = -1,	/* Unknown link storage type	*/
-    H5G_STORAGE_TYPE_SYMBOL_TABLE,      /* Links in group are stored with a "symbol table" */
-                                        /* (this is sometimes called "old-style" groups) */
-    H5G_STORAGE_TYPE_COMPACT,		/* Links are stored in object header */
-    H5G_STORAGE_TYPE_DENSE 		/* Links are stored in fractal heap & indexed with v2 B-tree */
-} H5G_storage_type_t;
-
-/* Information struct for group (for H5Gget_info/H5Gget_info_by_name/H5Gget_info_by_idx) */
-typedef struct H5G_info_t {
-    H5G_storage_type_t 	storage_type;	/* Type of storage for links in group */
-    hsize_t 	nlinks;		        /* Number of links in group */
-    int64_t     max_corder;             /* Current max. creation order value for group */
-    hbool_t     mounted;                /* Whether group has a file mounted on it */
-} H5G_info_t;
-
-/********************/
-/* Public Variables */
-/********************/
-
-
-/*********************/
-/* Public Prototypes */
-/*********************/
-H5_DLL hid_t H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id,
-    hid_t gcpl_id, hid_t gapl_id);
-H5_DLL hid_t H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id);
-H5_DLL hid_t H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id);
-H5_DLL hid_t H5Gget_create_plist(hid_t group_id);
-H5_DLL herr_t H5Gget_info(hid_t loc_id, H5G_info_t *ginfo);
-H5_DLL herr_t H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *ginfo,
-    hid_t lapl_id);
-H5_DLL herr_t H5Gget_info_by_idx(hid_t loc_id, const char *group_name,
-    H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5G_info_t *ginfo,
-    hid_t lapl_id);
-H5_DLL herr_t H5Gclose(hid_t group_id);
-
-/* Symbols defined for compatibility with previous versions of the HDF5 API.
- *
- * Use of these symbols is deprecated.
- */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-
-/* Macros */
-
-/* Link definitions */
-#define H5G_SAME_LOC H5L_SAME_LOC
-#define H5G_LINK_ERROR H5L_TYPE_ERROR
-#define H5G_LINK_HARD H5L_TYPE_HARD
-#define H5G_LINK_SOFT H5L_TYPE_SOFT
-#define H5G_link_t H5L_type_t
-
-/* Macros for types of objects in a group (see H5G_obj_t definition) */
-#define H5G_NTYPES	256		/* Max possible number of types	*/
-#define H5G_NLIBTYPES	8		/* Number of internal types	*/
-#define H5G_NUSERTYPES	(H5G_NTYPES - H5G_NLIBTYPES)
-#define H5G_USERTYPE(X)	(8 + (X))	/* User defined types		*/
-
-
-/* Typedefs */
-
-/*
- * An object has a certain type. The first few numbers are reserved for use
- * internally by HDF5. Users may add their own types with higher values.  The
- * values are never stored in the file -- they only exist while an
- * application is running.  An object may satisfy the `isa' function for more
- * than one type.
- */
-typedef enum H5G_obj_t {
-    H5G_UNKNOWN = -1,		/* Unknown object type		*/
-    H5G_GROUP,		        /* Object is a group		*/
-    H5G_DATASET,		/* Object is a dataset		*/
-    H5G_TYPE,			/* Object is a named data type	*/
-    H5G_LINK,		        /* Object is a symbolic link	*/
-    H5G_UDLINK,		        /* Object is a user-defined link */
-    H5G_RESERVED_5,		/* Reserved for future use	*/
-    H5G_RESERVED_6,		/* Reserved for future use	*/
-    H5G_RESERVED_7		/* Reserved for future use	*/
-} H5G_obj_t;
-
-/* Prototype for H5Giterate() operator */
-typedef herr_t (*H5G_iterate_t)(hid_t group, const char *name, void *op_data);
-
-/* Information about an object */
-typedef struct H5G_stat_t {
-    unsigned long 	fileno[2];	/*file number			*/
-    unsigned long 	objno[2];	/*object number			*/
-    unsigned 		nlink;		/*number of hard links to object*/
-    H5G_obj_t 		type;		/*basic object type		*/
-    time_t		mtime;		/*modification time		*/
-    size_t		linklen;	/*symbolic link value length	*/
-    H5O_stat_t          ohdr;           /* Object header information    */
-} H5G_stat_t;
-
-
-/* Function prototypes */
-H5_DLL hid_t H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint);
-H5_DLL hid_t H5Gopen1(hid_t loc_id, const char *name);
-H5_DLL herr_t H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name,
-    const char *new_name);
-H5_DLL herr_t H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type,
-    hid_t new_loc_id, const char *new_name);
-H5_DLL herr_t H5Gmove(hid_t src_loc_id, const char *src_name,
-    const char *dst_name);
-H5_DLL herr_t H5Gmove2(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
-    const char *dst_name);
-H5_DLL herr_t H5Gunlink(hid_t loc_id, const char *name);
-H5_DLL herr_t H5Gget_linkval(hid_t loc_id, const char *name, size_t size,
-    char *buf/*out*/);
-H5_DLL herr_t H5Gset_comment(hid_t loc_id, const char *name, const char *comment);
-H5_DLL int H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize,
-    char *buf);
-H5_DLL herr_t H5Giterate(hid_t loc_id, const char *name, int *idx,
-        H5G_iterate_t op, void *op_data);
-H5_DLL herr_t H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs);
-H5_DLL herr_t H5Gget_objinfo(hid_t loc_id, const char *name,
-    hbool_t follow_link, H5G_stat_t *statbuf/*out*/);
-H5_DLL ssize_t H5Gget_objname_by_idx(hid_t loc_id, hsize_t idx, char* name,
-    size_t size);
-H5_DLL H5G_obj_t H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx);
-
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _H5Gpublic_H */
-
diff --git a/interfaces/ext/hdf5/H5Group.h b/interfaces/ext/hdf5/H5Group.h
deleted file mode 100644
index 094b4a7..0000000
--- a/interfaces/ext/hdf5/H5Group.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5Group_H
-#define _H5Group_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP Group : public H5Object, public CommonFG {
-   public:
-	// Close this group.
-	virtual void close();
-
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-	// Retrieves the type of object that an object reference points to.
-	H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-	// Retrieves a dataspace with the region pointed to selected.
-	DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("Group"); }
-
-	// Throw group exception.
-	virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const;
-
-	// for CommonFG to get the file id.
-	virtual hid_t getLocId() const;
-
-	// Creates a group by way of dereference.
-	Group(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
-        Group(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
-        Group(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
-
-	// default constructor
-	Group();
-
-	// Copy constructor: makes a copy of the original object
-	Group(const Group& original);
-
-	// Gets the group id.
-	virtual hid_t getId() const;
-
-	// Destructor
-	virtual ~Group();
-
-	// Creates a copy of an existing group using its id.
-	Group( const hid_t group_id );
-
-   private:
-	hid_t id;	// HDF5 group id
-
-   protected:
-	// Sets the group id.
-	virtual void p_setId(const hid_t new_id);
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5IMpublic.h b/interfaces/ext/hdf5/H5IMpublic.h
deleted file mode 100644
index 6833f02..0000000
--- a/interfaces/ext/hdf5/H5IMpublic.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5IMpublic_H
-#define _H5IMpublic_H
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-H5_HLDLL herr_t  H5IMmake_image_8bit( hid_t loc_id,
-                            const char *dset_name,
-                            hsize_t width,
-                            hsize_t height,
-                            const unsigned char *buffer );
-
-H5_HLDLL herr_t  H5IMmake_image_24bit( hid_t loc_id,
-                             const char *dset_name,
-                             hsize_t width,
-                             hsize_t height,
-                             const char *interlace,
-                             const unsigned char *buffer );
-
-H5_HLDLL herr_t  H5IMget_image_info( hid_t loc_id,
-                     const char *dset_name,
-                     hsize_t *width,
-                     hsize_t *height,
-                     hsize_t *planes,
-                     char    *interlace,
-                     hssize_t *npals );
-
-H5_HLDLL herr_t  H5IMread_image( hid_t loc_id,
-                       const char *dset_name,
-                       unsigned char *buffer );
-
-H5_HLDLL herr_t  H5IMmake_palette( hid_t loc_id,
-                         const char *pal_name,
-                         const hsize_t *pal_dims,
-                         const unsigned char *pal_data );
-
-H5_HLDLL herr_t  H5IMlink_palette( hid_t loc_id,
-                        const char *image_name,
-                        const char *pal_name );
-
-H5_HLDLL herr_t  H5IMunlink_palette( hid_t loc_id,
-                           const char *image_name,
-                           const char *pal_name );
-
-H5_HLDLL herr_t  H5IMget_npalettes( hid_t loc_id,
-                          const char *image_name,
-                          hssize_t *npals );
-
-H5_HLDLL herr_t  H5IMget_palette_info( hid_t loc_id,
-                        const char *image_name,
-                        int pal_number,
-                        hsize_t *pal_dims );
-
-H5_HLDLL herr_t  H5IMget_palette( hid_t loc_id,
-                        const char *image_name,
-                        int pal_number,
-                        unsigned char *pal_data );
-
-H5_HLDLL herr_t  H5IMis_image( hid_t loc_id,
-                     const char *dset_name );
-
-H5_HLDLL herr_t  H5IMis_palette( hid_t loc_id,
-                     const char *dset_name );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/interfaces/ext/hdf5/H5IdComponent.h b/interfaces/ext/hdf5/H5IdComponent.h
deleted file mode 100644
index 7dc1da3..0000000
--- a/interfaces/ext/hdf5/H5IdComponent.h
+++ /dev/null
@@ -1,99 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _IdComponent_H
-#define _IdComponent_H
-
-// IdComponent represents an HDF5 object that has an identifier.
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class DataSpace;
-class H5_DLLCPP IdComponent {
-   public:
-	// Increment reference counter.
-	void incRefCount(const hid_t obj_id) const;
-	void incRefCount() const;
-
-	// Decrement reference counter.
-	void decRefCount(const hid_t obj_id) const;
-	void decRefCount() const;
-
-	// Get the reference counter to this identifier.
-	int getCounter(const hid_t obj_id) const;
-	int getCounter() const;
-
-	// Returns an HDF5 object type, given the object id.
-	static H5I_type_t getHDFObjType(const hid_t obj_id);
-
-	// Assignment operator.
-	IdComponent& operator=( const IdComponent& rhs );
-
-	// Gets the identifier of this object.
-	virtual hid_t getId () const = 0;
-
-	// Sets the identifier of this object to a new value.
-	void setId(const hid_t new_id);
-
-	// Creates an object to hold an HDF5 identifier.
-	IdComponent( const hid_t h5_id );
-
-	// Copy constructor: makes copy of the original IdComponent object.
-	IdComponent( const IdComponent& original );
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	// Pure virtual function for there are various H5*close for the
-	// subclasses.
-	virtual void close() = 0;
-
-	// Makes and returns the string "<class-name>::<func_name>";
-	// <class-name> is returned by fromClass().
-	H5std_string inMemFunc(const char* func_name) const;
-
-	///\brief Returns this class name.
-	virtual H5std_string fromClass() const { return("IdComponent");}
-
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
-	// Destructor
-	virtual ~IdComponent();
-
-   protected:
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-	// Default constructor.
-	IdComponent();
-
-	// Gets the name of the file, in which an HDF5 object belongs.
-	H5std_string p_get_file_name() const;
-
-	// Verifies that the given id is valid.
-	static bool p_valid_id(const hid_t obj_id);
-
-	// Sets the identifier of this object to a new value. - this one
-	// doesn't increment reference count
-	virtual void p_setId(const hid_t new_id) = 0;
-
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
-}; // end class IdComponent
-
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5Include.h b/interfaces/ext/hdf5/H5Include.h
deleted file mode 100644
index 87cb182..0000000
--- a/interfaces/ext/hdf5/H5Include.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#include <hdf5.h>
-
-// Define bool type for platforms that don't support bool yet
-#ifdef BOOL_NOTDEFINED
-#ifdef false
-#undef false
-#endif
-#ifdef true
-#undef true
-#endif
-typedef int bool;
-const bool  false = 0;
-const bool  true  = 1;
-#endif
diff --git a/interfaces/ext/hdf5/H5IntType.h b/interfaces/ext/hdf5/H5IntType.h
deleted file mode 100644
index 3557c04..0000000
--- a/interfaces/ext/hdf5/H5IntType.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5IntType_H
-#define _H5IntType_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP IntType : public AtomType {
-   public:
-	// Creates a integer type using a predefined type
-	IntType(const PredType& pred_type);
-
-	// Gets the integer datatype of the specified dataset
-	IntType(const DataSet& dataset);
-
-	// Retrieves the sign type for an integer type
-	H5T_sign_t getSign() const;
-
-	// Sets the sign proprety for an integer type.
-	void setSign( H5T_sign_t sign ) const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("IntType"); }
-
-	// Default constructor
-	IntType();
-
-	// Creates a integer datatype using an existing id
-	IntType(const hid_t existing_id);
-
-	// Copy constructor: makes copy of IntType object
-	IntType(const IntType& original);
-
-	// Noop destructor.
-	virtual ~IntType();
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5Ipublic.h b/interfaces/ext/hdf5/H5Ipublic.h
deleted file mode 100644
index d630556..0000000
--- a/interfaces/ext/hdf5/H5Ipublic.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This file contains function prototypes for each exported function in
- * the H5I module.
- */
-#ifndef _H5Ipublic_H
-#define _H5Ipublic_H
-
-/* Public headers needed by this file */
-#include "H5public.h"
-
-/*
- * Library type values.  Start with `1' instead of `0' because it makes the
- * tracing output look better when hid_t values are large numbers.  Change the
- * TYPE_BITS in H5I.c if the MAXID gets larger than 32 (an assertion will
- * fail otherwise).
- *
- * When adding types here, add a section to the 'misc19' test in test/tmisc.c
- * to verify that the H5I{inc|dec|get}_ref() routines work correctly with in.
- *
- */
-typedef enum H5I_type_t {
-    H5I_UNINIT		= (-2), /*uninitialized type			    */
-    H5I_BADID		= (-1),	/*invalid Type				    */
-    H5I_FILE		= 1,	/*type ID for File objects		    */
-    H5I_GROUP,		        /*type ID for Group objects		    */
-    H5I_DATATYPE,	        /*type ID for Datatype objects		    */
-    H5I_DATASPACE,	        /*type ID for Dataspace objects		    */
-    H5I_DATASET,	        /*type ID for Dataset objects		    */
-    H5I_ATTR,		        /*type ID for Attribute objects		    */
-    H5I_REFERENCE,	        /*type ID for Reference objects		    */
-    H5I_VFL,			/*type ID for virtual file layer	    */
-    H5I_GENPROP_CLS,            /*type ID for generic property list classes */
-    H5I_GENPROP_LST,            /*type ID for generic property lists        */
-    H5I_ERROR_CLASS,            /*type ID for error classes		    */
-    H5I_ERROR_MSG,              /*type ID for error messages		    */
-    H5I_ERROR_STACK,            /*type ID for error stacks		    */
-    H5I_NTYPES		        /*number of library types, MUST BE LAST!    */
-} H5I_type_t;
-
-/* Type of atoms to return to users */
-typedef int hid_t;
-#define H5_SIZEOF_HID_T         H5_SIZEOF_INT
-
-/* An invalid object ID. This is also negative for error return. */
-#define H5I_INVALID_HID         (-1)
-
-/*
- * Function for freeing objects. This function will be called with an object
- * ID type number and a pointer to the object. The function should free the
- * object and return non-negative to indicate that the object
- * can be removed from the ID type. If the function returns negative
- * (failure) then the object will remain in the ID type.
- */
-typedef herr_t (*H5I_free_t)(void*);
-
-/* Type of the function to compare objects & keys */
-typedef int (*H5I_search_func_t)(void *obj, hid_t id, void *key);
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Public API functions */
-
-H5_DLL hid_t H5Iregister(H5I_type_t type, const void *object);
-H5_DLL void *H5Iobject_verify(hid_t id, H5I_type_t id_type);
-H5_DLL void *H5Iremove_verify(hid_t id, H5I_type_t id_type);
-H5_DLL H5I_type_t H5Iget_type(hid_t id);
-H5_DLL hid_t H5Iget_file_id(hid_t id);
-H5_DLL ssize_t H5Iget_name(hid_t id, char *name/*out*/, size_t size);
-H5_DLL int H5Iinc_ref(hid_t id);
-H5_DLL int H5Idec_ref(hid_t id);
-H5_DLL int H5Iget_ref(hid_t id);
-H5_DLL H5I_type_t H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func);
-H5_DLL herr_t H5Iclear_type(H5I_type_t type, hbool_t force);
-H5_DLL herr_t H5Idestroy_type(H5I_type_t type);
-H5_DLL int H5Iinc_type_ref(H5I_type_t type);
-H5_DLL int H5Idec_type_ref(H5I_type_t type);
-H5_DLL int H5Iget_type_ref(H5I_type_t type);
-H5_DLL void *H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key);
-H5_DLL herr_t H5Inmembers(H5I_type_t type, hsize_t *num_members);
-H5_DLL htri_t H5Itype_exists(H5I_type_t type);
-H5_DLL htri_t H5Iis_valid(hid_t id);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _H5Ipublic_H */
-
diff --git a/interfaces/ext/hdf5/H5LTpublic.h b/interfaces/ext/hdf5/H5LTpublic.h
deleted file mode 100644
index 7fb873a..0000000
--- a/interfaces/ext/hdf5/H5LTpublic.h
+++ /dev/null
@@ -1,351 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5LTpublic_H
-#define _H5LTpublic_H
-
-typedef enum H5LT_lang_t {
-    H5LT_LANG_ERR = -1, /*this is the first*/
-    H5LT_DDL      = 0,  /*for DDL*/
-    H5LT_C        = 1,  /*for C*/
-    H5LT_FORTRAN  = 2,  /*for Fortran*/
-    H5LT_NO_LANG  = 3   /*this is the last*/
-} H5LT_lang_t;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*-------------------------------------------------------------------------
- *
- * Make dataset functions
- *
- *-------------------------------------------------------------------------
- */
-
-H5_HLDLL herr_t  H5LTmake_dataset( hid_t loc_id,
-                         const char *dset_name,
-                         int rank,
-                         const hsize_t *dims,
-                         hid_t type_id,
-                         const void *buffer );
-
-H5_HLDLL herr_t  H5LTmake_dataset_char( hid_t loc_id,
-                              const char *dset_name,
-                              int rank,
-                              const hsize_t *dims,
-                              const char *buffer );
-
-H5_HLDLL herr_t  H5LTmake_dataset_short( hid_t loc_id,
-                               const char *dset_name,
-                               int rank,
-                               const hsize_t *dims,
-                               const short *buffer );
-
-H5_HLDLL herr_t  H5LTmake_dataset_int( hid_t loc_id,
-                             const char *dset_name,
-                             int rank,
-                             const hsize_t *dims,
-                             const int *buffer );
-
-H5_HLDLL herr_t  H5LTmake_dataset_long( hid_t loc_id,
-                              const char *dset_name,
-                              int rank,
-                              const hsize_t *dims,
-                              const long *buffer );
-
-H5_HLDLL herr_t  H5LTmake_dataset_float( hid_t loc_id,
-                               const char *dset_name,
-                               int rank,
-                               const hsize_t *dims,
-                               const float *buffer );
-
-H5_HLDLL herr_t  H5LTmake_dataset_double( hid_t loc_id,
-                                const char *dset_name,
-                                int rank,
-                                const hsize_t *dims,
-                                const double *buffer );
-
-H5_HLDLL herr_t  H5LTmake_dataset_string( hid_t loc_id,
-                               const char *dset_name,
-                               const char *buf );
-
-
-/*-------------------------------------------------------------------------
- *
- * Read dataset functions
- *
- *-------------------------------------------------------------------------
- */
-
-H5_HLDLL herr_t  H5LTread_dataset( hid_t loc_id,
-                         const char *dset_name,
-                         hid_t type_id,
-                         void *buffer );
-
-H5_HLDLL herr_t  H5LTread_dataset_char( hid_t loc_id,
-                              const char *dset_name,
-                              char *buffer );
-
-H5_HLDLL herr_t  H5LTread_dataset_short( hid_t loc_id,
-                               const char *dset_name,
-                               short *buffer );
-
-H5_HLDLL herr_t  H5LTread_dataset_int( hid_t loc_id,
-                             const char *dset_name,
-                             int *buffer );
-
-H5_HLDLL herr_t  H5LTread_dataset_long( hid_t loc_id,
-                              const char *dset_name,
-                              long *buffer );
-
-H5_HLDLL herr_t  H5LTread_dataset_float( hid_t loc_id,
-                               const char *dset_name,
-                               float *buffer );
-
-H5_HLDLL herr_t  H5LTread_dataset_double( hid_t loc_id,
-                                const char *dset_name,
-                                double *buffer );
-
-H5_HLDLL herr_t  H5LTread_dataset_string( hid_t loc_id,
-                                const char *dset_name,
-                                char *buf );
-
-/*-------------------------------------------------------------------------
- *
- * Query dataset functions
- *
- *-------------------------------------------------------------------------
- */
-
-
-H5_HLDLL herr_t  H5LTget_dataset_ndims( hid_t loc_id,
-                             const char *dset_name,
-                             int *rank );
-
-H5_HLDLL herr_t  H5LTget_dataset_info( hid_t loc_id,
-                             const char *dset_name,
-                             hsize_t *dims,
-                             H5T_class_t *type_class,
-                             size_t *type_size );
-
-H5_HLDLL herr_t  H5LTfind_dataset( hid_t loc_id, const char *name );
-
-
-
-/*-------------------------------------------------------------------------
- *
- * Set attribute functions
- *
- *-------------------------------------------------------------------------
- */
-
-
-H5_HLDLL herr_t  H5LTset_attribute_string( hid_t loc_id,
-                                 const char *obj_name,
-                                 const char *attr_name,
-                                 const char *attr_data );
-
-H5_HLDLL herr_t  H5LTset_attribute_char( hid_t loc_id,
-                               const char *obj_name,
-                               const char *attr_name,
-                               const char *buffer,
-                               size_t size );
-
-H5_HLDLL herr_t  H5LTset_attribute_uchar( hid_t loc_id,
-                               const char *obj_name,
-                               const char *attr_name,
-                               const unsigned char *buffer,
-                               size_t size );
-
-H5_HLDLL herr_t  H5LTset_attribute_short( hid_t loc_id,
-                              const char *obj_name,
-                              const char *attr_name,
-                              const short *buffer,
-                              size_t size );
-
-H5_HLDLL herr_t  H5LTset_attribute_ushort( hid_t loc_id,
-                              const char *obj_name,
-                              const char *attr_name,
-                              const unsigned short *buffer,
-                              size_t size );
-
-H5_HLDLL herr_t  H5LTset_attribute_int( hid_t loc_id,
-                              const char *obj_name,
-                              const char *attr_name,
-                              const int *buffer,
-                              size_t size );
-
-H5_HLDLL herr_t  H5LTset_attribute_uint( hid_t loc_id,
-                              const char *obj_name,
-                              const char *attr_name,
-                              const unsigned int *buffer,
-                              size_t size );
-
-H5_HLDLL herr_t  H5LTset_attribute_long( hid_t loc_id,
-                               const char *obj_name,
-                               const char *attr_name,
-                               const long *buffer,
-                               size_t size );
-
-H5_HLDLL herr_t  H5LTset_attribute_long_long( hid_t loc_id,
-                               const char *obj_name,
-                               const char *attr_name,
-                               const long long *buffer,
-                               size_t size );
-
-H5_HLDLL herr_t  H5LTset_attribute_ulong( hid_t loc_id,
-                               const char *obj_name,
-                               const char *attr_name,
-                               const unsigned long *buffer,
-                               size_t size );
-
-H5_HLDLL herr_t  H5LTset_attribute_float( hid_t loc_id,
-                                const char *obj_name,
-                                const char *attr_name,
-                                const float *buffer,
-                                size_t size );
-
-H5_HLDLL herr_t  H5LTset_attribute_double( hid_t loc_id,
-                                 const char *obj_name,
-                                 const char *attr_name,
-                                 const double *buffer,
-                                 size_t size );
-
-/*-------------------------------------------------------------------------
- *
- * Get attribute functions
- *
- *-------------------------------------------------------------------------
- */
-
-H5_HLDLL herr_t  H5LTget_attribute( hid_t loc_id,
-                          const char *obj_name,
-                          const char *attr_name,
-                          hid_t mem_type_id,
-                          void *data );
-
-H5_HLDLL herr_t  H5LTget_attribute_string( hid_t loc_id,
-                                 const char *obj_name,
-                                 const char *attr_name,
-                                 char *data );
-
-H5_HLDLL herr_t  H5LTget_attribute_char( hid_t loc_id,
-                               const char *obj_name,
-                               const char *attr_name,
-                               char *data );
-
-H5_HLDLL herr_t  H5LTget_attribute_uchar( hid_t loc_id,
-                               const char *obj_name,
-                               const char *attr_name,
-                               unsigned char *data );
-
-H5_HLDLL herr_t  H5LTget_attribute_short( hid_t loc_id,
-                                const char *obj_name,
-                                const char *attr_name,
-                                short *data );
-
-H5_HLDLL herr_t  H5LTget_attribute_ushort( hid_t loc_id,
-                                const char *obj_name,
-                                const char *attr_name,
-                                unsigned short *data );
-
-H5_HLDLL herr_t  H5LTget_attribute_int( hid_t loc_id,
-                              const char *obj_name,
-                              const char *attr_name,
-                              int *data );
-
-H5_HLDLL herr_t  H5LTget_attribute_uint( hid_t loc_id,
-                              const char *obj_name,
-                              const char *attr_name,
-                              unsigned int *data );
-
-H5_HLDLL herr_t  H5LTget_attribute_long( hid_t loc_id,
-                               const char *obj_name,
-                               const char *attr_name,
-                               long *data );
-
-H5_HLDLL herr_t  H5LTget_attribute_long_long( hid_t loc_id,
-                               const char *obj_name,
-                               const char *attr_name,
-                               long long *data );
-
-H5_HLDLL herr_t  H5LTget_attribute_ulong( hid_t loc_id,
-                               const char *obj_name,
-                               const char *attr_name,
-                               unsigned long *data );
-
-H5_HLDLL herr_t  H5LTget_attribute_float( hid_t loc_id,
-                                const char *obj_name,
-                                const char *attr_name,
-                                float *data );
-
-H5_HLDLL herr_t  H5LTget_attribute_double( hid_t loc_id,
-                                 const char *obj_name,
-                                 const char *attr_name,
-                                 double *data );
-
-
-/*-------------------------------------------------------------------------
- *
- * Query attribute functions
- *
- *-------------------------------------------------------------------------
- */
-
-
-H5_HLDLL herr_t  H5LTget_attribute_ndims( hid_t loc_id,
-                                const char *obj_name,
-                                const char *attr_name,
-                                int *rank );
-
-H5_HLDLL herr_t  H5LTget_attribute_info( hid_t loc_id,
-                               const char *obj_name,
-                               const char *attr_name,
-                               hsize_t *dims,
-                               H5T_class_t *type_class,
-                               size_t *type_size );
-
-
-
-
-
-/*-------------------------------------------------------------------------
- *
- * General functions
- *
- *-------------------------------------------------------------------------
- */
-
-H5_HLDLL hid_t H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type);
-H5_HLDLL herr_t H5LTdtype_to_text(hid_t dtype, char *str, H5LT_lang_t lang_type, size_t *len);
-
-
-/*-------------------------------------------------------------------------
- *
- * Utility functions
- *
- *-------------------------------------------------------------------------
- */
-
-H5_HLDLL herr_t  H5LTfind_attribute( hid_t loc_id, const char *name );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/interfaces/ext/hdf5/H5Library.h b/interfaces/ext/hdf5/H5Library.h
deleted file mode 100644
index a3e1c99..0000000
--- a/interfaces/ext/hdf5/H5Library.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5Library_H
-#define _H5Library_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-#define NOTATEXIT       (-10)   // just in case the HDF5 library use more
-	// negative constants. Note: the solution used for the atexit/global
-	// destructors is not reliable, and desperately needs improvement
-	// It is not even working, inifiteloop message still printed when
-	// calling H5close
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
-class H5_DLLCPP H5Library {
-   public:
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	static bool need_cleanup; // indicates if H5close should be called
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
-	// Initializes the HDF5 library.
-	static void open();
-
-	// Flushes all data to disk, closes files, and cleans up memory.
-	static void close();
-
-	// Instructs library not to install atexit cleanup routine
-	static void dontAtExit();
-
-	// Returns the HDF library release number.
-	static void getLibVersion( unsigned& majnum, unsigned& minnum, unsigned& relnum );
-
-	// Verifies that the arguments match the version numbers compiled
-	// into the library
-	static void checkVersion( unsigned majnum, unsigned minnum, unsigned relnum );
-
-	// Walks through all the garbage collection routines for the library,
-	// which are supposed to free any unused memory they have allocated.
-	static void garbageCollect();
-
-	// Sets limits on the different kinds of free lists.
-	static void setFreeListLimits(int reg_global_lim, int reg_list_lim, int
-	arr_global_lim, int arr_list_lim, int blk_global_lim, int blk_list_lim);
-
-   private:
-	// Default constructor - no instance ever created
-	H5Library() {};
-
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5Lpublic.h b/interfaces/ext/hdf5/H5Lpublic.h
deleted file mode 100644
index 620d2e9..0000000
--- a/interfaces/ext/hdf5/H5Lpublic.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*-------------------------------------------------------------------------
- *
- * Created:             H5Lpublic.h
- *                      Dec 1 2005
- *                      James Laird
- *
- * Purpose:             Public declarations for the H5L package (links)
- *
- *-------------------------------------------------------------------------
- */
-#ifndef _H5Lpublic_H
-#define _H5Lpublic_H
-
-/* Public headers needed by this file */
-#include "H5public.h"		/* Generic Functions			*/
-#include "H5Ipublic.h"		/* IDs			  		*/
-#include "H5Tpublic.h"		/* Datatypes				*/
-
-/*****************/
-/* Public Macros */
-/*****************/
-
-/* Maximum length of a link's name */
-/* (encoded in a 32-bit unsigned integer) */
-#define H5L_MAX_LINK_NAME_LEN   ((uint32_t)(-1))  /* (4GB - 1) */
-
-/* Macro to indicate operation occurs on same location */
-#define H5L_SAME_LOC 0
-
-/* Current version of the H5L_class_t struct */
-#define H5L_LINK_CLASS_T_VERS 0
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*******************/
-/* Public Typedefs */
-/*******************/
-
-/* Link class types.
- * Values less than 64 are reserved for the HDF5 library's internal use.
- * Values 64 to 255 are for "user-defined" link class types; these types are
- * defined by HDF5 but their behavior can be overridden by users.
- * Users who want to create new classes of links should contact the HDF5
- * development team at hdfhelp at ncsa.uiuc.edu .
- * These values can never change because they appear in HDF5 files.
- */
-typedef enum {
-    H5L_TYPE_ERROR = (-1),      /* Invalid link type id         */
-    H5L_TYPE_HARD = 0,          /* Hard link id                 */
-    H5L_TYPE_SOFT = 1,          /* Soft link id                 */
-    H5L_TYPE_EXTERNAL = 64,     /* External link id             */
-    H5L_TYPE_MAX = 255	        /* Maximum link type id         */
-} H5L_type_t;
-#define H5L_TYPE_BUILTIN_MAX H5L_TYPE_SOFT      /* Maximum value link value for "built-in" link types */
-#define H5L_TYPE_UD_MIN      H5L_TYPE_EXTERNAL  /* Link ids at or above this value are "user-defined" link types. */
-
-/* Information struct for link (for H5Lget_info/H5Lget_info_by_idx) */
-typedef struct {
-    H5L_type_t          type;           /* Type of link                   */
-    hbool_t             corder_valid;   /* Indicate if creation order is valid */
-    int64_t             corder;         /* Creation order                 */
-    H5T_cset_t          cset;           /* Character set of link name     */
-    union {
-        haddr_t         address;        /* Address hard link points to    */
-        size_t          val_size;       /* Size of a soft link or UD link value */
-    } u;
-} H5L_info_t;
-
-/* The H5L_class_t struct can be used to override the behavior of a
- * "user-defined" link class. Users should populate the struct with callback
- * functions defined below.
- */
-/* Callback prototypes for user-defined links */
-/* Link creation callback */
-typedef herr_t (*H5L_create_func_t)(const char *link_name, hid_t loc_group,
-    const void *lnkdata, size_t lnkdata_size, hid_t lcpl_id);
-
-/* Callback for when the link is moved */
-typedef herr_t (*H5L_move_func_t)(const char *new_name, hid_t new_loc,
-    const void *lnkdata, size_t lnkdata_size);
-
-/* Callback for when the link is copied */
-typedef herr_t (*H5L_copy_func_t)(const char *new_name, hid_t new_loc,
-    const void *lnkdata, size_t lnkdata_size);
-
-/* Callback during link traversal */
-typedef herr_t (*H5L_traverse_func_t)(const char *link_name, hid_t cur_group,
-    const void *lnkdata, size_t lnkdata_size, hid_t lapl_id);
-
-/* Callback for when the link is deleted */
-typedef herr_t (*H5L_delete_func_t)(const char *link_name, hid_t file,
-    const void *lnkdata, size_t lnkdata_size);
-
-/* Callback for querying the link */
-/* Returns the size of the buffer needed */
-typedef ssize_t (*H5L_query_func_t)(const char *link_name, const void *lnkdata,
-    size_t lnkdata_size, void *buf /*out*/, size_t buf_size);
-
-/* User-defined link types */
-typedef struct {
-    int version;                    /* Version number of this struct        */
-    H5L_type_t id;                  /* Link type ID                         */
-    const char *comment;            /* Comment for debugging                */
-    H5L_create_func_t create_func;  /* Callback during link creation        */
-    H5L_move_func_t move_func;      /* Callback after moving link           */
-    H5L_copy_func_t copy_func;      /* Callback after copying link          */
-    H5L_traverse_func_t trav_func;  /* Callback during link traversal       */
-    H5L_delete_func_t del_func;     /* Callback for link deletion           */
-    H5L_query_func_t query_func;    /* Callback for queries                 */
-} H5L_class_t;
-
-/* Prototype for H5Literate/H5Literate_by_name() operator */
-typedef herr_t (*H5L_iterate_t)(hid_t group, const char *name, const H5L_info_t *info,
-    void *op_data);
-
-/* Callback for external link traversal */
-typedef herr_t (*H5L_elink_traverse_t)(const char *parent_file_name,
-    const char *parent_group_name, const char *child_file_name,
-    const char *child_object_name, unsigned *acc_flags, hid_t fapl_id,
-    void *op_data);
-
-
-/********************/
-/* Public Variables */
-/********************/
-
-
-/*********************/
-/* Public Prototypes */
-/*********************/
-H5_DLL herr_t H5Lmove(hid_t src_loc, const char *src_name, hid_t dst_loc,
-    const char *dst_name, hid_t lcpl_id, hid_t lapl_id);
-H5_DLL herr_t H5Lcopy(hid_t src_loc, const char *src_name, hid_t dst_loc,
-    const char *dst_name, hid_t lcpl_id, hid_t lapl_id);
-H5_DLL herr_t H5Lcreate_hard(hid_t cur_loc, const char *cur_name,
-    hid_t dst_loc, const char *dst_name, hid_t lcpl_id, hid_t lapl_id);
-H5_DLL herr_t H5Lcreate_soft(const char *link_target, hid_t link_loc_id,
-    const char *link_name, hid_t lcpl_id, hid_t lapl_id);
-H5_DLL herr_t H5Ldelete(hid_t loc_id, const char *name, hid_t lapl_id);
-H5_DLL herr_t H5Ldelete_by_idx(hid_t loc_id, const char *group_name,
-    H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id);
-H5_DLL herr_t H5Lget_val(hid_t loc_id, const char *name, void *buf/*out*/,
-    size_t size, hid_t lapl_id);
-H5_DLL herr_t H5Lget_val_by_idx(hid_t loc_id, const char *group_name,
-    H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
-    void *buf/*out*/, size_t size, hid_t lapl_id);
-H5_DLL htri_t H5Lexists(hid_t loc_id, const char *name, hid_t lapl_id);
-H5_DLL herr_t H5Lget_info(hid_t loc_id, const char *name,
-    H5L_info_t *linfo /*out*/, hid_t lapl_id);
-H5_DLL herr_t H5Lget_info_by_idx(hid_t loc_id, const char *group_name,
-    H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
-    H5L_info_t *linfo /*out*/, hid_t lapl_id);
-H5_DLL ssize_t H5Lget_name_by_idx(hid_t loc_id, const char *group_name,
-    H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
-    char *name /*out*/, size_t size, hid_t lapl_id);
-H5_DLL herr_t H5Literate(hid_t grp_id, H5_index_t idx_type,
-    H5_iter_order_t order, hsize_t *idx, H5L_iterate_t op, void *op_data);
-H5_DLL herr_t H5Literate_by_name(hid_t loc_id, const char *group_name,
-    H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx,
-    H5L_iterate_t op, void *op_data, hid_t lapl_id);
-H5_DLL herr_t H5Lvisit(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order,
-    H5L_iterate_t op, void *op_data);
-H5_DLL herr_t H5Lvisit_by_name(hid_t loc_id, const char *group_name,
-    H5_index_t idx_type, H5_iter_order_t order, H5L_iterate_t op,
-    void *op_data, hid_t lapl_id);
-
-/* UD link functions */
-H5_DLL herr_t H5Lcreate_ud(hid_t link_loc_id, const char *link_name,
-    H5L_type_t link_type, const void *udata, size_t udata_size, hid_t lcpl_id,
-    hid_t lapl_id);
-H5_DLL herr_t H5Lregister(const H5L_class_t *cls);
-H5_DLL herr_t H5Lunregister(H5L_type_t id);
-H5_DLL htri_t H5Lis_registered(H5L_type_t id);
-
-/* External link functions */
-H5_DLL herr_t H5Lunpack_elink_val(const void *ext_linkval/*in*/, size_t link_size,
-   unsigned *flags, const char **filename/*out*/, const char **obj_path /*out*/);
-H5_DLL herr_t H5Lcreate_external(const char *file_name, const char *obj_name,
-    hid_t link_loc_id, const char *link_name, hid_t lcpl_id, hid_t lapl_id);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _H5Lpublic_H */
-
diff --git a/interfaces/ext/hdf5/H5MMpublic.h b/interfaces/ext/hdf5/H5MMpublic.h
deleted file mode 100644
index bfcb807..0000000
--- a/interfaces/ext/hdf5/H5MMpublic.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*-------------------------------------------------------------------------
- *
- * Created:             H5MMproto.h
- *                      Jul 10 1997
- *                      Robb Matzke <matzke at llnl.gov>
- *
- * Purpose:             Public declarations for the H5MM (memory management)
- *                      package.
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-#ifndef _H5MMpublic_H
-#define _H5MMpublic_H
-
-/* Public headers needed by this file */
-#include "H5public.h"
-
-/* These typedefs are currently used for VL datatype allocation/freeing */
-typedef void *(*H5MM_allocate_t)(size_t size, void *alloc_info);
-typedef void (*H5MM_free_t)(void *mem, void *free_info);
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _H5MMpublic_H */
-
diff --git a/interfaces/ext/hdf5/H5Object.h b/interfaces/ext/hdf5/H5Object.h
deleted file mode 100644
index 4ac417b..0000000
--- a/interfaces/ext/hdf5/H5Object.h
+++ /dev/null
@@ -1,133 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5Object_H
-#define _H5Object_H
-
-#include "H5Classes.h"		// constains forward class declarations
-
-// H5Object is a baseclass.  It has these subclasses:
-// Group, DataSet, and DataType.
-// DataType, in turn, has several specific datatypes as subclasses.
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-class H5_DLLCPP H5Object;  // forward declaration for UserData4Aiterate
-
-// Define the operator function pointer for H5Aiterate().
-typedef void (*attr_operator_t)( H5Object& loc/*in*/,
-				 const H5std_string attr_name/*in*/,
-				 void *operator_data/*in,out*/);
-
-class UserData4Aiterate { // user data for attribute iteration
-   public:
-	attr_operator_t op;
-	void* opData;
-	H5Object* object;
-};
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
-// The above part is being moved into Iterator, but not completed
-
-class H5_DLLCPP H5Object : public IdComponent {
-   public:
-	// Creates an attribute for a group, dataset, or named datatype.
-	// PropList is currently not used, so always be default.
-	Attribute createAttribute( const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
-	Attribute createAttribute( const H5std_string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
-
-	// Opens an attribute given its name.
-	Attribute openAttribute( const char* name ) const;
-	Attribute openAttribute( const H5std_string& name ) const;
-
-	// Opens an attribute given its index.
-	Attribute openAttribute( const unsigned int idx ) const;
-
-	// Flushes all buffers associated with this object to disk
-	void flush( H5F_scope_t scope ) const;
-
-	// Gets the name of the file, in which this HDF5 object belongs.
-	H5std_string getFileName() const;
-
-	// Determines the number of attributes attached to this object.
-	int getNumAttrs() const;
-
-	// Iterate user's function over the attributes of this object
-	int iterateAttrs( attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL );
-
-	// Removes the named attribute from this object.
-	void removeAttr( const char* name ) const;
-	void removeAttr( const H5std_string& name ) const;
-
-	// Renames the attribute to a new name.
-	void renameAttr(const char* oldname, const char* newname) const;
-	void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
-
-	// Creates a reference to a named Hdf5 object or to a dataset region
-	// in this object.
-	void reference(void* ref, const char* name, const DataSpace& dataspace,
-			H5R_type_t ref_type = H5R_DATASET_REGION) const;
-	void reference(void* ref, const char* name) const;
-	void reference(void* ref, const H5std_string& name) const;
-
-	// Open a referenced HDF5 object whose location is specified by either
-	// a file, an HDF5 object, or an attribute.
-	void dereference(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
-	void dereference(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
-	void dereference(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
-
-	// Copy constructor: makes copy of an H5Object object.
-	H5Object(const H5Object& original);
-
-	// Noop destructor.
-	virtual ~H5Object();
-
-   protected:
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	// Default constructor
-	H5Object();
-
-	// Creates a copy of an existing object giving the object id
-	H5Object( const hid_t object_id );
-
-	// Gets the id of the H5 file in which the given object is located.
-	hid_t p_get_file_id();
-
-	// Creates a reference to an HDF5 object or a dataset region.
-	void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
-
-	// Dereferences a ref into an hdf5 id.
-	hid_t p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type);
-
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-	// Retrieves the type of object that an object reference points to.
-	H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-	// Retrieves a dataspace with the region pointed to selected.
-	hid_t p_get_region(void *ref, H5R_type_t ref_type) const;
-
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
-}; /* end class H5Object */
-
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5Opublic.h b/interfaces/ext/hdf5/H5Opublic.h
deleted file mode 100644
index c5ae3c1..0000000
--- a/interfaces/ext/hdf5/H5Opublic.h
+++ /dev/null
@@ -1,203 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*-------------------------------------------------------------------------
- *
- * Created:             H5Opublic.h
- *                      Aug  5 1997
- *                      Robb Matzke <matzke at llnl.gov>
- *
- * Purpose:             Public declarations for the H5O (object header)
- *                      package.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef _H5Opublic_H
-#define _H5Opublic_H
-
-/* Public headers needed by this file */
-#include "H5public.h"		/* Generic Functions			*/
-#include "H5Ipublic.h"		/* IDs			  		*/
-#include "H5Lpublic.h"		/* Links		  		*/
-
-/*****************/
-/* Public Macros */
-/*****************/
-
-/* Flags for object copy (H5Ocopy) */
-#define H5O_COPY_SHALLOW_HIERARCHY_FLAG (0x0001u)   /* Copy only immediate members */
-#define H5O_COPY_EXPAND_SOFT_LINK_FLAG  (0x0002u)   /* Expand soft links into new objects */
-#define H5O_COPY_EXPAND_EXT_LINK_FLAG   (0x0004u)   /* Expand external links into new objects */
-#define H5O_COPY_EXPAND_REFERENCE_FLAG	(0x0008u)   /* Copy objects that are pointed by references */
-#define H5O_COPY_WITHOUT_ATTR_FLAG      (0x0010u)   /* Copy object without copying attributes */
-#define H5O_COPY_PRESERVE_NULL_FLAG     (0x0020u)   /* Copy NULL messages (empty space) */
-#define H5O_COPY_ALL                    (0x003Fu)   /* All object copying flags (for internal checking) */
-
-/* Flags for shared message indexes.
- * Pass these flags in using the mesg_type_flags parameter in
- * H5P_set_shared_mesg_index.
- * (Developers: These flags correspond to object header message type IDs,
- * but we need to assign each kind of message to a different bit so that
- * one index can hold multiple types.)
- */
-#define H5O_SHMESG_NONE_FLAG    0x0000          /* No shared messages */
-#define H5O_SHMESG_SDSPACE_FLAG ((unsigned)1 << 0x0001) /* Simple Dataspace Message.  */
-#define H5O_SHMESG_DTYPE_FLAG   ((unsigned)1 << 0x0003) /* Datatype Message.  */
-#define H5O_SHMESG_FILL_FLAG    ((unsigned)1 << 0x0005) /* Fill Value Message. */
-#define H5O_SHMESG_PLINE_FLAG   ((unsigned)1 << 0x000b) /* Filter pipeline message.  */
-#define H5O_SHMESG_ATTR_FLAG    ((unsigned)1 << 0x000c) /* Attribute Message.  */
-#define H5O_SHMESG_ALL_FLAG     (H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_FILL_FLAG | H5O_SHMESG_PLINE_FLAG | H5O_SHMESG_ATTR_FLAG)
-
-/* Object header status flag definitions */
-#define H5O_HDR_CHUNK0_SIZE             0x03    /* 2-bit field indicating # of bytes to store the size of chunk 0's data */
-#define H5O_HDR_ATTR_CRT_ORDER_TRACKED  0x04    /* Attribute creation order is tracked */
-#define H5O_HDR_ATTR_CRT_ORDER_INDEXED  0x08    /* Attribute creation order has index */
-#define H5O_HDR_ATTR_STORE_PHASE_CHANGE 0x10    /* Non-default attribute storage phase change values stored */
-#define H5O_HDR_STORE_TIMES             0x20    /* Store access, modification, change & birth times for object */
-#define H5O_HDR_ALL_FLAGS       (H5O_HDR_CHUNK0_SIZE | H5O_HDR_ATTR_CRT_ORDER_TRACKED | H5O_HDR_ATTR_CRT_ORDER_INDEXED | H5O_HDR_ATTR_STORE_PHASE_CHANGE | H5O_HDR_STORE_TIMES)
-
-/* Maximum shared message values.  Number of indexes is 8 to allow room to add
- * new types of messages.
- */
-#define H5O_SHMESG_MAX_NINDEXES 8
-#define H5O_SHMESG_MAX_LIST_SIZE 5000
-
-/*******************/
-/* Public Typedefs */
-/*******************/
-
-/* Types of objects in file */
-typedef enum H5O_type_t {
-    H5O_TYPE_UNKNOWN = -1,	/* Unknown object type		*/
-    H5O_TYPE_GROUP,	        /* Object is a group		*/
-    H5O_TYPE_DATASET,		/* Object is a dataset		*/
-    H5O_TYPE_NAMED_DATATYPE, 	/* Object is a named data type	*/
-    H5O_TYPE_NTYPES             /* Number of different object types (must be last!) */
-} H5O_type_t;
-
-/* Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx) */
-typedef struct H5O_hdr_info_t {
-    unsigned version;		/* Version number of header format in file */
-    unsigned nmesgs;		/* Number of object header messages */
-    unsigned nchunks;		/* Number of object header chunks */
-    unsigned flags;             /* Object header status flags */
-    struct {
-        hsize_t total;		/* Total space for storing object header in file */
-        hsize_t meta;		/* Space within header for object header metadata information */
-        hsize_t mesg;		/* Space within header for actual message information */
-        hsize_t free;		/* Free space within object header */
-    } space;
-    struct {
-        uint64_t present;	/* Flags to indicate presence of message type in header */
-        uint64_t shared;	/* Flags to indicate message type is shared in header */
-    } mesg;
-} H5O_hdr_info_t;
-
-/* Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx) */
-typedef struct H5O_info_t {
-    unsigned long 	fileno;		/* File number that object is located in */
-    haddr_t 		addr;		/* Object address in file	*/
-    H5O_type_t 		type;		/* Basic object type (group, dataset, etc.) */
-    unsigned 		rc;		/* Reference count of object    */
-    time_t		atime;		/* Access time			*/
-    time_t		mtime;		/* Modification time		*/
-    time_t		ctime;		/* Change time			*/
-    time_t		btime;		/* Birth time			*/
-    hsize_t 		num_attrs;	/* # of attributes attached to object */
-    H5O_hdr_info_t      hdr;            /* Object header information */
-    /* Extra metadata storage for obj & attributes */
-    struct {
-        H5_ih_info_t   obj;             /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
-        H5_ih_info_t   attr;            /* v2 B-tree & heap for attributes */
-    } meta_size;
-} H5O_info_t;
-
-/* Typedef for message creation indexes */
-typedef uint32_t H5O_msg_crt_idx_t;
-
-/* Prototype for H5Ovisit/H5Ovisit_by_name() operator */
-typedef herr_t (*H5O_iterate_t)(hid_t obj, const char *name, const H5O_info_t *info,
-    void *op_data);
-
-
-/********************/
-/* Public Variables */
-/********************/
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************/
-/* Public Prototypes */
-/*********************/
-H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id);
-H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr);
-H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name,
-    H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id);
-H5_DLL htri_t H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id);
-H5_DLL herr_t H5Oget_info(hid_t loc_id, H5O_info_t *oinfo);
-H5_DLL herr_t H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo,
-    hid_t lapl_id);
-H5_DLL herr_t H5Oget_info_by_idx(hid_t loc_id, const char *group_name,
-    H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo,
-    hid_t lapl_id);
-H5_DLL herr_t H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name,
-    hid_t lcpl_id, hid_t lapl_id);
-H5_DLL herr_t H5Oincr_refcount(hid_t object_id);
-H5_DLL herr_t H5Odecr_refcount(hid_t object_id);
-H5_DLL herr_t H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
-    const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id);
-H5_DLL herr_t H5Oset_comment(hid_t obj_id, const char *comment);
-H5_DLL herr_t H5Oset_comment_by_name(hid_t loc_id, const char *name,
-    const char *comment, hid_t lapl_id);
-H5_DLL ssize_t H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize);
-H5_DLL ssize_t H5Oget_comment_by_name(hid_t loc_id, const char *name,
-    char *comment, size_t bufsize, hid_t lapl_id);
-H5_DLL herr_t H5Ovisit(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
-    H5O_iterate_t op, void *op_data);
-H5_DLL herr_t H5Ovisit_by_name(hid_t loc_id, const char *obj_name,
-    H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op,
-    void *op_data, hid_t lapl_id);
-H5_DLL herr_t H5Oclose(hid_t object_id);
-
-/* Symbols defined for compatibility with previous versions of the HDF5 API.
- *
- * Use of these symbols is deprecated.
- */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-
-/* Macros */
-
-/* Typedefs */
-
-/* A struct that's part of the H5G_stat_t routine (deprecated) */
-typedef struct H5O_stat_t {
-    hsize_t size;               /* Total size of object header in file */
-    hsize_t free;               /* Free space within object header */
-    unsigned nmesgs;            /* Number of object header messages */
-    unsigned nchunks;           /* Number of object header chunks */
-} H5O_stat_t;
-
-/* Function prototypes */
-
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _H5Opublic_H */
-
diff --git a/interfaces/ext/hdf5/H5PTpublic.h b/interfaces/ext/hdf5/H5PTpublic.h
deleted file mode 100644
index f919010..0000000
--- a/interfaces/ext/hdf5/H5PTpublic.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5PTpublic_H
-#define _H5PTpublic_H
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*-------------------------------------------------------------------------
- *
- * Create/Open/Close functions
- *
- *-------------------------------------------------------------------------
- */
-
-H5_HLDLL hid_t H5PTcreate_fl ( hid_t loc_id,
-                      const char *dset_name,
-                      hid_t dtype_id,
-                      hsize_t chunk_size,
-                      int compression );
-
-#ifdef VLPT_REMOVED
-H5_HLDLL hid_t H5PTcreate_vl ( hid_t loc_id,
-                      const char *dset_name,
-                      hsize_t chunk_size );
-#endif /* VLPT_REMOVED */
-
-H5_HLDLL hid_t H5PTopen( hid_t loc_id,
-                const char *dset_name );
-
-H5_HLDLL herr_t  H5PTclose( hid_t table_id );
-
-
-/*-------------------------------------------------------------------------
- *
- * Write functions
- *
- *-------------------------------------------------------------------------
- */
-
-H5_HLDLL herr_t  H5PTappend( hid_t table_id,
-                   size_t nrecords,
-                   const void * data );
-
-/*-------------------------------------------------------------------------
- *
- * Read functions
- *
- *-------------------------------------------------------------------------
- */
-
-
-H5_HLDLL herr_t  H5PTget_next( hid_t table_id,
-                     size_t nrecords,
-                     void * data );
-
-H5_HLDLL herr_t  H5PTread_packets( hid_t table_id,
-                         hsize_t start,
-                         size_t nrecords,
-                         void *data );
-
-/*-------------------------------------------------------------------------
- *
- * Inquiry functions
- *
- *-------------------------------------------------------------------------
- */
-
-
-H5_HLDLL herr_t  H5PTget_num_packets( hid_t table_id,
-                            hsize_t *nrecords );
-
-H5_HLDLL herr_t  H5PTis_valid( hid_t table_id );
-
-#ifdef VLPT_REMOVED
-H5_HLDLL herr_t  H5PTis_varlen( hid_t table_id );
-#endif /* VLPT_REMOVED */
-
-/*-------------------------------------------------------------------------
- *
- * Packet Table "current index" functions
- *
- *-------------------------------------------------------------------------
- */
-
-H5_HLDLL herr_t  H5PTcreate_index( hid_t table_id );
-
-H5_HLDLL herr_t  H5PTset_index( hid_t table_id,
-                             hsize_t pt_index );
-
-H5_HLDLL herr_t  H5PTget_index( hid_t table_id,
-                             hsize_t *pt_index );
-
-/*-------------------------------------------------------------------------
- *
- * Memory Management functions
- *
- *-------------------------------------------------------------------------
- */
-
-#ifdef VLPT_REMOVED
-H5_HLDLL herr_t  H5PTfree_vlen_readbuff( hid_t table_id,
-                               size_t bufflen,
-                               void * buff );
-#endif /* VLPT_REMOVED */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/interfaces/ext/hdf5/H5PacketTable.h b/interfaces/ext/hdf5/H5PacketTable.h
deleted file mode 100644
index 5f9a213..0000000
--- a/interfaces/ext/hdf5/H5PacketTable.h
+++ /dev/null
@@ -1,244 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* Packet Table wrapper classes
- *
- * Wraps the H5PT Packet Table C functions in C++ objects
- *
- * Nat Furrer and James Laird
- * February 2004
- */
-
-#ifndef H5PTWRAP_H
-#define H5PTWRAP_H
-
-/* Public HDF5 header */
-#include "hdf5.h"
-
-#include "H5PTpublic.h"
-#include "H5api_adpt.h"
-
-class H5_HLCPPDLL  PacketTable
-{
-public:
-    /* Null constructor
-     * Sets table_id to "invalid"
-     */
-    PacketTable() {table_id = H5I_BADID;}
-
-    /* "Open" Constructor
-     * Opens an existing packet table, which can contain either fixed-length or
-     * variable-length packets.
-     */
-    PacketTable(hid_t fileID, char* name);
-
-    /* Destructor
-     * Cleans up the packet table
-     */
-    ~PacketTable();
-
-    /* IsValid
-     * Returns true if this packet table is valid, false otherwise.
-     * Use this after the constructor to ensure HDF did not have
-     * any trouble making or opening the packet table.
-     */
-    bool IsValid();
-
-#ifdef VLPT_REMOVED
-    /* IsVariableLength
-     * Return 1 if this packet table is a Variable Length packet table,
-     * return 0 if it is Fixed Length.  Returns -1 if the table is
-     * invalid (not open).
-     */
-    int IsVariableLength();
-#endif /* VLPT_REMOVED */
-
-    /* ResetIndex
-     * Sets the "current packet" index to point to the first packet in the
-     * packet table
-     */
-    void ResetIndex();
-
-    /* SetIndex
-     * Sets the current packet to point to the packet specified by index.
-     * Returns 0 on success, negative on failure (if index is out of bounds)
-     */
-    int SetIndex(hsize_t index);
-
-    /* GetIndex
-     * Returns the position of the current packet.
-     * On failure, returns 0 and error is set to negative.
-     */
-    hsize_t GetIndex(int& error);
-
-    /* GetPacketCount
-     * Returns the number of packets in the packet table.  Error
-     * is set to 0 on success.  On failure, returns 0 and
-     * error is set to negative.
-     */
-    hsize_t GetPacketCount(int& error);
-
-    hsize_t GetPacketCount()
-    {
-        int ignoreError;
-        return GetPacketCount(ignoreError);
-    }
-
-protected:
-    hid_t table_id;
-};
-
-class H5_HLCPPDLL FL_PacketTable : virtual public PacketTable
-{
-public:
-    /* Constructor
-     * Creates a packet table in which to store fixed length packets.
-     * Takes the ID of the file the packet table will be created in, the name of
-     * the packet table, the ID of the datatype of the set, the size
-     * of a memory chunk used in chunking, and the desired compression level
-     * (0-9, or -1 for no compression).
-     */
-    FL_PacketTable(hid_t fileID, char* name, hid_t dtypeID, hsize_t chunkSize, int compression = -1);
-
-    /* "Open" Constructor
-     * Opens an existing fixed-length packet table.
-     * Fails if the packet table specified is variable-length.
-     */
-    FL_PacketTable(hid_t fileID, char* name);
-
-    /* AppendPacket
-     * Adds a single packet to the packet table.  Takes a pointer
-     * to the location of the data in memory.
-     * Returns 0 on success, negative on failure
-     */
-    int AppendPacket(void * data);
-
-    /* AppendPackets (multiple packets)
-     * Adds multiple packets to the packet table.  Takes the number of packets
-     * to be added and a pointer to their location in memory.
-     * Returns 0 on success, -1 on failure.
-     */
-    int AppendPackets(size_t numPackets, void * data);
-
-    /* GetPacket (indexed)
-     * Gets a single packet from the packet table.  Takes the index
-     * of the packet (with 0 being the first packet) and a pointer
-     * to memory where the data should be stored.
-     * Returns 0 on success, negative on failure
-     */
-    int GetPacket(hsize_t index, void * data);
-
-    /* GetPackets (multiple packets)
-     * Gets multiple packets at once, all packets between
-     * startIndex and endIndex inclusive.  Also takes a pointer to
-     * the memory where these packets should be stored.
-     * Returns 0 on success, negative on failure.
-     */
-    int GetPackets(hsize_t startIndex, hsize_t endIndex, void * data);
-
-    /* GetNextPacket (single packet)
-     * Gets the next packet in the packet table.  Takes a pointer to
-     * memory where the packet should be stored.
-     * Returns 0 on success, negative on failure.  Index
-     * is not advanced to the next packet on failure.
-     */
-    int GetNextPacket(void * data);
-
-    /* GetNextPackets (multiple packets)
-     * Gets the next numPackets packets in the packet table.  Takes a
-     * pointer to memory where these packets should be stored.
-     * Returns 0 on success, negative on failure.  Index
-     * is not advanced on failure.
-     */
-    int GetNextPackets(size_t numPackets, void * data);
-};
-
-#ifdef VLPT_REMOVED
-class H5_HLCPPDLL  VL_PacketTable : virtual public PacketTable
-{
-public:
-    /* Constructor
-     * Creates a packet table in which to store variable length packets.
-     * Takes the ID of the file the packet table will be created in, the name of
-     * the packet table, and the size of a memory chunk used in chunking.
-     */
-    VL_PacketTable(hid_t fileID, char* name, hsize_t chunkSize);
-
-    /* "Open" Constructor
-     * Opens an existing variable-length packet table.
-     * Fails if the packet table specified is fixed-length.
-     */
-    VL_PacketTable(hid_t fileID, char* name);
-
-    /* AppendPacket
-     * Adds a single packet of any length to the packet table.
-     * Takes a pointer to the location of the data in memory and the length of the data
-     * in bytes.
-     * Returns 0 on success, negative on failure.
-     */
-    int AppendPacket(void * data, size_t length);
-
-    /* AppendPackets (multiple packets)
-     * Adds multiple variable-length packets to the packet table.  Takes the
-     * number of packets to be added and a pointer to an array of
-     * hvl_t structs in memory.
-     * Returns 0 on success, negative on failure.
-     */
-    int AppendPackets(size_t numPackets, hvl_t * data);
-
-    /* GetPacket (indexed)
-     * Gets a single variable-length packet from the packet table.  Takes
-     * the index of the packet (with 0 being the first packet) and a pointer
-     * to a hvl_t struct in which to store the packet's size and location.
-     * Returns 0 on success, negative on failure.
-     */
-    int GetPacket(hsize_t index, hvl_t * data);
-
-    /* GetPackets (multiple packets)
-     * Gets multiple variable-length packets at once, all packets between
-     * startIndex and endIndex inclusive.  Takes a pointer to an array
-     * of hvl_t structs in memory in which to store pointers to the packets.
-     * Returns 0 on success, negative on failure.
-     */
-    int GetPackets(hsize_t startIndex, hsize_t endIndex, hvl_t * data);
-
-    /* GetNextPacket (single packet)
-     * Gets the next packet in the packet table.  Takes a pointer to
-     * an hvl_t struct where the packet should be stored.
-     * Returns 0 on success, negative on failure.  Index
-     * is not advanced to the next packet on failure.
-     */
-    int GetNextPacket(hvl_t * data);
-
-    /* GetNextPackets (multiple packets)
-     * Gets the next numPackets packets in the packet table.  Takes a
-     * pointer to an array of hvl_t structs where pointers to the packets
-     * should be stored.
-     * Returns 0 on success, negative on failure.  Index
-     * is not advanced on failure.
-     */
-    int GetNextPackets(size_t numPackets, hvl_t * data);
-
-    /* FreeReadbuff
-     * Frees the buffers created when variable-length packets are read.
-     * Takes the number of hvl_t structs to be freed and a pointer to their
-     * location in memory.
-     * Returns 0 on success, negative on error.
-     */
-    int FreeReadbuff(size_t numStructs, hvl_t * buffer);
-};
-#endif /* VLPT_REMOVED */
-
-#endif /* H5PTWRAP_H */
diff --git a/interfaces/ext/hdf5/H5Ppublic.h b/interfaces/ext/hdf5/H5Ppublic.h
deleted file mode 100644
index 0f93234..0000000
--- a/interfaces/ext/hdf5/H5Ppublic.h
+++ /dev/null
@@ -1,432 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This file contains function prototypes for each exported function in the
- * H5P module.
- */
-#ifndef _H5Ppublic_H
-#define _H5Ppublic_H
-
-/* System headers needed by this file */
-
-/* Public headers needed by this file */
-#include "H5public.h"
-#include "H5ACpublic.h"
-#include "H5Dpublic.h"
-#include "H5Fpublic.h"
-#include "H5FDpublic.h"
-#include "H5Ipublic.h"
-#include "H5Lpublic.h"
-#include "H5MMpublic.h"
-#include "H5Tpublic.h"
-#include "H5Zpublic.h"
-
-
-/*****************/
-/* Public Macros */
-/*****************/
-
-/* When this header is included from a private HDF5 header, don't make calls to H5open() */
-#undef H5OPEN
-#ifndef _H5private_H
-#define H5OPEN        H5open(),
-#else   /* _H5private_H */
-#define H5OPEN
-#endif  /* _H5private_H */
-
-/*
- * The library's property list classes
- */
-
-#define H5P_ROOT		   	(H5OPEN H5P_CLS_ROOT_g)
-#define H5P_OBJECT_CREATE 		(H5OPEN H5P_CLS_OBJECT_CREATE_g)
-#define H5P_FILE_CREATE 		(H5OPEN H5P_CLS_FILE_CREATE_g)
-#define H5P_FILE_ACCESS 		(H5OPEN H5P_CLS_FILE_ACCESS_g)
-#define H5P_DATASET_CREATE     		(H5OPEN H5P_CLS_DATASET_CREATE_g)
-#define H5P_DATASET_ACCESS     		(H5OPEN H5P_CLS_DATASET_ACCESS_g)
-#define H5P_DATASET_XFER       		(H5OPEN H5P_CLS_DATASET_XFER_g)
-#define H5P_FILE_MOUNT       		(H5OPEN H5P_CLS_FILE_MOUNT_g)
-#define H5P_GROUP_CREATE 		(H5OPEN H5P_CLS_GROUP_CREATE_g)
-#define H5P_GROUP_ACCESS 		(H5OPEN H5P_CLS_GROUP_ACCESS_g)
-#define H5P_DATATYPE_CREATE 		(H5OPEN H5P_CLS_DATATYPE_CREATE_g)
-#define H5P_DATATYPE_ACCESS 		(H5OPEN H5P_CLS_DATATYPE_ACCESS_g)
-#define H5P_STRING_CREATE 		(H5OPEN H5P_CLS_STRING_CREATE_g)
-#define H5P_ATTRIBUTE_CREATE 		(H5OPEN H5P_CLS_ATTRIBUTE_CREATE_g)
-#define H5P_OBJECT_COPY	 		(H5OPEN H5P_CLS_OBJECT_COPY_g)
-#define H5P_LINK_CREATE 		(H5OPEN H5P_CLS_LINK_CREATE_g)
-#define H5P_LINK_ACCESS 		(H5OPEN H5P_CLS_LINK_ACCESS_g)
-
-/*
- * The library's default property lists
- */
-#define H5P_FILE_CREATE_DEFAULT		(H5OPEN H5P_LST_FILE_CREATE_g)
-#define H5P_FILE_ACCESS_DEFAULT 	(H5OPEN H5P_LST_FILE_ACCESS_g)
-#define H5P_DATASET_CREATE_DEFAULT  	(H5OPEN H5P_LST_DATASET_CREATE_g)
-#define H5P_DATASET_ACCESS_DEFAULT  	(H5OPEN H5P_LST_DATASET_ACCESS_g)
-#define H5P_DATASET_XFER_DEFAULT   	(H5OPEN H5P_LST_DATASET_XFER_g)
-#define H5P_FILE_MOUNT_DEFAULT       	(H5OPEN H5P_LST_FILE_MOUNT_g)
-#define H5P_GROUP_CREATE_DEFAULT	(H5OPEN H5P_LST_GROUP_CREATE_g)
-#define H5P_GROUP_ACCESS_DEFAULT 	(H5OPEN H5P_LST_GROUP_ACCESS_g)
-#define H5P_DATATYPE_CREATE_DEFAULT	(H5OPEN H5P_LST_DATATYPE_CREATE_g)
-#define H5P_DATATYPE_ACCESS_DEFAULT 	(H5OPEN H5P_LST_DATATYPE_ACCESS_g)
-#define H5P_ATTRIBUTE_CREATE_DEFAULT	(H5OPEN H5P_LST_ATTRIBUTE_CREATE_g)
-#define H5P_OBJECT_COPY_DEFAULT		(H5OPEN H5P_LST_OBJECT_COPY_g)
-#define H5P_LINK_CREATE_DEFAULT		(H5OPEN H5P_LST_LINK_CREATE_g)
-#define H5P_LINK_ACCESS_DEFAULT		(H5OPEN H5P_LST_LINK_ACCESS_g)
-
-/* Common creation order flags (for links in groups and attributes on objects) */
-#define H5P_CRT_ORDER_TRACKED           0x0001
-#define H5P_CRT_ORDER_INDEXED           0x0002
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*******************/
-/* Public Typedefs */
-/*******************/
-
-
-/* Define property list class callback function pointer types */
-typedef herr_t (*H5P_cls_create_func_t)(hid_t prop_id, void *create_data);
-typedef herr_t (*H5P_cls_copy_func_t)(hid_t new_prop_id, hid_t old_prop_id,
-                                      void *copy_data);
-typedef herr_t (*H5P_cls_close_func_t)(hid_t prop_id, void *close_data);
-
-/* Define property list callback function pointer types */
-typedef herr_t (*H5P_prp_cb1_t)(const char *name, size_t size, void *value);
-typedef herr_t (*H5P_prp_cb2_t)(hid_t prop_id, const char *name, size_t size, void *value);
-typedef H5P_prp_cb1_t H5P_prp_create_func_t;
-typedef H5P_prp_cb2_t H5P_prp_set_func_t;
-typedef H5P_prp_cb2_t H5P_prp_get_func_t;
-typedef H5P_prp_cb2_t H5P_prp_delete_func_t;
-typedef H5P_prp_cb1_t H5P_prp_copy_func_t;
-typedef int (*H5P_prp_compare_func_t)(const void *value1, const void *value2, size_t size);
-typedef H5P_prp_cb1_t H5P_prp_close_func_t;
-
-/* Define property list iteration function type */
-typedef herr_t (*H5P_iterate_t)(hid_t id, const char *name, void *iter_data);
-
-/********************/
-/* Public Variables */
-/********************/
-
-/* Property list class IDs */
-/* (Internal to library, do not use!  Use macros above) */
-H5_DLLVAR hid_t H5P_CLS_ROOT_g;
-H5_DLLVAR hid_t H5P_CLS_OBJECT_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_FILE_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_FILE_ACCESS_g;
-H5_DLLVAR hid_t H5P_CLS_DATASET_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_DATASET_ACCESS_g;
-H5_DLLVAR hid_t H5P_CLS_DATASET_XFER_g;
-H5_DLLVAR hid_t H5P_CLS_FILE_MOUNT_g;
-H5_DLLVAR hid_t H5P_CLS_GROUP_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_GROUP_ACCESS_g;
-H5_DLLVAR hid_t H5P_CLS_DATATYPE_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_DATATYPE_ACCESS_g;
-H5_DLLVAR hid_t H5P_CLS_STRING_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_ATTRIBUTE_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_OBJECT_COPY_g;
-H5_DLLVAR hid_t H5P_CLS_LINK_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_LINK_ACCESS_g;
-
-/* Default roperty list IDs */
-/* (Internal to library, do not use!  Use macros above) */
-H5_DLLVAR hid_t H5P_LST_FILE_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_FILE_ACCESS_g;
-H5_DLLVAR hid_t H5P_LST_DATASET_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_DATASET_ACCESS_g;
-H5_DLLVAR hid_t H5P_LST_DATASET_XFER_g;
-H5_DLLVAR hid_t H5P_LST_FILE_MOUNT_g;
-H5_DLLVAR hid_t H5P_LST_GROUP_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_GROUP_ACCESS_g;
-H5_DLLVAR hid_t H5P_LST_DATATYPE_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_DATATYPE_ACCESS_g;
-H5_DLLVAR hid_t H5P_LST_ATTRIBUTE_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_OBJECT_COPY_g;
-H5_DLLVAR hid_t H5P_LST_LINK_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_LINK_ACCESS_g;
-
-/*********************/
-/* Public Prototypes */
-/*********************/
-
-/* Generic property list routines */
-H5_DLL hid_t H5Pcreate_class(hid_t parent, const char *name,
-    H5P_cls_create_func_t cls_create, void *create_data,
-    H5P_cls_copy_func_t cls_copy, void *copy_data,
-    H5P_cls_close_func_t cls_close, void *close_data);
-H5_DLL char *H5Pget_class_name(hid_t pclass_id);
-H5_DLL hid_t H5Pcreate(hid_t cls_id);
-H5_DLL herr_t H5Pregister2(hid_t cls_id, const char *name, size_t size,
-    void *def_value, H5P_prp_create_func_t prp_create,
-    H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
-    H5P_prp_delete_func_t prp_del, H5P_prp_copy_func_t prp_copy,
-    H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close);
-H5_DLL herr_t H5Pinsert2(hid_t plist_id, const char *name, size_t size,
-    void *value, H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
-    H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy,
-    H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close);
-H5_DLL herr_t H5Pset(hid_t plist_id, const char *name, void *value);
-H5_DLL htri_t H5Pexist(hid_t plist_id, const char *name);
-H5_DLL herr_t H5Pget_size(hid_t id, const char *name, size_t *size);
-H5_DLL herr_t H5Pget_nprops(hid_t id, size_t *nprops);
-H5_DLL hid_t H5Pget_class(hid_t plist_id);
-H5_DLL hid_t H5Pget_class_parent(hid_t pclass_id);
-H5_DLL herr_t H5Pget(hid_t plist_id, const char *name, void * value);
-H5_DLL htri_t H5Pequal(hid_t id1, hid_t id2);
-H5_DLL htri_t H5Pisa_class(hid_t plist_id, hid_t pclass_id);
-H5_DLL int H5Piterate(hid_t id, int *idx, H5P_iterate_t iter_func,
-            void *iter_data);
-H5_DLL herr_t H5Pcopy_prop(hid_t dst_id, hid_t src_id, const char *name);
-H5_DLL herr_t H5Premove(hid_t plist_id, const char *name);
-H5_DLL herr_t H5Punregister(hid_t pclass_id, const char *name);
-H5_DLL herr_t H5Pclose_class(hid_t plist_id);
-H5_DLL herr_t H5Pclose(hid_t plist_id);
-H5_DLL hid_t H5Pcopy(hid_t plist_id);
-
-/* Object creation property list (OCPL) routines */
-H5_DLL herr_t H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense);
-H5_DLL herr_t H5Pget_attr_phase_change(hid_t plist_id, unsigned *max_compact, unsigned *min_dense);
-H5_DLL herr_t H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flags);
-H5_DLL herr_t H5Pget_attr_creation_order(hid_t plist_id, unsigned *crt_order_flags);
-H5_DLL herr_t H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times);
-H5_DLL herr_t H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times);
-H5_DLL herr_t H5Pmodify_filter(hid_t plist_id, H5Z_filter_t filter,
-        unsigned int flags, size_t cd_nelmts,
-        const unsigned int cd_values[/*cd_nelmts*/]);
-H5_DLL herr_t H5Pset_filter(hid_t plist_id, H5Z_filter_t filter,
-        unsigned int flags, size_t cd_nelmts,
-        const unsigned int c_values[]);
-H5_DLL int H5Pget_nfilters(hid_t plist_id);
-H5_DLL H5Z_filter_t H5Pget_filter2(hid_t plist_id, unsigned filter,
-       unsigned int *flags/*out*/,
-       size_t *cd_nelmts/*out*/,
-       unsigned cd_values[]/*out*/,
-       size_t namelen, char name[],
-       unsigned *filter_config /*out*/);
-H5_DLL herr_t H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t id,
-       unsigned int *flags/*out*/, size_t *cd_nelmts/*out*/,
-       unsigned cd_values[]/*out*/, size_t namelen, char name[]/*out*/,
-       unsigned *filter_config/*out*/);
-H5_DLL htri_t H5Pall_filters_avail(hid_t plist_id);
-H5_DLL herr_t H5Premove_filter(hid_t plist_id, H5Z_filter_t filter);
-H5_DLL herr_t H5Pset_deflate(hid_t plist_id, unsigned aggression);
-H5_DLL herr_t H5Pset_fletcher32(hid_t plist_id);
-
-/* File creation property list (FCPL) routines */
-H5_DLL herr_t H5Pget_version(hid_t plist_id, unsigned *boot/*out*/,
-         unsigned *freelist/*out*/, unsigned *stab/*out*/,
-         unsigned *shhdr/*out*/);
-H5_DLL herr_t H5Pset_userblock(hid_t plist_id, hsize_t size);
-H5_DLL herr_t H5Pget_userblock(hid_t plist_id, hsize_t *size);
-H5_DLL herr_t H5Pset_sizes(hid_t plist_id, size_t sizeof_addr,
-       size_t sizeof_size);
-H5_DLL herr_t H5Pget_sizes(hid_t plist_id, size_t *sizeof_addr/*out*/,
-       size_t *sizeof_size/*out*/);
-H5_DLL herr_t H5Pset_sym_k(hid_t plist_id, unsigned ik, unsigned lk);
-H5_DLL herr_t H5Pget_sym_k(hid_t plist_id, unsigned *ik/*out*/, unsigned *lk/*out*/);
-H5_DLL herr_t H5Pset_istore_k(hid_t plist_id, unsigned ik);
-H5_DLL herr_t H5Pget_istore_k(hid_t plist_id, unsigned *ik/*out*/);
-H5_DLL herr_t H5Pset_shared_mesg_nindexes(hid_t plist_id, unsigned nindexes);
-H5_DLL herr_t H5Pget_shared_mesg_nindexes(hid_t plist_id, unsigned *nindexes);
-H5_DLL herr_t H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned mesg_type_flags, unsigned min_mesg_size);
-H5_DLL herr_t H5Pget_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned *mesg_type_flags, unsigned *min_mesg_size);
-H5_DLL herr_t H5Pset_shared_mesg_phase_change(hid_t plist_id, unsigned max_list, unsigned min_btree);
-H5_DLL herr_t H5Pget_shared_mesg_phase_change(hid_t plist_id, unsigned *max_list, unsigned *min_btree);
-
-
-/* File access property list (FAPL) routines */
-H5_DLL herr_t H5Pset_alignment(hid_t fapl_id, hsize_t threshold,
-    hsize_t alignment);
-H5_DLL herr_t H5Pget_alignment(hid_t fapl_id, hsize_t *threshold/*out*/,
-    hsize_t *alignment/*out*/);
-H5_DLL herr_t H5Pset_driver(hid_t plist_id, hid_t driver_id,
-        const void *driver_info);
-H5_DLL hid_t H5Pget_driver(hid_t plist_id);
-H5_DLL void *H5Pget_driver_info(hid_t plist_id);
-H5_DLL herr_t H5Pset_family_offset(hid_t fapl_id, hsize_t offset);
-H5_DLL herr_t H5Pget_family_offset(hid_t fapl_id, hsize_t *offset);
-H5_DLL herr_t H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type);
-H5_DLL herr_t H5Pget_multi_type(hid_t fapl_id, H5FD_mem_t *type);
-H5_DLL herr_t H5Pset_cache(hid_t plist_id, int mdc_nelmts,
-       size_t rdcc_nslots, size_t rdcc_nbytes,
-       double rdcc_w0);
-H5_DLL herr_t H5Pget_cache(hid_t plist_id,
-       int *mdc_nelmts, /* out */
-       size_t *rdcc_nslots/*out*/,
-       size_t *rdcc_nbytes/*out*/, double *rdcc_w0);
-H5_DLL herr_t H5Pset_mdc_config(hid_t    plist_id,
-       H5AC_cache_config_t * config_ptr);
-H5_DLL herr_t H5Pget_mdc_config(hid_t     plist_id,
-       H5AC_cache_config_t * config_ptr);	/* out */
-H5_DLL herr_t H5Pset_gc_references(hid_t fapl_id, unsigned gc_ref);
-H5_DLL herr_t H5Pget_gc_references(hid_t fapl_id, unsigned *gc_ref/*out*/);
-H5_DLL herr_t H5Pset_fclose_degree(hid_t fapl_id, H5F_close_degree_t degree);
-H5_DLL herr_t H5Pget_fclose_degree(hid_t fapl_id, H5F_close_degree_t *degree);
-H5_DLL herr_t H5Pset_meta_block_size(hid_t fapl_id, hsize_t size);
-H5_DLL herr_t H5Pget_meta_block_size(hid_t fapl_id, hsize_t *size/*out*/);
-H5_DLL herr_t H5Pset_sieve_buf_size(hid_t fapl_id, size_t size);
-H5_DLL herr_t H5Pget_sieve_buf_size(hid_t fapl_id, size_t *size/*out*/);
-H5_DLL herr_t H5Pset_small_data_block_size(hid_t fapl_id, hsize_t size);
-H5_DLL herr_t H5Pget_small_data_block_size(hid_t fapl_id, hsize_t *size/*out*/);
-H5_DLL herr_t H5Pset_libver_bounds(hid_t plist_id, H5F_libver_t low,
-    H5F_libver_t high);
-H5_DLL herr_t H5Pget_libver_bounds(hid_t plist_id, H5F_libver_t *low,
-    H5F_libver_t *high);
-
-/* Dataset creation property list (DCPL) routines */
-H5_DLL herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout);
-H5_DLL H5D_layout_t H5Pget_layout(hid_t plist_id);
-H5_DLL herr_t H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/]);
-H5_DLL int H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[]/*out*/);
-H5_DLL herr_t H5Pset_external(hid_t plist_id, const char *name, off_t offset,
-          hsize_t size);
-H5_DLL int H5Pget_external_count(hid_t plist_id);
-H5_DLL herr_t H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size,
-          char *name/*out*/, off_t *offset/*out*/,
-          hsize_t *size/*out*/);
-H5_DLL herr_t H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block);
-H5_DLL herr_t H5Pset_shuffle(hid_t plist_id);
-H5_DLL herr_t H5Pset_nbit(hid_t plist_id);
-H5_DLL herr_t H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_factor);
-H5_DLL herr_t H5Pset_fill_value(hid_t plist_id, hid_t type_id,
-     const void *value);
-H5_DLL herr_t H5Pget_fill_value(hid_t plist_id, hid_t type_id,
-     void *value/*out*/);
-H5_DLL herr_t H5Pfill_value_defined(hid_t plist, H5D_fill_value_t *status);
-H5_DLL herr_t H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t
-	alloc_time);
-H5_DLL herr_t H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t
-	*alloc_time/*out*/);
-H5_DLL herr_t H5Pset_fill_time(hid_t plist_id, H5D_fill_time_t fill_time);
-H5_DLL herr_t H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t
-	*fill_time/*out*/);
-
-/* Dataset access property list (DAPL) routines */
-H5_DLL herr_t H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots,
-       size_t rdcc_nbytes, double rdcc_w0);
-H5_DLL herr_t H5Pget_chunk_cache(hid_t dapl_id,
-       size_t *rdcc_nslots/*out*/,
-       size_t *rdcc_nbytes/*out*/,
-       double *rdcc_w0/*out*/);
-
-/* Dataset xfer property list (DXPL) routines */
-H5_DLL herr_t H5Pset_data_transform(hid_t plist_id, const char* expression);
-H5_DLL ssize_t H5Pget_data_transform(hid_t plist_id, char* expression /*out*/, size_t size);
-H5_DLL herr_t H5Pset_buffer(hid_t plist_id, size_t size, void *tconv,
-        void *bkg);
-H5_DLL size_t H5Pget_buffer(hid_t plist_id, void **tconv/*out*/,
-        void **bkg/*out*/);
-H5_DLL herr_t H5Pset_preserve(hid_t plist_id, hbool_t status);
-H5_DLL int H5Pget_preserve(hid_t plist_id);
-H5_DLL herr_t H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check);
-H5_DLL H5Z_EDC_t H5Pget_edc_check(hid_t plist_id);
-H5_DLL herr_t H5Pset_filter_callback(hid_t plist_id, H5Z_filter_func_t func,
-                                     void* op_data);
-H5_DLL herr_t H5Pset_btree_ratios(hid_t plist_id, double left, double middle,
-       double right);
-H5_DLL herr_t H5Pget_btree_ratios(hid_t plist_id, double *left/*out*/,
-       double *middle/*out*/,
-       double *right/*out*/);
-H5_DLL herr_t H5Pset_vlen_mem_manager(hid_t plist_id,
-                                       H5MM_allocate_t alloc_func,
-                                       void *alloc_info, H5MM_free_t free_func,
-                                       void *free_info);
-H5_DLL herr_t H5Pget_vlen_mem_manager(hid_t plist_id,
-                                       H5MM_allocate_t *alloc_func,
-                                       void **alloc_info,
-                                       H5MM_free_t *free_func,
-                                       void **free_info);
-H5_DLL herr_t H5Pset_hyper_vector_size(hid_t fapl_id, size_t size);
-H5_DLL herr_t H5Pget_hyper_vector_size(hid_t fapl_id, size_t *size/*out*/);
-H5_DLL herr_t H5Pset_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t op, void* operate_data);
-H5_DLL herr_t H5Pget_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t *op, void** operate_data);
-
-/* Link creation property list (LCPL) routines */
-H5_DLL herr_t H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd);
-H5_DLL herr_t H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd /*out*/);
-
-/* Group creation property list (GCPL) routines */
-H5_DLL herr_t H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint);
-H5_DLL herr_t H5Pget_local_heap_size_hint(hid_t plist_id, size_t *size_hint /*out*/);
-H5_DLL herr_t H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense);
-H5_DLL herr_t H5Pget_link_phase_change(hid_t plist_id, unsigned *max_compact /*out*/, unsigned *min_dense /*out*/);
-H5_DLL herr_t H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name_len);
-H5_DLL herr_t H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries /* out */, unsigned *est_name_len /* out */);
-H5_DLL herr_t H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags);
-H5_DLL herr_t H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags /* out */);
-
-/* String creation property list (STRCPL) routines */
-H5_DLL herr_t H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding);
-H5_DLL herr_t H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/);
-
-/* Link access property list (LAPL) routines */
-H5_DLL herr_t H5Pset_nlinks(hid_t plist_id, size_t nlinks);
-H5_DLL herr_t H5Pget_nlinks(hid_t plist_id, size_t *nlinks);
-H5_DLL herr_t H5Pset_elink_prefix(hid_t plist_id, const char *prefix);
-H5_DLL ssize_t H5Pget_elink_prefix(hid_t plist_id, char *prefix, size_t size);
-H5_DLL hid_t H5Pget_elink_fapl(hid_t lapl_id);
-H5_DLL herr_t H5Pset_elink_fapl(hid_t lapl_id, hid_t fapl_id);
-H5_DLL herr_t H5Pset_elink_acc_flags(hid_t lapl_id, unsigned flags);
-H5_DLL herr_t H5Pget_elink_acc_flags(hid_t lapl_id, unsigned *flags);
-H5_DLL herr_t H5Pset_elink_cb(hid_t lapl_id, H5L_elink_traverse_t func, void *op_data);
-H5_DLL herr_t H5Pget_elink_cb(hid_t lapl_id, H5L_elink_traverse_t *func, void **op_data);
-
-/* Object copy property list (OCPYPL) routines */
-H5_DLL herr_t H5Pset_copy_object(hid_t plist_id, unsigned crt_intmd);
-H5_DLL herr_t H5Pget_copy_object(hid_t plist_id, unsigned *crt_intmd /*out*/);
-
-/* Symbols defined for compatibility with previous versions of the HDF5 API.
- *
- * Use of these symbols is deprecated.
- */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-
-/* Macros */
-
-/* We renamed the "root" of the property list class hierarchy */
-#define H5P_NO_CLASS            H5P_ROOT
-
-
-/* Typedefs */
-
-
-/* Function prototypes */
-H5_DLL herr_t H5Pregister1(hid_t cls_id, const char *name, size_t size,
-    void *def_value, H5P_prp_create_func_t prp_create,
-    H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
-    H5P_prp_delete_func_t prp_del, H5P_prp_copy_func_t prp_copy,
-    H5P_prp_close_func_t prp_close);
-H5_DLL herr_t H5Pinsert1(hid_t plist_id, const char *name, size_t size,
-    void *value, H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
-    H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy,
-    H5P_prp_close_func_t prp_close);
-H5_DLL H5Z_filter_t H5Pget_filter1(hid_t plist_id, unsigned filter,
-    unsigned int *flags/*out*/, size_t *cd_nelmts/*out*/,
-    unsigned cd_values[]/*out*/, size_t namelen, char name[]);
-H5_DLL herr_t H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id,
-    unsigned int *flags/*out*/, size_t *cd_nelmts/*out*/,
-    unsigned cd_values[]/*out*/, size_t namelen, char name[]/*out*/);
-
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _H5Ppublic_H */
-
diff --git a/interfaces/ext/hdf5/H5PredType.h b/interfaces/ext/hdf5/H5PredType.h
deleted file mode 100644
index 5b2fffb..0000000
--- a/interfaces/ext/hdf5/H5PredType.h
+++ /dev/null
@@ -1,250 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-// PredType holds the definition of all the HDF5 predefined datatypes.
-// These types can only be made copy of, not created by H5Tcreate or
-// closed by H5Tclose.  They are treated as constants.
-/////////////////////////////////////////////////////////////////////
-
-#ifndef _H5PredType_H
-#define _H5PredType_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP PredType : public AtomType {
-   public:
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("PredType"); }
-
-	// Makes a copy of the predefined type and stores the new
-	// id in the left hand side object.
-	PredType& operator=( const PredType& rhs );
-
-	// Copy constructor - makes copy of the original object
-	PredType( const PredType& original );
-
-	// Noop destructor
-	virtual ~PredType();
-
-	// Declaration of predefined types; their definition is in H5PredType.cpp
-	static const PredType STD_I8BE;
-	static const PredType STD_I8LE;
-	static const PredType STD_I16BE;
-	static const PredType STD_I16LE;
-	static const PredType STD_I32BE;
-	static const PredType STD_I32LE;
-	static const PredType STD_I64BE;
-	static const PredType STD_I64LE;
-	static const PredType STD_U8BE;
-	static const PredType STD_U8LE;
-	static const PredType STD_U16BE;
-	static const PredType STD_U16LE;
-	static const PredType STD_U32BE;
-	static const PredType STD_U32LE;
-	static const PredType STD_U64BE;
-	static const PredType STD_U64LE;
-	static const PredType STD_B8BE;
-	static const PredType STD_B8LE;
-	static const PredType STD_B16BE;
-	static const PredType STD_B16LE;
-	static const PredType STD_B32BE;
-	static const PredType STD_B32LE;
-	static const PredType STD_B64BE;
-	static const PredType STD_B64LE;
-	static const PredType STD_REF_OBJ;
-	static const PredType STD_REF_DSETREG;
-
-	static const PredType C_S1;
-	static const PredType FORTRAN_S1;
-
-	static const PredType IEEE_F32BE;
-	static const PredType IEEE_F32LE;
-	static const PredType IEEE_F64BE;
-	static const PredType IEEE_F64LE;
-
-	static const PredType UNIX_D32BE;
-	static const PredType UNIX_D32LE;
-	static const PredType UNIX_D64BE;
-	static const PredType UNIX_D64LE;
-
-	static const PredType INTEL_I8;
-	static const PredType INTEL_I16;
-	static const PredType INTEL_I32;
-	static const PredType INTEL_I64;
-	static const PredType INTEL_U8;
-	static const PredType INTEL_U16;
-	static const PredType INTEL_U32;
-	static const PredType INTEL_U64;
-	static const PredType INTEL_B8;
-	static const PredType INTEL_B16;
-	static const PredType INTEL_B32;
-	static const PredType INTEL_B64;
-	static const PredType INTEL_F32;
-	static const PredType INTEL_F64;
-
-	static const PredType ALPHA_I8;
-	static const PredType ALPHA_I16;
-	static const PredType ALPHA_I32;
-	static const PredType ALPHA_I64;
-	static const PredType ALPHA_U8;
-	static const PredType ALPHA_U16;
-	static const PredType ALPHA_U32;
-	static const PredType ALPHA_U64;
-	static const PredType ALPHA_B8;
-	static const PredType ALPHA_B16;
-	static const PredType ALPHA_B32;
-	static const PredType ALPHA_B64;
-	static const PredType ALPHA_F32;
-	static const PredType ALPHA_F64;
-
-	static const PredType MIPS_I8;
-	static const PredType MIPS_I16;
-	static const PredType MIPS_I32;
-	static const PredType MIPS_I64;
-	static const PredType MIPS_U8;
-	static const PredType MIPS_U16;
-	static const PredType MIPS_U32;
-	static const PredType MIPS_U64;
-	static const PredType MIPS_B8;
-	static const PredType MIPS_B16;
-	static const PredType MIPS_B32;
-	static const PredType MIPS_B64;
-	static const PredType MIPS_F32;
-	static const PredType MIPS_F64;
-
-	static const PredType NATIVE_CHAR;
-	static const PredType NATIVE_SCHAR;
-	static const PredType NATIVE_UCHAR;
-	static const PredType NATIVE_SHORT;
-	static const PredType NATIVE_USHORT;
-	static const PredType NATIVE_INT;
-	static const PredType NATIVE_UINT;
-	static const PredType NATIVE_LONG;
-	static const PredType NATIVE_ULONG;
-	static const PredType NATIVE_LLONG;
-	static const PredType NATIVE_ULLONG;
-	static const PredType NATIVE_FLOAT;
-	static const PredType NATIVE_DOUBLE;
-	static const PredType NATIVE_LDOUBLE;
-	static const PredType NATIVE_B8;
-	static const PredType NATIVE_B16;
-	static const PredType NATIVE_B32;
-	static const PredType NATIVE_B64;
-	static const PredType NATIVE_OPAQUE;
-	static const PredType NATIVE_HSIZE;
-	static const PredType NATIVE_HSSIZE;
-	static const PredType NATIVE_HERR;
-	static const PredType NATIVE_HBOOL;
-
-	static const PredType NATIVE_INT8;
-	static const PredType NATIVE_UINT8;
-	static const PredType NATIVE_INT16;
-	static const PredType NATIVE_UINT16;
-	static const PredType NATIVE_INT32;
-	static const PredType NATIVE_UINT32;
-	static const PredType NATIVE_INT64;
-	static const PredType NATIVE_UINT64;
-
-// LEAST types
-#if H5_SIZEOF_INT_LEAST8_T != 0
-	static const PredType NATIVE_INT_LEAST8;
-#endif /* H5_SIZEOF_INT_LEAST8_T */
-#if H5_SIZEOF_UINT_LEAST8_T != 0
-	static const PredType NATIVE_UINT_LEAST8;
-#endif /* H5_SIZEOF_UINT_LEAST8_T */
-
-#if H5_SIZEOF_INT_LEAST16_T != 0
-	static const PredType NATIVE_INT_LEAST16;
-#endif /* H5_SIZEOF_INT_LEAST16_T */
-#if H5_SIZEOF_UINT_LEAST16_T != 0
-	static const PredType NATIVE_UINT_LEAST16;
-#endif /* H5_SIZEOF_UINT_LEAST16_T */
-
-#if H5_SIZEOF_INT_LEAST32_T != 0
-	static const PredType NATIVE_INT_LEAST32;
-#endif /* H5_SIZEOF_INT_LEAST32_T */
-#if H5_SIZEOF_UINT_LEAST32_T != 0
-	static const PredType NATIVE_UINT_LEAST32;
-#endif /* H5_SIZEOF_UINT_LEAST32_T */
-
-#if H5_SIZEOF_INT_LEAST64_T != 0
-	static const PredType NATIVE_INT_LEAST64;
-#endif /* H5_SIZEOF_INT_LEAST64_T */
-#if H5_SIZEOF_UINT_LEAST64_T != 0
-	static const PredType NATIVE_UINT_LEAST64;
-#endif /* H5_SIZEOF_UINT_LEAST64_T */
-
-// FAST types
-#if H5_SIZEOF_INT_FAST8_T != 0
-	static const PredType NATIVE_INT_FAST8;
-#endif /* H5_SIZEOF_INT_FAST8_T */
-#if H5_SIZEOF_UINT_FAST8_T != 0
-	static const PredType NATIVE_UINT_FAST8;
-#endif /* H5_SIZEOF_UINT_FAST8_T */
-
-#if H5_SIZEOF_INT_FAST16_T != 0
-	static const PredType NATIVE_INT_FAST16;
-#endif /* H5_SIZEOF_INT_FAST16_T */
-#if H5_SIZEOF_UINT_FAST16_T != 0
-	static const PredType NATIVE_UINT_FAST16;
-#endif /* H5_SIZEOF_UINT_FAST16_T */
-
-#if H5_SIZEOF_INT_FAST32_T != 0
-	static const PredType NATIVE_INT_FAST32;
-#endif /* H5_SIZEOF_INT_FAST32_T */
-#if H5_SIZEOF_UINT_FAST32_T != 0
-	static const PredType NATIVE_UINT_FAST32;
-#endif /* H5_SIZEOF_UINT_FAST32_T */
-
-#if H5_SIZEOF_INT_FAST64_T != 0
-	static const PredType NATIVE_INT_FAST64;
-#endif /* H5_SIZEOF_INT_FAST64_T */
-#if H5_SIZEOF_UINT_FAST64_T != 0
-	static const PredType NATIVE_UINT_FAST64;
-#endif /* H5_SIZEOF_UINT_FAST64_T */
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	// These dummy functions do not inherit from DataType - they'll
-	// throw a DataTypeIException if invoked.
-	void commit( H5File& loc, const H5std_string& name );
-	void commit( H5File& loc, const char* name );
-	void commit( H5Object& loc, const H5std_string& name );
-	void commit( H5Object& loc, const char* name );
-	bool committed();
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
-   private:
-	// added this to work around the atexit/global destructor problem
-	// temporarily - it'll prevent the use of atexit to clean up
-	static const PredType NotAtexit;	// not working yet
-
-   protected:
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	// Default constructor
-	PredType();
-
-	// Creates a pre-defined type using an HDF5 pre-defined constant
-	PredType( const hid_t predtype_id );  // used by the library only
-
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5PropList.h b/interfaces/ext/hdf5/H5PropList.h
deleted file mode 100644
index 2c079f9..0000000
--- a/interfaces/ext/hdf5/H5PropList.h
+++ /dev/null
@@ -1,122 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5PropList_H
-#define _H5PropList_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP PropList : public IdComponent {
-   public:
-	// Default property list
-        static const PropList DEFAULT;
-
-	// Creates a property list of a given type or creates a copy of an
-	// existing property list giving the property list id.
-	PropList(const hid_t plist_id);
-
-	// Make a copy of the given property list using assignment statement
-	PropList& operator=( const PropList& rhs );
-
-	// Compares this property list or class against the given list or class.
-	bool operator==(const PropList& rhs) const;
-
-	// Close this property list.
-	virtual void close();
-
-	// Close a property list class.
-	void closeClass() const;
-
-	// Makes a copy of the given property list.
-	void copy( const PropList& like_plist );
-
-	// Copies a property from this property list or class to another
-	void copyProp( PropList& dest, const char* name) const;
-	void copyProp( PropList& dest, const H5std_string& name) const;
-
-	// Copies a property from one property list or property class to another
-	void copyProp( PropList& dest, PropList& src, const char* name) const;
-	void copyProp( PropList& dest, PropList& src, const H5std_string& name) const;
-
-	// Gets the class of this property list, i.e. H5P_FILE_CREATE,
-	// H5P_FILE_ACCESS, ...
-	hid_t getClass() const;
-
-	// Return the name of a generic property list class.
-	H5std_string getClassName() const;
-
-	// Returns the parent class of a generic property class.
-	PropList getClassParent() const;
-
-	// Returns the number of properties in this property list or class.
-	size_t getNumProps() const;
-
-	// Query the value of a property in a property list.
-	void getProperty(const char* name, void* value) const;
-	void getProperty(const H5std_string& name, void* value) const;
-	H5std_string getProperty(const char* name) const;
-	H5std_string getProperty(const H5std_string& name) const;
-
-	// Set a property's value in a property list.
-	void setProperty(const char* name, void* value) const;
-	void setProperty(const char* name, const char* charptr) const;
-	void setProperty(const char* name, H5std_string& strg) const;
-	void setProperty(const H5std_string& name, void* value) const;
-	void setProperty(const H5std_string& name, H5std_string& strg) const;
-
-	// Query the size of a property in a property list or class.
-	size_t getPropSize(const char *name) const;
-	size_t getPropSize(const H5std_string& name) const;
-
-	// Determines whether a property list is a certain class.
-	bool isAClass(const PropList& prop_class) const;
-
-	/// Query the existance of a property in a property object.
-	bool propExist(const char* name) const;
-	bool propExist(const H5std_string& name) const;
-
-	// Removes a property from a property list.
-	void removeProp(const char *name) const;
-	void removeProp(const H5std_string& name) const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("PropList"); }
-
-	// Default constructor: creates a stub PropList object.
-	PropList();
-
-	// Copy constructor: creates a copy of a PropList object.
-	PropList(const PropList& original);
-
-	// Gets the property list id.
-	virtual hid_t getId() const;
-
-	// Destructor: properly terminates access to this property list.
-	virtual ~PropList();
-
-   protected:
-	hid_t id;	// HDF5 property list id
-
-	// Sets the property list id.
-	virtual void p_setId(const hid_t new_id);
-};
-
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif  // _H5PropList_H
diff --git a/interfaces/ext/hdf5/H5Rpublic.h b/interfaces/ext/hdf5/H5Rpublic.h
deleted file mode 100644
index 04d319b..0000000
--- a/interfaces/ext/hdf5/H5Rpublic.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This file contains public declarations for the H5S module.
- */
-#ifndef _H5Rpublic_H
-#define _H5Rpublic_H
-
-/* Public headers needed by this file */
-#include "H5public.h"
-#include "H5Gpublic.h"
-#include "H5Ipublic.h"
-
-/*
- * Reference types allowed.
- */
-typedef enum {
-    H5R_BADTYPE     =   (-1),   /*invalid Reference Type                     */
-    H5R_OBJECT,                 /*Object reference                           */
-    H5R_DATASET_REGION,         /*Dataset Region Reference                   */
-    H5R_MAXTYPE                 /*highest type (Invalid as true type)	     */
-} H5R_type_t;
-
-/* Note! Be careful with the sizes of the references because they should really
- * depend on the run-time values in the file.  Unfortunately, the arrays need
- * to be defined at compile-time, so we have to go with the worst case sizes for
- * them.  -QAK
- */
-#define H5R_OBJ_REF_BUF_SIZE    sizeof(haddr_t)
-/* Object reference structure for user's code */
-typedef haddr_t hobj_ref_t; /* Needs to be large enough to store largest haddr_t in a worst case machine (ie. 8 bytes currently) */
-
-#define H5R_DSET_REG_REF_BUF_SIZE    (sizeof(haddr_t)+4)
-/* 4 is used instead of sizeof(int) to permit portability between
-   the Crays and other machines (the heap ID is always encoded as an int32 anyway)
-*/
-/* Dataset Region reference structure for user's code */
-typedef unsigned char hdset_reg_ref_t[H5R_DSET_REG_REF_BUF_SIZE];/* Buffer to store heap ID and index */
-/* Needs to be large enough to store largest haddr_t in a worst case machine (ie. 8 bytes currently) plus an int */
-
-/* Publicly visible data structures */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Functions in H5R.c */
-H5_DLL herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name,
-			 H5R_type_t ref_type, hid_t space_id);
-H5_DLL hid_t H5Rdereference(hid_t dataset, H5R_type_t ref_type, const void *ref);
-H5_DLL hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, const void *ref);
-H5_DLL herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *_ref,
-    H5O_type_t *obj_type);
-H5_DLL ssize_t H5Rget_name(hid_t loc_id, H5R_type_t ref_type, const void *ref,
-    char *name/*out*/, size_t size);
-
-/* Symbols defined for compatibility with previous versions of the HDF5 API.
- *
- * Use of these symbols is deprecated.
- */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-
-/* Macros */
-
-
-/* Typedefs */
-
-
-/* Function prototypes */
-H5_DLL H5G_obj_t H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *_ref);
-
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  /* _H5Rpublic_H */
-
diff --git a/interfaces/ext/hdf5/H5Spublic.h b/interfaces/ext/hdf5/H5Spublic.h
deleted file mode 100644
index c62a7b7..0000000
--- a/interfaces/ext/hdf5/H5Spublic.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This file contains public declarations for the H5S module.
- */
-#ifndef _H5Spublic_H
-#define _H5Spublic_H
-
-/* Public headers needed by this file */
-#include "H5public.h"
-#include "H5Ipublic.h"
-
-/* Define atomic datatypes */
-#define H5S_ALL         0
-#define H5S_UNLIMITED	((hsize_t)(hssize_t)(-1))
-
-/* Define user-level maximum number of dimensions */
-#define H5S_MAX_RANK    32
-
-/* Different types of dataspaces */
-typedef enum H5S_class_t {
-    H5S_NO_CLASS         = -1,  /*error                                      */
-    H5S_SCALAR           = 0,   /*scalar variable                            */
-    H5S_SIMPLE           = 1,   /*simple data space                          */
-    H5S_NULL             = 2    /*null data space                            */
-} H5S_class_t;
-
-/* Different ways of combining selections */
-typedef enum H5S_seloper_t {
-    H5S_SELECT_NOOP      = -1,  /* error                                     */
-    H5S_SELECT_SET       = 0,   /* Select "set" operation 		     */
-    H5S_SELECT_OR,              /* Binary "or" operation for hyperslabs
-                                 * (add new selection to existing selection)
-                                 * Original region:  AAAAAAAAAA
-                                 * New region:             BBBBBBBBBB
-                                 * A or B:           CCCCCCCCCCCCCCCC
-                                 */
-    H5S_SELECT_AND,             /* Binary "and" operation for hyperslabs
-                                 * (only leave overlapped regions in selection)
-                                 * Original region:  AAAAAAAAAA
-                                 * New region:             BBBBBBBBBB
-                                 * A and B:                CCCC
-                                 */
-    H5S_SELECT_XOR,             /* Binary "xor" operation for hyperslabs
-                                 * (only leave non-overlapped regions in selection)
-                                 * Original region:  AAAAAAAAAA
-                                 * New region:             BBBBBBBBBB
-                                 * A xor B:          CCCCCC    CCCCCC
-                                 */
-    H5S_SELECT_NOTB,            /* Binary "not" operation for hyperslabs
-                                 * (only leave non-overlapped regions in original selection)
-                                 * Original region:  AAAAAAAAAA
-                                 * New region:             BBBBBBBBBB
-                                 * A not B:          CCCCCC
-                                 */
-    H5S_SELECT_NOTA,            /* Binary "not" operation for hyperslabs
-                                 * (only leave non-overlapped regions in new selection)
-                                 * Original region:  AAAAAAAAAA
-                                 * New region:             BBBBBBBBBB
-                                 * B not A:                    CCCCCC
-                                 */
-    H5S_SELECT_APPEND,          /* Append elements to end of point selection */
-    H5S_SELECT_PREPEND,         /* Prepend elements to beginning of point selection */
-    H5S_SELECT_INVALID          /* Invalid upper bound on selection operations */
-} H5S_seloper_t;
-
-/* Enumerated type for the type of selection */
-typedef enum {
-    H5S_SEL_ERROR	= -1, 	/* Error			*/
-    H5S_SEL_NONE	= 0,    /* Nothing selected 		*/
-    H5S_SEL_POINTS	= 1,    /* Sequence of points selected	*/
-    H5S_SEL_HYPERSLABS  = 2,    /* "New-style" hyperslab selection defined	*/
-    H5S_SEL_ALL		= 3,    /* Entire extent selected	*/
-    H5S_SEL_N			/*THIS MUST BE LAST		*/
-}H5S_sel_type;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Functions in H5S.c */
-H5_DLL hid_t H5Screate(H5S_class_t type);
-H5_DLL hid_t H5Screate_simple(int rank, const hsize_t dims[],
-			       const hsize_t maxdims[]);
-H5_DLL herr_t H5Sset_extent_simple(hid_t space_id, int rank,
-				    const hsize_t dims[],
-				    const hsize_t max[]);
-H5_DLL hid_t H5Scopy(hid_t space_id);
-H5_DLL herr_t H5Sclose(hid_t space_id);
-H5_DLL herr_t H5Sencode(hid_t obj_id, void *buf, size_t *nalloc);
-H5_DLL hid_t H5Sdecode(const void *buf);
-H5_DLL hssize_t H5Sget_simple_extent_npoints(hid_t space_id);
-H5_DLL int H5Sget_simple_extent_ndims(hid_t space_id);
-H5_DLL int H5Sget_simple_extent_dims(hid_t space_id, hsize_t dims[],
-				      hsize_t maxdims[]);
-H5_DLL htri_t H5Sis_simple(hid_t space_id);
-H5_DLL hssize_t H5Sget_select_npoints(hid_t spaceid);
-H5_DLL herr_t H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op,
-				   const hsize_t start[],
-				   const hsize_t _stride[],
-				   const hsize_t count[],
-				   const hsize_t _block[]);
-/* #define NEW_HYPERSLAB_API */
-#ifdef NEW_HYPERSLAB_API
-H5_DLL hid_t H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op,
-				   const hsize_t start[],
-				   const hsize_t _stride[],
-				   const hsize_t count[],
-				   const hsize_t _block[]);
-H5_DLL herr_t H5Sselect_select(hid_t space1_id, H5S_seloper_t op,
-                                  hid_t space2_id);
-H5_DLL hid_t H5Scombine_select(hid_t space1_id, H5S_seloper_t op,
-                                  hid_t space2_id);
-#endif /* NEW_HYPERSLAB_API */
-H5_DLL herr_t H5Sselect_elements(hid_t space_id, H5S_seloper_t op,
-    size_t num_elem, const hsize_t *coord);
-H5_DLL H5S_class_t H5Sget_simple_extent_type(hid_t space_id);
-H5_DLL herr_t H5Sset_extent_none(hid_t space_id);
-H5_DLL herr_t H5Sextent_copy(hid_t dst_id,hid_t src_id);
-H5_DLL htri_t H5Sextent_equal(hid_t sid1, hid_t sid2);
-H5_DLL herr_t H5Sselect_all(hid_t spaceid);
-H5_DLL herr_t H5Sselect_none(hid_t spaceid);
-H5_DLL herr_t H5Soffset_simple(hid_t space_id, const hssize_t *offset);
-H5_DLL htri_t H5Sselect_valid(hid_t spaceid);
-H5_DLL hssize_t H5Sget_select_hyper_nblocks(hid_t spaceid);
-H5_DLL hssize_t H5Sget_select_elem_npoints(hid_t spaceid);
-H5_DLL herr_t H5Sget_select_hyper_blocklist(hid_t spaceid, hsize_t startblock,
-    hsize_t numblocks, hsize_t buf[/*numblocks*/]);
-H5_DLL herr_t H5Sget_select_elem_pointlist(hid_t spaceid, hsize_t startpoint,
-    hsize_t numpoints, hsize_t buf[/*numpoints*/]);
-H5_DLL herr_t H5Sget_select_bounds(hid_t spaceid, hsize_t start[],
-    hsize_t end[]);
-H5_DLL H5S_sel_type H5Sget_select_type(hid_t spaceid);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _H5Spublic_H */
-
diff --git a/interfaces/ext/hdf5/H5StrType.h b/interfaces/ext/hdf5/H5StrType.h
deleted file mode 100644
index 8e79712..0000000
--- a/interfaces/ext/hdf5/H5StrType.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5StrType_H
-#define _H5StrType_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP StrType : public AtomType {
-   public:
-	// Creates a string type using a predefined type
-	StrType(const PredType& pred_type);
-
-	// Creates a string type with specified length - may be obsolete
-	StrType(const PredType& pred_type, const size_t& size);
-
-	// Creates a string type with specified length
-	StrType(const int dummy, const size_t& size);
-
-        // Gets the string datatype of the specified dataset
-	StrType(const DataSet& dataset);
-
-	// Retrieves the character set type of this string datatype.
-	H5T_cset_t getCset() const;
-
-	// Sets character set to be used.
-	void setCset(H5T_cset_t cset) const;
-
-	// Retrieves the string padding method for this string datatype.
-	H5T_str_t getStrpad() const;
-
-	// Defines the storage mechanism for character strings.
-	void setStrpad(H5T_str_t strpad) const;
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("StrType"); }
-
-	// default constructor
-	StrType();
-
-	// Creates a string datatype using an existing id
-	StrType(const hid_t existing_id);
-
-	// Copy constructor - makes a copy of the original object
-	StrType(const StrType& original);
-
-	// Noop destructor.
-	virtual ~StrType();
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5TBpublic.h b/interfaces/ext/hdf5/H5TBpublic.h
deleted file mode 100644
index 4dd17bb..0000000
--- a/interfaces/ext/hdf5/H5TBpublic.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef _H5TBpublic_H
-#define _H5TBpublic_H
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*-------------------------------------------------------------------------
- *
- * Create functions
- *
- *-------------------------------------------------------------------------
- */
-
-H5_HLDLL herr_t  H5TBmake_table( const char *table_title,
-                       hid_t loc_id,
-                       const char *dset_name,
-                       hsize_t nfields,
-                       hsize_t nrecords,
-                       size_t type_size,
-                       const char *field_names[],
-                       const size_t *field_offset,
-                       const hid_t *field_types,
-                       hsize_t chunk_size,
-                       void *fill_data,
-                       int compress,
-                       const void *buf );
-
-
-/*-------------------------------------------------------------------------
- *
- * Write functions
- *
- *-------------------------------------------------------------------------
- */
-
-H5_HLDLL herr_t  H5TBappend_records( hid_t loc_id,
-                           const char *dset_name,
-                           hsize_t nrecords,
-                           size_t type_size,
-                           const size_t *field_offset,
-                           const size_t *dst_sizes,
-                           const void *buf );
-
-H5_HLDLL herr_t  H5TBwrite_records( hid_t loc_id,
-                          const char *dset_name,
-                          hsize_t start,
-                          hsize_t nrecords,
-                          size_t type_size,
-                          const size_t *field_offset,
-                          const size_t *dst_sizes,
-                          const void *buf );
-
-
-H5_HLDLL herr_t  H5TBwrite_fields_name( hid_t loc_id,
-                              const char *dset_name,
-                              const char *field_names,
-                              hsize_t start,
-                              hsize_t nrecords,
-                              size_t type_size,
-                              const size_t *field_offset,
-                              const size_t *dst_sizes,
-                              const void *buf );
-
-H5_HLDLL herr_t  H5TBwrite_fields_index( hid_t loc_id,
-                               const char *dset_name,
-                               hsize_t nfields,
-                               const int *field_index,
-                               hsize_t start,
-                               hsize_t nrecords,
-                               size_t type_size,
-                               const size_t *field_offset,
-                               const size_t *dst_sizes,
-                               const void *buf );
-
-
-/*-------------------------------------------------------------------------
- *
- * Read functions
- *
- *-------------------------------------------------------------------------
- */
-
-
-
-H5_HLDLL herr_t  H5TBread_table( hid_t loc_id,
-                       const char *dset_name,
-                       size_t dst_size,
-                       const size_t *dst_offset,
-                       const size_t *dst_sizes,
-                       void *dst_buf );
-
-
-H5_HLDLL herr_t  H5TBread_fields_name( hid_t loc_id,
-                             const char *dset_name,
-                             const char *field_names,
-                             hsize_t start,
-                             hsize_t nrecords,
-                             size_t type_size,
-                             const size_t *field_offset,
-                             const size_t *dst_sizes,
-                             void *buf );
-
-H5_HLDLL herr_t  H5TBread_fields_index( hid_t loc_id,
-                              const char *dset_name,
-                              hsize_t nfields,
-                              const int *field_index,
-                              hsize_t start,
-                              hsize_t nrecords,
-                              size_t type_size,
-                              const size_t *field_offset,
-                              const size_t *dst_sizes,
-                              void *buf );
-
-
-H5_HLDLL herr_t  H5TBread_records( hid_t loc_id,
-                         const char *dset_name,
-                         hsize_t start,
-                         hsize_t nrecords,
-                         size_t type_size,
-                         const size_t *dst_offset,
-                         const size_t *dst_sizes,
-                         void *buf );
-
-/*-------------------------------------------------------------------------
- *
- * Inquiry functions
- *
- *-------------------------------------------------------------------------
- */
-
-
-H5_HLDLL herr_t  H5TBget_table_info ( hid_t loc_id,
-                            const char *dset_name,
-                            hsize_t *nfields,
-                            hsize_t *nrecords );
-
-H5_HLDLL herr_t  H5TBget_field_info( hid_t loc_id,
-                           const char *dset_name,
-                           char *field_names[],
-                           size_t *field_sizes,
-                           size_t *field_offsets,
-                           size_t *type_size );
-
-
-/*-------------------------------------------------------------------------
- *
- * Manipulation functions
- *
- *-------------------------------------------------------------------------
- */
-
-
-H5_HLDLL herr_t  H5TBdelete_record( hid_t loc_id,
-                          const char *dset_name,
-                          hsize_t start,
-                          hsize_t nrecords );
-
-
-H5_HLDLL herr_t  H5TBinsert_record( hid_t loc_id,
-                          const char *dset_name,
-                          hsize_t start,
-                          hsize_t nrecords,
-                          size_t dst_size,
-                          const size_t *dst_offset,
-                          const size_t *dst_sizes,
-                          void *buf );
-
-H5_HLDLL herr_t  H5TBadd_records_from( hid_t loc_id,
-                             const char *dset_name1,
-                             hsize_t start1,
-                             hsize_t nrecords,
-                             const char *dset_name2,
-                             hsize_t start2 );
-
-H5_HLDLL herr_t  H5TBcombine_tables( hid_t loc_id1,
-                           const char *dset_name1,
-                           hid_t loc_id2,
-                           const char *dset_name2,
-                           const char *dset_name3 );
-
-H5_HLDLL herr_t  H5TBinsert_field( hid_t loc_id,
-                         const char *dset_name,
-                         const char *field_name,
-                         hid_t field_type,
-                         hsize_t position,
-                         const void *fill_data,
-                         const void *buf );
-
-H5_HLDLL herr_t  H5TBdelete_field( hid_t loc_id,
-                         const char *dset_name,
-                         const char *field_name );
-
-
-/*-------------------------------------------------------------------------
- *
- * Table attribute functions
- *
- *-------------------------------------------------------------------------
- */
-
-H5_HLDLL herr_t  H5TBAget_title( hid_t loc_id,
-                       char *table_title );
-
-H5_HLDLL herr_t  H5TBAget_fill( hid_t loc_id,
-                      const char *dset_name,
-                      hid_t dset_id,
-                      unsigned char *dst_buf );
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
-
diff --git a/interfaces/ext/hdf5/H5Tpublic.h b/interfaces/ext/hdf5/H5Tpublic.h
deleted file mode 100644
index d646ef1..0000000
--- a/interfaces/ext/hdf5/H5Tpublic.h
+++ /dev/null
@@ -1,621 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This file contains public declarations for the H5T module.
- */
-#ifndef _H5Tpublic_H
-#define _H5Tpublic_H
-
-/* Public headers needed by this file */
-#include "H5public.h"
-#include "H5Ipublic.h"
-
-#define HOFFSET(S,M)    (offsetof(S,M))
-
-/* These are the various classes of datatypes */
-/* If this goes over 16 types (0-15), the file format will need to change) */
-typedef enum H5T_class_t {
-    H5T_NO_CLASS         = -1,  /*error                                      */
-    H5T_INTEGER          = 0,   /*integer types                              */
-    H5T_FLOAT            = 1,   /*floating-point types                       */
-    H5T_TIME             = 2,   /*date and time types                        */
-    H5T_STRING           = 3,   /*character string types                     */
-    H5T_BITFIELD         = 4,   /*bit field types                            */
-    H5T_OPAQUE           = 5,   /*opaque types                               */
-    H5T_COMPOUND         = 6,   /*compound types                             */
-    H5T_REFERENCE        = 7,   /*reference types                            */
-    H5T_ENUM		 = 8,	/*enumeration types                          */
-    H5T_VLEN		 = 9,	/*Variable-Length types                      */
-    H5T_ARRAY	         = 10,	/*Array types                                */
-
-    H5T_NCLASSES                /*this must be last                          */
-} H5T_class_t;
-
-/* Byte orders */
-typedef enum H5T_order_t {
-    H5T_ORDER_ERROR      = -1,  /*error                                      */
-    H5T_ORDER_LE         = 0,   /*little endian                              */
-    H5T_ORDER_BE         = 1,   /*bit endian                                 */
-    H5T_ORDER_VAX        = 2,   /*VAX mixed endian                           */
-    H5T_ORDER_MIXED      = 3,   /*Compound type with mixed member orders     */
-    H5T_ORDER_NONE       = 4    /*no particular order (strings, bits,..)     */
-    /*H5T_ORDER_NONE must be last */
-} H5T_order_t;
-
-/* Types of integer sign schemes */
-typedef enum H5T_sign_t {
-    H5T_SGN_ERROR        = -1,  /*error                                      */
-    H5T_SGN_NONE         = 0,   /*this is an unsigned type                   */
-    H5T_SGN_2            = 1,   /*two's complement                           */
-
-    H5T_NSGN             = 2    /*this must be last!                         */
-} H5T_sign_t;
-
-/* Floating-point normalization schemes */
-typedef enum H5T_norm_t {
-    H5T_NORM_ERROR       = -1,  /*error                                      */
-    H5T_NORM_IMPLIED     = 0,   /*msb of mantissa isn't stored, always 1     */
-    H5T_NORM_MSBSET      = 1,   /*msb of mantissa is always 1                */
-    H5T_NORM_NONE        = 2    /*not normalized                             */
-    /*H5T_NORM_NONE must be last */
-} H5T_norm_t;
-
-/*
- * Character set to use for text strings.  Do not change these values since
- * they appear in HDF5 files!
- */
-typedef enum H5T_cset_t {
-    H5T_CSET_ERROR       = -1,  /*error                                      */
-    H5T_CSET_ASCII       = 0,   /*US ASCII                                   */
-    H5T_CSET_UTF8        = 1,   /*UTF-8 Unicode encoding		     */
-    H5T_CSET_RESERVED_2  = 2,   /*reserved for later use		     */
-    H5T_CSET_RESERVED_3  = 3,   /*reserved for later use		     */
-    H5T_CSET_RESERVED_4  = 4,   /*reserved for later use		     */
-    H5T_CSET_RESERVED_5  = 5,   /*reserved for later use		     */
-    H5T_CSET_RESERVED_6  = 6,   /*reserved for later use		     */
-    H5T_CSET_RESERVED_7  = 7,   /*reserved for later use		     */
-    H5T_CSET_RESERVED_8  = 8,   /*reserved for later use		     */
-    H5T_CSET_RESERVED_9  = 9,   /*reserved for later use		     */
-    H5T_CSET_RESERVED_10 = 10,  /*reserved for later use		     */
-    H5T_CSET_RESERVED_11 = 11,  /*reserved for later use		     */
-    H5T_CSET_RESERVED_12 = 12,  /*reserved for later use		     */
-    H5T_CSET_RESERVED_13 = 13,  /*reserved for later use		     */
-    H5T_CSET_RESERVED_14 = 14,  /*reserved for later use		     */
-    H5T_CSET_RESERVED_15 = 15   /*reserved for later use		     */
-} H5T_cset_t;
-#define H5T_NCSET H5T_CSET_RESERVED_2    		/*Number of character sets actually defined  */
-
-/*
- * Type of padding to use in character strings.  Do not change these values
- * since they appear in HDF5 files!
- */
-typedef enum H5T_str_t {
-    H5T_STR_ERROR        = -1,  /*error                                      */
-    H5T_STR_NULLTERM     = 0,   /*null terminate like in C                   */
-    H5T_STR_NULLPAD      = 1,   /*pad with nulls                             */
-    H5T_STR_SPACEPAD     = 2,   /*pad with spaces like in Fortran            */
-    H5T_STR_RESERVED_3   = 3,   /*reserved for later use		     */
-    H5T_STR_RESERVED_4   = 4,   /*reserved for later use		     */
-    H5T_STR_RESERVED_5   = 5,   /*reserved for later use		     */
-    H5T_STR_RESERVED_6   = 6,   /*reserved for later use		     */
-    H5T_STR_RESERVED_7   = 7,   /*reserved for later use		     */
-    H5T_STR_RESERVED_8   = 8,   /*reserved for later use		     */
-    H5T_STR_RESERVED_9   = 9,   /*reserved for later use		     */
-    H5T_STR_RESERVED_10  = 10,  /*reserved for later use		     */
-    H5T_STR_RESERVED_11  = 11,  /*reserved for later use		     */
-    H5T_STR_RESERVED_12  = 12,  /*reserved for later use		     */
-    H5T_STR_RESERVED_13  = 13,  /*reserved for later use		     */
-    H5T_STR_RESERVED_14  = 14,  /*reserved for later use		     */
-    H5T_STR_RESERVED_15  = 15   /*reserved for later use		     */
-} H5T_str_t;
-#define H5T_NSTR H5T_STR_RESERVED_3		/*num H5T_str_t types actually defined	     */
-
-/* Type of padding to use in other atomic types */
-typedef enum H5T_pad_t {
-    H5T_PAD_ERROR        = -1,  /*error                                      */
-    H5T_PAD_ZERO         = 0,   /*always set to zero                         */
-    H5T_PAD_ONE          = 1,   /*always set to one                          */
-    H5T_PAD_BACKGROUND   = 2,   /*set to background value                    */
-
-    H5T_NPAD             = 3    /*THIS MUST BE LAST                          */
-} H5T_pad_t;
-
-/* Commands sent to conversion functions */
-typedef enum H5T_cmd_t {
-    H5T_CONV_INIT	= 0,	/*query and/or initialize private data	     */
-    H5T_CONV_CONV	= 1, 	/*convert data from source to dest datatype */
-    H5T_CONV_FREE	= 2	/*function is being removed from path	     */
-} H5T_cmd_t;
-
-/* How is the `bkg' buffer used by the conversion function? */
-typedef enum H5T_bkg_t {
-    H5T_BKG_NO		= 0, 	/*background buffer is not needed, send NULL */
-    H5T_BKG_TEMP	= 1,	/*bkg buffer used as temp storage only       */
-    H5T_BKG_YES		= 2	/*init bkg buf with data before conversion   */
-} H5T_bkg_t;
-
-/* Type conversion client data */
-typedef struct H5T_cdata_t {
-    H5T_cmd_t		command;/*what should the conversion function do?    */
-    H5T_bkg_t		need_bkg;/*is the background buffer needed?	     */
-    hbool_t		recalc;	/*recalculate private data		     */
-    void		*priv;	/*private data				     */
-} H5T_cdata_t;
-
-/* Conversion function persistence */
-typedef enum H5T_pers_t {
-    H5T_PERS_DONTCARE	= -1, 	/*wild card				     */
-    H5T_PERS_HARD	= 0,	/*hard conversion function		     */
-    H5T_PERS_SOFT	= 1 	/*soft conversion function		     */
-} H5T_pers_t;
-
-/* The order to retrieve atomic native datatype */
-typedef enum H5T_direction_t {
-    H5T_DIR_DEFAULT     = 0,    /*default direction is inscendent            */
-    H5T_DIR_ASCEND      = 1,    /*in inscendent order                        */
-    H5T_DIR_DESCEND     = 2     /*in descendent order                        */
-} H5T_direction_t;
-
-/* The exception type passed into the conversion callback function */
-typedef enum H5T_conv_except_t {
-    H5T_CONV_EXCEPT_RANGE_HI       = 0,   /*source value is greater than destination's range */
-    H5T_CONV_EXCEPT_RANGE_LOW      = 1,   /*source value is less than destination's range    */
-    H5T_CONV_EXCEPT_PRECISION      = 2,   /*source value loses precision in destination      */
-    H5T_CONV_EXCEPT_TRUNCATE       = 3,   /*source value is truncated in destination         */
-    H5T_CONV_EXCEPT_PINF           = 4,   /*source value is positive infinity(floating number) */
-    H5T_CONV_EXCEPT_NINF           = 5,   /*source value is negative infinity(floating number) */
-    H5T_CONV_EXCEPT_NAN            = 6    /*source value is NaN(floating number)             */
-} H5T_conv_except_t;
-
-/* The return value from conversion callback function H5T_conv_except_func_t */
-typedef enum H5T_conv_ret_t {
-    H5T_CONV_ABORT      = -1,   /*abort conversion                           */
-    H5T_CONV_UNHANDLED  = 0,    /*callback function failed to handle the exception      */
-    H5T_CONV_HANDLED    = 1     /*callback function handled the exception successfully  */
-} H5T_conv_ret_t;
-
-/* Variable Length Datatype struct in memory */
-/* (This is only used for VL sequences, not VL strings, which are stored in char *'s) */
-typedef struct {
-    size_t len; /* Length of VL data (in base type units) */
-    void *p;    /* Pointer to VL data */
-} hvl_t;
-
-/* Variable Length String information */
-#define H5T_VARIABLE    ((size_t)(-1))  /* Indicate that a string is variable length (null-terminated in C, instead of fixed length) */
-
-/* Opaque information */
-#define H5T_OPAQUE_TAG_MAX      256     /* Maximum length of an opaque tag */
-                                        /* This could be raised without too much difficulty */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* All datatype conversion functions are... */
-typedef herr_t (*H5T_conv_t) (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
-      size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf,
-      void *bkg, hid_t dset_xfer_plist);
-
-/* Exception handler.  If an exception like overflow happenes during conversion,
- * this function is called if it's registered through H5Pset_type_conv_cb.
- */
-typedef H5T_conv_ret_t (*H5T_conv_except_func_t)(H5T_conv_except_t except_type,
-    hid_t src_id, hid_t dst_id, void *src_buf, void *dst_buf, void *user_data);
-
-/* When this header is included from a private header, don't make calls to H5open() */
-#undef H5OPEN
-#ifndef _H5private_H
-#define H5OPEN          H5open(),
-#else   /* _H5private_H */
-#define H5OPEN
-#endif  /* _H5private_H */
-
-/*
- * The IEEE floating point types in various byte orders.
- */
-#define H5T_IEEE_F32BE		(H5OPEN H5T_IEEE_F32BE_g)
-#define H5T_IEEE_F32LE		(H5OPEN H5T_IEEE_F32LE_g)
-#define H5T_IEEE_F64BE		(H5OPEN H5T_IEEE_F64BE_g)
-#define H5T_IEEE_F64LE		(H5OPEN H5T_IEEE_F64LE_g)
-H5_DLLVAR hid_t H5T_IEEE_F32BE_g;
-H5_DLLVAR hid_t H5T_IEEE_F32LE_g;
-H5_DLLVAR hid_t H5T_IEEE_F64BE_g;
-H5_DLLVAR hid_t H5T_IEEE_F64LE_g;
-
-/*
- * These are "standard" types.  For instance, signed (2's complement) and
- * unsigned integers of various sizes and byte orders.
- */
-#define H5T_STD_I8BE		(H5OPEN H5T_STD_I8BE_g)
-#define H5T_STD_I8LE		(H5OPEN H5T_STD_I8LE_g)
-#define H5T_STD_I16BE		(H5OPEN H5T_STD_I16BE_g)
-#define H5T_STD_I16LE		(H5OPEN H5T_STD_I16LE_g)
-#define H5T_STD_I32BE		(H5OPEN H5T_STD_I32BE_g)
-#define H5T_STD_I32LE		(H5OPEN H5T_STD_I32LE_g)
-#define H5T_STD_I64BE		(H5OPEN H5T_STD_I64BE_g)
-#define H5T_STD_I64LE		(H5OPEN H5T_STD_I64LE_g)
-#define H5T_STD_U8BE		(H5OPEN H5T_STD_U8BE_g)
-#define H5T_STD_U8LE		(H5OPEN H5T_STD_U8LE_g)
-#define H5T_STD_U16BE		(H5OPEN H5T_STD_U16BE_g)
-#define H5T_STD_U16LE		(H5OPEN H5T_STD_U16LE_g)
-#define H5T_STD_U32BE		(H5OPEN H5T_STD_U32BE_g)
-#define H5T_STD_U32LE		(H5OPEN H5T_STD_U32LE_g)
-#define H5T_STD_U64BE		(H5OPEN H5T_STD_U64BE_g)
-#define H5T_STD_U64LE		(H5OPEN H5T_STD_U64LE_g)
-#define H5T_STD_B8BE		(H5OPEN H5T_STD_B8BE_g)
-#define H5T_STD_B8LE		(H5OPEN H5T_STD_B8LE_g)
-#define H5T_STD_B16BE		(H5OPEN H5T_STD_B16BE_g)
-#define H5T_STD_B16LE		(H5OPEN H5T_STD_B16LE_g)
-#define H5T_STD_B32BE		(H5OPEN H5T_STD_B32BE_g)
-#define H5T_STD_B32LE		(H5OPEN H5T_STD_B32LE_g)
-#define H5T_STD_B64BE		(H5OPEN H5T_STD_B64BE_g)
-#define H5T_STD_B64LE		(H5OPEN H5T_STD_B64LE_g)
-#define H5T_STD_REF_OBJ	        (H5OPEN H5T_STD_REF_OBJ_g)
-#define H5T_STD_REF_DSETREG     (H5OPEN H5T_STD_REF_DSETREG_g)
-H5_DLLVAR hid_t H5T_STD_I8BE_g;
-H5_DLLVAR hid_t H5T_STD_I8LE_g;
-H5_DLLVAR hid_t H5T_STD_I16BE_g;
-H5_DLLVAR hid_t H5T_STD_I16LE_g;
-H5_DLLVAR hid_t H5T_STD_I32BE_g;
-H5_DLLVAR hid_t H5T_STD_I32LE_g;
-H5_DLLVAR hid_t H5T_STD_I64BE_g;
-H5_DLLVAR hid_t H5T_STD_I64LE_g;
-H5_DLLVAR hid_t H5T_STD_U8BE_g;
-H5_DLLVAR hid_t H5T_STD_U8LE_g;
-H5_DLLVAR hid_t H5T_STD_U16BE_g;
-H5_DLLVAR hid_t H5T_STD_U16LE_g;
-H5_DLLVAR hid_t H5T_STD_U32BE_g;
-H5_DLLVAR hid_t H5T_STD_U32LE_g;
-H5_DLLVAR hid_t H5T_STD_U64BE_g;
-H5_DLLVAR hid_t H5T_STD_U64LE_g;
-H5_DLLVAR hid_t H5T_STD_B8BE_g;
-H5_DLLVAR hid_t H5T_STD_B8LE_g;
-H5_DLLVAR hid_t H5T_STD_B16BE_g;
-H5_DLLVAR hid_t H5T_STD_B16LE_g;
-H5_DLLVAR hid_t H5T_STD_B32BE_g;
-H5_DLLVAR hid_t H5T_STD_B32LE_g;
-H5_DLLVAR hid_t H5T_STD_B64BE_g;
-H5_DLLVAR hid_t H5T_STD_B64LE_g;
-H5_DLLVAR hid_t H5T_STD_REF_OBJ_g;
-H5_DLLVAR hid_t H5T_STD_REF_DSETREG_g;
-
-/*
- * Types which are particular to Unix.
- */
-#define H5T_UNIX_D32BE		(H5OPEN H5T_UNIX_D32BE_g)
-#define H5T_UNIX_D32LE		(H5OPEN H5T_UNIX_D32LE_g)
-#define H5T_UNIX_D64BE		(H5OPEN H5T_UNIX_D64BE_g)
-#define H5T_UNIX_D64LE		(H5OPEN H5T_UNIX_D64LE_g)
-H5_DLLVAR hid_t H5T_UNIX_D32BE_g;
-H5_DLLVAR hid_t H5T_UNIX_D32LE_g;
-H5_DLLVAR hid_t H5T_UNIX_D64BE_g;
-H5_DLLVAR hid_t H5T_UNIX_D64LE_g;
-
-/*
- * Types particular to the C language.  String types use `bytes' instead
- * of `bits' as their size.
- */
-#define H5T_C_S1		(H5OPEN H5T_C_S1_g)
-H5_DLLVAR hid_t H5T_C_S1_g;
-
-/*
- * Types particular to Fortran.
- */
-#define H5T_FORTRAN_S1		(H5OPEN H5T_FORTRAN_S1_g)
-H5_DLLVAR hid_t H5T_FORTRAN_S1_g;
-
-/*
- * These types are for Intel CPU's.  They are little endian with IEEE
- * floating point.
- */
-#define H5T_INTEL_I8		H5T_STD_I8LE
-#define H5T_INTEL_I16		H5T_STD_I16LE
-#define H5T_INTEL_I32		H5T_STD_I32LE
-#define H5T_INTEL_I64		H5T_STD_I64LE
-#define H5T_INTEL_U8		H5T_STD_U8LE
-#define H5T_INTEL_U16		H5T_STD_U16LE
-#define H5T_INTEL_U32		H5T_STD_U32LE
-#define H5T_INTEL_U64		H5T_STD_U64LE
-#define H5T_INTEL_B8		H5T_STD_B8LE
-#define H5T_INTEL_B16		H5T_STD_B16LE
-#define H5T_INTEL_B32		H5T_STD_B32LE
-#define H5T_INTEL_B64		H5T_STD_B64LE
-#define H5T_INTEL_F32		H5T_IEEE_F32LE
-#define H5T_INTEL_F64		H5T_IEEE_F64LE
-
-/*
- * These types are for DEC Alpha CPU's.  They are little endian with IEEE
- * floating point.
- */
-#define H5T_ALPHA_I8		H5T_STD_I8LE
-#define H5T_ALPHA_I16		H5T_STD_I16LE
-#define H5T_ALPHA_I32		H5T_STD_I32LE
-#define H5T_ALPHA_I64		H5T_STD_I64LE
-#define H5T_ALPHA_U8		H5T_STD_U8LE
-#define H5T_ALPHA_U16		H5T_STD_U16LE
-#define H5T_ALPHA_U32		H5T_STD_U32LE
-#define H5T_ALPHA_U64		H5T_STD_U64LE
-#define H5T_ALPHA_B8		H5T_STD_B8LE
-#define H5T_ALPHA_B16		H5T_STD_B16LE
-#define H5T_ALPHA_B32		H5T_STD_B32LE
-#define H5T_ALPHA_B64		H5T_STD_B64LE
-#define H5T_ALPHA_F32		H5T_IEEE_F32LE
-#define H5T_ALPHA_F64		H5T_IEEE_F64LE
-
-/*
- * These types are for MIPS cpu's commonly used in SGI systems. They are big
- * endian with IEEE floating point.
- */
-#define H5T_MIPS_I8		H5T_STD_I8BE
-#define H5T_MIPS_I16		H5T_STD_I16BE
-#define H5T_MIPS_I32		H5T_STD_I32BE
-#define H5T_MIPS_I64		H5T_STD_I64BE
-#define H5T_MIPS_U8		H5T_STD_U8BE
-#define H5T_MIPS_U16		H5T_STD_U16BE
-#define H5T_MIPS_U32		H5T_STD_U32BE
-#define H5T_MIPS_U64		H5T_STD_U64BE
-#define H5T_MIPS_B8		H5T_STD_B8BE
-#define H5T_MIPS_B16		H5T_STD_B16BE
-#define H5T_MIPS_B32		H5T_STD_B32BE
-#define H5T_MIPS_B64		H5T_STD_B64BE
-#define H5T_MIPS_F32		H5T_IEEE_F32BE
-#define H5T_MIPS_F64		H5T_IEEE_F64BE
-
-/*
- * The VAX floating point types (i.e. in VAX byte order)
- */
-#define H5T_VAX_F32		(H5OPEN H5T_VAX_F32_g)
-#define H5T_VAX_F64		(H5OPEN H5T_VAX_F64_g)
-H5_DLLVAR hid_t H5T_VAX_F32_g;
-H5_DLLVAR hid_t H5T_VAX_F64_g;
-
-/*
- * The predefined native types. These are the types detected by H5detect and
- * they violate the naming scheme a little.  Instead of a class name,
- * precision and byte order as the last component, they have a C-like type
- * name.  If the type begins with `U' then it is the unsigned version of the
- * integer type; other integer types are signed.  The type LLONG corresponds
- * to C's `long long' and LDOUBLE is `long double' (these types might be the
- * same as `LONG' and `DOUBLE' respectively).
- */
-#define H5T_NATIVE_CHAR		(CHAR_MIN?H5T_NATIVE_SCHAR:H5T_NATIVE_UCHAR)
-#define H5T_NATIVE_SCHAR        (H5OPEN H5T_NATIVE_SCHAR_g)
-#define H5T_NATIVE_UCHAR        (H5OPEN H5T_NATIVE_UCHAR_g)
-#define H5T_NATIVE_SHORT        (H5OPEN H5T_NATIVE_SHORT_g)
-#define H5T_NATIVE_USHORT       (H5OPEN H5T_NATIVE_USHORT_g)
-#define H5T_NATIVE_INT          (H5OPEN H5T_NATIVE_INT_g)
-#define H5T_NATIVE_UINT         (H5OPEN H5T_NATIVE_UINT_g)
-#define H5T_NATIVE_LONG         (H5OPEN H5T_NATIVE_LONG_g)
-#define H5T_NATIVE_ULONG        (H5OPEN H5T_NATIVE_ULONG_g)
-#define H5T_NATIVE_LLONG        (H5OPEN H5T_NATIVE_LLONG_g)
-#define H5T_NATIVE_ULLONG       (H5OPEN H5T_NATIVE_ULLONG_g)
-#define H5T_NATIVE_FLOAT        (H5OPEN H5T_NATIVE_FLOAT_g)
-#define H5T_NATIVE_DOUBLE       (H5OPEN H5T_NATIVE_DOUBLE_g)
-#if H5_SIZEOF_LONG_DOUBLE !=0
-#define H5T_NATIVE_LDOUBLE	(H5OPEN H5T_NATIVE_LDOUBLE_g)
-#endif
-#define H5T_NATIVE_B8		(H5OPEN H5T_NATIVE_B8_g)
-#define H5T_NATIVE_B16		(H5OPEN H5T_NATIVE_B16_g)
-#define H5T_NATIVE_B32		(H5OPEN H5T_NATIVE_B32_g)
-#define H5T_NATIVE_B64		(H5OPEN H5T_NATIVE_B64_g)
-#define H5T_NATIVE_OPAQUE       (H5OPEN H5T_NATIVE_OPAQUE_g)
-#define H5T_NATIVE_HADDR	(H5OPEN H5T_NATIVE_HADDR_g)
-#define H5T_NATIVE_HSIZE	(H5OPEN H5T_NATIVE_HSIZE_g)
-#define H5T_NATIVE_HSSIZE	(H5OPEN H5T_NATIVE_HSSIZE_g)
-#define H5T_NATIVE_HERR		(H5OPEN H5T_NATIVE_HERR_g)
-#define H5T_NATIVE_HBOOL	(H5OPEN H5T_NATIVE_HBOOL_g)
-H5_DLLVAR hid_t H5T_NATIVE_SCHAR_g;
-H5_DLLVAR hid_t H5T_NATIVE_UCHAR_g;
-H5_DLLVAR hid_t H5T_NATIVE_SHORT_g;
-H5_DLLVAR hid_t H5T_NATIVE_USHORT_g;
-H5_DLLVAR hid_t H5T_NATIVE_INT_g;
-H5_DLLVAR hid_t H5T_NATIVE_UINT_g;
-H5_DLLVAR hid_t H5T_NATIVE_LONG_g;
-H5_DLLVAR hid_t H5T_NATIVE_ULONG_g;
-H5_DLLVAR hid_t H5T_NATIVE_LLONG_g;
-H5_DLLVAR hid_t H5T_NATIVE_ULLONG_g;
-H5_DLLVAR hid_t H5T_NATIVE_FLOAT_g;
-H5_DLLVAR hid_t H5T_NATIVE_DOUBLE_g;
-#if H5_SIZEOF_LONG_DOUBLE !=0
-H5_DLLVAR hid_t H5T_NATIVE_LDOUBLE_g;
-#endif
-H5_DLLVAR hid_t H5T_NATIVE_B8_g;
-H5_DLLVAR hid_t H5T_NATIVE_B16_g;
-H5_DLLVAR hid_t H5T_NATIVE_B32_g;
-H5_DLLVAR hid_t H5T_NATIVE_B64_g;
-H5_DLLVAR hid_t H5T_NATIVE_OPAQUE_g;
-H5_DLLVAR hid_t H5T_NATIVE_HADDR_g;
-H5_DLLVAR hid_t H5T_NATIVE_HSIZE_g;
-H5_DLLVAR hid_t H5T_NATIVE_HSSIZE_g;
-H5_DLLVAR hid_t H5T_NATIVE_HERR_g;
-H5_DLLVAR hid_t H5T_NATIVE_HBOOL_g;
-
-/* C9x integer types */
-#define H5T_NATIVE_INT8			(H5OPEN H5T_NATIVE_INT8_g)
-#define H5T_NATIVE_UINT8		(H5OPEN H5T_NATIVE_UINT8_g)
-#define H5T_NATIVE_INT_LEAST8		(H5OPEN H5T_NATIVE_INT_LEAST8_g)
-#define H5T_NATIVE_UINT_LEAST8		(H5OPEN H5T_NATIVE_UINT_LEAST8_g)
-#define H5T_NATIVE_INT_FAST8 		(H5OPEN H5T_NATIVE_INT_FAST8_g)
-#define H5T_NATIVE_UINT_FAST8		(H5OPEN H5T_NATIVE_UINT_FAST8_g)
-H5_DLLVAR hid_t H5T_NATIVE_INT8_g;
-H5_DLLVAR hid_t H5T_NATIVE_UINT8_g;
-H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST8_g;
-H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST8_g;
-H5_DLLVAR hid_t H5T_NATIVE_INT_FAST8_g;
-H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST8_g;
-
-#define H5T_NATIVE_INT16		(H5OPEN H5T_NATIVE_INT16_g)
-#define H5T_NATIVE_UINT16		(H5OPEN H5T_NATIVE_UINT16_g)
-#define H5T_NATIVE_INT_LEAST16		(H5OPEN H5T_NATIVE_INT_LEAST16_g)
-#define H5T_NATIVE_UINT_LEAST16		(H5OPEN H5T_NATIVE_UINT_LEAST16_g)
-#define H5T_NATIVE_INT_FAST16		(H5OPEN H5T_NATIVE_INT_FAST16_g)
-#define H5T_NATIVE_UINT_FAST16		(H5OPEN H5T_NATIVE_UINT_FAST16_g)
-H5_DLLVAR hid_t H5T_NATIVE_INT16_g;
-H5_DLLVAR hid_t H5T_NATIVE_UINT16_g;
-H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST16_g;
-H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST16_g;
-H5_DLLVAR hid_t H5T_NATIVE_INT_FAST16_g;
-H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST16_g;
-
-#define H5T_NATIVE_INT32		(H5OPEN H5T_NATIVE_INT32_g)
-#define H5T_NATIVE_UINT32		(H5OPEN H5T_NATIVE_UINT32_g)
-#define H5T_NATIVE_INT_LEAST32		(H5OPEN H5T_NATIVE_INT_LEAST32_g)
-#define H5T_NATIVE_UINT_LEAST32		(H5OPEN H5T_NATIVE_UINT_LEAST32_g)
-#define H5T_NATIVE_INT_FAST32		(H5OPEN H5T_NATIVE_INT_FAST32_g)
-#define H5T_NATIVE_UINT_FAST32		(H5OPEN H5T_NATIVE_UINT_FAST32_g)
-H5_DLLVAR hid_t H5T_NATIVE_INT32_g;
-H5_DLLVAR hid_t H5T_NATIVE_UINT32_g;
-H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST32_g;
-H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST32_g;
-H5_DLLVAR hid_t H5T_NATIVE_INT_FAST32_g;
-H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST32_g;
-
-#define H5T_NATIVE_INT64		(H5OPEN H5T_NATIVE_INT64_g)
-#define H5T_NATIVE_UINT64		(H5OPEN H5T_NATIVE_UINT64_g)
-#define H5T_NATIVE_INT_LEAST64		(H5OPEN H5T_NATIVE_INT_LEAST64_g)
-#define H5T_NATIVE_UINT_LEAST64 	(H5OPEN H5T_NATIVE_UINT_LEAST64_g)
-#define H5T_NATIVE_INT_FAST64		(H5OPEN H5T_NATIVE_INT_FAST64_g)
-#define H5T_NATIVE_UINT_FAST64		(H5OPEN H5T_NATIVE_UINT_FAST64_g)
-H5_DLLVAR hid_t H5T_NATIVE_INT64_g;
-H5_DLLVAR hid_t H5T_NATIVE_UINT64_g;
-H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST64_g;
-H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST64_g;
-H5_DLLVAR hid_t H5T_NATIVE_INT_FAST64_g;
-H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST64_g;
-
-/* Operations defined on all datatypes */
-H5_DLL hid_t H5Tcreate(H5T_class_t type, size_t size);
-H5_DLL hid_t H5Tcopy(hid_t type_id);
-H5_DLL herr_t H5Tclose(hid_t type_id);
-H5_DLL htri_t H5Tequal(hid_t type1_id, hid_t type2_id);
-H5_DLL herr_t H5Tlock(hid_t type_id);
-H5_DLL herr_t H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id,
-    hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id);
-H5_DLL hid_t H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id);
-H5_DLL herr_t H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id);
-H5_DLL hid_t H5Tget_create_plist(hid_t type_id);
-H5_DLL htri_t H5Tcommitted(hid_t type_id);
-H5_DLL herr_t H5Tencode(hid_t obj_id, void *buf, size_t *nalloc);
-H5_DLL hid_t H5Tdecode(const void *buf);
-
-/* Operations defined on compound datatypes */
-H5_DLL herr_t H5Tinsert(hid_t parent_id, const char *name, size_t offset,
-			 hid_t member_id);
-H5_DLL herr_t H5Tpack(hid_t type_id);
-
-/* Operations defined on enumeration datatypes */
-H5_DLL hid_t H5Tenum_create(hid_t base_id);
-H5_DLL herr_t H5Tenum_insert(hid_t type, const char *name, const void *value);
-H5_DLL herr_t H5Tenum_nameof(hid_t type, const void *value, char *name/*out*/,
-			     size_t size);
-H5_DLL herr_t H5Tenum_valueof(hid_t type, const char *name,
-			      void *value/*out*/);
-
-/* Operations defined on variable-length datatypes */
-H5_DLL hid_t H5Tvlen_create(hid_t base_id);
-
-/* Operations defined on array datatypes */
-H5_DLL hid_t H5Tarray_create2(hid_t base_id, unsigned ndims,
-            const hsize_t dim[/* ndims */]);
-H5_DLL int H5Tget_array_ndims(hid_t type_id);
-H5_DLL int H5Tget_array_dims2(hid_t type_id, hsize_t dims[]);
-
-/* Operations defined on opaque datatypes */
-H5_DLL herr_t H5Tset_tag(hid_t type, const char *tag);
-H5_DLL char *H5Tget_tag(hid_t type);
-
-/* Querying property values */
-H5_DLL hid_t H5Tget_super(hid_t type);
-H5_DLL H5T_class_t H5Tget_class(hid_t type_id);
-H5_DLL htri_t H5Tdetect_class(hid_t type_id, H5T_class_t cls);
-H5_DLL size_t H5Tget_size(hid_t type_id);
-H5_DLL H5T_order_t H5Tget_order(hid_t type_id);
-H5_DLL size_t H5Tget_precision(hid_t type_id);
-H5_DLL int H5Tget_offset(hid_t type_id);
-H5_DLL herr_t H5Tget_pad(hid_t type_id, H5T_pad_t *lsb/*out*/,
-			  H5T_pad_t *msb/*out*/);
-H5_DLL H5T_sign_t H5Tget_sign(hid_t type_id);
-H5_DLL herr_t H5Tget_fields(hid_t type_id, size_t *spos/*out*/,
-			     size_t *epos/*out*/, size_t *esize/*out*/,
-			     size_t *mpos/*out*/, size_t *msize/*out*/);
-H5_DLL size_t H5Tget_ebias(hid_t type_id);
-H5_DLL H5T_norm_t H5Tget_norm(hid_t type_id);
-H5_DLL H5T_pad_t H5Tget_inpad(hid_t type_id);
-H5_DLL H5T_str_t H5Tget_strpad(hid_t type_id);
-H5_DLL int H5Tget_nmembers(hid_t type_id);
-H5_DLL char *H5Tget_member_name(hid_t type_id, unsigned membno);
-H5_DLL int H5Tget_member_index(hid_t type_id, const char *name);
-H5_DLL size_t H5Tget_member_offset(hid_t type_id, unsigned membno);
-H5_DLL H5T_class_t H5Tget_member_class(hid_t type_id, unsigned membno);
-H5_DLL hid_t H5Tget_member_type(hid_t type_id, unsigned membno);
-H5_DLL herr_t H5Tget_member_value(hid_t type_id, unsigned membno, void *value/*out*/);
-H5_DLL H5T_cset_t H5Tget_cset(hid_t type_id);
-H5_DLL htri_t H5Tis_variable_str(hid_t type_id);
-H5_DLL hid_t H5Tget_native_type(hid_t type_id, H5T_direction_t direction);
-
-/* Setting property values */
-H5_DLL herr_t H5Tset_size(hid_t type_id, size_t size);
-H5_DLL herr_t H5Tset_order(hid_t type_id, H5T_order_t order);
-H5_DLL herr_t H5Tset_precision(hid_t type_id, size_t prec);
-H5_DLL herr_t H5Tset_offset(hid_t type_id, size_t offset);
-H5_DLL herr_t H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb);
-H5_DLL herr_t H5Tset_sign(hid_t type_id, H5T_sign_t sign);
-H5_DLL herr_t H5Tset_fields(hid_t type_id, size_t spos, size_t epos,
-			     size_t esize, size_t mpos, size_t msize);
-H5_DLL herr_t H5Tset_ebias(hid_t type_id, size_t ebias);
-H5_DLL herr_t H5Tset_norm(hid_t type_id, H5T_norm_t norm);
-H5_DLL herr_t H5Tset_inpad(hid_t type_id, H5T_pad_t pad);
-H5_DLL herr_t H5Tset_cset(hid_t type_id, H5T_cset_t cset);
-H5_DLL herr_t H5Tset_strpad(hid_t type_id, H5T_str_t strpad);
-
-/* Type conversion database */
-H5_DLL herr_t H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id,
-			   hid_t dst_id, H5T_conv_t func);
-H5_DLL herr_t H5Tunregister(H5T_pers_t pers, const char *name, hid_t src_id,
-			     hid_t dst_id, H5T_conv_t func);
-H5_DLL H5T_conv_t H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata);
-H5_DLL htri_t H5Tcompiler_conv(hid_t src_id, hid_t dst_id);
-H5_DLL herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts,
-			  void *buf, void *background, hid_t plist_id);
-
-/* Symbols defined for compatibility with previous versions of the HDF5 API.
- *
- * Use of these symbols is deprecated.
- */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-
-/* Macros */
-
-
-/* Typedefs */
-
-
-/* Function prototypes */
-H5_DLL herr_t H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id);
-H5_DLL hid_t H5Topen1(hid_t loc_id, const char *name);
-H5_DLL hid_t H5Tarray_create1(hid_t base_id, int ndims,
-            const hsize_t dim[/* ndims */],
-            const int perm[/* ndims */]);
-H5_DLL int H5Tget_array_dims1(hid_t type_id, hsize_t dims[], int perm[]);
-
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _H5Tpublic_H */
-
diff --git a/interfaces/ext/hdf5/H5VarLenType.h b/interfaces/ext/hdf5/H5VarLenType.h
deleted file mode 100644
index 688b2cc..0000000
--- a/interfaces/ext/hdf5/H5VarLenType.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// C++ informative line for the emacs editor: -*- C++ -*-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-// Class VarLenType inherits from DataType and provides wrappers for
-// the HDF5 C's Variable-length Datatypes.
-
-#ifndef _H5VarLenType_H
-#define _H5VarLenType_H
-
-#ifndef H5_NO_NAMESPACE
-namespace H5 {
-#endif
-
-class H5_DLLCPP VarLenType : public DataType {
-   public:
-	// Constructor that creates a variable-length datatype based
-	// on the specified base type.
-	VarLenType(const DataType* base_type);
-
-	///\brief Returns this class name
-	virtual H5std_string fromClass () const { return("VarLenType"); }
-
-	// Copy constructor: makes copy of the original object.
-	VarLenType( const VarLenType& original );
-
-	// Constructor that takes an existing id
-	VarLenType( const hid_t existing_id );
-
-	// Noop destructor
-	virtual ~VarLenType();
-
-   protected:
-	// Default constructor
-	VarLenType();
-};
-#ifndef H5_NO_NAMESPACE
-}
-#endif
-#endif
diff --git a/interfaces/ext/hdf5/H5Zpublic.h b/interfaces/ext/hdf5/H5Zpublic.h
deleted file mode 100644
index 5d9b5ed..0000000
--- a/interfaces/ext/hdf5/H5Zpublic.h
+++ /dev/null
@@ -1,249 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* Programmer:  Robb Matzke <matzke at llnl.gov>
- *              Thursday, April 16, 1998
- */
-
-#ifndef _H5Zpublic_H
-#define _H5Zpublic_H
-
-/* Public headers needed by this file */
-#include "H5public.h"
-
-/*
- * Filter identifiers.  Values 0 through 255 are for filters defined by the
- * HDF5 library.  Values 256 through 511 are available for testing new
- * filters. Subsequent values should be obtained from the HDF5 development
- * team at hdf5dev at ncsa.uiuc.edu.  These values will never change because they
- * appear in the HDF5 files.
- */
-typedef int H5Z_filter_t;
-
-/* Filter IDs */
-#define H5Z_FILTER_ERROR	(-1)	/*no filter			*/
-#define H5Z_FILTER_NONE		0	/*reserved indefinitely		*/
-#define H5Z_FILTER_DEFLATE	1 	/*deflation like gzip	     	*/
-#define H5Z_FILTER_SHUFFLE      2       /*shuffle the data              */
-#define H5Z_FILTER_FLETCHER32   3       /*fletcher32 checksum of EDC    */
-#define H5Z_FILTER_SZIP         4       /*szip compression              */
-#define H5Z_FILTER_NBIT         5       /*nbit compression              */
-#define H5Z_FILTER_SCALEOFFSET  6       /*scale+offset compression      */
-#define H5Z_FILTER_RESERVED     256	/*filter ids below this value are reserved for library use */
-#define H5Z_FILTER_MAX		65535	/*maximum filter id		*/
-
-/* General macros */
-#define H5Z_FILTER_ALL	 	0	/* Symbol to remove all filters in H5Premove_filter */
-#define H5Z_MAX_NFILTERS        32      /* Maximum number of filters allowed in a pipeline */
-                                        /* (should probably be allowed to be an
-                                         * unlimited amount, but currently each
-                                         * filter uses a bit in a 32-bit field,
-                                         * so the format would have to be
-                                         * changed to accomodate that)
-                                         */
-
-/* Flags for filter definition (stored) */
-#define H5Z_FLAG_DEFMASK	0x00ff	/*definition flag mask		*/
-#define H5Z_FLAG_MANDATORY      0x0000  /*filter is mandatory		*/
-#define H5Z_FLAG_OPTIONAL	0x0001	/*filter is optional		*/
-
-/* Additional flags for filter invocation (not stored) */
-#define H5Z_FLAG_INVMASK	0xff00	/*invocation flag mask		*/
-#define H5Z_FLAG_REVERSE	0x0100	/*reverse direction; read	*/
-#define H5Z_FLAG_SKIP_EDC	0x0200	/*skip EDC filters for read	*/
-
-/* Special parameters for szip compression */
-/* [These are aliases for the similar definitions in szlib.h, which we can't
- * include directly due to the duplication of various symbols with the zlib.h
- * header file] */
-#define H5_SZIP_ALLOW_K13_OPTION_MASK   1
-#define H5_SZIP_CHIP_OPTION_MASK        2
-#define H5_SZIP_EC_OPTION_MASK          4
-#define H5_SZIP_NN_OPTION_MASK          32
-#define H5_SZIP_MAX_PIXELS_PER_BLOCK    32
-
-/* Macros for the shuffle filter */
-#define H5Z_SHUFFLE_USER_NPARMS    0    /* Number of parameters that users can set */
-#define H5Z_SHUFFLE_TOTAL_NPARMS   1    /* Total number of parameters for filter */
-
-/* Macros for the szip filter */
-#define H5Z_SZIP_USER_NPARMS    2       /* Number of parameters that users can set */
-#define H5Z_SZIP_TOTAL_NPARMS   4       /* Total number of parameters for filter */
-#define H5Z_SZIP_PARM_MASK      0       /* "User" parameter for option mask */
-#define H5Z_SZIP_PARM_PPB       1       /* "User" parameter for pixels-per-block */
-#define H5Z_SZIP_PARM_BPP       2       /* "Local" parameter for bits-per-pixel */
-#define H5Z_SZIP_PARM_PPS       3       /* "Local" parameter for pixels-per-scanline */
-
-/* Macros for the nbit filter */
-#define H5Z_NBIT_USER_NPARMS     0     /* Number of parameters that users can set */
-
-/* Macros for the scale offset filter */
-#define H5Z_SCALEOFFSET_USER_NPARMS      2    /* Number of parameters that users can set */
-
-
-/* Special parameters for ScaleOffset filter*/
-#define H5Z_SO_INT_MINBITS_DEFAULT 0
-typedef enum H5Z_SO_scale_type_t {
-    H5Z_SO_FLOAT_DSCALE = 0,
-    H5Z_SO_FLOAT_ESCALE = 1,
-    H5Z_SO_INT          = 2
-} H5Z_SO_scale_type_t;
-
-/* Current version of the H5Z_class_t struct */
-#define H5Z_CLASS_T_VERS (1)
-
-/* Values to decide if EDC is enabled for reading data */
-typedef enum H5Z_EDC_t {
-    H5Z_ERROR_EDC       = -1,   /* error value */
-    H5Z_DISABLE_EDC     = 0,
-    H5Z_ENABLE_EDC      = 1,
-    H5Z_NO_EDC          = 2     /* must be the last */
-} H5Z_EDC_t;
-
-/* Bit flags for H5Zget_filter_info */
-#define H5Z_FILTER_CONFIG_ENCODE_ENABLED (0x0001)
-#define H5Z_FILTER_CONFIG_DECODE_ENABLED (0x0002)
-
-/* Return values for filter callback function */
-typedef enum H5Z_cb_return_t {
-    H5Z_CB_ERROR  = -1,
-    H5Z_CB_FAIL   = 0,    /* I/O should fail if filter fails. */
-    H5Z_CB_CONT   = 1,    /* I/O continues if filter fails.   */
-    H5Z_CB_NO     = 2
-} H5Z_cb_return_t;
-
-/* Filter callback function definition */
-typedef H5Z_cb_return_t (*H5Z_filter_func_t)(H5Z_filter_t filter, void* buf,
-                                size_t buf_size, void* op_data);
-
-/* Structure for filter callback property */
-typedef struct H5Z_cb_t {
-    H5Z_filter_func_t func;
-    void*              op_data;
-} H5Z_cb_t;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Before a dataset gets created, the "can_apply" callbacks for any filters used
- * in the dataset creation property list are called
- * with the dataset's dataset creation property list, the dataset's datatype and
- * a dataspace describing a chunk (for chunked dataset storage).
- *
- * The "can_apply" callback must determine if the combination of the dataset
- * creation property list setting, the datatype and the dataspace represent a
- * valid combination to apply this filter to.  For example, some cases of
- * invalid combinations may involve the filter not operating correctly on
- * certain datatypes (or certain datatype sizes), or certain sizes of the chunk
- * dataspace.
- *
- * The "can_apply" callback can be the NULL pointer, in which case, the library
- * will assume that it can apply to any combination of dataset creation
- * property list values, datatypes and dataspaces.
- *
- * The "can_apply" callback returns positive a valid combination, zero for an
- * invalid combination and negative for an error.
- */
-typedef htri_t (*H5Z_can_apply_func_t)(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-
-/*
- * After the "can_apply" callbacks are checked for new datasets, the "set_local"
- * callbacks for any filters used in the dataset creation property list are
- * called.  These callbacks receive the dataset's private copy of the dataset
- * creation property list passed in to H5Dcreate (i.e. not the actual property
- * list passed in to H5Dcreate) and the datatype ID passed in to H5Dcreate
- * (which is not copied and should not be modified) and a dataspace describing
- * the chunk (for chunked dataset storage) (which should also not be modified).
- *
- * The "set_local" callback must set any parameters that are specific to this
- * dataset, based on the combination of the dataset creation property list
- * values, the datatype and the dataspace.  For example, some filters perform
- * different actions based on different datatypes (or datatype sizes) or
- * different number of dimensions or dataspace sizes.
- *
- * The "set_local" callback can be the NULL pointer, in which case, the library
- * will assume that there are no dataset-specific settings for this filter.
- *
- * The "set_local" callback must return non-negative on success and negative
- * for an error.
- */
-typedef herr_t (*H5Z_set_local_func_t)(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-
-/*
- * A filter gets definition flags and invocation flags (defined above), the
- * client data array and size defined when the filter was added to the
- * pipeline, the size in bytes of the data on which to operate, and pointers
- * to a buffer and its allocated size.
- *
- * The filter should store the result in the supplied buffer if possible,
- * otherwise it can allocate a new buffer, freeing the original.  The
- * allocated size of the new buffer should be returned through the BUF_SIZE
- * pointer and the new buffer through the BUF pointer.
- *
- * The return value from the filter is the number of bytes in the output
- * buffer. If an error occurs then the function should return zero and leave
- * all pointer arguments unchanged.
- */
-typedef size_t (*H5Z_func_t)(unsigned int flags, size_t cd_nelmts,
-			     const unsigned int cd_values[], size_t nbytes,
-			     size_t *buf_size, void **buf);
-
-/*
- * The filter table maps filter identification numbers to structs that
- * contain a pointers to the filter function and timing statistics.
- */
-typedef struct H5Z_class2_t {
-    int version;                /* Version number of the H5Z_class_t struct */
-    H5Z_filter_t id;		/* Filter ID number			     */
-    unsigned encoder_present;   /* Does this filter have an encoder? */
-    unsigned decoder_present;   /* Does this filter have a decoder? */
-    const char	*name;		/* Comment for debugging		     */
-    H5Z_can_apply_func_t can_apply; /* The "can apply" callback for a filter */
-    H5Z_set_local_func_t set_local; /* The "set local" callback for a filter */
-    H5Z_func_t filter;		/* The actual filter function		     */
-} H5Z_class2_t;
-
-H5_DLL herr_t H5Zregister(const void *cls);
-H5_DLL herr_t H5Zunregister(H5Z_filter_t id);
-H5_DLL htri_t H5Zfilter_avail(H5Z_filter_t id);
-H5_DLL herr_t H5Zget_filter_info(H5Z_filter_t filter, unsigned int *filter_config_flags);
-
-/* Symbols defined for compatibility with previous versions of the HDF5 API.
- *
- * Use of these symbols is deprecated.
- */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-
-/*
- * The filter table maps filter identification numbers to structs that
- * contain a pointers to the filter function and timing statistics.
- */
-typedef struct H5Z_class1_t {
-    H5Z_filter_t id;		/* Filter ID number			     */
-    const char	*name;		/* Comment for debugging		     */
-    H5Z_can_apply_func_t can_apply; /* The "can apply" callback for a filter */
-    H5Z_set_local_func_t set_local; /* The "set local" callback for a filter */
-    H5Z_func_t filter;		/* The actual filter function		     */
-} H5Z_class1_t;
-
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-
diff --git a/interfaces/ext/hdf5/H5api_adpt.h b/interfaces/ext/hdf5/H5api_adpt.h
deleted file mode 100644
index 1bfb3bd..0000000
--- a/interfaces/ext/hdf5/H5api_adpt.h
+++ /dev/null
@@ -1,408 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * H5api_adpt.h
- * Used for the HDF5 dll project
- * Created by Patrick Lu on 1/12/99
- */
-#ifndef H5API_ADPT_H
-#define H5API_ADPT_H
-
-/* This will only be defined if HDF5 was built with CMake */
-#ifdef H5_BUILT_AS_DYNAMIC_LIB
-
-#if defined (hdf5_EXPORTS)
-  #define _HDF5DLL_
-#else
-  #define _HDF5USEDLL_
-#endif
-
-#if defined (hdf5_test_EXPORTS)
-  #define _HDF5TESTDLL_
-#else
-  #define _HDF5TESTUSEDLL_
-#endif
-
-#if defined (hdf5_tools_EXPORTS)
-  #define _HDF5TOOLSDLL_
-#else
-  #define _HDF5TOOLSUSEDLL_
-#endif
-
-#if defined (hdf5_cpp_EXPORTS)
-  #define HDF5_CPPDLL_EXPORTS
-#else
-  #define HDF5CPP_USEDLL
-#endif
-
-#if defined (hdf5_hl_EXPORTS)
-  #define _HDF5_HLDLL_EXPORTS_
-#else
-  #define _HDF5USEHLDLL_
-#endif
-
-#if defined (hdf5_hl_cpp_EXPORTS)
-  #define HDF5_HL_CPPDLL_EXPORTS
-#else
-  #define HDF5USE_HLCPPDLL
-#endif
-
-#if defined (hdf5_f90cstub_EXPORTS)
-  #define HDF5FORT_CSTUB_DLL_EXPORTS
-#else
-  #define HDF5FORT_CSTUB_USEDLL
-#endif
-
-#if defined (hdf5_test_f90cstub_EXPORTS)
-  #define HDF5FORTTEST_CSTUB_DLL_EXPORTS
-#endif
-
-#if defined (hdf5_hl_f90cstub_EXPORTS)
-  #define HDF5_HL_F90CSTUBDLL_EXPORTS
-#endif
-
-#if defined(hdf5_EXPORTS)
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5_DLL __declspec(dllexport)
-    #define H5_DLLVAR extern __declspec(dllexport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5_DLL __attribute__ ((visibility("default")))
-    #define H5_DLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#else
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5_DLL __declspec(dllimport)
-    #define H5_DLLVAR __declspec(dllimport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5_DLL __attribute__ ((visibility("default")))
-    #define H5_DLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#endif
-
-#ifndef H5_DLL
-  #define H5_DLL
-  #define H5_DLLVAR extern
-#endif /* _HDF5DLL_ */
-
-#if defined(hdf5_test_EXPORTS)
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5TEST_DLL __declspec(dllexport)
-    #define H5TEST_DLLVAR extern __declspec(dllexport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5TEST_DLL __attribute__ ((visibility("default")))
-    #define H5TEST_DLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#else
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5TEST_DLL __declspec(dllimport)
-    #define H5TEST_DLLVAR __declspec(dllimport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5TEST_DLL __attribute__ ((visibility("default")))
-    #define H5TEST_DLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#endif
-
-#ifndef H5TEST_DLL
-  #define H5TEST_DLL
-  #define H5TEST_DLLVAR extern
-#endif /* H5TEST_DLL */
-
-#if defined(hdf5_tools_EXPORTS)
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5TOOLS_DLL __declspec(dllexport)
-    #define H5TOOLS_DLLVAR extern __declspec(dllexport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5TOOLS_DLL __attribute__ ((visibility("default")))
-    #define H5TOOLS_DLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#else
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5TOOLS_DLL __declspec(dllimport)
-    #define H5TOOLS_DLLVAR __declspec(dllimport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5TOOLS_DLL __attribute__ ((visibility("default")))
-    #define H5TOOLS_DLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#endif
-
-#ifndef H5TOOLS_DLL
-  #define H5TOOLS_DLL
-  #define H5TOOLS_DLLVAR extern
-#endif /* H5TOOLS_DLL */
-
-#if defined(hdf5_cpp_EXPORTS)
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5_DLLCPP __declspec(dllexport)
-    #define H5_DLLCPPVAR extern __declspec(dllexport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5_DLLCPP __attribute__ ((visibility("default")))
-    #define H5_DLLCPPVAR extern __attribute__ ((visibility("default")))
-  #endif
-#else
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5_DLLCPP __declspec(dllimport)
-    #define H5_DLLCPPVAR __declspec(dllimport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5_DLLCPP __attribute__ ((visibility("default")))
-    #define H5_DLLCPPVAR extern __attribute__ ((visibility("default")))
-  #endif
-#endif
-
-#ifndef H5_DLLCPP
-  #define H5_DLLCPP
-  #define H5_DLLCPPVAR extern
-#endif /* H5_DLLCPP */
-
-#if defined(hdf5_hl_EXPORTS)
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5_HLDLL __declspec(dllexport)
-    #define H5_HLDLLVAR extern __declspec(dllexport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5_HLDLL __attribute__ ((visibility("default")))
-    #define H5_HLDLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#else
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5_HLDLL __declspec(dllimport)
-    #define H5_HLDLLVAR __declspec(dllimport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5_HLDLL __attribute__ ((visibility("default")))
-    #define H5_HLDLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#endif
-
-#ifndef H5_HLDLL
-  #define H5_HLDLL
-  #define H5_HLDLLVAR extern
-#endif /* H5_HLDLL */
-
-#if defined(hdf5_hl_cpp_EXPORTS)
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5_HLCPPDLL __declspec(dllexport)
-    #define H5_HLCPPDLLVAR extern __declspec(dllexport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5_HLCPPDLL __attribute__ ((visibility("default")))
-    #define H5_HLCPPDLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#else
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5_HLCPPDLL __declspec(dllimport)
-    #define H5_HLCPPDLLVAR __declspec(dllimport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5_HLCPPDLL __attribute__ ((visibility("default")))
-    #define H5_HLCPPDLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#endif
-
-#ifndef H5_HLCPPDLL
-  #define H5_HLCPPDLL
-  #define H5_HLCPPDLLVAR extern
-#endif /* H5_HLCPPDLL */
-
-#if defined(hdf5_f90cstub_EXPORTS)
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5_FCDLL __declspec(dllexport)
-    #define H5_FCDLLVAR extern __declspec(dllexport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5_FCDLL __attribute__ ((visibility("default")))
-    #define H5_FCDLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#else
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5_FCDLL __declspec(dllimport)
-    #define H5_FCDLLVAR __declspec(dllimport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5_FCDLL __attribute__ ((visibility("default")))
-    #define H5_FCDLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#endif
-
-#ifndef H5_FCDLL
-  #define H5_FCDLL
-  #define H5_FCDLLVAR extern
-#endif /* H5_FCDLL */
-
-#if defined(hdf5_f90Ctest_EXPORTS)
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5_FCTESTDLL __declspec(dllexport)
-    #define H5_FCTESTDLLVAR extern __declspec(dllexport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5_FCTESTDLL __attribute__ ((visibility("default")))
-    #define H5_FCTESTDLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#else
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define H5_FCTESTDLL __declspec(dllimport)
-    #define H5_FCTESTDLLVAR __declspec(dllimport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define H5_FCTESTDLL __attribute__ ((visibility("default")))
-    #define H5_FCTESTDLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#endif
-
-#ifndef H5_FCTESTDLL
-  #define H5_FCTESTDLL
-  #define H5_FCTESTDLLVAR extern
-#endif /* H5_FCTESTDLL */
-
-#if defined(hdf5_hl_f90cstub_EXPORTS)
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define HDF5_HL_F90CSTUBDLL __declspec(dllexport)
-    #define HDF5_HL_F90CSTUBDLLVAR extern __declspec(dllexport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define HDF5_HL_F90CSTUBDLL __attribute__ ((visibility("default")))
-    #define HDF5_HL_F90CSTUBDLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#else
-  #if defined (_MSC_VER)  /* MSVC Compiler Case */
-    #define HDF5_HL_F90CSTUBDLL __declspec(dllimport)
-    #define HDF5_HL_F90CSTUBDLLVAR __declspec(dllimport)
-  #elif (__GNUC__ >= 4)  /* GCC 4.x has support for visibility options */
-    #define HDF5_HL_F90CSTUBDLL __attribute__ ((visibility("default")))
-    #define HDF5_HL_F90CSTUBDLLVAR extern __attribute__ ((visibility("default")))
-  #endif
-#endif
-
-#ifndef HDF5_HL_F90CSTUBDLL
-  #define HDF5_HL_F90CSTUBDLL
-  #define HDF5_HL_F90CSTUBDLLVAR extern
-#endif /* HDF5_HL_F90CSTUBDLL */
-
-#else
-/* This is the original HDFGroup defined preprocessor code which should still work
- * with the VS projects that are maintained by "The HDF Group"
- * The Visual Studio project files will not be supported in the next major release of 1.10.
- */
-
-#if defined(_WIN32)
-
-#if defined(_HDF5DLL_)
-#pragma warning(disable: 4273)	/* Disable the dll linkage warnings */
-#define H5_DLL __declspec(dllexport)
-#define H5_DLLVAR extern __declspec(dllexport)
-#elif defined(_HDF5USEDLL_)
-#define H5_DLL __declspec(dllimport)
-#define H5_DLLVAR __declspec(dllimport)
-#else
-#define H5_DLL
-#define H5_DLLVAR extern
-#endif /* _HDF5DLL_ */
-
-#if defined(_HDF5TESTDLL_)
-#pragma warning(disable: 4273)	/* Disable the dll linkage warnings */
-#define H5TEST_DLL __declspec(dllexport)
-#define H5TEST_DLLVAR extern __declspec(dllexport)
-#elif defined(_HDF5TESTUSEDLL_)
-#define H5TEST_DLL __declspec(dllimport)
-#define H5TEST_DLLVAR __declspec(dllimport)
-#else
-#define H5TEST_DLL
-#define H5TEST_DLLVAR extern
-#endif /* _HDF5TESTDLL_ */
-
-#if defined(_HDF5TOOLSDLL_)
-#pragma warning(disable: 4273)	/* Disable the dll linkage warnings */
-#define H5TOOLS_DLL __declspec(dllexport)
-#define H5TOOLS_DLLVAR extern __declspec(dllexport)
-#elif defined(_HDF5TOOLSUSEDLL_)
-#define H5TOOLS_DLL __declspec(dllimport)
-#define H5TOOLS_DLLVAR __declspec(dllimport)
-#else
-#define H5TOOLS_DLL
-#define H5TOOLS_DLLVAR extern
-#endif /* _HDF5TOOLSDLL_ */
-
-#if defined(_HDF5_HLDLL_EXPORTS_)
-#pragma warning(disable: 4273)	/* Disable the dll linkage warnings */
-#define H5_HLDLL __declspec(dllexport)
-#elif defined(_HDF5USEHLDLL_)
-#define H5_HLDLL __declspec(dllimport)
-#else
-#define H5_HLDLL
-#endif /* _HDF5_HLDLL_EXPORTS */
-
-#if defined(HDF5_HL_CPPDLL_EXPORTS)
-#pragma warning(disable: 4273)	/* Disable the dll linkage warnings */
-#define H5_HLCPPDLL __declspec(dllexport)
-#elif defined(HDF5USE_HLCPPDLL)
-#define H5_HLCPPDLL __declspec(dllimport)
-#else
-#define H5_HLCPPDLL
-#endif /*HDF5_HL_CPPDLL_EXPORTS*/
-
-#if defined(HDF5_HL_F90CSTUBDLL_EXPORTS)
-#pragma warning(disable: 4273)	/* Disable the dll linkage warnings */
-#define HDF5_HL_F90CSTUBDLL __declspec(dllexport)
-#elif defined(HDF5USE_HLF90CSTUBDLL)
-#define HDF5_HL_F90CSTUBDLL __declspec(dllimport)
-#else
-#define HDF5_HL_F90CSTUBDLL
-#endif /*HDF5_HL_F90CSTUBDLL_EXPORTS*/
-
-
-#if defined(HDF5FORT_CSTUB_DLL_EXPORTS)
-#pragma warning(disable: 4273)	/* Disable the dll linkage warnings */
-#define H5_FCDLL __declspec(dllexport)
-#define H5_FCDLLVAR extern __declspec(dllexport)
-#elif defined(HDF5FORT_CSTUB_USEDLL)
-#define H5_FCDLL __declspec(dllimport)
-#define H5_FCDLLVAR __declspec(dllimport)
-#else
-#define H5_FCDLL
-#define H5_FCDLLVAR extern
-#endif /* _HDF5_FORTRANDLL_EXPORTS_ */
-
-#if defined(HDF5FORTTEST_CSTUB_DLL_EXPORTS)
-#pragma warning(disable: 4273)	/* Disable the dll linkage warnings */
-#define H5_FCTESTDLL __declspec(dllexport)
-#define H5_FCTESTDLLVAR extern __declspec(dllexport)
-#elif defined(HDF5FORTTEST_CSTUB_USEDLL)
-#define H5_FCTESTDLL __declspec(dllimport)
-#define H5_FCTESTDLLVAR __declspec(dllimport)
-#else
-#define H5_FCTESTDLL
-#define H5_FCTESTDLLVAR extern
-#endif /* _HDF5_FORTRANDLL_EXPORTS_ */
-
-/* Added to export or to import C++ APIs - BMR (02-15-2002) */
-#if defined(HDF5_CPPDLL_EXPORTS) /* this name is generated at creation */
-#define H5_DLLCPP __declspec(dllexport)
-#elif defined(HDF5CPP_USEDLL)
-#define H5_DLLCPP __declspec(dllimport)
-#else
-#define H5_DLLCPP
-#endif /* HDF5_CPPDLL_EXPORTS */
-
-#else /*_WIN32*/
-#define H5_DLL
-#define H5_HLDLL
-#define H5_HLCPPDLL
-#define HDF5_HL_F90CSTUBDLL
-#define H5_DLLVAR extern
-#define H5_DLLCPP
-#define H5TEST_DLL
-#define H5TEST_DLLVAR extern
-#define H5TOOLS_DLL
-#define H5TOOLS_DLLVAR extern
-#define H5_FCDLL
-#define H5_FCDLLVAR extern
-#define H5_FCTESTDLL
-#define H5_FCTESTDLLVAR extern
-#endif
-
-#endif /* H5API_ADPT_H */
-
-#endif /*  */
diff --git a/interfaces/ext/hdf5/H5f90i.h b/interfaces/ext/hdf5/H5f90i.h
deleted file mode 100644
index f3c0160..0000000
--- a/interfaces/ext/hdf5/H5f90i.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-
-#ifndef _H5f90i_H
-#define _H5f90i_H
-
-/*
- * Include generated header.  This header defines integer types,
- * so this file only needs to define _fcd.
- */
-#include "H5f90i_gen.h"
-
-/* Define _fcd.  These are the same on every system
- * but UNICOS.
- */
-#define _fcdtocp(desc) (desc)
-
-#if (defined (UNICOS) || defined (_UNICOS)) && !defined(__crayx1)
-
-#include <fortran.h>
-
-/*typedef char*              _fcd;*/
-
-#else
-
-typedef char              *_fcd;
-
-#endif
-
-#endif /* _H5f90i_H */
diff --git a/interfaces/ext/hdf5/H5f90i_gen.h b/interfaces/ext/hdf5/H5f90i_gen.h
deleted file mode 100644
index 876c829..0000000
--- a/interfaces/ext/hdf5/H5f90i_gen.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html.  If you do not have     *
- * access to either file, you may request a copy from hdfhelp at ncsa.uiuc.edu. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-
-#ifndef _H5f90i_gen_H
-#define _H5f90i_gen_H
-
-/* This file is automatically generated by H5match_types.c at build time. */
-
-#include "H5public.h"
-
-#define c_int_1 char
-#define c_int_2 short
-#define c_int_4 int
-#define c_int_8 long long
-#define c_float_4 float
-#define c_float_8 double
-#define c_float_16 long double
-
-typedef c_int_8 haddr_t_f;
-typedef c_int_8 hsize_t_f;
-typedef c_int_8 hssize_t_f;
-typedef c_int_8 size_t_f;
-typedef c_int_4 int_f;
-typedef c_int_1 int_1_f;
-typedef c_int_2 int_2_f;
-typedef c_int_4 int_4_f;
-typedef c_int_8 int_8_f;
-typedef c_float_4 real_4_f;
-typedef c_float_8 real_8_f;
-typedef c_float_16 real_12_f;
-typedef c_float_16 real_16_f;
-typedef c_int_4 hid_t_f;
-typedef c_float_4 real_f;
-typedef c_float_8 double_f;
-
-#endif /* _H5f90i_gen_H */
diff --git a/interfaces/ext/hdf5/H5overflow.h b/interfaces/ext/hdf5/H5overflow.h
deleted file mode 100644
index f4064f4..0000000
--- a/interfaces/ext/hdf5/H5overflow.h
+++ /dev/null
@@ -1,1939 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* Generated automatically by bin/make_overflow -- do not edit */
-/* Add new types to H5overflow.txt file */
-
-
-#ifndef _H5overflow_H
-#define _H5overflow_H
-
-
-/* Each type in this file is tested for assignment to the other types,
- *      and range checks are defined for bad assignments at run-time.
- */
-
-/* Assignment checks for unsigned */
-
-/* src: unsigned, dst: int */
-#if H5_SIZEOF_UNSIGNED < H5_SIZEOF_INT
-    #define ASSIGN_unsigned_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UNSIGNED > H5_SIZEOF_INT
-    #define ASSIGN_unsigned_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UNSIGNED == H5_SIZEOF_INT */
-    #define ASSIGN_unsigned_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: unsigned dst: int */
-
-/* src: unsigned, dst: uint8_t */
-#if H5_SIZEOF_UNSIGNED < H5_SIZEOF_UINT8_T
-    #define ASSIGN_unsigned_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UNSIGNED > H5_SIZEOF_UINT8_T
-    #define ASSIGN_unsigned_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UNSIGNED == H5_SIZEOF_UINT8_T */
-    #define ASSIGN_unsigned_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: unsigned dst: uint8_t */
-
-/* src: unsigned, dst: uint16_t */
-#if H5_SIZEOF_UNSIGNED < H5_SIZEOF_UINT16_T
-    #define ASSIGN_unsigned_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UNSIGNED > H5_SIZEOF_UINT16_T
-    #define ASSIGN_unsigned_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UNSIGNED == H5_SIZEOF_UINT16_T */
-    #define ASSIGN_unsigned_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: unsigned dst: uint16_t */
-
-/* src: unsigned, dst: uint32_t */
-#if H5_SIZEOF_UNSIGNED < H5_SIZEOF_UINT32_T
-    #define ASSIGN_unsigned_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UNSIGNED > H5_SIZEOF_UINT32_T
-    #define ASSIGN_unsigned_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UNSIGNED == H5_SIZEOF_UINT32_T */
-    #define ASSIGN_unsigned_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: unsigned dst: uint32_t */
-
-/* src: unsigned, dst: uint64_t */
-#if H5_SIZEOF_UNSIGNED < H5_SIZEOF_UINT64_T
-    #define ASSIGN_unsigned_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UNSIGNED > H5_SIZEOF_UINT64_T
-    #define ASSIGN_unsigned_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UNSIGNED == H5_SIZEOF_UINT64_T */
-    #define ASSIGN_unsigned_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: unsigned dst: uint64_t */
-
-/* src: unsigned, dst: ptrdiff_t */
-#if H5_SIZEOF_UNSIGNED < H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_unsigned_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UNSIGNED > H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_unsigned_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UNSIGNED == H5_SIZEOF_PTRDIFF_T */
-    #define ASSIGN_unsigned_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: unsigned dst: ptrdiff_t */
-
-/* src: unsigned, dst: size_t */
-#if H5_SIZEOF_UNSIGNED < H5_SIZEOF_SIZE_T
-    #define ASSIGN_unsigned_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UNSIGNED > H5_SIZEOF_SIZE_T
-    #define ASSIGN_unsigned_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UNSIGNED == H5_SIZEOF_SIZE_T */
-    #define ASSIGN_unsigned_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: unsigned dst: size_t */
-
-/* src: unsigned, dst: ssize_t */
-#if H5_SIZEOF_UNSIGNED < H5_SIZEOF_SSIZE_T
-    #define ASSIGN_unsigned_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UNSIGNED > H5_SIZEOF_SSIZE_T
-    #define ASSIGN_unsigned_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UNSIGNED == H5_SIZEOF_SSIZE_T */
-    #define ASSIGN_unsigned_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: unsigned dst: ssize_t */
-
-/* src: unsigned, dst: haddr_t */
-#if H5_SIZEOF_UNSIGNED < H5_SIZEOF_HADDR_T
-    #define ASSIGN_unsigned_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UNSIGNED > H5_SIZEOF_HADDR_T
-    #define ASSIGN_unsigned_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UNSIGNED == H5_SIZEOF_HADDR_T */
-    #define ASSIGN_unsigned_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: unsigned dst: haddr_t */
-
-/* src: unsigned, dst: hsize_t */
-#if H5_SIZEOF_UNSIGNED < H5_SIZEOF_HSIZE_T
-    #define ASSIGN_unsigned_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UNSIGNED > H5_SIZEOF_HSIZE_T
-    #define ASSIGN_unsigned_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UNSIGNED == H5_SIZEOF_HSIZE_T */
-    #define ASSIGN_unsigned_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: unsigned dst: hsize_t */
-
-/* src: unsigned, dst: hssize_t */
-#if H5_SIZEOF_UNSIGNED < H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_unsigned_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UNSIGNED > H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_unsigned_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UNSIGNED == H5_SIZEOF_HSSIZE_T */
-    #define ASSIGN_unsigned_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: unsigned dst: hssize_t */
-
-/* src: unsigned, dst: h5_stat_size_t */
-#if H5_SIZEOF_UNSIGNED < H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_unsigned_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UNSIGNED > H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_unsigned_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UNSIGNED == H5_SIZEOF_H5_STAT_SIZE_T */
-    #define ASSIGN_unsigned_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: unsigned dst: h5_stat_size_t */
-
-
-/* Assignment checks for int */
-
-/* src: int, dst: unsigned */
-#if H5_SIZEOF_INT < H5_SIZEOF_UNSIGNED
-    #define ASSIGN_int_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_INT > H5_SIZEOF_UNSIGNED
-    #define ASSIGN_int_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_INT == H5_SIZEOF_UNSIGNED */
-    #define ASSIGN_int_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: int dst: unsigned */
-
-/* src: int, dst: uint8_t */
-#if H5_SIZEOF_INT < H5_SIZEOF_UINT8_T
-    #define ASSIGN_int_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_INT > H5_SIZEOF_UINT8_T
-    #define ASSIGN_int_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_INT == H5_SIZEOF_UINT8_T */
-    #define ASSIGN_int_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: int dst: uint8_t */
-
-/* src: int, dst: uint16_t */
-#if H5_SIZEOF_INT < H5_SIZEOF_UINT16_T
-    #define ASSIGN_int_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_INT > H5_SIZEOF_UINT16_T
-    #define ASSIGN_int_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_INT == H5_SIZEOF_UINT16_T */
-    #define ASSIGN_int_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: int dst: uint16_t */
-
-/* src: int, dst: uint32_t */
-#if H5_SIZEOF_INT < H5_SIZEOF_UINT32_T
-    #define ASSIGN_int_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_INT > H5_SIZEOF_UINT32_T
-    #define ASSIGN_int_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_INT == H5_SIZEOF_UINT32_T */
-    #define ASSIGN_int_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: int dst: uint32_t */
-
-/* src: int, dst: uint64_t */
-#if H5_SIZEOF_INT < H5_SIZEOF_UINT64_T
-    #define ASSIGN_int_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_INT > H5_SIZEOF_UINT64_T
-    #define ASSIGN_int_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_INT == H5_SIZEOF_UINT64_T */
-    #define ASSIGN_int_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: int dst: uint64_t */
-
-/* src: int, dst: ptrdiff_t */
-#if H5_SIZEOF_INT < H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_int_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_INT > H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_int_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_INT == H5_SIZEOF_PTRDIFF_T */
-    #define ASSIGN_int_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: int dst: ptrdiff_t */
-
-/* src: int, dst: size_t */
-#if H5_SIZEOF_INT < H5_SIZEOF_SIZE_T
-    #define ASSIGN_int_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_INT > H5_SIZEOF_SIZE_T
-    #define ASSIGN_int_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_INT == H5_SIZEOF_SIZE_T */
-    #define ASSIGN_int_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: int dst: size_t */
-
-/* src: int, dst: ssize_t */
-#if H5_SIZEOF_INT < H5_SIZEOF_SSIZE_T
-    #define ASSIGN_int_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_INT > H5_SIZEOF_SSIZE_T
-    #define ASSIGN_int_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_INT == H5_SIZEOF_SSIZE_T */
-    #define ASSIGN_int_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: int dst: ssize_t */
-
-/* src: int, dst: haddr_t */
-#if H5_SIZEOF_INT < H5_SIZEOF_HADDR_T
-    #define ASSIGN_int_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_INT > H5_SIZEOF_HADDR_T
-    #define ASSIGN_int_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_INT == H5_SIZEOF_HADDR_T */
-    #define ASSIGN_int_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: int dst: haddr_t */
-
-/* src: int, dst: hsize_t */
-#if H5_SIZEOF_INT < H5_SIZEOF_HSIZE_T
-    #define ASSIGN_int_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_INT > H5_SIZEOF_HSIZE_T
-    #define ASSIGN_int_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_INT == H5_SIZEOF_HSIZE_T */
-    #define ASSIGN_int_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: int dst: hsize_t */
-
-/* src: int, dst: hssize_t */
-#if H5_SIZEOF_INT < H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_int_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_INT > H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_int_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_INT == H5_SIZEOF_HSSIZE_T */
-    #define ASSIGN_int_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: int dst: hssize_t */
-
-/* src: int, dst: h5_stat_size_t */
-#if H5_SIZEOF_INT < H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_int_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_INT > H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_int_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_INT == H5_SIZEOF_H5_STAT_SIZE_T */
-    #define ASSIGN_int_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: int dst: h5_stat_size_t */
-
-
-/* Assignment checks for uint8_t */
-
-/* src: uint8_t, dst: unsigned */
-#if H5_SIZEOF_UINT8_T < H5_SIZEOF_UNSIGNED
-    #define ASSIGN_uint8_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT8_T > H5_SIZEOF_UNSIGNED
-    #define ASSIGN_uint8_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT8_T == H5_SIZEOF_UNSIGNED */
-    #define ASSIGN_uint8_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint8_t dst: unsigned */
-
-/* src: uint8_t, dst: int */
-#if H5_SIZEOF_UINT8_T < H5_SIZEOF_INT
-    #define ASSIGN_uint8_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT8_T > H5_SIZEOF_INT
-    #define ASSIGN_uint8_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT8_T == H5_SIZEOF_INT */
-    #define ASSIGN_uint8_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint8_t dst: int */
-
-/* src: uint8_t, dst: uint16_t */
-#if H5_SIZEOF_UINT8_T < H5_SIZEOF_UINT16_T
-    #define ASSIGN_uint8_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT8_T > H5_SIZEOF_UINT16_T
-    #define ASSIGN_uint8_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT8_T == H5_SIZEOF_UINT16_T */
-    #define ASSIGN_uint8_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint8_t dst: uint16_t */
-
-/* src: uint8_t, dst: uint32_t */
-#if H5_SIZEOF_UINT8_T < H5_SIZEOF_UINT32_T
-    #define ASSIGN_uint8_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT8_T > H5_SIZEOF_UINT32_T
-    #define ASSIGN_uint8_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT8_T == H5_SIZEOF_UINT32_T */
-    #define ASSIGN_uint8_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint8_t dst: uint32_t */
-
-/* src: uint8_t, dst: uint64_t */
-#if H5_SIZEOF_UINT8_T < H5_SIZEOF_UINT64_T
-    #define ASSIGN_uint8_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT8_T > H5_SIZEOF_UINT64_T
-    #define ASSIGN_uint8_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT8_T == H5_SIZEOF_UINT64_T */
-    #define ASSIGN_uint8_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint8_t dst: uint64_t */
-
-/* src: uint8_t, dst: ptrdiff_t */
-#if H5_SIZEOF_UINT8_T < H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_uint8_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT8_T > H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_uint8_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT8_T == H5_SIZEOF_PTRDIFF_T */
-    #define ASSIGN_uint8_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint8_t dst: ptrdiff_t */
-
-/* src: uint8_t, dst: size_t */
-#if H5_SIZEOF_UINT8_T < H5_SIZEOF_SIZE_T
-    #define ASSIGN_uint8_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT8_T > H5_SIZEOF_SIZE_T
-    #define ASSIGN_uint8_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT8_T == H5_SIZEOF_SIZE_T */
-    #define ASSIGN_uint8_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint8_t dst: size_t */
-
-/* src: uint8_t, dst: ssize_t */
-#if H5_SIZEOF_UINT8_T < H5_SIZEOF_SSIZE_T
-    #define ASSIGN_uint8_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT8_T > H5_SIZEOF_SSIZE_T
-    #define ASSIGN_uint8_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT8_T == H5_SIZEOF_SSIZE_T */
-    #define ASSIGN_uint8_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint8_t dst: ssize_t */
-
-/* src: uint8_t, dst: haddr_t */
-#if H5_SIZEOF_UINT8_T < H5_SIZEOF_HADDR_T
-    #define ASSIGN_uint8_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT8_T > H5_SIZEOF_HADDR_T
-    #define ASSIGN_uint8_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT8_T == H5_SIZEOF_HADDR_T */
-    #define ASSIGN_uint8_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint8_t dst: haddr_t */
-
-/* src: uint8_t, dst: hsize_t */
-#if H5_SIZEOF_UINT8_T < H5_SIZEOF_HSIZE_T
-    #define ASSIGN_uint8_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT8_T > H5_SIZEOF_HSIZE_T
-    #define ASSIGN_uint8_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT8_T == H5_SIZEOF_HSIZE_T */
-    #define ASSIGN_uint8_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint8_t dst: hsize_t */
-
-/* src: uint8_t, dst: hssize_t */
-#if H5_SIZEOF_UINT8_T < H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_uint8_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT8_T > H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_uint8_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT8_T == H5_SIZEOF_HSSIZE_T */
-    #define ASSIGN_uint8_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint8_t dst: hssize_t */
-
-/* src: uint8_t, dst: h5_stat_size_t */
-#if H5_SIZEOF_UINT8_T < H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_uint8_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT8_T > H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_uint8_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT8_T == H5_SIZEOF_H5_STAT_SIZE_T */
-    #define ASSIGN_uint8_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint8_t dst: h5_stat_size_t */
-
-
-/* Assignment checks for uint16_t */
-
-/* src: uint16_t, dst: unsigned */
-#if H5_SIZEOF_UINT16_T < H5_SIZEOF_UNSIGNED
-    #define ASSIGN_uint16_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT16_T > H5_SIZEOF_UNSIGNED
-    #define ASSIGN_uint16_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT16_T == H5_SIZEOF_UNSIGNED */
-    #define ASSIGN_uint16_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint16_t dst: unsigned */
-
-/* src: uint16_t, dst: int */
-#if H5_SIZEOF_UINT16_T < H5_SIZEOF_INT
-    #define ASSIGN_uint16_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT16_T > H5_SIZEOF_INT
-    #define ASSIGN_uint16_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT16_T == H5_SIZEOF_INT */
-    #define ASSIGN_uint16_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint16_t dst: int */
-
-/* src: uint16_t, dst: uint8_t */
-#if H5_SIZEOF_UINT16_T < H5_SIZEOF_UINT8_T
-    #define ASSIGN_uint16_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT16_T > H5_SIZEOF_UINT8_T
-    #define ASSIGN_uint16_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT16_T == H5_SIZEOF_UINT8_T */
-    #define ASSIGN_uint16_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint16_t dst: uint8_t */
-
-/* src: uint16_t, dst: uint32_t */
-#if H5_SIZEOF_UINT16_T < H5_SIZEOF_UINT32_T
-    #define ASSIGN_uint16_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT16_T > H5_SIZEOF_UINT32_T
-    #define ASSIGN_uint16_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT16_T == H5_SIZEOF_UINT32_T */
-    #define ASSIGN_uint16_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint16_t dst: uint32_t */
-
-/* src: uint16_t, dst: uint64_t */
-#if H5_SIZEOF_UINT16_T < H5_SIZEOF_UINT64_T
-    #define ASSIGN_uint16_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT16_T > H5_SIZEOF_UINT64_T
-    #define ASSIGN_uint16_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT16_T == H5_SIZEOF_UINT64_T */
-    #define ASSIGN_uint16_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint16_t dst: uint64_t */
-
-/* src: uint16_t, dst: ptrdiff_t */
-#if H5_SIZEOF_UINT16_T < H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_uint16_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT16_T > H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_uint16_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT16_T == H5_SIZEOF_PTRDIFF_T */
-    #define ASSIGN_uint16_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint16_t dst: ptrdiff_t */
-
-/* src: uint16_t, dst: size_t */
-#if H5_SIZEOF_UINT16_T < H5_SIZEOF_SIZE_T
-    #define ASSIGN_uint16_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT16_T > H5_SIZEOF_SIZE_T
-    #define ASSIGN_uint16_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT16_T == H5_SIZEOF_SIZE_T */
-    #define ASSIGN_uint16_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint16_t dst: size_t */
-
-/* src: uint16_t, dst: ssize_t */
-#if H5_SIZEOF_UINT16_T < H5_SIZEOF_SSIZE_T
-    #define ASSIGN_uint16_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT16_T > H5_SIZEOF_SSIZE_T
-    #define ASSIGN_uint16_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT16_T == H5_SIZEOF_SSIZE_T */
-    #define ASSIGN_uint16_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint16_t dst: ssize_t */
-
-/* src: uint16_t, dst: haddr_t */
-#if H5_SIZEOF_UINT16_T < H5_SIZEOF_HADDR_T
-    #define ASSIGN_uint16_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT16_T > H5_SIZEOF_HADDR_T
-    #define ASSIGN_uint16_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT16_T == H5_SIZEOF_HADDR_T */
-    #define ASSIGN_uint16_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint16_t dst: haddr_t */
-
-/* src: uint16_t, dst: hsize_t */
-#if H5_SIZEOF_UINT16_T < H5_SIZEOF_HSIZE_T
-    #define ASSIGN_uint16_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT16_T > H5_SIZEOF_HSIZE_T
-    #define ASSIGN_uint16_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT16_T == H5_SIZEOF_HSIZE_T */
-    #define ASSIGN_uint16_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint16_t dst: hsize_t */
-
-/* src: uint16_t, dst: hssize_t */
-#if H5_SIZEOF_UINT16_T < H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_uint16_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT16_T > H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_uint16_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT16_T == H5_SIZEOF_HSSIZE_T */
-    #define ASSIGN_uint16_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint16_t dst: hssize_t */
-
-/* src: uint16_t, dst: h5_stat_size_t */
-#if H5_SIZEOF_UINT16_T < H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_uint16_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT16_T > H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_uint16_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT16_T == H5_SIZEOF_H5_STAT_SIZE_T */
-    #define ASSIGN_uint16_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint16_t dst: h5_stat_size_t */
-
-
-/* Assignment checks for uint32_t */
-
-/* src: uint32_t, dst: unsigned */
-#if H5_SIZEOF_UINT32_T < H5_SIZEOF_UNSIGNED
-    #define ASSIGN_uint32_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT32_T > H5_SIZEOF_UNSIGNED
-    #define ASSIGN_uint32_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT32_T == H5_SIZEOF_UNSIGNED */
-    #define ASSIGN_uint32_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint32_t dst: unsigned */
-
-/* src: uint32_t, dst: int */
-#if H5_SIZEOF_UINT32_T < H5_SIZEOF_INT
-    #define ASSIGN_uint32_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT32_T > H5_SIZEOF_INT
-    #define ASSIGN_uint32_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT32_T == H5_SIZEOF_INT */
-    #define ASSIGN_uint32_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint32_t dst: int */
-
-/* src: uint32_t, dst: uint8_t */
-#if H5_SIZEOF_UINT32_T < H5_SIZEOF_UINT8_T
-    #define ASSIGN_uint32_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT32_T > H5_SIZEOF_UINT8_T
-    #define ASSIGN_uint32_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT32_T == H5_SIZEOF_UINT8_T */
-    #define ASSIGN_uint32_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint32_t dst: uint8_t */
-
-/* src: uint32_t, dst: uint16_t */
-#if H5_SIZEOF_UINT32_T < H5_SIZEOF_UINT16_T
-    #define ASSIGN_uint32_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT32_T > H5_SIZEOF_UINT16_T
-    #define ASSIGN_uint32_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT32_T == H5_SIZEOF_UINT16_T */
-    #define ASSIGN_uint32_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint32_t dst: uint16_t */
-
-/* src: uint32_t, dst: uint64_t */
-#if H5_SIZEOF_UINT32_T < H5_SIZEOF_UINT64_T
-    #define ASSIGN_uint32_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT32_T > H5_SIZEOF_UINT64_T
-    #define ASSIGN_uint32_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT32_T == H5_SIZEOF_UINT64_T */
-    #define ASSIGN_uint32_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint32_t dst: uint64_t */
-
-/* src: uint32_t, dst: ptrdiff_t */
-#if H5_SIZEOF_UINT32_T < H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_uint32_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT32_T > H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_uint32_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT32_T == H5_SIZEOF_PTRDIFF_T */
-    #define ASSIGN_uint32_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint32_t dst: ptrdiff_t */
-
-/* src: uint32_t, dst: size_t */
-#if H5_SIZEOF_UINT32_T < H5_SIZEOF_SIZE_T
-    #define ASSIGN_uint32_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT32_T > H5_SIZEOF_SIZE_T
-    #define ASSIGN_uint32_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT32_T == H5_SIZEOF_SIZE_T */
-    #define ASSIGN_uint32_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint32_t dst: size_t */
-
-/* src: uint32_t, dst: ssize_t */
-#if H5_SIZEOF_UINT32_T < H5_SIZEOF_SSIZE_T
-    #define ASSIGN_uint32_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT32_T > H5_SIZEOF_SSIZE_T
-    #define ASSIGN_uint32_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT32_T == H5_SIZEOF_SSIZE_T */
-    #define ASSIGN_uint32_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint32_t dst: ssize_t */
-
-/* src: uint32_t, dst: haddr_t */
-#if H5_SIZEOF_UINT32_T < H5_SIZEOF_HADDR_T
-    #define ASSIGN_uint32_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT32_T > H5_SIZEOF_HADDR_T
-    #define ASSIGN_uint32_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT32_T == H5_SIZEOF_HADDR_T */
-    #define ASSIGN_uint32_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint32_t dst: haddr_t */
-
-/* src: uint32_t, dst: hsize_t */
-#if H5_SIZEOF_UINT32_T < H5_SIZEOF_HSIZE_T
-    #define ASSIGN_uint32_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT32_T > H5_SIZEOF_HSIZE_T
-    #define ASSIGN_uint32_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT32_T == H5_SIZEOF_HSIZE_T */
-    #define ASSIGN_uint32_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint32_t dst: hsize_t */
-
-/* src: uint32_t, dst: hssize_t */
-#if H5_SIZEOF_UINT32_T < H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_uint32_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT32_T > H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_uint32_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT32_T == H5_SIZEOF_HSSIZE_T */
-    #define ASSIGN_uint32_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint32_t dst: hssize_t */
-
-/* src: uint32_t, dst: h5_stat_size_t */
-#if H5_SIZEOF_UINT32_T < H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_uint32_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT32_T > H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_uint32_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT32_T == H5_SIZEOF_H5_STAT_SIZE_T */
-    #define ASSIGN_uint32_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint32_t dst: h5_stat_size_t */
-
-
-/* Assignment checks for uint64_t */
-
-/* src: uint64_t, dst: unsigned */
-#if H5_SIZEOF_UINT64_T < H5_SIZEOF_UNSIGNED
-    #define ASSIGN_uint64_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT64_T > H5_SIZEOF_UNSIGNED
-    #define ASSIGN_uint64_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT64_T == H5_SIZEOF_UNSIGNED */
-    #define ASSIGN_uint64_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint64_t dst: unsigned */
-
-/* src: uint64_t, dst: int */
-#if H5_SIZEOF_UINT64_T < H5_SIZEOF_INT
-    #define ASSIGN_uint64_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT64_T > H5_SIZEOF_INT
-    #define ASSIGN_uint64_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT64_T == H5_SIZEOF_INT */
-    #define ASSIGN_uint64_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint64_t dst: int */
-
-/* src: uint64_t, dst: uint8_t */
-#if H5_SIZEOF_UINT64_T < H5_SIZEOF_UINT8_T
-    #define ASSIGN_uint64_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT64_T > H5_SIZEOF_UINT8_T
-    #define ASSIGN_uint64_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT64_T == H5_SIZEOF_UINT8_T */
-    #define ASSIGN_uint64_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint64_t dst: uint8_t */
-
-/* src: uint64_t, dst: uint16_t */
-#if H5_SIZEOF_UINT64_T < H5_SIZEOF_UINT16_T
-    #define ASSIGN_uint64_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT64_T > H5_SIZEOF_UINT16_T
-    #define ASSIGN_uint64_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT64_T == H5_SIZEOF_UINT16_T */
-    #define ASSIGN_uint64_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint64_t dst: uint16_t */
-
-/* src: uint64_t, dst: uint32_t */
-#if H5_SIZEOF_UINT64_T < H5_SIZEOF_UINT32_T
-    #define ASSIGN_uint64_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT64_T > H5_SIZEOF_UINT32_T
-    #define ASSIGN_uint64_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT64_T == H5_SIZEOF_UINT32_T */
-    #define ASSIGN_uint64_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint64_t dst: uint32_t */
-
-/* src: uint64_t, dst: ptrdiff_t */
-#if H5_SIZEOF_UINT64_T < H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_uint64_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT64_T > H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_uint64_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT64_T == H5_SIZEOF_PTRDIFF_T */
-    #define ASSIGN_uint64_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint64_t dst: ptrdiff_t */
-
-/* src: uint64_t, dst: size_t */
-#if H5_SIZEOF_UINT64_T < H5_SIZEOF_SIZE_T
-    #define ASSIGN_uint64_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT64_T > H5_SIZEOF_SIZE_T
-    #define ASSIGN_uint64_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT64_T == H5_SIZEOF_SIZE_T */
-    #define ASSIGN_uint64_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint64_t dst: size_t */
-
-/* src: uint64_t, dst: ssize_t */
-#if H5_SIZEOF_UINT64_T < H5_SIZEOF_SSIZE_T
-    #define ASSIGN_uint64_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT64_T > H5_SIZEOF_SSIZE_T
-    #define ASSIGN_uint64_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT64_T == H5_SIZEOF_SSIZE_T */
-    #define ASSIGN_uint64_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint64_t dst: ssize_t */
-
-/* src: uint64_t, dst: haddr_t */
-#if H5_SIZEOF_UINT64_T < H5_SIZEOF_HADDR_T
-    #define ASSIGN_uint64_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT64_T > H5_SIZEOF_HADDR_T
-    #define ASSIGN_uint64_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT64_T == H5_SIZEOF_HADDR_T */
-    #define ASSIGN_uint64_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint64_t dst: haddr_t */
-
-/* src: uint64_t, dst: hsize_t */
-#if H5_SIZEOF_UINT64_T < H5_SIZEOF_HSIZE_T
-    #define ASSIGN_uint64_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT64_T > H5_SIZEOF_HSIZE_T
-    #define ASSIGN_uint64_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT64_T == H5_SIZEOF_HSIZE_T */
-    #define ASSIGN_uint64_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint64_t dst: hsize_t */
-
-/* src: uint64_t, dst: hssize_t */
-#if H5_SIZEOF_UINT64_T < H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_uint64_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT64_T > H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_uint64_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT64_T == H5_SIZEOF_HSSIZE_T */
-    #define ASSIGN_uint64_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint64_t dst: hssize_t */
-
-/* src: uint64_t, dst: h5_stat_size_t */
-#if H5_SIZEOF_UINT64_T < H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_uint64_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_UINT64_T > H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_uint64_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_UINT64_T == H5_SIZEOF_H5_STAT_SIZE_T */
-    #define ASSIGN_uint64_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: uint64_t dst: h5_stat_size_t */
-
-
-/* Assignment checks for ptrdiff_t */
-
-/* src: ptrdiff_t, dst: unsigned */
-#if H5_SIZEOF_PTRDIFF_T < H5_SIZEOF_UNSIGNED
-    #define ASSIGN_ptrdiff_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_PTRDIFF_T > H5_SIZEOF_UNSIGNED
-    #define ASSIGN_ptrdiff_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_PTRDIFF_T == H5_SIZEOF_UNSIGNED */
-    #define ASSIGN_ptrdiff_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ptrdiff_t dst: unsigned */
-
-/* src: ptrdiff_t, dst: int */
-#if H5_SIZEOF_PTRDIFF_T < H5_SIZEOF_INT
-    #define ASSIGN_ptrdiff_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_PTRDIFF_T > H5_SIZEOF_INT
-    #define ASSIGN_ptrdiff_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_PTRDIFF_T == H5_SIZEOF_INT */
-    #define ASSIGN_ptrdiff_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: ptrdiff_t dst: int */
-
-/* src: ptrdiff_t, dst: uint8_t */
-#if H5_SIZEOF_PTRDIFF_T < H5_SIZEOF_UINT8_T
-    #define ASSIGN_ptrdiff_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_PTRDIFF_T > H5_SIZEOF_UINT8_T
-    #define ASSIGN_ptrdiff_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_PTRDIFF_T == H5_SIZEOF_UINT8_T */
-    #define ASSIGN_ptrdiff_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ptrdiff_t dst: uint8_t */
-
-/* src: ptrdiff_t, dst: uint16_t */
-#if H5_SIZEOF_PTRDIFF_T < H5_SIZEOF_UINT16_T
-    #define ASSIGN_ptrdiff_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_PTRDIFF_T > H5_SIZEOF_UINT16_T
-    #define ASSIGN_ptrdiff_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_PTRDIFF_T == H5_SIZEOF_UINT16_T */
-    #define ASSIGN_ptrdiff_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ptrdiff_t dst: uint16_t */
-
-/* src: ptrdiff_t, dst: uint32_t */
-#if H5_SIZEOF_PTRDIFF_T < H5_SIZEOF_UINT32_T
-    #define ASSIGN_ptrdiff_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_PTRDIFF_T > H5_SIZEOF_UINT32_T
-    #define ASSIGN_ptrdiff_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_PTRDIFF_T == H5_SIZEOF_UINT32_T */
-    #define ASSIGN_ptrdiff_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ptrdiff_t dst: uint32_t */
-
-/* src: ptrdiff_t, dst: uint64_t */
-#if H5_SIZEOF_PTRDIFF_T < H5_SIZEOF_UINT64_T
-    #define ASSIGN_ptrdiff_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_PTRDIFF_T > H5_SIZEOF_UINT64_T
-    #define ASSIGN_ptrdiff_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_PTRDIFF_T == H5_SIZEOF_UINT64_T */
-    #define ASSIGN_ptrdiff_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ptrdiff_t dst: uint64_t */
-
-/* src: ptrdiff_t, dst: size_t */
-#if H5_SIZEOF_PTRDIFF_T < H5_SIZEOF_SIZE_T
-    #define ASSIGN_ptrdiff_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_PTRDIFF_T > H5_SIZEOF_SIZE_T
-    #define ASSIGN_ptrdiff_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_PTRDIFF_T == H5_SIZEOF_SIZE_T */
-    #define ASSIGN_ptrdiff_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ptrdiff_t dst: size_t */
-
-/* src: ptrdiff_t, dst: ssize_t */
-#if H5_SIZEOF_PTRDIFF_T < H5_SIZEOF_SSIZE_T
-    #define ASSIGN_ptrdiff_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_PTRDIFF_T > H5_SIZEOF_SSIZE_T
-    #define ASSIGN_ptrdiff_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_PTRDIFF_T == H5_SIZEOF_SSIZE_T */
-    #define ASSIGN_ptrdiff_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: ptrdiff_t dst: ssize_t */
-
-/* src: ptrdiff_t, dst: haddr_t */
-#if H5_SIZEOF_PTRDIFF_T < H5_SIZEOF_HADDR_T
-    #define ASSIGN_ptrdiff_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_PTRDIFF_T > H5_SIZEOF_HADDR_T
-    #define ASSIGN_ptrdiff_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_PTRDIFF_T == H5_SIZEOF_HADDR_T */
-    #define ASSIGN_ptrdiff_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ptrdiff_t dst: haddr_t */
-
-/* src: ptrdiff_t, dst: hsize_t */
-#if H5_SIZEOF_PTRDIFF_T < H5_SIZEOF_HSIZE_T
-    #define ASSIGN_ptrdiff_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_PTRDIFF_T > H5_SIZEOF_HSIZE_T
-    #define ASSIGN_ptrdiff_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_PTRDIFF_T == H5_SIZEOF_HSIZE_T */
-    #define ASSIGN_ptrdiff_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ptrdiff_t dst: hsize_t */
-
-/* src: ptrdiff_t, dst: hssize_t */
-#if H5_SIZEOF_PTRDIFF_T < H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_ptrdiff_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_PTRDIFF_T > H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_ptrdiff_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_PTRDIFF_T == H5_SIZEOF_HSSIZE_T */
-    #define ASSIGN_ptrdiff_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: ptrdiff_t dst: hssize_t */
-
-/* src: ptrdiff_t, dst: h5_stat_size_t */
-#if H5_SIZEOF_PTRDIFF_T < H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_ptrdiff_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_PTRDIFF_T > H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_ptrdiff_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_PTRDIFF_T == H5_SIZEOF_H5_STAT_SIZE_T */
-    #define ASSIGN_ptrdiff_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ptrdiff_t dst: h5_stat_size_t */
-
-
-/* Assignment checks for size_t */
-
-/* src: size_t, dst: unsigned */
-#if H5_SIZEOF_SIZE_T < H5_SIZEOF_UNSIGNED
-    #define ASSIGN_size_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SIZE_T > H5_SIZEOF_UNSIGNED
-    #define ASSIGN_size_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SIZE_T == H5_SIZEOF_UNSIGNED */
-    #define ASSIGN_size_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: size_t dst: unsigned */
-
-/* src: size_t, dst: int */
-#if H5_SIZEOF_SIZE_T < H5_SIZEOF_INT
-    #define ASSIGN_size_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SIZE_T > H5_SIZEOF_INT
-    #define ASSIGN_size_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SIZE_T == H5_SIZEOF_INT */
-    #define ASSIGN_size_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: size_t dst: int */
-
-/* src: size_t, dst: uint8_t */
-#if H5_SIZEOF_SIZE_T < H5_SIZEOF_UINT8_T
-    #define ASSIGN_size_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SIZE_T > H5_SIZEOF_UINT8_T
-    #define ASSIGN_size_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SIZE_T == H5_SIZEOF_UINT8_T */
-    #define ASSIGN_size_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: size_t dst: uint8_t */
-
-/* src: size_t, dst: uint16_t */
-#if H5_SIZEOF_SIZE_T < H5_SIZEOF_UINT16_T
-    #define ASSIGN_size_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SIZE_T > H5_SIZEOF_UINT16_T
-    #define ASSIGN_size_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SIZE_T == H5_SIZEOF_UINT16_T */
-    #define ASSIGN_size_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: size_t dst: uint16_t */
-
-/* src: size_t, dst: uint32_t */
-#if H5_SIZEOF_SIZE_T < H5_SIZEOF_UINT32_T
-    #define ASSIGN_size_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SIZE_T > H5_SIZEOF_UINT32_T
-    #define ASSIGN_size_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SIZE_T == H5_SIZEOF_UINT32_T */
-    #define ASSIGN_size_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: size_t dst: uint32_t */
-
-/* src: size_t, dst: uint64_t */
-#if H5_SIZEOF_SIZE_T < H5_SIZEOF_UINT64_T
-    #define ASSIGN_size_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SIZE_T > H5_SIZEOF_UINT64_T
-    #define ASSIGN_size_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SIZE_T == H5_SIZEOF_UINT64_T */
-    #define ASSIGN_size_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: size_t dst: uint64_t */
-
-/* src: size_t, dst: ptrdiff_t */
-#if H5_SIZEOF_SIZE_T < H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_size_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SIZE_T > H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_size_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SIZE_T == H5_SIZEOF_PTRDIFF_T */
-    #define ASSIGN_size_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: size_t dst: ptrdiff_t */
-
-/* src: size_t, dst: ssize_t */
-#if H5_SIZEOF_SIZE_T < H5_SIZEOF_SSIZE_T
-    #define ASSIGN_size_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SIZE_T > H5_SIZEOF_SSIZE_T
-    #define ASSIGN_size_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SIZE_T == H5_SIZEOF_SSIZE_T */
-    #define ASSIGN_size_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: size_t dst: ssize_t */
-
-/* src: size_t, dst: haddr_t */
-#if H5_SIZEOF_SIZE_T < H5_SIZEOF_HADDR_T
-    #define ASSIGN_size_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SIZE_T > H5_SIZEOF_HADDR_T
-    #define ASSIGN_size_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SIZE_T == H5_SIZEOF_HADDR_T */
-    #define ASSIGN_size_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: size_t dst: haddr_t */
-
-/* src: size_t, dst: hsize_t */
-#if H5_SIZEOF_SIZE_T < H5_SIZEOF_HSIZE_T
-    #define ASSIGN_size_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SIZE_T > H5_SIZEOF_HSIZE_T
-    #define ASSIGN_size_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SIZE_T == H5_SIZEOF_HSIZE_T */
-    #define ASSIGN_size_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: size_t dst: hsize_t */
-
-/* src: size_t, dst: hssize_t */
-#if H5_SIZEOF_SIZE_T < H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_size_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SIZE_T > H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_size_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SIZE_T == H5_SIZEOF_HSSIZE_T */
-    #define ASSIGN_size_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: size_t dst: hssize_t */
-
-/* src: size_t, dst: h5_stat_size_t */
-#if H5_SIZEOF_SIZE_T < H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_size_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SIZE_T > H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_size_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SIZE_T == H5_SIZEOF_H5_STAT_SIZE_T */
-    #define ASSIGN_size_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: size_t dst: h5_stat_size_t */
-
-
-/* Assignment checks for ssize_t */
-
-/* src: ssize_t, dst: unsigned */
-#if H5_SIZEOF_SSIZE_T < H5_SIZEOF_UNSIGNED
-    #define ASSIGN_ssize_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SSIZE_T > H5_SIZEOF_UNSIGNED
-    #define ASSIGN_ssize_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SSIZE_T == H5_SIZEOF_UNSIGNED */
-    #define ASSIGN_ssize_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ssize_t dst: unsigned */
-
-/* src: ssize_t, dst: int */
-#if H5_SIZEOF_SSIZE_T < H5_SIZEOF_INT
-    #define ASSIGN_ssize_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SSIZE_T > H5_SIZEOF_INT
-    #define ASSIGN_ssize_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SSIZE_T == H5_SIZEOF_INT */
-    #define ASSIGN_ssize_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: ssize_t dst: int */
-
-/* src: ssize_t, dst: uint8_t */
-#if H5_SIZEOF_SSIZE_T < H5_SIZEOF_UINT8_T
-    #define ASSIGN_ssize_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SSIZE_T > H5_SIZEOF_UINT8_T
-    #define ASSIGN_ssize_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SSIZE_T == H5_SIZEOF_UINT8_T */
-    #define ASSIGN_ssize_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ssize_t dst: uint8_t */
-
-/* src: ssize_t, dst: uint16_t */
-#if H5_SIZEOF_SSIZE_T < H5_SIZEOF_UINT16_T
-    #define ASSIGN_ssize_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SSIZE_T > H5_SIZEOF_UINT16_T
-    #define ASSIGN_ssize_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SSIZE_T == H5_SIZEOF_UINT16_T */
-    #define ASSIGN_ssize_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ssize_t dst: uint16_t */
-
-/* src: ssize_t, dst: uint32_t */
-#if H5_SIZEOF_SSIZE_T < H5_SIZEOF_UINT32_T
-    #define ASSIGN_ssize_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SSIZE_T > H5_SIZEOF_UINT32_T
-    #define ASSIGN_ssize_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SSIZE_T == H5_SIZEOF_UINT32_T */
-    #define ASSIGN_ssize_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ssize_t dst: uint32_t */
-
-/* src: ssize_t, dst: uint64_t */
-#if H5_SIZEOF_SSIZE_T < H5_SIZEOF_UINT64_T
-    #define ASSIGN_ssize_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SSIZE_T > H5_SIZEOF_UINT64_T
-    #define ASSIGN_ssize_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SSIZE_T == H5_SIZEOF_UINT64_T */
-    #define ASSIGN_ssize_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ssize_t dst: uint64_t */
-
-/* src: ssize_t, dst: ptrdiff_t */
-#if H5_SIZEOF_SSIZE_T < H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_ssize_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SSIZE_T > H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_ssize_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SSIZE_T == H5_SIZEOF_PTRDIFF_T */
-    #define ASSIGN_ssize_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: ssize_t dst: ptrdiff_t */
-
-/* src: ssize_t, dst: size_t */
-#if H5_SIZEOF_SSIZE_T < H5_SIZEOF_SIZE_T
-    #define ASSIGN_ssize_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SSIZE_T > H5_SIZEOF_SIZE_T
-    #define ASSIGN_ssize_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SSIZE_T == H5_SIZEOF_SIZE_T */
-    #define ASSIGN_ssize_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ssize_t dst: size_t */
-
-/* src: ssize_t, dst: haddr_t */
-#if H5_SIZEOF_SSIZE_T < H5_SIZEOF_HADDR_T
-    #define ASSIGN_ssize_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SSIZE_T > H5_SIZEOF_HADDR_T
-    #define ASSIGN_ssize_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SSIZE_T == H5_SIZEOF_HADDR_T */
-    #define ASSIGN_ssize_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ssize_t dst: haddr_t */
-
-/* src: ssize_t, dst: hsize_t */
-#if H5_SIZEOF_SSIZE_T < H5_SIZEOF_HSIZE_T
-    #define ASSIGN_ssize_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SSIZE_T > H5_SIZEOF_HSIZE_T
-    #define ASSIGN_ssize_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SSIZE_T == H5_SIZEOF_HSIZE_T */
-    #define ASSIGN_ssize_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ssize_t dst: hsize_t */
-
-/* src: ssize_t, dst: hssize_t */
-#if H5_SIZEOF_SSIZE_T < H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_ssize_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SSIZE_T > H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_ssize_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SSIZE_T == H5_SIZEOF_HSSIZE_T */
-    #define ASSIGN_ssize_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: ssize_t dst: hssize_t */
-
-/* src: ssize_t, dst: h5_stat_size_t */
-#if H5_SIZEOF_SSIZE_T < H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_ssize_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_SSIZE_T > H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_ssize_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_SSIZE_T == H5_SIZEOF_H5_STAT_SIZE_T */
-    #define ASSIGN_ssize_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: ssize_t dst: h5_stat_size_t */
-
-
-/* Assignment checks for haddr_t */
-
-/* src: haddr_t, dst: unsigned */
-#if H5_SIZEOF_HADDR_T < H5_SIZEOF_UNSIGNED
-    #define ASSIGN_haddr_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HADDR_T > H5_SIZEOF_UNSIGNED
-    #define ASSIGN_haddr_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HADDR_T == H5_SIZEOF_UNSIGNED */
-    #define ASSIGN_haddr_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: haddr_t dst: unsigned */
-
-/* src: haddr_t, dst: int */
-#if H5_SIZEOF_HADDR_T < H5_SIZEOF_INT
-    #define ASSIGN_haddr_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HADDR_T > H5_SIZEOF_INT
-    #define ASSIGN_haddr_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HADDR_T == H5_SIZEOF_INT */
-    #define ASSIGN_haddr_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: haddr_t dst: int */
-
-/* src: haddr_t, dst: uint8_t */
-#if H5_SIZEOF_HADDR_T < H5_SIZEOF_UINT8_T
-    #define ASSIGN_haddr_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HADDR_T > H5_SIZEOF_UINT8_T
-    #define ASSIGN_haddr_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HADDR_T == H5_SIZEOF_UINT8_T */
-    #define ASSIGN_haddr_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: haddr_t dst: uint8_t */
-
-/* src: haddr_t, dst: uint16_t */
-#if H5_SIZEOF_HADDR_T < H5_SIZEOF_UINT16_T
-    #define ASSIGN_haddr_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HADDR_T > H5_SIZEOF_UINT16_T
-    #define ASSIGN_haddr_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HADDR_T == H5_SIZEOF_UINT16_T */
-    #define ASSIGN_haddr_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: haddr_t dst: uint16_t */
-
-/* src: haddr_t, dst: uint32_t */
-#if H5_SIZEOF_HADDR_T < H5_SIZEOF_UINT32_T
-    #define ASSIGN_haddr_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HADDR_T > H5_SIZEOF_UINT32_T
-    #define ASSIGN_haddr_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HADDR_T == H5_SIZEOF_UINT32_T */
-    #define ASSIGN_haddr_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: haddr_t dst: uint32_t */
-
-/* src: haddr_t, dst: uint64_t */
-#if H5_SIZEOF_HADDR_T < H5_SIZEOF_UINT64_T
-    #define ASSIGN_haddr_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HADDR_T > H5_SIZEOF_UINT64_T
-    #define ASSIGN_haddr_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HADDR_T == H5_SIZEOF_UINT64_T */
-    #define ASSIGN_haddr_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: haddr_t dst: uint64_t */
-
-/* src: haddr_t, dst: ptrdiff_t */
-#if H5_SIZEOF_HADDR_T < H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_haddr_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HADDR_T > H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_haddr_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HADDR_T == H5_SIZEOF_PTRDIFF_T */
-    #define ASSIGN_haddr_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: haddr_t dst: ptrdiff_t */
-
-/* src: haddr_t, dst: size_t */
-#if H5_SIZEOF_HADDR_T < H5_SIZEOF_SIZE_T
-    #define ASSIGN_haddr_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HADDR_T > H5_SIZEOF_SIZE_T
-    #define ASSIGN_haddr_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HADDR_T == H5_SIZEOF_SIZE_T */
-    #define ASSIGN_haddr_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: haddr_t dst: size_t */
-
-/* src: haddr_t, dst: ssize_t */
-#if H5_SIZEOF_HADDR_T < H5_SIZEOF_SSIZE_T
-    #define ASSIGN_haddr_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HADDR_T > H5_SIZEOF_SSIZE_T
-    #define ASSIGN_haddr_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HADDR_T == H5_SIZEOF_SSIZE_T */
-    #define ASSIGN_haddr_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: haddr_t dst: ssize_t */
-
-/* src: haddr_t, dst: hsize_t */
-#if H5_SIZEOF_HADDR_T < H5_SIZEOF_HSIZE_T
-    #define ASSIGN_haddr_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HADDR_T > H5_SIZEOF_HSIZE_T
-    #define ASSIGN_haddr_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HADDR_T == H5_SIZEOF_HSIZE_T */
-    #define ASSIGN_haddr_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: haddr_t dst: hsize_t */
-
-/* src: haddr_t, dst: hssize_t */
-#if H5_SIZEOF_HADDR_T < H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_haddr_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HADDR_T > H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_haddr_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HADDR_T == H5_SIZEOF_HSSIZE_T */
-    #define ASSIGN_haddr_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: haddr_t dst: hssize_t */
-
-/* src: haddr_t, dst: h5_stat_size_t */
-#if H5_SIZEOF_HADDR_T < H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_haddr_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HADDR_T > H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_haddr_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HADDR_T == H5_SIZEOF_H5_STAT_SIZE_T */
-    #define ASSIGN_haddr_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: haddr_t dst: h5_stat_size_t */
-
-
-/* Assignment checks for hsize_t */
-
-/* src: hsize_t, dst: unsigned */
-#if H5_SIZEOF_HSIZE_T < H5_SIZEOF_UNSIGNED
-    #define ASSIGN_hsize_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSIZE_T > H5_SIZEOF_UNSIGNED
-    #define ASSIGN_hsize_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSIZE_T == H5_SIZEOF_UNSIGNED */
-    #define ASSIGN_hsize_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: hsize_t dst: unsigned */
-
-/* src: hsize_t, dst: int */
-#if H5_SIZEOF_HSIZE_T < H5_SIZEOF_INT
-    #define ASSIGN_hsize_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSIZE_T > H5_SIZEOF_INT
-    #define ASSIGN_hsize_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSIZE_T == H5_SIZEOF_INT */
-    #define ASSIGN_hsize_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: hsize_t dst: int */
-
-/* src: hsize_t, dst: uint8_t */
-#if H5_SIZEOF_HSIZE_T < H5_SIZEOF_UINT8_T
-    #define ASSIGN_hsize_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSIZE_T > H5_SIZEOF_UINT8_T
-    #define ASSIGN_hsize_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSIZE_T == H5_SIZEOF_UINT8_T */
-    #define ASSIGN_hsize_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: hsize_t dst: uint8_t */
-
-/* src: hsize_t, dst: uint16_t */
-#if H5_SIZEOF_HSIZE_T < H5_SIZEOF_UINT16_T
-    #define ASSIGN_hsize_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSIZE_T > H5_SIZEOF_UINT16_T
-    #define ASSIGN_hsize_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSIZE_T == H5_SIZEOF_UINT16_T */
-    #define ASSIGN_hsize_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: hsize_t dst: uint16_t */
-
-/* src: hsize_t, dst: uint32_t */
-#if H5_SIZEOF_HSIZE_T < H5_SIZEOF_UINT32_T
-    #define ASSIGN_hsize_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSIZE_T > H5_SIZEOF_UINT32_T
-    #define ASSIGN_hsize_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSIZE_T == H5_SIZEOF_UINT32_T */
-    #define ASSIGN_hsize_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: hsize_t dst: uint32_t */
-
-/* src: hsize_t, dst: uint64_t */
-#if H5_SIZEOF_HSIZE_T < H5_SIZEOF_UINT64_T
-    #define ASSIGN_hsize_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSIZE_T > H5_SIZEOF_UINT64_T
-    #define ASSIGN_hsize_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSIZE_T == H5_SIZEOF_UINT64_T */
-    #define ASSIGN_hsize_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: hsize_t dst: uint64_t */
-
-/* src: hsize_t, dst: ptrdiff_t */
-#if H5_SIZEOF_HSIZE_T < H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_hsize_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSIZE_T > H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_hsize_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSIZE_T == H5_SIZEOF_PTRDIFF_T */
-    #define ASSIGN_hsize_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: hsize_t dst: ptrdiff_t */
-
-/* src: hsize_t, dst: size_t */
-#if H5_SIZEOF_HSIZE_T < H5_SIZEOF_SIZE_T
-    #define ASSIGN_hsize_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSIZE_T > H5_SIZEOF_SIZE_T
-    #define ASSIGN_hsize_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSIZE_T == H5_SIZEOF_SIZE_T */
-    #define ASSIGN_hsize_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: hsize_t dst: size_t */
-
-/* src: hsize_t, dst: ssize_t */
-#if H5_SIZEOF_HSIZE_T < H5_SIZEOF_SSIZE_T
-    #define ASSIGN_hsize_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSIZE_T > H5_SIZEOF_SSIZE_T
-    #define ASSIGN_hsize_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSIZE_T == H5_SIZEOF_SSIZE_T */
-    #define ASSIGN_hsize_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: hsize_t dst: ssize_t */
-
-/* src: hsize_t, dst: haddr_t */
-#if H5_SIZEOF_HSIZE_T < H5_SIZEOF_HADDR_T
-    #define ASSIGN_hsize_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSIZE_T > H5_SIZEOF_HADDR_T
-    #define ASSIGN_hsize_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSIZE_T == H5_SIZEOF_HADDR_T */
-    #define ASSIGN_hsize_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: hsize_t dst: haddr_t */
-
-/* src: hsize_t, dst: hssize_t */
-#if H5_SIZEOF_HSIZE_T < H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_hsize_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSIZE_T > H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_hsize_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSIZE_T == H5_SIZEOF_HSSIZE_T */
-    #define ASSIGN_hsize_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: hsize_t dst: hssize_t */
-
-/* src: hsize_t, dst: h5_stat_size_t */
-#if H5_SIZEOF_HSIZE_T < H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_hsize_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSIZE_T > H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_hsize_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSIZE_T == H5_SIZEOF_H5_STAT_SIZE_T */
-    #define ASSIGN_hsize_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: hsize_t dst: h5_stat_size_t */
-
-
-/* Assignment checks for hssize_t */
-
-/* src: hssize_t, dst: unsigned */
-#if H5_SIZEOF_HSSIZE_T < H5_SIZEOF_UNSIGNED
-    #define ASSIGN_hssize_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSSIZE_T > H5_SIZEOF_UNSIGNED
-    #define ASSIGN_hssize_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSSIZE_T == H5_SIZEOF_UNSIGNED */
-    #define ASSIGN_hssize_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: hssize_t dst: unsigned */
-
-/* src: hssize_t, dst: int */
-#if H5_SIZEOF_HSSIZE_T < H5_SIZEOF_INT
-    #define ASSIGN_hssize_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSSIZE_T > H5_SIZEOF_INT
-    #define ASSIGN_hssize_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSSIZE_T == H5_SIZEOF_INT */
-    #define ASSIGN_hssize_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: hssize_t dst: int */
-
-/* src: hssize_t, dst: uint8_t */
-#if H5_SIZEOF_HSSIZE_T < H5_SIZEOF_UINT8_T
-    #define ASSIGN_hssize_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSSIZE_T > H5_SIZEOF_UINT8_T
-    #define ASSIGN_hssize_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSSIZE_T == H5_SIZEOF_UINT8_T */
-    #define ASSIGN_hssize_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: hssize_t dst: uint8_t */
-
-/* src: hssize_t, dst: uint16_t */
-#if H5_SIZEOF_HSSIZE_T < H5_SIZEOF_UINT16_T
-    #define ASSIGN_hssize_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSSIZE_T > H5_SIZEOF_UINT16_T
-    #define ASSIGN_hssize_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSSIZE_T == H5_SIZEOF_UINT16_T */
-    #define ASSIGN_hssize_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: hssize_t dst: uint16_t */
-
-/* src: hssize_t, dst: uint32_t */
-#if H5_SIZEOF_HSSIZE_T < H5_SIZEOF_UINT32_T
-    #define ASSIGN_hssize_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSSIZE_T > H5_SIZEOF_UINT32_T
-    #define ASSIGN_hssize_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSSIZE_T == H5_SIZEOF_UINT32_T */
-    #define ASSIGN_hssize_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: hssize_t dst: uint32_t */
-
-/* src: hssize_t, dst: uint64_t */
-#if H5_SIZEOF_HSSIZE_T < H5_SIZEOF_UINT64_T
-    #define ASSIGN_hssize_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSSIZE_T > H5_SIZEOF_UINT64_T
-    #define ASSIGN_hssize_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSSIZE_T == H5_SIZEOF_UINT64_T */
-    #define ASSIGN_hssize_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: hssize_t dst: uint64_t */
-
-/* src: hssize_t, dst: ptrdiff_t */
-#if H5_SIZEOF_HSSIZE_T < H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_hssize_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSSIZE_T > H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_hssize_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSSIZE_T == H5_SIZEOF_PTRDIFF_T */
-    #define ASSIGN_hssize_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: hssize_t dst: ptrdiff_t */
-
-/* src: hssize_t, dst: size_t */
-#if H5_SIZEOF_HSSIZE_T < H5_SIZEOF_SIZE_T
-    #define ASSIGN_hssize_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSSIZE_T > H5_SIZEOF_SIZE_T
-    #define ASSIGN_hssize_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSSIZE_T == H5_SIZEOF_SIZE_T */
-    #define ASSIGN_hssize_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: hssize_t dst: size_t */
-
-/* src: hssize_t, dst: ssize_t */
-#if H5_SIZEOF_HSSIZE_T < H5_SIZEOF_SSIZE_T
-    #define ASSIGN_hssize_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSSIZE_T > H5_SIZEOF_SSIZE_T
-    #define ASSIGN_hssize_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSSIZE_T == H5_SIZEOF_SSIZE_T */
-    #define ASSIGN_hssize_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: hssize_t dst: ssize_t */
-
-/* src: hssize_t, dst: haddr_t */
-#if H5_SIZEOF_HSSIZE_T < H5_SIZEOF_HADDR_T
-    #define ASSIGN_hssize_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSSIZE_T > H5_SIZEOF_HADDR_T
-    #define ASSIGN_hssize_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSSIZE_T == H5_SIZEOF_HADDR_T */
-    #define ASSIGN_hssize_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: hssize_t dst: haddr_t */
-
-/* src: hssize_t, dst: hsize_t */
-#if H5_SIZEOF_HSSIZE_T < H5_SIZEOF_HSIZE_T
-    #define ASSIGN_hssize_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSSIZE_T > H5_SIZEOF_HSIZE_T
-    #define ASSIGN_hssize_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSSIZE_T == H5_SIZEOF_HSIZE_T */
-    #define ASSIGN_hssize_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: hssize_t dst: hsize_t */
-
-/* src: hssize_t, dst: h5_stat_size_t */
-#if H5_SIZEOF_HSSIZE_T < H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_hssize_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_HSSIZE_T > H5_SIZEOF_H5_STAT_SIZE_T
-    #define ASSIGN_hssize_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_HSSIZE_T == H5_SIZEOF_H5_STAT_SIZE_T */
-    #define ASSIGN_hssize_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
-#endif /* src: hssize_t dst: h5_stat_size_t */
-
-
-/* Assignment checks for h5_stat_size_t */
-
-/* src: h5_stat_size_t, dst: unsigned */
-#if H5_SIZEOF_H5_STAT_SIZE_T < H5_SIZEOF_UNSIGNED
-    #define ASSIGN_h5_stat_size_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_H5_STAT_SIZE_T > H5_SIZEOF_UNSIGNED
-    #define ASSIGN_h5_stat_size_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_H5_STAT_SIZE_T == H5_SIZEOF_UNSIGNED */
-    #define ASSIGN_h5_stat_size_t_TO_unsigned(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: h5_stat_size_t dst: unsigned */
-
-/* src: h5_stat_size_t, dst: int */
-#if H5_SIZEOF_H5_STAT_SIZE_T < H5_SIZEOF_INT
-    #define ASSIGN_h5_stat_size_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_H5_STAT_SIZE_T > H5_SIZEOF_INT
-    #define ASSIGN_h5_stat_size_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_H5_STAT_SIZE_T == H5_SIZEOF_INT */
-    #define ASSIGN_h5_stat_size_t_TO_int(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: h5_stat_size_t dst: int */
-
-/* src: h5_stat_size_t, dst: uint8_t */
-#if H5_SIZEOF_H5_STAT_SIZE_T < H5_SIZEOF_UINT8_T
-    #define ASSIGN_h5_stat_size_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_H5_STAT_SIZE_T > H5_SIZEOF_UINT8_T
-    #define ASSIGN_h5_stat_size_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_H5_STAT_SIZE_T == H5_SIZEOF_UINT8_T */
-    #define ASSIGN_h5_stat_size_t_TO_uint8_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: h5_stat_size_t dst: uint8_t */
-
-/* src: h5_stat_size_t, dst: uint16_t */
-#if H5_SIZEOF_H5_STAT_SIZE_T < H5_SIZEOF_UINT16_T
-    #define ASSIGN_h5_stat_size_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_H5_STAT_SIZE_T > H5_SIZEOF_UINT16_T
-    #define ASSIGN_h5_stat_size_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_H5_STAT_SIZE_T == H5_SIZEOF_UINT16_T */
-    #define ASSIGN_h5_stat_size_t_TO_uint16_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: h5_stat_size_t dst: uint16_t */
-
-/* src: h5_stat_size_t, dst: uint32_t */
-#if H5_SIZEOF_H5_STAT_SIZE_T < H5_SIZEOF_UINT32_T
-    #define ASSIGN_h5_stat_size_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_H5_STAT_SIZE_T > H5_SIZEOF_UINT32_T
-    #define ASSIGN_h5_stat_size_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_H5_STAT_SIZE_T == H5_SIZEOF_UINT32_T */
-    #define ASSIGN_h5_stat_size_t_TO_uint32_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: h5_stat_size_t dst: uint32_t */
-
-/* src: h5_stat_size_t, dst: uint64_t */
-#if H5_SIZEOF_H5_STAT_SIZE_T < H5_SIZEOF_UINT64_T
-    #define ASSIGN_h5_stat_size_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_H5_STAT_SIZE_T > H5_SIZEOF_UINT64_T
-    #define ASSIGN_h5_stat_size_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_H5_STAT_SIZE_T == H5_SIZEOF_UINT64_T */
-    #define ASSIGN_h5_stat_size_t_TO_uint64_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: h5_stat_size_t dst: uint64_t */
-
-/* src: h5_stat_size_t, dst: ptrdiff_t */
-#if H5_SIZEOF_H5_STAT_SIZE_T < H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_h5_stat_size_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_H5_STAT_SIZE_T > H5_SIZEOF_PTRDIFF_T
-    #define ASSIGN_h5_stat_size_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_H5_STAT_SIZE_T == H5_SIZEOF_PTRDIFF_T */
-    #define ASSIGN_h5_stat_size_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: h5_stat_size_t dst: ptrdiff_t */
-
-/* src: h5_stat_size_t, dst: size_t */
-#if H5_SIZEOF_H5_STAT_SIZE_T < H5_SIZEOF_SIZE_T
-    #define ASSIGN_h5_stat_size_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_H5_STAT_SIZE_T > H5_SIZEOF_SIZE_T
-    #define ASSIGN_h5_stat_size_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_H5_STAT_SIZE_T == H5_SIZEOF_SIZE_T */
-    #define ASSIGN_h5_stat_size_t_TO_size_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: h5_stat_size_t dst: size_t */
-
-/* src: h5_stat_size_t, dst: ssize_t */
-#if H5_SIZEOF_H5_STAT_SIZE_T < H5_SIZEOF_SSIZE_T
-    #define ASSIGN_h5_stat_size_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_H5_STAT_SIZE_T > H5_SIZEOF_SSIZE_T
-    #define ASSIGN_h5_stat_size_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_H5_STAT_SIZE_T == H5_SIZEOF_SSIZE_T */
-    #define ASSIGN_h5_stat_size_t_TO_ssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: h5_stat_size_t dst: ssize_t */
-
-/* src: h5_stat_size_t, dst: haddr_t */
-#if H5_SIZEOF_H5_STAT_SIZE_T < H5_SIZEOF_HADDR_T
-    #define ASSIGN_h5_stat_size_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_H5_STAT_SIZE_T > H5_SIZEOF_HADDR_T
-    #define ASSIGN_h5_stat_size_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_H5_STAT_SIZE_T == H5_SIZEOF_HADDR_T */
-    #define ASSIGN_h5_stat_size_t_TO_haddr_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: h5_stat_size_t dst: haddr_t */
-
-/* src: h5_stat_size_t, dst: hsize_t */
-#if H5_SIZEOF_H5_STAT_SIZE_T < H5_SIZEOF_HSIZE_T
-    #define ASSIGN_h5_stat_size_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_H5_STAT_SIZE_T > H5_SIZEOF_HSIZE_T
-    #define ASSIGN_h5_stat_size_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_H5_STAT_SIZE_T == H5_SIZEOF_HSIZE_T */
-    #define ASSIGN_h5_stat_size_t_TO_hsize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: h5_stat_size_t dst: hsize_t */
-
-/* src: h5_stat_size_t, dst: hssize_t */
-#if H5_SIZEOF_H5_STAT_SIZE_T < H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_h5_stat_size_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#elif H5_SIZEOF_H5_STAT_SIZE_T > H5_SIZEOF_HSSIZE_T
-    #define ASSIGN_h5_stat_size_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
-#else /* H5_SIZEOF_H5_STAT_SIZE_T == H5_SIZEOF_HSSIZE_T */
-    #define ASSIGN_h5_stat_size_t_TO_hssize_t(dst, dsttype, src, srctype) \
-        ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
-#endif /* src: h5_stat_size_t dst: hssize_t */
-
-#endif /* H5overflow_H */
-
diff --git a/interfaces/ext/hdf5/H5pubconf.h b/interfaces/ext/hdf5/H5pubconf.h
deleted file mode 100644
index 66a27ce..0000000
--- a/interfaces/ext/hdf5/H5pubconf.h
+++ /dev/null
@@ -1,723 +0,0 @@
-/* src/H5config.h.  Generated from H5config.h.in by configure.  */
-/* src/H5config.h.in.  Generated from configure.in by autoheader.  */
-
-/* Define if building universal (internal helper macro) */
-/* #undef H5_AC_APPLE_UNIVERSAL_BUILD */
-
-/* Define if your system generates wrong code for log2 routine. */
-/* #undef H5_BAD_LOG2_CODE_GENERATED */
-
-/* Define if the memory buffers being written to disk should be cleared before
-   writing. */
-#define H5_CLEAR_MEMORY 1
-
-/* Define if your system can handle converting denormalized floating-point
-   values. */
-#define H5_CONVERT_DENORMAL_FLOAT 1
-
-/* Define if C++ compiler recognizes offsetof */
-#define H5_CXX_HAVE_OFFSETOF 1
-
-/* Define a macro for Cygwin (on XP only) where the compiler has rounding
-   problem converting from unsigned long long to long double */
-/* #undef H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM */
-
-/* Define the default virtual file driver to compile */
-#define H5_DEFAULT_VFD H5FD_SEC2
-
-/* Define if `dev_t' is a scalar */
-#define H5_DEV_T_IS_SCALAR 1
-
-/* Define to dummy `main' function (if any) required to link to the Fortran
-   libraries. */
-/* #undef H5_FC_DUMMY_MAIN */
-
-/* Define if F77 and FC dummy `main' functions are identical. */
-/* #undef H5_FC_DUMMY_MAIN_EQ_F77 */
-
-/* Define to a macro mangling the given C identifier (in lower and upper
-   case), which must not contain underscores, for linking with Fortran. */
-#define H5_FC_FUNC(name,NAME) name ## _
-
-/* As FC_FUNC, but for C identifiers containing underscores. */
-#define H5_FC_FUNC_(name,NAME) name ## _
-
-/* Define if your system can handle overflow converting floating-point to
-   integer values. */
-#define H5_FP_TO_INTEGER_OVERFLOW_WORKS 1
-
-/* Define if your system roundup accurately converting floating-point to
-   unsigned long long values. */
-#define H5_FP_TO_ULLONG_ACCURATE 1
-
-/* Define if your system has right maximum convert floating-point to unsigned
-   long long values. */
-/* #undef H5_FP_TO_ULLONG_RIGHT_MAXIMUM */
-
-/* Define if gettimeofday() populates the tz pointer passed in */
-#define H5_GETTIMEOFDAY_GIVES_TZ 1
-
-/* Define to 1 if you have the `alarm' function. */
-#define H5_HAVE_ALARM 1
-
-/* Define if the __attribute__(()) extension is present */
-#define H5_HAVE_ATTRIBUTE 1
-
-/* Define to 1 if you have the `BSDgettimeofday' function. */
-/* #undef H5_HAVE_BSDGETTIMEOFDAY */
-
-/* Define if the compiler understands C99 designated initialization of structs
-   and unions */
-#define H5_HAVE_C99_DESIGNATED_INITIALIZER 1
-
-/* Define if the compiler understands the __func__ keyword */
-#define H5_HAVE_C99_FUNC 1
-
-/* Define if the function stack tracing code is to be compiled in */
-/* #undef H5_HAVE_CODESTACK */
-
-/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
-   */
-/* #undef H5_HAVE_DECL_TZNAME */
-
-/* Define to 1 if you have the `difftime' function. */
-#define H5_HAVE_DIFFTIME 1
-
-/* Define if the direct I/O virtual file driver should be compiled */
-/* #undef H5_HAVE_DIRECT */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define H5_HAVE_DLFCN_H 1
-
-/* Define to 1 if you have the <dmalloc.h> header file. */
-/* #undef H5_HAVE_DMALLOC_H */
-
-/* Define if library information should be embedded in the executables */
-#define H5_HAVE_EMBEDDED_LIBINFO 1
-
-/* Define to 1 if you have the <features.h> header file. */
-#define H5_HAVE_FEATURES_H 1
-
-/* Define if support for deflate (zlib) filter is enabled */
-#define H5_HAVE_FILTER_DEFLATE 1
-
-/* Define if support for Fletcher32 checksum is enabled */
-#define H5_HAVE_FILTER_FLETCHER32 1
-
-/* Define if support for nbit filter is enabled */
-#define H5_HAVE_FILTER_NBIT 1
-
-/* Define if support for scaleoffset filter is enabled */
-#define H5_HAVE_FILTER_SCALEOFFSET 1
-
-/* Define if support for shuffle filter is enabled */
-#define H5_HAVE_FILTER_SHUFFLE 1
-
-/* Define if support for szip filter is enabled */
-#define H5_HAVE_FILTER_SZIP 1
-
-/* Define to 1 if you have the `fork' function. */
-#define H5_HAVE_FORK 1
-
-/* Define to 1 if you have the `frexpf' function. */
-#define H5_HAVE_FREXPF 1
-
-/* Define to 1 if you have the `frexpl' function. */
-#define H5_HAVE_FREXPL 1
-
-/* Define to 1 if you have the `fseeko' function. */
-#define H5_HAVE_FSEEKO 1
-
-/* Define to 1 if you have the `fseeko64' function. */
-#define H5_HAVE_FSEEKO64 1
-
-/* Define to 1 if you have the `fstat64' function. */
-#define H5_HAVE_FSTAT64 1
-
-/* Define to 1 if you have the `ftello' function. */
-#define H5_HAVE_FTELLO 1
-
-/* Define to 1 if you have the `ftello64' function. */
-#define H5_HAVE_FTELLO64 1
-
-/* Define to 1 if you have the `ftruncate64' function. */
-#define H5_HAVE_FTRUNCATE64 1
-
-/* Define if the compiler understands the __FUNCTION__ keyword */
-#define H5_HAVE_FUNCTION 1
-
-/* Define to 1 if you have the `GetConsoleScreenBufferInfo' function. */
-/* #undef H5_HAVE_GETCONSOLESCREENBUFFERINFO */
-
-/* Define to 1 if you have the `gethostname' function. */
-#define H5_HAVE_GETHOSTNAME 1
-
-/* Define to 1 if you have the `getpwuid' function. */
-#define H5_HAVE_GETPWUID 1
-
-/* Define to 1 if you have the `getrusage' function. */
-#define H5_HAVE_GETRUSAGE 1
-
-/* Define to 1 if you have the `gettextinfo' function. */
-/* #undef H5_HAVE_GETTEXTINFO */
-
-/* Define to 1 if you have the `gettimeofday' function. */
-#define H5_HAVE_GETTIMEOFDAY 1
-
-/* Define to 1 if you have the `get_fpc_csr' function. */
-/* #undef H5_HAVE_GET_FPC_CSR */
-
-/* Define if we have GPFS support */
-/* #undef H5_HAVE_GPFS */
-
-/* Define to 1 if you have the <gpfs.h> header file. */
-/* #undef H5_HAVE_GPFS_H */
-
-/* Define if h5dump packed bits feature is enabled */
-#define H5_HAVE_H5DUMP_PACKED_BITS 1
-
-/* Define if library will contain instrumentation to detect correct
-   optimization operation */
-/* #undef H5_HAVE_INSTRUMENTED_LIBRARY */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define H5_HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the `ioctl' function. */
-#define H5_HAVE_IOCTL 1
-
-/* Define to 1 if you have the <io.h> header file. */
-/* #undef H5_HAVE_IO_H */
-
-/* Define to 1 if you have the `dmalloc' library (-ldmalloc). */
-/* #undef H5_HAVE_LIBDMALLOC */
-
-/* Define to 1 if you have the `lmpe' library (-llmpe). */
-/* #undef H5_HAVE_LIBLMPE */
-
-/* Define to 1 if you have the `m' library (-lm). */
-#define H5_HAVE_LIBM 1
-
-/* Define to 1 if you have the `mpe' library (-lmpe). */
-/* #undef H5_HAVE_LIBMPE */
-
-/* Define to 1 if you have the `mpi' library (-lmpi). */
-/* #undef H5_HAVE_LIBMPI */
-
-/* Define to 1 if you have the `mpich' library (-lmpich). */
-/* #undef H5_HAVE_LIBMPICH */
-
-/* Define to 1 if you have the `mpio' library (-lmpio). */
-/* #undef H5_HAVE_LIBMPIO */
-
-/* Define to 1 if you have the `nsl' library (-lnsl). */
-/* #undef H5_HAVE_LIBNSL */
-
-/* Define to 1 if you have the `pthread' library (-lpthread). */
-/* #undef H5_HAVE_LIBPTHREAD */
-
-/* Define to 1 if you have the `socket' library (-lsocket). */
-/* #undef H5_HAVE_LIBSOCKET */
-
-/* Define to 1 if you have the `sz' library (-lsz). */
-#define H5_HAVE_LIBSZ 1
-
-/* Define to 1 if you have the `z' library (-lz). */
-#define H5_HAVE_LIBZ 1
-
-/* Define to 1 if you have the `longjmp' function. */
-#define H5_HAVE_LONGJMP 1
-
-/* Define to 1 if you have the `lseek64' function. */
-#define H5_HAVE_LSEEK64 1
-
-/* Define to 1 if you have the `lstat' function. */
-#define H5_HAVE_LSTAT 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define H5_HAVE_MEMORY_H 1
-
-/* Define if we have MPE support */
-/* #undef H5_HAVE_MPE */
-
-/* Define to 1 if you have the <mpe.h> header file. */
-/* #undef H5_HAVE_MPE_H */
-
-/* Define if MPI_File_get_size works correctly */
-/* #undef H5_HAVE_MPI_GET_SIZE */
-
-/* Define if `MPI_Comm_c2f' and `MPI_Comm_f2c' exists */
-/* #undef H5_HAVE_MPI_MULTI_LANG_Comm */
-
-/* Define if `MPI_Info_c2f' and `MPI_Info_f2c' exists */
-/* #undef H5_HAVE_MPI_MULTI_LANG_Info */
-
-/* Define if we have parallel support */
-/* #undef H5_HAVE_PARALLEL */
-
-/* Define to 1 if you have the <pthread.h> header file. */
-/* #undef H5_HAVE_PTHREAD_H */
-
-/* Define to 1 if you have the `random' function. */
-#define H5_HAVE_RANDOM 1
-
-/* Define to 1 if you have the `rand_r' function. */
-#define H5_HAVE_RAND_R 1
-
-/* Define to 1 if you have the `setjmp' function. */
-#define H5_HAVE_SETJMP 1
-
-/* Define to 1 if you have the <setjmp.h> header file. */
-#define H5_HAVE_SETJMP_H 1
-
-/* Define to 1 if you have the `setsysinfo' function. */
-/* #undef H5_HAVE_SETSYSINFO */
-
-/* Define to 1 if you have the `siglongjmp' function. */
-#define H5_HAVE_SIGLONGJMP 1
-
-/* Define to 1 if you have the `signal' function. */
-#define H5_HAVE_SIGNAL 1
-
-/* Define to 1 if you have the `sigprocmask' function. */
-#define H5_HAVE_SIGPROCMASK 1
-
-/* Define to 1 if you have the `sigsetjmp' function. */
-/* #undef H5_HAVE_SIGSETJMP */
-
-/* Define to 1 if you have the `snprintf' function. */
-#define H5_HAVE_SNPRINTF 1
-
-/* Define to 1 if you have the `srandom' function. */
-#define H5_HAVE_SRANDOM 1
-
-/* Define to 1 if you have the `stat64' function. */
-#define H5_HAVE_STAT64 1
-
-/* Define if `struct stat' has the `st_blocks' field */
-#define H5_HAVE_STAT_ST_BLOCKS 1
-
-/* Define to 1 if you have the <stddef.h> header file. */
-#define H5_HAVE_STDDEF_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define H5_HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define H5_HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `strdup' function. */
-#define H5_HAVE_STRDUP 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define H5_HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define H5_HAVE_STRING_H 1
-
-/* Define if `struct text_info' is defined */
-/* #undef H5_HAVE_STRUCT_TEXT_INFO */
-
-/* Define if `struct timezone' is defined */
-#define H5_HAVE_STRUCT_TIMEZONE 1
-
-/* Define to 1 if `tm_zone' is a member of `struct tm'. */
-#define H5_HAVE_STRUCT_TM_TM_ZONE 1
-
-/* Define if `struct videoconfig' is defined */
-/* #undef H5_HAVE_STRUCT_VIDEOCONFIG */
-
-/* Define to 1 if you have the `symlink' function. */
-#define H5_HAVE_SYMLINK 1
-
-/* Define to 1 if you have the `system' function. */
-#define H5_HAVE_SYSTEM 1
-
-/* Define to 1 if you have the <sys/fpu.h> header file. */
-/* #undef H5_HAVE_SYS_FPU_H */
-
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#define H5_HAVE_SYS_IOCTL_H 1
-
-/* Define to 1 if you have the <sys/proc.h> header file. */
-/* #undef H5_HAVE_SYS_PROC_H */
-
-/* Define to 1 if you have the <sys/resource.h> header file. */
-#define H5_HAVE_SYS_RESOURCE_H 1
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#define H5_HAVE_SYS_SOCKET_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define H5_HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/sysinfo.h> header file. */
-/* #undef H5_HAVE_SYS_SYSINFO_H */
-
-/* Define to 1 if you have the <sys/timeb.h> header file. */
-#define H5_HAVE_SYS_TIMEB_H 1
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#define H5_HAVE_SYS_TIME_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define H5_HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <szlib.h> header file. */
-#define H5_HAVE_SZLIB_H 1
-
-/* Define if we have thread safe support */
-/* #undef H5_HAVE_THREADSAFE */
-
-/* Define if `timezone' is a global variable */
-/* #undef H5_HAVE_TIMEZONE */
-
-/* Define if the ioctl TIOCGETD is defined */
-#define H5_HAVE_TIOCGETD 1
-
-/* Define if the ioctl TIOGWINSZ is defined */
-#define H5_HAVE_TIOCGWINSZ 1
-
-/* Define to 1 if you have the `tmpfile' function. */
-#define H5_HAVE_TMPFILE 1
-
-/* Define if `tm_gmtoff' is a member of `struct tm' */
-#define H5_HAVE_TM_GMTOFF 1
-
-/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
-   `HAVE_STRUCT_TM_TM_ZONE' instead. */
-#define H5_HAVE_TM_ZONE 1
-
-/* Define to 1 if you don't have `tm_zone' but do have the external array
-   `tzname'. */
-/* #undef H5_HAVE_TZNAME */
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define H5_HAVE_UNISTD_H 1
-
-/* Define to 1 if you have the `vasprintf' function. */
-#define H5_HAVE_VASPRINTF 1
-
-/* Define to 1 if you have the `vsnprintf' function. */
-#define H5_HAVE_VSNPRINTF 1
-
-/* Define to 1 if you have the `waitpid' function. */
-#define H5_HAVE_WAITPID 1
-
-/* Define if your system has window style path name. */
-/* #undef H5_HAVE_WINDOW_PATH */
-
-/* Define to 1 if you have the <winsock.h> header file. */
-/* #undef H5_HAVE_WINSOCK_H */
-
-/* Define to 1 if you have the <zlib.h> header file. */
-#define H5_HAVE_ZLIB_H 1
-
-/* Define to 1 if you have the `_getvideoconfig' function. */
-/* #undef H5_HAVE__GETVIDEOCONFIG */
-
-/* Define to 1 if you have the `_scrsize' function. */
-/* #undef H5_HAVE__SCRSIZE */
-
-/* Define if `__tm_gmtoff' is a member of `struct tm' */
-/* #undef H5_HAVE___TM_GMTOFF */
-
-/* Define if your system can't handle converting floating-point values to long
-   long. */
-/* #undef H5_HW_FP_TO_LLONG_NOT_WORKS */
-
-/* Define if HDF5's high-level library headers should be included in hdf5.h */
-#define H5_INCLUDE_HL 1
-
-/* Define if your system can accurately convert from integers to long double
-   values. */
-#define H5_INTEGER_TO_LDOUBLE_ACCURATE 1
-
-/* Define if your system can convert long double to integers accurately. */
-#define H5_LDOUBLE_TO_INTEGER_ACCURATE 1
-
-/* Define if your system can convert from long double to integer values. */
-#define H5_LDOUBLE_TO_INTEGER_WORKS 1
-
-/* Define if your system can convert long double to (unsigned) long long
-   values correctly. */
-#define H5_LDOUBLE_TO_LLONG_ACCURATE 1
-
-/* Define if your system converts long double to (unsigned) long values with
-   special algorithm. */
-/* #undef H5_LDOUBLE_TO_LONG_SPECIAL */
-
-/* Define if your system can convert long double to unsigned int values
-   correctly. */
-#define H5_LDOUBLE_TO_UINT_ACCURATE 1
-
-/* Define if your system can compile long long to floating-point casts. */
-#define H5_LLONG_TO_FP_CAST_WORKS 1
-
-/* Define if your system can convert (unsigned) long long to long double
-   values correctly. */
-#define H5_LLONG_TO_LDOUBLE_CORRECT 1
-
-/* Define if your system can convert (unsigned) long to long double values
-   with special algorithm. */
-/* #undef H5_LONG_TO_LDOUBLE_SPECIAL */
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#define H5_LT_OBJDIR ".libs/"
-
-/* Define if the metadata trace file code is to be compiled in */
-/* #undef H5_METADATA_TRACE_FILE */
-
-/* Define if your system can handle complicated MPI derived datatype
-   correctly. */
-/* #undef H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS */
-
-/* Define if your system's `MPI_File_set_size' function works for files over
-   2GB. */
-/* #undef H5_MPI_FILE_SET_SIZE_BIG */
-
-/* Define if your system can handle special collective IO properly. */
-/* #undef H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS */
-
-/* Define if we can violate pointer alignment restrictions */
-#define H5_NO_ALIGNMENT_RESTRICTIONS 1
-
-/* Define if deprecated public API symbols are disabled */
-/* #undef H5_NO_DEPRECATED_SYMBOLS */
-
-/* Define if shared writing must be disabled (CodeWarrior only) */
-/* #undef H5_NO_SHARED_WRITING */
-
-/* Name of package */
-#define H5_PACKAGE "hdf5"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define H5_PACKAGE_BUGREPORT "help at hdfgroup.org"
-
-/* Define to the full name of this package. */
-#define H5_PACKAGE_NAME "HDF5"
-
-/* Define to the full name and version of this package. */
-#define H5_PACKAGE_STRING "HDF5 1.8.6"
-
-/* Define to the one symbol short name of this package. */
-#define H5_PACKAGE_TARNAME "hdf5"
-
-/* Define to the home page for this package. */
-#define H5_PACKAGE_URL ""
-
-/* Define to the version of this package. */
-#define H5_PACKAGE_VERSION "1.8.6"
-
-/* Width for printf() for type `long long' or `__int64', use `ll' */
-#define H5_PRINTF_LL_WIDTH "l"
-
-/* The size of `char', as computed by sizeof. */
-#define H5_SIZEOF_CHAR 1
-
-/* The size of `double', as computed by sizeof. */
-#define H5_SIZEOF_DOUBLE 8
-
-/* The size of `float', as computed by sizeof. */
-#define H5_SIZEOF_FLOAT 4
-
-/* The size of `int', as computed by sizeof. */
-#define H5_SIZEOF_INT 4
-
-/* The size of `int16_t', as computed by sizeof. */
-#define H5_SIZEOF_INT16_T 2
-
-/* The size of `int32_t', as computed by sizeof. */
-#define H5_SIZEOF_INT32_T 4
-
-/* The size of `int64_t', as computed by sizeof. */
-#define H5_SIZEOF_INT64_T 8
-
-/* The size of `int8_t', as computed by sizeof. */
-#define H5_SIZEOF_INT8_T 1
-
-/* The size of `int_fast16_t', as computed by sizeof. */
-#define H5_SIZEOF_INT_FAST16_T 8
-
-/* The size of `int_fast32_t', as computed by sizeof. */
-#define H5_SIZEOF_INT_FAST32_T 8
-
-/* The size of `int_fast64_t', as computed by sizeof. */
-#define H5_SIZEOF_INT_FAST64_T 8
-
-/* The size of `int_fast8_t', as computed by sizeof. */
-#define H5_SIZEOF_INT_FAST8_T 1
-
-/* The size of `int_least16_t', as computed by sizeof. */
-#define H5_SIZEOF_INT_LEAST16_T 2
-
-/* The size of `int_least32_t', as computed by sizeof. */
-#define H5_SIZEOF_INT_LEAST32_T 4
-
-/* The size of `int_least64_t', as computed by sizeof. */
-#define H5_SIZEOF_INT_LEAST64_T 8
-
-/* The size of `int_least8_t', as computed by sizeof. */
-#define H5_SIZEOF_INT_LEAST8_T 1
-
-/* The size of `long', as computed by sizeof. */
-#define H5_SIZEOF_LONG 8
-
-/* The size of `long double', as computed by sizeof. */
-#define H5_SIZEOF_LONG_DOUBLE 16
-
-/* The size of `long long', as computed by sizeof. */
-#define H5_SIZEOF_LONG_LONG 8
-
-/* The size of `off64_t', as computed by sizeof. */
-#define H5_SIZEOF_OFF64_T 8
-
-/* The size of `off_t', as computed by sizeof. */
-#define H5_SIZEOF_OFF_T 8
-
-/* The size of `ptrdiff_t', as computed by sizeof. */
-#define H5_SIZEOF_PTRDIFF_T 8
-
-/* The size of `short', as computed by sizeof. */
-#define H5_SIZEOF_SHORT 2
-
-/* The size of `size_t', as computed by sizeof. */
-#define H5_SIZEOF_SIZE_T 8
-
-/* The size of `ssize_t', as computed by sizeof. */
-#define H5_SIZEOF_SSIZE_T 8
-
-/* The size of `uint16_t', as computed by sizeof. */
-#define H5_SIZEOF_UINT16_T 2
-
-/* The size of `uint32_t', as computed by sizeof. */
-#define H5_SIZEOF_UINT32_T 4
-
-/* The size of `uint64_t', as computed by sizeof. */
-#define H5_SIZEOF_UINT64_T 8
-
-/* The size of `uint8_t', as computed by sizeof. */
-#define H5_SIZEOF_UINT8_T 1
-
-/* The size of `uint_fast16_t', as computed by sizeof. */
-#define H5_SIZEOF_UINT_FAST16_T 8
-
-/* The size of `uint_fast32_t', as computed by sizeof. */
-#define H5_SIZEOF_UINT_FAST32_T 8
-
-/* The size of `uint_fast64_t', as computed by sizeof. */
-#define H5_SIZEOF_UINT_FAST64_T 8
-
-/* The size of `uint_fast8_t', as computed by sizeof. */
-#define H5_SIZEOF_UINT_FAST8_T 1
-
-/* The size of `uint_least16_t', as computed by sizeof. */
-#define H5_SIZEOF_UINT_LEAST16_T 2
-
-/* The size of `uint_least32_t', as computed by sizeof. */
-#define H5_SIZEOF_UINT_LEAST32_T 4
-
-/* The size of `uint_least64_t', as computed by sizeof. */
-#define H5_SIZEOF_UINT_LEAST64_T 8
-
-/* The size of `uint_least8_t', as computed by sizeof. */
-#define H5_SIZEOF_UINT_LEAST8_T 1
-
-/* The size of `unsigned', as computed by sizeof. */
-#define H5_SIZEOF_UNSIGNED 4
-
-/* The size of `__int64', as computed by sizeof. */
-#define H5_SIZEOF___INT64 0
-
-/* Define to 1 if you have the ANSI C header files. */
-#define H5_STDC_HEADERS 1
-
-/* Define if strict file format checks are enabled */
-/* #undef H5_STRICT_FORMAT_CHECKS */
-
-/* Define if your system supports pthread_attr_setscope(&attribute,
-   PTHREAD_SCOPE_SYSTEM) call. */
-#define H5_SYSTEM_SCOPE_THREADS 1
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#define H5_TIME_WITH_SYS_TIME 1
-
-/* Define to 1 if your <sys/time.h> declares `struct tm'. */
-/* #undef H5_TM_IN_SYS_TIME */
-
-/* Define if your system can compile unsigned long long to floating-point
-   casts. */
-#define H5_ULLONG_TO_FP_CAST_WORKS 1
-
-/* Define if your system can convert unsigned long long to long double with
-   correct precision. */
-#define H5_ULLONG_TO_LDOUBLE_PRECISION 1
-
-/* Define if your system accurately converting unsigned long to float values.
-   */
-#define H5_ULONG_TO_FLOAT_ACCURATE 1
-
-/* Define if your system can accurately convert unsigned (long) long values to
-   floating-point values. */
-#define H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE 1
-
-/* Define using v1.6 public API symbols by default */
-/* #undef H5_USE_16_API_DEFAULT */
-
-/* Define if a memory checking tool will be used on the library, to cause
-   library to be very picky about memory operations and also disable the
-   internal free list manager code. */
-/* #undef H5_USING_MEMCHECKER */
-
-/* Version number of package */
-#define H5_VERSION "1.8.6"
-
-/* Define if vsnprintf() returns the correct value for formatted strings that
-   don't fit into size allowed */
-#define H5_VSNPRINTF_WORKS 1
-
-/* Data accuracy is prefered to speed during data conversions */
-#define H5_WANT_DATA_ACCURACY 1
-
-/* Check exception handling functions during data conversions */
-#define H5_WANT_DCONV_EXCEPTION 1
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-/* #  undef WORDS_BIGENDIAN */
-# endif
-#endif
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-/* #undef H5__FILE_OFFSET_BITS */
-
-/* Define for large files, on AIX-style hosts. */
-/* #undef H5__LARGE_FILES */
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef H5_const */
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
-   calls it, or to nothing if 'inline' is not supported under any name.  */
-#ifndef __cplusplus
-/* #undef H5_inline */
-#endif
-
-/* Define to `long int' if <sys/types.h> does not define. */
-/* #undef H5_off_t */
-
-/* Define to `long' if <sys/types.h> does not define. */
-/* #undef H5_ptrdiff_t */
-
-/* Define to `unsigned long' if <sys/types.h> does not define. */
-/* #undef H5_size_t */
-
-/* Define to `long' if <sys/types.h> does not define. */
-/* #undef H5_ssize_t */
diff --git a/interfaces/ext/hdf5/H5public.h b/interfaces/ext/hdf5/H5public.h
deleted file mode 100644
index 5c726d2..0000000
--- a/interfaces/ext/hdf5/H5public.h
+++ /dev/null
@@ -1,310 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This file contains public declarations for the HDF5 module.
- */
-#ifndef _H5public_H
-#define _H5public_H
-
-/* Include files for public use... */
-/*
- * Since H5pubconf.h is a generated header file, it is messy to try
- * to put a #ifndef _H5pubconf_H ... #endif guard in it.
- * HDF5 has set an internal rule that it is being included here.
- * Source files should NOT include H5pubconf.h directly but include
- * it via H5public.h.  The #ifndef _H5public_H guard above would
- * prevent repeated include.
- */
-#include "H5pubconf.h"		/*from configure                             */
-
-/* API Version macro wrapper definitions */
-#include "H5version.h"
-
-#ifdef H5_HAVE_FEATURES_H
-#include <features.h>           /*for setting POSIX, BSD, etc. compatibility */
-#endif
-#ifdef H5_HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef H5_STDC_HEADERS
-#   include <limits.h>		/*for H5T_NATIVE_CHAR defn in H5Tpublic.h    */
-#endif
-#ifndef __cplusplus
-# ifdef H5_HAVE_STDINT_H
-#   include <stdint.h>		/*for C9x types				     */
-# endif
-#else
-# ifdef H5_HAVE_STDINT_H_CXX
-#   include <stdint.h>		/*for C9x types	when include from C++	     */
-# endif
-#endif
-#ifdef H5_HAVE_INTTYPES_H
-#   include <inttypes.h>        /* For uint64_t on some platforms            */
-#endif
-#ifdef H5_HAVE_STDDEF_H
-#   include <stddef.h>
-#endif
-#ifdef H5_HAVE_PARALLEL
-#   include <mpi.h>
-#ifndef MPI_FILE_NULL		/*MPIO may be defined in mpi.h already       */
-#   include <mpio.h>
-#endif
-#endif
-
-
-/* Include the Windows API adapter header early */
-#include "H5api_adpt.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Version numbers */
-#define H5_VERS_MAJOR	1	/* For major interface/format changes  	     */
-#define H5_VERS_MINOR	8	/* For minor interface/format changes  	     */
-#define H5_VERS_RELEASE	6	/* For tweaks, bug-fixes, or development     */
-#define H5_VERS_SUBRELEASE ""	/* For pre-releases like snap0       */
-				/* Empty string for real releases.           */
-#define H5_VERS_INFO    "HDF5 library version: 1.8.6"      /* Full version string */
-
-#define H5check()	H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR,	      \
-				        H5_VERS_RELEASE)
-
-/*
- * Status return values.  Failed integer functions in HDF5 result almost
- * always in a negative value (unsigned failing functions sometimes return
- * zero for failure) while successfull return is non-negative (often zero).
- * The negative failure value is most commonly -1, but don't bet on it.  The
- * proper way to detect failure is something like:
- *
- * 	if((dset = H5Dopen2(file, name)) < 0)
- *	    fprintf(stderr, "unable to open the requested dataset\n");
- */
-typedef int herr_t;
-
-
-/*
- * Boolean type.  Successful return values are zero (false) or positive
- * (true). The typical true value is 1 but don't bet on it.  Boolean
- * functions cannot fail.  Functions that return `htri_t' however return zero
- * (false), positive (true), or negative (failure). The proper way to test
- * for truth from a htri_t function is:
- *
- * 	if ((retval = H5Tcommitted(type))>0) {
- *	    printf("data type is committed\n");
- *	} else if (!retval) {
- * 	    printf("data type is not committed\n");
- *	} else {
- * 	    printf("error determining whether data type is committed\n");
- *	}
- */
-typedef unsigned int hbool_t;
-typedef int htri_t;
-
-/* Define the ssize_t type if it not is defined */
-#if H5_SIZEOF_SSIZE_T==0
-/* Undefine this size, we will re-define it in one of the sections below */
-#undef H5_SIZEOF_SSIZE_T
-#if H5_SIZEOF_SIZE_T==H5_SIZEOF_INT
-typedef int ssize_t;
-#       define H5_SIZEOF_SSIZE_T H5_SIZEOF_INT
-#elif H5_SIZEOF_SIZE_T==H5_SIZEOF_LONG
-typedef long ssize_t;
-#       define H5_SIZEOF_SSIZE_T H5_SIZEOF_LONG
-#elif H5_SIZEOF_SIZE_T==H5_SIZEOF_LONG_LONG
-typedef long long ssize_t;
-#       define H5_SIZEOF_SSIZE_T H5_SIZEOF_LONG_LONG
-#else /* Can't find matching type for ssize_t */
-#   error "nothing appropriate for ssize_t"
-#endif
-#endif
-
-/*
- * The sizes of file objects have their own types defined here, use a 64-bit
- * type.
- */
-#if H5_SIZEOF_LONG_LONG >= 8
-typedef unsigned long long 	hsize_t;
-typedef signed long long	hssize_t;
-#       define H5_SIZEOF_HSIZE_T H5_SIZEOF_LONG_LONG
-#       define H5_SIZEOF_HSSIZE_T H5_SIZEOF_LONG_LONG
-#else
-#   error "nothing appropriate for hsize_t"
-#endif
-
-/*
- * File addresses have their own types.
- */
-#if H5_SIZEOF_INT64_T>=8
-    typedef uint64_t                haddr_t;
-#   define HADDR_UNDEF              ((haddr_t)(int64_t)(-1))
-#   define H5_SIZEOF_HADDR_T        H5_SIZEOF_INT64_T
-#   ifdef H5_HAVE_PARALLEL
-#       define HADDR_AS_MPI_TYPE    MPI_LONG_LONG_INT
-#   endif  /* H5_HAVE_PARALLEL */
-#elif H5_SIZEOF_INT>=8
-    typedef unsigned                haddr_t;
-#   define HADDR_UNDEF              ((haddr_t)(-1))
-#   define H5_SIZEOF_HADDR_T        H5_SIZEOF_INT
-#   ifdef H5_HAVE_PARALLEL
-#       define HADDR_AS_MPI_TYPE    MPI_UNSIGNED
-#   endif  /* H5_HAVE_PARALLEL */
-#elif H5_SIZEOF_LONG>=8
-    typedef unsigned long           haddr_t;
-#   define HADDR_UNDEF              ((haddr_t)(long)(-1))
-#   define H5_SIZEOF_HADDR_T        H5_SIZEOF_LONG
-#   ifdef H5_HAVE_PARALLEL
-#       define HADDR_AS_MPI_TYPE    MPI_UNSIGNED_LONG
-#   endif  /* H5_HAVE_PARALLEL */
-#elif H5_SIZEOF_LONG_LONG>=8
-    typedef unsigned long long      haddr_t;
-#   define HADDR_UNDEF              ((haddr_t)(long long)(-1))
-#   define H5_SIZEOF_HADDR_T        H5_SIZEOF_LONG_LONG
-#   ifdef H5_HAVE_PARALLEL
-#       define HADDR_AS_MPI_TYPE    MPI_LONG_LONG_INT
-#   endif  /* H5_HAVE_PARALLEL */
-#else
-#   error "nothing appropriate for haddr_t"
-#endif
-#if H5_SIZEOF_HADDR_T ==H5_SIZEOF_INT
-#   define H5_PRINTF_HADDR_FMT  "%u"
-#elif H5_SIZEOF_HADDR_T ==H5_SIZEOF_LONG
-#   define H5_PRINTF_HADDR_FMT  "%lu"
-#elif H5_SIZEOF_HADDR_T ==H5_SIZEOF_LONG_LONG
-#   define H5_PRINTF_HADDR_FMT  "%"H5_PRINTF_LL_WIDTH"u"
-#else
-#   error "nothing appropriate for H5_PRINTF_HADDR_FMT"
-#endif
-#define HADDR_MAX		(HADDR_UNDEF-1)
-
-/* uint32_t type is used for creation order field for messages.  It may be
- * defined in Posix.1g, otherwise it is defined here.
- */
-#if H5_SIZEOF_UINT32_T>=4
-#elif H5_SIZEOF_SHORT>=4
-    typedef short uint32_t;
-#   undef H5_SIZEOF_UINT32_T
-#   define H5_SIZEOF_UINT32_T H5_SIZEOF_SHORT
-#elif H5_SIZEOF_INT>=4
-    typedef unsigned int uint32_t;
-#   undef H5_SIZEOF_UINT32_T
-#   define H5_SIZEOF_UINT32_T H5_SIZEOF_INT
-#elif H5_SIZEOF_LONG>=4
-    typedef unsigned long uint32_t;
-#   undef H5_SIZEOF_UINT32_T
-#   define H5_SIZEOF_UINT32_T H5_SIZEOF_LONG
-#else
-#   error "nothing appropriate for uint32_t"
-#endif
-
-/* int64_t type is used for creation order field for links.  It may be
- * defined in Posix.1g, otherwise it is defined here.
- */
-#if H5_SIZEOF_INT64_T>=8
-#elif H5_SIZEOF_INT>=8
-    typedef int int64_t;
-#   undef H5_SIZEOF_INT64_T
-#   define H5_SIZEOF_INT64_T H5_SIZEOF_INT
-#elif H5_SIZEOF_LONG>=8
-    typedef long int64_t;
-#   undef H5_SIZEOF_INT64_T
-#   define H5_SIZEOF_INT64_T H5_SIZEOF_LONG
-#elif H5_SIZEOF_LONG_LONG>=8
-    typedef long long int64_t;
-#   undef H5_SIZEOF_INT64_T
-#   define H5_SIZEOF_INT64_T H5_SIZEOF_LONG_LONG
-#else
-#   error "nothing appropriate for int64_t"
-#endif
-
-/* uint64_t type is used for fields for H5O_info_t.  It may be
- * defined in Posix.1g, otherwise it is defined here.
- */
-#if H5_SIZEOF_UINT64_T>=8
-#elif H5_SIZEOF_INT>=8
-    typedef unsigned uint64_t;
-#   undef H5_SIZEOF_UINT64_T
-#   define H5_SIZEOF_UINT64_T H5_SIZEOF_INT
-#elif H5_SIZEOF_LONG>=8
-    typedef unsigned long uint64_t;
-#   undef H5_SIZEOF_UINT64_T
-#   define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG
-#elif H5_SIZEOF_LONG_LONG>=8
-    typedef unsigned long long uint64_t;
-#   undef H5_SIZEOF_UINT64_T
-#   define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG_LONG
-#else
-#   error "nothing appropriate for uint64_t"
-#endif
-
-/* Default value for all property list classes */
-#define H5P_DEFAULT     0
-
-/* Common iteration orders */
-typedef enum {
-    H5_ITER_UNKNOWN = -1,       /* Unknown order */
-    H5_ITER_INC,                /* Increasing order */
-    H5_ITER_DEC,                /* Decreasing order */
-    H5_ITER_NATIVE,             /* No particular order, whatever is fastest */
-    H5_ITER_N		        /* Number of iteration orders */
-} H5_iter_order_t;
-
-/* Iteration callback values */
-/* (Actually, any postive value will cause the iterator to stop and pass back
- *      that positive value to the function that called the iterator)
- */
-#define H5_ITER_ERROR   (-1)
-#define H5_ITER_CONT    (0)
-#define H5_ITER_STOP    (1)
-
-/*
- * The types of indices on links in groups/attributes on objects.
- * Primarily used for "<do> <foo> by index" routines and for iterating over
- * links in groups/attributes on objects.
- */
-typedef enum H5_index_t {
-    H5_INDEX_UNKNOWN = -1,	/* Unknown index type			*/
-    H5_INDEX_NAME,		/* Index on names 			*/
-    H5_INDEX_CRT_ORDER,		/* Index on creation order 		*/
-    H5_INDEX_N			/* Number of indices defined 		*/
-} H5_index_t;
-
-/*
- * Storage info struct used by H5O_info_t and H5F_info_t
- */
-typedef struct H5_ih_info_t {
-    hsize_t     index_size;     /* btree and/or list */
-    hsize_t     heap_size;
-} H5_ih_info_t;
-
-/* Functions in H5.c */
-H5_DLL herr_t H5open(void);
-H5_DLL herr_t H5close(void);
-H5_DLL herr_t H5dont_atexit(void);
-H5_DLL herr_t H5garbage_collect(void);
-H5_DLL herr_t H5set_free_list_limits (int reg_global_lim, int reg_list_lim,
-                int arr_global_lim, int arr_list_lim, int blk_global_lim,
-                int blk_list_lim);
-H5_DLL herr_t H5get_libversion(unsigned *majnum, unsigned *minnum,
-				unsigned *relnum);
-H5_DLL herr_t H5check_version(unsigned majnum, unsigned minnum,
-			       unsigned relnum);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-
diff --git a/interfaces/ext/hdf5/H5version.h b/interfaces/ext/hdf5/H5version.h
deleted file mode 100644
index 58de2ab..0000000
--- a/interfaces/ext/hdf5/H5version.h
+++ /dev/null
@@ -1,419 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* Generated automatically by bin/make_vers -- do not edit */
-/* Add new versioned symbols to H5vers.txt file */
-
-
-#ifndef _H5version_H
-#define _H5version_H
-
-/* Issue error if contradicting macros have been defined. */
-#if defined(H5_USE_16_API) && defined(H5_NO_DEPRECATED_SYMBOLS)
-#error "Can't choose old API versions when deprecated APIs are disabled"
-#endif /* defined(H5_USE_16_API) && defined(H5_NO_DEPRECATED_SYMBOLS) */
-
-
-/* If a particular "global" version of the library's interfaces is chosen,
- *      set the versions for the API symbols affected.
- *
- * Note: If an application has already chosen a particular version for an
- *      API symbol, the individual API version macro takes priority.
- */
-#if defined(H5_USE_16_API_DEFAULT) && !defined(H5_USE_16_API)
-#define H5_USE_16_API 1
-#endif /* H5_USE_16_API_DEFAULT && !H5_USE_16_API */
-
-#ifdef H5_USE_16_API
-
-/*************/
-/* Functions */
-/*************/
-
-#if !defined(H5Acreate_vers)
-#define H5Acreate_vers 1
-#endif /* !defined(H5Acreate_vers) */
-
-#if !defined(H5Aiterate_vers)
-#define H5Aiterate_vers 1
-#endif /* !defined(H5Aiterate_vers) */
-
-#if !defined(H5Dcreate_vers)
-#define H5Dcreate_vers 1
-#endif /* !defined(H5Dcreate_vers) */
-
-#if !defined(H5Dopen_vers)
-#define H5Dopen_vers 1
-#endif /* !defined(H5Dopen_vers) */
-
-#if !defined(H5Eclear_vers)
-#define H5Eclear_vers 1
-#endif /* !defined(H5Eclear_vers) */
-
-#if !defined(H5Eget_auto_vers)
-#define H5Eget_auto_vers 1
-#endif /* !defined(H5Eget_auto_vers) */
-
-#if !defined(H5Eprint_vers)
-#define H5Eprint_vers 1
-#endif /* !defined(H5Eprint_vers) */
-
-#if !defined(H5Epush_vers)
-#define H5Epush_vers 1
-#endif /* !defined(H5Epush_vers) */
-
-#if !defined(H5Eset_auto_vers)
-#define H5Eset_auto_vers 1
-#endif /* !defined(H5Eset_auto_vers) */
-
-#if !defined(H5Ewalk_vers)
-#define H5Ewalk_vers 1
-#endif /* !defined(H5Ewalk_vers) */
-
-#if !defined(H5Gcreate_vers)
-#define H5Gcreate_vers 1
-#endif /* !defined(H5Gcreate_vers) */
-
-#if !defined(H5Gopen_vers)
-#define H5Gopen_vers 1
-#endif /* !defined(H5Gopen_vers) */
-
-#if !defined(H5Pget_filter_vers)
-#define H5Pget_filter_vers 1
-#endif /* !defined(H5Pget_filter_vers) */
-
-#if !defined(H5Pget_filter_by_id_vers)
-#define H5Pget_filter_by_id_vers 1
-#endif /* !defined(H5Pget_filter_by_id_vers) */
-
-#if !defined(H5Pinsert_vers)
-#define H5Pinsert_vers 1
-#endif /* !defined(H5Pinsert_vers) */
-
-#if !defined(H5Pregister_vers)
-#define H5Pregister_vers 1
-#endif /* !defined(H5Pregister_vers) */
-
-#if !defined(H5Rget_obj_type_vers)
-#define H5Rget_obj_type_vers 1
-#endif /* !defined(H5Rget_obj_type_vers) */
-
-#if !defined(H5Tarray_create_vers)
-#define H5Tarray_create_vers 1
-#endif /* !defined(H5Tarray_create_vers) */
-
-#if !defined(H5Tcommit_vers)
-#define H5Tcommit_vers 1
-#endif /* !defined(H5Tcommit_vers) */
-
-#if !defined(H5Tget_array_dims_vers)
-#define H5Tget_array_dims_vers 1
-#endif /* !defined(H5Tget_array_dims_vers) */
-
-#if !defined(H5Topen_vers)
-#define H5Topen_vers 1
-#endif /* !defined(H5Topen_vers) */
-
-/************/
-/* Typedefs */
-/************/
-
-#if !defined(H5E_auto_t_vers)
-#define H5E_auto_t_vers 1
-#endif /* !defined(H5E_auto_t_vers) */
-
-#if !defined(H5Z_class_t_vers)
-#define H5Z_class_t_vers 1
-#endif /* !defined(H5Z_class_t_vers) */
-
-#endif /* H5_USE_16_API */
-
-
-/* Choose the correct version of each API symbol, defaulting to the latest
- *      version of each.  The "best" name for API parameters/data structures
- *      that have changed definitions is also set.  An error is issued for
- *      specifying an invalid API version.
- */
-
-/*************/
-/* Functions */
-/*************/
-
-#if !defined(H5Acreate_vers) || H5Acreate_vers == 2
-#ifndef H5Acreate_vers
-#define H5Acreate_vers 2
-#endif /* H5Acreate_vers */
-#define H5Acreate H5Acreate2
-#elif H5Acreate_vers == 1
-#define H5Acreate H5Acreate1
-#else /* H5Acreate_vers */
-#error "H5Acreate_vers set to invalid value"
-#endif /* H5Acreate_vers */
-
-#if !defined(H5Aiterate_vers) || H5Aiterate_vers == 2
-#ifndef H5Aiterate_vers
-#define H5Aiterate_vers 2
-#endif /* H5Aiterate_vers */
-#define H5Aiterate H5Aiterate2
-#define H5A_operator_t H5A_operator2_t
-#elif H5Aiterate_vers == 1
-#define H5Aiterate H5Aiterate1
-#define H5A_operator_t H5A_operator1_t
-#else /* H5Aiterate_vers */
-#error "H5Aiterate_vers set to invalid value"
-#endif /* H5Aiterate_vers */
-
-#if !defined(H5Dcreate_vers) || H5Dcreate_vers == 2
-#ifndef H5Dcreate_vers
-#define H5Dcreate_vers 2
-#endif /* H5Dcreate_vers */
-#define H5Dcreate H5Dcreate2
-#elif H5Dcreate_vers == 1
-#define H5Dcreate H5Dcreate1
-#else /* H5Dcreate_vers */
-#error "H5Dcreate_vers set to invalid value"
-#endif /* H5Dcreate_vers */
-
-#if !defined(H5Dopen_vers) || H5Dopen_vers == 2
-#ifndef H5Dopen_vers
-#define H5Dopen_vers 2
-#endif /* H5Dopen_vers */
-#define H5Dopen H5Dopen2
-#elif H5Dopen_vers == 1
-#define H5Dopen H5Dopen1
-#else /* H5Dopen_vers */
-#error "H5Dopen_vers set to invalid value"
-#endif /* H5Dopen_vers */
-
-#if !defined(H5Eclear_vers) || H5Eclear_vers == 2
-#ifndef H5Eclear_vers
-#define H5Eclear_vers 2
-#endif /* H5Eclear_vers */
-#define H5Eclear H5Eclear2
-#elif H5Eclear_vers == 1
-#define H5Eclear H5Eclear1
-#else /* H5Eclear_vers */
-#error "H5Eclear_vers set to invalid value"
-#endif /* H5Eclear_vers */
-
-#if !defined(H5Eget_auto_vers) || H5Eget_auto_vers == 2
-#ifndef H5Eget_auto_vers
-#define H5Eget_auto_vers 2
-#endif /* H5Eget_auto_vers */
-#define H5Eget_auto H5Eget_auto2
-#elif H5Eget_auto_vers == 1
-#define H5Eget_auto H5Eget_auto1
-#else /* H5Eget_auto_vers */
-#error "H5Eget_auto_vers set to invalid value"
-#endif /* H5Eget_auto_vers */
-
-#if !defined(H5Eprint_vers) || H5Eprint_vers == 2
-#ifndef H5Eprint_vers
-#define H5Eprint_vers 2
-#endif /* H5Eprint_vers */
-#define H5Eprint H5Eprint2
-#elif H5Eprint_vers == 1
-#define H5Eprint H5Eprint1
-#else /* H5Eprint_vers */
-#error "H5Eprint_vers set to invalid value"
-#endif /* H5Eprint_vers */
-
-#if !defined(H5Epush_vers) || H5Epush_vers == 2
-#ifndef H5Epush_vers
-#define H5Epush_vers 2
-#endif /* H5Epush_vers */
-#define H5Epush H5Epush2
-#elif H5Epush_vers == 1
-#define H5Epush H5Epush1
-#else /* H5Epush_vers */
-#error "H5Epush_vers set to invalid value"
-#endif /* H5Epush_vers */
-
-#if !defined(H5Eset_auto_vers) || H5Eset_auto_vers == 2
-#ifndef H5Eset_auto_vers
-#define H5Eset_auto_vers 2
-#endif /* H5Eset_auto_vers */
-#define H5Eset_auto H5Eset_auto2
-#elif H5Eset_auto_vers == 1
-#define H5Eset_auto H5Eset_auto1
-#else /* H5Eset_auto_vers */
-#error "H5Eset_auto_vers set to invalid value"
-#endif /* H5Eset_auto_vers */
-
-#if !defined(H5Ewalk_vers) || H5Ewalk_vers == 2
-#ifndef H5Ewalk_vers
-#define H5Ewalk_vers 2
-#endif /* H5Ewalk_vers */
-#define H5Ewalk H5Ewalk2
-#define H5E_error_t H5E_error2_t
-#define H5E_walk_t H5E_walk2_t
-#elif H5Ewalk_vers == 1
-#define H5Ewalk H5Ewalk1
-#define H5E_error_t H5E_error1_t
-#define H5E_walk_t H5E_walk1_t
-#else /* H5Ewalk_vers */
-#error "H5Ewalk_vers set to invalid value"
-#endif /* H5Ewalk_vers */
-
-#if !defined(H5Gcreate_vers) || H5Gcreate_vers == 2
-#ifndef H5Gcreate_vers
-#define H5Gcreate_vers 2
-#endif /* H5Gcreate_vers */
-#define H5Gcreate H5Gcreate2
-#elif H5Gcreate_vers == 1
-#define H5Gcreate H5Gcreate1
-#else /* H5Gcreate_vers */
-#error "H5Gcreate_vers set to invalid value"
-#endif /* H5Gcreate_vers */
-
-#if !defined(H5Gopen_vers) || H5Gopen_vers == 2
-#ifndef H5Gopen_vers
-#define H5Gopen_vers 2
-#endif /* H5Gopen_vers */
-#define H5Gopen H5Gopen2
-#elif H5Gopen_vers == 1
-#define H5Gopen H5Gopen1
-#else /* H5Gopen_vers */
-#error "H5Gopen_vers set to invalid value"
-#endif /* H5Gopen_vers */
-
-#if !defined(H5Pget_filter_vers) || H5Pget_filter_vers == 2
-#ifndef H5Pget_filter_vers
-#define H5Pget_filter_vers 2
-#endif /* H5Pget_filter_vers */
-#define H5Pget_filter H5Pget_filter2
-#elif H5Pget_filter_vers == 1
-#define H5Pget_filter H5Pget_filter1
-#else /* H5Pget_filter_vers */
-#error "H5Pget_filter_vers set to invalid value"
-#endif /* H5Pget_filter_vers */
-
-#if !defined(H5Pget_filter_by_id_vers) || H5Pget_filter_by_id_vers == 2
-#ifndef H5Pget_filter_by_id_vers
-#define H5Pget_filter_by_id_vers 2
-#endif /* H5Pget_filter_by_id_vers */
-#define H5Pget_filter_by_id H5Pget_filter_by_id2
-#elif H5Pget_filter_by_id_vers == 1
-#define H5Pget_filter_by_id H5Pget_filter_by_id1
-#else /* H5Pget_filter_by_id_vers */
-#error "H5Pget_filter_by_id_vers set to invalid value"
-#endif /* H5Pget_filter_by_id_vers */
-
-#if !defined(H5Pinsert_vers) || H5Pinsert_vers == 2
-#ifndef H5Pinsert_vers
-#define H5Pinsert_vers 2
-#endif /* H5Pinsert_vers */
-#define H5Pinsert H5Pinsert2
-#elif H5Pinsert_vers == 1
-#define H5Pinsert H5Pinsert1
-#else /* H5Pinsert_vers */
-#error "H5Pinsert_vers set to invalid value"
-#endif /* H5Pinsert_vers */
-
-#if !defined(H5Pregister_vers) || H5Pregister_vers == 2
-#ifndef H5Pregister_vers
-#define H5Pregister_vers 2
-#endif /* H5Pregister_vers */
-#define H5Pregister H5Pregister2
-#elif H5Pregister_vers == 1
-#define H5Pregister H5Pregister1
-#else /* H5Pregister_vers */
-#error "H5Pregister_vers set to invalid value"
-#endif /* H5Pregister_vers */
-
-#if !defined(H5Rget_obj_type_vers) || H5Rget_obj_type_vers == 2
-#ifndef H5Rget_obj_type_vers
-#define H5Rget_obj_type_vers 2
-#endif /* H5Rget_obj_type_vers */
-#define H5Rget_obj_type H5Rget_obj_type2
-#elif H5Rget_obj_type_vers == 1
-#define H5Rget_obj_type H5Rget_obj_type1
-#else /* H5Rget_obj_type_vers */
-#error "H5Rget_obj_type_vers set to invalid value"
-#endif /* H5Rget_obj_type_vers */
-
-#if !defined(H5Tarray_create_vers) || H5Tarray_create_vers == 2
-#ifndef H5Tarray_create_vers
-#define H5Tarray_create_vers 2
-#endif /* H5Tarray_create_vers */
-#define H5Tarray_create H5Tarray_create2
-#elif H5Tarray_create_vers == 1
-#define H5Tarray_create H5Tarray_create1
-#else /* H5Tarray_create_vers */
-#error "H5Tarray_create_vers set to invalid value"
-#endif /* H5Tarray_create_vers */
-
-#if !defined(H5Tcommit_vers) || H5Tcommit_vers == 2
-#ifndef H5Tcommit_vers
-#define H5Tcommit_vers 2
-#endif /* H5Tcommit_vers */
-#define H5Tcommit H5Tcommit2
-#elif H5Tcommit_vers == 1
-#define H5Tcommit H5Tcommit1
-#else /* H5Tcommit_vers */
-#error "H5Tcommit_vers set to invalid value"
-#endif /* H5Tcommit_vers */
-
-#if !defined(H5Tget_array_dims_vers) || H5Tget_array_dims_vers == 2
-#ifndef H5Tget_array_dims_vers
-#define H5Tget_array_dims_vers 2
-#endif /* H5Tget_array_dims_vers */
-#define H5Tget_array_dims H5Tget_array_dims2
-#elif H5Tget_array_dims_vers == 1
-#define H5Tget_array_dims H5Tget_array_dims1
-#else /* H5Tget_array_dims_vers */
-#error "H5Tget_array_dims_vers set to invalid value"
-#endif /* H5Tget_array_dims_vers */
-
-#if !defined(H5Topen_vers) || H5Topen_vers == 2
-#ifndef H5Topen_vers
-#define H5Topen_vers 2
-#endif /* H5Topen_vers */
-#define H5Topen H5Topen2
-#elif H5Topen_vers == 1
-#define H5Topen H5Topen1
-#else /* H5Topen_vers */
-#error "H5Topen_vers set to invalid value"
-#endif /* H5Topen_vers */
-
-/************/
-/* Typedefs */
-/************/
-
-#if !defined(H5E_auto_t_vers) || H5E_auto_t_vers == 2
-#ifndef H5E_auto_t_vers
-#define H5E_auto_t_vers 2
-#endif /* H5E_auto_t_vers */
-#define H5E_auto_t H5E_auto2_t
-#elif H5E_auto_t_vers == 1
-#define H5E_auto_t H5E_auto1_t
-#else /* H5E_auto_t_vers */
-#error "H5E_auto_t_vers set to invalid value"
-#endif /* H5E_auto_t_vers */
-
-
-#if !defined(H5Z_class_t_vers) || H5Z_class_t_vers == 2
-#ifndef H5Z_class_t_vers
-#define H5Z_class_t_vers 2
-#endif /* H5Z_class_t_vers */
-#define H5Z_class_t H5Z_class2_t
-#elif H5Z_class_t_vers == 1
-#define H5Z_class_t H5Z_class1_t
-#else /* H5Z_class_t_vers */
-#error "H5Z_class_t_vers set to invalid value"
-#endif /* H5Z_class_t_vers */
-
-#endif /* H5version_H */
-
diff --git a/interfaces/ext/hdf5/h5_dble_interface.mod b/interfaces/ext/hdf5/h5_dble_interface.mod
deleted file mode 100644
index 19c988c..0000000
--- a/interfaces/ext/hdf5/h5_dble_interface.mod
+++ /dev/null
@@ -1,2194 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5_DBLE_InterfaceInclude.f90 on Mon Feb 14 14:35:53 2011
-If you edit this, you'll get what you deserve.
-
-
-(() () () () () () () () () () () () () () () () () () () () ())
-
-()
-
-(('h5aread_f' '' 2 3 4 5 6 7 8 9) ('h5awrite_f' '' 10 11 12 13 14 15 16
-17) ('h5dfill_f' '' 18) ('h5dread_f' '' 19 20 21 22 23 24 25 26) (
-'h5dwrite_f' '' 27 28 29 30 31 32 33 34) ('h5pregister_f' '' 35) (
-'h5pget_f' '' 36) ('h5pget_fill_value_f' '' 37) ('h5pinsert_f' '' 38) (
-'h5pset_fill_value_f' '' 39) ('h5pset_f' '' 40))
-
-(('h5l_flags' 41 0) ('h5t_flags' 42 0) ('h5p_flags_int' 43 0) (
-'predefined_types' 44 0) ('h5i_flags' 45 0) ('integer_types' 46 0) (
-'h5r_flags' 47 0) ('h5z_flags' 48 0) ('h5s_flags' 49 0) ('h5d_flags' 50
-0) ('h5fd_hid_flags' 51 0) ('h5fd_flags' 52 0) ('h5g_flags' 53 0) (
-'h5generic_flags' 54 0) ('h5o_flags' 55 0) ('h5lib_flags' 56 0) (
-'h5p_flags' 57 0) ('h5f_flags' 58 0) ('floating_types' 59 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 56 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 60 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 56 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 61 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 48 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 62 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 48 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 63 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 48 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 64 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 48 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 65 ())) ('h5global.eq.6' (VARIABLE (INTEGER 4
-()) 0 48 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 66 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 48 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 67 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 48 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 68 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 48 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 69 ())) ('h5global.eq.10' (VARIABLE (INTEGER 4
-()) 0 48 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 70 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 48 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 71 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 48 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 72 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 48
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.13'
-(VARIABLE (INTEGER 4 ()) 0 73 ())) ('h5global.eq.14' (VARIABLE (INTEGER
-4 ()) 0 48 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 74 ())) ('h5global.eq.15' (
-VARIABLE (INTEGER 4 ()) 0 48 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 75 ())) (
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '34') 1)))) 'h5global.eq.16' (VARIABLE (
-INTEGER 4 ()) 0 76 ())) ('h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 42
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '33') 1)))) 'h5global.eq.17'
-(VARIABLE (INTEGER 4 ()) 0 77 ())) ('h5global.eq.18' (VARIABLE (INTEGER
-4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '32') 1))))
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 78 ())) ('h5global.eq.19' (
-VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '31') 1)))) 'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 79 ())) (
-'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '30') 1)))) 'h5global.eq.20' (VARIABLE (
-INTEGER 4 ()) 0 80 ())) ('h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 42
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21'
-(VARIABLE (INTEGER 4 ()) 0 81 ())) ('h5global.eq.22' (VARIABLE (INTEGER
-4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 82 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 83 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 84 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 42
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1)))) 'h5global.eq.25'
-(VARIABLE (INTEGER 4 ()) 0 85 ())) ('h5global.eq.26' (VARIABLE (INTEGER
-4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '24') 1))))
-'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 86 ())) ('h5global.eq.27' (
-VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '23') 1)))) 'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 87 ())) (
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.28' (VARIABLE (
-INTEGER 4 ()) 0 88 ())) ('h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 42
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.29'
-(VARIABLE (INTEGER 4 ()) 0 89 ())) ('h5global.eq.30' (VARIABLE (INTEGER
-4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 90 ())) ('h5global.eq.31' (
-VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 91 ())) (
-'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.32' (VARIABLE (
-INTEGER 4 ()) 0 92 ())) ('h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 42
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33'
-(VARIABLE (INTEGER 4 ()) 0 93 ())) ('h5global.eq.34' (VARIABLE (INTEGER
-4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 94 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 95 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 96 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 42
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.37'
-(VARIABLE (INTEGER 4 ()) 0 97 ())) ('h5global.eq.38' (VARIABLE (INTEGER
-4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 98 ())) ('h5global.eq.39' (
-VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 99 ())) (
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.40' (VARIABLE (
-INTEGER 4 ()) 0 100 ())) ('h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 42
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.41'
-(VARIABLE (INTEGER 4 ()) 0 101 ())) ('h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 102 ())) ('h5global.eq.43' (
-VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 103 ())) (
-'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.44' (VARIABLE (
-INTEGER 4 ()) 0 104 ())) ('h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 42
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45'
-(VARIABLE (INTEGER 4 ()) 0 105 ())) ('h5global.eq.46' (VARIABLE (
-INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 106 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 107 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 42 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 108 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 42
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.49'
-(VARIABLE (INTEGER 4 ()) 0 109 ())) ('h5global.eq.50' (VARIABLE (
-INTEGER 4 ()) 0 49 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 110 ())) ('h5global.eq.51' (
-VARIABLE (INTEGER 4 ()) 0 49 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 111 ())) (
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 49 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.52' (VARIABLE (
-INTEGER 4 ()) 0 112 ())) ('h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 49
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.53'
-(VARIABLE (INTEGER 4 ()) 0 113 ())) ('h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 49 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 114 ())) ('h5global.eq.55' (
-VARIABLE (INTEGER 4 ()) 0 49 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 115 ())) (
-'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 49 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.56' (VARIABLE (
-INTEGER 4 ()) 0 116 ())) ('h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 49
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57'
-(VARIABLE (INTEGER 4 ()) 0 117 ())) ('h5global.eq.58' (VARIABLE (
-INTEGER 4 ()) 0 49 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 118 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 49 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 119 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 49 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 120 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 49
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.61'
-(VARIABLE (INTEGER 4 ()) 0 121 ())) ('h5global.eq.62' (VARIABLE (
-INTEGER 4 ()) 0 49 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 122 ())) ('h5global.eq.63' (
-VARIABLE (INTEGER 4 ()) 0 49 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 123 ())) (
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 49 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.64' (VARIABLE (
-INTEGER 4 ()) 0 124 ())) ('h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 49
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.65'
-(VARIABLE (INTEGER 4 ()) 0 125 ())) ('h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 49 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 126 ())) ('h5global.eq.67' (
-VARIABLE (INTEGER 4 ()) 0 49 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 127 ())) (
-'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 49 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.68' (VARIABLE (
-INTEGER 4 ()) 0 128 ())) ('h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 49
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69'
-(VARIABLE (INTEGER 4 ()) 0 129 ())) ('h5global.eq.70' (VARIABLE (
-INTEGER 4 ()) 0 47 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 130 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 47 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 131 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 43 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 132 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 43
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.73'
-(VARIABLE (INTEGER 4 ()) 0 133 ())) ('h5global.eq.74' (VARIABLE (
-INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 134 ())) ('h5global.eq.75' (
-VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 135 ())) (
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.76' (VARIABLE (
-INTEGER 4 ()) 0 136 ())) ('h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 57
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.77'
-(VARIABLE (INTEGER 4 ()) 0 137 ())) ('h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 138 ())) ('h5global.eq.79' (
-VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 139 ())) (
-'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.80' (VARIABLE (
-INTEGER 4 ()) 0 140 ())) ('h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 57
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81'
-(VARIABLE (INTEGER 4 ()) 0 141 ())) ('h5global.eq.82' (VARIABLE (
-INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 142 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 143 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 144 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 57
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.85'
-(VARIABLE (INTEGER 4 ()) 0 145 ())) ('h5global.eq.86' (VARIABLE (
-INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 146 ())) ('h5global.eq.87' (
-VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 147 ())) (
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.88' (VARIABLE (
-INTEGER 4 ()) 0 148 ())) ('h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 57
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.89'
-(VARIABLE (INTEGER 4 ()) 0 149 ())) ('h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 150 ())) ('h5global.eq.91' (
-VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 151 ())) (
-'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.92' (VARIABLE (
-INTEGER 4 ()) 0 152 ())) ('h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 55
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93'
-(VARIABLE (INTEGER 4 ()) 0 153 ())) ('h5global.eq.94' (VARIABLE (
-INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 154 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 155 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 156 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 55
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.97'
-(VARIABLE (INTEGER 4 ()) 0 157 ())) ('h5global.eq.98' (VARIABLE (
-INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 158 ())) ('h5global.eq.99' (
-VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 159 ())) (
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.100' (VARIABLE (
-INTEGER 4 ()) 0 160 ())) ('h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0
-55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 161 ())) ('h5global.eq.102'
-(VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 162 ())) (
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.103' (VARIABLE (
-INTEGER 4 ()) 0 163 ())) ('h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0
-55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 164 ())) ('h5global.eq.105'
-(VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 165 ())) (
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.106' (VARIABLE (
-INTEGER 4 ()) 0 166 ())) ('h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0
-55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 167 ())) ('h5global.eq.108'
-(VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 168 ())) (
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.109' (VARIABLE (
-INTEGER 4 ()) 0 169 ())) ('h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0
-55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 170 ())) ('h5global.eq.111'
-(VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 171 ())) (
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.112' (VARIABLE (
-INTEGER 4 ()) 0 172 ())) ('h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0
-55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 173 ())) ('h5global.eq.114'
-(VARIABLE (INTEGER 4 ()) 0 41 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 174 ())) (
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 41 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.115' (VARIABLE (
-INTEGER 4 ()) 0 175 ())) ('h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0
-41 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 176 ())) ('h5global.eq.117'
-(VARIABLE (INTEGER 4 ()) 0 41 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 177 ())) (
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 41 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.118' (VARIABLE (
-INTEGER 4 ()) 0 178 ())) ('h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0
-41 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 179 ())) ('h5global.eq.120'
-(VARIABLE (INTEGER 4 ()) 0 45 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 180 ())) (
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 45 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.121' (VARIABLE (
-INTEGER 4 ()) 0 181 ())) ('h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0
-45 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 182 ())) ('h5global.eq.123'
-(VARIABLE (INTEGER 4 ()) 0 45 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 183 ())) (
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 45 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.124' (VARIABLE (
-INTEGER 4 ()) 0 184 ())) ('h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0
-45 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 185 ())) ('h5global.eq.126'
-(VARIABLE (INTEGER 4 ()) 0 45 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 186 ())) (
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.127' (VARIABLE (
-INTEGER 4 ()) 0 187 ())) ('h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0
-51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 188 ())) ('h5global.eq.129'
-(VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 189 ())) (
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.130' (VARIABLE (
-INTEGER 4 ()) 0 190 ())) ('h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0
-51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 191 ())) ('h5global.eq.132'
-(VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 192 ())) (
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.133' (VARIABLE (
-INTEGER 4 ()) 0 193 ())) ('h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0
-52 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 194 ())) ('h5global.eq.135'
-(VARIABLE (INTEGER 4 ()) 0 52 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 195 ())) (
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 52 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.136' (VARIABLE (
-INTEGER 4 ()) 0 196 ())) ('h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0
-52 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 197 ())) ('h5global.eq.138'
-(VARIABLE (INTEGER 4 ()) 0 52 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 198 ())) (
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 52 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.139' (VARIABLE (
-INTEGER 4 ()) 0 199 ())) ('h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0
-52 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.141'
-(VARIABLE (INTEGER 4 ()) 0 52 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 52 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.142' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0
-52 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.144'
-(VARIABLE (INTEGER 4 ()) 0 52 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 204 ())) (
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.145' (VARIABLE (
-INTEGER 4 ()) 0 205 ())) ('h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0
-50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1))))
-'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 206 ())) ('h5global.eq.147'
-(VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 207 ())) (
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.148' (VARIABLE (
-INTEGER 4 ()) 0 208 ())) ('h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0
-50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 209 ())) ('h5global.eq.150'
-(VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ())) (
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.151' (VARIABLE (
-INTEGER 4 ()) 0 211 ())) ('h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0
-50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 212 ())) ('h5global.eq.153'
-(VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 213 ())) (
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.154' (VARIABLE (
-INTEGER 4 ()) 0 214 ())) ('h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0
-50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 215 ())) ('h5global.eq.156'
-(VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 216 ())) (
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.157' (VARIABLE (
-INTEGER 4 ()) 0 217 ())) ('h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0
-50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 218 ())) ('h5global.eq.159'
-(VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 219 ())) (
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.160' (VARIABLE (
-INTEGER 4 ()) 0 220 ())) ('h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0
-50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 221 ())) ('h5global.eq.162'
-(VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 222 ())) (
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.163' (VARIABLE (
-INTEGER 4 ()) 0 223 ())) ('h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0
-50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.165'
-(VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.166' (VARIABLE (
-INTEGER 4 ()) 0 226 ())) ('h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0
-53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.168'
-(VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 228 ())) (
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.169' (VARIABLE (
-INTEGER 4 ()) 0 229 ())) ('h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0
-53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 230 ())) ('h5global.eq.171'
-(VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 231 ())) (
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.172' (VARIABLE (
-INTEGER 4 ()) 0 232 ())) ('h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0
-53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 233 ())) ('h5global.eq.174'
-(VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 234 ())) (
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.175' (VARIABLE (
-INTEGER 4 ()) 0 235 ())) ('h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0
-53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.177'
-(VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.178' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0
-54 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.180'
-(VARIABLE (INTEGER 4 ()) 0 54 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 240 ())) (
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 54 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.181' (VARIABLE (
-INTEGER 4 ()) 0 241 ())) ('h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0
-54 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 242 ())) ('h5global.eq.183'
-(VARIABLE (INTEGER 4 ()) 0 54 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 243 ())) (
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 54 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.184' (VARIABLE (
-INTEGER 4 ()) 0 244 ())) ('h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0
-54 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 245 ())) ('h5global.eq.186'
-(VARIABLE (INTEGER 4 ()) 0 54 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 246 ())) (
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 54 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.187' (VARIABLE (
-INTEGER 4 ()) 0 247 ())) ('h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0
-58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 248 ())) ('h5global.eq.189'
-(VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 249 ())) (
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.190' (VARIABLE (
-INTEGER 4 ()) 0 250 ())) ('h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0
-58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 251 ())) ('h5global.eq.192'
-(VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 252 ())) (
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.193' (VARIABLE (
-INTEGER 4 ()) 0 253 ())) ('h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0
-58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 254 ())) ('h5global.eq.195'
-(VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 255 ())) (
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.196' (VARIABLE (
-INTEGER 4 ()) 0 256 ())) ('h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0
-58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 257 ())) ('h5global.eq.198'
-(VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 258 ())) (
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.199' (VARIABLE (
-INTEGER 4 ()) 0 259 ())) ('h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0
-58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 260 ())) ('h5global.eq.201'
-(VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 261 ())) (
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.202' (VARIABLE (
-INTEGER 4 ()) 0 262 ())) ('h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0
-58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 263 ())) ('h5global.eq.204'
-(VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 264 ())) (
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.205' (VARIABLE (
-INTEGER 4 ()) 0 265 ())) ('h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0
-46 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 266 ())) ('h5global.eq.207'
-(VARIABLE (INTEGER 4 ()) 0 46 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 267 ())) (
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 46 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.208' (VARIABLE (
-INTEGER 4 ()) 0 268 ())) ('h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0
-46 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 269 ())) ('h5global.eq.210'
-(VARIABLE (INTEGER 4 ()) 0 46 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 270 ())) (
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 46 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.211' (VARIABLE (
-INTEGER 4 ()) 0 271 ())) ('h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0
-46 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 272 ())) ('h5global.eq.213'
-(VARIABLE (INTEGER 4 ()) 0 46 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 273 ())) (
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 46 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.214' (VARIABLE (
-INTEGER 4 ()) 0 274 ())) ('h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0
-46 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 275 ())) ('h5global.eq.216'
-(VARIABLE (INTEGER 4 ()) 0 46 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 276 ())) (
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 46 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.217' (VARIABLE (
-INTEGER 4 ()) 0 277 ())) ('h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0
-46 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 278 ())) ('h5global.eq.219'
-(VARIABLE (INTEGER 4 ()) 0 46 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 279 ())) (
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 46 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.220' (VARIABLE (
-INTEGER 4 ()) 0 280 ())) ('h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0
-46 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 281 ())) ('h5global.eq.222'
-(VARIABLE (INTEGER 4 ()) 0 46 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 282 ())) (
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.223' (VARIABLE (
-INTEGER 4 ()) 0 283 ())) ('h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0
-59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 284 ())) ('h5global.eq.225'
-(VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 285 ())) (
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.226' (VARIABLE (
-INTEGER 4 ()) 0 286 ())) ('h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0
-44 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 287 ())) ('h5global.eq.228'
-(VARIABLE (INTEGER 4 ()) 0 44 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 288 ())) (
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 44 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.229' (VARIABLE (
-INTEGER 4 ()) 0 289 ())) ('h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0
-44 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 290 ())) ('h5global.eq.231'
-(VARIABLE (INTEGER 4 ()) 0 44 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 291 ())) (
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 44 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.232' (VARIABLE (
-INTEGER 4 ()) 0 292 ())) ('h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0
-44 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 293 ())) ('h5global.eq.234'
-(VARIABLE (INTEGER 4 ()) 0 44 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 294 ())) (
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 44 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.235' (VARIABLE (
-INTEGER 4 ()) 0 295 ())) ('h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0
-44 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 296 ())) ('h5global.eq.237'
-(VARIABLE (INTEGER 4 ()) 0 44 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 297 ())) (
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 44 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.238' (VARIABLE (
-INTEGER 4 ()) 0 298 ())) ('h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0
-44 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 299 ())))
-
-(59 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-300 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-301 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-302 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-303 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-304 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-305 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-306 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-307 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-308 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-309 'h5_dble_interface' 'h5_dble_interface' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-310 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-246 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-242 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-311 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-312 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-313 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-314 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-60 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-61 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-7 'h5aread_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 315 0 (316 317 318 319 320)
-() 0 () ())
-6 'h5aread_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 321 0 (322 323 324 325 326)
-() 0 () ())
-8 'h5aread_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 327 0 (328 329 330 331 332)
-() 0 () ())
-5 'h5aread_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 333 0 (334 335 336 337 338)
-() 0 () ())
-243 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-339 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-3 'h5aread_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 340 0 (341 342 343 344 345)
-() 0 () ())
-9 'h5aread_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 346 0 (347
-348 349 350 351) () 0 () ())
-2 'h5aread_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 352 0 (353 354 355 356 357)
-() 0 () ())
-4 'h5aread_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 358 0 (359 360 361 362 363)
-() 0 () ())
-15 'h5awrite_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 364 0 (365 366 367 368 369)
-() 0 () ())
-13 'h5awrite_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 370 0 (371 372 373 374 375)
-() 0 () ())
-10 'h5awrite_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 376 0 (377 378 379 380 381)
-() 0 () ())
-17 'h5awrite_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 382 0 (383
-384 385 386 387) () 0 () ())
-11 'h5awrite_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 388 0 (389 390 391 392 393)
-() 0 () ())
-12 'h5awrite_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 394 0 (395 396 397 398 399)
-() 0 () ())
-14 'h5awrite_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 400 0 (401 402 403 404 405)
-() 0 () ())
-16 'h5awrite_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 406 0 (407 408 409 410 411)
-() 0 () ())
-222 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-223 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-206 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-205 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-207 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-224 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-220 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-213 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-210 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-211 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-50 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-215 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-412 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-218 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-216 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-18 'h5dfill_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 413 0 (414 415 416 417) () 0
-() ())
-217 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-208 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-22 'h5dread_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 418 0 (419
-420 421 422 423 424 425 426) () 0 () ())
-23 'h5dread_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 427 0 (428
-429 430 431 432 433 434 435) () 0 () ())
-24 'h5dread_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 436 0 (437
-438 439 440 441 442 443 444) () 0 () ())
-25 'h5dread_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 445 0 (446
-447 448 449 450 451 452 453) () 0 () ())
-20 'h5dread_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 454 0 (455
-456 457 458 459 460 461 462) () 0 () ())
-26 'h5dread_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ())
-463 0 (464 465 466 467 468 469 470 471) () 0 () ())
-32 'h5dwrite_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 472 0 (473
-474 475 476 477 478 479 480) () 0 () ())
-30 'h5dwrite_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 481 0 (482
-483 484 485 486 487 488 489) () 0 () ())
-31 'h5dwrite_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 490 0 (491
-492 493 494 495 496 497 498) () 0 () ())
-33 'h5dwrite_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 499 0 (500
-501 502 503 504 505 506 507) () 0 () ())
-19 'h5dread_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 508 0 (509
-510 511 512 513 514 515 516) () 0 () ())
-21 'h5dread_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 517 0 (518
-519 520 521 522 523 524 525) () 0 () ())
-214 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-27 'h5dwrite_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 526 0 (527
-528 529 530 531 532 533 534) () 0 () ())
-34 'h5dwrite_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ())
-535 0 (536 537 538 539 540 541 542 543) () 0 () ())
-262 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-261 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-265 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-264 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-263 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-258 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-28 'h5dwrite_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 544 0 (545
-546 547 548 549 550 551 552) () 0 () ())
-249 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-553 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '19') () 0 ()
-())
-58 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-250 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-52 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-192 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-554 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-51 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-193 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-199 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-191 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-555 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-197 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-196 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-198 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-200 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-190 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-195 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-194 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-189 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-188 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-556 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-53 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-557 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '12') () 0 ()
-())
-237 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-231 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-187 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-29 'h5dwrite_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 558 0 (559
-560 561 562 563 564 565 566) () 0 () ())
-229 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-230 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-54 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9')) 0 () ())
-238 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-180 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-181 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-567 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(UNKNOWN 0 ()) 0 0 () () 0 () ())
-183 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-568 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-235 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-45 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-569 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6') () 0 () ())
-41 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-185 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-570 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7') () 0 () ())
-186 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-179 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-178 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-56 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-177 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-571 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-167 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-176 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-175 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-168 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-172 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-170 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-171 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-173 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-174 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-184 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-572 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-55 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-157 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-154 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-169 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-156 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-155 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-159 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-164 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-163 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-152 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-161 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-160 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-166 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-153 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-137 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-165 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-143 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-149 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-132 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-133 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-140 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-139 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-148 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-162 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-151 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-150 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-146 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-57 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-43 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-573 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-141 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-142 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-135 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-136 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-145 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-144 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-134 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-574 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '18') () 0 ()
-())
-147 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-158 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-227 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-37 'h5pget_fill_value_double' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 575 0 (576
-577 578 579) () 0 () ())
-35 'h5pregister_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 580 0 (581 582 583 584 585)
-() 0 () ())
-38 'h5pinsert_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 586 0 (587 588 589 590 591)
-() 0 () ())
-36 'h5pget_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 592 0 (593 594 595 596) () 0
-() ())
-40 'h5pset_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 597 0 (598 599 600 601) () 0
-() ())
-39 'h5pset_fill_value_double' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 602 0 (603
-604 605 606) () 0 () ())
-131 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-607 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2') () 0 () ())
-47 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-130 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-49 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-127 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-129 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-114 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-110 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-608 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '20') () 0 ()
-())
-123 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-112 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-121 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-113 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-111 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-122 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-115 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-125 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-119 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-126 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-120 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-116 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-104 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-78 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-124 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-128 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-102 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-118 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-77 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-84 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-76 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-609 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '34') () 0 ()
-())
-42 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-107 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-285 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-284 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-108 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-286 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-299 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-297 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-290 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-298 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-109 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-288 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-289 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-291 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-292 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-87 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-88 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-98 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-97 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-96 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-99 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-103 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-86 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-93 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-293 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-94 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-90 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-91 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-89 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-101 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-95 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-278 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-92 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-282 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-281 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-294 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-296 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-272 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-295 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-100 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-85 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-117 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-270 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-268 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-267 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-273 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-274 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-81 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-266 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-106 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-79 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-105 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-83 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-82 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-70 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-68 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-64 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-73 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-63 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-71 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-74 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-66 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-65 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-72 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-610 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '14') () 0 ()
-())
-611 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-67 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-48 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-612 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-613 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((614 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-75 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-62 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-615 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-616 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((617 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-69 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-618 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-80 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-619 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-620 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-621 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-622 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-623 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-44 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-46 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-269 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-138 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-383 'attr_id' '' 382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-384 'memtype_id' '' 382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-387 'hdferr' '' 382 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-386 'dims' '' 382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-408 'memtype_id' '' 406 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-385 'buf' '' 382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ()) 0
-0 () () 0 () ())
-409 'buf' '' 406 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 410 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-411 'hdferr' '' 406 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-365 'attr_id' '' 364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-367 'buf' '' 364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 368 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 368 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-410 'dims' '' 406 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-369 'hdferr' '' 364 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-404 'dims' '' 400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-405 'hdferr' '' 400 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-464 'dset_id' '' 463 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-469 'mem_space_id' '' 463 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-470 'file_space_id' '' 463 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-468 'hdferr' '' 463 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-466 'buf' '' 463 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-465 'mem_type_id' '' 463 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-467 'dims' '' 463 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-471 'xfer_prp' '' 463 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-368 'dims' '' 364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-539 'dims' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-538 'buf' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ()) 0
-0 () () 0 () ())
-537 'mem_type_id' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-502 'buf' '' 499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 503 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-500 'dset_id' '' 499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-504 'hdferr' '' 499 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-506 'file_space_id' '' 499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-505 'mem_space_id' '' 499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-501 'mem_type_id' '' 499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-503 'dims' '' 499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-390 'memtype_id' '' 388 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-373 'buf' '' 370 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 374 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 374 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 374 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 374 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-372 'memtype_id' '' 370 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-366 'memtype_id' '' 364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-403 'buf' '' 400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 404 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 404 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 404 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-407 'attr_id' '' 406 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-375 'hdferr' '' 370 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-402 'memtype_id' '' 400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-401 'attr_id' '' 400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-399 'hdferr' '' 394 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-398 'dims' '' 394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-392 'dims' '' 388 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-391 'buf' '' 388 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 392 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 392 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 392 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 392 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-392 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 392 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-389 'attr_id' '' 388 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-395 'attr_id' '' 394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-393 'hdferr' '' 388 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-371 'attr_id' '' 370 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-396 'memtype_id' '' 394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-379 'buf' '' 376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 380 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 380 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 380 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 380 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-380 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 380 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 380 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-348 'memtype_id' '' 346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-381 'hdferr' '' 376 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-349 'buf' '' 346 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-350 'dims' '' 346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-351 'hdferr' '' 346 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-316 'attr_id' '' 315 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-347 'attr_id' '' 346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-377 'attr_id' '' 376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-378 'memtype_id' '' 376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-380 'dims' '' 376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-397 'buf' '' 394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 398 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 398 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 398 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 398 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-398 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-332 'hdferr' '' 327 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-319 'dims' '' 315 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-318 'buf' '' 315 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 319 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-319 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-331 'dims' '' 327 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-330 'buf' '' 327 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 331 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-324 'buf' '' 321 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 325 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-325 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 325 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-322 'attr_id' '' 321 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-323 'memtype_id' '' 321 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-328 'attr_id' '' 327 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-326 'hdferr' '' 321 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-336 'buf' '' 333 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 337 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-337 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 337 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 337 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-317 'memtype_id' '' 315 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-337 'dims' '' 333 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-325 'dims' '' 321 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-320 'hdferr' '' 315 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-334 'attr_id' '' 333 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-360 'memtype_id' '' 358 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-362 'dims' '' 358 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-363 'hdferr' '' 358 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-345 'hdferr' '' 340 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-335 'memtype_id' '' 333 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-343 'buf' '' 340 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 344 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-344 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 344 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 344 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-344 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 344 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-359 'attr_id' '' 358 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-342 'memtype_id' '' 340 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-344 'dims' '' 340 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-361 'buf' '' 358 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 362 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-362 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 362 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 362 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-362 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-341 'attr_id' '' 340 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-357 'hdferr' '' 352 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-540 'hdferr' '' 535 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-354 'memtype_id' '' 352 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-356 'dims' '' 352 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-353 'attr_id' '' 352 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-486 'hdferr' '' 481 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-484 'buf' '' 481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 485 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 485 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 485 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 485 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-483 'mem_type_id' '' 481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-543 'xfer_prp' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-485 'dims' '' 481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-487 'mem_space_id' '' 481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-482 'dset_id' '' 481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-488 'file_space_id' '' 481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-536 'dset_id' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-563 'hdferr' '' 558 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-507 'xfer_prp' '' 499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-489 'xfer_prp' '' 481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-542 'file_space_id' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-541 'mem_space_id' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-355 'buf' '' 352 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 356 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-356 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 356 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 356 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-356 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 356 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 356 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-475 'buf' '' 472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 476 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 476 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-473 'dset_id' '' 472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-476 'dims' '' 472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-474 'mem_type_id' '' 472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-479 'file_space_id' '' 472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-478 'mem_space_id' '' 472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-493 'buf' '' 490 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 494 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 494 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 494 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-491 'dset_id' '' 490 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-495 'hdferr' '' 490 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-492 'mem_type_id' '' 490 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-480 'xfer_prp' '' 472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-497 'file_space_id' '' 490 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-498 'xfer_prp' '' 490 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-562 'dims' '' 558 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-560 'mem_type_id' '' 558 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-564 'mem_space_id' '' 558 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-559 'dset_id' '' 558 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-561 'buf' '' 558 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 562 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 562 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 562 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 562 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-562 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-496 'mem_space_id' '' 490 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-566 'xfer_prp' '' 558 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-547 'buf' '' 544 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 548 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 548 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 548 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 548 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-548 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 548 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-546 'mem_type_id' '' 544 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-565 'file_space_id' '' 558 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-548 'dims' '' 544 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-545 'dset_id' '' 544 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-550 'mem_space_id' '' 544 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-551 'file_space_id' '' 544 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-528 'mem_type_id' '' 526 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-552 'xfer_prp' '' 544 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-529 'buf' '' 526 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 530 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 530 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 530 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 530 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-530 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 530 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 530 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-531 'hdferr' '' 526 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-549 'hdferr' '' 544 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-530 'dims' '' 526 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-527 'dset_id' '' 526 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-494 'dims' '' 490 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-533 'file_space_id' '' 526 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-447 'mem_type_id' '' 445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-449 'dims' '' 445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-448 'buf' '' 445 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 449 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-446 'dset_id' '' 445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-451 'mem_space_id' '' 445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-450 'hdferr' '' 445 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-534 'xfer_prp' '' 526 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-532 'mem_space_id' '' 526 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-438 'mem_type_id' '' 436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-453 'xfer_prp' '' 445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-452 'file_space_id' '' 445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-477 'hdferr' '' 472 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-338 'hdferr' '' 333 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-329 'memtype_id' '' 327 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-603 'prp_id' '' 602 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-604 'type_id' '' 602 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-577 'type_id' '' 575 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-606 'hdferr' '' 602 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-579 'hdferr' '' 575 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-589 'size' '' 586 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-588 'name' '' 586 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-578 'fillvalue' '' 575 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8
-()) 0 0 () () 0 () ())
-590 'value' '' 586 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-420 'mem_type_id' '' 418 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-423 'hdferr' '' 418 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-422 'dims' '' 418 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-419 'dset_id' '' 418 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-425 'file_space_id' '' 418 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-439 'buf' '' 436 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 440 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-440 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-426 'xfer_prp' '' 418 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-437 'dset_id' '' 436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-440 'dims' '' 436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-424 'mem_space_id' '' 418 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-421 'buf' '' 418 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 422 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-422 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 422 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 422 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-591 'hdferr' '' 586 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-605 'fillvalue' '' 602 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8
-()) 0 0 () () 0 () ())
-441 'hdferr' '' 436 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-443 'file_space_id' '' 436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-442 'mem_space_id' '' 436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-429 'mem_type_id' '' 427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-430 'buf' '' 427 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 431 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-431 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 431 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-444 'xfer_prp' '' 436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-374 'dims' '' 370 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-428 'dset_id' '' 427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-433 'mem_space_id' '' 427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-431 'dims' '' 427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-519 'mem_type_id' '' 517 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-522 'hdferr' '' 517 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-518 'dset_id' '' 517 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-520 'buf' '' 517 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 521 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-521 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 521 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 521 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-521 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-435 'xfer_prp' '' 427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-434 'file_space_id' '' 427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-523 'mem_space_id' '' 517 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-524 'file_space_id' '' 517 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-525 'xfer_prp' '' 517 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-521 'dims' '' 517 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-455 'dset_id' '' 454 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-457 'buf' '' 454 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 458 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-458 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 458 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 458 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-458 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 458 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-459 'hdferr' '' 454 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-460 'mem_space_id' '' 454 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-458 'dims' '' 454 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-461 'file_space_id' '' 454 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-456 'mem_type_id' '' 454 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-512 'dims' '' 508 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-511 'buf' '' 508 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 512 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-512 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 512 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 512 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-512 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 512 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 512 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-513 'hdferr' '' 508 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-462 'xfer_prp' '' 454 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-509 'dset_id' '' 508 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-515 'file_space_id' '' 508 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-415 'space_id' '' 413 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-416 'buf' '' 413 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-417 'hdferr' '' 413 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-599 'name' '' 597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-414 'fill_value' '' 413 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL
-8 ()) 0 0 () () 0 () ())
-600 'value' '' 597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-516 'xfer_prp' '' 508 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-514 'mem_space_id' '' 508 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-595 'value' '' 592 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-594 'name' '' 592 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-596 'hdferr' '' 592 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-576 'prp_id' '' 575 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-582 'name' '' 580 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-598 'prp_id' '' 597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-585 'hdferr' '' 580 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-587 'plist' '' 586 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-593 'prp_id' '' 592 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-584 'value' '' 580 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-581 'class' '' 580 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-583 'size' '' 580 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-601 'hdferr' '' 597 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-510 'mem_type_id' '' 508 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-432 'hdferr' '' 427 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-)
-
-('h5p_string_create_f' 0 138 'h5g_storage_type_dense_f' 0 227
-'h5dwrite_double_5' 0 29 'h5d_fill_time_error_f' 0 214 'h5aread_double_5'
-0 4 'floating_types_len' 0 339 '__convert_i4_i8' 0 300 'floating_types'
-0 59 'h5_iter_unknown_f' 0 243 'fortran_integer_1' 0 313 'fortran_double'
-0 302 'fortran_integer' 0 301 'fortran_real_4' 0 312 'fortran_integer_2'
-0 308 'fortran_real' 0 307 'fortran_integer_4' 0 304 'fortran_integer_8'
-0 303 'fortran_real_12' 0 306 'fortran_real_16' 0 305 'h5_integer_kind'
-0 311 'h5_index_crt_order_f' 0 245 'fortran_real_8' 0 310
-'h5_dble_interface' 0 309 'h5_index_n_f' 0 244 'h5_index_unknown_f' 0
-247 'h5_index_name_f' 0 246 'h5_iter_dec_f' 0 241 'h5_iter_native_f' 0
-240 'h5_iter_n_f' 0 239 'h5_iter_inc_f' 0 242 'h5aread_double_4' 0 5
-'h5aread_double_1' 0 8 'h5_szip_ec_om_f' 0 61 'h5_real_kind' 0 314
-'h5_szip_nn_om_f' 0 60 'h5aread_double_3' 0 6 'h5aread_double_2' 0 7
-'h5aread_double_7' 0 2 'h5aread_double_6' 0 3 'h5aread_double_scalar' 0
-9 'h5d_alloc_time_early_f' 0 221 'h5d_alloc_time_default_f' 0 222
-'h5awrite_double_1' 0 16 'h5awrite_double_3' 0 14 'h5awrite_double_2' 0
-15 'h5awrite_double_5' 0 12 'h5awrite_double_4' 0 13 'h5awrite_double_6'
-0 11 'h5awrite_double_scalar' 0 17 'h5awrite_double_7' 0 10
-'h5d_contiguous_f' 0 225 'h5d_compact_f' 0 226 'h5d_alloc_time_late_f' 0
-220 'h5d_alloc_time_error_f' 0 223 'h5d_alloc_time_incr_f' 0 219
-'h5d_chunked_f' 0 224 'h5d_chunk_cache_nslots_dflt_f' 0 207
-'h5d_chunk_cache_nbytes_dflt_f' 0 206 'h5d_chunk_cache_w0_dflt_f' 0 205
-'h5d_fill_time_alloc_f' 0 213 'h5d_fill_value_user_defined_f' 0 208
-'h5d_fill_time_never_f' 0 212 'h5d_fill_value_error_f' 0 211
-'h5d_fill_value_default_f' 0 209 'h5d_fill_value_undefined_f' 0 210
-'h5d_space_sts_not_allocated_f' 0 217 'h5d_space_sts_error_f' 0 218
-'h5d_flags_len' 0 412 'h5d_flags' 0 50 'h5d_space_sts_allocated_f' 0 215
-'h5dfill_double' 0 18 'h5d_space_sts_part_allocated_f' 0 216
-'h5dread_double_5' 0 21 'h5dread_double_1' 0 25 'h5dread_double_2' 0 24
-'h5dread_double_3' 0 23 'h5dread_double_4' 0 22 'h5dread_double_7' 0 19
-'h5dread_double_6' 0 20 'h5dwrite_double_1' 0 33 'h5dread_double_scalar'
-0 26 'h5dwrite_double_3' 0 31 'h5dwrite_double_2' 0 32 'h5dwrite_double_4'
-0 30 'h5f_close_weak_f' 0 257 'h5dwrite_double_6' 0 28
-'h5dwrite_double_scalar' 0 34 'h5dwrite_double_7' 0 27
-'h5f_close_default_f' 0 258 'h5f_acc_trunc_f' 0 263 'h5f_acc_rdonly_f' 0
-264 'h5f_acc_debug_f' 0 261 'h5f_acc_excl_f' 0 262 'h5f_acc_rdwr_f' 0
-265 'h5f_close_semi_f' 0 256 'h5f_close_strong_f' 0 255
-'h5fd_mpio_independent_f' 0 204 'h5fd_mem_default_f' 0 201
-'h5fd_hid_flags_len' 0 555 'h5fd_core_f' 0 193 'h5f_obj_file_f' 0 254
-'h5f_libver_latest_f' 0 248 'h5f_flags' 0 58 'h5f_flags_len' 0 553
-'h5f_libver_earliest_f' 0 249 'h5f_obj_datatype_f' 0 251
-'h5f_obj_dataset_f' 0 253 'h5f_obj_all_f' 0 250 'h5f_scope_global_f' 0
-259 'h5f_obj_group_f' 0 252 'h5f_scope_local_f' 0 260 'h5fd_hid_flags' 0
-51 'h5fd_flags_len' 0 554 'h5fd_family_f' 0 192 'h5fd_flags' 0 52
-'h5fd_log_f' 0 191 'h5fd_mem_btree_f' 0 199 'h5fd_mem_ntypes_f' 0 194
-'h5fd_mem_nolist_f' 0 202 'h5fd_mem_draw_f' 0 198 'h5fd_mem_lheap_f' 0
-196 'h5fd_mem_gheap_f' 0 197 'h5fd_mem_ohdr_f' 0 195 'h5fd_mpio_f' 0 190
-'h5fd_mem_super_f' 0 200 'h5fd_mpio_collective_f' 0 203 'h5fd_stdio_f' 0
-187 'h5fd_sec2_f' 0 188 'h5fd_multi_f' 0 189 'h5g_link_hard_f' 0 232
-'h5g_dataset_f' 0 236 'h5fortran_types' 0 556 'h5g_link_error_f' 0 233
-'h5g_group_f' 0 237 'h5g_flags_len' 0 557 'h5g_flags' 0 53 'h5g_link_f'
-0 234 'h5g_link_soft_f' 0 231 'h5g_storage_type_compact_f' 0 228
-'h5o_hdr_attr_crt_order_track_f' 0 158 'h5o_copy_without_attr_flag_f' 0
-169 'h5i_datatype_f' 0 184 'h5g_type_f' 0 235 'h5g_storage_type_unknown_f'
-0 230 'h5g_storage_type_symbol_table_f' 0 229 'h5generic_flags_len' 0
-568 'h5g_unknown_f' 0 238 'h5generic_flags' 0 54 'h5i_dataset_f' 0 182
-'h5global' 0 567 'h5i_attr_f' 0 181 'h5i_badid_f' 0 180 'h5i_dataspace_f'
-0 183 'h5l_link_class_t_vers_f' 0 174 'h5i_file_f' 0 186 'h5i_flags_len'
-0 570 'h5i_flags' 0 45 'h5i_group_f' 0 185 'h5l_flags' 0 41
-'h5l_flags_len' 0 569 'h5o_copy_shallow_hierarchy_f' 0 173
-'h5o_copy_expand_ext_link_f' 0 171 'h5l_same_loc_f' 0 175
-'h5l_type_external_f' 0 176 'h5l_type_error_f' 0 179 'h5o_copy_all_f' 0
-167 'h5lib_flags_len' 0 571 'h5l_type_soft_f' 0 177 'h5l_type_hard_f' 0
-178 'h5lib_flags' 0 56 'h5o_copy_expand_reference_f' 0 170
-'h5o_copy_expand_soft_link_f' 0 172 'h5o_copy_preserve_null_flag_f' 0
-168 'h5o_hdr_all_flags_f' 0 154 'h5o_flags' 0 55 'h5o_flags_len' 0 572
-'h5o_hdr_attr_crt_order_index_f' 0 157 'h5p_file_mount_f' 0 147
-'h5p_default_f' 0 146 'h5o_shmesg_pline_flag_f' 0 162
-'h5o_shmesg_max_nindexes_f' 0 153 'h5o_shmesg_all_flag_f' 0 160
-'h5o_hdr_chunk0_size_f' 0 159 'h5o_hdr_attr_store_phase_cha_f' 0 156
-'h5o_hdr_store_times_f' 0 155 'h5o_shmesg_attr_flag_f' 0 161
-'h5o_shmesg_max_list_size_f' 0 152 'h5o_shmesg_fill_flag_f' 0 163
-'h5o_shmesg_dtype_flag_f' 0 164 'h5o_shmesg_none_flag_f' 0 166
-'h5p_dataset_xfer_f' 0 148 'h5p_crt_order_indexed_f' 0 133
-'h5o_shmesg_sdspace_flag_f' 0 165 'h5p_attribute_create_f' 0 137
-'h5p_crt_order_tracked_f' 0 132 'h5p_dataset_create_f' 0 149
-'h5p_dataset_access_f' 0 143 'h5p_datatype_access_f' 0 139
-'h5p_datatype_create_f' 0 140 'h5p_file_access_f' 0 150
-'h5p_file_create_f' 0 151 'h5p_flags_len' 0 574 'h5p_flags_int_len' 0
-573 'h5p_flags_int' 0 43 'h5p_flags' 0 57 'h5p_link_access_f' 0 134
-'h5p_group_create_f' 0 142 'h5p_group_access_f' 0 141
-'h5p_object_create_f' 0 144 'h5p_object_copy_f' 0 136 'h5p_link_create_f'
-0 135 'h5p_root_f' 0 145 'h5t_std_u16le' 0 271 'h5s_select_append_f' 0
-117 'h5s_sel_hyperslabs_f' 0 111 'h5pget_double' 0 36 'h5pinsert_double'
-0 38 'h5pget_fill_value_double' 0 37 'h5pregister_double' 0 35 'h5s_all_f'
-0 123 'h5r_dataset_region_f' 0 130 'h5pset_fill_value_double' 0 39
-'h5pset_double' 0 40 'h5r_flags' 0 47 'h5r_flags_len' 0 607 'h5r_object_f'
-0 131 'h5s_flags_len' 0 608 'h5s_flags' 0 49 'h5s_sel_all_f' 0 110
-'h5s_scalar_f' 0 129 'h5s_null_f' 0 127 'h5s_sel_error_f' 0 114
-'h5s_sel_none_f' 0 113 'h5s_select_and_f' 0 121 'h5s_sel_points_f' 0 112
-'h5t_cset_ascii_f' 0 85 'h5s_select_nota_f' 0 118 'h5s_select_invalid_f'
-0 115 'h5s_select_noop_f' 0 122 'h5t_compound_f' 0 102 'h5s_simple_f' 0
-128 'h5s_select_prepend_f' 0 116 'h5s_select_notb_f' 0 119
-'h5s_select_or_f' 0 125 'h5s_select_xor_f' 0 120 'h5s_select_set_f' 0
-126 'h5s_unlimited_f' 0 124 'h5t_array_f' 0 78 'h5t_bitfield_f' 0 104
-'h5t_enum_f' 0 100 'h5t_dir_descend_f' 0 76 'h5t_cset_utf8_f' 0 84
-'h5t_dir_ascend_f' 0 77 'h5t_std_ref_obj' 0 295 'h5t_native_character' 0
-296 'h5t_ieee_f32be' 0 286 'h5t_float_f' 0 107 'h5t_flags' 0 42
-'h5t_flags_len' 0 609 'h5t_ieee_f64le' 0 283 'h5t_ieee_f64be' 0 284
-'h5t_ieee_f32le' 0 285 'h5t_integer_f' 0 108 'h5t_std_i64le' 0 275
-'h5t_pad_error_f' 0 92 'h5t_native_integer_1' 0 293 'h5t_native_double'
-0 297 'h5t_native_integer' 0 299 'h5t_pad_background_f' 0 93
-'h5t_norm_none_f' 0 86 'h5t_norm_implied_f' 0 88 'h5t_native_integer_2'
-0 292 'h5t_native_integer_4' 0 291 'h5t_native_real_16' 0 287
-'h5t_native_real' 0 298 'h5t_native_integer_8' 0 290 'h5t_native_real_4'
-0 289 'h5t_native_real_8' 0 288 'h5t_no_class_f' 0 109 'h5t_norm_msbset_f'
-0 87 'h5t_opaque_f' 0 103 'h5t_order_le_f' 0 99 'h5t_order_be_f' 0 98
-'h5t_order_none_f' 0 96 'h5t_order_vax_f' 0 97 'h5t_std_i32be' 0 278
-'h5t_pad_zero_f' 0 95 'h5t_pad_one_f' 0 94 'h5t_reference_f' 0 101
-'h5t_sgn_error_f' 0 89 'h5t_sgn_2_f' 0 90 'h5t_std_i16le' 0 279
-'h5t_sgn_none_f' 0 91 'h5t_std_i16be' 0 280 'h5t_std_i32le' 0 277
-'h5t_std_i64be' 0 276 'h5t_std_ref_dsetreg' 0 294 'h5t_std_i8le' 0 281
-'h5t_std_i8be' 0 282 'h5t_std_u16be' 0 272 'h5t_std_u32le' 0 269
-'h5t_std_u32be' 0 270 'integer_types' 0 46 'h5t_str_error_f' 0 80
-'h5t_std_u8be' 0 274 'h5t_std_u64le' 0 267 'h5t_std_u64be' 0 268
-'h5t_std_u8le' 0 273 'hssize_t' 0 618 'h5z_disable_edc_f' 0 69
-'h5t_str_nullpad_f' 0 82 'h5t_str_nullterm_f' 0 83 'h5t_string_f' 0 105
-'h5t_string' 0 266 'h5t_str_spacepad_f' 0 81 'h5t_vlen_f' 0 79
-'h5t_time_f' 0 106 'hobj_ref_t_f' 0 616 'h5z_filter_all_f' 0 62
-'h5z_enable_edc_f' 0 68 'h5z_error_edc_f' 0 70 'h5z_filter_error_f' 0 75
-'h5z_filter_decode_enabled_f' 0 63 'h5z_filter_deflate_f' 0 73
-'h5z_filter_encode_enabled_f' 0 64 'hdset_reg_ref_t_f' 0 613 'h5z_flags'
-0 48 'h5z_filter_shuffle_f' 0 72 'h5z_filter_none_f' 0 74
-'h5z_filter_fletcher32_f' 0 71 'h5z_flag_optional_f' 0 65
-'h5z_filter_szip_f' 0 66 'h5z_no_edc_f' 0 67 'h5z_flags_len' 0 610
-'haddr_t' 0 611 'hid_t' 0 612 'hsize_t' 0 615 'predef_types' 0 44
-'object_namelen_default_f' 0 620 'integer_types_len' 0 619
-'ref_reg_buf_len' 0 623 'predef_types_len' 0 621 'size_t' 0 622)
diff --git a/interfaces/ext/hdf5/h5a.mod b/interfaces/ext/hdf5/h5a.mod
deleted file mode 100644
index c507333..0000000
--- a/interfaces/ext/hdf5/h5a.mod
+++ /dev/null
@@ -1,2637 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5Aff.f90 on Mon Feb 14 14:35:48 2011
-If you edit this, you'll get what you deserve.
-
-(() ()
-() () () () () () () () () () () () () () () () () () ())
-
-()
-
-(('h5aread_f' '' 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
-23 24 25) ('h5awrite_f' '' 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
-41 42 43 44 45 46 47 48 49))
-
-(('h5l_flags' 50 0) ('h5t_flags' 51 0) ('h5p_flags_int' 52 0) (
-'predefined_types' 53 0) ('h5i_flags' 54 0) ('integer_types' 55 0) (
-'h5r_flags' 56 0) ('h5z_flags' 57 0) ('h5s_flags' 58 0) ('h5d_flags' 59
-0) ('h5fd_hid_flags' 60 0) ('h5fd_flags' 61 0) ('h5g_flags' 62 0) (
-'h5generic_flags' 63 0) ('h5o_flags' 64 0) ('h5lib_flags' 65 0) (
-'h5p_flags' 66 0) ('h5f_flags' 67 0) ('floating_types' 68 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 69 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 70 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 71 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 72 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 73 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 57 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 74 ())) ('h5global.eq.6' (VARIABLE (INTEGER 4
-()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 75 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 76 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 77 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 78 ())) ('h5global.eq.10' (VARIABLE (INTEGER 4
-()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 79 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 80 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 81 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 57
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.13'
-(VARIABLE (INTEGER 4 ()) 0 82 ())) ('h5global.eq.14' (VARIABLE (INTEGER
-4 ()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 83 ())) ('h5global.eq.15' (
-VARIABLE (INTEGER 4 ()) 0 57 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 84 ())) (
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '34') 1)))) 'h5global.eq.16' (VARIABLE (
-INTEGER 4 ()) 0 85 ())) ('h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 51
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '33') 1)))) 'h5global.eq.17'
-(VARIABLE (INTEGER 4 ()) 0 86 ())) ('h5global.eq.18' (VARIABLE (INTEGER
-4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '32') 1))))
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 87 ())) ('h5global.eq.19' (
-VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '31') 1)))) 'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 88 ())) (
-'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '30') 1)))) 'h5global.eq.20' (VARIABLE (
-INTEGER 4 ()) 0 89 ())) ('h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 51
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21'
-(VARIABLE (INTEGER 4 ()) 0 90 ())) ('h5global.eq.22' (VARIABLE (INTEGER
-4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 91 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 92 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 93 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 51
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1)))) 'h5global.eq.25'
-(VARIABLE (INTEGER 4 ()) 0 94 ())) ('h5global.eq.26' (VARIABLE (INTEGER
-4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '24') 1))))
-'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 95 ())) ('h5global.eq.27' (
-VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '23') 1)))) 'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 96 ())) (
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.28' (VARIABLE (
-INTEGER 4 ()) 0 97 ())) ('h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 51
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.29'
-(VARIABLE (INTEGER 4 ()) 0 98 ())) ('h5global.eq.30' (VARIABLE (INTEGER
-4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 99 ())) ('h5global.eq.31' (
-VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 100 ())) (
-'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.32' (VARIABLE (
-INTEGER 4 ()) 0 101 ())) ('h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 51
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33'
-(VARIABLE (INTEGER 4 ()) 0 102 ())) ('h5global.eq.34' (VARIABLE (
-INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 103 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 104 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 105 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 51
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.37'
-(VARIABLE (INTEGER 4 ()) 0 106 ())) ('h5global.eq.38' (VARIABLE (
-INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 107 ())) ('h5global.eq.39' (
-VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 108 ())) (
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.40' (VARIABLE (
-INTEGER 4 ()) 0 109 ())) ('h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 51
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.41'
-(VARIABLE (INTEGER 4 ()) 0 110 ())) ('h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 111 ())) ('h5global.eq.43' (
-VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 112 ())) (
-'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.44' (VARIABLE (
-INTEGER 4 ()) 0 113 ())) ('h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 51
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45'
-(VARIABLE (INTEGER 4 ()) 0 114 ())) ('h5global.eq.46' (VARIABLE (
-INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 115 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 116 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 51 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 117 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 51
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.49'
-(VARIABLE (INTEGER 4 ()) 0 118 ())) ('h5global.eq.50' (VARIABLE (
-INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 119 ())) ('h5global.eq.51' (
-VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 120 ())) (
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.52' (VARIABLE (
-INTEGER 4 ()) 0 121 ())) ('h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 58
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.53'
-(VARIABLE (INTEGER 4 ()) 0 122 ())) ('h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 123 ())) ('h5global.eq.55' (
-VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 124 ())) (
-'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.56' (VARIABLE (
-INTEGER 4 ()) 0 125 ())) ('h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 58
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57'
-(VARIABLE (INTEGER 4 ()) 0 126 ())) ('h5global.eq.58' (VARIABLE (
-INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 127 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 128 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 129 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 58
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.61'
-(VARIABLE (INTEGER 4 ()) 0 130 ())) ('h5global.eq.62' (VARIABLE (
-INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 131 ())) ('h5global.eq.63' (
-VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 132 ())) (
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.64' (VARIABLE (
-INTEGER 4 ()) 0 133 ())) ('h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 58
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.65'
-(VARIABLE (INTEGER 4 ()) 0 134 ())) ('h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 135 ())) ('h5global.eq.67' (
-VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 136 ())) (
-'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 58 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.68' (VARIABLE (
-INTEGER 4 ()) 0 137 ())) ('h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 58
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69'
-(VARIABLE (INTEGER 4 ()) 0 138 ())) ('h5global.eq.70' (VARIABLE (
-INTEGER 4 ()) 0 56 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 139 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 56 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 140 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 52 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 141 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 52
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.73'
-(VARIABLE (INTEGER 4 ()) 0 142 ())) ('h5global.eq.74' (VARIABLE (
-INTEGER 4 ()) 0 66 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 143 ())) ('h5global.eq.75' (
-VARIABLE (INTEGER 4 ()) 0 66 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 144 ())) (
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 66 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.76' (VARIABLE (
-INTEGER 4 ()) 0 145 ())) ('h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 66
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.77'
-(VARIABLE (INTEGER 4 ()) 0 146 ())) ('h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 66 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 147 ())) ('h5global.eq.79' (
-VARIABLE (INTEGER 4 ()) 0 66 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 148 ())) (
-'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 66 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.80' (VARIABLE (
-INTEGER 4 ()) 0 149 ())) ('h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 66
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81'
-(VARIABLE (INTEGER 4 ()) 0 150 ())) ('h5global.eq.82' (VARIABLE (
-INTEGER 4 ()) 0 66 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 151 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 66 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 152 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 66 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 153 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 66
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.85'
-(VARIABLE (INTEGER 4 ()) 0 154 ())) ('h5global.eq.86' (VARIABLE (
-INTEGER 4 ()) 0 66 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 155 ())) ('h5global.eq.87' (
-VARIABLE (INTEGER 4 ()) 0 66 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 156 ())) (
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 66 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.88' (VARIABLE (
-INTEGER 4 ()) 0 157 ())) ('h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 66
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.89'
-(VARIABLE (INTEGER 4 ()) 0 158 ())) ('h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 66 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 159 ())) ('h5global.eq.91' (
-VARIABLE (INTEGER 4 ()) 0 66 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 160 ())) (
-'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.92' (VARIABLE (
-INTEGER 4 ()) 0 161 ())) ('h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 64
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93'
-(VARIABLE (INTEGER 4 ()) 0 162 ())) ('h5global.eq.94' (VARIABLE (
-INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 163 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 164 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 165 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 64
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.97'
-(VARIABLE (INTEGER 4 ()) 0 166 ())) ('h5global.eq.98' (VARIABLE (
-INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 167 ())) ('h5global.eq.99' (
-VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 168 ())) (
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.100' (VARIABLE (
-INTEGER 4 ()) 0 169 ())) ('h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0
-64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 170 ())) ('h5global.eq.102'
-(VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 171 ())) (
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.103' (VARIABLE (
-INTEGER 4 ()) 0 172 ())) ('h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0
-64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 173 ())) ('h5global.eq.105'
-(VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 174 ())) (
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.106' (VARIABLE (
-INTEGER 4 ()) 0 175 ())) ('h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0
-64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 176 ())) ('h5global.eq.108'
-(VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 177 ())) (
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.109' (VARIABLE (
-INTEGER 4 ()) 0 178 ())) ('h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0
-64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 179 ())) ('h5global.eq.111'
-(VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 180 ())) (
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.112' (VARIABLE (
-INTEGER 4 ()) 0 181 ())) ('h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0
-64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 182 ())) ('h5global.eq.114'
-(VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 183 ())) (
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.115' (VARIABLE (
-INTEGER 4 ()) 0 184 ())) ('h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0
-50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 185 ())) ('h5global.eq.117'
-(VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 186 ())) (
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 50 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.118' (VARIABLE (
-INTEGER 4 ()) 0 187 ())) ('h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0
-50 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 188 ())) ('h5global.eq.120'
-(VARIABLE (INTEGER 4 ()) 0 54 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 189 ())) (
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 54 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.121' (VARIABLE (
-INTEGER 4 ()) 0 190 ())) ('h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0
-54 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 191 ())) ('h5global.eq.123'
-(VARIABLE (INTEGER 4 ()) 0 54 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 192 ())) (
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 54 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.124' (VARIABLE (
-INTEGER 4 ()) 0 193 ())) ('h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0
-54 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 194 ())) ('h5global.eq.126'
-(VARIABLE (INTEGER 4 ()) 0 54 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 195 ())) (
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 60 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.127' (VARIABLE (
-INTEGER 4 ()) 0 196 ())) ('h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0
-60 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 197 ())) ('h5global.eq.129'
-(VARIABLE (INTEGER 4 ()) 0 60 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 198 ())) (
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 60 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.130' (VARIABLE (
-INTEGER 4 ()) 0 199 ())) ('h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0
-60 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.132'
-(VARIABLE (INTEGER 4 ()) 0 60 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 60 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.133' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0
-61 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.135'
-(VARIABLE (INTEGER 4 ()) 0 61 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 204 ())) (
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 61 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.136' (VARIABLE (
-INTEGER 4 ()) 0 205 ())) ('h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0
-61 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 206 ())) ('h5global.eq.138'
-(VARIABLE (INTEGER 4 ()) 0 61 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 207 ())) (
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 61 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.139' (VARIABLE (
-INTEGER 4 ()) 0 208 ())) ('h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0
-61 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 209 ())) ('h5global.eq.141'
-(VARIABLE (INTEGER 4 ()) 0 61 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 210 ())) (
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 61 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.142' (VARIABLE (
-INTEGER 4 ()) 0 211 ())) ('h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0
-61 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 212 ())) ('h5global.eq.144'
-(VARIABLE (INTEGER 4 ()) 0 61 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 213 ())) (
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.145' (VARIABLE (
-INTEGER 4 ()) 0 214 ())) ('h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0
-59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1))))
-'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 215 ())) ('h5global.eq.147'
-(VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 216 ())) (
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.148' (VARIABLE (
-INTEGER 4 ()) 0 217 ())) ('h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0
-59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 218 ())) ('h5global.eq.150'
-(VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 219 ())) (
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.151' (VARIABLE (
-INTEGER 4 ()) 0 220 ())) ('h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0
-59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 221 ())) ('h5global.eq.153'
-(VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 222 ())) (
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.154' (VARIABLE (
-INTEGER 4 ()) 0 223 ())) ('h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0
-59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.156'
-(VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.157' (VARIABLE (
-INTEGER 4 ()) 0 226 ())) ('h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0
-59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.159'
-(VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 228 ())) (
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.160' (VARIABLE (
-INTEGER 4 ()) 0 229 ())) ('h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0
-59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 230 ())) ('h5global.eq.162'
-(VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 231 ())) (
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.163' (VARIABLE (
-INTEGER 4 ()) 0 232 ())) ('h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0
-59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 233 ())) ('h5global.eq.165'
-(VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 234 ())) (
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 59 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.166' (VARIABLE (
-INTEGER 4 ()) 0 235 ())) ('h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0
-62 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.168'
-(VARIABLE (INTEGER 4 ()) 0 62 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 62 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.169' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0
-62 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.171'
-(VARIABLE (INTEGER 4 ()) 0 62 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 240 ())) (
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 62 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.172' (VARIABLE (
-INTEGER 4 ()) 0 241 ())) ('h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0
-62 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 242 ())) ('h5global.eq.174'
-(VARIABLE (INTEGER 4 ()) 0 62 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 243 ())) (
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 62 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.175' (VARIABLE (
-INTEGER 4 ()) 0 244 ())) ('h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0
-62 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 245 ())) ('h5global.eq.177'
-(VARIABLE (INTEGER 4 ()) 0 62 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 246 ())) (
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 62 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.178' (VARIABLE (
-INTEGER 4 ()) 0 247 ())) ('h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0
-63 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 248 ())) ('h5global.eq.180'
-(VARIABLE (INTEGER 4 ()) 0 63 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 249 ())) (
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 63 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.181' (VARIABLE (
-INTEGER 4 ()) 0 250 ())) ('h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0
-63 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 251 ())) ('h5global.eq.183'
-(VARIABLE (INTEGER 4 ()) 0 63 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 252 ())) (
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 63 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.184' (VARIABLE (
-INTEGER 4 ()) 0 253 ())) ('h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0
-63 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 254 ())) ('h5global.eq.186'
-(VARIABLE (INTEGER 4 ()) 0 63 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 255 ())) (
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 63 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.187' (VARIABLE (
-INTEGER 4 ()) 0 256 ())) ('h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0
-67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 257 ())) ('h5global.eq.189'
-(VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 258 ())) (
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.190' (VARIABLE (
-INTEGER 4 ()) 0 259 ())) ('h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0
-67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 260 ())) ('h5global.eq.192'
-(VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 261 ())) (
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.193' (VARIABLE (
-INTEGER 4 ()) 0 262 ())) ('h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0
-67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 263 ())) ('h5global.eq.195'
-(VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 264 ())) (
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.196' (VARIABLE (
-INTEGER 4 ()) 0 265 ())) ('h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0
-67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 266 ())) ('h5global.eq.198'
-(VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 267 ())) (
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.199' (VARIABLE (
-INTEGER 4 ()) 0 268 ())) ('h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0
-67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 269 ())) ('h5global.eq.201'
-(VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 270 ())) (
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.202' (VARIABLE (
-INTEGER 4 ()) 0 271 ())) ('h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0
-67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 272 ())) ('h5global.eq.204'
-(VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 273 ())) (
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.205' (VARIABLE (
-INTEGER 4 ()) 0 274 ())) ('h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0
-55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 275 ())) ('h5global.eq.207'
-(VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 276 ())) (
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.208' (VARIABLE (
-INTEGER 4 ()) 0 277 ())) ('h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0
-55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 278 ())) ('h5global.eq.210'
-(VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 279 ())) (
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.211' (VARIABLE (
-INTEGER 4 ()) 0 280 ())) ('h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0
-55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 281 ())) ('h5global.eq.213'
-(VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 282 ())) (
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.214' (VARIABLE (
-INTEGER 4 ()) 0 283 ())) ('h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0
-55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 284 ())) ('h5global.eq.216'
-(VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 285 ())) (
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.217' (VARIABLE (
-INTEGER 4 ()) 0 286 ())) ('h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0
-55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 287 ())) ('h5global.eq.219'
-(VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 288 ())) (
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.220' (VARIABLE (
-INTEGER 4 ()) 0 289 ())) ('h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0
-55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 290 ())) ('h5global.eq.222'
-(VARIABLE (INTEGER 4 ()) 0 55 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 291 ())) (
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 68 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.223' (VARIABLE (
-INTEGER 4 ()) 0 292 ())) ('h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0
-68 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 293 ())) ('h5global.eq.225'
-(VARIABLE (INTEGER 4 ()) 0 68 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 294 ())) (
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 68 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.226' (VARIABLE (
-INTEGER 4 ()) 0 295 ())) ('h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0
-53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 296 ())) ('h5global.eq.228'
-(VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 297 ())) (
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.229' (VARIABLE (
-INTEGER 4 ()) 0 298 ())) ('h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0
-53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 299 ())) ('h5global.eq.231'
-(VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 300 ())) (
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.232' (VARIABLE (
-INTEGER 4 ()) 0 301 ())) ('h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0
-53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 302 ())) ('h5global.eq.234'
-(VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 303 ())) (
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.235' (VARIABLE (
-INTEGER 4 ()) 0 304 ())) ('h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0
-53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 305 ())) ('h5global.eq.237'
-(VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 306 ())) (
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 53 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.238' (VARIABLE (
-INTEGER 4 ()) 0 307 ())) ('h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0
-53 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 308 ())))
-
-(68 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-309 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-310 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-311 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-312 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-313 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-314 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-315 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-316 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-317 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-318 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-255 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-319 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-320 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-321 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-322 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-69 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-323 'h5a' 'h5a' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-70 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-324 'h5acreate_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 325 0 (326 327 328 329
-330 331 332 333 334 335) () 0 () ())
-336 'h5adelete_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 337 0 (338 339 340 341
-342 343 344) () 0 () ())
-345 'h5acreate_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 346 0 (347 348 349 350 351
-352 353 354) () 0 () ())
-355 'h5adelete_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 356 0 (357 358 359) () 0 () ())
-360 'h5adelete_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 361 0 (362 363 364 365
-366) () 0 () ())
-367 'h5aexists_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 368 0 (369 370 371 372
-373 374) () 0 () ())
-375 'h5aclose_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 376 0 (377 378) () 0 () ())
-252 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-379 'h5aget_create_plist_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 380 0 (381 382 383) () 0 ()
-())
-384 'h5aget_info_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 385 0 (386
-387 388 389 390 391 392 393 394 395 396) () 0 () ())
-397 'h5aexists_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 398 0 (399 400 401 402) () 0 () ())
-403 'h5aget_info_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 404 0 (405 406 407 408 409 410) () 0 () ())
-411 'h5aget_info_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 412 0 (413
-414 415 416 417 418 419 420 421) () 0 () ())
-422 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-423 'h5aget_num_attrs_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 424 0 (425 426 427) () 0 () ())
-428 'h5aget_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 429 0 (430 431 432 433) () 0 () ())
-434 'h5aget_space_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 435 0 (436 437 438) () 0 () ())
-439 'h5aget_type_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 440 0 (441 442 443) () 0 () ())
-444 'h5aget_storage_size_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 445 0 (446 447 448) () 0 ()
-())
-449 'h5aopen_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 450 0 (451 452 453 454 455) ()
-0 () ())
-456 'h5aopen_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 457 0 (458 459 460 461
-462 463 464) () 0 () ())
-465 'h5aopen_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 466 0 (467 468 469 470
-471 472 473 474 475) () 0 () ())
-476 'h5aopen_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 477 0 (478 479 480 481) () 0 () ())
-14 'h5aread_char_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 482 0 (483 484 485 486 487) () 0 () ())
-15 'h5aread_char_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 488 0 (489 490 491 492 493) () 0 () ())
-12 'h5aread_char_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 494 0 (495 496 497 498 499) () 0 () ())
-13 'h5aread_char_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 500 0 (501 502 503 504 505) () 0 () ())
-16 'h5aread_char_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 506 0 (507 508 509 510 511) () 0 () ())
-24 'h5aread_integer_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 512 0 (513 514 515 516 517) () 0 () ())
-22 'h5aread_integer_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 518 0 (519 520 521 522 523) () 0 () ())
-23 'h5aread_integer_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 524 0 (525 526 527 528 529) () 0 () ())
-17 'h5aread_char_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 530 0 (531 532 533 534 535) () 0 () ())
-10 'h5aread_char_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 536 0 (537 538 539 540 541) () 0 () ())
-11 'h5aread_char_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 542 0 (543 544 545 546 547) () 0 () ())
-20 'h5aread_integer_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 548 0 (549 550 551 552 553) () 0 () ())
-19 'h5aread_integer_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 554 0 (555 556 557 558 559) () 0 () ())
-21 'h5aread_integer_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 560 0 (561 562 563 564 565) () 0 () ())
-25 'h5aread_integer_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 566 0 (567 568 569 570 571)
-() 0 () ())
-7 'h5aread_real_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 572 0 (573 574 575 576 577) () 0 () ())
-5 'h5aread_real_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 578 0 (579 580 581 582 583) () 0 () ())
-6 'h5aread_real_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 584 0 (585 586 587 588 589) () 0 () ())
-3 'h5aread_real_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 590 0 (591 592 593 594 595) () 0 () ())
-9 'h5aread_real_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 596 0 (597 598 599 600 601) () 0 () ())
-602 'h5arename_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 603 0 (604 605 606 607
-608 609) () 0 () ())
-610 'h5arename_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 611 0 (612 613 614 615) () 0 () ())
-2 'h5aread_real_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 616 0 (617 618 619 620 621) () 0 () ())
-4 'h5aread_real_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 622 0 (623 624 625 626 627) () 0 () ())
-39 'h5awrite_char_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 628 0 (629 630 631 632 633) () 0 () ())
-34 'h5awrite_char_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 634 0 (635 636 637 638 639) () 0 () ())
-35 'h5awrite_char_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 640 0 (641 642 643 644 645) () 0 () ())
-36 'h5awrite_char_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 646 0 (647 648 649 650 651) () 0 () ())
-37 'h5awrite_char_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 652 0 (653 654 655 656 657) () 0 () ())
-47 'h5awrite_integer_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 658 0 (659 660 661 662 663) () 0 () ())
-45 'h5awrite_integer_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 664 0 (665 666 667 668 669) () 0 () ())
-42 'h5awrite_integer_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 670 0 (671 672 673 674 675) () 0 () ())
-49 'h5awrite_integer_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 676 0 (677 678 679 680 681)
-() 0 () ())
-43 'h5awrite_integer_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 682 0 (683 684 685 686 687) () 0 () ())
-44 'h5awrite_integer_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 688 0 (689 690 691 692 693) () 0 () ())
-46 'h5awrite_integer_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 694 0 (695 696 697 698 699) () 0 () ())
-31 'h5awrite_real_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 700 0 (701 702 703 704 705) () 0 () ())
-30 'h5awrite_real_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 706 0 (707 708 709 710 711) () 0 () ())
-32 'h5awrite_real_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 712 0 (713 714 715 716 717) () 0 () ())
-27 'h5awrite_real_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 718 0 (719 720 721 722 723) () 0 () ())
-28 'h5awrite_real_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 724 0 (725 726 727 728 729) () 0 () ())
-29 'h5awrite_real_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 730 0 (731 732 733 734 735) () 0 () ())
-48 'h5awrite_integer_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 736 0 (737 738 739 740 741) () 0 () ())
-33 'h5awrite_real_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 742 0 (743 744 745 746 747) () 0 () ())
-26 'h5awrite_real_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 748 0 (749 750 751 752 753) () 0 () ())
-41 'h5awrite_char_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 754 0 (755 756 757 758 759) () 0 () ())
-231 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-215 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-214 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-216 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-233 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-230 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-38 'h5awrite_char_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 760 0 (761 762 763 764 765) () 0 () ())
-40 'h5awrite_char_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 766 0 (767 768 769 770 771) () 0 () ())
-8 'h5aread_real_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 772 0 (773 774 775 776 777) () 0 () ())
-18 'h5aread_integer_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 778 0 (779 780 781 782 783) () 0 () ())
-784 'h5aopen_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 785 0 (786 787 788 789) () 0 () ())
-218 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-220 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-59 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-224 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-790 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-227 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-271 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-270 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-274 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-273 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-272 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-264 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-265 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-267 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-217 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-258 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-791 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '19') () 0 ()
-())
-67 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-259 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-262 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-261 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-269 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-268 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-263 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-61 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-201 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-792 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-60 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-202 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-208 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-200 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-793 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-206 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-205 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-207 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-211 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-199 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-210 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-198 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-197 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-794 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-62 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-795 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '12') () 0 ()
-())
-246 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-242 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-196 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-213 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-266 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-223 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-239 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-63 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9')) 0 () ())
-247 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-189 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-190 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-796 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(UNKNOWN 0 ()) 0 0 () () 0 () ())
-192 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-191 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-797 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-244 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-54 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-798 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6') () 0 () ())
-50 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-194 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-799 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7') () 0 () ())
-195 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-188 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-187 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-65 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-186 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-800 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-176 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-185 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-184 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-177 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-181 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-179 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-180 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-183 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-193 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-801 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-64 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-166 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-163 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-178 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-165 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-164 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-168 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-173 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-172 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-161 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-170 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-169 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-175 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-162 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-146 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-174 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-152 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-158 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-141 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-142 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-149 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-148 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-157 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-171 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-160 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-159 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-155 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-66 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-52 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-802 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-150 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-151 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-144 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-145 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-154 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-153 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-143 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-803 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '18') () 0 ()
-())
-156 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-167 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-236 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-140 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-804 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2') () 0 () ())
-56 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-139 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-58 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-136 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-138 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-123 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-119 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-805 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '20') () 0 ()
-())
-132 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-121 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-130 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-122 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-120 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-131 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-124 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-134 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-128 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-135 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-129 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-125 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-113 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-87 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-133 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-137 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-111 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-127 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-86 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-93 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-85 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-806 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '34') () 0 ()
-())
-51 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-116 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-294 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-293 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-117 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-292 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-295 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-308 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-306 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-299 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-307 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-118 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-297 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-298 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-296 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-300 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-301 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-96 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-97 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-107 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-106 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-105 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-108 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-112 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-95 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-102 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-302 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-103 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-99 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-289 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-100 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-288 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-98 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-110 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-104 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-285 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-286 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-101 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-291 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-290 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-303 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-284 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-305 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-281 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-304 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-109 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-94 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-126 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-282 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-90 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-115 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-88 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-114 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-92 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-91 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-79 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-77 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-73 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-82 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-72 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-80 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-83 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-75 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-74 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-81 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-807 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '14') () 0 ()
-())
-808 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-76 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-57 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-809 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-810 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((811 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-84 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-71 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-812 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-813 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((814 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-78 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-815 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-89 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-816 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-817 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-818 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-819 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-820 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-53 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-55 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-278 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-147 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-821 'h5aget_name_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 822 0 (823
-824 825 826 827 828 829 830 831) () 0 () ())
-478 'obj_id' '' 477 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-479 'name' '' 477 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-481 'hdferr' '' 477 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-348 'name' '' 346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-347 'loc_id' '' 346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-349 'type_id' '' 346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-351 'attr_id' '' 346 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-352 'hdferr' '' 346 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-350 'space_id' '' 346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-672 'memtype_id' '' 670 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-354 'aapl_id' '' 346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-744 'memtype_id' '' 742 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-353 'acpl_id' '' 346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-717 'hdferr' '' 712 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-716 'dims' '' 712 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-701 'attr_id' '' 700 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-787 'index' '' 785 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-789 'hdferr' '' 785 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-680 'dims' '' 676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-679 'buf' '' 676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-678 'memtype_id' '' 676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-788 'attr_id' '' 785 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-480 'attr_id' '' 477 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-715 'buf' '' 712 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 716 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-714 'memtype_id' '' 712 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-666 'memtype_id' '' 664 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-741 'hdferr' '' 736 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-740 'dims' '' 736 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-739 'buf' '' 736 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 740 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-738 'memtype_id' '' 736 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-660 'memtype_id' '' 658 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-786 'obj_id' '' 785 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-697 'buf' '' 694 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 698 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-698 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 698 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-662 'dims' '' 658 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-663 'hdferr' '' 658 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-661 'buf' '' 658 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 662 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-662 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-737 'attr_id' '' 736 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-698 'dims' '' 694 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-659 'attr_id' '' 658 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-668 'dims' '' 664 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-669 'hdferr' '' 664 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-699 'hdferr' '' 694 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-696 'memtype_id' '' 694 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-665 'attr_id' '' 664 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-689 'attr_id' '' 688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-691 'buf' '' 688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 692 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-692 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 692 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 692 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-692 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-692 'dims' '' 688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-667 'buf' '' 664 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 668 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-668 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 668 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 668 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-686 'dims' '' 682 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-683 'attr_id' '' 682 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-690 'memtype_id' '' 688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-687 'hdferr' '' 682 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-685 'buf' '' 682 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 686 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-686 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 686 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 686 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-686 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 686 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-693 'hdferr' '' 688 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-695 'attr_id' '' 694 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-673 'buf' '' 670 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 674 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-674 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 674 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 674 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-674 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 674 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 674 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-675 'hdferr' '' 670 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-674 'dims' '' 670 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-746 'dims' '' 742 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-745 'buf' '' 742 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ()) 0
-0 () () 0 () ())
-757 'buf' '' 754 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-671 'attr_id' '' 670 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-629 'attr_id' '' 628 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-631 'buf' '' 628 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 632 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-632 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-747 'hdferr' '' 742 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-769 'buf' '' 766 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 770 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-768 'memtype_id' '' 766 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-771 'hdferr' '' 766 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-770 'dims' '' 766 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-684 'memtype_id' '' 682 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-677 'attr_id' '' 676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-704 'dims' '' 700 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-734 'dims' '' 730 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-709 'buf' '' 706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 710 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 710 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 710 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-705 'hdferr' '' 700 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-703 'buf' '' 700 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 704 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 704 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-713 'attr_id' '' 712 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-710 'dims' '' 706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-733 'buf' '' 730 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 734 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 734 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 734 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 734 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-732 'memtype_id' '' 730 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-702 'memtype_id' '' 700 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-711 'hdferr' '' 706 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-707 'attr_id' '' 706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-708 'memtype_id' '' 706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-735 'hdferr' '' 730 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-728 'dims' '' 724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-727 'buf' '' 724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 728 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 728 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 728 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 728 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-728 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-722 'dims' '' 718 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-721 'buf' '' 718 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 722 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 722 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 722 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 722 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-722 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 722 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-723 'hdferr' '' 718 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-729 'hdferr' '' 724 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-726 'memtype_id' '' 724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-753 'hdferr' '' 748 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-755 'attr_id' '' 754 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-720 'memtype_id' '' 718 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-725 'attr_id' '' 724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-731 'attr_id' '' 730 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-743 'attr_id' '' 742 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-750 'memtype_id' '' 748 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-719 'attr_id' '' 718 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-758 'dims' '' 754 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-752 'dims' '' 748 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-599 'buf' '' 596 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-749 'attr_id' '' 748 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-598 'memtype_id' '' 596 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-774 'memtype_id' '' 772 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-574 'memtype_id' '' 572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-776 'dims' '' 772 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-777 'hdferr' '' 772 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-756 'memtype_id' '' 754 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-775 'buf' '' 772 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 776 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-632 'dims' '' 628 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-600 'dims' '' 596 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-633 'hdferr' '' 628 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-654 'memtype_id' '' 652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-762 'memtype_id' '' 760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-759 'hdferr' '' 754 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-751 'buf' '' 748 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 752 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 752 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 752 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 752 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-752 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 752 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 752 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-681 'hdferr' '' 676 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-765 'hdferr' '' 760 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-764 'dims' '' 760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-655 'buf' '' 652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 656 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-656 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 656 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 656 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-630 'memtype_id' '' 628 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-763 'buf' '' 760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 764 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-764 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 764 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-657 'hdferr' '' 652 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-761 'attr_id' '' 760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-647 'attr_id' '' 646 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-656 'dims' '' 652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-650 'dims' '' 646 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-653 'attr_id' '' 652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-643 'buf' '' 640 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 644 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-644 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 644 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 644 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-644 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 644 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-645 'hdferr' '' 640 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-641 'attr_id' '' 640 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-644 'dims' '' 640 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-638 'dims' '' 634 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-642 'memtype_id' '' 640 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-636 'memtype_id' '' 634 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-639 'hdferr' '' 634 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-637 'buf' '' 634 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 638 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-638 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 638 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 638 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-638 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 638 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 638 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-651 'hdferr' '' 646 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-649 'buf' '' 646 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 650 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-650 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 650 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 650 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-650 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-635 'attr_id' '' 634 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-571 'hdferr' '' 566 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-568 'memtype_id' '' 566 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-515 'buf' '' 512 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 516 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-516 'dims' '' 512 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-514 'memtype_id' '' 512 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-569 'buf' '' 566 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-570 'dims' '' 566 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-648 'memtype_id' '' 646 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-525 'attr_id' '' 524 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-567 'attr_id' '' 566 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-517 'hdferr' '' 512 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-527 'buf' '' 524 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 528 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-528 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-529 'hdferr' '' 524 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-564 'dims' '' 560 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-521 'buf' '' 518 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 522 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-522 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 522 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-561 'attr_id' '' 560 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-528 'dims' '' 524 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-523 'hdferr' '' 518 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-526 'memtype_id' '' 524 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-563 'buf' '' 560 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 564 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-564 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 564 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 564 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-562 'memtype_id' '' 560 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-520 'memtype_id' '' 518 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-565 'hdferr' '' 560 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-519 'attr_id' '' 518 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-550 'memtype_id' '' 548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-553 'hdferr' '' 548 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-552 'dims' '' 548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-551 'buf' '' 548 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 552 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-552 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 552 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 552 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-552 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-558 'dims' '' 554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-559 'hdferr' '' 554 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-549 'attr_id' '' 548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-557 'buf' '' 554 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 558 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-558 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 558 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 558 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-558 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 558 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-556 'memtype_id' '' 554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-779 'attr_id' '' 778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-780 'memtype_id' '' 778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-783 'hdferr' '' 778 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-782 'dims' '' 778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-522 'dims' '' 518 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-513 'attr_id' '' 512 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-781 'buf' '' 778 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 782 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-782 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 782 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 782 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-782 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 782 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 782 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-601 'hdferr' '' 596 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-576 'dims' '' 572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-575 'buf' '' 572 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 576 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-576 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-597 'attr_id' '' 596 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-585 'attr_id' '' 584 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-773 'attr_id' '' 772 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-580 'memtype_id' '' 578 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-586 'memtype_id' '' 584 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-573 'attr_id' '' 572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-589 'hdferr' '' 584 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-588 'dims' '' 584 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-624 'memtype_id' '' 622 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-587 'buf' '' 584 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 588 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-588 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 588 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-583 'hdferr' '' 578 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-581 'buf' '' 578 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 582 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-582 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 582 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 582 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-582 'dims' '' 578 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-627 'hdferr' '' 622 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-623 'attr_id' '' 622 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-626 'dims' '' 622 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-625 'buf' '' 622 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 626 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-626 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 626 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 626 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-626 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-579 'attr_id' '' 578 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-591 'attr_id' '' 590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-595 'hdferr' '' 590 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-593 'buf' '' 590 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 594 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-594 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 594 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 594 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-594 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 594 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-592 'memtype_id' '' 590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-594 'dims' '' 590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-619 'buf' '' 616 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 620 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-620 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 620 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 620 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-620 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 620 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 620 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-621 'hdferr' '' 616 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-620 'dims' '' 616 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-533 'buf' '' 530 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-617 'attr_id' '' 616 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-535 'hdferr' '' 530 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-531 'attr_id' '' 530 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-618 'memtype_id' '' 616 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-532 'memtype_id' '' 530 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-490 'memtype_id' '' 488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-534 'dims' '' 530 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-577 'hdferr' '' 572 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-555 'attr_id' '' 554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-767 'attr_id' '' 766 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-510 'dims' '' 506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-511 'hdferr' '' 506 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-509 'buf' '' 506 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 510 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-492 'dims' '' 488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-502 'memtype_id' '' 500 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-507 'attr_id' '' 506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-483 'attr_id' '' 482 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-489 'attr_id' '' 488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-487 'hdferr' '' 482 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-486 'dims' '' 482 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-493 'hdferr' '' 488 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-491 'buf' '' 488 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 492 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-492 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-504 'dims' '' 500 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-495 'attr_id' '' 494 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-505 'hdferr' '' 500 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-484 'memtype_id' '' 482 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-485 'buf' '' 482 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 486 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-486 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 486 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-503 'buf' '' 500 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 504 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-504 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 504 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 504 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-508 'memtype_id' '' 506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-499 'hdferr' '' 494 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-498 'dims' '' 494 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-501 'attr_id' '' 500 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-546 'dims' '' 542 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-544 'memtype_id' '' 542 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-496 'memtype_id' '' 494 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-547 'hdferr' '' 542 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-545 'buf' '' 542 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 546 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-546 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 546 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 546 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-546 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 546 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-540 'dims' '' 536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-543 'attr_id' '' 542 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-538 'memtype_id' '' 536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-541 'hdferr' '' 536 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-539 'buf' '' 536 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 540 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-540 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 540 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 540 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-540 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 540 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 540 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-537 'attr_id' '' 536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-441 'attr_id' '' 440 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-438 'hdferr' '' 435 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-436 'attr_id' '' 435 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-824 'obj_name' '' 822 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-826 'order' '' 822 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-827 'n' '' 822 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-828 'name' '' 822 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-831 'lapl_id' '' 822 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-830 'size' '' 822 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-443 'hdferr' '' 440 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-442 'type_id' '' 440 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-430 'attr_id' '' 429 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-829 'hdferr' '' 822 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-426 'attr_num' '' 424 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-437 'space_id' '' 435 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-425 'obj_id' '' 424 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-825 'idx_type' '' 822 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-427 'hdferr' '' 424 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-359 'hdferr' '' 356 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-358 'name' '' 356 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-432 'buf' '' 429 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-433 'hdferr' '' 429 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-377 'attr_id' '' 376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-431 'size' '' 429 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-446 'attr_id' '' 445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-447 'size' '' 445 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-342 'n' '' 337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-448 'hdferr' '' 445 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-378 'hdferr' '' 376 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-339 'obj_name' '' 337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-338 'loc_id' '' 337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-341 'order' '' 337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-340 'idx_type' '' 337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-381 'attr_id' '' 380 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-604 'loc_id' '' 603 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-382 'creation_prop_id' '' 380 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-383 'hdferr' '' 380 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-605 'obj_name' '' 603 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-344 'lapl_id' '' 337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-343 'hdferr' '' 337 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-607 'new_attr_name' '' 603 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-608 'hdferr' '' 603 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-609 'lapl_id' '' 603 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-606 'old_attr_name' '' 603 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-357 'obj_id' '' 356 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-823 'loc_id' '' 822 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-451 'obj_id' '' 450 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-453 'attr_id' '' 450 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-455 'aapl_id' '' 450 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-362 'loc_id' '' 361 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-363 'obj_name' '' 361 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-364 'attr_name' '' 361 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-469 'idx_type' '' 466 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-365 'hdferr' '' 361 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-468 'obj_name' '' 466 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-366 'lapl_id' '' 361 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-454 'hdferr' '' 450 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-470 'order' '' 466 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-471 'n' '' 466 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-472 'attr_id' '' 466 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-475 'lapl_id' '' 466 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-474 'aapl_id' '' 466 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-405 'attr_id' '' 404 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-473 'hdferr' '' 466 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-467 'loc_id' '' 466 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-408 'cset' '' 404 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-409 'data_size' '' 404 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-452 'attr_name' '' 450 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-406 'f_corder_valid' '' 404 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-407 'corder' '' 404 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-391 'f_corder_valid' '' 385 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-390 'n' '' 385 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-393 'cset' '' 385 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-394 'data_size' '' 385 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-392 'corder' '' 385 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-389 'order' '' 385 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-396 'lapl_id' '' 385 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-387 'obj_name' '' 385 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-414 'obj_name' '' 412 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-388 'idx_type' '' 385 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-386 'loc_id' '' 385 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-395 'hdferr' '' 385 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-418 'cset' '' 412 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-419 'data_size' '' 412 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-420 'hdferr' '' 412 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-417 'corder' '' 412 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-416 'f_corder_valid' '' 412 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-421 'lapl_id' '' 412 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-415 'attr_name' '' 412 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-326 'loc_id' '' 325 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-328 'attr_name' '' 325 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-330 'space_id' '' 325 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-329 'type_id' '' 325 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-332 'hdferr' '' 325 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-331 'attr' '' 325 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-327 'obj_name' '' 325 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-413 'loc_id' '' 412 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-334 'aapl_id' '' 325 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-333 'acpl_id' '' 325 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-401 'attr_exists' '' 398 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-400 'attr_name' '' 398 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-402 'hdferr' '' 398 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-369 'loc_id' '' 368 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-374 'lapl_id' '' 368 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-373 'hdferr' '' 368 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-399 'obj_id' '' 398 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-335 'lapl_id' '' 325 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-410 'hdferr' '' 404 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-370 'obj_name' '' 368 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-371 'attr_name' '' 368 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-372 'attr_exists' '' 368 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-459 'obj_name' '' 457 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-462 'hdferr' '' 457 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-464 'lapl_id' '' 457 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-458 'loc_id' '' 457 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-463 'aapl_id' '' 457 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-461 'attr_id' '' 457 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-614 'new_attr_name' '' 611 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-615 'hdferr' '' 611 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-612 'loc_id' '' 611 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-613 'old_attr_name' '' 611 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-460 'attr_name' '' 457 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-497 'buf' '' 494 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 498 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-498 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 498 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 498 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-498 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-)
-
-('h5aget_name_by_idx_f' 0 821 'floating_types_len' 0 422 '__convert_i4_i8'
-0 309 'floating_types' 0 68 'h5aget_info_by_name_f' 0 411 'h5aexists_f'
-0 397 'h5_iter_unknown_f' 0 252 'fortran_integer_1' 0 321 'fortran_double'
-0 311 'fortran_integer' 0 310 'fortran_real_4' 0 320 'fortran_integer_2'
-0 317 'fortran_real' 0 316 'fortran_integer_4' 0 313 'fortran_integer_8'
-0 312 'fortran_real_12' 0 315 'fortran_real_16' 0 314 'h5_integer_kind'
-0 319 'h5_index_crt_order_f' 0 254 'fortran_real_8' 0 318 'h5_index_n_f'
-0 253 'h5_index_unknown_f' 0 256 'h5_index_name_f' 0 255 'h5_iter_dec_f'
-0 250 'h5_iter_native_f' 0 249 'h5_iter_n_f' 0 248 'h5_iter_inc_f' 0 251
-'h5aclose_f' 0 375 'h5_szip_ec_om_f' 0 70 'h5_real_kind' 0 322 'h5a' 0
-323 'h5_szip_nn_om_f' 0 69 'h5aexists_by_name_f' 0 367
-'h5adelete_by_name_f' 0 360 'h5acreate_f' 0 345 'h5acreate_by_name_f' 0
-324 'h5adelete_by_idx_f' 0 336 'h5adelete_f' 0 355 'h5aget_info_by_idx_f'
-0 384 'h5aget_create_plist_f' 0 379 'h5aget_info_f' 0 403
-'h5p_string_create_f' 0 147 'h5g_storage_type_dense_f' 0 236
-'h5d_fill_time_error_f' 0 223 'h5aopen_idx_f' 0 784 'h5aopen_by_idx_f' 0
-465 'h5aget_storage_size_f' 0 444 'h5aget_space_f' 0 434 'h5aget_name_f'
-0 428 'h5aget_num_attrs_f' 0 423 'h5aget_type_f' 0 439 'h5aopen_by_name_f'
-0 456 'h5aopen_f' 0 449 'h5aread_integer_7' 0 18 'h5aread_integer_4' 0
-21 'h5aread_char_6' 0 11 'h5aread_char_1' 0 16 'h5aopen_name_f' 0 476
-'h5aread_char_4' 0 13 'h5aread_char_2' 0 15 'h5aread_char_3' 0 14
-'h5aread_char_5' 0 12 'h5aread_char_7' 0 10 'h5aread_char_scalar' 0 17
-'h5aread_integer_2' 0 23 'h5aread_integer_1' 0 24 'h5aread_integer_3' 0
-22 'h5aread_integer_6' 0 19 'h5aread_integer_5' 0 20 'h5aread_real_1' 0
-8 'h5aread_integer_scalar' 0 25 'h5awrite_char_1' 0 40 'h5aread_real_5'
-0 4 'h5aread_real_3' 0 6 'h5aread_real_2' 0 7 'h5aread_real_4' 0 5
-'h5aread_real_7' 0 2 'h5aread_real_6' 0 3 'h5arename_f' 0 610
-'h5arename_by_name_f' 0 602 'h5aread_real_scalar' 0 9 'h5awrite_char_3'
-0 38 'h5awrite_char_2' 0 39 'h5d_alloc_time_early_f' 0 230
-'h5d_alloc_time_default_f' 0 231 'h5awrite_char_scalar' 0 41
-'h5awrite_char_4' 0 37 'h5awrite_char_5' 0 36 'h5awrite_char_6' 0 35
-'h5awrite_char_7' 0 34 'h5awrite_real_7' 0 26 'h5awrite_integer_1' 0 48
-'h5awrite_real_4' 0 29 'h5awrite_real_1' 0 32 'h5awrite_integer_3' 0 46
-'h5awrite_integer_2' 0 47 'h5awrite_integer_5' 0 44 'h5awrite_integer_4'
-0 45 'h5awrite_integer_6' 0 43 'h5awrite_integer_scalar' 0 49
-'h5awrite_integer_7' 0 42 'h5awrite_real_3' 0 30 'h5awrite_real_2' 0 31
-'h5awrite_real_5' 0 28 'h5awrite_real_6' 0 27 'h5awrite_real_scalar' 0
-33 'h5d_contiguous_f' 0 234 'h5d_compact_f' 0 235 'h5d_alloc_time_late_f'
-0 229 'h5d_alloc_time_error_f' 0 232 'h5d_alloc_time_incr_f' 0 228
-'h5d_chunked_f' 0 233 'h5d_chunk_cache_nslots_dflt_f' 0 216
-'h5d_chunk_cache_nbytes_dflt_f' 0 215 'h5d_chunk_cache_w0_dflt_f' 0 214
-'h5d_fill_time_alloc_f' 0 222 'h5f_close_weak_f' 0 266
-'h5d_fill_value_user_defined_f' 0 217 'h5d_fill_time_never_f' 0 221
-'h5d_fill_value_error_f' 0 220 'h5d_fill_value_default_f' 0 218
-'h5d_fill_value_undefined_f' 0 219 'h5d_space_sts_not_allocated_f' 0 226
-'h5d_space_sts_error_f' 0 227 'h5d_flags_len' 0 790 'h5d_flags' 0 59
-'h5d_space_sts_allocated_f' 0 224 'h5f_close_default_f' 0 267
-'h5f_acc_trunc_f' 0 272 'h5f_acc_rdonly_f' 0 273 'h5f_acc_debug_f' 0 270
-'h5d_space_sts_part_allocated_f' 0 225 'h5f_acc_excl_f' 0 271
-'h5f_acc_rdwr_f' 0 274 'h5f_close_semi_f' 0 265 'h5f_close_strong_f' 0
-264 'h5fd_mpio_independent_f' 0 213 'h5fd_mem_default_f' 0 210
-'h5fd_hid_flags_len' 0 793 'h5fd_core_f' 0 202 'h5f_obj_file_f' 0 263
-'h5f_libver_latest_f' 0 257 'h5f_flags' 0 67 'h5f_flags_len' 0 791
-'h5f_libver_earliest_f' 0 258 'h5f_obj_datatype_f' 0 260
-'h5f_obj_dataset_f' 0 262 'h5f_obj_all_f' 0 259 'h5f_scope_global_f' 0
-268 'h5f_obj_group_f' 0 261 'h5f_scope_local_f' 0 269 'h5fd_hid_flags' 0
-60 'h5fd_flags_len' 0 792 'h5fd_family_f' 0 201 'h5fd_flags' 0 61
-'h5fd_log_f' 0 200 'h5fd_mem_btree_f' 0 208 'h5fd_mem_ntypes_f' 0 203
-'h5fd_mem_nolist_f' 0 211 'h5fd_mem_draw_f' 0 207 'h5fd_mem_lheap_f' 0
-205 'h5fd_mem_gheap_f' 0 206 'h5fd_mem_ohdr_f' 0 204 'h5fd_mpio_f' 0 199
-'h5fd_mem_super_f' 0 209 'h5fd_mpio_collective_f' 0 212 'h5fd_stdio_f' 0
-196 'h5fd_sec2_f' 0 197 'h5fd_multi_f' 0 198 'h5g_link_hard_f' 0 241
-'h5g_dataset_f' 0 245 'h5fortran_types' 0 794 'h5g_link_error_f' 0 242
-'h5g_group_f' 0 246 'h5g_flags_len' 0 795 'h5g_flags' 0 62 'h5g_link_f'
-0 243 'h5g_link_soft_f' 0 240 'h5g_storage_type_compact_f' 0 237
-'h5o_hdr_attr_crt_order_track_f' 0 167 'h5o_copy_without_attr_flag_f' 0
-178 'h5i_datatype_f' 0 193 'h5g_type_f' 0 244 'h5g_storage_type_unknown_f'
-0 239 'h5g_storage_type_symbol_table_f' 0 238 'h5generic_flags_len' 0
-797 'h5g_unknown_f' 0 247 'h5generic_flags' 0 63 'h5i_dataset_f' 0 191
-'h5global' 0 796 'h5i_attr_f' 0 190 'h5i_badid_f' 0 189 'h5i_dataspace_f'
-0 192 'h5l_link_class_t_vers_f' 0 183 'h5i_file_f' 0 195 'h5i_flags_len'
-0 799 'h5i_flags' 0 54 'h5i_group_f' 0 194 'h5l_flags' 0 50
-'h5l_flags_len' 0 798 'h5o_copy_shallow_hierarchy_f' 0 182
-'h5o_copy_expand_ext_link_f' 0 180 'h5l_same_loc_f' 0 184
-'h5l_type_external_f' 0 185 'h5l_type_error_f' 0 188 'h5o_copy_all_f' 0
-176 'h5lib_flags_len' 0 800 'h5l_type_soft_f' 0 186 'h5l_type_hard_f' 0
-187 'h5lib_flags' 0 65 'h5o_copy_expand_reference_f' 0 179
-'h5o_copy_expand_soft_link_f' 0 181 'h5o_copy_preserve_null_flag_f' 0
-177 'h5o_hdr_all_flags_f' 0 163 'h5o_flags' 0 64 'h5o_flags_len' 0 801
-'h5o_hdr_attr_crt_order_index_f' 0 166 'h5p_file_mount_f' 0 156
-'h5p_default_f' 0 155 'h5o_shmesg_pline_flag_f' 0 171
-'h5o_shmesg_max_nindexes_f' 0 162 'h5o_shmesg_all_flag_f' 0 169
-'h5o_hdr_chunk0_size_f' 0 168 'h5o_hdr_attr_store_phase_cha_f' 0 165
-'h5o_hdr_store_times_f' 0 164 'h5o_shmesg_attr_flag_f' 0 170
-'h5o_shmesg_max_list_size_f' 0 161 'h5o_shmesg_fill_flag_f' 0 172
-'h5o_shmesg_dtype_flag_f' 0 173 'h5o_shmesg_none_flag_f' 0 175
-'h5p_dataset_xfer_f' 0 157 'h5p_crt_order_indexed_f' 0 142
-'h5o_shmesg_sdspace_flag_f' 0 174 'h5p_attribute_create_f' 0 146
-'h5p_crt_order_tracked_f' 0 141 'h5p_dataset_create_f' 0 158
-'h5p_dataset_access_f' 0 152 'h5p_datatype_access_f' 0 148
-'h5p_datatype_create_f' 0 149 'h5p_file_access_f' 0 159
-'h5p_file_create_f' 0 160 'h5p_flags_len' 0 803 'h5p_flags_int_len' 0
-802 'h5p_flags_int' 0 52 'h5p_flags' 0 66 'h5p_link_access_f' 0 143
-'h5p_group_create_f' 0 151 'h5p_group_access_f' 0 150
-'h5p_object_create_f' 0 153 'h5p_object_copy_f' 0 145 'h5p_link_create_f'
-0 144 'h5p_root_f' 0 154 'h5t_std_u16le' 0 280 'h5s_select_append_f' 0
-126 'h5s_sel_hyperslabs_f' 0 120 'h5s_all_f' 0 132 'h5r_dataset_region_f'
-0 139 'h5r_flags' 0 56 'h5r_flags_len' 0 804 'h5r_object_f' 0 140
-'h5s_flags_len' 0 805 'h5s_flags' 0 58 'h5s_sel_all_f' 0 119
-'h5s_scalar_f' 0 138 'h5s_null_f' 0 136 'h5s_sel_error_f' 0 123
-'h5s_sel_none_f' 0 122 'h5s_select_and_f' 0 130 'h5s_sel_points_f' 0 121
-'h5t_cset_ascii_f' 0 94 'h5s_select_nota_f' 0 127 'h5s_select_invalid_f'
-0 124 'h5s_select_noop_f' 0 131 'h5t_compound_f' 0 111 'h5s_simple_f' 0
-137 'h5s_select_prepend_f' 0 125 'h5s_select_notb_f' 0 128
-'h5s_select_or_f' 0 134 'h5s_select_xor_f' 0 129 'h5s_select_set_f' 0
-135 'h5s_unlimited_f' 0 133 'h5t_array_f' 0 87 'h5t_bitfield_f' 0 113
-'h5t_enum_f' 0 109 'h5t_dir_descend_f' 0 85 'h5t_cset_utf8_f' 0 93
-'h5t_dir_ascend_f' 0 86 'h5t_std_ref_obj' 0 304 'h5t_native_character' 0
-305 'h5t_ieee_f32be' 0 295 'h5t_float_f' 0 116 'h5t_flags' 0 51
-'h5t_flags_len' 0 806 'h5t_ieee_f64le' 0 292 'h5t_ieee_f64be' 0 293
-'h5t_ieee_f32le' 0 294 'h5t_integer_f' 0 117 'h5t_std_i64le' 0 284
-'h5t_pad_error_f' 0 101 'h5t_native_integer_1' 0 302 'h5t_native_double'
-0 306 'h5t_native_integer' 0 308 'h5t_pad_background_f' 0 102
-'h5t_norm_none_f' 0 95 'h5t_norm_implied_f' 0 97 'h5t_native_integer_2'
-0 301 'h5t_native_integer_4' 0 300 'h5t_native_real_16' 0 296
-'h5t_native_real' 0 307 'h5t_native_integer_8' 0 299 'h5t_native_real_4'
-0 298 'h5t_native_real_8' 0 297 'h5t_no_class_f' 0 118 'h5t_norm_msbset_f'
-0 96 'h5t_opaque_f' 0 112 'h5t_order_le_f' 0 108 'h5t_order_be_f' 0 107
-'h5t_order_none_f' 0 105 'h5t_order_vax_f' 0 106 'h5t_std_i32be' 0 287
-'h5t_pad_zero_f' 0 104 'h5t_pad_one_f' 0 103 'h5t_reference_f' 0 110
-'h5t_sgn_error_f' 0 98 'h5t_sgn_2_f' 0 99 'h5t_std_i16le' 0 288
-'h5t_sgn_none_f' 0 100 'h5t_std_i16be' 0 289 'h5t_std_i32le' 0 286
-'h5t_std_i64be' 0 285 'h5t_std_ref_dsetreg' 0 303 'h5t_std_i8le' 0 290
-'h5t_std_i8be' 0 291 'h5t_std_u16be' 0 281 'h5t_std_u32le' 0 278
-'h5t_std_u32be' 0 279 'integer_types' 0 55 'h5t_str_error_f' 0 89
-'h5t_std_u8be' 0 283 'h5t_std_u64le' 0 276 'h5t_std_u64be' 0 277
-'h5t_std_u8le' 0 282 'hssize_t' 0 815 'h5z_disable_edc_f' 0 78
-'h5t_str_nullpad_f' 0 91 'h5t_str_nullterm_f' 0 92 'h5t_string_f' 0 114
-'h5t_string' 0 275 'h5t_str_spacepad_f' 0 90 'h5t_vlen_f' 0 88
-'h5t_time_f' 0 115 'hobj_ref_t_f' 0 813 'h5z_filter_all_f' 0 71
-'h5z_enable_edc_f' 0 77 'h5z_error_edc_f' 0 79 'h5z_filter_error_f' 0 84
-'h5z_filter_decode_enabled_f' 0 72 'h5z_filter_deflate_f' 0 82
-'h5z_filter_encode_enabled_f' 0 73 'hdset_reg_ref_t_f' 0 810 'h5z_flags'
-0 57 'h5z_filter_shuffle_f' 0 81 'h5z_filter_none_f' 0 83
-'h5z_filter_fletcher32_f' 0 80 'h5z_flag_optional_f' 0 74
-'h5z_filter_szip_f' 0 75 'h5z_no_edc_f' 0 76 'h5z_flags_len' 0 807
-'haddr_t' 0 808 'hid_t' 0 809 'hsize_t' 0 812 'predef_types' 0 53
-'object_namelen_default_f' 0 817 'integer_types_len' 0 816
-'ref_reg_buf_len' 0 820 'predef_types_len' 0 818 'size_t' 0 819)
diff --git a/interfaces/ext/hdf5/h5d.mod b/interfaces/ext/hdf5/h5d.mod
deleted file mode 100644
index c93e0e7..0000000
--- a/interfaces/ext/hdf5/h5d.mod
+++ /dev/null
@@ -1,3040 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5Dff.f90 on Mon Feb 14 14:35:48 2011
-If you edit this, you'll get what you deserve.
-
-(() () () () () () ()
-() () () () () () () () () () () () () ())
-
-()
-
-(('h5dextend_f' '' 2) ('h5dfill_f' '' 3 4 5) ('h5dread_f' '' 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) (
-'h5dread_vl_f' '' 32 33 34) ('h5dwrite_f' '' 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) ('h5dwrite_vl_f' ''
-61 62 63))
-
-(('h5l_flags' 64 0) ('h5t_flags' 65 0) ('h5p_flags_int' 66 0) (
-'predefined_types' 67 0) ('h5i_flags' 68 0) ('integer_types' 69 0) (
-'h5r_flags' 70 0) ('h5z_flags' 71 0) ('h5s_flags' 72 0) ('h5d_flags' 73
-0) ('h5fd_hid_flags' 74 0) ('h5fd_flags' 75 0) ('h5g_flags' 76 0) (
-'h5generic_flags' 77 0) ('h5o_flags' 78 0) ('h5lib_flags' 79 0) (
-'h5p_flags' 80 0) ('h5f_flags' 81 0) ('floating_types' 82 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 79 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 83 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 79 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 84 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 71 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 85 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 71 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 86 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 71 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 87 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 71 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 88 ())) ('h5global.eq.6' (VARIABLE (INTEGER 4
-()) 0 71 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 89 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 71 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 90 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 71 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 91 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 71 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 92 ())) ('h5global.eq.10' (VARIABLE (INTEGER 4
-()) 0 71 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 93 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 71 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 94 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 71 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 95 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 71
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.13'
-(VARIABLE (INTEGER 4 ()) 0 96 ())) ('h5global.eq.14' (VARIABLE (INTEGER
-4 ()) 0 71 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 97 ())) ('h5global.eq.15' (
-VARIABLE (INTEGER 4 ()) 0 71 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 98 ())) (
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '34') 1)))) 'h5global.eq.16' (VARIABLE (
-INTEGER 4 ()) 0 99 ())) ('h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 65
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '33') 1)))) 'h5global.eq.17'
-(VARIABLE (INTEGER 4 ()) 0 100 ())) ('h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '32') 1))))
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 101 ())) ('h5global.eq.19' (
-VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '31') 1)))) 'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 102 ())) (
-'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '30') 1)))) 'h5global.eq.20' (VARIABLE (
-INTEGER 4 ()) 0 103 ())) ('h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 65
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21'
-(VARIABLE (INTEGER 4 ()) 0 104 ())) ('h5global.eq.22' (VARIABLE (
-INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 105 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 106 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 107 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 65
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1)))) 'h5global.eq.25'
-(VARIABLE (INTEGER 4 ()) 0 108 ())) ('h5global.eq.26' (VARIABLE (
-INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '24') 1))))
-'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 109 ())) ('h5global.eq.27' (
-VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '23') 1)))) 'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 110 ())) (
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.28' (VARIABLE (
-INTEGER 4 ()) 0 111 ())) ('h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 65
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.29'
-(VARIABLE (INTEGER 4 ()) 0 112 ())) ('h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 113 ())) ('h5global.eq.31' (
-VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 114 ())) (
-'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.32' (VARIABLE (
-INTEGER 4 ()) 0 115 ())) ('h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 65
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33'
-(VARIABLE (INTEGER 4 ()) 0 116 ())) ('h5global.eq.34' (VARIABLE (
-INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 117 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 118 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 119 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 65
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.37'
-(VARIABLE (INTEGER 4 ()) 0 120 ())) ('h5global.eq.38' (VARIABLE (
-INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 121 ())) ('h5global.eq.39' (
-VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 122 ())) (
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.40' (VARIABLE (
-INTEGER 4 ()) 0 123 ())) ('h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 65
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.41'
-(VARIABLE (INTEGER 4 ()) 0 124 ())) ('h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 125 ())) ('h5global.eq.43' (
-VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 126 ())) (
-'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.44' (VARIABLE (
-INTEGER 4 ()) 0 127 ())) ('h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 65
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45'
-(VARIABLE (INTEGER 4 ()) 0 128 ())) ('h5global.eq.46' (VARIABLE (
-INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 129 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 130 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 65 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 131 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 65
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.49'
-(VARIABLE (INTEGER 4 ()) 0 132 ())) ('h5global.eq.50' (VARIABLE (
-INTEGER 4 ()) 0 72 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 133 ())) ('h5global.eq.51' (
-VARIABLE (INTEGER 4 ()) 0 72 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 134 ())) (
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 72 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.52' (VARIABLE (
-INTEGER 4 ()) 0 135 ())) ('h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 72
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.53'
-(VARIABLE (INTEGER 4 ()) 0 136 ())) ('h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 72 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 137 ())) ('h5global.eq.55' (
-VARIABLE (INTEGER 4 ()) 0 72 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 138 ())) (
-'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 72 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.56' (VARIABLE (
-INTEGER 4 ()) 0 139 ())) ('h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 72
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57'
-(VARIABLE (INTEGER 4 ()) 0 140 ())) ('h5global.eq.58' (VARIABLE (
-INTEGER 4 ()) 0 72 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 141 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 72 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 142 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 72 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 143 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 72
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.61'
-(VARIABLE (INTEGER 4 ()) 0 144 ())) ('h5global.eq.62' (VARIABLE (
-INTEGER 4 ()) 0 72 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 145 ())) ('h5global.eq.63' (
-VARIABLE (INTEGER 4 ()) 0 72 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 146 ())) (
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 72 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.64' (VARIABLE (
-INTEGER 4 ()) 0 147 ())) ('h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 72
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.65'
-(VARIABLE (INTEGER 4 ()) 0 148 ())) ('h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 72 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 149 ())) ('h5global.eq.67' (
-VARIABLE (INTEGER 4 ()) 0 72 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 150 ())) (
-'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 72 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.68' (VARIABLE (
-INTEGER 4 ()) 0 151 ())) ('h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 72
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69'
-(VARIABLE (INTEGER 4 ()) 0 152 ())) ('h5global.eq.70' (VARIABLE (
-INTEGER 4 ()) 0 70 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 153 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 70 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 154 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 66 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 155 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 66
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.73'
-(VARIABLE (INTEGER 4 ()) 0 156 ())) ('h5global.eq.74' (VARIABLE (
-INTEGER 4 ()) 0 80 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 157 ())) ('h5global.eq.75' (
-VARIABLE (INTEGER 4 ()) 0 80 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 158 ())) (
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 80 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.76' (VARIABLE (
-INTEGER 4 ()) 0 159 ())) ('h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 80
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.77'
-(VARIABLE (INTEGER 4 ()) 0 160 ())) ('h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 80 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 161 ())) ('h5global.eq.79' (
-VARIABLE (INTEGER 4 ()) 0 80 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 162 ())) (
-'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 80 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.80' (VARIABLE (
-INTEGER 4 ()) 0 163 ())) ('h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 80
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81'
-(VARIABLE (INTEGER 4 ()) 0 164 ())) ('h5global.eq.82' (VARIABLE (
-INTEGER 4 ()) 0 80 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 165 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 80 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 166 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 80 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 167 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 80
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.85'
-(VARIABLE (INTEGER 4 ()) 0 168 ())) ('h5global.eq.86' (VARIABLE (
-INTEGER 4 ()) 0 80 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 169 ())) ('h5global.eq.87' (
-VARIABLE (INTEGER 4 ()) 0 80 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 170 ())) (
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 80 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.88' (VARIABLE (
-INTEGER 4 ()) 0 171 ())) ('h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 80
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.89'
-(VARIABLE (INTEGER 4 ()) 0 172 ())) ('h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 80 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 173 ())) ('h5global.eq.91' (
-VARIABLE (INTEGER 4 ()) 0 80 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 174 ())) (
-'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 78 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.92' (VARIABLE (
-INTEGER 4 ()) 0 175 ())) ('h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 78
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93'
-(VARIABLE (INTEGER 4 ()) 0 176 ())) ('h5global.eq.94' (VARIABLE (
-INTEGER 4 ()) 0 78 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 177 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 78 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 178 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 78 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 179 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 78
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.97'
-(VARIABLE (INTEGER 4 ()) 0 180 ())) ('h5global.eq.98' (VARIABLE (
-INTEGER 4 ()) 0 78 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 181 ())) ('h5global.eq.99' (
-VARIABLE (INTEGER 4 ()) 0 78 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 182 ())) (
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 78 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.100' (VARIABLE (
-INTEGER 4 ()) 0 183 ())) ('h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0
-78 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 184 ())) ('h5global.eq.102'
-(VARIABLE (INTEGER 4 ()) 0 78 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 185 ())) (
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 78 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.103' (VARIABLE (
-INTEGER 4 ()) 0 186 ())) ('h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0
-78 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 187 ())) ('h5global.eq.105'
-(VARIABLE (INTEGER 4 ()) 0 78 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ())) (
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 78 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.106' (VARIABLE (
-INTEGER 4 ()) 0 189 ())) ('h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0
-78 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 190 ())) ('h5global.eq.108'
-(VARIABLE (INTEGER 4 ()) 0 78 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 191 ())) (
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 78 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.109' (VARIABLE (
-INTEGER 4 ()) 0 192 ())) ('h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0
-78 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 193 ())) ('h5global.eq.111'
-(VARIABLE (INTEGER 4 ()) 0 78 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 194 ())) (
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 78 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.112' (VARIABLE (
-INTEGER 4 ()) 0 195 ())) ('h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0
-78 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 196 ())) ('h5global.eq.114'
-(VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 197 ())) (
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.115' (VARIABLE (
-INTEGER 4 ()) 0 198 ())) ('h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0
-64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.117'
-(VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 200 ())) (
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 64 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.118' (VARIABLE (
-INTEGER 4 ()) 0 201 ())) ('h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0
-64 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 202 ())) ('h5global.eq.120'
-(VARIABLE (INTEGER 4 ()) 0 68 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 203 ())) (
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 68 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.121' (VARIABLE (
-INTEGER 4 ()) 0 204 ())) ('h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0
-68 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 205 ())) ('h5global.eq.123'
-(VARIABLE (INTEGER 4 ()) 0 68 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 206 ())) (
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 68 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.124' (VARIABLE (
-INTEGER 4 ()) 0 207 ())) ('h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0
-68 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.126'
-(VARIABLE (INTEGER 4 ()) 0 68 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 74 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.127' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0
-74 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.129'
-(VARIABLE (INTEGER 4 ()) 0 74 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 74 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.130' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0
-74 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.132'
-(VARIABLE (INTEGER 4 ()) 0 74 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 74 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.133' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0
-75 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.135'
-(VARIABLE (INTEGER 4 ()) 0 75 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 75 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.136' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0
-75 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.138'
-(VARIABLE (INTEGER 4 ()) 0 75 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 75 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.139' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0
-75 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.141'
-(VARIABLE (INTEGER 4 ()) 0 75 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 75 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.142' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0
-75 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.144'
-(VARIABLE (INTEGER 4 ()) 0 75 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 73 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.145' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0
-73 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1))))
-'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.147'
-(VARIABLE (INTEGER 4 ()) 0 73 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 73 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.148' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0
-73 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.150'
-(VARIABLE (INTEGER 4 ()) 0 73 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 73 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.151' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0
-73 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.153'
-(VARIABLE (INTEGER 4 ()) 0 73 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 73 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.154' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0
-73 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.156'
-(VARIABLE (INTEGER 4 ()) 0 73 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 73 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.157' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0
-73 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.159'
-(VARIABLE (INTEGER 4 ()) 0 73 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 73 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.160' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0
-73 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.162'
-(VARIABLE (INTEGER 4 ()) 0 73 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 73 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.163' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0
-73 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.165'
-(VARIABLE (INTEGER 4 ()) 0 73 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 73 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.166' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0
-76 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.168'
-(VARIABLE (INTEGER 4 ()) 0 76 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 76 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.169' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0
-76 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.171'
-(VARIABLE (INTEGER 4 ()) 0 76 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 76 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.172' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0
-76 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.174'
-(VARIABLE (INTEGER 4 ()) 0 76 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 76 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.175' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0
-76 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.177'
-(VARIABLE (INTEGER 4 ()) 0 76 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 76 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.178' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0
-77 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.180'
-(VARIABLE (INTEGER 4 ()) 0 77 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 77 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.181' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0
-77 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.183'
-(VARIABLE (INTEGER 4 ()) 0 77 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 77 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.184' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0
-77 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.186'
-(VARIABLE (INTEGER 4 ()) 0 77 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 77 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.187' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0
-81 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.189'
-(VARIABLE (INTEGER 4 ()) 0 81 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 81 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.190' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0
-81 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.192'
-(VARIABLE (INTEGER 4 ()) 0 81 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 81 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.193' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0
-81 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.195'
-(VARIABLE (INTEGER 4 ()) 0 81 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 81 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.196' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0
-81 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.198'
-(VARIABLE (INTEGER 4 ()) 0 81 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 81 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.199' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0
-81 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.201'
-(VARIABLE (INTEGER 4 ()) 0 81 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 81 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.202' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0
-81 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.204'
-(VARIABLE (INTEGER 4 ()) 0 81 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 81 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.205' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0
-69 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.207'
-(VARIABLE (INTEGER 4 ()) 0 69 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 69 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.208' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0
-69 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.210'
-(VARIABLE (INTEGER 4 ()) 0 69 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 69 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.211' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0
-69 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.213'
-(VARIABLE (INTEGER 4 ()) 0 69 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 69 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.214' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0
-69 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.216'
-(VARIABLE (INTEGER 4 ()) 0 69 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 69 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.217' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0
-69 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.219'
-(VARIABLE (INTEGER 4 ()) 0 69 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 69 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.220' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0
-69 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.222'
-(VARIABLE (INTEGER 4 ()) 0 69 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 82 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.223' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0
-82 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.225'
-(VARIABLE (INTEGER 4 ()) 0 82 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 82 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.226' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0
-67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.228'
-(VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.229' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0
-67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.231'
-(VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.232' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0
-67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.234'
-(VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.235' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0
-67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.237'
-(VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 67 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.238' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0
-67 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 322 ())))
-
-(82 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-323 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-324 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-325 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-326 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-327 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-328 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-329 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-330 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-331 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-332 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-269 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-270 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-267 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-268 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-265 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-262 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-263 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-264 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-333 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-334 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-335 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-336 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-83 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-337 'h5d' 'h5d' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-84 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-266 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-242 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-228 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-230 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-247 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-338 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-232 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-73 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-238 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-339 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-241 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-340 'h5dcreate_anon_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 341 0 (342 343 344 345
-346 347 348) () 0 () ())
-349 'h5dcreate_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 350 0 (351 352 353 354 355
-356 357 358 359) () 0 () ())
-360 'h5dclose_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 361 0 (362 363) () 0 () ())
-3 'h5dfill_char' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 364 0 (365 366 367 368) () 0 () ())
-240 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-231 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-5 'h5dfill_integer' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 369 0 (370 371 372 373) () 0 () ())
-237 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-374 'h5dget_access_plist_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 375 0 (376 377 378) () 0 ()
-())
-379 'h5dget_space_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 380 0 (381 382 383) () 0 () ())
-384 'h5dget_create_plist_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 385 0 (386 387 388) () 0 ()
-())
-389 'h5dget_type_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 390 0 (391 392 393) () 0 () ())
-394 'h5dopen_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 395 0 (396 397 398 399 400) ()
-0 () ())
-20 'h5dread_char_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 401 0 (402 403 404 405 406
-407 408 409) () 0 () ())
-410 'h5dget_storage_size_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 411 0 (412 413 414) () 0 ()
-())
-17 'h5dread_char_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 415 0 (416 417 418 419 420
-421 422 423) () 0 () ())
-18 'h5dread_char_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 424 0 (425 426 427 428 429
-430 431 432) () 0 () ())
-19 'h5dread_char_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 433 0 (434 435 436 437 438
-439 440 441) () 0 () ())
-15 'h5dread_char_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 442 0 (443 444 445 446 447
-448 449 450) () 0 () ())
-14 'h5dread_char_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 451 0 (452 453 454 455 456
-457 458 459) () 0 () ())
-28 'h5dread_integer_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 460 0 (461 462 463 464
-465 466 467 468) () 0 () ())
-27 'h5dread_integer_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 469 0 (470 471 472 473
-474 475 476 477) () 0 () ())
-21 'h5dread_char_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 478 0 (479 480 481 482
-483 484 485 486) () 0 () ())
-16 'h5dread_char_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 487 0 (488 489 490 491 492
-493 494 495) () 0 () ())
-25 'h5dread_integer_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 496 0 (497 498 499 500
-501 502 503 504) () 0 () ())
-22 'h5dread_integer_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 505 0 (506 507 508 509
-510 511 512 513) () 0 () ())
-23 'h5dread_integer_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 514 0 (515 516 517 518
-519 520 521 522) () 0 () ())
-24 'h5dread_integer_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 523 0 (524 525 526 527
-528 529 530 531) () 0 () ())
-11 'h5dread_real_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 532 0 (533 534 535 536 537
-538 539 540) () 0 () ())
-8 'h5dread_real_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 541 0 (542 543 544 545 546
-547 548 549) () 0 () ())
-9 'h5dread_real_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 550 0 (551 552 553 554 555
-556 557 558) () 0 () ())
-10 'h5dread_real_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 559 0 (560 561 562 563 564
-565 566 567) () 0 () ())
-12 'h5dread_real_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 568 0 (569 570 571 572 573
-574 575 576) () 0 () ())
-29 'h5dread_integer_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 577 0 (578
-579 580 581 582 583 584 585) () 0 () ())
-13 'h5dread_real_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 586 0 (587 588 589 590
-591 592 593 594) () 0 () ())
-30 'h5dread_reference_dsetreg' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 595 0 (596
-597 598 599 600 601 602 603) () 0 () ())
-31 'h5dread_reference_obj' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 604 0 (605
-606 607 608 609 610 611 612) () 0 () ())
-6 'h5dread_real_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 613 0 (614 615 616 617 618
-619 620 621) () 0 () ())
-33 'h5dread_vl_real' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 622 0 (623 624 625 626 627
-628 629 630 631) () 0 () ())
-34 'h5dread_vl_integer' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 632 0 (633 634 635 636
-637 638 639 640 641) () 0 () ())
-32 'h5dread_vl_string' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 642 0 (643 644 645 646
-647 648 649 650 651) () 0 () ())
-7 'h5dread_real_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 652 0 (653 654 655 656 657
-658 659 660) () 0 () ())
-26 'h5dread_integer_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 661 0 (662 663 664 665
-666 667 668 669) () 0 () ())
-670 'h5dget_space_status_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 671 0 (672 673 674) () 0 ()
-())
-4 'h5dfill_real' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 675 0 (676 677 678 679) () 0 () ())
-45 'h5dwrite_char_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 680 0 (681 682 683 684 685
-686 687 688) () 0 () ())
-46 'h5dwrite_char_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 689 0 (690 691 692 693 694
-695 696 697) () 0 () ())
-43 'h5dwrite_char_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 698 0 (699 700 701 702 703
-704 705 706) () 0 () ())
-44 'h5dwrite_char_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 707 0 (708 709 710 711 712
-713 714 715) () 0 () ())
-47 'h5dwrite_char_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 716 0 (717 718 719 720 721
-722 723 724) () 0 () ())
-50 'h5dwrite_char_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 725 0 (726 727 728 729
-730 731 732 733) () 0 () ())
-48 'h5dwrite_char_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 734 0 (735 736 737 738 739
-740 741 742) () 0 () ())
-56 'h5dwrite_integer_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 743 0 (744 745 746 747
-748 749 750 751) () 0 () ())
-53 'h5dwrite_integer_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 752 0 (753 754 755 756
-757 758 759 760) () 0 () ())
-54 'h5dwrite_integer_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 761 0 (762 763 764 765
-766 767 768 769) () 0 () ())
-55 'h5dwrite_integer_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 770 0 (771 772 773 774
-775 776 777 778) () 0 () ())
-57 'h5dwrite_integer_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 779 0 (780 781 782 783
-784 785 786 787) () 0 () ())
-52 'h5dwrite_integer_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 788 0 (789 790 791 792
-793 794 795 796) () 0 () ())
-49 'h5dwrite_char_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 797 0 (798 799 800 801 802
-803 804 805) () 0 () ())
-58 'h5dwrite_integer_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 806 0 (807
-808 809 810 811 812 813 814) () 0 () ())
-41 'h5dwrite_real_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 815 0 (816 817 818 819 820
-821 822 823) () 0 () ())
-38 'h5dwrite_real_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 824 0 (825 826 827 828 829
-830 831 832) () 0 () ())
-39 'h5dwrite_real_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 833 0 (834 835 836 837 838
-839 840 841) () 0 () ())
-40 'h5dwrite_real_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 842 0 (843 844 845 846 847
-848 849 850) () 0 () ())
-37 'h5dwrite_real_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 851 0 (852 853 854 855 856
-857 858 859) () 0 () ())
-51 'h5dwrite_integer_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 860 0 (861 862 863 864
-865 866 867 868) () 0 () ())
-869 'h5dvlen_get_max_len_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 870 0 (871 872 873 874 875)
-() 0 () ())
-35 'h5dwrite_real_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 876 0 (877 878 879 880 881
-882 883 884) () 0 () ())
-42 'h5dwrite_real_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 885 0 (886 887 888 889
-890 891 892 893) () 0 () ())
-60 'h5dwrite_reference_obj' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 894 0 (895
-896 897 898 899 900 901 902) () 0 () ())
-59 'h5dwrite_reference_dsetreg' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 903 0 (904
-905 906 907 908 909 910 911) () 0 () ())
-62 'h5dwrite_vl_real' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 912 0 (913 914 915 916
-917 918 919 920 921) () 0 () ())
-61 'h5dwrite_vl_string' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 922 0 (923 924 925 926
-927 928 929 930 931) () 0 () ())
-285 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-284 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-288 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-286 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-278 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-281 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-63 'h5dwrite_vl_integer' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 932 0 (933 934 935 936
-937 938 939 940 941) () 0 () ())
-272 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-942 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '19') () 0 ()
-())
-81 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-273 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-274 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-282 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-75 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-215 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-943 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-74 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-216 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-944 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-220 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-223 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-213 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-218 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-217 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-211 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-945 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-76 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-946 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '12') () 0 ()
-())
-260 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-210 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-227 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-36 'h5dwrite_real_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 947 0 (948 949 950 951 952
-953 954 955) () 0 () ())
-252 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-253 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-77 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9')) 0 () ())
-261 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-956 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(UNKNOWN 0 ()) 0 0 () () 0 () ())
-206 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-205 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-957 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-258 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-68 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-958 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6') () 0 () ())
-64 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-208 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-959 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7') () 0 () ())
-209 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-79 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-200 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-960 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-190 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-199 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-198 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-191 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-195 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-193 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-194 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-196 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-197 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-207 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-961 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-78 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-180 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-177 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-192 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-179 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-178 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-187 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-186 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-175 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-184 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-183 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-189 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-176 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-160 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-188 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-166 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-172 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-155 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-156 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-163 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-162 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-171 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-185 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-174 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-173 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-169 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-80 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-66 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-962 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-164 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-165 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-158 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-159 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-168 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-167 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-157 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-963 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '18') () 0 ()
-())
-170 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-181 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-250 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2 'h5dset_extent_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 964 0 (965 966 967) () 0 () ())
-154 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-968 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2') () 0 () ())
-70 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-153 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-72 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-150 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-152 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-137 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-133 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-969 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '20') () 0 ()
-())
-146 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-135 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-144 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-136 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-134 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-145 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-138 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-148 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-142 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-149 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-143 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-139 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-127 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-101 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-147 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-151 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-125 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-141 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-100 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-107 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-99 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-970 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '34') () 0 ()
-())
-65 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-130 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-308 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-307 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-131 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-306 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-309 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-322 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-320 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-313 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-321 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-132 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-311 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-312 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-310 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-314 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-315 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-110 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-111 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-121 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-120 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-119 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-122 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-126 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-109 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-116 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-316 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-117 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-113 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-303 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-114 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-302 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-112 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-124 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-118 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-299 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-300 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-301 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-115 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-305 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-304 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-317 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-298 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-319 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-295 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-318 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-123 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-108 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-140 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-293 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-291 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-290 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-296 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-297 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-104 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-289 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-129 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-102 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-128 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-106 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-105 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-93 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-91 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-87 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-96 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-86 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-94 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-97 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-89 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-88 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-95 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-971 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '14') () 0 ()
-())
-972 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-90 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-71 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-973 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-974 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((975 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-98 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-85 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-976 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-977 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((978 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-92 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-979 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-103 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-980 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-981 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-982 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-983 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-984 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-67 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-69 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-292 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-294 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-161 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-351 'loc_id' '' 350 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-352 'name' '' 350 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-353 'type_id' '' 350 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-354 'space_id' '' 350 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-356 'hdferr' '' 350 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-357 'dcpl_id' '' 350 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-355 'dset_id' '' 350 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-359 'dapl_id' '' 350 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-358 'lcpl_id' '' 350 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-809 'buf' '' 806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-397 'name' '' 395 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-399 'hdferr' '' 395 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-396 'loc_id' '' 395 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-398 'dset_id' '' 395 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-400 'dapl_id' '' 395 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-363 'hdferr' '' 361 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-362 'dset_id' '' 361 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-905 'mem_type_id' '' 903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-896 'mem_type_id' '' 894 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-898 'dims' '' 894 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-897 'buf' '' 894 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-DERIVED 977 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 898 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-901 'file_space_id' '' 894 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-900 'mem_space_id' '' 894 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-895 'dset_id' '' 894 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-902 'xfer_prp' '' 894 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-899 'hdferr' '' 894 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-907 'dims' '' 903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-908 'hdferr' '' 903 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-909 'mem_space_id' '' 903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-904 'dset_id' '' 903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-807 'dset_id' '' 806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-808 'mem_type_id' '' 806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-911 'xfer_prp' '' 903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-812 'mem_space_id' '' 806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-810 'dims' '' 806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-813 'file_space_id' '' 806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-780 'dset_id' '' 779 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-814 'xfer_prp' '' 806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-811 'hdferr' '' 806 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-910 'file_space_id' '' 903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-785 'mem_space_id' '' 779 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-786 'file_space_id' '' 779 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-783 'dims' '' 779 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-781 'mem_type_id' '' 779 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-782 'buf' '' 779 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 783 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-747 'dims' '' 743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-748 'hdferr' '' 743 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-787 'xfer_prp' '' 779 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-744 'dset_id' '' 743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-745 'mem_type_id' '' 743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-746 'buf' '' 743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 747 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-747 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-751 'xfer_prp' '' 743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-750 'file_space_id' '' 743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-749 'mem_space_id' '' 743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-784 'hdferr' '' 779 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-906 'buf' '' 903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-DERIVED 974 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 907 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-774 'dims' '' 770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-771 'dset_id' '' 770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-775 'hdferr' '' 770 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-773 'buf' '' 770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 774 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-774 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 774 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-777 'file_space_id' '' 770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-778 'xfer_prp' '' 770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-776 'mem_space_id' '' 770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-762 'dset_id' '' 761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-766 'hdferr' '' 761 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-765 'dims' '' 761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-764 'buf' '' 761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 765 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-765 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 765 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 765 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-763 'mem_type_id' '' 761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-767 'mem_space_id' '' 761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-757 'hdferr' '' 752 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-755 'buf' '' 752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 756 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-756 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 756 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 756 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-756 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-754 'mem_type_id' '' 752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-769 'xfer_prp' '' 761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-756 'dims' '' 752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-753 'dset_id' '' 752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-768 'file_space_id' '' 761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-758 'mem_space_id' '' 752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-759 'file_space_id' '' 752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-772 'mem_type_id' '' 770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-791 'buf' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 792 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-792 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 792 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 792 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-792 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 792 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-760 'xfer_prp' '' 752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-792 'dims' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-794 'mem_space_id' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-790 'mem_type_id' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-789 'dset_id' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-796 'xfer_prp' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-863 'buf' '' 860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 864 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-864 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 864 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 864 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-864 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 864 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 864 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-862 'mem_type_id' '' 860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-864 'dims' '' 860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-861 'dset_id' '' 860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-868 'xfer_prp' '' 860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-867 'file_space_id' '' 860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-866 'mem_space_id' '' 860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-865 'hdferr' '' 860 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-795 'file_space_id' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-730 'hdferr' '' 725 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-729 'dims' '' 725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-731 'mem_space_id' '' 725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-732 'file_space_id' '' 725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-726 'dset_id' '' 725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-728 'buf' '' 725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-798 'dset_id' '' 797 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-799 'mem_type_id' '' 797 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-800 'buf' '' 797 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 801 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-801 'dims' '' 797 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-802 'hdferr' '' 797 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-804 'file_space_id' '' 797 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-805 'xfer_prp' '' 797 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-803 'mem_space_id' '' 797 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-736 'mem_type_id' '' 734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-738 'dims' '' 734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-735 'dset_id' '' 734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-737 'buf' '' 734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 738 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-738 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-739 'hdferr' '' 734 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-742 'xfer_prp' '' 734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-719 'buf' '' 716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 720 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-720 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 720 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-721 'hdferr' '' 716 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-718 'mem_type_id' '' 716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-741 'file_space_id' '' 734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-720 'dims' '' 716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-717 'dset_id' '' 716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-740 'mem_space_id' '' 734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-723 'file_space_id' '' 716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-724 'xfer_prp' '' 716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-692 'buf' '' 689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 693 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-693 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 693 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 693 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-691 'mem_type_id' '' 689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-694 'hdferr' '' 689 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-693 'dims' '' 689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-696 'file_space_id' '' 689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-682 'mem_type_id' '' 680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-697 'xfer_prp' '' 689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-695 'mem_space_id' '' 689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-690 'dset_id' '' 689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-722 'mem_space_id' '' 716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-681 'dset_id' '' 680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-685 'hdferr' '' 680 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-684 'dims' '' 680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-686 'mem_space_id' '' 680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-688 'xfer_prp' '' 680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-687 'file_space_id' '' 680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-712 'hdferr' '' 707 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-711 'dims' '' 707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-708 'dset_id' '' 707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-710 'buf' '' 707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 711 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-711 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 711 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 711 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-711 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 711 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-714 'file_space_id' '' 707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-709 'mem_type_id' '' 707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-701 'buf' '' 698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 702 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-702 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 702 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 702 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-702 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 702 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 702 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-700 'mem_type_id' '' 698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-715 'xfer_prp' '' 707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-702 'dims' '' 698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-705 'file_space_id' '' 698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-706 'xfer_prp' '' 698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-886 'dset_id' '' 885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-888 'buf' '' 885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ()) 0
-0 () () 0 () ())
-887 'mem_type_id' '' 885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-890 'hdferr' '' 885 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-704 'mem_space_id' '' 698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-703 'hdferr' '' 698 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-699 'dset_id' '' 698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-889 'dims' '' 885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-891 'mem_space_id' '' 885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-893 'xfer_prp' '' 885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-892 'file_space_id' '' 885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-818 'buf' '' 815 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 819 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-713 'mem_space_id' '' 707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-683 'buf' '' 680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 684 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-684 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 684 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 684 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-684 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-820 'hdferr' '' 815 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-816 'dset_id' '' 815 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-817 'mem_type_id' '' 815 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-822 'file_space_id' '' 815 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-846 'dims' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-844 'mem_type_id' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-845 'buf' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 846 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 846 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-847 'hdferr' '' 842 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-823 'xfer_prp' '' 815 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-848 'mem_space_id' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-843 'dset_id' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-849 'file_space_id' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-821 'mem_space_id' '' 815 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-819 'dims' '' 815 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-836 'buf' '' 833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 837 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 837 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 837 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-838 'hdferr' '' 833 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-837 'dims' '' 833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-834 'dset_id' '' 833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-841 'xfer_prp' '' 833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-840 'file_space_id' '' 833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-839 'mem_space_id' '' 833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-827 'buf' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 828 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 828 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 828 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 828 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-829 'hdferr' '' 824 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-828 'dims' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-825 'dset_id' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-831 'file_space_id' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-830 'mem_space_id' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-853 'mem_type_id' '' 851 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-832 'xfer_prp' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-826 'mem_type_id' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-856 'hdferr' '' 851 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-855 'dims' '' 851 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-852 'dset_id' '' 851 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-857 'mem_space_id' '' 851 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-858 'file_space_id' '' 851 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-859 'xfer_prp' '' 851 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-854 'buf' '' 851 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 855 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 855 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 855 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 855 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-855 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-952 'hdferr' '' 947 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-949 'mem_type_id' '' 947 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-951 'dims' '' 947 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-955 'xfer_prp' '' 947 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-954 'file_space_id' '' 947 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-953 'mem_space_id' '' 947 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-878 'mem_type_id' '' 876 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-881 'hdferr' '' 876 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-877 'dset_id' '' 876 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-883 'file_space_id' '' 876 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-882 'mem_space_id' '' 876 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-880 'dims' '' 876 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-879 'buf' '' 876 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 880 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 880 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 880 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 880 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-880 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 880 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 880 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-948 'dset_id' '' 947 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-950 'buf' '' 947 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 951 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 951 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 951 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 951 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-951 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 951 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-884 'xfer_prp' '' 876 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-835 'mem_type_id' '' 833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-850 'xfer_prp' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-607 'buf' '' 604 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(DERIVED 977 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 608 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-608 'dims' '' 604 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-611 'file_space_id' '' 604 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-596 'dset_id' '' 595 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-612 'xfer_prp' '' 604 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-597 'mem_type_id' '' 595 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-610 'mem_space_id' '' 604 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-598 'buf' '' 595 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(DERIVED 974 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 599 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-599 'dims' '' 595 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-601 'mem_space_id' '' 595 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-603 'xfer_prp' '' 595 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-602 'file_space_id' '' 595 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-579 'mem_type_id' '' 577 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-600 'hdferr' '' 595 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-580 'buf' '' 577 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-581 'dims' '' 577 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-584 'file_space_id' '' 577 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-585 'xfer_prp' '' 577 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-583 'mem_space_id' '' 577 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-462 'mem_type_id' '' 460 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-464 'dims' '' 460 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-465 'hdferr' '' 460 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-461 'dset_id' '' 460 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-582 'hdferr' '' 577 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-578 'dset_id' '' 577 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-605 'dset_id' '' 604 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-609 'hdferr' '' 604 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-606 'mem_type_id' '' 604 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-466 'mem_space_id' '' 460 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-468 'xfer_prp' '' 460 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-472 'buf' '' 469 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 473 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-473 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-473 'dims' '' 469 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-470 'dset_id' '' 469 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-474 'hdferr' '' 469 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-471 'mem_type_id' '' 469 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-476 'file_space_id' '' 469 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-475 'mem_space_id' '' 469 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-477 'xfer_prp' '' 469 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-664 'buf' '' 661 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 665 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-665 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 665 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-662 'dset_id' '' 661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-666 'hdferr' '' 661 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-665 'dims' '' 661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-668 'file_space_id' '' 661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-499 'buf' '' 496 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 500 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-500 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 500 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 500 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-498 'mem_type_id' '' 496 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-669 'xfer_prp' '' 661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-667 'mem_space_id' '' 661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-501 'hdferr' '' 496 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-500 'dims' '' 496 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-503 'file_space_id' '' 496 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-504 'xfer_prp' '' 496 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-502 'mem_space_id' '' 496 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-526 'buf' '' 523 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 527 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-527 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 527 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 527 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-527 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-524 'dset_id' '' 523 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-528 'hdferr' '' 523 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-527 'dims' '' 523 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-529 'mem_space_id' '' 523 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-530 'file_space_id' '' 523 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-525 'mem_type_id' '' 523 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-497 'dset_id' '' 496 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-663 'mem_type_id' '' 661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-467 'file_space_id' '' 460 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-517 'buf' '' 514 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 518 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-518 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 518 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 518 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-518 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 518 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-515 'dset_id' '' 514 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-518 'dims' '' 514 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-519 'hdferr' '' 514 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-531 'xfer_prp' '' 523 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-516 'mem_type_id' '' 514 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-521 'file_space_id' '' 514 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-522 'xfer_prp' '' 514 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-510 'hdferr' '' 505 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-506 'dset_id' '' 505 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-508 'buf' '' 505 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 509 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-509 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 509 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 509 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-509 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 509 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 509 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-507 'mem_type_id' '' 505 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-512 'file_space_id' '' 505 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-480 'mem_type_id' '' 478 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-481 'buf' '' 478 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-513 'xfer_prp' '' 505 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-511 'mem_space_id' '' 505 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-479 'dset_id' '' 478 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-483 'hdferr' '' 478 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-509 'dims' '' 505 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-484 'mem_space_id' '' 478 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-482 'dims' '' 478 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-486 'xfer_prp' '' 478 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-485 'file_space_id' '' 478 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-520 'mem_space_id' '' 514 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-402 'dset_id' '' 401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-403 'mem_type_id' '' 401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-405 'dims' '' 401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-404 'buf' '' 401 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 405 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-463 'buf' '' 460 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 464 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-407 'mem_space_id' '' 401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-409 'xfer_prp' '' 401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-435 'mem_type_id' '' 433 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-408 'file_space_id' '' 401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-437 'dims' '' 433 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-439 'mem_space_id' '' 433 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-440 'file_space_id' '' 433 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-441 'xfer_prp' '' 433 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-434 'dset_id' '' 433 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-427 'buf' '' 424 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 428 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-428 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 428 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-426 'mem_type_id' '' 424 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-438 'hdferr' '' 433 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-425 'dset_id' '' 424 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-429 'hdferr' '' 424 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-430 'mem_space_id' '' 424 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-431 'file_space_id' '' 424 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-420 'hdferr' '' 415 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-432 'xfer_prp' '' 424 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-428 'dims' '' 424 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-436 'buf' '' 433 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 437 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-437 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-419 'dims' '' 415 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-417 'mem_type_id' '' 415 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-418 'buf' '' 415 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 419 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-419 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 419 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 419 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-488 'dset_id' '' 487 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-490 'buf' '' 487 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 491 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-491 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 491 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 491 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-491 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-491 'dims' '' 487 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-489 'mem_type_id' '' 487 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-423 'xfer_prp' '' 415 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-422 'file_space_id' '' 415 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-493 'mem_space_id' '' 487 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-492 'hdferr' '' 487 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-495 'xfer_prp' '' 487 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-446 'dims' '' 442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-494 'file_space_id' '' 487 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-421 'mem_space_id' '' 415 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-443 'dset_id' '' 442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-444 'mem_type_id' '' 442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-448 'mem_space_id' '' 442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-445 'buf' '' 442 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 446 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-446 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 446 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 446 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-446 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 446 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-454 'buf' '' 451 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 455 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-455 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 455 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 455 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-455 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 455 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 455 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-453 'mem_type_id' '' 451 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-455 'dims' '' 451 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-452 'dset_id' '' 451 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-450 'xfer_prp' '' 442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-456 'hdferr' '' 451 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-449 'file_space_id' '' 442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-588 'mem_type_id' '' 586 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-459 'xfer_prp' '' 451 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-458 'file_space_id' '' 451 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-457 'mem_space_id' '' 451 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-587 'dset_id' '' 586 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-590 'dims' '' 586 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-591 'hdferr' '' 586 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-593 'file_space_id' '' 586 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-592 'mem_space_id' '' 586 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-571 'buf' '' 568 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 572 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-570 'mem_type_id' '' 568 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-572 'dims' '' 568 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-575 'file_space_id' '' 568 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-574 'mem_space_id' '' 568 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-573 'hdferr' '' 568 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-569 'dset_id' '' 568 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-594 'xfer_prp' '' 586 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-589 'buf' '' 586 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-535 'buf' '' 532 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 536 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-536 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-534 'mem_type_id' '' 532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-537 'hdferr' '' 532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-536 'dims' '' 532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-539 'file_space_id' '' 532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-538 'mem_space_id' '' 532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-561 'mem_type_id' '' 559 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-564 'hdferr' '' 559 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-562 'buf' '' 559 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 563 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-563 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 563 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-563 'dims' '' 559 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-565 'mem_space_id' '' 559 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-560 'dset_id' '' 559 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-540 'xfer_prp' '' 532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-533 'dset_id' '' 532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-555 'hdferr' '' 550 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-551 'dset_id' '' 550 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-553 'buf' '' 550 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 554 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-554 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 554 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 554 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-552 'mem_type_id' '' 550 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-567 'xfer_prp' '' 559 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-554 'dims' '' 550 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-566 'file_space_id' '' 559 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-576 'xfer_prp' '' 568 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-557 'file_space_id' '' 550 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-546 'hdferr' '' 541 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-542 'dset_id' '' 541 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-544 'buf' '' 541 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 545 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-545 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 545 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 545 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-545 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-545 'dims' '' 541 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-543 'mem_type_id' '' 541 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-558 'xfer_prp' '' 550 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-549 'xfer_prp' '' 541 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-548 'file_space_id' '' 541 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-547 'mem_space_id' '' 541 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-657 'hdferr' '' 652 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-656 'dims' '' 652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-654 'mem_type_id' '' 652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-659 'file_space_id' '' 652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-660 'xfer_prp' '' 652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-618 'hdferr' '' 613 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-614 'dset_id' '' 613 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-620 'file_space_id' '' 613 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-619 'mem_space_id' '' 613 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-621 'xfer_prp' '' 613 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-617 'dims' '' 613 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-616 'buf' '' 613 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 617 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-617 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 617 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 617 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-617 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 617 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 617 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-383 'hdferr' '' 380 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-381 'dataset_id' '' 380 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-382 'dataspace_id' '' 380 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-615 'mem_type_id' '' 613 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-658 'mem_space_id' '' 652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-653 'dset_id' '' 652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-655 'buf' '' 652 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 656 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-656 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 656 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 656 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-656 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 656 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-391 'dataset_id' '' 390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-393 'hdferr' '' 390 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-966 'size' '' 964 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-392 'datatype_id' '' 390 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-387 'plist_id' '' 385 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-388 'hdferr' '' 385 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-967 'hdferr' '' 964 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-914 'mem_type_id' '' 912 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-933 'dset_id' '' 932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-917 'len' '' 912 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-913 'dset_id' '' 912 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-918 'hdferr' '' 912 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-919 'mem_space_id' '' 912 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-916 'dims' '' 912 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-921 'xfer_prp' '' 912 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-413 'size' '' 411 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-412 'dataset_id' '' 411 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-386 'dataset_id' '' 385 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-965 'dataset_id' '' 964 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-920 'file_space_id' '' 912 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-414 'hdferr' '' 411 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-872 'type_id' '' 870 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-871 'dataset_id' '' 870 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-874 'len' '' 870 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-875 'hdferr' '' 870 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-873 'space_id' '' 870 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-935 'buf' '' 932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 936 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-936 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-934 'mem_type_id' '' 932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-937 'len' '' 932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-938 'hdferr' '' 932 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-939 'mem_space_id' '' 932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-634 'mem_type_id' '' 632 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-941 'xfer_prp' '' 932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-940 'file_space_id' '' 932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-636 'dims' '' 632 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-633 'dset_id' '' 632 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-637 'len' '' 632 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-638 'hdferr' '' 632 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-635 'buf' '' 632 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 636 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-636 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-641 'xfer_prp' '' 632 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-640 'file_space_id' '' 632 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-623 'dset_id' '' 622 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-627 'len' '' 622 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-625 'buf' '' 622 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 626 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-626 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-624 'mem_type_id' '' 622 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-639 'mem_space_id' '' 632 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-628 'hdferr' '' 622 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-630 'file_space_id' '' 622 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-629 'mem_space_id' '' 622 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-927 'str_len' '' 922 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-925 'buf' '' 922 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 926 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1))))) 0 () ())
-924 'mem_type_id' '' 922 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-923 'dset_id' '' 922 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-926 'dims' '' 922 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-930 'file_space_id' '' 922 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-929 'mem_space_id' '' 922 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-928 'hdferr' '' 922 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-631 'xfer_prp' '' 622 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-626 'dims' '' 622 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-936 'dims' '' 932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-644 'mem_type_id' '' 642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-931 'xfer_prp' '' 922 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-915 'buf' '' 912 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 916 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 916 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-556 'mem_space_id' '' 550 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-447 'hdferr' '' 442 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-416 'dset_id' '' 415 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-406 'hdferr' '' 401 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-733 'xfer_prp' '' 725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-727 'mem_type_id' '' 725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-793 'hdferr' '' 788 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-643 'dset_id' '' 642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-646 'dims' '' 642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-647 'str_len' '' 642 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-650 'file_space_id' '' 642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-649 'mem_space_id' '' 642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-648 'hdferr' '' 642 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-651 'xfer_prp' '' 642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-373 'hdferr' '' 369 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-372 'buf' '' 369 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-676 'fill_valuer' '' 675 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 4 ()) 0 0 () () 0 () ())
-677 'space_id' '' 675 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-679 'hdferr' '' 675 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-370 'fill_value' '' 369 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-371 'space_id' '' 369 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-366 'space_id' '' 364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-672 'dset_id' '' 671 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-365 'fill_value' '' 364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () () 0 () ())
-673 'flag' '' 671 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-368 'hdferr' '' 364 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-344 'space_id' '' 341 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-345 'dset_id' '' 341 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-678 'buf' '' 675 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-347 'dcpl_id' '' 341 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-343 'type_id' '' 341 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-348 'dapl_id' '' 341 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-377 'plist_id' '' 375 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-342 'loc_id' '' 341 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-378 'hdferr' '' 375 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-376 'dset_id' '' 375 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-674 'hdferr' '' 671 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-346 'hdferr' '' 341 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-367 'buf' '' 364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () (1 ASSUMED_SIZE (
-CONSTANT (INTEGER 4 ()) 0 '1') ()) 0 () ())
-645 'buf' '' 642 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 646 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1))))) 0 () ())
-)
-
-('h5p_string_create_f' 0 161 'h5dset_extent_f' 0 2 'h5dfill_real' 0 4
-'h5d_fill_time_error_f' 0 237 'floating_types_len' 0 338 '__convert_i4_i8'
-0 323 'floating_types' 0 82 'h5d_alloc_time_early_f' 0 244
-'h5d_alloc_time_default_f' 0 245 'h5_iter_unknown_f' 0 266
-'fortran_integer_1' 0 335 'fortran_double' 0 325 'fortran_integer' 0 324
-'fortran_real_4' 0 334 'fortran_integer_2' 0 331 'fortran_real' 0 330
-'fortran_integer_4' 0 327 'fortran_integer_8' 0 326 'fortran_real_12' 0
-329 'fortran_real_16' 0 328 'h5_integer_kind' 0 333 'h5_index_crt_order_f'
-0 268 'fortran_real_8' 0 332 'h5_index_n_f' 0 267 'h5_index_unknown_f' 0
-270 'h5_index_name_f' 0 269 'h5_iter_dec_f' 0 264 'h5_iter_native_f' 0
-263 'h5_iter_n_f' 0 262 'h5_iter_inc_f' 0 265 'h5_szip_ec_om_f' 0 84
-'h5_real_kind' 0 336 'h5d' 0 337 'h5_szip_nn_om_f' 0 83 'h5d_contiguous_f'
-0 248 'h5d_compact_f' 0 249 'h5d_alloc_time_late_f' 0 243
-'h5d_alloc_time_error_f' 0 246 'h5d_alloc_time_incr_f' 0 242
-'h5d_chunked_f' 0 247 'h5d_chunk_cache_nslots_dflt_f' 0 230
-'h5d_chunk_cache_nbytes_dflt_f' 0 229 'h5d_chunk_cache_w0_dflt_f' 0 228
-'h5d_fill_time_alloc_f' 0 236 'h5dfill_integer' 0 5
-'h5d_fill_value_user_defined_f' 0 231 'h5d_fill_time_never_f' 0 235
-'h5d_fill_value_error_f' 0 234 'h5d_fill_value_default_f' 0 232
-'h5d_fill_value_undefined_f' 0 233 'h5d_space_sts_not_allocated_f' 0 240
-'h5d_space_sts_error_f' 0 241 'h5d_flags_len' 0 339 'h5d_flags' 0 73
-'h5d_space_sts_allocated_f' 0 238 'h5dclose_f' 0 360
-'h5d_space_sts_part_allocated_f' 0 239 'h5dcreate_f' 0 349
-'h5dcreate_anon_f' 0 340 'h5dfill_char' 0 3 'h5dget_space_status_f' 0
-670 'h5dget_create_plist_f' 0 384 'h5dget_access_plist_f' 0 374
-'h5dget_space_f' 0 379 'h5dread_integer_3' 0 26 'h5dread_char_5' 0 16
-'h5dread_char_2' 0 19 'h5dget_storage_size_f' 0 410 'h5dread_char_1' 0
-20 'h5dopen_f' 0 394 'h5dget_type_f' 0 389 'h5dread_char_3' 0 18
-'h5dread_char_4' 0 17 'h5dread_char_scalar' 0 21 'h5dread_char_7' 0 14
-'h5dread_char_6' 0 15 'h5dread_integer_2' 0 27 'h5dread_integer_1' 0 28
-'h5dread_real_6' 0 7 'h5dread_integer_scalar' 0 29 'h5dread_integer_5' 0
-24 'h5dread_integer_4' 0 25 'h5dread_integer_6' 0 23 'h5dread_integer_7'
-0 22 'h5dread_real_1' 0 12 'h5dread_real_3' 0 10 'h5dread_real_2' 0 11
-'h5dread_real_4' 0 9 'h5dread_real_5' 0 8 'h5dread_vl_string' 0 32
-'h5dread_vl_integer' 0 34 'h5dread_real_7' 0 6 'h5dread_reference_obj' 0
-31 'h5dread_reference_dsetreg' 0 30 'h5dread_real_scalar' 0 13
-'h5dread_vl_real' 0 33 'h5g_storage_type_dense_f' 0 250 'h5dwrite_real_6'
-0 36 'h5dvlen_get_max_len_f' 0 869 'h5dwrite_integer_7' 0 51
-'h5dwrite_char_1' 0 49 'h5dwrite_integer_6' 0 52 'h5dwrite_char_2' 0 48
-'h5dwrite_char_scalar' 0 50 'h5dwrite_char_3' 0 47 'h5dwrite_char_6' 0
-44 'h5dwrite_char_4' 0 46 'h5dwrite_char_5' 0 45 'h5dwrite_char_7' 0 43
-'h5dwrite_integer_1' 0 57 'h5dwrite_integer_3' 0 55 'h5dwrite_integer_2'
-0 56 'h5dwrite_integer_4' 0 54 'h5dwrite_integer_5' 0 53 'h5dwrite_real_5'
-0 37 'h5dwrite_real_2' 0 40 'h5dwrite_real_1' 0 41
-'h5dwrite_integer_scalar' 0 58 'h5dwrite_real_3' 0 39 'h5dwrite_real_4'
-0 38 'h5f_close_weak_f' 0 280 'h5dwrite_vl_integer' 0 63
-'h5dwrite_reference_dsetreg' 0 59 'h5dwrite_real_scalar' 0 42
-'h5dwrite_real_7' 0 35 'h5dwrite_reference_obj' 0 60 'h5f_close_default_f'
-0 281 'h5f_acc_trunc_f' 0 286 'h5f_acc_rdonly_f' 0 287 'h5f_acc_debug_f'
-0 284 'h5dwrite_vl_string' 0 61 'h5dwrite_vl_real' 0 62 'h5f_acc_excl_f'
-0 285 'h5f_acc_rdwr_f' 0 288 'h5f_close_semi_f' 0 279 'h5f_close_strong_f'
-0 278 'h5fd_mpio_independent_f' 0 227 'h5fd_mem_default_f' 0 224
-'h5fd_hid_flags_len' 0 944 'h5fd_core_f' 0 216 'h5f_obj_file_f' 0 277
-'h5f_libver_latest_f' 0 271 'h5f_flags' 0 81 'h5f_flags_len' 0 942
-'h5f_libver_earliest_f' 0 272 'h5f_obj_datatype_f' 0 274
-'h5f_obj_dataset_f' 0 276 'h5f_obj_all_f' 0 273 'h5f_scope_global_f' 0
-282 'h5f_obj_group_f' 0 275 'h5f_scope_local_f' 0 283 'h5fd_hid_flags' 0
-74 'h5fd_flags_len' 0 943 'h5fd_family_f' 0 215 'h5fd_flags' 0 75
-'h5fd_log_f' 0 214 'h5fd_mem_btree_f' 0 222 'h5fd_mem_ntypes_f' 0 217
-'h5fd_mem_nolist_f' 0 225 'h5fd_mem_draw_f' 0 221 'h5fd_mem_lheap_f' 0
-219 'h5fd_mem_gheap_f' 0 220 'h5fd_mem_ohdr_f' 0 218 'h5fd_mpio_f' 0 213
-'h5fd_mem_super_f' 0 223 'h5fd_mpio_collective_f' 0 226 'h5fd_stdio_f' 0
-210 'h5fd_sec2_f' 0 211 'h5fd_multi_f' 0 212 'h5g_link_hard_f' 0 255
-'h5g_dataset_f' 0 259 'h5fortran_types' 0 945 'h5g_link_error_f' 0 256
-'h5g_group_f' 0 260 'h5g_flags_len' 0 946 'h5g_flags' 0 76 'h5g_link_f'
-0 257 'h5g_link_soft_f' 0 254 'h5g_storage_type_compact_f' 0 251
-'h5o_hdr_attr_crt_order_track_f' 0 181 'h5o_copy_without_attr_flag_f' 0
-192 'h5i_datatype_f' 0 207 'h5g_type_f' 0 258 'h5g_storage_type_unknown_f'
-0 253 'h5g_storage_type_symbol_table_f' 0 252 'h5generic_flags_len' 0
-957 'h5g_unknown_f' 0 261 'h5generic_flags' 0 77 'h5i_dataset_f' 0 205
-'h5global' 0 956 'h5i_attr_f' 0 204 'h5i_badid_f' 0 203 'h5i_dataspace_f'
-0 206 'h5l_link_class_t_vers_f' 0 197 'h5i_file_f' 0 209 'h5i_flags_len'
-0 959 'h5i_flags' 0 68 'h5i_group_f' 0 208 'h5l_flags' 0 64
-'h5l_flags_len' 0 958 'h5o_copy_shallow_hierarchy_f' 0 196
-'h5o_copy_expand_ext_link_f' 0 194 'h5l_same_loc_f' 0 198
-'h5l_type_external_f' 0 199 'h5l_type_error_f' 0 202 'h5o_copy_all_f' 0
-190 'h5lib_flags_len' 0 960 'h5l_type_soft_f' 0 200 'h5l_type_hard_f' 0
-201 'h5lib_flags' 0 79 'h5o_copy_expand_reference_f' 0 193
-'h5o_copy_expand_soft_link_f' 0 195 'h5o_copy_preserve_null_flag_f' 0
-191 'h5o_hdr_all_flags_f' 0 177 'h5o_flags' 0 78 'h5o_flags_len' 0 961
-'h5o_hdr_attr_crt_order_index_f' 0 180 'h5p_file_mount_f' 0 170
-'h5p_default_f' 0 169 'h5o_shmesg_pline_flag_f' 0 185
-'h5o_shmesg_max_nindexes_f' 0 176 'h5o_shmesg_all_flag_f' 0 183
-'h5o_hdr_chunk0_size_f' 0 182 'h5o_hdr_attr_store_phase_cha_f' 0 179
-'h5o_hdr_store_times_f' 0 178 'h5o_shmesg_attr_flag_f' 0 184
-'h5o_shmesg_max_list_size_f' 0 175 'h5o_shmesg_fill_flag_f' 0 186
-'h5o_shmesg_dtype_flag_f' 0 187 'h5o_shmesg_none_flag_f' 0 189
-'h5p_dataset_xfer_f' 0 171 'h5p_crt_order_indexed_f' 0 156
-'h5o_shmesg_sdspace_flag_f' 0 188 'h5p_attribute_create_f' 0 160
-'h5p_crt_order_tracked_f' 0 155 'h5p_dataset_create_f' 0 172
-'h5p_dataset_access_f' 0 166 'h5p_datatype_access_f' 0 162
-'h5p_datatype_create_f' 0 163 'h5p_file_access_f' 0 173
-'h5p_file_create_f' 0 174 'h5p_flags_len' 0 963 'h5p_flags_int_len' 0
-962 'h5p_flags_int' 0 66 'h5p_flags' 0 80 'h5p_link_access_f' 0 157
-'h5p_group_create_f' 0 165 'h5p_group_access_f' 0 164
-'h5p_object_create_f' 0 167 'h5p_object_copy_f' 0 159 'h5p_link_create_f'
-0 158 'h5p_root_f' 0 168 'h5t_std_u16le' 0 294 'h5s_select_append_f' 0
-140 'h5s_sel_hyperslabs_f' 0 134 'h5s_all_f' 0 146 'h5r_dataset_region_f'
-0 153 'h5r_flags' 0 70 'h5r_flags_len' 0 968 'h5r_object_f' 0 154
-'h5s_flags_len' 0 969 'h5s_flags' 0 72 'h5s_sel_all_f' 0 133
-'h5s_scalar_f' 0 152 'h5s_null_f' 0 150 'h5s_sel_error_f' 0 137
-'h5s_sel_none_f' 0 136 'h5s_select_and_f' 0 144 'h5s_sel_points_f' 0 135
-'h5t_cset_ascii_f' 0 108 'h5s_select_nota_f' 0 141 'h5s_select_invalid_f'
-0 138 'h5s_select_noop_f' 0 145 'h5t_compound_f' 0 125 'h5s_simple_f' 0
-151 'h5s_select_prepend_f' 0 139 'h5s_select_notb_f' 0 142
-'h5s_select_or_f' 0 148 'h5s_select_xor_f' 0 143 'h5s_select_set_f' 0
-149 'h5s_unlimited_f' 0 147 'h5t_array_f' 0 101 'h5t_bitfield_f' 0 127
-'h5t_enum_f' 0 123 'h5t_dir_descend_f' 0 99 'h5t_cset_utf8_f' 0 107
-'h5t_dir_ascend_f' 0 100 'h5t_std_ref_obj' 0 318 'h5t_native_character'
-0 319 'h5t_ieee_f32be' 0 309 'h5t_float_f' 0 130 'h5t_flags' 0 65
-'h5t_flags_len' 0 970 'h5t_ieee_f64le' 0 306 'h5t_ieee_f64be' 0 307
-'h5t_ieee_f32le' 0 308 'h5t_integer_f' 0 131 'h5t_std_i64le' 0 298
-'h5t_pad_error_f' 0 115 'h5t_native_integer_1' 0 316 'h5t_native_double'
-0 320 'h5t_native_integer' 0 322 'h5t_pad_background_f' 0 116
-'h5t_norm_none_f' 0 109 'h5t_norm_implied_f' 0 111 'h5t_native_integer_2'
-0 315 'h5t_native_integer_4' 0 314 'h5t_native_real_16' 0 310
-'h5t_native_real' 0 321 'h5t_native_integer_8' 0 313 'h5t_native_real_4'
-0 312 'h5t_native_real_8' 0 311 'h5t_no_class_f' 0 132 'h5t_norm_msbset_f'
-0 110 'h5t_opaque_f' 0 126 'h5t_order_le_f' 0 122 'h5t_order_be_f' 0 121
-'h5t_order_none_f' 0 119 'h5t_order_vax_f' 0 120 'h5t_std_i32be' 0 301
-'h5t_pad_zero_f' 0 118 'h5t_pad_one_f' 0 117 'h5t_reference_f' 0 124
-'h5t_sgn_error_f' 0 112 'h5t_sgn_2_f' 0 113 'h5t_std_i16le' 0 302
-'h5t_sgn_none_f' 0 114 'h5t_std_i16be' 0 303 'h5t_std_i32le' 0 300
-'h5t_std_i64be' 0 299 'h5t_std_ref_dsetreg' 0 317 'h5t_std_i8le' 0 304
-'h5t_std_i8be' 0 305 'h5t_std_u16be' 0 295 'h5t_std_u32le' 0 292
-'h5t_std_u32be' 0 293 'integer_types' 0 69 'h5t_str_error_f' 0 103
-'h5t_std_u8be' 0 297 'h5t_std_u64le' 0 290 'h5t_std_u64be' 0 291
-'h5t_std_u8le' 0 296 'hssize_t' 0 979 'h5z_disable_edc_f' 0 92
-'h5t_str_nullpad_f' 0 105 'h5t_str_nullterm_f' 0 106 'h5t_string_f' 0
-128 'h5t_string' 0 289 'h5t_str_spacepad_f' 0 104 'h5t_vlen_f' 0 102
-'h5t_time_f' 0 129 'hobj_ref_t_f' 0 977 'h5z_filter_all_f' 0 85
-'h5z_enable_edc_f' 0 91 'h5z_error_edc_f' 0 93 'h5z_filter_error_f' 0 98
-'h5z_filter_decode_enabled_f' 0 86 'h5z_filter_deflate_f' 0 96
-'h5z_filter_encode_enabled_f' 0 87 'hdset_reg_ref_t_f' 0 974 'h5z_flags'
-0 71 'h5z_filter_shuffle_f' 0 95 'h5z_filter_none_f' 0 97
-'h5z_filter_fletcher32_f' 0 94 'h5z_flag_optional_f' 0 88
-'h5z_filter_szip_f' 0 89 'h5z_no_edc_f' 0 90 'h5z_flags_len' 0 971
-'haddr_t' 0 972 'hid_t' 0 973 'hsize_t' 0 976 'predef_types' 0 67
-'object_namelen_default_f' 0 981 'integer_types_len' 0 980
-'ref_reg_buf_len' 0 984 'predef_types_len' 0 982 'size_t' 0 983)
diff --git a/interfaces/ext/hdf5/h5e.mod b/interfaces/ext/hdf5/h5e.mod
deleted file mode 100644
index 961da9b..0000000
--- a/interfaces/ext/hdf5/h5e.mod
+++ /dev/null
@@ -1,1399 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5Eff.f90 on Mon Feb 14 14:35:48 2011
-If you edit this, you'll get what you deserve.
-
-(() ()
-() () () () () () () () () () () () () () () () () () ())
-
-()
-
-()
-
-(('h5l_flags' 2 0) ('h5t_flags' 3 0) ('h5p_flags_int' 4 0) (
-'predefined_types' 5 0) ('h5i_flags' 6 0) ('integer_types' 7 0) (
-'h5r_flags' 8 0) ('h5z_flags' 9 0) ('h5s_flags' 10 0) ('h5d_flags' 11 0)
-('h5fd_hid_flags' 12 0) ('h5fd_flags' 13 0) ('h5g_flags' 14 0) (
-'h5generic_flags' 15 0) ('h5o_flags' 16 0) ('h5lib_flags' 17 0) (
-'h5p_flags' 18 0) ('h5f_flags' 19 0) ('floating_types' 20 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 21 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 22 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 23 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 24 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 25 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 26 ())) ('h5global.eq.6' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 27 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 28 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 29 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 30 ())) ('h5global.eq.10' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 31 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 32 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 33 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.13'
-(VARIABLE (INTEGER 4 ()) 0 34 ())) ('h5global.eq.14' (VARIABLE (INTEGER
-4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 35 ())) ('h5global.eq.15' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 36 ())) (
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '34') 1)))) 'h5global.eq.16' (VARIABLE (
-INTEGER 4 ()) 0 37 ())) ('h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '33') 1)))) 'h5global.eq.17'
-(VARIABLE (INTEGER 4 ()) 0 38 ())) ('h5global.eq.18' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '32') 1))))
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 39 ())) ('h5global.eq.19' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '31') 1)))) 'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 40 ())) (
-'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '30') 1)))) 'h5global.eq.20' (VARIABLE (
-INTEGER 4 ()) 0 41 ())) ('h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21'
-(VARIABLE (INTEGER 4 ()) 0 42 ())) ('h5global.eq.22' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 43 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 44 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 45 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1)))) 'h5global.eq.25'
-(VARIABLE (INTEGER 4 ()) 0 46 ())) ('h5global.eq.26' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '24') 1))))
-'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 47 ())) ('h5global.eq.27' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '23') 1)))) 'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 48 ())) (
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.28' (VARIABLE (
-INTEGER 4 ()) 0 49 ())) ('h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.29'
-(VARIABLE (INTEGER 4 ()) 0 50 ())) ('h5global.eq.30' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 51 ())) ('h5global.eq.31' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 52 ())) (
-'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.32' (VARIABLE (
-INTEGER 4 ()) 0 53 ())) ('h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33'
-(VARIABLE (INTEGER 4 ()) 0 54 ())) ('h5global.eq.34' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 55 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 56 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 57 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.37'
-(VARIABLE (INTEGER 4 ()) 0 58 ())) ('h5global.eq.38' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 59 ())) ('h5global.eq.39' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 60 ())) (
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.40' (VARIABLE (
-INTEGER 4 ()) 0 61 ())) ('h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.41'
-(VARIABLE (INTEGER 4 ()) 0 62 ())) ('h5global.eq.42' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 63 ())) ('h5global.eq.43' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 64 ())) (
-'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.44' (VARIABLE (
-INTEGER 4 ()) 0 65 ())) ('h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45'
-(VARIABLE (INTEGER 4 ()) 0 66 ())) ('h5global.eq.46' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 67 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 68 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 69 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.49'
-(VARIABLE (INTEGER 4 ()) 0 70 ())) ('h5global.eq.50' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 71 ())) ('h5global.eq.51' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 72 ())) (
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.52' (VARIABLE (
-INTEGER 4 ()) 0 73 ())) ('h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.53'
-(VARIABLE (INTEGER 4 ()) 0 74 ())) ('h5global.eq.54' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 75 ())) ('h5global.eq.55' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 76 ())) (
-'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.56' (VARIABLE (
-INTEGER 4 ()) 0 77 ())) ('h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57'
-(VARIABLE (INTEGER 4 ()) 0 78 ())) ('h5global.eq.58' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 79 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 80 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 81 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.61'
-(VARIABLE (INTEGER 4 ()) 0 82 ())) ('h5global.eq.62' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 83 ())) ('h5global.eq.63' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 84 ())) (
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.64' (VARIABLE (
-INTEGER 4 ()) 0 85 ())) ('h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.65'
-(VARIABLE (INTEGER 4 ()) 0 86 ())) ('h5global.eq.66' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 87 ())) ('h5global.eq.67' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 88 ())) (
-'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.68' (VARIABLE (
-INTEGER 4 ()) 0 89 ())) ('h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69'
-(VARIABLE (INTEGER 4 ()) 0 90 ())) ('h5global.eq.70' (VARIABLE (INTEGER
-4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 91 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 92 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 93 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 4 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.73'
-(VARIABLE (INTEGER 4 ()) 0 94 ())) ('h5global.eq.74' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 95 ())) ('h5global.eq.75' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 96 ())) (
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.76' (VARIABLE (
-INTEGER 4 ()) 0 97 ())) ('h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.77'
-(VARIABLE (INTEGER 4 ()) 0 98 ())) ('h5global.eq.78' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 99 ())) ('h5global.eq.79' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 100 ())) (
-'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.80' (VARIABLE (
-INTEGER 4 ()) 0 101 ())) ('h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81'
-(VARIABLE (INTEGER 4 ()) 0 102 ())) ('h5global.eq.82' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 103 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 104 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 105 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.85'
-(VARIABLE (INTEGER 4 ()) 0 106 ())) ('h5global.eq.86' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 107 ())) ('h5global.eq.87' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 108 ())) (
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.88' (VARIABLE (
-INTEGER 4 ()) 0 109 ())) ('h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.89'
-(VARIABLE (INTEGER 4 ()) 0 110 ())) ('h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 111 ())) ('h5global.eq.91' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 112 ())) (
-'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.92' (VARIABLE (
-INTEGER 4 ()) 0 113 ())) ('h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93'
-(VARIABLE (INTEGER 4 ()) 0 114 ())) ('h5global.eq.94' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 115 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 116 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 117 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.97'
-(VARIABLE (INTEGER 4 ()) 0 118 ())) ('h5global.eq.98' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 119 ())) ('h5global.eq.99' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 120 ())) (
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.100' (VARIABLE (
-INTEGER 4 ()) 0 121 ())) ('h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 122 ())) ('h5global.eq.102'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 123 ())) (
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.103' (VARIABLE (
-INTEGER 4 ()) 0 124 ())) ('h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 125 ())) ('h5global.eq.105'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 126 ())) (
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.106' (VARIABLE (
-INTEGER 4 ()) 0 127 ())) ('h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 128 ())) ('h5global.eq.108'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 129 ())) (
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.109' (VARIABLE (
-INTEGER 4 ()) 0 130 ())) ('h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 131 ())) ('h5global.eq.111'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 132 ())) (
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.112' (VARIABLE (
-INTEGER 4 ()) 0 133 ())) ('h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 134 ())) ('h5global.eq.114'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 135 ())) (
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.115' (VARIABLE (
-INTEGER 4 ()) 0 136 ())) ('h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 2
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 137 ())) ('h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 138 ())) ('h5global.eq.118'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 139 ())) (
-'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.119' (VARIABLE (
-INTEGER 4 ()) 0 140 ())) ('h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120'
-(VARIABLE (INTEGER 4 ()) 0 141 ())) ('h5global.eq.121' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 142 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 143 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 144 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.124'
-(VARIABLE (INTEGER 4 ()) 0 145 ())) ('h5global.eq.125' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 146 ())) ('h5global.eq.126'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 147 ())) (
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.127' (VARIABLE (
-INTEGER 4 ()) 0 148 ())) ('h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 149 ())) ('h5global.eq.129'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 150 ())) (
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.130' (VARIABLE (
-INTEGER 4 ()) 0 151 ())) ('h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 152 ())) ('h5global.eq.132'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 153 ())) (
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.133' (VARIABLE (
-INTEGER 4 ()) 0 154 ())) ('h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 155 ())) ('h5global.eq.135'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 156 ())) (
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.136' (VARIABLE (
-INTEGER 4 ()) 0 157 ())) ('h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 158 ())) ('h5global.eq.138'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 159 ())) (
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.139' (VARIABLE (
-INTEGER 4 ()) 0 160 ())) ('h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 161 ())) ('h5global.eq.141'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 162 ())) (
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.142' (VARIABLE (
-INTEGER 4 ()) 0 163 ())) ('h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 164 ())) ('h5global.eq.144'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 165 ())) (
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.145' (VARIABLE (
-INTEGER 4 ()) 0 166 ())) ('h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1))))
-'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 167 ())) ('h5global.eq.147'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 168 ())) (
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.148' (VARIABLE (
-INTEGER 4 ()) 0 169 ())) ('h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 170 ())) ('h5global.eq.150'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 171 ())) (
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.151' (VARIABLE (
-INTEGER 4 ()) 0 172 ())) ('h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 173 ())) ('h5global.eq.153'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 174 ())) (
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.154' (VARIABLE (
-INTEGER 4 ()) 0 175 ())) ('h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 176 ())) ('h5global.eq.156'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 177 ())) (
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.157' (VARIABLE (
-INTEGER 4 ()) 0 178 ())) ('h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 179 ())) ('h5global.eq.159'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ())) (
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.160' (VARIABLE (
-INTEGER 4 ()) 0 181 ())) ('h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 182 ())) ('h5global.eq.162'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 183 ())) (
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.163' (VARIABLE (
-INTEGER 4 ()) 0 184 ())) ('h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 185 ())) ('h5global.eq.165'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 186 ())) (
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.166' (VARIABLE (
-INTEGER 4 ()) 0 187 ())) ('h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 188 ())) ('h5global.eq.168'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ())) (
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.169' (VARIABLE (
-INTEGER 4 ()) 0 190 ())) ('h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 191 ())) ('h5global.eq.171'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 192 ())) (
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.172' (VARIABLE (
-INTEGER 4 ()) 0 193 ())) ('h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 194 ())) ('h5global.eq.174'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 195 ())) (
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.175' (VARIABLE (
-INTEGER 4 ()) 0 196 ())) ('h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 197 ())) ('h5global.eq.177'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 198 ())) (
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.178' (VARIABLE (
-INTEGER 4 ()) 0 199 ())) ('h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.180'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.181' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.183'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 204 ())) (
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.184' (VARIABLE (
-INTEGER 4 ()) 0 205 ())) ('h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 206 ())) ('h5global.eq.186'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 207 ())) (
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.187' (VARIABLE (
-INTEGER 4 ()) 0 208 ())) ('h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 209 ())) ('h5global.eq.189'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 210 ())) (
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.190' (VARIABLE (
-INTEGER 4 ()) 0 211 ())) ('h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 212 ())) ('h5global.eq.192'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ())) (
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.193' (VARIABLE (
-INTEGER 4 ()) 0 214 ())) ('h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 215 ())) ('h5global.eq.195'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 216 ())) (
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.196' (VARIABLE (
-INTEGER 4 ()) 0 217 ())) ('h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 218 ())) ('h5global.eq.198'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 219 ())) (
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.199' (VARIABLE (
-INTEGER 4 ()) 0 220 ())) ('h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 221 ())) ('h5global.eq.201'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 222 ())) (
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.202' (VARIABLE (
-INTEGER 4 ()) 0 223 ())) ('h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.204'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.205' (VARIABLE (
-INTEGER 4 ()) 0 226 ())) ('h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.207'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 228 ())) (
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.208' (VARIABLE (
-INTEGER 4 ()) 0 229 ())) ('h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 230 ())) ('h5global.eq.210'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 231 ())) (
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.211' (VARIABLE (
-INTEGER 4 ()) 0 232 ())) ('h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 233 ())) ('h5global.eq.213'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 234 ())) (
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.214' (VARIABLE (
-INTEGER 4 ()) 0 235 ())) ('h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.217'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.218' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219'
-(VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.220' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.232'
-(VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.233' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 254 ())) ('h5global.eq.234'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 255 ())) (
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.235' (VARIABLE (
-INTEGER 4 ()) 0 256 ())) ('h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 257 ())) ('h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.238'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.239' (VARIABLE (
-INTEGER 4 ()) 0 260 ())))
-
-(20 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-261 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-262 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-263 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-264 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-265 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-266 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-267 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-268 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-269 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-270 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-207 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-208 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-205 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-206 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-200 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-272 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-273 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-274 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-21 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-22 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-183 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-180 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-184 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-167 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-166 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-168 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-185 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-181 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-187 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-174 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-186 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-170 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-171 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-172 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-173 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-11 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-176 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-179 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-177 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-277 'h5e' 'h5e' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-278 'h5eclear_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 279 0 (280) () 0 () ())
-178 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-169 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-281 'h5eget_major_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 282 0 (283 284 285 286) () 0 () ())
-223 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'h5eset_auto_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 288 0 (289 290) () 0 () ())
-291 'h5eprint_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 292 0 (293 294) () 0 () ())
-216 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-217 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-210 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-295 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '19') () 0 ()
-())
-19 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-211 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-213 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-220 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-215 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-13 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-153 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-296 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-12 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-154 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-160 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-152 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-297 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-158 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-157 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-159 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-163 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-164 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-161 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-151 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-156 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-155 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-162 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-150 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-149 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-298 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-14 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-299 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '12') () 0 ()
-())
-198 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-195 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-194 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-197 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-189 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-192 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-193 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-148 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-165 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-218 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-300 'h5eget_minor_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 301 0 (302 303 304) () 0 () ())
-175 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-190 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-191 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-15 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9')) 0 () ())
-199 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-141 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-142 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-305 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(UNKNOWN 0 ()) 0 0 () () 0 () ())
-144 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-143 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-306 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-196 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-6 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-307 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6') () 0 () ())
-2 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-146 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-308 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7') () 0 () ())
-147 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-140 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-139 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-17 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-138 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-309 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-128 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-137 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-136 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-129 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-133 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-131 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-132 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-134 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-135 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-145 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-310 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-16 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-118 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-115 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-130 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-117 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-116 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-120 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-125 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-124 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-113 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-122 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-121 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-127 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-114 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-98 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-126 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-104 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-110 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-93 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-94 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-101 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-100 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-109 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-123 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-112 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-111 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-107 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-18 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-4 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-311 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-102 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-103 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-96 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-97 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-106 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-105 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-95 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-312 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '18') () 0 ()
-())
-108 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-119 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-188 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-92 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-313 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2') () 0 () ())
-8 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-91 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-10 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-88 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-90 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-75 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-71 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-314 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '20') () 0 ()
-())
-84 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-73 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-82 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-74 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-72 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-83 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-76 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-86 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-80 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-87 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-81 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-77 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-65 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-39 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-85 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-89 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-63 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-79 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-38 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-45 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-37 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-315 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '34') () 0 ()
-())
-3 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-68 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-69 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-258 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-70 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-48 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-49 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-59 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-58 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-57 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-60 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-64 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-47 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-54 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-55 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-51 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-52 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-50 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-62 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-56 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-53 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-242 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-61 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-46 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-78 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-231 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-42 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-227 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-67 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-40 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-66 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-44 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-43 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-31 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-29 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-25 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-34 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-24 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-32 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-35 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-27 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-26 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-33 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-316 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '14') () 0 ()
-())
-317 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-28 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-9 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-318 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-319 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((320 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-36 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-23 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-321 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-322 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((323 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-30 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-324 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-41 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-325 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-326 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-327 'printoff' 'h5e' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0') () 0 () ())
-328 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-5 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-329 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-330 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-331 'printon' 'h5e' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-7 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-230 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-99 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-304 'hdferr' '' 301 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-290 'hdferr' '' 288 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-289 'printflag' '' 288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-302 'error_no' '' 301 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-303 'name' '' 301 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-280 'hdferr' '' 279 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-294 'name' '' 292 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-293 'hdferr' '' 292 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-284 'name' '' 282 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-283 'error_no' '' 282 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-286 'hdferr' '' 282 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-285 'namelen' '' 282 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-)
-
-('h5p_string_create_f' 0 99 'h5g_storage_type_dense_f' 0 188
-'h5d_fill_time_error_f' 0 175 'floating_types_len' 0 275 '__convert_i4_i8'
-0 261 'floating_types' 0 20 'h5d_alloc_time_early_f' 0 182
-'h5d_alloc_time_default_f' 0 183 'h5_iter_unknown_f' 0 204
-'fortran_integer_1' 0 273 'fortran_double' 0 263 'fortran_integer' 0 262
-'fortran_real_4' 0 272 'fortran_integer_2' 0 269 'fortran_real' 0 268
-'fortran_integer_4' 0 265 'fortran_integer_8' 0 264 'fortran_real_12' 0
-267 'fortran_real_16' 0 266 'h5_integer_kind' 0 271 'h5_index_crt_order_f'
-0 206 'fortran_real_8' 0 270 'h5_index_n_f' 0 205 'h5_index_unknown_f' 0
-208 'h5_index_name_f' 0 207 'h5_iter_dec_f' 0 202 'h5_iter_native_f' 0
-201 'h5_iter_n_f' 0 200 'h5_iter_inc_f' 0 203 'h5_szip_ec_om_f' 0 22
-'h5_real_kind' 0 274 'h5_szip_nn_om_f' 0 21 'h5d_contiguous_f' 0 186
-'h5d_compact_f' 0 187 'h5d_alloc_time_late_f' 0 181
-'h5d_alloc_time_error_f' 0 184 'h5d_alloc_time_incr_f' 0 180
-'h5d_chunked_f' 0 185 'h5d_chunk_cache_nslots_dflt_f' 0 168
-'h5d_chunk_cache_nbytes_dflt_f' 0 167 'h5d_chunk_cache_w0_dflt_f' 0 166
-'h5d_fill_time_alloc_f' 0 174 'h5eget_minor_f' 0 300 'h5eget_major_f' 0
-281 'h5d_fill_value_user_defined_f' 0 169 'h5d_fill_time_never_f' 0 173
-'h5d_fill_value_error_f' 0 172 'h5d_fill_value_default_f' 0 170
-'h5d_fill_value_undefined_f' 0 171 'h5d_space_sts_not_allocated_f' 0 178
-'h5d_space_sts_error_f' 0 179 'h5d_flags_len' 0 276 'h5d_flags' 0 11
-'h5d_space_sts_allocated_f' 0 176 'h5eclear_f' 0 278 'h5e' 0 277
-'h5d_space_sts_part_allocated_f' 0 177 'h5f_close_weak_f' 0 218
-'h5f_close_default_f' 0 219 'h5eprint_f' 0 291 'h5eset_auto_f' 0 287
-'h5f_acc_trunc_f' 0 224 'h5f_acc_rdonly_f' 0 225 'h5f_acc_debug_f' 0 222
-'h5f_acc_excl_f' 0 223 'h5f_acc_rdwr_f' 0 226 'h5f_close_semi_f' 0 217
-'h5f_close_strong_f' 0 216 'h5fd_mpio_independent_f' 0 165
-'h5fd_mem_default_f' 0 162 'h5fd_hid_flags_len' 0 297 'h5fd_core_f' 0
-154 'h5f_obj_file_f' 0 215 'h5f_libver_latest_f' 0 209 'h5f_flags' 0 19
-'h5f_flags_len' 0 295 'h5f_libver_earliest_f' 0 210 'h5f_obj_datatype_f'
-0 212 'h5f_obj_dataset_f' 0 214 'h5f_obj_all_f' 0 211 'h5f_scope_global_f'
-0 220 'h5f_obj_group_f' 0 213 'h5f_scope_local_f' 0 221 'h5fd_hid_flags'
-0 12 'h5fd_flags_len' 0 296 'h5fd_family_f' 0 153 'h5fd_flags' 0 13
-'h5fd_log_f' 0 152 'h5fd_mem_btree_f' 0 160 'h5fd_mem_ntypes_f' 0 155
-'h5fd_mem_nolist_f' 0 163 'h5fd_mem_draw_f' 0 159 'h5fd_mem_lheap_f' 0
-157 'h5fd_mem_gheap_f' 0 158 'h5fd_mem_ohdr_f' 0 156 'h5fd_mpio_f' 0 151
-'h5fd_mem_super_f' 0 161 'h5fd_mpio_collective_f' 0 164 'h5fd_stdio_f' 0
-148 'h5fd_sec2_f' 0 149 'h5fd_multi_f' 0 150 'h5g_link_hard_f' 0 193
-'h5g_dataset_f' 0 197 'h5fortran_types' 0 298 'h5g_link_error_f' 0 194
-'h5g_group_f' 0 198 'h5g_flags_len' 0 299 'h5g_flags' 0 14 'h5g_link_f'
-0 195 'h5g_link_soft_f' 0 192 'h5g_storage_type_compact_f' 0 189
-'h5o_hdr_attr_crt_order_track_f' 0 119 'h5o_copy_without_attr_flag_f' 0
-130 'h5i_datatype_f' 0 145 'h5g_type_f' 0 196 'h5g_storage_type_unknown_f'
-0 191 'h5g_storage_type_symbol_table_f' 0 190 'h5generic_flags_len' 0
-306 'h5g_unknown_f' 0 199 'h5generic_flags' 0 15 'h5i_dataset_f' 0 143
-'h5global' 0 305 'h5i_attr_f' 0 142 'h5i_badid_f' 0 141 'h5i_dataspace_f'
-0 144 'h5l_link_class_t_vers_f' 0 135 'h5i_file_f' 0 147 'h5i_flags_len'
-0 308 'h5i_flags' 0 6 'h5i_group_f' 0 146 'h5l_flags' 0 2 'h5l_flags_len'
-0 307 'h5o_copy_shallow_hierarchy_f' 0 134 'h5o_copy_expand_ext_link_f'
-0 132 'h5l_same_loc_f' 0 136 'h5l_type_external_f' 0 137
-'h5l_type_error_f' 0 140 'h5o_copy_all_f' 0 128 'h5lib_flags_len' 0 309
-'h5l_type_soft_f' 0 138 'h5l_type_hard_f' 0 139 'h5lib_flags' 0 17
-'h5o_copy_expand_reference_f' 0 131 'h5o_copy_expand_soft_link_f' 0 133
-'h5o_copy_preserve_null_flag_f' 0 129 'h5o_hdr_all_flags_f' 0 115
-'h5o_flags' 0 16 'h5o_flags_len' 0 310 'h5o_hdr_attr_crt_order_index_f'
-0 118 'h5p_file_mount_f' 0 108 'h5p_default_f' 0 107
-'h5o_shmesg_pline_flag_f' 0 123 'h5o_shmesg_max_nindexes_f' 0 114
-'h5o_shmesg_all_flag_f' 0 121 'h5o_hdr_chunk0_size_f' 0 120
-'h5o_hdr_attr_store_phase_cha_f' 0 117 'h5o_hdr_store_times_f' 0 116
-'h5o_shmesg_attr_flag_f' 0 122 'h5o_shmesg_max_list_size_f' 0 113
-'h5o_shmesg_fill_flag_f' 0 124 'h5o_shmesg_dtype_flag_f' 0 125
-'h5o_shmesg_none_flag_f' 0 127 'h5p_dataset_xfer_f' 0 109
-'h5p_crt_order_indexed_f' 0 94 'h5o_shmesg_sdspace_flag_f' 0 126
-'h5p_attribute_create_f' 0 98 'h5p_crt_order_tracked_f' 0 93
-'h5p_dataset_create_f' 0 110 'h5p_dataset_access_f' 0 104
-'h5p_datatype_access_f' 0 100 'h5p_datatype_create_f' 0 101
-'h5p_file_access_f' 0 111 'h5p_file_create_f' 0 112 'h5p_flags_len' 0
-312 'h5p_flags_int_len' 0 311 'h5p_flags_int' 0 4 'h5p_flags' 0 18
-'h5p_link_access_f' 0 95 'h5p_group_create_f' 0 103 'h5p_group_access_f'
-0 102 'h5p_object_create_f' 0 105 'h5p_object_copy_f' 0 97
-'h5p_link_create_f' 0 96 'h5p_root_f' 0 106 'h5t_std_u16le' 0 232
-'h5s_select_append_f' 0 78 'h5s_sel_hyperslabs_f' 0 72 'h5s_all_f' 0 84
-'h5r_dataset_region_f' 0 91 'h5r_flags' 0 8 'h5r_flags_len' 0 313
-'h5r_object_f' 0 92 'h5s_flags_len' 0 314 'h5s_flags' 0 10 'h5s_sel_all_f'
-0 71 'h5s_scalar_f' 0 90 'h5s_null_f' 0 88 'h5s_sel_error_f' 0 75
-'h5s_sel_none_f' 0 74 'h5s_select_and_f' 0 82 'h5s_sel_points_f' 0 73
-'h5t_cset_ascii_f' 0 46 'h5s_select_nota_f' 0 79 'h5s_select_invalid_f'
-0 76 'h5s_select_noop_f' 0 83 'h5t_compound_f' 0 63 'h5s_simple_f' 0 89
-'h5s_select_prepend_f' 0 77 'h5s_select_notb_f' 0 80 'h5s_select_or_f' 0
-86 'h5s_select_xor_f' 0 81 'h5s_select_set_f' 0 87 'h5s_unlimited_f' 0
-85 'h5t_array_f' 0 39 'h5t_bitfield_f' 0 65 'h5t_enum_f' 0 61
-'h5t_dir_descend_f' 0 37 'h5t_cset_utf8_f' 0 45 'h5t_dir_ascend_f' 0 38
-'h5t_std_ref_obj' 0 256 'h5t_native_character' 0 257 'h5t_ieee_f32be' 0
-247 'h5t_float_f' 0 68 'h5t_flags' 0 3 'h5t_flags_len' 0 315
-'h5t_ieee_f64le' 0 244 'h5t_ieee_f64be' 0 245 'h5t_ieee_f32le' 0 246
-'h5t_integer_f' 0 69 'h5t_std_i64le' 0 236 'h5t_pad_error_f' 0 53
-'h5t_native_integer_1' 0 254 'h5t_native_double' 0 258
-'h5t_native_integer' 0 260 'h5t_pad_background_f' 0 54 'h5t_norm_none_f'
-0 47 'h5t_norm_implied_f' 0 49 'h5t_native_integer_2' 0 253
-'h5t_native_integer_4' 0 252 'h5t_native_real_16' 0 248 'h5t_native_real'
-0 259 'h5t_native_integer_8' 0 251 'h5t_native_real_4' 0 250
-'h5t_native_real_8' 0 249 'h5t_no_class_f' 0 70 'h5t_norm_msbset_f' 0 48
-'h5t_opaque_f' 0 64 'h5t_order_le_f' 0 60 'h5t_order_be_f' 0 59
-'h5t_order_none_f' 0 57 'h5t_order_vax_f' 0 58 'h5t_std_i32be' 0 239
-'h5t_pad_zero_f' 0 56 'h5t_pad_one_f' 0 55 'h5t_reference_f' 0 62
-'h5t_sgn_error_f' 0 50 'h5t_sgn_2_f' 0 51 'h5t_std_i16le' 0 240
-'h5t_sgn_none_f' 0 52 'h5t_std_i16be' 0 241 'h5t_std_i32le' 0 238
-'h5t_std_i64be' 0 237 'h5t_std_ref_dsetreg' 0 255 'h5t_std_i8le' 0 242
-'h5t_std_i8be' 0 243 'h5t_std_u16be' 0 233 'h5t_std_u32le' 0 230
-'h5t_std_u32be' 0 231 'integer_types' 0 7 'h5t_str_error_f' 0 41
-'h5t_std_u8be' 0 235 'h5t_std_u64le' 0 228 'h5t_std_u64be' 0 229
-'h5t_std_u8le' 0 234 'hssize_t' 0 324 'h5z_disable_edc_f' 0 30
-'h5t_str_nullpad_f' 0 43 'h5t_str_nullterm_f' 0 44 'h5t_string_f' 0 66
-'h5t_string' 0 227 'h5t_str_spacepad_f' 0 42 'h5t_vlen_f' 0 40
-'h5t_time_f' 0 67 'hobj_ref_t_f' 0 322 'h5z_filter_all_f' 0 23
-'h5z_enable_edc_f' 0 29 'h5z_error_edc_f' 0 31 'h5z_filter_error_f' 0 36
-'h5z_filter_decode_enabled_f' 0 24 'h5z_filter_deflate_f' 0 34
-'h5z_filter_encode_enabled_f' 0 25 'hdset_reg_ref_t_f' 0 319 'h5z_flags'
-0 9 'h5z_filter_shuffle_f' 0 33 'h5z_filter_none_f' 0 35
-'h5z_filter_fletcher32_f' 0 32 'h5z_flag_optional_f' 0 26
-'h5z_filter_szip_f' 0 27 'h5z_no_edc_f' 0 28 'h5z_flags_len' 0 316
-'haddr_t' 0 317 'hid_t' 0 318 'hsize_t' 0 321 'printon' 0 331
-'predef_types' 0 5 'object_namelen_default_f' 0 326 'integer_types_len'
-0 325 'predef_types_len' 0 328 'printoff' 0 327 'ref_reg_buf_len' 0 330
-'size_t' 0 329)
diff --git a/interfaces/ext/hdf5/h5f.mod b/interfaces/ext/hdf5/h5f.mod
deleted file mode 100644
index c6c1038..0000000
--- a/interfaces/ext/hdf5/h5f.mod
+++ /dev/null
@@ -1,1513 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5Fff.f90 on Mon Feb 14 14:35:49 2011
-If you edit this, you'll get what you deserve.
-
-(() ()
-() () () () () () () () () () () () () () () () () () ())
-
-()
-
-()
-
-(('h5l_flags' 2 0) ('h5t_flags' 3 0) ('h5p_flags_int' 4 0) (
-'predefined_types' 5 0) ('h5i_flags' 6 0) ('integer_types' 7 0) (
-'h5r_flags' 8 0) ('h5z_flags' 9 0) ('h5s_flags' 10 0) ('h5d_flags' 11 0)
-('h5fd_hid_flags' 12 0) ('h5fd_flags' 13 0) ('h5g_flags' 14 0) (
-'h5generic_flags' 15 0) ('h5o_flags' 16 0) ('h5lib_flags' 17 0) (
-'h5p_flags' 18 0) ('h5f_flags' 19 0) ('floating_types' 20 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 21 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 22 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 23 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 24 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 25 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 26 ())) ('h5global.eq.6' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 27 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 28 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 29 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 30 ())) ('h5global.eq.10' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 31 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 32 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 33 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.13'
-(VARIABLE (INTEGER 4 ()) 0 34 ())) ('h5global.eq.14' (VARIABLE (INTEGER
-4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 35 ())) ('h5global.eq.15' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 36 ())) (
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '34') 1)))) 'h5global.eq.16' (VARIABLE (
-INTEGER 4 ()) 0 37 ())) ('h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '33') 1)))) 'h5global.eq.17'
-(VARIABLE (INTEGER 4 ()) 0 38 ())) ('h5global.eq.18' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '32') 1))))
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 39 ())) ('h5global.eq.19' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '31') 1)))) 'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 40 ())) (
-'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '30') 1)))) 'h5global.eq.20' (VARIABLE (
-INTEGER 4 ()) 0 41 ())) ('h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21'
-(VARIABLE (INTEGER 4 ()) 0 42 ())) ('h5global.eq.22' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 43 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 44 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 45 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1)))) 'h5global.eq.25'
-(VARIABLE (INTEGER 4 ()) 0 46 ())) ('h5global.eq.26' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '24') 1))))
-'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 47 ())) ('h5global.eq.27' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '23') 1)))) 'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 48 ())) (
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.28' (VARIABLE (
-INTEGER 4 ()) 0 49 ())) ('h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.29'
-(VARIABLE (INTEGER 4 ()) 0 50 ())) ('h5global.eq.30' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 51 ())) ('h5global.eq.31' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 52 ())) (
-'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.32' (VARIABLE (
-INTEGER 4 ()) 0 53 ())) ('h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33'
-(VARIABLE (INTEGER 4 ()) 0 54 ())) ('h5global.eq.34' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 55 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 56 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 57 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.37'
-(VARIABLE (INTEGER 4 ()) 0 58 ())) ('h5global.eq.38' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 59 ())) ('h5global.eq.39' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 60 ())) (
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.40' (VARIABLE (
-INTEGER 4 ()) 0 61 ())) ('h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.41'
-(VARIABLE (INTEGER 4 ()) 0 62 ())) ('h5global.eq.42' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 63 ())) ('h5global.eq.43' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 64 ())) (
-'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.44' (VARIABLE (
-INTEGER 4 ()) 0 65 ())) ('h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45'
-(VARIABLE (INTEGER 4 ()) 0 66 ())) ('h5global.eq.46' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 67 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 68 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 69 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.49'
-(VARIABLE (INTEGER 4 ()) 0 70 ())) ('h5global.eq.50' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 71 ())) ('h5global.eq.51' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 72 ())) (
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.52' (VARIABLE (
-INTEGER 4 ()) 0 73 ())) ('h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.53'
-(VARIABLE (INTEGER 4 ()) 0 74 ())) ('h5global.eq.54' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 75 ())) ('h5global.eq.55' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 76 ())) (
-'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.56' (VARIABLE (
-INTEGER 4 ()) 0 77 ())) ('h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57'
-(VARIABLE (INTEGER 4 ()) 0 78 ())) ('h5global.eq.58' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 79 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 80 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 81 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.61'
-(VARIABLE (INTEGER 4 ()) 0 82 ())) ('h5global.eq.62' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 83 ())) ('h5global.eq.63' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 84 ())) (
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.64' (VARIABLE (
-INTEGER 4 ()) 0 85 ())) ('h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.65'
-(VARIABLE (INTEGER 4 ()) 0 86 ())) ('h5global.eq.66' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 87 ())) ('h5global.eq.67' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 88 ())) (
-'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.68' (VARIABLE (
-INTEGER 4 ()) 0 89 ())) ('h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69'
-(VARIABLE (INTEGER 4 ()) 0 90 ())) ('h5global.eq.70' (VARIABLE (INTEGER
-4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 91 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 92 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 93 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 4 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.73'
-(VARIABLE (INTEGER 4 ()) 0 94 ())) ('h5global.eq.74' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 95 ())) ('h5global.eq.75' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 96 ())) (
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.76' (VARIABLE (
-INTEGER 4 ()) 0 97 ())) ('h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.77'
-(VARIABLE (INTEGER 4 ()) 0 98 ())) ('h5global.eq.78' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 99 ())) ('h5global.eq.79' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 100 ())) (
-'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.80' (VARIABLE (
-INTEGER 4 ()) 0 101 ())) ('h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81'
-(VARIABLE (INTEGER 4 ()) 0 102 ())) ('h5global.eq.82' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 103 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 104 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 105 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.85'
-(VARIABLE (INTEGER 4 ()) 0 106 ())) ('h5global.eq.86' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 107 ())) ('h5global.eq.87' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 108 ())) (
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.88' (VARIABLE (
-INTEGER 4 ()) 0 109 ())) ('h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.89'
-(VARIABLE (INTEGER 4 ()) 0 110 ())) ('h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 111 ())) ('h5global.eq.91' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 112 ())) (
-'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.92' (VARIABLE (
-INTEGER 4 ()) 0 113 ())) ('h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93'
-(VARIABLE (INTEGER 4 ()) 0 114 ())) ('h5global.eq.94' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 115 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 116 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 117 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.97'
-(VARIABLE (INTEGER 4 ()) 0 118 ())) ('h5global.eq.98' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 119 ())) ('h5global.eq.99' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 120 ())) (
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.100' (VARIABLE (
-INTEGER 4 ()) 0 121 ())) ('h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 122 ())) ('h5global.eq.102'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 123 ())) (
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.103' (VARIABLE (
-INTEGER 4 ()) 0 124 ())) ('h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 125 ())) ('h5global.eq.105'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 126 ())) (
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.106' (VARIABLE (
-INTEGER 4 ()) 0 127 ())) ('h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 128 ())) ('h5global.eq.108'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 129 ())) (
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.109' (VARIABLE (
-INTEGER 4 ()) 0 130 ())) ('h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 131 ())) ('h5global.eq.111'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 132 ())) (
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.112' (VARIABLE (
-INTEGER 4 ()) 0 133 ())) ('h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 134 ())) ('h5global.eq.114'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 135 ())) (
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.115' (VARIABLE (
-INTEGER 4 ()) 0 136 ())) ('h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 2
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 137 ())) ('h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 138 ())) ('h5global.eq.118'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 139 ())) (
-'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.119' (VARIABLE (
-INTEGER 4 ()) 0 140 ())) ('h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120'
-(VARIABLE (INTEGER 4 ()) 0 141 ())) ('h5global.eq.121' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 142 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 143 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 144 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.124'
-(VARIABLE (INTEGER 4 ()) 0 145 ())) ('h5global.eq.125' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 146 ())) ('h5global.eq.126'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 147 ())) (
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.127' (VARIABLE (
-INTEGER 4 ()) 0 148 ())) ('h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 149 ())) ('h5global.eq.129'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 150 ())) (
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.130' (VARIABLE (
-INTEGER 4 ()) 0 151 ())) ('h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 152 ())) ('h5global.eq.132'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 153 ())) (
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.133' (VARIABLE (
-INTEGER 4 ()) 0 154 ())) ('h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 155 ())) ('h5global.eq.135'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 156 ())) (
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.136' (VARIABLE (
-INTEGER 4 ()) 0 157 ())) ('h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 158 ())) ('h5global.eq.138'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 159 ())) (
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.139' (VARIABLE (
-INTEGER 4 ()) 0 160 ())) ('h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 161 ())) ('h5global.eq.141'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 162 ())) (
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.142' (VARIABLE (
-INTEGER 4 ()) 0 163 ())) ('h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 164 ())) ('h5global.eq.144'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 165 ())) (
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.145' (VARIABLE (
-INTEGER 4 ()) 0 166 ())) ('h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1))))
-'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 167 ())) ('h5global.eq.147'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 168 ())) (
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.148' (VARIABLE (
-INTEGER 4 ()) 0 169 ())) ('h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 170 ())) ('h5global.eq.150'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 171 ())) (
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.151' (VARIABLE (
-INTEGER 4 ()) 0 172 ())) ('h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 173 ())) ('h5global.eq.153'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 174 ())) (
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.154' (VARIABLE (
-INTEGER 4 ()) 0 175 ())) ('h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 176 ())) ('h5global.eq.156'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 177 ())) (
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.157' (VARIABLE (
-INTEGER 4 ()) 0 178 ())) ('h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 179 ())) ('h5global.eq.159'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ())) (
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.160' (VARIABLE (
-INTEGER 4 ()) 0 181 ())) ('h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 182 ())) ('h5global.eq.162'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 183 ())) (
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.163' (VARIABLE (
-INTEGER 4 ()) 0 184 ())) ('h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 185 ())) ('h5global.eq.165'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 186 ())) (
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.166' (VARIABLE (
-INTEGER 4 ()) 0 187 ())) ('h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 188 ())) ('h5global.eq.168'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ())) (
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.169' (VARIABLE (
-INTEGER 4 ()) 0 190 ())) ('h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 191 ())) ('h5global.eq.171'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 192 ())) (
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.172' (VARIABLE (
-INTEGER 4 ()) 0 193 ())) ('h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 194 ())) ('h5global.eq.174'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 195 ())) (
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.175' (VARIABLE (
-INTEGER 4 ()) 0 196 ())) ('h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 197 ())) ('h5global.eq.177'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 198 ())) (
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.178' (VARIABLE (
-INTEGER 4 ()) 0 199 ())) ('h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.180'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.181' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.183'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 204 ())) (
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.184' (VARIABLE (
-INTEGER 4 ()) 0 205 ())) ('h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 206 ())) ('h5global.eq.186'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 207 ())) (
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.187' (VARIABLE (
-INTEGER 4 ()) 0 208 ())) ('h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 209 ())) ('h5global.eq.189'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 210 ())) (
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.190' (VARIABLE (
-INTEGER 4 ()) 0 211 ())) ('h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 212 ())) ('h5global.eq.192'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ())) (
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.193' (VARIABLE (
-INTEGER 4 ()) 0 214 ())) ('h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 215 ())) ('h5global.eq.195'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 216 ())) (
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.196' (VARIABLE (
-INTEGER 4 ()) 0 217 ())) ('h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 218 ())) ('h5global.eq.198'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 219 ())) (
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.199' (VARIABLE (
-INTEGER 4 ()) 0 220 ())) ('h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 221 ())) ('h5global.eq.201'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 222 ())) (
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.202' (VARIABLE (
-INTEGER 4 ()) 0 223 ())) ('h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.204'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.205' (VARIABLE (
-INTEGER 4 ()) 0 226 ())) ('h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.207'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 228 ())) (
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.208' (VARIABLE (
-INTEGER 4 ()) 0 229 ())) ('h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 230 ())) ('h5global.eq.210'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 231 ())) (
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.211' (VARIABLE (
-INTEGER 4 ()) 0 232 ())) ('h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 233 ())) ('h5global.eq.213'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 234 ())) (
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.214' (VARIABLE (
-INTEGER 4 ()) 0 235 ())) ('h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.217'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.218' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219'
-(VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.220' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.232'
-(VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.233' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 254 ())) ('h5global.eq.234'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 255 ())) (
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.235' (VARIABLE (
-INTEGER 4 ()) 0 256 ())) ('h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 257 ())) ('h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.238'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.239' (VARIABLE (
-INTEGER 4 ()) 0 260 ())))
-
-(20 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-261 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-262 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-263 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-264 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-265 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-266 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-267 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-268 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-269 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-270 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-207 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-208 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-205 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-206 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-200 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-272 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-273 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-274 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-21 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-22 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-183 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-180 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-184 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-167 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-166 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-168 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-185 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-181 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-187 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-174 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-186 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-170 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-171 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-172 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-173 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-11 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-176 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-179 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-177 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-277 'h5f' 'h5f' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-223 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-216 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-217 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-178 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-169 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-210 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-278 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '19') () 0 ()
-())
-19 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-211 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-213 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5fclose_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 280 0 (281 282) () 0 () ())
-220 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-215 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'h5fcreate_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 284 0 (285 286 287 288 289
-290) () 0 () ())
-13 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-153 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-291 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-12 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-154 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-160 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-152 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-292 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-158 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-157 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-159 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-163 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-164 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-161 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-151 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-156 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-155 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-162 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-150 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-149 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-293 'h5fget_create_plist_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 294 0 (295 296 297) () 0 ()
-())
-298 'h5fget_access_plist_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 299 0 (300 301 302) () 0 ()
-())
-303 'h5fget_freespace_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 304 0 (305 306 307) () 0 () ())
-308 'h5fget_obj_count_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 309 0 (310 311 312 313) () 0 () ())
-314 'h5fget_obj_ids_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 315 0 (316 317 318 319
-320 321) () 0 () ())
-322 'h5fget_name_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 323 0 (324 325 326 327) () 0 () ())
-328 'h5fget_filesize_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 329 0 (330 331 332) () 0 () ())
-333 'h5fflush_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 334 0 (335 336 337) () 0 () ())
-148 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-165 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-218 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-175 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-338 'h5fmount_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 339 0 (340 341 342 343 344) ()
-0 () ())
-345 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-346 'h5fopen_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 347 0 (348 349 350 351 352) ()
-0 () ())
-14 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-353 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '12') () 0 ()
-())
-198 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-195 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-194 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-197 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-189 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-192 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-193 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-354 'h5funmount_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 355 0 (356 357 358) () 0 () ())
-359 'h5freopen_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 360 0 (361 362 363) () 0 () ())
-364 'h5fis_hdf5_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 365 0 (366 367 368) () 0 () ())
-190 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-191 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-15 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9')) 0 () ())
-199 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-141 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-142 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-369 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(UNKNOWN 0 ()) 0 0 () () 0 () ())
-144 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-143 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-370 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-196 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-6 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-371 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6') () 0 () ())
-2 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-146 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-372 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7') () 0 () ())
-147 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-140 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-139 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-17 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-138 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-373 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-128 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-137 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-136 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-129 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-133 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-131 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-132 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-134 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-135 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-145 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-374 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-16 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-118 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-115 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-130 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-117 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-116 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-120 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-125 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-124 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-113 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-122 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-121 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-127 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-114 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-98 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-126 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-104 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-110 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-93 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-94 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-101 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-100 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-109 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-123 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-112 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-111 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-107 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-18 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-4 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-375 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-102 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-103 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-96 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-97 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-106 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-105 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-95 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-376 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '18') () 0 ()
-())
-108 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-119 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-188 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-92 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-377 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2') () 0 () ())
-8 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-91 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-10 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-88 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-90 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-75 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-71 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-378 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '20') () 0 ()
-())
-84 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-73 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-82 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-74 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-72 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-83 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-76 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-86 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-80 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-87 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-81 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-77 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-65 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-39 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-85 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-89 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-63 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-79 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-38 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-45 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-37 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-379 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '34') () 0 ()
-())
-3 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-68 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-69 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-258 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-70 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-48 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-49 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-59 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-58 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-57 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-60 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-64 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-47 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-54 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-55 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-51 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-52 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-50 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-62 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-56 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-53 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-242 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-61 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-46 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-78 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-231 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-42 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-227 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-67 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-40 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-66 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-44 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-43 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-31 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-29 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-25 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-34 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-24 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-32 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-35 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-27 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-26 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-33 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-380 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '14') () 0 ()
-())
-381 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-28 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-9 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-382 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-383 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((384 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-36 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-23 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-385 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-386 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((387 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-30 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-388 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-41 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-389 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-390 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-391 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-392 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-393 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-5 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-7 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-230 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-99 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-285 'name' '' 284 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-288 'hdferr' '' 284 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-289 'creation_prp' '' 284 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-290 'access_prp' '' 284 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'file_id' '' 284 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-286 'access_flags' '' 284 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-358 'hdferr' '' 355 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-351 'hdferr' '' 347 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-336 'scope' '' 334 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-335 'object_id' '' 334 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-352 'access_prp' '' 347 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-337 'hdferr' '' 334 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-357 'name' '' 355 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-356 'loc_id' '' 355 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-340 'loc_id' '' 339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-343 'hdferr' '' 339 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-342 'child_id' '' 339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-349 'access_flags' '' 347 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-350 'file_id' '' 347 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-362 'ret_file_id' '' 360 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-300 'file_id' '' 299 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-361 'file_id' '' 360 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-348 'name' '' 347 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-297 'hdferr' '' 294 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-296 'prop_id' '' 294 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-295 'file_id' '' 294 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-301 'access_id' '' 299 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-363 'hdferr' '' 360 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-344 'access_prp' '' 339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-341 'name' '' 339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-311 'obj_type' '' 309 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-310 'file_id' '' 309 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-313 'hdferr' '' 309 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-320 'hdferr' '' 315 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-321 'num_objs' '' 315 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-319 'obj_ids' '' 315 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-281 'file_id' '' 280 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-282 'hdferr' '' 280 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-367 'status' '' 365 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-366 'name' '' 365 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-318 'max_objs' '' 315 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-317 'obj_type' '' 315 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-325 'buf' '' 323 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-327 'hdferr' '' 323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-305 'file_id' '' 304 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-326 'size' '' 323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-302 'hdferr' '' 299 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-306 'free_space' '' 304 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-324 'obj_id' '' 323 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-316 'file_id' '' 315 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-331 'size' '' 329 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-330 'file_id' '' 329 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-332 'hdferr' '' 329 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-307 'hdferr' '' 304 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-312 'obj_count' '' 309 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-368 'hdferr' '' 365 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-)
-
-('h5p_string_create_f' 0 99 'h5g_storage_type_dense_f' 0 188
-'h5fis_hdf5_f' 0 364 'h5d_fill_time_error_f' 0 175 'floating_types_len'
-0 275 '__convert_i4_i8' 0 261 'floating_types' 0 20
-'h5d_alloc_time_early_f' 0 182 'h5d_alloc_time_default_f' 0 183
-'h5_iter_unknown_f' 0 204 'fortran_integer_1' 0 273 'fortran_double' 0
-263 'fortran_integer' 0 262 'fortran_real_4' 0 272 'fortran_integer_2' 0
-269 'fortran_real' 0 268 'fortran_integer_4' 0 265 'fortran_integer_8' 0
-264 'fortran_real_12' 0 267 'fortran_real_16' 0 266 'h5_integer_kind' 0
-271 'h5_index_crt_order_f' 0 206 'fortran_real_8' 0 270 'h5_index_n_f' 0
-205 'h5_index_unknown_f' 0 208 'h5_index_name_f' 0 207 'h5_iter_dec_f' 0
-202 'h5_iter_native_f' 0 201 'h5_iter_n_f' 0 200 'h5_iter_inc_f' 0 203
-'h5_szip_ec_om_f' 0 22 'h5_real_kind' 0 274 'h5_szip_nn_om_f' 0 21
-'h5d_contiguous_f' 0 186 'h5d_compact_f' 0 187 'h5d_alloc_time_late_f' 0
-181 'h5d_alloc_time_error_f' 0 184 'h5d_alloc_time_incr_f' 0 180
-'h5d_chunked_f' 0 185 'h5d_chunk_cache_nslots_dflt_f' 0 168
-'h5d_chunk_cache_nbytes_dflt_f' 0 167 'h5d_chunk_cache_w0_dflt_f' 0 166
-'h5d_fill_time_alloc_f' 0 174 'h5f_close_weak_f' 0 218
-'h5d_fill_value_user_defined_f' 0 169 'h5d_fill_time_never_f' 0 173
-'h5d_fill_value_error_f' 0 172 'h5d_fill_value_default_f' 0 170
-'h5d_fill_value_undefined_f' 0 171 'h5d_space_sts_not_allocated_f' 0 178
-'h5d_space_sts_error_f' 0 179 'h5d_flags_len' 0 276 'h5d_flags' 0 11
-'h5d_space_sts_allocated_f' 0 176 'h5f_close_default_f' 0 219
-'h5f_acc_trunc_f' 0 224 'h5f_acc_rdonly_f' 0 225 'h5f_acc_debug_f' 0 222
-'h5f' 0 277 'h5d_space_sts_part_allocated_f' 0 177 'h5f_acc_excl_f' 0
-223 'h5f_acc_rdwr_f' 0 226 'h5f_close_semi_f' 0 217 'h5f_close_strong_f'
-0 216 'h5fd_mpio_independent_f' 0 165 'h5fd_mem_default_f' 0 162
-'h5fd_hid_flags_len' 0 292 'h5fd_core_f' 0 154 'h5fcreate_f' 0 283
-'h5f_obj_file_f' 0 215 'h5f_libver_latest_f' 0 209 'h5f_flags' 0 19
-'h5f_flags_len' 0 278 'h5f_libver_earliest_f' 0 210 'h5f_obj_datatype_f'
-0 212 'h5f_obj_dataset_f' 0 214 'h5f_obj_all_f' 0 211 'h5f_scope_global_f'
-0 220 'h5f_obj_group_f' 0 213 'h5fclose_f' 0 279 'h5f_scope_local_f' 0
-221 'h5fd_hid_flags' 0 12 'h5fd_flags_len' 0 291 'h5fd_family_f' 0 153
-'h5fd_flags' 0 13 'h5fd_log_f' 0 152 'h5fd_mem_btree_f' 0 160
-'h5fd_mem_ntypes_f' 0 155 'h5fd_mem_nolist_f' 0 163 'h5fd_mem_draw_f' 0
-159 'h5fd_mem_lheap_f' 0 157 'h5fd_mem_gheap_f' 0 158 'h5fd_mem_ohdr_f'
-0 156 'h5fd_mpio_f' 0 151 'h5fd_mem_super_f' 0 161
-'h5fd_mpio_collective_f' 0 164 'h5fd_stdio_f' 0 148 'h5fd_sec2_f' 0 149
-'h5fd_multi_f' 0 150 'h5fflush_f' 0 333 'h5fget_filesize_f' 0 328
-'h5fget_access_plist_f' 0 298 'h5fget_create_plist_f' 0 293
-'h5fget_name_f' 0 322 'h5fget_freespace_f' 0 303 'h5fget_obj_ids_f' 0
-314 'h5fget_obj_count_f' 0 308 'h5freopen_f' 0 359 'h5fopen_f' 0 346
-'h5fmount_f' 0 338 'h5fortran_types' 0 345 'h5funmount_f' 0 354
-'h5g_link_hard_f' 0 193 'h5g_dataset_f' 0 197 'h5g_link_error_f' 0 194
-'h5g_group_f' 0 198 'h5g_flags_len' 0 353 'h5g_flags' 0 14 'h5g_link_f'
-0 195 'h5g_link_soft_f' 0 192 'h5g_storage_type_compact_f' 0 189
-'h5o_hdr_attr_crt_order_track_f' 0 119 'h5o_copy_without_attr_flag_f' 0
-130 'h5i_datatype_f' 0 145 'h5g_type_f' 0 196 'h5g_storage_type_unknown_f'
-0 191 'h5g_storage_type_symbol_table_f' 0 190 'h5generic_flags_len' 0
-370 'h5g_unknown_f' 0 199 'h5generic_flags' 0 15 'h5i_dataset_f' 0 143
-'h5global' 0 369 'h5i_attr_f' 0 142 'h5i_badid_f' 0 141 'h5i_dataspace_f'
-0 144 'h5l_link_class_t_vers_f' 0 135 'h5i_file_f' 0 147 'h5i_flags_len'
-0 372 'h5i_flags' 0 6 'h5i_group_f' 0 146 'h5l_flags' 0 2 'h5l_flags_len'
-0 371 'h5o_copy_shallow_hierarchy_f' 0 134 'h5o_copy_expand_ext_link_f'
-0 132 'h5l_same_loc_f' 0 136 'h5l_type_external_f' 0 137
-'h5l_type_error_f' 0 140 'h5o_copy_all_f' 0 128 'h5lib_flags_len' 0 373
-'h5l_type_soft_f' 0 138 'h5l_type_hard_f' 0 139 'h5lib_flags' 0 17
-'h5o_copy_expand_reference_f' 0 131 'h5o_copy_expand_soft_link_f' 0 133
-'h5o_copy_preserve_null_flag_f' 0 129 'h5o_hdr_all_flags_f' 0 115
-'h5o_flags' 0 16 'h5o_flags_len' 0 374 'h5o_hdr_attr_crt_order_index_f'
-0 118 'h5p_file_mount_f' 0 108 'h5p_default_f' 0 107
-'h5o_shmesg_pline_flag_f' 0 123 'h5o_shmesg_max_nindexes_f' 0 114
-'h5o_shmesg_all_flag_f' 0 121 'h5o_hdr_chunk0_size_f' 0 120
-'h5o_hdr_attr_store_phase_cha_f' 0 117 'h5o_hdr_store_times_f' 0 116
-'h5o_shmesg_attr_flag_f' 0 122 'h5o_shmesg_max_list_size_f' 0 113
-'h5o_shmesg_fill_flag_f' 0 124 'h5o_shmesg_dtype_flag_f' 0 125
-'h5o_shmesg_none_flag_f' 0 127 'h5p_dataset_xfer_f' 0 109
-'h5p_crt_order_indexed_f' 0 94 'h5o_shmesg_sdspace_flag_f' 0 126
-'h5p_attribute_create_f' 0 98 'h5p_crt_order_tracked_f' 0 93
-'h5p_dataset_create_f' 0 110 'h5p_dataset_access_f' 0 104
-'h5p_datatype_access_f' 0 100 'h5p_datatype_create_f' 0 101
-'h5p_file_access_f' 0 111 'h5p_file_create_f' 0 112 'h5p_flags_len' 0
-376 'h5p_flags_int_len' 0 375 'h5p_flags_int' 0 4 'h5p_flags' 0 18
-'h5p_link_access_f' 0 95 'h5p_group_create_f' 0 103 'h5p_group_access_f'
-0 102 'h5p_object_create_f' 0 105 'h5p_object_copy_f' 0 97
-'h5p_link_create_f' 0 96 'h5p_root_f' 0 106 'h5t_std_u16le' 0 232
-'h5s_select_append_f' 0 78 'h5s_sel_hyperslabs_f' 0 72 'h5s_all_f' 0 84
-'h5r_dataset_region_f' 0 91 'h5r_flags' 0 8 'h5r_flags_len' 0 377
-'h5r_object_f' 0 92 'h5s_flags_len' 0 378 'h5s_flags' 0 10 'h5s_sel_all_f'
-0 71 'h5s_scalar_f' 0 90 'h5s_null_f' 0 88 'h5s_sel_error_f' 0 75
-'h5s_sel_none_f' 0 74 'h5s_select_and_f' 0 82 'h5s_sel_points_f' 0 73
-'h5t_cset_ascii_f' 0 46 'h5s_select_nota_f' 0 79 'h5s_select_invalid_f'
-0 76 'h5s_select_noop_f' 0 83 'h5t_compound_f' 0 63 'h5s_simple_f' 0 89
-'h5s_select_prepend_f' 0 77 'h5s_select_notb_f' 0 80 'h5s_select_or_f' 0
-86 'h5s_select_xor_f' 0 81 'h5s_select_set_f' 0 87 'h5s_unlimited_f' 0
-85 'h5t_array_f' 0 39 'h5t_bitfield_f' 0 65 'h5t_enum_f' 0 61
-'h5t_dir_descend_f' 0 37 'h5t_cset_utf8_f' 0 45 'h5t_dir_ascend_f' 0 38
-'h5t_std_ref_obj' 0 256 'h5t_native_character' 0 257 'h5t_ieee_f32be' 0
-247 'h5t_float_f' 0 68 'h5t_flags' 0 3 'h5t_flags_len' 0 379
-'h5t_ieee_f64le' 0 244 'h5t_ieee_f64be' 0 245 'h5t_ieee_f32le' 0 246
-'h5t_integer_f' 0 69 'h5t_std_i64le' 0 236 'h5t_pad_error_f' 0 53
-'h5t_native_integer_1' 0 254 'h5t_native_double' 0 258
-'h5t_native_integer' 0 260 'h5t_pad_background_f' 0 54 'h5t_norm_none_f'
-0 47 'h5t_norm_implied_f' 0 49 'h5t_native_integer_2' 0 253
-'h5t_native_integer_4' 0 252 'h5t_native_real_16' 0 248 'h5t_native_real'
-0 259 'h5t_native_integer_8' 0 251 'h5t_native_real_4' 0 250
-'h5t_native_real_8' 0 249 'h5t_no_class_f' 0 70 'h5t_norm_msbset_f' 0 48
-'h5t_opaque_f' 0 64 'h5t_order_le_f' 0 60 'h5t_order_be_f' 0 59
-'h5t_order_none_f' 0 57 'h5t_order_vax_f' 0 58 'h5t_std_i32be' 0 239
-'h5t_pad_zero_f' 0 56 'h5t_pad_one_f' 0 55 'h5t_reference_f' 0 62
-'h5t_sgn_error_f' 0 50 'h5t_sgn_2_f' 0 51 'h5t_std_i16le' 0 240
-'h5t_sgn_none_f' 0 52 'h5t_std_i16be' 0 241 'h5t_std_i32le' 0 238
-'h5t_std_i64be' 0 237 'h5t_std_ref_dsetreg' 0 255 'h5t_std_i8le' 0 242
-'h5t_std_i8be' 0 243 'h5t_std_u16be' 0 233 'h5t_std_u32le' 0 230
-'h5t_std_u32be' 0 231 'integer_types' 0 7 'h5t_str_error_f' 0 41
-'h5t_std_u8be' 0 235 'h5t_std_u64le' 0 228 'h5t_std_u64be' 0 229
-'h5t_std_u8le' 0 234 'hssize_t' 0 388 'h5z_disable_edc_f' 0 30
-'h5t_str_nullpad_f' 0 43 'h5t_str_nullterm_f' 0 44 'h5t_string_f' 0 66
-'h5t_string' 0 227 'h5t_str_spacepad_f' 0 42 'h5t_vlen_f' 0 40
-'h5t_time_f' 0 67 'hobj_ref_t_f' 0 386 'h5z_filter_all_f' 0 23
-'h5z_enable_edc_f' 0 29 'h5z_error_edc_f' 0 31 'h5z_filter_error_f' 0 36
-'h5z_filter_decode_enabled_f' 0 24 'h5z_filter_deflate_f' 0 34
-'h5z_filter_encode_enabled_f' 0 25 'hdset_reg_ref_t_f' 0 383 'h5z_flags'
-0 9 'h5z_filter_shuffle_f' 0 33 'h5z_filter_none_f' 0 35
-'h5z_filter_fletcher32_f' 0 32 'h5z_flag_optional_f' 0 26
-'h5z_filter_szip_f' 0 27 'h5z_no_edc_f' 0 28 'h5z_flags_len' 0 380
-'haddr_t' 0 381 'hid_t' 0 382 'hsize_t' 0 385 'predef_types' 0 5
-'object_namelen_default_f' 0 390 'integer_types_len' 0 389
-'ref_reg_buf_len' 0 393 'predef_types_len' 0 391 'size_t' 0 392)
diff --git a/interfaces/ext/hdf5/h5fortran_types.mod b/interfaces/ext/hdf5/h5fortran_types.mod
deleted file mode 100644
index ce303bb..0000000
--- a/interfaces/ext/hdf5/h5fortran_types.mod
+++ /dev/null
@@ -1,73 +0,0 @@
-GFORTRAN module created from H5fortran_types.f90 on Mon Feb 14 14:35:45 2011
-If you edit this, you'll get what you deserve.
-
-(() () () () () () () () () () () () () () () () () () () () ())
-
-()
-
-()
-
-()
-
-()
-
-(2 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-4 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-5 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-6 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-7 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-8 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-9 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-10 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-11 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-12 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-13 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-14 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-15 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-16 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-17 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-18 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-19 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-20 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-)
-
-('fortran_real_4' 0 20 'fortran_integer_8' 0 11 'fortran_integer' 0 7
-'__convert_i4_i8' 0 3 'fortran_double' 0 2 'fortran_integer_1' 0 6
-'fortran_integer_2' 0 5 'fortran_integer_4' 0 4 'fortran_real_12' 0 10
-'fortran_real' 0 8 'fortran_real_16' 0 9 'object_namelen_default_f' 0 19
-'hssize_t' 0 17 'haddr_t' 0 16 'fortran_real_8' 0 13 'h5fortran_types' 0
-12 'hid_t' 0 15 'hsize_t' 0 14 'size_t' 0 18)
diff --git a/interfaces/ext/hdf5/h5g.mod b/interfaces/ext/hdf5/h5g.mod
deleted file mode 100644
index 7a33ed0..0000000
--- a/interfaces/ext/hdf5/h5g.mod
+++ /dev/null
@@ -1,1600 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5Gff.f90 on Mon Feb 14 14:35:49 2011
-If you edit this, you'll get what you deserve.
-
-(() ()
-() () () () () () () () () () () () () () () () () () ())
-
-()
-
-()
-
-(('h5l_flags' 2 0) ('h5t_flags' 3 0) ('h5p_flags_int' 4 0) (
-'predefined_types' 5 0) ('h5i_flags' 6 0) ('integer_types' 7 0) (
-'h5r_flags' 8 0) ('h5z_flags' 9 0) ('h5s_flags' 10 0) ('h5d_flags' 11 0)
-('h5fd_hid_flags' 12 0) ('h5fd_flags' 13 0) ('h5g_flags' 14 0) (
-'h5generic_flags' 15 0) ('h5o_flags' 16 0) ('h5lib_flags' 17 0) (
-'h5p_flags' 18 0) ('h5f_flags' 19 0) ('floating_types' 20 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 21 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 22 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 23 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 24 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 25 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 26 ())) ('h5global.eq.6' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 27 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 28 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 29 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 30 ())) ('h5global.eq.10' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 31 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 32 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 33 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.13'
-(VARIABLE (INTEGER 4 ()) 0 34 ())) ('h5global.eq.14' (VARIABLE (INTEGER
-4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 35 ())) ('h5global.eq.15' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 36 ())) (
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '34') 1)))) 'h5global.eq.16' (VARIABLE (
-INTEGER 4 ()) 0 37 ())) ('h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '33') 1)))) 'h5global.eq.17'
-(VARIABLE (INTEGER 4 ()) 0 38 ())) ('h5global.eq.18' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '32') 1))))
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 39 ())) ('h5global.eq.19' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '31') 1)))) 'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 40 ())) (
-'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '30') 1)))) 'h5global.eq.20' (VARIABLE (
-INTEGER 4 ()) 0 41 ())) ('h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21'
-(VARIABLE (INTEGER 4 ()) 0 42 ())) ('h5global.eq.22' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 43 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 44 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 45 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1)))) 'h5global.eq.25'
-(VARIABLE (INTEGER 4 ()) 0 46 ())) ('h5global.eq.26' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '24') 1))))
-'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 47 ())) ('h5global.eq.27' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '23') 1)))) 'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 48 ())) (
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.28' (VARIABLE (
-INTEGER 4 ()) 0 49 ())) ('h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.29'
-(VARIABLE (INTEGER 4 ()) 0 50 ())) ('h5global.eq.30' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 51 ())) ('h5global.eq.31' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 52 ())) (
-'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.32' (VARIABLE (
-INTEGER 4 ()) 0 53 ())) ('h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33'
-(VARIABLE (INTEGER 4 ()) 0 54 ())) ('h5global.eq.34' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 55 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 56 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 57 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.37'
-(VARIABLE (INTEGER 4 ()) 0 58 ())) ('h5global.eq.38' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 59 ())) ('h5global.eq.39' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 60 ())) (
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.40' (VARIABLE (
-INTEGER 4 ()) 0 61 ())) ('h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.41'
-(VARIABLE (INTEGER 4 ()) 0 62 ())) ('h5global.eq.42' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 63 ())) ('h5global.eq.43' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 64 ())) (
-'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.44' (VARIABLE (
-INTEGER 4 ()) 0 65 ())) ('h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45'
-(VARIABLE (INTEGER 4 ()) 0 66 ())) ('h5global.eq.46' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 67 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 68 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 69 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.49'
-(VARIABLE (INTEGER 4 ()) 0 70 ())) ('h5global.eq.50' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 71 ())) ('h5global.eq.51' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 72 ())) (
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.52' (VARIABLE (
-INTEGER 4 ()) 0 73 ())) ('h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.53'
-(VARIABLE (INTEGER 4 ()) 0 74 ())) ('h5global.eq.54' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 75 ())) ('h5global.eq.55' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 76 ())) (
-'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.56' (VARIABLE (
-INTEGER 4 ()) 0 77 ())) ('h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57'
-(VARIABLE (INTEGER 4 ()) 0 78 ())) ('h5global.eq.58' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 79 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 80 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 81 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.61'
-(VARIABLE (INTEGER 4 ()) 0 82 ())) ('h5global.eq.62' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 83 ())) ('h5global.eq.63' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 84 ())) (
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.64' (VARIABLE (
-INTEGER 4 ()) 0 85 ())) ('h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.65'
-(VARIABLE (INTEGER 4 ()) 0 86 ())) ('h5global.eq.66' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 87 ())) ('h5global.eq.67' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 88 ())) (
-'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.68' (VARIABLE (
-INTEGER 4 ()) 0 89 ())) ('h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69'
-(VARIABLE (INTEGER 4 ()) 0 90 ())) ('h5global.eq.70' (VARIABLE (INTEGER
-4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 91 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 92 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 93 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 4 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.73'
-(VARIABLE (INTEGER 4 ()) 0 94 ())) ('h5global.eq.74' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 95 ())) ('h5global.eq.75' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 96 ())) (
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.76' (VARIABLE (
-INTEGER 4 ()) 0 97 ())) ('h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.77'
-(VARIABLE (INTEGER 4 ()) 0 98 ())) ('h5global.eq.78' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 99 ())) ('h5global.eq.79' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 100 ())) (
-'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.80' (VARIABLE (
-INTEGER 4 ()) 0 101 ())) ('h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81'
-(VARIABLE (INTEGER 4 ()) 0 102 ())) ('h5global.eq.82' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 103 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 104 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 105 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.85'
-(VARIABLE (INTEGER 4 ()) 0 106 ())) ('h5global.eq.86' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 107 ())) ('h5global.eq.87' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 108 ())) (
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.88' (VARIABLE (
-INTEGER 4 ()) 0 109 ())) ('h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.89'
-(VARIABLE (INTEGER 4 ()) 0 110 ())) ('h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 111 ())) ('h5global.eq.91' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 112 ())) (
-'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.92' (VARIABLE (
-INTEGER 4 ()) 0 113 ())) ('h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93'
-(VARIABLE (INTEGER 4 ()) 0 114 ())) ('h5global.eq.94' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 115 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 116 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 117 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.97'
-(VARIABLE (INTEGER 4 ()) 0 118 ())) ('h5global.eq.98' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 119 ())) ('h5global.eq.99' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 120 ())) (
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.100' (VARIABLE (
-INTEGER 4 ()) 0 121 ())) ('h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 122 ())) ('h5global.eq.102'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 123 ())) (
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.103' (VARIABLE (
-INTEGER 4 ()) 0 124 ())) ('h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 125 ())) ('h5global.eq.105'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 126 ())) (
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.106' (VARIABLE (
-INTEGER 4 ()) 0 127 ())) ('h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 128 ())) ('h5global.eq.108'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 129 ())) (
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.109' (VARIABLE (
-INTEGER 4 ()) 0 130 ())) ('h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 131 ())) ('h5global.eq.111'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 132 ())) (
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.112' (VARIABLE (
-INTEGER 4 ()) 0 133 ())) ('h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 134 ())) ('h5global.eq.114'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 135 ())) (
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.115' (VARIABLE (
-INTEGER 4 ()) 0 136 ())) ('h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 2
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 137 ())) ('h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 138 ())) ('h5global.eq.118'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 139 ())) (
-'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.119' (VARIABLE (
-INTEGER 4 ()) 0 140 ())) ('h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120'
-(VARIABLE (INTEGER 4 ()) 0 141 ())) ('h5global.eq.121' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 142 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 143 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 144 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.124'
-(VARIABLE (INTEGER 4 ()) 0 145 ())) ('h5global.eq.125' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 146 ())) ('h5global.eq.126'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 147 ())) (
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.127' (VARIABLE (
-INTEGER 4 ()) 0 148 ())) ('h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 149 ())) ('h5global.eq.129'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 150 ())) (
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.130' (VARIABLE (
-INTEGER 4 ()) 0 151 ())) ('h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 152 ())) ('h5global.eq.132'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 153 ())) (
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.133' (VARIABLE (
-INTEGER 4 ()) 0 154 ())) ('h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 155 ())) ('h5global.eq.135'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 156 ())) (
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.136' (VARIABLE (
-INTEGER 4 ()) 0 157 ())) ('h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 158 ())) ('h5global.eq.138'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 159 ())) (
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.139' (VARIABLE (
-INTEGER 4 ()) 0 160 ())) ('h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 161 ())) ('h5global.eq.141'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 162 ())) (
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.142' (VARIABLE (
-INTEGER 4 ()) 0 163 ())) ('h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 164 ())) ('h5global.eq.144'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 165 ())) (
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.145' (VARIABLE (
-INTEGER 4 ()) 0 166 ())) ('h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1))))
-'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 167 ())) ('h5global.eq.147'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 168 ())) (
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.148' (VARIABLE (
-INTEGER 4 ()) 0 169 ())) ('h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 170 ())) ('h5global.eq.150'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 171 ())) (
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.151' (VARIABLE (
-INTEGER 4 ()) 0 172 ())) ('h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 173 ())) ('h5global.eq.153'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 174 ())) (
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.154' (VARIABLE (
-INTEGER 4 ()) 0 175 ())) ('h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 176 ())) ('h5global.eq.156'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 177 ())) (
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.157' (VARIABLE (
-INTEGER 4 ()) 0 178 ())) ('h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 179 ())) ('h5global.eq.159'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ())) (
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.160' (VARIABLE (
-INTEGER 4 ()) 0 181 ())) ('h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 182 ())) ('h5global.eq.162'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 183 ())) (
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.163' (VARIABLE (
-INTEGER 4 ()) 0 184 ())) ('h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 185 ())) ('h5global.eq.165'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 186 ())) (
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.166' (VARIABLE (
-INTEGER 4 ()) 0 187 ())) ('h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 188 ())) ('h5global.eq.168'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ())) (
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.169' (VARIABLE (
-INTEGER 4 ()) 0 190 ())) ('h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 191 ())) ('h5global.eq.171'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 192 ())) (
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.172' (VARIABLE (
-INTEGER 4 ()) 0 193 ())) ('h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 194 ())) ('h5global.eq.174'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 195 ())) (
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.175' (VARIABLE (
-INTEGER 4 ()) 0 196 ())) ('h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 197 ())) ('h5global.eq.177'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 198 ())) (
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.178' (VARIABLE (
-INTEGER 4 ()) 0 199 ())) ('h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.180'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.181' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.183'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 204 ())) (
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.184' (VARIABLE (
-INTEGER 4 ()) 0 205 ())) ('h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 206 ())) ('h5global.eq.186'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 207 ())) (
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.187' (VARIABLE (
-INTEGER 4 ()) 0 208 ())) ('h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 209 ())) ('h5global.eq.189'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 210 ())) (
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.190' (VARIABLE (
-INTEGER 4 ()) 0 211 ())) ('h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 212 ())) ('h5global.eq.192'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ())) (
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.193' (VARIABLE (
-INTEGER 4 ()) 0 214 ())) ('h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 215 ())) ('h5global.eq.195'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 216 ())) (
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.196' (VARIABLE (
-INTEGER 4 ()) 0 217 ())) ('h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 218 ())) ('h5global.eq.198'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 219 ())) (
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.199' (VARIABLE (
-INTEGER 4 ()) 0 220 ())) ('h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 221 ())) ('h5global.eq.201'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 222 ())) (
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.202' (VARIABLE (
-INTEGER 4 ()) 0 223 ())) ('h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.204'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.205' (VARIABLE (
-INTEGER 4 ()) 0 226 ())) ('h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.207'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 228 ())) (
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.208' (VARIABLE (
-INTEGER 4 ()) 0 229 ())) ('h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 230 ())) ('h5global.eq.210'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 231 ())) (
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.211' (VARIABLE (
-INTEGER 4 ()) 0 232 ())) ('h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 233 ())) ('h5global.eq.213'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 234 ())) (
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.214' (VARIABLE (
-INTEGER 4 ()) 0 235 ())) ('h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.217'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.218' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219'
-(VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.220' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.232'
-(VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.233' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 254 ())) ('h5global.eq.234'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 255 ())) (
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.235' (VARIABLE (
-INTEGER 4 ()) 0 256 ())) ('h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 257 ())) ('h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.238'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.239' (VARIABLE (
-INTEGER 4 ()) 0 260 ())))
-
-(20 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-261 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-262 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-263 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-264 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-265 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-266 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-267 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-268 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-269 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-270 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-207 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-208 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-205 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-206 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-200 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-272 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-273 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-274 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-21 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-22 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-183 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-180 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-184 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-167 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-166 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-168 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-185 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-181 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-187 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-174 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-186 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-170 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-171 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-172 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-173 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-11 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-176 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-179 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-177 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-223 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-216 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-217 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-178 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-169 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-210 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '19') () 0 ()
-())
-19 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-211 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-213 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-220 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-215 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-13 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-153 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-278 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-12 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-154 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-160 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-152 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-158 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-157 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-159 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-163 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-164 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-161 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-151 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-156 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-155 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-162 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-150 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-149 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-281 'h5g' 'h5g' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-14 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-282 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '12') () 0 ()
-())
-198 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-195 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-194 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-197 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-189 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-192 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-193 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-148 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-165 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-218 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-175 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-190 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-191 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'h5gclose_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 284 0 (285 286) () 0 () ())
-199 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'h5gcreate_anon_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 288 0 (289 290 291 292
-293) () 0 () ())
-196 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-15 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9')) 0 () ())
-294 'h5gget_comment_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 295 0 (296 297 298 299 300) () 0 () ())
-301 'h5gget_create_plist_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 302 0 (303 304 305) () 0 ()
-())
-306 'h5gget_info_by_name_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 307 0 (308
-309 310 311 312 313 314 315) () 0 () ())
-316 'h5gget_info_by_idx_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 317 0 (318
-319 320 321 322 323 324 325 326 327 328) () 0 () ())
-329 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-330 'h5gcreate_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 331 0 (332 333 334 335 336
-337 338 339) () 0 () ())
-340 'h5gget_obj_info_idx_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 341 0 (342 343 344 345 346
-347) () 0 () ())
-348 'h5gget_linkval_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 349 0 (350 351 352 353 354) () 0 () ())
-355 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(UNKNOWN 0 ()) 0 0 () () 0 () ())
-356 'h5glink_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 357 0 (358 359 360 361 362) () 0 () ())
-363 'h5gmove_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 364 0 (365 366 367 368) () 0 () ())
-369 'h5gset_comment_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 370 0 (371 372 373 374) () 0 () ())
-141 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-142 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-375 'h5gunlink_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 376 0 (377 378 379) () 0 () ())
-380 'h5gopen_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 381 0 (382 383 384 385 386) ()
-0 () ())
-387 'h5gn_members_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 388 0 (389 390 391 392) () 0 () ())
-144 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-143 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-393 'h5gmove2_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 394 0 (395 396 397 398 399) () 0 () ())
-400 'h5glink2_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 401 0 (402 403 404 405 406 407) () 0 () ())
-408 'h5gget_info_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 409 0 (410 411 412 413 414
-415) () 0 () ())
-6 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-416 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6') () 0 () ())
-2 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-146 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-417 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7') () 0 () ())
-147 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-140 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-139 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-17 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-138 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-418 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-128 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-137 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-136 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-129 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-133 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-131 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-132 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-134 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-135 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-145 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-419 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-16 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-118 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-115 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-130 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-117 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-116 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-120 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-125 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-124 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-113 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-122 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-121 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-127 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-114 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-98 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-126 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-104 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-110 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-93 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-94 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-101 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-100 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-109 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-123 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-112 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-111 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-107 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-18 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-4 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-420 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-102 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-103 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-96 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-97 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-106 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-105 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-95 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-421 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '18') () 0 ()
-())
-108 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-119 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-188 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-92 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-422 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2') () 0 () ())
-8 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-91 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-10 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-88 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-90 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-75 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-71 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-423 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '20') () 0 ()
-())
-84 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-73 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-82 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-74 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-72 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-83 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-76 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-86 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-80 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-87 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-81 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-77 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-65 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-39 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-85 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-89 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-63 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-79 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-38 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-45 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-37 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-424 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '34') () 0 ()
-())
-3 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-68 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-69 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-258 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-70 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-48 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-49 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-59 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-58 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-57 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-60 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-64 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-47 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-54 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-55 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-51 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-52 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-50 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-62 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-56 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-53 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-242 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-61 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-46 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-78 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-231 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-42 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-227 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-67 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-40 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-66 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-44 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-43 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-31 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-29 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-25 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-34 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-24 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-32 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-35 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-27 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-26 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-33 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-425 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '14') () 0 ()
-())
-426 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-28 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-9 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-427 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-428 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((429 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-36 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-23 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-430 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-431 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((432 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-30 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-433 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-41 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-434 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-435 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-436 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-437 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-438 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-5 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-7 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-230 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-99 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-332 'loc_id' '' 331 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-334 'grp_id' '' 331 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-333 'name' '' 331 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-336 'size_hint' '' 331 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-335 'hdferr' '' 331 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-285 'grp_id' '' 284 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-337 'lcpl_id' '' 331 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-382 'loc_id' '' 381 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-384 'grp_id' '' 381 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-383 'name' '' 381 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-386 'gapl_id' '' 381 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-385 'hdferr' '' 381 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-339 'gapl_id' '' 331 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-338 'gcpl_id' '' 331 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-286 'hdferr' '' 284 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-343 'name' '' 341 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-346 'obj_type' '' 341 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-347 'hdferr' '' 341 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-345 'obj_name' '' 341 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-344 'idx' '' 341 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-308 'loc_id' '' 307 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-309 'group_name' '' 307 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-310 'storage_type' '' 307 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-312 'max_corder' '' 307 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-313 'hdferr' '' 307 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-390 'name' '' 388 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-389 'loc_id' '' 388 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-315 'mounted' '' 307 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(LOGICAL 4 ()) 0 0 () () 0 () ())
-392 'hdferr' '' 388 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-391 'nmembers' '' 388 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-358 'loc_id' '' 357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-342 'loc_id' '' 341 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-314 'lapl_id' '' 307 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-360 'current_name' '' 357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-359 'link_type' '' 357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-311 'nlinks' '' 307 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-362 'hdferr' '' 357 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-403 'cur_name' '' 401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-404 'link_type' '' 401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-405 'new_loc_id' '' 401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-407 'hdferr' '' 401 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-366 'name' '' 364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-379 'hdferr' '' 376 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-377 'loc_id' '' 376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-406 'new_name' '' 401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-402 'cur_loc_id' '' 401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-368 'hdferr' '' 364 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-367 'new_name' '' 364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-361 'new_name' '' 357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-396 'src_name' '' 394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-397 'dst_loc_id' '' 394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-395 'src_loc_id' '' 394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-399 'hdferr' '' 394 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-350 'loc_id' '' 349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-351 'name' '' 349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-365 'loc_id' '' 364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-353 'buffer' '' 349 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((VARIABLE (INTEGER 8 ()) 0 352 ()))) 0 0 () () 0 () ())
-352 'size' '' 349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-354 'hdferr' '' 349 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-398 'dst_name' '' 394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-371 'loc_id' '' 370 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-373 'comment' '' 370 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-297 'name' '' 295 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-374 'hdferr' '' 370 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-298 'size' '' 295 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-299 'buffer' '' 295 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((VARIABLE (INTEGER 8 ()) 0 298 ()))) 0 0 () () 0 () ())
-372 'name' '' 370 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-291 'hdferr' '' 288 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-289 'loc_id' '' 288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-296 'loc_id' '' 295 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-293 'gapl_id' '' 288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-292 'gcpl_id' '' 288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-300 'hdferr' '' 295 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-304 'gcpl_id' '' 302 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-290 'grp_id' '' 288 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-410 'group_id' '' 409 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-305 'hdferr' '' 302 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-303 'grp_id' '' 302 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-411 'storage_type' '' 409 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-412 'nlinks' '' 409 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-414 'hdferr' '' 409 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-318 'loc_id' '' 317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-413 'max_corder' '' 409 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-320 'index_type' '' 317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-321 'order' '' 317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-323 'storage_type' '' 317 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-324 'nlinks' '' 317 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-322 'n' '' 317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-326 'hdferr' '' 317 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-325 'max_corder' '' 317 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-327 'lapl_id' '' 317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-328 'mounted' '' 317 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(LOGICAL 4 ()) 0 0 () () 0 () ())
-319 'group_name' '' 317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-415 'mounted' '' 409 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(LOGICAL 4 ()) 0 0 () () 0 () ())
-378 'name' '' 376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-)
-
-('h5p_string_create_f' 0 99 'h5g_storage_type_dense_f' 0 188
-'h5d_fill_time_error_f' 0 175 'floating_types_len' 0 275 '__convert_i4_i8'
-0 261 'floating_types' 0 20 'h5d_alloc_time_early_f' 0 182
-'h5d_alloc_time_default_f' 0 183 'h5_iter_unknown_f' 0 204
-'fortran_integer_1' 0 273 'fortran_double' 0 263 'fortran_integer' 0 262
-'fortran_real_4' 0 272 'fortran_integer_2' 0 269 'fortran_real' 0 268
-'fortran_integer_4' 0 265 'fortran_integer_8' 0 264 'fortran_real_12' 0
-267 'fortran_real_16' 0 266 'h5_integer_kind' 0 271 'h5_index_crt_order_f'
-0 206 'fortran_real_8' 0 270 'h5_index_n_f' 0 205 'h5_index_unknown_f' 0
-208 'h5_index_name_f' 0 207 'h5_iter_dec_f' 0 202 'h5_iter_native_f' 0
-201 'h5_iter_n_f' 0 200 'h5_iter_inc_f' 0 203 'h5_szip_ec_om_f' 0 22
-'h5_real_kind' 0 274 'h5_szip_nn_om_f' 0 21 'h5d_contiguous_f' 0 186
-'h5d_compact_f' 0 187 'h5d_alloc_time_late_f' 0 181
-'h5d_alloc_time_error_f' 0 184 'h5d_alloc_time_incr_f' 0 180
-'h5d_chunked_f' 0 185 'h5d_chunk_cache_nslots_dflt_f' 0 168
-'h5d_chunk_cache_nbytes_dflt_f' 0 167 'h5d_chunk_cache_w0_dflt_f' 0 166
-'h5d_fill_time_alloc_f' 0 174 'h5f_close_weak_f' 0 218
-'h5d_fill_value_user_defined_f' 0 169 'h5d_fill_time_never_f' 0 173
-'h5d_fill_value_error_f' 0 172 'h5d_fill_value_default_f' 0 170
-'h5d_fill_value_undefined_f' 0 171 'h5d_space_sts_not_allocated_f' 0 178
-'h5d_space_sts_error_f' 0 179 'h5d_flags_len' 0 276 'h5d_flags' 0 11
-'h5d_space_sts_allocated_f' 0 176 'h5f_close_default_f' 0 219
-'h5f_acc_trunc_f' 0 224 'h5f_acc_rdonly_f' 0 225 'h5f_acc_debug_f' 0 222
-'h5d_space_sts_part_allocated_f' 0 177 'h5f_acc_excl_f' 0 223
-'h5f_acc_rdwr_f' 0 226 'h5f_close_semi_f' 0 217 'h5f_close_strong_f' 0
-216 'h5fd_mpio_independent_f' 0 165 'h5fd_mem_default_f' 0 162
-'h5fd_hid_flags_len' 0 279 'h5fd_core_f' 0 154 'h5f_obj_file_f' 0 215
-'h5f_libver_latest_f' 0 209 'h5f_flags' 0 19 'h5f_flags_len' 0 277
-'h5f_libver_earliest_f' 0 210 'h5f_obj_datatype_f' 0 212
-'h5f_obj_dataset_f' 0 214 'h5f_obj_all_f' 0 211 'h5f_scope_global_f' 0
-220 'h5f_obj_group_f' 0 213 'h5f_scope_local_f' 0 221 'h5fd_hid_flags' 0
-12 'h5fd_flags_len' 0 278 'h5fd_family_f' 0 153 'h5fd_flags' 0 13
-'h5fd_log_f' 0 152 'h5fd_mem_btree_f' 0 160 'h5fd_mem_ntypes_f' 0 155
-'h5fd_mem_nolist_f' 0 163 'h5fd_mem_draw_f' 0 159 'h5fd_mem_lheap_f' 0
-157 'h5fd_mem_gheap_f' 0 158 'h5fd_mem_ohdr_f' 0 156 'h5fd_mpio_f' 0 151
-'h5fd_mem_super_f' 0 161 'h5fd_mpio_collective_f' 0 164 'h5fd_stdio_f' 0
-148 'h5fd_sec2_f' 0 149 'h5fd_multi_f' 0 150 'h5g_link_hard_f' 0 193
-'h5g_dataset_f' 0 197 'h5g' 0 281 'h5fortran_types' 0 280
-'h5g_link_error_f' 0 194 'h5g_group_f' 0 198 'h5g_flags_len' 0 282
-'h5g_flags' 0 14 'h5g_link_f' 0 195 'h5g_link_soft_f' 0 192
-'h5g_storage_type_compact_f' 0 189 'h5o_hdr_attr_crt_order_track_f' 0
-119 'h5o_copy_without_attr_flag_f' 0 130 'h5i_datatype_f' 0 145
-'h5gget_info_f' 0 408 'h5gcreate_f' 0 330 'h5g_type_f' 0 196
-'h5g_storage_type_unknown_f' 0 191 'h5g_storage_type_symbol_table_f' 0
-190 'h5gcreate_anon_f' 0 287 'h5g_unknown_f' 0 199 'h5gclose_f' 0 283
-'h5generic_flags_len' 0 329 'h5generic_flags' 0 15 'h5gget_info_by_idx_f'
-0 316 'h5gget_create_plist_f' 0 301 'h5gget_comment_f' 0 294
-'h5gget_info_by_name_f' 0 306 'h5glink2_f' 0 400 'h5gget_linkval_f' 0
-348 'h5gget_obj_info_idx_f' 0 340 'h5gmove2_f' 0 393 'h5glink_f' 0 356
-'h5global' 0 355 'h5i_dataset_f' 0 143 'h5gn_members_f' 0 387 'h5gmove_f'
-0 363 'h5gopen_f' 0 380 'h5gunlink_f' 0 375 'h5gset_comment_f' 0 369
-'h5i_attr_f' 0 142 'h5i_badid_f' 0 141 'h5i_dataspace_f' 0 144
-'h5l_link_class_t_vers_f' 0 135 'h5i_file_f' 0 147 'h5i_flags_len' 0 417
-'h5i_flags' 0 6 'h5i_group_f' 0 146 'h5l_flags' 0 2 'h5l_flags_len' 0
-416 'h5o_copy_shallow_hierarchy_f' 0 134 'h5o_copy_expand_ext_link_f' 0
-132 'h5l_same_loc_f' 0 136 'h5l_type_external_f' 0 137 'h5l_type_error_f'
-0 140 'h5o_copy_all_f' 0 128 'h5lib_flags_len' 0 418 'h5l_type_soft_f' 0
-138 'h5l_type_hard_f' 0 139 'h5lib_flags' 0 17
-'h5o_copy_expand_reference_f' 0 131 'h5o_copy_expand_soft_link_f' 0 133
-'h5o_copy_preserve_null_flag_f' 0 129 'h5o_hdr_all_flags_f' 0 115
-'h5o_flags' 0 16 'h5o_flags_len' 0 419 'h5o_hdr_attr_crt_order_index_f'
-0 118 'h5p_file_mount_f' 0 108 'h5p_default_f' 0 107
-'h5o_shmesg_pline_flag_f' 0 123 'h5o_shmesg_max_nindexes_f' 0 114
-'h5o_shmesg_all_flag_f' 0 121 'h5o_hdr_chunk0_size_f' 0 120
-'h5o_hdr_attr_store_phase_cha_f' 0 117 'h5o_hdr_store_times_f' 0 116
-'h5o_shmesg_attr_flag_f' 0 122 'h5o_shmesg_max_list_size_f' 0 113
-'h5o_shmesg_fill_flag_f' 0 124 'h5o_shmesg_dtype_flag_f' 0 125
-'h5o_shmesg_none_flag_f' 0 127 'h5p_dataset_xfer_f' 0 109
-'h5p_crt_order_indexed_f' 0 94 'h5o_shmesg_sdspace_flag_f' 0 126
-'h5p_attribute_create_f' 0 98 'h5p_crt_order_tracked_f' 0 93
-'h5p_dataset_create_f' 0 110 'h5p_dataset_access_f' 0 104
-'h5p_datatype_access_f' 0 100 'h5p_datatype_create_f' 0 101
-'h5p_file_access_f' 0 111 'h5p_file_create_f' 0 112 'h5p_flags_len' 0
-421 'h5p_flags_int_len' 0 420 'h5p_flags_int' 0 4 'h5p_flags' 0 18
-'h5p_link_access_f' 0 95 'h5p_group_create_f' 0 103 'h5p_group_access_f'
-0 102 'h5p_object_create_f' 0 105 'h5p_object_copy_f' 0 97
-'h5p_link_create_f' 0 96 'h5p_root_f' 0 106 'h5t_std_u16le' 0 232
-'h5s_select_append_f' 0 78 'h5s_sel_hyperslabs_f' 0 72 'h5s_all_f' 0 84
-'h5r_dataset_region_f' 0 91 'h5r_flags' 0 8 'h5r_flags_len' 0 422
-'h5r_object_f' 0 92 'h5s_flags_len' 0 423 'h5s_flags' 0 10 'h5s_sel_all_f'
-0 71 'h5s_scalar_f' 0 90 'h5s_null_f' 0 88 'h5s_sel_error_f' 0 75
-'h5s_sel_none_f' 0 74 'h5s_select_and_f' 0 82 'h5s_sel_points_f' 0 73
-'h5t_cset_ascii_f' 0 46 'h5s_select_nota_f' 0 79 'h5s_select_invalid_f'
-0 76 'h5s_select_noop_f' 0 83 'h5t_compound_f' 0 63 'h5s_simple_f' 0 89
-'h5s_select_prepend_f' 0 77 'h5s_select_notb_f' 0 80 'h5s_select_or_f' 0
-86 'h5s_select_xor_f' 0 81 'h5s_select_set_f' 0 87 'h5s_unlimited_f' 0
-85 'h5t_array_f' 0 39 'h5t_bitfield_f' 0 65 'h5t_enum_f' 0 61
-'h5t_dir_descend_f' 0 37 'h5t_cset_utf8_f' 0 45 'h5t_dir_ascend_f' 0 38
-'h5t_std_ref_obj' 0 256 'h5t_native_character' 0 257 'h5t_ieee_f32be' 0
-247 'h5t_float_f' 0 68 'h5t_flags' 0 3 'h5t_flags_len' 0 424
-'h5t_ieee_f64le' 0 244 'h5t_ieee_f64be' 0 245 'h5t_ieee_f32le' 0 246
-'h5t_integer_f' 0 69 'h5t_std_i64le' 0 236 'h5t_pad_error_f' 0 53
-'h5t_native_integer_1' 0 254 'h5t_native_double' 0 258
-'h5t_native_integer' 0 260 'h5t_pad_background_f' 0 54 'h5t_norm_none_f'
-0 47 'h5t_norm_implied_f' 0 49 'h5t_native_integer_2' 0 253
-'h5t_native_integer_4' 0 252 'h5t_native_real_16' 0 248 'h5t_native_real'
-0 259 'h5t_native_integer_8' 0 251 'h5t_native_real_4' 0 250
-'h5t_native_real_8' 0 249 'h5t_no_class_f' 0 70 'h5t_norm_msbset_f' 0 48
-'h5t_opaque_f' 0 64 'h5t_order_le_f' 0 60 'h5t_order_be_f' 0 59
-'h5t_order_none_f' 0 57 'h5t_order_vax_f' 0 58 'h5t_std_i32be' 0 239
-'h5t_pad_zero_f' 0 56 'h5t_pad_one_f' 0 55 'h5t_reference_f' 0 62
-'h5t_sgn_error_f' 0 50 'h5t_sgn_2_f' 0 51 'h5t_std_i16le' 0 240
-'h5t_sgn_none_f' 0 52 'h5t_std_i16be' 0 241 'h5t_std_i32le' 0 238
-'h5t_std_i64be' 0 237 'h5t_std_ref_dsetreg' 0 255 'h5t_std_i8le' 0 242
-'h5t_std_i8be' 0 243 'h5t_std_u16be' 0 233 'h5t_std_u32le' 0 230
-'h5t_std_u32be' 0 231 'integer_types' 0 7 'h5t_str_error_f' 0 41
-'h5t_std_u8be' 0 235 'h5t_std_u64le' 0 228 'h5t_std_u64be' 0 229
-'h5t_std_u8le' 0 234 'hssize_t' 0 433 'h5z_disable_edc_f' 0 30
-'h5t_str_nullpad_f' 0 43 'h5t_str_nullterm_f' 0 44 'h5t_string_f' 0 66
-'h5t_string' 0 227 'h5t_str_spacepad_f' 0 42 'h5t_vlen_f' 0 40
-'h5t_time_f' 0 67 'hobj_ref_t_f' 0 431 'h5z_filter_all_f' 0 23
-'h5z_enable_edc_f' 0 29 'h5z_error_edc_f' 0 31 'h5z_filter_error_f' 0 36
-'h5z_filter_decode_enabled_f' 0 24 'h5z_filter_deflate_f' 0 34
-'h5z_filter_encode_enabled_f' 0 25 'hdset_reg_ref_t_f' 0 428 'h5z_flags'
-0 9 'h5z_filter_shuffle_f' 0 33 'h5z_filter_none_f' 0 35
-'h5z_filter_fletcher32_f' 0 32 'h5z_flag_optional_f' 0 26
-'h5z_filter_szip_f' 0 27 'h5z_no_edc_f' 0 28 'h5z_flags_len' 0 425
-'haddr_t' 0 426 'hid_t' 0 427 'hsize_t' 0 430 'predef_types' 0 5
-'object_namelen_default_f' 0 435 'integer_types_len' 0 434
-'ref_reg_buf_len' 0 438 'predef_types_len' 0 436 'size_t' 0 437)
diff --git a/interfaces/ext/hdf5/h5global.mod b/interfaces/ext/hdf5/h5global.mod
deleted file mode 100644
index 7a006b8..0000000
--- a/interfaces/ext/hdf5/h5global.mod
+++ /dev/null
@@ -1,1354 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5f90global.f90 on Mon Feb 14 14:35:46 2011
-If you edit this, you'll get what you deserve.
-
-
-(() () () () () () () () () () () () () () () () () () () () ())
-
-()
-
-()
-
-(('h5d_flags' 2 0) ('floating_types' 3 0) ('h5fd_flags' 4 0) (
-'h5fd_hid_flags' 5 0) ('h5generic_flags' 6 0) ('h5g_flags' 7 0) (
-'h5f_flags' 8 0) ('h5p_flags' 9 0) ('h5o_flags' 10 0) ('h5lib_flags' 11
-0) ('h5l_flags' 12 0) ('h5p_flags_int' 13 0) ('h5t_flags' 14 0) (
-'h5s_flags' 15 0) ('h5r_flags' 16 0) ('h5i_flags' 17 0) (
-'predefined_types' 18 0) ('integer_types' 19 0) ('h5z_flags' 20 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 21 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 22 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 23 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 24 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 25 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 20 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 26 ())) ('h5global.eq.6' (VARIABLE (INTEGER 4
-()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 27 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 28 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 29 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 30 ())) ('h5global.eq.10' (VARIABLE (INTEGER 4
-()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 31 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 32 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 33 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 20
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.13'
-(VARIABLE (INTEGER 4 ()) 0 34 ())) ('h5global.eq.14' (VARIABLE (INTEGER
-4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 35 ())) ('h5global.eq.15' (
-VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 36 ())) (
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '34') 1)))) 'h5global.eq.16' (VARIABLE (
-INTEGER 4 ()) 0 37 ())) ('h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 14
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '33') 1)))) 'h5global.eq.17'
-(VARIABLE (INTEGER 4 ()) 0 38 ())) ('h5global.eq.18' (VARIABLE (INTEGER
-4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '32') 1))))
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 39 ())) ('h5global.eq.19' (
-VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '31') 1)))) 'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 40 ())) (
-'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '30') 1)))) 'h5global.eq.20' (VARIABLE (
-INTEGER 4 ()) 0 41 ())) ('h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 14
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21'
-(VARIABLE (INTEGER 4 ()) 0 42 ())) ('h5global.eq.22' (VARIABLE (INTEGER
-4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 43 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 44 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 45 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 14
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1)))) 'h5global.eq.25'
-(VARIABLE (INTEGER 4 ()) 0 46 ())) ('h5global.eq.26' (VARIABLE (INTEGER
-4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '24') 1))))
-'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 47 ())) ('h5global.eq.27' (
-VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '23') 1)))) 'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 48 ())) (
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.28' (VARIABLE (
-INTEGER 4 ()) 0 49 ())) ('h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 14
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.29'
-(VARIABLE (INTEGER 4 ()) 0 50 ())) ('h5global.eq.30' (VARIABLE (INTEGER
-4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 51 ())) ('h5global.eq.31' (
-VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 52 ())) (
-'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.32' (VARIABLE (
-INTEGER 4 ()) 0 53 ())) ('h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 14
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33'
-(VARIABLE (INTEGER 4 ()) 0 54 ())) ('h5global.eq.34' (VARIABLE (INTEGER
-4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 55 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 56 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 57 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 14
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.37'
-(VARIABLE (INTEGER 4 ()) 0 58 ())) ('h5global.eq.38' (VARIABLE (INTEGER
-4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 59 ())) ('h5global.eq.39' (
-VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 60 ())) (
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.40' (VARIABLE (
-INTEGER 4 ()) 0 61 ())) ('h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 14
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.41'
-(VARIABLE (INTEGER 4 ()) 0 62 ())) ('h5global.eq.42' (VARIABLE (INTEGER
-4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 63 ())) ('h5global.eq.43' (
-VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 64 ())) (
-'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.44' (VARIABLE (
-INTEGER 4 ()) 0 65 ())) ('h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 14
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45'
-(VARIABLE (INTEGER 4 ()) 0 66 ())) ('h5global.eq.46' (VARIABLE (INTEGER
-4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 67 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 68 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 69 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 14
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.49'
-(VARIABLE (INTEGER 4 ()) 0 70 ())) ('h5global.eq.50' (VARIABLE (INTEGER
-4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 71 ())) ('h5global.eq.51' (
-VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 72 ())) (
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.52' (VARIABLE (
-INTEGER 4 ()) 0 73 ())) ('h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 15
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.53'
-(VARIABLE (INTEGER 4 ()) 0 74 ())) ('h5global.eq.54' (VARIABLE (INTEGER
-4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 75 ())) ('h5global.eq.55' (
-VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 76 ())) (
-'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.56' (VARIABLE (
-INTEGER 4 ()) 0 77 ())) ('h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 15
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57'
-(VARIABLE (INTEGER 4 ()) 0 78 ())) ('h5global.eq.58' (VARIABLE (INTEGER
-4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 79 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 80 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 81 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 15
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.61'
-(VARIABLE (INTEGER 4 ()) 0 82 ())) ('h5global.eq.62' (VARIABLE (INTEGER
-4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 83 ())) ('h5global.eq.63' (
-VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 84 ())) (
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.64' (VARIABLE (
-INTEGER 4 ()) 0 85 ())) ('h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 15
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.65'
-(VARIABLE (INTEGER 4 ()) 0 86 ())) ('h5global.eq.66' (VARIABLE (INTEGER
-4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 87 ())) ('h5global.eq.67' (
-VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 88 ())) (
-'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.68' (VARIABLE (
-INTEGER 4 ()) 0 89 ())) ('h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 15
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69'
-(VARIABLE (INTEGER 4 ()) 0 90 ())) ('h5global.eq.70' (VARIABLE (INTEGER
-4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 91 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 92 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 93 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 13
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.73'
-(VARIABLE (INTEGER 4 ()) 0 94 ())) ('h5global.eq.74' (VARIABLE (INTEGER
-4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 95 ())) ('h5global.eq.75' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 96 ())) (
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.76' (VARIABLE (
-INTEGER 4 ()) 0 97 ())) ('h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.77'
-(VARIABLE (INTEGER 4 ()) 0 98 ())) ('h5global.eq.78' (VARIABLE (INTEGER
-4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 99 ())) ('h5global.eq.79' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 100 ())) (
-'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.80' (VARIABLE (
-INTEGER 4 ()) 0 101 ())) ('h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 9
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81'
-(VARIABLE (INTEGER 4 ()) 0 102 ())) ('h5global.eq.82' (VARIABLE (
-INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 103 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 104 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 105 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 9
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.85'
-(VARIABLE (INTEGER 4 ()) 0 106 ())) ('h5global.eq.86' (VARIABLE (
-INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 107 ())) ('h5global.eq.87' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 108 ())) (
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.88' (VARIABLE (
-INTEGER 4 ()) 0 109 ())) ('h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 9
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.89'
-(VARIABLE (INTEGER 4 ()) 0 110 ())) ('h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 111 ())) ('h5global.eq.91' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 112 ())) (
-'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.92' (VARIABLE (
-INTEGER 4 ()) 0 113 ())) ('h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93'
-(VARIABLE (INTEGER 4 ()) 0 114 ())) ('h5global.eq.94' (VARIABLE (
-INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 115 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 116 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 117 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.97'
-(VARIABLE (INTEGER 4 ()) 0 118 ())) ('h5global.eq.98' (VARIABLE (
-INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 119 ())) ('h5global.eq.99' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 120 ())) (
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.100' (VARIABLE (
-INTEGER 4 ()) 0 121 ())) ('h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0
-10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 122 ())) ('h5global.eq.102'
-(VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 123 ())) (
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.103' (VARIABLE (
-INTEGER 4 ()) 0 124 ())) ('h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0
-10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 125 ())) ('h5global.eq.105'
-(VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 126 ())) (
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.106' (VARIABLE (
-INTEGER 4 ()) 0 127 ())) ('h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0
-10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 128 ())) ('h5global.eq.108'
-(VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 129 ())) (
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.109' (VARIABLE (
-INTEGER 4 ()) 0 130 ())) ('h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0
-10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 131 ())) ('h5global.eq.111'
-(VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 132 ())) (
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.112' (VARIABLE (
-INTEGER 4 ()) 0 133 ())) ('h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0
-10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 134 ())) ('h5global.eq.114'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 135 ())) (
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.115' (VARIABLE (
-INTEGER 4 ()) 0 136 ())) ('h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 137 ())) ('h5global.eq.117'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 138 ())) (
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.118' (VARIABLE (
-INTEGER 4 ()) 0 139 ())) ('h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 140 ())) ('h5global.eq.120'
-(VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 141 ())) (
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.121' (VARIABLE (
-INTEGER 4 ()) 0 142 ())) ('h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0
-17 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 143 ())) ('h5global.eq.123'
-(VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 144 ())) (
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.124' (VARIABLE (
-INTEGER 4 ()) 0 145 ())) ('h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0
-17 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 146 ())) ('h5global.eq.126'
-(VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 147 ())) (
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.127' (VARIABLE (
-INTEGER 4 ()) 0 148 ())) ('h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 149 ())) ('h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 150 ())) ('h5global.eq.130'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 151 ())) (
-'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.131' (VARIABLE (
-INTEGER 4 ()) 0 152 ())) ('h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132'
-(VARIABLE (INTEGER 4 ()) 0 153 ())) ('h5global.eq.133' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 154 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 155 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 156 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 4
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.136'
-(VARIABLE (INTEGER 4 ()) 0 157 ())) ('h5global.eq.137' (VARIABLE (
-INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 158 ())) ('h5global.eq.138'
-(VARIABLE (INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 159 ())) (
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.139' (VARIABLE (
-INTEGER 4 ()) 0 160 ())) ('h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 4
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 161 ())) ('h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 162 ())) ('h5global.eq.142'
-(VARIABLE (INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 163 ())) (
-'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.143' (VARIABLE (
-INTEGER 4 ()) 0 164 ())) ('h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 4
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144'
-(VARIABLE (INTEGER 4 ()) 0 165 ())) ('h5global.eq.145' (VARIABLE (
-INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 166 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 167 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 168 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 2
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 169 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 170 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 171 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 2
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 172 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 173 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 174 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 2
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 175 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 176 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 177 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 2
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 178 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 179 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 180 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 2
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.160'
-(VARIABLE (INTEGER 4 ()) 0 181 ())) ('h5global.eq.161' (VARIABLE (
-INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 182 ())) ('h5global.eq.162'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 183 ())) (
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.163' (VARIABLE (
-INTEGER 4 ()) 0 184 ())) ('h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 2
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 185 ())) ('h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 186 ())) ('h5global.eq.166'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 187 ())) (
-'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.167' (VARIABLE (
-INTEGER 4 ()) 0 188 ())) ('h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ())) ('h5global.eq.169'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 190 ())) (
-'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.170' (VARIABLE (
-INTEGER 4 ()) 0 191 ())) ('h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171'
-(VARIABLE (INTEGER 4 ()) 0 192 ())) ('h5global.eq.172' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 193 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 194 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 195 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.175'
-(VARIABLE (INTEGER 4 ()) 0 196 ())) ('h5global.eq.176' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 197 ())) ('h5global.eq.177'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 198 ())) (
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.178' (VARIABLE (
-INTEGER 4 ()) 0 199 ())) ('h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 201 ())) ('h5global.eq.181'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 202 ())) (
-'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.182' (VARIABLE (
-INTEGER 4 ()) 0 203 ())) ('h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183'
-(VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.184' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 205 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 206 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 207 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.187'
-(VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.188' (VARIABLE (
-INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 209 ())) ('h5global.eq.189'
-(VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 210 ())) (
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.190' (VARIABLE (
-INTEGER 4 ()) 0 211 ())) ('h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 8
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 212 ())) ('h5global.eq.192'
-(VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ())) (
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.193' (VARIABLE (
-INTEGER 4 ()) 0 214 ())) ('h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 8
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 215 ())) ('h5global.eq.195'
-(VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 216 ())) (
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.196' (VARIABLE (
-INTEGER 4 ()) 0 217 ())) ('h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 8
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 218 ())) ('h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.199'
-(VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 220 ())) (
-'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.200' (VARIABLE (
-INTEGER 4 ()) 0 221 ())) ('h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 8
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201'
-(VARIABLE (INTEGER 4 ()) 0 222 ())) ('h5global.eq.202' (VARIABLE (
-INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 8
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.205'
-(VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.206' (VARIABLE (
-INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.207'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 228 ())) (
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.208' (VARIABLE (
-INTEGER 4 ()) 0 229 ())) ('h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 230 ())) ('h5global.eq.210'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 231 ())) (
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.211' (VARIABLE (
-INTEGER 4 ()) 0 232 ())) ('h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 233 ())) ('h5global.eq.213'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 234 ())) (
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.214' (VARIABLE (
-INTEGER 4 ()) 0 235 ())) ('h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.216'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.217' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.219'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 240 ())) (
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.220' (VARIABLE (
-INTEGER 4 ()) 0 241 ())) ('h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 242 ())) ('h5global.eq.222'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 243 ())) (
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.223' (VARIABLE (
-INTEGER 4 ()) 0 244 ())) ('h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 3
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 245 ())) ('h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.226'
-(VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.227' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0
-18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.229'
-(VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.230' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0
-18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.232'
-(VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.233' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0
-18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.235'
-(VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.236' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0
-18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.238'
-(VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.239' (VARIABLE (
-INTEGER 4 ()) 0 260 ())))
-
-(261 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-262 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-263 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-264 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-265 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-266 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-267 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-268 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-269 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-270 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-271 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-272 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-3 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-205 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-206 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-273 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-208 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-200 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-207 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-274 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-21 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-183 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-22 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-180 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-168 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-167 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-181 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-184 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-185 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-187 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-173 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-175 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-170 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-169 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-171 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-172 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-174 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-186 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-178 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-179 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-223 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-217 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-216 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-177 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-176 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-8 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-210 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '19') () 0 ()
-())
-218 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-213 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-153 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-154 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-4 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-221 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-220 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-278 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-5 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-160 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-152 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-215 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-211 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-166 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-158 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-159 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-163 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-157 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-156 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-161 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-164 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-155 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-151 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-149 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-150 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-165 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-162 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-7 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-198 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-194 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '12') () 0 ()
-())
-197 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-195 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-189 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-190 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-191 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-188 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-6 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9')) 0 () ())
-281 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(UNKNOWN 0 ()) 0 0 () () 0 () ())
-282 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-199 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-142 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-196 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-143 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-144 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-141 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-192 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-193 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-148 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-17 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-284 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6') () 0 () ())
-12 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-146 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-285 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7') () 0 () ())
-147 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-136 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-137 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-138 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-286 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-11 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-139 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-140 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-132 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-128 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-133 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-129 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-130 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-134 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-287 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-115 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-118 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-10 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-131 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-117 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-119 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-116 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-125 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-124 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-122 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-114 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-127 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-113 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-94 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-98 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-126 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-104 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-109 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-110 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-93 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-123 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-121 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-120 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-101 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-112 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-111 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-107 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-288 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-13 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-102 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-97 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-96 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-95 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-103 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-289 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '18') () 0 ()
-())
-106 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-16 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-91 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-99 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-105 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-9 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-108 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-100 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-15 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-290 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '20') () 0 ()
-())
-90 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-88 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-84 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-92 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-75 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-82 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-73 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-78 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-76 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-74 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-79 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-83 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-86 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-87 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-77 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-81 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-89 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-80 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-39 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-63 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-46 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-65 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-85 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-72 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-71 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-38 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-45 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-61 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-14 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-37 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-291 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2') () 0 () ())
-246 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-68 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-292 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '34') () 0 ()
-())
-258 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-69 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-49 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-70 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-64 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-47 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-60 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-59 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-58 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-54 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-57 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-55 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-53 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-48 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-62 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-52 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-50 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-51 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-56 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-242 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-231 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-230 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-43 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-66 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-227 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-42 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-40 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-30 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-67 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-44 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-41 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-23 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-31 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-29 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-25 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-36 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-35 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-33 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-32 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-34 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-26 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-293 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '14') () 0 ()
-())
-28 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-20 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-294 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-295 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((296 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-297 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-298 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-299 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-300 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-18 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-19 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-301 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-302 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((303 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-304 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-305 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-306 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-27 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-24 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-135 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-145 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-)
-
-('h5i_datatype_f' 0 145 'fortran_real_8' 0 283 'floating_types' 0 3
-'__convert_i4_i8' 0 261 'fortran_real_16' 0 272 'fortran_real_12' 0 270
-'floating_types_len' 0 269 'fortran_integer_8' 0 268 'fortran_integer_1'
-0 266 'fortran_integer' 0 263 'fortran_double' 0 262 'fortran_integer_4'
-0 265 'fortran_integer_2' 0 264 'fortran_real' 0 267 'fortran_real_4' 0
-271 'h5fd_stdio_f' 0 148 'h5fd_mem_default_f' 0 162
-'h5d_chunk_cache_w0_dflt_f' 0 166 'h5d_alloc_time_error_f' 0 184
-'h5_iter_unknown_f' 0 204 'h5_iter_native_f' 0 201 'h5_index_name_f' 0
-207 'h5_index_crt_order_f' 0 206 'h5_index_n_f' 0 205 'h5_iter_dec_f' 0
-202 'h5_index_unknown_f' 0 208 'h5_integer_kind' 0 273 'h5_iter_inc_f' 0
-203 'h5_iter_n_f' 0 200 'h5_szip_ec_om_f' 0 22 'h5_real_kind' 0 274
-'h5d_alloc_time_early_f' 0 182 'h5d_alloc_time_default_f' 0 183
-'h5_szip_nn_om_f' 0 21 'h5d_alloc_time_late_f' 0 181
-'h5d_alloc_time_incr_f' 0 180 'h5d_chunk_cache_nbytes_dflt_f' 0 167
-'h5d_chunk_cache_nslots_dflt_f' 0 168 'h5f_libver_latest_f' 0 209
-'h5f_close_weak_f' 0 218 'h5d_space_sts_allocated_f' 0 176
-'h5d_contiguous_f' 0 186 'h5d_compact_f' 0 187 'h5d_chunked_f' 0 185
-'h5d_flags_len' 0 275 'h5d_fill_time_alloc_f' 0 174
-'h5d_fill_value_error_f' 0 172 'h5d_fill_value_default_f' 0 170
-'h5d_fill_time_error_f' 0 175 'h5d_fill_time_never_f' 0 173 'h5d_flags'
-0 2 'h5d_fill_value_undefined_f' 0 171 'h5d_fill_value_user_defined_f' 0
-169 'h5d_space_sts_part_allocated_f' 0 177 'h5d_space_sts_error_f' 0 179
-'h5d_space_sts_not_allocated_f' 0 178 'h5f_acc_trunc_f' 0 224
-'h5f_acc_rdonly_f' 0 225 'h5f_acc_debug_f' 0 222 'h5f_acc_excl_f' 0 223
-'h5f_acc_rdwr_f' 0 226 'h5f_close_default_f' 0 219 'h5f_close_strong_f'
-0 216 'h5f_close_semi_f' 0 217 'h5f_flags_len' 0 276 'h5f_flags' 0 8
-'h5f_libver_earliest_f' 0 210 'h5f_obj_all_f' 0 211 'h5f_obj_dataset_f'
-0 214 'h5f_obj_file_f' 0 215 'h5f_obj_datatype_f' 0 212 'h5fd_log_f' 0
-152 'h5fd_hid_flags' 0 5 'h5f_scope_global_f' 0 220 'h5f_obj_group_f' 0
-213 'h5f_scope_local_f' 0 221 'h5fd_flags' 0 4 'h5fd_core_f' 0 154
-'h5fd_family_f' 0 153 'h5fd_flags_len' 0 277 'h5fd_hid_flags_len' 0 278
-'h5fd_mem_btree_f' 0 160 'h5fd_mpio_independent_f' 0 165 'h5fd_mpio_f' 0
-151 'h5fd_mem_ntypes_f' 0 155 'h5fd_mem_lheap_f' 0 157 'h5fd_mem_draw_f'
-0 159 'h5fd_mem_gheap_f' 0 158 'h5fd_mem_nolist_f' 0 163
-'h5fd_mpio_collective_f' 0 164 'h5fd_mem_super_f' 0 161 'h5fd_mem_ohdr_f'
-0 156 'h5fd_multi_f' 0 150 'h5fd_sec2_f' 0 149 'h5g_link_hard_f' 0 193
-'h5g_link_f' 0 195 'h5fortran_types' 0 280 'h5g_dataset_f' 0 197
-'h5g_flags_len' 0 279 'h5g_flags' 0 7 'h5g_link_error_f' 0 194
-'h5g_group_f' 0 198 'h5g_link_soft_f' 0 192 'h5i_badid_f' 0 141
-'h5g_type_f' 0 196 'h5g_storage_type_dense_f' 0 188
-'h5g_storage_type_compact_f' 0 189 'h5g_storage_type_unknown_f' 0 191
-'h5g_storage_type_symbol_table_f' 0 190 'h5i_attr_f' 0 142 'h5g_unknown_f'
-0 199 'h5generic_flags_len' 0 282 'h5generic_flags' 0 6 'h5global' 0 281
-'h5i_dataspace_f' 0 144 'h5i_dataset_f' 0 143 'h5l_link_class_t_vers_f'
-0 135 'h5i_file_f' 0 147 'h5i_flags_len' 0 285 'h5i_flags' 0 17
-'h5i_group_f' 0 146 'h5l_flags' 0 12 'h5l_flags_len' 0 284
-'h5t_ieee_f64be' 0 245 'h5t_flags_len' 0 292 'h5r_flags_len' 0 291
-'h5p_datatype_access_f' 0 100 'h5o_hdr_chunk0_size_f' 0 120
-'h5o_hdr_attr_crt_order_track_f' 0 119 'h5o_copy_expand_reference_f' 0
-131 'h5o_copy_all_f' 0 128 'h5l_type_error_f' 0 140 'h5l_same_loc_f' 0
-136 'h5l_type_hard_f' 0 139 'h5l_type_external_f' 0 137 'h5lib_flags' 0
-11 'h5l_type_soft_f' 0 138 'h5lib_flags_len' 0 286
-'h5o_copy_expand_ext_link_f' 0 132 'h5o_flags' 0 10
-'h5o_copy_shallow_hierarchy_f' 0 134 'h5o_copy_preserve_null_flag_f' 0
-129 'h5o_copy_expand_soft_link_f' 0 133 'h5o_copy_without_attr_flag_f' 0
-130 'h5o_hdr_attr_crt_order_index_f' 0 118 'h5o_hdr_all_flags_f' 0 115
-'h5o_flags_len' 0 287 'h5o_hdr_attr_store_phase_cha_f' 0 117
-'h5o_shmesg_all_flag_f' 0 121 'h5o_hdr_store_times_f' 0 116
-'h5o_shmesg_pline_flag_f' 0 123 'h5o_shmesg_max_list_size_f' 0 113
-'h5o_shmesg_attr_flag_f' 0 122 'h5o_shmesg_fill_flag_f' 0 124
-'h5o_shmesg_dtype_flag_f' 0 125 'h5o_shmesg_none_flag_f' 0 127
-'h5o_shmesg_max_nindexes_f' 0 114 'h5p_crt_order_tracked_f' 0 93
-'h5o_shmesg_sdspace_flag_f' 0 126 'h5p_attribute_create_f' 0 98
-'h5p_crt_order_indexed_f' 0 94 'h5p_dataset_create_f' 0 110
-'h5p_dataset_access_f' 0 104 'h5p_dataset_xfer_f' 0 109 'h5p_file_mount_f'
-0 108 'h5p_default_f' 0 107 'h5p_datatype_create_f' 0 101
-'h5p_file_access_f' 0 111 'h5p_file_create_f' 0 112 'h5p_flags' 0 9
-'h5p_object_create_f' 0 105 'h5p_flags_len' 0 289 'h5p_flags_int' 0 13
-'h5p_flags_int_len' 0 288 'h5p_group_create_f' 0 103 'h5p_group_access_f'
-0 102 'h5p_link_access_f' 0 95 'h5p_link_create_f' 0 96
-'h5p_object_copy_f' 0 97 'h5p_string_create_f' 0 99 'h5p_root_f' 0 106
-'h5r_dataset_region_f' 0 91 'h5r_flags' 0 16 'h5t_dir_descend_f' 0 37
-'h5t_cset_utf8_f' 0 45 'h5s_sel_all_f' 0 71 'h5r_object_f' 0 92
-'h5s_all_f' 0 84 'h5s_null_f' 0 88 'h5s_flags_len' 0 290 'h5s_flags' 0
-15 'h5s_scalar_f' 0 90 'h5s_sel_hyperslabs_f' 0 72 'h5s_sel_error_f' 0
-75 'h5s_unlimited_f' 0 85 'h5s_select_notb_f' 0 80 'h5s_select_noop_f' 0
-83 'h5s_sel_none_f' 0 74 'h5s_select_invalid_f' 0 76 'h5s_select_append_f'
-0 78 'h5s_sel_points_f' 0 73 'h5s_select_and_f' 0 82 'h5s_select_nota_f'
-0 79 'h5s_simple_f' 0 89 'h5s_select_xor_f' 0 81 'h5s_select_prepend_f'
-0 77 'h5s_select_or_f' 0 86 'h5s_select_set_f' 0 87 'h5t_bitfield_f' 0
-65 'h5t_array_f' 0 39 'h5t_cset_ascii_f' 0 46 'h5t_compound_f' 0 63
-'h5t_dir_ascend_f' 0 38 'h5t_flags' 0 14 'h5t_enum_f' 0 61 'h5t_float_f'
-0 68 'h5t_ieee_f32be' 0 247 'h5t_ieee_f32le' 0 246
-'h5z_filter_decode_enabled_f' 0 24 'h5t_std_i16le' 0 240 'h5t_ieee_f64le'
-0 244 'h5t_pad_zero_f' 0 56 'h5t_norm_msbset_f' 0 48 'h5t_native_real_4'
-0 250 'h5t_native_real' 0 259 'h5t_integer_f' 0 69 'h5t_native_integer_2'
-0 253 'h5t_native_character' 0 257 'h5t_native_integer' 0 260
-'h5t_native_double' 0 258 'h5t_native_integer_1' 0 254
-'h5t_native_integer_4' 0 252 'h5t_native_integer_8' 0 251
-'h5t_native_real_16' 0 248 'h5t_no_class_f' 0 70 'h5t_native_real_8' 0
-249 'h5t_norm_implied_f' 0 49 'h5t_pad_error_f' 0 53 'h5t_order_none_f'
-0 57 'h5t_order_be_f' 0 59 'h5t_norm_none_f' 0 47 'h5t_opaque_f' 0 64
-'h5t_order_le_f' 0 60 'h5t_pad_background_f' 0 54 'h5t_order_vax_f' 0 58
-'h5t_pad_one_f' 0 55 'h5t_sgn_2_f' 0 51 'h5t_reference_f' 0 62
-'h5t_sgn_error_f' 0 50 'h5t_sgn_none_f' 0 52 'h5t_std_i16be' 0 241
-'h5z_enable_edc_f' 0 29 'h5t_std_i8be' 0 243 'h5t_std_i64be' 0 237
-'h5t_std_i32be' 0 239 'h5t_std_i32le' 0 238 'h5t_std_i64le' 0 236
-'h5t_std_u64be' 0 229 'h5t_std_u16le' 0 232 'h5t_std_ref_dsetreg' 0 255
-'h5t_std_i8le' 0 242 'h5t_std_u16be' 0 233 'h5t_std_ref_obj' 0 256
-'h5t_std_u32le' 0 230 'h5t_std_u32be' 0 231 'h5t_std_u64le' 0 228
-'h5t_std_u8le' 0 234 'h5t_std_u8be' 0 235 'h5t_str_error_f' 0 41
-'h5t_str_nullterm_f' 0 44 'h5t_str_nullpad_f' 0 43 'h5t_time_f' 0 67
-'h5t_str_spacepad_f' 0 42 'h5t_string' 0 227 'h5t_string_f' 0 66
-'h5z_disable_edc_f' 0 30 'h5t_vlen_f' 0 40 'h5z_error_edc_f' 0 31
-'h5z_filter_all_f' 0 23 'h5z_filter_szip_f' 0 27 'h5z_filter_deflate_f'
-0 34 'h5z_filter_fletcher32_f' 0 32 'h5z_filter_error_f' 0 36
-'h5z_filter_encode_enabled_f' 0 25 'h5z_filter_shuffle_f' 0 33
-'h5z_filter_none_f' 0 35 'predef_types_len' 0 306 'hobj_ref_t_f' 0 302
-'haddr_t' 0 297 'h5z_flags' 0 20 'h5z_flag_optional_f' 0 26 'h5z_no_edc_f'
-0 28 'h5z_flags_len' 0 293 'hdset_reg_ref_t_f' 0 295 'hid_t' 0 294
-'hssize_t' 0 301 'hsize_t' 0 298 'integer_types' 0 19 'predef_types' 0
-18 'integer_types_len' 0 300 'object_namelen_default_f' 0 299
-'ref_reg_buf_len' 0 305 'size_t' 0 304)
diff --git a/interfaces/ext/hdf5/h5i.mod b/interfaces/ext/hdf5/h5i.mod
deleted file mode 100644
index a779003..0000000
--- a/interfaces/ext/hdf5/h5i.mod
+++ /dev/null
@@ -1,1421 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5Iff.f90 on Mon Feb 14 14:35:49 2011
-If you edit this, you'll get what you deserve.
-
-(() () () () () () ()
-() () () () () () () () () () () () () ())
-
-()
-
-()
-
-(('h5l_flags' 2 0) ('h5t_flags' 3 0) ('h5p_flags_int' 4 0) (
-'predefined_types' 5 0) ('h5i_flags' 6 0) ('integer_types' 7 0) (
-'h5r_flags' 8 0) ('h5z_flags' 9 0) ('h5s_flags' 10 0) ('h5d_flags' 11 0)
-('h5fd_hid_flags' 12 0) ('h5fd_flags' 13 0) ('h5g_flags' 14 0) (
-'h5generic_flags' 15 0) ('h5o_flags' 16 0) ('h5lib_flags' 17 0) (
-'h5p_flags' 18 0) ('h5f_flags' 19 0) ('floating_types' 20 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 21 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 22 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 23 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 24 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 25 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 26 ())) ('h5global.eq.6' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 27 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 28 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 29 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 30 ())) ('h5global.eq.10' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 31 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 32 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 33 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.13'
-(VARIABLE (INTEGER 4 ()) 0 34 ())) ('h5global.eq.14' (VARIABLE (INTEGER
-4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 35 ())) ('h5global.eq.15' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 36 ())) (
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '34') 1)))) 'h5global.eq.16' (VARIABLE (
-INTEGER 4 ()) 0 37 ())) ('h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '33') 1)))) 'h5global.eq.17'
-(VARIABLE (INTEGER 4 ()) 0 38 ())) ('h5global.eq.18' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '32') 1))))
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 39 ())) ('h5global.eq.19' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '31') 1)))) 'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 40 ())) (
-'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '30') 1)))) 'h5global.eq.20' (VARIABLE (
-INTEGER 4 ()) 0 41 ())) ('h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21'
-(VARIABLE (INTEGER 4 ()) 0 42 ())) ('h5global.eq.22' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 43 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 44 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 45 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1)))) 'h5global.eq.25'
-(VARIABLE (INTEGER 4 ()) 0 46 ())) ('h5global.eq.26' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '24') 1))))
-'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 47 ())) ('h5global.eq.27' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '23') 1)))) 'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 48 ())) (
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.28' (VARIABLE (
-INTEGER 4 ()) 0 49 ())) ('h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.29'
-(VARIABLE (INTEGER 4 ()) 0 50 ())) ('h5global.eq.30' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 51 ())) ('h5global.eq.31' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 52 ())) (
-'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.32' (VARIABLE (
-INTEGER 4 ()) 0 53 ())) ('h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33'
-(VARIABLE (INTEGER 4 ()) 0 54 ())) ('h5global.eq.34' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 55 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 56 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 57 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.37'
-(VARIABLE (INTEGER 4 ()) 0 58 ())) ('h5global.eq.38' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 59 ())) ('h5global.eq.39' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 60 ())) (
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.40' (VARIABLE (
-INTEGER 4 ()) 0 61 ())) ('h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.41'
-(VARIABLE (INTEGER 4 ()) 0 62 ())) ('h5global.eq.42' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 63 ())) ('h5global.eq.43' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 64 ())) (
-'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.44' (VARIABLE (
-INTEGER 4 ()) 0 65 ())) ('h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45'
-(VARIABLE (INTEGER 4 ()) 0 66 ())) ('h5global.eq.46' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 67 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 68 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 69 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.49'
-(VARIABLE (INTEGER 4 ()) 0 70 ())) ('h5global.eq.50' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 71 ())) ('h5global.eq.51' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 72 ())) (
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.52' (VARIABLE (
-INTEGER 4 ()) 0 73 ())) ('h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.53'
-(VARIABLE (INTEGER 4 ()) 0 74 ())) ('h5global.eq.54' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 75 ())) ('h5global.eq.55' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 76 ())) (
-'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.56' (VARIABLE (
-INTEGER 4 ()) 0 77 ())) ('h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57'
-(VARIABLE (INTEGER 4 ()) 0 78 ())) ('h5global.eq.58' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 79 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 80 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 81 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.61'
-(VARIABLE (INTEGER 4 ()) 0 82 ())) ('h5global.eq.62' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 83 ())) ('h5global.eq.63' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 84 ())) (
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.64' (VARIABLE (
-INTEGER 4 ()) 0 85 ())) ('h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.65'
-(VARIABLE (INTEGER 4 ()) 0 86 ())) ('h5global.eq.66' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 87 ())) ('h5global.eq.67' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 88 ())) (
-'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.68' (VARIABLE (
-INTEGER 4 ()) 0 89 ())) ('h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69'
-(VARIABLE (INTEGER 4 ()) 0 90 ())) ('h5global.eq.70' (VARIABLE (INTEGER
-4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 91 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 92 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 93 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 4 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.73'
-(VARIABLE (INTEGER 4 ()) 0 94 ())) ('h5global.eq.74' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 95 ())) ('h5global.eq.75' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 96 ())) (
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.76' (VARIABLE (
-INTEGER 4 ()) 0 97 ())) ('h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.77'
-(VARIABLE (INTEGER 4 ()) 0 98 ())) ('h5global.eq.78' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 99 ())) ('h5global.eq.79' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 100 ())) (
-'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.80' (VARIABLE (
-INTEGER 4 ()) 0 101 ())) ('h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81'
-(VARIABLE (INTEGER 4 ()) 0 102 ())) ('h5global.eq.82' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 103 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 104 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 105 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.85'
-(VARIABLE (INTEGER 4 ()) 0 106 ())) ('h5global.eq.86' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 107 ())) ('h5global.eq.87' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 108 ())) (
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.88' (VARIABLE (
-INTEGER 4 ()) 0 109 ())) ('h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.89'
-(VARIABLE (INTEGER 4 ()) 0 110 ())) ('h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 111 ())) ('h5global.eq.91' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 112 ())) (
-'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.92' (VARIABLE (
-INTEGER 4 ()) 0 113 ())) ('h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93'
-(VARIABLE (INTEGER 4 ()) 0 114 ())) ('h5global.eq.94' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 115 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 116 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 117 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.97'
-(VARIABLE (INTEGER 4 ()) 0 118 ())) ('h5global.eq.98' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 119 ())) ('h5global.eq.99' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 120 ())) (
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.100' (VARIABLE (
-INTEGER 4 ()) 0 121 ())) ('h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 122 ())) ('h5global.eq.102'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 123 ())) (
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.103' (VARIABLE (
-INTEGER 4 ()) 0 124 ())) ('h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 125 ())) ('h5global.eq.105'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 126 ())) (
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.106' (VARIABLE (
-INTEGER 4 ()) 0 127 ())) ('h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 128 ())) ('h5global.eq.108'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 129 ())) (
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.109' (VARIABLE (
-INTEGER 4 ()) 0 130 ())) ('h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 131 ())) ('h5global.eq.111'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 132 ())) (
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.112' (VARIABLE (
-INTEGER 4 ()) 0 133 ())) ('h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 134 ())) ('h5global.eq.114'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 135 ())) (
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.115' (VARIABLE (
-INTEGER 4 ()) 0 136 ())) ('h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 2
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 137 ())) ('h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 138 ())) ('h5global.eq.118'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 139 ())) (
-'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.119' (VARIABLE (
-INTEGER 4 ()) 0 140 ())) ('h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120'
-(VARIABLE (INTEGER 4 ()) 0 141 ())) ('h5global.eq.121' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 142 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 143 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 144 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.124'
-(VARIABLE (INTEGER 4 ()) 0 145 ())) ('h5global.eq.125' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 146 ())) ('h5global.eq.126'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 147 ())) (
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.127' (VARIABLE (
-INTEGER 4 ()) 0 148 ())) ('h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 149 ())) ('h5global.eq.129'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 150 ())) (
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.130' (VARIABLE (
-INTEGER 4 ()) 0 151 ())) ('h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 152 ())) ('h5global.eq.132'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 153 ())) (
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.133' (VARIABLE (
-INTEGER 4 ()) 0 154 ())) ('h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 155 ())) ('h5global.eq.135'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 156 ())) (
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.136' (VARIABLE (
-INTEGER 4 ()) 0 157 ())) ('h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 158 ())) ('h5global.eq.138'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 159 ())) (
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.139' (VARIABLE (
-INTEGER 4 ()) 0 160 ())) ('h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 161 ())) ('h5global.eq.141'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 162 ())) (
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.142' (VARIABLE (
-INTEGER 4 ()) 0 163 ())) ('h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 164 ())) ('h5global.eq.144'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 165 ())) (
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.145' (VARIABLE (
-INTEGER 4 ()) 0 166 ())) ('h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1))))
-'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 167 ())) ('h5global.eq.147'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 168 ())) (
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.148' (VARIABLE (
-INTEGER 4 ()) 0 169 ())) ('h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 170 ())) ('h5global.eq.150'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 171 ())) (
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.151' (VARIABLE (
-INTEGER 4 ()) 0 172 ())) ('h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 173 ())) ('h5global.eq.153'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 174 ())) (
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.154' (VARIABLE (
-INTEGER 4 ()) 0 175 ())) ('h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 176 ())) ('h5global.eq.156'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 177 ())) (
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.157' (VARIABLE (
-INTEGER 4 ()) 0 178 ())) ('h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 179 ())) ('h5global.eq.159'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ())) (
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.160' (VARIABLE (
-INTEGER 4 ()) 0 181 ())) ('h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 182 ())) ('h5global.eq.162'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 183 ())) (
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.163' (VARIABLE (
-INTEGER 4 ()) 0 184 ())) ('h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 185 ())) ('h5global.eq.165'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 186 ())) (
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.166' (VARIABLE (
-INTEGER 4 ()) 0 187 ())) ('h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 188 ())) ('h5global.eq.168'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ())) (
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.169' (VARIABLE (
-INTEGER 4 ()) 0 190 ())) ('h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 191 ())) ('h5global.eq.171'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 192 ())) (
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.172' (VARIABLE (
-INTEGER 4 ()) 0 193 ())) ('h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 194 ())) ('h5global.eq.174'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 195 ())) (
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.175' (VARIABLE (
-INTEGER 4 ()) 0 196 ())) ('h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 197 ())) ('h5global.eq.177'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 198 ())) (
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.178' (VARIABLE (
-INTEGER 4 ()) 0 199 ())) ('h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.180'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.181' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.183'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 204 ())) (
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.184' (VARIABLE (
-INTEGER 4 ()) 0 205 ())) ('h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 206 ())) ('h5global.eq.186'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 207 ())) (
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.187' (VARIABLE (
-INTEGER 4 ()) 0 208 ())) ('h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 209 ())) ('h5global.eq.189'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 210 ())) (
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.190' (VARIABLE (
-INTEGER 4 ()) 0 211 ())) ('h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 212 ())) ('h5global.eq.192'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ())) (
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.193' (VARIABLE (
-INTEGER 4 ()) 0 214 ())) ('h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 215 ())) ('h5global.eq.195'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 216 ())) (
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.196' (VARIABLE (
-INTEGER 4 ()) 0 217 ())) ('h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 218 ())) ('h5global.eq.198'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 219 ())) (
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.199' (VARIABLE (
-INTEGER 4 ()) 0 220 ())) ('h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 221 ())) ('h5global.eq.201'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 222 ())) (
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.202' (VARIABLE (
-INTEGER 4 ()) 0 223 ())) ('h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.204'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.205' (VARIABLE (
-INTEGER 4 ()) 0 226 ())) ('h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.207'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 228 ())) (
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.208' (VARIABLE (
-INTEGER 4 ()) 0 229 ())) ('h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 230 ())) ('h5global.eq.210'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 231 ())) (
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.211' (VARIABLE (
-INTEGER 4 ()) 0 232 ())) ('h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 233 ())) ('h5global.eq.213'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 234 ())) (
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.214' (VARIABLE (
-INTEGER 4 ()) 0 235 ())) ('h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.217'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.218' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219'
-(VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.220' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.232'
-(VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.233' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 254 ())) ('h5global.eq.234'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 255 ())) (
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.235' (VARIABLE (
-INTEGER 4 ()) 0 256 ())) ('h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 257 ())) ('h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.238'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.239' (VARIABLE (
-INTEGER 4 ()) 0 260 ())))
-
-(20 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-261 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-262 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-263 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-264 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-265 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-266 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-267 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-268 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-269 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-270 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-207 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-208 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-205 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-206 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-200 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-272 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-273 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-274 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-21 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-22 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-183 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-180 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-184 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-167 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-166 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-168 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-185 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-181 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-187 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-174 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-186 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-170 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-171 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-172 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-173 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-11 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-176 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-179 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-177 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-223 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-216 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-217 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-178 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-169 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-210 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '19') () 0 ()
-())
-19 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-211 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-213 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-220 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-215 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-13 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-153 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-278 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-12 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-154 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-160 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-152 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-158 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-157 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-159 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-163 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-164 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-161 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-151 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-156 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-155 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-162 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-150 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-149 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-14 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-281 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '12') () 0 ()
-())
-198 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-195 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-194 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-197 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-189 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-192 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-193 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-148 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-165 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-218 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-175 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-190 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-191 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-15 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9')) 0 () ())
-199 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-141 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-142 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-282 'h5i' 'h5i' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-283 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(UNKNOWN 0 ()) 0 0 () () 0 () ())
-144 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-143 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-284 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-196 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-6 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-285 'h5idec_ref_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 286 0 (287 288 289) () 0 () ())
-146 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-290 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7') () 0 () ())
-291 'h5iget_name_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 292 0 (293 294 295 296 297) () 0 () ())
-298 'h5iget_file_id_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 299 0 (300 301 302) () 0 () ())
-303 'h5iget_ref_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 304 0 (305 306 307) () 0 () ())
-147 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-308 'h5iinc_ref_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 309 0 (310 311 312) () 0 () ())
-313 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6') () 0 () ())
-2 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-314 'h5iis_valid_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 315 0 (316 317 318) () 0 () ())
-319 'h5iget_type_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 320 0 (321 322 323) () 0 () ())
-140 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-139 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-17 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-138 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-324 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-128 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-137 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-136 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-129 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-133 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-131 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-132 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-134 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-135 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-145 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-325 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-16 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-118 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-115 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-130 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-117 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-116 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-120 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-125 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-124 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-113 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-122 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-121 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-127 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-114 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-98 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-126 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-104 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-110 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-93 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-94 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-101 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-100 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-109 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-123 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-112 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-111 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-107 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-18 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-4 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-326 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-102 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-103 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-96 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-97 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-106 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-105 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-95 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-327 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '18') () 0 ()
-())
-108 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-119 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-188 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-92 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-328 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2') () 0 () ())
-8 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-91 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-10 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-88 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-90 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-75 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-71 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-329 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '20') () 0 ()
-())
-84 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-73 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-82 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-74 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-72 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-83 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-76 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-86 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-80 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-87 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-81 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-77 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-65 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-39 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-85 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-89 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-63 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-79 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-38 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-45 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-37 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-330 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '34') () 0 ()
-())
-3 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-68 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-69 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-258 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-70 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-48 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-49 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-59 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-58 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-57 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-60 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-64 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-47 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-54 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-55 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-51 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-52 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-50 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-62 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-56 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-53 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-242 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-61 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-46 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-78 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-231 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-42 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-227 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-67 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-40 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-66 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-44 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-43 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-31 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-29 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-25 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-34 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-24 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-32 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-35 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-27 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-26 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-33 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-331 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '14') () 0 ()
-())
-332 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-28 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-9 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-333 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-334 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((335 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-36 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-23 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-336 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-337 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((338 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-30 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-339 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-41 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-340 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-341 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-342 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-343 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-344 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-5 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-7 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-230 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-99 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-321 'obj_id' '' 320 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-323 'hdferr' '' 320 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-288 'ref_count' '' 286 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-311 'ref_count' '' 309 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-289 'hdferr' '' 286 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-294 'buf' '' 292 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-295 'buf_size' '' 292 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-296 'name_size' '' 292 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-312 'hdferr' '' 309 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-322 'type' '' 320 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-297 'hdferr' '' 292 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-293 'obj_id' '' 292 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-306 'ref_count' '' 304 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-310 'obj_id' '' 309 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-305 'obj_id' '' 304 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-302 'hdferr' '' 299 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-301 'file_id' '' 299 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-318 'hdferr' '' 315 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-300 'obj_id' '' 299 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-317 'valid' '' 315 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-316 'id' '' 315 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-307 'hdferr' '' 304 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-287 'obj_id' '' 286 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-)
-
-('h5p_string_create_f' 0 99 'h5g_storage_type_dense_f' 0 188
-'h5d_fill_time_error_f' 0 175 'floating_types_len' 0 275 '__convert_i4_i8'
-0 261 'floating_types' 0 20 'h5d_alloc_time_early_f' 0 182
-'h5d_alloc_time_default_f' 0 183 'h5_iter_unknown_f' 0 204
-'fortran_integer_1' 0 273 'fortran_double' 0 263 'fortran_integer' 0 262
-'fortran_real_4' 0 272 'fortran_integer_2' 0 269 'fortran_real' 0 268
-'fortran_integer_4' 0 265 'fortran_integer_8' 0 264 'fortran_real_12' 0
-267 'fortran_real_16' 0 266 'h5_integer_kind' 0 271 'h5_index_crt_order_f'
-0 206 'fortran_real_8' 0 270 'h5_index_n_f' 0 205 'h5_index_unknown_f' 0
-208 'h5_index_name_f' 0 207 'h5_iter_dec_f' 0 202 'h5_iter_native_f' 0
-201 'h5_iter_n_f' 0 200 'h5_iter_inc_f' 0 203 'h5_szip_ec_om_f' 0 22
-'h5_real_kind' 0 274 'h5_szip_nn_om_f' 0 21 'h5d_contiguous_f' 0 186
-'h5d_compact_f' 0 187 'h5d_alloc_time_late_f' 0 181
-'h5d_alloc_time_error_f' 0 184 'h5d_alloc_time_incr_f' 0 180
-'h5d_chunked_f' 0 185 'h5d_chunk_cache_nslots_dflt_f' 0 168
-'h5d_chunk_cache_nbytes_dflt_f' 0 167 'h5d_chunk_cache_w0_dflt_f' 0 166
-'h5d_fill_time_alloc_f' 0 174 'h5f_close_weak_f' 0 218
-'h5d_fill_value_user_defined_f' 0 169 'h5d_fill_time_never_f' 0 173
-'h5d_fill_value_error_f' 0 172 'h5d_fill_value_default_f' 0 170
-'h5d_fill_value_undefined_f' 0 171 'h5d_space_sts_not_allocated_f' 0 178
-'h5d_space_sts_error_f' 0 179 'h5d_flags_len' 0 276 'h5d_flags' 0 11
-'h5d_space_sts_allocated_f' 0 176 'h5f_close_default_f' 0 219
-'h5f_acc_trunc_f' 0 224 'h5f_acc_rdonly_f' 0 225 'h5f_acc_debug_f' 0 222
-'h5d_space_sts_part_allocated_f' 0 177 'h5f_acc_excl_f' 0 223
-'h5f_acc_rdwr_f' 0 226 'h5f_close_semi_f' 0 217 'h5f_close_strong_f' 0
-216 'h5fd_mpio_independent_f' 0 165 'h5fd_mem_default_f' 0 162
-'h5fd_hid_flags_len' 0 279 'h5fd_core_f' 0 154 'h5f_obj_file_f' 0 215
-'h5f_libver_latest_f' 0 209 'h5f_flags' 0 19 'h5f_flags_len' 0 277
-'h5f_libver_earliest_f' 0 210 'h5f_obj_datatype_f' 0 212
-'h5f_obj_dataset_f' 0 214 'h5f_obj_all_f' 0 211 'h5f_scope_global_f' 0
-220 'h5f_obj_group_f' 0 213 'h5f_scope_local_f' 0 221 'h5fd_hid_flags' 0
-12 'h5fd_flags_len' 0 278 'h5fd_family_f' 0 153 'h5fd_flags' 0 13
-'h5fd_log_f' 0 152 'h5fd_mem_btree_f' 0 160 'h5fd_mem_ntypes_f' 0 155
-'h5fd_mem_nolist_f' 0 163 'h5fd_mem_draw_f' 0 159 'h5fd_mem_lheap_f' 0
-157 'h5fd_mem_gheap_f' 0 158 'h5fd_mem_ohdr_f' 0 156 'h5fd_mpio_f' 0 151
-'h5fd_mem_super_f' 0 161 'h5fd_mpio_collective_f' 0 164 'h5fd_stdio_f' 0
-148 'h5fd_sec2_f' 0 149 'h5fd_multi_f' 0 150 'h5g_link_hard_f' 0 193
-'h5g_dataset_f' 0 197 'h5fortran_types' 0 280 'h5g_link_error_f' 0 194
-'h5g_group_f' 0 198 'h5g_flags_len' 0 281 'h5g_flags' 0 14 'h5g_link_f'
-0 195 'h5g_link_soft_f' 0 192 'h5g_storage_type_compact_f' 0 189
-'h5o_hdr_attr_crt_order_track_f' 0 119 'h5o_copy_without_attr_flag_f' 0
-130 'h5i_datatype_f' 0 145 'h5g_type_f' 0 196 'h5g_storage_type_unknown_f'
-0 191 'h5g_storage_type_symbol_table_f' 0 190 'h5generic_flags_len' 0
-284 'h5g_unknown_f' 0 199 'h5generic_flags' 0 15 'h5i_dataset_f' 0 143
-'h5global' 0 283 'h5i' 0 282 'h5i_attr_f' 0 142 'h5i_badid_f' 0 141
-'h5i_dataspace_f' 0 144 'h5l_link_class_t_vers_f' 0 135 'h5iget_type_f'
-0 319 'h5i_file_f' 0 147 'h5iget_ref_f' 0 303 'h5iget_file_id_f' 0 298
-'h5i_flags_len' 0 290 'h5i_flags' 0 6 'h5i_group_f' 0 146 'h5idec_ref_f'
-0 285 'h5iget_name_f' 0 291 'h5iis_valid_f' 0 314 'h5iinc_ref_f' 0 308
-'h5l_flags' 0 2 'h5l_flags_len' 0 313 'h5o_copy_shallow_hierarchy_f' 0
-134 'h5o_copy_expand_ext_link_f' 0 132 'h5l_same_loc_f' 0 136
-'h5l_type_external_f' 0 137 'h5l_type_error_f' 0 140 'h5o_copy_all_f' 0
-128 'h5lib_flags_len' 0 324 'h5l_type_soft_f' 0 138 'h5l_type_hard_f' 0
-139 'h5lib_flags' 0 17 'h5o_copy_expand_reference_f' 0 131
-'h5o_copy_expand_soft_link_f' 0 133 'h5o_copy_preserve_null_flag_f' 0
-129 'h5o_hdr_all_flags_f' 0 115 'h5o_flags' 0 16 'h5o_flags_len' 0 325
-'h5o_hdr_attr_crt_order_index_f' 0 118 'h5p_file_mount_f' 0 108
-'h5p_default_f' 0 107 'h5o_shmesg_pline_flag_f' 0 123
-'h5o_shmesg_max_nindexes_f' 0 114 'h5o_shmesg_all_flag_f' 0 121
-'h5o_hdr_chunk0_size_f' 0 120 'h5o_hdr_attr_store_phase_cha_f' 0 117
-'h5o_hdr_store_times_f' 0 116 'h5o_shmesg_attr_flag_f' 0 122
-'h5o_shmesg_max_list_size_f' 0 113 'h5o_shmesg_fill_flag_f' 0 124
-'h5o_shmesg_dtype_flag_f' 0 125 'h5o_shmesg_none_flag_f' 0 127
-'h5p_dataset_xfer_f' 0 109 'h5p_crt_order_indexed_f' 0 94
-'h5o_shmesg_sdspace_flag_f' 0 126 'h5p_attribute_create_f' 0 98
-'h5p_crt_order_tracked_f' 0 93 'h5p_dataset_create_f' 0 110
-'h5p_dataset_access_f' 0 104 'h5p_datatype_access_f' 0 100
-'h5p_datatype_create_f' 0 101 'h5p_file_access_f' 0 111
-'h5p_file_create_f' 0 112 'h5p_flags_len' 0 327 'h5p_flags_int_len' 0
-326 'h5p_flags_int' 0 4 'h5p_flags' 0 18 'h5p_link_access_f' 0 95
-'h5p_group_create_f' 0 103 'h5p_group_access_f' 0 102
-'h5p_object_create_f' 0 105 'h5p_object_copy_f' 0 97 'h5p_link_create_f'
-0 96 'h5p_root_f' 0 106 'h5t_std_u16le' 0 232 'h5s_select_append_f' 0 78
-'h5s_sel_hyperslabs_f' 0 72 'h5s_all_f' 0 84 'h5r_dataset_region_f' 0 91
-'h5r_flags' 0 8 'h5r_flags_len' 0 328 'h5r_object_f' 0 92 'h5s_flags_len'
-0 329 'h5s_flags' 0 10 'h5s_sel_all_f' 0 71 'h5s_scalar_f' 0 90
-'h5s_null_f' 0 88 'h5s_sel_error_f' 0 75 'h5s_sel_none_f' 0 74
-'h5s_select_and_f' 0 82 'h5s_sel_points_f' 0 73 'h5t_cset_ascii_f' 0 46
-'h5s_select_nota_f' 0 79 'h5s_select_invalid_f' 0 76 'h5s_select_noop_f'
-0 83 'h5t_compound_f' 0 63 'h5s_simple_f' 0 89 'h5s_select_prepend_f' 0
-77 'h5s_select_notb_f' 0 80 'h5s_select_or_f' 0 86 'h5s_select_xor_f' 0
-81 'h5s_select_set_f' 0 87 'h5s_unlimited_f' 0 85 'h5t_array_f' 0 39
-'h5t_bitfield_f' 0 65 'h5t_enum_f' 0 61 'h5t_dir_descend_f' 0 37
-'h5t_cset_utf8_f' 0 45 'h5t_dir_ascend_f' 0 38 'h5t_std_ref_obj' 0 256
-'h5t_native_character' 0 257 'h5t_ieee_f32be' 0 247 'h5t_float_f' 0 68
-'h5t_flags' 0 3 'h5t_flags_len' 0 330 'h5t_ieee_f64le' 0 244
-'h5t_ieee_f64be' 0 245 'h5t_ieee_f32le' 0 246 'h5t_integer_f' 0 69
-'h5t_std_i64le' 0 236 'h5t_pad_error_f' 0 53 'h5t_native_integer_1' 0
-254 'h5t_native_double' 0 258 'h5t_native_integer' 0 260
-'h5t_pad_background_f' 0 54 'h5t_norm_none_f' 0 47 'h5t_norm_implied_f'
-0 49 'h5t_native_integer_2' 0 253 'h5t_native_integer_4' 0 252
-'h5t_native_real_16' 0 248 'h5t_native_real' 0 259 'h5t_native_integer_8'
-0 251 'h5t_native_real_4' 0 250 'h5t_native_real_8' 0 249 'h5t_no_class_f'
-0 70 'h5t_norm_msbset_f' 0 48 'h5t_opaque_f' 0 64 'h5t_order_le_f' 0 60
-'h5t_order_be_f' 0 59 'h5t_order_none_f' 0 57 'h5t_order_vax_f' 0 58
-'h5t_std_i32be' 0 239 'h5t_pad_zero_f' 0 56 'h5t_pad_one_f' 0 55
-'h5t_reference_f' 0 62 'h5t_sgn_error_f' 0 50 'h5t_sgn_2_f' 0 51
-'h5t_std_i16le' 0 240 'h5t_sgn_none_f' 0 52 'h5t_std_i16be' 0 241
-'h5t_std_i32le' 0 238 'h5t_std_i64be' 0 237 'h5t_std_ref_dsetreg' 0 255
-'h5t_std_i8le' 0 242 'h5t_std_i8be' 0 243 'h5t_std_u16be' 0 233
-'h5t_std_u32le' 0 230 'h5t_std_u32be' 0 231 'integer_types' 0 7
-'h5t_str_error_f' 0 41 'h5t_std_u8be' 0 235 'h5t_std_u64le' 0 228
-'h5t_std_u64be' 0 229 'h5t_std_u8le' 0 234 'hssize_t' 0 339
-'h5z_disable_edc_f' 0 30 'h5t_str_nullpad_f' 0 43 'h5t_str_nullterm_f' 0
-44 'h5t_string_f' 0 66 'h5t_string' 0 227 'h5t_str_spacepad_f' 0 42
-'h5t_vlen_f' 0 40 'h5t_time_f' 0 67 'hobj_ref_t_f' 0 337
-'h5z_filter_all_f' 0 23 'h5z_enable_edc_f' 0 29 'h5z_error_edc_f' 0 31
-'h5z_filter_error_f' 0 36 'h5z_filter_decode_enabled_f' 0 24
-'h5z_filter_deflate_f' 0 34 'h5z_filter_encode_enabled_f' 0 25
-'hdset_reg_ref_t_f' 0 334 'h5z_flags' 0 9 'h5z_filter_shuffle_f' 0 33
-'h5z_filter_none_f' 0 35 'h5z_filter_fletcher32_f' 0 32
-'h5z_flag_optional_f' 0 26 'h5z_filter_szip_f' 0 27 'h5z_no_edc_f' 0 28
-'h5z_flags_len' 0 331 'haddr_t' 0 332 'hid_t' 0 333 'hsize_t' 0 336
-'predef_types' 0 5 'object_namelen_default_f' 0 341 'integer_types_len'
-0 340 'ref_reg_buf_len' 0 344 'predef_types_len' 0 342 'size_t' 0 343)
diff --git a/interfaces/ext/hdf5/h5im.mod b/interfaces/ext/hdf5/h5im.mod
deleted file mode 100644
index bc1b01d..0000000
--- a/interfaces/ext/hdf5/h5im.mod
+++ /dev/null
@@ -1,16518 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/hl/fortran/src/H5IMff.f90 on Mon Feb 14 14:36:22 2011
-If you edit this, you'll get what you deserve.
-
-(() ()
-() () () () () () () () () () () () () () () () () () ())
-
-()
-
-(('h5aread_f' '' 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) ('h5awrite_f' '' 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) ('h5dextend_f' '' 66) ('h5dfill_f' '' 67 68 69 70) ('h5dread_f' ''
-71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
-95 96 97 98 99 100 101 102 103 104) ('h5dread_vl_f' '' 105 106 107) (
-'h5dwrite_vl_f' '' 108 109 110) ('h5dwrite_f' '' 111 112 113 114 115 116
-117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
-135 136 137 138 139 140 141 142 143 144) ('h5pget_f' '' 145 146 147 148)
-('h5pget_fill_value_f' '' 149 150 151 152) ('h5pinsert_f' '' 153 154 155
-156) ('h5pregister_f' '' 157 158 159 160) ('h5pset_f' '' 161 162 163 164)
-('h5pset_fapl_multi_f' '' 165 166) ('h5pset_fill_value_f' '' 167 168 169
-170) ('h5rdereference_f' '' 171 172) ('h5rcreate_f' '' 173 174) (
-'h5rget_name_f' '' 175 176) ('h5rget_object_type_f' '' 177) (
-'h5rget_region_f' '' 178))
-
-(('h5s_flags' 179 0) ('predefined_types' 180 0) ('h5p_flags_int' 181 0)
-('h5i_flags' 182 0) ('h5z_flags' 183 0) ('h5s_flags' 179 0) ('h5r_flags'
-184 0) ('h5generic_flags' 185 0) ('h5fd_flags' 186 0) ('h5fd_hid_flags'
-187 0) ('h5g_flags' 188 0) ('h5t_flags' 189 0) ('h5d_flags' 190 0) (
-'h5l_flags' 191 0) ('h5lib_flags' 192 0) ('h5f_flags' 193 0) ('h5p_flags'
-194 0) ('h5p_flags_int' 181 0) ('predefined_types' 180 0) ('h5t_flags'
-189 0) ('h5t_flags' 189 0) ('h5l_flags' 191 0) ('h5r_flags' 184 0) (
-'floating_types' 195 0) ('h5d_flags' 190 0) ('integer_types' 196 0) (
-'h5z_flags' 183 0) ('h5s_flags' 179 0) ('h5o_flags' 197 0) ('h5i_flags'
-182 0) ('h5g_flags' 188 0) ('h5p_flags' 194 0) ('h5fd_flags' 186 0) (
-'h5generic_flags' 185 0) ('h5fd_hid_flags' 187 0) ('h5g_flags' 188 0) (
-'h5p_flags_int' 181 0) ('h5lib_flags' 192 0) ('floating_types' 195 0) (
-'h5d_flags' 190 0) ('h5t_flags' 189 0) ('predefined_types' 180 0) (
-'floating_types' 195 0) ('h5l_flags' 191 0) ('h5l_flags' 191 0) (
-'h5i_flags' 182 0) ('h5r_flags' 184 0) ('predefined_types' 180 0) (
-'h5f_flags' 193 0) ('h5o_flags' 197 0) ('integer_types' 196 0) (
-'h5fd_hid_flags' 187 0) ('h5z_flags' 183 0) ('h5g_flags' 188 0) (
-'h5generic_flags' 185 0) ('floating_types' 195 0) ('h5f_flags' 193 0) (
-'h5i_flags' 182 0) ('h5p_flags' 194 0) ('h5d_flags' 190 0) ('h5t_flags'
-189 0) ('h5lib_flags' 192 0) ('floating_types' 195 0) ('h5l_flags' 191 0)
-('h5t_flags' 189 0) ('h5o_flags' 197 0) ('h5s_flags' 179 0) ('h5i_flags'
-182 0) ('integer_types' 196 0) ('h5s_flags' 179 0) ('h5fd_flags' 186 0)
-('h5fd_hid_flags' 187 0) ('h5fd_flags' 186 0) ('h5z_flags' 183 0) (
-'h5p_flags_int' 181 0) ('integer_types' 196 0) ('h5r_flags' 184 0) (
-'h5f_flags' 193 0) ('h5d_flags' 190 0) ('h5f_flags' 193 0) (
-'h5p_flags_int' 181 0) ('h5t_flags' 189 0) ('h5lib_flags' 192 0) (
-'h5l_flags' 191 0) ('h5s_flags' 179 0) ('h5z_flags' 183 0) (
-'predefined_types' 180 0) ('h5lib_flags' 192 0) ('h5p_flags' 194 0) (
-'h5generic_flags' 185 0) ('h5o_flags' 197 0) ('h5g_flags' 188 0) (
-'integer_types' 196 0) ('h5fd_flags' 186 0) ('h5d_flags' 190 0) (
-'h5generic_flags' 185 0) ('h5o_flags' 197 0) ('h5f_flags' 193 0) (
-'predefined_types' 180 0) ('h5lib_flags' 192 0) ('floating_types' 195 0)
-('h5g_flags' 188 0) ('h5s_flags' 179 0) ('h5d_flags' 190 0) ('h5r_flags'
-184 0) ('h5p_flags_int' 181 0) ('floating_types' 195 0) ('h5fd_hid_flags'
-187 0) ('h5fd_flags' 186 0) ('integer_types' 196 0) ('h5g_flags' 188 0)
-('h5generic_flags' 185 0) ('h5fd_flags' 186 0) ('h5i_flags' 182 0) (
-'h5p_flags' 194 0) ('h5fd_hid_flags' 187 0) ('h5r_flags' 184 0) (
-'h5z_flags' 183 0) ('h5d_flags' 190 0) ('h5lib_flags' 192 0) ('h5l_flags'
-191 0) ('h5fd_hid_flags' 187 0) ('floating_types' 195 0) (
-'predefined_types' 180 0) ('h5p_flags_int' 181 0) ('h5i_flags' 182 0) (
-'integer_types' 196 0) ('h5d_flags' 190 0) ('h5z_flags' 183 0) (
-'h5f_flags' 193 0) ('h5t_flags' 189 0) ('h5i_flags' 182 0) ('h5fd_flags'
-186 0) ('h5fd_hid_flags' 187 0) ('h5lib_flags' 192 0) ('h5p_flags' 194 0)
-('h5p_flags_int' 181 0) ('h5g_flags' 188 0) ('floating_types' 195 0) (
-'h5generic_flags' 185 0) ('h5o_flags' 197 0) ('h5s_flags' 179 0) (
-'h5p_flags' 194 0) ('h5t_flags' 189 0) ('predefined_types' 180 0) (
-'h5p_flags_int' 181 0) ('h5p_flags_int' 181 0) ('h5g_flags' 188 0) (
-'h5r_flags' 184 0) ('h5s_flags' 179 0) ('h5z_flags' 183 0) ('h5d_flags'
-190 0) ('integer_types' 196 0) ('h5generic_flags' 185 0) ('h5g_flags'
-188 0) ('h5i_flags' 182 0) ('h5o_flags' 197 0) ('h5fd_flags' 186 0) (
-'h5lib_flags' 192 0) ('h5p_flags' 194 0) ('h5d_flags' 190 0) ('h5f_flags'
-193 0) ('h5f_flags' 193 0) ('h5t_flags' 189 0) ('h5fd_hid_flags' 187 0)
-('h5generic_flags' 185 0) ('h5z_flags' 183 0) ('h5f_flags' 193 0) (
-'h5l_flags' 191 0) ('integer_types' 196 0) ('h5i_flags' 182 0) (
-'h5p_flags_int' 181 0) ('h5fd_hid_flags' 187 0) ('h5z_flags' 183 0) (
-'h5r_flags' 184 0) ('predefined_types' 180 0) ('integer_types' 196 0) (
-'h5generic_flags' 185 0) ('h5fd_flags' 186 0) ('h5o_flags' 197 0) (
-'h5o_flags' 197 0) ('h5g_flags' 188 0) ('floating_types' 195 0) (
-'h5l_flags' 191 0) ('h5f_flags' 193 0) ('h5s_flags' 179 0) ('h5p_flags'
-194 0) ('h5fd_hid_flags' 187 0) ('h5lib_flags' 192 0) ('h5p_flags_int'
-181 0) ('h5fd_flags' 186 0) ('h5d_flags' 190 0) ('predefined_types' 180
-0) ('floating_types' 195 0) ('h5s_flags' 179 0) ('h5i_flags' 182 0) (
-'h5t_flags' 189 0) ('h5r_flags' 184 0) ('h5d_flags' 190 0) ('h5p_flags'
-194 0) ('h5lib_flags' 192 0) ('h5lib_flags' 192 0) ('h5r_flags' 184 0) (
-'h5p_flags' 194 0) ('h5o_flags' 197 0) ('h5t_flags' 189 0) (
-'h5generic_flags' 185 0) ('h5f_flags' 193 0) ('h5g_flags' 188 0) (
-'h5i_flags' 182 0) ('h5t_flags' 189 0) ('h5p_flags' 194 0) (
-'floating_types' 195 0) ('predefined_types' 180 0) ('h5p_flags_int' 181
-0) ('h5r_flags' 184 0) ('h5z_flags' 183 0) ('integer_types' 196 0) (
-'h5o_flags' 197 0) ('h5generic_flags' 185 0) ('h5g_flags' 188 0) (
-'h5s_flags' 179 0) ('h5d_flags' 190 0) ('h5fd_hid_flags' 187 0) (
-'h5r_flags' 184 0) ('h5lib_flags' 192 0) ('h5r_flags' 184 0) ('h5p_flags'
-194 0) ('h5s_flags' 179 0) ('h5fd_hid_flags' 187 0) ('h5fd_flags' 186 0)
-('h5z_flags' 183 0) ('h5l_flags' 191 0) ('h5o_flags' 197 0) ('h5r_flags'
-184 0) ('integer_types' 196 0) ('integer_types' 196 0) ('h5i_flags' 182
-0) ('h5i_flags' 182 0) ('predefined_types' 180 0) ('h5s_flags' 179 0) (
-'h5fd_hid_flags' 187 0) ('floating_types' 195 0) ('h5l_flags' 191 0) (
-'h5g_flags' 188 0) ('h5lib_flags' 192 0) ('predefined_types' 180 0) (
-'h5f_flags' 193 0) ('h5fd_flags' 186 0) ('h5generic_flags' 185 0) (
-'h5o_flags' 197 0) ('h5p_flags' 194 0) ('h5fd_flags' 186 0) ('h5t_flags'
-189 0) ('integer_types' 196 0) ('predefined_types' 180 0) (
-'h5p_flags_int' 181 0) ('h5d_flags' 190 0) ('h5z_flags' 183 0) (
-'h5p_flags_int' 181 0) ('h5l_flags' 191 0) ('h5i_flags' 182 0) (
-'floating_types' 195 0) ('h5s_flags' 179 0) ('integer_types' 196 0) (
-'h5r_flags' 184 0) ('h5generic_flags' 185 0) ('h5f_flags' 193 0) (
-'h5l_flags' 191 0) ('h5fd_hid_flags' 187 0) ('h5p_flags' 194 0) (
-'h5f_flags' 193 0) ('h5o_flags' 197 0) ('h5lib_flags' 192 0) ('h5z_flags'
-183 0) ('h5l_flags' 191 0) ('floating_types' 195 0) ('h5generic_flags'
-185 0) ('h5fd_flags' 186 0) ('h5g_flags' 188 0) ('h5l_flags' 191 0) (
-'h5o_flags' 197 0) ('h5z_flags' 183 0) ('h5t_flags' 189 0) (
-'predefined_types' 180 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 192 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 183
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 183 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 192 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 183
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 183 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 192 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 183
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 183 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 192 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 183
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 183 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 192 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 183
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 183 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 192 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 183
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 183 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 192 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 183
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 183 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 192 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 183
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 183 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 192 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 183
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 183 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 192 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 183
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 183 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 192 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 183
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 183 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 192 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 183
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 183 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 192 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 183
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 183 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 192 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 183
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 183 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 192 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 183
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 183 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-194 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())))
-
-(438 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-439 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-440 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-441 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-195 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-442 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-443 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-444 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-445 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-446 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-447 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-448 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-449 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-450 'h5_dble_interface' 'h5_dble_interface' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-383 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-384 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-451 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-385 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-379 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-382 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-452 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-377 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-381 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-453 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-378 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-454 'h5acreate_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 455 0 (456 457 458 459
-460 461 462 463 464 465) () 0 () ())
-466 'h5aclose_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 467 0 (468 469) () 0 () ())
-470 'h5a' 'h5a' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-198 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-199 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-471 'h5adelete_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 472 0 (473 474 475 476
-477 478 479) () 0 () ())
-480 'h5adelete_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 481 0 (482 483 484) () 0 () ())
-485 'h5adelete_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 486 0 (487 488 489 490
-491) () 0 () ())
-492 'h5aexists_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 493 0 (494 495 496 497) () 0 () ())
-498 'h5aget_info_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 499 0 (500
-501 502 503 504 505 506 507 508 509 510) () 0 () ())
-511 'h5aget_info_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 512 0 (513
-514 515 516 517 518 519 520 521) () 0 () ())
-522 'h5aget_create_plist_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 523 0 (524 525 526) () 0 ()
-())
-527 'h5aexists_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 528 0 (529 530 531 532
-533 534) () 0 () ())
-535 'h5aget_name_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 536 0 (537
-538 539 540 541 542 543 544 545) () 0 () ())
-546 'h5aget_space_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 547 0 (548 549 550) () 0 () ())
-551 'h5aget_num_attrs_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 552 0 (553 554 555) () 0 () ())
-556 'h5aget_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 557 0 (558 559 560 561) () 0 () ())
-562 'h5aget_info_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 563 0 (564 565 566 567 568 569) () 0 () ())
-570 'h5aget_type_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 571 0 (572 573 574) () 0 () ())
-575 'h5aopen_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 576 0 (577 578 579 580 581) ()
-0 () ())
-582 'h5aopen_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 583 0 (584 585 586 587
-588 589 590) () 0 () ())
-15 'h5aread_char_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 591 0 (592 593 594 595 596) () 0 () ())
-16 'h5aread_char_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 597 0 (598 599 600 601 602) () 0 () ())
-603 'h5aopen_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 604 0 (605 606 607 608) () 0 () ())
-609 'h5aopen_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 610 0 (611 612 613 614) () 0 () ())
-13 'h5aread_char_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 615 0 (616 617 618 619 620) () 0 () ())
-12 'h5aread_char_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 621 0 (622 623 624 625 626) () 0 () ())
-11 'h5aread_char_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 627 0 (628 629 630 631 632) () 0 () ())
-14 'h5aread_char_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 633 0 (634 635 636 637 638) () 0 () ())
-639 'h5aopen_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 640 0 (641 642 643 644
-645 646 647 648 649) () 0 () ())
-17 'h5aread_char_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 650 0 (651 652 653 654 655) () 0 () ())
-32 'h5aread_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 656 0 (657 658 659 660 661)
-() 0 () ())
-30 'h5aread_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 662 0 (663 664 665 666 667)
-() 0 () ())
-31 'h5aread_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 668 0 (669 670 671 672 673)
-() 0 () ())
-29 'h5aread_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 674 0 (675 676 677 678 679)
-() 0 () ())
-26 'h5aread_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 680 0 (681 682 683 684 685)
-() 0 () ())
-33 'h5aread_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 686 0 (687
-688 689 690 691) () 0 () ())
-27 'h5aread_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 692 0 (693 694 695 696 697)
-() 0 () ())
-24 'h5aread_integer_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 698 0 (699 700 701 702 703) () 0 () ())
-28 'h5aread_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 704 0 (705 706 707 708 709)
-() 0 () ())
-23 'h5aread_integer_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 710 0 (711 712 713 714 715) () 0 () ())
-21 'h5aread_integer_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 716 0 (717 718 719 720 721) () 0 () ())
-19 'h5aread_integer_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 722 0 (723 724 725 726 727) () 0 () ())
-18 'h5aread_integer_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 728 0 (729 730 731 732 733) () 0 () ())
-20 'h5aread_integer_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 734 0 (735 736 737 738 739) () 0 () ())
-22 'h5aread_integer_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 740 0 (741 742 743 744 745) () 0 () ())
-8 'h5aread_real_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 746 0 (747 748 749 750 751) () 0 () ())
-25 'h5aread_integer_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 752 0 (753 754 755 756 757)
-() 0 () ())
-10 'h5aread_char_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 758 0 (759 760 761 762 763) () 0 () ())
-764 'h5aget_storage_size_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 765 0 (766 767 768) () 0 ()
-())
-5 'h5aread_real_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 769 0 (770 771 772 773 774) () 0 () ())
-6 'h5aread_real_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 775 0 (776 777 778 779 780) () 0 () ())
-7 'h5aread_real_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 781 0 (782 783 784 785 786) () 0 () ())
-787 'h5acreate_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 788 0 (789 790 791 792 793
-794 795 796) () 0 () ())
-380 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2 'h5aread_real_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 797 0 (798 799 800 801 802) () 0 () ())
-9 'h5aread_real_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 803 0 (804 805 806 807 808) () 0 () ())
-809 'h5arename_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 810 0 (811 812 813 814) () 0 () ())
-48 'h5awrite_char_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 815 0 (816 817 818 819 820) () 0 () ())
-821 'h5arename_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 822 0 (823 824 825 826
-827 828) () 0 () ())
-3 'h5aread_real_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 829 0 (830 831 832 833 834) () 0 () ())
-4 'h5aread_real_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 835 0 (836 837 838 839 840) () 0 () ())
-46 'h5awrite_char_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 841 0 (842 843 844 845 846) () 0 () ())
-45 'h5awrite_char_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 847 0 (848 849 850 851 852) () 0 () ())
-43 'h5awrite_char_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 853 0 (854 855 856 857 858) () 0 () ())
-42 'h5awrite_char_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 859 0 (860 861 862 863 864) () 0 () ())
-44 'h5awrite_char_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 865 0 (866 867 868 869 870) () 0 () ())
-47 'h5awrite_char_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 871 0 (872 873 874 875 876) () 0 () ())
-63 'h5awrite_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 877 0 (878 879 880 881 882)
-() 0 () ())
-61 'h5awrite_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 883 0 (884 885 886 887 888)
-() 0 () ())
-60 'h5awrite_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 889 0 (890 891 892 893 894)
-() 0 () ())
-62 'h5awrite_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 895 0 (896 897 898 899 900)
-() 0 () ())
-64 'h5awrite_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 901 0 (902 903 904 905 906)
-() 0 () ())
-59 'h5awrite_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 907 0 (908 909 910 911 912)
-() 0 () ())
-65 'h5awrite_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 913 0 (914
-915 916 917 918) () 0 () ())
-56 'h5awrite_integer_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 919 0 (920 921 922 923 924) () 0 () ())
-53 'h5awrite_integer_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 925 0 (926 927 928 929 930) () 0 () ())
-54 'h5awrite_integer_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 931 0 (932 933 934 935 936) () 0 () ())
-51 'h5awrite_integer_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 937 0 (938 939 940 941 942) () 0 () ())
-52 'h5awrite_integer_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 943 0 (944 945 946 947 948) () 0 () ())
-55 'h5awrite_integer_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 949 0 (950 951 952 953 954) () 0 () ())
-57 'h5awrite_integer_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 955 0 (956 957 958 959 960)
-() 0 () ())
-39 'h5awrite_real_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 961 0 (962 963 964 965 966) () 0 () ())
-37 'h5awrite_real_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 967 0 (968 969 970 971 972) () 0 () ())
-35 'h5awrite_real_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 973 0 (974 975 976 977 978) () 0 () ())
-34 'h5awrite_real_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 979 0 (980 981 982 983 984) () 0 () ())
-985 'h5check_version_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 986 0 (987 988 989 990) () 0 () ())
-41 'h5awrite_real_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 991 0 (992 993 994 995 996) () 0 () ())
-36 'h5awrite_real_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 997 0 (998 999 1000 1001 1002) () 0 () ())
-38 'h5awrite_real_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1003 0 (1004 1005 1006 1007 1008) () 0 () ())
-1009 'h5d' 'h5d' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-1010 'h5close_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1011 0 (1012) () 0 () ())
-360 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-361 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-358 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-357 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-359 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-40 'h5awrite_real_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1013 0 (1014 1015 1016 1017 1018) () 0 () ())
-50 'h5awrite_integer_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1019 0 (1020 1021 1022 1023 1024) () 0 ()
-())
-58 'h5awrite_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1025 0 (1026 1027 1028 1029
-1030) () 0 () ())
-345 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-362 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-343 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-364 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-363 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-350 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-347 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-352 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-346 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-190 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-348 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-349 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-351 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-353 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-354 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-355 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-356 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1031 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'22') () 0 () ())
-1032 'h5dcreate_anon_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1033 0 (1034 1035 1036
-1037 1038 1039 1040) () 0 () ())
-70 'h5dfill_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1041 0 (1042 1043 1044 1045)
-() 0 () ())
-68 'h5dfill_real' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1046 0 (1047 1048 1049 1050) () 0 () ())
-1051 'h5dget_access_plist_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1052 0 (1053 1054 1055) () 0
-() ())
-69 'h5dfill_integer' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1056 0 (1057 1058 1059 1060) () 0 () ())
-1061 'h5dget_create_plist_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1062 0 (1063 1064 1065) () 0
-() ())
-67 'h5dfill_char' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1066 0 (1067 1068 1069 1070) () 0 () ())
-1071 'h5dcreate_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1072 0 (1073 1074 1075 1076
-1077 1078 1079 1080 1081) () 0 () ())
-1082 'h5dget_space_status_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1083 0 (1084 1085 1086) () 0
-() ())
-1087 'h5dget_type_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1088 0 (1089 1090 1091) () 0 () ())
-1092 'h5dont_atexit_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1093 0 (1094) () 0 () ())
-84 'h5dread_char_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1095 0 (1096 1097 1098 1099
-1100 1101 1102 1103) () 0 () ())
-85 'h5dread_char_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1104 0 (1105 1106 1107 1108
-1109 1110 1111 1112) () 0 () ())
-1113 'h5dopen_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1114 0 (1115 1116 1117 1118
-1119) () 0 () ())
-1120 'h5dget_storage_size_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1121 0 (1122 1123 1124) () 0
-() ())
-1125 'h5dget_space_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1126 0 (1127 1128 1129) () 0 () ())
-80 'h5dread_char_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1130 0 (1131 1132 1133 1134
-1135 1136 1137 1138) () 0 () ())
-81 'h5dread_char_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1139 0 (1140 1141 1142 1143
-1144 1145 1146 1147) () 0 () ())
-79 'h5dread_char_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1148 0 (1149 1150 1151 1152
-1153 1154 1155 1156) () 0 () ())
-82 'h5dread_char_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1157 0 (1158 1159 1160 1161
-1162 1163 1164 1165) () 0 () ())
-103 'h5dread_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1166 0 (
-1167 1168 1169 1170 1171 1172 1173 1174) () 0 () ())
-86 'h5dread_char_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1175 0 (1176 1177 1178
-1179 1180 1181 1182 1183) () 0 () ())
-99 'h5dread_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1184 0 (
-1185 1186 1187 1188 1189 1190 1191 1192) () 0 () ())
-97 'h5dread_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1193 0 (
-1194 1195 1196 1197 1198 1199 1200 1201) () 0 () ())
-104 'h5dread_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ())
-1202 0 (1203 1204 1205 1206 1207 1208 1209 1210) () 0 () ())
-98 'h5dread_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1211 0 (
-1212 1213 1214 1215 1216 1217 1218 1219) () 0 () ())
-100 'h5dread_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1220 0 (
-1221 1222 1223 1224 1225 1226 1227 1228) () 0 () ())
-101 'h5dread_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1229 0 (
-1230 1231 1232 1233 1234 1235 1236 1237) () 0 () ())
-91 'h5dread_integer_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1238 0 (1239 1240 1241
-1242 1243 1244 1245 1246) () 0 () ())
-92 'h5dread_integer_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1247 0 (1248 1249 1250
-1251 1252 1253 1254 1255) () 0 () ())
-88 'h5dread_integer_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1256 0 (1257 1258 1259
-1260 1261 1262 1263 1264) () 0 () ())
-89 'h5dread_integer_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1265 0 (1266 1267 1268
-1269 1270 1271 1272 1273) () 0 () ())
-90 'h5dread_integer_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1274 0 (1275 1276 1277
-1278 1279 1280 1281 1282) () 0 () ())
-93 'h5dread_integer_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1283 0 (1284 1285 1286
-1287 1288 1289 1290 1291) () 0 () ())
-102 'h5dread_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1292 0 (
-1293 1294 1295 1296 1297 1298 1299 1300) () 0 () ())
-83 'h5dread_char_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1301 0 (1302 1303 1304 1305
-1306 1307 1308 1309) () 0 () ())
-75 'h5dread_real_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1310 0 (1311 1312 1313 1314
-1315 1316 1317 1318) () 0 () ())
-76 'h5dread_real_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1319 0 (1320 1321 1322 1323
-1324 1325 1326 1327) () 0 () ())
-77 'h5dread_real_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1328 0 (1329 1330 1331 1332
-1333 1334 1335 1336) () 0 () ())
-72 'h5dread_real_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1337 0 (1338 1339 1340 1341
-1342 1343 1344 1345) () 0 () ())
-78 'h5dread_real_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1346 0 (1347 1348 1349
-1350 1351 1352 1353 1354) () 0 () ())
-71 'h5dread_real_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1355 0 (1356 1357 1358 1359
-1360 1361 1362 1363) () 0 () ())
-96 'h5dread_reference_obj' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1364 0 (
-1365 1366 1367 1368 1369 1370 1371 1372) () 0 () ())
-95 'h5dread_reference_dsetreg' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1373 0 (
-1374 1375 1376 1377 1378 1379 1380 1381) () 0 () ())
-73 'h5dread_real_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1382 0 (1383 1384 1385 1386
-1387 1388 1389 1390) () 0 () ())
-74 'h5dread_real_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1391 0 (1392 1393 1394 1395
-1396 1397 1398 1399) () 0 () ())
-94 'h5dread_integer_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1400 0 (
-1401 1402 1403 1404 1405 1406 1407 1408) () 0 () ())
-87 'h5dread_integer_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1409 0 (1410 1411 1412
-1413 1414 1415 1416 1417) () 0 () ())
-1418 'h5dclose_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1419 0 (1420 1421) () 0 () ())
-105 'h5dread_vl_string' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1422 0 (1423 1424 1425
-1426 1427 1428 1429 1430 1431) () 0 () ())
-1432 'h5dvlen_get_max_len_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1433 0 (1434 1435 1436 1437
-1438) () 0 () ())
-125 'h5dwrite_char_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1439 0 (1440 1441 1442
-1443 1444 1445 1446 1447) () 0 () ())
-66 'h5dset_extent_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1448 0 (1449 1450 1451) () 0 () ())
-123 'h5dwrite_char_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1452 0 (1453 1454 1455
-1456 1457 1458 1459 1460) () 0 () ())
-122 'h5dwrite_char_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1461 0 (1462 1463 1464
-1465 1466 1467 1468 1469) () 0 () ())
-124 'h5dwrite_char_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1470 0 (1471 1472 1473
-1474 1475 1476 1477 1478) () 0 () ())
-106 'h5dread_vl_real' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1479 0 (1480 1481 1482
-1483 1484 1485 1486 1487 1488) () 0 () ())
-120 'h5dwrite_char_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1489 0 (1490 1491 1492
-1493 1494 1495 1496 1497) () 0 () ())
-121 'h5dwrite_char_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1498 0 (1499 1500 1501
-1502 1503 1504 1505 1506) () 0 () ())
-143 'h5dwrite_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1507 0 (
-1508 1509 1510 1511 1512 1513 1514 1515) () 0 () ())
-126 'h5dwrite_char_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1516 0 (
-1517 1518 1519 1520 1521 1522 1523 1524) () 0 () ())
-140 'h5dwrite_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1525 0 (
-1526 1527 1528 1529 1530 1531 1532 1533) () 0 () ())
-141 'h5dwrite_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1534 0 (
-1535 1536 1537 1538 1539 1540 1541 1542) () 0 () ())
-142 'h5dwrite_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1543 0 (
-1544 1545 1546 1547 1548 1549 1550 1551) () 0 () ())
-119 'h5dwrite_char_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1552 0 (1553 1554 1555
-1556 1557 1558 1559 1560) () 0 () ())
-138 'h5dwrite_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1561 0 (
-1562 1563 1564 1565 1566 1567 1568 1569) () 0 () ())
-144 'h5dwrite_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ())
-1570 0 (1571 1572 1573 1574 1575 1576 1577 1578) () 0 () ())
-133 'h5dwrite_integer_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1579 0 (1580 1581 1582
-1583 1584 1585 1586 1587) () 0 () ())
-131 'h5dwrite_integer_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1588 0 (1589 1590 1591
-1592 1593 1594 1595 1596) () 0 () ())
-130 'h5dwrite_integer_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1597 0 (1598 1599 1600
-1601 1602 1603 1604 1605) () 0 () ())
-132 'h5dwrite_integer_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1606 0 (1607 1608 1609
-1610 1611 1612 1613 1614) () 0 () ())
-137 'h5dwrite_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1615 0 (
-1616 1617 1618 1619 1620 1621 1622 1623) () 0 () ())
-128 'h5dwrite_integer_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1624 0 (1625 1626 1627
-1628 1629 1630 1631 1632) () 0 () ())
-127 'h5dwrite_integer_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1633 0 (1634 1635 1636
-1637 1638 1639 1640 1641) () 0 () ())
-134 'h5dwrite_integer_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1642 0 (
-1643 1644 1645 1646 1647 1648 1649 1650) () 0 () ())
-115 'h5dwrite_real_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1651 0 (1652 1653 1654
-1655 1656 1657 1658 1659) () 0 () ())
-116 'h5dwrite_real_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1660 0 (1661 1662 1663
-1664 1665 1666 1667 1668) () 0 () ())
-117 'h5dwrite_real_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1669 0 (1670 1671 1672
-1673 1674 1675 1676 1677) () 0 () ())
-129 'h5dwrite_integer_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1678 0 (1679 1680 1681
-1682 1683 1684 1685 1686) () 0 () ())
-113 'h5dwrite_real_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1687 0 (1688 1689 1690
-1691 1692 1693 1694 1695) () 0 () ())
-111 'h5dwrite_real_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1696 0 (1697 1698 1699
-1700 1701 1702 1703 1704) () 0 () ())
-118 'h5dwrite_real_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1705 0 (
-1706 1707 1708 1709 1710 1711 1712 1713) () 0 () ())
-112 'h5dwrite_real_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1714 0 (1715 1716 1717
-1718 1719 1720 1721 1722) () 0 () ())
-136 'h5dwrite_reference_obj' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1723 0 (
-1724 1725 1726 1727 1728 1729 1730 1731) () 0 () ())
-135 'h5dwrite_reference_dsetreg' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1732 0 (
-1733 1734 1735 1736 1737 1738 1739 1740) () 0 () ())
-114 'h5dwrite_real_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1741 0 (1742 1743 1744
-1745 1746 1747 1748 1749) () 0 () ())
-108 'h5dwrite_vl_string' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1750 0 (1751 1752 1753
-1754 1755 1756 1757 1758 1759) () 0 () ())
-109 'h5dwrite_vl_real' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1760 0 (1761 1762 1763
-1764 1765 1766 1767 1768 1769) () 0 () ())
-110 'h5dwrite_vl_integer' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1770 0 (1771 1772 1773
-1774 1775 1776 1777 1778 1779) () 0 () ())
-1780 'h5eget_major_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1781 0 (1782 1783 1784 1785) () 0 () ())
-1786 'h5eclear_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1787 0 (1788) () 0 () ())
-1789 'h5eget_minor_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1790 0 (1791 1792 1793) () 0 () ())
-1794 'h5e' 'h5e' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-1795 'h5eset_auto_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1796 0 (1797 1798) () 0 () ())
-1799 'h5f' 'h5f' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-400 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-399 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-401 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-394 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-393 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-396 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-403 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-402 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1800 'h5eprint_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1801 0 (1802 1803) () 0 () ())
-139 'h5dwrite_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1804 0 (
-1805 1806 1807 1808 1809 1810 1811 1812) () 0 () ())
-107 'h5dread_vl_integer' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1813 0 (1814 1815 1816
-1817 1818 1819 1820 1821 1822) () 0 () ())
-344 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-193 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-386 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-387 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-391 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-389 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-392 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-388 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-398 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-397 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-390 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1823 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'19') () 0 () ())
-331 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1824 'h5fcreate_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1825 0 (1826 1827 1828 1829
-1830 1831) () 0 () ())
-1832 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-186 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-330 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1833 'h5fclose_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1834 0 (1835 1836) () 0 () ())
-1837 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-329 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-336 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-339 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-334 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-335 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-333 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-341 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-338 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-332 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-340 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-342 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-326 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-325 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1838 'h5fflush_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1839 0 (1840 1841 1842) () 0 () ())
-327 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-328 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-337 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-187 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-1843 'h5fget_name_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1844 0 (1845 1846 1847 1848) () 0 () ())
-1849 'h5fget_freespace_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1850 0 (1851 1852 1853) () 0 () ())
-1854 'h5fget_filesize_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1855 0 (1856 1857 1858) () 0 () ())
-1859 'h5fget_create_plist_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1860 0 (1861 1862 1863) () 0
-() ())
-1864 'h5fis_hdf5_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1865 0 (1866 1867 1868) () 0 () ())
-1869 'h5fmount_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1870 0 (1871 1872 1873 1874
-1875) () 0 () ())
-1876 'h5fget_obj_ids_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1877 0 (1878 1879 1880
-1881 1882 1883) () 0 () ())
-1884 'h5fget_obj_count_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1885 0 (1886 1887 1888 1889) () 0 () ())
-1890 'h5funmount_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1891 0 (1892 1893 1894) () 0 () ())
-1895 'h5freopen_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1896 0 (1897 1898 1899) () 0 () ())
-1900 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-1901 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'12') () 0 () ())
-188 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-374 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1902 'h5g' 'h5g' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-1903 'h5fopen_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1904 0 (1905 1906 1907 1908
-1909) () 0 () ())
-372 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-370 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-371 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-373 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-368 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-367 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-365 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-366 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1910 'h5garbage_collect_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1911 0 (1912) () 0 () ())
-1913 'h5gcreate_anon_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1914 0 (1915 1916 1917
-1918 1919) () 0 () ())
-1920 'h5gclose_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1921 0 (1922 1923) () 0 () ())
-185 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1
-EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9'))
-0 () ())
-1924 'h5gcreate_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1925 0 (1926 1927 1928 1929
-1930 1931 1932 1933) () 0 () ())
-1934 'h5get_libversion_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1935 0 (1936 1937 1938 1939)
-() 0 () ())
-1940 'h5gget_comment_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1941 0 (1942 1943 1944 1945 1946) () 0 ()
-())
-1947 'h5gget_info_by_idx_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1948 0 (
-1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959) () 0 () ())
-1960 'h5gget_linkval_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1961 0 (1962 1963 1964 1965 1966) () 0 ()
-())
-1967 'h5gget_obj_info_idx_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1968 0 (1969 1970 1971 1972
-1973 1974) () 0 () ())
-1975 'h5gget_info_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1976 0 (1977 1978 1979 1980
-1981 1982) () 0 () ())
-1983 'h5gget_info_by_name_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1984 0 (
-1985 1986 1987 1988 1989 1990 1991 1992) () 0 () ())
-1993 'h5gget_create_plist_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1994 0 (1995 1996 1997) () 0
-() ())
-1998 'h5glink2_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1999 0 (2000 2001 2002 2003 2004 2005) () 0 ()
-())
-2006 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-376 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2007 'h5gmove2_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2008 0 (2009 2010 2011 2012 2013) () 0 () ())
-2014 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-2015 'h5gn_members_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2016 0 (2017 2018 2019 2020) () 0 () ())
-2021 'h5gset_comment_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2022 0 (2023 2024 2025 2026) () 0 () ())
-2027 'h5gopen_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2028 0 (2029 2030 2031 2032
-2033) () 0 () ())
-319 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2034 'h5i' 'h5i' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-2035 'h5gunlink_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2036 0 (2037 2038 2039) () 0 () ())
-2040 'h5gmove_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2041 0 (2042 2043 2044 2045) () 0 () ())
-320 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-322 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-321 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-318 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-2046 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-324 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2047 'h5iget_file_id_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2048 0 (2049 2050 2051) () 0 () ())
-2052 'h5iget_name_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2053 0 (2054 2055 2056 2057 2058) () 0 () ())
-2059 'h5iget_ref_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2060 0 (2061 2062 2063) () 0 () ())
-2064 'h5iinc_ref_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2065 0 (2066 2067 2068) () 0 () ())
-2069 'h5iget_type_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2070 0 (2071 2072 2073) () 0 () ())
-2074 'h5idec_ref_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2075 0 (2076 2077 2078) () 0 () ())
-323 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2079 'h5glink_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2080 0 (2081 2082 2083 2084 2085) () 0 () ())
-369 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-375 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2086 'h5imget_image_info_f' 'h5im' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2087 0 (2088 2089 2090 2091
-2092 2093 2094 2095) () 0 () ())
-2096 'h5im' 'h5im' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-2097 'h5imget_palette_f' 'h5im' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2098 0 (2099 2100 2101 2102 2103) () 0 ()
-())
-2104 'h5imis_image_f' 'h5im' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL FUNCTION) (INTEGER 4 ()) 2105 0 (2106 2107) () 2104 () ())
-2108 'h5imis_palette_f' 'h5im' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL FUNCTION) (INTEGER 4 ()) 2109 0 (2110 2111) () 2108 () ())
-2112 'h5imget_palette_info_f' 'h5im' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2113 0 (2114 2115 2116 2117
-2118) () 0 () ())
-2119 'h5imget_npalettes_f' 'h5im' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2120 0 (2121 2122 2123 2124)
-() 0 () ())
-2125 'h5immake_palette_f' 'h5im' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2126 0 (2127 2128 2129 2130
-2131) () 0 () ())
-2132 'h5imunlink_palette_f' 'h5im' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2133 0 (2134 2135 2136 2137)
-() 0 () ())
-2138 'h5l' 'h5l' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-2139 'h5imread_image_f' 'h5im' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2140 0 (2141 2142 2143 2144) () 0 () ())
-2145 'h5immake_image_8bit_f' 'h5im' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2146 0 (2147 2148 2149 2150
-2151 2152) () 0 () ())
-2153 'h5immake_image_24bit_f' 'h5im' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2154 0 (2155 2156 2157 2158
-2159 2160 2161) () 0 () ())
-317 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-313 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-314 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-312 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2162 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6')
-() 0 () ())
-191 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-2163 'h5imlink_palette_f' 'h5im' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2164 0 (2165 2166 2167 2168)
-() 0 () ())
-315 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2169 'h5lcopy_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2170 0 (2171 2172 2173 2174
-2175 2176 2177) () 0 () ())
-2178 'h5lcreate_hard_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2179 0 (2180 2181 2182
-2183 2184 2185 2186) () 0 () ())
-2187 'h5lcreate_external_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2188 0 (
-2189 2190 2191 2192 2193 2194 2195) () 0 () ())
-2196 'h5ldelete_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2197 0 (2198 2199 2200 2201)
-() 0 () ())
-2202 'h5lexists_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2203 0 (2204 2205 2206 2207
-2208) () 0 () ())
-2209 'h5ldelete_by_idx_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2210 0 (2211 2212 2213
-2214 2215 2216 2217) () 0 () ())
-2218 'h5lcreate_soft_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2219 0 (2220 2221 2222
-2223 2224 2225) () 0 () ())
-316 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2226 'h5iis_valid_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2227 0 (2228 2229 2230) () 0 () ())
-2231 'h5lget_name_by_idx_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2232 0 (
-2233 2234 2235 2236 2237 2238 2239 2240 2241) () 0 () ())
-2242 'h5lget_info_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2243 0 (2244 2245 2246 2247
-2248 2249 2250 2251 2252 2253) () 0 () ())
-2254 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-192 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-2255 'h5lmove_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2256 0 (2257 2258 2259 2260
-2261 2262 2263) () 0 () ())
-2264 'h5o' 'h5o' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-305 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2265 'h5lis_registered_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2266 0 (2267 2268 2269) () 0 () ())
-310 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-306 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-307 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-197 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-311 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-2270 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'22') () 0 () ())
-308 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-309 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2271 'h5lib' 'h5lib' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-295 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-296 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-293 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-297 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-302 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-299 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-298 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-294 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-291 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-290 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-301 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-300 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-303 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2272 'h5open_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2273 0 (2274) () 0 () ())
-2275 'h5oopen_f' 'h5o' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2276 0 (2277 2278 2279 2280
-2281) () 0 () ())
-2282 'h5p' 'h5p' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-275 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2283 'h5oopen_by_addr_f' 'h5o' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2284 0 (2285 2286 2287 2288) () 0 () ())
-2289 'h5olink_f' 'h5o' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2290 0 (2291 2292 2293 2294
-2295 2296) () 0 () ())
-304 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-286 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-281 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-270 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-284 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-289 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-194 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-181 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-285 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2297 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'18') () 0 () ())
-2298 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-288 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-278 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-292 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-272 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-274 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-282 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2299 'h5pclose_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2300 0 (2301 2302) () 0 () ())
-2303 'h5pcopy_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2304 0 (2305 2306 2307) () 0 () ())
-2308 'h5pcreate_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2309 0 (2310 2311 2312 2313) () 0 () ())
-2314 'h5pcopy_prop_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2315 0 (2316 2317 2318 2319) () 0 () ())
-2320 'h5pcreate_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2321 0 (2322 2323 2324) () 0 () ())
-2325 'h5pequal_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2326 0 (2327 2328 2329 2330) () 0 () ())
-2331 'h5pclose_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2332 0 (2333 2334) () 0 () ())
-2335 'h5pall_filters_avail_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2336 0 (2337 2338 2339) () 0
-() ())
-2340 'h5pget_alloc_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2341 0 (2342 2343 2344) () 0
-() ())
-2345 'h5pget_attr_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2346 0 (2347 2348 2349) () 0
-() ())
-2350 'h5pget_alignment_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2351 0 (2352 2353 2354 2355) () 0 () ())
-2356 'h5pget_buffer_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2357 0 (2358 2359 2360) () 0 () ())
-2361 'h5pget_btree_ratios_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2362 0 (2363 2364 2365 2366
-2367) () 0 () ())
-145 'h5pget_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2368 0 (2369 2370 2371 2372) () 0 () ())
-2373 'h5pget_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2374 0 (2375 2376 2377 2378 2379 2380) ()
-0 () ())
-2381 'h5pget_attr_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2382 0 (2383 2384 2385 2386)
-() 0 () ())
-2387 'h5pfill_value_defined_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2388 0 (2389 2390 2391) () 0
-() ())
-2392 'h5pexist_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2393 0 (2394 2395 2396 2397) () 0 () ())
-273 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2398 'h5lget_info_by_idx_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2399 0 (
-2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412) () 0 ()
-())
-2413 'h5fget_access_plist_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2414 0 (2415 2416 2417) () 0
-() ())
-2418 'h5pget_chunk_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2419 0 (2420 2421 2422 2423) () 0 () ())
-2424 'h5pget_chunk_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2425 0 (2426 2427 2428 2429
-2430) () 0 () ())
-2431 'h5pget_class_name_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2432 0 (2433 2434 2435 2436)
-() 0 () ())
-2437 'h5pget_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2438 0 (2439 2440 2441) () 0 () ())
-2442 'h5pget_create_inter_group_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2443 0 (2444 2445 2446) () 0
-() ())
-2447 'h5pget_copy_object_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2448 0 (2449 2450 2451) () 0
-() ())
-2452 'h5pget_class_parent_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2453 0 (2454 2455 2456) () 0
-() ())
-2457 'h5pget_driver_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2458 0 (2459 2460 2461) () 0 () ())
-148 'h5pget_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2462 0 (2463 2464 2465 2466)
-() 0 () ())
-2467 'h5pget_edc_check_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2468 0 (2469 2470 2471) () 0 () ())
-2472 'h5pget_data_transform_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2473 0 (
-2474 2475 2476 2477) () 0 () ())
-2478 'h5pget_external_count_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2479 0 (2480 2481 2482) () 0
-() ())
-2483 'h5pget_fapl_direct_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2484 0 (2485 2486 2487 2488
-2489) () 0 () ())
-2490 'h5pget_fapl_core_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2491 0 (2492 2493 2494 2495) () 0 () ())
-2496 'h5pget_external_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2497 0 (2498 2499 2500 2501 2502 2503
-2504) () 0 () ())
-2505 'h5pget_fclose_degree_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2506 0 (2507 2508 2509) () 0
-() ())
-2510 'h5pget_fapl_multi_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2511 0 (
-2512 2513 2514 2515 2516 2517 2518 2519) () 0 () ())
-2520 'h5pget_fapl_family_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2521 0 (2522 2523 2524 2525)
-() 0 () ())
-2526 'h5pget_est_link_info_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2527 0 (2528 2529 2530 2531)
-() 0 () ())
-152 'h5pget_fill_value_double' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2532 0 (2533
-2534 2535 2536) () 0 () ())
-149 'h5pget_fill_value_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2537 0 (2538 2539 2540 2541)
-() 0 () ())
-151 'h5pget_fill_value_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2542 0 (2543 2544 2545 2546)
-() 0 () ())
-2547 'h5pget_filter_by_id_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2548 0 (2549 2550 2551 2552
-2553 2554 2555 2556) () 0 () ())
-2557 'h5pget_gc_references_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2558 0 (2559 2560 2561) () 0
-() ())
-2562 'h5pget_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2563 0 (2564 2565 2566 2567 2568 2569
-2570 2571 2572) () 0 () ())
-150 'h5pget_fill_value_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2573 0 (2574 2575 2576 2577)
-() 0 () ())
-2578 'h5pget_istore_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2579 0 (2580 2581 2582) () 0 () ())
-147 'h5pget_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2583 0 (2584 2585 2586 2587) () 0 () ())
-2588 'h5pget_link_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2589 0 (2590 2591 2592) () 0
-() ())
-2593 'h5pget_local_heap_size_hint_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2594 0 (2595 2596 2597) () 0
-() ())
-2598 'h5pget_link_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2599 0 (2600 2601 2602 2603)
-() 0 () ())
-2604 'h5pget_nfilters_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2605 0 (2606 2607 2608) () 0 () ())
-2609 'h5pget_obj_track_times_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2610 0 (2611 2612 2613) () 0
-() ())
-2614 'h5pget_nprops_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2615 0 (2616 2617 2618) () 0 () ())
-2619 'h5pget_nlinks_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2620 0 (2621 2622 2623) () 0 () ())
-146 'h5pget_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2624 0 (2625 2626 2627 2628) () 0 () ())
-2629 'h5pget_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2630 0 (2631 2632 2633 2634) () 0 () ())
-2635 'h5pget_small_data_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2636 0 (2637 2638 2639) () 0
-() ())
-2640 'h5pget_sym_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2641 0 (2642 2643 2644 2645) () 0 () ())
-2646 'h5pget_userblock_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2647 0 (2648 2649 2650) () 0 () ())
-153 'h5pinsert_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2651 0 (2652 2653 2654 2655 2656) () 0 () ())
-2657 'h5pget_version_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2658 0 (2659 2660 2661
-2662 2663 2664) () 0 () ())
-2665 'h5pget_sizes_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2666 0 (2667 2668 2669 2670) () 0 () ())
-2671 'h5pget_sieve_buf_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2672 0 (2673 2674 2675) () 0
-() ())
-2676 'h5pget_preserve_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2677 0 (2678 2679 2680) () 0 () ())
-2681 'h5pget_meta_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2682 0 (2683 2684 2685) () 0
-() ())
-2686 'h5pget_layout_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2687 0 (2688 2689 2690) () 0 () ())
-2691 'h5pget_hyper_vector_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2692 0 (2693 2694 2695) () 0
-() ())
-154 'h5pinsert_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2696 0 (2697 2698 2699 2700 2701) () 0 () ())
-155 'h5pinsert_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2702 0 (2703 2704 2705 2706 2707) () 0 ()
-())
-2708 'h5pmodify_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2709 0 (2710 2711 2712 2713 2714 2715) ()
-0 () ())
-2716 'h5pisa_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2717 0 (2718 2719 2720 2721) () 0 () ())
-160 'h5pregister_double' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2722 0 (2723
-2724 2725 2726 2727) () 0 () ())
-158 'h5pregister_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2728 0 (2729 2730 2731 2732 2733) () 0 ()
-())
-2734 'h5premove_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2735 0 (2736 2737 2738) () 0 () ())
-159 'h5pregister_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2739 0 (2740 2741 2742 2743 2744) () 0 ()
-())
-2745 'h5premove_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2746 0 (2747 2748 2749) () 0 () ())
-157 'h5pregister_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2750 0 (2751 2752 2753 2754 2755) () 0 ()
-())
-2756 'h5pset_attr_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2757 0 (2758 2759 2760 2761)
-() 0 () ())
-2762 'h5pset_attr_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2763 0 (2764 2765 2766) () 0
-() ())
-2767 'h5pset_alloc_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2768 0 (2769 2770 2771) () 0
-() ())
-2772 'h5pset_buffer_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2773 0 (2774 2775 2776) () 0 () ())
-2777 'h5pset_btree_ratios_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2778 0 (2779 2780 2781 2782
-2783) () 0 () ())
-2784 'h5pset_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2785 0 (2786 2787 2788 2789 2790 2791) ()
-0 () ())
-2792 'h5pset_char_encoding_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2793 0 (2794 2795 2796) () 0
-() ())
-2797 'h5pset_chunk_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2798 0 (2799 2800 2801 2802) () 0 () ())
-2803 'h5pset_chunk_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2804 0 (2805 2806 2807 2808
-2809) () 0 () ())
-2810 'h5pset_copy_object_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2811 0 (2812 2813 2814) () 0
-() ())
-2815 'h5pset_data_transform_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2816 0 (2817 2818 2819) () 0
-() ())
-2820 'h5pset_create_inter_group_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2821 0 (2822 2823 2824) () 0
-() ())
-164 'h5pset_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2825 0 (2826 2827 2828 2829)
-() 0 () ())
-2830 'h5pset_est_link_info_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2831 0 (2832 2833 2834 2835)
-() 0 () ())
-2836 'h5pset_edc_check_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2837 0 (2838 2839 2840) () 0 () ())
-2841 'h5pset_fapl_core_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2842 0 (2843 2844 2845 2846) () 0 () ())
-2847 'h5pset_family_offset_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2848 0 (2849 2850 2851) () 0
-() ())
-2852 'h5pset_external_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2853 0 (2854 2855 2856 2857 2858) () 0 ()
-())
-2859 'h5pset_deflate_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2860 0 (2861 2862 2863) () 0 () ())
-161 'h5pset_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2864 0 (2865 2866 2867 2868) () 0 () ())
-2869 'h5pset_alignment_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2870 0 (2871 2872 2873 2874) () 0 () ())
-156 'h5pinsert_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2875 0 (2876 2877 2878 2879
-2880) () 0 () ())
-2881 'h5pget_fill_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2882 0 (2883 2884 2885) () 0 () ())
-165 'h5pset_fapl_multi_s' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2886 0 (2887 2888 2889) () 0 () ())
-2890 'h5pset_fapl_sec2_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2891 0 (2892 2893) () 0 () ())
-166 'h5pset_fapl_multi_l' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2894 0 (2895 2896 2897 2898 2899 2900
-2901) () 0 () ())
-2902 'h5pset_fapl_split_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2903 0 (2904 2905 2906 2907
-2908 2909) () 0 () ())
-2910 'h5pset_fill_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2911 0 (2912 2913 2914) () 0 () ())
-2915 'h5pset_fclose_degree_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2916 0 (2917 2918 2919) () 0
-() ())
-2920 'h5pset_fapl_stdio_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2921 0 (2922 2923) () 0 () ())
-170 'h5pset_fill_value_double' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2924 0 (2925
-2926 2927 2928) () 0 () ())
-169 'h5pset_fill_value_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2929 0 (2930 2931 2932 2933)
-() 0 () ())
-167 'h5pset_fill_value_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2934 0 (2935 2936 2937 2938)
-() 0 () ())
-2939 'h5pset_fapl_family_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2940 0 (2941 2942 2943 2944)
-() 0 () ())
-2945 'h5pset_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2946 0 (2947 2948 2949 2950 2951 2952) ()
-0 () ())
-2953 'h5pset_fletcher32_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2954 0 (2955 2956) () 0 () ())
-168 'h5pset_fill_value_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2957 0 (2958 2959 2960 2961)
-() 0 () ())
-163 'h5pset_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2962 0 (2963 2964 2965 2966) () 0 () ())
-2967 'h5pset_hyper_vector_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2968 0 (2969 2970 2971) () 0
-() ())
-2972 'h5pset_layout_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2973 0 (2974 2975 2976) () 0 () ())
-2977 'h5pset_istore_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2978 0 (2979 2980 2981) () 0 () ())
-2982 'h5pset_link_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2983 0 (2984 2985 2986 2987)
-() 0 () ())
-2988 'h5pset_link_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2989 0 (2990 2991 2992) () 0
-() ())
-2993 'h5pset_nbit_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2994 0 (2995 2996) () 0 () ())
-2997 'h5pset_nlinks_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2998 0 (2999 3000 3001) () 0 () ())
-3002 'h5pset_meta_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3003 0 (3004 3005 3006) () 0
-() ())
-3007 'h5pset_preserve_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3008 0 (3009 3010 3011) () 0 () ())
-3012 'h5pset_scaleoffset_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3013 0 (3014 3015 3016 3017)
-() 0 () ())
-162 'h5pset_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3018 0 (3019 3020 3021 3022) () 0 () ())
-3023 'h5pset_obj_track_times_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3024 0 (3025 3026 3027) () 0
-() ())
-3028 'h5pset_shuffle_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3029 0 (3030 3031) () 0 () ())
-3032 'h5pset_shared_mesg_nindexes_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3033 0 (3034 3035 3036) () 0
-() ())
-3037 'h5pset_shared_mesg_index_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3038 0 (3039 3040 3041 3042
-3043) () 0 () ())
-3044 'h5pset_sizes_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3045 0 (3046 3047 3048 3049) () 0 () ())
-3050 'h5pset_small_data_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3051 0 (3052 3053 3054) () 0
-() ())
-3055 'h5pset_sieve_buf_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3056 0 (3057 3058 3059) () 0
-() ())
-3060 'h5pset_sym_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3061 0 (3062 3063 3064 3065) () 0 () ())
-3066 'h5pset_local_heap_size_hint_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3067 0 (3068 3069 3070) () 0
-() ())
-3071 'h5pset_userblock_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3072 0 (3073 3074 3075) () 0 () ())
-3076 'h5r' 'h5r' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-184 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-268 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-269 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3077 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-174 'h5rcreate_object_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3078 0 (3079 3080 3081 3082) () 0 () ())
-3083 'h5punregister_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3084 0 (3085 3086 3087) () 0 () ())
-173 'h5rcreate_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3088 0 (3089 3090 3091 3092 3093) () 0 ()
-())
-3094 'h5pset_szip_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3095 0 (3096 3097 3098 3099) () 0 () ())
-176 'h5rget_name_object_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3100 0 (
-3101 3102 3103 3104 3105) () 0 () ())
-171 'h5rdereference_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3106 0 (3107 3108 3109 3110)
-() 0 () ())
-172 'h5rdereference_object_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3111 0 (3112 3113 3114 3115)
-() 0 () ())
-177 'h5rget_object_type_obj_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3116 0 (3117 3118 3119 3120)
-() 0 () ())
-3121 'h5s' 'h5s' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-179 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-261 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-178 'h5rget_region_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3122 0 (3123 3124 3125 3126)
-() 0 () ())
-175 'h5rget_name_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3127 0 (
-3128 3129 3130 3131 3132) () 0 () ())
-265 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3133 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'20') () 0 () ())
-3134 'h5pset_libver_bounds_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3135 0 (3136 3137 3138 3139)
-() 0 () ())
-3140 'h5pset_gc_references_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3141 0 (3142 3143 3144) () 0
-() ())
-252 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-263 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-264 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-258 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-262 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-266 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3145 'h5scopy_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3146 0 (3147 3148 3149) () 0 () ())
-3150 'h5sclose_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3151 0 (3152 3153) () 0 () ())
-254 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3154 'h5screate_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3155 0 (3156 3157 3158
-3159 3160) () 0 () ())
-3161 'h5sdecode_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3162 0 (3163 3164 3165) () 0 () ())
-3166 'h5sget_select_bounds_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3167 0 (3168 3169 3170 3171)
-() 0 () ())
-3172 'h5sextent_equal_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3173 0 (3174 3175 3176 3177) () 0 () ())
-3178 'h5sextent_copy_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3179 0 (3180 3181 3182) () 0 () ())
-3183 'h5sget_select_npoints_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3184 0 (3185 3186 3187) () 0
-() ())
-3188 'h5sget_select_hyper_nblocks_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3189 0 (3190 3191 3192) () 0
-() ())
-3193 'h5sget_select_hyper_blocklist_f' 'h5s' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3194 0 (3195
-3196 3197 3198 3199) () 0 () ())
-3200 'h5sget_select_elem_pointlist_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3201 0 (3202 3203 3204 3205
-3206) () 0 () ())
-3207 'h5sget_simple_extent_dims_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3208 0 (3209 3210 3211 3212)
-() 0 () ())
-3213 'h5sget_select_type_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3214 0 (3215 3216 3217) () 0
-() ())
-3218 'h5sget_select_elem_npoints_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3219 0 (3220 3221 3222) () 0
-() ())
-3223 'h5sget_simple_extent_npoints_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3224 0 (3225 3226 3227) () 0
-() ())
-3228 'h5sget_simple_extent_ndims_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3229 0 (3230 3231 3232) () 0
-() ())
-3233 'h5sencode_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3234 0 (3235 3236 3237 3238) () 0 () ())
-3239 'h5screate_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3240 0 (3241 3242 3243) () 0 () ())
-3244 'h5sis_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3245 0 (3246 3247 3248) () 0 () ())
-3249 'h5soffset_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3250 0 (3251 3252 3253) () 0 () ())
-3254 'h5sget_simple_extent_type_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3255 0 (3256 3257 3258) () 0
-() ())
-3259 'h5sselect_none_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3260 0 (3261 3262) () 0 () ())
-3263 'h5sselect_valid_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3264 0 (3265 3266 3267) () 0 () ())
-3268 'h5sselect_hyperslab_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3269 0 (
-3270 3271 3272 3273 3274 3275 3276) () 0 () ())
-3277 'h5sselect_elements_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3278 0 (3279 3280 3281 3282
-3283 3284) () 0 () ())
-3285 'h5sset_extent_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3286 0 (3287 3288 3289 3290
-3291) () 0 () ())
-242 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-216 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-215 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-189 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-222 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3292 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'34') () 0 () ())
-424 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-423 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-421 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-422 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-434 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-223 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3293 'h5t' 'h5t' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-3294 'h5sset_extent_none_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3295 0 (3296 3297) () 0 () ())
-437 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-430 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-427 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-426 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-425 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-436 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-428 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-429 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-431 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-435 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3298 'h5sselect_all_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3299 0 (3300 3301) () 0 () ())
-249 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-230 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-231 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-227 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-416 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-417 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-418 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-267 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-414 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-420 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-433 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-432 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-408 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-409 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-410 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-419 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-405 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-412 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-406 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-218 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-411 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-407 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-220 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-413 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-217 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3302 'h5tclose_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3303 0 (3304 3305) () 0 () ())
-3306 'h5tcommit_anon_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3307 0 (3308 3309 3310
-3311 3312) () 0 () ())
-3313 'h5tcommit_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3314 0 (3315 3316 3317 3318
-3319 3320 3321) () 0 () ())
-3322 'h5tcompiler_conv_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3323 0 (3324 3325 3326 3327) () 0 () ())
-3328 'h5tcreate_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3329 0 (3330 3331 3332 3333) () 0 () ())
-3334 'h5tcopy_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3335 0 (3336 3337 3338) () 0 () ())
-3339 'h5tcommitted_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3340 0 (3341 3342 3343) () 0 () ())
-3344 'h5tarray_create_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3345 0 (3346 3347 3348 3349 3350) () 0 ()
-())
-3351 'h5tenum_nameof_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3352 0 (3353 3354 3355 3356 3357) () 0 ()
-())
-3358 'h5tequal_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3359 0 (3360 3361 3362 3363) () 0 () ())
-3364 'h5tget_array_dims_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3365 0 (3366 3367 3368) () 0
-() ())
-3369 'h5tenum_valueof_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3370 0 (3371 3372 3373 3374) () 0 () ())
-3375 'h5tenum_insert_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3376 0 (3377 3378 3379 3380) () 0 () ())
-3381 'h5tenum_create_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3382 0 (3383 3384 3385) () 0 () ())
-3386 'h5tget_create_plist_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3387 0 (3388 3389 3390) () 0
-() ())
-3391 'h5tget_class_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3392 0 (3393 3394 3395) () 0 () ())
-3396 'h5tget_array_ndims_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3397 0 (3398 3399 3400) () 0
-() ())
-3401 'h5tencode_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3402 0 (3403 3404 3405 3406) () 0 () ())
-3407 'h5tget_ebias_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3408 0 (3409 3410 3411) () 0 () ())
-3412 'h5tget_fields_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3413 0 (3414 3415 3416 3417 3418 3419
-3420) () 0 () ())
-3421 'h5tget_member_class_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3422 0 (3423 3424 3425 3426)
-() 0 () ())
-3427 'h5tget_member_offset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3428 0 (3429 3430 3431 3432)
-() 0 () ())
-3433 'h5tget_member_name_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3434 0 (3435 3436 3437 3438
-3439) () 0 () ())
-3440 'h5tget_member_type_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3441 0 (3442 3443 3444 3445)
-() 0 () ())
-3446 'h5tget_member_value_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3447 0 (3448 3449 3450 3451)
-() 0 () ())
-3452 'h5tget_member_index_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3453 0 (3454 3455 3456 3457)
-() 0 () ())
-3458 'h5tget_inpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3459 0 (3460 3461 3462) () 0 () ())
-3463 'h5tget_cset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3464 0 (3465 3466 3467) () 0 () ())
-3468 'h5tdecode_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3469 0 (3470 3471 3472) () 0 () ())
-404 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-415 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3473 'h5pset_fapl_direct_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3474 0 (3475 3476 3477 3478
-3479) () 0 () ())
-3480 'h5pget_char_encoding_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3481 0 (3482 3483 3484) () 0
-() ())
-3485 'h5tget_nmembers_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3486 0 (3487 3488 3489) () 0 () ())
-3490 'h5tget_norm_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3491 0 (3492 3493 3494) () 0 () ())
-3495 'h5tget_order_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3496 0 (3497 3498 3499) () 0 () ())
-3500 'h5tget_offset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3501 0 (3502 3503 3504) () 0 () ())
-3505 'h5tget_pad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3506 0 (3507 3508 3509 3510) () 0 () ())
-3511 'h5tget_sign_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3512 0 (3513 3514 3515) () 0 () ())
-3516 'h5tget_size_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3517 0 (3518 3519 3520) () 0 () ())
-3521 'h5tget_super_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3522 0 (3523 3524 3525) () 0 () ())
-3526 'h5tget_strpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3527 0 (3528 3529 3530) () 0 () ())
-3531 'h5tinsert_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3532 0 (3533 3534 3535 3536 3537) () 0 () ())
-3538 'h5tget_tag_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3539 0 (3540 3541 3542 3543) () 0 () ())
-3544 'h5tget_precision_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3545 0 (3546 3547 3548) () 0 () ())
-3549 'h5tpack_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3550 0 (3551 3552) () 0 () ())
-3553 'h5tset_cset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3554 0 (3555 3556 3557) () 0 () ())
-3558 'h5topen_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3559 0 (3560 3561 3562 3563
-3564) () 0 () ())
-3565 'h5tset_ebias_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3566 0 (3567 3568 3569) () 0 () ())
-3570 'h5tset_inpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3571 0 (3572 3573 3574) () 0 () ())
-3575 'h5tset_norm_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3576 0 (3577 3578 3579) () 0 () ())
-3580 'h5tset_order_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3581 0 (3582 3583 3584) () 0 () ())
-3585 'h5tset_offset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3586 0 (3587 3588 3589) () 0 () ())
-3590 'h5tset_fields_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3591 0 (3592 3593 3594 3595 3596 3597
-3598) () 0 () ())
-3599 'h5tis_variable_str_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3600 0 (3601 3602 3603) () 0
-() ())
-3604 'h5tset_precision_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3605 0 (3606 3607 3608) () 0 () ())
-3609 'h5tset_strpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3610 0 (3611 3612 3613) () 0 () ())
-3614 'h5tset_size_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3615 0 (3616 3617 3618) () 0 () ())
-206 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-207 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3619 'h5z' 'h5z' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-200 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-208 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-211 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3620 'h5tvlen_create_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3621 0 (3622 3623 3624) () 0 () ())
-3625 'h5tset_tag_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3626 0 (3627 3628 3629) () 0 () ())
-213 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-210 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-183 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-203 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3630 'h5zfilter_avail_f' 'h5z' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3631 0 (3632 3633 3634) () 0 () ())
-205 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3635 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'14') () 0 () ())
-3636 'hdf5' 'hdf5' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-3637 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((3638 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-3639 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-3640 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3641 'h5zunregister_f' 'h5z' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3642 0 (3643 3644) () 0 () ())
-3645 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3646 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3647 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((3648 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-3649 'h5zget_filter_info_f' 'h5z' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3650 0 (3651 3652 3653) () 0
-() ())
-3654 'h5tset_sign_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3655 0 (3656 3657 3658) () 0 () ())
-3659 'h5tset_pad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3660 0 (3661 3662 3663 3664) () 0 () ())
-3665 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-3666 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-3667 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-3668 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3669 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-3670 'printon' 'h5e' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-3671 'printoff' 'h5e' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0') () 0 () ())
-180 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-196 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-3672 'h5tget_native_type_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3673 0 (3674 3675 3676 3677)
-() 0 () ())
-395 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-49 'h5awrite_char_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3678 0 (3679 3680 3681 3682 3683) () 0 ()
-())
-2101 'pal_number' '' 2098 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2136 'pal_name' '' 2133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2134 'loc_id' '' 2133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2091 'height' '' 2087 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2121 'loc_id' '' 2120 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2118 'errcode' '' 2113 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2116 'pal_number' '' 2113 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2092 'planes' '' 2087 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2088 'loc_id' '' 2087 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2100 'dset_name' '' 2098 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2093 'interlace' '' 2087 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2158 'height' '' 2154 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2137 'errcode' '' 2133 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2161 'errcode' '' 2154 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-457 'obj_name' '' 455 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-456 'loc_id' '' 455 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-458 'attr_name' '' 455 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-464 'aapl_id' '' 455 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-463 'acpl_id' '' 455 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-460 'space_id' '' 455 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-459 'type_id' '' 455 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-465 'lapl_id' '' 455 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-462 'hdferr' '' 455 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-790 'name' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-794 'hdferr' '' 788 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-792 'space_id' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-791 'type_id' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-793 'attr_id' '' 788 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-487 'loc_id' '' 486 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-789 'loc_id' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-461 'attr' '' 455 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-468 'attr_id' '' 467 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-491 'lapl_id' '' 486 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-488 'obj_name' '' 486 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-796 'aapl_id' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-795 'acpl_id' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-475 'idx_type' '' 472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-476 'order' '' 472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-469 'hdferr' '' 467 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-489 'attr_name' '' 486 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-478 'hdferr' '' 472 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-479 'lapl_id' '' 472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-529 'loc_id' '' 528 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-531 'attr_name' '' 528 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-532 'attr_exists' '' 528 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-495 'attr_name' '' 493 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-496 'attr_exists' '' 493 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-534 'lapl_id' '' 528 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-533 'hdferr' '' 528 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-500 'loc_id' '' 499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-530 'obj_name' '' 528 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-477 'n' '' 472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-474 'obj_name' '' 472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-490 'hdferr' '' 486 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-497 'hdferr' '' 493 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-510 'lapl_id' '' 499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-506 'corder' '' 499 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-508 'data_size' '' 499 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-504 'n' '' 499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-507 'cset' '' 499 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2147 'loc_id' '' 2146 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2148 'dset_name' '' 2146 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-567 'cset' '' 563 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-566 'corder' '' 563 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-568 'data_size' '' 563 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-569 'hdferr' '' 563 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-565 'f_corder_valid' '' 563 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-509 'hdferr' '' 499 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-505 'f_corder_valid' '' 499 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-503 'order' '' 499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-502 'idx_type' '' 499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-514 'obj_name' '' 512 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-473 'loc_id' '' 472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-494 'obj_id' '' 493 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-564 'attr_id' '' 563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-518 'cset' '' 512 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-521 'lapl_id' '' 512 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-517 'corder' '' 512 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-525 'creation_prop_id' '' 523 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-519 'data_size' '' 512 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-520 'hdferr' '' 512 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-515 'attr_name' '' 512 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-524 'attr_id' '' 523 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2150 'height' '' 2146 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-526 'hdferr' '' 523 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-482 'obj_id' '' 481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-558 'attr_id' '' 557 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2151 'buf' '' 2146 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-561 'hdferr' '' 557 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-548 'attr_id' '' 547 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-559 'size' '' 557 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-553 'obj_id' '' 552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-554 'attr_num' '' 552 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-555 'hdferr' '' 552 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-538 'obj_name' '' 536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2152 'errcode' '' 2146 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-543 'hdferr' '' 536 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-542 'name' '' 536 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-544 'size' '' 536 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-545 'lapl_id' '' 536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-550 'hdferr' '' 547 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-537 'loc_id' '' 536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-539 'idx_type' '' 536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-541 'n' '' 536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-540 'order' '' 536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-549 'space_id' '' 547 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-484 'hdferr' '' 481 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-587 'attr_id' '' 583 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-588 'hdferr' '' 583 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-586 'attr_name' '' 583 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-589 'aapl_id' '' 583 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-585 'obj_name' '' 583 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-560 'buf' '' 557 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2149 'width' '' 2146 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-641 'loc_id' '' 640 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-642 'obj_name' '' 640 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-645 'n' '' 640 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-648 'aapl_id' '' 640 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-643 'idx_type' '' 640 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-644 'order' '' 640 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-646 'attr_id' '' 640 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-483 'name' '' 481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-516 'f_corder_valid' '' 512 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-584 'loc_id' '' 583 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-647 'hdferr' '' 640 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-579 'attr_id' '' 576 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-577 'obj_id' '' 576 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-649 'lapl_id' '' 640 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-581 'aapl_id' '' 576 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-595 'dims' '' 591 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-592 'attr_id' '' 591 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-593 'memtype_id' '' 591 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-634 'attr_id' '' 633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-594 'buf' '' 591 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 595 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-595 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-638 'hdferr' '' 633 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-637 'dims' '' 633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-636 'buf' '' 633 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 637 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-637 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 637 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-598 'attr_id' '' 597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-635 'memtype_id' '' 633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-578 'attr_name' '' 576 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-612 'index' '' 610 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-611 'obj_id' '' 610 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-613 'attr_id' '' 610 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-614 'hdferr' '' 610 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-622 'attr_id' '' 621 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-623 'memtype_id' '' 621 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-600 'buf' '' 597 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 601 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-596 'hdferr' '' 591 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-580 'hdferr' '' 576 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-626 'hdferr' '' 621 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-624 'buf' '' 621 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 625 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-625 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 625 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 625 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-625 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-629 'memtype_id' '' 627 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-602 'hdferr' '' 597 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-632 'hdferr' '' 627 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-630 'buf' '' 627 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 631 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-631 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 631 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 631 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-631 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 631 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-631 'dims' '' 627 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-619 'dims' '' 615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-616 'attr_id' '' 615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-669 'attr_id' '' 668 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-618 'buf' '' 615 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 619 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-619 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 619 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 619 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-670 'memtype_id' '' 668 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-672 'dims' '' 668 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-658 'memtype_id' '' 656 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-659 'buf' '' 656 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 660 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-660 'dims' '' 656 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-651 'attr_id' '' 650 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-654 'dims' '' 650 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-655 'hdferr' '' 650 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-653 'buf' '' 650 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-652 'memtype_id' '' 650 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-761 'buf' '' 758 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 762 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-762 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 762 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 762 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-762 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 762 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 762 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-760 'memtype_id' '' 758 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-759 'attr_id' '' 758 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-657 'attr_id' '' 656 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-620 'hdferr' '' 615 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-673 'hdferr' '' 668 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-671 'buf' '' 668 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 672 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-672 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-628 'attr_id' '' 627 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-625 'dims' '' 621 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-590 'lapl_id' '' 583 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-501 'obj_name' '' 499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-695 'buf' '' 692 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 696 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-696 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 696 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 696 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-696 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 696 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-694 'memtype_id' '' 692 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-693 'attr_id' '' 692 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-696 'dims' '' 692 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-661 'hdferr' '' 656 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-706 'memtype_id' '' 704 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-707 'buf' '' 704 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 708 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-708 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 708 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 708 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-708 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-617 'memtype_id' '' 615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-709 'hdferr' '' 704 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-708 'dims' '' 704 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-677 'buf' '' 674 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 678 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-678 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 678 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 678 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-705 'attr_id' '' 704 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-762 'dims' '' 758 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-676 'memtype_id' '' 674 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-678 'dims' '' 674 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-601 'dims' '' 597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-697 'hdferr' '' 692 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-688 'memtype_id' '' 686 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-687 'attr_id' '' 686 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-691 'hdferr' '' 686 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-689 'buf' '' 686 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-683 'buf' '' 680 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 684 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-684 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 684 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 684 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-684 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 684 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 684 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-684 'dims' '' 680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-681 'attr_id' '' 680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-690 'dims' '' 686 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-682 'memtype_id' '' 680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-665 'buf' '' 662 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 666 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-666 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 666 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-667 'hdferr' '' 662 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-685 'hdferr' '' 680 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-666 'dims' '' 662 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-663 'attr_id' '' 662 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-664 'memtype_id' '' 662 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-675 'attr_id' '' 674 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-599 'memtype_id' '' 597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-712 'memtype_id' '' 710 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-715 'hdferr' '' 710 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-699 'attr_id' '' 698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-714 'dims' '' 710 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-713 'buf' '' 710 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 714 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-714 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-717 'attr_id' '' 716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-702 'dims' '' 698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-701 'buf' '' 698 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 702 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-700 'memtype_id' '' 698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-718 'memtype_id' '' 716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-725 'buf' '' 722 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 726 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-726 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 726 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 726 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-726 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 726 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-723 'attr_id' '' 722 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-721 'hdferr' '' 716 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-726 'dims' '' 722 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-727 'hdferr' '' 722 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-724 'memtype_id' '' 722 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-719 'buf' '' 716 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 720 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-720 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 720 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 720 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-711 'attr_id' '' 710 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-754 'memtype_id' '' 752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-756 'dims' '' 752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-757 'hdferr' '' 752 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-720 'dims' '' 716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-753 'attr_id' '' 752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-730 'memtype_id' '' 728 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-732 'dims' '' 728 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-733 'hdferr' '' 728 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-747 'attr_id' '' 746 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-729 'attr_id' '' 728 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-731 'buf' '' 728 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 732 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-732 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 732 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 732 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-732 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 732 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 732 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-751 'hdferr' '' 746 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-750 'dims' '' 746 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-782 'attr_id' '' 781 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-785 'dims' '' 781 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-786 'hdferr' '' 781 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-736 'memtype_id' '' 734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-735 'attr_id' '' 734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-737 'buf' '' 734 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 738 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-738 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 738 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 738 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-738 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-783 'memtype_id' '' 781 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-784 'buf' '' 781 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 785 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-785 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-749 'buf' '' 746 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 750 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-742 'memtype_id' '' 740 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-741 'attr_id' '' 740 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-748 'memtype_id' '' 746 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-739 'hdferr' '' 734 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-743 'buf' '' 740 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 744 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-744 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 744 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-738 'dims' '' 734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-703 'hdferr' '' 698 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-745 'hdferr' '' 740 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-573 'type_id' '' 571 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-574 'hdferr' '' 571 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-836 'attr_id' '' 835 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-837 'memtype_id' '' 835 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-839 'dims' '' 835 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-770 'attr_id' '' 769 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-774 'hdferr' '' 769 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-771 'memtype_id' '' 769 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-838 'buf' '' 835 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 839 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-839 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 839 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 839 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-839 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-807 'dims' '' 803 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-806 'buf' '' 803 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-772 'buf' '' 769 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 773 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-773 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 773 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 773 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-804 'attr_id' '' 803 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-798 'attr_id' '' 797 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-773 'dims' '' 769 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-840 'hdferr' '' 835 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-802 'hdferr' '' 797 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-801 'dims' '' 797 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-811 'loc_id' '' 810 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-813 'new_attr_name' '' 810 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-812 'old_attr_name' '' 810 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-799 'memtype_id' '' 797 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-808 'hdferr' '' 803 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-572 'attr_id' '' 571 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-800 'buf' '' 797 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 801 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-801 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 801 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 801 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-801 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 801 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 801 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-873 'memtype_id' '' 871 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-872 'attr_id' '' 871 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-805 'memtype_id' '' 803 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-876 'hdferr' '' 871 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-868 'buf' '' 865 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 869 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-869 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 869 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 869 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-869 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-875 'dims' '' 871 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-870 'hdferr' '' 865 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-848 'attr_id' '' 847 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-852 'hdferr' '' 847 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-850 'buf' '' 847 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 851 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-851 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 851 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 851 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-861 'memtype_id' '' 859 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-860 'attr_id' '' 859 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-851 'dims' '' 847 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-869 'dims' '' 865 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-864 'hdferr' '' 859 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-862 'buf' '' 859 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 863 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-863 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 863 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 863 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-863 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 863 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 863 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-858 'hdferr' '' 853 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-857 'dims' '' 853 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-854 'attr_id' '' 853 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-843 'memtype_id' '' 841 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-855 'memtype_id' '' 853 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-844 'buf' '' 841 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 845 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-845 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 845 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-863 'dims' '' 859 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-842 'attr_id' '' 841 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-856 'buf' '' 853 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 857 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-857 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 857 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 857 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-857 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 857 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-849 'memtype_id' '' 847 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-867 'memtype_id' '' 865 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-874 'buf' '' 871 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 875 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-875 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-896 'attr_id' '' 895 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-845 'dims' '' 841 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-897 'memtype_id' '' 895 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-878 'attr_id' '' 877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-884 'attr_id' '' 883 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-882 'hdferr' '' 877 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-880 'buf' '' 877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 881 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 881 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-885 'memtype_id' '' 883 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-887 'dims' '' 883 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-886 'buf' '' 883 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 887 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 887 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 887 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 887 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-903 'memtype_id' '' 901 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-879 'memtype_id' '' 877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-902 'attr_id' '' 901 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-881 'dims' '' 877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-906 'hdferr' '' 901 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-888 'hdferr' '' 883 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-904 'buf' '' 901 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 905 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-905 'dims' '' 901 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1028 'buf' '' 1025 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1029 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1029 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1029 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1029 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1029 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1029 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1029 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1026 'attr_id' '' 1025 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1027 'memtype_id' '' 1025 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-899 'dims' '' 895 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-900 'hdferr' '' 895 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-846 'hdferr' '' 841 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-814 'hdferr' '' 810 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-755 'buf' '' 752 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-679 'hdferr' '' 674 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-763 'hdferr' '' 758 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-911 'dims' '' 907 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-909 'memtype_id' '' 907 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-910 'buf' '' 907 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 911 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 911 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 911 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 911 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-911 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 911 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-908 'attr_id' '' 907 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1029 'dims' '' 1025 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-915 'memtype_id' '' 913 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-916 'buf' '' 913 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ()) 0
-0 () () 0 () ())
-918 'hdferr' '' 913 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-890 'attr_id' '' 889 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-891 'memtype_id' '' 889 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-892 'buf' '' 889 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 893 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 893 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 893 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 893 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-893 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-914 'attr_id' '' 913 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-893 'dims' '' 889 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-917 'dims' '' 913 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-923 'dims' '' 919 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-920 'attr_id' '' 919 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-922 'buf' '' 919 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 923 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-933 'memtype_id' '' 931 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-934 'buf' '' 931 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 935 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-935 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 935 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-936 'hdferr' '' 931 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-866 'attr_id' '' 865 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-894 'hdferr' '' 889 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-924 'hdferr' '' 919 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-921 'memtype_id' '' 919 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-952 'buf' '' 949 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 953 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-953 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-953 'dims' '' 949 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-950 'attr_id' '' 949 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-898 'buf' '' 895 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 899 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 899 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 899 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-912 'hdferr' '' 907 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-927 'memtype_id' '' 925 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-951 'memtype_id' '' 949 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-928 'buf' '' 925 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 929 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-929 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 929 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 929 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-929 'dims' '' 925 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3679 'attr_id' '' 3678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-930 'hdferr' '' 925 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-954 'hdferr' '' 949 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3681 'buf' '' 3678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-818 'buf' '' 815 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 819 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-816 'attr_id' '' 815 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-819 'dims' '' 815 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3683 'hdferr' '' 3678 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-830 'attr_id' '' 829 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-831 'memtype_id' '' 829 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-820 'hdferr' '' 815 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1020 'attr_id' '' 1019 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1023 'dims' '' 1019 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1015 'memtype_id' '' 1013 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1022 'buf' '' 1019 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1023 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1023 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1023 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1023 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1023 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1023 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1023 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-833 'dims' '' 829 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-832 'buf' '' 829 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 833 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-833 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 833 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 833 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-833 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 833 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1016 'buf' '' 1013 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1017 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-1021 'memtype_id' '' 1019 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3680 'memtype_id' '' 3678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-834 'hdferr' '' 829 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1024 'hdferr' '' 1019 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1014 'attr_id' '' 1013 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-964 'buf' '' 961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 965 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 965 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1017 'dims' '' 1013 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-965 'dims' '' 961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-962 'attr_id' '' 961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-977 'dims' '' 973 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-978 'hdferr' '' 973 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-998 'attr_id' '' 997 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-975 'memtype_id' '' 973 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-976 'buf' '' 973 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 977 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 977 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 977 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 977 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-977 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 977 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-974 'attr_id' '' 973 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1001 'dims' '' 997 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-999 'memtype_id' '' 997 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-963 'memtype_id' '' 961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-969 'memtype_id' '' 967 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-966 'hdferr' '' 961 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-817 'memtype_id' '' 815 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3682 'dims' '' 3678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1002 'hdferr' '' 997 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-935 'dims' '' 931 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1018 'hdferr' '' 1013 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1000 'buf' '' 997 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1001 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1001 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1001 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1001 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1001 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-968 'attr_id' '' 967 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-926 'attr_id' '' 925 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-971 'dims' '' 967 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1004 'attr_id' '' 1003 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1005 'memtype_id' '' 1003 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1008 'hdferr' '' 1003 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-956 'attr_id' '' 955 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1007 'dims' '' 1003 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1006 'buf' '' 1003 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1007 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1007 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1007 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-932 'attr_id' '' 931 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-970 'buf' '' 967 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 971 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 971 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 971 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 971 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-959 'dims' '' 955 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-824 'obj_name' '' 822 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-823 'loc_id' '' 822 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-958 'buf' '' 955 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-957 'memtype_id' '' 955 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-827 'hdferr' '' 822 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-828 'lapl_id' '' 822 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-941 'dims' '' 937 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-825 'old_attr_name' '' 822 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-826 'new_attr_name' '' 822 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-972 'hdferr' '' 967 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-944 'attr_id' '' 943 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-945 'memtype_id' '' 943 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-942 'hdferr' '' 937 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-946 'buf' '' 943 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 947 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-947 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 947 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 947 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-947 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-947 'dims' '' 943 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-938 'attr_id' '' 937 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-939 'memtype_id' '' 937 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-940 'buf' '' 937 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 941 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-941 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 941 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 941 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-941 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 941 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1030 'hdferr' '' 1025 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2129 'pal_dims' '' 2126 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-948 'hdferr' '' 943 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-995 'dims' '' 991 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-994 'buf' '' 991 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ()) 0
-0 () () 0 () ())
-996 'hdferr' '' 991 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-988 'minnum' '' 986 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-980 'attr_id' '' 979 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-982 'buf' '' 979 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 983 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 983 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 983 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 983 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-983 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 983 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 983 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1012 'error' '' 1011 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-981 'memtype_id' '' 979 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-989 'relnum' '' 986 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-990 'error' '' 986 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-779 'dims' '' 775 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-778 'buf' '' 775 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 779 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-779 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 779 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-984 'hdferr' '' 979 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-777 'memtype_id' '' 775 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-776 'attr_id' '' 775 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-987 'majnum' '' 986 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-983 'dims' '' 979 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1034 'loc_id' '' 1033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-993 'memtype_id' '' 991 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1035 'type_id' '' 1033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1038 'hdferr' '' 1033 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1039 'dcpl_id' '' 1033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1074 'name' '' 1072 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1073 'loc_id' '' 1072 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1078 'hdferr' '' 1072 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1081 'dapl_id' '' 1072 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1076 'space_id' '' 1072 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1079 'dcpl_id' '' 1072 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1042 'fill_value' '' 1041 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 8 ()) 0 0 () () 0 () ())
-1043 'space_id' '' 1041 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1075 'type_id' '' 1072 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1421 'hdferr' '' 1419 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1077 'dset_id' '' 1072 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1045 'hdferr' '' 1041 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1040 'dapl_id' '' 1033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1420 'dset_id' '' 1419 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1080 'lcpl_id' '' 1072 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1059 'buf' '' 1056 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1058 'space_id' '' 1056 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1057 'fill_value' '' 1056 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1048 'space_id' '' 1046 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1044 'buf' '' 1041 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-1068 'space_id' '' 1066 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1050 'hdferr' '' 1046 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1037 'dset_id' '' 1033 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-780 'hdferr' '' 775 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1049 'buf' '' 1046 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-1127 'dataset_id' '' 1126 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1070 'hdferr' '' 1066 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1047 'fill_valuer' '' 1046 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 4 ()) 0 0 () () 0 () ())
-1069 'buf' '' 1066 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () (1 ASSUMED_SIZE (
-CONSTANT (INTEGER 4 ()) 0 '1') ()) 0 () ())
-2135 'dset_name' '' 2133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1089 'dataset_id' '' 1088 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1063 'dataset_id' '' 1062 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1090 'datatype_id' '' 1088 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1129 'hdferr' '' 1126 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1302 'dset_id' '' 1301 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1064 'plist_id' '' 1062 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1304 'buf' '' 1301 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1305 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1305 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1305 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1306 'hdferr' '' 1301 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1308 'file_space_id' '' 1301 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1307 'mem_space_id' '' 1301 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1096 'dset_id' '' 1095 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1097 'mem_type_id' '' 1095 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1309 'xfer_prp' '' 1301 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1303 'mem_type_id' '' 1301 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1098 'buf' '' 1095 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1099 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1099 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1102 'file_space_id' '' 1095 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1103 'xfer_prp' '' 1095 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1107 'buf' '' 1104 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1108 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1101 'mem_space_id' '' 1095 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1110 'mem_space_id' '' 1104 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1106 'mem_type_id' '' 1104 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1108 'dims' '' 1104 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1100 'hdferr' '' 1095 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1111 'file_space_id' '' 1104 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2122 'dset_name' '' 2120 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1105 'dset_id' '' 1104 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1112 'xfer_prp' '' 1104 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1119 'dapl_id' '' 1114 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1094 'error' '' 1093 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1117 'dset_id' '' 1114 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1115 'loc_id' '' 1114 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1116 'name' '' 1114 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1099 'dims' '' 1095 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1118 'hdferr' '' 1114 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1124 'hdferr' '' 1121 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1122 'dataset_id' '' 1121 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1149 'dset_id' '' 1148 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1150 'mem_type_id' '' 1148 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1151 'buf' '' 1148 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1152 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1152 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1152 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1152 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1152 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1152 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1152 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1152 'dims' '' 1148 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1091 'hdferr' '' 1088 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1123 'size' '' 1121 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-1156 'xfer_prp' '' 1148 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1131 'dset_id' '' 1130 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1153 'hdferr' '' 1148 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1137 'file_space_id' '' 1130 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1133 'buf' '' 1130 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1134 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1134 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1134 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1134 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1134 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1134 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1136 'mem_space_id' '' 1130 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1135 'hdferr' '' 1130 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1138 'xfer_prp' '' 1130 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1155 'file_space_id' '' 1148 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1293 'dset_id' '' 1292 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1295 'buf' '' 1292 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1296 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1296 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1294 'mem_type_id' '' 1292 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1296 'dims' '' 1292 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1297 'hdferr' '' 1292 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1298 'mem_space_id' '' 1292 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1134 'dims' '' 1130 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1154 'mem_space_id' '' 1148 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1109 'hdferr' '' 1104 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1305 'dims' '' 1301 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1065 'hdferr' '' 1062 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1067 'fill_value' '' 1066 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () () 0 () ())
-1168 'mem_type_id' '' 1166 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1169 'buf' '' 1166 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1170 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1167 'dset_id' '' 1166 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1172 'mem_space_id' '' 1166 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1173 'file_space_id' '' 1166 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1171 'hdferr' '' 1166 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1174 'xfer_prp' '' 1166 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1299 'file_space_id' '' 1292 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1223 'buf' '' 1220 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1224 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1224 'dims' '' 1220 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1300 'xfer_prp' '' 1292 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-992 'attr_id' '' 991 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1226 'mem_space_id' '' 1220 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1221 'dset_id' '' 1220 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1228 'xfer_prp' '' 1220 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1225 'hdferr' '' 1220 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1227 'file_space_id' '' 1220 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1170 'dims' '' 1166 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1231 'mem_type_id' '' 1229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1230 'dset_id' '' 1229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2168 'errcode' '' 2164 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1132 'mem_type_id' '' 1130 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1084 'dset_id' '' 1083 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1086 'hdferr' '' 1083 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1085 'flag' '' 1083 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1236 'file_space_id' '' 1229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1235 'mem_space_id' '' 1229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1234 'hdferr' '' 1229 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1128 'dataspace_id' '' 1126 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1060 'hdferr' '' 1056 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1232 'buf' '' 1229 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1233 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1237 'xfer_prp' '' 1229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1233 'dims' '' 1229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-513 'loc_id' '' 512 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-744 'dims' '' 740 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-960 'hdferr' '' 955 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1036 'space_id' '' 1033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1180 'hdferr' '' 1175 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1140 'dset_id' '' 1139 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1182 'file_space_id' '' 1175 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1181 'mem_space_id' '' 1175 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1141 'mem_type_id' '' 1139 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1143 'dims' '' 1139 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1142 'buf' '' 1139 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1143 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1143 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1143 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1143 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1143 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1183 'xfer_prp' '' 1175 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1145 'mem_space_id' '' 1139 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1178 'buf' '' 1175 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1179 'dims' '' 1175 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1213 'mem_type_id' '' 1211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1144 'hdferr' '' 1139 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1214 'buf' '' 1211 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1215 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1215 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1147 'xfer_prp' '' 1139 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1212 'dset_id' '' 1211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1219 'xfer_prp' '' 1211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1185 'dset_id' '' 1184 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1216 'hdferr' '' 1211 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1218 'file_space_id' '' 1211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1188 'dims' '' 1184 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1146 'file_space_id' '' 1139 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1190 'mem_space_id' '' 1184 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1186 'mem_type_id' '' 1184 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1217 'mem_space_id' '' 1211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1191 'file_space_id' '' 1184 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1192 'xfer_prp' '' 1184 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1203 'dset_id' '' 1202 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1207 'hdferr' '' 1202 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1205 'buf' '' 1202 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8
-()) 0 0 () () 0 () ())
-1208 'mem_space_id' '' 1202 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1187 'buf' '' 1184 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1188 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1206 'dims' '' 1202 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1204 'mem_type_id' '' 1202 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1210 'xfer_prp' '' 1202 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1194 'dset_id' '' 1193 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1177 'mem_type_id' '' 1175 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1198 'hdferr' '' 1193 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1201 'xfer_prp' '' 1193 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1196 'buf' '' 1193 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1197 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1197 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1197 'dims' '' 1193 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1199 'mem_space_id' '' 1193 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1249 'mem_type_id' '' 1247 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1251 'dims' '' 1247 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1250 'buf' '' 1247 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1251 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1251 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1253 'mem_space_id' '' 1247 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1252 'hdferr' '' 1247 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1285 'mem_type_id' '' 1283 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1286 'buf' '' 1283 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1287 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1290 'file_space_id' '' 1283 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1287 'dims' '' 1283 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1284 'dset_id' '' 1283 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1289 'mem_space_id' '' 1283 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1254 'file_space_id' '' 1247 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1200 'file_space_id' '' 1193 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1189 'hdferr' '' 1184 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1277 'buf' '' 1274 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1278 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1278 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1278 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1278 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1275 'dset_id' '' 1274 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1278 'dims' '' 1274 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1288 'hdferr' '' 1283 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1279 'hdferr' '' 1274 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1281 'file_space_id' '' 1274 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1282 'xfer_prp' '' 1274 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1255 'xfer_prp' '' 1247 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1291 'xfer_prp' '' 1283 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1261 'hdferr' '' 1256 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1260 'dims' '' 1256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1262 'mem_space_id' '' 1256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1263 'file_space_id' '' 1256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1259 'buf' '' 1256 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1260 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1260 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1260 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1260 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1260 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1260 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1264 'xfer_prp' '' 1256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1257 'dset_id' '' 1256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1258 'mem_type_id' '' 1256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1276 'mem_type_id' '' 1274 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1269 'dims' '' 1265 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1270 'hdferr' '' 1265 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1268 'buf' '' 1265 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1269 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1269 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1269 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1269 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1269 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1195 'mem_type_id' '' 1193 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1248 'dset_id' '' 1247 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1272 'file_space_id' '' 1265 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1273 'xfer_prp' '' 1265 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1240 'mem_type_id' '' 1238 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1241 'buf' '' 1238 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1242 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1242 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1242 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1242 'dims' '' 1238 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1239 'dset_id' '' 1238 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1266 'dset_id' '' 1265 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1271 'mem_space_id' '' 1265 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1161 'dims' '' 1157 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1245 'file_space_id' '' 1238 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1243 'hdferr' '' 1238 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1159 'mem_type_id' '' 1157 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1160 'buf' '' 1157 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1161 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1161 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1161 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1161 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1267 'mem_type_id' '' 1265 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1280 'mem_space_id' '' 1274 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1163 'mem_space_id' '' 1157 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1246 'xfer_prp' '' 1238 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1165 'xfer_prp' '' 1157 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1164 'file_space_id' '' 1157 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1158 'dset_id' '' 1157 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1162 'hdferr' '' 1157 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1330 'mem_type_id' '' 1328 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1334 'mem_space_id' '' 1328 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1332 'dims' '' 1328 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1331 'buf' '' 1328 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1332 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1333 'hdferr' '' 1328 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1402 'mem_type_id' '' 1400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1403 'buf' '' 1400 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1401 'dset_id' '' 1400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1405 'hdferr' '' 1400 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1408 'xfer_prp' '' 1400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1407 'file_space_id' '' 1400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1312 'mem_type_id' '' 1310 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1314 'dims' '' 1310 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1315 'hdferr' '' 1310 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1311 'dset_id' '' 1310 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1317 'file_space_id' '' 1310 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1318 'xfer_prp' '' 1310 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1404 'dims' '' 1400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1335 'file_space_id' '' 1328 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1385 'buf' '' 1382 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1386 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1386 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1386 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1386 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1386 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1386 'dims' '' 1382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1387 'hdferr' '' 1382 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1389 'file_space_id' '' 1382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1340 'buf' '' 1337 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1341 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1341 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1341 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1341 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1341 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1341 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1316 'mem_space_id' '' 1310 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1384 'mem_type_id' '' 1382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1342 'hdferr' '' 1337 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1343 'mem_space_id' '' 1337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1344 'file_space_id' '' 1337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1338 'dset_id' '' 1337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1390 'xfer_prp' '' 1382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1345 'xfer_prp' '' 1337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1356 'dset_id' '' 1355 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1339 'mem_type_id' '' 1337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1406 'mem_space_id' '' 1400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1358 'buf' '' 1355 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1359 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1359 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1359 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1359 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1359 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1359 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1359 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1336 'xfer_prp' '' 1328 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1360 'hdferr' '' 1355 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1313 'buf' '' 1310 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1314 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1314 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1314 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1341 'dims' '' 1337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1388 'mem_space_id' '' 1382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1383 'dset_id' '' 1382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1244 'mem_space_id' '' 1238 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1215 'dims' '' 1211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1392 'dset_id' '' 1391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1361 'mem_space_id' '' 1355 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1394 'buf' '' 1391 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1395 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1395 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1395 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1395 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1393 'mem_type_id' '' 1391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1395 'dims' '' 1391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1397 'mem_space_id' '' 1391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1320 'dset_id' '' 1319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1399 'xfer_prp' '' 1391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1321 'mem_type_id' '' 1319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1398 'file_space_id' '' 1391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1324 'hdferr' '' 1319 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1327 'xfer_prp' '' 1319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1325 'mem_space_id' '' 1319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1322 'buf' '' 1319 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1323 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1323 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1412 'buf' '' 1409 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1413 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1413 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1413 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1413 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1413 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1413 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1413 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1414 'hdferr' '' 1409 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1413 'dims' '' 1409 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1411 'mem_type_id' '' 1409 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1363 'xfer_prp' '' 1355 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1417 'xfer_prp' '' 1409 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1054 'plist_id' '' 1052 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1415 'mem_space_id' '' 1409 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1416 'file_space_id' '' 1409 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1366 'mem_type_id' '' 1364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1365 'dset_id' '' 1364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1055 'hdferr' '' 1052 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1053 'dset_id' '' 1052 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1367 'buf' '' 1364 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(DERIVED 3647 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1368 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1368 'dims' '' 1364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1396 'hdferr' '' 1391 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1375 'mem_type_id' '' 1373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1371 'file_space_id' '' 1364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1374 'dset_id' '' 1373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1372 'xfer_prp' '' 1364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1370 'mem_space_id' '' 1364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1359 'dims' '' 1355 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1379 'mem_space_id' '' 1373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1378 'hdferr' '' 1373 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1377 'dims' '' 1373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1348 'mem_type_id' '' 1346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1347 'dset_id' '' 1346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1380 'file_space_id' '' 1373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1349 'buf' '' 1346 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-1351 'hdferr' '' 1346 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1352 'mem_space_id' '' 1346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1482 'buf' '' 1479 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1483 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1483 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1483 'dims' '' 1479 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1481 'mem_type_id' '' 1479 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1480 'dset_id' '' 1479 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1487 'file_space_id' '' 1479 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1353 'file_space_id' '' 1346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1350 'dims' '' 1346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1484 'len' '' 1479 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1488 'xfer_prp' '' 1479 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1354 'xfer_prp' '' 1346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1423 'dset_id' '' 1422 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1424 'mem_type_id' '' 1422 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1485 'hdferr' '' 1479 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1486 'mem_space_id' '' 1479 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1369 'hdferr' '' 1364 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1323 'dims' '' 1319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1326 'file_space_id' '' 1319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1428 'hdferr' '' 1422 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1381 'xfer_prp' '' 1373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1376 'buf' '' 1373 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(DERIVED 3637 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1377 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1425 'buf' '' 1422 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1426 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1))))) 0 () ())
-1427 'str_len' '' 1422 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-1431 'xfer_prp' '' 1422 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1814 'dset_id' '' 1813 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1816 'buf' '' 1813 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1817 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1817 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1821 'file_space_id' '' 1813 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1820 'mem_space_id' '' 1813 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1819 'hdferr' '' 1813 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1815 'mem_type_id' '' 1813 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1818 'len' '' 1813 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1822 'xfer_prp' '' 1813 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1817 'dims' '' 1813 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1357 'mem_type_id' '' 1355 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1426 'dims' '' 1422 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1453 'dset_id' '' 1452 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1456 'dims' '' 1452 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1457 'hdferr' '' 1452 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1454 'mem_type_id' '' 1452 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1460 'xfer_prp' '' 1452 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1430 'file_space_id' '' 1422 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1410 'dset_id' '' 1409 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1362 'file_space_id' '' 1355 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1458 'mem_space_id' '' 1452 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1496 'file_space_id' '' 1489 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1494 'hdferr' '' 1489 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1495 'mem_space_id' '' 1489 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1490 'dset_id' '' 1489 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1492 'buf' '' 1489 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1493 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1493 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1493 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1493 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1493 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1493 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1499 'dset_id' '' 1498 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1493 'dims' '' 1489 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1455 'buf' '' 1452 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1456 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1456 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1456 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1501 'buf' '' 1498 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1502 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1502 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1502 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1502 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1502 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1497 'xfer_prp' '' 1489 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1500 'mem_type_id' '' 1498 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1557 'hdferr' '' 1552 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1554 'mem_type_id' '' 1552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1555 'buf' '' 1552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1556 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1556 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1556 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1556 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1556 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1556 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1556 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1556 'dims' '' 1552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1505 'file_space_id' '' 1498 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1558 'mem_space_id' '' 1552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1504 'mem_space_id' '' 1498 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1506 'xfer_prp' '' 1498 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1559 'file_space_id' '' 1552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1560 'xfer_prp' '' 1552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1553 'dset_id' '' 1552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1467 'mem_space_id' '' 1461 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1466 'hdferr' '' 1461 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1462 'dset_id' '' 1461 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1491 'mem_type_id' '' 1489 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1464 'buf' '' 1461 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1465 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1465 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1465 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1465 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1469 'xfer_prp' '' 1461 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1463 'mem_type_id' '' 1461 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1465 'dims' '' 1461 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1503 'hdferr' '' 1498 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1510 'buf' '' 1507 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1511 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-1511 'dims' '' 1507 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1509 'mem_type_id' '' 1507 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1502 'dims' '' 1498 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1512 'hdferr' '' 1507 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1513 'mem_space_id' '' 1507 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1468 'file_space_id' '' 1461 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1519 'buf' '' 1516 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-1520 'dims' '' 1516 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1517 'dset_id' '' 1516 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1524 'xfer_prp' '' 1516 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1523 'file_space_id' '' 1516 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1471 'dset_id' '' 1470 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1518 'mem_type_id' '' 1516 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1475 'hdferr' '' 1470 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1478 'xfer_prp' '' 1470 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1477 'file_space_id' '' 1470 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1476 'mem_space_id' '' 1470 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1473 'buf' '' 1470 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1474 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1474 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1472 'mem_type_id' '' 1470 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1474 'dims' '' 1470 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1515 'xfer_prp' '' 1507 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1522 'mem_space_id' '' 1516 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1526 'dset_id' '' 1525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1530 'hdferr' '' 1525 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1531 'mem_space_id' '' 1525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1532 'file_space_id' '' 1525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1562 'dset_id' '' 1561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1529 'dims' '' 1525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1528 'buf' '' 1525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1529 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1529 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1529 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1529 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1533 'xfer_prp' '' 1525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1563 'mem_type_id' '' 1561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1527 'mem_type_id' '' 1525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1565 'dims' '' 1561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1571 'dset_id' '' 1570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1568 'file_space_id' '' 1561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1569 'xfer_prp' '' 1561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1572 'mem_type_id' '' 1570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1575 'hdferr' '' 1570 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1574 'dims' '' 1570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1576 'mem_space_id' '' 1570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1567 'mem_space_id' '' 1561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1566 'hdferr' '' 1561 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1564 'buf' '' 1561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1565 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1565 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1565 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1565 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1565 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1565 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1573 'buf' '' 1570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-1616 'dset_id' '' 1615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1619 'dims' '' 1615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1578 'xfer_prp' '' 1570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1618 'buf' '' 1615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1619 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1619 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1619 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1619 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1619 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1619 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1619 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1521 'hdferr' '' 1516 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1508 'dset_id' '' 1507 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1459 'file_space_id' '' 1452 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1222 'mem_type_id' '' 1220 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1620 'hdferr' '' 1615 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1807 'buf' '' 1804 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1808 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1808 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1808 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1808 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1808 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1806 'mem_type_id' '' 1804 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1809 'hdferr' '' 1804 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1805 'dset_id' '' 1804 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1623 'xfer_prp' '' 1615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1617 'mem_type_id' '' 1615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1577 'file_space_id' '' 1570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1622 'file_space_id' '' 1615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1808 'dims' '' 1804 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1812 'xfer_prp' '' 1804 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1514 'file_space_id' '' 1507 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1811 'file_space_id' '' 1804 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1536 'mem_type_id' '' 1534 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1535 'dset_id' '' 1534 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1539 'hdferr' '' 1534 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1810 'mem_space_id' '' 1804 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1429 'mem_space_id' '' 1422 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1541 'file_space_id' '' 1534 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1544 'dset_id' '' 1543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1542 'xfer_prp' '' 1534 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1329 'dset_id' '' 1328 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1537 'buf' '' 1534 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1538 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1538 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1538 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1538 'dims' '' 1534 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1547 'dims' '' 1543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1546 'buf' '' 1543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1547 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1547 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1548 'hdferr' '' 1543 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1550 'file_space_id' '' 1543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1551 'xfer_prp' '' 1543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1442 'buf' '' 1439 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1443 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1443 'dims' '' 1439 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1444 'hdferr' '' 1439 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1446 'file_space_id' '' 1439 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1447 'xfer_prp' '' 1439 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1434 'dataset_id' '' 1433 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1445 'mem_space_id' '' 1439 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1438 'hdferr' '' 1433 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1436 'space_id' '' 1433 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1608 'mem_type_id' '' 1606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1435 'type_id' '' 1433 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1607 'dset_id' '' 1606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1437 'len' '' 1433 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-1613 'file_space_id' '' 1606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1614 'xfer_prp' '' 1606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1609 'buf' '' 1606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1610 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1610 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1610 'dims' '' 1606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1611 'hdferr' '' 1606 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1583 'dims' '' 1579 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1582 'buf' '' 1579 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1583 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1628 'dims' '' 1624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1627 'buf' '' 1624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1628 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1628 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1628 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1628 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1628 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1628 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1629 'hdferr' '' 1624 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1625 'dset_id' '' 1624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1586 'file_space_id' '' 1579 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1632 'xfer_prp' '' 1624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1679 'dset_id' '' 1678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1683 'hdferr' '' 1678 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1680 'mem_type_id' '' 1678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1682 'dims' '' 1678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1685 'file_space_id' '' 1678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1599 'mem_type_id' '' 1597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1686 'xfer_prp' '' 1678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1598 'dset_id' '' 1597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1602 'hdferr' '' 1597 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1601 'dims' '' 1597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1603 'mem_space_id' '' 1597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1631 'file_space_id' '' 1624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1600 'buf' '' 1597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1601 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1601 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1601 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1601 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1604 'file_space_id' '' 1597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1681 'buf' '' 1678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1682 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1682 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1682 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1682 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1682 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1684 'mem_space_id' '' 1678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1626 'mem_type_id' '' 1624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1590 'mem_type_id' '' 1588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1585 'mem_space_id' '' 1579 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1605 'xfer_prp' '' 1597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1589 'dset_id' '' 1588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1630 'mem_space_id' '' 1624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1587 'xfer_prp' '' 1579 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1584 'hdferr' '' 1579 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1580 'dset_id' '' 1579 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1440 'dset_id' '' 1439 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1592 'dims' '' 1588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1593 'hdferr' '' 1588 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1594 'mem_space_id' '' 1588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1595 'file_space_id' '' 1588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1596 'xfer_prp' '' 1588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1644 'mem_type_id' '' 1642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1612 'mem_space_id' '' 1606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1591 'buf' '' 1588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1592 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1592 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1592 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1581 'mem_type_id' '' 1579 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1441 'mem_type_id' '' 1439 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1549 'mem_space_id' '' 1543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1643 'dset_id' '' 1642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1648 'mem_space_id' '' 1642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1649 'file_space_id' '' 1642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1672 'buf' '' 1669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1673 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-1671 'mem_type_id' '' 1669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1670 'dset_id' '' 1669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1677 'xfer_prp' '' 1669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1716 'mem_type_id' '' 1714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1675 'mem_space_id' '' 1669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1719 'hdferr' '' 1714 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1715 'dset_id' '' 1714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1676 'file_space_id' '' 1669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1720 'mem_space_id' '' 1714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1722 'xfer_prp' '' 1714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1717 'buf' '' 1714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1718 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1718 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1718 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1718 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1718 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1718 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1718 'dims' '' 1714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1674 'hdferr' '' 1669 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1647 'hdferr' '' 1642 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1692 'hdferr' '' 1687 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1721 'file_space_id' '' 1714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1695 'xfer_prp' '' 1687 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1742 'dset_id' '' 1741 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1745 'dims' '' 1741 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1744 'buf' '' 1741 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1745 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1745 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1745 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1745 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1743 'mem_type_id' '' 1741 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1693 'mem_space_id' '' 1687 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1691 'dims' '' 1687 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1747 'mem_space_id' '' 1741 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1746 'hdferr' '' 1741 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1694 'file_space_id' '' 1687 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1688 'dset_id' '' 1687 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1689 'mem_type_id' '' 1687 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1673 'dims' '' 1669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1749 'xfer_prp' '' 1741 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1652 'dset_id' '' 1651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1654 'buf' '' 1651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1655 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1655 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1655 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1748 'file_space_id' '' 1741 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1653 'mem_type_id' '' 1651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1657 'mem_space_id' '' 1651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1690 'buf' '' 1687 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1691 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1691 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1691 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1691 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1691 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1659 'xfer_prp' '' 1651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1700 'dims' '' 1696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1698 'mem_type_id' '' 1696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1701 'hdferr' '' 1696 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1704 'xfer_prp' '' 1696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1702 'mem_space_id' '' 1696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1661 'dset_id' '' 1660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1663 'buf' '' 1660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1664 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1664 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1664 'dims' '' 1660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1703 'file_space_id' '' 1696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1699 'buf' '' 1696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1700 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1700 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1700 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1700 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1700 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1700 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1700 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1665 'hdferr' '' 1660 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1666 'mem_space_id' '' 1660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1697 'dset_id' '' 1696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1668 'xfer_prp' '' 1660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1650 'xfer_prp' '' 1642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1655 'dims' '' 1651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1662 'mem_type_id' '' 1660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1646 'dims' '' 1642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1636 'buf' '' 1633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1637 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1637 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1637 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1637 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1637 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1637 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1637 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1637 'dims' '' 1633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1640 'file_space_id' '' 1633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1641 'xfer_prp' '' 1633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1733 'dset_id' '' 1732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1734 'mem_type_id' '' 1732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1638 'hdferr' '' 1633 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1639 'mem_space_id' '' 1633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1735 'buf' '' 1732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-DERIVED 3637 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1736 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1738 'mem_space_id' '' 1732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1739 'file_space_id' '' 1732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1635 'mem_type_id' '' 1633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1634 'dset_id' '' 1633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1667 'file_space_id' '' 1660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1740 'xfer_prp' '' 1732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1736 'dims' '' 1732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1725 'mem_type_id' '' 1723 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1540 'mem_space_id' '' 1534 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1737 'hdferr' '' 1732 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1726 'buf' '' 1723 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-DERIVED 3647 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1727 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1731 'xfer_prp' '' 1723 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1730 'file_space_id' '' 1723 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1729 'mem_space_id' '' 1723 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1754 'dims' '' 1750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1756 'hdferr' '' 1750 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1753 'buf' '' 1750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1754 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1))))) 0 () ())
-1751 'dset_id' '' 1750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1762 'mem_type_id' '' 1760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1759 'xfer_prp' '' 1750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1763 'buf' '' 1760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1764 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1764 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1764 'dims' '' 1760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1757 'mem_space_id' '' 1750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1727 'dims' '' 1723 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1658 'file_space_id' '' 1651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1755 'str_len' '' 1750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-1758 'file_space_id' '' 1750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1761 'dset_id' '' 1760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1768 'file_space_id' '' 1760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1771 'dset_id' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1769 'xfer_prp' '' 1760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1767 'mem_space_id' '' 1760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1776 'hdferr' '' 1770 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1773 'buf' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1774 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1774 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1775 'len' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1772 'mem_type_id' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1752 'mem_type_id' '' 1750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1765 'len' '' 1760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1774 'dims' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1766 'hdferr' '' 1760 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1779 'xfer_prp' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1778 'file_space_id' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1788 'hdferr' '' 1787 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2124 'errcode' '' 2120 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1728 'hdferr' '' 1723 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1803 'name' '' 1801 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1777 'mem_space_id' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1793 'hdferr' '' 1790 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1792 'name' '' 1790 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1785 'hdferr' '' 1781 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1798 'hdferr' '' 1796 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1797 'printflag' '' 1796 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1783 'name' '' 1781 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1784 'namelen' '' 1781 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1708 'buf' '' 1705 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-1709 'dims' '' 1705 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1713 'xfer_prp' '' 1705 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1710 'hdferr' '' 1705 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1706 'dset_id' '' 1705 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1712 'file_space_id' '' 1705 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1791 'error_no' '' 1790 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1656 'hdferr' '' 1651 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1645 'buf' '' 1642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1827 'access_flags' '' 1825 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1711 'mem_space_id' '' 1705 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1826 'name' '' 1825 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1831 'access_prp' '' 1825 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1829 'hdferr' '' 1825 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1707 'mem_type_id' '' 1705 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1782 'error_no' '' 1781 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1841 'scope' '' 1839 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1857 'size' '' 1855 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-1858 'hdferr' '' 1855 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1856 'file_id' '' 1855 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1842 'hdferr' '' 1839 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1840 'object_id' '' 1839 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1830 'creation_prp' '' 1825 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1852 'free_space' '' 1850 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1886 'file_id' '' 1885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1889 'hdferr' '' 1885 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1845 'obj_id' '' 1844 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1887 'obj_type' '' 1885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1888 'obj_count' '' 1885 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1846 'buf' '' 1844 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1851 'file_id' '' 1850 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2128 'dset_name' '' 2126 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1847 'size' '' 1844 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-1866 'name' '' 1865 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2089 'dset_name' '' 2087 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1867 'status' '' 1865 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-1868 'hdferr' '' 1865 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1897 'file_id' '' 1896 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1863 'hdferr' '' 1860 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1898 'ret_file_id' '' 1896 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1880 'max_objs' '' 1877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1862 'prop_id' '' 1860 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1879 'obj_type' '' 1877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1883 'num_objs' '' 1877 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 8 ()) 0 0 () () 0 () ())
-1881 'obj_ids' '' 1877 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-1848 'hdferr' '' 1844 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2095 'errcode' '' 2087 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1802 'hdferr' '' 1801 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1882 'hdferr' '' 1877 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1878 'file_id' '' 1877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1861 'file_id' '' 1860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1853 'hdferr' '' 1850 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1894 'hdferr' '' 1891 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1893 'name' '' 1891 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1907 'file_id' '' 1904 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1909 'access_prp' '' 1904 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1871 'loc_id' '' 1870 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1908 'hdferr' '' 1904 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1906 'access_flags' '' 1904 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1873 'child_id' '' 1870 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1905 'name' '' 1904 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1892 'loc_id' '' 1891 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2416 'access_id' '' 2414 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2415 'file_id' '' 2414 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1836 'hdferr' '' 1834 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2417 'hdferr' '' 2414 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1875 'access_prp' '' 1870 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1874 'hdferr' '' 1870 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1835 'file_id' '' 1834 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1912 'error' '' 1911 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1916 'grp_id' '' 1914 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1917 'hdferr' '' 1914 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1922 'grp_id' '' 1921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1918 'gcpl_id' '' 1914 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1915 'loc_id' '' 1914 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2130 'buf' '' 2126 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1919 'gapl_id' '' 1914 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1872 'name' '' 1870 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1828 'file_id' '' 1825 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1929 'hdferr' '' 1925 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1927 'name' '' 1925 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1931 'lcpl_id' '' 1925 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1932 'gcpl_id' '' 1925 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1926 'loc_id' '' 1925 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1930 'size_hint' '' 1925 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 8 ()) 0 0 () () 0 () ())
-1996 'gcpl_id' '' 1994 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1995 'grp_id' '' 1994 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1985 'loc_id' '' 1984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1989 'max_corder' '' 1984 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1988 'nlinks' '' 1984 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1990 'hdferr' '' 1984 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1991 'lapl_id' '' 1984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1986 'group_name' '' 1984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1987 'storage_type' '' 1984 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1953 'n' '' 1948 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-1950 'group_name' '' 1948 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1949 'loc_id' '' 1948 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1992 'mounted' '' 1984 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (LOGICAL 4 ()) 0 0 () () 0 () ())
-1955 'nlinks' '' 1948 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1958 'lapl_id' '' 1948 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1956 'max_corder' '' 1948 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1951 'index_type' '' 1948 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2115 'dset_name' '' 2113 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1957 'hdferr' '' 1948 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1952 'order' '' 1948 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1966 'hdferr' '' 1961 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1962 'loc_id' '' 1961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1964 'size' '' 1961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-1959 'mounted' '' 1948 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (LOGICAL 4 ()) 0 0 () () 0 () ())
-1965 'buffer' '' 1961 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((VARIABLE (INTEGER 8 ()) 0 1964 ()))) 0 0 () () 0 () ())
-1963 'name' '' 1961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1997 'hdferr' '' 1994 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1977 'group_id' '' 1976 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1979 'nlinks' '' 1976 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1978 'storage_type' '' 1976 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1980 'max_corder' '' 1976 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1981 'hdferr' '' 1976 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1971 'idx' '' 1968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1970 'name' '' 1968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1972 'obj_name' '' 1968 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1974 'hdferr' '' 1968 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1973 'obj_type' '' 1968 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1936 'majnum' '' 1935 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1969 'loc_id' '' 1968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1954 'storage_type' '' 1948 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1933 'gapl_id' '' 1925 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1942 'loc_id' '' 1941 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1923 'hdferr' '' 1921 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1944 'size' '' 1941 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-1946 'hdferr' '' 1941 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1945 'buffer' '' 1941 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((VARIABLE (INTEGER 8 ()) 0 1944 ()))) 0 0 () () 0 () ())
-1939 'error' '' 1935 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2083 'current_name' '' 2080 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2082 'link_type' '' 2080 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1938 'relnum' '' 1935 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1943 'name' '' 1941 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2084 'new_name' '' 2080 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1937 'minnum' '' 1935 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2013 'hdferr' '' 2008 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2031 'grp_id' '' 2028 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2012 'dst_name' '' 2008 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2010 'src_name' '' 2008 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2030 'name' '' 2028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2009 'src_loc_id' '' 2008 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2018 'name' '' 2016 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2020 'hdferr' '' 2016 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2032 'hdferr' '' 2028 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2017 'loc_id' '' 2016 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2043 'name' '' 2041 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2042 'loc_id' '' 2041 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2045 'hdferr' '' 2041 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2037 'loc_id' '' 2036 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2026 'hdferr' '' 2022 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2025 'comment' '' 2022 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2024 'name' '' 2022 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2044 'new_name' '' 2041 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2023 'loc_id' '' 2022 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2039 'hdferr' '' 2036 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2131 'errcode' '' 2126 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2061 'obj_id' '' 2060 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2063 'hdferr' '' 2060 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2062 'ref_count' '' 2060 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2057 'name_size' '' 2053 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2054 'obj_id' '' 2053 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2019 'nmembers' '' 2016 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2055 'buf' '' 2053 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2038 'name' '' 2036 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2058 'hdferr' '' 2053 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2029 'loc_id' '' 2028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2011 'dst_loc_id' '' 2008 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2085 'hdferr' '' 2080 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2056 'buf_size' '' 2053 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2078 'hdferr' '' 2075 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2077 'ref_count' '' 2075 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2001 'cur_name' '' 1999 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2002 'link_type' '' 1999 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2005 'hdferr' '' 1999 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2067 'ref_count' '' 2065 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2004 'new_name' '' 1999 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2066 'obj_id' '' 2065 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2068 'hdferr' '' 2065 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2071 'obj_id' '' 2070 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2073 'hdferr' '' 2070 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2127 'loc_id' '' 2126 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2072 'type' '' 2070 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2076 'obj_id' '' 2075 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2033 'gapl_id' '' 2028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2003 'new_loc_id' '' 1999 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2172 'src_name' '' 2170 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2000 'cur_loc_id' '' 1999 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2171 'src_loc_id' '' 2170 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2175 'hdferr' '' 2170 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2177 'lapl_id' '' 2170 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2174 'dest_name' '' 2170 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2220 'target_path' '' 2219 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2223 'hdferr' '' 2219 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2222 'link_name' '' 2219 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2224 'lcpl_id' '' 2219 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2180 'obj_loc_id' '' 2179 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2176 'lcpl_id' '' 2170 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2185 'lcpl_id' '' 2179 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2186 'lapl_id' '' 2179 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2225 'lapl_id' '' 2219 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2199 'name' '' 2197 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2200 'hdferr' '' 2197 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2183 'link_name' '' 2179 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2184 'hdferr' '' 2179 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2198 'loc_id' '' 2197 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2173 'dest_loc_id' '' 2170 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2221 'link_loc_id' '' 2219 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2182 'link_loc_id' '' 2179 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2201 'lapl_id' '' 2197 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2207 'hdferr' '' 2203 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2206 'link_exists' '' 2203 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2208 'lapl_id' '' 2203 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2213 'index_field' '' 2210 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2214 'order' '' 2210 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2212 'group_name' '' 2210 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2217 'lapl_id' '' 2210 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2216 'hdferr' '' 2210 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2211 'loc_id' '' 2210 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2189 'file_name' '' 2188 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2215 'n' '' 2210 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-2205 'name' '' 2203 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2190 'obj_name' '' 2188 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2193 'hdferr' '' 2188 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2195 'lapl_id' '' 2188 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2230 'hdferr' '' 2227 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2229 'valid' '' 2227 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2192 'link_name' '' 2188 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2204 'loc_id' '' 2203 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2194 'lcpl_id' '' 2188 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2267 'link_cls_id' '' 2266 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2090 'width' '' 2087 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2258 'src_name' '' 2256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2257 'src_loc_id' '' 2256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2269 'hdferr' '' 2266 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2259 'dest_loc_id' '' 2256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2268 'registered' '' 2266 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2263 'lapl_id' '' 2256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2245 'link_name' '' 2243 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2246 'cset' '' 2243 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2248 'f_corder_valid' '' 2243 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(LOGICAL 4 ()) 0 0 () () 0 () ())
-2247 'corder' '' 2243 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2251 'val_size' '' 2243 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2262 'lcpl_id' '' 2256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2400 'loc_id' '' 2399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2250 'address' '' 2243 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2252 'hdferr' '' 2243 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2253 'lapl_id' '' 2243 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2244 'link_loc_id' '' 2243 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2249 'link_type' '' 2243 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2165 'loc_id' '' 2164 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2228 'id' '' 2227 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-2191 'link_loc_id' '' 2188 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2181 'obj_name' '' 2179 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2261 'hdferr' '' 2256 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2404 'n' '' 2399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-2403 'order' '' 2399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2406 'f_corder_valid' '' 2399 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(LOGICAL 4 ()) 0 0 () () 0 () ())
-2405 'link_type' '' 2399 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2409 'address' '' 2399 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2408 'cset' '' 2399 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2410 'val_size' '' 2399 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2407 'corder' '' 2399 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2401 'group_name' '' 2399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2260 'dest_name' '' 2256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2412 'lapl_id' '' 2399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2287 'obj_id' '' 2284 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2288 'hdferr' '' 2284 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2279 'obj_id' '' 2276 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2278 'name' '' 2276 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2277 'loc_id' '' 2276 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2285 'loc_id' '' 2284 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2286 'addr' '' 2284 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2280 'hdferr' '' 2276 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2402 'index_field' '' 2399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2294 'hdferr' '' 2290 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2292 'new_loc_id' '' 2290 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2293 'new_link_name' '' 2290 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2296 'lapl_id' '' 2290 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2295 'lcpl_id' '' 2290 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2081 'loc_id' '' 2080 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2274 'error' '' 2273 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2302 'hdferr' '' 2300 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1450 'size' '' 1448 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1451 'hdferr' '' 1448 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2301 'class' '' 2300 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2291 'object_id' '' 2290 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2339 'hdferr' '' 2336 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2337 'prp_id' '' 2336 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2334 'hdferr' '' 2332 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2318 'name' '' 2315 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2313 'hdferr' '' 2309 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2310 'parent' '' 2309 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2319 'hdferr' '' 2315 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2312 'class' '' 2309 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2281 'lapl_id' '' 2276 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2411 'hdferr' '' 2399 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2338 'flag' '' 2336 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2235 'index_field' '' 2232 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2236 'order' '' 2232 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2237 'n' '' 2232 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-2240 'size' '' 2232 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-2238 'name' '' 2232 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2233 'loc_id' '' 2232 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2333 'prp_id' '' 2332 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2241 'lapl_id' '' 2232 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2317 'src_id' '' 2315 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2394 'prp_id' '' 2393 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2311 'name' '' 2309 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2390 'flag' '' 2388 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2389 'plist_id' '' 2388 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2396 'flag' '' 2393 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2397 'hdferr' '' 2393 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2234 'group_name' '' 2232 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2343 'flag' '' 2341 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2344 'hdferr' '' 2341 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2359 'size' '' 2357 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2342 'plist_id' '' 2341 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2358 'plist_id' '' 2357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2391 'hdferr' '' 2388 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2379 'rdcc_w0' '' 2374 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL
-4 ()) 0 0 () () 0 () ())
-2376 'mdc_nelmts' '' 2374 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2377 'rdcc_nelmts' '' 2374 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2360 'hdferr' '' 2357 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2380 'hdferr' '' 2374 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2239 'hdferr' '' 2232 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2375 'prp_id' '' 2374 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2369 'prp_id' '' 2368 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2372 'hdferr' '' 2368 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2370 'name' '' 2368 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2378 'rdcc_nbytes' '' 2374 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2316 'dst_id' '' 2315 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2348 'crt_order_flags' '' 2346 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2371 'value' '' 2368 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2363 'prp_id' '' 2362 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2367 'hdferr' '' 2362 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2364 'left' '' 2362 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2349 'hdferr' '' 2346 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2384 'max_compact' '' 2382 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2365 'middle' '' 2362 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2383 'ocpl_id' '' 2382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2385 'min_dense' '' 2382 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2106 'loc_id' '' 2105 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2395 'name' '' 2393 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2049 'obj_id' '' 2048 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2050 'file_id' '' 2048 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2051 'hdferr' '' 2048 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1899 'hdferr' '' 1896 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2353 'threshold' '' 2351 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1209 'file_space_id' '' 1202 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2328 'plist2_id' '' 2326 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2355 'hdferr' '' 2351 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1724 'dset_id' '' 1723 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2329 'flag' '' 2326 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2354 'alignment' '' 2351 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2330 'hdferr' '' 2326 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3482 'plist_id' '' 3481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2327 'plist1_id' '' 2326 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2386 'hdferr' '' 2382 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2366 'right' '' 2362 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2433 'prp_id' '' 2432 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3484 'hdferr' '' 3481 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2440 'classtype' '' 2438 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2441 'hdferr' '' 2438 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2439 'prp_id' '' 2438 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2436 'hdferr' '' 2432 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2454 'prp_id' '' 2453 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2455 'parent_id' '' 2453 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2456 'hdferr' '' 2453 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2434 'name' '' 2432 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2435 'size' '' 2432 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2420 'prp_id' '' 2419 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2423 'hdferr' '' 2419 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2427 'rdcc_nslots' '' 2425 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2422 'dims' '' 2419 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 2421 ())) 0 () ())
-2421 'ndims' '' 2419 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3483 'encoding' '' 3481 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2347 'ocpl_id' '' 2346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2430 'hdferr' '' 2425 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2429 'rdcc_w0' '' 2425 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL
-4 ()) 0 0 () () 0 () ())
-2324 'hdferr' '' 2321 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2322 'class' '' 2321 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2306 'new_prp_id' '' 2304 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2446 'hdferr' '' 2443 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2305 'prp_id' '' 2304 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2307 'hdferr' '' 2304 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2160 'buf' '' 2154 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2323 'prp_id' '' 2321 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2445 'crt_intermed_group' '' 2443 ((VARIABLE IN UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2426 'dapl_id' '' 2425 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2449 'ocp_plist_id' '' 2448 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2451 'hdferr' '' 2448 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2450 'copy_options' '' 2448 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2460 'driver' '' 2458 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2444 'lcpl_id' '' 2443 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2465 'value' '' 2462 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8
-()) 0 0 () () 0 () ())
-2461 'hdferr' '' 2458 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2464 'name' '' 2462 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2466 'hdferr' '' 2462 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2463 'prp_id' '' 2462 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2531 'hdferr' '' 2527 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2530 'est_name_len' '' 2527 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2167 'pal_name' '' 2164 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2528 'gcpl_id' '' 2527 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2482 'hdferr' '' 2479 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2494 'backing_store' '' 2491 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(LOGICAL 4 ()) 0 0 () () 0 () ())
-2495 'hdferr' '' 2491 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2492 'prp_id' '' 2491 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2493 'increment' '' 2491 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2504 'hdferr' '' 2497 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2502 'offset' '' 2497 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2503 'bytes' '' 2497 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2499 'idx' '' 2497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2500 'name_size' '' 2497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2501 'name' '' 2497 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2513 'memb_map' '' 2511 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-2516 'memb_addr' '' 2511 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0') (
-OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (CONSTANT (
-INTEGER 4 ()) 0 '1'))) 0 () ())
-2514 'memb_fapl' '' 2511 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-2512 'prp_id' '' 2511 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2459 'prp_id' '' 2458 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2481 'count' '' 2479 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2515 'memb_name' '' 2511 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0
-'0') (OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (
-CONSTANT (INTEGER 4 ()) 0 '1'))) 0 () ())
-2498 'prp_id' '' 2497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2519 'maxlen_out' '' 2511 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2522 'prp_id' '' 2521 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2517 'relax' '' 2511 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2523 'memb_size' '' 2521 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2518 'hdferr' '' 2511 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2525 'hdferr' '' 2521 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2117 'dims' '' 2113 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2884 'flag' '' 2882 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2885 'hdferr' '' 2882 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2507 'fapl_id' '' 2506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2509 'hdferr' '' 2506 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2508 'degree' '' 2506 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2488 'cbuf_size' '' 2484 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2485 'fapl_id' '' 2484 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2469 'prp_id' '' 2468 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2487 'block_size' '' 2484 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2486 'alignment' '' 2484 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2543 'prp_id' '' 2542 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2470 'flag' '' 2468 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2471 'hdferr' '' 2468 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2529 'est_num_entries' '' 2527 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2546 'hdferr' '' 2542 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2545 'fillvalue' '' 2542 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2574 'prp_id' '' 2573 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2575 'type_id' '' 2573 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2883 'plist_id' '' 2882 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2489 'hdferr' '' 2484 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2480 'prp_id' '' 2479 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2428 'rdcc_nbytes' '' 2425 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1449 'dataset_id' '' 1448 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1982 'mounted' '' 1976 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (LOGICAL 4 ()) 0 0 () () 0 () ())
-1928 'grp_id' '' 1925 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1545 'mem_type_id' '' 1543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2544 'type_id' '' 2542 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2567 'cd_nelmts' '' 2563 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2570 'name' '' 2563 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2565 'filter_number' '' 2563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2566 'flags' '' 2563 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2568 'cd_values' '' 2563 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2572 'hdferr' '' 2563 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2569 'namelen' '' 2563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2571 'filter_id' '' 2563 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2581 'ik' '' 2579 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2592 'hdferr' '' 2589 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2688 'prp_id' '' 2687 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2591 'crt_order_flags' '' 2589 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2584 'prp_id' '' 2583 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2590 'gcpl_id' '' 2589 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2582 'hdferr' '' 2579 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2690 'hdferr' '' 2687 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2156 'dset_name' '' 2154 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2586 'value' '' 2583 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2587 'hdferr' '' 2583 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2580 'prp_id' '' 2579 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2695 'hdferr' '' 2692 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2559 'prp_id' '' 2558 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2694 'size' '' 2692 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2561 'hdferr' '' 2558 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2554 'namelen' '' 2548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2556 'hdferr' '' 2548 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2553 'cd_values' '' 2548 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2555 'name' '' 2548 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2534 'type_id' '' 2532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2552 'cd_nelmts' '' 2548 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2533 'prp_id' '' 2532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2550 'filter_id' '' 2548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2551 'flags' '' 2548 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2141 'loc_id' '' 2140 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2536 'hdferr' '' 2532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2585 'name' '' 2583 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2689 'layout' '' 2687 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2596 'size_hint' '' 2594 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2595 'gcpl_id' '' 2594 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2549 'prp_id' '' 2548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2535 'fillvalue' '' 2532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 8 ()) 0 0 () () 0 () ())
-2602 'min_dense' '' 2599 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2159 'il' '' 2154 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-2621 'lapl_id' '' 2620 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2684 'size' '' 2682 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2603 'hdferr' '' 2599 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2685 'hdferr' '' 2682 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2600 'gcpl_id' '' 2599 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2683 'plist_id' '' 2682 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2142 'dset_name' '' 2140 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2623 'hdferr' '' 2620 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2618 'hdferr' '' 2615 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2597 'hdferr' '' 2594 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2611 'plist_id' '' 2610 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2680 'hdferr' '' 2677 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2123 'npals' '' 2120 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2673 'plist_id' '' 2672 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2674 'size' '' 2672 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2612 'flag' '' 2610 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2675 'hdferr' '' 2672 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2094 'npals' '' 2087 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2613 'hdferr' '' 2610 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2668 'sizeof_addr' '' 2666 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2632 'name' '' 2630 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2670 'hdferr' '' 2666 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2631 'prp_id' '' 2630 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2669 'sizeof_size' '' 2666 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2679 'flag' '' 2677 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2667 'prp_id' '' 2666 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2107 'dset_name' '' 2105 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2678 'prp_id' '' 2677 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2616 'prp_id' '' 2615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2693 'plist_id' '' 2692 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2560 'gc_reference' '' 2558 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2634 'hdferr' '' 2630 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2625 'prp_id' '' 2624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2626 'name' '' 2624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2622 'nlinks' '' 2620 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2660 'boot' '' 2658 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2661 'freelist' '' 2658 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2659 'prp_id' '' 2658 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2577 'hdferr' '' 2573 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2633 'size' '' 2630 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2524 'memb_plist' '' 2521 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2663 'shhdr' '' 2658 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2664 'hdferr' '' 2658 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2654 'size' '' 2651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2652 'plist' '' 2651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2627 'value' '' 2624 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2143 'buf' '' 2140 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2655 'value' '' 2651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2656 'hdferr' '' 2651 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2698 'name' '' 2696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2705 'size' '' 2702 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2701 'hdferr' '' 2696 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2704 'name' '' 2702 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2703 'plist' '' 2702 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2700 'value' '' 2696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2648 'prp_id' '' 2647 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2697 'plist' '' 2696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2876 'plist' '' 2875 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2707 'hdferr' '' 2702 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2649 'block_size' '' 2647 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2650 'hdferr' '' 2647 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2628 'hdferr' '' 2624 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2617 'nprops' '' 2615 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2601 'max_compact' '' 2599 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2879 'value' '' 2875 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-2644 'lk' '' 2641 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2642 'prp_id' '' 2641 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2880 'hdferr' '' 2875 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2706 'value' '' 2702 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2877 'name' '' 2875 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2645 'hdferr' '' 2641 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2643 'ik' '' 2641 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2751 'class' '' 2750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2144 'errcode' '' 2140 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2710 'prp_id' '' 2709 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2711 'filter' '' 2709 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2715 'hdferr' '' 2709 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2755 'hdferr' '' 2750 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2712 'flags' '' 2709 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2727 'hdferr' '' 2722 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2725 'size' '' 2722 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2726 'value' '' 2722 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-2754 'value' '' 2750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2699 'size' '' 2696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2723 'class' '' 2722 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2724 'name' '' 2722 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2713 'cd_nelmts' '' 2709 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2753 'size' '' 2750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2729 'class' '' 2728 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2730 'name' '' 2728 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2732 'value' '' 2728 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2742 'size' '' 2739 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2733 'hdferr' '' 2728 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2740 'class' '' 2739 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2731 'size' '' 2728 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2741 'name' '' 2739 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2608 'hdferr' '' 2605 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2744 'hdferr' '' 2739 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2606 'prp_id' '' 2605 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2607 'nfilters' '' 2605 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2541 'hdferr' '' 2537 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2538 'prp_id' '' 2537 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2474 'plist_id' '' 2473 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2476 'hdferr' '' 2473 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2719 'pclass' '' 2717 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2718 'plist' '' 2717 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2721 'hdferr' '' 2717 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-605 'obj_id' '' 604 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2743 'value' '' 2739 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-606 'name' '' 604 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-607 'attr_id' '' 604 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2720 'flag' '' 2717 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2475 'expression' '' 2473 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2540 'fillvalue' '' 2537 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () () 0 () ())
-768 'hdferr' '' 765 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-767 'size' '' 765 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-608 'hdferr' '' 604 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-766 'attr_id' '' 765 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2748 'filter' '' 2746 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2749 'hdferr' '' 2746 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2747 'prp_id' '' 2746 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2539 'type_id' '' 2537 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2752 'name' '' 2750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2714 'cd_values' '' 2709 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2878 'size' '' 2875 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2639 'hdferr' '' 2636 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2653 'name' '' 2651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2771 'hdferr' '' 2768 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2662 'stab' '' 2658 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2637 'plist_id' '' 2636 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2765 'crt_order_flags' '' 2763 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2770 'flag' '' 2768 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2764 'ocpl_id' '' 2763 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2874 'hdferr' '' 2870 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2759 'max_compact' '' 2757 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2776 'hdferr' '' 2773 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2774 'plist_id' '' 2773 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2775 'size' '' 2773 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2873 'alignment' '' 2870 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2871 'prp_id' '' 2870 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2758 'ocpl_id' '' 2757 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2779 'prp_id' '' 2778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2783 'hdferr' '' 2778 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2780 'left' '' 2778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2782 'right' '' 2778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2781 'middle' '' 2778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2760 'min_dense' '' 2757 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2766 'hdferr' '' 2763 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2789 'rdcc_nbytes' '' 2785 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2787 'mdc_nelmts' '' 2785 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2786 'prp_id' '' 2785 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2791 'hdferr' '' 2785 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2790 'rdcc_w0' '' 2785 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2761 'hdferr' '' 2757 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2872 'threshold' '' 2870 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2788 'rdcc_nelmts' '' 2785 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2795 'encoding' '' 2793 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2796 'hdferr' '' 2793 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2801 'dims' '' 2798 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 2800 ())) 0 () ())
-2802 'hdferr' '' 2798 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2807 'rdcc_nbytes' '' 2804 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2805 'dapl_id' '' 2804 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2865 'prp_id' '' 2864 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2806 'rdcc_nslots' '' 2804 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2800 'ndims' '' 2798 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2867 'value' '' 2864 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2819 'hdferr' '' 2816 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2817 'plist_id' '' 2816 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2866 'name' '' 2864 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2868 'hdferr' '' 2864 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2799 'prp_id' '' 2798 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2794 'plist_id' '' 2793 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2166 'dset_name' '' 2164 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2824 'hdferr' '' 2821 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2809 'hdferr' '' 2804 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2808 'rdcc_w0' '' 2804 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2822 'lcpl_id' '' 2821 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2829 'hdferr' '' 2825 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2823 'crt_intermed_group' '' 2821 ((VARIABLE IN UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2828 'value' '' 2825 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-2861 'prp_id' '' 2860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2818 'expression' '' 2816 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2862 'level' '' 2860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2849 'prp_id' '' 2848 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2826 'prp_id' '' 2825 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2855 'name' '' 2853 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2856 'offset' '' 2853 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2858 'hdferr' '' 2853 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2854 'prp_id' '' 2853 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2851 'hdferr' '' 2848 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2943 'memb_plist' '' 2940 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2941 'prp_id' '' 2940 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2850 'offset' '' 2848 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2857 'bytes' '' 2853 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2863 'hdferr' '' 2860 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2827 'name' '' 2825 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2638 'size' '' 2636 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2942 'memb_size' '' 2940 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3479 'hdferr' '' 3474 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2896 'memb_map' '' 2894 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-2895 'prp_id' '' 2894 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3477 'block_size' '' 3474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3475 'fapl_id' '' 3474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3478 'cbuf_size' '' 3474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2898 'memb_name' '' 2894 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0
-'0') (OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (
-CONSTANT (INTEGER 4 ()) 0 '1'))) 0 () ())
-2901 'hdferr' '' 2894 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2892 'prp_id' '' 2891 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2889 'hdferr' '' 2886 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2888 'relax' '' 2886 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2893 'hdferr' '' 2891 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2843 'prp_id' '' 2842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2846 'hdferr' '' 2842 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2844 'increment' '' 2842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2900 'relax' '' 2894 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2845 'backing_store' '' 2842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2887 'prp_id' '' 2886 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2899 'memb_addr' '' 2894 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0') (
-OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (CONSTANT (
-INTEGER 4 ()) 0 '1'))) 0 () ())
-2906 'meta_plist' '' 2903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2905 'meta_ext' '' 2903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2904 'prp_id' '' 2903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2907 'raw_ext' '' 2903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2923 'hdferr' '' 2921 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2908 'raw_plist' '' 2903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2814 'hdferr' '' 2811 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2838 'prp_id' '' 2837 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2922 'prp_id' '' 2921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2909 'hdferr' '' 2903 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2812 'ocp_plist_id' '' 2811 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2839 'flag' '' 2837 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2938 'hdferr' '' 2934 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2840 'hdferr' '' 2837 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2937 'fillvalue' '' 2934 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () () 0 () ())
-2913 'flag' '' 2911 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2936 'type_id' '' 2934 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2912 'plist_id' '' 2911 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2832 'gcpl_id' '' 2831 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2935 'prp_id' '' 2934 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2914 'hdferr' '' 2911 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2833 'est_num_entries' '' 2831 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2930 'prp_id' '' 2929 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2931 'type_id' '' 2929 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2932 'fillvalue' '' 2929 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2835 'hdferr' '' 2831 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2352 'prp_id' '' 2351 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2928 'hdferr' '' 2924 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2927 'fillvalue' '' 2924 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 8 ()) 0 0 () () 0 () ())
-2926 'type_id' '' 2924 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2925 'prp_id' '' 2924 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2769 'plist_id' '' 2768 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2949 'flags' '' 2946 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2947 'prp_id' '' 2946 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2951 'cd_values' '' 2946 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2897 'memb_fapl' '' 2894 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-2834 'est_name_len' '' 2831 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2956 'hdferr' '' 2954 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2955 'prp_id' '' 2954 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2952 'hdferr' '' 2946 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3143 'gc_reference' '' 3141 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3144 'hdferr' '' 3141 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2950 'cd_nelmts' '' 2946 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2959 'type_id' '' 2957 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2918 'degree' '' 2916 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2960 'fillvalue' '' 2957 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 4 ()) 0 0 () () 0 () ())
-2919 'hdferr' '' 2916 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2961 'hdferr' '' 2957 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2917 'fapl_id' '' 2916 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2980 'ik' '' 2978 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-2736 'plid' '' 2735 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2737 'name' '' 2735 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2738 'hdferr' '' 2735 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3137 'low' '' 3135 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3136 'fapl_id' '' 3135 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2992 'hdferr' '' 2989 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2991 'crt_order_flags' '' 2989 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2981 'hdferr' '' 2978 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2990 'gcpl_id' '' 2989 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3139 'hdferr' '' 3135 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3138 'high' '' 3135 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2979 'prp_id' '' 2978 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2958 'prp_id' '' 2957 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2813 'copy_options' '' 2811 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3476 'alignment' '' 3474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2944 'hdferr' '' 2940 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2477 'size' '' 2473 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-2564 'prp_id' '' 2563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3142 'prp_id' '' 3141 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2576 'fillvalue' '' 2573 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 4 ()) 0 0 () () 0 () ())
-3068 'gcpl_id' '' 3067 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3069 'size_hint' '' 3067 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2986 'min_dense' '' 2983 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2984 'gcpl_id' '' 2983 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2987 'hdferr' '' 2983 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2975 'layout' '' 2973 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2976 'hdferr' '' 2973 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3000 'nlinks' '' 2998 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2999 'lapl_id' '' 2998 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3001 'hdferr' '' 2998 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3025 'plist_id' '' 3024 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3026 'flag' '' 3024 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-2995 'plist_id' '' 2994 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3006 'hdferr' '' 3003 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2963 'prp_id' '' 2962 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2996 'hdferr' '' 2994 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3019 'prp_id' '' 3018 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2965 'value' '' 2962 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3004 'plist_id' '' 3003 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3020 'name' '' 3018 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3005 'size' '' 3003 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3022 'hdferr' '' 3018 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2974 'prp_id' '' 2973 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3039 'fcpl_id' '' 3038 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3040 'index_num' '' 3038 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3042 'min_mesg_size' '' 3038 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3041 'mesg_type_flags' '' 3038 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3043 'hdferr' '' 3038 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2966 'hdferr' '' 2962 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3021 'value' '' 3018 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-3049 'hdferr' '' 3045 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3046 'prp_id' '' 3045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3047 'sizeof_addr' '' 3045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3048 'sizeof_size' '' 3045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3053 'size' '' 3051 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3052 'plist_id' '' 3051 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3014 'plist_id' '' 3013 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3017 'hdferr' '' 3013 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3016 'scale_factor' '' 3013 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2157 'width' '' 2154 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2964 'name' '' 2962 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3054 'hdferr' '' 3051 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3096 'prp_id' '' 3095 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3097 'options_mask' '' 3095 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3027 'hdferr' '' 3024 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3015 'scale_type' '' 3013 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2948 'filter' '' 2946 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3065 'hdferr' '' 3061 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3063 'ik' '' 3061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-3064 'lk' '' 3061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-3062 'prp_id' '' 3061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3059 'hdferr' '' 3056 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3057 'plist_id' '' 3056 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3030 'prp_id' '' 3029 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3031 'hdferr' '' 3029 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3098 'pixels_per_block' '' 3095 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3099 'hdferr' '' 3095 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3075 'hdferr' '' 3072 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3074 'size' '' 3072 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3073 'prp_id' '' 3072 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3087 'hdferr' '' 3084 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3080 'name' '' 3078 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3085 'class' '' 3084 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3086 'name' '' 3084 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3090 'name' '' 3088 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3082 'hdferr' '' 3078 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3093 'hdferr' '' 3088 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3089 'loc_id' '' 3088 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3091 'space_id' '' 3088 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3112 'dset_id' '' 3111 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3115 'hdferr' '' 3111 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3113 'ref' '' 3111 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3647 ()) 0 0 () () 0 () ())
-3092 'ref' '' 3088 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3637 ()) 0 0 () () 0 () ())
-3132 'size' '' 3127 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-3102 'ref' '' 3100 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3647 ()) 0 0 () () 0 () ())
-3103 'name' '' 3100 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3104 'hdferr' '' 3100 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3131 'hdferr' '' 3127 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3128 'loc_id' '' 3127 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3129 'ref' '' 3127 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3637 ()) 0 0 () () 0 () ())
-3108 'ref' '' 3106 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3637 ()) 0 0 () () 0 () ())
-3130 'name' '' 3127 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3110 'hdferr' '' 3106 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3105 'size' '' 3100 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-3109 'obj_id' '' 3106 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3118 'ref' '' 3116 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3647 ()) 0 0 () () 0 () ())
-3119 'obj_type' '' 3116 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3034 'plist_id' '' 3033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3035 'nindexes' '' 3033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3036 'hdferr' '' 3033 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3117 'dset_id' '' 3116 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3081 'ref' '' 3078 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3647 ()) 0 0 () () 0 () ())
-3114 'obj_id' '' 3111 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3126 'hdferr' '' 3122 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3124 'ref' '' 3122 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3637 ()) 0 0 () () 0 () ())
-3123 'dset_id' '' 3122 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3125 'space_id' '' 3122 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3058 'size' '' 3056 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3148 'new_space_id' '' 3146 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3147 'space_id' '' 3146 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2985 'max_compact' '' 2983 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3120 'hdferr' '' 3116 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1176 'dset_id' '' 1175 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2155 'loc_id' '' 2154 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2933 'hdferr' '' 2929 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3107 'dset_id' '' 3106 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3101 'loc_id' '' 3100 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3180 'dest_space_id' '' 3179 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3181 'source_space_id' '' 3179 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3182 'hdferr' '' 3179 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3159 'hdferr' '' 3155 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3235 'obj_id' '' 3234 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3160 'maxdims' '' 3155 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-OPTIONAL DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ())
-0 '1') (VARIABLE (INTEGER 4 ()) 0 3156 ())) 0 () ())
-3156 'rank' '' 3155 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3157 'dims' '' 3155 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 3156 ())) 0 () ())
-3237 'nalloc' '' 3234 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3168 'space_id' '' 3167 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3169 'start' '' 3167 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3238 'hdferr' '' 3234 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3158 'space_id' '' 3155 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3170 'end' '' 3167 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3236 'buf' '' 3234 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3176 'equal' '' 3173 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3174 'space1_id' '' 3173 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3175 'space2_id' '' 3173 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3171 'hdferr' '' 3167 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3241 'classtype' '' 3240 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3164 'obj_id' '' 3162 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3165 'hdferr' '' 3162 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3163 'buf' '' 3162 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-3203 'startpoint' '' 3201 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3242 'space_id' '' 3240 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3079 'loc_id' '' 3078 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3204 'num_points' '' 3201 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3206 'hdferr' '' 3201 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3190 'space_id' '' 3189 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3202 'space_id' '' 3201 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3205 'buf' '' 3201 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3216 'type' '' 3214 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3217 'hdferr' '' 3214 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3247 'status' '' 3245 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3246 'space_id' '' 3245 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3232 'hdferr' '' 3229 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3230 'space_id' '' 3229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3215 'space_id' '' 3214 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3248 'hdferr' '' 3245 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3192 'hdferr' '' 3189 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3191 'num_blocks' '' 3189 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3231 'rank' '' 3229 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3256 'space_id' '' 3255 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3257 'classtype' '' 3255 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3258 'hdferr' '' 3255 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3227 'hdferr' '' 3224 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3225 'space_id' '' 3224 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3226 'npoints' '' 3224 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3209 'space_id' '' 3208 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3211 'maxdims' '' 3208 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-3253 'hdferr' '' 3250 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3251 'space_id' '' 3250 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3281 'rank' '' 3278 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3279 'space_id' '' 3278 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3252 'offset' '' 3250 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3261 'space_id' '' 3260 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3282 'num_elements' '' 3278 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3280 'operator' '' 3278 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3301 'hdferr' '' 3299 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3212 'hdferr' '' 3208 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3283 'coord' '' 3278 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 3281 ()) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 3282 ())) 0 () ())
-3300 'space_id' '' 3299 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3287 'space_id' '' 3286 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3289 'current_size' '' 3286 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1')
-(VARIABLE (INTEGER 4 ()) 0 3288 ())) 0 () ())
-3291 'hdferr' '' 3286 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3297 'hdferr' '' 3295 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3262 'hdferr' '' 3260 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3290 'maximum_size' '' 3286 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1')
-(VARIABLE (INTEGER 4 ()) 0 3288 ())) 0 () ())
-3267 'hdferr' '' 3264 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3296 'space_id' '' 3295 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3288 'rank' '' 3286 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3284 'hdferr' '' 3278 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3265 'space_id' '' 3264 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3210 'dims' '' 3208 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3271 'operator' '' 3269 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3270 'space_id' '' 3269 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3273 'count' '' 3269 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3177 'hdferr' '' 3173 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3276 'block' '' 3269 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-OPTIONAL DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (
-INTEGER 4 ()) 0 '1') ()) 0 () ())
-3243 'hdferr' '' 3240 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3272 'start' '' 3269 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3186 'npoints' '' 3184 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3187 'hdferr' '' 3184 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3274 'hdferr' '' 3269 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3275 'stride' '' 3269 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-OPTIONAL DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (
-INTEGER 4 ()) 0 '1') ()) 0 () ())
-3266 'status' '' 3264 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3070 'hdferr' '' 3067 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3195 'space_id' '' 3194 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3196 'startblock' '' 3194 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3197 'num_blocks' '' 3194 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3185 'space_id' '' 3184 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3199 'hdferr' '' 3194 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3222 'hdferr' '' 3219 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3198 'buf' '' 3194 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3305 'hdferr' '' 3303 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3304 'type_id' '' 3303 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3153 'hdferr' '' 3151 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3221 'num_points' '' 3219 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3342 'committed' '' 3340 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3318 'hdferr' '' 3314 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3316 'name' '' 3314 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3324 'src_id' '' 3323 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3321 'tapl_id' '' 3314 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3320 'tcpl_id' '' 3314 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3343 'hdferr' '' 3340 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3341 'dtype_id' '' 3340 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3319 'lcpl_id' '' 3314 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3317 'type_id' '' 3314 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3326 'flag' '' 3323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-3325 'dst_id' '' 3323 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3152 'space_id' '' 3151 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3308 'loc_id' '' 3307 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3309 'dtype_id' '' 3307 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3311 'tcpl_id' '' 3307 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3312 'tapl_id' '' 3307 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3310 'hdferr' '' 3307 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3315 'loc_id' '' 3314 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3327 'hdferr' '' 3323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3403 'obj_id' '' 3402 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3406 'hdferr' '' 3402 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3383 'parent_id' '' 3382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3384 'new_type_id' '' 3382 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3405 'nalloc' '' 3402 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3378 'name' '' 3376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3385 'hdferr' '' 3382 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3377 'type_id' '' 3376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3380 'hdferr' '' 3376 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3379 'value' '' 3376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3470 'buf' '' 3469 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-3220 'space_id' '' 3219 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3353 'type_id' '' 3352 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3471 'obj_id' '' 3469 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3357 'hdferr' '' 3352 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3404 'buf' '' 3402 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3331 'size' '' 3329 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3362 'flag' '' 3359 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-3330 'class' '' 3329 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3361 'type2_id' '' 3359 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3360 'type1_id' '' 3359 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3363 'hdferr' '' 3359 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3356 'name' '' 3352 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3354 'value' '' 3352 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3333 'hdferr' '' 3329 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3368 'hdferr' '' 3365 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3367 'dims' '' 3365 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3395 'hdferr' '' 3392 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3394 'class' '' 3392 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3393 'type_id' '' 3392 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3366 'type_id' '' 3365 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3409 'type_id' '' 3408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3411 'hdferr' '' 3408 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3410 'ebias' '' 3408 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3372 'name' '' 3370 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3373 'value' '' 3370 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3371 'type_id' '' 3370 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3465 'type_id' '' 3464 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3467 'hdferr' '' 3464 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3466 'cset' '' 3464 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3460 'type_id' '' 3459 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3374 'hdferr' '' 3370 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3332 'type_id' '' 3329 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3414 'type_id' '' 3413 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3419 'msize' '' 3413 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3416 'epos' '' 3413 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3417 'esize' '' 3413 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3420 'hdferr' '' 3413 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3415 'spos' '' 3413 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3425 'class' '' 3422 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3423 'type_id' '' 3422 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3462 'hdferr' '' 3459 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3424 'member_no' '' 3422 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3390 'hdferr' '' 3387 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3461 'padtype' '' 3459 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3389 'dtpl_id' '' 3387 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3388 'dtype_id' '' 3387 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3435 'type_id' '' 3434 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3438 'namelen' '' 3434 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3439 'hdferr' '' 3434 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3457 'hdferr' '' 3453 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3456 'index' '' 3453 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3437 'member_name' '' 3434 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3426 'hdferr' '' 3422 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3418 'mpos' '' 3413 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3454 'type_id' '' 3453 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3444 'datatype' '' 3441 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3449 'member_no' '' 3447 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3448 'type_id' '' 3447 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3450 'value' '' 3447 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3442 'type_id' '' 3441 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3455 'name' '' 3453 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3451 'hdferr' '' 3447 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3431 'offset' '' 3428 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3432 'hdferr' '' 3428 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3399 'ndims' '' 3397 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3429 'type_id' '' 3428 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3400 'hdferr' '' 3397 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3488 'num_members' '' 3486 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3430 'member_no' '' 3428 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3489 'hdferr' '' 3486 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3445 'hdferr' '' 3441 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3443 'field_idx' '' 3441 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3436 'index' '' 3434 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3487 'type_id' '' 3486 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3508 'lsbpad' '' 3506 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3507 'type_id' '' 3506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3497 'type_id' '' 3496 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3510 'hdferr' '' 3506 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3492 'type_id' '' 3491 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3498 'order' '' 3496 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3493 'norm' '' 3491 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3494 'hdferr' '' 3491 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3509 'msbpad' '' 3506 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3518 'type_id' '' 3517 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3520 'hdferr' '' 3517 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3519 'size' '' 3517 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3675 'direction' '' 3673 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3677 'hdferr' '' 3673 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3547 'precision' '' 3545 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3504 'hdferr' '' 3501 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3546 'type_id' '' 3545 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3548 'hdferr' '' 3545 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3676 'native_dtype_id' '' 3673 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3540 'type_id' '' 3539 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3542 'taglen' '' 3539 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3541 'tag' '' 3539 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3543 'hdferr' '' 3539 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3674 'dtype_id' '' 3673 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3499 'hdferr' '' 3496 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3524 'base_type_id' '' 3522 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3525 'hdferr' '' 3522 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3523 'type_id' '' 3522 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3560 'loc_id' '' 3559 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3552 'hdferr' '' 3550 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3561 'name' '' 3559 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3562 'type_id' '' 3559 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3537 'hdferr' '' 3532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3533 'type_id' '' 3532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3502 'type_id' '' 3501 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3503 'offset' '' 3501 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3534 'name' '' 3532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3535 'offset' '' 3532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3536 'field_id' '' 3532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3528 'type_id' '' 3527 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3529 'strpad' '' 3527 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3601 'type_id' '' 3600 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3603 'hdferr' '' 3600 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3564 'tapl_id' '' 3559 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3568 'ebias' '' 3566 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3602 'status' '' 3600 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3567 'type_id' '' 3566 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3569 'hdferr' '' 3566 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3593 'spos' '' 3591 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3595 'esize' '' 3591 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3592 'type_id' '' 3591 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3555 'type_id' '' 3554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3598 'hdferr' '' 3591 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3513 'type_id' '' 3512 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3556 'cset' '' 3554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3557 'hdferr' '' 3554 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3596 'mpos' '' 3591 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3551 'type_id' '' 3550 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3398 'type_id' '' 3397 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3597 'msize' '' 3591 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3594 'epos' '' 3591 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3514 'sign' '' 3512 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3348 'dims' '' 3345 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3350 'hdferr' '' 3345 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3577 'type_id' '' 3576 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3578 'norm' '' 3576 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3349 'type_id' '' 3345 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3346 'base_id' '' 3345 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3347 'rank' '' 3345 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3588 'offset' '' 3586 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3337 'new_type_id' '' 3335 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3530 'hdferr' '' 3527 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3579 'hdferr' '' 3576 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3587 'type_id' '' 3586 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3608 'hdferr' '' 3605 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3338 'hdferr' '' 3335 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3606 'type_id' '' 3605 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3607 'precision' '' 3605 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3582 'type_id' '' 3581 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3662 'lsbpad' '' 3660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3663 'msbpad' '' 3660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3583 'order' '' 3581 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3617 'size' '' 3615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3661 'type_id' '' 3660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3664 'hdferr' '' 3660 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3611 'type_id' '' 3610 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3616 'type_id' '' 3615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3618 'hdferr' '' 3615 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3656 'type_id' '' 3655 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3657 'sign' '' 3655 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3658 'hdferr' '' 3655 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3612 'strpad' '' 3610 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3627 'type_id' '' 3626 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3624 'hdferr' '' 3621 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3629 'hdferr' '' 3626 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3622 'type_id' '' 3621 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3628 'tag' '' 3626 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-3651 'filter' '' 3650 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3336 'type_id' '' 3335 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3632 'filter' '' 3631 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3634 'hdferr' '' 3631 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3623 'vltype_id' '' 3621 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3644 'hdferr' '' 3642 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3633 'status' '' 3631 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3643 'filter' '' 3642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3653 'hdferr' '' 3650 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3574 'hdferr' '' 3571 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3573 'padtype' '' 3571 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3584 'hdferr' '' 3581 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3613 'hdferr' '' 3610 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3010 'flag' '' 3008 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-3572 'type_id' '' 3571 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3011 'hdferr' '' 3008 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3009 'prp_id' '' 3008 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2970 'size' '' 2968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3589 'hdferr' '' 3586 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2969 'plist_id' '' 2968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3355 'namelen' '' 3352 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2114 'loc_id' '' 2113 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3149 'hdferr' '' 3146 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3563 'hdferr' '' 3559 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2102 'buf' '' 2098 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2103 'errcode' '' 2098 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2971 'hdferr' '' 2968 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2099 'loc_id' '' 2098 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2110 'loc_id' '' 2109 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2111 'dset_name' '' 2109 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3652 'config_flags' '' 3650 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3515 'hdferr' '' 3512 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3472 'hdferr' '' 3469 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1621 'mem_space_id' '' 1615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-)
-
-('h5awrite_char_scalar' 0 49 'h5awrite_char_2' 0 47 'h5aread_real_5' 0 4
-'h5_iter_inc_f' 0 380 'fortran_real_8' 0 452 'fortran_real_16' 0 449
-'fortran_real_12' 0 447 'fortran_integer_8' 0 446 'fortran_integer_1' 0
-444 'floating_types' 0 195 '__convert_i4_i8' 0 438 'fortran_integer' 0
-441 'floating_types_len' 0 440 'fortran_double' 0 439 'fortran_integer_4'
-0 443 'fortran_integer_2' 0 442 'fortran_real' 0 445 'fortran_real_4' 0
-448 'h5_index_n_f' 0 382 'h5_index_crt_order_f' 0 383 'h5_dble_interface'
-0 450 'h5_iter_dec_f' 0 379 'h5_index_unknown_f' 0 385 'h5_index_name_f'
-0 384 'h5_integer_kind' 0 451 'h5acreate_f' 0 787 'h5_szip_ec_om_f' 0
-199 'h5_iter_native_f' 0 378 'h5_iter_n_f' 0 377 'h5_real_kind' 0 453
-'h5_iter_unknown_f' 0 381 'h5_szip_nn_om_f' 0 198 'h5a' 0 470 'h5aclose_f'
-0 466 'h5acreate_by_name_f' 0 454 'h5aread_real_2' 0 7
-'h5aget_storage_size_f' 0 764 'h5aget_info_f' 0 562 'h5aexists_by_name_f'
-0 527 'h5adelete_by_name_f' 0 485 'h5adelete_by_idx_f' 0 471 'h5adelete_f'
-0 480 'h5aget_create_plist_f' 0 522 'h5aexists_f' 0 492
-'h5aget_info_by_name_f' 0 511 'h5aget_info_by_idx_f' 0 498 'h5aget_name_f'
-0 556 'h5aget_name_by_idx_f' 0 535 'h5aget_num_attrs_f' 0 551
-'h5aget_space_f' 0 546 'h5aread_char_7' 0 10 'h5aopen_by_idx_f' 0 639
-'h5aget_type_f' 0 570 'h5aread_char_3' 0 14 'h5aopen_idx_f' 0 609
-'h5aopen_by_name_f' 0 582 'h5aopen_f' 0 575 'h5aopen_name_f' 0 603
-'h5aread_char_1' 0 16 'h5aread_char_2' 0 15 'h5aread_char_6' 0 11
-'h5aread_char_5' 0 12 'h5aread_char_4' 0 13 'h5aread_integer_scalar' 0
-25 'h5aread_integer_3' 0 22 'h5aread_integer_2' 0 23 'h5aread_double_5'
-0 28 'h5aread_double_4' 0 29 'h5aread_double_2' 0 31 'h5aread_double_1'
-0 32 'h5aread_char_scalar' 0 17 'h5aread_double_3' 0 30 'h5aread_double_6'
-0 27 'h5aread_double_scalar' 0 33 'h5aread_double_7' 0 26
-'h5aread_integer_1' 0 24 'h5aread_integer_5' 0 20 'h5aread_integer_4' 0
-21 'h5aread_integer_7' 0 18 'h5aread_integer_6' 0 19 'h5aread_real_1' 0
-8 'h5aread_real_3' 0 6 'h5aread_real_4' 0 5 'h5aread_real_6' 0 3
-'h5arename_by_name_f' 0 821 'h5aread_real_scalar' 0 9 'h5aread_real_7' 0
-2 'h5awrite_char_1' 0 48 'h5arename_f' 0 809 'h5awrite_char_5' 0 44
-'h5awrite_char_4' 0 45 'h5awrite_char_3' 0 46 'h5awrite_char_7' 0 42
-'h5awrite_char_6' 0 43 'h5f_close_weak_f' 0 395
-'h5d_chunk_cache_nbytes_dflt_f' 0 344 'h5awrite_double_7' 0 58
-'h5awrite_double_6' 0 59 'h5awrite_double_1' 0 64 'h5awrite_double_3' 0
-62 'h5awrite_double_2' 0 63 'h5awrite_double_5' 0 60 'h5awrite_double_4'
-0 61 'h5awrite_integer_7' 0 50 'h5awrite_integer_2' 0 55
-'h5awrite_double_scalar' 0 65 'h5awrite_integer_1' 0 56
-'h5awrite_integer_5' 0 52 'h5awrite_integer_3' 0 54 'h5awrite_integer_4'
-0 53 'h5awrite_integer_6' 0 51 'h5awrite_real_1' 0 40
-'h5awrite_integer_scalar' 0 57 'h5d_alloc_time_early_f' 0 359
-'h5d_alloc_time_default_f' 0 360 'h5close_f' 0 1010 'h5awrite_real_3' 0
-38 'h5awrite_real_2' 0 39 'h5awrite_real_5' 0 36 'h5awrite_real_4' 0 37
-'h5awrite_real_scalar' 0 41 'h5awrite_real_7' 0 34 'h5awrite_real_6' 0
-35 'h5check_version_f' 0 985 'h5d' 0 1009 'h5d_alloc_time_incr_f' 0 357
-'h5d_alloc_time_error_f' 0 361 'h5d_alloc_time_late_f' 0 358
-'h5dread_vl_integer' 0 107 'h5dclose_f' 0 1418 'h5d_flags_len' 0 1031
-'h5d_fill_time_alloc_f' 0 351 'h5d_contiguous_f' 0 363 'h5d_compact_f' 0
-364 'h5d_chunk_cache_w0_dflt_f' 0 343 'h5d_chunk_cache_nslots_dflt_f' 0
-345 'h5d_chunked_f' 0 362 'h5d_fill_value_error_f' 0 349
-'h5d_fill_time_error_f' 0 352 'h5d_fill_value_default_f' 0 347
-'h5d_fill_time_never_f' 0 350 'h5d_fill_value_undefined_f' 0 348
-'h5d_flags' 0 190 'h5d_fill_value_user_defined_f' 0 346
-'h5d_space_sts_error_f' 0 356 'h5d_space_sts_allocated_f' 0 353
-'h5d_space_sts_not_allocated_f' 0 355 'h5d_space_sts_part_allocated_f' 0
-354 'h5dread_integer_7' 0 87 'h5dread_char_3' 0 83 'h5dget_space_f' 0
-1125 'h5dcreate_f' 0 1071 'h5dcreate_anon_f' 0 1032 'h5dfill_char' 0 67
-'h5dfill_double' 0 70 'h5dget_create_plist_f' 0 1061 'h5dfill_integer' 0
-69 'h5dget_access_plist_f' 0 1051 'h5dfill_real' 0 68
-'h5dget_storage_size_f' 0 1120 'h5dget_space_status_f' 0 1082 'h5dopen_f'
-0 1113 'h5dont_atexit_f' 0 1092 'h5dget_type_f' 0 1087 'h5dread_char_1'
-0 85 'h5dread_char_2' 0 84 'h5dread_double_2' 0 102 'h5dread_char_scalar'
-0 86 'h5dread_char_4' 0 82 'h5dread_char_7' 0 79 'h5dread_char_5' 0 81
-'h5dread_char_6' 0 80 'h5dread_double_1' 0 103 'h5dread_double_3' 0 101
-'h5dread_double_4' 0 100 'h5dread_double_6' 0 98 'h5dread_double_5' 0 99
-'h5dread_double_scalar' 0 104 'h5dread_double_7' 0 97 'h5dread_integer_1'
-0 93 'h5dread_integer_4' 0 90 'h5dread_integer_2' 0 92 'h5dread_integer_3'
-0 91 'h5dread_integer_5' 0 89 'h5dread_integer_6' 0 88
-'h5dread_integer_scalar' 0 94 'h5dread_real_4' 0 74 'h5dread_real_1' 0
-77 'h5dread_real_2' 0 76 'h5dread_real_3' 0 75 'h5dread_real_5' 0 73
-'h5dread_reference_dsetreg' 0 95 'h5dread_real_7' 0 71 'h5dread_real_6'
-0 72 'h5dread_real_scalar' 0 78 'h5dread_reference_obj' 0 96
-'h5dwrite_double_5' 0 139 'h5dwrite_char_7' 0 119 'h5dwrite_char_5' 0
-121 'h5dread_vl_real' 0 106 'h5dwrite_char_2' 0 124 'h5dset_extent_f' 0
-66 'h5dread_vl_string' 0 105 'h5dwrite_char_1' 0 125
-'h5dvlen_get_max_len_f' 0 1432 'h5dwrite_char_4' 0 122 'h5dwrite_char_3'
-0 123 'h5dwrite_char_6' 0 120 'h5dwrite_double_2' 0 142
-'h5dwrite_char_scalar' 0 126 'h5dwrite_double_1' 0 143 'h5dwrite_double_3'
-0 141 'h5dwrite_double_4' 0 140 'h5eprint_f' 0 1800 'h5dwrite_real_4' 0
-114 'h5dwrite_integer_5' 0 129 'h5dwrite_double_7' 0 137
-'h5dwrite_double_6' 0 138 'h5dwrite_integer_2' 0 132 'h5dwrite_integer_1'
-0 133 'h5dwrite_double_scalar' 0 144 'h5dwrite_integer_4' 0 130
-'h5dwrite_integer_3' 0 131 'h5dwrite_real_1' 0 117
-'h5dwrite_integer_scalar' 0 134 'h5dwrite_integer_7' 0 127
-'h5dwrite_integer_6' 0 128 'h5dwrite_real_2' 0 116 'h5dwrite_real_3' 0
-115 'h5dwrite_reference_dsetreg' 0 135 'h5dwrite_real_6' 0 112
-'h5dwrite_real_5' 0 113 'h5dwrite_real_scalar' 0 118 'h5dwrite_real_7' 0
-111 'h5dwrite_reference_obj' 0 136 'h5e' 0 1794 'h5dwrite_vl_integer' 0
-110 'h5dwrite_vl_real' 0 109 'h5dwrite_vl_string' 0 108 'h5eget_minor_f'
-0 1789 'h5eclear_f' 0 1786 'h5eget_major_f' 0 1780 'h5f_acc_rdonly_f' 0
-402 'h5f_acc_debug_f' 0 399 'h5f' 0 1799 'h5eset_auto_f' 0 1795
-'h5f_acc_excl_f' 0 400 'h5f_acc_rdwr_f' 0 403 'h5f_close_default_f' 0
-396 'h5f_acc_trunc_f' 0 401 'h5f_close_strong_f' 0 393 'h5f_close_semi_f'
-0 394 'h5tget_native_type_f' 0 3672 'h5pget_char_encoding_f' 0 3480
-'h5fget_access_plist_f' 0 2413 'h5fd_hid_flags' 0 187 'h5fclose_f' 0
-1833 'h5f_flags_len' 0 1823 'h5f_flags' 0 193 'h5f_obj_group_f' 0 390
-'h5f_obj_all_f' 0 388 'h5f_libver_earliest_f' 0 387 'h5f_libver_latest_f'
-0 386 'h5f_obj_file_f' 0 392 'h5f_obj_datatype_f' 0 389
-'h5f_obj_dataset_f' 0 391 'h5f_scope_global_f' 0 397 'h5f_scope_local_f'
-0 398 'h5fd_family_f' 0 330 'h5fcreate_f' 0 1824 'h5fd_core_f' 0 331
-'h5fd_flags' 0 186 'h5fd_flags_len' 0 1832 'h5fd_mem_btree_f' 0 337
-'h5fd_log_f' 0 329 'h5fd_hid_flags_len' 0 1837 'h5fd_mpio_f' 0 328
-'h5fd_mem_nolist_f' 0 340 'h5fd_mem_gheap_f' 0 335 'h5fd_mem_default_f'
-0 339 'h5fd_mem_draw_f' 0 336 'h5fd_mem_lheap_f' 0 334 'h5fd_mem_ntypes_f'
-0 332 'h5fd_mem_super_f' 0 338 'h5fd_mem_ohdr_f' 0 333
-'h5fd_mpio_collective_f' 0 341 'h5fd_multi_f' 0 327
-'h5fd_mpio_independent_f' 0 342 'h5fflush_f' 0 1838 'h5fd_stdio_f' 0 325
-'h5fd_sec2_f' 0 326 'h5lget_info_by_idx_f' 0 2398 'h5iis_valid_f' 0 2226
-'h5g_group_f' 0 375 'h5fopen_f' 0 1903 'h5fget_obj_count_f' 0 1884
-'h5fget_create_plist_f' 0 1859 'h5fget_filesize_f' 0 1854
-'h5fget_freespace_f' 0 1849 'h5fget_name_f' 0 1843 'h5fget_obj_ids_f' 0
-1876 'h5fmount_f' 0 1869 'h5fis_hdf5_f' 0 1864 'h5g' 0 1902
-'h5fortran_types' 0 1900 'h5freopen_f' 0 1895 'h5funmount_f' 0 1890
-'h5g_dataset_f' 0 374 'h5g_flags' 0 188 'h5g_flags_len' 0 1901
-'h5g_link_soft_f' 0 369 'h5g_link_error_f' 0 371 'h5g_link_hard_f' 0 370
-'h5g_link_f' 0 372 'h5glink_f' 0 2079 'h5g_unknown_f' 0 376
-'h5g_storage_type_compact_f' 0 366 'h5g_storage_type_dense_f' 0 365
-'h5g_storage_type_symbol_table_f' 0 367 'h5g_storage_type_unknown_f' 0
-368 'h5g_type_f' 0 373 'h5generic_flags_len' 0 2006 'h5gcreate_f' 0 1924
-'h5gclose_f' 0 1920 'h5garbage_collect_f' 0 1910 'h5gcreate_anon_f' 0
-1913 'h5generic_flags' 0 185 'h5glink2_f' 0 1998 'h5gget_create_plist_f'
-0 1993 'h5gget_comment_f' 0 1940 'h5get_libversion_f' 0 1934
-'h5gget_info_by_name_f' 0 1983 'h5gget_info_by_idx_f' 0 1947
-'h5gget_info_f' 0 1975 'h5gget_obj_info_idx_f' 0 1967 'h5gget_linkval_f'
-0 1960 'h5i_group_f' 0 323 'h5i_file_f' 0 324 'h5i_badid_f' 0 318
-'h5gmove_f' 0 2040 'h5global' 0 2014 'h5gmove2_f' 0 2007 'h5gunlink_f' 0
-2035 'h5gopen_f' 0 2027 'h5gn_members_f' 0 2015 'h5gset_comment_f' 0
-2021 'h5i' 0 2034 'h5i_attr_f' 0 319 'h5i_dataspace_f' 0 321
-'h5i_dataset_f' 0 320 'h5i_datatype_f' 0 322 'h5i_flags_len' 0 2046
-'h5i_flags' 0 182 'h5idec_ref_f' 0 2074 'h5iget_type_f' 0 2069
-'h5iget_ref_f' 0 2059 'h5iget_name_f' 0 2052 'h5iget_file_id_f' 0 2047
-'h5iinc_ref_f' 0 2064 'h5l_type_hard_f' 0 316 'h5imlink_palette_f' 0
-2163 'h5imget_npalettes_f' 0 2119 'h5im' 0 2096 'h5imget_image_info_f' 0
-2086 'h5imget_palette_info_f' 0 2112 'h5imget_palette_f' 0 2097
-'h5imis_palette_f' 0 2108 'h5imis_image_f' 0 2104 'h5l_flags' 0 191
-'h5immake_image_24bit_f' 0 2153 'h5immake_image_8bit_f' 0 2145
-'h5imread_image_f' 0 2139 'h5immake_palette_f' 0 2125 'h5l' 0 2138
-'h5imunlink_palette_f' 0 2132 'h5l_flags_len' 0 2162
-'h5l_link_class_t_vers_f' 0 312 'h5l_type_external_f' 0 314
-'h5l_same_loc_f' 0 313 'h5l_type_error_f' 0 317 'h5lcreate_soft_f' 0
-2218 'h5lcreate_external_f' 0 2187 'h5lcopy_f' 0 2169 'h5l_type_soft_f'
-0 315 'h5lcreate_hard_f' 0 2178 'h5ldelete_by_idx_f' 0 2209 'h5lexists_f'
-0 2202 'h5ldelete_f' 0 2196 'h5p_link_create_f' 0 273 'h5p_group_access_f'
-0 279 'h5o_hdr_all_flags_f' 0 292 'h5lib' 0 2271 'h5lget_info_f' 0 2242
-'h5lget_name_by_idx_f' 0 2231 'h5o_copy_expand_ext_link_f' 0 309
-'h5lis_registered_f' 0 2265 'h5lib_flags' 0 192 'h5lib_flags_len' 0 2254
-'h5o_copy_all_f' 0 305 'h5o' 0 2264 'h5lmove_f' 0 2255
-'h5o_copy_expand_reference_f' 0 308 'h5o_flags_len' 0 2270
-'h5o_copy_shallow_hierarchy_f' 0 311 'h5o_copy_preserve_null_flag_f' 0
-306 'h5o_copy_expand_soft_link_f' 0 310 'h5o_flags' 0 197
-'h5o_copy_without_attr_flag_f' 0 307 'h5p_datatype_create_f' 0 278
-'h5p_crt_order_tracked_f' 0 270 'h5o_shmesg_none_flag_f' 0 304
-'h5o_shmesg_fill_flag_f' 0 301 'h5o_hdr_attr_store_phase_cha_f' 0 294
-'h5o_hdr_attr_crt_order_track_f' 0 296 'h5o_hdr_attr_crt_order_index_f'
-0 295 'h5o_shmesg_all_flag_f' 0 298 'h5o_hdr_chunk0_size_f' 0 297
-'h5o_hdr_store_times_f' 0 293 'h5o_shmesg_attr_flag_f' 0 299
-'h5o_shmesg_dtype_flag_f' 0 302 'h5o_shmesg_max_list_size_f' 0 290
-'h5o_shmesg_max_nindexes_f' 0 291 'h5olink_f' 0 2289
-'h5o_shmesg_sdspace_flag_f' 0 303 'h5o_shmesg_pline_flag_f' 0 300
-'h5oopen_by_addr_f' 0 2283 'h5p_crt_order_indexed_f' 0 271
-'h5p_attribute_create_f' 0 275 'h5p' 0 2282 'h5oopen_f' 0 2275 'h5open_f'
-0 2272 'h5p_dataset_access_f' 0 281 'h5p_dataset_create_f' 0 287
-'h5p_dataset_xfer_f' 0 286 'h5p_datatype_access_f' 0 277
-'h5p_file_access_f' 0 288 'h5p_default_f' 0 284 'h5p_flags_int_len' 0
-2298 'h5p_file_mount_f' 0 285 'h5p_file_create_f' 0 289 'h5p_flags_int'
-0 181 'h5p_flags' 0 194 'h5p_flags_len' 0 2297 'h5p_link_access_f' 0 272
-'h5p_group_create_f' 0 280 'h5pexist_f' 0 2392 'h5pall_filters_avail_f'
-0 2335 'h5p_root_f' 0 283 'h5p_object_create_f' 0 282 'h5p_object_copy_f'
-0 274 'h5p_string_create_f' 0 276 'h5pclose_f' 0 2331 'h5pclose_class_f'
-0 2299 'h5pequal_f' 0 2325 'h5pcreate_f' 0 2320 'h5pcopy_prop_f' 0 2314
-'h5pcopy_f' 0 2303 'h5pcreate_class_f' 0 2308 'h5pfill_value_defined_f'
-0 2387 'h5pget_attr_phase_change_f' 0 2381 'h5pget_alignment_f' 0 2350
-'h5pget_attr_creation_order_f' 0 2345 'h5pget_alloc_time_f' 0 2340
-'h5pget_cache_f' 0 2373 'h5pget_btree_ratios_f' 0 2361 'h5pget_buffer_f'
-0 2356 'h5pget_char' 0 145 'h5pset_fapl_direct_f' 0 3473
-'h5pget_fill_time_f' 0 2881 'h5pget_est_link_info_f' 0 2526
-'h5pget_data_transform_f' 0 2472 'h5pget_class_parent_f' 0 2452
-'h5pget_class_f' 0 2437 'h5pget_chunk_cache_f' 0 2424 'h5pget_chunk_f' 0
-2418 'h5pget_class_name_f' 0 2431 'h5pget_copy_object_f' 0 2447
-'h5pget_create_inter_group_f' 0 2442 'h5pget_edc_check_f' 0 2467
-'h5pget_double' 0 148 'h5pget_driver_f' 0 2457 'h5pget_fapl_family_f' 0
-2520 'h5pget_external_f' 0 2496 'h5pget_external_count_f' 0 2478
-'h5pget_fapl_core_f' 0 2490 'h5pget_fapl_direct_f' 0 2483
-'h5pget_fapl_multi_f' 0 2510 'h5pget_fclose_degree_f' 0 2505
-'h5pinsert_double' 0 156 'h5pget_hyper_vector_size_f' 0 2691
-'h5pget_fill_value_real' 0 150 'h5pget_fill_value_char' 0 149
-'h5pget_fill_value_double' 0 152 'h5pget_fill_value_integer' 0 151
-'h5pget_filter_f' 0 2562 'h5pget_filter_by_id_f' 0 2547
-'h5pget_gc_references_f' 0 2557 'h5pget_layout_f' 0 2686 'h5pget_integer'
-0 147 'h5pget_istore_k_f' 0 2578 'h5pget_meta_block_size_f' 0 2681
-'h5pget_link_phase_change_f' 0 2598 'h5pget_link_creation_order_f' 0
-2588 'h5pget_local_heap_size_hint_f' 0 2593 'h5pget_preserve_f' 0 2676
-'h5pget_nlinks_f' 0 2619 'h5pget_nfilters_f' 0 2604 'h5pget_nprops_f' 0
-2614 'h5pget_obj_track_times_f' 0 2609 'h5pget_sieve_buf_size_f' 0 2671
-'h5pget_real' 0 146 'h5pget_sizes_f' 0 2665 'h5pget_size_f' 0 2629
-'h5pget_version_f' 0 2657 'h5pget_userblock_f' 0 2646 'h5pget_sym_k_f' 0
-2640 'h5pget_small_data_block_size_f' 0 2635 'h5pinsert_char' 0 153
-'h5pset_alignment_f' 0 2869 'h5pregister_char' 0 157 'h5pisa_class_f' 0
-2716 'h5pinsert_integer' 0 155 'h5pinsert_real' 0 154 'h5pmodify_filter_f'
-0 2708 'h5premove_filter_f' 0 2745 'h5pregister_integer' 0 159
-'h5pregister_double' 0 160 'h5premove_f' 0 2734 'h5pregister_real' 0 158
-'h5pset_char' 0 161 'h5pset_cache_f' 0 2784 'h5pset_btree_ratios_f' 0
-2777 'h5pset_alloc_time_f' 0 2767 'h5pset_attr_creation_order_f' 0 2762
-'h5pset_attr_phase_change_f' 0 2756 'h5pset_buffer_f' 0 2772
-'h5pset_deflate_f' 0 2859 'h5pset_create_inter_group_f' 0 2820
-'h5pset_copy_object_f' 0 2810 'h5pset_chunk_cache_f' 0 2803
-'h5pset_char_encoding_f' 0 2792 'h5pset_chunk_f' 0 2797
-'h5pset_data_transform_f' 0 2815 'h5pset_external_f' 0 2852
-'h5pset_edc_check_f' 0 2836 'h5pset_double' 0 164 'h5pset_est_link_info_f'
-0 2830 'h5pset_family_offset_f' 0 2847 'h5pset_fapl_core_f' 0 2841
-'h5t_std_i32le' 0 415 'h5s_scalar_f' 0 267 'h5pset_gc_references_f' 0
-3140 'h5pset_fill_value_real' 0 168 'h5pset_fapl_family_f' 0 2939
-'h5pset_fill_value_char' 0 167 'h5pset_fapl_stdio_f' 0 2920
-'h5pset_fapl_split_f' 0 2902 'h5pset_fapl_multi_l' 0 166
-'h5pset_fapl_sec2_f' 0 2890 'h5pset_fapl_multi_s' 0 165
-'h5pset_fclose_degree_f' 0 2915 'h5pset_fill_time_f' 0 2910
-'h5pset_fill_value_integer' 0 169 'h5pset_fill_value_double' 0 170
-'h5pset_fletcher32_f' 0 2953 'h5pset_filter_f' 0 2945
-'h5pset_libver_bounds_f' 0 3134 'h5pset_istore_k_f' 0 2977
-'h5pset_hyper_vector_size_f' 0 2967 'h5pset_integer' 0 163
-'h5pset_layout_f' 0 2972 'h5pset_szip_f' 0 3094
-'h5pset_local_heap_size_hint_f' 0 3066 'h5pset_link_creation_order_f' 0
-2988 'h5pset_link_phase_change_f' 0 2982 'h5pset_sym_k_f' 0 3060
-'h5pset_sieve_buf_size_f' 0 3055 'h5pset_shared_mesg_index_f' 0 3037
-'h5pset_obj_track_times_f' 0 3023 'h5pset_meta_block_size_f' 0 3002
-'h5pset_nlinks_f' 0 2997 'h5pset_nbit_f' 0 2993 'h5pset_real' 0 162
-'h5pset_preserve_f' 0 3007 'h5pset_scaleoffset_f' 0 3012
-'h5pset_shared_mesg_nindexes_f' 0 3032 'h5pset_shuffle_f' 0 3028
-'h5pset_small_data_block_size_f' 0 3050 'h5pset_sizes_f' 0 3044
-'h5rcreate_region_f' 0 173 'h5punregister_f' 0 3083 'h5pset_userblock_f'
-0 3071 'h5r_flags_len' 0 3077 'h5r_dataset_region_f' 0 268 'h5r' 0 3076
-'h5r_flags' 0 184 'h5r_object_f' 0 269 'h5rcreate_object_f' 0 174
-'h5s_flags_len' 0 3133 'h5rget_name_region_f' 0 175
-'h5rdereference_object_f' 0 172 'h5rdereference_region_f' 0 171
-'h5rget_name_object_f' 0 176 'h5rget_region_region_f' 0 178
-'h5rget_object_type_obj_f' 0 177 'h5s_all_f' 0 261 'h5s' 0 3121
-'h5s_flags' 0 179 'h5s_null_f' 0 265 'h5t_order_le_f' 0 237
-'h5s_sel_all_f' 0 248 'h5s_sel_hyperslabs_f' 0 249 'h5s_sel_error_f' 0
-252 'h5sselect_all_f' 0 3298 'h5sget_simple_extent_type_f' 0 3254
-'h5screate_f' 0 3239 'h5s_select_prepend_f' 0 254 'h5s_sel_none_f' 0 251
-'h5s_select_nota_f' 0 256 'h5s_select_append_f' 0 255 'h5s_select_and_f'
-0 259 'h5s_sel_points_f' 0 250 'h5s_select_invalid_f' 0 253
-'h5s_select_noop_f' 0 260 'h5s_select_notb_f' 0 257 'h5s_select_or_f' 0
-263 'h5sclose_f' 0 3150 'h5s_simple_f' 0 266 'h5s_select_xor_f' 0 258
-'h5s_select_set_f' 0 264 'h5s_unlimited_f' 0 262 'h5scopy_f' 0 3145
-'h5sencode_f' 0 3233 'h5sdecode_f' 0 3161 'h5screate_simple_f' 0 3154
-'h5sget_simple_extent_ndims_f' 0 3228 'h5sget_select_elem_npoints_f' 0
-3218 'h5sextent_copy_f' 0 3178 'h5sextent_equal_f' 0 3172
-'h5sget_select_bounds_f' 0 3166 'h5sget_select_type_f' 0 3213
-'h5sget_select_elem_pointlist_f' 0 3200 'h5sget_select_hyper_blocklist_f'
-0 3193 'h5sget_select_hyper_nblocks_f' 0 3188 'h5sget_select_npoints_f'
-0 3183 'h5sget_simple_extent_dims_f' 0 3207
-'h5sget_simple_extent_npoints_f' 0 3223 'h5soffset_simple_f' 0 3249
-'h5sis_simple_f' 0 3244 'h5t_order_be_f' 0 236 'h5t_native_double' 0 435
-'h5sset_extent_none_f' 0 3294 'h5sselect_elements_f' 0 3277
-'h5sselect_hyperslab_f' 0 3268 'h5sselect_valid_f' 0 3263
-'h5sselect_none_f' 0 3259 'h5t' 0 3293 'h5sset_extent_simple_f' 0 3285
-'h5t_cset_ascii_f' 0 223 'h5t_array_f' 0 216 'h5t_compound_f' 0 240
-'h5t_bitfield_f' 0 242 'h5t_native_character' 0 434 'h5t_float_f' 0 245
-'h5t_flags_len' 0 3292 'h5t_cset_utf8_f' 0 222 'h5t_flags' 0 189
-'h5t_dir_ascend_f' 0 215 'h5t_dir_descend_f' 0 214 'h5t_enum_f' 0 238
-'h5t_ieee_f64be' 0 422 'h5t_ieee_f32le' 0 423 'h5t_ieee_f32be' 0 424
-'h5t_integer_f' 0 246 'h5t_ieee_f64le' 0 421 'h5t_norm_implied_f' 0 226
-'h5t_native_integer_1' 0 431 'h5t_native_integer' 0 437
-'h5t_native_integer_4' 0 429 'h5t_native_integer_2' 0 430
-'h5t_native_integer_8' 0 428 'h5t_no_class_f' 0 247 'h5t_native_real' 0
-436 'h5t_native_real_16' 0 425 'h5t_native_real_8' 0 426
-'h5t_native_real_4' 0 427 'h5t_norm_msbset_f' 0 225 'h5t_opaque_f' 0 241
-'h5t_norm_none_f' 0 224 'h5t_sgn_none_f' 0 229 'h5t_pad_one_f' 0 232
-'h5t_order_vax_f' 0 235 'h5t_order_none_f' 0 234 'h5t_pad_background_f'
-0 231 'h5t_pad_error_f' 0 230 'h5t_sgn_error_f' 0 227 'h5t_reference_f'
-0 239 'h5t_pad_zero_f' 0 233 'h5t_sgn_2_f' 0 228 'h5t_std_i16be' 0 418
-'h5t_std_i16le' 0 417 'h5t_std_i32be' 0 416 'h5t_string' 0 404
-'h5t_std_i64le' 0 413 'h5t_std_i64be' 0 414 'h5t_str_nullpad_f' 0 220
-'h5t_std_u32le' 0 407 'h5t_std_i8le' 0 419 'h5t_std_i8be' 0 420
-'h5t_std_u16be' 0 410 'h5t_std_ref_dsetreg' 0 432 'h5t_std_ref_obj' 0
-433 'h5t_std_u16le' 0 409 'h5t_std_u32be' 0 408 'h5t_std_u8le' 0 411
-'h5t_std_u64be' 0 406 'h5t_std_u8be' 0 412 'h5t_std_u64le' 0 405
-'h5t_str_error_f' 0 218 'h5t_str_spacepad_f' 0 219 'h5t_str_nullterm_f'
-0 221 'h5tdecode_f' 0 3468 'h5tarray_create_f' 0 3344 'h5t_time_f' 0 244
-'h5t_string_f' 0 243 'h5t_vlen_f' 0 217 'h5tcommitted_f' 0 3339
-'h5tcommit_f' 0 3313 'h5tcommit_anon_f' 0 3306 'h5tclose_f' 0 3302
-'h5tcopy_f' 0 3334 'h5tcompiler_conv_f' 0 3322 'h5tcreate_f' 0 3328
-'h5tget_cset_f' 0 3463 'h5tencode_f' 0 3401 'h5tget_array_ndims_f' 0
-3396 'h5tenum_create_f' 0 3381 'h5tenum_insert_f' 0 3375
-'h5tenum_valueof_f' 0 3369 'h5tenum_nameof_f' 0 3351 'h5tget_array_dims_f'
-0 3364 'h5tequal_f' 0 3358 'h5tget_class_f' 0 3391 'h5tget_create_plist_f'
-0 3386 'h5tget_inpad_f' 0 3458 'h5tget_fields_f' 0 3412 'h5tget_ebias_f'
-0 3407 'h5tget_member_index_f' 0 3452 'h5tget_member_class_f' 0 3421
-'h5tget_member_value_f' 0 3446 'h5tget_member_type_f' 0 3440
-'h5tget_member_name_f' 0 3433 'h5tget_member_offset_f' 0 3427
-'integer_types' 0 196 'h5tset_pad_f' 0 3659 'h5tis_variable_str_f' 0
-3599 'h5tget_precision_f' 0 3544 'h5tget_pad_f' 0 3505 'h5tget_offset_f'
-0 3500 'h5tget_norm_f' 0 3490 'h5tget_nmembers_f' 0 3485 'h5tget_order_f'
-0 3495 'h5tget_tag_f' 0 3538 'h5tget_strpad_f' 0 3526 'h5tget_size_f' 0
-3516 'h5tget_sign_f' 0 3511 'h5tget_super_f' 0 3521 'h5tinsert_f' 0 3531
-'h5tset_fields_f' 0 3590 'h5tset_ebias_f' 0 3565 'h5topen_f' 0 3558
-'h5tset_cset_f' 0 3553 'h5tpack_f' 0 3549 'h5tset_offset_f' 0 3585
-'h5tset_norm_f' 0 3575 'h5tset_inpad_f' 0 3570 'h5tset_order_f' 0 3580
-'h5tset_sign_f' 0 3654 'h5tset_precision_f' 0 3604 'h5zget_filter_info_f'
-0 3649 'h5z_flags_len' 0 3635 'h5z_filter_fletcher32_f' 0 209
-'h5z_filter_error_f' 0 213 'h5tset_tag_f' 0 3625 'h5tset_size_f' 0 3614
-'h5tset_strpad_f' 0 3609 'h5tvlen_create_f' 0 3620
-'h5z_filter_decode_enabled_f' 0 201 'h5z_error_edc_f' 0 208 'h5z' 0 3619
-'h5z_disable_edc_f' 0 207 'h5z_enable_edc_f' 0 206 'h5z_filter_all_f' 0
-200 'h5z_filter_deflate_f' 0 211 'h5z_filter_encode_enabled_f' 0 202
-'h5z_flag_optional_f' 0 203 'h5z_filter_shuffle_f' 0 210
-'h5z_filter_none_f' 0 212 'h5z_filter_szip_f' 0 204 'h5z_flags' 0 183
-'h5z_no_edc_f' 0 205 'h5zfilter_avail_f' 0 3630 'hobj_ref_t_f' 0 3647
-'h5zunregister_f' 0 3641 'haddr_t' 0 3640 'hid_t' 0 3639
-'hdset_reg_ref_t_f' 0 3637 'hdf5' 0 3636 'hssize_t' 0 3646 'hsize_t' 0
-3645 'predef_types' 0 180 'integer_types_len' 0 3666
-'object_namelen_default_f' 0 3665 'printoff' 0 3671 'predef_types_len' 0
-3667 'printon' 0 3670 'ref_reg_buf_len' 0 3669 'size_t' 0 3668)
diff --git a/interfaces/ext/hdf5/h5l.mod b/interfaces/ext/hdf5/h5l.mod
deleted file mode 100644
index 563aa76..0000000
--- a/interfaces/ext/hdf5/h5l.mod
+++ /dev/null
@@ -1,1568 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5Lff.f90 on Mon Feb 14 14:35:49 2011
-If you edit this, you'll get what you deserve.
-
-
-(() () () () () () () () () () () () () () () () () () () () ())
-
-()
-
-()
-
-(('h5l_flags' 2 0) ('h5t_flags' 3 0) ('h5p_flags_int' 4 0) (
-'predefined_types' 5 0) ('h5i_flags' 6 0) ('integer_types' 7 0) (
-'h5r_flags' 8 0) ('h5z_flags' 9 0) ('h5s_flags' 10 0) ('h5d_flags' 11 0)
-('h5fd_hid_flags' 12 0) ('h5fd_flags' 13 0) ('h5g_flags' 14 0) (
-'h5generic_flags' 15 0) ('h5o_flags' 16 0) ('h5lib_flags' 17 0) (
-'h5p_flags' 18 0) ('h5f_flags' 19 0) ('floating_types' 20 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 21 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 22 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 23 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 24 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 25 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 26 ())) ('h5global.eq.6' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 27 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 28 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 29 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 30 ())) ('h5global.eq.10' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 31 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 32 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 33 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.13'
-(VARIABLE (INTEGER 4 ()) 0 34 ())) ('h5global.eq.14' (VARIABLE (INTEGER
-4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 35 ())) ('h5global.eq.15' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 36 ())) (
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '34') 1)))) 'h5global.eq.16' (VARIABLE (
-INTEGER 4 ()) 0 37 ())) ('h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '33') 1)))) 'h5global.eq.17'
-(VARIABLE (INTEGER 4 ()) 0 38 ())) ('h5global.eq.18' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '32') 1))))
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 39 ())) ('h5global.eq.19' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '31') 1)))) 'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 40 ())) (
-'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '30') 1)))) 'h5global.eq.20' (VARIABLE (
-INTEGER 4 ()) 0 41 ())) ('h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21'
-(VARIABLE (INTEGER 4 ()) 0 42 ())) ('h5global.eq.22' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 43 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 44 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 45 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1)))) 'h5global.eq.25'
-(VARIABLE (INTEGER 4 ()) 0 46 ())) ('h5global.eq.26' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '24') 1))))
-'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 47 ())) ('h5global.eq.27' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '23') 1)))) 'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 48 ())) (
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.28' (VARIABLE (
-INTEGER 4 ()) 0 49 ())) ('h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.29'
-(VARIABLE (INTEGER 4 ()) 0 50 ())) ('h5global.eq.30' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 51 ())) ('h5global.eq.31' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 52 ())) (
-'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.32' (VARIABLE (
-INTEGER 4 ()) 0 53 ())) ('h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33'
-(VARIABLE (INTEGER 4 ()) 0 54 ())) ('h5global.eq.34' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 55 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 56 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 57 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.37'
-(VARIABLE (INTEGER 4 ()) 0 58 ())) ('h5global.eq.38' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 59 ())) ('h5global.eq.39' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 60 ())) (
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.40' (VARIABLE (
-INTEGER 4 ()) 0 61 ())) ('h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.41'
-(VARIABLE (INTEGER 4 ()) 0 62 ())) ('h5global.eq.42' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 63 ())) ('h5global.eq.43' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 64 ())) (
-'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.44' (VARIABLE (
-INTEGER 4 ()) 0 65 ())) ('h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45'
-(VARIABLE (INTEGER 4 ()) 0 66 ())) ('h5global.eq.46' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 67 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 68 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 69 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.49'
-(VARIABLE (INTEGER 4 ()) 0 70 ())) ('h5global.eq.50' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 71 ())) ('h5global.eq.51' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 72 ())) (
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.52' (VARIABLE (
-INTEGER 4 ()) 0 73 ())) ('h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.53'
-(VARIABLE (INTEGER 4 ()) 0 74 ())) ('h5global.eq.54' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 75 ())) ('h5global.eq.55' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 76 ())) (
-'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.56' (VARIABLE (
-INTEGER 4 ()) 0 77 ())) ('h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57'
-(VARIABLE (INTEGER 4 ()) 0 78 ())) ('h5global.eq.58' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 79 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 80 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 81 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.61'
-(VARIABLE (INTEGER 4 ()) 0 82 ())) ('h5global.eq.62' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 83 ())) ('h5global.eq.63' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 84 ())) (
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.64' (VARIABLE (
-INTEGER 4 ()) 0 85 ())) ('h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.65'
-(VARIABLE (INTEGER 4 ()) 0 86 ())) ('h5global.eq.66' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 87 ())) ('h5global.eq.67' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 88 ())) (
-'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.68' (VARIABLE (
-INTEGER 4 ()) 0 89 ())) ('h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69'
-(VARIABLE (INTEGER 4 ()) 0 90 ())) ('h5global.eq.70' (VARIABLE (INTEGER
-4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 91 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 92 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 93 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 4 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.73'
-(VARIABLE (INTEGER 4 ()) 0 94 ())) ('h5global.eq.74' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 95 ())) ('h5global.eq.75' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 96 ())) (
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.76' (VARIABLE (
-INTEGER 4 ()) 0 97 ())) ('h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.77'
-(VARIABLE (INTEGER 4 ()) 0 98 ())) ('h5global.eq.78' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 99 ())) ('h5global.eq.79' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 100 ())) (
-'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.80' (VARIABLE (
-INTEGER 4 ()) 0 101 ())) ('h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81'
-(VARIABLE (INTEGER 4 ()) 0 102 ())) ('h5global.eq.82' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 103 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 104 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 105 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.85'
-(VARIABLE (INTEGER 4 ()) 0 106 ())) ('h5global.eq.86' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 107 ())) ('h5global.eq.87' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 108 ())) (
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.88' (VARIABLE (
-INTEGER 4 ()) 0 109 ())) ('h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.89'
-(VARIABLE (INTEGER 4 ()) 0 110 ())) ('h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 111 ())) ('h5global.eq.91' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 112 ())) (
-'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.92' (VARIABLE (
-INTEGER 4 ()) 0 113 ())) ('h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93'
-(VARIABLE (INTEGER 4 ()) 0 114 ())) ('h5global.eq.94' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 115 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 116 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 117 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.97'
-(VARIABLE (INTEGER 4 ()) 0 118 ())) ('h5global.eq.98' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 119 ())) ('h5global.eq.99' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 120 ())) (
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.100' (VARIABLE (
-INTEGER 4 ()) 0 121 ())) ('h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 122 ())) ('h5global.eq.102'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 123 ())) (
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.103' (VARIABLE (
-INTEGER 4 ()) 0 124 ())) ('h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 125 ())) ('h5global.eq.105'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 126 ())) (
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.106' (VARIABLE (
-INTEGER 4 ()) 0 127 ())) ('h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 128 ())) ('h5global.eq.108'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 129 ())) (
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.109' (VARIABLE (
-INTEGER 4 ()) 0 130 ())) ('h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 131 ())) ('h5global.eq.111'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 132 ())) (
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.112' (VARIABLE (
-INTEGER 4 ()) 0 133 ())) ('h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 134 ())) ('h5global.eq.114'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 135 ())) (
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.115' (VARIABLE (
-INTEGER 4 ()) 0 136 ())) ('h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 2
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 137 ())) ('h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 138 ())) ('h5global.eq.118'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 139 ())) (
-'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.119' (VARIABLE (
-INTEGER 4 ()) 0 140 ())) ('h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120'
-(VARIABLE (INTEGER 4 ()) 0 141 ())) ('h5global.eq.121' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 142 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 143 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 144 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.124'
-(VARIABLE (INTEGER 4 ()) 0 145 ())) ('h5global.eq.125' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 146 ())) ('h5global.eq.126'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 147 ())) (
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.127' (VARIABLE (
-INTEGER 4 ()) 0 148 ())) ('h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 149 ())) ('h5global.eq.129'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 150 ())) (
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.130' (VARIABLE (
-INTEGER 4 ()) 0 151 ())) ('h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 152 ())) ('h5global.eq.132'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 153 ())) (
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.133' (VARIABLE (
-INTEGER 4 ()) 0 154 ())) ('h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 155 ())) ('h5global.eq.135'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 156 ())) (
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.136' (VARIABLE (
-INTEGER 4 ()) 0 157 ())) ('h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 158 ())) ('h5global.eq.138'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 159 ())) (
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.139' (VARIABLE (
-INTEGER 4 ()) 0 160 ())) ('h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 161 ())) ('h5global.eq.141'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 162 ())) (
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.142' (VARIABLE (
-INTEGER 4 ()) 0 163 ())) ('h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 164 ())) ('h5global.eq.144'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 165 ())) (
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.145' (VARIABLE (
-INTEGER 4 ()) 0 166 ())) ('h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1))))
-'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 167 ())) ('h5global.eq.147'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 168 ())) (
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.148' (VARIABLE (
-INTEGER 4 ()) 0 169 ())) ('h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 170 ())) ('h5global.eq.150'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 171 ())) (
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.151' (VARIABLE (
-INTEGER 4 ()) 0 172 ())) ('h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 173 ())) ('h5global.eq.153'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 174 ())) (
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.154' (VARIABLE (
-INTEGER 4 ()) 0 175 ())) ('h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 176 ())) ('h5global.eq.156'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 177 ())) (
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.157' (VARIABLE (
-INTEGER 4 ()) 0 178 ())) ('h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 179 ())) ('h5global.eq.159'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ())) (
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.160' (VARIABLE (
-INTEGER 4 ()) 0 181 ())) ('h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 182 ())) ('h5global.eq.162'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 183 ())) (
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.163' (VARIABLE (
-INTEGER 4 ()) 0 184 ())) ('h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 185 ())) ('h5global.eq.165'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 186 ())) (
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.166' (VARIABLE (
-INTEGER 4 ()) 0 187 ())) ('h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 188 ())) ('h5global.eq.168'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ())) (
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.169' (VARIABLE (
-INTEGER 4 ()) 0 190 ())) ('h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 191 ())) ('h5global.eq.171'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 192 ())) (
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.172' (VARIABLE (
-INTEGER 4 ()) 0 193 ())) ('h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 194 ())) ('h5global.eq.174'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 195 ())) (
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.175' (VARIABLE (
-INTEGER 4 ()) 0 196 ())) ('h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 197 ())) ('h5global.eq.177'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 198 ())) (
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.178' (VARIABLE (
-INTEGER 4 ()) 0 199 ())) ('h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.180'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.181' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.183'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 204 ())) (
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.184' (VARIABLE (
-INTEGER 4 ()) 0 205 ())) ('h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 206 ())) ('h5global.eq.186'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 207 ())) (
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.187' (VARIABLE (
-INTEGER 4 ()) 0 208 ())) ('h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 209 ())) ('h5global.eq.189'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 210 ())) (
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.190' (VARIABLE (
-INTEGER 4 ()) 0 211 ())) ('h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 212 ())) ('h5global.eq.192'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ())) (
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.193' (VARIABLE (
-INTEGER 4 ()) 0 214 ())) ('h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 215 ())) ('h5global.eq.195'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 216 ())) (
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.196' (VARIABLE (
-INTEGER 4 ()) 0 217 ())) ('h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 218 ())) ('h5global.eq.198'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 219 ())) (
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.199' (VARIABLE (
-INTEGER 4 ()) 0 220 ())) ('h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 221 ())) ('h5global.eq.201'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 222 ())) (
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.202' (VARIABLE (
-INTEGER 4 ()) 0 223 ())) ('h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.204'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.205' (VARIABLE (
-INTEGER 4 ()) 0 226 ())) ('h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.207'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 228 ())) (
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.208' (VARIABLE (
-INTEGER 4 ()) 0 229 ())) ('h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 230 ())) ('h5global.eq.210'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 231 ())) (
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.211' (VARIABLE (
-INTEGER 4 ()) 0 232 ())) ('h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 233 ())) ('h5global.eq.213'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 234 ())) (
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.214' (VARIABLE (
-INTEGER 4 ()) 0 235 ())) ('h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.217'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.218' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219'
-(VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.220' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.232'
-(VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.233' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 254 ())) ('h5global.eq.234'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 255 ())) (
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.235' (VARIABLE (
-INTEGER 4 ()) 0 256 ())) ('h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 257 ())) ('h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.238'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.239' (VARIABLE (
-INTEGER 4 ()) 0 260 ())))
-
-(20 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-261 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-262 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-263 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-264 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-265 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-266 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-267 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-268 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-269 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-270 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-207 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-208 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-205 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-206 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-200 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-272 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-273 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-274 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-21 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-22 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-183 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-180 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-184 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-167 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-166 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-168 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-185 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-181 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-187 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-174 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-186 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-170 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-171 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-172 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-173 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-11 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-176 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-179 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-177 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-223 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-216 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-217 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-178 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-169 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-210 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '19') () 0 ()
-())
-19 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-211 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-213 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-220 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-215 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-13 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-153 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-278 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-12 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-154 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-160 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-152 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-158 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-157 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-159 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-163 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-164 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-161 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-151 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-156 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-155 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-162 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-150 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-149 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-14 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-281 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '12') () 0 ()
-())
-198 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-195 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-194 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-197 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-189 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-192 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-193 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-148 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-165 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-218 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-175 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-190 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-191 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-15 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9')) 0 () ())
-199 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-141 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-142 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-282 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(UNKNOWN 0 ()) 0 0 () () 0 () ())
-144 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-143 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-196 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-6 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-284 'h5l' 'h5l' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-285 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6') () 0 () ())
-2 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-146 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-286 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7') () 0 () ())
-147 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-140 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-139 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-138 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-137 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-136 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'h5lcreate_external_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 288 0 (289
-290 291 292 293 294 295) () 0 () ())
-296 'h5lcopy_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 297 0 (298 299 300 301 302
-303 304) () 0 () ())
-135 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-145 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-305 'h5lcreate_soft_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 306 0 (307 308 309 310
-311 312) () 0 () ())
-313 'h5ldelete_by_idx_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 314 0 (315 316 317 318
-319 320 321) () 0 () ())
-322 'h5lget_info_by_idx_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 323 0 (324
-325 326 327 328 329 330 331 332 333 334 335 336) () 0 () ())
-337 'h5lexists_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 338 0 (339 340 341 342 343) ()
-0 () ())
-344 'h5ldelete_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 345 0 (346 347 348 349) () 0
-() ())
-17 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-350 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-351 'h5lmove_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 352 0 (353 354 355 356 357
-358 359) () 0 () ())
-128 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-360 'h5lis_registered_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 361 0 (362 363 364) () 0 () ())
-129 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-133 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-131 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-132 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-134 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-365 'h5lget_name_by_idx_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 366 0 (367
-368 369 370 371 372 373 374 375) () 0 () ())
-376 'h5lget_info_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 377 0 (378 379 380 381 382
-383 384 385 386 387) () 0 () ())
-388 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-16 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-118 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-115 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-130 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-389 'h5lcreate_hard_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 390 0 (391 392 393 394
-395 396 397) () 0 () ())
-117 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-116 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-120 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-125 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-124 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-113 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-122 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-121 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-127 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-114 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-98 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-126 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-104 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-110 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-93 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-94 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-101 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-100 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-109 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-123 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-112 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-111 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-107 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-18 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-4 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-398 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-102 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-103 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-96 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-97 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-106 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-105 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-95 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-399 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '18') () 0 ()
-())
-108 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-119 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-188 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-92 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-400 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2') () 0 () ())
-8 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-91 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-10 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-88 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-90 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-75 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-71 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-401 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '20') () 0 ()
-())
-84 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-73 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-82 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-74 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-72 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-83 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-76 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-86 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-80 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-87 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-81 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-77 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-65 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-39 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-85 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-89 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-63 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-79 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-38 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-45 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-37 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-402 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '34') () 0 ()
-())
-3 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-68 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-69 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-258 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-70 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-48 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-49 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-59 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-58 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-57 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-60 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-64 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-47 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-54 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-55 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-51 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-52 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-50 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-62 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-56 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-53 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-242 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-61 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-46 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-78 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-231 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-42 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-227 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-67 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-40 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-66 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-44 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-43 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-31 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-29 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-25 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-34 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-24 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-32 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-35 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-27 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-26 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-33 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-403 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '14') () 0 ()
-())
-404 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-28 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-9 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-405 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-406 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((407 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-36 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-23 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-408 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-409 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((410 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-30 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-411 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-41 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-412 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-413 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-414 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-415 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-416 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-5 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-7 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-230 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-99 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-300 'dest_loc_id' '' 297 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-301 'dest_name' '' 297 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-303 'lcpl_id' '' 297 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-302 'hdferr' '' 297 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-299 'src_name' '' 297 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-298 'src_loc_id' '' 297 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-392 'obj_name' '' 390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-391 'obj_loc_id' '' 390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-304 'lapl_id' '' 297 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-347 'name' '' 345 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-348 'hdferr' '' 345 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-346 'loc_id' '' 345 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-349 'lapl_id' '' 345 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-394 'link_name' '' 390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-307 'target_path' '' 306 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-308 'link_loc_id' '' 306 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-310 'hdferr' '' 306 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-309 'link_name' '' 306 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-312 'lapl_id' '' 306 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-393 'link_loc_id' '' 390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-395 'hdferr' '' 390 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-397 'lapl_id' '' 390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-289 'file_name' '' 288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-292 'link_name' '' 288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-290 'obj_name' '' 288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-396 'lcpl_id' '' 390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-311 'lcpl_id' '' 306 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-294 'lcpl_id' '' 288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-293 'hdferr' '' 288 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-315 'loc_id' '' 314 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-316 'group_name' '' 314 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-318 'order' '' 314 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-317 'index_field' '' 314 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-295 'lapl_id' '' 288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-291 'link_loc_id' '' 288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-320 'hdferr' '' 314 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-321 'lapl_id' '' 314 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-340 'name' '' 338 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-319 'n' '' 314 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-339 'loc_id' '' 338 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-342 'hdferr' '' 338 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-378 'link_loc_id' '' 377 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-343 'lapl_id' '' 338 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-341 'link_exists' '' 338 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-379 'link_name' '' 377 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-380 'cset' '' 377 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-325 'group_name' '' 323 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-324 'loc_id' '' 323 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-326 'index_field' '' 323 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-381 'corder' '' 377 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-329 'link_type' '' 323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-330 'f_corder_valid' '' 323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-328 'n' '' 323 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-327 'order' '' 323 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-334 'val_size' '' 323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-333 'address' '' 323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-332 'cset' '' 323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-385 'val_size' '' 377 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-384 'address' '' 377 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-383 'link_type' '' 377 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-382 'f_corder_valid' '' 377 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-336 'lapl_id' '' 323 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-335 'hdferr' '' 323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-387 'lapl_id' '' 377 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-363 'registered' '' 361 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-386 'hdferr' '' 377 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-331 'corder' '' 323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-362 'link_cls_id' '' 361 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-354 'src_name' '' 352 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-356 'dest_name' '' 352 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-357 'hdferr' '' 352 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-355 'dest_loc_id' '' 352 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-359 'lapl_id' '' 352 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-358 'lcpl_id' '' 352 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-353 'src_loc_id' '' 352 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-369 'index_field' '' 366 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-368 'group_name' '' 366 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-367 'loc_id' '' 366 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-370 'order' '' 366 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-372 'name' '' 366 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-371 'n' '' 366 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-364 'hdferr' '' 361 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-374 'size' '' 366 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-375 'lapl_id' '' 366 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-373 'hdferr' '' 366 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-)
-
-('h5p_string_create_f' 0 99 'h5g_storage_type_dense_f' 0 188
-'h5d_fill_time_error_f' 0 175 'floating_types_len' 0 275 '__convert_i4_i8'
-0 261 'floating_types' 0 20 'h5d_alloc_time_early_f' 0 182
-'h5d_alloc_time_default_f' 0 183 'h5_iter_unknown_f' 0 204
-'fortran_integer_1' 0 273 'fortran_double' 0 263 'fortran_integer' 0 262
-'fortran_real_4' 0 272 'fortran_integer_2' 0 269 'fortran_real' 0 268
-'fortran_integer_4' 0 265 'fortran_integer_8' 0 264 'fortran_real_12' 0
-267 'fortran_real_16' 0 266 'h5_integer_kind' 0 271 'h5_index_crt_order_f'
-0 206 'fortran_real_8' 0 270 'h5_index_n_f' 0 205 'h5_index_unknown_f' 0
-208 'h5_index_name_f' 0 207 'h5_iter_dec_f' 0 202 'h5_iter_native_f' 0
-201 'h5_iter_n_f' 0 200 'h5_iter_inc_f' 0 203 'h5_szip_ec_om_f' 0 22
-'h5_real_kind' 0 274 'h5_szip_nn_om_f' 0 21 'h5d_contiguous_f' 0 186
-'h5d_compact_f' 0 187 'h5d_alloc_time_late_f' 0 181
-'h5d_alloc_time_error_f' 0 184 'h5d_alloc_time_incr_f' 0 180
-'h5d_chunked_f' 0 185 'h5d_chunk_cache_nslots_dflt_f' 0 168
-'h5d_chunk_cache_nbytes_dflt_f' 0 167 'h5d_chunk_cache_w0_dflt_f' 0 166
-'h5d_fill_time_alloc_f' 0 174 'h5f_close_weak_f' 0 218
-'h5d_fill_value_user_defined_f' 0 169 'h5d_fill_time_never_f' 0 173
-'h5d_fill_value_error_f' 0 172 'h5d_fill_value_default_f' 0 170
-'h5d_fill_value_undefined_f' 0 171 'h5d_space_sts_not_allocated_f' 0 178
-'h5d_space_sts_error_f' 0 179 'h5d_flags_len' 0 276 'h5d_flags' 0 11
-'h5d_space_sts_allocated_f' 0 176 'h5f_close_default_f' 0 219
-'h5f_acc_trunc_f' 0 224 'h5f_acc_rdonly_f' 0 225 'h5f_acc_debug_f' 0 222
-'h5d_space_sts_part_allocated_f' 0 177 'h5f_acc_excl_f' 0 223
-'h5f_acc_rdwr_f' 0 226 'h5f_close_semi_f' 0 217 'h5f_close_strong_f' 0
-216 'h5fd_mpio_independent_f' 0 165 'h5fd_mem_default_f' 0 162
-'h5fd_hid_flags_len' 0 279 'h5fd_core_f' 0 154 'h5f_obj_file_f' 0 215
-'h5f_libver_latest_f' 0 209 'h5f_flags' 0 19 'h5f_flags_len' 0 277
-'h5f_libver_earliest_f' 0 210 'h5f_obj_datatype_f' 0 212
-'h5f_obj_dataset_f' 0 214 'h5f_obj_all_f' 0 211 'h5f_scope_global_f' 0
-220 'h5f_obj_group_f' 0 213 'h5f_scope_local_f' 0 221 'h5fd_hid_flags' 0
-12 'h5fd_flags_len' 0 278 'h5fd_family_f' 0 153 'h5fd_flags' 0 13
-'h5fd_log_f' 0 152 'h5fd_mem_btree_f' 0 160 'h5fd_mem_ntypes_f' 0 155
-'h5fd_mem_nolist_f' 0 163 'h5fd_mem_draw_f' 0 159 'h5fd_mem_lheap_f' 0
-157 'h5fd_mem_gheap_f' 0 158 'h5fd_mem_ohdr_f' 0 156 'h5fd_mpio_f' 0 151
-'h5fd_mem_super_f' 0 161 'h5fd_mpio_collective_f' 0 164 'h5fd_stdio_f' 0
-148 'h5fd_sec2_f' 0 149 'h5fd_multi_f' 0 150 'h5g_link_hard_f' 0 193
-'h5g_dataset_f' 0 197 'h5fortran_types' 0 280 'h5g_link_error_f' 0 194
-'h5g_group_f' 0 198 'h5g_flags_len' 0 281 'h5g_flags' 0 14 'h5g_link_f'
-0 195 'h5g_link_soft_f' 0 192 'h5g_storage_type_compact_f' 0 189
-'h5o_hdr_attr_crt_order_track_f' 0 119 'h5lcreate_hard_f' 0 389
-'h5i_datatype_f' 0 145 'h5g_type_f' 0 196 'h5g_storage_type_unknown_f' 0
-191 'h5g_storage_type_symbol_table_f' 0 190 'h5generic_flags_len' 0 283
-'h5g_unknown_f' 0 199 'h5generic_flags' 0 15 'h5i_dataset_f' 0 143
-'h5global' 0 282 'h5i_attr_f' 0 142 'h5i_badid_f' 0 141 'h5i_dataspace_f'
-0 144 'h5l_link_class_t_vers_f' 0 135 'h5i_file_f' 0 147 'h5i_flags_len'
-0 286 'h5i_flags' 0 6 'h5i_group_f' 0 146 'h5l_flags' 0 2 'h5l' 0 284
-'h5l_flags_len' 0 285 'h5lcopy_f' 0 296 'h5l_same_loc_f' 0 136
-'h5l_type_external_f' 0 137 'h5l_type_error_f' 0 140 'h5l_type_soft_f' 0
-138 'h5l_type_hard_f' 0 139 'h5lcreate_external_f' 0 287
-'h5o_copy_without_attr_flag_f' 0 130 'h5lget_info_f' 0 376 'h5ldelete_f'
-0 344 'h5ldelete_by_idx_f' 0 313 'h5lcreate_soft_f' 0 305 'h5lexists_f'
-0 337 'h5lget_info_by_idx_f' 0 322 'h5lget_name_by_idx_f' 0 365
-'h5o_copy_shallow_hierarchy_f' 0 134 'h5o_copy_expand_ext_link_f' 0 132
-'h5lis_registered_f' 0 360 'h5lib_flags_len' 0 350 'h5lib_flags' 0 17
-'h5o_copy_all_f' 0 128 'h5lmove_f' 0 351 'h5o_copy_expand_reference_f' 0
-131 'h5o_copy_expand_soft_link_f' 0 133 'h5o_copy_preserve_null_flag_f'
-0 129 'h5o_hdr_all_flags_f' 0 115 'h5o_flags' 0 16 'h5o_flags_len' 0 388
-'h5o_hdr_attr_crt_order_index_f' 0 118 'h5p_file_mount_f' 0 108
-'h5p_default_f' 0 107 'h5o_shmesg_pline_flag_f' 0 123
-'h5o_shmesg_max_nindexes_f' 0 114 'h5o_shmesg_all_flag_f' 0 121
-'h5o_hdr_chunk0_size_f' 0 120 'h5o_hdr_attr_store_phase_cha_f' 0 117
-'h5o_hdr_store_times_f' 0 116 'h5o_shmesg_attr_flag_f' 0 122
-'h5o_shmesg_max_list_size_f' 0 113 'h5o_shmesg_fill_flag_f' 0 124
-'h5o_shmesg_dtype_flag_f' 0 125 'h5o_shmesg_none_flag_f' 0 127
-'h5p_dataset_xfer_f' 0 109 'h5p_crt_order_indexed_f' 0 94
-'h5o_shmesg_sdspace_flag_f' 0 126 'h5p_attribute_create_f' 0 98
-'h5p_crt_order_tracked_f' 0 93 'h5p_dataset_create_f' 0 110
-'h5p_dataset_access_f' 0 104 'h5p_datatype_access_f' 0 100
-'h5p_datatype_create_f' 0 101 'h5p_file_access_f' 0 111
-'h5p_file_create_f' 0 112 'h5p_flags_len' 0 399 'h5p_flags_int_len' 0
-398 'h5p_flags_int' 0 4 'h5p_flags' 0 18 'h5p_link_access_f' 0 95
-'h5p_group_create_f' 0 103 'h5p_group_access_f' 0 102
-'h5p_object_create_f' 0 105 'h5p_object_copy_f' 0 97 'h5p_link_create_f'
-0 96 'h5p_root_f' 0 106 'h5t_std_u16le' 0 232 'h5s_select_append_f' 0 78
-'h5s_sel_hyperslabs_f' 0 72 'h5s_all_f' 0 84 'h5r_dataset_region_f' 0 91
-'h5r_flags' 0 8 'h5r_flags_len' 0 400 'h5r_object_f' 0 92 'h5s_flags_len'
-0 401 'h5s_flags' 0 10 'h5s_sel_all_f' 0 71 'h5s_scalar_f' 0 90
-'h5s_null_f' 0 88 'h5s_sel_error_f' 0 75 'h5s_sel_none_f' 0 74
-'h5s_select_and_f' 0 82 'h5s_sel_points_f' 0 73 'h5t_cset_ascii_f' 0 46
-'h5s_select_nota_f' 0 79 'h5s_select_invalid_f' 0 76 'h5s_select_noop_f'
-0 83 'h5t_compound_f' 0 63 'h5s_simple_f' 0 89 'h5s_select_prepend_f' 0
-77 'h5s_select_notb_f' 0 80 'h5s_select_or_f' 0 86 'h5s_select_xor_f' 0
-81 'h5s_select_set_f' 0 87 'h5s_unlimited_f' 0 85 'h5t_array_f' 0 39
-'h5t_bitfield_f' 0 65 'h5t_enum_f' 0 61 'h5t_dir_descend_f' 0 37
-'h5t_cset_utf8_f' 0 45 'h5t_dir_ascend_f' 0 38 'h5t_std_ref_obj' 0 256
-'h5t_native_character' 0 257 'h5t_ieee_f32be' 0 247 'h5t_float_f' 0 68
-'h5t_flags' 0 3 'h5t_flags_len' 0 402 'h5t_ieee_f64le' 0 244
-'h5t_ieee_f64be' 0 245 'h5t_ieee_f32le' 0 246 'h5t_integer_f' 0 69
-'h5t_std_i64le' 0 236 'h5t_pad_error_f' 0 53 'h5t_native_integer_1' 0
-254 'h5t_native_double' 0 258 'h5t_native_integer' 0 260
-'h5t_pad_background_f' 0 54 'h5t_norm_none_f' 0 47 'h5t_norm_implied_f'
-0 49 'h5t_native_integer_2' 0 253 'h5t_native_integer_4' 0 252
-'h5t_native_real_16' 0 248 'h5t_native_real' 0 259 'h5t_native_integer_8'
-0 251 'h5t_native_real_4' 0 250 'h5t_native_real_8' 0 249 'h5t_no_class_f'
-0 70 'h5t_norm_msbset_f' 0 48 'h5t_opaque_f' 0 64 'h5t_order_le_f' 0 60
-'h5t_order_be_f' 0 59 'h5t_order_none_f' 0 57 'h5t_order_vax_f' 0 58
-'h5t_std_i32be' 0 239 'h5t_pad_zero_f' 0 56 'h5t_pad_one_f' 0 55
-'h5t_reference_f' 0 62 'h5t_sgn_error_f' 0 50 'h5t_sgn_2_f' 0 51
-'h5t_std_i16le' 0 240 'h5t_sgn_none_f' 0 52 'h5t_std_i16be' 0 241
-'h5t_std_i32le' 0 238 'h5t_std_i64be' 0 237 'h5t_std_ref_dsetreg' 0 255
-'h5t_std_i8le' 0 242 'h5t_std_i8be' 0 243 'h5t_std_u16be' 0 233
-'h5t_std_u32le' 0 230 'h5t_std_u32be' 0 231 'integer_types' 0 7
-'h5t_str_error_f' 0 41 'h5t_std_u8be' 0 235 'h5t_std_u64le' 0 228
-'h5t_std_u64be' 0 229 'h5t_std_u8le' 0 234 'hssize_t' 0 411
-'h5z_disable_edc_f' 0 30 'h5t_str_nullpad_f' 0 43 'h5t_str_nullterm_f' 0
-44 'h5t_string_f' 0 66 'h5t_string' 0 227 'h5t_str_spacepad_f' 0 42
-'h5t_vlen_f' 0 40 'h5t_time_f' 0 67 'hobj_ref_t_f' 0 409
-'h5z_filter_all_f' 0 23 'h5z_enable_edc_f' 0 29 'h5z_error_edc_f' 0 31
-'h5z_filter_error_f' 0 36 'h5z_filter_decode_enabled_f' 0 24
-'h5z_filter_deflate_f' 0 34 'h5z_filter_encode_enabled_f' 0 25
-'hdset_reg_ref_t_f' 0 406 'h5z_flags' 0 9 'h5z_filter_shuffle_f' 0 33
-'h5z_filter_none_f' 0 35 'h5z_filter_fletcher32_f' 0 32
-'h5z_flag_optional_f' 0 26 'h5z_filter_szip_f' 0 27 'h5z_no_edc_f' 0 28
-'h5z_flags_len' 0 403 'haddr_t' 0 404 'hid_t' 0 405 'hsize_t' 0 408
-'predef_types' 0 5 'object_namelen_default_f' 0 413 'integer_types_len'
-0 412 'ref_reg_buf_len' 0 416 'predef_types_len' 0 414 'size_t' 0 415)
diff --git a/interfaces/ext/hdf5/h5lib.mod b/interfaces/ext/hdf5/h5lib.mod
deleted file mode 100644
index 0ead2b6..0000000
--- a/interfaces/ext/hdf5/h5lib.mod
+++ /dev/null
@@ -1,56 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5_ff.f90 on Mon Feb 14 14:35:47 2011
-If you edit this, you'll get what you deserve.
-
-(() () () () () () ()
-() () () () () () () () () () () () () ())
-
-()
-
-()
-
-()
-
-()
-
-(2 'h5check_version_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3 0 (4 5 6 7) () 0 () ())
-8 'h5close_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 9 0 (10) () 0 () ())
-11 'h5garbage_collect_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 12 0 (13) () 0 () ())
-14 'h5get_libversion_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 15 0 (16 17 18 19) () 0 () ())
-20 'h5lib' 'h5lib' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-21 'h5open_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 22 0 (23) () 0 () ())
-24 'h5dont_atexit_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 25 0 (26) () 0 () ())
-10 'error' '' 9 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-16 'majnum' '' 15 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-18 'relnum' '' 15 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-19 'error' '' 15 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-4 'majnum' '' 3 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-5 'minnum' '' 3 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-17 'minnum' '' 15 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-26 'error' '' 25 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-13 'error' '' 12 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-7 'error' '' 3 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-6 'relnum' '' 3 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-23 'error' '' 22 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-)
-
-('h5dont_atexit_f' 0 24 'h5close_f' 0 8 'h5check_version_f' 0 2 'h5open_f'
-0 21 'h5lib' 0 20 'h5get_libversion_f' 0 14 'h5garbage_collect_f' 0 11)
diff --git a/interfaces/ext/hdf5/h5lt.mod b/interfaces/ext/hdf5/h5lt.mod
deleted file mode 100644
index 63b9dfe..0000000
--- a/interfaces/ext/hdf5/h5lt.mod
+++ /dev/null
@@ -1,17284 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/hl/fortran/src/H5LTff.f90 on Mon Feb 14 14:36:22 2011
-If you edit this, you'll get what you deserve.
-
-(() () () () () () ()
-() () () () () () () () () () () () () ())
-
-()
-
-(('h5aread_f' '' 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) ('h5ltread_dataset_f' '' 34 35 36 37
-38 39 40 41 42) ('h5awrite_f' '' 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) ('h5dextend_f'
-'' 75) ('h5dfill_f' '' 76 77 78 79) ('h5dread_f' '' 80 81 82 83 84 85 86
-87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
-108 109 110 111 112 113) ('h5dread_vl_f' '' 114 115 116) ('h5dwrite_vl_f'
-'' 117 118 119) ('h5dwrite_f' '' 120 121 122 123 124 125 126 127 128 129
-130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
-148 149 150 151 152 153) ('h5ltmake_dataset_f' '' 154 155 156 157 158
-159 160 161 162) ('h5ltmake_dataset_double_f' '' 163 164 165) (
-'h5ltmake_dataset_float_f' '' 166 167 168) ('h5ltmake_dataset_int_f' ''
-169 170 171) ('h5ltread_dataset_double_f' '' 172 173 174) (
-'h5ltread_dataset_float_f' '' 175 176 177) ('h5ltread_dataset_int_f' ''
-178 179 180) ('h5pget_f' '' 181 182 183 184) ('h5pget_fill_value_f' ''
-185 186 187 188) ('h5pinsert_f' '' 189 190 191 192) ('h5pregister_f' ''
-193 194 195 196) ('h5pset_f' '' 197 198 199 200) ('h5pset_fapl_multi_f' ''
-201 202) ('h5pset_fill_value_f' '' 203 204 205 206) ('h5rdereference_f' ''
-207 208) ('h5rcreate_f' '' 209 210) ('h5rget_name_f' '' 211 212) (
-'h5rget_object_type_f' '' 213) ('h5rget_region_f' '' 214))
-
-(('h5s_flags' 215 0) ('predefined_types' 216 0) ('h5p_flags_int' 217 0)
-('h5i_flags' 218 0) ('h5z_flags' 219 0) ('h5s_flags' 215 0) ('h5r_flags'
-220 0) ('h5generic_flags' 221 0) ('h5fd_flags' 222 0) ('h5fd_hid_flags'
-223 0) ('h5g_flags' 224 0) ('h5t_flags' 225 0) ('h5d_flags' 226 0) (
-'h5l_flags' 227 0) ('h5lib_flags' 228 0) ('h5f_flags' 229 0) ('h5p_flags'
-230 0) ('h5p_flags_int' 217 0) ('predefined_types' 216 0) ('h5t_flags'
-225 0) ('h5t_flags' 225 0) ('h5l_flags' 227 0) ('h5r_flags' 220 0) (
-'floating_types' 231 0) ('h5d_flags' 226 0) ('integer_types' 232 0) (
-'h5z_flags' 219 0) ('h5s_flags' 215 0) ('h5o_flags' 233 0) ('h5i_flags'
-218 0) ('h5g_flags' 224 0) ('h5p_flags' 230 0) ('h5fd_flags' 222 0) (
-'h5generic_flags' 221 0) ('h5fd_hid_flags' 223 0) ('h5g_flags' 224 0) (
-'h5p_flags_int' 217 0) ('h5lib_flags' 228 0) ('floating_types' 231 0) (
-'h5d_flags' 226 0) ('h5t_flags' 225 0) ('predefined_types' 216 0) (
-'floating_types' 231 0) ('h5l_flags' 227 0) ('h5l_flags' 227 0) (
-'h5i_flags' 218 0) ('h5r_flags' 220 0) ('predefined_types' 216 0) (
-'h5f_flags' 229 0) ('h5o_flags' 233 0) ('integer_types' 232 0) (
-'h5fd_hid_flags' 223 0) ('h5z_flags' 219 0) ('h5g_flags' 224 0) (
-'h5generic_flags' 221 0) ('floating_types' 231 0) ('h5f_flags' 229 0) (
-'h5i_flags' 218 0) ('h5p_flags' 230 0) ('h5d_flags' 226 0) ('h5t_flags'
-225 0) ('h5lib_flags' 228 0) ('floating_types' 231 0) ('h5l_flags' 227 0)
-('h5t_flags' 225 0) ('h5o_flags' 233 0) ('h5s_flags' 215 0) ('h5i_flags'
-218 0) ('integer_types' 232 0) ('h5s_flags' 215 0) ('h5fd_flags' 222 0)
-('h5fd_hid_flags' 223 0) ('h5fd_flags' 222 0) ('h5z_flags' 219 0) (
-'h5p_flags_int' 217 0) ('integer_types' 232 0) ('h5r_flags' 220 0) (
-'h5f_flags' 229 0) ('h5d_flags' 226 0) ('h5f_flags' 229 0) (
-'h5p_flags_int' 217 0) ('h5t_flags' 225 0) ('h5lib_flags' 228 0) (
-'h5l_flags' 227 0) ('h5s_flags' 215 0) ('h5z_flags' 219 0) (
-'predefined_types' 216 0) ('h5lib_flags' 228 0) ('h5p_flags' 230 0) (
-'h5generic_flags' 221 0) ('h5o_flags' 233 0) ('h5g_flags' 224 0) (
-'integer_types' 232 0) ('h5fd_flags' 222 0) ('h5d_flags' 226 0) (
-'h5generic_flags' 221 0) ('h5o_flags' 233 0) ('h5f_flags' 229 0) (
-'predefined_types' 216 0) ('h5lib_flags' 228 0) ('floating_types' 231 0)
-('h5g_flags' 224 0) ('h5s_flags' 215 0) ('h5d_flags' 226 0) ('h5r_flags'
-220 0) ('h5p_flags_int' 217 0) ('floating_types' 231 0) ('h5fd_hid_flags'
-223 0) ('h5fd_flags' 222 0) ('integer_types' 232 0) ('h5g_flags' 224 0)
-('h5generic_flags' 221 0) ('h5fd_flags' 222 0) ('h5i_flags' 218 0) (
-'h5p_flags' 230 0) ('h5fd_hid_flags' 223 0) ('h5r_flags' 220 0) (
-'h5z_flags' 219 0) ('h5d_flags' 226 0) ('h5lib_flags' 228 0) ('h5l_flags'
-227 0) ('h5fd_hid_flags' 223 0) ('floating_types' 231 0) (
-'predefined_types' 216 0) ('h5p_flags_int' 217 0) ('h5i_flags' 218 0) (
-'integer_types' 232 0) ('h5d_flags' 226 0) ('h5z_flags' 219 0) (
-'h5f_flags' 229 0) ('h5t_flags' 225 0) ('h5i_flags' 218 0) ('h5fd_flags'
-222 0) ('h5fd_hid_flags' 223 0) ('h5lib_flags' 228 0) ('h5p_flags' 230 0)
-('h5p_flags_int' 217 0) ('h5g_flags' 224 0) ('floating_types' 231 0) (
-'h5generic_flags' 221 0) ('h5o_flags' 233 0) ('h5s_flags' 215 0) (
-'h5p_flags' 230 0) ('h5t_flags' 225 0) ('predefined_types' 216 0) (
-'h5p_flags_int' 217 0) ('h5p_flags_int' 217 0) ('h5g_flags' 224 0) (
-'h5r_flags' 220 0) ('h5s_flags' 215 0) ('h5z_flags' 219 0) ('h5d_flags'
-226 0) ('integer_types' 232 0) ('h5generic_flags' 221 0) ('h5g_flags'
-224 0) ('h5i_flags' 218 0) ('h5o_flags' 233 0) ('h5fd_flags' 222 0) (
-'h5lib_flags' 228 0) ('h5p_flags' 230 0) ('h5d_flags' 226 0) ('h5f_flags'
-229 0) ('h5f_flags' 229 0) ('h5t_flags' 225 0) ('h5fd_hid_flags' 223 0)
-('h5generic_flags' 221 0) ('h5z_flags' 219 0) ('h5f_flags' 229 0) (
-'h5l_flags' 227 0) ('integer_types' 232 0) ('h5i_flags' 218 0) (
-'h5p_flags_int' 217 0) ('h5fd_hid_flags' 223 0) ('h5z_flags' 219 0) (
-'h5r_flags' 220 0) ('predefined_types' 216 0) ('integer_types' 232 0) (
-'h5generic_flags' 221 0) ('h5fd_flags' 222 0) ('h5o_flags' 233 0) (
-'h5o_flags' 233 0) ('h5g_flags' 224 0) ('floating_types' 231 0) (
-'h5l_flags' 227 0) ('h5f_flags' 229 0) ('h5s_flags' 215 0) ('h5p_flags'
-230 0) ('h5fd_hid_flags' 223 0) ('h5lib_flags' 228 0) ('h5p_flags_int'
-217 0) ('h5fd_flags' 222 0) ('h5d_flags' 226 0) ('predefined_types' 216
-0) ('floating_types' 231 0) ('h5s_flags' 215 0) ('h5i_flags' 218 0) (
-'h5t_flags' 225 0) ('h5r_flags' 220 0) ('h5d_flags' 226 0) ('h5p_flags'
-230 0) ('h5lib_flags' 228 0) ('h5lib_flags' 228 0) ('h5r_flags' 220 0) (
-'h5p_flags' 230 0) ('h5o_flags' 233 0) ('h5t_flags' 225 0) (
-'h5generic_flags' 221 0) ('h5f_flags' 229 0) ('h5g_flags' 224 0) (
-'h5i_flags' 218 0) ('h5t_flags' 225 0) ('h5p_flags' 230 0) (
-'floating_types' 231 0) ('predefined_types' 216 0) ('h5p_flags_int' 217
-0) ('h5r_flags' 220 0) ('h5z_flags' 219 0) ('integer_types' 232 0) (
-'h5o_flags' 233 0) ('h5generic_flags' 221 0) ('h5g_flags' 224 0) (
-'h5s_flags' 215 0) ('h5d_flags' 226 0) ('h5fd_hid_flags' 223 0) (
-'h5r_flags' 220 0) ('h5lib_flags' 228 0) ('h5r_flags' 220 0) ('h5p_flags'
-230 0) ('h5s_flags' 215 0) ('h5fd_hid_flags' 223 0) ('h5fd_flags' 222 0)
-('h5z_flags' 219 0) ('h5l_flags' 227 0) ('h5o_flags' 233 0) ('h5r_flags'
-220 0) ('integer_types' 232 0) ('integer_types' 232 0) ('h5i_flags' 218
-0) ('h5i_flags' 218 0) ('predefined_types' 216 0) ('h5s_flags' 215 0) (
-'h5fd_hid_flags' 223 0) ('floating_types' 231 0) ('h5l_flags' 227 0) (
-'h5g_flags' 224 0) ('h5lib_flags' 228 0) ('predefined_types' 216 0) (
-'h5f_flags' 229 0) ('h5fd_flags' 222 0) ('h5generic_flags' 221 0) (
-'h5o_flags' 233 0) ('h5p_flags' 230 0) ('h5fd_flags' 222 0) ('h5t_flags'
-225 0) ('integer_types' 232 0) ('predefined_types' 216 0) (
-'h5p_flags_int' 217 0) ('h5d_flags' 226 0) ('h5z_flags' 219 0) (
-'h5p_flags_int' 217 0) ('h5l_flags' 227 0) ('h5i_flags' 218 0) (
-'floating_types' 231 0) ('h5s_flags' 215 0) ('integer_types' 232 0) (
-'h5r_flags' 220 0) ('h5generic_flags' 221 0) ('h5f_flags' 229 0) (
-'h5l_flags' 227 0) ('h5fd_hid_flags' 223 0) ('h5p_flags' 230 0) (
-'h5f_flags' 229 0) ('h5o_flags' 233 0) ('h5lib_flags' 228 0) ('h5z_flags'
-219 0) ('h5l_flags' 227 0) ('floating_types' 231 0) ('h5generic_flags'
-221 0) ('h5fd_flags' 222 0) ('h5g_flags' 224 0) ('h5l_flags' 227 0) (
-'h5o_flags' 233 0) ('h5z_flags' 219 0) ('h5t_flags' 225 0) (
-'predefined_types' 216 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 228 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 234 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 228 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 219
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 242 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 219 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 438 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 439 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 440 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 441 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 442 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 443 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 444 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 445 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 446 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 447 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 448 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 449 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 450 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 451 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 452 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 453 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 454 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 455 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 456 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 457 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 458 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 459 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 460 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 461 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 462 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 463 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 464 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 465 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 466 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 467 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 468 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 469 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 470 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 471 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 472 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 473 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 228 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 234 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 228 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 219
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 242 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 219 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 438 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 439 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 440 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 441 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 442 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 443 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 444 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 445 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 446 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 447 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 448 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 449 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 450 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 451 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 452 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 453 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 454 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 455 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 456 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 457 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 458 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 459 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 460 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 461 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 462 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 463 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 464 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 465 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 466 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 467 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 468 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 469 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 470 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 471 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 472 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 473 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 228 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 234 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 228 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 219
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 242 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 219 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 438 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 439 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 440 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 441 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 442 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 443 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 444 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 445 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 446 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 447 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 448 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 449 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 450 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 451 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 452 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 453 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 454 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 455 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 456 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 457 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 458 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 459 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 460 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 461 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 462 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 463 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 464 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 465 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 466 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 467 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 468 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 469 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 470 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 471 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 472 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 473 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 228 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 234 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 228 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 219
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 242 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 219 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 438 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 439 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 440 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 441 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 442 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 443 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 444 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 445 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 446 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 447 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 448 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 449 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 450 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 451 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 452 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 453 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 454 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 455 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 456 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 457 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 458 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 459 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 460 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 461 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 462 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 463 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 464 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 465 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 466 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 467 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 468 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 469 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 470 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 471 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 472 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 473 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 228 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 234 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 228 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 219
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 242 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 219 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 438 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 439 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 440 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 441 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 442 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 443 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 444 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 445 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 446 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 447 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 448 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 449 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 450 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 451 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 452 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 453 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 454 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 455 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 456 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 457 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 458 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 459 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 460 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 461 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 462 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 463 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 464 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 465 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 466 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 467 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 468 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 469 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 470 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 471 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 472 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 473 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 228 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 234 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 228 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 219
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 242 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 219 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 438 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 439 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 440 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 441 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 442 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 443 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 444 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 445 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 446 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 447 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 448 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 449 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 450 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 451 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 452 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 453 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 454 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 455 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 456 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 457 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 458 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 459 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 460 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 461 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 462 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 463 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 464 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 465 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 466 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 467 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 468 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 469 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 470 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 471 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 472 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 473 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 228 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 234 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 228 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 219
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 242 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 219 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 438 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 439 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 440 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 441 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 442 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 443 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 444 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 445 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 446 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 447 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 448 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 449 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 450 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 451 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 452 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 453 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 454 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 455 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 456 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 457 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 458 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 459 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 460 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 461 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 462 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 463 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 464 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 465 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 466 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 467 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 468 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 469 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 470 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 471 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 472 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 473 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 228 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 234 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 228 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 219
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 242 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 219 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 438 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 439 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 440 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 441 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 442 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 443 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 444 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 445 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 446 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 447 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 448 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 449 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 450 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 451 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 452 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 453 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 454 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 455 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 456 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 457 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 458 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 459 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 460 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 461 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 462 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 463 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 464 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 465 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 466 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 467 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 468 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 469 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 470 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 471 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 472 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 473 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 228 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 234 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 228 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 219
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 242 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 219 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 438 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 439 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 440 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 441 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 442 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 443 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 444 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 445 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 446 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 447 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 448 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 449 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 450 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 451 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 452 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 453 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 454 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 455 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 456 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 457 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 458 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 459 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 460 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 461 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 462 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 463 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 464 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 465 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 466 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 467 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 468 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 469 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 470 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 471 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 472 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 473 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 228 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 234 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 228 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 219
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 242 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 219 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 438 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 439 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 440 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 441 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 442 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 443 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 444 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 445 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 446 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 447 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 448 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 449 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 450 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 451 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 452 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 453 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 454 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 455 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 456 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 457 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 458 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 459 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 460 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 461 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 462 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 463 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 464 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 465 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 466 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 467 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 468 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 469 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 470 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 471 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 472 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 473 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 228 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 234 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 228 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 219
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 242 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 219 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 438 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 439 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 440 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 441 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 442 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 443 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 444 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 445 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 446 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 447 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 448 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 449 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 450 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 451 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 452 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 453 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 454 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 455 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 456 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 457 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 458 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 459 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 460 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 461 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 462 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 463 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 464 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 465 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 466 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 467 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 468 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 469 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 470 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 471 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 472 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 473 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 228 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 234 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 228 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 219
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 242 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 219 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 438 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 439 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 440 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 441 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 442 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 443 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 444 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 445 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 446 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 447 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 448 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 449 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 450 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 451 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 452 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 453 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 454 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 455 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 456 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 457 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 458 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 459 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 460 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 461 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 462 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 463 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 464 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 465 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 466 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 467 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 468 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 469 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 470 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 471 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 472 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 473 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 228 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 234 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 228 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 219
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 242 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 219 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 438 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 439 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 440 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 441 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 442 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 443 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 444 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 445 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 446 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 447 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 448 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 449 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 450 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 451 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 452 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 453 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 454 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 455 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 456 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 457 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 458 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 459 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 460 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 461 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 462 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 463 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 464 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 465 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 466 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 467 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 468 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 469 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 470 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 471 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 472 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 473 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 228 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 234 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 228 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 219
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 242 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 219 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 438 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 439 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 440 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 441 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 442 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 443 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 444 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 445 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 446 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 447 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 448 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 449 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 450 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 451 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 452 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 453 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 454 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 455 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 456 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 457 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 458 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 459 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 460 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 461 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 462 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 463 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 464 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 465 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 466 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 467 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 468 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 469 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 470 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 471 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 472 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 473 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 228 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 234 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 228 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 237 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 238 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 219
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 239 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 242 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 219 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 219 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 225 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-225 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 220 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 230 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-230 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 227 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 218 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 223 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-223 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 222 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 226 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-226 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 224 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 221 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-221 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 229 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 438 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-229 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 439 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 440 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 441 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 442 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 443 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 444 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 445 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 446 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 447 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 448 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 449 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 450 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 451 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 452 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 453 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 454 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 455 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 232 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 456 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 457 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 458 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 231 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 459 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-231 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 460 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 461 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 462 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 463 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 464 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 465 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 466 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 467 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 468 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 469 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 470 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 471 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 472 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 473 ())))
-
-(474 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-475 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-476 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-477 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-231 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-478 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-479 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-480 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-481 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-482 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-483 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-484 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-485 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-486 'h5_dble_interface' 'h5_dble_interface' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-419 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-420 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-487 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-421 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-415 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-418 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-488 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-413 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-417 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-489 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-414 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-490 'h5acreate_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 491 0 (492 493 494 495
-496 497 498 499 500 501) () 0 () ())
-502 'h5aclose_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 503 0 (504 505) () 0 () ())
-506 'h5a' 'h5a' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-234 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-507 'h5adelete_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 508 0 (509 510 511 512
-513 514 515) () 0 () ())
-516 'h5adelete_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 517 0 (518 519 520) () 0 () ())
-521 'h5adelete_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 522 0 (523 524 525 526
-527) () 0 () ())
-528 'h5aexists_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 529 0 (530 531 532 533) () 0 () ())
-534 'h5aget_info_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 535 0 (536
-537 538 539 540 541 542 543 544 545 546) () 0 () ())
-547 'h5aget_info_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 548 0 (549
-550 551 552 553 554 555 556 557) () 0 () ())
-558 'h5aget_create_plist_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 559 0 (560 561 562) () 0 ()
-())
-563 'h5aexists_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 564 0 (565 566 567 568
-569 570) () 0 () ())
-571 'h5aget_name_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 572 0 (573
-574 575 576 577 578 579 580 581) () 0 () ())
-582 'h5aget_space_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 583 0 (584 585 586) () 0 () ())
-587 'h5aget_num_attrs_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 588 0 (589 590 591) () 0 () ())
-592 'h5aget_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 593 0 (594 595 596 597) () 0 () ())
-598 'h5aget_info_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 599 0 (600 601 602 603 604 605) () 0 () ())
-606 'h5aget_type_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 607 0 (608 609 610) () 0 () ())
-611 'h5aopen_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 612 0 (613 614 615 616 617) ()
-0 () ())
-618 'h5aopen_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 619 0 (620 621 622 623
-624 625 626) () 0 () ())
-15 'h5aread_char_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 627 0 (628 629 630 631 632) () 0 () ())
-16 'h5aread_char_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 633 0 (634 635 636 637 638) () 0 () ())
-639 'h5aopen_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 640 0 (641 642 643 644) () 0 () ())
-645 'h5aopen_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 646 0 (647 648 649 650) () 0 () ())
-13 'h5aread_char_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 651 0 (652 653 654 655 656) () 0 () ())
-12 'h5aread_char_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 657 0 (658 659 660 661 662) () 0 () ())
-11 'h5aread_char_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 663 0 (664 665 666 667 668) () 0 () ())
-14 'h5aread_char_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 669 0 (670 671 672 673 674) () 0 () ())
-675 'h5aopen_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 676 0 (677 678 679 680
-681 682 683 684 685) () 0 () ())
-17 'h5aread_char_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 686 0 (687 688 689 690 691) () 0 () ())
-32 'h5aread_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 692 0 (693 694 695 696 697)
-() 0 () ())
-30 'h5aread_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 698 0 (699 700 701 702 703)
-() 0 () ())
-31 'h5aread_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 704 0 (705 706 707 708 709)
-() 0 () ())
-29 'h5aread_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 710 0 (711 712 713 714 715)
-() 0 () ())
-26 'h5aread_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 716 0 (717 718 719 720 721)
-() 0 () ())
-33 'h5aread_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 722 0 (723
-724 725 726 727) () 0 () ())
-27 'h5aread_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 728 0 (729 730 731 732 733)
-() 0 () ())
-24 'h5aread_integer_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 734 0 (735 736 737 738 739) () 0 () ())
-28 'h5aread_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 740 0 (741 742 743 744 745)
-() 0 () ())
-23 'h5aread_integer_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 746 0 (747 748 749 750 751) () 0 () ())
-21 'h5aread_integer_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 752 0 (753 754 755 756 757) () 0 () ())
-19 'h5aread_integer_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 758 0 (759 760 761 762 763) () 0 () ())
-18 'h5aread_integer_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 764 0 (765 766 767 768 769) () 0 () ())
-20 'h5aread_integer_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 770 0 (771 772 773 774 775) () 0 () ())
-22 'h5aread_integer_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 776 0 (777 778 779 780 781) () 0 () ())
-8 'h5aread_real_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 782 0 (783 784 785 786 787) () 0 () ())
-25 'h5aread_integer_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 788 0 (789 790 791 792 793)
-() 0 () ())
-10 'h5aread_char_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 794 0 (795 796 797 798 799) () 0 () ())
-800 'h5aget_storage_size_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 801 0 (802 803 804) () 0 ()
-())
-5 'h5aread_real_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 805 0 (806 807 808 809 810) () 0 () ())
-6 'h5aread_real_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 811 0 (812 813 814 815 816) () 0 () ())
-7 'h5aread_real_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 817 0 (818 819 820 821 822) () 0 () ())
-823 'h5acreate_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 824 0 (825 826 827 828 829
-830 831 832) () 0 () ())
-416 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2 'h5aread_real_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 833 0 (834 835 836 837 838) () 0 () ())
-9 'h5aread_real_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 839 0 (840 841 842 843 844) () 0 () ())
-845 'h5arename_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 846 0 (847 848 849 850) () 0 () ())
-57 'h5awrite_char_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 851 0 (852 853 854 855 856) () 0 () ())
-857 'h5arename_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 858 0 (859 860 861 862
-863 864) () 0 () ())
-3 'h5aread_real_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 865 0 (866 867 868 869 870) () 0 () ())
-4 'h5aread_real_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 871 0 (872 873 874 875 876) () 0 () ())
-55 'h5awrite_char_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 877 0 (878 879 880 881 882) () 0 () ())
-54 'h5awrite_char_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 883 0 (884 885 886 887 888) () 0 () ())
-52 'h5awrite_char_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 889 0 (890 891 892 893 894) () 0 () ())
-51 'h5awrite_char_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 895 0 (896 897 898 899 900) () 0 () ())
-53 'h5awrite_char_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 901 0 (902 903 904 905 906) () 0 () ())
-56 'h5awrite_char_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 907 0 (908 909 910 911 912) () 0 () ())
-72 'h5awrite_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 913 0 (914 915 916 917 918)
-() 0 () ())
-70 'h5awrite_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 919 0 (920 921 922 923 924)
-() 0 () ())
-69 'h5awrite_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 925 0 (926 927 928 929 930)
-() 0 () ())
-71 'h5awrite_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 931 0 (932 933 934 935 936)
-() 0 () ())
-73 'h5awrite_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 937 0 (938 939 940 941 942)
-() 0 () ())
-68 'h5awrite_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 943 0 (944 945 946 947 948)
-() 0 () ())
-74 'h5awrite_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 949 0 (950
-951 952 953 954) () 0 () ())
-65 'h5awrite_integer_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 955 0 (956 957 958 959 960) () 0 () ())
-62 'h5awrite_integer_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 961 0 (962 963 964 965 966) () 0 () ())
-63 'h5awrite_integer_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 967 0 (968 969 970 971 972) () 0 () ())
-60 'h5awrite_integer_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 973 0 (974 975 976 977 978) () 0 () ())
-61 'h5awrite_integer_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 979 0 (980 981 982 983 984) () 0 () ())
-64 'h5awrite_integer_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 985 0 (986 987 988 989 990) () 0 () ())
-66 'h5awrite_integer_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 991 0 (992 993 994 995 996)
-() 0 () ())
-48 'h5awrite_real_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 997 0 (998 999 1000 1001 1002) () 0 () ())
-46 'h5awrite_real_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1003 0 (1004 1005 1006 1007 1008) () 0 () ())
-44 'h5awrite_real_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1009 0 (1010 1011 1012 1013 1014) () 0 () ())
-43 'h5awrite_real_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1015 0 (1016 1017 1018 1019 1020) () 0 () ())
-1021 'h5check_version_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1022 0 (1023 1024 1025 1026)
-() 0 () ())
-50 'h5awrite_real_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1027 0 (1028 1029 1030 1031 1032) () 0 ()
-())
-45 'h5awrite_real_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1033 0 (1034 1035 1036 1037 1038) () 0 () ())
-47 'h5awrite_real_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1039 0 (1040 1041 1042 1043 1044) () 0 () ())
-1045 'h5d' 'h5d' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-1046 'h5close_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1047 0 (1048) () 0 () ())
-396 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-397 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-394 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-393 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-395 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-49 'h5awrite_real_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1049 0 (1050 1051 1052 1053 1054) () 0 () ())
-59 'h5awrite_integer_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1055 0 (1056 1057 1058 1059 1060) () 0 ()
-())
-67 'h5awrite_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1061 0 (1062 1063 1064 1065
-1066) () 0 () ())
-381 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-398 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-379 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-400 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-399 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-386 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-383 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-388 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-382 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-226 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-384 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-385 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-387 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-389 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-390 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-391 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-392 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1067 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'22') () 0 () ())
-1068 'h5dcreate_anon_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1069 0 (1070 1071 1072
-1073 1074 1075 1076) () 0 () ())
-79 'h5dfill_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1077 0 (1078 1079 1080 1081)
-() 0 () ())
-77 'h5dfill_real' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1082 0 (1083 1084 1085 1086) () 0 () ())
-1087 'h5dget_access_plist_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1088 0 (1089 1090 1091) () 0
-() ())
-78 'h5dfill_integer' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1092 0 (1093 1094 1095 1096) () 0 () ())
-1097 'h5dget_create_plist_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1098 0 (1099 1100 1101) () 0
-() ())
-76 'h5dfill_char' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1102 0 (1103 1104 1105 1106) () 0 () ())
-1107 'h5dcreate_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1108 0 (1109 1110 1111 1112
-1113 1114 1115 1116 1117) () 0 () ())
-1118 'h5dget_space_status_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1119 0 (1120 1121 1122) () 0
-() ())
-1123 'h5dget_type_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1124 0 (1125 1126 1127) () 0 () ())
-1128 'h5dont_atexit_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1129 0 (1130) () 0 () ())
-93 'h5dread_char_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1131 0 (1132 1133 1134 1135
-1136 1137 1138 1139) () 0 () ())
-94 'h5dread_char_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1140 0 (1141 1142 1143 1144
-1145 1146 1147 1148) () 0 () ())
-1149 'h5dopen_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1150 0 (1151 1152 1153 1154
-1155) () 0 () ())
-1156 'h5dget_storage_size_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1157 0 (1158 1159 1160) () 0
-() ())
-1161 'h5dget_space_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1162 0 (1163 1164 1165) () 0 () ())
-89 'h5dread_char_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1166 0 (1167 1168 1169 1170
-1171 1172 1173 1174) () 0 () ())
-90 'h5dread_char_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1175 0 (1176 1177 1178 1179
-1180 1181 1182 1183) () 0 () ())
-88 'h5dread_char_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1184 0 (1185 1186 1187 1188
-1189 1190 1191 1192) () 0 () ())
-91 'h5dread_char_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1193 0 (1194 1195 1196 1197
-1198 1199 1200 1201) () 0 () ())
-112 'h5dread_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1202 0 (
-1203 1204 1205 1206 1207 1208 1209 1210) () 0 () ())
-95 'h5dread_char_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1211 0 (1212 1213 1214
-1215 1216 1217 1218 1219) () 0 () ())
-108 'h5dread_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1220 0 (
-1221 1222 1223 1224 1225 1226 1227 1228) () 0 () ())
-106 'h5dread_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1229 0 (
-1230 1231 1232 1233 1234 1235 1236 1237) () 0 () ())
-113 'h5dread_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ())
-1238 0 (1239 1240 1241 1242 1243 1244 1245 1246) () 0 () ())
-107 'h5dread_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1247 0 (
-1248 1249 1250 1251 1252 1253 1254 1255) () 0 () ())
-109 'h5dread_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1256 0 (
-1257 1258 1259 1260 1261 1262 1263 1264) () 0 () ())
-110 'h5dread_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1265 0 (
-1266 1267 1268 1269 1270 1271 1272 1273) () 0 () ())
-100 'h5dread_integer_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1274 0 (1275 1276 1277
-1278 1279 1280 1281 1282) () 0 () ())
-101 'h5dread_integer_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1283 0 (1284 1285 1286
-1287 1288 1289 1290 1291) () 0 () ())
-97 'h5dread_integer_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1292 0 (1293 1294 1295
-1296 1297 1298 1299 1300) () 0 () ())
-98 'h5dread_integer_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1301 0 (1302 1303 1304
-1305 1306 1307 1308 1309) () 0 () ())
-99 'h5dread_integer_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1310 0 (1311 1312 1313
-1314 1315 1316 1317 1318) () 0 () ())
-102 'h5dread_integer_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1319 0 (1320 1321 1322
-1323 1324 1325 1326 1327) () 0 () ())
-111 'h5dread_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1328 0 (
-1329 1330 1331 1332 1333 1334 1335 1336) () 0 () ())
-92 'h5dread_char_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1337 0 (1338 1339 1340 1341
-1342 1343 1344 1345) () 0 () ())
-84 'h5dread_real_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1346 0 (1347 1348 1349 1350
-1351 1352 1353 1354) () 0 () ())
-85 'h5dread_real_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1355 0 (1356 1357 1358 1359
-1360 1361 1362 1363) () 0 () ())
-86 'h5dread_real_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1364 0 (1365 1366 1367 1368
-1369 1370 1371 1372) () 0 () ())
-81 'h5dread_real_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1373 0 (1374 1375 1376 1377
-1378 1379 1380 1381) () 0 () ())
-87 'h5dread_real_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1382 0 (1383 1384 1385
-1386 1387 1388 1389 1390) () 0 () ())
-80 'h5dread_real_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1391 0 (1392 1393 1394 1395
-1396 1397 1398 1399) () 0 () ())
-105 'h5dread_reference_obj' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1400 0 (
-1401 1402 1403 1404 1405 1406 1407 1408) () 0 () ())
-104 'h5dread_reference_dsetreg' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1409 0 (
-1410 1411 1412 1413 1414 1415 1416 1417) () 0 () ())
-82 'h5dread_real_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1418 0 (1419 1420 1421 1422
-1423 1424 1425 1426) () 0 () ())
-83 'h5dread_real_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1427 0 (1428 1429 1430 1431
-1432 1433 1434 1435) () 0 () ())
-103 'h5dread_integer_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1436 0 (
-1437 1438 1439 1440 1441 1442 1443 1444) () 0 () ())
-96 'h5dread_integer_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1445 0 (1446 1447 1448
-1449 1450 1451 1452 1453) () 0 () ())
-1454 'h5dclose_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1455 0 (1456 1457) () 0 () ())
-114 'h5dread_vl_string' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1458 0 (1459 1460 1461
-1462 1463 1464 1465 1466 1467) () 0 () ())
-1468 'h5dvlen_get_max_len_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1469 0 (1470 1471 1472 1473
-1474) () 0 () ())
-134 'h5dwrite_char_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1475 0 (1476 1477 1478
-1479 1480 1481 1482 1483) () 0 () ())
-75 'h5dset_extent_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1484 0 (1485 1486 1487) () 0 () ())
-132 'h5dwrite_char_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1488 0 (1489 1490 1491
-1492 1493 1494 1495 1496) () 0 () ())
-131 'h5dwrite_char_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1497 0 (1498 1499 1500
-1501 1502 1503 1504 1505) () 0 () ())
-133 'h5dwrite_char_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1506 0 (1507 1508 1509
-1510 1511 1512 1513 1514) () 0 () ())
-115 'h5dread_vl_real' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1515 0 (1516 1517 1518
-1519 1520 1521 1522 1523 1524) () 0 () ())
-129 'h5dwrite_char_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1525 0 (1526 1527 1528
-1529 1530 1531 1532 1533) () 0 () ())
-130 'h5dwrite_char_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1534 0 (1535 1536 1537
-1538 1539 1540 1541 1542) () 0 () ())
-152 'h5dwrite_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1543 0 (
-1544 1545 1546 1547 1548 1549 1550 1551) () 0 () ())
-135 'h5dwrite_char_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1552 0 (
-1553 1554 1555 1556 1557 1558 1559 1560) () 0 () ())
-149 'h5dwrite_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1561 0 (
-1562 1563 1564 1565 1566 1567 1568 1569) () 0 () ())
-150 'h5dwrite_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1570 0 (
-1571 1572 1573 1574 1575 1576 1577 1578) () 0 () ())
-151 'h5dwrite_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1579 0 (
-1580 1581 1582 1583 1584 1585 1586 1587) () 0 () ())
-128 'h5dwrite_char_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1588 0 (1589 1590 1591
-1592 1593 1594 1595 1596) () 0 () ())
-147 'h5dwrite_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1597 0 (
-1598 1599 1600 1601 1602 1603 1604 1605) () 0 () ())
-153 'h5dwrite_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ())
-1606 0 (1607 1608 1609 1610 1611 1612 1613 1614) () 0 () ())
-142 'h5dwrite_integer_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1615 0 (1616 1617 1618
-1619 1620 1621 1622 1623) () 0 () ())
-140 'h5dwrite_integer_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1624 0 (1625 1626 1627
-1628 1629 1630 1631 1632) () 0 () ())
-139 'h5dwrite_integer_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1633 0 (1634 1635 1636
-1637 1638 1639 1640 1641) () 0 () ())
-141 'h5dwrite_integer_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1642 0 (1643 1644 1645
-1646 1647 1648 1649 1650) () 0 () ())
-146 'h5dwrite_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1651 0 (
-1652 1653 1654 1655 1656 1657 1658 1659) () 0 () ())
-137 'h5dwrite_integer_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1660 0 (1661 1662 1663
-1664 1665 1666 1667 1668) () 0 () ())
-136 'h5dwrite_integer_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1669 0 (1670 1671 1672
-1673 1674 1675 1676 1677) () 0 () ())
-143 'h5dwrite_integer_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1678 0 (
-1679 1680 1681 1682 1683 1684 1685 1686) () 0 () ())
-124 'h5dwrite_real_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1687 0 (1688 1689 1690
-1691 1692 1693 1694 1695) () 0 () ())
-125 'h5dwrite_real_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1696 0 (1697 1698 1699
-1700 1701 1702 1703 1704) () 0 () ())
-126 'h5dwrite_real_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1705 0 (1706 1707 1708
-1709 1710 1711 1712 1713) () 0 () ())
-138 'h5dwrite_integer_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1714 0 (1715 1716 1717
-1718 1719 1720 1721 1722) () 0 () ())
-122 'h5dwrite_real_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1723 0 (1724 1725 1726
-1727 1728 1729 1730 1731) () 0 () ())
-120 'h5dwrite_real_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1732 0 (1733 1734 1735
-1736 1737 1738 1739 1740) () 0 () ())
-127 'h5dwrite_real_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1741 0 (
-1742 1743 1744 1745 1746 1747 1748 1749) () 0 () ())
-121 'h5dwrite_real_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1750 0 (1751 1752 1753
-1754 1755 1756 1757 1758) () 0 () ())
-145 'h5dwrite_reference_obj' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1759 0 (
-1760 1761 1762 1763 1764 1765 1766 1767) () 0 () ())
-144 'h5dwrite_reference_dsetreg' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1768 0 (
-1769 1770 1771 1772 1773 1774 1775 1776) () 0 () ())
-123 'h5dwrite_real_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1777 0 (1778 1779 1780
-1781 1782 1783 1784 1785) () 0 () ())
-117 'h5dwrite_vl_string' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1786 0 (1787 1788 1789
-1790 1791 1792 1793 1794 1795) () 0 () ())
-118 'h5dwrite_vl_real' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1796 0 (1797 1798 1799
-1800 1801 1802 1803 1804 1805) () 0 () ())
-119 'h5dwrite_vl_integer' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1806 0 (1807 1808 1809
-1810 1811 1812 1813 1814 1815) () 0 () ())
-1816 'h5eget_major_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1817 0 (1818 1819 1820 1821) () 0 () ())
-1822 'h5eclear_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1823 0 (1824) () 0 () ())
-1825 'h5eget_minor_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1826 0 (1827 1828 1829) () 0 () ())
-1830 'h5e' 'h5e' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-1831 'h5eset_auto_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1832 0 (1833 1834) () 0 () ())
-1835 'h5f' 'h5f' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-436 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-435 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-437 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-430 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-429 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-432 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-439 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-438 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1836 'h5eprint_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1837 0 (1838 1839) () 0 () ())
-148 'h5dwrite_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1840 0 (
-1841 1842 1843 1844 1845 1846 1847 1848) () 0 () ())
-116 'h5dread_vl_integer' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1849 0 (1850 1851 1852
-1853 1854 1855 1856 1857 1858) () 0 () ())
-380 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-229 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-422 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-423 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-427 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-425 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-428 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-424 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-434 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-433 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-426 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1859 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'19') () 0 () ())
-367 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1860 'h5fcreate_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1861 0 (1862 1863 1864 1865
-1866 1867) () 0 () ())
-1868 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-222 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-366 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1869 'h5fclose_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1870 0 (1871 1872) () 0 () ())
-1873 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-365 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-372 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-375 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-370 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-371 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-369 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-377 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-374 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-368 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-376 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-378 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-362 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-361 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1874 'h5fflush_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1875 0 (1876 1877 1878) () 0 () ())
-363 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-364 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-373 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-223 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-1879 'h5fget_name_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1880 0 (1881 1882 1883 1884) () 0 () ())
-1885 'h5fget_freespace_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1886 0 (1887 1888 1889) () 0 () ())
-1890 'h5fget_filesize_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1891 0 (1892 1893 1894) () 0 () ())
-1895 'h5fget_create_plist_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1896 0 (1897 1898 1899) () 0
-() ())
-1900 'h5fis_hdf5_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1901 0 (1902 1903 1904) () 0 () ())
-1905 'h5fmount_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1906 0 (1907 1908 1909 1910
-1911) () 0 () ())
-1912 'h5fget_obj_ids_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1913 0 (1914 1915 1916
-1917 1918 1919) () 0 () ())
-1920 'h5fget_obj_count_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1921 0 (1922 1923 1924 1925) () 0 () ())
-1926 'h5funmount_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1927 0 (1928 1929 1930) () 0 () ())
-1931 'h5freopen_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1932 0 (1933 1934 1935) () 0 () ())
-1936 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-1937 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'12') () 0 () ())
-224 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-410 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1938 'h5g' 'h5g' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-1939 'h5fopen_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1940 0 (1941 1942 1943 1944
-1945) () 0 () ())
-408 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-406 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-407 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-409 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-404 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-403 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-401 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-402 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1946 'h5garbage_collect_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1947 0 (1948) () 0 () ())
-1949 'h5gcreate_anon_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1950 0 (1951 1952 1953
-1954 1955) () 0 () ())
-1956 'h5gclose_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1957 0 (1958 1959) () 0 () ())
-221 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1
-EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9'))
-0 () ())
-1960 'h5gcreate_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1961 0 (1962 1963 1964 1965
-1966 1967 1968 1969) () 0 () ())
-1970 'h5get_libversion_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1971 0 (1972 1973 1974 1975)
-() 0 () ())
-1976 'h5gget_comment_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1977 0 (1978 1979 1980 1981 1982) () 0 ()
-())
-1983 'h5gget_info_by_idx_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1984 0 (
-1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995) () 0 () ())
-1996 'h5gget_linkval_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1997 0 (1998 1999 2000 2001 2002) () 0 ()
-())
-2003 'h5gget_obj_info_idx_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2004 0 (2005 2006 2007 2008
-2009 2010) () 0 () ())
-2011 'h5gget_info_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2012 0 (2013 2014 2015 2016
-2017 2018) () 0 () ())
-2019 'h5gget_info_by_name_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2020 0 (
-2021 2022 2023 2024 2025 2026 2027 2028) () 0 () ())
-2029 'h5gget_create_plist_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2030 0 (2031 2032 2033) () 0
-() ())
-2034 'h5glink2_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2035 0 (2036 2037 2038 2039 2040 2041) () 0 ()
-())
-2042 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-412 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2043 'h5gmove2_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2044 0 (2045 2046 2047 2048 2049) () 0 () ())
-2050 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-2051 'h5gn_members_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2052 0 (2053 2054 2055 2056) () 0 () ())
-2057 'h5gset_comment_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2058 0 (2059 2060 2061 2062) () 0 () ())
-2063 'h5gopen_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2064 0 (2065 2066 2067 2068
-2069) () 0 () ())
-355 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2070 'h5i' 'h5i' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-2071 'h5gunlink_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2072 0 (2073 2074 2075) () 0 () ())
-2076 'h5gmove_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2077 0 (2078 2079 2080 2081) () 0 () ())
-356 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-358 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-357 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-354 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-218 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-2082 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-360 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2083 'h5iget_file_id_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2084 0 (2085 2086 2087) () 0 () ())
-2088 'h5iget_name_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2089 0 (2090 2091 2092 2093 2094) () 0 () ())
-2095 'h5iget_ref_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2096 0 (2097 2098 2099) () 0 () ())
-2100 'h5iinc_ref_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2101 0 (2102 2103 2104) () 0 () ())
-2105 'h5iget_type_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2106 0 (2107 2108 2109) () 0 () ())
-2110 'h5idec_ref_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2111 0 (2112 2113 2114) () 0 () ())
-359 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2115 'h5glink_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2116 0 (2117 2118 2119 2120 2121) () 0 () ())
-405 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-411 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2122 'h5l' 'h5l' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-353 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-349 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-350 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-348 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2123 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6')
-() 0 () ())
-227 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-351 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2124 'h5lcopy_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2125 0 (2126 2127 2128 2129
-2130 2131 2132) () 0 () ())
-2133 'h5lcreate_hard_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2134 0 (2135 2136 2137
-2138 2139 2140 2141) () 0 () ())
-2142 'h5lcreate_external_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2143 0 (
-2144 2145 2146 2147 2148 2149 2150) () 0 () ())
-2151 'h5ldelete_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2152 0 (2153 2154 2155 2156)
-() 0 () ())
-2157 'h5lexists_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2158 0 (2159 2160 2161 2162
-2163) () 0 () ())
-2164 'h5ldelete_by_idx_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2165 0 (2166 2167 2168
-2169 2170 2171 2172) () 0 () ())
-2173 'h5lcreate_soft_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2174 0 (2175 2176 2177
-2178 2179 2180) () 0 () ())
-352 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2181 'h5iis_valid_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2182 0 (2183 2184 2185) () 0 () ())
-2186 'h5lget_name_by_idx_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2187 0 (
-2188 2189 2190 2191 2192 2193 2194 2195 2196) () 0 () ())
-2197 'h5lget_info_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2198 0 (2199 2200 2201 2202
-2203 2204 2205 2206 2207 2208) () 0 () ())
-2209 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-228 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-2210 'h5lmove_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2211 0 (2212 2213 2214 2215
-2216 2217 2218) () 0 () ())
-2219 'h5ltfind_dataset_f' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL FUNCTION) (INTEGER 4 ()) 2220 0 (2221 2222) () 2219 ()
-())
-2223 'h5lt' 'h5lt' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-2224 'h5ltget_attribute_info_f' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2225 0 (2226 2227 2228 2229
-2230 2231 2232) () 0 () ())
-2233 'h5ltget_attribute_float_f' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2234 0 (2235 2236 2237 2238
-2239) () 0 () ())
-2240 'h5ltget_attribute_ndims_f' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2241 0 (2242 2243 2244 2245
-2246) () 0 () ())
-2247 'h5ltget_attribute_string_f' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2248 0 (2249 2250 2251 2252
-2253) () 0 () ())
-2254 'h5ltget_attribute_int_f' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2255 0 (2256 2257 2258 2259
-2260) () 0 () ())
-2261 'h5ltget_attribute_double_f' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2262 0 (2263 2264 2265 2266
-2267) () 0 () ())
-165 'h5ltmake_dataset_double_f_1' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2268 0 (2269 2270 2271 2272
-2273 2274) () 0 () ())
-2275 'h5ltget_dataset_ndims_f' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2276 0 (2277 2278 2279 2280)
-() 0 () ())
-2281 'h5ltget_dataset_info_f' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2282 0 (2283 2284 2285 2286
-2287 2288) () 0 () ())
-163 'h5ltmake_dataset_double_f_3' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2289 0 (2290 2291 2292 2293
-2294 2295) () 0 () ())
-164 'h5ltmake_dataset_double_f_2' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2296 0 (2297 2298 2299 2300
-2301 2302) () 0 () ())
-2303 'h5lis_registered_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2304 0 (2305 2306 2307) () 0 () ())
-2308 'h5lib' 'h5lib' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-155 'h5ltmake_dataset_f_double2' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2309 0 (2310 2311 2312 2313
-2314 2315 2316) () 0 () ())
-156 'h5ltmake_dataset_f_double1' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2317 0 (2318 2319 2320 2321
-2322 2323 2324) () 0 () ())
-159 'h5ltmake_dataset_f_float1' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2325 0 (2326 2327 2328 2329
-2330 2331 2332) () 0 () ())
-157 'h5ltmake_dataset_f_float3' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2333 0 (2334 2335 2336 2337
-2338 2339 2340) () 0 () ())
-162 'h5ltmake_dataset_f_int1' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2341 0 (2342 2343 2344 2345
-2346 2347 2348) () 0 () ())
-158 'h5ltmake_dataset_f_float2' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2349 0 (2350 2351 2352 2353
-2354 2355 2356) () 0 () ())
-154 'h5ltmake_dataset_f_double3' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2357 0 (2358 2359 2360 2361
-2362 2363 2364) () 0 () ())
-160 'h5ltmake_dataset_f_int3' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2365 0 (2366 2367 2368 2369
-2370 2371 2372) () 0 () ())
-168 'h5ltmake_dataset_float_f_1' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2373 0 (2374 2375 2376 2377
-2378 2379) () 0 () ())
-166 'h5ltmake_dataset_float_f_3' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2380 0 (2381 2382 2383 2384
-2385 2386) () 0 () ())
-167 'h5ltmake_dataset_float_f_2' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2387 0 (2388 2389 2390 2391
-2392 2393) () 0 () ())
-171 'h5ltmake_dataset_int_f_1' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2394 0 (2395 2396 2397 2398
-2399 2400) () 0 () ())
-2401 'h5ltmake_dataset_string_f' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2402 0 (2403 2404 2405 2406)
-() 0 () ())
-169 'h5ltmake_dataset_int_f_3' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2407 0 (2408 2409 2410 2411
-2412 2413) () 0 () ())
-170 'h5ltmake_dataset_int_f_2' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2414 0 (2415 2416 2417 2418
-2419 2420) () 0 () ())
-161 'h5ltmake_dataset_f_int2' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2421 0 (2422 2423 2424 2425
-2426 2427 2428) () 0 () ())
-172 'h5ltread_dataset_double_f_3' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2429 0 (2430 2431 2432 2433
-2434) () 0 () ())
-173 'h5ltread_dataset_double_f_2' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2435 0 (2436 2437 2438 2439
-2440) () 0 () ())
-174 'h5ltread_dataset_double_f_1' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2441 0 (2442 2443 2444 2445
-2446) () 0 () ())
-2447 'h5lget_info_by_idx_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2448 0 (
-2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461) () 0 ()
-())
-2462 'h5fget_access_plist_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2463 0 (2464 2465 2466) () 0
-() ())
-431 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-36 'h5ltread_dataset_f_double1' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2467 0 (2468 2469 2470 2471
-2472 2473) () 0 () ())
-34 'h5ltread_dataset_f_double3' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2474 0 (2475 2476 2477 2478
-2479 2480) () 0 () ())
-35 'h5ltread_dataset_f_double2' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2481 0 (2482 2483 2484 2485
-2486 2487) () 0 () ())
-39 'h5ltread_dataset_f_float1' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2488 0 (2489 2490 2491 2492
-2493 2494) () 0 () ())
-40 'h5ltread_dataset_f_int3' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2495 0 (2496 2497 2498 2499
-2500 2501) () 0 () ())
-41 'h5ltread_dataset_f_int2' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2502 0 (2503 2504 2505 2506
-2507 2508) () 0 () ())
-42 'h5ltread_dataset_f_int1' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2509 0 (2510 2511 2512 2513
-2514 2515) () 0 () ())
-37 'h5ltread_dataset_f_float3' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2516 0 (2517 2518 2519 2520
-2521 2522) () 0 () ())
-180 'h5ltread_dataset_int_f_1' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2523 0 (2524 2525 2526 2527
-2528) () 0 () ())
-179 'h5ltread_dataset_int_f_2' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2529 0 (2530 2531 2532 2533
-2534) () 0 () ())
-178 'h5ltread_dataset_int_f_3' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2535 0 (2536 2537 2538 2539
-2540) () 0 () ())
-2541 'h5ltread_dataset_string_f' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2542 0 (2543 2544 2545 2546)
-() 0 () ())
-2547 'h5ltset_attribute_float_f' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2548 0 (2549 2550 2551 2552
-2553 2554) () 0 () ())
-2555 'h5ltset_attribute_double_f' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2556 0 (2557 2558 2559 2560
-2561 2562) () 0 () ())
-175 'h5ltread_dataset_float_f_3' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2563 0 (2564 2565 2566 2567
-2568) () 0 () ())
-176 'h5ltread_dataset_float_f_2' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2569 0 (2570 2571 2572 2573
-2574) () 0 () ())
-2575 'h5o' 'h5o' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-341 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2576 'h5ltset_attribute_string_f' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2577 0 (2578 2579 2580 2581
-2582) () 0 () ())
-2583 'h5ltset_attribute_int_f' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2584 0 (2585 2586 2587 2588
-2589 2590) () 0 () ())
-346 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-342 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-343 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-233 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-347 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-2591 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'22') () 0 () ())
-344 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-345 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-331 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-332 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-329 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-333 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-338 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-335 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-334 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-330 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-327 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-326 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-337 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-336 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-339 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2592 'h5open_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2593 0 (2594) () 0 () ())
-2595 'h5oopen_f' 'h5o' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2596 0 (2597 2598 2599 2600
-2601) () 0 () ())
-2602 'h5p' 'h5p' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-311 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-307 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2603 'h5oopen_by_addr_f' 'h5o' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2604 0 (2605 2606 2607 2608) () 0 () ())
-2609 'h5olink_f' 'h5o' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2610 0 (2611 2612 2613 2614
-2615 2616) () 0 () ())
-340 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-313 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-322 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-323 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-317 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-306 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-320 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-325 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-230 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-217 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-321 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2617 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'18') () 0 () ())
-2618 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-324 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-314 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-328 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-316 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-308 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-315 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-310 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-318 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-312 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-319 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2619 'h5pclose_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2620 0 (2621 2622) () 0 () ())
-2623 'h5pcopy_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2624 0 (2625 2626 2627) () 0 () ())
-2628 'h5pcreate_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2629 0 (2630 2631 2632 2633) () 0 () ())
-2634 'h5pcopy_prop_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2635 0 (2636 2637 2638 2639) () 0 () ())
-2640 'h5pcreate_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2641 0 (2642 2643 2644) () 0 () ())
-2645 'h5pequal_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2646 0 (2647 2648 2649 2650) () 0 () ())
-2651 'h5pclose_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2652 0 (2653 2654) () 0 () ())
-2655 'h5pall_filters_avail_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2656 0 (2657 2658 2659) () 0
-() ())
-2660 'h5pget_alloc_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2661 0 (2662 2663 2664) () 0
-() ())
-2665 'h5pget_attr_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2666 0 (2667 2668 2669) () 0
-() ())
-2670 'h5pget_alignment_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2671 0 (2672 2673 2674 2675) () 0 () ())
-2676 'h5pget_buffer_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2677 0 (2678 2679 2680) () 0 () ())
-2681 'h5pget_btree_ratios_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2682 0 (2683 2684 2685 2686
-2687) () 0 () ())
-181 'h5pget_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2688 0 (2689 2690 2691 2692) () 0 () ())
-2693 'h5pget_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2694 0 (2695 2696 2697 2698 2699 2700) ()
-0 () ())
-2701 'h5pget_attr_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2702 0 (2703 2704 2705 2706)
-() 0 () ())
-2707 'h5pfill_value_defined_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2708 0 (2709 2710 2711) () 0
-() ())
-2712 'h5pexist_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2713 0 (2714 2715 2716 2717) () 0 () ())
-309 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-177 'h5ltread_dataset_float_f_1' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2718 0 (2719 2720 2721 2722
-2723) () 0 () ())
-2724 'h5pget_chunk_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2725 0 (2726 2727 2728 2729) () 0 () ())
-2730 'h5pget_chunk_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2731 0 (2732 2733 2734 2735
-2736) () 0 () ())
-2737 'h5pget_class_name_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2738 0 (2739 2740 2741 2742)
-() 0 () ())
-2743 'h5pget_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2744 0 (2745 2746 2747) () 0 () ())
-2748 'h5pget_create_inter_group_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2749 0 (2750 2751 2752) () 0
-() ())
-2753 'h5pget_copy_object_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2754 0 (2755 2756 2757) () 0
-() ())
-2758 'h5pget_class_parent_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2759 0 (2760 2761 2762) () 0
-() ())
-2763 'h5pget_driver_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2764 0 (2765 2766 2767) () 0 () ())
-184 'h5pget_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2768 0 (2769 2770 2771 2772)
-() 0 () ())
-2773 'h5pget_edc_check_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2774 0 (2775 2776 2777) () 0 () ())
-2778 'h5pget_data_transform_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2779 0 (
-2780 2781 2782 2783) () 0 () ())
-2784 'h5pget_external_count_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2785 0 (2786 2787 2788) () 0
-() ())
-2789 'h5pget_fapl_direct_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2790 0 (2791 2792 2793 2794
-2795) () 0 () ())
-2796 'h5pget_fapl_core_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2797 0 (2798 2799 2800 2801) () 0 () ())
-2802 'h5pget_external_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2803 0 (2804 2805 2806 2807 2808 2809
-2810) () 0 () ())
-2811 'h5pget_fclose_degree_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2812 0 (2813 2814 2815) () 0
-() ())
-2816 'h5pget_fapl_multi_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2817 0 (
-2818 2819 2820 2821 2822 2823 2824 2825) () 0 () ())
-2826 'h5pget_fapl_family_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2827 0 (2828 2829 2830 2831)
-() 0 () ())
-2832 'h5pget_est_link_info_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2833 0 (2834 2835 2836 2837)
-() 0 () ())
-188 'h5pget_fill_value_double' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2838 0 (2839
-2840 2841 2842) () 0 () ())
-185 'h5pget_fill_value_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2843 0 (2844 2845 2846 2847)
-() 0 () ())
-187 'h5pget_fill_value_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2848 0 (2849 2850 2851 2852)
-() 0 () ())
-2853 'h5pget_filter_by_id_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2854 0 (2855 2856 2857 2858
-2859 2860 2861 2862) () 0 () ())
-2863 'h5pget_gc_references_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2864 0 (2865 2866 2867) () 0
-() ())
-2868 'h5pget_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2869 0 (2870 2871 2872 2873 2874 2875
-2876 2877 2878) () 0 () ())
-186 'h5pget_fill_value_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2879 0 (2880 2881 2882 2883)
-() 0 () ())
-2884 'h5pget_istore_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2885 0 (2886 2887 2888) () 0 () ())
-183 'h5pget_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2889 0 (2890 2891 2892 2893) () 0 () ())
-2894 'h5pget_link_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2895 0 (2896 2897 2898) () 0
-() ())
-2899 'h5pget_local_heap_size_hint_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2900 0 (2901 2902 2903) () 0
-() ())
-2904 'h5pget_link_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2905 0 (2906 2907 2908 2909)
-() 0 () ())
-2910 'h5pget_nfilters_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2911 0 (2912 2913 2914) () 0 () ())
-2915 'h5pget_obj_track_times_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2916 0 (2917 2918 2919) () 0
-() ())
-2920 'h5pget_nprops_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2921 0 (2922 2923 2924) () 0 () ())
-2925 'h5pget_nlinks_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2926 0 (2927 2928 2929) () 0 () ())
-182 'h5pget_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2930 0 (2931 2932 2933 2934) () 0 () ())
-2935 'h5pget_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2936 0 (2937 2938 2939 2940) () 0 () ())
-2941 'h5pget_small_data_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2942 0 (2943 2944 2945) () 0
-() ())
-2946 'h5pget_sym_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2947 0 (2948 2949 2950 2951) () 0 () ())
-2952 'h5pget_userblock_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2953 0 (2954 2955 2956) () 0 () ())
-189 'h5pinsert_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2957 0 (2958 2959 2960 2961 2962) () 0 () ())
-2963 'h5pget_version_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2964 0 (2965 2966 2967
-2968 2969 2970) () 0 () ())
-2971 'h5pget_sizes_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2972 0 (2973 2974 2975 2976) () 0 () ())
-2977 'h5pget_sieve_buf_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2978 0 (2979 2980 2981) () 0
-() ())
-2982 'h5pget_preserve_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2983 0 (2984 2985 2986) () 0 () ())
-2987 'h5pget_meta_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2988 0 (2989 2990 2991) () 0
-() ())
-2992 'h5pget_layout_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2993 0 (2994 2995 2996) () 0 () ())
-2997 'h5pget_hyper_vector_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2998 0 (2999 3000 3001) () 0
-() ())
-190 'h5pinsert_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3002 0 (3003 3004 3005 3006 3007) () 0 () ())
-191 'h5pinsert_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3008 0 (3009 3010 3011 3012 3013) () 0 ()
-())
-3014 'h5pmodify_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3015 0 (3016 3017 3018 3019 3020 3021) ()
-0 () ())
-3022 'h5pisa_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3023 0 (3024 3025 3026 3027) () 0 () ())
-196 'h5pregister_double' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3028 0 (3029
-3030 3031 3032 3033) () 0 () ())
-194 'h5pregister_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3034 0 (3035 3036 3037 3038 3039) () 0 ()
-())
-3040 'h5premove_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3041 0 (3042 3043 3044) () 0 () ())
-195 'h5pregister_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3045 0 (3046 3047 3048 3049 3050) () 0 ()
-())
-3051 'h5premove_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3052 0 (3053 3054 3055) () 0 () ())
-193 'h5pregister_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3056 0 (3057 3058 3059 3060 3061) () 0 ()
-())
-3062 'h5pset_attr_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3063 0 (3064 3065 3066 3067)
-() 0 () ())
-3068 'h5pset_attr_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3069 0 (3070 3071 3072) () 0
-() ())
-3073 'h5pset_alloc_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3074 0 (3075 3076 3077) () 0
-() ())
-3078 'h5pset_buffer_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3079 0 (3080 3081 3082) () 0 () ())
-3083 'h5pset_btree_ratios_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3084 0 (3085 3086 3087 3088
-3089) () 0 () ())
-3090 'h5pset_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3091 0 (3092 3093 3094 3095 3096 3097) ()
-0 () ())
-3098 'h5pset_char_encoding_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3099 0 (3100 3101 3102) () 0
-() ())
-3103 'h5pset_chunk_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3104 0 (3105 3106 3107 3108) () 0 () ())
-3109 'h5pset_chunk_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3110 0 (3111 3112 3113 3114
-3115) () 0 () ())
-3116 'h5pset_copy_object_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3117 0 (3118 3119 3120) () 0
-() ())
-3121 'h5pset_data_transform_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3122 0 (3123 3124 3125) () 0
-() ())
-3126 'h5pset_create_inter_group_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3127 0 (3128 3129 3130) () 0
-() ())
-200 'h5pset_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3131 0 (3132 3133 3134 3135)
-() 0 () ())
-3136 'h5pset_est_link_info_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3137 0 (3138 3139 3140 3141)
-() 0 () ())
-3142 'h5pset_edc_check_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3143 0 (3144 3145 3146) () 0 () ())
-3147 'h5pset_fapl_core_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3148 0 (3149 3150 3151 3152) () 0 () ())
-3153 'h5pset_family_offset_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3154 0 (3155 3156 3157) () 0
-() ())
-3158 'h5pset_external_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3159 0 (3160 3161 3162 3163 3164) () 0 ()
-())
-3165 'h5pset_deflate_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3166 0 (3167 3168 3169) () 0 () ())
-197 'h5pset_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3170 0 (3171 3172 3173 3174) () 0 () ())
-3175 'h5pset_alignment_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3176 0 (3177 3178 3179 3180) () 0 () ())
-192 'h5pinsert_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3181 0 (3182 3183 3184 3185
-3186) () 0 () ())
-3187 'h5pget_fill_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3188 0 (3189 3190 3191) () 0 () ())
-201 'h5pset_fapl_multi_s' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3192 0 (3193 3194 3195) () 0 () ())
-3196 'h5pset_fapl_sec2_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3197 0 (3198 3199) () 0 () ())
-202 'h5pset_fapl_multi_l' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3200 0 (3201 3202 3203 3204 3205 3206
-3207) () 0 () ())
-3208 'h5pset_fapl_split_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3209 0 (3210 3211 3212 3213
-3214 3215) () 0 () ())
-3216 'h5pset_fill_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3217 0 (3218 3219 3220) () 0 () ())
-3221 'h5pset_fclose_degree_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3222 0 (3223 3224 3225) () 0
-() ())
-3226 'h5pset_fapl_stdio_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3227 0 (3228 3229) () 0 () ())
-206 'h5pset_fill_value_double' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3230 0 (3231
-3232 3233 3234) () 0 () ())
-205 'h5pset_fill_value_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3235 0 (3236 3237 3238 3239)
-() 0 () ())
-203 'h5pset_fill_value_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3240 0 (3241 3242 3243 3244)
-() 0 () ())
-3245 'h5pset_fapl_family_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3246 0 (3247 3248 3249 3250)
-() 0 () ())
-3251 'h5pset_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3252 0 (3253 3254 3255 3256 3257 3258) ()
-0 () ())
-3259 'h5pset_fletcher32_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3260 0 (3261 3262) () 0 () ())
-204 'h5pset_fill_value_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3263 0 (3264 3265 3266 3267)
-() 0 () ())
-199 'h5pset_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3268 0 (3269 3270 3271 3272) () 0 () ())
-3273 'h5pset_hyper_vector_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3274 0 (3275 3276 3277) () 0
-() ())
-3278 'h5pset_layout_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3279 0 (3280 3281 3282) () 0 () ())
-3283 'h5pset_istore_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3284 0 (3285 3286 3287) () 0 () ())
-3288 'h5pset_link_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3289 0 (3290 3291 3292 3293)
-() 0 () ())
-3294 'h5pset_link_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3295 0 (3296 3297 3298) () 0
-() ())
-3299 'h5pset_nbit_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3300 0 (3301 3302) () 0 () ())
-3303 'h5pset_nlinks_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3304 0 (3305 3306 3307) () 0 () ())
-3308 'h5pset_meta_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3309 0 (3310 3311 3312) () 0
-() ())
-3313 'h5pset_preserve_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3314 0 (3315 3316 3317) () 0 () ())
-3318 'h5pset_scaleoffset_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3319 0 (3320 3321 3322 3323)
-() 0 () ())
-198 'h5pset_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3324 0 (3325 3326 3327 3328) () 0 () ())
-3329 'h5pset_obj_track_times_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3330 0 (3331 3332 3333) () 0
-() ())
-3334 'h5pset_shuffle_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3335 0 (3336 3337) () 0 () ())
-3338 'h5pset_shared_mesg_nindexes_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3339 0 (3340 3341 3342) () 0
-() ())
-3343 'h5pset_shared_mesg_index_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3344 0 (3345 3346 3347 3348
-3349) () 0 () ())
-3350 'h5pset_sizes_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3351 0 (3352 3353 3354 3355) () 0 () ())
-3356 'h5pset_small_data_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3357 0 (3358 3359 3360) () 0
-() ())
-3361 'h5pset_sieve_buf_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3362 0 (3363 3364 3365) () 0
-() ())
-3366 'h5pset_sym_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3367 0 (3368 3369 3370 3371) () 0 () ())
-3372 'h5pset_local_heap_size_hint_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3373 0 (3374 3375 3376) () 0
-() ())
-3377 'h5pset_userblock_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3378 0 (3379 3380 3381) () 0 () ())
-3382 'h5r' 'h5r' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-220 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-304 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-305 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3383 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-210 'h5rcreate_object_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3384 0 (3385 3386 3387 3388) () 0 () ())
-3389 'h5punregister_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3390 0 (3391 3392 3393) () 0 () ())
-209 'h5rcreate_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3394 0 (3395 3396 3397 3398 3399) () 0 ()
-())
-3400 'h5pset_szip_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3401 0 (3402 3403 3404 3405) () 0 () ())
-212 'h5rget_name_object_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3406 0 (
-3407 3408 3409 3410 3411) () 0 () ())
-207 'h5rdereference_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3412 0 (3413 3414 3415 3416)
-() 0 () ())
-208 'h5rdereference_object_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3417 0 (3418 3419 3420 3421)
-() 0 () ())
-213 'h5rget_object_type_obj_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3422 0 (3423 3424 3425 3426)
-() 0 () ())
-3427 'h5s' 'h5s' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-215 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-297 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5rget_region_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3428 0 (3429 3430 3431 3432)
-() 0 () ())
-211 'h5rget_name_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3433 0 (
-3434 3435 3436 3437 3438) () 0 () ())
-301 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3439 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'20') () 0 () ())
-3440 'h5pset_libver_bounds_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3441 0 (3442 3443 3444 3445)
-() 0 () ())
-3446 'h5pset_gc_references_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3447 0 (3448 3449 3450) () 0
-() ())
-288 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-286 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-295 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-296 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-289 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-291 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-299 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-293 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-292 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-300 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-294 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-298 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-302 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3451 'h5scopy_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3452 0 (3453 3454 3455) () 0 () ())
-3456 'h5sclose_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3457 0 (3458 3459) () 0 () ())
-290 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3460 'h5screate_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3461 0 (3462 3463 3464
-3465 3466) () 0 () ())
-3467 'h5sdecode_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3468 0 (3469 3470 3471) () 0 () ())
-3472 'h5sget_select_bounds_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3473 0 (3474 3475 3476 3477)
-() 0 () ())
-3478 'h5sextent_equal_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3479 0 (3480 3481 3482 3483) () 0 () ())
-3484 'h5sextent_copy_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3485 0 (3486 3487 3488) () 0 () ())
-3489 'h5sget_select_npoints_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3490 0 (3491 3492 3493) () 0
-() ())
-3494 'h5sget_select_hyper_nblocks_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3495 0 (3496 3497 3498) () 0
-() ())
-3499 'h5sget_select_hyper_blocklist_f' 'h5s' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3500 0 (3501
-3502 3503 3504 3505) () 0 () ())
-3506 'h5sget_select_elem_pointlist_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3507 0 (3508 3509 3510 3511
-3512) () 0 () ())
-3513 'h5sget_simple_extent_dims_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3514 0 (3515 3516 3517 3518)
-() 0 () ())
-3519 'h5sget_select_type_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3520 0 (3521 3522 3523) () 0
-() ())
-3524 'h5sget_select_elem_npoints_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3525 0 (3526 3527 3528) () 0
-() ())
-3529 'h5sget_simple_extent_npoints_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3530 0 (3531 3532 3533) () 0
-() ())
-3534 'h5sget_simple_extent_ndims_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3535 0 (3536 3537 3538) () 0
-() ())
-3539 'h5sencode_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3540 0 (3541 3542 3543 3544) () 0 () ())
-3545 'h5screate_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3546 0 (3547 3548 3549) () 0 () ())
-3550 'h5sis_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3551 0 (3552 3553 3554) () 0 () ())
-3555 'h5soffset_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3556 0 (3557 3558 3559) () 0 () ())
-3560 'h5sget_simple_extent_type_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3561 0 (3562 3563 3564) () 0
-() ())
-3565 'h5sselect_none_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3566 0 (3567 3568) () 0 () ())
-3569 'h5sselect_valid_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3570 0 (3571 3572 3573) () 0 () ())
-3574 'h5sselect_hyperslab_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3575 0 (
-3576 3577 3578 3579 3580 3581 3582) () 0 () ())
-3583 'h5sselect_elements_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3584 0 (3585 3586 3587 3588
-3589 3590) () 0 () ())
-3591 'h5sset_extent_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3592 0 (3593 3594 3595 3596
-3597) () 0 () ())
-278 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-274 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-258 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3598 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'34') () 0 () ())
-460 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-459 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-457 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-282 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-458 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-281 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-470 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3599 'h5t' 'h5t' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-3600 'h5sset_extent_none_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3601 0 (3602 3603) () 0 () ())
-473 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-466 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-463 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-462 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-461 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-472 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-464 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-465 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-467 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-261 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-262 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-471 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-272 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3604 'h5sselect_all_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3605 0 (3606 3607) () 0 () ())
-285 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-284 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-270 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-266 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-267 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-269 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-264 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-263 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-268 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-452 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-453 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-454 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-265 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-273 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-303 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-450 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-456 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-469 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-468 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-444 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-445 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-446 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-455 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-441 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-448 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-442 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-447 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-443 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-449 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3608 'h5tclose_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3609 0 (3610 3611) () 0 () ())
-3612 'h5tcommit_anon_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3613 0 (3614 3615 3616
-3617 3618) () 0 () ())
-3619 'h5tcommit_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3620 0 (3621 3622 3623 3624
-3625 3626 3627) () 0 () ())
-3628 'h5tcompiler_conv_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3629 0 (3630 3631 3632 3633) () 0 () ())
-3634 'h5tcreate_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3635 0 (3636 3637 3638 3639) () 0 () ())
-3640 'h5tcopy_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3641 0 (3642 3643 3644) () 0 () ())
-3645 'h5tcommitted_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3646 0 (3647 3648 3649) () 0 () ())
-3650 'h5tarray_create_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3651 0 (3652 3653 3654 3655 3656) () 0 ()
-())
-3657 'h5tenum_nameof_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3658 0 (3659 3660 3661 3662 3663) () 0 ()
-())
-3664 'h5tequal_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3665 0 (3666 3667 3668 3669) () 0 () ())
-3670 'h5tget_array_dims_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3671 0 (3672 3673 3674) () 0
-() ())
-3675 'h5tenum_valueof_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3676 0 (3677 3678 3679 3680) () 0 () ())
-3681 'h5tenum_insert_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3682 0 (3683 3684 3685 3686) () 0 () ())
-3687 'h5tenum_create_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3688 0 (3689 3690 3691) () 0 () ())
-3692 'h5tget_create_plist_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3693 0 (3694 3695 3696) () 0
-() ())
-3697 'h5tget_class_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3698 0 (3699 3700 3701) () 0 () ())
-3702 'h5tget_array_ndims_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3703 0 (3704 3705 3706) () 0
-() ())
-3707 'h5tencode_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3708 0 (3709 3710 3711 3712) () 0 () ())
-3713 'h5tget_ebias_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3714 0 (3715 3716 3717) () 0 () ())
-3718 'h5tget_fields_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3719 0 (3720 3721 3722 3723 3724 3725
-3726) () 0 () ())
-3727 'h5tget_member_class_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3728 0 (3729 3730 3731 3732)
-() 0 () ())
-3733 'h5tget_member_offset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3734 0 (3735 3736 3737 3738)
-() 0 () ())
-3739 'h5tget_member_name_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3740 0 (3741 3742 3743 3744
-3745) () 0 () ())
-3746 'h5tget_member_type_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3747 0 (3748 3749 3750 3751)
-() 0 () ())
-3752 'h5tget_member_value_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3753 0 (3754 3755 3756 3757)
-() 0 () ())
-3758 'h5tget_member_index_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3759 0 (3760 3761 3762 3763)
-() 0 () ())
-3764 'h5tget_inpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3765 0 (3766 3767 3768) () 0 () ())
-3769 'h5tget_cset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3770 0 (3771 3772 3773) () 0 () ())
-3774 'h5tdecode_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3775 0 (3776 3777 3778) () 0 () ())
-440 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-451 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3779 'h5pset_fapl_direct_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3780 0 (3781 3782 3783 3784
-3785) () 0 () ())
-3786 'h5pget_char_encoding_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3787 0 (3788 3789 3790) () 0
-() ())
-3791 'h5tget_nmembers_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3792 0 (3793 3794 3795) () 0 () ())
-3796 'h5tget_norm_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3797 0 (3798 3799 3800) () 0 () ())
-3801 'h5tget_order_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3802 0 (3803 3804 3805) () 0 () ())
-3806 'h5tget_offset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3807 0 (3808 3809 3810) () 0 () ())
-3811 'h5tget_pad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3812 0 (3813 3814 3815 3816) () 0 () ())
-3817 'h5tget_sign_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3818 0 (3819 3820 3821) () 0 () ())
-3822 'h5tget_size_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3823 0 (3824 3825 3826) () 0 () ())
-3827 'h5tget_super_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3828 0 (3829 3830 3831) () 0 () ())
-3832 'h5tget_strpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3833 0 (3834 3835 3836) () 0 () ())
-3837 'h5tinsert_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3838 0 (3839 3840 3841 3842 3843) () 0 () ())
-3844 'h5tget_tag_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3845 0 (3846 3847 3848 3849) () 0 () ())
-3850 'h5tget_precision_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3851 0 (3852 3853 3854) () 0 () ())
-3855 'h5tpack_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3856 0 (3857 3858) () 0 () ())
-3859 'h5tset_cset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3860 0 (3861 3862 3863) () 0 () ())
-3864 'h5topen_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3865 0 (3866 3867 3868 3869
-3870) () 0 () ())
-3871 'h5tset_ebias_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3872 0 (3873 3874 3875) () 0 () ())
-3876 'h5tset_inpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3877 0 (3878 3879 3880) () 0 () ())
-3881 'h5tset_norm_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3882 0 (3883 3884 3885) () 0 () ())
-3886 'h5tset_order_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3887 0 (3888 3889 3890) () 0 () ())
-3891 'h5tset_offset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3892 0 (3893 3894 3895) () 0 () ())
-3896 'h5tset_fields_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3897 0 (3898 3899 3900 3901 3902 3903
-3904) () 0 () ())
-3905 'h5tis_variable_str_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3906 0 (3907 3908 3909) () 0
-() ())
-3910 'h5tset_precision_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3911 0 (3912 3913 3914) () 0 () ())
-3915 'h5tset_strpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3916 0 (3917 3918 3919) () 0 () ())
-3920 'h5tset_size_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3921 0 (3922 3923 3924) () 0 () ())
-242 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3925 'h5z' 'h5z' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-236 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3926 'h5tvlen_create_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3927 0 (3928 3929 3930) () 0 () ())
-3931 'h5tset_tag_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3932 0 (3933 3934 3935) () 0 () ())
-249 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-239 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3936 'h5zfilter_avail_f' 'h5z' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3937 0 (3938 3939 3940) () 0 () ())
-241 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3941 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'14') () 0 () ())
-3942 'hdf5' 'hdf5' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-3943 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((3944 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-3945 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-3946 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3947 'h5zunregister_f' 'h5z' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3948 0 (3949 3950) () 0 () ())
-3951 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3952 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3953 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((3954 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-3955 'h5zget_filter_info_f' 'h5z' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3956 0 (3957 3958 3959) () 0
-() ())
-3960 'h5tset_sign_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3961 0 (3962 3963 3964) () 0 () ())
-3965 'h5tset_pad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3966 0 (3967 3968 3969 3970) () 0 () ())
-3971 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-3972 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-3973 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-3974 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3975 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-3976 'printon' 'h5e' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-3977 'printoff' 'h5e' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0') () 0 () ())
-216 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-232 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-3978 'h5tget_native_type_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3979 0 (3980 3981 3982 3983)
-() 0 () ())
-38 'h5ltread_dataset_f_float2' 'h5lt' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3984 0 (3985 3986 3987 3988
-3989 3990) () 0 () ())
-58 'h5awrite_char_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3991 0 (3992 3993 3994 3995 3996) () 0 ()
-())
-2323 'buf' '' 2317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-2311 'dset_name' '' 2309 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2334 'loc_id' '' 2333 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2315 'buf' '' 2309 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 2313 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2313 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-2339 'buf' '' 2333 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 2337 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2337 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2337 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-2321 'dims' '' 2317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2313 'dims' '' 2309 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2351 'dset_name' '' 2349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2314 'type_id' '' 2309 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2332 'errcode' '' 2325 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2327 'dset_name' '' 2325 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2423 'dset_name' '' 2421 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2326 'loc_id' '' 2325 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2427 'buf' '' 2421 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2425 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-2425 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-2426 'type_id' '' 2421 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2337 'dims' '' 2333 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2361 'dims' '' 2357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2425 'dims' '' 2421 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2422 'loc_id' '' 2421 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2428 'errcode' '' 2421 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2318 'loc_id' '' 2317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2345 'dims' '' 2341 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2348 'errcode' '' 2341 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2342 'loc_id' '' 2341 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-492 'loc_id' '' 491 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-494 'attr_name' '' 491 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-496 'space_id' '' 491 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-495 'type_id' '' 491 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-500 'aapl_id' '' 491 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-493 'obj_name' '' 491 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-499 'acpl_id' '' 491 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-826 'name' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-497 'attr' '' 491 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-498 'hdferr' '' 491 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-825 'loc_id' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-830 'hdferr' '' 824 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-828 'space_id' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-501 'lapl_id' '' 491 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-504 'attr_id' '' 503 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-827 'type_id' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-523 'loc_id' '' 522 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-829 'attr_id' '' 824 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-527 'lapl_id' '' 522 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-526 'hdferr' '' 522 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-832 'aapl_id' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-831 'acpl_id' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-505 'hdferr' '' 503 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-512 'order' '' 508 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-524 'obj_name' '' 522 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-515 'lapl_id' '' 508 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-514 'hdferr' '' 508 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-510 'obj_name' '' 508 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-565 'loc_id' '' 564 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-567 'attr_name' '' 564 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-568 'attr_exists' '' 564 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-569 'hdferr' '' 564 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-570 'lapl_id' '' 564 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-566 'obj_name' '' 564 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-536 'loc_id' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-531 'attr_name' '' 529 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-533 'hdferr' '' 529 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-541 'f_corder_valid' '' 535 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-539 'order' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-537 'obj_name' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-532 'attr_exists' '' 529 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-545 'hdferr' '' 535 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-546 'lapl_id' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-544 'data_size' '' 535 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-543 'cset' '' 535 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-542 'corder' '' 535 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-513 'n' '' 508 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-511 'idx_type' '' 508 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-525 'attr_name' '' 522 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2319 'dset_name' '' 2317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-603 'cset' '' 599 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-605 'hdferr' '' 599 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-602 'corder' '' 599 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-601 'f_corder_valid' '' 599 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-600 'attr_id' '' 599 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-530 'obj_id' '' 529 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-538 'idx_type' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-604 'data_size' '' 599 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-551 'attr_name' '' 548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-556 'hdferr' '' 548 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-554 'cset' '' 548 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-550 'obj_name' '' 548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-557 'lapl_id' '' 548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-555 'data_size' '' 548 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-561 'creation_prop_id' '' 559 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2331 'buf' '' 2325 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-553 'corder' '' 548 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-509 'loc_id' '' 508 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-562 'hdferr' '' 559 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-518 'obj_id' '' 517 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-520 'hdferr' '' 517 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-595 'size' '' 593 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-594 'attr_id' '' 593 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-584 'attr_id' '' 583 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-597 'hdferr' '' 593 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-589 'obj_id' '' 588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-590 'attr_num' '' 588 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-591 'hdferr' '' 588 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-574 'obj_name' '' 572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-578 'name' '' 572 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-579 'hdferr' '' 572 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-580 'size' '' 572 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-581 'lapl_id' '' 572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-576 'order' '' 572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-560 'attr_id' '' 559 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-577 'n' '' 572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-586 'hdferr' '' 583 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-573 'loc_id' '' 572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-596 'buf' '' 593 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-585 'space_id' '' 583 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-622 'attr_name' '' 619 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-623 'attr_id' '' 619 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-575 'idx_type' '' 572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-621 'obj_name' '' 619 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-678 'obj_name' '' 676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-679 'idx_type' '' 676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-681 'n' '' 676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-677 'loc_id' '' 676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-626 'lapl_id' '' 619 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-683 'hdferr' '' 676 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-685 'lapl_id' '' 676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-680 'order' '' 676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-682 'attr_id' '' 676 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-519 'name' '' 517 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-613 'obj_id' '' 612 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-552 'f_corder_valid' '' 548 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-620 'loc_id' '' 619 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-614 'attr_name' '' 612 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-616 'hdferr' '' 612 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-615 'attr_id' '' 612 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-630 'buf' '' 627 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 631 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-631 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-631 'dims' '' 627 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-617 'aapl_id' '' 612 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-684 'aapl_id' '' 676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-625 'aapl_id' '' 619 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-628 'attr_id' '' 627 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-674 'hdferr' '' 669 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-634 'attr_id' '' 633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-632 'hdferr' '' 627 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-672 'buf' '' 669 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 673 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-673 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 673 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-673 'dims' '' 669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-647 'obj_id' '' 646 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-649 'attr_id' '' 646 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-650 'hdferr' '' 646 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-648 'index' '' 646 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-671 'memtype_id' '' 669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-670 'attr_id' '' 669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-659 'memtype_id' '' 657 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-636 'buf' '' 633 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 637 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-629 'memtype_id' '' 627 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-662 'hdferr' '' 657 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-660 'buf' '' 657 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 661 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-661 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 661 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 661 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-661 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-638 'hdferr' '' 633 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-661 'dims' '' 657 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-658 'attr_id' '' 657 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-667 'dims' '' 663 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-666 'buf' '' 663 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 667 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-667 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 667 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 667 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-667 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 667 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-652 'attr_id' '' 651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-655 'dims' '' 651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-664 'attr_id' '' 663 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-654 'buf' '' 651 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 655 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-655 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 655 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 655 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-708 'dims' '' 704 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-709 'hdferr' '' 704 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-707 'buf' '' 704 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 708 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-708 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-705 'attr_id' '' 704 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-668 'hdferr' '' 663 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-665 'memtype_id' '' 663 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-624 'hdferr' '' 619 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-695 'buf' '' 692 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 696 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-694 'memtype_id' '' 692 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-693 'attr_id' '' 692 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-687 'attr_id' '' 686 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-696 'dims' '' 692 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-689 'buf' '' 686 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-690 'dims' '' 686 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-795 'attr_id' '' 794 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-797 'buf' '' 794 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 798 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-798 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 798 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 798 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-798 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 798 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 798 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-799 'hdferr' '' 794 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-729 'attr_id' '' 728 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-796 'memtype_id' '' 794 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-691 'hdferr' '' 686 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-688 'memtype_id' '' 686 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-731 'buf' '' 728 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 732 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-732 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 732 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 732 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-732 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 732 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-798 'dims' '' 794 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-732 'dims' '' 728 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-653 'memtype_id' '' 651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-743 'buf' '' 740 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 744 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-744 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 744 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 744 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-744 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-742 'memtype_id' '' 740 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-697 'hdferr' '' 692 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-730 'memtype_id' '' 728 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-656 'hdferr' '' 651 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-745 'hdferr' '' 740 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-744 'dims' '' 740 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-713 'buf' '' 710 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 714 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-714 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 714 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 714 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-712 'memtype_id' '' 710 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-711 'attr_id' '' 710 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-637 'dims' '' 633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-733 'hdferr' '' 728 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-723 'attr_id' '' 722 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-725 'buf' '' 722 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-724 'memtype_id' '' 722 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-714 'dims' '' 710 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-741 'attr_id' '' 740 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-720 'dims' '' 716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-717 'attr_id' '' 716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-700 'memtype_id' '' 698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-699 'attr_id' '' 698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-702 'dims' '' 698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-726 'dims' '' 722 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-718 'memtype_id' '' 716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-719 'buf' '' 716 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 720 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-720 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 720 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 720 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-720 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 720 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 720 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-721 'hdferr' '' 716 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-701 'buf' '' 698 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 702 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-702 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 702 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-748 'memtype_id' '' 746 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-635 'memtype_id' '' 633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-715 'hdferr' '' 710 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-750 'dims' '' 746 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-735 'attr_id' '' 734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-747 'attr_id' '' 746 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-738 'dims' '' 734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-737 'buf' '' 734 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 738 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-749 'buf' '' 746 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 750 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-750 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-755 'buf' '' 752 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 756 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-756 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 756 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 756 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-753 'attr_id' '' 752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-757 'hdferr' '' 752 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-754 'memtype_id' '' 752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-761 'buf' '' 758 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 762 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-762 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 762 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 762 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-762 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 762 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-763 'hdferr' '' 758 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-760 'memtype_id' '' 758 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-791 'buf' '' 788 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-792 'dims' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-793 'hdferr' '' 788 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-762 'dims' '' 758 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-759 'attr_id' '' 758 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-736 'memtype_id' '' 734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-751 'hdferr' '' 746 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-703 'hdferr' '' 698 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-727 'hdferr' '' 722 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-706 'memtype_id' '' 704 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-789 'attr_id' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-739 'hdferr' '' 734 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-767 'buf' '' 764 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 768 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-768 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 768 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 768 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-768 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 768 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 768 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-756 'dims' '' 752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-769 'hdferr' '' 764 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-783 'attr_id' '' 782 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-768 'dims' '' 764 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-785 'buf' '' 782 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 786 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-787 'hdferr' '' 782 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-786 'dims' '' 782 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-765 'attr_id' '' 764 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-766 'memtype_id' '' 764 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-790 'memtype_id' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-540 'n' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-820 'buf' '' 817 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 821 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-821 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-821 'dims' '' 817 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-819 'memtype_id' '' 817 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-772 'memtype_id' '' 770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-771 'attr_id' '' 770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-778 'memtype_id' '' 776 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-777 'attr_id' '' 776 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-774 'dims' '' 770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-773 'buf' '' 770 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 774 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-774 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 774 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 774 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-774 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-775 'hdferr' '' 770 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-610 'hdferr' '' 607 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-609 'type_id' '' 607 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-608 'attr_id' '' 607 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-784 'memtype_id' '' 782 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-779 'buf' '' 776 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 780 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-780 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 780 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-822 'hdferr' '' 817 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-872 'attr_id' '' 871 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-875 'dims' '' 871 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-876 'hdferr' '' 871 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-873 'memtype_id' '' 871 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-809 'dims' '' 805 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-840 'attr_id' '' 839 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-807 'memtype_id' '' 805 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-808 'buf' '' 805 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 809 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-809 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 809 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 809 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-810 'hdferr' '' 805 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-806 'attr_id' '' 805 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-843 'dims' '' 839 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-834 'attr_id' '' 833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-842 'buf' '' 839 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-874 'buf' '' 871 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 875 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-875 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 875 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 875 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-875 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-781 'hdferr' '' 776 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-835 'memtype_id' '' 833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-838 'hdferr' '' 833 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-837 'dims' '' 833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-847 'loc_id' '' 846 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-850 'hdferr' '' 846 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-848 'old_attr_name' '' 846 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-836 'buf' '' 833 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 837 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-837 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 837 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 837 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-837 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 837 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 837 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-849 'new_attr_name' '' 846 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-908 'attr_id' '' 907 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-912 'hdferr' '' 907 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-904 'buf' '' 901 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 905 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-905 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 905 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 905 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-905 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-903 'memtype_id' '' 901 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-911 'dims' '' 907 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-910 'buf' '' 907 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 911 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-911 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-909 'memtype_id' '' 907 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-884 'attr_id' '' 883 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-906 'hdferr' '' 901 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-897 'memtype_id' '' 895 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-887 'dims' '' 883 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-888 'hdferr' '' 883 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-886 'buf' '' 883 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 887 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-887 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 887 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 887 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-885 'memtype_id' '' 883 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-905 'dims' '' 901 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-898 'buf' '' 895 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 899 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-899 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 899 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 899 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-899 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 899 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 899 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-894 'hdferr' '' 889 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-890 'attr_id' '' 889 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-900 'hdferr' '' 895 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-891 'memtype_id' '' 889 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-892 'buf' '' 889 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 893 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-893 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 893 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 893 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-893 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 893 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-878 'attr_id' '' 877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-879 'memtype_id' '' 877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-893 'dims' '' 889 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-882 'hdferr' '' 877 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-932 'attr_id' '' 931 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-881 'dims' '' 877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-936 'hdferr' '' 931 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-935 'dims' '' 931 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-933 'memtype_id' '' 931 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-916 'buf' '' 913 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 917 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 917 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-918 'hdferr' '' 913 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-922 'buf' '' 919 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 923 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 923 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 923 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 923 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-920 'attr_id' '' 919 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-914 'attr_id' '' 913 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-923 'dims' '' 919 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-921 'memtype_id' '' 919 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-880 'buf' '' 877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 881 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-881 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 881 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-917 'dims' '' 913 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-899 'dims' '' 895 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-896 'attr_id' '' 895 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-939 'memtype_id' '' 937 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-915 'memtype_id' '' 913 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-841 'memtype_id' '' 839 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-844 'hdferr' '' 839 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1063 'memtype_id' '' 1061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-924 'hdferr' '' 919 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-940 'buf' '' 937 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 941 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-942 'hdferr' '' 937 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-941 'dims' '' 937 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-945 'memtype_id' '' 943 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-947 'dims' '' 943 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1066 'hdferr' '' 1061 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1064 'buf' '' 1061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1065 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1065 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1065 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1065 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1065 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1065 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1065 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-948 'hdferr' '' 943 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-944 'attr_id' '' 943 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-946 'buf' '' 943 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 947 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 947 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 947 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 947 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-947 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 947 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1062 'attr_id' '' 1061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-951 'memtype_id' '' 949 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-953 'dims' '' 949 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1065 'dims' '' 1061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-938 'attr_id' '' 937 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-926 'attr_id' '' 925 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-954 'hdferr' '' 949 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-928 'buf' '' 925 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 929 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 929 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 929 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 929 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-929 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-929 'dims' '' 925 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-950 'attr_id' '' 949 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-957 'memtype_id' '' 955 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-934 'buf' '' 931 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 935 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 935 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 935 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-927 'memtype_id' '' 925 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-952 'buf' '' 949 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ()) 0
-0 () () 0 () ())
-960 'hdferr' '' 955 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-930 'hdferr' '' 925 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-958 'buf' '' 955 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 959 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-972 'hdferr' '' 967 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-969 'memtype_id' '' 967 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-989 'dims' '' 985 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-988 'buf' '' 985 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 989 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-989 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-986 'attr_id' '' 985 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-962 'attr_id' '' 961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-970 'buf' '' 967 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 971 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-971 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 971 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-990 'hdferr' '' 985 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-963 'memtype_id' '' 961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-966 'hdferr' '' 961 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3992 'attr_id' '' 3991 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-964 'buf' '' 961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 965 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-965 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 965 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 965 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-965 'dims' '' 961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-987 'memtype_id' '' 985 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3996 'hdferr' '' 3991 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3994 'buf' '' 3991 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-854 'buf' '' 851 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 855 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-853 'memtype_id' '' 851 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-855 'dims' '' 851 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-852 'attr_id' '' 851 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-866 'attr_id' '' 865 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-867 'memtype_id' '' 865 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-869 'dims' '' 865 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1056 'attr_id' '' 1055 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-856 'hdferr' '' 851 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-868 'buf' '' 865 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 869 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-869 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 869 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 869 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-869 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 869 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-3995 'dims' '' 3991 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-902 'attr_id' '' 901 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-959 'dims' '' 955 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1051 'memtype_id' '' 1049 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1059 'dims' '' 1055 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1060 'hdferr' '' 1055 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1050 'attr_id' '' 1049 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-870 'hdferr' '' 865 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3993 'memtype_id' '' 3991 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1057 'memtype_id' '' 1055 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1052 'buf' '' 1049 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1053 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-1053 'dims' '' 1049 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-999 'memtype_id' '' 997 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-998 'attr_id' '' 997 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1001 'dims' '' 997 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1002 'hdferr' '' 997 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1012 'buf' '' 1009 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1013 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1013 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1013 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1013 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1013 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1013 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1013 'dims' '' 1009 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1010 'attr_id' '' 1009 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1034 'attr_id' '' 1033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1011 'memtype_id' '' 1009 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1037 'dims' '' 1033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1004 'attr_id' '' 1003 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1005 'memtype_id' '' 1003 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1035 'memtype_id' '' 1033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1014 'hdferr' '' 1009 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1054 'hdferr' '' 1049 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1036 'buf' '' 1033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1037 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1037 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1037 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1037 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1037 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1038 'hdferr' '' 1033 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1000 'buf' '' 997 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1001 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1001 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1058 'buf' '' 1055 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1059 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1059 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1059 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1059 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1059 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1059 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1059 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-956 'attr_id' '' 955 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1041 'memtype_id' '' 1039 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1008 'hdferr' '' 1003 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1007 'dims' '' 1003 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1043 'dims' '' 1039 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-992 'attr_id' '' 991 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1042 'buf' '' 1039 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1043 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1043 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1043 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-994 'buf' '' 991 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-1006 'buf' '' 1003 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1007 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1007 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1007 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1007 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-968 'attr_id' '' 967 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-859 'loc_id' '' 858 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-860 'obj_name' '' 858 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-995 'dims' '' 991 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-993 'memtype_id' '' 991 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-862 'new_attr_name' '' 858 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-977 'dims' '' 973 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-976 'buf' '' 973 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 977 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-977 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 977 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 977 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-977 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 977 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-864 'lapl_id' '' 858 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-861 'old_attr_name' '' 858 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-863 'hdferr' '' 858 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-975 'memtype_id' '' 973 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-980 'attr_id' '' 979 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-981 'memtype_id' '' 979 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-982 'buf' '' 979 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 983 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-983 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 983 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 983 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-983 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-983 'dims' '' 979 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1028 'attr_id' '' 1027 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1031 'dims' '' 1027 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-984 'hdferr' '' 979 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-974 'attr_id' '' 973 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-978 'hdferr' '' 973 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1044 'hdferr' '' 1039 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1032 'hdferr' '' 1027 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1030 'buf' '' 1027 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-1025 'relnum' '' 1022 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1024 'minnum' '' 1022 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1016 'attr_id' '' 1015 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2328 'rank' '' 2325 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1017 'memtype_id' '' 1015 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-812 'attr_id' '' 811 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1026 'error' '' 1022 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-815 'dims' '' 811 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-814 'buf' '' 811 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 815 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-815 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 815 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-816 'hdferr' '' 811 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1020 'hdferr' '' 1015 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-813 'memtype_id' '' 811 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1070 'loc_id' '' 1069 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1073 'dset_id' '' 1069 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1029 'memtype_id' '' 1027 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1071 'type_id' '' 1069 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1019 'dims' '' 1015 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1048 'error' '' 1047 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1018 'buf' '' 1015 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1019 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1019 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1019 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1019 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1019 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1019 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1019 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1023 'majnum' '' 1022 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1110 'name' '' 1108 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1109 'loc_id' '' 1108 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1112 'space_id' '' 1108 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1075 'dcpl_id' '' 1069 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1116 'lcpl_id' '' 1108 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1117 'dapl_id' '' 1108 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1113 'dset_id' '' 1108 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1115 'dcpl_id' '' 1108 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1114 'hdferr' '' 1108 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1078 'fill_value' '' 1077 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 8 ()) 0 0 () () 0 () ())
-1079 'space_id' '' 1077 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1457 'hdferr' '' 1455 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1076 'dapl_id' '' 1069 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1456 'dset_id' '' 1455 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1111 'type_id' '' 1108 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1095 'buf' '' 1092 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1094 'space_id' '' 1092 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1086 'hdferr' '' 1082 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1084 'space_id' '' 1082 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1080 'buf' '' 1077 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-1103 'fill_value' '' 1102 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () () 0 () ())
-1085 'buf' '' 1082 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-1106 'hdferr' '' 1102 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1104 'space_id' '' 1102 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1093 'fill_value' '' 1092 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1081 'hdferr' '' 1077 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1163 'dataset_id' '' 1162 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1105 'buf' '' 1102 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () (1 ASSUMED_SIZE (
-CONSTANT (INTEGER 4 ()) 0 '1') ()) 0 () ())
-1074 'hdferr' '' 1069 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1040 'attr_id' '' 1039 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1165 'hdferr' '' 1162 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1125 'dataset_id' '' 1124 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1126 'datatype_id' '' 1124 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1099 'dataset_id' '' 1098 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2353 'dims' '' 2349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1100 'plist_id' '' 1098 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1340 'buf' '' 1337 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1341 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1341 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1341 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1338 'dset_id' '' 1337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1341 'dims' '' 1337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1101 'hdferr' '' 1098 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1133 'mem_type_id' '' 1131 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1345 'xfer_prp' '' 1337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1343 'mem_space_id' '' 1337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1344 'file_space_id' '' 1337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1342 'hdferr' '' 1337 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1134 'buf' '' 1131 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1135 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1135 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1339 'mem_type_id' '' 1337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1132 'dset_id' '' 1131 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1139 'xfer_prp' '' 1131 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1138 'file_space_id' '' 1131 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1143 'buf' '' 1140 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1144 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1144 'dims' '' 1140 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1142 'mem_type_id' '' 1140 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1137 'mem_space_id' '' 1131 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1136 'hdferr' '' 1131 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1141 'dset_id' '' 1140 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1145 'hdferr' '' 1140 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2330 'type_id' '' 2325 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1147 'file_space_id' '' 1140 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1153 'dset_id' '' 1150 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1148 'xfer_prp' '' 1140 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1151 'loc_id' '' 1150 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1146 'mem_space_id' '' 1140 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1130 'error' '' 1129 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1135 'dims' '' 1131 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1152 'name' '' 1150 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1154 'hdferr' '' 1150 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1158 'dataset_id' '' 1157 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1159 'size' '' 1157 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-1185 'dset_id' '' 1184 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1186 'mem_type_id' '' 1184 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1127 'hdferr' '' 1124 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1187 'buf' '' 1184 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1188 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1188 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1188 'dims' '' 1184 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1160 'hdferr' '' 1157 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1190 'mem_space_id' '' 1184 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1189 'hdferr' '' 1184 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1167 'dset_id' '' 1166 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1191 'file_space_id' '' 1184 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1174 'xfer_prp' '' 1166 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1173 'file_space_id' '' 1166 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1171 'hdferr' '' 1166 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1172 'mem_space_id' '' 1166 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1329 'dset_id' '' 1328 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1332 'dims' '' 1328 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1330 'mem_type_id' '' 1328 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1331 'buf' '' 1328 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1332 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1332 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1170 'dims' '' 1166 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1336 'xfer_prp' '' 1328 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1333 'hdferr' '' 1328 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1204 'mem_type_id' '' 1202 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1205 'buf' '' 1202 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1334 'mem_space_id' '' 1328 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1169 'buf' '' 1166 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1170 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1170 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1170 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1170 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1170 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1170 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1335 'file_space_id' '' 1328 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1209 'file_space_id' '' 1202 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1207 'hdferr' '' 1202 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1259 'buf' '' 1256 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1260 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1260 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1260 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1260 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1260 'dims' '' 1256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1210 'xfer_prp' '' 1202 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1208 'mem_space_id' '' 1202 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1203 'dset_id' '' 1202 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1257 'dset_id' '' 1256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1264 'xfer_prp' '' 1256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1262 'mem_space_id' '' 1256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1258 'mem_type_id' '' 1256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1266 'dset_id' '' 1265 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1206 'dims' '' 1202 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1261 'hdferr' '' 1256 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1267 'mem_type_id' '' 1265 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1120 'dset_id' '' 1119 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1121 'flag' '' 1119 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1271 'mem_space_id' '' 1265 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1269 'dims' '' 1265 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1268 'buf' '' 1265 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1269 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1269 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1269 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1270 'hdferr' '' 1265 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1273 'xfer_prp' '' 1265 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1272 'file_space_id' '' 1265 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1096 'hdferr' '' 1092 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1072 'space_id' '' 1069 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1164 'dataspace_id' '' 1162 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-780 'dims' '' 776 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-549 'loc_id' '' 548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-996 'hdferr' '' 991 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1122 'hdferr' '' 1119 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1168 'mem_type_id' '' 1166 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1263 'file_space_id' '' 1256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1192 'xfer_prp' '' 1184 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1176 'dset_id' '' 1175 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1217 'mem_space_id' '' 1211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1218 'file_space_id' '' 1211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1179 'dims' '' 1175 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1181 'mem_space_id' '' 1175 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1215 'dims' '' 1211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1180 'hdferr' '' 1175 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1249 'mem_type_id' '' 1247 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1177 'mem_type_id' '' 1175 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1178 'buf' '' 1175 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1179 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1248 'dset_id' '' 1247 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1250 'buf' '' 1247 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1251 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1251 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1251 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1251 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1251 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1251 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1253 'mem_space_id' '' 1247 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1183 'xfer_prp' '' 1175 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1254 'file_space_id' '' 1247 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1252 'hdferr' '' 1247 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1255 'xfer_prp' '' 1247 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1251 'dims' '' 1247 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1221 'dset_id' '' 1220 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1219 'xfer_prp' '' 1211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1216 'hdferr' '' 1211 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1224 'dims' '' 1220 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1182 'file_space_id' '' 1175 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1225 'hdferr' '' 1220 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1228 'xfer_prp' '' 1220 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1226 'mem_space_id' '' 1220 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1227 'file_space_id' '' 1220 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1239 'dset_id' '' 1238 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1241 'buf' '' 1238 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8
-()) 0 0 () () 0 () ())
-1242 'dims' '' 1238 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1223 'buf' '' 1220 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1224 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1224 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1243 'hdferr' '' 1238 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1246 'xfer_prp' '' 1238 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1213 'mem_type_id' '' 1211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1244 'mem_space_id' '' 1238 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1230 'dset_id' '' 1229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1236 'file_space_id' '' 1229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1237 'xfer_prp' '' 1229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1287 'dims' '' 1283 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1285 'mem_type_id' '' 1283 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1286 'buf' '' 1283 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1287 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1287 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1288 'hdferr' '' 1283 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1235 'mem_space_id' '' 1229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1232 'buf' '' 1229 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1233 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1233 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1233 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1233 'dims' '' 1229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1234 'hdferr' '' 1229 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1240 'mem_type_id' '' 1238 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1222 'mem_type_id' '' 1220 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1290 'file_space_id' '' 1283 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1321 'mem_type_id' '' 1319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1320 'dset_id' '' 1319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1289 'mem_space_id' '' 1283 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1214 'buf' '' 1211 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1155 'dapl_id' '' 1150 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1326 'file_space_id' '' 1319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1322 'buf' '' 1319 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1323 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1323 'dims' '' 1319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1324 'hdferr' '' 1319 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1314 'dims' '' 1310 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1316 'mem_space_id' '' 1310 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1313 'buf' '' 1310 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1314 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1314 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1314 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1314 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1311 'dset_id' '' 1310 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1318 'xfer_prp' '' 1310 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1312 'mem_type_id' '' 1310 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1315 'hdferr' '' 1310 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1291 'xfer_prp' '' 1283 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1294 'mem_type_id' '' 1292 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1327 'xfer_prp' '' 1319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1317 'file_space_id' '' 1310 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1297 'hdferr' '' 1292 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1293 'dset_id' '' 1292 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1296 'dims' '' 1292 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1298 'mem_space_id' '' 1292 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1325 'mem_space_id' '' 1319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1083 'fill_valuer' '' 1082 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 4 ()) 0 0 () () 0 () ())
-1299 'file_space_id' '' 1292 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1284 'dset_id' '' 1283 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1231 'mem_type_id' '' 1229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1304 'buf' '' 1301 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1305 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1305 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1305 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1305 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1305 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1305 'dims' '' 1301 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1276 'mem_type_id' '' 1274 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1309 'xfer_prp' '' 1301 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1308 'file_space_id' '' 1301 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1303 'mem_type_id' '' 1301 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1306 'hdferr' '' 1301 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1277 'buf' '' 1274 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1278 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1278 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1278 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1307 'mem_space_id' '' 1301 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1279 'hdferr' '' 1274 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1278 'dims' '' 1274 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1281 'file_space_id' '' 1274 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1302 'dset_id' '' 1301 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1196 'buf' '' 1193 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1197 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1195 'mem_type_id' '' 1193 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1197 'dims' '' 1193 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1275 'dset_id' '' 1274 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1295 'buf' '' 1292 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1296 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1296 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1296 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1296 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1296 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1296 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1300 'xfer_prp' '' 1292 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-971 'dims' '' 967 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-818 'attr_id' '' 817 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1198 'hdferr' '' 1193 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1282 'xfer_prp' '' 1274 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1201 'xfer_prp' '' 1193 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1194 'dset_id' '' 1193 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1366 'mem_type_id' '' 1364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1280 'mem_space_id' '' 1274 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1369 'hdferr' '' 1364 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1367 'buf' '' 1364 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1368 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1368 'dims' '' 1364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1371 'file_space_id' '' 1364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1440 'dims' '' 1436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1438 'mem_type_id' '' 1436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1441 'hdferr' '' 1436 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1443 'file_space_id' '' 1436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1437 'dset_id' '' 1436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1439 'buf' '' 1436 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1347 'dset_id' '' 1346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1348 'mem_type_id' '' 1346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1354 'xfer_prp' '' 1346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1353 'file_space_id' '' 1346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1419 'dset_id' '' 1418 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1422 'dims' '' 1418 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1421 'buf' '' 1418 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1422 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1422 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1422 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1422 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1422 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1425 'file_space_id' '' 1418 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1420 'mem_type_id' '' 1418 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1424 'mem_space_id' '' 1418 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1423 'hdferr' '' 1418 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1351 'hdferr' '' 1346 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1350 'dims' '' 1346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1444 'xfer_prp' '' 1436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1370 'mem_space_id' '' 1364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1378 'hdferr' '' 1373 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1380 'file_space_id' '' 1373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1377 'dims' '' 1373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1379 'mem_space_id' '' 1373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1376 'buf' '' 1373 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1377 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1377 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1377 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1377 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1377 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1377 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1374 'dset_id' '' 1373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1426 'xfer_prp' '' 1418 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1381 'xfer_prp' '' 1373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1442 'mem_space_id' '' 1436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1349 'buf' '' 1346 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1350 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1350 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1350 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1392 'dset_id' '' 1391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1375 'mem_type_id' '' 1373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1372 'xfer_prp' '' 1364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1352 'mem_space_id' '' 1346 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1396 'hdferr' '' 1391 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1398 'file_space_id' '' 1391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1397 'mem_space_id' '' 1391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1431 'dims' '' 1427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1430 'buf' '' 1427 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1431 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1431 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1431 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1431 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1429 'mem_type_id' '' 1427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1434 'file_space_id' '' 1427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1433 'mem_space_id' '' 1427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1399 'xfer_prp' '' 1391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1428 'dset_id' '' 1427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1356 'dset_id' '' 1355 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1357 'mem_type_id' '' 1355 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1358 'buf' '' 1355 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1359 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1359 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1360 'hdferr' '' 1355 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1363 'xfer_prp' '' 1355 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1361 'mem_space_id' '' 1355 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1449 'dims' '' 1445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1447 'mem_type_id' '' 1445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1446 'dset_id' '' 1445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1450 'hdferr' '' 1445 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1448 'buf' '' 1445 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1449 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1449 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1449 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1449 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1449 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1449 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1449 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1453 'xfer_prp' '' 1445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1090 'plist_id' '' 1088 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1451 'mem_space_id' '' 1445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1091 'hdferr' '' 1088 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1402 'mem_type_id' '' 1400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1452 'file_space_id' '' 1445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1435 'xfer_prp' '' 1427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1394 'buf' '' 1391 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1395 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1395 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1395 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1395 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1395 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1395 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1395 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1200 'file_space_id' '' 1193 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1089 'dset_id' '' 1088 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1403 'buf' '' 1400 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(DERIVED 3953 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1404 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1404 'dims' '' 1400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1432 'hdferr' '' 1427 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1359 'dims' '' 1355 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1406 'mem_space_id' '' 1400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1410 'dset_id' '' 1409 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1408 'xfer_prp' '' 1400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1395 'dims' '' 1391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1362 'file_space_id' '' 1355 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1411 'mem_type_id' '' 1409 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1405 'hdferr' '' 1400 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1407 'file_space_id' '' 1400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1415 'mem_space_id' '' 1409 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1414 'hdferr' '' 1409 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1384 'mem_type_id' '' 1382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1386 'dims' '' 1382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1387 'hdferr' '' 1382 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1385 'buf' '' 1382 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-1388 'mem_space_id' '' 1382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1389 'file_space_id' '' 1382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1519 'dims' '' 1515 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1518 'buf' '' 1515 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1519 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1519 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1383 'dset_id' '' 1382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1517 'mem_type_id' '' 1515 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1416 'file_space_id' '' 1409 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1413 'dims' '' 1409 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1523 'file_space_id' '' 1515 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1522 'mem_space_id' '' 1515 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1516 'dset_id' '' 1515 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1459 'dset_id' '' 1458 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1524 'xfer_prp' '' 1515 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1462 'dims' '' 1458 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1390 'xfer_prp' '' 1382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1464 'hdferr' '' 1458 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1463 'str_len' '' 1458 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-1417 'xfer_prp' '' 1409 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1412 'buf' '' 1409 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(DERIVED 3943 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1413 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1467 'xfer_prp' '' 1458 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1855 'hdferr' '' 1849 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1853 'dims' '' 1849 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1852 'buf' '' 1849 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1853 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1853 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1857 'file_space_id' '' 1849 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1856 'mem_space_id' '' 1849 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1850 'dset_id' '' 1849 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1393 'mem_type_id' '' 1391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1461 'buf' '' 1458 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1462 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1))))) 0 () ())
-1460 'mem_type_id' '' 1458 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1520 'len' '' 1515 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1521 'hdferr' '' 1515 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1851 'mem_type_id' '' 1849 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1854 'len' '' 1849 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1490 'mem_type_id' '' 1488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1489 'dset_id' '' 1488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1493 'hdferr' '' 1488 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1466 'file_space_id' '' 1458 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1496 'xfer_prp' '' 1488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1492 'dims' '' 1488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1491 'buf' '' 1488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1492 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1492 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1492 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1526 'dset_id' '' 1525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1531 'mem_space_id' '' 1525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1529 'dims' '' 1525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1530 'hdferr' '' 1525 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1528 'buf' '' 1525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1529 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1529 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1529 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1529 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1529 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1529 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1532 'file_space_id' '' 1525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1538 'dims' '' 1534 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1539 'hdferr' '' 1534 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1590 'mem_type_id' '' 1588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1593 'hdferr' '' 1588 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1541 'file_space_id' '' 1534 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1533 'xfer_prp' '' 1525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1592 'dims' '' 1588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1589 'dset_id' '' 1588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1591 'buf' '' 1588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1592 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1592 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1592 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1592 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1592 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1592 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1592 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1536 'mem_type_id' '' 1534 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1542 'xfer_prp' '' 1534 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1540 'mem_space_id' '' 1534 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1527 'mem_type_id' '' 1525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1498 'dset_id' '' 1497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1503 'mem_space_id' '' 1497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1501 'dims' '' 1497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1502 'hdferr' '' 1497 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1595 'file_space_id' '' 1588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1596 'xfer_prp' '' 1588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1594 'mem_space_id' '' 1588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1537 'buf' '' 1534 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1538 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1538 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1538 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1538 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1538 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1535 'dset_id' '' 1534 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1499 'mem_type_id' '' 1497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1505 'xfer_prp' '' 1497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1547 'dims' '' 1543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1545 'mem_type_id' '' 1543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1500 'buf' '' 1497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1501 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1501 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1501 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1501 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1549 'mem_space_id' '' 1543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1548 'hdferr' '' 1543 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1544 'dset_id' '' 1543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1555 'buf' '' 1552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-1556 'dims' '' 1552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1551 'xfer_prp' '' 1543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1554 'mem_type_id' '' 1552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1504 'file_space_id' '' 1497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1559 'file_space_id' '' 1552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1560 'xfer_prp' '' 1552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1553 'dset_id' '' 1552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1546 'buf' '' 1543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1547 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-1494 'mem_space_id' '' 1488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1495 'file_space_id' '' 1488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1514 'xfer_prp' '' 1506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1511 'hdferr' '' 1506 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1513 'file_space_id' '' 1506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1509 'buf' '' 1506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1510 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1510 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1558 'mem_space_id' '' 1552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1508 'mem_type_id' '' 1506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1562 'dset_id' '' 1561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1563 'mem_type_id' '' 1561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1566 'hdferr' '' 1561 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1565 'dims' '' 1561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1567 'mem_space_id' '' 1561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1568 'file_space_id' '' 1561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1557 'hdferr' '' 1552 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1564 'buf' '' 1561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1565 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1565 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1565 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1565 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1569 'xfer_prp' '' 1561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1602 'hdferr' '' 1597 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1599 'mem_type_id' '' 1597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1607 'dset_id' '' 1606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1601 'dims' '' 1597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1598 'dset_id' '' 1597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1510 'dims' '' 1506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1512 'mem_space_id' '' 1506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1507 'dset_id' '' 1506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1603 'mem_space_id' '' 1597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1604 'file_space_id' '' 1597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1605 'xfer_prp' '' 1597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1609 'buf' '' 1606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-1610 'dims' '' 1606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1611 'hdferr' '' 1606 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1612 'mem_space_id' '' 1606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1652 'dset_id' '' 1651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1655 'dims' '' 1651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1654 'buf' '' 1651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1655 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1655 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1655 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1655 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1655 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1655 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1655 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1614 'xfer_prp' '' 1606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1843 'buf' '' 1840 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1844 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1844 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1844 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1844 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1844 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1656 'hdferr' '' 1651 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1842 'mem_type_id' '' 1840 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1844 'dims' '' 1840 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1841 'dset_id' '' 1840 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1845 'hdferr' '' 1840 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1658 'file_space_id' '' 1651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1659 'xfer_prp' '' 1651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1613 'file_space_id' '' 1606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1848 'xfer_prp' '' 1840 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1573 'buf' '' 1570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1574 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1574 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1574 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1574 'dims' '' 1570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1847 'file_space_id' '' 1840 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1550 'file_space_id' '' 1543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1653 'mem_type_id' '' 1651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1571 'dset_id' '' 1570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1365 'dset_id' '' 1364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1465 'mem_space_id' '' 1458 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1846 'mem_space_id' '' 1840 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1575 'hdferr' '' 1570 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1577 'file_space_id' '' 1570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1578 'xfer_prp' '' 1570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1572 'mem_type_id' '' 1570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1657 'mem_space_id' '' 1651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1600 'buf' '' 1597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1601 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1601 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1601 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1601 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1601 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1601 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1608 'mem_type_id' '' 1606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1584 'hdferr' '' 1579 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1583 'dims' '' 1579 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1581 'mem_type_id' '' 1579 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1585 'mem_space_id' '' 1579 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1478 'buf' '' 1475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1479 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1586 'file_space_id' '' 1579 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1587 'xfer_prp' '' 1579 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1479 'dims' '' 1475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1477 'mem_type_id' '' 1475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1483 'xfer_prp' '' 1475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2424 'rank' '' 2421 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1482 'file_space_id' '' 1475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1480 'hdferr' '' 1475 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1582 'buf' '' 1579 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1583 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1583 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1470 'dataset_id' '' 1469 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1472 'space_id' '' 1469 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1473 'len' '' 1469 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-1644 'mem_type_id' '' 1642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1643 'dset_id' '' 1642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1471 'type_id' '' 1469 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1650 'xfer_prp' '' 1642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1649 'file_space_id' '' 1642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1616 'dset_id' '' 1615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1645 'buf' '' 1642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1646 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1646 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1646 'dims' '' 1642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1647 'hdferr' '' 1642 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1474 'hdferr' '' 1469 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1619 'dims' '' 1615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1623 'xfer_prp' '' 1615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1661 'dset_id' '' 1660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1622 'file_space_id' '' 1615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1664 'dims' '' 1660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1665 'hdferr' '' 1660 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1618 'buf' '' 1615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1619 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1662 'mem_type_id' '' 1660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1716 'mem_type_id' '' 1714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1720 'mem_space_id' '' 1714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1719 'hdferr' '' 1714 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1715 'dset_id' '' 1714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1668 'xfer_prp' '' 1660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1718 'dims' '' 1714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1721 'file_space_id' '' 1714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1663 'buf' '' 1660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1664 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1664 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1664 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1664 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1664 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1664 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1620 'hdferr' '' 1615 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1476 'dset_id' '' 1475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1717 'buf' '' 1714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1718 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1718 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1718 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1718 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1718 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1634 'dset_id' '' 1633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1637 'dims' '' 1633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1722 'xfer_prp' '' 1714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1638 'hdferr' '' 1633 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1640 'file_space_id' '' 1633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1635 'mem_type_id' '' 1633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1639 'mem_space_id' '' 1633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1481 'mem_space_id' '' 1475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1667 'file_space_id' '' 1660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1626 'mem_type_id' '' 1624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1621 'mem_space_id' '' 1615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1625 'dset_id' '' 1624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1617 'mem_type_id' '' 1615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1641 'xfer_prp' '' 1633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1629 'hdferr' '' 1624 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1632 'xfer_prp' '' 1624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1631 'file_space_id' '' 1624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1628 'dims' '' 1624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1627 'buf' '' 1624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1628 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1628 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1628 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1630 'mem_space_id' '' 1624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1648 'mem_space_id' '' 1642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1679 'dset_id' '' 1678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1684 'mem_space_id' '' 1678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1681 'buf' '' 1678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1680 'mem_type_id' '' 1678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1707 'mem_type_id' '' 1705 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1685 'file_space_id' '' 1678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1708 'buf' '' 1705 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1709 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-1683 'hdferr' '' 1678 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1710 'hdferr' '' 1705 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1712 'file_space_id' '' 1705 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1752 'mem_type_id' '' 1750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1713 'xfer_prp' '' 1705 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1751 'dset_id' '' 1750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1754 'dims' '' 1750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1756 'mem_space_id' '' 1750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1755 'hdferr' '' 1750 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1758 'xfer_prp' '' 1750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1753 'buf' '' 1750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1754 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1754 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1754 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1754 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1754 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1754 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1711 'mem_space_id' '' 1705 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1706 'dset_id' '' 1705 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1666 'mem_space_id' '' 1660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1757 'file_space_id' '' 1750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1728 'hdferr' '' 1723 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1731 'xfer_prp' '' 1723 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1730 'file_space_id' '' 1723 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1724 'dset_id' '' 1723 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1779 'mem_type_id' '' 1777 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1780 'buf' '' 1777 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1781 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1781 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1781 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1781 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1782 'hdferr' '' 1777 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1727 'dims' '' 1723 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1729 'mem_space_id' '' 1723 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1783 'mem_space_id' '' 1777 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1781 'dims' '' 1777 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1778 'dset_id' '' 1777 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1785 'xfer_prp' '' 1777 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1709 'dims' '' 1705 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1690 'buf' '' 1687 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1691 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1691 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1691 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1688 'dset_id' '' 1687 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1784 'file_space_id' '' 1777 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1692 'hdferr' '' 1687 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1695 'xfer_prp' '' 1687 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1693 'mem_space_id' '' 1687 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1734 'mem_type_id' '' 1732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1736 'dims' '' 1732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1737 'hdferr' '' 1732 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1740 'xfer_prp' '' 1732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1738 'mem_space_id' '' 1732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1694 'file_space_id' '' 1687 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1697 'dset_id' '' 1696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1699 'buf' '' 1696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1700 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1700 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1700 'dims' '' 1696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1739 'file_space_id' '' 1732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1698 'mem_type_id' '' 1696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1689 'mem_type_id' '' 1687 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1726 'buf' '' 1723 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1727 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1727 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1727 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1727 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1727 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1725 'mem_type_id' '' 1723 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1636 'buf' '' 1633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1637 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1637 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1637 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1637 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1733 'dset_id' '' 1732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1735 'buf' '' 1732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1736 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1736 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1736 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1736 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1736 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1736 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1736 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1701 'hdferr' '' 1696 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1702 'mem_space_id' '' 1696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1580 'dset_id' '' 1579 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1686 'xfer_prp' '' 1678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1682 'dims' '' 1678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1670 'dset_id' '' 1669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1673 'dims' '' 1669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1703 'file_space_id' '' 1696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1769 'dset_id' '' 1768 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1676 'file_space_id' '' 1669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1672 'buf' '' 1669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1673 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1673 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1673 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1673 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1673 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1673 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1673 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1677 'xfer_prp' '' 1669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1704 'xfer_prp' '' 1696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1675 'mem_space_id' '' 1669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1674 'hdferr' '' 1669 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1770 'mem_type_id' '' 1768 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1774 'mem_space_id' '' 1768 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1775 'file_space_id' '' 1768 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1773 'hdferr' '' 1768 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1671 'mem_type_id' '' 1669 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1771 'buf' '' 1768 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-DERIVED 3943 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1772 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1691 'dims' '' 1687 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1858 'xfer_prp' '' 1849 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1761 'mem_type_id' '' 1759 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1576 'mem_space_id' '' 1570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1762 'buf' '' 1759 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-DERIVED 3953 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1763 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1763 'dims' '' 1759 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1767 'xfer_prp' '' 1759 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1776 'xfer_prp' '' 1768 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1766 'file_space_id' '' 1759 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1790 'dims' '' 1786 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1789 'buf' '' 1786 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1790 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1))))) 0 () ())
-1765 'mem_space_id' '' 1759 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1793 'mem_space_id' '' 1786 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1795 'xfer_prp' '' 1786 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1798 'mem_type_id' '' 1796 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1792 'hdferr' '' 1786 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1787 'dset_id' '' 1786 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1797 'dset_id' '' 1796 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1794 'file_space_id' '' 1786 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1791 'str_len' '' 1786 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-1799 'buf' '' 1796 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1800 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1800 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1804 'file_space_id' '' 1796 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1802 'hdferr' '' 1796 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1805 'xfer_prp' '' 1796 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1800 'dims' '' 1796 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1809 'buf' '' 1806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1810 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1810 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1803 'mem_space_id' '' 1796 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1808 'mem_type_id' '' 1806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1801 'len' '' 1796 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1788 'mem_type_id' '' 1786 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1810 'dims' '' 1806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1811 'len' '' 1806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1814 'file_space_id' '' 1806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1764 'hdferr' '' 1759 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1815 'xfer_prp' '' 1806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1812 'hdferr' '' 1806 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1824 'hdferr' '' 1823 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1813 'mem_space_id' '' 1806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1827 'error_no' '' 1826 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1839 'name' '' 1837 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1828 'name' '' 1826 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1821 'hdferr' '' 1817 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1834 'hdferr' '' 1832 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1820 'namelen' '' 1817 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1819 'name' '' 1817 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1744 'buf' '' 1741 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-1745 'dims' '' 1741 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1746 'hdferr' '' 1741 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1748 'file_space_id' '' 1741 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1863 'access_flags' '' 1861 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1864 'file_id' '' 1861 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1747 'mem_space_id' '' 1741 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1862 'name' '' 1861 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1749 'xfer_prp' '' 1741 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1742 'dset_id' '' 1741 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1833 'printflag' '' 1832 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1829 'hdferr' '' 1826 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1867 'access_prp' '' 1861 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1818 'error_no' '' 1817 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1876 'object_id' '' 1875 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1743 'mem_type_id' '' 1741 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1865 'hdferr' '' 1861 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1878 'hdferr' '' 1875 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1892 'file_id' '' 1891 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1877 'scope' '' 1875 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1894 'hdferr' '' 1891 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1888 'free_space' '' 1886 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1887 'file_id' '' 1886 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1925 'hdferr' '' 1921 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1922 'file_id' '' 1921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1893 'size' '' 1891 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-1866 'creation_prp' '' 1861 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1807 'dset_id' '' 1806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1882 'buf' '' 1880 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1923 'obj_type' '' 1921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1924 'obj_count' '' 1921 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1881 'obj_id' '' 1880 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1902 'name' '' 1901 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1883 'size' '' 1880 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-1889 'hdferr' '' 1886 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1903 'status' '' 1901 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-1904 'hdferr' '' 1901 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1772 'dims' '' 1768 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2368 'rank' '' 2365 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1898 'prop_id' '' 1896 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1934 'ret_file_id' '' 1932 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1916 'max_objs' '' 1913 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1914 'file_id' '' 1913 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1915 'obj_type' '' 1913 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1933 'file_id' '' 1932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1899 'hdferr' '' 1896 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1917 'obj_ids' '' 1913 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-1918 'hdferr' '' 1913 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1884 'hdferr' '' 1880 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1928 'loc_id' '' 1927 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1929 'name' '' 1927 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1838 'hdferr' '' 1837 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1930 'hdferr' '' 1927 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1919 'num_objs' '' 1913 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 8 ()) 0 0 () () 0 () ())
-1941 'name' '' 1940 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1942 'access_flags' '' 1940 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1943 'file_id' '' 1940 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1907 'loc_id' '' 1906 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1909 'child_id' '' 1906 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1944 'hdferr' '' 1940 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1910 'hdferr' '' 1906 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1908 'name' '' 1906 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2465 'access_id' '' 2463 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1872 'hdferr' '' 1870 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1948 'error' '' 1947 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1871 'file_id' '' 1870 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2466 'hdferr' '' 2463 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2464 'file_id' '' 2463 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1951 'loc_id' '' 1950 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1954 'gcpl_id' '' 1950 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1953 'hdferr' '' 1950 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1958 'grp_id' '' 1957 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1952 'grp_id' '' 1950 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1955 'gapl_id' '' 1950 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1964 'grp_id' '' 1961 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1911 'access_prp' '' 1906 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1945 'access_prp' '' 1940 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1966 'size_hint' '' 1961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 8 ()) 0 0 () () 0 () ())
-1967 'lcpl_id' '' 1961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1965 'hdferr' '' 1961 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1968 'gcpl_id' '' 1961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1963 'name' '' 1961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1962 'loc_id' '' 1961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2031 'grp_id' '' 2030 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2033 'hdferr' '' 2030 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2021 'loc_id' '' 2020 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2026 'hdferr' '' 2020 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2024 'nlinks' '' 2020 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2022 'group_name' '' 2020 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2027 'lapl_id' '' 2020 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2023 'storage_type' '' 2020 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2025 'max_corder' '' 2020 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2032 'gcpl_id' '' 2030 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1989 'n' '' 1984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-1986 'group_name' '' 1984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1988 'order' '' 1984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2028 'mounted' '' 2020 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (LOGICAL 4 ()) 0 0 () () 0 () ())
-1985 'loc_id' '' 1984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1987 'index_type' '' 1984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1992 'max_corder' '' 1984 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1994 'lapl_id' '' 1984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1991 'nlinks' '' 1984 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1999 'name' '' 1997 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2002 'hdferr' '' 1997 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2000 'size' '' 1997 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2001 'buffer' '' 1997 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((VARIABLE (INTEGER 8 ()) 0 2000 ()))) 0 0 () () 0 () ())
-1998 'loc_id' '' 1997 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2013 'group_id' '' 2012 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2015 'nlinks' '' 2012 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2014 'storage_type' '' 2012 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1995 'mounted' '' 1984 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (LOGICAL 4 ()) 0 0 () () 0 () ())
-1990 'storage_type' '' 1984 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2016 'max_corder' '' 2012 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2009 'obj_type' '' 2004 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2010 'hdferr' '' 2004 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2008 'obj_name' '' 2004 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2007 'idx' '' 2004 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2017 'hdferr' '' 2012 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1993 'hdferr' '' 1984 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1972 'majnum' '' 1971 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2006 'name' '' 2004 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2005 'loc_id' '' 2004 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2018 'mounted' '' 2012 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (LOGICAL 4 ()) 0 0 () () 0 () ())
-1959 'hdferr' '' 1957 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1981 'buffer' '' 1977 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((VARIABLE (INTEGER 8 ()) 0 1980 ()))) 0 0 () () 0 () ())
-1982 'hdferr' '' 1977 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1978 'loc_id' '' 1977 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1980 'size' '' 1977 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-1974 'relnum' '' 1971 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1975 'error' '' 1971 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2312 'rank' '' 2309 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1979 'name' '' 1977 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2119 'current_name' '' 2116 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2117 'loc_id' '' 2116 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2120 'new_name' '' 2116 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2045 'src_loc_id' '' 2044 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1973 'minnum' '' 1971 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2118 'link_type' '' 2116 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1969 'gapl_id' '' 1961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2049 'hdferr' '' 2044 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2067 'grp_id' '' 2064 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2048 'dst_name' '' 2044 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2066 'name' '' 2064 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2046 'src_name' '' 2044 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2069 'gapl_id' '' 2064 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2053 'loc_id' '' 2052 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2068 'hdferr' '' 2064 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2056 'hdferr' '' 2052 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2054 'name' '' 2052 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2078 'loc_id' '' 2077 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2081 'hdferr' '' 2077 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2059 'loc_id' '' 2058 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2061 'comment' '' 2058 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2073 'loc_id' '' 2072 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2060 'name' '' 2058 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2062 'hdferr' '' 2058 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2080 'new_name' '' 2077 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2075 'hdferr' '' 2072 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2055 'nmembers' '' 2052 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2079 'name' '' 2077 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2098 'ref_count' '' 2096 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2093 'name_size' '' 2089 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2090 'obj_id' '' 2089 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2352 'rank' '' 2349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2091 'buf' '' 2089 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2065 'loc_id' '' 2064 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2047 'dst_loc_id' '' 2044 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2121 'hdferr' '' 2116 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2074 'name' '' 2072 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2094 'hdferr' '' 2089 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2114 'hdferr' '' 2111 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2092 'buf_size' '' 2089 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2038 'link_type' '' 2035 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2041 'hdferr' '' 2035 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2037 'cur_name' '' 2035 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2112 'obj_id' '' 2111 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2113 'ref_count' '' 2111 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2097 'obj_id' '' 2096 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2103 'ref_count' '' 2101 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2108 'type' '' 2106 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2102 'obj_id' '' 2101 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2104 'hdferr' '' 2101 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2040 'new_name' '' 2035 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2109 'hdferr' '' 2106 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2126 'src_loc_id' '' 2125 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2036 'cur_loc_id' '' 2035 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2130 'hdferr' '' 2125 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2129 'dest_name' '' 2125 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2175 'target_path' '' 2174 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2178 'hdferr' '' 2174 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2177 'link_name' '' 2174 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2131 'lcpl_id' '' 2125 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2132 'lapl_id' '' 2125 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2127 'src_name' '' 2125 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2039 'new_loc_id' '' 2035 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2140 'lcpl_id' '' 2134 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2180 'lapl_id' '' 2174 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2141 'lapl_id' '' 2134 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2136 'obj_name' '' 2134 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2135 'obj_loc_id' '' 2134 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2138 'link_name' '' 2134 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2154 'name' '' 2152 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2153 'loc_id' '' 2152 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2155 'hdferr' '' 2152 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2139 'hdferr' '' 2134 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2179 'lcpl_id' '' 2174 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2137 'link_loc_id' '' 2134 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2156 'lapl_id' '' 2152 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2162 'hdferr' '' 2158 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2161 'link_exists' '' 2158 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2128 'dest_loc_id' '' 2125 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2176 'link_loc_id' '' 2174 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2163 'lapl_id' '' 2158 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2160 'name' '' 2158 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2168 'index_field' '' 2165 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2169 'order' '' 2165 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2171 'hdferr' '' 2165 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2170 'n' '' 2165 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-2172 'lapl_id' '' 2165 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2166 'loc_id' '' 2165 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2167 'group_name' '' 2165 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2146 'link_loc_id' '' 2143 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2145 'obj_name' '' 2143 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2144 'file_name' '' 2143 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2107 'obj_id' '' 2106 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2185 'hdferr' '' 2182 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2183 'id' '' 2182 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-2150 'lapl_id' '' 2143 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2149 'lcpl_id' '' 2143 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2159 'loc_id' '' 2158 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2147 'link_name' '' 2143 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2306 'registered' '' 2304 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2214 'dest_loc_id' '' 2211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2212 'src_loc_id' '' 2211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2307 'hdferr' '' 2304 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2213 'src_name' '' 2211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2200 'link_name' '' 2198 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2218 'lapl_id' '' 2211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2204 'link_type' '' 2198 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2203 'f_corder_valid' '' 2198 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(LOGICAL 4 ()) 0 0 () () 0 () ())
-2201 'cset' '' 2198 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2305 'link_cls_id' '' 2304 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2184 'valid' '' 2182 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2207 'hdferr' '' 2198 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2206 'val_size' '' 2198 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2208 'lapl_id' '' 2198 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2199 'link_loc_id' '' 2198 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2202 'corder' '' 2198 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2217 'lcpl_id' '' 2211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2449 'loc_id' '' 2448 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2450 'group_name' '' 2448 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2205 'address' '' 2198 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2367 'dset_name' '' 2365 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2453 'n' '' 2448 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-2452 'order' '' 2448 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2216 'hdferr' '' 2211 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2148 'hdferr' '' 2143 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2099 'hdferr' '' 2096 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1897 'file_id' '' 1896 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2455 'f_corder_valid' '' 2448 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(LOGICAL 4 ()) 0 0 () () 0 () ())
-2459 'val_size' '' 2448 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2456 'corder' '' 2448 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2457 'cset' '' 2448 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2215 'dest_name' '' 2211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2451 'index_field' '' 2448 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2458 'address' '' 2448 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2461 'lapl_id' '' 2448 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2607 'obj_id' '' 2604 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2608 'hdferr' '' 2604 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2597 'loc_id' '' 2596 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2600 'hdferr' '' 2596 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2599 'obj_id' '' 2596 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2606 'addr' '' 2604 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2613 'new_link_name' '' 2610 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2614 'hdferr' '' 2610 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2612 'new_loc_id' '' 2610 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1485 'dataset_id' '' 1484 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2615 'lcpl_id' '' 2610 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2594 'error' '' 2593 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2622 'hdferr' '' 2620 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1487 'hdferr' '' 1484 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2335 'dset_name' '' 2333 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1486 'size' '' 1484 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2657 'prp_id' '' 2656 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2611 'object_id' '' 2610 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2621 'class' '' 2620 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2616 'lapl_id' '' 2610 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2638 'name' '' 2635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2654 'hdferr' '' 2652 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2636 'dst_id' '' 2635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2630 'parent' '' 2629 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2632 'class' '' 2629 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2714 'prp_id' '' 2713 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2633 'hdferr' '' 2629 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2653 'prp_id' '' 2652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2658 'flag' '' 2656 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2637 'src_id' '' 2635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2639 'hdferr' '' 2635 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2188 'loc_id' '' 2187 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2460 'hdferr' '' 2448 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2194 'hdferr' '' 2187 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2196 'lapl_id' '' 2187 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2195 'size' '' 2187 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-2193 'name' '' 2187 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2190 'index_field' '' 2187 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2716 'flag' '' 2713 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2717 'hdferr' '' 2713 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2189 'group_name' '' 2187 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2191 'order' '' 2187 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2709 'plist_id' '' 2708 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2710 'flag' '' 2708 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2711 'hdferr' '' 2708 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2192 'n' '' 2187 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-2601 'lapl_id' '' 2596 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2631 'name' '' 2629 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2659 'hdferr' '' 2656 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2598 'name' '' 2596 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2605 'loc_id' '' 2604 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2664 'hdferr' '' 2661 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2662 'plist_id' '' 2661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2678 'plist_id' '' 2677 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2369 'dims' '' 2365 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2680 'hdferr' '' 2677 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2696 'mdc_nelmts' '' 2694 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2700 'hdferr' '' 2694 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2698 'rdcc_nbytes' '' 2694 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2699 'rdcc_w0' '' 2694 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL
-4 ()) 0 0 () () 0 () ())
-2697 'rdcc_nelmts' '' 2694 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2689 'prp_id' '' 2688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2695 'prp_id' '' 2694 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2359 'dset_name' '' 2357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2692 'hdferr' '' 2688 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2668 'crt_order_flags' '' 2666 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2667 'ocpl_id' '' 2666 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2690 'name' '' 2688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2679 'size' '' 2677 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2663 'flag' '' 2661 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2669 'hdferr' '' 2666 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2684 'left' '' 2682 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2686 'right' '' 2682 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2687 'hdferr' '' 2682 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2683 'prp_id' '' 2682 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2355 'buf' '' 2349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 2353 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2353 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-2338 'type_id' '' 2333 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2703 'ocpl_id' '' 2702 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2706 'hdferr' '' 2702 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2705 'min_dense' '' 2702 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2085 'obj_id' '' 2084 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2087 'hdferr' '' 2084 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2086 'file_id' '' 2084 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2715 'name' '' 2713 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2704 'max_compact' '' 2702 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2685 'middle' '' 2682 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-1245 'file_space_id' '' 1238 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1760 'dset_id' '' 1759 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2673 'threshold' '' 2671 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2648 'plist2_id' '' 2646 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2647 'plist1_id' '' 2646 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2674 'alignment' '' 2671 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2650 'hdferr' '' 2646 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3789 'encoding' '' 3787 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2739 'prp_id' '' 2738 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2742 'hdferr' '' 2738 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2741 'size' '' 2738 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3790 'hdferr' '' 3787 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3788 'plist_id' '' 3787 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2747 'hdferr' '' 2744 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2761 'parent_id' '' 2759 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2740 'name' '' 2738 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2746 'classtype' '' 2744 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2745 'prp_id' '' 2744 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2649 'flag' '' 2646 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2675 'hdferr' '' 2671 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2727 'ndims' '' 2725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2728 'dims' '' 2725 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 2727 ())) 0 () ())
-2729 'hdferr' '' 2725 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2734 'rdcc_nbytes' '' 2731 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2733 'rdcc_nslots' '' 2731 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2735 'rdcc_w0' '' 2731 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL
-4 ()) 0 0 () () 0 () ())
-2736 'hdferr' '' 2731 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2726 'prp_id' '' 2725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2762 'hdferr' '' 2759 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2760 'prp_id' '' 2759 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1935 'hdferr' '' 1932 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2643 'prp_id' '' 2641 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2329 'dims' '' 2325 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2644 'hdferr' '' 2641 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2752 'hdferr' '' 2749 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2625 'prp_id' '' 2624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2627 'hdferr' '' 2624 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2626 'new_prp_id' '' 2624 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2642 'class' '' 2641 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2370 'type_id' '' 2365 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2732 'dapl_id' '' 2731 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2750 'lcpl_id' '' 2749 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2751 'crt_intermed_group' '' 2749 ((VARIABLE IN UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2755 'ocp_plist_id' '' 2754 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2766 'driver' '' 2764 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2757 'hdferr' '' 2754 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2770 'name' '' 2768 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2767 'hdferr' '' 2764 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2772 'hdferr' '' 2768 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2771 'value' '' 2768 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8
-()) 0 0 () () 0 () ())
-2769 'prp_id' '' 2768 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2756 'copy_options' '' 2754 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2836 'est_name_len' '' 2833 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2786 'prp_id' '' 2785 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2835 'est_num_entries' '' 2833 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2788 'hdferr' '' 2785 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2804 'prp_id' '' 2803 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2800 'backing_store' '' 2797 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(LOGICAL 4 ()) 0 0 () () 0 () ())
-2801 'hdferr' '' 2797 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2806 'name_size' '' 2803 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2809 'bytes' '' 2803 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2805 'idx' '' 2803 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2798 'prp_id' '' 2797 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2799 'increment' '' 2797 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2837 'hdferr' '' 2833 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2808 'offset' '' 2803 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2819 'memb_map' '' 2817 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 368 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-2822 'memb_addr' '' 2817 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0') (
-OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 368 ()) (CONSTANT (
-INTEGER 4 ()) 0 '1'))) 0 () ())
-2818 'prp_id' '' 2817 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2820 'memb_fapl' '' 2817 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 368 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-2821 'memb_name' '' 2817 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0
-'0') (OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 368 ()) (
-CONSTANT (INTEGER 4 ()) 0 '1'))) 0 () ())
-2807 'name' '' 2803 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2765 'prp_id' '' 2764 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2372 'errcode' '' 2365 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2787 'count' '' 2785 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2824 'hdferr' '' 2817 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2825 'maxlen_out' '' 2817 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2829 'memb_size' '' 2827 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3191 'hdferr' '' 3188 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2831 'hdferr' '' 2827 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2356 'errcode' '' 2349 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3190 'flag' '' 3188 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2813 'fapl_id' '' 2812 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2823 'relax' '' 2817 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2828 'prp_id' '' 2827 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2810 'hdferr' '' 2803 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2834 'gcpl_id' '' 2833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2371 'buf' '' 2365 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2369 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-2369 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2369 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-2691 'value' '' 2688 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2454 'link_type' '' 2448 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2815 'hdferr' '' 2812 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2791 'fapl_id' '' 2790 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2792 'alignment' '' 2790 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2794 'cbuf_size' '' 2790 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2793 'block_size' '' 2790 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2776 'flag' '' 2774 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2849 'prp_id' '' 2848 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2777 'hdferr' '' 2774 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3189 'plist_id' '' 3188 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2852 'hdferr' '' 2848 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2795 'hdferr' '' 2790 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2775 'prp_id' '' 2774 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2882 'fillvalue' '' 2879 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 4 ()) 0 0 () () 0 () ())
-2880 'prp_id' '' 2879 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2881 'type_id' '' 2879 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2874 'cd_values' '' 2869 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2873 'cd_nelmts' '' 2869 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2870 'prp_id' '' 2869 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2850 'type_id' '' 2848 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2871 'filter_number' '' 2869 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2878 'hdferr' '' 2869 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2876 'name' '' 2869 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2887 'ik' '' 2885 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2875 'namelen' '' 2869 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2897 'crt_order_flags' '' 2895 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2898 'hdferr' '' 2895 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2890 'prp_id' '' 2889 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2996 'hdferr' '' 2993 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2891 'name' '' 2889 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2893 'hdferr' '' 2889 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2886 'prp_id' '' 2885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2888 'hdferr' '' 2885 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2896 'gcpl_id' '' 2895 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2995 'layout' '' 2993 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3001 'hdferr' '' 2998 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3000 'size' '' 2998 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2865 'prp_id' '' 2864 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2892 'value' '' 2889 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2867 'hdferr' '' 2864 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2994 'prp_id' '' 2993 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2877 'filter_id' '' 2869 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2859 'cd_values' '' 2854 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2862 'hdferr' '' 2854 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2860 'namelen' '' 2854 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2839 'prp_id' '' 2838 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2858 'cd_nelmts' '' 2854 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2840 'type_id' '' 2838 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2842 'hdferr' '' 2838 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2857 'flags' '' 2854 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2901 'gcpl_id' '' 2900 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2855 'prp_id' '' 2854 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2841 'fillvalue' '' 2838 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 8 ()) 0 0 () () 0 () ())
-2861 'name' '' 2854 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2856 'filter_id' '' 2854 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2872 'flags' '' 2869 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2907 'max_compact' '' 2905 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2989 'plist_id' '' 2988 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2908 'min_dense' '' 2905 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2366 'loc_id' '' 2365 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2991 'hdferr' '' 2988 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2990 'size' '' 2988 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2927 'lapl_id' '' 2926 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2903 'hdferr' '' 2900 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2924 'hdferr' '' 2921 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2929 'hdferr' '' 2926 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2906 'gcpl_id' '' 2905 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2986 'hdferr' '' 2983 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2984 'prp_id' '' 2983 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2909 'hdferr' '' 2905 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2919 'hdferr' '' 2916 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2980 'size' '' 2978 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2918 'flag' '' 2916 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2981 'hdferr' '' 2978 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2979 'plist_id' '' 2978 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2917 'plist_id' '' 2916 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2902 'size_hint' '' 2900 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2937 'prp_id' '' 2936 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2976 'hdferr' '' 2972 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2973 'prp_id' '' 2972 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2923 'nprops' '' 2921 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2922 'prp_id' '' 2921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2985 'flag' '' 2983 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2975 'sizeof_size' '' 2972 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2938 'name' '' 2936 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2866 'gc_reference' '' 2864 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2932 'name' '' 2930 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2931 'prp_id' '' 2930 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2999 'plist_id' '' 2998 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2928 'nlinks' '' 2926 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2974 'sizeof_addr' '' 2972 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2934 'hdferr' '' 2930 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2967 'freelist' '' 2964 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2966 'boot' '' 2964 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2883 'hdferr' '' 2879 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2970 'hdferr' '' 2964 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2830 'memb_plist' '' 2827 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2939 'size' '' 2936 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2958 'plist' '' 2957 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2969 'shhdr' '' 2964 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2933 'value' '' 2930 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2961 'value' '' 2957 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2962 'hdferr' '' 2957 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2955 'block_size' '' 2953 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3004 'name' '' 3002 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2954 'prp_id' '' 2953 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3009 'plist' '' 3008 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3006 'value' '' 3002 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-3003 'plist' '' 3002 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3010 'name' '' 3008 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3011 'size' '' 3008 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2956 'hdferr' '' 2953 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3013 'hdferr' '' 3008 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3007 'hdferr' '' 3002 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3185 'value' '' 3181 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-2950 'lk' '' 2947 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2949 'ik' '' 2947 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3184 'size' '' 3181 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3182 'plist' '' 3181 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2960 'size' '' 2957 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2948 'prp_id' '' 2947 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3012 'value' '' 3008 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3183 'name' '' 3181 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3057 'class' '' 3056 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3005 'size' '' 3002 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3186 'hdferr' '' 3181 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2951 'hdferr' '' 2947 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3060 'value' '' 3056 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2965 'prp_id' '' 2964 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3018 'flags' '' 3015 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3017 'filter' '' 3015 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3021 'hdferr' '' 3015 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3061 'hdferr' '' 3056 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3033 'hdferr' '' 3028 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3029 'class' '' 3028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3030 'name' '' 3028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3032 'value' '' 3028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-3020 'cd_values' '' 3015 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-3059 'size' '' 3056 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3039 'hdferr' '' 3034 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3035 'class' '' 3034 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3036 'name' '' 3034 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3019 'cd_nelmts' '' 3015 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3048 'size' '' 3045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3046 'class' '' 3045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3037 'size' '' 3034 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3058 'name' '' 3056 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3050 'hdferr' '' 3045 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2913 'nfilters' '' 2911 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2914 'hdferr' '' 2911 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3047 'name' '' 3045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3038 'value' '' 3034 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-3031 'size' '' 3028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3016 'prp_id' '' 3015 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2845 'type_id' '' 2843 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2846 'fillvalue' '' 2843 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () () 0 () ())
-2360 'rank' '' 2357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2844 'prp_id' '' 2843 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2782 'hdferr' '' 2779 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2781 'expression' '' 2779 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2780 'plist_id' '' 2779 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3025 'pclass' '' 3023 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3024 'plist' '' 3023 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2847 'hdferr' '' 2843 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3049 'value' '' 3045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3026 'flag' '' 3023 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-641 'obj_id' '' 640 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3027 'hdferr' '' 3023 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-642 'name' '' 640 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-803 'size' '' 801 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-802 'attr_id' '' 801 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-644 'hdferr' '' 640 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-804 'hdferr' '' 801 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-643 'attr_id' '' 640 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2340 'errcode' '' 2333 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3054 'filter' '' 3052 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2783 'size' '' 2779 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-3055 'hdferr' '' 3052 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3053 'prp_id' '' 3052 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2912 'prp_id' '' 2911 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2940 'hdferr' '' 2936 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2944 'size' '' 2942 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2945 'hdferr' '' 2942 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2959 'name' '' 2957 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2968 'stab' '' 2964 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3077 'hdferr' '' 3074 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3076 'flag' '' 3074 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3070 'ocpl_id' '' 3069 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2943 'plist_id' '' 2942 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3180 'hdferr' '' 3176 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3177 'prp_id' '' 3176 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3072 'hdferr' '' 3069 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3081 'size' '' 3079 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3082 'hdferr' '' 3079 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3065 'max_compact' '' 3063 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3080 'plist_id' '' 3079 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3179 'alignment' '' 3176 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3064 'ocpl_id' '' 3063 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3087 'middle' '' 3084 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-3088 'right' '' 3084 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-3085 'prp_id' '' 3084 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3089 'hdferr' '' 3084 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3086 'left' '' 3084 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-3066 'min_dense' '' 3063 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3093 'mdc_nelmts' '' 3091 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3092 'prp_id' '' 3091 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2346 'type_id' '' 2341 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3095 'rdcc_nbytes' '' 3091 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3097 'hdferr' '' 3091 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3094 'rdcc_nelmts' '' 3091 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3096 'rdcc_w0' '' 3091 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-3178 'threshold' '' 3176 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3067 'hdferr' '' 3063 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3102 'hdferr' '' 3099 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3101 'encoding' '' 3099 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3105 'prp_id' '' 3104 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3107 'dims' '' 3104 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 3106 ())) 0 () ())
-3113 'rdcc_nbytes' '' 3110 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3171 'prp_id' '' 3170 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3174 'hdferr' '' 3170 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3112 'rdcc_nslots' '' 3110 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3111 'dapl_id' '' 3110 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3106 'ndims' '' 3104 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3108 'hdferr' '' 3104 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3173 'value' '' 3170 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3100 'plist_id' '' 3099 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2343 'dset_name' '' 2341 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3172 'name' '' 3170 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3071 'crt_order_flags' '' 3069 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2851 'fillvalue' '' 2848 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2344 'rank' '' 2341 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3125 'hdferr' '' 3122 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3130 'hdferr' '' 3127 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3129 'crt_intermed_group' '' 3127 ((VARIABLE IN UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3115 'hdferr' '' 3110 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3124 'expression' '' 3122 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3128 'lcpl_id' '' 3127 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3114 'rdcc_w0' '' 3110 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-3134 'value' '' 3131 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-3168 'level' '' 3166 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3132 'prp_id' '' 3131 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3133 'name' '' 3131 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3155 'prp_id' '' 3154 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3169 'hdferr' '' 3166 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3162 'offset' '' 3159 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2347 'buf' '' 2341 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3167 'prp_id' '' 3166 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3164 'hdferr' '' 3159 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3163 'bytes' '' 3159 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3160 'prp_id' '' 3159 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3161 'name' '' 3159 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3135 'hdferr' '' 3131 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3247 'prp_id' '' 3246 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3249 'memb_plist' '' 3246 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3156 'offset' '' 3154 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3250 'hdferr' '' 3246 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3157 'hdferr' '' 3154 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3785 'hdferr' '' 3780 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3783 'block_size' '' 3780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3781 'fapl_id' '' 3780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3202 'memb_map' '' 3200 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 368 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-3784 'cbuf_size' '' 3780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3204 'memb_name' '' 3200 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0
-'0') (OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 368 ()) (
-CONSTANT (INTEGER 4 ()) 0 '1'))) 0 () ())
-3205 'memb_addr' '' 3200 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0') (
-OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 368 ()) (CONSTANT (
-INTEGER 4 ()) 0 '1'))) 0 () ())
-3207 'hdferr' '' 3200 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3198 'prp_id' '' 3197 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3782 'alignment' '' 3780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3195 'hdferr' '' 3192 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3194 'relax' '' 3192 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-3193 'prp_id' '' 3192 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3201 'prp_id' '' 3200 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3199 'hdferr' '' 3197 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3151 'backing_store' '' 3148 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3149 'prp_id' '' 3148 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3206 'relax' '' 3200 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-3150 'increment' '' 3148 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3210 'prp_id' '' 3209 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3211 'meta_ext' '' 3209 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3214 'raw_plist' '' 3209 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3215 'hdferr' '' 3209 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3212 'meta_plist' '' 3209 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3228 'prp_id' '' 3227 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3229 'hdferr' '' 3227 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3144 'prp_id' '' 3143 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3213 'raw_ext' '' 3209 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3146 'hdferr' '' 3143 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3244 'hdferr' '' 3240 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3145 'flag' '' 3143 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3118 'ocp_plist_id' '' 3117 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3119 'copy_options' '' 3117 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3242 'type_id' '' 3240 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3243 'fillvalue' '' 3240 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () () 0 () ())
-3218 'plist_id' '' 3217 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3220 'hdferr' '' 3217 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3241 'prp_id' '' 3240 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3138 'gcpl_id' '' 3137 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3219 'flag' '' 3217 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3140 'est_name_len' '' 3137 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3120 'hdferr' '' 3117 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3152 'hdferr' '' 3148 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3248 'memb_size' '' 3246 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3141 'hdferr' '' 3137 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3236 'prp_id' '' 3235 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3075 'plist_id' '' 3074 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3203 'memb_fapl' '' 3200 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 368 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-3237 'type_id' '' 3235 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3232 'type_id' '' 3230 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3231 'prp_id' '' 3230 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3234 'hdferr' '' 3230 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2672 'prp_id' '' 2671 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3253 'prp_id' '' 3252 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3233 'fillvalue' '' 3230 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 8 ()) 0 0 () () 0 () ())
-3238 'fillvalue' '' 3235 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3261 'prp_id' '' 3260 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3256 'cd_nelmts' '' 3252 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3258 'hdferr' '' 3252 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3449 'gc_reference' '' 3447 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3450 'hdferr' '' 3447 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3262 'hdferr' '' 3260 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3224 'degree' '' 3222 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3223 'fapl_id' '' 3222 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3264 'prp_id' '' 3263 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3267 'hdferr' '' 3263 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3225 'hdferr' '' 3222 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3285 'prp_id' '' 3284 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3286 'ik' '' 3284 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-3266 'fillvalue' '' 3263 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 4 ()) 0 0 () () 0 () ())
-3044 'hdferr' '' 3041 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3445 'hdferr' '' 3441 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3444 'high' '' 3441 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3443 'low' '' 3441 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3043 'name' '' 3041 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3442 'fapl_id' '' 3441 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3042 'plid' '' 3041 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3265 'type_id' '' 3263 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3257 'cd_values' '' 3252 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-3297 'crt_order_flags' '' 3295 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3287 'hdferr' '' 3284 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3448 'prp_id' '' 3447 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3298 'hdferr' '' 3295 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3375 'size_hint' '' 3373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3374 'gcpl_id' '' 3373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3376 'hdferr' '' 3373 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3296 'gcpl_id' '' 3295 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3255 'flags' '' 3252 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3290 'gcpl_id' '' 3289 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3292 'min_dense' '' 3289 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3293 'hdferr' '' 3289 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3280 'prp_id' '' 3279 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3282 'hdferr' '' 3279 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3301 'plist_id' '' 3300 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3281 'layout' '' 3279 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3305 'lapl_id' '' 3304 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3307 'hdferr' '' 3304 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3306 'nlinks' '' 3304 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3331 'plist_id' '' 3330 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3332 'flag' '' 3330 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-3312 'hdferr' '' 3309 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3269 'prp_id' '' 3268 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3302 'hdferr' '' 3300 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3271 'value' '' 3268 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3310 'plist_id' '' 3309 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3328 'hdferr' '' 3324 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3346 'index_num' '' 3344 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3326 'name' '' 3324 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3345 'fcpl_id' '' 3344 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3327 'value' '' 3324 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-3325 'prp_id' '' 3324 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3348 'min_mesg_size' '' 3344 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3272 'hdferr' '' 3268 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3352 'prp_id' '' 3351 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3355 'hdferr' '' 3351 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3358 'plist_id' '' 3357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3359 'size' '' 3357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3354 'sizeof_size' '' 3351 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3353 'sizeof_addr' '' 3351 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3349 'hdferr' '' 3344 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3347 'mesg_type_flags' '' 3344 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3311 'size' '' 3309 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3254 'filter' '' 3252 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3139 'est_num_entries' '' 3137 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3123 'plist_id' '' 3122 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3322 'scale_factor' '' 3319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3320 'plist_id' '' 3319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3323 'hdferr' '' 3319 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3321 'scale_type' '' 3319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3270 'name' '' 3268 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3402 'prp_id' '' 3401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3405 'hdferr' '' 3401 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3369 'ik' '' 3367 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-3370 'lk' '' 3367 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-3404 'pixels_per_block' '' 3401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3363 'plist_id' '' 3362 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3368 'prp_id' '' 3367 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3371 'hdferr' '' 3367 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3336 'prp_id' '' 3335 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3337 'hdferr' '' 3335 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3365 'hdferr' '' 3362 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3379 'prp_id' '' 3378 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3381 'hdferr' '' 3378 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3393 'hdferr' '' 3390 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3380 'size' '' 3378 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3392 'name' '' 3390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3395 'loc_id' '' 3394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3399 'hdferr' '' 3394 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3396 'name' '' 3394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3388 'hdferr' '' 3384 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3385 'loc_id' '' 3384 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3386 'name' '' 3384 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3391 'class' '' 3390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3397 'space_id' '' 3394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3419 'ref' '' 3417 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3953 ()) 0 0 () () 0 () ())
-3418 'dset_id' '' 3417 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3421 'hdferr' '' 3417 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3398 'ref' '' 3394 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3943 ()) 0 0 () () 0 () ())
-3434 'loc_id' '' 3433 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3437 'hdferr' '' 3433 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3438 'size' '' 3433 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-3410 'hdferr' '' 3406 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3407 'loc_id' '' 3406 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3409 'name' '' 3406 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3411 'size' '' 3406 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-3408 'ref' '' 3406 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3953 ()) 0 0 () () 0 () ())
-3436 'name' '' 3433 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3435 'ref' '' 3433 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3943 ()) 0 0 () () 0 () ())
-3403 'options_mask' '' 3401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3413 'dset_id' '' 3412 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3425 'obj_type' '' 3422 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3424 'ref' '' 3422 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3953 ()) 0 0 () () 0 () ())
-3415 'obj_id' '' 3412 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3342 'hdferr' '' 3339 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3341 'nindexes' '' 3339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3340 'plist_id' '' 3339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3416 'hdferr' '' 3412 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3414 'ref' '' 3412 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3943 ()) 0 0 () () 0 () ())
-3333 'hdferr' '' 3330 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3423 'dset_id' '' 3422 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3420 'obj_id' '' 3417 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3364 'size' '' 3362 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3429 'dset_id' '' 3428 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3432 'hdferr' '' 3428 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3454 'new_space_id' '' 3452 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3239 'hdferr' '' 3235 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1212 'dset_id' '' 1211 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3291 'max_compact' '' 3289 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3453 'space_id' '' 3452 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3431 'space_id' '' 3428 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3430 'ref' '' 3428 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3943 ()) 0 0 () () 0 () ())
-3462 'rank' '' 3461 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3487 'source_space_id' '' 3485 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3486 'dest_space_id' '' 3485 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3488 'hdferr' '' 3485 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3466 'maxdims' '' 3461 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-OPTIONAL DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ())
-0 '1') (VARIABLE (INTEGER 4 ()) 0 3462 ())) 0 () ())
-3463 'dims' '' 3461 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 3462 ())) 0 () ())
-3464 'space_id' '' 3461 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3387 'ref' '' 3384 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3953 ()) 0 0 () () 0 () ())
-3541 'obj_id' '' 3540 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3543 'nalloc' '' 3540 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3544 'hdferr' '' 3540 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3465 'hdferr' '' 3461 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3474 'space_id' '' 3473 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3477 'hdferr' '' 3473 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3481 'space2_id' '' 3479 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3482 'equal' '' 3479 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3480 'space1_id' '' 3479 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3542 'buf' '' 3540 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3548 'space_id' '' 3546 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3470 'obj_id' '' 3468 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3469 'buf' '' 3468 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-3471 'hdferr' '' 3468 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3547 'classtype' '' 3546 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3511 'buf' '' 3507 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3508 'space_id' '' 3507 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3510 'num_points' '' 3507 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3509 'startpoint' '' 3507 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3476 'end' '' 3473 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3475 'start' '' 3473 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3426 'hdferr' '' 3422 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3496 'space_id' '' 3495 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3498 'hdferr' '' 3495 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3521 'space_id' '' 3520 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3522 'type' '' 3520 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3523 'hdferr' '' 3520 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3538 'hdferr' '' 3535 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3553 'status' '' 3551 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3554 'hdferr' '' 3551 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3552 'space_id' '' 3551 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3562 'space_id' '' 3561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3537 'rank' '' 3535 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3563 'classtype' '' 3561 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3564 'hdferr' '' 3561 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3515 'space_id' '' 3514 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3536 'space_id' '' 3535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3533 'hdferr' '' 3530 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3517 'maxdims' '' 3514 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-3518 'hdferr' '' 3514 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3557 'space_id' '' 3556 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3559 'hdferr' '' 3556 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3607 'hdferr' '' 3605 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3531 'space_id' '' 3530 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3567 'space_id' '' 3566 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3558 'offset' '' 3556 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3585 'space_id' '' 3584 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3586 'operator' '' 3584 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3590 'hdferr' '' 3584 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3606 'space_id' '' 3605 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3593 'space_id' '' 3592 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3589 'coord' '' 3584 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 3587 ()) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 3588 ())) 0 () ())
-3595 'current_size' '' 3592 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1')
-(VARIABLE (INTEGER 4 ()) 0 3594 ())) 0 () ())
-3588 'num_elements' '' 3584 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3587 'rank' '' 3584 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3532 'npoints' '' 3530 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3568 'hdferr' '' 3566 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3602 'space_id' '' 3601 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3603 'hdferr' '' 3601 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3596 'maximum_size' '' 3592 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1')
-(VARIABLE (INTEGER 4 ()) 0 3594 ())) 0 () ())
-3573 'hdferr' '' 3570 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3571 'space_id' '' 3570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3572 'status' '' 3570 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3597 'hdferr' '' 3592 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3516 'dims' '' 3514 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3483 'hdferr' '' 3479 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3577 'operator' '' 3575 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3576 'space_id' '' 3575 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3580 'hdferr' '' 3575 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3581 'stride' '' 3575 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-OPTIONAL DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (
-INTEGER 4 ()) 0 '1') ()) 0 () ())
-3582 'block' '' 3575 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-OPTIONAL DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (
-INTEGER 4 ()) 0 '1') ()) 0 () ())
-3578 'start' '' 3575 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3493 'hdferr' '' 3490 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3492 'npoints' '' 3490 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3579 'count' '' 3575 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3549 'hdferr' '' 3546 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2354 'type_id' '' 2349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3526 'space_id' '' 3525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3501 'space_id' '' 3500 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3505 'hdferr' '' 3500 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3491 'space_id' '' 3490 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3503 'num_blocks' '' 3500 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2310 'loc_id' '' 2309 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3528 'hdferr' '' 3525 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3458 'space_id' '' 3457 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3459 'hdferr' '' 3457 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3611 'hdferr' '' 3609 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3504 'buf' '' 3500 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3502 'startblock' '' 3500 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2324 'errcode' '' 2317 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3527 'num_points' '' 3525 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3647 'dtype_id' '' 3646 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3648 'committed' '' 3646 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3626 'tcpl_id' '' 3620 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3624 'hdferr' '' 3620 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3622 'name' '' 3620 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3649 'hdferr' '' 3646 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3630 'src_id' '' 3629 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3627 'tapl_id' '' 3620 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3632 'flag' '' 3629 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-3623 'type_id' '' 3620 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3621 'loc_id' '' 3620 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3625 'lcpl_id' '' 3620 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3614 'loc_id' '' 3613 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2350 'loc_id' '' 2349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3631 'dst_id' '' 3629 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3610 'type_id' '' 3609 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3618 'tapl_id' '' 3613 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3616 'hdferr' '' 3613 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3617 'tcpl_id' '' 3613 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3615 'dtype_id' '' 3613 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3594 'rank' '' 3592 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3711 'nalloc' '' 3708 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3712 'hdferr' '' 3708 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3690 'new_type_id' '' 3688 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3689 'parent_id' '' 3688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3633 'hdferr' '' 3629 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3709 'obj_id' '' 3708 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3684 'name' '' 3682 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3685 'value' '' 3682 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3686 'hdferr' '' 3682 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3776 'buf' '' 3775 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-2320 'rank' '' 2317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3683 'type_id' '' 3682 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3691 'hdferr' '' 3688 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3777 'obj_id' '' 3775 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3778 'hdferr' '' 3775 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3660 'value' '' 3658 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3637 'size' '' 3635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3636 'class' '' 3635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3662 'name' '' 3658 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3663 'hdferr' '' 3658 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3667 'type2_id' '' 3665 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3668 'flag' '' 3665 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-3710 'buf' '' 3708 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3659 'type_id' '' 3658 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3497 'num_blocks' '' 3495 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3512 'hdferr' '' 3507 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3666 'type1_id' '' 3665 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3638 'type_id' '' 3635 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3639 'hdferr' '' 3635 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3674 'hdferr' '' 3671 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3672 'type_id' '' 3671 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3673 'dims' '' 3671 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3699 'type_id' '' 3698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3701 'hdferr' '' 3698 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3715 'type_id' '' 3714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3717 'hdferr' '' 3714 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3716 'ebias' '' 3714 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3680 'hdferr' '' 3676 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3677 'type_id' '' 3676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3679 'value' '' 3676 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3678 'name' '' 3676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3700 'class' '' 3698 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3773 'hdferr' '' 3770 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3772 'cset' '' 3770 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3722 'epos' '' 3719 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3720 'type_id' '' 3719 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3766 'type_id' '' 3765 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3771 'type_id' '' 3770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3724 'mpos' '' 3719 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3768 'hdferr' '' 3765 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3721 'spos' '' 3719 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3726 'hdferr' '' 3719 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3723 'esize' '' 3719 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3767 'padtype' '' 3765 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3730 'member_no' '' 3728 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3731 'class' '' 3728 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3729 'type_id' '' 3728 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3695 'dtpl_id' '' 3693 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3696 'hdferr' '' 3693 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3732 'hdferr' '' 3728 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3745 'hdferr' '' 3740 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3762 'index' '' 3759 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3743 'member_name' '' 3740 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3763 'hdferr' '' 3759 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3744 'namelen' '' 3740 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3694 'dtype_id' '' 3693 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3748 'type_id' '' 3747 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3761 'name' '' 3759 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3741 'type_id' '' 3740 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3725 'msize' '' 3719 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3755 'member_no' '' 3753 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3754 'type_id' '' 3753 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3756 'value' '' 3753 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3750 'datatype' '' 3747 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3757 'hdferr' '' 3753 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3735 'type_id' '' 3734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3705 'ndims' '' 3703 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3737 'offset' '' 3734 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3738 'hdferr' '' 3734 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3736 'member_no' '' 3734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3795 'hdferr' '' 3792 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3794 'num_members' '' 3792 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3706 'hdferr' '' 3703 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3793 'type_id' '' 3792 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3749 'field_idx' '' 3747 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3742 'index' '' 3740 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3813 'type_id' '' 3812 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3816 'hdferr' '' 3812 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3805 'hdferr' '' 3802 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3803 'type_id' '' 3802 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3800 'hdferr' '' 3797 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3798 'type_id' '' 3797 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3804 'order' '' 3802 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3825 'size' '' 3823 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3815 'msbpad' '' 3812 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3799 'norm' '' 3797 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3826 'hdferr' '' 3823 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3824 'type_id' '' 3823 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3814 'lsbpad' '' 3812 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3751 'hdferr' '' 3747 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3983 'hdferr' '' 3979 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3981 'direction' '' 3979 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3980 'dtype_id' '' 3979 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3704 'type_id' '' 3703 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3760 'type_id' '' 3759 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3853 'precision' '' 3851 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3854 'hdferr' '' 3851 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3852 'type_id' '' 3851 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3810 'hdferr' '' 3807 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3849 'hdferr' '' 3845 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3847 'tag' '' 3845 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3848 'taglen' '' 3845 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3846 'type_id' '' 3845 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3829 'type_id' '' 3828 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3830 'base_type_id' '' 3828 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2322 'type_id' '' 2317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3831 'hdferr' '' 3828 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3857 'type_id' '' 3856 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3868 'type_id' '' 3865 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3858 'hdferr' '' 3856 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3867 'name' '' 3865 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3866 'loc_id' '' 3865 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3841 'offset' '' 3838 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3842 'field_id' '' 3838 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3839 'type_id' '' 3838 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3840 'name' '' 3838 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3809 'offset' '' 3807 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3835 'strpad' '' 3833 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3834 'type_id' '' 3833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3808 'type_id' '' 3807 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3843 'hdferr' '' 3838 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3908 'status' '' 3906 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3870 'tapl_id' '' 3865 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3909 'hdferr' '' 3906 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3873 'type_id' '' 3872 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3875 'hdferr' '' 3872 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3899 'spos' '' 3897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3898 'type_id' '' 3897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3874 'ebias' '' 3872 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3907 'type_id' '' 3906 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3902 'mpos' '' 3897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3863 'hdferr' '' 3860 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3904 'hdferr' '' 3897 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3862 'cset' '' 3860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3819 'type_id' '' 3818 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3861 'type_id' '' 3860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3901 'esize' '' 3897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3900 'epos' '' 3897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3903 'msize' '' 3897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3652 'base_id' '' 3651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3820 'sign' '' 3818 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3884 'norm' '' 3882 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3656 'hdferr' '' 3651 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3655 'type_id' '' 3651 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3653 'rank' '' 3651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3644 'hdferr' '' 3641 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3642 'type_id' '' 3641 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2336 'rank' '' 2333 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3643 'new_type_id' '' 3641 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3893 'type_id' '' 3892 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3894 'offset' '' 3892 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3836 'hdferr' '' 3833 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3885 'hdferr' '' 3882 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3883 'type_id' '' 3882 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3654 'dims' '' 3651 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3821 'hdferr' '' 3818 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3913 'precision' '' 3911 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3889 'order' '' 3887 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3968 'lsbpad' '' 3966 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3969 'msbpad' '' 3966 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3888 'type_id' '' 3887 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3912 'type_id' '' 3911 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3967 'type_id' '' 3966 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3923 'size' '' 3921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3918 'strpad' '' 3916 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3922 'type_id' '' 3921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3924 'hdferr' '' 3921 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3962 'type_id' '' 3961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3964 'hdferr' '' 3961 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3963 'sign' '' 3961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3917 'type_id' '' 3916 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3930 'hdferr' '' 3927 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3933 'type_id' '' 3932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3957 'filter' '' 3956 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3935 'hdferr' '' 3932 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3928 'type_id' '' 3927 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3938 'filter' '' 3937 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3958 'config_flags' '' 3956 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3934 'tag' '' 3932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-3929 'vltype_id' '' 3927 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3940 'hdferr' '' 3937 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3939 'status' '' 3937 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3919 'hdferr' '' 3916 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3949 'filter' '' 3948 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3950 'hdferr' '' 3948 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3879 'padtype' '' 3877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3880 'hdferr' '' 3877 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3316 'flag' '' 3314 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-3878 'type_id' '' 3877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3317 'hdferr' '' 3314 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3276 'size' '' 3274 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3277 'hdferr' '' 3274 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3869 'hdferr' '' 3865 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3455 'hdferr' '' 3452 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3661 'namelen' '' 3658 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3895 'hdferr' '' 3892 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3275 'plist_id' '' 3274 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3315 'prp_id' '' 3314 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3890 'hdferr' '' 3887 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3959 'hdferr' '' 3956 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3970 'hdferr' '' 3966 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3914 'hdferr' '' 3911 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3982 'native_dtype_id' '' 3979 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3669 'hdferr' '' 3665 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3988 'buf' '' 3984 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 3989 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-3989 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-3987 'type_id' '' 3984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3990 'errcode' '' 3984 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3986 'dset_name' '' 3984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2362 'type_id' '' 2357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2358 'loc_id' '' 2357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3985 'loc_id' '' 3984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3989 'dims' '' 3984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2494 'errcode' '' 2488 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3360 'hdferr' '' 3357 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2364 'errcode' '' 2357 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2316 'errcode' '' 2309 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2515 'errcode' '' 2509 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2506 'buf' '' 2502 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2507 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-2507 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-2508 'errcode' '' 2502 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2504 'dset_name' '' 2502 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2505 'type_id' '' 2502 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2503 'loc_id' '' 2502 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2507 'dims' '' 2502 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2512 'type_id' '' 2509 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2510 'loc_id' '' 2509 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2514 'dims' '' 2509 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2497 'dset_name' '' 2495 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2500 'dims' '' 2495 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2499 'buf' '' 2495 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2500 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-2500 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2500 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-2511 'dset_name' '' 2509 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2496 'loc_id' '' 2495 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2491 'type_id' '' 2488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2489 'loc_id' '' 2488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2493 'dims' '' 2488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2492 'buf' '' 2488 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-2490 'dset_name' '' 2488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2501 'errcode' '' 2495 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2390 'rank' '' 2387 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2389 'dset_name' '' 2387 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2391 'dims' '' 2387 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2388 'loc_id' '' 2387 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2517 'loc_id' '' 2516 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2393 'errcode' '' 2387 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2521 'dims' '' 2516 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2520 'buf' '' 2516 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2521 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-2521 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2521 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-2522 'errcode' '' 2516 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2468 'loc_id' '' 2467 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2518 'dset_name' '' 2516 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2392 'buf' '' 2387 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 2391 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2391 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-2498 'type_id' '' 2495 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2471 'buf' '' 2467 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-2473 'errcode' '' 2467 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2485 'buf' '' 2481 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2486 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-2486 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-2487 'errcode' '' 2481 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2483 'dset_name' '' 2481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2482 'loc_id' '' 2481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2486 'dims' '' 2481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2519 'type_id' '' 2516 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2472 'dims' '' 2467 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2477 'type_id' '' 2474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2469 'dset_name' '' 2467 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2478 'buf' '' 2474 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2479 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-2479 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2479 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-2480 'errcode' '' 2474 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2395 'loc_id' '' 2394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2475 'loc_id' '' 2474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2479 'dims' '' 2474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2398 'dims' '' 2394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2399 'buf' '' 2394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2476 'dset_name' '' 2474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2400 'errcode' '' 2394 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2397 'rank' '' 2394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2484 'type_id' '' 2481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2419 'buf' '' 2414 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2418 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-2418 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-2415 'loc_id' '' 2414 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2420 'errcode' '' 2414 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2418 'dims' '' 2414 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2417 'rank' '' 2414 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2396 'dset_name' '' 2394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2410 'rank' '' 2407 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2411 'dims' '' 2407 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2416 'dset_name' '' 2414 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2470 'type_id' '' 2467 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2513 'buf' '' 2509 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2408 'loc_id' '' 2407 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2409 'dset_name' '' 2407 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2374 'loc_id' '' 2373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2413 'errcode' '' 2407 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2379 'errcode' '' 2373 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2378 'buf' '' 2373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-2377 'dims' '' 2373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2384 'dims' '' 2380 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2386 'errcode' '' 2380 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2385 'buf' '' 2380 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 2384 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2384 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2384 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-2376 'rank' '' 2373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2382 'dset_name' '' 2380 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2271 'rank' '' 2268 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2269 'loc_id' '' 2268 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2273 'buf' '' 2268 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 2272 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-2272 'dims' '' 2268 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2381 'loc_id' '' 2380 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2375 'dset_name' '' 2373 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2274 'errcode' '' 2268 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2298 'dset_name' '' 2296 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2383 'rank' '' 2380 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2300 'dims' '' 2296 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2299 'rank' '' 2296 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2270 'dset_name' '' 2268 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2302 'errcode' '' 2296 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2293 'dims' '' 2289 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2295 'errcode' '' 2289 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2294 'buf' '' 2289 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 2293 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2293 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2293 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-2292 'rank' '' 2289 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2290 'loc_id' '' 2289 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2527 'dims' '' 2523 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2526 'buf' '' 2523 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2527 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-2297 'loc_id' '' 2296 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2528 'errcode' '' 2523 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2532 'buf' '' 2529 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2533 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-2533 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-2524 'loc_id' '' 2523 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2534 'errcode' '' 2529 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2531 'dset_name' '' 2529 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2525 'dset_name' '' 2523 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2540 'errcode' '' 2535 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2530 'loc_id' '' 2529 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2536 'loc_id' '' 2535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2537 'dset_name' '' 2535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2539 'dims' '' 2535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2533 'dims' '' 2529 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2719 'loc_id' '' 2718 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2722 'dims' '' 2718 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2570 'loc_id' '' 2569 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2572 'buf' '' 2569 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2573 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-2573 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-2574 'errcode' '' 2569 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2573 'dims' '' 2569 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2723 'errcode' '' 2718 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2567 'dims' '' 2563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2565 'dset_name' '' 2563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2568 'errcode' '' 2563 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2564 'loc_id' '' 2563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2720 'dset_name' '' 2718 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2538 'buf' '' 2535 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2539 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-2539 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2539 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-2721 'buf' '' 2718 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2722 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-2291 'dset_name' '' 2289 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2443 'dset_name' '' 2441 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2442 'loc_id' '' 2441 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2445 'dims' '' 2441 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2446 'errcode' '' 2441 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2437 'dset_name' '' 2435 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2436 'loc_id' '' 2435 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2440 'errcode' '' 2435 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2444 'buf' '' 2441 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2445 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-2439 'dims' '' 2435 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2433 'dims' '' 2429 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2566 'buf' '' 2563 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2567 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-2567 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2567 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-2571 'dset_name' '' 2569 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2431 'dset_name' '' 2429 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2430 'loc_id' '' 2429 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2403 'loc_id' '' 2402 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2432 'buf' '' 2429 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2433 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-2433 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2433 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-2545 'buf' '' 2542 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2546 'errcode' '' 2542 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2406 'errcode' '' 2402 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2405 'buf' '' 2402 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-2438 'buf' '' 2435 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2439 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-2439 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-2544 'dset_name' '' 2542 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2434 'errcode' '' 2429 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2586 'dset_name' '' 2584 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2589 'size' '' 2584 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2590 'errcode' '' 2584 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2588 'buf' '' 2584 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2549 'loc_id' '' 2548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2551 'attr_name' '' 2548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2550 'dset_name' '' 2548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2587 'attr_name' '' 2584 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2404 'dset_name' '' 2402 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2553 'size' '' 2548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2554 'errcode' '' 2548 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2562 'errcode' '' 2556 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2561 'size' '' 2556 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2585 'loc_id' '' 2584 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2552 'buf' '' 2548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-2543 'loc_id' '' 2542 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2557 'loc_id' '' 2556 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2560 'buf' '' 2556 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-2579 'dset_name' '' 2577 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2578 'loc_id' '' 2577 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2582 'errcode' '' 2577 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2258 'attr_name' '' 2255 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2257 'dset_name' '' 2255 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2581 'buf' '' 2577 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-2259 'buf' '' 2255 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2256 'loc_id' '' 2255 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2580 'attr_name' '' 2577 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2239 'errcode' '' 2234 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2238 'buf' '' 2234 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-2235 'loc_id' '' 2234 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2263 'loc_id' '' 2262 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2265 'attr_name' '' 2262 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2266 'buf' '' 2262 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-2278 'dset_name' '' 2276 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2249 'loc_id' '' 2248 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2251 'attr_name' '' 2248 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2252 'buf' '' 2248 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2267 'errcode' '' 2262 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2253 'errcode' '' 2248 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2277 'loc_id' '' 2276 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2264 'dset_name' '' 2262 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2279 'rank' '' 2276 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2236 'dset_name' '' 2234 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2237 'attr_name' '' 2234 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2260 'errcode' '' 2255 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2250 'dset_name' '' 2248 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2222 'dset_name' '' 2220 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2283 'loc_id' '' 2282 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2280 'errcode' '' 2276 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2559 'attr_name' '' 2556 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2558 'dset_name' '' 2556 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2301 'buf' '' 2296 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 2300 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2300 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-2285 'dims' '' 2282 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2287 'type_size' '' 2282 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2286 'type_class' '' 2282 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2243 'dset_name' '' 2241 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2288 'errcode' '' 2282 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2227 'dset_name' '' 2225 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2221 'loc_id' '' 2220 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2244 'attr_name' '' 2241 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2226 'loc_id' '' 2225 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2229 'dims' '' 2225 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2230 'type_class' '' 2225 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2231 'type_size' '' 2225 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2232 'errcode' '' 2225 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2228 'attr_name' '' 2225 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2246 'errcode' '' 2241 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2245 'rank' '' 2241 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2284 'dset_name' '' 2282 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2412 'buf' '' 2407 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 2411 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-2411 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2411 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-2363 'buf' '' 2357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 2361 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2361 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 2361 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-2242 'loc_id' '' 2241 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2814 'degree' '' 2812 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1401 'dset_id' '' 1400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1199 'mem_space_id' '' 1193 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-)
-
-('h5awrite_char_scalar' 0 58 'h5awrite_char_2' 0 56 'h5aread_real_5' 0 4
-'h5_iter_inc_f' 0 416 'fortran_real_8' 0 488 'fortran_real_16' 0 485
-'fortran_real_12' 0 483 'fortran_integer_8' 0 482 'fortran_integer_1' 0
-480 'floating_types' 0 231 '__convert_i4_i8' 0 474 'fortran_integer' 0
-477 'floating_types_len' 0 476 'fortran_double' 0 475 'fortran_integer_4'
-0 479 'fortran_integer_2' 0 478 'fortran_real' 0 481 'fortran_real_4' 0
-484 'h5_index_n_f' 0 418 'h5_index_crt_order_f' 0 419 'h5_dble_interface'
-0 486 'h5_iter_dec_f' 0 415 'h5_index_unknown_f' 0 421 'h5_index_name_f'
-0 420 'h5_integer_kind' 0 487 'h5acreate_f' 0 823 'h5_szip_ec_om_f' 0
-235 'h5_iter_native_f' 0 414 'h5_iter_n_f' 0 413 'h5_real_kind' 0 489
-'h5_iter_unknown_f' 0 417 'h5_szip_nn_om_f' 0 234 'h5a' 0 506 'h5aclose_f'
-0 502 'h5acreate_by_name_f' 0 490 'h5aread_real_2' 0 7
-'h5aget_storage_size_f' 0 800 'h5aget_info_f' 0 598 'h5aexists_by_name_f'
-0 563 'h5adelete_by_name_f' 0 521 'h5adelete_by_idx_f' 0 507 'h5adelete_f'
-0 516 'h5aget_create_plist_f' 0 558 'h5aexists_f' 0 528
-'h5aget_info_by_name_f' 0 547 'h5aget_info_by_idx_f' 0 534 'h5aget_name_f'
-0 592 'h5aget_name_by_idx_f' 0 571 'h5aget_num_attrs_f' 0 587
-'h5aget_space_f' 0 582 'h5aread_char_7' 0 10 'h5aopen_by_idx_f' 0 675
-'h5aget_type_f' 0 606 'h5aread_char_3' 0 14 'h5aopen_idx_f' 0 645
-'h5aopen_by_name_f' 0 618 'h5aopen_f' 0 611 'h5aopen_name_f' 0 639
-'h5aread_char_1' 0 16 'h5aread_char_2' 0 15 'h5aread_char_6' 0 11
-'h5aread_char_5' 0 12 'h5aread_char_4' 0 13 'h5aread_integer_scalar' 0
-25 'h5aread_integer_3' 0 22 'h5aread_integer_2' 0 23 'h5aread_double_5'
-0 28 'h5aread_double_4' 0 29 'h5aread_double_2' 0 31 'h5aread_double_1'
-0 32 'h5aread_char_scalar' 0 17 'h5aread_double_3' 0 30 'h5aread_double_6'
-0 27 'h5aread_double_scalar' 0 33 'h5aread_double_7' 0 26
-'h5aread_integer_1' 0 24 'h5aread_integer_5' 0 20 'h5aread_integer_4' 0
-21 'h5aread_integer_7' 0 18 'h5aread_integer_6' 0 19 'h5aread_real_1' 0
-8 'h5aread_real_3' 0 6 'h5aread_real_4' 0 5 'h5aread_real_6' 0 3
-'h5arename_by_name_f' 0 857 'h5aread_real_scalar' 0 9 'h5aread_real_7' 0
-2 'h5awrite_char_1' 0 57 'h5arename_f' 0 845 'h5awrite_char_5' 0 53
-'h5awrite_char_4' 0 54 'h5awrite_char_3' 0 55 'h5awrite_char_7' 0 51
-'h5awrite_char_6' 0 52 'h5f_close_weak_f' 0 431
-'h5d_chunk_cache_nbytes_dflt_f' 0 380 'h5awrite_double_7' 0 67
-'h5awrite_double_6' 0 68 'h5awrite_double_1' 0 73 'h5awrite_double_3' 0
-71 'h5awrite_double_2' 0 72 'h5awrite_double_5' 0 69 'h5awrite_double_4'
-0 70 'h5awrite_integer_7' 0 59 'h5awrite_integer_2' 0 64
-'h5awrite_double_scalar' 0 74 'h5awrite_integer_1' 0 65
-'h5awrite_integer_5' 0 61 'h5awrite_integer_3' 0 63 'h5awrite_integer_4'
-0 62 'h5awrite_integer_6' 0 60 'h5awrite_real_1' 0 49
-'h5awrite_integer_scalar' 0 66 'h5d_alloc_time_early_f' 0 395
-'h5d_alloc_time_default_f' 0 396 'h5close_f' 0 1046 'h5awrite_real_3' 0
-47 'h5awrite_real_2' 0 48 'h5awrite_real_5' 0 45 'h5awrite_real_4' 0 46
-'h5awrite_real_scalar' 0 50 'h5awrite_real_7' 0 43 'h5awrite_real_6' 0
-44 'h5check_version_f' 0 1021 'h5d' 0 1045 'h5d_alloc_time_incr_f' 0 393
-'h5d_alloc_time_error_f' 0 397 'h5d_alloc_time_late_f' 0 394
-'h5dread_vl_integer' 0 116 'h5dclose_f' 0 1454 'h5d_flags_len' 0 1067
-'h5d_fill_time_alloc_f' 0 387 'h5d_contiguous_f' 0 399 'h5d_compact_f' 0
-400 'h5d_chunk_cache_w0_dflt_f' 0 379 'h5d_chunk_cache_nslots_dflt_f' 0
-381 'h5d_chunked_f' 0 398 'h5d_fill_value_error_f' 0 385
-'h5d_fill_time_error_f' 0 388 'h5d_fill_value_default_f' 0 383
-'h5d_fill_time_never_f' 0 386 'h5d_fill_value_undefined_f' 0 384
-'h5d_flags' 0 226 'h5d_fill_value_user_defined_f' 0 382
-'h5d_space_sts_error_f' 0 392 'h5d_space_sts_allocated_f' 0 389
-'h5d_space_sts_not_allocated_f' 0 391 'h5d_space_sts_part_allocated_f' 0
-390 'h5dread_integer_7' 0 96 'h5dread_char_3' 0 92 'h5dget_space_f' 0
-1161 'h5dcreate_f' 0 1107 'h5dcreate_anon_f' 0 1068 'h5dfill_char' 0 76
-'h5dfill_double' 0 79 'h5dget_create_plist_f' 0 1097 'h5dfill_integer' 0
-78 'h5dget_access_plist_f' 0 1087 'h5dfill_real' 0 77
-'h5dget_storage_size_f' 0 1156 'h5dget_space_status_f' 0 1118 'h5dopen_f'
-0 1149 'h5dont_atexit_f' 0 1128 'h5dget_type_f' 0 1123 'h5dread_char_1'
-0 94 'h5dread_char_2' 0 93 'h5dread_double_2' 0 111 'h5dread_char_scalar'
-0 95 'h5dread_char_4' 0 91 'h5dread_char_7' 0 88 'h5dread_char_5' 0 90
-'h5dread_char_6' 0 89 'h5dread_double_1' 0 112 'h5dread_double_3' 0 110
-'h5dread_double_4' 0 109 'h5dread_double_6' 0 107 'h5dread_double_5' 0
-108 'h5dread_double_scalar' 0 113 'h5dread_double_7' 0 106
-'h5dread_integer_1' 0 102 'h5dread_integer_4' 0 99 'h5dread_integer_2' 0
-101 'h5dread_integer_3' 0 100 'h5dread_integer_5' 0 98 'h5dread_integer_6'
-0 97 'h5dread_integer_scalar' 0 103 'h5dread_real_4' 0 83 'h5dread_real_1'
-0 86 'h5dread_real_2' 0 85 'h5dread_real_3' 0 84 'h5dread_real_5' 0 82
-'h5dread_reference_dsetreg' 0 104 'h5dread_real_7' 0 80 'h5dread_real_6'
-0 81 'h5dread_real_scalar' 0 87 'h5dread_reference_obj' 0 105
-'h5dwrite_double_5' 0 148 'h5dwrite_char_7' 0 128 'h5dwrite_char_5' 0
-130 'h5dread_vl_real' 0 115 'h5dwrite_char_2' 0 133 'h5dset_extent_f' 0
-75 'h5dread_vl_string' 0 114 'h5dwrite_char_1' 0 134
-'h5dvlen_get_max_len_f' 0 1468 'h5dwrite_char_4' 0 131 'h5dwrite_char_3'
-0 132 'h5dwrite_char_6' 0 129 'h5dwrite_double_2' 0 151
-'h5dwrite_char_scalar' 0 135 'h5dwrite_double_1' 0 152 'h5dwrite_double_3'
-0 150 'h5dwrite_double_4' 0 149 'h5eprint_f' 0 1836 'h5dwrite_real_4' 0
-123 'h5dwrite_integer_5' 0 138 'h5dwrite_double_7' 0 146
-'h5dwrite_double_6' 0 147 'h5dwrite_integer_2' 0 141 'h5dwrite_integer_1'
-0 142 'h5dwrite_double_scalar' 0 153 'h5dwrite_integer_4' 0 139
-'h5dwrite_integer_3' 0 140 'h5dwrite_real_1' 0 126
-'h5dwrite_integer_scalar' 0 143 'h5dwrite_integer_7' 0 136
-'h5dwrite_integer_6' 0 137 'h5dwrite_real_2' 0 125 'h5dwrite_real_3' 0
-124 'h5dwrite_reference_dsetreg' 0 144 'h5dwrite_real_6' 0 121
-'h5dwrite_real_5' 0 122 'h5dwrite_real_scalar' 0 127 'h5dwrite_real_7' 0
-120 'h5dwrite_reference_obj' 0 145 'h5e' 0 1830 'h5dwrite_vl_integer' 0
-119 'h5dwrite_vl_real' 0 118 'h5dwrite_vl_string' 0 117 'h5eget_minor_f'
-0 1825 'h5eclear_f' 0 1822 'h5eget_major_f' 0 1816 'h5f_acc_rdonly_f' 0
-438 'h5f_acc_debug_f' 0 435 'h5f' 0 1835 'h5eset_auto_f' 0 1831
-'h5f_acc_excl_f' 0 436 'h5f_acc_rdwr_f' 0 439 'h5f_close_default_f' 0
-432 'h5f_acc_trunc_f' 0 437 'h5f_close_strong_f' 0 429 'h5f_close_semi_f'
-0 430 'h5fget_access_plist_f' 0 2462 'h5fd_hid_flags' 0 223 'h5fclose_f'
-0 1869 'h5f_flags_len' 0 1859 'h5f_flags' 0 229 'h5f_obj_group_f' 0 426
-'h5f_obj_all_f' 0 424 'h5f_libver_earliest_f' 0 423 'h5f_libver_latest_f'
-0 422 'h5f_obj_file_f' 0 428 'h5f_obj_datatype_f' 0 425
-'h5f_obj_dataset_f' 0 427 'h5f_scope_global_f' 0 433 'h5f_scope_local_f'
-0 434 'h5fd_family_f' 0 366 'h5fcreate_f' 0 1860 'h5fd_core_f' 0 367
-'h5fd_flags' 0 222 'h5fd_flags_len' 0 1868 'h5fd_mem_btree_f' 0 373
-'h5fd_log_f' 0 365 'h5fd_hid_flags_len' 0 1873 'h5fd_mpio_f' 0 364
-'h5fd_mem_nolist_f' 0 376 'h5fd_mem_gheap_f' 0 371 'h5fd_mem_default_f'
-0 375 'h5fd_mem_draw_f' 0 372 'h5fd_mem_lheap_f' 0 370 'h5fd_mem_ntypes_f'
-0 368 'h5fd_mem_super_f' 0 374 'h5fd_mem_ohdr_f' 0 369
-'h5fd_mpio_collective_f' 0 377 'h5fd_multi_f' 0 363
-'h5fd_mpio_independent_f' 0 378 'h5fflush_f' 0 1874 'h5fd_stdio_f' 0 361
-'h5fd_sec2_f' 0 362 'h5lget_info_by_idx_f' 0 2447 'h5iis_valid_f' 0 2181
-'h5g_group_f' 0 411 'h5fopen_f' 0 1939 'h5fget_obj_count_f' 0 1920
-'h5fget_create_plist_f' 0 1895 'h5fget_filesize_f' 0 1890
-'h5fget_freespace_f' 0 1885 'h5fget_name_f' 0 1879 'h5fget_obj_ids_f' 0
-1912 'h5fmount_f' 0 1905 'h5fis_hdf5_f' 0 1900 'h5g' 0 1938
-'h5fortran_types' 0 1936 'h5freopen_f' 0 1931 'h5funmount_f' 0 1926
-'h5g_dataset_f' 0 410 'h5g_flags' 0 224 'h5g_flags_len' 0 1937
-'h5g_link_soft_f' 0 405 'h5g_link_error_f' 0 407 'h5g_link_hard_f' 0 406
-'h5g_link_f' 0 408 'h5glink_f' 0 2115 'h5g_unknown_f' 0 412
-'h5g_storage_type_compact_f' 0 402 'h5g_storage_type_dense_f' 0 401
-'h5g_storage_type_symbol_table_f' 0 403 'h5g_storage_type_unknown_f' 0
-404 'h5g_type_f' 0 409 'h5generic_flags_len' 0 2042 'h5gcreate_f' 0 1960
-'h5gclose_f' 0 1956 'h5garbage_collect_f' 0 1946 'h5gcreate_anon_f' 0
-1949 'h5generic_flags' 0 221 'h5glink2_f' 0 2034 'h5gget_create_plist_f'
-0 2029 'h5gget_comment_f' 0 1976 'h5get_libversion_f' 0 1970
-'h5gget_info_by_name_f' 0 2019 'h5gget_info_by_idx_f' 0 1983
-'h5gget_info_f' 0 2011 'h5gget_obj_info_idx_f' 0 2003 'h5gget_linkval_f'
-0 1996 'h5i_group_f' 0 359 'h5i_file_f' 0 360 'h5i_badid_f' 0 354
-'h5gmove_f' 0 2076 'h5global' 0 2050 'h5gmove2_f' 0 2043 'h5gunlink_f' 0
-2071 'h5gopen_f' 0 2063 'h5gn_members_f' 0 2051 'h5gset_comment_f' 0
-2057 'h5i' 0 2070 'h5i_attr_f' 0 355 'h5i_dataspace_f' 0 357
-'h5i_dataset_f' 0 356 'h5i_datatype_f' 0 358 'h5i_flags_len' 0 2082
-'h5i_flags' 0 218 'h5idec_ref_f' 0 2110 'h5iget_type_f' 0 2105
-'h5iget_ref_f' 0 2095 'h5iget_name_f' 0 2088 'h5iget_file_id_f' 0 2083
-'h5iinc_ref_f' 0 2100 'h5l_type_hard_f' 0 352 'h5l_flags' 0 227 'h5l' 0
-2122 'h5l_flags_len' 0 2123 'h5l_link_class_t_vers_f' 0 348
-'h5l_type_external_f' 0 350 'h5l_same_loc_f' 0 349 'h5l_type_error_f' 0
-353 'h5lcreate_soft_f' 0 2173 'h5lcreate_external_f' 0 2142 'h5lcopy_f'
-0 2124 'h5l_type_soft_f' 0 351 'h5lcreate_hard_f' 0 2133
-'h5ldelete_by_idx_f' 0 2164 'h5lexists_f' 0 2157 'h5ldelete_f' 0 2151
-'h5lib' 0 2308 'h5lget_info_f' 0 2197 'h5lget_name_by_idx_f' 0 2186
-'h5lis_registered_f' 0 2303 'h5lib_flags' 0 228 'h5lib_flags_len' 0 2209
-'h5ltmake_dataset_double_f_2' 0 164 'h5ltget_dataset_info_f' 0 2281
-'h5ltget_attribute_double_f' 0 2261 'h5lt' 0 2223 'h5lmove_f' 0 2210
-'h5ltfind_dataset_f' 0 2219 'h5ltget_attribute_int_f' 0 2254
-'h5ltget_attribute_float_f' 0 2233 'h5ltget_attribute_info_f' 0 2224
-'h5ltget_attribute_string_f' 0 2247 'h5ltget_attribute_ndims_f' 0 2240
-'h5ltget_dataset_ndims_f' 0 2275 'h5ltmake_dataset_double_f_1' 0 165
-'h5ltmake_dataset_double_f_3' 0 163 'h5ltread_dataset_double_f_1' 0 174
-'h5ltmake_dataset_f_int2' 0 161 'h5ltmake_dataset_f_double3' 0 154
-'h5ltmake_dataset_f_double1' 0 156 'h5ltmake_dataset_f_double2' 0 155
-'h5ltmake_dataset_f_float2' 0 158 'h5ltmake_dataset_f_float1' 0 159
-'h5ltmake_dataset_f_int1' 0 162 'h5ltmake_dataset_f_float3' 0 157
-'h5ltmake_dataset_int_f_2' 0 170 'h5ltmake_dataset_f_int3' 0 160
-'h5ltmake_dataset_int_f_1' 0 171 'h5ltmake_dataset_float_f_2' 0 167
-'h5ltmake_dataset_float_f_1' 0 168 'h5ltmake_dataset_float_f_3' 0 166
-'h5ltmake_dataset_int_f_3' 0 169 'h5ltmake_dataset_string_f' 0 2401
-'h5ltread_dataset_double_f_2' 0 173 'h5ltread_dataset_double_f_3' 0 172
-'h5ltread_dataset_f_float2' 0 38 'h5ltread_dataset_f_float1' 0 39
-'h5ltread_dataset_f_double2' 0 35 'h5ltread_dataset_f_double1' 0 36
-'h5ltread_dataset_f_double3' 0 34 'h5tget_native_type_f' 0 3978
-'h5pget_char_encoding_f' 0 3786 'h5ltread_dataset_float_f_1' 0 177
-'h5ltread_dataset_f_float3' 0 37 'h5ltread_dataset_f_int1' 0 42
-'h5ltread_dataset_f_int2' 0 41 'h5ltread_dataset_f_int3' 0 40
-'h5p_link_create_f' 0 309 'h5p_group_access_f' 0 315 'h5o_hdr_all_flags_f'
-0 328 'h5o_copy_expand_ext_link_f' 0 345 'h5ltset_attribute_int_f' 0
-2583 'h5ltread_dataset_float_f_2' 0 176 'h5ltread_dataset_float_f_3' 0
-175 'h5ltset_attribute_double_f' 0 2555 'h5ltread_dataset_string_f' 0
-2541 'h5ltread_dataset_int_f_3' 0 178 'h5ltread_dataset_int_f_2' 0 179
-'h5ltread_dataset_int_f_1' 0 180 'h5ltset_attribute_float_f' 0 2547
-'h5ltset_attribute_string_f' 0 2576 'h5o_copy_all_f' 0 341 'h5o' 0 2575
-'h5o_copy_expand_reference_f' 0 344 'h5o_flags_len' 0 2591
-'h5o_copy_shallow_hierarchy_f' 0 347 'h5o_copy_preserve_null_flag_f' 0
-342 'h5o_copy_expand_soft_link_f' 0 346 'h5o_flags' 0 233
-'h5o_copy_without_attr_flag_f' 0 343 'h5p_datatype_create_f' 0 314
-'h5p_crt_order_tracked_f' 0 306 'h5o_shmesg_none_flag_f' 0 340
-'h5o_shmesg_fill_flag_f' 0 337 'h5o_hdr_attr_store_phase_cha_f' 0 330
-'h5o_hdr_attr_crt_order_track_f' 0 332 'h5o_hdr_attr_crt_order_index_f'
-0 331 'h5o_shmesg_all_flag_f' 0 334 'h5o_hdr_chunk0_size_f' 0 333
-'h5o_hdr_store_times_f' 0 329 'h5o_shmesg_attr_flag_f' 0 335
-'h5o_shmesg_dtype_flag_f' 0 338 'h5o_shmesg_max_list_size_f' 0 326
-'h5o_shmesg_max_nindexes_f' 0 327 'h5olink_f' 0 2609
-'h5o_shmesg_sdspace_flag_f' 0 339 'h5o_shmesg_pline_flag_f' 0 336
-'h5oopen_by_addr_f' 0 2603 'h5p_crt_order_indexed_f' 0 307
-'h5p_attribute_create_f' 0 311 'h5p' 0 2602 'h5oopen_f' 0 2595 'h5open_f'
-0 2592 'h5p_dataset_access_f' 0 317 'h5p_dataset_create_f' 0 323
-'h5p_dataset_xfer_f' 0 322 'h5p_datatype_access_f' 0 313
-'h5p_file_access_f' 0 324 'h5p_default_f' 0 320 'h5p_flags_int_len' 0
-2618 'h5p_file_mount_f' 0 321 'h5p_file_create_f' 0 325 'h5p_flags_int'
-0 217 'h5p_flags' 0 230 'h5p_flags_len' 0 2617 'h5p_link_access_f' 0 308
-'h5p_group_create_f' 0 316 'h5pexist_f' 0 2712 'h5pall_filters_avail_f'
-0 2655 'h5p_root_f' 0 319 'h5p_object_create_f' 0 318 'h5p_object_copy_f'
-0 310 'h5p_string_create_f' 0 312 'h5pclose_f' 0 2651 'h5pclose_class_f'
-0 2619 'h5pequal_f' 0 2645 'h5pcreate_f' 0 2640 'h5pcopy_prop_f' 0 2634
-'h5pcopy_f' 0 2623 'h5pcreate_class_f' 0 2628 'h5pfill_value_defined_f'
-0 2707 'h5pget_attr_phase_change_f' 0 2701 'h5pget_alignment_f' 0 2670
-'h5pget_attr_creation_order_f' 0 2665 'h5pget_alloc_time_f' 0 2660
-'h5pget_cache_f' 0 2693 'h5pget_btree_ratios_f' 0 2681 'h5pget_buffer_f'
-0 2676 'h5pget_char' 0 181 'h5pset_fapl_direct_f' 0 3779
-'h5pget_fill_time_f' 0 3187 'h5pget_est_link_info_f' 0 2832
-'h5pget_data_transform_f' 0 2778 'h5pget_class_parent_f' 0 2758
-'h5pget_class_f' 0 2743 'h5pget_chunk_cache_f' 0 2730 'h5pget_chunk_f' 0
-2724 'h5pget_class_name_f' 0 2737 'h5pget_copy_object_f' 0 2753
-'h5pget_create_inter_group_f' 0 2748 'h5pget_edc_check_f' 0 2773
-'h5pget_double' 0 184 'h5pget_driver_f' 0 2763 'h5pget_fapl_family_f' 0
-2826 'h5pget_external_f' 0 2802 'h5pget_external_count_f' 0 2784
-'h5pget_fapl_core_f' 0 2796 'h5pget_fapl_direct_f' 0 2789
-'h5pget_fapl_multi_f' 0 2816 'h5pget_fclose_degree_f' 0 2811
-'h5pinsert_double' 0 192 'h5pget_hyper_vector_size_f' 0 2997
-'h5pget_fill_value_real' 0 186 'h5pget_fill_value_char' 0 185
-'h5pget_fill_value_double' 0 188 'h5pget_fill_value_integer' 0 187
-'h5pget_filter_f' 0 2868 'h5pget_filter_by_id_f' 0 2853
-'h5pget_gc_references_f' 0 2863 'h5pget_layout_f' 0 2992 'h5pget_integer'
-0 183 'h5pget_istore_k_f' 0 2884 'h5pget_meta_block_size_f' 0 2987
-'h5pget_link_phase_change_f' 0 2904 'h5pget_link_creation_order_f' 0
-2894 'h5pget_local_heap_size_hint_f' 0 2899 'h5pget_preserve_f' 0 2982
-'h5pget_nlinks_f' 0 2925 'h5pget_nfilters_f' 0 2910 'h5pget_nprops_f' 0
-2920 'h5pget_obj_track_times_f' 0 2915 'h5pget_sieve_buf_size_f' 0 2977
-'h5pget_real' 0 182 'h5pget_sizes_f' 0 2971 'h5pget_size_f' 0 2935
-'h5pget_version_f' 0 2963 'h5pget_userblock_f' 0 2952 'h5pget_sym_k_f' 0
-2946 'h5pget_small_data_block_size_f' 0 2941 'h5pinsert_char' 0 189
-'h5pset_alignment_f' 0 3175 'h5pregister_char' 0 193 'h5pisa_class_f' 0
-3022 'h5pinsert_integer' 0 191 'h5pinsert_real' 0 190 'h5pmodify_filter_f'
-0 3014 'h5premove_filter_f' 0 3051 'h5pregister_integer' 0 195
-'h5pregister_double' 0 196 'h5premove_f' 0 3040 'h5pregister_real' 0 194
-'h5pset_char' 0 197 'h5pset_cache_f' 0 3090 'h5pset_btree_ratios_f' 0
-3083 'h5pset_alloc_time_f' 0 3073 'h5pset_attr_creation_order_f' 0 3068
-'h5pset_attr_phase_change_f' 0 3062 'h5pset_buffer_f' 0 3078
-'h5pset_deflate_f' 0 3165 'h5pset_create_inter_group_f' 0 3126
-'h5pset_copy_object_f' 0 3116 'h5pset_chunk_cache_f' 0 3109
-'h5pset_char_encoding_f' 0 3098 'h5pset_chunk_f' 0 3103
-'h5pset_data_transform_f' 0 3121 'h5pset_external_f' 0 3158
-'h5pset_edc_check_f' 0 3142 'h5pset_double' 0 200 'h5pset_est_link_info_f'
-0 3136 'h5pset_family_offset_f' 0 3153 'h5pset_fapl_core_f' 0 3147
-'h5t_std_i32le' 0 451 'h5s_scalar_f' 0 303 'h5pset_gc_references_f' 0
-3446 'h5pset_fill_value_real' 0 204 'h5pset_fapl_family_f' 0 3245
-'h5pset_fill_value_char' 0 203 'h5pset_fapl_stdio_f' 0 3226
-'h5pset_fapl_split_f' 0 3208 'h5pset_fapl_multi_l' 0 202
-'h5pset_fapl_sec2_f' 0 3196 'h5pset_fapl_multi_s' 0 201
-'h5pset_fclose_degree_f' 0 3221 'h5pset_fill_time_f' 0 3216
-'h5pset_fill_value_integer' 0 205 'h5pset_fill_value_double' 0 206
-'h5pset_fletcher32_f' 0 3259 'h5pset_filter_f' 0 3251
-'h5pset_libver_bounds_f' 0 3440 'h5pset_istore_k_f' 0 3283
-'h5pset_hyper_vector_size_f' 0 3273 'h5pset_integer' 0 199
-'h5pset_layout_f' 0 3278 'h5pset_szip_f' 0 3400
-'h5pset_local_heap_size_hint_f' 0 3372 'h5pset_link_creation_order_f' 0
-3294 'h5pset_link_phase_change_f' 0 3288 'h5pset_sym_k_f' 0 3366
-'h5pset_sieve_buf_size_f' 0 3361 'h5pset_shared_mesg_index_f' 0 3343
-'h5pset_obj_track_times_f' 0 3329 'h5pset_meta_block_size_f' 0 3308
-'h5pset_nlinks_f' 0 3303 'h5pset_nbit_f' 0 3299 'h5pset_real' 0 198
-'h5pset_preserve_f' 0 3313 'h5pset_scaleoffset_f' 0 3318
-'h5pset_shared_mesg_nindexes_f' 0 3338 'h5pset_shuffle_f' 0 3334
-'h5pset_small_data_block_size_f' 0 3356 'h5pset_sizes_f' 0 3350
-'h5rcreate_region_f' 0 209 'h5punregister_f' 0 3389 'h5pset_userblock_f'
-0 3377 'h5r_flags_len' 0 3383 'h5r_dataset_region_f' 0 304 'h5r' 0 3382
-'h5r_flags' 0 220 'h5r_object_f' 0 305 'h5rcreate_object_f' 0 210
-'h5s_flags_len' 0 3439 'h5rget_name_region_f' 0 211
-'h5rdereference_object_f' 0 208 'h5rdereference_region_f' 0 207
-'h5rget_name_object_f' 0 212 'h5rget_region_region_f' 0 214
-'h5rget_object_type_obj_f' 0 213 'h5s_all_f' 0 297 'h5s' 0 3427
-'h5s_flags' 0 215 'h5s_null_f' 0 301 'h5t_order_le_f' 0 273
-'h5s_sel_all_f' 0 284 'h5s_sel_hyperslabs_f' 0 285 'h5s_sel_error_f' 0
-288 'h5sselect_all_f' 0 3604 'h5sget_simple_extent_type_f' 0 3560
-'h5screate_f' 0 3545 'h5s_select_prepend_f' 0 290 'h5s_sel_none_f' 0 287
-'h5s_select_nota_f' 0 292 'h5s_select_append_f' 0 291 'h5s_select_and_f'
-0 295 'h5s_sel_points_f' 0 286 'h5s_select_invalid_f' 0 289
-'h5s_select_noop_f' 0 296 'h5s_select_notb_f' 0 293 'h5s_select_or_f' 0
-299 'h5sclose_f' 0 3456 'h5s_simple_f' 0 302 'h5s_select_xor_f' 0 294
-'h5s_select_set_f' 0 300 'h5s_unlimited_f' 0 298 'h5scopy_f' 0 3451
-'h5sencode_f' 0 3539 'h5sdecode_f' 0 3467 'h5screate_simple_f' 0 3460
-'h5sget_simple_extent_ndims_f' 0 3534 'h5sget_select_elem_npoints_f' 0
-3524 'h5sextent_copy_f' 0 3484 'h5sextent_equal_f' 0 3478
-'h5sget_select_bounds_f' 0 3472 'h5sget_select_type_f' 0 3519
-'h5sget_select_elem_pointlist_f' 0 3506 'h5sget_select_hyper_blocklist_f'
-0 3499 'h5sget_select_hyper_nblocks_f' 0 3494 'h5sget_select_npoints_f'
-0 3489 'h5sget_simple_extent_dims_f' 0 3513
-'h5sget_simple_extent_npoints_f' 0 3529 'h5soffset_simple_f' 0 3555
-'h5sis_simple_f' 0 3550 'h5t_order_be_f' 0 272 'h5t_native_double' 0 471
-'h5sset_extent_none_f' 0 3600 'h5sselect_elements_f' 0 3583
-'h5sselect_hyperslab_f' 0 3574 'h5sselect_valid_f' 0 3569
-'h5sselect_none_f' 0 3565 'h5t' 0 3599 'h5sset_extent_simple_f' 0 3591
-'h5t_cset_ascii_f' 0 259 'h5t_array_f' 0 252 'h5t_compound_f' 0 276
-'h5t_bitfield_f' 0 278 'h5t_native_character' 0 470 'h5t_float_f' 0 281
-'h5t_flags_len' 0 3598 'h5t_cset_utf8_f' 0 258 'h5t_flags' 0 225
-'h5t_dir_ascend_f' 0 251 'h5t_dir_descend_f' 0 250 'h5t_enum_f' 0 274
-'h5t_ieee_f64be' 0 458 'h5t_ieee_f32le' 0 459 'h5t_ieee_f32be' 0 460
-'h5t_integer_f' 0 282 'h5t_ieee_f64le' 0 457 'h5t_norm_implied_f' 0 262
-'h5t_native_integer_1' 0 467 'h5t_native_integer' 0 473
-'h5t_native_integer_4' 0 465 'h5t_native_integer_2' 0 466
-'h5t_native_integer_8' 0 464 'h5t_no_class_f' 0 283 'h5t_native_real' 0
-472 'h5t_native_real_16' 0 461 'h5t_native_real_8' 0 462
-'h5t_native_real_4' 0 463 'h5t_norm_msbset_f' 0 261 'h5t_opaque_f' 0 277
-'h5t_norm_none_f' 0 260 'h5t_sgn_none_f' 0 265 'h5t_pad_one_f' 0 268
-'h5t_order_vax_f' 0 271 'h5t_order_none_f' 0 270 'h5t_pad_background_f'
-0 267 'h5t_pad_error_f' 0 266 'h5t_sgn_error_f' 0 263 'h5t_reference_f'
-0 275 'h5t_pad_zero_f' 0 269 'h5t_sgn_2_f' 0 264 'h5t_std_i16be' 0 454
-'h5t_std_i16le' 0 453 'h5t_std_i32be' 0 452 'h5t_string' 0 440
-'h5t_std_i64le' 0 449 'h5t_std_i64be' 0 450 'h5t_str_nullpad_f' 0 256
-'h5t_std_u32le' 0 443 'h5t_std_i8le' 0 455 'h5t_std_i8be' 0 456
-'h5t_std_u16be' 0 446 'h5t_std_ref_dsetreg' 0 468 'h5t_std_ref_obj' 0
-469 'h5t_std_u16le' 0 445 'h5t_std_u32be' 0 444 'h5t_std_u8le' 0 447
-'h5t_std_u64be' 0 442 'h5t_std_u8be' 0 448 'h5t_std_u64le' 0 441
-'h5t_str_error_f' 0 254 'h5t_str_spacepad_f' 0 255 'h5t_str_nullterm_f'
-0 257 'h5tdecode_f' 0 3774 'h5tarray_create_f' 0 3650 'h5t_time_f' 0 280
-'h5t_string_f' 0 279 'h5t_vlen_f' 0 253 'h5tcommitted_f' 0 3645
-'h5tcommit_f' 0 3619 'h5tcommit_anon_f' 0 3612 'h5tclose_f' 0 3608
-'h5tcopy_f' 0 3640 'h5tcompiler_conv_f' 0 3628 'h5tcreate_f' 0 3634
-'h5tget_cset_f' 0 3769 'h5tencode_f' 0 3707 'h5tget_array_ndims_f' 0
-3702 'h5tenum_create_f' 0 3687 'h5tenum_insert_f' 0 3681
-'h5tenum_valueof_f' 0 3675 'h5tenum_nameof_f' 0 3657 'h5tget_array_dims_f'
-0 3670 'h5tequal_f' 0 3664 'h5tget_class_f' 0 3697 'h5tget_create_plist_f'
-0 3692 'h5tget_inpad_f' 0 3764 'h5tget_fields_f' 0 3718 'h5tget_ebias_f'
-0 3713 'h5tget_member_index_f' 0 3758 'h5tget_member_class_f' 0 3727
-'h5tget_member_value_f' 0 3752 'h5tget_member_type_f' 0 3746
-'h5tget_member_name_f' 0 3739 'h5tget_member_offset_f' 0 3733
-'integer_types' 0 232 'h5tset_pad_f' 0 3965 'h5tis_variable_str_f' 0
-3905 'h5tget_precision_f' 0 3850 'h5tget_pad_f' 0 3811 'h5tget_offset_f'
-0 3806 'h5tget_norm_f' 0 3796 'h5tget_nmembers_f' 0 3791 'h5tget_order_f'
-0 3801 'h5tget_tag_f' 0 3844 'h5tget_strpad_f' 0 3832 'h5tget_size_f' 0
-3822 'h5tget_sign_f' 0 3817 'h5tget_super_f' 0 3827 'h5tinsert_f' 0 3837
-'h5tset_fields_f' 0 3896 'h5tset_ebias_f' 0 3871 'h5topen_f' 0 3864
-'h5tset_cset_f' 0 3859 'h5tpack_f' 0 3855 'h5tset_offset_f' 0 3891
-'h5tset_norm_f' 0 3881 'h5tset_inpad_f' 0 3876 'h5tset_order_f' 0 3886
-'h5tset_sign_f' 0 3960 'h5tset_precision_f' 0 3910 'h5zget_filter_info_f'
-0 3955 'h5z_flags_len' 0 3941 'h5z_filter_fletcher32_f' 0 245
-'h5z_filter_error_f' 0 249 'h5tset_tag_f' 0 3931 'h5tset_size_f' 0 3920
-'h5tset_strpad_f' 0 3915 'h5tvlen_create_f' 0 3926
-'h5z_filter_decode_enabled_f' 0 237 'h5z_error_edc_f' 0 244 'h5z' 0 3925
-'h5z_disable_edc_f' 0 243 'h5z_enable_edc_f' 0 242 'h5z_filter_all_f' 0
-236 'h5z_filter_deflate_f' 0 247 'h5z_filter_encode_enabled_f' 0 238
-'h5z_flag_optional_f' 0 239 'h5z_filter_shuffle_f' 0 246
-'h5z_filter_none_f' 0 248 'h5z_filter_szip_f' 0 240 'h5z_flags' 0 219
-'h5z_no_edc_f' 0 241 'h5zfilter_avail_f' 0 3936 'hobj_ref_t_f' 0 3953
-'h5zunregister_f' 0 3947 'haddr_t' 0 3946 'hid_t' 0 3945
-'hdset_reg_ref_t_f' 0 3943 'hdf5' 0 3942 'hssize_t' 0 3952 'hsize_t' 0
-3951 'predef_types' 0 216 'integer_types_len' 0 3972
-'object_namelen_default_f' 0 3971 'printoff' 0 3977 'predef_types_len' 0
-3973 'printon' 0 3976 'ref_reg_buf_len' 0 3975 'size_t' 0 3974)
diff --git a/interfaces/ext/hdf5/h5o.mod b/interfaces/ext/hdf5/h5o.mod
deleted file mode 100644
index 307856d..0000000
--- a/interfaces/ext/hdf5/h5o.mod
+++ /dev/null
@@ -1,1398 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5Off.f90 on Mon Feb 14 14:35:49 2011
-If you edit this, you'll get what you deserve.
-
-(() ()
-() () () () () () () () () () () () () () () () () () ())
-
-()
-
-()
-
-(('h5l_flags' 2 0) ('h5t_flags' 3 0) ('h5p_flags_int' 4 0) (
-'predefined_types' 5 0) ('h5i_flags' 6 0) ('integer_types' 7 0) (
-'h5r_flags' 8 0) ('h5z_flags' 9 0) ('h5s_flags' 10 0) ('h5d_flags' 11 0)
-('h5fd_hid_flags' 12 0) ('h5fd_flags' 13 0) ('h5g_flags' 14 0) (
-'h5generic_flags' 15 0) ('h5o_flags' 16 0) ('h5lib_flags' 17 0) (
-'h5p_flags' 18 0) ('h5f_flags' 19 0) ('floating_types' 20 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 21 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 22 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 23 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 24 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 25 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 26 ())) ('h5global.eq.6' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 27 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 28 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 29 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 30 ())) ('h5global.eq.10' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 31 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 32 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 33 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.13'
-(VARIABLE (INTEGER 4 ()) 0 34 ())) ('h5global.eq.14' (VARIABLE (INTEGER
-4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 35 ())) ('h5global.eq.15' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 36 ())) (
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '34') 1)))) 'h5global.eq.16' (VARIABLE (
-INTEGER 4 ()) 0 37 ())) ('h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '33') 1)))) 'h5global.eq.17'
-(VARIABLE (INTEGER 4 ()) 0 38 ())) ('h5global.eq.18' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '32') 1))))
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 39 ())) ('h5global.eq.19' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '31') 1)))) 'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 40 ())) (
-'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '30') 1)))) 'h5global.eq.20' (VARIABLE (
-INTEGER 4 ()) 0 41 ())) ('h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21'
-(VARIABLE (INTEGER 4 ()) 0 42 ())) ('h5global.eq.22' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 43 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 44 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 45 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1)))) 'h5global.eq.25'
-(VARIABLE (INTEGER 4 ()) 0 46 ())) ('h5global.eq.26' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '24') 1))))
-'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 47 ())) ('h5global.eq.27' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '23') 1)))) 'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 48 ())) (
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.28' (VARIABLE (
-INTEGER 4 ()) 0 49 ())) ('h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.29'
-(VARIABLE (INTEGER 4 ()) 0 50 ())) ('h5global.eq.30' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 51 ())) ('h5global.eq.31' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 52 ())) (
-'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.32' (VARIABLE (
-INTEGER 4 ()) 0 53 ())) ('h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33'
-(VARIABLE (INTEGER 4 ()) 0 54 ())) ('h5global.eq.34' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 55 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 56 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 57 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.37'
-(VARIABLE (INTEGER 4 ()) 0 58 ())) ('h5global.eq.38' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 59 ())) ('h5global.eq.39' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 60 ())) (
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.40' (VARIABLE (
-INTEGER 4 ()) 0 61 ())) ('h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.41'
-(VARIABLE (INTEGER 4 ()) 0 62 ())) ('h5global.eq.42' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 63 ())) ('h5global.eq.43' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 64 ())) (
-'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.44' (VARIABLE (
-INTEGER 4 ()) 0 65 ())) ('h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45'
-(VARIABLE (INTEGER 4 ()) 0 66 ())) ('h5global.eq.46' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 67 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 68 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 69 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.49'
-(VARIABLE (INTEGER 4 ()) 0 70 ())) ('h5global.eq.50' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 71 ())) ('h5global.eq.51' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 72 ())) (
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.52' (VARIABLE (
-INTEGER 4 ()) 0 73 ())) ('h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.53'
-(VARIABLE (INTEGER 4 ()) 0 74 ())) ('h5global.eq.54' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 75 ())) ('h5global.eq.55' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 76 ())) (
-'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.56' (VARIABLE (
-INTEGER 4 ()) 0 77 ())) ('h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57'
-(VARIABLE (INTEGER 4 ()) 0 78 ())) ('h5global.eq.58' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 79 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 80 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 81 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.61'
-(VARIABLE (INTEGER 4 ()) 0 82 ())) ('h5global.eq.62' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 83 ())) ('h5global.eq.63' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 84 ())) (
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.64' (VARIABLE (
-INTEGER 4 ()) 0 85 ())) ('h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.65'
-(VARIABLE (INTEGER 4 ()) 0 86 ())) ('h5global.eq.66' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 87 ())) ('h5global.eq.67' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 88 ())) (
-'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.68' (VARIABLE (
-INTEGER 4 ()) 0 89 ())) ('h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69'
-(VARIABLE (INTEGER 4 ()) 0 90 ())) ('h5global.eq.70' (VARIABLE (INTEGER
-4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 91 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 92 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 93 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 4 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.73'
-(VARIABLE (INTEGER 4 ()) 0 94 ())) ('h5global.eq.74' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 95 ())) ('h5global.eq.75' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 96 ())) (
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.76' (VARIABLE (
-INTEGER 4 ()) 0 97 ())) ('h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.77'
-(VARIABLE (INTEGER 4 ()) 0 98 ())) ('h5global.eq.78' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 99 ())) ('h5global.eq.79' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 100 ())) (
-'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.80' (VARIABLE (
-INTEGER 4 ()) 0 101 ())) ('h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81'
-(VARIABLE (INTEGER 4 ()) 0 102 ())) ('h5global.eq.82' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 103 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 104 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 105 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.85'
-(VARIABLE (INTEGER 4 ()) 0 106 ())) ('h5global.eq.86' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 107 ())) ('h5global.eq.87' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 108 ())) (
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.88' (VARIABLE (
-INTEGER 4 ()) 0 109 ())) ('h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.89'
-(VARIABLE (INTEGER 4 ()) 0 110 ())) ('h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 111 ())) ('h5global.eq.91' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 112 ())) (
-'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.92' (VARIABLE (
-INTEGER 4 ()) 0 113 ())) ('h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93'
-(VARIABLE (INTEGER 4 ()) 0 114 ())) ('h5global.eq.94' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 115 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 116 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 117 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.97'
-(VARIABLE (INTEGER 4 ()) 0 118 ())) ('h5global.eq.98' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 119 ())) ('h5global.eq.99' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 120 ())) (
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.100' (VARIABLE (
-INTEGER 4 ()) 0 121 ())) ('h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 122 ())) ('h5global.eq.102'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 123 ())) (
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.103' (VARIABLE (
-INTEGER 4 ()) 0 124 ())) ('h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 125 ())) ('h5global.eq.105'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 126 ())) (
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.106' (VARIABLE (
-INTEGER 4 ()) 0 127 ())) ('h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 128 ())) ('h5global.eq.108'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 129 ())) (
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.109' (VARIABLE (
-INTEGER 4 ()) 0 130 ())) ('h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 131 ())) ('h5global.eq.111'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 132 ())) (
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.112' (VARIABLE (
-INTEGER 4 ()) 0 133 ())) ('h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 134 ())) ('h5global.eq.114'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 135 ())) (
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.115' (VARIABLE (
-INTEGER 4 ()) 0 136 ())) ('h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 2
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 137 ())) ('h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 138 ())) ('h5global.eq.118'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 139 ())) (
-'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.119' (VARIABLE (
-INTEGER 4 ()) 0 140 ())) ('h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120'
-(VARIABLE (INTEGER 4 ()) 0 141 ())) ('h5global.eq.121' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 142 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 143 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 144 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.124'
-(VARIABLE (INTEGER 4 ()) 0 145 ())) ('h5global.eq.125' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 146 ())) ('h5global.eq.126'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 147 ())) (
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.127' (VARIABLE (
-INTEGER 4 ()) 0 148 ())) ('h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 149 ())) ('h5global.eq.129'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 150 ())) (
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.130' (VARIABLE (
-INTEGER 4 ()) 0 151 ())) ('h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 152 ())) ('h5global.eq.132'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 153 ())) (
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.133' (VARIABLE (
-INTEGER 4 ()) 0 154 ())) ('h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 155 ())) ('h5global.eq.135'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 156 ())) (
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.136' (VARIABLE (
-INTEGER 4 ()) 0 157 ())) ('h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 158 ())) ('h5global.eq.138'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 159 ())) (
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.139' (VARIABLE (
-INTEGER 4 ()) 0 160 ())) ('h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 161 ())) ('h5global.eq.141'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 162 ())) (
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.142' (VARIABLE (
-INTEGER 4 ()) 0 163 ())) ('h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 164 ())) ('h5global.eq.144'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 165 ())) (
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.145' (VARIABLE (
-INTEGER 4 ()) 0 166 ())) ('h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1))))
-'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 167 ())) ('h5global.eq.147'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 168 ())) (
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.148' (VARIABLE (
-INTEGER 4 ()) 0 169 ())) ('h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 170 ())) ('h5global.eq.150'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 171 ())) (
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.151' (VARIABLE (
-INTEGER 4 ()) 0 172 ())) ('h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 173 ())) ('h5global.eq.153'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 174 ())) (
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.154' (VARIABLE (
-INTEGER 4 ()) 0 175 ())) ('h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 176 ())) ('h5global.eq.156'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 177 ())) (
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.157' (VARIABLE (
-INTEGER 4 ()) 0 178 ())) ('h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 179 ())) ('h5global.eq.159'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ())) (
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.160' (VARIABLE (
-INTEGER 4 ()) 0 181 ())) ('h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 182 ())) ('h5global.eq.162'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 183 ())) (
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.163' (VARIABLE (
-INTEGER 4 ()) 0 184 ())) ('h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 185 ())) ('h5global.eq.165'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 186 ())) (
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.166' (VARIABLE (
-INTEGER 4 ()) 0 187 ())) ('h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 188 ())) ('h5global.eq.168'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ())) (
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.169' (VARIABLE (
-INTEGER 4 ()) 0 190 ())) ('h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 191 ())) ('h5global.eq.171'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 192 ())) (
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.172' (VARIABLE (
-INTEGER 4 ()) 0 193 ())) ('h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 194 ())) ('h5global.eq.174'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 195 ())) (
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.175' (VARIABLE (
-INTEGER 4 ()) 0 196 ())) ('h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 197 ())) ('h5global.eq.177'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 198 ())) (
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.178' (VARIABLE (
-INTEGER 4 ()) 0 199 ())) ('h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.180'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.181' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.183'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 204 ())) (
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.184' (VARIABLE (
-INTEGER 4 ()) 0 205 ())) ('h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 206 ())) ('h5global.eq.186'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 207 ())) (
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.187' (VARIABLE (
-INTEGER 4 ()) 0 208 ())) ('h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 209 ())) ('h5global.eq.189'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 210 ())) (
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.190' (VARIABLE (
-INTEGER 4 ()) 0 211 ())) ('h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 212 ())) ('h5global.eq.192'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ())) (
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.193' (VARIABLE (
-INTEGER 4 ()) 0 214 ())) ('h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 215 ())) ('h5global.eq.195'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 216 ())) (
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.196' (VARIABLE (
-INTEGER 4 ()) 0 217 ())) ('h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 218 ())) ('h5global.eq.198'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 219 ())) (
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.199' (VARIABLE (
-INTEGER 4 ()) 0 220 ())) ('h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 221 ())) ('h5global.eq.201'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 222 ())) (
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.202' (VARIABLE (
-INTEGER 4 ()) 0 223 ())) ('h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.204'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.205' (VARIABLE (
-INTEGER 4 ()) 0 226 ())) ('h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.207'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 228 ())) (
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.208' (VARIABLE (
-INTEGER 4 ()) 0 229 ())) ('h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 230 ())) ('h5global.eq.210'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 231 ())) (
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.211' (VARIABLE (
-INTEGER 4 ()) 0 232 ())) ('h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 233 ())) ('h5global.eq.213'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 234 ())) (
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.214' (VARIABLE (
-INTEGER 4 ()) 0 235 ())) ('h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.217'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.218' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219'
-(VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.220' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.232'
-(VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.233' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 254 ())) ('h5global.eq.234'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 255 ())) (
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.235' (VARIABLE (
-INTEGER 4 ()) 0 256 ())) ('h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 257 ())) ('h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.238'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.239' (VARIABLE (
-INTEGER 4 ()) 0 260 ())))
-
-(20 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-261 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-262 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-263 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-264 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-265 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-266 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-267 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-268 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-269 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-270 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-207 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-208 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-205 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-206 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-200 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-272 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-273 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-274 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-21 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-22 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-183 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-180 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-184 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-167 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-166 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-168 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-185 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-181 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-187 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-174 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-186 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-170 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-171 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-172 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-173 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-11 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-176 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-179 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-177 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-223 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-216 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-217 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-178 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-169 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-210 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '19') () 0 ()
-())
-19 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-211 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-213 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-220 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-215 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-13 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-153 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-278 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-12 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-154 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-160 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-152 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-158 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-157 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-159 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-163 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-164 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-161 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-151 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-156 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-155 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-162 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-150 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-149 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-14 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-281 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '12') () 0 ()
-())
-198 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-195 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-194 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-197 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-189 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-192 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-193 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-148 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-165 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-218 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-175 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-190 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-191 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-15 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9')) 0 () ())
-199 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-141 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-142 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-282 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(UNKNOWN 0 ()) 0 0 () () 0 () ())
-144 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-143 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-196 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-6 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-284 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6') () 0 () ())
-2 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-146 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-285 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7') () 0 () ())
-147 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-140 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-139 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-17 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-138 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-286 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-128 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'h5o' 'h5o' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-137 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-136 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-129 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-133 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-131 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-132 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-134 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-135 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-145 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-288 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-16 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-118 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-115 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-130 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-117 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-116 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-120 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-125 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-124 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-113 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-122 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-121 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-127 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-114 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-126 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-289 'h5oopen_by_addr_f' 'h5o' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 290 0 (291 292 293 294) () 0 () ())
-98 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-295 'h5oopen_f' 'h5o' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 296 0 (297 298 299 300 301) ()
-0 () ())
-104 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-110 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-93 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-94 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-302 'h5olink_f' 'h5o' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 303 0 (304 305 306 307 308
-309) () 0 () ())
-101 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-100 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-109 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-123 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-112 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-111 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-107 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-18 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-4 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-310 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-102 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-103 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-96 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-97 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-106 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-105 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-95 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-311 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '18') () 0 ()
-())
-108 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-119 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-188 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-92 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-312 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2') () 0 () ())
-8 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-91 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-10 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-88 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-90 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-75 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-71 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-313 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '20') () 0 ()
-())
-84 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-73 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-82 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-74 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-72 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-83 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-76 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-86 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-80 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-87 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-81 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-77 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-65 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-39 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-85 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-89 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-63 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-79 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-38 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-45 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-37 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-314 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '34') () 0 ()
-())
-3 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-68 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-69 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-258 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-70 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-48 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-49 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-59 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-58 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-57 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-60 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-64 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-47 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-54 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-55 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-51 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-52 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-50 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-62 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-56 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-53 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-242 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-61 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-46 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-78 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-231 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-42 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-227 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-67 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-40 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-66 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-44 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-43 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-31 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-29 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-25 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-34 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-24 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-32 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-35 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-27 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-26 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-33 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-315 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '14') () 0 ()
-())
-316 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-28 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-9 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-317 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-318 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((319 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-36 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-23 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-320 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-321 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((322 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-30 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-323 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-41 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-324 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-325 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-326 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-327 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-328 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-5 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-7 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-230 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-99 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-305 'new_loc_id' '' 303 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-306 'new_link_name' '' 303 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-304 'object_id' '' 303 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-308 'lcpl_id' '' 303 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-293 'obj_id' '' 290 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-307 'hdferr' '' 303 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-298 'name' '' 296 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-297 'loc_id' '' 296 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-299 'obj_id' '' 296 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-300 'hdferr' '' 296 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-309 'lapl_id' '' 303 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-294 'hdferr' '' 290 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-301 'lapl_id' '' 296 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-292 'addr' '' 290 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-291 'loc_id' '' 290 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-)
-
-('h5p_string_create_f' 0 99 'h5g_storage_type_dense_f' 0 188
-'h5d_fill_time_error_f' 0 175 'floating_types_len' 0 275 '__convert_i4_i8'
-0 261 'floating_types' 0 20 'h5d_alloc_time_early_f' 0 182
-'h5d_alloc_time_default_f' 0 183 'h5_iter_unknown_f' 0 204
-'fortran_integer_1' 0 273 'fortran_double' 0 263 'fortran_integer' 0 262
-'fortran_real_4' 0 272 'fortran_integer_2' 0 269 'fortran_real' 0 268
-'fortran_integer_4' 0 265 'fortran_integer_8' 0 264 'fortran_real_12' 0
-267 'fortran_real_16' 0 266 'h5_integer_kind' 0 271 'h5_index_crt_order_f'
-0 206 'fortran_real_8' 0 270 'h5_index_n_f' 0 205 'h5_index_unknown_f' 0
-208 'h5_index_name_f' 0 207 'h5_iter_dec_f' 0 202 'h5_iter_native_f' 0
-201 'h5_iter_n_f' 0 200 'h5_iter_inc_f' 0 203 'h5_szip_ec_om_f' 0 22
-'h5_real_kind' 0 274 'h5_szip_nn_om_f' 0 21 'h5d_contiguous_f' 0 186
-'h5d_compact_f' 0 187 'h5d_alloc_time_late_f' 0 181
-'h5d_alloc_time_error_f' 0 184 'h5d_alloc_time_incr_f' 0 180
-'h5d_chunked_f' 0 185 'h5d_chunk_cache_nslots_dflt_f' 0 168
-'h5d_chunk_cache_nbytes_dflt_f' 0 167 'h5d_chunk_cache_w0_dflt_f' 0 166
-'h5d_fill_time_alloc_f' 0 174 'h5f_close_weak_f' 0 218
-'h5d_fill_value_user_defined_f' 0 169 'h5d_fill_time_never_f' 0 173
-'h5d_fill_value_error_f' 0 172 'h5d_fill_value_default_f' 0 170
-'h5d_fill_value_undefined_f' 0 171 'h5d_space_sts_not_allocated_f' 0 178
-'h5d_space_sts_error_f' 0 179 'h5d_flags_len' 0 276 'h5d_flags' 0 11
-'h5d_space_sts_allocated_f' 0 176 'h5f_close_default_f' 0 219
-'h5f_acc_trunc_f' 0 224 'h5f_acc_rdonly_f' 0 225 'h5f_acc_debug_f' 0 222
-'h5d_space_sts_part_allocated_f' 0 177 'h5f_acc_excl_f' 0 223
-'h5f_acc_rdwr_f' 0 226 'h5f_close_semi_f' 0 217 'h5f_close_strong_f' 0
-216 'h5fd_mpio_independent_f' 0 165 'h5fd_mem_default_f' 0 162
-'h5fd_hid_flags_len' 0 279 'h5fd_core_f' 0 154 'h5f_obj_file_f' 0 215
-'h5f_libver_latest_f' 0 209 'h5f_flags' 0 19 'h5f_flags_len' 0 277
-'h5f_libver_earliest_f' 0 210 'h5f_obj_datatype_f' 0 212
-'h5f_obj_dataset_f' 0 214 'h5f_obj_all_f' 0 211 'h5f_scope_global_f' 0
-220 'h5f_obj_group_f' 0 213 'h5f_scope_local_f' 0 221 'h5fd_hid_flags' 0
-12 'h5fd_flags_len' 0 278 'h5fd_family_f' 0 153 'h5fd_flags' 0 13
-'h5fd_log_f' 0 152 'h5fd_mem_btree_f' 0 160 'h5fd_mem_ntypes_f' 0 155
-'h5fd_mem_nolist_f' 0 163 'h5fd_mem_draw_f' 0 159 'h5fd_mem_lheap_f' 0
-157 'h5fd_mem_gheap_f' 0 158 'h5fd_mem_ohdr_f' 0 156 'h5fd_mpio_f' 0 151
-'h5fd_mem_super_f' 0 161 'h5fd_mpio_collective_f' 0 164 'h5fd_stdio_f' 0
-148 'h5fd_sec2_f' 0 149 'h5fd_multi_f' 0 150 'h5g_link_hard_f' 0 193
-'h5g_dataset_f' 0 197 'h5fortran_types' 0 280 'h5g_link_error_f' 0 194
-'h5g_group_f' 0 198 'h5g_flags_len' 0 281 'h5g_flags' 0 14 'h5g_link_f'
-0 195 'h5g_link_soft_f' 0 192 'h5g_storage_type_compact_f' 0 189
-'h5o_hdr_attr_crt_order_track_f' 0 119 'h5o_copy_without_attr_flag_f' 0
-130 'h5i_datatype_f' 0 145 'h5g_type_f' 0 196 'h5g_storage_type_unknown_f'
-0 191 'h5g_storage_type_symbol_table_f' 0 190 'h5generic_flags_len' 0
-283 'h5g_unknown_f' 0 199 'h5generic_flags' 0 15 'h5i_dataset_f' 0 143
-'h5global' 0 282 'h5i_attr_f' 0 142 'h5i_badid_f' 0 141 'h5i_dataspace_f'
-0 144 'h5l_link_class_t_vers_f' 0 135 'h5i_file_f' 0 147 'h5i_flags_len'
-0 285 'h5i_flags' 0 6 'h5i_group_f' 0 146 'h5l_flags' 0 2 'h5l_flags_len'
-0 284 'h5o_copy_shallow_hierarchy_f' 0 134 'h5o_copy_expand_ext_link_f'
-0 132 'h5l_same_loc_f' 0 136 'h5l_type_external_f' 0 137
-'h5l_type_error_f' 0 140 'h5o' 0 287 'h5lib_flags_len' 0 286
-'h5l_type_soft_f' 0 138 'h5l_type_hard_f' 0 139 'h5lib_flags' 0 17
-'h5o_copy_all_f' 0 128 'h5o_copy_expand_reference_f' 0 131
-'h5o_copy_expand_soft_link_f' 0 133 'h5o_copy_preserve_null_flag_f' 0
-129 'h5o_hdr_all_flags_f' 0 115 'h5o_flags' 0 16 'h5o_flags_len' 0 288
-'h5o_hdr_attr_crt_order_index_f' 0 118 'h5p_file_mount_f' 0 108
-'h5p_default_f' 0 107 'h5o_shmesg_pline_flag_f' 0 123
-'h5o_shmesg_max_nindexes_f' 0 114 'h5o_shmesg_all_flag_f' 0 121
-'h5o_hdr_chunk0_size_f' 0 120 'h5o_hdr_attr_store_phase_cha_f' 0 117
-'h5o_hdr_store_times_f' 0 116 'h5o_shmesg_attr_flag_f' 0 122
-'h5o_shmesg_max_list_size_f' 0 113 'h5o_shmesg_fill_flag_f' 0 124
-'h5o_shmesg_dtype_flag_f' 0 125 'h5o_shmesg_none_flag_f' 0 127
-'h5p_dataset_xfer_f' 0 109 'h5olink_f' 0 302 'h5o_shmesg_sdspace_flag_f'
-0 126 'h5p_crt_order_indexed_f' 0 94 'h5oopen_f' 0 295 'h5oopen_by_addr_f'
-0 289 'h5p_attribute_create_f' 0 98 'h5p_crt_order_tracked_f' 0 93
-'h5p_dataset_create_f' 0 110 'h5p_dataset_access_f' 0 104
-'h5p_datatype_access_f' 0 100 'h5p_datatype_create_f' 0 101
-'h5p_file_access_f' 0 111 'h5p_file_create_f' 0 112 'h5p_flags_len' 0
-311 'h5p_flags_int_len' 0 310 'h5p_flags_int' 0 4 'h5p_flags' 0 18
-'h5p_link_access_f' 0 95 'h5p_group_create_f' 0 103 'h5p_group_access_f'
-0 102 'h5p_object_create_f' 0 105 'h5p_object_copy_f' 0 97
-'h5p_link_create_f' 0 96 'h5p_root_f' 0 106 'h5t_std_u16le' 0 232
-'h5s_select_append_f' 0 78 'h5s_sel_hyperslabs_f' 0 72 'h5s_all_f' 0 84
-'h5r_dataset_region_f' 0 91 'h5r_flags' 0 8 'h5r_flags_len' 0 312
-'h5r_object_f' 0 92 'h5s_flags_len' 0 313 'h5s_flags' 0 10 'h5s_sel_all_f'
-0 71 'h5s_scalar_f' 0 90 'h5s_null_f' 0 88 'h5s_sel_error_f' 0 75
-'h5s_sel_none_f' 0 74 'h5s_select_and_f' 0 82 'h5s_sel_points_f' 0 73
-'h5t_cset_ascii_f' 0 46 'h5s_select_nota_f' 0 79 'h5s_select_invalid_f'
-0 76 'h5s_select_noop_f' 0 83 'h5t_compound_f' 0 63 'h5s_simple_f' 0 89
-'h5s_select_prepend_f' 0 77 'h5s_select_notb_f' 0 80 'h5s_select_or_f' 0
-86 'h5s_select_xor_f' 0 81 'h5s_select_set_f' 0 87 'h5s_unlimited_f' 0
-85 'h5t_array_f' 0 39 'h5t_bitfield_f' 0 65 'h5t_enum_f' 0 61
-'h5t_dir_descend_f' 0 37 'h5t_cset_utf8_f' 0 45 'h5t_dir_ascend_f' 0 38
-'h5t_std_ref_obj' 0 256 'h5t_native_character' 0 257 'h5t_ieee_f32be' 0
-247 'h5t_float_f' 0 68 'h5t_flags' 0 3 'h5t_flags_len' 0 314
-'h5t_ieee_f64le' 0 244 'h5t_ieee_f64be' 0 245 'h5t_ieee_f32le' 0 246
-'h5t_integer_f' 0 69 'h5t_std_i64le' 0 236 'h5t_pad_error_f' 0 53
-'h5t_native_integer_1' 0 254 'h5t_native_double' 0 258
-'h5t_native_integer' 0 260 'h5t_pad_background_f' 0 54 'h5t_norm_none_f'
-0 47 'h5t_norm_implied_f' 0 49 'h5t_native_integer_2' 0 253
-'h5t_native_integer_4' 0 252 'h5t_native_real_16' 0 248 'h5t_native_real'
-0 259 'h5t_native_integer_8' 0 251 'h5t_native_real_4' 0 250
-'h5t_native_real_8' 0 249 'h5t_no_class_f' 0 70 'h5t_norm_msbset_f' 0 48
-'h5t_opaque_f' 0 64 'h5t_order_le_f' 0 60 'h5t_order_be_f' 0 59
-'h5t_order_none_f' 0 57 'h5t_order_vax_f' 0 58 'h5t_std_i32be' 0 239
-'h5t_pad_zero_f' 0 56 'h5t_pad_one_f' 0 55 'h5t_reference_f' 0 62
-'h5t_sgn_error_f' 0 50 'h5t_sgn_2_f' 0 51 'h5t_std_i16le' 0 240
-'h5t_sgn_none_f' 0 52 'h5t_std_i16be' 0 241 'h5t_std_i32le' 0 238
-'h5t_std_i64be' 0 237 'h5t_std_ref_dsetreg' 0 255 'h5t_std_i8le' 0 242
-'h5t_std_i8be' 0 243 'h5t_std_u16be' 0 233 'h5t_std_u32le' 0 230
-'h5t_std_u32be' 0 231 'integer_types' 0 7 'h5t_str_error_f' 0 41
-'h5t_std_u8be' 0 235 'h5t_std_u64le' 0 228 'h5t_std_u64be' 0 229
-'h5t_std_u8le' 0 234 'hssize_t' 0 323 'h5z_disable_edc_f' 0 30
-'h5t_str_nullpad_f' 0 43 'h5t_str_nullterm_f' 0 44 'h5t_string_f' 0 66
-'h5t_string' 0 227 'h5t_str_spacepad_f' 0 42 'h5t_vlen_f' 0 40
-'h5t_time_f' 0 67 'hobj_ref_t_f' 0 321 'h5z_filter_all_f' 0 23
-'h5z_enable_edc_f' 0 29 'h5z_error_edc_f' 0 31 'h5z_filter_error_f' 0 36
-'h5z_filter_decode_enabled_f' 0 24 'h5z_filter_deflate_f' 0 34
-'h5z_filter_encode_enabled_f' 0 25 'hdset_reg_ref_t_f' 0 318 'h5z_flags'
-0 9 'h5z_filter_shuffle_f' 0 33 'h5z_filter_none_f' 0 35
-'h5z_filter_fletcher32_f' 0 32 'h5z_flag_optional_f' 0 26
-'h5z_filter_szip_f' 0 27 'h5z_no_edc_f' 0 28 'h5z_flags_len' 0 315
-'haddr_t' 0 316 'hid_t' 0 317 'hsize_t' 0 320 'predef_types' 0 5
-'object_namelen_default_f' 0 325 'integer_types_len' 0 324
-'ref_reg_buf_len' 0 328 'predef_types_len' 0 326 'size_t' 0 327)
diff --git a/interfaces/ext/hdf5/h5p.mod b/interfaces/ext/hdf5/h5p.mod
deleted file mode 100644
index a33f392..0000000
--- a/interfaces/ext/hdf5/h5p.mod
+++ /dev/null
@@ -1,2804 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5Pff.f90 on Mon Feb 14 14:35:52 2011
-If you edit this, you'll get what you deserve.
-
-(() ()
-() () () () () () () () () () () () () () () () () () ())
-
-()
-
-(('h5pget_f' '' 2 3 4) ('h5pget_fill_value_f' '' 5 6 7) ('h5pinsert_f' ''
-8 9 10) ('h5pregister_f' '' 11 12 13) ('h5pset_fill_value_f' '' 14 15 16)
-('h5pset_f' '' 17 18 19) ('h5pset_fapl_multi_f' '' 20 21))
-
-(('h5l_flags' 22 0) ('h5t_flags' 23 0) ('h5p_flags_int' 24 0) (
-'predefined_types' 25 0) ('h5i_flags' 26 0) ('integer_types' 27 0) (
-'h5r_flags' 28 0) ('h5z_flags' 29 0) ('h5s_flags' 30 0) ('h5d_flags' 31
-0) ('h5fd_hid_flags' 32 0) ('h5fd_flags' 33 0) ('h5g_flags' 34 0) (
-'h5generic_flags' 35 0) ('h5o_flags' 36 0) ('h5lib_flags' 37 0) (
-'h5p_flags' 38 0) ('h5f_flags' 39 0) ('floating_types' 40 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 37 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 41 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 37 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 42 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 29 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 43 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 29 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 44 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 29 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 45 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 29 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 46 ())) ('h5global.eq.6' (VARIABLE (INTEGER 4
-()) 0 29 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 47 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 29 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 48 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 29 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 49 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 29 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 50 ())) ('h5global.eq.10' (VARIABLE (INTEGER 4
-()) 0 29 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 51 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 29 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 52 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 29 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 53 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 29
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.13'
-(VARIABLE (INTEGER 4 ()) 0 54 ())) ('h5global.eq.14' (VARIABLE (INTEGER
-4 ()) 0 29 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 55 ())) ('h5global.eq.15' (
-VARIABLE (INTEGER 4 ()) 0 29 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 56 ())) (
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '34') 1)))) 'h5global.eq.16' (VARIABLE (
-INTEGER 4 ()) 0 57 ())) ('h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 23
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '33') 1)))) 'h5global.eq.17'
-(VARIABLE (INTEGER 4 ()) 0 58 ())) ('h5global.eq.18' (VARIABLE (INTEGER
-4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '32') 1))))
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 59 ())) ('h5global.eq.19' (
-VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '31') 1)))) 'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 60 ())) (
-'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '30') 1)))) 'h5global.eq.20' (VARIABLE (
-INTEGER 4 ()) 0 61 ())) ('h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 23
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21'
-(VARIABLE (INTEGER 4 ()) 0 62 ())) ('h5global.eq.22' (VARIABLE (INTEGER
-4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 63 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 64 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 65 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 23
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1)))) 'h5global.eq.25'
-(VARIABLE (INTEGER 4 ()) 0 66 ())) ('h5global.eq.26' (VARIABLE (INTEGER
-4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '24') 1))))
-'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 67 ())) ('h5global.eq.27' (
-VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '23') 1)))) 'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 68 ())) (
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.28' (VARIABLE (
-INTEGER 4 ()) 0 69 ())) ('h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 23
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.29'
-(VARIABLE (INTEGER 4 ()) 0 70 ())) ('h5global.eq.30' (VARIABLE (INTEGER
-4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 71 ())) ('h5global.eq.31' (
-VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 72 ())) (
-'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.32' (VARIABLE (
-INTEGER 4 ()) 0 73 ())) ('h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 23
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33'
-(VARIABLE (INTEGER 4 ()) 0 74 ())) ('h5global.eq.34' (VARIABLE (INTEGER
-4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 75 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 76 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 77 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 23
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.37'
-(VARIABLE (INTEGER 4 ()) 0 78 ())) ('h5global.eq.38' (VARIABLE (INTEGER
-4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 79 ())) ('h5global.eq.39' (
-VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 80 ())) (
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.40' (VARIABLE (
-INTEGER 4 ()) 0 81 ())) ('h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 23
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.41'
-(VARIABLE (INTEGER 4 ()) 0 82 ())) ('h5global.eq.42' (VARIABLE (INTEGER
-4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 83 ())) ('h5global.eq.43' (
-VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 84 ())) (
-'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.44' (VARIABLE (
-INTEGER 4 ()) 0 85 ())) ('h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 23
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45'
-(VARIABLE (INTEGER 4 ()) 0 86 ())) ('h5global.eq.46' (VARIABLE (INTEGER
-4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 87 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 88 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 89 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 23
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.49'
-(VARIABLE (INTEGER 4 ()) 0 90 ())) ('h5global.eq.50' (VARIABLE (INTEGER
-4 ()) 0 30 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 91 ())) ('h5global.eq.51' (
-VARIABLE (INTEGER 4 ()) 0 30 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 92 ())) (
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 30 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.52' (VARIABLE (
-INTEGER 4 ()) 0 93 ())) ('h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 30
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.53'
-(VARIABLE (INTEGER 4 ()) 0 94 ())) ('h5global.eq.54' (VARIABLE (INTEGER
-4 ()) 0 30 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 95 ())) ('h5global.eq.55' (
-VARIABLE (INTEGER 4 ()) 0 30 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 96 ())) (
-'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 30 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.56' (VARIABLE (
-INTEGER 4 ()) 0 97 ())) ('h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 30
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57'
-(VARIABLE (INTEGER 4 ()) 0 98 ())) ('h5global.eq.58' (VARIABLE (INTEGER
-4 ()) 0 30 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 99 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 30 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 100 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 30 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 101 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 30
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.61'
-(VARIABLE (INTEGER 4 ()) 0 102 ())) ('h5global.eq.62' (VARIABLE (
-INTEGER 4 ()) 0 30 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 103 ())) ('h5global.eq.63' (
-VARIABLE (INTEGER 4 ()) 0 30 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 104 ())) (
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 30 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.64' (VARIABLE (
-INTEGER 4 ()) 0 105 ())) ('h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 30
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.65'
-(VARIABLE (INTEGER 4 ()) 0 106 ())) ('h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 30 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 107 ())) ('h5global.eq.67' (
-VARIABLE (INTEGER 4 ()) 0 30 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 108 ())) (
-'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 30 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.68' (VARIABLE (
-INTEGER 4 ()) 0 109 ())) ('h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 30
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69'
-(VARIABLE (INTEGER 4 ()) 0 110 ())) ('h5global.eq.70' (VARIABLE (
-INTEGER 4 ()) 0 28 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 111 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 28 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 112 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 113 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 24
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.73'
-(VARIABLE (INTEGER 4 ()) 0 114 ())) ('h5global.eq.74' (VARIABLE (
-INTEGER 4 ()) 0 38 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 115 ())) ('h5global.eq.75' (
-VARIABLE (INTEGER 4 ()) 0 38 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 116 ())) (
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 38 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.76' (VARIABLE (
-INTEGER 4 ()) 0 117 ())) ('h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 38
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.77'
-(VARIABLE (INTEGER 4 ()) 0 118 ())) ('h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 38 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 119 ())) ('h5global.eq.79' (
-VARIABLE (INTEGER 4 ()) 0 38 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 120 ())) (
-'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 38 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.80' (VARIABLE (
-INTEGER 4 ()) 0 121 ())) ('h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 38
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81'
-(VARIABLE (INTEGER 4 ()) 0 122 ())) ('h5global.eq.82' (VARIABLE (
-INTEGER 4 ()) 0 38 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 123 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 38 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 124 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 38 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 125 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 38
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.85'
-(VARIABLE (INTEGER 4 ()) 0 126 ())) ('h5global.eq.86' (VARIABLE (
-INTEGER 4 ()) 0 38 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 127 ())) ('h5global.eq.87' (
-VARIABLE (INTEGER 4 ()) 0 38 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 128 ())) (
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 38 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.88' (VARIABLE (
-INTEGER 4 ()) 0 129 ())) ('h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 38
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.89'
-(VARIABLE (INTEGER 4 ()) 0 130 ())) ('h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 38 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 131 ())) ('h5global.eq.91' (
-VARIABLE (INTEGER 4 ()) 0 38 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 132 ())) (
-'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 36 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.92' (VARIABLE (
-INTEGER 4 ()) 0 133 ())) ('h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 36
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93'
-(VARIABLE (INTEGER 4 ()) 0 134 ())) ('h5global.eq.94' (VARIABLE (
-INTEGER 4 ()) 0 36 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 135 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 36 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 136 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 36 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 137 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 36
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.97'
-(VARIABLE (INTEGER 4 ()) 0 138 ())) ('h5global.eq.98' (VARIABLE (
-INTEGER 4 ()) 0 36 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 139 ())) ('h5global.eq.99' (
-VARIABLE (INTEGER 4 ()) 0 36 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 140 ())) (
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 36 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.100' (VARIABLE (
-INTEGER 4 ()) 0 141 ())) ('h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0
-36 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 142 ())) ('h5global.eq.102'
-(VARIABLE (INTEGER 4 ()) 0 36 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 143 ())) (
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 36 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.103' (VARIABLE (
-INTEGER 4 ()) 0 144 ())) ('h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0
-36 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 145 ())) ('h5global.eq.105'
-(VARIABLE (INTEGER 4 ()) 0 36 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 146 ())) (
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 36 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.106' (VARIABLE (
-INTEGER 4 ()) 0 147 ())) ('h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0
-36 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 148 ())) ('h5global.eq.108'
-(VARIABLE (INTEGER 4 ()) 0 36 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 149 ())) (
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 36 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.109' (VARIABLE (
-INTEGER 4 ()) 0 150 ())) ('h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0
-36 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 151 ())) ('h5global.eq.111'
-(VARIABLE (INTEGER 4 ()) 0 36 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 152 ())) (
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 36 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.112' (VARIABLE (
-INTEGER 4 ()) 0 153 ())) ('h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0
-36 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 154 ())) ('h5global.eq.114'
-(VARIABLE (INTEGER 4 ()) 0 22 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 155 ())) (
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 22 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.115' (VARIABLE (
-INTEGER 4 ()) 0 156 ())) ('h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0
-22 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 157 ())) ('h5global.eq.117'
-(VARIABLE (INTEGER 4 ()) 0 22 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 158 ())) (
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 22 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.118' (VARIABLE (
-INTEGER 4 ()) 0 159 ())) ('h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0
-22 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 160 ())) ('h5global.eq.120'
-(VARIABLE (INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 161 ())) (
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.121' (VARIABLE (
-INTEGER 4 ()) 0 162 ())) ('h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0
-26 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 163 ())) ('h5global.eq.123'
-(VARIABLE (INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 164 ())) (
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.124' (VARIABLE (
-INTEGER 4 ()) 0 165 ())) ('h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0
-26 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 166 ())) ('h5global.eq.126'
-(VARIABLE (INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 167 ())) (
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 32 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.127' (VARIABLE (
-INTEGER 4 ()) 0 168 ())) ('h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0
-32 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 169 ())) ('h5global.eq.129'
-(VARIABLE (INTEGER 4 ()) 0 32 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 170 ())) (
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 32 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.130' (VARIABLE (
-INTEGER 4 ()) 0 171 ())) ('h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0
-32 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 172 ())) ('h5global.eq.132'
-(VARIABLE (INTEGER 4 ()) 0 32 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 173 ())) (
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 32 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.133' (VARIABLE (
-INTEGER 4 ()) 0 174 ())) ('h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0
-33 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 175 ())) ('h5global.eq.135'
-(VARIABLE (INTEGER 4 ()) 0 33 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 176 ())) (
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 33 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.136' (VARIABLE (
-INTEGER 4 ()) 0 177 ())) ('h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0
-33 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 178 ())) ('h5global.eq.138'
-(VARIABLE (INTEGER 4 ()) 0 33 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 179 ())) (
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 33 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.139' (VARIABLE (
-INTEGER 4 ()) 0 180 ())) ('h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0
-33 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 181 ())) ('h5global.eq.141'
-(VARIABLE (INTEGER 4 ()) 0 33 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 182 ())) (
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 33 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.142' (VARIABLE (
-INTEGER 4 ()) 0 183 ())) ('h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0
-33 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 184 ())) ('h5global.eq.144'
-(VARIABLE (INTEGER 4 ()) 0 33 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ())) (
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 31 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.145' (VARIABLE (
-INTEGER 4 ()) 0 186 ())) ('h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0
-31 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1))))
-'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 187 ())) ('h5global.eq.147'
-(VARIABLE (INTEGER 4 ()) 0 31 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 188 ())) (
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 31 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.148' (VARIABLE (
-INTEGER 4 ()) 0 189 ())) ('h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0
-31 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 190 ())) ('h5global.eq.150'
-(VARIABLE (INTEGER 4 ()) 0 31 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 191 ())) (
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 31 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.151' (VARIABLE (
-INTEGER 4 ()) 0 192 ())) ('h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0
-31 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 193 ())) ('h5global.eq.153'
-(VARIABLE (INTEGER 4 ()) 0 31 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 194 ())) (
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 31 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.154' (VARIABLE (
-INTEGER 4 ()) 0 195 ())) ('h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0
-31 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 196 ())) ('h5global.eq.156'
-(VARIABLE (INTEGER 4 ()) 0 31 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 197 ())) (
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 31 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.157' (VARIABLE (
-INTEGER 4 ()) 0 198 ())) ('h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0
-31 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.159'
-(VARIABLE (INTEGER 4 ()) 0 31 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 200 ())) (
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 31 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.160' (VARIABLE (
-INTEGER 4 ()) 0 201 ())) ('h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0
-31 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 202 ())) ('h5global.eq.162'
-(VARIABLE (INTEGER 4 ()) 0 31 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 203 ())) (
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 31 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.163' (VARIABLE (
-INTEGER 4 ()) 0 204 ())) ('h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0
-31 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 205 ())) ('h5global.eq.165'
-(VARIABLE (INTEGER 4 ()) 0 31 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 206 ())) (
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 31 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.166' (VARIABLE (
-INTEGER 4 ()) 0 207 ())) ('h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0
-34 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.168'
-(VARIABLE (INTEGER 4 ()) 0 34 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 34 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.169' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0
-34 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.171'
-(VARIABLE (INTEGER 4 ()) 0 34 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 34 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.172' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0
-34 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.174'
-(VARIABLE (INTEGER 4 ()) 0 34 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 34 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.175' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0
-34 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.177'
-(VARIABLE (INTEGER 4 ()) 0 34 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 34 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.178' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0
-35 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.180'
-(VARIABLE (INTEGER 4 ()) 0 35 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 35 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.181' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0
-35 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.183'
-(VARIABLE (INTEGER 4 ()) 0 35 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 35 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.184' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0
-35 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.186'
-(VARIABLE (INTEGER 4 ()) 0 35 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 35 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.187' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0
-39 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.189'
-(VARIABLE (INTEGER 4 ()) 0 39 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 39 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.190' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0
-39 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.192'
-(VARIABLE (INTEGER 4 ()) 0 39 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 39 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.193' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0
-39 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.195'
-(VARIABLE (INTEGER 4 ()) 0 39 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 39 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.196' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0
-39 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.198'
-(VARIABLE (INTEGER 4 ()) 0 39 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 39 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.199' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0
-39 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.201'
-(VARIABLE (INTEGER 4 ()) 0 39 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 39 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.202' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0
-39 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.204'
-(VARIABLE (INTEGER 4 ()) 0 39 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 39 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.205' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0
-27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.207'
-(VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.208' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0
-27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.210'
-(VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.211' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0
-27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.213'
-(VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.214' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0
-27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.216'
-(VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.217' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0
-27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.219'
-(VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.220' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0
-27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.222'
-(VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 40 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.223' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0
-40 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.225'
-(VARIABLE (INTEGER 4 ()) 0 40 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 40 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.226' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0
-25 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.228'
-(VARIABLE (INTEGER 4 ()) 0 25 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 25 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.229' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0
-25 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.231'
-(VARIABLE (INTEGER 4 ()) 0 25 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 25 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.232' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0
-25 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.234'
-(VARIABLE (INTEGER 4 ()) 0 25 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 25 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.235' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0
-25 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.237'
-(VARIABLE (INTEGER 4 ()) 0 25 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 25 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.238' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0
-25 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 280 ())))
-
-(40 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-281 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-282 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-283 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-284 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-285 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-286 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-287 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-288 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-289 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-290 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-227 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-223 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-220 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-291 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-292 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-293 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-294 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-41 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-42 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-200 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-187 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-186 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-188 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-205 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-207 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-194 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-206 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-295 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-190 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-191 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-192 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-193 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-31 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-196 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-296 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-199 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-197 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-243 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-242 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-198 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-189 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-230 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-297 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '19') () 0 ()
-())
-39 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-231 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-33 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-173 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-298 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-32 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-174 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-180 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-172 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-299 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-178 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-177 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-179 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-183 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-184 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-181 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-171 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-176 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-175 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-170 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-169 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-300 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-34 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-301 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '12') () 0 ()
-())
-218 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-215 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-217 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-213 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-168 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-185 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-195 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-210 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-211 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-35 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9')) 0 () ())
-219 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-161 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-162 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-302 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(UNKNOWN 0 ()) 0 0 () () 0 () ())
-164 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-163 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-303 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-216 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-26 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-304 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6') () 0 () ())
-22 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-166 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-305 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7') () 0 () ())
-167 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-160 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-159 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-37 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-158 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-306 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-148 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-157 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-156 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-149 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-153 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-151 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-152 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-154 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-155 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-165 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-307 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-36 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-138 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-135 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-150 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-137 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-136 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-140 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-145 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-144 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-133 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-142 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-141 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-147 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-134 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-118 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-308 'h5p' 'h5p' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-146 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-124 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-130 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-113 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-114 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-121 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-120 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-129 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-143 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-132 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-131 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-127 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-38 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-24 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-309 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-122 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-123 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-116 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-117 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-126 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-125 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-115 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-310 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '18') () 0 ()
-())
-128 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-139 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-208 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-311 'h5pclose_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 312 0 (313 314) () 0 () ())
-315 'h5pcreate_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 316 0 (317 318 319 320) () 0 () ())
-321 'h5pexist_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 322 0 (323 324 325 326) () 0 () ())
-327 'h5pequal_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 328 0 (329 330 331 332) () 0 () ())
-333 'h5pfill_value_defined_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 334 0 (335 336 337) () 0 ()
-())
-338 'h5pget_alignment_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 339 0 (340 341 342 343) () 0 () ())
-344 'h5pcreate_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 345 0 (346 347 348) () 0 () ())
-349 'h5pcopy_prop_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 350 0 (351 352 353 354) () 0 () ())
-355 'h5pcopy_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 356 0 (357 358 359) () 0 () ())
-360 'h5pclose_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 361 0 (362 363) () 0 () ())
-364 'h5pall_filters_avail_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 365 0 (366 367 368) () 0 ()
-())
-119 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-369 'h5pget_attr_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 370 0 (371 372 373) () 0 ()
-())
-374 'h5pget_attr_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 375 0 (376 377 378 379) () 0
-() ())
-380 'h5pget_buffer_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 381 0 (382 383 384) () 0 () ())
-385 'h5pget_btree_ratios_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 386 0 (387 388 389 390 391)
-() 0 () ())
-2 'h5pget_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 392 0 (393 394 395 396) () 0 () ())
-397 'h5pget_chunk_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 398 0 (399 400 401 402 403)
-() 0 () ())
-404 'h5pget_chunk_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 405 0 (406 407 408 409) () 0 () ())
-410 'h5pget_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 411 0 (412 413 414) () 0 () ())
-415 'h5pget_char_encoding_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 416 0 (417 418 419) () 0 ()
-())
-420 'h5pget_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 421 0 (422 423 424 425 426 427) () 0 () ())
-428 'h5pget_class_parent_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 429 0 (430 431 432) () 0 ()
-())
-433 'h5pget_class_name_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 434 0 (435 436 437 438) () 0 () ())
-439 'h5pget_create_inter_group_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 440 0 (441 442 443) () 0 ()
-())
-444 'h5pget_edc_check_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 445 0 (446 447 448) () 0 () ())
-449 'h5pget_driver_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 450 0 (451 452 453) () 0 () ())
-454 'h5pget_external_count_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 455 0 (456 457 458) () 0 ()
-())
-459 'h5pget_external_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 460 0 (461 462 463 464 465 466 467) () 0
-() ())
-468 'h5pget_est_link_info_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 469 0 (470 471 472 473) () 0
-() ())
-474 'h5pget_data_transform_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 475 0 (476
-477 478 479) () 0 () ())
-480 'h5pget_copy_object_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 481 0 (482 483 484) () 0 ()
-())
-485 'h5pget_fapl_direct_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 486 0 (487 488 489 490 491)
-() 0 () ())
-492 'h5pget_fapl_family_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 493 0 (494 495 496 497) () 0
-() ())
-498 'h5pget_fapl_core_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 499 0 (500 501 502 503) () 0 () ())
-504 'h5pget_fill_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 505 0 (506 507 508) () 0 () ())
-509 'h5pget_fclose_degree_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 510 0 (511 512 513) () 0 ()
-())
-5 'h5pget_fill_value_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 514 0 (515 516 517 518) () 0
-() ())
-7 'h5pget_fill_value_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 519 0 (520 521 522 523) () 0
-() ())
-524 'h5pget_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 525 0 (526 527 528 529 530 531 532 533
-534) () 0 () ())
-535 'h5pget_filter_by_id_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 536 0 (537 538 539 540 541
-542 543 544) () 0 () ())
-6 'h5pget_fill_value_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 545 0 (546 547 548 549) () 0
-() ())
-550 'h5pget_hyper_vector_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 551 0 (552 553 554) () 0 ()
-())
-4 'h5pget_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 555 0 (556 557 558 559) () 0 () ())
-560 'h5pget_istore_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 561 0 (562 563 564) () 0 () ())
-565 'h5pget_gc_references_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 566 0 (567 568 569) () 0 ()
-())
-570 'h5pget_link_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 571 0 (572 573 574) () 0 ()
-())
-575 'h5pget_layout_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 576 0 (577 578 579) () 0 () ())
-580 'h5pget_meta_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 581 0 (582 583 584) () 0 ()
-())
-585 'h5pget_local_heap_size_hint_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 586 0 (587 588 589) () 0 ()
-())
-590 'h5pget_nlinks_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 591 0 (592 593 594) () 0 () ())
-595 'h5pget_nfilters_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 596 0 (597 598 599) () 0 () ())
-600 'h5pget_obj_track_times_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 601 0 (602 603 604) () 0 ()
-())
-605 'h5pget_nprops_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 606 0 (607 608 609) () 0 () ())
-610 'h5pget_sieve_buf_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 611 0 (612 613 614) () 0 ()
-())
-615 'h5pget_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 616 0 (617 618 619 620) () 0 () ())
-621 'h5pget_sizes_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 622 0 (623 624 625 626) () 0 () ())
-3 'h5pget_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 627 0 (628 629 630 631) () 0 () ())
-632 'h5pget_small_data_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 633 0 (634 635 636) () 0 ()
-())
-637 'h5pget_preserve_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 638 0 (639 640 641) () 0 () ())
-642 'h5pget_userblock_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 643 0 (644 645 646) () 0 () ())
-10 'h5pinsert_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 647 0 (648 649 650 651 652) () 0 () ())
-9 'h5pinsert_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 653 0 (654 655 656 657 658) () 0 () ())
-8 'h5pinsert_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 659 0 (660 661 662 663 664) () 0 () ())
-665 'h5pmodify_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 666 0 (667 668 669 670 671 672) () 0 ()
-())
-13 'h5pregister_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 673 0 (674 675 676 677 678) () 0 () ())
-11 'h5pregister_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 679 0 (680 681 682 683 684) () 0 () ())
-685 'h5premove_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 686 0 (687 688 689) () 0 () ())
-690 'h5pset_alloc_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 691 0 (692 693 694) () 0 () ())
-695 'h5pset_alignment_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 696 0 (697 698 699 700) () 0 () ())
-701 'h5premove_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 702 0 (703 704 705) () 0 () ())
-12 'h5pregister_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 706 0 (707 708 709 710 711) () 0 () ())
-712 'h5pisa_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 713 0 (714 715 716 717) () 0 () ())
-718 'h5pget_version_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 719 0 (720 721 722 723
-724 725) () 0 () ())
-726 'h5pget_sym_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 727 0 (728 729 730 731) () 0 () ())
-732 'h5pget_link_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 733 0 (734 735 736 737) () 0
-() ())
-738 'h5pset_attr_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 739 0 (740 741 742) () 0 ()
-())
-743 'h5pset_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 744 0 (745 746 747 748 749 750) () 0 () ())
-17 'h5pset_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 751 0 (752 753 754 755) () 0 () ())
-756 'h5pset_buffer_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 757 0 (758 759 760) () 0 () ())
-761 'h5pset_char_encoding_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 762 0 (763 764 765) () 0 ()
-())
-766 'h5pset_chunk_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 767 0 (768 769 770 771) () 0 () ())
-772 'h5pset_create_inter_group_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 773 0 (774 775 776) () 0 ()
-())
-777 'h5pset_edc_check_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 778 0 (779 780 781) () 0 () ())
-782 'h5pset_deflate_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 783 0 (784 785 786) () 0 () ())
-787 'h5pset_est_link_info_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 788 0 (789 790 791 792) () 0
-() ())
-793 'h5pset_fapl_core_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 794 0 (795 796 797 798) () 0 () ())
-799 'h5pset_family_offset_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 800 0 (801 802 803) () 0 ()
-())
-804 'h5pset_fapl_family_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 805 0 (806 807 808 809) () 0
-() ())
-810 'h5pset_fapl_direct_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 811 0 (812 813 814 815 816)
-() 0 () ())
-817 'h5pset_external_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 818 0 (819 820 821 822 823) () 0 () ())
-824 'h5pset_data_transform_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 825 0 (826 827 828) () 0 ()
-())
-829 'h5pset_fapl_sec2_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 830 0 (831 832) () 0 () ())
-833 'h5pset_fapl_split_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 834 0 (835 836 837 838 839 840) () 0 ()
-())
-14 'h5pset_fill_value_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 841 0 (842 843 844 845) () 0
-() ())
-846 'h5pset_fill_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 847 0 (848 849 850) () 0 () ())
-851 'h5pset_fclose_degree_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 852 0 (853 854 855) () 0 ()
-())
-856 'h5pset_fapl_stdio_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 857 0 (858 859) () 0 () ())
-20 'h5pset_fapl_multi_s' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 860 0 (861 862 863) () 0 () ())
-21 'h5pset_fapl_multi_l' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 864 0 (865 866 867 868 869 870 871) () 0
-() ())
-16 'h5pset_fill_value_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 872 0 (873 874 875 876) () 0
-() ())
-15 'h5pset_fill_value_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 877 0 (878 879 880 881) () 0
-() ())
-882 'h5pset_fletcher32_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 883 0 (884 885) () 0 () ())
-886 'h5pset_hyper_vector_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 887 0 (888 889 890) () 0 ()
-())
-891 'h5pset_gc_references_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 892 0 (893 894 895) () 0 ()
-())
-896 'h5pset_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 897 0 (898 899 900 901 902 903) () 0 ()
-())
-904 'h5pset_layout_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 905 0 (906 907 908) () 0 () ())
-909 'h5pset_libver_bounds_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 910 0 (911 912 913 914) () 0
-() ())
-915 'h5pset_istore_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 916 0 (917 918 919) () 0 () ())
-920 'h5pset_link_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 921 0 (922 923 924) () 0 ()
-())
-925 'h5pset_link_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 926 0 (927 928 929 930) () 0
-() ())
-19 'h5pset_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 931 0 (932 933 934 935) () 0 () ())
-936 'h5pset_copy_object_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 937 0 (938 939 940) () 0 ()
-())
-941 'h5pset_chunk_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 942 0 (943 944 945 946 947)
-() 0 () ())
-948 'h5pset_nlinks_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 949 0 (950 951 952) () 0 () ())
-953 'h5pset_preserve_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 954 0 (955 956 957) () 0 () ())
-958 'h5pset_obj_track_times_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 959 0 (960 961 962) () 0 ()
-())
-18 'h5pset_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 963 0 (964 965 966 967) () 0 () ())
-968 'h5pset_nbit_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 969 0 (970 971) () 0 () ())
-972 'h5pset_meta_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 973 0 (974 975 976) () 0 ()
-())
-977 'h5pset_shared_mesg_index_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 978 0 (979 980 981 982 983)
-() 0 () ())
-984 'h5pset_shared_mesg_nindexes_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 985 0 (986 987 988) () 0 ()
-())
-989 'h5pset_shuffle_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 990 0 (991 992) () 0 () ())
-993 'h5pset_sizes_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 994 0 (995 996 997 998) () 0 () ())
-999 'h5pset_sym_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1000 0 (1001 1002 1003 1004) () 0 () ())
-1005 'h5pset_szip_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1006 0 (1007 1008 1009 1010) () 0 () ())
-1011 'h5punregister_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1012 0 (1013 1014 1015) () 0 () ())
-1016 'h5pset_userblock_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1017 0 (1018 1019 1020) () 0 () ())
-1021 'h5pset_small_data_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1022 0 (1023 1024 1025) () 0
-() ())
-1026 'h5pset_sieve_buf_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1027 0 (1028 1029 1030) () 0
-() ())
-112 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1031 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-28 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-111 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-30 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-108 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-110 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-95 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-91 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1032 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'20') () 0 () ())
-104 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-93 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-102 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-94 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-92 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1033 'h5pset_scaleoffset_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1034 0 (1035 1036 1037 1038)
-() 0 () ())
-1039 'h5pset_local_heap_size_hint_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1040 0 (1041 1042 1043) () 0
-() ())
-1044 'h5pset_btree_ratios_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1045 0 (1046 1047 1048 1049
-1050) () 0 () ())
-103 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-96 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-106 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-100 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-107 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-101 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-97 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-85 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-59 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-105 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-109 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-83 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-99 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-58 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-65 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-57 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1051 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'34') () 0 () ())
-23 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-88 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-266 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-265 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-89 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-264 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-267 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-278 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-90 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-269 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-270 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-268 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-272 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-273 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-68 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-69 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-79 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-78 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-77 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-80 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-84 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-67 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-74 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-274 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-75 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-71 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-261 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-72 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-70 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-82 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-76 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-258 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-73 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-263 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-262 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-81 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-66 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-98 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-62 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-87 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-60 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-86 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-64 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-63 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-51 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-49 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-45 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-54 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-44 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-52 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-55 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-47 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-46 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-53 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1052 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'14') () 0 () ())
-1053 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-48 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-29 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-1054 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-1055 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((1056 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-56 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-43 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1057 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-1058 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((1059 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-50 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1060 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-61 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1061 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-1062 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-1063 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-1064 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-1065 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-25 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-27 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-250 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1066 'h5pset_attr_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1067 0 (1068 1069 1070 1071)
-() 0 () ())
-1072 'h5pget_fapl_multi_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1073 0 (
-1074 1075 1076 1077 1078 1079 1080 1081) () 0 () ())
-1082 'h5pget_alloc_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1083 0 (1084 1085 1086) () 0
-() ())
-640 'flag' '' 638 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-639 'prp_id' '' 638 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-957 'hdferr' '' 954 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-347 'prp_id' '' 345 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-348 'hdferr' '' 345 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-346 'class' '' 345 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-641 'hdferr' '' 638 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-955 'prp_id' '' 954 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-956 'flag' '' 954 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4 ())
-0 0 () () 0 () ())
-906 'prp_id' '' 905 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-569 'hdferr' '' 566 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-907 'layout' '' 905 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-567 'prp_id' '' 566 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-568 'gc_reference' '' 566 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-908 'hdferr' '' 905 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-413 'classtype' '' 411 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-357 'prp_id' '' 356 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-414 'hdferr' '' 411 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-412 'prp_id' '' 411 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-363 'hdferr' '' 361 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-408 'dims' '' 405 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 407 ())) 0 () ())
-770 'dims' '' 767 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 769 ())) 0 () ())
-769 'ndims' '' 767 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-406 'prp_id' '' 405 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-771 'hdferr' '' 767 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-359 'hdferr' '' 356 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-784 'prp_id' '' 783 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-786 'hdferr' '' 783 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-407 'ndims' '' 405 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-523 'hdferr' '' 519 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-522 'fillvalue' '' 519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-879 'type_id' '' 877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-874 'type_id' '' 872 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-521 'type_id' '' 519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-785 'level' '' 783 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-881 'hdferr' '' 877 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-880 'fillvalue' '' 877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-409 'hdferr' '' 405 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-362 'prp_id' '' 361 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-768 'prp_id' '' 767 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-358 'new_prp_id' '' 356 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-876 'hdferr' '' 872 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-520 'prp_id' '' 519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-547 'type_id' '' 545 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-549 'hdferr' '' 545 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-843 'type_id' '' 841 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-845 'hdferr' '' 841 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-844 'fillvalue' '' 841 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () () 0 () ())
-517 'fillvalue' '' 514 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () () 0 () ())
-546 'prp_id' '' 545 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-721 'boot' '' 719 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-518 'hdferr' '' 514 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-878 'prp_id' '' 877 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-548 'fillvalue' '' 545 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-873 'prp_id' '' 872 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-723 'stab' '' 719 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-842 'prp_id' '' 841 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-724 'shhdr' '' 719 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-516 'type_id' '' 514 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-722 'freelist' '' 719 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-875 'fillvalue' '' 872 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1019 'size' '' 1017 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-515 'prp_id' '' 514 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-720 'prp_id' '' 719 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1020 'hdferr' '' 1017 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-995 'prp_id' '' 994 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-997 'sizeof_size' '' 994 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-996 'sizeof_addr' '' 994 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-998 'hdferr' '' 994 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-644 'prp_id' '' 643 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-645 'block_size' '' 643 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-625 'sizeof_size' '' 622 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1004 'hdferr' '' 1000 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-626 'hdferr' '' 622 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1018 'prp_id' '' 1017 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-623 'prp_id' '' 622 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-729 'ik' '' 727 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-1001 'prp_id' '' 1000 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1002 'ik' '' 1000 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-731 'hdferr' '' 727 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-730 'lk' '' 727 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-1003 'lk' '' 1000 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-624 'sizeof_addr' '' 622 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-646 'hdferr' '' 643 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-564 'hdferr' '' 561 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-918 'ik' '' 916 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-919 'hdferr' '' 916 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-917 'prp_id' '' 916 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-697 'prp_id' '' 696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-728 'prp_id' '' 727 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-563 'ik' '' 561 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-453 'hdferr' '' 450 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-452 'driver' '' 450 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-451 'prp_id' '' 450 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-562 'prp_id' '' 561 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-859 'hdferr' '' 857 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-858 'prp_id' '' 857 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-832 'hdferr' '' 830 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-340 'prp_id' '' 339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-699 'alignment' '' 696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-700 'hdferr' '' 696 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-831 'prp_id' '' 830 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-798 'hdferr' '' 794 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-341 'threshold' '' 339 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-797 'backing_store' '' 794 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-500 'prp_id' '' 499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-343 'hdferr' '' 339 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-795 'prp_id' '' 794 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-502 'backing_store' '' 499 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-503 'hdferr' '' 499 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-501 'increment' '' 499 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-808 'memb_plist' '' 805 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-807 'memb_size' '' 805 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-809 'hdferr' '' 805 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-806 'prp_id' '' 805 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-496 'memb_plist' '' 493 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-497 'hdferr' '' 493 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-495 'memb_size' '' 493 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-745 'prp_id' '' 744 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-750 'hdferr' '' 744 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-422 'prp_id' '' 421 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-748 'rdcc_nbytes' '' 744 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-747 'rdcc_nelmts' '' 744 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-423 'mdc_nelmts' '' 421 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-494 'prp_id' '' 493 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-424 'rdcc_nelmts' '' 421 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-749 'rdcc_w0' '' 744 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-426 'rdcc_w0' '' 421 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-425 'rdcc_nbytes' '' 421 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-746 'mdc_nelmts' '' 744 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-836 'meta_ext' '' 834 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-839 'raw_plist' '' 834 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-838 'raw_ext' '' 834 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-837 'meta_plist' '' 834 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-427 'hdferr' '' 421 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-894 'gc_reference' '' 892 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-835 'prp_id' '' 834 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-895 'hdferr' '' 892 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-458 'hdferr' '' 455 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-457 'count' '' 455 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-578 'layout' '' 576 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-577 'prp_id' '' 576 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-893 'prp_id' '' 892 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-840 'hdferr' '' 834 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-899 'filter' '' 897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-898 'prp_id' '' 897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-900 'flags' '' 897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-579 'hdferr' '' 576 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-796 'increment' '' 794 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-902 'cd_values' '' 897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-903 'hdferr' '' 897 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-598 'nfilters' '' 596 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-599 'hdferr' '' 596 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-529 'cd_nelmts' '' 525 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-528 'flags' '' 525 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-530 'cd_values' '' 525 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-527 'filter_number' '' 525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-526 'prp_id' '' 525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-533 'filter_id' '' 525 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-532 'name' '' 525 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-534 'hdferr' '' 525 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-597 'prp_id' '' 596 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-820 'name' '' 818 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-531 'namelen' '' 525 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-821 'offset' '' 818 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-823 'hdferr' '' 818 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-654 'plist' '' 653 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-822 'bytes' '' 818 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-901 'cd_nelmts' '' 897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-342 'alignment' '' 339 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-698 'threshold' '' 696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-725 'hdferr' '' 719 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-655 'name' '' 653 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-657 'value' '' 653 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-656 'size' '' 653 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-464 'name' '' 460 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-463 'name_size' '' 460 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-466 'bytes' '' 460 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-467 'hdferr' '' 460 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1046 'prp_id' '' 1045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-465 'offset' '' 460 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-462 'idx' '' 460 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-819 'prp_id' '' 818 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-461 'prp_id' '' 460 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1048 'middle' '' 1045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-1047 'left' '' 1045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-456 'prp_id' '' 455 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1049 'right' '' 1045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-658 'hdferr' '' 653 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-391 'hdferr' '' 386 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-390 'right' '' 386 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-389 'middle' '' 386 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-855 'hdferr' '' 852 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-758 'plist_id' '' 757 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-388 'left' '' 386 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-513 'hdferr' '' 510 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-512 'degree' '' 510 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-387 'prp_id' '' 386 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-854 'degree' '' 852 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-511 'fapl_id' '' 510 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-330 'plist2_id' '' 328 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-332 'hdferr' '' 328 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-331 'flag' '' 328 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-329 'plist1_id' '' 328 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-382 'plist_id' '' 381 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-759 'size' '' 757 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-853 'fapl_id' '' 852 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-383 'size' '' 381 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-384 'hdferr' '' 381 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-760 'hdferr' '' 757 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1050 'hdferr' '' 1045 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-693 'flag' '' 691 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-335 'plist_id' '' 334 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-692 'plist_id' '' 691 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-337 'hdferr' '' 334 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1085 'flag' '' 1083 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1086 'hdferr' '' 1083 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1024 'size' '' 1022 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-1023 'plist_id' '' 1022 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-849 'flag' '' 847 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-1025 'hdferr' '' 1022 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-506 'plist_id' '' 505 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1084 'plist_id' '' 1083 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-850 'hdferr' '' 847 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-336 'flag' '' 334 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-694 'hdferr' '' 691 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-974 'plist_id' '' 973 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-508 'hdferr' '' 505 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-848 'plist_id' '' 847 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-976 'hdferr' '' 973 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-584 'hdferr' '' 581 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-583 'size' '' 581 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-975 'size' '' 973 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-582 'plist_id' '' 581 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-612 'plist_id' '' 611 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1030 'hdferr' '' 1027 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1028 'plist_id' '' 1027 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-932 'prp_id' '' 931 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-554 'hdferr' '' 551 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-553 'size' '' 551 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-634 'plist_id' '' 633 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-552 'plist_id' '' 551 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-614 'hdferr' '' 611 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-636 'hdferr' '' 633 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-888 'plist_id' '' 887 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-890 'hdferr' '' 887 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-889 'size' '' 887 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-935 'hdferr' '' 931 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-752 'prp_id' '' 751 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-964 'prp_id' '' 963 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-966 'value' '' 963 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-934 'value' '' 931 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-933 'name' '' 931 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-967 'hdferr' '' 963 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-635 'size' '' 633 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-613 'size' '' 611 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-1029 'size' '' 1027 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-754 'value' '' 751 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-965 'name' '' 963 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-755 'hdferr' '' 751 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-556 'prp_id' '' 555 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-558 'value' '' 555 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-753 'name' '' 751 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-629 'name' '' 627 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-631 'hdferr' '' 627 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-630 'value' '' 627 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-394 'name' '' 392 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-559 'hdferr' '' 555 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-395 'value' '' 392 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-628 'prp_id' '' 627 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-324 'name' '' 322 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-326 'hdferr' '' 322 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-325 'flag' '' 322 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-393 'prp_id' '' 392 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-617 'prp_id' '' 616 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-619 'size' '' 616 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-620 'hdferr' '' 616 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-618 'name' '' 616 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-608 'nprops' '' 606 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-435 'prp_id' '' 434 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-431 'parent_id' '' 429 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-609 'hdferr' '' 606 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-323 'prp_id' '' 322 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-396 'hdferr' '' 392 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-557 'name' '' 555 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-436 'name' '' 434 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-437 'size' '' 434 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-607 'prp_id' '' 606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-714 'plist' '' 713 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-430 'prp_id' '' 429 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-715 'pclass' '' 713 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-432 'hdferr' '' 429 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-687 'plid' '' 686 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-354 'hdferr' '' 350 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-717 'hdferr' '' 713 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-352 'src_id' '' 350 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-353 'name' '' 350 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-351 'dst_id' '' 350 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-716 'flag' '' 713 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-689 'hdferr' '' 686 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-313 'class' '' 312 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1015 'hdferr' '' 1012 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1014 'name' '' 1012 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-317 'parent' '' 316 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-319 'class' '' 316 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-318 'name' '' 316 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-674 'class' '' 673 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1013 'class' '' 1012 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-688 'name' '' 686 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-438 'hdferr' '' 434 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-314 'hdferr' '' 312 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-320 'hdferr' '' 316 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-675 'name' '' 673 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-707 'class' '' 706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-677 'value' '' 673 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-709 'size' '' 706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-710 'value' '' 706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-680 'class' '' 679 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-711 'hdferr' '' 706 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-676 'size' '' 673 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-683 'value' '' 679 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-682 'size' '' 679 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-649 'name' '' 647 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-708 'name' '' 706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-648 'plist' '' 647 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-650 'size' '' 647 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-862 'relax' '' 860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-863 'hdferr' '' 860 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-661 'name' '' 659 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-652 'hdferr' '' 647 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-651 'value' '' 647 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-684 'hdferr' '' 679 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-681 'name' '' 679 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-678 'hdferr' '' 673 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-663 'value' '' 659 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-992 'hdferr' '' 990 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-664 'hdferr' '' 659 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-660 'plist' '' 659 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-991 'prp_id' '' 990 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-446 'prp_id' '' 445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-885 'hdferr' '' 883 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-779 'prp_id' '' 778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-780 'flag' '' 778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-781 'hdferr' '' 778 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-448 'hdferr' '' 445 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-447 'flag' '' 445 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-866 'memb_map' '' 864 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0') (OP (
-INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 175 ()) (CONSTANT (
-INTEGER 4 ()) 0 '1'))) 0 () ())
-802 'offset' '' 800 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-803 'hdferr' '' 800 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-884 'prp_id' '' 883 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-868 'memb_name' '' 864 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0
-'0') (OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 175 ()) (
-CONSTANT (INTEGER 4 ()) 0 '1'))) 0 () ())
-867 'memb_fapl' '' 864 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 175 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-870 'relax' '' 864 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-869 'memb_addr' '' 864 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0') (
-OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 175 ()) (CONSTANT (
-INTEGER 4 ()) 0 '1'))) 0 () ())
-801 'prp_id' '' 800 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-865 'prp_id' '' 864 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1076 'memb_fapl' '' 1073 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 175 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-1075 'memb_map' '' 1073 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 175 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-861 'prp_id' '' 860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1078 'memb_addr' '' 1073 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0') (
-OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 175 ()) (CONSTANT (
-INTEGER 4 ()) 0 '1'))) 0 () ())
-1080 'hdferr' '' 1073 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1081 'maxlen_out' '' 1073 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1007 'prp_id' '' 1006 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1074 'prp_id' '' 1073 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1079 'relax' '' 1073 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-1077 'memb_name' '' 1073 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0
-'0') (OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 175 ()) (
-CONSTANT (INTEGER 4 ()) 0 '1'))) 0 () ())
-871 'hdferr' '' 864 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-662 'size' '' 659 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-1008 'options_mask' '' 1006 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1010 'hdferr' '' 1006 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-367 'flag' '' 365 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-366 'prp_id' '' 365 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1009 'pixels_per_block' '' 1006 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-537 'prp_id' '' 536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-539 'flags' '' 536 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-538 'filter_id' '' 536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-541 'cd_values' '' 536 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-543 'name' '' 536 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-544 'hdferr' '' 536 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-542 'namelen' '' 536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-669 'flags' '' 666 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-540 'cd_nelmts' '' 536 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-368 'hdferr' '' 365 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-671 'cd_values' '' 666 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-672 'hdferr' '' 666 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-704 'filter' '' 702 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-705 'hdferr' '' 702 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-376 'ocpl_id' '' 375 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-667 'prp_id' '' 666 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-703 'prp_id' '' 702 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-668 'filter' '' 666 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-979 'fcpl_id' '' 978 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-378 'min_dense' '' 375 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-379 'hdferr' '' 375 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-377 'max_compact' '' 375 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-742 'hdferr' '' 739 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-987 'nindexes' '' 985 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-986 'plist_id' '' 985 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-741 'crt_order_flags' '' 739 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-373 'hdferr' '' 370 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-981 'mesg_type_flags' '' 978 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-980 'index_num' '' 978 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-983 'hdferr' '' 978 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-982 'min_mesg_size' '' 978 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-740 'ocpl_id' '' 739 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-603 'flag' '' 601 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-604 'hdferr' '' 601 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-372 'crt_order_flags' '' 370 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-912 'low' '' 910 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-913 'high' '' 910 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-911 'fapl_id' '' 910 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-988 'hdferr' '' 985 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-371 'ocpl_id' '' 370 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-923 'crt_order_flags' '' 921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-914 'hdferr' '' 910 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-670 'cd_nelmts' '' 666 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-737 'hdferr' '' 733 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-736 'min_dense' '' 733 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-922 'gcpl_id' '' 921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-735 'max_compact' '' 733 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-734 'gcpl_id' '' 733 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-776 'hdferr' '' 773 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-602 'plist_id' '' 601 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-962 'hdferr' '' 959 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-961 'flag' '' 959 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4 ())
-0 0 () () 0 () ())
-774 'lcpl_id' '' 773 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-960 'plist_id' '' 959 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-763 'plist_id' '' 762 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-775 'crt_intermed_group' '' 773 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-765 'hdferr' '' 762 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-574 'hdferr' '' 571 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-573 'crt_order_flags' '' 571 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-419 'hdferr' '' 416 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-572 'gcpl_id' '' 571 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-484 'hdferr' '' 481 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-418 'encoding' '' 416 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-417 'plist_id' '' 416 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-940 'hdferr' '' 937 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-938 'ocp_plist_id' '' 937 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-939 'copy_options' '' 937 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-479 'size' '' 475 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-478 'hdferr' '' 475 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-483 'copy_options' '' 481 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-482 'ocp_plist_id' '' 481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-477 'expression' '' 475 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-828 'hdferr' '' 825 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-827 'expression' '' 825 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-589 'hdferr' '' 586 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-588 'size_hint' '' 586 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-476 'plist_id' '' 475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-826 'plist_id' '' 825 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1042 'size_hint' '' 1040 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-473 'hdferr' '' 469 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-790 'est_num_entries' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-470 'gcpl_id' '' 469 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-789 'gcpl_id' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-587 'gcpl_id' '' 586 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-791 'est_name_len' '' 788 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-792 'hdferr' '' 788 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-816 'hdferr' '' 811 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-472 'est_name_len' '' 469 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-471 'est_num_entries' '' 469 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1041 'gcpl_id' '' 1040 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-928 'max_compact' '' 926 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-930 'hdferr' '' 926 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-929 'min_dense' '' 926 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1043 'hdferr' '' 1040 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-488 'alignment' '' 486 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-813 'alignment' '' 811 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-815 'cbuf_size' '' 811 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1069 'max_compact' '' 1067 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-927 'gcpl_id' '' 926 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-814 'block_size' '' 811 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-489 'block_size' '' 486 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-491 'hdferr' '' 486 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1071 'hdferr' '' 1067 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-812 'fapl_id' '' 811 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-490 'cbuf_size' '' 486 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-971 'hdferr' '' 969 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1068 'ocpl_id' '' 1067 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-970 'plist_id' '' 969 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1070 'min_dense' '' 1067 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1038 'hdferr' '' 1034 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1037 'scale_factor' '' 1034 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-443 'hdferr' '' 440 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-442 'crt_intermed_group' '' 440 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-951 'nlinks' '' 949 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-1036 'scale_type' '' 1034 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-950 'lapl_id' '' 949 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-952 'hdferr' '' 949 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-487 'fapl_id' '' 486 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-764 'encoding' '' 762 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-924 'hdferr' '' 921 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1035 'plist_id' '' 1034 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-593 'nlinks' '' 591 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-594 'hdferr' '' 591 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-945 'rdcc_nbytes' '' 942 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-947 'hdferr' '' 942 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-592 'lapl_id' '' 591 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-946 'rdcc_w0' '' 942 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-944 'rdcc_nslots' '' 942 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-401 'rdcc_nbytes' '' 398 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-403 'hdferr' '' 398 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-399 'dapl_id' '' 398 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-400 'rdcc_nslots' '' 398 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-943 'dapl_id' '' 942 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-402 'rdcc_w0' '' 398 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-441 'lcpl_id' '' 440 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-507 'flag' '' 505 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-)
-
-('h5pget_alloc_time_f' 0 1082 'h5p_string_create_f' 0 119
-'h5g_storage_type_dense_f' 0 208 'h5d_fill_time_error_f' 0 195
-'floating_types_len' 0 295 '__convert_i4_i8' 0 281 'floating_types' 0 40
-'h5d_alloc_time_early_f' 0 202 'h5d_alloc_time_default_f' 0 203
-'h5_iter_unknown_f' 0 224 'fortran_integer_1' 0 293 'fortran_double' 0
-283 'fortran_integer' 0 282 'fortran_real_4' 0 292 'fortran_integer_2' 0
-289 'fortran_real' 0 288 'fortran_integer_4' 0 285 'fortran_integer_8' 0
-284 'fortran_real_12' 0 287 'fortran_real_16' 0 286 'h5_integer_kind' 0
-291 'h5_index_crt_order_f' 0 226 'fortran_real_8' 0 290 'h5_index_n_f' 0
-225 'h5_index_unknown_f' 0 228 'h5_index_name_f' 0 227 'h5_iter_dec_f' 0
-222 'h5_iter_native_f' 0 221 'h5_iter_n_f' 0 220 'h5_iter_inc_f' 0 223
-'h5_szip_ec_om_f' 0 42 'h5_real_kind' 0 294 'h5_szip_nn_om_f' 0 41
-'h5d_contiguous_f' 0 206 'h5d_compact_f' 0 207 'h5d_alloc_time_late_f' 0
-201 'h5d_alloc_time_error_f' 0 204 'h5d_alloc_time_incr_f' 0 200
-'h5d_chunked_f' 0 205 'h5d_chunk_cache_nslots_dflt_f' 0 188
-'h5d_chunk_cache_nbytes_dflt_f' 0 187 'h5d_chunk_cache_w0_dflt_f' 0 186
-'h5d_fill_time_alloc_f' 0 194 'h5f_close_weak_f' 0 238
-'h5d_fill_value_user_defined_f' 0 189 'h5d_fill_time_never_f' 0 193
-'h5d_fill_value_error_f' 0 192 'h5d_fill_value_default_f' 0 190
-'h5d_fill_value_undefined_f' 0 191 'h5d_space_sts_not_allocated_f' 0 198
-'h5d_space_sts_error_f' 0 199 'h5d_flags_len' 0 296 'h5d_flags' 0 31
-'h5d_space_sts_allocated_f' 0 196 'h5f_close_default_f' 0 239
-'h5f_acc_trunc_f' 0 244 'h5f_acc_rdonly_f' 0 245 'h5f_acc_debug_f' 0 242
-'h5d_space_sts_part_allocated_f' 0 197 'h5f_acc_excl_f' 0 243
-'h5f_acc_rdwr_f' 0 246 'h5f_close_semi_f' 0 237 'h5f_close_strong_f' 0
-236 'h5fd_mpio_independent_f' 0 185 'h5fd_mem_default_f' 0 182
-'h5fd_hid_flags_len' 0 299 'h5fd_core_f' 0 174 'h5f_obj_file_f' 0 235
-'h5f_libver_latest_f' 0 229 'h5f_flags' 0 39 'h5f_flags_len' 0 297
-'h5f_libver_earliest_f' 0 230 'h5f_obj_datatype_f' 0 232
-'h5f_obj_dataset_f' 0 234 'h5f_obj_all_f' 0 231 'h5f_scope_global_f' 0
-240 'h5f_obj_group_f' 0 233 'h5f_scope_local_f' 0 241 'h5fd_hid_flags' 0
-32 'h5fd_flags_len' 0 298 'h5fd_family_f' 0 173 'h5fd_flags' 0 33
-'h5fd_log_f' 0 172 'h5fd_mem_btree_f' 0 180 'h5fd_mem_ntypes_f' 0 175
-'h5fd_mem_nolist_f' 0 183 'h5fd_mem_draw_f' 0 179 'h5fd_mem_lheap_f' 0
-177 'h5fd_mem_gheap_f' 0 178 'h5fd_mem_ohdr_f' 0 176 'h5fd_mpio_f' 0 171
-'h5fd_mem_super_f' 0 181 'h5fd_mpio_collective_f' 0 184 'h5fd_stdio_f' 0
-168 'h5fd_sec2_f' 0 169 'h5fd_multi_f' 0 170 'h5g_link_hard_f' 0 213
-'h5g_dataset_f' 0 217 'h5fortran_types' 0 300 'h5g_link_error_f' 0 214
-'h5g_group_f' 0 218 'h5g_flags_len' 0 301 'h5g_flags' 0 34 'h5g_link_f'
-0 215 'h5g_link_soft_f' 0 212 'h5g_storage_type_compact_f' 0 209
-'h5o_hdr_attr_crt_order_track_f' 0 139 'h5o_copy_without_attr_flag_f' 0
-150 'h5i_datatype_f' 0 165 'h5g_type_f' 0 216 'h5g_storage_type_unknown_f'
-0 211 'h5g_storage_type_symbol_table_f' 0 210 'h5generic_flags_len' 0
-303 'h5g_unknown_f' 0 219 'h5generic_flags' 0 35 'h5i_dataset_f' 0 163
-'h5global' 0 302 'h5i_attr_f' 0 162 'h5i_badid_f' 0 161 'h5i_dataspace_f'
-0 164 'h5l_link_class_t_vers_f' 0 155 'h5i_file_f' 0 167 'h5i_flags_len'
-0 305 'h5i_flags' 0 26 'h5i_group_f' 0 166 'h5l_flags' 0 22
-'h5l_flags_len' 0 304 'h5o_copy_shallow_hierarchy_f' 0 154
-'h5o_copy_expand_ext_link_f' 0 152 'h5l_same_loc_f' 0 156
-'h5l_type_external_f' 0 157 'h5l_type_error_f' 0 160 'h5o_copy_all_f' 0
-148 'h5lib_flags_len' 0 306 'h5l_type_soft_f' 0 158 'h5l_type_hard_f' 0
-159 'h5lib_flags' 0 37 'h5o_copy_expand_reference_f' 0 151
-'h5o_copy_expand_soft_link_f' 0 153 'h5o_copy_preserve_null_flag_f' 0
-149 'h5o_hdr_all_flags_f' 0 135 'h5o_flags' 0 36 'h5o_flags_len' 0 307
-'h5o_hdr_attr_crt_order_index_f' 0 138 'h5p_file_mount_f' 0 128
-'h5p_default_f' 0 127 'h5o_shmesg_pline_flag_f' 0 143
-'h5o_shmesg_max_nindexes_f' 0 134 'h5o_shmesg_all_flag_f' 0 141
-'h5o_hdr_chunk0_size_f' 0 140 'h5o_hdr_attr_store_phase_cha_f' 0 137
-'h5o_hdr_store_times_f' 0 136 'h5o_shmesg_attr_flag_f' 0 142
-'h5o_shmesg_max_list_size_f' 0 133 'h5o_shmesg_fill_flag_f' 0 144
-'h5o_shmesg_dtype_flag_f' 0 145 'h5o_shmesg_none_flag_f' 0 147
-'h5p_dataset_xfer_f' 0 129 'h5p_crt_order_indexed_f' 0 114
-'h5o_shmesg_sdspace_flag_f' 0 146 'h5p' 0 308 'h5p_attribute_create_f' 0
-118 'h5p_crt_order_tracked_f' 0 113 'h5p_dataset_create_f' 0 130
-'h5p_dataset_access_f' 0 124 'h5p_datatype_access_f' 0 120
-'h5p_datatype_create_f' 0 121 'h5p_file_access_f' 0 131
-'h5p_file_create_f' 0 132 'h5p_flags_len' 0 310 'h5p_flags_int_len' 0
-309 'h5p_flags_int' 0 24 'h5p_flags' 0 38 'h5p_link_access_f' 0 115
-'h5p_group_create_f' 0 123 'h5p_group_access_f' 0 122
-'h5p_object_create_f' 0 125 'h5p_object_copy_f' 0 117 'h5p_link_create_f'
-0 116 'h5p_root_f' 0 126 'h5pall_filters_avail_f' 0 364 'h5pclose_f' 0
-360 'h5pclose_class_f' 0 311 'h5pcopy_f' 0 355 'h5pcopy_prop_f' 0 349
-'h5pcreate_f' 0 344 'h5pcreate_class_f' 0 315 'h5pget_alignment_f' 0 338
-'h5pfill_value_defined_f' 0 333 'h5pequal_f' 0 327 'h5pexist_f' 0 321
-'h5pget_fapl_multi_f' 0 1072 'h5pget_fapl_core_f' 0 498
-'h5pget_copy_object_f' 0 480 'h5pget_class_name_f' 0 433 'h5pget_cache_f'
-0 420 'h5pget_btree_ratios_f' 0 385 'h5pget_attr_phase_change_f' 0 374
-'h5pget_attr_creation_order_f' 0 369 'h5pget_buffer_f' 0 380
-'h5pget_char_encoding_f' 0 415 'h5pget_char' 0 2 'h5pget_class_f' 0 410
-'h5pget_chunk_f' 0 404 'h5pget_chunk_cache_f' 0 397
-'h5pget_class_parent_f' 0 428 'h5pget_data_transform_f' 0 474
-'h5pget_create_inter_group_f' 0 439 'h5pget_est_link_info_f' 0 468
-'h5pget_driver_f' 0 449 'h5pget_edc_check_f' 0 444 'h5pget_external_f' 0
-459 'h5pget_external_count_f' 0 454 'h5pget_fapl_family_f' 0 492
-'h5pget_fapl_direct_f' 0 485 'h5pset_attr_phase_change_f' 0 1066
-'h5pset_attr_creation_order_f' 0 738 'h5pget_link_phase_change_f' 0 732
-'h5pget_layout_f' 0 575 'h5pget_gc_references_f' 0 565
-'h5pget_fill_value_real' 0 6 'h5pget_fill_value_char' 0 5
-'h5pget_fclose_degree_f' 0 509 'h5pget_fill_time_f' 0 504
-'h5pget_fill_value_integer' 0 7 'h5pget_filter_by_id_f' 0 535
-'h5pget_filter_f' 0 524 'h5pget_istore_k_f' 0 560 'h5pget_integer' 0 4
-'h5pget_hyper_vector_size_f' 0 550 'h5pget_link_creation_order_f' 0 570
-'h5pget_sym_k_f' 0 726 'h5pget_preserve_f' 0 637 'h5pget_nprops_f' 0 605
-'h5pget_nfilters_f' 0 595 'h5pget_local_heap_size_hint_f' 0 585
-'h5pget_meta_block_size_f' 0 580 'h5pget_nlinks_f' 0 590
-'h5pget_obj_track_times_f' 0 600 'h5pget_small_data_block_size_f' 0 632
-'h5pget_real' 0 3 'h5pget_sizes_f' 0 621 'h5pget_size_f' 0 615
-'h5pget_sieve_buf_size_f' 0 610 'h5pget_version_f' 0 718
-'h5pget_userblock_f' 0 642 'h5pisa_class_f' 0 712 'h5pinsert_char' 0 8
-'h5pinsert_real' 0 9 'h5pinsert_integer' 0 10 'h5pregister_real' 0 12
-'h5pregister_char' 0 11 'h5pmodify_filter_f' 0 665 'h5pregister_integer'
-0 13 'h5premove_filter_f' 0 701 'h5premove_f' 0 685 'h5pset_alignment_f'
-0 695 'h5pset_alloc_time_f' 0 690 'h5t_std_u16le' 0 252
-'h5s_select_append_f' 0 98 'h5pset_btree_ratios_f' 0 1044
-'h5pset_local_heap_size_hint_f' 0 1039 'h5pset_chunk_cache_f' 0 941
-'h5pset_char_encoding_f' 0 761 'h5pset_buffer_f' 0 756 'h5pset_char' 0
-17 'h5pset_cache_f' 0 743 'h5pset_copy_object_f' 0 936 'h5pset_chunk_f'
-0 766 'h5pset_integer' 0 19 'h5pset_fapl_multi_l' 0 21
-'h5pset_data_transform_f' 0 824 'h5pset_create_inter_group_f' 0 772
-'h5pset_external_f' 0 817 'h5pset_est_link_info_f' 0 787
-'h5pset_deflate_f' 0 782 'h5pset_edc_check_f' 0 777 'h5pset_fapl_direct_f'
-0 810 'h5pset_family_offset_f' 0 799 'h5pset_fapl_core_f' 0 793
-'h5pset_fapl_family_f' 0 804 'h5pset_fapl_multi_s' 0 20
-'h5pset_fapl_stdio_f' 0 856 'h5pset_fapl_split_f' 0 833
-'h5pset_fapl_sec2_f' 0 829 'h5pset_fclose_degree_f' 0 851
-'h5pset_fill_time_f' 0 846 'h5pset_fill_value_char' 0 14 'h5pset_filter_f'
-0 896 'h5pset_fill_value_real' 0 15 'h5pset_fill_value_integer' 0 16
-'h5pset_gc_references_f' 0 891 'h5pset_fletcher32_f' 0 882
-'h5pset_hyper_vector_size_f' 0 886 'h5pset_link_phase_change_f' 0 925
-'h5pset_link_creation_order_f' 0 920 'h5pset_istore_k_f' 0 915
-'h5pset_libver_bounds_f' 0 909 'h5pset_layout_f' 0 904
-'h5pset_scaleoffset_f' 0 1033 'h5pset_meta_block_size_f' 0 972
-'h5pset_nbit_f' 0 968 'h5pset_real' 0 18 'h5pset_obj_track_times_f' 0
-958 'h5pset_nlinks_f' 0 948 'h5pset_preserve_f' 0 953
-'h5s_sel_hyperslabs_f' 0 92 'h5s_all_f' 0 104 'h5r_dataset_region_f' 0
-111 'h5pset_sieve_buf_size_f' 0 1026 'h5pset_shuffle_f' 0 989
-'h5pset_shared_mesg_nindexes_f' 0 984 'h5pset_shared_mesg_index_f' 0 977
-'h5pset_small_data_block_size_f' 0 1021 'h5pset_sizes_f' 0 993
-'h5pset_userblock_f' 0 1016 'h5pset_szip_f' 0 1005 'h5pset_sym_k_f' 0
-999 'h5punregister_f' 0 1011 'h5r_flags' 0 28 'h5r_flags_len' 0 1031
-'h5r_object_f' 0 112 'h5s_flags_len' 0 1032 'h5s_flags' 0 30
-'h5s_sel_all_f' 0 91 'h5s_scalar_f' 0 110 'h5s_null_f' 0 108
-'h5s_sel_error_f' 0 95 'h5s_sel_none_f' 0 94 'h5s_select_and_f' 0 102
-'h5s_sel_points_f' 0 93 'h5t_cset_ascii_f' 0 66 'h5s_select_nota_f' 0 99
-'h5s_select_invalid_f' 0 96 'h5s_select_noop_f' 0 103 'h5t_compound_f' 0
-83 'h5s_simple_f' 0 109 'h5s_select_prepend_f' 0 97 'h5s_select_notb_f'
-0 100 'h5s_select_or_f' 0 106 'h5s_select_xor_f' 0 101 'h5s_select_set_f'
-0 107 'h5s_unlimited_f' 0 105 'h5t_array_f' 0 59 'h5t_bitfield_f' 0 85
-'h5t_enum_f' 0 81 'h5t_dir_descend_f' 0 57 'h5t_cset_utf8_f' 0 65
-'h5t_dir_ascend_f' 0 58 'h5t_std_ref_obj' 0 276 'h5t_native_character' 0
-277 'h5t_ieee_f32be' 0 267 'h5t_float_f' 0 88 'h5t_flags' 0 23
-'h5t_flags_len' 0 1051 'h5t_ieee_f64le' 0 264 'h5t_ieee_f64be' 0 265
-'h5t_ieee_f32le' 0 266 'h5t_integer_f' 0 89 'h5t_std_i64le' 0 256
-'h5t_pad_error_f' 0 73 'h5t_native_integer_1' 0 274 'h5t_native_double'
-0 278 'h5t_native_integer' 0 280 'h5t_pad_background_f' 0 74
-'h5t_norm_none_f' 0 67 'h5t_norm_implied_f' 0 69 'h5t_native_integer_2'
-0 273 'h5t_native_integer_4' 0 272 'h5t_native_real_16' 0 268
-'h5t_native_real' 0 279 'h5t_native_integer_8' 0 271 'h5t_native_real_4'
-0 270 'h5t_native_real_8' 0 269 'h5t_no_class_f' 0 90 'h5t_norm_msbset_f'
-0 68 'h5t_opaque_f' 0 84 'h5t_order_le_f' 0 80 'h5t_order_be_f' 0 79
-'h5t_order_none_f' 0 77 'h5t_order_vax_f' 0 78 'h5t_std_i32be' 0 259
-'h5t_pad_zero_f' 0 76 'h5t_pad_one_f' 0 75 'h5t_reference_f' 0 82
-'h5t_sgn_error_f' 0 70 'h5t_sgn_2_f' 0 71 'h5t_std_i16le' 0 260
-'h5t_sgn_none_f' 0 72 'h5t_std_i16be' 0 261 'h5t_std_i32le' 0 258
-'h5t_std_i64be' 0 257 'h5t_std_ref_dsetreg' 0 275 'h5t_std_i8le' 0 262
-'h5t_std_i8be' 0 263 'h5t_std_u16be' 0 253 'h5t_std_u32le' 0 250
-'h5t_std_u32be' 0 251 'integer_types' 0 27 'h5t_str_error_f' 0 61
-'h5t_std_u8be' 0 255 'h5t_std_u64le' 0 248 'h5t_std_u64be' 0 249
-'h5t_std_u8le' 0 254 'hssize_t' 0 1060 'h5z_disable_edc_f' 0 50
-'h5t_str_nullpad_f' 0 63 'h5t_str_nullterm_f' 0 64 'h5t_string_f' 0 86
-'h5t_string' 0 247 'h5t_str_spacepad_f' 0 62 'h5t_vlen_f' 0 60
-'h5t_time_f' 0 87 'hobj_ref_t_f' 0 1058 'h5z_filter_all_f' 0 43
-'h5z_enable_edc_f' 0 49 'h5z_error_edc_f' 0 51 'h5z_filter_error_f' 0 56
-'h5z_filter_decode_enabled_f' 0 44 'h5z_filter_deflate_f' 0 54
-'h5z_filter_encode_enabled_f' 0 45 'hdset_reg_ref_t_f' 0 1055 'h5z_flags'
-0 29 'h5z_filter_shuffle_f' 0 53 'h5z_filter_none_f' 0 55
-'h5z_filter_fletcher32_f' 0 52 'h5z_flag_optional_f' 0 46
-'h5z_filter_szip_f' 0 47 'h5z_no_edc_f' 0 48 'h5z_flags_len' 0 1052
-'haddr_t' 0 1053 'hid_t' 0 1054 'hsize_t' 0 1057 'predef_types' 0 25
-'object_namelen_default_f' 0 1062 'integer_types_len' 0 1061
-'ref_reg_buf_len' 0 1065 'predef_types_len' 0 1063 'size_t' 0 1064)
diff --git a/interfaces/ext/hdf5/h5r.mod b/interfaces/ext/hdf5/h5r.mod
deleted file mode 100644
index 6fe64e4..0000000
--- a/interfaces/ext/hdf5/h5r.mod
+++ /dev/null
@@ -1,1458 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5Rff.f90 on Mon Feb 14 14:35:50 2011
-If you edit this, you'll get what you deserve.
-
-(() () () () () () ()
-() () () () () () () () () () () () () ())
-
-()
-
-(('h5rdereference_f' '' 2 3) ('h5rcreate_f' '' 4 5) ('h5rget_name_f' ''
-6 7) ('h5rget_object_type_f' '' 8) ('h5rget_region_f' '' 9))
-
-(('h5l_flags' 10 0) ('h5t_flags' 11 0) ('h5p_flags_int' 12 0) (
-'predefined_types' 13 0) ('h5i_flags' 14 0) ('integer_types' 15 0) (
-'h5r_flags' 16 0) ('h5z_flags' 17 0) ('h5s_flags' 18 0) ('h5d_flags' 19
-0) ('h5fd_hid_flags' 20 0) ('h5fd_flags' 21 0) ('h5g_flags' 22 0) (
-'h5generic_flags' 23 0) ('h5o_flags' 24 0) ('h5lib_flags' 25 0) (
-'h5p_flags' 26 0) ('h5f_flags' 27 0) ('floating_types' 28 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 25 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 29 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 25 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 30 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 17 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 31 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 32 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 33 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 17 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 34 ())) ('h5global.eq.6' (VARIABLE (INTEGER 4
-()) 0 17 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 35 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 36 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 37 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 38 ())) ('h5global.eq.10' (VARIABLE (INTEGER 4
-()) 0 17 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 39 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 40 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 41 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 17
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.13'
-(VARIABLE (INTEGER 4 ()) 0 42 ())) ('h5global.eq.14' (VARIABLE (INTEGER
-4 ()) 0 17 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 43 ())) ('h5global.eq.15' (
-VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 44 ())) (
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '34') 1)))) 'h5global.eq.16' (VARIABLE (
-INTEGER 4 ()) 0 45 ())) ('h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 11
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '33') 1)))) 'h5global.eq.17'
-(VARIABLE (INTEGER 4 ()) 0 46 ())) ('h5global.eq.18' (VARIABLE (INTEGER
-4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '32') 1))))
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 47 ())) ('h5global.eq.19' (
-VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '31') 1)))) 'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 48 ())) (
-'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '30') 1)))) 'h5global.eq.20' (VARIABLE (
-INTEGER 4 ()) 0 49 ())) ('h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 11
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21'
-(VARIABLE (INTEGER 4 ()) 0 50 ())) ('h5global.eq.22' (VARIABLE (INTEGER
-4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 51 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 52 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 53 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 11
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1)))) 'h5global.eq.25'
-(VARIABLE (INTEGER 4 ()) 0 54 ())) ('h5global.eq.26' (VARIABLE (INTEGER
-4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '24') 1))))
-'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 55 ())) ('h5global.eq.27' (
-VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '23') 1)))) 'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 56 ())) (
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.28' (VARIABLE (
-INTEGER 4 ()) 0 57 ())) ('h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 11
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.29'
-(VARIABLE (INTEGER 4 ()) 0 58 ())) ('h5global.eq.30' (VARIABLE (INTEGER
-4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 59 ())) ('h5global.eq.31' (
-VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 60 ())) (
-'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.32' (VARIABLE (
-INTEGER 4 ()) 0 61 ())) ('h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 11
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33'
-(VARIABLE (INTEGER 4 ()) 0 62 ())) ('h5global.eq.34' (VARIABLE (INTEGER
-4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 63 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 64 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 65 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 11
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.37'
-(VARIABLE (INTEGER 4 ()) 0 66 ())) ('h5global.eq.38' (VARIABLE (INTEGER
-4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 67 ())) ('h5global.eq.39' (
-VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 68 ())) (
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.40' (VARIABLE (
-INTEGER 4 ()) 0 69 ())) ('h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 11
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.41'
-(VARIABLE (INTEGER 4 ()) 0 70 ())) ('h5global.eq.42' (VARIABLE (INTEGER
-4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 71 ())) ('h5global.eq.43' (
-VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 72 ())) (
-'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.44' (VARIABLE (
-INTEGER 4 ()) 0 73 ())) ('h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 11
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45'
-(VARIABLE (INTEGER 4 ()) 0 74 ())) ('h5global.eq.46' (VARIABLE (INTEGER
-4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 75 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 76 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 77 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 11
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.49'
-(VARIABLE (INTEGER 4 ()) 0 78 ())) ('h5global.eq.50' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 79 ())) ('h5global.eq.51' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 80 ())) (
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.52' (VARIABLE (
-INTEGER 4 ()) 0 81 ())) ('h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.53'
-(VARIABLE (INTEGER 4 ()) 0 82 ())) ('h5global.eq.54' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 83 ())) ('h5global.eq.55' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 84 ())) (
-'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.56' (VARIABLE (
-INTEGER 4 ()) 0 85 ())) ('h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57'
-(VARIABLE (INTEGER 4 ()) 0 86 ())) ('h5global.eq.58' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 87 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 88 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 89 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.61'
-(VARIABLE (INTEGER 4 ()) 0 90 ())) ('h5global.eq.62' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 91 ())) ('h5global.eq.63' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 92 ())) (
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.64' (VARIABLE (
-INTEGER 4 ()) 0 93 ())) ('h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.65'
-(VARIABLE (INTEGER 4 ()) 0 94 ())) ('h5global.eq.66' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 95 ())) ('h5global.eq.67' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 96 ())) (
-'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.68' (VARIABLE (
-INTEGER 4 ()) 0 97 ())) ('h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69'
-(VARIABLE (INTEGER 4 ()) 0 98 ())) ('h5global.eq.70' (VARIABLE (INTEGER
-4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 99 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 100 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 101 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 12
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.73'
-(VARIABLE (INTEGER 4 ()) 0 102 ())) ('h5global.eq.74' (VARIABLE (
-INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 103 ())) ('h5global.eq.75' (
-VARIABLE (INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 104 ())) (
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.76' (VARIABLE (
-INTEGER 4 ()) 0 105 ())) ('h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 26
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.77'
-(VARIABLE (INTEGER 4 ()) 0 106 ())) ('h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 107 ())) ('h5global.eq.79' (
-VARIABLE (INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 108 ())) (
-'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.80' (VARIABLE (
-INTEGER 4 ()) 0 109 ())) ('h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 26
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81'
-(VARIABLE (INTEGER 4 ()) 0 110 ())) ('h5global.eq.82' (VARIABLE (
-INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 111 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 112 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 113 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 26
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.85'
-(VARIABLE (INTEGER 4 ()) 0 114 ())) ('h5global.eq.86' (VARIABLE (
-INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 115 ())) ('h5global.eq.87' (
-VARIABLE (INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 116 ())) (
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.88' (VARIABLE (
-INTEGER 4 ()) 0 117 ())) ('h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 26
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.89'
-(VARIABLE (INTEGER 4 ()) 0 118 ())) ('h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 119 ())) ('h5global.eq.91' (
-VARIABLE (INTEGER 4 ()) 0 26 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 120 ())) (
-'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.92' (VARIABLE (
-INTEGER 4 ()) 0 121 ())) ('h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 24
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93'
-(VARIABLE (INTEGER 4 ()) 0 122 ())) ('h5global.eq.94' (VARIABLE (
-INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 123 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 124 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 125 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 24
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.97'
-(VARIABLE (INTEGER 4 ()) 0 126 ())) ('h5global.eq.98' (VARIABLE (
-INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 127 ())) ('h5global.eq.99' (
-VARIABLE (INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 128 ())) (
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.100' (VARIABLE (
-INTEGER 4 ()) 0 129 ())) ('h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0
-24 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 130 ())) ('h5global.eq.102'
-(VARIABLE (INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 131 ())) (
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.103' (VARIABLE (
-INTEGER 4 ()) 0 132 ())) ('h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0
-24 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 133 ())) ('h5global.eq.105'
-(VARIABLE (INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 134 ())) (
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.106' (VARIABLE (
-INTEGER 4 ()) 0 135 ())) ('h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0
-24 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 136 ())) ('h5global.eq.108'
-(VARIABLE (INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 137 ())) (
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.109' (VARIABLE (
-INTEGER 4 ()) 0 138 ())) ('h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0
-24 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 139 ())) ('h5global.eq.111'
-(VARIABLE (INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 140 ())) (
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 24 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.112' (VARIABLE (
-INTEGER 4 ()) 0 141 ())) ('h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0
-24 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 142 ())) ('h5global.eq.114'
-(VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 143 ())) (
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.115' (VARIABLE (
-INTEGER 4 ()) 0 144 ())) ('h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0
-10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 145 ())) ('h5global.eq.117'
-(VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 146 ())) (
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.118' (VARIABLE (
-INTEGER 4 ()) 0 147 ())) ('h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0
-10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 148 ())) ('h5global.eq.120'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 149 ())) (
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.121' (VARIABLE (
-INTEGER 4 ()) 0 150 ())) ('h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 151 ())) ('h5global.eq.123'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 152 ())) (
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.124' (VARIABLE (
-INTEGER 4 ()) 0 153 ())) ('h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 154 ())) ('h5global.eq.126'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 155 ())) (
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.127' (VARIABLE (
-INTEGER 4 ()) 0 156 ())) ('h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 157 ())) ('h5global.eq.129'
-(VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 158 ())) (
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.130' (VARIABLE (
-INTEGER 4 ()) 0 159 ())) ('h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 160 ())) ('h5global.eq.132'
-(VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 161 ())) (
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.133' (VARIABLE (
-INTEGER 4 ()) 0 162 ())) ('h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0
-21 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 163 ())) ('h5global.eq.135'
-(VARIABLE (INTEGER 4 ()) 0 21 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 164 ())) (
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 21 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.136' (VARIABLE (
-INTEGER 4 ()) 0 165 ())) ('h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0
-21 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 166 ())) ('h5global.eq.138'
-(VARIABLE (INTEGER 4 ()) 0 21 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 167 ())) (
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 21 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.139' (VARIABLE (
-INTEGER 4 ()) 0 168 ())) ('h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0
-21 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 169 ())) ('h5global.eq.141'
-(VARIABLE (INTEGER 4 ()) 0 21 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 170 ())) (
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 21 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.142' (VARIABLE (
-INTEGER 4 ()) 0 171 ())) ('h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0
-21 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 172 ())) ('h5global.eq.144'
-(VARIABLE (INTEGER 4 ()) 0 21 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 173 ())) (
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.145' (VARIABLE (
-INTEGER 4 ()) 0 174 ())) ('h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1))))
-'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 175 ())) ('h5global.eq.147'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 176 ())) (
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.148' (VARIABLE (
-INTEGER 4 ()) 0 177 ())) ('h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 178 ())) ('h5global.eq.150'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 179 ())) (
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.151' (VARIABLE (
-INTEGER 4 ()) 0 180 ())) ('h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 181 ())) ('h5global.eq.153'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 182 ())) (
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.154' (VARIABLE (
-INTEGER 4 ()) 0 183 ())) ('h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 184 ())) ('h5global.eq.156'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 185 ())) (
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.157' (VARIABLE (
-INTEGER 4 ()) 0 186 ())) ('h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 187 ())) ('h5global.eq.159'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 188 ())) (
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.160' (VARIABLE (
-INTEGER 4 ()) 0 189 ())) ('h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 190 ())) ('h5global.eq.162'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 191 ())) (
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.163' (VARIABLE (
-INTEGER 4 ()) 0 192 ())) ('h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 193 ())) ('h5global.eq.165'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 194 ())) (
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.166' (VARIABLE (
-INTEGER 4 ()) 0 195 ())) ('h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0
-22 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 196 ())) ('h5global.eq.168'
-(VARIABLE (INTEGER 4 ()) 0 22 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 197 ())) (
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 22 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.169' (VARIABLE (
-INTEGER 4 ()) 0 198 ())) ('h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0
-22 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.171'
-(VARIABLE (INTEGER 4 ()) 0 22 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 200 ())) (
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 22 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.172' (VARIABLE (
-INTEGER 4 ()) 0 201 ())) ('h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0
-22 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 202 ())) ('h5global.eq.174'
-(VARIABLE (INTEGER 4 ()) 0 22 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 203 ())) (
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 22 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.175' (VARIABLE (
-INTEGER 4 ()) 0 204 ())) ('h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0
-22 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 205 ())) ('h5global.eq.177'
-(VARIABLE (INTEGER 4 ()) 0 22 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 206 ())) (
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 22 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.178' (VARIABLE (
-INTEGER 4 ()) 0 207 ())) ('h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0
-23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.180'
-(VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.181' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0
-23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.183'
-(VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.184' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0
-23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.186'
-(VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 23 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.187' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0
-27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.189'
-(VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.190' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0
-27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.192'
-(VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.193' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0
-27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.195'
-(VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.196' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0
-27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.198'
-(VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.199' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0
-27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.201'
-(VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.202' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0
-27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.204'
-(VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 27 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.205' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.207'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.208' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.210'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.211' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.213'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.214' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.216'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.217' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.219'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.220' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.222'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 28 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.223' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0
-28 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.225'
-(VARIABLE (INTEGER 4 ()) 0 28 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 28 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.226' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.228'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.229' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.231'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.232' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.234'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.235' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.237'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.238' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 268 ())))
-
-(28 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-269 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-270 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-271 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-272 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-273 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-274 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-275 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-276 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-277 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-278 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-215 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-216 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-213 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-211 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-208 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-210 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-280 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-281 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-282 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-29 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-30 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-191 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-188 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-192 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-175 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-174 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-176 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-193 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-189 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-195 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-194 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-190 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-178 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-179 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-180 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-181 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-19 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-184 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-284 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-187 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-185 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-231 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-230 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-227 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-186 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-177 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-218 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-285 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '19') () 0 ()
-())
-27 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-219 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-220 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-217 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-223 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-21 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-161 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-286 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-20 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-162 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-168 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-160 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-166 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-165 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-167 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-171 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-172 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-169 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-159 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-164 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-163 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-170 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-158 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-157 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-288 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-22 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-289 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '12') () 0 ()
-())
-206 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-205 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-197 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-200 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-156 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-173 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-183 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-198 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-199 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-23 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9')) 0 () ())
-207 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-149 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-150 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-290 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(UNKNOWN 0 ()) 0 0 () () 0 () ())
-152 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-151 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-291 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-204 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-14 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-292 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6') () 0 () ())
-10 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-154 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-293 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7') () 0 () ())
-155 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-148 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-147 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-25 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-146 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-294 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-136 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-145 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-144 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-137 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-141 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-139 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-140 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-142 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-143 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-153 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-295 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-24 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-126 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-123 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-138 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-125 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-124 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-128 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-133 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-132 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-121 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-130 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-129 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-135 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-122 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-106 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-134 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-112 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-118 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-101 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-102 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-109 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-108 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-117 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-131 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-120 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-119 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-115 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-26 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-12 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-296 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-110 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-111 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-104 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-105 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-114 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-113 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-103 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-297 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '18') () 0 ()
-())
-116 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-127 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-196 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-298 'h5r' 'h5r' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-100 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-299 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2') () 0 () ())
-16 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-99 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-5 'h5rcreate_object_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 300 0 (301 302 303 304) () 0 () ())
-4 'h5rcreate_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 305 0 (306 307 308 309 310) () 0 () ())
-2 'h5rdereference_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 311 0 (312 313 314 315) () 0
-() ())
-3 'h5rdereference_object_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 316 0 (317 318 319 320) () 0
-() ())
-6 'h5rget_name_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 321 0 (322 323 324 325
-326) () 0 () ())
-7 'h5rget_name_object_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 327 0 (328 329 330 331
-332) () 0 () ())
-9 'h5rget_region_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 333 0 (334 335 336 337) () 0
-() ())
-18 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-96 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-98 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-83 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-79 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-338 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '20') () 0 ()
-())
-92 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-8 'h5rget_object_type_obj_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 339 0 (340 341 342 343) () 0
-() ())
-81 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-90 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-82 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-80 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-91 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-84 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-94 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-88 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-95 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-89 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-85 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-73 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-47 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-93 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-97 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-71 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-87 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-46 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-53 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-45 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-344 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '34') () 0 ()
-())
-11 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-76 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-77 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-268 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-266 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-267 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-78 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-258 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-261 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-56 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-57 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-67 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-66 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-65 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-68 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-72 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-55 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-62 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-262 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-63 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-59 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-60 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-58 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-70 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-64 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-61 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-263 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-265 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-264 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-69 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-54 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-86 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-242 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-50 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-75 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-48 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-74 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-52 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-51 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-39 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-37 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-33 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-42 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-32 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-40 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-43 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-35 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-34 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-41 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-345 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '14') () 0 ()
-())
-346 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-36 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-17 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-347 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-348 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((349 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-44 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-31 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-350 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-351 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((352 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-38 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-353 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-49 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-354 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-355 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-356 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-357 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-358 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-13 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-15 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-238 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-107 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-317 'dset_id' '' 316 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-320 'hdferr' '' 316 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-319 'obj_id' '' 316 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-307 'name' '' 305 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-309 'ref' '' 305 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED 348
-()) 0 0 () () 0 () ())
-308 'space_id' '' 305 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-318 'ref' '' 316 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED 351
-()) 0 0 () () 0 () ())
-301 'loc_id' '' 300 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-303 'ref' '' 300 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED 351
-()) 0 0 () () 0 () ())
-302 'name' '' 300 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-304 'hdferr' '' 300 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-306 'loc_id' '' 305 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-310 'hdferr' '' 305 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-334 'dset_id' '' 333 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-312 'dset_id' '' 311 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-314 'obj_id' '' 311 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-313 'ref' '' 311 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED 348
-()) 0 0 () () 0 () ())
-315 'hdferr' '' 311 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-335 'ref' '' 333 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED 348
-()) 0 0 () () 0 () ())
-337 'hdferr' '' 333 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-342 'obj_type' '' 339 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-341 'ref' '' 339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED 351
-()) 0 0 () () 0 () ())
-340 'dset_id' '' 339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-330 'name' '' 327 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-332 'size' '' 327 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-331 'hdferr' '' 327 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-329 'ref' '' 327 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED 351
-()) 0 0 () () 0 () ())
-325 'hdferr' '' 321 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-324 'name' '' 321 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-326 'size' '' 321 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-323 'ref' '' 321 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED 348
-()) 0 0 () () 0 () ())
-322 'loc_id' '' 321 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-328 'loc_id' '' 327 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-343 'hdferr' '' 339 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-336 'space_id' '' 333 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-)
-
-('h5p_string_create_f' 0 107 'h5g_storage_type_dense_f' 0 196
-'h5d_fill_time_error_f' 0 183 'floating_types_len' 0 283 '__convert_i4_i8'
-0 269 'floating_types' 0 28 'h5d_alloc_time_early_f' 0 190
-'h5d_alloc_time_default_f' 0 191 'h5_iter_unknown_f' 0 212
-'fortran_integer_1' 0 281 'fortran_double' 0 271 'fortran_integer' 0 270
-'fortran_real_4' 0 280 'fortran_integer_2' 0 277 'fortran_real' 0 276
-'fortran_integer_4' 0 273 'fortran_integer_8' 0 272 'fortran_real_12' 0
-275 'fortran_real_16' 0 274 'h5_integer_kind' 0 279 'h5_index_crt_order_f'
-0 214 'fortran_real_8' 0 278 'h5_index_n_f' 0 213 'h5_index_unknown_f' 0
-216 'h5_index_name_f' 0 215 'h5_iter_dec_f' 0 210 'h5_iter_native_f' 0
-209 'h5_iter_n_f' 0 208 'h5_iter_inc_f' 0 211 'h5_szip_ec_om_f' 0 30
-'h5_real_kind' 0 282 'h5_szip_nn_om_f' 0 29 'h5d_contiguous_f' 0 194
-'h5d_compact_f' 0 195 'h5d_alloc_time_late_f' 0 189
-'h5d_alloc_time_error_f' 0 192 'h5d_alloc_time_incr_f' 0 188
-'h5d_chunked_f' 0 193 'h5d_chunk_cache_nslots_dflt_f' 0 176
-'h5d_chunk_cache_nbytes_dflt_f' 0 175 'h5d_chunk_cache_w0_dflt_f' 0 174
-'h5d_fill_time_alloc_f' 0 182 'h5f_close_weak_f' 0 226
-'h5d_fill_value_user_defined_f' 0 177 'h5d_fill_time_never_f' 0 181
-'h5d_fill_value_error_f' 0 180 'h5d_fill_value_default_f' 0 178
-'h5d_fill_value_undefined_f' 0 179 'h5d_space_sts_not_allocated_f' 0 186
-'h5d_space_sts_error_f' 0 187 'h5d_flags_len' 0 284 'h5d_flags' 0 19
-'h5d_space_sts_allocated_f' 0 184 'h5f_close_default_f' 0 227
-'h5f_acc_trunc_f' 0 232 'h5f_acc_rdonly_f' 0 233 'h5f_acc_debug_f' 0 230
-'h5d_space_sts_part_allocated_f' 0 185 'h5f_acc_excl_f' 0 231
-'h5f_acc_rdwr_f' 0 234 'h5f_close_semi_f' 0 225 'h5f_close_strong_f' 0
-224 'h5fd_mpio_independent_f' 0 173 'h5fd_mem_default_f' 0 170
-'h5fd_hid_flags_len' 0 287 'h5fd_core_f' 0 162 'h5f_obj_file_f' 0 223
-'h5f_libver_latest_f' 0 217 'h5f_flags' 0 27 'h5f_flags_len' 0 285
-'h5f_libver_earliest_f' 0 218 'h5f_obj_datatype_f' 0 220
-'h5f_obj_dataset_f' 0 222 'h5f_obj_all_f' 0 219 'h5f_scope_global_f' 0
-228 'h5f_obj_group_f' 0 221 'h5f_scope_local_f' 0 229 'h5fd_hid_flags' 0
-20 'h5fd_flags_len' 0 286 'h5fd_family_f' 0 161 'h5fd_flags' 0 21
-'h5fd_log_f' 0 160 'h5fd_mem_btree_f' 0 168 'h5fd_mem_ntypes_f' 0 163
-'h5fd_mem_nolist_f' 0 171 'h5fd_mem_draw_f' 0 167 'h5fd_mem_lheap_f' 0
-165 'h5fd_mem_gheap_f' 0 166 'h5fd_mem_ohdr_f' 0 164 'h5fd_mpio_f' 0 159
-'h5fd_mem_super_f' 0 169 'h5fd_mpio_collective_f' 0 172 'h5fd_stdio_f' 0
-156 'h5fd_sec2_f' 0 157 'h5fd_multi_f' 0 158 'h5g_link_hard_f' 0 201
-'h5g_dataset_f' 0 205 'h5fortran_types' 0 288 'h5g_link_error_f' 0 202
-'h5g_group_f' 0 206 'h5g_flags_len' 0 289 'h5g_flags' 0 22 'h5g_link_f'
-0 203 'h5g_link_soft_f' 0 200 'h5g_storage_type_compact_f' 0 197
-'h5o_hdr_attr_crt_order_track_f' 0 127 'h5o_copy_without_attr_flag_f' 0
-138 'h5i_datatype_f' 0 153 'h5g_type_f' 0 204 'h5g_storage_type_unknown_f'
-0 199 'h5g_storage_type_symbol_table_f' 0 198 'h5generic_flags_len' 0
-291 'h5g_unknown_f' 0 207 'h5generic_flags' 0 23 'h5i_dataset_f' 0 151
-'h5global' 0 290 'h5i_attr_f' 0 150 'h5i_badid_f' 0 149 'h5i_dataspace_f'
-0 152 'h5l_link_class_t_vers_f' 0 143 'h5i_file_f' 0 155 'h5i_flags_len'
-0 293 'h5i_flags' 0 14 'h5i_group_f' 0 154 'h5l_flags' 0 10
-'h5l_flags_len' 0 292 'h5o_copy_shallow_hierarchy_f' 0 142
-'h5o_copy_expand_ext_link_f' 0 140 'h5l_same_loc_f' 0 144
-'h5l_type_external_f' 0 145 'h5l_type_error_f' 0 148 'h5o_copy_all_f' 0
-136 'h5lib_flags_len' 0 294 'h5l_type_soft_f' 0 146 'h5l_type_hard_f' 0
-147 'h5lib_flags' 0 25 'h5o_copy_expand_reference_f' 0 139
-'h5o_copy_expand_soft_link_f' 0 141 'h5o_copy_preserve_null_flag_f' 0
-137 'h5o_hdr_all_flags_f' 0 123 'h5o_flags' 0 24 'h5o_flags_len' 0 295
-'h5o_hdr_attr_crt_order_index_f' 0 126 'h5p_file_mount_f' 0 116
-'h5p_default_f' 0 115 'h5o_shmesg_pline_flag_f' 0 131
-'h5o_shmesg_max_nindexes_f' 0 122 'h5o_shmesg_all_flag_f' 0 129
-'h5o_hdr_chunk0_size_f' 0 128 'h5o_hdr_attr_store_phase_cha_f' 0 125
-'h5o_hdr_store_times_f' 0 124 'h5o_shmesg_attr_flag_f' 0 130
-'h5o_shmesg_max_list_size_f' 0 121 'h5o_shmesg_fill_flag_f' 0 132
-'h5o_shmesg_dtype_flag_f' 0 133 'h5o_shmesg_none_flag_f' 0 135
-'h5p_dataset_xfer_f' 0 117 'h5p_crt_order_indexed_f' 0 102
-'h5o_shmesg_sdspace_flag_f' 0 134 'h5p_attribute_create_f' 0 106
-'h5p_crt_order_tracked_f' 0 101 'h5p_dataset_create_f' 0 118
-'h5p_dataset_access_f' 0 112 'h5p_datatype_access_f' 0 108
-'h5p_datatype_create_f' 0 109 'h5p_file_access_f' 0 119
-'h5p_file_create_f' 0 120 'h5p_flags_len' 0 297 'h5p_flags_int_len' 0
-296 'h5p_flags_int' 0 12 'h5p_flags' 0 26 'h5p_link_access_f' 0 103
-'h5p_group_create_f' 0 111 'h5p_group_access_f' 0 110
-'h5p_object_create_f' 0 113 'h5p_object_copy_f' 0 105 'h5p_link_create_f'
-0 104 'h5p_root_f' 0 114 'h5r_dataset_region_f' 0 99 'h5r' 0 298
-'h5r_flags' 0 16 'h5r_flags_len' 0 299 'h5r_object_f' 0 100
-'h5rcreate_region_f' 0 4 'h5rcreate_object_f' 0 5 'h5t_std_u16le' 0 240
-'h5s_select_append_f' 0 86 'h5s_sel_hyperslabs_f' 0 80
-'h5rget_object_type_obj_f' 0 8 'h5rdereference_object_f' 0 3
-'h5rdereference_region_f' 0 2 'h5rget_name_object_f' 0 7
-'h5rget_name_region_f' 0 6 'h5s_all_f' 0 92 'h5rget_region_region_f' 0 9
-'h5s_flags_len' 0 338 'h5s_flags' 0 18 'h5s_sel_all_f' 0 79 'h5s_scalar_f'
-0 98 'h5s_null_f' 0 96 'h5s_sel_error_f' 0 83 'h5s_sel_none_f' 0 82
-'h5s_select_and_f' 0 90 'h5s_sel_points_f' 0 81 'h5t_cset_ascii_f' 0 54
-'h5s_select_nota_f' 0 87 'h5s_select_invalid_f' 0 84 'h5s_select_noop_f'
-0 91 'h5t_compound_f' 0 71 'h5s_simple_f' 0 97 'h5s_select_prepend_f' 0
-85 'h5s_select_notb_f' 0 88 'h5s_select_or_f' 0 94 'h5s_select_xor_f' 0
-89 'h5s_select_set_f' 0 95 'h5s_unlimited_f' 0 93 'h5t_array_f' 0 47
-'h5t_bitfield_f' 0 73 'h5t_enum_f' 0 69 'h5t_dir_descend_f' 0 45
-'h5t_cset_utf8_f' 0 53 'h5t_dir_ascend_f' 0 46 'h5t_std_ref_obj' 0 264
-'h5t_native_character' 0 265 'h5t_ieee_f32be' 0 255 'h5t_float_f' 0 76
-'h5t_flags' 0 11 'h5t_flags_len' 0 344 'h5t_ieee_f64le' 0 252
-'h5t_ieee_f64be' 0 253 'h5t_ieee_f32le' 0 254 'h5t_integer_f' 0 77
-'h5t_std_i64le' 0 244 'h5t_pad_error_f' 0 61 'h5t_native_integer_1' 0
-262 'h5t_native_double' 0 266 'h5t_native_integer' 0 268
-'h5t_pad_background_f' 0 62 'h5t_norm_none_f' 0 55 'h5t_norm_implied_f'
-0 57 'h5t_native_integer_2' 0 261 'h5t_native_integer_4' 0 260
-'h5t_native_real_16' 0 256 'h5t_native_real' 0 267 'h5t_native_integer_8'
-0 259 'h5t_native_real_4' 0 258 'h5t_native_real_8' 0 257 'h5t_no_class_f'
-0 78 'h5t_norm_msbset_f' 0 56 'h5t_opaque_f' 0 72 'h5t_order_le_f' 0 68
-'h5t_order_be_f' 0 67 'h5t_order_none_f' 0 65 'h5t_order_vax_f' 0 66
-'h5t_std_i32be' 0 247 'h5t_pad_zero_f' 0 64 'h5t_pad_one_f' 0 63
-'h5t_reference_f' 0 70 'h5t_sgn_error_f' 0 58 'h5t_sgn_2_f' 0 59
-'h5t_std_i16le' 0 248 'h5t_sgn_none_f' 0 60 'h5t_std_i16be' 0 249
-'h5t_std_i32le' 0 246 'h5t_std_i64be' 0 245 'h5t_std_ref_dsetreg' 0 263
-'h5t_std_i8le' 0 250 'h5t_std_i8be' 0 251 'h5t_std_u16be' 0 241
-'h5t_std_u32le' 0 238 'h5t_std_u32be' 0 239 'integer_types' 0 15
-'h5t_str_error_f' 0 49 'h5t_std_u8be' 0 243 'h5t_std_u64le' 0 236
-'h5t_std_u64be' 0 237 'h5t_std_u8le' 0 242 'hssize_t' 0 353
-'h5z_disable_edc_f' 0 38 'h5t_str_nullpad_f' 0 51 'h5t_str_nullterm_f' 0
-52 'h5t_string_f' 0 74 'h5t_string' 0 235 'h5t_str_spacepad_f' 0 50
-'h5t_vlen_f' 0 48 'h5t_time_f' 0 75 'hobj_ref_t_f' 0 351
-'h5z_filter_all_f' 0 31 'h5z_enable_edc_f' 0 37 'h5z_error_edc_f' 0 39
-'h5z_filter_error_f' 0 44 'h5z_filter_decode_enabled_f' 0 32
-'h5z_filter_deflate_f' 0 42 'h5z_filter_encode_enabled_f' 0 33
-'hdset_reg_ref_t_f' 0 348 'h5z_flags' 0 17 'h5z_filter_shuffle_f' 0 41
-'h5z_filter_none_f' 0 43 'h5z_filter_fletcher32_f' 0 40
-'h5z_flag_optional_f' 0 34 'h5z_filter_szip_f' 0 35 'h5z_no_edc_f' 0 36
-'h5z_flags_len' 0 345 'haddr_t' 0 346 'hid_t' 0 347 'hsize_t' 0 350
-'predef_types' 0 13 'object_namelen_default_f' 0 355 'integer_types_len'
-0 354 'ref_reg_buf_len' 0 358 'predef_types_len' 0 356 'size_t' 0 357)
diff --git a/interfaces/ext/hdf5/h5s.mod b/interfaces/ext/hdf5/h5s.mod
deleted file mode 100644
index 911d798..0000000
--- a/interfaces/ext/hdf5/h5s.mod
+++ /dev/null
@@ -1,1658 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5Sff.f90 on Mon Feb 14 14:35:50 2011
-If you edit this, you'll get what you deserve.
-
-(() ()
-() () () () () () () () () () () () () () () () () () ())
-
-()
-
-()
-
-(('h5l_flags' 2 0) ('h5t_flags' 3 0) ('h5p_flags_int' 4 0) (
-'predefined_types' 5 0) ('h5i_flags' 6 0) ('integer_types' 7 0) (
-'h5r_flags' 8 0) ('h5z_flags' 9 0) ('h5s_flags' 10 0) ('h5d_flags' 11 0)
-('h5fd_hid_flags' 12 0) ('h5fd_flags' 13 0) ('h5g_flags' 14 0) (
-'h5generic_flags' 15 0) ('h5o_flags' 16 0) ('h5lib_flags' 17 0) (
-'h5p_flags' 18 0) ('h5f_flags' 19 0) ('floating_types' 20 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 21 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 22 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 23 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 24 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 25 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 26 ())) ('h5global.eq.6' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 27 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 28 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 29 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 30 ())) ('h5global.eq.10' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 31 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 32 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 33 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.13'
-(VARIABLE (INTEGER 4 ()) 0 34 ())) ('h5global.eq.14' (VARIABLE (INTEGER
-4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 35 ())) ('h5global.eq.15' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 36 ())) (
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '34') 1)))) 'h5global.eq.16' (VARIABLE (
-INTEGER 4 ()) 0 37 ())) ('h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '33') 1)))) 'h5global.eq.17'
-(VARIABLE (INTEGER 4 ()) 0 38 ())) ('h5global.eq.18' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '32') 1))))
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 39 ())) ('h5global.eq.19' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '31') 1)))) 'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 40 ())) (
-'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '30') 1)))) 'h5global.eq.20' (VARIABLE (
-INTEGER 4 ()) 0 41 ())) ('h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21'
-(VARIABLE (INTEGER 4 ()) 0 42 ())) ('h5global.eq.22' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 43 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 44 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 45 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1)))) 'h5global.eq.25'
-(VARIABLE (INTEGER 4 ()) 0 46 ())) ('h5global.eq.26' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '24') 1))))
-'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 47 ())) ('h5global.eq.27' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '23') 1)))) 'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 48 ())) (
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.28' (VARIABLE (
-INTEGER 4 ()) 0 49 ())) ('h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.29'
-(VARIABLE (INTEGER 4 ()) 0 50 ())) ('h5global.eq.30' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 51 ())) ('h5global.eq.31' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 52 ())) (
-'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.32' (VARIABLE (
-INTEGER 4 ()) 0 53 ())) ('h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33'
-(VARIABLE (INTEGER 4 ()) 0 54 ())) ('h5global.eq.34' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 55 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 56 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 57 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.37'
-(VARIABLE (INTEGER 4 ()) 0 58 ())) ('h5global.eq.38' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 59 ())) ('h5global.eq.39' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 60 ())) (
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.40' (VARIABLE (
-INTEGER 4 ()) 0 61 ())) ('h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.41'
-(VARIABLE (INTEGER 4 ()) 0 62 ())) ('h5global.eq.42' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 63 ())) ('h5global.eq.43' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 64 ())) (
-'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.44' (VARIABLE (
-INTEGER 4 ()) 0 65 ())) ('h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45'
-(VARIABLE (INTEGER 4 ()) 0 66 ())) ('h5global.eq.46' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 67 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 68 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 69 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.49'
-(VARIABLE (INTEGER 4 ()) 0 70 ())) ('h5global.eq.50' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 71 ())) ('h5global.eq.51' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 72 ())) (
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.52' (VARIABLE (
-INTEGER 4 ()) 0 73 ())) ('h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.53'
-(VARIABLE (INTEGER 4 ()) 0 74 ())) ('h5global.eq.54' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 75 ())) ('h5global.eq.55' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 76 ())) (
-'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.56' (VARIABLE (
-INTEGER 4 ()) 0 77 ())) ('h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57'
-(VARIABLE (INTEGER 4 ()) 0 78 ())) ('h5global.eq.58' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 79 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 80 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 81 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.61'
-(VARIABLE (INTEGER 4 ()) 0 82 ())) ('h5global.eq.62' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 83 ())) ('h5global.eq.63' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 84 ())) (
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.64' (VARIABLE (
-INTEGER 4 ()) 0 85 ())) ('h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.65'
-(VARIABLE (INTEGER 4 ()) 0 86 ())) ('h5global.eq.66' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 87 ())) ('h5global.eq.67' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 88 ())) (
-'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.68' (VARIABLE (
-INTEGER 4 ()) 0 89 ())) ('h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69'
-(VARIABLE (INTEGER 4 ()) 0 90 ())) ('h5global.eq.70' (VARIABLE (INTEGER
-4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 91 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 92 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 93 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 4 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.73'
-(VARIABLE (INTEGER 4 ()) 0 94 ())) ('h5global.eq.74' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 95 ())) ('h5global.eq.75' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 96 ())) (
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.76' (VARIABLE (
-INTEGER 4 ()) 0 97 ())) ('h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.77'
-(VARIABLE (INTEGER 4 ()) 0 98 ())) ('h5global.eq.78' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 99 ())) ('h5global.eq.79' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 100 ())) (
-'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.80' (VARIABLE (
-INTEGER 4 ()) 0 101 ())) ('h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81'
-(VARIABLE (INTEGER 4 ()) 0 102 ())) ('h5global.eq.82' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 103 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 104 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 105 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.85'
-(VARIABLE (INTEGER 4 ()) 0 106 ())) ('h5global.eq.86' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 107 ())) ('h5global.eq.87' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 108 ())) (
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.88' (VARIABLE (
-INTEGER 4 ()) 0 109 ())) ('h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.89'
-(VARIABLE (INTEGER 4 ()) 0 110 ())) ('h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 111 ())) ('h5global.eq.91' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 112 ())) (
-'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.92' (VARIABLE (
-INTEGER 4 ()) 0 113 ())) ('h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93'
-(VARIABLE (INTEGER 4 ()) 0 114 ())) ('h5global.eq.94' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 115 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 116 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 117 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.97'
-(VARIABLE (INTEGER 4 ()) 0 118 ())) ('h5global.eq.98' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 119 ())) ('h5global.eq.99' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 120 ())) (
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.100' (VARIABLE (
-INTEGER 4 ()) 0 121 ())) ('h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 122 ())) ('h5global.eq.102'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 123 ())) (
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.103' (VARIABLE (
-INTEGER 4 ()) 0 124 ())) ('h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 125 ())) ('h5global.eq.105'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 126 ())) (
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.106' (VARIABLE (
-INTEGER 4 ()) 0 127 ())) ('h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 128 ())) ('h5global.eq.108'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 129 ())) (
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.109' (VARIABLE (
-INTEGER 4 ()) 0 130 ())) ('h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 131 ())) ('h5global.eq.111'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 132 ())) (
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.112' (VARIABLE (
-INTEGER 4 ()) 0 133 ())) ('h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 134 ())) ('h5global.eq.114'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 135 ())) (
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.115' (VARIABLE (
-INTEGER 4 ()) 0 136 ())) ('h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 2
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 137 ())) ('h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 138 ())) ('h5global.eq.118'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 139 ())) (
-'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.119' (VARIABLE (
-INTEGER 4 ()) 0 140 ())) ('h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120'
-(VARIABLE (INTEGER 4 ()) 0 141 ())) ('h5global.eq.121' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 142 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 143 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 144 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.124'
-(VARIABLE (INTEGER 4 ()) 0 145 ())) ('h5global.eq.125' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 146 ())) ('h5global.eq.126'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 147 ())) (
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.127' (VARIABLE (
-INTEGER 4 ()) 0 148 ())) ('h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 149 ())) ('h5global.eq.129'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 150 ())) (
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.130' (VARIABLE (
-INTEGER 4 ()) 0 151 ())) ('h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 152 ())) ('h5global.eq.132'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 153 ())) (
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.133' (VARIABLE (
-INTEGER 4 ()) 0 154 ())) ('h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 155 ())) ('h5global.eq.135'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 156 ())) (
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.136' (VARIABLE (
-INTEGER 4 ()) 0 157 ())) ('h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 158 ())) ('h5global.eq.138'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 159 ())) (
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.139' (VARIABLE (
-INTEGER 4 ()) 0 160 ())) ('h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 161 ())) ('h5global.eq.141'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 162 ())) (
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.142' (VARIABLE (
-INTEGER 4 ()) 0 163 ())) ('h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 164 ())) ('h5global.eq.144'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 165 ())) (
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.145' (VARIABLE (
-INTEGER 4 ()) 0 166 ())) ('h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1))))
-'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 167 ())) ('h5global.eq.147'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 168 ())) (
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.148' (VARIABLE (
-INTEGER 4 ()) 0 169 ())) ('h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 170 ())) ('h5global.eq.150'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 171 ())) (
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.151' (VARIABLE (
-INTEGER 4 ()) 0 172 ())) ('h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 173 ())) ('h5global.eq.153'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 174 ())) (
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.154' (VARIABLE (
-INTEGER 4 ()) 0 175 ())) ('h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 176 ())) ('h5global.eq.156'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 177 ())) (
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.157' (VARIABLE (
-INTEGER 4 ()) 0 178 ())) ('h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 179 ())) ('h5global.eq.159'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ())) (
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.160' (VARIABLE (
-INTEGER 4 ()) 0 181 ())) ('h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 182 ())) ('h5global.eq.162'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 183 ())) (
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.163' (VARIABLE (
-INTEGER 4 ()) 0 184 ())) ('h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 185 ())) ('h5global.eq.165'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 186 ())) (
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.166' (VARIABLE (
-INTEGER 4 ()) 0 187 ())) ('h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 188 ())) ('h5global.eq.168'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ())) (
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.169' (VARIABLE (
-INTEGER 4 ()) 0 190 ())) ('h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 191 ())) ('h5global.eq.171'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 192 ())) (
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.172' (VARIABLE (
-INTEGER 4 ()) 0 193 ())) ('h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 194 ())) ('h5global.eq.174'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 195 ())) (
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.175' (VARIABLE (
-INTEGER 4 ()) 0 196 ())) ('h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 197 ())) ('h5global.eq.177'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 198 ())) (
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.178' (VARIABLE (
-INTEGER 4 ()) 0 199 ())) ('h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.180'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.181' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.183'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 204 ())) (
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.184' (VARIABLE (
-INTEGER 4 ()) 0 205 ())) ('h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 206 ())) ('h5global.eq.186'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 207 ())) (
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.187' (VARIABLE (
-INTEGER 4 ()) 0 208 ())) ('h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 209 ())) ('h5global.eq.189'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 210 ())) (
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.190' (VARIABLE (
-INTEGER 4 ()) 0 211 ())) ('h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 212 ())) ('h5global.eq.192'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ())) (
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.193' (VARIABLE (
-INTEGER 4 ()) 0 214 ())) ('h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 215 ())) ('h5global.eq.195'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 216 ())) (
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.196' (VARIABLE (
-INTEGER 4 ()) 0 217 ())) ('h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 218 ())) ('h5global.eq.198'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 219 ())) (
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.199' (VARIABLE (
-INTEGER 4 ()) 0 220 ())) ('h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 221 ())) ('h5global.eq.201'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 222 ())) (
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.202' (VARIABLE (
-INTEGER 4 ()) 0 223 ())) ('h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.204'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.205' (VARIABLE (
-INTEGER 4 ()) 0 226 ())) ('h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.207'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 228 ())) (
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.208' (VARIABLE (
-INTEGER 4 ()) 0 229 ())) ('h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 230 ())) ('h5global.eq.210'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 231 ())) (
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.211' (VARIABLE (
-INTEGER 4 ()) 0 232 ())) ('h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 233 ())) ('h5global.eq.213'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 234 ())) (
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.214' (VARIABLE (
-INTEGER 4 ()) 0 235 ())) ('h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.217'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.218' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219'
-(VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.220' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.232'
-(VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.233' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 254 ())) ('h5global.eq.234'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 255 ())) (
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.235' (VARIABLE (
-INTEGER 4 ()) 0 256 ())) ('h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 257 ())) ('h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.238'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.239' (VARIABLE (
-INTEGER 4 ()) 0 260 ())))
-
-(20 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-261 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-262 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-263 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-264 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-265 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-266 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-267 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-268 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-269 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-270 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-207 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-208 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-205 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-206 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-200 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-272 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-273 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-274 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-21 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-22 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-183 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-180 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-184 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-167 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-166 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-168 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-185 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-181 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-187 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-174 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-186 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-170 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-171 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-172 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-173 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-11 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-176 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-179 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-177 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-223 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-216 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-217 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-178 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-169 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-210 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '19') () 0 ()
-())
-19 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-211 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-213 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-220 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-215 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-13 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-153 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-278 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-12 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-154 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-160 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-152 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-158 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-157 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-159 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-163 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-164 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-161 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-151 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-156 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-155 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-162 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-150 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-149 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-14 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-281 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '12') () 0 ()
-())
-198 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-195 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-194 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-197 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-189 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-192 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-193 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-148 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-165 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-218 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-175 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-190 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-191 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-15 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9')) 0 () ())
-199 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-141 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-142 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-282 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(UNKNOWN 0 ()) 0 0 () () 0 () ())
-144 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-143 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-196 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-6 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-284 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6') () 0 () ())
-2 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-146 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-285 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7') () 0 () ())
-147 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-140 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-139 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-17 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-138 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-286 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-128 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-137 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-136 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-129 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-133 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-131 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-132 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-134 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-135 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-145 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-16 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-118 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-115 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-130 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-117 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-116 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-120 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-125 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-124 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-113 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-122 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-121 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-127 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-114 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-98 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-126 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-104 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-110 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-93 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-94 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-101 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-100 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-109 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-123 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-112 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-111 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-107 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-18 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-4 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-288 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-102 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-103 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-96 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-97 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-106 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-105 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-95 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-289 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '18') () 0 ()
-())
-108 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-119 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-188 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-290 'h5s' 'h5s' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-92 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-291 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2') () 0 () ())
-8 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-91 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-10 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-88 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-90 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-75 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-71 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-292 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '20') () 0 ()
-())
-84 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-73 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-82 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-74 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-72 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-83 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-76 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-86 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-80 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-87 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-81 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-77 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-293 'h5sclose_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 294 0 (295 296) () 0 () ())
-297 'h5scopy_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 298 0 (299 300 301) () 0 () ())
-85 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-302 'h5screate_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 303 0 (304 305 306) () 0 () ())
-89 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-307 'h5screate_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 308 0 (309 310 311 312
-313) () 0 () ())
-79 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-78 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-314 'h5sextent_copy_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 315 0 (316 317 318) () 0 () ())
-319 'h5sencode_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 320 0 (321 322 323 324) () 0 () ())
-325 'h5sextent_equal_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 326 0 (327 328 329 330) () 0 () ())
-331 'h5sget_select_hyper_nblocks_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 332 0 (333 334 335) () 0 ()
-())
-336 'h5sget_select_hyper_blocklist_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 337 0 (338 339 340 341 342)
-() 0 () ())
-343 'h5sget_select_elem_pointlist_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 344 0 (345 346 347 348 349)
-() 0 () ())
-350 'h5sget_select_elem_npoints_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 351 0 (352 353 354) () 0 ()
-())
-355 'h5sget_select_type_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 356 0 (357 358 359) () 0 ()
-())
-360 'h5sget_select_npoints_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 361 0 (362 363 364) () 0 ()
-())
-365 'h5sget_simple_extent_npoints_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 366 0 (367 368 369) () 0 ()
-())
-370 'h5sget_simple_extent_ndims_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 371 0 (372 373 374) () 0 ()
-())
-375 'h5sis_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 376 0 (377 378 379) () 0 () ())
-380 'h5soffset_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 381 0 (382 383 384) () 0 () ())
-385 'h5sget_simple_extent_type_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 386 0 (387 388 389) () 0 ()
-())
-390 'h5sselect_elements_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 391 0 (392 393 394 395 396
-397) () 0 () ())
-398 'h5sselect_valid_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 399 0 (400 401 402) () 0 () ())
-403 'h5sselect_none_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 404 0 (405 406) () 0 () ())
-407 'h5sset_extent_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 408 0 (409 410 411 412 413)
-() 0 () ())
-65 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-39 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-414 'h5sset_extent_none_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 415 0 (416 417) () 0 () ())
-418 'h5sselect_hyperslab_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 419 0 (420
-421 422 423 424 425 426) () 0 () ())
-427 'h5sselect_all_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 428 0 (429 430) () 0 () ())
-431 'h5sget_simple_extent_dims_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 432 0 (433 434 435 436) () 0
-() ())
-63 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-437 'h5sget_select_bounds_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 438 0 (439 440 441 442) () 0
-() ())
-38 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-45 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-37 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-443 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '34') () 0 ()
-())
-3 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-68 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-69 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-258 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-70 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-48 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-49 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-59 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-58 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-57 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-60 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-64 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-47 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-54 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-55 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-51 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-52 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-50 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-62 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-56 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-53 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-242 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-61 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-46 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-231 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-42 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-227 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-67 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-40 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-66 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-44 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-43 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-31 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-29 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-25 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-34 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-24 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-32 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-35 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-27 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-26 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-33 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-444 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '14') () 0 ()
-())
-445 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-28 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-9 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-446 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-447 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((448 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-36 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-23 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-449 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-450 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((451 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-30 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-452 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-41 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-453 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-454 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-455 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-456 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-457 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-5 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-7 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-230 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-458 'h5sdecode_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 459 0 (460 461 462) () 0 () ())
-99 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-309 'rank' '' 308 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-311 'space_id' '' 308 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-310 'dims' '' 308 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 309 ())) 0 () ())
-301 'hdferr' '' 298 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-313 'maxdims' '' 308 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-OPTIONAL DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ())
-0 '1') (VARIABLE (INTEGER 4 ()) 0 309 ())) 0 () ())
-334 'num_blocks' '' 332 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-333 'space_id' '' 332 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-312 'hdferr' '' 308 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-441 'end' '' 438 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-442 'hdferr' '' 438 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-440 'start' '' 438 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-296 'hdferr' '' 294 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-295 'space_id' '' 294 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-460 'buf' '' 459 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-359 'hdferr' '' 356 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-462 'hdferr' '' 459 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-322 'buf' '' 320 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-461 'obj_id' '' 459 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-328 'space2_id' '' 326 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-330 'hdferr' '' 326 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-324 'hdferr' '' 320 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-323 'nalloc' '' 320 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-329 'equal' '' 326 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-306 'hdferr' '' 303 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-305 'space_id' '' 303 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-300 'new_space_id' '' 298 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-362 'space_id' '' 361 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-363 'npoints' '' 361 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-401 'status' '' 399 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-402 'hdferr' '' 399 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-400 'space_id' '' 399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-338 'space_id' '' 337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-335 'hdferr' '' 332 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-339 'startblock' '' 337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-352 'space_id' '' 351 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-353 'num_points' '' 351 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-354 'hdferr' '' 351 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-341 'buf' '' 337 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-340 'num_blocks' '' 337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-345 'space_id' '' 344 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-439 'space_id' '' 438 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-349 'hdferr' '' 344 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-346 'startpoint' '' 344 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-342 'hdferr' '' 337 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-348 'buf' '' 344 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-347 'num_points' '' 344 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-397 'hdferr' '' 391 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-396 'coord' '' 391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 394 ()) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 395 ())) 0 () ())
-395 'num_elements' '' 391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-304 'classtype' '' 303 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-299 'space_id' '' 298 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-394 'rank' '' 391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-393 'operator' '' 391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-429 'space_id' '' 428 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-392 'space_id' '' 391 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-430 'hdferr' '' 428 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-406 'hdferr' '' 404 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-357 'space_id' '' 356 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-405 'space_id' '' 404 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-368 'npoints' '' 366 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-367 'space_id' '' 366 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-364 'hdferr' '' 361 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-389 'hdferr' '' 386 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-388 'classtype' '' 386 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-372 'space_id' '' 371 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-374 'hdferr' '' 371 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-373 'rank' '' 371 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-436 'hdferr' '' 432 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-435 'maxdims' '' 432 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-434 'dims' '' 432 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-369 'hdferr' '' 366 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-358 'type' '' 356 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-412 'maximum_size' '' 408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1')
-(VARIABLE (INTEGER 4 ()) 0 410 ())) 0 () ())
-378 'status' '' 376 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-413 'hdferr' '' 408 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-409 'space_id' '' 408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-411 'current_size' '' 408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1')
-(VARIABLE (INTEGER 4 ()) 0 410 ())) 0 () ())
-410 'rank' '' 408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-433 'space_id' '' 432 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-379 'hdferr' '' 376 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-383 'offset' '' 381 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-384 'hdferr' '' 381 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-318 'hdferr' '' 315 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-317 'source_space_id' '' 315 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-316 'dest_space_id' '' 315 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-377 'space_id' '' 376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-387 'space_id' '' 386 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-417 'hdferr' '' 415 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-420 'space_id' '' 419 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-422 'start' '' 419 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-423 'count' '' 419 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-421 'operator' '' 419 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-424 'hdferr' '' 419 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-416 'space_id' '' 415 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-426 'block' '' 419 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION OPTIONAL
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-321 'obj_id' '' 320 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-425 'stride' '' 419 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-OPTIONAL DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (
-INTEGER 4 ()) 0 '1') ()) 0 () ())
-382 'space_id' '' 381 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-327 'space1_id' '' 326 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-)
-
-('h5p_string_create_f' 0 99 'h5g_storage_type_dense_f' 0 188
-'h5d_fill_time_error_f' 0 175 'floating_types_len' 0 275 '__convert_i4_i8'
-0 261 'floating_types' 0 20 'h5d_alloc_time_early_f' 0 182
-'h5d_alloc_time_default_f' 0 183 'h5_iter_unknown_f' 0 204
-'fortran_integer_1' 0 273 'fortran_double' 0 263 'fortran_integer' 0 262
-'fortran_real_4' 0 272 'fortran_integer_2' 0 269 'fortran_real' 0 268
-'fortran_integer_4' 0 265 'fortran_integer_8' 0 264 'fortran_real_12' 0
-267 'fortran_real_16' 0 266 'h5_integer_kind' 0 271 'h5_index_crt_order_f'
-0 206 'fortran_real_8' 0 270 'h5_index_n_f' 0 205 'h5_index_unknown_f' 0
-208 'h5_index_name_f' 0 207 'h5_iter_dec_f' 0 202 'h5_iter_native_f' 0
-201 'h5_iter_n_f' 0 200 'h5_iter_inc_f' 0 203 'h5_szip_ec_om_f' 0 22
-'h5_real_kind' 0 274 'h5_szip_nn_om_f' 0 21 'h5d_contiguous_f' 0 186
-'h5d_compact_f' 0 187 'h5d_alloc_time_late_f' 0 181
-'h5d_alloc_time_error_f' 0 184 'h5d_alloc_time_incr_f' 0 180
-'h5d_chunked_f' 0 185 'h5d_chunk_cache_nslots_dflt_f' 0 168
-'h5d_chunk_cache_nbytes_dflt_f' 0 167 'h5d_chunk_cache_w0_dflt_f' 0 166
-'h5d_fill_time_alloc_f' 0 174 'h5f_close_weak_f' 0 218
-'h5d_fill_value_user_defined_f' 0 169 'h5d_fill_time_never_f' 0 173
-'h5d_fill_value_error_f' 0 172 'h5d_fill_value_default_f' 0 170
-'h5d_fill_value_undefined_f' 0 171 'h5d_space_sts_not_allocated_f' 0 178
-'h5d_space_sts_error_f' 0 179 'h5d_flags_len' 0 276 'h5d_flags' 0 11
-'h5d_space_sts_allocated_f' 0 176 'h5f_close_default_f' 0 219
-'h5f_acc_trunc_f' 0 224 'h5f_acc_rdonly_f' 0 225 'h5f_acc_debug_f' 0 222
-'h5d_space_sts_part_allocated_f' 0 177 'h5f_acc_excl_f' 0 223
-'h5f_acc_rdwr_f' 0 226 'h5f_close_semi_f' 0 217 'h5f_close_strong_f' 0
-216 'h5fd_mpio_independent_f' 0 165 'h5fd_mem_default_f' 0 162
-'h5fd_hid_flags_len' 0 279 'h5fd_core_f' 0 154 'h5f_obj_file_f' 0 215
-'h5f_libver_latest_f' 0 209 'h5f_flags' 0 19 'h5f_flags_len' 0 277
-'h5f_libver_earliest_f' 0 210 'h5f_obj_datatype_f' 0 212
-'h5f_obj_dataset_f' 0 214 'h5f_obj_all_f' 0 211 'h5f_scope_global_f' 0
-220 'h5f_obj_group_f' 0 213 'h5f_scope_local_f' 0 221 'h5fd_hid_flags' 0
-12 'h5fd_flags_len' 0 278 'h5fd_family_f' 0 153 'h5fd_flags' 0 13
-'h5fd_log_f' 0 152 'h5fd_mem_btree_f' 0 160 'h5fd_mem_ntypes_f' 0 155
-'h5fd_mem_nolist_f' 0 163 'h5fd_mem_draw_f' 0 159 'h5fd_mem_lheap_f' 0
-157 'h5fd_mem_gheap_f' 0 158 'h5fd_mem_ohdr_f' 0 156 'h5fd_mpio_f' 0 151
-'h5fd_mem_super_f' 0 161 'h5fd_mpio_collective_f' 0 164 'h5fd_stdio_f' 0
-148 'h5fd_sec2_f' 0 149 'h5fd_multi_f' 0 150 'h5g_link_hard_f' 0 193
-'h5g_dataset_f' 0 197 'h5fortran_types' 0 280 'h5g_link_error_f' 0 194
-'h5g_group_f' 0 198 'h5g_flags_len' 0 281 'h5g_flags' 0 14 'h5g_link_f'
-0 195 'h5g_link_soft_f' 0 192 'h5g_storage_type_compact_f' 0 189
-'h5o_hdr_attr_crt_order_track_f' 0 119 'h5o_copy_without_attr_flag_f' 0
-130 'h5i_datatype_f' 0 145 'h5g_type_f' 0 196 'h5g_storage_type_unknown_f'
-0 191 'h5g_storage_type_symbol_table_f' 0 190 'h5generic_flags_len' 0
-283 'h5g_unknown_f' 0 199 'h5generic_flags' 0 15 'h5i_dataset_f' 0 143
-'h5global' 0 282 'h5i_attr_f' 0 142 'h5i_badid_f' 0 141 'h5i_dataspace_f'
-0 144 'h5l_link_class_t_vers_f' 0 135 'h5i_file_f' 0 147 'h5i_flags_len'
-0 285 'h5i_flags' 0 6 'h5i_group_f' 0 146 'h5l_flags' 0 2 'h5l_flags_len'
-0 284 'h5o_copy_shallow_hierarchy_f' 0 134 'h5o_copy_expand_ext_link_f'
-0 132 'h5l_same_loc_f' 0 136 'h5l_type_external_f' 0 137
-'h5l_type_error_f' 0 140 'h5o_copy_all_f' 0 128 'h5lib_flags_len' 0 286
-'h5l_type_soft_f' 0 138 'h5l_type_hard_f' 0 139 'h5lib_flags' 0 17
-'h5o_copy_expand_reference_f' 0 131 'h5o_copy_expand_soft_link_f' 0 133
-'h5o_copy_preserve_null_flag_f' 0 129 'h5o_hdr_all_flags_f' 0 115
-'h5o_flags' 0 16 'h5o_flags_len' 0 287 'h5o_hdr_attr_crt_order_index_f'
-0 118 'h5p_file_mount_f' 0 108 'h5p_default_f' 0 107
-'h5o_shmesg_pline_flag_f' 0 123 'h5o_shmesg_max_nindexes_f' 0 114
-'h5o_shmesg_all_flag_f' 0 121 'h5o_hdr_chunk0_size_f' 0 120
-'h5o_hdr_attr_store_phase_cha_f' 0 117 'h5o_hdr_store_times_f' 0 116
-'h5o_shmesg_attr_flag_f' 0 122 'h5o_shmesg_max_list_size_f' 0 113
-'h5o_shmesg_fill_flag_f' 0 124 'h5o_shmesg_dtype_flag_f' 0 125
-'h5o_shmesg_none_flag_f' 0 127 'h5p_dataset_xfer_f' 0 109
-'h5p_crt_order_indexed_f' 0 94 'h5o_shmesg_sdspace_flag_f' 0 126
-'h5p_attribute_create_f' 0 98 'h5p_crt_order_tracked_f' 0 93
-'h5p_dataset_create_f' 0 110 'h5p_dataset_access_f' 0 104
-'h5p_datatype_access_f' 0 100 'h5p_datatype_create_f' 0 101
-'h5p_file_access_f' 0 111 'h5p_file_create_f' 0 112 'h5p_flags_len' 0
-289 'h5p_flags_int_len' 0 288 'h5p_flags_int' 0 4 'h5p_flags' 0 18
-'h5p_link_access_f' 0 95 'h5p_group_create_f' 0 103 'h5p_group_access_f'
-0 102 'h5p_object_create_f' 0 105 'h5p_object_copy_f' 0 97
-'h5p_link_create_f' 0 96 'h5p_root_f' 0 106 'h5sdecode_f' 0 458
-'h5s_select_append_f' 0 78 'h5s_sel_hyperslabs_f' 0 72 'h5s_all_f' 0 84
-'h5r_dataset_region_f' 0 91 'h5r_flags' 0 8 'h5r_flags_len' 0 291
-'h5r_object_f' 0 92 'h5s' 0 290 'h5s_flags_len' 0 292 'h5s_flags' 0 10
-'h5s_sel_all_f' 0 71 'h5s_scalar_f' 0 90 'h5s_null_f' 0 88
-'h5s_sel_error_f' 0 75 'h5s_sel_none_f' 0 74 'h5s_select_and_f' 0 82
-'h5s_sel_points_f' 0 73 'h5s_select_nota_f' 0 79 'h5s_select_invalid_f'
-0 76 'h5s_select_noop_f' 0 83 'h5screate_simple_f' 0 307 'h5s_simple_f'
-0 89 'h5s_select_prepend_f' 0 77 'h5s_select_notb_f' 0 80
-'h5s_select_or_f' 0 86 'h5s_select_xor_f' 0 81 'h5s_select_set_f' 0 87
-'h5screate_f' 0 302 'h5s_unlimited_f' 0 85 'h5scopy_f' 0 297 'h5sclose_f'
-0 293 'h5t_std_u16le' 0 232 'h5t_cset_ascii_f' 0 46
-'h5sget_select_bounds_f' 0 437 'h5sextent_equal_f' 0 325 'h5sencode_f' 0
-319 'h5sextent_copy_f' 0 314 'h5t_compound_f' 0 63
-'h5sget_simple_extent_dims_f' 0 431 'h5sget_select_npoints_f' 0 360
-'h5sget_select_elem_npoints_f' 0 350 'h5sget_select_elem_pointlist_f' 0
-343 'h5sget_select_hyper_blocklist_f' 0 336
-'h5sget_select_hyper_nblocks_f' 0 331 'h5sget_select_type_f' 0 355
-'h5sselect_all_f' 0 427 'h5sget_simple_extent_type_f' 0 385
-'h5sget_simple_extent_ndims_f' 0 370 'h5sget_simple_extent_npoints_f' 0
-365 'h5soffset_simple_f' 0 380 'h5sis_simple_f' 0 375
-'h5sselect_hyperslab_f' 0 418 'h5sselect_elements_f' 0 390
-'h5sset_extent_none_f' 0 414 'h5sselect_none_f' 0 403 'h5sselect_valid_f'
-0 398 'h5t_array_f' 0 39 'h5sset_extent_simple_f' 0 407 'h5t_bitfield_f'
-0 65 'h5t_enum_f' 0 61 'h5t_dir_descend_f' 0 37 'h5t_cset_utf8_f' 0 45
-'h5t_dir_ascend_f' 0 38 'h5t_std_ref_obj' 0 256 'h5t_native_character' 0
-257 'h5t_ieee_f32be' 0 247 'h5t_float_f' 0 68 'h5t_flags' 0 3
-'h5t_flags_len' 0 443 'h5t_ieee_f64le' 0 244 'h5t_ieee_f64be' 0 245
-'h5t_ieee_f32le' 0 246 'h5t_integer_f' 0 69 'h5t_std_i64le' 0 236
-'h5t_pad_error_f' 0 53 'h5t_native_integer_1' 0 254 'h5t_native_double'
-0 258 'h5t_native_integer' 0 260 'h5t_pad_background_f' 0 54
-'h5t_norm_none_f' 0 47 'h5t_norm_implied_f' 0 49 'h5t_native_integer_2'
-0 253 'h5t_native_integer_4' 0 252 'h5t_native_real_16' 0 248
-'h5t_native_real' 0 259 'h5t_native_integer_8' 0 251 'h5t_native_real_4'
-0 250 'h5t_native_real_8' 0 249 'h5t_no_class_f' 0 70 'h5t_norm_msbset_f'
-0 48 'h5t_opaque_f' 0 64 'h5t_order_le_f' 0 60 'h5t_order_be_f' 0 59
-'h5t_order_none_f' 0 57 'h5t_order_vax_f' 0 58 'h5t_std_i32be' 0 239
-'h5t_pad_zero_f' 0 56 'h5t_pad_one_f' 0 55 'h5t_reference_f' 0 62
-'h5t_sgn_error_f' 0 50 'h5t_sgn_2_f' 0 51 'h5t_std_i16le' 0 240
-'h5t_sgn_none_f' 0 52 'h5t_std_i16be' 0 241 'h5t_std_i32le' 0 238
-'h5t_std_i64be' 0 237 'h5t_std_ref_dsetreg' 0 255 'h5t_std_i8le' 0 242
-'h5t_std_i8be' 0 243 'h5t_std_u16be' 0 233 'h5t_std_u32le' 0 230
-'h5t_std_u32be' 0 231 'integer_types' 0 7 'h5t_str_error_f' 0 41
-'h5t_std_u8be' 0 235 'h5t_std_u64le' 0 228 'h5t_std_u64be' 0 229
-'h5t_std_u8le' 0 234 'hssize_t' 0 452 'h5z_disable_edc_f' 0 30
-'h5t_str_nullpad_f' 0 43 'h5t_str_nullterm_f' 0 44 'h5t_string_f' 0 66
-'h5t_string' 0 227 'h5t_str_spacepad_f' 0 42 'h5t_vlen_f' 0 40
-'h5t_time_f' 0 67 'hobj_ref_t_f' 0 450 'h5z_filter_all_f' 0 23
-'h5z_enable_edc_f' 0 29 'h5z_error_edc_f' 0 31 'h5z_filter_error_f' 0 36
-'h5z_filter_decode_enabled_f' 0 24 'h5z_filter_deflate_f' 0 34
-'h5z_filter_encode_enabled_f' 0 25 'hdset_reg_ref_t_f' 0 447 'h5z_flags'
-0 9 'h5z_filter_shuffle_f' 0 33 'h5z_filter_none_f' 0 35
-'h5z_filter_fletcher32_f' 0 32 'h5z_flag_optional_f' 0 26
-'h5z_filter_szip_f' 0 27 'h5z_no_edc_f' 0 28 'h5z_flags_len' 0 444
-'haddr_t' 0 445 'hid_t' 0 446 'hsize_t' 0 449 'predef_types' 0 5
-'object_namelen_default_f' 0 454 'integer_types_len' 0 453
-'ref_reg_buf_len' 0 457 'predef_types_len' 0 455 'size_t' 0 456)
diff --git a/interfaces/ext/hdf5/h5t.mod b/interfaces/ext/hdf5/h5t.mod
deleted file mode 100644
index 31555de..0000000
--- a/interfaces/ext/hdf5/h5t.mod
+++ /dev/null
@@ -1,1943 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5Tff.f90 on Mon Feb 14 14:35:52 2011
-If you edit this, you'll get what you deserve.
-
-(() () () () () () () () () () () () () () () () () () () ()
-())
-
-()
-
-()
-
-(('h5l_flags' 2 0) ('h5t_flags' 3 0) ('h5p_flags_int' 4 0) (
-'predefined_types' 5 0) ('h5i_flags' 6 0) ('integer_types' 7 0) (
-'h5r_flags' 8 0) ('h5z_flags' 9 0) ('h5s_flags' 10 0) ('h5d_flags' 11 0)
-('h5fd_hid_flags' 12 0) ('h5fd_flags' 13 0) ('h5g_flags' 14 0) (
-'h5generic_flags' 15 0) ('h5o_flags' 16 0) ('h5lib_flags' 17 0) (
-'h5p_flags' 18 0) ('h5f_flags' 19 0) ('floating_types' 20 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 21 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 22 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 23 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 24 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 25 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 26 ())) ('h5global.eq.6' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 27 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 28 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 29 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 30 ())) ('h5global.eq.10' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 31 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 32 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 33 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.13'
-(VARIABLE (INTEGER 4 ()) 0 34 ())) ('h5global.eq.14' (VARIABLE (INTEGER
-4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 35 ())) ('h5global.eq.15' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 36 ())) (
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '34') 1)))) 'h5global.eq.16' (VARIABLE (
-INTEGER 4 ()) 0 37 ())) ('h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '33') 1)))) 'h5global.eq.17'
-(VARIABLE (INTEGER 4 ()) 0 38 ())) ('h5global.eq.18' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '32') 1))))
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 39 ())) ('h5global.eq.19' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '31') 1)))) 'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 40 ())) (
-'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '30') 1)))) 'h5global.eq.20' (VARIABLE (
-INTEGER 4 ()) 0 41 ())) ('h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21'
-(VARIABLE (INTEGER 4 ()) 0 42 ())) ('h5global.eq.22' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 43 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 44 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 45 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1)))) 'h5global.eq.25'
-(VARIABLE (INTEGER 4 ()) 0 46 ())) ('h5global.eq.26' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '24') 1))))
-'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 47 ())) ('h5global.eq.27' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '23') 1)))) 'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 48 ())) (
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.28' (VARIABLE (
-INTEGER 4 ()) 0 49 ())) ('h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.29'
-(VARIABLE (INTEGER 4 ()) 0 50 ())) ('h5global.eq.30' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 51 ())) ('h5global.eq.31' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 52 ())) (
-'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.32' (VARIABLE (
-INTEGER 4 ()) 0 53 ())) ('h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33'
-(VARIABLE (INTEGER 4 ()) 0 54 ())) ('h5global.eq.34' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 55 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 56 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 57 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.37'
-(VARIABLE (INTEGER 4 ()) 0 58 ())) ('h5global.eq.38' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 59 ())) ('h5global.eq.39' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 60 ())) (
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.40' (VARIABLE (
-INTEGER 4 ()) 0 61 ())) ('h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.41'
-(VARIABLE (INTEGER 4 ()) 0 62 ())) ('h5global.eq.42' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 63 ())) ('h5global.eq.43' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 64 ())) (
-'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.44' (VARIABLE (
-INTEGER 4 ()) 0 65 ())) ('h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45'
-(VARIABLE (INTEGER 4 ()) 0 66 ())) ('h5global.eq.46' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 67 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 68 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 69 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.49'
-(VARIABLE (INTEGER 4 ()) 0 70 ())) ('h5global.eq.50' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 71 ())) ('h5global.eq.51' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 72 ())) (
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.52' (VARIABLE (
-INTEGER 4 ()) 0 73 ())) ('h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.53'
-(VARIABLE (INTEGER 4 ()) 0 74 ())) ('h5global.eq.54' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 75 ())) ('h5global.eq.55' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 76 ())) (
-'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.56' (VARIABLE (
-INTEGER 4 ()) 0 77 ())) ('h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57'
-(VARIABLE (INTEGER 4 ()) 0 78 ())) ('h5global.eq.58' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 79 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 80 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 81 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.61'
-(VARIABLE (INTEGER 4 ()) 0 82 ())) ('h5global.eq.62' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 83 ())) ('h5global.eq.63' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 84 ())) (
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.64' (VARIABLE (
-INTEGER 4 ()) 0 85 ())) ('h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.65'
-(VARIABLE (INTEGER 4 ()) 0 86 ())) ('h5global.eq.66' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 87 ())) ('h5global.eq.67' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 88 ())) (
-'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.68' (VARIABLE (
-INTEGER 4 ()) 0 89 ())) ('h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69'
-(VARIABLE (INTEGER 4 ()) 0 90 ())) ('h5global.eq.70' (VARIABLE (INTEGER
-4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 91 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 92 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 93 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 4 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.73'
-(VARIABLE (INTEGER 4 ()) 0 94 ())) ('h5global.eq.74' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 95 ())) ('h5global.eq.75' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 96 ())) (
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.76' (VARIABLE (
-INTEGER 4 ()) 0 97 ())) ('h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.77'
-(VARIABLE (INTEGER 4 ()) 0 98 ())) ('h5global.eq.78' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 99 ())) ('h5global.eq.79' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 100 ())) (
-'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.80' (VARIABLE (
-INTEGER 4 ()) 0 101 ())) ('h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81'
-(VARIABLE (INTEGER 4 ()) 0 102 ())) ('h5global.eq.82' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 103 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 104 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 105 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.85'
-(VARIABLE (INTEGER 4 ()) 0 106 ())) ('h5global.eq.86' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 107 ())) ('h5global.eq.87' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 108 ())) (
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.88' (VARIABLE (
-INTEGER 4 ()) 0 109 ())) ('h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.89'
-(VARIABLE (INTEGER 4 ()) 0 110 ())) ('h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 111 ())) ('h5global.eq.91' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 112 ())) (
-'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.92' (VARIABLE (
-INTEGER 4 ()) 0 113 ())) ('h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93'
-(VARIABLE (INTEGER 4 ()) 0 114 ())) ('h5global.eq.94' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 115 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 116 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 117 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.97'
-(VARIABLE (INTEGER 4 ()) 0 118 ())) ('h5global.eq.98' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 119 ())) ('h5global.eq.99' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 120 ())) (
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.100' (VARIABLE (
-INTEGER 4 ()) 0 121 ())) ('h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 122 ())) ('h5global.eq.102'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 123 ())) (
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.103' (VARIABLE (
-INTEGER 4 ()) 0 124 ())) ('h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 125 ())) ('h5global.eq.105'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 126 ())) (
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.106' (VARIABLE (
-INTEGER 4 ()) 0 127 ())) ('h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 128 ())) ('h5global.eq.108'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 129 ())) (
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.109' (VARIABLE (
-INTEGER 4 ()) 0 130 ())) ('h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 131 ())) ('h5global.eq.111'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 132 ())) (
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.112' (VARIABLE (
-INTEGER 4 ()) 0 133 ())) ('h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 134 ())) ('h5global.eq.114'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 135 ())) (
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.115' (VARIABLE (
-INTEGER 4 ()) 0 136 ())) ('h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 2
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 137 ())) ('h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 138 ())) ('h5global.eq.118'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 139 ())) (
-'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.119' (VARIABLE (
-INTEGER 4 ()) 0 140 ())) ('h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120'
-(VARIABLE (INTEGER 4 ()) 0 141 ())) ('h5global.eq.121' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 142 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 143 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 144 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.124'
-(VARIABLE (INTEGER 4 ()) 0 145 ())) ('h5global.eq.125' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 146 ())) ('h5global.eq.126'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 147 ())) (
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.127' (VARIABLE (
-INTEGER 4 ()) 0 148 ())) ('h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 149 ())) ('h5global.eq.129'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 150 ())) (
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.130' (VARIABLE (
-INTEGER 4 ()) 0 151 ())) ('h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 152 ())) ('h5global.eq.132'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 153 ())) (
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.133' (VARIABLE (
-INTEGER 4 ()) 0 154 ())) ('h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 155 ())) ('h5global.eq.135'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 156 ())) (
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.136' (VARIABLE (
-INTEGER 4 ()) 0 157 ())) ('h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 158 ())) ('h5global.eq.138'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 159 ())) (
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.139' (VARIABLE (
-INTEGER 4 ()) 0 160 ())) ('h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 161 ())) ('h5global.eq.141'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 162 ())) (
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.142' (VARIABLE (
-INTEGER 4 ()) 0 163 ())) ('h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 164 ())) ('h5global.eq.144'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 165 ())) (
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.145' (VARIABLE (
-INTEGER 4 ()) 0 166 ())) ('h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1))))
-'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 167 ())) ('h5global.eq.147'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 168 ())) (
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.148' (VARIABLE (
-INTEGER 4 ()) 0 169 ())) ('h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 170 ())) ('h5global.eq.150'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 171 ())) (
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.151' (VARIABLE (
-INTEGER 4 ()) 0 172 ())) ('h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 173 ())) ('h5global.eq.153'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 174 ())) (
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.154' (VARIABLE (
-INTEGER 4 ()) 0 175 ())) ('h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 176 ())) ('h5global.eq.156'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 177 ())) (
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.157' (VARIABLE (
-INTEGER 4 ()) 0 178 ())) ('h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 179 ())) ('h5global.eq.159'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ())) (
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.160' (VARIABLE (
-INTEGER 4 ()) 0 181 ())) ('h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 182 ())) ('h5global.eq.162'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 183 ())) (
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.163' (VARIABLE (
-INTEGER 4 ()) 0 184 ())) ('h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 185 ())) ('h5global.eq.165'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 186 ())) (
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.166' (VARIABLE (
-INTEGER 4 ()) 0 187 ())) ('h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 188 ())) ('h5global.eq.168'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ())) (
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.169' (VARIABLE (
-INTEGER 4 ()) 0 190 ())) ('h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 191 ())) ('h5global.eq.171'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 192 ())) (
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.172' (VARIABLE (
-INTEGER 4 ()) 0 193 ())) ('h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 194 ())) ('h5global.eq.174'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 195 ())) (
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.175' (VARIABLE (
-INTEGER 4 ()) 0 196 ())) ('h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 197 ())) ('h5global.eq.177'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 198 ())) (
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.178' (VARIABLE (
-INTEGER 4 ()) 0 199 ())) ('h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.180'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.181' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.183'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 204 ())) (
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.184' (VARIABLE (
-INTEGER 4 ()) 0 205 ())) ('h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 206 ())) ('h5global.eq.186'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 207 ())) (
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.187' (VARIABLE (
-INTEGER 4 ()) 0 208 ())) ('h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 209 ())) ('h5global.eq.189'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 210 ())) (
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.190' (VARIABLE (
-INTEGER 4 ()) 0 211 ())) ('h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 212 ())) ('h5global.eq.192'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ())) (
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.193' (VARIABLE (
-INTEGER 4 ()) 0 214 ())) ('h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 215 ())) ('h5global.eq.195'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 216 ())) (
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.196' (VARIABLE (
-INTEGER 4 ()) 0 217 ())) ('h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 218 ())) ('h5global.eq.198'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 219 ())) (
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.199' (VARIABLE (
-INTEGER 4 ()) 0 220 ())) ('h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 221 ())) ('h5global.eq.201'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 222 ())) (
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.202' (VARIABLE (
-INTEGER 4 ()) 0 223 ())) ('h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.204'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.205' (VARIABLE (
-INTEGER 4 ()) 0 226 ())) ('h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.207'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 228 ())) (
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.208' (VARIABLE (
-INTEGER 4 ()) 0 229 ())) ('h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 230 ())) ('h5global.eq.210'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 231 ())) (
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.211' (VARIABLE (
-INTEGER 4 ()) 0 232 ())) ('h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 233 ())) ('h5global.eq.213'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 234 ())) (
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.214' (VARIABLE (
-INTEGER 4 ()) 0 235 ())) ('h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.217'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.218' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219'
-(VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.220' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.232'
-(VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.233' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 254 ())) ('h5global.eq.234'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 255 ())) (
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.235' (VARIABLE (
-INTEGER 4 ()) 0 256 ())) ('h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 257 ())) ('h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.238'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.239' (VARIABLE (
-INTEGER 4 ()) 0 260 ())))
-
-(20 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-261 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-262 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-263 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-264 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-265 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-266 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-267 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-268 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-269 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-270 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-207 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-208 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-205 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-206 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-200 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-272 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-273 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-274 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-21 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-22 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-183 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-180 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-184 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-167 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-166 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-168 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-185 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-181 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-187 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-174 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-186 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-170 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-171 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-172 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-173 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-11 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-176 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-179 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-177 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-223 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-216 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-217 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-178 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-169 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-210 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '19') () 0 ()
-())
-19 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-211 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-213 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-220 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-215 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-13 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-153 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-278 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-12 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-154 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-160 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-152 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-158 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-157 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-159 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-163 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-164 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-161 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-151 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-156 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-155 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-162 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-150 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-149 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-14 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-281 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '12') () 0 ()
-())
-198 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-195 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-194 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-197 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-189 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-192 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-193 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-148 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-165 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-218 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-175 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-190 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-191 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-15 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9')) 0 () ())
-199 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-141 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-142 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-282 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(UNKNOWN 0 ()) 0 0 () () 0 () ())
-144 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-143 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-196 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-6 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-284 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6') () 0 () ())
-2 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-146 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-285 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7') () 0 () ())
-147 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-140 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-139 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-17 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-138 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-286 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-128 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-137 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-136 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-129 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-133 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-131 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-132 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-134 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-135 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-145 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-16 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-118 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-115 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-130 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-117 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-116 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-120 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-125 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-124 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-113 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-122 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-121 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-127 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-114 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-98 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-126 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-104 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-110 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-93 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-94 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-101 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-100 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-109 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-123 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-112 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-111 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-107 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-18 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-4 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-288 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-102 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-103 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-96 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-97 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-106 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-105 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-95 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-289 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '18') () 0 ()
-())
-108 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-119 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-188 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-92 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-290 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2') () 0 () ())
-8 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-91 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-10 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-88 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-90 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-75 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-71 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-291 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '20') () 0 ()
-())
-84 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-73 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-82 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-74 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-72 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-83 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-76 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-86 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-80 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-87 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-81 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-77 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-292 'h5t' 'h5t' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-65 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-39 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-85 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-89 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-63 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-79 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-38 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-45 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-37 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-293 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '34') () 0 ()
-())
-3 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-68 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-69 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-258 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-70 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-48 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-49 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-59 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-58 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-57 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-60 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-64 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-47 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-54 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-55 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-51 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-52 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-50 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-62 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-56 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-53 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-242 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-61 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-46 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-78 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-231 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-42 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-227 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-67 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-40 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-66 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-44 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-294 'h5tarray_create_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 295 0 (296 297 298 299 300) () 0 () ())
-43 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-301 'h5tclose_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 302 0 (303 304) () 0 () ())
-305 'h5tcompiler_conv_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 306 0 (307 308 309 310) () 0 () ())
-311 'h5tcommitted_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 312 0 (313 314 315) () 0 () ())
-316 'h5tcommit_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 317 0 (318 319 320 321 322
-323 324) () 0 () ())
-325 'h5tcommit_anon_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 326 0 (327 328 329 330
-331) () 0 () ())
-332 'h5tcreate_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 333 0 (334 335 336 337) () 0 () ())
-338 'h5tdecode_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 339 0 (340 341 342) () 0 () ())
-343 'h5tenum_create_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 344 0 (345 346 347) () 0 () ())
-348 'h5tenum_nameof_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 349 0 (350 351 352 353 354) () 0 () ())
-355 'h5tenum_valueof_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 356 0 (357 358 359 360) () 0 () ())
-361 'h5tenum_insert_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 362 0 (363 364 365 366) () 0 () ())
-367 'h5tencode_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 368 0 (369 370 371 372) () 0 () ())
-373 'h5tget_array_ndims_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 374 0 (375 376 377) () 0 ()
-())
-378 'h5tget_class_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 379 0 (380 381 382) () 0 () ())
-383 'h5tget_array_dims_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 384 0 (385 386 387) () 0 () ())
-388 'h5tequal_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 389 0 (390 391 392 393) () 0 () ())
-394 'h5tget_create_plist_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 395 0 (396 397 398) () 0 ()
-())
-399 'h5tget_ebias_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 400 0 (401 402 403) () 0 () ())
-404 'h5tget_cset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 405 0 (406 407 408) () 0 () ())
-409 'h5tcopy_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 410 0 (411 412 413) () 0 () ())
-41 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-414 'h5tget_inpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 415 0 (416 417 418) () 0 () ())
-419 'h5tget_member_name_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 420 0 (421 422 423 424 425)
-() 0 () ())
-426 'h5tget_member_index_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 427 0 (428 429 430 431) () 0
-() ())
-432 'h5tget_member_type_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 433 0 (434 435 436 437) () 0
-() ())
-438 'h5tget_member_offset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 439 0 (440 441 442 443) () 0
-() ())
-444 'h5tget_member_value_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 445 0 (446 447 448 449) () 0
-() ())
-450 'h5tget_member_class_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 451 0 (452 453 454 455) () 0
-() ())
-456 'h5tget_nmembers_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 457 0 (458 459 460) () 0 () ())
-461 'h5tget_norm_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 462 0 (463 464 465) () 0 () ())
-466 'h5tget_native_type_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 467 0 (468 469 470 471) () 0
-() ())
-472 'h5tget_fields_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 473 0 (474 475 476 477 478 479 480) () 0
-() ())
-230 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-481 'h5tget_order_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 482 0 (483 484 485) () 0 () ())
-486 'h5tget_pad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 487 0 (488 489 490 491) () 0 () ())
-492 'h5tget_sign_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 493 0 (494 495 496) () 0 () ())
-497 'h5tget_size_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 498 0 (499 500 501) () 0 () ())
-502 'h5tinsert_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 503 0 (504 505 506 507 508) () 0 () ())
-509 'h5tget_tag_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 510 0 (511 512 513 514) () 0 () ())
-515 'h5tget_super_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 516 0 (517 518 519) () 0 () ())
-520 'h5tis_variable_str_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 521 0 (522 523 524) () 0 ()
-())
-525 'h5tget_strpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 526 0 (527 528 529) () 0 () ())
-530 'h5tpack_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 531 0 (532 533) () 0 () ())
-534 'h5topen_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 535 0 (536 537 538 539 540) ()
-0 () ())
-541 'h5tset_ebias_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 542 0 (543 544 545) () 0 () ())
-546 'h5tset_cset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 547 0 (548 549 550) () 0 () ())
-551 'h5tget_precision_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 552 0 (553 554 555) () 0 () ())
-556 'h5tset_inpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 557 0 (558 559 560) () 0 () ())
-561 'h5tset_offset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 562 0 (563 564 565) () 0 () ())
-566 'h5tset_order_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 567 0 (568 569 570) () 0 () ())
-571 'h5tset_norm_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 572 0 (573 574 575) () 0 () ())
-576 'h5tset_precision_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 577 0 (578 579 580) () 0 () ())
-581 'h5tset_pad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 582 0 (583 584 585 586) () 0 () ())
-587 'h5tset_strpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 588 0 (589 590 591) () 0 () ())
-592 'h5tset_size_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 593 0 (594 595 596) () 0 () ())
-597 'h5tvlen_create_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 598 0 (599 600 601) () 0 () ())
-602 'h5tset_tag_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 603 0 (604 605 606) () 0 () ())
-607 'h5tset_sign_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 608 0 (609 610 611) () 0 () ())
-31 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-29 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-25 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-34 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-24 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-32 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-35 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-27 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-26 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-33 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-612 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '14') () 0 ()
-())
-613 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-28 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-9 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-614 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-615 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((616 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-36 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-23 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-617 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-618 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((619 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-30 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-620 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-621 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-622 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-623 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-624 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-625 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-5 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-7 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-626 'h5tset_fields_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 627 0 (628 629 630 631 632 633 634) () 0
-() ())
-635 'h5tget_offset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 636 0 (637 638 639) () 0 () ())
-99 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-536 'loc_id' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-538 'type_id' '' 535 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-537 'name' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-540 'tapl_id' '' 535 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-390 'type1_id' '' 389 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-392 'flag' '' 389 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-391 'type2_id' '' 389 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-393 'hdferr' '' 389 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-320 'type_id' '' 317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-319 'name' '' 317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-303 'type_id' '' 302 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-324 'tapl_id' '' 317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-321 'hdferr' '' 317 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-318 'loc_id' '' 317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-539 'hdferr' '' 535 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-323 'tcpl_id' '' 317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-322 'lcpl_id' '' 317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-412 'new_type_id' '' 410 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-411 'type_id' '' 410 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-594 'type_id' '' 593 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-595 'size' '' 593 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-596 'hdferr' '' 593 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-413 'hdferr' '' 410 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-483 'type_id' '' 482 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-484 'order' '' 482 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-381 'class' '' 379 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-304 'hdferr' '' 302 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-382 'hdferr' '' 379 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-494 'type_id' '' 493 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-583 'type_id' '' 582 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-499 'type_id' '' 498 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-496 'hdferr' '' 493 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-495 'sign' '' 493 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-609 'type_id' '' 608 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-380 'type_id' '' 379 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-501 'hdferr' '' 498 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-500 'size' '' 498 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-570 'hdferr' '' 567 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-553 'type_id' '' 552 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-485 'hdferr' '' 482 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-569 'order' '' 567 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-568 'type_id' '' 567 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-554 'precision' '' 552 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-555 'hdferr' '' 552 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-578 'type_id' '' 577 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-580 'hdferr' '' 577 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-638 'offset' '' 636 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-637 'type_id' '' 636 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-639 'hdferr' '' 636 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-579 'precision' '' 577 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-564 'offset' '' 562 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-565 'hdferr' '' 562 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-489 'lsbpad' '' 487 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-488 'type_id' '' 487 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-490 'msbpad' '' 487 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-585 'msbpad' '' 582 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-476 'epos' '' 473 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-477 'esize' '' 473 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-586 'hdferr' '' 582 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-584 'lsbpad' '' 582 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-480 'hdferr' '' 473 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-479 'msize' '' 473 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-629 'spos' '' 627 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-630 'epos' '' 627 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-628 'type_id' '' 627 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-478 'mpos' '' 473 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-491 'hdferr' '' 487 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-633 'msize' '' 627 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-634 'hdferr' '' 627 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-632 'mpos' '' 627 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-611 'hdferr' '' 608 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-474 'type_id' '' 473 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-402 'ebias' '' 400 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-545 'hdferr' '' 542 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-403 'hdferr' '' 400 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-401 'type_id' '' 400 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-475 'spos' '' 473 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-463 'type_id' '' 462 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-465 'hdferr' '' 462 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-543 'type_id' '' 542 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-464 'norm' '' 462 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-559 'padtype' '' 557 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-558 'type_id' '' 557 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-574 'norm' '' 572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-544 'ebias' '' 542 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-575 'hdferr' '' 572 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-418 'hdferr' '' 415 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-443 'hdferr' '' 439 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-573 'type_id' '' 572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-560 'hdferr' '' 557 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-407 'cset' '' 405 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-406 'type_id' '' 405 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-416 'type_id' '' 415 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-425 'hdferr' '' 420 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-408 'hdferr' '' 405 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-424 'namelen' '' 420 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-548 'type_id' '' 547 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-549 'cset' '' 547 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-527 'type_id' '' 526 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-528 'strpad' '' 526 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-529 'hdferr' '' 526 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-590 'strpad' '' 588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-589 'type_id' '' 588 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-591 'hdferr' '' 588 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-550 'hdferr' '' 547 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-460 'hdferr' '' 457 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-459 'num_members' '' 457 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-421 'type_id' '' 420 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-458 'type_id' '' 457 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-440 'type_id' '' 439 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-441 'member_no' '' 439 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-442 'offset' '' 439 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-430 'index' '' 427 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-429 'name' '' 427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-431 'hdferr' '' 427 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-387 'hdferr' '' 384 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-385 'type_id' '' 384 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-519 'hdferr' '' 516 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-386 'dims' '' 384 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-422 'index' '' 420 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-423 'member_name' '' 420 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-377 'hdferr' '' 374 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-376 'ndims' '' 374 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-518 'base_type_id' '' 516 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-517 'type_id' '' 516 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-504 'type_id' '' 503 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-506 'offset' '' 503 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-505 'name' '' 503 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-507 'field_id' '' 503 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-436 'datatype' '' 433 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-437 'hdferr' '' 433 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-375 'type_id' '' 374 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-336 'type_id' '' 333 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-335 'size' '' 333 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-337 'hdferr' '' 333 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-297 'rank' '' 295 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-434 'type_id' '' 433 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-300 'hdferr' '' 295 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-533 'hdferr' '' 531 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-299 'type_id' '' 295 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-363 'type_id' '' 362 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-364 'name' '' 362 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-365 'value' '' 362 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-347 'hdferr' '' 344 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-346 'new_type_id' '' 344 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-532 'type_id' '' 531 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-298 'dims' '' 295 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-334 'class' '' 333 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-508 'hdferr' '' 503 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-296 'base_id' '' 295 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-366 'hdferr' '' 362 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-350 'type_id' '' 349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-435 'field_idx' '' 433 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-352 'namelen' '' 349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-353 'name' '' 349 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-345 'parent_id' '' 344 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-354 'hdferr' '' 349 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-358 'name' '' 356 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-359 'value' '' 356 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-446 'type_id' '' 445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-360 'hdferr' '' 356 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-448 'value' '' 445 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-447 'member_no' '' 445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-351 'value' '' 349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-428 'type_id' '' 427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-417 'padtype' '' 415 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-511 'type_id' '' 510 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-606 'hdferr' '' 603 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-604 'type_id' '' 603 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-605 'tag' '' 603 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-357 'type_id' '' 356 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-514 'hdferr' '' 510 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-512 'tag' '' 510 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-600 'vltype_id' '' 598 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-601 'hdferr' '' 598 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-513 'taglen' '' 510 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-524 'hdferr' '' 521 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-523 'status' '' 521 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-328 'dtype_id' '' 326 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-331 'tapl_id' '' 326 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-330 'tcpl_id' '' 326 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-329 'hdferr' '' 326 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-327 'loc_id' '' 326 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-455 'hdferr' '' 451 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-454 'class' '' 451 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-453 'member_no' '' 451 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-599 'type_id' '' 598 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-314 'committed' '' 312 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-522 'type_id' '' 521 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-342 'hdferr' '' 339 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-313 'dtype_id' '' 312 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-452 'type_id' '' 451 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-369 'obj_id' '' 368 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-315 'hdferr' '' 312 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-449 'hdferr' '' 445 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-340 'buf' '' 339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-396 'dtype_id' '' 395 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-341 'obj_id' '' 339 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-371 'nalloc' '' 368 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-370 'buf' '' 368 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-398 'hdferr' '' 395 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-309 'flag' '' 306 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-308 'dst_id' '' 306 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-468 'dtype_id' '' 467 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-470 'native_dtype_id' '' 467 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-469 'direction' '' 467 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-310 'hdferr' '' 306 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-372 'hdferr' '' 368 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-307 'src_id' '' 306 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-471 'hdferr' '' 467 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-397 'dtpl_id' '' 395 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-610 'sign' '' 608 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-631 'esize' '' 627 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-563 'type_id' '' 562 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-)
-
-('h5p_string_create_f' 0 99 'h5g_storage_type_dense_f' 0 188
-'h5d_fill_time_error_f' 0 175 'floating_types_len' 0 275 '__convert_i4_i8'
-0 261 'floating_types' 0 20 'h5d_alloc_time_early_f' 0 182
-'h5d_alloc_time_default_f' 0 183 'h5_iter_unknown_f' 0 204
-'fortran_integer_1' 0 273 'fortran_double' 0 263 'fortran_integer' 0 262
-'fortran_real_4' 0 272 'fortran_integer_2' 0 269 'fortran_real' 0 268
-'fortran_integer_4' 0 265 'fortran_integer_8' 0 264 'fortran_real_12' 0
-267 'fortran_real_16' 0 266 'h5_integer_kind' 0 271 'h5_index_crt_order_f'
-0 206 'fortran_real_8' 0 270 'h5_index_n_f' 0 205 'h5_index_unknown_f' 0
-208 'h5_index_name_f' 0 207 'h5_iter_dec_f' 0 202 'h5_iter_native_f' 0
-201 'h5_iter_n_f' 0 200 'h5_iter_inc_f' 0 203 'h5_szip_ec_om_f' 0 22
-'h5_real_kind' 0 274 'h5_szip_nn_om_f' 0 21 'h5d_contiguous_f' 0 186
-'h5d_compact_f' 0 187 'h5d_alloc_time_late_f' 0 181
-'h5d_alloc_time_error_f' 0 184 'h5d_alloc_time_incr_f' 0 180
-'h5d_chunked_f' 0 185 'h5d_chunk_cache_nslots_dflt_f' 0 168
-'h5d_chunk_cache_nbytes_dflt_f' 0 167 'h5d_chunk_cache_w0_dflt_f' 0 166
-'h5d_fill_time_alloc_f' 0 174 'h5f_close_weak_f' 0 218
-'h5d_fill_value_user_defined_f' 0 169 'h5d_fill_time_never_f' 0 173
-'h5d_fill_value_error_f' 0 172 'h5d_fill_value_default_f' 0 170
-'h5d_fill_value_undefined_f' 0 171 'h5d_space_sts_not_allocated_f' 0 178
-'h5d_space_sts_error_f' 0 179 'h5d_flags_len' 0 276 'h5d_flags' 0 11
-'h5d_space_sts_allocated_f' 0 176 'h5f_close_default_f' 0 219
-'h5f_acc_trunc_f' 0 224 'h5f_acc_rdonly_f' 0 225 'h5f_acc_debug_f' 0 222
-'h5d_space_sts_part_allocated_f' 0 177 'h5f_acc_excl_f' 0 223
-'h5f_acc_rdwr_f' 0 226 'h5f_close_semi_f' 0 217 'h5f_close_strong_f' 0
-216 'h5fd_mpio_independent_f' 0 165 'h5fd_mem_default_f' 0 162
-'h5fd_hid_flags_len' 0 279 'h5fd_core_f' 0 154 'h5f_obj_file_f' 0 215
-'h5f_libver_latest_f' 0 209 'h5f_flags' 0 19 'h5f_flags_len' 0 277
-'h5f_libver_earliest_f' 0 210 'h5f_obj_datatype_f' 0 212
-'h5f_obj_dataset_f' 0 214 'h5f_obj_all_f' 0 211 'h5f_scope_global_f' 0
-220 'h5f_obj_group_f' 0 213 'h5f_scope_local_f' 0 221 'h5fd_hid_flags' 0
-12 'h5fd_flags_len' 0 278 'h5fd_family_f' 0 153 'h5fd_flags' 0 13
-'h5fd_log_f' 0 152 'h5fd_mem_btree_f' 0 160 'h5fd_mem_ntypes_f' 0 155
-'h5fd_mem_nolist_f' 0 163 'h5fd_mem_draw_f' 0 159 'h5fd_mem_lheap_f' 0
-157 'h5fd_mem_gheap_f' 0 158 'h5fd_mem_ohdr_f' 0 156 'h5fd_mpio_f' 0 151
-'h5fd_mem_super_f' 0 161 'h5fd_mpio_collective_f' 0 164 'h5fd_stdio_f' 0
-148 'h5fd_sec2_f' 0 149 'h5fd_multi_f' 0 150 'h5g_link_hard_f' 0 193
-'h5g_dataset_f' 0 197 'h5fortran_types' 0 280 'h5g_link_error_f' 0 194
-'h5g_group_f' 0 198 'h5g_flags_len' 0 281 'h5g_flags' 0 14 'h5g_link_f'
-0 195 'h5g_link_soft_f' 0 192 'h5g_storage_type_compact_f' 0 189
-'h5o_hdr_attr_crt_order_track_f' 0 119 'h5o_copy_without_attr_flag_f' 0
-130 'h5i_datatype_f' 0 145 'h5g_type_f' 0 196 'h5g_storage_type_unknown_f'
-0 191 'h5g_storage_type_symbol_table_f' 0 190 'h5generic_flags_len' 0
-283 'h5g_unknown_f' 0 199 'h5generic_flags' 0 15 'h5i_dataset_f' 0 143
-'h5global' 0 282 'h5i_attr_f' 0 142 'h5i_badid_f' 0 141 'h5i_dataspace_f'
-0 144 'h5l_link_class_t_vers_f' 0 135 'h5i_file_f' 0 147 'h5i_flags_len'
-0 285 'h5i_flags' 0 6 'h5i_group_f' 0 146 'h5l_flags' 0 2 'h5l_flags_len'
-0 284 'h5o_copy_shallow_hierarchy_f' 0 134 'h5o_copy_expand_ext_link_f'
-0 132 'h5l_same_loc_f' 0 136 'h5l_type_external_f' 0 137
-'h5l_type_error_f' 0 140 'h5o_copy_all_f' 0 128 'h5lib_flags_len' 0 286
-'h5l_type_soft_f' 0 138 'h5l_type_hard_f' 0 139 'h5lib_flags' 0 17
-'h5o_copy_expand_reference_f' 0 131 'h5o_copy_expand_soft_link_f' 0 133
-'h5o_copy_preserve_null_flag_f' 0 129 'h5o_hdr_all_flags_f' 0 115
-'h5o_flags' 0 16 'h5o_flags_len' 0 287 'h5o_hdr_attr_crt_order_index_f'
-0 118 'h5p_file_mount_f' 0 108 'h5p_default_f' 0 107
-'h5o_shmesg_pline_flag_f' 0 123 'h5o_shmesg_max_nindexes_f' 0 114
-'h5o_shmesg_all_flag_f' 0 121 'h5o_hdr_chunk0_size_f' 0 120
-'h5o_hdr_attr_store_phase_cha_f' 0 117 'h5o_hdr_store_times_f' 0 116
-'h5o_shmesg_attr_flag_f' 0 122 'h5o_shmesg_max_list_size_f' 0 113
-'h5o_shmesg_fill_flag_f' 0 124 'h5o_shmesg_dtype_flag_f' 0 125
-'h5o_shmesg_none_flag_f' 0 127 'h5p_dataset_xfer_f' 0 109
-'h5p_crt_order_indexed_f' 0 94 'h5o_shmesg_sdspace_flag_f' 0 126
-'h5p_attribute_create_f' 0 98 'h5p_crt_order_tracked_f' 0 93
-'h5p_dataset_create_f' 0 110 'h5p_dataset_access_f' 0 104
-'h5p_datatype_access_f' 0 100 'h5p_datatype_create_f' 0 101
-'h5p_file_access_f' 0 111 'h5p_file_create_f' 0 112 'h5p_flags_len' 0
-289 'h5p_flags_int_len' 0 288 'h5p_flags_int' 0 4 'h5p_flags' 0 18
-'h5p_link_access_f' 0 95 'h5p_group_create_f' 0 103 'h5p_group_access_f'
-0 102 'h5p_object_create_f' 0 105 'h5p_object_copy_f' 0 97
-'h5p_link_create_f' 0 96 'h5p_root_f' 0 106 'h5tget_offset_f' 0 635
-'h5t_std_u16le' 0 232 'h5s_select_append_f' 0 78 'h5s_sel_hyperslabs_f'
-0 72 'h5s_all_f' 0 84 'h5r_dataset_region_f' 0 91 'h5r_flags' 0 8
-'h5r_flags_len' 0 290 'h5r_object_f' 0 92 'h5s_flags_len' 0 291
-'h5s_flags' 0 10 'h5s_sel_all_f' 0 71 'h5s_scalar_f' 0 90 'h5s_null_f' 0
-88 'h5s_sel_error_f' 0 75 'h5s_sel_none_f' 0 74 'h5s_select_and_f' 0 82
-'h5s_sel_points_f' 0 73 'h5t_cset_ascii_f' 0 46 'h5s_select_nota_f' 0 79
-'h5s_select_invalid_f' 0 76 'h5s_select_noop_f' 0 83 'h5t_compound_f' 0
-63 'h5s_simple_f' 0 89 'h5s_select_prepend_f' 0 77 'h5s_select_notb_f' 0
-80 'h5s_select_or_f' 0 86 'h5s_select_xor_f' 0 81 'h5s_select_set_f' 0
-87 'h5s_unlimited_f' 0 85 'h5t_array_f' 0 39 'h5t' 0 292 'h5t_bitfield_f'
-0 65 'h5t_enum_f' 0 61 'h5t_dir_descend_f' 0 37 'h5t_cset_utf8_f' 0 45
-'h5t_dir_ascend_f' 0 38 'h5t_std_ref_obj' 0 256 'h5t_native_character' 0
-257 'h5t_ieee_f32be' 0 247 'h5t_float_f' 0 68 'h5t_flags' 0 3
-'h5t_flags_len' 0 293 'h5t_ieee_f64le' 0 244 'h5t_ieee_f64be' 0 245
-'h5t_ieee_f32le' 0 246 'h5t_integer_f' 0 69 'h5t_std_i64le' 0 236
-'h5t_pad_error_f' 0 53 'h5t_native_integer_1' 0 254 'h5t_native_double'
-0 258 'h5t_native_integer' 0 260 'h5t_pad_background_f' 0 54
-'h5t_norm_none_f' 0 47 'h5t_norm_implied_f' 0 49 'h5t_native_integer_2'
-0 253 'h5t_native_integer_4' 0 252 'h5t_native_real_16' 0 248
-'h5t_native_real' 0 259 'h5t_native_integer_8' 0 251 'h5t_native_real_4'
-0 250 'h5t_native_real_8' 0 249 'h5t_no_class_f' 0 70 'h5t_norm_msbset_f'
-0 48 'h5t_opaque_f' 0 64 'h5t_order_le_f' 0 60 'h5t_order_be_f' 0 59
-'h5t_order_none_f' 0 57 'h5t_order_vax_f' 0 58 'h5t_std_i32be' 0 239
-'h5t_pad_zero_f' 0 56 'h5t_pad_one_f' 0 55 'h5t_reference_f' 0 62
-'h5t_sgn_error_f' 0 50 'h5t_sgn_2_f' 0 51 'h5t_std_i16le' 0 240
-'h5t_sgn_none_f' 0 52 'h5t_std_i16be' 0 241 'h5t_std_i32le' 0 238
-'h5t_std_i64be' 0 237 'h5t_std_ref_dsetreg' 0 255 'h5t_std_i8le' 0 242
-'h5t_std_i8be' 0 243 'h5t_std_u16be' 0 233 'h5t_std_u32le' 0 230
-'h5t_std_u32be' 0 231 'h5tget_fields_f' 0 472 'h5t_str_error_f' 0 41
-'h5t_std_u8be' 0 235 'h5t_std_u64le' 0 228 'h5t_std_u64be' 0 229
-'h5t_std_u8le' 0 234 'h5tcopy_f' 0 409 'h5tcommit_anon_f' 0 325
-'h5tclose_f' 0 301 'h5t_str_nullpad_f' 0 43 'h5tarray_create_f' 0 294
-'h5t_str_nullterm_f' 0 44 'h5t_string_f' 0 66 'h5t_string' 0 227
-'h5t_str_spacepad_f' 0 42 'h5t_vlen_f' 0 40 'h5t_time_f' 0 67
-'h5tcommit_f' 0 316 'h5tcommitted_f' 0 311 'h5tcompiler_conv_f' 0 305
-'h5tget_cset_f' 0 404 'h5tget_create_plist_f' 0 394 'h5tequal_f' 0 388
-'h5tencode_f' 0 367 'h5tdecode_f' 0 338 'h5tcreate_f' 0 332
-'h5tenum_insert_f' 0 361 'h5tenum_create_f' 0 343 'h5tenum_valueof_f' 0
-355 'h5tenum_nameof_f' 0 348 'h5tget_array_dims_f' 0 383 'h5tget_class_f'
-0 378 'h5tget_array_ndims_f' 0 373 'h5tget_ebias_f' 0 399
-'h5tget_native_type_f' 0 466 'h5tget_member_class_f' 0 450
-'h5tget_inpad_f' 0 414 'h5tget_member_value_f' 0 444
-'h5tget_member_offset_f' 0 438 'h5tget_member_index_f' 0 426
-'h5tget_member_name_f' 0 419 'h5tget_member_type_f' 0 432 'h5tget_norm_f'
-0 461 'h5tget_nmembers_f' 0 456 'h5tset_fields_f' 0 626
-'h5tget_precision_f' 0 551 'h5tget_pad_f' 0 486 'h5tget_order_f' 0 481
-'h5tset_cset_f' 0 546 'h5topen_f' 0 534 'h5tget_strpad_f' 0 525
-'h5tget_size_f' 0 497 'h5tget_sign_f' 0 492 'h5tis_variable_str_f' 0 520
-'h5tget_super_f' 0 515 'h5tget_tag_f' 0 509 'h5tinsert_f' 0 502
-'h5tpack_f' 0 530 'h5tset_ebias_f' 0 541 'integer_types' 0 7 'hssize_t'
-0 620 'h5z_disable_edc_f' 0 30 'h5tset_sign_f' 0 607 'h5tset_pad_f' 0
-581 'h5tset_norm_f' 0 571 'h5tset_inpad_f' 0 556 'h5tset_order_f' 0 566
-'h5tset_offset_f' 0 561 'h5tset_precision_f' 0 576 'h5tset_tag_f' 0 602
-'h5tset_size_f' 0 592 'h5tset_strpad_f' 0 587 'h5tvlen_create_f' 0 597
-'hobj_ref_t_f' 0 618 'h5z_filter_all_f' 0 23 'h5z_enable_edc_f' 0 29
-'h5z_error_edc_f' 0 31 'h5z_filter_error_f' 0 36
-'h5z_filter_decode_enabled_f' 0 24 'h5z_filter_deflate_f' 0 34
-'h5z_filter_encode_enabled_f' 0 25 'hdset_reg_ref_t_f' 0 615 'h5z_flags'
-0 9 'h5z_filter_shuffle_f' 0 33 'h5z_filter_none_f' 0 35
-'h5z_filter_fletcher32_f' 0 32 'h5z_flag_optional_f' 0 26
-'h5z_filter_szip_f' 0 27 'h5z_no_edc_f' 0 28 'h5z_flags_len' 0 612
-'haddr_t' 0 613 'hid_t' 0 614 'hsize_t' 0 617 'predef_types' 0 5
-'object_namelen_default_f' 0 622 'integer_types_len' 0 621
-'ref_reg_buf_len' 0 625 'predef_types_len' 0 623 'size_t' 0 624)
diff --git a/interfaces/ext/hdf5/h5tb.mod b/interfaces/ext/hdf5/h5tb.mod
deleted file mode 100644
index 17dc171..0000000
--- a/interfaces/ext/hdf5/h5tb.mod
+++ /dev/null
@@ -1,16846 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/hl/fortran/src/H5TBff.f90 on Mon Feb 14 14:36:23 2011
-If you edit this, you'll get what you deserve.
-
-(() () () () () () () () () () () () () () () () () () () ()
-())
-
-()
-
-(('h5tbread_field_index_f' '' 2 3 4 5) ('h5aread_f' '' 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) ('h5awrite_f' '' 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) ('h5dextend_f' '' 70) (
-'h5dfill_f' '' 71 72 73 74) ('h5dread_f' '' 75 76 77 78 79 80 81 82 83
-84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
-106 107 108) ('h5dread_vl_f' '' 109 110 111) ('h5dwrite_vl_f' '' 112 113
-114) ('h5dwrite_f' '' 115 116 117 118 119 120 121 122 123 124 125 126
-127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
-145 146 147 148) ('h5pget_f' '' 149 150 151 152) ('h5pget_fill_value_f' ''
-153 154 155 156) ('h5pinsert_f' '' 157 158 159 160) ('h5pregister_f' ''
-161 162 163 164) ('h5pset_f' '' 165 166 167 168) ('h5pset_fapl_multi_f' ''
-169 170) ('h5pset_fill_value_f' '' 171 172 173 174) ('h5rdereference_f' ''
-175 176) ('h5rcreate_f' '' 177 178) ('h5rget_name_f' '' 179 180) (
-'h5rget_object_type_f' '' 181) ('h5rget_region_f' '' 182) (
-'h5tbinsert_field_f' '' 183 184 185 186) ('h5tbread_field_name_f' '' 187
-188 189 190) ('h5tbwrite_field_index_f' '' 191 192 193 194) (
-'h5tbwrite_field_name_f' '' 195 196 197 198))
-
-(('h5s_flags' 199 0) ('predefined_types' 200 0) ('h5p_flags_int' 201 0)
-('h5i_flags' 202 0) ('h5z_flags' 203 0) ('h5s_flags' 199 0) ('h5r_flags'
-204 0) ('h5generic_flags' 205 0) ('h5fd_flags' 206 0) ('h5fd_hid_flags'
-207 0) ('h5g_flags' 208 0) ('h5t_flags' 209 0) ('h5d_flags' 210 0) (
-'h5l_flags' 211 0) ('h5lib_flags' 212 0) ('h5f_flags' 213 0) ('h5p_flags'
-214 0) ('h5p_flags_int' 201 0) ('predefined_types' 200 0) ('h5t_flags'
-209 0) ('h5t_flags' 209 0) ('h5l_flags' 211 0) ('h5r_flags' 204 0) (
-'floating_types' 215 0) ('h5d_flags' 210 0) ('integer_types' 216 0) (
-'h5z_flags' 203 0) ('h5s_flags' 199 0) ('h5o_flags' 217 0) ('h5i_flags'
-202 0) ('h5g_flags' 208 0) ('h5p_flags' 214 0) ('h5fd_flags' 206 0) (
-'h5generic_flags' 205 0) ('h5fd_hid_flags' 207 0) ('h5g_flags' 208 0) (
-'h5p_flags_int' 201 0) ('h5lib_flags' 212 0) ('floating_types' 215 0) (
-'h5d_flags' 210 0) ('h5t_flags' 209 0) ('predefined_types' 200 0) (
-'floating_types' 215 0) ('h5l_flags' 211 0) ('h5l_flags' 211 0) (
-'h5i_flags' 202 0) ('h5r_flags' 204 0) ('predefined_types' 200 0) (
-'h5f_flags' 213 0) ('h5o_flags' 217 0) ('integer_types' 216 0) (
-'h5fd_hid_flags' 207 0) ('h5z_flags' 203 0) ('h5g_flags' 208 0) (
-'h5generic_flags' 205 0) ('floating_types' 215 0) ('h5f_flags' 213 0) (
-'h5i_flags' 202 0) ('h5p_flags' 214 0) ('h5d_flags' 210 0) ('h5t_flags'
-209 0) ('h5lib_flags' 212 0) ('floating_types' 215 0) ('h5l_flags' 211 0)
-('h5t_flags' 209 0) ('h5o_flags' 217 0) ('h5s_flags' 199 0) ('h5i_flags'
-202 0) ('integer_types' 216 0) ('h5s_flags' 199 0) ('h5fd_flags' 206 0)
-('h5fd_hid_flags' 207 0) ('h5fd_flags' 206 0) ('h5z_flags' 203 0) (
-'h5p_flags_int' 201 0) ('integer_types' 216 0) ('h5r_flags' 204 0) (
-'h5f_flags' 213 0) ('h5d_flags' 210 0) ('h5f_flags' 213 0) (
-'h5p_flags_int' 201 0) ('h5t_flags' 209 0) ('h5lib_flags' 212 0) (
-'h5l_flags' 211 0) ('h5s_flags' 199 0) ('h5z_flags' 203 0) (
-'predefined_types' 200 0) ('h5lib_flags' 212 0) ('h5p_flags' 214 0) (
-'h5generic_flags' 205 0) ('h5o_flags' 217 0) ('h5g_flags' 208 0) (
-'integer_types' 216 0) ('h5fd_flags' 206 0) ('h5d_flags' 210 0) (
-'h5generic_flags' 205 0) ('h5o_flags' 217 0) ('h5f_flags' 213 0) (
-'predefined_types' 200 0) ('h5lib_flags' 212 0) ('floating_types' 215 0)
-('h5g_flags' 208 0) ('h5s_flags' 199 0) ('h5d_flags' 210 0) ('h5r_flags'
-204 0) ('h5p_flags_int' 201 0) ('floating_types' 215 0) ('h5fd_hid_flags'
-207 0) ('h5fd_flags' 206 0) ('integer_types' 216 0) ('h5g_flags' 208 0)
-('h5generic_flags' 205 0) ('h5fd_flags' 206 0) ('h5i_flags' 202 0) (
-'h5p_flags' 214 0) ('h5fd_hid_flags' 207 0) ('h5r_flags' 204 0) (
-'h5z_flags' 203 0) ('h5d_flags' 210 0) ('h5lib_flags' 212 0) ('h5l_flags'
-211 0) ('h5fd_hid_flags' 207 0) ('floating_types' 215 0) (
-'predefined_types' 200 0) ('h5p_flags_int' 201 0) ('h5i_flags' 202 0) (
-'integer_types' 216 0) ('h5d_flags' 210 0) ('h5z_flags' 203 0) (
-'h5f_flags' 213 0) ('h5t_flags' 209 0) ('h5i_flags' 202 0) ('h5fd_flags'
-206 0) ('h5fd_hid_flags' 207 0) ('h5lib_flags' 212 0) ('h5p_flags' 214 0)
-('h5p_flags_int' 201 0) ('h5g_flags' 208 0) ('floating_types' 215 0) (
-'h5generic_flags' 205 0) ('h5o_flags' 217 0) ('h5s_flags' 199 0) (
-'h5p_flags' 214 0) ('h5t_flags' 209 0) ('predefined_types' 200 0) (
-'h5p_flags_int' 201 0) ('h5p_flags_int' 201 0) ('h5g_flags' 208 0) (
-'h5r_flags' 204 0) ('h5s_flags' 199 0) ('h5z_flags' 203 0) ('h5d_flags'
-210 0) ('integer_types' 216 0) ('h5generic_flags' 205 0) ('h5g_flags'
-208 0) ('h5i_flags' 202 0) ('h5o_flags' 217 0) ('h5fd_flags' 206 0) (
-'h5lib_flags' 212 0) ('h5p_flags' 214 0) ('h5d_flags' 210 0) ('h5f_flags'
-213 0) ('h5f_flags' 213 0) ('h5t_flags' 209 0) ('h5fd_hid_flags' 207 0)
-('h5generic_flags' 205 0) ('h5z_flags' 203 0) ('h5f_flags' 213 0) (
-'h5l_flags' 211 0) ('integer_types' 216 0) ('h5i_flags' 202 0) (
-'h5p_flags_int' 201 0) ('h5fd_hid_flags' 207 0) ('h5z_flags' 203 0) (
-'h5r_flags' 204 0) ('predefined_types' 200 0) ('integer_types' 216 0) (
-'h5generic_flags' 205 0) ('h5fd_flags' 206 0) ('h5o_flags' 217 0) (
-'h5o_flags' 217 0) ('h5g_flags' 208 0) ('floating_types' 215 0) (
-'h5l_flags' 211 0) ('h5f_flags' 213 0) ('h5s_flags' 199 0) ('h5p_flags'
-214 0) ('h5fd_hid_flags' 207 0) ('h5lib_flags' 212 0) ('h5p_flags_int'
-201 0) ('h5fd_flags' 206 0) ('h5d_flags' 210 0) ('predefined_types' 200
-0) ('floating_types' 215 0) ('h5s_flags' 199 0) ('h5i_flags' 202 0) (
-'h5t_flags' 209 0) ('h5r_flags' 204 0) ('h5d_flags' 210 0) ('h5p_flags'
-214 0) ('h5lib_flags' 212 0) ('h5lib_flags' 212 0) ('h5r_flags' 204 0) (
-'h5p_flags' 214 0) ('h5o_flags' 217 0) ('h5t_flags' 209 0) (
-'h5generic_flags' 205 0) ('h5f_flags' 213 0) ('h5g_flags' 208 0) (
-'h5i_flags' 202 0) ('h5t_flags' 209 0) ('h5p_flags' 214 0) (
-'floating_types' 215 0) ('predefined_types' 200 0) ('h5p_flags_int' 201
-0) ('h5r_flags' 204 0) ('h5z_flags' 203 0) ('integer_types' 216 0) (
-'h5o_flags' 217 0) ('h5generic_flags' 205 0) ('h5g_flags' 208 0) (
-'h5s_flags' 199 0) ('h5d_flags' 210 0) ('h5fd_hid_flags' 207 0) (
-'h5r_flags' 204 0) ('h5lib_flags' 212 0) ('h5r_flags' 204 0) ('h5p_flags'
-214 0) ('h5s_flags' 199 0) ('h5fd_hid_flags' 207 0) ('h5fd_flags' 206 0)
-('h5z_flags' 203 0) ('h5l_flags' 211 0) ('h5o_flags' 217 0) ('h5r_flags'
-204 0) ('integer_types' 216 0) ('integer_types' 216 0) ('h5i_flags' 202
-0) ('h5i_flags' 202 0) ('predefined_types' 200 0) ('h5s_flags' 199 0) (
-'h5fd_hid_flags' 207 0) ('floating_types' 215 0) ('h5l_flags' 211 0) (
-'h5g_flags' 208 0) ('h5lib_flags' 212 0) ('predefined_types' 200 0) (
-'h5f_flags' 213 0) ('h5fd_flags' 206 0) ('h5generic_flags' 205 0) (
-'h5o_flags' 217 0) ('h5p_flags' 214 0) ('h5fd_flags' 206 0) ('h5t_flags'
-209 0) ('integer_types' 216 0) ('predefined_types' 200 0) (
-'h5p_flags_int' 201 0) ('h5d_flags' 210 0) ('h5z_flags' 203 0) (
-'h5p_flags_int' 201 0) ('h5l_flags' 211 0) ('h5i_flags' 202 0) (
-'floating_types' 215 0) ('h5s_flags' 199 0) ('integer_types' 216 0) (
-'h5r_flags' 204 0) ('h5generic_flags' 205 0) ('h5f_flags' 213 0) (
-'h5l_flags' 211 0) ('h5fd_hid_flags' 207 0) ('h5p_flags' 214 0) (
-'h5f_flags' 213 0) ('h5o_flags' 217 0) ('h5lib_flags' 212 0) ('h5z_flags'
-203 0) ('h5l_flags' 211 0) ('floating_types' 215 0) ('h5generic_flags'
-205 0) ('h5fd_flags' 206 0) ('h5g_flags' 208 0) ('h5l_flags' 211 0) (
-'h5o_flags' 217 0) ('h5z_flags' 203 0) ('h5t_flags' 209 0) (
-'predefined_types' 200 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 212 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 218 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 212 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 203
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 226 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 203 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 228 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 229 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 230 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 231 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 232 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 233 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 234 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 235 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 236 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 242 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 244 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 245 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 260 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 261 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 262 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 263 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 264 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 265 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 266 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 267 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 268 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 269 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 270 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 271 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 272 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 273 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 274 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 275 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 276 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 277 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 278 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 279 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 280 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 281 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 282 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 283 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 284 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 285 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 286 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 287 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 288 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 289 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 201 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 290 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-201 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 291 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 292 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 293 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 294 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 295 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 296 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 297 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 298 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 299 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 300 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 301 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 302 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 303 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 304 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 305 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 306 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 307 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 308 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 309 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 310 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 311 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 312 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 313 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 314 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 315 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 316 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 317 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 318 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 319 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 320 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 321 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 322 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 323 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 324 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 325 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 326 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 327 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 328 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 329 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 330 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 331 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 332 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 333 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 334 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 335 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 336 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 337 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 338 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 339 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 340 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 341 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 342 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 343 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 344 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 345 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 346 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 347 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 348 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 349 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 350 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 351 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 352 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 353 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 354 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 355 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 356 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 357 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 358 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 359 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 360 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 361 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 362 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 363 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 364 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 365 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 366 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 367 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 368 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 369 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 370 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 371 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 372 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 373 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 374 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 375 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 376 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 377 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 378 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 379 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 380 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 381 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 382 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 383 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 384 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 385 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 386 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 387 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 388 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 389 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 390 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 391 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 392 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 393 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 394 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 395 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 396 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 397 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 398 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 399 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 400 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 401 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 402 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 403 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 404 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 405 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 406 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 407 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 408 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 409 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 410 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 411 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 412 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 413 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 414 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 415 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 416 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 417 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 418 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 419 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 420 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 421 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 422 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 423 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 424 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 425 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 426 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 427 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 428 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 429 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 430 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 431 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 432 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 433 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 434 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 435 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 436 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 437 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 438 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 439 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 440 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 441 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 442 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 443 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 444 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 445 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 446 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 447 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 448 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 449 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 450 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 451 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 452 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 453 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 454 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 455 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 456 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 457 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 212 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 218 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 212 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 203
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 226 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 203 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 228 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 229 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 230 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 231 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 232 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 233 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 234 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 235 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 236 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 242 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 244 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 245 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 260 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 261 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 262 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 263 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 264 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 265 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 266 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 267 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 268 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 269 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 270 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 271 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 272 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 273 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 274 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 275 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 276 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 277 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 278 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 279 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 280 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 281 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 282 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 283 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 284 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 285 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 286 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 287 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 288 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 289 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 201 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 290 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-201 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 291 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 292 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 293 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 294 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 295 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 296 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 297 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 298 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 299 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 300 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 301 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 302 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 303 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 304 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 305 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 306 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 307 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 308 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 309 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 310 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 311 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 312 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 313 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 314 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 315 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 316 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 317 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 318 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 319 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 320 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 321 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 322 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 323 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 324 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 325 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 326 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 327 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 328 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 329 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 330 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 331 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 332 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 333 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 334 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 335 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 336 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 337 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 338 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 339 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 340 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 341 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 342 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 343 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 344 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 345 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 346 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 347 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 348 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 349 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 350 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 351 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 352 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 353 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 354 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 355 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 356 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 357 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 358 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 359 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 360 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 361 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 362 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 363 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 364 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 365 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 366 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 367 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 368 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 369 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 370 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 371 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 372 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 373 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 374 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 375 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 376 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 377 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 378 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 379 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 380 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 381 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 382 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 383 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 384 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 385 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 386 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 387 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 388 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 389 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 390 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 391 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 392 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 393 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 394 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 395 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 396 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 397 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 398 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 399 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 400 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 401 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 402 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 403 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 404 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 405 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 406 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 407 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 408 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 409 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 410 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 411 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 412 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 413 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 414 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 415 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 416 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 417 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 418 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 419 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 420 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 421 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 422 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 423 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 424 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 425 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 426 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 427 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 428 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 429 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 430 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 431 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 432 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 433 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 434 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 435 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 436 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 437 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 438 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 439 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 440 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 441 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 442 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 443 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 444 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 445 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 446 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 447 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 448 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 449 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 450 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 451 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 452 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 453 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 454 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 455 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 456 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 457 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 212 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 218 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 212 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 203
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 226 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 203 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 228 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 229 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 230 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 231 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 232 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 233 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 234 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 235 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 236 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 242 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 244 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 245 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 260 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 261 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 262 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 263 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 264 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 265 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 266 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 267 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 268 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 269 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 270 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 271 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 272 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 273 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 274 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 275 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 276 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 277 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 278 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 279 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 280 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 281 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 282 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 283 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 284 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 285 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 286 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 287 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 288 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 289 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 201 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 290 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-201 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 291 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 292 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 293 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 294 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 295 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 296 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 297 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 298 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 299 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 300 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 301 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 302 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 303 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 304 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 305 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 306 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 307 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 308 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 309 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 310 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 311 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 312 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 313 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 314 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 315 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 316 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 317 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 318 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 319 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 320 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 321 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 322 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 323 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 324 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 325 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 326 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 327 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 328 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 329 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 330 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 331 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 332 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 333 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 334 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 335 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 336 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 337 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 338 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 339 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 340 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 341 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 342 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 343 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 344 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 345 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 346 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 347 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 348 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 349 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 350 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 351 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 352 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 353 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 354 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 355 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 356 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 357 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 358 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 359 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 360 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 361 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 362 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 363 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 364 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 365 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 366 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 367 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 368 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 369 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 370 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 371 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 372 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 373 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 374 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 375 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 376 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 377 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 378 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 379 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 380 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 381 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 382 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 383 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 384 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 385 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 386 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 387 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 388 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 389 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 390 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 391 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 392 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 393 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 394 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 395 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 396 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 397 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 398 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 399 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 400 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 401 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 402 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 403 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 404 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 405 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 406 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 407 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 408 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 409 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 410 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 411 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 412 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 413 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 414 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 415 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 416 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 417 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 418 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 419 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 420 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 421 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 422 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 423 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 424 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 425 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 426 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 427 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 428 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 429 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 430 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 431 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 432 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 433 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 434 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 435 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 436 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 437 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 438 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 439 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 440 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 441 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 442 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 443 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 444 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 445 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 446 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 447 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 448 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 449 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 450 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 451 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 452 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 453 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 454 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 455 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 456 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 457 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 212 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 218 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 212 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 203
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 226 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 203 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 228 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 229 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 230 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 231 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 232 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 233 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 234 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 235 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 236 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 242 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 244 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 245 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 260 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 261 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 262 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 263 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 264 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 265 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 266 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 267 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 268 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 269 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 270 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 271 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 272 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 273 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 274 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 275 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 276 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 277 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 278 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 279 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 280 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 281 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 282 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 283 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 284 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 285 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 286 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 287 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 288 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 289 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 201 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 290 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-201 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 291 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 292 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 293 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 294 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 295 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 296 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 297 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 298 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 299 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 300 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 301 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 302 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 303 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 304 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 305 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 306 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 307 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 308 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 309 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 310 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 311 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 312 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 313 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 314 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 315 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 316 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 317 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 318 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 319 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 320 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 321 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 322 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 323 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 324 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 325 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 326 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 327 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 328 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 329 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 330 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 331 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 332 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 333 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 334 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 335 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 336 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 337 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 338 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 339 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 340 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 341 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 342 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 343 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 344 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 345 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 346 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 347 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 348 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 349 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 350 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 351 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 352 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 353 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 354 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 355 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 356 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 357 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 358 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 359 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 360 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 361 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 362 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 363 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 364 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 365 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 366 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 367 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 368 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 369 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 370 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 371 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 372 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 373 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 374 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 375 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 376 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 377 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 378 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 379 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 380 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 381 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 382 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 383 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 384 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 385 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 386 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 387 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 388 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 389 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 390 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 391 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 392 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 393 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 394 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 395 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 396 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 397 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 398 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 399 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 400 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 401 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 402 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 403 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 404 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 405 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 406 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 407 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 408 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 409 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 410 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 411 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 412 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 413 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 414 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 415 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 416 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 417 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 418 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 419 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 420 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 421 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 422 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 423 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 424 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 425 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 426 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 427 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 428 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 429 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 430 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 431 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 432 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 433 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 434 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 435 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 436 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 437 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 438 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 439 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 440 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 441 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 442 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 443 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 444 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 445 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 446 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 447 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 448 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 449 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 450 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 451 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 452 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 453 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 454 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 455 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 456 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 457 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 212 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 218 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 212 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 203
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 226 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 203 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 228 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 229 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 230 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 231 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 232 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 233 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 234 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 235 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 236 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 242 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 244 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 245 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 260 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 261 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 262 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 263 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 264 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 265 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 266 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 267 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 268 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 269 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 270 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 271 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 272 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 273 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 274 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 275 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 276 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 277 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 278 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 279 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 280 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 281 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 282 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 283 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 284 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 285 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 286 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 287 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 288 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 289 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 201 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 290 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-201 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 291 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 292 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 293 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 294 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 295 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 296 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 297 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 298 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 299 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 300 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 301 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 302 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 303 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 304 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 305 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 306 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 307 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 308 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 309 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 310 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 311 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 312 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 313 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 314 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 315 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 316 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 317 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 318 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 319 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 320 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 321 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 322 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 323 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 324 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 325 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 326 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 327 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 328 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 329 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 330 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 331 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 332 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 333 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 334 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 335 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 336 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 337 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 338 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 339 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 340 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 341 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 342 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 343 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 344 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 345 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 346 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 347 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 348 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 349 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 350 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 351 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 352 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 353 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 354 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 355 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 356 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 357 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 358 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 359 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 360 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 361 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 362 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 363 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 364 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 365 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 366 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 367 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 368 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 369 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 370 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 371 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 372 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 373 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 374 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 375 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 376 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 377 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 378 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 379 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 380 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 381 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 382 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 383 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 384 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 385 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 386 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 387 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 388 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 389 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 390 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 391 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 392 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 393 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 394 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 395 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 396 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 397 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 398 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 399 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 400 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 401 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 402 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 403 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 404 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 405 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 406 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 407 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 408 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 409 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 410 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 411 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 412 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 413 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 414 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 415 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 416 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 417 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 418 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 419 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 420 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 421 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 422 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 423 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 424 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 425 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 426 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 427 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 428 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 429 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 430 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 431 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 432 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 433 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 434 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 435 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 436 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 437 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 438 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 439 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 440 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 441 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 442 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 443 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 444 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 445 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 446 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 447 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 448 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 449 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 450 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 451 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 452 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 453 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 454 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 455 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 456 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 457 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 212 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 218 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 212 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 203
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 226 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 203 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 228 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 229 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 230 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 231 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 232 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 233 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 234 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 235 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 236 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 242 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 244 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 245 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 260 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 261 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 262 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 263 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 264 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 265 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 266 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 267 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 268 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 269 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 270 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 271 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 272 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 273 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 274 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 275 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 276 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 277 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 278 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 279 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 280 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 281 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 282 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 283 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 284 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 285 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 286 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 287 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 288 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 289 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 201 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 290 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-201 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 291 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 292 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 293 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 294 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 295 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 296 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 297 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 298 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 299 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 300 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 301 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 302 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 303 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 304 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 305 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 306 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 307 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 308 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 309 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 310 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 311 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 312 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 313 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 314 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 315 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 316 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 317 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 318 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 319 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 320 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 321 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 322 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 323 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 324 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 325 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 326 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 327 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 328 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 329 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 330 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 331 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 332 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 333 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 334 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 335 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 336 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 337 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 338 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 339 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 340 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 341 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 342 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 343 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 344 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 345 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 346 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 347 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 348 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 349 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 350 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 351 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 352 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 353 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 354 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 355 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 356 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 357 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 358 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 359 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 360 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 361 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 362 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 363 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 364 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 365 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 366 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 367 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 368 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 369 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 370 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 371 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 372 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 373 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 374 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 375 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 376 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 377 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 378 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 379 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 380 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 381 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 382 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 383 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 384 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 385 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 386 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 387 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 388 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 389 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 390 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 391 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 392 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 393 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 394 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 395 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 396 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 397 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 398 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 399 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 400 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 401 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 402 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 403 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 404 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 405 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 406 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 407 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 408 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 409 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 410 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 411 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 412 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 413 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 414 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 415 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 416 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 417 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 418 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 419 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 420 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 421 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 422 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 423 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 424 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 425 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 426 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 427 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 428 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 429 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 430 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 431 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 432 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 433 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 434 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 435 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 436 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 437 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 438 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 439 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 440 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 441 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 442 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 443 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 444 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 445 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 446 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 447 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 448 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 449 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 450 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 451 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 452 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 453 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 454 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 455 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 456 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 457 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 212 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 218 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 212 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 203
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 226 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 203 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 228 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 229 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 230 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 231 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 232 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 233 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 234 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 235 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 236 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 242 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 244 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 245 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 260 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 261 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 262 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 263 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 264 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 265 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 266 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 267 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 268 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 269 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 270 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 271 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 272 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 273 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 274 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 275 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 276 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 277 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 278 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 279 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 280 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 281 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 282 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 283 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 284 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 285 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 286 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 287 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 288 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 289 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 201 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 290 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-201 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 291 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 292 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 293 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 294 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 295 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 296 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 297 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 298 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 299 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 300 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 301 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 302 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 303 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 304 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 305 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 306 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 307 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 308 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 309 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 310 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 311 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 312 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 313 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 314 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 315 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 316 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 317 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 318 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 319 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 320 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 321 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 322 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 323 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 324 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 325 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 326 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 327 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 328 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 329 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 330 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 331 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 332 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 333 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 334 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 335 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 336 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 337 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 338 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 339 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 340 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 341 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 342 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 343 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 344 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 345 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 346 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 347 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 348 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 349 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 350 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 351 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 352 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 353 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 354 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 355 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 356 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 357 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 358 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 359 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 360 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 361 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 362 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 363 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 364 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 365 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 366 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 367 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 368 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 369 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 370 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 371 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 372 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 373 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 374 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 375 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 376 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 377 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 378 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 379 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 380 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 381 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 382 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 383 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 384 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 385 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 386 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 387 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 388 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 389 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 390 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 391 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 392 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 393 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 394 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 395 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 396 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 397 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 398 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 399 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 400 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 401 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 402 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 403 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 404 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 405 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 406 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 407 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 408 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 409 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 410 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 411 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 412 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 413 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 414 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 415 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 416 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 417 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 418 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 419 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 420 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 421 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 422 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 423 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 424 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 425 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 426 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 427 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 428 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 429 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 430 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 431 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 432 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 433 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 434 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 435 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 436 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 437 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 438 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 439 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 440 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 441 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 442 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 443 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 444 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 445 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 446 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 447 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 448 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 449 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 450 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 451 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 452 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 453 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 454 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 455 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 456 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 457 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 212 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 218 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 212 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 203
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 226 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 203 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 228 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 229 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 230 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 231 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 232 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 233 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 234 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 235 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 236 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 242 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 244 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 245 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 260 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 261 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 262 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 263 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 264 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 265 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 266 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 267 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 268 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 269 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 270 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 271 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 272 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 273 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 274 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 275 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 276 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 277 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 278 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 279 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 280 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 281 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 282 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 283 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 284 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 285 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 286 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 287 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 288 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 289 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 201 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 290 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-201 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 291 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 292 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 293 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 294 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 295 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 296 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 297 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 298 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 299 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 300 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 301 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 302 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 303 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 304 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 305 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 306 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 307 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 308 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 309 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 310 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 311 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 312 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 313 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 314 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 315 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 316 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 317 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 318 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 319 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 320 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 321 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 322 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 323 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 324 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 325 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 326 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 327 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 328 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 329 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 330 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 331 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 332 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 333 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 334 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 335 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 336 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 337 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 338 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 339 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 340 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 341 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 342 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 343 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 344 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 345 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 346 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 347 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 348 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 349 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 350 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 351 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 352 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 353 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 354 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 355 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 356 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 357 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 358 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 359 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 360 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 361 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 362 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 363 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 364 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 365 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 366 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 367 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 368 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 369 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 370 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 371 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 372 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 373 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 374 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 375 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 376 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 377 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 378 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 379 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 380 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 381 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 382 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 383 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 384 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 385 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 386 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 387 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 388 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 389 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 390 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 391 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 392 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 393 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 394 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 395 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 396 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 397 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 398 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 399 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 400 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 401 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 402 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 403 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 404 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 405 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 406 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 407 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 408 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 409 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 410 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 411 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 412 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 413 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 414 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 415 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 416 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 417 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 418 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 419 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 420 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 421 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 422 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 423 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 424 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 425 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 426 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 427 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 428 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 429 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 430 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 431 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 432 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 433 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 434 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 435 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 436 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 437 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 438 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 439 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 440 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 441 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 442 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 443 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 444 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 445 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 446 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 447 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 448 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 449 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 450 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 451 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 452 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 453 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 454 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 455 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 456 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 457 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 212 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 218 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 212 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 203
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 226 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 203 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 228 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 229 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 230 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 231 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 232 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 233 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 234 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 235 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 236 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 242 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 244 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 245 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 260 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 261 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 262 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 263 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 264 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 265 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 266 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 267 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 268 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 269 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 270 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 271 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 272 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 273 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 274 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 275 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 276 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 277 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 278 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 279 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 280 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 281 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 282 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 283 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 284 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 285 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 286 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 287 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 288 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 289 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 201 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 290 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-201 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 291 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 292 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 293 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 294 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 295 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 296 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 297 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 298 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 299 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 300 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 301 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 302 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 303 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 304 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 305 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 306 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 307 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 308 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 309 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 310 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 311 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 312 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 313 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 314 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 315 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 316 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 317 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 318 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 319 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 320 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 321 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 322 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 323 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 324 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 325 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 326 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 327 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 328 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 329 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 330 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 331 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 332 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 333 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 334 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 335 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 336 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 337 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 338 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 339 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 340 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 341 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 342 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 343 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 344 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 345 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 346 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 347 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 348 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 349 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 350 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 351 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 352 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 353 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 354 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 355 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 356 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 357 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 358 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 359 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 360 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 361 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 362 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 363 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 364 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 365 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 366 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 367 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 368 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 369 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 370 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 371 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 372 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 373 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 374 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 375 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 376 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 377 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 378 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 379 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 380 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 381 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 382 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 383 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 384 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 385 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 386 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 387 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 388 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 389 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 390 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 391 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 392 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 393 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 394 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 395 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 396 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 397 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 398 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 399 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 400 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 401 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 402 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 403 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 404 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 405 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 406 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 407 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 408 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 409 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 410 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 411 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 412 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 413 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 414 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 415 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 416 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 417 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 418 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 419 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 420 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 421 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 422 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 423 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 424 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 425 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 426 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 427 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 428 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 429 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 430 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 431 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 432 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 433 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 434 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 435 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 436 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 437 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 438 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 439 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 440 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 441 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 442 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 443 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 444 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 445 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 446 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 447 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 448 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 449 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 450 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 451 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 452 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 453 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 454 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 455 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 456 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 457 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 212 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 218 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 212 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 203
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 226 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 203 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 228 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 229 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 230 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 231 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 232 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 233 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 234 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 235 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 236 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 242 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 244 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 245 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 260 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 261 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 262 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 263 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 264 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 265 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 266 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 267 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 268 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 269 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 270 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 271 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 272 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 273 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 274 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 275 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 276 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 277 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 278 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 279 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 280 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 281 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 282 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 283 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 284 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 285 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 286 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 287 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 288 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 289 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 201 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 290 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-201 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 291 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 292 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 293 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 294 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 295 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 296 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 297 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 298 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 299 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 300 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 301 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 302 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 303 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 304 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 305 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 306 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 307 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 308 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 309 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 310 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 311 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 312 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 313 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 314 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 315 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 316 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 317 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 318 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 319 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 320 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 321 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 322 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 323 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 324 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 325 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 326 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 327 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 328 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 329 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 330 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 331 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 332 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 333 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 334 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 335 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 336 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 337 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 338 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 339 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 340 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 341 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 342 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 343 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 344 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 345 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 346 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 347 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 348 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 349 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 350 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 351 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 352 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 353 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 354 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 355 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 356 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 357 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 358 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 359 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 360 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 361 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 362 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 363 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 364 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 365 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 366 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 367 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 368 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 369 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 370 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 371 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 372 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 373 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 374 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 375 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 376 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 377 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 378 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 379 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 380 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 381 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 382 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 383 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 384 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 385 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 386 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 387 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 388 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 389 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 390 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 391 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 392 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 393 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 394 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 395 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 396 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 397 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 398 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 399 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 400 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 401 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 402 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 403 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 404 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 405 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 406 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 407 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 408 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 409 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 410 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 411 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 412 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 413 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 414 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 415 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 416 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 417 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 418 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 419 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 420 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 421 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 422 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 423 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 424 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 425 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 426 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 427 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 428 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 429 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 430 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 431 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 432 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 433 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 434 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 435 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 436 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 437 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 438 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 439 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 440 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 441 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 442 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 443 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 444 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 445 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 446 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 447 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 448 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 449 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 450 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 451 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 452 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 453 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 454 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 455 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 456 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 457 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 212 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 218 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 212 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 203
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 226 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 203 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 228 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 229 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 230 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 231 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 232 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 233 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 234 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 235 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 236 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 242 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 244 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 245 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 260 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 261 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 262 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 263 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 264 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 265 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 266 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 267 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 268 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 269 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 270 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 271 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 272 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 273 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 274 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 275 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 276 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 277 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 278 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 279 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 280 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 281 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 282 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 283 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 284 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 285 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 286 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 287 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 288 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 289 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 201 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 290 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-201 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 291 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 292 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 293 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 294 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 295 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 296 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 297 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 298 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 299 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 300 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 301 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 302 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 303 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 304 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 305 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 306 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 307 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 308 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 309 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 310 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 311 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 312 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 313 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 314 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 315 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 316 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 317 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 318 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 319 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 320 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 321 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 322 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 323 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 324 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 325 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 326 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 327 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 328 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 329 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 330 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 331 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 332 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 333 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 334 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 335 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 336 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 337 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 338 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 339 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 340 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 341 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 342 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 343 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 344 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 345 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 346 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 347 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 348 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 349 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 350 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 351 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 352 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 353 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 354 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 355 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 356 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 357 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 358 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 359 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 360 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 361 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 362 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 363 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 364 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 365 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 366 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 367 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 368 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 369 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 370 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 371 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 372 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 373 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 374 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 375 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 376 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 377 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 378 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 379 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 380 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 381 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 382 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 383 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 384 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 385 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 386 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 387 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 388 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 389 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 390 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 391 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 392 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 393 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 394 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 395 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 396 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 397 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 398 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 399 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 400 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 401 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 402 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 403 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 404 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 405 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 406 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 407 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 408 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 409 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 410 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 411 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 412 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 413 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 414 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 415 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 416 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 417 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 418 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 419 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 420 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 421 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 422 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 423 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 424 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 425 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 426 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 427 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 428 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 429 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 430 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 431 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 432 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 433 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 434 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 435 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 436 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 437 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 438 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 439 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 440 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 441 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 442 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 443 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 444 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 445 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 446 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 447 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 448 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 449 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 450 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 451 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 452 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 453 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 454 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 455 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 456 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 457 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 212 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 218 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 212 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 203
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 226 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 203 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 228 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 229 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 230 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 231 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 232 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 233 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 234 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 235 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 236 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 242 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 244 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 245 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 260 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 261 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 262 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 263 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 264 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 265 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 266 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 267 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 268 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 269 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 270 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 271 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 272 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 273 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 274 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 275 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 276 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 277 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 278 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 279 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 280 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 281 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 282 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 283 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 284 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 285 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 286 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 287 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 288 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 289 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 201 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 290 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-201 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 291 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 292 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 293 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 294 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 295 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 296 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 297 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 298 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 299 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 300 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 301 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 302 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 303 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 304 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 305 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 306 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 307 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 308 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 309 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 310 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 311 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 312 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 313 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 314 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 315 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 316 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 317 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 318 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 319 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 320 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 321 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 322 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 323 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 324 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 325 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 326 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 327 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 328 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 329 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 330 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 331 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 332 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 333 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 334 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 335 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 336 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 337 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 338 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 339 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 340 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 341 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 342 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 343 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 344 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 345 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 346 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 347 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 348 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 349 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 350 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 351 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 352 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 353 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 354 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 355 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 356 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 357 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 358 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 359 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 360 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 361 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 362 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 363 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 364 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 365 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 366 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 367 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 368 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 369 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 370 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 371 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 372 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 373 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 374 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 375 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 376 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 377 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 378 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 379 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 380 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 381 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 382 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 383 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 384 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 385 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 386 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 387 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 388 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 389 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 390 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 391 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 392 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 393 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 394 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 395 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 396 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 397 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 398 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 399 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 400 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 401 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 402 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 403 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 404 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 405 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 406 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 407 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 408 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 409 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 410 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 411 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 412 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 413 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 414 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 415 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 416 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 417 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 418 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 419 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 420 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 421 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 422 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 423 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 424 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 425 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 426 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 427 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 428 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 429 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 430 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 431 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 432 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 433 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 434 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 435 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 436 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 437 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 438 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 439 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 440 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 441 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 442 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 443 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 444 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 445 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 446 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 447 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 448 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 449 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 450 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 451 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 452 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 453 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 454 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 455 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 456 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 457 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 212 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 218 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 212 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 203
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 226 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 203 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 228 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 229 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 230 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 231 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 232 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 233 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 234 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 235 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 236 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 242 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 244 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 245 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 260 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 261 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 262 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 263 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 264 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 265 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 266 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 267 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 268 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 269 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 270 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 271 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 272 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 273 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 274 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 275 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 276 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 277 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 278 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 279 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 280 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 281 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 282 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 283 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 284 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 285 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 286 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 287 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 288 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 289 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 201 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 290 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-201 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 291 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 292 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 293 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 294 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 295 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 296 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 297 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 298 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 299 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 300 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 301 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 302 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 303 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 304 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 305 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 306 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 307 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 308 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 309 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 310 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 311 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 312 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 313 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 314 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 315 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 316 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 317 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 318 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 319 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 320 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 321 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 322 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 323 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 324 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 325 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 326 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 327 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 328 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 329 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 330 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 331 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 332 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 333 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 334 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 335 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 336 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 337 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 338 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 339 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 340 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 341 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 342 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 343 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 344 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 345 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 346 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 347 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 348 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 349 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 350 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 351 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 352 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 353 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 354 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 355 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 356 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 357 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 358 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 359 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 360 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 361 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 362 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 363 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 364 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 365 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 366 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 367 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 368 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 369 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 370 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 371 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 372 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 373 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 374 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 375 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 376 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 377 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 378 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 379 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 380 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 381 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 382 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 383 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 384 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 385 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 386 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 387 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 388 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 389 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 390 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 391 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 392 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 393 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 394 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 395 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 396 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 397 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 398 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 399 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 400 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 401 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 402 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 403 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 404 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 405 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 406 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 407 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 408 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 409 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 410 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 411 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 412 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 413 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 414 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 415 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 416 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 417 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 418 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 419 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 420 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 421 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 422 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 423 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 424 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 425 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 426 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 427 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 428 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 429 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 430 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 431 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 432 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 433 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 434 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 435 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 436 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 437 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 438 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 439 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 440 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 441 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 442 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 443 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 444 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 445 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 446 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 447 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 448 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 449 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 450 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 451 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 452 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 453 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 454 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 455 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 456 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 457 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 212 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 218 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 212 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 203
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 226 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 203 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 228 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 229 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 230 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 231 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 232 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 233 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 234 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 235 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 236 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 242 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 244 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 245 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 260 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 261 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 262 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 263 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 264 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 265 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 266 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 267 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 268 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 269 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 270 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 271 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 272 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 273 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 274 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 275 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 276 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 277 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 278 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 279 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 280 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 281 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 282 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 283 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 284 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 285 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 286 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 287 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 288 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 289 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 201 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 290 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-201 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 291 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 292 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 293 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 294 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 295 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 296 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 297 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 298 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 299 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 300 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 301 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 302 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 303 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 304 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 305 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 306 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 307 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 308 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 309 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 310 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 311 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 312 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 313 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 314 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 315 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 316 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 317 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 318 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 319 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 320 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 321 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 322 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 323 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 324 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 325 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 326 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 327 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 328 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 329 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 330 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 331 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 332 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 333 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 334 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 335 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 336 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 337 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 338 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 339 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 340 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 341 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 342 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 343 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 344 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 345 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 346 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 347 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 348 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 349 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 350 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 351 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 352 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 353 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 354 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 355 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 356 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 357 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 358 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 359 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 360 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 361 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 362 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 363 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 364 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 365 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 366 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 367 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 368 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 369 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 370 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 371 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 372 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 373 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 374 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 375 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 376 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 377 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 378 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 379 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 380 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 381 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 382 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 383 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 384 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 385 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 386 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 387 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 388 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 389 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 390 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 391 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 392 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 393 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 394 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 395 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 396 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 397 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 398 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 399 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 400 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 401 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 402 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 403 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 404 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 405 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 406 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 407 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 408 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 409 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 410 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 411 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 412 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 413 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 414 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 415 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 416 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 417 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 418 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 419 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 420 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 421 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 422 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 423 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 424 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 425 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 426 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 427 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 428 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 429 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 430 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 431 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 432 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 433 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 434 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 435 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 436 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 437 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 438 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 439 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 440 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 441 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 442 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 443 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 444 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 445 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 446 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 447 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 448 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 449 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 450 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 451 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 452 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 453 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 454 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 455 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 456 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 457 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 212 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 218 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 212 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 219 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 203
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 226 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 203 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 228 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 229 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 230 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 231 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 232 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 203 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 233 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 234 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 235 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 236 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 241 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 242 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 243 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 244 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 245 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 246 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 247 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 248 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 249 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 250 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 251 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 252 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 253 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 254 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 255 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 256 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 257 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 260 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 261 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 262 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 263 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 264 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 265 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 209 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 266 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 267 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 268 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 269 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 270 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 271 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 272 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 273 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 274 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 275 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 276 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 277 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 278 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 279 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 280 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 281 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 282 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 283 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 284 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 285 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 286 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 199 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 287 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 288 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 204 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 289 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 201 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 290 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-201 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 291 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 292 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 293 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 294 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 295 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 296 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 297 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 298 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 299 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 300 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 301 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 302 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 303 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 304 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 305 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 306 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 307 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 214 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 308 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-214 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 309 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 310 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 311 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 312 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 313 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 314 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 315 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 316 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 317 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 318 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 319 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 320 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 321 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 322 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 323 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 324 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 325 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 326 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 327 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 328 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 329 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 330 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 331 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 332 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 333 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 334 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 335 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 336 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 211 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 337 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 338 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 339 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 340 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 341 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 342 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 343 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 202 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 344 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 345 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 346 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 347 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 348 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 349 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 207 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 350 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-207 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 351 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 352 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 353 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 354 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 355 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 356 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 357 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 358 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 359 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 360 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 361 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 206 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 362 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 363 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 364 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 365 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 366 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 367 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 368 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 369 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 370 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 371 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 372 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 373 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 374 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 375 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 376 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 377 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 378 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 379 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 380 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 381 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 382 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 210 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 383 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-210 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 384 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 385 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 386 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 387 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 388 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 389 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 390 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 391 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 392 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 393 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 394 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 208 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 395 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 396 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 397 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 398 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 399 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 400 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 401 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 402 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 403 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 205 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 404 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-205 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 405 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 406 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 407 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 408 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 409 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 410 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 411 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 412 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 413 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 414 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 415 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 416 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 417 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 418 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 419 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 420 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 421 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 213 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 422 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-213 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 423 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 424 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 425 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 426 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 427 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 428 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 429 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 430 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 431 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 432 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 433 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 434 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 435 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 436 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 437 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 438 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 439 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 216 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 440 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 441 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 442 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 215 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 443 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-215 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 444 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 445 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 446 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 447 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 448 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 449 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 450 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 451 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 452 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 453 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 454 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 455 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 456 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 457 ())))
-
-(458 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-459 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-460 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-461 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-215 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-462 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-463 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-464 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-465 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-466 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-467 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-468 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-469 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-470 'h5_dble_interface' 'h5_dble_interface' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-403 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-404 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-471 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-405 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-399 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-402 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-472 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-397 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-401 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-473 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-398 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-474 'h5acreate_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 475 0 (476 477 478 479
-480 481 482 483 484 485) () 0 () ())
-486 'h5aclose_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 487 0 (488 489) () 0 () ())
-490 'h5a' 'h5a' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-218 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-491 'h5adelete_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 492 0 (493 494 495 496
-497 498 499) () 0 () ())
-500 'h5adelete_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 501 0 (502 503 504) () 0 () ())
-505 'h5adelete_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 506 0 (507 508 509 510
-511) () 0 () ())
-512 'h5aexists_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 513 0 (514 515 516 517) () 0 () ())
-518 'h5aget_info_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 519 0 (520
-521 522 523 524 525 526 527 528 529 530) () 0 () ())
-531 'h5aget_info_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 532 0 (533
-534 535 536 537 538 539 540 541) () 0 () ())
-542 'h5aget_create_plist_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 543 0 (544 545 546) () 0 ()
-())
-547 'h5aexists_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 548 0 (549 550 551 552
-553 554) () 0 () ())
-555 'h5aget_name_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 556 0 (557
-558 559 560 561 562 563 564 565) () 0 () ())
-566 'h5aget_space_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 567 0 (568 569 570) () 0 () ())
-571 'h5aget_num_attrs_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 572 0 (573 574 575) () 0 () ())
-576 'h5aget_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 577 0 (578 579 580 581) () 0 () ())
-582 'h5aget_info_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 583 0 (584 585 586 587 588 589) () 0 () ())
-590 'h5aget_type_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 591 0 (592 593 594) () 0 () ())
-595 'h5aopen_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 596 0 (597 598 599 600 601) ()
-0 () ())
-602 'h5aopen_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 603 0 (604 605 606 607
-608 609 610) () 0 () ())
-19 'h5aread_char_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 611 0 (612 613 614 615 616) () 0 () ())
-20 'h5aread_char_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 617 0 (618 619 620 621 622) () 0 () ())
-623 'h5aopen_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 624 0 (625 626 627 628) () 0 () ())
-629 'h5aopen_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 630 0 (631 632 633 634) () 0 () ())
-17 'h5aread_char_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 635 0 (636 637 638 639 640) () 0 () ())
-16 'h5aread_char_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 641 0 (642 643 644 645 646) () 0 () ())
-15 'h5aread_char_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 647 0 (648 649 650 651 652) () 0 () ())
-18 'h5aread_char_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 653 0 (654 655 656 657 658) () 0 () ())
-659 'h5aopen_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 660 0 (661 662 663 664
-665 666 667 668 669) () 0 () ())
-21 'h5aread_char_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 670 0 (671 672 673 674 675) () 0 () ())
-36 'h5aread_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 676 0 (677 678 679 680 681)
-() 0 () ())
-34 'h5aread_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 682 0 (683 684 685 686 687)
-() 0 () ())
-35 'h5aread_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 688 0 (689 690 691 692 693)
-() 0 () ())
-33 'h5aread_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 694 0 (695 696 697 698 699)
-() 0 () ())
-30 'h5aread_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 700 0 (701 702 703 704 705)
-() 0 () ())
-37 'h5aread_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 706 0 (707
-708 709 710 711) () 0 () ())
-31 'h5aread_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 712 0 (713 714 715 716 717)
-() 0 () ())
-28 'h5aread_integer_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 718 0 (719 720 721 722 723) () 0 () ())
-32 'h5aread_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 724 0 (725 726 727 728 729)
-() 0 () ())
-27 'h5aread_integer_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 730 0 (731 732 733 734 735) () 0 () ())
-25 'h5aread_integer_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 736 0 (737 738 739 740 741) () 0 () ())
-23 'h5aread_integer_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 742 0 (743 744 745 746 747) () 0 () ())
-22 'h5aread_integer_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 748 0 (749 750 751 752 753) () 0 () ())
-24 'h5aread_integer_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 754 0 (755 756 757 758 759) () 0 () ())
-26 'h5aread_integer_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 760 0 (761 762 763 764 765) () 0 () ())
-12 'h5aread_real_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 766 0 (767 768 769 770 771) () 0 () ())
-29 'h5aread_integer_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 772 0 (773 774 775 776 777)
-() 0 () ())
-14 'h5aread_char_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 778 0 (779 780 781 782 783) () 0 () ())
-784 'h5aget_storage_size_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 785 0 (786 787 788) () 0 ()
-())
-9 'h5aread_real_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 789 0 (790 791 792 793 794) () 0 () ())
-10 'h5aread_real_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 795 0 (796 797 798 799 800) () 0 () ())
-11 'h5aread_real_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 801 0 (802 803 804 805 806) () 0 () ())
-807 'h5acreate_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 808 0 (809 810 811 812 813
-814 815 816) () 0 () ())
-400 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-6 'h5aread_real_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 817 0 (818 819 820 821 822) () 0 () ())
-13 'h5aread_real_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 823 0 (824 825 826 827 828) () 0 () ())
-829 'h5arename_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 830 0 (831 832 833 834) () 0 () ())
-52 'h5awrite_char_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 835 0 (836 837 838 839 840) () 0 () ())
-841 'h5arename_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 842 0 (843 844 845 846
-847 848) () 0 () ())
-7 'h5aread_real_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 849 0 (850 851 852 853 854) () 0 () ())
-8 'h5aread_real_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 855 0 (856 857 858 859 860) () 0 () ())
-50 'h5awrite_char_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 861 0 (862 863 864 865 866) () 0 () ())
-49 'h5awrite_char_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 867 0 (868 869 870 871 872) () 0 () ())
-47 'h5awrite_char_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 873 0 (874 875 876 877 878) () 0 () ())
-46 'h5awrite_char_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 879 0 (880 881 882 883 884) () 0 () ())
-48 'h5awrite_char_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 885 0 (886 887 888 889 890) () 0 () ())
-51 'h5awrite_char_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 891 0 (892 893 894 895 896) () 0 () ())
-67 'h5awrite_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 897 0 (898 899 900 901 902)
-() 0 () ())
-65 'h5awrite_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 903 0 (904 905 906 907 908)
-() 0 () ())
-64 'h5awrite_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 909 0 (910 911 912 913 914)
-() 0 () ())
-66 'h5awrite_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 915 0 (916 917 918 919 920)
-() 0 () ())
-68 'h5awrite_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 921 0 (922 923 924 925 926)
-() 0 () ())
-63 'h5awrite_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 927 0 (928 929 930 931 932)
-() 0 () ())
-69 'h5awrite_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 933 0 (934
-935 936 937 938) () 0 () ())
-60 'h5awrite_integer_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 939 0 (940 941 942 943 944) () 0 () ())
-57 'h5awrite_integer_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 945 0 (946 947 948 949 950) () 0 () ())
-58 'h5awrite_integer_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 951 0 (952 953 954 955 956) () 0 () ())
-55 'h5awrite_integer_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 957 0 (958 959 960 961 962) () 0 () ())
-56 'h5awrite_integer_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 963 0 (964 965 966 967 968) () 0 () ())
-59 'h5awrite_integer_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 969 0 (970 971 972 973 974) () 0 () ())
-61 'h5awrite_integer_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 975 0 (976 977 978 979 980)
-() 0 () ())
-43 'h5awrite_real_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 981 0 (982 983 984 985 986) () 0 () ())
-41 'h5awrite_real_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 987 0 (988 989 990 991 992) () 0 () ())
-39 'h5awrite_real_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 993 0 (994 995 996 997 998) () 0 () ())
-38 'h5awrite_real_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 999 0 (1000 1001 1002 1003 1004) () 0 () ())
-1005 'h5check_version_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1006 0 (1007 1008 1009 1010)
-() 0 () ())
-45 'h5awrite_real_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1011 0 (1012 1013 1014 1015 1016) () 0 ()
-())
-40 'h5awrite_real_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1017 0 (1018 1019 1020 1021 1022) () 0 () ())
-42 'h5awrite_real_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1023 0 (1024 1025 1026 1027 1028) () 0 () ())
-1029 'h5d' 'h5d' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-1030 'h5close_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1031 0 (1032) () 0 () ())
-380 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-381 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-378 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-377 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-379 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-44 'h5awrite_real_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1033 0 (1034 1035 1036 1037 1038) () 0 () ())
-54 'h5awrite_integer_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1039 0 (1040 1041 1042 1043 1044) () 0 ()
-())
-62 'h5awrite_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1045 0 (1046 1047 1048 1049
-1050) () 0 () ())
-365 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-382 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-363 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-384 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-383 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-370 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-367 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-372 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-366 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-210 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-368 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-369 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-371 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-373 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-374 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-375 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-376 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1051 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'22') () 0 () ())
-1052 'h5dcreate_anon_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1053 0 (1054 1055 1056
-1057 1058 1059 1060) () 0 () ())
-74 'h5dfill_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1061 0 (1062 1063 1064 1065)
-() 0 () ())
-72 'h5dfill_real' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1066 0 (1067 1068 1069 1070) () 0 () ())
-1071 'h5dget_access_plist_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1072 0 (1073 1074 1075) () 0
-() ())
-73 'h5dfill_integer' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1076 0 (1077 1078 1079 1080) () 0 () ())
-1081 'h5dget_create_plist_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1082 0 (1083 1084 1085) () 0
-() ())
-71 'h5dfill_char' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1086 0 (1087 1088 1089 1090) () 0 () ())
-1091 'h5dcreate_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1092 0 (1093 1094 1095 1096
-1097 1098 1099 1100 1101) () 0 () ())
-1102 'h5dget_space_status_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1103 0 (1104 1105 1106) () 0
-() ())
-1107 'h5dget_type_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1108 0 (1109 1110 1111) () 0 () ())
-1112 'h5dont_atexit_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1113 0 (1114) () 0 () ())
-88 'h5dread_char_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1115 0 (1116 1117 1118 1119
-1120 1121 1122 1123) () 0 () ())
-89 'h5dread_char_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1124 0 (1125 1126 1127 1128
-1129 1130 1131 1132) () 0 () ())
-1133 'h5dopen_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1134 0 (1135 1136 1137 1138
-1139) () 0 () ())
-1140 'h5dget_storage_size_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1141 0 (1142 1143 1144) () 0
-() ())
-1145 'h5dget_space_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1146 0 (1147 1148 1149) () 0 () ())
-84 'h5dread_char_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1150 0 (1151 1152 1153 1154
-1155 1156 1157 1158) () 0 () ())
-85 'h5dread_char_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1159 0 (1160 1161 1162 1163
-1164 1165 1166 1167) () 0 () ())
-83 'h5dread_char_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1168 0 (1169 1170 1171 1172
-1173 1174 1175 1176) () 0 () ())
-86 'h5dread_char_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1177 0 (1178 1179 1180 1181
-1182 1183 1184 1185) () 0 () ())
-107 'h5dread_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1186 0 (
-1187 1188 1189 1190 1191 1192 1193 1194) () 0 () ())
-90 'h5dread_char_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1195 0 (1196 1197 1198
-1199 1200 1201 1202 1203) () 0 () ())
-103 'h5dread_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1204 0 (
-1205 1206 1207 1208 1209 1210 1211 1212) () 0 () ())
-101 'h5dread_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1213 0 (
-1214 1215 1216 1217 1218 1219 1220 1221) () 0 () ())
-108 'h5dread_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ())
-1222 0 (1223 1224 1225 1226 1227 1228 1229 1230) () 0 () ())
-102 'h5dread_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1231 0 (
-1232 1233 1234 1235 1236 1237 1238 1239) () 0 () ())
-104 'h5dread_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1240 0 (
-1241 1242 1243 1244 1245 1246 1247 1248) () 0 () ())
-105 'h5dread_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1249 0 (
-1250 1251 1252 1253 1254 1255 1256 1257) () 0 () ())
-95 'h5dread_integer_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1258 0 (1259 1260 1261
-1262 1263 1264 1265 1266) () 0 () ())
-96 'h5dread_integer_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1267 0 (1268 1269 1270
-1271 1272 1273 1274 1275) () 0 () ())
-92 'h5dread_integer_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1276 0 (1277 1278 1279
-1280 1281 1282 1283 1284) () 0 () ())
-93 'h5dread_integer_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1285 0 (1286 1287 1288
-1289 1290 1291 1292 1293) () 0 () ())
-94 'h5dread_integer_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1294 0 (1295 1296 1297
-1298 1299 1300 1301 1302) () 0 () ())
-97 'h5dread_integer_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1303 0 (1304 1305 1306
-1307 1308 1309 1310 1311) () 0 () ())
-106 'h5dread_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1312 0 (
-1313 1314 1315 1316 1317 1318 1319 1320) () 0 () ())
-87 'h5dread_char_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1321 0 (1322 1323 1324 1325
-1326 1327 1328 1329) () 0 () ())
-79 'h5dread_real_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1330 0 (1331 1332 1333 1334
-1335 1336 1337 1338) () 0 () ())
-80 'h5dread_real_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1339 0 (1340 1341 1342 1343
-1344 1345 1346 1347) () 0 () ())
-81 'h5dread_real_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1348 0 (1349 1350 1351 1352
-1353 1354 1355 1356) () 0 () ())
-76 'h5dread_real_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1357 0 (1358 1359 1360 1361
-1362 1363 1364 1365) () 0 () ())
-82 'h5dread_real_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1366 0 (1367 1368 1369
-1370 1371 1372 1373 1374) () 0 () ())
-75 'h5dread_real_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1375 0 (1376 1377 1378 1379
-1380 1381 1382 1383) () 0 () ())
-100 'h5dread_reference_obj' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1384 0 (
-1385 1386 1387 1388 1389 1390 1391 1392) () 0 () ())
-99 'h5dread_reference_dsetreg' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1393 0 (
-1394 1395 1396 1397 1398 1399 1400 1401) () 0 () ())
-77 'h5dread_real_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1402 0 (1403 1404 1405 1406
-1407 1408 1409 1410) () 0 () ())
-78 'h5dread_real_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1411 0 (1412 1413 1414 1415
-1416 1417 1418 1419) () 0 () ())
-98 'h5dread_integer_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1420 0 (
-1421 1422 1423 1424 1425 1426 1427 1428) () 0 () ())
-91 'h5dread_integer_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1429 0 (1430 1431 1432
-1433 1434 1435 1436 1437) () 0 () ())
-1438 'h5dclose_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1439 0 (1440 1441) () 0 () ())
-109 'h5dread_vl_string' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1442 0 (1443 1444 1445
-1446 1447 1448 1449 1450 1451) () 0 () ())
-1452 'h5dvlen_get_max_len_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1453 0 (1454 1455 1456 1457
-1458) () 0 () ())
-129 'h5dwrite_char_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1459 0 (1460 1461 1462
-1463 1464 1465 1466 1467) () 0 () ())
-70 'h5dset_extent_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1468 0 (1469 1470 1471) () 0 () ())
-127 'h5dwrite_char_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1472 0 (1473 1474 1475
-1476 1477 1478 1479 1480) () 0 () ())
-126 'h5dwrite_char_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1481 0 (1482 1483 1484
-1485 1486 1487 1488 1489) () 0 () ())
-128 'h5dwrite_char_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1490 0 (1491 1492 1493
-1494 1495 1496 1497 1498) () 0 () ())
-110 'h5dread_vl_real' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1499 0 (1500 1501 1502
-1503 1504 1505 1506 1507 1508) () 0 () ())
-124 'h5dwrite_char_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1509 0 (1510 1511 1512
-1513 1514 1515 1516 1517) () 0 () ())
-125 'h5dwrite_char_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1518 0 (1519 1520 1521
-1522 1523 1524 1525 1526) () 0 () ())
-147 'h5dwrite_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1527 0 (
-1528 1529 1530 1531 1532 1533 1534 1535) () 0 () ())
-130 'h5dwrite_char_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1536 0 (
-1537 1538 1539 1540 1541 1542 1543 1544) () 0 () ())
-144 'h5dwrite_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1545 0 (
-1546 1547 1548 1549 1550 1551 1552 1553) () 0 () ())
-145 'h5dwrite_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1554 0 (
-1555 1556 1557 1558 1559 1560 1561 1562) () 0 () ())
-146 'h5dwrite_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1563 0 (
-1564 1565 1566 1567 1568 1569 1570 1571) () 0 () ())
-123 'h5dwrite_char_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1572 0 (1573 1574 1575
-1576 1577 1578 1579 1580) () 0 () ())
-142 'h5dwrite_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1581 0 (
-1582 1583 1584 1585 1586 1587 1588 1589) () 0 () ())
-148 'h5dwrite_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ())
-1590 0 (1591 1592 1593 1594 1595 1596 1597 1598) () 0 () ())
-137 'h5dwrite_integer_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1599 0 (1600 1601 1602
-1603 1604 1605 1606 1607) () 0 () ())
-135 'h5dwrite_integer_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1608 0 (1609 1610 1611
-1612 1613 1614 1615 1616) () 0 () ())
-134 'h5dwrite_integer_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1617 0 (1618 1619 1620
-1621 1622 1623 1624 1625) () 0 () ())
-136 'h5dwrite_integer_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1626 0 (1627 1628 1629
-1630 1631 1632 1633 1634) () 0 () ())
-141 'h5dwrite_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1635 0 (
-1636 1637 1638 1639 1640 1641 1642 1643) () 0 () ())
-132 'h5dwrite_integer_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1644 0 (1645 1646 1647
-1648 1649 1650 1651 1652) () 0 () ())
-131 'h5dwrite_integer_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1653 0 (1654 1655 1656
-1657 1658 1659 1660 1661) () 0 () ())
-138 'h5dwrite_integer_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1662 0 (
-1663 1664 1665 1666 1667 1668 1669 1670) () 0 () ())
-119 'h5dwrite_real_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1671 0 (1672 1673 1674
-1675 1676 1677 1678 1679) () 0 () ())
-120 'h5dwrite_real_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1680 0 (1681 1682 1683
-1684 1685 1686 1687 1688) () 0 () ())
-121 'h5dwrite_real_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1689 0 (1690 1691 1692
-1693 1694 1695 1696 1697) () 0 () ())
-133 'h5dwrite_integer_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1698 0 (1699 1700 1701
-1702 1703 1704 1705 1706) () 0 () ())
-117 'h5dwrite_real_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1707 0 (1708 1709 1710
-1711 1712 1713 1714 1715) () 0 () ())
-115 'h5dwrite_real_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1716 0 (1717 1718 1719
-1720 1721 1722 1723 1724) () 0 () ())
-122 'h5dwrite_real_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1725 0 (
-1726 1727 1728 1729 1730 1731 1732 1733) () 0 () ())
-116 'h5dwrite_real_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1734 0 (1735 1736 1737
-1738 1739 1740 1741 1742) () 0 () ())
-140 'h5dwrite_reference_obj' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1743 0 (
-1744 1745 1746 1747 1748 1749 1750 1751) () 0 () ())
-139 'h5dwrite_reference_dsetreg' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1752 0 (
-1753 1754 1755 1756 1757 1758 1759 1760) () 0 () ())
-118 'h5dwrite_real_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1761 0 (1762 1763 1764
-1765 1766 1767 1768 1769) () 0 () ())
-112 'h5dwrite_vl_string' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1770 0 (1771 1772 1773
-1774 1775 1776 1777 1778 1779) () 0 () ())
-113 'h5dwrite_vl_real' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1780 0 (1781 1782 1783
-1784 1785 1786 1787 1788 1789) () 0 () ())
-114 'h5dwrite_vl_integer' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1790 0 (1791 1792 1793
-1794 1795 1796 1797 1798 1799) () 0 () ())
-1800 'h5eget_major_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1801 0 (1802 1803 1804 1805) () 0 () ())
-1806 'h5eclear_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1807 0 (1808) () 0 () ())
-1809 'h5eget_minor_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1810 0 (1811 1812 1813) () 0 () ())
-1814 'h5e' 'h5e' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-1815 'h5eset_auto_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1816 0 (1817 1818) () 0 () ())
-1819 'h5f' 'h5f' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-420 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-419 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-421 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-414 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-413 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-416 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-423 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-422 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1820 'h5eprint_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1821 0 (1822 1823) () 0 () ())
-143 'h5dwrite_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1824 0 (
-1825 1826 1827 1828 1829 1830 1831 1832) () 0 () ())
-111 'h5dread_vl_integer' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1833 0 (1834 1835 1836
-1837 1838 1839 1840 1841 1842) () 0 () ())
-364 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-213 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-406 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-407 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-411 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-409 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-412 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-408 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-418 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-417 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-410 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1843 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'19') () 0 () ())
-351 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1844 'h5fcreate_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1845 0 (1846 1847 1848 1849
-1850 1851) () 0 () ())
-1852 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-206 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-350 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1853 'h5fclose_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1854 0 (1855 1856) () 0 () ())
-1857 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-349 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-356 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-359 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-354 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-355 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-353 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-361 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-358 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-352 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-360 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-362 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-346 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-345 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1858 'h5fflush_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1859 0 (1860 1861 1862) () 0 () ())
-347 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-348 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-357 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-207 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-1863 'h5fget_name_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1864 0 (1865 1866 1867 1868) () 0 () ())
-1869 'h5fget_freespace_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1870 0 (1871 1872 1873) () 0 () ())
-1874 'h5fget_filesize_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1875 0 (1876 1877 1878) () 0 () ())
-1879 'h5fget_create_plist_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1880 0 (1881 1882 1883) () 0
-() ())
-1884 'h5fis_hdf5_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1885 0 (1886 1887 1888) () 0 () ())
-1889 'h5fmount_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1890 0 (1891 1892 1893 1894
-1895) () 0 () ())
-1896 'h5fget_obj_ids_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1897 0 (1898 1899 1900
-1901 1902 1903) () 0 () ())
-1904 'h5fget_obj_count_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1905 0 (1906 1907 1908 1909) () 0 () ())
-1910 'h5funmount_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1911 0 (1912 1913 1914) () 0 () ())
-1915 'h5freopen_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1916 0 (1917 1918 1919) () 0 () ())
-1920 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-1921 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'12') () 0 () ())
-208 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-394 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1922 'h5g' 'h5g' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-1923 'h5fopen_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1924 0 (1925 1926 1927 1928
-1929) () 0 () ())
-392 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-390 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-391 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-393 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-388 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-387 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-385 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-386 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1930 'h5garbage_collect_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1931 0 (1932) () 0 () ())
-1933 'h5gcreate_anon_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1934 0 (1935 1936 1937
-1938 1939) () 0 () ())
-1940 'h5gclose_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1941 0 (1942 1943) () 0 () ())
-205 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1
-EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9'))
-0 () ())
-1944 'h5gcreate_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1945 0 (1946 1947 1948 1949
-1950 1951 1952 1953) () 0 () ())
-1954 'h5get_libversion_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1955 0 (1956 1957 1958 1959)
-() 0 () ())
-1960 'h5gget_comment_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1961 0 (1962 1963 1964 1965 1966) () 0 ()
-())
-1967 'h5gget_info_by_idx_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1968 0 (
-1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979) () 0 () ())
-1980 'h5gget_linkval_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1981 0 (1982 1983 1984 1985 1986) () 0 ()
-())
-1987 'h5gget_obj_info_idx_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1988 0 (1989 1990 1991 1992
-1993 1994) () 0 () ())
-1995 'h5gget_info_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1996 0 (1997 1998 1999 2000
-2001 2002) () 0 () ())
-2003 'h5gget_info_by_name_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2004 0 (
-2005 2006 2007 2008 2009 2010 2011 2012) () 0 () ())
-2013 'h5gget_create_plist_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2014 0 (2015 2016 2017) () 0
-() ())
-2018 'h5glink2_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2019 0 (2020 2021 2022 2023 2024 2025) () 0 ()
-())
-2026 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-396 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2027 'h5gmove2_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2028 0 (2029 2030 2031 2032 2033) () 0 () ())
-2034 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-2035 'h5gn_members_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2036 0 (2037 2038 2039 2040) () 0 () ())
-2041 'h5gset_comment_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2042 0 (2043 2044 2045 2046) () 0 () ())
-2047 'h5gopen_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2048 0 (2049 2050 2051 2052
-2053) () 0 () ())
-339 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2054 'h5i' 'h5i' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-2055 'h5gunlink_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2056 0 (2057 2058 2059) () 0 () ())
-2060 'h5gmove_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2061 0 (2062 2063 2064 2065) () 0 () ())
-340 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-342 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-341 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-338 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-2066 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-344 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2067 'h5iget_file_id_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2068 0 (2069 2070 2071) () 0 () ())
-2072 'h5iget_name_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2073 0 (2074 2075 2076 2077 2078) () 0 () ())
-2079 'h5iget_ref_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2080 0 (2081 2082 2083) () 0 () ())
-2084 'h5iinc_ref_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2085 0 (2086 2087 2088) () 0 () ())
-2089 'h5iget_type_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2090 0 (2091 2092 2093) () 0 () ())
-2094 'h5idec_ref_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2095 0 (2096 2097 2098) () 0 () ())
-343 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2099 'h5glink_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2100 0 (2101 2102 2103 2104 2105) () 0 () ())
-389 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-395 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2106 'h5l' 'h5l' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-337 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-333 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-334 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-332 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2107 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6')
-() 0 () ())
-211 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-335 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2108 'h5lcopy_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2109 0 (2110 2111 2112 2113
-2114 2115 2116) () 0 () ())
-2117 'h5lcreate_hard_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2118 0 (2119 2120 2121
-2122 2123 2124 2125) () 0 () ())
-2126 'h5lcreate_external_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2127 0 (
-2128 2129 2130 2131 2132 2133 2134) () 0 () ())
-2135 'h5ldelete_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2136 0 (2137 2138 2139 2140)
-() 0 () ())
-2141 'h5lexists_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2142 0 (2143 2144 2145 2146
-2147) () 0 () ())
-2148 'h5ldelete_by_idx_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2149 0 (2150 2151 2152
-2153 2154 2155 2156) () 0 () ())
-2157 'h5lcreate_soft_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2158 0 (2159 2160 2161
-2162 2163 2164) () 0 () ())
-336 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2165 'h5iis_valid_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2166 0 (2167 2168 2169) () 0 () ())
-2170 'h5lget_name_by_idx_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2171 0 (
-2172 2173 2174 2175 2176 2177 2178 2179 2180) () 0 () ())
-2181 'h5lget_info_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2182 0 (2183 2184 2185 2186
-2187 2188 2189 2190 2191 2192) () 0 () ())
-2193 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-212 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-2194 'h5lmove_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2195 0 (2196 2197 2198 2199
-2200 2201 2202) () 0 () ())
-2203 'h5o' 'h5o' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-325 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2204 'h5lis_registered_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2205 0 (2206 2207 2208) () 0 () ())
-330 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-326 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-327 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-217 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-331 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-2209 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'22') () 0 () ())
-328 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-329 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2210 'h5lib' 'h5lib' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-315 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-316 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-313 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-317 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-322 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-319 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-318 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-314 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-311 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-310 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-321 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-320 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-323 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2211 'h5open_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2212 0 (2213) () 0 () ())
-2214 'h5oopen_f' 'h5o' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2215 0 (2216 2217 2218 2219
-2220) () 0 () ())
-2221 'h5p' 'h5p' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-295 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-291 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2222 'h5oopen_by_addr_f' 'h5o' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2223 0 (2224 2225 2226 2227) () 0 () ())
-2228 'h5olink_f' 'h5o' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2229 0 (2230 2231 2232 2233
-2234 2235) () 0 () ())
-324 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-297 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-306 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-307 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-301 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-290 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-304 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-309 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-201 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-305 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2236 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'18') () 0 () ())
-2237 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-308 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-298 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-312 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-300 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-292 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-299 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-294 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-302 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-296 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-303 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2238 'h5pclose_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2239 0 (2240 2241) () 0 () ())
-2242 'h5pcopy_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2243 0 (2244 2245 2246) () 0 () ())
-2247 'h5pcreate_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2248 0 (2249 2250 2251 2252) () 0 () ())
-2253 'h5pcopy_prop_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2254 0 (2255 2256 2257 2258) () 0 () ())
-2259 'h5pcreate_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2260 0 (2261 2262 2263) () 0 () ())
-2264 'h5pequal_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2265 0 (2266 2267 2268 2269) () 0 () ())
-2270 'h5pclose_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2271 0 (2272 2273) () 0 () ())
-2274 'h5pall_filters_avail_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2275 0 (2276 2277 2278) () 0
-() ())
-2279 'h5pget_alloc_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2280 0 (2281 2282 2283) () 0
-() ())
-2284 'h5pget_attr_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2285 0 (2286 2287 2288) () 0
-() ())
-2289 'h5pget_alignment_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2290 0 (2291 2292 2293 2294) () 0 () ())
-2295 'h5pget_buffer_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2296 0 (2297 2298 2299) () 0 () ())
-2300 'h5pget_btree_ratios_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2301 0 (2302 2303 2304 2305
-2306) () 0 () ())
-149 'h5pget_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2307 0 (2308 2309 2310 2311) () 0 () ())
-2312 'h5pget_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2313 0 (2314 2315 2316 2317 2318 2319) ()
-0 () ())
-2320 'h5pget_attr_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2321 0 (2322 2323 2324 2325)
-() 0 () ())
-2326 'h5pfill_value_defined_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2327 0 (2328 2329 2330) () 0
-() ())
-2331 'h5pexist_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2332 0 (2333 2334 2335 2336) () 0 () ())
-293 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2337 'h5lget_info_by_idx_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2338 0 (
-2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351) () 0 ()
-())
-2352 'h5fget_access_plist_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2353 0 (2354 2355 2356) () 0
-() ())
-2357 'h5pget_chunk_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2358 0 (2359 2360 2361 2362) () 0 () ())
-2363 'h5pget_chunk_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2364 0 (2365 2366 2367 2368
-2369) () 0 () ())
-2370 'h5pget_class_name_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2371 0 (2372 2373 2374 2375)
-() 0 () ())
-2376 'h5pget_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2377 0 (2378 2379 2380) () 0 () ())
-2381 'h5pget_create_inter_group_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2382 0 (2383 2384 2385) () 0
-() ())
-2386 'h5pget_copy_object_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2387 0 (2388 2389 2390) () 0
-() ())
-2391 'h5pget_class_parent_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2392 0 (2393 2394 2395) () 0
-() ())
-2396 'h5pget_driver_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2397 0 (2398 2399 2400) () 0 () ())
-152 'h5pget_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2401 0 (2402 2403 2404 2405)
-() 0 () ())
-2406 'h5pget_edc_check_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2407 0 (2408 2409 2410) () 0 () ())
-2411 'h5pget_data_transform_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2412 0 (
-2413 2414 2415 2416) () 0 () ())
-2417 'h5pget_external_count_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2418 0 (2419 2420 2421) () 0
-() ())
-2422 'h5pget_fapl_direct_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2423 0 (2424 2425 2426 2427
-2428) () 0 () ())
-2429 'h5pget_fapl_core_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2430 0 (2431 2432 2433 2434) () 0 () ())
-2435 'h5pget_external_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2436 0 (2437 2438 2439 2440 2441 2442
-2443) () 0 () ())
-2444 'h5pget_fclose_degree_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2445 0 (2446 2447 2448) () 0
-() ())
-2449 'h5pget_fapl_multi_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2450 0 (
-2451 2452 2453 2454 2455 2456 2457 2458) () 0 () ())
-2459 'h5pget_fapl_family_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2460 0 (2461 2462 2463 2464)
-() 0 () ())
-2465 'h5pget_est_link_info_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2466 0 (2467 2468 2469 2470)
-() 0 () ())
-156 'h5pget_fill_value_double' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2471 0 (2472
-2473 2474 2475) () 0 () ())
-153 'h5pget_fill_value_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2476 0 (2477 2478 2479 2480)
-() 0 () ())
-155 'h5pget_fill_value_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2481 0 (2482 2483 2484 2485)
-() 0 () ())
-2486 'h5pget_filter_by_id_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2487 0 (2488 2489 2490 2491
-2492 2493 2494 2495) () 0 () ())
-2496 'h5pget_gc_references_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2497 0 (2498 2499 2500) () 0
-() ())
-2501 'h5pget_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2502 0 (2503 2504 2505 2506 2507 2508
-2509 2510 2511) () 0 () ())
-154 'h5pget_fill_value_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2512 0 (2513 2514 2515 2516)
-() 0 () ())
-2517 'h5pget_istore_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2518 0 (2519 2520 2521) () 0 () ())
-151 'h5pget_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2522 0 (2523 2524 2525 2526) () 0 () ())
-2527 'h5pget_link_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2528 0 (2529 2530 2531) () 0
-() ())
-2532 'h5pget_local_heap_size_hint_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2533 0 (2534 2535 2536) () 0
-() ())
-2537 'h5pget_link_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2538 0 (2539 2540 2541 2542)
-() 0 () ())
-2543 'h5pget_nfilters_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2544 0 (2545 2546 2547) () 0 () ())
-2548 'h5pget_obj_track_times_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2549 0 (2550 2551 2552) () 0
-() ())
-2553 'h5pget_nprops_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2554 0 (2555 2556 2557) () 0 () ())
-2558 'h5pget_nlinks_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2559 0 (2560 2561 2562) () 0 () ())
-150 'h5pget_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2563 0 (2564 2565 2566 2567) () 0 () ())
-2568 'h5pget_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2569 0 (2570 2571 2572 2573) () 0 () ())
-2574 'h5pget_small_data_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2575 0 (2576 2577 2578) () 0
-() ())
-2579 'h5pget_sym_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2580 0 (2581 2582 2583 2584) () 0 () ())
-2585 'h5pget_userblock_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2586 0 (2587 2588 2589) () 0 () ())
-157 'h5pinsert_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2590 0 (2591 2592 2593 2594 2595) () 0 () ())
-2596 'h5pget_version_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2597 0 (2598 2599 2600
-2601 2602 2603) () 0 () ())
-2604 'h5pget_sizes_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2605 0 (2606 2607 2608 2609) () 0 () ())
-2610 'h5pget_sieve_buf_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2611 0 (2612 2613 2614) () 0
-() ())
-2615 'h5pget_preserve_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2616 0 (2617 2618 2619) () 0 () ())
-2620 'h5pget_meta_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2621 0 (2622 2623 2624) () 0
-() ())
-2625 'h5pget_layout_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2626 0 (2627 2628 2629) () 0 () ())
-2630 'h5pget_hyper_vector_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2631 0 (2632 2633 2634) () 0
-() ())
-158 'h5pinsert_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2635 0 (2636 2637 2638 2639 2640) () 0 () ())
-159 'h5pinsert_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2641 0 (2642 2643 2644 2645 2646) () 0 ()
-())
-2647 'h5pmodify_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2648 0 (2649 2650 2651 2652 2653 2654) ()
-0 () ())
-2655 'h5pisa_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2656 0 (2657 2658 2659 2660) () 0 () ())
-164 'h5pregister_double' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2661 0 (2662
-2663 2664 2665 2666) () 0 () ())
-162 'h5pregister_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2667 0 (2668 2669 2670 2671 2672) () 0 ()
-())
-2673 'h5premove_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2674 0 (2675 2676 2677) () 0 () ())
-163 'h5pregister_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2678 0 (2679 2680 2681 2682 2683) () 0 ()
-())
-2684 'h5premove_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2685 0 (2686 2687 2688) () 0 () ())
-161 'h5pregister_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2689 0 (2690 2691 2692 2693 2694) () 0 ()
-())
-2695 'h5pset_attr_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2696 0 (2697 2698 2699 2700)
-() 0 () ())
-2701 'h5pset_attr_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2702 0 (2703 2704 2705) () 0
-() ())
-2706 'h5pset_alloc_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2707 0 (2708 2709 2710) () 0
-() ())
-2711 'h5pset_buffer_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2712 0 (2713 2714 2715) () 0 () ())
-2716 'h5pset_btree_ratios_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2717 0 (2718 2719 2720 2721
-2722) () 0 () ())
-2723 'h5pset_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2724 0 (2725 2726 2727 2728 2729 2730) ()
-0 () ())
-2731 'h5pset_char_encoding_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2732 0 (2733 2734 2735) () 0
-() ())
-2736 'h5pset_chunk_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2737 0 (2738 2739 2740 2741) () 0 () ())
-2742 'h5pset_chunk_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2743 0 (2744 2745 2746 2747
-2748) () 0 () ())
-2749 'h5pset_copy_object_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2750 0 (2751 2752 2753) () 0
-() ())
-2754 'h5pset_data_transform_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2755 0 (2756 2757 2758) () 0
-() ())
-2759 'h5pset_create_inter_group_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2760 0 (2761 2762 2763) () 0
-() ())
-168 'h5pset_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2764 0 (2765 2766 2767 2768)
-() 0 () ())
-2769 'h5pset_est_link_info_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2770 0 (2771 2772 2773 2774)
-() 0 () ())
-2775 'h5pset_edc_check_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2776 0 (2777 2778 2779) () 0 () ())
-2780 'h5pset_fapl_core_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2781 0 (2782 2783 2784 2785) () 0 () ())
-2786 'h5pset_family_offset_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2787 0 (2788 2789 2790) () 0
-() ())
-2791 'h5pset_external_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2792 0 (2793 2794 2795 2796 2797) () 0 ()
-())
-2798 'h5pset_deflate_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2799 0 (2800 2801 2802) () 0 () ())
-165 'h5pset_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2803 0 (2804 2805 2806 2807) () 0 () ())
-2808 'h5pset_alignment_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2809 0 (2810 2811 2812 2813) () 0 () ())
-160 'h5pinsert_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2814 0 (2815 2816 2817 2818
-2819) () 0 () ())
-2820 'h5pget_fill_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2821 0 (2822 2823 2824) () 0 () ())
-169 'h5pset_fapl_multi_s' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2825 0 (2826 2827 2828) () 0 () ())
-2829 'h5pset_fapl_sec2_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2830 0 (2831 2832) () 0 () ())
-170 'h5pset_fapl_multi_l' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2833 0 (2834 2835 2836 2837 2838 2839
-2840) () 0 () ())
-2841 'h5pset_fapl_split_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2842 0 (2843 2844 2845 2846
-2847 2848) () 0 () ())
-2849 'h5pset_fill_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2850 0 (2851 2852 2853) () 0 () ())
-2854 'h5pset_fclose_degree_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2855 0 (2856 2857 2858) () 0
-() ())
-2859 'h5pset_fapl_stdio_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2860 0 (2861 2862) () 0 () ())
-174 'h5pset_fill_value_double' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2863 0 (2864
-2865 2866 2867) () 0 () ())
-173 'h5pset_fill_value_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2868 0 (2869 2870 2871 2872)
-() 0 () ())
-171 'h5pset_fill_value_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2873 0 (2874 2875 2876 2877)
-() 0 () ())
-2878 'h5pset_fapl_family_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2879 0 (2880 2881 2882 2883)
-() 0 () ())
-2884 'h5pset_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2885 0 (2886 2887 2888 2889 2890 2891) ()
-0 () ())
-2892 'h5pset_fletcher32_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2893 0 (2894 2895) () 0 () ())
-172 'h5pset_fill_value_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2896 0 (2897 2898 2899 2900)
-() 0 () ())
-167 'h5pset_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2901 0 (2902 2903 2904 2905) () 0 () ())
-2906 'h5pset_hyper_vector_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2907 0 (2908 2909 2910) () 0
-() ())
-2911 'h5pset_layout_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2912 0 (2913 2914 2915) () 0 () ())
-2916 'h5pset_istore_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2917 0 (2918 2919 2920) () 0 () ())
-2921 'h5pset_link_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2922 0 (2923 2924 2925 2926)
-() 0 () ())
-2927 'h5pset_link_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2928 0 (2929 2930 2931) () 0
-() ())
-2932 'h5pset_nbit_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2933 0 (2934 2935) () 0 () ())
-2936 'h5pset_nlinks_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2937 0 (2938 2939 2940) () 0 () ())
-2941 'h5pset_meta_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2942 0 (2943 2944 2945) () 0
-() ())
-2946 'h5pset_preserve_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2947 0 (2948 2949 2950) () 0 () ())
-2951 'h5pset_scaleoffset_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2952 0 (2953 2954 2955 2956)
-() 0 () ())
-166 'h5pset_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2957 0 (2958 2959 2960 2961) () 0 () ())
-2962 'h5pset_obj_track_times_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2963 0 (2964 2965 2966) () 0
-() ())
-2967 'h5pset_shuffle_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2968 0 (2969 2970) () 0 () ())
-2971 'h5pset_shared_mesg_nindexes_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2972 0 (2973 2974 2975) () 0
-() ())
-2976 'h5pset_shared_mesg_index_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2977 0 (2978 2979 2980 2981
-2982) () 0 () ())
-2983 'h5pset_sizes_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2984 0 (2985 2986 2987 2988) () 0 () ())
-2989 'h5pset_small_data_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2990 0 (2991 2992 2993) () 0
-() ())
-2994 'h5pset_sieve_buf_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2995 0 (2996 2997 2998) () 0
-() ())
-2999 'h5pset_sym_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3000 0 (3001 3002 3003 3004) () 0 () ())
-3005 'h5pset_local_heap_size_hint_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3006 0 (3007 3008 3009) () 0
-() ())
-3010 'h5pset_userblock_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3011 0 (3012 3013 3014) () 0 () ())
-3015 'h5r' 'h5r' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-204 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-288 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-289 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3016 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-178 'h5rcreate_object_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3017 0 (3018 3019 3020 3021) () 0 () ())
-3022 'h5punregister_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3023 0 (3024 3025 3026) () 0 () ())
-177 'h5rcreate_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3027 0 (3028 3029 3030 3031 3032) () 0 ()
-())
-3033 'h5pset_szip_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3034 0 (3035 3036 3037 3038) () 0 () ())
-180 'h5rget_name_object_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3039 0 (
-3040 3041 3042 3043 3044) () 0 () ())
-175 'h5rdereference_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3045 0 (3046 3047 3048 3049)
-() 0 () ())
-176 'h5rdereference_object_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3050 0 (3051 3052 3053 3054)
-() 0 () ())
-181 'h5rget_object_type_obj_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3055 0 (3056 3057 3058 3059)
-() 0 () ())
-3060 'h5s' 'h5s' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-199 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-281 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5rget_region_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3061 0 (3062 3063 3064 3065)
-() 0 () ())
-179 'h5rget_name_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3066 0 (
-3067 3068 3069 3070 3071) () 0 () ())
-285 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3072 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'20') () 0 () ())
-3073 'h5pset_libver_bounds_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3074 0 (3075 3076 3077 3078)
-() 0 () ())
-3079 'h5pset_gc_references_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3080 0 (3081 3082 3083) () 0
-() ())
-272 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-270 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-273 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-284 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-278 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-282 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-286 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3084 'h5scopy_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3085 0 (3086 3087 3088) () 0 () ())
-3089 'h5sclose_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3090 0 (3091 3092) () 0 () ())
-274 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3093 'h5screate_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3094 0 (3095 3096 3097
-3098 3099) () 0 () ())
-3100 'h5sdecode_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3101 0 (3102 3103 3104) () 0 () ())
-3105 'h5sget_select_bounds_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3106 0 (3107 3108 3109 3110)
-() 0 () ())
-3111 'h5sextent_equal_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3112 0 (3113 3114 3115 3116) () 0 () ())
-3117 'h5sextent_copy_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3118 0 (3119 3120 3121) () 0 () ())
-3122 'h5sget_select_npoints_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3123 0 (3124 3125 3126) () 0
-() ())
-3127 'h5sget_select_hyper_nblocks_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3128 0 (3129 3130 3131) () 0
-() ())
-3132 'h5sget_select_hyper_blocklist_f' 'h5s' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3133 0 (3134
-3135 3136 3137 3138) () 0 () ())
-3139 'h5sget_select_elem_pointlist_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3140 0 (3141 3142 3143 3144
-3145) () 0 () ())
-3146 'h5sget_simple_extent_dims_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3147 0 (3148 3149 3150 3151)
-() 0 () ())
-3152 'h5sget_select_type_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3153 0 (3154 3155 3156) () 0
-() ())
-3157 'h5sget_select_elem_npoints_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3158 0 (3159 3160 3161) () 0
-() ())
-3162 'h5sget_simple_extent_npoints_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3163 0 (3164 3165 3166) () 0
-() ())
-3167 'h5sget_simple_extent_ndims_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3168 0 (3169 3170 3171) () 0
-() ())
-3172 'h5sencode_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3173 0 (3174 3175 3176 3177) () 0 () ())
-3178 'h5screate_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3179 0 (3180 3181 3182) () 0 () ())
-3183 'h5sis_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3184 0 (3185 3186 3187) () 0 () ())
-3188 'h5soffset_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3189 0 (3190 3191 3192) () 0 () ())
-3193 'h5sget_simple_extent_type_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3194 0 (3195 3196 3197) () 0
-() ())
-3198 'h5sselect_none_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3199 0 (3200 3201) () 0 () ())
-3202 'h5sselect_valid_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3203 0 (3204 3205 3206) () 0 () ())
-3207 'h5sselect_hyperslab_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3208 0 (
-3209 3210 3211 3212 3213 3214 3215) () 0 () ())
-3216 'h5sselect_elements_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3217 0 (3218 3219 3220 3221
-3222 3223) () 0 () ())
-3224 'h5sset_extent_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3225 0 (3226 3227 3228 3229
-3230) () 0 () ())
-262 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-258 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-242 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3231 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'34') () 0 () ())
-444 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-443 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-441 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-266 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-442 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-265 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-454 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3232 'h5t' 'h5t' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-3233 'h5sset_extent_none_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3234 0 (3235 3236) () 0 () ())
-457 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-450 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-447 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-446 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-445 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-456 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-267 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-448 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-449 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-451 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-261 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-455 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3237 'h5sselect_all_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3238 0 (3239 3240) () 0 () ())
-269 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-268 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-436 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-437 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-438 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-434 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-440 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-453 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-452 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-428 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-429 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-430 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-439 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-425 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-432 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-426 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-431 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-427 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-433 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-263 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-264 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3241 'h5tb' 'h5tb' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-3242 'h5tbdelete_field_f' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3243 0 (3244 3245 3246 3247)
-() 0 () ())
-184 'h5tbinsert_field_f_double' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3248 0 (3249 3250 3251 3252
-3253 3254 3255) () 0 () ())
-186 'h5tbinsert_field_f_int' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3256 0 (3257 3258 3259 3260
-3261 3262 3263) () 0 () ())
-185 'h5tbinsert_field_f_float' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3264 0 (3265 3266 3267 3268
-3269 3270 3271) () 0 () ())
-3272 'h5tbget_table_info_f' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3273 0 (3274 3275 3276 3277
-3278) () 0 () ())
-183 'h5tbinsert_field_f_string' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3279 0 (3280 3281 3282 3283
-3284 3285 3286) () 0 () ())
-3287 'h5tbmake_table_f' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3288 0 (3289 3290 3291 3292 3293 3294
-3295 3296 3297 3298 3299 3300) () 0 () ())
-3301 'h5tbget_field_info_f' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3302 0 (3303 3304 3305 3306
-3307 3308 3309 3310) () 0 () ())
-3311 'h5tarray_create_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3312 0 (3313 3314 3315 3316 3317) () 0 ()
-())
-424 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-435 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3318 'h5pset_fapl_direct_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3319 0 (3320 3321 3322 3323
-3324) () 0 () ())
-3325 'h5pget_char_encoding_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3326 0 (3327 3328 3329) () 0
-() ())
-415 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-53 'h5awrite_char_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3330 0 (3331 3332 3333 3334 3335) () 0 ()
-())
-3 'h5tbread_field_index_f_double' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3336 0 (3337 3338 3339 3340
-3341 3342 3343 3344) () 0 () ())
-4 'h5tbread_field_index_f_float' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3345 0 (3346 3347 3348 3349
-3350 3351 3352 3353) () 0 () ())
-2 'h5tbread_field_index_f_string' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3354 0 (3355 3356 3357 3358
-3359 3360 3361 3362) () 0 () ())
-5 'h5tbread_field_index_f_int' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3363 0 (3364 3365 3366 3367
-3368 3369 3370 3371) () 0 () ())
-188 'h5tbread_field_name_f_double' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3372 0 (3373 3374 3375 3376
-3377 3378 3379 3380) () 0 () ())
-187 'h5tbread_field_name_f_string' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3381 0 (3382 3383 3384 3385
-3386 3387 3388 3389) () 0 () ())
-190 'h5tbread_field_name_f_int' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3390 0 (3391 3392 3393 3394
-3395 3396 3397 3398) () 0 () ())
-192 'h5tbwrite_field_index_f_double' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3399 0 (3400 3401 3402 3403
-3404 3405 3406 3407) () 0 () ())
-193 'h5tbwrite_field_index_f_float' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3408 0 (3409 3410 3411 3412
-3413 3414 3415 3416) () 0 () ())
-189 'h5tbread_field_name_f_float' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3417 0 (3418 3419 3420 3421
-3422 3423 3424 3425) () 0 () ())
-194 'h5tbwrite_field_index_f_int' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3426 0 (3427 3428 3429 3430
-3431 3432 3433 3434) () 0 () ())
-196 'h5tbwrite_field_name_f_double' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3435 0 (3436 3437 3438 3439
-3440 3441 3442 3443) () 0 () ())
-198 'h5tbwrite_field_name_f_int' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3444 0 (3445 3446 3447 3448
-3449 3450 3451 3452) () 0 () ())
-3453 'h5tclose_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3454 0 (3455 3456) () 0 () ())
-3457 'h5tcommit_anon_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3458 0 (3459 3460 3461
-3462 3463) () 0 () ())
-195 'h5tbwrite_field_name_f_string' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3464 0 (3465 3466 3467 3468
-3469 3470 3471 3472) () 0 () ())
-3473 'h5tcommit_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3474 0 (3475 3476 3477 3478
-3479 3480 3481) () 0 () ())
-3482 'h5tcompiler_conv_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3483 0 (3484 3485 3486 3487) () 0 () ())
-3488 'h5tcreate_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3489 0 (3490 3491 3492 3493) () 0 () ())
-3494 'h5tcopy_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3495 0 (3496 3497 3498) () 0 () ())
-3499 'h5tcommitted_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3500 0 (3501 3502 3503) () 0 () ())
-197 'h5tbwrite_field_name_f_float' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3504 0 (3505 3506 3507 3508
-3509 3510 3511 3512) () 0 () ())
-3513 'h5tenum_nameof_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3514 0 (3515 3516 3517 3518 3519) () 0 ()
-())
-3520 'h5tequal_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3521 0 (3522 3523 3524 3525) () 0 () ())
-3526 'h5tget_array_dims_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3527 0 (3528 3529 3530) () 0
-() ())
-3531 'h5tenum_valueof_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3532 0 (3533 3534 3535 3536) () 0 () ())
-3537 'h5tenum_insert_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3538 0 (3539 3540 3541 3542) () 0 () ())
-3543 'h5tenum_create_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3544 0 (3545 3546 3547) () 0 () ())
-3548 'h5tget_create_plist_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3549 0 (3550 3551 3552) () 0
-() ())
-3553 'h5tget_class_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3554 0 (3555 3556 3557) () 0 () ())
-3558 'h5tget_array_ndims_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3559 0 (3560 3561 3562) () 0
-() ())
-3563 'h5tencode_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3564 0 (3565 3566 3567 3568) () 0 () ())
-3569 'h5tget_ebias_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3570 0 (3571 3572 3573) () 0 () ())
-3574 'h5tget_fields_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3575 0 (3576 3577 3578 3579 3580 3581
-3582) () 0 () ())
-3583 'h5tget_member_class_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3584 0 (3585 3586 3587 3588)
-() 0 () ())
-3589 'h5tget_member_offset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3590 0 (3591 3592 3593 3594)
-() 0 () ())
-3595 'h5tget_member_name_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3596 0 (3597 3598 3599 3600
-3601) () 0 () ())
-3602 'h5tget_member_type_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3603 0 (3604 3605 3606 3607)
-() 0 () ())
-3608 'h5tget_member_value_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3609 0 (3610 3611 3612 3613)
-() 0 () ())
-3614 'h5tget_member_index_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3615 0 (3616 3617 3618 3619)
-() 0 () ())
-3620 'h5tget_inpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3621 0 (3622 3623 3624) () 0 () ())
-3625 'h5tget_cset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3626 0 (3627 3628 3629) () 0 () ())
-3630 'h5tdecode_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3631 0 (3632 3633 3634) () 0 () ())
-191 'h5tbwrite_field_index_f_string' 'h5tb' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3635 0 (3636 3637 3638 3639
-3640 3641 3642 3643) () 0 () ())
-3644 'h5tget_nmembers_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3645 0 (3646 3647 3648) () 0 () ())
-3649 'h5tget_norm_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3650 0 (3651 3652 3653) () 0 () ())
-3654 'h5tget_order_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3655 0 (3656 3657 3658) () 0 () ())
-3659 'h5tget_offset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3660 0 (3661 3662 3663) () 0 () ())
-3664 'h5tget_pad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3665 0 (3666 3667 3668 3669) () 0 () ())
-3670 'h5tget_sign_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3671 0 (3672 3673 3674) () 0 () ())
-3675 'h5tget_size_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3676 0 (3677 3678 3679) () 0 () ())
-3680 'h5tget_super_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3681 0 (3682 3683 3684) () 0 () ())
-3685 'h5tget_strpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3686 0 (3687 3688 3689) () 0 () ())
-3690 'h5tinsert_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3691 0 (3692 3693 3694 3695 3696) () 0 () ())
-3697 'h5tget_tag_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3698 0 (3699 3700 3701 3702) () 0 () ())
-3703 'h5tget_precision_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3704 0 (3705 3706 3707) () 0 () ())
-3708 'h5tpack_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3709 0 (3710 3711) () 0 () ())
-3712 'h5tset_cset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3713 0 (3714 3715 3716) () 0 () ())
-3717 'h5topen_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3718 0 (3719 3720 3721 3722
-3723) () 0 () ())
-3724 'h5tset_ebias_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3725 0 (3726 3727 3728) () 0 () ())
-3729 'h5tset_inpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3730 0 (3731 3732 3733) () 0 () ())
-3734 'h5tset_norm_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3735 0 (3736 3737 3738) () 0 () ())
-3739 'h5tset_order_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3740 0 (3741 3742 3743) () 0 () ())
-3744 'h5tset_offset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3745 0 (3746 3747 3748) () 0 () ())
-3749 'h5tset_fields_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3750 0 (3751 3752 3753 3754 3755 3756
-3757) () 0 () ())
-3758 'h5tis_variable_str_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3759 0 (3760 3761 3762) () 0
-() ())
-3763 'h5tset_precision_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3764 0 (3765 3766 3767) () 0 () ())
-3768 'h5tset_strpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3769 0 (3770 3771 3772) () 0 () ())
-3773 'h5tset_size_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3774 0 (3775 3776 3777) () 0 () ())
-226 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-227 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3778 'h5z' 'h5z' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-220 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-231 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3779 'h5tvlen_create_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3780 0 (3781 3782 3783) () 0 () ())
-3784 'h5tset_tag_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3785 0 (3786 3787 3788) () 0 () ())
-233 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-230 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-223 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3789 'h5zfilter_avail_f' 'h5z' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3790 0 (3791 3792 3793) () 0 () ())
-225 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3794 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'14') () 0 () ())
-3795 'hdf5' 'hdf5' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-3796 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((3797 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-3798 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-3799 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3800 'h5zunregister_f' 'h5z' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3801 0 (3802 3803) () 0 () ())
-3804 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3805 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3806 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((3807 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-3808 'h5zget_filter_info_f' 'h5z' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3809 0 (3810 3811 3812) () 0
-() ())
-3813 'h5tset_sign_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3814 0 (3815 3816 3817) () 0 () ())
-3818 'h5tset_pad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3819 0 (3820 3821 3822 3823) () 0 () ())
-3824 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-3825 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-3826 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-3827 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3828 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-3829 'printon' 'h5e' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-3830 'printoff' 'h5e' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0') () 0 () ())
-200 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-216 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-3831 'h5tget_native_type_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3832 0 (3833 3834 3835 3836)
-() 0 () ())
-3436 'loc_id' '' 3435 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3373 'loc_id' '' 3372 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3376 'start' '' 3372 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3375 'field_name' '' 3372 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3379 'buf' '' 3372 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-3378 'type_size' '' 3372 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3384 'field_name' '' 3381 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3380 'errcode' '' 3372 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3377 'nrecords' '' 3372 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3383 'dset_name' '' 3381 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3374 'dset_name' '' 3372 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3512 'errcode' '' 3504 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3508 'start' '' 3504 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3506 'dset_name' '' 3504 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3418 'loc_id' '' 3417 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3442 'buf' '' 3435 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-3467 'field_name' '' 3464 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3507 'field_name' '' 3504 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3394 'start' '' 3390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3505 'loc_id' '' 3504 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3419 'dset_name' '' 3417 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3510 'type_size' '' 3504 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3397 'buf' '' 3390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3468 'start' '' 3464 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3393 'field_name' '' 3390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3421 'start' '' 3417 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3437 'dset_name' '' 3435 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-477 'obj_name' '' 475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-476 'loc_id' '' 475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-480 'space_id' '' 475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-478 'attr_name' '' 475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-483 'acpl_id' '' 475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-484 'aapl_id' '' 475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-488 'attr_id' '' 487 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-482 'hdferr' '' 475 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-485 'lapl_id' '' 475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-810 'name' '' 808 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-481 'attr' '' 475 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-809 'loc_id' '' 808 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-812 'space_id' '' 808 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-479 'type_id' '' 475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-813 'attr_id' '' 808 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-507 'loc_id' '' 506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-811 'type_id' '' 808 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-510 'hdferr' '' 506 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-509 'attr_name' '' 506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-511 'lapl_id' '' 506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-815 'acpl_id' '' 808 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-816 'aapl_id' '' 808 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-489 'hdferr' '' 487 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-495 'idx_type' '' 492 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-498 'hdferr' '' 492 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-494 'obj_name' '' 492 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-496 'order' '' 492 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-508 'obj_name' '' 506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3511 'buf' '' 3504 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-497 'n' '' 492 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-553 'hdferr' '' 548 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-551 'attr_name' '' 548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-552 'attr_exists' '' 548 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-549 'loc_id' '' 548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-550 'obj_name' '' 548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-499 'lapl_id' '' 492 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-516 'attr_exists' '' 513 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-515 'attr_name' '' 513 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-554 'lapl_id' '' 548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-521 'obj_name' '' 519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-520 'loc_id' '' 519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3420 'field_name' '' 3417 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-525 'f_corder_valid' '' 519 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-523 'order' '' 519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-530 'lapl_id' '' 519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-526 'corder' '' 519 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-527 'cset' '' 519 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-528 'data_size' '' 519 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-529 'hdferr' '' 519 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-517 'hdferr' '' 513 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-814 'hdferr' '' 808 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-587 'cset' '' 583 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-585 'f_corder_valid' '' 583 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-589 'hdferr' '' 583 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-514 'obj_id' '' 513 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-522 'idx_type' '' 519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-493 'loc_id' '' 492 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-584 'attr_id' '' 583 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-588 'data_size' '' 583 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-535 'attr_name' '' 532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-538 'cset' '' 532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-541 'lapl_id' '' 532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-540 'hdferr' '' 532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-534 'obj_name' '' 532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-586 'corder' '' 583 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-539 'data_size' '' 532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-545 'creation_prop_id' '' 543 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-546 'hdferr' '' 543 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-502 'obj_id' '' 501 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-544 'attr_id' '' 543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-504 'hdferr' '' 501 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-579 'size' '' 577 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-3509 'nrecords' '' 3504 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-537 'corder' '' 532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-581 'hdferr' '' 577 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3441 'type_size' '' 3435 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-568 'attr_id' '' 567 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-573 'obj_id' '' 572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-578 'attr_id' '' 577 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-574 'attr_num' '' 572 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-560 'order' '' 556 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-558 'obj_name' '' 556 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-562 'name' '' 556 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-564 'size' '' 556 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-561 'n' '' 556 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-557 'loc_id' '' 556 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-569 'space_id' '' 567 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-570 'hdferr' '' 567 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-607 'attr_id' '' 603 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-580 'buf' '' 577 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-559 'idx_type' '' 556 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-565 'lapl_id' '' 556 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-605 'obj_name' '' 603 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-608 'hdferr' '' 603 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-609 'aapl_id' '' 603 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-610 'lapl_id' '' 603 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-661 'loc_id' '' 660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-663 'idx_type' '' 660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-662 'obj_name' '' 660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-665 'n' '' 660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-669 'lapl_id' '' 660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-666 'attr_id' '' 660 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-667 'hdferr' '' 660 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-668 'aapl_id' '' 660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-606 'attr_name' '' 603 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-563 'hdferr' '' 556 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-503 'name' '' 501 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-536 'f_corder_valid' '' 532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-604 'loc_id' '' 603 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-600 'hdferr' '' 596 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-598 'attr_name' '' 596 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-614 'buf' '' 611 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 615 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-615 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-615 'dims' '' 611 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-601 'aapl_id' '' 596 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-599 'attr_id' '' 596 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-597 'obj_id' '' 596 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-654 'attr_id' '' 653 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-655 'memtype_id' '' 653 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-612 'attr_id' '' 611 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-657 'dims' '' 653 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-613 'memtype_id' '' 611 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-618 'attr_id' '' 617 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-656 'buf' '' 653 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 657 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-657 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 657 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-616 'hdferr' '' 611 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-633 'attr_id' '' 630 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-634 'hdferr' '' 630 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-631 'obj_id' '' 630 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-620 'buf' '' 617 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 621 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-632 'index' '' 630 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-658 'hdferr' '' 653 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-644 'buf' '' 641 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 645 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-645 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 645 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 645 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-645 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-642 'attr_id' '' 641 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-645 'dims' '' 641 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-646 'hdferr' '' 641 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-643 'memtype_id' '' 641 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-651 'dims' '' 647 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-652 'hdferr' '' 647 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-650 'buf' '' 647 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 651 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-651 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 651 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 651 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-651 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 651 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-648 'attr_id' '' 647 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-649 'memtype_id' '' 647 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-639 'dims' '' 635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-638 'buf' '' 635 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 639 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-639 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 639 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 639 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-693 'hdferr' '' 688 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-691 'buf' '' 688 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 692 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-692 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-690 'memtype_id' '' 688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-692 'dims' '' 688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-689 'attr_id' '' 688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-636 'attr_id' '' 635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-622 'hdferr' '' 617 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-664 'order' '' 660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-680 'dims' '' 676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-678 'memtype_id' '' 676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-679 'buf' '' 676 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 680 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-672 'memtype_id' '' 670 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-671 'attr_id' '' 670 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-675 'hdferr' '' 670 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-673 'buf' '' 670 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-674 'dims' '' 670 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-677 'attr_id' '' 676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-640 'hdferr' '' 635 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-780 'memtype_id' '' 778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-781 'buf' '' 778 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 782 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-782 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 782 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 782 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-782 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 782 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 782 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-713 'attr_id' '' 712 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-716 'dims' '' 712 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-681 'hdferr' '' 676 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-782 'dims' '' 778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-715 'buf' '' 712 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 716 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-716 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 716 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 716 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-716 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 716 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-714 'memtype_id' '' 712 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-727 'buf' '' 724 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 728 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-728 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 728 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 728 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-728 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-637 'memtype_id' '' 635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-783 'hdferr' '' 778 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-729 'hdferr' '' 724 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-725 'attr_id' '' 724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-697 'buf' '' 694 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 698 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-698 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 698 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 698 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-728 'dims' '' 724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-698 'dims' '' 694 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-696 'memtype_id' '' 694 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-717 'hdferr' '' 712 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-709 'buf' '' 706 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-711 'hdferr' '' 706 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-707 'attr_id' '' 706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-708 'memtype_id' '' 706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-621 'dims' '' 617 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-695 'attr_id' '' 694 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-726 'memtype_id' '' 724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-704 'dims' '' 700 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-703 'buf' '' 700 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 704 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-704 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 704 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 704 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-704 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 704 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 704 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-701 'attr_id' '' 700 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-710 'dims' '' 706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-702 'memtype_id' '' 700 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-683 'attr_id' '' 682 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-687 'hdferr' '' 682 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-685 'buf' '' 682 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 686 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-686 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 686 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-686 'dims' '' 682 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-705 'hdferr' '' 700 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-684 'memtype_id' '' 682 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-779 'attr_id' '' 778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-575 'hdferr' '' 572 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-619 'memtype_id' '' 617 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-734 'dims' '' 730 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-719 'attr_id' '' 718 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-731 'attr_id' '' 730 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-733 'buf' '' 730 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 734 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-734 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-721 'buf' '' 718 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 722 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-720 'memtype_id' '' 718 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-735 'hdferr' '' 730 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-732 'memtype_id' '' 730 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-741 'hdferr' '' 736 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-738 'memtype_id' '' 736 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-739 'buf' '' 736 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 740 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-740 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 740 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 740 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-737 'attr_id' '' 736 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-747 'hdferr' '' 742 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-775 'buf' '' 772 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-777 'hdferr' '' 772 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-774 'memtype_id' '' 772 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-776 'dims' '' 772 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-740 'dims' '' 736 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-773 'attr_id' '' 772 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-746 'dims' '' 742 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-744 'memtype_id' '' 742 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-745 'buf' '' 742 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 746 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-746 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 746 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 746 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-746 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 746 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-743 'attr_id' '' 742 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-751 'buf' '' 748 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 752 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-752 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 752 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 752 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-752 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 752 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 752 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-750 'memtype_id' '' 748 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-749 'attr_id' '' 748 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-753 'hdferr' '' 748 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-767 'attr_id' '' 766 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-771 'hdferr' '' 766 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-770 'dims' '' 766 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-804 'buf' '' 801 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 805 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-805 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-806 'hdferr' '' 801 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-805 'dims' '' 801 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-757 'buf' '' 754 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 758 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-758 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 758 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 758 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-758 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-756 'memtype_id' '' 754 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-758 'dims' '' 754 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-761 'attr_id' '' 760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-755 'attr_id' '' 754 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-803 'memtype_id' '' 801 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-802 'attr_id' '' 801 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-759 'hdferr' '' 754 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-763 'buf' '' 760 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 764 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-764 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 764 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-768 'memtype_id' '' 766 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-592 'attr_id' '' 591 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-765 'hdferr' '' 760 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-593 'type_id' '' 591 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-857 'memtype_id' '' 855 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-594 'hdferr' '' 591 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-860 'hdferr' '' 855 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-793 'dims' '' 789 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-794 'hdferr' '' 789 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-790 'attr_id' '' 789 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-824 'attr_id' '' 823 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-792 'buf' '' 789 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 793 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-793 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 793 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 793 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-859 'dims' '' 855 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-856 'attr_id' '' 855 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-762 'memtype_id' '' 760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-769 'buf' '' 766 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 770 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-858 'buf' '' 855 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 859 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-859 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 859 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 859 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-859 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-827 'dims' '' 823 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-818 'attr_id' '' 817 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-826 'buf' '' 823 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-828 'hdferr' '' 823 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-822 'hdferr' '' 817 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-821 'dims' '' 817 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-831 'loc_id' '' 830 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-832 'old_attr_name' '' 830 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-833 'new_attr_name' '' 830 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-820 'buf' '' 817 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 821 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-821 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 821 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 821 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-821 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 821 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 821 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-834 'hdferr' '' 830 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-892 'attr_id' '' 891 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-893 'memtype_id' '' 891 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-895 'dims' '' 891 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-896 'hdferr' '' 891 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-894 'buf' '' 891 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 895 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-895 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-825 'memtype_id' '' 823 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-819 'memtype_id' '' 817 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-791 'memtype_id' '' 789 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-890 'hdferr' '' 885 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-887 'memtype_id' '' 885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-868 'attr_id' '' 867 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-888 'buf' '' 885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 889 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-889 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 889 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 889 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-889 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-752 'dims' '' 748 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-723 'hdferr' '' 718 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-722 'dims' '' 718 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-872 'hdferr' '' 867 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-869 'memtype_id' '' 867 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-880 'attr_id' '' 879 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-881 'memtype_id' '' 879 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-871 'dims' '' 867 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-889 'dims' '' 885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-884 'hdferr' '' 879 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-877 'dims' '' 873 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-878 'hdferr' '' 873 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-874 'attr_id' '' 873 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-882 'buf' '' 879 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 883 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-883 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 883 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 883 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-883 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 883 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 883 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-862 'attr_id' '' 861 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-863 'memtype_id' '' 861 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-883 'dims' '' 879 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-916 'attr_id' '' 915 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-917 'memtype_id' '' 915 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-865 'dims' '' 861 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-919 'dims' '' 915 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-898 'attr_id' '' 897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-920 'hdferr' '' 915 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-902 'hdferr' '' 897 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-907 'dims' '' 903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-905 'memtype_id' '' 903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-906 'buf' '' 903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 907 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 907 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 907 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 907 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-904 'attr_id' '' 903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-900 'buf' '' 897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 901 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 901 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-866 'hdferr' '' 861 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-864 'buf' '' 861 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 865 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-865 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 865 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-875 'memtype_id' '' 873 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-899 'memtype_id' '' 897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-922 'attr_id' '' 921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-924 'buf' '' 921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 925 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-908 'hdferr' '' 903 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-926 'hdferr' '' 921 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1046 'attr_id' '' 1045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1047 'memtype_id' '' 1045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-925 'dims' '' 921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-923 'memtype_id' '' 921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-931 'dims' '' 927 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-929 'memtype_id' '' 927 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1050 'hdferr' '' 1045 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1048 'buf' '' 1045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1049 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1049 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1049 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1049 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1049 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1049 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1049 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-935 'memtype_id' '' 933 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1049 'dims' '' 1045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-928 'attr_id' '' 927 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-932 'hdferr' '' 927 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-936 'buf' '' 933 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ()) 0
-0 () () 0 () ())
-937 'dims' '' 933 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-930 'buf' '' 927 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 931 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 931 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 931 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 931 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-931 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 931 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-913 'dims' '' 909 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-938 'hdferr' '' 933 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-912 'buf' '' 909 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 913 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 913 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 913 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 913 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-913 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-911 'memtype_id' '' 909 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-910 'attr_id' '' 909 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-918 'buf' '' 915 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 919 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 919 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 919 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-941 'memtype_id' '' 939 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-943 'dims' '' 939 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-940 'attr_id' '' 939 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-944 'hdferr' '' 939 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-886 'attr_id' '' 885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-954 'buf' '' 951 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 955 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-955 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 955 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-914 'hdferr' '' 909 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-942 'buf' '' 939 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 943 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-970 'attr_id' '' 969 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-973 'dims' '' 969 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-972 'buf' '' 969 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 973 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-973 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-956 'hdferr' '' 951 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-953 'memtype_id' '' 951 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-934 'attr_id' '' 933 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-901 'dims' '' 897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-971 'memtype_id' '' 969 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-974 'hdferr' '' 969 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-950 'hdferr' '' 945 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-947 'memtype_id' '' 945 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-949 'dims' '' 945 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3334 'dims' '' 3330 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-948 'buf' '' 945 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 949 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-949 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 949 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 949 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-3335 'hdferr' '' 3330 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-836 'attr_id' '' 835 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3333 'buf' '' 3330 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-3331 'attr_id' '' 3330 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-838 'buf' '' 835 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 839 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-850 'attr_id' '' 849 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-837 'memtype_id' '' 835 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-839 'dims' '' 835 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-840 'hdferr' '' 835 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-853 'dims' '' 849 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-851 'memtype_id' '' 849 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-852 'buf' '' 849 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 853 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-853 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 853 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 853 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-853 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 853 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1043 'dims' '' 1039 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1042 'buf' '' 1039 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1043 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1043 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1043 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1043 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1043 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1043 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1043 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1044 'hdferr' '' 1039 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1034 'attr_id' '' 1033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-854 'hdferr' '' 849 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3332 'memtype_id' '' 3330 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1041 'memtype_id' '' 1039 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1036 'buf' '' 1033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1037 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-1037 'dims' '' 1033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1035 'memtype_id' '' 1033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1040 'attr_id' '' 1039 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-946 'attr_id' '' 945 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-876 'buf' '' 873 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 877 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-877 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 877 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 877 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-877 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 877 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-986 'hdferr' '' 981 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-982 'attr_id' '' 981 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-983 'memtype_id' '' 981 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-997 'dims' '' 993 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-994 'attr_id' '' 993 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-996 'buf' '' 993 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 997 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 997 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 997 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 997 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-997 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 997 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-995 'memtype_id' '' 993 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-998 'hdferr' '' 993 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1021 'dims' '' 1017 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1019 'memtype_id' '' 1017 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1018 'attr_id' '' 1017 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-988 'attr_id' '' 987 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1038 'hdferr' '' 1033 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1020 'buf' '' 1017 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1021 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1021 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1021 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1021 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1021 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1027 'dims' '' 1023 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1028 'hdferr' '' 1023 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-991 'dims' '' 987 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1024 'attr_id' '' 1023 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-977 'memtype_id' '' 975 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-976 'attr_id' '' 975 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1025 'memtype_id' '' 1023 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-992 'hdferr' '' 987 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-978 'buf' '' 975 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-990 'buf' '' 987 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 991 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 991 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 991 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 991 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-952 'attr_id' '' 951 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-979 'dims' '' 975 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1026 'buf' '' 1023 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1027 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1027 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1027 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-847 'hdferr' '' 842 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-843 'loc_id' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-845 'old_attr_name' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-846 'new_attr_name' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-844 'obj_name' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-955 'dims' '' 951 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1022 'hdferr' '' 1017 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-989 'memtype_id' '' 987 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-985 'dims' '' 981 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-961 'dims' '' 957 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-962 'hdferr' '' 957 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-965 'memtype_id' '' 963 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-960 'buf' '' 957 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 961 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-961 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 961 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 961 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-961 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 961 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-967 'dims' '' 963 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-958 'attr_id' '' 957 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1012 'attr_id' '' 1011 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-966 'buf' '' 963 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 967 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-967 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 967 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 967 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-967 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-959 'memtype_id' '' 957 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1015 'dims' '' 1011 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1014 'buf' '' 1011 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-1016 'hdferr' '' 1011 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-968 'hdferr' '' 963 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-964 'attr_id' '' 963 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-848 'lapl_id' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-984 'buf' '' 981 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 985 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 985 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1009 'relnum' '' 1006 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1008 'minnum' '' 1006 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1000 'attr_id' '' 999 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1001 'memtype_id' '' 999 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1032 'error' '' 1031 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-796 'attr_id' '' 795 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-799 'dims' '' 795 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1003 'dims' '' 999 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1054 'loc_id' '' 1053 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-800 'hdferr' '' 795 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1004 'hdferr' '' 999 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-797 'memtype_id' '' 795 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-798 'buf' '' 795 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 799 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-799 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 799 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1010 'error' '' 1006 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1002 'buf' '' 999 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1003 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1003 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1003 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1003 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1003 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1003 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1003 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1057 'dset_id' '' 1053 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1013 'memtype_id' '' 1011 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1058 'hdferr' '' 1053 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1093 'loc_id' '' 1092 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1059 'dcpl_id' '' 1053 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1096 'space_id' '' 1092 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1098 'hdferr' '' 1092 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1099 'dcpl_id' '' 1092 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1100 'lcpl_id' '' 1092 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1097 'dset_id' '' 1092 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1095 'type_id' '' 1092 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1101 'dapl_id' '' 1092 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1063 'space_id' '' 1061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1440 'dset_id' '' 1439 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1441 'hdferr' '' 1439 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1060 'dapl_id' '' 1053 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1078 'space_id' '' 1076 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1064 'buf' '' 1061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-1079 'buf' '' 1076 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1077 'fill_value' '' 1076 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1087 'fill_value' '' 1086 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () () 0 () ())
-1088 'space_id' '' 1086 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1070 'hdferr' '' 1066 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1090 'hdferr' '' 1086 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1069 'buf' '' 1066 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-1068 'space_id' '' 1066 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1147 'dataset_id' '' 1146 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1089 'buf' '' 1086 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () (1 ASSUMED_SIZE (
-CONSTANT (INTEGER 4 ()) 0 '1') ()) 0 () ())
-1067 'fill_valuer' '' 1066 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 4 ()) 0 0 () () 0 () ())
-1149 'hdferr' '' 1146 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1065 'hdferr' '' 1061 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1062 'fill_value' '' 1061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 8 ()) 0 0 () () 0 () ())
-1094 'name' '' 1092 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1083 'dataset_id' '' 1082 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1085 'hdferr' '' 1082 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1109 'dataset_id' '' 1108 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1110 'datatype_id' '' 1108 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1324 'buf' '' 1321 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1325 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1325 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1325 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1322 'dset_id' '' 1321 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1325 'dims' '' 1321 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1328 'file_space_id' '' 1321 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1326 'hdferr' '' 1321 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1327 'mem_space_id' '' 1321 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1084 'plist_id' '' 1082 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1055 'type_id' '' 1053 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1116 'dset_id' '' 1115 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1323 'mem_type_id' '' 1321 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1118 'buf' '' 1115 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1119 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1119 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1122 'file_space_id' '' 1115 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1123 'xfer_prp' '' 1115 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1121 'mem_space_id' '' 1115 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1127 'buf' '' 1124 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1128 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1120 'hdferr' '' 1115 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1126 'mem_type_id' '' 1124 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1128 'dims' '' 1124 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1130 'mem_space_id' '' 1124 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1117 'mem_type_id' '' 1115 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1329 'xfer_prp' '' 1321 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1007 'majnum' '' 1006 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-870 'buf' '' 867 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 871 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-871 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 871 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 871 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-699 'hdferr' '' 694 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1125 'dset_id' '' 1124 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1131 'file_space_id' '' 1124 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1135 'loc_id' '' 1134 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1132 'xfer_prp' '' 1124 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1137 'dset_id' '' 1134 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1139 'dapl_id' '' 1134 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1138 'hdferr' '' 1134 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1136 'name' '' 1134 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1119 'dims' '' 1115 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1143 'size' '' 1141 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-1142 'dataset_id' '' 1141 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1114 'error' '' 1113 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1129 'hdferr' '' 1124 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1111 'hdferr' '' 1108 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1170 'mem_type_id' '' 1168 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1171 'buf' '' 1168 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1172 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1172 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1172 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1172 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1172 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1172 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1172 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1174 'mem_space_id' '' 1168 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1172 'dims' '' 1168 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1151 'dset_id' '' 1150 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1176 'xfer_prp' '' 1168 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1175 'file_space_id' '' 1168 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1173 'hdferr' '' 1168 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1153 'buf' '' 1150 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1154 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1154 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1154 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1154 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1154 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1154 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1158 'xfer_prp' '' 1150 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1156 'mem_space_id' '' 1150 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1157 'file_space_id' '' 1150 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1169 'dset_id' '' 1168 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1313 'dset_id' '' 1312 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1316 'dims' '' 1312 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1315 'buf' '' 1312 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1316 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1316 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1318 'mem_space_id' '' 1312 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1314 'mem_type_id' '' 1312 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1154 'dims' '' 1150 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1189 'buf' '' 1186 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1320 'xfer_prp' '' 1312 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1317 'hdferr' '' 1312 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1155 'hdferr' '' 1150 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1187 'dset_id' '' 1186 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1319 'file_space_id' '' 1312 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1191 'hdferr' '' 1186 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1192 'mem_space_id' '' 1186 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1194 'xfer_prp' '' 1186 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1193 'file_space_id' '' 1186 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1243 'buf' '' 1240 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1244 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1244 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1244 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1244 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1241 'dset_id' '' 1240 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1242 'mem_type_id' '' 1240 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1244 'dims' '' 1240 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1246 'mem_space_id' '' 1240 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1190 'dims' '' 1186 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1245 'hdferr' '' 1240 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1247 'file_space_id' '' 1240 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1152 'mem_type_id' '' 1150 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1251 'mem_type_id' '' 1249 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1250 'dset_id' '' 1249 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1248 'xfer_prp' '' 1240 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1104 'dset_id' '' 1103 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1253 'dims' '' 1249 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1255 'mem_space_id' '' 1249 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1256 'file_space_id' '' 1249 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1106 'hdferr' '' 1103 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1254 'hdferr' '' 1249 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1257 'xfer_prp' '' 1249 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1105 'flag' '' 1103 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1188 'mem_type_id' '' 1186 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1144 'hdferr' '' 1141 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-524 'n' '' 519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-1080 'hdferr' '' 1076 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-980 'hdferr' '' 975 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-764 'dims' '' 760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-533 'loc_id' '' 532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1056 'space_id' '' 1053 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1203 'xfer_prp' '' 1195 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1202 'file_space_id' '' 1195 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1160 'dset_id' '' 1159 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1200 'hdferr' '' 1195 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1162 'buf' '' 1159 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1163 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1163 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1163 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1163 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1163 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1163 'dims' '' 1159 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1161 'mem_type_id' '' 1159 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1201 'mem_space_id' '' 1195 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1198 'buf' '' 1195 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1165 'mem_space_id' '' 1159 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1199 'dims' '' 1195 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1235 'dims' '' 1231 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1234 'buf' '' 1231 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1235 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1235 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1235 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1235 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1235 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1235 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1232 'dset_id' '' 1231 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1233 'mem_type_id' '' 1231 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1237 'mem_space_id' '' 1231 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1238 'file_space_id' '' 1231 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1239 'xfer_prp' '' 1231 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1167 'xfer_prp' '' 1159 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1205 'dset_id' '' 1204 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1206 'mem_type_id' '' 1204 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1208 'dims' '' 1204 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1166 'file_space_id' '' 1159 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1236 'hdferr' '' 1231 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1164 'hdferr' '' 1159 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1212 'xfer_prp' '' 1204 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1209 'hdferr' '' 1204 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1224 'mem_type_id' '' 1222 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1211 'file_space_id' '' 1204 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1223 'dset_id' '' 1222 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1226 'dims' '' 1222 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1227 'hdferr' '' 1222 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1210 'mem_space_id' '' 1204 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1148 'dataspace_id' '' 1146 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1207 'buf' '' 1204 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1208 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1208 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1197 'mem_type_id' '' 1195 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1228 'mem_space_id' '' 1222 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1218 'hdferr' '' 1213 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1217 'dims' '' 1213 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1214 'dset_id' '' 1213 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1221 'xfer_prp' '' 1213 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1219 'mem_space_id' '' 1213 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1271 'dims' '' 1267 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1270 'buf' '' 1267 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1271 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1271 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1273 'mem_space_id' '' 1267 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1272 'hdferr' '' 1267 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1269 'mem_type_id' '' 1267 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1305 'mem_type_id' '' 1303 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1274 'file_space_id' '' 1267 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1306 'buf' '' 1303 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1307 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1310 'file_space_id' '' 1303 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1307 'dims' '' 1303 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1304 'dset_id' '' 1303 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1308 'hdferr' '' 1303 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1300 'mem_space_id' '' 1294 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1298 'dims' '' 1294 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1297 'buf' '' 1294 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1298 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1298 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1298 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1298 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1295 'dset_id' '' 1294 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1299 'hdferr' '' 1294 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1309 'mem_space_id' '' 1303 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1220 'file_space_id' '' 1213 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1296 'mem_type_id' '' 1294 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1216 'buf' '' 1213 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1217 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1217 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1217 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1301 'file_space_id' '' 1294 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1278 'mem_type_id' '' 1276 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1275 'xfer_prp' '' 1267 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1277 'dset_id' '' 1276 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1311 'xfer_prp' '' 1303 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1282 'mem_space_id' '' 1276 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1280 'dims' '' 1276 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1283 'file_space_id' '' 1276 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1279 'buf' '' 1276 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1280 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1280 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1280 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1280 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1280 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1280 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1268 'dset_id' '' 1267 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1215 'mem_type_id' '' 1213 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1284 'xfer_prp' '' 1276 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1289 'dims' '' 1285 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1288 'buf' '' 1285 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1289 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1289 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1289 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1289 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1289 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1293 'xfer_prp' '' 1285 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1292 'file_space_id' '' 1285 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1287 'mem_type_id' '' 1285 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1290 'hdferr' '' 1285 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1262 'dims' '' 1258 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1259 'dset_id' '' 1258 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1263 'hdferr' '' 1258 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1261 'buf' '' 1258 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1262 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1262 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1262 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1291 'mem_space_id' '' 1285 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1265 'file_space_id' '' 1258 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1181 'dims' '' 1177 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1183 'mem_space_id' '' 1177 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1179 'mem_type_id' '' 1177 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1178 'dset_id' '' 1177 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1182 'hdferr' '' 1177 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1266 'xfer_prp' '' 1258 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1184 'file_space_id' '' 1177 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1354 'mem_space_id' '' 1348 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1350 'mem_type_id' '' 1348 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1264 'mem_space_id' '' 1258 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1185 'xfer_prp' '' 1177 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1180 'buf' '' 1177 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1181 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1286 'dset_id' '' 1285 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1260 'mem_type_id' '' 1258 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1281 'hdferr' '' 1276 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1353 'hdferr' '' 1348 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1422 'mem_type_id' '' 1420 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1355 'file_space_id' '' 1348 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1351 'buf' '' 1348 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1352 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1352 'dims' '' 1348 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1302 'xfer_prp' '' 1294 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1230 'xfer_prp' '' 1222 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1225 'buf' '' 1222 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8
-()) 0 0 () () 0 () ())
-1421 'dset_id' '' 1420 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1425 'hdferr' '' 1420 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1428 'xfer_prp' '' 1420 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1331 'dset_id' '' 1330 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1427 'file_space_id' '' 1420 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1332 'mem_type_id' '' 1330 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1335 'hdferr' '' 1330 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1403 'dset_id' '' 1402 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1337 'file_space_id' '' 1330 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1338 'xfer_prp' '' 1330 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1407 'hdferr' '' 1402 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1409 'file_space_id' '' 1402 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1406 'dims' '' 1402 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1405 'buf' '' 1402 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1406 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1406 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1406 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1406 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1406 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1408 'mem_space_id' '' 1402 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1334 'dims' '' 1330 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1404 'mem_type_id' '' 1402 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1423 'buf' '' 1420 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1360 'buf' '' 1357 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1361 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1361 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1361 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1361 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1361 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1361 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1361 'dims' '' 1357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1362 'hdferr' '' 1357 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1336 'mem_space_id' '' 1330 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1363 'mem_space_id' '' 1357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1359 'mem_type_id' '' 1357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1365 'xfer_prp' '' 1357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1376 'dset_id' '' 1375 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1333 'buf' '' 1330 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1334 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1334 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1334 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1410 'xfer_prp' '' 1402 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1426 'mem_space_id' '' 1420 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1356 'xfer_prp' '' 1348 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1358 'dset_id' '' 1357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1382 'file_space_id' '' 1375 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1380 'hdferr' '' 1375 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1378 'buf' '' 1375 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1379 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1379 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1379 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1379 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1379 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1379 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1379 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1414 'buf' '' 1411 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1415 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1415 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1415 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1415 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1412 'dset_id' '' 1411 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1381 'mem_space_id' '' 1375 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1413 'mem_type_id' '' 1411 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1417 'mem_space_id' '' 1411 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1340 'dset_id' '' 1339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1341 'mem_type_id' '' 1339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1419 'xfer_prp' '' 1411 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1345 'mem_space_id' '' 1339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1344 'hdferr' '' 1339 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1432 'buf' '' 1429 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1433 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1433 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1433 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1433 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1433 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1433 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1433 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1433 'dims' '' 1429 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1431 'mem_type_id' '' 1429 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1347 'xfer_prp' '' 1339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1437 'xfer_prp' '' 1429 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1430 'dset_id' '' 1429 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1434 'hdferr' '' 1429 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1342 'buf' '' 1339 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1343 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1343 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1418 'file_space_id' '' 1411 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1075 'hdferr' '' 1072 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1074 'plist_id' '' 1072 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1386 'mem_type_id' '' 1384 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1435 'mem_space_id' '' 1429 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1436 'file_space_id' '' 1429 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1383 'xfer_prp' '' 1375 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1346 'file_space_id' '' 1339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1343 'dims' '' 1339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1416 'hdferr' '' 1411 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1387 'buf' '' 1384 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(DERIVED 3806 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1388 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1388 'dims' '' 1384 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1073 'dset_id' '' 1072 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1390 'mem_space_id' '' 1384 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1394 'dset_id' '' 1393 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1392 'xfer_prp' '' 1384 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1389 'hdferr' '' 1384 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1399 'mem_space_id' '' 1393 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1397 'dims' '' 1393 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1395 'mem_type_id' '' 1393 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1391 'file_space_id' '' 1384 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1379 'dims' '' 1375 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1385 'dset_id' '' 1384 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1400 'file_space_id' '' 1393 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1367 'dset_id' '' 1366 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1372 'mem_space_id' '' 1366 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1371 'hdferr' '' 1366 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1370 'dims' '' 1366 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1502 'buf' '' 1499 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1503 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1503 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1503 'dims' '' 1499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1500 'dset_id' '' 1499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1507 'file_space_id' '' 1499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1506 'mem_space_id' '' 1499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1505 'hdferr' '' 1499 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1501 'mem_type_id' '' 1499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1373 'file_space_id' '' 1366 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1369 'buf' '' 1366 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-1368 'mem_type_id' '' 1366 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1444 'mem_type_id' '' 1442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1443 'dset_id' '' 1442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1374 'xfer_prp' '' 1366 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1508 'xfer_prp' '' 1499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1447 'str_len' '' 1442 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-1445 'buf' '' 1442 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1446 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1))))) 0 () ())
-1448 'hdferr' '' 1442 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1396 'buf' '' 1393 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(DERIVED 3796 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1397 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1451 'xfer_prp' '' 1442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1834 'dset_id' '' 1833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1377 'mem_type_id' '' 1375 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1401 'xfer_prp' '' 1393 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1446 'dims' '' 1442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1504 'len' '' 1499 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1398 'hdferr' '' 1393 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1839 'hdferr' '' 1833 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1837 'dims' '' 1833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1841 'file_space_id' '' 1833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1840 'mem_space_id' '' 1833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1838 'len' '' 1833 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1835 'mem_type_id' '' 1833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1474 'mem_type_id' '' 1472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1450 'file_space_id' '' 1442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1842 'xfer_prp' '' 1833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1473 'dset_id' '' 1472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1836 'buf' '' 1833 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1837 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1837 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1415 'dims' '' 1411 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1480 'xfer_prp' '' 1472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1479 'file_space_id' '' 1472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1476 'dims' '' 1472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1510 'dset_id' '' 1509 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1515 'mem_space_id' '' 1509 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1516 'file_space_id' '' 1509 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1513 'dims' '' 1509 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1519 'dset_id' '' 1518 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1512 'buf' '' 1509 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1513 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1513 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1513 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1513 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1513 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1513 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1522 'dims' '' 1518 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1521 'buf' '' 1518 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1522 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1522 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1522 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1522 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1522 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1514 'hdferr' '' 1509 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1520 'mem_type_id' '' 1518 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1517 'xfer_prp' '' 1509 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1523 'hdferr' '' 1518 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1475 'buf' '' 1472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1476 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1476 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1476 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1575 'buf' '' 1572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1576 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1576 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1576 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1576 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1576 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1576 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1576 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1576 'dims' '' 1572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1577 'hdferr' '' 1572 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1574 'mem_type_id' '' 1572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1578 'mem_space_id' '' 1572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1524 'mem_space_id' '' 1518 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1579 'file_space_id' '' 1572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1580 'xfer_prp' '' 1572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1511 'mem_type_id' '' 1509 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1526 'xfer_prp' '' 1518 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1486 'hdferr' '' 1481 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1482 'dset_id' '' 1481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1487 'mem_space_id' '' 1481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1484 'buf' '' 1481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1485 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1485 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1485 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1485 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1489 'xfer_prp' '' 1481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1483 'mem_type_id' '' 1481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1528 'dset_id' '' 1527 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1530 'buf' '' 1527 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1531 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-1531 'dims' '' 1527 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1533 'mem_space_id' '' 1527 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1529 'mem_type_id' '' 1527 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1485 'dims' '' 1481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1535 'xfer_prp' '' 1527 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1488 'file_space_id' '' 1481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1532 'hdferr' '' 1527 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1573 'dset_id' '' 1572 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1525 'file_space_id' '' 1518 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1539 'buf' '' 1536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-1537 'dset_id' '' 1536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1543 'file_space_id' '' 1536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1496 'mem_space_id' '' 1490 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1495 'hdferr' '' 1490 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1497 'file_space_id' '' 1490 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1498 'xfer_prp' '' 1490 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1491 'dset_id' '' 1490 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1544 'xfer_prp' '' 1536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1493 'buf' '' 1490 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1494 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1494 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1541 'hdferr' '' 1536 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1542 'mem_space_id' '' 1536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1547 'mem_type_id' '' 1545 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1492 'mem_type_id' '' 1490 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1546 'dset_id' '' 1545 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1550 'hdferr' '' 1545 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1549 'dims' '' 1545 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1551 'mem_space_id' '' 1545 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1583 'mem_type_id' '' 1581 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1582 'dset_id' '' 1581 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1548 'buf' '' 1545 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1549 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1549 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1549 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1549 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1585 'dims' '' 1581 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1586 'hdferr' '' 1581 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1592 'mem_type_id' '' 1590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1591 'dset_id' '' 1590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1553 'xfer_prp' '' 1545 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1588 'file_space_id' '' 1581 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1596 'mem_space_id' '' 1590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1587 'mem_space_id' '' 1581 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1589 'xfer_prp' '' 1581 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1552 'file_space_id' '' 1545 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1494 'dims' '' 1490 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1538 'mem_type_id' '' 1536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1540 'dims' '' 1536 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1478 'mem_space_id' '' 1472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1477 'hdferr' '' 1472 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1364 'file_space_id' '' 1357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1584 'buf' '' 1581 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1585 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1585 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1585 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1585 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1585 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1585 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1593 'buf' '' 1590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-1598 'xfer_prp' '' 1590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1594 'dims' '' 1590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1639 'dims' '' 1635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1641 'mem_space_id' '' 1635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1638 'buf' '' 1635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1639 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1639 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1639 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1639 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1639 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1639 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1639 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1636 'dset_id' '' 1635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1826 'mem_type_id' '' 1824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1827 'buf' '' 1824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1828 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1828 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1828 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1828 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1828 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1828 'dims' '' 1824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1643 'xfer_prp' '' 1635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1825 'dset_id' '' 1824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1829 'hdferr' '' 1824 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1640 'hdferr' '' 1635 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1637 'mem_type_id' '' 1635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1832 'xfer_prp' '' 1824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1534 'file_space_id' '' 1527 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1597 'file_space_id' '' 1590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1556 'mem_type_id' '' 1554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1557 'buf' '' 1554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1558 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1558 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1558 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1558 'dims' '' 1554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1830 'mem_space_id' '' 1824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1555 'dset_id' '' 1554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1349 'dset_id' '' 1348 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1449 'mem_space_id' '' 1442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1559 'hdferr' '' 1554 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1562 'xfer_prp' '' 1554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1831 'file_space_id' '' 1824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1642 'file_space_id' '' 1635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1564 'dset_id' '' 1563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1565 'mem_type_id' '' 1563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1566 'buf' '' 1563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1567 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1567 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1571 'xfer_prp' '' 1563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1569 'mem_space_id' '' 1563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1568 'hdferr' '' 1563 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1462 'buf' '' 1459 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1463 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1464 'hdferr' '' 1459 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1463 'dims' '' 1459 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1570 'file_space_id' '' 1563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1461 'mem_type_id' '' 1459 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1567 'dims' '' 1563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1465 'mem_space_id' '' 1459 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1456 'space_id' '' 1453 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1457 'len' '' 1453 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-1627 'dset_id' '' 1626 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1455 'type_id' '' 1453 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1628 'mem_type_id' '' 1626 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1458 'hdferr' '' 1453 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1460 'dset_id' '' 1459 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1454 'dataset_id' '' 1453 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1466 'file_space_id' '' 1459 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1630 'dims' '' 1626 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1634 'xfer_prp' '' 1626 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1633 'file_space_id' '' 1626 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1604 'hdferr' '' 1599 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1602 'buf' '' 1599 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1603 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1603 'dims' '' 1599 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1606 'file_space_id' '' 1599 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1645 'dset_id' '' 1644 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1607 'xfer_prp' '' 1599 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1600 'dset_id' '' 1599 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1629 'buf' '' 1626 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1630 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1630 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1631 'hdferr' '' 1626 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1647 'buf' '' 1644 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1648 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1648 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1648 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1648 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1648 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1648 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1649 'hdferr' '' 1644 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1652 'xfer_prp' '' 1644 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1703 'hdferr' '' 1698 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1699 'dset_id' '' 1698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1705 'file_space_id' '' 1698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1702 'dims' '' 1698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1704 'mem_space_id' '' 1698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1700 'mem_type_id' '' 1698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1619 'mem_type_id' '' 1617 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1701 'buf' '' 1698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1702 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1702 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1702 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1702 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1702 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1706 'xfer_prp' '' 1698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1618 'dset_id' '' 1617 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1646 'mem_type_id' '' 1644 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1648 'dims' '' 1644 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1467 'xfer_prp' '' 1459 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1561 'file_space_id' '' 1554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1623 'mem_space_id' '' 1617 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1624 'file_space_id' '' 1617 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1650 'mem_space_id' '' 1644 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1651 'file_space_id' '' 1644 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1610 'mem_type_id' '' 1608 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1605 'mem_space_id' '' 1599 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1620 'buf' '' 1617 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1621 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1621 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1621 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1621 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1601 'mem_type_id' '' 1599 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1613 'hdferr' '' 1608 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1612 'dims' '' 1608 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1615 'file_space_id' '' 1608 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1614 'mem_space_id' '' 1608 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1616 'xfer_prp' '' 1608 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1625 'xfer_prp' '' 1617 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1609 'dset_id' '' 1608 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1664 'mem_type_id' '' 1662 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1665 'buf' '' 1662 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1632 'mem_space_id' '' 1626 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1668 'mem_space_id' '' 1662 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1667 'hdferr' '' 1662 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1663 'dset_id' '' 1662 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1611 'buf' '' 1608 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1612 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1612 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1612 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1691 'mem_type_id' '' 1689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1697 'xfer_prp' '' 1689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1694 'hdferr' '' 1689 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1690 'dset_id' '' 1689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1692 'buf' '' 1689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1693 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-1695 'mem_space_id' '' 1689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1738 'dims' '' 1734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1737 'buf' '' 1734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1738 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1738 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1738 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1738 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1738 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1738 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1740 'mem_space_id' '' 1734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1739 'hdferr' '' 1734 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1735 'dset_id' '' 1734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1736 'mem_type_id' '' 1734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1696 'file_space_id' '' 1689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1709 'mem_type_id' '' 1707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1708 'dset_id' '' 1707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1742 'xfer_prp' '' 1734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1669 'file_space_id' '' 1662 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1622 'hdferr' '' 1617 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1715 'xfer_prp' '' 1707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1714 'file_space_id' '' 1707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1763 'mem_type_id' '' 1761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1764 'buf' '' 1761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1765 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1765 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1765 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1765 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1766 'hdferr' '' 1761 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1767 'mem_space_id' '' 1761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1711 'dims' '' 1707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1693 'dims' '' 1689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1769 'xfer_prp' '' 1761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1672 'dset_id' '' 1671 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1710 'buf' '' 1707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1711 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1711 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1711 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1711 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1711 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1673 'mem_type_id' '' 1671 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1674 'buf' '' 1671 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1675 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1675 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1675 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1713 'mem_space_id' '' 1707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1765 'dims' '' 1761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1762 'dset_id' '' 1761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1676 'hdferr' '' 1671 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1677 'mem_space_id' '' 1671 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1768 'file_space_id' '' 1761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1712 'hdferr' '' 1707 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1718 'mem_type_id' '' 1716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1724 'xfer_prp' '' 1716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1682 'mem_type_id' '' 1680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1721 'hdferr' '' 1716 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1722 'mem_space_id' '' 1716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1684 'dims' '' 1680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1723 'file_space_id' '' 1716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1683 'buf' '' 1680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1684 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1684 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1681 'dset_id' '' 1680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1720 'dims' '' 1716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1685 'hdferr' '' 1680 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1686 'mem_space_id' '' 1680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1678 'file_space_id' '' 1671 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1670 'xfer_prp' '' 1662 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1675 'dims' '' 1671 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1687 'file_space_id' '' 1680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1688 'xfer_prp' '' 1680 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1717 'dset_id' '' 1716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1657 'dims' '' 1653 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1656 'buf' '' 1653 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1657 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1657 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1657 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1657 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1657 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1657 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1657 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1654 'dset_id' '' 1653 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1666 'dims' '' 1662 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1661 'xfer_prp' '' 1653 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1755 'buf' '' 1752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-DERIVED 3796 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1756 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1658 'hdferr' '' 1653 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1659 'mem_space_id' '' 1653 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1758 'mem_space_id' '' 1752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1759 'file_space_id' '' 1752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1756 'dims' '' 1752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1760 'xfer_prp' '' 1752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1757 'hdferr' '' 1752 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1655 'mem_type_id' '' 1653 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1754 'mem_type_id' '' 1752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1745 'mem_type_id' '' 1743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1560 'mem_space_id' '' 1554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1753 'dset_id' '' 1752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1751 'xfer_prp' '' 1743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1771 'dset_id' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1746 'buf' '' 1743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-DERIVED 3806 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1747 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1750 'file_space_id' '' 1743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1747 'dims' '' 1743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1773 'buf' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1774 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1))))) 0 () ())
-1749 'mem_space_id' '' 1743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1776 'hdferr' '' 1770 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1782 'mem_type_id' '' 1780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1779 'xfer_prp' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1777 'mem_space_id' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1774 'dims' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1660 'file_space_id' '' 1653 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1778 'file_space_id' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1781 'dset_id' '' 1780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1783 'buf' '' 1780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1784 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1784 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1786 'hdferr' '' 1780 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1791 'dset_id' '' 1790 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1789 'xfer_prp' '' 1780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1788 'file_space_id' '' 1780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1775 'str_len' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-1787 'mem_space_id' '' 1780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1793 'buf' '' 1790 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1794 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1794 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1792 'mem_type_id' '' 1790 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1784 'dims' '' 1780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1719 'buf' '' 1716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1720 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1720 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1720 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1720 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1720 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1720 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1720 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1679 'xfer_prp' '' 1671 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1741 'file_space_id' '' 1734 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1621 'dims' '' 1617 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1794 'dims' '' 1790 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1785 'len' '' 1780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1798 'file_space_id' '' 1790 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1748 'hdferr' '' 1743 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1772 'mem_type_id' '' 1770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1799 'xfer_prp' '' 1790 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1795 'len' '' 1790 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1808 'hdferr' '' 1807 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1813 'hdferr' '' 1810 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1811 'error_no' '' 1810 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1823 'name' '' 1821 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3472 'errcode' '' 3464 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1817 'printflag' '' 1816 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1818 'hdferr' '' 1816 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1804 'namelen' '' 1801 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1805 'hdferr' '' 1801 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1812 'name' '' 1810 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1730 'hdferr' '' 1725 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1733 'xfer_prp' '' 1725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1728 'buf' '' 1725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-1729 'dims' '' 1725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1848 'file_id' '' 1845 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1846 'name' '' 1845 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1847 'access_flags' '' 1845 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1731 'mem_space_id' '' 1725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1851 'access_prp' '' 1845 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1849 'hdferr' '' 1845 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1850 'creation_prp' '' 1845 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1727 'mem_type_id' '' 1725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1802 'error_no' '' 1801 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1732 'file_space_id' '' 1725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1726 'dset_id' '' 1725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1860 'object_id' '' 1859 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1803 'name' '' 1801 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1877 'size' '' 1875 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-1878 'hdferr' '' 1875 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1876 'file_id' '' 1875 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1861 'scope' '' 1859 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1862 'hdferr' '' 1859 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1872 'free_space' '' 1870 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1906 'file_id' '' 1905 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1871 'file_id' '' 1870 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1866 'buf' '' 1864 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1873 'hdferr' '' 1870 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1867 'size' '' 1864 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-1907 'obj_type' '' 1905 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1908 'obj_count' '' 1905 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1886 'name' '' 1885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1887 'status' '' 1885 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-1888 'hdferr' '' 1885 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1865 'obj_id' '' 1864 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1909 'hdferr' '' 1905 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1797 'mem_space_id' '' 1790 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1883 'hdferr' '' 1880 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3422 'nrecords' '' 3417 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1918 'ret_file_id' '' 1916 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1900 'max_objs' '' 1897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1898 'file_id' '' 1897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1901 'obj_ids' '' 1897 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-1903 'num_objs' '' 1897 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 8 ()) 0 0 () () 0 () ())
-1899 'obj_type' '' 1897 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1882 'prop_id' '' 1880 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1902 'hdferr' '' 1897 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1917 'file_id' '' 1916 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1822 'hdferr' '' 1821 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1913 'name' '' 1911 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1925 'name' '' 1924 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1914 'hdferr' '' 1911 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1927 'file_id' '' 1924 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1929 'access_prp' '' 1924 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1926 'access_flags' '' 1924 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1891 'loc_id' '' 1890 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1893 'child_id' '' 1890 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1928 'hdferr' '' 1924 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3391 'loc_id' '' 3390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1912 'loc_id' '' 1911 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2355 'access_id' '' 2353 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1895 'access_prp' '' 1890 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2354 'file_id' '' 2353 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1894 'hdferr' '' 1890 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1856 'hdferr' '' 1854 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1855 'file_id' '' 1854 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1932 'error' '' 1931 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2356 'hdferr' '' 2353 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1892 'name' '' 1890 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1868 'hdferr' '' 1864 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1935 'loc_id' '' 1934 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1937 'hdferr' '' 1934 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1938 'gcpl_id' '' 1934 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1939 'gapl_id' '' 1934 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1942 'grp_id' '' 1941 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1947 'name' '' 1945 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1949 'hdferr' '' 1945 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1951 'lcpl_id' '' 1945 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1948 'grp_id' '' 1945 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1936 'grp_id' '' 1934 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2015 'grp_id' '' 2014 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1946 'loc_id' '' 1945 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1952 'gcpl_id' '' 1945 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2017 'hdferr' '' 2014 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2016 'gcpl_id' '' 2014 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2005 'loc_id' '' 2004 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2009 'max_corder' '' 2004 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2008 'nlinks' '' 2004 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2011 'lapl_id' '' 2004 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2007 'storage_type' '' 2004 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2006 'group_name' '' 2004 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1970 'group_name' '' 1968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1972 'order' '' 1968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1973 'n' '' 1968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-1969 'loc_id' '' 1968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2012 'mounted' '' 2004 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (LOGICAL 4 ()) 0 0 () () 0 () ())
-1971 'index_type' '' 1968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1976 'max_corder' '' 1968 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1975 'nlinks' '' 1968 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3289 'table_title' '' 3288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3290 'loc_id' '' 3288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1977 'hdferr' '' 1968 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1978 'lapl_id' '' 1968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1982 'loc_id' '' 1981 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1985 'buffer' '' 1981 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((VARIABLE (INTEGER 8 ()) 0 1984 ()))) 0 0 () () 0 () ())
-1984 'size' '' 1981 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-1986 'hdferr' '' 1981 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1983 'name' '' 1981 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1998 'storage_type' '' 1996 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1997 'group_id' '' 1996 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1999 'nlinks' '' 1996 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1979 'mounted' '' 1968 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (LOGICAL 4 ()) 0 0 () () 0 () ())
-2010 'hdferr' '' 2004 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1950 'size_hint' '' 1945 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 8 ()) 0 0 () () 0 () ())
-1881 'file_id' '' 1880 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1796 'hdferr' '' 1790 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1595 'hdferr' '' 1590 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2000 'max_corder' '' 1996 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3291 'dset_name' '' 3288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1993 'obj_type' '' 1988 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1990 'name' '' 1988 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1992 'obj_name' '' 1988 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3292 'nfields' '' 3288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1994 'hdferr' '' 1988 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1956 'majnum' '' 1955 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2002 'mounted' '' 1996 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (LOGICAL 4 ()) 0 0 () () 0 () ())
-1989 'loc_id' '' 1988 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1991 'idx' '' 1988 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1974 'storage_type' '' 1968 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1962 'loc_id' '' 1961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1943 'hdferr' '' 1941 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1966 'hdferr' '' 1961 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1965 'buffer' '' 1961 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((VARIABLE (INTEGER 8 ()) 0 1964 ()))) 0 0 () () 0 () ())
-1963 'name' '' 1961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3293 'nrecords' '' 3288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1958 'relnum' '' 1955 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2102 'link_type' '' 2100 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2101 'loc_id' '' 2100 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1957 'minnum' '' 1955 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2030 'src_name' '' 2028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2029 'src_loc_id' '' 2028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2104 'new_name' '' 2100 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3294 'type_size' '' 3288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2033 'hdferr' '' 2028 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2103 'current_name' '' 2100 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2051 'grp_id' '' 2048 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2053 'gapl_id' '' 2048 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3295 'field_names' '' 3288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0
-'1') (VARIABLE (INTEGER 8 ()) 0 3292 ())) 0 () ())
-2050 'name' '' 2048 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2037 'loc_id' '' 2036 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2032 'dst_name' '' 2028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2038 'name' '' 2036 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2040 'hdferr' '' 2036 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2063 'name' '' 2061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2065 'hdferr' '' 2061 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2043 'loc_id' '' 2042 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2045 'comment' '' 2042 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2064 'new_name' '' 2061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2062 'loc_id' '' 2061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3296 'field_offset' '' 3288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1')
-(VARIABLE (INTEGER 8 ()) 0 3292 ())) 0 () ())
-2057 'loc_id' '' 2056 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2044 'name' '' 2042 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2046 'hdferr' '' 2042 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2059 'hdferr' '' 2056 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3298 'chunk_size' '' 3288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2039 'nmembers' '' 2036 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3297 'field_types' '' 3288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1')
-(VARIABLE (INTEGER 8 ()) 0 3292 ())) 0 () ())
-2052 'hdferr' '' 2048 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1959 'error' '' 1955 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1964 'size' '' 1961 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-1953 'gapl_id' '' 1945 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2081 'obj_id' '' 2080 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3299 'compress' '' 3288 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2083 'hdferr' '' 2080 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2077 'name_size' '' 2073 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2074 'obj_id' '' 2073 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2078 'hdferr' '' 2073 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2075 'buf' '' 2073 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2049 'loc_id' '' 2048 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2058 'name' '' 2056 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2098 'hdferr' '' 2095 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2105 'hdferr' '' 2100 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2022 'link_type' '' 2019 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2096 'obj_id' '' 2095 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2097 'ref_count' '' 2095 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2031 'dst_loc_id' '' 2028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2021 'cur_name' '' 2019 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2087 'ref_count' '' 2085 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2024 'new_name' '' 2019 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2025 'hdferr' '' 2019 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3440 'nrecords' '' 3435 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2092 'type' '' 2090 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2091 'obj_id' '' 2090 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2093 'hdferr' '' 2090 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2110 'src_loc_id' '' 2109 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2020 'cur_loc_id' '' 2019 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2113 'dest_name' '' 2109 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2114 'hdferr' '' 2109 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2111 'src_name' '' 2109 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2023 'new_loc_id' '' 2019 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2086 'obj_id' '' 2085 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2116 'lapl_id' '' 2109 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2115 'lcpl_id' '' 2109 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2159 'target_path' '' 2158 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2162 'hdferr' '' 2158 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2161 'link_name' '' 2158 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2088 'hdferr' '' 2085 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2119 'obj_loc_id' '' 2118 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2164 'lapl_id' '' 2158 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2123 'hdferr' '' 2118 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2125 'lapl_id' '' 2118 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2124 'lcpl_id' '' 2118 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2120 'obj_name' '' 2118 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2163 'lcpl_id' '' 2158 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2076 'buf_size' '' 2073 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2137 'loc_id' '' 2136 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2138 'name' '' 2136 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2139 'hdferr' '' 2136 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2140 'lapl_id' '' 2136 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2160 'link_loc_id' '' 2158 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2145 'link_exists' '' 2142 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2146 'hdferr' '' 2142 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2112 'dest_loc_id' '' 2109 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2147 'lapl_id' '' 2142 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2153 'order' '' 2149 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2152 'index_field' '' 2149 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2151 'group_name' '' 2149 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2144 'name' '' 2142 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2156 'lapl_id' '' 2149 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2150 'loc_id' '' 2149 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2121 'link_loc_id' '' 2118 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2154 'n' '' 2149 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-2130 'link_loc_id' '' 2127 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2129 'obj_name' '' 2127 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2128 'file_name' '' 2127 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2132 'hdferr' '' 2127 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2167 'id' '' 2166 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-2169 'hdferr' '' 2166 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2134 'lapl_id' '' 2127 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2168 'valid' '' 2166 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2131 'link_name' '' 2127 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2133 'lcpl_id' '' 2127 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2206 'link_cls_id' '' 2205 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2207 'registered' '' 2205 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2143 'loc_id' '' 2142 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2155 'hdferr' '' 2149 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2122 'link_name' '' 2118 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2198 'dest_loc_id' '' 2195 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2197 'src_name' '' 2195 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2208 'hdferr' '' 2205 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2196 'src_loc_id' '' 2195 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2185 'cset' '' 2182 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2184 'link_name' '' 2182 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2202 'lapl_id' '' 2195 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2186 'corder' '' 2182 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2187 'f_corder_valid' '' 2182 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(LOGICAL 4 ()) 0 0 () () 0 () ())
-2183 'link_loc_id' '' 2182 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2191 'hdferr' '' 2182 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2190 'val_size' '' 2182 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2192 'lapl_id' '' 2182 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2339 'loc_id' '' 2338 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2201 'lcpl_id' '' 2195 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2189 'address' '' 2182 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2340 'group_name' '' 2338 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2188 'link_type' '' 2182 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2343 'n' '' 2338 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-2344 'link_type' '' 2338 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2348 'address' '' 2338 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2347 'cset' '' 2338 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2345 'f_corder_valid' '' 2338 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(LOGICAL 4 ()) 0 0 () () 0 () ())
-2346 'corder' '' 2338 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2199 'dest_name' '' 2195 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2341 'index_field' '' 2338 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2349 'val_size' '' 2338 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2342 'order' '' 2338 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2200 'hdferr' '' 2195 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2351 'lapl_id' '' 2338 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2226 'obj_id' '' 2223 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2227 'hdferr' '' 2223 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2224 'loc_id' '' 2223 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3470 'type_size' '' 3464 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2218 'obj_id' '' 2215 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2217 'name' '' 2215 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2225 'addr' '' 2223 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2233 'hdferr' '' 2229 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2235 'lapl_id' '' 2229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2232 'new_link_name' '' 2229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2231 'new_loc_id' '' 2229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2219 'hdferr' '' 2215 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1469 'dataset_id' '' 1468 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2213 'error' '' 2212 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2241 'hdferr' '' 2239 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1471 'hdferr' '' 1468 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1470 'size' '' 1468 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2230 'object_id' '' 2229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2276 'prp_id' '' 2275 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2273 'hdferr' '' 2271 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2255 'dst_id' '' 2254 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2257 'name' '' 2254 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2278 'hdferr' '' 2275 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2240 'class' '' 2239 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2252 'hdferr' '' 2248 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2249 'parent' '' 2248 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2250 'name' '' 2248 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2234 'lcpl_id' '' 2229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2251 'class' '' 2248 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2256 'src_id' '' 2254 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2277 'flag' '' 2275 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2272 'prp_id' '' 2271 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2258 'hdferr' '' 2254 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2333 'prp_id' '' 2332 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2216 'loc_id' '' 2215 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2082 'ref_count' '' 2080 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2172 'loc_id' '' 2171 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2176 'n' '' 2171 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-2174 'index_field' '' 2171 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2177 'name' '' 2171 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2179 'size' '' 2171 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-2175 'order' '' 2171 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2180 'lapl_id' '' 2171 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2173 'group_name' '' 2171 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2178 'hdferr' '' 2171 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2336 'hdferr' '' 2332 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2329 'flag' '' 2327 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3392 'dset_name' '' 3390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2330 'hdferr' '' 2327 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2328 'plist_id' '' 2327 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2281 'plist_id' '' 2280 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2282 'flag' '' 2280 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2298 'size' '' 2296 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2316 'rdcc_nelmts' '' 2313 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2315 'mdc_nelmts' '' 2313 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2318 'rdcc_w0' '' 2313 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL
-4 ()) 0 0 () () 0 () ())
-2319 'hdferr' '' 2313 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2308 'prp_id' '' 2307 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2309 'name' '' 2307 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2286 'ocpl_id' '' 2285 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2311 'hdferr' '' 2307 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2287 'crt_order_flags' '' 2285 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2310 'value' '' 2307 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2314 'prp_id' '' 2313 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2303 'left' '' 2301 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2288 'hdferr' '' 2285 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2317 'rdcc_nbytes' '' 2313 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2299 'hdferr' '' 2296 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2297 'plist_id' '' 2296 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2283 'hdferr' '' 2280 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2306 'hdferr' '' 2301 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2305 'right' '' 2301 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2322 'ocpl_id' '' 2321 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2323 'max_compact' '' 2321 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3465 'loc_id' '' 3464 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2304 'middle' '' 2301 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2302 'prp_id' '' 2301 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2325 'hdferr' '' 2321 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2334 'name' '' 2332 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2069 'obj_id' '' 2068 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2070 'file_id' '' 2068 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1919 'hdferr' '' 1916 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2071 'hdferr' '' 2068 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2294 'hdferr' '' 2290 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2292 'threshold' '' 2290 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1229 'file_space_id' '' 1222 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1744 'dset_id' '' 1743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3300 'errcode' '' 3288 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2268 'flag' '' 2265 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2266 'plist1_id' '' 2265 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2293 'alignment' '' 2290 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2267 'plist2_id' '' 2265 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2324 'min_dense' '' 2321 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2335 'flag' '' 2332 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2350 'hdferr' '' 2338 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2269 'hdferr' '' 2265 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3329 'hdferr' '' 3326 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2372 'prp_id' '' 2371 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2378 'prp_id' '' 2377 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2375 'hdferr' '' 2371 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2374 'size' '' 2371 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3328 'encoding' '' 3326 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3327 'plist_id' '' 3326 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2380 'hdferr' '' 2377 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2373 'name' '' 2371 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2393 'prp_id' '' 2392 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2395 'hdferr' '' 2392 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2394 'parent_id' '' 2392 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2359 'prp_id' '' 2358 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2360 'ndims' '' 2358 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2361 'dims' '' 2358 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 2360 ())) 0 () ())
-2362 'hdferr' '' 2358 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2366 'rdcc_nslots' '' 2364 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2369 'hdferr' '' 2364 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2368 'rdcc_w0' '' 2364 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL
-4 ()) 0 0 () () 0 () ())
-2261 'class' '' 2260 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2262 'prp_id' '' 2260 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2263 'hdferr' '' 2260 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2367 'rdcc_nbytes' '' 2364 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2246 'hdferr' '' 2243 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2385 'hdferr' '' 2382 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2244 'prp_id' '' 2243 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2383 'lcpl_id' '' 2382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2384 'crt_intermed_group' '' 2382 ((VARIABLE IN UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2365 'dapl_id' '' 2364 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2390 'hdferr' '' 2387 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2402 'prp_id' '' 2401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2399 'driver' '' 2397 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2388 'ocp_plist_id' '' 2387 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2389 'copy_options' '' 2387 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2403 'name' '' 2401 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2400 'hdferr' '' 2397 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2405 'hdferr' '' 2401 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2404 'value' '' 2401 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8
-()) 0 0 () () 0 () ())
-2245 'new_prp_id' '' 2243 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2469 'est_name_len' '' 2466 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2468 'est_num_entries' '' 2466 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2419 'prp_id' '' 2418 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2470 'hdferr' '' 2466 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2433 'backing_store' '' 2430 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(LOGICAL 4 ()) 0 0 () () 0 () ())
-2434 'hdferr' '' 2430 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2437 'prp_id' '' 2436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2431 'prp_id' '' 2430 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2432 'increment' '' 2430 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2438 'idx' '' 2436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2442 'bytes' '' 2436 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2439 'name_size' '' 2436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2441 'offset' '' 2436 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2443 'hdferr' '' 2436 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2440 'name' '' 2436 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2421 'hdferr' '' 2418 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2467 'gcpl_id' '' 2466 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2453 'memb_fapl' '' 2450 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 352 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-2455 'memb_addr' '' 2450 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0') (
-OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 352 ()) (CONSTANT (
-INTEGER 4 ()) 0 '1'))) 0 () ())
-2420 'count' '' 2418 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2451 'prp_id' '' 2450 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2454 'memb_name' '' 2450 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0
-'0') (OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 352 ()) (
-CONSTANT (INTEGER 4 ()) 0 '1'))) 0 () ())
-2452 'memb_map' '' 2450 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 352 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-2379 'classtype' '' 2377 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2458 'maxlen_out' '' 2450 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2457 'hdferr' '' 2450 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2461 'prp_id' '' 2460 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2462 'memb_size' '' 2460 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2464 'hdferr' '' 2460 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2824 'hdferr' '' 2821 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2447 'degree' '' 2445 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2448 'hdferr' '' 2445 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2446 'fapl_id' '' 2445 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2823 'flag' '' 2821 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2456 'relax' '' 2450 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2424 'fapl_id' '' 2423 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2482 'prp_id' '' 2481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2410 'hdferr' '' 2407 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2408 'prp_id' '' 2407 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2426 'block_size' '' 2423 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2427 'cbuf_size' '' 2423 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2822 'plist_id' '' 2821 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2484 'fillvalue' '' 2481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2485 'hdferr' '' 2481 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2428 'hdferr' '' 2423 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2513 'prp_id' '' 2512 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2515 'fillvalue' '' 2512 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 4 ()) 0 0 () () 0 () ())
-2503 'prp_id' '' 2502 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2483 'type_id' '' 2481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2514 'type_id' '' 2512 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2409 'flag' '' 2407 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2425 'alignment' '' 2423 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2398 'prp_id' '' 2397 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2505 'flags' '' 2502 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2504 'filter_number' '' 2502 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2506 'cd_nelmts' '' 2502 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2508 'namelen' '' 2502 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2520 'ik' '' 2518 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2510 'filter_id' '' 2502 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2511 'hdferr' '' 2502 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2627 'prp_id' '' 2626 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2530 'crt_order_flags' '' 2528 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2531 'hdferr' '' 2528 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2628 'layout' '' 2626 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2629 'hdferr' '' 2626 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2524 'name' '' 2522 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2523 'prp_id' '' 2522 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2509 'name' '' 2502 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2521 'hdferr' '' 2518 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2526 'hdferr' '' 2522 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2519 'prp_id' '' 2518 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2529 'gcpl_id' '' 2528 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2507 'cd_values' '' 2502 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2634 'hdferr' '' 2631 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2500 'hdferr' '' 2497 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2489 'filter_id' '' 2487 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2492 'cd_values' '' 2487 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2498 'prp_id' '' 2497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2633 'size' '' 2631 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2493 'namelen' '' 2487 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2472 'prp_id' '' 2471 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2494 'name' '' 2487 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2495 'hdferr' '' 2487 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2491 'cd_nelmts' '' 2487 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2490 'flags' '' 2487 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2475 'hdferr' '' 2471 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2474 'fillvalue' '' 2471 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 8 ()) 0 0 () () 0 () ())
-2488 'prp_id' '' 2487 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2535 'size_hint' '' 2533 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2534 'gcpl_id' '' 2533 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2473 'type_id' '' 2471 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2541 'min_dense' '' 2538 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2540 'max_compact' '' 2538 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2624 'hdferr' '' 2621 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2623 'size' '' 2621 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2542 'hdferr' '' 2538 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2560 'lapl_id' '' 2559 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2536 'hdferr' '' 2533 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2539 'gcpl_id' '' 2538 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2562 'hdferr' '' 2559 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2557 'hdferr' '' 2554 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2550 'plist_id' '' 2549 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2552 'hdferr' '' 2549 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2619 'hdferr' '' 2616 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2617 'prp_id' '' 2616 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2613 'size' '' 2611 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2551 'flag' '' 2549 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2612 'plist_id' '' 2611 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2571 'name' '' 2569 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2609 'hdferr' '' 2605 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2570 'prp_id' '' 2569 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2607 'sizeof_addr' '' 2605 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2614 'hdferr' '' 2611 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2622 'plist_id' '' 2621 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2618 'flag' '' 2616 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2556 'nprops' '' 2554 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2561 'nlinks' '' 2559 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2565 'name' '' 2563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2632 'plist_id' '' 2631 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2499 'gc_reference' '' 2497 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2573 'hdferr' '' 2569 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2600 'freelist' '' 2597 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2598 'prp_id' '' 2597 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2567 'hdferr' '' 2563 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2564 'prp_id' '' 2563 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2566 'value' '' 2563 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2516 'hdferr' '' 2512 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2463 'memb_plist' '' 2460 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2603 'hdferr' '' 2597 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2572 'size' '' 2569 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2602 'shhdr' '' 2597 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2599 'boot' '' 2597 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2555 'prp_id' '' 2554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2606 'prp_id' '' 2605 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2595 'hdferr' '' 2590 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2589 'hdferr' '' 2586 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2594 'value' '' 2590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2593 'size' '' 2590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2587 'prp_id' '' 2586 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2636 'plist' '' 2635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2637 'name' '' 2635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2639 'value' '' 2635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2643 'name' '' 2641 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2644 'size' '' 2641 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2642 'plist' '' 2641 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2588 'block_size' '' 2586 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2640 'hdferr' '' 2635 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2815 'plist' '' 2814 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2646 'hdferr' '' 2641 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2817 'size' '' 2814 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2591 'plist' '' 2590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2583 'lk' '' 2580 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2582 'ik' '' 2580 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2584 'hdferr' '' 2580 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2816 'name' '' 2814 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2819 'hdferr' '' 2814 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2645 'value' '' 2641 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2693 'value' '' 2689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2690 'class' '' 2689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2651 'flags' '' 2648 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2649 'prp_id' '' 2648 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2638 'size' '' 2635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2581 'prp_id' '' 2580 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2654 'hdferr' '' 2648 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2694 'hdferr' '' 2689 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2666 'hdferr' '' 2661 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2664 'size' '' 2661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2663 'name' '' 2661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2653 'cd_values' '' 2648 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2662 'class' '' 2661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2665 'value' '' 2661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-2669 'name' '' 2667 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2692 'size' '' 2689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2681 'size' '' 2678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2671 'value' '' 2667 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2670 'size' '' 2667 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2691 'name' '' 2689 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2679 'class' '' 2678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2680 'name' '' 2678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2672 'hdferr' '' 2667 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2668 'class' '' 2667 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2547 'hdferr' '' 2544 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2683 'hdferr' '' 2678 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2479 'fillvalue' '' 2476 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () () 0 () ())
-2480 'hdferr' '' 2476 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2478 'type_id' '' 2476 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2545 'prp_id' '' 2544 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2477 'prp_id' '' 2476 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2414 'expression' '' 2412 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2546 'nfilters' '' 2544 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2413 'plist_id' '' 2412 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2657 'plist' '' 2656 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2659 'flag' '' 2656 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2660 'hdferr' '' 2656 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2658 'pclass' '' 2656 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-625 'obj_id' '' 624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2682 'value' '' 2678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2415 'hdferr' '' 2412 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-787 'size' '' 785 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-628 'hdferr' '' 624 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-786 'attr_id' '' 785 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-788 'hdferr' '' 785 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-626 'name' '' 624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-2416 'size' '' 2412 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-2688 'hdferr' '' 2685 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2687 'filter' '' 2685 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2577 'size' '' 2575 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2686 'prp_id' '' 2685 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-627 'attr_id' '' 624 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2652 'cd_nelmts' '' 2648 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2650 'filter' '' 2648 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2818 'value' '' 2814 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-2576 'plist_id' '' 2575 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2592 'name' '' 2590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2710 'hdferr' '' 2707 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2703 'ocpl_id' '' 2702 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2704 'crt_order_flags' '' 2702 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2810 'prp_id' '' 2809 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2812 'alignment' '' 2809 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2813 'hdferr' '' 2809 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2705 'hdferr' '' 2702 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2713 'plist_id' '' 2712 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2714 'size' '' 2712 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2709 'flag' '' 2707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2601 'stab' '' 2597 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2715 'hdferr' '' 2712 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2698 'max_compact' '' 2696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2697 'ocpl_id' '' 2696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2718 'prp_id' '' 2717 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2699 'min_dense' '' 2696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2719 'left' '' 2717 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2725 'prp_id' '' 2724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2726 'mdc_nelmts' '' 2724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2722 'hdferr' '' 2717 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2721 'right' '' 2717 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2720 'middle' '' 2717 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2578 'hdferr' '' 2575 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2730 'hdferr' '' 2724 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2727 'rdcc_nelmts' '' 2724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2729 'rdcc_w0' '' 2724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2811 'threshold' '' 2809 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2733 'plist_id' '' 2732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2735 'hdferr' '' 2732 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2738 'prp_id' '' 2737 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2734 'encoding' '' 2732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2700 'hdferr' '' 2696 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2740 'dims' '' 2737 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 2739 ())) 0 () ())
-2739 'ndims' '' 2737 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2746 'rdcc_nbytes' '' 2743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2806 'value' '' 2803 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2807 'hdferr' '' 2803 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2804 'prp_id' '' 2803 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2756 'plist_id' '' 2755 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2757 'expression' '' 2755 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2748 'hdferr' '' 2743 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2758 'hdferr' '' 2755 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2762 'crt_intermed_group' '' 2760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2763 'hdferr' '' 2760 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2747 'rdcc_w0' '' 2743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2768 'hdferr' '' 2764 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2800 'prp_id' '' 2799 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2767 'value' '' 2764 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-2766 'name' '' 2764 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2801 'level' '' 2799 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2788 'prp_id' '' 2787 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2802 'hdferr' '' 2799 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2794 'name' '' 2792 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2793 'prp_id' '' 2792 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2795 'offset' '' 2792 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2765 'prp_id' '' 2764 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2761 'lcpl_id' '' 2760 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2796 'bytes' '' 2792 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2880 'prp_id' '' 2879 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2789 'offset' '' 2787 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2790 'hdferr' '' 2787 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2797 'hdferr' '' 2792 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2883 'hdferr' '' 2879 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3320 'fapl_id' '' 3319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3324 'hdferr' '' 3319 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3322 'block_size' '' 3319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2835 'memb_map' '' 2833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 352 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-2834 'prp_id' '' 2833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2881 'memb_size' '' 2879 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3323 'cbuf_size' '' 3319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2837 'memb_name' '' 2833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0
-'0') (OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 352 ()) (
-CONSTANT (INTEGER 4 ()) 0 '1'))) 0 () ())
-2838 'memb_addr' '' 2833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0') (
-OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 352 ()) (CONSTANT (
-INTEGER 4 ()) 0 '1'))) 0 () ())
-3321 'alignment' '' 3319 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2882 'memb_plist' '' 2879 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2805 'name' '' 2803 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2745 'rdcc_nslots' '' 2743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2744 'dapl_id' '' 2743 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2741 'hdferr' '' 2737 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2831 'prp_id' '' 2830 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2840 'hdferr' '' 2833 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2827 'relax' '' 2825 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2828 'hdferr' '' 2825 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2832 'hdferr' '' 2830 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2782 'prp_id' '' 2781 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2783 'increment' '' 2781 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2839 'relax' '' 2833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2785 'hdferr' '' 2781 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2843 'prp_id' '' 2842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2845 'meta_plist' '' 2842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2848 'hdferr' '' 2842 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2844 'meta_ext' '' 2842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2846 'raw_ext' '' 2842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2862 'hdferr' '' 2860 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2861 'prp_id' '' 2860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2847 'raw_plist' '' 2842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2752 'copy_options' '' 2750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2779 'hdferr' '' 2776 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2778 'flag' '' 2776 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2877 'hdferr' '' 2873 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2751 'ocp_plist_id' '' 2750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2753 'hdferr' '' 2750 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2876 'fillvalue' '' 2873 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () () 0 () ())
-2875 'type_id' '' 2873 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2851 'plist_id' '' 2850 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2853 'hdferr' '' 2850 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2852 'flag' '' 2850 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2874 'prp_id' '' 2873 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2774 'hdferr' '' 2770 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2772 'est_num_entries' '' 2770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2773 'est_name_len' '' 2770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2871 'fillvalue' '' 2868 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2870 'type_id' '' 2868 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2708 'plist_id' '' 2707 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2836 'memb_fapl' '' 2833 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 352 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-2865 'type_id' '' 2863 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2886 'prp_id' '' 2885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2866 'fillvalue' '' 2863 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 8 ()) 0 0 () () 0 () ())
-2867 'hdferr' '' 2863 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2890 'cd_values' '' 2885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-3396 'type_size' '' 3390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2888 'flags' '' 2885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2864 'prp_id' '' 2863 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2291 'prp_id' '' 2290 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2869 'prp_id' '' 2868 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2894 'prp_id' '' 2893 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2895 'hdferr' '' 2893 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2771 'gcpl_id' '' 2770 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2777 'prp_id' '' 2776 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2784 'backing_store' '' 2781 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2891 'hdferr' '' 2885 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2826 'prp_id' '' 2825 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3082 'gc_reference' '' 3080 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2899 'fillvalue' '' 2896 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 4 ()) 0 0 () () 0 () ())
-2857 'degree' '' 2855 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2898 'type_id' '' 2896 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3083 'hdferr' '' 3080 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2900 'hdferr' '' 2896 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2858 'hdferr' '' 2855 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2856 'fapl_id' '' 2855 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2889 'cd_nelmts' '' 2885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2919 'ik' '' 2917 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-2677 'hdferr' '' 2674 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2676 'name' '' 2674 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2675 'plid' '' 2674 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2918 'prp_id' '' 2917 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3077 'high' '' 3074 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3076 'low' '' 3074 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3078 'hdferr' '' 3074 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3425 'errcode' '' 3417 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2930 'crt_order_flags' '' 2928 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2929 'gcpl_id' '' 2928 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2931 'hdferr' '' 2928 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3075 'fapl_id' '' 3074 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3081 'prp_id' '' 3080 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3009 'hdferr' '' 3006 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3007 'gcpl_id' '' 3006 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2887 'filter' '' 2885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2925 'min_dense' '' 2922 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2923 'gcpl_id' '' 2922 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3008 'size_hint' '' 3006 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2914 'layout' '' 2912 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2913 'prp_id' '' 2912 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2926 'hdferr' '' 2922 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2920 'hdferr' '' 2917 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3451 'buf' '' 3444 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2938 'lapl_id' '' 2937 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2940 'hdferr' '' 2937 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3448 'start' '' 3444 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2965 'flag' '' 2963 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-2939 'nlinks' '' 2937 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2935 'hdferr' '' 2933 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3446 'dset_name' '' 3444 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2945 'hdferr' '' 2942 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2964 'plist_id' '' 2963 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2934 'plist_id' '' 2933 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2944 'size' '' 2942 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2943 'plist_id' '' 2942 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2959 'name' '' 2957 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2958 'prp_id' '' 2957 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2904 'value' '' 2901 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2902 'prp_id' '' 2901 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2915 'hdferr' '' 2912 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2897 'prp_id' '' 2896 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2728 'rdcc_nbytes' '' 2724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2608 'sizeof_size' '' 2605 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2525 'value' '' 2522 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2220 'lapl_id' '' 2215 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3445 'loc_id' '' 3444 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2981 'min_mesg_size' '' 2977 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2960 'value' '' 2957 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2980 'mesg_type_flags' '' 2977 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2978 'fcpl_id' '' 2977 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2979 'index_num' '' 2977 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3452 'errcode' '' 3444 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2982 'hdferr' '' 2977 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2985 'prp_id' '' 2984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3447 'field_name' '' 3444 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2988 'hdferr' '' 2984 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2991 'plist_id' '' 2990 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2987 'sizeof_size' '' 2984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2953 'plist_id' '' 2952 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2992 'size' '' 2990 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2986 'sizeof_addr' '' 2984 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2956 'hdferr' '' 2952 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3035 'prp_id' '' 3034 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2966 'hdferr' '' 2963 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2903 'name' '' 2901 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2993 'hdferr' '' 2990 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3038 'hdferr' '' 3034 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3036 'options_mask' '' 3034 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2954 'scale_type' '' 2952 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3002 'ik' '' 3000 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-3003 'lk' '' 3000 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-3004 'hdferr' '' 3000 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2970 'hdferr' '' 2968 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2969 'prp_id' '' 2968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3014 'hdferr' '' 3011 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3012 'prp_id' '' 3011 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2998 'hdferr' '' 2995 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3001 'prp_id' '' 3000 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2996 'plist_id' '' 2995 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3013 'size' '' 3011 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3037 'pixels_per_block' '' 3034 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2955 'scale_factor' '' 2952 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2905 'hdferr' '' 2901 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3026 'hdferr' '' 3023 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3025 'name' '' 3023 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3019 'name' '' 3017 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3018 'loc_id' '' 3017 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3024 'class' '' 3023 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3029 'name' '' 3027 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3032 'hdferr' '' 3027 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3028 'loc_id' '' 3027 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3031 'ref' '' 3027 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3796 ()) 0 0 () () 0 () ())
-3021 'hdferr' '' 3017 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3052 'ref' '' 3050 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3806 ()) 0 0 () () 0 () ())
-3068 'ref' '' 3066 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3796 ()) 0 0 () () 0 () ())
-3054 'hdferr' '' 3050 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3051 'dset_id' '' 3050 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3030 'space_id' '' 3027 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3070 'hdferr' '' 3066 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3071 'size' '' 3066 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-3040 'loc_id' '' 3039 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3042 'name' '' 3039 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3043 'hdferr' '' 3039 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3069 'name' '' 3066 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3047 'ref' '' 3045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3796 ()) 0 0 () () 0 () ())
-3044 'size' '' 3039 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-3058 'obj_type' '' 3055 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3046 'dset_id' '' 3045 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3048 'obj_id' '' 3045 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3049 'hdferr' '' 3045 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2973 'plist_id' '' 2972 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2974 'nindexes' '' 2972 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3057 'ref' '' 3055 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3806 ()) 0 0 () () 0 () ())
-3041 'ref' '' 3039 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3806 ()) 0 0 () () 0 () ())
-2975 'hdferr' '' 2972 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3067 'loc_id' '' 3066 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3053 'obj_id' '' 3050 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3020 'ref' '' 3017 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3806 ()) 0 0 () () 0 () ())
-3056 'dset_id' '' 3055 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3062 'dset_id' '' 3061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2997 'size' '' 2995 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3065 'hdferr' '' 3061 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3087 'new_space_id' '' 3085 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3064 'space_id' '' 3061 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3063 'ref' '' 3061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3796 ()) 0 0 () () 0 () ())
-2924 'max_compact' '' 2922 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3086 'space_id' '' 3085 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3059 'hdferr' '' 3055 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2961 'hdferr' '' 2957 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3096 'dims' '' 3094 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 3095 ())) 0 () ())
-3097 'space_id' '' 3094 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3095 'rank' '' 3094 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3099 'maxdims' '' 3094 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-OPTIONAL DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ())
-0 '1') (VARIABLE (INTEGER 4 ()) 0 3095 ())) 0 () ())
-1196 'dset_id' '' 1195 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3120 'source_space_id' '' 3118 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3121 'hdferr' '' 3118 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3119 'dest_space_id' '' 3118 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3177 'hdferr' '' 3173 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3098 'hdferr' '' 3094 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3176 'nalloc' '' 3173 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3107 'space_id' '' 3106 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3108 'start' '' 3106 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3174 'obj_id' '' 3173 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3109 'end' '' 3106 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3110 'hdferr' '' 3106 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3113 'space1_id' '' 3112 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3115 'equal' '' 3112 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3114 'space2_id' '' 3112 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3443 'errcode' '' 3435 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3180 'classtype' '' 3179 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3103 'obj_id' '' 3101 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3104 'hdferr' '' 3101 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3181 'space_id' '' 3179 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3102 'buf' '' 3101 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-3143 'num_points' '' 3140 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3144 'buf' '' 3140 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3145 'hdferr' '' 3140 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3129 'space_id' '' 3128 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3130 'num_blocks' '' 3128 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3141 'space_id' '' 3140 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3142 'startpoint' '' 3140 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3175 'buf' '' 3173 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3156 'hdferr' '' 3153 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3154 'space_id' '' 3153 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3171 'hdferr' '' 3168 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3438 'field_name' '' 3435 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3169 'space_id' '' 3168 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3155 'type' '' 3153 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3186 'status' '' 3184 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3187 'hdferr' '' 3184 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3148 'space_id' '' 3147 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3185 'space_id' '' 3184 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3170 'rank' '' 3168 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3196 'classtype' '' 3194 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3197 'hdferr' '' 3194 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3195 'space_id' '' 3194 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3150 'maxdims' '' 3147 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-3151 'hdferr' '' 3147 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3192 'hdferr' '' 3189 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3190 'space_id' '' 3189 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3240 'hdferr' '' 3238 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3164 'space_id' '' 3163 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3166 'hdferr' '' 3163 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3191 'offset' '' 3189 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3218 'space_id' '' 3217 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3200 'space_id' '' 3199 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3221 'num_elements' '' 3217 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3219 'operator' '' 3217 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3239 'space_id' '' 3238 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3222 'coord' '' 3217 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 3220 ()) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 3221 ())) 0 () ())
-3226 'space_id' '' 3225 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3223 'hdferr' '' 3217 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3227 'rank' '' 3225 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3201 'hdferr' '' 3199 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3229 'maximum_size' '' 3225 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1')
-(VARIABLE (INTEGER 4 ()) 0 3227 ())) 0 () ())
-3230 'hdferr' '' 3225 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3228 'current_size' '' 3225 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1')
-(VARIABLE (INTEGER 4 ()) 0 3227 ())) 0 () ())
-3236 'hdferr' '' 3234 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3235 'space_id' '' 3234 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3206 'hdferr' '' 3203 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3205 'status' '' 3203 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3450 'type_size' '' 3444 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3149 'dims' '' 3147 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3182 'hdferr' '' 3179 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3116 'hdferr' '' 3112 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3204 'space_id' '' 3203 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3209 'space_id' '' 3208 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3212 'count' '' 3208 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3213 'hdferr' '' 3208 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3214 'stride' '' 3208 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-OPTIONAL DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (
-INTEGER 4 ()) 0 '1') ()) 0 () ())
-3215 'block' '' 3208 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-OPTIONAL DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (
-INTEGER 4 ()) 0 '1') ()) 0 () ())
-3126 'hdferr' '' 3123 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3125 'npoints' '' 3123 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3211 'start' '' 3208 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3210 'operator' '' 3208 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3135 'startblock' '' 3133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3138 'hdferr' '' 3133 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3136 'num_blocks' '' 3133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3124 'space_id' '' 3123 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3137 'buf' '' 3133 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3091 'space_id' '' 3090 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3092 'hdferr' '' 3090 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3455 'type_id' '' 3454 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3456 'hdferr' '' 3454 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3161 'hdferr' '' 3158 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3134 'space_id' '' 3133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3159 'space_id' '' 3158 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3220 'rank' '' 3217 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3501 'dtype_id' '' 3500 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3476 'name' '' 3474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3478 'hdferr' '' 3474 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3480 'tcpl_id' '' 3474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3503 'hdferr' '' 3500 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3481 'tapl_id' '' 3474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3502 'committed' '' 3500 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3160 'num_points' '' 3158 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3479 'lcpl_id' '' 3474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3486 'flag' '' 3483 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-3485 'dst_id' '' 3483 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3475 'loc_id' '' 3474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3477 'type_id' '' 3474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3423 'type_size' '' 3417 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3460 'dtype_id' '' 3458 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3462 'tcpl_id' '' 3458 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3565 'obj_id' '' 3564 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3487 'hdferr' '' 3483 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3461 'hdferr' '' 3458 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3463 'tapl_id' '' 3458 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3459 'loc_id' '' 3458 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3568 'hdferr' '' 3564 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3545 'parent_id' '' 3544 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3541 'value' '' 3538 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3540 'name' '' 3538 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3542 'hdferr' '' 3538 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3547 'hdferr' '' 3544 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3546 'new_type_id' '' 3544 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3632 'buf' '' 3631 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-3633 'obj_id' '' 3631 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3516 'value' '' 3514 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3515 'type_id' '' 3514 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3566 'buf' '' 3564 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3491 'size' '' 3489 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3518 'name' '' 3514 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3519 'hdferr' '' 3514 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3634 'hdferr' '' 3631 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3449 'nrecords' '' 3444 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3522 'type1_id' '' 3521 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3525 'hdferr' '' 3521 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3523 'type2_id' '' 3521 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3492 'type_id' '' 3489 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3530 'hdferr' '' 3527 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3529 'dims' '' 3527 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3493 'hdferr' '' 3489 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3528 'type_id' '' 3527 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3524 'flag' '' 3521 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-3490 'class' '' 3489 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3555 'type_id' '' 3554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3557 'hdferr' '' 3554 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3539 'type_id' '' 3538 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3567 'nalloc' '' 3564 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3572 'ebias' '' 3570 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3571 'type_id' '' 3570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3573 'hdferr' '' 3570 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3536 'hdferr' '' 3532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3533 'type_id' '' 3532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3535 'value' '' 3532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3627 'type_id' '' 3626 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3628 'cset' '' 3626 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3534 'name' '' 3532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3622 'type_id' '' 3621 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3578 'epos' '' 3575 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3580 'mpos' '' 3575 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3581 'msize' '' 3575 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3582 'hdferr' '' 3575 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3579 'esize' '' 3575 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3576 'type_id' '' 3575 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3624 'hdferr' '' 3621 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3585 'type_id' '' 3584 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3586 'member_no' '' 3584 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3623 'padtype' '' 3621 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3587 'class' '' 3584 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3552 'hdferr' '' 3549 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3551 'dtpl_id' '' 3549 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3577 'spos' '' 3575 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3597 'type_id' '' 3596 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3629 'hdferr' '' 3626 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3556 'class' '' 3554 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3484 'src_id' '' 3483 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3588 'hdferr' '' 3584 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3599 'member_name' '' 3596 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3600 'namelen' '' 3596 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3601 'hdferr' '' 3596 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3619 'hdferr' '' 3615 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3617 'name' '' 3615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3604 'type_id' '' 3603 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3616 'type_id' '' 3615 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3618 'index' '' 3615 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3612 'value' '' 3609 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3611 'member_no' '' 3609 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3606 'datatype' '' 3603 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3591 'type_id' '' 3590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3594 'hdferr' '' 3590 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3613 'hdferr' '' 3609 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3561 'ndims' '' 3559 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3560 'type_id' '' 3559 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3647 'num_members' '' 3645 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3648 'hdferr' '' 3645 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3592 'member_no' '' 3590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3562 'hdferr' '' 3559 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3593 'offset' '' 3590 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3598 'index' '' 3596 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3605 'field_idx' '' 3603 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3607 'hdferr' '' 3603 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3646 'type_id' '' 3645 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3666 'type_id' '' 3665 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3669 'hdferr' '' 3665 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3656 'type_id' '' 3655 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3658 'hdferr' '' 3655 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3667 'lsbpad' '' 3665 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3610 'type_id' '' 3609 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3653 'hdferr' '' 3650 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3657 'order' '' 3655 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3652 'norm' '' 3650 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3651 'type_id' '' 3650 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3678 'size' '' 3676 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3668 'msbpad' '' 3665 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3679 'hdferr' '' 3676 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3833 'dtype_id' '' 3832 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3677 'type_id' '' 3676 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3834 'direction' '' 3832 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3835 'native_dtype_id' '' 3832 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3424 'buf' '' 3417 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-3836 'hdferr' '' 3832 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3550 'dtype_id' '' 3549 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3165 'npoints' '' 3163 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3707 'hdferr' '' 3704 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3663 'hdferr' '' 3660 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3705 'type_id' '' 3704 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3699 'type_id' '' 3698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3702 'hdferr' '' 3698 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3700 'tag' '' 3698 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3701 'taglen' '' 3698 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3683 'base_type_id' '' 3681 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3682 'type_id' '' 3681 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3395 'nrecords' '' 3390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3710 'type_id' '' 3709 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3719 'loc_id' '' 3718 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3720 'name' '' 3718 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3721 'type_id' '' 3718 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3684 'hdferr' '' 3681 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3706 'precision' '' 3704 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3131 'hdferr' '' 3128 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2872 'hdferr' '' 2868 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3695 'field_id' '' 3691 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3693 'name' '' 3691 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3694 'offset' '' 3691 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3696 'hdferr' '' 3691 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3692 'type_id' '' 3691 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3661 'type_id' '' 3660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3688 'strpad' '' 3686 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3761 'status' '' 3759 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3760 'type_id' '' 3759 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3723 'tapl_id' '' 3718 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3726 'type_id' '' 3725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3727 'ebias' '' 3725 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3752 'spos' '' 3750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3751 'type_id' '' 3750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3754 'esize' '' 3750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3755 'mpos' '' 3750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3728 'hdferr' '' 3725 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3762 'hdferr' '' 3759 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3687 'type_id' '' 3686 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3714 'type_id' '' 3713 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3716 'hdferr' '' 3713 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3757 'hdferr' '' 3750 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3672 'type_id' '' 3671 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3673 'sign' '' 3671 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3674 'hdferr' '' 3671 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3715 'cset' '' 3713 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3662 'offset' '' 3660 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3753 'epos' '' 3750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3756 'msize' '' 3750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3315 'dims' '' 3312 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3317 'hdferr' '' 3312 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3736 'type_id' '' 3735 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3737 'norm' '' 3735 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3496 'type_id' '' 3495 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3466 'dset_name' '' 3464 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3497 'new_type_id' '' 3495 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3498 'hdferr' '' 3495 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3314 'rank' '' 3312 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3747 'offset' '' 3745 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3738 'hdferr' '' 3735 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3746 'type_id' '' 3745 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3767 'hdferr' '' 3764 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3765 'type_id' '' 3764 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3741 'type_id' '' 3740 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3742 'order' '' 3740 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3822 'msbpad' '' 3819 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3823 'hdferr' '' 3819 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3471 'buf' '' 3464 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1')
-()) 0 () ())
-3820 'type_id' '' 3819 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3821 'lsbpad' '' 3819 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3766 'precision' '' 3764 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3770 'type_id' '' 3769 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3469 'nrecords' '' 3464 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3775 'type_id' '' 3774 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3439 'start' '' 3435 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3777 'hdferr' '' 3774 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3771 'strpad' '' 3769 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3776 'size' '' 3774 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3689 'hdferr' '' 3686 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3815 'type_id' '' 3814 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3817 'hdferr' '' 3814 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3781 'type_id' '' 3780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3788 'hdferr' '' 3785 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3786 'type_id' '' 3785 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3783 'hdferr' '' 3780 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3787 'tag' '' 3785 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-3811 'config_flags' '' 3809 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3810 'filter' '' 3809 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3812 'hdferr' '' 3809 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3793 'hdferr' '' 3790 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3802 'filter' '' 3801 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3772 'hdferr' '' 3769 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3733 'hdferr' '' 3730 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3743 'hdferr' '' 3740 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3792 'status' '' 3790 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3803 'hdferr' '' 3801 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2948 'prp_id' '' 2947 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3732 'padtype' '' 3730 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3731 'type_id' '' 3730 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2949 'flag' '' 2947 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-2910 'hdferr' '' 2907 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2909 'size' '' 2907 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2950 'hdferr' '' 2947 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3782 'vltype_id' '' 3780 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3722 'hdferr' '' 3718 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3088 'hdferr' '' 3085 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3517 'namelen' '' 3514 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3748 'hdferr' '' 3745 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2908 'plist_id' '' 2907 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3413 'nrecords' '' 3408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3412 'start' '' 3408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3414 'type_size' '' 3408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3411 'field_index' '' 3408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3402 'field_index' '' 3399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3403 'start' '' 3399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3416 'errcode' '' 3408 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3415 'buf' '' 3408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-3405 'type_size' '' 3399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3404 'nrecords' '' 3399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3398 'errcode' '' 3390 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3791 'filter' '' 3790 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3816 'sign' '' 3814 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3407 'errcode' '' 3399 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3382 'loc_id' '' 3381 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3387 'type_size' '' 3381 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3389 'errcode' '' 3381 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3427 'loc_id' '' 3426 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3428 'dset_name' '' 3426 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3429 'field_index' '' 3426 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3388 'buf' '' 3381 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1')
-()) 0 () ())
-3386 'nrecords' '' 3381 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3385 'start' '' 3381 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3406 'buf' '' 3399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-3431 'nrecords' '' 3426 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3433 'buf' '' 3426 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3434 'errcode' '' 3426 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3432 'type_size' '' 3426 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3409 'loc_id' '' 3408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3410 'dset_name' '' 3408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3400 'loc_id' '' 3399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3636 'loc_id' '' 3635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3638 'field_index' '' 3635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3637 'dset_name' '' 3635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3640 'nrecords' '' 3635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3639 'start' '' 3635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3642 'buf' '' 3635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1')
-()) 0 () ())
-3641 'type_size' '' 3635 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3364 'loc_id' '' 3363 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3365 'dset_name' '' 3363 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3367 'start' '' 3363 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3366 'field_index' '' 3363 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3369 'type_size' '' 3363 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3368 'nrecords' '' 3363 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3643 'errcode' '' 3635 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3348 'field_index' '' 3345 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3349 'start' '' 3345 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3347 'dset_name' '' 3345 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3371 'errcode' '' 3363 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3352 'buf' '' 3345 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-3346 'loc_id' '' 3345 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3338 'dset_name' '' 3336 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3353 'errcode' '' 3345 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3351 'type_size' '' 3345 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3339 'field_index' '' 3336 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3341 'nrecords' '' 3336 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3344 'errcode' '' 3336 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3343 'buf' '' 3336 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-3357 'field_index' '' 3354 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3358 'start' '' 3354 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3359 'nrecords' '' 3354 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3356 'dset_name' '' 3354 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3355 'loc_id' '' 3354 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3337 'loc_id' '' 3336 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3342 'type_size' '' 3336 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3340 'start' '' 3336 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3350 'nrecords' '' 3345 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3259 'field_name' '' 3256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3362 'errcode' '' 3354 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3260 'field_type' '' 3256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3261 'field_index' '' 3256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3361 'buf' '' 3354 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1')
-()) 0 () ())
-3263 'errcode' '' 3256 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3258 'dset_name' '' 3256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3262 'buf' '' 3256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3360 'type_size' '' 3354 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3265 'loc_id' '' 3264 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3268 'field_type' '' 3264 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3267 'field_name' '' 3264 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3257 'loc_id' '' 3256 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3370 'buf' '' 3363 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3401 'dset_name' '' 3399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3271 'errcode' '' 3264 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3270 'buf' '' 3264 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-3266 'dset_name' '' 3264 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3251 'field_name' '' 3248 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3253 'field_index' '' 3248 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3255 'errcode' '' 3248 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3254 'buf' '' 3248 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-3252 'field_type' '' 3248 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3249 'loc_id' '' 3248 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3283 'field_type' '' 3279 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3284 'field_index' '' 3279 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3286 'errcode' '' 3279 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3281 'dset_name' '' 3279 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3280 'loc_id' '' 3279 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3285 'buf' '' 3279 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1')
-()) 0 () ())
-3282 'field_name' '' 3279 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3247 'errcode' '' 3243 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3246 'field_name' '' 3243 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3250 'dset_name' '' 3248 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3245 'dset_name' '' 3243 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3274 'loc_id' '' 3273 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3278 'errcode' '' 3273 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3277 'nrecords' '' 3273 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3276 'nfields' '' 3273 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3305 'nfields' '' 3302 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3304 'dset_name' '' 3302 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3308 'field_offsets' '' 3302 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN
-DIMENSION DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4
-()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 3305 ())) 0 () ())
-3307 'field_sizes' '' 3302 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN
-DIMENSION DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4
-()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 3305 ())) 0 () ())
-3306 'field_names' '' 3302 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN
-DIMENSION DUMMY) (CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 3305 ())) 0 () ())
-3303 'loc_id' '' 3302 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3310 'errcode' '' 3302 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-3309 'type_size' '' 3302 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3275 'dset_name' '' 3273 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3244 'loc_id' '' 3243 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3269 'field_index' '' 3264 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3430 'start' '' 3426 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3316 'type_id' '' 3312 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3313 'base_id' '' 3312 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3711 'hdferr' '' 3709 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2001 'hdferr' '' 1996 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1424 'dims' '' 1420 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1252 'buf' '' 1249 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1253 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1253 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1253 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-)
-
-('h5awrite_char_scalar' 0 53 'h5awrite_char_2' 0 51 'h5aread_real_5' 0 8
-'h5_iter_inc_f' 0 400 'fortran_real_8' 0 472 'fortran_real_16' 0 469
-'fortran_real_12' 0 467 'fortran_integer_8' 0 466 'fortran_integer_1' 0
-464 'floating_types' 0 215 '__convert_i4_i8' 0 458 'fortran_integer' 0
-461 'floating_types_len' 0 460 'fortran_double' 0 459 'fortran_integer_4'
-0 463 'fortran_integer_2' 0 462 'fortran_real' 0 465 'fortran_real_4' 0
-468 'h5_index_n_f' 0 402 'h5_index_crt_order_f' 0 403 'h5_dble_interface'
-0 470 'h5_iter_dec_f' 0 399 'h5_index_unknown_f' 0 405 'h5_index_name_f'
-0 404 'h5_integer_kind' 0 471 'h5acreate_f' 0 807 'h5_szip_ec_om_f' 0
-219 'h5_iter_native_f' 0 398 'h5_iter_n_f' 0 397 'h5_real_kind' 0 473
-'h5_iter_unknown_f' 0 401 'h5_szip_nn_om_f' 0 218 'h5a' 0 490 'h5aclose_f'
-0 486 'h5acreate_by_name_f' 0 474 'h5aread_real_2' 0 11
-'h5aget_storage_size_f' 0 784 'h5aget_info_f' 0 582 'h5aexists_by_name_f'
-0 547 'h5adelete_by_name_f' 0 505 'h5adelete_by_idx_f' 0 491 'h5adelete_f'
-0 500 'h5aget_create_plist_f' 0 542 'h5aexists_f' 0 512
-'h5aget_info_by_name_f' 0 531 'h5aget_info_by_idx_f' 0 518 'h5aget_name_f'
-0 576 'h5aget_name_by_idx_f' 0 555 'h5aget_num_attrs_f' 0 571
-'h5aget_space_f' 0 566 'h5aread_char_7' 0 14 'h5aopen_by_idx_f' 0 659
-'h5aget_type_f' 0 590 'h5aread_char_3' 0 18 'h5aopen_idx_f' 0 629
-'h5aopen_by_name_f' 0 602 'h5aopen_f' 0 595 'h5aopen_name_f' 0 623
-'h5aread_char_1' 0 20 'h5aread_char_2' 0 19 'h5aread_char_6' 0 15
-'h5aread_char_5' 0 16 'h5aread_char_4' 0 17 'h5aread_integer_scalar' 0
-29 'h5aread_integer_3' 0 26 'h5aread_integer_2' 0 27 'h5aread_double_5'
-0 32 'h5aread_double_4' 0 33 'h5aread_double_2' 0 35 'h5aread_double_1'
-0 36 'h5aread_char_scalar' 0 21 'h5aread_double_3' 0 34 'h5aread_double_6'
-0 31 'h5aread_double_scalar' 0 37 'h5aread_double_7' 0 30
-'h5aread_integer_1' 0 28 'h5aread_integer_5' 0 24 'h5aread_integer_4' 0
-25 'h5aread_integer_7' 0 22 'h5aread_integer_6' 0 23 'h5aread_real_1' 0
-12 'h5aread_real_3' 0 10 'h5aread_real_4' 0 9 'h5aread_real_6' 0 7
-'h5arename_by_name_f' 0 841 'h5aread_real_scalar' 0 13 'h5aread_real_7'
-0 6 'h5awrite_char_1' 0 52 'h5arename_f' 0 829 'h5awrite_char_5' 0 48
-'h5awrite_char_4' 0 49 'h5awrite_char_3' 0 50 'h5awrite_char_7' 0 46
-'h5awrite_char_6' 0 47 'h5f_close_weak_f' 0 415
-'h5d_chunk_cache_nbytes_dflt_f' 0 364 'h5awrite_double_7' 0 62
-'h5awrite_double_6' 0 63 'h5awrite_double_1' 0 68 'h5awrite_double_3' 0
-66 'h5awrite_double_2' 0 67 'h5awrite_double_5' 0 64 'h5awrite_double_4'
-0 65 'h5awrite_integer_7' 0 54 'h5awrite_integer_2' 0 59
-'h5awrite_double_scalar' 0 69 'h5awrite_integer_1' 0 60
-'h5awrite_integer_5' 0 56 'h5awrite_integer_3' 0 58 'h5awrite_integer_4'
-0 57 'h5awrite_integer_6' 0 55 'h5awrite_real_1' 0 44
-'h5awrite_integer_scalar' 0 61 'h5d_alloc_time_early_f' 0 379
-'h5d_alloc_time_default_f' 0 380 'h5close_f' 0 1030 'h5awrite_real_3' 0
-42 'h5awrite_real_2' 0 43 'h5awrite_real_5' 0 40 'h5awrite_real_4' 0 41
-'h5awrite_real_scalar' 0 45 'h5awrite_real_7' 0 38 'h5awrite_real_6' 0
-39 'h5check_version_f' 0 1005 'h5d' 0 1029 'h5d_alloc_time_incr_f' 0 377
-'h5d_alloc_time_error_f' 0 381 'h5d_alloc_time_late_f' 0 378
-'h5dread_vl_integer' 0 111 'h5dclose_f' 0 1438 'h5d_flags_len' 0 1051
-'h5d_fill_time_alloc_f' 0 371 'h5d_contiguous_f' 0 383 'h5d_compact_f' 0
-384 'h5d_chunk_cache_w0_dflt_f' 0 363 'h5d_chunk_cache_nslots_dflt_f' 0
-365 'h5d_chunked_f' 0 382 'h5d_fill_value_error_f' 0 369
-'h5d_fill_time_error_f' 0 372 'h5d_fill_value_default_f' 0 367
-'h5d_fill_time_never_f' 0 370 'h5d_fill_value_undefined_f' 0 368
-'h5d_flags' 0 210 'h5d_fill_value_user_defined_f' 0 366
-'h5d_space_sts_error_f' 0 376 'h5d_space_sts_allocated_f' 0 373
-'h5d_space_sts_not_allocated_f' 0 375 'h5d_space_sts_part_allocated_f' 0
-374 'h5dread_integer_7' 0 91 'h5dread_char_3' 0 87 'h5dget_space_f' 0
-1145 'h5dcreate_f' 0 1091 'h5dcreate_anon_f' 0 1052 'h5dfill_char' 0 71
-'h5dfill_double' 0 74 'h5dget_create_plist_f' 0 1081 'h5dfill_integer' 0
-73 'h5dget_access_plist_f' 0 1071 'h5dfill_real' 0 72
-'h5dget_storage_size_f' 0 1140 'h5dget_space_status_f' 0 1102 'h5dopen_f'
-0 1133 'h5dont_atexit_f' 0 1112 'h5dget_type_f' 0 1107 'h5dread_char_1'
-0 89 'h5dread_char_2' 0 88 'h5dread_double_2' 0 106 'h5dread_char_scalar'
-0 90 'h5dread_char_4' 0 86 'h5dread_char_7' 0 83 'h5dread_char_5' 0 85
-'h5dread_char_6' 0 84 'h5dread_double_1' 0 107 'h5dread_double_3' 0 105
-'h5dread_double_4' 0 104 'h5dread_double_6' 0 102 'h5dread_double_5' 0
-103 'h5dread_double_scalar' 0 108 'h5dread_double_7' 0 101
-'h5dread_integer_1' 0 97 'h5dread_integer_4' 0 94 'h5dread_integer_2' 0
-96 'h5dread_integer_3' 0 95 'h5dread_integer_5' 0 93 'h5dread_integer_6'
-0 92 'h5dread_integer_scalar' 0 98 'h5dread_real_4' 0 78 'h5dread_real_1'
-0 81 'h5dread_real_2' 0 80 'h5dread_real_3' 0 79 'h5dread_real_5' 0 77
-'h5dread_reference_dsetreg' 0 99 'h5dread_real_7' 0 75 'h5dread_real_6'
-0 76 'h5dread_real_scalar' 0 82 'h5dread_reference_obj' 0 100
-'h5dwrite_double_5' 0 143 'h5dwrite_char_7' 0 123 'h5dwrite_char_5' 0
-125 'h5dread_vl_real' 0 110 'h5dwrite_char_2' 0 128 'h5dset_extent_f' 0
-70 'h5dread_vl_string' 0 109 'h5dwrite_char_1' 0 129
-'h5dvlen_get_max_len_f' 0 1452 'h5dwrite_char_4' 0 126 'h5dwrite_char_3'
-0 127 'h5dwrite_char_6' 0 124 'h5dwrite_double_2' 0 146
-'h5dwrite_char_scalar' 0 130 'h5dwrite_double_1' 0 147 'h5dwrite_double_3'
-0 145 'h5dwrite_double_4' 0 144 'h5eprint_f' 0 1820 'h5dwrite_real_4' 0
-118 'h5dwrite_integer_5' 0 133 'h5dwrite_double_7' 0 141
-'h5dwrite_double_6' 0 142 'h5dwrite_integer_2' 0 136 'h5dwrite_integer_1'
-0 137 'h5dwrite_double_scalar' 0 148 'h5dwrite_integer_4' 0 134
-'h5dwrite_integer_3' 0 135 'h5dwrite_real_1' 0 121
-'h5dwrite_integer_scalar' 0 138 'h5dwrite_integer_7' 0 131
-'h5dwrite_integer_6' 0 132 'h5dwrite_real_2' 0 120 'h5dwrite_real_3' 0
-119 'h5dwrite_reference_dsetreg' 0 139 'h5dwrite_real_6' 0 116
-'h5dwrite_real_5' 0 117 'h5dwrite_real_scalar' 0 122 'h5dwrite_real_7' 0
-115 'h5dwrite_reference_obj' 0 140 'h5e' 0 1814 'h5dwrite_vl_integer' 0
-114 'h5dwrite_vl_real' 0 113 'h5dwrite_vl_string' 0 112 'h5eget_minor_f'
-0 1809 'h5eclear_f' 0 1806 'h5eget_major_f' 0 1800 'h5f_acc_rdonly_f' 0
-422 'h5f_acc_debug_f' 0 419 'h5f' 0 1819 'h5eset_auto_f' 0 1815
-'h5f_acc_excl_f' 0 420 'h5f_acc_rdwr_f' 0 423 'h5f_close_default_f' 0
-416 'h5f_acc_trunc_f' 0 421 'h5f_close_strong_f' 0 413 'h5f_close_semi_f'
-0 414 'h5pget_char_encoding_f' 0 3325 'h5fget_access_plist_f' 0 2352
-'h5fd_hid_flags' 0 207 'h5fclose_f' 0 1853 'h5f_flags_len' 0 1843
-'h5f_flags' 0 213 'h5f_obj_group_f' 0 410 'h5f_obj_all_f' 0 408
-'h5f_libver_earliest_f' 0 407 'h5f_libver_latest_f' 0 406 'h5f_obj_file_f'
-0 412 'h5f_obj_datatype_f' 0 409 'h5f_obj_dataset_f' 0 411
-'h5f_scope_global_f' 0 417 'h5f_scope_local_f' 0 418 'h5fd_family_f' 0
-350 'h5fcreate_f' 0 1844 'h5fd_core_f' 0 351 'h5fd_flags' 0 206
-'h5fd_flags_len' 0 1852 'h5fd_mem_btree_f' 0 357 'h5fd_log_f' 0 349
-'h5fd_hid_flags_len' 0 1857 'h5fd_mpio_f' 0 348 'h5fd_mem_nolist_f' 0
-360 'h5fd_mem_gheap_f' 0 355 'h5fd_mem_default_f' 0 359 'h5fd_mem_draw_f'
-0 356 'h5fd_mem_lheap_f' 0 354 'h5fd_mem_ntypes_f' 0 352
-'h5fd_mem_super_f' 0 358 'h5fd_mem_ohdr_f' 0 353 'h5fd_mpio_collective_f'
-0 361 'h5fd_multi_f' 0 347 'h5fd_mpio_independent_f' 0 362 'h5fflush_f'
-0 1858 'h5fd_stdio_f' 0 345 'h5fd_sec2_f' 0 346 'h5lget_info_by_idx_f' 0
-2337 'h5iis_valid_f' 0 2165 'h5g_group_f' 0 395 'h5fopen_f' 0 1923
-'h5fget_obj_count_f' 0 1904 'h5fget_create_plist_f' 0 1879
-'h5fget_filesize_f' 0 1874 'h5fget_freespace_f' 0 1869 'h5fget_name_f' 0
-1863 'h5fget_obj_ids_f' 0 1896 'h5fmount_f' 0 1889 'h5fis_hdf5_f' 0 1884
-'h5g' 0 1922 'h5fortran_types' 0 1920 'h5freopen_f' 0 1915 'h5funmount_f'
-0 1910 'h5g_dataset_f' 0 394 'h5g_flags' 0 208 'h5g_flags_len' 0 1921
-'h5g_link_soft_f' 0 389 'h5g_link_error_f' 0 391 'h5g_link_hard_f' 0 390
-'h5g_link_f' 0 392 'h5glink_f' 0 2099 'h5g_unknown_f' 0 396
-'h5g_storage_type_compact_f' 0 386 'h5g_storage_type_dense_f' 0 385
-'h5g_storage_type_symbol_table_f' 0 387 'h5g_storage_type_unknown_f' 0
-388 'h5g_type_f' 0 393 'h5generic_flags_len' 0 2026 'h5gcreate_f' 0 1944
-'h5gclose_f' 0 1940 'h5garbage_collect_f' 0 1930 'h5gcreate_anon_f' 0
-1933 'h5generic_flags' 0 205 'h5glink2_f' 0 2018 'h5gget_create_plist_f'
-0 2013 'h5gget_comment_f' 0 1960 'h5get_libversion_f' 0 1954
-'h5gget_info_by_name_f' 0 2003 'h5gget_info_by_idx_f' 0 1967
-'h5gget_info_f' 0 1995 'h5gget_obj_info_idx_f' 0 1987 'h5gget_linkval_f'
-0 1980 'h5i_group_f' 0 343 'h5i_file_f' 0 344 'h5i_badid_f' 0 338
-'h5gmove_f' 0 2060 'h5global' 0 2034 'h5gmove2_f' 0 2027 'h5gunlink_f' 0
-2055 'h5gopen_f' 0 2047 'h5gn_members_f' 0 2035 'h5gset_comment_f' 0
-2041 'h5i' 0 2054 'h5i_attr_f' 0 339 'h5i_dataspace_f' 0 341
-'h5i_dataset_f' 0 340 'h5i_datatype_f' 0 342 'h5i_flags_len' 0 2066
-'h5i_flags' 0 202 'h5idec_ref_f' 0 2094 'h5iget_type_f' 0 2089
-'h5iget_ref_f' 0 2079 'h5iget_name_f' 0 2072 'h5iget_file_id_f' 0 2067
-'h5iinc_ref_f' 0 2084 'h5l_type_hard_f' 0 336 'h5l_flags' 0 211 'h5l' 0
-2106 'h5l_flags_len' 0 2107 'h5l_link_class_t_vers_f' 0 332
-'h5l_type_external_f' 0 334 'h5l_same_loc_f' 0 333 'h5l_type_error_f' 0
-337 'h5lcreate_soft_f' 0 2157 'h5lcreate_external_f' 0 2126 'h5lcopy_f'
-0 2108 'h5l_type_soft_f' 0 335 'h5lcreate_hard_f' 0 2117
-'h5ldelete_by_idx_f' 0 2148 'h5lexists_f' 0 2141 'h5ldelete_f' 0 2135
-'h5p_link_create_f' 0 293 'h5p_group_access_f' 0 299 'h5o_hdr_all_flags_f'
-0 312 'h5lib' 0 2210 'h5lget_info_f' 0 2181 'h5lget_name_by_idx_f' 0
-2170 'h5o_copy_expand_ext_link_f' 0 329 'h5lis_registered_f' 0 2204
-'h5lib_flags' 0 212 'h5lib_flags_len' 0 2193 'h5o_copy_all_f' 0 325 'h5o'
-0 2203 'h5lmove_f' 0 2194 'h5o_copy_expand_reference_f' 0 328
-'h5o_flags_len' 0 2209 'h5o_copy_shallow_hierarchy_f' 0 331
-'h5o_copy_preserve_null_flag_f' 0 326 'h5o_copy_expand_soft_link_f' 0
-330 'h5o_flags' 0 217 'h5o_copy_without_attr_flag_f' 0 327
-'h5p_datatype_create_f' 0 298 'h5p_crt_order_tracked_f' 0 290
-'h5o_shmesg_none_flag_f' 0 324 'h5o_shmesg_fill_flag_f' 0 321
-'h5o_hdr_attr_store_phase_cha_f' 0 314 'h5o_hdr_attr_crt_order_track_f'
-0 316 'h5o_hdr_attr_crt_order_index_f' 0 315 'h5o_shmesg_all_flag_f' 0
-318 'h5o_hdr_chunk0_size_f' 0 317 'h5o_hdr_store_times_f' 0 313
-'h5o_shmesg_attr_flag_f' 0 319 'h5o_shmesg_dtype_flag_f' 0 322
-'h5o_shmesg_max_list_size_f' 0 310 'h5o_shmesg_max_nindexes_f' 0 311
-'h5olink_f' 0 2228 'h5o_shmesg_sdspace_flag_f' 0 323
-'h5o_shmesg_pline_flag_f' 0 320 'h5oopen_by_addr_f' 0 2222
-'h5p_crt_order_indexed_f' 0 291 'h5p_attribute_create_f' 0 295 'h5p' 0
-2221 'h5oopen_f' 0 2214 'h5open_f' 0 2211 'h5p_dataset_access_f' 0 301
-'h5p_dataset_create_f' 0 307 'h5p_dataset_xfer_f' 0 306
-'h5p_datatype_access_f' 0 297 'h5p_file_access_f' 0 308 'h5p_default_f'
-0 304 'h5p_flags_int_len' 0 2237 'h5p_file_mount_f' 0 305
-'h5p_file_create_f' 0 309 'h5p_flags_int' 0 201 'h5p_flags' 0 214
-'h5p_flags_len' 0 2236 'h5p_link_access_f' 0 292 'h5p_group_create_f' 0
-300 'h5pexist_f' 0 2331 'h5pall_filters_avail_f' 0 2274 'h5p_root_f' 0
-303 'h5p_object_create_f' 0 302 'h5p_object_copy_f' 0 294
-'h5p_string_create_f' 0 296 'h5pclose_f' 0 2270 'h5pclose_class_f' 0
-2238 'h5pequal_f' 0 2264 'h5pcreate_f' 0 2259 'h5pcopy_prop_f' 0 2253
-'h5pcopy_f' 0 2242 'h5pcreate_class_f' 0 2247 'h5pfill_value_defined_f'
-0 2326 'h5pget_attr_phase_change_f' 0 2320 'h5pget_alignment_f' 0 2289
-'h5pget_attr_creation_order_f' 0 2284 'h5pget_alloc_time_f' 0 2279
-'h5pget_cache_f' 0 2312 'h5pget_btree_ratios_f' 0 2300 'h5pget_buffer_f'
-0 2295 'h5pget_char' 0 149 'h5pset_fapl_direct_f' 0 3318
-'h5pget_fill_time_f' 0 2820 'h5pget_est_link_info_f' 0 2465
-'h5pget_data_transform_f' 0 2411 'h5pget_class_parent_f' 0 2391
-'h5pget_class_f' 0 2376 'h5pget_chunk_cache_f' 0 2363 'h5pget_chunk_f' 0
-2357 'h5pget_class_name_f' 0 2370 'h5pget_copy_object_f' 0 2386
-'h5pget_create_inter_group_f' 0 2381 'h5pget_edc_check_f' 0 2406
-'h5pget_double' 0 152 'h5pget_driver_f' 0 2396 'h5pget_fapl_family_f' 0
-2459 'h5pget_external_f' 0 2435 'h5pget_external_count_f' 0 2417
-'h5pget_fapl_core_f' 0 2429 'h5pget_fapl_direct_f' 0 2422
-'h5pget_fapl_multi_f' 0 2449 'h5pget_fclose_degree_f' 0 2444
-'h5pinsert_double' 0 160 'h5pget_hyper_vector_size_f' 0 2630
-'h5pget_fill_value_real' 0 154 'h5pget_fill_value_char' 0 153
-'h5pget_fill_value_double' 0 156 'h5pget_fill_value_integer' 0 155
-'h5pget_filter_f' 0 2501 'h5pget_filter_by_id_f' 0 2486
-'h5pget_gc_references_f' 0 2496 'h5pget_layout_f' 0 2625 'h5pget_integer'
-0 151 'h5pget_istore_k_f' 0 2517 'h5pget_meta_block_size_f' 0 2620
-'h5pget_link_phase_change_f' 0 2537 'h5pget_link_creation_order_f' 0
-2527 'h5pget_local_heap_size_hint_f' 0 2532 'h5pget_preserve_f' 0 2615
-'h5pget_nlinks_f' 0 2558 'h5pget_nfilters_f' 0 2543 'h5pget_nprops_f' 0
-2553 'h5pget_obj_track_times_f' 0 2548 'h5pget_sieve_buf_size_f' 0 2610
-'h5pget_real' 0 150 'h5pget_sizes_f' 0 2604 'h5pget_size_f' 0 2568
-'h5pget_version_f' 0 2596 'h5pget_userblock_f' 0 2585 'h5pget_sym_k_f' 0
-2579 'h5pget_small_data_block_size_f' 0 2574 'h5pinsert_char' 0 157
-'h5pset_alignment_f' 0 2808 'h5pregister_char' 0 161 'h5pisa_class_f' 0
-2655 'h5pinsert_integer' 0 159 'h5pinsert_real' 0 158 'h5pmodify_filter_f'
-0 2647 'h5premove_filter_f' 0 2684 'h5pregister_integer' 0 163
-'h5pregister_double' 0 164 'h5premove_f' 0 2673 'h5pregister_real' 0 162
-'h5pset_char' 0 165 'h5pset_cache_f' 0 2723 'h5pset_btree_ratios_f' 0
-2716 'h5pset_alloc_time_f' 0 2706 'h5pset_attr_creation_order_f' 0 2701
-'h5pset_attr_phase_change_f' 0 2695 'h5pset_buffer_f' 0 2711
-'h5pset_deflate_f' 0 2798 'h5pset_create_inter_group_f' 0 2759
-'h5pset_copy_object_f' 0 2749 'h5pset_chunk_cache_f' 0 2742
-'h5pset_char_encoding_f' 0 2731 'h5pset_chunk_f' 0 2736
-'h5pset_data_transform_f' 0 2754 'h5pset_external_f' 0 2791
-'h5pset_edc_check_f' 0 2775 'h5pset_double' 0 168 'h5pset_est_link_info_f'
-0 2769 'h5pset_family_offset_f' 0 2786 'h5pset_fapl_core_f' 0 2780
-'h5t_std_i32le' 0 435 'h5s_scalar_f' 0 287 'h5pset_gc_references_f' 0
-3079 'h5pset_fill_value_real' 0 172 'h5pset_fapl_family_f' 0 2878
-'h5pset_fill_value_char' 0 171 'h5pset_fapl_stdio_f' 0 2859
-'h5pset_fapl_split_f' 0 2841 'h5pset_fapl_multi_l' 0 170
-'h5pset_fapl_sec2_f' 0 2829 'h5pset_fapl_multi_s' 0 169
-'h5pset_fclose_degree_f' 0 2854 'h5pset_fill_time_f' 0 2849
-'h5pset_fill_value_integer' 0 173 'h5pset_fill_value_double' 0 174
-'h5pset_fletcher32_f' 0 2892 'h5pset_filter_f' 0 2884
-'h5pset_libver_bounds_f' 0 3073 'h5pset_istore_k_f' 0 2916
-'h5pset_hyper_vector_size_f' 0 2906 'h5pset_integer' 0 167
-'h5pset_layout_f' 0 2911 'h5pset_szip_f' 0 3033
-'h5pset_local_heap_size_hint_f' 0 3005 'h5pset_link_creation_order_f' 0
-2927 'h5pset_link_phase_change_f' 0 2921 'h5pset_sym_k_f' 0 2999
-'h5pset_sieve_buf_size_f' 0 2994 'h5pset_shared_mesg_index_f' 0 2976
-'h5pset_obj_track_times_f' 0 2962 'h5pset_meta_block_size_f' 0 2941
-'h5pset_nlinks_f' 0 2936 'h5pset_nbit_f' 0 2932 'h5pset_real' 0 166
-'h5pset_preserve_f' 0 2946 'h5pset_scaleoffset_f' 0 2951
-'h5pset_shared_mesg_nindexes_f' 0 2971 'h5pset_shuffle_f' 0 2967
-'h5pset_small_data_block_size_f' 0 2989 'h5pset_sizes_f' 0 2983
-'h5rcreate_region_f' 0 177 'h5punregister_f' 0 3022 'h5pset_userblock_f'
-0 3010 'h5r_flags_len' 0 3016 'h5r_dataset_region_f' 0 288 'h5r' 0 3015
-'h5r_flags' 0 204 'h5r_object_f' 0 289 'h5rcreate_object_f' 0 178
-'h5s_flags_len' 0 3072 'h5rget_name_region_f' 0 179
-'h5rdereference_object_f' 0 176 'h5rdereference_region_f' 0 175
-'h5rget_name_object_f' 0 180 'h5rget_region_region_f' 0 182
-'h5rget_object_type_obj_f' 0 181 'h5s_all_f' 0 281 'h5s' 0 3060
-'h5s_flags' 0 199 'h5s_null_f' 0 285 'h5t_order_le_f' 0 257
-'h5s_sel_all_f' 0 268 'h5s_sel_hyperslabs_f' 0 269 'h5s_sel_error_f' 0
-272 'h5sselect_all_f' 0 3237 'h5sget_simple_extent_type_f' 0 3193
-'h5screate_f' 0 3178 'h5s_select_prepend_f' 0 274 'h5s_sel_none_f' 0 271
-'h5s_select_nota_f' 0 276 'h5s_select_append_f' 0 275 'h5s_select_and_f'
-0 279 'h5s_sel_points_f' 0 270 'h5s_select_invalid_f' 0 273
-'h5s_select_noop_f' 0 280 'h5s_select_notb_f' 0 277 'h5s_select_or_f' 0
-283 'h5sclose_f' 0 3089 'h5s_simple_f' 0 286 'h5s_select_xor_f' 0 278
-'h5s_select_set_f' 0 284 'h5s_unlimited_f' 0 282 'h5scopy_f' 0 3084
-'h5sencode_f' 0 3172 'h5sdecode_f' 0 3100 'h5screate_simple_f' 0 3093
-'h5sget_simple_extent_ndims_f' 0 3167 'h5sget_select_elem_npoints_f' 0
-3157 'h5sextent_copy_f' 0 3117 'h5sextent_equal_f' 0 3111
-'h5sget_select_bounds_f' 0 3105 'h5sget_select_type_f' 0 3152
-'h5sget_select_elem_pointlist_f' 0 3139 'h5sget_select_hyper_blocklist_f'
-0 3132 'h5sget_select_hyper_nblocks_f' 0 3127 'h5sget_select_npoints_f'
-0 3122 'h5sget_simple_extent_dims_f' 0 3146
-'h5sget_simple_extent_npoints_f' 0 3162 'h5soffset_simple_f' 0 3188
-'h5sis_simple_f' 0 3183 'h5t_order_be_f' 0 256 'h5t_native_double' 0 455
-'h5sset_extent_none_f' 0 3233 'h5sselect_elements_f' 0 3216
-'h5sselect_hyperslab_f' 0 3207 'h5sselect_valid_f' 0 3202
-'h5sselect_none_f' 0 3198 'h5t' 0 3232 'h5sset_extent_simple_f' 0 3224
-'h5t_cset_ascii_f' 0 243 'h5t_array_f' 0 236 'h5t_compound_f' 0 260
-'h5t_bitfield_f' 0 262 'h5t_native_character' 0 454 'h5t_float_f' 0 265
-'h5t_flags_len' 0 3231 'h5t_cset_utf8_f' 0 242 'h5t_flags' 0 209
-'h5t_dir_ascend_f' 0 235 'h5t_dir_descend_f' 0 234 'h5t_enum_f' 0 258
-'h5t_ieee_f64be' 0 442 'h5t_ieee_f32le' 0 443 'h5t_ieee_f32be' 0 444
-'h5t_integer_f' 0 266 'h5t_ieee_f64le' 0 441 'h5t_norm_implied_f' 0 246
-'h5t_native_integer_1' 0 451 'h5t_native_integer' 0 457
-'h5t_native_integer_4' 0 449 'h5t_native_integer_2' 0 450
-'h5t_native_integer_8' 0 448 'h5t_no_class_f' 0 267 'h5t_native_real' 0
-456 'h5t_native_real_16' 0 445 'h5t_native_real_8' 0 446
-'h5t_native_real_4' 0 447 'h5t_norm_msbset_f' 0 245 'h5t_opaque_f' 0 261
-'h5t_norm_none_f' 0 244 'h5t_sgn_none_f' 0 249 'h5t_pad_one_f' 0 252
-'h5t_order_vax_f' 0 255 'h5t_order_none_f' 0 254 'h5t_pad_background_f'
-0 251 'h5t_pad_error_f' 0 250 'h5t_sgn_error_f' 0 247 'h5t_reference_f'
-0 259 'h5t_pad_zero_f' 0 253 'h5t_sgn_2_f' 0 248 'h5t_std_i16be' 0 438
-'h5t_std_i16le' 0 437 'h5t_std_i32be' 0 436 'h5t_string' 0 424
-'h5t_std_i64le' 0 433 'h5t_std_i64be' 0 434 'h5t_str_nullpad_f' 0 240
-'h5t_std_u32le' 0 427 'h5t_std_i8le' 0 439 'h5t_std_i8be' 0 440
-'h5t_std_u16be' 0 430 'h5t_std_ref_dsetreg' 0 452 'h5t_std_ref_obj' 0
-453 'h5t_std_u16le' 0 429 'h5t_std_u32be' 0 428 'h5t_std_u8le' 0 431
-'h5t_std_u64be' 0 426 'h5t_std_u8be' 0 432 'h5t_std_u64le' 0 425
-'h5t_str_error_f' 0 238 'h5t_str_spacepad_f' 0 239 'h5t_str_nullterm_f'
-0 241 'h5tarray_create_f' 0 3311 'h5t_time_f' 0 264 'h5t_string_f' 0 263
-'h5t_vlen_f' 0 237 'h5tbget_field_info_f' 0 3301 'h5tbdelete_field_f' 0
-3242 'h5tb' 0 3241 'h5tbmake_table_f' 0 3287 'h5tbinsert_field_f_string'
-0 183 'h5tbget_table_info_f' 0 3272 'h5tbinsert_field_f_float' 0 185
-'h5tbinsert_field_f_double' 0 184 'h5tbinsert_field_f_int' 0 186
-'h5tget_native_type_f' 0 3831 'h5tbwrite_field_index_f_string' 0 191
-'h5tbwrite_field_index_f_int' 0 194 'h5tbread_field_name_f_float' 0 189
-'h5tbread_field_index_f_int' 0 5 'h5tbread_field_index_f_float' 0 4
-'h5tbread_field_index_f_double' 0 3 'h5tbread_field_index_f_string' 0 2
-'h5tbread_field_name_f_double' 0 188 'h5tbread_field_name_f_int' 0 190
-'h5tbread_field_name_f_string' 0 187 'h5tbwrite_field_index_f_float' 0
-193 'h5tbwrite_field_index_f_double' 0 192 'h5tdecode_f' 0 3630
-'h5tbwrite_field_name_f_float' 0 197 'h5tbwrite_field_name_f_double' 0
-196 'h5tcommitted_f' 0 3499 'h5tcommit_f' 0 3473
-'h5tbwrite_field_name_f_string' 0 195 'h5tbwrite_field_name_f_int' 0 198
-'h5tcommit_anon_f' 0 3457 'h5tclose_f' 0 3453 'h5tcopy_f' 0 3494
-'h5tcompiler_conv_f' 0 3482 'h5tcreate_f' 0 3488 'h5tget_cset_f' 0 3625
-'h5tencode_f' 0 3563 'h5tget_array_ndims_f' 0 3558 'h5tenum_create_f' 0
-3543 'h5tenum_insert_f' 0 3537 'h5tenum_valueof_f' 0 3531
-'h5tenum_nameof_f' 0 3513 'h5tget_array_dims_f' 0 3526 'h5tequal_f' 0
-3520 'h5tget_class_f' 0 3553 'h5tget_create_plist_f' 0 3548
-'h5tget_inpad_f' 0 3620 'h5tget_fields_f' 0 3574 'h5tget_ebias_f' 0 3569
-'h5tget_member_index_f' 0 3614 'h5tget_member_class_f' 0 3583
-'h5tget_member_value_f' 0 3608 'h5tget_member_type_f' 0 3602
-'h5tget_member_name_f' 0 3595 'h5tget_member_offset_f' 0 3589
-'integer_types' 0 216 'h5tset_pad_f' 0 3818 'h5tis_variable_str_f' 0
-3758 'h5tget_precision_f' 0 3703 'h5tget_pad_f' 0 3664 'h5tget_offset_f'
-0 3659 'h5tget_norm_f' 0 3649 'h5tget_nmembers_f' 0 3644 'h5tget_order_f'
-0 3654 'h5tget_tag_f' 0 3697 'h5tget_strpad_f' 0 3685 'h5tget_size_f' 0
-3675 'h5tget_sign_f' 0 3670 'h5tget_super_f' 0 3680 'h5tinsert_f' 0 3690
-'h5tset_fields_f' 0 3749 'h5tset_ebias_f' 0 3724 'h5topen_f' 0 3717
-'h5tset_cset_f' 0 3712 'h5tpack_f' 0 3708 'h5tset_offset_f' 0 3744
-'h5tset_norm_f' 0 3734 'h5tset_inpad_f' 0 3729 'h5tset_order_f' 0 3739
-'h5tset_sign_f' 0 3813 'h5tset_precision_f' 0 3763 'h5zget_filter_info_f'
-0 3808 'h5z_flags_len' 0 3794 'h5z_filter_fletcher32_f' 0 229
-'h5z_filter_error_f' 0 233 'h5tset_tag_f' 0 3784 'h5tset_size_f' 0 3773
-'h5tset_strpad_f' 0 3768 'h5tvlen_create_f' 0 3779
-'h5z_filter_decode_enabled_f' 0 221 'h5z_error_edc_f' 0 228 'h5z' 0 3778
-'h5z_disable_edc_f' 0 227 'h5z_enable_edc_f' 0 226 'h5z_filter_all_f' 0
-220 'h5z_filter_deflate_f' 0 231 'h5z_filter_encode_enabled_f' 0 222
-'h5z_flag_optional_f' 0 223 'h5z_filter_shuffle_f' 0 230
-'h5z_filter_none_f' 0 232 'h5z_filter_szip_f' 0 224 'h5z_flags' 0 203
-'h5z_no_edc_f' 0 225 'h5zfilter_avail_f' 0 3789 'hobj_ref_t_f' 0 3806
-'h5zunregister_f' 0 3800 'haddr_t' 0 3799 'hid_t' 0 3798
-'hdset_reg_ref_t_f' 0 3796 'hdf5' 0 3795 'hssize_t' 0 3805 'hsize_t' 0
-3804 'predef_types' 0 200 'integer_types_len' 0 3825
-'object_namelen_default_f' 0 3824 'printoff' 0 3830 'predef_types_len' 0
-3826 'printon' 0 3829 'ref_reg_buf_len' 0 3828 'size_t' 0 3827)
diff --git a/interfaces/ext/hdf5/h5z.mod b/interfaces/ext/hdf5/h5z.mod
deleted file mode 100644
index 7b046f8..0000000
--- a/interfaces/ext/hdf5/h5z.mod
+++ /dev/null
@@ -1,1383 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/H5Zff.f90 on Mon Feb 14 14:35:52 2011
-If you edit this, you'll get what you deserve.
-
-(() ()
-() () () () () () () () () () () () () () () () () () ())
-
-()
-
-()
-
-(('h5l_flags' 2 0) ('h5t_flags' 3 0) ('h5p_flags_int' 4 0) (
-'predefined_types' 5 0) ('h5i_flags' 6 0) ('integer_types' 7 0) (
-'h5r_flags' 8 0) ('h5z_flags' 9 0) ('h5s_flags' 10 0) ('h5d_flags' 11 0)
-('h5fd_hid_flags' 12 0) ('h5fd_flags' 13 0) ('h5g_flags' 14 0) (
-'h5generic_flags' 15 0) ('h5o_flags' 16 0) ('h5lib_flags' 17 0) (
-'h5p_flags' 18 0) ('h5f_flags' 19 0) ('floating_types' 20 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 21 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 17 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 22 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 23 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 24 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 25 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 26 ())) ('h5global.eq.6' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 27 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 28 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 29 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (
-ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 30 ())) ('h5global.eq.10' (VARIABLE (INTEGER 4
-()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 31 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 32 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 33 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 9 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.13'
-(VARIABLE (INTEGER 4 ()) 0 34 ())) ('h5global.eq.14' (VARIABLE (INTEGER
-4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 35 ())) ('h5global.eq.15' (
-VARIABLE (INTEGER 4 ()) 0 9 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 36 ())) (
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '34') 1)))) 'h5global.eq.16' (VARIABLE (
-INTEGER 4 ()) 0 37 ())) ('h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '33') 1)))) 'h5global.eq.17'
-(VARIABLE (INTEGER 4 ()) 0 38 ())) ('h5global.eq.18' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '32') 1))))
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 39 ())) ('h5global.eq.19' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '31') 1)))) 'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 40 ())) (
-'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '30') 1)))) 'h5global.eq.20' (VARIABLE (
-INTEGER 4 ()) 0 41 ())) ('h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21'
-(VARIABLE (INTEGER 4 ()) 0 42 ())) ('h5global.eq.22' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 43 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 44 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 45 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1)))) 'h5global.eq.25'
-(VARIABLE (INTEGER 4 ()) 0 46 ())) ('h5global.eq.26' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '24') 1))))
-'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 47 ())) ('h5global.eq.27' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '23') 1)))) 'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 48 ())) (
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.28' (VARIABLE (
-INTEGER 4 ()) 0 49 ())) ('h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.29'
-(VARIABLE (INTEGER 4 ()) 0 50 ())) ('h5global.eq.30' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 51 ())) ('h5global.eq.31' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 52 ())) (
-'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.32' (VARIABLE (
-INTEGER 4 ()) 0 53 ())) ('h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33'
-(VARIABLE (INTEGER 4 ()) 0 54 ())) ('h5global.eq.34' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 55 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 56 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 57 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.37'
-(VARIABLE (INTEGER 4 ()) 0 58 ())) ('h5global.eq.38' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 59 ())) ('h5global.eq.39' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 60 ())) (
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.40' (VARIABLE (
-INTEGER 4 ()) 0 61 ())) ('h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.41'
-(VARIABLE (INTEGER 4 ()) 0 62 ())) ('h5global.eq.42' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 63 ())) ('h5global.eq.43' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 64 ())) (
-'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.44' (VARIABLE (
-INTEGER 4 ()) 0 65 ())) ('h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45'
-(VARIABLE (INTEGER 4 ()) 0 66 ())) ('h5global.eq.46' (VARIABLE (INTEGER
-4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 67 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 68 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 3 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 69 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 3 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.49'
-(VARIABLE (INTEGER 4 ()) 0 70 ())) ('h5global.eq.50' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 71 ())) ('h5global.eq.51' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 72 ())) (
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.52' (VARIABLE (
-INTEGER 4 ()) 0 73 ())) ('h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.53'
-(VARIABLE (INTEGER 4 ()) 0 74 ())) ('h5global.eq.54' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 75 ())) ('h5global.eq.55' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 76 ())) (
-'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.56' (VARIABLE (
-INTEGER 4 ()) 0 77 ())) ('h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57'
-(VARIABLE (INTEGER 4 ()) 0 78 ())) ('h5global.eq.58' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 79 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 80 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 81 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.61'
-(VARIABLE (INTEGER 4 ()) 0 82 ())) ('h5global.eq.62' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 83 ())) ('h5global.eq.63' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 84 ())) (
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.64' (VARIABLE (
-INTEGER 4 ()) 0 85 ())) ('h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.65'
-(VARIABLE (INTEGER 4 ()) 0 86 ())) ('h5global.eq.66' (VARIABLE (INTEGER
-4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 87 ())) ('h5global.eq.67' (
-VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 88 ())) (
-'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 10 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.68' (VARIABLE (
-INTEGER 4 ()) 0 89 ())) ('h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 10
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69'
-(VARIABLE (INTEGER 4 ()) 0 90 ())) ('h5global.eq.70' (VARIABLE (INTEGER
-4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 91 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 8 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 92 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 4 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 93 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 4 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.73'
-(VARIABLE (INTEGER 4 ()) 0 94 ())) ('h5global.eq.74' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 95 ())) ('h5global.eq.75' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 96 ())) (
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.76' (VARIABLE (
-INTEGER 4 ()) 0 97 ())) ('h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.77'
-(VARIABLE (INTEGER 4 ()) 0 98 ())) ('h5global.eq.78' (VARIABLE (INTEGER
-4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 99 ())) ('h5global.eq.79' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 100 ())) (
-'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.80' (VARIABLE (
-INTEGER 4 ()) 0 101 ())) ('h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81'
-(VARIABLE (INTEGER 4 ()) 0 102 ())) ('h5global.eq.82' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 103 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 104 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 105 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.85'
-(VARIABLE (INTEGER 4 ()) 0 106 ())) ('h5global.eq.86' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 107 ())) ('h5global.eq.87' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 108 ())) (
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.88' (VARIABLE (
-INTEGER 4 ()) 0 109 ())) ('h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 18
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.89'
-(VARIABLE (INTEGER 4 ()) 0 110 ())) ('h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 111 ())) ('h5global.eq.91' (
-VARIABLE (INTEGER 4 ()) 0 18 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 112 ())) (
-'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.92' (VARIABLE (
-INTEGER 4 ()) 0 113 ())) ('h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93'
-(VARIABLE (INTEGER 4 ()) 0 114 ())) ('h5global.eq.94' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 115 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 116 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 117 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 16
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.97'
-(VARIABLE (INTEGER 4 ()) 0 118 ())) ('h5global.eq.98' (VARIABLE (
-INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 119 ())) ('h5global.eq.99' (
-VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 120 ())) (
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.100' (VARIABLE (
-INTEGER 4 ()) 0 121 ())) ('h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 122 ())) ('h5global.eq.102'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 123 ())) (
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.103' (VARIABLE (
-INTEGER 4 ()) 0 124 ())) ('h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 125 ())) ('h5global.eq.105'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 126 ())) (
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.106' (VARIABLE (
-INTEGER 4 ()) 0 127 ())) ('h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 128 ())) ('h5global.eq.108'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 129 ())) (
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.109' (VARIABLE (
-INTEGER 4 ()) 0 130 ())) ('h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 131 ())) ('h5global.eq.111'
-(VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 132 ())) (
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 16 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.112' (VARIABLE (
-INTEGER 4 ()) 0 133 ())) ('h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0
-16 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 134 ())) ('h5global.eq.114'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 135 ())) (
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.115' (VARIABLE (
-INTEGER 4 ()) 0 136 ())) ('h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 2
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 137 ())) ('h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 138 ())) ('h5global.eq.118'
-(VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 139 ())) (
-'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 2 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.119' (VARIABLE (
-INTEGER 4 ()) 0 140 ())) ('h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120'
-(VARIABLE (INTEGER 4 ()) 0 141 ())) ('h5global.eq.121' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 142 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 143 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 144 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 6
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.124'
-(VARIABLE (INTEGER 4 ()) 0 145 ())) ('h5global.eq.125' (VARIABLE (
-INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 146 ())) ('h5global.eq.126'
-(VARIABLE (INTEGER 4 ()) 0 6 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 147 ())) (
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.127' (VARIABLE (
-INTEGER 4 ()) 0 148 ())) ('h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 149 ())) ('h5global.eq.129'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 150 ())) (
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.130' (VARIABLE (
-INTEGER 4 ()) 0 151 ())) ('h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0
-12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 152 ())) ('h5global.eq.132'
-(VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 153 ())) (
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 12 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.133' (VARIABLE (
-INTEGER 4 ()) 0 154 ())) ('h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 155 ())) ('h5global.eq.135'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 156 ())) (
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.136' (VARIABLE (
-INTEGER 4 ()) 0 157 ())) ('h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 158 ())) ('h5global.eq.138'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 159 ())) (
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.139' (VARIABLE (
-INTEGER 4 ()) 0 160 ())) ('h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 161 ())) ('h5global.eq.141'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 162 ())) (
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.142' (VARIABLE (
-INTEGER 4 ()) 0 163 ())) ('h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0
-13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 164 ())) ('h5global.eq.144'
-(VARIABLE (INTEGER 4 ()) 0 13 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 165 ())) (
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '22') 1)))) 'h5global.eq.145' (VARIABLE (
-INTEGER 4 ()) 0 166 ())) ('h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '21') 1))))
-'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 167 ())) ('h5global.eq.147'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 168 ())) (
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.148' (VARIABLE (
-INTEGER 4 ()) 0 169 ())) ('h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 170 ())) ('h5global.eq.150'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 171 ())) (
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.151' (VARIABLE (
-INTEGER 4 ()) 0 172 ())) ('h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 173 ())) ('h5global.eq.153'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 174 ())) (
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.154' (VARIABLE (
-INTEGER 4 ()) 0 175 ())) ('h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 176 ())) ('h5global.eq.156'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 177 ())) (
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.157' (VARIABLE (
-INTEGER 4 ()) 0 178 ())) ('h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 179 ())) ('h5global.eq.159'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ())) (
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.160' (VARIABLE (
-INTEGER 4 ()) 0 181 ())) ('h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 182 ())) ('h5global.eq.162'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 183 ())) (
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.163' (VARIABLE (
-INTEGER 4 ()) 0 184 ())) ('h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0
-11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 185 ())) ('h5global.eq.165'
-(VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 186 ())) (
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 11 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.166' (VARIABLE (
-INTEGER 4 ()) 0 187 ())) ('h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 188 ())) ('h5global.eq.168'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ())) (
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.169' (VARIABLE (
-INTEGER 4 ()) 0 190 ())) ('h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 191 ())) ('h5global.eq.171'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 192 ())) (
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.172' (VARIABLE (
-INTEGER 4 ()) 0 193 ())) ('h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 194 ())) ('h5global.eq.174'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 195 ())) (
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.175' (VARIABLE (
-INTEGER 4 ()) 0 196 ())) ('h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0
-14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 197 ())) ('h5global.eq.177'
-(VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 198 ())) (
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 14 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.178' (VARIABLE (
-INTEGER 4 ()) 0 199 ())) ('h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.180'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.181' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.183'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 204 ())) (
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.184' (VARIABLE (
-INTEGER 4 ()) 0 205 ())) ('h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0
-15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 206 ())) ('h5global.eq.186'
-(VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 207 ())) (
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 15 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.187' (VARIABLE (
-INTEGER 4 ()) 0 208 ())) ('h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 209 ())) ('h5global.eq.189'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 210 ())) (
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.190' (VARIABLE (
-INTEGER 4 ()) 0 211 ())) ('h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 212 ())) ('h5global.eq.192'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 213 ())) (
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.193' (VARIABLE (
-INTEGER 4 ()) 0 214 ())) ('h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 215 ())) ('h5global.eq.195'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 216 ())) (
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.196' (VARIABLE (
-INTEGER 4 ()) 0 217 ())) ('h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 218 ())) ('h5global.eq.198'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 219 ())) (
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.199' (VARIABLE (
-INTEGER 4 ()) 0 220 ())) ('h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 221 ())) ('h5global.eq.201'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 222 ())) (
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.202' (VARIABLE (
-INTEGER 4 ()) 0 223 ())) ('h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0
-19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 224 ())) ('h5global.eq.204'
-(VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 225 ())) (
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 19 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.205' (VARIABLE (
-INTEGER 4 ()) 0 226 ())) ('h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 227 ())) ('h5global.eq.207'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 228 ())) (
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.208' (VARIABLE (
-INTEGER 4 ()) 0 229 ())) ('h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 230 ())) ('h5global.eq.210'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 231 ())) (
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.211' (VARIABLE (
-INTEGER 4 ()) 0 232 ())) ('h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 233 ())) ('h5global.eq.213'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 234 ())) (
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.214' (VARIABLE (
-INTEGER 4 ()) 0 235 ())) ('h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 236 ())) ('h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 237 ())) ('h5global.eq.217'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 238 ())) (
-'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.218' (VARIABLE (
-INTEGER 4 ()) 0 239 ())) ('h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 7
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219'
-(VARIABLE (INTEGER 4 ()) 0 240 ())) ('h5global.eq.220' (VARIABLE (
-INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 7 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 20 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-20 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.232'
-(VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.233' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 254 ())) ('h5global.eq.234'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 255 ())) (
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.235' (VARIABLE (
-INTEGER 4 ()) 0 256 ())) ('h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 5
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 257 ())) ('h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 258 ())) ('h5global.eq.238'
-(VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 259 ())) (
-'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 5 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.239' (VARIABLE (
-INTEGER 4 ()) 0 260 ())))
-
-(20 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4')) 0 () ())
-261 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-262 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-263 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-264 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-265 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-266 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-267 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-268 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-269 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-270 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-207 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-208 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-205 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-206 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-200 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-272 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-273 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-274 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-21 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-22 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-183 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-180 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-184 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-167 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-166 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-168 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-185 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-181 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-187 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-174 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-186 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-182 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-275 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-170 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-171 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-172 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-173 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-11 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-176 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-276 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-179 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-177 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-223 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-216 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-217 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-178 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-169 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-210 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '19') () 0 ()
-())
-19 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-211 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-213 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-220 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-215 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-13 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-153 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-278 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-12 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-154 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-160 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-152 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-279 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-158 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-157 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-159 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-163 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-164 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-161 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-151 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-156 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-155 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-162 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-150 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-149 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-14 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-281 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '12') () 0 ()
-())
-198 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-195 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-194 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-197 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-189 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-192 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-193 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-148 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-165 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-218 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-175 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-190 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-191 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-15 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9')) 0 () ())
-199 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-141 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-142 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-282 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(UNKNOWN 0 ()) 0 0 () () 0 () ())
-144 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-143 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-196 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-6 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-284 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6') () 0 () ())
-2 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-146 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-285 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7') () 0 () ())
-147 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-140 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-139 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-17 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-138 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-286 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-128 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-137 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-136 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-129 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-133 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-131 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-132 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-134 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-135 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-145 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '22') () 0 ()
-())
-16 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-118 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-115 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-130 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-117 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-116 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-120 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-125 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-124 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-113 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-122 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-121 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-127 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-114 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-98 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-126 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-104 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-110 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-93 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-94 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-101 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-100 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-109 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-123 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-112 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-111 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-107 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-18 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-4 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-288 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-102 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-103 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-96 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-97 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-106 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-105 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-95 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-289 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '18') () 0 ()
-())
-108 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-119 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-188 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-92 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-290 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2') () 0 () ())
-8 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-91 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-10 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-88 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-90 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-75 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-71 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-291 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '20') () 0 ()
-())
-84 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-73 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-82 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-74 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-72 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-83 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-76 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-86 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-80 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-87 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-81 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-77 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-65 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-39 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-85 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-89 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-63 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-79 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-38 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-45 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-37 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-292 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '34') () 0 ()
-())
-3 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-68 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-245 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-69 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-258 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-70 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-48 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-49 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-59 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-58 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-57 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-60 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-64 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-47 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-54 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-55 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-51 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-52 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-240 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-50 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-62 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-56 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-53 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-242 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-61 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-46 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-78 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-231 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-42 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-227 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-67 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-40 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-66 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-293 'h5z' 'h5z' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-44 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-43 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-31 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-29 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-25 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-34 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-24 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-32 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-35 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-27 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-26 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-33 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-294 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '14') () 0 ()
-())
-295 'h5zfilter_avail_f' 'h5z' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 296 0 (297 298 299) () 0 () ())
-28 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-300 'h5zget_filter_info_f' 'h5z' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 301 0 (302 303 304) () 0 ()
-())
-9 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-36 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-23 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-305 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-306 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-307 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((308 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-309 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-310 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((311 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-312 'h5zunregister_f' 'h5z' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 313 0 (314 315) () 0 () ())
-30 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-316 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-41 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-317 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-318 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-319 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-320 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8') () 0 () ())
-321 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-5 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-7 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-230 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-99 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-314 'filter' '' 313 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-303 'config_flags' '' 301 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-304 'hdferr' '' 301 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-298 'status' '' 296 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-315 'hdferr' '' 313 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-297 'filter' '' 296 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-299 'hdferr' '' 296 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-302 'filter' '' 301 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-)
-
-('h5p_string_create_f' 0 99 'h5g_storage_type_dense_f' 0 188
-'h5d_fill_time_error_f' 0 175 'floating_types_len' 0 275 '__convert_i4_i8'
-0 261 'floating_types' 0 20 'h5d_alloc_time_early_f' 0 182
-'h5d_alloc_time_default_f' 0 183 'h5_iter_unknown_f' 0 204
-'fortran_integer_1' 0 273 'fortran_double' 0 263 'fortran_integer' 0 262
-'fortran_real_4' 0 272 'fortran_integer_2' 0 269 'fortran_real' 0 268
-'fortran_integer_4' 0 265 'fortran_integer_8' 0 264 'fortran_real_12' 0
-267 'fortran_real_16' 0 266 'h5_integer_kind' 0 271 'h5_index_crt_order_f'
-0 206 'fortran_real_8' 0 270 'h5_index_n_f' 0 205 'h5_index_unknown_f' 0
-208 'h5_index_name_f' 0 207 'h5_iter_dec_f' 0 202 'h5_iter_native_f' 0
-201 'h5_iter_n_f' 0 200 'h5_iter_inc_f' 0 203 'h5_szip_ec_om_f' 0 22
-'h5_real_kind' 0 274 'h5_szip_nn_om_f' 0 21 'h5d_contiguous_f' 0 186
-'h5d_compact_f' 0 187 'h5d_alloc_time_late_f' 0 181
-'h5d_alloc_time_error_f' 0 184 'h5d_alloc_time_incr_f' 0 180
-'h5d_chunked_f' 0 185 'h5d_chunk_cache_nslots_dflt_f' 0 168
-'h5d_chunk_cache_nbytes_dflt_f' 0 167 'h5d_chunk_cache_w0_dflt_f' 0 166
-'h5d_fill_time_alloc_f' 0 174 'h5f_close_weak_f' 0 218
-'h5d_fill_value_user_defined_f' 0 169 'h5d_fill_time_never_f' 0 173
-'h5d_fill_value_error_f' 0 172 'h5d_fill_value_default_f' 0 170
-'h5d_fill_value_undefined_f' 0 171 'h5d_space_sts_not_allocated_f' 0 178
-'h5d_space_sts_error_f' 0 179 'h5d_flags_len' 0 276 'h5d_flags' 0 11
-'h5d_space_sts_allocated_f' 0 176 'h5f_close_default_f' 0 219
-'h5f_acc_trunc_f' 0 224 'h5f_acc_rdonly_f' 0 225 'h5f_acc_debug_f' 0 222
-'h5d_space_sts_part_allocated_f' 0 177 'h5f_acc_excl_f' 0 223
-'h5f_acc_rdwr_f' 0 226 'h5f_close_semi_f' 0 217 'h5f_close_strong_f' 0
-216 'h5fd_mpio_independent_f' 0 165 'h5fd_mem_default_f' 0 162
-'h5fd_hid_flags_len' 0 279 'h5fd_core_f' 0 154 'h5f_obj_file_f' 0 215
-'h5f_libver_latest_f' 0 209 'h5f_flags' 0 19 'h5f_flags_len' 0 277
-'h5f_libver_earliest_f' 0 210 'h5f_obj_datatype_f' 0 212
-'h5f_obj_dataset_f' 0 214 'h5f_obj_all_f' 0 211 'h5f_scope_global_f' 0
-220 'h5f_obj_group_f' 0 213 'h5f_scope_local_f' 0 221 'h5fd_hid_flags' 0
-12 'h5fd_flags_len' 0 278 'h5fd_family_f' 0 153 'h5fd_flags' 0 13
-'h5fd_log_f' 0 152 'h5fd_mem_btree_f' 0 160 'h5fd_mem_ntypes_f' 0 155
-'h5fd_mem_nolist_f' 0 163 'h5fd_mem_draw_f' 0 159 'h5fd_mem_lheap_f' 0
-157 'h5fd_mem_gheap_f' 0 158 'h5fd_mem_ohdr_f' 0 156 'h5fd_mpio_f' 0 151
-'h5fd_mem_super_f' 0 161 'h5fd_mpio_collective_f' 0 164 'h5fd_stdio_f' 0
-148 'h5fd_sec2_f' 0 149 'h5fd_multi_f' 0 150 'h5g_link_hard_f' 0 193
-'h5g_dataset_f' 0 197 'h5fortran_types' 0 280 'h5g_link_error_f' 0 194
-'h5g_group_f' 0 198 'h5g_flags_len' 0 281 'h5g_flags' 0 14 'h5g_link_f'
-0 195 'h5g_link_soft_f' 0 192 'h5g_storage_type_compact_f' 0 189
-'h5o_hdr_attr_crt_order_track_f' 0 119 'h5o_copy_without_attr_flag_f' 0
-130 'h5i_datatype_f' 0 145 'h5g_type_f' 0 196 'h5g_storage_type_unknown_f'
-0 191 'h5g_storage_type_symbol_table_f' 0 190 'h5generic_flags_len' 0
-283 'h5g_unknown_f' 0 199 'h5generic_flags' 0 15 'h5i_dataset_f' 0 143
-'h5global' 0 282 'h5i_attr_f' 0 142 'h5i_badid_f' 0 141 'h5i_dataspace_f'
-0 144 'h5l_link_class_t_vers_f' 0 135 'h5i_file_f' 0 147 'h5i_flags_len'
-0 285 'h5i_flags' 0 6 'h5i_group_f' 0 146 'h5l_flags' 0 2 'h5l_flags_len'
-0 284 'h5o_copy_shallow_hierarchy_f' 0 134 'h5o_copy_expand_ext_link_f'
-0 132 'h5l_same_loc_f' 0 136 'h5l_type_external_f' 0 137
-'h5l_type_error_f' 0 140 'h5o_copy_all_f' 0 128 'h5lib_flags_len' 0 286
-'h5l_type_soft_f' 0 138 'h5l_type_hard_f' 0 139 'h5lib_flags' 0 17
-'h5o_copy_expand_reference_f' 0 131 'h5o_copy_expand_soft_link_f' 0 133
-'h5o_copy_preserve_null_flag_f' 0 129 'h5o_hdr_all_flags_f' 0 115
-'h5o_flags' 0 16 'h5o_flags_len' 0 287 'h5o_hdr_attr_crt_order_index_f'
-0 118 'h5p_file_mount_f' 0 108 'h5p_default_f' 0 107
-'h5o_shmesg_pline_flag_f' 0 123 'h5o_shmesg_max_nindexes_f' 0 114
-'h5o_shmesg_all_flag_f' 0 121 'h5o_hdr_chunk0_size_f' 0 120
-'h5o_hdr_attr_store_phase_cha_f' 0 117 'h5o_hdr_store_times_f' 0 116
-'h5o_shmesg_attr_flag_f' 0 122 'h5o_shmesg_max_list_size_f' 0 113
-'h5o_shmesg_fill_flag_f' 0 124 'h5o_shmesg_dtype_flag_f' 0 125
-'h5o_shmesg_none_flag_f' 0 127 'h5p_dataset_xfer_f' 0 109
-'h5p_crt_order_indexed_f' 0 94 'h5o_shmesg_sdspace_flag_f' 0 126
-'h5p_attribute_create_f' 0 98 'h5p_crt_order_tracked_f' 0 93
-'h5p_dataset_create_f' 0 110 'h5p_dataset_access_f' 0 104
-'h5p_datatype_access_f' 0 100 'h5p_datatype_create_f' 0 101
-'h5p_file_access_f' 0 111 'h5p_file_create_f' 0 112 'h5p_flags_len' 0
-289 'h5p_flags_int_len' 0 288 'h5p_flags_int' 0 4 'h5p_flags' 0 18
-'h5p_link_access_f' 0 95 'h5p_group_create_f' 0 103 'h5p_group_access_f'
-0 102 'h5p_object_create_f' 0 105 'h5p_object_copy_f' 0 97
-'h5p_link_create_f' 0 96 'h5p_root_f' 0 106 'h5t_std_u16le' 0 232
-'h5s_select_append_f' 0 78 'h5s_sel_hyperslabs_f' 0 72 'h5s_all_f' 0 84
-'h5r_dataset_region_f' 0 91 'h5r_flags' 0 8 'h5r_flags_len' 0 290
-'h5r_object_f' 0 92 'h5s_flags_len' 0 291 'h5s_flags' 0 10 'h5s_sel_all_f'
-0 71 'h5s_scalar_f' 0 90 'h5s_null_f' 0 88 'h5s_sel_error_f' 0 75
-'h5s_sel_none_f' 0 74 'h5s_select_and_f' 0 82 'h5s_sel_points_f' 0 73
-'h5t_cset_ascii_f' 0 46 'h5s_select_nota_f' 0 79 'h5s_select_invalid_f'
-0 76 'h5s_select_noop_f' 0 83 'h5t_compound_f' 0 63 'h5s_simple_f' 0 89
-'h5s_select_prepend_f' 0 77 'h5s_select_notb_f' 0 80 'h5s_select_or_f' 0
-86 'h5s_select_xor_f' 0 81 'h5s_select_set_f' 0 87 'h5s_unlimited_f' 0
-85 'h5t_array_f' 0 39 'h5t_bitfield_f' 0 65 'h5t_enum_f' 0 61
-'h5t_dir_descend_f' 0 37 'h5t_cset_utf8_f' 0 45 'h5t_dir_ascend_f' 0 38
-'h5t_std_ref_obj' 0 256 'h5t_native_character' 0 257 'h5t_ieee_f32be' 0
-247 'h5t_float_f' 0 68 'h5t_flags' 0 3 'h5t_flags_len' 0 292
-'h5t_ieee_f64le' 0 244 'h5t_ieee_f64be' 0 245 'h5t_ieee_f32le' 0 246
-'h5t_integer_f' 0 69 'h5t_std_i64le' 0 236 'h5t_pad_error_f' 0 53
-'h5t_native_integer_1' 0 254 'h5t_native_double' 0 258
-'h5t_native_integer' 0 260 'h5t_pad_background_f' 0 54 'h5t_norm_none_f'
-0 47 'h5t_norm_implied_f' 0 49 'h5t_native_integer_2' 0 253
-'h5t_native_integer_4' 0 252 'h5t_native_real_16' 0 248 'h5t_native_real'
-0 259 'h5t_native_integer_8' 0 251 'h5t_native_real_4' 0 250
-'h5t_native_real_8' 0 249 'h5t_no_class_f' 0 70 'h5t_norm_msbset_f' 0 48
-'h5t_opaque_f' 0 64 'h5t_order_le_f' 0 60 'h5t_order_be_f' 0 59
-'h5t_order_none_f' 0 57 'h5t_order_vax_f' 0 58 'h5t_std_i32be' 0 239
-'h5t_pad_zero_f' 0 56 'h5t_pad_one_f' 0 55 'h5t_reference_f' 0 62
-'h5t_sgn_error_f' 0 50 'h5t_sgn_2_f' 0 51 'h5t_std_i16le' 0 240
-'h5t_sgn_none_f' 0 52 'h5t_std_i16be' 0 241 'h5t_std_i32le' 0 238
-'h5t_std_i64be' 0 237 'h5t_std_ref_dsetreg' 0 255 'h5t_std_i8le' 0 242
-'h5t_std_i8be' 0 243 'h5t_std_u16be' 0 233 'h5t_std_u32le' 0 230
-'h5t_std_u32be' 0 231 'integer_types' 0 7 'h5t_str_error_f' 0 41
-'h5t_std_u8be' 0 235 'h5t_std_u64le' 0 228 'h5t_std_u64be' 0 229
-'h5t_std_u8le' 0 234 'hssize_t' 0 316 'h5z_disable_edc_f' 0 30
-'h5t_str_nullpad_f' 0 43 'h5t_str_nullterm_f' 0 44 'h5z' 0 293
-'h5t_string_f' 0 66 'h5t_string' 0 227 'h5t_str_spacepad_f' 0 42
-'h5t_vlen_f' 0 40 'h5t_time_f' 0 67 'h5zunregister_f' 0 312
-'h5z_filter_all_f' 0 23 'h5z_enable_edc_f' 0 29 'h5z_error_edc_f' 0 31
-'h5z_filter_error_f' 0 36 'h5z_filter_decode_enabled_f' 0 24
-'h5z_filter_deflate_f' 0 34 'h5z_filter_encode_enabled_f' 0 25 'h5z_flags'
-0 9 'h5z_filter_shuffle_f' 0 33 'h5z_filter_none_f' 0 35
-'h5z_filter_fletcher32_f' 0 32 'h5z_flag_optional_f' 0 26
-'h5z_filter_szip_f' 0 27 'h5zget_filter_info_f' 0 300 'h5z_no_edc_f' 0
-28 'h5z_flags_len' 0 294 'h5zfilter_avail_f' 0 295 'hobj_ref_t_f' 0 310
-'hdset_reg_ref_t_f' 0 307 'haddr_t' 0 305 'hid_t' 0 306 'hsize_t' 0 309
-'predef_types' 0 5 'object_namelen_default_f' 0 318 'integer_types_len'
-0 317 'ref_reg_buf_len' 0 321 'predef_types_len' 0 319 'size_t' 0 320)
diff --git a/interfaces/ext/hdf5/hdf5.h b/interfaces/ext/hdf5/hdf5.h
deleted file mode 100644
index ef15063..0000000
--- a/interfaces/ext/hdf5/hdf5.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This is the main public HDF5 include file.  Put further information in
- * a particular header file and include that here, don't fill this file with
- * lots of gunk...
- */
-#ifndef _HDF5_H
-#define _HDF5_H
-
-#include "H5public.h"
-#include "H5Apublic.h"		/* Attributes				*/
-#include "H5ACpublic.h"		/* Metadata cache			*/
-#include "H5Dpublic.h"		/* Datasets				*/
-#include "H5Epublic.h"		/* Errors				*/
-#include "H5Fpublic.h"		/* Files				*/
-#include "H5FDpublic.h"		/* File drivers				*/
-#include "H5Gpublic.h"		/* Groups				*/
-#include "H5Ipublic.h"		/* ID management			*/
-#include "H5Lpublic.h"		/* Links				*/
-#include "H5MMpublic.h"		/* Memory management			*/
-#include "H5Opublic.h"		/* Object headers			*/
-#include "H5Ppublic.h"		/* Property lists			*/
-#include "H5Rpublic.h"		/* References				*/
-#include "H5Spublic.h"		/* Dataspaces				*/
-#include "H5Tpublic.h"		/* Datatypes				*/
-#include "H5Zpublic.h"		/* Data filters				*/
-
-/* Predefined file drivers */
-#include "H5FDcore.h"		/* Files stored entirely in memory	*/
-#include "H5FDfamily.h"		/* File families 			*/
-#include "H5FDlog.h"        	/* sec2 driver with I/O logging (for debugging) */
-#include "H5FDmpi.h"            /* MPI-based file drivers		*/
-#include "H5FDmulti.h"		/* Usage-partitioned file family	*/
-#include "H5FDsec2.h"		/* POSIX unbuffered file I/O		*/
-#include "H5FDstdio.h"		/* Standard C buffered I/O		*/
-#ifdef H5_HAVE_WINDOWS
-#include "H5FDwindows.h"        /* Windows buffered I/O     */
-#endif
-#include "H5FDdirect.h"     	/* Linux direct I/O			*/
-
-#endif
diff --git a/interfaces/ext/hdf5/hdf5.mod b/interfaces/ext/hdf5/hdf5.mod
deleted file mode 100644
index 1222183..0000000
--- a/interfaces/ext/hdf5/hdf5.mod
+++ /dev/null
@@ -1,16361 +0,0 @@
-GFORTRAN module created from /home/hdftest/snapshots-bin-hdf5_1_8_6/current/fortran/src/HDF5.f90 on Mon Feb 14 14:35:53 2011
-If you edit this, you'll get what you deserve.
-
-(() () () () () () () () () () () () () () () () () ()
-() () ())
-
-()
-
-(('h5aread_f' '' 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) ('h5awrite_f' '' 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) ('h5dextend_f' '' 66) ('h5dfill_f' '' 67 68 69 70) ('h5dread_f' ''
-71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
-95 96 97 98 99 100 101 102 103 104) ('h5dread_vl_f' '' 105 106 107) (
-'h5dwrite_f' '' 108 109 110 111 112 113 114 115 116 117 118 119 120 121
-122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
-140 141) ('h5dwrite_vl_f' '' 142 143 144) ('h5pget_f' '' 145 146 147 148)
-('h5pget_fill_value_f' '' 149 150 151 152) ('h5pinsert_f' '' 153 154 155
-156) ('h5pregister_f' '' 157 158 159 160) ('h5pset_f' '' 161 162 163 164)
-('h5pset_fapl_multi_f' '' 165 166) ('h5pset_fill_value_f' '' 167 168 169
-170) ('h5rget_region_f' '' 171) ('h5rget_object_type_f' '' 172) (
-'h5rcreate_f' '' 173 174) ('h5rdereference_f' '' 175 176) (
-'h5rget_name_f' '' 177 178))
-
-(('h5s_flags' 179 0) ('h5d_flags' 180 0) ('h5z_flags' 181 0) ('h5r_flags'
-182 0) ('h5fd_hid_flags' 183 0) ('integer_types' 184 0) ('h5fd_flags'
-185 0) ('h5generic_flags' 186 0) ('h5l_flags' 187 0) ('h5o_flags' 188 0)
-('h5g_flags' 189 0) ('h5d_flags' 180 0) ('h5p_flags' 190 0) ('h5l_flags'
-187 0) ('floating_types' 191 0) ('h5t_flags' 192 0) ('h5f_flags' 193 0)
-('h5lib_flags' 194 0) ('predefined_types' 195 0) ('h5p_flags_int' 196 0)
-('integer_types' 184 0) ('h5i_flags' 197 0) ('h5p_flags_int' 196 0) (
-'h5z_flags' 181 0) ('h5d_flags' 180 0) ('h5fd_hid_flags' 183 0) (
-'h5s_flags' 179 0) ('h5fd_flags' 185 0) ('h5r_flags' 182 0) (
-'h5lib_flags' 194 0) ('h5t_flags' 192 0) ('h5o_flags' 188 0) (
-'h5generic_flags' 186 0) ('h5f_flags' 193 0) ('floating_types' 191 0) (
-'h5p_flags' 190 0) ('h5g_flags' 189 0) ('h5t_flags' 192 0) ('h5i_flags'
-197 0) ('integer_types' 184 0) ('predefined_types' 195 0) (
-'h5p_flags_int' 196 0) ('h5z_flags' 181 0) ('h5s_flags' 179 0) (
-'h5o_flags' 188 0) ('h5generic_flags' 186 0) ('h5g_flags' 189 0) (
-'h5fd_flags' 185 0) ('h5fd_hid_flags' 183 0) ('h5d_flags' 180 0) (
-'h5s_flags' 179 0) ('h5r_flags' 182 0) ('h5p_flags' 190 0) ('h5lib_flags'
-194 0) ('h5r_flags' 182 0) ('h5t_flags' 192 0) ('h5p_flags_int' 196 0) (
-'h5r_flags' 182 0) ('h5z_flags' 181 0) ('h5i_flags' 197 0) (
-'integer_types' 184 0) ('h5i_flags' 197 0) ('predefined_types' 195 0) (
-'h5d_flags' 180 0) ('h5s_flags' 179 0) ('h5fd_flags' 185 0) (
-'h5fd_hid_flags' 183 0) ('h5g_flags' 189 0) ('h5l_flags' 187 0) (
-'floating_types' 191 0) ('h5lib_flags' 194 0) ('predefined_types' 195 0)
-('h5f_flags' 193 0) ('h5p_flags' 190 0) ('h5o_flags' 188 0) (
-'h5generic_flags' 186 0) ('h5p_flags_int' 196 0) ('h5t_flags' 192 0) (
-'predefined_types' 195 0) ('integer_types' 184 0) ('h5i_flags' 197 0) (
-'h5l_flags' 187 0) ('h5r_flags' 182 0) ('floating_types' 191 0) (
-'integer_types' 184 0) ('h5s_flags' 179 0) ('h5z_flags' 181 0) (
-'h5f_flags' 193 0) ('h5l_flags' 187 0) ('h5fd_hid_flags' 183 0) (
-'h5generic_flags' 186 0) ('h5o_flags' 188 0) ('h5p_flags' 190 0) (
-'h5f_flags' 193 0) ('floating_types' 191 0) ('h5z_flags' 181 0) (
-'h5lib_flags' 194 0) ('h5l_flags' 187 0) ('h5g_flags' 189 0) (
-'h5fd_flags' 185 0) ('h5p_flags_int' 196 0) ('predefined_types' 195 0) (
-'integer_types' 184 0) ('h5i_flags' 197 0) ('h5z_flags' 181 0) (
-'h5l_flags' 187 0) ('h5d_flags' 180 0) ('h5s_flags' 179 0) ('h5r_flags'
-182 0) ('h5t_flags' 192 0) ('h5fd_hid_flags' 183 0) ('h5fd_flags' 185 0)
-('h5generic_flags' 186 0) ('h5p_flags' 190 0) ('h5f_flags' 193 0) (
-'h5lib_flags' 194 0) ('h5t_flags' 192 0) ('h5p_flags_int' 196 0) (
-'predefined_types' 195 0) ('h5t_flags' 192 0) ('h5l_flags' 187 0) (
-'floating_types' 191 0) ('h5r_flags' 182 0) ('integer_types' 184 0) (
-'h5s_flags' 179 0) ('h5z_flags' 181 0) ('h5i_flags' 197 0) ('h5o_flags'
-188 0) ('h5g_flags' 189 0) ('h5fd_flags' 185 0) ('h5p_flags_int' 196 0)
-('h5g_flags' 189 0) ('h5fd_hid_flags' 183 0) ('h5generic_flags' 186 0) (
-'h5o_flags' 188 0) ('h5lib_flags' 194 0) ('h5d_flags' 180 0) (
-'floating_types' 191 0) ('h5l_flags' 187 0) ('h5t_flags' 192 0) (
-'predefined_types' 195 0) ('floating_types' 191 0) ('h5f_flags' 193 0) (
-'predefined_types' 195 0) ('h5i_flags' 197 0) ('h5r_flags' 182 0) (
-'h5s_flags' 179 0) ('h5fd_hid_flags' 183 0) ('h5d_flags' 180 0) (
-'h5z_flags' 181 0) ('h5g_flags' 189 0) ('h5generic_flags' 186 0) (
-'h5i_flags' 197 0) ('h5f_flags' 193 0) ('h5p_flags' 190 0) ('h5lib_flags'
-194 0) ('h5t_flags' 192 0) ('h5l_flags' 187 0) ('floating_types' 191 0)
-('h5o_flags' 188 0) ('predefined_types' 195 0) ('h5i_flags' 197 0) (
-'integer_types' 184 0) ('integer_types' 184 0) ('h5p_flags_int' 196 0) (
-'h5fd_flags' 185 0) ('h5s_flags' 179 0) ('h5z_flags' 181 0) ('h5fd_flags'
-185 0) ('h5fd_hid_flags' 183 0) ('h5r_flags' 182 0) ('h5g_flags' 189 0)
-('h5d_flags' 180 0) ('h5o_flags' 188 0) ('h5generic_flags' 186 0) (
-'h5p_flags' 190 0) ('h5f_flags' 193 0) ('h5lib_flags' 194 0) ('h5l_flags'
-187 0) ('h5p_flags_int' 196 0) ('h5t_flags' 192 0) ('predefined_types'
-195 0) ('h5z_flags' 181 0) ('h5s_flags' 179 0) ('h5z_flags' 181 0) (
-'h5r_flags' 182 0) ('integer_types' 184 0) ('h5fd_flags' 185 0) (
-'h5fd_hid_flags' 183 0) ('h5d_flags' 180 0) ('h5generic_flags' 186 0) (
-'h5o_flags' 188 0) ('h5f_flags' 193 0) ('h5p_flags' 190 0) (
-'floating_types' 191 0) ('h5lib_flags' 194 0) ('h5s_flags' 179 0) (
-'h5g_flags' 189 0) ('h5i_flags' 197 0) ('floating_types' 191 0) (
-'h5r_flags' 182 0) ('integer_types' 184 0) ('h5fd_hid_flags' 183 0) (
-'h5fd_flags' 185 0) ('h5generic_flags' 186 0) ('h5g_flags' 189 0) (
-'h5fd_flags' 185 0) ('h5o_flags' 188 0) ('h5d_flags' 180 0) (
-'h5lib_flags' 194 0) ('h5p_flags_int' 196 0) ('h5p_flags' 190 0) (
-'h5d_flags' 180 0) ('floating_types' 191 0) ('h5l_flags' 187 0) (
-'h5fd_hid_flags' 183 0) ('predefined_types' 195 0) ('integer_types' 184
-0) ('h5i_flags' 197 0) ('h5p_flags_int' 196 0) ('h5t_flags' 192 0) (
-'h5f_flags' 193 0) ('h5z_flags' 181 0) ('h5s_flags' 179 0) ('h5fd_flags'
-185 0) ('h5fd_hid_flags' 183 0) ('h5o_flags' 188 0) ('h5lib_flags' 194 0)
-('h5generic_flags' 186 0) ('h5p_flags' 190 0) ('h5g_flags' 189 0) (
-'floating_types' 191 0) ('h5p_flags_int' 196 0) ('h5t_flags' 192 0) (
-'predefined_types' 195 0) ('h5g_flags' 189 0) ('h5l_flags' 187 0) (
-'h5f_flags' 193 0) ('h5r_flags' 182 0) ('h5s_flags' 179 0) ('h5z_flags'
-181 0) ('integer_types' 184 0) ('h5d_flags' 180 0) ('h5i_flags' 197 0) (
-'h5generic_flags' 186 0) ('h5g_flags' 189 0) ('h5fd_flags' 185 0) (
-'h5o_flags' 188 0) ('h5generic_flags' 186 0) ('h5lib_flags' 194 0) (
-'h5p_flags' 190 0) ('h5f_flags' 193 0) ('h5f_flags' 193 0) (
-'h5fd_hid_flags' 183 0) ('h5t_flags' 192 0) ('h5l_flags' 187 0) (
-'predefined_types' 195 0) ('h5p_flags_int' 196 0) ('h5i_flags' 197 0) (
-'h5r_flags' 182 0) ('h5z_flags' 181 0) ('integer_types' 184 0) (
-'h5p_flags' 190 0) ('h5generic_flags' 186 0) ('h5g_flags' 189 0) (
-'h5fd_flags' 185 0) ('h5o_flags' 188 0) ('h5o_flags' 188 0) ('h5p_flags'
-190 0) ('floating_types' 191 0) ('h5l_flags' 187 0) ('h5f_flags' 193 0)
-('h5lib_flags' 194 0) ('h5fd_hid_flags' 183 0) ('h5t_flags' 192 0) (
-'h5i_flags' 197 0) ('h5lib_flags' 194 0) ('predefined_types' 195 0) (
-'h5p_flags_int' 196 0) ('h5d_flags' 180 0) ('h5s_flags' 179 0) (
-'floating_types' 191 0) ('h5d_flags' 180 0) ('h5r_flags' 182 0) (
-'h5p_flags' 190 0))
-
-(('h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 194 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 181
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 181 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 194 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 181
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 181 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 194 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 181
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 181 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 194 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 181
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 181 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 194 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 181
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 181 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 194 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 181
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 181 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 194 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 181
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 181 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 194 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 181
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 181 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 194 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 181
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 181 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 194 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 181
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 181 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 194 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 181
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 181 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 194 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 181
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 181 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 194 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 181
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 181 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 194 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 181
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 181 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())) (
-'h5global.eq.0' (VARIABLE (INTEGER 4 ()) 0 194 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.0' (VARIABLE (INTEGER
-4 ()) 0 198 ())) ('h5global.eq.1' (VARIABLE (INTEGER 4 ()) 0 194 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.1' (
-VARIABLE (INTEGER 4 ()) 0 199 ())) ('h5global.eq.2' (VARIABLE (INTEGER 4
-()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.2' (VARIABLE (INTEGER 4 ()) 0 200 ())) ('h5global.eq.3' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.3' (VARIABLE (INTEGER 4 ()) 0 201 ())) (
-'h5global.eq.4' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.4' (VARIABLE (
-INTEGER 4 ()) 0 202 ())) ('h5global.eq.5' (VARIABLE (INTEGER 4 ()) 0 181
-((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.5'
-(VARIABLE (INTEGER 4 ()) 0 203 ())) ('h5global.eq.6' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.6' (VARIABLE (INTEGER 4 ()) 0 204 ())) ('h5global.eq.7' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.7' (VARIABLE (INTEGER 4 ()) 0 205 ())) (
-'h5global.eq.8' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.8' (VARIABLE (INTEGER
-4 ()) 0 206 ())) ('h5global.eq.9' (VARIABLE (INTEGER 4 ()) 0 181 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.9' (
-VARIABLE (INTEGER 4 ()) 0 207 ())) ('h5global.eq.10' (VARIABLE (INTEGER
-4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.10' (VARIABLE (INTEGER 4 ()) 0 208 ())) ('h5global.eq.11' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.11' (VARIABLE (INTEGER 4 ()) 0 209 ())) (
-'h5global.eq.12' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.12' (VARIABLE (
-INTEGER 4 ()) 0 210 ())) ('h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0
-181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.13' (VARIABLE (INTEGER 4 ()) 0 211 ())) ('h5global.eq.14' (
-VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.14' (VARIABLE (INTEGER 4 ()) 0 212 ())) (
-'h5global.eq.15' (VARIABLE (INTEGER 4 ()) 0 181 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.15' (VARIABLE (
-INTEGER 4 ()) 0 213 ())) ('h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '34') 1))))
-'h5global.eq.16' (VARIABLE (INTEGER 4 ()) 0 214 ())) ('h5global.eq.17' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '33') 1)))) 'h5global.eq.17' (VARIABLE (INTEGER 4 ()) 0 215 ())) (
-'h5global.eq.18' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '32') 1)))) 'h5global.eq.18' (VARIABLE (
-INTEGER 4 ()) 0 216 ())) ('h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '31') 1))))
-'h5global.eq.19' (VARIABLE (INTEGER 4 ()) 0 217 ())) ('h5global.eq.20' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '30') 1)))) 'h5global.eq.20' (VARIABLE (INTEGER 4 ()) 0 218 ())) (
-'h5global.eq.21' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '29') 1)))) 'h5global.eq.21' (VARIABLE (
-INTEGER 4 ()) 0 219 ())) ('h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '28') 1))))
-'h5global.eq.22' (VARIABLE (INTEGER 4 ()) 0 220 ())) ('h5global.eq.23' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '27') 1)))) 'h5global.eq.23' (VARIABLE (INTEGER 4 ()) 0 221 ())) (
-'h5global.eq.24' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '26') 1)))) 'h5global.eq.24' (VARIABLE (
-INTEGER 4 ()) 0 222 ())) ('h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '25') 1))))
-'h5global.eq.25' (VARIABLE (INTEGER 4 ()) 0 223 ())) ('h5global.eq.26' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '24') 1)))) 'h5global.eq.26' (VARIABLE (INTEGER 4 ()) 0 224 ())) (
-'h5global.eq.27' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '23') 1)))) 'h5global.eq.27' (VARIABLE (
-INTEGER 4 ()) 0 225 ())) ('h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.28' (VARIABLE (INTEGER 4 ()) 0 226 ())) ('h5global.eq.29' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.29' (VARIABLE (INTEGER 4 ()) 0 227 ())) (
-'h5global.eq.30' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.30' (VARIABLE (
-INTEGER 4 ()) 0 228 ())) ('h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.31' (VARIABLE (INTEGER 4 ()) 0 229 ())) ('h5global.eq.32' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.32' (VARIABLE (INTEGER 4 ()) 0 230 ())) (
-'h5global.eq.33' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.33' (VARIABLE (
-INTEGER 4 ()) 0 231 ())) ('h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.34' (VARIABLE (INTEGER 4 ()) 0 232 ())) ('h5global.eq.35' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.35' (VARIABLE (INTEGER 4 ()) 0 233 ())) (
-'h5global.eq.36' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.36' (VARIABLE (
-INTEGER 4 ()) 0 234 ())) ('h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.37' (VARIABLE (INTEGER 4 ()) 0 235 ())) ('h5global.eq.38' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.38' (VARIABLE (INTEGER 4 ()) 0 236 ())) (
-'h5global.eq.39' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.39' (VARIABLE (
-INTEGER 4 ()) 0 237 ())) ('h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.40' (VARIABLE (INTEGER 4 ()) 0 238 ())) ('h5global.eq.41' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.41' (VARIABLE (INTEGER 4 ()) 0 239 ())) (
-'h5global.eq.42' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.42' (VARIABLE (
-INTEGER 4 ()) 0 240 ())) ('h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.43' (VARIABLE (INTEGER 4 ()) 0 241 ())) ('h5global.eq.44' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.44' (VARIABLE (INTEGER 4 ()) 0 242 ())) (
-'h5global.eq.45' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.45' (VARIABLE (
-INTEGER 4 ()) 0 243 ())) ('h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.46' (VARIABLE (INTEGER 4 ()) 0 244 ())) ('h5global.eq.47' (
-VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.47' (VARIABLE (INTEGER 4 ()) 0 245 ())) (
-'h5global.eq.48' (VARIABLE (INTEGER 4 ()) 0 192 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.48' (VARIABLE (
-INTEGER 4 ()) 0 246 ())) ('h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0
-192 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.49' (VARIABLE (INTEGER 4 ()) 0 247 ())) ('h5global.eq.50' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '20') 1)))) 'h5global.eq.50' (VARIABLE (INTEGER 4 ()) 0 248 ())) (
-'h5global.eq.51' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '19') 1)))) 'h5global.eq.51' (VARIABLE (
-INTEGER 4 ()) 0 249 ())) ('h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '18') 1))))
-'h5global.eq.52' (VARIABLE (INTEGER 4 ()) 0 250 ())) ('h5global.eq.53' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.53' (VARIABLE (INTEGER 4 ()) 0 251 ())) (
-'h5global.eq.54' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.54' (VARIABLE (
-INTEGER 4 ()) 0 252 ())) ('h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.55' (VARIABLE (INTEGER 4 ()) 0 253 ())) ('h5global.eq.56' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.56' (VARIABLE (INTEGER 4 ()) 0 254 ())) (
-'h5global.eq.57' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.57' (VARIABLE (
-INTEGER 4 ()) 0 255 ())) ('h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.58' (VARIABLE (INTEGER 4 ()) 0 256 ())) ('h5global.eq.59' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.59' (VARIABLE (INTEGER 4 ()) 0 257 ())) (
-'h5global.eq.60' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.60' (VARIABLE (
-INTEGER 4 ()) 0 258 ())) ('h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.61' (VARIABLE (INTEGER 4 ()) 0 259 ())) ('h5global.eq.62' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.62' (VARIABLE (INTEGER 4 ()) 0 260 ())) (
-'h5global.eq.63' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.63' (VARIABLE (
-INTEGER 4 ()) 0 261 ())) ('h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.64' (VARIABLE (INTEGER 4 ()) 0 262 ())) ('h5global.eq.65' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.65' (VARIABLE (INTEGER 4 ()) 0 263 ())) (
-'h5global.eq.66' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.66' (VARIABLE (
-INTEGER 4 ()) 0 264 ())) ('h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0
-179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.67' (VARIABLE (INTEGER 4 ()) 0 265 ())) ('h5global.eq.68' (
-VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.68' (VARIABLE (INTEGER 4 ()) 0 266 ())) (
-'h5global.eq.69' (VARIABLE (INTEGER 4 ()) 0 179 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.69' (VARIABLE (
-INTEGER 4 ()) 0 267 ())) ('h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0
-182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.70' (VARIABLE (INTEGER 4 ()) 0 268 ())) ('h5global.eq.71' (
-VARIABLE (INTEGER 4 ()) 0 182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.71' (VARIABLE (INTEGER 4 ()) 0 269 ())) (
-'h5global.eq.72' (VARIABLE (INTEGER 4 ()) 0 196 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.72' (VARIABLE (
-INTEGER 4 ()) 0 270 ())) ('h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0
-196 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.73' (VARIABLE (INTEGER 4 ()) 0 271 ())) ('h5global.eq.74' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.74' (VARIABLE (INTEGER 4 ()) 0 272 ())) (
-'h5global.eq.75' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.75' (VARIABLE (
-INTEGER 4 ()) 0 273 ())) ('h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.76' (VARIABLE (INTEGER 4 ()) 0 274 ())) ('h5global.eq.77' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.77' (VARIABLE (INTEGER 4 ()) 0 275 ())) (
-'h5global.eq.78' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.78' (VARIABLE (
-INTEGER 4 ()) 0 276 ())) ('h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.79' (VARIABLE (INTEGER 4 ()) 0 277 ())) ('h5global.eq.80' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.80' (VARIABLE (INTEGER 4 ()) 0 278 ())) (
-'h5global.eq.81' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.81' (VARIABLE (
-INTEGER 4 ()) 0 279 ())) ('h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.82' (VARIABLE (INTEGER 4 ()) 0 280 ())) ('h5global.eq.83' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.83' (VARIABLE (INTEGER 4 ()) 0 281 ())) (
-'h5global.eq.84' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.84' (VARIABLE (
-INTEGER 4 ()) 0 282 ())) ('h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.85' (VARIABLE (INTEGER 4 ()) 0 283 ())) ('h5global.eq.86' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.86' (VARIABLE (INTEGER 4 ()) 0 284 ())) (
-'h5global.eq.87' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.87' (VARIABLE (
-INTEGER 4 ()) 0 285 ())) ('h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.88' (VARIABLE (INTEGER 4 ()) 0 286 ())) ('h5global.eq.89' (
-VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.89' (VARIABLE (INTEGER 4 ()) 0 287 ())) (
-'h5global.eq.90' (VARIABLE (INTEGER 4 ()) 0 190 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.90' (VARIABLE (
-INTEGER 4 ()) 0 288 ())) ('h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0
-190 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.91' (VARIABLE (INTEGER 4 ()) 0 289 ())) ('h5global.eq.92' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '22') 1)))) 'h5global.eq.92' (VARIABLE (INTEGER 4 ()) 0 290 ())) (
-'h5global.eq.93' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '21') 1)))) 'h5global.eq.93' (VARIABLE (
-INTEGER 4 ()) 0 291 ())) ('h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '20') 1))))
-'h5global.eq.94' (VARIABLE (INTEGER 4 ()) 0 292 ())) ('h5global.eq.95' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '19') 1)))) 'h5global.eq.95' (VARIABLE (INTEGER 4 ()) 0 293 ())) (
-'h5global.eq.96' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '18') 1)))) 'h5global.eq.96' (VARIABLE (
-INTEGER 4 ()) 0 294 ())) ('h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '17') 1))))
-'h5global.eq.97' (VARIABLE (INTEGER 4 ()) 0 295 ())) ('h5global.eq.98' (
-VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '16') 1)))) 'h5global.eq.98' (VARIABLE (INTEGER 4 ()) 0 296 ())) (
-'h5global.eq.99' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '15') 1)))) 'h5global.eq.99' (VARIABLE (
-INTEGER 4 ()) 0 297 ())) ('h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '14') 1))))
-'h5global.eq.100' (VARIABLE (INTEGER 4 ()) 0 298 ())) ('h5global.eq.101'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.101' (VARIABLE (INTEGER 4 ()) 0 299 ())) (
-'h5global.eq.102' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.102' (VARIABLE (
-INTEGER 4 ()) 0 300 ())) ('h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.103' (VARIABLE (INTEGER 4 ()) 0 301 ())) ('h5global.eq.104'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.104' (VARIABLE (INTEGER 4 ()) 0 302 ())) (
-'h5global.eq.105' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.105' (VARIABLE (
-INTEGER 4 ()) 0 303 ())) ('h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.106' (VARIABLE (INTEGER 4 ()) 0 304 ())) ('h5global.eq.107'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.107' (VARIABLE (INTEGER 4 ()) 0 305 ())) (
-'h5global.eq.108' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.108' (VARIABLE (
-INTEGER 4 ()) 0 306 ())) ('h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.109' (VARIABLE (INTEGER 4 ()) 0 307 ())) ('h5global.eq.110'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.110' (VARIABLE (INTEGER 4 ()) 0 308 ())) (
-'h5global.eq.111' (VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.111' (VARIABLE (
-INTEGER 4 ()) 0 309 ())) ('h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0
-188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.112' (VARIABLE (INTEGER 4 ()) 0 310 ())) ('h5global.eq.113'
-(VARIABLE (INTEGER 4 ()) 0 188 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.113' (VARIABLE (INTEGER 4 ()) 0 311 ())) (
-'h5global.eq.114' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.114' (VARIABLE (
-INTEGER 4 ()) 0 312 ())) ('h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.115' (VARIABLE (INTEGER 4 ()) 0 313 ())) ('h5global.eq.116'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.116' (VARIABLE (INTEGER 4 ()) 0 314 ())) (
-'h5global.eq.117' (VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.117' (VARIABLE (
-INTEGER 4 ()) 0 315 ())) ('h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0
-187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.118' (VARIABLE (INTEGER 4 ()) 0 316 ())) ('h5global.eq.119'
-(VARIABLE (INTEGER 4 ()) 0 187 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.119' (VARIABLE (INTEGER 4 ()) 0 317 ())) (
-'h5global.eq.120' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.120' (VARIABLE (
-INTEGER 4 ()) 0 318 ())) ('h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.121' (VARIABLE (INTEGER 4 ()) 0 319 ())) ('h5global.eq.122'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.122' (VARIABLE (INTEGER 4 ()) 0 320 ())) (
-'h5global.eq.123' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.123' (VARIABLE (
-INTEGER 4 ()) 0 321 ())) ('h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0
-197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.124' (VARIABLE (INTEGER 4 ()) 0 322 ())) ('h5global.eq.125'
-(VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.125' (VARIABLE (INTEGER 4 ()) 0 323 ())) (
-'h5global.eq.126' (VARIABLE (INTEGER 4 ()) 0 197 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.126' (VARIABLE (
-INTEGER 4 ()) 0 324 ())) ('h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.127' (VARIABLE (INTEGER 4 ()) 0 325 ())) ('h5global.eq.128'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.128' (VARIABLE (INTEGER 4 ()) 0 326 ())) (
-'h5global.eq.129' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.129' (VARIABLE (
-INTEGER 4 ()) 0 327 ())) ('h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.130' (VARIABLE (INTEGER 4 ()) 0 328 ())) ('h5global.eq.131'
-(VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.131' (VARIABLE (INTEGER 4 ()) 0 329 ())) (
-'h5global.eq.132' (VARIABLE (INTEGER 4 ()) 0 183 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.132' (VARIABLE (
-INTEGER 4 ()) 0 330 ())) ('h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0
-183 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.133' (VARIABLE (INTEGER 4 ()) 0 331 ())) ('h5global.eq.134'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.134' (VARIABLE (INTEGER 4 ()) 0 332 ())) (
-'h5global.eq.135' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.135' (VARIABLE (
-INTEGER 4 ()) 0 333 ())) ('h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.136' (VARIABLE (INTEGER 4 ()) 0 334 ())) ('h5global.eq.137'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.137' (VARIABLE (INTEGER 4 ()) 0 335 ())) (
-'h5global.eq.138' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.138' (VARIABLE (
-INTEGER 4 ()) 0 336 ())) ('h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.139' (VARIABLE (INTEGER 4 ()) 0 337 ())) ('h5global.eq.140'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.140' (VARIABLE (INTEGER 4 ()) 0 338 ())) (
-'h5global.eq.141' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.141' (VARIABLE (
-INTEGER 4 ()) 0 339 ())) ('h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0
-185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.142' (VARIABLE (INTEGER 4 ()) 0 340 ())) ('h5global.eq.143'
-(VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.143' (VARIABLE (INTEGER 4 ()) 0 341 ())) (
-'h5global.eq.144' (VARIABLE (INTEGER 4 ()) 0 185 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.144' (VARIABLE (
-INTEGER 4 ()) 0 342 ())) ('h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '22') 1))))
-'h5global.eq.145' (VARIABLE (INTEGER 4 ()) 0 343 ())) ('h5global.eq.146'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '21') 1)))) 'h5global.eq.146' (VARIABLE (INTEGER 4 ()) 0 344 ())) (
-'h5global.eq.147' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '20') 1)))) 'h5global.eq.147' (VARIABLE (
-INTEGER 4 ()) 0 345 ())) ('h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '19') 1))))
-'h5global.eq.148' (VARIABLE (INTEGER 4 ()) 0 346 ())) ('h5global.eq.149'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.149' (VARIABLE (INTEGER 4 ()) 0 347 ())) (
-'h5global.eq.150' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.150' (VARIABLE (
-INTEGER 4 ()) 0 348 ())) ('h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.151' (VARIABLE (INTEGER 4 ()) 0 349 ())) ('h5global.eq.152'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.152' (VARIABLE (INTEGER 4 ()) 0 350 ())) (
-'h5global.eq.153' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.153' (VARIABLE (
-INTEGER 4 ()) 0 351 ())) ('h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.154' (VARIABLE (INTEGER 4 ()) 0 352 ())) ('h5global.eq.155'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.155' (VARIABLE (INTEGER 4 ()) 0 353 ())) (
-'h5global.eq.156' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.156' (VARIABLE (
-INTEGER 4 ()) 0 354 ())) ('h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.157' (VARIABLE (INTEGER 4 ()) 0 355 ())) ('h5global.eq.158'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.158' (VARIABLE (INTEGER 4 ()) 0 356 ())) (
-'h5global.eq.159' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.159' (VARIABLE (
-INTEGER 4 ()) 0 357 ())) ('h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.160' (VARIABLE (INTEGER 4 ()) 0 358 ())) ('h5global.eq.161'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.161' (VARIABLE (INTEGER 4 ()) 0 359 ())) (
-'h5global.eq.162' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.162' (VARIABLE (
-INTEGER 4 ()) 0 360 ())) ('h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.163' (VARIABLE (INTEGER 4 ()) 0 361 ())) ('h5global.eq.164'
-(VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.164' (VARIABLE (INTEGER 4 ()) 0 362 ())) (
-'h5global.eq.165' (VARIABLE (INTEGER 4 ()) 0 180 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.165' (VARIABLE (
-INTEGER 4 ()) 0 363 ())) ('h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0
-180 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.166' (VARIABLE (INTEGER 4 ()) 0 364 ())) ('h5global.eq.167'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.167' (VARIABLE (INTEGER 4 ()) 0 365 ())) (
-'h5global.eq.168' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.168' (VARIABLE (
-INTEGER 4 ()) 0 366 ())) ('h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.169' (VARIABLE (INTEGER 4 ()) 0 367 ())) ('h5global.eq.170'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.170' (VARIABLE (INTEGER 4 ()) 0 368 ())) (
-'h5global.eq.171' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.171' (VARIABLE (
-INTEGER 4 ()) 0 369 ())) ('h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.172' (VARIABLE (INTEGER 4 ()) 0 370 ())) ('h5global.eq.173'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.173' (VARIABLE (INTEGER 4 ()) 0 371 ())) (
-'h5global.eq.174' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.174' (VARIABLE (
-INTEGER 4 ()) 0 372 ())) ('h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.175' (VARIABLE (INTEGER 4 ()) 0 373 ())) ('h5global.eq.176'
-(VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.176' (VARIABLE (INTEGER 4 ()) 0 374 ())) (
-'h5global.eq.177' (VARIABLE (INTEGER 4 ()) 0 189 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.177' (VARIABLE (
-INTEGER 4 ()) 0 375 ())) ('h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0
-189 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.178' (VARIABLE (INTEGER 4 ()) 0 376 ())) ('h5global.eq.179'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.179' (VARIABLE (INTEGER 4 ()) 0 377 ())) (
-'h5global.eq.180' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.180' (VARIABLE (
-INTEGER 4 ()) 0 378 ())) ('h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.181' (VARIABLE (INTEGER 4 ()) 0 379 ())) ('h5global.eq.182'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.182' (VARIABLE (INTEGER 4 ()) 0 380 ())) (
-'h5global.eq.183' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.183' (VARIABLE (
-INTEGER 4 ()) 0 381 ())) ('h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.184' (VARIABLE (INTEGER 4 ()) 0 382 ())) ('h5global.eq.185'
-(VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.185' (VARIABLE (INTEGER 4 ()) 0 383 ())) (
-'h5global.eq.186' (VARIABLE (INTEGER 4 ()) 0 186 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.186' (VARIABLE (
-INTEGER 4 ()) 0 384 ())) ('h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0
-186 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.187' (VARIABLE (INTEGER 4 ()) 0 385 ())) ('h5global.eq.188'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '18') 1)))) 'h5global.eq.188' (VARIABLE (INTEGER 4 ()) 0 386 ())) (
-'h5global.eq.189' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '17') 1)))) 'h5global.eq.189' (VARIABLE (
-INTEGER 4 ()) 0 387 ())) ('h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '16') 1))))
-'h5global.eq.190' (VARIABLE (INTEGER 4 ()) 0 388 ())) ('h5global.eq.191'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '15') 1)))) 'h5global.eq.191' (VARIABLE (INTEGER 4 ()) 0 389 ())) (
-'h5global.eq.192' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '14') 1)))) 'h5global.eq.192' (VARIABLE (
-INTEGER 4 ()) 0 390 ())) ('h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '13') 1))))
-'h5global.eq.193' (VARIABLE (INTEGER 4 ()) 0 391 ())) ('h5global.eq.194'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '12') 1)))) 'h5global.eq.194' (VARIABLE (INTEGER 4 ()) 0 392 ())) (
-'h5global.eq.195' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '11') 1)))) 'h5global.eq.195' (VARIABLE (
-INTEGER 4 ()) 0 393 ())) ('h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '10') 1))))
-'h5global.eq.196' (VARIABLE (INTEGER 4 ()) 0 394 ())) ('h5global.eq.197'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '9') 1)))) 'h5global.eq.197' (VARIABLE (INTEGER 4 ()) 0 395 ())) (
-'h5global.eq.198' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '8') 1)))) 'h5global.eq.198' (VARIABLE (
-INTEGER 4 ()) 0 396 ())) ('h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '7') 1))))
-'h5global.eq.199' (VARIABLE (INTEGER 4 ()) 0 397 ())) ('h5global.eq.200'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '6') 1)))) 'h5global.eq.200' (VARIABLE (INTEGER 4 ()) 0 398 ())) (
-'h5global.eq.201' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '5') 1)))) 'h5global.eq.201' (VARIABLE (
-INTEGER 4 ()) 0 399 ())) ('h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.202' (VARIABLE (INTEGER 4 ()) 0 400 ())) ('h5global.eq.203'
-(VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.203' (VARIABLE (INTEGER 4 ()) 0 401 ())) (
-'h5global.eq.204' (VARIABLE (INTEGER 4 ()) 0 193 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.204' (VARIABLE (
-INTEGER 4 ()) 0 402 ())) ('h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0
-193 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.205' (VARIABLE (INTEGER 4 ()) 0 403 ())) ('h5global.eq.206'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '17') 1)))) 'h5global.eq.206' (VARIABLE (INTEGER 4 ()) 0 404 ())) (
-'h5global.eq.207' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '16') 1)))) 'h5global.eq.207' (VARIABLE (
-INTEGER 4 ()) 0 405 ())) ('h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '15') 1))))
-'h5global.eq.208' (VARIABLE (INTEGER 4 ()) 0 406 ())) ('h5global.eq.209'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '14') 1)))) 'h5global.eq.209' (VARIABLE (INTEGER 4 ()) 0 407 ())) (
-'h5global.eq.210' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '13') 1)))) 'h5global.eq.210' (VARIABLE (
-INTEGER 4 ()) 0 408 ())) ('h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '12') 1))))
-'h5global.eq.211' (VARIABLE (INTEGER 4 ()) 0 409 ())) ('h5global.eq.212'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '11') 1)))) 'h5global.eq.212' (VARIABLE (INTEGER 4 ()) 0 410 ())) (
-'h5global.eq.213' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '10') 1)))) 'h5global.eq.213' (VARIABLE (
-INTEGER 4 ()) 0 411 ())) ('h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '9') 1))))
-'h5global.eq.214' (VARIABLE (INTEGER 4 ()) 0 412 ())) ('h5global.eq.215'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '8') 1)))) 'h5global.eq.215' (VARIABLE (INTEGER 4 ()) 0 413 ())) (
-'h5global.eq.216' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '7') 1)))) 'h5global.eq.216' (VARIABLE (
-INTEGER 4 ()) 0 414 ())) ('h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '6') 1))))
-'h5global.eq.217' (VARIABLE (INTEGER 4 ()) 0 415 ())) ('h5global.eq.218'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '5') 1)))) 'h5global.eq.218' (VARIABLE (INTEGER 4 ()) 0 416 ())) (
-'h5global.eq.219' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '4') 1)))) 'h5global.eq.219' (VARIABLE (
-INTEGER 4 ()) 0 417 ())) ('h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0
-184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '3') 1))))
-'h5global.eq.220' (VARIABLE (INTEGER 4 ()) 0 418 ())) ('h5global.eq.221'
-(VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1)))) 'h5global.eq.221' (VARIABLE (INTEGER 4 ()) 0 419 ())) (
-'h5global.eq.222' (VARIABLE (INTEGER 4 ()) 0 184 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '1') 1)))) 'h5global.eq.222' (VARIABLE (
-INTEGER 4 ()) 0 420 ())) ('h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '4') 1))))
-'h5global.eq.223' (VARIABLE (INTEGER 4 ()) 0 421 ())) ('h5global.eq.224'
-(VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '3') 1)))) 'h5global.eq.224' (VARIABLE (INTEGER 4 ()) 0 422 ())) (
-'h5global.eq.225' (VARIABLE (INTEGER 4 ()) 0 191 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '2') 1)))) 'h5global.eq.225' (VARIABLE (
-INTEGER 4 ()) 0 423 ())) ('h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0
-191 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1') 1))))
-'h5global.eq.226' (VARIABLE (INTEGER 4 ()) 0 424 ())) ('h5global.eq.227'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '13') 1)))) 'h5global.eq.227' (VARIABLE (INTEGER 4 ()) 0 425 ())) (
-'h5global.eq.228' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '12') 1)))) 'h5global.eq.228' (VARIABLE (
-INTEGER 4 ()) 0 426 ())) ('h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '11') 1))))
-'h5global.eq.229' (VARIABLE (INTEGER 4 ()) 0 427 ())) ('h5global.eq.230'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '10') 1)))) 'h5global.eq.230' (VARIABLE (INTEGER 4 ()) 0 428 ())) (
-'h5global.eq.231' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '9') 1)))) 'h5global.eq.231' (VARIABLE (
-INTEGER 4 ()) 0 429 ())) ('h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '8') 1))))
-'h5global.eq.232' (VARIABLE (INTEGER 4 ()) 0 430 ())) ('h5global.eq.233'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1)))) 'h5global.eq.233' (VARIABLE (INTEGER 4 ()) 0 431 ())) (
-'h5global.eq.234' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) 'h5global.eq.234' (VARIABLE (
-INTEGER 4 ()) 0 432 ())) ('h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))
-'h5global.eq.235' (VARIABLE (INTEGER 4 ()) 0 433 ())) ('h5global.eq.236'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) 'h5global.eq.236' (VARIABLE (INTEGER 4 ()) 0 434 ())) (
-'h5global.eq.237' (VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) 'h5global.eq.237' (VARIABLE (
-INTEGER 4 ()) 0 435 ())) ('h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0
-195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))
-'h5global.eq.238' (VARIABLE (INTEGER 4 ()) 0 436 ())) ('h5global.eq.239'
-(VARIABLE (INTEGER 4 ()) 0 195 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) 'h5global.eq.239' (VARIABLE (INTEGER 4 ()) 0 437 ())))
-
-(191 'floating_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1
-EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '4'))
-0 () ())
-438 '__convert_i4_i8' '(intrinsic)' 1 ((PROCEDURE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN INTRINSIC FUNCTION ELEMENTAL PURE) (INTEGER 8 ()) 0
-0 () () 0 () ())
-439 'fortran_integer' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-440 'fortran_double' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-441 'fortran_integer_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-442 'fortran_integer_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-443 'fortran_real_16' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-444 'fortran_real_12' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'16') () 0 () ())
-445 'fortran_real' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-446 'fortran_integer_2' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-447 'h5_dble_interface' 'h5_dble_interface' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-448 'fortran_real_8' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-384 'h5_index_name_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-385 'h5_index_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-382 'h5_index_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-383 'h5_index_crt_order_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-380 'h5_iter_inc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-377 'h5_iter_n_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-378 'h5_iter_native_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-379 'h5_iter_dec_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-449 'h5_integer_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0')
-() 0 () ())
-450 'fortran_real_4' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-451 'fortran_integer_1' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1')
-() 0 () ())
-452 'h5_real_kind' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-198 'h5_szip_nn_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-199 'h5_szip_ec_om_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-453 'h5acreate_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 454 0 (455 456 457 458
-459 460 461 462 463 464) () 0 () ())
-465 'h5aclose_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 466 0 (467 468) () 0 () ())
-469 'h5a' 'h5a' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-470 'h5acreate_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 471 0 (472 473 474 475 476
-477 478 479) () 0 () ())
-381 'h5_iter_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-480 'h5adelete_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 481 0 (482 483 484 485
-486) () 0 () ())
-487 'h5adelete_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 488 0 (489 490 491 492
-493 494 495) () 0 () ())
-496 'h5aexists_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 497 0 (498 499 500 501
-502 503) () 0 () ())
-504 'h5aexists_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 505 0 (506 507 508 509) () 0 () ())
-510 'h5aget_info_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 511 0 (512
-513 514 515 516 517 518 519 520 521 522) () 0 () ())
-523 'h5aget_info_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 524 0 (525 526 527 528 529 530) () 0 () ())
-531 'h5aget_info_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 532 0 (533
-534 535 536 537 538 539 540 541) () 0 () ())
-542 'h5aget_create_plist_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 543 0 (544 545 546) () 0 ()
-())
-547 'h5adelete_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 548 0 (549 550 551) () 0 () ())
-552 'floating_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4')
-() 0 () ())
-553 'h5aget_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 554 0 (555 556 557 558) () 0 () ())
-559 'h5aget_space_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 560 0 (561 562 563) () 0 () ())
-564 'h5aget_num_attrs_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 565 0 (566 567 568) () 0 () ())
-569 'h5aget_name_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 570 0 (571
-572 573 574 575 576 577 578 579) () 0 () ())
-580 'h5aopen_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 581 0 (582 583 584 585
-586 587 588) () 0 () ())
-589 'h5aopen_by_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 590 0 (591 592 593 594
-595 596 597 598 599) () 0 () ())
-600 'h5aget_type_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 601 0 (602 603 604) () 0 () ())
-605 'h5aopen_idx_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 606 0 (607 608 609 610) () 0 () ())
-611 'h5aopen_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 612 0 (613 614 615 616 617) ()
-0 () ())
-15 'h5aread_char_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 618 0 (619 620 621 622 623) () 0 () ())
-14 'h5aread_char_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 624 0 (625 626 627 628 629) () 0 () ())
-16 'h5aread_char_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 630 0 (631 632 633 634 635) () 0 () ())
-12 'h5aread_char_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 636 0 (637 638 639 640 641) () 0 () ())
-11 'h5aread_char_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 642 0 (643 644 645 646 647) () 0 () ())
-13 'h5aread_char_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 648 0 (649 650 651 652 653) () 0 () ())
-31 'h5aread_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 654 0 (655 656 657 658 659)
-() 0 () ())
-32 'h5aread_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 660 0 (661 662 663 664 665)
-() 0 () ())
-17 'h5aread_char_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 666 0 (667 668 669 670 671) () 0 () ())
-10 'h5aread_char_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 672 0 (673 674 675 676 677) () 0 () ())
-27 'h5aread_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 678 0 (679 680 681 682 683)
-() 0 () ())
-28 'h5aread_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 684 0 (685 686 687 688 689)
-() 0 () ())
-29 'h5aread_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 690 0 (691 692 693 694 695)
-() 0 () ())
-33 'h5aread_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 696 0 (697
-698 699 700 701) () 0 () ())
-26 'h5aread_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 702 0 (703 704 705 706 707)
-() 0 () ())
-30 'h5aread_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 708 0 (709 710 711 712 713)
-() 0 () ())
-23 'h5aread_integer_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 714 0 (715 716 717 718 719) () 0 () ())
-24 'h5aread_integer_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 720 0 (721 722 723 724 725) () 0 () ())
-21 'h5aread_integer_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 726 0 (727 728 729 730 731) () 0 () ())
-19 'h5aread_integer_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 732 0 (733 734 735 736 737) () 0 () ())
-25 'h5aread_integer_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 738 0 (739 740 741 742 743)
-() 0 () ())
-18 'h5aread_integer_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 744 0 (745 746 747 748 749) () 0 () ())
-8 'h5aread_real_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 750 0 (751 752 753 754 755) () 0 () ())
-7 'h5aread_real_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 756 0 (757 758 759 760 761) () 0 () ())
-20 'h5aread_integer_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 762 0 (763 764 765 766 767) () 0 () ())
-22 'h5aread_integer_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 768 0 (769 770 771 772 773) () 0 () ())
-4 'h5aread_real_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 774 0 (775 776 777 778 779) () 0 () ())
-5 'h5aread_real_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 780 0 (781 782 783 784 785) () 0 () ())
-9 'h5aread_real_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 786 0 (787 788 789 790 791) () 0 () ())
-2 'h5aread_real_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 792 0 (793 794 795 796 797) () 0 () ())
-798 'h5arename_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 799 0 (800 801 802 803) () 0 () ())
-804 'h5arename_by_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 805 0 (806 807 808 809
-810 811) () 0 () ())
-47 'h5awrite_char_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 812 0 (813 814 815 816 817) () 0 () ())
-44 'h5awrite_char_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 818 0 (819 820 821 822 823) () 0 () ())
-45 'h5awrite_char_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 824 0 (825 826 827 828 829) () 0 () ())
-42 'h5awrite_char_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 830 0 (831 832 833 834 835) () 0 () ())
-43 'h5awrite_char_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 836 0 (837 838 839 840 841) () 0 () ())
-46 'h5awrite_char_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 842 0 (843 844 845 846 847) () 0 () ())
-62 'h5awrite_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 848 0 (849 850 851 852 853)
-() 0 () ())
-63 'h5awrite_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 854 0 (855 856 857 858 859)
-() 0 () ())
-61 'h5awrite_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 860 0 (861 862 863 864 865)
-() 0 () ())
-64 'h5awrite_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 866 0 (867 868 869 870 871)
-() 0 () ())
-58 'h5awrite_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 872 0 (873 874 875 876 877)
-() 0 () ())
-59 'h5awrite_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 878 0 (879 880 881 882 883)
-() 0 () ())
-65 'h5awrite_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 884 0 (885
-886 887 888 889) () 0 () ())
-60 'h5awrite_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 890 0 (891 892 893 894 895)
-() 0 () ())
-56 'h5awrite_integer_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 896 0 (897 898 899 900 901) () 0 () ())
-54 'h5awrite_integer_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 902 0 (903 904 905 906 907) () 0 () ())
-55 'h5awrite_integer_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 908 0 (909 910 911 912 913) () 0 () ())
-53 'h5awrite_integer_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 914 0 (915 916 917 918 919) () 0 () ())
-49 'h5awrite_char_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 920 0 (921 922 923 924 925) () 0 () ())
-48 'h5awrite_char_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 926 0 (927 928 929 930 931) () 0 () ())
-3 'h5aread_real_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 932 0 (933 934 935 936 937) () 0 () ())
-50 'h5awrite_integer_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 938 0 (939 940 941 942 943) () 0 () ())
-40 'h5awrite_real_1' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 944 0 (945 946 947 948 949) () 0 () ())
-39 'h5awrite_real_2' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 950 0 (951 952 953 954 955) () 0 () ())
-35 'h5awrite_real_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 956 0 (957 958 959 960 961) () 0 () ())
-36 'h5awrite_real_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 962 0 (963 964 965 966 967) () 0 () ())
-37 'h5awrite_real_4' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 968 0 (969 970 971 972 973) () 0 () ())
-38 'h5awrite_real_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 974 0 (975 976 977 978 979) () 0 () ())
-57 'h5awrite_integer_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 980 0 (981 982 983 984 985)
-() 0 () ())
-51 'h5awrite_integer_6' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 986 0 (987 988 989 990 991) () 0 () ())
-52 'h5awrite_integer_5' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 992 0 (993 994 995 996 997) () 0 () ())
-41 'h5awrite_real_scalar' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 998 0 (999 1000 1001 1002 1003) () 0 ()
-())
-1004 'h5check_version_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1005 0 (1006 1007 1008 1009)
-() 0 () ())
-1010 'h5d' 'h5d' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-1011 'h5close_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1012 0 (1013) () 0 () ())
-360 'h5d_alloc_time_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-357 'h5d_alloc_time_incr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-361 'h5d_alloc_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-344 'h5d_chunk_cache_nbytes_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-343 'h5d_chunk_cache_w0_dflt_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-345 'h5d_chunk_cache_nslots_dflt_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-362 'h5d_chunked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-358 'h5d_alloc_time_late_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-364 'h5d_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-351 'h5d_fill_time_alloc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-363 'h5d_contiguous_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-359 'h5d_alloc_time_early_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-34 'h5awrite_real_7' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1014 0 (1015 1016 1017 1018 1019) () 0 () ())
-6 'h5aread_real_3' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1020 0 (1021 1022 1023 1024 1025) () 0 () ())
-347 'h5d_fill_value_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-348 'h5d_fill_value_undefined_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-349 'h5d_fill_value_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-350 'h5d_fill_time_never_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-180 'h5d_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-353 'h5d_space_sts_allocated_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1026 'h5d_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'22') () 0 () ())
-356 'h5d_space_sts_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-354 'h5d_space_sts_part_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-1027 'h5dcreate_anon_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1028 0 (1029 1030 1031
-1032 1033 1034 1035) () 0 () ())
-1036 'h5dcreate_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1037 0 (1038 1039 1040 1041
-1042 1043 1044 1045 1046) () 0 () ())
-1047 'h5dclose_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1048 0 (1049 1050) () 0 () ())
-355 'h5d_space_sts_not_allocated_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-346 'h5d_fill_value_user_defined_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-70 'h5dfill_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1051 0 (1052 1053 1054 1055)
-() 0 () ())
-69 'h5dfill_integer' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1056 0 (1057 1058 1059 1060) () 0 () ())
-68 'h5dfill_real' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1061 0 (1062 1063 1064 1065) () 0 () ())
-67 'h5dfill_char' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1066 0 (1067 1068 1069 1070) () 0 () ())
-1071 'h5dget_space_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1072 0 (1073 1074 1075) () 0 () ())
-1076 'h5dget_create_plist_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1077 0 (1078 1079 1080) () 0
-() ())
-1081 'h5dget_type_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1082 0 (1083 1084 1085) () 0 () ())
-1086 'h5dget_storage_size_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1087 0 (1088 1089 1090) () 0
-() ())
-83 'h5dread_char_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1091 0 (1092 1093 1094 1095
-1096 1097 1098 1099) () 0 () ())
-84 'h5dread_char_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1100 0 (1101 1102 1103 1104
-1105 1106 1107 1108) () 0 () ())
-85 'h5dread_char_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1109 0 (1110 1111 1112 1113
-1114 1115 1116 1117) () 0 () ())
-1118 'h5dopen_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1119 0 (1120 1121 1122 1123
-1124) () 0 () ())
-1125 'h5dont_atexit_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1126 0 (1127) () 0 () ())
-1128 'h5dget_space_status_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1129 0 (1130 1131 1132) () 0
-() ())
-79 'h5dread_char_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1133 0 (1134 1135 1136 1137
-1138 1139 1140 1141) () 0 () ())
-80 'h5dread_char_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1142 0 (1143 1144 1145 1146
-1147 1148 1149 1150) () 0 () ())
-102 'h5dread_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1151 0 (
-1152 1153 1154 1155 1156 1157 1158 1159) () 0 () ())
-103 'h5dread_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1160 0 (
-1161 1162 1163 1164 1165 1166 1167 1168) () 0 () ())
-100 'h5dread_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1169 0 (
-1170 1171 1172 1173 1174 1175 1176 1177) () 0 () ())
-101 'h5dread_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1178 0 (
-1179 1180 1181 1182 1183 1184 1185 1186) () 0 () ())
-86 'h5dread_char_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1187 0 (1188 1189 1190
-1191 1192 1193 1194 1195) () 0 () ())
-81 'h5dread_char_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1196 0 (1197 1198 1199 1200
-1201 1202 1203 1204) () 0 () ())
-98 'h5dread_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1205 0 (
-1206 1207 1208 1209 1210 1211 1212 1213) () 0 () ())
-99 'h5dread_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1214 0 (
-1215 1216 1217 1218 1219 1220 1221 1222) () 0 () ())
-104 'h5dread_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ())
-1223 0 (1224 1225 1226 1227 1228 1229 1230 1231) () 0 () ())
-97 'h5dread_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1232 0 (
-1233 1234 1235 1236 1237 1238 1239 1240) () 0 () ())
-92 'h5dread_integer_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1241 0 (1242 1243 1244
-1245 1246 1247 1248 1249) () 0 () ())
-93 'h5dread_integer_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1250 0 (1251 1252 1253
-1254 1255 1256 1257 1258) () 0 () ())
-90 'h5dread_integer_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1259 0 (1260 1261 1262
-1263 1264 1265 1266 1267) () 0 () ())
-88 'h5dread_integer_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1268 0 (1269 1270 1271
-1272 1273 1274 1275 1276) () 0 () ())
-89 'h5dread_integer_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1277 0 (1278 1279 1280
-1281 1282 1283 1284 1285) () 0 () ())
-91 'h5dread_integer_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1286 0 (1287 1288 1289
-1290 1291 1292 1293 1294) () 0 () ())
-82 'h5dread_char_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1295 0 (1296 1297 1298 1299
-1300 1301 1302 1303) () 0 () ())
-77 'h5dread_real_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1304 0 (1305 1306 1307 1308
-1309 1310 1311 1312) () 0 () ())
-94 'h5dread_integer_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1313 0 (
-1314 1315 1316 1317 1318 1319 1320 1321) () 0 () ())
-75 'h5dread_real_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1322 0 (1323 1324 1325 1326
-1327 1328 1329 1330) () 0 () ())
-73 'h5dread_real_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1331 0 (1332 1333 1334 1335
-1336 1337 1338 1339) () 0 () ())
-72 'h5dread_real_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1340 0 (1341 1342 1343 1344
-1345 1346 1347 1348) () 0 () ())
-71 'h5dread_real_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1349 0 (1350 1351 1352 1353
-1354 1355 1356 1357) () 0 () ())
-74 'h5dread_real_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1358 0 (1359 1360 1361 1362
-1363 1364 1365 1366) () 0 () ())
-76 'h5dread_real_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1367 0 (1368 1369 1370 1371
-1372 1373 1374 1375) () 0 () ())
-87 'h5dread_integer_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1376 0 (1377 1378 1379
-1380 1381 1382 1383 1384) () 0 () ())
-1385 'h5dget_access_plist_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1386 0 (1387 1388 1389) () 0
-() ())
-96 'h5dread_reference_obj' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1390 0 (
-1391 1392 1393 1394 1395 1396 1397 1398) () 0 () ())
-95 'h5dread_reference_dsetreg' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1399 0 (
-1400 1401 1402 1403 1404 1405 1406 1407) () 0 () ())
-78 'h5dread_real_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1408 0 (1409 1410 1411
-1412 1413 1414 1415 1416) () 0 () ())
-352 'h5d_fill_time_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-106 'h5dread_vl_real' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1417 0 (1418 1419 1420
-1421 1422 1423 1424 1425 1426) () 0 () ())
-105 'h5dread_vl_string' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1427 0 (1428 1429 1430
-1431 1432 1433 1434 1435 1436) () 0 () ())
-107 'h5dread_vl_integer' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1437 0 (1438 1439 1440
-1441 1442 1443 1444 1445 1446) () 0 () ())
-120 'h5dwrite_char_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1447 0 (1448 1449 1450
-1451 1452 1453 1454 1455) () 0 () ())
-117 'h5dwrite_char_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1456 0 (1457 1458 1459
-1460 1461 1462 1463 1464) () 0 () ())
-118 'h5dwrite_char_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1465 0 (1466 1467 1468
-1469 1470 1471 1472 1473) () 0 () ())
-116 'h5dwrite_char_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1474 0 (1475 1476 1477
-1478 1479 1480 1481 1482) () 0 () ())
-119 'h5dwrite_char_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1483 0 (1484 1485 1486
-1487 1488 1489 1490 1491) () 0 () ())
-140 'h5dwrite_double_1' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1492 0 (
-1493 1494 1495 1496 1497 1498 1499 1500) () 0 () ())
-123 'h5dwrite_char_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1501 0 (
-1502 1503 1504 1505 1506 1507 1508 1509) () 0 () ())
-121 'h5dwrite_char_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1510 0 (1511 1512 1513
-1514 1515 1516 1517 1518) () 0 () ())
-137 'h5dwrite_double_4' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1519 0 (
-1520 1521 1522 1523 1524 1525 1526 1527) () 0 () ())
-135 'h5dwrite_double_6' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1528 0 (
-1529 1530 1531 1532 1533 1534 1535 1536) () 0 () ())
-141 'h5dwrite_double_scalar' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ())
-1537 0 (1538 1539 1540 1541 1542 1543 1544 1545) () 0 () ())
-134 'h5dwrite_double_7' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1546 0 (
-1547 1548 1549 1550 1551 1552 1553 1554) () 0 () ())
-136 'h5dwrite_double_5' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1555 0 (
-1556 1557 1558 1559 1560 1561 1562 1563) () 0 () ())
-138 'h5dwrite_double_3' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1564 0 (
-1565 1566 1567 1568 1569 1570 1571 1572) () 0 () ())
-139 'h5dwrite_double_2' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1573 0 (
-1574 1575 1576 1577 1578 1579 1580 1581) () 0 () ())
-122 'h5dwrite_char_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1582 0 (1583 1584 1585
-1586 1587 1588 1589 1590) () 0 () ())
-1591 'h5dvlen_get_max_len_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1592 0 (1593 1594 1595 1596
-1597) () 0 () ())
-129 'h5dwrite_integer_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1598 0 (1599 1600 1601
-1602 1603 1604 1605 1606) () 0 () ())
-130 'h5dwrite_integer_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1607 0 (1608 1609 1610
-1611 1612 1613 1614 1615) () 0 () ())
-125 'h5dwrite_integer_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1616 0 (1617 1618 1619
-1620 1621 1622 1623 1624) () 0 () ())
-126 'h5dwrite_integer_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1625 0 (1626 1627 1628
-1629 1630 1631 1632 1633) () 0 () ())
-127 'h5dwrite_integer_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1634 0 (1635 1636 1637
-1638 1639 1640 1641 1642) () 0 () ())
-128 'h5dwrite_integer_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1643 0 (1644 1645 1646
-1647 1648 1649 1650 1651) () 0 () ())
-131 'h5dwrite_integer_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1652 0 (
-1653 1654 1655 1656 1657 1658 1659 1660) () 0 () ())
-114 'h5dwrite_real_1' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1661 0 (1662 1663 1664
-1665 1666 1667 1668 1669) () 0 () ())
-109 'h5dwrite_real_6' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1670 0 (1671 1672 1673
-1674 1675 1676 1677 1678) () 0 () ())
-110 'h5dwrite_real_5' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1679 0 (1680 1681 1682
-1683 1684 1685 1686 1687) () 0 () ())
-111 'h5dwrite_real_4' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1688 0 (1689 1690 1691
-1692 1693 1694 1695 1696) () 0 () ())
-112 'h5dwrite_real_3' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1697 0 (1698 1699 1700
-1701 1702 1703 1704 1705) () 0 () ())
-108 'h5dwrite_real_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1706 0 (1707 1708 1709
-1710 1711 1712 1713 1714) () 0 () ())
-113 'h5dwrite_real_2' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1715 0 (1716 1717 1718
-1719 1720 1721 1722 1723) () 0 () ())
-124 'h5dwrite_integer_7' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1724 0 (1725 1726 1727
-1728 1729 1730 1731 1732) () 0 () ())
-132 'h5dwrite_reference_dsetreg' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1733 0 (
-1734 1735 1736 1737 1738 1739 1740 1741) () 0 () ())
-133 'h5dwrite_reference_obj' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1742 0 (
-1743 1744 1745 1746 1747 1748 1749 1750) () 0 () ())
-142 'h5dwrite_vl_string' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1751 0 (1752 1753 1754
-1755 1756 1757 1758 1759 1760) () 0 () ())
-143 'h5dwrite_vl_real' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1761 0 (1762 1763 1764
-1765 1766 1767 1768 1769 1770) () 0 () ())
-144 'h5dwrite_vl_integer' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1771 0 (1772 1773 1774
-1775 1776 1777 1778 1779 1780) () 0 () ())
-1781 'h5eclear_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1782 0 (1783) () 0 () ())
-1784 'h5eprint_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1785 0 (1786 1787) () 0 () ())
-1788 'h5eget_minor_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1789 0 (1790 1791 1792) () 0 () ())
-1793 'h5eget_major_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1794 0 (1795 1796 1797 1798) () 0 () ())
-1799 'h5eset_auto_f' 'h5e' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1800 0 (1801 1802) () 0 () ())
-400 'h5f_acc_excl_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-399 'h5f_acc_debug_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-403 'h5f_acc_rdwr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-402 'h5f_acc_rdonly_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-401 'h5f_acc_trunc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-393 'h5f_close_strong_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-394 'h5f_close_semi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-396 'h5f_close_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1803 'h5f' 'h5f' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-1804 'h5e' 'h5e' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-387 'h5f_libver_earliest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1805 'h5f_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'19') () 0 () ())
-193 'h5f_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '19')) 0 () ())
-388 'h5f_obj_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-391 'h5f_obj_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-389 'h5f_obj_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-386 'h5f_libver_latest_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-390 'h5f_obj_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-398 'h5f_scope_local_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-397 'h5f_scope_global_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-392 'h5f_obj_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-395 'h5f_close_weak_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-115 'h5dwrite_real_scalar' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1806 0 (
-1807 1808 1809 1810 1811 1812 1813 1814) () 0 () ())
-1815 'h5fcreate_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1816 0 (1817 1818 1819 1820
-1821 1822) () 0 () ())
-185 'h5fd_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '11')) 0 () ())
-330 'h5fd_family_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1823 'h5fd_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'11') () 0 () ())
-183 'h5fd_hid_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-331 'h5fd_core_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-337 'h5fd_mem_btree_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-329 'h5fd_log_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1824 'h5fd_hid_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-335 'h5fd_mem_gheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-334 'h5fd_mem_lheap_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-336 'h5fd_mem_draw_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-340 'h5fd_mem_nolist_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-341 'h5fd_mpio_collective_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-338 'h5fd_mem_super_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-328 'h5fd_mpio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-333 'h5fd_mem_ohdr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-332 'h5fd_mem_ntypes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-339 'h5fd_mem_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-327 'h5fd_multi_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-326 'h5fd_sec2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1825 'h5fflush_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1826 0 (1827 1828 1829) () 0 () ())
-325 'h5fd_stdio_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1830 'h5fget_filesize_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1831 0 (1832 1833 1834) () 0 () ())
-1835 'h5fget_freespace_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1836 0 (1837 1838 1839) () 0 () ())
-1840 'h5fget_obj_count_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1841 0 (1842 1843 1844 1845) () 0 () ())
-1846 'h5fget_name_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1847 0 (1848 1849 1850 1851) () 0 () ())
-1852 'h5fis_hdf5_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1853 0 (1854 1855 1856) () 0 () ())
-1857 'h5fget_obj_ids_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1858 0 (1859 1860 1861
-1862 1863 1864) () 0 () ())
-1865 'h5fget_create_plist_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1866 0 (1867 1868 1869) () 0
-() ())
-1870 'h5freopen_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1871 0 (1872 1873 1874) () 0 () ())
-1875 'h5funmount_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1876 0 (1877 1878 1879) () 0 () ())
-1880 'h5fortran_types' 'h5fortran_types' 1 ((MODULE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-1881 'h5g' 'h5g' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-189 'h5g_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '12')) 0 () ())
-1882 'h5g_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'12') () 0 () ())
-375 'h5g_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-372 'h5g_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-371 'h5g_link_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-374 'h5g_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-366 'h5g_storage_type_compact_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-369 'h5g_link_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-370 'h5g_link_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1883 'h5fopen_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1884 0 (1885 1886 1887 1888
-1889) () 0 () ())
-1890 'h5fmount_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1891 0 (1892 1893 1894 1895
-1896) () 0 () ())
-1897 'h5fget_access_plist_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1898 0 (1899 1900 1901) () 0
-() ())
-342 'h5fd_mpio_independent_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1902 'h5fclose_f' 'h5f' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1903 0 (1904 1905) () 0 () ())
-367 'h5g_storage_type_symbol_table_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-368 'h5g_storage_type_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1906 'h5garbage_collect_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1907 0 (1908) () 0 () ())
-376 'h5g_unknown_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1909 'h5gcreate_anon_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1910 0 (1911 1912 1913
-1914 1915) () 0 () ())
-1916 'h5gclose_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1917 0 (1918 1919) () 0 () ())
-186 'h5generic_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1
-EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '9'))
-0 () ())
-1920 'h5gcreate_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1921 0 (1922 1923 1924 1925
-1926 1927 1928 1929) () 0 () ())
-1930 'h5gget_create_plist_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1931 0 (1932 1933 1934) () 0
-() ())
-1935 'h5gget_info_by_name_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1936 0 (
-1937 1938 1939 1940 1941 1942 1943 1944) () 0 () ())
-1945 'h5gget_info_by_idx_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1946 0 (
-1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957) () 0 () ())
-1958 'h5gget_linkval_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1959 0 (1960 1961 1962 1963 1964) () 0 ()
-())
-1965 'h5gget_info_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 1966 0 (1967 1968 1969 1970
-1971 1972) () 0 () ())
-1973 'h5gget_obj_info_idx_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1974 0 (1975 1976 1977 1978
-1979 1980) () 0 () ())
-1981 'h5gget_comment_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 1982 0 (1983 1984 1985 1986 1987) () 0 ()
-())
-1988 'h5get_libversion_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 1989 0 (1990 1991 1992 1993)
-() 0 () ())
-1994 'h5generic_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '9')
-() 0 () ())
-373 'h5g_type_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-1995 'h5glink_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 1996 0 (1997 1998 1999 2000 2001) () 0 () ())
-2002 'h5gmove2_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2003 0 (2004 2005 2006 2007 2008) () 0 () ())
-2009 'h5global' 'h5global' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 () ())
-2010 'h5gopen_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2011 0 (2012 2013 2014 2015
-2016) () 0 () ())
-2017 'h5gn_members_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2018 0 (2019 2020 2021 2022) () 0 () ())
-2023 'h5gmove_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2024 0 (2025 2026 2027 2028) () 0 () ())
-2029 'h5gset_comment_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2030 0 (2031 2032 2033 2034) () 0 () ())
-318 'h5i_badid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-319 'h5i_attr_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-321 'h5i_dataspace_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-320 'h5i_dataset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2035 'h5i' 'h5i' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-2036 'h5gunlink_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2037 0 (2038 2039 2040) () 0 () ())
-197 'h5i_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '7')) 0 () ())
-323 'h5i_group_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2041 'h5i_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '7')
-() 0 () ())
-324 'h5i_file_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2042 'h5iget_ref_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2043 0 (2044 2045 2046) () 0 () ())
-2047 'h5iget_name_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2048 0 (2049 2050 2051 2052 2053) () 0 () ())
-2054 'h5iget_file_id_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2055 0 (2056 2057 2058) () 0 () ())
-2059 'h5idec_ref_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2060 0 (2061 2062 2063) () 0 () ())
-322 'h5i_datatype_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2064 'h5glink2_f' 'h5g' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2065 0 (2066 2067 2068 2069 2070 2071) () 0 ()
-())
-2072 'h5iinc_ref_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2073 0 (2074 2075 2076) () 0 () ())
-2077 'h5iget_type_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2078 0 (2079 2080 2081) () 0 () ())
-2082 'h5l_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '6')
-() 0 () ())
-187 'h5l_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '6')) 0 () ())
-2083 'h5l' 'h5l' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-317 'h5l_type_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-316 'h5l_type_hard_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-315 'h5l_type_soft_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-314 'h5l_type_external_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-313 'h5l_same_loc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2084 'h5lcopy_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2085 0 (2086 2087 2088 2089
-2090 2091 2092) () 0 () ())
-312 'h5l_link_class_t_vers_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2093 'h5lcreate_soft_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2094 0 (2095 2096 2097
-2098 2099 2100) () 0 () ())
-2101 'h5lcreate_hard_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2102 0 (2103 2104 2105
-2106 2107 2108 2109) () 0 () ())
-2110 'h5ldelete_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2111 0 (2112 2113 2114 2115)
-() 0 () ())
-2116 'h5lexists_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2117 0 (2118 2119 2120 2121
-2122) () 0 () ())
-2123 'h5ldelete_by_idx_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2124 0 (2125 2126 2127
-2128 2129 2130 2131) () 0 () ())
-2132 'h5lcreate_external_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2133 0 (
-2134 2135 2136 2137 2138 2139 2140) () 0 () ())
-2141 'h5iis_valid_f' 'h5i' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2142 0 (2143 2144 2145) () 0 () ())
-2146 'h5lget_name_by_idx_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2147 0 (
-2148 2149 2150 2151 2152 2153 2154 2155 2156) () 0 () ())
-194 'h5lib_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-2157 'h5lis_registered_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2158 0 (2159 2160 2161) () 0 () ())
-2162 'h5lmove_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2163 0 (2164 2165 2166 2167
-2168 2169 2170) () 0 () ())
-2171 'h5lib_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-2172 'h5lib' 'h5lib' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-2173 'h5lget_info_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2174 0 (2175 2176 2177 2178
-2179 2180 2181 2182 2183 2184) () 0 () ())
-305 'h5o_copy_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-306 'h5o_copy_preserve_null_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-310 'h5o_copy_expand_soft_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-308 'h5o_copy_expand_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-309 'h5o_copy_expand_ext_link_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2185 'h5o' 'h5o' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-311 'h5o_copy_shallow_hierarchy_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-2186 'h5o_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'22') () 0 () ())
-188 'h5o_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '22')) 0 () ())
-295 'h5o_hdr_attr_crt_order_index_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-292 'h5o_hdr_all_flags_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-307 'h5o_copy_without_attr_flag_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-2187 'h5lget_info_by_idx_f' 'h5l' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2188 0 (
-2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201) () 0 ()
-())
-294 'h5o_hdr_attr_store_phase_cha_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-293 'h5o_hdr_store_times_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-297 'h5o_hdr_chunk0_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-302 'h5o_shmesg_dtype_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-301 'h5o_shmesg_fill_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-290 'h5o_shmesg_max_list_size_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-299 'h5o_shmesg_attr_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-298 'h5o_shmesg_all_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-304 'h5o_shmesg_none_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-291 'h5o_shmesg_max_nindexes_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-303 'h5o_shmesg_sdspace_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2202 'h5oopen_by_addr_f' 'h5o' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2203 0 (2204 2205 2206 2207) () 0 () ())
-2208 'h5oopen_f' 'h5o' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2209 0 (2210 2211 2212 2213
-2214) () 0 () ())
-2215 'h5olink_f' 'h5o' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2216 0 (2217 2218 2219 2220
-2221 2222) () 0 () ())
-275 'h5p_attribute_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-281 'h5p_dataset_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-287 'h5p_dataset_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-270 'h5p_crt_order_tracked_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-271 'h5p_crt_order_indexed_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2223 'h5p' 'h5p' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-278 'h5p_datatype_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-277 'h5p_datatype_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-286 'h5p_dataset_xfer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2224 'h5open_f' 'h5lib' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2225 0 (2226) () 0 () ())
-300 'h5o_shmesg_pline_flag_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-289 'h5p_file_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-288 'h5p_file_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-284 'h5p_default_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-190 'h5p_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '18')) 0 () ())
-196 'h5p_flags_int' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-2227 'h5p_flags_int_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-279 'h5p_group_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-280 'h5p_group_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-273 'h5p_link_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-274 'h5p_object_copy_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-283 'h5p_root_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-282 'h5p_object_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-272 'h5p_link_access_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2228 'h5p_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'18') () 0 () ())
-285 'h5p_file_mount_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-296 'h5o_hdr_attr_crt_order_track_f' 'h5global' 1 ((VARIABLE
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () ()
-0 () ())
-365 'h5g_storage_type_dense_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-66 'h5dset_extent_f' 'h5d' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2229 0 (2230 2231 2232) () 0 () ())
-2233 'h5pclose_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2234 0 (2235 2236) () 0 () ())
-2237 'h5pall_filters_avail_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2238 0 (2239 2240 2241) () 0
-() ())
-2242 'h5pclose_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2243 0 (2244 2245) () 0 () ())
-2246 'h5pcopy_prop_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2247 0 (2248 2249 2250 2251) () 0 () ())
-2252 'h5pcreate_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2253 0 (2254 2255 2256 2257) () 0 () ())
-2258 'h5pexist_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2259 0 (2260 2261 2262 2263) () 0 () ())
-2264 'h5pfill_value_defined_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2265 0 (2266 2267 2268) () 0
-() ())
-2269 'h5pget_alloc_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2270 0 (2271 2272 2273) () 0
-() ())
-2274 'h5pget_attr_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2275 0 (2276 2277 2278 2279)
-() 0 () ())
-2280 'h5pget_buffer_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2281 0 (2282 2283 2284) () 0 () ())
-2285 'h5pget_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2286 0 (2287 2288 2289 2290 2291 2292) ()
-0 () ())
-2293 'h5pget_btree_ratios_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2294 0 (2295 2296 2297 2298
-2299) () 0 () ())
-145 'h5pget_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2300 0 (2301 2302 2303 2304) () 0 () ())
-2305 'h5pget_attr_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2306 0 (2307 2308 2309) () 0
-() ())
-2310 'h5pget_alignment_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2311 0 (2312 2313 2314 2315) () 0 () ())
-2316 'h5pequal_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2317 0 (2318 2319 2320 2321) () 0 () ())
-2322 'h5pget_char_encoding_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2323 0 (2324 2325 2326) () 0
-() ())
-2327 'h5pget_class_name_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2328 0 (2329 2330 2331 2332)
-() 0 () ())
-2333 'h5pget_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2334 0 (2335 2336 2337) () 0 () ())
-2338 'h5pget_class_parent_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2339 0 (2340 2341 2342) () 0
-() ())
-2343 'h5pget_chunk_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2344 0 (2345 2346 2347 2348) () 0 () ())
-2349 'h5pget_chunk_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2350 0 (2351 2352 2353 2354
-2355) () 0 () ())
-2356 'h5pcreate_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2357 0 (2358 2359 2360) () 0 () ())
-2361 'h5pcopy_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2362 0 (2363 2364 2365) () 0 () ())
-2366 'h5pget_create_inter_group_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2367 0 (2368 2369 2370) () 0
-() ())
-2371 'h5pget_copy_object_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2372 0 (2373 2374 2375) () 0
-() ())
-2376 'h5pget_driver_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2377 0 (2378 2379 2380) () 0 () ())
-148 'h5pget_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2381 0 (2382 2383 2384 2385)
-() 0 () ())
-2386 'h5pget_est_link_info_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2387 0 (2388 2389 2390 2391)
-() 0 () ())
-2392 'h5pget_external_count_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2393 0 (2394 2395 2396) () 0
-() ())
-2397 'h5pget_fapl_core_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2398 0 (2399 2400 2401 2402) () 0 () ())
-2403 'h5pget_external_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2404 0 (2405 2406 2407 2408 2409 2410
-2411) () 0 () ())
-2412 'h5pget_fapl_multi_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2413 0 (
-2414 2415 2416 2417 2418 2419 2420 2421) () 0 () ())
-2422 'h5pget_fapl_family_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2423 0 (2424 2425 2426 2427)
-() 0 () ())
-2428 'h5pget_fill_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2429 0 (2430 2431 2432) () 0 () ())
-2433 'h5pget_fclose_degree_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2434 0 (2435 2436 2437) () 0
-() ())
-2438 'h5pget_fapl_direct_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2439 0 (2440 2441 2442 2443
-2444) () 0 () ())
-2445 'h5pget_edc_check_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2446 0 (2447 2448 2449) () 0 () ())
-151 'h5pget_fill_value_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2450 0 (2451 2452 2453 2454)
-() 0 () ())
-150 'h5pget_fill_value_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2455 0 (2456 2457 2458 2459)
-() 0 () ())
-2460 'h5pget_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2461 0 (2462 2463 2464 2465 2466 2467
-2468 2469 2470) () 0 () ())
-2471 'h5pget_istore_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2472 0 (2473 2474 2475) () 0 () ())
-2476 'h5pget_link_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2477 0 (2478 2479 2480) () 0
-() ())
-2481 'h5pget_layout_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2482 0 (2483 2484 2485) () 0 () ())
-147 'h5pget_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2486 0 (2487 2488 2489 2490) () 0 () ())
-2491 'h5pget_hyper_vector_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2492 0 (2493 2494 2495) () 0
-() ())
-2496 'h5pget_gc_references_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2497 0 (2498 2499 2500) () 0
-() ())
-2501 'h5pget_filter_by_id_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2502 0 (2503 2504 2505 2506
-2507 2508 2509 2510) () 0 () ())
-152 'h5pget_fill_value_double' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2511 0 (2512
-2513 2514 2515) () 0 () ())
-2516 'h5pget_local_heap_size_hint_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2517 0 (2518 2519 2520) () 0
-() ())
-2521 'h5pget_link_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2522 0 (2523 2524 2525 2526)
-() 0 () ())
-2527 'h5pget_meta_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2528 0 (2529 2530 2531) () 0
-() ())
-2532 'h5pget_nlinks_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2533 0 (2534 2535 2536) () 0 () ())
-2537 'h5pget_nprops_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2538 0 (2539 2540 2541) () 0 () ())
-2542 'h5pget_preserve_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2543 0 (2544 2545 2546) () 0 () ())
-2547 'h5pget_obj_track_times_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2548 0 (2549 2550 2551) () 0
-() ())
-2552 'h5pget_sieve_buf_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2553 0 (2554 2555 2556) () 0
-() ())
-2557 'h5pget_sizes_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2558 0 (2559 2560 2561 2562) () 0 () ())
-2563 'h5pget_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2564 0 (2565 2566 2567 2568) () 0 () ())
-146 'h5pget_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2569 0 (2570 2571 2572 2573) () 0 () ())
-2574 'h5pget_version_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2575 0 (2576 2577 2578
-2579 2580 2581) () 0 () ())
-153 'h5pinsert_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2582 0 (2583 2584 2585 2586 2587) () 0 () ())
-2588 'h5pget_userblock_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2589 0 (2590 2591 2592) () 0 () ())
-154 'h5pinsert_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2593 0 (2594 2595 2596 2597 2598) () 0 () ())
-155 'h5pinsert_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2599 0 (2600 2601 2602 2603 2604) () 0 ()
-())
-156 'h5pinsert_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2605 0 (2606 2607 2608 2609
-2610) () 0 () ())
-2611 'h5pget_sym_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2612 0 (2613 2614 2615 2616) () 0 () ())
-2617 'h5pget_small_data_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2618 0 (2619 2620 2621) () 0
-() ())
-157 'h5pregister_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2622 0 (2623 2624 2625 2626 2627) () 0 ()
-())
-2628 'h5pmodify_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2629 0 (2630 2631 2632 2633 2634 2635) ()
-0 () ())
-160 'h5pregister_double' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2636 0 (2637
-2638 2639 2640 2641) () 0 () ())
-158 'h5pregister_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2642 0 (2643 2644 2645 2646 2647) () 0 ()
-())
-159 'h5pregister_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2648 0 (2649 2650 2651 2652 2653) () 0 ()
-())
-2654 'h5pisa_class_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2655 0 (2656 2657 2658 2659) () 0 () ())
-2660 'h5pget_nfilters_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2661 0 (2662 2663 2664) () 0 () ())
-149 'h5pget_fill_value_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2665 0 (2666 2667 2668 2669)
-() 0 () ())
-2670 'h5pget_data_transform_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 2671 0 (
-2672 2673 2674 2675) () 0 () ())
-276 'h5p_string_create_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-2676 'h5aopen_name_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2677 0 (2678 2679 2680 2681) () 0 () ())
-2682 'h5aget_storage_size_f' 'h5a' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2683 0 (2684 2685 2686) () 0
-() ())
-2687 'h5premove_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2688 0 (2689 2690 2691) () 0 () ())
-2692 'h5pset_alloc_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2693 0 (2694 2695 2696) () 0
-() ())
-2697 'h5pset_attr_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2698 0 (2699 2700 2701) () 0
-() ())
-2702 'h5pset_alignment_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2703 0 (2704 2705 2706 2707) () 0 () ())
-2708 'h5pset_btree_ratios_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2709 0 (2710 2711 2712 2713
-2714) () 0 () ())
-2715 'h5pset_buffer_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2716 0 (2717 2718 2719) () 0 () ())
-2720 'h5pset_attr_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2721 0 (2722 2723 2724 2725)
-() 0 () ())
-2726 'h5pset_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2727 0 (2728 2729 2730 2731 2732 2733) ()
-0 () ())
-2734 'h5pset_char_encoding_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2735 0 (2736 2737 2738) () 0
-() ())
-2739 'h5pset_chunk_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2740 0 (2741 2742 2743 2744) () 0 () ())
-2745 'h5pset_chunk_cache_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2746 0 (2747 2748 2749 2750
-2751) () 0 () ())
-161 'h5pset_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2752 0 (2753 2754 2755 2756) () 0 () ())
-2757 'h5pset_data_transform_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2758 0 (2759 2760 2761) () 0
-() ())
-2762 'h5pset_create_inter_group_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2763 0 (2764 2765 2766) () 0
-() ())
-164 'h5pset_double' 'h5_dble_interface' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2767 0 (2768 2769 2770 2771)
-() 0 () ())
-2772 'h5pset_deflate_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2773 0 (2774 2775 2776) () 0 () ())
-2777 'h5pset_external_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2778 0 (2779 2780 2781 2782 2783) () 0 ()
-())
-2784 'h5pset_family_offset_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2785 0 (2786 2787 2788) () 0
-() ())
-2789 'h5pset_fapl_family_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2790 0 (2791 2792 2793 2794)
-() 0 () ())
-2795 'h5pset_fapl_direct_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2796 0 (2797 2798 2799 2800
-2801) () 0 () ())
-166 'h5pset_fapl_multi_l' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2802 0 (2803 2804 2805 2806 2807 2808
-2809) () 0 () ())
-2810 'h5pset_fapl_sec2_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2811 0 (2812 2813) () 0 () ())
-165 'h5pset_fapl_multi_s' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2814 0 (2815 2816 2817) () 0 () ())
-2818 'h5pset_fapl_core_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2819 0 (2820 2821 2822 2823) () 0 () ())
-2824 'h5pset_fapl_stdio_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2825 0 (2826 2827) () 0 () ())
-2828 'h5pset_fapl_split_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2829 0 (2830 2831 2832 2833
-2834 2835) () 0 () ())
-2836 'h5pset_est_link_info_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2837 0 (2838 2839 2840 2841)
-() 0 () ())
-2842 'h5pset_edc_check_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2843 0 (2844 2845 2846) () 0 () ())
-2847 'h5pset_copy_object_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2848 0 (2849 2850 2851) () 0
-() ())
-167 'h5pset_fill_value_char' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2852 0 (2853 2854 2855 2856)
-() 0 () ())
-2857 'h5pset_fill_time_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2858 0 (2859 2860 2861) () 0 () ())
-169 'h5pset_fill_value_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2862 0 (2863 2864 2865 2866)
-() 0 () ())
-170 'h5pset_fill_value_double' 'h5_dble_interface' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2867 0 (2868
-2869 2870 2871) () 0 () ())
-2872 'h5pset_filter_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2873 0 (2874 2875 2876 2877 2878 2879) ()
-0 () ())
-2880 'h5pset_fletcher32_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2881 0 (2882 2883) () 0 () ())
-2884 'h5pset_gc_references_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2885 0 (2886 2887 2888) () 0
-() ())
-168 'h5pset_fill_value_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2889 0 (2890 2891 2892 2893)
-() 0 () ())
-2894 'h5pset_fclose_degree_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2895 0 (2896 2897 2898) () 0
-() ())
-2899 'h5premove_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2900 0 (2901 2902 2903) () 0 () ())
-2904 'h5pset_istore_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2905 0 (2906 2907 2908) () 0 () ())
-2909 'h5pset_libver_bounds_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2910 0 (2911 2912 2913 2914)
-() 0 () ())
-2915 'h5pset_link_creation_order_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2916 0 (2917 2918 2919) () 0
-() ())
-2920 'h5pset_local_heap_size_hint_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2921 0 (2922 2923 2924) () 0
-() ())
-2925 'h5pset_link_phase_change_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2926 0 (2927 2928 2929 2930)
-() 0 () ())
-2931 'h5pset_layout_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2932 0 (2933 2934 2935) () 0 () ())
-2936 'h5pset_nbit_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2937 0 (2938 2939) () 0 () ())
-2940 'h5pset_nlinks_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2941 0 (2942 2943 2944) () 0 () ())
-2945 'h5pset_obj_track_times_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2946 0 (2947 2948 2949) () 0
-() ())
-2950 'h5pset_meta_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2951 0 (2952 2953 2954) () 0
-() ())
-163 'h5pset_integer' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2955 0 (2956 2957 2958 2959) () 0 () ())
-162 'h5pset_real' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2960 0 (2961 2962 2963 2964) () 0 () ())
-2965 'h5pset_shared_mesg_index_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2966 0 (2967 2968 2969 2970
-2971) () 0 () ())
-2972 'h5pset_scaleoffset_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2973 0 (2974 2975 2976 2977)
-() 0 () ())
-2978 'h5pset_sizes_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2979 0 (2980 2981 2982 2983) () 0 () ())
-2984 'h5pset_small_data_block_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 2985 0 (2986 2987 2988) () 0
-() ())
-2989 'h5pset_szip_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 2990 0 (2991 2992 2993 2994) () 0 () ())
-2995 'h5pset_sym_k_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 2996 0 (2997 2998 2999 3000) () 0 () ())
-3001 'h5pset_sieve_buf_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3002 0 (3003 3004 3005) () 0
-() ())
-3006 'h5pset_shuffle_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3007 0 (3008 3009) () 0 () ())
-3010 'h5punregister_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3011 0 (3012 3013 3014) () 0 () ())
-3015 'h5pset_userblock_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3016 0 (3017 3018 3019) () 0 () ())
-3020 'h5r' 'h5r' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-269 'h5r_object_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3021 'h5r_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '2')
-() 0 () ())
-182 'h5r_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-174 'h5rcreate_object_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3022 0 (3023 3024 3025 3026) () 0 () ())
-173 'h5rcreate_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3027 0 (3028 3029 3030 3031 3032) () 0 ()
-())
-176 'h5rdereference_object_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3033 0 (3034 3035 3036 3037)
-() 0 () ())
-177 'h5rget_name_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3038 0 (
-3039 3040 3041 3042 3043) () 0 () ())
-178 'h5rget_name_object_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3044 0 (
-3045 3046 3047 3048 3049) () 0 () ())
-175 'h5rdereference_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3050 0 (3051 3052 3053 3054)
-() 0 () ())
-172 'h5rget_object_type_obj_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3055 0 (3056 3057 3058 3059)
-() 0 () ())
-268 'h5r_dataset_region_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3060 'h5pset_shared_mesg_nindexes_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3061 0 (3062 3063 3064) () 0
-() ())
-171 'h5rget_region_region_f' 'h5r' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3065 0 (3066 3067 3068 3069)
-() 0 () ())
-3070 'h5s' 'h5s' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-179 'h5s_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '20')) 0 () ())
-265 'h5s_null_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-267 'h5s_scalar_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-252 'h5s_sel_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-248 'h5s_sel_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3071 'h5s_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'20') () 0 () ())
-261 'h5s_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-250 'h5s_sel_points_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-259 'h5s_select_and_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-251 'h5s_sel_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-249 'h5s_sel_hyperslabs_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-260 'h5s_select_noop_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-253 'h5s_select_invalid_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-263 'h5s_select_or_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-257 'h5s_select_notb_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-264 'h5s_select_set_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-258 'h5s_select_xor_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-254 'h5s_select_prepend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-262 'h5s_unlimited_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-266 'h5s_simple_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-256 'h5s_select_nota_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-255 'h5s_select_append_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3072 'h5scopy_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3073 0 (3074 3075 3076) () 0 () ())
-3077 'h5screate_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3078 0 (3079 3080 3081
-3082 3083) () 0 () ())
-3084 'h5sextent_copy_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3085 0 (3086 3087 3088) () 0 () ())
-3089 'h5sencode_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3090 0 (3091 3092 3093 3094) () 0 () ())
-3095 'h5sget_select_bounds_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3096 0 (3097 3098 3099 3100)
-() 0 () ())
-3101 'h5sextent_equal_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3102 0 (3103 3104 3105 3106) () 0 () ())
-3107 'h5sdecode_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3108 0 (3109 3110 3111) () 0 () ())
-3112 'h5screate_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3113 0 (3114 3115 3116) () 0 () ())
-3117 'h5sget_select_elem_pointlist_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3118 0 (3119 3120 3121 3122
-3123) () 0 () ())
-3124 'h5sget_select_hyper_nblocks_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3125 0 (3126 3127 3128) () 0
-() ())
-3129 'h5sget_select_type_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3130 0 (3131 3132 3133) () 0
-() ())
-3134 'h5sget_simple_extent_npoints_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3135 0 (3136 3137 3138) () 0
-() ())
-3139 'h5sget_simple_extent_ndims_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3140 0 (3141 3142 3143) () 0
-() ())
-3144 'h5sis_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3145 0 (3146 3147 3148) () 0 () ())
-3149 'h5sget_simple_extent_type_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3150 0 (3151 3152 3153) () 0
-() ())
-3154 'h5sget_simple_extent_dims_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3155 0 (3156 3157 3158 3159)
-() 0 () ())
-3160 'h5sselect_all_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3161 0 (3162 3163) () 0 () ())
-3164 'h5sselect_elements_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3165 0 (3166 3167 3168 3169
-3170 3171) () 0 () ())
-3172 'h5soffset_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3173 0 (3174 3175 3176) () 0 () ())
-3177 'h5sselect_none_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3178 0 (3179 3180) () 0 () ())
-3181 'h5sset_extent_simple_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3182 0 (3183 3184 3185 3186
-3187) () 0 () ())
-3188 'h5t' 'h5t' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-3189 'h5sset_extent_none_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3190 0 (3191 3192) () 0 () ())
-242 'h5t_bitfield_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-216 'h5t_array_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3193 'h5sselect_valid_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3194 0 (3195 3196 3197) () 0 () ())
-3198 'h5sselect_hyperslab_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3199 0 (
-3200 3201 3202 3203 3204 3205 3206) () 0 () ())
-240 'h5t_compound_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3207 'h5sget_select_npoints_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3208 0 (3209 3210 3211) () 0
-() ())
-3212 'h5sget_select_hyper_blocklist_f' 'h5s' 1 ((PROCEDURE
-UNKNOWN-INTENT MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3213 0 (3214
-3215 3216 3217 3218) () 0 () ())
-215 'h5t_dir_ascend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-222 'h5t_cset_utf8_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-214 'h5t_dir_descend_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3219 'h5t_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'34') () 0 () ())
-192 'h5t_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '34')) 0 () ())
-245 'h5t_float_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-423 'h5t_ieee_f32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-422 'h5t_ieee_f64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-246 'h5t_integer_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-421 'h5t_ieee_f64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-424 'h5t_ieee_f32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-437 'h5t_native_integer' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-435 'h5t_native_double' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-428 'h5t_native_integer_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-436 'h5t_native_real' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-247 'h5t_no_class_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-426 'h5t_native_real_8' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-427 'h5t_native_real_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-425 'h5t_native_real_16' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-429 'h5t_native_integer_4' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-430 'h5t_native_integer_2' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-225 'h5t_norm_msbset_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-226 'h5t_norm_implied_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-236 'h5t_order_be_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-235 'h5t_order_vax_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-234 'h5t_order_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-237 'h5t_order_le_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-241 'h5t_opaque_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-224 'h5t_norm_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-231 'h5t_pad_background_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-431 'h5t_native_integer_1' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-232 'h5t_pad_one_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-228 'h5t_sgn_2_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-418 'h5t_std_i16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-229 'h5t_sgn_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-417 'h5t_std_i16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-227 'h5t_sgn_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-239 'h5t_reference_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-233 'h5t_pad_zero_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-414 'h5t_std_i64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-415 'h5t_std_i32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-416 'h5t_std_i32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-230 'h5t_pad_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-420 'h5t_std_i8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-419 'h5t_std_i8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-432 'h5t_std_ref_dsetreg' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-413 'h5t_std_i64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-434 'h5t_native_character' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-410 'h5t_std_u16be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-433 'h5t_std_ref_obj' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-238 'h5t_enum_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-223 'h5t_cset_ascii_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3220 'h5sget_select_elem_npoints_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3221 0 (3222 3223 3224) () 0
-() ())
-3225 'h5sclose_f' 'h5s' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3226 0 (3227 3228) () 0 () ())
-408 'h5t_std_u32be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-406 'h5t_std_u64be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-405 'h5t_std_u64le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-411 'h5t_std_u8le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-412 'h5t_std_u8be' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-219 'h5t_str_spacepad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-404 'h5t_string' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-244 'h5t_time_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-217 'h5t_vlen_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-243 'h5t_string_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-221 'h5t_str_nullterm_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-220 'h5t_str_nullpad_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-218 'h5t_str_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-407 'h5t_std_u32le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3229 'h5tclose_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3230 0 (3231 3232) () 0 () ())
-3233 'h5tcommit_anon_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3234 0 (3235 3236 3237
-3238 3239) () 0 () ())
-3240 'h5tcommitted_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3241 0 (3242 3243 3244) () 0 () ())
-3245 'h5tcommit_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3246 0 (3247 3248 3249 3250
-3251 3252 3253) () 0 () ())
-3254 'h5tcompiler_conv_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3255 0 (3256 3257 3258 3259) () 0 () ())
-3260 'h5tencode_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3261 0 (3262 3263 3264 3265) () 0 () ())
-3266 'h5tenum_create_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3267 0 (3268 3269 3270) () 0 () ())
-3271 'h5tenum_insert_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3272 0 (3273 3274 3275 3276) () 0 () ())
-3277 'h5tdecode_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3278 0 (3279 3280 3281) () 0 () ())
-3282 'h5tenum_nameof_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3283 0 (3284 3285 3286 3287 3288) () 0 ()
-())
-3289 'h5tcreate_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3290 0 (3291 3292 3293 3294) () 0 () ())
-3295 'h5tequal_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3296 0 (3297 3298 3299 3300) () 0 () ())
-3301 'h5tget_array_dims_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3302 0 (3303 3304 3305) () 0
-() ())
-3306 'h5tenum_valueof_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3307 0 (3308 3309 3310 3311) () 0 () ())
-3312 'h5tget_class_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3313 0 (3314 3315 3316) () 0 () ())
-3317 'h5tget_ebias_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3318 0 (3319 3320 3321) () 0 () ())
-3322 'h5tget_fields_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3323 0 (3324 3325 3326 3327 3328 3329
-3330) () 0 () ())
-3331 'h5tget_cset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3332 0 (3333 3334 3335) () 0 () ())
-3336 'h5tget_inpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3337 0 (3338 3339 3340) () 0 () ())
-3341 'h5tget_member_class_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3342 0 (3343 3344 3345 3346)
-() 0 () ())
-3347 'h5tget_create_plist_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3348 0 (3349 3350 3351) () 0
-() ())
-3352 'h5tget_member_name_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3353 0 (3354 3355 3356 3357
-3358) () 0 () ())
-3359 'h5tget_member_index_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3360 0 (3361 3362 3363 3364)
-() 0 () ())
-3365 'h5tget_member_type_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3366 0 (3367 3368 3369 3370)
-() 0 () ())
-3371 'h5tget_member_value_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3372 0 (3373 3374 3375 3376)
-() 0 () ())
-3377 'h5tget_member_offset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3378 0 (3379 3380 3381 3382)
-() 0 () ())
-3383 'h5tget_array_ndims_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3384 0 (3385 3386 3387) () 0
-() ())
-3388 'h5tget_nmembers_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3389 0 (3390 3391 3392) () 0 () ())
-3393 'h5tget_offset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3394 0 (3395 3396 3397) () 0 () ())
-3398 'h5tget_precision_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3399 0 (3400 3401 3402) () 0 () ())
-3403 'h5tget_pad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3404 0 (3405 3406 3407 3408) () 0 () ())
-3409 'h5tget_order_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3410 0 (3411 3412 3413) () 0 () ())
-3414 'h5tget_norm_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3415 0 (3416 3417 3418) () 0 () ())
-3419 'h5tget_native_type_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3420 0 (3421 3422 3423 3424)
-() 0 () ())
-3425 'h5tget_size_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3426 0 (3427 3428 3429) () 0 () ())
-3430 'h5tget_super_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3431 0 (3432 3433 3434) () 0 () ())
-3435 'h5tget_tag_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3436 0 (3437 3438 3439 3440) () 0 () ())
-3441 'h5tinsert_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3442 0 (3443 3444 3445 3446 3447) () 0 () ())
-3448 'h5tpack_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3449 0 (3450 3451) () 0 () ())
-3452 'h5topen_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE ALWAYS_EXPLICIT) (UNKNOWN 0 ()) 3453 0 (3454 3455 3456 3457
-3458) () 0 () ())
-3459 'h5tis_variable_str_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3460 0 (3461 3462 3463) () 0
-() ())
-3464 'h5tget_strpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3465 0 (3466 3467 3468) () 0 () ())
-3469 'h5tset_ebias_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3470 0 (3471 3472 3473) () 0 () ())
-3474 'h5tset_fields_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3475 0 (3476 3477 3478 3479 3480 3481
-3482) () 0 () ())
-3483 'h5tset_cset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3484 0 (3485 3486 3487) () 0 () ())
-3488 'h5tget_sign_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3489 0 (3490 3491 3492) () 0 () ())
-3493 'h5tcopy_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3494 0 (3495 3496 3497) () 0 () ())
-3498 'h5tarray_create_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3499 0 (3500 3501 3502 3503 3504) () 0 ()
-())
-409 'h5t_std_u16le' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3505 'h5tset_norm_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3506 0 (3507 3508 3509) () 0 () ())
-3510 'h5tset_offset_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3511 0 (3512 3513 3514) () 0 () ())
-3515 'h5tset_precision_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3516 0 (3517 3518 3519) () 0 () ())
-3520 'h5tset_pad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3521 0 (3522 3523 3524 3525) () 0 () ())
-3526 'h5tset_order_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3527 0 (3528 3529 3530) () 0 () ())
-3531 'h5tset_size_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3532 0 (3533 3534 3535) () 0 () ())
-3536 'h5tset_strpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3537 0 (3538 3539 3540) () 0 () ())
-3541 'h5tset_sign_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3542 0 (3543 3544 3545) () 0 () ())
-3546 'h5tvlen_create_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3547 0 (3548 3549 3550) () 0 () ())
-3551 'h5z' 'h5z' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-3552 'h5tset_tag_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC DECL
-SUBROUTINE) (UNKNOWN 0 ()) 3553 0 (3554 3555 3556) () 0 () ())
-208 'h5z_error_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-206 'h5z_enable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-202 'h5z_filter_encode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-211 'h5z_filter_deflate_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-201 'h5z_filter_decode_enabled_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-209 'h5z_filter_fletcher32_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-212 'h5z_filter_none_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-204 'h5z_filter_szip_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-203 'h5z_flag_optional_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-210 'h5z_filter_shuffle_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3557 'h5z_flags_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'14') () 0 () ())
-205 'h5z_no_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3558 'h5zget_filter_info_f' 'h5z' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3559 0 (3560 3561 3562) () 0
-() ())
-3563 'h5zfilter_avail_f' 'h5z' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3564 0 (3565 3566 3567) () 0 () ())
-3568 'haddr_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3569 'hdf5' 'hdf5' 1 ((MODULE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (
-UNKNOWN 0 ()) 0 0 () () 0 () ())
-3570 'h5zunregister_f' 'h5z' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3571 0 (3572 3573) () 0 () ())
-181 'h5z_flags' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '14')) 0 () ())
-3574 'hid_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '4') () 0 () ())
-3575 'hdset_reg_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((3576 'ref' (INTEGER 4
-()) (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ())
-0 '3')) 1 0 ())) PUBLIC ())
-213 'h5z_filter_error_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-200 'h5z_filter_all_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3577 'hsize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3578 'hobj_ref_t_f' 'h5global' 1 ((DERIVED UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN) (UNKNOWN 0 ()) 0 0 () () 0 ((3579 'ref' (INTEGER 8 ()) () 0 0 ()))
-PUBLIC ())
-207 'h5z_disable_edc_f' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 () ())
-3580 'hssize_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3581 'integer_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'17') () 0 () ())
-3582 'object_namelen_default_f' 'h5fortran_types' 1 ((PARAMETER
-UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN) (INTEGER 8 ()) 0 0 () (CONSTANT (
-INTEGER 8 ()) 0 '-1') () 0 () ())
-3583 'predef_types_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0
-'13') () 0 () ())
-195 'predef_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '13')) 0 () ())
-3584 'size_t' 'h5fortran_types' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '8')
-() 0 () ())
-3585 'ref_reg_buf_len' 'h5global' 1 ((PARAMETER UNKNOWN-INTENT
-UNKNOWN-PROC UNKNOWN) (INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '3')
-() 0 () ())
-3586 'printon' 'h5e' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '1') () 0 () ())
-3587 'printoff' 'h5e' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN)
-(INTEGER 4 ()) 0 0 () (CONSTANT (INTEGER 4 ()) 0 '0') () 0 () ())
-184 'integer_types' 'h5global' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
-UNKNOWN DIMENSION IN_COMMON) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (
-CONSTANT (INTEGER 4 ()) 0 '1') (CONSTANT (INTEGER 4 ()) 0 '17')) 0 () ())
-3588 'h5tset_inpad_f' 'h5t' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3589 0 (3590 3591 3592) () 0 () ())
-3593 'h5pset_preserve_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
-DECL SUBROUTINE) (UNKNOWN 0 ()) 3594 0 (3595 3596 3597) () 0 () ())
-3598 'h5pset_hyper_vector_size_f' 'h5p' 1 ((PROCEDURE UNKNOWN-INTENT
-MODULE-PROC DECL SUBROUTINE) (UNKNOWN 0 ()) 3599 0 (3600 3601 3602) () 0
-() ())
-1905 'hdferr' '' 1903 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1867 'file_id' '' 1866 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1869 'hdferr' '' 1866 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1899 'file_id' '' 1898 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1868 'prop_id' '' 1866 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1838 'free_space' '' 1836 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1900 'access_id' '' 1898 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1844 'obj_count' '' 1841 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1843 'obj_type' '' 1841 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1860 'obj_type' '' 1858 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1845 'hdferr' '' 1841 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1837 'file_id' '' 1836 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1839 'hdferr' '' 1836 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1901 'hdferr' '' 1898 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1904 'file_id' '' 1903 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1859 'file_id' '' 1858 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1864 'num_objs' '' 1858 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 8 ()) 0 0 () () 0 () ())
-1842 'file_id' '' 1841 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1862 'obj_ids' '' 1858 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-1827 'object_id' '' 1826 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1828 'scope' '' 1826 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1834 'hdferr' '' 1831 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1833 'size' '' 1831 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-1832 'file_id' '' 1831 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1829 'hdferr' '' 1826 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1892 'loc_id' '' 1891 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1850 'size' '' 1847 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-1849 'buf' '' 1847 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1848 'obj_id' '' 1847 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1894 'child_id' '' 1891 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1851 'hdferr' '' 1847 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1885 'name' '' 1884 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1895 'hdferr' '' 1891 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1863 'hdferr' '' 1858 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1887 'file_id' '' 1884 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1896 'access_prp' '' 1891 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1893 'name' '' 1891 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1888 'hdferr' '' 1884 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1886 'access_flags' '' 1884 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1820 'hdferr' '' 1816 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1822 'access_prp' '' 1816 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1817 'name' '' 1816 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1819 'file_id' '' 1816 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1877 'loc_id' '' 1876 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1879 'hdferr' '' 1876 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1874 'hdferr' '' 1871 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1889 'access_prp' '' 1884 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1872 'file_id' '' 1871 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1855 'status' '' 1853 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-1854 'name' '' 1853 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1856 'hdferr' '' 1853 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1878 'name' '' 1876 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1873 'ret_file_id' '' 1871 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1821 'creation_prp' '' 1816 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1818 'access_flags' '' 1816 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1918 'grp_id' '' 1917 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1914 'gcpl_id' '' 1910 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1911 'loc_id' '' 1910 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1913 'hdferr' '' 1910 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1912 'grp_id' '' 1910 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1934 'hdferr' '' 1931 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1938 'group_name' '' 1936 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1933 'gcpl_id' '' 1931 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1983 'loc_id' '' 1982 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1932 'grp_id' '' 1931 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1985 'size' '' 1982 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-1940 'nlinks' '' 1936 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1984 'name' '' 1982 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1986 'buffer' '' 1982 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((VARIABLE (INTEGER 8 ()) 0 1985 ()))) 0 0 () () 0 () ())
-1987 'hdferr' '' 1982 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1937 'loc_id' '' 1936 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1915 'gapl_id' '' 1910 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1942 'hdferr' '' 1936 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1948 'group_name' '' 1946 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1952 'storage_type' '' 1946 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1950 'order' '' 1946 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1954 'max_corder' '' 1946 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1953 'nlinks' '' 1946 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1951 'n' '' 1946 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-1947 'loc_id' '' 1946 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1941 'max_corder' '' 1936 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1949 'index_type' '' 1946 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1944 'mounted' '' 1936 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (LOGICAL 4 ()) 0 0 () () 0 () ())
-1957 'mounted' '' 1946 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (LOGICAL 4 ()) 0 0 () () 0 () ())
-1925 'hdferr' '' 1921 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1923 'name' '' 1921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1956 'lapl_id' '' 1946 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1924 'grp_id' '' 1921 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1926 'size_hint' '' 1921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 8 ()) 0 0 () () 0 () ())
-1929 'gapl_id' '' 1921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1927 'lcpl_id' '' 1921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1928 'gcpl_id' '' 1921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1922 'loc_id' '' 1921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1943 'lapl_id' '' 1936 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1978 'obj_name' '' 1974 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1977 'idx' '' 1974 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1919 'hdferr' '' 1917 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1975 'loc_id' '' 1974 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1955 'hdferr' '' 1946 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1979 'obj_type' '' 1974 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1961 'name' '' 1959 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1960 'loc_id' '' 1959 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1964 'hdferr' '' 1959 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1963 'buffer' '' 1959 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((VARIABLE (INTEGER 8 ()) 0 1962 ()))) 0 0 () () 0 () ())
-1962 'size' '' 1959 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-1980 'hdferr' '' 1974 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1998 'link_type' '' 1996 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1999 'current_name' '' 1996 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2025 'loc_id' '' 2024 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2028 'hdferr' '' 2024 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2034 'hdferr' '' 2030 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2031 'loc_id' '' 2030 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2032 'name' '' 2030 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2026 'name' '' 2024 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2001 'hdferr' '' 1996 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2040 'hdferr' '' 2037 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2014 'grp_id' '' 2011 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2013 'name' '' 2011 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2012 'loc_id' '' 2011 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2027 'new_name' '' 2024 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2038 'loc_id' '' 2037 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2016 'gapl_id' '' 2011 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2039 'name' '' 2037 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1939 'storage_type' '' 1936 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2015 'hdferr' '' 2011 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2033 'comment' '' 2030 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2000 'new_name' '' 1996 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2021 'nmembers' '' 2018 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2005 'src_name' '' 2003 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2022 'hdferr' '' 2018 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2008 'hdferr' '' 2003 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2067 'cur_name' '' 2065 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2006 'dst_loc_id' '' 2003 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2007 'dst_name' '' 2003 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2004 'src_loc_id' '' 2003 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2071 'hdferr' '' 2065 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1970 'max_corder' '' 1966 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1967 'group_id' '' 1966 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2070 'new_name' '' 2065 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1972 'mounted' '' 1966 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (LOGICAL 4 ()) 0 0 () () 0 () ())
-1971 'hdferr' '' 1966 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2068 'link_type' '' 2065 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2066 'cur_loc_id' '' 2065 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1969 'nlinks' '' 1966 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1968 'storage_type' '' 1966 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2069 'new_loc_id' '' 2065 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2020 'name' '' 2018 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1783 'hdferr' '' 1782 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1795 'error_no' '' 1794 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1801 'printflag' '' 1800 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1802 'hdferr' '' 1800 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1798 'hdferr' '' 1794 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1790 'error_no' '' 1789 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1787 'name' '' 1785 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1792 'hdferr' '' 1789 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1796 'name' '' 1794 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1791 'name' '' 1789 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1786 'hdferr' '' 1785 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1797 'namelen' '' 1794 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2019 'loc_id' '' 2018 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1997 'loc_id' '' 1996 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1976 'name' '' 1974 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1861 'max_objs' '' 1858 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2062 'ref_count' '' 2060 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2063 'hdferr' '' 2060 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2061 'obj_id' '' 2060 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2051 'buf_size' '' 2048 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2052 'name_size' '' 2048 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2049 'obj_id' '' 2048 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2058 'hdferr' '' 2055 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2045 'ref_count' '' 2043 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2053 'hdferr' '' 2048 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2044 'obj_id' '' 2043 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2075 'ref_count' '' 2073 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2143 'id' '' 2142 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-2057 'file_id' '' 2055 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2145 'hdferr' '' 2142 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2076 'hdferr' '' 2073 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2144 'valid' '' 2142 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2081 'hdferr' '' 2078 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2080 'type' '' 2078 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2056 'obj_id' '' 2055 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2079 'obj_id' '' 2078 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2074 'obj_id' '' 2073 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2046 'hdferr' '' 2043 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2050 'buf' '' 2048 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2135 'obj_name' '' 2133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2140 'lapl_id' '' 2133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2139 'lcpl_id' '' 2133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2134 'file_name' '' 2133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2136 'link_loc_id' '' 2133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1992 'relnum' '' 1989 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2137 'link_name' '' 2133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2089 'dest_name' '' 2085 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2086 'src_loc_id' '' 2085 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2092 'lapl_id' '' 2085 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2091 'lcpl_id' '' 2085 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2097 'link_name' '' 2094 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2096 'link_loc_id' '' 2094 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2095 'target_path' '' 2094 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2087 'src_name' '' 2085 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2098 'hdferr' '' 2094 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2099 'lcpl_id' '' 2094 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2088 'dest_loc_id' '' 2085 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2128 'order' '' 2124 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2100 'lapl_id' '' 2094 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2125 'loc_id' '' 2124 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2126 'group_name' '' 2124 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2127 'index_field' '' 2124 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2131 'lapl_id' '' 2124 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2129 'n' '' 2124 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-2130 'hdferr' '' 2124 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2138 'hdferr' '' 2133 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2193 'n' '' 2188 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-2191 'index_field' '' 2188 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2192 'order' '' 2188 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2190 'group_name' '' 2188 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2198 'address' '' 2188 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2199 'val_size' '' 2188 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2197 'cset' '' 2188 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2200 'hdferr' '' 2188 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2196 'corder' '' 2188 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2195 'f_corder_valid' '' 2188 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(LOGICAL 4 ()) 0 0 () () 0 () ())
-2121 'hdferr' '' 2117 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2122 'lapl_id' '' 2117 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2119 'name' '' 2117 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2114 'hdferr' '' 2111 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2113 'name' '' 2111 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2112 'loc_id' '' 2111 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2118 'loc_id' '' 2117 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2120 'link_exists' '' 2117 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2194 'link_type' '' 2188 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2201 'lapl_id' '' 2188 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2166 'dest_loc_id' '' 2163 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2090 'hdferr' '' 2085 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2115 'lapl_id' '' 2111 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2167 'dest_name' '' 2163 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2170 'lapl_id' '' 2163 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2169 'lcpl_id' '' 2163 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2168 'hdferr' '' 2163 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2189 'loc_id' '' 2188 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2160 'registered' '' 2158 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2161 'hdferr' '' 2158 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2159 'link_cls_id' '' 2158 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2148 'loc_id' '' 2147 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2152 'n' '' 2147 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-2153 'name' '' 2147 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2150 'index_field' '' 2147 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2165 'src_name' '' 2163 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2156 'lapl_id' '' 2147 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2177 'cset' '' 2174 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2175 'link_loc_id' '' 2174 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2154 'hdferr' '' 2147 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2176 'link_name' '' 2174 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2179 'f_corder_valid' '' 2174 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(LOGICAL 4 ()) 0 0 () () 0 () ())
-2180 'link_type' '' 2174 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2155 'size' '' 2147 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-2182 'val_size' '' 2174 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2104 'obj_name' '' 2102 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2103 'obj_loc_id' '' 2102 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2184 'lapl_id' '' 2174 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2108 'lcpl_id' '' 2102 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2109 'lapl_id' '' 2102 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2105 'link_loc_id' '' 2102 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2106 'link_name' '' 2102 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2107 'hdferr' '' 2102 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2149 'group_name' '' 2147 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2178 'corder' '' 2174 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2164 'src_loc_id' '' 2163 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3227 'space_id' '' 3226 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3074 'space_id' '' 3073 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3228 'hdferr' '' 3226 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3075 'new_space_id' '' 3073 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3076 'hdferr' '' 3073 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3116 'hdferr' '' 3113 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3079 'rank' '' 3078 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3081 'space_id' '' 3078 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3082 'hdferr' '' 3078 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3086 'dest_space_id' '' 3085 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3087 'source_space_id' '' 3085 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3088 'hdferr' '' 3085 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3080 'dims' '' 3078 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 3079 ())) 0 () ())
-3115 'space_id' '' 3113 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3091 'obj_id' '' 3090 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3083 'maxdims' '' 3078 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-OPTIONAL DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ())
-0 '1') (VARIABLE (INTEGER 4 ()) 0 3079 ())) 0 () ())
-3093 'nalloc' '' 3090 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3094 'hdferr' '' 3090 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3127 'num_blocks' '' 3125 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3106 'hdferr' '' 3102 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3126 'space_id' '' 3125 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3105 'equal' '' 3102 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3103 'space1_id' '' 3102 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3114 'classtype' '' 3113 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3218 'hdferr' '' 3213 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3217 'buf' '' 3213 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3216 'num_blocks' '' 3213 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3092 'buf' '' 3090 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3121 'num_points' '' 3118 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3104 'space2_id' '' 3102 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3122 'buf' '' 3118 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3123 'hdferr' '' 3118 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3131 'space_id' '' 3130 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3133 'hdferr' '' 3130 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3120 'startpoint' '' 3118 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3128 'hdferr' '' 3125 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1908 'error' '' 1907 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3215 'startblock' '' 3213 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3214 'space_id' '' 3213 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2181 'address' '' 2174 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2183 'hdferr' '' 2174 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2151 'order' '' 2147 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3210 'npoints' '' 3208 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3136 'space_id' '' 3135 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3137 'npoints' '' 3135 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3142 'rank' '' 3140 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3143 'hdferr' '' 3140 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3146 'space_id' '' 3145 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3147 'status' '' 3145 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3141 'space_id' '' 3140 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3176 'hdferr' '' 3173 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3138 'hdferr' '' 3135 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3153 'hdferr' '' 3150 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3151 'space_id' '' 3150 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3152 'classtype' '' 3150 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3171 'hdferr' '' 3165 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3170 'coord' '' 3165 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 3168 ()) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 3169 ())) 0 () ())
-3166 'space_id' '' 3165 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3168 'rank' '' 3165 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3197 'hdferr' '' 3194 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3169 'num_elements' '' 3165 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3167 'operator' '' 3165 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3175 'offset' '' 3173 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3195 'space_id' '' 3194 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3185 'current_size' '' 3182 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1')
-(VARIABLE (INTEGER 4 ()) 0 3184 ())) 0 () ())
-3187 'hdferr' '' 3182 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3184 'rank' '' 3182 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3196 'status' '' 3194 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3180 'hdferr' '' 3178 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3200 'space_id' '' 3199 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3205 'stride' '' 3199 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-OPTIONAL DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (
-INTEGER 4 ()) 0 '1') ()) 0 () ())
-3201 'operator' '' 3199 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3202 'start' '' 3199 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3204 'hdferr' '' 3199 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3183 'space_id' '' 3182 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3156 'space_id' '' 3155 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3163 'hdferr' '' 3161 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3158 'maxdims' '' 3155 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-3159 'hdferr' '' 3155 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3206 'block' '' 3199 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-OPTIONAL DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (
-INTEGER 4 ()) 0 '1') ()) 0 () ())
-3162 'space_id' '' 3161 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3203 'count' '' 3199 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3097 'space_id' '' 3096 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3179 'space_id' '' 3178 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3148 'hdferr' '' 3145 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3211 'hdferr' '' 3208 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3174 'space_id' '' 3173 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3191 'space_id' '' 3190 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3099 'end' '' 3096 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3100 'hdferr' '' 3096 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3192 'hdferr' '' 3190 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3111 'hdferr' '' 3108 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3110 'obj_id' '' 3108 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3098 'start' '' 3096 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3223 'num_points' '' 3221 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3224 'hdferr' '' 3221 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3222 'space_id' '' 3221 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3119 'space_id' '' 3118 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3209 'space_id' '' 3208 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3109 'buf' '' 3108 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-3157 'dims' '' 3155 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3186 'maximum_size' '' 3182 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1')
-(VARIABLE (INTEGER 4 ()) 0 3184 ())) 0 () ())
-3132 'type' '' 3130 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1009 'error' '' 1005 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1030 'type_id' '' 1028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1031 'space_id' '' 1028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1035 'dapl_id' '' 1028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1034 'dcpl_id' '' 1028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1033 'hdferr' '' 1028 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1029 'loc_id' '' 1028 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1039 'name' '' 1037 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1042 'dset_id' '' 1037 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1043 'hdferr' '' 1037 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1038 'loc_id' '' 1037 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1046 'dapl_id' '' 1037 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1049 'dset_id' '' 1048 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1044 'dcpl_id' '' 1037 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1041 'space_id' '' 1037 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1057 'fill_value' '' 1056 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1068 'space_id' '' 1066 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1067 'fill_value' '' 1066 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () () 0 () ())
-1070 'hdferr' '' 1066 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1069 'buf' '' 1066 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () (1 ASSUMED_SIZE (
-CONSTANT (INTEGER 4 ()) 0 '1') ()) 0 () ())
-1050 'hdferr' '' 1048 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1045 'lcpl_id' '' 1037 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1387 'dset_id' '' 1386 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1389 'hdferr' '' 1386 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1075 'hdferr' '' 1072 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1074 'dataspace_id' '' 1072 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1388 'plist_id' '' 1386 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1060 'hdferr' '' 1056 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1032 'dset_id' '' 1028 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1080 'hdferr' '' 1077 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1058 'space_id' '' 1056 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1073 'dataset_id' '' 1072 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1079 'plist_id' '' 1077 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1083 'dataset_id' '' 1082 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1078 'dataset_id' '' 1077 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1084 'datatype_id' '' 1082 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1120 'loc_id' '' 1119 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1122 'dset_id' '' 1119 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1112 'buf' '' 1109 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1113 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1110 'dset_id' '' 1109 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1123 'hdferr' '' 1119 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1121 'name' '' 1119 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1113 'dims' '' 1109 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1111 'mem_type_id' '' 1109 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1085 'hdferr' '' 1082 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1059 'buf' '' 1056 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1040 'type_id' '' 1037 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1296 'dset_id' '' 1295 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1115 'mem_space_id' '' 1109 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1297 'mem_type_id' '' 1295 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1088 'dataset_id' '' 1087 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1089 'size' '' 1087 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-1090 'hdferr' '' 1087 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1116 'file_space_id' '' 1109 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1302 'file_space_id' '' 1295 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1298 'buf' '' 1295 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1299 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1299 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1299 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1299 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1095 'dims' '' 1091 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1094 'buf' '' 1091 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1095 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1095 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1095 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1093 'mem_type_id' '' 1091 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1096 'hdferr' '' 1091 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1092 'dset_id' '' 1091 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1301 'mem_space_id' '' 1295 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1303 'xfer_prp' '' 1295 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1114 'hdferr' '' 1109 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1099 'xfer_prp' '' 1091 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1124 'dapl_id' '' 1119 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1098 'file_space_id' '' 1091 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1300 'hdferr' '' 1295 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1103 'buf' '' 1100 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1104 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1104 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1102 'mem_type_id' '' 1100 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1097 'mem_space_id' '' 1091 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1299 'dims' '' 1295 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1104 'dims' '' 1100 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1106 'mem_space_id' '' 1100 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1144 'mem_type_id' '' 1142 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1145 'buf' '' 1142 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1146 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1146 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1146 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1146 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1146 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1146 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1143 'dset_id' '' 1142 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1146 'dims' '' 1142 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1147 'hdferr' '' 1142 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1108 'xfer_prp' '' 1100 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1149 'file_space_id' '' 1142 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1148 'mem_space_id' '' 1142 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1134 'dset_id' '' 1133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1107 'file_space_id' '' 1100 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1136 'buf' '' 1133 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1137 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1137 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1137 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1137 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1137 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1137 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1137 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1138 'hdferr' '' 1133 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1139 'mem_space_id' '' 1133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1141 'xfer_prp' '' 1133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1137 'dims' '' 1133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1101 'dset_id' '' 1100 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1150 'xfer_prp' '' 1142 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1256 'mem_space_id' '' 1250 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1253 'buf' '' 1250 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1254 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1258 'xfer_prp' '' 1250 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1254 'dims' '' 1250 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1255 'hdferr' '' 1250 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1242 'dset_id' '' 1241 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1252 'mem_type_id' '' 1250 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1245 'dims' '' 1241 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1247 'mem_space_id' '' 1241 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1246 'hdferr' '' 1241 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1248 'file_space_id' '' 1241 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1189 'mem_type_id' '' 1187 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1188 'dset_id' '' 1187 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1249 'xfer_prp' '' 1241 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1190 'buf' '' 1187 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-1243 'mem_type_id' '' 1241 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1140 'file_space_id' '' 1133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1195 'xfer_prp' '' 1187 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1191 'dims' '' 1187 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1192 'hdferr' '' 1187 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1198 'mem_type_id' '' 1196 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1202 'mem_space_id' '' 1196 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1199 'buf' '' 1196 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1200 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1200 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1204 'xfer_prp' '' 1196 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1203 'file_space_id' '' 1196 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1244 'buf' '' 1241 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1245 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1245 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1262 'buf' '' 1259 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1263 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1263 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1263 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1263 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1201 'hdferr' '' 1196 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1197 'dset_id' '' 1196 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1200 'dims' '' 1196 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1257 'file_space_id' '' 1250 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1260 'dset_id' '' 1259 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1265 'mem_space_id' '' 1259 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1263 'dims' '' 1259 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1251 'dset_id' '' 1250 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1264 'hdferr' '' 1259 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1267 'xfer_prp' '' 1259 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1378 'mem_type_id' '' 1376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1266 'file_space_id' '' 1259 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1382 'mem_space_id' '' 1376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1383 'file_space_id' '' 1376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1384 'xfer_prp' '' 1376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1380 'dims' '' 1376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1274 'mem_space_id' '' 1268 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1272 'dims' '' 1268 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1273 'hdferr' '' 1268 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1271 'buf' '' 1268 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1272 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1272 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1272 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1272 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1272 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1272 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1270 'mem_type_id' '' 1268 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1381 'hdferr' '' 1376 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1261 'mem_type_id' '' 1259 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1193 'mem_space_id' '' 1187 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1194 'file_space_id' '' 1187 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1135 'mem_type_id' '' 1133 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1105 'hdferr' '' 1100 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1379 'buf' '' 1376 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1380 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1380 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1380 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1380 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1380 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1380 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1380 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1275 'file_space_id' '' 1268 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1278 'dset_id' '' 1277 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1280 'buf' '' 1277 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1281 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1281 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1281 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1281 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1281 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1276 'xfer_prp' '' 1268 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1282 'hdferr' '' 1277 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1284 'file_space_id' '' 1277 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1281 'dims' '' 1277 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1283 'mem_space_id' '' 1277 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1371 'dims' '' 1367 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1369 'mem_type_id' '' 1367 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1375 'xfer_prp' '' 1367 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1332 'dset_id' '' 1331 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1374 'file_space_id' '' 1367 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1335 'dims' '' 1331 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1333 'mem_type_id' '' 1331 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1334 'buf' '' 1331 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1335 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1335 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1335 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1335 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1335 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1372 'hdferr' '' 1367 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1279 'mem_type_id' '' 1277 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1338 'file_space_id' '' 1331 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1360 'mem_type_id' '' 1358 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1359 'dset_id' '' 1358 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1361 'buf' '' 1358 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1362 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1362 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1362 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1362 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1336 'hdferr' '' 1331 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1364 'mem_space_id' '' 1358 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1337 'mem_space_id' '' 1331 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1363 'hdferr' '' 1358 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1362 'dims' '' 1358 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1366 'xfer_prp' '' 1358 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1373 'mem_space_id' '' 1367 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1365 'file_space_id' '' 1358 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1339 'xfer_prp' '' 1331 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1285 'xfer_prp' '' 1277 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1325 'buf' '' 1322 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1326 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1326 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1326 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1327 'hdferr' '' 1322 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1326 'dims' '' 1322 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1368 'dset_id' '' 1367 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1370 'buf' '' 1367 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1371 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1371 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1269 'dset_id' '' 1268 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1328 'mem_space_id' '' 1322 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1306 'mem_type_id' '' 1304 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1307 'buf' '' 1304 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1308 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1330 'xfer_prp' '' 1322 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1308 'dims' '' 1304 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1310 'mem_space_id' '' 1304 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1314 'dset_id' '' 1313 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1315 'mem_type_id' '' 1313 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1323 'dset_id' '' 1322 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1317 'dims' '' 1313 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1318 'hdferr' '' 1313 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1316 'buf' '' 1313 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1311 'file_space_id' '' 1304 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1312 'xfer_prp' '' 1304 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1329 'file_space_id' '' 1322 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1305 'dset_id' '' 1304 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1409 'dset_id' '' 1408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1414 'mem_space_id' '' 1408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1416 'xfer_prp' '' 1408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1412 'dims' '' 1408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1411 'buf' '' 1408 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-1410 'mem_type_id' '' 1408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1400 'dset_id' '' 1399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1320 'file_space_id' '' 1313 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1404 'hdferr' '' 1399 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1402 'buf' '' 1399 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(DERIVED 3575 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1403 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1403 'dims' '' 1399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1405 'mem_space_id' '' 1399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1407 'xfer_prp' '' 1399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1391 'dset_id' '' 1390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1401 'mem_type_id' '' 1399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1415 'file_space_id' '' 1408 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1413 'hdferr' '' 1408 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1321 'xfer_prp' '' 1313 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1395 'hdferr' '' 1390 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1397 'file_space_id' '' 1390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1398 'xfer_prp' '' 1390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1392 'mem_type_id' '' 1390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1393 'buf' '' 1390 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(DERIVED 3578 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1394 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1351 'mem_type_id' '' 1349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1353 'dims' '' 1349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1350 'dset_id' '' 1349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1396 'mem_space_id' '' 1390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1394 'dims' '' 1390 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1355 'mem_space_id' '' 1349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1356 'file_space_id' '' 1349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1352 'buf' '' 1349 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1353 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1353 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1353 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1353 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1353 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1353 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1353 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1420 'buf' '' 1417 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1421 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1421 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1423 'hdferr' '' 1417 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1424 'mem_space_id' '' 1417 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1419 'mem_type_id' '' 1417 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1421 'dims' '' 1417 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1425 'file_space_id' '' 1417 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1426 'xfer_prp' '' 1417 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1418 'dset_id' '' 1417 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1422 'len' '' 1417 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1406 'file_space_id' '' 1399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1440 'buf' '' 1437 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1441 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1441 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1441 'dims' '' 1437 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1446 'xfer_prp' '' 1437 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1445 'file_space_id' '' 1437 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1428 'dset_id' '' 1427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1442 'len' '' 1437 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1439 'mem_type_id' '' 1437 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1430 'buf' '' 1427 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1431 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1))))) 0 () ())
-1431 'dims' '' 1427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1432 'str_len' '' 1427 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-1443 'hdferr' '' 1437 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1357 'xfer_prp' '' 1349 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1341 'dset_id' '' 1340 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1434 'mem_space_id' '' 1427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1319 'mem_space_id' '' 1313 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1435 'file_space_id' '' 1427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1343 'buf' '' 1340 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1344 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1344 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1344 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1344 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1344 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1344 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1344 'dims' '' 1340 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1348 'xfer_prp' '' 1340 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1290 'dims' '' 1286 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1347 'file_space_id' '' 1340 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1287 'dset_id' '' 1286 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1346 'mem_space_id' '' 1340 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1436 'xfer_prp' '' 1427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1429 'mem_type_id' '' 1427 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1288 'mem_type_id' '' 1286 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1289 'buf' '' 1286 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1290 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1290 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1290 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1444 'mem_space_id' '' 1437 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1291 'hdferr' '' 1286 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1294 'xfer_prp' '' 1286 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1293 'file_space_id' '' 1286 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1132 'hdferr' '' 1129 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1130 'dset_id' '' 1129 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1062 'fill_valuer' '' 1061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 4 ()) 0 0 () () 0 () ())
-1065 'hdferr' '' 1061 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1131 'flag' '' 1129 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1466 'dset_id' '' 1465 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1064 'buf' '' 1061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-1468 'buf' '' 1465 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1469 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1469 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1469 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1469 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1469 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1467 'mem_type_id' '' 1465 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1063 'space_id' '' 1061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1292 'mem_space_id' '' 1286 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1473 'xfer_prp' '' 1465 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1471 'mem_space_id' '' 1465 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1470 'hdferr' '' 1465 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1342 'mem_type_id' '' 1340 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1345 'hdferr' '' 1340 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1438 'dset_id' '' 1437 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1433 'hdferr' '' 1427 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1469 'dims' '' 1465 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1487 'dims' '' 1483 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1488 'hdferr' '' 1483 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1485 'mem_type_id' '' 1483 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1476 'mem_type_id' '' 1474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1491 'xfer_prp' '' 1483 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1475 'dset_id' '' 1474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1486 'buf' '' 1483 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1487 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1487 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1487 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1487 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1477 'buf' '' 1474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1478 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1478 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1478 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1478 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1478 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1478 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1478 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1479 'hdferr' '' 1474 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1480 'mem_space_id' '' 1474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1482 'xfer_prp' '' 1474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1481 'file_space_id' '' 1474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1490 'file_space_id' '' 1483 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1460 'dims' '' 1456 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1461 'hdferr' '' 1456 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1478 'dims' '' 1474 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1457 'dset_id' '' 1456 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1448 'dset_id' '' 1447 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1463 'file_space_id' '' 1456 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1458 'mem_type_id' '' 1456 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1489 'mem_space_id' '' 1483 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1472 'file_space_id' '' 1465 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1354 'hdferr' '' 1349 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1450 'buf' '' 1447 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1451 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1451 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1451 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1324 'mem_type_id' '' 1322 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1117 'xfer_prp' '' 1109 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1452 'hdferr' '' 1447 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1451 'dims' '' 1447 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1454 'file_space_id' '' 1447 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1459 'buf' '' 1456 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1460 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1460 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1460 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1460 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1460 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1460 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1462 'mem_space_id' '' 1456 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1464 'xfer_prp' '' 1456 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1504 'buf' '' 1501 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-1502 'dset_id' '' 1501 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1449 'mem_type_id' '' 1447 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1506 'hdferr' '' 1501 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1503 'mem_type_id' '' 1501 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1505 'dims' '' 1501 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1511 'dset_id' '' 1510 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1508 'file_space_id' '' 1501 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1517 'file_space_id' '' 1510 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1513 'buf' '' 1510 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1514 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1514 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1514 'dims' '' 1510 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1518 'xfer_prp' '' 1510 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1599 'dset_id' '' 1598 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1516 'mem_space_id' '' 1510 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1602 'dims' '' 1598 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1604 'mem_space_id' '' 1598 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1606 'xfer_prp' '' 1598 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1600 'mem_type_id' '' 1598 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1601 'buf' '' 1598 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1602 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1602 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1512 'mem_type_id' '' 1510 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1626 'dset_id' '' 1625 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1627 'mem_type_id' '' 1625 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1629 'dims' '' 1625 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1631 'mem_space_id' '' 1625 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1636 'mem_type_id' '' 1634 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1635 'dset_id' '' 1634 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1633 'xfer_prp' '' 1625 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1632 'file_space_id' '' 1625 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1605 'file_space_id' '' 1598 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1515 'hdferr' '' 1510 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1638 'dims' '' 1634 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1455 'xfer_prp' '' 1447 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1603 'hdferr' '' 1598 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1640 'mem_space_id' '' 1634 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1645 'mem_type_id' '' 1643 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1641 'file_space_id' '' 1634 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1642 'xfer_prp' '' 1634 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1639 'hdferr' '' 1634 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1644 'dset_id' '' 1643 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1628 'buf' '' 1625 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1629 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1629 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1629 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1629 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1629 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1630 'hdferr' '' 1625 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1509 'xfer_prp' '' 1501 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1648 'hdferr' '' 1643 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1651 'xfer_prp' '' 1643 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1608 'dset_id' '' 1607 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1609 'mem_type_id' '' 1607 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1650 'file_space_id' '' 1643 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1647 'dims' '' 1643 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1613 'mem_space_id' '' 1607 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1615 'xfer_prp' '' 1607 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1623 'file_space_id' '' 1616 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1618 'mem_type_id' '' 1616 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1612 'hdferr' '' 1607 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1611 'dims' '' 1607 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1621 'hdferr' '' 1616 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1584 'mem_type_id' '' 1582 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1583 'dset_id' '' 1582 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1619 'buf' '' 1616 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1620 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1620 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1620 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1620 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1620 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1620 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1587 'hdferr' '' 1582 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1588 'mem_space_id' '' 1582 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1624 'xfer_prp' '' 1616 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1620 'dims' '' 1616 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1622 'mem_space_id' '' 1616 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1614 'file_space_id' '' 1607 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1617 'dset_id' '' 1616 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1610 'buf' '' 1607 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1611 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1585 'buf' '' 1582 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1586 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1637 'buf' '' 1634 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1638 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1638 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1638 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1638 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1649 'mem_space_id' '' 1643 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1654 'mem_type_id' '' 1652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1656 'dims' '' 1652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1590 'xfer_prp' '' 1582 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1655 'buf' '' 1652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-1484 'dset_id' '' 1483 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1309 'hdferr' '' 1304 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1658 'mem_space_id' '' 1652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1589 'file_space_id' '' 1582 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1662 'dset_id' '' 1661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1663 'mem_type_id' '' 1661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1664 'buf' '' 1661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1665 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-1660 'xfer_prp' '' 1652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1653 'dset_id' '' 1652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1586 'dims' '' 1582 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1646 'buf' '' 1643 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1647 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1647 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1647 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1665 'dims' '' 1661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1659 'file_space_id' '' 1652 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1669 'xfer_prp' '' 1661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1668 'file_space_id' '' 1661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1691 'buf' '' 1688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1692 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1692 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1692 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1692 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1693 'hdferr' '' 1688 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1695 'file_space_id' '' 1688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1698 'dset_id' '' 1697 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1699 'mem_type_id' '' 1697 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1694 'mem_space_id' '' 1688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1696 'xfer_prp' '' 1688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1690 'mem_type_id' '' 1688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1704 'file_space_id' '' 1697 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1716 'dset_id' '' 1715 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1702 'hdferr' '' 1697 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1717 'mem_type_id' '' 1715 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1718 'buf' '' 1715 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1719 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1719 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1719 'dims' '' 1715 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1721 'mem_space_id' '' 1715 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1723 'xfer_prp' '' 1715 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1722 'file_space_id' '' 1715 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1701 'dims' '' 1697 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1703 'mem_space_id' '' 1697 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1705 'xfer_prp' '' 1697 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1689 'dset_id' '' 1688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1682 'buf' '' 1679 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1683 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1683 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1683 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1683 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1683 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1681 'mem_type_id' '' 1679 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1667 'mem_space_id' '' 1661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1687 'xfer_prp' '' 1679 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1684 'hdferr' '' 1679 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1725 'dset_id' '' 1724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1727 'buf' '' 1724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1728 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1728 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1728 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1728 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1728 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1728 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1728 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1728 'dims' '' 1724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1683 'dims' '' 1679 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1685 'mem_space_id' '' 1679 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1377 'dset_id' '' 1376 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1657 'hdferr' '' 1652 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1680 'dset_id' '' 1679 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1726 'mem_type_id' '' 1724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1686 'file_space_id' '' 1679 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1692 'dims' '' 1688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1720 'hdferr' '' 1715 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1700 'buf' '' 1697 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1701 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1701 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1701 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1731 'file_space_id' '' 1724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1730 'mem_space_id' '' 1724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1666 'hdferr' '' 1661 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1507 'mem_space_id' '' 1501 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1596 'len' '' 1592 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-1594 'type_id' '' 1592 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1597 'hdferr' '' 1592 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1595 'space_id' '' 1592 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1710 'dims' '' 1706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1711 'hdferr' '' 1706 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1709 'buf' '' 1706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1710 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1710 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1710 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1710 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1710 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1710 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1710 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1714 'xfer_prp' '' 1706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1713 'file_space_id' '' 1706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1708 'mem_type_id' '' 1706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1712 'mem_space_id' '' 1706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1810 'dims' '' 1806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1809 'buf' '' 1806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-1811 'hdferr' '' 1806 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1807 'dset_id' '' 1806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1808 'mem_type_id' '' 1806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1812 'mem_space_id' '' 1806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1593 'dataset_id' '' 1592 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1744 'mem_type_id' '' 1742 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1747 'hdferr' '' 1742 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1743 'dset_id' '' 1742 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1745 'buf' '' 1742 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-DERIVED 3578 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1746 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1814 'xfer_prp' '' 1806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1813 'file_space_id' '' 1806 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1729 'hdferr' '' 1724 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1732 'xfer_prp' '' 1724 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1748 'mem_space_id' '' 1742 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1736 'buf' '' 1733 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-DERIVED 3575 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1737 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-1750 'xfer_prp' '' 1742 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1738 'hdferr' '' 1733 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1734 'dset_id' '' 1733 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1735 'mem_type_id' '' 1733 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1746 'dims' '' 1742 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1740 'file_space_id' '' 1733 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1741 'xfer_prp' '' 1733 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1737 'dims' '' 1733 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1767 'hdferr' '' 1761 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1765 'dims' '' 1761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1763 'mem_type_id' '' 1761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1764 'buf' '' 1761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1765 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1765 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1766 'len' '' 1761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1769 'file_space_id' '' 1761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1754 'buf' '' 1751 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1755 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '2') 1))))) 0 () ())
-1762 'dset_id' '' 1761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1756 'str_len' '' 1751 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-1757 'hdferr' '' 1751 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1755 'dims' '' 1751 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-1770 'xfer_prp' '' 1761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1753 'mem_type_id' '' 1751 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1758 'mem_space_id' '' 1751 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1774 'buf' '' 1771 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1775 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1775 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1776 'len' '' 1771 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1773 'mem_type_id' '' 1771 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1780 'xfer_prp' '' 1771 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1779 'file_space_id' '' 1771 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1778 'mem_space_id' '' 1771 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1673 'buf' '' 1670 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1674 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1674 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1674 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1674 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1674 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1674 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1675 'hdferr' '' 1670 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1672 'mem_type_id' '' 1670 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1671 'dset_id' '' 1670 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1677 'file_space_id' '' 1670 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1674 'dims' '' 1670 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1772 'dset_id' '' 1771 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1775 'dims' '' 1771 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-CONSTANT (INTEGER 4 ()) 0 '2')) 0 () ())
-2230 'dataset_id' '' 2229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2232 'hdferr' '' 2229 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1678 'xfer_prp' '' 1670 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1777 'hdferr' '' 1771 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1759 'file_space_id' '' 1751 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1676 'mem_space_id' '' 1670 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1752 'dset_id' '' 1751 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1749 'file_space_id' '' 1742 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1760 'xfer_prp' '' 1751 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2231 'size' '' 2229 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1768 'mem_space_id' '' 1761 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1993 'error' '' 1989 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1739 'mem_space_id' '' 1733 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1707 'dset_id' '' 1706 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-455 'loc_id' '' 454 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-456 'obj_name' '' 454 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-459 'space_id' '' 454 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-457 'attr_name' '' 454 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-461 'hdferr' '' 454 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-491 'idx_type' '' 488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-490 'obj_name' '' 488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-492 'order' '' 488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-493 'n' '' 488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-472 'loc_id' '' 471 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-489 'loc_id' '' 488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-464 'lapl_id' '' 454 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-462 'acpl_id' '' 454 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-463 'aapl_id' '' 454 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-473 'name' '' 471 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-475 'space_id' '' 471 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-474 'type_id' '' 471 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-495 'lapl_id' '' 488 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-458 'type_id' '' 454 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-478 'acpl_id' '' 471 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-479 'aapl_id' '' 471 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-477 'hdferr' '' 471 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-476 'attr_id' '' 471 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-482 'loc_id' '' 481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-484 'attr_name' '' 481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-485 'hdferr' '' 481 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-483 'obj_name' '' 481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-551 'hdferr' '' 548 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-550 'name' '' 548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-501 'attr_exists' '' 497 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-499 'obj_name' '' 497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-467 'attr_id' '' 466 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-502 'hdferr' '' 497 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-549 'obj_id' '' 548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-545 'creation_prop_id' '' 543 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-468 'hdferr' '' 466 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-503 'lapl_id' '' 497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-546 'hdferr' '' 543 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-544 'attr_id' '' 543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-513 'obj_name' '' 511 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-500 'attr_name' '' 497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-518 'corder' '' 511 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-517 'f_corder_valid' '' 511 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-515 'order' '' 511 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-514 'idx_type' '' 511 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-520 'data_size' '' 511 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-519 'cset' '' 511 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-498 'loc_id' '' 497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-486 'lapl_id' '' 481 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-521 'hdferr' '' 511 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-506 'obj_id' '' 505 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-460 'attr' '' 454 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-522 'lapl_id' '' 511 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-507 'attr_name' '' 505 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-525 'attr_id' '' 524 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-509 'hdferr' '' 505 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-529 'data_size' '' 524 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-530 'hdferr' '' 524 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-526 'f_corder_valid' '' 524 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-537 'corder' '' 532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-538 'cset' '' 532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-535 'attr_name' '' 532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-540 'hdferr' '' 532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-539 'data_size' '' 532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-567 'attr_num' '' 565 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-541 'lapl_id' '' 532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-536 'f_corder_valid' '' 532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-533 'loc_id' '' 532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-512 'loc_id' '' 511 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-555 'attr_id' '' 554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-566 'obj_id' '' 565 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-558 'hdferr' '' 554 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-561 'attr_id' '' 560 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-556 'size' '' 554 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-557 'buf' '' 554 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-568 'hdferr' '' 565 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-516 'n' '' 511 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-494 'hdferr' '' 488 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-563 'hdferr' '' 560 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-602 'attr_id' '' 601 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-534 'obj_name' '' 532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-562 'space_id' '' 560 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-527 'corder' '' 524 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-528 'cset' '' 524 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-508 'attr_exists' '' 505 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2684 'attr_id' '' 2683 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2686 'hdferr' '' 2683 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-617 'aapl_id' '' 612 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-613 'obj_id' '' 612 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-582 'loc_id' '' 581 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-588 'lapl_id' '' 581 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-584 'attr_name' '' 581 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-586 'hdferr' '' 581 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-585 'attr_id' '' 581 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-583 'obj_name' '' 581 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-616 'hdferr' '' 612 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-614 'attr_name' '' 612 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-615 'attr_id' '' 612 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-592 'obj_name' '' 590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-595 'n' '' 590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-596 'attr_id' '' 590 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-599 'lapl_id' '' 590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-587 'aapl_id' '' 581 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-591 'loc_id' '' 590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2685 'size' '' 2683 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-603 'type_id' '' 601 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2679 'name' '' 2677 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-628 'dims' '' 624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-627 'buf' '' 624 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 628 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-628 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 628 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-626 'memtype_id' '' 624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2681 'hdferr' '' 2677 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2678 'obj_id' '' 2677 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2680 'attr_id' '' 2677 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-597 'hdferr' '' 590 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-619 'attr_id' '' 618 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-594 'order' '' 590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-625 'attr_id' '' 624 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-621 'buf' '' 618 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 622 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-622 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-598 'aapl_id' '' 590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-637 'attr_id' '' 636 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-629 'hdferr' '' 624 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-620 'memtype_id' '' 618 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-640 'dims' '' 636 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-639 'buf' '' 636 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 640 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-640 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 640 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 640 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-640 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-651 'buf' '' 648 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 652 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-652 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 652 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 652 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-650 'memtype_id' '' 648 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-631 'attr_id' '' 630 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-652 'dims' '' 648 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-653 'hdferr' '' 648 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-649 'attr_id' '' 648 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-638 'memtype_id' '' 636 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-635 'hdferr' '' 630 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-632 'memtype_id' '' 630 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-634 'dims' '' 630 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-725 'hdferr' '' 720 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-722 'memtype_id' '' 720 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-769 'attr_id' '' 768 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-771 'buf' '' 768 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 772 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-772 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 772 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-723 'buf' '' 720 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 724 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-724 'dims' '' 720 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-721 'attr_id' '' 720 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-716 'memtype_id' '' 714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-770 'memtype_id' '' 768 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-719 'hdferr' '' 714 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-667 'attr_id' '' 666 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-668 'memtype_id' '' 666 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-717 'buf' '' 714 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 718 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-718 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-772 'dims' '' 768 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-671 'hdferr' '' 666 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-670 'dims' '' 666 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-669 'buf' '' 666 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-718 'dims' '' 714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-715 'attr_id' '' 714 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-773 'hdferr' '' 768 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-623 'hdferr' '' 618 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-674 'memtype_id' '' 672 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-675 'buf' '' 672 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 676 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-676 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 676 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 676 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-676 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 676 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 676 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-645 'buf' '' 642 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 646 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-646 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 646 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 646 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-646 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 646 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-676 'dims' '' 672 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-644 'memtype_id' '' 642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-764 'memtype_id' '' 762 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-766 'dims' '' 762 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-647 'hdferr' '' 642 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-643 'attr_id' '' 642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-765 'buf' '' 762 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 766 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-766 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 766 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 766 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-766 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-763 'attr_id' '' 762 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-736 'dims' '' 732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-737 'hdferr' '' 732 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-730 'dims' '' 726 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-740 'memtype_id' '' 738 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-731 'hdferr' '' 726 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-739 'attr_id' '' 738 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-742 'dims' '' 738 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-727 'attr_id' '' 726 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-741 'buf' '' 738 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-743 'hdferr' '' 738 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-767 'hdferr' '' 762 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-728 'memtype_id' '' 726 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-729 'buf' '' 726 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 730 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-730 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 730 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 730 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-733 'attr_id' '' 732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-734 'memtype_id' '' 732 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-735 'buf' '' 732 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 736 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-736 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 736 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 736 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-736 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 736 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-646 'dims' '' 642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-633 'buf' '' 630 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 634 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-641 'hdferr' '' 636 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-622 'dims' '' 618 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-757 'attr_id' '' 756 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-782 'memtype_id' '' 780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-785 'hdferr' '' 780 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-784 'dims' '' 780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-783 'buf' '' 780 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 784 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-784 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 784 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 784 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-677 'hdferr' '' 672 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-761 'hdferr' '' 756 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1022 'memtype_id' '' 1020 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1024 'dims' '' 1020 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-781 'attr_id' '' 780 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1021 'attr_id' '' 1020 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-935 'buf' '' 932 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 936 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-936 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 936 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 936 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-936 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 936 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-934 'memtype_id' '' 932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-787 'attr_id' '' 786 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-788 'memtype_id' '' 786 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-936 'dims' '' 932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-806 'loc_id' '' 805 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-789 'buf' '' 786 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-790 'dims' '' 786 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-807 'obj_name' '' 805 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-809 'new_attr_name' '' 805 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-808 'old_attr_name' '' 805 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-760 'dims' '' 756 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1025 'hdferr' '' 1020 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-811 'lapl_id' '' 805 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-803 'hdferr' '' 799 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-801 'old_attr_name' '' 799 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-802 'new_attr_name' '' 799 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-800 'loc_id' '' 799 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-791 'hdferr' '' 786 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-937 'hdferr' '' 932 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-933 'attr_id' '' 932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1023 'buf' '' 1020 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1024 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1024 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1024 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-797 'hdferr' '' 792 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-778 'dims' '' 774 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-776 'memtype_id' '' 774 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-777 'buf' '' 774 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 778 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-778 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 778 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 778 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-778 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-793 'attr_id' '' 792 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-796 'dims' '' 792 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-794 'memtype_id' '' 792 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-813 'attr_id' '' 812 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-795 'buf' '' 792 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 796 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-796 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 796 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 796 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-796 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 796 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 796 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-759 'buf' '' 756 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 760 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-760 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-816 'dims' '' 812 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-817 'hdferr' '' 812 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-814 'memtype_id' '' 812 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-815 'buf' '' 812 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 816 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-816 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-775 'attr_id' '' 774 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-833 'buf' '' 830 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 834 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-834 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 834 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 834 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-834 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 834 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 834 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-837 'attr_id' '' 836 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-835 'hdferr' '' 830 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-832 'memtype_id' '' 830 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-839 'buf' '' 836 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 840 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-840 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 840 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 840 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-840 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 840 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-841 'hdferr' '' 836 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-822 'dims' '' 818 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-838 'memtype_id' '' 836 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-840 'dims' '' 836 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-831 'attr_id' '' 830 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-825 'attr_id' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-820 'memtype_id' '' 818 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-823 'hdferr' '' 818 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-828 'dims' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-829 'hdferr' '' 824 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-910 'memtype_id' '' 908 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-826 'memtype_id' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-911 'buf' '' 908 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 912 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-912 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-913 'hdferr' '' 908 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-827 'buf' '' 824 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 828 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-828 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 828 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 828 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-915 'attr_id' '' 914 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-919 'hdferr' '' 914 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-918 'dims' '' 914 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-916 'memtype_id' '' 914 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-917 'buf' '' 914 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 918 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-918 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 918 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 918 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-912 'dims' '' 908 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-821 'buf' '' 818 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 822 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-822 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 822 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 822 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-822 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-779 'hdferr' '' 774 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-940 'memtype_id' '' 938 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-909 'attr_id' '' 908 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-943 'hdferr' '' 938 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-981 'attr_id' '' 980 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-982 'memtype_id' '' 980 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-984 'dims' '' 980 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-987 'attr_id' '' 986 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-985 'hdferr' '' 980 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-941 'buf' '' 938 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 942 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-942 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 942 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 942 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-942 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 942 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 942 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-991 'hdferr' '' 986 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-995 'buf' '' 992 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 996 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-996 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 996 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 996 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-996 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-994 'memtype_id' '' 992 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-997 'hdferr' '' 992 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-988 'memtype_id' '' 986 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-993 'attr_id' '' 992 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-903 'attr_id' '' 902 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-904 'memtype_id' '' 902 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-907 'hdferr' '' 902 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-990 'dims' '' 986 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-905 'buf' '' 902 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 906 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-906 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 906 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-983 'buf' '' 980 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-906 'dims' '' 902 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-996 'dims' '' 992 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-989 'buf' '' 986 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 990 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-990 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 990 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 990 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-990 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 990 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-955 'hdferr' '' 950 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-954 'dims' '' 950 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-977 'buf' '' 974 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 978 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 978 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 978 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-953 'buf' '' 950 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 954 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 954 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-975 'attr_id' '' 974 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-979 'hdferr' '' 974 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-948 'dims' '' 944 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-976 'memtype_id' '' 974 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-946 'memtype_id' '' 944 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-957 'attr_id' '' 956 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-959 'buf' '' 956 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 960 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 960 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 960 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 960 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-960 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 960 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-958 'memtype_id' '' 956 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-961 'hdferr' '' 956 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-945 'attr_id' '' 944 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-966 'dims' '' 962 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-967 'hdferr' '' 962 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-965 'buf' '' 962 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 966 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 966 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 966 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 966 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-966 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-949 'hdferr' '' 944 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-960 'dims' '' 956 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-947 'buf' '' 944 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 948 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-951 'attr_id' '' 950 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-952 'memtype_id' '' 950 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-964 'memtype_id' '' 962 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-971 'buf' '' 968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 972 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 972 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 972 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 972 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-963 'attr_id' '' 962 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-978 'dims' '' 974 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-901 'hdferr' '' 896 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-897 'attr_id' '' 896 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-819 'attr_id' '' 818 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-942 'dims' '' 938 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-900 'dims' '' 896 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-970 'memtype_id' '' 968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1000 'memtype_id' '' 998 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1003 'hdferr' '' 998 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-899 'buf' '' 896 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 900 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-999 'attr_id' '' 998 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-969 'attr_id' '' 968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1001 'buf' '' 998 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-898 'memtype_id' '' 896 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1016 'memtype_id' '' 1014 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1017 'buf' '' 1014 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1018 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1018 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1018 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1018 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1018 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1018 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1018 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1015 'attr_id' '' 1014 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1018 'dims' '' 1014 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-921 'attr_id' '' 920 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1019 'hdferr' '' 1014 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-923 'buf' '' 920 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER 1
-(())) 0 0 () () 0 () ())
-924 'dims' '' 920 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-922 'memtype_id' '' 920 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-925 'hdferr' '' 920 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-847 'hdferr' '' 842 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-845 'buf' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 846 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-846 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 846 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-846 'dims' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1002 'dims' '' 998 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-843 'attr_id' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-928 'memtype_id' '' 926 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-973 'hdferr' '' 968 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-931 'hdferr' '' 926 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-751 'attr_id' '' 750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-930 'dims' '' 926 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-748 'dims' '' 744 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-749 'hdferr' '' 744 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-746 'memtype_id' '' 744 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-747 'buf' '' 744 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 748 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-748 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 748 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 748 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-748 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 748 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 748 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-752 'memtype_id' '' 750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-753 'buf' '' 750 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 754 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-844 'memtype_id' '' 842 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-939 'attr_id' '' 938 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-810 'hdferr' '' 805 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-755 'hdferr' '' 750 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-608 'index' '' 606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-929 'buf' '' 926 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 930 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-607 'obj_id' '' 606 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-610 'hdferr' '' 606 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-609 'attr_id' '' 606 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-754 'dims' '' 750 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-972 'dims' '' 968 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-927 'attr_id' '' 926 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-573 'idx_type' '' 570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-574 'order' '' 570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-575 'n' '' 570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8 ())
-0 0 () () 0 () ())
-576 'name' '' 570 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-572 'obj_name' '' 570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-578 'size' '' 570 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-571 'loc_id' '' 570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-579 'lapl_id' '' 570 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-593 'idx_type' '' 590 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-604 'hdferr' '' 601 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-673 'attr_id' '' 672 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-577 'hdferr' '' 570 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-834 'dims' '' 830 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3502 'dims' '' 3499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3500 'base_id' '' 3499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3501 'rank' '' 3499 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3504 'hdferr' '' 3499 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3231 'type_id' '' 3230 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3258 'flag' '' 3255 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-3257 'dst_id' '' 3255 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3232 'hdferr' '' 3230 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3503 'type_id' '' 3499 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3244 'hdferr' '' 3241 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3259 'hdferr' '' 3255 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3256 'src_id' '' 3255 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3248 'name' '' 3246 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3249 'type_id' '' 3246 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3242 'dtype_id' '' 3241 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3252 'tcpl_id' '' 3246 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3253 'tapl_id' '' 3246 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3236 'dtype_id' '' 3234 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3237 'hdferr' '' 3234 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3239 'tapl_id' '' 3234 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3247 'loc_id' '' 3246 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3250 'hdferr' '' 3246 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3251 'lcpl_id' '' 3246 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3235 'loc_id' '' 3234 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3238 'tcpl_id' '' 3234 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3243 'committed' '' 3241 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3279 'buf' '' 3278 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-3281 'hdferr' '' 3278 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3270 'hdferr' '' 3267 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3280 'obj_id' '' 3278 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3308 'type_id' '' 3307 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3285 'value' '' 3283 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3284 'type_id' '' 3283 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3309 'name' '' 3307 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3269 'new_type_id' '' 3267 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3268 'parent_id' '' 3267 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3286 'namelen' '' 3283 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3311 'hdferr' '' 3307 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3273 'type_id' '' 3272 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3263 'buf' '' 3261 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3262 'obj_id' '' 3261 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3265 'hdferr' '' 3261 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3264 'nalloc' '' 3261 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3276 'hdferr' '' 3272 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3274 'name' '' 3272 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3275 'value' '' 3272 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3288 'hdferr' '' 3283 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3287 'name' '' 3283 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3385 'type_id' '' 3384 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3316 'hdferr' '' 3313 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3315 'class' '' 3313 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3314 'type_id' '' 3313 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3305 'hdferr' '' 3302 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3304 'dims' '' 3302 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-3349 'dtype_id' '' 3348 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3319 'type_id' '' 3318 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3351 'hdferr' '' 3348 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3334 'cset' '' 3332 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3335 'hdferr' '' 3332 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3333 'type_id' '' 3332 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3495 'type_id' '' 3494 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3496 'new_type_id' '' 3494 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3497 'hdferr' '' 3494 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3320 'ebias' '' 3318 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3339 'padtype' '' 3337 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3340 'hdferr' '' 3337 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3350 'dtpl_id' '' 3348 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3297 'type1_id' '' 3296 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3299 'flag' '' 3296 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-3300 'hdferr' '' 3296 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3387 'hdferr' '' 3384 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3293 'type_id' '' 3290 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3292 'size' '' 3290 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3310 'value' '' 3307 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3303 'type_id' '' 3302 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3298 'type2_id' '' 3296 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3321 'hdferr' '' 3318 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3358 'hdferr' '' 3353 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3355 'index' '' 3353 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3294 'hdferr' '' 3290 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3357 'namelen' '' 3353 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3362 'name' '' 3360 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3361 'type_id' '' 3360 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3364 'hdferr' '' 3360 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3363 'index' '' 3360 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3368 'field_idx' '' 3366 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3356 'member_name' '' 3353 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3291 'class' '' 3290 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3338 'type_id' '' 3337 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3386 'ndims' '' 3384 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3370 'hdferr' '' 3366 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3367 'type_id' '' 3366 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3373 'type_id' '' 3372 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3343 'type_id' '' 3342 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3376 'hdferr' '' 3372 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3346 'hdferr' '' 3342 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3374 'member_no' '' 3372 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3345 'class' '' 3342 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3375 'value' '' 3372 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3390 'type_id' '' 3389 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3416 'type_id' '' 3415 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3392 'hdferr' '' 3389 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3424 'hdferr' '' 3420 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3417 'norm' '' 3415 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3391 'num_members' '' 3389 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3422 'direction' '' 3420 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3421 'dtype_id' '' 3420 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3324 'type_id' '' 3323 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3325 'spos' '' 3323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3344 'member_no' '' 3342 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3381 'offset' '' 3378 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3382 'hdferr' '' 3378 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3380 'member_no' '' 3378 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3329 'msize' '' 3323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3328 'mpos' '' 3323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3327 'esize' '' 3323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3330 'hdferr' '' 3323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3412 'order' '' 3410 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3379 'type_id' '' 3378 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3405 'type_id' '' 3404 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3408 'hdferr' '' 3404 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3406 'lsbpad' '' 3404 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3407 'msbpad' '' 3404 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3418 'hdferr' '' 3415 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3491 'sign' '' 3489 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3490 'type_id' '' 3489 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3429 'hdferr' '' 3426 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3427 'type_id' '' 3426 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3428 'size' '' 3426 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3492 'hdferr' '' 3489 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3423 'native_dtype_id' '' 3420 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3443 'type_id' '' 3442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3446 'field_id' '' 3442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3444 'name' '' 3442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3411 'type_id' '' 3410 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3445 'offset' '' 3442 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3437 'type_id' '' 3436 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3438 'tag' '' 3436 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3439 'taglen' '' 3436 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3440 'hdferr' '' 3436 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3433 'base_type_id' '' 3431 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3434 'hdferr' '' 3431 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3432 'type_id' '' 3431 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3413 'hdferr' '' 3410 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3369 'datatype' '' 3366 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-745 'attr_id' '' 744 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3463 'hdferr' '' 3460 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3462 'status' '' 3460 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3466 'type_id' '' 3465 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3447 'hdferr' '' 3442 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3461 'type_id' '' 3460 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3468 'hdferr' '' 3465 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3326 'epos' '' 3323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3454 'loc_id' '' 3453 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3450 'type_id' '' 3449 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3467 'strpad' '' 3465 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3456 'type_id' '' 3453 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3457 'hdferr' '' 3453 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3472 'ebias' '' 3470 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3473 'hdferr' '' 3470 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3471 'type_id' '' 3470 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3451 'hdferr' '' 3449 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3591 'padtype' '' 3589 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3590 'type_id' '' 3589 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3487 'hdferr' '' 3484 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3514 'hdferr' '' 3511 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3512 'type_id' '' 3511 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3592 'hdferr' '' 3589 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3529 'order' '' 3527 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3530 'hdferr' '' 3527 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3513 'offset' '' 3511 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3528 'type_id' '' 3527 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3400 'type_id' '' 3399 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3507 'type_id' '' 3506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3508 'norm' '' 3506 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3486 'cset' '' 3484 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3455 'name' '' 3453 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3402 'hdferr' '' 3399 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3401 'precision' '' 3399 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3485 'type_id' '' 3484 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3524 'msbpad' '' 3521 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3525 'hdferr' '' 3521 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3517 'type_id' '' 3516 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3522 'type_id' '' 3521 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3519 'hdferr' '' 3516 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3518 'precision' '' 3516 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3540 'hdferr' '' 3537 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3533 'type_id' '' 3532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3535 'hdferr' '' 3532 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3523 'lsbpad' '' 3521 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3554 'type_id' '' 3553 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3555 'tag' '' 3553 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (CHARACTER
-1 (())) 0 0 () () 0 () ())
-3543 'type_id' '' 3542 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3556 'hdferr' '' 3553 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3539 'strpad' '' 3537 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3550 'hdferr' '' 3547 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3545 'hdferr' '' 3542 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3548 'type_id' '' 3547 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3549 'vltype_id' '' 3547 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3534 'size' '' 3532 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3538 'type_id' '' 3537 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3458 'tapl_id' '' 3453 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3476 'type_id' '' 3475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3477 'spos' '' 3475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3479 'esize' '' 3475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-3478 'epos' '' 3475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3395 'type_id' '' 3394 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3482 'hdferr' '' 3475 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3544 'sign' '' 3542 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3480 'mpos' '' 3475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3396 'offset' '' 3394 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-3509 'hdferr' '' 3506 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3397 'hdferr' '' 3394 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3481 'msize' '' 3475 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2205 'addr' '' 2203 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2211 'name' '' 2209 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2212 'obj_id' '' 2209 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2207 'hdferr' '' 2203 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2206 'obj_id' '' 2203 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2210 'loc_id' '' 2209 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2217 'object_id' '' 2216 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2213 'hdferr' '' 2209 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2218 'new_loc_id' '' 2216 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2221 'lcpl_id' '' 2216 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2204 'loc_id' '' 2203 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2219 'new_link_name' '' 2216 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2220 'hdferr' '' 2216 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2222 'lapl_id' '' 2216 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2214 'lapl_id' '' 2209 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-3354 'type_id' '' 3353 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2236 'hdferr' '' 2234 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1127 'error' '' 1126 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2256 'class' '' 2253 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2257 'hdferr' '' 2253 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2255 'name' '' 2253 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2319 'plist2_id' '' 2317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2321 'hdferr' '' 2317 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2318 'plist1_id' '' 2317 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2320 'flag' '' 2317 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2263 'hdferr' '' 2259 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2262 'flag' '' 2259 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2260 'prp_id' '' 2259 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2266 'plist_id' '' 2265 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2235 'class' '' 2234 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2268 'hdferr' '' 2265 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2254 'parent' '' 2253 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2314 'alignment' '' 2311 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2315 'hdferr' '' 2311 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2312 'prp_id' '' 2311 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2248 'dst_id' '' 2247 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2250 'name' '' 2247 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2363 'prp_id' '' 2362 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2249 'src_id' '' 2247 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2364 'new_prp_id' '' 2362 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2251 'hdferr' '' 2247 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2245 'hdferr' '' 2243 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2244 'prp_id' '' 2243 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2239 'prp_id' '' 2238 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1006 'majnum' '' 1005 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2365 'hdferr' '' 2362 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2307 'ocpl_id' '' 2306 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2309 'hdferr' '' 2306 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2241 'hdferr' '' 2238 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2276 'ocpl_id' '' 2275 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2240 'flag' '' 2238 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2278 'min_dense' '' 2275 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2279 'hdferr' '' 2275 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2283 'size' '' 2281 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2282 'plist_id' '' 2281 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2308 'crt_order_flags' '' 2306 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2313 'threshold' '' 2311 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2301 'prp_id' '' 2300 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2296 'left' '' 2294 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2297 'middle' '' 2294 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2298 'right' '' 2294 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2295 'prp_id' '' 2294 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2304 'hdferr' '' 2300 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2299 'hdferr' '' 2294 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2351 'dapl_id' '' 2350 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2303 'value' '' 2300 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2284 'hdferr' '' 2281 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2354 'rdcc_w0' '' 2350 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL
-4 ()) 0 0 () () 0 () ())
-2355 'hdferr' '' 2350 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2352 'rdcc_nslots' '' 2350 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2347 'dims' '' 2344 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 2346 ())) 0 () ())
-2346 'ndims' '' 2344 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2302 'name' '' 2300 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2353 'rdcc_nbytes' '' 2350 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2261 'name' '' 2259 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2345 'prp_id' '' 2344 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2336 'classtype' '' 2334 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2277 'max_compact' '' 2275 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2326 'hdferr' '' 2323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2288 'mdc_nelmts' '' 2286 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2291 'rdcc_w0' '' 2286 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL
-4 ()) 0 0 () () 0 () ())
-2287 'prp_id' '' 2286 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2289 'rdcc_nelmts' '' 2286 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2292 'hdferr' '' 2286 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2341 'parent_id' '' 2339 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2342 'hdferr' '' 2339 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2329 'prp_id' '' 2328 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2330 'name' '' 2328 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2331 'size' '' 2328 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2340 'prp_id' '' 2339 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2290 'rdcc_nbytes' '' 2286 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2370 'hdferr' '' 2367 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2369 'crt_intermed_group' '' 2367 ((VARIABLE IN UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2378 'prp_id' '' 2377 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2368 'lcpl_id' '' 2367 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2337 'hdferr' '' 2334 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2448 'flag' '' 2446 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2396 'hdferr' '' 2393 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2395 'count' '' 2393 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2380 'hdferr' '' 2377 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2447 'prp_id' '' 2446 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2405 'prp_id' '' 2404 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2406 'idx' '' 2404 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2379 'driver' '' 2377 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2325 'encoding' '' 2323 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2332 'hdferr' '' 2328 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2358 'class' '' 2357 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2324 'plist_id' '' 2323 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2394 'prp_id' '' 2393 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2449 'hdferr' '' 2446 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2410 'bytes' '' 2404 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2409 'offset' '' 2404 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2360 'hdferr' '' 2357 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2359 'prp_id' '' 2357 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2335 'prp_id' '' 2334 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2348 'hdferr' '' 2344 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-758 'memtype_id' '' 756 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1453 'mem_space_id' '' 1447 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2672 'plist_id' '' 2671 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2388 'gcpl_id' '' 2387 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2391 'hdferr' '' 2387 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2375 'hdferr' '' 2372 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2674 'hdferr' '' 2671 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2675 'size' '' 2671 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-2389 'est_num_entries' '' 2387 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2390 'est_name_len' '' 2387 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2374 'copy_options' '' 2372 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2441 'alignment' '' 2439 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2373 'ocp_plist_id' '' 2372 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2411 'hdferr' '' 2404 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2408 'name' '' 2404 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2673 'expression' '' 2671 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2444 'hdferr' '' 2439 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2443 'cbuf_size' '' 2439 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2442 'block_size' '' 2439 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2399 'prp_id' '' 2398 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2401 'backing_store' '' 2398 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(LOGICAL 4 ()) 0 0 () () 0 () ())
-2402 'hdferr' '' 2398 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2426 'memb_plist' '' 2423 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2430 'plist_id' '' 2429 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2431 'flag' '' 2429 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2424 'prp_id' '' 2423 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2440 'fapl_id' '' 2439 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2427 'hdferr' '' 2423 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2400 'increment' '' 2398 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2667 'type_id' '' 2665 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2437 'hdferr' '' 2434 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2435 'fapl_id' '' 2434 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2432 'hdferr' '' 2429 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2453 'fillvalue' '' 2450 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2668 'fillvalue' '' 2665 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () () 0 () ())
-2452 'type_id' '' 2450 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2454 'hdferr' '' 2450 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2669 'hdferr' '' 2665 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2462 'prp_id' '' 2461 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2464 'flags' '' 2461 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2465 'cd_nelmts' '' 2461 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2468 'name' '' 2461 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2469 'filter_id' '' 2461 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2466 'cd_values' '' 2461 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2503 'prp_id' '' 2502 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2436 'degree' '' 2434 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2463 'filter_number' '' 2461 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2425 'memb_size' '' 2423 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2451 'prp_id' '' 2450 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2467 'namelen' '' 2461 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2470 'hdferr' '' 2461 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2666 'prp_id' '' 2665 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2506 'cd_nelmts' '' 2502 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2507 'cd_values' '' 2502 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2509 'name' '' 2502 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2510 'hdferr' '' 2502 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2505 'flags' '' 2502 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2407 'name_size' '' 2404 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2457 'type_id' '' 2455 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2493 'plist_id' '' 2492 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2495 'hdferr' '' 2492 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2487 'prp_id' '' 2486 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2489 'value' '' 2486 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2488 'name' '' 2486 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2458 'fillvalue' '' 2455 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 4 ()) 0 0 () () 0 () ())
-2473 'prp_id' '' 2472 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2490 'hdferr' '' 2486 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2494 'size' '' 2492 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2459 'hdferr' '' 2455 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2499 'gc_reference' '' 2497 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2498 'prp_id' '' 2497 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2500 'hdferr' '' 2497 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2480 'hdferr' '' 2477 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2475 'hdferr' '' 2472 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2456 'prp_id' '' 2455 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2479 'crt_order_flags' '' 2477 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2478 'gcpl_id' '' 2477 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2504 'filter_id' '' 2502 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2474 'ik' '' 2472 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2483 'prp_id' '' 2482 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2530 'size' '' 2528 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2519 'size_hint' '' 2517 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2518 'gcpl_id' '' 2517 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2267 'flag' '' 2265 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2531 'hdferr' '' 2528 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2485 'hdferr' '' 2482 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2484 'layout' '' 2482 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2535 'nlinks' '' 2533 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2534 'lapl_id' '' 2533 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2663 'nfilters' '' 2661 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2520 'hdferr' '' 2517 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2536 'hdferr' '' 2533 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2550 'flag' '' 2548 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2664 'hdferr' '' 2661 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2551 'hdferr' '' 2548 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2539 'prp_id' '' 2538 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2541 'hdferr' '' 2538 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2549 'plist_id' '' 2548 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2540 'nprops' '' 2538 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2554 'plist_id' '' 2553 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2555 'size' '' 2553 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2566 'name' '' 2564 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2565 'prp_id' '' 2564 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2556 'hdferr' '' 2553 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2662 'prp_id' '' 2661 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2559 'prp_id' '' 2558 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2567 'size' '' 2564 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2571 'name' '' 2569 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2570 'prp_id' '' 2569 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2562 'hdferr' '' 2558 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2560 'sizeof_addr' '' 2558 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2561 'sizeof_size' '' 2558 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2546 'hdferr' '' 2543 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2545 'flag' '' 2543 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2544 'prp_id' '' 2543 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2592 'hdferr' '' 2589 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2591 'block_size' '' 2589 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2573 'hdferr' '' 2569 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2602 'size' '' 2599 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2600 'plist' '' 2599 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2594 'plist' '' 2593 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2604 'hdferr' '' 2599 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2585 'size' '' 2582 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2590 'prp_id' '' 2589 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2584 'name' '' 2582 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2587 'hdferr' '' 2582 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2583 'plist' '' 2582 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2596 'size' '' 2593 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2595 'name' '' 2593 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2603 'value' '' 2599 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2601 'name' '' 2599 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2568 'hdferr' '' 2564 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2632 'flags' '' 2629 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2634 'cd_values' '' 2629 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2652 'value' '' 2648 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2651 'size' '' 2648 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2653 'hdferr' '' 2648 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2633 'cd_nelmts' '' 2629 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2635 'hdferr' '' 2629 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2649 'class' '' 2648 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2597 'value' '' 2593 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2598 'hdferr' '' 2593 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2586 'value' '' 2582 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2624 'name' '' 2622 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2650 'name' '' 2648 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2631 'filter' '' 2629 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2627 'hdferr' '' 2622 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2903 'hdferr' '' 2900 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2626 'value' '' 2622 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2625 'size' '' 2622 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2630 'prp_id' '' 2629 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2902 'name' '' 2900 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2696 'hdferr' '' 2693 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2704 'prp_id' '' 2703 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2705 'threshold' '' 2703 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2694 'plist_id' '' 2693 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2695 'flag' '' 2693 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2689 'prp_id' '' 2688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2691 'hdferr' '' 2688 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2645 'size' '' 2642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2647 'hdferr' '' 2642 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2643 'class' '' 2642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2901 'plid' '' 2900 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2644 'name' '' 2642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2707 'hdferr' '' 2703 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2690 'filter' '' 2688 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2659 'hdferr' '' 2655 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2577 'boot' '' 2575 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2658 'flag' '' 2655 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2656 'plist' '' 2655 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2657 'pclass' '' 2655 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2579 'stab' '' 2575 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2578 'freelist' '' 2575 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2614 'ik' '' 2612 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2576 'prp_id' '' 2575 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2580 'shhdr' '' 2575 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 4 ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2706 'alignment' '' 2703 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2646 'value' '' 2642 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2616 'hdferr' '' 2612 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2701 'hdferr' '' 2698 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2699 'ocpl_id' '' 2698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2700 'crt_order_flags' '' 2698 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2526 'hdferr' '' 2522 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2524 'max_compact' '' 2522 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2613 'prp_id' '' 2612 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2523 'gcpl_id' '' 2522 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2615 'lk' '' 2612 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2623 'class' '' 2622 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2729 'mdc_nelmts' '' 2727 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2728 'prp_id' '' 2727 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2732 'rdcc_w0' '' 2727 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2733 'hdferr' '' 2727 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2755 'value' '' 2752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2754 'name' '' 2752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2718 'size' '' 2716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2719 'hdferr' '' 2716 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2756 'hdferr' '' 2752 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2717 'plist_id' '' 2716 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2731 'rdcc_nbytes' '' 2727 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2738 'hdferr' '' 2735 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2737 'encoding' '' 2735 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2730 'rdcc_nelmts' '' 2727 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2736 'plist_id' '' 2735 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2581 'hdferr' '' 2575 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2742 'ndims' '' 2740 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2743 'dims' '' 2740 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 4 ()) 0 2742 ())) 0 () ())
-2766 'hdferr' '' 2763 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2744 'hdferr' '' 2740 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2838 'gcpl_id' '' 2837 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2764 'lcpl_id' '' 2763 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2841 'hdferr' '' 2837 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2840 'est_name_len' '' 2837 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2774 'prp_id' '' 2773 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2839 'est_num_entries' '' 2837 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2765 'crt_intermed_group' '' 2763 ((VARIABLE IN UNKNOWN-PROC UNKNOWN
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2525 'min_dense' '' 2522 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2844 'prp_id' '' 2843 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2741 'prp_id' '' 2740 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2845 'flag' '' 2843 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2846 'hdferr' '' 2843 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2776 'hdferr' '' 2773 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1007 'minnum' '' 1005 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2619 'plist_id' '' 2618 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2822 'backing_store' '' 2819 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2572 'value' '' 2569 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2620 'size' '' 2618 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2821 'increment' '' 2819 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2786 'prp_id' '' 2785 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2787 'offset' '' 2785 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2791 'prp_id' '' 2790 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2823 'hdferr' '' 2819 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2621 'hdferr' '' 2618 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2753 'prp_id' '' 2752 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2775 'level' '' 2773 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2508 'namelen' '' 2502 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2794 'hdferr' '' 2790 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2793 'memb_plist' '' 2790 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2788 'hdferr' '' 2785 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2792 'memb_size' '' 2790 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2798 'alignment' '' 2796 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2797 'fapl_id' '' 2796 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2782 'bytes' '' 2778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-8 ()) 0 0 () () 0 () ())
-2780 'name' '' 2778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2781 'offset' '' 2778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2779 'prp_id' '' 2778 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2801 'hdferr' '' 2796 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2783 'hdferr' '' 2778 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2799 'block_size' '' 2796 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2800 'cbuf_size' '' 2796 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2832 'meta_plist' '' 2829 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2835 'hdferr' '' 2829 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2833 'raw_ext' '' 2829 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2834 'raw_plist' '' 2829 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2831 'meta_ext' '' 2829 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2813 'hdferr' '' 2811 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2761 'hdferr' '' 2758 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2856 'hdferr' '' 2852 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2855 'fillvalue' '' 2852 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 ((CONSTANT (INTEGER 4 ()) 0 '1'))) 0 0 () () 0 () ())
-2759 'plist_id' '' 2758 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2760 'expression' '' 2758 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2812 'prp_id' '' 2811 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2854 'type_id' '' 2852 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2861 'hdferr' '' 2858 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2853 'prp_id' '' 2852 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2826 'prp_id' '' 2825 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2859 'plist_id' '' 2858 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2896 'fapl_id' '' 2895 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2816 'relax' '' 2814 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2817 'hdferr' '' 2814 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2827 'hdferr' '' 2825 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2803 'prp_id' '' 2802 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2815 'prp_id' '' 2814 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2898 'hdferr' '' 2895 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2804 'memb_map' '' 2802 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-2805 'memb_fapl' '' 2802 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-2806 'memb_name' '' 2802 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0
-'0') (OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (
-CONSTANT (INTEGER 4 ()) 0 '1'))) 0 () ())
-2807 'memb_addr' '' 2802 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0') (
-OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (CONSTANT (
-INTEGER 4 ()) 0 '1'))) 0 () ())
-2897 'degree' '' 2895 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2866 'hdferr' '' 2862 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2891 'type_id' '' 2889 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1008 'relnum' '' 1005 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2893 'hdferr' '' 2889 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2883 'hdferr' '' 2881 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2882 'prp_id' '' 2881 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2865 'fillvalue' '' 2862 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2892 'fillvalue' '' 2889 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 4 ()) 0 0 () () 0 () ())
-2863 'prp_id' '' 2862 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2809 'hdferr' '' 2802 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2860 'flag' '' 2858 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-3602 'hdferr' '' 3599 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2887 'gc_reference' '' 2885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2886 'prp_id' '' 2885 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2890 'prp_id' '' 2889 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3600 'plist_id' '' 3599 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2874 'prp_id' '' 2873 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2876 'flags' '' 2873 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-3601 'size' '' 3599 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2830 'prp_id' '' 2829 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2875 'filter' '' 2873 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2888 'hdferr' '' 2885 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2879 'hdferr' '' 2873 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2808 'relax' '' 2802 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL
-4 ()) 0 0 () () 0 () ())
-2933 'prp_id' '' 2932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2934 'layout' '' 2932 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2935 'hdferr' '' 2932 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2864 'type_id' '' 2862 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2913 'high' '' 2910 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2908 'hdferr' '' 2905 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2914 'hdferr' '' 2910 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2907 'ik' '' 2905 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-2878 'cd_values' '' 2873 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0
-'1') ()) 0 () ())
-2911 'fapl_id' '' 2910 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2906 'prp_id' '' 2905 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2912 'low' '' 2910 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4
-()) 0 0 () () 0 () ())
-2930 'hdferr' '' 2926 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2928 'max_compact' '' 2926 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2927 'gcpl_id' '' 2926 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2956 'prp_id' '' 2955 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2959 'hdferr' '' 2955 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2958 'value' '' 2955 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2957 'name' '' 2955 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2226 'error' '' 2225 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2849 'ocp_plist_id' '' 2848 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2850 'copy_options' '' 2848 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2749 'rdcc_nbytes' '' 2746 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2748 'rdcc_nslots' '' 2746 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2747 'dapl_id' '' 2746 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2851 'hdferr' '' 2848 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2942 'lapl_id' '' 2941 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2751 'hdferr' '' 2746 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2943 'nlinks' '' 2941 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2750 'rdcc_w0' '' 2746 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-3597 'hdferr' '' 3594 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3595 'prp_id' '' 3594 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2944 'hdferr' '' 2941 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2948 'flag' '' 2946 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-2949 'hdferr' '' 2946 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3596 'flag' '' 3594 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (LOGICAL 4
-()) 0 0 () () 0 () ())
-2962 'name' '' 2960 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2963 'value' '' 2960 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2952 'plist_id' '' 2951 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2939 'hdferr' '' 2937 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2938 'plist_id' '' 2937 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2969 'mesg_type_flags' '' 2966 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2970 'min_mesg_size' '' 2966 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2953 'size' '' 2951 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2954 'hdferr' '' 2951 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2964 'hdferr' '' 2960 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2961 'prp_id' '' 2960 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2947 'plist_id' '' 2946 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2967 'fcpl_id' '' 2966 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3062 'plist_id' '' 3061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3064 'hdferr' '' 3061 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3008 'prp_id' '' 3007 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3063 'nindexes' '' 3061 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2968 'index_num' '' 2966 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2982 'sizeof_size' '' 2979 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2991 'prp_id' '' 2990 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2992 'options_mask' '' 2990 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3014 'hdferr' '' 3011 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3013 'name' '' 3011 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3012 'class' '' 3011 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2981 'sizeof_addr' '' 2979 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2994 'hdferr' '' 2990 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1013 'error' '' 1012 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2999 'lk' '' 2996 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-2997 'prp_id' '' 2996 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3009 'hdferr' '' 3007 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2983 'hdferr' '' 2979 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2998 'ik' '' 2996 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 4 ())
-0 0 () () 0 () ())
-3018 'size' '' 3016 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3000 'hdferr' '' 2996 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2986 'plist_id' '' 2985 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2988 'hdferr' '' 2985 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3003 'plist_id' '' 3002 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3019 'hdferr' '' 3016 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3004 'size' '' 3002 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3005 'hdferr' '' 3002 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2987 'size' '' 2985 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-3017 'prp_id' '' 3016 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2974 'plist_id' '' 2973 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2993 'pixels_per_block' '' 2990 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-2980 'prp_id' '' 2979 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2929 'min_dense' '' 2926 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2975 'scale_type' '' 2973 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2917 'gcpl_id' '' 2916 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2919 'hdferr' '' 2916 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2918 'crt_order_flags' '' 2916 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY)
-(INTEGER 4 ()) 0 0 () () 0 () ())
-1990 'majnum' '' 1989 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2710 'prp_id' '' 2709 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2711 'left' '' 2709 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2722 'ocpl_id' '' 2721 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2714 'hdferr' '' 2709 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2712 'middle' '' 2709 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4
-()) 0 0 () () 0 () ())
-2922 'gcpl_id' '' 2921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2723 'max_compact' '' 2721 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2713 'right' '' 2709 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 4 ())
-0 0 () () 0 () ())
-2923 'size_hint' '' 2921 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-2924 'hdferr' '' 2921 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2971 'hdferr' '' 2966 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2415 'memb_map' '' 2413 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-2416 'memb_fapl' '' 2413 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (INTEGER 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0')
-(OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (CONSTANT
-(INTEGER 4 ()) 0 '1'))) 0 () ())
-2414 'prp_id' '' 2413 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2421 'maxlen_out' '' 2413 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-2419 'relax' '' 2413 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-2420 'hdferr' '' 2413 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2725 'hdferr' '' 2721 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1991 'minnum' '' 1989 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2272 'flag' '' 2270 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2417 'memb_name' '' 2413 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (CHARACTER 1 (())) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0
-'0') (OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (
-CONSTANT (INTEGER 4 ()) 0 '1'))) 0 () ())
-2820 'prp_id' '' 2819 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2529 'plist_id' '' 2528 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2977 'hdferr' '' 2973 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2724 'min_dense' '' 2721 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2271 'plist_id' '' 2270 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3023 'loc_id' '' 3022 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3024 'name' '' 3022 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2273 'hdferr' '' 2270 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2418 'memb_addr' '' 2413 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DIMENSION
-DUMMY) (REAL 4 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '0') (
-OP (INTEGER 4 ()) 0 MINUS (VARIABLE (INTEGER 4 ()) 0 332 ()) (CONSTANT (
-INTEGER 4 ()) 0 '1'))) 0 () ())
-3029 'name' '' 3027 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3053 'obj_id' '' 3050 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3031 'ref' '' 3027 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3575 ()) 0 0 () () 0 () ())
-3026 'hdferr' '' 3022 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3028 'loc_id' '' 3027 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3051 'dset_id' '' 3050 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3052 'ref' '' 3050 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3575 ()) 0 0 () () 0 () ())
-3034 'dset_id' '' 3033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3040 'ref' '' 3038 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3575 ()) 0 0 () () 0 () ())
-3039 'loc_id' '' 3038 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3036 'obj_id' '' 3033 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3035 'ref' '' 3033 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3578 ()) 0 0 () () 0 () ())
-3043 'size' '' 3038 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-3042 'hdferr' '' 3038 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3045 'loc_id' '' 3044 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3032 'hdferr' '' 3027 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3037 'hdferr' '' 3033 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3048 'hdferr' '' 3044 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3054 'hdferr' '' 3050 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3025 'ref' '' 3022 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3578 ()) 0 0 () () 0 () ())
-3041 'name' '' 3038 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3046 'ref' '' 3044 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3578 ()) 0 0 () () 0 () ())
-3066 'dset_id' '' 3065 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3030 'space_id' '' 3027 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3056 'dset_id' '' 3055 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3069 'hdferr' '' 3065 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3067 'ref' '' 3065 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3575 ()) 0 0 () () 0 () ())
-3047 'name' '' 3044 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-3059 'hdferr' '' 3055 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3049 'size' '' 3044 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN OPTIONAL DUMMY)
-(INTEGER 8 ()) 0 0 () () 0 () ())
-3058 'obj_type' '' 3055 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3567 'hdferr' '' 3564 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3057 'ref' '' 3055 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (DERIVED
-3578 ()) 0 0 () () 0 () ())
-3565 'filter' '' 3564 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3560 'filter' '' 3559 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3572 'filter' '' 3571 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3562 'hdferr' '' 3559 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3573 'hdferr' '' 3571 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3561 'config_flags' '' 3559 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-3566 'status' '' 3564 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-LOGICAL 4 ()) 0 0 () () 0 () ())
-3068 'space_id' '' 3065 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2976 'scale_factor' '' 2973 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-658 'dims' '' 654 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-655 'attr_id' '' 654 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-657 'buf' '' 654 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 658 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-658 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-656 'memtype_id' '' 654 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-709 'attr_id' '' 708 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-712 'dims' '' 708 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-662 'memtype_id' '' 660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-663 'buf' '' 660 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 664 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-661 'attr_id' '' 660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-710 'memtype_id' '' 708 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-691 'attr_id' '' 690 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-659 'hdferr' '' 654 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-713 'hdferr' '' 708 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-711 'buf' '' 708 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 712 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-712 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 712 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-692 'memtype_id' '' 690 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-693 'buf' '' 690 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 694 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-694 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 694 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 694 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-680 'memtype_id' '' 678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-664 'dims' '' 660 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-694 'dims' '' 690 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-695 'hdferr' '' 690 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-683 'hdferr' '' 678 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-679 'attr_id' '' 678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-697 'attr_id' '' 696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-682 'dims' '' 678 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-681 'buf' '' 678 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 682 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-682 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 682 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 682 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-682 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 682 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-700 'dims' '' 696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-699 'buf' '' 696 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-703 'attr_id' '' 702 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-701 'hdferr' '' 696 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-698 'memtype_id' '' 696 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-665 'hdferr' '' 660 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-705 'buf' '' 702 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 706 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-706 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 706 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 706 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-706 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 706 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 706 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-687 'buf' '' 684 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 688 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-688 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 688 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 688 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-688 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-686 'memtype_id' '' 684 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-707 'hdferr' '' 702 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-685 'attr_id' '' 684 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-689 'hdferr' '' 684 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-688 'dims' '' 684 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-704 'memtype_id' '' 702 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-855 'attr_id' '' 854 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-859 'hdferr' '' 854 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-858 'dims' '' 854 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-861 'attr_id' '' 860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-864 'dims' '' 860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-875 'buf' '' 872 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 876 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 876 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 876 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 876 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-876 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 876 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 876 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-865 'hdferr' '' 860 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-862 'memtype_id' '' 860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-857 'buf' '' 854 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 858 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 858 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-706 'dims' '' 702 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-887 'buf' '' 884 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ()) 0
-0 () () 0 () ())
-876 'dims' '' 872 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-889 'hdferr' '' 884 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-886 'memtype_id' '' 884 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-873 'attr_id' '' 872 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-880 'memtype_id' '' 878 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-879 'attr_id' '' 878 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-885 'attr_id' '' 884 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-888 'dims' '' 884 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-874 'memtype_id' '' 872 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-863 'buf' '' 860 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 864 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 864 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 864 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 864 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-882 'dims' '' 878 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-883 'hdferr' '' 878 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-894 'dims' '' 890 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-850 'memtype_id' '' 848 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-895 'hdferr' '' 890 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-853 'hdferr' '' 848 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-852 'dims' '' 848 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-870 'dims' '' 866 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-867 'attr_id' '' 866 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-851 'buf' '' 848 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 852 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 852 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 852 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-869 'buf' '' 866 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 870 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-891 'attr_id' '' 890 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-849 'attr_id' '' 848 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-871 'hdferr' '' 866 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-1054 'buf' '' 1051 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ()) 0
-() ())
-1171 'mem_type_id' '' 1169 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1170 'dset_id' '' 1169 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1053 'space_id' '' 1051 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-868 'memtype_id' '' 866 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1172 'buf' '' 1169 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1173 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1173 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1173 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1173 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1173 'dims' '' 1169 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-892 'memtype_id' '' 890 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-877 'hdferr' '' 872 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-893 'buf' '' 890 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 894 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 894 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 894 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 894 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-894 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1052 'fill_value' '' 1051 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 8 ()) 0 0 () () 0 () ())
-1177 'xfer_prp' '' 1169 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-856 'memtype_id' '' 854 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1184 'mem_space_id' '' 1178 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1185 'file_space_id' '' 1178 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1174 'hdferr' '' 1169 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1175 'mem_space_id' '' 1169 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1179 'dset_id' '' 1178 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1176 'file_space_id' '' 1169 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-881 'buf' '' 878 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 882 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 882 ((
-ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 882 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 882 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-882 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 882 ((ARRAY (ELEMENT 1 (
-CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1181 'buf' '' 1178 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1182 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1182 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1182 'dims' '' 1178 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1155 'dims' '' 1151 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1154 'buf' '' 1151 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1155 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1155 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1153 'mem_type_id' '' 1151 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1157 'mem_space_id' '' 1151 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1159 'xfer_prp' '' 1151 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1158 'file_space_id' '' 1151 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1183 'hdferr' '' 1178 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1164 'dims' '' 1160 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1162 'mem_type_id' '' 1160 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1055 'hdferr' '' 1051 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2877 'cd_nelmts' '' 2873 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 8 ()) 0 0 () () 0 () ())
-1165 'hdferr' '' 1160 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1156 'hdferr' '' 1151 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1161 'dset_id' '' 1160 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1167 'file_space_id' '' 1160 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1206 'dset_id' '' 1205 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1207 'mem_type_id' '' 1205 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1210 'hdferr' '' 1205 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1209 'dims' '' 1205 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1168 'xfer_prp' '' 1160 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1152 'dset_id' '' 1151 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1212 'file_space_id' '' 1205 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1225 'mem_type_id' '' 1223 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1166 'mem_space_id' '' 1160 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1224 'dset_id' '' 1223 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1211 'mem_space_id' '' 1205 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1208 'buf' '' 1205 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1209 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1209 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1209 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1229 'mem_space_id' '' 1223 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1227 'dims' '' 1223 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1228 'hdferr' '' 1223 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1230 'file_space_id' '' 1223 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1578 'hdferr' '' 1573 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1576 'buf' '' 1573 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (2 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1577 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1577 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1))))) 0 () ())
-1577 'dims' '' 1573 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1581 'xfer_prp' '' 1573 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1579 'mem_space_id' '' 1573 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1575 'mem_type_id' '' 1573 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1521 'mem_type_id' '' 1519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1574 'dset_id' '' 1573 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1524 'hdferr' '' 1519 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1522 'buf' '' 1519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (4 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1523 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1523 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1523 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1523 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1))))) 0 () ())
-1527 'xfer_prp' '' 1519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1565 'dset_id' '' 1564 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1566 'mem_type_id' '' 1564 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1580 'file_space_id' '' 1573 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1525 'mem_space_id' '' 1519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1570 'mem_space_id' '' 1564 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1569 'hdferr' '' 1564 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1567 'buf' '' 1564 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (3 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1568 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1568 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1568 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1))))) 0 () ())
-1571 'file_space_id' '' 1564 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1523 'dims' '' 1519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1520 'dset_id' '' 1519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1568 'dims' '' 1564 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1494 'mem_type_id' '' 1492 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1493 'dset_id' '' 1492 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1498 'mem_space_id' '' 1492 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1499 'file_space_id' '' 1492 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1500 'xfer_prp' '' 1492 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1233 'dset_id' '' 1232 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1234 'mem_type_id' '' 1232 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1496 'dims' '' 1492 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1497 'hdferr' '' 1492 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1235 'buf' '' 1232 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1236 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1236 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1236 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1236 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1236 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1236 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1236 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1240 'xfer_prp' '' 1232 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1238 'mem_space_id' '' 1232 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1236 'dims' '' 1232 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1213 'xfer_prp' '' 1205 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1526 'file_space_id' '' 1519 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1217 'buf' '' 1214 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1218 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1218 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1215 'dset_id' '' 1214 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1239 'file_space_id' '' 1232 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1231 'xfer_prp' '' 1223 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1226 'buf' '' 1223 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8
-()) 0 0 () () 0 () ())
-1216 'mem_type_id' '' 1214 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1221 'file_space_id' '' 1214 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1222 'xfer_prp' '' 1214 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1220 'mem_space_id' '' 1214 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1218 'dims' '' 1214 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1550 'dims' '' 1546 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1548 'mem_type_id' '' 1546 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1551 'hdferr' '' 1546 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1549 'buf' '' 1546 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (7 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1550 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1550 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1550 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1550 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1550 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1550 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1550 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '7') 1))))) 0 () ())
-1219 'hdferr' '' 1214 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1554 'xfer_prp' '' 1546 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1495 'buf' '' 1492 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1496 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1))))) 0 () ())
-1237 'hdferr' '' 1232 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1553 'file_space_id' '' 1546 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1572 'xfer_prp' '' 1564 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1552 'mem_space_id' '' 1546 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1180 'mem_type_id' '' 1178 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1541 'dims' '' 1537 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1530 'mem_type_id' '' 1528 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1543 'mem_space_id' '' 1537 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1540 'buf' '' 1537 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-1532 'dims' '' 1528 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-1533 'hdferr' '' 1528 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1529 'dset_id' '' 1528 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1186 'xfer_prp' '' 1178 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1538 'dset_id' '' 1537 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1545 'xfer_prp' '' 1537 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1544 'file_space_id' '' 1537 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1531 'buf' '' 1528 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (6 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1532 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1532 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1532 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1532 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1532 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1)))) (CONSTANT
-(INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1532 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '6') 1))))) 0 () ())
-1547 'dset_id' '' 1546 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1535 'file_space_id' '' 1528 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1536 'xfer_prp' '' 1528 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1556 'dset_id' '' 1555 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1560 'hdferr' '' 1555 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1563 'xfer_prp' '' 1555 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1562 'file_space_id' '' 1555 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1558 'buf' '' 1555 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY) (
-REAL 8 ()) 0 0 () (5 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE
-(INTEGER 8 ()) 0 1559 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '1')
-1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1559 (
-(ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '2') 1)))) (CONSTANT (
-INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0 1559 ((ARRAY (ELEMENT 1
-(CONSTANT (INTEGER 8 ()) 0 '3') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1559 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '4') 1)))) (CONSTANT (INTEGER 4 ()) 0 '1') (VARIABLE (INTEGER 8 ()) 0
-1559 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ()) 0 '5') 1))))) 0 () ())
-1559 'dims' '' 1555 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(INTEGER 8 ()) 0 0 () (1 ASSUMED_SIZE (CONSTANT (INTEGER 4 ()) 0 '1') ())
-0 () ())
-2512 'prp_id' '' 2511 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1534 'mem_space_id' '' 1528 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1557 'mem_type_id' '' 1555 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2638 'name' '' 2636 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2639 'size' '' 2636 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2637 'class' '' 2636 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2640 'value' '' 2636 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-2641 'hdferr' '' 2636 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2609 'value' '' 2605 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-2610 'hdferr' '' 2605 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2606 'plist' '' 2605 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER
-4 ()) 0 0 () () 0 () ())
-2385 'hdferr' '' 2381 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2383 'name' '' 2381 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2382 'prp_id' '' 2381 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2608 'size' '' 2605 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (INTEGER 8
-()) 0 0 () () 0 () ())
-2514 'fillvalue' '' 2511 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 8 ()) 0 0 () () 0 () ())
-2513 'type_id' '' 2511 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2768 'prp_id' '' 2767 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2771 'hdferr' '' 2767 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2769 'name' '' 2767 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2770 'value' '' 2767 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8 ())
-0 0 () () 0 () ())
-2607 'name' '' 2605 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-CHARACTER 1 (())) 0 0 () () 0 () ())
-2869 'type_id' '' 2867 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2871 'hdferr' '' 2867 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1539 'mem_type_id' '' 1537 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2868 'prp_id' '' 2867 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2870 'fillvalue' '' 2867 ((VARIABLE IN UNKNOWN-PROC UNKNOWN DUMMY) (
-REAL 8 ()) 0 0 () () 0 () ())
-2515 'hdferr' '' 2511 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-2384 'value' '' 2381 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (REAL 8
-()) 0 0 () () 0 () ())
-1561 'mem_space_id' '' 1555 ((VARIABLE IN UNKNOWN-PROC UNKNOWN OPTIONAL
-DUMMY) (INTEGER 4 ()) 0 0 () () 0 () ())
-1542 'hdferr' '' 1537 ((VARIABLE OUT UNKNOWN-PROC UNKNOWN DUMMY) (
-INTEGER 4 ()) 0 0 () () 0 () ())
-1163 'buf' '' 1160 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN DIMENSION DUMMY)
-(REAL 8 ()) 0 0 () (1 EXPLICIT (CONSTANT (INTEGER 4 ()) 0 '1') (
-VARIABLE (INTEGER 8 ()) 0 1164 ((ARRAY (ELEMENT 1 (CONSTANT (INTEGER 8 ())
-0 '1') 1))))) 0 () ())
-)
-
-('h5pset_hyper_vector_size_f' 0 3598 'h5premove_f' 0 2899
-'h5aget_storage_size_f' 0 2682 'h5aget_name_by_idx_f' 0 569
-'floating_types_len' 0 552 '__convert_i4_i8' 0 438 'floating_types' 0
-191 'h5adelete_f' 0 547 'h5adelete_by_idx_f' 0 487 'h5_iter_unknown_f' 0
-381 'fortran_integer_1' 0 451 'fortran_double' 0 440 'fortran_integer' 0
-439 'fortran_real_4' 0 450 'fortran_integer_2' 0 446 'fortran_real' 0
-445 'fortran_integer_4' 0 442 'fortran_integer_8' 0 441 'fortran_real_12'
-0 444 'fortran_real_16' 0 443 'h5_integer_kind' 0 449
-'h5_index_crt_order_f' 0 383 'fortran_real_8' 0 448 'h5_dble_interface'
-0 447 'h5_index_n_f' 0 382 'h5_index_unknown_f' 0 385 'h5_index_name_f'
-0 384 'h5_iter_dec_f' 0 379 'h5_iter_native_f' 0 378 'h5_iter_n_f' 0 377
-'h5_iter_inc_f' 0 380 'h5acreate_f' 0 470 'h5a' 0 469 'h5_szip_ec_om_f'
-0 199 'h5_real_kind' 0 452 'h5_szip_nn_om_f' 0 198 'h5aclose_f' 0 465
-'h5acreate_by_name_f' 0 453 'h5adelete_by_name_f' 0 480
-'h5aget_create_plist_f' 0 542 'h5aexists_f' 0 504 'h5aexists_by_name_f'
-0 496 'h5aget_info_by_name_f' 0 531 'h5aget_info_by_idx_f' 0 510
-'h5aget_info_f' 0 523 'h5aget_num_attrs_f' 0 564 'h5aget_name_f' 0 553
-'h5aget_space_f' 0 559 'h5aopen_name_f' 0 2676 'h5aopen_f' 0 611
-'h5aget_type_f' 0 600 'h5aopen_by_idx_f' 0 589 'h5aopen_by_name_f' 0 580
-'h5aopen_idx_f' 0 605 'h5p_string_create_f' 0 276 'h5dset_extent_f' 0 66
-'h5aread_double_3' 0 30 'h5aread_char_7' 0 10 'h5aread_char_4' 0 13
-'h5aread_char_1' 0 16 'h5aread_char_3' 0 14 'h5aread_char_2' 0 15
-'h5aread_char_6' 0 11 'h5aread_char_5' 0 12 'h5aread_char_scalar' 0 17
-'h5aread_double_1' 0 32 'h5aread_double_2' 0 31 'h5aread_double_7' 0 26
-'h5aread_double_4' 0 29 'h5aread_double_5' 0 28 'h5aread_double_6' 0 27
-'h5aread_double_scalar' 0 33 'h5dread_vl_integer' 0 107
-'h5d_fill_time_error_f' 0 352 'h5aread_real_3' 0 6 'h5aread_integer_3' 0
-22 'h5aread_integer_1' 0 24 'h5aread_integer_2' 0 23 'h5aread_integer_5'
-0 20 'h5aread_integer_4' 0 21 'h5aread_real_2' 0 7 'h5aread_real_1' 0 8
-'h5aread_integer_7' 0 18 'h5aread_integer_6' 0 19 'h5aread_integer_scalar'
-0 25 'h5awrite_real_7' 0 34 'h5awrite_integer_5' 0 52 'h5aread_real_6' 0
-3 'h5aread_real_4' 0 5 'h5aread_real_5' 0 4 'h5awrite_char_1' 0 48
-'h5arename_by_name_f' 0 804 'h5aread_real_7' 0 2 'h5aread_real_scalar' 0
-9 'h5arename_f' 0 798 'h5awrite_char_scalar' 0 49 'h5awrite_char_3' 0 46
-'h5awrite_char_2' 0 47 'h5awrite_char_6' 0 43 'h5awrite_char_4' 0 45
-'h5awrite_char_5' 0 44 'h5awrite_char_7' 0 42 'h5awrite_double_5' 0 60
-'h5awrite_double_1' 0 64 'h5awrite_double_4' 0 61 'h5awrite_double_2' 0
-63 'h5awrite_double_3' 0 62 'h5awrite_double_scalar' 0 65
-'h5awrite_double_6' 0 59 'h5awrite_double_7' 0 58 'h5awrite_integer_4' 0
-53 'h5awrite_integer_2' 0 55 'h5awrite_integer_1' 0 56
-'h5awrite_integer_3' 0 54 'h5awrite_integer_6' 0 51
-'h5awrite_integer_scalar' 0 57 'h5awrite_integer_7' 0 50 'h5awrite_real_3'
-0 38 'h5awrite_real_2' 0 39 'h5awrite_real_1' 0 40 'h5awrite_real_4' 0
-37 'h5awrite_real_5' 0 36 'h5awrite_real_6' 0 35 'h5d_alloc_time_early_f'
-0 359 'h5d_alloc_time_default_f' 0 360 'h5close_f' 0 1011
-'h5check_version_f' 0 1004 'h5awrite_real_scalar' 0 41 'h5d' 0 1010
-'h5d_contiguous_f' 0 363 'h5d_compact_f' 0 364 'h5d_alloc_time_late_f' 0
-358 'h5d_alloc_time_error_f' 0 361 'h5d_alloc_time_incr_f' 0 357
-'h5d_chunked_f' 0 362 'h5d_chunk_cache_nslots_dflt_f' 0 345
-'h5d_chunk_cache_nbytes_dflt_f' 0 344 'h5d_chunk_cache_w0_dflt_f' 0 343
-'h5d_fill_time_alloc_f' 0 351 'h5dread_real_scalar' 0 78
-'h5dget_access_plist_f' 0 1385 'h5dfill_char' 0 67
-'h5d_fill_value_user_defined_f' 0 346 'h5d_fill_time_never_f' 0 350
-'h5d_fill_value_error_f' 0 349 'h5d_fill_value_default_f' 0 347
-'h5d_fill_value_undefined_f' 0 348 'h5d_space_sts_not_allocated_f' 0 355
-'h5d_space_sts_error_f' 0 356 'h5d_flags_len' 0 1026 'h5d_flags' 0 180
-'h5d_space_sts_allocated_f' 0 353 'h5dclose_f' 0 1047
-'h5d_space_sts_part_allocated_f' 0 354 'h5dcreate_f' 0 1036
-'h5dcreate_anon_f' 0 1027 'h5dfill_double' 0 70 'h5dfill_real' 0 68
-'h5dfill_integer' 0 69 'h5dread_integer_7' 0 87 'h5dread_char_4' 0 82
-'h5dget_space_status_f' 0 1128 'h5dget_create_plist_f' 0 1076
-'h5dget_space_f' 0 1071 'h5dont_atexit_f' 0 1125 'h5dget_storage_size_f'
-0 1086 'h5dget_type_f' 0 1081 'h5dopen_f' 0 1118 'h5dread_char_1' 0 85
-'h5dread_char_2' 0 84 'h5dread_char_3' 0 83 'h5dread_double_7' 0 97
-'h5dread_double_5' 0 99 'h5dread_char_5' 0 81 'h5dread_char_scalar' 0 86
-'h5dread_char_6' 0 80 'h5dread_char_7' 0 79 'h5dread_double_3' 0 101
-'h5dread_double_1' 0 103 'h5dread_double_2' 0 102 'h5dread_double_4' 0
-100 'h5dread_double_6' 0 98 'h5dread_double_scalar' 0 104
-'h5dread_integer_3' 0 91 'h5dread_integer_1' 0 93 'h5dread_integer_2' 0
-92 'h5dread_integer_5' 0 89 'h5dread_integer_4' 0 90 'h5dread_integer_6'
-0 88 'h5dread_real_2' 0 76 'h5dread_integer_scalar' 0 94 'h5dread_real_1'
-0 77 'h5dread_real_4' 0 74 'h5dread_real_3' 0 75 'h5dread_real_7' 0 71
-'h5dread_real_6' 0 72 'h5dread_real_5' 0 73 'h5dread_reference_dsetreg'
-0 95 'h5dread_reference_obj' 0 96 'h5dread_vl_string' 0 105
-'h5dread_vl_real' 0 106 'h5g_storage_type_dense_f' 0 365 'h5fclose_f' 0
-1902 'h5dwrite_real_scalar' 0 115 'h5dvlen_get_max_len_f' 0 1591
-'h5dwrite_char_1' 0 122 'h5dwrite_double_2' 0 139 'h5dwrite_char_2' 0
-121 'h5dwrite_char_scalar' 0 123 'h5dwrite_char_4' 0 119 'h5dwrite_char_3'
-0 120 'h5dwrite_char_7' 0 116 'h5dwrite_char_5' 0 118 'h5dwrite_char_6'
-0 117 'h5dwrite_double_1' 0 140 'h5dwrite_double_3' 0 138
-'h5dwrite_double_5' 0 136 'h5dwrite_double_4' 0 137 'h5dwrite_double_7'
-0 134 'h5dwrite_double_6' 0 135 'h5dwrite_double_scalar' 0 141
-'h5dwrite_integer_7' 0 124 'h5dwrite_integer_3' 0 128 'h5dwrite_integer_1'
-0 130 'h5dwrite_integer_2' 0 129 'h5dwrite_integer_4' 0 127
-'h5dwrite_integer_5' 0 126 'h5dwrite_integer_6' 0 125 'h5dwrite_real_2'
-0 113 'h5dwrite_real_1' 0 114 'h5dwrite_integer_scalar' 0 131
-'h5dwrite_real_7' 0 108 'h5dwrite_real_3' 0 112 'h5dwrite_real_4' 0 111
-'h5dwrite_real_5' 0 110 'h5dwrite_real_6' 0 109 'h5f_close_weak_f' 0 395
-'h5e' 0 1804 'h5dwrite_reference_obj' 0 133 'h5dwrite_reference_dsetreg'
-0 132 'h5dwrite_vl_integer' 0 144 'h5dwrite_vl_real' 0 143
-'h5dwrite_vl_string' 0 142 'h5f' 0 1803 'h5eset_auto_f' 0 1799
-'h5eget_major_f' 0 1793 'h5eclear_f' 0 1781 'h5eget_minor_f' 0 1788
-'h5eprint_f' 0 1784 'h5f_close_default_f' 0 396 'h5f_acc_trunc_f' 0 401
-'h5f_acc_rdonly_f' 0 402 'h5f_acc_debug_f' 0 399 'h5f_acc_excl_f' 0 400
-'h5f_acc_rdwr_f' 0 403 'h5f_close_semi_f' 0 394 'h5f_close_strong_f' 0
-393 'h5f_obj_file_f' 0 392 'h5f_libver_latest_f' 0 386 'h5f_flags' 0 193
-'h5f_flags_len' 0 1805 'h5f_libver_earliest_f' 0 387 'h5f_obj_datatype_f'
-0 389 'h5f_obj_dataset_f' 0 391 'h5f_obj_all_f' 0 388 'h5f_scope_global_f'
-0 397 'h5f_obj_group_f' 0 390 'h5f_scope_local_f' 0 398
-'h5fd_mpio_independent_f' 0 342 'h5fd_mem_default_f' 0 339
-'h5fd_hid_flags_len' 0 1824 'h5fd_core_f' 0 331 'h5fcreate_f' 0 1815
-'h5fd_hid_flags' 0 183 'h5fd_flags_len' 0 1823 'h5fd_family_f' 0 330
-'h5fd_flags' 0 185 'h5fd_log_f' 0 329 'h5fd_mem_btree_f' 0 337
-'h5fd_mem_ntypes_f' 0 332 'h5fd_mem_nolist_f' 0 340 'h5fd_mem_draw_f' 0
-336 'h5fd_mem_lheap_f' 0 334 'h5fd_mem_gheap_f' 0 335 'h5fd_mem_ohdr_f'
-0 333 'h5fd_mpio_f' 0 328 'h5fd_mem_super_f' 0 338
-'h5fd_mpio_collective_f' 0 341 'h5fget_access_plist_f' 0 1897
-'h5fd_stdio_f' 0 325 'h5fd_sec2_f' 0 326 'h5fd_multi_f' 0 327 'h5fflush_f'
-0 1825 'h5fmount_f' 0 1890 'h5fget_create_plist_f' 0 1865
-'h5fget_obj_ids_f' 0 1857 'h5fget_name_f' 0 1846 'h5fget_freespace_f' 0
-1835 'h5fget_filesize_f' 0 1830 'h5fget_obj_count_f' 0 1840 'h5fis_hdf5_f'
-0 1852 'h5fopen_f' 0 1883 'h5g_link_hard_f' 0 370 'h5g_dataset_f' 0 374
-'h5g' 0 1881 'h5fortran_types' 0 1880 'h5funmount_f' 0 1875 'h5freopen_f'
-0 1870 'h5g_link_error_f' 0 371 'h5g_group_f' 0 375 'h5g_flags_len' 0
-1882 'h5g_flags' 0 189 'h5g_link_f' 0 372 'h5g_link_soft_f' 0 369
-'h5g_storage_type_compact_f' 0 366 'h5o_hdr_attr_crt_order_track_f' 0
-296 'h5lget_info_by_idx_f' 0 2187 'h5iis_valid_f' 0 2141 'h5iget_type_f'
-0 2077 'h5glink2_f' 0 2064 'h5g_type_f' 0 373 'h5g_storage_type_unknown_f'
-0 368 'h5g_storage_type_symbol_table_f' 0 367 'h5generic_flags_len' 0
-1994 'h5gcreate_f' 0 1920 'h5gclose_f' 0 1916 'h5g_unknown_f' 0 376
-'h5garbage_collect_f' 0 1906 'h5gcreate_anon_f' 0 1909 'h5generic_flags'
-0 186 'h5get_libversion_f' 0 1988 'h5gget_comment_f' 0 1981
-'h5gget_obj_info_idx_f' 0 1973 'h5gget_info_f' 0 1965
-'h5gget_info_by_idx_f' 0 1945 'h5gget_create_plist_f' 0 1930
-'h5gget_info_by_name_f' 0 1935 'h5gget_linkval_f' 0 1958 'h5i_datatype_f'
-0 322 'h5gunlink_f' 0 2036 'h5gset_comment_f' 0 2029 'h5gmove_f' 0 2023
-'h5global' 0 2009 'h5glink_f' 0 1995 'h5gmove2_f' 0 2002 'h5gn_members_f'
-0 2017 'h5gopen_f' 0 2010 'h5i' 0 2035 'h5i_dataset_f' 0 320 'h5i_attr_f'
-0 319 'h5i_badid_f' 0 318 'h5i_dataspace_f' 0 321 'h5idec_ref_f' 0 2059
-'h5i_file_f' 0 324 'h5i_flags_len' 0 2041 'h5i_flags' 0 197 'h5i_group_f'
-0 323 'h5iget_file_id_f' 0 2054 'h5iget_name_f' 0 2047 'h5iget_ref_f' 0
-2042 'h5iinc_ref_f' 0 2072 'h5lcreate_external_f' 0 2132
-'h5l_link_class_t_vers_f' 0 312 'h5l' 0 2083 'h5l_flags' 0 187
-'h5l_flags_len' 0 2082 'h5lcopy_f' 0 2084 'h5l_same_loc_f' 0 313
-'h5l_type_external_f' 0 314 'h5l_type_error_f' 0 317 'h5l_type_soft_f' 0
-315 'h5l_type_hard_f' 0 316 'h5ldelete_by_idx_f' 0 2123 'h5lcreate_hard_f'
-0 2101 'h5lcreate_soft_f' 0 2093 'h5lexists_f' 0 2116 'h5ldelete_f' 0
-2110 'h5o_copy_without_attr_flag_f' 0 307 'h5o_copy_shallow_hierarchy_f'
-0 311 'h5o' 0 2185 'h5lget_info_f' 0 2173 'h5lib' 0 2172
-'h5lget_name_by_idx_f' 0 2146 'h5lib_flags_len' 0 2171 'h5lib_flags' 0
-194 'h5lmove_f' 0 2162 'h5lis_registered_f' 0 2157
-'h5o_copy_expand_ext_link_f' 0 309 'h5o_copy_all_f' 0 305
-'h5o_copy_expand_reference_f' 0 308 'h5o_copy_expand_soft_link_f' 0 310
-'h5o_copy_preserve_null_flag_f' 0 306 'h5o_hdr_all_flags_f' 0 292
-'h5o_flags' 0 188 'h5o_flags_len' 0 2186 'h5o_hdr_attr_crt_order_index_f'
-0 295 'h5p_file_mount_f' 0 285 'h5p_default_f' 0 284
-'h5o_shmesg_pline_flag_f' 0 300 'h5o_shmesg_max_nindexes_f' 0 291
-'h5o_shmesg_all_flag_f' 0 298 'h5o_hdr_chunk0_size_f' 0 297
-'h5o_hdr_attr_store_phase_cha_f' 0 294 'h5o_hdr_store_times_f' 0 293
-'h5o_shmesg_attr_flag_f' 0 299 'h5o_shmesg_max_list_size_f' 0 290
-'h5o_shmesg_fill_flag_f' 0 301 'h5o_shmesg_dtype_flag_f' 0 302
-'h5o_shmesg_none_flag_f' 0 304 'h5open_f' 0 2224 'h5olink_f' 0 2215
-'h5o_shmesg_sdspace_flag_f' 0 303 'h5oopen_f' 0 2208 'h5oopen_by_addr_f'
-0 2202 'h5p_dataset_xfer_f' 0 286 'h5p' 0 2223 'h5p_crt_order_indexed_f'
-0 271 'h5p_attribute_create_f' 0 275 'h5p_crt_order_tracked_f' 0 270
-'h5p_dataset_create_f' 0 287 'h5p_dataset_access_f' 0 281
-'h5p_datatype_access_f' 0 277 'h5p_datatype_create_f' 0 278
-'h5p_file_access_f' 0 288 'h5p_file_create_f' 0 289 'h5p_flags_len' 0
-2228 'h5p_flags_int_len' 0 2227 'h5p_flags_int' 0 196 'h5p_flags' 0 190
-'h5p_link_access_f' 0 272 'h5p_group_create_f' 0 280 'h5p_group_access_f'
-0 279 'h5p_object_create_f' 0 282 'h5p_object_copy_f' 0 274
-'h5p_link_create_f' 0 273 'h5p_root_f' 0 283 'h5pget_data_transform_f' 0
-2670 'h5pget_copy_object_f' 0 2371 'h5pcopy_f' 0 2361 'h5pclose_f' 0
-2242 'h5pall_filters_avail_f' 0 2237 'h5pclose_class_f' 0 2233
-'h5pcreate_f' 0 2356 'h5pcreate_class_f' 0 2252 'h5pcopy_prop_f' 0 2246
-'h5pget_chunk_cache_f' 0 2349 'h5pget_char_encoding_f' 0 2322 'h5pequal_f'
-0 2316 'h5pget_alignment_f' 0 2310 'h5pfill_value_defined_f' 0 2264
-'h5pexist_f' 0 2258 'h5pget_attr_creation_order_f' 0 2305
-'h5pget_alloc_time_f' 0 2269 'h5pget_char' 0 145 'h5pget_btree_ratios_f'
-0 2293 'h5pget_attr_phase_change_f' 0 2274 'h5pget_cache_f' 0 2285
-'h5pget_buffer_f' 0 2280 'h5pget_chunk_f' 0 2343 'h5pget_class_parent_f'
-0 2338 'h5pget_class_f' 0 2333 'h5pget_class_name_f' 0 2327
-'h5pget_create_inter_group_f' 0 2366 'h5pget_fill_value_char' 0 149
-'h5pget_edc_check_f' 0 2445 'h5pget_double' 0 148 'h5pget_driver_f' 0
-2376 'h5pget_fapl_direct_f' 0 2438 'h5pget_external_f' 0 2403
-'h5pget_external_count_f' 0 2392 'h5pget_est_link_info_f' 0 2386
-'h5pget_fapl_core_f' 0 2397 'h5pget_fclose_degree_f' 0 2433
-'h5pget_fapl_family_f' 0 2422 'h5pget_fapl_multi_f' 0 2412
-'h5pget_fill_time_f' 0 2428 'h5pget_nfilters_f' 0 2660
-'h5pget_meta_block_size_f' 0 2527 'h5pget_link_phase_change_f' 0 2521
-'h5pget_fill_value_double' 0 152 'h5pget_filter_by_id_f' 0 2501
-'h5pget_fill_value_real' 0 150 'h5pget_fill_value_integer' 0 151
-'h5pget_gc_references_f' 0 2496 'h5pget_filter_f' 0 2460
-'h5pget_hyper_vector_size_f' 0 2491 'h5pget_integer' 0 147
-'h5pget_layout_f' 0 2481 'h5pget_istore_k_f' 0 2471
-'h5pget_link_creation_order_f' 0 2476 'h5pget_local_heap_size_hint_f' 0
-2516 'h5pisa_class_f' 0 2654 'h5pget_small_data_block_size_f' 0 2617
-'h5pget_real' 0 146 'h5pget_obj_track_times_f' 0 2547 'h5pget_nprops_f'
-0 2537 'h5pget_nlinks_f' 0 2532 'h5pget_preserve_f' 0 2542 'h5pget_size_f'
-0 2563 'h5pget_sieve_buf_size_f' 0 2552 'h5pget_sizes_f' 0 2557
-'h5pget_sym_k_f' 0 2611 'h5pinsert_double' 0 156 'h5pget_userblock_f' 0
-2588 'h5pinsert_char' 0 153 'h5pget_version_f' 0 2574 'h5pinsert_integer'
-0 155 'h5pinsert_real' 0 154 'h5pregister_integer' 0 159
-'h5pregister_double' 0 160 'h5pmodify_filter_f' 0 2628 'h5pregister_char'
-0 157 'h5pregister_real' 0 158 'h5pset_fclose_degree_f' 0 2894
-'h5pset_copy_object_f' 0 2847 'h5pset_char' 0 161 'h5pset_cache_f' 0
-2726 'h5pset_attr_phase_change_f' 0 2720 'h5pset_alignment_f' 0 2702
-'h5premove_filter_f' 0 2687 'h5pset_attr_creation_order_f' 0 2697
-'h5pset_alloc_time_f' 0 2692 'h5pset_buffer_f' 0 2715
-'h5pset_btree_ratios_f' 0 2708 'h5pset_chunk_cache_f' 0 2745
-'h5pset_char_encoding_f' 0 2734 'h5pset_chunk_f' 0 2739
-'h5pset_edc_check_f' 0 2842 'h5pset_deflate_f' 0 2772
-'h5pset_create_inter_group_f' 0 2762 'h5pset_data_transform_f' 0 2757
-'h5pset_double' 0 164 'h5pset_est_link_info_f' 0 2836
-'h5pset_fapl_split_f' 0 2828 'h5pset_fapl_core_f' 0 2818
-'h5pset_external_f' 0 2777 'h5pset_family_offset_f' 0 2784
-'h5pset_fapl_direct_f' 0 2795 'h5pset_fapl_family_f' 0 2789
-'h5pset_fapl_multi_s' 0 165 'h5pset_fapl_multi_l' 0 166
-'h5pset_fapl_sec2_f' 0 2810 'h5pset_fapl_stdio_f' 0 2824
-'h5pset_fill_value_real' 0 168 'h5pset_fill_value_double' 0 170
-'h5pset_fill_time_f' 0 2857 'h5pset_fill_value_char' 0 167
-'h5pset_fill_value_integer' 0 169 'h5pset_gc_references_f' 0 2884
-'h5pset_fletcher32_f' 0 2880 'h5pset_filter_f' 0 2872 'h5pset_preserve_f'
-0 3593 'h5pset_integer' 0 163 'h5pset_meta_block_size_f' 0 2950
-'h5pset_layout_f' 0 2931 'h5pset_istore_k_f' 0 2904
-'h5pset_link_phase_change_f' 0 2925 'h5pset_link_creation_order_f' 0
-2915 'h5pset_libver_bounds_f' 0 2909 'h5pset_local_heap_size_hint_f' 0
-2920 'h5pset_obj_track_times_f' 0 2945 'h5pset_nlinks_f' 0 2940
-'h5pset_nbit_f' 0 2936 'h5tset_inpad_f' 0 3588 'h5t_std_u16le' 0 409
-'h5sclose_f' 0 3225 'h5s_select_append_f' 0 255
-'h5pset_shared_mesg_nindexes_f' 0 3060 'h5pset_scaleoffset_f' 0 2972
-'h5pset_real' 0 162 'h5pset_shared_mesg_index_f' 0 2965
-'h5r_dataset_region_f' 0 268 'h5r' 0 3020 'h5pset_userblock_f' 0 3015
-'h5pset_shuffle_f' 0 3006 'h5pset_sieve_buf_size_f' 0 3001
-'h5pset_sym_k_f' 0 2995 'h5pset_small_data_block_size_f' 0 2984
-'h5pset_sizes_f' 0 2978 'h5pset_szip_f' 0 2989 'h5punregister_f' 0 3010
-'h5r_flags' 0 182 'h5r_flags_len' 0 3021 'h5r_object_f' 0 269
-'h5rdereference_region_f' 0 175 'h5rcreate_region_f' 0 173
-'h5rcreate_object_f' 0 174 'h5rdereference_object_f' 0 176
-'h5rget_name_object_f' 0 178 'h5rget_name_region_f' 0 177
-'h5rget_object_type_obj_f' 0 172 'h5s_sel_hyperslabs_f' 0 249 'h5s_all_f'
-0 261 'h5s' 0 3070 'h5rget_region_region_f' 0 171 'h5s_flags_len' 0 3071
-'h5s_flags' 0 179 'h5s_sel_all_f' 0 248 'h5s_scalar_f' 0 267 'h5s_null_f'
-0 265 'h5s_sel_error_f' 0 252 'h5s_sel_none_f' 0 251 'h5s_select_and_f'
-0 259 'h5s_sel_points_f' 0 250 'h5s_select_nota_f' 0 256
-'h5s_select_invalid_f' 0 253 'h5s_select_noop_f' 0 260 'h5s_simple_f' 0
-266 'h5s_select_prepend_f' 0 254 'h5s_select_notb_f' 0 257
-'h5s_select_or_f' 0 263 'h5s_select_xor_f' 0 258 'h5s_select_set_f' 0
-264 'h5s_unlimited_f' 0 262 'h5sget_select_elem_npoints_f' 0 3220
-'h5screate_f' 0 3112 'h5scopy_f' 0 3072 'h5sdecode_f' 0 3107
-'h5screate_simple_f' 0 3077 'h5sextent_equal_f' 0 3101 'h5sencode_f' 0
-3089 'h5sextent_copy_f' 0 3084 'h5sget_select_bounds_f' 0 3095
-'h5t_cset_ascii_f' 0 223 'h5sget_select_hyper_blocklist_f' 0 3212
-'h5sget_select_elem_pointlist_f' 0 3117 'h5sget_select_npoints_f' 0 3207
-'h5sget_select_hyper_nblocks_f' 0 3124 'h5t_compound_f' 0 240
-'h5sselect_hyperslab_f' 0 3198 'h5soffset_simple_f' 0 3172
-'h5sget_simple_extent_dims_f' 0 3154 'h5sget_select_type_f' 0 3129
-'h5sget_simple_extent_type_f' 0 3149 'h5sget_simple_extent_ndims_f' 0
-3139 'h5sget_simple_extent_npoints_f' 0 3134 'h5sis_simple_f' 0 3144
-'h5sselect_elements_f' 0 3164 'h5sselect_all_f' 0 3160 'h5sselect_valid_f'
-0 3193 'h5sselect_none_f' 0 3177 'h5t_array_f' 0 216
-'h5sset_extent_none_f' 0 3189 'h5t' 0 3188 'h5sset_extent_simple_f' 0
-3181 'h5t_bitfield_f' 0 242 'h5t_enum_f' 0 238 'h5t_dir_descend_f' 0 214
-'h5t_cset_utf8_f' 0 222 'h5t_dir_ascend_f' 0 215 'h5t_std_ref_obj' 0 433
-'h5t_native_character' 0 434 'h5t_ieee_f32be' 0 424 'h5t_float_f' 0 245
-'h5t_flags' 0 192 'h5t_flags_len' 0 3219 'h5t_ieee_f64le' 0 421
-'h5t_ieee_f64be' 0 422 'h5t_ieee_f32le' 0 423 'h5t_integer_f' 0 246
-'h5t_std_i64le' 0 413 'h5t_pad_error_f' 0 230 'h5t_native_integer_1' 0
-431 'h5t_native_double' 0 435 'h5t_native_integer' 0 437
-'h5t_pad_background_f' 0 231 'h5t_norm_none_f' 0 224 'h5t_norm_implied_f'
-0 226 'h5t_native_integer_2' 0 430 'h5t_native_integer_4' 0 429
-'h5t_native_real_16' 0 425 'h5t_native_real' 0 436 'h5t_native_integer_8'
-0 428 'h5t_native_real_4' 0 427 'h5t_native_real_8' 0 426 'h5t_no_class_f'
-0 247 'h5t_norm_msbset_f' 0 225 'h5t_opaque_f' 0 241 'h5t_order_le_f' 0
-237 'h5t_order_be_f' 0 236 'h5t_order_none_f' 0 234 'h5t_order_vax_f' 0
-235 'h5t_std_i32be' 0 416 'h5t_pad_zero_f' 0 233 'h5t_pad_one_f' 0 232
-'h5t_reference_f' 0 239 'h5t_sgn_error_f' 0 227 'h5t_sgn_2_f' 0 228
-'h5t_std_i16le' 0 417 'h5t_sgn_none_f' 0 229 'h5t_std_i16be' 0 418
-'h5t_std_i32le' 0 415 'h5t_std_i64be' 0 414 'h5t_std_ref_dsetreg' 0 432
-'h5t_std_i8le' 0 419 'h5t_std_i8be' 0 420 'h5t_std_u16be' 0 410
-'h5tarray_create_f' 0 3498 'h5t_std_u32le' 0 407 'h5t_std_u32be' 0 408
-'h5t_str_error_f' 0 218 'h5t_std_u8be' 0 412 'h5t_std_u64le' 0 405
-'h5t_std_u64be' 0 406 'h5t_std_u8le' 0 411 'h5t_str_nullpad_f' 0 220
-'h5t_str_nullterm_f' 0 221 'h5t_string_f' 0 243 'h5t_string' 0 404
-'h5t_str_spacepad_f' 0 219 'h5t_vlen_f' 0 217 'h5t_time_f' 0 244
-'h5tcopy_f' 0 3493 'h5tcompiler_conv_f' 0 3254 'h5tcommit_f' 0 3245
-'h5tcommit_anon_f' 0 3233 'h5tclose_f' 0 3229 'h5tcommitted_f' 0 3240
-'h5tget_sign_f' 0 3488 'h5tget_native_type_f' 0 3419
-'h5tget_array_ndims_f' 0 3383 'h5tenum_valueof_f' 0 3306 'h5tcreate_f' 0
-3289 'h5tenum_nameof_f' 0 3282 'h5tdecode_f' 0 3277 'h5tenum_insert_f' 0
-3271 'h5tenum_create_f' 0 3266 'h5tencode_f' 0 3260 'h5tget_array_dims_f'
-0 3301 'h5tequal_f' 0 3295 'h5tget_member_offset_f' 0 3377
-'h5tget_member_index_f' 0 3359 'h5tget_create_plist_f' 0 3347
-'h5tget_class_f' 0 3312 'h5tget_member_class_f' 0 3341 'h5tget_inpad_f'
-0 3336 'h5tget_cset_f' 0 3331 'h5tget_fields_f' 0 3322 'h5tget_ebias_f'
-0 3317 'h5tget_member_name_f' 0 3352 'h5tget_member_value_f' 0 3371
-'h5tget_member_type_f' 0 3365 'h5tget_norm_f' 0 3414 'h5tget_nmembers_f'
-0 3388 'h5tget_order_f' 0 3409 'h5tget_offset_f' 0 3393 'h5tget_pad_f' 0
-3403 'h5tget_precision_f' 0 3398 'h5tset_cset_f' 0 3483 'h5tget_strpad_f'
-0 3464 'h5tget_size_f' 0 3425 'h5tis_variable_str_f' 0 3459 'h5tinsert_f'
-0 3441 'h5tget_tag_f' 0 3435 'h5tget_super_f' 0 3430 'h5topen_f' 0 3452
-'h5tpack_f' 0 3448 'h5tset_fields_f' 0 3474 'h5tset_ebias_f' 0 3469
-'integer_types' 0 184 'hssize_t' 0 3580 'h5z_disable_edc_f' 0 207
-'h5tset_tag_f' 0 3552 'h5tset_sign_f' 0 3541 'h5tset_order_f' 0 3526
-'h5tset_offset_f' 0 3510 'h5tset_norm_f' 0 3505 'h5tset_pad_f' 0 3520
-'h5tset_precision_f' 0 3515 'h5tset_strpad_f' 0 3536 'h5tset_size_f' 0
-3531 'h5z' 0 3551 'h5tvlen_create_f' 0 3546 'hobj_ref_t_f' 0 3578
-'h5z_filter_all_f' 0 200 'h5z_enable_edc_f' 0 206 'h5z_error_edc_f' 0
-208 'h5z_filter_error_f' 0 213 'h5z_filter_decode_enabled_f' 0 201
-'h5z_filter_deflate_f' 0 211 'h5z_filter_encode_enabled_f' 0 202
-'hdset_reg_ref_t_f' 0 3575 'h5z_flags' 0 181 'h5z_filter_shuffle_f' 0
-210 'h5z_filter_none_f' 0 212 'h5z_filter_fletcher32_f' 0 209
-'h5z_flag_optional_f' 0 203 'h5z_filter_szip_f' 0 204 'h5zunregister_f'
-0 3570 'h5zfilter_avail_f' 0 3563 'h5z_no_edc_f' 0 205 'h5z_flags_len' 0
-3557 'h5zget_filter_info_f' 0 3558 'hdf5' 0 3569 'haddr_t' 0 3568 'hid_t'
-0 3574 'hsize_t' 0 3577 'printoff' 0 3587 'predef_types' 0 195
-'object_namelen_default_f' 0 3582 'integer_types_len' 0 3581
-'predef_types_len' 0 3583 'printon' 0 3586 'ref_reg_buf_len' 0 3585
-'size_t' 0 3584)
diff --git a/interfaces/ext/hdf5/hdf5_hl.h b/interfaces/ext/hdf5/hdf5_hl.h
deleted file mode 100644
index 0fff932..0000000
--- a/interfaces/ext/hdf5/hdf5_hl.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
- * All rights reserved.                                                      *
- *                                                                           *
- * This file is part of HDF5.  The full HDF5 copyright notice, including     *
- * terms governing use, modification, and redistribution, is contained in    *
- * the files COPYING and Copyright.html.  COPYING can be found at the root   *
- * of the source code distribution tree; Copyright.html can be found at the  *
- * root level of an installed copy of the electronic HDF5 document set and   *
- * is linked from the top-level documents page.  It can also be found at     *
- * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * This is the main public HDF5 High Level include file.  Put further
- * information in a particular header file and include that here, don't
- * fill this file with lots of gunk...
- */
-
-#ifndef _HDF5_HL_H
-#define _HDF5_HL_H
-
-#include "H5DSpublic.h" /* dimension scales */
-#include "H5LTpublic.h" /* lite */
-#include "H5IMpublic.h" /* image */
-#include "H5TBpublic.h" /* table */
-#include "H5PTpublic.h" /* table */
-
-#endif /*H5_INCLUDE_HL*/
-
diff --git a/interfaces/ext/libxml/DOCBparser.h b/interfaces/ext/libxml/DOCBparser.h
deleted file mode 100644
index 461d4ee..0000000
--- a/interfaces/ext/libxml/DOCBparser.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Summary: old DocBook SGML parser
- * Description: interface for a DocBook SGML non-verifying parser
- * This code is DEPRECATED, and should not be used anymore.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __DOCB_PARSER_H__
-#define __DOCB_PARSER_H__
-#include <libxml/xmlversion.h>
-
-#ifdef LIBXML_DOCB_ENABLED
-
-#include <libxml/parser.h>
-#include <libxml/parserInternals.h>
-
-#ifndef IN_LIBXML
-#ifdef __GNUC__
-#warning "The DOCBparser module has been deprecated in libxml2-2.6.0"
-#endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Most of the back-end structures from XML and SGML are shared.
- */
-typedef xmlParserCtxt docbParserCtxt;
-typedef xmlParserCtxtPtr docbParserCtxtPtr;
-typedef xmlSAXHandler docbSAXHandler;
-typedef xmlSAXHandlerPtr docbSAXHandlerPtr;
-typedef xmlParserInput docbParserInput;
-typedef xmlParserInputPtr docbParserInputPtr;
-typedef xmlDocPtr docbDocPtr;
-
-/*
- * There is only few public functions.
- */
-XMLPUBFUN int XMLCALL
-		     docbEncodeEntities(unsigned char *out,
-                                        int *outlen,
-                                        const unsigned char *in,
-                                        int *inlen, int quoteChar);
-
-XMLPUBFUN docbDocPtr XMLCALL             
-		     docbSAXParseDoc   (xmlChar *cur,
-                                        const char *encoding,
-                                        docbSAXHandlerPtr sax,
-                                        void *userData);
-XMLPUBFUN docbDocPtr XMLCALL             
-		     docbParseDoc      (xmlChar *cur,
-                                        const char *encoding);
-XMLPUBFUN docbDocPtr XMLCALL             
-		     docbSAXParseFile  (const char *filename,
-                                        const char *encoding,
-                                        docbSAXHandlerPtr sax,
-                                        void *userData);
-XMLPUBFUN docbDocPtr XMLCALL             
-		     docbParseFile     (const char *filename,
-                                        const char *encoding);
-
-/**
- * Interfaces for the Push mode.
- */
-XMLPUBFUN void XMLCALL                  
-		     docbFreeParserCtxt      (docbParserCtxtPtr ctxt);
-XMLPUBFUN docbParserCtxtPtr XMLCALL     
-		     docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
-                                              void *user_data,
-                                              const char *chunk,
-                                              int size,
-                                              const char *filename,
-                                              xmlCharEncoding enc);
-XMLPUBFUN int XMLCALL                   
-		     docbParseChunk          (docbParserCtxtPtr ctxt,
-                                              const char *chunk,
-                                              int size,
-                                              int terminate);
-XMLPUBFUN docbParserCtxtPtr XMLCALL       
-		     docbCreateFileParserCtxt(const char *filename,
-                                              const char *encoding);
-XMLPUBFUN int XMLCALL                   
-		     docbParseDocument       (docbParserCtxtPtr ctxt);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_DOCB_ENABLED */
-
-#endif /* __DOCB_PARSER_H__ */
diff --git a/interfaces/ext/libxml/HTMLparser.h b/interfaces/ext/libxml/HTMLparser.h
deleted file mode 100644
index 05905e4..0000000
--- a/interfaces/ext/libxml/HTMLparser.h
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
- * Summary: interface for an HTML 4.0 non-verifying parser
- * Description: this module implements an HTML 4.0 non-verifying parser
- *              with API compatible with the XML parser ones. It should
- *              be able to parse "real world" HTML, even if severely
- *              broken from a specification point of view.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __HTML_PARSER_H__
-#define __HTML_PARSER_H__
-#include <libxml/xmlversion.h>
-#include <libxml/parser.h>
-
-#ifdef LIBXML_HTML_ENABLED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Most of the back-end structures from XML and HTML are shared.
- */
-typedef xmlParserCtxt htmlParserCtxt;
-typedef xmlParserCtxtPtr htmlParserCtxtPtr;
-typedef xmlParserNodeInfo htmlParserNodeInfo;
-typedef xmlSAXHandler htmlSAXHandler;
-typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
-typedef xmlParserInput htmlParserInput;
-typedef xmlParserInputPtr htmlParserInputPtr;
-typedef xmlDocPtr htmlDocPtr;
-typedef xmlNodePtr htmlNodePtr;
-
-/*
- * Internal description of an HTML element, representing HTML 4.01
- * and XHTML 1.0 (which share the same structure).
- */
-typedef struct _htmlElemDesc htmlElemDesc;
-typedef htmlElemDesc *htmlElemDescPtr;
-struct _htmlElemDesc {
-    const char *name;	/* The tag name */
-    char startTag;      /* Whether the start tag can be implied */
-    char endTag;        /* Whether the end tag can be implied */
-    char saveEndTag;    /* Whether the end tag should be saved */
-    char empty;         /* Is this an empty element ? */
-    char depr;          /* Is this a deprecated element ? */
-    char dtd;           /* 1: only in Loose DTD, 2: only Frameset one */
-    char isinline;      /* is this a block 0 or inline 1 element */
-    const char *desc;   /* the description */
-
-/* NRK Jan.2003
- * New fields encapsulating HTML structure
- *
- * Bugs:
- *	This is a very limited representation.  It fails to tell us when
- *	an element *requires* subelements (we only have whether they're
- *	allowed or not), and it doesn't tell us where CDATA and PCDATA
- *	are allowed.  Some element relationships are not fully represented:
- *	these are flagged with the word MODIFIER
- */
-    const char** subelts;		/* allowed sub-elements of this element */
-    const char* defaultsubelt;	/* subelement for suggested auto-repair
-					   if necessary or NULL */
-    const char** attrs_opt;		/* Optional Attributes */
-    const char** attrs_depr;		/* Additional deprecated attributes */
-    const char** attrs_req;		/* Required attributes */
-};
-
-/*
- * Internal description of an HTML entity.
- */
-typedef struct _htmlEntityDesc htmlEntityDesc;
-typedef htmlEntityDesc *htmlEntityDescPtr;
-struct _htmlEntityDesc {
-    unsigned int value;	/* the UNICODE value for the character */
-    const char *name;	/* The entity name */
-    const char *desc;   /* the description */
-};
-
-/*
- * There is only few public functions.
- */
-XMLPUBFUN const htmlElemDesc * XMLCALL 	
-			htmlTagLookup	(const xmlChar *tag);
-XMLPUBFUN const htmlEntityDesc * XMLCALL 	
-			htmlEntityLookup(const xmlChar *name);
-XMLPUBFUN const htmlEntityDesc * XMLCALL 	
-			htmlEntityValueLookup(unsigned int value);
-
-XMLPUBFUN int XMLCALL			
-			htmlIsAutoClosed(htmlDocPtr doc,
-					 htmlNodePtr elem);
-XMLPUBFUN int XMLCALL			
-			htmlAutoCloseTag(htmlDocPtr doc,
-					 const xmlChar *name,
-					 htmlNodePtr elem);
-XMLPUBFUN const htmlEntityDesc * XMLCALL	
-			htmlParseEntityRef(htmlParserCtxtPtr ctxt,
-					 const xmlChar **str);
-XMLPUBFUN int XMLCALL			
-			htmlParseCharRef(htmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			htmlParseElement(htmlParserCtxtPtr ctxt);
-
-XMLPUBFUN htmlParserCtxtPtr XMLCALL	
-			htmlNewParserCtxt(void);
-
-XMLPUBFUN htmlParserCtxtPtr XMLCALL	
-			htmlCreateMemoryParserCtxt(const char *buffer,
-						   int size);
-
-XMLPUBFUN int XMLCALL			
-			htmlParseDocument(htmlParserCtxtPtr ctxt);
-XMLPUBFUN htmlDocPtr XMLCALL		
-			htmlSAXParseDoc	(xmlChar *cur,
-					 const char *encoding,
-					 htmlSAXHandlerPtr sax,
-					 void *userData);
-XMLPUBFUN htmlDocPtr XMLCALL		
-			htmlParseDoc	(xmlChar *cur,
-					 const char *encoding);
-XMLPUBFUN htmlDocPtr XMLCALL		
-			htmlSAXParseFile(const char *filename,
-					 const char *encoding,
-					 htmlSAXHandlerPtr sax,
-					 void *userData);
-XMLPUBFUN htmlDocPtr XMLCALL		
-			htmlParseFile	(const char *filename,
-					 const char *encoding);
-XMLPUBFUN int XMLCALL			
-			UTF8ToHtml	(unsigned char *out,
-					 int *outlen,
-					 const unsigned char *in,
-					 int *inlen);
-XMLPUBFUN int XMLCALL			
-			htmlEncodeEntities(unsigned char *out,
-					 int *outlen,
-					 const unsigned char *in,
-					 int *inlen, int quoteChar);
-XMLPUBFUN int XMLCALL			
-			htmlIsScriptAttribute(const xmlChar *name);
-XMLPUBFUN int XMLCALL			
-			htmlHandleOmittedElem(int val);
-
-#ifdef LIBXML_PUSH_ENABLED
-/**
- * Interfaces for the Push mode.
- */
-XMLPUBFUN htmlParserCtxtPtr XMLCALL	
-			htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
-						 void *user_data,
-						 const char *chunk,
-						 int size,
-						 const char *filename,
-						 xmlCharEncoding enc);
-XMLPUBFUN int XMLCALL			
-			htmlParseChunk		(htmlParserCtxtPtr ctxt,
-						 const char *chunk,
-						 int size,
-						 int terminate);
-#endif /* LIBXML_PUSH_ENABLED */
-
-XMLPUBFUN void XMLCALL			
-			htmlFreeParserCtxt	(htmlParserCtxtPtr ctxt);
-
-/*
- * New set of simpler/more flexible APIs
- */
-/**
- * xmlParserOption:
- *
- * This is the set of XML parser options that can be passed down
- * to the xmlReadDoc() and similar calls.
- */
-typedef enum {
-    HTML_PARSE_RECOVER  = 1<<0, /* Relaxed parsing */
-    HTML_PARSE_NOERROR	= 1<<5,	/* suppress error reports */
-    HTML_PARSE_NOWARNING= 1<<6,	/* suppress warning reports */
-    HTML_PARSE_PEDANTIC	= 1<<7,	/* pedantic error reporting */
-    HTML_PARSE_NOBLANKS	= 1<<8,	/* remove blank nodes */
-    HTML_PARSE_NONET	= 1<<11,/* Forbid network access */
-    HTML_PARSE_COMPACT  = 1<<16 /* compact small text nodes */
-} htmlParserOption;
-
-XMLPUBFUN void XMLCALL
-		htmlCtxtReset		(htmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
-		htmlCtxtUseOptions	(htmlParserCtxtPtr ctxt,
-					 int options);
-XMLPUBFUN htmlDocPtr XMLCALL
-		htmlReadDoc		(const xmlChar *cur,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN htmlDocPtr XMLCALL
-		htmlReadFile		(const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN htmlDocPtr XMLCALL
-		htmlReadMemory		(const char *buffer,
-					 int size,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN htmlDocPtr XMLCALL
-		htmlReadFd		(int fd,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN htmlDocPtr XMLCALL
-		htmlReadIO		(xmlInputReadCallback ioread,
-					 xmlInputCloseCallback ioclose,
-					 void *ioctx,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN htmlDocPtr XMLCALL
-		htmlCtxtReadDoc		(xmlParserCtxtPtr ctxt,
-					 const xmlChar *cur,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN htmlDocPtr XMLCALL
-		htmlCtxtReadFile		(xmlParserCtxtPtr ctxt,
-					 const char *filename,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN htmlDocPtr XMLCALL
-		htmlCtxtReadMemory		(xmlParserCtxtPtr ctxt,
-					 const char *buffer,
-					 int size,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN htmlDocPtr XMLCALL
-		htmlCtxtReadFd		(xmlParserCtxtPtr ctxt,
-					 int fd,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN htmlDocPtr XMLCALL
-		htmlCtxtReadIO		(xmlParserCtxtPtr ctxt,
-					 xmlInputReadCallback ioread,
-					 xmlInputCloseCallback ioclose,
-					 void *ioctx,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-
-/* NRK/Jan2003: further knowledge of HTML structure
- */
-typedef enum {
-  HTML_NA = 0 ,		/* something we don't check at all */
-  HTML_INVALID = 0x1 ,
-  HTML_DEPRECATED = 0x2 ,
-  HTML_VALID = 0x4 ,
-  HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */
-} htmlStatus ;
-
-/* Using htmlElemDesc rather than name here, to emphasise the fact
-   that otherwise there's a lookup overhead
-*/
-XMLPUBFUN htmlStatus XMLCALL htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
-XMLPUBFUN int XMLCALL htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
-XMLPUBFUN htmlStatus XMLCALL htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
-XMLPUBFUN htmlStatus XMLCALL htmlNodeStatus(const htmlNodePtr, int) ;
-/**
- * htmlDefaultSubelement:
- * @elt: HTML element
- *
- * Returns the default subelement for this element
- */
-#define htmlDefaultSubelement(elt) elt->defaultsubelt
-/**
- * htmlElementAllowedHereDesc:
- * @parent: HTML parent element
- * @elt: HTML element
- *
- * Checks whether an HTML element description may be a
- * direct child of the specified element.
- *
- * Returns 1 if allowed; 0 otherwise.
- */
-#define htmlElementAllowedHereDesc(parent,elt) \
-	htmlElementAllowedHere((parent), (elt)->name)
-/**
- * htmlRequiredAttrs:
- * @elt: HTML element
- *
- * Returns the attributes required for the specified element.
- */
-#define htmlRequiredAttrs(elt) (elt)->attrs_req
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_HTML_ENABLED */
-#endif /* __HTML_PARSER_H__ */
diff --git a/interfaces/ext/libxml/HTMLtree.h b/interfaces/ext/libxml/HTMLtree.h
deleted file mode 100644
index 6ea8207..0000000
--- a/interfaces/ext/libxml/HTMLtree.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Summary: specific APIs to process HTML tree, especially serialization
- * Description: this module implements a few function needed to process
- *              tree in an HTML specific way.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __HTML_TREE_H__
-#define __HTML_TREE_H__
-
-#include <stdio.h>
-#include <libxml/xmlversion.h>
-#include <libxml/tree.h>
-#include <libxml/HTMLparser.h>
-
-#ifdef LIBXML_HTML_ENABLED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/**
- * HTML_TEXT_NODE:
- *
- * Macro. A text node in a HTML document is really implemented
- * the same way as a text node in an XML document.
- */
-#define HTML_TEXT_NODE		XML_TEXT_NODE
-/**
- * HTML_ENTITY_REF_NODE:
- *
- * Macro. An entity reference in a HTML document is really implemented
- * the same way as an entity reference in an XML document.
- */
-#define HTML_ENTITY_REF_NODE	XML_ENTITY_REF_NODE
-/**
- * HTML_COMMENT_NODE:
- *
- * Macro. A comment in a HTML document is really implemented
- * the same way as a comment in an XML document.
- */
-#define HTML_COMMENT_NODE	XML_COMMENT_NODE
-/**
- * HTML_PRESERVE_NODE:
- *
- * Macro. A preserved node in a HTML document is really implemented
- * the same way as a CDATA section in an XML document.
- */
-#define HTML_PRESERVE_NODE	XML_CDATA_SECTION_NODE
-/**
- * HTML_PI_NODE:
- *
- * Macro. A processing instruction in a HTML document is really implemented
- * the same way as a processing instruction in an XML document.
- */
-#define HTML_PI_NODE		XML_PI_NODE
-
-XMLPUBFUN htmlDocPtr XMLCALL
-		htmlNewDoc		(const xmlChar *URI,
-					 const xmlChar *ExternalID);
-XMLPUBFUN htmlDocPtr XMLCALL	
-		htmlNewDocNoDtD		(const xmlChar *URI,
-					 const xmlChar *ExternalID);
-XMLPUBFUN const xmlChar * XMLCALL	
-		htmlGetMetaEncoding	(htmlDocPtr doc);
-XMLPUBFUN int XMLCALL		
-		htmlSetMetaEncoding	(htmlDocPtr doc,
-					 const xmlChar *encoding);
-#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL	    
-		htmlDocDumpMemory	(xmlDocPtr cur,
-					 xmlChar **mem,
-					 int *size);
-XMLPUBFUN void XMLCALL	    
-		htmlDocDumpMemoryFormat	(xmlDocPtr cur,
-					 xmlChar **mem,
-					 int *size,
-					 int format);
-XMLPUBFUN int XMLCALL		
-		htmlDocDump		(FILE *f,
-					 xmlDocPtr cur);
-XMLPUBFUN int XMLCALL		
-		htmlSaveFile		(const char *filename,
-					 xmlDocPtr cur);
-XMLPUBFUN int XMLCALL		
-		htmlNodeDump		(xmlBufferPtr buf,
-					 xmlDocPtr doc,
-					 xmlNodePtr cur);
-XMLPUBFUN void XMLCALL		
-		htmlNodeDumpFile	(FILE *out,
-					 xmlDocPtr doc,
-					 xmlNodePtr cur);
-XMLPUBFUN int XMLCALL		
-		htmlNodeDumpFileFormat	(FILE *out,
-					 xmlDocPtr doc,
-					 xmlNodePtr cur,
-					 const char *encoding,
-					 int format);
-XMLPUBFUN int XMLCALL		
-		htmlSaveFileEnc		(const char *filename,
-					 xmlDocPtr cur,
-					 const char *encoding);
-XMLPUBFUN int XMLCALL		
-		htmlSaveFileFormat	(const char *filename,
-					 xmlDocPtr cur,
-					 const char *encoding,
-					 int format);
-
-XMLPUBFUN void XMLCALL		
-		htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
-					 xmlDocPtr doc,
-					 xmlNodePtr cur,
-					 const char *encoding,
-					 int format);
-XMLPUBFUN void XMLCALL		
-		htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
-					 xmlDocPtr cur,
-					 const char *encoding);
-XMLPUBFUN void XMLCALL		
-		htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
-					 xmlDocPtr cur,
-					 const char *encoding,
-					 int format);
-XMLPUBFUN void XMLCALL 
-		htmlNodeDumpOutput	(xmlOutputBufferPtr buf, 
-					 xmlDocPtr doc,
-					 xmlNodePtr cur, 
-					 const char *encoding);
-
-#endif /* LIBXML_OUTPUT_ENABLED */
-
-XMLPUBFUN int XMLCALL		
-		htmlIsBooleanAttr	(const xmlChar *name);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_HTML_ENABLED */
-
-#endif /* __HTML_TREE_H__ */
-
diff --git a/interfaces/ext/libxml/SAX.h b/interfaces/ext/libxml/SAX.h
deleted file mode 100644
index 0ca161b..0000000
--- a/interfaces/ext/libxml/SAX.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Summary: Old SAX version 1 handler, deprecated
- * Description: DEPRECATED set of SAX version 1 interfaces used to
- *              build the DOM tree.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-
-#ifndef __XML_SAX_H__
-#define __XML_SAX_H__
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <libxml/xmlversion.h>
-#include <libxml/parser.h>
-#include <libxml/xlink.h>
-
-#ifdef LIBXML_LEGACY_ENABLED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-XMLPUBFUN const xmlChar * XMLCALL
-		getPublicId			(void *ctx);
-XMLPUBFUN const xmlChar * XMLCALL	
-		getSystemId			(void *ctx);
-XMLPUBFUN void XMLCALL		
-		setDocumentLocator		(void *ctx,
-						 xmlSAXLocatorPtr loc);
-    
-XMLPUBFUN int XMLCALL		
-		getLineNumber			(void *ctx);
-XMLPUBFUN int XMLCALL		
-		getColumnNumber			(void *ctx);
-
-XMLPUBFUN int XMLCALL		
-		isStandalone			(void *ctx);
-XMLPUBFUN int XMLCALL		
-		hasInternalSubset		(void *ctx);
-XMLPUBFUN int XMLCALL		
-		hasExternalSubset		(void *ctx);
-
-XMLPUBFUN void XMLCALL		
-		internalSubset			(void *ctx,
-						 const xmlChar *name,
-						 const xmlChar *ExternalID,
-						 const xmlChar *SystemID);
-XMLPUBFUN void XMLCALL		
-		externalSubset			(void *ctx,
-						 const xmlChar *name,
-						 const xmlChar *ExternalID,
-						 const xmlChar *SystemID);
-XMLPUBFUN xmlEntityPtr XMLCALL	
-		getEntity			(void *ctx,
-						 const xmlChar *name);
-XMLPUBFUN xmlEntityPtr XMLCALL	
-		getParameterEntity		(void *ctx,
-						 const xmlChar *name);
-XMLPUBFUN xmlParserInputPtr XMLCALL 
-		resolveEntity			(void *ctx,
-						 const xmlChar *publicId,
-						 const xmlChar *systemId);
-
-XMLPUBFUN void XMLCALL		
-		entityDecl			(void *ctx,
-						 const xmlChar *name,
-						 int type,
-						 const xmlChar *publicId,
-						 const xmlChar *systemId,
-						 xmlChar *content);
-XMLPUBFUN void XMLCALL		
-		attributeDecl			(void *ctx,
-						 const xmlChar *elem,
-						 const xmlChar *fullname,
-						 int type,
-						 int def,
-						 const xmlChar *defaultValue,
-						 xmlEnumerationPtr tree);
-XMLPUBFUN void XMLCALL		
-		elementDecl			(void *ctx,
-						 const xmlChar *name,
-						 int type,
-						 xmlElementContentPtr content);
-XMLPUBFUN void XMLCALL		
-		notationDecl			(void *ctx,
-						 const xmlChar *name,
-						 const xmlChar *publicId,
-						 const xmlChar *systemId);
-XMLPUBFUN void XMLCALL		
-		unparsedEntityDecl		(void *ctx,
-						 const xmlChar *name,
-						 const xmlChar *publicId,
-						 const xmlChar *systemId,
-						 const xmlChar *notationName);
-
-XMLPUBFUN void XMLCALL		
-		startDocument			(void *ctx);
-XMLPUBFUN void XMLCALL		
-		endDocument			(void *ctx);
-XMLPUBFUN void XMLCALL		
-		attribute			(void *ctx,
-						 const xmlChar *fullname,
-						 const xmlChar *value);
-XMLPUBFUN void XMLCALL		
-		startElement			(void *ctx,
-						 const xmlChar *fullname,
-						 const xmlChar **atts);
-XMLPUBFUN void XMLCALL		
-		endElement			(void *ctx,
-						 const xmlChar *name);
-XMLPUBFUN void XMLCALL		
-		reference			(void *ctx,
-						 const xmlChar *name);
-XMLPUBFUN void XMLCALL		
-		characters			(void *ctx,
-						 const xmlChar *ch,
-						 int len);
-XMLPUBFUN void XMLCALL		
-		ignorableWhitespace		(void *ctx,
-						 const xmlChar *ch,
-						 int len);
-XMLPUBFUN void XMLCALL		
-		processingInstruction		(void *ctx,
-						 const xmlChar *target,
-						 const xmlChar *data);
-XMLPUBFUN void XMLCALL		
-		globalNamespace			(void *ctx,
-						 const xmlChar *href,
-						 const xmlChar *prefix);
-XMLPUBFUN void XMLCALL		
-		setNamespace			(void *ctx,
-						 const xmlChar *name);
-XMLPUBFUN xmlNsPtr XMLCALL	
-		getNamespace			(void *ctx);
-XMLPUBFUN int XMLCALL		
-		checkNamespace			(void *ctx,
-						 xmlChar *nameSpace);
-XMLPUBFUN void XMLCALL		
-		namespaceDecl			(void *ctx,
-						 const xmlChar *href,
-						 const xmlChar *prefix);
-XMLPUBFUN void XMLCALL		
-		comment				(void *ctx,
-						 const xmlChar *value);
-XMLPUBFUN void XMLCALL		
-		cdataBlock			(void *ctx,
-						 const xmlChar *value,
-						 int len);
-
-#ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN void XMLCALL		
-		initxmlDefaultSAXHandler	(xmlSAXHandlerV1 *hdlr,
-						 int warning);
-#ifdef LIBXML_HTML_ENABLED
-XMLPUBFUN void XMLCALL		
-		inithtmlDefaultSAXHandler	(xmlSAXHandlerV1 *hdlr);
-#endif
-#ifdef LIBXML_DOCB_ENABLED
-XMLPUBFUN void XMLCALL		
-		initdocbDefaultSAXHandler	(xmlSAXHandlerV1 *hdlr);
-#endif
-#endif /* LIBXML_SAX1_ENABLED */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_LEGACY_ENABLED */
-
-#endif /* __XML_SAX_H__ */
diff --git a/interfaces/ext/libxml/SAX2.h b/interfaces/ext/libxml/SAX2.h
deleted file mode 100644
index 8d2db02..0000000
--- a/interfaces/ext/libxml/SAX2.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Summary: SAX2 parser interface used to build the DOM tree
- * Description: those are the default SAX2 interfaces used by
- *              the library when building DOM tree.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-
-#ifndef __XML_SAX2_H__
-#define __XML_SAX2_H__
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <libxml/xmlversion.h>
-#include <libxml/parser.h>
-#include <libxml/xlink.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-XMLPUBFUN const xmlChar * XMLCALL
-		xmlSAX2GetPublicId		(void *ctx);
-XMLPUBFUN const xmlChar * XMLCALL	
-		xmlSAX2GetSystemId		(void *ctx);
-XMLPUBFUN void XMLCALL		
-		xmlSAX2SetDocumentLocator	(void *ctx,
-						 xmlSAXLocatorPtr loc);
-    
-XMLPUBFUN int XMLCALL		
-		xmlSAX2GetLineNumber		(void *ctx);
-XMLPUBFUN int XMLCALL		
-		xmlSAX2GetColumnNumber		(void *ctx);
-
-XMLPUBFUN int XMLCALL		
-		xmlSAX2IsStandalone		(void *ctx);
-XMLPUBFUN int XMLCALL		
-		xmlSAX2HasInternalSubset	(void *ctx);
-XMLPUBFUN int XMLCALL		
-		xmlSAX2HasExternalSubset	(void *ctx);
-
-XMLPUBFUN void XMLCALL		
-		xmlSAX2InternalSubset		(void *ctx,
-						 const xmlChar *name,
-						 const xmlChar *ExternalID,
-						 const xmlChar *SystemID);
-XMLPUBFUN void XMLCALL		
-		xmlSAX2ExternalSubset		(void *ctx,
-						 const xmlChar *name,
-						 const xmlChar *ExternalID,
-						 const xmlChar *SystemID);
-XMLPUBFUN xmlEntityPtr XMLCALL	
-		xmlSAX2GetEntity		(void *ctx,
-						 const xmlChar *name);
-XMLPUBFUN xmlEntityPtr XMLCALL	
-		xmlSAX2GetParameterEntity	(void *ctx,
-						 const xmlChar *name);
-XMLPUBFUN xmlParserInputPtr XMLCALL 
-		xmlSAX2ResolveEntity		(void *ctx,
-						 const xmlChar *publicId,
-						 const xmlChar *systemId);
-
-XMLPUBFUN void XMLCALL		
-		xmlSAX2EntityDecl		(void *ctx,
-						 const xmlChar *name,
-						 int type,
-						 const xmlChar *publicId,
-						 const xmlChar *systemId,
-						 xmlChar *content);
-XMLPUBFUN void XMLCALL		
-		xmlSAX2AttributeDecl		(void *ctx,
-						 const xmlChar *elem,
-						 const xmlChar *fullname,
-						 int type,
-						 int def,
-						 const xmlChar *defaultValue,
-						 xmlEnumerationPtr tree);
-XMLPUBFUN void XMLCALL		
-		xmlSAX2ElementDecl		(void *ctx,
-						 const xmlChar *name,
-						 int type,
-						 xmlElementContentPtr content);
-XMLPUBFUN void XMLCALL		
-		xmlSAX2NotationDecl		(void *ctx,
-						 const xmlChar *name,
-						 const xmlChar *publicId,
-						 const xmlChar *systemId);
-XMLPUBFUN void XMLCALL		
-		xmlSAX2UnparsedEntityDecl	(void *ctx,
-						 const xmlChar *name,
-						 const xmlChar *publicId,
-						 const xmlChar *systemId,
-						 const xmlChar *notationName);
-
-XMLPUBFUN void XMLCALL		
-		xmlSAX2StartDocument		(void *ctx);
-XMLPUBFUN void XMLCALL		
-		xmlSAX2EndDocument		(void *ctx);
-#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
-XMLPUBFUN void XMLCALL		
-		xmlSAX2StartElement		(void *ctx,
-						 const xmlChar *fullname,
-						 const xmlChar **atts);
-XMLPUBFUN void XMLCALL		
-		xmlSAX2EndElement		(void *ctx,
-						 const xmlChar *name);
-#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED */
-XMLPUBFUN void XMLCALL
-		xmlSAX2StartElementNs		(void *ctx,
-						 const xmlChar *localname,
-						 const xmlChar *prefix,
-						 const xmlChar *URI,
-						 int nb_namespaces,
-						 const xmlChar **namespaces,
-						 int nb_attributes,
-						 int nb_defaulted,
-						 const xmlChar **attributes);
-XMLPUBFUN void XMLCALL
-		xmlSAX2EndElementNs		(void *ctx,
-						 const xmlChar *localname,
-						 const xmlChar *prefix,
-						 const xmlChar *URI);
-XMLPUBFUN void XMLCALL		
-		xmlSAX2Reference		(void *ctx,
-						 const xmlChar *name);
-XMLPUBFUN void XMLCALL		
-		xmlSAX2Characters		(void *ctx,
-						 const xmlChar *ch,
-						 int len);
-XMLPUBFUN void XMLCALL		
-		xmlSAX2IgnorableWhitespace	(void *ctx,
-						 const xmlChar *ch,
-						 int len);
-XMLPUBFUN void XMLCALL		
-		xmlSAX2ProcessingInstruction	(void *ctx,
-						 const xmlChar *target,
-						 const xmlChar *data);
-XMLPUBFUN void XMLCALL		
-		xmlSAX2Comment			(void *ctx,
-						 const xmlChar *value);
-XMLPUBFUN void XMLCALL		
-		xmlSAX2CDataBlock		(void *ctx,
-						 const xmlChar *value,
-						 int len);
-
-#ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN int XMLCALL
-		xmlSAXDefaultVersion		(int version);
-#endif /* LIBXML_SAX1_ENABLED */
-
-XMLPUBFUN int XMLCALL
-		xmlSAXVersion			(xmlSAXHandler *hdlr,
-						 int version);
-XMLPUBFUN void XMLCALL		
-		xmlSAX2InitDefaultSAXHandler    (xmlSAXHandler *hdlr,
-						 int warning);
-#ifdef LIBXML_HTML_ENABLED
-XMLPUBFUN void XMLCALL		
-		xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
-XMLPUBFUN void XMLCALL		
-		htmlDefaultSAXHandlerInit	(void);
-#endif
-#ifdef LIBXML_DOCB_ENABLED
-XMLPUBFUN void XMLCALL		
-		xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
-XMLPUBFUN void XMLCALL		
-		docbDefaultSAXHandlerInit	(void);
-#endif
-XMLPUBFUN void XMLCALL		
-		xmlDefaultSAXHandlerInit	(void);
-#ifdef __cplusplus
-}
-#endif
-#endif /* __XML_SAX2_H__ */
diff --git a/interfaces/ext/libxml/c14n.h b/interfaces/ext/libxml/c14n.h
deleted file mode 100644
index a8aa737..0000000
--- a/interfaces/ext/libxml/c14n.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Summary: Provide Canonical XML and Exclusive XML Canonicalization
- * Description: the c14n modules provides a
- *
- * "Canonical XML" implementation
- * http://www.w3.org/TR/xml-c14n
- *
- * and an
- *
- * "Exclusive XML Canonicalization" implementation
- * http://www.w3.org/TR/xml-exc-c14n
-
- * Copy: See Copyright for the status of this software.
- *
- * Author: Aleksey Sanin <aleksey at aleksey.com>
- */
-#ifndef __XML_C14N_H__
-#define __XML_C14N_H__
-#ifdef LIBXML_C14N_ENABLED
-#ifdef LIBXML_OUTPUT_ENABLED
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <libxml/xmlversion.h>
-#include <libxml/tree.h>
-#include <libxml/xpath.h>
-
-/*
- * XML Canonicazation
- * http://www.w3.org/TR/xml-c14n
- *
- * Exclusive XML Canonicazation
- * http://www.w3.org/TR/xml-exc-c14n
- *
- * Canonical form of an XML document could be created if and only if
- *  a) default attributes (if any) are added to all nodes
- *  b) all character and parsed entity references are resolved
- * In order to achive this in libxml2 the document MUST be loaded with
- * following global setings:
- *
- *    xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
- *    xmlSubstituteEntitiesDefault(1);
- *
- * or corresponding parser context setting:
- *    xmlParserCtxtPtr ctxt;
- *
- *    ...
- *    ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
- *    ctxt->replaceEntities = 1;
- *    ...
- */
-
-
-XMLPUBFUN int XMLCALL
-		xmlC14NDocSaveTo	(xmlDocPtr doc,
-					 xmlNodeSetPtr nodes,
-					 int exclusive,
-					 xmlChar **inclusive_ns_prefixes,
-					 int with_comments,
-					 xmlOutputBufferPtr buf);
-
-XMLPUBFUN int XMLCALL
-		xmlC14NDocDumpMemory	(xmlDocPtr doc,
-					 xmlNodeSetPtr nodes,
-					 int exclusive,
-					 xmlChar **inclusive_ns_prefixes,
-					 int with_comments,
-					 xmlChar **doc_txt_ptr);
-
-XMLPUBFUN int XMLCALL
-		xmlC14NDocSave		(xmlDocPtr doc,
-					 xmlNodeSetPtr nodes,
-					 int exclusive,
-					 xmlChar **inclusive_ns_prefixes,
-					 int with_comments,
-					 const char* filename,
-					 int compression);
-
-
-/**
- * This is the core C14N function
- */
-/**
- * xmlC14NIsVisibleCallback:
- * @user_data: user data
- * @node: the curent node
- * @parent: the parent node
- *
- * Signature for a C14N callback on visible nodes
- *
- * Returns 1 if the node should be included
- */
-typedef int (*xmlC14NIsVisibleCallback)	(void* user_data,
-					 xmlNodePtr node,
-					 xmlNodePtr parent);
-
-XMLPUBFUN int XMLCALL
-		xmlC14NExecute		(xmlDocPtr doc,
-					 xmlC14NIsVisibleCallback is_visible_callback,
-					 void* user_data,
-					 int exclusive,
-					 xmlChar **inclusive_ns_prefixes,
-					 int with_comments,
-					 xmlOutputBufferPtr buf);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* LIBXML_OUTPUT_ENABLED */
-#endif /* LIBXML_C14N_ENABLED */
-#endif /* __XML_C14N_H__ */
-
diff --git a/interfaces/ext/libxml/catalog.h b/interfaces/ext/libxml/catalog.h
deleted file mode 100644
index b444137..0000000
--- a/interfaces/ext/libxml/catalog.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/**
- * Summary: interfaces to the Catalog handling system
- * Description: the catalog module implements the support for
- * XML Catalogs and SGML catalogs
- *
- * SGML Open Technical Resolution TR9401:1997.
- * http://www.jclark.com/sp/catalog.htm
- *
- * XML Catalogs Working Draft 06 August 2001
- * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_CATALOG_H__
-#define __XML_CATALOG_H__
-
-#include <stdio.h>
-
-#include <libxml/xmlversion.h>
-#include <libxml/xmlstring.h>
-#include <libxml/tree.h>
-
-#ifdef LIBXML_CATALOG_ENABLED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * XML_CATALOGS_NAMESPACE:
- *
- * The namespace for the XML Catalogs elements.
- */
-#define XML_CATALOGS_NAMESPACE					\
-    (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
-/**
- * XML_CATALOG_PI:
- *
- * The specific XML Catalog Processing Instuction name.
- */
-#define XML_CATALOG_PI						\
-    (const xmlChar *) "oasis-xml-catalog"
-
-/*
- * The API is voluntarily limited to general cataloging.
- */
-typedef enum {
-    XML_CATA_PREFER_NONE = 0,
-    XML_CATA_PREFER_PUBLIC = 1,
-    XML_CATA_PREFER_SYSTEM
-} xmlCatalogPrefer;
-
-typedef enum {
-    XML_CATA_ALLOW_NONE = 0,
-    XML_CATA_ALLOW_GLOBAL = 1,
-    XML_CATA_ALLOW_DOCUMENT = 2,
-    XML_CATA_ALLOW_ALL = 3
-} xmlCatalogAllow;
-
-typedef struct _xmlCatalog xmlCatalog;
-typedef xmlCatalog *xmlCatalogPtr;
-
-/*
- * Operations on a given catalog.
- */
-XMLPUBFUN xmlCatalogPtr XMLCALL
-		xmlNewCatalog		(int sgml);
-XMLPUBFUN xmlCatalogPtr XMLCALL	
-		xmlLoadACatalog		(const char *filename);
-XMLPUBFUN xmlCatalogPtr XMLCALL	
-		xmlLoadSGMLSuperCatalog	(const char *filename);
-XMLPUBFUN int XMLCALL		
-		xmlConvertSGMLCatalog	(xmlCatalogPtr catal);
-XMLPUBFUN int XMLCALL		
-		xmlACatalogAdd		(xmlCatalogPtr catal,
-					 const xmlChar *type,
-					 const xmlChar *orig,
-					 const xmlChar *replace);
-XMLPUBFUN int XMLCALL		
-		xmlACatalogRemove	(xmlCatalogPtr catal,
-					 const xmlChar *value);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlACatalogResolve	(xmlCatalogPtr catal,
-					 const xmlChar *pubID,
-	                                 const xmlChar *sysID);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlACatalogResolveSystem(xmlCatalogPtr catal,
-					 const xmlChar *sysID);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlACatalogResolvePublic(xmlCatalogPtr catal,
-					 const xmlChar *pubID);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlACatalogResolveURI	(xmlCatalogPtr catal,
-					 const xmlChar *URI);
-#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL		
-		xmlACatalogDump		(xmlCatalogPtr catal,
-					 FILE *out);
-#endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN void XMLCALL		
-		xmlFreeCatalog		(xmlCatalogPtr catal);
-XMLPUBFUN int XMLCALL		
-		xmlCatalogIsEmpty	(xmlCatalogPtr catal);
-
-/*
- * Global operations.
- */
-XMLPUBFUN void XMLCALL		
-		xmlInitializeCatalog	(void);
-XMLPUBFUN int XMLCALL		
-		xmlLoadCatalog		(const char *filename);
-XMLPUBFUN void XMLCALL		
-		xmlLoadCatalogs		(const char *paths);
-XMLPUBFUN void XMLCALL		
-		xmlCatalogCleanup	(void);
-#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL		
-		xmlCatalogDump		(FILE *out);
-#endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlCatalogResolve	(const xmlChar *pubID,
-	                                 const xmlChar *sysID);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlCatalogResolveSystem	(const xmlChar *sysID);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlCatalogResolvePublic	(const xmlChar *pubID);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlCatalogResolveURI	(const xmlChar *URI);
-XMLPUBFUN int XMLCALL		
-		xmlCatalogAdd		(const xmlChar *type,
-					 const xmlChar *orig,
-					 const xmlChar *replace);
-XMLPUBFUN int XMLCALL		
-		xmlCatalogRemove	(const xmlChar *value);
-XMLPUBFUN xmlDocPtr XMLCALL	
-		xmlParseCatalogFile	(const char *filename);
-XMLPUBFUN int XMLCALL		
-		xmlCatalogConvert	(void);
-
-/*
- * Strictly minimal interfaces for per-document catalogs used
- * by the parser.
- */
-XMLPUBFUN void XMLCALL		
-		xmlCatalogFreeLocal	(void *catalogs);
-XMLPUBFUN void * XMLCALL		
-		xmlCatalogAddLocal	(void *catalogs,
-					 const xmlChar *URL);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlCatalogLocalResolve	(void *catalogs,
-					 const xmlChar *pubID,
-	                                 const xmlChar *sysID);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlCatalogLocalResolveURI(void *catalogs,
-					 const xmlChar *URI);
-/*
- * Preference settings.
- */
-XMLPUBFUN int XMLCALL		
-		xmlCatalogSetDebug	(int level);
-XMLPUBFUN xmlCatalogPrefer XMLCALL 
-		xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
-XMLPUBFUN void XMLCALL		
-		xmlCatalogSetDefaults	(xmlCatalogAllow allow);
-XMLPUBFUN xmlCatalogAllow XMLCALL	
-		xmlCatalogGetDefaults	(void);
-
-
-/* DEPRECATED interfaces */
-XMLPUBFUN const xmlChar * XMLCALL	
-		xmlCatalogGetSystem	(const xmlChar *sysID);
-XMLPUBFUN const xmlChar * XMLCALL	
-		xmlCatalogGetPublic	(const xmlChar *pubID);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* LIBXML_CATALOG_ENABLED */
-#endif /* __XML_CATALOG_H__ */
diff --git a/interfaces/ext/libxml/chvalid.h b/interfaces/ext/libxml/chvalid.h
deleted file mode 100644
index fb43016..0000000
--- a/interfaces/ext/libxml/chvalid.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Summary: Unicode character range checking
- * Description: this module exports interfaces for the character
- *               range validation APIs
- *
- * This file is automatically generated from the cvs source
- * definition files using the genChRanges.py Python script
- *
- * Generation date: Mon Mar 27 11:09:48 2006
- * Sources: chvalid.def
- * Author: William Brack <wbrack at mmm.com.hk>
- */
-
-#ifndef __XML_CHVALID_H__
-#define __XML_CHVALID_H__
-
-#include <libxml/xmlversion.h>
-#include <libxml/xmlstring.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Define our typedefs and structures
- *
- */
-typedef struct _xmlChSRange xmlChSRange;
-typedef xmlChSRange *xmlChSRangePtr;
-struct _xmlChSRange {
-    unsigned short	low;
-    unsigned short	high;
-};
-
-typedef struct _xmlChLRange xmlChLRange;
-typedef xmlChLRange *xmlChLRangePtr;
-struct _xmlChLRange {
-    unsigned int	low;
-    unsigned int	high;
-};
-
-typedef struct _xmlChRangeGroup xmlChRangeGroup;
-typedef xmlChRangeGroup *xmlChRangeGroupPtr;
-struct _xmlChRangeGroup {
-    int			nbShortRange;
-    int			nbLongRange;
-    const xmlChSRange	*shortRange;	/* points to an array of ranges */
-    const xmlChLRange	*longRange;
-};
-
-/**
- * Range checking routine
- */
-XMLPUBFUN int XMLCALL
-		xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
-
-
-/**
- * xmlIsBaseChar_ch:
- * @c: char to validate
- *
- * Automatically generated by genChRanges.py
- */
-#define xmlIsBaseChar_ch(c)	(((0x41 <= (c)) && ((c) <= 0x5a)) || \
-				 ((0x61 <= (c)) && ((c) <= 0x7a)) || \
-				 ((0xc0 <= (c)) && ((c) <= 0xd6)) || \
-				 ((0xd8 <= (c)) && ((c) <= 0xf6)) || \
-				  (0xf8 <= (c)))
-
-/**
- * xmlIsBaseCharQ:
- * @c: char to validate
- *
- * Automatically generated by genChRanges.py
- */
-#define xmlIsBaseCharQ(c)	(((c) < 0x100) ? \
-				 xmlIsBaseChar_ch((c)) : \
-				 xmlCharInRange((c), &xmlIsBaseCharGroup))
-
-XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup;
-
-/**
- * xmlIsBlank_ch:
- * @c: char to validate
- *
- * Automatically generated by genChRanges.py
- */
-#define xmlIsBlank_ch(c)	(((c) == 0x20) || \
-				 ((0x9 <= (c)) && ((c) <= 0xa)) || \
-				 ((c) == 0xd))
-
-/**
- * xmlIsBlankQ:
- * @c: char to validate
- *
- * Automatically generated by genChRanges.py
- */
-#define xmlIsBlankQ(c)		(((c) < 0x100) ? \
-				 xmlIsBlank_ch((c)) : 0)
-
-
-/**
- * xmlIsChar_ch:
- * @c: char to validate
- *
- * Automatically generated by genChRanges.py
- */
-#define xmlIsChar_ch(c)		(((0x9 <= (c)) && ((c) <= 0xa)) || \
-				 ((c) == 0xd) || \
-				  (0x20 <= (c)))
-
-/**
- * xmlIsCharQ:
- * @c: char to validate
- *
- * Automatically generated by genChRanges.py
- */
-#define xmlIsCharQ(c)		(((c) < 0x100) ? \
-				 xmlIsChar_ch((c)) :\
-				(((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
-				 ((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
-				 ((0x10000 <= (c)) && ((c) <= 0x10ffff))))
-
-XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup;
-
-/**
- * xmlIsCombiningQ:
- * @c: char to validate
- *
- * Automatically generated by genChRanges.py
- */
-#define xmlIsCombiningQ(c)	(((c) < 0x100) ? \
-				 0 : \
-				 xmlCharInRange((c), &xmlIsCombiningGroup))
-
-XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup;
-
-/**
- * xmlIsDigit_ch:
- * @c: char to validate
- *
- * Automatically generated by genChRanges.py
- */
-#define xmlIsDigit_ch(c)	(((0x30 <= (c)) && ((c) <= 0x39)))
-
-/**
- * xmlIsDigitQ:
- * @c: char to validate
- *
- * Automatically generated by genChRanges.py
- */
-#define xmlIsDigitQ(c)		(((c) < 0x100) ? \
-				 xmlIsDigit_ch((c)) : \
-				 xmlCharInRange((c), &xmlIsDigitGroup))
-
-XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup;
-
-/**
- * xmlIsExtender_ch:
- * @c: char to validate
- *
- * Automatically generated by genChRanges.py
- */
-#define xmlIsExtender_ch(c)	(((c) == 0xb7))
-
-/**
- * xmlIsExtenderQ:
- * @c: char to validate
- *
- * Automatically generated by genChRanges.py
- */
-#define xmlIsExtenderQ(c)	(((c) < 0x100) ? \
-				 xmlIsExtender_ch((c)) : \
-				 xmlCharInRange((c), &xmlIsExtenderGroup))
-
-XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup;
-
-/**
- * xmlIsIdeographicQ:
- * @c: char to validate
- *
- * Automatically generated by genChRanges.py
- */
-#define xmlIsIdeographicQ(c)	(((c) < 0x100) ? \
-				 0 :\
-				(((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \
-				 ((c) == 0x3007) || \
-				 ((0x3021 <= (c)) && ((c) <= 0x3029))))
-
-XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup;
-XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
-
-/**
- * xmlIsPubidChar_ch:
- * @c: char to validate
- *
- * Automatically generated by genChRanges.py
- */
-#define xmlIsPubidChar_ch(c)	(xmlIsPubidChar_tab[(c)])
-
-/**
- * xmlIsPubidCharQ:
- * @c: char to validate
- *
- * Automatically generated by genChRanges.py
- */
-#define xmlIsPubidCharQ(c)	(((c) < 0x100) ? \
-				 xmlIsPubidChar_ch((c)) : 0)
-
-XMLPUBFUN int XMLCALL
-		xmlIsBaseChar(unsigned int ch);
-XMLPUBFUN int XMLCALL
-		xmlIsBlank(unsigned int ch);
-XMLPUBFUN int XMLCALL
-		xmlIsChar(unsigned int ch);
-XMLPUBFUN int XMLCALL
-		xmlIsCombining(unsigned int ch);
-XMLPUBFUN int XMLCALL
-		xmlIsDigit(unsigned int ch);
-XMLPUBFUN int XMLCALL
-		xmlIsExtender(unsigned int ch);
-XMLPUBFUN int XMLCALL
-		xmlIsIdeographic(unsigned int ch);
-XMLPUBFUN int XMLCALL
-		xmlIsPubidChar(unsigned int ch);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* __XML_CHVALID_H__ */
diff --git a/interfaces/ext/libxml/debugXML.h b/interfaces/ext/libxml/debugXML.h
deleted file mode 100644
index 5a9d20b..0000000
--- a/interfaces/ext/libxml/debugXML.h
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Summary: Tree debugging APIs
- * Description: Interfaces to a set of routines used for debugging the tree
- *              produced by the XML parser.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __DEBUG_XML__
-#define __DEBUG_XML__
-#include <stdio.h>
-#include <libxml/xmlversion.h>
-#include <libxml/tree.h>
-
-#ifdef LIBXML_DEBUG_ENABLED
-
-#include <libxml/xpath.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The standard Dump routines.
- */
-XMLPUBFUN void XMLCALL	
-	xmlDebugDumpString	(FILE *output,
-				 const xmlChar *str);
-XMLPUBFUN void XMLCALL	
-	xmlDebugDumpAttr	(FILE *output,
-				 xmlAttrPtr attr,
-				 int depth);
-XMLPUBFUN void XMLCALL	
-	xmlDebugDumpAttrList	(FILE *output,
-				 xmlAttrPtr attr,
-				 int depth);
-XMLPUBFUN void XMLCALL	
-	xmlDebugDumpOneNode	(FILE *output,
-				 xmlNodePtr node,
-				 int depth);
-XMLPUBFUN void XMLCALL
-	xmlDebugDumpNode	(FILE *output,
-				 xmlNodePtr node,
-				 int depth);
-XMLPUBFUN void XMLCALL
-	xmlDebugDumpNodeList	(FILE *output,
-				 xmlNodePtr node,
-				 int depth);
-XMLPUBFUN void XMLCALL
-	xmlDebugDumpDocumentHead(FILE *output,
-				 xmlDocPtr doc);
-XMLPUBFUN void XMLCALL
-	xmlDebugDumpDocument	(FILE *output,
-				 xmlDocPtr doc);
-XMLPUBFUN void XMLCALL	
-	xmlDebugDumpDTD		(FILE *output,
-				 xmlDtdPtr dtd);
-XMLPUBFUN void XMLCALL	
-	xmlDebugDumpEntities	(FILE *output,
-				 xmlDocPtr doc);
-
-/****************************************************************
- *								*
- *	 		Checking routines			*
- *								*
- ****************************************************************/
-
-XMLPUBFUN int XMLCALL
-	xmlDebugCheckDocument	(FILE * output,
-				 xmlDocPtr doc);
-
-/****************************************************************
- *								*
- *	 		XML shell helpers			*
- *								*
- ****************************************************************/
-
-XMLPUBFUN void XMLCALL	
-	xmlLsOneNode		(FILE *output, xmlNodePtr node);
-XMLPUBFUN int XMLCALL	
-	xmlLsCountNode		(xmlNodePtr node);
-
-XMLPUBFUN const char * XMLCALL 
-	xmlBoolToText		(int boolval);
-
-/****************************************************************
- *								*
- *	 The XML shell related structures and functions		*
- *								*
- ****************************************************************/
-
-#ifdef LIBXML_XPATH_ENABLED
-/**
- * xmlShellReadlineFunc:
- * @prompt:  a string prompt
- *
- * This is a generic signature for the XML shell input function.
- *
- * Returns a string which will be freed by the Shell.
- */
-typedef char * (* xmlShellReadlineFunc)(char *prompt);
-
-/**
- * xmlShellCtxt:
- *
- * A debugging shell context.
- * TODO: add the defined function tables.
- */
-typedef struct _xmlShellCtxt xmlShellCtxt;
-typedef xmlShellCtxt *xmlShellCtxtPtr;
-struct _xmlShellCtxt {
-    char *filename;
-    xmlDocPtr doc;
-    xmlNodePtr node;
-    xmlXPathContextPtr pctxt;
-    int loaded;
-    FILE *output;
-    xmlShellReadlineFunc input;
-};
-
-/**
- * xmlShellCmd:
- * @ctxt:  a shell context
- * @arg:  a string argument
- * @node:  a first node
- * @node2:  a second node
- *
- * This is a generic signature for the XML shell functions.
- *
- * Returns an int, negative returns indicating errors.
- */
-typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
-                             char *arg,
-			     xmlNodePtr node,
-			     xmlNodePtr node2);
-
-XMLPUBFUN void XMLCALL	
-	xmlShellPrintXPathError	(int errorType,
-				 const char *arg);
-XMLPUBFUN void XMLCALL	
-	xmlShellPrintXPathResult(xmlXPathObjectPtr list);
-XMLPUBFUN int XMLCALL	
-	xmlShellList		(xmlShellCtxtPtr ctxt,
-				 char *arg,
-				 xmlNodePtr node,
-				 xmlNodePtr node2);
-XMLPUBFUN int XMLCALL	
-	xmlShellBase		(xmlShellCtxtPtr ctxt,
-				 char *arg,
-				 xmlNodePtr node,
-				 xmlNodePtr node2);
-XMLPUBFUN int XMLCALL	
-	xmlShellDir		(xmlShellCtxtPtr ctxt,
-				 char *arg,
-				 xmlNodePtr node,
-				 xmlNodePtr node2);
-XMLPUBFUN int XMLCALL	
-	xmlShellLoad		(xmlShellCtxtPtr ctxt,
-				 char *filename,
-				 xmlNodePtr node,
-				 xmlNodePtr node2);
-#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL	
-	xmlShellPrintNode	(xmlNodePtr node);
-XMLPUBFUN int XMLCALL	
-	xmlShellCat		(xmlShellCtxtPtr ctxt,
-				 char *arg,
-				 xmlNodePtr node,
-				 xmlNodePtr node2);
-XMLPUBFUN int XMLCALL	
-	xmlShellWrite		(xmlShellCtxtPtr ctxt,
-				 char *filename,
-				 xmlNodePtr node,
-				 xmlNodePtr node2);
-XMLPUBFUN int XMLCALL	
-	xmlShellSave		(xmlShellCtxtPtr ctxt,
-				 char *filename,
-				 xmlNodePtr node,
-				 xmlNodePtr node2);
-#endif /* LIBXML_OUTPUT_ENABLED */
-#ifdef LIBXML_VALID_ENABLED
-XMLPUBFUN int XMLCALL	
-	xmlShellValidate	(xmlShellCtxtPtr ctxt,
-				 char *dtd,
-				 xmlNodePtr node,
-				 xmlNodePtr node2);
-#endif /* LIBXML_VALID_ENABLED */
-XMLPUBFUN int XMLCALL	
-	xmlShellDu		(xmlShellCtxtPtr ctxt,
-				 char *arg,
-				 xmlNodePtr tree,
-				 xmlNodePtr node2);
-XMLPUBFUN int XMLCALL	
-	xmlShellPwd		(xmlShellCtxtPtr ctxt,
-				 char *buffer,
-				 xmlNodePtr node,
-				 xmlNodePtr node2);
-
-/*
- * The Shell interface.
- */
-XMLPUBFUN void XMLCALL	
-	xmlShell		(xmlDocPtr doc,
-				 char *filename,
-				 xmlShellReadlineFunc input,
-				 FILE *output);
-			 
-#endif /* LIBXML_XPATH_ENABLED */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_DEBUG_ENABLED */
-#endif /* __DEBUG_XML__ */
diff --git a/interfaces/ext/libxml/dict.h b/interfaces/ext/libxml/dict.h
deleted file mode 100644
index abb8339..0000000
--- a/interfaces/ext/libxml/dict.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Summary: string dictionnary
- * Description: dictionary of reusable strings, just used to avoid allocation
- *         and freeing operations.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_DICT_H__
-#define __XML_DICT_H__
-
-#include <libxml/xmlversion.h>
-#include <libxml/tree.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The dictionnary.
- */
-typedef struct _xmlDict xmlDict;
-typedef xmlDict *xmlDictPtr;
-
-/*
- * Constructor and destructor.
- */
-XMLPUBFUN xmlDictPtr XMLCALL
-			xmlDictCreate	(void);
-XMLPUBFUN xmlDictPtr XMLCALL
-			xmlDictCreateSub(xmlDictPtr sub);
-XMLPUBFUN int XMLCALL
-			xmlDictReference(xmlDictPtr dict);
-XMLPUBFUN void XMLCALL			
-			xmlDictFree	(xmlDictPtr dict);
-
-/*
- * Lookup of entry in the dictionnary.
- */
-XMLPUBFUN const xmlChar * XMLCALL		
-			xmlDictLookup	(xmlDictPtr dict,
-		                         const xmlChar *name,
-		                         int len);
-XMLPUBFUN const xmlChar * XMLCALL		
-			xmlDictExists	(xmlDictPtr dict,
-		                         const xmlChar *name,
-		                         int len);
-XMLPUBFUN const xmlChar * XMLCALL		
-			xmlDictQLookup	(xmlDictPtr dict,
-		                         const xmlChar *prefix,
-		                         const xmlChar *name);
-XMLPUBFUN int XMLCALL
-			xmlDictOwns	(xmlDictPtr dict,
-					 const xmlChar *str);
-XMLPUBFUN int XMLCALL			
-			xmlDictSize	(xmlDictPtr dict);
-
-/*
- * Cleanup function
- */
-XMLPUBFUN void XMLCALL
-                        xmlDictCleanup  (void);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* ! __XML_DICT_H__ */
diff --git a/interfaces/ext/libxml/encoding.h b/interfaces/ext/libxml/encoding.h
deleted file mode 100644
index c74b25f..0000000
--- a/interfaces/ext/libxml/encoding.h
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Summary: interface for the encoding conversion functions
- * Description: interface for the encoding conversion functions needed for
- *              XML basic encoding and iconv() support.
- *
- * Related specs are
- * rfc2044        (UTF-8 and UTF-16) F. Yergeau Alis Technologies
- * [ISO-10646]    UTF-8 and UTF-16 in Annexes
- * [ISO-8859-1]   ISO Latin-1 characters codes.
- * [UNICODE]      The Unicode Consortium, "The Unicode Standard --
- *                Worldwide Character Encoding -- Version 1.0", Addison-
- *                Wesley, Volume 1, 1991, Volume 2, 1992.  UTF-8 is
- *                described in Unicode Technical Report #4.
- * [US-ASCII]     Coded Character Set--7-bit American Standard Code for
- *                Information Interchange, ANSI X3.4-1986.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_CHAR_ENCODING_H__
-#define __XML_CHAR_ENCODING_H__
-
-#include <libxml/xmlversion.h>
-
-#ifdef LIBXML_ICONV_ENABLED
-#include <iconv.h>
-#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * xmlCharEncoding:
- *
- * Predefined values for some standard encodings.
- * Libxml does not do beforehand translation on UTF8 and ISOLatinX.
- * It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default.
- *
- * Anything else would have to be translated to UTF8 before being
- * given to the parser itself. The BOM for UTF16 and the encoding
- * declaration are looked at and a converter is looked for at that
- * point. If not found the parser stops here as asked by the XML REC. A
- * converter can be registered by the user using xmlRegisterCharEncodingHandler
- * but the current form doesn't allow stateful transcoding (a serious
- * problem agreed !). If iconv has been found it will be used
- * automatically and allow stateful transcoding, the simplest is then
- * to be sure to enable iconv and to provide iconv libs for the encoding
- * support needed.
- *
- * Note that the generic "UTF-16" is not a predefined value.  Instead, only
- * the specific UTF-16LE and UTF-16BE are present.
- */
-typedef enum {
-    XML_CHAR_ENCODING_ERROR=   -1, /* No char encoding detected */
-    XML_CHAR_ENCODING_NONE=	0, /* No char encoding detected */
-    XML_CHAR_ENCODING_UTF8=	1, /* UTF-8 */
-    XML_CHAR_ENCODING_UTF16LE=	2, /* UTF-16 little endian */
-    XML_CHAR_ENCODING_UTF16BE=	3, /* UTF-16 big endian */
-    XML_CHAR_ENCODING_UCS4LE=	4, /* UCS-4 little endian */
-    XML_CHAR_ENCODING_UCS4BE=	5, /* UCS-4 big endian */
-    XML_CHAR_ENCODING_EBCDIC=	6, /* EBCDIC uh! */
-    XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
-    XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
-    XML_CHAR_ENCODING_UCS2=	9, /* UCS-2 */
-    XML_CHAR_ENCODING_8859_1=	10,/* ISO-8859-1 ISO Latin 1 */
-    XML_CHAR_ENCODING_8859_2=	11,/* ISO-8859-2 ISO Latin 2 */
-    XML_CHAR_ENCODING_8859_3=	12,/* ISO-8859-3 */
-    XML_CHAR_ENCODING_8859_4=	13,/* ISO-8859-4 */
-    XML_CHAR_ENCODING_8859_5=	14,/* ISO-8859-5 */
-    XML_CHAR_ENCODING_8859_6=	15,/* ISO-8859-6 */
-    XML_CHAR_ENCODING_8859_7=	16,/* ISO-8859-7 */
-    XML_CHAR_ENCODING_8859_8=	17,/* ISO-8859-8 */
-    XML_CHAR_ENCODING_8859_9=	18,/* ISO-8859-9 */
-    XML_CHAR_ENCODING_2022_JP=  19,/* ISO-2022-JP */
-    XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
-    XML_CHAR_ENCODING_EUC_JP=   21,/* EUC-JP */
-    XML_CHAR_ENCODING_ASCII=    22 /* pure ASCII */
-} xmlCharEncoding;
-
-/**
- * xmlCharEncodingInputFunc:
- * @out:  a pointer to an array of bytes to store the UTF-8 result
- * @outlen:  the length of @out
- * @in:  a pointer to an array of chars in the original encoding
- * @inlen:  the length of @in
- *
- * Take a block of chars in the original encoding and try to convert
- * it to an UTF-8 block of chars out.
- *
- * Returns the number of bytes written, -1 if lack of space, or -2
- *     if the transcoding failed.
- * The value of @inlen after return is the number of octets consumed
- *     if the return value is positive, else unpredictiable.
- * The value of @outlen after return is the number of octets consumed.
- */
-typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
-                                         const unsigned char *in, int *inlen);
-
-
-/**
- * xmlCharEncodingOutputFunc:
- * @out:  a pointer to an array of bytes to store the result
- * @outlen:  the length of @out
- * @in:  a pointer to an array of UTF-8 chars
- * @inlen:  the length of @in
- *
- * Take a block of UTF-8 chars in and try to convert it to another
- * encoding.
- * Note: a first call designed to produce heading info is called with
- * in = NULL. If stateful this should also initialize the encoder state.
- *
- * Returns the number of bytes written, -1 if lack of space, or -2
- *     if the transcoding failed.
- * The value of @inlen after return is the number of octets consumed
- *     if the return value is positive, else unpredictiable.
- * The value of @outlen after return is the number of octets produced.
- */
-typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
-                                          const unsigned char *in, int *inlen);
-
-
-/*
- * Block defining the handlers for non UTF-8 encodings.
- * If iconv is supported, there are two extra fields.
- */
-
-typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
-typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
-struct _xmlCharEncodingHandler {
-    char                       *name;
-    xmlCharEncodingInputFunc   input;
-    xmlCharEncodingOutputFunc  output;
-#ifdef LIBXML_ICONV_ENABLED
-    iconv_t                    iconv_in;
-    iconv_t                    iconv_out;
-#endif /* LIBXML_ICONV_ENABLED */
-};
-
-#ifdef __cplusplus
-}
-#endif
-#include <libxml/tree.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Interfaces for encoding handlers.
- */
-XMLPUBFUN void XMLCALL	
-	xmlInitCharEncodingHandlers	(void);
-XMLPUBFUN void XMLCALL	
-	xmlCleanupCharEncodingHandlers	(void);
-XMLPUBFUN void XMLCALL	
-	xmlRegisterCharEncodingHandler	(xmlCharEncodingHandlerPtr handler);
-XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
-	xmlGetCharEncodingHandler	(xmlCharEncoding enc);
-XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
-	xmlFindCharEncodingHandler	(const char *name);
-XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
-	xmlNewCharEncodingHandler	(const char *name, 
-                          		 xmlCharEncodingInputFunc input,
-                          		 xmlCharEncodingOutputFunc output);
-
-/*
- * Interfaces for encoding names and aliases.
- */
-XMLPUBFUN int XMLCALL	
-	xmlAddEncodingAlias		(const char *name,
-					 const char *alias);
-XMLPUBFUN int XMLCALL	
-	xmlDelEncodingAlias		(const char *alias);
-XMLPUBFUN const char * XMLCALL
-	xmlGetEncodingAlias		(const char *alias);
-XMLPUBFUN void XMLCALL	
-	xmlCleanupEncodingAliases	(void);
-XMLPUBFUN xmlCharEncoding XMLCALL
-	xmlParseCharEncoding		(const char *name);
-XMLPUBFUN const char * XMLCALL
-	xmlGetCharEncodingName		(xmlCharEncoding enc);
-
-/*
- * Interfaces directly used by the parsers.
- */
-XMLPUBFUN xmlCharEncoding XMLCALL
-	xmlDetectCharEncoding		(const unsigned char *in,
-					 int len);
-
-XMLPUBFUN int XMLCALL	
-	xmlCharEncOutFunc		(xmlCharEncodingHandler *handler,
-					 xmlBufferPtr out,
-					 xmlBufferPtr in);
-
-XMLPUBFUN int XMLCALL	
-	xmlCharEncInFunc		(xmlCharEncodingHandler *handler,
-					 xmlBufferPtr out,
-					 xmlBufferPtr in);
-XMLPUBFUN int XMLCALL
-	xmlCharEncFirstLine		(xmlCharEncodingHandler *handler,
-					 xmlBufferPtr out,
-					 xmlBufferPtr in);
-XMLPUBFUN int XMLCALL	
-	xmlCharEncCloseFunc		(xmlCharEncodingHandler *handler);
-
-/*
- * Export a few useful functions
- */
-#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN int XMLCALL	
-	UTF8Toisolat1			(unsigned char *out,
-					 int *outlen,
-					 const unsigned char *in,
-					 int *inlen);
-#endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN int XMLCALL	
-	isolat1ToUTF8			(unsigned char *out,
-					 int *outlen,
-					 const unsigned char *in,
-					 int *inlen);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __XML_CHAR_ENCODING_H__ */
diff --git a/interfaces/ext/libxml/entities.h b/interfaces/ext/libxml/entities.h
deleted file mode 100644
index cefb97f..0000000
--- a/interfaces/ext/libxml/entities.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Summary: interface for the XML entities handling
- * Description: this module provides some of the entity API needed
- *              for the parser and applications.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_ENTITIES_H__
-#define __XML_ENTITIES_H__
-
-#include <libxml/xmlversion.h>
-#include <libxml/tree.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The different valid entity types.
- */
-typedef enum {
-    XML_INTERNAL_GENERAL_ENTITY = 1,
-    XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
-    XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
-    XML_INTERNAL_PARAMETER_ENTITY = 4,
-    XML_EXTERNAL_PARAMETER_ENTITY = 5,
-    XML_INTERNAL_PREDEFINED_ENTITY = 6
-} xmlEntityType;
-
-/*
- * An unit of storage for an entity, contains the string, the value
- * and the linkind data needed for the linking in the hash table.
- */
-
-struct _xmlEntity {
-    void           *_private;	        /* application data */
-    xmlElementType          type;       /* XML_ENTITY_DECL, must be second ! */
-    const xmlChar          *name;	/* Entity name */
-    struct _xmlNode    *children;	/* First child link */
-    struct _xmlNode        *last;	/* Last child link */
-    struct _xmlDtd       *parent;	/* -> DTD */
-    struct _xmlNode        *next;	/* next sibling link  */
-    struct _xmlNode        *prev;	/* previous sibling link  */
-    struct _xmlDoc          *doc;       /* the containing document */
-
-    xmlChar                *orig;	/* content without ref substitution */
-    xmlChar             *content;	/* content or ndata if unparsed */
-    int                   length;	/* the content length */
-    xmlEntityType          etype;	/* The entity type */
-    const xmlChar    *ExternalID;	/* External identifier for PUBLIC */
-    const xmlChar      *SystemID;	/* URI for a SYSTEM or PUBLIC Entity */
-
-    struct _xmlEntity     *nexte;	/* unused */
-    const xmlChar           *URI;	/* the full URI as computed */
-    int                    owner;	/* does the entity own the childrens */
-    int			 checked;	/* was the entity content checked */
-					/* this is also used to count entites
-					 * references done from that entity */
-};
-
-/*
- * All entities are stored in an hash table.
- * There is 2 separate hash tables for global and parameter entities.
- */
-
-typedef struct _xmlHashTable xmlEntitiesTable;
-typedef xmlEntitiesTable *xmlEntitiesTablePtr;
-
-/*
- * External functions:
- */
-
-#ifdef LIBXML_LEGACY_ENABLED
-XMLPUBFUN void XMLCALL
-		xmlInitializePredefinedEntities	(void);
-#endif /* LIBXML_LEGACY_ENABLED */
-
-XMLPUBFUN xmlEntityPtr XMLCALL
-			xmlNewEntity		(xmlDocPtr doc,
-						 const xmlChar *name,
-						 int type,
-						 const xmlChar *ExternalID,
-						 const xmlChar *SystemID,
-						 const xmlChar *content);
-XMLPUBFUN xmlEntityPtr XMLCALL
-			xmlAddDocEntity		(xmlDocPtr doc,
-						 const xmlChar *name,
-						 int type,
-						 const xmlChar *ExternalID,
-						 const xmlChar *SystemID,
-						 const xmlChar *content);
-XMLPUBFUN xmlEntityPtr XMLCALL
-			xmlAddDtdEntity		(xmlDocPtr doc,
-						 const xmlChar *name,
-						 int type,
-						 const xmlChar *ExternalID,
-						 const xmlChar *SystemID,
-						 const xmlChar *content);
-XMLPUBFUN xmlEntityPtr XMLCALL
-			xmlGetPredefinedEntity	(const xmlChar *name);
-XMLPUBFUN xmlEntityPtr XMLCALL
-			xmlGetDocEntity		(xmlDocPtr doc,
-						 const xmlChar *name);
-XMLPUBFUN xmlEntityPtr XMLCALL
-			xmlGetDtdEntity		(xmlDocPtr doc,
-						 const xmlChar *name);
-XMLPUBFUN xmlEntityPtr XMLCALL
-			xmlGetParameterEntity	(xmlDocPtr doc,
-						 const xmlChar *name);
-#ifdef LIBXML_LEGACY_ENABLED
-XMLPUBFUN const xmlChar * XMLCALL
-			xmlEncodeEntities	(xmlDocPtr doc,
-						 const xmlChar *input);
-#endif /* LIBXML_LEGACY_ENABLED */
-XMLPUBFUN xmlChar * XMLCALL
-			xmlEncodeEntitiesReentrant(xmlDocPtr doc,
-						 const xmlChar *input);
-XMLPUBFUN xmlChar * XMLCALL
-			xmlEncodeSpecialChars	(xmlDocPtr doc,
-						 const xmlChar *input);
-XMLPUBFUN xmlEntitiesTablePtr XMLCALL
-			xmlCreateEntitiesTable	(void);
-#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlEntitiesTablePtr XMLCALL
-			xmlCopyEntitiesTable	(xmlEntitiesTablePtr table);
-#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL
-			xmlFreeEntitiesTable	(xmlEntitiesTablePtr table);
-#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
-			xmlDumpEntitiesTable	(xmlBufferPtr buf,
-						 xmlEntitiesTablePtr table);
-XMLPUBFUN void XMLCALL
-			xmlDumpEntityDecl	(xmlBufferPtr buf,
-						 xmlEntityPtr ent);
-#endif /* LIBXML_OUTPUT_ENABLED */
-#ifdef LIBXML_LEGACY_ENABLED
-XMLPUBFUN void XMLCALL
-			xmlCleanupPredefinedEntities(void);
-#endif /* LIBXML_LEGACY_ENABLED */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-# endif /* __XML_ENTITIES_H__ */
diff --git a/interfaces/ext/libxml/globals.h b/interfaces/ext/libxml/globals.h
deleted file mode 100644
index 57e25fa..0000000
--- a/interfaces/ext/libxml/globals.h
+++ /dev/null
@@ -1,491 +0,0 @@
-/*
- * Summary: interface for all global variables of the library
- * Description: all the global variables and thread handling for
- *              those variables is handled by this module.
- *
- * The bottom of this file is automatically generated by build_glob.py
- * based on the description file global.data
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Gary Pennington <Gary.Pennington at uk.sun.com>, Daniel Veillard
- */
-
-#ifndef __XML_GLOBALS_H
-#define __XML_GLOBALS_H
-
-#include <libxml/xmlversion.h>
-#include <libxml/parser.h>
-#include <libxml/xmlerror.h>
-#include <libxml/SAX.h>
-#include <libxml/SAX2.h>
-#include <libxml/xmlmemory.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-XMLPUBFUN void XMLCALL xmlInitGlobals(void);
-XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);
-
-/**
- * xmlParserInputBufferCreateFilenameFunc:
- * @URI: the URI to read from
- * @enc: the requested source encoding
- *
- * Signature for the function doing the lookup for a suitable input method
- * corresponding to an URI.
- *
- * Returns the new xmlParserInputBufferPtr in case of success or NULL if no
- *         method was found.
- */
-typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI, xmlCharEncoding enc);
-
-/**
- * xmlOutputBufferCreateFilenameFunc:
- * @URI: the URI to write to
- * @enc: the requested target encoding
- *
- * Signature for the function doing the lookup for a suitable output method
- * corresponding to an URI.
- *
- * Returns the new xmlOutputBufferPtr in case of success or NULL if no
- *         method was found.
- */
-typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI, xmlCharEncodingHandlerPtr encoder, int compression);
-
-XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
-XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func);
-XMLPUBFUN xmlOutputBufferCreateFilenameFunc
-XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func);
-
-/*
- * Externally global symbols which need to be protected for backwards
- * compatibility support.
- */
-
-#undef	docbDefaultSAXHandler
-#undef	htmlDefaultSAXHandler
-#undef	oldXMLWDcompatibility
-#undef	xmlBufferAllocScheme
-#undef	xmlDefaultBufferSize
-#undef	xmlDefaultSAXHandler
-#undef	xmlDefaultSAXLocator
-#undef	xmlDoValidityCheckingDefaultValue
-#undef	xmlFree
-#undef	xmlGenericError
-#undef	xmlStructuredError
-#undef	xmlGenericErrorContext
-#undef	xmlGetWarningsDefaultValue
-#undef	xmlIndentTreeOutput
-#undef  xmlTreeIndentString
-#undef	xmlKeepBlanksDefaultValue
-#undef	xmlLineNumbersDefaultValue
-#undef	xmlLoadExtDtdDefaultValue
-#undef	xmlMalloc
-#undef	xmlMallocAtomic
-#undef	xmlMemStrdup
-#undef	xmlParserDebugEntities
-#undef	xmlParserVersion
-#undef	xmlPedanticParserDefaultValue
-#undef	xmlRealloc
-#undef	xmlSaveNoEmptyTags
-#undef	xmlSubstituteEntitiesDefaultValue
-#undef  xmlRegisterNodeDefaultValue
-#undef  xmlDeregisterNodeDefaultValue
-#undef  xmlLastError
-#undef  xmlParserInputBufferCreateFilenameValue
-#undef  xmlOutputBufferCreateFilenameValue
-
-/**
- * xmlRegisterNodeFunc:
- * @node: the current node
- *
- * Signature for the registration callback of a created node
- */
-typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
-/**
- * xmlDeregisterNodeFunc:
- * @node: the current node
- *
- * Signature for the deregistration callback of a discarded node
- */
-typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
-
-typedef struct _xmlGlobalState xmlGlobalState;
-typedef xmlGlobalState *xmlGlobalStatePtr;
-struct _xmlGlobalState
-{
-	const char *xmlParserVersion;
-
-	xmlSAXLocator xmlDefaultSAXLocator;
-	xmlSAXHandlerV1 xmlDefaultSAXHandler;
-	xmlSAXHandlerV1 docbDefaultSAXHandler;
-	xmlSAXHandlerV1 htmlDefaultSAXHandler;
-
-	xmlFreeFunc xmlFree;
-	xmlMallocFunc xmlMalloc;
-	xmlStrdupFunc xmlMemStrdup;
-	xmlReallocFunc xmlRealloc;
-
-	xmlGenericErrorFunc xmlGenericError;
-	xmlStructuredErrorFunc xmlStructuredError;
-	void *xmlGenericErrorContext;
-
-	int oldXMLWDcompatibility;
-
-	xmlBufferAllocationScheme xmlBufferAllocScheme;
-	int xmlDefaultBufferSize;
-
-	int xmlSubstituteEntitiesDefaultValue;
-	int xmlDoValidityCheckingDefaultValue;
-	int xmlGetWarningsDefaultValue;
-	int xmlKeepBlanksDefaultValue;
-	int xmlLineNumbersDefaultValue;
-	int xmlLoadExtDtdDefaultValue;
-	int xmlParserDebugEntities;
-	int xmlPedanticParserDefaultValue;
-
-	int xmlSaveNoEmptyTags;
-	int xmlIndentTreeOutput;
-	const char *xmlTreeIndentString;
-
-	xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
-	xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
-
-	xmlMallocFunc xmlMallocAtomic;
-	xmlError xmlLastError;
-
-	xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
-	xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
-};
-
-#ifdef __cplusplus
-}
-#endif
-#include <libxml/threads.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-XMLPUBFUN void XMLCALL	xmlInitializeGlobalState(xmlGlobalStatePtr gs);
-
-XMLPUBFUN void XMLCALL xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);
-
-XMLPUBFUN void XMLCALL xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler);
-
-XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func);
-XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
-XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);
-XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
-
-XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
-	xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func);
-XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
-	xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func);
-
-/** DOC_DISABLE */
-/*
- * In general the memory allocation entry points are not kept
- * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
- *    - xmlMalloc
- *    - xmlMallocAtomic
- *    - xmlRealloc
- *    - xmlMemStrdup
- *    - xmlFree
- */
-
-#ifdef LIBXML_THREAD_ALLOC_ENABLED
-#ifdef LIBXML_THREAD_ENABLED
-XMLPUBFUN  xmlMallocFunc * XMLCALL __xmlMalloc(void);
-#define xmlMalloc \
-(*(__xmlMalloc()))
-#else
-XMLPUBVAR xmlMallocFunc xmlMalloc;
-#endif
-
-#ifdef LIBXML_THREAD_ENABLED
-XMLPUBFUN  xmlMallocFunc * XMLCALL __xmlMallocAtomic(void);
-#define xmlMallocAtomic \
-(*(__xmlMallocAtomic()))
-#else
-XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
-#endif
-
-#ifdef LIBXML_THREAD_ENABLED
-XMLPUBFUN  xmlReallocFunc * XMLCALL __xmlRealloc(void);
-#define xmlRealloc \
-(*(__xmlRealloc()))
-#else
-XMLPUBVAR xmlReallocFunc xmlRealloc;
-#endif
-
-#ifdef LIBXML_THREAD_ENABLED
-XMLPUBFUN  xmlFreeFunc * XMLCALL __xmlFree(void);
-#define xmlFree \
-(*(__xmlFree()))
-#else
-XMLPUBVAR xmlFreeFunc xmlFree;
-#endif
-
-#ifdef LIBXML_THREAD_ENABLED
-XMLPUBFUN  xmlStrdupFunc * XMLCALL __xmlMemStrdup(void);
-#define xmlMemStrdup \
-(*(__xmlMemStrdup()))
-#else
-XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
-#endif
-
-#else /* !LIBXML_THREAD_ALLOC_ENABLED */
-XMLPUBVAR xmlMallocFunc xmlMalloc;
-XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
-XMLPUBVAR xmlReallocFunc xmlRealloc;
-XMLPUBVAR xmlFreeFunc xmlFree;
-XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
-#endif /* LIBXML_THREAD_ALLOC_ENABLED */
-
-#ifdef LIBXML_DOCB_ENABLED
-XMLPUBFUN  xmlSAXHandlerV1 * XMLCALL __docbDefaultSAXHandler(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define docbDefaultSAXHandler \
-(*(__docbDefaultSAXHandler()))
-#else
-XMLPUBVAR xmlSAXHandlerV1 docbDefaultSAXHandler;
-#endif
-#endif
-
-#ifdef LIBXML_HTML_ENABLED
-XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define htmlDefaultSAXHandler \
-(*(__htmlDefaultSAXHandler()))
-#else
-XMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler;
-#endif
-#endif
-
-XMLPUBFUN xmlError * XMLCALL __xmlLastError(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlLastError \
-(*(__xmlLastError()))
-#else
-XMLPUBVAR xmlError xmlLastError;
-#endif
-
-/*
- * Everything starting from the line below is
- * Automatically generated by build_glob.py.
- * Do not modify the previous line.
- */
-
-
-XMLPUBFUN int * XMLCALL __oldXMLWDcompatibility(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define oldXMLWDcompatibility \
-(*(__oldXMLWDcompatibility()))
-#else
-XMLPUBVAR int oldXMLWDcompatibility;
-#endif
-
-XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlBufferAllocScheme \
-(*(__xmlBufferAllocScheme()))
-#else
-XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme;
-#endif
-XMLPUBFUN xmlBufferAllocationScheme XMLCALL xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);
-
-XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlDefaultBufferSize \
-(*(__xmlDefaultBufferSize()))
-#else
-XMLPUBVAR int xmlDefaultBufferSize;
-#endif
-XMLPUBFUN int XMLCALL xmlThrDefDefaultBufferSize(int v);
-
-XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __xmlDefaultSAXHandler(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlDefaultSAXHandler \
-(*(__xmlDefaultSAXHandler()))
-#else
-XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler;
-#endif
-
-XMLPUBFUN xmlSAXLocator * XMLCALL __xmlDefaultSAXLocator(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlDefaultSAXLocator \
-(*(__xmlDefaultSAXLocator()))
-#else
-XMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator;
-#endif
-
-XMLPUBFUN int * XMLCALL __xmlDoValidityCheckingDefaultValue(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlDoValidityCheckingDefaultValue \
-(*(__xmlDoValidityCheckingDefaultValue()))
-#else
-XMLPUBVAR int xmlDoValidityCheckingDefaultValue;
-#endif
-XMLPUBFUN int XMLCALL xmlThrDefDoValidityCheckingDefaultValue(int v);
-
-XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlGenericError \
-(*(__xmlGenericError()))
-#else
-XMLPUBVAR xmlGenericErrorFunc xmlGenericError;
-#endif
-
-XMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlStructuredError \
-(*(__xmlStructuredError()))
-#else
-XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError;
-#endif
-
-XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlGenericErrorContext \
-(*(__xmlGenericErrorContext()))
-#else
-XMLPUBVAR void * xmlGenericErrorContext;
-#endif
-
-XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlGetWarningsDefaultValue \
-(*(__xmlGetWarningsDefaultValue()))
-#else
-XMLPUBVAR int xmlGetWarningsDefaultValue;
-#endif
-XMLPUBFUN int XMLCALL xmlThrDefGetWarningsDefaultValue(int v);
-
-XMLPUBFUN int * XMLCALL __xmlIndentTreeOutput(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlIndentTreeOutput \
-(*(__xmlIndentTreeOutput()))
-#else
-XMLPUBVAR int xmlIndentTreeOutput;
-#endif
-XMLPUBFUN int XMLCALL xmlThrDefIndentTreeOutput(int v);
-
-XMLPUBFUN const char * * XMLCALL __xmlTreeIndentString(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlTreeIndentString \
-(*(__xmlTreeIndentString()))
-#else
-XMLPUBVAR const char * xmlTreeIndentString;
-#endif
-XMLPUBFUN const char * XMLCALL xmlThrDefTreeIndentString(const char * v);
-
-XMLPUBFUN int * XMLCALL __xmlKeepBlanksDefaultValue(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlKeepBlanksDefaultValue \
-(*(__xmlKeepBlanksDefaultValue()))
-#else
-XMLPUBVAR int xmlKeepBlanksDefaultValue;
-#endif
-XMLPUBFUN int XMLCALL xmlThrDefKeepBlanksDefaultValue(int v);
-
-XMLPUBFUN int * XMLCALL __xmlLineNumbersDefaultValue(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlLineNumbersDefaultValue \
-(*(__xmlLineNumbersDefaultValue()))
-#else
-XMLPUBVAR int xmlLineNumbersDefaultValue;
-#endif
-XMLPUBFUN int XMLCALL xmlThrDefLineNumbersDefaultValue(int v);
-
-XMLPUBFUN int * XMLCALL __xmlLoadExtDtdDefaultValue(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlLoadExtDtdDefaultValue \
-(*(__xmlLoadExtDtdDefaultValue()))
-#else
-XMLPUBVAR int xmlLoadExtDtdDefaultValue;
-#endif
-XMLPUBFUN int XMLCALL xmlThrDefLoadExtDtdDefaultValue(int v);
-
-XMLPUBFUN int * XMLCALL __xmlParserDebugEntities(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlParserDebugEntities \
-(*(__xmlParserDebugEntities()))
-#else
-XMLPUBVAR int xmlParserDebugEntities;
-#endif
-XMLPUBFUN int XMLCALL xmlThrDefParserDebugEntities(int v);
-
-XMLPUBFUN const char * * XMLCALL __xmlParserVersion(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlParserVersion \
-(*(__xmlParserVersion()))
-#else
-XMLPUBVAR const char * xmlParserVersion;
-#endif
-
-XMLPUBFUN int * XMLCALL __xmlPedanticParserDefaultValue(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlPedanticParserDefaultValue \
-(*(__xmlPedanticParserDefaultValue()))
-#else
-XMLPUBVAR int xmlPedanticParserDefaultValue;
-#endif
-XMLPUBFUN int XMLCALL xmlThrDefPedanticParserDefaultValue(int v);
-
-XMLPUBFUN int * XMLCALL __xmlSaveNoEmptyTags(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlSaveNoEmptyTags \
-(*(__xmlSaveNoEmptyTags()))
-#else
-XMLPUBVAR int xmlSaveNoEmptyTags;
-#endif
-XMLPUBFUN int XMLCALL xmlThrDefSaveNoEmptyTags(int v);
-
-XMLPUBFUN int * XMLCALL __xmlSubstituteEntitiesDefaultValue(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlSubstituteEntitiesDefaultValue \
-(*(__xmlSubstituteEntitiesDefaultValue()))
-#else
-XMLPUBVAR int xmlSubstituteEntitiesDefaultValue;
-#endif
-XMLPUBFUN int XMLCALL xmlThrDefSubstituteEntitiesDefaultValue(int v);
-
-XMLPUBFUN xmlRegisterNodeFunc * XMLCALL __xmlRegisterNodeDefaultValue(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlRegisterNodeDefaultValue \
-(*(__xmlRegisterNodeDefaultValue()))
-#else
-XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
-#endif
-
-XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlDeregisterNodeDefaultValue \
-(*(__xmlDeregisterNodeDefaultValue()))
-#else
-XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
-#endif
-
-XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL __xmlParserInputBufferCreateFilenameValue(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlParserInputBufferCreateFilenameValue \
-(*(__xmlParserInputBufferCreateFilenameValue()))
-#else
-XMLPUBVAR xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
-#endif
-
-XMLPUBFUN xmlOutputBufferCreateFilenameFunc * XMLCALL __xmlOutputBufferCreateFilenameValue(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define xmlOutputBufferCreateFilenameValue \
-(*(__xmlOutputBufferCreateFilenameValue()))
-#else
-XMLPUBVAR xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __XML_GLOBALS_H */
diff --git a/interfaces/ext/libxml/hash.h b/interfaces/ext/libxml/hash.h
deleted file mode 100644
index 7fe4be7..0000000
--- a/interfaces/ext/libxml/hash.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Summary: Chained hash tables
- * Description: This module implements the hash table support used in 
- * 		various places in the library.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Bjorn Reese <bjorn.reese at systematic.dk>
- */
-
-#ifndef __XML_HASH_H__
-#define __XML_HASH_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The hash table.
- */
-typedef struct _xmlHashTable xmlHashTable;
-typedef xmlHashTable *xmlHashTablePtr;
-
-#ifdef __cplusplus
-}
-#endif
-
-#include <libxml/xmlversion.h>
-#include <libxml/parser.h>
-#include <libxml/dict.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Recent version of gcc produce a warning when a function pointer is assigned
- * to an object pointer, or vice versa.  The following macro is a dirty hack
- * to allow suppression of the warning.  If your architecture has function
- * pointers which are a different size than a void pointer, there may be some
- * serious trouble within the library.
- */
-/**
- * XML_CAST_FPTR:
- * @fptr:  pointer to a function
- *
- * Macro to do a casting from an object pointer to a
- * function pointer without encountering a warning from
- * gcc
- *
- * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr))
- * This macro violated ISO C aliasing rules (gcc4 on s390 broke)
- * so it is disabled now
- */
-
-#define XML_CAST_FPTR(fptr) fptr
-
-
-/*
- * function types:
- */
-/**
- * xmlHashDeallocator:
- * @payload:  the data in the hash
- * @name:  the name associated
- *
- * Callback to free data from a hash.
- */
-typedef void (*xmlHashDeallocator)(void *payload, xmlChar *name);
-/**
- * xmlHashCopier:
- * @payload:  the data in the hash
- * @name:  the name associated
- *
- * Callback to copy data from a hash.
- *
- * Returns a copy of the data or NULL in case of error.
- */
-typedef void *(*xmlHashCopier)(void *payload, xmlChar *name);
-/**
- * xmlHashScanner:
- * @payload:  the data in the hash
- * @data:  extra scannner data
- * @name:  the name associated
- *
- * Callback when scanning data in a hash with the simple scanner.
- */
-typedef void (*xmlHashScanner)(void *payload, void *data, xmlChar *name);
-/**
- * xmlHashScannerFull:
- * @payload:  the data in the hash
- * @data:  extra scannner data
- * @name:  the name associated
- * @name2:  the second name associated
- * @name3:  the third name associated
- *
- * Callback when scanning data in a hash with the full scanner.
- */
-typedef void (*xmlHashScannerFull)(void *payload, void *data,
-				   const xmlChar *name, const xmlChar *name2,
-				   const xmlChar *name3);
-
-/*
- * Constructor and destructor.
- */
-XMLPUBFUN xmlHashTablePtr XMLCALL
-			xmlHashCreate	(int size);
-XMLPUBFUN xmlHashTablePtr XMLCALL
-			xmlHashCreateDict(int size,
-					 xmlDictPtr dict);
-XMLPUBFUN void XMLCALL			
-			xmlHashFree	(xmlHashTablePtr table,
-					 xmlHashDeallocator f);
-
-/*
- * Add a new entry to the hash table.
- */
-XMLPUBFUN int XMLCALL			
-			xmlHashAddEntry	(xmlHashTablePtr table,
-		                         const xmlChar *name,
-		                         void *userdata);
-XMLPUBFUN int XMLCALL			
-			xmlHashUpdateEntry(xmlHashTablePtr table,
-		                         const xmlChar *name,
-		                         void *userdata,
-					 xmlHashDeallocator f);
-XMLPUBFUN int XMLCALL		    
-			xmlHashAddEntry2(xmlHashTablePtr table,
-		                         const xmlChar *name,
-		                         const xmlChar *name2,
-		                         void *userdata);
-XMLPUBFUN int XMLCALL			
-			xmlHashUpdateEntry2(xmlHashTablePtr table,
-		                         const xmlChar *name,
-		                         const xmlChar *name2,
-		                         void *userdata,
-					 xmlHashDeallocator f);
-XMLPUBFUN int XMLCALL			
-			xmlHashAddEntry3(xmlHashTablePtr table,
-		                         const xmlChar *name,
-		                         const xmlChar *name2,
-		                         const xmlChar *name3,
-		                         void *userdata);
-XMLPUBFUN int XMLCALL			
-			xmlHashUpdateEntry3(xmlHashTablePtr table,
-		                         const xmlChar *name,
-		                         const xmlChar *name2,
-		                         const xmlChar *name3,
-		                         void *userdata,
-					 xmlHashDeallocator f);
-
-/*
- * Remove an entry from the hash table.
- */
-XMLPUBFUN int XMLCALL     
-			xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name,
-                           xmlHashDeallocator f);
-XMLPUBFUN int XMLCALL     
-			xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name,
-                            const xmlChar *name2, xmlHashDeallocator f);
-XMLPUBFUN int  XMLCALL    
-			xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
-                            const xmlChar *name2, const xmlChar *name3,
-                            xmlHashDeallocator f);
-
-/*
- * Retrieve the userdata.
- */
-XMLPUBFUN void * XMLCALL			
-			xmlHashLookup	(xmlHashTablePtr table,
-					 const xmlChar *name);
-XMLPUBFUN void * XMLCALL			
-			xmlHashLookup2	(xmlHashTablePtr table,
-					 const xmlChar *name,
-					 const xmlChar *name2);
-XMLPUBFUN void * XMLCALL			
-			xmlHashLookup3	(xmlHashTablePtr table,
-					 const xmlChar *name,
-					 const xmlChar *name2,
-					 const xmlChar *name3);
-XMLPUBFUN void * XMLCALL			
-			xmlHashQLookup	(xmlHashTablePtr table,
-					 const xmlChar *name,
-					 const xmlChar *prefix);
-XMLPUBFUN void * XMLCALL			
-			xmlHashQLookup2	(xmlHashTablePtr table,
-					 const xmlChar *name,
-					 const xmlChar *prefix,
-					 const xmlChar *name2,
-					 const xmlChar *prefix2);
-XMLPUBFUN void * XMLCALL			
-			xmlHashQLookup3	(xmlHashTablePtr table,
-					 const xmlChar *name,
-					 const xmlChar *prefix,
-					 const xmlChar *name2,
-					 const xmlChar *prefix2,
-					 const xmlChar *name3,
-					 const xmlChar *prefix3);
-
-/*
- * Helpers.
- */
-XMLPUBFUN xmlHashTablePtr XMLCALL		
-			xmlHashCopy	(xmlHashTablePtr table,
-					 xmlHashCopier f);
-XMLPUBFUN int XMLCALL			
-			xmlHashSize	(xmlHashTablePtr table);
-XMLPUBFUN void XMLCALL			
-			xmlHashScan	(xmlHashTablePtr table,
-					 xmlHashScanner f,
-					 void *data);
-XMLPUBFUN void XMLCALL			
-			xmlHashScan3	(xmlHashTablePtr table,
-					 const xmlChar *name,
-					 const xmlChar *name2,
-					 const xmlChar *name3,
-					 xmlHashScanner f,
-					 void *data);
-XMLPUBFUN void XMLCALL			
-			xmlHashScanFull	(xmlHashTablePtr table,
-					 xmlHashScannerFull f,
-					 void *data);
-XMLPUBFUN void XMLCALL			
-			xmlHashScanFull3(xmlHashTablePtr table,
-					 const xmlChar *name,
-					 const xmlChar *name2,
-					 const xmlChar *name3,
-					 xmlHashScannerFull f,
-					 void *data);
-#ifdef __cplusplus
-}
-#endif
-#endif /* ! __XML_HASH_H__ */
diff --git a/interfaces/ext/libxml/list.h b/interfaces/ext/libxml/list.h
deleted file mode 100644
index 1d83482..0000000
--- a/interfaces/ext/libxml/list.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Summary: lists interfaces
- * Description: this module implement the list support used in 
- * various place in the library.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Gary Pennington <Gary.Pennington at uk.sun.com>
- */
-
-#ifndef __XML_LINK_INCLUDE__
-#define __XML_LINK_INCLUDE__
-
-#include <libxml/xmlversion.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct _xmlLink xmlLink;
-typedef xmlLink *xmlLinkPtr;
-
-typedef struct _xmlList xmlList;
-typedef xmlList *xmlListPtr;
-
-/**
- * xmlListDeallocator:
- * @lk:  the data to deallocate
- *
- * Callback function used to free data from a list.
- */
-typedef void (*xmlListDeallocator) (xmlLinkPtr lk);
-/**
- * xmlListDataCompare:
- * @data0: the first data
- * @data1: the second data
- *
- * Callback function used to compare 2 data.
- *
- * Returns 0 is equality, -1 or 1 otherwise depending on the ordering.
- */
-typedef int  (*xmlListDataCompare) (const void *data0, const void *data1);
-/**
- * xmlListWalker:
- * @data: the data found in the list
- * @user: extra user provided data to the walker
- *
- * Callback function used when walking a list with xmlListWalk().
- *
- * Returns 0 to stop walking the list, 1 otherwise.
- */
-typedef int (*xmlListWalker) (const void *data, const void *user);
-
-/* Creation/Deletion */
-XMLPUBFUN xmlListPtr XMLCALL
-		xmlListCreate		(xmlListDeallocator deallocator,
-	                                 xmlListDataCompare compare);
-XMLPUBFUN void XMLCALL		
-		xmlListDelete		(xmlListPtr l);
-
-/* Basic Operators */
-XMLPUBFUN void * XMLCALL		
-		xmlListSearch		(xmlListPtr l,
-					 void *data);
-XMLPUBFUN void * XMLCALL		
-		xmlListReverseSearch	(xmlListPtr l,
-					 void *data);
-XMLPUBFUN int XMLCALL		
-		xmlListInsert		(xmlListPtr l,
-					 void *data) ;
-XMLPUBFUN int XMLCALL		
-		xmlListAppend		(xmlListPtr l,
-					 void *data) ;
-XMLPUBFUN int XMLCALL		
-		xmlListRemoveFirst	(xmlListPtr l,
-					 void *data);
-XMLPUBFUN int XMLCALL		
-		xmlListRemoveLast	(xmlListPtr l,
-					 void *data);
-XMLPUBFUN int XMLCALL		
-		xmlListRemoveAll	(xmlListPtr l,
-					 void *data);
-XMLPUBFUN void XMLCALL		
-		xmlListClear		(xmlListPtr l);
-XMLPUBFUN int XMLCALL		
-		xmlListEmpty		(xmlListPtr l);
-XMLPUBFUN xmlLinkPtr XMLCALL	
-		xmlListFront		(xmlListPtr l);
-XMLPUBFUN xmlLinkPtr XMLCALL	
-		xmlListEnd		(xmlListPtr l);
-XMLPUBFUN int XMLCALL		
-		xmlListSize		(xmlListPtr l);
-
-XMLPUBFUN void XMLCALL		
-		xmlListPopFront		(xmlListPtr l);
-XMLPUBFUN void XMLCALL		
-		xmlListPopBack		(xmlListPtr l);
-XMLPUBFUN int XMLCALL		
-		xmlListPushFront	(xmlListPtr l,
-					 void *data);
-XMLPUBFUN int XMLCALL		
-		xmlListPushBack		(xmlListPtr l,
-					 void *data);
-
-/* Advanced Operators */
-XMLPUBFUN void XMLCALL		
-		xmlListReverse		(xmlListPtr l);
-XMLPUBFUN void XMLCALL		
-		xmlListSort		(xmlListPtr l);
-XMLPUBFUN void XMLCALL		
-		xmlListWalk		(xmlListPtr l,
-					 xmlListWalker walker,
-					 const void *user);
-XMLPUBFUN void XMLCALL		
-		xmlListReverseWalk	(xmlListPtr l,
-					 xmlListWalker walker,
-					 const void *user);
-XMLPUBFUN void XMLCALL		
-		xmlListMerge		(xmlListPtr l1,
-					 xmlListPtr l2);
-XMLPUBFUN xmlListPtr XMLCALL	
-		xmlListDup		(const xmlListPtr old);
-XMLPUBFUN int XMLCALL		
-		xmlListCopy		(xmlListPtr cur,
-					 const xmlListPtr old);
-/* Link operators */
-XMLPUBFUN void * XMLCALL          
-		xmlLinkGetData          (xmlLinkPtr lk);
-
-/* xmlListUnique() */
-/* xmlListSwap */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __XML_LINK_INCLUDE__ */
diff --git a/interfaces/ext/libxml/nanoftp.h b/interfaces/ext/libxml/nanoftp.h
deleted file mode 100644
index e3c28a0..0000000
--- a/interfaces/ext/libxml/nanoftp.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Summary: minimal FTP implementation
- * Description: minimal FTP implementation allowing to fetch resources
- *              like external subset.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
- 
-#ifndef __NANO_FTP_H__
-#define __NANO_FTP_H__
-
-#include <libxml/xmlversion.h>
-
-#ifdef LIBXML_FTP_ENABLED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * ftpListCallback: 
- * @userData:  user provided data for the callback
- * @filename:  the file name (including "->" when links are shown)
- * @attrib:  the attribute string
- * @owner:  the owner string
- * @group:  the group string
- * @size:  the file size
- * @links:  the link count
- * @year:  the year
- * @month:  the month
- * @day:  the day
- * @hour:  the hour
- * @minute:  the minute
- *
- * A callback for the xmlNanoFTPList command.
- * Note that only one of year and day:minute are specified.
- */
-typedef void (*ftpListCallback) (void *userData,
-	                         const char *filename, const char *attrib,
-	                         const char *owner, const char *group,
-				 unsigned long size, int links, int year,
-				 const char *month, int day, int hour,
-				 int minute);
-/**
- * ftpDataCallback: 
- * @userData: the user provided context
- * @data: the data received
- * @len: its size in bytes
- *
- * A callback for the xmlNanoFTPGet command.
- */
-typedef void (*ftpDataCallback) (void *userData,
-				 const char *data,
-				 int len);
-
-/*
- * Init
- */
-XMLPUBFUN void XMLCALL
-	xmlNanoFTPInit		(void);
-XMLPUBFUN void XMLCALL	
-	xmlNanoFTPCleanup	(void);
-
-/*
- * Creating/freeing contexts.
- */
-XMLPUBFUN void * XMLCALL	
-	xmlNanoFTPNewCtxt	(const char *URL);
-XMLPUBFUN void XMLCALL	
-	xmlNanoFTPFreeCtxt	(void * ctx);
-XMLPUBFUN void * XMLCALL 	
-	xmlNanoFTPConnectTo	(const char *server,
-				 int port);
-/*
- * Opening/closing session connections.
- */
-XMLPUBFUN void * XMLCALL 	
-	xmlNanoFTPOpen		(const char *URL);
-XMLPUBFUN int XMLCALL	
-	xmlNanoFTPConnect	(void *ctx);
-XMLPUBFUN int XMLCALL	
-	xmlNanoFTPClose		(void *ctx);
-XMLPUBFUN int XMLCALL	
-	xmlNanoFTPQuit		(void *ctx);
-XMLPUBFUN void XMLCALL	
-	xmlNanoFTPScanProxy	(const char *URL);
-XMLPUBFUN void XMLCALL	
-	xmlNanoFTPProxy		(const char *host,
-				 int port,
-				 const char *user,
-				 const char *passwd,
-				 int type);
-XMLPUBFUN int XMLCALL	
-	xmlNanoFTPUpdateURL	(void *ctx,
-				 const char *URL);
-
-/*
- * Rather internal commands.
- */
-XMLPUBFUN int XMLCALL	
-	xmlNanoFTPGetResponse	(void *ctx);
-XMLPUBFUN int XMLCALL	
-	xmlNanoFTPCheckResponse	(void *ctx);
-
-/*
- * CD/DIR/GET handlers.
- */
-XMLPUBFUN int XMLCALL	
-	xmlNanoFTPCwd		(void *ctx,
-				 const char *directory);
-XMLPUBFUN int XMLCALL	
-	xmlNanoFTPDele		(void *ctx,
-				 const char *file);
-
-XMLPUBFUN int XMLCALL	
-	xmlNanoFTPGetConnection	(void *ctx);
-XMLPUBFUN int XMLCALL	
-	xmlNanoFTPCloseConnection(void *ctx);
-XMLPUBFUN int XMLCALL	
-	xmlNanoFTPList		(void *ctx,
-				 ftpListCallback callback,
-				 void *userData,
-				 const char *filename);
-XMLPUBFUN int XMLCALL	
-	xmlNanoFTPGetSocket	(void *ctx,
-				 const char *filename);
-XMLPUBFUN int XMLCALL	
-	xmlNanoFTPGet		(void *ctx,
-				 ftpDataCallback callback,
-				 void *userData,
-				 const char *filename);
-XMLPUBFUN int XMLCALL	
-	xmlNanoFTPRead		(void *ctx,
-				 void *dest,
-				 int len);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* LIBXML_FTP_ENABLED */
-#endif /* __NANO_FTP_H__ */
diff --git a/interfaces/ext/libxml/nanohttp.h b/interfaces/ext/libxml/nanohttp.h
deleted file mode 100644
index 1d8ac24..0000000
--- a/interfaces/ext/libxml/nanohttp.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Summary: minimal HTTP implementation
- * Description: minimal HTTP implementation allowing to fetch resources
- *              like external subset.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
- 
-#ifndef __NANO_HTTP_H__
-#define __NANO_HTTP_H__
-
-#include <libxml/xmlversion.h>
-
-#ifdef LIBXML_HTTP_ENABLED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-XMLPUBFUN void XMLCALL
-	xmlNanoHTTPInit		(void);
-XMLPUBFUN void XMLCALL	
-	xmlNanoHTTPCleanup	(void);
-XMLPUBFUN void XMLCALL	
-	xmlNanoHTTPScanProxy	(const char *URL);
-XMLPUBFUN int XMLCALL	
-	xmlNanoHTTPFetch	(const char *URL,
-				 const char *filename,
-				 char **contentType);
-XMLPUBFUN void * XMLCALL	
-	xmlNanoHTTPMethod	(const char *URL,
-				 const char *method,
-				 const char *input,
-				 char **contentType,
-				 const char *headers,
-				 int   ilen);
-XMLPUBFUN void * XMLCALL	
-	xmlNanoHTTPMethodRedir	(const char *URL,
-				 const char *method,
-				 const char *input,
-				 char **contentType,
-				 char **redir,
-				 const char *headers,
-				 int   ilen);
-XMLPUBFUN void * XMLCALL	
-	xmlNanoHTTPOpen		(const char *URL,
-				 char **contentType);
-XMLPUBFUN void * XMLCALL	
-	xmlNanoHTTPOpenRedir	(const char *URL,
-				 char **contentType,
-				 char **redir);
-XMLPUBFUN int XMLCALL	
-	xmlNanoHTTPReturnCode	(void *ctx);
-XMLPUBFUN const char * XMLCALL 
-	xmlNanoHTTPAuthHeader	(void *ctx);
-XMLPUBFUN const char * XMLCALL
-	xmlNanoHTTPRedir	(void *ctx);
-XMLPUBFUN int XMLCALL
-	xmlNanoHTTPContentLength( void * ctx );
-XMLPUBFUN const char * XMLCALL
-	xmlNanoHTTPEncoding	(void *ctx);
-XMLPUBFUN const char * XMLCALL
-	xmlNanoHTTPMimeType	(void *ctx);
-XMLPUBFUN int XMLCALL	
-	xmlNanoHTTPRead		(void *ctx,
-				 void *dest,
-				 int len);
-#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN int XMLCALL	
-	xmlNanoHTTPSave		(void *ctxt,
-				 const char *filename);
-#endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN void XMLCALL	
-	xmlNanoHTTPClose	(void *ctx);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_HTTP_ENABLED */
-#endif /* __NANO_HTTP_H__ */
diff --git a/interfaces/ext/libxml/parser.h b/interfaces/ext/libxml/parser.h
deleted file mode 100644
index 567addb..0000000
--- a/interfaces/ext/libxml/parser.h
+++ /dev/null
@@ -1,1226 +0,0 @@
-/*
- * Summary: the core parser module
- * Description: Interfaces, constants and types related to the XML parser
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_PARSER_H__
-#define __XML_PARSER_H__
-
-#include <stdarg.h>
-
-#include <libxml/xmlversion.h>
-#include <libxml/tree.h>
-#include <libxml/dict.h>
-#include <libxml/hash.h>
-#include <libxml/valid.h>
-#include <libxml/entities.h>
-#include <libxml/xmlerror.h>
-#include <libxml/xmlstring.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * XML_DEFAULT_VERSION:
- *
- * The default version of XML used: 1.0
- */
-#define XML_DEFAULT_VERSION	"1.0"
-
-/**
- * xmlParserInput:
- *
- * An xmlParserInput is an input flow for the XML processor.
- * Each entity parsed is associated an xmlParserInput (except the
- * few predefined ones). This is the case both for internal entities
- * - in which case the flow is already completely in memory - or
- * external entities - in which case we use the buf structure for
- * progressive reading and I18N conversions to the internal UTF-8 format.
- */
-
-/**
- * xmlParserInputDeallocate:
- * @str:  the string to deallocate
- *
- * Callback for freeing some parser input allocations.
- */
-typedef void (* xmlParserInputDeallocate)(xmlChar *str);
-
-struct _xmlParserInput {
-    /* Input buffer */
-    xmlParserInputBufferPtr buf;      /* UTF-8 encoded buffer */
-
-    const char *filename;             /* The file analyzed, if any */
-    const char *directory;            /* the directory/base of the file */
-    const xmlChar *base;              /* Base of the array to parse */
-    const xmlChar *cur;               /* Current char being parsed */
-    const xmlChar *end;               /* end of the array to parse */
-    int length;                       /* length if known */
-    int line;                         /* Current line */
-    int col;                          /* Current column */
-    /*
-     * NOTE: consumed is only tested for equality in the parser code,
-     *       so even if there is an overflow this should not give troubles
-     *       for parsing very large instances.
-     */
-    unsigned long consumed;           /* How many xmlChars already consumed */
-    xmlParserInputDeallocate free;    /* function to deallocate the base */
-    const xmlChar *encoding;          /* the encoding string for entity */
-    const xmlChar *version;           /* the version string for entity */
-    int standalone;                   /* Was that entity marked standalone */
-    int id;                           /* an unique identifier for the entity */
-};
-
-/**
- * xmlParserNodeInfo:
- *
- * The parser can be asked to collect Node informations, i.e. at what
- * place in the file they were detected. 
- * NOTE: This is off by default and not very well tested.
- */
-typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
-typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
-
-struct _xmlParserNodeInfo {
-  const struct _xmlNode* node;
-  /* Position & line # that text that created the node begins & ends on */
-  unsigned long begin_pos;
-  unsigned long begin_line;
-  unsigned long end_pos;
-  unsigned long end_line;
-};
-
-typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
-typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
-struct _xmlParserNodeInfoSeq {
-  unsigned long maximum;
-  unsigned long length;
-  xmlParserNodeInfo* buffer;
-};
-
-/**
- * xmlParserInputState:
- *
- * The parser is now working also as a state based parser.
- * The recursive one use the state info for entities processing.
- */
-typedef enum {
-    XML_PARSER_EOF = -1,	/* nothing is to be parsed */
-    XML_PARSER_START = 0,	/* nothing has been parsed */
-    XML_PARSER_MISC,		/* Misc* before int subset */
-    XML_PARSER_PI,		/* Within a processing instruction */
-    XML_PARSER_DTD,		/* within some DTD content */
-    XML_PARSER_PROLOG,		/* Misc* after internal subset */
-    XML_PARSER_COMMENT,		/* within a comment */
-    XML_PARSER_START_TAG,	/* within a start tag */
-    XML_PARSER_CONTENT,		/* within the content */
-    XML_PARSER_CDATA_SECTION,	/* within a CDATA section */
-    XML_PARSER_END_TAG,		/* within a closing tag */
-    XML_PARSER_ENTITY_DECL,	/* within an entity declaration */
-    XML_PARSER_ENTITY_VALUE,	/* within an entity value in a decl */
-    XML_PARSER_ATTRIBUTE_VALUE,	/* within an attribute value */
-    XML_PARSER_SYSTEM_LITERAL,	/* within a SYSTEM value */
-    XML_PARSER_EPILOG, 		/* the Misc* after the last end tag */
-    XML_PARSER_IGNORE,		/* within an IGNORED section */
-    XML_PARSER_PUBLIC_LITERAL 	/* within a PUBLIC value */
-} xmlParserInputState;
-
-/**
- * XML_DETECT_IDS:
- *
- * Bit in the loadsubset context field to tell to do ID/REFs lookups.
- * Use it to initialize xmlLoadExtDtdDefaultValue.
- */
-#define XML_DETECT_IDS		2
-
-/**
- * XML_COMPLETE_ATTRS:
- *
- * Bit in the loadsubset context field to tell to do complete the
- * elements attributes lists with the ones defaulted from the DTDs.
- * Use it to initialize xmlLoadExtDtdDefaultValue.
- */
-#define XML_COMPLETE_ATTRS	4
-
-/**
- * XML_SKIP_IDS:
- *
- * Bit in the loadsubset context field to tell to not do ID/REFs registration.
- * Used to initialize xmlLoadExtDtdDefaultValue in some special cases.
- */
-#define XML_SKIP_IDS		8
-
-/**
- * xmlParserMode:
- *
- * A parser can operate in various modes
- */
-typedef enum {
-    XML_PARSE_UNKNOWN = 0,
-    XML_PARSE_DOM = 1,
-    XML_PARSE_SAX = 2,
-    XML_PARSE_PUSH_DOM = 3,
-    XML_PARSE_PUSH_SAX = 4,
-    XML_PARSE_READER = 5
-} xmlParserMode;
-
-/**
- * xmlParserCtxt:
- *
- * The parser context.
- * NOTE This doesn't completely define the parser state, the (current ?)
- *      design of the parser uses recursive function calls since this allow
- *      and easy mapping from the production rules of the specification
- *      to the actual code. The drawback is that the actual function call
- *      also reflect the parser state. However most of the parsing routines
- *      takes as the only argument the parser context pointer, so migrating
- *      to a state based parser for progressive parsing shouldn't be too hard.
- */
-struct _xmlParserCtxt {
-    struct _xmlSAXHandler *sax;       /* The SAX handler */
-    void            *userData;        /* For SAX interface only, used by DOM build */
-    xmlDocPtr           myDoc;        /* the document being built */
-    int            wellFormed;        /* is the document well formed */
-    int       replaceEntities;        /* shall we replace entities ? */
-    const xmlChar    *version;        /* the XML version string */
-    const xmlChar   *encoding;        /* the declared encoding, if any */
-    int            standalone;        /* standalone document */
-    int                  html;        /* an HTML(1)/Docbook(2) document */
-
-    /* Input stream stack */
-    xmlParserInputPtr  input;         /* Current input stream */
-    int                inputNr;       /* Number of current input streams */
-    int                inputMax;      /* Max number of input streams */
-    xmlParserInputPtr *inputTab;      /* stack of inputs */
-
-    /* Node analysis stack only used for DOM building */
-    xmlNodePtr         node;          /* Current parsed Node */
-    int                nodeNr;        /* Depth of the parsing stack */
-    int                nodeMax;       /* Max depth of the parsing stack */
-    xmlNodePtr        *nodeTab;       /* array of nodes */
-
-    int record_info;                  /* Whether node info should be kept */
-    xmlParserNodeInfoSeq node_seq;    /* info about each node parsed */
-
-    int errNo;                        /* error code */
-
-    int     hasExternalSubset;        /* reference and external subset */
-    int             hasPErefs;        /* the internal subset has PE refs */
-    int              external;        /* are we parsing an external entity */
-
-    int                 valid;        /* is the document valid */
-    int              validate;        /* shall we try to validate ? */
-    xmlValidCtxt        vctxt;        /* The validity context */
-
-    xmlParserInputState instate;      /* current type of input */
-    int                 token;        /* next char look-ahead */    
-
-    char           *directory;        /* the data directory */
-
-    /* Node name stack */
-    const xmlChar     *name;          /* Current parsed Node */
-    int                nameNr;        /* Depth of the parsing stack */
-    int                nameMax;       /* Max depth of the parsing stack */
-    const xmlChar *   *nameTab;       /* array of nodes */
-
-    long               nbChars;       /* number of xmlChar processed */
-    long            checkIndex;       /* used by progressive parsing lookup */
-    int             keepBlanks;       /* ugly but ... */
-    int             disableSAX;       /* SAX callbacks are disabled */
-    int               inSubset;       /* Parsing is in int 1/ext 2 subset */
-    const xmlChar *    intSubName;    /* name of subset */
-    xmlChar *          extSubURI;     /* URI of external subset */
-    xmlChar *          extSubSystem;  /* SYSTEM ID of external subset */
-
-    /* xml:space values */
-    int *              space;         /* Should the parser preserve spaces */
-    int                spaceNr;       /* Depth of the parsing stack */
-    int                spaceMax;      /* Max depth of the parsing stack */
-    int *              spaceTab;      /* array of space infos */
-
-    int                depth;         /* to prevent entity substitution loops */
-    xmlParserInputPtr  entity;        /* used to check entities boundaries */
-    int                charset;       /* encoding of the in-memory content
-				         actually an xmlCharEncoding */
-    int                nodelen;       /* Those two fields are there to */
-    int                nodemem;       /* Speed up large node parsing */
-    int                pedantic;      /* signal pedantic warnings */
-    void              *_private;      /* For user data, libxml won't touch it */
-
-    int                loadsubset;    /* should the external subset be loaded */
-    int                linenumbers;   /* set line number in element content */
-    void              *catalogs;      /* document's own catalog */
-    int                recovery;      /* run in recovery mode */
-    int                progressive;   /* is this a progressive parsing */
-    xmlDictPtr         dict;          /* dictionnary for the parser */
-    const xmlChar *   *atts;          /* array for the attributes callbacks */
-    int                maxatts;       /* the size of the array */
-    int                docdict;       /* use strings from dict to build tree */
-
-    /*
-     * pre-interned strings
-     */
-    const xmlChar *str_xml;
-    const xmlChar *str_xmlns;
-    const xmlChar *str_xml_ns;
-
-    /*
-     * Everything below is used only by the new SAX mode
-     */
-    int                sax2;          /* operating in the new SAX mode */
-    int                nsNr;          /* the number of inherited namespaces */
-    int                nsMax;         /* the size of the arrays */
-    const xmlChar *   *nsTab;         /* the array of prefix/namespace name */
-    int               *attallocs;     /* which attribute were allocated */
-    void *            *pushTab;       /* array of data for push */
-    xmlHashTablePtr    attsDefault;   /* defaulted attributes if any */
-    xmlHashTablePtr    attsSpecial;   /* non-CDATA attributes if any */
-    int                nsWellFormed;  /* is the document XML Nanespace okay */
-    int                options;       /* Extra options */
-
-    /*
-     * Those fields are needed only for treaming parsing so far
-     */
-    int               dictNames;    /* Use dictionary names for the tree */
-    int               freeElemsNr;  /* number of freed element nodes */
-    xmlNodePtr        freeElems;    /* List of freed element nodes */
-    int               freeAttrsNr;  /* number of freed attributes nodes */
-    xmlAttrPtr        freeAttrs;    /* List of freed attributes nodes */
-
-    /*
-     * the complete error informations for the last error.
-     */
-    xmlError          lastError;
-    xmlParserMode     parseMode;    /* the parser mode */
-    unsigned long    nbentities;    /* number of entities references */
-    unsigned long  sizeentities;    /* size of parsed entities */
-};
-
-/**
- * xmlSAXLocator:
- *
- * A SAX Locator.
- */
-struct _xmlSAXLocator {
-    const xmlChar *(*getPublicId)(void *ctx);
-    const xmlChar *(*getSystemId)(void *ctx);
-    int (*getLineNumber)(void *ctx);
-    int (*getColumnNumber)(void *ctx);
-};
-
-/**
- * xmlSAXHandler:
- *
- * A SAX handler is bunch of callbacks called by the parser when processing
- * of the input generate data or structure informations.
- */
-
-/**
- * resolveEntitySAXFunc:
- * @ctx:  the user data (XML parser context)
- * @publicId: The public ID of the entity
- * @systemId: The system ID of the entity
- *
- * Callback:
- * The entity loader, to control the loading of external entities,
- * the application can either:
- *    - override this resolveEntity() callback in the SAX block
- *    - or better use the xmlSetExternalEntityLoader() function to
- *      set up it's own entity resolution routine
- *
- * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
- */
-typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
-				const xmlChar *publicId,
-				const xmlChar *systemId);
-/**
- * internalSubsetSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @name:  the root element name
- * @ExternalID:  the external ID
- * @SystemID:  the SYSTEM ID (e.g. filename or URL)
- *
- * Callback on internal subset declaration.
- */
-typedef void (*internalSubsetSAXFunc) (void *ctx,
-				const xmlChar *name,
-				const xmlChar *ExternalID,
-				const xmlChar *SystemID);
-/**
- * externalSubsetSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @name:  the root element name
- * @ExternalID:  the external ID
- * @SystemID:  the SYSTEM ID (e.g. filename or URL)
- *
- * Callback on external subset declaration.
- */
-typedef void (*externalSubsetSAXFunc) (void *ctx,
-				const xmlChar *name,
-				const xmlChar *ExternalID,
-				const xmlChar *SystemID);
-/**
- * getEntitySAXFunc:
- * @ctx:  the user data (XML parser context)
- * @name: The entity name
- *
- * Get an entity by name.
- *
- * Returns the xmlEntityPtr if found.
- */
-typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
-				const xmlChar *name);
-/**
- * getParameterEntitySAXFunc:
- * @ctx:  the user data (XML parser context)
- * @name: The entity name
- *
- * Get a parameter entity by name.
- *
- * Returns the xmlEntityPtr if found.
- */
-typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
-				const xmlChar *name);
-/**
- * entityDeclSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @name:  the entity name 
- * @type:  the entity type 
- * @publicId: The public ID of the entity
- * @systemId: The system ID of the entity
- * @content: the entity value (without processing).
- *
- * An entity definition has been parsed.
- */
-typedef void (*entityDeclSAXFunc) (void *ctx,
-				const xmlChar *name,
-				int type,
-				const xmlChar *publicId,
-				const xmlChar *systemId,
-				xmlChar *content);
-/**
- * notationDeclSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @name: The name of the notation
- * @publicId: The public ID of the entity
- * @systemId: The system ID of the entity
- *
- * What to do when a notation declaration has been parsed.
- */
-typedef void (*notationDeclSAXFunc)(void *ctx,
-				const xmlChar *name,
-				const xmlChar *publicId,
-				const xmlChar *systemId);
-/**
- * attributeDeclSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @elem:  the name of the element
- * @fullname:  the attribute name 
- * @type:  the attribute type 
- * @def:  the type of default value
- * @defaultValue: the attribute default value
- * @tree:  the tree of enumerated value set
- *
- * An attribute definition has been parsed.
- */
-typedef void (*attributeDeclSAXFunc)(void *ctx,
-				const xmlChar *elem,
-				const xmlChar *fullname,
-				int type,
-				int def,
-				const xmlChar *defaultValue,
-				xmlEnumerationPtr tree);
-/**
- * elementDeclSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @name:  the element name 
- * @type:  the element type 
- * @content: the element value tree
- *
- * An element definition has been parsed.
- */
-typedef void (*elementDeclSAXFunc)(void *ctx,
-				const xmlChar *name,
-				int type,
-				xmlElementContentPtr content);
-/**
- * unparsedEntityDeclSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @name: The name of the entity
- * @publicId: The public ID of the entity
- * @systemId: The system ID of the entity
- * @notationName: the name of the notation
- *
- * What to do when an unparsed entity declaration is parsed.
- */
-typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
-				const xmlChar *name,
-				const xmlChar *publicId,
-				const xmlChar *systemId,
-				const xmlChar *notationName);
-/**
- * setDocumentLocatorSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @loc: A SAX Locator
- *
- * Receive the document locator at startup, actually xmlDefaultSAXLocator.
- * Everything is available on the context, so this is useless in our case.
- */
-typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
-				xmlSAXLocatorPtr loc);
-/**
- * startDocumentSAXFunc:
- * @ctx:  the user data (XML parser context)
- *
- * Called when the document start being processed.
- */
-typedef void (*startDocumentSAXFunc) (void *ctx);
-/**
- * endDocumentSAXFunc:
- * @ctx:  the user data (XML parser context)
- *
- * Called when the document end has been detected.
- */
-typedef void (*endDocumentSAXFunc) (void *ctx);
-/**
- * startElementSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @name:  The element name, including namespace prefix
- * @atts:  An array of name/value attributes pairs, NULL terminated
- *
- * Called when an opening tag has been processed.
- */
-typedef void (*startElementSAXFunc) (void *ctx,
-				const xmlChar *name,
-				const xmlChar **atts);
-/**
- * endElementSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @name:  The element name
- *
- * Called when the end of an element has been detected.
- */
-typedef void (*endElementSAXFunc) (void *ctx,
-				const xmlChar *name);
-/**
- * attributeSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @name:  The attribute name, including namespace prefix
- * @value:  The attribute value
- *
- * Handle an attribute that has been read by the parser.
- * The default handling is to convert the attribute into an
- * DOM subtree and past it in a new xmlAttr element added to
- * the element.
- */
-typedef void (*attributeSAXFunc) (void *ctx,
-				const xmlChar *name,
-				const xmlChar *value);
-/**
- * referenceSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @name:  The entity name
- *
- * Called when an entity reference is detected. 
- */
-typedef void (*referenceSAXFunc) (void *ctx,
-				const xmlChar *name);
-/**
- * charactersSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @ch:  a xmlChar string
- * @len: the number of xmlChar
- *
- * Receiving some chars from the parser.
- */
-typedef void (*charactersSAXFunc) (void *ctx,
-				const xmlChar *ch,
-				int len);
-/**
- * ignorableWhitespaceSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @ch:  a xmlChar string
- * @len: the number of xmlChar
- *
- * Receiving some ignorable whitespaces from the parser.
- * UNUSED: by default the DOM building will use characters.
- */
-typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
-				const xmlChar *ch,
-				int len);
-/**
- * processingInstructionSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @target:  the target name
- * @data: the PI data's
- *
- * A processing instruction has been parsed.
- */
-typedef void (*processingInstructionSAXFunc) (void *ctx,
-				const xmlChar *target,
-				const xmlChar *data);
-/**
- * commentSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @value:  the comment content
- *
- * A comment has been parsed.
- */
-typedef void (*commentSAXFunc) (void *ctx,
-				const xmlChar *value);
-/**
- * cdataBlockSAXFunc:
- * @ctx:  the user data (XML parser context)
- * @value:  The pcdata content
- * @len:  the block length
- *
- * Called when a pcdata block has been parsed.
- */
-typedef void (*cdataBlockSAXFunc) (
-	                        void *ctx,
-				const xmlChar *value,
-				int len);
-/**
- * warningSAXFunc:
- * @ctx:  an XML parser context
- * @msg:  the message to display/transmit
- * @...:  extra parameters for the message display
- * 
- * Display and format a warning messages, callback.
- */
-typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
-				const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
-/**
- * errorSAXFunc:
- * @ctx:  an XML parser context
- * @msg:  the message to display/transmit
- * @...:  extra parameters for the message display
- * 
- * Display and format an error messages, callback.
- */
-typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
-				const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
-/**
- * fatalErrorSAXFunc:
- * @ctx:  an XML parser context
- * @msg:  the message to display/transmit
- * @...:  extra parameters for the message display
- * 
- * Display and format fatal error messages, callback.
- * Note: so far fatalError() SAX callbacks are not used, error()
- *       get all the callbacks for errors.
- */
-typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx,
-				const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
-/**
- * isStandaloneSAXFunc:
- * @ctx:  the user data (XML parser context)
- *
- * Is this document tagged standalone?
- *
- * Returns 1 if true
- */
-typedef int (*isStandaloneSAXFunc) (void *ctx);
-/**
- * hasInternalSubsetSAXFunc:
- * @ctx:  the user data (XML parser context)
- *
- * Does this document has an internal subset.
- *
- * Returns 1 if true
- */
-typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
-
-/**
- * hasExternalSubsetSAXFunc:
- * @ctx:  the user data (XML parser context)
- *
- * Does this document has an external subset?
- *
- * Returns 1 if true
- */
-typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
-
-/************************************************************************
- *									*
- *			The SAX version 2 API extensions		*
- *									*
- ************************************************************************/
-/**
- * XML_SAX2_MAGIC:
- *
- * Special constant found in SAX2 blocks initialized fields
- */
-#define XML_SAX2_MAGIC 0xDEEDBEAF
-
-/**
- * startElementNsSAX2Func:
- * @ctx:  the user data (XML parser context)
- * @localname:  the local name of the element
- * @prefix:  the element namespace prefix if available
- * @URI:  the element namespace name if available
- * @nb_namespaces:  number of namespace definitions on that node
- * @namespaces:  pointer to the array of prefix/URI pairs namespace definitions
- * @nb_attributes:  the number of attributes on that node
- * @nb_defaulted:  the number of defaulted attributes. The defaulted
- *                  ones are at the end of the array
- * @attributes:  pointer to the array of (localname/prefix/URI/value/end)
- *               attribute values.
- *
- * SAX2 callback when an element start has been detected by the parser.
- * It provides the namespace informations for the element, as well as
- * the new namespace declarations on the element.
- */
-
-typedef void (*startElementNsSAX2Func) (void *ctx,
-					const xmlChar *localname,
-					const xmlChar *prefix,
-					const xmlChar *URI,
-					int nb_namespaces,
-					const xmlChar **namespaces,
-					int nb_attributes,
-					int nb_defaulted,
-					const xmlChar **attributes);
- 
-/**
- * endElementNsSAX2Func:
- * @ctx:  the user data (XML parser context)
- * @localname:  the local name of the element
- * @prefix:  the element namespace prefix if available
- * @URI:  the element namespace name if available
- *
- * SAX2 callback when an element end has been detected by the parser.
- * It provides the namespace informations for the element.
- */
-
-typedef void (*endElementNsSAX2Func)   (void *ctx,
-					const xmlChar *localname,
-					const xmlChar *prefix,
-					const xmlChar *URI);
-
-
-struct _xmlSAXHandler {
-    internalSubsetSAXFunc internalSubset;
-    isStandaloneSAXFunc isStandalone;
-    hasInternalSubsetSAXFunc hasInternalSubset;
-    hasExternalSubsetSAXFunc hasExternalSubset;
-    resolveEntitySAXFunc resolveEntity;
-    getEntitySAXFunc getEntity;
-    entityDeclSAXFunc entityDecl;
-    notationDeclSAXFunc notationDecl;
-    attributeDeclSAXFunc attributeDecl;
-    elementDeclSAXFunc elementDecl;
-    unparsedEntityDeclSAXFunc unparsedEntityDecl;
-    setDocumentLocatorSAXFunc setDocumentLocator;
-    startDocumentSAXFunc startDocument;
-    endDocumentSAXFunc endDocument;
-    startElementSAXFunc startElement;
-    endElementSAXFunc endElement;
-    referenceSAXFunc reference;
-    charactersSAXFunc characters;
-    ignorableWhitespaceSAXFunc ignorableWhitespace;
-    processingInstructionSAXFunc processingInstruction;
-    commentSAXFunc comment;
-    warningSAXFunc warning;
-    errorSAXFunc error;
-    fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
-    getParameterEntitySAXFunc getParameterEntity;
-    cdataBlockSAXFunc cdataBlock;
-    externalSubsetSAXFunc externalSubset;
-    unsigned int initialized;
-    /* The following fields are extensions available only on version 2 */
-    void *_private;
-    startElementNsSAX2Func startElementNs;
-    endElementNsSAX2Func endElementNs;
-    xmlStructuredErrorFunc serror;
-};
-
-/*
- * SAX Version 1
- */
-typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;
-typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr;
-struct _xmlSAXHandlerV1 {
-    internalSubsetSAXFunc internalSubset;
-    isStandaloneSAXFunc isStandalone;
-    hasInternalSubsetSAXFunc hasInternalSubset;
-    hasExternalSubsetSAXFunc hasExternalSubset;
-    resolveEntitySAXFunc resolveEntity;
-    getEntitySAXFunc getEntity;
-    entityDeclSAXFunc entityDecl;
-    notationDeclSAXFunc notationDecl;
-    attributeDeclSAXFunc attributeDecl;
-    elementDeclSAXFunc elementDecl;
-    unparsedEntityDeclSAXFunc unparsedEntityDecl;
-    setDocumentLocatorSAXFunc setDocumentLocator;
-    startDocumentSAXFunc startDocument;
-    endDocumentSAXFunc endDocument;
-    startElementSAXFunc startElement;
-    endElementSAXFunc endElement;
-    referenceSAXFunc reference;
-    charactersSAXFunc characters;
-    ignorableWhitespaceSAXFunc ignorableWhitespace;
-    processingInstructionSAXFunc processingInstruction;
-    commentSAXFunc comment;
-    warningSAXFunc warning;
-    errorSAXFunc error;
-    fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
-    getParameterEntitySAXFunc getParameterEntity;
-    cdataBlockSAXFunc cdataBlock;
-    externalSubsetSAXFunc externalSubset;
-    unsigned int initialized;
-};
-
-
-/**
- * xmlExternalEntityLoader:
- * @URL: The System ID of the resource requested
- * @ID: The Public ID of the resource requested
- * @context: the XML parser context 
- *
- * External entity loaders types.
- *
- * Returns the entity input parser.
- */
-typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
-					 const char *ID,
-					 xmlParserCtxtPtr context);
-
-#ifdef __cplusplus
-}
-#endif
-
-#include <libxml/encoding.h>
-#include <libxml/xmlIO.h>
-#include <libxml/globals.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*
- * Init/Cleanup
- */
-XMLPUBFUN void XMLCALL		
-		xmlInitParser		(void);
-XMLPUBFUN void XMLCALL		
-		xmlCleanupParser	(void);
-
-/*
- * Input functions
- */
-XMLPUBFUN int XMLCALL		
-		xmlParserInputRead	(xmlParserInputPtr in,
-					 int len);
-XMLPUBFUN int XMLCALL		
-		xmlParserInputGrow	(xmlParserInputPtr in,
-					 int len);
-
-/*
- * Basic parsing Interfaces
- */
-#ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN xmlDocPtr XMLCALL	
-		xmlParseDoc		(const xmlChar *cur);
-XMLPUBFUN xmlDocPtr XMLCALL	
-		xmlParseFile		(const char *filename);
-XMLPUBFUN xmlDocPtr XMLCALL	
-		xmlParseMemory		(const char *buffer,
-					 int size);
-#endif /* LIBXML_SAX1_ENABLED */
-XMLPUBFUN int XMLCALL		
-		xmlSubstituteEntitiesDefault(int val);
-XMLPUBFUN int XMLCALL		
-		xmlKeepBlanksDefault	(int val);
-XMLPUBFUN void XMLCALL		
-		xmlStopParser		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL		
-		xmlPedanticParserDefault(int val);
-XMLPUBFUN int XMLCALL		
-		xmlLineNumbersDefault	(int val);
-
-#ifdef LIBXML_SAX1_ENABLED
-/*
- * Recovery mode 
- */
-XMLPUBFUN xmlDocPtr XMLCALL	
-		xmlRecoverDoc		(xmlChar *cur);
-XMLPUBFUN xmlDocPtr XMLCALL	
-		xmlRecoverMemory	(const char *buffer,
-					 int size);
-XMLPUBFUN xmlDocPtr XMLCALL	
-		xmlRecoverFile		(const char *filename);
-#endif /* LIBXML_SAX1_ENABLED */
-
-/*
- * Less common routines and SAX interfaces
- */
-XMLPUBFUN int XMLCALL		
-		xmlParseDocument	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL		
-		xmlParseExtParsedEnt	(xmlParserCtxtPtr ctxt);
-#ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN int XMLCALL		
-		xmlSAXUserParseFile	(xmlSAXHandlerPtr sax,
-					 void *user_data,
-					 const char *filename);
-XMLPUBFUN int XMLCALL		
-		xmlSAXUserParseMemory	(xmlSAXHandlerPtr sax,
-					 void *user_data,
-					 const char *buffer,
-					 int size);
-XMLPUBFUN xmlDocPtr XMLCALL	
-		xmlSAXParseDoc		(xmlSAXHandlerPtr sax,
-					 const xmlChar *cur,
-					 int recovery);
-XMLPUBFUN xmlDocPtr XMLCALL	
-		xmlSAXParseMemory	(xmlSAXHandlerPtr sax,
-					 const char *buffer,
-                                   	 int size,
-					 int recovery);
-XMLPUBFUN xmlDocPtr XMLCALL	
-		xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
-					 const char *buffer,
-                                   	 int size,
-					 int recovery,
-					 void *data);
-XMLPUBFUN xmlDocPtr XMLCALL	
-		xmlSAXParseFile		(xmlSAXHandlerPtr sax,
-					 const char *filename,
-					 int recovery);
-XMLPUBFUN xmlDocPtr XMLCALL	
-		xmlSAXParseFileWithData	(xmlSAXHandlerPtr sax,
-					 const char *filename,
-					 int recovery,
-					 void *data);
-XMLPUBFUN xmlDocPtr XMLCALL	
-		xmlSAXParseEntity	(xmlSAXHandlerPtr sax,
-					 const char *filename);
-XMLPUBFUN xmlDocPtr XMLCALL	
-		xmlParseEntity		(const char *filename);
-#endif /* LIBXML_SAX1_ENABLED */
-
-#ifdef LIBXML_VALID_ENABLED
-XMLPUBFUN xmlDtdPtr XMLCALL	
-		xmlSAXParseDTD		(xmlSAXHandlerPtr sax,
-					 const xmlChar *ExternalID,
-					 const xmlChar *SystemID);
-XMLPUBFUN xmlDtdPtr XMLCALL	
-		xmlParseDTD		(const xmlChar *ExternalID,
-					 const xmlChar *SystemID);
-XMLPUBFUN xmlDtdPtr XMLCALL	
-		xmlIOParseDTD		(xmlSAXHandlerPtr sax,
-					 xmlParserInputBufferPtr input,
-					 xmlCharEncoding enc);
-#endif /* LIBXML_VALID_ENABLE */
-#ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN int XMLCALL	
-		xmlParseBalancedChunkMemory(xmlDocPtr doc,
-					 xmlSAXHandlerPtr sax,
-					 void *user_data,
-					 int depth,
-					 const xmlChar *string,
-					 xmlNodePtr *lst);
-#endif /* LIBXML_SAX1_ENABLED */
-XMLPUBFUN xmlParserErrors XMLCALL
-		xmlParseInNodeContext	(xmlNodePtr node,
-					 const char *data,
-					 int datalen,
-					 int options,
-					 xmlNodePtr *lst);
-#ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN int XMLCALL          
-		xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
-                     xmlSAXHandlerPtr sax,
-                     void *user_data,
-                     int depth,
-                     const xmlChar *string,
-                     xmlNodePtr *lst,
-                     int recover);
-XMLPUBFUN int XMLCALL		
-		xmlParseExternalEntity	(xmlDocPtr doc,
-					 xmlSAXHandlerPtr sax,
-					 void *user_data,
-					 int depth,
-					 const xmlChar *URL,
-					 const xmlChar *ID,
-					 xmlNodePtr *lst);
-#endif /* LIBXML_SAX1_ENABLED */
-XMLPUBFUN int XMLCALL		
-		xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
-					 const xmlChar *URL,
-					 const xmlChar *ID,
-					 xmlNodePtr *lst);
-
-/*
- * Parser contexts handling.
- */
-XMLPUBFUN xmlParserCtxtPtr XMLCALL	
-		xmlNewParserCtxt	(void);
-XMLPUBFUN int XMLCALL		
-		xmlInitParserCtxt	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL		
-		xmlClearParserCtxt	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL		
-		xmlFreeParserCtxt	(xmlParserCtxtPtr ctxt);
-#ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN void XMLCALL		
-		xmlSetupParserForBuffer	(xmlParserCtxtPtr ctxt,
-					 const xmlChar* buffer,
-					 const char *filename);
-#endif /* LIBXML_SAX1_ENABLED */
-XMLPUBFUN xmlParserCtxtPtr XMLCALL 
-		xmlCreateDocParserCtxt	(const xmlChar *cur);
-
-#ifdef LIBXML_LEGACY_ENABLED
-/*
- * Reading/setting optional parsing features.
- */
-XMLPUBFUN int XMLCALL		
-		xmlGetFeaturesList	(int *len,
-					 const char **result);
-XMLPUBFUN int XMLCALL		
-		xmlGetFeature		(xmlParserCtxtPtr ctxt,
-					 const char *name,
-					 void *result);
-XMLPUBFUN int XMLCALL		
-		xmlSetFeature		(xmlParserCtxtPtr ctxt,
-					 const char *name,
-					 void *value);
-#endif /* LIBXML_LEGACY_ENABLED */
-
-#ifdef LIBXML_PUSH_ENABLED
-/*
- * Interfaces for the Push mode.
- */
-XMLPUBFUN xmlParserCtxtPtr XMLCALL 
-		xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
-					 void *user_data,
-					 const char *chunk,
-					 int size,
-					 const char *filename);
-XMLPUBFUN int XMLCALL		 
-		xmlParseChunk		(xmlParserCtxtPtr ctxt,
-					 const char *chunk,
-					 int size,
-					 int terminate);
-#endif /* LIBXML_PUSH_ENABLED */
-
-/*
- * Special I/O mode.
- */
-
-XMLPUBFUN xmlParserCtxtPtr XMLCALL 
-		xmlCreateIOParserCtxt	(xmlSAXHandlerPtr sax,
-					 void *user_data,
-					 xmlInputReadCallback   ioread,
-					 xmlInputCloseCallback  ioclose,
-					 void *ioctx,
-					 xmlCharEncoding enc);
-
-XMLPUBFUN xmlParserInputPtr XMLCALL 
-		xmlNewIOInputStream	(xmlParserCtxtPtr ctxt,
-					 xmlParserInputBufferPtr input,
-					 xmlCharEncoding enc);
-
-/*
- * Node infos.
- */
-XMLPUBFUN const xmlParserNodeInfo* XMLCALL
-		xmlParserFindNodeInfo	(const xmlParserCtxtPtr ctxt,
-				         const xmlNodePtr node);
-XMLPUBFUN void XMLCALL		
-		xmlInitNodeInfoSeq	(xmlParserNodeInfoSeqPtr seq);
-XMLPUBFUN void XMLCALL		
-		xmlClearNodeInfoSeq	(xmlParserNodeInfoSeqPtr seq);
-XMLPUBFUN unsigned long XMLCALL 
-		xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
-                                         const xmlNodePtr node);
-XMLPUBFUN void XMLCALL		
-		xmlParserAddNodeInfo	(xmlParserCtxtPtr ctxt,
-					 const xmlParserNodeInfoPtr info);
-
-/*
- * External entities handling actually implemented in xmlIO.
- */
-
-XMLPUBFUN void XMLCALL		
-		xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
-XMLPUBFUN xmlExternalEntityLoader XMLCALL
-		xmlGetExternalEntityLoader(void);
-XMLPUBFUN xmlParserInputPtr XMLCALL
-		xmlLoadExternalEntity	(const char *URL,
-					 const char *ID,
-					 xmlParserCtxtPtr ctxt);
-
-/*
- * Index lookup, actually implemented in the encoding module
- */
-XMLPUBFUN long XMLCALL
-		xmlByteConsumed		(xmlParserCtxtPtr ctxt);
-
-/*
- * New set of simpler/more flexible APIs
- */
-/**
- * xmlParserOption:
- *
- * This is the set of XML parser options that can be passed down
- * to the xmlReadDoc() and similar calls.
- */
-typedef enum {
-    XML_PARSE_RECOVER	= 1<<0,	/* recover on errors */
-    XML_PARSE_NOENT	= 1<<1,	/* substitute entities */
-    XML_PARSE_DTDLOAD	= 1<<2,	/* load the external subset */
-    XML_PARSE_DTDATTR	= 1<<3,	/* default DTD attributes */
-    XML_PARSE_DTDVALID	= 1<<4,	/* validate with the DTD */
-    XML_PARSE_NOERROR	= 1<<5,	/* suppress error reports */
-    XML_PARSE_NOWARNING	= 1<<6,	/* suppress warning reports */
-    XML_PARSE_PEDANTIC	= 1<<7,	/* pedantic error reporting */
-    XML_PARSE_NOBLANKS	= 1<<8,	/* remove blank nodes */
-    XML_PARSE_SAX1	= 1<<9,	/* use the SAX1 interface internally */
-    XML_PARSE_XINCLUDE	= 1<<10,/* Implement XInclude substitition  */
-    XML_PARSE_NONET	= 1<<11,/* Forbid network access */
-    XML_PARSE_NODICT	= 1<<12,/* Do not reuse the context dictionnary */
-    XML_PARSE_NSCLEAN	= 1<<13,/* remove redundant namespaces declarations */
-    XML_PARSE_NOCDATA	= 1<<14,/* merge CDATA as text nodes */
-    XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */
-    XML_PARSE_COMPACT   = 1<<16,/* compact small text nodes; no modification of
-                                   the tree allowed afterwards (will possibly
-				   crash if you try to modify the tree) */
-    XML_PARSE_OLD10	= 1<<17,/* parse using XML-1.0 before update 5 */
-    XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */
-    XML_PARSE_HUGE      = 1<<19, /* relax any hardcoded limit from the parser */
-    XML_PARSE_OLDSAX    = 1<<20 /* parse using SAX2 interface from before 2.7.0 */
-} xmlParserOption;
-
-XMLPUBFUN void XMLCALL
-		xmlCtxtReset		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
-		xmlCtxtResetPush	(xmlParserCtxtPtr ctxt,
-					 const char *chunk,
-					 int size,
-					 const char *filename,
-					 const char *encoding);
-XMLPUBFUN int XMLCALL
-		xmlCtxtUseOptions	(xmlParserCtxtPtr ctxt,
-					 int options);
-XMLPUBFUN xmlDocPtr XMLCALL
-		xmlReadDoc		(const xmlChar *cur,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN xmlDocPtr XMLCALL
-		xmlReadFile		(const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN xmlDocPtr XMLCALL
-		xmlReadMemory		(const char *buffer,
-					 int size,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN xmlDocPtr XMLCALL
-		xmlReadFd		(int fd,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN xmlDocPtr XMLCALL
-		xmlReadIO		(xmlInputReadCallback ioread,
-					 xmlInputCloseCallback ioclose,
-					 void *ioctx,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN xmlDocPtr XMLCALL
-		xmlCtxtReadDoc		(xmlParserCtxtPtr ctxt,
-					 const xmlChar *cur,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN xmlDocPtr XMLCALL
-		xmlCtxtReadFile		(xmlParserCtxtPtr ctxt,
-					 const char *filename,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN xmlDocPtr XMLCALL
-		xmlCtxtReadMemory		(xmlParserCtxtPtr ctxt,
-					 const char *buffer,
-					 int size,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN xmlDocPtr XMLCALL
-		xmlCtxtReadFd		(xmlParserCtxtPtr ctxt,
-					 int fd,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN xmlDocPtr XMLCALL
-		xmlCtxtReadIO		(xmlParserCtxtPtr ctxt,
-					 xmlInputReadCallback ioread,
-					 xmlInputCloseCallback ioclose,
-					 void *ioctx,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-
-/*
- * Library wide options
- */
-/**
- * xmlFeature:
- *
- * Used to examine the existance of features that can be enabled
- * or disabled at compile-time.
- * They used to be called XML_FEATURE_xxx but this clashed with Expat
- */
-typedef enum {
-    XML_WITH_THREAD = 1,
-    XML_WITH_TREE = 2,
-    XML_WITH_OUTPUT = 3,
-    XML_WITH_PUSH = 4,
-    XML_WITH_READER = 5,
-    XML_WITH_PATTERN = 6,
-    XML_WITH_WRITER = 7,
-    XML_WITH_SAX1 = 8,
-    XML_WITH_FTP = 9,
-    XML_WITH_HTTP = 10,
-    XML_WITH_VALID = 11,
-    XML_WITH_HTML = 12,
-    XML_WITH_LEGACY = 13,
-    XML_WITH_C14N = 14,
-    XML_WITH_CATALOG = 15,
-    XML_WITH_XPATH = 16,
-    XML_WITH_XPTR = 17,
-    XML_WITH_XINCLUDE = 18,
-    XML_WITH_ICONV = 19,
-    XML_WITH_ISO8859X = 20,
-    XML_WITH_UNICODE = 21,
-    XML_WITH_REGEXP = 22,
-    XML_WITH_AUTOMATA = 23,
-    XML_WITH_EXPR = 24,
-    XML_WITH_SCHEMAS = 25,
-    XML_WITH_SCHEMATRON = 26,
-    XML_WITH_MODULES = 27,
-    XML_WITH_DEBUG = 28,
-    XML_WITH_DEBUG_MEM = 29,
-    XML_WITH_DEBUG_RUN = 30,
-    XML_WITH_ZLIB = 31,
-    XML_WITH_NONE = 99999 /* just to be sure of allocation size */
-} xmlFeature;
-
-XMLPUBFUN int XMLCALL
-		xmlHasFeature		(xmlFeature feature);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* __XML_PARSER_H__ */
-
diff --git a/interfaces/ext/libxml/parserInternals.h b/interfaces/ext/libxml/parserInternals.h
deleted file mode 100644
index a5e75b5..0000000
--- a/interfaces/ext/libxml/parserInternals.h
+++ /dev/null
@@ -1,611 +0,0 @@
-/*
- * Summary: internals routines exported by the parser.
- * Description: this module exports a number of internal parsing routines
- *              they are not really all intended for applications but
- *              can prove useful doing low level processing.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_PARSER_INTERNALS_H__
-#define __XML_PARSER_INTERNALS_H__
-
-#include <libxml/xmlversion.h>
-#include <libxml/parser.h>
-#include <libxml/HTMLparser.h>
-#include <libxml/chvalid.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * xmlParserMaxDepth:
- *
- * arbitrary depth limit for the XML documents that we allow to
- * process. This is not a limitation of the parser but a safety
- * boundary feature, use XML_PARSE_HUGE option to override it.
- */
-XMLPUBVAR unsigned int xmlParserMaxDepth;
-
-/**
- * XML_MAX_TEXT_LENGTH:
- *
- * Maximum size allowed for a single text node when building a tree.
- * This is not a limitation of the parser but a safety boundary feature,
- * use XML_PARSE_HUGE option to override it.
- */
-#define XML_MAX_TEXT_LENGTH 10000000
-
-/**
- * XML_MAX_NAMELEN:
- *
- * Identifiers can be longer, but this will be more costly
- * at runtime.
- */
-#define XML_MAX_NAMELEN 100
-
-/**
- * INPUT_CHUNK:
- *
- * The parser tries to always have that amount of input ready.
- * One of the point is providing context when reporting errors.
- */
-#define INPUT_CHUNK	250
-
-/************************************************************************
- *									*
- * UNICODE version of the macros.      					*
- *									*
- ************************************************************************/
-/**
- * IS_BYTE_CHAR:
- * @c:  an byte value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- * [2] Char ::= #x9 | #xA | #xD | [#x20...]
- * any byte character in the accepted range
- */
-#define IS_BYTE_CHAR(c)	 xmlIsChar_ch(c)
-
-/**
- * IS_CHAR:
- * @c:  an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
- *                  | [#x10000-#x10FFFF]
- * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
- */
-#define IS_CHAR(c)   xmlIsCharQ(c)
-
-/**
- * IS_CHAR_CH:
- * @c: an xmlChar (usually an unsigned char)
- *
- * Behaves like IS_CHAR on single-byte value
- */
-#define IS_CHAR_CH(c)  xmlIsChar_ch(c)
-
-/**
- * IS_BLANK:
- * @c:  an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- * [3] S ::= (#x20 | #x9 | #xD | #xA)+
- */
-#define IS_BLANK(c)  xmlIsBlankQ(c)
-
-/**
- * IS_BLANK_CH:
- * @c:  an xmlChar value (normally unsigned char)
- *
- * Behaviour same as IS_BLANK
- */
-#define IS_BLANK_CH(c)  xmlIsBlank_ch(c)
-
-/**
- * IS_BASECHAR:
- * @c:  an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- * [85] BaseChar ::= ... long list see REC ...
- */
-#define IS_BASECHAR(c) xmlIsBaseCharQ(c)
-
-/**
- * IS_DIGIT:
- * @c:  an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- * [88] Digit ::= ... long list see REC ...
- */
-#define IS_DIGIT(c) xmlIsDigitQ(c)
-
-/**
- * IS_DIGIT_CH:
- * @c:  an xmlChar value (usually an unsigned char)
- *
- * Behaves like IS_DIGIT but with a single byte argument
- */
-#define IS_DIGIT_CH(c)  xmlIsDigit_ch(c)
-
-/**
- * IS_COMBINING:
- * @c:  an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- * [87] CombiningChar ::= ... long list see REC ...
- */
-#define IS_COMBINING(c) xmlIsCombiningQ(c)
-
-/**
- * IS_COMBINING_CH:
- * @c:  an xmlChar (usually an unsigned char)
- *
- * Always false (all combining chars > 0xff)
- */
-#define IS_COMBINING_CH(c) 0 
-
-/**
- * IS_EXTENDER:
- * @c:  an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- *
- * [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 |
- *                   #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] |
- *                   [#x309D-#x309E] | [#x30FC-#x30FE]
- */
-#define IS_EXTENDER(c) xmlIsExtenderQ(c)
-
-/**
- * IS_EXTENDER_CH:
- * @c:  an xmlChar value (usually an unsigned char)
- *
- * Behaves like IS_EXTENDER but with a single-byte argument
- */
-#define IS_EXTENDER_CH(c)  xmlIsExtender_ch(c)
-
-/**
- * IS_IDEOGRAPHIC:
- * @c:  an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- *
- * [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
- */
-#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
-
-/**
- * IS_LETTER:
- * @c:  an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- *
- * [84] Letter ::= BaseChar | Ideographic 
- */
-#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
-
-/**
- * IS_LETTER_CH:
- * @c:  an xmlChar value (normally unsigned char)
- *
- * Macro behaves like IS_LETTER, but only check base chars
- *
- */
-#define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
-
-/**
- * IS_ASCII_LETTER:
- * @c: an xmlChar value
- *
- * Macro to check [a-zA-Z]
- *
- */
-#define IS_ASCII_LETTER(c)	(((0x41 <= (c)) && ((c) <= 0x5a)) || \
-				 ((0x61 <= (c)) && ((c) <= 0x7a)))
-
-/**
- * IS_ASCII_DIGIT:
- * @c: an xmlChar value
- *
- * Macro to check [0-9]
- *
- */
-#define IS_ASCII_DIGIT(c)	((0x30 <= (c)) && ((c) <= 0x39))
-
-/**
- * IS_PUBIDCHAR:
- * @c:  an UNICODE value (int)
- *
- * Macro to check the following production in the XML spec:
- *
- *
- * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
- */
-#define IS_PUBIDCHAR(c)	xmlIsPubidCharQ(c)
-
-/**
- * IS_PUBIDCHAR_CH:
- * @c:  an xmlChar value (normally unsigned char)
- *
- * Same as IS_PUBIDCHAR but for single-byte value
- */
-#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
-
-/**
- * SKIP_EOL:
- * @p:  and UTF8 string pointer
- *
- * Skips the end of line chars.
- */
-#define SKIP_EOL(p) 							\
-    if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; }			\
-    if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; }
-
-/**
- * MOVETO_ENDTAG:
- * @p:  and UTF8 string pointer
- *
- * Skips to the next '>' char.
- */
-#define MOVETO_ENDTAG(p)						\
-    while ((*p) && (*(p) != '>')) (p)++
-
-/**
- * MOVETO_STARTTAG:
- * @p:  and UTF8 string pointer
- *
- * Skips to the next '<' char.
- */
-#define MOVETO_STARTTAG(p)						\
-    while ((*p) && (*(p) != '<')) (p)++
-
-/**
- * Global variables used for predefined strings.
- */
-XMLPUBVAR const xmlChar xmlStringText[];
-XMLPUBVAR const xmlChar xmlStringTextNoenc[];
-XMLPUBVAR const xmlChar xmlStringComment[];
-
-/*
- * Function to finish the work of the macros where needed.
- */
-XMLPUBFUN int XMLCALL                   xmlIsLetter     (int c);
-
-/**
- * Parser context.
- */
-XMLPUBFUN xmlParserCtxtPtr XMLCALL	
-			xmlCreateFileParserCtxt	(const char *filename);
-XMLPUBFUN xmlParserCtxtPtr XMLCALL	
-			xmlCreateURLParserCtxt	(const char *filename,
-						 int options);
-XMLPUBFUN xmlParserCtxtPtr XMLCALL	
-			xmlCreateMemoryParserCtxt(const char *buffer,
-						 int size);
-XMLPUBFUN xmlParserCtxtPtr XMLCALL	
-			xmlCreateEntityParserCtxt(const xmlChar *URL,
-						 const xmlChar *ID,
-						 const xmlChar *base);
-XMLPUBFUN int XMLCALL			
-			xmlSwitchEncoding	(xmlParserCtxtPtr ctxt,
-						 xmlCharEncoding enc);
-XMLPUBFUN int XMLCALL			
-			xmlSwitchToEncoding	(xmlParserCtxtPtr ctxt,
-					 xmlCharEncodingHandlerPtr handler);
-XMLPUBFUN int XMLCALL			
-			xmlSwitchInputEncoding	(xmlParserCtxtPtr ctxt,
-						 xmlParserInputPtr input,
-					 xmlCharEncodingHandlerPtr handler);
-
-#ifdef IN_LIBXML
-/* internal error reporting */
-XMLPUBFUN void XMLCALL
-			__xmlErrEncoding	(xmlParserCtxtPtr ctxt,
-						 xmlParserErrors xmlerr,
-						 const char *msg,
-						 const xmlChar * str1,
-						 const xmlChar * str2);
-#endif
-
-/**
- * Input Streams.
- */
-XMLPUBFUN xmlParserInputPtr XMLCALL	
-			xmlNewStringInputStream	(xmlParserCtxtPtr ctxt,
-						 const xmlChar *buffer);
-XMLPUBFUN xmlParserInputPtr XMLCALL	
-			xmlNewEntityInputStream	(xmlParserCtxtPtr ctxt,
-						 xmlEntityPtr entity);
-XMLPUBFUN int XMLCALL			
-			xmlPushInput		(xmlParserCtxtPtr ctxt,
-						 xmlParserInputPtr input);
-XMLPUBFUN xmlChar XMLCALL			
-			xmlPopInput		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlFreeInputStream	(xmlParserInputPtr input);
-XMLPUBFUN xmlParserInputPtr XMLCALL	
-			xmlNewInputFromFile	(xmlParserCtxtPtr ctxt,
-						 const char *filename);
-XMLPUBFUN xmlParserInputPtr XMLCALL	
-			xmlNewInputStream	(xmlParserCtxtPtr ctxt);
-
-/**
- * Namespaces.
- */
-XMLPUBFUN xmlChar * XMLCALL		
-			xmlSplitQName		(xmlParserCtxtPtr ctxt,
-						 const xmlChar *name,
-						 xmlChar **prefix);
-
-/**
- * Generic production rules.
- */
-XMLPUBFUN const xmlChar * XMLCALL		
-			xmlParseName		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL		
-			xmlParseNmtoken		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL		
-			xmlParseEntityValue	(xmlParserCtxtPtr ctxt,
-						 xmlChar **orig);
-XMLPUBFUN xmlChar * XMLCALL		
-			xmlParseAttValue	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL		
-			xmlParseSystemLiteral	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL		
-			xmlParsePubidLiteral	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlParseCharData	(xmlParserCtxtPtr ctxt,
-						 int cdata);
-XMLPUBFUN xmlChar * XMLCALL		
-			xmlParseExternalID	(xmlParserCtxtPtr ctxt,
-						 xmlChar **publicID,
-						 int strict);
-XMLPUBFUN void XMLCALL			
-			xmlParseComment		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN const xmlChar * XMLCALL		
-			xmlParsePITarget	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlParsePI		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlParseNotationDecl	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlParseEntityDecl	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL			
-			xmlParseDefaultDecl	(xmlParserCtxtPtr ctxt,
-						 xmlChar **value);
-XMLPUBFUN xmlEnumerationPtr XMLCALL	
-			xmlParseNotationType	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlEnumerationPtr XMLCALL	
-			xmlParseEnumerationType	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL			
-			xmlParseEnumeratedType	(xmlParserCtxtPtr ctxt,
-						 xmlEnumerationPtr *tree);
-XMLPUBFUN int XMLCALL			
-			xmlParseAttributeType	(xmlParserCtxtPtr ctxt,
-						 xmlEnumerationPtr *tree);
-XMLPUBFUN void XMLCALL			
-			xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlElementContentPtr XMLCALL	
-			xmlParseElementMixedContentDecl
-						(xmlParserCtxtPtr ctxt,
-						 int inputchk);
-XMLPUBFUN xmlElementContentPtr XMLCALL	
-			xmlParseElementChildrenContentDecl
-						(xmlParserCtxtPtr ctxt,
-						 int inputchk);
-XMLPUBFUN int XMLCALL			
-			xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
-						 const xmlChar *name,
-						 xmlElementContentPtr *result);
-XMLPUBFUN int XMLCALL			
-			xmlParseElementDecl	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlParseMarkupDecl	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL			
-			xmlParseCharRef		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlEntityPtr XMLCALL		
-			xmlParseEntityRef	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlParseReference	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlParsePEReference	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlParseDocTypeDecl	(xmlParserCtxtPtr ctxt);
-#ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN const xmlChar * XMLCALL		
-			xmlParseAttribute	(xmlParserCtxtPtr ctxt,
-						 xmlChar **value);
-XMLPUBFUN const xmlChar * XMLCALL		
-			xmlParseStartTag	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlParseEndTag		(xmlParserCtxtPtr ctxt);
-#endif /* LIBXML_SAX1_ENABLED */
-XMLPUBFUN void XMLCALL			
-			xmlParseCDSect		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlParseContent		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlParseElement		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL		
-			xmlParseVersionNum	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL		
-			xmlParseVersionInfo	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL		
-			xmlParseEncName		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN const xmlChar * XMLCALL		
-			xmlParseEncodingDecl	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL			
-			xmlParseSDDecl		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlParseXMLDecl		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlParseTextDecl	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlParseMisc		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			
-			xmlParseExternalSubset	(xmlParserCtxtPtr ctxt,
-						 const xmlChar *ExternalID,
-						 const xmlChar *SystemID); 
-/**
- * XML_SUBSTITUTE_NONE:
- *
- * If no entities need to be substituted.
- */
-#define XML_SUBSTITUTE_NONE	0
-/**
- * XML_SUBSTITUTE_REF:
- *
- * Whether general entities need to be substituted.
- */
-#define XML_SUBSTITUTE_REF	1
-/**
- * XML_SUBSTITUTE_PEREF:
- *
- * Whether parameter entities need to be substituted.
- */
-#define XML_SUBSTITUTE_PEREF	2
-/**
- * XML_SUBSTITUTE_BOTH:
- *
- * Both general and parameter entities need to be substituted.
- */
-#define XML_SUBSTITUTE_BOTH 	3
-
-XMLPUBFUN xmlChar * XMLCALL
-		xmlStringDecodeEntities		(xmlParserCtxtPtr ctxt,
-						 const xmlChar *str,
-						 int what,
-						 xmlChar end,
-						 xmlChar  end2,
-						 xmlChar end3);
-XMLPUBFUN xmlChar * XMLCALL
-		xmlStringLenDecodeEntities	(xmlParserCtxtPtr ctxt,
-						 const xmlChar *str,
-						 int len,
-						 int what,
-						 xmlChar end,
-						 xmlChar  end2,
-						 xmlChar end3);
-
-/*
- * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
- */
-XMLPUBFUN int XMLCALL			nodePush		(xmlParserCtxtPtr ctxt,
-						 xmlNodePtr value);
-XMLPUBFUN xmlNodePtr XMLCALL		nodePop			(xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL			inputPush		(xmlParserCtxtPtr ctxt,
-						 xmlParserInputPtr value);
-XMLPUBFUN xmlParserInputPtr XMLCALL	inputPop		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN const xmlChar * XMLCALL	namePop			(xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL			namePush		(xmlParserCtxtPtr ctxt,
-						 const xmlChar *value);
-
-/*
- * other commodities shared between parser.c and parserInternals.
- */
-XMLPUBFUN int XMLCALL			xmlSkipBlankChars	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL			xmlStringCurrentChar	(xmlParserCtxtPtr ctxt,
-						 const xmlChar *cur,
-						 int *len);
-XMLPUBFUN void XMLCALL			xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL			xmlCheckLanguageID	(const xmlChar *lang);
-
-/*
- * Really core function shared with HTML parser.
- */
-XMLPUBFUN int XMLCALL			xmlCurrentChar		(xmlParserCtxtPtr ctxt,
-						 int *len);
-XMLPUBFUN int XMLCALL		xmlCopyCharMultiByte	(xmlChar *out,
-						 int val);
-XMLPUBFUN int XMLCALL			xmlCopyChar		(int len,
-						 xmlChar *out,
-						 int val);
-XMLPUBFUN void XMLCALL			xmlNextChar		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL			xmlParserInputShrink	(xmlParserInputPtr in);
-
-#ifdef LIBXML_HTML_ENABLED
-/*
- * Actually comes from the HTML parser but launched from the init stuff.
- */
-XMLPUBFUN void XMLCALL			htmlInitAutoClose	(void);
-XMLPUBFUN htmlParserCtxtPtr XMLCALL	htmlCreateFileParserCtxt(const char *filename,
-	                                         const char *encoding);
-#endif
-
-/*
- * Specific function to keep track of entities references
- * and used by the XSLT debugger.
- */
-#ifdef LIBXML_LEGACY_ENABLED
-/**
- * xmlEntityReferenceFunc:
- * @ent: the entity
- * @firstNode:  the fist node in the chunk
- * @lastNode:  the last nod in the chunk
- *
- * Callback function used when one needs to be able to track back the
- * provenance of a chunk of nodes inherited from an entity replacement.
- */
-typedef	void	(*xmlEntityReferenceFunc)	(xmlEntityPtr ent,
-						 xmlNodePtr firstNode,
-						 xmlNodePtr lastNode);
-  
-XMLPUBFUN void XMLCALL		xmlSetEntityReferenceFunc	(xmlEntityReferenceFunc func);
-
-XMLPUBFUN xmlChar * XMLCALL		
-			xmlParseQuotedString	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
-                        xmlParseNamespace       (xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL		
-			xmlNamespaceParseNSDef	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL		
-			xmlScanName		(xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL		
-			xmlNamespaceParseNCName	(xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL	xmlParserHandleReference(xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL		
-			xmlNamespaceParseQName	(xmlParserCtxtPtr ctxt,
-						 xmlChar **prefix);
-/**
- * Entities
- */
-XMLPUBFUN xmlChar * XMLCALL
-		xmlDecodeEntities		(xmlParserCtxtPtr ctxt,
-						 int len,
-						 int what,
-						 xmlChar end,
-						 xmlChar  end2,
-						 xmlChar end3);
-XMLPUBFUN void XMLCALL			
-			xmlHandleEntity		(xmlParserCtxtPtr ctxt,
-						 xmlEntityPtr entity);
-
-#endif /* LIBXML_LEGACY_ENABLED */
-
-#ifdef IN_LIBXML
-/*
- * internal only
- */
-XMLPUBFUN void XMLCALL
-	xmlErrMemory		(xmlParserCtxtPtr ctxt,
-				 const char *extra);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* __XML_PARSER_INTERNALS_H__ */
diff --git a/interfaces/ext/libxml/pattern.h b/interfaces/ext/libxml/pattern.h
deleted file mode 100644
index 97d2cd2..0000000
--- a/interfaces/ext/libxml/pattern.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Summary: pattern expression handling
- * Description: allows to compile and test pattern expressions for nodes
- *              either in a tree or based on a parser state.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_PATTERN_H__
-#define __XML_PATTERN_H__
-
-#include <libxml/xmlversion.h>
-#include <libxml/tree.h>
-#include <libxml/dict.h>
-
-#ifdef LIBXML_PATTERN_ENABLED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * xmlPattern:
- *
- * A compiled (XPath based) pattern to select nodes
- */
-typedef struct _xmlPattern xmlPattern;
-typedef xmlPattern *xmlPatternPtr;
-
-/**
- * xmlPatternFlags:
- *
- * This is the set of options affecting the behaviour of pattern
- * matching with this module
- *
- */
-typedef enum {
-    XML_PATTERN_DEFAULT		= 0,	/* simple pattern match */
-    XML_PATTERN_XPATH		= 1<<0,	/* standard XPath pattern */
-    XML_PATTERN_XSSEL		= 1<<1,	/* XPath subset for schema selector */
-    XML_PATTERN_XSFIELD		= 1<<2	/* XPath subset for schema field */
-} xmlPatternFlags;
-
-XMLPUBFUN void XMLCALL
-			xmlFreePattern		(xmlPatternPtr comp);
-
-XMLPUBFUN void XMLCALL
-			xmlFreePatternList	(xmlPatternPtr comp);
-
-XMLPUBFUN xmlPatternPtr XMLCALL
-			xmlPatterncompile	(const xmlChar *pattern,
-						 xmlDict *dict,
-						 int flags,
-						 const xmlChar **namespaces);
-XMLPUBFUN int XMLCALL
-			xmlPatternMatch		(xmlPatternPtr comp,
-						 xmlNodePtr node);
-
-/* streaming interfaces */
-typedef struct _xmlStreamCtxt xmlStreamCtxt;
-typedef xmlStreamCtxt *xmlStreamCtxtPtr;
-
-XMLPUBFUN int XMLCALL
-			xmlPatternStreamable	(xmlPatternPtr comp);
-XMLPUBFUN int XMLCALL
-			xmlPatternMaxDepth	(xmlPatternPtr comp);
-XMLPUBFUN int XMLCALL
-			xmlPatternMinDepth	(xmlPatternPtr comp);
-XMLPUBFUN int XMLCALL
-			xmlPatternFromRoot	(xmlPatternPtr comp);
-XMLPUBFUN xmlStreamCtxtPtr XMLCALL
-			xmlPatternGetStreamCtxt	(xmlPatternPtr comp);
-XMLPUBFUN void XMLCALL
-			xmlFreeStreamCtxt	(xmlStreamCtxtPtr stream);
-XMLPUBFUN int XMLCALL
-			xmlStreamPushNode	(xmlStreamCtxtPtr stream,
-						 const xmlChar *name,
-						 const xmlChar *ns,
-						 int nodeType);
-XMLPUBFUN int XMLCALL
-			xmlStreamPush		(xmlStreamCtxtPtr stream,
-						 const xmlChar *name,
-						 const xmlChar *ns);
-XMLPUBFUN int XMLCALL
-			xmlStreamPushAttr	(xmlStreamCtxtPtr stream,
-						 const xmlChar *name,
-						 const xmlChar *ns);
-XMLPUBFUN int XMLCALL
-			xmlStreamPop		(xmlStreamCtxtPtr stream);
-XMLPUBFUN int XMLCALL
-			xmlStreamWantsAnyNode	(xmlStreamCtxtPtr stream);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_PATTERN_ENABLED */
-
-#endif /* __XML_PATTERN_H__ */
diff --git a/interfaces/ext/libxml/relaxng.h b/interfaces/ext/libxml/relaxng.h
deleted file mode 100644
index d3e39e0..0000000
--- a/interfaces/ext/libxml/relaxng.h
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Summary: implementation of the Relax-NG validation
- * Description: implementation of the Relax-NG validation
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_RELAX_NG__
-#define __XML_RELAX_NG__
-
-#include <libxml/xmlversion.h>
-#include <libxml/hash.h>
-#include <libxml/xmlstring.h>
-
-#ifdef LIBXML_SCHEMAS_ENABLED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct _xmlRelaxNG xmlRelaxNG;
-typedef xmlRelaxNG *xmlRelaxNGPtr;
-
-
-/**
- * xmlRelaxNGValidityErrorFunc:
- * @ctx: the validation context
- * @msg: the message
- * @...: extra arguments
- *
- * Signature of an error callback from a Relax-NG validation
- */
-typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
-
-/**
- * xmlRelaxNGValidityWarningFunc:
- * @ctx: the validation context
- * @msg: the message
- * @...: extra arguments
- *
- * Signature of a warning callback from a Relax-NG validation
- */
-typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
-
-/**
- * A schemas validation context
- */
-typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
-typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
-
-typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt;
-typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr;
-
-/*
- * xmlRelaxNGValidErr:
- *
- * List of possible Relax NG validation errors
- */
-typedef enum {
-    XML_RELAXNG_OK = 0,
-    XML_RELAXNG_ERR_MEMORY,
-    XML_RELAXNG_ERR_TYPE,
-    XML_RELAXNG_ERR_TYPEVAL,
-    XML_RELAXNG_ERR_DUPID,
-    XML_RELAXNG_ERR_TYPECMP,
-    XML_RELAXNG_ERR_NOSTATE,
-    XML_RELAXNG_ERR_NODEFINE,
-    XML_RELAXNG_ERR_LISTEXTRA,
-    XML_RELAXNG_ERR_LISTEMPTY,
-    XML_RELAXNG_ERR_INTERNODATA,
-    XML_RELAXNG_ERR_INTERSEQ,
-    XML_RELAXNG_ERR_INTEREXTRA,
-    XML_RELAXNG_ERR_ELEMNAME,
-    XML_RELAXNG_ERR_ATTRNAME,
-    XML_RELAXNG_ERR_ELEMNONS,
-    XML_RELAXNG_ERR_ATTRNONS,
-    XML_RELAXNG_ERR_ELEMWRONGNS,
-    XML_RELAXNG_ERR_ATTRWRONGNS,
-    XML_RELAXNG_ERR_ELEMEXTRANS,
-    XML_RELAXNG_ERR_ATTREXTRANS,
-    XML_RELAXNG_ERR_ELEMNOTEMPTY,
-    XML_RELAXNG_ERR_NOELEM,
-    XML_RELAXNG_ERR_NOTELEM,
-    XML_RELAXNG_ERR_ATTRVALID,
-    XML_RELAXNG_ERR_CONTENTVALID,
-    XML_RELAXNG_ERR_EXTRACONTENT,
-    XML_RELAXNG_ERR_INVALIDATTR,
-    XML_RELAXNG_ERR_DATAELEM,
-    XML_RELAXNG_ERR_VALELEM,
-    XML_RELAXNG_ERR_LISTELEM,
-    XML_RELAXNG_ERR_DATATYPE,
-    XML_RELAXNG_ERR_VALUE,
-    XML_RELAXNG_ERR_LIST,
-    XML_RELAXNG_ERR_NOGRAMMAR,
-    XML_RELAXNG_ERR_EXTRADATA,
-    XML_RELAXNG_ERR_LACKDATA,
-    XML_RELAXNG_ERR_INTERNAL,
-    XML_RELAXNG_ERR_ELEMWRONG,
-    XML_RELAXNG_ERR_TEXTWRONG
-} xmlRelaxNGValidErr;
-
-/*
- * xmlRelaxNGParserFlags:
- *
- * List of possible Relax NG Parser flags
- */
-typedef enum {
-    XML_RELAXNGP_NONE = 0,
-    XML_RELAXNGP_FREE_DOC = 1,
-    XML_RELAXNGP_CRNG = 2
-} xmlRelaxNGParserFlag;
-
-XMLPUBFUN int XMLCALL
-		    xmlRelaxNGInitTypes		(void);
-XMLPUBFUN void XMLCALL
-		    xmlRelaxNGCleanupTypes	(void);
-
-/*
- * Interfaces for parsing.
- */
-XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
-		    xmlRelaxNGNewParserCtxt	(const char *URL);
-XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
-		    xmlRelaxNGNewMemParserCtxt	(const char *buffer,
-						 int size);
-XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
-		    xmlRelaxNGNewDocParserCtxt	(xmlDocPtr doc);
-
-XMLPUBFUN int XMLCALL
-		    xmlRelaxParserSetFlag	(xmlRelaxNGParserCtxtPtr ctxt,
-						 int flag);
-
-XMLPUBFUN void XMLCALL
-		    xmlRelaxNGFreeParserCtxt	(xmlRelaxNGParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
-		    xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
-					 xmlRelaxNGValidityErrorFunc err,
-					 xmlRelaxNGValidityWarningFunc warn,
-					 void *ctx);
-XMLPUBFUN int XMLCALL
-		    xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
-					 xmlRelaxNGValidityErrorFunc *err,
-					 xmlRelaxNGValidityWarningFunc *warn,
-					 void **ctx);
-XMLPUBFUN void XMLCALL
-		    xmlRelaxNGSetParserStructuredErrors(
-					 xmlRelaxNGParserCtxtPtr ctxt,
-					 xmlStructuredErrorFunc serror,
-					 void *ctx);
-XMLPUBFUN xmlRelaxNGPtr XMLCALL
-		    xmlRelaxNGParse		(xmlRelaxNGParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
-		    xmlRelaxNGFree		(xmlRelaxNGPtr schema);
-#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
-		    xmlRelaxNGDump		(FILE *output,
-					 xmlRelaxNGPtr schema);
-XMLPUBFUN void XMLCALL
-		    xmlRelaxNGDumpTree	(FILE * output,
-					 xmlRelaxNGPtr schema);
-#endif /* LIBXML_OUTPUT_ENABLED */
-/*
- * Interfaces for validating
- */
-XMLPUBFUN void XMLCALL
-		    xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
-					 xmlRelaxNGValidityErrorFunc err,
-					 xmlRelaxNGValidityWarningFunc warn,
-					 void *ctx);
-XMLPUBFUN int XMLCALL
-		    xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
-					 xmlRelaxNGValidityErrorFunc *err,
-					 xmlRelaxNGValidityWarningFunc *warn,
-					 void **ctx);
-XMLPUBFUN void XMLCALL
-			xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
-					  xmlStructuredErrorFunc serror, void *ctx);
-XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL
-		    xmlRelaxNGNewValidCtxt	(xmlRelaxNGPtr schema);
-XMLPUBFUN void XMLCALL
-		    xmlRelaxNGFreeValidCtxt	(xmlRelaxNGValidCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
-		    xmlRelaxNGValidateDoc	(xmlRelaxNGValidCtxtPtr ctxt,
-						 xmlDocPtr doc);
-/*
- * Interfaces for progressive validation when possible
- */
-XMLPUBFUN int XMLCALL
-		    xmlRelaxNGValidatePushElement	(xmlRelaxNGValidCtxtPtr ctxt,
-					 xmlDocPtr doc,
-					 xmlNodePtr elem);
-XMLPUBFUN int XMLCALL
-		    xmlRelaxNGValidatePushCData	(xmlRelaxNGValidCtxtPtr ctxt,
-					 const xmlChar *data,
-					 int len);
-XMLPUBFUN int XMLCALL
-		    xmlRelaxNGValidatePopElement	(xmlRelaxNGValidCtxtPtr ctxt,
-					 xmlDocPtr doc,
-					 xmlNodePtr elem);
-XMLPUBFUN int XMLCALL
-		    xmlRelaxNGValidateFullElement	(xmlRelaxNGValidCtxtPtr ctxt,
-					 xmlDocPtr doc,
-					 xmlNodePtr elem);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_SCHEMAS_ENABLED */
-
-#endif /* __XML_RELAX_NG__ */
diff --git a/interfaces/ext/libxml/schemasInternals.h b/interfaces/ext/libxml/schemasInternals.h
deleted file mode 100644
index b68a6e1..0000000
--- a/interfaces/ext/libxml/schemasInternals.h
+++ /dev/null
@@ -1,958 +0,0 @@
-/*
- * Summary: internal interfaces for XML Schemas
- * Description: internal interfaces for the XML Schemas handling
- *              and schema validity checking
- *		The Schemas development is a Work In Progress.
- *              Some of those interfaces are not garanteed to be API or ABI stable !
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-
-#ifndef __XML_SCHEMA_INTERNALS_H__
-#define __XML_SCHEMA_INTERNALS_H__
-
-#include <libxml/xmlversion.h>
-
-#ifdef LIBXML_SCHEMAS_ENABLED
-
-#include <libxml/xmlregexp.h>
-#include <libxml/hash.h>
-#include <libxml/dict.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
-    XML_SCHEMAS_UNKNOWN = 0,
-    XML_SCHEMAS_STRING,
-    XML_SCHEMAS_NORMSTRING,
-    XML_SCHEMAS_DECIMAL,
-    XML_SCHEMAS_TIME,
-    XML_SCHEMAS_GDAY,
-    XML_SCHEMAS_GMONTH,
-    XML_SCHEMAS_GMONTHDAY,
-    XML_SCHEMAS_GYEAR,
-    XML_SCHEMAS_GYEARMONTH,
-    XML_SCHEMAS_DATE,
-    XML_SCHEMAS_DATETIME,
-    XML_SCHEMAS_DURATION,
-    XML_SCHEMAS_FLOAT,
-    XML_SCHEMAS_DOUBLE,
-    XML_SCHEMAS_BOOLEAN,
-    XML_SCHEMAS_TOKEN,
-    XML_SCHEMAS_LANGUAGE,
-    XML_SCHEMAS_NMTOKEN,
-    XML_SCHEMAS_NMTOKENS,
-    XML_SCHEMAS_NAME,
-    XML_SCHEMAS_QNAME,
-    XML_SCHEMAS_NCNAME,
-    XML_SCHEMAS_ID,
-    XML_SCHEMAS_IDREF,
-    XML_SCHEMAS_IDREFS,
-    XML_SCHEMAS_ENTITY,
-    XML_SCHEMAS_ENTITIES,
-    XML_SCHEMAS_NOTATION,
-    XML_SCHEMAS_ANYURI,
-    XML_SCHEMAS_INTEGER,
-    XML_SCHEMAS_NPINTEGER,
-    XML_SCHEMAS_NINTEGER,
-    XML_SCHEMAS_NNINTEGER,
-    XML_SCHEMAS_PINTEGER,
-    XML_SCHEMAS_INT,
-    XML_SCHEMAS_UINT,
-    XML_SCHEMAS_LONG,
-    XML_SCHEMAS_ULONG,
-    XML_SCHEMAS_SHORT,
-    XML_SCHEMAS_USHORT,
-    XML_SCHEMAS_BYTE,
-    XML_SCHEMAS_UBYTE,
-    XML_SCHEMAS_HEXBINARY,
-    XML_SCHEMAS_BASE64BINARY,
-    XML_SCHEMAS_ANYTYPE,
-    XML_SCHEMAS_ANYSIMPLETYPE
-} xmlSchemaValType;
-
-/*
- * XML Schemas defines multiple type of types.
- */
-typedef enum {
-    XML_SCHEMA_TYPE_BASIC = 1, /* A built-in datatype */
-    XML_SCHEMA_TYPE_ANY,
-    XML_SCHEMA_TYPE_FACET,
-    XML_SCHEMA_TYPE_SIMPLE,
-    XML_SCHEMA_TYPE_COMPLEX,
-    XML_SCHEMA_TYPE_SEQUENCE = 6,
-    XML_SCHEMA_TYPE_CHOICE,
-    XML_SCHEMA_TYPE_ALL,
-    XML_SCHEMA_TYPE_SIMPLE_CONTENT,
-    XML_SCHEMA_TYPE_COMPLEX_CONTENT,
-    XML_SCHEMA_TYPE_UR,
-    XML_SCHEMA_TYPE_RESTRICTION,
-    XML_SCHEMA_TYPE_EXTENSION,
-    XML_SCHEMA_TYPE_ELEMENT,
-    XML_SCHEMA_TYPE_ATTRIBUTE,
-    XML_SCHEMA_TYPE_ATTRIBUTEGROUP,
-    XML_SCHEMA_TYPE_GROUP,
-    XML_SCHEMA_TYPE_NOTATION,
-    XML_SCHEMA_TYPE_LIST,
-    XML_SCHEMA_TYPE_UNION,
-    XML_SCHEMA_TYPE_ANY_ATTRIBUTE,
-    XML_SCHEMA_TYPE_IDC_UNIQUE,
-    XML_SCHEMA_TYPE_IDC_KEY,
-    XML_SCHEMA_TYPE_IDC_KEYREF,
-    XML_SCHEMA_TYPE_PARTICLE = 25, 
-    XML_SCHEMA_TYPE_ATTRIBUTE_USE, 
-    XML_SCHEMA_FACET_MININCLUSIVE = 1000,
-    XML_SCHEMA_FACET_MINEXCLUSIVE,
-    XML_SCHEMA_FACET_MAXINCLUSIVE,
-    XML_SCHEMA_FACET_MAXEXCLUSIVE,
-    XML_SCHEMA_FACET_TOTALDIGITS,
-    XML_SCHEMA_FACET_FRACTIONDIGITS,
-    XML_SCHEMA_FACET_PATTERN,
-    XML_SCHEMA_FACET_ENUMERATION,
-    XML_SCHEMA_FACET_WHITESPACE,
-    XML_SCHEMA_FACET_LENGTH,
-    XML_SCHEMA_FACET_MAXLENGTH,
-    XML_SCHEMA_FACET_MINLENGTH,
-    XML_SCHEMA_EXTRA_QNAMEREF = 2000,
-    XML_SCHEMA_EXTRA_ATTR_USE_PROHIB
-} xmlSchemaTypeType;
-
-typedef enum {
-    XML_SCHEMA_CONTENT_UNKNOWN = 0,
-    XML_SCHEMA_CONTENT_EMPTY = 1,
-    XML_SCHEMA_CONTENT_ELEMENTS,
-    XML_SCHEMA_CONTENT_MIXED,
-    XML_SCHEMA_CONTENT_SIMPLE,
-    XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */
-    XML_SCHEMA_CONTENT_BASIC,
-    XML_SCHEMA_CONTENT_ANY
-} xmlSchemaContentType;
-
-typedef struct _xmlSchemaVal xmlSchemaVal;
-typedef xmlSchemaVal *xmlSchemaValPtr;
-
-typedef struct _xmlSchemaType xmlSchemaType;
-typedef xmlSchemaType *xmlSchemaTypePtr;
-
-typedef struct _xmlSchemaFacet xmlSchemaFacet;
-typedef xmlSchemaFacet *xmlSchemaFacetPtr;
-
-/**
- * Annotation
- */
-typedef struct _xmlSchemaAnnot xmlSchemaAnnot;
-typedef xmlSchemaAnnot *xmlSchemaAnnotPtr;
-struct _xmlSchemaAnnot {
-    struct _xmlSchemaAnnot *next;
-    xmlNodePtr content;         /* the annotation */
-};
-
-/**
- * XML_SCHEMAS_ANYATTR_SKIP:
- *
- * Skip unknown attribute from validation
- * Obsolete, not used anymore.
- */
-#define XML_SCHEMAS_ANYATTR_SKIP        1
-/**
- * XML_SCHEMAS_ANYATTR_LAX:
- *
- * Ignore validation non definition on attributes
- * Obsolete, not used anymore.
- */
-#define XML_SCHEMAS_ANYATTR_LAX                2
-/**
- * XML_SCHEMAS_ANYATTR_STRICT:
- *
- * Apply strict validation rules on attributes
- * Obsolete, not used anymore.
- */
-#define XML_SCHEMAS_ANYATTR_STRICT        3
-/**
- * XML_SCHEMAS_ANY_SKIP:
- *
- * Skip unknown attribute from validation
- */
-#define XML_SCHEMAS_ANY_SKIP        1
-/**
- * XML_SCHEMAS_ANY_LAX:
- *
- * Used by wildcards.
- * Validate if type found, don't worry if not found
- */
-#define XML_SCHEMAS_ANY_LAX                2
-/**
- * XML_SCHEMAS_ANY_STRICT:
- *
- * Used by wildcards.
- * Apply strict validation rules
- */
-#define XML_SCHEMAS_ANY_STRICT        3
-/**
- * XML_SCHEMAS_ATTR_USE_PROHIBITED:
- *
- * Used by wildcards.
- * The attribute is prohibited.
- */
-#define XML_SCHEMAS_ATTR_USE_PROHIBITED 0
-/**
- * XML_SCHEMAS_ATTR_USE_REQUIRED:
- *
- * The attribute is required.
- */
-#define XML_SCHEMAS_ATTR_USE_REQUIRED 1
-/**
- * XML_SCHEMAS_ATTR_USE_OPTIONAL:
- *
- * The attribute is optional.
- */
-#define XML_SCHEMAS_ATTR_USE_OPTIONAL 2
-/**
- * XML_SCHEMAS_ATTR_GLOBAL:
- *
- * allow elements in no namespace
- */
-#define XML_SCHEMAS_ATTR_GLOBAL        1 << 0
-/**
- * XML_SCHEMAS_ATTR_NSDEFAULT:
- *
- * allow elements in no namespace
- */
-#define XML_SCHEMAS_ATTR_NSDEFAULT        1 << 7
-/**
- * XML_SCHEMAS_ATTR_INTERNAL_RESOLVED:
- *
- * this is set when the "type" and "ref" references
- * have been resolved.
- */
-#define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED        1 << 8
-/**
- * XML_SCHEMAS_ATTR_FIXED:
- *
- * the attribute has a fixed value
- */
-#define XML_SCHEMAS_ATTR_FIXED        1 << 9
-
-/**
- * xmlSchemaAttribute:
- * An attribute definition.
- */
-
-typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
-typedef xmlSchemaAttribute *xmlSchemaAttributePtr;
-struct _xmlSchemaAttribute {
-    xmlSchemaTypeType type;
-    struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */
-    const xmlChar *name; /* the name of the declaration */
-    const xmlChar *id; /* Deprecated; not used */
-    const xmlChar *ref; /* Deprecated; not used */
-    const xmlChar *refNs; /* Deprecated; not used */
-    const xmlChar *typeName; /* the local name of the type definition */
-    const xmlChar *typeNs; /* the ns URI of the type definition */
-    xmlSchemaAnnotPtr annot;
-
-    xmlSchemaTypePtr base; /* Deprecated; not used */
-    int occurs; /* Deprecated; not used */
-    const xmlChar *defValue; /* The initial value of the value constraint */
-    xmlSchemaTypePtr subtypes; /* the type definition */
-    xmlNodePtr node;
-    const xmlChar *targetNamespace;
-    int flags;
-    const xmlChar *refPrefix; /* Deprecated; not used */
-    xmlSchemaValPtr defVal; /* The compiled value constraint */
-    xmlSchemaAttributePtr refDecl; /* Deprecated; not used */
-};
-
-/**
- * xmlSchemaAttributeLink:
- * Used to build a list of attribute uses on complexType definitions.
- * WARNING: Deprecated; not used.
- */
-typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink;
-typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr;
-struct _xmlSchemaAttributeLink {
-    struct _xmlSchemaAttributeLink *next;/* the next attribute link ... */
-    struct _xmlSchemaAttribute *attr;/* the linked attribute */
-};
-
-/**
- * XML_SCHEMAS_WILDCARD_COMPLETE:
- *
- * If the wildcard is complete.
- */
-#define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0
-
-/**
- * xmlSchemaCharValueLink:
- * Used to build a list of namespaces on wildcards.
- */
-typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs;
-typedef xmlSchemaWildcardNs *xmlSchemaWildcardNsPtr;
-struct _xmlSchemaWildcardNs {
-    struct _xmlSchemaWildcardNs *next;/* the next constraint link ... */
-    const xmlChar *value;/* the value */
-};
-
-/**
- * xmlSchemaWildcard.
- * A wildcard.
- */
-typedef struct _xmlSchemaWildcard xmlSchemaWildcard;
-typedef xmlSchemaWildcard *xmlSchemaWildcardPtr;
-struct _xmlSchemaWildcard {
-    xmlSchemaTypeType type;        /* The kind of type */
-    const xmlChar *id; /* Deprecated; not used */
-    xmlSchemaAnnotPtr annot;
-    xmlNodePtr node;
-    int minOccurs; /* Deprecated; not used */
-    int maxOccurs; /* Deprecated; not used */
-    int processContents;
-    int any; /* Indicates if the ns constraint is of ##any */
-    xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */
-    xmlSchemaWildcardNsPtr negNsSet; /* The negated namespace */
-    int flags;
-};
-
-/**
- * XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED:
- *
- * The attribute wildcard has been already builded.
- */
-#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0
-/**
- * XML_SCHEMAS_ATTRGROUP_GLOBAL:
- *
- * The attribute wildcard has been already builded.
- */
-#define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1
-/**
- * XML_SCHEMAS_ATTRGROUP_MARKED:
- *
- * Marks the attr group as marked; used for circular checks.
- */
-#define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2
-
-/**
- * XML_SCHEMAS_ATTRGROUP_REDEFINED:
- *
- * The attr group was redefined.
- */
-#define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3
-/**
- * XML_SCHEMAS_ATTRGROUP_HAS_REFS:
- *
- * Whether this attr. group contains attr. group references.
- */
-#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4
-
-/**
- * An attribute group definition.
- *
- * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
- * must be kept similar
- */
-typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup;
-typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr;
-struct _xmlSchemaAttributeGroup {
-    xmlSchemaTypeType type;        /* The kind of type */
-    struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
-    const xmlChar *name;
-    const xmlChar *id;
-    const xmlChar *ref; /* Deprecated; not used */
-    const xmlChar *refNs; /* Deprecated; not used */
-    xmlSchemaAnnotPtr annot;
-
-    xmlSchemaAttributePtr attributes; /* Deprecated; not used */
-    xmlNodePtr node;
-    int flags;
-    xmlSchemaWildcardPtr attributeWildcard;
-    const xmlChar *refPrefix; /* Deprecated; not used */
-    xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */
-    const xmlChar *targetNamespace;
-    void *attrUses;
-};
-
-/**
- * xmlSchemaTypeLink:
- * Used to build a list of types (e.g. member types of
- * simpleType with variety "union").
- */
-typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink;
-typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr;
-struct _xmlSchemaTypeLink {
-    struct _xmlSchemaTypeLink *next;/* the next type link ... */
-    xmlSchemaTypePtr type;/* the linked type */
-};
-
-/**
- * xmlSchemaFacetLink:
- * Used to build a list of facets.
- */
-typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink;
-typedef xmlSchemaFacetLink *xmlSchemaFacetLinkPtr;
-struct _xmlSchemaFacetLink {
-    struct _xmlSchemaFacetLink *next;/* the next facet link ... */
-    xmlSchemaFacetPtr facet;/* the linked facet */
-};
-
-/**
- * XML_SCHEMAS_TYPE_MIXED:
- *
- * the element content type is mixed
- */
-#define XML_SCHEMAS_TYPE_MIXED                1 << 0
-/**
- * XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION:
- *
- * the simple or complex type has a derivation method of "extension".
- */
-#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION                1 << 1
-/**
- * XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION:
- *
- * the simple or complex type has a derivation method of "restriction".
- */
-#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION                1 << 2
-/**
- * XML_SCHEMAS_TYPE_GLOBAL:
- *
- * the type is global
- */
-#define XML_SCHEMAS_TYPE_GLOBAL                1 << 3
-/**
- * XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD:
- *
- * the complexType owns an attribute wildcard, i.e.
- * it can be freed by the complexType
- */
-#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD    1 << 4 /* Obsolete. */
-/**
- * XML_SCHEMAS_TYPE_VARIETY_ABSENT:
- *
- * the simpleType has a variety of "absent".
- * TODO: Actually not necessary :-/, since if
- * none of the variety flags occur then it's
- * automatically absent.
- */
-#define XML_SCHEMAS_TYPE_VARIETY_ABSENT    1 << 5
-/**
- * XML_SCHEMAS_TYPE_VARIETY_LIST:
- *
- * the simpleType has a variety of "list".
- */
-#define XML_SCHEMAS_TYPE_VARIETY_LIST    1 << 6
-/**
- * XML_SCHEMAS_TYPE_VARIETY_UNION:
- *
- * the simpleType has a variety of "union".
- */
-#define XML_SCHEMAS_TYPE_VARIETY_UNION    1 << 7
-/**
- * XML_SCHEMAS_TYPE_VARIETY_ATOMIC:
- *
- * the simpleType has a variety of "union".
- */
-#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC    1 << 8
-/**
- * XML_SCHEMAS_TYPE_FINAL_EXTENSION:
- *
- * the complexType has a final of "extension".
- */
-#define XML_SCHEMAS_TYPE_FINAL_EXTENSION    1 << 9
-/**
- * XML_SCHEMAS_TYPE_FINAL_RESTRICTION:
- *
- * the simpleType/complexType has a final of "restriction".
- */
-#define XML_SCHEMAS_TYPE_FINAL_RESTRICTION    1 << 10
-/**
- * XML_SCHEMAS_TYPE_FINAL_LIST:
- *
- * the simpleType has a final of "list".
- */
-#define XML_SCHEMAS_TYPE_FINAL_LIST    1 << 11
-/**
- * XML_SCHEMAS_TYPE_FINAL_UNION:
- *
- * the simpleType has a final of "union".
- */
-#define XML_SCHEMAS_TYPE_FINAL_UNION    1 << 12
-/**
- * XML_SCHEMAS_TYPE_FINAL_DEFAULT:
- *
- * the simpleType has a final of "default".
- */
-#define XML_SCHEMAS_TYPE_FINAL_DEFAULT    1 << 13
-/**
- * XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE:
- *
- * Marks the item as a builtin primitive.
- */
-#define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE    1 << 14
-/**
- * XML_SCHEMAS_TYPE_MARKED:
- *
- * Marks the item as marked; used for circular checks.
- */
-#define XML_SCHEMAS_TYPE_MARKED        1 << 16
-/**
- * XML_SCHEMAS_TYPE_BLOCK_DEFAULT:
- *
- * the complexType did not specify 'block' so use the default of the
- * <schema> item.
- */
-#define XML_SCHEMAS_TYPE_BLOCK_DEFAULT    1 << 17
-/**
- * XML_SCHEMAS_TYPE_BLOCK_EXTENSION:
- *
- * the complexType has a 'block' of "extension".
- */
-#define XML_SCHEMAS_TYPE_BLOCK_EXTENSION    1 << 18
-/**
- * XML_SCHEMAS_TYPE_BLOCK_RESTRICTION:
- *
- * the complexType has a 'block' of "restriction".
- */
-#define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION    1 << 19
-/**
- * XML_SCHEMAS_TYPE_ABSTRACT:
- *
- * the simple/complexType is abstract.
- */
-#define XML_SCHEMAS_TYPE_ABSTRACT    1 << 20
-/**
- * XML_SCHEMAS_TYPE_FACETSNEEDVALUE:
- *
- * indicates if the facets need a computed value
- */
-#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE    1 << 21
-/**
- * XML_SCHEMAS_TYPE_INTERNAL_RESOLVED:
- *
- * indicates that the type was typefixed
- */
-#define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED    1 << 22
-/**
- * XML_SCHEMAS_TYPE_INTERNAL_INVALID:
- *
- * indicates that the type is invalid
- */
-#define XML_SCHEMAS_TYPE_INTERNAL_INVALID    1 << 23
-/**
- * XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE:
- *
- * a whitespace-facet value of "preserve"
- */
-#define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE    1 << 24
-/**
- * XML_SCHEMAS_TYPE_WHITESPACE_REPLACE:
- *
- * a whitespace-facet value of "replace"
- */
-#define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE    1 << 25
-/**
- * XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE:
- *
- * a whitespace-facet value of "collapse"
- */
-#define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE    1 << 26
-/**
- * XML_SCHEMAS_TYPE_HAS_FACETS:
- *
- * has facets
- */
-#define XML_SCHEMAS_TYPE_HAS_FACETS    1 << 27
-/**
- * XML_SCHEMAS_TYPE_NORMVALUENEEDED:
- *
- * indicates if the facets (pattern) need a normalized value
- */
-#define XML_SCHEMAS_TYPE_NORMVALUENEEDED    1 << 28
-
-/**
- * XML_SCHEMAS_TYPE_FIXUP_1:
- *
- * First stage of fixup was done.
- */
-#define XML_SCHEMAS_TYPE_FIXUP_1    1 << 29
-
-/**
- * XML_SCHEMAS_TYPE_REDEFINED:
- *
- * The type was redefined.
- */
-#define XML_SCHEMAS_TYPE_REDEFINED    1 << 30
-/**
- * XML_SCHEMAS_TYPE_REDEFINING:
- *
- * The type redefines an other type.
- */
-/* #define XML_SCHEMAS_TYPE_REDEFINING    1 << 31 */
-
-/**
- * _xmlSchemaType:
- *
- * Schemas type definition.
- */
-struct _xmlSchemaType {
-    xmlSchemaTypeType type; /* The kind of type */
-    struct _xmlSchemaType *next; /* the next type if in a sequence ... */
-    const xmlChar *name;
-    const xmlChar *id ; /* Deprecated; not used */
-    const xmlChar *ref; /* Deprecated; not used */
-    const xmlChar *refNs; /* Deprecated; not used */
-    xmlSchemaAnnotPtr annot;
-    xmlSchemaTypePtr subtypes;
-    xmlSchemaAttributePtr attributes; /* Deprecated; not used */
-    xmlNodePtr node;
-    int minOccurs; /* Deprecated; not used */
-    int maxOccurs; /* Deprecated; not used */
-
-    int flags;
-    xmlSchemaContentType contentType;
-    const xmlChar *base; /* Base type's local name */
-    const xmlChar *baseNs; /* Base type's target namespace */
-    xmlSchemaTypePtr baseType; /* The base type component */
-    xmlSchemaFacetPtr facets; /* Local facets */
-    struct _xmlSchemaType *redef; /* Deprecated; not used */
-    int recurse; /* Obsolete */
-    xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */
-    xmlSchemaWildcardPtr attributeWildcard;
-    int builtInType; /* Type of built-in types. */
-    xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */
-    xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */
-    const xmlChar *refPrefix; /* Deprecated; not used */
-    xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types.
-                                        Could we use @subtypes for this? */
-    xmlRegexpPtr contModel; /* Holds the automaton of the content model */
-    const xmlChar *targetNamespace;
-    void *attrUses;
-};
-
-/*
- * xmlSchemaElement:
- * An element definition.
- *
- * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of
- * structures must be kept similar
- */
-/**
- * XML_SCHEMAS_ELEM_NILLABLE:
- *
- * the element is nillable
- */
-#define XML_SCHEMAS_ELEM_NILLABLE        1 << 0
-/**
- * XML_SCHEMAS_ELEM_GLOBAL:
- *
- * the element is global
- */
-#define XML_SCHEMAS_ELEM_GLOBAL                1 << 1
-/**
- * XML_SCHEMAS_ELEM_DEFAULT:
- *
- * the element has a default value
- */
-#define XML_SCHEMAS_ELEM_DEFAULT        1 << 2
-/**
- * XML_SCHEMAS_ELEM_FIXED:
- *
- * the element has a fixed value
- */
-#define XML_SCHEMAS_ELEM_FIXED                1 << 3
-/**
- * XML_SCHEMAS_ELEM_ABSTRACT:
- *
- * the element is abstract
- */
-#define XML_SCHEMAS_ELEM_ABSTRACT        1 << 4
-/**
- * XML_SCHEMAS_ELEM_TOPLEVEL:
- *
- * the element is top level
- * obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead
- */
-#define XML_SCHEMAS_ELEM_TOPLEVEL        1 << 5
-/**
- * XML_SCHEMAS_ELEM_REF:
- *
- * the element is a reference to a type
- */
-#define XML_SCHEMAS_ELEM_REF                1 << 6
-/**
- * XML_SCHEMAS_ELEM_NSDEFAULT:
- *
- * allow elements in no namespace
- * Obsolete, not used anymore.
- */
-#define XML_SCHEMAS_ELEM_NSDEFAULT        1 << 7
-/**
- * XML_SCHEMAS_ELEM_INTERNAL_RESOLVED:
- *
- * this is set when "type", "ref", "substitutionGroup"
- * references have been resolved.
- */
-#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED        1 << 8
- /**
- * XML_SCHEMAS_ELEM_CIRCULAR:
- *
- * a helper flag for the search of circular references.
- */
-#define XML_SCHEMAS_ELEM_CIRCULAR        1 << 9
-/**
- * XML_SCHEMAS_ELEM_BLOCK_ABSENT:
- *
- * the "block" attribute is absent
- */
-#define XML_SCHEMAS_ELEM_BLOCK_ABSENT        1 << 10
-/**
- * XML_SCHEMAS_ELEM_BLOCK_EXTENSION:
- *
- * disallowed substitutions are absent
- */
-#define XML_SCHEMAS_ELEM_BLOCK_EXTENSION        1 << 11
-/**
- * XML_SCHEMAS_ELEM_BLOCK_RESTRICTION:
- *
- * disallowed substitutions: "restriction"
- */
-#define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION        1 << 12
-/**
- * XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION:
- *
- * disallowed substitutions: "substituion"
- */
-#define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION        1 << 13
-/**
- * XML_SCHEMAS_ELEM_FINAL_ABSENT:
- *
- * substitution group exclusions are absent
- */
-#define XML_SCHEMAS_ELEM_FINAL_ABSENT        1 << 14
-/**
- * XML_SCHEMAS_ELEM_FINAL_EXTENSION:
- *
- * substitution group exclusions: "extension"
- */
-#define XML_SCHEMAS_ELEM_FINAL_EXTENSION        1 << 15
-/**
- * XML_SCHEMAS_ELEM_FINAL_RESTRICTION:
- *
- * substitution group exclusions: "restriction"
- */
-#define XML_SCHEMAS_ELEM_FINAL_RESTRICTION        1 << 16
-/**
- * XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD:
- *
- * the declaration is a substitution group head
- */
-#define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD        1 << 17
-/**
- * XML_SCHEMAS_ELEM_INTERNAL_CHECKED:
- *
- * this is set when the elem decl has been checked against
- * all constraints
- */
-#define XML_SCHEMAS_ELEM_INTERNAL_CHECKED        1 << 18
-
-typedef struct _xmlSchemaElement xmlSchemaElement;
-typedef xmlSchemaElement *xmlSchemaElementPtr;
-struct _xmlSchemaElement {
-    xmlSchemaTypeType type; /* The kind of type */
-    struct _xmlSchemaType *next; /* Not used? */
-    const xmlChar *name;
-    const xmlChar *id; /* Deprecated; not used */
-    const xmlChar *ref; /* Deprecated; not used */
-    const xmlChar *refNs; /* Deprecated; not used */
-    xmlSchemaAnnotPtr annot;
-    xmlSchemaTypePtr subtypes; /* the type definition */
-    xmlSchemaAttributePtr attributes;
-    xmlNodePtr node;
-    int minOccurs; /* Deprecated; not used */
-    int maxOccurs; /* Deprecated; not used */
-
-    int flags;
-    const xmlChar *targetNamespace;
-    const xmlChar *namedType;
-    const xmlChar *namedTypeNs;
-    const xmlChar *substGroup;
-    const xmlChar *substGroupNs;
-    const xmlChar *scope;
-    const xmlChar *value; /* The original value of the value constraint. */
-    struct _xmlSchemaElement *refDecl; /* This will now be used for the
-                                          substitution group affiliation */
-    xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */
-    xmlSchemaContentType contentType;
-    const xmlChar *refPrefix; /* Deprecated; not used */
-    xmlSchemaValPtr defVal; /* The compiled value contraint. */
-    void *idcs; /* The identity-constraint defs */
-};
-
-/*
- * XML_SCHEMAS_FACET_UNKNOWN:
- *
- * unknown facet handling
- */
-#define XML_SCHEMAS_FACET_UNKNOWN        0
-/*
- * XML_SCHEMAS_FACET_PRESERVE:
- *
- * preserve the type of the facet
- */
-#define XML_SCHEMAS_FACET_PRESERVE        1
-/*
- * XML_SCHEMAS_FACET_REPLACE:
- *
- * replace the type of the facet
- */
-#define XML_SCHEMAS_FACET_REPLACE        2
-/*
- * XML_SCHEMAS_FACET_COLLAPSE:
- *
- * collapse the types of the facet
- */
-#define XML_SCHEMAS_FACET_COLLAPSE        3
-/**
- * A facet definition.
- */
-struct _xmlSchemaFacet {
-    xmlSchemaTypeType type;        /* The kind of type */
-    struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */
-    const xmlChar *value; /* The original value */
-    const xmlChar *id; /* Obsolete */
-    xmlSchemaAnnotPtr annot;
-    xmlNodePtr node;
-    int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */
-    int whitespace;
-    xmlSchemaValPtr val; /* The compiled value */
-    xmlRegexpPtr    regexp; /* The regex for patterns */
-};
-
-/**
- * A notation definition.
- */
-typedef struct _xmlSchemaNotation xmlSchemaNotation;
-typedef xmlSchemaNotation *xmlSchemaNotationPtr;
-struct _xmlSchemaNotation {
-    xmlSchemaTypeType type; /* The kind of type */
-    const xmlChar *name;
-    xmlSchemaAnnotPtr annot;
-    const xmlChar *identifier;
-    const xmlChar *targetNamespace;
-};
-
-/*
-* TODO: Actually all those flags used for the schema should sit
-* on the schema parser context, since they are used only
-* during parsing an XML schema document, and not available
-* on the component level as per spec.
-*/
-/**
- * XML_SCHEMAS_QUALIF_ELEM:
- *
- * Reflects elementFormDefault == qualified in
- * an XML schema document.
- */
-#define XML_SCHEMAS_QUALIF_ELEM                1 << 0
-/**
- * XML_SCHEMAS_QUALIF_ATTR:
- *
- * Reflects attributeFormDefault == qualified in
- * an XML schema document.
- */
-#define XML_SCHEMAS_QUALIF_ATTR            1 << 1
-/**
- * XML_SCHEMAS_FINAL_DEFAULT_EXTENSION:
- *
- * the schema has "extension" in the set of finalDefault.
- */
-#define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION        1 << 2
-/**
- * XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION:
- *
- * the schema has "restriction" in the set of finalDefault.
- */
-#define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION            1 << 3
-/**
- * XML_SCHEMAS_FINAL_DEFAULT_LIST:
- *
- * the cshema has "list" in the set of finalDefault.
- */
-#define XML_SCHEMAS_FINAL_DEFAULT_LIST            1 << 4
-/**
- * XML_SCHEMAS_FINAL_DEFAULT_UNION:
- *
- * the schema has "union" in the set of finalDefault.
- */
-#define XML_SCHEMAS_FINAL_DEFAULT_UNION            1 << 5
-/**
- * XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION:
- *
- * the schema has "extension" in the set of blockDefault.
- */
-#define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION            1 << 6
-/**
- * XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION:
- *
- * the schema has "restriction" in the set of blockDefault.
- */
-#define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION            1 << 7
-/**
- * XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION:
- *
- * the schema has "substitution" in the set of blockDefault.
- */
-#define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION            1 << 8
-/**
- * XML_SCHEMAS_INCLUDING_CONVERT_NS:
- *
- * the schema is currently including an other schema with
- * no target namespace.
- */
-#define XML_SCHEMAS_INCLUDING_CONVERT_NS            1 << 9
-/**
- * _xmlSchema:
- *
- * A Schemas definition
- */
-struct _xmlSchema {
-    const xmlChar *name; /* schema name */
-    const xmlChar *targetNamespace; /* the target namespace */
-    const xmlChar *version;
-    const xmlChar *id; /* Obsolete */
-    xmlDocPtr doc;
-    xmlSchemaAnnotPtr annot;
-    int flags;
-
-    xmlHashTablePtr typeDecl;
-    xmlHashTablePtr attrDecl;
-    xmlHashTablePtr attrgrpDecl;
-    xmlHashTablePtr elemDecl;
-    xmlHashTablePtr notaDecl;
-
-    xmlHashTablePtr schemasImports;
-
-    void *_private;        /* unused by the library for users or bindings */
-    xmlHashTablePtr groupDecl;
-    xmlDictPtr      dict;
-    void *includes;     /* the includes, this is opaque for now */
-    int preserve;        /* whether to free the document */
-    int counter; /* used to give ononymous components unique names */
-    xmlHashTablePtr idcDef; /* All identity-constraint defs. */
-    void *volatiles; /* Obsolete */
-};
-
-XMLPUBFUN void XMLCALL         xmlSchemaFreeType        (xmlSchemaTypePtr type);
-XMLPUBFUN void XMLCALL         xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_SCHEMAS_ENABLED */
-#endif /* __XML_SCHEMA_INTERNALS_H__ */
diff --git a/interfaces/ext/libxml/schematron.h b/interfaces/ext/libxml/schematron.h
deleted file mode 100644
index f442826..0000000
--- a/interfaces/ext/libxml/schematron.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Summary: XML Schemastron implementation
- * Description: interface to the XML Schematron validity checking.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-
-#ifndef __XML_SCHEMATRON_H__
-#define __XML_SCHEMATRON_H__
-
-#include <libxml/xmlversion.h>
-
-#ifdef LIBXML_SCHEMATRON_ENABLED
-
-#include <libxml/tree.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
-    XML_SCHEMATRON_OUT_QUIET = 1 << 0,	/* quiet no report */
-    XML_SCHEMATRON_OUT_TEXT = 1 << 1,	/* build a textual report */
-    XML_SCHEMATRON_OUT_XML = 1 << 2,	/* output SVRL */
-    XML_SCHEMATRON_OUT_ERROR = 1 << 3,  /* output via xmlStructuredErrorFunc */
-    XML_SCHEMATRON_OUT_FILE = 1 << 8,	/* output to a file descriptor */
-    XML_SCHEMATRON_OUT_BUFFER = 1 << 9,	/* output to a buffer */
-    XML_SCHEMATRON_OUT_IO = 1 << 10	/* output to I/O mechanism */
-} xmlSchematronValidOptions;
-
-/**
- * The schemas related types are kept internal
- */
-typedef struct _xmlSchematron xmlSchematron;
-typedef xmlSchematron *xmlSchematronPtr;
-
-/**
- * xmlSchematronValidityErrorFunc:
- * @ctx: the validation context
- * @msg: the message
- * @...: extra arguments
- *
- * Signature of an error callback from a Schematron validation
- */
-typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
-
-/**
- * xmlSchematronValidityWarningFunc:
- * @ctx: the validation context
- * @msg: the message
- * @...: extra arguments
- *
- * Signature of a warning callback from a Schematron validation
- */
-typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
-
-/**
- * A schemas validation context
- */
-typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
-typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
-
-typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
-typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
-
-/*
- * Interfaces for parsing.
- */
-XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL 
-	    xmlSchematronNewParserCtxt	(const char *URL);
-XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL 
-	    xmlSchematronNewMemParserCtxt(const char *buffer,
-					 int size);
-XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
-	    xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
-XMLPUBFUN void XMLCALL		
-	    xmlSchematronFreeParserCtxt	(xmlSchematronParserCtxtPtr ctxt);
-/*****
-XMLPUBFUN void XMLCALL		
-	    xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
-					 xmlSchematronValidityErrorFunc err,
-					 xmlSchematronValidityWarningFunc warn,
-					 void *ctx);
-XMLPUBFUN int XMLCALL
-		xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
-					xmlSchematronValidityErrorFunc * err,
-					xmlSchematronValidityWarningFunc * warn,
-					void **ctx);
-XMLPUBFUN int XMLCALL
-		xmlSchematronIsValid	(xmlSchematronValidCtxtPtr ctxt);
- *****/
-XMLPUBFUN xmlSchematronPtr XMLCALL	
-	    xmlSchematronParse		(xmlSchematronParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL		
-	    xmlSchematronFree		(xmlSchematronPtr schema);
-/*
- * Interfaces for validating
- */
-XMLPUBFUN void XMLCALL
-	    xmlSchematronSetValidStructuredErrors(
-	                                  xmlSchematronValidCtxtPtr ctxt,
-					  xmlStructuredErrorFunc serror,
-					  void *ctx);
-/******
-XMLPUBFUN void XMLCALL		
-	    xmlSchematronSetValidErrors	(xmlSchematronValidCtxtPtr ctxt,
-					 xmlSchematronValidityErrorFunc err,
-					 xmlSchematronValidityWarningFunc warn,
-					 void *ctx);
-XMLPUBFUN int XMLCALL
-	    xmlSchematronGetValidErrors	(xmlSchematronValidCtxtPtr ctxt,
-					 xmlSchematronValidityErrorFunc *err,
-					 xmlSchematronValidityWarningFunc *warn,
-					 void **ctx);
-XMLPUBFUN int XMLCALL
-	    xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
-					 int options);
-XMLPUBFUN int XMLCALL
-	    xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
-            xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
-			                 xmlNodePtr elem);
- *******/
-
-XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL	
-	    xmlSchematronNewValidCtxt	(xmlSchematronPtr schema,
-	    				 int options);
-XMLPUBFUN void XMLCALL			
-	    xmlSchematronFreeValidCtxt	(xmlSchematronValidCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL			
-	    xmlSchematronValidateDoc	(xmlSchematronValidCtxtPtr ctxt,
-					 xmlDocPtr instance);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_SCHEMATRON_ENABLED */
-#endif /* __XML_SCHEMATRON_H__ */
diff --git a/interfaces/ext/libxml/threads.h b/interfaces/ext/libxml/threads.h
deleted file mode 100644
index d31f16a..0000000
--- a/interfaces/ext/libxml/threads.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Summary: interfaces for thread handling
- * Description: set of generic threading related routines
- *              should work with pthreads, Windows native or TLS threads
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_THREADS_H__
-#define __XML_THREADS_H__
-
-#include <libxml/xmlversion.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * xmlMutex are a simple mutual exception locks.
- */
-typedef struct _xmlMutex xmlMutex;
-typedef xmlMutex *xmlMutexPtr;
-
-/*
- * xmlRMutex are reentrant mutual exception locks.
- */
-typedef struct _xmlRMutex xmlRMutex;
-typedef xmlRMutex *xmlRMutexPtr;
-
-#ifdef __cplusplus
-}
-#endif
-#include <libxml/globals.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-XMLPUBFUN xmlMutexPtr XMLCALL
-			xmlNewMutex	(void);
-XMLPUBFUN void XMLCALL
-			xmlMutexLock	(xmlMutexPtr tok);
-XMLPUBFUN void XMLCALL
-			xmlMutexUnlock	(xmlMutexPtr tok);
-XMLPUBFUN void XMLCALL
-			xmlFreeMutex	(xmlMutexPtr tok);
-
-XMLPUBFUN xmlRMutexPtr XMLCALL
-			xmlNewRMutex	(void);
-XMLPUBFUN void XMLCALL
-			xmlRMutexLock	(xmlRMutexPtr tok);
-XMLPUBFUN void XMLCALL
-			xmlRMutexUnlock	(xmlRMutexPtr tok);
-XMLPUBFUN void XMLCALL
-			xmlFreeRMutex	(xmlRMutexPtr tok);
-
-/*
- * Library wide APIs.
- */
-XMLPUBFUN void XMLCALL
-			xmlInitThreads	(void);
-XMLPUBFUN void XMLCALL
-			xmlLockLibrary	(void);
-XMLPUBFUN void XMLCALL
-			xmlUnlockLibrary(void);
-XMLPUBFUN int XMLCALL
-			xmlGetThreadId	(void);
-XMLPUBFUN int XMLCALL
-			xmlIsMainThread	(void);
-XMLPUBFUN void XMLCALL
-			xmlCleanupThreads(void);
-XMLPUBFUN xmlGlobalStatePtr XMLCALL
-			xmlGetGlobalState(void);
-
-#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && defined(LIBXML_STATIC_FOR_DLL)
-int XMLCALL xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __XML_THREADS_H__ */
diff --git a/interfaces/ext/libxml/tree.h b/interfaces/ext/libxml/tree.h
deleted file mode 100644
index b733589..0000000
--- a/interfaces/ext/libxml/tree.h
+++ /dev/null
@@ -1,1252 +0,0 @@
-/*
- * Summary: interfaces for tree manipulation
- * Description: this module describes the structures found in an tree resulting
- *              from an XML or HTML parsing, as well as the API provided for
- *              various processing on that tree
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_TREE_H__
-#define __XML_TREE_H__
-
-#include <stdio.h>
-#include <libxml/xmlversion.h>
-#include <libxml/xmlstring.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Some of the basic types pointer to structures:
- */
-/* xmlIO.h */
-typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
-typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
-
-typedef struct _xmlOutputBuffer xmlOutputBuffer;
-typedef xmlOutputBuffer *xmlOutputBufferPtr;
-
-/* parser.h */
-typedef struct _xmlParserInput xmlParserInput;
-typedef xmlParserInput *xmlParserInputPtr;
-
-typedef struct _xmlParserCtxt xmlParserCtxt;
-typedef xmlParserCtxt *xmlParserCtxtPtr;
-
-typedef struct _xmlSAXLocator xmlSAXLocator;
-typedef xmlSAXLocator *xmlSAXLocatorPtr;
-
-typedef struct _xmlSAXHandler xmlSAXHandler;
-typedef xmlSAXHandler *xmlSAXHandlerPtr;
-
-/* entities.h */
-typedef struct _xmlEntity xmlEntity;
-typedef xmlEntity *xmlEntityPtr;
-
-/**
- * BASE_BUFFER_SIZE:
- *
- * default buffer size 4000.
- */
-#define BASE_BUFFER_SIZE 4096
-
-/**
- * LIBXML_NAMESPACE_DICT:
- *
- * Defines experimental behaviour:
- * 1) xmlNs gets an additional field @context (a xmlDoc)
- * 2) when creating a tree, xmlNs->href is stored in the dict of xmlDoc.
- */
-/* #define LIBXML_NAMESPACE_DICT */
-
-/**
- * xmlBufferAllocationScheme:
- *
- * A buffer allocation scheme can be defined to either match exactly the
- * need or double it's allocated size each time it is found too small.
- */
-
-typedef enum {
-    XML_BUFFER_ALLOC_DOUBLEIT,	/* double each time one need to grow */
-    XML_BUFFER_ALLOC_EXACT,	/* grow only to the minimal size */
-    XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */
-    XML_BUFFER_ALLOC_IO		/* special allocation scheme used for I/O */
-} xmlBufferAllocationScheme;
-
-/**
- * xmlBuffer:
- *
- * A buffer structure.
- */
-typedef struct _xmlBuffer xmlBuffer;
-typedef xmlBuffer *xmlBufferPtr;
-struct _xmlBuffer {
-    xmlChar *content;		/* The buffer content UTF8 */
-    unsigned int use;		/* The buffer size used */
-    unsigned int size;		/* The buffer size */
-    xmlBufferAllocationScheme alloc; /* The realloc method */
-    xmlChar *contentIO;		/* in IO mode we may have a different base */
-};
-
-/**
- * XML_XML_NAMESPACE:
- *
- * This is the namespace for the special xml: prefix predefined in the
- * XML Namespace specification.
- */
-#define XML_XML_NAMESPACE \
-    (const xmlChar *) "http://www.w3.org/XML/1998/namespace"
-
-/**
- * XML_XML_ID:
- *
- * This is the name for the special xml:id attribute
- */
-#define XML_XML_ID (const xmlChar *) "xml:id"
-
-/*
- * The different element types carried by an XML tree.
- *
- * NOTE: This is synchronized with DOM Level1 values
- *       See http://www.w3.org/TR/REC-DOM-Level-1/
- *
- * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
- * be deprecated to use an XML_DTD_NODE.
- */
-typedef enum {
-    XML_ELEMENT_NODE=		1,
-    XML_ATTRIBUTE_NODE=		2,
-    XML_TEXT_NODE=		3,
-    XML_CDATA_SECTION_NODE=	4,
-    XML_ENTITY_REF_NODE=	5,
-    XML_ENTITY_NODE=		6,
-    XML_PI_NODE=		7,
-    XML_COMMENT_NODE=		8,
-    XML_DOCUMENT_NODE=		9,
-    XML_DOCUMENT_TYPE_NODE=	10,
-    XML_DOCUMENT_FRAG_NODE=	11,
-    XML_NOTATION_NODE=		12,
-    XML_HTML_DOCUMENT_NODE=	13,
-    XML_DTD_NODE=		14,
-    XML_ELEMENT_DECL=		15,
-    XML_ATTRIBUTE_DECL=		16,
-    XML_ENTITY_DECL=		17,
-    XML_NAMESPACE_DECL=		18,
-    XML_XINCLUDE_START=		19,
-    XML_XINCLUDE_END=		20
-#ifdef LIBXML_DOCB_ENABLED
-   ,XML_DOCB_DOCUMENT_NODE=	21
-#endif
-} xmlElementType;
-
-
-/**
- * xmlNotation:
- *
- * A DTD Notation definition.
- */
-
-typedef struct _xmlNotation xmlNotation;
-typedef xmlNotation *xmlNotationPtr;
-struct _xmlNotation {
-    const xmlChar               *name;	        /* Notation name */
-    const xmlChar               *PublicID;	/* Public identifier, if any */
-    const xmlChar               *SystemID;	/* System identifier, if any */
-};
-
-/**
- * xmlAttributeType:
- *
- * A DTD Attribute type definition.
- */
-
-typedef enum {
-    XML_ATTRIBUTE_CDATA = 1,
-    XML_ATTRIBUTE_ID,
-    XML_ATTRIBUTE_IDREF	,
-    XML_ATTRIBUTE_IDREFS,
-    XML_ATTRIBUTE_ENTITY,
-    XML_ATTRIBUTE_ENTITIES,
-    XML_ATTRIBUTE_NMTOKEN,
-    XML_ATTRIBUTE_NMTOKENS,
-    XML_ATTRIBUTE_ENUMERATION,
-    XML_ATTRIBUTE_NOTATION
-} xmlAttributeType;
-
-/**
- * xmlAttributeDefault:
- *
- * A DTD Attribute default definition.
- */
-
-typedef enum {
-    XML_ATTRIBUTE_NONE = 1,
-    XML_ATTRIBUTE_REQUIRED,
-    XML_ATTRIBUTE_IMPLIED,
-    XML_ATTRIBUTE_FIXED
-} xmlAttributeDefault;
-
-/**
- * xmlEnumeration:
- *
- * List structure used when there is an enumeration in DTDs.
- */
-
-typedef struct _xmlEnumeration xmlEnumeration;
-typedef xmlEnumeration *xmlEnumerationPtr;
-struct _xmlEnumeration {
-    struct _xmlEnumeration    *next;	/* next one */
-    const xmlChar            *name;	/* Enumeration name */
-};
-
-/**
- * xmlAttribute:
- *
- * An Attribute declaration in a DTD.
- */
-
-typedef struct _xmlAttribute xmlAttribute;
-typedef xmlAttribute *xmlAttributePtr;
-struct _xmlAttribute {
-    void           *_private;	        /* application data */
-    xmlElementType          type;       /* XML_ATTRIBUTE_DECL, must be second ! */
-    const xmlChar          *name;	/* Attribute name */
-    struct _xmlNode    *children;	/* NULL */
-    struct _xmlNode        *last;	/* NULL */
-    struct _xmlDtd       *parent;	/* -> DTD */
-    struct _xmlNode        *next;	/* next sibling link  */
-    struct _xmlNode        *prev;	/* previous sibling link  */
-    struct _xmlDoc          *doc;       /* the containing document */
-
-    struct _xmlAttribute  *nexth;	/* next in hash table */
-    xmlAttributeType       atype;	/* The attribute type */
-    xmlAttributeDefault      def;	/* the default */
-    const xmlChar  *defaultValue;	/* or the default value */
-    xmlEnumerationPtr       tree;       /* or the enumeration tree if any */
-    const xmlChar        *prefix;	/* the namespace prefix if any */
-    const xmlChar          *elem;	/* Element holding the attribute */
-};
-
-/**
- * xmlElementContentType:
- *
- * Possible definitions of element content types.
- */
-typedef enum {
-    XML_ELEMENT_CONTENT_PCDATA = 1,
-    XML_ELEMENT_CONTENT_ELEMENT,
-    XML_ELEMENT_CONTENT_SEQ,
-    XML_ELEMENT_CONTENT_OR
-} xmlElementContentType;
-
-/**
- * xmlElementContentOccur:
- *
- * Possible definitions of element content occurrences.
- */
-typedef enum {
-    XML_ELEMENT_CONTENT_ONCE = 1,
-    XML_ELEMENT_CONTENT_OPT,
-    XML_ELEMENT_CONTENT_MULT,
-    XML_ELEMENT_CONTENT_PLUS
-} xmlElementContentOccur;
-
-/**
- * xmlElementContent:
- *
- * An XML Element content as stored after parsing an element definition
- * in a DTD.
- */
-
-typedef struct _xmlElementContent xmlElementContent;
-typedef xmlElementContent *xmlElementContentPtr;
-struct _xmlElementContent {
-    xmlElementContentType     type;	/* PCDATA, ELEMENT, SEQ or OR */
-    xmlElementContentOccur    ocur;	/* ONCE, OPT, MULT or PLUS */
-    const xmlChar             *name;	/* Element name */
-    struct _xmlElementContent *c1;	/* first child */
-    struct _xmlElementContent *c2;	/* second child */
-    struct _xmlElementContent *parent;	/* parent */
-    const xmlChar             *prefix;	/* Namespace prefix */
-};
-
-/**
- * xmlElementTypeVal:
- *
- * The different possibilities for an element content type.
- */
-
-typedef enum {
-    XML_ELEMENT_TYPE_UNDEFINED = 0,
-    XML_ELEMENT_TYPE_EMPTY = 1,
-    XML_ELEMENT_TYPE_ANY,
-    XML_ELEMENT_TYPE_MIXED,
-    XML_ELEMENT_TYPE_ELEMENT
-} xmlElementTypeVal;
-
-#ifdef __cplusplus
-}
-#endif
-#include <libxml/xmlregexp.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * xmlElement:
- *
- * An XML Element declaration from a DTD.
- */
-
-typedef struct _xmlElement xmlElement;
-typedef xmlElement *xmlElementPtr;
-struct _xmlElement {
-    void           *_private;	        /* application data */
-    xmlElementType          type;       /* XML_ELEMENT_DECL, must be second ! */
-    const xmlChar          *name;	/* Element name */
-    struct _xmlNode    *children;	/* NULL */
-    struct _xmlNode        *last;	/* NULL */
-    struct _xmlDtd       *parent;	/* -> DTD */
-    struct _xmlNode        *next;	/* next sibling link  */
-    struct _xmlNode        *prev;	/* previous sibling link  */
-    struct _xmlDoc          *doc;       /* the containing document */
-
-    xmlElementTypeVal      etype;	/* The type */
-    xmlElementContentPtr content;	/* the allowed element content */
-    xmlAttributePtr   attributes;	/* List of the declared attributes */
-    const xmlChar        *prefix;	/* the namespace prefix if any */
-#ifdef LIBXML_REGEXP_ENABLED
-    xmlRegexpPtr       contModel;	/* the validating regexp */
-#else
-    void	      *contModel;
-#endif
-};
-
-
-/**
- * XML_LOCAL_NAMESPACE:
- *
- * A namespace declaration node.
- */
-#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
-typedef xmlElementType xmlNsType;
-
-/**
- * xmlNs:
- *
- * An XML namespace.
- * Note that prefix == NULL is valid, it defines the default namespace
- * within the subtree (until overridden).
- *
- * xmlNsType is unified with xmlElementType.
- */
-
-typedef struct _xmlNs xmlNs;
-typedef xmlNs *xmlNsPtr;
-struct _xmlNs {
-    struct _xmlNs  *next;	/* next Ns link for this node  */
-    xmlNsType      type;	/* global or local */
-    const xmlChar *href;	/* URL for the namespace */
-    const xmlChar *prefix;	/* prefix for the namespace */
-    void           *_private;   /* application data */
-    struct _xmlDoc *context;		/* normally an xmlDoc */
-};
-
-/**
- * xmlDtd:
- *
- * An XML DTD, as defined by <!DOCTYPE ... There is actually one for
- * the internal subset and for the external subset.
- */
-typedef struct _xmlDtd xmlDtd;
-typedef xmlDtd *xmlDtdPtr;
-struct _xmlDtd {
-    void           *_private;	/* application data */
-    xmlElementType  type;       /* XML_DTD_NODE, must be second ! */
-    const xmlChar *name;	/* Name of the DTD */
-    struct _xmlNode *children;	/* the value of the property link */
-    struct _xmlNode *last;	/* last child link */
-    struct _xmlDoc  *parent;	/* child->parent link */
-    struct _xmlNode *next;	/* next sibling link  */
-    struct _xmlNode *prev;	/* previous sibling link  */
-    struct _xmlDoc  *doc;	/* the containing document */
-
-    /* End of common part */
-    void          *notations;   /* Hash table for notations if any */
-    void          *elements;    /* Hash table for elements if any */
-    void          *attributes;  /* Hash table for attributes if any */
-    void          *entities;    /* Hash table for entities if any */
-    const xmlChar *ExternalID;	/* External identifier for PUBLIC DTD */
-    const xmlChar *SystemID;	/* URI for a SYSTEM or PUBLIC DTD */
-    void          *pentities;   /* Hash table for param entities if any */
-};
-
-/**
- * xmlAttr:
- *
- * An attribute on an XML node.
- */
-typedef struct _xmlAttr xmlAttr;
-typedef xmlAttr *xmlAttrPtr;
-struct _xmlAttr {
-    void           *_private;	/* application data */
-    xmlElementType   type;      /* XML_ATTRIBUTE_NODE, must be second ! */
-    const xmlChar   *name;      /* the name of the property */
-    struct _xmlNode *children;	/* the value of the property */
-    struct _xmlNode *last;	/* NULL */
-    struct _xmlNode *parent;	/* child->parent link */
-    struct _xmlAttr *next;	/* next sibling link  */
-    struct _xmlAttr *prev;	/* previous sibling link  */
-    struct _xmlDoc  *doc;	/* the containing document */
-    xmlNs           *ns;        /* pointer to the associated namespace */
-    xmlAttributeType atype;     /* the attribute type if validating */
-    void            *psvi;	/* for type/PSVI informations */
-};
-
-/**
- * xmlID:
- *
- * An XML ID instance.
- */
-
-typedef struct _xmlID xmlID;
-typedef xmlID *xmlIDPtr;
-struct _xmlID {
-    struct _xmlID    *next;	/* next ID */
-    const xmlChar    *value;	/* The ID name */
-    xmlAttrPtr        attr;	/* The attribute holding it */
-    const xmlChar    *name;	/* The attribute if attr is not available */
-    int               lineno;	/* The line number if attr is not available */
-    struct _xmlDoc   *doc;	/* The document holding the ID */
-};
-
-/**
- * xmlRef:
- *
- * An XML IDREF instance.
- */
-
-typedef struct _xmlRef xmlRef;
-typedef xmlRef *xmlRefPtr;
-struct _xmlRef {
-    struct _xmlRef    *next;	/* next Ref */
-    const xmlChar     *value;	/* The Ref name */
-    xmlAttrPtr        attr;	/* The attribute holding it */
-    const xmlChar    *name;	/* The attribute if attr is not available */
-    int               lineno;	/* The line number if attr is not available */
-};
-
-/**
- * xmlNode:
- *
- * A node in an XML tree.
- */
-typedef struct _xmlNode xmlNode;
-typedef xmlNode *xmlNodePtr;
-struct _xmlNode {
-    void           *_private;	/* application data */
-    xmlElementType   type;	/* type number, must be second ! */
-    const xmlChar   *name;      /* the name of the node, or the entity */
-    struct _xmlNode *children;	/* parent->childs link */
-    struct _xmlNode *last;	/* last child link */
-    struct _xmlNode *parent;	/* child->parent link */
-    struct _xmlNode *next;	/* next sibling link  */
-    struct _xmlNode *prev;	/* previous sibling link  */
-    struct _xmlDoc  *doc;	/* the containing document */
-
-    /* End of common part */
-    xmlNs           *ns;        /* pointer to the associated namespace */
-    xmlChar         *content;   /* the content */
-    struct _xmlAttr *properties;/* properties list */
-    xmlNs           *nsDef;     /* namespace definitions on this node */
-    void            *psvi;	/* for type/PSVI informations */
-    unsigned short   line;	/* line number */
-    unsigned short   extra;	/* extra data for XPath/XSLT */
-};
-
-/**
- * XML_GET_CONTENT:
- *
- * Macro to extract the content pointer of a node.
- */
-#define XML_GET_CONTENT(n)					\
-    ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
-
-/**
- * XML_GET_LINE:
- *
- * Macro to extract the line number of an element node. 
- */
-#define XML_GET_LINE(n)						\
-    (xmlGetLineNo(n))
-
-/**
- * xmlDocProperty
- *
- * Set of properties of the document as found by the parser
- * Some of them are linked to similary named xmlParserOption
- */
-typedef enum {
-    XML_DOC_WELLFORMED		= 1<<0, /* document is XML well formed */
-    XML_DOC_NSVALID		= 1<<1, /* document is Namespace valid */
-    XML_DOC_OLD10		= 1<<2, /* parsed with old XML-1.0 parser */
-    XML_DOC_DTDVALID		= 1<<3, /* DTD validation was successful */
-    XML_DOC_XINCLUDE		= 1<<4, /* XInclude substitution was done */
-    XML_DOC_USERBUILT		= 1<<5, /* Document was built using the API
-                                           and not by parsing an instance */
-    XML_DOC_INTERNAL		= 1<<6, /* built for internal processing */
-    XML_DOC_HTML		= 1<<7  /* parsed or built HTML document */
-} xmlDocProperties;
-
-/**
- * xmlDoc:
- *
- * An XML document.
- */
-typedef struct _xmlDoc xmlDoc;
-typedef xmlDoc *xmlDocPtr;
-struct _xmlDoc {
-    void           *_private;	/* application data */
-    xmlElementType  type;       /* XML_DOCUMENT_NODE, must be second ! */
-    char           *name;	/* name/filename/URI of the document */
-    struct _xmlNode *children;	/* the document tree */
-    struct _xmlNode *last;	/* last child link */
-    struct _xmlNode *parent;	/* child->parent link */
-    struct _xmlNode *next;	/* next sibling link  */
-    struct _xmlNode *prev;	/* previous sibling link  */
-    struct _xmlDoc  *doc;	/* autoreference to itself */
-
-    /* End of common part */
-    int             compression;/* level of zlib compression */
-    int             standalone; /* standalone document (no external refs) 
-				     1 if standalone="yes"
-				     0 if standalone="no"
-				    -1 if there is no XML declaration
-				    -2 if there is an XML declaration, but no
-					standalone attribute was specified */
-    struct _xmlDtd  *intSubset;	/* the document internal subset */
-    struct _xmlDtd  *extSubset;	/* the document external subset */
-    struct _xmlNs   *oldNs;	/* Global namespace, the old way */
-    const xmlChar  *version;	/* the XML version string */
-    const xmlChar  *encoding;   /* external initial encoding, if any */
-    void           *ids;        /* Hash table for ID attributes if any */
-    void           *refs;       /* Hash table for IDREFs attributes if any */
-    const xmlChar  *URL;	/* The URI for that document */
-    int             charset;    /* encoding of the in-memory content
-				   actually an xmlCharEncoding */
-    struct _xmlDict *dict;      /* dict used to allocate names or NULL */
-    void           *psvi;	/* for type/PSVI informations */
-    int             parseFlags;	/* set of xmlParserOption used to parse the
-				   document */
-    int             properties;	/* set of xmlDocProperties for this document
-				   set at the end of parsing */
-};
-
-
-typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
-typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
-
-/**
- * xmlDOMWrapAcquireNsFunction:
- * @ctxt:  a DOM wrapper context
- * @node:  the context node (element or attribute) 
- * @nsName:  the requested namespace name
- * @nsPrefix:  the requested namespace prefix 
- *
- * A function called to acquire namespaces (xmlNs) from the wrapper.
- *
- * Returns an xmlNsPtr or NULL in case of an error.
- */
-typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt,
-						 xmlNodePtr node,
-						 const xmlChar *nsName,
-						 const xmlChar *nsPrefix);
-
-/**
- * xmlDOMWrapCtxt:
- *
- * Context for DOM wrapper-operations.
- */
-struct _xmlDOMWrapCtxt {
-    void * _private;
-    /*
-    * The type of this context, just in case we need specialized
-    * contexts in the future.
-    */
-    int type;
-    /*
-    * Internal namespace map used for various operations.
-    */
-    void * namespaceMap;
-    /*
-    * Use this one to acquire an xmlNsPtr intended for node->ns.
-    * (Note that this is not intended for elem->nsDef).
-    */
-    xmlDOMWrapAcquireNsFunction getNsForNodeFunc;
-};
-
-/**
- * xmlChildrenNode:
- *
- * Macro for compatibility naming layer with libxml1. Maps
- * to "children."
- */
-#ifndef xmlChildrenNode
-#define xmlChildrenNode children
-#endif
-
-/**
- * xmlRootNode:
- *
- * Macro for compatibility naming layer with libxml1. Maps 
- * to "children".
- */
-#ifndef xmlRootNode
-#define xmlRootNode children
-#endif
-
-/*
- * Variables.
- */
-
-/*
- * Some helper functions
- */
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
-XMLPUBFUN int XMLCALL
-		xmlValidateNCName	(const xmlChar *value,
-					 int space);
-#endif
-
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN int XMLCALL		
-		xmlValidateQName	(const xmlChar *value,
-					 int space);
-XMLPUBFUN int XMLCALL		
-		xmlValidateName		(const xmlChar *value,
-					 int space);
-XMLPUBFUN int XMLCALL		
-		xmlValidateNMToken	(const xmlChar *value,
-					 int space);
-#endif
-
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlBuildQName		(const xmlChar *ncname,
-					 const xmlChar *prefix,
-					 xmlChar *memory,
-					 int len);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlSplitQName2		(const xmlChar *name,
-					 xmlChar **prefix);
-XMLPUBFUN const xmlChar * XMLCALL	
-		xmlSplitQName3		(const xmlChar *name,
-					 int *len);
-
-/*
- * Handling Buffers.
- */
-
-XMLPUBFUN void XMLCALL		
-		xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
-XMLPUBFUN xmlBufferAllocationScheme XMLCALL	 
-		xmlGetBufferAllocationScheme(void);
-
-XMLPUBFUN xmlBufferPtr XMLCALL	
-		xmlBufferCreate		(void);
-XMLPUBFUN xmlBufferPtr XMLCALL	
-		xmlBufferCreateSize	(size_t size);
-XMLPUBFUN xmlBufferPtr XMLCALL	
-		xmlBufferCreateStatic	(void *mem,
-					 size_t size);
-XMLPUBFUN int XMLCALL		
-		xmlBufferResize		(xmlBufferPtr buf,
-					 unsigned int size);
-XMLPUBFUN void XMLCALL		
-		xmlBufferFree		(xmlBufferPtr buf);
-XMLPUBFUN int XMLCALL		
-		xmlBufferDump		(FILE *file,
-					 xmlBufferPtr buf);
-XMLPUBFUN int XMLCALL		
-		xmlBufferAdd		(xmlBufferPtr buf,
-					 const xmlChar *str,
-					 int len);
-XMLPUBFUN int XMLCALL		
-		xmlBufferAddHead	(xmlBufferPtr buf,
-					 const xmlChar *str,
-					 int len);
-XMLPUBFUN int XMLCALL		
-		xmlBufferCat		(xmlBufferPtr buf,
-					 const xmlChar *str);
-XMLPUBFUN int XMLCALL	
-		xmlBufferCCat		(xmlBufferPtr buf,
-					 const char *str);
-XMLPUBFUN int XMLCALL		
-		xmlBufferShrink		(xmlBufferPtr buf,
-					 unsigned int len);
-XMLPUBFUN int XMLCALL		
-		xmlBufferGrow		(xmlBufferPtr buf,
-					 unsigned int len);
-XMLPUBFUN void XMLCALL		
-		xmlBufferEmpty		(xmlBufferPtr buf);
-XMLPUBFUN const xmlChar* XMLCALL	
-		xmlBufferContent	(const xmlBufferPtr buf);
-XMLPUBFUN void XMLCALL		
-		xmlBufferSetAllocationScheme(xmlBufferPtr buf,
-					 xmlBufferAllocationScheme scheme);
-XMLPUBFUN int XMLCALL		
-		xmlBufferLength		(const xmlBufferPtr buf);
-
-/*
- * Creating/freeing new structures.
- */
-XMLPUBFUN xmlDtdPtr XMLCALL	
-		xmlCreateIntSubset	(xmlDocPtr doc,
-					 const xmlChar *name,
-					 const xmlChar *ExternalID,
-					 const xmlChar *SystemID);
-XMLPUBFUN xmlDtdPtr XMLCALL	
-		xmlNewDtd		(xmlDocPtr doc,
-					 const xmlChar *name,
-					 const xmlChar *ExternalID,
-					 const xmlChar *SystemID);
-XMLPUBFUN xmlDtdPtr XMLCALL	
-		xmlGetIntSubset		(xmlDocPtr doc);
-XMLPUBFUN void XMLCALL		
-		xmlFreeDtd		(xmlDtdPtr cur);
-#ifdef LIBXML_LEGACY_ENABLED
-XMLPUBFUN xmlNsPtr XMLCALL	
-		xmlNewGlobalNs		(xmlDocPtr doc,
-					 const xmlChar *href,
-					 const xmlChar *prefix);
-#endif /* LIBXML_LEGACY_ENABLED */
-XMLPUBFUN xmlNsPtr XMLCALL	
-		xmlNewNs		(xmlNodePtr node,
-					 const xmlChar *href,
-					 const xmlChar *prefix);
-XMLPUBFUN void XMLCALL		
-		xmlFreeNs		(xmlNsPtr cur);
-XMLPUBFUN void XMLCALL		
-		xmlFreeNsList		(xmlNsPtr cur);
-XMLPUBFUN xmlDocPtr XMLCALL 	
-		xmlNewDoc		(const xmlChar *version);
-XMLPUBFUN void XMLCALL		
-		xmlFreeDoc		(xmlDocPtr cur);
-XMLPUBFUN xmlAttrPtr XMLCALL	
-		xmlNewDocProp		(xmlDocPtr doc,
-					 const xmlChar *name,
-					 const xmlChar *value);
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
-    defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN xmlAttrPtr XMLCALL	
-		xmlNewProp		(xmlNodePtr node,
-					 const xmlChar *name,
-					 const xmlChar *value);
-#endif
-XMLPUBFUN xmlAttrPtr XMLCALL	
-		xmlNewNsProp		(xmlNodePtr node,
-					 xmlNsPtr ns,
-					 const xmlChar *name,
-					 const xmlChar *value);
-XMLPUBFUN xmlAttrPtr XMLCALL	
-		xmlNewNsPropEatName	(xmlNodePtr node,
-					 xmlNsPtr ns,
-					 xmlChar *name,
-					 const xmlChar *value);
-XMLPUBFUN void XMLCALL		
-		xmlFreePropList		(xmlAttrPtr cur);
-XMLPUBFUN void XMLCALL		
-		xmlFreeProp		(xmlAttrPtr cur);
-XMLPUBFUN xmlAttrPtr XMLCALL	
-		xmlCopyProp		(xmlNodePtr target,
-					 xmlAttrPtr cur);
-XMLPUBFUN xmlAttrPtr XMLCALL	
-		xmlCopyPropList		(xmlNodePtr target,
-					 xmlAttrPtr cur);
-#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlDtdPtr XMLCALL	
-		xmlCopyDtd		(xmlDtdPtr dtd);
-#endif /* LIBXML_TREE_ENABLED */
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN xmlDocPtr XMLCALL	
-		xmlCopyDoc		(xmlDocPtr doc,
-					 int recursive);
-#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
-/*
- * Creating new nodes.
- */
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewDocNode		(xmlDocPtr doc,
-					 xmlNsPtr ns,
-					 const xmlChar *name,
-					 const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewDocNodeEatName	(xmlDocPtr doc,
-					 xmlNsPtr ns,
-					 xmlChar *name,
-					 const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewNode		(xmlNsPtr ns,
-					 const xmlChar *name);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewNodeEatName	(xmlNsPtr ns,
-					 xmlChar *name);
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewChild		(xmlNodePtr parent,
-					 xmlNsPtr ns,
-					 const xmlChar *name,
-					 const xmlChar *content);
-#endif
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewDocText		(xmlDocPtr doc,
-					 const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewText		(const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewDocPI		(xmlDocPtr doc,
-					 const xmlChar *name,
-					 const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewPI		(const xmlChar *name,
-					 const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewDocTextLen	(xmlDocPtr doc,
-					 const xmlChar *content,
-					 int len);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewTextLen		(const xmlChar *content,
-					 int len);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewDocComment	(xmlDocPtr doc,
-					 const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewComment		(const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewCDataBlock	(xmlDocPtr doc,
-					 const xmlChar *content,
-					 int len);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewCharRef		(xmlDocPtr doc,
-					 const xmlChar *name);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewReference		(xmlDocPtr doc,
-					 const xmlChar *name);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlCopyNode		(const xmlNodePtr node,
-					 int recursive);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlDocCopyNode		(const xmlNodePtr node,
-					 xmlDocPtr doc,
-					 int recursive);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlDocCopyNodeList	(xmlDocPtr doc,
-					 const xmlNodePtr node);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlCopyNodeList		(const xmlNodePtr node);
-#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewTextChild		(xmlNodePtr parent,
-					 xmlNsPtr ns,
-					 const xmlChar *name,
-					 const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewDocRawNode	(xmlDocPtr doc,
-					 xmlNsPtr ns,
-					 const xmlChar *name,
-					 const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlNewDocFragment	(xmlDocPtr doc);
-#endif /* LIBXML_TREE_ENABLED */
-
-/*
- * Navigating.
- */
-XMLPUBFUN long XMLCALL		
-		xmlGetLineNo		(xmlNodePtr node);
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlGetNodePath		(xmlNodePtr node);
-#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlDocGetRootElement	(xmlDocPtr doc);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlGetLastChild		(xmlNodePtr parent);
-XMLPUBFUN int XMLCALL		
-		xmlNodeIsText		(xmlNodePtr node);
-XMLPUBFUN int XMLCALL		
-		xmlIsBlankNode		(xmlNodePtr node);
-
-/*
- * Changing the structure.
- */
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlDocSetRootElement	(xmlDocPtr doc,
-					 xmlNodePtr root);
-#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
-#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN void XMLCALL		
-		xmlNodeSetName		(xmlNodePtr cur,
-					 const xmlChar *name);
-#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlAddChild		(xmlNodePtr parent,
-					 xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlAddChildList		(xmlNodePtr parent,
-					 xmlNodePtr cur);
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlReplaceNode		(xmlNodePtr old,
-					 xmlNodePtr cur);
-#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
-    defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlAddPrevSibling	(xmlNodePtr cur,
-					 xmlNodePtr elem);
-#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlAddSibling		(xmlNodePtr cur,
-					 xmlNodePtr elem);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlAddNextSibling	(xmlNodePtr cur,
-					 xmlNodePtr elem);
-XMLPUBFUN void XMLCALL		
-		xmlUnlinkNode		(xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlTextMerge		(xmlNodePtr first,
-					 xmlNodePtr second);
-XMLPUBFUN int XMLCALL		
-		xmlTextConcat		(xmlNodePtr node,
-					 const xmlChar *content,
-					 int len);
-XMLPUBFUN void XMLCALL		
-		xmlFreeNodeList		(xmlNodePtr cur);
-XMLPUBFUN void XMLCALL		
-		xmlFreeNode		(xmlNodePtr cur);
-XMLPUBFUN void XMLCALL		
-		xmlSetTreeDoc		(xmlNodePtr tree,
-					 xmlDocPtr doc);
-XMLPUBFUN void XMLCALL		
-		xmlSetListDoc		(xmlNodePtr list,
-					 xmlDocPtr doc);
-/*
- * Namespaces.
- */
-XMLPUBFUN xmlNsPtr XMLCALL	
-		xmlSearchNs		(xmlDocPtr doc,
-					 xmlNodePtr node,
-					 const xmlChar *nameSpace);
-XMLPUBFUN xmlNsPtr XMLCALL	
-		xmlSearchNsByHref	(xmlDocPtr doc,
-					 xmlNodePtr node,
-					 const xmlChar *href);
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN xmlNsPtr * XMLCALL	
-		xmlGetNsList		(xmlDocPtr doc,
-					 xmlNodePtr node);
-#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
-
-XMLPUBFUN void XMLCALL		
-		xmlSetNs		(xmlNodePtr node,
-					 xmlNsPtr ns);
-XMLPUBFUN xmlNsPtr XMLCALL	
-		xmlCopyNamespace	(xmlNsPtr cur);
-XMLPUBFUN xmlNsPtr XMLCALL	
-		xmlCopyNamespaceList	(xmlNsPtr cur);
-
-/*
- * Changing the content.
- */
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
-XMLPUBFUN xmlAttrPtr XMLCALL	
-		xmlSetProp		(xmlNodePtr node,
-					 const xmlChar *name,
-					 const xmlChar *value);
-XMLPUBFUN xmlAttrPtr XMLCALL	
-		xmlSetNsProp		(xmlNodePtr node,
-					 xmlNsPtr ns,
-					 const xmlChar *name,
-					 const xmlChar *value);
-#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlGetNoNsProp		(xmlNodePtr node,
-					 const xmlChar *name);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlGetProp		(xmlNodePtr node,
-					 const xmlChar *name);
-XMLPUBFUN xmlAttrPtr XMLCALL	
-		xmlHasProp		(xmlNodePtr node,
-					 const xmlChar *name);
-XMLPUBFUN xmlAttrPtr XMLCALL	
-		xmlHasNsProp		(xmlNodePtr node,
-					 const xmlChar *name,
-					 const xmlChar *nameSpace);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlGetNsProp		(xmlNodePtr node,
-					 const xmlChar *name,
-					 const xmlChar *nameSpace);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlStringGetNodeList	(xmlDocPtr doc,
-					 const xmlChar *value);
-XMLPUBFUN xmlNodePtr XMLCALL	
-		xmlStringLenGetNodeList	(xmlDocPtr doc,
-					 const xmlChar *value,
-					 int len);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlNodeListGetString	(xmlDocPtr doc,
-					 xmlNodePtr list,
-					 int inLine);
-#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlNodeListGetRawString	(xmlDocPtr doc,
-					 xmlNodePtr list,
-					 int inLine);
-#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL		
-		xmlNodeSetContent	(xmlNodePtr cur,
-					 const xmlChar *content);
-#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN void XMLCALL		
-		xmlNodeSetContentLen	(xmlNodePtr cur,
-					 const xmlChar *content,
-					 int len);
-#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL		
-		xmlNodeAddContent	(xmlNodePtr cur,
-					 const xmlChar *content);
-XMLPUBFUN void XMLCALL		
-		xmlNodeAddContentLen	(xmlNodePtr cur,
-					 const xmlChar *content,
-					 int len);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlNodeGetContent	(xmlNodePtr cur);
-XMLPUBFUN int XMLCALL
-		xmlNodeBufGetContent	(xmlBufferPtr buffer,
-					 xmlNodePtr cur);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlNodeGetLang		(xmlNodePtr cur);
-XMLPUBFUN int XMLCALL		
-		xmlNodeGetSpacePreserve	(xmlNodePtr cur);
-#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN void XMLCALL		
-		xmlNodeSetLang		(xmlNodePtr cur,
-					 const xmlChar *lang);
-XMLPUBFUN void XMLCALL		
-		xmlNodeSetSpacePreserve (xmlNodePtr cur,
-					 int val);
-#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlNodeGetBase		(xmlDocPtr doc,
-					 xmlNodePtr cur);
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
-XMLPUBFUN void XMLCALL		
-		xmlNodeSetBase		(xmlNodePtr cur,
-					 const xmlChar *uri);
-#endif
-
-/*
- * Removing content.
- */
-XMLPUBFUN int XMLCALL		
-		xmlRemoveProp		(xmlAttrPtr cur);
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN int XMLCALL		
-		xmlUnsetNsProp		(xmlNodePtr node,
-					 xmlNsPtr ns,
-					 const xmlChar *name);
-XMLPUBFUN int XMLCALL		
-		xmlUnsetProp		(xmlNodePtr node,
-					 const xmlChar *name);
-#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
-
-/*
- * Internal, don't use.
- */
-XMLPUBFUN void XMLCALL		
-		xmlBufferWriteCHAR	(xmlBufferPtr buf,
-					 const xmlChar *string);
-XMLPUBFUN void XMLCALL		
-		xmlBufferWriteChar	(xmlBufferPtr buf,
-					 const char *string);
-XMLPUBFUN void XMLCALL		
-		xmlBufferWriteQuotedString(xmlBufferPtr buf,
-					 const xmlChar *string);
-
-#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
-					 xmlDocPtr doc,
-					 xmlAttrPtr attr,
-					 const xmlChar *string);
-#endif /* LIBXML_OUTPUT_ENABLED */
-
-#ifdef LIBXML_TREE_ENABLED
-/*
- * Namespace handling.
- */
-XMLPUBFUN int XMLCALL		
-		xmlReconciliateNs	(xmlDocPtr doc,
-					 xmlNodePtr tree);
-#endif
-
-#ifdef LIBXML_OUTPUT_ENABLED
-/*
- * Saving.
- */
-XMLPUBFUN void XMLCALL		
-		xmlDocDumpFormatMemory	(xmlDocPtr cur,
-					 xmlChar **mem,
-					 int *size,
-					 int format);
-XMLPUBFUN void XMLCALL		
-		xmlDocDumpMemory	(xmlDocPtr cur,
-					 xmlChar **mem,
-					 int *size);
-XMLPUBFUN void XMLCALL		
-		xmlDocDumpMemoryEnc	(xmlDocPtr out_doc,
-					 xmlChar **doc_txt_ptr,
-					 int * doc_txt_len,
-					 const char *txt_encoding);
-XMLPUBFUN void XMLCALL		
-		xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
-					 xmlChar **doc_txt_ptr,
-					 int * doc_txt_len,
-					 const char *txt_encoding,
-					 int format);
-XMLPUBFUN int XMLCALL		
-		xmlDocFormatDump	(FILE *f,
-					 xmlDocPtr cur,
-					 int format);
-XMLPUBFUN int XMLCALL	
-		xmlDocDump		(FILE *f,
-					 xmlDocPtr cur);
-XMLPUBFUN void XMLCALL		
-		xmlElemDump		(FILE *f,
-					 xmlDocPtr doc,
-					 xmlNodePtr cur);
-XMLPUBFUN int XMLCALL		
-		xmlSaveFile		(const char *filename,
-					 xmlDocPtr cur);
-XMLPUBFUN int XMLCALL		
-		xmlSaveFormatFile	(const char *filename,
-					 xmlDocPtr cur,
-					 int format);
-XMLPUBFUN int XMLCALL		
-		xmlNodeDump		(xmlBufferPtr buf,
-					 xmlDocPtr doc,
-					 xmlNodePtr cur,
-					 int level,
-					 int format);
-
-XMLPUBFUN int XMLCALL		
-		xmlSaveFileTo		(xmlOutputBufferPtr buf,
-					 xmlDocPtr cur,
-					 const char *encoding);
-XMLPUBFUN int XMLCALL             
-		xmlSaveFormatFileTo     (xmlOutputBufferPtr buf,
-					 xmlDocPtr cur,
-				         const char *encoding,
-				         int format);
-XMLPUBFUN void XMLCALL		
-		xmlNodeDumpOutput	(xmlOutputBufferPtr buf,
-					 xmlDocPtr doc,
-					 xmlNodePtr cur,
-					 int level,
-					 int format,
-					 const char *encoding);
-
-XMLPUBFUN int XMLCALL		
-		xmlSaveFormatFileEnc    (const char *filename,
-					 xmlDocPtr cur,
-					 const char *encoding,
-					 int format);
-
-XMLPUBFUN int XMLCALL		
-		xmlSaveFileEnc		(const char *filename,
-					 xmlDocPtr cur,
-					 const char *encoding);
-
-#endif /* LIBXML_OUTPUT_ENABLED */
-/*
- * XHTML
- */
-XMLPUBFUN int XMLCALL		
-		xmlIsXHTML		(const xmlChar *systemID,
-					 const xmlChar *publicID);
-
-/*
- * Compression.
- */
-XMLPUBFUN int XMLCALL		
-		xmlGetDocCompressMode	(xmlDocPtr doc);
-XMLPUBFUN void XMLCALL		
-		xmlSetDocCompressMode	(xmlDocPtr doc,
-					 int mode);
-XMLPUBFUN int XMLCALL		
-		xmlGetCompressMode	(void);
-XMLPUBFUN void XMLCALL		
-		xmlSetCompressMode	(int mode);
-
-/*
-* DOM-wrapper helper functions.
-*/
-XMLPUBFUN xmlDOMWrapCtxtPtr XMLCALL
-		xmlDOMWrapNewCtxt	(void);
-XMLPUBFUN void XMLCALL
-		xmlDOMWrapFreeCtxt	(xmlDOMWrapCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
-	    xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
-					 xmlNodePtr elem,
-					 int options);
-XMLPUBFUN int XMLCALL
-	    xmlDOMWrapAdoptNode		(xmlDOMWrapCtxtPtr ctxt,
-					 xmlDocPtr sourceDoc,
-					 xmlNodePtr node,
-					 xmlDocPtr destDoc,		    
-					 xmlNodePtr destParent,
-					 int options);
-XMLPUBFUN int XMLCALL
-	    xmlDOMWrapRemoveNode	(xmlDOMWrapCtxtPtr ctxt,
-					 xmlDocPtr doc,
-					 xmlNodePtr node,
-					 int options);
-XMLPUBFUN int XMLCALL
-	    xmlDOMWrapCloneNode		(xmlDOMWrapCtxtPtr ctxt,
-					 xmlDocPtr sourceDoc,
-					 xmlNodePtr node,
-					 xmlNodePtr *clonedNode,
-					 xmlDocPtr destDoc,
-					 xmlNodePtr destParent,
-					 int deep,
-					 int options);
-
-#ifdef LIBXML_TREE_ENABLED
-/*
- * 5 interfaces from DOM ElementTraversal, but different in entities
- * traversal.
- */
-XMLPUBFUN unsigned long XMLCALL
-            xmlChildElementCount        (xmlNodePtr parent);
-XMLPUBFUN xmlNodePtr XMLCALL
-            xmlNextElementSibling       (xmlNodePtr node);
-XMLPUBFUN xmlNodePtr XMLCALL
-            xmlFirstElementChild        (xmlNodePtr parent);
-XMLPUBFUN xmlNodePtr XMLCALL
-            xmlLastElementChild         (xmlNodePtr parent);
-XMLPUBFUN xmlNodePtr XMLCALL
-            xmlPreviousElementSibling   (xmlNodePtr node);
-#endif
-#ifdef __cplusplus
-}
-#endif
-#ifndef __XML_PARSER_H__
-#include <libxml/xmlmemory.h>
-#endif
-
-#endif /* __XML_TREE_H__ */
-
diff --git a/interfaces/ext/libxml/uri.h b/interfaces/ext/libxml/uri.h
deleted file mode 100644
index db48262..0000000
--- a/interfaces/ext/libxml/uri.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Summary: library of generic URI related routines
- * Description: library of generic URI related routines
- *              Implements RFC 2396
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_URI_H__
-#define __XML_URI_H__
-
-#include <libxml/xmlversion.h>
-#include <libxml/tree.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * xmlURI:
- *
- * A parsed URI reference. This is a struct containing the various fields
- * as described in RFC 2396 but separated for further processing.
- *
- * Note: query is a deprecated field which is incorrectly unescaped.
- * query_raw takes precedence over query if the former is set.
- * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
- */
-typedef struct _xmlURI xmlURI;
-typedef xmlURI *xmlURIPtr;
-struct _xmlURI {
-    char *scheme;	/* the URI scheme */
-    char *opaque;	/* opaque part */
-    char *authority;	/* the authority part */
-    char *server;	/* the server part */
-    char *user;		/* the user part */
-    int port;		/* the port number */
-    char *path;		/* the path string */
-    char *query;	/* the query string (deprecated - use with caution) */
-    char *fragment;	/* the fragment identifier */
-    int  cleanup;	/* parsing potentially unclean URI */
-    char *query_raw;	/* the query string (as it appears in the URI) */
-};
-
-/*
- * This function is in tree.h:
- * xmlChar *	xmlNodeGetBase	(xmlDocPtr doc,
- *                               xmlNodePtr cur);
- */
-XMLPUBFUN xmlURIPtr XMLCALL
-		xmlCreateURI		(void);
-XMLPUBFUN xmlChar * XMLCALL
-		xmlBuildURI		(const xmlChar *URI,
-					 const xmlChar *base);
-XMLPUBFUN xmlChar * XMLCALL
-		xmlBuildRelativeURI	(const xmlChar *URI,
-					 const xmlChar *base);
-XMLPUBFUN xmlURIPtr XMLCALL
-		xmlParseURI		(const char *str);
-XMLPUBFUN xmlURIPtr XMLCALL
-		xmlParseURIRaw		(const char *str,
-					 int raw);
-XMLPUBFUN int XMLCALL
-		xmlParseURIReference	(xmlURIPtr uri,
-					 const char *str);
-XMLPUBFUN xmlChar * XMLCALL
-		xmlSaveUri		(xmlURIPtr uri);
-XMLPUBFUN void XMLCALL
-		xmlPrintURI		(FILE *stream,
-					 xmlURIPtr uri);
-XMLPUBFUN xmlChar * XMLCALL
-		xmlURIEscapeStr         (const xmlChar *str,
-					 const xmlChar *list);
-XMLPUBFUN char * XMLCALL
-		xmlURIUnescapeString	(const char *str,
-					 int len,
-					 char *target);
-XMLPUBFUN int XMLCALL
-		xmlNormalizeURIPath	(char *path);
-XMLPUBFUN xmlChar * XMLCALL
-		xmlURIEscape		(const xmlChar *str);
-XMLPUBFUN void XMLCALL
-		xmlFreeURI		(xmlURIPtr uri);
-XMLPUBFUN xmlChar* XMLCALL
-		xmlCanonicPath		(const xmlChar *path);
-XMLPUBFUN xmlChar* XMLCALL
-		xmlPathToURI		(const xmlChar *path);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* __XML_URI_H__ */
diff --git a/interfaces/ext/libxml/valid.h b/interfaces/ext/libxml/valid.h
deleted file mode 100644
index f1892b0..0000000
--- a/interfaces/ext/libxml/valid.h
+++ /dev/null
@@ -1,458 +0,0 @@
-/*
- * Summary: The DTD validation
- * Description: API for the DTD handling and the validity checking
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-
-#ifndef __XML_VALID_H__
-#define __XML_VALID_H__
-
-#include <libxml/xmlversion.h>
-#include <libxml/xmlerror.h>
-#include <libxml/tree.h>
-#include <libxml/list.h>
-#include <libxml/xmlautomata.h>
-#include <libxml/xmlregexp.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Validation state added for non-determinist content model.
- */
-typedef struct _xmlValidState xmlValidState;
-typedef xmlValidState *xmlValidStatePtr;
-
-/**
- * xmlValidityErrorFunc:
- * @ctx:  usually an xmlValidCtxtPtr to a validity error context,
- *        but comes from ctxt->userData (which normally contains such
- *        a pointer); ctxt->userData can be changed by the user.
- * @msg:  the string to format *printf like vararg
- * @...:  remaining arguments to the format
- *
- * Callback called when a validity error is found. This is a message
- * oriented function similar to an *printf function.
- */
-typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
-			     const char *msg,
-			     ...) ATTRIBUTE_PRINTF(2,3);
-
-/**
- * xmlValidityWarningFunc:
- * @ctx:  usually an xmlValidCtxtPtr to a validity error context,
- *        but comes from ctxt->userData (which normally contains such
- *        a pointer); ctxt->userData can be changed by the user.
- * @msg:  the string to format *printf like vararg
- * @...:  remaining arguments to the format
- *
- * Callback called when a validity warning is found. This is a message
- * oriented function similar to an *printf function.
- */
-typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
-			       const char *msg,
-			       ...) ATTRIBUTE_PRINTF(2,3);
-
-#ifdef IN_LIBXML
-/**
- * XML_CTXT_FINISH_DTD_0:
- *
- * Special value for finishDtd field when embedded in an xmlParserCtxt
- */
-#define XML_CTXT_FINISH_DTD_0 0xabcd1234
-/**
- * XML_CTXT_FINISH_DTD_1:
- *
- * Special value for finishDtd field when embedded in an xmlParserCtxt
- */
-#define XML_CTXT_FINISH_DTD_1 0xabcd1235
-#endif
-
-/*
- * xmlValidCtxt:
- * An xmlValidCtxt is used for error reporting when validating.
- */
-typedef struct _xmlValidCtxt xmlValidCtxt;
-typedef xmlValidCtxt *xmlValidCtxtPtr;
-struct _xmlValidCtxt {
-    void *userData;			/* user specific data block */
-    xmlValidityErrorFunc error;		/* the callback in case of errors */
-    xmlValidityWarningFunc warning;	/* the callback in case of warning */
-
-    /* Node analysis stack used when validating within entities */
-    xmlNodePtr         node;          /* Current parsed Node */
-    int                nodeNr;        /* Depth of the parsing stack */
-    int                nodeMax;       /* Max depth of the parsing stack */
-    xmlNodePtr        *nodeTab;       /* array of nodes */
-
-    unsigned int     finishDtd;       /* finished validating the Dtd ? */
-    xmlDocPtr              doc;       /* the document */
-    int                  valid;       /* temporary validity check result */
-
-    /* state state used for non-determinist content validation */
-    xmlValidState     *vstate;        /* current state */
-    int                vstateNr;      /* Depth of the validation stack */
-    int                vstateMax;     /* Max depth of the validation stack */
-    xmlValidState     *vstateTab;     /* array of validation states */
-
-#ifdef LIBXML_REGEXP_ENABLED
-    xmlAutomataPtr            am;     /* the automata */
-    xmlAutomataStatePtr    state;     /* used to build the automata */
-#else
-    void                     *am;
-    void                  *state;
-#endif
-};
-
-/*
- * ALL notation declarations are stored in a table.
- * There is one table per DTD.
- */
-
-typedef struct _xmlHashTable xmlNotationTable;
-typedef xmlNotationTable *xmlNotationTablePtr;
-
-/*
- * ALL element declarations are stored in a table.
- * There is one table per DTD.
- */
-
-typedef struct _xmlHashTable xmlElementTable;
-typedef xmlElementTable *xmlElementTablePtr;
-
-/*
- * ALL attribute declarations are stored in a table.
- * There is one table per DTD.
- */
-
-typedef struct _xmlHashTable xmlAttributeTable;
-typedef xmlAttributeTable *xmlAttributeTablePtr;
-
-/*
- * ALL IDs attributes are stored in a table.
- * There is one table per document.
- */
-
-typedef struct _xmlHashTable xmlIDTable;
-typedef xmlIDTable *xmlIDTablePtr;
-
-/*
- * ALL Refs attributes are stored in a table.
- * There is one table per document.
- */
-
-typedef struct _xmlHashTable xmlRefTable;
-typedef xmlRefTable *xmlRefTablePtr;
-
-/* Notation */
-XMLPUBFUN xmlNotationPtr XMLCALL	    
-		xmlAddNotationDecl	(xmlValidCtxtPtr ctxt,
-					 xmlDtdPtr dtd,
-					 const xmlChar *name,
-					 const xmlChar *PublicID,
-					 const xmlChar *SystemID);
-#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlNotationTablePtr XMLCALL 
-		xmlCopyNotationTable	(xmlNotationTablePtr table);
-#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL		    
-		xmlFreeNotationTable	(xmlNotationTablePtr table);
-#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL		    
-		xmlDumpNotationDecl	(xmlBufferPtr buf,
-					 xmlNotationPtr nota);
-XMLPUBFUN void XMLCALL		    
-		xmlDumpNotationTable	(xmlBufferPtr buf,
-					 xmlNotationTablePtr table);
-#endif /* LIBXML_OUTPUT_ENABLED */
-
-/* Element Content */
-/* the non Doc version are being deprecated */
-XMLPUBFUN xmlElementContentPtr XMLCALL 
-		xmlNewElementContent	(const xmlChar *name,
-					 xmlElementContentType type);
-XMLPUBFUN xmlElementContentPtr XMLCALL 
-		xmlCopyElementContent	(xmlElementContentPtr content);
-XMLPUBFUN void XMLCALL		     
-		xmlFreeElementContent	(xmlElementContentPtr cur);
-/* the new versions with doc argument */
-XMLPUBFUN xmlElementContentPtr XMLCALL 
-		xmlNewDocElementContent	(xmlDocPtr doc,
-					 const xmlChar *name,
-					 xmlElementContentType type);
-XMLPUBFUN xmlElementContentPtr XMLCALL 
-		xmlCopyDocElementContent(xmlDocPtr doc,
-					 xmlElementContentPtr content);
-XMLPUBFUN void XMLCALL		     
-		xmlFreeDocElementContent(xmlDocPtr doc,
-					 xmlElementContentPtr cur);
-XMLPUBFUN void XMLCALL		     
-		xmlSnprintfElementContent(char *buf,
-					 int size,
-	                                 xmlElementContentPtr content,
-					 int englob);
-#ifdef LIBXML_OUTPUT_ENABLED
-/* DEPRECATED */
-XMLPUBFUN void XMLCALL		     
-		xmlSprintfElementContent(char *buf,
-	                                 xmlElementContentPtr content,
-					 int englob);
-#endif /* LIBXML_OUTPUT_ENABLED */
-/* DEPRECATED */
-
-/* Element */
-XMLPUBFUN xmlElementPtr XMLCALL	   
-		xmlAddElementDecl	(xmlValidCtxtPtr ctxt,
-					 xmlDtdPtr dtd,
-					 const xmlChar *name,
-					 xmlElementTypeVal type,
-					 xmlElementContentPtr content);
-#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlElementTablePtr XMLCALL 
-		xmlCopyElementTable	(xmlElementTablePtr table);
-#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL		   
-		xmlFreeElementTable	(xmlElementTablePtr table);
-#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL		   
-		xmlDumpElementTable	(xmlBufferPtr buf,
-					 xmlElementTablePtr table);
-XMLPUBFUN void XMLCALL		   
-		xmlDumpElementDecl	(xmlBufferPtr buf,
-					 xmlElementPtr elem);
-#endif /* LIBXML_OUTPUT_ENABLED */
-
-/* Enumeration */
-XMLPUBFUN xmlEnumerationPtr XMLCALL 
-		xmlCreateEnumeration	(const xmlChar *name);
-XMLPUBFUN void XMLCALL		   
-		xmlFreeEnumeration	(xmlEnumerationPtr cur);
-#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlEnumerationPtr XMLCALL  
-		xmlCopyEnumeration	(xmlEnumerationPtr cur);
-#endif /* LIBXML_TREE_ENABLED */
-
-/* Attribute */
-XMLPUBFUN xmlAttributePtr XMLCALL	    
-		xmlAddAttributeDecl	(xmlValidCtxtPtr ctxt,
-					 xmlDtdPtr dtd,
-					 const xmlChar *elem,
-					 const xmlChar *name,
-					 const xmlChar *ns,
-					 xmlAttributeType type,
-					 xmlAttributeDefault def,
-					 const xmlChar *defaultValue,
-					 xmlEnumerationPtr tree);
-#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlAttributeTablePtr XMLCALL 
-		xmlCopyAttributeTable  (xmlAttributeTablePtr table);
-#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL		     
-		xmlFreeAttributeTable  (xmlAttributeTablePtr table);
-#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL		     
-		xmlDumpAttributeTable  (xmlBufferPtr buf,
-					xmlAttributeTablePtr table);
-XMLPUBFUN void XMLCALL		     
-		xmlDumpAttributeDecl   (xmlBufferPtr buf,
-					xmlAttributePtr attr);
-#endif /* LIBXML_OUTPUT_ENABLED */
-
-/* IDs */
-XMLPUBFUN xmlIDPtr XMLCALL	
-		xmlAddID	       (xmlValidCtxtPtr ctxt,
-					xmlDocPtr doc,
-					const xmlChar *value,
-					xmlAttrPtr attr);
-XMLPUBFUN void XMLCALL		
-		xmlFreeIDTable	       (xmlIDTablePtr table);
-XMLPUBFUN xmlAttrPtr XMLCALL	
-		xmlGetID	       (xmlDocPtr doc,
-					const xmlChar *ID);
-XMLPUBFUN int XMLCALL		
-		xmlIsID		       (xmlDocPtr doc,
-					xmlNodePtr elem,
-					xmlAttrPtr attr);
-XMLPUBFUN int XMLCALL		
-		xmlRemoveID	       (xmlDocPtr doc, 
-					xmlAttrPtr attr);
-
-/* IDREFs */
-XMLPUBFUN xmlRefPtr XMLCALL	
-		xmlAddRef	       (xmlValidCtxtPtr ctxt,
-					xmlDocPtr doc,
-					const xmlChar *value,
-					xmlAttrPtr attr);
-XMLPUBFUN void XMLCALL		
-		xmlFreeRefTable	       (xmlRefTablePtr table);
-XMLPUBFUN int XMLCALL		
-		xmlIsRef	       (xmlDocPtr doc,
-					xmlNodePtr elem,
-					xmlAttrPtr attr);
-XMLPUBFUN int XMLCALL		
-		xmlRemoveRef	       (xmlDocPtr doc, 
-					xmlAttrPtr attr);
-XMLPUBFUN xmlListPtr XMLCALL	
-		xmlGetRefs	       (xmlDocPtr doc,
-					const xmlChar *ID);
-
-/**
- * The public function calls related to validity checking.
- */
-#ifdef LIBXML_VALID_ENABLED
-/* Allocate/Release Validation Contexts */
-XMLPUBFUN xmlValidCtxtPtr XMLCALL	    
-		xmlNewValidCtxt(void);
-XMLPUBFUN void XMLCALL		    
-		xmlFreeValidCtxt(xmlValidCtxtPtr);
-
-XMLPUBFUN int XMLCALL		
-		xmlValidateRoot		(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc);
-XMLPUBFUN int XMLCALL		
-		xmlValidateElementDecl	(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc,
-		                         xmlElementPtr elem);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlValidNormalizeAttributeValue(xmlDocPtr doc,
-					 xmlNodePtr elem,
-					 const xmlChar *name,
-					 const xmlChar *value);
-XMLPUBFUN xmlChar * XMLCALL	
-		xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc,
-					 xmlNodePtr elem,
-					 const xmlChar *name,
-					 const xmlChar *value);
-XMLPUBFUN int XMLCALL		
-		xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc,
-		                         xmlAttributePtr attr);
-XMLPUBFUN int XMLCALL		
-		xmlValidateAttributeValue(xmlAttributeType type,
-					 const xmlChar *value);
-XMLPUBFUN int XMLCALL		
-		xmlValidateNotationDecl	(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc,
-		                         xmlNotationPtr nota);
-XMLPUBFUN int XMLCALL		
-		xmlValidateDtd		(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc,
-					 xmlDtdPtr dtd);
-XMLPUBFUN int XMLCALL		
-		xmlValidateDtdFinal	(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc);
-XMLPUBFUN int XMLCALL		
-		xmlValidateDocument	(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc);
-XMLPUBFUN int XMLCALL		
-		xmlValidateElement	(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc,
-					 xmlNodePtr elem);
-XMLPUBFUN int XMLCALL		
-		xmlValidateOneElement	(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc,
-		                         xmlNodePtr elem);
-XMLPUBFUN int XMLCALL	
-		xmlValidateOneAttribute	(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc,
-					 xmlNodePtr	elem,
-					 xmlAttrPtr attr,
-					 const xmlChar *value);
-XMLPUBFUN int XMLCALL		
-		xmlValidateOneNamespace	(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc,
-					 xmlNodePtr elem,
-					 const xmlChar *prefix,
-					 xmlNsPtr ns,
-					 const xmlChar *value);
-XMLPUBFUN int XMLCALL		
-		xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc);
-#endif /* LIBXML_VALID_ENABLED */
-
-#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN int XMLCALL		
-		xmlValidateNotationUse	(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc,
-					 const xmlChar *notationName);
-#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
-
-XMLPUBFUN int XMLCALL		
-		xmlIsMixedElement	(xmlDocPtr doc,
-					 const xmlChar *name);
-XMLPUBFUN xmlAttributePtr XMLCALL	
-		xmlGetDtdAttrDesc	(xmlDtdPtr dtd,
-					 const xmlChar *elem,
-					 const xmlChar *name);
-XMLPUBFUN xmlAttributePtr XMLCALL	
-		xmlGetDtdQAttrDesc	(xmlDtdPtr dtd,
-					 const xmlChar *elem,
-					 const xmlChar *name,
-					 const xmlChar *prefix);
-XMLPUBFUN xmlNotationPtr XMLCALL	
-		xmlGetDtdNotationDesc	(xmlDtdPtr dtd,
-					 const xmlChar *name);
-XMLPUBFUN xmlElementPtr XMLCALL	
-		xmlGetDtdQElementDesc	(xmlDtdPtr dtd,
-					 const xmlChar *name,
-					 const xmlChar *prefix);
-XMLPUBFUN xmlElementPtr XMLCALL	
-		xmlGetDtdElementDesc	(xmlDtdPtr dtd,
-					 const xmlChar *name);
-
-#ifdef LIBXML_VALID_ENABLED
-
-XMLPUBFUN int XMLCALL		
-		xmlValidGetPotentialChildren(xmlElementContent *ctree,
-					 const xmlChar **names,
-					 int *len,
-					 int max);
-
-XMLPUBFUN int XMLCALL		
-		xmlValidGetValidElements(xmlNode *prev,
-					 xmlNode *next,
-					 const xmlChar **names,
-					 int max);
-XMLPUBFUN int XMLCALL		
-		xmlValidateNameValue	(const xmlChar *value);
-XMLPUBFUN int XMLCALL		
-		xmlValidateNamesValue	(const xmlChar *value);
-XMLPUBFUN int XMLCALL		
-		xmlValidateNmtokenValue	(const xmlChar *value);
-XMLPUBFUN int XMLCALL		
-		xmlValidateNmtokensValue(const xmlChar *value);
-
-#ifdef LIBXML_REGEXP_ENABLED
-/*
- * Validation based on the regexp support
- */
-XMLPUBFUN int XMLCALL		
-		xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
-					 xmlElementPtr elem);
-
-XMLPUBFUN int XMLCALL		
-		xmlValidatePushElement	(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc,
-					 xmlNodePtr elem,
-					 const xmlChar *qname);
-XMLPUBFUN int XMLCALL		
-		xmlValidatePushCData	(xmlValidCtxtPtr ctxt,
-					 const xmlChar *data,
-					 int len);
-XMLPUBFUN int XMLCALL		
-		xmlValidatePopElement	(xmlValidCtxtPtr ctxt,
-					 xmlDocPtr doc,
-					 xmlNodePtr elem,
-					 const xmlChar *qname);
-#endif /* LIBXML_REGEXP_ENABLED */
-#endif /* LIBXML_VALID_ENABLED */
-#ifdef __cplusplus
-}
-#endif
-#endif /* __XML_VALID_H__ */
diff --git a/interfaces/ext/libxml/xinclude.h b/interfaces/ext/libxml/xinclude.h
deleted file mode 100644
index ba9c9b5..0000000
--- a/interfaces/ext/libxml/xinclude.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Summary: implementation of XInclude
- * Description: API to handle XInclude processing,
- * implements the
- * World Wide Web Consortium Last Call Working Draft 10 November 2003
- * http://www.w3.org/TR/2003/WD-xinclude-20031110
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_XINCLUDE_H__
-#define __XML_XINCLUDE_H__
-
-#include <libxml/xmlversion.h>
-#include <libxml/tree.h>
-
-#ifdef LIBXML_XINCLUDE_ENABLED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * XINCLUDE_NS:
- *
- * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
- */
-#define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
-/**
- * XINCLUDE_OLD_NS:
- *
- * Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
- */
-#define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
-/**
- * XINCLUDE_NODE:
- *
- * Macro defining "include"
- */
-#define XINCLUDE_NODE (const xmlChar *) "include"
-/**
- * XINCLUDE_FALLBACK:
- *
- * Macro defining "fallback"
- */
-#define XINCLUDE_FALLBACK (const xmlChar *) "fallback"
-/**
- * XINCLUDE_HREF:
- *
- * Macro defining "href"
- */
-#define XINCLUDE_HREF (const xmlChar *) "href"
-/**
- * XINCLUDE_PARSE:
- *
- * Macro defining "parse"
- */
-#define XINCLUDE_PARSE (const xmlChar *) "parse"
-/**
- * XINCLUDE_PARSE_XML:
- *
- * Macro defining "xml"
- */
-#define XINCLUDE_PARSE_XML (const xmlChar *) "xml"
-/**
- * XINCLUDE_PARSE_TEXT:
- *
- * Macro defining "text"
- */
-#define XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
-/**
- * XINCLUDE_PARSE_ENCODING:
- *
- * Macro defining "encoding"
- */
-#define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
-/**
- * XINCLUDE_PARSE_XPOINTER:
- *
- * Macro defining "xpointer"
- */
-#define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
-
-typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
-typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
-
-/*
- * standalone processing
- */
-XMLPUBFUN int XMLCALL	
-		xmlXIncludeProcess	(xmlDocPtr doc);
-XMLPUBFUN int XMLCALL	
-		xmlXIncludeProcessFlags	(xmlDocPtr doc,
-					 int flags);
-XMLPUBFUN int XMLCALL	
-		xmlXIncludeProcessFlagsData(xmlDocPtr doc,
-					 int flags,
-					 void *data);
-XMLPUBFUN int XMLCALL	
-		xmlXIncludeProcessTree	(xmlNodePtr tree);
-XMLPUBFUN int XMLCALL	
-		xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
-					 int flags);
-/*
- * contextual processing
- */
-XMLPUBFUN xmlXIncludeCtxtPtr XMLCALL
-		xmlXIncludeNewContext	(xmlDocPtr doc);
-XMLPUBFUN int XMLCALL
-		xmlXIncludeSetFlags	(xmlXIncludeCtxtPtr ctxt,
-					 int flags);
-XMLPUBFUN void XMLCALL
-		xmlXIncludeFreeContext	(xmlXIncludeCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
-		xmlXIncludeProcessNode	(xmlXIncludeCtxtPtr ctxt,
-					 xmlNodePtr tree);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_XINCLUDE_ENABLED */
-
-#endif /* __XML_XINCLUDE_H__ */
diff --git a/interfaces/ext/libxml/xlink.h b/interfaces/ext/libxml/xlink.h
deleted file mode 100644
index 083c7ed..0000000
--- a/interfaces/ext/libxml/xlink.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Summary: unfinished XLink detection module
- * Description: unfinished XLink detection module
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_XLINK_H__
-#define __XML_XLINK_H__
-
-#include <libxml/xmlversion.h>
-#include <libxml/tree.h>
-
-#ifdef LIBXML_XPTR_ENABLED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Various defines for the various Link properties.
- *
- * NOTE: the link detection layer will try to resolve QName expansion
- *       of namespaces. If "foo" is the prefix for "http://foo.com/"
- *       then the link detection layer will expand role="foo:myrole"
- *       to "http://foo.com/:myrole".
- * NOTE: the link detection layer will expand URI-Refences found on
- *       href attributes by using the base mechanism if found.
- */
-typedef xmlChar *xlinkHRef;
-typedef xmlChar *xlinkRole;
-typedef xmlChar *xlinkTitle;
-
-typedef enum {
-    XLINK_TYPE_NONE = 0,
-    XLINK_TYPE_SIMPLE,
-    XLINK_TYPE_EXTENDED,
-    XLINK_TYPE_EXTENDED_SET
-} xlinkType;
-
-typedef enum {
-    XLINK_SHOW_NONE = 0,
-    XLINK_SHOW_NEW,
-    XLINK_SHOW_EMBED,
-    XLINK_SHOW_REPLACE
-} xlinkShow;
-
-typedef enum {
-    XLINK_ACTUATE_NONE = 0,
-    XLINK_ACTUATE_AUTO,
-    XLINK_ACTUATE_ONREQUEST
-} xlinkActuate;
-
-/**
- * xlinkNodeDetectFunc:
- * @ctx:  user data pointer
- * @node:  the node to check
- * 
- * This is the prototype for the link detection routine.
- * It calls the default link detection callbacks upon link detection.
- */
-typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node);
-
-/*
- * The link detection module interact with the upper layers using
- * a set of callback registered at parsing time.
- */
-
-/**
- * xlinkSimpleLinkFunk:
- * @ctx:  user data pointer
- * @node:  the node carrying the link
- * @href:  the target of the link
- * @role:  the role string
- * @title:  the link title
- *
- * This is the prototype for a simple link detection callback.
- */
-typedef void
-(*xlinkSimpleLinkFunk)	(void *ctx,
-			 xmlNodePtr node,
-			 const xlinkHRef href,
-			 const xlinkRole role,
-			 const xlinkTitle title);
-
-/**
- * xlinkExtendedLinkFunk:
- * @ctx:  user data pointer
- * @node:  the node carrying the link
- * @nbLocators: the number of locators detected on the link
- * @hrefs:  pointer to the array of locator hrefs
- * @roles:  pointer to the array of locator roles
- * @nbArcs: the number of arcs detected on the link
- * @from:  pointer to the array of source roles found on the arcs
- * @to:  pointer to the array of target roles found on the arcs
- * @show:  array of values for the show attributes found on the arcs
- * @actuate:  array of values for the actuate attributes found on the arcs
- * @nbTitles: the number of titles detected on the link
- * @title:  array of titles detected on the link
- * @langs:  array of xml:lang values for the titles
- *
- * This is the prototype for a extended link detection callback.
- */
-typedef void
-(*xlinkExtendedLinkFunk)(void *ctx,
-			 xmlNodePtr node,
-			 int nbLocators,
-			 const xlinkHRef *hrefs,
-			 const xlinkRole *roles,
-			 int nbArcs,
-			 const xlinkRole *from,
-			 const xlinkRole *to,
-			 xlinkShow *show,
-			 xlinkActuate *actuate,
-			 int nbTitles,
-			 const xlinkTitle *titles,
-			 const xmlChar **langs);
-
-/**
- * xlinkExtendedLinkSetFunk:
- * @ctx:  user data pointer
- * @node:  the node carrying the link
- * @nbLocators: the number of locators detected on the link
- * @hrefs:  pointer to the array of locator hrefs
- * @roles:  pointer to the array of locator roles
- * @nbTitles: the number of titles detected on the link
- * @title:  array of titles detected on the link
- * @langs:  array of xml:lang values for the titles
- *
- * This is the prototype for a extended link set detection callback.
- */
-typedef void
-(*xlinkExtendedLinkSetFunk)	(void *ctx,
-				 xmlNodePtr node,
-				 int nbLocators,
-				 const xlinkHRef *hrefs,
-				 const xlinkRole *roles,
-				 int nbTitles,
-				 const xlinkTitle *titles,
-				 const xmlChar **langs);
-
-/**
- * This is the structure containing a set of Links detection callbacks.
- *
- * There is no default xlink callbacks, if one want to get link
- * recognition activated, those call backs must be provided before parsing.
- */
-typedef struct _xlinkHandler xlinkHandler;
-typedef xlinkHandler *xlinkHandlerPtr;
-struct _xlinkHandler {
-    xlinkSimpleLinkFunk simple;
-    xlinkExtendedLinkFunk extended;
-    xlinkExtendedLinkSetFunk set;
-};
-
-/*
- * The default detection routine, can be overridden, they call the default
- * detection callbacks. 
- */
-
-XMLPUBFUN xlinkNodeDetectFunc XMLCALL	
-		xlinkGetDefaultDetect	(void);
-XMLPUBFUN void XMLCALL			
-		xlinkSetDefaultDetect	(xlinkNodeDetectFunc func);
-
-/*
- * Routines to set/get the default handlers.
- */
-XMLPUBFUN xlinkHandlerPtr XMLCALL	
-		xlinkGetDefaultHandler	(void);
-XMLPUBFUN void XMLCALL		
-		xlinkSetDefaultHandler	(xlinkHandlerPtr handler);
-
-/*
- * Link detection module itself.
- */
-XMLPUBFUN xlinkType XMLCALL	 
-		xlinkIsLink		(xmlDocPtr doc,
-					 xmlNodePtr node);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_XPTR_ENABLED */
-
-#endif /* __XML_XLINK_H__ */
diff --git a/interfaces/ext/libxml/xmlIO.h b/interfaces/ext/libxml/xmlIO.h
deleted file mode 100644
index eea9ed6..0000000
--- a/interfaces/ext/libxml/xmlIO.h
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * Summary: interface for the I/O interfaces used by the parser
- * Description: interface for the I/O interfaces used by the parser
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_IO_H__
-#define __XML_IO_H__
-
-#include <stdio.h>
-#include <libxml/xmlversion.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Those are the functions and datatypes for the parser input
- * I/O structures.
- */
-
-/**
- * xmlInputMatchCallback:
- * @filename: the filename or URI
- *
- * Callback used in the I/O Input API to detect if the current handler 
- * can provide input fonctionnalities for this resource.
- *
- * Returns 1 if yes and 0 if another Input module should be used
- */
-typedef int (XMLCALL *xmlInputMatchCallback) (char const *filename);
-/**
- * xmlInputOpenCallback:
- * @filename: the filename or URI
- *
- * Callback used in the I/O Input API to open the resource
- *
- * Returns an Input context or NULL in case or error
- */
-typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename);
-/**
- * xmlInputReadCallback:
- * @context:  an Input context
- * @buffer:  the buffer to store data read
- * @len:  the length of the buffer in bytes
- *
- * Callback used in the I/O Input API to read the resource
- *
- * Returns the number of bytes read or -1 in case of error
- */
-typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int len);
-/**
- * xmlInputCloseCallback:
- * @context:  an Input context
- *
- * Callback used in the I/O Input API to close the resource
- *
- * Returns 0 or -1 in case of error
- */
-typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
-
-#ifdef LIBXML_OUTPUT_ENABLED
-/*
- * Those are the functions and datatypes for the library output
- * I/O structures.
- */
-
-/**
- * xmlOutputMatchCallback:
- * @filename: the filename or URI
- *
- * Callback used in the I/O Output API to detect if the current handler 
- * can provide output fonctionnalities for this resource.
- *
- * Returns 1 if yes and 0 if another Output module should be used
- */
-typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename);
-/**
- * xmlOutputOpenCallback:
- * @filename: the filename or URI
- *
- * Callback used in the I/O Output API to open the resource
- *
- * Returns an Output context or NULL in case or error
- */
-typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename);
-/**
- * xmlOutputWriteCallback:
- * @context:  an Output context
- * @buffer:  the buffer of data to write
- * @len:  the length of the buffer in bytes
- *
- * Callback used in the I/O Output API to write to the resource
- *
- * Returns the number of bytes written or -1 in case of error
- */
-typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buffer,
-                                       int len);
-/**
- * xmlOutputCloseCallback:
- * @context:  an Output context
- *
- * Callback used in the I/O Output API to close the resource
- *
- * Returns 0 or -1 in case of error
- */
-typedef int (XMLCALL *xmlOutputCloseCallback) (void * context);
-#endif /* LIBXML_OUTPUT_ENABLED */
-
-#ifdef __cplusplus
-}
-#endif
-
-#include <libxml/globals.h>
-#include <libxml/tree.h>
-#include <libxml/parser.h>
-#include <libxml/encoding.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-struct _xmlParserInputBuffer {
-    void*                  context;
-    xmlInputReadCallback   readcallback;
-    xmlInputCloseCallback  closecallback;
-    
-    xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
-    
-    xmlBufferPtr buffer;    /* Local buffer encoded in UTF-8 */
-    xmlBufferPtr raw;       /* if encoder != NULL buffer for raw input */
-    int	compressed;	    /* -1=unknown, 0=not compressed, 1=compressed */
-    int error;
-    unsigned long rawconsumed;/* amount consumed from raw */
-};
-
-
-#ifdef LIBXML_OUTPUT_ENABLED
-struct _xmlOutputBuffer {
-    void*                   context;
-    xmlOutputWriteCallback  writecallback;
-    xmlOutputCloseCallback  closecallback;
-    
-    xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
-    
-    xmlBufferPtr buffer;    /* Local buffer encoded in UTF-8 or ISOLatin */
-    xmlBufferPtr conv;      /* if encoder != NULL buffer for output */
-    int written;            /* total number of byte written */
-    int error;
-};
-#endif /* LIBXML_OUTPUT_ENABLED */
-
-/*
- * Interfaces for input
- */
-XMLPUBFUN void XMLCALL	
-	xmlCleanupInputCallbacks		(void);
-
-XMLPUBFUN int XMLCALL
-	xmlPopInputCallbacks			(void);
-
-XMLPUBFUN void XMLCALL	
-	xmlRegisterDefaultInputCallbacks	(void);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
-	xmlAllocParserInputBuffer		(xmlCharEncoding enc);
-
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
-	xmlParserInputBufferCreateFilename	(const char *URI,
-                                                 xmlCharEncoding enc);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
-	xmlParserInputBufferCreateFile		(FILE *file,
-                                                 xmlCharEncoding enc);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
-	xmlParserInputBufferCreateFd		(int fd,
-	                                         xmlCharEncoding enc);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
-	xmlParserInputBufferCreateMem		(const char *mem, int size,
-	                                         xmlCharEncoding enc);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
-	xmlParserInputBufferCreateStatic	(const char *mem, int size,
-	                                         xmlCharEncoding enc);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
-	xmlParserInputBufferCreateIO		(xmlInputReadCallback   ioread,
-						 xmlInputCloseCallback  ioclose,
-						 void *ioctx,
-	                                         xmlCharEncoding enc);
-XMLPUBFUN int XMLCALL	
-	xmlParserInputBufferRead		(xmlParserInputBufferPtr in,
-						 int len);
-XMLPUBFUN int XMLCALL	
-	xmlParserInputBufferGrow		(xmlParserInputBufferPtr in,
-						 int len);
-XMLPUBFUN int XMLCALL	
-	xmlParserInputBufferPush		(xmlParserInputBufferPtr in,
-						 int len,
-						 const char *buf);
-XMLPUBFUN void XMLCALL	
-	xmlFreeParserInputBuffer		(xmlParserInputBufferPtr in);
-XMLPUBFUN char * XMLCALL	
-	xmlParserGetDirectory			(const char *filename);
-
-XMLPUBFUN int XMLCALL     
-	xmlRegisterInputCallbacks		(xmlInputMatchCallback matchFunc,
-						 xmlInputOpenCallback openFunc,
-						 xmlInputReadCallback readFunc,
-						 xmlInputCloseCallback closeFunc);
-
-xmlParserInputBufferPtr
-	__xmlParserInputBufferCreateFilename(const char *URI,
-										xmlCharEncoding enc);
-
-#ifdef LIBXML_OUTPUT_ENABLED
-/*
- * Interfaces for output
- */
-XMLPUBFUN void XMLCALL	
-	xmlCleanupOutputCallbacks		(void);
-XMLPUBFUN void XMLCALL	
-	xmlRegisterDefaultOutputCallbacks(void);
-XMLPUBFUN xmlOutputBufferPtr XMLCALL
-	xmlAllocOutputBuffer		(xmlCharEncodingHandlerPtr encoder);
-
-XMLPUBFUN xmlOutputBufferPtr XMLCALL
-	xmlOutputBufferCreateFilename	(const char *URI,
-					 xmlCharEncodingHandlerPtr encoder,
-					 int compression);
-
-XMLPUBFUN xmlOutputBufferPtr XMLCALL
-	xmlOutputBufferCreateFile	(FILE *file,
-					 xmlCharEncodingHandlerPtr encoder);
-
-XMLPUBFUN xmlOutputBufferPtr XMLCALL
-	xmlOutputBufferCreateBuffer	(xmlBufferPtr buffer,
-					 xmlCharEncodingHandlerPtr encoder);
-
-XMLPUBFUN xmlOutputBufferPtr XMLCALL
-	xmlOutputBufferCreateFd		(int fd,
-					 xmlCharEncodingHandlerPtr encoder);
-
-XMLPUBFUN xmlOutputBufferPtr XMLCALL
-	xmlOutputBufferCreateIO		(xmlOutputWriteCallback   iowrite,
-					 xmlOutputCloseCallback  ioclose,
-					 void *ioctx,
-					 xmlCharEncodingHandlerPtr encoder);
-
-XMLPUBFUN int XMLCALL	
-	xmlOutputBufferWrite		(xmlOutputBufferPtr out,
-					 int len,
-					 const char *buf);
-XMLPUBFUN int XMLCALL	
-	xmlOutputBufferWriteString	(xmlOutputBufferPtr out,
-					 const char *str);
-XMLPUBFUN int XMLCALL	
-	xmlOutputBufferWriteEscape	(xmlOutputBufferPtr out,
-					 const xmlChar *str,
-					 xmlCharEncodingOutputFunc escaping);
-
-XMLPUBFUN int XMLCALL	
-	xmlOutputBufferFlush		(xmlOutputBufferPtr out);
-XMLPUBFUN int XMLCALL	
-	xmlOutputBufferClose		(xmlOutputBufferPtr out);
-
-XMLPUBFUN int XMLCALL     
-	xmlRegisterOutputCallbacks	(xmlOutputMatchCallback matchFunc,
-					 xmlOutputOpenCallback openFunc,
-					 xmlOutputWriteCallback writeFunc,
-					 xmlOutputCloseCallback closeFunc);
-
-xmlOutputBufferPtr
-	__xmlOutputBufferCreateFilename(const char *URI,
-                              xmlCharEncodingHandlerPtr encoder,
-                              int compression);
-
-#ifdef LIBXML_HTTP_ENABLED
-/*  This function only exists if HTTP support built into the library  */
-XMLPUBFUN void XMLCALL	
-	xmlRegisterHTTPPostCallbacks	(void );
-#endif /* LIBXML_HTTP_ENABLED */
-	
-#endif /* LIBXML_OUTPUT_ENABLED */
-
-XMLPUBFUN xmlParserInputPtr XMLCALL
-	xmlCheckHTTPInput		(xmlParserCtxtPtr ctxt,
-					 xmlParserInputPtr ret);
-
-/*
- * A predefined entity loader disabling network accesses
- */
-XMLPUBFUN xmlParserInputPtr XMLCALL 
-	xmlNoNetExternalEntityLoader	(const char *URL,
-					 const char *ID,
-					 xmlParserCtxtPtr ctxt);
-
-/* 
- * xmlNormalizeWindowsPath is obsolete, don't use it. 
- * Check xmlCanonicPath in uri.h for a better alternative.
- */
-XMLPUBFUN xmlChar * XMLCALL 
-	xmlNormalizeWindowsPath		(const xmlChar *path);
-
-XMLPUBFUN int XMLCALL	
-	xmlCheckFilename		(const char *path);
-/**
- * Default 'file://' protocol callbacks 
- */
-XMLPUBFUN int XMLCALL	
-	xmlFileMatch 			(const char *filename);
-XMLPUBFUN void * XMLCALL	
-	xmlFileOpen 			(const char *filename);
-XMLPUBFUN int XMLCALL	
-	xmlFileRead 			(void * context, 
-					 char * buffer, 
-					 int len);
-XMLPUBFUN int XMLCALL	
-	xmlFileClose 			(void * context);
-
-/**
- * Default 'http://' protocol callbacks 
- */
-#ifdef LIBXML_HTTP_ENABLED
-XMLPUBFUN int XMLCALL	
-	xmlIOHTTPMatch 			(const char *filename);
-XMLPUBFUN void * XMLCALL	
-	xmlIOHTTPOpen 			(const char *filename);
-#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void * XMLCALL	
-	xmlIOHTTPOpenW			(const char * post_uri,
-					 int   compression );
-#endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN int XMLCALL 	
-	xmlIOHTTPRead			(void * context, 
-					 char * buffer, 
-					 int len);
-XMLPUBFUN int XMLCALL	
-	xmlIOHTTPClose 			(void * context);
-#endif /* LIBXML_HTTP_ENABLED */
-
-/**
- * Default 'ftp://' protocol callbacks 
- */
-#ifdef LIBXML_FTP_ENABLED 
-XMLPUBFUN int XMLCALL	
-	xmlIOFTPMatch 			(const char *filename);
-XMLPUBFUN void * XMLCALL	
-	xmlIOFTPOpen 			(const char *filename);
-XMLPUBFUN int XMLCALL 	
-	xmlIOFTPRead			(void * context, 
-					 char * buffer, 
-					 int len);
-XMLPUBFUN int XMLCALL 	
-	xmlIOFTPClose 			(void * context);
-#endif /* LIBXML_FTP_ENABLED */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __XML_IO_H__ */
diff --git a/interfaces/ext/libxml/xmlautomata.h b/interfaces/ext/libxml/xmlautomata.h
deleted file mode 100644
index f98b55e..0000000
--- a/interfaces/ext/libxml/xmlautomata.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Summary: API to build regexp automata
- * Description: the API to build regexp automata
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_AUTOMATA_H__
-#define __XML_AUTOMATA_H__
-
-#include <libxml/xmlversion.h>
-#include <libxml/tree.h>
-
-#ifdef LIBXML_REGEXP_ENABLED
-#ifdef LIBXML_AUTOMATA_ENABLED
-#include <libxml/xmlregexp.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * xmlAutomataPtr:
- *
- * A libxml automata description, It can be compiled into a regexp
- */
-typedef struct _xmlAutomata xmlAutomata;
-typedef xmlAutomata *xmlAutomataPtr;
-
-/**
- * xmlAutomataStatePtr:
- *
- * A state int the automata description,
- */
-typedef struct _xmlAutomataState xmlAutomataState;
-typedef xmlAutomataState *xmlAutomataStatePtr;
-
-/*
- * Building API
- */
-XMLPUBFUN xmlAutomataPtr XMLCALL		
-		    xmlNewAutomata		(void);
-XMLPUBFUN void XMLCALL			
-		    xmlFreeAutomata		(xmlAutomataPtr am);
-
-XMLPUBFUN xmlAutomataStatePtr XMLCALL	
-		    xmlAutomataGetInitState	(xmlAutomataPtr am);
-XMLPUBFUN int XMLCALL			
-		    xmlAutomataSetFinalState	(xmlAutomataPtr am,
-						 xmlAutomataStatePtr state);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL	
-		    xmlAutomataNewState		(xmlAutomataPtr am);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL	
-		    xmlAutomataNewTransition	(xmlAutomataPtr am,
-						 xmlAutomataStatePtr from,
-						 xmlAutomataStatePtr to,
-						 const xmlChar *token,
-						 void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL	
-		    xmlAutomataNewTransition2	(xmlAutomataPtr am,
-						 xmlAutomataStatePtr from,
-						 xmlAutomataStatePtr to,
-						 const xmlChar *token,
-						 const xmlChar *token2,
-						 void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL
-                    xmlAutomataNewNegTrans	(xmlAutomataPtr am,
-						 xmlAutomataStatePtr from,
-						 xmlAutomataStatePtr to,
-						 const xmlChar *token,
-						 const xmlChar *token2,
-						 void *data);
-
-XMLPUBFUN xmlAutomataStatePtr XMLCALL	
-		    xmlAutomataNewCountTrans	(xmlAutomataPtr am,
-						 xmlAutomataStatePtr from,
-						 xmlAutomataStatePtr to,
-						 const xmlChar *token,
-						 int min,
-						 int max,
-						 void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL	
-		    xmlAutomataNewCountTrans2	(xmlAutomataPtr am,
-						 xmlAutomataStatePtr from,
-						 xmlAutomataStatePtr to,
-						 const xmlChar *token,
-						 const xmlChar *token2,
-						 int min,
-						 int max,
-						 void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL	
-		    xmlAutomataNewOnceTrans	(xmlAutomataPtr am,
-						 xmlAutomataStatePtr from,
-						 xmlAutomataStatePtr to,
-						 const xmlChar *token,
-						 int min,
-						 int max,
-						 void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL
-		    xmlAutomataNewOnceTrans2	(xmlAutomataPtr am, 
-						 xmlAutomataStatePtr from,
-						 xmlAutomataStatePtr to, 
-						 const xmlChar *token,
-						 const xmlChar *token2,
-						 int min, 
-						 int max, 
-						 void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL	
-		    xmlAutomataNewAllTrans	(xmlAutomataPtr am,
-						 xmlAutomataStatePtr from,
-						 xmlAutomataStatePtr to,
-						 int lax);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL	
-		    xmlAutomataNewEpsilon	(xmlAutomataPtr am,
-						 xmlAutomataStatePtr from,
-						 xmlAutomataStatePtr to);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL	
-		    xmlAutomataNewCountedTrans	(xmlAutomataPtr am,
-						 xmlAutomataStatePtr from,
-						 xmlAutomataStatePtr to,
-						 int counter);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL	
-		    xmlAutomataNewCounterTrans	(xmlAutomataPtr am,
-						 xmlAutomataStatePtr from,
-						 xmlAutomataStatePtr to,
-						 int counter);
-XMLPUBFUN int XMLCALL			
-		    xmlAutomataNewCounter	(xmlAutomataPtr am,
-						 int min,
-						 int max);
-
-XMLPUBFUN xmlRegexpPtr XMLCALL		
-		    xmlAutomataCompile		(xmlAutomataPtr am);
-XMLPUBFUN int XMLCALL	    		
-		    xmlAutomataIsDeterminist	(xmlAutomataPtr am);
-
-#ifdef __cplusplus
-}
-#endif 
-
-#endif /* LIBXML_AUTOMATA_ENABLED */
-#endif /* LIBXML_REGEXP_ENABLED */
-
-#endif /* __XML_AUTOMATA_H__ */
diff --git a/interfaces/ext/libxml/xmlerror.h b/interfaces/ext/libxml/xmlerror.h
deleted file mode 100644
index 7cce9c3..0000000
--- a/interfaces/ext/libxml/xmlerror.h
+++ /dev/null
@@ -1,944 +0,0 @@
-/*
- * Summary: error handling
- * Description: the API used to report errors
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#include <libxml/parser.h>
-
-#ifndef __XML_ERROR_H__
-#define __XML_ERROR_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * xmlErrorLevel:
- *
- * Indicates the level of an error
- */
-typedef enum {
-    XML_ERR_NONE = 0,
-    XML_ERR_WARNING = 1,	/* A simple warning */
-    XML_ERR_ERROR = 2,		/* A recoverable error */
-    XML_ERR_FATAL = 3		/* A fatal error */
-} xmlErrorLevel;
-
-/**
- * xmlErrorDomain:
- *
- * Indicates where an error may have come from
- */
-typedef enum {
-    XML_FROM_NONE = 0,
-    XML_FROM_PARSER,	/* The XML parser */
-    XML_FROM_TREE,	/* The tree module */
-    XML_FROM_NAMESPACE,	/* The XML Namespace module */
-    XML_FROM_DTD,	/* The XML DTD validation with parser context*/
-    XML_FROM_HTML,	/* The HTML parser */
-    XML_FROM_MEMORY,	/* The memory allocator */
-    XML_FROM_OUTPUT,	/* The serialization code */
-    XML_FROM_IO,	/* The Input/Output stack */
-    XML_FROM_FTP,	/* The FTP module */
-    XML_FROM_HTTP,	/* The HTTP module */
-    XML_FROM_XINCLUDE,	/* The XInclude processing */
-    XML_FROM_XPATH,	/* The XPath module */
-    XML_FROM_XPOINTER,	/* The XPointer module */
-    XML_FROM_REGEXP,	/* The regular expressions module */
-    XML_FROM_DATATYPE,	/* The W3C XML Schemas Datatype module */
-    XML_FROM_SCHEMASP,	/* The W3C XML Schemas parser module */
-    XML_FROM_SCHEMASV,	/* The W3C XML Schemas validation module */
-    XML_FROM_RELAXNGP,	/* The Relax-NG parser module */
-    XML_FROM_RELAXNGV,	/* The Relax-NG validator module */
-    XML_FROM_CATALOG,	/* The Catalog module */
-    XML_FROM_C14N,	/* The Canonicalization module */
-    XML_FROM_XSLT,	/* The XSLT engine from libxslt */
-    XML_FROM_VALID,	/* The XML DTD validation with valid context */
-    XML_FROM_CHECK,	/* The error checking module */
-    XML_FROM_WRITER,	/* The xmlwriter module */
-    XML_FROM_MODULE,	/* The dynamically loaded module module*/
-    XML_FROM_I18N,	/* The module handling character conversion */
-    XML_FROM_SCHEMATRONV	/* The Schematron validator module */
-} xmlErrorDomain;
-
-/**
- * xmlError:
- *
- * An XML Error instance.
- */
-
-typedef struct _xmlError xmlError;
-typedef xmlError *xmlErrorPtr;
-struct _xmlError {
-    int		domain;	/* What part of the library raised this error */
-    int		code;	/* The error code, e.g. an xmlParserError */
-    char       *message;/* human-readable informative error message */
-    xmlErrorLevel level;/* how consequent is the error */
-    char       *file;	/* the filename */
-    int		line;	/* the line number if available */
-    char       *str1;	/* extra string information */
-    char       *str2;	/* extra string information */
-    char       *str3;	/* extra string information */
-    int		int1;	/* extra number information */
-    int		int2;	/* column number of the error or 0 if N/A (todo: rename this field when we would break ABI) */
-    void       *ctxt;   /* the parser context if available */
-    void       *node;   /* the node in the tree */
-};
-
-/**
- * xmlParserError:
- *
- * This is an error that the XML (or HTML) parser can generate
- */
-typedef enum {
-    XML_ERR_OK = 0,
-    XML_ERR_INTERNAL_ERROR, /* 1 */
-    XML_ERR_NO_MEMORY, /* 2 */
-    XML_ERR_DOCUMENT_START, /* 3 */
-    XML_ERR_DOCUMENT_EMPTY, /* 4 */
-    XML_ERR_DOCUMENT_END, /* 5 */
-    XML_ERR_INVALID_HEX_CHARREF, /* 6 */
-    XML_ERR_INVALID_DEC_CHARREF, /* 7 */
-    XML_ERR_INVALID_CHARREF, /* 8 */
-    XML_ERR_INVALID_CHAR, /* 9 */
-    XML_ERR_CHARREF_AT_EOF, /* 10 */
-    XML_ERR_CHARREF_IN_PROLOG, /* 11 */
-    XML_ERR_CHARREF_IN_EPILOG, /* 12 */
-    XML_ERR_CHARREF_IN_DTD, /* 13 */
-    XML_ERR_ENTITYREF_AT_EOF, /* 14 */
-    XML_ERR_ENTITYREF_IN_PROLOG, /* 15 */
-    XML_ERR_ENTITYREF_IN_EPILOG, /* 16 */
-    XML_ERR_ENTITYREF_IN_DTD, /* 17 */
-    XML_ERR_PEREF_AT_EOF, /* 18 */
-    XML_ERR_PEREF_IN_PROLOG, /* 19 */
-    XML_ERR_PEREF_IN_EPILOG, /* 20 */
-    XML_ERR_PEREF_IN_INT_SUBSET, /* 21 */
-    XML_ERR_ENTITYREF_NO_NAME, /* 22 */
-    XML_ERR_ENTITYREF_SEMICOL_MISSING, /* 23 */
-    XML_ERR_PEREF_NO_NAME, /* 24 */
-    XML_ERR_PEREF_SEMICOL_MISSING, /* 25 */
-    XML_ERR_UNDECLARED_ENTITY, /* 26 */
-    XML_WAR_UNDECLARED_ENTITY, /* 27 */
-    XML_ERR_UNPARSED_ENTITY, /* 28 */
-    XML_ERR_ENTITY_IS_EXTERNAL, /* 29 */
-    XML_ERR_ENTITY_IS_PARAMETER, /* 30 */
-    XML_ERR_UNKNOWN_ENCODING, /* 31 */
-    XML_ERR_UNSUPPORTED_ENCODING, /* 32 */
-    XML_ERR_STRING_NOT_STARTED, /* 33 */
-    XML_ERR_STRING_NOT_CLOSED, /* 34 */
-    XML_ERR_NS_DECL_ERROR, /* 35 */
-    XML_ERR_ENTITY_NOT_STARTED, /* 36 */
-    XML_ERR_ENTITY_NOT_FINISHED, /* 37 */
-    XML_ERR_LT_IN_ATTRIBUTE, /* 38 */
-    XML_ERR_ATTRIBUTE_NOT_STARTED, /* 39 */
-    XML_ERR_ATTRIBUTE_NOT_FINISHED, /* 40 */
-    XML_ERR_ATTRIBUTE_WITHOUT_VALUE, /* 41 */
-    XML_ERR_ATTRIBUTE_REDEFINED, /* 42 */
-    XML_ERR_LITERAL_NOT_STARTED, /* 43 */
-    XML_ERR_LITERAL_NOT_FINISHED, /* 44 */
-    XML_ERR_COMMENT_NOT_FINISHED, /* 45 */
-    XML_ERR_PI_NOT_STARTED, /* 46 */
-    XML_ERR_PI_NOT_FINISHED, /* 47 */
-    XML_ERR_NOTATION_NOT_STARTED, /* 48 */
-    XML_ERR_NOTATION_NOT_FINISHED, /* 49 */
-    XML_ERR_ATTLIST_NOT_STARTED, /* 50 */
-    XML_ERR_ATTLIST_NOT_FINISHED, /* 51 */
-    XML_ERR_MIXED_NOT_STARTED, /* 52 */
-    XML_ERR_MIXED_NOT_FINISHED, /* 53 */
-    XML_ERR_ELEMCONTENT_NOT_STARTED, /* 54 */
-    XML_ERR_ELEMCONTENT_NOT_FINISHED, /* 55 */
-    XML_ERR_XMLDECL_NOT_STARTED, /* 56 */
-    XML_ERR_XMLDECL_NOT_FINISHED, /* 57 */
-    XML_ERR_CONDSEC_NOT_STARTED, /* 58 */
-    XML_ERR_CONDSEC_NOT_FINISHED, /* 59 */
-    XML_ERR_EXT_SUBSET_NOT_FINISHED, /* 60 */
-    XML_ERR_DOCTYPE_NOT_FINISHED, /* 61 */
-    XML_ERR_MISPLACED_CDATA_END, /* 62 */
-    XML_ERR_CDATA_NOT_FINISHED, /* 63 */
-    XML_ERR_RESERVED_XML_NAME, /* 64 */
-    XML_ERR_SPACE_REQUIRED, /* 65 */
-    XML_ERR_SEPARATOR_REQUIRED, /* 66 */
-    XML_ERR_NMTOKEN_REQUIRED, /* 67 */
-    XML_ERR_NAME_REQUIRED, /* 68 */
-    XML_ERR_PCDATA_REQUIRED, /* 69 */
-    XML_ERR_URI_REQUIRED, /* 70 */
-    XML_ERR_PUBID_REQUIRED, /* 71 */
-    XML_ERR_LT_REQUIRED, /* 72 */
-    XML_ERR_GT_REQUIRED, /* 73 */
-    XML_ERR_LTSLASH_REQUIRED, /* 74 */
-    XML_ERR_EQUAL_REQUIRED, /* 75 */
-    XML_ERR_TAG_NAME_MISMATCH, /* 76 */
-    XML_ERR_TAG_NOT_FINISHED, /* 77 */
-    XML_ERR_STANDALONE_VALUE, /* 78 */
-    XML_ERR_ENCODING_NAME, /* 79 */
-    XML_ERR_HYPHEN_IN_COMMENT, /* 80 */
-    XML_ERR_INVALID_ENCODING, /* 81 */
-    XML_ERR_EXT_ENTITY_STANDALONE, /* 82 */
-    XML_ERR_CONDSEC_INVALID, /* 83 */
-    XML_ERR_VALUE_REQUIRED, /* 84 */
-    XML_ERR_NOT_WELL_BALANCED, /* 85 */
-    XML_ERR_EXTRA_CONTENT, /* 86 */
-    XML_ERR_ENTITY_CHAR_ERROR, /* 87 */
-    XML_ERR_ENTITY_PE_INTERNAL, /* 88 */
-    XML_ERR_ENTITY_LOOP, /* 89 */
-    XML_ERR_ENTITY_BOUNDARY, /* 90 */
-    XML_ERR_INVALID_URI, /* 91 */
-    XML_ERR_URI_FRAGMENT, /* 92 */
-    XML_WAR_CATALOG_PI, /* 93 */
-    XML_ERR_NO_DTD, /* 94 */
-    XML_ERR_CONDSEC_INVALID_KEYWORD, /* 95 */
-    XML_ERR_VERSION_MISSING, /* 96 */
-    XML_WAR_UNKNOWN_VERSION, /* 97 */
-    XML_WAR_LANG_VALUE, /* 98 */
-    XML_WAR_NS_URI, /* 99 */
-    XML_WAR_NS_URI_RELATIVE, /* 100 */
-    XML_ERR_MISSING_ENCODING, /* 101 */
-    XML_WAR_SPACE_VALUE, /* 102 */
-    XML_ERR_NOT_STANDALONE, /* 103 */
-    XML_ERR_ENTITY_PROCESSING, /* 104 */
-    XML_ERR_NOTATION_PROCESSING, /* 105 */
-    XML_WAR_NS_COLUMN, /* 106 */
-    XML_WAR_ENTITY_REDEFINED, /* 107 */
-    XML_ERR_UNKNOWN_VERSION, /* 108 */
-    XML_ERR_VERSION_MISMATCH, /* 109 */
-    XML_NS_ERR_XML_NAMESPACE = 200,
-    XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
-    XML_NS_ERR_QNAME, /* 202 */
-    XML_NS_ERR_ATTRIBUTE_REDEFINED, /* 203 */
-    XML_NS_ERR_EMPTY, /* 204 */
-    XML_NS_ERR_COLON, /* 205 */
-    XML_DTD_ATTRIBUTE_DEFAULT = 500,
-    XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */
-    XML_DTD_ATTRIBUTE_VALUE, /* 502 */
-    XML_DTD_CONTENT_ERROR, /* 503 */
-    XML_DTD_CONTENT_MODEL, /* 504 */
-    XML_DTD_CONTENT_NOT_DETERMINIST, /* 505 */
-    XML_DTD_DIFFERENT_PREFIX, /* 506 */
-    XML_DTD_ELEM_DEFAULT_NAMESPACE, /* 507 */
-    XML_DTD_ELEM_NAMESPACE, /* 508 */
-    XML_DTD_ELEM_REDEFINED, /* 509 */
-    XML_DTD_EMPTY_NOTATION, /* 510 */
-    XML_DTD_ENTITY_TYPE, /* 511 */
-    XML_DTD_ID_FIXED, /* 512 */
-    XML_DTD_ID_REDEFINED, /* 513 */
-    XML_DTD_ID_SUBSET, /* 514 */
-    XML_DTD_INVALID_CHILD, /* 515 */
-    XML_DTD_INVALID_DEFAULT, /* 516 */
-    XML_DTD_LOAD_ERROR, /* 517 */
-    XML_DTD_MISSING_ATTRIBUTE, /* 518 */
-    XML_DTD_MIXED_CORRUPT, /* 519 */
-    XML_DTD_MULTIPLE_ID, /* 520 */
-    XML_DTD_NO_DOC, /* 521 */
-    XML_DTD_NO_DTD, /* 522 */
-    XML_DTD_NO_ELEM_NAME, /* 523 */
-    XML_DTD_NO_PREFIX, /* 524 */
-    XML_DTD_NO_ROOT, /* 525 */
-    XML_DTD_NOTATION_REDEFINED, /* 526 */
-    XML_DTD_NOTATION_VALUE, /* 527 */
-    XML_DTD_NOT_EMPTY, /* 528 */
-    XML_DTD_NOT_PCDATA, /* 529 */
-    XML_DTD_NOT_STANDALONE, /* 530 */
-    XML_DTD_ROOT_NAME, /* 531 */
-    XML_DTD_STANDALONE_WHITE_SPACE, /* 532 */
-    XML_DTD_UNKNOWN_ATTRIBUTE, /* 533 */
-    XML_DTD_UNKNOWN_ELEM, /* 534 */
-    XML_DTD_UNKNOWN_ENTITY, /* 535 */
-    XML_DTD_UNKNOWN_ID, /* 536 */
-    XML_DTD_UNKNOWN_NOTATION, /* 537 */
-    XML_DTD_STANDALONE_DEFAULTED, /* 538 */
-    XML_DTD_XMLID_VALUE, /* 539 */
-    XML_DTD_XMLID_TYPE, /* 540 */
-    XML_DTD_DUP_TOKEN, /* 541 */
-    XML_HTML_STRUCURE_ERROR = 800,
-    XML_HTML_UNKNOWN_TAG, /* 801 */
-    XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000,
-    XML_RNGP_ATTR_CONFLICT, /* 1001 */
-    XML_RNGP_ATTRIBUTE_CHILDREN, /* 1002 */
-    XML_RNGP_ATTRIBUTE_CONTENT, /* 1003 */
-    XML_RNGP_ATTRIBUTE_EMPTY, /* 1004 */
-    XML_RNGP_ATTRIBUTE_NOOP, /* 1005 */
-    XML_RNGP_CHOICE_CONTENT, /* 1006 */
-    XML_RNGP_CHOICE_EMPTY, /* 1007 */
-    XML_RNGP_CREATE_FAILURE, /* 1008 */
-    XML_RNGP_DATA_CONTENT, /* 1009 */
-    XML_RNGP_DEF_CHOICE_AND_INTERLEAVE, /* 1010 */
-    XML_RNGP_DEFINE_CREATE_FAILED, /* 1011 */
-    XML_RNGP_DEFINE_EMPTY, /* 1012 */
-    XML_RNGP_DEFINE_MISSING, /* 1013 */
-    XML_RNGP_DEFINE_NAME_MISSING, /* 1014 */
-    XML_RNGP_ELEM_CONTENT_EMPTY, /* 1015 */
-    XML_RNGP_ELEM_CONTENT_ERROR, /* 1016 */
-    XML_RNGP_ELEMENT_EMPTY, /* 1017 */
-    XML_RNGP_ELEMENT_CONTENT, /* 1018 */
-    XML_RNGP_ELEMENT_NAME, /* 1019 */
-    XML_RNGP_ELEMENT_NO_CONTENT, /* 1020 */
-    XML_RNGP_ELEM_TEXT_CONFLICT, /* 1021 */
-    XML_RNGP_EMPTY, /* 1022 */
-    XML_RNGP_EMPTY_CONSTRUCT, /* 1023 */
-    XML_RNGP_EMPTY_CONTENT, /* 1024 */
-    XML_RNGP_EMPTY_NOT_EMPTY, /* 1025 */
-    XML_RNGP_ERROR_TYPE_LIB, /* 1026 */
-    XML_RNGP_EXCEPT_EMPTY, /* 1027 */
-    XML_RNGP_EXCEPT_MISSING, /* 1028 */
-    XML_RNGP_EXCEPT_MULTIPLE, /* 1029 */
-    XML_RNGP_EXCEPT_NO_CONTENT, /* 1030 */
-    XML_RNGP_EXTERNALREF_EMTPY, /* 1031 */
-    XML_RNGP_EXTERNAL_REF_FAILURE, /* 1032 */
-    XML_RNGP_EXTERNALREF_RECURSE, /* 1033 */
-    XML_RNGP_FORBIDDEN_ATTRIBUTE, /* 1034 */
-    XML_RNGP_FOREIGN_ELEMENT, /* 1035 */
-    XML_RNGP_GRAMMAR_CONTENT, /* 1036 */
-    XML_RNGP_GRAMMAR_EMPTY, /* 1037 */
-    XML_RNGP_GRAMMAR_MISSING, /* 1038 */
-    XML_RNGP_GRAMMAR_NO_START, /* 1039 */
-    XML_RNGP_GROUP_ATTR_CONFLICT, /* 1040 */
-    XML_RNGP_HREF_ERROR, /* 1041 */
-    XML_RNGP_INCLUDE_EMPTY, /* 1042 */
-    XML_RNGP_INCLUDE_FAILURE, /* 1043 */
-    XML_RNGP_INCLUDE_RECURSE, /* 1044 */
-    XML_RNGP_INTERLEAVE_ADD, /* 1045 */
-    XML_RNGP_INTERLEAVE_CREATE_FAILED, /* 1046 */
-    XML_RNGP_INTERLEAVE_EMPTY, /* 1047 */
-    XML_RNGP_INTERLEAVE_NO_CONTENT, /* 1048 */
-    XML_RNGP_INVALID_DEFINE_NAME, /* 1049 */
-    XML_RNGP_INVALID_URI, /* 1050 */
-    XML_RNGP_INVALID_VALUE, /* 1051 */
-    XML_RNGP_MISSING_HREF, /* 1052 */
-    XML_RNGP_NAME_MISSING, /* 1053 */
-    XML_RNGP_NEED_COMBINE, /* 1054 */
-    XML_RNGP_NOTALLOWED_NOT_EMPTY, /* 1055 */
-    XML_RNGP_NSNAME_ATTR_ANCESTOR, /* 1056 */
-    XML_RNGP_NSNAME_NO_NS, /* 1057 */
-    XML_RNGP_PARAM_FORBIDDEN, /* 1058 */
-    XML_RNGP_PARAM_NAME_MISSING, /* 1059 */
-    XML_RNGP_PARENTREF_CREATE_FAILED, /* 1060 */
-    XML_RNGP_PARENTREF_NAME_INVALID, /* 1061 */
-    XML_RNGP_PARENTREF_NO_NAME, /* 1062 */
-    XML_RNGP_PARENTREF_NO_PARENT, /* 1063 */
-    XML_RNGP_PARENTREF_NOT_EMPTY, /* 1064 */
-    XML_RNGP_PARSE_ERROR, /* 1065 */
-    XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME, /* 1066 */
-    XML_RNGP_PAT_ATTR_ATTR, /* 1067 */
-    XML_RNGP_PAT_ATTR_ELEM, /* 1068 */
-    XML_RNGP_PAT_DATA_EXCEPT_ATTR, /* 1069 */
-    XML_RNGP_PAT_DATA_EXCEPT_ELEM, /* 1070 */
-    XML_RNGP_PAT_DATA_EXCEPT_EMPTY, /* 1071 */
-    XML_RNGP_PAT_DATA_EXCEPT_GROUP, /* 1072 */
-    XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE, /* 1073 */
-    XML_RNGP_PAT_DATA_EXCEPT_LIST, /* 1074 */
-    XML_RNGP_PAT_DATA_EXCEPT_ONEMORE, /* 1075 */
-    XML_RNGP_PAT_DATA_EXCEPT_REF, /* 1076 */
-    XML_RNGP_PAT_DATA_EXCEPT_TEXT, /* 1077 */
-    XML_RNGP_PAT_LIST_ATTR, /* 1078 */
-    XML_RNGP_PAT_LIST_ELEM, /* 1079 */
-    XML_RNGP_PAT_LIST_INTERLEAVE, /* 1080 */
-    XML_RNGP_PAT_LIST_LIST, /* 1081 */
-    XML_RNGP_PAT_LIST_REF, /* 1082 */
-    XML_RNGP_PAT_LIST_TEXT, /* 1083 */
-    XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME, /* 1084 */
-    XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME, /* 1085 */
-    XML_RNGP_PAT_ONEMORE_GROUP_ATTR, /* 1086 */
-    XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR, /* 1087 */
-    XML_RNGP_PAT_START_ATTR, /* 1088 */
-    XML_RNGP_PAT_START_DATA, /* 1089 */
-    XML_RNGP_PAT_START_EMPTY, /* 1090 */
-    XML_RNGP_PAT_START_GROUP, /* 1091 */
-    XML_RNGP_PAT_START_INTERLEAVE, /* 1092 */
-    XML_RNGP_PAT_START_LIST, /* 1093 */
-    XML_RNGP_PAT_START_ONEMORE, /* 1094 */
-    XML_RNGP_PAT_START_TEXT, /* 1095 */
-    XML_RNGP_PAT_START_VALUE, /* 1096 */
-    XML_RNGP_PREFIX_UNDEFINED, /* 1097 */
-    XML_RNGP_REF_CREATE_FAILED, /* 1098 */
-    XML_RNGP_REF_CYCLE, /* 1099 */
-    XML_RNGP_REF_NAME_INVALID, /* 1100 */
-    XML_RNGP_REF_NO_DEF, /* 1101 */
-    XML_RNGP_REF_NO_NAME, /* 1102 */
-    XML_RNGP_REF_NOT_EMPTY, /* 1103 */
-    XML_RNGP_START_CHOICE_AND_INTERLEAVE, /* 1104 */
-    XML_RNGP_START_CONTENT, /* 1105 */
-    XML_RNGP_START_EMPTY, /* 1106 */
-    XML_RNGP_START_MISSING, /* 1107 */
-    XML_RNGP_TEXT_EXPECTED, /* 1108 */
-    XML_RNGP_TEXT_HAS_CHILD, /* 1109 */
-    XML_RNGP_TYPE_MISSING, /* 1110 */
-    XML_RNGP_TYPE_NOT_FOUND, /* 1111 */
-    XML_RNGP_TYPE_VALUE, /* 1112 */
-    XML_RNGP_UNKNOWN_ATTRIBUTE, /* 1113 */
-    XML_RNGP_UNKNOWN_COMBINE, /* 1114 */
-    XML_RNGP_UNKNOWN_CONSTRUCT, /* 1115 */
-    XML_RNGP_UNKNOWN_TYPE_LIB, /* 1116 */
-    XML_RNGP_URI_FRAGMENT, /* 1117 */
-    XML_RNGP_URI_NOT_ABSOLUTE, /* 1118 */
-    XML_RNGP_VALUE_EMPTY, /* 1119 */
-    XML_RNGP_VALUE_NO_CONTENT, /* 1120 */
-    XML_RNGP_XMLNS_NAME, /* 1121 */
-    XML_RNGP_XML_NS, /* 1122 */
-    XML_XPATH_EXPRESSION_OK = 1200,
-    XML_XPATH_NUMBER_ERROR, /* 1201 */
-    XML_XPATH_UNFINISHED_LITERAL_ERROR, /* 1202 */
-    XML_XPATH_START_LITERAL_ERROR, /* 1203 */
-    XML_XPATH_VARIABLE_REF_ERROR, /* 1204 */
-    XML_XPATH_UNDEF_VARIABLE_ERROR, /* 1205 */
-    XML_XPATH_INVALID_PREDICATE_ERROR, /* 1206 */
-    XML_XPATH_EXPR_ERROR, /* 1207 */
-    XML_XPATH_UNCLOSED_ERROR, /* 1208 */
-    XML_XPATH_UNKNOWN_FUNC_ERROR, /* 1209 */
-    XML_XPATH_INVALID_OPERAND, /* 1210 */
-    XML_XPATH_INVALID_TYPE, /* 1211 */
-    XML_XPATH_INVALID_ARITY, /* 1212 */
-    XML_XPATH_INVALID_CTXT_SIZE, /* 1213 */
-    XML_XPATH_INVALID_CTXT_POSITION, /* 1214 */
-    XML_XPATH_MEMORY_ERROR, /* 1215 */
-    XML_XPTR_SYNTAX_ERROR, /* 1216 */
-    XML_XPTR_RESOURCE_ERROR, /* 1217 */
-    XML_XPTR_SUB_RESOURCE_ERROR, /* 1218 */
-    XML_XPATH_UNDEF_PREFIX_ERROR, /* 1219 */
-    XML_XPATH_ENCODING_ERROR, /* 1220 */
-    XML_XPATH_INVALID_CHAR_ERROR, /* 1221 */
-    XML_TREE_INVALID_HEX = 1300,
-    XML_TREE_INVALID_DEC, /* 1301 */
-    XML_TREE_UNTERMINATED_ENTITY, /* 1302 */
-    XML_TREE_NOT_UTF8, /* 1303 */
-    XML_SAVE_NOT_UTF8 = 1400,
-    XML_SAVE_CHAR_INVALID, /* 1401 */
-    XML_SAVE_NO_DOCTYPE, /* 1402 */
-    XML_SAVE_UNKNOWN_ENCODING, /* 1403 */
-    XML_REGEXP_COMPILE_ERROR = 1450,
-    XML_IO_UNKNOWN = 1500,
-    XML_IO_EACCES, /* 1501 */
-    XML_IO_EAGAIN, /* 1502 */
-    XML_IO_EBADF, /* 1503 */
-    XML_IO_EBADMSG, /* 1504 */
-    XML_IO_EBUSY, /* 1505 */
-    XML_IO_ECANCELED, /* 1506 */
-    XML_IO_ECHILD, /* 1507 */
-    XML_IO_EDEADLK, /* 1508 */
-    XML_IO_EDOM, /* 1509 */
-    XML_IO_EEXIST, /* 1510 */
-    XML_IO_EFAULT, /* 1511 */
-    XML_IO_EFBIG, /* 1512 */
-    XML_IO_EINPROGRESS, /* 1513 */
-    XML_IO_EINTR, /* 1514 */
-    XML_IO_EINVAL, /* 1515 */
-    XML_IO_EIO, /* 1516 */
-    XML_IO_EISDIR, /* 1517 */
-    XML_IO_EMFILE, /* 1518 */
-    XML_IO_EMLINK, /* 1519 */
-    XML_IO_EMSGSIZE, /* 1520 */
-    XML_IO_ENAMETOOLONG, /* 1521 */
-    XML_IO_ENFILE, /* 1522 */
-    XML_IO_ENODEV, /* 1523 */
-    XML_IO_ENOENT, /* 1524 */
-    XML_IO_ENOEXEC, /* 1525 */
-    XML_IO_ENOLCK, /* 1526 */
-    XML_IO_ENOMEM, /* 1527 */
-    XML_IO_ENOSPC, /* 1528 */
-    XML_IO_ENOSYS, /* 1529 */
-    XML_IO_ENOTDIR, /* 1530 */
-    XML_IO_ENOTEMPTY, /* 1531 */
-    XML_IO_ENOTSUP, /* 1532 */
-    XML_IO_ENOTTY, /* 1533 */
-    XML_IO_ENXIO, /* 1534 */
-    XML_IO_EPERM, /* 1535 */
-    XML_IO_EPIPE, /* 1536 */
-    XML_IO_ERANGE, /* 1537 */
-    XML_IO_EROFS, /* 1538 */
-    XML_IO_ESPIPE, /* 1539 */
-    XML_IO_ESRCH, /* 1540 */
-    XML_IO_ETIMEDOUT, /* 1541 */
-    XML_IO_EXDEV, /* 1542 */
-    XML_IO_NETWORK_ATTEMPT, /* 1543 */
-    XML_IO_ENCODER, /* 1544 */
-    XML_IO_FLUSH, /* 1545 */
-    XML_IO_WRITE, /* 1546 */
-    XML_IO_NO_INPUT, /* 1547 */
-    XML_IO_BUFFER_FULL, /* 1548 */
-    XML_IO_LOAD_ERROR, /* 1549 */
-    XML_IO_ENOTSOCK, /* 1550 */
-    XML_IO_EISCONN, /* 1551 */
-    XML_IO_ECONNREFUSED, /* 1552 */
-    XML_IO_ENETUNREACH, /* 1553 */
-    XML_IO_EADDRINUSE, /* 1554 */
-    XML_IO_EALREADY, /* 1555 */
-    XML_IO_EAFNOSUPPORT, /* 1556 */
-    XML_XINCLUDE_RECURSION=1600,
-    XML_XINCLUDE_PARSE_VALUE, /* 1601 */
-    XML_XINCLUDE_ENTITY_DEF_MISMATCH, /* 1602 */
-    XML_XINCLUDE_NO_HREF, /* 1603 */
-    XML_XINCLUDE_NO_FALLBACK, /* 1604 */
-    XML_XINCLUDE_HREF_URI, /* 1605 */
-    XML_XINCLUDE_TEXT_FRAGMENT, /* 1606 */
-    XML_XINCLUDE_TEXT_DOCUMENT, /* 1607 */
-    XML_XINCLUDE_INVALID_CHAR, /* 1608 */
-    XML_XINCLUDE_BUILD_FAILED, /* 1609 */
-    XML_XINCLUDE_UNKNOWN_ENCODING, /* 1610 */
-    XML_XINCLUDE_MULTIPLE_ROOT, /* 1611 */
-    XML_XINCLUDE_XPTR_FAILED, /* 1612 */
-    XML_XINCLUDE_XPTR_RESULT, /* 1613 */
-    XML_XINCLUDE_INCLUDE_IN_INCLUDE, /* 1614 */
-    XML_XINCLUDE_FALLBACKS_IN_INCLUDE, /* 1615 */
-    XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE, /* 1616 */
-    XML_XINCLUDE_DEPRECATED_NS, /* 1617 */
-    XML_XINCLUDE_FRAGMENT_ID, /* 1618 */
-    XML_CATALOG_MISSING_ATTR = 1650,
-    XML_CATALOG_ENTRY_BROKEN, /* 1651 */
-    XML_CATALOG_PREFER_VALUE, /* 1652 */
-    XML_CATALOG_NOT_CATALOG, /* 1653 */
-    XML_CATALOG_RECURSION, /* 1654 */
-    XML_SCHEMAP_PREFIX_UNDEFINED = 1700,
-    XML_SCHEMAP_ATTRFORMDEFAULT_VALUE, /* 1701 */
-    XML_SCHEMAP_ATTRGRP_NONAME_NOREF, /* 1702 */
-    XML_SCHEMAP_ATTR_NONAME_NOREF, /* 1703 */
-    XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF, /* 1704 */
-    XML_SCHEMAP_ELEMFORMDEFAULT_VALUE, /* 1705 */
-    XML_SCHEMAP_ELEM_NONAME_NOREF, /* 1706 */
-    XML_SCHEMAP_EXTENSION_NO_BASE, /* 1707 */
-    XML_SCHEMAP_FACET_NO_VALUE, /* 1708 */
-    XML_SCHEMAP_FAILED_BUILD_IMPORT, /* 1709 */
-    XML_SCHEMAP_GROUP_NONAME_NOREF, /* 1710 */
-    XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI, /* 1711 */
-    XML_SCHEMAP_IMPORT_REDEFINE_NSNAME, /* 1712 */
-    XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI, /* 1713 */
-    XML_SCHEMAP_INVALID_BOOLEAN, /* 1714 */
-    XML_SCHEMAP_INVALID_ENUM, /* 1715 */
-    XML_SCHEMAP_INVALID_FACET, /* 1716 */
-    XML_SCHEMAP_INVALID_FACET_VALUE, /* 1717 */
-    XML_SCHEMAP_INVALID_MAXOCCURS, /* 1718 */
-    XML_SCHEMAP_INVALID_MINOCCURS, /* 1719 */
-    XML_SCHEMAP_INVALID_REF_AND_SUBTYPE, /* 1720 */
-    XML_SCHEMAP_INVALID_WHITE_SPACE, /* 1721 */
-    XML_SCHEMAP_NOATTR_NOREF, /* 1722 */
-    XML_SCHEMAP_NOTATION_NO_NAME, /* 1723 */
-    XML_SCHEMAP_NOTYPE_NOREF, /* 1724 */
-    XML_SCHEMAP_REF_AND_SUBTYPE, /* 1725 */
-    XML_SCHEMAP_RESTRICTION_NONAME_NOREF, /* 1726 */
-    XML_SCHEMAP_SIMPLETYPE_NONAME, /* 1727 */
-    XML_SCHEMAP_TYPE_AND_SUBTYPE, /* 1728 */
-    XML_SCHEMAP_UNKNOWN_ALL_CHILD, /* 1729 */
-    XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD, /* 1730 */
-    XML_SCHEMAP_UNKNOWN_ATTR_CHILD, /* 1731 */
-    XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD, /* 1732 */
-    XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP, /* 1733 */
-    XML_SCHEMAP_UNKNOWN_BASE_TYPE, /* 1734 */
-    XML_SCHEMAP_UNKNOWN_CHOICE_CHILD, /* 1735 */
-    XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD, /* 1736 */
-    XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD, /* 1737 */
-    XML_SCHEMAP_UNKNOWN_ELEM_CHILD, /* 1738 */
-    XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD, /* 1739 */
-    XML_SCHEMAP_UNKNOWN_FACET_CHILD, /* 1740 */
-    XML_SCHEMAP_UNKNOWN_FACET_TYPE, /* 1741 */
-    XML_SCHEMAP_UNKNOWN_GROUP_CHILD, /* 1742 */
-    XML_SCHEMAP_UNKNOWN_IMPORT_CHILD, /* 1743 */
-    XML_SCHEMAP_UNKNOWN_LIST_CHILD, /* 1744 */
-    XML_SCHEMAP_UNKNOWN_NOTATION_CHILD, /* 1745 */
-    XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD, /* 1746 */
-    XML_SCHEMAP_UNKNOWN_REF, /* 1747 */
-    XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD, /* 1748 */
-    XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD, /* 1749 */
-    XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD, /* 1750 */
-    XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD, /* 1751 */
-    XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD, /* 1752 */
-    XML_SCHEMAP_UNKNOWN_TYPE, /* 1753 */
-    XML_SCHEMAP_UNKNOWN_UNION_CHILD, /* 1754 */
-    XML_SCHEMAP_ELEM_DEFAULT_FIXED, /* 1755 */
-    XML_SCHEMAP_REGEXP_INVALID, /* 1756 */
-    XML_SCHEMAP_FAILED_LOAD, /* 1757 */
-    XML_SCHEMAP_NOTHING_TO_PARSE, /* 1758 */
-    XML_SCHEMAP_NOROOT, /* 1759 */
-    XML_SCHEMAP_REDEFINED_GROUP, /* 1760 */
-    XML_SCHEMAP_REDEFINED_TYPE, /* 1761 */
-    XML_SCHEMAP_REDEFINED_ELEMENT, /* 1762 */
-    XML_SCHEMAP_REDEFINED_ATTRGROUP, /* 1763 */
-    XML_SCHEMAP_REDEFINED_ATTR, /* 1764 */
-    XML_SCHEMAP_REDEFINED_NOTATION, /* 1765 */
-    XML_SCHEMAP_FAILED_PARSE, /* 1766 */
-    XML_SCHEMAP_UNKNOWN_PREFIX, /* 1767 */
-    XML_SCHEMAP_DEF_AND_PREFIX, /* 1768 */
-    XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD, /* 1769 */
-    XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI, /* 1770 */
-    XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, /* 1771 */
-    XML_SCHEMAP_NOT_SCHEMA, /* 1772 */
-    XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, /* 1773 */
-    XML_SCHEMAP_INVALID_ATTR_USE, /* 1774 */
-    XML_SCHEMAP_RECURSIVE, /* 1775 */
-    XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE, /* 1776 */
-    XML_SCHEMAP_INVALID_ATTR_COMBINATION, /* 1777 */
-    XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION, /* 1778 */
-    XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD, /* 1779 */
-    XML_SCHEMAP_INVALID_ATTR_NAME, /* 1780 */
-    XML_SCHEMAP_REF_AND_CONTENT, /* 1781 */
-    XML_SCHEMAP_CT_PROPS_CORRECT_1, /* 1782 */
-    XML_SCHEMAP_CT_PROPS_CORRECT_2, /* 1783 */
-    XML_SCHEMAP_CT_PROPS_CORRECT_3, /* 1784 */
-    XML_SCHEMAP_CT_PROPS_CORRECT_4, /* 1785 */
-    XML_SCHEMAP_CT_PROPS_CORRECT_5, /* 1786 */
-    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, /* 1787 */
-    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, /* 1788 */
-    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, /* 1789 */
-    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, /* 1790 */
-    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, /* 1791 */
-    XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, /* 1792 */
-    XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, /* 1793 */
-    XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, /* 1794 */
-    XML_SCHEMAP_SRC_IMPORT_3_1, /* 1795 */
-    XML_SCHEMAP_SRC_IMPORT_3_2, /* 1796 */
-    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, /* 1797 */
-    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, /* 1798 */
-    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, /* 1799 */
-    XML_SCHEMAP_COS_CT_EXTENDS_1_3, /* 1800 */
-    XML_SCHEMAV_NOROOT = 1801,
-    XML_SCHEMAV_UNDECLAREDELEM, /* 1802 */
-    XML_SCHEMAV_NOTTOPLEVEL, /* 1803 */
-    XML_SCHEMAV_MISSING, /* 1804 */
-    XML_SCHEMAV_WRONGELEM, /* 1805 */
-    XML_SCHEMAV_NOTYPE, /* 1806 */
-    XML_SCHEMAV_NOROLLBACK, /* 1807 */
-    XML_SCHEMAV_ISABSTRACT, /* 1808 */
-    XML_SCHEMAV_NOTEMPTY, /* 1809 */
-    XML_SCHEMAV_ELEMCONT, /* 1810 */
-    XML_SCHEMAV_HAVEDEFAULT, /* 1811 */
-    XML_SCHEMAV_NOTNILLABLE, /* 1812 */
-    XML_SCHEMAV_EXTRACONTENT, /* 1813 */
-    XML_SCHEMAV_INVALIDATTR, /* 1814 */
-    XML_SCHEMAV_INVALIDELEM, /* 1815 */
-    XML_SCHEMAV_NOTDETERMINIST, /* 1816 */
-    XML_SCHEMAV_CONSTRUCT, /* 1817 */
-    XML_SCHEMAV_INTERNAL, /* 1818 */
-    XML_SCHEMAV_NOTSIMPLE, /* 1819 */
-    XML_SCHEMAV_ATTRUNKNOWN, /* 1820 */
-    XML_SCHEMAV_ATTRINVALID, /* 1821 */
-    XML_SCHEMAV_VALUE, /* 1822 */
-    XML_SCHEMAV_FACET, /* 1823 */
-    XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, /* 1824 */
-    XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2, /* 1825 */
-    XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3, /* 1826 */
-    XML_SCHEMAV_CVC_TYPE_3_1_1, /* 1827 */
-    XML_SCHEMAV_CVC_TYPE_3_1_2, /* 1828 */
-    XML_SCHEMAV_CVC_FACET_VALID, /* 1829 */
-    XML_SCHEMAV_CVC_LENGTH_VALID, /* 1830 */
-    XML_SCHEMAV_CVC_MINLENGTH_VALID, /* 1831 */
-    XML_SCHEMAV_CVC_MAXLENGTH_VALID, /* 1832 */
-    XML_SCHEMAV_CVC_MININCLUSIVE_VALID, /* 1833 */
-    XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID, /* 1834 */
-    XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID, /* 1835 */
-    XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID, /* 1836 */
-    XML_SCHEMAV_CVC_TOTALDIGITS_VALID, /* 1837 */
-    XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID, /* 1838 */
-    XML_SCHEMAV_CVC_PATTERN_VALID, /* 1839 */
-    XML_SCHEMAV_CVC_ENUMERATION_VALID, /* 1840 */
-    XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, /* 1841 */
-    XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2, /* 1842 */
-    XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, /* 1843 */
-    XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4, /* 1844 */
-    XML_SCHEMAV_CVC_ELT_1, /* 1845 */
-    XML_SCHEMAV_CVC_ELT_2, /* 1846 */
-    XML_SCHEMAV_CVC_ELT_3_1, /* 1847 */
-    XML_SCHEMAV_CVC_ELT_3_2_1, /* 1848 */
-    XML_SCHEMAV_CVC_ELT_3_2_2, /* 1849 */
-    XML_SCHEMAV_CVC_ELT_4_1, /* 1850 */
-    XML_SCHEMAV_CVC_ELT_4_2, /* 1851 */
-    XML_SCHEMAV_CVC_ELT_4_3, /* 1852 */
-    XML_SCHEMAV_CVC_ELT_5_1_1, /* 1853 */
-    XML_SCHEMAV_CVC_ELT_5_1_2, /* 1854 */
-    XML_SCHEMAV_CVC_ELT_5_2_1, /* 1855 */
-    XML_SCHEMAV_CVC_ELT_5_2_2_1, /* 1856 */
-    XML_SCHEMAV_CVC_ELT_5_2_2_2_1, /* 1857 */
-    XML_SCHEMAV_CVC_ELT_5_2_2_2_2, /* 1858 */
-    XML_SCHEMAV_CVC_ELT_6, /* 1859 */
-    XML_SCHEMAV_CVC_ELT_7, /* 1860 */
-    XML_SCHEMAV_CVC_ATTRIBUTE_1, /* 1861 */
-    XML_SCHEMAV_CVC_ATTRIBUTE_2, /* 1862 */
-    XML_SCHEMAV_CVC_ATTRIBUTE_3, /* 1863 */
-    XML_SCHEMAV_CVC_ATTRIBUTE_4, /* 1864 */
-    XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1, /* 1865 */
-    XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, /* 1866 */
-    XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, /* 1867 */
-    XML_SCHEMAV_CVC_COMPLEX_TYPE_4, /* 1868 */
-    XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1, /* 1869 */
-    XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2, /* 1870 */
-    XML_SCHEMAV_ELEMENT_CONTENT, /* 1871 */
-    XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, /* 1872 */
-    XML_SCHEMAV_CVC_COMPLEX_TYPE_1, /* 1873 */
-    XML_SCHEMAV_CVC_AU, /* 1874 */
-    XML_SCHEMAV_CVC_TYPE_1, /* 1875 */
-    XML_SCHEMAV_CVC_TYPE_2, /* 1876 */
-    XML_SCHEMAV_CVC_IDC, /* 1877 */
-    XML_SCHEMAV_CVC_WILDCARD, /* 1878 */
-    XML_SCHEMAV_MISC, /* 1879 */
-    XML_XPTR_UNKNOWN_SCHEME = 1900,
-    XML_XPTR_CHILDSEQ_START, /* 1901 */
-    XML_XPTR_EVAL_FAILED, /* 1902 */
-    XML_XPTR_EXTRA_OBJECTS, /* 1903 */
-    XML_C14N_CREATE_CTXT = 1950,
-    XML_C14N_REQUIRES_UTF8, /* 1951 */
-    XML_C14N_CREATE_STACK, /* 1952 */
-    XML_C14N_INVALID_NODE, /* 1953 */
-    XML_C14N_UNKNOW_NODE, /* 1954 */
-    XML_C14N_RELATIVE_NAMESPACE, /* 1955 */
-    XML_FTP_PASV_ANSWER = 2000,
-    XML_FTP_EPSV_ANSWER, /* 2001 */
-    XML_FTP_ACCNT, /* 2002 */
-    XML_FTP_URL_SYNTAX, /* 2003 */
-    XML_HTTP_URL_SYNTAX = 2020,
-    XML_HTTP_USE_IP, /* 2021 */
-    XML_HTTP_UNKNOWN_HOST, /* 2022 */
-    XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000,
-    XML_SCHEMAP_SRC_SIMPLE_TYPE_2, /* 3001 */
-    XML_SCHEMAP_SRC_SIMPLE_TYPE_3, /* 3002 */
-    XML_SCHEMAP_SRC_SIMPLE_TYPE_4, /* 3003 */
-    XML_SCHEMAP_SRC_RESOLVE, /* 3004 */
-    XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, /* 3005 */
-    XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE, /* 3006 */
-    XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, /* 3007 */
-    XML_SCHEMAP_ST_PROPS_CORRECT_1, /* 3008 */
-    XML_SCHEMAP_ST_PROPS_CORRECT_2, /* 3009 */
-    XML_SCHEMAP_ST_PROPS_CORRECT_3, /* 3010 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_1_1, /* 3011 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_1_2, /* 3012 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, /* 3013 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2, /* 3014 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_2_1, /* 3015 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1, /* 3016 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2, /* 3017 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1, /* 3018 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2, /* 3019 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3, /* 3020 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4, /* 3021 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5, /* 3022 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_3_1, /* 3023 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1, /* 3024 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2, /* 3025 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2, /* 3026 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1, /* 3027 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, /* 3028 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, /* 3029 */
-    XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5, /* 3030 */
-    XML_SCHEMAP_COS_ST_DERIVED_OK_2_1, /* 3031 */
-    XML_SCHEMAP_COS_ST_DERIVED_OK_2_2, /* 3032 */
-    XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, /* 3033 */
-    XML_SCHEMAP_S4S_ELEM_MISSING, /* 3034 */
-    XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, /* 3035 */
-    XML_SCHEMAP_S4S_ATTR_MISSING, /* 3036 */
-    XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, /* 3037 */
-    XML_SCHEMAP_SRC_ELEMENT_1, /* 3038 */
-    XML_SCHEMAP_SRC_ELEMENT_2_1, /* 3039 */
-    XML_SCHEMAP_SRC_ELEMENT_2_2, /* 3040 */
-    XML_SCHEMAP_SRC_ELEMENT_3, /* 3041 */
-    XML_SCHEMAP_P_PROPS_CORRECT_1, /* 3042 */
-    XML_SCHEMAP_P_PROPS_CORRECT_2_1, /* 3043 */
-    XML_SCHEMAP_P_PROPS_CORRECT_2_2, /* 3044 */
-    XML_SCHEMAP_E_PROPS_CORRECT_2, /* 3045 */
-    XML_SCHEMAP_E_PROPS_CORRECT_3, /* 3046 */
-    XML_SCHEMAP_E_PROPS_CORRECT_4, /* 3047 */
-    XML_SCHEMAP_E_PROPS_CORRECT_5, /* 3048 */
-    XML_SCHEMAP_E_PROPS_CORRECT_6, /* 3049 */
-    XML_SCHEMAP_SRC_INCLUDE, /* 3050 */
-    XML_SCHEMAP_SRC_ATTRIBUTE_1, /* 3051 */
-    XML_SCHEMAP_SRC_ATTRIBUTE_2, /* 3052 */
-    XML_SCHEMAP_SRC_ATTRIBUTE_3_1, /* 3053 */
-    XML_SCHEMAP_SRC_ATTRIBUTE_3_2, /* 3054 */
-    XML_SCHEMAP_SRC_ATTRIBUTE_4, /* 3055 */
-    XML_SCHEMAP_NO_XMLNS, /* 3056 */
-    XML_SCHEMAP_NO_XSI, /* 3057 */
-    XML_SCHEMAP_COS_VALID_DEFAULT_1, /* 3058 */
-    XML_SCHEMAP_COS_VALID_DEFAULT_2_1, /* 3059 */
-    XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1, /* 3060 */
-    XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2, /* 3061 */
-    XML_SCHEMAP_CVC_SIMPLE_TYPE, /* 3062 */
-    XML_SCHEMAP_COS_CT_EXTENDS_1_1, /* 3063 */
-    XML_SCHEMAP_SRC_IMPORT_1_1, /* 3064 */
-    XML_SCHEMAP_SRC_IMPORT_1_2, /* 3065 */
-    XML_SCHEMAP_SRC_IMPORT_2, /* 3066 */
-    XML_SCHEMAP_SRC_IMPORT_2_1, /* 3067 */
-    XML_SCHEMAP_SRC_IMPORT_2_2, /* 3068 */
-    XML_SCHEMAP_INTERNAL, /* 3069 non-W3C */
-    XML_SCHEMAP_NOT_DETERMINISTIC, /* 3070 non-W3C */
-    XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1, /* 3071 */
-    XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2, /* 3072 */
-    XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, /* 3073 */
-    XML_SCHEMAP_MG_PROPS_CORRECT_1, /* 3074 */
-    XML_SCHEMAP_MG_PROPS_CORRECT_2, /* 3075 */
-    XML_SCHEMAP_SRC_CT_1, /* 3076 */
-    XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, /* 3077 */
-    XML_SCHEMAP_AU_PROPS_CORRECT_2, /* 3078 */
-    XML_SCHEMAP_A_PROPS_CORRECT_2, /* 3079 */
-    XML_SCHEMAP_C_PROPS_CORRECT, /* 3080 */
-    XML_SCHEMAP_SRC_REDEFINE, /* 3081 */
-    XML_SCHEMAP_SRC_IMPORT, /* 3082 */
-    XML_SCHEMAP_WARN_SKIP_SCHEMA, /* 3083 */
-    XML_SCHEMAP_WARN_UNLOCATED_SCHEMA, /* 3084 */
-    XML_SCHEMAP_WARN_ATTR_REDECL_PROH, /* 3085 */
-    XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, /* 3085 */
-    XML_SCHEMAP_AG_PROPS_CORRECT, /* 3086 */
-    XML_SCHEMAP_COS_CT_EXTENDS_1_2, /* 3087 */
-    XML_SCHEMAP_AU_PROPS_CORRECT, /* 3088 */
-    XML_SCHEMAP_A_PROPS_CORRECT_3, /* 3089 */
-    XML_SCHEMAP_COS_ALL_LIMITED, /* 3090 */
-    XML_SCHEMATRONV_ASSERT = 4000, /* 4000 */
-    XML_SCHEMATRONV_REPORT,
-    XML_MODULE_OPEN = 4900, /* 4900 */
-    XML_MODULE_CLOSE, /* 4901 */
-    XML_CHECK_FOUND_ELEMENT = 5000,
-    XML_CHECK_FOUND_ATTRIBUTE, /* 5001 */
-    XML_CHECK_FOUND_TEXT, /* 5002 */
-    XML_CHECK_FOUND_CDATA, /* 5003 */
-    XML_CHECK_FOUND_ENTITYREF, /* 5004 */
-    XML_CHECK_FOUND_ENTITY, /* 5005 */
-    XML_CHECK_FOUND_PI, /* 5006 */
-    XML_CHECK_FOUND_COMMENT, /* 5007 */
-    XML_CHECK_FOUND_DOCTYPE, /* 5008 */
-    XML_CHECK_FOUND_FRAGMENT, /* 5009 */
-    XML_CHECK_FOUND_NOTATION, /* 5010 */
-    XML_CHECK_UNKNOWN_NODE, /* 5011 */
-    XML_CHECK_ENTITY_TYPE, /* 5012 */
-    XML_CHECK_NO_PARENT, /* 5013 */
-    XML_CHECK_NO_DOC, /* 5014 */
-    XML_CHECK_NO_NAME, /* 5015 */
-    XML_CHECK_NO_ELEM, /* 5016 */
-    XML_CHECK_WRONG_DOC, /* 5017 */
-    XML_CHECK_NO_PREV, /* 5018 */
-    XML_CHECK_WRONG_PREV, /* 5019 */
-    XML_CHECK_NO_NEXT, /* 5020 */
-    XML_CHECK_WRONG_NEXT, /* 5021 */
-    XML_CHECK_NOT_DTD, /* 5022 */
-    XML_CHECK_NOT_ATTR, /* 5023 */
-    XML_CHECK_NOT_ATTR_DECL, /* 5024 */
-    XML_CHECK_NOT_ELEM_DECL, /* 5025 */
-    XML_CHECK_NOT_ENTITY_DECL, /* 5026 */
-    XML_CHECK_NOT_NS_DECL, /* 5027 */
-    XML_CHECK_NO_HREF, /* 5028 */
-    XML_CHECK_WRONG_PARENT,/* 5029 */
-    XML_CHECK_NS_SCOPE, /* 5030 */
-    XML_CHECK_NS_ANCESTOR, /* 5031 */
-    XML_CHECK_NOT_UTF8, /* 5032 */
-    XML_CHECK_NO_DICT, /* 5033 */
-    XML_CHECK_NOT_NCNAME, /* 5034 */
-    XML_CHECK_OUTSIDE_DICT, /* 5035 */
-    XML_CHECK_WRONG_NAME, /* 5036 */
-    XML_CHECK_NAME_NOT_NULL, /* 5037 */
-    XML_I18N_NO_NAME = 6000,
-    XML_I18N_NO_HANDLER, /* 6001 */
-    XML_I18N_EXCESS_HANDLER, /* 6002 */
-    XML_I18N_CONV_FAILED, /* 6003 */
-    XML_I18N_NO_OUTPUT /* 6004 */
-#if 0
-    XML_CHECK_, /* 5033 */
-    XML_CHECK_X /* 503 */
-#endif
-} xmlParserErrors;
-
-/**
- * xmlGenericErrorFunc:
- * @ctx:  a parsing context
- * @msg:  the message
- * @...:  the extra arguments of the varags to format the message
- *
- * Signature of the function to use when there is an error and
- * no parsing or validity context available .
- */
-typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
-				 const char *msg,
-				 ...) ATTRIBUTE_PRINTF(2,3);
-/**
- * xmlStructuredErrorFunc:
- * @userData:  user provided data for the error callback
- * @error:  the error being raised.
- *
- * Signature of the function to use when there is an error and
- * the module handles the new error reporting mechanism.
- */
-typedef void (XMLCALL *xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
-
-/*
- * Use the following function to reset the two global variables
- * xmlGenericError and xmlGenericErrorContext.
- */
-XMLPUBFUN void XMLCALL
-    xmlSetGenericErrorFunc	(void *ctx,
-				 xmlGenericErrorFunc handler);
-XMLPUBFUN void XMLCALL
-    initGenericErrorDefaultFunc	(xmlGenericErrorFunc *handler);
-
-XMLPUBFUN void XMLCALL
-    xmlSetStructuredErrorFunc	(void *ctx,
-				 xmlStructuredErrorFunc handler);
-/*
- * Default message routines used by SAX and Valid context for error
- * and warning reporting.
- */
-XMLPUBFUN void XMLCDECL
-    xmlParserError		(void *ctx,
-				 const char *msg,
-				 ...) ATTRIBUTE_PRINTF(2,3);
-XMLPUBFUN void XMLCDECL
-    xmlParserWarning		(void *ctx,
-				 const char *msg,
-				 ...) ATTRIBUTE_PRINTF(2,3);
-XMLPUBFUN void XMLCDECL
-    xmlParserValidityError	(void *ctx,
-				 const char *msg,
-				 ...) ATTRIBUTE_PRINTF(2,3);
-XMLPUBFUN void XMLCDECL
-    xmlParserValidityWarning	(void *ctx,
-				 const char *msg,
-				 ...) ATTRIBUTE_PRINTF(2,3);
-XMLPUBFUN void XMLCALL
-    xmlParserPrintFileInfo	(xmlParserInputPtr input);
-XMLPUBFUN void XMLCALL
-    xmlParserPrintFileContext	(xmlParserInputPtr input);
-
-/*
- * Extended error information routines
- */
-XMLPUBFUN xmlErrorPtr XMLCALL
-    xmlGetLastError		(void);
-XMLPUBFUN void XMLCALL
-    xmlResetLastError		(void);
-XMLPUBFUN xmlErrorPtr XMLCALL
-    xmlCtxtGetLastError		(void *ctx);
-XMLPUBFUN void XMLCALL
-    xmlCtxtResetLastError	(void *ctx);
-XMLPUBFUN void XMLCALL
-    xmlResetError		(xmlErrorPtr err);
-XMLPUBFUN int XMLCALL
-    xmlCopyError		(xmlErrorPtr from,
-				 xmlErrorPtr to);
-
-#ifdef IN_LIBXML
-/*
- * Internal callback reporting routine
- */
-XMLPUBFUN void XMLCALL
-    __xmlRaiseError		(xmlStructuredErrorFunc schannel,
-				 xmlGenericErrorFunc channel,
-				 void *data,
-                                 void *ctx,
-				 void *node,
-				 int domain,
-				 int code,
-				 xmlErrorLevel level,
-				 const char *file,
-				 int line,
-				 const char *str1,
-				 const char *str2,
-				 const char *str3,
-				 int int1,
-				 int col,
-				 const char *msg,
-				 ...) ATTRIBUTE_PRINTF(16,17);
-XMLPUBFUN void XMLCALL
-    __xmlSimpleError		(int domain,
-				 int code,
-				 xmlNodePtr node,
-				 const char *msg,
-				 const char *extra);
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif /* __XML_ERROR_H__ */
diff --git a/interfaces/ext/libxml/xmlexports.h b/interfaces/ext/libxml/xmlexports.h
deleted file mode 100644
index 29a6f54..0000000
--- a/interfaces/ext/libxml/xmlexports.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Summary: macros for marking symbols as exportable/importable.
- * Description: macros for marking symbols as exportable/importable.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Igor Zlatovic <igor at zlatkovic.com>
- */
-
-#ifndef __XML_EXPORTS_H__
-#define __XML_EXPORTS_H__
-
-/**
- * XMLPUBFUN, XMLPUBVAR, XMLCALL
- *
- * Macros which declare an exportable function, an exportable variable and
- * the calling convention used for functions.
- *
- * Please use an extra block for every platform/compiler combination when
- * modifying this, rather than overlong #ifdef lines. This helps
- * readability as well as the fact that different compilers on the same
- * platform might need different definitions.
- */
-
-/**
- * XMLPUBFUN:
- *
- * Macros which declare an exportable function
- */
-#define XMLPUBFUN
-/**
- * XMLPUBVAR:
- *
- * Macros which declare an exportable variable
- */
-#define XMLPUBVAR extern
-/**
- * XMLCALL:
- *
- * Macros which declare the called convention for exported functions
- */
-#define XMLCALL
-/**
- * XMLCDECL:
- *
- * Macro which declares the calling convention for exported functions that 
- * use '...'.
- */
-#define XMLCDECL
-
-/** DOC_DISABLE */
-
-/* Windows platform with MS compiler */
-#if defined(_WIN32) && defined(_MSC_VER)
-  #undef XMLPUBFUN
-  #undef XMLPUBVAR
-  #undef XMLCALL
-  #undef XMLCDECL
-  #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
-    #define XMLPUBFUN __declspec(dllexport)
-    #define XMLPUBVAR __declspec(dllexport)
-  #else
-    #define XMLPUBFUN
-    #if !defined(LIBXML_STATIC)
-      #define XMLPUBVAR __declspec(dllimport) extern
-    #else
-      #define XMLPUBVAR extern
-    #endif
-  #endif
-  #if defined(LIBXML_FASTCALL)
-    #define XMLCALL __fastcall
-  #else
-    #define XMLCALL __cdecl
-  #endif
-  #define XMLCDECL __cdecl
-  #if !defined _REENTRANT
-    #define _REENTRANT
-  #endif
-#endif
-
-/* Windows platform with Borland compiler */
-#if defined(_WIN32) && defined(__BORLANDC__)
-  #undef XMLPUBFUN
-  #undef XMLPUBVAR
-  #undef XMLCALL
-  #undef XMLCDECL
-  #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
-    #define XMLPUBFUN __declspec(dllexport)
-    #define XMLPUBVAR __declspec(dllexport) extern
-  #else
-    #define XMLPUBFUN
-    #if !defined(LIBXML_STATIC)
-      #define XMLPUBVAR __declspec(dllimport) extern
-    #else
-      #define XMLPUBVAR extern
-    #endif
-  #endif
-  #define XMLCALL __cdecl
-  #define XMLCDECL __cdecl
-  #if !defined _REENTRANT
-    #define _REENTRANT
-  #endif
-#endif
-
-/* Windows platform with GNU compiler (Mingw) */
-#if defined(_WIN32) && defined(__MINGW32__)
-  #undef XMLPUBFUN
-  #undef XMLPUBVAR
-  #undef XMLCALL
-  #undef XMLCDECL
-  #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
-    #define XMLPUBFUN __declspec(dllexport)
-    #define XMLPUBVAR __declspec(dllexport)
-  #else
-    #define XMLPUBFUN
-    #if !defined(LIBXML_STATIC)
-      #define XMLPUBVAR __declspec(dllimport) extern
-    #else
-      #define XMLPUBVAR extern
-    #endif
-  #endif
-  #define XMLCALL __cdecl
-  #define XMLCDECL __cdecl
-  #if !defined _REENTRANT
-    #define _REENTRANT
-  #endif
-#endif
-
-/* Cygwin platform, GNU compiler */
-#if defined(_WIN32) && defined(__CYGWIN__)
-  #undef XMLPUBFUN
-  #undef XMLPUBVAR
-  #undef XMLCALL
-  #undef XMLCDECL
-  #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
-    #define XMLPUBFUN __declspec(dllexport)
-    #define XMLPUBVAR __declspec(dllexport)
-  #else
-    #define XMLPUBFUN
-    #if !defined(LIBXML_STATIC)
-      #define XMLPUBVAR __declspec(dllimport) extern
-    #else
-      #define XMLPUBVAR
-    #endif
-  #endif
-  #define XMLCALL __cdecl
-  #define XMLCDECL __cdecl
-#endif
-
-/* Compatibility */
-#if !defined(LIBXML_DLL_IMPORT)
-#define LIBXML_DLL_IMPORT XMLPUBVAR
-#endif
-
-#endif /* __XML_EXPORTS_H__ */
-
-
diff --git a/interfaces/ext/libxml/xmlmemory.h b/interfaces/ext/libxml/xmlmemory.h
deleted file mode 100644
index 8f3b109..0000000
--- a/interfaces/ext/libxml/xmlmemory.h
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Summary: interface for the memory allocator
- * Description: provides interfaces for the memory allocator,
- *              including debugging capabilities.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-
-#ifndef __DEBUG_MEMORY_ALLOC__
-#define __DEBUG_MEMORY_ALLOC__
-
-#include <stdio.h>
-#include <libxml/xmlversion.h>
-
-/**
- * DEBUG_MEMORY:
- *
- * DEBUG_MEMORY replaces the allocator with a collect and debug
- * shell to the libc allocator.
- * DEBUG_MEMORY should only be activated when debugging
- * libxml i.e. if libxml has been configured with --with-debug-mem too.
- */
-/* #define DEBUG_MEMORY_FREED */
-/* #define DEBUG_MEMORY_LOCATION */
-
-#ifdef DEBUG
-#ifndef DEBUG_MEMORY
-#define DEBUG_MEMORY
-#endif
-#endif
-
-/**
- * DEBUG_MEMORY_LOCATION:
- *
- * DEBUG_MEMORY_LOCATION should be activated only when debugging
- * libxml i.e. if libxml has been configured with --with-debug-mem too.
- */
-#ifdef DEBUG_MEMORY_LOCATION
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The XML memory wrapper support 4 basic overloadable functions.
- */
-/**
- * xmlFreeFunc:
- * @mem: an already allocated block of memory
- *
- * Signature for a free() implementation.
- */
-typedef void (XMLCALL *xmlFreeFunc)(void *mem);
-/**
- * xmlMallocFunc:
- * @size:  the size requested in bytes
- *
- * Signature for a malloc() implementation.
- *
- * Returns a pointer to the newly allocated block or NULL in case of error.
- */
-typedef void *(ATTRIBUTE_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size);
-
-/**
- * xmlReallocFunc:
- * @mem: an already allocated block of memory
- * @size:  the new size requested in bytes
- *
- * Signature for a realloc() implementation.
- *
- * Returns a pointer to the newly reallocated block or NULL in case of error.
- */
-typedef void *(XMLCALL *xmlReallocFunc)(void *mem, size_t size);
-
-/**
- * xmlStrdupFunc:
- * @str: a zero terminated string
- *
- * Signature for an strdup() implementation.
- *
- * Returns the copy of the string or NULL in case of error.
- */
-typedef char *(XMLCALL *xmlStrdupFunc)(const char *str);
-
-/*
- * The 4 interfaces used for all memory handling within libxml.
-LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree;
-LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc;
-LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMallocAtomic;
-LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc;
-LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup;
- */
-
-/*
- * The way to overload the existing functions.
- * The xmlGc function have an extra entry for atomic block
- * allocations useful for garbage collected memory allocators
- */
-XMLPUBFUN int XMLCALL
-	xmlMemSetup	(xmlFreeFunc freeFunc,
-			 xmlMallocFunc mallocFunc,
-			 xmlReallocFunc reallocFunc,
-			 xmlStrdupFunc strdupFunc);
-XMLPUBFUN int XMLCALL
-	xmlMemGet	(xmlFreeFunc *freeFunc,
-			 xmlMallocFunc *mallocFunc,
-			 xmlReallocFunc *reallocFunc,
-			 xmlStrdupFunc *strdupFunc);
-XMLPUBFUN int XMLCALL
-	xmlGcMemSetup	(xmlFreeFunc freeFunc,
-			 xmlMallocFunc mallocFunc,
-			 xmlMallocFunc mallocAtomicFunc,
-			 xmlReallocFunc reallocFunc,
-			 xmlStrdupFunc strdupFunc);
-XMLPUBFUN int XMLCALL
-	xmlGcMemGet	(xmlFreeFunc *freeFunc,
-			 xmlMallocFunc *mallocFunc,
-			 xmlMallocFunc *mallocAtomicFunc,
-			 xmlReallocFunc *reallocFunc,
-			 xmlStrdupFunc *strdupFunc);
-
-/*
- * Initialization of the memory layer.
- */
-XMLPUBFUN int XMLCALL
-	xmlInitMemory	(void);
-
-/*
- * Cleanup of the memory layer.
- */
-XMLPUBFUN void XMLCALL
-                xmlCleanupMemory        (void);
-/*
- * These are specific to the XML debug memory wrapper.
- */
-XMLPUBFUN int XMLCALL
-	xmlMemUsed	(void);
-XMLPUBFUN int XMLCALL
-	xmlMemBlocks	(void);
-XMLPUBFUN void XMLCALL
-	xmlMemDisplay	(FILE *fp);
-XMLPUBFUN void XMLCALL
-	xmlMemDisplayLast(FILE *fp, long nbBytes);
-XMLPUBFUN void XMLCALL
-	xmlMemShow	(FILE *fp, int nr);
-XMLPUBFUN void XMLCALL
-	xmlMemoryDump	(void);
-XMLPUBFUN void * XMLCALL
-	xmlMemMalloc	(size_t size) ATTRIBUTE_ALLOC_SIZE(1);
-XMLPUBFUN void * XMLCALL
-	xmlMemRealloc	(void *ptr,size_t size);
-XMLPUBFUN void XMLCALL
-	xmlMemFree	(void *ptr);
-XMLPUBFUN char * XMLCALL
-	xmlMemoryStrdup	(const char *str);
-XMLPUBFUN void * XMLCALL
-	xmlMallocLoc	(size_t size, const char *file, int line) ATTRIBUTE_ALLOC_SIZE(1);
-XMLPUBFUN void * XMLCALL
-	xmlReallocLoc	(void *ptr, size_t size, const char *file, int line);
-XMLPUBFUN void * XMLCALL
-	xmlMallocAtomicLoc (size_t size, const char *file, int line) ATTRIBUTE_ALLOC_SIZE(1);
-XMLPUBFUN char * XMLCALL
-	xmlMemStrdupLoc	(const char *str, const char *file, int line);
-
-
-#ifdef DEBUG_MEMORY_LOCATION
-/**
- * xmlMalloc:
- * @size:  number of bytes to allocate
- *
- * Wrapper for the malloc() function used in the XML library.
- *
- * Returns the pointer to the allocated area or NULL in case of error.
- */
-#define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__)
-/**
- * xmlMallocAtomic:
- * @size:  number of bytes to allocate
- *
- * Wrapper for the malloc() function used in the XML library for allocation
- * of block not containing pointers to other areas.
- *
- * Returns the pointer to the allocated area or NULL in case of error.
- */
-#define xmlMallocAtomic(size) xmlMallocAtomicLoc((size), __FILE__, __LINE__)
-/**
- * xmlRealloc:
- * @ptr:  pointer to the existing allocated area
- * @size:  number of bytes to allocate
- *
- * Wrapper for the realloc() function used in the XML library.
- *
- * Returns the pointer to the allocated area or NULL in case of error.
- */
-#define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__)
-/**
- * xmlMemStrdup:
- * @str:  pointer to the existing string
- *
- * Wrapper for the strdup() function, xmlStrdup() is usually preferred.
- *
- * Returns the pointer to the allocated area or NULL in case of error.
- */
-#define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)
-
-#endif /* DEBUG_MEMORY_LOCATION */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#ifndef __XML_GLOBALS_H
-#ifndef __XML_THREADS_H__
-#include <libxml/threads.h>
-#include <libxml/globals.h>
-#endif
-#endif
-
-#endif  /* __DEBUG_MEMORY_ALLOC__ */
-
diff --git a/interfaces/ext/libxml/xmlmodule.h b/interfaces/ext/libxml/xmlmodule.h
deleted file mode 100644
index 8f4a560..0000000
--- a/interfaces/ext/libxml/xmlmodule.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Summary: dynamic module loading
- * Description: basic API for dynamic module loading, used by
- *              libexslt added in 2.6.17
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Joel W. Reed
- */
-
-#ifndef __XML_MODULE_H__
-#define __XML_MODULE_H__
-
-#include <libxml/xmlversion.h>
-
-#ifdef LIBXML_MODULES_ENABLED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * xmlModulePtr:
- *
- * A handle to a dynamically loaded module
- */
-typedef struct _xmlModule xmlModule;
-typedef xmlModule *xmlModulePtr;
-
-/**
- * xmlModuleOption:
- *
- * enumeration of options that can be passed down to xmlModuleOpen()
- */
-typedef enum {
-    XML_MODULE_LAZY = 1,	/* lazy binding */
-    XML_MODULE_LOCAL= 2		/* local binding */
-} xmlModuleOption;
-
-XMLPUBFUN xmlModulePtr XMLCALL xmlModuleOpen	(const char *filename,
-						 int options);
-
-XMLPUBFUN int XMLCALL xmlModuleSymbol		(xmlModulePtr module,
-						 const char* name,
-						 void **result);
-
-XMLPUBFUN int XMLCALL xmlModuleClose		(xmlModulePtr module);
-
-XMLPUBFUN int XMLCALL xmlModuleFree		(xmlModulePtr module);
-
-#ifdef __cplusplus
-}
-#endif 
-
-#endif /* LIBXML_MODULES_ENABLED */
-
-#endif /*__XML_MODULE_H__ */
diff --git a/interfaces/ext/libxml/xmlreader.h b/interfaces/ext/libxml/xmlreader.h
deleted file mode 100644
index 6964482..0000000
--- a/interfaces/ext/libxml/xmlreader.h
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- * Summary: the XMLReader implementation
- * Description: API of the XML streaming API based on C# interfaces.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_XMLREADER_H__
-#define __XML_XMLREADER_H__
-
-#include <libxml/xmlversion.h>
-#include <libxml/tree.h>
-#include <libxml/xmlIO.h>
-#ifdef LIBXML_SCHEMAS_ENABLED
-#include <libxml/relaxng.h>
-#include <libxml/xmlschemas.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * xmlParserSeverities:
- *
- * How severe an error callback is when the per-reader error callback API
- * is used.
- */
-typedef enum {
-    XML_PARSER_SEVERITY_VALIDITY_WARNING = 1,
-    XML_PARSER_SEVERITY_VALIDITY_ERROR = 2,
-    XML_PARSER_SEVERITY_WARNING = 3,
-    XML_PARSER_SEVERITY_ERROR = 4
-} xmlParserSeverities;
-
-#ifdef LIBXML_READER_ENABLED
-
-/**
- * xmlTextReaderMode:
- *
- * Internal state values for the reader.
- */
-typedef enum {
-    XML_TEXTREADER_MODE_INITIAL = 0,
-    XML_TEXTREADER_MODE_INTERACTIVE = 1,
-    XML_TEXTREADER_MODE_ERROR = 2,
-    XML_TEXTREADER_MODE_EOF =3,
-    XML_TEXTREADER_MODE_CLOSED = 4,
-    XML_TEXTREADER_MODE_READING = 5
-} xmlTextReaderMode;
-
-/**
- * xmlParserProperties:
- *
- * Some common options to use with xmlTextReaderSetParserProp, but it
- * is better to use xmlParserOption and the xmlReaderNewxxx and
- * xmlReaderForxxx APIs now.
- */
-typedef enum {
-    XML_PARSER_LOADDTD = 1,
-    XML_PARSER_DEFAULTATTRS = 2,
-    XML_PARSER_VALIDATE = 3,
-    XML_PARSER_SUBST_ENTITIES = 4
-} xmlParserProperties;
-
-/**
- * xmlReaderTypes:
- *
- * Predefined constants for the different types of nodes.
- */
-typedef enum {
-    XML_READER_TYPE_NONE = 0,
-    XML_READER_TYPE_ELEMENT = 1,
-    XML_READER_TYPE_ATTRIBUTE = 2,
-    XML_READER_TYPE_TEXT = 3,
-    XML_READER_TYPE_CDATA = 4,
-    XML_READER_TYPE_ENTITY_REFERENCE = 5,
-    XML_READER_TYPE_ENTITY = 6,
-    XML_READER_TYPE_PROCESSING_INSTRUCTION = 7,
-    XML_READER_TYPE_COMMENT = 8,
-    XML_READER_TYPE_DOCUMENT = 9,
-    XML_READER_TYPE_DOCUMENT_TYPE = 10,
-    XML_READER_TYPE_DOCUMENT_FRAGMENT = 11,
-    XML_READER_TYPE_NOTATION = 12,
-    XML_READER_TYPE_WHITESPACE = 13,
-    XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14,
-    XML_READER_TYPE_END_ELEMENT = 15,
-    XML_READER_TYPE_END_ENTITY = 16,
-    XML_READER_TYPE_XML_DECLARATION = 17
-} xmlReaderTypes;
-
-/**
- * xmlTextReader:
- *
- * Structure for an xmlReader context.
- */
-typedef struct _xmlTextReader xmlTextReader;
-
-/**
- * xmlTextReaderPtr:
- *
- * Pointer to an xmlReader context.
- */
-typedef xmlTextReader *xmlTextReaderPtr;
-
-/*
- * Constructors & Destructor
- */
-XMLPUBFUN xmlTextReaderPtr XMLCALL
-			xmlNewTextReader	(xmlParserInputBufferPtr input,
-	                                         const char *URI);
-XMLPUBFUN xmlTextReaderPtr XMLCALL
-			xmlNewTextReaderFilename(const char *URI);
-
-XMLPUBFUN void XMLCALL
-			xmlFreeTextReader	(xmlTextReaderPtr reader);
-
-XMLPUBFUN int XMLCALL
-            xmlTextReaderSetup(xmlTextReaderPtr reader,
-                   xmlParserInputBufferPtr input, const char *URL,
-                   const char *encoding, int options);
-
-/*
- * Iterators
- */
-XMLPUBFUN int XMLCALL
-			xmlTextReaderRead	(xmlTextReaderPtr reader);
-
-#ifdef LIBXML_WRITER_ENABLED
-XMLPUBFUN xmlChar * XMLCALL
-			xmlTextReaderReadInnerXml	(xmlTextReaderPtr reader);
-
-XMLPUBFUN xmlChar * XMLCALL
-			xmlTextReaderReadOuterXml	(xmlTextReaderPtr reader);
-#endif
-
-XMLPUBFUN xmlChar * XMLCALL
-			xmlTextReaderReadString		(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-			xmlTextReaderReadAttributeValue	(xmlTextReaderPtr reader);
-
-/*
- * Attributes of the node
- */
-XMLPUBFUN int XMLCALL
-			xmlTextReaderAttributeCount(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-			xmlTextReaderDepth	(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-			xmlTextReaderHasAttributes(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-			xmlTextReaderHasValue(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-			xmlTextReaderIsDefault	(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-			xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-			xmlTextReaderNodeType	(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-			xmlTextReaderQuoteChar	(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-			xmlTextReaderReadState	(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-                        xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader);
-
-XMLPUBFUN const xmlChar * XMLCALL
-		    xmlTextReaderConstBaseUri	(xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
-		    xmlTextReaderConstLocalName	(xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
-		    xmlTextReaderConstName	(xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
-		    xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
-		    xmlTextReaderConstPrefix	(xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
-		    xmlTextReaderConstXmlLang	(xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
-		    xmlTextReaderConstString	(xmlTextReaderPtr reader,
-						 const xmlChar *str);
-XMLPUBFUN const xmlChar * XMLCALL
-		    xmlTextReaderConstValue	(xmlTextReaderPtr reader);
-
-/*
- * use the Const version of the routine for
- * better performance and simpler code
- */
-XMLPUBFUN xmlChar * XMLCALL
-			xmlTextReaderBaseUri	(xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
-			xmlTextReaderLocalName	(xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
-			xmlTextReaderName	(xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
-			xmlTextReaderNamespaceUri(xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
-			xmlTextReaderPrefix	(xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
-			xmlTextReaderXmlLang	(xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
-			xmlTextReaderValue	(xmlTextReaderPtr reader);
-
-/*
- * Methods of the XmlTextReader
- */
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderClose		(xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
-		    xmlTextReaderGetAttributeNo	(xmlTextReaderPtr reader,
-						 int no);
-XMLPUBFUN xmlChar * XMLCALL
-		    xmlTextReaderGetAttribute	(xmlTextReaderPtr reader,
-						 const xmlChar *name);
-XMLPUBFUN xmlChar * XMLCALL
-		    xmlTextReaderGetAttributeNs	(xmlTextReaderPtr reader,
-						 const xmlChar *localName,
-						 const xmlChar *namespaceURI);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
-		    xmlTextReaderGetRemainder	(xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
-		    xmlTextReaderLookupNamespace(xmlTextReaderPtr reader,
-						 const xmlChar *prefix);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader,
-						 int no);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader,
-						 const xmlChar *name);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
-						 const xmlChar *localName,
-						 const xmlChar *namespaceURI);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderMoveToElement	(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderNormalization	(xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
-		    xmlTextReaderConstEncoding  (xmlTextReaderPtr reader);
-
-/*
- * Extensions
- */
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderSetParserProp	(xmlTextReaderPtr reader,
-						 int prop,
-						 int value);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderGetParserProp	(xmlTextReaderPtr reader,
-						 int prop);
-XMLPUBFUN xmlNodePtr XMLCALL
-		    xmlTextReaderCurrentNode	(xmlTextReaderPtr reader);
-
-XMLPUBFUN int XMLCALL
-            xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
-
-XMLPUBFUN int XMLCALL
-            xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
-
-XMLPUBFUN xmlNodePtr XMLCALL
-		    xmlTextReaderPreserve	(xmlTextReaderPtr reader);
-#ifdef LIBXML_PATTERN_ENABLED
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderPreservePattern(xmlTextReaderPtr reader,
-						 const xmlChar *pattern,
-						 const xmlChar **namespaces);
-#endif /* LIBXML_PATTERN_ENABLED */
-XMLPUBFUN xmlDocPtr XMLCALL
-		    xmlTextReaderCurrentDoc	(xmlTextReaderPtr reader);
-XMLPUBFUN xmlNodePtr XMLCALL
-		    xmlTextReaderExpand		(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderNext		(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderNextSibling	(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderIsValid	(xmlTextReaderPtr reader);
-#ifdef LIBXML_SCHEMAS_ENABLED
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
-						 const char *rng);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
-						 xmlRelaxNGPtr schema);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderSchemaValidate	(xmlTextReaderPtr reader,
-						 const char *xsd);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
-						 xmlSchemaValidCtxtPtr ctxt,
-						 int options);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderSetSchema	(xmlTextReaderPtr reader,
-						 xmlSchemaPtr schema);
-#endif
-XMLPUBFUN const xmlChar * XMLCALL
-		    xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderStandalone     (xmlTextReaderPtr reader);
-
-
-/*
- * Index lookup
- */
-XMLPUBFUN long XMLCALL
-		xmlTextReaderByteConsumed	(xmlTextReaderPtr reader);
-
-/*
- * New more complete APIs for simpler creation and reuse of readers
- */
-XMLPUBFUN xmlTextReaderPtr XMLCALL
-		xmlReaderWalker		(xmlDocPtr doc);
-XMLPUBFUN xmlTextReaderPtr XMLCALL
-		xmlReaderForDoc		(const xmlChar * cur,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN xmlTextReaderPtr XMLCALL
-		xmlReaderForFile	(const char *filename,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN xmlTextReaderPtr XMLCALL
-		xmlReaderForMemory	(const char *buffer,
-					 int size,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN xmlTextReaderPtr XMLCALL
-		xmlReaderForFd		(int fd,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN xmlTextReaderPtr XMLCALL
-		xmlReaderForIO		(xmlInputReadCallback ioread,
-					 xmlInputCloseCallback ioclose,
-					 void *ioctx,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-
-XMLPUBFUN int XMLCALL
-		xmlReaderNewWalker	(xmlTextReaderPtr reader,
-					 xmlDocPtr doc);
-XMLPUBFUN int XMLCALL
-		xmlReaderNewDoc		(xmlTextReaderPtr reader,
-					 const xmlChar * cur,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN int XMLCALL
-		xmlReaderNewFile	(xmlTextReaderPtr reader,
-					 const char *filename,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN int XMLCALL
-		xmlReaderNewMemory	(xmlTextReaderPtr reader,
-					 const char *buffer,
-					 int size,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN int XMLCALL
-		xmlReaderNewFd		(xmlTextReaderPtr reader,
-					 int fd,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN int XMLCALL
-		xmlReaderNewIO		(xmlTextReaderPtr reader,
-					 xmlInputReadCallback ioread,
-					 xmlInputCloseCallback ioclose,
-					 void *ioctx,
-					 const char *URL,
-					 const char *encoding,
-					 int options);
-/*
- * Error handling extensions
- */
-typedef void *  xmlTextReaderLocatorPtr;
-
-/**
- * xmlTextReaderErrorFunc:
- * @arg: the user argument
- * @msg: the message
- * @severity: the severity of the error
- * @locator: a locator indicating where the error occured
- *
- * Signature of an error callback from a reader parser
- */
-typedef void   (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
-						 const char *msg,
-						 xmlParserSeverities severity,
-						 xmlTextReaderLocatorPtr locator);
-XMLPUBFUN int XMLCALL
-		    xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
-/*int             xmlTextReaderLocatorLinePosition(xmlTextReaderLocatorPtr locator);*/
-XMLPUBFUN xmlChar * XMLCALL
-		    xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
-XMLPUBFUN void XMLCALL
-		    xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
-						 xmlTextReaderErrorFunc f,
-						 void *arg);
-XMLPUBFUN void XMLCALL
-		    xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
-							   xmlStructuredErrorFunc f,
-							   void *arg);
-XMLPUBFUN void XMLCALL
-		    xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
-						 xmlTextReaderErrorFunc *f,
-						 void **arg);
-
-#endif /* LIBXML_READER_ENABLED */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __XML_XMLREADER_H__ */
-
diff --git a/interfaces/ext/libxml/xmlregexp.h b/interfaces/ext/libxml/xmlregexp.h
deleted file mode 100644
index 7009645..0000000
--- a/interfaces/ext/libxml/xmlregexp.h
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Summary: regular expressions handling
- * Description: basic API for libxml regular expressions handling used
- *              for XML Schemas and validation.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_REGEXP_H__
-#define __XML_REGEXP_H__
-
-#include <libxml/xmlversion.h>
-
-#ifdef LIBXML_REGEXP_ENABLED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * xmlRegexpPtr:
- *
- * A libxml regular expression, they can actually be far more complex
- * thank the POSIX regex expressions.
- */
-typedef struct _xmlRegexp xmlRegexp;
-typedef xmlRegexp *xmlRegexpPtr;
-
-/**
- * xmlRegExecCtxtPtr:
- *
- * A libxml progressive regular expression evaluation context
- */
-typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
-typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
-
-#ifdef __cplusplus
-}
-#endif
-#include <libxml/tree.h>
-#include <libxml/dict.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The POSIX like API
- */
-XMLPUBFUN xmlRegexpPtr XMLCALL
-		    xmlRegexpCompile	(const xmlChar *regexp);
-XMLPUBFUN void XMLCALL			 xmlRegFreeRegexp(xmlRegexpPtr regexp);
-XMLPUBFUN int XMLCALL
-		    xmlRegexpExec	(xmlRegexpPtr comp,
-					 const xmlChar *value);
-XMLPUBFUN void XMLCALL
-		    xmlRegexpPrint	(FILE *output,
-					 xmlRegexpPtr regexp);
-XMLPUBFUN int XMLCALL
-		    xmlRegexpIsDeterminist(xmlRegexpPtr comp);
-
-/**
- * xmlRegExecCallbacks:
- * @exec: the regular expression context
- * @token: the current token string
- * @transdata: transition data
- * @inputdata: input data
- *
- * Callback function when doing a transition in the automata
- */
-typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
-	                             const xmlChar *token,
-				     void *transdata,
-				     void *inputdata);
-
-/*
- * The progressive API
- */
-XMLPUBFUN xmlRegExecCtxtPtr XMLCALL
-		    xmlRegNewExecCtxt	(xmlRegexpPtr comp,
-					 xmlRegExecCallbacks callback,
-					 void *data);
-XMLPUBFUN void XMLCALL
-		    xmlRegFreeExecCtxt	(xmlRegExecCtxtPtr exec);
-XMLPUBFUN int XMLCALL
-		    xmlRegExecPushString(xmlRegExecCtxtPtr exec,
-					 const xmlChar *value,
-					 void *data);
-XMLPUBFUN int XMLCALL
-		    xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
-					 const xmlChar *value,
-					 const xmlChar *value2,
-					 void *data);
-
-XMLPUBFUN int XMLCALL
-		    xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
-					 int *nbval,
-					 int *nbneg,
-					 xmlChar **values,
-					 int *terminal);
-XMLPUBFUN int XMLCALL
-		    xmlRegExecErrInfo	(xmlRegExecCtxtPtr exec,
-					 const xmlChar **string,
-					 int *nbval,
-					 int *nbneg,
-					 xmlChar **values,
-					 int *terminal);
-#ifdef LIBXML_EXPR_ENABLED
-/*
- * Formal regular expression handling
- * Its goal is to do some formal work on content models
- */
-
-/* expressions are used within a context */
-typedef struct _xmlExpCtxt xmlExpCtxt;
-typedef xmlExpCtxt *xmlExpCtxtPtr;
-
-XMLPUBFUN void XMLCALL
-			xmlExpFreeCtxt	(xmlExpCtxtPtr ctxt);
-XMLPUBFUN xmlExpCtxtPtr XMLCALL
-			xmlExpNewCtxt	(int maxNodes,
-					 xmlDictPtr dict);
-
-XMLPUBFUN int XMLCALL
-			xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
-			xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
-
-/* Expressions are trees but the tree is opaque */
-typedef struct _xmlExpNode xmlExpNode;
-typedef xmlExpNode *xmlExpNodePtr;
-
-typedef enum {
-    XML_EXP_EMPTY = 0,
-    XML_EXP_FORBID = 1,
-    XML_EXP_ATOM = 2,
-    XML_EXP_SEQ = 3,
-    XML_EXP_OR = 4,
-    XML_EXP_COUNT = 5
-} xmlExpNodeType;
-
-/*
- * 2 core expressions shared by all for the empty language set
- * and for the set with just the empty token
- */
-XMLPUBVAR xmlExpNodePtr forbiddenExp;
-XMLPUBVAR xmlExpNodePtr emptyExp;
-
-/*
- * Expressions are reference counted internally
- */
-XMLPUBFUN void XMLCALL
-			xmlExpFree	(xmlExpCtxtPtr ctxt,
-					 xmlExpNodePtr expr);
-XMLPUBFUN void XMLCALL
-			xmlExpRef	(xmlExpNodePtr expr);
-
-/*
- * constructors can be either manual or from a string
- */
-XMLPUBFUN xmlExpNodePtr XMLCALL
-			xmlExpParse	(xmlExpCtxtPtr ctxt,
-					 const char *expr);
-XMLPUBFUN xmlExpNodePtr XMLCALL
-			xmlExpNewAtom	(xmlExpCtxtPtr ctxt,
-					 const xmlChar *name,
-					 int len);
-XMLPUBFUN xmlExpNodePtr XMLCALL
-			xmlExpNewOr	(xmlExpCtxtPtr ctxt,
-					 xmlExpNodePtr left,
-					 xmlExpNodePtr right);
-XMLPUBFUN xmlExpNodePtr XMLCALL
-			xmlExpNewSeq	(xmlExpCtxtPtr ctxt,
-					 xmlExpNodePtr left,
-					 xmlExpNodePtr right);
-XMLPUBFUN xmlExpNodePtr XMLCALL
-			xmlExpNewRange	(xmlExpCtxtPtr ctxt,
-					 xmlExpNodePtr subset,
-					 int min,
-					 int max);
-/*
- * The really interesting APIs
- */
-XMLPUBFUN int XMLCALL
-			xmlExpIsNillable(xmlExpNodePtr expr);
-XMLPUBFUN int XMLCALL
-			xmlExpMaxToken	(xmlExpNodePtr expr);
-XMLPUBFUN int XMLCALL
-			xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
-					 xmlExpNodePtr expr,
-					 const xmlChar**langList,
-					 int len);
-XMLPUBFUN int XMLCALL
-			xmlExpGetStart	(xmlExpCtxtPtr ctxt,
-					 xmlExpNodePtr expr,
-					 const xmlChar**tokList,
-					 int len);
-XMLPUBFUN xmlExpNodePtr XMLCALL
-			xmlExpStringDerive(xmlExpCtxtPtr ctxt,
-					 xmlExpNodePtr expr,
-					 const xmlChar *str,
-					 int len);
-XMLPUBFUN xmlExpNodePtr XMLCALL
-			xmlExpExpDerive	(xmlExpCtxtPtr ctxt,
-					 xmlExpNodePtr expr,
-					 xmlExpNodePtr sub);
-XMLPUBFUN int XMLCALL
-			xmlExpSubsume	(xmlExpCtxtPtr ctxt,
-					 xmlExpNodePtr expr,
-					 xmlExpNodePtr sub);
-XMLPUBFUN void XMLCALL
-			xmlExpDump	(xmlBufferPtr buf,
-					 xmlExpNodePtr expr);
-#endif /* LIBXML_EXPR_ENABLED */
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_REGEXP_ENABLED */
-
-#endif /*__XML_REGEXP_H__ */
diff --git a/interfaces/ext/libxml/xmlsave.h b/interfaces/ext/libxml/xmlsave.h
deleted file mode 100644
index 4201b4d..0000000
--- a/interfaces/ext/libxml/xmlsave.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Summary: the XML document serializer
- * Description: API to save document or subtree of document
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_XMLSAVE_H__
-#define __XML_XMLSAVE_H__
-
-#include <libxml/xmlversion.h>
-#include <libxml/tree.h>
-#include <libxml/encoding.h>
-#include <libxml/xmlIO.h>
-
-#ifdef LIBXML_OUTPUT_ENABLED
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * xmlSaveOption:
- *
- * This is the set of XML save options that can be passed down
- * to the xmlSaveToFd() and similar calls.
- */
-typedef enum {
-    XML_SAVE_FORMAT     = 1<<0,	/* format save output */
-    XML_SAVE_NO_DECL    = 1<<1,	/* drop the xml declaration */
-    XML_SAVE_NO_EMPTY	= 1<<2, /* no empty tags */
-    XML_SAVE_NO_XHTML	= 1<<3, /* disable XHTML1 specific rules */
-    XML_SAVE_XHTML	= 1<<4, /* force XHTML1 specific rules */
-    XML_SAVE_AS_XML     = 1<<5, /* force XML serialization on HTML doc */
-    XML_SAVE_AS_HTML    = 1<<6  /* force HTML serialization on XML doc */
-} xmlSaveOption;
-
-
-typedef struct _xmlSaveCtxt xmlSaveCtxt;
-typedef xmlSaveCtxt *xmlSaveCtxtPtr;
-
-XMLPUBFUN xmlSaveCtxtPtr XMLCALL
-		xmlSaveToFd		(int fd,
-					 const char *encoding,
-					 int options);
-XMLPUBFUN xmlSaveCtxtPtr XMLCALL
-		xmlSaveToFilename	(const char *filename,
-					 const char *encoding,
-					 int options);
-
-XMLPUBFUN xmlSaveCtxtPtr XMLCALL
-		xmlSaveToBuffer		(xmlBufferPtr buffer,
-					 const char *encoding,
-					 int options);
-
-XMLPUBFUN xmlSaveCtxtPtr XMLCALL
-		xmlSaveToIO		(xmlOutputWriteCallback iowrite,
-					 xmlOutputCloseCallback ioclose,
-					 void *ioctx,
-					 const char *encoding,
-					 int options);
-
-XMLPUBFUN long XMLCALL
-		xmlSaveDoc		(xmlSaveCtxtPtr ctxt,
-					 xmlDocPtr doc);
-XMLPUBFUN long XMLCALL
-		xmlSaveTree		(xmlSaveCtxtPtr ctxt,
-					 xmlNodePtr node);
-
-XMLPUBFUN int XMLCALL
-		xmlSaveFlush		(xmlSaveCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
-		xmlSaveClose		(xmlSaveCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
-		xmlSaveSetEscape	(xmlSaveCtxtPtr ctxt,
-					 xmlCharEncodingOutputFunc escape);
-XMLPUBFUN int XMLCALL
-		xmlSaveSetAttrEscape	(xmlSaveCtxtPtr ctxt,
-					 xmlCharEncodingOutputFunc escape);
-#ifdef __cplusplus
-}
-#endif
-#endif /* LIBXML_OUTPUT_ENABLED */
-#endif /* __XML_XMLSAVE_H__ */
-
-
diff --git a/interfaces/ext/libxml/xmlschemas.h b/interfaces/ext/libxml/xmlschemas.h
deleted file mode 100644
index ebef3a7..0000000
--- a/interfaces/ext/libxml/xmlschemas.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Summary: incomplete XML Schemas structure implementation
- * Description: interface to the XML Schemas handling and schema validity
- *              checking, it is incomplete right now.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-
-#ifndef __XML_SCHEMA_H__
-#define __XML_SCHEMA_H__
-
-#include <libxml/xmlversion.h>
-
-#ifdef LIBXML_SCHEMAS_ENABLED
-
-#include <libxml/tree.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * This error codes are obsolete; not used any more.
- */
-typedef enum {
-    XML_SCHEMAS_ERR_OK		= 0,
-    XML_SCHEMAS_ERR_NOROOT	= 1,
-    XML_SCHEMAS_ERR_UNDECLAREDELEM,
-    XML_SCHEMAS_ERR_NOTTOPLEVEL,
-    XML_SCHEMAS_ERR_MISSING,
-    XML_SCHEMAS_ERR_WRONGELEM,
-    XML_SCHEMAS_ERR_NOTYPE,
-    XML_SCHEMAS_ERR_NOROLLBACK,
-    XML_SCHEMAS_ERR_ISABSTRACT,
-    XML_SCHEMAS_ERR_NOTEMPTY,
-    XML_SCHEMAS_ERR_ELEMCONT,
-    XML_SCHEMAS_ERR_HAVEDEFAULT,
-    XML_SCHEMAS_ERR_NOTNILLABLE,
-    XML_SCHEMAS_ERR_EXTRACONTENT,
-    XML_SCHEMAS_ERR_INVALIDATTR,
-    XML_SCHEMAS_ERR_INVALIDELEM,
-    XML_SCHEMAS_ERR_NOTDETERMINIST,
-    XML_SCHEMAS_ERR_CONSTRUCT,
-    XML_SCHEMAS_ERR_INTERNAL,
-    XML_SCHEMAS_ERR_NOTSIMPLE,
-    XML_SCHEMAS_ERR_ATTRUNKNOWN,
-    XML_SCHEMAS_ERR_ATTRINVALID,
-    XML_SCHEMAS_ERR_VALUE,
-    XML_SCHEMAS_ERR_FACET,
-    XML_SCHEMAS_ERR_,
-    XML_SCHEMAS_ERR_XXX
-} xmlSchemaValidError;
-
-/*
-* ATTENTION: Change xmlSchemaSetValidOptions's check
-* for invalid values, if adding to the validation
-* options below.
-*/
-/**
- * xmlSchemaValidOption:
- *
- * This is the set of XML Schema validation options.
- */
-typedef enum {
-    XML_SCHEMA_VAL_VC_I_CREATE			= 1<<0
-	/* Default/fixed: create an attribute node
-	* or an element's text node on the instance.
-	*/
-} xmlSchemaValidOption;
-
-/*
-    XML_SCHEMA_VAL_XSI_ASSEMBLE			= 1<<1,
-	* assemble schemata using
-	* xsi:schemaLocation and
-	* xsi:noNamespaceSchemaLocation
-*/
-
-/**
- * The schemas related types are kept internal
- */
-typedef struct _xmlSchema xmlSchema;
-typedef xmlSchema *xmlSchemaPtr;
-
-/**
- * xmlSchemaValidityErrorFunc:
- * @ctx: the validation context
- * @msg: the message
- * @...: extra arguments
- *
- * Signature of an error callback from an XSD validation
- */
-typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
-
-/**
- * xmlSchemaValidityWarningFunc:
- * @ctx: the validation context
- * @msg: the message
- * @...: extra arguments
- *
- * Signature of a warning callback from an XSD validation
- */
-typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
-
-/**
- * A schemas validation context
- */
-typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
-typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
-
-typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
-typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
-
-/*
- * Interfaces for parsing.
- */
-XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
-	    xmlSchemaNewParserCtxt	(const char *URL);
-XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
-	    xmlSchemaNewMemParserCtxt	(const char *buffer,
-					 int size);
-XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
-	    xmlSchemaNewDocParserCtxt	(xmlDocPtr doc);
-XMLPUBFUN void XMLCALL
-	    xmlSchemaFreeParserCtxt	(xmlSchemaParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
-	    xmlSchemaSetParserErrors	(xmlSchemaParserCtxtPtr ctxt,
-					 xmlSchemaValidityErrorFunc err,
-					 xmlSchemaValidityWarningFunc warn,
-					 void *ctx);
-XMLPUBFUN void XMLCALL
-	    xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
-					 xmlStructuredErrorFunc serror,
-					 void *ctx);
-XMLPUBFUN int XMLCALL
-		xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
-					xmlSchemaValidityErrorFunc * err,
-					xmlSchemaValidityWarningFunc * warn,
-					void **ctx);
-XMLPUBFUN int XMLCALL
-		xmlSchemaIsValid	(xmlSchemaValidCtxtPtr ctxt);
-
-XMLPUBFUN xmlSchemaPtr XMLCALL
-	    xmlSchemaParse		(xmlSchemaParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
-	    xmlSchemaFree		(xmlSchemaPtr schema);
-#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
-	    xmlSchemaDump		(FILE *output,
-					 xmlSchemaPtr schema);
-#endif /* LIBXML_OUTPUT_ENABLED */
-/*
- * Interfaces for validating
- */
-XMLPUBFUN void XMLCALL
-	    xmlSchemaSetValidErrors	(xmlSchemaValidCtxtPtr ctxt,
-					 xmlSchemaValidityErrorFunc err,
-					 xmlSchemaValidityWarningFunc warn,
-					 void *ctx);
-XMLPUBFUN void XMLCALL
-	    xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
-					 xmlStructuredErrorFunc serror,
-					 void *ctx);
-XMLPUBFUN int XMLCALL
-	    xmlSchemaGetValidErrors	(xmlSchemaValidCtxtPtr ctxt,
-					 xmlSchemaValidityErrorFunc *err,
-					 xmlSchemaValidityWarningFunc *warn,
-					 void **ctx);
-XMLPUBFUN int XMLCALL
-	    xmlSchemaSetValidOptions	(xmlSchemaValidCtxtPtr ctxt,
-					 int options);
-XMLPUBFUN int XMLCALL
-	    xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
-
-XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL
-	    xmlSchemaNewValidCtxt	(xmlSchemaPtr schema);
-XMLPUBFUN void XMLCALL
-	    xmlSchemaFreeValidCtxt	(xmlSchemaValidCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
-	    xmlSchemaValidateDoc	(xmlSchemaValidCtxtPtr ctxt,
-					 xmlDocPtr instance);
-XMLPUBFUN int XMLCALL
-            xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
-			                 xmlNodePtr elem);
-XMLPUBFUN int XMLCALL
-	    xmlSchemaValidateStream	(xmlSchemaValidCtxtPtr ctxt,
-					 xmlParserInputBufferPtr input,
-					 xmlCharEncoding enc,
-					 xmlSAXHandlerPtr sax,
-					 void *user_data);
-XMLPUBFUN int XMLCALL
-	    xmlSchemaValidateFile	(xmlSchemaValidCtxtPtr ctxt,
-					 const char * filename,
-					 int options);
-
-XMLPUBFUN xmlParserCtxtPtr XMLCALL
-	    xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);
-
-/*
- * Interface to insert Schemas SAX validation in a SAX stream
- */
-typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
-typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
-
-XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL
-            xmlSchemaSAXPlug		(xmlSchemaValidCtxtPtr ctxt,
-					 xmlSAXHandlerPtr *sax,
-					 void **user_data);
-XMLPUBFUN int XMLCALL
-            xmlSchemaSAXUnplug		(xmlSchemaSAXPlugPtr plug);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_SCHEMAS_ENABLED */
-#endif /* __XML_SCHEMA_H__ */
diff --git a/interfaces/ext/libxml/xmlschemastypes.h b/interfaces/ext/libxml/xmlschemastypes.h
deleted file mode 100644
index 9a3a7a1..0000000
--- a/interfaces/ext/libxml/xmlschemastypes.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Summary: implementation of XML Schema Datatypes
- * Description: module providing the XML Schema Datatypes implementation
- *              both definition and validity checking
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-
-#ifndef __XML_SCHEMA_TYPES_H__
-#define __XML_SCHEMA_TYPES_H__
-
-#include <libxml/xmlversion.h>
-
-#ifdef LIBXML_SCHEMAS_ENABLED
-
-#include <libxml/schemasInternals.h>
-#include <libxml/xmlschemas.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
-    XML_SCHEMA_WHITESPACE_UNKNOWN = 0,
-    XML_SCHEMA_WHITESPACE_PRESERVE = 1,
-    XML_SCHEMA_WHITESPACE_REPLACE = 2,
-    XML_SCHEMA_WHITESPACE_COLLAPSE = 3
-} xmlSchemaWhitespaceValueType;
-
-XMLPUBFUN void XMLCALL		
-    		xmlSchemaInitTypes		(void);
-XMLPUBFUN void XMLCALL		
-		xmlSchemaCleanupTypes		(void);
-XMLPUBFUN xmlSchemaTypePtr XMLCALL 
-		xmlSchemaGetPredefinedType	(const xmlChar *name,
-						 const xmlChar *ns);
-XMLPUBFUN int XMLCALL		
-		xmlSchemaValidatePredefinedType	(xmlSchemaTypePtr type,
-						 const xmlChar *value,
-						 xmlSchemaValPtr *val);
-XMLPUBFUN int XMLCALL		
-		xmlSchemaValPredefTypeNode	(xmlSchemaTypePtr type,
-						 const xmlChar *value,
-						 xmlSchemaValPtr *val,
-						 xmlNodePtr node);
-XMLPUBFUN int XMLCALL		
-		xmlSchemaValidateFacet		(xmlSchemaTypePtr base,
-						 xmlSchemaFacetPtr facet,
-						 const xmlChar *value,
-						 xmlSchemaValPtr val);
-XMLPUBFUN int XMLCALL
-		xmlSchemaValidateFacetWhtsp	(xmlSchemaFacetPtr facet,
-						 xmlSchemaWhitespaceValueType fws,
-						 xmlSchemaValType valType,						 
-						 const xmlChar *value,
-						 xmlSchemaValPtr val,
-						 xmlSchemaWhitespaceValueType ws);
-XMLPUBFUN void XMLCALL		
-		xmlSchemaFreeValue		(xmlSchemaValPtr val);
-XMLPUBFUN xmlSchemaFacetPtr XMLCALL 
-		xmlSchemaNewFacet		(void);
-XMLPUBFUN int XMLCALL		
-		xmlSchemaCheckFacet		(xmlSchemaFacetPtr facet,
-						 xmlSchemaTypePtr typeDecl,
-						 xmlSchemaParserCtxtPtr ctxt,
-						 const xmlChar *name);
-XMLPUBFUN void XMLCALL		
-		xmlSchemaFreeFacet		(xmlSchemaFacetPtr facet);
-XMLPUBFUN int XMLCALL		
-		xmlSchemaCompareValues		(xmlSchemaValPtr x,
-						 xmlSchemaValPtr y);
-XMLPUBFUN xmlSchemaTypePtr XMLCALL		
-    xmlSchemaGetBuiltInListSimpleTypeItemType	(xmlSchemaTypePtr type);
-XMLPUBFUN int XMLCALL
-    xmlSchemaValidateListSimpleTypeFacet	(xmlSchemaFacetPtr facet,
-						 const xmlChar *value,
-						 unsigned long actualLen,
-						 unsigned long *expectedLen);
-XMLPUBFUN xmlSchemaTypePtr XMLCALL
-		xmlSchemaGetBuiltInType		(xmlSchemaValType type);
-XMLPUBFUN int XMLCALL
-		xmlSchemaIsBuiltInTypeFacet	(xmlSchemaTypePtr type, 
-						 int facetType);
-XMLPUBFUN xmlChar * XMLCALL
-		xmlSchemaCollapseString		(const xmlChar *value);
-XMLPUBFUN xmlChar * XMLCALL
-		xmlSchemaWhiteSpaceReplace	(const xmlChar *value);
-XMLPUBFUN unsigned long  XMLCALL
-		xmlSchemaGetFacetValueAsULong	(xmlSchemaFacetPtr facet);
-XMLPUBFUN int XMLCALL
-		xmlSchemaValidateLengthFacet	(xmlSchemaTypePtr type, 
-						 xmlSchemaFacetPtr facet,
-						 const xmlChar *value,
-						 xmlSchemaValPtr val,
-						 unsigned long *length);
-XMLPUBFUN int XMLCALL
-		xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
-						  xmlSchemaValType valType,
-						  const xmlChar *value,
-						  xmlSchemaValPtr val,						  
-						  unsigned long *length,
-						  xmlSchemaWhitespaceValueType ws);
-XMLPUBFUN int XMLCALL
-		xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type, 
-						 const xmlChar *value,
-						 xmlSchemaValPtr *val, 
-						 xmlNodePtr node);
-XMLPUBFUN int XMLCALL
-		xmlSchemaGetCanonValue		(xmlSchemaValPtr val,
-						 const xmlChar **retValue);
-XMLPUBFUN int XMLCALL
-		xmlSchemaGetCanonValueWhtsp	(xmlSchemaValPtr val,						 
-						 const xmlChar **retValue,
-						 xmlSchemaWhitespaceValueType ws);
-XMLPUBFUN int XMLCALL
-		xmlSchemaValueAppend		(xmlSchemaValPtr prev,
-						 xmlSchemaValPtr cur);
-XMLPUBFUN xmlSchemaValPtr XMLCALL
-		xmlSchemaValueGetNext		(xmlSchemaValPtr cur);
-XMLPUBFUN const xmlChar * XMLCALL
-		xmlSchemaValueGetAsString	(xmlSchemaValPtr val);
-XMLPUBFUN int XMLCALL
-		xmlSchemaValueGetAsBoolean	(xmlSchemaValPtr val);
-XMLPUBFUN xmlSchemaValPtr XMLCALL
-		xmlSchemaNewStringValue		(xmlSchemaValType type,
-						 const xmlChar *value);
-XMLPUBFUN xmlSchemaValPtr XMLCALL
-		xmlSchemaNewNOTATIONValue	(const xmlChar *name,
-						 const xmlChar *ns);
-XMLPUBFUN xmlSchemaValPtr XMLCALL
-		xmlSchemaNewQNameValue		(const xmlChar *namespaceName,
-						 const xmlChar *localName);
-XMLPUBFUN int XMLCALL
-		xmlSchemaCompareValuesWhtsp	(xmlSchemaValPtr x,
-						 xmlSchemaWhitespaceValueType xws,
-						 xmlSchemaValPtr y,
-						 xmlSchemaWhitespaceValueType yws);
-XMLPUBFUN xmlSchemaValPtr XMLCALL
-		xmlSchemaCopyValue		(xmlSchemaValPtr val);
-XMLPUBFUN xmlSchemaValType XMLCALL
-		xmlSchemaGetValType		(xmlSchemaValPtr val);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_SCHEMAS_ENABLED */
-#endif /* __XML_SCHEMA_TYPES_H__ */
diff --git a/interfaces/ext/libxml/xmlstring.h b/interfaces/ext/libxml/xmlstring.h
deleted file mode 100644
index 1dfc5ea..0000000
--- a/interfaces/ext/libxml/xmlstring.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Summary: set of routines to process strings
- * Description: type and interfaces needed for the internal string handling
- *              of the library, especially UTF8 processing.
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_STRING_H__
-#define __XML_STRING_H__
-
-#include <stdarg.h>
-#include <libxml/xmlversion.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * xmlChar:
- *
- * This is a basic byte in an UTF-8 encoded string.
- * It's unsigned allowing to pinpoint case where char * are assigned
- * to xmlChar * (possibly making serialization back impossible).
- */
-typedef unsigned char xmlChar;
-
-/**
- * BAD_CAST:
- *
- * Macro to cast a string to an xmlChar * when one know its safe.
- */
-#define BAD_CAST (xmlChar *)
-
-/*
- * xmlChar handling
- */
-XMLPUBFUN xmlChar * XMLCALL
-                xmlStrdup                (const xmlChar *cur);
-XMLPUBFUN xmlChar * XMLCALL
-                xmlStrndup               (const xmlChar *cur,
-                                         int len);
-XMLPUBFUN xmlChar * XMLCALL
-                xmlCharStrndup           (const char *cur,
-                                         int len);
-XMLPUBFUN xmlChar * XMLCALL
-                xmlCharStrdup            (const char *cur);
-XMLPUBFUN xmlChar * XMLCALL
-                xmlStrsub                (const xmlChar *str,
-                                         int start,
-                                         int len);
-XMLPUBFUN const xmlChar * XMLCALL
-                xmlStrchr                (const xmlChar *str,
-                                         xmlChar val);
-XMLPUBFUN const xmlChar * XMLCALL
-                xmlStrstr                (const xmlChar *str,
-                                         const xmlChar *val);
-XMLPUBFUN const xmlChar * XMLCALL
-                xmlStrcasestr            (const xmlChar *str,
-                                         xmlChar *val);
-XMLPUBFUN int XMLCALL
-                xmlStrcmp                (const xmlChar *str1,
-                                         const xmlChar *str2);
-XMLPUBFUN int XMLCALL
-                xmlStrncmp               (const xmlChar *str1,
-                                         const xmlChar *str2,
-                                         int len);
-XMLPUBFUN int XMLCALL
-                xmlStrcasecmp            (const xmlChar *str1,
-                                         const xmlChar *str2);
-XMLPUBFUN int XMLCALL
-                xmlStrncasecmp           (const xmlChar *str1,
-                                         const xmlChar *str2,
-                                         int len);
-XMLPUBFUN int XMLCALL
-                xmlStrEqual              (const xmlChar *str1,
-                                         const xmlChar *str2);
-XMLPUBFUN int XMLCALL
-                xmlStrQEqual             (const xmlChar *pref,
-                                         const xmlChar *name,
-                                         const xmlChar *str);
-XMLPUBFUN int XMLCALL
-                xmlStrlen                (const xmlChar *str);
-XMLPUBFUN xmlChar * XMLCALL
-                xmlStrcat                (xmlChar *cur,
-                                         const xmlChar *add);
-XMLPUBFUN xmlChar * XMLCALL
-                xmlStrncat               (xmlChar *cur,
-                                         const xmlChar *add,
-                                         int len);
-XMLPUBFUN xmlChar * XMLCALL
-                xmlStrncatNew            (const xmlChar *str1,
-                                         const xmlChar *str2,
-                                         int len);
-XMLPUBFUN int XMLCALL
-                xmlStrPrintf             (xmlChar *buf,
-                                         int len,
-                                         const xmlChar *msg,
-                                         ...);
-XMLPUBFUN int XMLCALL
-                xmlStrVPrintf                (xmlChar *buf,
-                                         int len,
-                                         const xmlChar *msg,
-                                         va_list ap);
-
-XMLPUBFUN int XMLCALL
-        xmlGetUTF8Char                   (const unsigned char *utf,
-                                         int *len);
-XMLPUBFUN int XMLCALL
-        xmlCheckUTF8                     (const unsigned char *utf);
-XMLPUBFUN int XMLCALL
-        xmlUTF8Strsize                   (const xmlChar *utf,
-                                         int len);
-XMLPUBFUN xmlChar * XMLCALL 
-        xmlUTF8Strndup                   (const xmlChar *utf,
-                                         int len);
-XMLPUBFUN const xmlChar * XMLCALL 
-        xmlUTF8Strpos                    (const xmlChar *utf,
-                                         int pos);
-XMLPUBFUN int XMLCALL
-        xmlUTF8Strloc                    (const xmlChar *utf,
-                                         const xmlChar *utfchar);
-XMLPUBFUN xmlChar * XMLCALL 
-        xmlUTF8Strsub                    (const xmlChar *utf,
-                                         int start,
-                                         int len);
-XMLPUBFUN int XMLCALL
-        xmlUTF8Strlen                    (const xmlChar *utf);
-XMLPUBFUN int XMLCALL
-        xmlUTF8Size                      (const xmlChar *utf);
-XMLPUBFUN int XMLCALL
-        xmlUTF8Charcmp                   (const xmlChar *utf1,
-                                         const xmlChar *utf2);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* __XML_STRING_H__ */
diff --git a/interfaces/ext/libxml/xmlunicode.h b/interfaces/ext/libxml/xmlunicode.h
deleted file mode 100644
index 01ac8b6..0000000
--- a/interfaces/ext/libxml/xmlunicode.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Summary: Unicode character APIs
- * Description: API for the Unicode character APIs
- *
- * This file is automatically generated from the
- * UCS description files of the Unicode Character Database
- * http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html
- * using the genUnicode.py Python script.
- *
- * Generation date: Mon Mar 27 11:09:52 2006
- * Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_UNICODE_H__
-#define __XML_UNICODE_H__
-
-#include <libxml/xmlversion.h>
-
-#ifdef LIBXML_UNICODE_ENABLED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-XMLPUBFUN int XMLCALL xmlUCSIsAegeanNumbers	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsAlphabeticPresentationForms	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsArabic	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsA	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsB	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsArmenian	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsArrows	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBasicLatin	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBengali	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBlockElements	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBopomofo	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBopomofoExtended	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBoxDrawing	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBraillePatterns	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBuhid	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsByzantineMusicalSymbols	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibility	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityForms	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographs	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographsSupplement	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKRadicalsSupplement	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKSymbolsandPunctuation	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographs	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionA	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionB	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCherokee	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarks	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarksforSymbols	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCombiningHalfMarks	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCombiningMarksforSymbols	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsControlPictures	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCurrencySymbols	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCypriotSyllabary	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCyrillic	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCyrillicSupplement	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsDeseret	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsDevanagari	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsDingbats	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsEnclosedAlphanumerics	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsEnclosedCJKLettersandMonths	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsEthiopic	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGeneralPunctuation	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGeometricShapes	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGeorgian	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGothic	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGreek	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGreekExtended	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGreekandCoptic	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGujarati	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGurmukhi	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHalfwidthandFullwidthForms	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHangulCompatibilityJamo	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHangulJamo	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHangulSyllables	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHanunoo	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHebrew	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHighPrivateUseSurrogates	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHighSurrogates	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHiragana	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsIPAExtensions	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsIdeographicDescriptionCharacters	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsKanbun	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsKangxiRadicals	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsKannada	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsKatakana	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsKatakanaPhoneticExtensions	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsKhmer	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsKhmerSymbols	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLao	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLatin1Supplement	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedA	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedB	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedAdditional	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLetterlikeSymbols	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLimbu	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLinearBIdeograms	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLinearBSyllabary	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLowSurrogates	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMalayalam	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMathematicalAlphanumericSymbols	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMathematicalOperators	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsA	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsB	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbols	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbolsandArrows	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousTechnical	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMongolian	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMusicalSymbols	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMyanmar	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsNumberForms	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsOgham	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsOldItalic	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsOpticalCharacterRecognition	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsOriya	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsOsmanya	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsPhoneticExtensions	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsPrivateUse	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsPrivateUseArea	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsRunic	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsShavian	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSinhala	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSmallFormVariants	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSpacingModifierLetters	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSpecials	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSuperscriptsandSubscripts	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsA	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsB	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSupplementalMathematicalOperators	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaA	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaB	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSyriac	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTagalog	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTagbanwa	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTags	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTaiLe	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTaiXuanJingSymbols	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTamil	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTelugu	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsThaana	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsThai	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTibetan	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsUgaritic	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsUnifiedCanadianAboriginalSyllabics	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectors	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectorsSupplement	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsYiRadicals	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsYiSyllables	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsYijingHexagramSymbols	(int code);
-
-XMLPUBFUN int XMLCALL xmlUCSIsBlock	(int code, const char *block);
-
-XMLPUBFUN int XMLCALL xmlUCSIsCatC	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatCc	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatCf	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatCo	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatCs	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatL	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatLl	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatLm	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatLo	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatLt	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatLu	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatM	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatMc	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatMe	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatMn	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatN	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatNd	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatNl	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatNo	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatP	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatPc	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatPd	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatPe	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatPf	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatPi	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatPo	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatPs	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatS	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatSc	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatSk	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatSm	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatSo	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatZ	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatZl	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatZp	(int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatZs	(int code);
-
-XMLPUBFUN int XMLCALL xmlUCSIsCat	(int code, const char *cat);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_UNICODE_ENABLED */
-
-#endif /* __XML_UNICODE_H__ */
diff --git a/interfaces/ext/libxml/xmlversion.h b/interfaces/ext/libxml/xmlversion.h
deleted file mode 100644
index 0660956..0000000
--- a/interfaces/ext/libxml/xmlversion.h
+++ /dev/null
@@ -1,458 +0,0 @@
-/*
- * Summary: compile-time version informations
- * Description: compile-time version informations for the XML library
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_VERSION_H__
-#define __XML_VERSION_H__
-
-#include <libxml/xmlexports.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * use those to be sure nothing nasty will happen if
- * your library and includes mismatch
- */
-#ifndef LIBXML2_COMPILING_MSCCDEF
-XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
-#endif /* LIBXML2_COMPILING_MSCCDEF */
-
-/**
- * LIBXML_DOTTED_VERSION:
- *
- * the version string like "1.2.3"
- */
-#define LIBXML_DOTTED_VERSION "2.7.3"
-
-/**
- * LIBXML_VERSION:
- *
- * the version number: 1.2.3 value is 10203
- */
-#define LIBXML_VERSION 20703
-
-/**
- * LIBXML_VERSION_STRING:
- *
- * the version number string, 1.2.3 value is "10203"
- */
-#define LIBXML_VERSION_STRING "20703"
-
-/**
- * LIBXML_VERSION_EXTRA:
- *
- * extra version information, used to show a CVS compilation
- */
-#define LIBXML_VERSION_EXTRA ""
-
-/**
- * LIBXML_TEST_VERSION:
- *
- * Macro to check that the libxml version in use is compatible with
- * the version the software has been compiled against
- */
-#define LIBXML_TEST_VERSION xmlCheckVersion(20703);
-
-#ifndef VMS
-#if 0
-/**
- * WITH_TRIO:
- *
- * defined if the trio support need to be configured in
- */
-#define WITH_TRIO
-#else
-/**
- * WITHOUT_TRIO:
- *
- * defined if the trio support should not be configured in
- */
-#define WITHOUT_TRIO
-#endif
-#else /* VMS */
-/**
- * WITH_TRIO:
- *
- * defined if the trio support need to be configured in
- */
-#define WITH_TRIO 1
-#endif /* VMS */
-
-/**
- * LIBXML_THREAD_ENABLED:
- *
- * Whether the thread support is configured in
- */
-#if 1
-#if defined(_REENTRANT) || defined(__MT__) || \
-    (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L))
-#define LIBXML_THREAD_ENABLED
-#endif
-#endif
-
-/**
- * LIBXML_TREE_ENABLED:
- *
- * Whether the DOM like tree manipulation API support is configured in
- */
-#if 1
-#define LIBXML_TREE_ENABLED
-#endif
-
-/**
- * LIBXML_OUTPUT_ENABLED:
- *
- * Whether the serialization/saving support is configured in
- */
-#if 1
-#define LIBXML_OUTPUT_ENABLED
-#endif
-
-/**
- * LIBXML_PUSH_ENABLED:
- *
- * Whether the push parsing interfaces are configured in
- */
-#if 1
-#define LIBXML_PUSH_ENABLED
-#endif
-
-/**
- * LIBXML_READER_ENABLED:
- *
- * Whether the xmlReader parsing interface is configured in
- */
-#if 1
-#define LIBXML_READER_ENABLED
-#endif
-
-/**
- * LIBXML_PATTERN_ENABLED:
- *
- * Whether the xmlPattern node selection interface is configured in
- */
-#if 1
-#define LIBXML_PATTERN_ENABLED
-#endif
-
-/**
- * LIBXML_WRITER_ENABLED:
- *
- * Whether the xmlWriter saving interface is configured in
- */
-#if 1
-#define LIBXML_WRITER_ENABLED
-#endif
-
-/**
- * LIBXML_SAX1_ENABLED:
- *
- * Whether the older SAX1 interface is configured in
- */
-#if 1
-#define LIBXML_SAX1_ENABLED
-#endif
-
-/**
- * LIBXML_FTP_ENABLED:
- *
- * Whether the FTP support is configured in
- */
-#if 1
-#define LIBXML_FTP_ENABLED
-#endif
-
-/**
- * LIBXML_HTTP_ENABLED:
- *
- * Whether the HTTP support is configured in
- */
-#if 1
-#define LIBXML_HTTP_ENABLED
-#endif
-
-/**
- * LIBXML_VALID_ENABLED:
- *
- * Whether the DTD validation support is configured in
- */
-#if 1
-#define LIBXML_VALID_ENABLED
-#endif
-
-/**
- * LIBXML_HTML_ENABLED:
- *
- * Whether the HTML support is configured in
- */
-#if 1
-#define LIBXML_HTML_ENABLED
-#endif
-
-/**
- * LIBXML_LEGACY_ENABLED:
- *
- * Whether the deprecated APIs are compiled in for compatibility
- */
-#if 1
-#define LIBXML_LEGACY_ENABLED
-#endif
-
-/**
- * LIBXML_C14N_ENABLED:
- *
- * Whether the Canonicalization support is configured in
- */
-#if 1
-#define LIBXML_C14N_ENABLED
-#endif
-
-/**
- * LIBXML_CATALOG_ENABLED:
- *
- * Whether the Catalog support is configured in
- */
-#if 1
-#define LIBXML_CATALOG_ENABLED
-#endif
-
-/**
- * LIBXML_DOCB_ENABLED:
- *
- * Whether the SGML Docbook support is configured in
- */
-#if 1
-#define LIBXML_DOCB_ENABLED
-#endif
-
-/**
- * LIBXML_XPATH_ENABLED:
- *
- * Whether XPath is configured in
- */
-#if 1
-#define LIBXML_XPATH_ENABLED
-#endif
-
-/**
- * LIBXML_XPTR_ENABLED:
- *
- * Whether XPointer is configured in
- */
-#if 1
-#define LIBXML_XPTR_ENABLED
-#endif
-
-/**
- * LIBXML_XINCLUDE_ENABLED:
- *
- * Whether XInclude is configured in
- */
-#if 1
-#define LIBXML_XINCLUDE_ENABLED
-#endif
-
-/**
- * LIBXML_ICONV_ENABLED:
- *
- * Whether iconv support is available
- */
-#if 1
-#define LIBXML_ICONV_ENABLED
-#endif
-
-/**
- * LIBXML_ISO8859X_ENABLED:
- *
- * Whether ISO-8859-* support is made available in case iconv is not
- */
-#if 1
-#define LIBXML_ISO8859X_ENABLED
-#endif
-
-/**
- * LIBXML_DEBUG_ENABLED:
- *
- * Whether Debugging module is configured in
- */
-#if 0
-#define LIBXML_DEBUG_ENABLED
-#endif
-
-/**
- * DEBUG_MEMORY_LOCATION:
- *
- * Whether the memory debugging is configured in
- */
-#if 0
-#define DEBUG_MEMORY_LOCATION
-#endif
-
-/**
- * LIBXML_DEBUG_RUNTIME:
- *
- * Whether the runtime debugging is configured in
- */
-#if 0
-#define LIBXML_DEBUG_RUNTIME
-#endif
-
-/**
- * LIBXML_UNICODE_ENABLED:
- *
- * Whether the Unicode related interfaces are compiled in
- */
-#if 1
-#define LIBXML_UNICODE_ENABLED
-#endif
-
-/**
- * LIBXML_REGEXP_ENABLED:
- *
- * Whether the regular expressions interfaces are compiled in
- */
-#if 1
-#define LIBXML_REGEXP_ENABLED
-#endif
-
-/**
- * LIBXML_AUTOMATA_ENABLED:
- *
- * Whether the automata interfaces are compiled in
- */
-#if 1
-#define LIBXML_AUTOMATA_ENABLED
-#endif
-
-/**
- * LIBXML_EXPR_ENABLED:
- *
- * Whether the formal expressions interfaces are compiled in
- */
-#if 1
-#define LIBXML_EXPR_ENABLED
-#endif
-
-/**
- * LIBXML_SCHEMAS_ENABLED:
- *
- * Whether the Schemas validation interfaces are compiled in
- */
-#if 1
-#define LIBXML_SCHEMAS_ENABLED
-#endif
-
-/**
- * LIBXML_SCHEMATRON_ENABLED:
- *
- * Whether the Schematron validation interfaces are compiled in
- */
-#if 1
-#define LIBXML_SCHEMATRON_ENABLED
-#endif
-
-/**
- * LIBXML_MODULES_ENABLED:
- *
- * Whether the module interfaces are compiled in
- */
-#if 1
-#define LIBXML_MODULES_ENABLED
-/**
- * LIBXML_MODULE_EXTENSION:
- *
- * the string suffix used by dynamic modules (usually shared libraries)
- */
-#define LIBXML_MODULE_EXTENSION ".so" 
-#endif
-
-/**
- * LIBXML_ZLIB_ENABLED:
- *
- * Whether the Zlib support is compiled in
- */
-#if 0
-#define LIBXML_ZLIB_ENABLED
-#endif
-
-#ifdef __GNUC__
-#ifdef HAVE_ANSIDECL_H
-#include <ansidecl.h>
-#endif
-
-/**
- * ATTRIBUTE_UNUSED:
- *
- * Macro used to signal to GCC unused function parameters
- */
-
-#ifndef ATTRIBUTE_UNUSED
-#define ATTRIBUTE_UNUSED __attribute__((unused))
-#endif
-
-/**
- * ATTRIBUTE_ALLOC_SIZE:
- *
- * Macro used to indicate to GCC this is an allocator function
- */
-
-#ifndef ATTRIBUTE_ALLOC_SIZE
-# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
-#  define ATTRIBUTE_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
-# else
-#  define ATTRIBUTE_ALLOC_SIZE(x)
-# endif
-#else
-# define ATTRIBUTE_ALLOC_SIZE(x)
-#endif
-
-/**
- * ATTRIBUTE_PRINTF:
- *
- * Macro used to indicate to GCC the parameter are printf like
- */
-
-#ifndef ATTRIBUTE_PRINTF
-# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
-#  define ATTRIBUTE_PRINTF(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
-# else
-#  define ATTRIBUTE_PRINTF(fmt,args)
-# endif
-#else
-# define ATTRIBUTE_PRINTF(fmt,args)
-#endif
-
-#else /* ! __GNUC__ */
-/**
- * ATTRIBUTE_UNUSED:
- *
- * Macro used to signal to GCC unused function parameters
- */
-#define ATTRIBUTE_UNUSED
-/**
- * ATTRIBUTE_ALLOC_SIZE:
- *
- * Macro used to indicate to GCC this is an allocator function
- */
-#define ATTRIBUTE_ALLOC_SIZE(x)
-/**
- * ATTRIBUTE_PRINTF:
- *
- * Macro used to indicate to GCC the parameter are printf like
- */
-#define ATTRIBUTE_PRINTF(fmt,args)
-#endif /* __GNUC__ */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif
-
-
diff --git a/interfaces/ext/libxml/xmlwriter.h b/interfaces/ext/libxml/xmlwriter.h
deleted file mode 100644
index df4509d..0000000
--- a/interfaces/ext/libxml/xmlwriter.h
+++ /dev/null
@@ -1,485 +0,0 @@
-
-/*
- * Summary: text writing API for XML
- * Description: text writing API for XML
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Alfred Mickautsch <alfred at mickautsch.de>
- */
-
-#ifndef __XML_XMLWRITER_H__
-#define __XML_XMLWRITER_H__
-
-#include <libxml/xmlversion.h>
-
-#ifdef LIBXML_WRITER_ENABLED
-
-#include <stdarg.h>
-#include <libxml/xmlIO.h>
-#include <libxml/list.h>
-#include <libxml/xmlstring.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-    typedef struct _xmlTextWriter xmlTextWriter;
-    typedef xmlTextWriter *xmlTextWriterPtr;
-
-/*
- * Constructors & Destructor
- */
-    XMLPUBFUN xmlTextWriterPtr XMLCALL
-        xmlNewTextWriter(xmlOutputBufferPtr out);
-    XMLPUBFUN xmlTextWriterPtr XMLCALL
-        xmlNewTextWriterFilename(const char *uri, int compression);
-    XMLPUBFUN xmlTextWriterPtr XMLCALL
-        xmlNewTextWriterMemory(xmlBufferPtr buf, int compression);
-    XMLPUBFUN xmlTextWriterPtr XMLCALL
-        xmlNewTextWriterPushParser(xmlParserCtxtPtr ctxt, int compression);
-    XMLPUBFUN xmlTextWriterPtr XMLCALL
-        xmlNewTextWriterDoc(xmlDocPtr * doc, int compression);
-    XMLPUBFUN xmlTextWriterPtr XMLCALL
-        xmlNewTextWriterTree(xmlDocPtr doc, xmlNodePtr node,
-                             int compression);
-    XMLPUBFUN void XMLCALL xmlFreeTextWriter(xmlTextWriterPtr writer);
-
-/*
- * Functions
- */
-
-
-/*
- * Document
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterStartDocument(xmlTextWriterPtr writer,
-                                   const char *version,
-                                   const char *encoding,
-                                   const char *standalone);
-    XMLPUBFUN int XMLCALL xmlTextWriterEndDocument(xmlTextWriterPtr
-                                                   writer);
-
-/*
- * Comments
- */
-    XMLPUBFUN int XMLCALL xmlTextWriterStartComment(xmlTextWriterPtr
-                                                    writer);
-    XMLPUBFUN int XMLCALL xmlTextWriterEndComment(xmlTextWriterPtr writer);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
-                                        const char *format, ...)
-					ATTRIBUTE_PRINTF(2,3);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
-                                         const char *format,
-                                         va_list argptr)
-					 ATTRIBUTE_PRINTF(2,0);
-    XMLPUBFUN int XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr
-                                                    writer,
-                                                    const xmlChar *
-                                                    content);
-
-/*
- * Elements
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterStartElement(xmlTextWriterPtr writer,
-                                  const xmlChar * name);
-    XMLPUBFUN int XMLCALL xmlTextWriterStartElementNS(xmlTextWriterPtr
-                                                      writer,
-                                                      const xmlChar *
-                                                      prefix,
-                                                      const xmlChar * name,
-                                                      const xmlChar *
-                                                      namespaceURI);
-    XMLPUBFUN int XMLCALL xmlTextWriterEndElement(xmlTextWriterPtr writer);
-    XMLPUBFUN int XMLCALL xmlTextWriterFullEndElement(xmlTextWriterPtr
-                                                      writer);
-
-/*
- * Elements conveniency functions
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
-                                        const xmlChar * name,
-                                        const char *format, ...)
-					ATTRIBUTE_PRINTF(3,4);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
-                                         const xmlChar * name,
-                                         const char *format,
-                                         va_list argptr)
-					 ATTRIBUTE_PRINTF(3,0);
-    XMLPUBFUN int XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr
-                                                    writer,
-                                                    const xmlChar * name,
-                                                    const xmlChar *
-                                                    content);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer,
-                                          const xmlChar * prefix,
-                                          const xmlChar * name,
-                                          const xmlChar * namespaceURI,
-                                          const char *format, ...)
-					  ATTRIBUTE_PRINTF(5,6);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
-                                           const xmlChar * prefix,
-                                           const xmlChar * name,
-                                           const xmlChar * namespaceURI,
-                                           const char *format,
-                                           va_list argptr)
-					   ATTRIBUTE_PRINTF(5,0);
-    XMLPUBFUN int XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr
-                                                      writer,
-                                                      const xmlChar *
-                                                      prefix,
-                                                      const xmlChar * name,
-                                                      const xmlChar *
-                                                      namespaceURI,
-                                                      const xmlChar *
-                                                      content);
-
-/*
- * Text
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer,
-                                    const char *format, ...)
-				    ATTRIBUTE_PRINTF(2,3);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer,
-                                     const char *format, va_list argptr)
-				     ATTRIBUTE_PRINTF(2,0);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteRawLen(xmlTextWriterPtr writer,
-                                 const xmlChar * content, int len);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteRaw(xmlTextWriterPtr writer,
-                              const xmlChar * content);
-    XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatString(xmlTextWriterPtr
-                                                         writer,
-                                                         const char
-                                                         *format, ...)
-							 ATTRIBUTE_PRINTF(2,3);
-    XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr
-                                                          writer,
-                                                          const char
-                                                          *format,
-                                                          va_list argptr)
-							  ATTRIBUTE_PRINTF(2,0);
-    XMLPUBFUN int XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer,
-                                                   const xmlChar *
-                                                   content);
-    XMLPUBFUN int XMLCALL xmlTextWriterWriteBase64(xmlTextWriterPtr writer,
-                                                   const char *data,
-                                                   int start, int len);
-    XMLPUBFUN int XMLCALL xmlTextWriterWriteBinHex(xmlTextWriterPtr writer,
-                                                   const char *data,
-                                                   int start, int len);
-
-/*
- * Attributes
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterStartAttribute(xmlTextWriterPtr writer,
-                                    const xmlChar * name);
-    XMLPUBFUN int XMLCALL xmlTextWriterStartAttributeNS(xmlTextWriterPtr
-                                                        writer,
-                                                        const xmlChar *
-                                                        prefix,
-                                                        const xmlChar *
-                                                        name,
-                                                        const xmlChar *
-                                                        namespaceURI);
-    XMLPUBFUN int XMLCALL xmlTextWriterEndAttribute(xmlTextWriterPtr
-                                                    writer);
-
-/*
- * Attributes conveniency functions
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
-                                          const xmlChar * name,
-                                          const char *format, ...)
-					  ATTRIBUTE_PRINTF(3,4);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
-                                           const xmlChar * name,
-                                           const char *format,
-                                           va_list argptr)
-					   ATTRIBUTE_PRINTF(3,0);
-    XMLPUBFUN int XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr
-                                                      writer,
-                                                      const xmlChar * name,
-                                                      const xmlChar *
-                                                      content);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer,
-                                            const xmlChar * prefix,
-                                            const xmlChar * name,
-                                            const xmlChar * namespaceURI,
-                                            const char *format, ...)
-					    ATTRIBUTE_PRINTF(5,6);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
-                                             const xmlChar * prefix,
-                                             const xmlChar * name,
-                                             const xmlChar * namespaceURI,
-                                             const char *format,
-                                             va_list argptr)
-					     ATTRIBUTE_PRINTF(5,0);
-    XMLPUBFUN int XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
-                                                        writer,
-                                                        const xmlChar *
-                                                        prefix,
-                                                        const xmlChar *
-                                                        name,
-                                                        const xmlChar *
-                                                        namespaceURI,
-                                                        const xmlChar *
-                                                        content);
-
-/*
- * PI's
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterStartPI(xmlTextWriterPtr writer,
-                             const xmlChar * target);
-    XMLPUBFUN int XMLCALL xmlTextWriterEndPI(xmlTextWriterPtr writer);
-
-/*
- * PI conveniency functions
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer,
-                                   const xmlChar * target,
-                                   const char *format, ...)
-				   ATTRIBUTE_PRINTF(3,4);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
-                                    const xmlChar * target,
-                                    const char *format, va_list argptr)
-				    ATTRIBUTE_PRINTF(3,0);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWritePI(xmlTextWriterPtr writer,
-                             const xmlChar * target,
-                             const xmlChar * content);
-
-/**
- * xmlTextWriterWriteProcessingInstruction:
- *
- * This macro maps to xmlTextWriterWritePI
- */
-#define xmlTextWriterWriteProcessingInstruction xmlTextWriterWritePI
-
-/*
- * CDATA
- */
-    XMLPUBFUN int XMLCALL xmlTextWriterStartCDATA(xmlTextWriterPtr writer);
-    XMLPUBFUN int XMLCALL xmlTextWriterEndCDATA(xmlTextWriterPtr writer);
-
-/*
- * CDATA conveniency functions
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer,
-                                      const char *format, ...)
-				      ATTRIBUTE_PRINTF(2,3);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer,
-                                       const char *format, va_list argptr)
-				       ATTRIBUTE_PRINTF(2,0);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteCDATA(xmlTextWriterPtr writer,
-                                const xmlChar * content);
-
-/*
- * DTD
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterStartDTD(xmlTextWriterPtr writer,
-                              const xmlChar * name,
-                              const xmlChar * pubid,
-                              const xmlChar * sysid);
-    XMLPUBFUN int XMLCALL xmlTextWriterEndDTD(xmlTextWriterPtr writer);
-
-/*
- * DTD conveniency functions
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer,
-                                    const xmlChar * name,
-                                    const xmlChar * pubid,
-                                    const xmlChar * sysid,
-                                    const char *format, ...)
-				    ATTRIBUTE_PRINTF(5,6);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
-                                     const xmlChar * name,
-                                     const xmlChar * pubid,
-                                     const xmlChar * sysid,
-                                     const char *format, va_list argptr)
-				     ATTRIBUTE_PRINTF(5,0);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
-                              const xmlChar * name,
-                              const xmlChar * pubid,
-                              const xmlChar * sysid,
-                              const xmlChar * subset);
-
-/**
- * xmlTextWriterWriteDocType:
- *
- * this macro maps to xmlTextWriterWriteDTD
- */
-#define xmlTextWriterWriteDocType xmlTextWriterWriteDTD
-
-/*
- * DTD element definition
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterStartDTDElement(xmlTextWriterPtr writer,
-                                     const xmlChar * name);
-    XMLPUBFUN int XMLCALL xmlTextWriterEndDTDElement(xmlTextWriterPtr
-                                                     writer);
-
-/*
- * DTD element definition conveniency functions
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
-                                           const xmlChar * name,
-                                           const char *format, ...)
-					   ATTRIBUTE_PRINTF(3,4);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
-                                            const xmlChar * name,
-                                            const char *format,
-                                            va_list argptr)
-					    ATTRIBUTE_PRINTF(3,0);
-    XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr
-                                                       writer,
-                                                       const xmlChar *
-                                                       name,
-                                                       const xmlChar *
-                                                       content);
-
-/*
- * DTD attribute list definition
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer,
-                                     const xmlChar * name);
-    XMLPUBFUN int XMLCALL xmlTextWriterEndDTDAttlist(xmlTextWriterPtr
-                                                     writer);
-
-/*
- * DTD attribute list definition conveniency functions
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
-                                           const xmlChar * name,
-                                           const char *format, ...)
-					   ATTRIBUTE_PRINTF(3,4);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
-                                            const xmlChar * name,
-                                            const char *format,
-                                            va_list argptr)
-					    ATTRIBUTE_PRINTF(3,0);
-    XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
-                                                       writer,
-                                                       const xmlChar *
-                                                       name,
-                                                       const xmlChar *
-                                                       content);
-
-/*
- * DTD entity definition
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer,
-                                    int pe, const xmlChar * name);
-    XMLPUBFUN int XMLCALL xmlTextWriterEndDTDEntity(xmlTextWriterPtr
-                                                    writer);
-
-/*
- * DTD entity definition conveniency functions
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
-                                                  int pe,
-                                                  const xmlChar * name,
-                                                  const char *format, ...)
-						  ATTRIBUTE_PRINTF(4,5);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
-                                                   int pe,
-                                                   const xmlChar * name,
-                                                   const char *format,
-                                                   va_list argptr)
-						   ATTRIBUTE_PRINTF(4,0);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
-                                            int pe,
-                                            const xmlChar * name,
-                                            const xmlChar * content);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer,
-                                            int pe,
-                                            const xmlChar * name,
-                                            const xmlChar * pubid,
-                                            const xmlChar * sysid,
-                                            const xmlChar * ndataid);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr
-                                                    writer,
-                                                    const xmlChar * pubid,
-                                                    const xmlChar * sysid,
-                                                    const xmlChar *
-                                                    ndataid);
-    XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDEntity(xmlTextWriterPtr
-                                                      writer, int pe,
-                                                      const xmlChar * name,
-                                                      const xmlChar *
-                                                      pubid,
-                                                      const xmlChar *
-                                                      sysid,
-                                                      const xmlChar *
-                                                      ndataid,
-                                                      const xmlChar *
-                                                      content);
-
-/*
- * DTD notation definition
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer,
-                                      const xmlChar * name,
-                                      const xmlChar * pubid,
-                                      const xmlChar * sysid);
-
-/*
- * Indentation
- */
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent);
-    XMLPUBFUN int XMLCALL
-        xmlTextWriterSetIndentString(xmlTextWriterPtr writer,
-                                     const xmlChar * str);
-
-/*
- * misc
- */
-    XMLPUBFUN int XMLCALL xmlTextWriterFlush(xmlTextWriterPtr writer);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_WRITER_ENABLED */
-
-#endif                          /* __XML_XMLWRITER_H__ */
diff --git a/interfaces/ext/libxml/xpath.h b/interfaces/ext/libxml/xpath.h
deleted file mode 100644
index 1a9e30e..0000000
--- a/interfaces/ext/libxml/xpath.h
+++ /dev/null
@@ -1,546 +0,0 @@
-/*
- * Summary: XML Path Language implementation
- * Description: API for the XML Path Language implementation
- *
- * XML Path Language implementation
- * XPath is a language for addressing parts of an XML document,
- * designed to be used by both XSLT and XPointer
- *     http://www.w3.org/TR/xpath
- *
- * Implements
- * W3C Recommendation 16 November 1999
- *     http://www.w3.org/TR/1999/REC-xpath-19991116
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_XPATH_H__
-#define __XML_XPATH_H__
-
-#include <libxml/xmlversion.h>
-
-#ifdef LIBXML_XPATH_ENABLED
-
-#include <libxml/xmlerror.h>
-#include <libxml/tree.h>
-#include <libxml/hash.h>
-#endif /* LIBXML_XPATH_ENABLED */
-
-#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-#ifdef __cplusplus
-extern "C" {
-#endif
-#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */
-	
-#ifdef LIBXML_XPATH_ENABLED
-
-typedef struct _xmlXPathContext xmlXPathContext;
-typedef xmlXPathContext *xmlXPathContextPtr;
-typedef struct _xmlXPathParserContext xmlXPathParserContext;
-typedef xmlXPathParserContext *xmlXPathParserContextPtr;
-
-/**
- * The set of XPath error codes.
- */
-
-typedef enum {
-    XPATH_EXPRESSION_OK = 0,
-    XPATH_NUMBER_ERROR,
-    XPATH_UNFINISHED_LITERAL_ERROR,
-    XPATH_START_LITERAL_ERROR,
-    XPATH_VARIABLE_REF_ERROR,
-    XPATH_UNDEF_VARIABLE_ERROR,
-    XPATH_INVALID_PREDICATE_ERROR,
-    XPATH_EXPR_ERROR,
-    XPATH_UNCLOSED_ERROR,
-    XPATH_UNKNOWN_FUNC_ERROR,
-    XPATH_INVALID_OPERAND,
-    XPATH_INVALID_TYPE,
-    XPATH_INVALID_ARITY,
-    XPATH_INVALID_CTXT_SIZE,
-    XPATH_INVALID_CTXT_POSITION,
-    XPATH_MEMORY_ERROR,
-    XPTR_SYNTAX_ERROR,
-    XPTR_RESOURCE_ERROR,
-    XPTR_SUB_RESOURCE_ERROR,
-    XPATH_UNDEF_PREFIX_ERROR,
-    XPATH_ENCODING_ERROR,
-    XPATH_INVALID_CHAR_ERROR,
-    XPATH_INVALID_CTXT
-} xmlXPathError;
-
-/*
- * A node-set (an unordered collection of nodes without duplicates).
- */
-typedef struct _xmlNodeSet xmlNodeSet;
-typedef xmlNodeSet *xmlNodeSetPtr;
-struct _xmlNodeSet {
-    int nodeNr;			/* number of nodes in the set */
-    int nodeMax;		/* size of the array as allocated */
-    xmlNodePtr *nodeTab;	/* array of nodes in no particular order */
-    /* @@ with_ns to check wether namespace nodes should be looked at @@ */
-};
-
-/*
- * An expression is evaluated to yield an object, which
- * has one of the following four basic types:
- *   - node-set
- *   - boolean
- *   - number
- *   - string
- *
- * @@ XPointer will add more types !
- */
-
-typedef enum {
-    XPATH_UNDEFINED = 0,
-    XPATH_NODESET = 1,
-    XPATH_BOOLEAN = 2,
-    XPATH_NUMBER = 3,
-    XPATH_STRING = 4,
-    XPATH_POINT = 5,
-    XPATH_RANGE = 6,
-    XPATH_LOCATIONSET = 7,
-    XPATH_USERS = 8,
-    XPATH_XSLT_TREE = 9  /* An XSLT value tree, non modifiable */
-} xmlXPathObjectType;
-
-typedef struct _xmlXPathObject xmlXPathObject;
-typedef xmlXPathObject *xmlXPathObjectPtr;
-struct _xmlXPathObject {
-    xmlXPathObjectType type;
-    xmlNodeSetPtr nodesetval;
-    int boolval;
-    double floatval;
-    xmlChar *stringval;
-    void *user;
-    int index;
-    void *user2;
-    int index2;
-};
-
-/**
- * xmlXPathConvertFunc:
- * @obj:  an XPath object
- * @type:  the number of the target type
- *
- * A conversion function is associated to a type and used to cast
- * the new type to primitive values.
- *
- * Returns -1 in case of error, 0 otherwise
- */
-typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type);
-
-/*
- * Extra type: a name and a conversion function.
- */
-
-typedef struct _xmlXPathType xmlXPathType;
-typedef xmlXPathType *xmlXPathTypePtr;
-struct _xmlXPathType {
-    const xmlChar         *name;		/* the type name */
-    xmlXPathConvertFunc func;		/* the conversion function */
-};
-
-/*
- * Extra variable: a name and a value.
- */
-
-typedef struct _xmlXPathVariable xmlXPathVariable;
-typedef xmlXPathVariable *xmlXPathVariablePtr;
-struct _xmlXPathVariable {
-    const xmlChar       *name;		/* the variable name */
-    xmlXPathObjectPtr value;		/* the value */
-};
-
-/**
- * xmlXPathEvalFunc:
- * @ctxt: an XPath parser context
- * @nargs: the number of arguments passed to the function
- *
- * An XPath evaluation function, the parameters are on the XPath context stack.
- */
-
-typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt,
-	                         int nargs);
-
-/*
- * Extra function: a name and a evaluation function.
- */
-
-typedef struct _xmlXPathFunct xmlXPathFunct;
-typedef xmlXPathFunct *xmlXPathFuncPtr;
-struct _xmlXPathFunct {
-    const xmlChar      *name;		/* the function name */
-    xmlXPathEvalFunc func;		/* the evaluation function */
-};
-
-/**
- * xmlXPathAxisFunc:
- * @ctxt:  the XPath interpreter context
- * @cur:  the previous node being explored on that axis
- *
- * An axis traversal function. To traverse an axis, the engine calls
- * the first time with cur == NULL and repeat until the function returns
- * NULL indicating the end of the axis traversal.
- *
- * Returns the next node in that axis or NULL if at the end of the axis.
- */
-
-typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt,
-				 xmlXPathObjectPtr cur);
-
-/*
- * Extra axis: a name and an axis function.
- */
-
-typedef struct _xmlXPathAxis xmlXPathAxis;
-typedef xmlXPathAxis *xmlXPathAxisPtr;
-struct _xmlXPathAxis {
-    const xmlChar      *name;		/* the axis name */
-    xmlXPathAxisFunc func;		/* the search function */
-};
-
-/**
- * xmlXPathFunction:
- * @ctxt:  the XPath interprestation context
- * @nargs:  the number of arguments
- *
- * An XPath function.
- * The arguments (if any) are popped out from the context stack
- * and the result is pushed on the stack.
- */
-
-typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
-
-/*
- * Function and Variable Lookup.
- */
-
-/**
- * xmlXPathVariableLookupFunc:
- * @ctxt:  an XPath context
- * @name:  name of the variable
- * @ns_uri:  the namespace name hosting this variable
- *
- * Prototype for callbacks used to plug variable lookup in the XPath
- * engine.
- *
- * Returns the XPath object value or NULL if not found.
- */
-typedef xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (void *ctxt,
-                                         const xmlChar *name,
-                                         const xmlChar *ns_uri);
-
-/**
- * xmlXPathFuncLookupFunc:
- * @ctxt:  an XPath context
- * @name:  name of the function
- * @ns_uri:  the namespace name hosting this function
- *
- * Prototype for callbacks used to plug function lookup in the XPath
- * engine.
- *
- * Returns the XPath function or NULL if not found.
- */
-typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt,
-					 const xmlChar *name,
-					 const xmlChar *ns_uri);
-
-/**
- * xmlXPathFlags:
- * Flags for XPath engine compilation and runtime
- */
-/**
- * XML_XPATH_CHECKNS:
- *
- * check namespaces at compilation
- */
-#define XML_XPATH_CHECKNS (1<<0)
-/**
- * XML_XPATH_NOVAR:
- *
- * forbid variables in expression
- */
-#define XML_XPATH_NOVAR	  (1<<1)
-
-/**
- * xmlXPathContext:
- *
- * Expression evaluation occurs with respect to a context.
- * he context consists of:
- *    - a node (the context node) 
- *    - a node list (the context node list) 
- *    - a set of variable bindings 
- *    - a function library 
- *    - the set of namespace declarations in scope for the expression 
- * Following the switch to hash tables, this need to be trimmed up at
- * the next binary incompatible release.
- * The node may be modified when the context is passed to libxml2
- * for an XPath evaluation so you may need to initialize it again
- * before the next call.
- */
-
-struct _xmlXPathContext {
-    xmlDocPtr doc;			/* The current document */
-    xmlNodePtr node;			/* The current node */
-
-    int nb_variables_unused;		/* unused (hash table) */
-    int max_variables_unused;		/* unused (hash table) */
-    xmlHashTablePtr varHash;		/* Hash table of defined variables */
-
-    int nb_types;			/* number of defined types */
-    int max_types;			/* max number of types */
-    xmlXPathTypePtr types;		/* Array of defined types */
-
-    int nb_funcs_unused;		/* unused (hash table) */
-    int max_funcs_unused;		/* unused (hash table) */
-    xmlHashTablePtr funcHash;		/* Hash table of defined funcs */
-
-    int nb_axis;			/* number of defined axis */
-    int max_axis;			/* max number of axis */
-    xmlXPathAxisPtr axis;		/* Array of defined axis */
-
-    /* the namespace nodes of the context node */
-    xmlNsPtr *namespaces;		/* Array of namespaces */
-    int nsNr;				/* number of namespace in scope */
-    void *user;				/* function to free */
-
-    /* extra variables */
-    int contextSize;			/* the context size */
-    int proximityPosition;		/* the proximity position */
-
-    /* extra stuff for XPointer */
-    int xptr;				/* is this an XPointer context? */
-    xmlNodePtr here;			/* for here() */
-    xmlNodePtr origin;			/* for origin() */
-
-    /* the set of namespace declarations in scope for the expression */
-    xmlHashTablePtr nsHash;		/* The namespaces hash table */
-    xmlXPathVariableLookupFunc varLookupFunc;/* variable lookup func */
-    void *varLookupData;		/* variable lookup data */
-
-    /* Possibility to link in an extra item */
-    void *extra;                        /* needed for XSLT */
-
-    /* The function name and URI when calling a function */
-    const xmlChar *function;
-    const xmlChar *functionURI;
-
-    /* function lookup function and data */
-    xmlXPathFuncLookupFunc funcLookupFunc;/* function lookup func */
-    void *funcLookupData;		/* function lookup data */
-
-    /* temporary namespace lists kept for walking the namespace axis */
-    xmlNsPtr *tmpNsList;		/* Array of namespaces */
-    int tmpNsNr;			/* number of namespaces in scope */
-
-    /* error reporting mechanism */
-    void *userData;                     /* user specific data block */
-    xmlStructuredErrorFunc error;       /* the callback in case of errors */
-    xmlError lastError;			/* the last error */
-    xmlNodePtr debugNode;		/* the source node XSLT */
-
-    /* dictionary */
-    xmlDictPtr dict;			/* dictionary if any */
-
-    int flags;				/* flags to control compilation */
-
-    /* Cache for reusal of XPath objects */
-    void *cache;
-};
-
-/*
- * The structure of a compiled expression form is not public.
- */
-
-typedef struct _xmlXPathCompExpr xmlXPathCompExpr;
-typedef xmlXPathCompExpr *xmlXPathCompExprPtr;
-
-/**
- * xmlXPathParserContext:
- *
- * An XPath parser context. It contains pure parsing informations,
- * an xmlXPathContext, and the stack of objects.
- */
-struct _xmlXPathParserContext {
-    const xmlChar *cur;			/* the current char being parsed */
-    const xmlChar *base;			/* the full expression */
-
-    int error;				/* error code */
-
-    xmlXPathContextPtr  context;	/* the evaluation context */
-    xmlXPathObjectPtr     value;	/* the current value */
-    int                 valueNr;	/* number of values stacked */
-    int                valueMax;	/* max number of values stacked */
-    xmlXPathObjectPtr *valueTab;	/* stack of values */
-
-    xmlXPathCompExprPtr comp;		/* the precompiled expression */
-    int xptr;				/* it this an XPointer expression */
-    xmlNodePtr         ancestor;	/* used for walking preceding axis */
-};
-
-/************************************************************************
- *									*
- *			Public API					*
- *									*
- ************************************************************************/
-
-/**
- * Objects and Nodesets handling
- */
-
-XMLPUBVAR double xmlXPathNAN;
-XMLPUBVAR double xmlXPathPINF;
-XMLPUBVAR double xmlXPathNINF;
-
-/* These macros may later turn into functions */
-/**
- * xmlXPathNodeSetGetLength:
- * @ns:  a node-set
- *
- * Implement a functionality similar to the DOM NodeList.length.
- *
- * Returns the number of nodes in the node-set.
- */
-#define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0)
-/**
- * xmlXPathNodeSetItem:
- * @ns:  a node-set
- * @index:  index of a node in the set
- *
- * Implements a functionality similar to the DOM NodeList.item().
- *
- * Returns the xmlNodePtr at the given @index in @ns or NULL if
- *         @index is out of range (0 to length-1)
- */
-#define xmlXPathNodeSetItem(ns, index)				\
-		((((ns) != NULL) && 				\
-		  ((index) >= 0) && ((index) < (ns)->nodeNr)) ?	\
-		 (ns)->nodeTab[(index)]				\
-		 : NULL)
-/**
- * xmlXPathNodeSetIsEmpty:
- * @ns: a node-set
- *
- * Checks whether @ns is empty or not.
- *
- * Returns %TRUE if @ns is an empty node-set.
- */
-#define xmlXPathNodeSetIsEmpty(ns)                                      \
-    (((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
-
-
-XMLPUBFUN void XMLCALL		   
-		    xmlXPathFreeObject		(xmlXPathObjectPtr obj);
-XMLPUBFUN xmlNodeSetPtr XMLCALL	   
-		    xmlXPathNodeSetCreate	(xmlNodePtr val);
-XMLPUBFUN void XMLCALL		   
-		    xmlXPathFreeNodeSetList	(xmlXPathObjectPtr obj);
-XMLPUBFUN void XMLCALL		   
-		    xmlXPathFreeNodeSet		(xmlNodeSetPtr obj);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL  
-		    xmlXPathObjectCopy		(xmlXPathObjectPtr val);
-XMLPUBFUN int XMLCALL		   
-		    xmlXPathCmpNodes		(xmlNodePtr node1,
-						 xmlNodePtr node2);
-/**
- * Conversion functions to basic types.
- */
-XMLPUBFUN int XMLCALL		   
-		    xmlXPathCastNumberToBoolean	(double val);
-XMLPUBFUN int XMLCALL		   
-		    xmlXPathCastStringToBoolean	(const xmlChar * val);
-XMLPUBFUN int XMLCALL		   
-		    xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns);
-XMLPUBFUN int XMLCALL		   
-		    xmlXPathCastToBoolean	(xmlXPathObjectPtr val);
-
-XMLPUBFUN double XMLCALL		   
-		    xmlXPathCastBooleanToNumber	(int val);
-XMLPUBFUN double XMLCALL		   
-		    xmlXPathCastStringToNumber	(const xmlChar * val);
-XMLPUBFUN double XMLCALL		   
-		    xmlXPathCastNodeToNumber	(xmlNodePtr node);
-XMLPUBFUN double XMLCALL		   
-		    xmlXPathCastNodeSetToNumber	(xmlNodeSetPtr ns);
-XMLPUBFUN double XMLCALL		   
-		    xmlXPathCastToNumber	(xmlXPathObjectPtr val);
-
-XMLPUBFUN xmlChar * XMLCALL	   
-		    xmlXPathCastBooleanToString	(int val);
-XMLPUBFUN xmlChar * XMLCALL	   
-		    xmlXPathCastNumberToString	(double val);
-XMLPUBFUN xmlChar * XMLCALL	   
-		    xmlXPathCastNodeToString	(xmlNodePtr node);
-XMLPUBFUN xmlChar * XMLCALL	   
-		    xmlXPathCastNodeSetToString	(xmlNodeSetPtr ns);
-XMLPUBFUN xmlChar * XMLCALL	   
-		    xmlXPathCastToString	(xmlXPathObjectPtr val);
-
-XMLPUBFUN xmlXPathObjectPtr XMLCALL  
-		    xmlXPathConvertBoolean	(xmlXPathObjectPtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL  
-		    xmlXPathConvertNumber	(xmlXPathObjectPtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL  
-		    xmlXPathConvertString	(xmlXPathObjectPtr val);
-
-/**
- * Context handling.
- */
-XMLPUBFUN xmlXPathContextPtr XMLCALL 
-		    xmlXPathNewContext		(xmlDocPtr doc);
-XMLPUBFUN void XMLCALL
-		    xmlXPathFreeContext		(xmlXPathContextPtr ctxt);
-XMLPUBFUN int XMLCALL
-		    xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
-				            int active,
-					    int value,
-					    int options);
-/**
- * Evaluation functions.
- */
-XMLPUBFUN long XMLCALL               
-		    xmlXPathOrderDocElems	(xmlDocPtr doc);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL  
-		    xmlXPathEval		(const xmlChar *str,
-						 xmlXPathContextPtr ctx);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL  
-		    xmlXPathEvalExpression	(const xmlChar *str,
-						 xmlXPathContextPtr ctxt);
-XMLPUBFUN int XMLCALL                
-		    xmlXPathEvalPredicate	(xmlXPathContextPtr ctxt,
-						 xmlXPathObjectPtr res);
-/**
- * Separate compilation/evaluation entry points.
- */
-XMLPUBFUN xmlXPathCompExprPtr XMLCALL 
-		    xmlXPathCompile		(const xmlChar *str);
-XMLPUBFUN xmlXPathCompExprPtr XMLCALL 
-		    xmlXPathCtxtCompile		(xmlXPathContextPtr ctxt,
-		    				 const xmlChar *str);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL   
-		    xmlXPathCompiledEval	(xmlXPathCompExprPtr comp,
-						 xmlXPathContextPtr ctx);
-XMLPUBFUN int XMLCALL   
-		    xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
-						 xmlXPathContextPtr ctxt);
-XMLPUBFUN void XMLCALL                
-		    xmlXPathFreeCompExpr	(xmlXPathCompExprPtr comp);
-#endif /* LIBXML_XPATH_ENABLED */
-#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN void XMLCALL		   
-		    xmlXPathInit		(void);
-XMLPUBFUN int XMLCALL
-		xmlXPathIsNaN	(double val);
-XMLPUBFUN int XMLCALL
-		xmlXPathIsInf	(double val);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED*/
-#endif /* ! __XML_XPATH_H__ */
diff --git a/interfaces/ext/libxml/xpathInternals.h b/interfaces/ext/libxml/xpathInternals.h
deleted file mode 100644
index dcd5243..0000000
--- a/interfaces/ext/libxml/xpathInternals.h
+++ /dev/null
@@ -1,630 +0,0 @@
-/*
- * Summary: internal interfaces for XML Path Language implementation
- * Description: internal interfaces for XML Path Language implementation
- *              used to build new modules on top of XPath like XPointer and
- *              XSLT
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_XPATH_INTERNALS_H__
-#define __XML_XPATH_INTERNALS_H__
-
-#include <libxml/xmlversion.h>
-#include <libxml/xpath.h>
-
-#ifdef LIBXML_XPATH_ENABLED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/************************************************************************
- *									*
- *			Helpers						*
- *									*
- ************************************************************************/
-
-/*
- * Many of these macros may later turn into functions. They
- * shouldn't be used in #ifdef's preprocessor instructions.
- */
-/**
- * xmlXPathSetError:
- * @ctxt:  an XPath parser context
- * @err:  an xmlXPathError code
- *
- * Raises an error.
- */
-#define xmlXPathSetError(ctxt, err)					\
-    { xmlXPatherror((ctxt), __FILE__, __LINE__, (err));			\
-      if ((ctxt) != NULL) (ctxt)->error = (err); }
-
-/**
- * xmlXPathSetArityError:
- * @ctxt:  an XPath parser context
- *
- * Raises an XPATH_INVALID_ARITY error.
- */
-#define xmlXPathSetArityError(ctxt)					\
-    xmlXPathSetError((ctxt), XPATH_INVALID_ARITY)
-
-/**
- * xmlXPathSetTypeError:
- * @ctxt:  an XPath parser context
- *
- * Raises an XPATH_INVALID_TYPE error.
- */
-#define xmlXPathSetTypeError(ctxt)					\
-    xmlXPathSetError((ctxt), XPATH_INVALID_TYPE)
-
-/**
- * xmlXPathGetError:
- * @ctxt:  an XPath parser context
- *
- * Get the error code of an XPath context.
- *
- * Returns the context error.
- */
-#define xmlXPathGetError(ctxt)	  ((ctxt)->error)
-
-/**
- * xmlXPathCheckError:
- * @ctxt:  an XPath parser context
- *
- * Check if an XPath error was raised.
- *
- * Returns true if an error has been raised, false otherwise.
- */
-#define xmlXPathCheckError(ctxt)  ((ctxt)->error != XPATH_EXPRESSION_OK)
-
-/**
- * xmlXPathGetDocument:
- * @ctxt:  an XPath parser context
- *
- * Get the document of an XPath context.
- *
- * Returns the context document.
- */
-#define xmlXPathGetDocument(ctxt)	((ctxt)->context->doc)
-
-/**
- * xmlXPathGetContextNode:
- * @ctxt: an XPath parser context
- *
- * Get the context node of an XPath context.
- *
- * Returns the context node.
- */
-#define xmlXPathGetContextNode(ctxt)	((ctxt)->context->node)
-
-XMLPUBFUN int XMLCALL		
-		xmlXPathPopBoolean	(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN double XMLCALL		
-    		xmlXPathPopNumber	(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL	
-    		xmlXPathPopString	(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN xmlNodeSetPtr XMLCALL	
-    		xmlXPathPopNodeSet	(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN void * XMLCALL		
-    		xmlXPathPopExternal	(xmlXPathParserContextPtr ctxt);
-
-/**
- * xmlXPathReturnBoolean:
- * @ctxt:  an XPath parser context
- * @val:  a boolean
- *
- * Pushes the boolean @val on the context stack.
- */
-#define xmlXPathReturnBoolean(ctxt, val)				\
-    valuePush((ctxt), xmlXPathNewBoolean(val))
-
-/**
- * xmlXPathReturnTrue:
- * @ctxt:  an XPath parser context
- *
- * Pushes true on the context stack.
- */
-#define xmlXPathReturnTrue(ctxt)   xmlXPathReturnBoolean((ctxt), 1)
-
-/**
- * xmlXPathReturnFalse:
- * @ctxt:  an XPath parser context
- *
- * Pushes false on the context stack.
- */
-#define xmlXPathReturnFalse(ctxt)  xmlXPathReturnBoolean((ctxt), 0)
-
-/**
- * xmlXPathReturnNumber:
- * @ctxt:  an XPath parser context
- * @val:  a double
- *
- * Pushes the double @val on the context stack.
- */
-#define xmlXPathReturnNumber(ctxt, val)					\
-    valuePush((ctxt), xmlXPathNewFloat(val))
-
-/**
- * xmlXPathReturnString:
- * @ctxt:  an XPath parser context
- * @str:  a string
- *
- * Pushes the string @str on the context stack.
- */
-#define xmlXPathReturnString(ctxt, str)					\
-    valuePush((ctxt), xmlXPathWrapString(str))
-
-/**
- * xmlXPathReturnEmptyString:
- * @ctxt:  an XPath parser context
- *
- * Pushes an empty string on the stack.
- */
-#define xmlXPathReturnEmptyString(ctxt)					\
-    valuePush((ctxt), xmlXPathNewCString(""))
-
-/**
- * xmlXPathReturnNodeSet:
- * @ctxt:  an XPath parser context
- * @ns:  a node-set
- *
- * Pushes the node-set @ns on the context stack.
- */
-#define xmlXPathReturnNodeSet(ctxt, ns)					\
-    valuePush((ctxt), xmlXPathWrapNodeSet(ns))
-
-/**
- * xmlXPathReturnEmptyNodeSet:
- * @ctxt:  an XPath parser context
- *
- * Pushes an empty node-set on the context stack.
- */
-#define xmlXPathReturnEmptyNodeSet(ctxt)				\
-    valuePush((ctxt), xmlXPathNewNodeSet(NULL))
-
-/**
- * xmlXPathReturnExternal:
- * @ctxt:  an XPath parser context
- * @val:  user data
- *
- * Pushes user data on the context stack.
- */
-#define xmlXPathReturnExternal(ctxt, val)				\
-    valuePush((ctxt), xmlXPathWrapExternal(val))
-
-/**
- * xmlXPathStackIsNodeSet:
- * @ctxt: an XPath parser context
- *
- * Check if the current value on the XPath stack is a node set or
- * an XSLT value tree.
- *
- * Returns true if the current object on the stack is a node-set.
- */
-#define xmlXPathStackIsNodeSet(ctxt)					\
-    (((ctxt)->value != NULL)						\
-     && (((ctxt)->value->type == XPATH_NODESET)				\
-         || ((ctxt)->value->type == XPATH_XSLT_TREE)))
-
-/**
- * xmlXPathStackIsExternal:
- * @ctxt: an XPath parser context
- *
- * Checks if the current value on the XPath stack is an external
- * object.
- *
- * Returns true if the current object on the stack is an external
- * object.
- */
-#define xmlXPathStackIsExternal(ctxt)					\
-	((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS))
-
-/**
- * xmlXPathEmptyNodeSet:
- * @ns:  a node-set
- *
- * Empties a node-set.
- */
-#define xmlXPathEmptyNodeSet(ns)					\
-    { while ((ns)->nodeNr > 0) (ns)->nodeTab[(ns)->nodeNr--] = NULL; }
-
-/**
- * CHECK_ERROR:
- *
- * Macro to return from the function if an XPath error was detected.
- */
-#define CHECK_ERROR							\
-    if (ctxt->error != XPATH_EXPRESSION_OK) return
-
-/**
- * CHECK_ERROR0:
- *
- * Macro to return 0 from the function if an XPath error was detected.
- */
-#define CHECK_ERROR0							\
-    if (ctxt->error != XPATH_EXPRESSION_OK) return(0)
-
-/**
- * XP_ERROR:
- * @X:  the error code
- *
- * Macro to raise an XPath error and return.
- */
-#define XP_ERROR(X)							\
-    { xmlXPathErr(ctxt, X); return; }
-
-/**
- * XP_ERROR0:
- * @X:  the error code
- *
- * Macro to raise an XPath error and return 0.
- */
-#define XP_ERROR0(X)							\
-    { xmlXPathErr(ctxt, X); return(0); }
-
-/**
- * CHECK_TYPE:
- * @typeval:  the XPath type
- *
- * Macro to check that the value on top of the XPath stack is of a given
- * type.
- */
-#define CHECK_TYPE(typeval)						\
-    if ((ctxt->value == NULL) || (ctxt->value->type != typeval))	\
-        XP_ERROR(XPATH_INVALID_TYPE)
-
-/**
- * CHECK_TYPE0:
- * @typeval:  the XPath type
- *
- * Macro to check that the value on top of the XPath stack is of a given
- * type. Return(0) in case of failure
- */
-#define CHECK_TYPE0(typeval)						\
-    if ((ctxt->value == NULL) || (ctxt->value->type != typeval))	\
-        XP_ERROR0(XPATH_INVALID_TYPE)
-
-/**
- * CHECK_ARITY:
- * @x:  the number of expected args
- *
- * Macro to check that the number of args passed to an XPath function matches.
- */
-#define CHECK_ARITY(x)							\
-    if (ctxt == NULL) return;						\
-    if (nargs != (x))							\
-        XP_ERROR(XPATH_INVALID_ARITY);
-
-/**
- * CAST_TO_STRING:
- *
- * Macro to try to cast the value on the top of the XPath stack to a string.
- */
-#define CAST_TO_STRING							\
-    if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_STRING))	\
-        xmlXPathStringFunction(ctxt, 1);
-
-/**
- * CAST_TO_NUMBER:
- *
- * Macro to try to cast the value on the top of the XPath stack to a number.
- */
-#define CAST_TO_NUMBER							\
-    if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_NUMBER))	\
-        xmlXPathNumberFunction(ctxt, 1);
-
-/**
- * CAST_TO_BOOLEAN:
- *
- * Macro to try to cast the value on the top of the XPath stack to a boolean.
- */
-#define CAST_TO_BOOLEAN							\
-    if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_BOOLEAN))	\
-        xmlXPathBooleanFunction(ctxt, 1);
-
-/*
- * Variable Lookup forwarding.
- */
-
-XMLPUBFUN void XMLCALL	
-	xmlXPathRegisterVariableLookup	(xmlXPathContextPtr ctxt,
-					 xmlXPathVariableLookupFunc f,
-					 void *data);
-
-/*
- * Function Lookup forwarding.
- */
-
-XMLPUBFUN void XMLCALL	
-	    xmlXPathRegisterFuncLookup	(xmlXPathContextPtr ctxt,
-					 xmlXPathFuncLookupFunc f,
-					 void *funcCtxt);
-
-/*
- * Error reporting.
- */
-XMLPUBFUN void XMLCALL		
-		xmlXPatherror	(xmlXPathParserContextPtr ctxt,
-				 const char *file,
-				 int line,
-				 int no);
-
-XMLPUBFUN void XMLCALL
-		xmlXPathErr	(xmlXPathParserContextPtr ctxt,
-				 int error);
-
-#ifdef LIBXML_DEBUG_ENABLED
-XMLPUBFUN void XMLCALL		
-		xmlXPathDebugDumpObject	(FILE *output,
-					 xmlXPathObjectPtr cur,
-					 int depth);
-XMLPUBFUN void XMLCALL		
-	    xmlXPathDebugDumpCompExpr(FILE *output,
-					 xmlXPathCompExprPtr comp,
-					 int depth);
-#endif
-/**
- * NodeSet handling.
- */
-XMLPUBFUN int XMLCALL		
-		xmlXPathNodeSetContains		(xmlNodeSetPtr cur,
-						 xmlNodePtr val);
-XMLPUBFUN xmlNodeSetPtr XMLCALL	
-		xmlXPathDifference		(xmlNodeSetPtr nodes1,
-						 xmlNodeSetPtr nodes2);
-XMLPUBFUN xmlNodeSetPtr XMLCALL	
-		xmlXPathIntersection		(xmlNodeSetPtr nodes1,
-						 xmlNodeSetPtr nodes2);
-
-XMLPUBFUN xmlNodeSetPtr XMLCALL	
-		xmlXPathDistinctSorted		(xmlNodeSetPtr nodes);
-XMLPUBFUN xmlNodeSetPtr XMLCALL	
-		xmlXPathDistinct		(xmlNodeSetPtr nodes);
-
-XMLPUBFUN int XMLCALL		
-		xmlXPathHasSameNodes		(xmlNodeSetPtr nodes1,
-						 xmlNodeSetPtr nodes2);
-
-XMLPUBFUN xmlNodeSetPtr XMLCALL	
-		xmlXPathNodeLeadingSorted	(xmlNodeSetPtr nodes,
-						 xmlNodePtr node);
-XMLPUBFUN xmlNodeSetPtr XMLCALL	
-		xmlXPathLeadingSorted		(xmlNodeSetPtr nodes1,
-						 xmlNodeSetPtr nodes2);
-XMLPUBFUN xmlNodeSetPtr XMLCALL	
-		xmlXPathNodeLeading		(xmlNodeSetPtr nodes,
-						 xmlNodePtr node);
-XMLPUBFUN xmlNodeSetPtr XMLCALL	
-		xmlXPathLeading			(xmlNodeSetPtr nodes1,
-						 xmlNodeSetPtr nodes2);
-
-XMLPUBFUN xmlNodeSetPtr XMLCALL	
-		xmlXPathNodeTrailingSorted	(xmlNodeSetPtr nodes,
-						 xmlNodePtr node);
-XMLPUBFUN xmlNodeSetPtr XMLCALL	
-		xmlXPathTrailingSorted		(xmlNodeSetPtr nodes1,
-						 xmlNodeSetPtr nodes2);
-XMLPUBFUN xmlNodeSetPtr XMLCALL	
-		xmlXPathNodeTrailing		(xmlNodeSetPtr nodes,
-						 xmlNodePtr node);
-XMLPUBFUN xmlNodeSetPtr XMLCALL	
-		xmlXPathTrailing		(xmlNodeSetPtr nodes1,
-						 xmlNodeSetPtr nodes2);
-
-
-/**
- * Extending a context.
- */
-
-XMLPUBFUN int XMLCALL		   
-		xmlXPathRegisterNs		(xmlXPathContextPtr ctxt,
-						 const xmlChar *prefix,
-						 const xmlChar *ns_uri);
-XMLPUBFUN const xmlChar * XMLCALL	   
-		xmlXPathNsLookup		(xmlXPathContextPtr ctxt,
-						 const xmlChar *prefix);
-XMLPUBFUN void XMLCALL		   
-		xmlXPathRegisteredNsCleanup	(xmlXPathContextPtr ctxt);
-
-XMLPUBFUN int XMLCALL		   
-		xmlXPathRegisterFunc		(xmlXPathContextPtr ctxt,
-						 const xmlChar *name,
-						 xmlXPathFunction f);
-XMLPUBFUN int XMLCALL		   
-		xmlXPathRegisterFuncNS		(xmlXPathContextPtr ctxt,
-						 const xmlChar *name,
-						 const xmlChar *ns_uri,
-						 xmlXPathFunction f);
-XMLPUBFUN int XMLCALL		   
-		xmlXPathRegisterVariable	(xmlXPathContextPtr ctxt,
-						 const xmlChar *name,
-						 xmlXPathObjectPtr value);
-XMLPUBFUN int XMLCALL		   
-		xmlXPathRegisterVariableNS	(xmlXPathContextPtr ctxt,
-						 const xmlChar *name,
-						 const xmlChar *ns_uri,
-						 xmlXPathObjectPtr value);
-XMLPUBFUN xmlXPathFunction XMLCALL   
-		xmlXPathFunctionLookup		(xmlXPathContextPtr ctxt,
-						 const xmlChar *name);
-XMLPUBFUN xmlXPathFunction XMLCALL   
-		xmlXPathFunctionLookupNS	(xmlXPathContextPtr ctxt,
-						 const xmlChar *name,
-						 const xmlChar *ns_uri);
-XMLPUBFUN void XMLCALL		   
-		xmlXPathRegisteredFuncsCleanup	(xmlXPathContextPtr ctxt);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL  
-		xmlXPathVariableLookup		(xmlXPathContextPtr ctxt,
-						 const xmlChar *name);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL  
-		xmlXPathVariableLookupNS	(xmlXPathContextPtr ctxt,
-						 const xmlChar *name,
-						 const xmlChar *ns_uri);
-XMLPUBFUN void XMLCALL		   
-		xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
-
-/**
- * Utilities to extend XPath.
- */
-XMLPUBFUN xmlXPathParserContextPtr XMLCALL
-		  xmlXPathNewParserContext	(const xmlChar *str,
-			  			 xmlXPathContextPtr ctxt);
-XMLPUBFUN void XMLCALL		  
-		xmlXPathFreeParserContext	(xmlXPathParserContextPtr ctxt);
-
-/* TODO: remap to xmlXPathValuePop and Push. */
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
-		valuePop			(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN int XMLCALL		  
-		valuePush			(xmlXPathParserContextPtr ctxt,
-					 	 xmlXPathObjectPtr value);
-
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
-		xmlXPathNewString		(const xmlChar *val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
-		xmlXPathNewCString		(const char *val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
-		xmlXPathWrapString		(xmlChar *val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
-		xmlXPathWrapCString		(char * val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
-		xmlXPathNewFloat		(double val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
-		xmlXPathNewBoolean		(int val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
-		xmlXPathNewNodeSet		(xmlNodePtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
-		xmlXPathNewValueTree		(xmlNodePtr val);
-XMLPUBFUN void XMLCALL		  
-		xmlXPathNodeSetAdd		(xmlNodeSetPtr cur,
-						 xmlNodePtr val);
-XMLPUBFUN void XMLCALL              
-		xmlXPathNodeSetAddUnique	(xmlNodeSetPtr cur,
-						 xmlNodePtr val);
-XMLPUBFUN void XMLCALL		  
-		xmlXPathNodeSetAddNs		(xmlNodeSetPtr cur, 
-						 xmlNodePtr node, 
-						 xmlNsPtr ns);
-XMLPUBFUN void XMLCALL              
-		xmlXPathNodeSetSort		(xmlNodeSetPtr set);
-
-XMLPUBFUN void XMLCALL		  
-		xmlXPathRoot			(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN void XMLCALL		  
-		xmlXPathEvalExpr		(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL	  
-		xmlXPathParseName		(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL	  
-		xmlXPathParseNCName		(xmlXPathParserContextPtr ctxt);
-
-/*
- * Existing functions.
- */
-XMLPUBFUN double XMLCALL 
-		xmlXPathStringEvalNumber	(const xmlChar *str);
-XMLPUBFUN int XMLCALL 
-		xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt, 
-						 xmlXPathObjectPtr res);
-XMLPUBFUN void XMLCALL 
-		xmlXPathRegisterAllFunctions	(xmlXPathContextPtr ctxt);
-XMLPUBFUN xmlNodeSetPtr XMLCALL 
-		xmlXPathNodeSetMerge		(xmlNodeSetPtr val1, 
-						 xmlNodeSetPtr val2);
-XMLPUBFUN void XMLCALL 
-		xmlXPathNodeSetDel		(xmlNodeSetPtr cur, 
-						 xmlNodePtr val);
-XMLPUBFUN void XMLCALL 
-		xmlXPathNodeSetRemove		(xmlNodeSetPtr cur, 
-						 int val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
-		xmlXPathNewNodeSetList		(xmlNodeSetPtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
-		xmlXPathWrapNodeSet		(xmlNodeSetPtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
-		xmlXPathWrapExternal		(void *val);
-
-XMLPUBFUN int XMLCALL xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN int XMLCALL xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN int XMLCALL xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict);
-XMLPUBFUN void XMLCALL xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN void XMLCALL xmlXPathAddValues(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN void XMLCALL xmlXPathSubValues(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN void XMLCALL xmlXPathMultValues(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN void XMLCALL xmlXPathDivValues(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN void XMLCALL xmlXPathModValues(xmlXPathParserContextPtr ctxt);
-
-XMLPUBFUN int XMLCALL xmlXPathIsNodeType(const xmlChar *name);
-
-/*
- * Some of the axis navigation routines.
- */
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextSelf(xmlXPathParserContextPtr ctxt,
-			xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextChild(xmlXPathParserContextPtr ctxt,
-			xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt,
-			xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt,
-			xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextParent(xmlXPathParserContextPtr ctxt,
-			xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt,
-			xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt,
-			xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt,
-			xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt,
-			xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt,
-			xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt,
-			xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt,
-			xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt,
-			xmlNodePtr cur);
-/*
- * The official core of XPath functions.
- */
-XMLPUBFUN void XMLCALL xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs);
-
-/**
- * Really internal functions
- */
-XMLPUBFUN void XMLCALL xmlXPathNodeSetFreeNs(xmlNsPtr ns);
- 
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_XPATH_ENABLED */
-#endif /* ! __XML_XPATH_INTERNALS_H__ */
diff --git a/interfaces/ext/libxml/xpointer.h b/interfaces/ext/libxml/xpointer.h
deleted file mode 100644
index dde1dfb..0000000
--- a/interfaces/ext/libxml/xpointer.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Summary: API to handle XML Pointers
- * Description: API to handle XML Pointers
- * Base implementation was made accordingly to
- * W3C Candidate Recommendation 7 June 2000
- * http://www.w3.org/TR/2000/CR-xptr-20000607
- *
- * Added support for the element() scheme described in:
- * W3C Proposed Recommendation 13 November 2002
- * http://www.w3.org/TR/2002/PR-xptr-element-20021113/  
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Daniel Veillard
- */
-
-#ifndef __XML_XPTR_H__
-#define __XML_XPTR_H__
-
-#include <libxml/xmlversion.h>
-
-#ifdef LIBXML_XPTR_ENABLED
-
-#include <libxml/tree.h>
-#include <libxml/xpath.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * A Location Set
- */
-typedef struct _xmlLocationSet xmlLocationSet;
-typedef xmlLocationSet *xmlLocationSetPtr;
-struct _xmlLocationSet {
-    int locNr;		      /* number of locations in the set */
-    int locMax;		      /* size of the array as allocated */
-    xmlXPathObjectPtr *locTab;/* array of locations */
-};
-
-/*
- * Handling of location sets.
- */
-
-XMLPUBFUN xmlLocationSetPtr XMLCALL			
-		    xmlXPtrLocationSetCreate	(xmlXPathObjectPtr val);
-XMLPUBFUN void XMLCALL			
-		    xmlXPtrFreeLocationSet	(xmlLocationSetPtr obj);
-XMLPUBFUN xmlLocationSetPtr XMLCALL	
-		    xmlXPtrLocationSetMerge	(xmlLocationSetPtr val1,
-						 xmlLocationSetPtr val2);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL	
-		    xmlXPtrNewRange		(xmlNodePtr start,
-						 int startindex,
-						 xmlNodePtr end,
-						 int endindex);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL	
-		    xmlXPtrNewRangePoints	(xmlXPathObjectPtr start,
-						 xmlXPathObjectPtr end);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL	
-		    xmlXPtrNewRangeNodePoint	(xmlNodePtr start,
-						 xmlXPathObjectPtr end);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL	
-		    xmlXPtrNewRangePointNode	(xmlXPathObjectPtr start,
-						 xmlNodePtr end);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL			
-		    xmlXPtrNewRangeNodes	(xmlNodePtr start,
-						 xmlNodePtr end);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL	
-		    xmlXPtrNewLocationSetNodes	(xmlNodePtr start,
-						 xmlNodePtr end);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL	
-		    xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL	
-		    xmlXPtrNewRangeNodeObject	(xmlNodePtr start,
-						 xmlXPathObjectPtr end);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL	
-		    xmlXPtrNewCollapsedRange	(xmlNodePtr start);
-XMLPUBFUN void XMLCALL			
-		    xmlXPtrLocationSetAdd	(xmlLocationSetPtr cur,
-						 xmlXPathObjectPtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL	
-		    xmlXPtrWrapLocationSet	(xmlLocationSetPtr val);
-XMLPUBFUN void XMLCALL			
-		    xmlXPtrLocationSetDel	(xmlLocationSetPtr cur,
-						 xmlXPathObjectPtr val);
-XMLPUBFUN void XMLCALL			
-		    xmlXPtrLocationSetRemove	(xmlLocationSetPtr cur,
-						 int val);
-
-/*
- * Functions.
- */
-XMLPUBFUN xmlXPathContextPtr XMLCALL	
-		    xmlXPtrNewContext		(xmlDocPtr doc,
-						 xmlNodePtr here,
-						 xmlNodePtr origin);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL	
-		    xmlXPtrEval			(const xmlChar *str,
-						 xmlXPathContextPtr ctx);
-XMLPUBFUN void XMLCALL					    
-		    xmlXPtrRangeToFunction	(xmlXPathParserContextPtr ctxt,
-       						 int nargs);
-XMLPUBFUN xmlNodePtr XMLCALL		
-		    xmlXPtrBuildNodeList	(xmlXPathObjectPtr obj);
-XMLPUBFUN void XMLCALL		
-		    xmlXPtrEvalRangePredicate	(xmlXPathParserContextPtr ctxt);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBXML_XPTR_ENABLED */
-#endif /* __XML_XPTR_H__ */
diff --git a/interfaces/ext/magic.h b/interfaces/ext/magic.h
deleted file mode 100644
index 765ff2b..0000000
--- a/interfaces/ext/magic.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) Christos Zoulas 2003.
- * All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice immediately at the beginning of the file, without modification,
- *    this list of conditions, and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#ifndef _MAGIC_H
-#define _MAGIC_H
-
-#include <sys/types.h>
-
-#define	MAGIC_NONE		0x000000 /* No flags */
-#define	MAGIC_DEBUG		0x000001 /* Turn on debugging */
-#define	MAGIC_SYMLINK		0x000002 /* Follow symlinks */
-#define	MAGIC_COMPRESS		0x000004 /* Check inside compressed files */
-#define	MAGIC_DEVICES		0x000008 /* Look at the contents of devices */
-#define	MAGIC_MIME_TYPE		0x000010 /* Return the MIME type */
-#define	MAGIC_CONTINUE		0x000020 /* Return all matches */
-#define	MAGIC_CHECK		0x000040 /* Print warnings to stderr */
-#define	MAGIC_PRESERVE_ATIME	0x000080 /* Restore access time on exit */
-#define	MAGIC_RAW		0x000100 /* Don't translate unprintable chars */
-#define	MAGIC_ERROR		0x000200 /* Handle ENOENT etc as real errors */
-#define	MAGIC_MIME_ENCODING	0x000400 /* Return the MIME encoding */
-#define MAGIC_MIME		(MAGIC_MIME_TYPE|MAGIC_MIME_ENCODING)
-#define	MAGIC_APPLE		0x000800 /* Return the Apple creator and type */
-#define	MAGIC_NO_CHECK_COMPRESS	0x001000 /* Don't check for compressed files */
-#define	MAGIC_NO_CHECK_TAR	0x002000 /* Don't check for tar files */
-#define	MAGIC_NO_CHECK_SOFT	0x004000 /* Don't check magic entries */
-#define	MAGIC_NO_CHECK_APPTYPE	0x008000 /* Don't check application type */
-#define	MAGIC_NO_CHECK_ELF	0x010000 /* Don't check for elf details */
-#define	MAGIC_NO_CHECK_TEXT	0x020000 /* Don't check for text files */
-#define	MAGIC_NO_CHECK_CDF	0x040000 /* Don't check for cdf files */
-#define	MAGIC_NO_CHECK_TOKENS	0x100000 /* Don't check tokens */
-#define MAGIC_NO_CHECK_ENCODING 0x200000 /* Don't check text encodings */
-
-/* Defined for backwards compatibility (renamed) */
-#define	MAGIC_NO_CHECK_ASCII	MAGIC_NO_CHECK_TEXT
-
-/* Defined for backwards compatibility; do nothing */
-#define	MAGIC_NO_CHECK_FORTRAN	0x000000 /* Don't check ascii/fortran */
-#define	MAGIC_NO_CHECK_TROFF	0x000000 /* Don't check ascii/troff */
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct magic_set *magic_t;
-magic_t magic_open(int);
-void magic_close(magic_t);
-
-const char *magic_getpath(const char *, int);
-const char *magic_file(magic_t, const char *);
-const char *magic_descriptor(magic_t, int);
-const char *magic_buffer(magic_t, const void *, size_t);
-
-const char *magic_error(magic_t);
-int magic_setflags(magic_t, int);
-
-int magic_load(magic_t, const char *);
-int magic_compile(magic_t, const char *);
-int magic_check(magic_t, const char *);
-int magic_errno(magic_t);
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _MAGIC_H */
diff --git a/interfaces/ext/regex.h b/interfaces/ext/regex.h
deleted file mode 100644
index b39c3f9..0000000
--- a/interfaces/ext/regex.h
+++ /dev/null
@@ -1,557 +0,0 @@
-/* Definitions for data structures and routines for the regular
-   expression library.
-   Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006
-   Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _REGEX_H
-#define _REGEX_H 1
-
-#include <sys/types.h>
-
-/* Allow the use in C++ code.  */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* The following two types have to be signed and unsigned integer type
-   wide enough to hold a value of a pointer.  For most ANSI compilers
-   ptrdiff_t and size_t should be likely OK.  Still size of these two
-   types is 2 for Microsoft C.  Ugh... */
-typedef long int s_reg_t;
-typedef unsigned long int active_reg_t;
-
-/* The following bits are used to determine the regexp syntax we
-   recognize.  The set/not-set meanings are chosen so that Emacs syntax
-   remains the value 0.  The bits are given in alphabetical order, and
-   the definitions shifted by one from the previous bit; thus, when we
-   add or remove a bit, only one other definition need change.  */
-typedef unsigned long int reg_syntax_t;
-
-/* If this bit is not set, then \ inside a bracket expression is literal.
-   If set, then such a \ quotes the following character.  */
-#define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
-
-/* If this bit is not set, then + and ? are operators, and \+ and \? are
-     literals.
-   If set, then \+ and \? are operators and + and ? are literals.  */
-#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
-
-/* If this bit is set, then character classes are supported.  They are:
-     [:alpha:], [:upper:], [:lower:],  [:digit:], [:alnum:], [:xdigit:],
-     [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
-   If not set, then character classes are not supported.  */
-#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
-
-/* If this bit is set, then ^ and $ are always anchors (outside bracket
-     expressions, of course).
-   If this bit is not set, then it depends:
-        ^  is an anchor if it is at the beginning of a regular
-           expression or after an open-group or an alternation operator;
-        $  is an anchor if it is at the end of a regular expression, or
-           before a close-group or an alternation operator.
-
-   This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
-   POSIX draft 11.2 says that * etc. in leading positions is undefined.
-   We already implemented a previous draft which made those constructs
-   invalid, though, so we haven't changed the code back.  */
-#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
-
-/* If this bit is set, then special characters are always special
-     regardless of where they are in the pattern.
-   If this bit is not set, then special characters are special only in
-     some contexts; otherwise they are ordinary.  Specifically,
-     * + ? and intervals are only special when not after the beginning,
-     open-group, or alternation operator.  */
-#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
-
-/* If this bit is set, then *, +, ?, and { cannot be first in an re or
-     immediately after an alternation or begin-group operator.  */
-#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
-
-/* If this bit is set, then . matches newline.
-   If not set, then it doesn't.  */
-#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
-
-/* If this bit is set, then . doesn't match NUL.
-   If not set, then it does.  */
-#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
-
-/* If this bit is set, nonmatching lists [^...] do not match newline.
-   If not set, they do.  */
-#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
-
-/* If this bit is set, either \{...\} or {...} defines an
-     interval, depending on RE_NO_BK_BRACES.
-   If not set, \{, \}, {, and } are literals.  */
-#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
-
-/* If this bit is set, +, ? and | aren't recognized as operators.
-   If not set, they are.  */
-#define RE_LIMITED_OPS (RE_INTERVALS << 1)
-
-/* If this bit is set, newline is an alternation operator.
-   If not set, newline is literal.  */
-#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
-
-/* If this bit is set, then `{...}' defines an interval, and \{ and \}
-     are literals.
-  If not set, then `\{...\}' defines an interval.  */
-#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
-
-/* If this bit is set, (...) defines a group, and \( and \) are literals.
-   If not set, \(...\) defines a group, and ( and ) are literals.  */
-#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
-
-/* If this bit is set, then \<digit> matches <digit>.
-   If not set, then \<digit> is a back-reference.  */
-#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
-
-/* If this bit is set, then | is an alternation operator, and \| is literal.
-   If not set, then \| is an alternation operator, and | is literal.  */
-#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
-
-/* If this bit is set, then an ending range point collating higher
-     than the starting range point, as in [z-a], is invalid.
-   If not set, then when ending range point collates higher than the
-     starting range point, the range is ignored.  */
-#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
-
-/* If this bit is set, then an unmatched ) is ordinary.
-   If not set, then an unmatched ) is invalid.  */
-#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
-
-/* If this bit is set, succeed as soon as we match the whole pattern,
-   without further backtracking.  */
-#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
-
-/* If this bit is set, do not process the GNU regex operators.
-   If not set, then the GNU regex operators are recognized. */
-#define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
-
-/* If this bit is set, turn on internal regex debugging.
-   If not set, and debugging was on, turn it off.
-   This only works if regex.c is compiled -DDEBUG.
-   We define this bit always, so that all that's needed to turn on
-   debugging is to recompile regex.c; the calling code can always have
-   this bit set, and it won't affect anything in the normal case. */
-#define RE_DEBUG (RE_NO_GNU_OPS << 1)
-
-/* If this bit is set, a syntactically invalid interval is treated as
-   a string of ordinary characters.  For example, the ERE 'a{1' is
-   treated as 'a\{1'.  */
-#define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
-
-/* If this bit is set, then ignore case when matching.
-   If not set, then case is significant.  */
-#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
-
-/* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only
-   for ^, because it is difficult to scan the regex backwards to find
-   whether ^ should be special.  */
-#define RE_CARET_ANCHORS_HERE (RE_ICASE << 1)
-
-/* If this bit is set, then \{ cannot be first in an bre or
-   immediately after an alternation or begin-group operator.  */
-#define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1)
-
-/* If this bit is set, then no_sub will be set to 1 during
-   re_compile_pattern.  */
-#define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
-
-/* This global variable defines the particular regexp syntax to use (for
-   some interfaces).  When a regexp is compiled, the syntax used is
-   stored in the pattern buffer, so changing this does not affect
-   already-compiled regexps.  */
-extern reg_syntax_t re_syntax_options;
-
-/* Define combinations of the above bits for the standard possibilities.
-   (The [[[ comments delimit what gets put into the Texinfo file, so
-   don't delete them!)  */
-/* [[[begin syntaxes]]] */
-#define RE_SYNTAX_EMACS 0
-
-#define RE_SYNTAX_AWK							\
-  (RE_BACKSLASH_ESCAPE_IN_LISTS   | RE_DOT_NOT_NULL			\
-   | RE_NO_BK_PARENS              | RE_NO_BK_REFS			\
-   | RE_NO_BK_VBAR                | RE_NO_EMPTY_RANGES			\
-   | RE_DOT_NEWLINE		  | RE_CONTEXT_INDEP_ANCHORS		\
-   | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
-
-#define RE_SYNTAX_GNU_AWK						\
-  ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG)	\
-   & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS		\
-       | RE_CONTEXT_INVALID_OPS ))
-
-#define RE_SYNTAX_POSIX_AWK						\
-  (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS		\
-   | RE_INTERVALS	    | RE_NO_GNU_OPS)
-
-#define RE_SYNTAX_GREP							\
-  (RE_BK_PLUS_QM              | RE_CHAR_CLASSES				\
-   | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS				\
-   | RE_NEWLINE_ALT)
-
-#define RE_SYNTAX_EGREP							\
-  (RE_CHAR_CLASSES        | RE_CONTEXT_INDEP_ANCHORS			\
-   | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE			\
-   | RE_NEWLINE_ALT       | RE_NO_BK_PARENS				\
-   | RE_NO_BK_VBAR)
-
-#define RE_SYNTAX_POSIX_EGREP						\
-  (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES			\
-   | RE_INVALID_INTERVAL_ORD)
-
-/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff.  */
-#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
-
-#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
-
-/* Syntax bits common to both basic and extended POSIX regex syntax.  */
-#define _RE_SYNTAX_POSIX_COMMON						\
-  (RE_CHAR_CLASSES | RE_DOT_NEWLINE      | RE_DOT_NOT_NULL		\
-   | RE_INTERVALS  | RE_NO_EMPTY_RANGES)
-
-#define RE_SYNTAX_POSIX_BASIC						\
-  (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP)
-
-/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
-   RE_LIMITED_OPS, i.e., \? \+ \| are not recognized.  Actually, this
-   isn't minimal, since other operators, such as \`, aren't disabled.  */
-#define RE_SYNTAX_POSIX_MINIMAL_BASIC					\
-  (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
-
-#define RE_SYNTAX_POSIX_EXTENDED					\
-  (_RE_SYNTAX_POSIX_COMMON  | RE_CONTEXT_INDEP_ANCHORS			\
-   | RE_CONTEXT_INDEP_OPS   | RE_NO_BK_BRACES				\
-   | RE_NO_BK_PARENS        | RE_NO_BK_VBAR				\
-   | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD)
-
-/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is
-   removed and RE_NO_BK_REFS is added.  */
-#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED				\
-  (_RE_SYNTAX_POSIX_COMMON  | RE_CONTEXT_INDEP_ANCHORS			\
-   | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES				\
-   | RE_NO_BK_PARENS        | RE_NO_BK_REFS				\
-   | RE_NO_BK_VBAR	    | RE_UNMATCHED_RIGHT_PAREN_ORD)
-/* [[[end syntaxes]]] */
-
-/* Maximum number of duplicates an interval can allow.  Some systems
-   (erroneously) define this in other header files, but we want our
-   value, so remove any previous define.  */
-#ifdef RE_DUP_MAX
-# undef RE_DUP_MAX
-#endif
-/* If sizeof(int) == 2, then ((1 << 15) - 1) overflows.  */
-#define RE_DUP_MAX (0x7fff)
-
-
-/* POSIX `cflags' bits (i.e., information for `regcomp').  */
-
-/* If this bit is set, then use extended regular expression syntax.
-   If not set, then use basic regular expression syntax.  */
-#define REG_EXTENDED 1
-
-/* If this bit is set, then ignore case when matching.
-   If not set, then case is significant.  */
-#define REG_ICASE (REG_EXTENDED << 1)
-
-/* If this bit is set, then anchors do not match at newline
-     characters in the string.
-   If not set, then anchors do match at newlines.  */
-#define REG_NEWLINE (REG_ICASE << 1)
-
-/* If this bit is set, then report only success or fail in regexec.
-   If not set, then returns differ between not matching and errors.  */
-#define REG_NOSUB (REG_NEWLINE << 1)
-
-
-/* POSIX `eflags' bits (i.e., information for regexec).  */
-
-/* If this bit is set, then the beginning-of-line operator doesn't match
-     the beginning of the string (presumably because it's not the
-     beginning of a line).
-   If not set, then the beginning-of-line operator does match the
-     beginning of the string.  */
-#define REG_NOTBOL 1
-
-/* Like REG_NOTBOL, except for the end-of-line.  */
-#define REG_NOTEOL (1 << 1)
-
-/* Use PMATCH[0] to delimit the start and end of the search in the
-   buffer.  */
-#define REG_STARTEND (1 << 2)
-
-
-/* If any error codes are removed, changed, or added, update the
-   `re_error_msg' table in regex.c.  */
-typedef enum
-{
-#ifdef _XOPEN_SOURCE
-  REG_ENOSYS = -1,	/* This will never happen for this implementation.  */
-#endif
-
-  REG_NOERROR = 0,	/* Success.  */
-  REG_NOMATCH,		/* Didn't find a match (for regexec).  */
-
-  /* POSIX regcomp return error codes.  (In the order listed in the
-     standard.)  */
-  REG_BADPAT,		/* Invalid pattern.  */
-  REG_ECOLLATE,		/* Inalid collating element.  */
-  REG_ECTYPE,		/* Invalid character class name.  */
-  REG_EESCAPE,		/* Trailing backslash.  */
-  REG_ESUBREG,		/* Invalid back reference.  */
-  REG_EBRACK,		/* Unmatched left bracket.  */
-  REG_EPAREN,		/* Parenthesis imbalance.  */
-  REG_EBRACE,		/* Unmatched \{.  */
-  REG_BADBR,		/* Invalid contents of \{\}.  */
-  REG_ERANGE,		/* Invalid range end.  */
-  REG_ESPACE,		/* Ran out of memory.  */
-  REG_BADRPT,		/* No preceding re for repetition op.  */
-
-  /* Error codes we've added.  */
-  REG_EEND,		/* Premature end.  */
-  REG_ESIZE,		/* Compiled pattern bigger than 2^16 bytes.  */
-  REG_ERPAREN		/* Unmatched ) or \); not returned from regcomp.  */
-} reg_errcode_t;
-
-/* This data structure represents a compiled pattern.  Before calling
-   the pattern compiler, the fields `buffer', `allocated', `fastmap',
-   `translate', and `no_sub' can be set.  After the pattern has been
-   compiled, the `re_nsub' field is available.  All other fields are
-   private to the regex routines.  */
-
-#ifndef RE_TRANSLATE_TYPE
-# define RE_TRANSLATE_TYPE unsigned char *
-#endif
-
-struct re_pattern_buffer
-{
-  /* Space that holds the compiled pattern.  It is declared as
-     `unsigned char *' because its elements are sometimes used as
-     array indexes.  */
-  unsigned char *buffer;
-
-  /* Number of bytes to which `buffer' points.  */
-  unsigned long int allocated;
-
-  /* Number of bytes actually used in `buffer'.  */
-  unsigned long int used;
-
-  /* Syntax setting with which the pattern was compiled.  */
-  reg_syntax_t syntax;
-
-  /* Pointer to a fastmap, if any, otherwise zero.  re_search uses the
-     fastmap, if there is one, to skip over impossible starting points
-     for matches.  */
-  char *fastmap;
-
-  /* Either a translate table to apply to all characters before
-     comparing them, or zero for no translation.  The translation is
-     applied to a pattern when it is compiled and to a string when it
-     is matched.  */
-  RE_TRANSLATE_TYPE translate;
-
-  /* Number of subexpressions found by the compiler.  */
-  size_t re_nsub;
-
-  /* Zero if this pattern cannot match the empty string, one else.
-     Well, in truth it's used only in `re_search_2', to see whether or
-     not we should use the fastmap, so we don't set this absolutely
-     perfectly; see `re_compile_fastmap' (the `duplicate' case).  */
-  unsigned can_be_null : 1;
-
-  /* If REGS_UNALLOCATED, allocate space in the `regs' structure
-     for `max (RE_NREGS, re_nsub + 1)' groups.
-     If REGS_REALLOCATE, reallocate space if necessary.
-     If REGS_FIXED, use what's there.  */
-#define REGS_UNALLOCATED 0
-#define REGS_REALLOCATE 1
-#define REGS_FIXED 2
-  unsigned regs_allocated : 2;
-
-  /* Set to zero when `regex_compile' compiles a pattern; set to one
-     by `re_compile_fastmap' if it updates the fastmap.  */
-  unsigned fastmap_accurate : 1;
-
-  /* If set, `re_match_2' does not return information about
-     subexpressions.  */
-  unsigned no_sub : 1;
-
-  /* If set, a beginning-of-line anchor doesn't match at the beginning
-     of the string.  */
-  unsigned not_bol : 1;
-
-  /* Similarly for an end-of-line anchor.  */
-  unsigned not_eol : 1;
-
-  /* If true, an anchor at a newline matches.  */
-  unsigned newline_anchor : 1;
-};
-
-typedef struct re_pattern_buffer regex_t;
-
-/* Type for byte offsets within the string.  POSIX mandates this.  */
-typedef int regoff_t;
-
-
-/* This is the structure we store register match data in.  See
-   regex.texinfo for a full description of what registers match.  */
-struct re_registers
-{
-  unsigned num_regs;
-  regoff_t *start;
-  regoff_t *end;
-};
-
-
-/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
-   `re_match_2' returns information about at least this many registers
-   the first time a `regs' structure is passed.  */
-#ifndef RE_NREGS
-# define RE_NREGS 30
-#endif
-
-
-/* POSIX specification for registers.  Aside from the different names than
-   `re_registers', POSIX uses an array of structures, instead of a
-   structure of arrays.  */
-typedef struct
-{
-  regoff_t rm_so;  /* Byte offset from string's start to substring's start.  */
-  regoff_t rm_eo;  /* Byte offset from string's start to substring's end.  */
-} regmatch_t;
-
-
-/* Declarations for routines.  */
-
-/* Sets the current default syntax to SYNTAX, and return the old syntax.
-   You can also simply assign to the `re_syntax_options' variable.  */
-extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
-
-/* Compile the regular expression PATTERN, with length LENGTH
-   and syntax given by the global `re_syntax_options', into the buffer
-   BUFFER.  Return NULL if successful, and an error string if not.  */
-extern const char *re_compile_pattern (const char *__pattern, size_t __length,
-				       struct re_pattern_buffer *__buffer);
-
-
-/* Compile a fastmap for the compiled pattern in BUFFER; used to
-   accelerate searches.  Return 0 if successful and -2 if was an
-   internal error.  */
-extern int re_compile_fastmap (struct re_pattern_buffer *__buffer);
-
-
-/* Search in the string STRING (with length LENGTH) for the pattern
-   compiled into BUFFER.  Start searching at position START, for RANGE
-   characters.  Return the starting position of the match, -1 for no
-   match, or -2 for an internal error.  Also return register
-   information in REGS (if REGS and BUFFER->no_sub are nonzero).  */
-extern int re_search (struct re_pattern_buffer *__buffer, const char *__string,
-		      int __length, int __start, int __range,
-		      struct re_registers *__regs);
-
-
-/* Like `re_search', but search in the concatenation of STRING1 and
-   STRING2.  Also, stop searching at index START + STOP.  */
-extern int re_search_2 (struct re_pattern_buffer *__buffer,
-			const char *__string1, int __length1,
-			const char *__string2, int __length2, int __start,
-			int __range, struct re_registers *__regs, int __stop);
-
-
-/* Like `re_search', but return how many characters in STRING the regexp
-   in BUFFER matched, starting at position START.  */
-extern int re_match (struct re_pattern_buffer *__buffer, const char *__string,
-		     int __length, int __start, struct re_registers *__regs);
-
-
-/* Relates to `re_match' as `re_search_2' relates to `re_search'.  */
-extern int re_match_2 (struct re_pattern_buffer *__buffer,
-		       const char *__string1, int __length1,
-		       const char *__string2, int __length2, int __start,
-		       struct re_registers *__regs, int __stop);
-
-
-/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
-   ENDS.  Subsequent matches using BUFFER and REGS will use this memory
-   for recording register information.  STARTS and ENDS must be
-   allocated with malloc, and must each be at least `NUM_REGS * sizeof
-   (regoff_t)' bytes long.
-
-   If NUM_REGS == 0, then subsequent matches should allocate their own
-   register data.
-
-   Unless this function is called, the first search or match using
-   PATTERN_BUFFER will allocate its own register data, without
-   freeing the old data.  */
-extern void re_set_registers (struct re_pattern_buffer *__buffer,
-			      struct re_registers *__regs,
-			      unsigned int __num_regs,
-			      regoff_t *__starts, regoff_t *__ends);
-
-#if defined _REGEX_RE_COMP || defined _LIBC
-# ifndef _CRAY
-/* 4.2 bsd compatibility.  */
-extern char *re_comp (const char *);
-extern int re_exec (const char *);
-# endif
-#endif
-
-/* GCC 2.95 and later have "__restrict"; C99 compilers have
-   "restrict", and "configure" may have defined "restrict".  */
-#ifndef __restrict
-# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
-#  if defined restrict || 199901L <= __STDC_VERSION__
-#   define __restrict restrict
-#  else
-#   define __restrict
-#  endif
-# endif
-#endif
-/* gcc 3.1 and up support the [restrict] syntax.  */
-#ifndef __restrict_arr
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) \
-     && !defined __GNUG__
-#  define __restrict_arr __restrict
-# else
-#  define __restrict_arr
-# endif
-#endif
-
-/* POSIX compatibility.  */
-extern int regcomp (regex_t *__restrict __preg,
-		    const char *__restrict __pattern,
-		    int __cflags);
-
-extern int regexec (const regex_t *__restrict __preg,
-		    const char *__restrict __string, size_t __nmatch,
-		    regmatch_t __pmatch[__restrict_arr],
-		    int __eflags);
-
-extern size_t regerror (int __errcode, const regex_t *__restrict __preg,
-			char *__restrict __errbuf, size_t __errbuf_size);
-
-extern void regfree (regex_t *__preg);
-
-
-#ifdef __cplusplus
-}
-#endif	/* C++ */
-
-#endif /* regex.h */
diff --git a/interfaces/ext/ricehdf.h b/interfaces/ext/ricehdf.h
deleted file mode 100644
index c1be7a2..0000000
--- a/interfaces/ext/ricehdf.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*==============================================================================
-The SZIP Science Data Lossless Compression Program is Copyright (C) 2001 Science
-& Technology Corporation @ UNM.  All rights released.  Copyright (C) 2003 Lowell
-H. Miles and Jack A. Venbrux.  Licensed to ICs Corp. for distribution by the
-University of Illinois' National Center for Supercomputing Applications as a
-part of the HDF data storage and retrieval file format and software library
-products package.  All rights reserved.  Do not modify or use for other
-purposes.
-
-SZIP implements an extended Rice adaptive lossless compression algorithm
-for sample data.  The primary algorithm was developed by R. F. Rice at
-Jet Propulsion Laboratory.  
-
-SZIP embodies certain inventions patented by the National Aeronautics &
-Space Administration.  United States Patent Nos. 5,448,642, 5,687,255,
-and 5,822,457 have been licensed to ICs Corp. for distribution with the
-HDF data storage and retrieval file format and software library products.
-All rights reserved.
-
-Revocable (in the event of breach by the user or if required by law), 
-royalty-free, nonexclusive sublicense to use SZIP decompression software 
-routines and underlying patents is hereby granted by ICs Corp. to all users 
-of and in conjunction with HDF data storage and retrieval file format and 
-software library products.
-
-Revocable (in the event of breach by the user or if required by law), 
-royalty-free, nonexclusive sublicense to use SZIP compression software 
-routines and underlying patents for non-commercial, scientific use only 
-is hereby granted by ICs Corp. to users of and in conjunction with HDF 
-data storage and retrieval file format and software library products.
-
-For commercial use license to SZIP compression software routines and underlying 
-patents please contact ICs Corp. at ICs Corp., 721 Lochsa Street, Suite 8,
-Post Falls, ID 83854.  (208) 262-2008.
-
-==============================================================================*/
-/********************************************************/
-/* defines and declarations to interface to the szip    */
-/* functions in file rice.c.                            */
-/* USE EXTREME CARE WHEN MODIFYING THIS FILE            */
-/********************************************************/
-extern int szip_allow_encoding;
-
-#define SZ_ALLOW_K13_OPTION_MASK         1
-#define SZ_CHIP_OPTION_MASK              2 
-#define SZ_EC_OPTION_MASK                4
-#define SZ_LSB_OPTION_MASK               8
-#define SZ_MSB_OPTION_MASK              16
-#define SZ_NN_OPTION_MASK               32
-#define SZ_RAW_OPTION_MASK             128
-
-#define SZ_STREAM_ERROR 	(-1)
-#define SZ_MEM_ERROR    	(-2)
-#define SZ_INIT_ERROR   	(-3)
-#define SZ_PARAM_ERROR  	(-4)
-#define SZ_NO_ENCODER_ERROR (-5)
-
-#define SZ_MAX_BLOCKS_PER_SCANLINE            128
-#define SZ_MAX_PIXELS_PER_BLOCK                32
-#define SZ_MAX_PIXELS_PER_SCANLINE     (SZ_MAX_BLOCKS_PER_SCANLINE)*(SZ_MAX_PIXELS_PER_BLOCK)
-
-long szip_compress_memory(
-	int options_mask,
-	int bits_per_pixel,
-	int pixels_per_block,
-	int pixels_per_scanline,
-	const void *in,
-	long pixels,
-	char *out);
-
-long szip_uncompress_memory(
-	int new_options_mask,
-	int new_bits_per_pixel,
-	int new_pixels_per_block,
-	int new_pixels_per_scanline, 
-	const char *in,
-	long in_bytes,
-	void *out,
-	long out_pixels);
-
-int szip_check_params(
-	int bits_per_pixel,
-	int pixels_per_block,
-	int pixels_per_scanline,
-	long image_pixels,
-	char **msg);
diff --git a/interfaces/ext/zconf.h b/interfaces/ext/zconf.h
deleted file mode 100644
index e81703c..0000000
--- a/interfaces/ext/zconf.h
+++ /dev/null
@@ -1,304 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2010 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#ifndef ZCONF_H
-#define ZCONF_H
-
-
-#if defined(__MSDOS__) && !defined(MSDOS)
-#  define MSDOS
-#endif
-#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
-#  define OS2
-#endif
-#if defined(_WINDOWS) && !defined(WINDOWS)
-#  define WINDOWS
-#endif
-#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
-#  ifndef WIN32
-#    define WIN32
-#  endif
-#endif
-#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
-#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
-#    ifndef SYS16BIT
-#      define SYS16BIT
-#    endif
-#  endif
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#ifdef SYS16BIT
-#  define MAXSEG_64K
-#endif
-#ifdef MSDOS
-#  define UNALIGNED_OK
-#endif
-
-#ifdef __STDC_VERSION__
-#  ifndef STDC
-#    define STDC
-#  endif
-#  if __STDC_VERSION__ >= 199901L
-#    ifndef STDC99
-#      define STDC99
-#    endif
-#  endif
-#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
-#  define STDC
-#endif
-
-#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
-#  define STDC
-#endif
-
-#ifndef STDC
-#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-#    define const       /* note: need a more gentle solution here */
-#  endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-#  define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-#  ifdef MAXSEG_64K
-#    define MAX_MEM_LEVEL 8
-#  else
-#    define MAX_MEM_LEVEL 9
-#  endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-#  define MAX_WBITS   15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
-            (1 << (windowBits+2)) +  (1 << (memLevel+9))
- that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
-     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
-   The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
-                        /* Type declarations */
-
-#ifndef OF /* function prototypes */
-#  ifdef STDC
-#    define OF(args)  args
-#  else
-#    define OF(args)  ()
-#  endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#ifdef SYS16BIT
-#  if defined(M_I86SM) || defined(M_I86MM)
-     /* MSC small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef _MSC_VER
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#  if (defined(__SMALL__) || defined(__MEDIUM__))
-     /* Turbo C small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef __BORLANDC__
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#endif
-
-#if defined(WINDOWS) || defined(WIN32)
-   /* If building or using zlib as a DLL, define ZLIB_DLL.
-    * This is not mandatory, but it offers a little performance increase.
-    */
-#  ifdef ZLIB_DLL
-#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
-#      ifdef ZLIB_INTERNAL
-#        define ZEXTERN extern __declspec(dllexport)
-#      else
-#        define ZEXTERN extern __declspec(dllimport)
-#      endif
-#    endif
-#  endif  /* ZLIB_DLL */
-   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
-    * define ZLIB_WINAPI.
-    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
-    */
-#  ifdef ZLIB_WINAPI
-#    ifdef FAR
-#      undef FAR
-#    endif
-#    include <windows.h>
-     /* No need for _export, use ZLIB.DEF instead. */
-     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-#    define ZEXPORT WINAPI
-#    ifdef WIN32
-#      define ZEXPORTVA WINAPIV
-#    else
-#      define ZEXPORTVA FAR CDECL
-#    endif
-#  endif
-#endif
-
-#if defined (__BEOS__)
-#  ifdef ZLIB_DLL
-#    ifdef ZLIB_INTERNAL
-#      define ZEXPORT   __declspec(dllexport)
-#      define ZEXPORTVA __declspec(dllexport)
-#    else
-#      define ZEXPORT   __declspec(dllimport)
-#      define ZEXPORTVA __declspec(dllimport)
-#    endif
-#  endif
-#endif
-
-#ifndef ZEXTERN
-#  define ZEXTERN extern
-#endif
-#ifndef ZEXPORT
-#  define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
-#endif
-
-#ifndef FAR
-#  define FAR
-#endif
-
-#if !defined(__MACTYPES__)
-typedef unsigned char  Byte;  /* 8 bits */
-#endif
-typedef unsigned int   uInt;  /* 16 bits or more */
-typedef unsigned long  uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
-   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-#  define Bytef Byte FAR
-#else
-   typedef Byte  FAR Bytef;
-#endif
-typedef char  FAR charf;
-typedef int   FAR intf;
-typedef uInt  FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
-   typedef void const *voidpc;
-   typedef void FAR   *voidpf;
-   typedef void       *voidp;
-#else
-   typedef Byte const *voidpc;
-   typedef Byte FAR   *voidpf;
-   typedef Byte       *voidp;
-#endif
-
-#if UNIX
-#  define Z_HAVE_UNISTD_H
-#endif
-
-#ifdef STDC
-#  include <sys/types.h>    /* for off_t */
-#endif
-
-/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
- * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
- * though the former does not conform to the LFS document), but considering
- * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
- * equivalently requesting no 64-bit operations
- */
-#if -_LARGEFILE64_SOURCE - -1 == 1
-#  undef _LARGEFILE64_SOURCE
-#endif
-
-#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
-#  include <unistd.h>       /* for SEEK_* and off_t */
-#  ifdef VMS
-#    include <unixio.h>     /* for off_t */
-#  endif
-#  ifndef z_off_t
-#    define z_off_t off_t
-#  endif
-#endif
-
-#ifndef SEEK_SET
-#  define SEEK_SET        0       /* Seek from beginning of file.  */
-#  define SEEK_CUR        1       /* Seek from current position.  */
-#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
-#endif
-
-#ifndef z_off_t
-#  define z_off_t long
-#endif
-
-#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
-#  define z_off64_t off64_t
-#else
-#  define z_off64_t z_off_t
-#endif
-
-#if defined(__OS400__)
-#  define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-#  define NO_vsnprintf
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-  #pragma map(deflateInit_,"DEIN")
-  #pragma map(deflateInit2_,"DEIN2")
-  #pragma map(deflateEnd,"DEEND")
-  #pragma map(deflateBound,"DEBND")
-  #pragma map(inflateInit_,"ININ")
-  #pragma map(inflateInit2_,"ININ2")
-  #pragma map(inflateEnd,"INEND")
-  #pragma map(inflateSync,"INSY")
-  #pragma map(inflateSetDictionary,"INSEDI")
-  #pragma map(compressBound,"CMBND")
-  #pragma map(inflate_table,"INTABL")
-  #pragma map(inflate_fast,"INFA")
-  #pragma map(inflate_copyright,"INCOPY")
-#endif
-
-#endif /* ZCONF_H */
diff --git a/interfaces/ext/zlib.h b/interfaces/ext/zlib.h
deleted file mode 100644
index bfbba83..0000000
--- a/interfaces/ext/zlib.h
+++ /dev/null
@@ -1,1613 +0,0 @@
-/* zlib.h -- interface of the 'zlib' general purpose compression library
-  version 1.2.5, April 19th, 2010
-
-  Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  jloup at gzip.org          madler at alumni.caltech.edu
-
-
-  The data format used by the zlib library is described by RFCs (Request for
-  Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
-  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
-*/
-
-#ifndef ZLIB_H
-#define ZLIB_H
-
-#include "zconf.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ZLIB_VERSION "1.2.5"
-#define ZLIB_VERNUM 0x1250
-#define ZLIB_VER_MAJOR 1
-#define ZLIB_VER_MINOR 2
-#define ZLIB_VER_REVISION 5
-#define ZLIB_VER_SUBREVISION 0
-
-/*
-    The 'zlib' compression library provides in-memory compression and
-  decompression functions, including integrity checks of the uncompressed data.
-  This version of the library supports only one compression method (deflation)
-  but other algorithms will be added later and will have the same stream
-  interface.
-
-    Compression can be done in a single step if the buffers are large enough,
-  or can be done by repeated calls of the compression function.  In the latter
-  case, the application must provide more input and/or consume the output
-  (providing more output space) before each call.
-
-    The compressed data format used by default by the in-memory functions is
-  the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
-  around a deflate stream, which is itself documented in RFC 1951.
-
-    The library also supports reading and writing files in gzip (.gz) format
-  with an interface similar to that of stdio using the functions that start
-  with "gz".  The gzip format is different from the zlib format.  gzip is a
-  gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
-
-    This library can optionally read and write gzip streams in memory as well.
-
-    The zlib format was designed to be compact and fast for use in memory
-  and on communications channels.  The gzip format was designed for single-
-  file compression on file systems, has a larger header than zlib to maintain
-  directory information, and uses a different, slower check method than zlib.
-
-    The library does not install any signal handler.  The decoder checks
-  the consistency of the compressed data, so the library should never crash
-  even in case of corrupted input.
-*/
-
-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
-typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
-
-struct internal_state;
-
-typedef struct z_stream_s {
-    Bytef    *next_in;  /* next input byte */
-    uInt     avail_in;  /* number of bytes available at next_in */
-    uLong    total_in;  /* total nb of input bytes read so far */
-
-    Bytef    *next_out; /* next output byte should be put there */
-    uInt     avail_out; /* remaining free space at next_out */
-    uLong    total_out; /* total nb of bytes output so far */
-
-    char     *msg;      /* last error message, NULL if no error */
-    struct internal_state FAR *state; /* not visible by applications */
-
-    alloc_func zalloc;  /* used to allocate the internal state */
-    free_func  zfree;   /* used to free the internal state */
-    voidpf     opaque;  /* private data object passed to zalloc and zfree */
-
-    int     data_type;  /* best guess about the data type: binary or text */
-    uLong   adler;      /* adler32 value of the uncompressed data */
-    uLong   reserved;   /* reserved for future use */
-} z_stream;
-
-typedef z_stream FAR *z_streamp;
-
-/*
-     gzip header information passed to and from zlib routines.  See RFC 1952
-  for more details on the meanings of these fields.
-*/
-typedef struct gz_header_s {
-    int     text;       /* true if compressed data believed to be text */
-    uLong   time;       /* modification time */
-    int     xflags;     /* extra flags (not used when writing a gzip file) */
-    int     os;         /* operating system */
-    Bytef   *extra;     /* pointer to extra field or Z_NULL if none */
-    uInt    extra_len;  /* extra field length (valid if extra != Z_NULL) */
-    uInt    extra_max;  /* space at extra (only when reading header) */
-    Bytef   *name;      /* pointer to zero-terminated file name or Z_NULL */
-    uInt    name_max;   /* space at name (only when reading header) */
-    Bytef   *comment;   /* pointer to zero-terminated comment or Z_NULL */
-    uInt    comm_max;   /* space at comment (only when reading header) */
-    int     hcrc;       /* true if there was or will be a header crc */
-    int     done;       /* true when done reading gzip header (not used
-                           when writing a gzip file) */
-} gz_header;
-
-typedef gz_header FAR *gz_headerp;
-
-/*
-     The application must update next_in and avail_in when avail_in has dropped
-   to zero.  It must update next_out and avail_out when avail_out has dropped
-   to zero.  The application must initialize zalloc, zfree and opaque before
-   calling the init function.  All other fields are set by the compression
-   library and must not be updated by the application.
-
-     The opaque value provided by the application will be passed as the first
-   parameter for calls of zalloc and zfree.  This can be useful for custom
-   memory management.  The compression library attaches no meaning to the
-   opaque value.
-
-     zalloc must return Z_NULL if there is not enough memory for the object.
-   If zlib is used in a multi-threaded application, zalloc and zfree must be
-   thread safe.
-
-     On 16-bit systems, the functions zalloc and zfree must be able to allocate
-   exactly 65536 bytes, but will not be required to allocate more than this if
-   the symbol MAXSEG_64K is defined (see zconf.h).  WARNING: On MSDOS, pointers
-   returned by zalloc for objects of exactly 65536 bytes *must* have their
-   offset normalized to zero.  The default allocation function provided by this
-   library ensures this (see zutil.c).  To reduce memory requirements and avoid
-   any allocation of 64K objects, at the expense of compression ratio, compile
-   the library with -DMAX_WBITS=14 (see zconf.h).
-
-     The fields total_in and total_out can be used for statistics or progress
-   reports.  After compression, total_in holds the total size of the
-   uncompressed data and may be saved for use in the decompressor (particularly
-   if the decompressor wants to decompress everything in a single step).
-*/
-
-                        /* constants */
-
-#define Z_NO_FLUSH      0
-#define Z_PARTIAL_FLUSH 1
-#define Z_SYNC_FLUSH    2
-#define Z_FULL_FLUSH    3
-#define Z_FINISH        4
-#define Z_BLOCK         5
-#define Z_TREES         6
-/* Allowed flush values; see deflate() and inflate() below for details */
-
-#define Z_OK            0
-#define Z_STREAM_END    1
-#define Z_NEED_DICT     2
-#define Z_ERRNO        (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR   (-3)
-#define Z_MEM_ERROR    (-4)
-#define Z_BUF_ERROR    (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative values
- * are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION         0
-#define Z_BEST_SPEED             1
-#define Z_BEST_COMPRESSION       9
-#define Z_DEFAULT_COMPRESSION  (-1)
-/* compression levels */
-
-#define Z_FILTERED            1
-#define Z_HUFFMAN_ONLY        2
-#define Z_RLE                 3
-#define Z_FIXED               4
-#define Z_DEFAULT_STRATEGY    0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY   0
-#define Z_TEXT     1
-#define Z_ASCII    Z_TEXT   /* for compatibility with 1.2.2 and earlier */
-#define Z_UNKNOWN  2
-/* Possible values of the data_type field (though see inflate()) */
-
-#define Z_DEFLATED   8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
-
-#define zlib_version zlibVersion()
-/* for compatibility with versions < 1.0.2 */
-
-
-                        /* basic functions */
-
-ZEXTERN const char * ZEXPORT zlibVersion OF((void));
-/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
-   If the first character differs, the library code actually used is not
-   compatible with the zlib.h header file used by the application.  This check
-   is automatically made by deflateInit and inflateInit.
- */
-
-/*
-ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
-
-     Initializes the internal stream state for compression.  The fields
-   zalloc, zfree and opaque must be initialized before by the caller.  If
-   zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
-   allocation functions.
-
-     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
-   1 gives best speed, 9 gives best compression, 0 gives no compression at all
-   (the input data is simply copied a block at a time).  Z_DEFAULT_COMPRESSION
-   requests a default compromise between speed and compression (currently
-   equivalent to level 6).
-
-     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if level is not a valid compression level, or
-   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
-   with the version assumed by the caller (ZLIB_VERSION).  msg is set to null
-   if there is no error message.  deflateInit does not perform any compression:
-   this will be done by deflate().
-*/
-
-
-ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
-/*
-    deflate compresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full.  It may introduce
-  some output latency (reading input without producing any output) except when
-  forced to flush.
-
-    The detailed semantics are as follows.  deflate performs one or both of the
-  following actions:
-
-  - Compress more input starting at next_in and update next_in and avail_in
-    accordingly.  If not all input can be processed (because there is not
-    enough room in the output buffer), next_in and avail_in are updated and
-    processing will resume at this point for the next call of deflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly.  This action is forced if the parameter flush is non zero.
-    Forcing flush frequently degrades the compression ratio, so this parameter
-    should be set only when necessary (in interactive applications).  Some
-    output may be provided even if flush is not set.
-
-    Before the call of deflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming more
-  output, and updating avail_in or avail_out accordingly; avail_out should
-  never be zero before the call.  The application can consume the compressed
-  output when it wants, for example when the output buffer is full (avail_out
-  == 0), or after each call of deflate().  If deflate returns Z_OK and with
-  zero avail_out, it must be called again after making room in the output
-  buffer because there might be more output pending.
-
-    Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
-  decide how much data to accumulate before producing output, in order to
-  maximize compression.
-
-    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
-  flushed to the output buffer and the output is aligned on a byte boundary, so
-  that the decompressor can get all input data available so far.  (In
-  particular avail_in is zero after the call if enough output space has been
-  provided before the call.) Flushing may degrade compression for some
-  compression algorithms and so it should be used only when necessary.  This
-  completes the current deflate block and follows it with an empty stored block
-  that is three bits plus filler bits to the next byte, followed by four bytes
-  (00 00 ff ff).
-
-    If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
-  output buffer, but the output is not aligned to a byte boundary.  All of the
-  input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
-  This completes the current deflate block and follows it with an empty fixed
-  codes block that is 10 bits long.  This assures that enough bytes are output
-  in order for the decompressor to finish the block before the empty fixed code
-  block.
-
-    If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
-  for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
-  seven bits of the current block are held to be written as the next byte after
-  the next deflate block is completed.  In this case, the decompressor may not
-  be provided enough bits at this point in order to complete decompression of
-  the data provided so far to the compressor.  It may need to wait for the next
-  block to be emitted.  This is for advanced applications that need to control
-  the emission of deflate blocks.
-
-    If flush is set to Z_FULL_FLUSH, all output is flushed as with
-  Z_SYNC_FLUSH, and the compression state is reset so that decompression can
-  restart from this point if previous compressed data has been damaged or if
-  random access is desired.  Using Z_FULL_FLUSH too often can seriously degrade
-  compression.
-
-    If deflate returns with avail_out == 0, this function must be called again
-  with the same value of the flush parameter and more output space (updated
-  avail_out), until the flush is complete (deflate returns with non-zero
-  avail_out).  In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
-  avail_out is greater than six to avoid repeated flush markers due to
-  avail_out == 0 on return.
-
-    If the parameter flush is set to Z_FINISH, pending input is processed,
-  pending output is flushed and deflate returns with Z_STREAM_END if there was
-  enough output space; if deflate returns with Z_OK, this function must be
-  called again with Z_FINISH and more output space (updated avail_out) but no
-  more input data, until it returns with Z_STREAM_END or an error.  After
-  deflate has returned Z_STREAM_END, the only possible operations on the stream
-  are deflateReset or deflateEnd.
-
-    Z_FINISH can be used immediately after deflateInit if all the compression
-  is to be done in a single step.  In this case, avail_out must be at least the
-  value returned by deflateBound (see below).  If deflate does not return
-  Z_STREAM_END, then it must be called again as described above.
-
-    deflate() sets strm->adler to the adler32 checksum of all input read
-  so far (that is, total_in bytes).
-
-    deflate() may update strm->data_type if it can make a good guess about
-  the input data type (Z_BINARY or Z_TEXT).  In doubt, the data is considered
-  binary.  This field is only for information purposes and does not affect the
-  compression algorithm in any manner.
-
-    deflate() returns Z_OK if some progress has been made (more input
-  processed or more output produced), Z_STREAM_END if all input has been
-  consumed and all output has been produced (only when flush is set to
-  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
-  if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible
-  (for example avail_in or avail_out was zero).  Note that Z_BUF_ERROR is not
-  fatal, and deflate() can be called again with more input and more output
-  space to continue compressing.
-*/
-
-
-ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any pending
-   output.
-
-     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
-   stream state was inconsistent, Z_DATA_ERROR if the stream was freed
-   prematurely (some input or output was discarded).  In the error case, msg
-   may be set but then points to a static string (which must not be
-   deallocated).
-*/
-
-
-/*
-ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
-
-     Initializes the internal stream state for decompression.  The fields
-   next_in, avail_in, zalloc, zfree and opaque must be initialized before by
-   the caller.  If next_in is not Z_NULL and avail_in is large enough (the
-   exact value depends on the compression method), inflateInit determines the
-   compression method from the zlib header and allocates all data structures
-   accordingly; otherwise the allocation will be deferred to the first call of
-   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
-   use default allocation functions.
-
-     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
-   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
-   invalid, such as a null pointer to the structure.  msg is set to null if
-   there is no error message.  inflateInit does not perform any decompression
-   apart from possibly reading the zlib header if present: actual decompression
-   will be done by inflate().  (So next_in and avail_in may be modified, but
-   next_out and avail_out are unused and unchanged.) The current implementation
-   of inflateInit() does not process any header information -- that is deferred
-   until inflate() is called.
-*/
-
-
-ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
-/*
-    inflate decompresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full.  It may introduce
-  some output latency (reading input without producing any output) except when
-  forced to flush.
-
-  The detailed semantics are as follows.  inflate performs one or both of the
-  following actions:
-
-  - Decompress more input starting at next_in and update next_in and avail_in
-    accordingly.  If not all input can be processed (because there is not
-    enough room in the output buffer), next_in is updated and processing will
-    resume at this point for the next call of inflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly.  inflate() provides as much output as possible, until there is
-    no more input data or no more space in the output buffer (see below about
-    the flush parameter).
-
-    Before the call of inflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming more
-  output, and updating the next_* and avail_* values accordingly.  The
-  application can consume the uncompressed output when it wants, for example
-  when the output buffer is full (avail_out == 0), or after each call of
-  inflate().  If inflate returns Z_OK and with zero avail_out, it must be
-  called again after making room in the output buffer because there might be
-  more output pending.
-
-    The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH,
-  Z_BLOCK, or Z_TREES.  Z_SYNC_FLUSH requests that inflate() flush as much
-  output as possible to the output buffer.  Z_BLOCK requests that inflate()
-  stop if and when it gets to the next deflate block boundary.  When decoding
-  the zlib or gzip format, this will cause inflate() to return immediately
-  after the header and before the first block.  When doing a raw inflate,
-  inflate() will go ahead and process the first block, and will return when it
-  gets to the end of that block, or when it runs out of data.
-
-    The Z_BLOCK option assists in appending to or combining deflate streams.
-  Also to assist in this, on return inflate() will set strm->data_type to the
-  number of unused bits in the last byte taken from strm->next_in, plus 64 if
-  inflate() is currently decoding the last block in the deflate stream, plus
-  128 if inflate() returned immediately after decoding an end-of-block code or
-  decoding the complete header up to just before the first byte of the deflate
-  stream.  The end-of-block will not be indicated until all of the uncompressed
-  data from that block has been written to strm->next_out.  The number of
-  unused bits may in general be greater than seven, except when bit 7 of
-  data_type is set, in which case the number of unused bits will be less than
-  eight.  data_type is set as noted here every time inflate() returns for all
-  flush options, and so can be used to determine the amount of currently
-  consumed input in bits.
-
-    The Z_TREES option behaves as Z_BLOCK does, but it also returns when the
-  end of each deflate block header is reached, before any actual data in that
-  block is decoded.  This allows the caller to determine the length of the
-  deflate block header for later use in random access within a deflate block.
-  256 is added to the value of strm->data_type when inflate() returns
-  immediately after reaching the end of the deflate block header.
-
-    inflate() should normally be called until it returns Z_STREAM_END or an
-  error.  However if all decompression is to be performed in a single step (a
-  single call of inflate), the parameter flush should be set to Z_FINISH.  In
-  this case all pending input is processed and all pending output is flushed;
-  avail_out must be large enough to hold all the uncompressed data.  (The size
-  of the uncompressed data may have been saved by the compressor for this
-  purpose.) The next operation on this stream must be inflateEnd to deallocate
-  the decompression state.  The use of Z_FINISH is never required, but can be
-  used to inform inflate that a faster approach may be used for the single
-  inflate() call.
-
-     In this implementation, inflate() always flushes as much output as
-  possible to the output buffer, and always uses the faster approach on the
-  first call.  So the only effect of the flush parameter in this implementation
-  is on the return value of inflate(), as noted below, or when it returns early
-  because Z_BLOCK or Z_TREES is used.
-
-     If a preset dictionary is needed after this call (see inflateSetDictionary
-  below), inflate sets strm->adler to the adler32 checksum of the dictionary
-  chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
-  strm->adler to the adler32 checksum of all output produced so far (that is,
-  total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
-  below.  At the end of the stream, inflate() checks that its computed adler32
-  checksum is equal to that saved by the compressor and returns Z_STREAM_END
-  only if the checksum is correct.
-
-    inflate() can decompress and check either zlib-wrapped or gzip-wrapped
-  deflate data.  The header type is detected automatically, if requested when
-  initializing with inflateInit2().  Any information contained in the gzip
-  header is not retained, so applications that need that information should
-  instead use raw inflate, see inflateInit2() below, or inflateBack() and
-  perform their own processing of the gzip header and trailer.
-
-    inflate() returns Z_OK if some progress has been made (more input processed
-  or more output produced), Z_STREAM_END if the end of the compressed data has
-  been reached and all uncompressed output has been produced, Z_NEED_DICT if a
-  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
-  corrupted (input stream not conforming to the zlib format or incorrect check
-  value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
-  next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
-  Z_BUF_ERROR if no progress is possible or if there was not enough room in the
-  output buffer when Z_FINISH is used.  Note that Z_BUF_ERROR is not fatal, and
-  inflate() can be called again with more input and more output space to
-  continue decompressing.  If Z_DATA_ERROR is returned, the application may
-  then call inflateSync() to look for a good compression block if a partial
-  recovery of the data is desired.
-*/
-
-
-ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any pending
-   output.
-
-     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
-   was inconsistent.  In the error case, msg may be set but then points to a
-   static string (which must not be deallocated).
-*/
-
-
-                        /* Advanced functions */
-
-/*
-    The following functions are needed only in some special applications.
-*/
-
-/*
-ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
-                                     int  level,
-                                     int  method,
-                                     int  windowBits,
-                                     int  memLevel,
-                                     int  strategy));
-
-     This is another version of deflateInit with more compression options.  The
-   fields next_in, zalloc, zfree and opaque must be initialized before by the
-   caller.
-
-     The method parameter is the compression method.  It must be Z_DEFLATED in
-   this version of the library.
-
-     The windowBits parameter is the base two logarithm of the window size
-   (the size of the history buffer).  It should be in the range 8..15 for this
-   version of the library.  Larger values of this parameter result in better
-   compression at the expense of memory usage.  The default value is 15 if
-   deflateInit is used instead.
-
-     windowBits can also be -8..-15 for raw deflate.  In this case, -windowBits
-   determines the window size.  deflate() will then generate raw deflate data
-   with no zlib header or trailer, and will not compute an adler32 check value.
-
-     windowBits can also be greater than 15 for optional gzip encoding.  Add
-   16 to windowBits to write a simple gzip header and trailer around the
-   compressed data instead of a zlib wrapper.  The gzip header will have no
-   file name, no extra data, no comment, no modification time (set to zero), no
-   header crc, and the operating system will be set to 255 (unknown).  If a
-   gzip stream is being written, strm->adler is a crc32 instead of an adler32.
-
-     The memLevel parameter specifies how much memory should be allocated
-   for the internal compression state.  memLevel=1 uses minimum memory but is
-   slow and reduces compression ratio; memLevel=9 uses maximum memory for
-   optimal speed.  The default value is 8.  See zconf.h for total memory usage
-   as a function of windowBits and memLevel.
-
-     The strategy parameter is used to tune the compression algorithm.  Use the
-   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
-   filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
-   string match), or Z_RLE to limit match distances to one (run-length
-   encoding).  Filtered data consists mostly of small values with a somewhat
-   random distribution.  In this case, the compression algorithm is tuned to
-   compress them better.  The effect of Z_FILTERED is to force more Huffman
-   coding and less string matching; it is somewhat intermediate between
-   Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY.  Z_RLE is designed to be almost as
-   fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data.  The
-   strategy parameter only affects the compression ratio but not the
-   correctness of the compressed output even if it is not set appropriately.
-   Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
-   decoder for special applications.
-
-     deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
-   method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is
-   incompatible with the version assumed by the caller (ZLIB_VERSION).  msg is
-   set to null if there is no error message.  deflateInit2 does not perform any
-   compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the compression dictionary from the given byte sequence
-   without producing any compressed output.  This function must be called
-   immediately after deflateInit, deflateInit2 or deflateReset, before any call
-   of deflate.  The compressor and decompressor must use exactly the same
-   dictionary (see inflateSetDictionary).
-
-     The dictionary should consist of strings (byte sequences) that are likely
-   to be encountered later in the data to be compressed, with the most commonly
-   used strings preferably put towards the end of the dictionary.  Using a
-   dictionary is most useful when the data to be compressed is short and can be
-   predicted with good accuracy; the data can then be compressed better than
-   with the default empty dictionary.
-
-     Depending on the size of the compression data structures selected by
-   deflateInit or deflateInit2, a part of the dictionary may in effect be
-   discarded, for example if the dictionary is larger than the window size
-   provided in deflateInit or deflateInit2.  Thus the strings most likely to be
-   useful should be put at the end of the dictionary, not at the front.  In
-   addition, the current implementation of deflate will use at most the window
-   size minus 262 bytes of the provided dictionary.
-
-     Upon return of this function, strm->adler is set to the adler32 value
-   of the dictionary; the decompressor may later use this value to determine
-   which dictionary has been used by the compressor.  (The adler32 value
-   applies to the whole dictionary even if only a subset of the dictionary is
-   actually used by the compressor.) If a raw deflate was requested, then the
-   adler32 value is not computed and strm->adler is not set.
-
-     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
-   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
-   inconsistent (for example if deflate has already been called for this stream
-   or if the compression method is bsort).  deflateSetDictionary does not
-   perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when several compression strategies will be
-   tried, for example when there are several ways of pre-processing the input
-   data with a filter.  The streams that will be discarded should then be freed
-   by calling deflateEnd.  Note that deflateCopy duplicates the internal
-   compression state which can be quite large, so this strategy is slow and can
-   consume lots of memory.
-
-     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to deflateEnd followed by deflateInit,
-   but does not free and reallocate all the internal compression state.  The
-   stream will keep the same compression level and any other attributes that
-   may have been set by deflateInit2.
-
-     deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being Z_NULL).
-*/
-
-ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
-                                      int level,
-                                      int strategy));
-/*
-     Dynamically update the compression level and compression strategy.  The
-   interpretation of level and strategy is as in deflateInit2.  This can be
-   used to switch between compression and straight copy of the input data, or
-   to switch to a different kind of input data requiring a different strategy.
-   If the compression level is changed, the input available so far is
-   compressed with the old level (and may be flushed); the new level will take
-   effect only at the next call of deflate().
-
-     Before the call of deflateParams, the stream state must be set as for
-   a call of deflate(), since the currently available input may have to be
-   compressed and flushed.  In particular, strm->avail_out must be non-zero.
-
-     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
-   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
-   strm->avail_out was zero.
-*/
-
-ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
-                                    int good_length,
-                                    int max_lazy,
-                                    int nice_length,
-                                    int max_chain));
-/*
-     Fine tune deflate's internal compression parameters.  This should only be
-   used by someone who understands the algorithm used by zlib's deflate for
-   searching for the best matching string, and even then only by the most
-   fanatic optimizer trying to squeeze out the last compressed bit for their
-   specific input data.  Read the deflate.c source code for the meaning of the
-   max_lazy, good_length, nice_length, and max_chain parameters.
-
-     deflateTune() can be called after deflateInit() or deflateInit2(), and
-   returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
- */
-
-ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
-                                       uLong sourceLen));
-/*
-     deflateBound() returns an upper bound on the compressed size after
-   deflation of sourceLen bytes.  It must be called after deflateInit() or
-   deflateInit2(), and after deflateSetHeader(), if used.  This would be used
-   to allocate an output buffer for deflation in a single pass, and so would be
-   called before deflate().
-*/
-
-ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
-                                     int bits,
-                                     int value));
-/*
-     deflatePrime() inserts bits in the deflate output stream.  The intent
-   is that this function is used to start off the deflate output with the bits
-   leftover from a previous deflate stream when appending to it.  As such, this
-   function can only be used for raw deflate, and must be used before the first
-   deflate() call after a deflateInit2() or deflateReset().  bits must be less
-   than or equal to 16, and that many of the least significant bits of value
-   will be inserted in the output.
-
-     deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
-                                         gz_headerp head));
-/*
-     deflateSetHeader() provides gzip header information for when a gzip
-   stream is requested by deflateInit2().  deflateSetHeader() may be called
-   after deflateInit2() or deflateReset() and before the first call of
-   deflate().  The text, time, os, extra field, name, and comment information
-   in the provided gz_header structure are written to the gzip header (xflag is
-   ignored -- the extra flags are set according to the compression level).  The
-   caller must assure that, if not Z_NULL, name and comment are terminated with
-   a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
-   available there.  If hcrc is true, a gzip header crc is included.  Note that
-   the current versions of the command-line version of gzip (up through version
-   1.3.x) do not support header crc's, and will report that it is a "multi-part
-   gzip file" and give up.
-
-     If deflateSetHeader is not used, the default gzip header has text false,
-   the time set to zero, and os set to 255, with no extra, name, or comment
-   fields.  The gzip header is returned to the default state by deflateReset().
-
-     deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
-                                     int  windowBits));
-
-     This is another version of inflateInit with an extra parameter.  The
-   fields next_in, avail_in, zalloc, zfree and opaque must be initialized
-   before by the caller.
-
-     The windowBits parameter is the base two logarithm of the maximum window
-   size (the size of the history buffer).  It should be in the range 8..15 for
-   this version of the library.  The default value is 15 if inflateInit is used
-   instead.  windowBits must be greater than or equal to the windowBits value
-   provided to deflateInit2() while compressing, or it must be equal to 15 if
-   deflateInit2() was not used.  If a compressed stream with a larger window
-   size is given as input, inflate() will return with the error code
-   Z_DATA_ERROR instead of trying to allocate a larger window.
-
-     windowBits can also be zero to request that inflate use the window size in
-   the zlib header of the compressed stream.
-
-     windowBits can also be -8..-15 for raw inflate.  In this case, -windowBits
-   determines the window size.  inflate() will then process raw deflate data,
-   not looking for a zlib or gzip header, not generating a check value, and not
-   looking for any check values for comparison at the end of the stream.  This
-   is for use with other formats that use the deflate compressed data format
-   such as zip.  Those formats provide their own check values.  If a custom
-   format is developed using the raw deflate format for compressed data, it is
-   recommended that a check value such as an adler32 or a crc32 be applied to
-   the uncompressed data as is done in the zlib, gzip, and zip formats.  For
-   most applications, the zlib format should be used as is.  Note that comments
-   above on the use in deflateInit2() applies to the magnitude of windowBits.
-
-     windowBits can also be greater than 15 for optional gzip decoding.  Add
-   32 to windowBits to enable zlib and gzip decoding with automatic header
-   detection, or add 16 to decode only the gzip format (the zlib format will
-   return a Z_DATA_ERROR).  If a gzip stream is being decoded, strm->adler is a
-   crc32 instead of an adler32.
-
-     inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
-   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
-   invalid, such as a null pointer to the structure.  msg is set to null if
-   there is no error message.  inflateInit2 does not perform any decompression
-   apart from possibly reading the zlib header if present: actual decompression
-   will be done by inflate().  (So next_in and avail_in may be modified, but
-   next_out and avail_out are unused and unchanged.) The current implementation
-   of inflateInit2() does not process any header information -- that is
-   deferred until inflate() is called.
-*/
-
-ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the decompression dictionary from the given uncompressed byte
-   sequence.  This function must be called immediately after a call of inflate,
-   if that call returned Z_NEED_DICT.  The dictionary chosen by the compressor
-   can be determined from the adler32 value returned by that call of inflate.
-   The compressor and decompressor must use exactly the same dictionary (see
-   deflateSetDictionary).  For raw inflate, this function can be called
-   immediately after inflateInit2() or inflateReset() and before any call of
-   inflate() to set the dictionary.  The application must insure that the
-   dictionary that was used for compression is provided.
-
-     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
-   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
-   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
-   expected one (incorrect adler32 value).  inflateSetDictionary does not
-   perform any decompression: this will be done by subsequent calls of
-   inflate().
-*/
-
-ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
-/*
-     Skips invalid compressed data until a full flush point (see above the
-   description of deflate with Z_FULL_FLUSH) can be found, or until all
-   available input is skipped.  No output is provided.
-
-     inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
-   if no more input was provided, Z_DATA_ERROR if no flush point has been
-   found, or Z_STREAM_ERROR if the stream structure was inconsistent.  In the
-   success case, the application may save the current current value of total_in
-   which indicates where valid compressed data was found.  In the error case,
-   the application may repeatedly call inflateSync, providing more input each
-   time, until success or end of the input data.
-*/
-
-ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when randomly accessing a large stream.  The
-   first pass through the stream can periodically record the inflate state,
-   allowing restarting inflate at those points when randomly accessing the
-   stream.
-
-     inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to inflateEnd followed by inflateInit,
-   but does not free and reallocate all the internal decompression state.  The
-   stream will keep attributes that may have been set by inflateInit2.
-
-     inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being Z_NULL).
-*/
-
-ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
-                                      int windowBits));
-/*
-     This function is the same as inflateReset, but it also permits changing
-   the wrap and window size requests.  The windowBits parameter is interpreted
-   the same as it is for inflateInit2.
-
-     inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being Z_NULL), or if
-   the windowBits parameter is invalid.
-*/
-
-ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
-                                     int bits,
-                                     int value));
-/*
-     This function inserts bits in the inflate input stream.  The intent is
-   that this function is used to start inflating at a bit position in the
-   middle of a byte.  The provided bits will be used before any bytes are used
-   from next_in.  This function should only be used with raw inflate, and
-   should be used before the first inflate() call after inflateInit2() or
-   inflateReset().  bits must be less than or equal to 16, and that many of the
-   least significant bits of value will be inserted in the input.
-
-     If bits is negative, then the input stream bit buffer is emptied.  Then
-   inflatePrime() can be called again to put bits in the buffer.  This is used
-   to clear out bits leftover after feeding inflate a block description prior
-   to feeding inflate codes.
-
-     inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
-/*
-     This function returns two values, one in the lower 16 bits of the return
-   value, and the other in the remaining upper bits, obtained by shifting the
-   return value down 16 bits.  If the upper value is -1 and the lower value is
-   zero, then inflate() is currently decoding information outside of a block.
-   If the upper value is -1 and the lower value is non-zero, then inflate is in
-   the middle of a stored block, with the lower value equaling the number of
-   bytes from the input remaining to copy.  If the upper value is not -1, then
-   it is the number of bits back from the current bit position in the input of
-   the code (literal or length/distance pair) currently being processed.  In
-   that case the lower value is the number of bytes already emitted for that
-   code.
-
-     A code is being processed if inflate is waiting for more input to complete
-   decoding of the code, or if it has completed decoding but is waiting for
-   more output space to write the literal or match data.
-
-     inflateMark() is used to mark locations in the input data for random
-   access, which may be at bit positions, and to note those cases where the
-   output of a code may span boundaries of random access blocks.  The current
-   location in the input stream can be determined from avail_in and data_type
-   as noted in the description for the Z_BLOCK flush parameter for inflate.
-
-     inflateMark returns the value noted above or -1 << 16 if the provided
-   source stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
-                                         gz_headerp head));
-/*
-     inflateGetHeader() requests that gzip header information be stored in the
-   provided gz_header structure.  inflateGetHeader() may be called after
-   inflateInit2() or inflateReset(), and before the first call of inflate().
-   As inflate() processes the gzip stream, head->done is zero until the header
-   is completed, at which time head->done is set to one.  If a zlib stream is
-   being decoded, then head->done is set to -1 to indicate that there will be
-   no gzip header information forthcoming.  Note that Z_BLOCK or Z_TREES can be
-   used to force inflate() to return immediately after header processing is
-   complete and before any actual data is decompressed.
-
-     The text, time, xflags, and os fields are filled in with the gzip header
-   contents.  hcrc is set to true if there is a header CRC.  (The header CRC
-   was valid if done is set to one.) If extra is not Z_NULL, then extra_max
-   contains the maximum number of bytes to write to extra.  Once done is true,
-   extra_len contains the actual extra field length, and extra contains the
-   extra field, or that field truncated if extra_max is less than extra_len.
-   If name is not Z_NULL, then up to name_max characters are written there,
-   terminated with a zero unless the length is greater than name_max.  If
-   comment is not Z_NULL, then up to comm_max characters are written there,
-   terminated with a zero unless the length is greater than comm_max.  When any
-   of extra, name, or comment are not Z_NULL and the respective field is not
-   present in the header, then that field is set to Z_NULL to signal its
-   absence.  This allows the use of deflateSetHeader() with the returned
-   structure to duplicate the header.  However if those fields are set to
-   allocated memory, then the application will need to save those pointers
-   elsewhere so that they can be eventually freed.
-
-     If inflateGetHeader is not used, then the header information is simply
-   discarded.  The header is always checked for validity, including the header
-   CRC if present.  inflateReset() will reset the process to discard the header
-   information.  The application would need to call inflateGetHeader() again to
-   retrieve the header from the next gzip stream.
-
-     inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
-                                        unsigned char FAR *window));
-
-     Initialize the internal stream state for decompression using inflateBack()
-   calls.  The fields zalloc, zfree and opaque in strm must be initialized
-   before the call.  If zalloc and zfree are Z_NULL, then the default library-
-   derived memory allocation routines are used.  windowBits is the base two
-   logarithm of the window size, in the range 8..15.  window is a caller
-   supplied buffer of that size.  Except for special applications where it is
-   assured that deflate was used with small window sizes, windowBits must be 15
-   and a 32K byte window must be supplied to be able to decompress general
-   deflate streams.
-
-     See inflateBack() for the usage of these routines.
-
-     inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
-   the paramaters are invalid, Z_MEM_ERROR if the internal state could not be
-   allocated, or Z_VERSION_ERROR if the version of the library does not match
-   the version of the header file.
-*/
-
-typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
-typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
-
-ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
-                                    in_func in, void FAR *in_desc,
-                                    out_func out, void FAR *out_desc));
-/*
-     inflateBack() does a raw inflate with a single call using a call-back
-   interface for input and output.  This is more efficient than inflate() for
-   file i/o applications in that it avoids copying between the output and the
-   sliding window by simply making the window itself the output buffer.  This
-   function trusts the application to not change the output buffer passed by
-   the output function, at least until inflateBack() returns.
-
-     inflateBackInit() must be called first to allocate the internal state
-   and to initialize the state with the user-provided window buffer.
-   inflateBack() may then be used multiple times to inflate a complete, raw
-   deflate stream with each call.  inflateBackEnd() is then called to free the
-   allocated state.
-
-     A raw deflate stream is one with no zlib or gzip header or trailer.
-   This routine would normally be used in a utility that reads zip or gzip
-   files and writes out uncompressed files.  The utility would decode the
-   header and process the trailer on its own, hence this routine expects only
-   the raw deflate stream to decompress.  This is different from the normal
-   behavior of inflate(), which expects either a zlib or gzip header and
-   trailer around the deflate stream.
-
-     inflateBack() uses two subroutines supplied by the caller that are then
-   called by inflateBack() for input and output.  inflateBack() calls those
-   routines until it reads a complete deflate stream and writes out all of the
-   uncompressed data, or until it encounters an error.  The function's
-   parameters and return types are defined above in the in_func and out_func
-   typedefs.  inflateBack() will call in(in_desc, &buf) which should return the
-   number of bytes of provided input, and a pointer to that input in buf.  If
-   there is no input available, in() must return zero--buf is ignored in that
-   case--and inflateBack() will return a buffer error.  inflateBack() will call
-   out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].  out()
-   should return zero on success, or non-zero on failure.  If out() returns
-   non-zero, inflateBack() will return with an error.  Neither in() nor out()
-   are permitted to change the contents of the window provided to
-   inflateBackInit(), which is also the buffer that out() uses to write from.
-   The length written by out() will be at most the window size.  Any non-zero
-   amount of input may be provided by in().
-
-     For convenience, inflateBack() can be provided input on the first call by
-   setting strm->next_in and strm->avail_in.  If that input is exhausted, then
-   in() will be called.  Therefore strm->next_in must be initialized before
-   calling inflateBack().  If strm->next_in is Z_NULL, then in() will be called
-   immediately for input.  If strm->next_in is not Z_NULL, then strm->avail_in
-   must also be initialized, and then if strm->avail_in is not zero, input will
-   initially be taken from strm->next_in[0 ..  strm->avail_in - 1].
-
-     The in_desc and out_desc parameters of inflateBack() is passed as the
-   first parameter of in() and out() respectively when they are called.  These
-   descriptors can be optionally used to pass any information that the caller-
-   supplied in() and out() functions need to do their job.
-
-     On return, inflateBack() will set strm->next_in and strm->avail_in to
-   pass back any unused input that was provided by the last in() call.  The
-   return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
-   if in() or out() returned an error, Z_DATA_ERROR if there was a format error
-   in the deflate stream (in which case strm->msg is set to indicate the nature
-   of the error), or Z_STREAM_ERROR if the stream was not properly initialized.
-   In the case of Z_BUF_ERROR, an input or output error can be distinguished
-   using strm->next_in which will be Z_NULL only if in() returned an error.  If
-   strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
-   non-zero.  (in() will always be called before out(), so strm->next_in is
-   assured to be defined if out() returns non-zero.) Note that inflateBack()
-   cannot return Z_OK.
-*/
-
-ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
-/*
-     All memory allocated by inflateBackInit() is freed.
-
-     inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
-   state was inconsistent.
-*/
-
-ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
-/* Return flags indicating compile-time options.
-
-    Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
-     1.0: size of uInt
-     3.2: size of uLong
-     5.4: size of voidpf (pointer)
-     7.6: size of z_off_t
-
-    Compiler, assembler, and debug options:
-     8: DEBUG
-     9: ASMV or ASMINF -- use ASM code
-     10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
-     11: 0 (reserved)
-
-    One-time table building (smaller code, but not thread-safe if true):
-     12: BUILDFIXED -- build static block decoding tables when needed
-     13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
-     14,15: 0 (reserved)
-
-    Library content (indicates missing functionality):
-     16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
-                          deflate code when not needed)
-     17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
-                    and decode gzip streams (to avoid linking crc code)
-     18-19: 0 (reserved)
-
-    Operation variations (changes in library functionality):
-     20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
-     21: FASTEST -- deflate algorithm with only one, lowest compression level
-     22,23: 0 (reserved)
-
-    The sprintf variant used by gzprintf (zero is best):
-     24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
-     25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
-     26: 0 = returns value, 1 = void -- 1 means inferred string length returned
-
-    Remainder:
-     27-31: 0 (reserved)
- */
-
-
-                        /* utility functions */
-
-/*
-     The following utility functions are implemented on top of the basic
-   stream-oriented functions.  To simplify the interface, some default options
-   are assumed (compression level and memory usage, standard memory allocation
-   functions).  The source code of these utility functions can be modified if
-   you need special options.
-*/
-
-ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
-                                 const Bytef *source, uLong sourceLen));
-/*
-     Compresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer.  Upon entry, destLen is the total size
-   of the destination buffer, which must be at least the value returned by
-   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
-   compressed buffer.
-
-     compress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer.
-*/
-
-ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
-                                  const Bytef *source, uLong sourceLen,
-                                  int level));
-/*
-     Compresses the source buffer into the destination buffer.  The level
-   parameter has the same meaning as in deflateInit.  sourceLen is the byte
-   length of the source buffer.  Upon entry, destLen is the total size of the
-   destination buffer, which must be at least the value returned by
-   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
-   compressed buffer.
-
-     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
-   Z_STREAM_ERROR if the level parameter is invalid.
-*/
-
-ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
-/*
-     compressBound() returns an upper bound on the compressed size after
-   compress() or compress2() on sourceLen bytes.  It would be used before a
-   compress() or compress2() call to allocate the destination buffer.
-*/
-
-ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
-                                   const Bytef *source, uLong sourceLen));
-/*
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer.  Upon entry, destLen is the total size
-   of the destination buffer, which must be large enough to hold the entire
-   uncompressed data.  (The size of the uncompressed data must have been saved
-   previously by the compressor and transmitted to the decompressor by some
-   mechanism outside the scope of this compression library.) Upon exit, destLen
-   is the actual size of the uncompressed buffer.
-
-     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
-*/
-
-
-                        /* gzip file access functions */
-
-/*
-     This library supports reading and writing files in gzip (.gz) format with
-   an interface similar to that of stdio, using the functions that start with
-   "gz".  The gzip format is different from the zlib format.  gzip is a gzip
-   wrapper, documented in RFC 1952, wrapped around a deflate stream.
-*/
-
-typedef voidp gzFile;       /* opaque gzip file descriptor */
-
-/*
-ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
-
-     Opens a gzip (.gz) file for reading or writing.  The mode parameter is as
-   in fopen ("rb" or "wb") but can also include a compression level ("wb9") or
-   a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
-   compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
-   for fixed code compression as in "wb9F".  (See the description of
-   deflateInit2 for more information about the strategy parameter.) Also "a"
-   can be used instead of "w" to request that the gzip stream that will be
-   written be appended to the file.  "+" will result in an error, since reading
-   and writing to the same gzip file is not supported.
-
-     gzopen can be used to read a file which is not in gzip format; in this
-   case gzread will directly read from the file without decompression.
-
-     gzopen returns NULL if the file could not be opened, if there was
-   insufficient memory to allocate the gzFile state, or if an invalid mode was
-   specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
-   errno can be checked to determine if the reason gzopen failed was that the
-   file could not be opened.
-*/
-
-ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
-/*
-     gzdopen associates a gzFile with the file descriptor fd.  File descriptors
-   are obtained from calls like open, dup, creat, pipe or fileno (if the file
-   has been previously opened with fopen).  The mode parameter is as in gzopen.
-
-     The next call of gzclose on the returned gzFile will also close the file
-   descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
-   fd.  If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
-   mode);.  The duplicated descriptor should be saved to avoid a leak, since
-   gzdopen does not close fd if it fails.
-
-     gzdopen returns NULL if there was insufficient memory to allocate the
-   gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
-   provided, or '+' was provided), or if fd is -1.  The file descriptor is not
-   used until the next gz* read, write, seek, or close operation, so gzdopen
-   will not detect if fd is invalid (unless fd is -1).
-*/
-
-ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
-/*
-     Set the internal buffer size used by this library's functions.  The
-   default buffer size is 8192 bytes.  This function must be called after
-   gzopen() or gzdopen(), and before any other calls that read or write the
-   file.  The buffer memory allocation is always deferred to the first read or
-   write.  Two buffers are allocated, either both of the specified size when
-   writing, or one of the specified size and the other twice that size when
-   reading.  A larger buffer size of, for example, 64K or 128K bytes will
-   noticeably increase the speed of decompression (reading).
-
-     The new buffer size also affects the maximum length for gzprintf().
-
-     gzbuffer() returns 0 on success, or -1 on failure, such as being called
-   too late.
-*/
-
-ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
-/*
-     Dynamically update the compression level or strategy.  See the description
-   of deflateInit2 for the meaning of these parameters.
-
-     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
-   opened for writing.
-*/
-
-ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
-/*
-     Reads the given number of uncompressed bytes from the compressed file.  If
-   the input file was not in gzip format, gzread copies the given number of
-   bytes into the buffer.
-
-     After reaching the end of a gzip stream in the input, gzread will continue
-   to read, looking for another gzip stream, or failing that, reading the rest
-   of the input file directly without decompression.  The entire input file
-   will be read if gzread is called until it returns less than the requested
-   len.
-
-     gzread returns the number of uncompressed bytes actually read, less than
-   len for end of file, or -1 for error.
-*/
-
-ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
-                                voidpc buf, unsigned len));
-/*
-     Writes the given number of uncompressed bytes into the compressed file.
-   gzwrite returns the number of uncompressed bytes written or 0 in case of
-   error.
-*/
-
-ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
-/*
-     Converts, formats, and writes the arguments to the compressed file under
-   control of the format string, as in fprintf.  gzprintf returns the number of
-   uncompressed bytes actually written, or 0 in case of error.  The number of
-   uncompressed bytes written is limited to 8191, or one less than the buffer
-   size given to gzbuffer().  The caller should assure that this limit is not
-   exceeded.  If it is exceeded, then gzprintf() will return an error (0) with
-   nothing written.  In this case, there may also be a buffer overflow with
-   unpredictable consequences, which is possible only if zlib was compiled with
-   the insecure functions sprintf() or vsprintf() because the secure snprintf()
-   or vsnprintf() functions were not available.  This can be determined using
-   zlibCompileFlags().
-*/
-
-ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
-/*
-     Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-
-     gzputs returns the number of characters written, or -1 in case of error.
-*/
-
-ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
-/*
-     Reads bytes from the compressed file until len-1 characters are read, or a
-   newline character is read and transferred to buf, or an end-of-file
-   condition is encountered.  If any characters are read or if len == 1, the
-   string is terminated with a null character.  If no characters are read due
-   to an end-of-file or len < 1, then the buffer is left untouched.
-
-     gzgets returns buf which is a null-terminated string, or it returns NULL
-   for end-of-file or in case of error.  If there was an error, the contents at
-   buf are indeterminate.
-*/
-
-ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
-/*
-     Writes c, converted to an unsigned char, into the compressed file.  gzputc
-   returns the value that was written, or -1 in case of error.
-*/
-
-ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
-/*
-     Reads one byte from the compressed file.  gzgetc returns this byte or -1
-   in case of end of file or error.
-*/
-
-ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
-/*
-     Push one character back onto the stream to be read as the first character
-   on the next read.  At least one character of push-back is allowed.
-   gzungetc() returns the character pushed, or -1 on failure.  gzungetc() will
-   fail if c is -1, and may fail if a character has been pushed but not read
-   yet.  If gzungetc is used immediately after gzopen or gzdopen, at least the
-   output buffer size of pushed characters is allowed.  (See gzbuffer above.)
-   The pushed character will be discarded if the stream is repositioned with
-   gzseek() or gzrewind().
-*/
-
-ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
-/*
-     Flushes all pending output into the compressed file.  The parameter flush
-   is as in the deflate() function.  The return value is the zlib error number
-   (see function gzerror below).  gzflush is only permitted when writing.
-
-     If the flush parameter is Z_FINISH, the remaining data is written and the
-   gzip stream is completed in the output.  If gzwrite() is called again, a new
-   gzip stream will be started in the output.  gzread() is able to read such
-   concatented gzip streams.
-
-     gzflush should be called only when strictly necessary because it will
-   degrade compression if called too often.
-*/
-
-/*
-ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
-                                   z_off_t offset, int whence));
-
-     Sets the starting position for the next gzread or gzwrite on the given
-   compressed file.  The offset represents a number of bytes in the
-   uncompressed data stream.  The whence parameter is defined as in lseek(2);
-   the value SEEK_END is not supported.
-
-     If the file is opened for reading, this function is emulated but can be
-   extremely slow.  If the file is opened for writing, only forward seeks are
-   supported; gzseek then compresses a sequence of zeroes up to the new
-   starting position.
-
-     gzseek returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error, in
-   particular if the file is opened for writing and the new starting position
-   would be before the current position.
-*/
-
-ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
-/*
-     Rewinds the given file. This function is supported only for reading.
-
-     gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
-*/
-
-/*
-ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
-
-     Returns the starting position for the next gzread or gzwrite on the given
-   compressed file.  This position represents a number of bytes in the
-   uncompressed data stream, and is zero when starting, even if appending or
-   reading a gzip stream from the middle of a file using gzdopen().
-
-     gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
-*/
-
-/*
-ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
-
-     Returns the current offset in the file being read or written.  This offset
-   includes the count of bytes that precede the gzip stream, for example when
-   appending or when using gzdopen() for reading.  When reading, the offset
-   does not include as yet unused buffered input.  This information can be used
-   for a progress indicator.  On error, gzoffset() returns -1.
-*/
-
-ZEXTERN int ZEXPORT gzeof OF((gzFile file));
-/*
-     Returns true (1) if the end-of-file indicator has been set while reading,
-   false (0) otherwise.  Note that the end-of-file indicator is set only if the
-   read tried to go past the end of the input, but came up short.  Therefore,
-   just like feof(), gzeof() may return false even if there is no more data to
-   read, in the event that the last read request was for the exact number of
-   bytes remaining in the input file.  This will happen if the input file size
-   is an exact multiple of the buffer size.
-
-     If gzeof() returns true, then the read functions will return no more data,
-   unless the end-of-file indicator is reset by gzclearerr() and the input file
-   has grown since the previous end of file was detected.
-*/
-
-ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
-/*
-     Returns true (1) if file is being copied directly while reading, or false
-   (0) if file is a gzip stream being decompressed.  This state can change from
-   false to true while reading the input file if the end of a gzip stream is
-   reached, but is followed by data that is not another gzip stream.
-
-     If the input file is empty, gzdirect() will return true, since the input
-   does not contain a gzip stream.
-
-     If gzdirect() is used immediately after gzopen() or gzdopen() it will
-   cause buffers to be allocated to allow reading the file to determine if it
-   is a gzip file.  Therefore if gzbuffer() is used, it should be called before
-   gzdirect().
-*/
-
-ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
-/*
-     Flushes all pending output if necessary, closes the compressed file and
-   deallocates the (de)compression state.  Note that once file is closed, you
-   cannot call gzerror with file, since its structures have been deallocated.
-   gzclose must not be called more than once on the same file, just as free
-   must not be called more than once on the same allocation.
-
-     gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
-   file operation error, or Z_OK on success.
-*/
-
-ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
-ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
-/*
-     Same as gzclose(), but gzclose_r() is only for use when reading, and
-   gzclose_w() is only for use when writing or appending.  The advantage to
-   using these instead of gzclose() is that they avoid linking in zlib
-   compression or decompression code that is not used when only reading or only
-   writing respectively.  If gzclose() is used, then both compression and
-   decompression code will be included the application when linking to a static
-   zlib library.
-*/
-
-ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
-/*
-     Returns the error message for the last error which occurred on the given
-   compressed file.  errnum is set to zlib error number.  If an error occurred
-   in the file system and not in the compression library, errnum is set to
-   Z_ERRNO and the application may consult errno to get the exact error code.
-
-     The application must not modify the returned string.  Future calls to
-   this function may invalidate the previously returned string.  If file is
-   closed, then the string previously returned by gzerror will no longer be
-   available.
-
-     gzerror() should be used to distinguish errors from end-of-file for those
-   functions above that do not distinguish those cases in their return values.
-*/
-
-ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
-/*
-     Clears the error and end-of-file flags for file.  This is analogous to the
-   clearerr() function in stdio.  This is useful for continuing to read a gzip
-   file that is being written concurrently.
-*/
-
-
-                        /* checksum functions */
-
-/*
-     These functions are not related to compression but are exported
-   anyway because they might be useful in applications using the compression
-   library.
-*/
-
-ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
-/*
-     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
-   return the updated checksum.  If buf is Z_NULL, this function returns the
-   required initial value for the checksum.
-
-     An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
-   much faster.
-
-   Usage example:
-
-     uLong adler = adler32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       adler = adler32(adler, buffer, length);
-     }
-     if (adler != original_adler) error();
-*/
-
-/*
-ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
-                                          z_off_t len2));
-
-     Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
-   and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
-   each, adler1 and adler2.  adler32_combine() returns the Adler-32 checksum of
-   seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
-*/
-
-ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
-/*
-     Update a running CRC-32 with the bytes buf[0..len-1] and return the
-   updated CRC-32.  If buf is Z_NULL, this function returns the required
-   initial value for the for the crc.  Pre- and post-conditioning (one's
-   complement) is performed within this function so it shouldn't be done by the
-   application.
-
-   Usage example:
-
-     uLong crc = crc32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       crc = crc32(crc, buffer, length);
-     }
-     if (crc != original_crc) error();
-*/
-
-/*
-ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
-
-     Combine two CRC-32 check values into one.  For two sequences of bytes,
-   seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
-   calculated for each, crc1 and crc2.  crc32_combine() returns the CRC-32
-   check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
-   len2.
-*/
-
-
-                        /* various hacks, don't look :) */
-
-/* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
-ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
-                                      int windowBits, int memLevel,
-                                      int strategy, const char *version,
-                                      int stream_size));
-ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
-                                      const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
-                                         unsigned char FAR *window,
-                                         const char *version,
-                                         int stream_size));
-#define deflateInit(strm, level) \
-        deflateInit_((strm), (level),       ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit(strm) \
-        inflateInit_((strm),                ZLIB_VERSION, sizeof(z_stream))
-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
-        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
-                      (strategy),           ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit2(strm, windowBits) \
-        inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
-#define inflateBackInit(strm, windowBits, window) \
-        inflateBackInit_((strm), (windowBits), (window), \
-                                            ZLIB_VERSION, sizeof(z_stream))
-
-/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
- * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
- * both are true, the application gets the *64 functions, and the regular
- * functions are changed to 64 bits) -- in case these are set on systems
- * without large file support, _LFS64_LARGEFILE must also be true
- */
-#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
-   ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
-   ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
-   ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
-   ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
-   ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
-   ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
-#endif
-
-#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
-#  define gzopen gzopen64
-#  define gzseek gzseek64
-#  define gztell gztell64
-#  define gzoffset gzoffset64
-#  define adler32_combine adler32_combine64
-#  define crc32_combine crc32_combine64
-#  ifdef _LARGEFILE64_SOURCE
-     ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
-     ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
-     ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
-     ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
-     ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
-     ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
-#  endif
-#else
-   ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
-   ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
-   ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
-   ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
-   ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
-   ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
-#endif
-
-/* hack for buggy compilers */
-#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
-    struct internal_state {int dummy;};
-#endif
-
-/* undocumented functions */
-ZEXTERN const char   * ZEXPORT zError           OF((int));
-ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
-ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));
-ZEXTERN int            ZEXPORT inflateUndermine OF((z_streamp, int));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ZLIB_H */
diff --git a/interfaces/fastq/extern.h b/interfaces/fastq/extern.h
deleted file mode 100644
index 219f121..0000000
--- a/interfaces/fastq/extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_fastq_extern_
-#define _h_fastq_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define FASTQ_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define FASTQ_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_fastq_extern_ */
diff --git a/interfaces/fastq/fq-dump.h b/interfaces/fastq/fq-dump.h
deleted file mode 100644
index ab45eb7..0000000
--- a/interfaces/fastq/fq-dump.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_fastq_fq_dump_
-#define _h_fastq_fq_dump_
-
-#ifndef _h_fastq_extern_
-#include <fastq/extern.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * FastqDumper
- *  an object capable of producing fastq
- */
-typedef struct FastqDumper FastqDumper;
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-FASTQ_EXTERN rc_t CC FastqDumperAddRef ( const FastqDumper *self );
-FASTQ_EXTERN rc_t CC FastqDumperRelease ( const FastqDumper *self );
-
-
-/* FastqDumperMake
- *  make an empty dumper
- */
-FASTQ_EXTERN rc_t CC FastqDumperMake ( FastqDumper **fastq );
-
-
-/* FastqDumperAddSource
- *  adds an accession/filename/url to be processed
- */
-FASTQ_EXTERN rc_t CC FastqDumperAddSource ( FastqDumper *self, const char * name );
-
-
-/* FastqDumperEnableSpotSplitting
- *  spot-splitting is OFF per default
- */
-FASTQ_EXTERN rc_t CC FastqDumperEnableSpotSplit ( FastqDumper *self );
-
-
-/* FastqDumperEnableClipping
- *  clipping is OFF per default
- */
-FASTQ_EXTERN rc_t CC FastqDumperEnableClipping ( FastqDumper *self );
-
-
-/* FastqDumperAddRowRange
- * default is processing all rows in the source(s)
- */
-FASTQ_EXTERN rc_t CC FastqDumperAddRowRange ( FastqDumper *self, int64_t range_start, uint64_t count );
-
-
-/* FastqDumperEstimate
- *  estimates ( because of filtering ) the number of fastq-records
- *  for gui-tools to setup a progress-bar
- */
-FASTQ_EXTERN rc_t CC FastqDumperEstimate ( const FastqDumper *self, uint64_t * count );
-
-
-/* FastqDumperSetCallback
- *  the function will be called for every "fastq-record"
- */
-FASTQ_EXTERN rc_t CC FastqDumperSetCallback ( FastqDumper *self, 
-    void *data, void ( CC * on_record ) ( uint64_t nr, uint32_t length,
-        const char * seq_id, const char *name,
-        const char * read, const char * quality ) );
-
-
-/* FastqDumperPerform
- *  performs the requested operations
- */
-FASTQ_EXTERN rc_t CC FastqDumperPerform ( const FastqDumper *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_fastq_fq_dump_ */
diff --git a/interfaces/hdf5/extern.h b/interfaces/hdf5/extern.h
deleted file mode 100644
index ffa1653..0000000
--- a/interfaces/hdf5/extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_hdf5_extern_
-#define _h_hdf5_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define HDF5_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define HDF5_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_hdf5_extern_ */
diff --git a/interfaces/hdf5/kdf5.h b/interfaces/hdf5/kdf5.h
deleted file mode 100644
index 6564af3..0000000
--- a/interfaces/hdf5/kdf5.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kdf5_
-#define _h_kdf5_
-
-#ifndef _h_hdf5_extern_
-#include <hdf5/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifndef _h_kfs_file_
-#include <kfs/file.h>
-#endif
-
-#ifndef _h_kfs_arrayfile_
-#include <kfs/arrayfile.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* MakeHDF5RootDir
- *
- *  creates a root-hdf5-directory (in read-only mode)
- *  from a absolute or relative path
- *
- *  "self"     [ IN ]  - directory, used to resolve the path
- *
- *  "hdf5_dir" [ OUT ] - return parameter for the created directory
- *
- *  "absolute" [ IN ]  - flag: absolute or relative
- *
- *  "path"     [ IN ]  - absolute or relative path to hdf5-file
- */
-HDF5_EXTERN rc_t CC MakeHDF5RootDir ( KDirectory * self, KDirectory ** hdf5_dir, 
-                                      bool absolute, const char *path );
-
-
-/* MakeHDF5ArrayFile
- *
- *  creates a KArrayFile (in read-only mode) from a KFile
- *
- *  "self"     [ IN ]  - file, this KFile has to be made from a KDirectory
- *                       the interanly is a HDF5Directory
- *
- *  "f"        [ OUT ] - return parameter for the created KArrayFile
- */
-HDF5_EXTERN rc_t CC MakeHDF5ArrayFile ( const KFile * self, KArrayFile ** f );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kdf5_ */
diff --git a/interfaces/insdc/insdc.h b/interfaces/insdc/insdc.h
deleted file mode 100644
index 482ad74..0000000
--- a/interfaces/insdc/insdc.h
+++ /dev/null
@@ -1,277 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_insdc_insdc_
-#define _h_insdc_insdc_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*==========================================================================
- * INSDC types, constants
- */
-
-
-/*--------------------------------------------------------------------------
- * dna
- *  represented in IUPAC characters
- */
-typedef char INSDC_dna_text;
-
-
-/*--------------------------------------------------------------------------
- * 4na
- *  nucleotide data with all possible ambiguity
- *  does not represent all possible EVENTS
- *
- *  text encodings use the IUPAC character set
- *  legal values: [ACMGRSVTWYHKDBNacmgrsvtwyhkdbn.]
- *  canonical values: [ACMGRSVTWYHKDBN]
- *
- *  binary values are 0..15 = { NACMGRSVTWYHKDBN }
- *
- *  4na values use bits for each letter:
- *
- *       A | C | G | T
- *    =================
- *    N    |   |   |
- *    A  * |   |   |
- *    C    | * |   |
- *    M  * | * |   |
- *    G    |   | * |
- *    R  * |   | * |
- *    S    | * | * |
- *    V  * | * | * |
- *    T    |   |   | *
- *    W  * |   |   | *
- *    Y    | * |   | *
- *    H  * | * |   | *
- *    K    |   | * | *
- *    D  * |   | * | *
- *    B    | * | * | *
- *    N  * | * | * | *
- *
- *  packed bytes have first base in upper nibble,
- *  and the following base in lower nibble.
- *
- *    bit:  76543210 76543210 76543210
- *    ================================
- *    base: 00001111 22223333 44445555 etc.
- *
- *  element offsets follow this pattern
- */
-typedef uint8_t INSDC_4na_bin;
-typedef uint8_t INSDC_4na_packed;
-
-#define INSDC_4na_map_BINSET \
-    { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }
-#define INSDC_4na_map_CHARSET \
-    ".ACMGRSVTWYHKDBN"
-#define INSDC_4na_accept_CHARSET \
-    ".ACMGRSVTWYHKDBNacmgrsvtwyhkdbn"
-
-
-/*--------------------------------------------------------------------------
- * 2na
- *  nucleotide data { ATGC }
- * x2na
- *  nucleotide data with single ambiguity value
- *
- *  text encodings use the IUPAC character set
- *  legal values: [ACGTNacgtn.]
- *  canonical values: [ACGTN]
- *
- *  binary values are 0..4 = { ACGTN }
- *
- *  packed values exclude N:
- *    A = 0
- *    C = 1
- *    G = 2
- *    T = 3
- *
- *  packed bytes have first base in uppermost 2 bits,
- *  and the following bases in similar fashion:
- *
- *    bit:  76543210 76543210
- *    =======================
- *    base: 00112233 44556677 etc.
- *
- *  element offsets follow this pattern
- */
-typedef uint8_t INSDC_2na_bin;
-typedef uint8_t INSDC_x2na_bin;
-typedef uint8_t INSDC_2na_packed;
-
-#define INSDC_2na_map_BINSET \
-    { 0,1,2,3 }
-#define INSDC_2na_map_CHARSET \
-    "ACGT"
-#define INSDC_2na_accept_CHARSET \
-    "ACGTacgt"
-#define INSDC_x2na_map_BINSET \
-    { 0,1,2,3,4 }
-#define INSDC_x2na_map_CHARSET \
-    "ACGTN"
-#define INSDC_x2na_accept_CHARSET \
-    "ACGTNacgtn."
-
-
-/*--------------------------------------------------------------------------
- * color
- *  color-space data
- * 2cs
- *  color-space data 0,1,2,3
- * x2cs
- *  color-space data extended with single ambiguity value (.)
- *
- *  text encodings use the ASCII numeric character set
- *  values: [0123.]
- *
- *  x2cs values are 0..4 = { 0123. }
- *
- *  2cs values exclude '.':
- *    '0' = 0
- *    '1' = 1
- *    '2' = 2
- *    '3' = 3
- */
-typedef char INSDC_color_text;
-typedef uint8_t INSDC_2cs_bin;
-typedef uint8_t INSDC_x2cs_bin;
-typedef uint8_t INSDC_2cs_packed;
-
-#define INSDC_2cs_map_BINSET \
-    { 0,1,2,3 }
-#define INSDC_2cs_map_CHARSET \
-    "0123"
-#define INSDC_2cs_accept_CHARSET \
-    "0123"
-#define INSDC_x2cs_map_BINSET \
-    { 0,1,2,3,4 }
-#define INSDC_x2cs_map_CHARSET \
-    "0123."
-#define INSDC_x2cs_accept_CHARSET \
-    "0123."
-#define INSDC_color_default_matrix \
-{                                  \
-    0, 1, 2, 3, 4,                 \
-    1, 0, 3, 2, 4,                 \
-    2, 3, 0, 1, 4,                 \
-    3, 2, 1, 0, 4,                 \
-    4, 4, 4, 4, 4                  \
-}
-
-
-/*--------------------------------------------------------------------------
- * protein
- *  represented in IUPAC characters
- */
-typedef char INSDC_protein_text;
-
-
-/*--------------------------------------------------------------------------
- * aa
- *  protein data
- *  text encodings use the IUPAC character set
- */
-typedef	uint8_t INSDC_aa_bin;
-
-#define INSDC_aa_map_BINSET \
-    { 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 }
-#define INSDC_aa_map_CHARSET \
-    "ABCDEFGHIKLMNPQRSTVWXYZU*OJ"
-#define INSDC_aa_accept_CHARSET \
-    "ABCDEFGHIJKLMNOPQRSTVWXYZU*abcdefghijklmnopqrstvwxyzu"
-
-
-/*--------------------------------------------------------------------------
- * quality
- *  quality scoring values
- *
- *  phred legal values_ 0..63
- */
-typedef uint8_t INSDC_quality_phred;
-typedef int8_t INSDC_quality_log_odds;
-
-
-/*--------------------------------------------------------------------------
- * coordinate
- *  zero and one based coordinates
- *  lengths are expressed as unsigned quantities
- */
-typedef int32_t INSDC_coord_val;
-typedef uint32_t INSDC_coord_len;
-typedef INSDC_coord_val INSDC_coord_zero;
-typedef INSDC_coord_val INSDC_coord_one;
-typedef INSDC_coord_zero INSDC_position_zero;
-typedef INSDC_coord_one INSDC_position_one;
-
-
-/*--------------------------------------------------------------------------
- * read description
- *  type and filter constants
- */
-
-
-/* read type
- *  describes the type of read within a spot
- *  the extended version also describes its orientation
- */
-typedef uint8_t INSDC_read_type;
-enum
-{
-    /* read_type */
-    READ_TYPE_TECHNICAL  = 0,
-    READ_TYPE_BIOLOGICAL = 1,
-
-    /* orientation - applied as bits, e.g.:
-       type = READ_TYPE_BIOLOGICAL | READ_TYPE_REVERSE */
-    READ_TYPE_FORWARD = 2,
-    READ_TYPE_REVERSE = 4
-};
-
-/* read filter
- */
-typedef uint8_t INSDC_read_filter;
-enum
-{
-    READ_FILTER_PASS = 0,
-    READ_FILTER_REJECT = 1,
-    READ_FILTER_CRITERIA = 2,
-    READ_FILTER_REDACTED = 3
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_insdc_insdc_ */
diff --git a/interfaces/insdc/insdc.vschema b/interfaces/insdc/insdc.vschema
deleted file mode 100644
index 8deda52..0000000
--- a/interfaces/insdc/insdc.vschema
+++ /dev/null
@@ -1,232 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * INSDC types, constants
- */
-version 1;
-
-
-/*--------------------------------------------------------------------------
- * dna
- *  represented in IUPAC characters
- */
-typedef ascii INSDC:dna:text;
-
-
-/*--------------------------------------------------------------------------
- * 4na
- *  nucleotide data with all possible ambiguity
- *  does not represent all possible EVENTS
- *
- *  text encodings use the IUPAC character set
- *  legal values: [ACMGRSVTWYHKDBNacmgrsvtwyhkdbn.]
- *  canonical values: [ACMGRSVTWYHKDBN]
- *
- *  binary values are 0..15 = { NACMGRSVTWYHKDBN }
- *
- *  4na values use bits for each letter:
- *
- *       A | C | G | T
- *    =================
- *    N    |   |   |
- *    A  * |   |   |
- *    C    | * |   |
- *    M  * | * |   |
- *    G    |   | * |
- *    R  * |   | * |
- *    S    | * | * |
- *    V  * | * | * |
- *    T    |   |   | *
- *    W  * |   |   | *
- *    Y    | * |   | *
- *    H  * | * |   | *
- *    K    |   | * | *
- *    D  * |   | * | *
- *    B    | * | * | *
- *    N  * | * | * | *
- */
-typedef	U8 INSDC:4na:bin;
-typedef	B1 INSDC:4na:packed [ 4 ];
-
-const INSDC:4na:bin INSDC:4na:map:BINSET
-    = [ 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 ];
-const INSDC:dna:text INSDC:4na:map:CHARSET
-    = ".ACMGRSVTWYHKDBN";
-const INSDC:dna:text INSDC:4na:accept:CHARSET
-    = ".ACMGRSVTWYHKDBNacmgrsvtwyhkdbn";
-
-
-/*--------------------------------------------------------------------------
- * 2na  - nucleotide data A,T,G,C
- * x2na - nucleotide data extended with single ambiguity value (N)
- *
- *  text encodings use the IUPAC character set
- *  legal values: [ACGTNacgtn.]
- *  canonical values: [ACGTN]
- *
- *  x2na values are 0..4 = { ACGTN }
- *
- *  2na values exclude N:
- *    A = 0
- *    C = 1
- *    G = 2
- *    T = 3
- */
-typedef U8 INSDC:2na:bin;
-typedef U8 INSDC:x2na:bin;
-typedef B1 INSDC:2na:packed [ 2 ];
-
-const INSDC:2na:bin  INSDC:2na:map:BINSET      = [ 0,1,2,3 ];
-const INSDC:dna:text INSDC:2na:map:CHARSET     = "ACGT";
-const INSDC:dna:text INSDC:2na:accept:CHARSET  = "ACGTacgt";
-const INSDC:x2na:bin INSDC:x2na:map:BINSET     = [ 0,1,2,3,4 ];
-const INSDC:dna:text INSDC:x2na:map:CHARSET    = "ACGTN";
-const INSDC:dna:text INSDC:x2na:accept:CHARSET = "ACGTNacgtn.";
-
-
-/*--------------------------------------------------------------------------
- * color - color-space text
- * 2cs   - color-space data 0,1,2,3
- * x2cs  - color-space data extended with single ambiguity value (.)
- *
- *  text encodings use the ASCII numeric character set
- *  values: [0123.]
- *
- *  x2cs values are 0..4 = { 0123. }
- *
- *  2cs values exclude '.':
- *    '0' = 0
- *    '1' = 1
- *    '2' = 2
- *    '3' = 3
- */
-typedef ascii INSDC:color:text;
-typedef U8 INSDC:2cs:bin;
-typedef U8 INSDC:x2cs:bin;
-typedef B1 INSDC:2cs:packed [ 2 ];
-
-const INSDC:2cs:bin  INSDC:2cs:map:BINSET        = [ 0,1,2,3 ];
-const INSDC:color:text INSDC:2cs:map:CHARSET     = "0123";
-const INSDC:color:text INSDC:2cs:accept:CHARSET  = "0123";
-const INSDC:x2cs:bin INSDC:x2cs:map:BINSET       = [ 0,1,2,3,4 ];
-const INSDC:color:text INSDC:x2cs:map:CHARSET    = "0123.";
-const INSDC:color:text INSDC:x2cs:accept:CHARSET = "0123.";
-
-const U8 INSDC:color:default_matrix =
-[
-    0, 1, 2, 3, 4,
-    1, 0, 3, 2, 4,
-    2, 3, 0, 1, 4,
-    3, 2, 1, 0, 4,
-    4, 4, 4, 4, 4
-];
-
-
-/*--------------------------------------------------------------------------
- * protein
- *  represented in IUPAC characters
- */
-typedef ascii INSDC:protein:text;
-
-
-/*--------------------------------------------------------------------------
- * aa
- *  protein data
- *  text encodings use the IUPAC character set
- */
-typedef	U8 INSDC:aa:bin;
-
-const INSDC:aa:bin INSDC:aa:map:BINSET
-= [ 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 ];
-const INSDC:protein:text INSDC:aa:map:CHARSET
-    = "ABCDEFGHIKLMNPQRSTVWXYZU*OJ";
-const INSDC:protein:text INSDC:aa:accept:CHARSET
-    = "ABCDEFGHIJKLMNOPQRSTVWXYZU*abcdefghijklmnopqrstvwxyzu";
-
-
-/*--------------------------------------------------------------------------
- * quality
- *  quality scoring values
- *
- *  phred legal values: 0..63
- */
-typedef U8 INSDC:quality:phred;
-typedef I8 INSDC:quality:log_odds;
-
-// text-encoding of quality scores
-// offsets are 33 = '!' and 64 = '@'
-typedef ascii INSDC:quality:text:phred_33;
-typedef ascii INSDC:quality:text:phred_64;
-typedef ascii INSDC:quality:text:log_odds_64;
-
-
-/*--------------------------------------------------------------------------
- * coordinate
- *  zero and one based coordinates
- */
-
-// 32 bit coordinates
-typedef I32 INSDC:coord:val;
-typedef U32 INSDC:coord:len;
-
-// zero or one based coordinate system
-typedef INSDC:coord:val INSDC:coord:zero;
-typedef INSDC:coord:val INSDC:coord:one;
-
-// POSITION types for relating bases to their location in signal
-typedef INSDC:coord:zero INSDC:position:zero;
-typedef INSDC:coord:one INSDC:position:one;
-
-// one-based coordinate limits
-const INSDC:coord:one INSDC:coord:min:one = 0x80000001;
-const INSDC:coord:one INSDC:coord:max:one = 0x3FFFFFFF;
-
-// zero-based coordinate limits
-const INSDC:coord:zero INSDC:coord:min:zero = 0x80000000;
-const INSDC:coord:zero INSDC:coord:max:zero = 0x3FFFFFFE;
-
-/*-------------------------------------------------------------------------
- * read filters bits
- */
-typedef U8 INSDC:SRA:read_filter;
-const INSDC:SRA:read_filter SRA_READ_FILTER_PASS = 0;
-const INSDC:SRA:read_filter SRA_READ_FILTER_REJECT = 1;
-const INSDC:SRA:read_filter SRA_READ_FILTER_CRITERIA = 2;
-const INSDC:SRA:read_filter SRA_READ_FILTER_REDACTED = 3;
-
-/*-------------------------------------------------------------------------
- * read type bits
- */
-typedef U8 INSDC:SRA:xread_type;
-const INSDC:SRA:xread_type SRA_READ_TYPE_TECHNICAL  = 0;
-const INSDC:SRA:xread_type SRA_READ_TYPE_BIOLOGICAL = 1;
-const INSDC:SRA:xread_type SRA_READ_TYPE_FORWARD    = 2;
-const INSDC:SRA:xread_type SRA_READ_TYPE_REVERSE    = 4;
-
-// original read-types included only technical and biological
-typedef INSDC:SRA:xread_type INSDC:SRA:read_type;
-
diff --git a/interfaces/insdc/seq.vschema b/interfaces/insdc/seq.vschema
deleted file mode 100644
index 8fb1b32..0000000
--- a/interfaces/insdc/seq.vschema
+++ /dev/null
@@ -1,210 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * Sequence schema
- */
-version 1;
-
-include 'vdb/vdb.vschema';
-include 'insdc/insdc.vschema';
-
-
-/*--------------------------------------------------------------------------
- * rand_4na_2na
- *  converts 4na to 2na
- *
- *  substitutes a random base for ambiguities
- *  from the bases allowed in the 4na.
- *
- *       A | C | G | T
- *    =================
- *    N    |   |   |     # any base may be substituted
- *    A  * |   |   |     # always A
- *    C    | * |   |     # always C
- *    M  * | * |   |     # A or C
- *    G    |   | * |     # always G
- *    R  * |   | * |     # A or G
- *    S    | * | * |     # C or G
- *    V  * | * | * |     # A, C or G
- *    T    |   |   | *   # always T
- *    W  * |   |   | *   # A or T
- *    Y    | * |   | *   # C or T
- *    H  * | * |   | *   # A, C or T
- *    K    |   | * | *   # G or T
- *    D  * |   | * | *   # A, G or T
- *    B    | * | * | *   # C, G or T
- *    N  * | * | * | *   # any base may be substituted
- */
-extern function
-    INSDC:2na:bin INSDC:SEQ:rand_4na_2na #1 ( INSDC:4na:bin rd_bin );
-
-
-/*--------------------------------------------------------------------------
- * sequence
- *  basic sequence table
- *
- * history:
- *  1.0.1 - introduced text-mode QUALITY columns
- */
-table INSDC:tbl:sequence #1.0.1
-{
-    /* READ
-     *  native or converted DNA sequence
-     */
-
-    // default is IUPAC character representation
-    extern default column INSDC:dna:text READ
-    {
-        read = out_dna_text;
-        validate = < INSDC:dna:text > compare ( in_dna_text, out_dna_text );
-    }
-
-    // 4na representation - unpacked and packed
-    extern column INSDC:4na:bin READ = out_4na_bin;
-    extern column INSDC:4na:packed READ = out_4na_packed;
-
-    // x2na representation - 2na with ambiguity
-    extern column INSDC:x2na:bin READ = out_x2na_bin;
-
-    // 2na representation - 2na with no ambiguity - unpacked and packed
-    extern column INSDC:2na:bin READ = out_2na_bin;
-    extern column INSDC:2na:packed READ = out_2na_packed;
-
-
-
-    /* CSREAD
-     *  native or converted color-space sequence
-     */
-
-    // default is ASCII character representation
-    extern default column INSDC:color:text CSREAD
-    {
-        read = out_color_text;
-        validate = < INSDC:color:text > compare ( in_color_text, out_color_text );
-    }
-
-    // x2cs representation - 2cs with ambiguity
-    extern column INSDC:x2cs:bin CSREAD = out_x2cs_bin;
-
-    // 2cs representation - 2cs with no ambiguity - unpacked and packed
-    extern column INSDC:2cs:bin CSREAD = out_2cs_bin;
-    extern column INSDC:2cs:packed CSREAD = out_2cs_packed;
-
-    /* CS_NATIVE
-     *  is color-space the native sequence space
-     */
-    readonly column bool CS_NATIVE = cs_native;
-
-    /* CS_KEY
-     *  leading call given in base-space
-     */
-    extern column INSDC:dna:text CS_KEY
-    {
-        read = out_cs_key;
-        validate = < INSDC:dna:text > compare ( in_cs_key, out_cs_key );
-    }
-
-    /* COLOR_MATRIX
-     *  matrix used for color-space conversions
-     */
-    extern column U8 COLOR_MATRIX = out_color_matrix;
-
-
-    /* QUALITY
-     *  base or color call qualities
-     */
-
-    // PHRED is default
-    extern default column INSDC:quality:phred QUALITY = out_qual_phred;
-
-    // textual encodings
-    extern column INSDC:quality:text:phred_33 QUALITY
-        = out_qual_text_phred_33
-        | ( INSDC:quality:text:phred_33 ) < B8 > sum < 33 > ( out_qual_phred );
-    extern column INSDC:quality:text:phred_64 QUALITY
-        = out_qual_text_phred_64
-        | ( INSDC:quality:text:phred_64 ) < B8 > sum < 64 > ( out_qual_phred );
-
-
-    /* SIGNAL
-     *  signal and intensity information is unspecified
-     */
-    INSDC:coord:len signal_len
-        = ( INSDC:coord:len ) row_len ( out_signal )
-        | < INSDC:coord:len > echo < 0 > ();
-    
-
-	/* VIRTUAL PRODUCTIONS
-	 *  cs_native
-	 *  in_cs_key
-	 *  out_cs_key
-	 *  out_signal
-	 *  in_dna_text
-	 *  out_2cs_bin
-	 *  out_2na_bin
-	 *  out_4na_bin
-	 *  out_dna_text
-	 *  out_x2cs_bin
-	 *  out_x2na_bin
-	 *  in_color_text
-	 *  out_2cs_packed
-	 *  out_2na_packed
-	 *  out_4na_packed
-	 *  out_color_text
-	 *  out_qual_phred
-	 *  out_color_matrix
-	 */
-};
-
-
-/*--------------------------------------------------------------------------
- * protein
- *  basic protein sequence table
- */
-table INSDC:tbl:protein #1
-{
-    /* PROTEIN
-     *  native or converted protein sequence
-     */
-
-    // default is IUPAC character representation
-    extern default column INSDC:protein:text PROTEIN
-    {
-        read = out_protein_text;
-        validate = < INSDC:protein:text > compare ( in_protein_text, out_protein_text );
-    }
-
-    // aa representation
-    extern column INSDC:aa:bin PROTEIN = out_aa_bin;
-
-
-	/* INSDC:tbl:protein productions
-	 *  out_aa_bin
-	 *  in_protein_text
-	 *  out_protein_text
-	 */
-};
diff --git a/interfaces/insdc/sra.h b/interfaces/insdc/sra.h
deleted file mode 100644
index 6f5aa71..0000000
--- a/interfaces/insdc/sra.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_insdc_sra_
-#define _h_insdc_sra_
-
-#ifndef _h_insdc_insdc_
-#include <insdc/insdc.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*==========================================================================
- * INSDC SRA types, constants
- */
-
-
-/* spotid_t
- *  unique id given to every spot
- */
-typedef int64_t INSDC_SRA_spotid_t;
-
-
-/* spot_ids_found
- *  returns a tuple of spot ids
- */
-typedef uint64_t INSDC_SRA_spot_ids_found [ 4 ];
-
-
-/* read filter
- */
-#define sra_read_filter_t "INSDC:SRA:read_filter"
-typedef INSDC_read_filter INSDC_SRA_read_filter;
-enum
-{
-    SRA_READ_FILTER_PASS = READ_FILTER_PASS,
-    SRA_READ_FILTER_REJECT = READ_FILTER_REJECT,
-    SRA_READ_FILTER_CRITERIA = READ_FILTER_CRITERIA,
-    SRA_READ_FILTER_REDACTED = READ_FILTER_REDACTED
-};
-
-
-/* read type
- *  describes the type of read within a spot
- *  the extended version also describes its orientation
- */
-#define sra_read_type_t "INSDC:SRA:xread_type"
-typedef INSDC_read_type INSDC_SRA_xread_type;
-typedef INSDC_SRA_xread_type INSDC_SRA_read_type;
-enum
-{
-    /* read_type and xread_type */
-    SRA_READ_TYPE_TECHNICAL  = READ_TYPE_TECHNICAL,
-    SRA_READ_TYPE_BIOLOGICAL = READ_TYPE_BIOLOGICAL,
-
-    /* xread_type only - applied as bits, e.g.:
-       type = SRA_READ_TYPE_BIOLOGICAL | SRA_READ_TYPE_REVERSE */
-    SRA_READ_TYPE_FORWARD = READ_TYPE_FORWARD,
-    SRA_READ_TYPE_REVERSE = READ_TYPE_REVERSE
-};
-
-
-/* platform id
- */
-#define sra_platform_id_t "INSDC:SRA:platform_id"
-typedef uint8_t INSDC_SRA_platform_id;
-enum
-{
-    SRA_PLATFORM_UNDEFINED         = 0,
-    SRA_PLATFORM_454               = 1,
-    SRA_PLATFORM_ILLUMINA          = 2,
-    SRA_PLATFORM_ABSOLID           = 3,
-    SRA_PLATFORM_COMPLETE_GENOMICS = 4,
-    SRA_PLATFORM_HELICOS           = 5,
-    SRA_PLATFORM_PACBIO_SMRT       = 6,
-    SRA_PLATFORM_ION_TORRENT       = 7,
-    SRA_PLATFORM_CAPILLARY         = 8,
-    SRA_PLATFORM_OXFORD_NANOPORE   = 9
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_insdc_sra_ */
diff --git a/interfaces/insdc/sra.vschema b/interfaces/insdc/sra.vschema
deleted file mode 100644
index 71e72e0..0000000
--- a/interfaces/insdc/sra.vschema
+++ /dev/null
@@ -1,467 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * INSDC Sequence Read Archive schema
- */
-version 1;
-
-include 'insdc/seq.vschema';
-
-
-/*--------------------------------------------------------------------------
- * types
- */
-
-/* spotid_t
- *  unique id given to every spot
- */
-typedef U32 INSDC:SRA:spotid_t;
-
-
-/* spot_ids_found
- */
-typedef U64 INSDC:SRA:spot_ids_found [ 4 ];
-
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-
-/* format_spot_name
- *  given a name format string, X, and Y
- *  produce a reconstructed spot name string
- *
- *  "name_fmt" [ DATA ] - name format string ( see format explanation below )
- *
- *  "X" [ DATA ] - X coordinate for spot
- *
- *  "Y" [ DATA ] - Y coordinate for spot
- *
- *  "spot_name" [ DATA, OPTIONAL ] - potential source of unformatted names
- *
- * SYNOPSIS:
- *  "name_fmt" may have any ASCII characters
- *  the special character '$' is an escape symbol
- *  when followed by a recognized format character,
- *  both the '$' and its format character will be
- *  replaced with a numeral generated from X and/or Y.
- *
- *  when "spot_name" is present and the "name_fmt" row is empty,
- *  output is taken verbatim from "spot_name"
- */
-function
-ascii INSDC:SRA:format_spot_name #1 ( ascii name_fmt , I32 X , I32 Y * ascii spot_name );
-
-function
-ascii INSDC:SRA:format_spot_name_no_coord #1 ( ascii name_fmt  * ascii spot_name );
-
-
-/*--------------------------------------------------------------------------
- * spotcoord
- *  spot coordinate table
- *  gives X and Y and potentially other common coordinates
- */
-table INSDC:SRA:tbl:spotcoord #1
-{
-    /* X, Y
-     *  32 ( or 16 ) bit coordinates within plate region
-     *  the coordinate system ( zero or one-based ) is unspecified
-     */
-    extern default column INSDC:coord:val X = out_x_coord;
-    extern default column INSDC:coord:val Y = out_y_coord;
-
-    // backward compatibility for 16-bit unsigned coordinates
-    extern readonly column U16 X = cast ( x_clip_U16 );
-    extern readonly column U16 Y = cast ( y_clip_U16 );
-
-    // clip signed 32-bit coordinates to unsigned 16-bit
-    INSDC:coord:val x_clip_U16
-        = < INSDC:coord:val > clip < 0, 0xFFFF > ( out_x_coord );
-    INSDC:coord:val y_clip_U16
-        = < INSDC:coord:val > clip < 0, 0xFFFF > ( out_y_coord );
-
-
-	/* INSDC:SRA:tbl:spotcoord virtual productions
-	 *  out_x_coord
-	 *  out_y_coord
-	 */
-};
-
-
-/*--------------------------------------------------------------------------
- * spotname
- *  spot name table
- *  the name column is normally indexed
- *
- * history:
- *  1.0.1 - split X and Y into spotcoord table
- */
-table INSDC:SRA:tbl:spotname #1.0.1 = INSDC:SRA:tbl:spotcoord #1
-{
-    /* NAME
-     *  external name for spot
-     */
-    extern column ascii NAME = _out_name;
-
-
-    /* SPOT_IDS_FOUND
-     *  lookup by NAME column
-     */
-    readonly column INSDC:SRA:spot_ids_found SPOT_IDS_FOUND
-        =  spot_ids_found;
-
-
-    /* default rules */
-
-    // assemble NAME column output in order of preference
-    ascii _out_name
-        = INSDC:SRA:format_spot_name ( out_name_fmt, out_x_coord, out_y_coord, out_spot_name )
-        | INSDC:SRA:format_spot_name ( out_name_fmt, out_x_coord, out_y_coord )
-        | INSDC:SRA:format_spot_name_no_coord (out_name_fmt)
-        | out_spot_name;
-
-
-	/* INSDC:SRA:tbl:spotcoord inherited virtual productions
-	 *  out_x_coord
-	 *  out_y_coord
-	 */
-
-	/* INSDC:SRA:tbl:spotname virtual productions
-	 *  out_name_fmt
-	 *  out_spot_name
-	 *  spot_ids_found
-	 */
-};
-
-
-/*--------------------------------------------------------------------------
- * spotdesc
- *  spot descriptor table
- *
- * history:
- *  1.0.1 - base explicitly upon sequence #1.0.1
- *  1.0.2 - added alternate taps for in_read_type and in_read_len
- */
-table INSDC:SRA:tbl:spotdesc #1.0.2 = INSDC:tbl:sequence #1.0.1
-{
-    /* NREADS
-     *  describes the number of reads within spot
-     */
-    extern column U8 NREADS = out_nreads;
-
-
-    /* SPOT_LEN
-     *  length of sequence
-     * FIXED_SPOT_LEN
-     *  non-zero if sequence length is fixed throughout table
-     */
-    readonly column INSDC:coord:len SPOT_LEN = spot_len;
-    readonly column INSDC:coord:len FIXED_SPOT_LEN = fixed_spot_len;
-
-
-    /* TRIM_START
-     * TRIM_LEN
-     *  define the spot segment after applying trimming
-     *  trimming may be based upon technical segments and read quality
-     */
-    readonly column INSDC:coord:zero TRIM_START
-        = trim_start
-        | < INSDC:coord:zero> echo < 0 > ();
-    readonly column INSDC:coord:one TRIM_START
-        = ( INSDC:coord:one ) < I32 > sum < 1 > ( trim_start )
-        | < INSDC:coord:one> echo < 1 > ();
-    readonly column INSDC:coord:len TRIM_LEN
-        = trim_len
-        | spot_len;
-
-
-    /* LABEL
-     * LABEL_START, LABEL_LEN
-     *  column pair for writing read labels
-     *  the label text for all reads is concatenated to form the LABEL row
-     *  starting coordinates and lengths delineate labels by read
-     *
-     * NB - row length for LABEL_START/LEN === NREADS,
-     *      row length for LABEL === SUM ( LABEL_LEN [ n ] ) for NREADS
-     */
-    extern column ascii LABEL = out_label;
-    extern column INSDC:coord:zero LABEL_START = out_label_start;
-    extern column INSDC:coord:len LABEL_LEN = out_label_len;
-
-    // 16-bit versions
-    readonly column U16 LABEL_START = cast ( out_label_start );
-    readonly column U16 LABEL_LEN = cast ( out_label_len );
-
-
-    /* READ_TYPE
-     *  binary values giving type of a read
-     *
-     * NB - row length === NREADS
-     */
-    extern default column INSDC:SRA:xread_type READ_TYPE = out_read_type;
-
-    INSDC:SRA:xread_type in_read_type
-        = READ_TYPE
-        | _alt_in_read_type;
-
-    readonly column INSDC:SRA:read_type READ_TYPE
-        = out_read_type
-        | < INSDC:SRA:xread_type, INSDC:SRA:read_type > map < [ 0,1,2,3,4,5,6,7 ], [ 0,1,0,1,0,1,0,1 ] > ( out_read_type );
-
-
-    /* READ_START
-     * READ_LEN
-     *  define starting coordinates and length of read segments
-     *
-     * NB - row length === NREADS
-     */
-    extern default column INSDC:coord:zero READ_START
-        = out_read_start;
-    extern column INSDC:coord:one READ_START
-        = ( INSDC:coord:one ) < I32 > sum < 1 > ( out_read_start );
-    extern column INSDC:coord:len READ_LEN = out_read_len;
-
-    // 16-bit versions
-    readonly column U16 READ_START = cast ( out_read_start );
-    readonly column U16 READ_LEN = cast ( out_read_len );
-
-    INSDC:coord:len in_read_len
-        = READ_LEN
-        | _alt_in_read_len;
-
-
-    /* READ_FILTER
-     *  bits indicate usability of sequence
-     *  always available
-     */
-    extern column INSDC:SRA:read_filter READ_FILTER
-        = out_rd_filter
-        | < INSDC:SRA:read_filter > echo < SRA_READ_FILTER_PASS > ( out_read_start );
-
-    // RD_FILTER - only available if physical column is present
-    extern readonly column INSDC:SRA:read_filter RD_FILTER = out_rd_filter;
-
-
-    /* spot_len is used internally */
-    INSDC:coord:len spot_len
-        = base_space_spot_len
-        | color_space_spot_len
-        | align_spot_len;
-    INSDC:coord:len fixed_spot_len
-        = static_fixed_spot_len
-        | base_space_fixed_spot_len
-        | color_space_fixed_spot_len;
-
-
-	/* INSDC:tbl:sequence inherited virtual productions
-	 *  out_2cs_packed
-	 *  out_2na_packed
-	 */
-
-	/* INSDC:SRA:tbl:spotdesc productions
-	 *  trim_len
-	 *  out_label
-	 *  out_nreads
-	 *  trim_start
-	 *  out_read_len
-	 *  out_label_len
-	 *  out_rd_filter
-	 *  out_read_type
-	 *  out_read_start
-	 *  out_label_start
-	 *  static_fixed_spot_len
-	 */
-};
-
-/*--------------------------------------------------------------------------
- * stats
- *  run and spot-group statistics
- *
- * history:
- *  1.1.0 - added CMP_BASE_COUNT
- */
-table INSDC:SRA:tbl:stats #1.1
-{
-    readonly column INSDC:SRA:spotid_t MIN_SPOT_ID
-        = min_spot_id
-        | < INSDC:SRA:spotid_t > echo < 1 > ();
-    readonly column INSDC:SRA:spotid_t MAX_SPOT_ID
-        = max_spot_id
-        | cast ( spot_count );
-    readonly column U64
-        SPOT_COUNT = spot_count;
-    readonly column U64
-        BASE_COUNT = base_count;
-    readonly column U64
-        BIO_BASE_COUNT = bio_base_count;
-    readonly column U64 CMP_BASE_COUNT
-        = cmp_base_count
-        | base_count;
-
-    U8 stats_dummy = in_stats_bin;
-
-	/* INSDC:SRA:tbl:stats productions
-	 *  base_count
-	 *  spot_count
-	 *  max_spot_id
-	 *  min_spot_id
-     *  in_stats_bin
-	 *  bio_base_count
-	 *  cmp_base_count
-	 */
-};
-
-/*--------------------------------------------------------------------------
- * sra
- *  the INSDC SRA table
- *
- * history:
- *  1.0.1 - base explicitly upon spotname #1.0.1
- *  1.0.2 - base explicitly upon sequence #1.0.1, spotdesc #1.0.1
- *  1.0.3 - base upon spotdesc #1.0.2
- */
-
-// platform constants from <insdc/sra.h>
-typedef U8 INSDC:SRA:platform_id;
-const INSDC:SRA:platform_id SRA_PLATFORM_UNDEFINED         = 0;
-const INSDC:SRA:platform_id SRA_PLATFORM_454               = 1;
-const INSDC:SRA:platform_id SRA_PLATFORM_ILLUMINA          = 2;
-const INSDC:SRA:platform_id SRA_PLATFORM_ABSOLID           = 3;
-const INSDC:SRA:platform_id SRA_PLATFORM_COMPLETE_GENOMICS = 4;
-const INSDC:SRA:platform_id SRA_PLATFORM_HELICOS           = 5;
-const INSDC:SRA:platform_id SRA_PLATFORM_PACBIO_SMRT       = 6;
-const INSDC:SRA:platform_id SRA_PLATFORM_ION_TORRENT       = 7;
-const INSDC:SRA:platform_id SRA_PLATFORM_CAPILLARY         = 8;
-const INSDC:SRA:platform_id SRA_PLATFORM_OXFORD_NANOPORE   = 9;
-
-table INSDC:SRA:tbl:sra #1.0.3 =
-    INSDC:tbl:sequence #1.0.1, INSDC:SRA:tbl:spotname #1.0.1,
-    INSDC:SRA:tbl:spotdesc #1.0.2, INSDC:SRA:tbl:stats #1.1.0
-{
-    /* PLATFORM
-     *  platform description
-     *  one version returns a constant defined above
-     *  while the other returns a textual representation
-     */
-    extern column INSDC:SRA:platform_id PLATFORM
-        = .PLATFORM
-        | out_platform;
-    readonly column  ascii PLATFORM
-        = platform_name;
-
-    physical column
-        < INSDC:SRA:platform_id > zip_encoding .PLATFORM = PLATFORM;
-
-
-    /* SPOT_ID
-     *  reports spot id of current row
-     */
-    extern column INSDC:SRA:spotid_t SPOT_ID
-        = < INSDC:SRA:spotid_t > add_row_id ( .SPOT_ID )
-        | cast ( rowid_64 );
-    I64 rowid_64 = row_id ();
-
-    physical column < INSDC:SRA:spotid_t > izip_encoding .SPOT_ID
-        = < INSDC:SRA:spotid_t > sub_row_id ( SPOT_ID );
-
-
-    /* SPOT_GROUP
-     *  a name denoting group membership, ''
-     *  used for "barcode" support
-     */
-    extern column ascii SPOT_GROUP
-        = out_spot_group
-        | .SPOT_GROUP
-        | < ascii > echo < '' > ();
-
-    ascii in_spot_group = SPOT_GROUP;
-
-    physical column
-        < ascii > zip_encoding <  Z_DEFAULT_STRATEGY, Z_BEST_SPEED > .SPOT_GROUP = in_spot_group;
-
-
-	/* INSDC:tbl:sequence inherited virtual productions
-	 *  cs_native
-	 *  in_cs_key
-	 *  out_cs_key
-	 *  out_signal
-	 *  in_dna_text
-	 *  out_2cs_bin
-	 *  out_2na_bin
-	 *  out_4na_bin
-	 *  out_dna_text
-	 *  out_x2cs_bin
-	 *  out_x2na_bin
-	 *  in_color_text
-	 *  out_2cs_packed
-	 *  out_2na_packed
-	 *  out_4na_packed
-	 *  out_color_text
-	 *  out_qual_phred
-	 *  out_color_matrix
-	 */
-
-	/* INSDC:SRA:tbl:spotcoord inherited virtual productions
-	 *  out_x_coord
-	 *  out_y_coord
-	 */
-
-	/* INSDC:SRA:tbl:spotname inherited virtual productions
-	 *  out_name_fmt
-	 *  out_spot_name
-	 *  spot_ids_found
-	 */
-
-	/* INSDC:SRA:tbl:spotdesc inherited productions
-	 *  trim_len
-	 *  out_label
-	 *  out_nreads
-	 *  trim_start
-	 *  out_read_len
-	 *  out_label_len
-	 *  out_rd_filter
-	 *  out_read_type
-	 *  out_read_start
-	 *  out_label_start
-	 *  static_fixed_spot_len
-	 */
-
-	/* INSDC:SRA:tbl:stats inherited productions
-	 *  base_count
-	 *  spot_count
-	 *  max_spot_id
-	 *  min_spot_id
-     *  in_stats_bin
-	 *  bio_base_count
-	 */
-
-	/* INSDC:SRA:tbl:sra productions
-	 *  out_platform
-	 *  platform_name
-	 */
-};
diff --git a/interfaces/kapp/args-conv.h b/interfaces/kapp/args-conv.h
deleted file mode 100644
index 4a9e66a..0000000
--- a/interfaces/kapp/args-conv.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_kapp_args_conv_
-#define _h_kapp_args_conv_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_kapp_args_
-#include "args.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* 
- * No conversion, allocates memory and copies argument as is.
- * This may should be used from other conversion functions if they decide not to change argument.
- */
-rc_t ArgsConvDefault(const Args * args, uint32_t arg_index, const char * arg, size_t arg_len, void ** result, WhackParamFnP * whack);
-    
-/*
- * Converts from utf-8 platform dependent (e.g. with back-slashes on Windows) to utf-8 POSIX full file path format
- */
-rc_t ArgsConvFilepath(const Args * args, uint32_t arg_index, const char * arg, size_t arg_len, void ** result, WhackParamFnP * whack);
-    
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kapp_args_conv_ */
diff --git a/interfaces/kapp/args.h b/interfaces/kapp/args.h
deleted file mode 100644
index 99bb09c..0000000
--- a/interfaces/kapp/args.h
+++ /dev/null
@@ -1,402 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kapp_args_
-#define _h_kapp_args_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* this define is while adding the --option-file to standard options
- * and it might not be right yet */
-#define USE_OPTFILE    1
-
-/*
- * Terminology for this module:
- *
- * On the command line all things typed in are arguments
- * Those arguments that are string preceded by "-" or "--" are options
- * The -- preceded version of an Option is that Option's name.  A name
- * can have one or more aliases that are a single character.
- * The arguments that are not are parameters.
- *
- * This module treats all "strings" as if they were made of UTF-8 characters
- * that can be one or more bytes long.  An alias is a single Unicode character
- * in UTF-8 format.  7-bit ASCII is a true subset of UTF-8.  8-but ASCII might
- * not work.
- */
-
-/*--------------------------------------------------------------------------
- * Args
- *  opaque class to build up option lists and parse the command line argc/argv
- *  not reference counted
- */
-typedef struct Args Args;
-
-/* ==========
- * Structure to define a command line option
- *
- * these are fed in one by one or through arrays to build up the
- * tables used to parse the caommand line argc/argv
- */
-
-typedef void (CC * WhackParamFnP) (void * object);
-typedef rc_t (CC * ConvertParamFnP) (const Args * self, uint32_t arg_index, const char * arg, size_t arg_len, void ** result, WhackParamFnP * whack);
-    
-typedef struct OptDef
-{
-    const char *  name;           	/* UTF8/ASCII NUL terminated long name */
-    const char *  aliases;        	/* UTF8/ASCII NUL terminated set of single utf8/ASCII character names: may be NULL or "" */
-    void (CC *    help_gen) (const char **);	/* function to generate help string */
-    const char ** help;                	/* help-gen can treat these as non-const */
-    uint16_t      max_count;      	/* maximum allowed; 0 is unlimited */
-#define OPT_UNLIM 0
-    bool          needs_value;    	/* does this require an argument value? */
-    bool          required;             /* is this a required parameter?  Not supported yet. */
-    ConvertParamFnP convert_fn;   /* function to convert option. can perform binary conversions. may be NULL */
-} OptDef;
-    
-typedef struct ParamDef ParamDef;
-struct ParamDef
-{
-    ConvertParamFnP convert_fn; /* function to convert option. can perform binary conversions. may be NULL */
-};
-
-extern OptDef StandardOptions [];
-
-#define ALIAS_DEBUG     "+"
-#define ALIAS_LOG_LEVEL "L"
-#define ALIAS_HELP      "h?"
-#define ALIAS_HELP1     "h"
-#define ALIAS_VERSION   "V"
-#define ALIAS_VERBOSE   "v"
-#define ALIAS_QUIET     "q"
-#if USE_OPTFILE
-#define ALIAS_OPTFILE   ""
-#endif
-
-#define OPTION_DEBUG     "debug"
-#define OPTION_LOG_LEVEL "log-level"
-#define OPTION_HELP      "help"
-#define OPTION_VERSION   "version"
-#define OPTION_VERBOSE   "verbose"
-#define OPTION_QUIET     "quiet"
-#if USE_OPTFILE
-#define OPTION_OPTFILE   "option-file"
-#endif
-#define OPTION_NO_USER_SETTINGS "no-user-settings"
-
-#define ALIAS_REPORT    ""
-#define OPTION_REPORT   "ncbi_error_report"
-
-/* Make
- *  create the empty object
- */
-rc_t CC ArgsMake ( Args ** pself );
-
-
-/* Whack
- *  undo all object and owned object construction
- */
-rc_t CC ArgsWhack ( Args * self );
-
-#ifndef ArgsRelease
-#define ArgsRelease(self) ArgsWhack(self)
-#endif
-
-
-/* AddOption
- *  takes the OptDef structure to add an option
- * AddLongOption
- *  splits the OptDef into simple parameters
- *
- *  "opt_short_names" [ IN, NULL OKAY ] - an optional list of single-characters used as
- *  aliases for the option.
- *
- *  "long_name" [ IN ] - a required long option name
- *
- *  "opt_param_names [ IN, NULL OKAY ] - an optional list of option parameter names
- *  currently limited to a single name. when not NULL/empty, implies that the option
- *  must have a parameter.
- *
- *  "help_text" [ IN ] - text for generating help info.
- *
- *  "max_count" [ IN, ZERO => INFINITE ] - sets an upper limit on the number of times
- *  the option can be specified on cmdline. the special value "0" is taken to mean
- *  as many times as the system will support.
- *
- *  "required" [ IN ] - when true, the option must be specified at least once.
- *  when false, the option is truly optional.
- */
-rc_t CC ArgsAddOption ( Args * self, const OptDef * option );
-rc_t CC ArgsAddLongOption ( Args * self, const char * opt_short_names, const char * long_name,
-    const char * opt_param_names, const char * help_text, uint32_t max_count, bool required );
-
-
-/* AddOptionArray
- *  helper function to call the ArgsAddOption() multiple times
- */
-rc_t CC ArgsAddOptionArray ( Args * self, const OptDef * option, uint32_t count
-#if ADD_SOMETIME_LATER
-    , rc_t ( CC * header_fmt )( Args * args, const char * header ), const char * header
-#endif
-    );
-
-/* AddParam
- *  adds a slot for a known parameter
- * AddLongParam
- *  adds a slot for a cmdline parameter along with some params of its own
- *
- *  "param_name" [ IN ] - for help display.
- *
- *  "help_text" [ IN ] - for help display.
- *
- *  "opt_cvt" [ IN, NULL OKAY ] - optional parameter conversion function
- */
-rc_t CC ArgsAddParam ( Args * self, const ParamDef * param_def );
-rc_t CC ArgsAddLongParam ( Args * self, const char * param_name, const char * help_text, ConvertParamFnP opt_cvt );
-
-/* ArgsAddParamsArray
- *  adds parameter definitions for arguments parsing
- */
-rc_t CC ArgsAddParamArray ( Args * self, const ParamDef * param, uint32_t count );
-
-/* AddStandardOptions
- *  helper macro to add the array of internally defined
- *  "standard" options that we want all programs to support
- */
-rc_t CC ArgsAddStandardOptions ( Args * self );
-
-
-/* Parse
- *  parse the argc/argv as presented to KMain using the Args structure as built up
- */
-rc_t CC ArgsParse ( Args * self, int argc, char *argv[] );
-
-
-/* tokenizes a file into an user supplied argv array ( not the one from main() ! )
- * the result can be passed into ArgsParse(), enables commandline-options from a file
- *  caller has to free the created array via Args_free_token_argv()
- */
-rc_t CC Args_tokenize_file_into_argv( const char * filename, int * argc, char *** argv );
-
-rc_t CC Args_tokenize_file_and_progname_into_argv( const char * filename, const char * progname,
-                                                   int * argc, char *** argv );
-
-/* free's the array that was created by calling Args_tokenize_file_into_argv()
- */
-void CC Args_free_token_argv( int argc, char * argv[] );
-
-
-/* looks in args for file_option(s), if found loades the files, parses them
-   if this results in more files to be parsed ( kind of includes ),
-   the parsing continues recursivly
- */
-rc_t CC Args_parse_inf_file( Args * args, const char * file_option );
-
-
-/* looks in the unparsed original argv for the value of an option
-   >>> this is a hack to enable special treatment for tools that do not use
-       the standard args-parsing <<<
- */
-rc_t CC Args_find_option_in_argv( int argc, char * argv[],
-                                  const char * option_name,
-                                  char * option, size_t option_len );
-
-/* OptionCount
- *  how many times did this Option occur?
- */
-rc_t CC ArgsOptionCount ( const Args * self, const char * option_name, uint32_t * count );
-
-
-/* OptionValue
- *  what was the Nth value seen for this option?
- *  use OptionCount to know how many were seen.
- */
-rc_t CC ArgsOptionValue ( const Args * self, const char * option_name,
-    uint32_t iteration, const void ** value );
-
-/*
- * ParamCount
- *  How many Parameters were seen?
- */
-rc_t CC ArgsParamCount (const Args * self, uint32_t * count);
-
-/*
- * ParamValue
- *  What was the Nth parameter seen?  Use ParamCount to know how many
- *  were seen.
- */
-rc_t CC ArgsParamValue (const Args * self, uint32_t iteration, const void ** value);
-
-
-/*
- * ArgvCount
- *  This is the original main() argument count (argc or ac)
- */
-rc_t CC ArgsArgvCount (const Args * self, uint32_t * count);
-rc_t CC ArgsArgc (const Args * self, uint32_t * count);
-#define ArgsArgc ArgsArgvCount
-
-
-/*
- * ArgvValue
- *  What was the Nth parameter seen?  Use ArgvCount to know how many
- *  were seen.
- *
- * The 0th value will as with the original argc.argv c system be the program name
- * as given to us by the O/S and c start up code.
- */
-rc_t CC ArgsArgvValue (const Args * self, uint32_t iteration, const char ** value_string);
-
-
-
-/* Utility functions to do common combinations and activities */
-
-/*
- * MakeStandardOptions
- *  Calls both Make() and AddStandardOptions()
- *
- * This is probably the first thing to do in KMain(), then add other Options
- * via OptDef arracys and structures.  Then call parse.
- */
-rc_t CC ArgsMakeStandardOptions (Args** pself);
-
-rc_t CC ArgsHandleHelp (Args * self);
-rc_t CC ArgsHandleVersion (Args * self);
-rc_t CC ArgsHandleOptfile (Args * self);
-
-/*
- * ArgsHandleLogLevel
- *  calls OptionCount and OptionValue to get parameters for the log-level
- *  option then uses that/those values to set the Log level for the log module
- */
-rc_t CC ArgsHandleLogLevel (const Args * self);
-
-
-rc_t CC ArgsHandleStatusLevel (const Args * self);
-rc_t CC ArgsHandleDebug (const Args * self);
-rc_t CC ArgsHandleStandardOptions (Args * self);
-
-rc_t CC ArgsMakeAndHandle (Args ** pself, int argc, char ** argv, uint32_t table_count, ...);
-
-/* the same as ArgsMakeAndHandle but also accepts params definitions */
-rc_t CC ArgsMakeAndHandle2 (Args ** pself, int argc, char ** argv,
-                            ParamDef * params, uint32_t param_count, uint32_t table_count, ...);
-
-rc_t CC ArgsOptionSingleString (const Args * self, const char * option, const char ** value);
-
-/* either fullpath or progname can be NULL, args can not */
-rc_t CC ArgsProgram (const Args * args, const char ** fullpath, const char ** progname);
-
-
-/* after arguments are parsed; check to see if any required arguments are missing */
-rc_t CC ArgsCheckRequired (Args * args);
-
-
-/*
- * Help Interface:
- * This interface is an extention os the Args Interface that is used for
- * generating usage outputs for a command line program,  This interface is provided
- * to standardize the look of these usage messages.
- */
-
-/*
- * This function is defined per program and is the meat of the output
- * the the short-form usage and the first part of the long-form usage
- *
- * It should look something like this:
- *
- *
- *    rc_t UsageSummary (const char * progname)
- *    {
- *        return KOutMsg ("\n"
- *                        "Usage:\n"
- *                        "  %s [Options] [Parameters]\n"
- *                        "\n"
- *                        "Summary:\n"
- *                        "  Does something incredibly useful or we wouldn't have written it.\n"
- *                        "  I mean very very useful like pre-slicomg bread.\n",
- *                        "\n", progname);
- *    }
- *
- * More than one example line can be present if desired.
- */
-rc_t CC UsageSummary (const char * prog_name);
-
-/*
- * A program should define this which will be used only of the actual
- * program name as called is somehow irretrievable
- */
-extern const char UsageDefaultName[];
-
-
-/*
- * Version
- *   Generate the output for the -V or --version options.
- *   const char * fullpath:  The full argv[0] name for the program
- *   ver_t version:          the version for this program
- */
-void CC HelpVersion (const char * fullpath, ver_t version);
-
-void CC HelpOptionLine(const char * alias, const char * option, const char * param, const char ** msgs);
-
-void CC HelpParamLine (const char * param, const char * const * msgs);
-
-/*
- * OptionsStandard
- *   output the option lines for the standard options
- */
-void CC HelpOptionsStandard (void);
-
-
-/*
- * This Macro creates a default short form usage output typically
- * used when no options/parameters are given for a program
- *
- * It requires 'void summary (const char * program_name)' that is also
- * used in 'rc_t Usage (const Args* args)' that is the usage function
- * called when -? -h or --help is given as an option on the command line
- */
-
-rc_t CC MiniUsage ( const Args * args );
-rc_t CC Usage ( const Args * args );
-
-
-uint32_t CC ArgsGetGlobalTries(bool *isSet);
-
-bool CC Is32BitAndDisplayMessage( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kapp_args_ */
diff --git a/interfaces/kapp/extern.h b/interfaces/kapp/extern.h
deleted file mode 100644
index 726e555..0000000
--- a/interfaces/kapp/extern.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kapp_extern_
-#define _h_kapp_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-
-#define KAPP_EXTERN LIB_EXPORT
-#define KAPP_EXTERN_DATA extern LIB_EXPORT
-#define EXPORT_LATCH 1
-
-#else
-
-#define KAPP_EXTERN LIB_IMPORT
-#define KAPP_EXTERN_DATA LIB_IMPORT
-
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_kapp_extern_ */
diff --git a/interfaces/kapp/loader-file.h b/interfaces/kapp/loader-file.h
deleted file mode 100644
index e4c0de8..0000000
--- a/interfaces/kapp/loader-file.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_kapp_loader_file_
-#define _h_kapp_loader_file_
-
-#ifndef _h_kapp_extern_
-#include <kapp/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#include <klib/log.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KDirectory;
-
-/*--------------------------------------------------------------------------
-* SRA reader buffered input file
-*/
-typedef struct KLoaderFile KLoaderFile;
-
-/*
-    md5_digest - not null forces MD5 verification for the file content
-    read_ahead - force reading of the file in a diff thread, ahead of time,
-                 usefull on compressed file, speeds up MD5 verify too
-*/
-KAPP_EXTERN rc_t CC KLoaderFile_Make(const KLoaderFile **file, struct KDirectory const* dir, const char* filename,
-                                     const uint8_t* md5_digest, bool read_ahead);
-
-KAPP_EXTERN rc_t CC KLoaderFile_Release(const KLoaderFile* cself, bool exclude_from_progress);
-
-/* temporary close the file to avoid too many open files, but stay on position */
-KAPP_EXTERN rc_t CC KLoaderFile_Close(const KLoaderFile* cself);
-
-/* restart reading from beginning of the file */
-KAPP_EXTERN rc_t CC KLoaderFile_Reset(const KLoaderFile* cself);
-
-KAPP_EXTERN rc_t CC KLoaderFile_SetReadAhead(const KLoaderFile* cself, bool read_ahead);
-
-/* print error msg file file info and return original!! rc
-   if msg is NULL fmt is not used so call with NULL, NULL if no msg needs to be printed */
-KAPP_EXTERN rc_t CC KLoaderFile_LOG(const KLoaderFile* cself, KLogLevel lvl, rc_t rc, const char *msg, const char *fmt, ...);
-KAPP_EXTERN rc_t CC KLoaderFile_VLOG(const KLoaderFile* cself, KLogLevel lvl, rc_t rc, const char *msg, const char *fmt, va_list args);
-
-/* returns true if eof is reached and buffer is empty */
-KAPP_EXTERN rc_t CC KLoaderFile_IsEof(const KLoaderFile* cself, bool* eof);
-
-/* returns current buffer position in file */
-KAPP_EXTERN rc_t CC KLoaderFile_Offset(const KLoaderFile* cself, uint64_t* offset);
-
-/* returns current line number in file */
-KAPP_EXTERN rc_t CC KLoaderFile_Line(const KLoaderFile* cself, uint64_t* line);
-
-/* file name */
-KAPP_EXTERN rc_t CC KLoaderFile_Name(const KLoaderFile *self, const char **name);
-
-/* real file name */
-KAPP_EXTERN rc_t CC KLoaderFile_FullName(const KLoaderFile *self, const char **name);
-
-/* file name completly resolved */
-KAPP_EXTERN rc_t CC KLoaderFile_ResolveName(const KLoaderFile *self, char *resolved, size_t rsize);
-
-/* Readline
- *  makes next line from a file available in buffer.
- *  eligable EOL symbols are: \n (unix), \r (older mac), \r\n (win)
- *  EOL symbol(s) never included in buffer length.
- *  if there is no EOL at EOF - not an error.
- *  fails if internal buffer is insufficient.
- *  buffer is NULL on EOF
- *  rc state of (rcString rcTooLong) means line was too long
- *              you may copy line and readline again for the tail of the line
- *
- *  "buffer" [ OUT ] and "length" [ OUT ] - returned line and it's length
- */
-KAPP_EXTERN rc_t CC KLoaderFile_Readline(const KLoaderFile* self, const void** buffer, size_t* length);
-
-/* Read
-*  reads "size" bytes from file and makes them available through "buffer"
-*  if "advance" is > 0 than before reading skips "advance" bytes in file
-*  if "size" == 0 then nothing is read and available "length" bytes is returned in "buffer"
-*
-*  "buffer" [ OUT ] - pointer to read bytes, "buffer" NULL means EOF
-*  "length" [ OUT ] - number of read bytes, normally == size,
-                      if less than requested size, rc is [rcBuffer,rcInsufficient], advance and read more!
-*/
-KAPP_EXTERN rc_t CC KLoaderFile_Read(const KLoaderFile* self, size_t advance, size_t size, const void** buffer, size_t* length);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kapp_loader_file_ */
diff --git a/interfaces/kapp/loader-meta.h b/interfaces/kapp/loader-meta.h
deleted file mode 100644
index b09431a..0000000
--- a/interfaces/kapp/loader-meta.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*==============================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_kapp_loader_meta_
-#define _h_kapp_loader_meta_
-
-#ifndef _h_kapp_extern_
-#include <kapp/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KMDataNode;
-
-KAPP_EXTERN rc_t CC KLoaderMeta_Write(struct KMDataNode* root,
-                                      const char* argv0, const char* argv0_date,
-                                      const char* app_name, ver_t app_version);
-
-KAPP_EXTERN rc_t CC KLoaderMeta_WriteWithVersion(struct KMDataNode* root,
-                                                 const char* argv0, const char* argv0_date, ver_t argv0_version,
-                                                 const char* app_name, ver_t app_version);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kapp_loader_meta_*/
diff --git a/interfaces/kapp/log-xml.h b/interfaces/kapp/log-xml.h
deleted file mode 100644
index 9517fb8..0000000
--- a/interfaces/kapp/log-xml.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_kapp_log_xml_h_
-#define _h_kapp_log_xml_h_
-
-#ifndef _kapp_extern_
-#include <kapp/extern.h>
-#endif
-
-#ifndef _kapp_args_
-#include <kapp/args.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KDirectory;
-
-KAPP_EXTERN_DATA const OptDef XMLLogger_Args [];
-KAPP_EXTERN_DATA const size_t XMLLogger_ArgsQty;
-
-typedef struct XMLLogger XMLLogger;
-
-/*
-  Creates XML logging based on dir and command line
- */
-KAPP_EXTERN rc_t CC XMLLogger_Make(const XMLLogger** cself,
-    struct KDirectory* dir, const Args *args);
-
-/*
-  Creates XML logging based on dir, logpath pair or fd directly
-
-  dir     [IN,NULL] - directory object used to create and open logpath file
-  logpath [IN,NULL] - file name of the log file to _truncate_ and log into
-  fd  [IN,NEGATIVE] - direct file descriptor, if < 0 than not set
-
-  if both logpath == NULL and fd < 0 than no XML log is produced normal log gets full inforamtion
- */
-KAPP_EXTERN rc_t CC XMLLogger_Make2(const XMLLogger** cself,
-    struct KDirectory* dir, const char* logpath, const int fd);
-
-KAPP_EXTERN void CC XMLLogger_Usage(void);
-
-KAPP_EXTERN void CC XMLLogger_Release(const XMLLogger* cself);
-
-KAPP_EXTERN rc_t CC XMLLogger_Encode(const char* src, char *dst, size_t dst_sz, size_t *num_writ);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kapp_log_xml_h_ */
diff --git a/interfaces/kapp/main.h b/interfaces/kapp/main.h
deleted file mode 100644
index 3139834..0000000
--- a/interfaces/kapp/main.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kapp_main_
-#define _h_kapp_main_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_kapp_args_
-#include <kapp/args.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KMain
- *  invoked by platform specific "main" entrypoint
- */
-
-/* Quitting
- *  is the program supposed to exit
- */
-rc_t CC Quitting ( void );
-
-/* SignalQuit
- *  tell the program to quit
- */
-rc_t CC SignalQuit ( void );
-
-/* Hangup
- *  has the program received a SIGHUP
- */
-rc_t CC Hangup ( void );
-
-/* SignalHup
- *  send the program a SIGHUP
- */
-rc_t CC SignalHup ( void );
-
-/* SignalNoHup
- *  tell the program to stay alive even after SIGHUP
- */
-rc_t CC SignalNoHup ( void );
-
-/* Version  EXTERN
- *  return 4-part version code: 0xMMmmrrrr, where
- *      MM = major release
- *      mm = minor release
- *    rrrr = bug-fix release
- */
-ver_t CC KAppVersion ( void );
-    
-/* KMain - EXTERN
- *  executable entrypoint "main" is implemented by
- *  an OS-specific wrapper that takes care of establishing
- *  signal handlers, logging, etc.
- *
- *  in turn, OS-specific "main" will invoke "KMain" as
- *  platform independent main entrypoint.
- *
- *  "argc" [ IN ] - the number of textual parameters in "argv"
- *  should never be < 0, but has been left as a signed int
- *  for reasons of tradition.
- *
- *  "argv" [ IN ] - array of NUL terminated strings expected
- *  to be in the shell-native character set: ASCII or UTF-8
- *  element 0 is expected to be executable identity or path.
- */
-rc_t CC KMain ( int argc, char *argv [] );
-
-
-/* Usage - EXTERN
- *  This function is called when the command line argument
- *  handling sees -? -h or --help
- */
-rc_t CC Usage ( struct Args const * args );
-
-
-/* Version - EXTERN
- *  Obsolete: formerly called when the command line option handler
- *  saw -V or --version
- */
-rc_t CC Version ( struct Args const * args );
-
-
-/* Usage - EXTERN
- *  This function is called to check if enviroments meets tool needs
- *  Pass 0 to requireRamSize if you don't need to check for RAM size
- */
-rc_t CC KAppCheckEnvironment ( bool require64Bits, uint64_t requireRamSize );
-
-
-/* AsciiToXXX
- *  replacement for atoi
- *  converts NUL terminated string in "arg" to integer
- *  invokes error handler if there is a format error in string
- *
- *  "arg" [ IN ] - NUL terminated textual representation of integer
- *  obeys standard conversion rules:
- *    starts with "0x" or "0X" - interpret as hex
- *    starts with '0' - interpret as octal
- *    otherwise - interpret as decimal
- *
- *  "handler_error" [ IN, NULL OKAY ] and "data" [ IN, OPAQUE ] -
- *  optional callback function to handle case where "arg" could not
- *  be processed in its entirety. default behavior is to log error
- *  using "logerr" and invoke "exit".
- */
-int32_t CC AsciiToI32 ( const char *arg,
-    void ( CC * handle_error ) ( const char *arg, void *data ), void *data );
-uint32_t CC AsciiToU32 ( const char *arg,
-    void ( CC * handle_error ) ( const char *arg, void *data ), void *data );
-int64_t CC AsciiToI64 ( const char *arg,
-    void ( CC * handle_error ) ( const char *arg, void *data ), void *data );
-uint64_t CC AsciiToU64 ( const char *arg,
-    void ( CC * handle_error ) ( const char *arg, void *data ), void *data );
-
-
-/* NextLogLevel
- * NextLogLevelh
- *  these match NextArg and NextArgh but take the parameter and use it
- *  to set the Log Level.
- *
- * legal values for the parameter are:
- * 1. a sequence of + or - characters that each bump the current log level
- *    up or down one.
- * 2. an integer with a decimal value from 0 to 13 (octal and hex with the 
- *    same range are accepted.
- * 3. fatal, err, warn, info, debug1, debug3, debug3, debug4, debug5, debug6
- *    debug7, debug8, debug9, debug10
- */
-void CC NextLogLevel ( const char **argp, int *ip, int argc, char *argv [],
-    const char* ( CC * handle_null ) ( void *data ), void *data );
-void CC NextLogLevelh ( int *ip, int argc, char *argv [],
-    const char* ( CC * handle_null ) ( void *data ), void *data );
-
-#define LogLevelSet( S ) \
-    NextLogLevelCommon ( S )
-
-rc_t CC NextLogLevelCommon ( const char * level_parameter );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kapp_main_ */
diff --git a/interfaces/kapp/progressbar.h b/interfaces/kapp/progressbar.h
deleted file mode 100644
index 07d1555..0000000
--- a/interfaces/kapp/progressbar.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_kapp_progressbar_
-#define _h_kapp_progressbar_
-
-#ifndef _h_kapp_extern_
-#include <kapp/extern.h>
-#endif
-
-#ifndef _h_klib_log_
-#include <klib/log.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KFile;
-struct KDirectory;
-
-typedef struct KLoadProgressbar KLoadProgressbar;
-
-/**
-   Create new object in job
- */
-KAPP_EXTERN rc_t CC KLoadProgressbar_Make(const KLoadProgressbar** cself, uint64_t size);
-/**
-   if dir is NULL current directory assumed
- */
-KAPP_EXTERN rc_t CC KLoadProgressbar_File(const KLoadProgressbar** cself, const char* filename, struct KDirectory const* dir);
-KAPP_EXTERN rc_t CC KLoadProgressbar_KFile(const KLoadProgressbar** cself, struct KFile const* file);
-
-/**
-  Release job object
-  if exclude than job stats excluded from reports
-  */
-KAPP_EXTERN void CC KLoadProgressbar_Release(const KLoadProgressbar* cself, bool exclude);
-
-/**
-    Add a chunk of smth (bytes, rows, etc) to the job
- */
-KAPP_EXTERN rc_t CC KLoadProgressbar_Append(const KLoadProgressbar* cself, uint64_t chunk);
-
-
-/* Set severity level name
-   severity [IN] - default 'status'
- */
-KAPP_EXTERN rc_t CC KLoadProgressbar_Severity(const char* severity);
-
-/* mark a chunk of bytes as processed
-   report on full percent processed or if forced
- */
-KAPP_EXTERN rc_t CC KLoadProgressbar_Process(const KLoadProgressbar* cself, uint64_t chunk, bool force_report);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kapp_progressbar_ */
diff --git a/interfaces/kapp/queue-file.h b/interfaces/kapp/queue-file.h
deleted file mode 100644
index 79fa890..0000000
--- a/interfaces/kapp/queue-file.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_kapp_queue_file_
-#define _h_kapp_queue_file_
-
-#ifndef _h_kapp_extern_
-#include <kapp/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KQueueFile
- *  an extension to KFile that runs on a background thread
- */
-struct KFile;
-
-
-/* MakeRead
- *  make a queue file for reading-ahead on background thread
- *
- *  when the file is created, a background thread is started
- *  that begins reading from "src" at position "pos", into
- *  buffers of size "buffer_size". each buffer is pushed into
- *  a cross-thread queue where it is consumed by the reading
- *  thread.
- *
- *  the background thread is throttled by queue capacity - determined
- *  by "queue_bytes" and "block_size", such that if the queue is full,
- *  the thread will sleep. the consumer thread is also throttled by the
- *  queue in that it will sleep if the queue is empty with pending data.
- *
- *  the background thread will exit upon reaching end of file,
- *  upon a permanent error, or if the queue is sealed by the consumer
- *  thread.
- *
- *  when the file is collected in response to a release message,
- *  the queue will be sealed against further inserts, pending buffers
- *  will be discarded, the background thread will be joined, and
- *  the source file will be released.
- *
- *  the intended usage is serial reading of the file. reads
- *  may only progress forward, i.e. backing up is not permitted.
- *
- *  "qf" [ OUT ] - return parameter for queue file
- *
- *  "pos" [ IN ] - starting position for reads from "src".
- *  NB - "src" must support being addressed at this position.
- *
- *  "src" [ IN ] - source file for read-ahead on background thread.
- *  must have read permissions.
- *
- *  "queue_bytes" [ IN ] - the read-ahead limit of the background
- *  thread, in bytes. this is the amount of data that will be queued
- *  for the consumer thread before the bg thread sleeps.
- *
- *  "block_size" [ IN, DEFAULT ZERO ] - optional parameter giving
- *  desired block size when reading from "src". this may be used
- *  to tune reading for source data, e.g. 64K blocks for gzip.
- *
- *  "timeout_ms" [ IN, DEFAULT ZERO ] - optional parameter specifying the period of time (in ms)
- *  at which the background thread will check whether it is to quit (e.g. the foregrount thread has sealed the buffer),
- *  when the queue cannot be written into.  If 0 specified, the timeout is set to 150 ms.
- */
-KAPP_EXTERN rc_t CC KQueueFileMakeRead ( struct KFile const **qf, uint64_t pos,
-    struct KFile const *src, size_t queue_bytes, size_t block_size, uint32_t timeout_ms );
-
-
-/* MakeWrite
- *  make a queue file for writing-behind on background thread
- *
- *  when the file is created, a background thread is started that
- *  waits for buffers to appear in the cross-thread queue. as the producer
- *  thread writes, data are accumulated into buffers which are pushed
- *  into the queue as they fill, and written in turn on the bg thread.
- *
- *  the producer thread is throttled by queue capacity - determined by
- *  "queue_bytes" and "block_size", such that if the queue is full,
- *  the thread will sleep. the background thread is also throttled by
- *  the queue in that it will sleep if the queue is empty with pending
- *  data.
- *
- *  the background thread will exit upon a permanent error, or if the
- *  queue is sealed by the producer thread.
- *
- *  when the file is collected in response to a release message,
- *  the queue will be sealed against further inserts, pending buffers
- *  will be written, the background thread will be joined, and
- *  the source file will be released.
- *
- *  the intended usage is serial writing of the file. random writes
- *  will be accepted, but may reduce the queue efficiency.
- *
- *  "qf" [ OUT ] - return parameter for queue file
- *
- *  "dst" [ IN ] - destination file for write-behind on background thread.
- *  must have write permissions.
- *
- *  "queue_bytes" [ IN ] - the write-behind limit of the producer
- *  thread, in bytes. this is the amount of data that will be queued
- *  for the background thread before the producer thread sleeps.
- *
- *  "block_size" [ IN, DEFAULT ZERO ] - optional parameter giving
- *  desired block size when writing to "dst". this may be used
- *  to tune writing for source data, e.g. 64K blocks for gzip.
- *
- *  "timeout_ms" [ IN, DEFAULT ZERO ] - optional parameter specifying the period of time (in ms)
- *  at which the background thread will check whether it is to quit (e.g. the foregrount thread has sealed the buffer),
- *  when the queue cannot be read from.  If 0 specified, the timeout is set to 150 ms.
- */
-KAPP_EXTERN rc_t CC KQueueFileMakeWrite ( struct KFile **qf,
-    struct KFile *dst, size_t queue_bytes, size_t block_size, uint32_t timeout_ms );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kapp_queue_file_ */
diff --git a/interfaces/kdb/btree.h b/interfaces/kdb/btree.h
deleted file mode 100644
index 1639126..0000000
--- a/interfaces/kdb/btree.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kdb_btree_
-#define _h_kdb_btree_
-
-#ifndef _h_kdb_extern_
-#include <kdb/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * defines
- */
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-
-/*--------------------------------------------------------------------------
- * KBTree
- *  this implementation is an extremely simplified structure
- *  meant to provide the ability to create an index for temporary use
- */
-typedef struct KBTree KBTree;
-
-
-/* MakeRead
- * MakeUpdate
- *  make a b-tree object backed by supplied KFile
- *
- *  "backing" [ IN ] - open file with appropriate permissions:
- *   read is required in all cases, and write is required for update.
- *   NB - a reference will be attached to this file.
- *
- *  "climit" [ IN ] - cache limit in bytes. the internal cache will
- *   retain UP TO ( but not exceeding ) the limit specified. a value
- *   of 0 ( zero ) will disable caching.
- *
- *  "write_through" [ IN ] - if true, causes flushing of modified page
- *   after its value is released
- *
- *  "type" [ IN ] - describes the key type ( see above )
- *
- *  "key_chunk_size" [ IN ] - the "chunking" ( alignment ) factor for
- *   storing keys, rounded up to the nearest power of 2.
- *
- *  "value_chunk_size" [ IN ] - chunking factor for values
- *   ( see "key_chunk_size" )
- *
- *  "min_key_size" [ IN ] and "max_key_size" [ IN ] - specifies the allowed
- *   opaque key sizes. min == max implies fixed size. ignored for well
- *   known fixed size key types.
- *
- *  "id_size" [ IN ] - size of id in bytes, from 1 to 8.
- *
- *  "min_value_size" [ IN ] and "max_value_size" [ IN ] - specifies the allowed
- *   value sizes. min == max implies fixed size.
- *
- *  "cmp" [ IN, NULL OKAY ] - optional comparison callback function for opaque keys.
- *   specific key types will use internal comparison functions. for opaque keys, a
- *   NULL function pointer will cause ordering by size and binary comparison.
- */
-KDB_EXTERN rc_t CC KBTreeMakeRead_1 ( const KBTree **bt,
-                                     struct KFile const *backing, size_t climit);
-
-KDB_EXTERN rc_t CC KBTreeMakeUpdate_1 ( KBTree **bt, struct KFile *backing,
-    size_t climit );
-
-#define KBTreeMakeRead(PBT, BACK, CLIM, CMP) KBTreeMakeRead_1(PBT, BACK, CLIM)
-
-#define KBTreeMakeUpdate(PBT, BACK, CLIM, WT, T, MIN_KS, MAX_KS, ID_SIZE, CMP) \
-    KBTreeMakeUpdate_1(PBT, BACK, CLIM)
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KDB_EXTERN rc_t CC KBTreeAddRef ( const KBTree *self );
-KDB_EXTERN rc_t CC KBTreeRelease ( const KBTree *self );
-
-
-/* DropBacking
- *  used immediately prior to releasing
- *  prevents modified pages from being flushed to disk
- *  renders object nearly useless
- */
-KDB_EXTERN rc_t CC KBTreeDropBacking ( KBTree *self );
-
-
-/* Size
- *  returns size in bytes of file and cache
- *
- *  "lsize" [ OUT, NULL OKAY ] - return parameter for logical size
- *
- *  "fsize" [ OUT, NULL OKAY ] - return parameter for file size
- *
- *  "csize" [ OUT, NULL OKAY ] - return parameter for cache size
- */
-KDB_EXTERN rc_t CC KBTreeSize ( const KBTree *self,
-    uint64_t *lsize, uint64_t *fsize, size_t *csize );
-
-
-/* Find
- *  searches for a match
- *
- *  "val" [ OUT ] - return parameter for value found
- *   accessed via KBTreeValueAccess* described above
- *   must be balanced with a call to KBTreeValueWhack.
- *
- *  "key" [ IN ] and "key_size" [ IN ] - describes an
- *   opaque key
- */
-KDB_EXTERN rc_t CC KBTreeFind ( const KBTree *self, uint64_t *id,
-    const void *key, size_t key_size );
-
-
-/* Entry
- *  searches for a match or creates a new entry
- *
- *  "val" [ OUT ] - return parameter for value found
- *   accessed via KBTreeValueAccess* described above
- *   must be balanced with a call to KBTreeValueWhack.
- *
- *  "was_inserted" [ OUT ] - if true, the returned value was the result of an
- *   insertion and can be guaranteed to be all 0 bits. otherwise, the returned
- *   value will be whatever was there previously.
- *
- *  "alloc_size" [ IN ] - the number of value bytes to allocate upon insertion,
- *   i.e. if the key was not found. this value must agree with the limits
- *   specified in Make ( see above ).
- *
- *  "key" [ IN ] and "key_size" [ IN ] - describes an
- *   opaque key
- */
-KDB_EXTERN rc_t CC KBTreeEntry ( KBTree *self, uint64_t *id,
-    bool *was_inserted, const void *key, size_t key_size );
-
-
-/* ForEach
- *  executes a function on each tree element
- *
- *  "reverse" [ IN ] - if true, iterate in reverse order
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - callback function
- */
-KDB_EXTERN rc_t CC KBTreeForEach ( const KBTree *self, bool reverse,
-    void ( CC * f ) ( const void *key, size_t key_size, uint32_t id, void *data ), void *data );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_kdb_btree_ */
diff --git a/interfaces/kdb/column.h b/interfaces/kdb/column.h
deleted file mode 100644
index 9797bec..0000000
--- a/interfaces/kdb/column.h
+++ /dev/null
@@ -1,360 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kdb_column_
-#define _h_kdb_column_
-
-#ifndef _h_kdb_extern_
-#include <kdb/extern.h>
-#endif
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KTable;
-struct KDBManager;
-struct KDataBuffer;
-
-
-/*--------------------------------------------------------------------------
- * KChecksum
- *  describes blob checksum
- */
-typedef uint8_t KChecksum;
-enum
-{
-    kcsNone,
-    kcsCRC32,
-    kcsMD5
-};
-
-
-/*--------------------------------------------------------------------------
- * KColumn
- *  a collection of blobs indexed by oid
- */
-typedef struct KColumn KColumn;
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-KDB_EXTERN rc_t CC KColumnAddRef ( const KColumn *self );
-KDB_EXTERN rc_t CC KColumnRelease ( const KColumn *self );
-
-
-/* CreateColumn
- * VCreateColumn
- *  create a new or open an existing column
- *
- *  "col" [ OUT ] - return parameter for newly opened column
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "checksum" [ IN ] - the type of checksum information to
- *  apply when writing blobs
- *
- *  "pgsize" [ IN, DEFAULT ZERO ] - size of internal column "pages"
- *  the default value is indicated by 0 ( zero ).
- *  NB - CURRENTLY THE ONLY SUPPORTED PAGE SIZE IS 1 ( ONE ) BYTE.
- *
- *  "path" [ IN ] - NUL terminated string in UTF-8 giving path to col
- *  where "." acts as a structure name separator, i.e. struct.member
- */
-KDB_EXTERN rc_t CC KDBManagerCreateColumn ( struct KDBManager *self,
-    KColumn **col, KCreateMode cmode, KChecksum checksum,
-    size_t pgsize, const char *path, ... );
-KDB_EXTERN rc_t CC KTableCreateColumn ( struct KTable *self,
-    KColumn **col, KCreateMode cmode, KChecksum checksum,
-    size_t pgsize, const char *path, ... );
-
-KDB_EXTERN rc_t CC KDBManagerVCreateColumn ( struct KDBManager *self,
-    KColumn **col, KCreateMode cmode, KChecksum checksum,
-    size_t pgsize, const char *path, va_list args );
-KDB_EXTERN rc_t CC KTableVCreateColumn ( struct KTable *self,
-    KColumn **col, KCreateMode cmode, KChecksum checksum,
-    size_t pgsize, const char *path, va_list args );
-
-
-/* OpenColumnRead
- * VOpenColumnRead
- *  open a column for read
- *
- *  "col" [ OUT ] - return parameter for newly opened column
- *
- *  "path" [ IN ] - NUL terminated string in UTF-8 giving path to col
- *  where "." acts as a structure name separator, i.e. struct.member
- */
-KDB_EXTERN rc_t CC KDBManagerOpenColumnRead ( struct KDBManager const *self,
-    const KColumn **col, const char *path, ... );
-KDB_EXTERN rc_t CC KTableOpenColumnRead ( struct KTable const *self,
-    const KColumn **col, const char *path, ... );
-
-KDB_EXTERN rc_t CC KDBManagerVOpenColumnRead ( struct KDBManager const *self,
-    const KColumn **col, const char *path, va_list args );
-KDB_EXTERN rc_t CC KTableVOpenColumnRead ( struct KTable const *self,
-    const KColumn **col, const char *path, va_list args );
-
-
-/* OpenColumnUpdate
- * VOpenColumnUpdate
- *  open a column for read/write
- *
- *  "col" [ OUT ] - return parameter for newly opened column
- *
- *  "path" [ IN ] - NUL terminated string in UTF-8 giving path to col
- *  where "." acts as a structure name separator, i.e. struct.member
- */
-KDB_EXTERN rc_t CC KDBManagerOpenColumnUpdate ( struct KDBManager *self,
-    KColumn **col, const char *path, ... );
-KDB_EXTERN rc_t CC KTableOpenColumnUpdate ( struct KTable *self,
-    KColumn **col, const char *path, ... );
-
-KDB_EXTERN rc_t CC KDBManagerVOpenColumnUpdate ( struct KDBManager *self,
-    KColumn **col, const char *path, va_list args );
-KDB_EXTERN rc_t CC KTableVOpenColumnUpdate ( struct KTable *self,
-    KColumn **col, const char *path, va_list args );
-
-
-/* Locked
- *  returns true if locked
- */
-KDB_EXTERN bool CC KColumnLocked ( const KColumn *self );
-
-
-/* Version
- *  returns the format version
- */
-KDB_EXTERN rc_t CC KColumnVersion ( const KColumn *self, uint32_t *version );
-
-
-/* ByteOrder
- *  indicates whether original byte order is reversed
- *  under current architecture.
- *
- *  the byte order of the column is established by
- *  the host architecture when created.
- *
- *  "reversed" [ OUT ] - if true, the original byte
- *  order is reversed with regard to host native byte order.
- */
-KDB_EXTERN rc_t CC KColumnByteOrder ( const KColumn *self, bool *reversed );
-
-
-/* IdRange
- *  returns id range for column
- *
- *  "first" [ OUT ] - first id in column
- *
- *  "count" [ OUT ] - number of ids represented by this column
- */
-KDB_EXTERN rc_t CC KColumnIdRange ( const KColumn *self, int64_t *first, uint64_t *count );
-
-
-/* FindFirstRowId
- *  locates the first valid row-id starting from a given id.
- *  this will be either the start id provided, or
- *  the first row from the next blob, if available.
- *
- *  "found" [ OUT ] - will contain the value of "start" if this is contained within a blob,
- *  or the first row-id of the next blob after "start", if any.
- *
- *  "start" [ IN ] - starting row-id in search, inclusive. if this id is valid,
- *  it will be returned in "found"
- *
- *  returns 0 if id is found, rcNotFound if no more data were available.
- *  may return other codes upon error.
- */
-KDB_EXTERN rc_t CC KColumnFindFirstRowId ( const KColumn * self, int64_t * found, int64_t start );
-
-
-/* Reindex
- *  optimize indices
- */
-KDB_EXTERN rc_t CC KColumnReindex ( KColumn *self );
-
-
-/* CommitFreq
- * SetCommitFreq
- *  manage frequency of commits
- */
-KDB_EXTERN rc_t CC KColumnCommitFreq ( KColumn *self, uint32_t *freq );
-KDB_EXTERN rc_t CC KColumnSetCommitFreq ( KColumn *self, uint32_t freq );
-
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-KDB_EXTERN rc_t CC KColumnOpenManagerRead ( const KColumn *self, struct KDBManager const **mgr );
-KDB_EXTERN rc_t CC KColumnOpenManagerUpdate ( KColumn *self, struct KDBManager **mgr );
-
-
-/* OpenParent
- *  duplicate reference to parent table
- *  NB - returned reference must be released
- */
-KDB_EXTERN rc_t CC KColumnOpenParentRead ( const KColumn *self, struct KTable const **tbl );
-KDB_EXTERN rc_t CC KColumnOpenParentUpdate ( KColumn *self, struct KTable **tbl );
-
-
-/*--------------------------------------------------------------------------
- * KColumnBlobCSData
- *  checksum data
- *
- *  current version: 1
- *
- *  current checksum methods: CRC32, MD5
- */
-typedef union KColumnBlobCSData KColumnBlobCSData;
-union KColumnBlobCSData
-{
-    uint32_t crc32;
-    uint8_t md5_digest [ 16 ];
-};
-
-
-/*--------------------------------------------------------------------------
- * KColumnBlob
- *  one or more rows of column data
- */
-typedef struct KColumnBlob KColumnBlob;
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-KDB_EXTERN rc_t CC KColumnBlobAddRef ( const KColumnBlob *self );
-KDB_EXTERN rc_t CC KColumnBlobRelease ( const KColumnBlob *self );
-
-
-/* CreateBlob
- *  creates a new, unassigned blob
- */
-KDB_EXTERN rc_t CC KColumnCreateBlob ( KColumn *self, KColumnBlob **blob );
-
-
-/* OpenBlobRead
- * OpenBlobUpdate
- *  opens an existing blob containing row data for id
- */
-KDB_EXTERN rc_t CC KColumnOpenBlobRead ( const KColumn *self, const KColumnBlob **blob, int64_t id );
-KDB_EXTERN rc_t CC KColumnOpenBlobUpdate ( KColumn *self, KColumnBlob **blob, int64_t id );
-
-
-/* Read
- *  read data from blob
- *
- *  "offset" [ IN ] - starting offset into blob
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - number of bytes actually read
- *
- *  "remaining" [ OUT, NULL OKAY ] - optional return parameter for
- *  the number of bytes remaining to be read. specifically,
- *  "offset" + "num_read" + "remaining" == sizeof blob
- */
-KDB_EXTERN rc_t CC KColumnBlobRead ( const KColumnBlob *self,
-    size_t offset, void *buffer, size_t bsize,
-    size_t *num_read, size_t *remaining );
-
-/* ReadAll
- *  read entire blob, plus any auxiliary checksum data
- *
- *  "buffer" [ OUT ] - pointer to a KDataBuffer structure that will be initialized
- *  and resized to contain the entire blob. upon success, will contain the number of bytes
- *  in buffer->elem_count and buffer->elem_bits == 8.
- *
- *  "opt_cs_data [ OUT, NULL OKAY ] - optional output parameter for checksum data
- *  associated with the blob in "buffer", if any exist.
- *
- *  "cs_data_size" [ IN ] - sizeof of * opt_cs_data if not NULL, 0 otherwise
- */
-KDB_EXTERN rc_t CC KColumnBlobReadAll ( const KColumnBlob * self, struct KDataBuffer * buffer,
-    KColumnBlobCSData * opt_cs_data, size_t cs_data_size );
-
-/* Append
- *  append data to open blob
- *
- *  "buffer" [ IN ] and "size" [ IN ] - blob data
- */
-KDB_EXTERN rc_t CC KColumnBlobAppend ( KColumnBlob *self, const void *buffer, size_t size );
-
-
-/* Validate
- *  runs checksum validation on unmodified blob
- */
-KDB_EXTERN rc_t CC KColumnBlobValidate ( const KColumnBlob *self );
-
-/* ValidateBuffer
- *  run checksum validation on buffer data
- *
- *  "buffer" [ IN ] - returned blob buffer from ReadAll
- *
- *  "cs_data" [ IN ] and "cs_data_size" [ IN ] - returned checksum data from ReadAll
- */
-KDB_EXTERN rc_t CC KColumnBlobValidateBuffer ( const KColumnBlob * self,
-    struct KDataBuffer const * buffer, const KColumnBlobCSData * cs_data, size_t cs_data_size );
-
-
-/* IdRange
- * AssignRange
- *  access id range for blob
- *
- *  "first" [ OUT ] and  "count" [ OUT ] - return parameters for IdRange
-
- *  "first" [ IN ] and "count" [ IN ] - range parameters for assign
- */
-KDB_EXTERN rc_t CC KColumnBlobIdRange ( const KColumnBlob *self, int64_t *first, uint32_t *count );
-KDB_EXTERN rc_t CC KColumnBlobAssignRange ( KColumnBlob *self, int64_t first, uint32_t count );
-
-
-/* Commit
- *  commit changes to blob
- *  close to further updates
- */
-KDB_EXTERN rc_t CC KColumnBlobCommit ( KColumnBlob *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_kdb_column_ */
diff --git a/interfaces/kdb/consistency-check.h b/interfaces/kdb/consistency-check.h
deleted file mode 100644
index 18444e4..0000000
--- a/interfaces/kdb/consistency-check.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- *============================================================================
- *
- */
-
-#ifndef _h_kdb_consistency_check_
-#define _h_kdb_consistency_check_
-
-#ifndef _h_kdb_extern_
-#include <kdb/extern.h>
-#endif
-
-#ifndef _h_insdc_sra_
-#include <insdc/sra.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-    
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDatabase;
-struct KTable;
-struct KColumn;
-
-
-/*--------------------------------------------------------------------------
- * CCReportTypes
- */
-enum
-{
-    ccrpt_Done,
-    ccrpt_MD5,
-    ccrpt_Blob,
-    ccrpt_Index,
-    ccrpt_Visit
-};
-
-
-/*--------------------------------------------------------------------------
- * CCReportInfoBlock
- */
-typedef struct CCReportInfoBlock CCReportInfoBlock;
-struct CCReportInfoBlock
-{
-    const char *objName;
-    uint32_t objId;
-    uint32_t objType;
-    uint32_t type;
-
-    union
-    {
-        struct /* ccrb_done_s */
-        {
-            const char *mesg;
-            rc_t rc;
-        } done;
-
-        struct ccrb_md5_s
-        {
-            const char *file;
-            rc_t rc;
-        } MD5;
-
-        struct ccrb_blob_s
-        {
-            uint64_t start;
-            uint64_t count;
-
-        } blob;
-
-        struct ccrb_index_s
-        {
-            int64_t start_id;
-            uint64_t id_range;
-            uint64_t num_keys;
-            uint64_t num_rows;
-            uint64_t num_holes;
-
-        } index;
-        
-        struct ccrb_visit_s {
-            unsigned depth;
-        } visit;
-    } info;
-};
-
-typedef rc_t ( CC *CCReportFunc ) ( const CCReportInfoBlock *info, void *data );
-
-/* a flag for level parameter */
-#define CC_INDEX_ONLY 0x80000000
-
-/*--------------------------------------------------------------------------
- * KDatabase
- */
-KDB_EXTERN rc_t CC KDatabaseConsistencyCheck ( struct KDatabase const *self,
-    uint32_t depth, uint32_t level, CCReportFunc report, void *data );
-
-
-/*--------------------------------------------------------------------------
- * KTable
- */
-KDB_EXTERN rc_t CC KTableConsistencyCheck ( struct KTable const *self,
-    uint32_t depth, uint32_t level, CCReportFunc report, void *data,
-    INSDC_SRA_platform_id platform);
-
-
-/*--------------------------------------------------------------------------
- * KColumn
- */
-KDB_EXTERN rc_t CC KColumnConsistencyCheck ( struct KColumn const *self,
-    uint32_t level, CCReportInfoBlock *info, CCReportFunc report, void *data );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kdb_consistency_check_ */
diff --git a/interfaces/kdb/database.h b/interfaces/kdb/database.h
deleted file mode 100644
index d1f07ce..0000000
--- a/interfaces/kdb/database.h
+++ /dev/null
@@ -1,278 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kdb_database_
-#define _h_kdb_database_
-
-#ifndef _h_kdb_extern_
-#include <kdb/extern.h>
-#endif
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#include <kdb/column.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDBManager;
-
-
-/*--------------------------------------------------------------------------
- * KDatabase
- *  opaque connection to a database within file system
- */
-typedef struct KDatabase KDatabase;
-
-KCreateMode KDatabaseGetCmode ( const KDatabase *self);
-KCreateMode KDatabaseSetCmode ( KDatabase *self, KCreateMode new_val);
-
-KChecksum KDatabaseGetChecksum ( const KDatabase *self);
-KChecksum KDatabaseSetChecksum ( KDatabase *self, KChecksum new_val);
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-KDB_EXTERN rc_t CC KDatabaseAddRef ( const KDatabase *self );
-KDB_EXTERN rc_t CC KDatabaseRelease ( const KDatabase *self );
-
-
-/* CreateDB
- * VCreateDB
- *  create a new or open an existing database
- *
- *  "db" [ OUT ] - return parameter for newly opened database
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to database
- */
-KDB_EXTERN rc_t CC KDBManagerCreateDB ( struct KDBManager *self,
-    KDatabase **db, KCreateMode cmode, const char *path, ... );
-KDB_EXTERN rc_t CC KDatabaseCreateDB ( KDatabase *self,
-    KDatabase **db, KCreateMode cmode, const char *name, ... );
-
-KDB_EXTERN rc_t CC KDBManagerVCreateDB ( struct KDBManager *self,
-    KDatabase **db, KCreateMode cmode, const char *path, va_list args );
-KDB_EXTERN rc_t CC KDatabaseVCreateDB ( KDatabase *self,
-    KDatabase **db, KCreateMode cmode, const char *name, va_list args );
-
-
-/* OpenDBRead
- * VOpenDBRead
- *  open a database for read
- *
- *  "db" [ OUT ] - return parameter for newly opened database
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to database
- */
-KDB_EXTERN rc_t CC KDBManagerOpenDBRead ( struct KDBManager const *self,
-    const KDatabase **db, const char *path, ... );
-KDB_EXTERN rc_t CC KDatabaseOpenDBRead ( const KDatabase *self,
-    const KDatabase **db, const char *name, ... );
-
-KDB_EXTERN rc_t CC KDBManagerVOpenDBRead ( struct KDBManager const *self,
-    const KDatabase **db, const char *path, va_list args );
-KDB_EXTERN rc_t CC KDatabaseVOpenDBRead ( const KDatabase *self,
-    const KDatabase **db, const char *name, va_list args );
-
-
-/* OpenDBUpdate
- * VOpenDBUpdate
- *  open a database for read/write
- *
- *  "db" [ OUT ] - return parameter for newly opened database
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to database
- */
-KDB_EXTERN rc_t CC KDBManagerOpenDBUpdate ( struct KDBManager *self,
-    KDatabase **db, const char *path, ... );
-KDB_EXTERN rc_t CC KDatabaseOpenDBUpdate ( KDatabase *self,
-    KDatabase **db, const char *name, ... );
-
-KDB_EXTERN rc_t CC KDBManagerVOpenDBUpdate ( struct KDBManager *self,
-    KDatabase **db, const char *path, va_list args );
-KDB_EXTERN rc_t CC KDatabaseVOpenDBUpdate ( KDatabase *self,
-    KDatabase **db, const char *name, va_list args );
-
-
-/* Locked
- *  returns true if locked
- */
-KDB_EXTERN bool CC KDatabaseLocked ( const KDatabase *self );
-
-
-/* Exists
- *  returns true if requested object exists
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "name" [ IN ] - NUL terminated object name
- */
-KDB_EXTERN bool CC KDatabaseExists ( const KDatabase *self, uint32_t type,
-    const char *name, ... );
-KDB_EXTERN bool CC KDatabaseVExists ( const KDatabase *self, uint32_t type,
-    const char *name, va_list args );
-
-/* IsAlias
- *  returns true if object name is an alias
- *  returns path to fundamental name if it was aliased
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - optional output buffer
- *  for fundamenta object name if "alias" is not a fundamental name, 
- *
- *  "name" [ IN ] - NUL terminated object name
- */
-KDB_EXTERN bool CC KDatabaseIsAlias ( const KDatabase *self, uint32_t type,
-    char *resolved, size_t rsize, const char *name );
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-KDB_EXTERN rc_t CC KDatabaseWritable ( const KDatabase *self, uint32_t type,
-    const char *name, ... );
-KDB_EXTERN rc_t CC KDatabaseVWritable ( const KDatabase *self, uint32_t type,
-    const char *name, va_list args );
-
-/* Lock
- *  apply lock
- *
- *  if object is already locked, the operation is idempotent
- *  and returns an rc state of rcLocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-KDB_EXTERN rc_t CC KDatabaseLock ( KDatabase *self, uint32_t type,
-    const char *name, ... );
-KDB_EXTERN rc_t CC KDatabaseVLock ( KDatabase *self, uint32_t type,
-    const char *name, va_list args );
-
-/* Unlock
- *  remove lock
- *
- *  if object is already unlocked, the operation is idempotent
- *  and returns an rc state of rcUnlocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-KDB_EXTERN rc_t CC KDatabaseUnlock ( KDatabase *self, uint32_t type,
-    const char *name, ... );
-KDB_EXTERN rc_t CC KDatabaseVUnlock ( KDatabase *self, uint32_t type,
-    const char *name, va_list args );
-
-
-/* Rename
- *  renames a contained object
- *
- *  "from" [ IN ] - NUL terminated string in UTF-8
- *  giving name of contained object
- *
- *  "to" [ IN ] - NUL terminated string in UTF-8
- *  giving new name
- */
-KDB_EXTERN rc_t CC KDatabaseRenameDB ( KDatabase *self, bool force, const char *from, const char *to );
-KDB_EXTERN rc_t CC KDatabaseRenameTable ( KDatabase *self, bool force, const char *from, const char *to );
-KDB_EXTERN rc_t CC KDatabaseRenameIndex ( KDatabase *self, bool force, const char *from, const char *to );
-
-
-/* Alias
- *  create an alias to an existing contained object
- *
- *  "obj" [ IN ] - NUL terminated string in UTF-8
- *  giving name of contained object
- *
- *  "alias" [ IN ] - NUL terminated string in UTF-8
- *  giving aliased name
- */
-KDB_EXTERN rc_t CC KDatabaseAliasDB ( KDatabase *self, const char *obj, const char *alias );
-KDB_EXTERN rc_t CC KDatabaseAliasTable ( KDatabase *self, const char *obj, const char *alias );
-KDB_EXTERN rc_t CC KDatabaseAliasIndex ( KDatabase *self, const char *obj, const char *alias );
-
-
-/* Drop
- *  drop a contained object
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving name of db
- */
-KDB_EXTERN rc_t CC KDatabaseDropDB ( KDatabase *self, const char *name, ... );
-KDB_EXTERN rc_t CC KDatabaseDropTable ( KDatabase *self, const char *name, ... );
-KDB_EXTERN rc_t CC KDatabaseDropIndex ( KDatabase *self, const char *name, ... );
-
-KDB_EXTERN rc_t CC KDatabaseVDropDB ( KDatabase *self, const char *name, va_list args );
-KDB_EXTERN rc_t CC KDatabaseVDropTable ( KDatabase *self, const char *name, va_list args );
-KDB_EXTERN rc_t CC KDatabaseVDropIndex ( KDatabase *self, const char *name, va_list args );
-
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-KDB_EXTERN rc_t CC KDatabaseOpenManagerRead ( const KDatabase *self, struct KDBManager const **mgr );
-KDB_EXTERN rc_t CC KDatabaseOpenManagerUpdate ( KDatabase *self, struct KDBManager **mgr );
-
-
-/* OpenParent
- *  duplicate reference to parent database
- *  NB - returned reference must be released
- */
-KDB_EXTERN rc_t CC KDatabaseOpenParentRead ( const KDatabase *self, const KDatabase **par );
-KDB_EXTERN rc_t CC KDatabaseOpenParentUpdate ( KDatabase *self, KDatabase **par );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kdb_database_ */
diff --git a/interfaces/kdb/extern.h b/interfaces/kdb/extern.h
deleted file mode 100644
index 2f8e0d0..0000000
--- a/interfaces/kdb/extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kdb_extern_
-#define _h_kdb_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define KDB_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define KDB_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_kdb_extern_ */
diff --git a/interfaces/kdb/index.h b/interfaces/kdb/index.h
deleted file mode 100644
index 3a36bc3..0000000
--- a/interfaces/kdb/index.h
+++ /dev/null
@@ -1,309 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kdb_index_
-#define _h_kdb_index_
-
-#ifndef _h_kdb_extern_
-#include <kdb/extern.h>
-#endif
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KTable;
-struct PBSTNode;
-struct KDatabase;
-
-
-/*--------------------------------------------------------------------------
- * KIdxType
- *  the type of index being dealt with
- */
-typedef uint8_t KIdxType;
-enum
-{
-    /* version 1 */
-
-    kitText,          /* text string => id */
-    kitU64,           /* uint64 (like file offset) to row id */
-
-    kitProj = 128     /* reverse index flag, row id => key */
-};
-
-
-/*--------------------------------------------------------------------------
- * KIndex
- *  an object capable of mapping an object to integer oid
- */
-typedef struct KIndex KIndex;
-
-
-/* Addref
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-KDB_EXTERN rc_t CC KIndexAddRef ( const KIndex *self );
-KDB_EXTERN rc_t CC KIndexRelease ( const KIndex *self );
-
-
-/* CreateIndex
- * VCreateIndex
- *  create a new or open an existing index
- *
- *  "idx" [ OUT ] - return parameter for newly opened index
- *
- *  "type" [ IN ] - type of index to create
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
- */
-KDB_EXTERN rc_t CC KDatabaseCreateIndex ( struct KDatabase *self, KIndex **idx,
-    KIdxType type, KCreateMode cmode, const char *name, ... );
-KDB_EXTERN rc_t CC KTableCreateIndex ( struct KTable *self, KIndex **idx,
-    KIdxType type, KCreateMode cmode, const char *name, ... );
-
-KDB_EXTERN rc_t CC KDatabaseVCreateIndex ( struct KDatabase *self, KIndex **idx,
-    KIdxType type, KCreateMode cmode, const char *name, va_list args );
-KDB_EXTERN rc_t CC KTableVCreateIndex ( struct KTable *self, KIndex **idx,
-    KIdxType type, KCreateMode cmode, const char *name, va_list args );
-
-
-/* OpenIndexRead
- * VOpenIndexRead
- *  open an index for read
- *
- *  "idx" [ OUT ] - return parameter for newly opened index
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
- */
-KDB_EXTERN rc_t CC KDatabaseOpenIndexRead ( struct KDatabase const *self,
-    const KIndex **idx, const char *name, ... );
-KDB_EXTERN rc_t CC KTableOpenIndexRead ( struct KTable const *self,
-    const KIndex **idx, const char *name, ... );
-
-KDB_EXTERN rc_t CC KDatabaseVOpenIndexRead ( struct KDatabase const *self,
-    const KIndex **idx, const char *name, va_list args );
-KDB_EXTERN rc_t CC KTableVOpenIndexRead ( struct KTable const *self,
-    const KIndex **idx, const char *name, va_list args );
-
-
-/* OpenIndexUpdate
- * VOpenIndexUpdate
- *  open an index for read/write
- *
- *  "idx" [ OUT ] - return parameter for newly opened index
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
- */
-
-KDB_EXTERN rc_t CC KDatabaseOpenIndexUpdate ( struct KDatabase *self,
-    KIndex **idx, const char *name, ... );
-KDB_EXTERN rc_t CC KTableOpenIndexUpdate ( struct KTable *self,
-    KIndex **idx, const char *name, ... );
-
-KDB_EXTERN rc_t CC KDatabaseVOpenIndexUpdate ( struct KDatabase *self,
-    KIndex **idx, const char *name, va_list args );
-KDB_EXTERN rc_t CC KTableVOpenIndexUpdate ( struct KTable *self,
-    KIndex **idx, const char *name, va_list args );
-
-
-/* Locked
- *  returns true if locked
- */
-KDB_EXTERN bool CC KIndexLocked ( const KIndex *self );
-
-
-/* Version
- *  returns the format version
- */
-KDB_EXTERN rc_t CC KIndexVersion ( const KIndex *self, uint32_t *version );
-
-
-/* Type
- *  returns the type of index
- */
-KDB_EXTERN rc_t CC KIndexType ( const KIndex *self, KIdxType *type );
-
-
-/* Commit
- *  ensure any changes are committed to disk
- */
-KDB_EXTERN rc_t CC KIndexCommit ( KIndex *self );
-
-
-/* CheckConsistency
- *  run a consistency check on the open index
- *
- *  "level" [ IN ] - a measure of rigor of the exercise:
- *    0 is the lightest
- *    1 will test all id mappings
- *    2 will perform key->id retrievals
- *    3 will perform id->key retrievals if a projection index exists
- *
- *  "start_id" [ OUT, NULL OKAY ] - returns the first id in index
- *
- *  "id_range" [ OUT, NULL OKAY ] - returns the range of ids from first to last
- *
- *  "num_keys" [ OUT, NULL OKAY ] - returns the number of key entries
- *
- *  "num_rows" [ OUT, NULL OKAY ] - returns the number of key->id mappings
- *
- *  "num_holes" [ OUT, NULL OKAY ] - returns the number of holes in the mapped id range
- */
-KDB_EXTERN rc_t CC KIndexConsistencyCheck ( const KIndex *self, uint32_t level,
-    int64_t *start_id, uint64_t *id_range, uint64_t *num_keys,
-    uint64_t *num_rows, uint64_t *num_holes );
-
-
-/* Insert
- *  creates a mapping from key to id
- *  and potentially from id to key if supported
- *
- *  "unique" [ IN ] - if true, key must be unique
- *
- *  "key" [ IN ] - NUL terminated string for text
- *
- *  "id" [ IN ] - id
- */
-KDB_EXTERN rc_t CC KIndexInsertText ( KIndex *self, bool unique,
-    const char *key, int64_t id );
-
-/* Delete
- *  deletes all mappings from key
- */
-KDB_EXTERN rc_t CC KIndexDeleteText ( KIndex *self, const char *key );
-
-/* Find
- *  finds a single mapping from key
- *
- *  "key" [ IN ] - NUL terminated string to be found
- *
- *  "start_id" [ OUT ] - starting id of found range
- *
- *  "id_count [ OUT, NULL OKAY ] - the number of contiguous
- *  row ids in found range
- *
- *  "custom_cmp" [ IN, NULL OKAY ] and "data" [ IN, OPAQUE ]
- *  optional comparison function for search
- */
-KDB_EXTERN rc_t CC KIndexFindText ( const KIndex *self,
-    const char *key, int64_t *start_id, uint64_t *id_count,
-    int ( CC * custom_cmp ) ( const void *item,
-        struct PBSTNode const *n, void *data ),
-    void *data );
-
-/* FindAll
- *  finds all mappings from key
- */
-KDB_EXTERN rc_t CC KIndexFindAllText ( const KIndex *self, const char *key,
-    rc_t ( CC * f ) ( int64_t start_id, uint64_t id_count, void *data ),
-    void *data );
-
-/* Project
- *  finds key(s) mapping to value/id if supported
- *
- *  "id" [ IN ] - row id to be located
- *
- *  "start_id [ OUT, NULL OKAY ] - the first id of found range
- *
- *  "id_count [ OUT, NULL OKAY ] - the number of contiguous
- *  row ids in found range
- *
- *  "key" [ OUT ] and "kmax" [ IN ] - return buffer
- *  for NUL terminated index text
- *
- *  "actsize" [ OUT, NULL OKAY ] - returns key size in bytes,
- *   excluding NUL termination
- *
- *  returns rcBuffer, rcInsufficient
- *  if kmax <= strlen ( key )
- */
-KDB_EXTERN rc_t CC KIndexProjectText ( const KIndex *self,
-    int64_t id, int64_t *start_id, uint64_t *id_count,
-    char *key, size_t kmax, size_t *actsize );
-
-
-/* ProjectAll
- *  finds key(s) mapping to value/id if supported
- */
-KDB_EXTERN rc_t CC KIndexProjectAllText ( const KIndex *self, int64_t id,
-    rc_t ( CC * f ) ( int64_t start_id, uint64_t id_count, const char *key, void *data ),
-    void *data );
-
-
-/* InsertU64
- *  creates a mapping from an (file) offset range to an id range
- *
- *  "unique" [ IN ] - if true, key ranges cannot overlap
- *
- *  "key" [ IN ] - offset (in file)
- *
- *  "key_size" [ IN ] - size of chunk (in file)
- *
- *  "start_id" [ IN ] - starting id 
- *
- *  "id_count" [ IN ] - number of ids in chunk
- */
-KDB_EXTERN rc_t CC KIndexInsertU64 ( KIndex *self, bool unique,
-    uint64_t key, uint64_t key_size, int64_t start_id, uint64_t id_count );
-
-/* DeleteU64
- *  deletes all mappings from key
- */
-KDB_EXTERN rc_t CC KIndexDeleteU64 ( KIndex *self, uint64_t key );
-
-/* FindU64
- *  finds a FIRST chunk by offset with in file
- */
-KDB_EXTERN rc_t CC KIndexFindU64 ( const KIndex *self, uint64_t offset,
-    uint64_t *key, uint64_t *key_size, int64_t *start_id, uint64_t *id_count );
-
-/* FindAllU64
- *  Iterate through all chunks with an offset and call f() for each range
- */
-KDB_EXTERN rc_t CC KIndexFindAllU64 ( const KIndex *self, uint64_t offset,
-    rc_t ( CC * f ) ( uint64_t key, uint64_t key_size,
-        int64_t start_id, uint64_t id_count, void *data ),
-    void *data);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_kdb_index_ */
diff --git a/interfaces/kdb/kdb-priv.h b/interfaces/kdb/kdb-priv.h
deleted file mode 100644
index ea1aacb..0000000
--- a/interfaces/kdb/kdb-priv.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kdb_kdb_priv_
-#define _h_kdb_kdb_priv_
-
-#ifndef _h_kdb_extern_
-#include <kdb/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h> /* va_list */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDBManager;
-struct KDatabase;
-struct KTable;
-struct KIndex;
-struct KColumn;
-struct KMetadata;
-struct KDirectory;
-struct VFSManager;
-struct VPath;
-
-
-/*--------------------------------------------------------------------------
- * KDBManager
- */
-
-/* ModDate
- *  return a modification timestamp for table
- */
-KDB_EXTERN rc_t CC KDBManagerGetTableModDate ( struct KDBManager const *self,
-    KTime_t *mtime, const char *path, ... );
-KDB_EXTERN rc_t CC KDBManagerVGetTableModDate ( struct KDBManager const *self,
-    KTime_t *mtime, const char *path, va_list args );
-
-
-/* Make using custom VFSManager */
-KDB_EXTERN rc_t CC KDBManagerMakeReadWithVFSManager (
-    struct KDBManager const ** mgrp, struct KDirectory const * wd,
-    struct VFSManager * vfs );
-KDB_EXTERN rc_t CC KDBManagerMakeUpdateWithVFSManager (
-    struct KDBManager ** mgrp, struct KDirectory *wd,
-    struct VFSManager * vfs );
-
-KDB_EXTERN rc_t CC KDBManagerGetVFSManager ( struct KDBManager const *self,
-    struct VFSManager ** vfs );
-
-KDB_EXTERN rc_t CC KDBManagerVPathOpenLocalDBRead ( struct KDBManager const * self,
-    struct KDatabase const ** db, struct VPath const * path );
-KDB_EXTERN rc_t CC KDBManagerVPathOpenRemoteDBRead ( struct KDBManager const * self,
-    struct KDatabase const ** db, struct VPath const * remote, struct VPath const * cache );
-
-
-/*--------------------------------------------------------------------------
- * KDatabase
- */
-
-/* OpenDirectory
- *  access the directory in use
- */
-KDB_EXTERN rc_t CC KDatabaseOpenDirectoryRead ( struct KDatabase const *self, struct KDirectory const **dir );
-KDB_EXTERN rc_t CC KDatabaseOpenDirectoryUpdate ( struct KDatabase *self, struct KDirectory **dir );
-
-/* GetPath
- *  return the absolute path to DB
- */
-KDB_EXTERN rc_t CC KDatabaseGetPath ( struct KDatabase const *self,
-    const char **path );
-
-
-/*--------------------------------------------------------------------------
- * KTable
- */
-
-/* OpenDirectory
- *  access the directory in use
- */
-KDB_EXTERN rc_t CC KTableOpenDirectoryRead ( struct KTable const *self, struct KDirectory const **dir );
-KDB_EXTERN rc_t CC KTableOpenDirectoryUpdate ( struct KTable *self, struct KDirectory **dir );
-
-#define KTableGetDirectoryRead KTableOpenDirectoryRead
-#define KTableGetDirectoryUpdate KTableOpenDirectoryUpdate
-
-/* GetPath
- *  return the absolute path to table
- */
-KDB_EXTERN rc_t CC KTableGetPath ( struct KTable const *self,
-    const char **path );
-
-
-/*--------------------------------------------------------------------------
- * KColumn
- */
-
-/* OpenDirectory
- *  duplicate reference to the directory in use
- *  NB - returned reference must be released
- */
-KDB_EXTERN rc_t CC KColumnOpenDirectoryRead ( struct KColumn const *self, struct KDirectory const **dir );
-KDB_EXTERN rc_t CC KColumnOpenDirectoryUpdate ( struct KColumn *self, struct KDirectory **dir );
-
-#define KColumnGetDirectoryRead KColumnOpenDirectoryRead
-#define KColumnGetDirectoryUpdate KColumnOpenDirectoryUpdate
-
-
-
-/*--------------------------------------------------------------------------
- * KIndex
- */
-
-/* MarkModified
- *  make the index think it has been modified, such that it may be committed
- *  useful when forcing conversion from an older version
- */
-KDB_EXTERN rc_t CC KIndexMarkModified ( struct KIndex *self );
-
-
-/* SetMaxId
- *  certain legacy versions of skey were built to know only the starting id
- *  of the NAME_FMT column, but were never given a maximum id. allow them
- *  to be corrected here.
- */
-KDB_EXTERN void CC KIndexSetMaxRowId ( struct KIndex const *self, int64_t max_row_id );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_kdb_kdb_priv_ */
diff --git a/interfaces/kdb/manager.h b/interfaces/kdb/manager.h
deleted file mode 100644
index c924376..0000000
--- a/interfaces/kdb/manager.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kdb_manager_
-#define _h_kdb_manager_
-
-#ifndef _h_kdb_extern_
-#include <kdb/extern.h>
-#endif
-
-/* #ifndef _h_kfs_directory_ */
-/* #include <kfs/directory.h> */
-/* #endif */
-#include <kfs/defs.h> /* kpt types */
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct VPath;
-struct KDirectory;
-
-/*--------------------------------------------------------------------------
- * KDBPathType
- *  extends KPathType from <kfs/defs.h>
- */
-enum
-{
-    /* must be handled carefully and can not go back to KDirectory 
-     * as this value has a different meaning in KDirectory */
-    kptAny = 0,
-    kptDatabase = kptLastDefined,
-    kptTable,
-    kptIndex,
-    kptColumn,
-
-    /* these values may not be used in KDBManagerExists below */
-    kptMetadata,
-    kptPrereleaseTbl
-};
-
-
-/*--------------------------------------------------------------------------
- * KDBManager
- *  opaque handle to library
- */
-typedef struct KDBManager KDBManager;
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-KDB_EXTERN rc_t CC KDBManagerAddRef ( const KDBManager *self );
-KDB_EXTERN rc_t CC KDBManagerRelease ( const KDBManager *self );
-
-
-/* MakeRead
- * MakeUpdate
- *  create library handle for specific use
- *  NB - only one of the functions will be implemented
- *
- *  "wd" [ IN, NULL OKAY ] - optional working directory for
- *  accessing the file system. mgr will attach its own reference.
- */
-KDB_EXTERN rc_t CC KDBManagerMakeRead ( const KDBManager **mgr, struct KDirectory const *wd );
-KDB_EXTERN rc_t CC KDBManagerMakeUpdate ( KDBManager **mgr, struct KDirectory *wd );
-
-
-/* Version
- *  returns the library version
- */
-KDB_EXTERN rc_t CC KDBManagerVersion ( const KDBManager *self, uint32_t *version );
-
-
-/* Exists
- *  returns true if requested object exists
- *
- *  "type" [ IN ] - a KDBPathType
- *
- *  "path" [ IN ] - NUL terminated path
- *
- * DEPRECATED:
- * Should use KDBManagerPathType for reduced network thrashing.
- */
-KDB_EXTERN bool CC KDBManagerExists ( const KDBManager *self, uint32_t type,
-    const char *name, ... );
-KDB_EXTERN bool CC KDBManagerVExists ( const KDBManager *self, uint32_t type,
-    const char *name, va_list args );
-
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "path" [ IN ] - NUL terminated path
- */
-KDB_EXTERN rc_t CC KDBManagerWritable ( const KDBManager *self,
-    const char *path, ... );
-KDB_EXTERN rc_t CC KDBManagerVWritable ( const KDBManager *self,
-    const char *path, va_list args );
-
-/* Lock
- *  apply lock
- *
- *  if object is already locked, the operation is idempotent
- *  and returns an rc state of rcLocked
- *
- *  "path" [ IN ] - NUL terminated path
- */
-KDB_EXTERN rc_t CC KDBManagerLock ( KDBManager *self, const char *path, ... );
-KDB_EXTERN rc_t CC KDBManagerVLock ( KDBManager *self, const char *path, va_list args );
-
-/* Unlock
- *  remove lock
- *
- *  if object is already unlocked, the operation is idempotent
- *  and returns an rc state of rcUnlocked
- *
- *  "path" [ IN ] - NUL terminated path
- */
-KDB_EXTERN rc_t CC KDBManagerUnlock ( KDBManager *self, const char *path, ... );
-KDB_EXTERN rc_t CC KDBManagerVUnlock ( KDBManager *self, const char *path, va_list args );
-
-
-/* Drop
- *  drop an object based on its path
- *
- *  "path" [ IN ] - NUL terminated string in UTF-8 giving path to the kdb object
- */
-KDB_EXTERN rc_t CC KDBManagerDrop ( KDBManager *self, uint32_t obj_type, const char *path, ... );
-KDB_EXTERN rc_t CC KDBManagerVDrop ( KDBManager *self, uint32_t obj_type, const char *path, va_list args );
-
-
-/* RunPeriodicTasks
- *  executes periodic tasks, such as cache flushing
- */
-KDB_EXTERN rc_t CC KDBManagerRunPeriodicTasks ( const KDBManager *self );
-
-
-/* PathType
- *  check the path type of an object/directory path.
- *  this is an extension of the KDirectoryPathType and will return
- *  the KDirectory values if a path type is not specifically a
- *  kdb object
- */
-KDB_EXTERN int CC KDBManagerPathTypeVP ( const KDBManager * self, const struct VPath * path );
-KDB_EXTERN int CC KDBManagerPathType   ( const KDBManager * self, const char *path, ... );
-KDB_EXTERN int CC KDBManagerVPathType  ( const KDBManager * self, const char *path, va_list args );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kdb_manager_ */
diff --git a/interfaces/kdb/meta.h b/interfaces/kdb/meta.h
deleted file mode 100644
index cee3ed7..0000000
--- a/interfaces/kdb/meta.h
+++ /dev/null
@@ -1,411 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kdb_meta_
-#define _h_kdb_meta_
-
-#ifndef _h_kdb_extern_
-#include <kdb/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KTable;
-struct KColumn;
-struct KDatabase;
-
-
-/*--------------------------------------------------------------------------
- * KMetadata
- *  a versioned, hierarchical structure
- */
-typedef struct KMetadata KMetadata;
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-KDB_EXTERN rc_t CC KMetadataAddRef ( const KMetadata *self );
-KDB_EXTERN rc_t CC KMetadataRelease ( const KMetadata *self );
-
-
-/* OpenMetadataRead
- *  opens metadata for read
- *
- *  "meta" [ OUT ] - return parameter for metadata
- */
-KDB_EXTERN rc_t CC KDatabaseOpenMetadataRead ( struct KDatabase const *self,
-    const KMetadata **meta );
-KDB_EXTERN rc_t CC KTableOpenMetadataRead ( struct KTable const *self,
-    const KMetadata **meta );
-KDB_EXTERN rc_t CC KColumnOpenMetadataRead ( struct KColumn const *self,
-    const KMetadata **meta );
-
-/* OpenMetadataUpdate
- *  open metadata for read/write
- *
- *  "meta" [ OUT ] - return parameter for metadata
- */
-KDB_EXTERN rc_t CC KDatabaseOpenMetadataUpdate ( struct KDatabase *self,
-    KMetadata **meta );
-KDB_EXTERN rc_t CC KTableOpenMetadataUpdate ( struct KTable *self,
-    KMetadata **meta );
-KDB_EXTERN rc_t CC KColumnOpenMetadataUpdate ( struct KColumn *self,
-    KMetadata **meta );
-
-
-/* Version
- *  returns the metadata format version
- */
-KDB_EXTERN rc_t CC KMetadataVersion ( const KMetadata *self, uint32_t *version );
-
-
-/* ByteOrder
- *  indicates whether original byte order is reversed
- *  under current architecture.
- *
- *  the byte order of the column is established by
- *  the host architecture when created.
- *
- *  "reversed" [ OUT ] - if true, the original byte
- *  order is reversed with regard to host native byte order.
- */
-KDB_EXTERN rc_t CC KMetadataByteOrder ( const KMetadata *self, bool *reversed );
-
-
-/* Revision
- *  returns current revision number
- *  where 0 ( zero ) means tip
- */
-KDB_EXTERN rc_t CC KMetadataRevision ( const KMetadata *self, uint32_t *revision );
-
-
-/* MaxRevision
- *  returns the maximum revision available
- */
-KDB_EXTERN rc_t CC KMetadataMaxRevision ( const KMetadata *self, uint32_t *revision );
-
-
-/* Commit
- *  ensure any changes are committed to disk
- */
-KDB_EXTERN rc_t CC KMetadataCommit ( KMetadata *self );
-
-
-/* Freeze
- *  freezes current metadata revision
- *  further modification will begin on a copy
- */
-KDB_EXTERN rc_t CC KMetadataFreeze ( KMetadata *self );
-
-
-/* OpenRevision
- *  opens a read-only indexed revision of metadata
- */
-KDB_EXTERN rc_t CC KMetadataOpenRevision ( const KMetadata *self,
-    const KMetadata **meta, uint32_t revision );
-
-
-/* GetSequence
- * SetSequence
- * NextSequence
- *  access a named sequence
- *
- *  "seq" [ IN ] - NUL terminated sequence name
- *
- *  "val" [ OUT ] - return parameter for sequence value
- *  "val" [ IN ] - new sequence value
- */
-KDB_EXTERN rc_t CC KMetadataGetSequence ( const KMetadata *self,
-    const char *seq, int64_t *val );
-KDB_EXTERN rc_t CC KMetadataSetSequence ( KMetadata *self,
-    const char *seq, int64_t val );
-KDB_EXTERN rc_t CC KMetadataNextSequence ( KMetadata *self,
-    const char *seq, int64_t *val );
-
-
-/*--------------------------------------------------------------------------
- * KMDataNode
- *  a node with an optional value,
- *  optional attributes, and optional children
- *
- *  nodes are identified by path, relative to a starting node,
- *  where "/" serves as a path separator.
- */
-typedef struct KMDataNode KMDataNode;
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-KDB_EXTERN rc_t CC KMDataNodeAddRef ( const KMDataNode *self );
-KDB_EXTERN rc_t CC KMDataNodeRelease ( const KMDataNode *self );
-
-
-/* OpenNodeRead
- * VOpenNodeRead
- *  opens a metadata node
- *
- *  "node" [ OUT ] - return parameter for indicated metadata node
- *
- *  "path" [ IN, NULL OKAY ] - optional path for specifying named
- *  node within metadata hierarchy. paths will be interpreted as
- *  if they were file system paths, using '/' as separator. the
- *  special values NULL and "" are interpreted as "."
- */
-KDB_EXTERN rc_t CC KMetadataOpenNodeRead ( const KMetadata *self,
-    const KMDataNode **node, const char *path, ... );
-KDB_EXTERN rc_t CC KMDataNodeOpenNodeRead ( const KMDataNode *self,
-    const KMDataNode **node, const char *path, ... );
-
-KDB_EXTERN rc_t CC KMetadataVOpenNodeRead ( const KMetadata *self,
-    const KMDataNode **node, const char *path, va_list args );
-KDB_EXTERN rc_t CC KMDataNodeVOpenNodeRead ( const KMDataNode *self,
-    const KMDataNode **node, const char *path, va_list args );
-
-
-/* OpenNodeUpdate
- * VOpenNodeUpdate
- *  opens a metadata node
- *
- *  "node" [ OUT ] - return parameter for indicated metadata node
- *
- *  "path" [ IN, NULL OKAY ] - optional path for specifying named
- *  node within metadata hierarchy. paths will be interpreted as
- *  if they were file system paths, using '/' as separator. the
- *  special values NULL and "" are interpreted as "."
- */
-KDB_EXTERN rc_t CC KMetadataOpenNodeUpdate ( KMetadata *self,
-    KMDataNode **node, const char *path, ... );
-KDB_EXTERN rc_t CC KMDataNodeOpenNodeUpdate ( KMDataNode *self,
-    KMDataNode **node, const char *path, ... );
-
-KDB_EXTERN rc_t CC KMetadataVOpenNodeUpdate ( KMetadata *self,
-    KMDataNode **node, const char *path, va_list args );
-KDB_EXTERN rc_t CC KMDataNodeVOpenNodeUpdate ( KMDataNode *self,
-    KMDataNode **node, const char *path, va_list args );
-
-
-/* ByteOrder
- *  indicates whether original byte order is reversed
- *  under current architecture.
- *
- *  the byte order of the column is established by
- *  the host architecture when created.
- *
- *  "reversed" [ OUT ] - if true, the original byte
- *  order is reversed with regard to host native byte order.
- */
-KDB_EXTERN rc_t CC KMDataNodeByteOrder ( const KMDataNode *self, bool *reversed );
-
-
-/* Read
- *  read a node value
- *
- *  "offset" [ IN ] - initial offset into metadata
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - number of bytes actually read
- *
- *  "remaining" [ OUT, NULL OKAY ] - optional return parameter for
- *  the number of bytes remaining to be read.
- *  specifically, "offset" + "num_read" + "remaining" == sizeof node data
- */
-KDB_EXTERN rc_t CC KMDataNodeRead ( const KMDataNode *self,
-    size_t offset, void *buffer, size_t bsize,
-    size_t *num_read, size_t *remaining );
-
-
-/* Write
- *  write a node value or attribute
- *  overwrites anything already there
- *
- *  "buffer" [ IN ] and "size" [ IN ] - new value data
- */
-KDB_EXTERN rc_t CC KMDataNodeWrite ( KMDataNode *self, const void *buffer, size_t size );
-
-
-/* Append
- *  append data to value
- *
- *  "buffer" [ IN ] and "size" [ IN ] - value data to be appended
- */
-KDB_EXTERN rc_t CC KMDataNodeAppend ( KMDataNode *self, const void *buffer, size_t size );
-
-
-/* Read ( formatted )
- *  reads as integer or float value in native byte order
- *
- *  "bXX" [ OUT ] - return parameter for numeric value
- */
-KDB_EXTERN rc_t CC KMDataNodeReadB8 ( const KMDataNode *self, void *b8 );
-KDB_EXTERN rc_t CC KMDataNodeReadB16 ( const KMDataNode *self, void *b16 );
-KDB_EXTERN rc_t CC KMDataNodeReadB32 ( const KMDataNode *self, void *b32 );
-KDB_EXTERN rc_t CC KMDataNodeReadB64 ( const KMDataNode *self, void *b64 );
-KDB_EXTERN rc_t CC KMDataNodeReadB128 ( const KMDataNode *self, void *b128 );
-
-
-/* ReadAs ( formatted )
- *  reads as integer or float value in native byte order
- *  casts smaller-sized values to desired size, e.g.
- *    uint32_t to uint64_t
- *
- *  "i" [ OUT ] - return parameter for signed integer
- *  "u" [ OUT ] - return parameter for unsigned integer
- *  "f" [ OUT ] - return parameter for double float
- */
-KDB_EXTERN rc_t CC KMDataNodeReadAsI16 ( const KMDataNode *self, int16_t *i );
-KDB_EXTERN rc_t CC KMDataNodeReadAsU16 ( const KMDataNode *self, uint16_t *u );
-KDB_EXTERN rc_t CC KMDataNodeReadAsI32 ( const KMDataNode *self, int32_t *i );
-KDB_EXTERN rc_t CC KMDataNodeReadAsU32 ( const KMDataNode *self, uint32_t *u );
-KDB_EXTERN rc_t CC KMDataNodeReadAsI64 ( const KMDataNode *self, int64_t *i );
-KDB_EXTERN rc_t CC KMDataNodeReadAsU64 ( const KMDataNode *self, uint64_t *u );
-KDB_EXTERN rc_t CC KMDataNodeReadAsF64 ( const KMDataNode *self, double *f );
-
-
-/* Read ( formatted )
- *  reads as C-string
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - output buffer for
- *  NUL terminated string.
- *
- *  "size" [ OUT ] - return parameter giving size of string
- *  not including NUL byte. the size is set both upon success
- *  and insufficient buffer space error.
- */
-KDB_EXTERN rc_t CC KMDataNodeReadCString ( const KMDataNode *self,
-    char *buffer, size_t bsize, size_t *size );
-
-
-/* Write ( formatted )
- *  writes integer or float value in metadata byte order
- *
- *  "bXX" [ IN ] - numeric value
- */
-KDB_EXTERN rc_t CC KMDataNodeWriteB8 ( KMDataNode *self, const void *b8 );
-KDB_EXTERN rc_t CC KMDataNodeWriteB16 ( KMDataNode *self, const void *b16 );
-KDB_EXTERN rc_t CC KMDataNodeWriteB32 ( KMDataNode *self, const void *b32 );
-KDB_EXTERN rc_t CC KMDataNodeWriteB64 ( KMDataNode *self, const void *b64 );
-KDB_EXTERN rc_t CC KMDataNodeWriteB128 ( KMDataNode *self, const void *b128 );
-
-
-/* Write ( formatted )
- *  writes string
- *
- *  "str" [ IN ] - NUL terminated string.
- */
-KDB_EXTERN rc_t CC KMDataNodeWriteCString ( KMDataNode *self, const char *str );
-
-
-/* ReadAttr
- *  reads as NUL-terminated string
- *
- *  "name" [ IN ] - NUL terminated attribute name
- *
- *  "buffer" [ OUT ] and "bsize" - return parameter for attribute value
- *
- *  "size" [ OUT ] - return parameter giving size of string
- *  not including NUL byte. the size is set both upon success
- *  and insufficient buffer space error.
- */
-KDB_EXTERN rc_t CC KMDataNodeReadAttr ( const KMDataNode *self, const char *name,
-    char *buffer, size_t bsize, size_t *size );
-
-
-/* WriteAttr
- *  writes NUL-terminated string
- *
- *  "name" [ IN ] - NUL terminated attribute name
- *
- *  "value" [ IN ] - NUL terminated attribute value
- */
-KDB_EXTERN rc_t CC KMDataNodeWriteAttr ( KMDataNode *self,
-    const char *name, const char *value );
-
-
-/* ReadAttrAs ( formatted )
- *  reads as integer or float value in native byte order
- *  casts smaller-sized values to desired size, e.g.
- *    uint32_t to uint64_t
- *
- *  "i" [ OUT ] - return parameter for signed integer
- *  "u" [ OUT ] - return parameter for unsigned integer
- *  "f" [ OUT ] - return parameter for double float
- */
-KDB_EXTERN rc_t CC KMDataNodeReadAttrAsI16 ( const KMDataNode *self, const char *attr, int16_t *i );
-KDB_EXTERN rc_t CC KMDataNodeReadAttrAsU16 ( const KMDataNode *self, const char *attr, uint16_t *u );
-KDB_EXTERN rc_t CC KMDataNodeReadAttrAsI32 ( const KMDataNode *self, const char *attr, int32_t *i );
-KDB_EXTERN rc_t CC KMDataNodeReadAttrAsU32 ( const KMDataNode *self, const char *attr, uint32_t *u );
-KDB_EXTERN rc_t CC KMDataNodeReadAttrAsI64 ( const KMDataNode *self, const char *attr, int64_t *i );
-KDB_EXTERN rc_t CC KMDataNodeReadAttrAsU64 ( const KMDataNode *self, const char *attr, uint64_t *u );
-KDB_EXTERN rc_t CC KMDataNodeReadAttrAsF64 ( const KMDataNode *self, const char *attr, double *f );
-
-
-/* Drop
- * VDrop
- *  drop some or all node content
- */
-KDB_EXTERN rc_t CC KMDataNodeDropAll ( KMDataNode *self );
-KDB_EXTERN rc_t CC KMDataNodeDropAttr ( KMDataNode *self, const char *attr );
-KDB_EXTERN rc_t CC KMDataNodeDropChild ( KMDataNode *self, const char *path, ... );
-KDB_EXTERN rc_t CC KMDataNodeVDropChild ( KMDataNode *self, const char *path, va_list args );
-
-
-/* Rename
- *  renames a contained object
- *
- *  "from" [ IN ] - NUL terminated string in UTF-8
- *  giving simple name of existing attr
- *
- *  "to" [ IN ] - NUL terminated string in UTF-8
- *  giving new simple attr name
- */
-KDB_EXTERN rc_t CC KMDataNodeRenameAttr ( KMDataNode *self, const char *from, const char *to );
-KDB_EXTERN rc_t CC KMDataNodeRenameChild ( KMDataNode *self, const char *from, const char *to );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_kdb_meta_ */
diff --git a/interfaces/kdb/meta.hpp b/interfaces/kdb/meta.hpp
deleted file mode 100644
index ca2d9a9..0000000
--- a/interfaces/kdb/meta.hpp
+++ /dev/null
@@ -1,487 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_kdb_meta_
-#define _hpp_kdb_meta_
-
-#ifndef _h_kdb_meta_
-#include <kdb/meta.h>
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KMetadata
- *  a versioned, hierarchical structure
- */
-struct KMetadata
-{
-    /* AddRef
-     * Release
-     *  all objects are reference counted
-     *  NULL references are ignored
-     */
-    inline rc_t AddRef () const throw()
-    { return KMetadataAddRef ( this ); }
-
-    inline rc_t Release () const  throw()
-    { return KMetadataRelease ( this ); }
-
-
-    /* OpenNodeRead
-     *  opens a metadata node
-     *
-     *  "node" [ OUT ] - return parameter for indicated metadata node
-     *
-     *  "path" [ IN, NULL OKAY ] - optional path for specifying named
-     *  node within metadata hierarchy. paths will be interpreted as
-     *  if they were file system paths, using '/' as separator. the
-     *  special values NULL and "" are interpreted as "."
-     */
-    inline rc_t OpenNodeRead ( const KMDataNode **node, 
-        const char *path, ... ) const throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KMetadataVOpenNodeRead ( this, node, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenNodeRead ( const KMDataNode **node, 
-        const char *path, va_list args ) const throw()
-    { return KMetadataVOpenNodeRead ( this, node, path, args ); }
-
-
-    /* OpenNodeUpdate
-     *  opens a metadata node
-     *
-     *  "node" [ OUT ] - return parameter for indicated metadata node
-     *
-     *  "path" [ IN, NULL OKAY ] - optional path for specifying named
-     *  node within metadata hierarchy. paths will be interpreted as
-     *  if they were file system paths, using '/' as separator. the
-     *  special values NULL and "" are interpreted as "."
-     */
-    inline rc_t OpenNodeUpdate ( KMDataNode **node, 
-        const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KMetadataVOpenNodeUpdate ( this, node, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenNodeUpdate ( KMDataNode **node, 
-        const char *path, va_list args ) throw()
-    { return KMetadataVOpenNodeUpdate ( this, node, path, args ); }
-
-
-    /* Version
-     *  returns the metadata format version
-     */
-    inline rc_t Version ( uint32_t *version ) const  throw()
-    { return KMetadataVersion ( this, version ); }
-
-
-    /* ByteOrder
-     *  indicates whether original byte order is reversed
-     *  under current architecture.
-     *
-     *  the byte order of the column is established by
-     *  the host architecture when created.
-     *
-     *  "reversed" [ OUT ] - if true, the original byte
-     *  order is reversed with regard to host native byte order.
-     */
-    inline rc_t ByteOrder ( bool *reversed ) const throw()
-    { return KMetadataByteOrder ( this, reversed ); }
-
-
-    /* Revision
-     *  returns current revision number
-     *  where 0 ( zero ) means tip
-     */
-    inline rc_t Revision ( uint32_t *revision ) const throw()
-    { return KMetadataRevision ( this, revision ); }
-
-
-    /* MaxRevision
-     *  returns the maximum revision available
-     */
-    inline rc_t MaxRevision ( uint32_t *revision ) const throw()
-    { return KMetadataMaxRevision ( this, revision ); }
-
-
-    /* Commit
-     *  ensure any changes are committed to disk
-     */
-    inline rc_t Commit () throw()
-    { return KMetadataCommit ( this ); }
-
-
-    /* Freeze
-     *  freezes current metadata revision
-     *  further modification will begin on a copy
-     */
-    inline rc_t Freeze () throw()
-    { return KMetadataFreeze ( this ); }
-
-
-    /* OpenRevision
-     *  opens a read-only indexed revision of metadata
-     */
-    inline rc_t OpenRevision ( const KMetadata **meta, uint32_t revision ) const throw()
-    { return KMetadataOpenRevision ( this, meta, revision ); }
-
-
-    /* GetSequence
-     * SetSequence
-     * NextSequence
-     *  access a named sequence
-     *
-     *  "seq" [ IN ] - NUL terminated sequence name
-     *
-     *  "val" [ OUT ] - return parameter for sequence value
-     *  "val" [ IN ] - new sequence value
-     */
-    inline rc_t GetSequence ( const char *seq, int64_t *val ) const throw()
-    { return KMetadataGetSequence ( this, seq, val ); }
-
-    inline rc_t SetSequence ( const char *seq, int64_t val ) throw()
-    { return KMetadataSetSequence ( this, seq, val ); }
-
-    inline rc_t NextSequence ( const char *seq, int64_t *val ) throw()
-    { return KMetadataNextSequence ( this, seq, val ); }
-
-private:
-    KMetadata ();
-    ~ KMetadata ();
-    KMetadata ( const KMetadata& );
-    KMetadata &operator = ( const KMetadata& );
-
-};
-
-
-/*--------------------------------------------------------------------------
- * KMDataNode
- *  a node with an optional value,
- *  optional attributes, and optional children
- *
- *  nodes are identified by path, relative to a starting node,
- *  where "/" serves as a path separator.
- */
-struct KMDataNode
-{
-    /* AddRef
-     * Release
-     *  ignores NULL references
-     */
-    inline rc_t AddRef () const  throw()
-    { return KMDataNodeAddRef ( this ); }
-
-    inline rc_t Release () const  throw()
-    { return KMDataNodeRelease ( this ); }
-
-
-    /* OpenNodeRead
-     * VOpenNodeRead
-     *  opens a metadata node
-     *
-     *  "node" [ OUT ] - return parameter for indicated metadata node
-     *
-     *  "path" [ IN, NULL OKAY ] - optional path for specifying named
-     *  node within metadata hierarchy. paths will be interpreted as
-     *  if they were file system paths, using '/' as separator. the
-     *  special values NULL and "" are interpreted as "."
-     */
-    inline rc_t OpenNodeRead ( const KMDataNode **node,
-        const char *path, ... ) const throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KMDataNodeVOpenNodeRead ( this, node, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenNodeRead ( const KMDataNode **node,
-        const char *path, va_list args ) const throw()
-    { return KMDataNodeVOpenNodeRead ( this, node, path, args ); }
-
-
-    /* OpenNodeUpdate
-     * VOpenNodeUpdate
-     *  opens a metadata node
-     *
-     *  "node" [ OUT ] - return parameter for indicated metadata node
-     *
-     *  "path" [ IN, NULL OKAY ] - optional path for specifying named
-     *  node within metadata hierarchy. paths will be interpreted as
-     *  if they were file system paths, using '/' as separator. the
-     *  special values NULL and "" are interpreted as "."
-     */
-    inline rc_t OpenNodeUpdate ( KMDataNode **node,
-        const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KMDataNodeVOpenNodeUpdate ( this, node, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenNodeUpdate ( KMDataNode **node,
-        const char *path, va_list args ) throw()
-    { return KMDataNodeVOpenNodeUpdate ( this, node, path, args ); }
-
-
-    /* ByteOrder
-     *  indicates whether original byte order is reversed
-     *  under current architecture.
-     *
-     *  the byte order of the column is established by
-     *  the host architecture when created.
-     *
-     *  "reversed" [ OUT ] - if true, the original byte
-     *  order is reversed with regard to host native byte order.
-     */
-     inline rc_t ByteOrder ( bool *reversed ) const throw()
-     { return KMDataNodeByteOrder ( this, reversed ); }
-
-
-    /* Write
-     *  write a node value or attribute
-     *  overwrites anything already there
-     *
-     *  "buffer" [ IN ] and "size" [ IN ] - new value data
-     */
-     inline rc_t Write ( const void *buffer, size_t size ) throw()
-     { return KMDataNodeWrite ( this, buffer, size ); }
-
-
-     /* Append
-      *  append data to value
-      *
-      *  "buffer" [ IN ] and "size" [ IN ] - value data to be appended
-      */
-     inline rc_t Append ( const void *buffer, size_t size ) throw()
-     { return KMDataNodeAppend ( this, buffer, size ); }
-
-
-    /* Read ( formatted )
-     *  reads as integer or float value in native byte order
-     *
-     *  "bXX" [ OUT ] - return parameter for numeric value
-     */
-     inline rc_t ReadB8 ( void *b8 ) const throw()
-     { return KMDataNodeReadB8 ( this, b8 ); }
-     inline rc_t ReadB16 ( void *b16 ) const throw()
-     { return KMDataNodeReadB16 ( this, b16 ); }
-     inline rc_t ReadB32 ( void *b32 ) const throw()
-     { return KMDataNodeReadB32 ( this, b32 ); }
-     inline rc_t ReadB64 ( void *b64 ) const throw()
-     { return KMDataNodeReadB64 ( this, b64 ); }
-     inline rc_t ReadB128 ( void *b128 ) const throw()
-     { return KMDataNodeReadB128 ( this, b128 ); }
-
-
-    /* Read
-     *  read a node value
-     *
-     *  "offset" [ IN ] - initial offset into metadata
-     *
-     *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
-     *
-     *  "num_read" [ OUT ] - number of bytes actually read
-     *
-     *  "remaining" [ OUT, NULL OKAY ] - optional return parameter for
-     *  the number of bytes remaining to be read.
-     *  specifically, "offset" + "num_read" + "remaining" == sizeof node data
-     */
-     inline rc_t Read ( size_t offset, void *buffer, size_t bsize,
-        size_t *num_read, size_t *remaining ) const throw()
-     { return KMDataNodeRead ( this, offset, buffer, bsize, num_read, remaining ); }
-
-
-    /* Read ( formatted )
-     *  reads as integer or float value in native byte order
-     *  casts smaller-sized values to desired size, e.g.
-     *    uint32_t to uint64_t
-     *
-     *  "i" [ OUT ] - return parameter for signed integer
-     *  "u" [ OUT ] - return parameter for unsigned integer
-     *  "f" [ OUT ] - return parameter for double float
-     */
-     inline rc_t Read ( int16_t *value ) const  throw()
-    { return KMDataNodeReadAsI16 ( this, value ); }
-     inline rc_t Read ( uint16_t *value ) const  throw()
-    { return KMDataNodeReadAsU16 ( this, value ); }
-
-     inline rc_t Read ( int32_t *value ) const  throw()
-    { return KMDataNodeReadAsI32 ( this, value ); }
-     inline rc_t Read ( uint32_t *value ) const  throw()
-    { return KMDataNodeReadAsU32 ( this, value ); }
-
-    inline rc_t Read ( int64_t *value ) const  throw()
-    { return KMDataNodeReadAsI64 ( this, value ); }
-    inline rc_t Read ( uint64_t *value ) const  throw()
-    { return KMDataNodeReadAsU64 ( this, value ); }
-
-    inline rc_t Read ( double *value ) const  throw()
-    { return KMDataNodeReadAsF64 ( this, value ); }
-
-
-    /* Read ( formatted )
-     *  reads as C-string
-     *
-     *  "buffer" [ OUT ] and "bsize" [ IN ] - output buffer for
-     *  NUL terminated string.
-     *
-     *  "size" [ OUT ] - return parameter giving size of string
-     *  not including NUL byte. the size is set both upon success
-     *  and insufficient buffer space error.
-     */
-    inline rc_t Read ( char *buffer, size_t bsize, size_t *size ) const  throw()
-    { return KMDataNodeReadCString ( this, buffer, bsize, size ); }
-
-
-    /* Write ( formatted )
-     *  writes integer or float value in metadata byte order
-     *
-     *  "bXX" [ IN ] - numeric value
-     */
-     inline rc_t WriteB8 ( const void *b8 ) throw()
-     { return KMDataNodeWriteB8 ( this, b8 ); }
-     inline rc_t WriteB16 ( const void *b16 ) throw()
-     { return KMDataNodeWriteB16 ( this, b16 ); }
-     inline rc_t WriteB32 ( const void *b32 ) throw()
-     { return KMDataNodeWriteB32 ( this, b32 ); }
-     inline rc_t WriteB64 ( const void *b64 ) throw()
-     { return KMDataNodeWriteB64 ( this, b64 ); }
-     inline rc_t WriteB128 ( const void *b128 ) throw()
-     { return KMDataNodeWriteB128 ( this, b128 ); }
-
-
-    /* Write ( formatted )
-     *  writes string
-     *
-     *  "str" [ IN ] - NUL terminated string.
-     */
-     inline rc_t WriteCString ( const char *str ) throw()
-     { return KMDataNodeWriteCString ( this, str ); }
-
-
-    /* ReadAttr
-     *  reads as NUL-terminated string
-     *
-     *  "name" [ IN ] - NUL terminated attribute name
-     *
-     *  "buffer" [ OUT ] and "bsize" - return parameter for attribute value
-     *
-     *  "size" [ OUT ] - return parameter giving size of string
-     *  not including NUL byte. the size is set both upon success
-     *  and insufficient buffer space error.
-     */
-     inline rc_t ReadAttr ( const char *name, char *buffer, 
-        size_t bsize, size_t *size ) const throw()
-     { return KMDataNodeReadAttr ( this, name, buffer, bsize, size ); }
-
-
-    /* WriteAttr
-     *  writes NUL-terminated string
-     *
-     *  "name" [ IN ] - NUL terminated attribute name
-     *
-     *  "value" [ IN ] - NUL terminated attribute value
-     */
-    inline rc_t WriteAttr ( const char *name, const char *value )  throw()
-    { return KMDataNodeWriteAttr ( this, name, value ); }
-
-
-    /* ReadAttrAs ( formatted )
-     *  reads as integer or float value in native byte order
-     *  casts smaller-sized values to desired size, e.g.
-     *    uint32_t to uint64_t
-     *
-     *  "i" [ OUT ] - return parameter for signed integer
-     *  "u" [ OUT ] - return parameter for unsigned integer
-     *  "f" [ OUT ] - return parameter for double float
-     */
-     inline rc_t ReadAttrAsI16 ( const char *attr, int16_t *i ) const throw()
-     { return KMDataNodeReadAttrAsI16 ( this, attr, i ); }
-     inline rc_t ReadAttrAsU16 ( const char *attr, uint16_t *i ) const throw()
-     { return KMDataNodeReadAttrAsU16 ( this, attr, i ); }
-     inline rc_t ReadAttrAsI32 ( const char *attr, int32_t *i ) const throw()
-     { return KMDataNodeReadAttrAsI32 ( this, attr, i ); }
-     inline rc_t ReadAttrAsU32 ( const char *attr, uint32_t *i ) const throw()
-     { return KMDataNodeReadAttrAsU32 ( this, attr, i ); }
-     inline rc_t ReadAttrAsI64 ( const char *attr, int64_t *i ) const throw()
-     { return KMDataNodeReadAttrAsI64 ( this, attr, i ); }
-     inline rc_t ReadAttrAsU64 ( const char *attr, uint64_t *i ) const throw()
-     { return KMDataNodeReadAttrAsU64 ( this, attr, i ); }
-     inline rc_t ReadAttrAsF64 ( const char *attr, double *f ) const throw()
-     { return KMDataNodeReadAttrAsF64 ( this, attr, f ); }
-
-
-     /* Drop
-     *  drop some or all node content
-     */
-     inline rc_t DropAll () throw()
-     { return KMDataNodeDropAll ( this ); }
-     inline rc_t DropAttr ( const char *attr ) throw()
-     { return KMDataNodeDropAttr ( this, attr ); }
-     inline rc_t DropChild ( const char *path, ... ) throw()
-     {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KMDataNodeVDropChild ( this, path, args );
-        va_end ( args );
-        return rc;
-     }
-     inline rc_t DropChild ( const char *path, va_list args ) throw()
-     { return KMDataNodeVDropChild ( this, path, args ); }
-
-
-    /* Rename
-     *  renames a contained object
-     *
-     *  "from" [ IN ] - NUL terminated string in UTF-8
-     *  giving simple name of existing attr
-     *
-     *  "to" [ IN ] - NUL terminated string in UTF-8
-     *  giving new simple attr name
-     */
-    inline rc_t RenameAttr ( const char *from, const char *to ) throw()
-    { return KMDataNodeRenameAttr ( this, from, to ); }
-    inline rc_t RenameChild ( const char *from, const char *to ) throw()
-    { return KMDataNodeRenameChild ( this, from, to ); }
-
-private:
-    KMDataNode ();
-    ~ KMDataNode ();
-    KMDataNode ( const KMDataNode& );
-    KMDataNode &operator = ( const KMDataNode& );
-};
-
-
-#endif // _hpp_kdb_meta_
diff --git a/interfaces/kdb/namelist.h b/interfaces/kdb/namelist.h
deleted file mode 100644
index 68233f4..0000000
--- a/interfaces/kdb/namelist.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kdb_namelist_
-#define _h_kdb_namelist_
-
-#ifndef _h_kdb_extern_
-#include <kdb/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KTable;
-struct KDatabase;
-struct KMDataNode;
-struct KNamelist;
-
-
-/*--------------------------------------------------------------------------
- * KNamelist
- */
-
-/* List
- *  create database listings
- */
-KDB_EXTERN rc_t CC KDatabaseListDB ( struct KDatabase const *self, struct KNamelist **names );
-KDB_EXTERN rc_t CC KDatabaseListTbl ( struct KDatabase const *self, struct KNamelist **names );
-KDB_EXTERN rc_t CC KDatabaseListIdx ( struct KDatabase const *self, struct KNamelist **names );
-
-/* List
- *  create table listings
- */
-KDB_EXTERN rc_t CC KTableListCol ( struct KTable const *self, struct KNamelist **names );
-KDB_EXTERN rc_t CC KTableListIdx ( struct KTable const *self, struct KNamelist **names );
-
-/* List
- *  create metadata node listings
- */
-KDB_EXTERN rc_t CC KMDataNodeListAttr ( struct KMDataNode const *self, struct KNamelist **names );
-KDB_EXTERN rc_t CC KMDataNodeListChildren ( struct KMDataNode const *self, struct KNamelist **names );
-#define KMDataNodeListChild KMDataNodeListChildren
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kdb_namelist_ */
diff --git a/interfaces/kdb/table.h b/interfaces/kdb/table.h
deleted file mode 100644
index bd81c9e..0000000
--- a/interfaces/kdb/table.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kdb_table_
-#define _h_kdb_table_
-
-#ifndef _h_kdb_extern_
-#include <kdb/extern.h>
-#endif
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDatabase;
-struct KDBManager;
-
-
-/*--------------------------------------------------------------------------
- * KTable
- *  a collection of columns indexed by row id, metadata, indices
- */
-typedef struct KTable KTable;
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-KDB_EXTERN rc_t CC KTableAddRef ( const KTable *self );
-KDB_EXTERN rc_t CC KTableRelease ( const KTable *self );
-
-
-/* CreateTable
- * VCreateTable
- *  create a new or open an existing table
- *
- *  "tbl" [ OUT ] - return parameter for newly opened table
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "cmode_mask" [ IN ] - if a bit of "cmode_mask" is set (1) then
- *  the corresponding bit of "cmode" is used for the table,
- *  otherwise (0) the corresponding bit is taken from db and "cmode"'s
- *  bit is ignored
- *  the mask for setting mode (kcmOpen, kcmInit, kcmCreate) is at least
- *  one bit set in the mask kcmValueMask.
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to table
- */
-KDB_EXTERN rc_t CC KDBManagerCreateTable ( struct KDBManager *self,
-    KTable **tbl, KCreateMode cmode, const char *path, ... );
-KDB_EXTERN rc_t CC KDatabaseCreateTableByMask ( struct KDatabase *self,
-    KTable **tbl, KCreateMode cmode, KCreateMode cmode_mask, const char *name, ... );
-/* the following function is DEPRECATED, it's left for backward compatibility only */
-KDB_EXTERN rc_t CC KDatabaseCreateTable ( struct KDatabase *self,
-    KTable **tbl, KCreateMode cmode, const char *name, ... );
-
-/* Default function is added only to make tools/kqsh build possible since
-   it requires 1 to 1 mapping between K- and V-functions
-*/
-/*KDB_EXTERN rc_t CC KDatabaseCreateTableDefault ( struct KDatabase *self,
-    KTable **tbl, const char *name, ... );*/
-KDB_EXTERN rc_t CC KDBManagerVCreateTable ( struct KDBManager *self,
-    KTable **tbl, KCreateMode cmode, const char *path, va_list args );
-KDB_EXTERN rc_t CC KDatabaseVCreateTableByMask ( struct KDatabase *self,
-    KTable **tbl, KCreateMode cmode, KCreateMode cmode_mask, const char *name, va_list args );
-/* the following function is DEPRECATED, it's left for backward compatibility only */
-KDB_EXTERN rc_t CC KDatabaseVCreateTable ( struct KDatabase *self,
-    KTable **tbl, KCreateMode cmode, const char *name, va_list args );
-
-
-/* OpenTableRead
- * VOpenTableRead
- *  open a table for read
- *
- *  "tbl" [ OUT ] - return parameter for newly opened table
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to table
- */
-KDB_EXTERN rc_t CC KDBManagerOpenTableRead ( struct KDBManager const *self,
-    const KTable **tbl, const char *path, ... );
-KDB_EXTERN rc_t CC KDatabaseOpenTableRead ( struct KDatabase const *self,
-    const KTable **tbl, const char *name, ... );
-
-KDB_EXTERN rc_t CC KDBManagerVOpenTableRead ( struct KDBManager const *self,
-    const KTable **tbl, const char *path, va_list args );
-KDB_EXTERN rc_t CC KDatabaseVOpenTableRead ( struct KDatabase const *self,
-    const KTable **tbl, const char *name, va_list args );
-
-
-/* OpenTableUpdate
- * VOpenTableUpdate
- *  open a table for read/write
- *
- *  "tbl" [ OUT ] - return parameter for newly opened table
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving name of table
- */
-KDB_EXTERN rc_t CC KDBManagerOpenTableUpdate ( struct KDBManager *self,
-    KTable **tbl, const char *path, ... );
-KDB_EXTERN rc_t CC KDatabaseOpenTableUpdate ( struct KDatabase *self,
-    KTable **tbl, const char *name, ... );
-
-KDB_EXTERN rc_t CC KDBManagerVOpenTableUpdate ( struct KDBManager *self,
-    KTable **tbl, const char *path, va_list args );
-KDB_EXTERN rc_t CC KDatabaseVOpenTableUpdate ( struct KDatabase *self,
-    KTable **tbl, const char *name, va_list args );
-
-
-/* Locked
- *  returns true if table is locked
- */
-KDB_EXTERN bool CC KTableLocked ( const KTable *self );
-
-
-/* Exists
- *  returns true if requested object exists
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-KDB_EXTERN bool CC KTableExists ( const KTable *self, uint32_t type,
-    const char *name, ... );
-KDB_EXTERN bool CC KTableVExists ( const KTable *self, uint32_t type,
-    const char *name, va_list args );
-
-/* IsAlias
- *  returns true if object name is an alias
- *  returns path to fundamental name if it was aliased
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - optional output buffer
- *  for fundamenta object name if "alias" is not a fundamental name, 
- *
- *  "name" [ IN ] - NUL terminated object name
- */
-KDB_EXTERN bool CC KTableIsAlias ( const KTable *self, uint32_t type,
-    char *resolved, size_t rsize, const char *name );
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-KDB_EXTERN rc_t CC KTableWritable ( const KTable *self, uint32_t type,
-    const char *name, ... );
-KDB_EXTERN rc_t CC KTableVWritable ( const KTable *self, uint32_t type,
-    const char *name, va_list args );
-
-/* Lock
- *  apply lock
- *
- *  if object is already locked, the operation is idempotent
- *  and returns an rc state of rcLocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-KDB_EXTERN rc_t CC KTableLock ( KTable *self, uint32_t type,
-    const char *name, ... );
-KDB_EXTERN rc_t CC KTableVLock ( KTable *self, uint32_t type,
-    const char *name, va_list args );
-
-/* Unlock
- *  remove lock
- *
- *  if object is already unlocked, the operation is idempotent
- *  and returns an rc state of rcUnlocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-KDB_EXTERN rc_t CC KTableUnlock ( KTable *self, uint32_t type,
-    const char *name, ... );
-KDB_EXTERN rc_t CC KTableVUnlock ( KTable *self, uint32_t type,
-    const char *name, va_list args );
-
-
-/* Rename
- *  renames a contained object
- *
- *  "from" [ IN ] - NUL terminated string in UTF-8
- *  giving name of contained object
- *
- *  "to" [ IN ] - NUL terminated string in UTF-8
- *  giving new name
- */
-KDB_EXTERN rc_t CC KTableRenameColumn ( KTable *self, bool force,
-    const char *from, const char *to );
-KDB_EXTERN rc_t CC KTableRenameIndex ( KTable *self, bool force,
-    const char *from, const char *to );
-
-
-/* Alias
- *  create an alias to an existing contained object
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8
- *  giving name of contained object
- *
- *  "alias" [ IN ] - NUL terminated string in UTF-8
- *  giving aliased name
- */
-KDB_EXTERN rc_t CC KTableAliasColumn ( KTable *self, const char *path, const char *alias );
-KDB_EXTERN rc_t CC KTableAliasIndex ( KTable *self, const char *name, const char *alias );
-
-
-/* Drop
- *  drop a contained object
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving column name
- */
-KDB_EXTERN rc_t CC KTableDropColumn ( KTable *self, const char *name, ... );
-KDB_EXTERN rc_t CC KTableDropIndex ( KTable *self, const char *name, ... );
-
-KDB_EXTERN rc_t CC KTableVDropColumn ( KTable *self, const char *name, va_list args );
-KDB_EXTERN rc_t CC KTableVDropIndex ( KTable *self, const char *name, va_list args );
-
-
-/* Reindex
- *  optimize column indices
- */
-KDB_EXTERN rc_t CC KTableReindex ( KTable *self );
-
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-KDB_EXTERN rc_t CC KTableOpenManagerRead ( const KTable *self, struct KDBManager const **mgr );
-KDB_EXTERN rc_t CC KTableOpenManagerUpdate ( KTable *self, struct KDBManager **mgr );
-
-
-/* OpenParent
- *  duplicate reference to parent database
- *  NB - returned reference must be released
- */
-KDB_EXTERN rc_t CC KTableOpenParentRead ( const KTable *self, struct KDatabase const **db );
-KDB_EXTERN rc_t CC KTableOpenParentUpdate ( KTable *self, struct KDatabase **db );
-
-
-/* HasRemoteData
- *  indicates whether some/all table data comes from network resource
- *  such as HttpFile or CacheteeFile
- */
-KDB_EXTERN bool CC KTableHasRemoteData ( const KTable *self );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_kdb_table_ */
diff --git a/interfaces/kfc/callconv.h b/interfaces/kfc/callconv.h
deleted file mode 100644
index 17bdd53..0000000
--- a/interfaces/kfc/callconv.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfc_callconv_
-#define _h_kfc_callconv_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * CC
- *  calling convention
- *  should be declared within compiler/os-specific files
- *  but to make external client builds work, do so here...
- */
-#ifndef CC
- #if defined _MSC_VER
-  #define CC __cdecl
- #else
-  #define CC
- #endif
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_kfc_callconv_ */
diff --git a/interfaces/kfc/ctx.h b/interfaces/kfc/ctx.h
deleted file mode 100644
index 1f98596..0000000
--- a/interfaces/kfc/ctx.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_kfc_ctx_
-#define _h_kfc_ctx_
-
-#ifndef _h_kfc_extern_
-#include <kfc/extern.h>
-#endif
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifndef _h_kfc_rc_
-#include <kfc/rc.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KRsrc;
-
-
-/*--------------------------------------------------------------------------
- * KSourceLoc
- *  holds a static block identifying module, file and file extension.
- *  by including this file in a source compilation, a static block
- *  called "s_src_loc" will be automatically defined.
- */
-typedef struct KSourceLoc KSourceLoc;
-struct KSourceLoc
-{
-    const char * mod;
-    const char * file;
-    const char * ext;
-};
-
-#ifndef SRC_LOC_DEFINED
-static KSourceLoc s_src_loc = { __mod__, __file__, __fext__ };
-#define SRC_LOC_DEFINED 1
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KFuncLoc
- *  holds a static block identifying function and source file.
- */
-typedef struct KFuncLoc KFuncLoc;
-struct KFuncLoc
-{
-    const KSourceLoc * src;
-    const char * func;
-    rc_t rc_context;
-};
-
-#define DECLARE_FUNC_LOC( rc_mod, rc_targ, rc_ctx )                \
-    static KFuncLoc s_func_loc =                                   \
-    { & s_src_loc, __func__, RAW_CTX ( rc_mod, rc_targ, rc_ctx ) }
-
-
-/*--------------------------------------------------------------------------
- * ctx_t
- *  modified from vdb-3
- */
-typedef struct KCtx KCtx;
-struct KCtx
-{
-    struct KRsrc const * rsrc;
-    const KFuncLoc * loc;
-    const KCtx * caller;
-
-    /* record call-stack depth */
-    uint32_t zdepth;
-
-    /* here for hybrid-mode */
-    volatile rc_t rc;
-
-    /* event */
-    void * volatile evt;
-};
-
-/* assert
- * rsrc_assert
- */
-#define ctx_assert( ctx )                       \
-    assert ( ctx != NULL )
-#define ctx_rsrc_assert( ctx )                  \
-    ctx_assert ( ctx );                         \
-    assert ( ctx -> rsrc != NULL )
-
-
-/* init
- *  initialize local context block
- *  performs a particular contortion to allow:
- *   a) initialization of a local ctx_t block
- *   b) reassignment of "ctx" pointer to new block
- *   c) use as an initializer to allow declarations to follow
- */
-static __inline__
-KCtx ctx_init ( KCtx * new_ctx, ctx_t * ctxp, const KFuncLoc * func_loc )
-{
-    /* extract caller's ctx pointer */
-    ctx_t ctx = * ctxp;
-
-    /* construct a local copy of ctx_t as return value
-       allow compiler to zero trailing members more
-       efficiently than by explicit initialization */
-    KCtx local_ctx = { ctx -> rsrc, func_loc, ctx, ctx -> zdepth + 1 };
-
-    /* reassign the "ctx" pointer for stack frame */
-    * ctxp = new_ctx;
-
-    /* "return" the new block - a noop that permits
-       use of this function as an initializer, and
-       further declarations of local variables */
-    return local_ctx;
-}
-
-
-/* FUNC_ENTRY
- *  establishes context within a function
- *  legal to use wherever a normal declaration is allowed
- */
-#define FUNC_ENTRY( ctx, rc_mod, rc_targ, rc_ctx )                      \
-    DECLARE_FUNC_LOC ( rc_mod, rc_targ, rc_ctx );                       \
-    KCtx local_ctx = ctx_init ( & local_ctx, & ( ctx ), & s_func_loc )
-
-
-/* POP_CTX [ RESERVED USAGE ]
- *  unlinks ctx for a stack frame
- *  used ONLY for code that wants to remove itself from call chain
- *  after having executed FUNC_ENTRY, i.e. for thunk operations
- *
- *  normally, a thunk or other piece of code that does not want
- *  to participate in the call chain ctx linkage would simply
- *  avoid using FUNC_ENTRY. however, this can be dangerous if any
- *  errors occur during operation.
- *
- *  to handle this condition, a thunk-like function can use
- *  FUNC_ENTRY in a normal fashion, but unlink with POP_CTX
- *  just prior to calling through to the next function, usually
- *  as a tail-call.
- */
-#define POP_CTX( ctx ) \
-    ctx = ctx -> caller
-
-
-/* recover
- *  queries thread for previously stored KRsrc block
- *  creates a new one if necessary
- */
-KFC_EXTERN ctx_t CC ctx_recover ( KCtx * new_ctx, const KFuncLoc * func_loc );
-
-
-/* HYBRID_FUNC_ENTRY
- *  recovers or creates thread-specific KRsrc block
- *  initializes a local ctx_t
- *  declares a local ctx pointer variable
- */
-#define HYBRID_FUNC_ENTRY( rc_mod, rc_targ, rc_ctx )            \
-    KCtx local_ctx;                                             \
-    DECLARE_FUNC_LOC ( rc_mod, rc_targ, rc_ctx );               \
-    ctx_t ctx = ctx_recover ( & local_ctx, & s_func_loc )
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfc_ctx_ */
diff --git a/interfaces/kfc/defs.h b/interfaces/kfc/defs.h
deleted file mode 100644
index d6bd6f2..0000000
--- a/interfaces/kfc/defs.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfc_defs_
-#define _h_kfc_defs_
-
-#ifndef _h_kfc_callconv_
-#include <kfc/callconv.h>
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#ifdef __cplusplus
-extern "C" {
-#else
-#include <stdbool.h>
-#endif
-
-/*--------------------------------------------------------------------------
- * ctx_t
- *  a thread context block
- */
-typedef struct KCtx const * ctx_t;
-
-
-/*--------------------------------------------------------------------------
- * caps_t
- *  a map of capability bits
- */
-typedef uint32_t caps_t;
-
-
-/*--------------------------------------------------------------------------
- * xobj_t
- *  describes the type of object having problems
- */
-typedef struct { const char *name; } const xobj_t [ 1 ];
-
-
-/*--------------------------------------------------------------------------
- * xstate_t
- *  describes the state of an object having problems
- */
-typedef struct { const char *name; } const xstate_t [ 1 ];
-
-
-/*--------------------------------------------------------------------------
- * xc_t
- *  describes a class of error
- */
-typedef struct { const char *name; } const xc_t [ 1 ];
-
-
-/*--------------------------------------------------------------------------
- * under normal usage, the declarations below will create simple externs.
- * however, they may be redefined to create static objects
- */
-#ifndef XC_DEFINE
-
-#define XOBJ( name, desc, rc )                  \
-    extern xobj_t name
-#define XOBJ_EXT( name, supr, desc, rc )        \
-    extern xobj_t name
-
-#define XSTATE( name, desc, rc )                \
-    extern xstate_t name
-#define XSTATE_EXT( name, supr, desc, rc )      \
-    extern xstate_t name
-
-#define XC( name, obj, state )                  \
-    extern xc_t name
-#define XC_EXT( name, supr )                    \
-    extern xc_t name
-
-#endif /* XC_DEFINE */
-
-
-/*--------------------------------------------------------------------------
- * rc_t - VDB.2 LEGACY
- *  upon success, all functions will return code 0
- *  other codes indicate failure or additional status information
- */
-typedef uint32_t rc_t;
-
-
-/*--------------------------------------------------------------------------
- * ver_t - VDB.2 LEGACY
- *  32 bit 3 part type
- */
-typedef uint32_t ver_t;
-
-/* GetMajor
- *  return major component
- */
-#define VersionGetMajor( self ) \
-    ( ( self ) >> 24 )
-
-/* GetMinor
- *  return minor component
- */
-#define VersionGetMinor( self ) \
-    ( ( ( self ) >> 16 ) & 0xFF )
-
-/* GetRelease
- *  return release component
- */
-#define VersionGetRelease( self ) \
-    ( ( self ) & 0xFFFF )
-
-
-/*--------------------------------------------------------------------------
- * stringize
- *  it is useful to be able to convert PP defines on the command line
- */
-#define stringize( tok ) tok_to_string ( tok )
-#define tok_to_string( tok ) # tok
-
-
-/*--------------------------------------------------------------------------
- * NAME_VERS
- *  synthesize versioned type and message names
- */
-#define NAME_VERS( name, maj_vers ) \
-    MAKE_NAME_VERS1 ( name, maj_vers )
-#define MAKE_NAME_VERS1( name, maj_vers ) \
-    MAKE_NAME_VERS2 ( name, maj_vers )
-#define MAKE_NAME_VERS2( name, maj_vers ) \
-    name ## _v ## maj_vers
-
-/*--------------------------------------------------------------------------
- * __mod__, __file__ and __fext__
- *  these guys are slightly different from __FILE__
- *  and they complement __func__
- */
-#if ! defined __mod__ && defined __mod_name__
-#define __mod__ stringize ( __mod_name__ )
-#endif
-
-#if ! defined __file__ && defined __file_name__
-#define __file__ stringize ( __file_name__ )
-#endif
-
-#if ! defined __fext__ && defined __file_ext__
-#define __fext__ stringize ( __file_ext__ )
-#endif
-
-/*--------------------------------------------------------------------------
- * PKGNAMESTR
- */
-#if ! defined PKGNAMESTR && defined PKGNAME
-#define PKGNAMESTR stringize ( PKGNAME )
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_kfc_defs_ */
-
diff --git a/interfaces/kfc/except.h b/interfaces/kfc/except.h
deleted file mode 100644
index 6128f67..0000000
--- a/interfaces/kfc/except.h
+++ /dev/null
@@ -1,215 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_kfc_except_
-#define _h_kfc_except_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-/* some systems ( Windows ) like to define their own versions
-   of these macros. since we write to our own runtime and not
-   to the OS, include any OS headers ( below ) and then undef */
-
-#ifndef _h_os_oserror_
-#include <oserror.h>
-#endif
-
-#include <stdarg.h>
-
-#undef ERROR
-#undef FAILED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * exception-related macros
- */
-
-/* xc_sev_t
- *  severity
- */
-typedef enum xc_sev_t
-{
-    xc_sev_note,            /* used to create some sort of annotation    */
-    xc_sev_warn,            /* used to call attention to a bad condition */
-    xc_sev_fail,            /* indicates uncorrected failure             */
-    xc_sev_fatal            /* indicates an unrecoverable failure        */
-} xc_sev_t;
-
-/* xc_org_t
- *  origin
- */
-typedef enum xc_org_t
-{
-    xc_org_system,          /* event originated in OS or C libraries     */
-    xc_org_internal,        /* event originated within vdb               */
-    xc_org_user             /* event caused by user or application       */
-} xc_org_t;
-
-
-/* event
- *  create a thread event
- *
- *  "lineno" [ IN ] - the source line where event was created
- *  "severity" [ IN ] - severity of the event
- *  "origin" [ IN ] - origin of the event
- *  "xc" [ IN ] - type of the event
- *  "msg" [ IN, VARARG ] - instance data to be recorded on the event
- */
-void ctx_event ( ctx_t ctx, uint32_t lineno,
-    xc_sev_t severity, xc_org_t origin,
-    xc_t xc, const char *msg, ... );
-void ctx_vevent ( ctx_t ctx, uint32_t lineno,
-    xc_sev_t severity, xc_org_t origin,
-    xc_t xc, const char *msg, va_list args );
-
-
-/* ANNOTATE
- *  make some annotation
- *  but not an error
- */
-#define SYSTEM_ANNOTATE( xc, ... )                                                \
-    ctx_event ( ctx, __LINE__, xc_sev_note, xc_org_system,   xc, __VA_ARGS__ )
-#define INTERNAL_ANNOTATE( xc, ... )                                              \
-    ctx_event ( ctx, __LINE__, xc_sev_note, xc_org_internal, xc, __VA_ARGS__ )
-#define USER_ANNOTATE( xc, ... )                                                  \
-    ctx_event ( ctx, __LINE__, xc_sev_note, xc_org_user,     xc, __VA_ARGS__ )
-
-
-/* WARNING
- *  make an annotation
- *  record a warning as an xc_t
- */
-#define SYSTEM_WARNING( xc, ... )                                                \
-    ctx_event ( ctx, __LINE__, xc_sev_warn, xc_org_system,   xc, __VA_ARGS__ )
-#define INTERNAL_WARNING( xc, ... )                                              \
-    ctx_event ( ctx, __LINE__, xc_sev_warn, xc_org_internal, xc, __VA_ARGS__ )
-#define USER_WARNING( xc, ... )                                                  \
-    ctx_event ( ctx, __LINE__, xc_sev_warn, xc_org_user,     xc, __VA_ARGS__ )
-
-
-/* ERROR
- *  make an annotation
- *  record an error as an xc_t
- */
-#define SYSTEM_ERROR( xc, ... )                                                  \
-    ctx_event ( ctx, __LINE__, xc_sev_fail, xc_org_system,   xc, __VA_ARGS__ )
-#define INTERNAL_ERROR( xc, ... )                                                \
-    ctx_event ( ctx, __LINE__, xc_sev_fail, xc_org_internal, xc, __VA_ARGS__ )
-#define USER_ERROR( xc, ... )                                                    \
-    ctx_event ( ctx, __LINE__, xc_sev_fail, xc_org_user,     xc, __VA_ARGS__ )
-
-
-/* ABORT
- *  make an annotation
- *  record a fatal error as an xc_t
- */
-#define SYSTEM_ABORT( xc, ... )                                                  \
-    ctx_event ( ctx, __LINE__, xc_sev_fatal, xc_org_system,   xc, __VA_ARGS__ )
-#define INTERNAL_ABORT( xc, ... )                                                \
-    ctx_event ( ctx, __LINE__, xc_sev_fatal, xc_org_internal, xc, __VA_ARGS__ )
-#define USER_ABORT( xc, ... )                                                    \
-    ctx_event ( ctx, __LINE__, xc_sev_fatal, xc_org_user,     xc, __VA_ARGS__ )
-
-
-/* UNIMPLEMENTED
- *  marks an error when the code is simply not finished
- */
-#define UNIMPLEMENTED()                                 \
-    INTERNAL_ERROR ( xcUnimplemented, "" )
-
-
-/* FAILED
- *  a test of rc within ctx_t
- */
-#define FAILED()                                        \
-    ( ctx -> rc != 0 )
-
-
-/* TRY
- *  another C language "try" macro
- */
-#define TRY( expr )                                     \
-    expr;                                               \
-    if ( ! FAILED () )
-
-
-/* CATCH
- *  attempts to catch rc on certain types
- */
-bool ctx_xc_isa ( ctx_t ctx, xc_t xc );
-bool ctx_xobj_isa ( ctx_t ctx, xobj_t xo );
-bool ctx_xstate_isa ( ctx_t ctx, xstate_t xs );
-
-#define CATCH( xc )                                     \
-    else if ( ctx_xc_isa ( ctx, xc ) )
-#define CATCH_OBJ( xo )                                 \
-    else if ( ctx_xobj_isa ( ctx, xo ) )
-#define CATCH_STATE( xs )                               \
-    else if ( ctx_xstate_isa ( ctx, xs ) )
-#define CATCH_ALL()                                     \
-    else
-
-
-/* ON_FAIL
- *  reverses TRY logic
- *  generally used for less-structured code,
- *  e.g. ON_FAIL ( x ) return y;
- */
-#define ON_FAIL( expr )                                 \
-    expr;                                               \
-    if ( FAILED () )
-
-
-/* CLEAR
- *  clears annotation and error
- *  used from within CATCH handler
- */
-void ctx_clear ( ctx_t ctx );
-#define CLEAR()                                         \
-    ctx_clear ( ctx )
-
-
-/* WHAT
- *  retrieves current message
- *  if no annotation exists, returns empty string
- */
-const char * ctx_what ( ctx_t ctx );
-#define WHAT()                                          \
-    ctx_what ( ctx )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _h_kfc_except_ */
diff --git a/interfaces/kfc/extern.h b/interfaces/kfc/extern.h
deleted file mode 100644
index 4882bb6..0000000
--- a/interfaces/kfc/extern.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfc_extern_
-#define _h_kfc_extern_
-
-#ifndef _h_kfc_callconv_
-#include <kfc/callconv.h>
-#endif
-
-#if ! defined EXPORT_LATCH && _LIBRARY
-
-#define KFC_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-
-#else
-
-#define KFC_EXTERN LIB_IMPORT
-
-#endif
-
-#if defined _MSC_VER
-
-/* __declspec ( dllimport ) will cause creation of
-   function pointers rather than thunks, which makes
-   the code that imports unable to link statically
-   against a library. we leave this symbol defined as
-   "extern" to use thunks instead. as a result, all
-   function addresses resolve to the thunk and not
-   the actual function. */
-#define LIB_IMPORT extern
-#define LIB_IMPORT_DATA extern __declspec ( dllimport )
-#define LIB_EXPORT __declspec ( dllexport )
-#define LIB_EXPORT_DATA __declspec ( dllexport )
-
-#else
-
-#define LIB_IMPORT extern
-#define LIB_IMPORT_DATA extern
-#define LIB_EXPORT
-#define LIB_EXPORT_DATA
-
-#endif
-
-#endif /* _h_kfc_extern_ */
diff --git a/interfaces/kfc/rc.h b/interfaces/kfc/rc.h
deleted file mode 100644
index 4527445..0000000
--- a/interfaces/kfc/rc.h
+++ /dev/null
@@ -1,352 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfc_rc_
-#define _h_kfc_rc_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * under normal usage, the declarations below will create simple enums.
- * however, they may be redefined to create textual lookup tables.
- */
-#ifndef RC_ENUM
-
-#define RC_ENUM( type ) enum type
-
-#undef RC_ENTRY
-#define RC_ENTRY( id, txt ) id,
-
-#undef RC_VLAST
-#define RC_VLAST( id ) id,
-
-#undef RC_LAST
-#define RC_LAST( id ) id
-
-#define RC_EMIT 1
-
-#endif
-
-/*--------------------------------------------------------------------------
- * RC
- *  upon success, all functions will return code 0
- *  other codes indicate failure or additional status information
- */
-
-
-/* RCModule
- *  what code module generated the error
- */
-RC_ENUM ( RCModule )
-{
-    RC_ENTRY ( rcExe, NULL )
-    RC_ENTRY ( rcRuntime, "runtime" )
-    RC_ENTRY ( rcText, "text" )
-    RC_ENTRY ( rcCont, "container" )
-    RC_ENTRY ( rcCS, "checksum" )
-    RC_ENTRY ( rcFF, "file format detection" )
-    RC_ENTRY ( rcFS, "file system" )
-    RC_ENTRY ( rcPS, "process system" )
-    RC_ENTRY ( rcXF, "transform" )
-    RC_ENTRY ( rcDB, "database" )
-    RC_ENTRY ( rcVDB, "virtual database" )
-    RC_ENTRY ( rcApp, "application support" )
-    RC_ENTRY ( rcXML, "xml support" )
-    RC_ENTRY ( rcSRA, "short read archive" )
-    RC_VLAST ( rcLastModule_v1_0 )
-    RC_ENTRY ( rcKFG = rcLastModule_v1_0, "configuration" )
-    RC_ENTRY ( rcAlign, "alignment" )
-    RC_ENTRY ( rcKrypto, "cryptographic" )
-    RC_ENTRY ( rcRDBMS, "RDBMS" )
-    RC_ENTRY ( rcNS, "network system" )
-    RC_ENTRY ( rcVFS, "virtual file system" )
-    RC_LAST ( rcLastModule_v1_1 )
-};
-
-/* RCTarget
- *  describes the target object of the message
- */
-RC_ENUM ( RCTarget )
-{
-    RC_ENTRY ( rcNoTarg, NULL )
-    RC_ENTRY ( rcArc, "archive file" )
-    RC_ENTRY ( rcToc, "file system table of contents" )
-    RC_ENTRY ( rcTocEntry, "file table of contents entry" )
-    RC_ENTRY ( rcArgv, "argument list" )
-    RC_ENTRY ( rcAttr, "attribute" )
-    RC_ENTRY ( rcBarrier, "barrier" )
-    RC_ENTRY ( rcBlob, "binary large object" )
-    RC_ENTRY ( rcBuffer, "buffer" )
-    RC_ENTRY ( rcChar, "character" )
-    RC_ENTRY ( rcColumn, "column" )
-    RC_ENTRY ( rcCondition, "condition" )
-    RC_ENTRY ( rcCursor, "cursor" )
-    RC_ENTRY ( rcDatabase, "database" )
-    RC_ENTRY ( rcDirectory, "directory" )
-    RC_ENTRY ( rcDoc, "document" )
-    RC_ENTRY ( rcXmlDoc, "XML document" )
-    RC_ENTRY ( rcFile, "file" )
-    RC_ENTRY ( rcFileDesc, "file descriptor" )
-    RC_ENTRY ( rcFileFormat, "file format" )
-    RC_ENTRY ( rcFunction, "function" )
-    RC_ENTRY ( rcFormatter, "formatter" )
-    RC_ENTRY ( rcFunctParam, "function parameter" )
-    RC_ENTRY ( rcHeader, "header" )
-    RC_ENTRY ( rcIndex, "index" )
-    RC_ENTRY ( rcIterator, "iterator" )
-    RC_ENTRY ( rcLock, "lock" )
-    RC_ENTRY ( rcLog, "log" )
-    RC_ENTRY ( rcMD5SumFmt, "MD5 sum file" )
-    RC_ENTRY ( rcMemMap, "memory map" )
-    RC_ENTRY ( rcMetadata, "metadata" )
-    RC_ENTRY ( rcMgr, "manager" )
-    RC_ENTRY ( rcNamelist, "name list" )
-    RC_ENTRY ( rcNode, "node" )
-    RC_ENTRY ( rcNumeral, "numeral" )
-    RC_ENTRY ( rcPagemap, "page map" )
-    RC_ENTRY ( rcPath, "path" )
-    RC_ENTRY ( rcProcess, "process" ) 
-    RC_ENTRY ( rcQueue, "queue" )
-    RC_ENTRY ( rcRWLock, "read/write lock" )
-    RC_ENTRY ( rcSchema, "schema" )
-    RC_ENTRY ( rcSemaphore, "semaphore" )
-    RC_ENTRY ( rcStorage, "storage" )
-    RC_ENTRY ( rcString, "string" )
-    RC_ENTRY ( rcTable, "table" )
-    RC_ENTRY ( rcThread, "thread" )
-    RC_ENTRY ( rcTimeout, "timeout" )
-    RC_ENTRY ( rcToken, "token" )
-    RC_ENTRY ( rcTree, "tree" )
-    RC_ENTRY ( rcTrie, "trie" )
-    RC_ENTRY ( rcType, "type" )
-    RC_ENTRY ( rcVector, "vector" )
-    RC_ENTRY ( rcDylib, "dynamic library" )
-    RC_ENTRY ( rcExpression, "expression" )
-    RC_VLAST ( rcLastTarget_v1_0 )
-    RC_ENTRY ( rcProduction = rcLastTarget_v1_0, "schema production" )
-    RC_ENTRY ( rcEncryptionKey, "encryption key" )
-    RC_ENTRY ( rcRng, "random number generator" )
-    RC_ENTRY ( rcCmd, "command" )
-    RC_ENTRY ( rcData, "data" )
-    RC_ENTRY ( rcQuery, "query" )
-    RC_ENTRY ( rcUri, "uri" )
-    RC_LAST ( rcLastTarget_v1_1 )
-};
-
-/* RCContext
- *  context under which error occurred
- */
-RC_ENUM ( RCContext )
-{
-    RC_ENTRY ( rcAllocating, "allocating" )
-    RC_ENTRY ( rcCasting, "type-casting" )
-    RC_ENTRY ( rcConstructing, "constructing" )
-    RC_ENTRY ( rcDestroying, "destroying" )
-    RC_ENTRY ( rcReleasing, "releasing" )
-    RC_ENTRY ( rcAccessing, "accessing" )
-    RC_ENTRY ( rcListing, "listing" )
-    RC_ENTRY ( rcVisiting, "visiting" )
-    RC_ENTRY ( rcResolving, "resolving" )
-    RC_ENTRY ( rcLocking, "locking" )
-    RC_ENTRY ( rcUnlocking, "unlocking" )
-    RC_ENTRY ( rcRenaming, "renaming" )
-    RC_ENTRY ( rcAliasing, "aliasing" )
-    RC_ENTRY ( rcSelecting, "selecting" )
-    RC_ENTRY ( rcProjecting, "projecting" )
-    RC_ENTRY ( rcInserting, "inserting" )
-    RC_ENTRY ( rcRemoving, "removing" )
-    RC_ENTRY ( rcClearing, "clearing" )
-    RC_ENTRY ( rcUpdating, "updating" )
-    RC_ENTRY ( rcCreating, "creating" )
-    RC_ENTRY ( rcOpening, "opening" )
-    RC_ENTRY ( rcClosing, "closing" )
-    RC_ENTRY ( rcResizing, "resizing" )
-    RC_ENTRY ( rcReading, "reading" )
-    RC_ENTRY ( rcWriting, "writing" )
-    RC_ENTRY ( rcCommitting, "committing" )
-    RC_ENTRY ( rcReverting, "reverting" )
-    RC_ENTRY ( rcResetting, "resetting" )
-    RC_ENTRY ( rcPersisting, "persisting" )
-    RC_ENTRY ( rcFreezing, "freezing" )
-    RC_ENTRY ( rcCopying, "copying" )
-    RC_ENTRY ( rcConcatenating, "concatenating" )
-    RC_ENTRY ( rcFormatting, "formatting" )
-    RC_ENTRY ( rcPositioning, "positioning" )
-    RC_ENTRY ( rcPacking, "packing" )
-    RC_ENTRY ( rcUnpacking, "unpacking" )
-    RC_ENTRY ( rcEncoding, "encoding" )
-    RC_ENTRY ( rcDecoding,"decoding" )
-    RC_ENTRY ( rcValidating, "validating" )
-    RC_ENTRY ( rcExecuting, "executing" )
-    RC_ENTRY ( rcHuffmanCoding, "Huffman coding" )
-    RC_ENTRY ( rcReindexing, "re-indexing" )
-    RC_ENTRY ( rcRegistering, "registering" )
-    RC_ENTRY ( rcTokenizing, "tokenizing" )
-    RC_ENTRY ( rcParsing, "parsing" )
-    RC_ENTRY ( rcConverting, "converting" )
-    RC_ENTRY ( rcSignaling, "signaling" )
-    RC_ENTRY ( rcWaiting, "waiting" )
-    RC_ENTRY ( rcAttaching, "attaching" )
-    RC_ENTRY ( rcDetaching, "detaching" )
-    RC_ENTRY ( rcLogging, "logging" )
-    RC_ENTRY ( rcFPCoding, "floating point coding" )
-    RC_ENTRY ( rcMultiplexing, "(de)multiplexing" )
-    RC_ENTRY ( rcClassifying, "classifying" )
-    RC_ENTRY ( rcSearching, "searching" )
-    RC_ENTRY ( rcLoading, "loading" )
-    RC_ENTRY ( rcEvaluating, "evaluating" )
-    RC_ENTRY ( rcInflating, "inflating" )
-    RC_VLAST ( rcLastContext_v1_0 )
-    RC_ENTRY ( rcFlushing = rcLastContext_v1_0, "flushing" )
-    RC_ENTRY ( rcAppending, "appending" )
-    RC_ENTRY ( rcEncrypting, "encrypting" )
-    RC_ENTRY ( rcDecrypting, "decrypting" )
-    RC_ENTRY ( rcComparing, "comparing" )
-    RC_ENTRY ( rcInitializing, "initializing" )
-    RC_ENTRY ( rcRetrieving, "retrieving" )
-    RC_ENTRY ( rcSending, "sending" )
-    RC_ENTRY ( rcProcessing, "processing" )
-    RC_ENTRY ( rcIdentifying, "type identifying" )
-    RC_LAST ( rcLastContext_v1_1 )
-};
-
-/* RCObject
- *  type of object described by state
- */
-RC_ENUM ( RCObject )
-{
-    RC_ENTRY ( rcNoObj, NULL )
-    RC_ENTRY ( rcLink = ( int ) rcLastTarget_v1_1, "symbolic link" )
-    RC_ENTRY ( rcSelf, "self" )
-    RC_ENTRY ( rcParam, "param" )
-    RC_ENTRY ( rcOffset, "offset" )
-    RC_ENTRY ( rcMemory, "memory" )
-    RC_ENTRY ( rcName, "name" )
-    RC_ENTRY ( rcFormat, "format" )
-    RC_ENTRY ( rcTransfer, "transfer" )
-    RC_ENTRY ( rcInterface, "interface" )
-    RC_ENTRY ( rcId, "id" )
-    RC_ENTRY ( rcRange, "range" )
-    RC_ENTRY ( rcConstraint, "constraint" )
-    RC_ENTRY ( rcByteOrder, "byte order" )
-    RC_ENTRY ( rcMessage, "message" )
-    RC_ENTRY ( rcTag, "tag" )
-    RC_ENTRY ( rcResources, "system resources" )
-    RC_ENTRY ( rcDirEntry, "directory-toc entry" )
-    RC_ENTRY ( rcArcHardLink, "archive hard link" )
-    RC_ENTRY ( rcRow, "row" )
-    RC_ENTRY ( rcLibrary, "loadable library" )
-    RC_VLAST ( rcLastObject_v1_0 )
-    RC_ENTRY ( rcItem = rcLastObject_v1_0, "item" )
-    RC_ENTRY ( rcMode, "mode" )
-    RC_ENTRY ( rcEncryption, "encryption" )
-    RC_ENTRY ( rcCrc, "crc" )
-    RC_ENTRY ( rcChecksum, "checksum" )
-    RC_ENTRY ( rcSeed, "seed" )
-    RC_ENTRY ( rcConnection, "connection" )
-    RC_ENTRY ( rcError, "error" )
-    RC_ENTRY ( rcEnvironment, "environment" )
-    RC_ENTRY ( rcSignalSet, "signal set" )
-    RC_ENTRY ( rcSize, "size" )
-    RC_ENTRY ( rcRefcount, "reference count" )
-    RC_LAST ( rcLastObject_v1_1 )
-};
-
-/* RCState
- *  state of object described
- */
-RC_ENUM ( RCState )
-{
-    RC_ENTRY ( rcNoErr, "no error" )
-    RC_ENTRY ( rcDone, "done" )
-    RC_ENTRY ( rcUnknown, "unknown" )
-    RC_ENTRY ( rcUnsupported, "unsupported" )
-    RC_ENTRY ( rcUnexpected, "unexpected" )
-    RC_ENTRY ( rcUnrecognized, "unrecognized" )
-    RC_ENTRY ( rcAmbiguous, "ambiguous" )
-    RC_ENTRY ( rcNull, "NULL" )
-    RC_ENTRY ( rcBadVersion, "bad version" )
-    RC_ENTRY ( rcDestroyed, "destroyed" )
-    RC_ENTRY ( rcInvalid, "invalid" )
-    RC_ENTRY ( rcCorrupt, "corrupt" )
-    RC_ENTRY ( rcIncorrect, "incorrect" )
-    RC_ENTRY ( rcInconsistent, "inconsistent" )
-    RC_ENTRY ( rcBusy, "busy" )
-    RC_ENTRY ( rcIncomplete, "incomplete" )
-    RC_ENTRY ( rcInterrupted, "interrupted" )
-    RC_ENTRY ( rcCanceled, "canceled" )
-    RC_ENTRY ( rcEmpty, "empty" )
-    RC_ENTRY ( rcExhausted, "exhausted" )
-    RC_ENTRY ( rcInsufficient, "insufficient" )
-    RC_ENTRY ( rcExcessive, "excessive" )
-    RC_ENTRY ( rcViolated, "violated" )
-    RC_ENTRY ( rcExists, "exists" )
-    RC_ENTRY ( rcNotFound, "not found" )
-    RC_ENTRY ( rcLocked, "locked" )
-    RC_ENTRY ( rcUnlocked, "unlocked" )
-    RC_ENTRY ( rcDetached, "detached" )
-    RC_ENTRY ( rcDeadlock, "deadlock" )
-    RC_ENTRY ( rcUnauthorized, "unauthorized" )
-    RC_ENTRY ( rcReadonly, "read-only" )
-    RC_ENTRY ( rcWriteonly, "write-only" )
-    RC_ENTRY ( rcNoPerm, "no permission" )
-    RC_ENTRY ( rcInPlaceNotAllowed, "update in-place prohibited" )
-    RC_ENTRY ( rcTooShort, "too short" )
-    RC_ENTRY ( rcTooLong, "too long" )
-    RC_ENTRY ( rcTooBig, "too big" )
-    RC_ENTRY ( rcDuplicate, "duplicate" )
-    RC_ENTRY ( rcOutOfKDirectory, "path out of this KDirectory FS" )
-    RC_ENTRY ( rcIgnored, "ignored" )	
-    RC_ENTRY ( rcOutofrange, "out of range" )
-    RC_VLAST ( rcLastState_v1_0 )
-    RC_ENTRY ( rcOpen = rcLastState_v1_0, "open" )
-    RC_ENTRY ( rcOutoforder, "out of order" )
-    RC_ENTRY ( rcNotOpen, "not open" )
-    RC_ENTRY ( rcUndefined, "undefined" )
-    RC_ENTRY ( rcUnequal, "unequal" )
-    RC_ENTRY ( rcFailed, "failed" )
-    RC_ENTRY ( rcNotAvailable, "not available" )
-    RC_ENTRY ( rcWrongType, "wrong type" )
-    RC_LAST ( rcLastState_v1_1 )
-};
-
-/* RAW_CTX
- *  form a context from parts
- */
-#define RAW_CTX( mod, targ, ctx )                   \
-    ( ( ( rc_t ) ( mod )  << 27 ) | /* 5 bits */    \
-      ( ( rc_t ) ( targ ) << 21 ) | /* 6 bits */    \
-      ( ( rc_t ) ( ctx )  << 14 ) ) /* 7 bits */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_kfc_rc_ */
diff --git a/interfaces/kfc/refcount-impl.h b/interfaces/kfc/refcount-impl.h
deleted file mode 100644
index 9c7bdb7..0000000
--- a/interfaces/kfc/refcount-impl.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfc_refcount_impl_
-#define _h_kfc_refcount_impl_
-
-#ifndef _h_kfc_extern_
-#include <kfc/extern.h>
-#endif
-
-#ifndef _h_kfc_refcount_
-#include <kfc/refcount.h>
-#endif
-
-#ifndef _h_kfc_vtbl_impl_
-#include <kfc/vtbl-impl.h>
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KRefcount_v1
- *   the class
- */
-struct KRefcount_v1
-{
-    const KVTable * vt;
-    KRefcount refcount;
-
-#if _ARCH_BITS > 32
-    uint8_t align [ sizeof ( void* ) - sizeof ( KRefcount ) ];
-#endif
-
-};
-
-extern KITFTOK_DECL ( KRefcount_v1 );
-
-typedef struct KRefcount_v1_vt KRefcount_v1_vt;
-struct KRefcount_v1_vt
-{
-    KVTable dad;
-
-    /* begin 1.0 */
-    void ( CC * destroy ) ( KRefcount_v1 *self, ctx_t ctx );
-    void * ( CC * dup ) ( const KRefcount_v1 *self, ctx_t ctx, caps_t rm );
-    /* end 1.0 */
-};
-
-
-/* Init
- *  initialize the refcount to 1
- *  may perform logging
- */
-KFC_EXTERN void CC KRefcountInit_v1 ( KRefcount_v1 *self, ctx_t ctx,
-    const KVTable * vt, const char * instance_name );
-
-/* Destroy
- *  has nothing to destroy
- *  may perform logging
- */
-KFC_EXTERN void CC KRefcountDestroy_v1 ( KRefcount_v1 *self, ctx_t ctx );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfc_refcount_impl_ */
diff --git a/interfaces/kfc/refcount.h b/interfaces/kfc/refcount.h
deleted file mode 100644
index cdf5e4b..0000000
--- a/interfaces/kfc/refcount.h
+++ /dev/null
@@ -1,246 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfc_refcount_
-#define _h_kfc_refcount_
-
-#ifndef _h_kfc_extern_
-#include <kfc/extern.h>
-#endif
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifndef _h_atomic32_
-#include <atomic32.h>
-#endif
-
-/* normally turned on */
-#ifndef INLINE_REFCOUNT
-#define INLINE_REFCOUNT 0
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KRefcount_v1
- */
-typedef struct KRefcount_v1 KRefcount_v1;
-
-/* Duplicate
- *  create a duplicate reference
- *
- *  "rm" [ IN ] - capabilities to remove ( default 0 )
- */
-KFC_EXTERN void * CC KRefcountDuplicate_v1 ( KRefcount_v1 * self, ctx_t ctx, caps_t rm );
-
-/* Release
- *  release a reference
- */
-KFC_EXTERN void CC KRefcountRelease_v1 ( KRefcount_v1 * self, ctx_t ctx );
-
-/* TO_REFCOUNT
- *  cast C subclasses to KRefcount_v1
- */
-#define TO_REFCOUNT_V1( self ) \
-    ( ( KRefcount_v1* ) ( self ) )
-
-
-
-/*--------------------------------------------------------------------------
- * KRefcount
- *  signed 32-bit reference counter
- * KDualRef
- *  dual signed/unsigned 16-bit reference counter
- */
-typedef atomic32_t KRefcount;
-typedef atomic32_t KDualRef;
-
-
-/* Actions
- *  enum of action indicators
- */
-enum KRefcountActions
-{
-    krefOkay,      /* no action needs to be taken           */
-    krefWhack,     /* total refcount zero crossing detected */
-    krefZero,      /* owned or dep reference zero crossing  */
-    krefLimit,     /* modification exceeds limits           */
-    krefNegative   /* negative prior or resulting count     */
-};
-
-
-/* Init
- *  initialize a refcount object
- *
- *  "refcount" [ IN/OUT ] - pointer to object being initialized
- *
- *  "value" [ IN ] - initial refcount value
- *    -OR-
- *  "owned" [ IN ] and "dep" [ IN ] - owned and dependent counts
- *  function will return krefLimit if counts exceed limits
- *
- *  "clsname" [ IN ] - NUL-terminated string stating classname
- *  of object instance being initialized.
- *
- *  "op" [ IN ] - NUL-terminated string stating construction operation
- *
- *  "name" [ IN ] - NUL-terminated name of instance
- */
-KFC_EXTERN void CC KRefcountInit ( KRefcount *refcount, int value,
-    const char *clsname, const char *op, const char *name );
-KFC_EXTERN int CC KDualRefInit ( KDualRef *refcount, int owned, int dep,
-    const char *clsname, const char *op, const char *name );
-
-
-/* Whack
- *  tear down whatever was built up in object
- */
-KFC_EXTERN void CC KRefcountWhack ( KRefcount *self, const char *clsname );
-KFC_EXTERN void CC KDualRefWhack ( KDualRef *self, const char *clsname );
-
-
-/* Add
- *  add an owned reference
- *  returns enum value indicating action to be taken
- *
- *  inline implementation always returns krefOkay.
- *
- *  linked-in implementation may return any of the following
- *  codes, depending upon how it was compiled:
- *    krefOkay     : reference was successfully added
- *    krefZero     : reference was added, but prior value was zero
- *    krefLimit    : reference was NOT added, too many references
- *    krefNegative : reference was NOT added, prior value was negative
- */
-KFC_EXTERN int CC KRefcountAdd ( const KRefcount *self, const char *clsname );
-KFC_EXTERN int CC KDualRefAdd ( const KDualRef *self, const char *clsname );
-
-
-/* Drop
- *  drop an owned reference
- *  returns enum value indicating action to be taken
- *
- *  inline implementation returns:
- *    krefOkay     : reference was successfully dropped
- *    krefWhack    : all references are gone and object can be collected
- *
- *  linked-in implementation may return any of the following
- *  codes, depending upon how it was compiled:
- *    krefOkay     : reference was successfully dropped
- *    krefWhack    : all references are gone and object can be collected
- *    krefZero     : reference was dropped, and no further owned refernces exist
- *    krefNegative : reference was NOT dropped, as resultant count would be negative
- */
-KFC_EXTERN int CC KRefcountDrop ( const KRefcount *self, const char *clsname );
-KFC_EXTERN int CC KDualRefDrop ( const KDualRef *self, const char *clsname );
-
-
-/* AddDep
- *  adds a dependency reference
- *  returns enum value indicating action to be taken
- *
- *  inline implementation always returns krefOkay.
- *
- *  linked-in implementation may return any of the following
- *  codes, depending upon how it was compiled:
- *    krefOkay     : reference was successfully added
- *    krefZero     : reference was added, but prior value was zero
- *    krefLimit    : reference was NOT added, too many references
- *    krefNegative : reference was NOT added, prior value was negative
- */
-KFC_EXTERN int CC KRefcountAddDep ( const KRefcount *self, const char *clsname );
-KFC_EXTERN int CC KDualRefAddDep ( const KDualRef *self, const char *clsname );
-
-
-/* DropDep
- *  drop a dependency reference
- *  returns enum value indicating action to be taken
- *
- *  inline implementation returns:
- *    krefOkay     : reference was successfully dropped
- *    krefWhack    : all references are gone and object can be collected
- *
- *  linked-in implementation may return any of the following
- *  codes, depending upon how it was compiled:
- *    krefOkay     : reference was successfully dropped
- *    krefWhack    : all references are gone and object can be collected
- *    krefZero     : reference was dropped, and no further dependent refernces exist
- *    krefNegative : reference was NOT dropped, as resultant count would be negative
- */
-KFC_EXTERN int CC KRefcountDropDep ( const KRefcount *self, const char *clsname );
-KFC_EXTERN int CC KDualRefDropDep ( const KDualRef *self, const char *clsname );
-
-
-
-/*--------------------------------------------------------------------------
- * KRefcount inline implementation
- */
-
-#if INLINE_REFCOUNT
-
-#define KRefcountInit( refcount, value, clsname, op, name ) \
-    ( REFNEW_COMMA ( clsname, op, name, refcount, value ) \
-      atomic32_set ( refcount, value ) )
-#define KRefcountWhack( self, clsname ) \
-    REFMSG ( clsname, "whack", self )
-#define KRefcountAdd( self, clsname ) \
-    ( REFMSG_COMMA ( clsname, "addref", self ) \
-      ( atomic32_read ( self ) < 0 ) ? krefNegative : \
-      ( atomic32_inc ( ( KRefcount* ) ( self ) ), krefOkay ) )
-#define KRefcountDrop( self, clsname ) \
-    ( REFMSG_COMMA ( clsname, "release", self ) \
-      ( atomic32_read ( self ) <= 0 ) ? krefNegative : \
-      ( atomic32_dec_and_test ( ( KRefcount* ) ( self ) ) ? krefWhack : krefOkay ) )
-#define KRefcountAddDep( self, clsname ) \
-    ( REFMSG_COMMA ( clsname, "attach", self ) \
-      ( atomic32_read ( self ) < 0 ) ? krefNegative : \
-      ( atomic32_inc ( ( KRefcount* ) ( self ) ), krefOkay ) )
-#define KRefcountDropDep( self, clsname ) \
-    ( REFMSG_COMMA ( clsname, "sever", self ) \
-      ( atomic32_read ( self ) <= 0 ) ? krefNegative : \
-      ( atomic32_dec_and_test ( ( KRefcount* ) ( self ) ) ? krefWhack : krefOkay ) )
-
-#endif
-
-#define REFNEW( clsname, op, name, instance, refcount ) \
-    ( void ) 0
-#define CNTMSG( clsname, op, instance, refcount ) \
-    ( void ) 0
-#define REFMSG( clsname, op, instance ) \
-    ( void ) 0
-#define REFNEW_COMMA( clsname, op, name, instance, refcount )
-#define REFMSG_COMMA( clsname, op, instance )
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfc_refcount_ */
diff --git a/interfaces/kfc/rsrc-global.h b/interfaces/kfc/rsrc-global.h
deleted file mode 100644
index 6306a6d..0000000
--- a/interfaces/kfc/rsrc-global.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_kfc_rsrc_global_
-#define _h_kfc_rsrc_global_
-
-#ifndef _h_kfc_extern_
-#include <kfc/extern.h>
-#endif
-
-#ifndef _h_kfc_rsrc_
-#include <kfc/rsrc.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KCtx;
-struct KFuncLoc;
-
-
-/*--------------------------------------------------------------------------
- * KRsrc
- */
-
-/* Global
- *  retrieve process-global singleton KRsrc block
- *  initializes block and ctx on initial request
- *  initializes ctx for subsequent requests
- */
-KFC_EXTERN void CC KRsrcGlobalInit ( struct KCtx * ctx,
-    struct KFuncLoc const * loc, bool full );
-
-/* Whack - ONE SHOT
- *  tear down the managers in process main
- *  or within an atexit handler
- */
-KFC_EXTERN void CC KRsrcGlobalWhack ( ctx_t ctx );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfc_rsrc_global_ */
diff --git a/interfaces/kfc/rsrc.h b/interfaces/kfc/rsrc.h
deleted file mode 100644
index dfb9eef..0000000
--- a/interfaces/kfc/rsrc.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_kfc_rsrc_
-#define _h_kfc_rsrc_
-
-#ifndef _h_kfc_extern_
-#include <kfc/extern.h>
-#endif
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KProcMgr;
-struct KMemMgr;
-struct KConfig;
-struct KNSManager;
-struct VFSManager;
-struct KDBManager;
-struct VDBManager;
-struct KThreadState;
-
-
-/*--------------------------------------------------------------------------
- * KRsrc
- *  a very watered-down version of vdb-3 resource capabilities
- */
-typedef struct KRsrc KRsrc;
-struct KRsrc
-{
-    struct KProcMgr     * proc;
-    struct KThreadState * thread;
-    struct KMemMgr      * mem;
-    struct KConfig      * cfg;
-    struct KNSManager   * kns;
-    struct VFSManager   * vfs;
-    struct KDBManager   * kdb;
-    struct VDBManager   * vdb;
-};
-
-
-/* Init
- *  initialize a local block from another
- */
-KFC_EXTERN void CC KRsrcInit ( KRsrc *rsrc, ctx_t ctx );
-
-
-/* Whack
- *  release references
- */
-KFC_EXTERN void CC KRsrcWhack ( KRsrc *self, ctx_t ctx );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfc_rsrc_ */
diff --git a/interfaces/kfc/tstate.h b/interfaces/kfc/tstate.h
deleted file mode 100644
index ecd83b9..0000000
--- a/interfaces/kfc/tstate.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfc_tstate_
-#define _h_kfc_tstate_
-
-#ifndef _h_kfc_extern_
-#include <kfc/extern.h>
-#endif
-
-#ifndef _h_kfc_except_
-#include <kfc/except.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KProcMgr;
-
-
-/*--------------------------------------------------------------------------
- * KThreadState
- *  exection state belonging to the current thread
- */
-typedef struct KThreadState KThreadState;
-
-
-/* MakeThreadState
- *  creates state for a newly created thread
- *  called from the new thread
- */
-KThreadState * KProcMgrMakeThreadState ( struct KProcMgr const * self );
-
-
-/* Whack
- */
-void KThreadStateWhack ( KThreadState * self );
-
-
-/* CaptureEvent
- *  records an event from the exception mechanism
- */
-void KThreadStateEvent ( KThreadState * self, ctx_t ctx,
-    uint32_t lineno, xc_sev_t severity, xc_org_t origin,
-    xc_t xc, const char * msg, va_list args );
-
-
-/* ClearEvents
- *  clears events from a particular point in the callchain
- *  down toward lower points.
- */
-void KThreadStateClearEvents ( KThreadState * self, ctx_t ctx );
-
-
-/* GetMessage
- *  retrieve current event message
- */
-const char * KThreadStateGetMessage ( const KThreadState * self, ctx_t ctx );
-
-
-/* IsXCErr
- */
-bool KThreadStateIsXCErr ( const KThreadState * self, ctx_t ctx, xc_t xc );
-
-/* IsXCObj
- */
-bool KThreadStateIsXCObj ( const KThreadState * self, ctx_t ctx, xobj_t xo );
-
-/* IsXCState
- */
-bool KThreadStateIsXCState ( const KThreadState * self, ctx_t ctx, xstate_t xs );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfc_tstate_ */
diff --git a/interfaces/kfc/vtbl-impl.h b/interfaces/kfc/vtbl-impl.h
deleted file mode 100644
index 7eab2a8..0000000
--- a/interfaces/kfc/vtbl-impl.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfc_vtbl_impl_
-#define _h_kfc_vtbl_impl_
-
-#ifndef _h_kfc_extern_
-#include <kfc/extern.h>
-#endif
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KVTable
- */
-typedef struct KVTable KVTable;
-
-typedef struct KItfTok KItfTok;
-struct KItfTok
-{
-    const char * const _name;
-    uint32_t idx;
-};
-
-/* use this macro to declare an extern */
-#define KITFTOK_DECL( itf_name ) \
-    KItfTok itf_name ## _tok
-
-/* use this macro to define the token */
-#define KITFTOK_DEF( itf_name ) \
-    KItfTok itf_name ## _tok = { #itf_name }
-
-
-typedef struct KHierCache KHierCache;
-struct KHierCache
-{
-    const KHierCache * volatile next;
-
-    size_t length;
-    const KVTable * parent [ 1 ];
-};
-
-struct KVTable
-{
-    /* implementation classname */
-    const char * name;
-
-    /* external token
-       identifies interface class */
-    const KItfTok * itf;
-
-    /* minor version number
-       allows for extensions */
-    size_t min;
-
-    /* single-inheritance
-       pointer to parent */
-    const KVTable * parent;
-
-    /* cached linear inheritance array */
-    const KHierCache * cache;
-};
-
-#define KVTABLE_INITIALIZER( impl_name, itf_name, min_vers, parent_vt )   \
-    { #impl_name, & itf_name ## _tok, min_vers, parent_vt }
-
-
-/* Resolve
- *  walks a vtable's hierarchy
- *  builds a linear array cache of casting pointers
- *  dynamically configures KItfTok objects to cache their runtime offset
- */
-void KVTableResolve ( const KVTable * self, ctx_t ctx );
-
-
-/* Cast
- *  casts a vtable to a particular interface
- *  returns NULL if not found
- */
-static __inline__
-const void * KVTableCast ( const KVTable * self, ctx_t ctx, const KItfTok * itf )
-{
-    if ( self != NULL )
-    {
-        if ( self -> cache == NULL )
-            KVTableResolve ( self, ctx );
-
-        assert ( itf -> idx != 0 );
-        assert ( itf -> idx <= ( uint32_t ) self -> cache -> length );
-
-#if KVTABLE_NO_RTT_CHECK
-        return self -> cache -> parent [ itf -> idx - 1 ];
-#else
-        self = self -> cache -> parent [ itf -> idx - 1 ];
-        if ( self -> itf == itf )
-            return self;
-#endif
-    }
-    return NULL;
-}
-#define KVTABLE_CAST( vt, ctx, itf_name ) \
-    KVTableCast ( vt, ctx, & itf_name ## _tok )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfc_vtbl_impl_ */
diff --git a/interfaces/kfc/xc.h b/interfaces/kfc/xc.h
deleted file mode 100644
index 33bfd51..0000000
--- a/interfaces/kfc/xc.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_kfc_xc_
-#define _h_kfc_xc_
-
-#ifndef _h_kfc_extern_
-#include <kfc/extern.h>
-#endif
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * XOBJ
- *  objects that can have problems
- */
-XOBJ ( xoSelf, "target object reference", rcSelf );
-XOBJ ( xoParam, "parameter", rcParam );
-XOBJ ( xoString, "string", rcString );
-XOBJ ( xoMemory, "process memory", rcMemory );
-XOBJ ( xoError, "error", rcNoObj );
-XOBJ ( xoBehavior, "behavior", rcFunction );
-XOBJ ( xoTable, "table", rcTable );
-XOBJ ( xoCursor, "cursor", rcCursor );
-XOBJ ( xoColumn, "column", rcColumn );
-XOBJ ( xoInteger, "integer", rcParam );
-XOBJ ( xoRow, "row", rcRow );
-XOBJ ( xoRefcount, "number of references", rcRefcount );
-XOBJ ( xoResource, "resource manager", rcMgr );
-XOBJ ( xoIterator, "iterator", rcIterator );
-XOBJ ( xoArc, "archive", rcArc );
-XOBJ ( xoType, "object type", rcType );
-XOBJ ( xoReference, "reference", rcIterator );
-XOBJ ( xoReadGroup, "read group", rcParam );
-XOBJ ( xoFile, "file", rcFile );
-XOBJ ( xoDirectory, "directory", rcDirectory );
-XOBJ ( xoPath, "pat", rcPath );
-XOBJ ( xoInterface, "interface", rcInterface );
-XOBJ ( xoTransfer, "transfer", rcTransfer );
-XOBJ ( xoFunction, "function", rcFunction );
-XOBJ ( xoBuffer, "buffer", rcBuffer );
-XOBJ ( xoFileDescriptor, "file descriptor", rcFileDesc );
-XOBJ ( xoStorage, "storage", rcStorage );
-XOBJ ( xoArgv, "argument vector", rcArgv );
-XOBJ ( xoZlib, "zlib stream", rcBlob );
-XOBJ ( xoAlignment, "alignment", rcData );
-
-/*--------------------------------------------------------------------------
- * XSTATE
- *  states that things can be in
- *  THESE ARE BEING BADLY FILLED OUT
- *  and I started the problem... but it needs to be straightened out.
- */
-XSTATE ( xsIsNull, "is null", rcNull );
-XSTATE ( xsEmpty, "is empty", rcEmpty );
-XSTATE ( xsExhausted, "exhausted", rcExhausted );
-XSTATE ( xsUnexpected, "unexpected", rcUnexpected );
-XSTATE ( xsUnimplemented, "unimplemented", rcUnknown );
-XSTATE ( xsCreateFailed, "failed to create", rcUnknown );
-XSTATE ( xsOpenFailed, "failed to open", rcUnknown );
-XSTATE ( xsNotFound, "not found", rcNotFound );
-XSTATE ( xsReadFailed, "failed to read", rcUnknown );
-XSTATE ( xsOutOfBounds, "out of bounds", rcOutofrange );
-XSTATE ( xsAccessFailed, "failed to access", rcUnknown );
-XSTATE ( xsZombie, "is already freed", rcUnknown );
-XSTATE ( xsExists, "already exists", rcExists );
-XSTATE ( xsWriteOnly, "is write only", rcWriteonly );
-XSTATE ( xsUninitialized, "uninitialized", rcNotOpen );
-XSTATE ( xsIncorrect, "incorrect", rcIncorrect );
-XSTATE ( xsReadOnly, "is read only", rcReadonly );
-XSTATE ( xsInvalid, "invalid", rcInvalid );
-XSTATE ( xsInsufficient, "insufficient", rcInsufficient );
-XSTATE ( xsIncomplete, "incomplete", rcIncomplete );
-XSTATE ( xsFailed, "failed", rcFailed );
-XSTATE ( xsTimeout, "timed out", rcTimeout );
-XSTATE ( xsExcessive, "excessive", rcExcessive );
-XSTATE ( xsUnknown, "unknown", rcUnknown );
-XSTATE ( xsInconsistent, "inconsistent", rcInconsistent );
-XSTATE ( xsUnsupported, "unsupported", rcUnsupported );
-XSTATE_EXT ( xsInitFailed, xsFailed, "init failed", rcFailed );
-XSTATE ( xsNoPrimary, "missing primary", rcInvalid );
-
-/*--------------------------------------------------------------------------
- * XC
- *  error types
- */
-XC ( xcSelfNull, xoSelf, xsIsNull );
-XC ( xcParamNull, xoParam, xsIsNull );
-XC ( xcStringEmpty, xoString, xsEmpty );
-XC ( xcNoMemory, xoMemory, xsExhausted );
-XC ( xcUnexpected, xoError, xsUnexpected );
-XC ( xcUnimplemented, xoBehavior, xsUnimplemented );
-XC ( xcTableOpenFailed, xoTable, xsOpenFailed );
-XC ( xcCursorCreateFailed, xoCursor, xsCreateFailed );
-XC ( xcCursorOpenFailed, xoCursor, xsOpenFailed );
-XC ( xcColumnNotFound, xoColumn, xsNotFound );
-XC ( xcColumnReadFailed, xoColumn, xsReadFailed );
-XC ( xcIntegerOutOfBounds, xoInteger, xsOutOfBounds );
-XC ( xcCursorAccessFailed, xoCursor, xsAccessFailed );
-XC ( xcRowNotFound, xoRow, xsNotFound );
-XC ( xcSelfZombie, xoSelf, xsZombie );
-XC ( xcRefcountOutOfBounds, xoRefcount, xsOutOfBounds );
-XC ( xcParamOutOfBounds, xoParam, xsOutOfBounds );
-XC ( xcResourceExists, xoResource, xsExists );
-XC ( xcCursorExhausted, xoCursor, xsExhausted );
-XC ( xcStringCreateFailed, xoString, xsCreateFailed );
-XC ( xcIteratorUninitialized, xoIterator, xsUninitialized );
-XC ( xcWrongReference, xoParam, xsIncorrect );
-XC ( xcIteratorExhausted, xoIterator, xsExhausted );
-XC ( xcStringNotFound, xoString, xsNotFound );
-XC ( xcParamUnexpected, xoParam, xsUnexpected );
-XC ( xcArcIncorrect, xoArc, xsIncorrect );
-XC ( xcTypeIncorrect, xoType, xsIncorrect );
-XC ( xcWrongReadGroup, xoReadGroup, xsIncorrect );
-XC ( xcInterfaceNull, xoInterface, xsIsNull );
-XC ( xcTransferIncomplete, xoTransfer, xsIncomplete );
-XC ( xcReleaseFailed, xoRefcount, xsFailed );
-XC ( xcFunctionNull, xoFunction, xsIsNull );
-XC ( xcFunctionIncomplete, xoFunction, xsIncomplete );
-XC ( xcPathNull, xoPath, xsIsNull );
-XC ( xcPathEmpty, xoPath, xsEmpty );
-XC ( xcPathInvalid, xoPath, xsInvalid );
-XC ( xcParamInvalid, xoParam, xsInvalid );
-XC ( xcStorageExhausted, xoStorage, xsExhausted );
-XC ( xcFunctionUnimplemented, xoFunction, xsUnimplemented );
-XC ( xcErrorUnknown, xoError, xsUnknown );
-XC ( xcRefcountInconsistent, xoRefcount, xsInconsistent );
-XC ( xcRefcountExcessive, xoRefcount, xsExcessive );
-XC ( xcBufferInsufficient, xoBuffer, xsInsufficient );
-XC ( xcFileReadOnly, xoFile, xsReadOnly );
-XC ( xcFileWriteOnly, xoFile, xsWriteOnly );
-XC ( xcFileInvalidVersion, xoFile, xsInvalid );
-XC ( xcFileNotFound, xoFile, xsNotFound );
-XC ( xcFileTimeout, xoFile, xsTimeout );
-XC ( xcFileUnexpected, xoFile, xsUnexpected );
-XC ( xcFileDescInvalid, xoFileDescriptor, xsInvalid );
-XC ( xcFileExcessive, xoFile, xsExcessive );
-XC ( xcDirectoryInvalidVersion, xoDirectory, xsInvalid );
-XC ( xcDirectoryWriteOnly, xoDirectory, xsWriteOnly );
-XC ( xcFunctionUnsupported, xoFunction, xsUnsupported );
-XC ( xcInterfaceIncorrect, xoInterface, xsIncorrect );
-XC ( xcInterfaceInvalid, xoInterface, xsInvalid );
-XC ( xcColumnEmpty, xoColumn, xsEmpty );
-XC ( xcParamNotFound, xoParam, xsNotFound );
-XC ( xcArgvInvalid, xoArgv, xsInvalid );
-XC ( xcDirectoryNotFound, xoDirectory, xsNotFound );
-XC ( xcFileAccessFailed, xoFile, xsAccessFailed );
-XC ( xcZlibInitFailed, xoZlib, xsInitFailed );
-XC ( xcZlibDataInvalid, xoZlib, xsInvalid );
-XC ( xcSecondaryAlignmentMissingPrimary, xoAlignment, xsNoPrimary );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfc_xc_ */
diff --git a/interfaces/kfc/xcdefs.h b/interfaces/kfc/xcdefs.h
deleted file mode 100644
index 7d88abe..0000000
--- a/interfaces/kfc/xcdefs.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfc_xcdefs_
-#define _h_kfc_xcdefs_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * XCObj
- */
-typedef struct XCObj XCObj;
-struct XCObj
-{
-    const char *name;
-    const char *desc;
-    const XCObj *dad;
-    uint32_t rc_obj;
-};
-
-
-/*--------------------------------------------------------------------------
- * XCState
- */
-typedef struct XCState XCState;
-struct XCState
-{
-    const char *name;
-    const char *desc;
-    const XCState *dad;
-    uint32_t rc_state;
-};
-
-
-/*--------------------------------------------------------------------------
- * XCErr
- */
-typedef struct XCErr XCErr;
-struct XCErr
-{
-    const char *name;
-    const XCErr *dad;
-    const XCObj *obj;
-    const XCState *state;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_kfc_xcdefs_ */
diff --git a/interfaces/kfc/xcext.h b/interfaces/kfc/xcext.h
deleted file mode 100644
index 712e262..0000000
--- a/interfaces/kfc/xcext.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfc_xcext_
-#define _h_kfc_xcext_
-
-/* turn off default macros */
-#define XC_DEFINE 1
-
-#ifdef _h_kfc_defs_
-#error "<kfc/defs.h> must not be included before <kfc/xcext.h>"
-#endif
-
-#ifndef _h_kfc_xcdefs_
-#include <kfc/xcdefs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define XOBJ( name, desc, rc )                  \
-    extern const XCObj name
-#define XOBJ_EXT( name, supr, desc, rc )        \
-    extern const XCObj name
-
-#define XSTATE( name, desc, rc )                \
-    extern const XCState name
-#define XSTATE_EXT( name, supr, desc, rc )      \
-    extern const XCState name
-
-#define XC( name, obj, state )                  \
-    extern const XCErr name
-#define XC_EXT( name, supr )                    \
-    extern const XCErr name
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfc_xcext_ */
diff --git a/interfaces/kfc/xcgen.h b/interfaces/kfc/xcgen.h
deleted file mode 100644
index 64fb1ac..0000000
--- a/interfaces/kfc/xcgen.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfc_xcgen_
-#define _h_kfc_xcgen_
-
-#ifndef _h_kfc_xcext_
-#include <kfc/xcext.h>
-#endif
-
-#ifndef _h_kfc_rc_
-#include <kfc/rc.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#undef XOBJ
-#undef XOBJ_EXT
-#undef XSTATE
-#undef XSTATE_EXT
-#undef XC
-#undef XC_EXT
-
-#define XOBJ( name, desc, rc )                          \
-    const XCObj name = { # name, desc, NULL, rc }
-#define XOBJ_EXT( name, supr, desc, rc )                \
-    const XCObj name = { # name, desc, & supr, rc }
-
-#define XSTATE( name, desc, rc )                        \
-    const XCState name = { # name, desc, NULL, rc }
-#define XSTATE_EXT( name, supr, desc, rc )              \
-    const XCState name = { # name, desc, & supr, rc }
-
-#define XC( name, obj, state )                          \
-    const XCErr name = { # name, NULL, & obj, & state }
-#define XC_EXT( name, supr )                            \
-    const XCErr name = { # name, & supr }
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfc_xcgen_ */
diff --git a/interfaces/kfg/config.h b/interfaces/kfg/config.h
deleted file mode 100644
index 291f2d5..0000000
--- a/interfaces/kfg/config.h
+++ /dev/null
@@ -1,425 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfg_config_
-#define _h_kfg_config_
-
-#ifndef _h_kfg_extern_
-#include <kfg/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This flag has important ramifications to all programs.
- * If set then all programs that use KMain()/KMane() 
- * become dependant on the kfg and kfs libraries.
- *
- * This will also modify the behavior of program tear down.
- * if unset the memory used by the singleton config manager
- * will not be freed.
- */
-#define KFG_COMMON_CREATION 0
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-struct KDirectory;
-struct KNamelist;
-struct VPath;
-struct String;
-
-/*--------------------------------------------------------------------------
- * KConfig
- *  configuration paramter manager
- */
-typedef struct KConfig KConfig;
-
-
-/* Make
- *  create a process-global configuration manager
- *
- *  "cfg" [ OUT ] - return parameter for mgr
- *
- *  "optional_search_base" [ IN, NULL OKAY ]
- */
-KFG_EXTERN rc_t CC KConfigMake ( KConfig **cfg,
-    struct KDirectory const * optional_search_base );
-
-/* AddRef
- * Release
- */
-KFG_EXTERN rc_t CC KConfigAddRef ( const KConfig *self );
-KFG_EXTERN rc_t CC KConfigRelease ( const KConfig *self );
-
-
-/* LoadFile
- * loads a configuration file
- */
-KFG_EXTERN rc_t CC KConfigLoadFile ( KConfig * self,
-    const char * path, struct KFile const * file );
-
-
-/* Commit
- *  Commits changes to user's private configuration file
- *
- *  Respects DisabledUserSettings(do not update default user settings)
- */
-KFG_EXTERN rc_t CC KConfigCommit ( KConfig *self );
-
-/* Read
- *  read a node value
- *
- *  "offset" [ IN ] - initial offset into configuration
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - number of bytes actually read
- *
- *  "remaining" [ OUT, NULL OKAY ] - optional return parameter for
- *  the number of bytes remaining to be read.
- *  specifically, "offset" + "num_read" + "remaining" == sizeof node data
- */
-KFG_EXTERN rc_t CC KConfigRead ( const KConfig *self, const char *path,
-    size_t offset, char *buffer, size_t bsize,
-    size_t *num_read, size_t *remaining );
-
-/* ReadBool
- *  read a boolean node value
- *
- * self [ IN ] - KConfig object
- * path [ IN ] - path to the node
- * result [ OUT ] - return value (true if "TRUE", false if "FALSE"; rc != 0 if neither)
- *
- */
-KFG_EXTERN rc_t CC KConfigReadBool ( const KConfig* self, const char* path, bool* result );
-KFG_EXTERN rc_t CC KConfigWriteBool( KConfig *self, const char * path, bool value );
-    
-/* ReadI64
- *  read an integer node value
- *
- * self [ IN ] - KConfig object
- * path [ IN ] - path to the node
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-KFG_EXTERN rc_t CC KConfigReadI64 ( const KConfig* self, const char* path, int64_t* result );
-
-/* ReadU64
- *  read an unsigned node value
- *
- * self [ IN ] - KConfig object
- * path [ IN ] - path to the node
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-KFG_EXTERN rc_t CC KConfigReadU64 ( const KConfig* self, const char* path, uint64_t* result );
-
-/* ReadF64
- *  read an F64 node value
- *
- * self [ IN ] - KConfig object
- * path [ IN ] - path to the node
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-KFG_EXTERN rc_t CC KConfigReadF64( const KConfig* self, const char* path, double* result );
-
-#if 0
-/*** NB - temporarily lives in vfs due to library interdependencies ***/
-
-/* ReadVPath
- *  read a VPath node value
- *
- * self [ IN ] - KConfig object
- * path [ IN ] - path to the node
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-KFG_EXTERN rc_t CC KConfigReadVPath ( const KConfig* self, const char* path, struct VPath** result );
-#endif
-
-/* ReadString
- *  read a String node value
- *
- * self [ IN ] - KConfig object
- * path [ IN ] - path to the node
- * result [ OUT, NUL-TERMINATED ] - return value; caller responsible for deallocation
- *
- */
-KFG_EXTERN rc_t CC KConfigReadString ( const KConfig* self, const char* path, struct String** result );
-KFG_EXTERN rc_t CC KConfigWriteString( KConfig *self, const char * path, const char * value );
-KFG_EXTERN rc_t CC KConfigWriteSString( KConfig *self, const char * path, struct String const * value );
-
-/* Print
- *  print configuration to output handler (using OUTMSG)
- */
-KFG_EXTERN rc_t CC KConfigPrint ( const KConfig * self, int indent );
-
-KFG_EXTERN rc_t CC KConfigToFile ( const KConfig * self, struct KFile * file );
-
-/* DisableUserSettings
- *  for testing purposes
- */
-KFG_EXTERN void CC KConfigDisableUserSettings ( void );
-
-
-/*--------------------------------------------------------------------------
- * KConfigNode
- *  node within configuration tree
- */
-typedef struct KConfigNode KConfigNode;
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-KFG_EXTERN rc_t CC KConfigNodeAddRef ( const KConfigNode *self );
-KFG_EXTERN rc_t CC KConfigNodeRelease ( const KConfigNode *self );
-
-
-KFG_EXTERN rc_t CC KConfigNodeGetMgr( const KConfigNode * self, KConfig ** mgr );
-
-/* OpenNodeRead
- * VOpenNodeRead
- *  opens a configuration node
- *
- *  "node" [ OUT ] - return parameter for indicated configuration node
- *
- *  "path" [ IN, NULL OKAY ] - optional path for specifying named
- *  node within configuration hierarchy. paths will be interpreted as
- *  if they were file system paths, using '/' as separator. the
- *  special values NULL and "" are interpreted as "."
- */
-KFG_EXTERN rc_t CC KConfigOpenNodeRead ( const KConfig *self,
-    const KConfigNode **node, const char *path, ... );
-KFG_EXTERN rc_t CC KConfigNodeOpenNodeRead ( const KConfigNode *self,
-    const KConfigNode **node, const char *path, ... );
-
-KFG_EXTERN rc_t CC KConfigVOpenNodeRead ( const KConfig *self,
-    const KConfigNode **node, const char *path, va_list args );
-KFG_EXTERN rc_t CC KConfigNodeVOpenNodeRead ( const KConfigNode *self,
-    const KConfigNode **node, const char *path, va_list args );
-
-
-/* OpenNodeUpdate
- * VOpenNodeUpdate
- *  opens a configuration node
- *
- *  "node" [ OUT ] - return parameter for indicated configuration node
- *
- *  "path" [ IN, NULL OKAY ] - optional path for specifying named
- *  node within configuration hierarchy. paths will be interpreted as
- *  if they were file system paths, using '/' as separator. the
- *  special values NULL and "" are interpreted as "."
- */
-KFG_EXTERN rc_t CC KConfigOpenNodeUpdate ( KConfig *self,
-    KConfigNode **node, const char *path, ... );
-KFG_EXTERN rc_t CC KConfigNodeOpenNodeUpdate ( KConfigNode *self,
-    KConfigNode **node, const char *path, ... );
-
-KFG_EXTERN rc_t CC KConfigVOpenNodeUpdate ( KConfig *self,
-    KConfigNode **node, const char *path, va_list args );
-KFG_EXTERN rc_t CC KConfigNodeVOpenNodeUpdate ( KConfigNode *self,
-    KConfigNode **node, const char *path, va_list args );
-
-
-/* Read
- *  read a node value
- *
- *  "offset" [ IN ] - initial offset into configuration
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - number of bytes actually read
- *
- *  "remaining" [ OUT, NULL OKAY ] - optional return parameter for
- *  the number of bytes remaining to be read.
- *  specifically, "offset" + "num_read" + "remaining" == sizeof node data
- */
-KFG_EXTERN rc_t CC KConfigNodeRead ( const KConfigNode *self,
-    size_t offset, char *buffer, size_t bsize,
-    size_t *num_read, size_t *remaining );
-
-/* ReadBool
- *  read a boolean node value
- *
- * self [ IN ] - KConfigNode object
- * result [ OUT ] - return value (true if "TRUE", false if "FALSE"; rc != 0 if neither)
- *
- */
-KFG_EXTERN rc_t CC KConfigNodeReadBool ( const KConfigNode *self, bool* result );
-
-    
-/* ReadI64
- *  read an integer node value
- *
- * self [ IN ] - KConfigNode object
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-KFG_EXTERN rc_t CC KConfigNodeReadI64 ( const KConfigNode *self, int64_t* result );
-
-/* ReadU64
- *  read an unsigned node value
- *
- * self [ IN ] - KConfigNode object
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-KFG_EXTERN rc_t CC KConfigNodeReadU64 ( const KConfigNode *self, uint64_t* result );
-
-/* ReadF64
- *  read an F64 node value
- *
- * self [ IN ] - KConfigNode object
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-KFG_EXTERN rc_t CC KConfigNodeReadF64 ( const KConfigNode *self, double* result );
-
-#if 0
-/*** NB - temporarily lives in vfs due to library interdependencies ***/
-
-/* ReadVPath
- *  read a VPath node value
- *
- * self [ IN ] - KConfigNode object
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-KFG_EXTERN rc_t CC KConfigNodeReadVPath ( const KConfigNode *self, struct VPath** result );
-#endif
-
-/* ReadString
- *  read a String node value
- *
- * self [ IN ] - KConfigNode object
- * result [ OUT ] - return value; caller responsible for deallocation
- *
- */
-KFG_EXTERN rc_t CC KConfigNodeReadString ( const KConfigNode *self, struct String** result );
-
-/* ListChildren - nee ListChild
- *  list all named children
- */
-#define KConfigNodeListChild KConfigNodeListChildren
-KFG_EXTERN rc_t CC KConfigNodeListChildren ( const KConfigNode *self,
-    struct KNamelist **names );
-
-
-/* Write
- *  write a node value or attribute
- *  overwrites anything already there
- *
- *  "buffer" [ IN ] and "size" [ IN ] - new value data
- */
-KFG_EXTERN rc_t CC KConfigNodeWrite ( KConfigNode *self, const char *buffer, size_t size );
-
-
-/* Write Boolean
- *  write a boolean value ( literally the text "true" or "false:
- *  overwrites anything already there
- *
- *  "state" [ IN ] - new value
- */
-KFG_EXTERN rc_t CC KConfigNodeWriteBool ( KConfigNode *self, bool state );
-
-
-/* Append
- *  append data to value
- *
- *  "buffer" [ IN ] and "size" [ IN ] - value data to be appended
- */
-KFG_EXTERN rc_t CC KConfigNodeAppend ( KConfigNode *self, const char *buffer, size_t size );
-
-
-/* ReadAttr
- *  reads as NUL-terminated string
- *
- *  "name" [ IN ] - NUL terminated attribute name
- *
- *  "buffer" [ OUT ] and "bsize" - return parameter for attribute value
- *
- *  "size" [ OUT ] - return parameter giving size of string
- *  not including NUL byte. the size is set both upon success
- *  and insufficient buffer space error.
- */
-KFG_EXTERN rc_t CC KConfigNodeReadAttr ( const KConfigNode *self, const char *name,
-    char *buffer, size_t bsize, size_t *size );
-
-
-/* WriteAttr
- *  writes NUL-terminated string
- *
- *  "name" [ IN ] - NUL terminated attribute name
- *
- *  "value" [ IN ] - NUL terminated attribute value
- */
-KFG_EXTERN rc_t CC KConfigNodeWriteAttr ( KConfigNode *self,
-    const char *name, const char *value );
-
-
-/* Drop
- * VDrop
- *  drop some or all node content
- */
-KFG_EXTERN rc_t CC KConfigNodeDropAll ( KConfigNode *self );
-KFG_EXTERN rc_t CC KConfigNodeDropAttr ( KConfigNode *self, const char *attr );
-KFG_EXTERN rc_t CC KConfigNodeDropChild ( KConfigNode *self, const char *path, ... );
-KFG_EXTERN rc_t CC KConfigNodeVDropChild ( KConfigNode *self, const char *path, va_list args );
-
-
-/* Rename
- *  renames a contained object
- *
- *  "from" [ IN ] - NUL terminated string in UTF-8
- *  giving simple name of existing attr
- *
- *  "to" [ IN ] - NUL terminated string in UTF-8
- *  giving new simple attr name
- */
-KFG_EXTERN rc_t CC KConfigNodeRenameAttr ( KConfigNode *self, const char *from, const char *to );
-KFG_EXTERN rc_t CC KConfigNodeRenameChild ( KConfigNode *self, const char *from, const char *to );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfg_config_ */
diff --git a/interfaces/kfg/extern.h b/interfaces/kfg/extern.h
deleted file mode 100644
index 47e2f43..0000000
--- a/interfaces/kfg/extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfg_extern_
-#define _h_kfg_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define KFG_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define KFG_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_kfg_extern_ */
diff --git a/interfaces/kfg/kart.h b/interfaces/kfg/kart.h
deleted file mode 100644
index fa54fd4..0000000
--- a/interfaces/kfg/kart.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfg_kart_
-#define _h_kfg_kart_
-
-#ifndef _h_kfg_extern_
-#include <kfg/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KDirectory;
-
-/* AA-833 */
-
-typedef struct KartItem KartItem;
-
-KFG_EXTERN rc_t CC KartItemAddRef(const KartItem *self);
-KFG_EXTERN rc_t CC KartItemRelease(const KartItem *self);
-
-/** Do not release the returned String !
- *  N.B. returned String is not required to be NULL-terminated !
-KFG_EXTERN rc_t CC KartItemTypeId(const KartItem *self, const String **elem);
- */
-KFG_EXTERN rc_t CC KartItemProjId(const KartItem *self, const String **elem);
-KFG_EXTERN rc_t CC KartItemProjIdNumber(const KartItem *self, uint64_t *id);
-KFG_EXTERN rc_t CC KartItemItemId(const KartItem *self, const String **elem);
-KFG_EXTERN rc_t CC KartItemItemIdNumber(const KartItem *self, uint64_t *id);
-KFG_EXTERN rc_t CC KartItemAccession(const KartItem *self, const String **elem);
-KFG_EXTERN rc_t CC KartItemName(const KartItem *self, const String **elem);
-KFG_EXTERN rc_t CC KartItemItemDesc(const KartItem *self, const String **elem);
-
-typedef struct Kart Kart;
-
-KFG_EXTERN rc_t CC KartAddRef(const Kart *self);
-KFG_EXTERN rc_t CC KartRelease(const Kart *self);
-
-KFG_EXTERN rc_t CC KartMake(const struct KDirectory *dir, const char *path,
-    Kart **kart, bool *isKart);
-#ifdef _DEBUGGING
-KFG_EXTERN rc_t CC KartMakeText(const struct KDirectory *dir, const char *path,
-    Kart **kart, bool *isKart);
-#endif
-
-KFG_EXTERN rc_t CC KartPrint(const Kart *self);
-KFG_EXTERN rc_t CC KartPrintNumbered(const Kart *self);
-
-KFG_EXTERN rc_t CC KartMakeNextItem(Kart *self, const KartItem **item);
-
-KFG_EXTERN rc_t CC KartItemsProcessed(const Kart *self, uint16_t *number);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfg_kart_ */
diff --git a/interfaces/kfg/keystore-priv.h b/interfaces/kfg/keystore-priv.h
deleted file mode 100644
index f86ac3d..0000000
--- a/interfaces/kfg/keystore-priv.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfg_keystore_priv_
-#define _h_kfg_keystore_priv_
-
-#ifndef _h_kfg_keystore_
-#include <kfg/keystore.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- KEncryptionKey
- */
- struct KEncryptionKey
- {
-    KRefcount   refcount;
-    String      value; /* 0-terminator is not included */
- };
-
-KFG_EXTERN rc_t CC KEncryptionKeyMake(const char* value, KEncryptionKey** key);
- 
-/*--------------------------------------------------------------------------
- KKeyStore 
- */
-#ifndef KKEYSTORE_IMPL
-    #define KKEYSTORE_IMPL struct KKeyStore
-#endif
-
-typedef struct KKeyStore_vt_v1_struct {
-    /* version == 1.x */
-    uint32_t maj;
-    uint32_t min;
-
-    /* start minor version == 0 */
-    rc_t ( *destroy   )                 ( KKEYSTORE_IMPL* self );
-    rc_t ( *getKey )                    ( const KKEYSTORE_IMPL* self, const char* obj_key, KEncryptionKey** enc_key);
-    /* end minor version == 0 */
-
-} KKeyStore_vt_v1;
-
-typedef union KKeyStore_vt {
-    KKeyStore_vt_v1* v1;
-} KKeyStore_vt;
-
-/* KKeyStoreSetConfig
- * Specify the Config object used by the KeyStore object. If the object is not specified, one will be created 
- * when required using KConfigMake
- *
- * kfg [ IN, NULL OK ] if NULL, forget the current kfg object
- */
-KFG_EXTERN rc_t CC KKeyStoreSetConfig(struct KKeyStore* self, const struct KConfig* kfg);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfg_keystore_priv_ */
diff --git a/interfaces/kfg/keystore.h b/interfaces/kfg/keystore.h
deleted file mode 100644
index 28b97db..0000000
--- a/interfaces/kfg/keystore.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfg_keystore_
-#define _h_kfg_keystore_
-
-#ifndef _h_kfg_extern_
-#include <kfg/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KFile;
-struct KConfig;
-struct String;
-
-/*--------------------------------------------------------------------------
- * KEncryptionKey
- *  Encryption key, reference-counted and kept in non-swappable memory
- */
-typedef struct KEncryptionKey KEncryptionKey;
-
-KFG_EXTERN rc_t CC KEncryptionKeyAddRef ( struct KEncryptionKey *self );
-KFG_EXTERN rc_t CC KEncryptionKeyRelease ( struct KEncryptionKey *self );
-
-
-/*--------------------------------------------------------------------------
- * KKeyStore
- *  Encryption key storage interface
- */
-typedef struct KKeyStore KKeyStore;
-
- /* all strings are NUL-terminated */
- 
-/* AddRef
- */
-KFG_EXTERN rc_t CC KKeyStoreAddRef ( const KKeyStore *self );
-/* Release
- */
-KFG_EXTERN rc_t CC KKeyStoreRelease ( const KKeyStore *self );
-
-/* 
- * KKeyStoreSetTemporaryKeyFromFile
- *
- *  set a temporarily encryption key 
- *  the key will only be maintained for this instance of KKeyStore (use for externally supplied keys).
- * 
- *  enc_file[ IN, NULL OK ] - open KFile containing the key (characters after the first \n are ignored)
- *  if NULL is specified, forget the previously set temporary key
- */
-KFG_EXTERN rc_t CC KKeyStoreSetTemporaryKeyFromFile(KKeyStore* self, const struct KFile* enc_file);
-
-/* KKeyStoreGetKey
- * KKeyStoreGetKeyByProjectId
- *  returns the encryption key associated with the specified object
- * 
- *  obj_key [ IN, NULL OK ] - NUL-terminated key of the object in question. The key can be an accession name, or a file system path.
- *      If NULL, will return the current protected repository's key,
- *      or, if projectId is passed, will return project's repository's key,
- *      or, if not within a protected repository, the global key if available
- *      from environment or configuration 
- *  enc_key [ OUT ] 
- */
-KFG_EXTERN rc_t CC KKeyStoreGetKey(const KKeyStore* self, const char* obj_key, KEncryptionKey** enc_key);
-
-KFG_EXTERN rc_t CC KKeyStoreGetKeyByProjectId(const KKeyStore* self,
-    const char* obj_key, KEncryptionKey** enc_key, uint32_t projectId);
-
-/*
- * Registering bindings between numeric object Ids and object names
- */                                        
- 
-/* KKeyStoreSetBindingsFile
- *  Specifies location of a bindings file used by this instance of KeyStore. 
- *  If never set or set to NULL, uses default location ($NCBI_HOME/objid.mapping)
- * 
- * self [ IN ] - KKeyStore object
- * path [ IN, NUL-TERMINATED, NULL OK ] - pathname to the bindings file. If NULL, reset to default location ($NCBI_HOME/objid.mapping)
- */
-KFG_EXTERN rc_t CC KKeyStoreSetBindingsFile(struct KKeyStore* self, const char* path);
-
-/* KKeyStoreGetBindingsFile
- *  Returns location of a bindings file used by this instance of KeyStore. 
- * 
- * self [ IN ] - KKeyStore object
- * returns pathname to the bindings file. If NULL, default location will be used when needed
- */
-KFG_EXTERN const char* KKeyStoreGetBindingsFile(const struct KKeyStore* self);
- 
-/* KKeyStoreRegisterObject
- *  registers a binding between an object Id and an object name 
- * 
- * self [ IN ] - KKeyStore object
- * oid [ IN ] - object id
- * obj [ IN ] - object's name (any characters except '\r' and '\n' )
- */
-KFG_EXTERN rc_t CC KKeyStoreRegisterObject(struct KKeyStore* self, uint32_t oid, const struct String* name);
-
-/* KKeyStoreGetObjectId
- *  look up an object id by an object name 
- * 
- * self [ IN ] - KKeyStore object
- * obj [ IN ] - object's name 
- * oid [ OUT ] - object id
- */
-KFG_EXTERN rc_t CC VKKeyStoreGetObjectId(const struct KKeyStore* self, const struct String* name, uint32_t* oid);
-
-/* KKeyStoreGetObjectName
- *  look up an object name by an object id
- * 
- * self [ IN ] - KKeyStore object
- * obj [ IN ] - object's name 
- * oid [ OUT ] - object id
- */
-KFG_EXTERN rc_t CC KKeyStoreGetObjectName(const struct KKeyStore* self, uint32_t oid, const struct String** name);
-
-
-/* KKeyStoreMake
- * Creates a non-keyring implementation, which uses a combination of location-based and global encryption keys.
- * 
- * self [ OUT ]
- * kfg [ IN, NULL OK ] - optional config object to use
- */
-KFG_EXTERN rc_t CC KKeyStoreMake(KKeyStore** self, struct KConfig* kfg);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfg_keystore_ */
diff --git a/interfaces/kfg/kfg-priv.h b/interfaces/kfg/kfg-priv.h
deleted file mode 100644
index 8a8dcba..0000000
--- a/interfaces/kfg/kfg-priv.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*==============================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfg_kfg_priv_
-#define _h_kfg_kfg_priv_
-
-#ifndef _h_kfg_extern_
-#include <kfg/extern.h>
-#endif
-
-#ifndef _h_kfg_config_
-#include <kfg/config.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDirectory;
-struct KNamelist;
-
-
-/*--------------------------------------------------------------------------
- * Environment and configuration keys
- */
-#define ENV_KRYPTO_PWFILE_OLD   "VDB_PWFILE"
-#define ENV_KRYPTO_PWFILE   "VDBPWFILEPTR"
-#define KFG_KRYPTO_PWFILE   "krypto/pwfile"
-#define KFG_KRYPTO_PWFD     "krypto/pwfd"
-
-/*--------------------------------------------------------------------------
- * KConfig
- *  configuration paramter manager
- */
-
-/* ListIncluded
- *  list all included files
- */
-KFG_EXTERN rc_t CC KConfigListIncluded ( const KConfig *self,
-    struct KNamelist **names );
-
-/* GetLoadPath
- *  return colon-separated search path to load KConfig
- * NB. path should not be released
- */
-KFG_EXTERN rc_t CC KConfigGetLoadPath ( const KConfig *self,
-    const char **path );
-
-/* MakeLocal
- *  make a KConfig object that avoids singleton
- */
-KFG_EXTERN rc_t CC KConfigMakeLocal ( KConfig **cfg,
-    struct KDirectory const * cfgdir );
-
-/* PrintDebug
- *  print configuration including some internal nodes information
- */
-KFG_EXTERN rc_t CC KConfigPrintDebug ( const KConfig *self,
-    const char *root_node_name );
-
-/* PrintPartial
- *  print configuration while skipping some nodes
- */
-KFG_EXTERN rc_t CC KConfigPrintPartial
-    ( const KConfig *self, int indent, uint32_t skipCount, va_list args );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfg_kfg_priv_ */
diff --git a/interfaces/kfg/ngc.h b/interfaces/kfg/ngc.h
deleted file mode 100644
index b3269a4..0000000
--- a/interfaces/kfg/ngc.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfg_ngc_
-#define _h_kfg_ngc_
-
-#ifndef _h_kfg_extern_
-#include <kfg/extern.h>
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct KNgcObj KNgcObj;
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-
-
-KFG_EXTERN rc_t CC KNgcObjMakeFromString ( const KNgcObj **ngc, const char * line );
-KFG_EXTERN rc_t CC KNgcObjMakeFromFile ( const KNgcObj **ngc, const struct KFile * src );
-
-/* AddRef
- * Release
- */
-KFG_EXTERN rc_t CC KNgcObjAddRef ( const KNgcObj *self );
-KFG_EXTERN rc_t CC KNgcObjRelease ( const KNgcObj *self );
-
-KFG_EXTERN rc_t CC KNgcObjPrint ( const KNgcObj *self, char * buffer, size_t buffer_size, size_t * written );
-KFG_EXTERN rc_t CC KNgcObjWriteToFile ( const KNgcObj *self, struct KFile * dst );
-KFG_EXTERN rc_t CC KNgcObjWriteKeyToFile ( const KNgcObj *self, struct KFile * dst );
-
-KFG_EXTERN rc_t CC KNgcObjGetProjectId ( const KNgcObj *self, uint32_t * id );
-KFG_EXTERN rc_t CC KNgcObjGetProjectName ( const KNgcObj *self, char * buffer, size_t buffer_size, size_t * written );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfg_ngc_ */
diff --git a/interfaces/kfg/properties.h b/interfaces/kfg/properties.h
deleted file mode 100644
index 88cf630..0000000
--- a/interfaces/kfg/properties.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfg_properties_
-#define _h_kfg_properties_
-
-#ifndef _h_kfg_extern_
-#include <kfg/extern.h>
-#endif
-
-#ifndef _h_kfg_config_
-#include <kfg/config.h>
-#endif
-
-#ifndef _h_kfg_ngc_
-#include <kfg/ngc.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* get/set HTTP proxy path */
-KFG_EXTERN rc_t CC KConfig_Get_Http_Proxy_Path
-    ( const KConfig *self, char *buffer, size_t buffer_size, size_t *written );
-KFG_EXTERN rc_t CC KConfig_Set_Http_Proxy_Path
-    ( KConfig *self, const char *value );
-
-/* get/set enabled-state for HTTP proxy */
-KFG_EXTERN rc_t CC KConfig_Get_Http_Proxy_Enabled
-    ( const KConfig *self, bool *enabled, bool dflt );
-KFG_EXTERN rc_t CC KConfig_Set_Http_Proxy_Enabled
-    ( KConfig *self, bool enabled );
-
-
-/* get the %HOME% path from config
- */
-KFG_EXTERN rc_t CC KConfig_Get_Home( const KConfig *self, char * buffer, size_t buffer_size, size_t * written );
-
-/* get/set the default path for proposing a path for ngc-imports
- */
-KFG_EXTERN rc_t CC KConfig_Get_Default_User_Path( const KConfig *self, char * buffer, size_t buffer_size, size_t * written );
-KFG_EXTERN rc_t CC KConfig_Set_Default_User_Path( const KConfig *self, const char * value );
-
-/* get/set the enabled-state for the 3 repository-categories
- */
-KFG_EXTERN rc_t CC KConfig_Get_Remote_Access_Enabled
-    ( const KConfig *self, bool * enabled );
-KFG_EXTERN rc_t CC KConfig_Get_Remote_Main_Cgi_Access_Enabled
-    ( const KConfig *self, bool * enabled );
-KFG_EXTERN rc_t CC KConfig_Get_Remote_Aux_Ncbi_Access_Enabled
-    ( const KConfig *self, bool * enabled );
-
-KFG_EXTERN rc_t CC KConfig_Set_Remote_Access_Enabled( KConfig *self, bool enabled );
-
-KFG_EXTERN rc_t CC KConfig_Get_Site_Access_Enabled( const KConfig *self, bool * enabled );
-KFG_EXTERN rc_t CC KConfig_Set_Site_Access_Enabled( KConfig *self, bool enabled );
-
-KFG_EXTERN rc_t CC KConfig_Get_User_Access_Enabled( const KConfig *self, bool * enabled );
-KFG_EXTERN rc_t CC KConfig_Set_User_Access_Enabled( KConfig *self, bool enabled );
-
-
-/* get/set the the cache-enabled-state for the public/protected repositories
- */
-KFG_EXTERN rc_t CC KConfig_Get_User_Public_Enabled( const KConfig *self, bool * enabled );
-KFG_EXTERN rc_t CC KConfig_Set_User_Public_Enabled( KConfig *self, bool enabled );
-
-KFG_EXTERN rc_t CC KConfig_Get_User_Public_Cached( const KConfig *self, bool * enabled );
-KFG_EXTERN rc_t CC KConfig_Set_User_Public_Cached( KConfig *self, bool enabled );
-
-KFG_EXTERN rc_t CC KConfig_Get_User_Protected_Cached( const KConfig *self, bool * enabled, const char * name );
-KFG_EXTERN rc_t CC KConfig_Set_User_Protected_Cached( KConfig *self, bool enabled, const char * name );
-
-
-/* get/set the the cache-location for the public/protected repositories
- */
-KFG_EXTERN rc_t CC KConfig_Get_User_Public_Cache_Location( const KConfig *self,
-    char * value, size_t value_size, size_t * written );
-KFG_EXTERN rc_t CC KConfig_Set_User_Public_Cache_Location( KConfig *self, const char * value );
-
-
-/* Query protected repositories
- */
-KFG_EXTERN rc_t CC KConfigGetProtectedRepositoryCount( const KConfig *self,
-    uint32_t * count );
-KFG_EXTERN rc_t CC KConfigGetProtectedRepositoryName( const KConfig *self,
-    uint32_t id, char * buffer, size_t buffer_size, size_t * written );
-KFG_EXTERN rc_t CC KConfigGetProtectedRepositoryPathById( const KConfig *self,
-    uint32_t id, char * buffer, size_t buffer_size, size_t * written );
-KFG_EXTERN rc_t CC KConfigSetProtectedRepositoryPathById( KConfig *self, uint32_t id, const char * value );
-
-KFG_EXTERN rc_t CC KConfigGetProtectedRepositoryIdByName( const KConfig *self,
-    const char * name, uint32_t * id );
-KFG_EXTERN rc_t CC KConfigGetProtectedRepositoryPathByName( const KConfig *self,
-    const char * name, char * buffer, size_t buffer_size, size_t * written );
-KFG_EXTERN rc_t CC KConfigGetProtectedRepositoryDescriptionByName(
-    const KConfig *self,
-    const char * name, char * buffer, size_t buffer_size, size_t * written );
-
-KFG_EXTERN rc_t CC KConfigDoesProtectedRepositoryExist( const KConfig *self, const char * name, bool * res );
-
-
-KFG_EXTERN rc_t CC KConfigGetProtectedRepositoryEnabledById( const KConfig *self, uint32_t id, bool * enabled );
-KFG_EXTERN rc_t CC KConfigSetProtectedRepositoryEnabledById( KConfig *self, uint32_t id, bool enabled );
-
-KFG_EXTERN rc_t CC KConfigGetProtectedRepositoryCachedById( const KConfig *self, uint32_t id, bool * enabled );
-KFG_EXTERN rc_t CC KConfigSetProtectedRepositoryCachedById( KConfig *self, uint32_t id, bool enabled );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfg_properties_ */
diff --git a/interfaces/kfg/repository.h b/interfaces/kfg/repository.h
deleted file mode 100644
index 45c961d..0000000
--- a/interfaces/kfg/repository.h
+++ /dev/null
@@ -1,421 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfg_repository_
-#define _h_kfg_repository_
-
-#ifndef _h_kfg_extern_
-#include <kfg/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KConfig;
-struct KNgcObj;
-
-/*--------------------------------------------------------------------------
- * KRepository
- *  presents structured access to a storage repository
- *  as modeled in KConfig.
- *
- *  all objects are obtained via KRepositoryMgr ( see below )
- */
-typedef struct KRepository KRepository;
-
-
-/* AddRef
- * Release
- */
-KFG_EXTERN rc_t CC KRepositoryAddRef ( const KRepository *self );
-KFG_EXTERN rc_t CC KRepositoryRelease ( const KRepository *self );
-
-
-/* Category
- * SubCategory
- *  tells what the repository category or sub-category are
- *  or returns "bad" if the repository object is not usable.
- */
-typedef uint32_t KRepCategory;
-enum
-{
-    krepBadCategory,
-    krepUserCategory,
-    krepSiteCategory,
-    krepRemoteCategory
-};
-
-typedef uint32_t KRepSubCategory;
-enum
-{
-    krepBadSubCategory,
-    krepMainSubCategory,
-    krepAuxSubCategory,
-    krepProtectedSubCategory
-};
-
-KFG_EXTERN KRepCategory CC KRepositoryCategory ( const KRepository *self );
-KFG_EXTERN KRepSubCategory CC KRepositorySubCategory ( const KRepository *self );
-
-
-/* Name
- *  get the repository name
- *  attempts to copy NUL-terminated name into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - name output parameter
- *
- *  "name_size" [ OUT, NULL OKAY ] - returns the name size in
- *  bytes, excluding any NUL termination.
- */
-KFG_EXTERN rc_t CC KRepositoryName ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *name_size );
-
-
-/* DisplayName
- *  get the repository display name,
- *  if different from its actual name
- *
- *  attempts to copy NUL-terminated name into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - name output parameter
- *
- *  "name_size" [ OUT, NULL OKAY ] - returns the name size in
- *  bytes, excluding any NUL termination.
- */
-KFG_EXTERN rc_t CC KRepositoryDisplayName ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *name_size );
-
-
-/* Root
- *  read the root path as a POSIX path or URL
- *
- *  attempts to copy NUL-terminated path into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - path output parameter
- *
- *  "root_size" [ OUT, NULL OKAY ] - returns the path size in
- *  bytes, excluding any NUL termination.
- */
-KFG_EXTERN rc_t CC KRepositoryRoot ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *root_size );
-
-
-/* SetRoot
- *  set the root path
- *
- *  "root" [ IN ] and "root_size" [ IN ] - path input parameter
- */
-KFG_EXTERN rc_t CC KRepositorySetRoot( KRepository *self,
-    const char *root, size_t root_size );
-
-
-/* RootHistory
- *  read the root-history as a semicolon separated list of POSIX paths
- *
- *  attempts to copy NUL-terminated path into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - path output parameter
- *
- *  "roothistory_size" [ OUT, NULL OKAY ] - returns the root-history
- *  size in bytes, excluding any NUL termination.
- */
-KFG_EXTERN rc_t CC KRepositoryRootHistory ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *roothistory_size );
-
-
-/* SetRootHistory
- *  set the root-history list of paths
- *
- *  "roothistory" [ IN ] and "roothistory_size" [ IN ] - path input parameter
- */
-KFG_EXTERN rc_t CC KRepositorySetRootHistory( KRepository *self,
-    const char *roothistory, size_t roothistory_size  );
-
-
-/* AppendToRootHistory
- *  append to the root-history
- *
- *  "roothistory" [ IN ] and "roothistory_size" [ IN ] - path input parameter
- *  if item == NULL, add the current root to the root-history
- */
-KFG_EXTERN rc_t CC KRepositoryAppendToRootHistory( KRepository *self,
-    const char *item  );
-
-
-/* Resolver
- *  read the url of the CGI-resolver
- *
- *  attempts to copy NUL-terminated path into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - path output parameter
- *
- *  "written" [ OUT, NULL OKAY ] - returns the url size in
- *  bytes, excluding any NUL termination.
- */
-KFG_EXTERN rc_t CC KRepositoryResolver ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *written );
-
-
-/* Disabled
- *  discover whether the repository is enabled
- */
-KFG_EXTERN bool CC KRepositoryDisabled ( const KRepository *self );
-
-
-/* Set Disabled
- *  changes the status of a repository, writes status into kfg-file on disk
- *  disabled = true  ... disables the repository
- *  disabled = false ... enables the repository
- */
-KFG_EXTERN rc_t CC KRepositorySetDisabled ( const KRepository *self, bool disabled );
-
-
-/* CacheEnabled
- *  discover whether the repository supports caching
- */
-KFG_EXTERN bool CC KRepositoryCacheEnabled ( const KRepository *self );
-
-
-/* DownloadTicket
- *  return any associated download ticket
- *
- *  attempts to copy NUL-terminated ticket into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - ticket output parameter
- *
- *  "ticket_size" [ OUT, NULL OKAY ] - returns the ticket size in
- *  bytes, excluding any NUL termination.
- */
-KFG_EXTERN rc_t CC KRepositoryDownloadTicket ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *ticket_size );
-
-
-/* EncryptionKey
- *  return any associated encryption key
- *
- *  attempts to copy NUL-terminated key into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - encryption key output parameter
- *
- *  "key_size" [ OUT, NULL OKAY ] - returns the key size in
- *  bytes, excluding any NUL termination.
- */
-KFG_EXTERN rc_t CC KRepositoryEncryptionKey ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *key_size );
-
-
-/* EncryptionKeyFile
- *  return path to any associated encryption key file
- *
- *  attempts to copy NUL-terminated path into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - key file path output parameter
- *
- *  "path_size" [ OUT, NULL OKAY ] - returns the path size in
- *  bytes, excluding any NUL termination.
- */
-KFG_EXTERN rc_t CC KRepositoryEncryptionKeyFile ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *path_size );
-
-
-/* Description
- *  return any associated descriptive text
- *
- *  attempts to copy NUL-terminated description into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - description text output parameter
- *
- *  "desc_size" [ OUT, NULL OKAY ] - returns the text size in
- *  bytes, excluding any NUL termination.
- */
-KFG_EXTERN rc_t CC KRepositoryDescription ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *desc_size );
-
-
-/* ProjectId
- *  return project id for protected user repository
- *  return RC when repository is not user protected
- *
- *  "projectId" [ OUT ] - returns the project id
- */
-KFG_EXTERN rc_t CC KRepositoryProjectId
-    ( const KRepository * self, uint32_t * projectId );
-
-
-/* Description
- *  register an encrypted object in association with the repository's encryption key
- */
-KFG_EXTERN rc_t CC KRepositoryRegisterObject ( const KRepository *self, const char* object_id );
-
-
-/*--------------------------------------------------------------------------
- * KRepositoryVector
- *  uses Vector API
- *  holds zero or more KRepository objects
- */
-typedef struct Vector KRepositoryVector;
-
-
-/* Whack
- *  destroy your vector
- */
-KFG_EXTERN rc_t CC KRepositoryVectorWhack ( KRepositoryVector *self );
-
-
-/*--------------------------------------------------------------------------
- * KRepositoryMgr
- *  manages structured access to repositories
- */
-typedef struct KRepositoryMgr KRepositoryMgr;
-
-typedef uint32_t RepositorySelect;
-enum
-{
-    user = 1,
-    site = 2,
-    remote = 4,
-};
-
-/* Make
- *  create a repository manager
- *  uses values from "self"
- *
- *  mgr [ OUT ] 
- */
-KFG_EXTERN rc_t CC KConfigMakeRepositoryMgrRead ( struct KConfig const *self, const KRepositoryMgr **mgr );
-KFG_EXTERN rc_t CC KConfigMakeRepositoryMgrUpdate ( struct KConfig *self, KRepositoryMgr **mgr );
-
-
-/* AddRef
- * Release
- */
-KFG_EXTERN rc_t CC KRepositoryMgrAddRef ( const KRepositoryMgr *self );
-KFG_EXTERN rc_t CC KRepositoryMgrRelease ( const KRepositoryMgr *self );
-
-
-/* UserRepositories
- *  retrieve all user repositories in a Vector
- */
-KFG_EXTERN rc_t CC KRepositoryMgrUserRepositories ( const KRepositoryMgr *self,
-    KRepositoryVector *user_repositories );
-
-
-/* SiteRepositories
- *  retrieve all site repositories in a Vector
- */
-KFG_EXTERN rc_t CC KRepositoryMgrSiteRepositories ( const KRepositoryMgr *self,
-    KRepositoryVector *site_repositories );
-
-
-/* RemoteRepositories
- *  retrieve all remote repositories in a Vector
- */
-KFG_EXTERN rc_t CC KRepositoryMgrRemoteRepositories ( const KRepositoryMgr *self,
-    KRepositoryVector *remote_repositories );
-
-/* CurrentProtectedRepository
- *  returns the currently active user protected repository
- */
-KFG_EXTERN rc_t CC KRepositoryMgrCurrentProtectedRepository ( const KRepositoryMgr *self,
-    const KRepository **p_protected );
-
-/* GetProtectedRepository
- *  retrieves a (read-only) user protected repository by its associated project-id
- */
-KFG_EXTERN rc_t CC KRepositoryMgrGetProtectedRepository ( const KRepositoryMgr *self, 
-    uint32_t projectId, 
-    const KRepository **p_protected );
-
-
-/* Getter/Setter for the global disabled-node on the main-category
- */
-KFG_EXTERN bool CC KRepositoryMgrCategoryDisabled ( const KRepositoryMgr *self, KRepCategory category );
-KFG_EXTERN rc_t CC KRepositoryMgrCategorySetDisabled ( const KRepositoryMgr *self, KRepCategory category, bool disabled );
-
-
-/* ImportNgc
- *  import ngc file into current configuration
- *
- * self [ IN ] - KConfig object
- * path [ IN ] - path to the ngc file
- * pathToProtectedRepository [ IN, NULL OKAY ] - optional - the
- *  special value NULL is interpreted as ${HOME}/ncbi/dbGaP-$(Project #)
- * newRepoParentPath [ OUT, NULL OKAY ] - optional - 
- *  path to the new protected repository: should not be released!
- */
-KFG_EXTERN rc_t CC KConfigImportNgc( struct KConfig * self,
-    const char *ngcPath, const char *pathToProtectedRepository,
-    const char **newRepoParentPath);
-
-
-enum
-{
-    /* on input, these bits represent authority to perform operation.
-       on success, they represent operations performed.
-       on failure, they represent reason for failure. */
-
-    INP_CREATE_REPOSITORY  = ( 1 << 0 ),   /* permission to create a new entry         */
-    INP_UPDATE_DNLD_TICKET = ( 1 << 1 ),   /* permission to modifify a download ticket */
-    INP_UPDATE_ENC_KEY     = ( 1 << 2 ),   /* permission to modify an encryption key   */
-    INP_UPDATE_DESC        = ( 1 << 3 ),   /* permission to modify a description       */
-    INP_UPDATE_ROOT        = ( 1 << 4 ),   /* permission to modify root path */
-
-    INP_UPDATE_APPS        = ( 1 << 5 ),   /* modify apps :
-         is used as return value only:
-         permission is not required - apps update it will be always performed */
-};
-
-/* ImportNgcObj
- *   import of a KNgcObj
- *
- *  the KNgcObj has to be created with KNgcObjMakeFromFile() kfg/ngc.h
- *  the permission-flags define what the functions is allowd to do
- *  result flags show what was done according to the permissions
- */
-KFG_EXTERN rc_t CC KRepositoryMgrImportNgcObj( KRepositoryMgr *self,
-    const struct KNgcObj * ngc, const char * location, uint32_t permissions, uint32_t * result_flags );
-
-
-/* HasRemoteAccess
- *  whether remote access is available (has an enabled remote repository)
- */
-KFG_EXTERN bool CC KRepositoryMgrHasRemoteAccess ( const KRepositoryMgr *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfg_repository_ */
diff --git a/interfaces/kfs/arc.h b/interfaces/kfs/arc.h
deleted file mode 100644
index 6071258..0000000
--- a/interfaces/kfs/arc.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_arc_
-#define _h_kfs_arc_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <kfs/toc.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KDirectory;
-struct KFile;
-struct KToc;
-struct vector;
-
-/* validate_header_offsets
- *	This function is a special friend function to the archive package used
- *	to validate that the compiler used to build the package matches 
- *	used structure offsets "correctly" to enable the parsing of TAR files.
- * NOTE:
- *	This function should not be used except by ktartest (klib/tools/ktartest.c).
- *	It is built only in a special logging version of the libraries.
- */
-KFS_EXTERN bool CC validate_header_offsets(void);
-
-typedef struct KArcDir KArcDir;
-typedef struct KArcFile KArcFile;
-
-typedef uint32_t KArcFSType;
-enum eKArcFSType
-{
-    tocUnknown,
-    tocKFile,
-    tocKDirectory,
-    tocKVirtual
-};
-
-
-/* OpenArcDirRead
- *
- * This should probably move into the toc-priv with a specific call to open each archive type
- * with the parse private and not needing the dad-gummed CC and KFS_EXTERN
- *  Open an archive file as a KDirectory derived type: made to match 
- *  KDirectoryOpenDirRead() where parse could be the first element of arg
- *
- * [IN]  dir    A KDirectory (of any derived type) to reach the archive file
- * [OUT] pdir   The KDirectory (of type KArcDir) that will be created
- * [IN]  chroot if non-zero, the new directory becomes chroot'd and interprets paths
- *      stating with '/'
- * [IN]  path   The path to the archive - this will become the directory path
- * [IN]  parse  A pointer to the function needed to build a TOC by parsing the file
- *
- * parameters to parse
- * REQUIRED:    KToc *
- * REQUIRED:    void *  KFile* | KDirectory* | ???
- * OPTIONAL:    bool (*)(const char*)           Filter: include or skip this path
- * OPTIONAL:    rc_t (*)(???)               Sort: reorder name list
- */
-KFS_EXTERN rc_t CC KDirectoryOpenArcDirRead(const struct KDirectory * self, 
-    const struct KDirectory ** pdir, bool chroot, const char * path, KArcFSType baseType,
-    rc_t ( CC * parse )(struct KToc *,const void *,
-        bool( CC * )(const struct KDirectory*, const char *, void*), void*),
-        bool (CC* filter )(const KDirectory*, const char *, void *), void * filterparam);
-
-KFS_EXTERN rc_t CC KDirectoryOpenArcDirRead_silent(const struct KDirectory * self, 
-    const struct KDirectory ** pdir, bool chroot, const char * path, KArcFSType baseType,
-    rc_t ( CC * parse )(struct KToc *,const void *,
-        bool( CC * )(const struct KDirectory*, const char *, void*), void*),
-        bool (CC* filter )(const KDirectory*, const char *, void *), void * filterparam);
-
-KFS_EXTERN rc_t CC KDirectoryOpenArcDirRead_silent_preopened(const struct KDirectory * self, 
-    const struct KDirectory ** pdir, bool chroot, const char * path, KArcFSType baseType,
-    void * f,
-    rc_t ( CC * parse )(struct KToc *,const void *,
-        bool( CC * )(const struct KDirectory*, const char *, void*), void*),
-        bool (CC* filter )(const KDirectory*, const char *, void *), void * filterparam);
-
-
-KFS_EXTERN bool CC KDirectoryIsKArcDir ( const KDirectory * self );
-KFS_EXTERN bool CC KArcDirIsFromRemote ( const KArcDir * self );
-
-
-#if 0
-/* ----------------------------------------------------------------------
- * KDirectoryToKArcDir
- *
- * [IN]  const KDirectory * 	self	Object oriented C
- * [OUT] const KArcDir * 	cast	Object oriented C
- *
- *
- * Get a reference to a KArcDir from a KDirectory as a cast.  It is a new reference.
- */
-
-KFS_EXTERN rc_t CC KDirectoryToKArcDir (const KDirectory * self, const KArcDir ** cast);
-
-KFS_EXTERN rc_t CC KArcDirList ( const KArcDir *self, struct KNamelist **list,
-    bool ( CC * f ) ( const KArcDir *dir, const char *name, void *data ),
-    void *data, const char *path, ... );
-KFS_EXTERN rc_t CC KArcDirVList ( const KArcDir *self, struct KNamelist **list,
-    bool ( CC * f ) ( const KArcDir *dir, const char *name, void *data ),
-    void *data, const char *path, va_list args );
-#endif
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_arc_ */
diff --git a/interfaces/kfs/arrayfile.h b/interfaces/kfs/arrayfile.h
deleted file mode 100644
index 079c92c..0000000
--- a/interfaces/kfs/arrayfile.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_arrayfile_
-#define _h_kfs_arrayfile_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_klib_namelist_
-#include <klib/namelist.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-
-
-/*--------------------------------------------------------------------------
- * KArrayFile
- *  an array-file is created from a KFile
- */
-typedef struct KArrayFile KArrayFile;
-
-
-/* Make
- *  make an array file from a KFile
- */
-/*
-KFS_EXTERN rc_t CC KArrayFileMakeRead ( const KArrayFile **af, struct KFile const *file );
-KFS_EXTERN rc_t CC KArrayFileMakeUpdate ( KArrayFile **af, struct KFile *file );
-*/
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KFS_EXTERN rc_t CC KArrayFileAddRef ( const KArrayFile *self );
-KFS_EXTERN rc_t CC KArrayFileRelease ( const KArrayFile *self );
-
-
-/* Dimensionality
- *  returns the number of dimensions in the ArrayFile
- *
- *  "dim" [ OUT ] - return parameter for number of dimensions
- */
-KFS_EXTERN rc_t CC KArrayFileDimensionality ( const KArrayFile *self, uint8_t *dim );
-
-
-/* SetDimensionality
- *  sets the number of dimensions in the ArrayFile
- *
- *  "dim" [ IN ] - new number of dimensions; must be > 0
- */
-KFS_EXTERN rc_t CC KArrayFileSetDimensionality ( KArrayFile *self, uint8_t dim );
-
-
-/* DimExtents
- *  returns the extent of every dimension
- *
- *  "dim" [ IN ] - the dimensionality of "extents"
- *
- *  "extents" [ OUT ] - returns the extent for every dimension
- */
-KFS_EXTERN rc_t CC KArrayFileDimExtents ( const KArrayFile *self, uint8_t dim, uint64_t *extents );
-
-
-/* SetDimExtents
- *  sets the new extents for every dimension
- *
- *  "dim" [ IN ] - the dimensionality of "extents"
- *
- *  "extents" [ IN ] - new extents for every dimension
- */
-KFS_EXTERN rc_t CC KArrayFileSetDimExtents ( KArrayFile *self, uint8_t dim, uint64_t *extents );
-
-
-/* ElementSize
- *  returns the element size in bits
- *
- *  "elem_bits" [ OUT ] - size of each element in bits
- */
-KFS_EXTERN rc_t CC KArrayFileElementSize ( const KArrayFile *self, uint64_t *elem_bits );
-
-
-/* Read
- *  read from n-dimensional position
- *
- *  "dim" [ IN ] - the dimensionality of all vectors
- *
- *  "pos"  [ IN ] - n-dimensional starting position in elements
- *
- *  "buffer" [ OUT ] and "elem_count" [ IN ] - return buffer for read
- *  where "elem_count" is n-dimensional in elements
- *
- *  "num_read" [ OUT ] - n-dimensional return parameter giving back
- *      the number of read elements in every dimension
- */
-KFS_EXTERN rc_t CC KArrayFileRead ( const KArrayFile *self, uint8_t dim,
-    const uint64_t *pos, void *buffer, const uint64_t *elem_count,
-    uint64_t *num_read );
-
-
-/* Read_v
- *  read one element of variable length from n-dimensional position
- *
- *  "dim" [ IN ] - the dimensionality of all vectors
- *
- *  "pos"  [ IN ] - n-dimensional starting position in elements
- *
- *  "buffer" [ OUT ] and "elem_count" [ IN ] - return buffer for read
- *  where "elem_count" is length of buffer in elements
- *
- *  "num_read" [ OUT ] - return parameter giving back
- *      the number of read elements in every dimension
- */
-KFS_EXTERN rc_t CC KArrayFileRead_v ( const KArrayFile *self, uint8_t dim,
-    const uint64_t *pos, void *buffer, const uint64_t elem_count,
-    uint64_t *num_read );
-
-
-/* Write
- *  write into n-dimensional position
- *
- *  "dim" [ IN ] - the dimensionality of all vectors
- *
- *  "pos"  [ IN ] - n-dimensional offset where to write to
- *                   in elements
- *
- *  "buffer" [ IN ] and "elem_count" [ IN ] - data to be written
- *  where "elem_count" is n-dimensional in elements
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of elements actually written per dimension
- */
-KFS_EXTERN rc_t CC KArrayFileWrite ( KArrayFile *self, uint8_t dim,
-    const uint64_t *pos, const void *buffer, const uint64_t *elem_count,
-    uint64_t *num_writ );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_arrayfile_ */
diff --git a/interfaces/kfs/buffile.h b/interfaces/kfs/buffile.h
deleted file mode 100644
index f32837b..0000000
--- a/interfaces/kfs/buffile.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_buffile_
-#define _h_kfs_buffile_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-
-
-/*--------------------------------------------------------------------------
- * KFile
- */
-
-/* MakeBufferedRead
- *  make a read-only file buffer
- *
- *  "buf" [ OUT ] - return parameter for new buffered file
- *
- *  "original" [ IN ] - source file to be buffered. must have read access
- *
- *  "bsize" [ IN ] - buffer size
- */
-KFS_EXTERN rc_t CC KBufFileMakeRead ( struct KFile const ** buf,
-    struct KFile const * original, size_t bsize );
-
-
-/* MakeBufferedWrite
- *  make a writable file buffer
- *
- *  "buf" [ OUT ] - return parameter for new buffered file
- *
- *  "original" [ IN ] - source file to be buffered. must have read access
- *
- *  "update" [ IN ] - if true, make a read/write buffer
- *
- *  "bsize" [ IN ] - buffer size
- */
-KFS_EXTERN rc_t CC KBufFileMakeWrite ( struct KFile ** buf,
-    struct KFile * original, bool update, size_t bsize );
-
-
-
-
-KFS_EXTERN rc_t CC KBufReadFileMakeRead ( const struct KFile ** bp,
-     const struct KFile * original, size_t bsize );
-
-KFS_EXTERN rc_t CC KBufWriteFileMakeWrite ( struct KFile ** bp,
-     struct KFile * original, size_t bsize );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_buffile_ */
diff --git a/interfaces/kfs/bzip.h b/interfaces/kfs/bzip.h
deleted file mode 100644
index f91db85..0000000
--- a/interfaces/kfs/bzip.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*=======================================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_bzip_
-#define _h_kfs_bzip_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-
-/* MakeBzip2ForRead
- *  creates an adapter to bunzip2 a source file
- *
- *  "bz" [ OUT ] - return parameter for decompressed file
- *
- *  "src" [ IN ] - compressed source file with read permission
- *
- * NB - creates a read-only file that does NOT support random access
- *  i.e. must be consumed serially starting from offset 0
- */
-KFS_EXTERN rc_t CC KFileMakeBzip2ForRead ( struct KFile const **bz, struct KFile const *src );
-
-
-/* MakeBzip2ForWrite
- *  creates an adapter to gzip a source file
- *
- *  "bz" [ OUT ] - return parameter for compressed file
- *
- *  "src" [ IN ] - uncompressed source file with write permission
- *
- * NB - creates a write-only file that does NOT suppport random access
- *  i.e. must be written serially from offset 0
- */
-KFS_EXTERN rc_t CC KFileMakeBzip2ForWrite ( struct KFile **bz, struct KFile *src );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_bzip_ */
diff --git a/interfaces/kfs/cacheteefile.h b/interfaces/kfs/cacheteefile.h
deleted file mode 100644
index 6e2d04b..0000000
--- a/interfaces/kfs/cacheteefile.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_cacheteefile_
-#define _h_kfs_cacheteefile_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-struct KDirectory;
-
-
-/*--------------------------------------------------------------------------
- * KDirectory
- */
-
-/* MakeCacheTee
- *  takes a KFile as source
- *
- *  "tee" [ OUT ] - return parameter for tee file
- *
- *  "remote" [ IN ] - the source file, generally costly to read which is
- *  the motivation behind caching its output
- *
- *  "logger" [ IN, NULL OKAY ] - optional debugging output for observing
- *  access patterns of "remote"
- *
- *  "blocksize" [ IN ] - the cache-file page size
- *                       ( if 0 ... default-value will be 32k )
- *
- *  "cluster" [ IN ] - a blocking factor for accessing "remote"
- *  reads are in blocks of size "blocksize" * "cluster"
- *  ( 1...4 makes most sense )
- *
- *  "report" [ IN ] - when true, provides more verbose debugging output
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting full cache file, i.e. the name of the file
- *  as it would appear after promoting from partial to full status.
- *
- * the function creates a new ( cached ) KFile in **tee
- *
- * the caller can access this file to read and query the filesize, these are the only
- * supported messages to this object
- *
- * when the caller requests data that is not already cached in the local file,
- * the cached file will read from the remote-file, write into the local-file and then
- * return the requested data in the read-buffer
- *
- * when the caller requests data that is already cached, the data will be read from
- * the local file only, no remote request will be made
- *
- * when the caller requests data this is partially cached, the file will return the
- * part that comes first either from the remote or from the local file
- * in this case the file will return less data than requested
- *
- * when the caller opens an existing local file that contains a full copy of the
- * remote file, the local KFile will be returned in self
- *
- * this function will check if the remote-file and the local file ( if it already exists )
- * do have the same size and blocksize
- *
- */
-KFS_EXTERN rc_t CC KDirectoryMakeCacheTee ( struct KDirectory *self,
-    struct KFile const **tee, struct KFile const *remote,
-    uint32_t blocksize, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVMakeCacheTee ( struct KDirectory *self,
-    struct KFile const **tee, struct KFile const *remote,
-    uint32_t blocksize, const char *path, va_list args );
-
-/* -----
- * checks if a given file ( has to be a local file )
- *
- * a ... is a backing cache-file for the CacheTee-file
- * b ... all blocks have been filled with the remote content
- *
- * it returns the result of the check in *is_complete
- */
-KFS_EXTERN rc_t CC IsCacheFileComplete( const struct KFile * self, bool * is_complete );
-
-
-/* -----
- * truncates a cache-file for a CacheTee-filec by removing the bitmap/content-lenght/block-size
- *
- * it returns the result of the check in *is_complete
- */
-KFS_EXTERN rc_t CC TruncateCacheFile( struct KFile * self );
-
-
-/* -----
- * examens the file, and reports what percentage of blocks are in the cache...
- *
- */
-KFS_EXTERN rc_t CC GetCacheCompleteness( const struct KFile * self, float * percent, uint64_t * bytes_in_cache );
-
-
-/* -----
- * examens the file, and reports the size of the original file ( without the cachefile-footer )
- *
- */
-KFS_EXTERN rc_t CC GetCacheTruncatedSize( const struct KFile * self, uint64_t * truncated_size );
-
-/* -----
- * examens the file, and reports how many blocks have data in them, and how many of these are zero'd out
- *
- */
-KFS_EXTERN rc_t CC Has_Cache_Zero_Blocks( const struct KFile * self, uint64_t * checked_blocks, uint64_t * empty_blocks );
-
-
-/* -----
- * checks if the given file is completely cached, self has to be a open cacheteefile
- *
- */
-
-KFS_EXTERN rc_t CC IsCacheTeeComplete( const struct KFile * self, bool * complete );
-
-KFS_EXTERN bool CC KFileIsKCacheTeeFile( const struct KFile * self );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_teefile_ */
diff --git a/interfaces/kfs/countfile.h b/interfaces/kfs/countfile.h
deleted file mode 100644
index 4b1c720..0000000
--- a/interfaces/kfs/countfile.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_counterfile_
-#define _h_kfs_counterfile_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KFile;
-
-typedef struct KCounterFile KCounterFile;
-
-/* -----
- * Copy can be a serialized type KFile for a KCounterFile opened for Read but
- * not when opened for write.
- *
- * Specifically this means copy can be a KMD5File for read but not for write
- * other KFile subtypes might have the same restriction.
- *
- * A seekless update KCounterfile can be created but does not now exist.
- *
- * bytecounter points to where to write a total byte count for the file.
- *
- * linecounter points to where to write a count of the lines of a file.
- *     if NULL this functionality is disabled.
- *
- * force_reads causes a read to the end of file on close rather than relying on pass along KFileSize
- */
-KFS_EXTERN rc_t CC KFileMakeCounterRead (const struct KFile ** self, const KFile * original,
-                                         uint64_t * bytecounter, uint64_t * linecounter, bool force_reads);
-KFS_EXTERN rc_t CC KFileMakeCounterWrite (struct KFile ** self, struct KFile * original,
-                                          uint64_t * bytecounter, uint64_t * linecounter, bool force_reads);
-KFS_EXTERN rc_t CC KFileMakeCounterUpdate (struct KFile ** self, struct KFile * original,
-                                           uint64_t * bytecounter, uint64_t * linecounter, bool force_reads);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_counterfile_ */
diff --git a/interfaces/kfs/crc.h b/interfaces/kfs/crc.h
deleted file mode 100644
index c3e56dd..0000000
--- a/interfaces/kfs/crc.h
+++ /dev/null
@@ -1,292 +0,0 @@
-/*=======================================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_crc_
-#define _h_kfs_crc_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-
-
-/*--------------------------------------------------------------------------
- * KCRC32SumFmt
- *  a formatter for reading or writing an crc32sum-style checksum file
- */
-typedef struct KCRC32SumFmt KCRC32SumFmt;
-
-
-/* AddRef
- * Release
- */
-KFS_EXTERN rc_t CC KCRC32SumFmtAddRef ( const KCRC32SumFmt *self );
-KFS_EXTERN rc_t CC KCRC32SumFmtRelease ( const KCRC32SumFmt *self );
-
-
-/* Make
- *  creates a formatted accessor to textual checksum file
- *  takes over ownership of "in"/"out" file reference
- *
- *  "in" [ IN ] - readable checksum input file
- *  -OR-
- *  "out" [ IN ] - writable checksum file. if readable as well,
- *  its contents will be preserved.
- */
-KFS_EXTERN rc_t CC KCRC32SumFmtMakeRead ( const KCRC32SumFmt **f, struct KFile const *in );
-KFS_EXTERN rc_t CC KCRC32SumFmtMakeUpdate ( KCRC32SumFmt **f, struct KFile *out );
-
-
-/* Count
- *  return the number of checksums in file
- */
-KFS_EXTERN rc_t CC KCRC32SumFmtCount ( const KCRC32SumFmt *self, uint32_t *count );
-
-
-/* Get
- *  retrieve an indexed checksum line
- *
- *  "idx" [ IN ] - zero-based index of checksum to access
- *
- *  "path" [ OUT ] and "size" [ IN ] - return buffer for file path
- *
- *  "crc32" [ OUT ] - return parameter for the checksum
- *
- *  "bin" [ OUT, NULL OKAY ] - true if fopen mode used to
- *  calculate "digest" was binary, false if text. pertinent if
- *  digest was calculated using DOS text mode.
- */
-KFS_EXTERN rc_t CC KCRC32SumFmtGet ( const KCRC32SumFmt *self, uint32_t idx,
-    char *path, size_t size, uint32_t *crc32, bool *bin );
-
-
-/* Find
- *  retrieve checksum line by path
- *
- *  "path" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file
- *
- *  "crc32" [ OUT ] - return parameter for the checksum
- *
- *  "bin" [ OUT, NULL OKAY ] - true if fopen mode used to
- *  calculate "digest" was binary, false if text. pertinent if
- *  digest was calculated using DOS text mode.
- */
-KFS_EXTERN rc_t CC KCRC32SumFmtFind ( const KCRC32SumFmt *self,
-    const char *path, uint32_t *crc32, bool *bin );
-
-
-/* Delete
- *  remove an existing line
- *
- *  "path" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file
- *
- *  returns rcNotFound if not present
- */
-KFS_EXTERN rc_t CC KCRC32SumFmtDelete ( KCRC32SumFmt *self, const char *path );
-
-
-/* Update
- *  add a checksum line to file or update an existing line
- *
- *  "path" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file
- *
- *  "crc32" [ IN ] - calculated checksum
- *
- *  "bin" [ IN ] - true if checksum was calculated on all bytes
- *  in file, false if fopen mode used to read file was text.
- *
- * NB - the crc32sum tool was designed to behave like md5sum.
- *  the md5sum tool operates with the assumption that files
- *  are opened using "fopen". it records the mode used by prepending
- *  '*' to indicate binary and ' ' to indicate text mode within the
- *  checksum line.
- *
- *  unfortunately, this creates a situation where text-mode files
- *  checksummed on DOS cannot be properly checked on any other
- *  platform without the aid of some filter to drop out '\r' from
- *  a '\r\n' sequence.
- *
- *  fortunately, most users are unaware of the binary/text mode
- *  switches available with md5sum and use the default mode, which
- *  is binary on DOS and text on Unix, which happens to be equivalent
- *  to binary ( making one wonder why binary is not instead the
- *  universal default ).
- *
- *  the end result is that we need to indicate whether CR stripping
- *  was performed while at the same time behaving like md5sum.
- */
-KFS_EXTERN rc_t CC KCRC32SumFmtUpdate ( KCRC32SumFmt *self, const char *path,
-    uint32_t crc32, bool bin );
-
-/* Rename
- * Rename the checksum line to reflect a file name change but no content change.
- *
- *  "newpath" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file's new name
- *
- *  "oldpath" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file's old name
- *
- * Parameter order matches KDirectoryRename()
- */
-KFS_EXTERN rc_t CC KCRC32SumFmtRename ( KCRC32SumFmt *self, const char *oldpath, const char *newpath );
-
-
-/* Flush
- *  write data to disk, but stay open
- */
-KFS_EXTERN rc_t CC KCRC32SumFmtFlush ( KCRC32SumFmt *self );
-
-
-/*--------------------------------------------------------------------------
- * CRC32 KFile extensions
- */
-
-/* MakeCRC32Read
- *  creates an adapter to check CRC32 checksum for a source file
- *
- *  "f" [ OUT ] - return parameter for file with crc check
- *
- *  "src" [ IN ] - source file with read permission
- *
- *  "crc32" [ IN ] - checksum to match
- *
- * NB - creates a read-only file that does NOT support random access
- *  i.e. must be consumed serially starting from offset 0
- */
-KFS_EXTERN rc_t CC KFileMakeCRC32Read ( struct KFile const **f,
-    struct KFile const *src, uint32_t crc32 );
-
-
-
-
-/*--------------------------------------------------------------------------
- * KCRC32File
- *  subclass of KFile
- */
-typedef struct KCRC32File KCRC32File;
-
-
-/* MakeWrite
- * MakeAppend
- *  creates an adapter to calculate CRC checksum for a file
- *
- *  "f" [ OUT ] - return parameter for file with crc check
- *
- *  "out" [ IN ] - output file with write permission
- *  since this file is being wrapped by "f", ownership of
- *  the provided reference is transferred to "f"
- *
- *  "fmt" [ IN ] - checksum output formatter.
- *  since this may be used for multiple checksums, "f" will
- *  attach its own reference to "fmt".
- *
- *  "path" [ IN ] - checksum output file path, used to
- *  create standard md5sum file entry.
- *
- * NB - creates a write-only file that does NOT suppport random access
- *  i.e. must be written serially from offset 0
- */
-KFS_EXTERN rc_t CC KCRC32FileMakeWrite ( KCRC32File **f,
-    struct KFile *out, KCRC32SumFmt *fmt, const char *path );
-KFS_EXTERN rc_t CC KCRC32FileMakeAppend ( KCRC32File **f,
-    struct KFile *out, KCRC32SumFmt *fmt, const char *path );
-
-/* MakeReadNew
- *  creates an adapter to calculate CRC checksum for a file
- *
- *  "f" [ OUT ] - return parameter for file with crc check
- *
- *  "in" [ IN ] - input file 
- *  since this file is being wrapped by "f", ownership of
- *  the provided reference is transferred to "f"
- *
- *  "fmt" [ IN ] - checksum output formatter.
- *  since this may be used for multiple checksums, "f" will
- *  attach its own reference to "fmt".
- *
- *  "path" [ IN ] - checksum output file path, used to
- *  create standard md5sum file entry.
- *
- * NB - creates a write-only file that does NOT suppport random access
- *  i.e. must be written serially from offset 0
- */
-KFS_EXTERN rc_t CC KFileMakeNewCRC32Read ( const struct KFile **fp,
-    const struct KFile *in, KCRC32SumFmt *fmt, const char *path );
-
-
-/* ToKFile
- *  a CRC32 file is a subclass of KFile
- *  this is an explicit cast operator
- */
-KFS_EXTERN struct KFile* CC KCRC32FileToKFile ( KCRC32File *self );
-KFS_EXTERN struct KFile const* CC KCRC32FileToKFileConst ( const KCRC32File *self );
-
-/* BeginTransaction
- *  preserve current CRC state and file marker
- *  in preparation for rollback
- */
-KFS_EXTERN rc_t CC KCRC32FileBeginTransaction ( KCRC32File *self );
-
-
-/* Commit
- *  accept current CRC state as correct
- */
-KFS_EXTERN rc_t CC KCRC32FileCommit ( KCRC32File *self );
-
-
-/* Revert
- *  reset state to previous transaction boundary conditions
- */
-KFS_EXTERN rc_t CC KCRC32FileRevert ( KCRC32File *self );
-
-/* Reset
- *  reset state to that of an empty file
- *  aborts any open transaction
- */
-KFS_EXTERN rc_t CC KCRC32FileReset ( KCRC32File *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_crc_ */
diff --git a/interfaces/kfs/defs.h b/interfaces/kfs/defs.h
deleted file mode 100644
index 9437f58..0000000
--- a/interfaces/kfs/defs.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_defs_
-#define _h_kfs_defs_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KPathType
- */
-typedef uint32_t KPathType;
-enum
-{
-    /* add in below zero so as not to change behavior of existing */
-    /* added for KDB that extended this enumeration */ 
-    /* if added it will clash with the kptAlias bit */
-    /* without care be taken */
-    kptFirstDefined = 0,
-
-    /* some paths are bad or non-existent */
-    kptNotFound = kptFirstDefined,
-    kptBadPath,
-
-    /* existing paths describe a directory entry */
-    kptFile,
-    kptDir,
-    kptCharDev,
-    kptBlockDev,
-    kptFIFO,
-
-    /* special types that aren't quite right or normal */
-
-    /* A zombie file is a file in the directory that can not be opened
-     * or read because it is for some reason not really present
-     * zombie as in not live and not dead */
-    kptZombieFile,
-
-    /* special cases for Windows file systems */
-    kptFakeRoot,
-
-    /* special cases for visiting a HDF5-file: */
-
-    /* a dataset is a container for data like a file, but typed */
-    kptDataset,
-    /* a datatype is a object inside a HDF5-group (directory) */
-    kptDatatype,
-
-    /* the type enum may be extended by virtual directories */
-    kptLastDefined,
-
-    /* aliases to the above types have the alias bit set */
-    kptAlias = 128
-};
-
-
-/*--------------------------------------------------------------------------
- * KCreateMode
- *  when creating a file or directory, the normal intent is to open it,
- *  creating it first if necessary, and then go on. alternatively, the
- *  intention may be to always return a newly initialized object, while
- *  the last may be to only proceed if actually created, i.e. if the
- *  object does not already exist in some form.
- */
-enum
-{
-    /* mode values 0..7 */
-    kcmOpen,
-    kcmInit,
-    kcmCreate,
-    kcmSharedAppend,        /* special mode which works only on
-                             * needed for proper logging
-                             */
-    kcmValueMask = 15,
-
-    /* modifier bits 3..7 */
-    kcmMD5     = ( 1 << 6 ),
-    kcmParents = ( 1 << 7 ),
-    kcmBitMask = ( 1 << 8 ) - kcmValueMask - 1
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_defs_ */
diff --git a/interfaces/kfs/directory.h b/interfaces/kfs/directory.h
deleted file mode 100644
index ba69175..0000000
--- a/interfaces/kfs/directory.h
+++ /dev/null
@@ -1,591 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_directory_
-#define _h_kfs_directory_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_kfs_defs_
-#include <kfs/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KPath;
-struct KFile;
-struct KNamelist;
-
-/*--------------------------------------------------------------------------
- * KDirectory
- *  a container node within file system
- */
-typedef struct KDirectory_v1 KDirectory_v1;
-typedef struct KDirectory_v2 KDirectory_v2;
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KFS_EXTERN rc_t CC KDirectoryAddRef_v1 ( const KDirectory_v1 *self );
-KFS_EXTERN rc_t CC KDirectoryRelease_v1 ( const KDirectory_v1 *self );
-
-KFS_EXTERN KDirectory_v2 * CC KDirectoryDuplicate_v2 ( const KDirectory_v2 *self, ctx_t ctx );
-KFS_EXTERN void CC KDirectoryRelease_v2 ( const KDirectory_v2 *self, ctx_t ctx );
-
-/* List
- *  create a directory listing
- *
- *  "list" [ OUT ] - return parameter for list object
- *
- *  "f" [ IN, NULL OKAY ] and "data" [ IN, OPAQUE ] - optional
- *  filter function to execute on each path. receives a base directory
- *  and relative path for each entry. if "f" returns true, the name will
- *  be added to the list.
- *
- *  "path" [ IN, NULL OKAY ] - optional parameter for target
- *  directory. if NULL or empty, interpreted to mean "."
- *
- *  function makes a flat list, does not step into sub-dirs!
- *
- */
-KFS_EXTERN rc_t CC KDirectoryList_v1 ( const KDirectory_v1 *self, struct KNamelist **list,
-    bool ( CC * f ) ( const KDirectory_v1 *dir, const char *name, void *data ),
-    void *data, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVList ( const KDirectory_v1 *self, struct KNamelist **list,
-    bool ( CC * f ) ( const KDirectory_v1 *dir, const char *name, void *data ),
-    void *data, const char *path, va_list args );
-
-/* Visit
- *  visit each path under designated directory,
- *  recursively if so indicated
- *
- *  "recur" [ IN ] - if true, recursively visit sub-directories
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - function to execute
- *  on each path. receives a base directory and relative path
- *  for each entry. if "f" returns true, the iteration will
- *  terminate and that value will be returned. NB - "dir" will not
- *  be the same as "self".
- *
- *  "path" [ IN, NULL OKAY ] - optional NUL terminated string
- *   in directory-native character set. if NULL or empty, interpreted to mean "."
- *
- * VisitFull hits all files types that including those are normally hidden
- */
-KFS_EXTERN rc_t CC KDirectoryVisit_v1 ( const KDirectory_v1 *self, bool recur,
-    rc_t ( CC * f ) ( const KDirectory_v1 *dir, uint32_t type, const char *name, void *data ),
-    void *data, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVVisit ( const KDirectory_v1 *self, bool recur,
-    rc_t ( CC * f ) ( const KDirectory_v1 *dir, uint32_t type, const char *name, void *data ),
-    void *data, const char *path, va_list args );
-
-KFS_EXTERN void CC KDirectoryVisit_v2 ( const KDirectory_v2 *self, ctx_t ctx, bool recur,
-    bool ( CC * f ) ( const KDirectory_v2 *dir, uint32_t type, const char *name, void *data ),
-    void *data, struct KPath const *path );
-
-/* VisitUpdate
- *  like Visit except that the directory passed back to "f"
- *  is available for update operations
- */
-KFS_EXTERN rc_t CC KDirectoryVisitUpdate_v1 ( KDirectory_v1 *self, bool recur,
-    rc_t ( CC * f ) ( KDirectory_v1 *dir, uint32_t type, const char *name, void *data ),
-    void *data, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVVisitUpdate ( KDirectory_v1 *self, bool recur,
-    rc_t ( CC * f ) ( KDirectory_v1 *dir, uint32_t type, const char *name, void *data ),
-    void *data, const char *path, va_list args );
-
-/* PathType
- *  returns a KPathType ( defined in kfs/defs.h )
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- */
-KFS_EXTERN uint32_t CC KDirectoryPathType_v1 ( const KDirectory_v1 *self,
-    const char *path, ... );
-KFS_EXTERN uint32_t CC KDirectoryVPathType ( const KDirectory_v1 *self,
-    const char *path, va_list args );
-
-/* ResolvePath
- *  resolves path to an absolute or directory-relative path
- *
- *  "absolute" [ IN ] - if true, always give a path starting
- *  with '/'. NB - if the directory is chroot'd, the absolute path
- *  will still be relative to directory root.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character set
- *  the resolved path will be directory relative
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target path. NB - need not exist.
- */
-KFS_EXTERN rc_t CC KDirectoryResolvePath_v1 ( const KDirectory_v1 *self, bool absolute,
-    char *resolved, size_t rsize, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVResolvePath ( const KDirectory_v1 *self, bool absolute,
-    char *resolved, size_t rsize, const char *path, va_list args );
-
-KFS_EXTERN struct KPath * CC KDirectoryResolvePath_v2 ( const KDirectory_v2 *self, ctx_t ctx,
-    bool absolute, struct KPath const *path );
-
-/* ResolveAlias
- *  resolves an alias path to its immediate target
- *  NB - the resolved path may be yet another alias
- *
- *  "absolute" [ IN ] - if true, always give a path starting
- *  with '/'. NB - if the directory is chroot'd, the absolute path
- *  will still be relative to directory root.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character set
- *  the resolved path will be directory relative
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting an object presumed to be an alias.
- */
-KFS_EXTERN rc_t CC KDirectoryResolveAlias_v1 ( const KDirectory_v1 *self, bool absolute,
-    char *resolved, size_t rsize, const char *alias, ... );
-KFS_EXTERN rc_t CC KDirectoryVResolveAlias ( const KDirectory_v1 *self, bool absolute,
-    char *resolved, size_t rsize, const char *alias, va_list args );
-
-/* Rename
- *  rename an object accessible from directory, replacing
- *  any existing target object of the same type
- *
- *  "from" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- *
- *  "to" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- *
- *  "force" [ IN ] - not false means try to do more if it fails internally
- */
-KFS_EXTERN rc_t CC KDirectoryRename_v1 ( KDirectory_v1 *self, bool force, const char *from, const char *to );
-
-KFS_EXTERN void CC KDirectoryRename_v2 ( KDirectory_v2 *self, ctx_t ctx, 
-    bool force, struct KPath const *from, struct KPath const *to );
-
-/* Remove
- *  remove an accessible object from its directory
- *
- *  "force" [ IN ] - if true and target is a directory,
- *  remove recursively
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-KFS_EXTERN rc_t CC KDirectoryRemove_v1 ( KDirectory_v1 *self, bool force,
-    const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVRemove ( KDirectory_v1 *self, bool force,
-    const char *path, va_list args );
-
-KFS_EXTERN void CC KDirectoryRemove_v2 ( KDirectory_v2 *self, ctx_t ctx, 
-    bool force, struct KPath const *path );
-
-/* ClearDir
- *  remove all directory contents
- *
- *  "force" [ IN ] - if true and directory entry is a
- *  sub-directory, remove recursively
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- */
-KFS_EXTERN rc_t CC KDirectoryClearDir_v1 ( KDirectory_v1 *self, bool force,
-    const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVClearDir ( KDirectory_v1 *self, bool force,
-    const char *path, va_list args );
-
-KFS_EXTERN void CC KDirectoryClear_v2 ( KDirectory_v2 *self, ctx_t ctx,
-    bool force, struct KPath const *path );
-
-/* Access
- *  get access to object
- *
- *  "access" [ OUT ] - return parameter for Unix access mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-KFS_EXTERN rc_t CC KDirectoryAccess_v1 ( const KDirectory_v1 *self,
-    uint32_t *access, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVAccess ( const KDirectory_v1 *self,
-    uint32_t *access, const char *path, va_list args );
-
-/* SetAccess
- *  set access to object a la Unix "chmod"
- *
- *  "recur" [ IN ] - if non zero and "path" is a directory,
- *  apply changes recursively.
- *
- *  "access" [ IN ] and "mask" [ IN ] - definition of change
- *  where "access" contains new bit values and "mask defines
- *  which bits should be changed.
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-KFS_EXTERN rc_t CC KDirectorySetAccess_v1 ( KDirectory_v1 *self, bool recur,
-    uint32_t access, uint32_t mask, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVSetAccess ( KDirectory_v1 *self, bool recur,
-    uint32_t access, uint32_t mask, const char *path, va_list args );
-
-/* Date
- *  get date/time to object
- *
- *  "date" [ OUT ] - return parameter
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-KFS_EXTERN rc_t CC KDirectoryDate_v1 ( const KDirectory_v1 *self,
-    KTime_t *date, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVDate ( const KDirectory_v1 *self,
-    KTime_t *date, const char *path, va_list args );
-
-/* SetDate
- *  set date to object
- *
- *  "recur" [ IN ] - if non zero and "path" is a directory,
- *  apply changes recursively.
- *
- *  "date" [ IN ] - new time and date for the object
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-KFS_EXTERN rc_t CC KDirectorySetDate_v1 ( KDirectory_v1 *self, bool recur,
-    KTime_t date, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVSetDate ( KDirectory_v1 *self, bool recur,
-    KTime_t date, const char *path, va_list args );
-
-/* CreateAlias
- *  creates a path alias according to create mode
- *  such that "alias" => "targ"
- *
- *  "access" [ IN ] - standard Unix directory access mode
- *  used when "mode" has kcmParents set and alias path does
- *  not exist.
- *
- *  "mode" [ IN ] - a creation mode ( see explanation in kfs/defs.h ).
- *
- *  "targ" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object, i.e. the object which
- *  is designated by symlink "alias". THE PATH IS GIVEN RELATIVE
- *  TO DIRECTORY ( "self" ), NOT SYMLINK ( "alias" )!
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target alias, i.e. the symlink that
- *  designates a target "targ".
- */
-KFS_EXTERN rc_t CC KDirectoryCreateAlias_v1 ( KDirectory_v1 *self,
-    uint32_t access, KCreateMode mode,
-    const char *targ, const char *alias );
-
-KFS_EXTERN void CC KDirectoryCreateAlias_v2 ( KDirectory_v2 *self, ctx_t ctx,
-    uint32_t access, KCreateMode mode,
-    struct KPath const *targ, struct KPath const *alias );
-
-/* OpenFileRead
- *  opens an existing file with read-only access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-KFS_EXTERN rc_t CC KDirectoryOpenFileRead_v1 ( const KDirectory_v1 *self,
-    struct KFile const **f, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVOpenFileRead ( const KDirectory_v1 *self,
-    struct KFile const **f, const char *path, va_list args );
-
-/* OpenFileWrite
- *  opens an existing file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if true, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-KFS_EXTERN rc_t CC KDirectoryOpenFileWrite_v1 ( KDirectory_v1 *self,
-    struct KFile **f, bool update, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVOpenFileWrite ( KDirectory_v1 *self,
-    struct KFile **f, bool update, const char *path, va_list args );
-
-/* CreateFile
- *  opens a file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if true, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "mode" [ IN ] - a creation mode ( see explanation in kfs/defs.h ).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-KFS_EXTERN rc_t CC KDirectoryCreateFile_v1 ( KDirectory_v1 *self, struct KFile **f,
-    bool update, uint32_t access, KCreateMode mode, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVCreateFile ( KDirectory_v1 *self, struct KFile **f,
-    bool update, uint32_t access, KCreateMode mode, const char *path, va_list args );
-
-KFS_EXTERN struct KFile_v2 * CC KDirectoryCreateFile_v2 ( KDirectory_v2 *self, ctx_t ctx,
-    bool update, uint32_t access, KCreateMode mode, struct KPath const *path );
-
-/* FileSize
- *  returns size in bytes of target file
- *
- *  "size" [ OUT ] - return parameter for file size
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-KFS_EXTERN rc_t CC KDirectoryFileSize_v1 ( const KDirectory_v1 *self,
-    uint64_t *size, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVFileSize ( const KDirectory_v1 *self,
-    uint64_t *size, const char *path, va_list args );
-
-/* FilePhysicalSize
- *  returns physical allocated size in bytes of target file.  It might
- * or might not differ from FileSize
- *
- *  "size" [ OUT ] - return parameter for file size
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-KFS_EXTERN rc_t CC KDirectoryFilePhysicalSize_v1 ( const KDirectory_v1 *self,
-    uint64_t *size, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVFilePhysicalSize ( const KDirectory_v1 *self,
-    uint64_t *size, const char *path, va_list args );
-
-/* SetFileSize
- *  sets size in bytes of target file
- *
- *  "size" [ IN ] - new file size
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-KFS_EXTERN rc_t CC KDirectorySetFileSize_v1 ( KDirectory_v1 *self,
-    uint64_t size, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVSetFileSize ( KDirectory_v1 *self,
-    uint64_t size, const char *path, va_list args );
-
-/* FileLocator
- *  returns a 64-bit key pertinent only to the particular file
- *  system device holding that file.
- *
- *  It can be used as a form of sort key except that it is not 
- *  guaranteed to be unique.
- *
- *  "locator" [ OUT ] - return parameter for file locator
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-KFS_EXTERN rc_t CC KDirectoryFileLocator_v1 ( const KDirectory_v1 *self,
-    uint64_t *locator, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVFileLocator ( const KDirectory_v1 *self,
-    uint64_t *locator, const char *path, va_list args );
-
-/* FileContiguous
- *  returns true if the file is "contiguous".  Chunked or sparse files are not
- *  contiguous while most data files are.  Virtual generated files would likely
- *  not be contiguous.  
- *
- *  "contiguous" [ OUT ] - return parameter for file contiguous
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-KFS_EXTERN rc_t CC KDirectoryFileContiguous_v1 ( const KDirectory_v1 *self,
-    bool *contiguous, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVFileContiguous ( const KDirectory_v1 *self,
-    bool *contiguous, const char *path, va_list args );
-
-/* OpenDirRead
- * OpenDirUpdate
- *  opens a sub-directory
- *
- *  "chroot" [ IN ] - if true, the new directory becomes
- *  chroot'd and will interpret paths beginning with '/'
- *  relative to itself.
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- */
-KFS_EXTERN rc_t CC KDirectoryOpenDirRead_v1 ( const KDirectory_v1 *self,
-    const KDirectory_v1 **sub, bool chroot, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVOpenDirRead ( const KDirectory_v1 *self,
-    const KDirectory_v1 **sub, bool chroot, const char *path, va_list args );
-
-KFS_EXTERN rc_t CC KDirectoryOpenDirUpdate_v1 ( KDirectory_v1 *self,
-    KDirectory_v1 **sub, bool chroot, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVOpenDirUpdate ( KDirectory_v1 *self,
-    KDirectory_v1 **sub, bool chroot, const char *path, va_list args );
-
-/* CreateDir
- *  create a sub-directory
- *
- *  "access" [ IN ] - standard Unix directory mode, e.g.0775
- *
- *  "mode" [ IN ] - a creation mode ( see explanation in defs.h ).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- */
-KFS_EXTERN rc_t CC KDirectoryCreateDir_v1 ( KDirectory_v1 *self,
-    uint32_t access, KCreateMode mode, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVCreateDir ( KDirectory_v1 *self,
-    uint32_t access, KCreateMode mode, const char *path, va_list args );
-
-KFS_EXTERN void CC KDirectoryCreateDir_v2 ( KDirectory_v2 *self, ctx_t ctx,
-    uint32_t access, KCreateMode mode, struct KPath const *path );
-
-/* CopyPath
- *  copies a file
- *
- *  "src_path" [ IN ] - path to source-file
- *
- *  "dst_path" [ IN ] - file to create
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- */
-KFS_EXTERN rc_t CC KDirectoryCopyPath_v1 ( const KDirectory_v1 *src_dir,
-    KDirectory_v1 *dst_dir, const char *src_path, const char *dst_path );
-
-/* CopyPaths
- *  copies files, optional recursive in sub-dirs...
- *
- *  "recursive" [ IN ] - handle subdir's recursivly
- *
- *  "src" [ IN ] - what directory to copy
- *
- *  "dst" [ IN ] - into what directory to copy
- *      ( will be created if it does not already exist )
- *
- */
-KFS_EXTERN rc_t CC KDirectoryCopyPaths_v1 ( const KDirectory_v1 * src_dir,
-    KDirectory_v1 *dst_dir, bool recursive, const char *src, const char *dst );
-
-/* Copy
- *  detects if src is a file or a directory
- *
- *  "recursive" [ IN ] - handle subdir's recursivly 
- *            ( if srs is a directory )
- *
- *  "src" [ IN ] - what file/directory to copy
- *
- *  "dst" [ IN ] - into what file/directory to copy
- *      ( will be created if it does not already exist )
- *
- */
-KFS_EXTERN rc_t CC KDirectoryCopy_v1 ( const KDirectory_v1 *src_dir,
-    KDirectory_v1 *dst_dir, bool recursive, const char *src, const char *dst );
-
-/* NativeDir
- *  returns a native file-system directory node reference
- *  the directory root will be "/" and set to the native
- *  idea of current working directory
- *
- *  NB - the returned reference will be non-const, allowing
- *  modification operations to be attempted. these operations
- *  may still fail if the underlying FS disallows them.
- *
- *  "dir" [ OUT ] - return parameter for native directory
- */
-KFS_EXTERN rc_t CC KDirectoryNativeDir_v1 ( KDirectory_v1 **dir );
-
-KFS_EXTERN KDirectory_v2 * CC KDirectoryNativeDir_v2 ( ctx_t ctx );
-
-/*--------------------------------------------------------------------------
- * default name mappings
- */
-#ifndef KDirectory
-typedef struct NAME_VERS ( KDirectory, KDIRECTORY_VERS ) KDirectory;
-#endif
-
-#define KDirectoryAddRef NAME_VERS ( KDirectoryAddRef, KDIRECTORY_VERS )
-#define KDirectoryDuplicate NAME_VERS ( KDirectoryDuplicate, KDIRECTORY_VERS )
-#define KDirectoryRelease NAME_VERS ( KDirectoryRelease, KDIRECTORY_VERS )
-#define KDirectoryList NAME_VERS ( KDirectoryList, KDIRECTORY_VERS )
-#define KDirectoryVisit NAME_VERS ( KDirectoryVisit , KDIRECTORY_VERS )
-#define KDirectoryVisitUpdate NAME_VERS ( KDirectoryVisitUpdate , KDIRECTORY_VERS )
-#define KDirectoryPathType NAME_VERS ( KDirectoryPathType , KDIRECTORY_VERS )
-#define KDirectoryResolvePath NAME_VERS ( KDirectoryResolvePath , KDIRECTORY_VERS )
-#define KDirectoryResolveAlias NAME_VERS ( KDirectoryResolveAlias , KDIRECTORY_VERS )
-#define KDirectoryRename NAME_VERS ( KDirectoryRename , KDIRECTORY_VERS ) 
-#define KDirectoryRemove NAME_VERS ( KDirectoryRemove , KDIRECTORY_VERS ) 
-#define KDirectoryClearDir NAME_VERS ( KDirectoryClearDir , KDIRECTORY_VERS )
-#define KDirectoryClear NAME_VERS ( KDirectoryClear , KDIRECTORY_VERS )
-#define KDirectoryAccess NAME_VERS ( KDirectoryAccess , KDIRECTORY_VERS ) 
-#define KDirectorySetAccess NAME_VERS ( KDirectorySetAccess , KDIRECTORY_VERS ) 
-#define KDirectoryDate NAME_VERS ( KDirectoryDate , KDIRECTORY_VERS ) 
-#define KDirectorySetDate NAME_VERS ( KDirectorySetDate , KDIRECTORY_VERS ) 
-#define KDirectoryCreateAlias NAME_VERS ( KDirectoryCreateAlias , KDIRECTORY_VERS )
-#define KDirectoryOpenFileRead NAME_VERS ( KDirectoryOpenFileRead , KDIRECTORY_VERS )
-#define KDirectoryOpenFileWrite NAME_VERS ( KDirectoryOpenFileWrite , KDIRECTORY_VERS ) 
-#define KDirectoryCreateFile NAME_VERS ( KDirectoryCreateFile , KDIRECTORY_VERS )
-#define KDirectoryFileSize NAME_VERS ( KDirectoryFileSize , KDIRECTORY_VERS ) 
-#define KDirectoryFilePhysicalSize NAME_VERS ( KDirectoryFilePhysicalSize , KDIRECTORY_VERS ) 
-#define KDirectorySetFileSize NAME_VERS ( KDirectorySetFileSize , KDIRECTORY_VERS )
-#define KDirectoryFileLocator NAME_VERS ( KDirectoryFileLocator , KDIRECTORY_VERS ) 
-#define KDirectoryFileContiguous NAME_VERS ( KDirectoryFileContiguous , KDIRECTORY_VERS ) 
-#define KDirectoryOpenDirRead NAME_VERS ( KDirectoryOpenDirRead , KDIRECTORY_VERS )
-#define KDirectoryOpenDirUpdate NAME_VERS ( KDirectoryOpenDirUpdate , KDIRECTORY_VERS ) 
-#define KDirectoryCreateDir NAME_VERS ( KDirectoryCreateDir , KDIRECTORY_VERS )
-#define KDirectoryCopyPath NAME_VERS ( KDirectoryCopyPath , KDIRECTORY_VERS )
-#define KDirectoryCopyPaths NAME_VERS ( KDirectoryCopyPaths , KDIRECTORY_VERS )
-#define KDirectoryCopy NAME_VERS ( KDirectoryCopy , KDIRECTORY_VERS )
-#define KDirectoryNativeDir NAME_VERS ( KDirectoryNativeDir , KDIRECTORY_VERS )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_directory_ */
diff --git a/interfaces/kfs/directory.hpp b/interfaces/kfs/directory.hpp
deleted file mode 100644
index 3b99a97..0000000
--- a/interfaces/kfs/directory.hpp
+++ /dev/null
@@ -1,582 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_kfs_directory_
-#define _hpp_kfs_directory_
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-/*--------------------------------------------------------------------------
- * KDirectory
- *  a container node within file system
- */
-struct KDirectory {
-    /* AddRef
-     * Release
-     *  ignores NULL references
-     */
-    inline rc_t AddRef ( void ) const throw ()
-    { return KDirectoryAddRef ( this ); }
-    inline rc_t Release ( void ) const throw ()
-    { return KDirectoryRelease ( this ); }
-
-
-    /* List
-     *  create a directory listing
-     *
-     *  "list" [ OUT ] - return parameter for list object
-     *
-     *  "f" [ IN, NULL OKAY ] and "data" [ IN, OPAQUE ] - optional
-     *  filter function to execute on each path. receives a base directory
-     *  and relative path for each entry. if "f" returns true, the name will
-     *  be added to the list.
-     *
-     *  "path" [ IN, NULL OKAY ] - optional parameter for target
-     *  directory. if NULL, interpreted to mean "."
-     */
-    inline rc_t List ( struct KNamelist **list,
-        bool ( CC * f ) ( const KDirectory *dir, const char *name, void *data ),
-        void *data,
-        const char *path, ... ) const throw ()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVList ( this, list, f, data, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t List ( struct KNamelist **list,
-        bool ( CC * f ) ( const KDirectory *dir, const char *name, void *data ),
-        void *data,
-        const char *path, va_list args ) const throw ()
-    { return KDirectoryVList ( this, list, f, data, path, args ); }
-
-
-    /* Visit
-     *  visit each path under designated directory
-     *
-     *  "recurse" [ IN ] - if true, recursively visit sub-directories
-     *
-     *  "f" [ IN ] and "data" [ IN, OPAQUE ] - function to execute
-     *  on each path. receives a base directory and relative path
-     *  for each entry. if "f" returns true, the iteration will
-     *  terminate and that value will be returned. NB - "dir" will not
-     *  be the same as "self".
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native character set
-     */
-    inline rc_t Visit ( bool recurse,
-        rc_t ( CC * f ) ( const KDirectory *dir, uint32_t type, const char *name, void *data ),
-        void *data,
-        const char *path, ... ) const throw ()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVVisit ( this, recurse, f, data, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t Visit ( bool recurse,
-        rc_t ( CC * f ) ( const KDirectory *dir, uint32_t type, const char *name, void *data ),
-        void *data,
-        const char *path, va_list args ) const throw ()
-    { return KDirectoryVVisit ( this, recurse, f, data, path, args ); }
-
-
-    /* VisitUpdate
-     *  like Visit except that the directory passed back to "f"
-     *  is available for update operations
-     */
-    inline rc_t VisitUpdate ( bool recurse,
-        rc_t ( CC * f ) ( KDirectory *dir, uint32_t type, const char *name, void *data ),
-        void *data,
-        const char *path, ... ) throw ()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVVisitUpdate ( this, recurse, f, data, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t VisitUpdate ( bool recurse,
-        rc_t ( CC * f ) ( KDirectory *dir, uint32_t type, const char *name, void *data ),
-        void *data,
-        const char *path, va_list args ) throw ()
-    { return KDirectoryVVisitUpdate ( this, recurse, f, data, path, args ); }
-
-
-    /* PathType
-     *  returns a KPathType
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native character set
-     */
-    inline uint32_t PathType ( const char *path, ... ) const throw ()
-    {
-        va_list args;
-        va_start ( args, path );
-        uint32_t r = KDirectoryVPathType ( this, path, args );
-        va_end ( args );
-        return r;
-    }
-    inline uint32_t PathType ( const char *path, va_list args ) const throw ()
-    { return KDirectoryVPathType ( this, path, args ); }
-
-
-    /* ResolvePath
-     *  resolves path to an absolute or directory-relative path
-     *
-     *  "absolute" [ IN ] - if true, always give a path starting
-     *  with '/'. NB - if the directory is chroot'd, the absolute path
-     *  will still be relative to directory root.
-     *
-     *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
-     *  NUL terminated result path in directory-native character set
-     *  the resolved path will be directory relative
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target path. NB - need not exist.
-    */
-    inline rc_t ResolvePath ( bool absolute, char *resolved, size_t rsize,
-        const char *path, ... ) const throw ()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVResolvePath ( this, absolute, resolved, rsize, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t ResolvePath ( bool absolute, char *resolved, size_t rsize,
-        const char *path, va_list args ) const throw ()
-    { return KDirectoryVResolvePath ( this, absolute, resolved, rsize, path, args ); }
-
-
-    /* ResolveAlias
-     *  resolves an alias path to its immediate target
-     *  NB - the resolved path may be yet another alias
-     *
-     *  "absolute" [ IN ] - if true, always give a path starting
-     *  with '/'. NB - if the directory is chroot'd, the absolute path
-     *  will still be relative to directory root.
-     *
-     *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
-     *  NUL terminated result path in directory-native character set
-     *  the resolved path will be directory relative
-     *
-     *  "alias" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting an object presumed to be an alias.
-     */
-     inline rc_t ResolveAlias ( bool absolute, char *resolved, size_t rsize, 
-        const char *alias, ... ) const throw ()
-     {
-        va_list args;
-        va_start ( args, alias );
-        rc_t rc = KDirectoryVResolveAlias ( this, absolute, resolved, rsize, alias, args );
-        va_end ( args );
-        return rc;
-     }
-     inline rc_t ResolveAlias ( bool absolute, char *resolved, size_t rsize, 
-        const char *alias, va_list args ) const throw ()
-     { return KDirectoryVResolveAlias ( this, absolute, resolved, rsize, alias, args ); }
-
-
-     /* Rename
-     *  rename an object accessible from directory, replacing
-     *  any existing target object of the same type
-     *
-     *  "from" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting existing object
-     *
-     *  "to" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting existing object
-     *
-     *  "force" [ IN ] - not false means try to do more if it fails internally
-     */
-     inline rc_t Rename ( bool force, const char *from, const char *to ) throw ()
-     {  return KDirectoryRename ( this, force, from, to );  }
-
-
-     /* Remove
-     *  remove an accessible object from its directory
-     *
-     *  "force" [ IN ] - if true and target is a directory,
-     *  remove recursively
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target object
-     */
-     inline rc_t Remove ( bool force, const char *path, ... ) throw ()
-     {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVRemove ( this, force, path, args );
-        va_end ( args );
-        return rc;
-     }
-     inline rc_t Remove ( bool force, const char *path, va_list args ) throw ()
-     { return KDirectoryVRemove ( this, force, path, args ); }
-
-
-     /* ClearDir
-     *  remove all directory contents
-     *
-     *  "force" [ IN ] - if true and directory entry is a
-     *  sub-directory, remove recursively
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target directory
-     */
-     inline rc_t ClearDir ( bool force, const char *path, ... ) throw ()
-     {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVClearDir ( this, force, path, args );
-        va_end ( args );
-        return rc;
-     }
-     inline rc_t ClearDir ( bool force, const char *path,
-        va_list args ) throw ()
-     { return KDirectoryVClearDir ( this, force, path, args ); }
-
-
-     /* Access
-     *  get access to object
-     *
-     *  "access" [ OUT ] - return parameter for Unix access mode
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target object
-     */
-     inline rc_t Access ( uint32_t *access,
-        const char *path, ... ) const throw ()
-     {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVAccess ( this, access, path, args );
-        va_end ( args );
-        return rc;
-     }
-     inline rc_t Access ( uint32_t *access, const char *path, 
-        va_list args ) const throw ()
-     { return KDirectoryVAccess ( this, access, path, args ); }
-
-
-     /* SetAccess
-     *  set access to object a la Unix "chmod"
-     *
-     *  "recurse" [ IN ] - if non zero and "path" is a directory,
-     *  apply changes recursively.
-     *
-     *  "access" [ IN ] and "mask" [ IN ] - definition of change
-     *  where "access" contains new bit values and "mask defines
-     *  which bits should be changed.
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target object
-     */
-     inline rc_t SetAccess ( bool recurse, uint32_t access, uint32_t mask,
-        const char *path, ... ) throw ()
-     {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVSetAccess ( this, recurse, access, mask, path, args );
-        va_end ( args );
-        return rc;
-     }
-     inline rc_t SetAccess ( bool recurse, uint32_t access, uint32_t mask,
-        const char *path, va_list args ) throw ()
-     { return KDirectoryVSetAccess ( this, recurse, access, mask, path, args ); }
-
-
-     /* Date
-     *  get date/time to object
-     *
-     *  "date" [ OUT ] - return parameter
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target object
-     */
-     inline rc_t Date ( KTime_t *date, const char *path, ... ) const throw ()
-     {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVDate ( this, date, path, args );
-        va_end ( args );
-        return rc;
-     }
-     inline rc_t Date ( KTime_t *date, const char *path,
-        va_list args ) const throw ()
-     { return KDirectoryVDate ( this, date, path, args ); }
-
-
-     /* SetDate
-     *  set date to object
-     *
-     *  "recurse" [ IN ] - if non zero and "path" is a directory,
-     *  apply changes recursively.
-     *
-     *  "date" [ IN ] - new time and date for the object
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target object
-     */
-     inline rc_t SetDate ( bool recurse, KTime_t date,
-        const char *path, ... ) throw ()
-     {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVSetDate ( this, recurse, date, path, args );
-        va_end ( args );
-        return rc;
-     }
-     inline rc_t SetDate ( bool recurse, KTime_t date, const char *path,
-        va_list args ) throw ()
-     { return KDirectoryVSetDate ( this, recurse, date, path, args ); }
-
-
-     /* CreateAlias
-     *  creates a path alias according to create mode
-     *
-     *  "access" [ IN ] - standard Unix directory access mode
-     *  used when "mode" has kcmParents set and alias path does
-     *  not exist.
-     *
-     *  "mode" [ IN ] - a creation mode ( see explanation above ).
-     *
-     *  "targ" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target object
-     *
-     *  "alias" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target alias
-     */
-     inline rc_t CreateAlias ( uint32_t access, KCreateMode mode,
-        const char *targ, const char *alias ) throw ()
-     { return KDirectoryCreateAlias ( this, access, mode, targ, alias ); }
-
-
-    /* OpenFileRead
-     *  opens an existing file with read-only access
-     *
-     *  "f" [ OUT ] - return parameter for newly opened file
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target file
-     */
-    inline rc_t OpenFileRead ( struct KFile const **f,
-        const char *path, ... ) const throw ()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVOpenFileRead ( this, f, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenFileRead ( struct KFile const **f, const char *path,
-        va_list args ) const throw ()
-    { return KDirectoryVOpenFileRead ( this, f, path, args ); }
-
-
-    /* OpenFileWrite
-     *  opens an existing file with write access
-     *
-     *  "f" [ OUT ] - return parameter for newly opened file
-     *
-     *  "update" [ IN ] - if true, open in read/write mode
-     *  otherwise, open in write-only mode
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target file
-     */
-    inline rc_t OpenFileWrite ( struct KFile **f, bool update,
-        const char *path, ... ) throw ()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVOpenFileWrite ( this, f, update, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenFileWrite ( struct KFile **f, bool update,
-        const char *path, va_list args ) throw ()
-    { return KDirectoryVOpenFileWrite ( this, f, update, path, args ); }
-
-
-    /* CreateFile
-     *  opens a file with write access
-     *
-     *  "f" [ OUT ] - return parameter for newly opened file
-     *
-     *  "update" [ IN ] - if true, open in read/write mode
-     *  otherwise, open in write-only mode
-     *
-     *  "access" [ IN ] - standard Unix access mode, e.g. 0664
-     *
-     *  "mode" [ IN ] - a creation mode ( see explanation above ).
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target file
-     */
-     inline rc_t CreateFile ( struct KFile **f, bool update, uint32_t access,
-        KCreateMode mode, const char *path, ... ) throw ()
-     {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVCreateFile ( this, f, update, access, mode, path, args );
-        va_end ( args );
-        return rc;
-     }
-     inline rc_t CreateFile ( struct KFile **f, bool update, uint32_t access,
-        KCreateMode mode, const char *path, va_list args ) throw ()
-     { return KDirectoryVCreateFile ( this, f, update, access, mode, path, args ); }
-
-
-     /* FileSize
-     *  returns size in bytes of target file
-     *
-     *  "size" [ OUT ] - return parameter for file size
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target file
-     */
-     inline rc_t FileSize ( uint64_t *size, 
-        const char *path, ... ) const throw ()
-     {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVFileSize ( this, size, path, args );
-        va_end ( args );
-        return rc;
-     }
-     inline rc_t FileSize ( uint64_t *size, const char *path,
-        va_list args ) const throw ()
-     { return KDirectoryVFileSize ( this, size, path, args ); }
-
-
-     /* SetFileSize
-     *  sets size in bytes of target file
-     *
-     *  "size" [ IN ] - new file size
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target file
-     */
-     inline rc_t SetFileSize ( uint64_t size, const char *path, ... ) throw ()
-     {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVSetFileSize ( this, size, path, args );
-        va_end ( args );
-        return rc;
-     }
-     inline rc_t SetFileSize ( uint64_t size, const char *path,
-        va_list args ) throw ()
-     { return KDirectoryVSetFileSize ( this, size, path, args ); }
-
-
-     /* OpenDirRead
-     * OpenDirUpdate
-     *  opens a sub-directory
-     *
-     *  "chroot" [ IN ] - if true, the new directory becomes
-     *  chroot'd and will interpret paths beginning with '/'
-     *  relative to itself.
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target directory
-     */
-     inline rc_t OpenDirRead ( const KDirectory **sub, bool chroot,
-        const char *path, ... ) const throw ()
-     {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVOpenDirRead ( this, sub, chroot, path, args );
-        va_end ( args );
-        return rc;
-     }
-     inline rc_t OpenDirRead ( const KDirectory **sub, bool chroot,
-        const char *path, va_list args ) const throw ()
-     { return KDirectoryVOpenDirRead ( this, sub, chroot, path, args ); }
-
-     inline rc_t OpenDirUpdate ( KDirectory **sub, bool chroot,
-        const char *path, ... )
-     {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVOpenDirUpdate ( this, sub, chroot, path, args );
-        va_end ( args );
-        return rc;
-     }
-     inline rc_t OpenDirUpdate ( KDirectory **sub, bool chroot,
-        const char *path, va_list args ) throw ()
-     { return KDirectoryVOpenDirUpdate ( this, sub, chroot, path, args ); }
-
-     /* CreateDir
-     *  create a sub-directory
-     *
-     *  "access" [ IN ] - standard Unix directory mode, e.g.0775
-     *
-     *  "mode" [ IN ] - a creation mode ( see explanation above ).
-     *
-     *  "path" [ IN ] - NUL terminated string in directory-native
-     *  character set denoting target directory
-     */
-     inline rc_t CreateDir ( uint32_t access, KCreateMode mode,
-        const char *path, ... ) throw ()
-     {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KDirectoryVCreateDir ( this, access, mode, path, args );
-        va_end ( args );
-        return rc;
-     }
-     inline rc_t CreateDir ( uint32_t access, KCreateMode mode,
-        const char *path, va_list args ) throw ()
-     { return  KDirectoryVCreateDir ( this, access, mode, path, args ); }
-
-
-    /* NativeDir
-     *  returns a native file-system directory node reference
-     *  the directory root will be "/" and set to the native
-     *  idea of current working directory
-     *
-     *  NB - the returned reference will be non-const, allowing
-     *  modification operations to be attempted. these operations
-     *  may still fail if the underlying FS disallows them.
-     *
-     *  "dir" [ OUT ] - return parameter for native directory
-     */
-    inline static rc_t NativeDir ( KDirectory **dir ) throw ()
-    { return KDirectoryNativeDir ( dir ); }
-
-private:
-    KDirectory ();
-    ~ KDirectory ();
-    KDirectory ( const KDirectory& );
-    KDirectory &operator = ( const KDirectory& );
-};
-
-#endif /* _hpp_kfs_directory_ */
diff --git a/interfaces/kfs/dyload.h b/interfaces/kfs/dyload.h
deleted file mode 100644
index e06958a..0000000
--- a/interfaces/kfs/dyload.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_dyload_
-#define _h_kfs_dyload_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDirectory;
-
-
-/*--------------------------------------------------------------------------
- * KDyld
- *  dynamic library loader
- *
- *  maintains cache of libraries it has opened while they remain open
- *  such that subsequent requests for an open library will return a
- *  new reference to the existing library.
- */
-typedef struct KDyld KDyld;
-
-
-/* Make
- *  create a dynamic loader object
- *
- *  "dl" [ OUT ] - return parameter for loader
- */
-KFS_EXTERN rc_t CC KDyldMake ( KDyld **dl );
-
-
-/* AddRef
- * Release
- */
-KFS_EXTERN rc_t CC KDyldAddRef ( const KDyld *self );
-KFS_EXTERN rc_t CC KDyldRelease ( const KDyld *self );
-
-
-/* AddSearchPath
- *  add a search path to loader for locating library files
- */
-KFS_EXTERN rc_t CC KDyldAddSearchPath ( KDyld *self, const char *path, ... );
-KFS_EXTERN rc_t CC KDyldVAddSearchPath ( KDyld *self, const char *path, va_list args );
-
-
-/* HomeDirectory
- *  returns a KDirectory where the binary for a given function is located
- *
- *  "dir" [ OUT ] - return parameter for home directory ( read-only ), if found
- *
- *  "func" [ IN ] - function pointer within binary to be located
- */
-KFS_EXTERN rc_t CC KDyldHomeDirectory ( const KDyld *self,
-    struct KDirectory const **dir, fptr_t func );
-
-
-/*--------------------------------------------------------------------------
- * KDylib
- *  dynamic library
- */
-typedef struct KDylib KDylib;
-
-
-/* LoadLib
- *  load a dynamic library
- *
- *  "lib" [ OUT ] - return parameter for loaded library
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target library
- */
-KFS_EXTERN rc_t CC KDyldLoadLib ( KDyld *self,
-    KDylib **lib, const char *path, ... );
-KFS_EXTERN rc_t CC KDyldVLoadLib ( KDyld *self,
-    KDylib **lib, const char *path, va_list args );
-
-
-/* AddRef
- * Release
- */
-KFS_EXTERN rc_t CC KDylibAddRef ( const KDylib *self );
-KFS_EXTERN rc_t CC KDylibRelease ( const KDylib *self );
-
-
-/* FullPath
- *  return full path to library
- */
-KFS_EXTERN rc_t CC KDylibFullPath ( const KDylib *self, char *path, size_t psize );
-
-
-/*--------------------------------------------------------------------------
- * KDlset
- *  set of dynamic libraries
- *  contained libraries remain resident until set is released
- */
-typedef struct KDlset KDlset;
-
-
-/* MakeSet
- *  load a dynamic library
- *
- *  "set" [ OUT ] - return parameter for lib set
- */
-KFS_EXTERN rc_t CC KDyldMakeSet ( const KDyld *self, KDlset **set );
-
-
-/* AddRef
- * Release
- */
-KFS_EXTERN rc_t CC KDlsetAddRef ( const KDlset *self );
-KFS_EXTERN rc_t CC KDlsetRelease ( const KDlset *self );
-
-
-/* AddLib
- *  adds a dynamic library to set
- *  returns "rcExists" error if already present
- *
- *  "lib" [ IN ] - library returned from KDyldLoadLib
- */
-KFS_EXTERN rc_t CC KDlsetAddLib ( KDlset *self, KDylib *lib );
-
-
-/* AddAll
- *  adds all dynamic libraries found in dl search path
- */
-KFS_EXTERN rc_t CC KDlsetAddAll ( KDlset *self );
-
-
-/*--------------------------------------------------------------------------
- * KSymAddr
- *  symbol address within a dynamic library
- */
-typedef struct KSymAddr KSymAddr;
-
-
-/* Symbol
- *  find a symbol within dynamic library
- *
- *  "sym" [ OUT ] - return parameter for exported symbol address
- *
- *  "name" [ IN ] - NUL terminated symbol name in
- *  library-native character set
- */
-KFS_EXTERN rc_t CC KDylibSymbol ( const KDylib *self, KSymAddr **sym, const char *name );
-KFS_EXTERN rc_t CC KDlsetSymbol ( const KDlset *self, KSymAddr **sym, const char *name );
-
-
-/* FirstSymbol
- * LastSymbol
- *  find a symbol within dynamic library set matching criteria
- *
- *  "sym" [ OUT ] - return parameter for exported symbol address
- *
- *  "name" [ IN ] - NUL terminated symbol name in
- *  library-native character set
- *
- *  "test" [ IN ] and "data" [ IN, OPAQUE ] - callback filter function
- *  return true if symbol matches criteria
- */
-KFS_EXTERN rc_t CC KDlsetFirstSymbol ( const KDlset *self, KSymAddr **sym, const char *name,
-    bool ( CC * test ) ( const KSymAddr *sym, void *data ), void *data );
-KFS_EXTERN rc_t CC KDlsetLastSymbol ( const KDlset *self, KSymAddr **sym, const char *name,
-    bool ( CC * test ) ( const KSymAddr *sym, void *data ), void *data );
-
-
-/* AddRef
- * Release
- */
-KFS_EXTERN rc_t CC KSymAddrAddRef ( const KSymAddr *self );
-KFS_EXTERN rc_t CC KSymAddrRelease ( const KSymAddr *self );
-
-
-/* AsObj
- * AsFunc
- *  retrieve symbol address as pointer to object
- */
-KFS_EXTERN void *CC KSymAddrAsObj ( const KSymAddr *self );
-KFS_EXTERN void CC KSymAddrAsFunc ( const KSymAddr *self, fptr_t *fp );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_dyload_ */
diff --git a/interfaces/kfs/extendable-ramfile.h b/interfaces/kfs/extendable-ramfile.h
deleted file mode 100644
index 93e5582..0000000
--- a/interfaces/kfs/extendable-ramfile.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef _h_kfs_extendable_ramfile_
-#define _h_kfs_extendable_ramfile_
-
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KFile;
-
-KFS_EXTERN rc_t CC KExtendableRamFileMake(struct KFile **self);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_extendable_ramfile_ */
diff --git a/interfaces/kfs/extern.h b/interfaces/kfs/extern.h
deleted file mode 100644
index 0ea1d3c..0000000
--- a/interfaces/kfs/extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_extern_
-#define _h_kfs_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define KFS_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define KFS_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_kfs_extern_ */
diff --git a/interfaces/kfs/ffext.h b/interfaces/kfs/ffext.h
deleted file mode 100644
index ab4f16a..0000000
--- a/interfaces/kfs/ffext.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_fileformat_ext_
-#define _h_kfs_fileformat_ext_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KFileFormat;
-
-KFS_EXTERN rc_t CC KExtFileFormatMake (struct KFileFormat ** pft,
-                                       const char* ext, size_t extlen,
-                                       const char * typeAndClass, size_t tclen);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_fileformat_ext_ */
diff --git a/interfaces/kfs/ffmagic.h b/interfaces/kfs/ffmagic.h
deleted file mode 100644
index 4049a49..0000000
--- a/interfaces/kfs/ffmagic.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_fileformat_magic_
-#define _h_kfs_fileformat_magic_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KFileFormat;
-
-KFS_EXTERN rc_t CC KMagicFileFormatMake (struct KFileFormat ** pft, const char * magic_path,
-			const char* magic, size_t magiclen,
-			const char * typeAndClass, size_t tclen);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_fileformat_magic_ */
diff --git a/interfaces/kfs/file-impl.h b/interfaces/kfs/file-impl.h
deleted file mode 100644
index 0c2f123..0000000
--- a/interfaces/kfs/file-impl.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_file_impl_
-#define _h_kfs_file_impl_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_kfs_file_
-#include <kfs/file.h>
-#endif
-
-#ifndef _h_kfc_refcount_impl_
-#include <kfc/refcount-impl.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct timeout_t;
-struct KSysFile_v1;
-struct KSysFile_v2;
-struct KDirectory_v1;
-typedef union KFile_vt KFile_vt;
-extern KItfTok KFile_tok_v2;
-
-#if KFILE_VERS == 1
-#define KSysFile KSysFile_v1
-#elif KFILE_VERS == 2
-#define KSysFile KSysFile_v2
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KFile
- *  a virtual file
- */
-struct KFile_v1
-{
-    const KFile_vt *vt;
-    struct KDirectory_v1 const *dir;
-    KRefcount refcount;
-    uint8_t read_enabled;
-    uint8_t write_enabled;
-    uint8_t align [ 2 ];
-};
-
-struct KFile_v2
-{
-    KRefcount_v1 dad;
-    uint8_t read_enabled;
-    uint8_t write_enabled;
-    uint8_t align [ sizeof ( void* ) - 2 ];
-};
-
-#ifndef KFILE_IMPL
-#define KFILE_IMPL struct KFile_v1
-#endif
-
-typedef struct KFile_vt_v1 KFile_vt_v1;
-struct KFile_vt_v1
-{
-    /* version == 1.x */
-    uint32_t maj;
-    uint32_t min;
-
-    /* start minor version == 0 */
-    rc_t ( CC * destroy ) ( KFILE_IMPL *self );
-    struct KSysFile_v1* ( CC * get_sysfile ) ( const KFILE_IMPL *self, uint64_t *offset );
-    rc_t ( CC * random_access ) ( const KFILE_IMPL *self );
-    rc_t ( CC * get_size ) ( const KFILE_IMPL *self, uint64_t *size );
-    rc_t ( CC * set_size ) ( KFILE_IMPL *self, uint64_t size );
-    /* num_read and num_writ are guaranteed non-NULL */
-    rc_t ( CC * read ) ( const KFILE_IMPL *self, uint64_t pos,
-        void *buffer, size_t bsize, size_t *num_read );
-    rc_t ( CC * write ) ( KFILE_IMPL *self, uint64_t pos,
-        const void *buffer, size_t size, size_t *num_writ );
-    /* end minor version == 0 */
-
-    /* start minor version == 1 */
-    uint32_t ( CC * get_type ) ( const KFILE_IMPL * self );
-    /* end minor version == 1 */
-
-    /* start minor version == 2 */
-    rc_t ( CC * timed_read ) ( const KFILE_IMPL *self, uint64_t pos,
-        void *buffer, size_t bsize, size_t *num_read, struct timeout_t *tm );
-    rc_t ( CC * timed_write ) ( KFILE_IMPL *self, uint64_t pos,
-        const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm );
-    /* end minor version == 2 */
-
-    /* ANY NEW ENTRIES MUST BE REFLECTED IN libs/kfs/file.c
-       BY BOTH THE CORRESPONDING MESSAGE DISPATCH FUNCTION(s) AND
-       VTABLE VALIDITY CHECKS IN KFileInit_v1 */
-};
-
-union KFile_vt
-{
-    KFile_vt_v1 v1;
-};
-
-typedef struct KFile_v2_vt KFile_v2_vt;
-struct KFile_v2_vt
-{
-    KVTable dad;
-
-    /* start minor version == 0 */
-    struct KSysFile_v2* ( CC * get_sysfile ) ( const KFile_v2 *self, ctx_t ctx, uint64_t *offset );
-    bool ( CC * random_access ) ( const KFile_v2 *self, ctx_t ctx );
-    uint64_t ( CC * get_size ) ( const KFile_v2 *self, ctx_t ctx );
-    void ( CC * set_size ) ( KFile_v2 *self, ctx_t ctx, uint64_t size );
-    /* num_read and num_writ are guaranteed non-NULL */
-    size_t ( CC * read ) ( const KFile_v2 *self, ctx_t ctx, uint64_t pos,
-        void *buffer, size_t bsize );
-    size_t ( CC * write ) ( KFile_v2 *self, ctx_t ctx, uint64_t pos,
-        const void *buffer, size_t size );
-
-    uint32_t ( CC * get_type ) ( const KFile_v2 * self, ctx_t ctx );
-
-    size_t ( CC * timed_read ) ( const KFile_v2 *self, ctx_t ctx, uint64_t pos,
-        void *buffer, size_t bsize, struct timeout_t *tm );
-    size_t ( CC * timed_write ) ( KFile_v2 *self, ctx_t ctx, uint64_t pos,
-        const void *buffer, size_t size, struct timeout_t *tm );
-
-    /* ANY NEW ENTRIES MUST BE REFLECTED IN libs/kfs/file-v2.c
-       BY BOTH THE CORRESPONDING MESSAGE DISPATCH FUNCTION(s) AND
-       VTABLE VALIDITY CHECKS IN KFileInit_v2 */
-};
-
-
-/* Init
- *  initialize a newly allocated file object
- */
-KFS_EXTERN rc_t CC KFileInit_v1 ( KFile_v1 *self, const KFile_vt *vt,
-    const char *classname, const char *fname,
-    bool read_enabled, bool write_enabled );
-KFS_EXTERN void CC KFileInit_v2 ( KFile_v2 *self, ctx_t ctx, const KVTable *vt,
-    const char *fname, bool read_enabled, bool write_enabled );
-
-/* Destroy
- *  destroy file
- */
-KFS_EXTERN rc_t CC KFileDestroy_v1 ( KFile_v1 *self );
-KFS_EXTERN void CC KFileDestroy_v2 ( KFile_v2 * self );
-
-/* GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- */
-KFS_EXTERN struct KSysFile_v1 * CC KFileGetSysFile_v1 ( const KFile_v1 *self, uint64_t *offset );
-KFS_EXTERN struct KSysFile_v2 * CC KFileGetSysFile_v2 ( const KFile_v2 *self, ctx_t ctx, uint64_t *offset );
-
-#define KFileInit NAME_VERS ( KFileInit, KFILE_VERS )
-#define KFileDestroy NAME_VERS ( KFileDestory, KFILE_VERS )
-#define KFileGetSysFile NAME_VERS ( KFileGetSysFile, KFILE_VERS )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_file_impl_ */
diff --git a/interfaces/kfs/file-v1.h b/interfaces/kfs/file-v1.h
deleted file mode 100644
index dc05dbd..0000000
--- a/interfaces/kfs/file-v1.h
+++ /dev/null
@@ -1,259 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_file_v1_
-#define _h_kfs_file_v1_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_klib_namelist_
-#include <klib/namelist.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct timeout_t;
-
-
-/*--------------------------------------------------------------------------
- * KFile_v1
- *  a file is normally created with a KDirectory
- *  optionally, the standard i/o files may be created directly
- */
-typedef struct KFile_v1 KFile_v1;
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KFS_EXTERN rc_t CC KFileAddRef_v1 ( const KFile_v1 *self );
-KFS_EXTERN rc_t CC KFileRelease_v1 ( const KFile_v1 *self );
-
-
-/* RandomAccess
- *  ALMOST by definition, the file is random access
- *
- *  certain file types will refuse random access
- *  these include FIFO and socket based files, but also
- *  wrappers that require serial access ( e.g. compression )
- *
- *  returns 0 if random access, error code otherwise
- */
-KFS_EXTERN rc_t CC KFileRandomAccess_v1 ( const KFile_v1 *self );
-
-
-/* Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-KFS_EXTERN uint32_t CC KFileType_v1 ( const KFile_v1 *self );
-
-
-/* Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-KFS_EXTERN rc_t CC KFileSize_v1 ( const KFile_v1 *self, uint64_t *size );
-
-
-/* SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-KFS_EXTERN rc_t CC KFileSetSize_v1 ( KFile_v1 *self, uint64_t size );
-
-
-/* Read
- * TimedRead
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - return parameter giving number of bytes
- *  actually read. when returned value is zero and return code is
- *  also zero, interpreted as end of file.
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed reads. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KFS_EXTERN rc_t CC KFileRead_v1 ( const KFile_v1 *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read );
-KFS_EXTERN rc_t CC KFileTimedRead_v1 ( const KFile_v1 *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read, struct timeout_t *tm );
-
-/* ReadAll
- * TimedReadAll
- *  read from file until "bsize" bytes have been retrieved
- *  or until end-of-input
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - return parameter giving number of bytes
- *  actually read. when returned value is zero and return code is
- *  also zero, interpreted as end of file.
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed reads. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KFS_EXTERN rc_t CC KFileReadAll_v1 ( const KFile_v1 *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read );
-KFS_EXTERN rc_t CC KFileTimedReadAll_v1 ( const KFile_v1 *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read, struct timeout_t *tm );
-
-/* ReadExactly
- * TimedReadExactly
- *  read from file until "bytes" have been retrieved
- *  or return incomplete transfer error
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bytes" [ IN ] - return buffer for read
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed reads. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KFS_EXTERN rc_t CC KFileReadExactly_v1 ( const KFile_v1 *self,
-    uint64_t pos, void *buffer, size_t bytes );
-KFS_EXTERN rc_t CC KFileTimedReadExactly_v1 ( const KFile_v1 *self,
-    uint64_t pos, void *buffer, size_t bytes, struct timeout_t *tm );
-
-/* Write
- * TimedWrite
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed writes. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KFS_EXTERN rc_t CC KFileWrite_v1 ( KFile_v1 *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ );
-KFS_EXTERN rc_t CC KFileTimedWrite_v1 ( KFile_v1 *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm );
-
-/* WriteAll
- * TimedWriteAll
- *  write to file until "size" bytes have been transferred
- *  or until no further progress can be made
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed writes. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KFS_EXTERN rc_t CC KFileWriteAll_v1 ( KFile_v1 *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ );
-KFS_EXTERN rc_t CC KFileTimedWriteAll_v1 ( KFile_v1 *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm );
-
-/* WriteExactly
- * TimedWriteExactly
- *  write to file until "bytes" have been transferred
- *  or return incomplete transfer error
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "bytes" [ IN ] - data to be written
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed writes. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KFS_EXTERN rc_t CC KFileWriteExactly_v1 ( KFile_v1 *self,
-    uint64_t pos, const void *buffer, size_t bytes );
-KFS_EXTERN rc_t CC KFileTimedWriteExactly_v1 ( KFile_v1 *self,
-    uint64_t pos, const void *buffer, size_t bytes, struct timeout_t *tm );
-
-/* MakeStdIn
- *  creates a read-only file on stdin
- */
-KFS_EXTERN rc_t CC KFileMakeStdIn_v1 ( const KFile_v1 **std_in );
-
-/* MakeStdOut
- * MakeStdErr
- *  creates a write-only file on stdout or stderr
- */
-KFS_EXTERN rc_t CC KFileMakeStdOut_v1 ( KFile_v1 **std_out );
-KFS_EXTERN rc_t CC KFileMakeStdErr_v1 ( KFile_v1 **std_err );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_file_v1_ */
diff --git a/interfaces/kfs/file-v2.h b/interfaces/kfs/file-v2.h
deleted file mode 100644
index ecd249b..0000000
--- a/interfaces/kfs/file-v2.h
+++ /dev/null
@@ -1,264 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_file_v2_
-#define _h_kfs_file_v2_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_kfc_refcount_
-#include <kfc/refcount.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct timeout_t;
-
-
-/*--------------------------------------------------------------------------
- * KFile_v2
- *  a file is normally created with a KDirectory
- *  optionally, the standard i/o files may be created directly
- */
-typedef struct KFile_v2 KFile_v2;
-
-/* Duplicate
- * Release
- *  ignores NULL references
- */
-static __inline__
-KFile_v2 * KFileDuplicate_v2 ( const KFile_v2 * self, ctx_t ctx, caps_t rm )
-{
-    return ( KFile_v2 * ) KRefcountDuplicate_v1 ( TO_REFCOUNT_V1 ( self ), ctx, rm );
-}
-
-static __inline__
-void KFileRelease_v2 ( const KFile_v2 * self, ctx_t ctx )
-{
-    KRefcountRelease_v1 ( TO_REFCOUNT_V1 ( self ), ctx );
-}
-
-
-/* RandomAccess
- *  ALMOST by definition, the file is random access
- *
- *  certain file types will refuse random access
- *  these include FIFO and socket based files, but also
- *  wrappers that require serial access ( e.g. compression )
- *
- *  returns 0 if random access, error code otherwise
- */
-KFS_EXTERN bool CC KFileRandomAccess_v2 ( const KFile_v2 *self, ctx_t ctx );
-
-
-/* Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-KFS_EXTERN uint32_t CC KFileType_v2 ( const KFile_v2 *self, ctx_t ctx );
-
-
-/* Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-KFS_EXTERN uint64_t CC KFileSize_v2 ( const KFile_v2 *self, ctx_t ctx );
-
-
-/* SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-KFS_EXTERN void CC KFileSetSize_v2 ( KFile_v2 *self, ctx_t ctx, uint64_t size );
-
-
-/* Read
- * TimedRead
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - return parameter giving number of bytes
- *  actually read. when returned value is zero and return code is
- *  also zero, interpreted as end of file.
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed reads. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KFS_EXTERN size_t CC KFileRead_v2 ( const KFile_v2 *self, ctx_t ctx,
-    uint64_t pos, void *buffer, size_t bsize );
-KFS_EXTERN size_t CC KFileTimedRead_v2 ( const KFile_v2 *self, ctx_t ctx,
-    uint64_t pos, void *buffer, size_t bsize, struct timeout_t *tm );
-
-/* ReadAll
- * TimedReadAll
- *  read from file until "bsize" bytes have been retrieved
- *  or until end-of-input
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - return parameter giving number of bytes
- *  actually read. when returned value is zero and return code is
- *  also zero, interpreted as end of file.
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed reads. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KFS_EXTERN size_t CC KFileReadAll_v2 ( const KFile_v2 *self, ctx_t ctx,
-    uint64_t pos, void *buffer, size_t bsize );
-KFS_EXTERN size_t CC KFileTimedReadAll_v2 ( const KFile_v2 *self, ctx_t ctx,
-    uint64_t pos, void *buffer, size_t bsize, struct timeout_t *tm );
-
-/* ReadExactly
- * TimedReadExactly
- *  read from file until "bytes" have been retrieved
- *  or return incomplete transfer error
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bytes" [ IN ] - return buffer for read
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed reads. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KFS_EXTERN void CC KFileReadExactly_v2 ( const KFile_v2 *self, ctx_t ctx,
-    uint64_t pos, void *buffer, size_t bytes );
-KFS_EXTERN void CC KFileTimedReadExactly_v2 ( const KFile_v2 *self, ctx_t ctx,
-    uint64_t pos, void *buffer, size_t bytes, struct timeout_t *tm );
-
-/* Write
- * TimedWrite
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed writes. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KFS_EXTERN size_t CC KFileWrite_v2 ( KFile_v2 *self, ctx_t ctx,
-    uint64_t pos, const void *buffer, size_t size );
-KFS_EXTERN size_t CC KFileTimedWrite_v2 ( KFile_v2 *self, ctx_t ctx,
-    uint64_t pos, const void *buffer, size_t size, struct timeout_t *tm );
-
-/* WriteAll
- * TimedWriteAll
- *  write to file until "size" bytes have been transferred
- *  or until no further progress can be made
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed writes. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KFS_EXTERN size_t CC KFileWriteAll_v2 ( KFile_v2 *self, ctx_t ctx,
-    uint64_t pos, const void *buffer, size_t size );
-KFS_EXTERN size_t CC KFileTimedWriteAll_v2 ( KFile_v2 *self, ctx_t ctx,
-    uint64_t pos, const void *buffer, size_t size, struct timeout_t *tm );
-
-/* WriteExactly
- * TimedWriteExactly
- *  write to file until "bytes" have been transferred
- *  or return incomplete transfer error
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "bytes" [ IN ] - data to be written
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed writes. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KFS_EXTERN void CC KFileWriteExactly_v2 ( KFile_v2 *self, ctx_t ctx,
-    uint64_t pos, const void *buffer, size_t bytes );
-KFS_EXTERN void CC KFileTimedWriteExactly_v2 ( KFile_v2 *self, ctx_t ctx,
-    uint64_t pos, const void *buffer, size_t bytes, struct timeout_t *tm );
-
-/* MakeStdIn
- *  creates a read-only file on stdin
- */
-KFS_EXTERN const KFile_v2 * CC KFileMakeStdIn_v2 ( ctx_t ctx );
-
-/* MakeStdOut
- * MakeStdErr
- *  creates a write-only file on stdout or stderr
- */
-KFS_EXTERN const KFile_v2 * CC KFileMakeStdOut_v2 ( ctx_t ctx );
-KFS_EXTERN const KFile_v2 * CC KFileMakeStdErr_v2 ( ctx_t ctx );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_file_v2_ */
diff --git a/interfaces/kfs/file.h b/interfaces/kfs/file.h
deleted file mode 100644
index 1c5119a..0000000
--- a/interfaces/kfs/file.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_file_
-#define _h_kfs_file_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_kfs_file_v1_
-#include <kfs/file-v1.h>
-#endif
-
-#ifndef _h_kfs_file_v2_
-#include <kfs/file-v2.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KFileDesc
- *  describes basic file types
- */
-enum KFileDesc
-{
-    kfdNull,
-    kfdInvalid,
-    kfdFile,
-    kfdCharDev,
-    kfdBlockDev,
-    kfdFIFO,
-    kfdSocket,
-
-    /* the type enum may be extended */
-    kfdLastDefined
-};
-
-
-/*--------------------------------------------------------------------------
- * KFile
- *  a file is normally created with a KDirectory
- *  optionally, the standard i/o files may be created directly
- */
-#define KFileAddRef NAME_VERS ( KFileAddRef, KFILE_VERS )
-#define KFileDuplicate NAME_VERS ( KFileDuplicate, KFILE_VERS )
-#define KFileRelease NAME_VERS ( KFileRelease, KFILE_VERS )
-#define KFileRandomAccess NAME_VERS ( KFileRandomAccess, KFILE_VERS )
-#define KFileType NAME_VERS ( KFileType, KFILE_VERS )
-#define KFileSize NAME_VERS ( KFileSize, KFILE_VERS ) 
-#define KFileSetSize NAME_VERS ( KFileSetSize, KFILE_VERS )
-#define KFileRead NAME_VERS ( KFileRead, KFILE_VERS )
-#define KFileTimedRead NAME_VERS ( KFileTimedRead, KFILE_VERS )
-#define KFileReadAll NAME_VERS ( KFileReadAll, KFILE_VERS )
-#define KFileTimedReadAll NAME_VERS ( KFileTimedReadAll, KFILE_VERS )
-#define KFileReadExactly NAME_VERS ( KFileReadExactly, KFILE_VERS )
-#define KFileTimedReadExactly NAME_VERS ( KFileTimedReadExactly, KFILE_VERS )
-#define KFileWrite NAME_VERS ( KFileWrite, KFILE_VERS )
-#define KFileTimedWrite NAME_VERS ( KFileTimedWrite, KFILE_VERS )
-#define KFileWriteAll NAME_VERS ( KFileWriteAll, KFILE_VERS )
-#define KFileTimedWriteAll NAME_VERS ( KFileTimedWriteAll, KFILE_VERS )
-#define KFileWriteExactly NAME_VERS ( KFileWriteExactly, KFILE_VERS )
-#define KFileTimedWriteExactly NAME_VERS ( KFileTimedWriteExactly, KFILE_VERS )
-#define KFileMakeStdIn NAME_VERS ( KFileMakeStdIn, KFILE_VERS )
-#define KFileMakeStdOut NAME_VERS ( KFileMakeStdOut, KFILE_VERS )
-#define KFileMakeStdErr NAME_VERS ( KFileMakeStdErr, KFILE_VERS )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_file_ */
diff --git a/interfaces/kfs/file.hpp b/interfaces/kfs/file.hpp
deleted file mode 100644
index 866a960..0000000
--- a/interfaces/kfs/file.hpp
+++ /dev/null
@@ -1,147 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_kfs_file_
-#define _hpp_kfs_file_
-
-#ifndef _h_kfs_file_
-#include <kfs/file.h>
-#endif
-
-//#include <kfs/md5.h> // KFileMakeMd5ForReadFromString
-
-/*--------------------------------------------------------------------------
- * KFile
- *  a file
- */
-struct KFile
-{
-    /* AddRef
-     * Release
-     *  ignores NULL references
-     */
-    inline rc_t AddRef () const throw ()
-    { return KFileAddRef ( this ); }
-
-    inline rc_t Release () const throw ()
-    { return KFileRelease ( this ); }
-
-    /* RandomAccess
-     *  ALMOST by definition, the file is random access
-     *
-     *  certain file types will refuse random access
-     *  these include FIFO and socket based files, but also
-     *  wrappers that require serial access ( e.g. compression )
-     *
-     *  returns 0 if random access, error code otherwise
-    */
-    inline rc_t RandomAccess () const throw()
-    { return KFileRandomAccess ( this ); }
-
-
-    /* Type
-     *  returns a KFileDesc
-     *  not intended to be a content type,
-     *  but rather an implementation class
-     */
-    inline uint32_t FileType() const throw()
-    { return KFileType ( this ); }
-
-
-    /* Size
-     *  returns size in bytes of file
-     *
-     *  "size" [ OUT ] - return parameter for file size
-     */
-    inline rc_t Size ( uint64_t *size ) const throw ()
-    { return KFileSize ( this, size ); }
-
-    /* SetSize
-     *  sets size in bytes of file
-     *
-     *  "size" [ IN ] - new file size
-     */
-    inline rc_t SetSize ( uint64_t size ) throw ()
-    { return KFileSetSize ( this, size ); }
-
-    /* Read
-     *  read file from known position
-     *
-     *  "pos" [ IN ] - starting position within file
-     *
-     *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
-     *
-     *  "num_read" [ OUT ] - return parameter giving number of bytes
-     *  actually read. when returned value is zero and return code is
-     *  also zero, interpreted as end of file.
-     */
-    inline rc_t Read ( uint64_t pos,
-        void *buffer, size_t bsize, size_t *num_read ) const throw ()
-    { return KFileRead ( this, pos, buffer, bsize, num_read ); }
-
-    /* Write
-     *  write file at known position
-     *
-     *  "pos" [ IN ] - starting position within file
-     *
-     *  "buffer" [ IN ] and "size" [ IN ] - data to be written
-     *
-     *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
-     *  giving number of bytes actually written
-     */
-    inline rc_t Write ( uint64_t pos,
-        const void *buffer, size_t size, size_t *num_writ ) throw ()
-    { return KFileWrite ( this, pos, buffer, size, num_writ ); }
-
-    /* MakeStdIn
-     *  creates a read-only file on stdin
-     */
-    static inline rc_t MakeStdIn ( const KFile **std_in ) throw ()
-    { return KFileMakeStdIn ( std_in ); }
-
-    /* MakeStdOut
-     * MakeStdErr
-     *  creates a write-only file on stdout or stderr
-     */
-    static inline rc_t MakeStdOut ( KFile **std_out ) throw ()
-    { return KFileMakeStdOut ( std_out ); }
-    static inline rc_t MakeStdErr ( KFile **std_err ) throw ()
-    { return KFileMakeStdErr ( std_err ); }
-     
-
-    /*/ MD5
-    static inline rc_t MakeMd5ForRead ( const KFile **f,
-        const KFile *src, const char digest[MD5_DIGEST_SIZE] )
-    { return KFileMakeMd5ForReadFromString ( f, src, digest ); }*/
-
-private:
-    KFile ();
-    ~ KFile ();
-    KFile ( const KFile& );
-    KFile &operator = ( const KFile& );
-};
-
-#endif // _hpp_kfs_file_
diff --git a/interfaces/kfs/fileformat.h b/interfaces/kfs/fileformat.h
deleted file mode 100644
index b68c635..0000000
--- a/interfaces/kfs/fileformat.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_fileformat_
-#define _h_kfs_fileformat_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KDirectory;
-
-/*
- * Multiple descriptions can be attached to a single key.
- * At most one key can be attached to a single description.
- *
- * Multiple types can be attached to a single class.
- * At most one class can be attached to a single type.
- */
-
-
-/*--------------------------------------------------------------------------
- * KFileFormatType
- *  describes basic file content types.  The type can be used to choose what
- *  parser is used to extract information for a loader, archive as filesystem,
- *  or decompress for further parsing.
- */
-typedef
-int32_t KFileFormatType;
-enum KFileFormatType_e
-{
-    kfftError = -2,		/* A file that can not be read for typing */
-    kfftNotFound = -1,		/* not found in a search */
-    kfftUnknown = 0		/* not yet or file format not understood. */
-    /* other types are registered during construction **?** */
-};
-
-/* -------------------------------------------------------------------------
- * KFileFormatClass
- *   Describes which class of operations can be performed in a given file.
- *     Unknown: nothing in particular
- *     Compressed: decompressed to reveal different expanded file contents
- *     Archive: treated as a file system to reach contained files
- *     Run: loaded into the SRA DB
- */
-typedef
-int32_t KFileFormatClass;
-enum KFileFormatClass_e
-{
-    kffcError = -2,		/* A file that can not be read for typing */
-    kffcNotFound = -1,		/* not found in a search */
-    kffcUnknown = 0		/* not yet or file format not understood. */
-};
-
-/*--------------------------------------------------------------------------
- * KFileFormat
- */
-typedef struct KFileFormat KFileFormat;
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KFS_EXTERN rc_t CC KFileFormatAddRef (const KFileFormat *self);
-KFS_EXTERN rc_t CC KFileFormatRelease (const KFileFormat *self);
-
-/* Type
- *  intended to be a content type,
- *  if type, class or desc is NULL those types are not returned
- */
-KFS_EXTERN rc_t CC KFileFormatGetTypeBuff (const KFileFormat *self, const void * buff, size_t buff_len,
-			KFileFormatType * type, KFileFormatClass * class,
-			char * description, size_t descriptionmax,
-			size_t * length);
-
-#define KFileFormatGetTypeBuffType(self,buff,buff_len,type) \
-    KFileFormatGetTypeBuff(self,buff,buff_len,type,NULL,NULL,0,NULL)
-
-#define KFileFormatGetTypeBuffClass(self,buff,buff_len,class) \
-    KFileFormatGetTypeBuff(self,buff,buff_len,NULL,class,NULL,0,NULL)
-
-/* useful for logging perhaps */
-#define KFileFormatGetTypeBuffDescr(self,buff,buff_len,descr,descr_max,descr_len)	\
-    KFileFormatGetTypeBuff(self,buff,buff_len,NULL,NULL,descr,descr_max,descr_len)
-
-KFS_EXTERN rc_t CC KFileFormatGetTypePath(const KFileFormat *self, const struct KDirectory * dir,
-                                          const char * path, KFileFormatType * type,
-                                          KFileFormatClass * class, char * description,
-                                          size_t descriptionmax, size_t * length);
-#define KFileFormatGetTypePathType(self,dir,path,type)			\
-    KFileFormatGetTypePath(self,dir,path,type,NULL,NULL,0,NULL)
-
-#define KFileFormatGetTypePathClass(self,dir,path,class)			\
-    KFileFormatGetTypePath(self,dir,path,NULL,class,NULL,0,NULL)
-
-/* useful for logging perhaps */
-#define KFileFormatGetTypePathDescr(self,dir,path,descr,descr_max,descr_len) \
-    KFileFormatGetTypePath(self,dir,path,NULL,NULL,descr,descr_max,descr_len)
-
-
-KFS_EXTERN rc_t CC KFileFormatGetClassDescr (const KFileFormat *self, KFileFormatClass c,
-			char * description, size_t descriptionmax);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_fileformat_ */
diff --git a/interfaces/kfs/filetools.h b/interfaces/kfs/filetools.h
deleted file mode 100644
index ff9eb6f..0000000
--- a/interfaces/kfs/filetools.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_filetools_
-#define _h_kfs_filetools_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_kfs_file_
-#include <kfs/file.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* PLEASE DO NOT VERSION these functions, they use only the standard KFile-Interface */
-
-
-/* LoadKFileToNameList
- * parses the content of a file as text, decomposes this text into lines,
- * and adds the lines to the namelist. Because VNamelist cannot contain empty lines,
- * empty lines are translated into a string containing a single space-character.
- * The parsing accepts POSIX/Mac and Windows line endings.
- */
-KFS_EXTERN rc_t CC LoadKFileToNameList( struct KFile const * self, struct VNamelist * namelist );
-
-
-/* LoadFileByNameToNameList
- * calls internally LoadKFileToNameList(), but does construct the KFile internally from the given path
- */
-KFS_EXTERN rc_t CC LoadFileByNameToNameList( struct VNamelist * namelist, const char * filename );
-
-
-/* Walks a file by calling the on_line for each line
-  */
-
-KFS_EXTERN rc_t CC ProcessFileLineByLine( struct KFile const * self,
-    rc_t ( CC * on_line )( const String * line, void * data ), void * data );
-
-/* WriteNameListToKFile
- * Writes the lines of namelist into the given KFile.
- * Uses the string given in delim as line-ending
- */
-KFS_EXTERN rc_t CC WriteNameListToKFile( struct KFile * self, const VNamelist * namelist, 
-                                         const char * delim );
-
-/* WriteNamelistToFileByName
- * calls internally WriteNameListToKFile(), but does construct the KFile internally from the given path
- * if the file exists, it will be overwritten. if the files does not exist it will be created
- */
-KFS_EXTERN rc_t CC WriteNamelistToFileByName( const VNamelist * namelist,
-     const char * filename, const char * delim );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_filetools_ */
diff --git a/interfaces/kfs/gzip.h b/interfaces/kfs/gzip.h
deleted file mode 100644
index c5639fc..0000000
--- a/interfaces/kfs/gzip.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_gzip_
-#define _h_kfs_gzip_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-
-/* MakeGzipForRead
- *  creates an adapter to gunzip a source file
- *
- *  "gz" [ OUT ] - return parameter for decompressed file
- *
- *  "src" [ IN ] - compressed source file with read permission
- *
- * NB - creates a read-only file that does NOT support random access
- *  i.e. must be consumed serially starting from offset 0
- */
-KFS_EXTERN rc_t CC KFileMakeGzipForRead ( struct KFile const **gz, struct KFile const *src );
-
-
-/* MakeGzipForWrite
- *  creates an adapter to gzip a source file
- *
- *  "gz" [ OUT ] - return parameter for compressed file
- *
- *  "src" [ IN ] - uncompressed source file with write permission
- *
- * NB - creates a write-only file that does NOT suppport random access
- *  i.e. must be written serially from offset 0
- */
-KFS_EXTERN rc_t CC KFileMakeGzipForWrite ( struct KFile **gz, struct KFile *file );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_gzip_ */
diff --git a/interfaces/kfs/impl.h b/interfaces/kfs/impl.h
deleted file mode 100644
index 5233768..0000000
--- a/interfaces/kfs/impl.h
+++ /dev/null
@@ -1,319 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_impl_
-#define _h_kfs_impl_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_kfs_file_impl_
-#include <kfs/file-impl.h>
-#endif
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifndef _h_kfs_arrayfile_
-#include <kfs/arrayfile.h>
-#endif
-
-#ifndef _h_klib_namelist_
-#include <klib/namelist.h>
-#endif
-
-#if KFILE_VERS != 1 && KDIRECTORY_VERS != 1
-#error "include <kfs/file-impl.h> and <kfs/directory-impl.h> separately"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KPath;
-struct KBufFile;
-struct KSysDir_v1;
-struct KSysDir_v2;
-typedef union KDirectory_vt KDirectory_vt;
-
-#if KDIRECTORY_VERS == 1
-#define KSysDir KSysDir_v1
-#elif KDIRECTORY_VERS == 2
-#define KSysDir KSysDir_v2
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KDirectory
- *  a virtual directory
- */
-struct KDirectory_v1
-{
-    const KDirectory_vt *vt;
-    KRefcount refcount;
-    uint8_t read_only;
-    uint8_t align [ 3 ];
-};
-
-struct KDirectory_v2
-{
-    const KDirectory_vt *vt;
-    KRefcount refcount;
-    uint8_t read_only;
-    uint8_t align [ 3 ];
-};
-
-#ifndef KDIR_IMPL
-#define KDIR_IMPL struct KDirectory
-#endif
-
-#if KDIRECTORY_VERS == 1
-#define KDIRECTORY_V1_IMPL KDIR_IMPL
-#define KDIRECTORY_V2_IMPL struct KDirectory_v2
-#elif KDIRECTORY_VERS == 2
-#define KDIRECTORY_V1_IMPL struct KDirectory_v1
-#define KDIRECTORY_V2_IMPL KDIR_IMPL
-#else
-#error unknown KDirectory version
-#endif
-
-
-typedef struct KDirectory_vt_v1 KDirectory_vt_v1;
-struct KDirectory_vt_v1
-{
-    /* version == 1.x */
-    uint32_t maj;
-    uint32_t min;
-
-    /* start minor version == 0 */
-    rc_t ( CC * destroy ) ( KDIR_IMPL *self );
-    rc_t ( CC * list_dir ) ( const KDIR_IMPL *self, struct KNamelist **list,
-         bool ( CC * f ) ( const KDirectory *dir, const char *name, void *data ),
-         void *data, const char *path, va_list args );
-    rc_t ( CC * visit ) ( const KDIR_IMPL *self, bool recur,
-        rc_t ( CC * f ) ( const KDirectory*, uint32_t, const char*, void* ),
-        void *data, const char *path, va_list args );
-    rc_t ( CC * visit_update ) ( KDIR_IMPL *self, bool recur,
-        rc_t ( CC * f ) ( KDirectory*, uint32_t, const char*, void* ),
-        void *data, const char *path, va_list args );
-    uint32_t ( CC * path_type ) ( const KDIR_IMPL *self, const char *path, va_list args );
-    rc_t ( CC * resolve_path ) ( const KDIR_IMPL *self, bool absolute,
-        char *resolved, size_t rsize, const char *path, va_list args );
-    rc_t ( CC * resolve_alias ) ( const KDIR_IMPL *self, bool absolute,
-        char *resolved, size_t rsize, const char *alias, va_list args );
-    rc_t ( CC * rename ) ( KDIR_IMPL *self, bool force, const char *from, const char *to );
-    rc_t ( CC * remove ) ( KDIR_IMPL *self, bool force, const char *path, va_list args );
-    rc_t ( CC * clear_dir ) ( KDIR_IMPL *self, bool force, const char *path, va_list args );
-    rc_t ( CC * access ) ( const KDIR_IMPL *self,
-        uint32_t *access, const char *path, va_list args );
-    rc_t ( CC * set_access ) ( KDIR_IMPL *self, bool recur,
-        uint32_t access, uint32_t mask, const char *path, va_list args );
-    rc_t ( CC * create_alias ) ( KDIR_IMPL *self, uint32_t access,
-        KCreateMode mode, const char *targ, const char *alias );
-    rc_t ( CC * open_file_read ) ( const KDIR_IMPL *self,
-        const KFile **f, const char *path, va_list args );
-    rc_t ( CC * open_file_write ) ( KDIR_IMPL *self,
-        KFile **f, bool update, const char *path, va_list args );
-    rc_t ( CC * create_file ) ( KDIR_IMPL *self, KFile **f, bool update,
-        uint32_t access, KCreateMode mode, const char *path, va_list args );
-    rc_t ( CC * file_size ) ( const KDIR_IMPL *self,
-        uint64_t *size, const char *path, va_list args );
-    rc_t ( CC * set_size ) ( KDIR_IMPL *self,
-        uint64_t size, const char *path, va_list args );
-    rc_t ( CC * open_dir_read ) ( const KDIR_IMPL *self,
-        const KDirectory **sub, bool chroot, const char *path, va_list args );
-    rc_t ( CC * open_dir_update ) ( KDIR_IMPL *self,
-        KDirectory **sub, bool chroot, const char *path, va_list args );
-    rc_t ( CC * create_dir ) ( KDIR_IMPL *self, uint32_t access,
-        KCreateMode mode, const char *path, va_list args );
-
-    /* optional destructor method - leave NULL if not needed */
-    rc_t ( CC * destroy_file ) ( KDIR_IMPL *self, KFile *f );
-    /* end minor version == 0 */
-
-    /* start minor version == 1 */
-    rc_t ( CC * date ) ( const KDIR_IMPL *self,
-        KTime_t * date, const char *path, va_list args );
-    rc_t ( CC * setdate ) ( KDIR_IMPL * self, bool recur,
-        KTime_t date, const char *path, va_list args );
-    struct KSysDir_v1* ( CC * get_sysdir ) ( const KDIR_IMPL *self );
-    /* end minor version == 1 */
-
-    /* start minor version == 2 */
-    rc_t ( CC * file_locator ) ( const KDIR_IMPL *self,
-        uint64_t *locator, const char *path, va_list args );
-    /* end minor version == 2 */
-
-    /* start minor version == 3 */
-    rc_t ( CC * file_phys_size ) ( const KDIR_IMPL *self,
-        uint64_t *phys_size, const char *path, va_list args );
-    rc_t ( CC * file_contiguous ) ( const KDIR_IMPL *self,
-        bool *contiguous, const char *path, va_list args );
-    /* end minor version == 3 */
-
-    /* ANY NEW ENTRIES MUST BE REFLECTED IN libs/kfs/directory.c
-       BY BOTH THE CORRESPONDING MESSAGE DISPATCH FUNCTION(s) AND
-       VTABLE VALIDITY CHECKS IN KDirectoryInit */
-};
-
-typedef struct KDirectory_vt_v2 KDirectory_vt_v2;
-struct KDirectory_vt_v2
-{
-    /* version == 2.x */
-    uint32_t maj;
-    uint32_t min;
-
-    /* start minor version == 0 */
-    void ( CC * destroy ) ( KDIRECTORY_V2_IMPL *self, ctx_t ctx );
-    void ( CC * visit ) ( const KDIRECTORY_V2_IMPL *self, ctx_t ctx, bool recur,
-        bool ( CC * f ) ( const KDirectory_v2 *dir, uint32_t type, const char *name, void *data ),
-        void *data, struct KPath const *path );
-    struct KPath * ( CC * resolve_path ) ( const KDIRECTORY_V2_IMPL *self, ctx_t ctx, bool absolute,
-        struct KPath const *path );
-    void ( CC * rename ) ( KDIRECTORY_V2_IMPL *self, ctx_t ctx, bool force, struct KPath const *from, struct KPath const *to );
-    void ( CC * remove ) ( KDIRECTORY_V2_IMPL *self, ctx_t ctx, bool force, struct KPath const *path );
-    void ( CC * clear_dir ) ( KDIRECTORY_V2_IMPL *self, ctx_t ctx, bool force, struct KPath const *path );
-    void ( CC * create_alias ) ( KDIRECTORY_V2_IMPL *self, ctx_t ctx, uint32_t access,
-        KCreateMode mode, struct KPath const *targ, struct KPath const *alias );
-    struct KFile_v2 * ( CC * create_file ) ( KDIRECTORY_V2_IMPL *self, ctx_t ctx, bool update,
-        uint32_t access, KCreateMode mode, struct KPath const *path );
-    void ( CC * create_dir ) ( KDIRECTORY_V2_IMPL *self, ctx_t ctx, uint32_t access,
-        KCreateMode mode, struct KPath const *path );
-
-    /* ANY NEW ENTRIES MUST BE REFLECTED IN libs/kfs/directory.c
-       BY BOTH THE CORRESPONDING MESSAGE DISPATCH FUNCTION(s) AND
-       VTABLE VALIDITY CHECKS IN KDirectoryInit */
-};
-
-union KDirectory_vt
-{
-    KDirectory_vt_v1 v1;
-    KDirectory_vt_v2 v2;
-};
-
-/* Init
- *  initialize a newly allocated directory object
- */
-KFS_EXTERN rc_t CC KDirectoryInit_v1 ( KDirectory_v1 *self, const KDirectory_vt *vt, 
-    const char * class_name, const char * path, bool update );
-
-/* DestroyFile
- *  does whatever is necessary with an unreferenced file
- */
-KFS_EXTERN rc_t CC KDirectoryDestroyFile_v1 ( const KDirectory_v1 *self, KFile_v1 *f );
-KFS_EXTERN void CC KDirectoryDestroyFile_v2 ( const KDirectory_v2 *self, ctx_t ctx, KFile_v2 *f );
-
-/* GetSysDir
- *  returns an underlying system file object
- */
-KFS_EXTERN struct KSysDir_v1* CC KDirectoryGetSysDir_v1 ( const KDirectory_v1 *self );
-KFS_EXTERN struct KSysDir_v2* CC KDirectoryGetSysDir_v2 ( const KDirectory_v2 *self, ctx_t ctx );
-
-
-/* RealPath
- *  exposes functionality of system directory
- */
-KFS_EXTERN rc_t CC KSysDirRealPath_v1 ( struct KSysDir_v1 const *self,
-    char *real, size_t bsize, const char *path, ... );
-KFS_EXTERN rc_t CC KSysDirVRealPath ( struct KSysDir_v1 const *self,
-    char *real, size_t bsize, const char *path, va_list args );
-
-#define KDirectoryInit NAME_VERS ( KDirectoryInit, KFILE_VERS )
-#define KDirectoryDestoryFile NAME_VERS ( KDirectoryDestoryFile, KFILE_VERS )
-#define KDirectoryGetSysDir NAME_VERS ( KDirectoryGetSysDir, KFILE_VERS )
-#define KSysDirRealPath NAME_VERS ( KSysDirRealPath, KFILE_VERS )
-
-
-/*--------------------------------------------------------------------------
- * KArrayFile
- *  an array-file is created from a KFile
- */
-typedef union  KArrayFile_vt KArrayFile_vt;
-struct KArrayFile
-{
-    const KArrayFile_vt *vt;
-    KRefcount refcount;
-    uint8_t read_enabled;
-    uint8_t write_enabled;
-    uint8_t align [ 2 ];
-};
-
-#ifndef KARRAYFILE_IMPL
-#define KARRAYFILE_IMPL KArrayFile
-#endif
-
-typedef struct KArrayFile_vt_v1 KArrayFile_vt_v1;
-struct KArrayFile_vt_v1
-{
-    /* version number */
-    uint32_t maj, min;
-
-    /* start minor version == 0 */
-    rc_t ( CC * destroy ) ( KARRAYFILE_IMPL *self );
-    rc_t ( CC * dimensionality ) ( const KARRAYFILE_IMPL *self, uint8_t *dim );
-    rc_t ( CC * set_dimensionality ) ( KARRAYFILE_IMPL *self, uint8_t dim );
-    rc_t ( CC * dim_extents ) ( const KARRAYFILE_IMPL *self, uint8_t dim, uint64_t *extents );
-    rc_t ( CC * set_dim_extents ) ( KARRAYFILE_IMPL *self, uint8_t dim, uint64_t *extents );
-    rc_t ( CC * element_size ) ( const KARRAYFILE_IMPL *self, uint64_t *elem_bits );
-    rc_t ( CC * read ) ( const KARRAYFILE_IMPL *self, uint8_t dim,
-        const uint64_t *pos, void *buffer, const uint64_t *elem_count,
-        uint64_t *num_read );
-    rc_t ( CC * write ) ( KARRAYFILE_IMPL *self, uint8_t dim,
-        const uint64_t *pos, const void *buffer, const uint64_t *elem_count,
-        uint64_t *num_writ );
-    rc_t ( CC * get_meta ) ( const KARRAYFILE_IMPL *self, const char *key, 
-                             const KNamelist **list );
-
-    rc_t ( CC * read_v ) ( const KARRAYFILE_IMPL *self, uint8_t dim,
-        const uint64_t * pos, char * buffer, const uint64_t buffer_size,
-        uint64_t * num_read );
-
-    /* end minor version == 0 */
-};
-
-union KArrayFile_vt
-{
-    KArrayFile_vt_v1 v1;
-};
-
-/* Init
- *  initialize a newly allocated array-file object
- */
-KFS_EXTERN rc_t CC KArrayFileInit ( KArrayFile *self, const KArrayFile_vt *vt, 
-    bool read_enabled, bool write_enabled );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_impl_ */
diff --git a/interfaces/kfs/kfs-priv.h b/interfaces/kfs/kfs-priv.h
deleted file mode 100644
index 49bb6d1..0000000
--- a/interfaces/kfs/kfs-priv.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_priv_
-#define _h_kfs_priv_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * struct/class forwards
- */
-struct KArrayFile;
-struct KDirectory;
-struct KDlset;
-struct KFile;
-struct KFile_v2;
-struct KNamelist;
-struct KPath;
-
-/* MakeFDFile
- *  creates a file from a file-descriptor
- *  not supported under Windows
- */
-KFS_EXTERN rc_t CC KFileMakeFDFileRead ( struct KFile const **f, int fd );
-KFS_EXTERN rc_t CC KFileMakeFDFileWrite ( struct KFile **f, bool update, int fd );
-
-KFS_EXTERN struct KFile_v2 const * CC KFileMakeFDFileRead_v2 ( ctx_t ctx, int fd );
-KFS_EXTERN struct KFile_v2 * CC KFileMakeFDFileWrite_v2 ( ctx_t ctx, bool update, int fd );
-
-/* GetMeta
- *  extracts metadata into a string-vector
- *
- *  "key"   [ IN ]  - the key which part of the metadata to retrieve
- *
- *  "list"  [ OUT ] - the metadata will be filled into this list
- *
- */
-KFS_EXTERN rc_t CC KArrayFileGetMeta ( struct KArrayFile const *self, const char *key,
-    const struct KNamelist **list );
-
-/* List
- *  list the paths to the libraries in the set
- */
-KFS_EXTERN rc_t CC KDlsetList ( struct KDlset const *self, struct KNamelist **list );
-
-
-#if WINDOWS
-
-/* PosixStringToSystemString
- * converts posix path string to system path
- *  "buffer" [ OUT ] - NUL terminated system path string
- *  "bsize" [ IN ] - buffer length
- *  "path" [ IN ] - NUL terminated posix path string
- */
-KFS_EXTERN rc_t CC KDirectoryPosixStringToSystemString (
-    const struct KDirectory *self,
-    char *buffer, size_t bsize, const char *path, ... );
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_priv_ */
diff --git a/interfaces/kfs/lockfile.h b/interfaces/kfs/lockfile.h
deleted file mode 100644
index ef83254..0000000
--- a/interfaces/kfs/lockfile.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_lockfile_
-#define _h_kfs_lockfile_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_kfs_defs_
-#include <kfs/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-struct KDirectory;
-
-
-/*--------------------------------------------------------------------------
- * KLockFile
- *  a mutual exclusion lock on a file
- *  the lock is acquired upon creation
- *  and released upon destruction
- *
- * NB - only guaranteed to work when used from a single host
- */
-typedef struct KLockFile KLockFile;
-
-
-/* AddRef
- * Release
- */
-KFS_EXTERN rc_t CC KLockFileAddRef ( const KLockFile *self );
-KFS_EXTERN rc_t CC KLockFileRelease ( const KLockFile *self );
-
-
-
-/*--------------------------------------------------------------------------
- * KDirectory
- *  interface extensions
- */
-
-
-/* CreateLockFile
- *  attempts to create a KLockFile
- *
- *  "lock" [ OUT ] - return parameter for newly created lock file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting lock file
- */
-KFS_EXTERN rc_t CC KDirectoryCreateLockFile ( struct KDirectory *self,
-    KLockFile **lock, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVCreateLockFile ( struct KDirectory *self,
-    KLockFile **lock, const char *path, va_list args );
-
-
-/* CreateExclusiveAccessFile
- *  opens a file with exclusive write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if true, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-KFS_EXTERN rc_t CC KDirectoryCreateExclusiveAccessFile ( struct KDirectory *self, struct KFile **f,
-    bool update, uint32_t access, KCreateMode mode, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVCreateExclusiveAccessFile ( struct KDirectory *self, struct KFile **f,
-    bool update, uint32_t access, KCreateMode mode, const char *path, va_list args );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_lockfile_ */
diff --git a/interfaces/kfs/manager.h b/interfaces/kfs/manager.h
deleted file mode 100644
index 559a1be..0000000
--- a/interfaces/kfs/manager.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_manager_
-#define _h_kfs_manager_
-
-
-#endif /* _h_kfs_manager_ */
diff --git a/interfaces/kfs/md5.h b/interfaces/kfs/md5.h
deleted file mode 100644
index 798f827..0000000
--- a/interfaces/kfs/md5.h
+++ /dev/null
@@ -1,289 +0,0 @@
-/*=======================================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_md5_
-#define _h_kfs_md5_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-
-
-/*--------------------------------------------------------------------------
- * KMD5SumFmt
- *  a formatter for reading or writing an md5sum-style checksum file
- */
-typedef struct KMD5SumFmt KMD5SumFmt;
-
-
-/* AddRef
- * Release
- */
-KFS_EXTERN rc_t CC KMD5SumFmtAddRef ( const KMD5SumFmt *self );
-KFS_EXTERN rc_t CC KMD5SumFmtRelease ( const KMD5SumFmt *self );
-
-
-/* Make
- *  creates a formatted accessor to textual checksum file
- *  takes over ownership of "in"/"out" file reference
- *
- *  "in" [ IN ] - readable checksum input file
- *  -OR-
- *  "out" [ IN ] - writable checksum file. if readable as well,
- *  its contents will be preserved.
- */
-KFS_EXTERN rc_t CC KMD5SumFmtMakeRead ( const KMD5SumFmt **f, struct KFile const *in );
-KFS_EXTERN rc_t CC KMD5SumFmtMakeUpdate ( KMD5SumFmt **f, struct KFile *out );
-
-
-/* Count
- *  return the number of checksums in file
- */
-KFS_EXTERN rc_t CC KMD5SumFmtCount ( const KMD5SumFmt *self, uint32_t *count );
-
-
-/* Get
- *  retrieve an indexed checksum line
- *
- *  "idx" [ IN ] - zero-based index of checksum to access
- *
- *  "path" [ OUT ] and "size" [ IN ] - return buffer for file path
- *
- *  "digest" [ OUT ] - return parameter for the MD5 checksum
- *
- *  "bin" [ OUT, NULL OKAY ] - true if fopen mode used to
- *  calculate "digest" was binary, false if text. pertinent if
- *  digest was calculated using DOS text mode.
- */
-KFS_EXTERN rc_t CC KMD5SumFmtGet ( const KMD5SumFmt *self, uint32_t idx,
-    char *path, size_t size, uint8_t digest [ 16 ], bool *bin );
-
-
-/* Find
- *  retrieve checksum line by path
- *
- *  "path" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file
- *
- *  "digest" [ OUT ] - return parameter for the MD5 checksum
- *
- *  "bin" [ OUT, NULL OKAY ] - true if fopen mode used to
- *  calculate "digest" was binary, false if text. pertinent if
- *  digest was calculated using DOS text mode.
- */
-KFS_EXTERN rc_t CC KMD5SumFmtFind ( const KMD5SumFmt *self,
-    const char *path, uint8_t digest [ 16 ], bool *bin );
-
-
-/* Delete
- *  remove an existing line
- *
- *  "path" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file
- *
- *  returns rcNotFound if not present
- */
-KFS_EXTERN rc_t CC KMD5SumFmtDelete ( KMD5SumFmt *self, const char *path );
-
-
-/* Update
- *  add a checksum line to file or update an existing line
- *
- *  "path" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file
- *
- *  "digest" [ IN ] - calculated MD5 checksum
- *
- *  "bin" [ IN ] - true if checksum was calculated on all bytes
- *  in file, false if fopen mode used to read file was text.
- *
- * NB - the md5sum tool operates with the assumption that files
- *  are opened using "fopen". it records the mode used by prepending
- *  '*' to indicate binary and ' ' to indicate text mode within the
- *  checksum line.
- *
- *  unfortunately, this creates a situation where text-mode files
- *  checksummed on DOS cannot be properly checked on any other
- *  platform without the aid of some filter to drop out '\r' from
- *  a '\r\n' sequence.
- *
- *  fortunately, most users are unaware of the binary/text mode
- *  switches available with md5sum and use the default mode, which
- *  is binary on DOS and text on Unix, which happens to be equivalent
- *  to binary ( making one wonder why binary is not instead the
- *  universal default ).
- *
- *  the end result is that we need to indicate whether CR stripping
- *  was performed while at the same time behaving like md5sum.
- */
-KFS_EXTERN rc_t CC KMD5SumFmtUpdate ( KMD5SumFmt *self, const char *path,
-    const uint8_t digest [ 16 ], bool bin );
-
-/* Rename
- * Rename the checksum line to reflect a file name change but no content change.
- *
- *  "newpath" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file's new name
- *
- *  "oldpath" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file's old name
- *
- * Parameter order matches KDirectoryRename()
- */
-KFS_EXTERN rc_t CC KMD5SumFmtRename ( KMD5SumFmt *self, const char *oldpath, const char *newpath );
-
-
-/* Flush
- *  write data to disk, but stay open
- */
-KFS_EXTERN rc_t CC KMD5SumFmtFlush ( KMD5SumFmt *self );
-
-
-/*--------------------------------------------------------------------------
- * MD5 KFile extensions
- */
-
-/* MakeMD5Read
- *  creates an adapter to check MD5 checksum for a source file
- *
- *  "f" [ OUT ] - return parameter for file with md5 check
- *
- *  "src" [ IN ] - source file with read permission
- *
- *  "digest" [ IN ] - MD5 checksum to match
- *
- * NB - creates a read-only file that does NOT support random access
- *  i.e. must be consumed serially starting from offset 0
- */
-KFS_EXTERN rc_t CC KFileMakeMD5Read ( struct KFile const **f,
-    struct KFile const *src, const uint8_t digest [ 16 ] );
-
-    
-/*--------------------------------------------------------------------------
- * KMD5File
- *  subclass of KFile
- */
-typedef struct KMD5File KMD5File;
-
-
-/* MakeWrite
- * MakeAppend
- *  creates an adapter to create MD5 checksum for a file
- *
- *  "f" [ OUT ] - return parameter for file with md5 check
- *
- *  "out" [ IN ] - output file with write permission
- *  since this file is being wrapped by "f", ownership of
- *  the provided reference is transferred to "f"
- *
- *  "md5" [ IN ] - md5 checksum output formatter.
- *  since this may be used for multiple checksums, "f" will
- *  attach its own reference to "md5".
- *
- *  "path" [ IN ] - md5 checksum output file path, used to
- *  create standard md5sum file entry.
- *
- * NB - creates a write-only file that does NOT suppport random access
- *  i.e. must be written serially from offset 0
- */
-KFS_EXTERN rc_t CC KMD5FileMakeWrite ( KMD5File **f,
-    struct KFile *out, KMD5SumFmt *md5, const char *path );
-KFS_EXTERN rc_t CC KMD5FileMakeAppend ( KMD5File **f,
-    struct KFile *out, KMD5SumFmt *md5, const char *path );
-
-/* MakeReadNew
- *  creates an adapter to create MD5 checksum for a file
- *
- *  "f" [ OUT ] - return parameter for file with md5 check
- *
- *  "in" [ IN ] - input file 
- *  since this file is being wrapped by "f", ownership of
- *  the provided reference is transferred to "f"
- *
- *  "md5" [ IN ] - md5 checksum output formatter.
- *  since this may be used for multiple checksums, "f" will
- *  attach its own reference to "md5".
- *
- *  "path" [ IN ] - md5 checksum output file path, used to
- *  create standard md5sum file entry.
- *
- * NB - creates a write-only file that does NOT suppport random access
- *  i.e. must be written serially from offset 0
- */
-KFS_EXTERN rc_t CC KFileMakeNewMD5Read ( const struct KFile **fp,
-    const struct KFile *in, KMD5SumFmt *md5, const char *path );
-
-
-/* ToKFile
- *  an MD5 file is a subclass of KFile
- *  this is an explicit cast operator
- */
-KFS_EXTERN struct KFile* CC KMD5FileToKFile ( KMD5File *self );
-KFS_EXTERN struct KFile const* CC KMD5FileToKFileConst ( const KMD5File *self );
-
-/* BeginTransaction
- *  preserve current MD5 state and file marker
- *  in preparation for rollback
- */
-KFS_EXTERN rc_t CC KMD5FileBeginTransaction ( KMD5File *self );
-
-
-/* Commit
- *  accept current MD5 state as correct
- */
-KFS_EXTERN rc_t CC KMD5FileCommit ( KMD5File *self );
-
-
-/* Revert
- *  reset state to previous transaction boundary conditions
- */
-KFS_EXTERN rc_t CC KMD5FileRevert ( KMD5File *self );
-
-/* Reset
- *  reset state to that of an empty file
- *  aborts any open transaction
- */
-KFS_EXTERN rc_t CC KMD5FileReset ( KMD5File *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_md5_ */
diff --git a/interfaces/kfs/mmap.h b/interfaces/kfs/mmap.h
deleted file mode 100644
index ca442d8..0000000
--- a/interfaces/kfs/mmap.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_mmap_
-#define _h_kfs_mmap_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-
-
-/*--------------------------------------------------------------------------
- * KMMap
- *  a memory mapped region
- */
-typedef struct KMMap KMMap;
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KFS_EXTERN rc_t CC KMMapAddRef ( const KMMap *self );
-KFS_EXTERN rc_t CC KMMapRelease ( const KMMap *self );
-
-/* Size
- *  returns size of memory region
- *
- *  "size" [ OUT ] - return parameter for region size
- */
-KFS_EXTERN rc_t CC KMMapSize ( const KMMap *self, size_t *size );
-
-/* Position
- *  returns region starting offset into mapped file
- *
- *  "pos" [ OUT ] - return parameter for file offset
- */
-KFS_EXTERN rc_t CC KMMapPosition ( const KMMap *self, uint64_t *pos );
-
-/* Reposition
- *  shift region to a new position
- *  may change region size
- *
- *  "pos" [ IN ] - new starting position for region
- *
- *  "size" [ OUT, NULL OKAY ] - optional return parameter
- *  for resultant region size
- */
-KFS_EXTERN rc_t CC KMMapReposition ( const KMMap *self, uint64_t pos, size_t *size );
-
-/* Addr
- *  returns starting address of memory region
- *
- *  "addr" [ OUT ] - return parameter for memory address
- */
-KFS_EXTERN rc_t CC KMMapAddrRead ( const KMMap *self, const void **addr );
-KFS_EXTERN rc_t CC KMMapAddrUpdate ( KMMap *self, void **addr );
-
-/* Make
- *  maps entire file
- *
- *  "f" [ IN ] - file to map.
- *  a new reference will be added
- */
-KFS_EXTERN rc_t CC KMMapMakeRead ( const KMMap **mm, struct KFile const *f );
-KFS_EXTERN rc_t CC KMMapMakeUpdate ( KMMap **mm, struct KFile *f );
-
-/* MakeMax
- *  maps as much of a file as possible
- *
- *  "f" [ IN ] - file to map.
- *  a new reference will be added
- */
-KFS_EXTERN rc_t CC KMMapMakeMaxRead ( const KMMap **mm, struct KFile const *f );
-KFS_EXTERN rc_t CC KMMapMakeMaxUpdate ( KMMap **mm, struct KFile *f );
-
-/* MakeRgn
- *  maps a portion of a file
- *
- *  "f" [ IN ] - file to map
- *  a new reference will be added
- *
- *  "pos" [ IN ] - starting offset into file
- *
- *  "size" [ IN, DEFAULT ZERO ] - size of resulting region. if 0,
- *  the size will be interpreted as meaning size of "f" - "pos".
- */
-KFS_EXTERN rc_t CC KMMapMakeRgnRead ( const KMMap **mm,
-    struct KFile const *f, uint64_t pos, size_t size );
-KFS_EXTERN rc_t CC KMMapMakeRgnUpdate ( KMMap **mm,
-    struct KFile *f, uint64_t pos, size_t size );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_mmap_ */
diff --git a/interfaces/kfs/nullfile.h b/interfaces/kfs/nullfile.h
deleted file mode 100644
index 35bf866..0000000
--- a/interfaces/kfs/nullfile.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_nullfile_
-#define _h_kfs_nullfile_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KFile;
-
-typedef struct KNullFile KNullFile;
-
-/* -----
- * Copy can be a serialized type KFile for a KNullFile opened for Read but
- * not when opened for write.
- *
- * Specifically this means copy can be a KMD5File for read but not for write
- * other KFile nulltypes might have the same restriction.
- *
- * A seekless update KNullfile can be created but does not now exist.
- */
-KFS_EXTERN rc_t CC KFileMakeNullRead (const struct KFile ** self);
-KFS_EXTERN rc_t CC KFileMakeNullUpdate (struct KFile ** self);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_nullfile_ */
diff --git a/interfaces/kfs/pagefile.h b/interfaces/kfs/pagefile.h
deleted file mode 100644
index 3183576..0000000
--- a/interfaces/kfs/pagefile.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_pagefile_
-#define _h_kfs_pagefile_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-
-
-/*--------------------------------------------------------------------------
- * KPage
- *  a reference counted page
- */
-typedef struct KPage KPage;
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KFS_EXTERN rc_t CC KPageAddRef ( const KPage *self );
-KFS_EXTERN rc_t CC KPageRelease ( const KPage *self );
-
-
-/* Id
- *  returns page id
- *
- *  "page_id" [ OUT ] - return parameter for page id
- */
-KFS_EXTERN rc_t CC KPageId ( const KPage *self, uint32_t *page_id );
-
-
-/* ConstSize
- *  returns constant page size
- */
-KFS_EXTERN size_t CC KPageConstSize ( void );
-
-
-/* AccessRead
- * AccessUpdate
- *  gain access to page memory
- *  update access marks page as modified
- *
- *  "mem" [ OUT ] - pointer to page
- *
- *  "bytes" [ OUT, NULL OKAY ] - page size in bytes
- */
-KFS_EXTERN rc_t CC KPageAccessRead ( const KPage *self, const void **mem, size_t *bytes );
-KFS_EXTERN rc_t CC KPageAccessUpdate ( KPage *self, void **mem, size_t *bytes );
-
-
-/*--------------------------------------------------------------------------
- * KPageFile
- *  presents some level of page management on top of a random-access KFile
- */
-typedef struct KPageFile KPageFile;
-
-
-/* Make
- *  creates a page file
- *
- *  "pf" [ OUT ] - return parameter for page file
- *
- *  "backing" [ IN ] - backing file
- *   NB - attaches a new reference to file
- *        does not take ownership
- *
- *  "climit" [ IN ] - cache size limit
- *
- *  "write_through" [ IN ] - if true, causes page flushing
- *  on each KPageRelease message if modified.
- */
-KFS_EXTERN rc_t CC KPageFileMakeRead ( const KPageFile **pf,
-    struct KFile const *backing, size_t climit );
-KFS_EXTERN rc_t CC KPageFileMakeUpdate ( KPageFile **pf,
-    struct KFile *backing, size_t climit, bool write_through );
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KFS_EXTERN rc_t CC KPageFileAddRef ( const KPageFile *self );
-KFS_EXTERN rc_t CC KPageFileRelease ( const KPageFile *self );
-
-
-/* Size
- *  returns size in bytes of file and cache
- *
- *  "lsize" [ OUT, NULL OKAY ] - return parameter for logical size
- *
- *  "fsize" [ OUT, NULL OKAY ] - return parameter for file size
- *
- *  "csize" [ OUT, NULL OKAY ] - return parameter for cache size
- */
-KFS_EXTERN rc_t CC KPageFileSize ( const KPageFile *self,
-    uint64_t *lsize, uint64_t *fsize, size_t *csize );
-
-
-/* SetSize
- *  extends or truncates underlying file
- *  may affect cache contents
- *
- *  "size" [ IN ] - logical size
- */
-KFS_EXTERN rc_t CC KPageFileSetSize ( KPageFile *self, uint64_t size );
-
-
-/* Alloc
- *  allocates a new page
- *  the page will be zeroed and initially unmodified
- *
- *  "page" [ OUT ] - return parameter for page object
- *
- *  "page_id" [ OUT, NULL OKAY ] - optional return parameter for page id
- */
-KFS_EXTERN rc_t CC KPageFileAlloc ( KPageFile *self, KPage **page, uint32_t *page_id );
-
-
-/* Get
- *  returns an existing page
- *
- *  "page" [ OUT ] - return parameter for page object
- *
- *  "page_id" [ IN ] - id of page to retrieve
- */
-KFS_EXTERN rc_t CC KPageFileGet ( KPageFile *self, KPage **page, uint32_t page_id );
-
-
-/* PosGet
- *  returns a page corresponding to position
- *
- *  "page" [ OUT ] - return parameter for page object
- *
- *  "offset" [ IN ] - offset to a byte within file
- */
-KFS_EXTERN rc_t CC KPageFilePosGet ( KPageFile *self, KPage **page, uint64_t offset );
-
-
-/* DropBacking
- *  used immediately prior to releasing
- *  prevents modified pages from being flushed to disk
- *  renders object nearly useless
- */
-KFS_EXTERN rc_t CC KPageFileDropBacking ( KPageFile *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_pagefile_ */
diff --git a/interfaces/kfs/path-priv.h b/interfaces/kfs/path-priv.h
deleted file mode 100644
index 2e676a7..0000000
--- a/interfaces/kfs/path-priv.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*===========================================================================
-*
-*                            Public Domain Notice
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_path_priv_
-#define _h_kfs_path_priv_
-
-DO NOT USE
-
-#endif /* _h_kfs_path_priv_ */
diff --git a/interfaces/kfs/path.h b/interfaces/kfs/path.h
deleted file mode 100644
index 91949a0..0000000
--- a/interfaces/kfs/path.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*===========================================================================
-*
-*                            Public Domain Notice
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_path_
-#define _h_kfs_path_
-
-DO NOT USE
-
-#endif /* _h_kfs_path_ */
diff --git a/interfaces/kfs/pmem.h b/interfaces/kfs/pmem.h
deleted file mode 100644
index 3cffff1..0000000
--- a/interfaces/kfs/pmem.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_pmem_
-#define _h_kfs_pmem_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KPageFile;
-
-
-/*--------------------------------------------------------------------------
- * KMemBank
- *  manages simple blocks of memory
- *  optionally backed by a persistent page file
- */
-typedef struct KMemBank KMemBank;
-
-
-/* Make
- *  make a memory bank with a fixed block size
- *  the total amount of memory may be limited
- *  the memory may be drawn from an externally supplied page file
- *
- *  "block_size" [ IN ] - ignored
- *
- *  "limit" [ IN, DFLT ZERO ] - ignored
- *
- *  "backing" [ IN ] - a page source for allocator.
- *  a new reference will be added if not null.
- */
-KFS_EXTERN rc_t CC KMemBankMake ( KMemBank **bank,
-    size_t block_size, uint64_t limit, struct KFile *backing );
-
-
-/* AddRef
- * Release
- */
-KFS_EXTERN rc_t CC KMemBankAddRef ( const KMemBank *self );
-KFS_EXTERN rc_t CC KMemBankRelease ( const KMemBank *self );
-
-
-/* Alloc
- *  allocate memory
- *
- *  "id" [ OUT ] - return parameter for memory allocation id
- *
- *  "bytes" [ IN ] - the number of bytes to allocate
- *
- *  "clear" [ IN ] - if true, initialize the memory to zero
- */
-KFS_EXTERN rc_t CC KMemBankAlloc ( KMemBank *self,
-    uint64_t *id, uint64_t bytes, bool clear );
-
-
-/* Free
- *  free memory
- *
- *  "id" [ IN, ZERO OKAY ] - id of the allocation to be freed
- */
-KFS_EXTERN rc_t CC KMemBankFree ( KMemBank *self, uint64_t id );
-
-
-/* Size
- *  returns the allocated capacity of the memory object
- *
- *  "id" [ IN ] - id of the allocation
- *
- *  "size" [ OUT ] - return parameter
- */
-KFS_EXTERN rc_t CC KMemBankSize ( const KMemBank *self, uint64_t id, uint64_t *size );
-
-
-/* SetSize
- *  performs a reallocation of memory object
- *
- *  "id" [ IN ] - id of the allocation being resized
- *
- *  "size" [ IN ] - new capacity
- */
-KFS_EXTERN rc_t CC KMemBankSetSize ( KMemBank *self, uint64_t id, uint64_t size );
-
-
-/* Read
- *  linearly access memory
- *
- *  "id" [ IN ] - id of the allocation being read
- *
- *  "pos" [ IN ] - starting offset into allocation
- *
- *  "buffer" [ IN ] and "bsize" [ IN ] - buffer for returned data
- *
- *  "num_read" [ OUT ] - return parameter for the number of bytes read
- */
-KFS_EXTERN rc_t CC KMemBankRead ( const KMemBank *self, uint64_t id,
-   uint64_t pos, void *buffer, size_t bsize, size_t *num_read );
-
-
-/* Write
- *  linearly update memory
- *  will resize as required
- *
- *  "id" [ IN ] - id of the allocation being writ
- *
- *  "pos" [ IN ] - starting offset into allocation
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to write
- *
- *  "num_writ" [ OUT ] - return parameter for the number of bytes written
- */
-KFS_EXTERN rc_t CC KMemBankWrite ( KMemBank *self, uint64_t id,
-    uint64_t pos, const void *buffer, size_t size, size_t *num_writ );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_pmem_ */
diff --git a/interfaces/kfs/quickmount.h b/interfaces/kfs/quickmount.h
deleted file mode 100644
index 6ecbaef..0000000
--- a/interfaces/kfs/quickmount.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_quick_mount_
-#define _h_kfs_quick_mount_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KDirectory;
-struct KFile;
-
-typedef struct KQuickMountDir KQuickMountDir;
-
-/* OpenQuickMountDirRead
- *
- */
-KFS_EXTERN rc_t KQuickMountDirMake (const struct KDirectory * self, 
-                                    const struct KDirectory ** pnewdir,
-                                    const struct KFile * file,
-                                    const char * path, size_t path_size,
-                                    const char * mount, size_t mount_size);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_quick_mount_ */
diff --git a/interfaces/kfs/ramfile.h b/interfaces/kfs/ramfile.h
deleted file mode 100644
index 65957b1..0000000
--- a/interfaces/kfs/ramfile.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_ramfile_
-#define _h_kfs_ramfile_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KFile;
-
-typedef struct KRamFile KRamFile;
-
-/* -----
- * fakes file reads and writes into a buffer
- *
- * writes never fail. Acts like a sliding window from previous writes of possible
- * reads only succeed of they are from what was contained in the last write
- *
- * zero fills are put in where possible. If you write a buffer, slide the window with 
- * a write that doesn't fill the buffer, the rest will be zero not what was previously written
- *
- * The Read only form doesn;t allow writes but will reflect what was put in
- * the buffer outside of the KFile
- *
- * The write only will accept writes but can only be accessed outside of the KFile.
- *
- * The update form tries its best to give what was asked for [see above]
- */
-KFS_EXTERN rc_t CC KRamFileMakeRead (const struct KFile ** self,
-                                     char * buffer, size_t buffer_size);
-
-KFS_EXTERN rc_t CC KRamFileMakeWrite (struct KFile ** self,
-                                      char * buffer, size_t buffer_size);
-
-KFS_EXTERN rc_t CC KRamFileMakeUpdate (struct KFile ** self,
-                                       char * buffer, size_t buffer_size);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_ramfile_ */
diff --git a/interfaces/kfs/readheadfile.h b/interfaces/kfs/readheadfile.h
deleted file mode 100644
index 1cd47a1..0000000
--- a/interfaces/kfs/readheadfile.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_readheadfile_
-#define _h_kfs_readheadfile_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards allowing opaque class typing
- */
-struct KFile;
-
-
-/* MakeReadHead
- *  make a read-only file where we buffer only the first part of the file
- *  this is pretty much only needed to type a file when we don't know
- *  or want to see if we can acess randomly.  This is a fairly smart type
- *  that will take ownership of the pointer to the 'original' KFile
- *  reference.  If it finds that the 'original' KFile is seekable (has
- *  random access) it will merely return a reference to that const KFile *
- *  rather than creating a new KFile that will in most cases pass through 
- *  all method calls to the original.
- *
- *  This type was created primarily to allow the reading of the first part
- *  of a file for type recognition with out forcing numerous cases of
- *  duplicated code to check for random access on an existing KFile reference
- *  and handling of the pre-read in the application.
- *
- *  This class is intended for files that once typed will be read straight
- *  through.  If more random access to the file is needed the KBufFile is 
- *  indicated rather than this one.  If a straight through access is needed
- *  this is a far lighter weight solution than KBufFile.
- *
- *  A references is added to the original even if it becomes used as the new
- *  file because it allows random access.
- *
- *  "buf" [ OUT ] - return parameter for new buffered file
- *
- *  "original" [ IN ] - source file to be buffered. must have read access
- *
- *  "bsize" [ IN ] - buffer size
- */
-KFS_EXTERN 
-rc_t CC KFileMakeReadHead (const struct KFile ** pself,
-                           const struct KFile * original,
-                           size_t buffer_size);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_readheadfile_ */
diff --git a/interfaces/kfs/sra.h b/interfaces/kfs/sra.h
deleted file mode 100644
index c312b59..0000000
--- a/interfaces/kfs/sra.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_sra_
-#define _h_kfs_sra_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#include <klib/defs.h>
-
-#include <stdarg.h>
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This file provides documentation and symbols for the single file archive
- * format originally created for the SRA project.
- */
-
-/*
- * filler bytes before data files can be inserted to make the start line
- * up on specified boundaries.  By using a single bit approach for the values
- * we get the bit-wise not of the mask that must be met for the start of the file.
- * Or one more than the maximum number of inserted bytes.  This is only used on
- * creation of the file and has no bearing at all on the parsing afterwards.
- * In it's only use so far any bit in a 32 bit bit number could be used not
- * just these enumerated values.  
- */
-typedef uint32_t KSRAFileAlignment;
-enum eKSRAFileAlignment
-{
-    /* align on byte count unit boundaries
-     * set this to the number of bytes in the alignment unit
-     */
-    sraAlignInvalid = 0,
-    sraAlign1Byte = 1,
-    sraAlign2Byte = 2,
-    sraAlign4Byte = 4,
-    sraAlign8Byte = 8,
-    sraAlign16Byte = 16,
-    sraAlign32Byte = 32,
-    sraAlign64Byte = 64
-};
-
-/* ======================================================================
- *
- * SRA File Format
- */
-typedef uint32_t SraEndian_t;
-/* enum fails to handle these due to integer overflow */
-#define eSraByteOrderTag     0x05031988
-#define eSraByteOrderReverse 0x88190305
-
-
-
-
-typedef struct KSraHeader KSraHeader;
-struct KSraHeader
-{
-    /* the first two fields are byte endian agnostic - they are low to high as shown */
-    uint8_t	ncbi[4];                /* 'N', 'C', 'B', 'I' */
-    uint8_t	sra[4];                 /* '.', 's', 'r', 'a' */
-    /* this field lets you determine the byte order of the file */
-    SraEndian_t	byte_order;
-    /* not a ver_t - this is a 4 byte integer with no subfields */
-    uint32_t	version;
-    union 
-    {
-        struct
-        {
-            /* the only header field in the first version is the data offset */
-            uint64_t	file_offset;
-        } v1;
-    } u;
-};
-
-/* ======================================================================
- * Header format structures
- *
- */
-
-
-
-#define FS_SRA_CUR_VERSION 1
-KFS_EXTERN size_t CC SraHeaderSize ( const KSraHeader * self );
-
-KFS_EXTERN uint64_t CC SraHeaderGetFileOffset (const KSraHeader * self);
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-struct KDirectory;
-struct KToc;
-
-/*--------------------------------------------------------------------------
- * KDirectory
- *  SRA-specific extensions
- */
-
-/* KArcParseSRA
- *	A parse function for sra files suitable for KDirectoryOpenArcDirRead
- *
- * [INOUT] KArcTOC*	self	The TOC (table of contents) to fill in with the parse
- * [IN]    const KFile*	kfile	The opened (as KFile) archive to parse.
- */
-KFS_EXTERN rc_t CC KArcParseSRA ( struct KToc * self,
-                                  const void * kvoid,
-                                  bool (CC*ignored) (const struct KDirectory*,  const char*, void*),
-                                  void *ignored_data);
-KFS_EXTERN rc_t CC KArcParseSRAUnbounded ( struct KToc * self,
-                                           const void * kvoid,
-                                           bool (CC*ignored) (const struct KDirectory*,  const char*, void*),
-                                           void *ignored_data);
-
-KFS_EXTERN rc_t CC KArcParseKDir( struct KToc * self,
-                                  const void * kdir,
-                                  bool(CC*f)(const struct KDirectory*,const char *, void*),
-                                  void *filterparam);
-
-
-/* KDirectoryOpenSraArchive
- *  opens a named SRA archive
- *
- *  "sra_dir" [ OUT ] - return parameter for archive
- *
- *  "chroot" [ IN ] - if non-zero, the new directory becomes
- *  chroot'd and will interpret paths beginning with '/'
- *  relative to itself.
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting sraget archive
- */
-KFS_EXTERN rc_t CC KDirectoryOpenSraArchiveRead ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVOpenSraArchiveRead ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const char *path, va_list args );
-KFS_EXTERN rc_t CC KDirectoryOpenSraArchiveRead_silent ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVOpenSraArchiveRead_silent ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const char *path, va_list args );
-KFS_EXTERN rc_t CC KDirectoryOpenSraArchiveRead_silent_preopened ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const struct KFile * f, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVOpenSraArchiveRead_silent_preopened ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const struct KFile * f, const char *path, va_list args );
-KFS_EXTERN rc_t CC KDirectoryOpenSraArchiveReadUnbounded_silent_preopened ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const struct KFile * f, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVOpenSraArchiveReadUnbounded_silent_preopened ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const struct KFile * f, const char *path, va_list args );
-/* copycat needs an unbounded version - that is filesize is not necessarily known
- * this is unsafe for most other uses */
-KFS_EXTERN rc_t CC KDirectoryOpenSraArchiveReadUnbounded ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const char *path, ... );
-KFS_EXTERN rc_t CC KDirectoryVOpenSraArchiveReadUnbounded ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const char *path, va_list args );
-
-KFS_EXTERN rc_t CC KFileIsSRA (const char * b, size_t z);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_sra_ */
diff --git a/interfaces/kfs/subfile.h b/interfaces/kfs/subfile.h
deleted file mode 100644
index bad2c5b..0000000
--- a/interfaces/kfs/subfile.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_subfile_
-#define _h_kfs_subfile_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KFile;
-
-typedef struct KSubFile KSubFile;
-
-/* -----
- * Copy can be a serialized type KFile for a KSubFile opened for Read but
- * not when opened for write.
- *
- * Specifically this means copy can be a KMD5File for read but not for write
- * other KFile subtypes might have the same restriction.
- *
- * A seekless update KSubfile can be created but does not now exist.
- */
-KFS_EXTERN rc_t CC KFileMakeSubRead (const struct KFile ** self, const struct KFile * original,
-			uint64_t start_position, uint64_t size);
-KFS_EXTERN rc_t CC KFileMakeSubUpdate (struct KFile ** self, struct KFile * original,
-			uint64_t start_position, uint64_t size);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_subfile_ */
diff --git a/interfaces/kfs/szip.h b/interfaces/kfs/szip.h
deleted file mode 100644
index beef303..0000000
--- a/interfaces/kfs/szip.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_szip_
-#define _h_kfs_szip_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-
-/* MakeSzipForRead
- *  creates an adapter to gunzip a source file
- *
- *  "sz" [ OUT ] - return parameter for decompressed file
- *
- *  "src" [ IN ] - compressed source file with read permission
- *
- * NB - creates a read-only file that does NOT support random access
- *  i.e. must be consumed serially starting from offset 0
- */
-KFS_EXTERN rc_t CC KFileMakeSzipForRead ( struct KFile const **sz, struct KFile const *src );
-
-
-/* MakeSzipForWrite
- *  creates an adapter to gzip a source file
- *
- *  "sz" [ OUT ] - return parameter for compressed file
- *
- *  "src" [ IN ] - uncompressed source file with write permission
- *
- * NB - creates a write-only file that does NOT suppport random access
- *  i.e. must be written serially from offset 0
- */
-KFS_EXTERN rc_t CC KFileMakeSzipForWrite ( struct KFile **sz, struct KFile *file );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_szip_ */
diff --git a/interfaces/kfs/tar.h b/interfaces/kfs/tar.h
deleted file mode 100644
index 96d8c63..0000000
--- a/interfaces/kfs/tar.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_tar_
-#define _h_kfs_tar_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-struct KDirectory;
-struct KToc;
-
-/*--------------------------------------------------------------------------
- * KDirectory
- *  TAR-specific extensions
- */
-
-/* ParseTAR
- *  A parse function for tar files suitable for KDirectoryOpenArcDirRead
- *
- * [INOUT] KToc*    self    The TOC (table of contents) to fill in with the parse
- * [IN]    const KFile* kfile   The opened (as KFile) archive to parse.
- */
-KFS_EXTERN rc_t CC KArcParseTAR( struct KToc * self, 
-                                 const void * kfile,
-                                 bool(CC*f)(const struct KDirectory*,const char *, void*),
-                                 void *filterparam);
-
-/* KDirectoryOpenTarArchive
- *  opens a named TAR archive
- *
- *  "tar_dir" [ OUT ] - return parameter for archive
- *
- *  "chroot" [ IN ] - if non-zero, the new directory becomes
- *  chroot'd and will interpret paths beginning with '/'
- *  relative to itself.
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target archive
- */
-KFS_EXTERN int CC KDirectoryOpenTarArchiveRead ( struct KDirectory const *self,
-    struct KDirectory const **tar_dir, int chroot, const char *path, ... );
-KFS_EXTERN int CC KDirectoryVOpenTarArchiveRead ( struct KDirectory const *self,
-    struct KDirectory const **tar_dir, int chroot, const char *path, va_list args );
-
-KFS_EXTERN int CC KDirectoryOpenTarArchiveRead_silent ( struct KDirectory const *self,
-    struct KDirectory const **tar_dir, int chroot, const char *path, ... );
-KFS_EXTERN int CC KDirectoryVOpenTarArchiveRead_silent ( struct KDirectory const *self,
-    struct KDirectory const **tar_dir, int chroot, const char *path, va_list args );
-
-KFS_EXTERN int CC KDirectoryOpenTarArchiveRead_silent_preopened ( struct KDirectory const *self,
-    struct KDirectory const **tar_dir, int chroot, const struct KFile * f, const char *path, ... );
-KFS_EXTERN int CC KDirectoryVOpenTarArchiveRead_silent_preopened ( struct KDirectory const *self,
-    struct KDirectory const **tar_dir, int chroot, const struct KFile * f, const char *path, va_list args );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_tar_ */
diff --git a/interfaces/kfs/teefile.h b/interfaces/kfs/teefile.h
deleted file mode 100644
index 698e91c..0000000
--- a/interfaces/kfs/teefile.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_teefile_
-#define _h_kfs_teefile_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KFile;
-
-typedef struct KTeeFile KTeeFile;
-
-/* -----
- * Copy can be a serialized type KFile for a KTeeFile opened for Read but
- * not when opened for write.
- *
- * Specifically this means copy can be a KMD5File for read but not for write
- * other KFile subtypes might have the same restriction.
- *
- * A seekless update KTeefile can be created but does not now exist.
- */
-KFS_EXTERN rc_t CC KFileMakeTeeRead (const struct KFile ** self, 
-                                     const struct KFile * original,
-                                     struct KFile * copy);
-KFS_EXTERN rc_t CC KFileMakeTeeUpdate (struct KFile ** self,
-                                       struct KFile * original,
-                                       struct KFile * copy);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_teefile_ */
diff --git a/interfaces/kfs/toc.h b/interfaces/kfs/toc.h
deleted file mode 100644
index e0de152..0000000
--- a/interfaces/kfs/toc.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_toc_
-#define _h_kfs_toc_
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifndef _h_klib_pbstree_
-#include <klib/pbstree.h>
-#endif
-
-#ifndef _h_kfs_sra_
-#include <kfs/sra.h>
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*==========================================================================
- * The TOC (Table of Contents) is the basis of non-O/S level file systems
- * directory structures.
- *
- * The TOC is based on a set of entries.  An entry can represent a file
- * (collection of bytes), a directory (a list of entries, or a link (an
- * entry that refers to another entry).
- *
- * Files are represented either as a contiguous array of bytes or a
- * sequence of smaller chunks of contiguous bytes.  Other than the initial
- * creation of the chunked version, most operations on the chunked file
- * will be able to treat it as a contiguous sequence with any gaps between
- * contiguous chunks being treated as if they were all zero bytes.  So
- * for the most part the two types of file are the same to the outside
- * world.
- *
- * A directory is viewed as a sorted list of named references to files.
- * In the first versions the form is of a binary search tree per directory
- * but for the most part that detail is irrelevant.  In the tree a directory
- * is an entry that contains its own tree.  A path is a sequence of named
- * entries in order - the representation of a path is the Unix/Posix style
- * path.
- *
- * A link is either a hard or soft link 9using Unix/Posix terminology. A
- * soft link is a named item that contains a path that names another item.
- * A hard link will as much as possible refer directly to the same file,
- * directory or another link as another item.
- *
- * Each entry is represented by a TocEntry.
- *
- * A path as mentioned above is a list of facets (names of directories) up to
- * a final leaf item that can be any of the item types.
- *
- * Position is the logical offset within a file or a particualr byte,  The
- * first byte is at position 0.
- */
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct BSTree;
-struct Vector;
-struct String;
-struct KFile;
-
-
-/*--------------------------------------------------------------------------
- * KTocChunk
- *  Describes a chunk of valid data within a file.  The concept is that a file
- *  can be made up of discrete chunks that might not be consecutive on the 
- *  storage system.  There might also be gaps between the chunks - gaps that 
- *  read as all zeroes.  These could be tarred up versions of sparse files
- *  where the only things stored on disk are small regions of non-zero data. 
- *  Or it could be some archival format where data is broken into some form of
- *  packets.
- *
- *  64 bit values are used for file sizes up to 18,446,744,073,709,551,617 bytes
- *  up to exabytes.  The human genome is in the gigabyte range so 32 bit values
- *  are too close to the limits so the larger range was used.
- *
- *  This struct is very clear and public so chunks can be built up or used  freely
- *  by non-file-system specific code.
- */
-typedef struct KTocChunk KTocChunk;
-struct KTocChunk
-{
-    /* position of chunk within logical file */
-    uint64_t logical_position;
-
-    /* position of chunk within source container file */
-    uint64_t source_position;
-
-    /* chunk size */
-    uint64_t size;
-};
-
-
-
-KFS_EXTERN rc_t CC KDirectoryOpenTocFileRead( const KDirectory * self,
-                                              struct KFile const ** pfile,
-                                              KSRAFileAlignment align,
-                                              bool (CC * filter) (const KDirectory*,const char*,void*),
-                                              void * filter_param,
-                                              rc_t (CC * usort)(const KDirectory*, struct Vector*) );
-
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_toc_ */
diff --git a/interfaces/kfs/wgaencrypt.h b/interfaces/kfs/wgaencrypt.h
deleted file mode 100644
index 2f479c8..0000000
--- a/interfaces/kfs/wgaencrypt.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#error "OBSOLETE do not use"
diff --git a/interfaces/klib/btree.h b/interfaces/klib/btree.h
deleted file mode 100644
index 399788f..0000000
--- a/interfaces/klib/btree.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_btree_
-#define _h_klib_btree_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * defines
- */
-
-#define PGBITS 15
-#define PGSIZE ( 1U << PGBITS )
-    
-
-/* A pager must allocate pages of exactly 32k
- * page id's can not be larger than 31 bits
- * and page id's must be greater than zero
- * thus the maximum amount of memory that a pager
- * can provide is 32k * (2**31-1) = ~64G
- * keys are stored compressed, so 64G can store a lot of keys.
- *
- * If you don't provide a pager, but you do provide a backing file
- * KPageFile will be used to provide the paging.
- * If you don't provide a pager or a backing file, pages will be
- * provided by malloc, up to the given memory limit.
- */
-typedef struct Pager Pager;
-    
-typedef struct Pager_vt Pager_vt;
-struct Pager_vt {
-    /* Pager and Pager_vt is expected to work like this:
-     *  uint32_t id = 0;
-     *  void const *page = vt->alloc(pager, &id);
-     *  if (page != NULL) {
-     *      void *content = vt->update(pager, page);
-     *      assert(contents != NULL);
-     *
-     *  ... // do something with page contents
-     *
-     *      vt->unuse(pager, page); contents = NULL; page = NULL;
-     *
-     *  ...
-     *
-     *      page = use(pager, id);
-     *      assert(page != NULL);
-     *      void const *data = vt->access(pager, page);
-     *      assert(data != NULL);
-     *
-     *      ...
-     *
-     *      vt->unuse(pager, page); data = NULL, page = NULL;
-     *  }
-     *  else {
-     *      // can't allocate anymore pages
-     *  }
-     */
-
-    /* it's reasonable for this function to fail, e.g. a pager may
-     * limit the number of pages that it's willing to hand out
-     */
-    void const *(*alloc)(Pager *self, uint32_t *newid);
-    
-    /* these functions can't fail in any meaningful sense
-     * these functions failing is like an assert or a sudden
-     * hardware failure, in other words, not recoverable.
-     */
-    void const *(*use   )(Pager *self, uint32_t pageid);
-    void const *(*access)(Pager *self, void const *page);
-    void       *(*update)(Pager *self, void const *page);
-    void        (*unuse )(Pager *self, void const *page);
-};
-
-/* Find
- *  searches for a match
- *
- *  "key" [ IN ] and "key_size" [ IN ] - describes an
- *   opaque key
- */
-KLIB_EXTERN rc_t CC BTreeFind ( uint32_t root, Pager *pager, Pager_vt const *vt, uint32_t *id,
-    const void *key, size_t key_size );
-
-
-/* Entry
- *  searches for a match or creates a new entry
- *
- *  "was_inserted" [ OUT ] - if true, the returned value was the result of an
- *   insertion and can be guaranteed to be all 0 bits. otherwise, the returned
- *   value will be whatever was there previously.
- *
- *  "key" [ IN ] and "key_size" [ IN ] - describes an
- *   opaque key
- */
-KLIB_EXTERN rc_t CC BTreeEntry ( uint32_t *root, Pager *pager, Pager_vt const *vt, uint32_t *id,
-    bool *was_inserted, const void *key, size_t key_size );
-
-/* ForEach
- *  executes a function on each tree element
- *
- *  "reverse" [ IN ] - if true, iterate in reverse order
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - callback function
- */
-
-KLIB_EXTERN rc_t CC BTreeForEach ( uint32_t root, Pager *pager, Pager_vt const *vt, bool reverse,
-                                 void ( CC * f ) ( const void *key, size_t key_size, uint32_t id, void *data ), void *data );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_klib_btree_ */
diff --git a/interfaces/klib/callconv.h b/interfaces/klib/callconv.h
deleted file mode 100644
index 34eafc6..0000000
--- a/interfaces/klib/callconv.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_callconv_
-#define _h_klib_callconv_
-
-#ifndef _h_kfc_callconv_
-#include <kfc/callconv.h>
-#endif
-
-#endif /*  _h_klib_callconv_ */
diff --git a/interfaces/klib/checksum.h b/interfaces/klib/checksum.h
deleted file mode 100644
index 5c38ee8..0000000
--- a/interfaces/klib/checksum.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_checksum_
-#define _h_klib_checksum_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * CRC32
- */
-
-/* CRC32Init
- *  initializes table
- *  IDEMPOTENT
- */
-KLIB_EXTERN void CC CRC32Init ( void );
-
-/* CRC32
- *  runs checksum on arbitrary data, returning result
- *  initial checksum to be passed in is 0
- *  subsequent checksums should be return from prior invocation
- */
-KLIB_EXTERN uint32_t CC CRC32 ( uint32_t checksum, const void *data, size_t size );
-
-
-/*--------------------------------------------------------------------------
- * MD5
- *  taken from Peter Deutsch's sources due to simplicity
- */
-typedef struct MD5State MD5State;
-struct MD5State
-{
-    uint32_t count [ 2 ];
-    uint32_t abcd [ 4 ];
-    uint8_t buf [ 64 ];
-};
-
-/* Init
- *  initialize the algorithm and state block
- */
-KLIB_EXTERN void CC MD5StateInit ( MD5State *md5 );
-
-/* Append
- *  run MD5 on data block
- *  accumulate results into "md5"
- *  processes data in chunks
- */
-KLIB_EXTERN void CC MD5StateAppend ( MD5State *md5, const void *data, size_t size );
-
-/* Finish
- *  processes any remaining data in "md5"
- *  returns 16 bytes of digest
- */
-KLIB_EXTERN void CC MD5StateFinish ( MD5State *md5, uint8_t digest [ 16 ] );
-
-
-/*--------------------------------------------------------------------------
- * SHA
- */
-typedef struct SHA32bitState SHA1State, SHA256State;
-struct SHA32bitState
-{
-    uint64_t len;
-    uint32_t H [ 8 ];
-    uint32_t cur;
-    uint8_t  W [ 64 ];
-};
-
-typedef struct SHA64bitState SHA384State, SHA512State;
-struct SHA64bitState
-{
-    uint64_t len;
-    uint64_t H [ 8 ];
-    unsigned long cur;
-    uint8_t W [ 128 ];
-};
-
-
-/* Init
- *  initialize the algorithm and state block
- */
-KLIB_EXTERN void CC SHA1StateInit ( SHA1State *state );
-KLIB_EXTERN void CC SHA256StateInit ( SHA256State *state );
-KLIB_EXTERN void CC SHA384StateInit ( SHA384State *state );
-KLIB_EXTERN void CC SHA512StateInit ( SHA512State *state );
-
-
-/* Append
- *  run SHA-x on data block
- *  accumulate results into "state"
- *  processes data in chunks
- */
-KLIB_EXTERN void CC SHA1StateAppend ( SHA1State *state, const void *data, size_t size );
-KLIB_EXTERN void CC SHA256StateAppend ( SHA256State *state, const void *data, size_t size );
-KLIB_EXTERN void CC SHA384StateAppend ( SHA384State *state, const void *data, size_t size );
-KLIB_EXTERN void CC SHA512StateAppend ( SHA512State *state, const void *data, size_t size );
-
-
-/* Finish
- *  processes any remaining data in "state"
- *  returns N bytes of digest
- *  N = 20 for SHA-1
- *  N = 32 for SHA-256
- *  N = 48 for SHA-384
- *  N = 64 for SHA-512
- */
-KLIB_EXTERN void CC SHA1StateFinish ( SHA1State *state, uint8_t digest [ 20 ] );
-KLIB_EXTERN void CC SHA256StateFinish ( SHA256State *state, uint8_t digest [ 32 ] );
-KLIB_EXTERN void CC SHA384StateFinish ( SHA384State *state, uint8_t digest [ 48 ] );
-KLIB_EXTERN void CC SHA512StateFinish ( SHA512State *state, uint8_t digest [ 64 ] );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_checksum_ */
diff --git a/interfaces/klib/container.h b/interfaces/klib/container.h
deleted file mode 100644
index 5008705..0000000
--- a/interfaces/klib/container.h
+++ /dev/null
@@ -1,455 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_container_
-#define _h_klib_container_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * SLNode
- *  singly linked node
- */
-typedef struct SLNode SLNode;
-struct SLNode
-{
-    SLNode *next;
-};
-
-/* SLNodeNext
- *  returns next node
- */
-#define SLNodeNext( n ) \
-    ( n ) -> next
-
-#if 0
-/* SLNodeFindNext
- *  find next element satisfying criteria
- */
-KLIB_EXTERN SLNode* CC SLNodeFindNext ( const SLNode *n, bool ( CC * f ) ( const SLNode *n ) );
-#endif
-
-
-/*--------------------------------------------------------------------------
- * SLList
- *  singly linked list
- */
-typedef struct SLList SLList;
-struct SLList
-{
-    SLNode *head;
-    SLNode *tail;
-};
-
-
-/* SLListInit
- *  initialize a singly linked list
- */
-#define SLListInit( sl ) \
-    ( void ) ( ( sl ) -> head = ( sl ) -> tail = NULL )
-
-/* SLListHead
- *  returns list head
- */
-#define SLListHead( sl ) \
-    ( sl ) -> head
-
-/* SLListTail
- *  returns list tail
- */
-#define SLListTail( sl ) \
-    ( sl ) -> tail
-
-/* SLListPushHead
- *  push a single node onto head of list
- */
-#define SLListPushHead( sl, n ) \
-    ( void ) ( ( ( sl ) -> tail == NULL ? \
-        ( void ) ( ( sl ) -> tail = ( n ) ) : ( void ) 0 ), \
-        ( n ) -> next = ( sl ) -> head, ( sl ) -> head = ( n ) )
-
-/* SLListPushTail
- *  push a single node onto tail of list
- */
-KLIB_EXTERN void CC SLListPushTail ( SLList *sl, SLNode *n );
-
-/* SLListPopHead
- *  pop a single node from head of list
- */
-KLIB_EXTERN SLNode* CC SLListPopHead ( SLList *sl );
-
-/* SLListPopTail
- *  pop a single node from tail of list
- */
-KLIB_EXTERN SLNode* CC SLListPopTail ( SLList *sl );
-
-/* SLListUnlink
- *  removes a designated node from list
- */
-KLIB_EXTERN void CC SLListUnlink ( SLList *sl, SLNode *n );
-
-/* SLListForEach
- *  executes a function on each list element
- */
-KLIB_EXTERN void CC SLListForEach ( const SLList *sl,
-    void ( CC * f ) ( SLNode *n, void *data ), void *data );
-
-/* SLListDoUntil
- *  executes a function on each element
- *  until the function returns true
- */
-KLIB_EXTERN bool CC SLListDoUntil ( const SLList *sl,
-    bool ( CC * f ) ( SLNode *n, void *data ), void *data );
-
-/* SLListFindFirst
- *  find first element satisfying criteria
- */
-KLIB_EXTERN SLNode* CC SLListFindFirst ( const SLList *sl, bool ( CC * f ) ( const SLNode *n ) );
-
-/* SLListWhack
- *  pops elements from list and
- *  executes a user provided destructor
- */
-KLIB_EXTERN void CC SLListWhack ( SLList *sl, void ( CC * whack ) ( SLNode *n, void *data ), void *data );
-
-
-/*--------------------------------------------------------------------------
- * DLNode
- *  doubly linked node
- */
-typedef struct DLNode DLNode;
-struct DLNode
-{
-    DLNode *next;
-    DLNode *prev;
-};
-
-/* DLNodeNext
- *  returns next node
- */
-#define DLNodeNext( n ) \
-    ( n ) -> next
-
-/* DLNodePrev
- *  returns prev node
- */
-#define DLNodePrev( n ) \
-    ( n ) -> prev
-
-#if 0
-/* DLNodeFindNext
- *  find next element satisfying criteria
- */
-KLIB_EXTERN DLNode* CC DLNodeFindNext ( const DLNode *n, bool ( CC * f ) ( const DLNode *n ) );
-
-/* DLNodeFindPrev
- *  find previous element satisfying criteria
- */
-KLIB_EXTERN DLNode* CC DLNodeFindPrev ( const DLNode *n, bool ( CC * f ) ( const DLNode *n ) );
-#endif
-
-/*--------------------------------------------------------------------------
- * DLList
- *  doubly linked list
- */
-typedef struct DLList DLList;
-struct DLList
-{
-    DLNode *head;
-    DLNode *tail;
-};
-
-/* DLListInit
- *  initialize a doubly linked list
- */
-#define DLListInit( dl ) \
-    ( void ) ( ( dl ) -> head = ( dl ) -> tail = NULL )
-
-/* DLListHead
- *  returns list head
- */
-#define DLListHead( dl ) \
-    ( dl ) -> head
-
-/* DLListTail
- *  returns list tail
- */
-#define DLListTail( dl ) \
-    ( dl ) -> tail
-
-/* DLListPushHead
- *  push a single node onto the head of list
- */
-KLIB_EXTERN void CC DLListPushHead ( DLList *dl, DLNode *n );
-
-/* DLListPushTail
- *  push a single node onto the tail of list
- */
-KLIB_EXTERN void CC DLListPushTail ( DLList *dl, DLNode *n );
-
-/* DLListPopHead
- *  pop a single node from head of list
- */
-KLIB_EXTERN DLNode* CC DLListPopHead ( DLList *dl );
-
-/* DLListPopTail
- *  pop a single node from tail of list
- */
-KLIB_EXTERN DLNode* CC DLListPopTail ( DLList *dl );
-
-/* DLListPrependList
- *  pushes list contents onto the head of target
- */
-KLIB_EXTERN void CC DLListPrependList ( DLList *dl, DLList *l );
-
-/* DLListAppendList
- *  pushes list contents onto the tail of target
- */
-KLIB_EXTERN void CC DLListAppendList ( DLList *dl, DLList *l );
-
-/* DLListInsertNodeBefore
- *  inserts node "n" before "which" within list
- */
-KLIB_EXTERN void CC DLListInsertNodeBefore ( DLList *dl, DLNode *which, DLNode *n );
-
-/* DLListInsertNodeAfter
- *  inserts node "n" after "which" within list
- */
-KLIB_EXTERN void CC DLListInsertNodeAfter ( DLList *dl, DLNode *which, DLNode *n );
-
-/* DLListInsertListBefore
- *  inserts list "l" before "which" within list "dl"
- */
-KLIB_EXTERN void CC DLListInsertListBefore ( DLList *dl, DLNode *which, DLList *l );
-
-/* DLListInsertListAfter
- *  inserts list "l" after "which" within list "dl"
- */
-KLIB_EXTERN void CC DLListInsertListAfter ( DLList *dl, DLNode *which, DLList *l );
-
-/* DLListUnlink
- *  removes a designated node from list
- */
-KLIB_EXTERN void CC DLListUnlink ( DLList *dl, DLNode *n );
-
-/* DLListForEach
- *  executes a function on each list element
- */
-KLIB_EXTERN void CC DLListForEach ( const DLList *dl, bool reverse,
-    void ( CC * f ) ( DLNode *n, void *data ), void *data );
-
-/* DLListDoUntil
- *  executes a function on each element
- *  until the function returns true
- */
-KLIB_EXTERN bool CC DLListDoUntil ( const DLList *dl, bool reverse,
-    bool ( CC * f ) ( DLNode *n, void *data ), void *data );
-
-/* DLListFindFirst
- *  find first element satisfying criteria
- */
-KLIB_EXTERN DLNode* CC DLListFindFirst ( const DLList *dl, bool ( CC * f ) ( const DLNode *n ) );
-
-/* DLListFindLast
- *  find last element satisfying criteria
- */
-KLIB_EXTERN DLNode* CC DLListFindLast ( const DLList *dl, bool ( CC * f ) ( const DLNode *n ) );
-
-/* DLListWhack
- *  pops elements from list and
- *  executes a user provided destructor
- */
-KLIB_EXTERN void CC DLListWhack ( DLList *dl, void ( CC * whack ) ( DLNode *n, void *data ), void *data );
-
-
-/*--------------------------------------------------------------------------
- * BSTNode
- *  binary search tree node
- */
-typedef struct BSTNode BSTNode;
-struct BSTNode
-{
-    BSTNode *par;
-    BSTNode *child [ 2 ];
-};
-
-/* BSTNodeNext
- *  returns next node
- */
-KLIB_EXTERN BSTNode* CC BSTNodeNext ( const BSTNode *n );
-
-/* BSTNodePrev
- *  returns prev node
- */
-KLIB_EXTERN BSTNode* CC BSTNodePrev ( const BSTNode *n );
-
-/* BSTNodeParent
- *  returns a parent node if there, NULL otherwise
- */
-KLIB_EXTERN BSTNode* CC BSTNodeParent ( const BSTNode *n );
-
-/* BSTNodeFindNext
- *  find next element satisfying criteria
- */
-KLIB_EXTERN BSTNode* CC BSTNodeFindNext ( const BSTNode *n, bool ( CC * f ) ( const BSTNode *n ) );
-
-/* BSTNodeFindPrev
- *  find previous element satisfying criteria
- */
-KLIB_EXTERN BSTNode* CC BSTNodeFindPrev ( const BSTNode *n, bool ( CC * f ) ( const BSTNode *n ) );
-
-
-/*--------------------------------------------------------------------------
- * BSTree
- *  binary search tree
- */
-typedef struct BSTree BSTree;
-struct BSTree
-{
-    BSTNode *root;
-};
-
-/* BSTreeInit
- *  initialize tree
- */
-#define BSTreeInit( bt ) \
-    ( void ) ( ( bt ) -> root = NULL )
-
-/* BSTreeDepth
- *  returns number of layers in tree
- *
- *  if "exact" is true, then the maximum
- *  depth is returned. otherwise, the depth of
- *  an arbitrary leaf node is returned
- */
-KLIB_EXTERN uint32_t CC BSTreeDepth ( const BSTree *bt, bool exact );
-
-/* BSTreeFirst
- *  returns first node
- */
-KLIB_EXTERN BSTNode* CC BSTreeFirst ( const BSTree *bt );
-
-/* BSTreeLast
- *  returns last node
- */
-KLIB_EXTERN BSTNode* CC BSTreeLast ( const BSTree *bt );
-
-/* BSTreeFind
- *  find an object within tree
- *  "cmp" function returns equivalent of "item" - "n"
- */
-KLIB_EXTERN BSTNode* CC BSTreeFind ( const BSTree *bt, const void *item,
-    int64_t ( CC * cmp ) ( const void *item, const BSTNode *n ) );
-
-/* BSTreeInsert
- *  insert an object within tree, even if duplicate
- *  "sort" function returns equivalent of "item" - "n"
- *
- *  the treatment of order for items reported as identical
- *  i.e. sort function returns zero when they are compared,
- *  is undefined.
- *
- *  the current implementation treats '<=' as '<' such
- *  that all inserts are converted to a '<' or '>' comparison,
- *  but this should not be relied upon.
- *
- *  returns 0 if insert succeeded or an OS error code otherwise.
- */
-KLIB_EXTERN rc_t CC BSTreeInsert ( BSTree *bt, BSTNode *item,
-    int64_t ( CC * sort ) ( const BSTNode *item, const BSTNode *n ) );
-
-/* BSTreeInsertUnique
- *  insert an object within tree, but only if unique.
- *  "sort" function returns equivalent of "item" - "n"
- *
- *  returns 0 if insertion succeeded. or an OS error code otherwise.
- *  if error code is EEXIST, the existing object is returned in "exist".
- */
-KLIB_EXTERN rc_t CC BSTreeInsertUnique ( BSTree *bt, BSTNode *item, BSTNode **exist,
-    int64_t ( CC * sort ) ( const BSTNode *item, const BSTNode *n ) );
-
-/* BSTreeResort
- *  an optimized removal and re-insertion of
- *  all contained elements using another function
- *
- *  the treatment of order for items reported as identical
- *  i.e. sort function returns zero when they are compared,
- *  is undefined.
- *
- *  the current implementation treats '<=' as '<' such
- *  that all inserts are converted to a '<' or '>' comparison,
- *  but this should not be relied upon.
- */
-KLIB_EXTERN void CC BSTreeResort ( BSTree *bt,
-    int64_t ( CC * resort ) ( const BSTNode *item, const BSTNode *n ) );
-
-/* BSTreeUnlink
- *  removes a node from tree
- *
- *  returns true if node was removed from tree
- *  false if it could not be removed, e.g. was not in tree
- */
-KLIB_EXTERN bool CC BSTreeUnlink ( BSTree *bt, BSTNode *n );
-
-/* BSTreeForEach
- *  executes a function on each tree element
- */
-KLIB_EXTERN void CC BSTreeForEach ( const BSTree *bt, bool reverse,
-    void ( CC * f ) ( BSTNode *n, void *data ), void *data );
-
-/* BSTreeDoUntil
- *  executes a function on each element
- *  until the function returns true
- *
- *  return values:
- *    false unless the function returns true
- */
-KLIB_EXTERN bool CC BSTreeDoUntil ( const BSTree *bt, bool reverse,
-    bool ( CC * f ) ( BSTNode *n, void *data ), void *data );
-
-/* BSTreeWhack
- *  removes nodes from tree and
- *  executes a user provided destructor
- */
-KLIB_EXTERN void CC BSTreeWhack ( BSTree *bt, void ( CC * whack ) ( BSTNode *n, void *data ), void *data );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_container_ */
diff --git a/interfaces/klib/data-buffer.h b/interfaces/klib/data-buffer.h
deleted file mode 100644
index dbb0bca..0000000
--- a/interfaces/klib/data-buffer.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_klib_data_buffer
-#define _h_klib_data_buffer
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KDataBuffer
- *  simple, open structure to reference an opaque data buffer
- *
- *  "base" - pointer to first byte of buffer
- *
- *  "elem_bits" - size of buffer element datatype in bits
- *
- *  "elem_count" - size of buffer in elements
- *
- *  "bit_offset" [ DEFAULT ZERO ] - offset from "base"
- *  to first bit of buffer, always 0 when "elem_bits" % 8 == 0
- *  bits are left-packed, i.e.:
- *
- *    bit_offset | starting bit
- *   ============+=============
- *            0  |  7
- *            1  |  6
- *            2  |  5
- *              ...
- *            6  |  1
- *            7  |  0
- */
-typedef struct KDataBuffer KDataBuffer;
-struct KDataBuffer
-{
-    const void *ignore;
-    void *base;
-    uint64_t elem_bits;
-    uint64_t elem_count;
-    uint8_t bit_offset;
-};
-
-
-/* Bits
- *  return buffer size in bits
- */
-#define KDataBufferBits( self ) \
-    ((((bitsz_t)((const KDataBuffer *)(self))->elem_bits) * ((const KDataBuffer *)(self))->elem_count))
-
-/* Bytes
- *  returns buffer size in bytes
- */
-#define KDataBufferBytes( self ) \
-   ((size_t)((KDataBufferBits(self) + 7) >> 3))
-
-
-/* Make
- *  create a new empty buffer
- *
- *  "buffer" [ OUT ] - pointer to structure to initialize
- *
- *  "elem_bits" [ IN ] - the number of bits in each element
- *
- *  "elem_capacity" [ IN ] - the minimum number of elements to be allocated
- */
-KLIB_EXTERN rc_t CC KDataBufferMake ( KDataBuffer *buffer,
-    uint64_t elem_bits, uint64_t elem_capacity );
-
-
-/* MakeBytes
- * MakeBits
- *  create a new empty buffer with default element size
- */
-#define KDataBufferMakeBytes( buffer, bytes ) \
-    KDataBufferMake ( buffer, 8, bytes )
-#define KDataBufferMakeBits( buffer, bits ) \
-    KDataBufferMake ( buffer, 1, bits )
-
-/* Sub
- *  create a sub-range reference to an existing buffer
- *
- *  "sub" [ OUT ] - pointer to subrange structure
- *
- *  "start" [ IN ] - element offset of subrange from start of "self".
- *  if given start >= self->elem_count, the resultant subrange
- *  will have an element count of 0.
- *
- *  "count" [ IN, DEFAULT UINT64_MAX ] - number of elements of subrange.
- *  when given count exceeds buffer size, the actual count is calculated to be
- *  all remaining count in "self" from "start". otherwise, the
- *  requested count will be limited to the actual count available
- *  in "self".
- */
-KLIB_EXTERN rc_t CC KDataBufferSub ( const KDataBuffer *self,
-    KDataBuffer *sub, uint64_t start, uint64_t count );
-
-
-/* MakeWritable
- *  make a writable copy of the buffer, copying contents if needed.
- *
- *  "writable" [ OUT ] - pointer to the structure to initialize
- *
- * The usage pattern is:
- *   KDataBuffer buffer;
- * ...
- * initialize buffer
- * do stuff which might make it shared
- *   (like pass it to a function that might retain it)
- * ...
- *   KDataBuffer writable;
- *   rc_t rc = KDataBufferMakeWritable(&buffer, &writable);
- *
- *   if (rc == 0) {
- *       / * until you whack the old one KDataBufferWritable(&writable) might be false! * /
- *       KDataBufferWhack(&buffer);
- *       buffer = writable;
- * ...
- * do whatever you want with buffer because it is now writable (not shared)
- * ...
- *   }
- *   KDataBufferWhack(&buffer);
- */
-KLIB_EXTERN rc_t CC KDataBufferMakeWritable ( const KDataBuffer *self, KDataBuffer *writable );
-
-
-/* Whack
- *  release memory associated with a buffer.
- */
-KLIB_EXTERN rc_t CC KDataBufferWhack ( KDataBuffer *self );
-
-
-/* Resize
- *  make a buffer bigger or smaller.
- *  can fail if not enough memory.
- *  can fail if not writable.
- *
- *  "new_count" [ IN ] - new number of elements
- */
-KLIB_EXTERN rc_t CC KDataBufferResize ( KDataBuffer *self, uint64_t new_count );
-
-
-/* Cast
- *  create a new data-buffer with a different element size
- *  won't increase the total number of bits
- *
- *  "cast" [ OUT ] - newly typed buffer
- *
- *  "new_elem_bits" [ IN ] - new element size in bits
- *
- *  "can_shrink" [ IN ] - when true allow
- *  KDataBufferBits ( cast ) < KDataBufferBits ( self )
- */
-KLIB_EXTERN rc_t CC KDataBufferCast ( const KDataBuffer *self,
-    KDataBuffer *cast, uint64_t new_elem_bits, bool can_shrink );
-
-
-/* Writable
- *  returns true if buffer is valid and writable
- */
-KLIB_EXTERN bool CC KDataBufferWritable ( const KDataBuffer *self );
-
-
-/* CheckIntegrity
- *  performs some level of integrity checking on buffer structure
- */
-KLIB_EXTERN rc_t CC KDataBufferCheckIntegrity ( const KDataBuffer *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_data_buffer_ */
diff --git a/interfaces/klib/debug.h b/interfaces/klib/debug.h
deleted file mode 100644
index 360b32e..0000000
--- a/interfaces/klib/debug.h
+++ /dev/null
@@ -1,549 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-#ifndef _h_klib_debug_
-#define _h_klib_debug_
-
-#if _DEBUGGING
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_klib_status_
-#include <klib/status.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* ----------
- * KDbgModule and KDbgCondition
- *
- * KDbg messages are filtered by a pair of values: a module and a condition.
- *
- * A KDbgFlag is a single bit representing an enumerated condition ID
- *
- * In this context the module is merely a set and not specifically tied to any
- * other use of the term module.
- */
-
-
-
-/*
- * To add a new module, just add it to the list in MODULE_NAMES but as a 
- * parameter to the macro "_module"
- *
- * Then add the conditions for that module.  There must be at least one.
- * Put them in the macro "_condition"
- *
- * NOTE:
- * There must be at least one condition for a module.
- *
- * NOTE:
- * Do not seperate the items in eith MODULES or xxx_CONDITIONS by anything 
- * other than white space.
- *
- * NOTE:
- * The exact text must used in the _module(MOD) and the MOD_CONDITIONS()
- * so if you want all lower, all upper ot mixed case it must be the same.
- * this exact case will apply to the command line argument as well.
- *
- * NOTE:
- * The MOD and CONDITIONS must be legal C Identifiers. The exception is a
- * condition may start with a numeric or even be all numeric.  Punctuation other
- * than '_' is not allowed.
- *
- * NOTE:
- * No not use condition "ANY" or "NONE" as they are special flag names.
- *
- * The rest of the file will take care of adding the new strings, enumerations
- * and structures for the new modules and/or new conditions.
- *
- * The expected command line will be "-D mod" to add "any" for the module or
- * "-D mod-cond" to add only that condition with in the module.
- * "-D" and "--debug" are expected to be equivalent"
- *
- * The expected usage in a C source file is to use the flag value.
- * For an added module (MMM) and condition (CCC) the symbols used would be
- * "dbg_MMM" and "dbg_MMM_CCC" that will get an index
- * to a flag value and the flag to test for a condition.
- *
- * Any number of individual "-D conditions" are accepted.
- */
-
-#define MODULE_NAMES() \
-    _module(AES)    _module(ALIGN)   _module(APP)  _module(ARGS) \
-    _module(BLAST)  _module(KDB) \
-    _module(KFG)    _module(KFS)     _module(KNS)  _module(KRYPTO) \
-    _module(LEGREF) _module(LOADLIB) \
-    _module(REF)    _module(SEARCH)  _module(SRA) \
-    _module(VDB)    _module(VFS)     _module(XARC) _module(XML)  \
-    
-
-#define APP_CONDITIONS() \
-    _condition(APP,0)  _condition(APP,1)  _condition(APP,2)  _condition(APP,3)  \
-    _condition(APP,4)  _condition(APP,5)  _condition(APP,6)  _condition(APP,7)  \
-    _condition(APP,8)  _condition(APP,9)  _condition(APP,10) _condition(APP,11) \
-    _condition(APP,12) _condition(APP,13) _condition(APP,14) _condition(APP,15) \
-    _condition(APP,16) _condition(APP,17) _condition(APP,18) _condition(APP,19) \
-    _condition(APP,20) _condition(APP,21) _condition(APP,22) _condition(APP,23) \
-    _condition(APP,24) _condition(APP,25) _condition(APP,26) _condition(APP,27) \
-    _condition(APP,28) _condition(APP,29) _condition(APP,30) _condition(APP,31) \
-    _condition(APP,32) _condition(APP,33) _condition(APP,34) _condition(APP,35) \
-    _condition(APP,36) _condition(APP,37) _condition(APP,38) _condition(APP,39) \
-    _condition(APP,40) _condition(APP,41) _condition(APP,42) _condition(APP,43) \
-    _condition(APP,44) _condition(APP,45) _condition(APP,46) _condition(APP,47) \
-    _condition(APP,48) _condition(APP,49) _condition(APP,50) _condition(APP,51) \
-    _condition(APP,52) _condition(APP,53) _condition(APP,54) _condition(APP,55) \
-    _condition(APP,56) _condition(APP,57) _condition(APP,58) _condition(APP,59) \
-    _condition(APP,60) _condition(APP,61) _condition(APP,62) _condition(APP,63) 
-
-#define BLAST_CONDITIONS() \
-    _condition(BLAST,BLAST)
-
-#define KDB_CONDITIONS() \
-    _condition(KDB,KDB) _condition(KDB,POS)
-
-/* place holder should be replaced by the first object that gets the debug stuff tested for krefcount_t */
-#define REF_CONDITIONS() \
-    _condition(REF,PLACEHOLDER)
-
-#define LEGREF_CONDITIONS() \
-    _condition(LEGREF,MD5) _condition(LEGREF,CRC)
-
-#define KFS_CONDITIONS() \
-    _condition(KFS,MD5)      _condition(KFS,DLL) _condition(KFS,KFFENTRY) _condition(KFS,KFF)  \
-    _condition(KFS,ARCENTRY) _condition(KFS,ARC) _condition(KFS,TOCENTRY) _condition(KFS,TOC)  \
-    _condition(KFS,TARENTRY) _condition(KFS,TAR) _condition(KFS,SRASORT)  _condition(KFS,GZIP) \
-    _condition(KFS,DIR)  _condition(KFS,COUNTER) _condition(KFS,BZIP)     _condition(KFS,SYS) \
-    _condition(KFS,POS)  _condition(KFS,PAGE)
-
-#define KNS_CONDITIONS() \
-    _condition(KNS,ERR) _condition(KNS,HTTP) _condition(KNS,MGR) _condition(KNS,SOCKET)
-
-#define VFS_CONDITIONS() \
-    _condition(VFS,MGR)     _condition(VFS,PATH)
-
-#define XML_CONDITIONS() \
-    _condition(XML,XML)
-
-#define VDB_CONDITIONS() \
-    _condition(VDB,RESOLVE) \
-    _condition(VDB,COMPARE) \
-    _condition(VDB,FUNCTION) \
-    _condition(VDB,VDB) \
-    _condition(VDB,PARSE) \
-    _condition(VDB,MTCURSOR)
-
-#define SRA_CONDITIONS() \
-    _condition(SRA,INFO) _condition(SRA,SORT) _condition(SRA,SUB) 
-
-#define XARC_CONDITIONS() \
-    _condition(XARC,ENTRY) \
-    _condition(XARC,ARC)
-
-#define ALIGN_CONDITIONS() \
-    _condition(ALIGN,WRITER) _condition(ALIGN,COMPRESS) _condition(ALIGN,COVERAGE) \
-    _condition(ALIGN,BAM) _condition(ALIGN,BGZF) _condition(ALIGN,CFG)
-
-#define KFG_CONDITIONS() \
-    _condition(KFG,LOAD) _condition(KFG,NODE)
-
-#define KRYPTO_CONDITIONS() \
-    _condition(KRYPTO,STS) \
-    _condition(KRYPTO,CFG) \
-    _condition(KRYPTO,ENCRYPT) \
-    _condition(KRYPTO,DECRYPT)
-
-#define AES_CONDITIONS() \
-    _condition(AES,KEYEXP) _condition(AES,CIPHER) \
-    _condition(AES,INVKEYEXP) _condition(AES,INVCIPHER) \
-    _condition(AES,OBJECT)
-
-#define SEARCH_CONDITIONS() \
-    _condition(SEARCH,MYERS)
-
-#define LOADLIB_CONDITIONS() \
-    _condition(LOADLIB,PBAR) _condition(LOADLIB,FILE) _condition(LOADLIB,XLOG)
-
-#define ARGS_CONDITIONS() \
-    _condition(ARGS,WRITER)
-
-/*
- * Nothing below here needs to be changed when just adding new modules
- * and/or conditions
- */
-
-/* macros to do preprocessor token pasting and stringification */
-#define DBG_PASTE_2(a,b)        a##b
-#define DBG_PASTE_3(a,b,c)      a##b##c
-#define DBG_PASTE_4(a,b,c,d)    a##b##c##d
-#define DBG_PASTE_5(a,b,c,d,e)  a##b##c##d##e
-#define DBG_STRING(a)           #a
-
-/*
- * Build the module enumerations/flags.
- */
-#define _module(mod)   DBG_PASTE_2(DBG_,mod),
-
-typedef int32_t KDbgMod;
-enum
-{
-    DBG_MOD_NOT_FOUND = -1,
-    MODULE_NAMES()
-    DBG_MOD_COUNT
-};
-
-#undef _module
-
-
-/* 
- * the dbg_id and dbg_flag types are for ease of generically
- * typing flags with more specific types defined below.  These are more fully
- * filled out to help debuggers more than any real need for the code to work
- *
- * We'll just assume a limit of 32 bits for an enumeration.
- */
-
-/* dbg_id is approprite as a array index */
-    typedef uint32_t KDbgCond;
-enum
-{
-    DBG_COND_MIN = 0,
-    DBG_COND_0 = DBG_COND_MIN,      DBG_COND_1,     DBG_COND_2,
-    DBG_COND_3,     DBG_COND_4,     DBG_COND_5,     DBG_COND_6,
-    DBG_COND_7,     DBG_COND_8,     DBG_COND_9,     DBG_COND_10,
-    DBG_COND_11,    DBG_COND_12,    DBG_COND_13,    DBG_COND_14,
-    DBG_COND_15,    DBG_COND_16,    DBG_COND_17,    DBG_COND_18,
-    DBG_COND_19,    DBG_COND_20,    DBG_COND_21,    DBG_COND_22,
-    DBG_COND_23,    DBG_COND_24,    DBG_COND_25,    DBG_COND_26,
-    DBG_COND_27,    DBG_COND_28,    DBG_COND_29,    DBG_COND_30,
-    DBG_COND_31,    DBG_COND_32,    DBG_COND_33,    DBG_COND_34,
-    DBG_COND_35,    DBG_COND_36,    DBG_COND_37,    DBG_COND_38,
-    DBG_COND_39,    DBG_COND_40,    DBG_COND_41,    DBG_COND_42,
-    DBG_COND_43,    DBG_COND_44,    DBG_COND_45,    DBG_COND_46,
-    DBG_COND_47,    DBG_COND_48,    DBG_COND_49,    DBG_COND_50,
-    DBG_COND_51,    DBG_COND_52,    DBG_COND_53,    DBG_COND_54,
-    DBG_COND_55,    DBG_COND_56,    DBG_COND_57,    DBG_COND_58,
-    DBG_COND_59,    DBG_COND_60,    DBG_COND_61,    DBG_COND_62,
-    DBG_COND_63,    DBG_COND_MAX = DBG_COND_63
-};
-
-typedef uint64_t KDbgFlag;
-typedef uint64_t KDbgMask;
-
-
-/* to make a KDbgFlag out of a KDbgCond, shift 1 one by the condition id */
-/* to make as mask out of flags just OR them together */
-
-KLIB_EXTERN KDbgFlag CC KDbgCondToFlag ( KDbgCond cond );
-
-#if LOG_INLINING
-#define DBG_FLAG(debug_cond) (((KDbgFlag)1)<<debug_cond)
-#else
-#define DBG_FLAG(debug_cond) KDbgCondToFlag(debug_cond)
-#endif
-
-
-/* dbg_flag is a type that can be used to and against the enabled fkags/masks */
-typedef uint64_t dbg_flag;
-
-#define DBG_FLAG_NONE 0
-#define DBG_FLAG_0  (((dbg_flag)1)<<DBG_COND_0)
-#define DBG_FLAG_1  (((dbg_flag)1)<<DBG_COND_1)
-#define DBG_FLAG_2  (((dbg_flag)1)<<DBG_COND_2)
-#define DBG_FLAG_3  (((dbg_flag)1)<<DBG_COND_3)
-#define DBG_FLAG_4  (((dbg_flag)1)<<DBG_COND_4)
-#define DBG_FLAG_5  (((dbg_flag)1)<<DBG_COND_5)
-#define DBG_FLAG_6  (((dbg_flag)1)<<DBG_COND_6)
-#define DBG_FLAG_7  (((dbg_flag)1)<<DBG_COND_7)
-#define DBG_FLAG_8  (((dbg_flag)1)<<DBG_COND_8)
-#define DBG_FLAG_9  (((dbg_flag)1)<<DBG_COND_9)
-#define DBG_FLAG_10 (((dbg_flag)1)<<DBG_COND_10)
-#define DBG_FLAG_11 (((dbg_flag)1)<<DBG_COND_11)
-#define DBG_FLAG_12 (((dbg_flag)1)<<DBG_COND_12)
-#define DBG_FLAG_13 (((dbg_flag)1)<<DBG_COND_13)
-#define DBG_FLAG_14 (((dbg_flag)1)<<DBG_COND_14)
-#define DBG_FLAG_15 (((dbg_flag)1)<<DBG_COND_15)
-#define DBG_FLAG_16 (((dbg_flag)1)<<DBG_COND_16)
-#define DBG_FLAG_17 (((dbg_flag)1)<<DBG_COND_17)
-#define DBG_FLAG_18 (((dbg_flag)1)<<DBG_COND_18)
-#define DBG_FLAG_19 (((dbg_flag)1)<<DBG_COND_19)
-#define DBG_FLAG_20 (((dbg_flag)1)<<DBG_COND_20)
-#define DBG_FLAG_21 (((dbg_flag)1)<<DBG_COND_21)
-#define DBG_FLAG_22 (((dbg_flag)1)<<DBG_COND_22)
-#define DBG_FLAG_23 (((dbg_flag)1)<<DBG_COND_23)
-#define DBG_FLAG_24 (((dbg_flag)1)<<DBG_COND_24)
-#define DBG_FLAG_25 (((dbg_flag)1)<<DBG_COND_25)
-#define DBG_FLAG_26 (((dbg_flag)1)<<DBG_COND_26)
-#define DBG_FLAG_27 (((dbg_flag)1)<<DBG_COND_27)
-#define DBG_FLAG_28 (((dbg_flag)1)<<DBG_COND_28)
-#define DBG_FLAG_29 (((dbg_flag)1)<<DBG_COND_29)
-#define DBG_FLAG_30 (((dbg_flag)1)<<DBG_COND_30)
-#define DBG_FLAG_31 (((dbg_flag)1)<<DBG_COND_31)
-#define DBG_FLAG_32 (((dbg_flag)1)<<DBG_COND_32)
-#define DBG_FLAG_33 (((dbg_flag)1)<<DBG_COND_33)
-#define DBG_FLAG_34 (((dbg_flag)1)<<DBG_COND_34)
-#define DBG_FLAG_35 (((dbg_flag)1)<<DBG_COND_35)
-#define DBG_FLAG_36 (((dbg_flag)1)<<DBG_COND_36)
-#define DBG_FLAG_37 (((dbg_flag)1)<<DBG_COND_37)
-#define DBG_FLAG_38 (((dbg_flag)1)<<DBG_COND_38)
-#define DBG_FLAG_39 (((dbg_flag)1)<<DBG_COND_39)
-#define DBG_FLAG_40 (((dbg_flag)1)<<DBG_COND_40)
-#define DBG_FLAG_41 (((dbg_flag)1)<<DBG_COND_41)
-#define DBG_FLAG_42 (((dbg_flag)1)<<DBG_COND_42)
-#define DBG_FLAG_43 (((dbg_flag)1)<<DBG_COND_43)
-#define DBG_FLAG_44 (((dbg_flag)1)<<DBG_COND_44)
-#define DBG_FLAG_45 (((dbg_flag)1)<<DBG_COND_45)
-#define DBG_FLAG_46 (((dbg_flag)1)<<DBG_COND_46)
-#define DBG_FLAG_47 (((dbg_flag)1)<<DBG_COND_47)
-#define DBG_FLAG_48 (((dbg_flag)1)<<DBG_COND_48)
-#define DBG_FLAG_49 (((dbg_flag)1)<<DBG_COND_49)
-#define DBG_FLAG_50 (((dbg_flag)1)<<DBG_COND_50)
-#define DBG_FLAG_51 (((dbg_flag)1)<<DBG_COND_51)
-#define DBG_FLAG_52 (((dbg_flag)1)<<DBG_COND_52)
-#define DBG_FLAG_53 (((dbg_flag)1)<<DBG_COND_53)
-#define DBG_FLAG_54 (((dbg_flag)1)<<DBG_COND_54)
-#define DBG_FLAG_55 (((dbg_flag)1)<<DBG_COND_55)
-#define DBG_FLAG_56 (((dbg_flag)1)<<DBG_COND_56)
-#define DBG_FLAG_57 (((dbg_flag)1)<<DBG_COND_57)
-#define DBG_FLAG_58 (((dbg_flag)1)<<DBG_COND_58)
-#define DBG_FLAG_59 (((dbg_flag)1)<<DBG_COND_59)
-#define DBG_FLAG_60 (((dbg_flag)1)<<DBG_COND_60)
-#define DBG_FLAG_61 (((dbg_flag)1)<<DBG_COND_61)
-#define DBG_FLAG_62 (((dbg_flag)1)<<DBG_COND_62)
-#define DBG_FLAG_63 (((dbg_flag)1)<<DBG_COND_63)
-#define DBG_FLAG_ANY (~(dbg_flag)0)
-
-/*
- * Build the list of enums for the various modules.
- * These are descendant types of KDbgCond and KDbgFlag
- *
- * The use of ',' or ';' at the end of macros is precise to suit the use
- * in the initializers and enum definitions.
- *
- * These usually means no ',' or ';' at the end of instantiations.
- */
-#define _module(mod)                            \
-    typedef int32_t DBG_PASTE_2(DBG_COND_,mod); \
-    enum                                        \
-        {                                       \
-        DBG_PASTE_2(mod,_CONDITIONS())          \
-        DBG_PASTE_3(DBG_,mod,_COUNT)            \
-    };
-#define _condition(mod,flag) DBG_PASTE_4(DBG_,mod,_,flag),
-
-MODULE_NAMES()
-
-#undef _condition
-#undef _module
-
-typedef struct dbg_s_flag dbg_s_flag;
-struct dbg_s_flag
-{
-    const char * name;
-    KDbgFlag flag;
-};
-
-typedef struct dbg_s_mod dbg_s_mod;
-struct dbg_s_mod
-{
-    const char *       name;  /* matches item in MODULE_NAMES() */
-    const dbg_s_flag *  conds; /* array of structures for setting flags */
-    KDbgMask           flags; /* which flags are active */
-};
-
-extern dbg_s_mod dbg_flag_mod     [DBG_MOD_COUNT+1];
-
-
-#define _module(mod) \
-    extern KDbgMask DBG_PASTE_3(DBG_,mod,_ANY);
-
-MODULE_NAMES()
-
-#undef _module
-
-
-/*
- * strings will be defined only in the single C file that should
- * define the symbol below before including this file.
- *
- * This could have been done in the C file but was done here to
- * keep the spirit of the work done all in one place.
- */
-
-#ifdef _KLIB_DEBUG_C_
-
-#define _module(mod) \
-    KDbgFlag DBG_PASTE_3(DBG_,mod,_ANY) = ( DBG_PASTE_2(mod,_CONDITIONS()) 0);
-#define _condition(mod,flag) \
-    (((KDbgFlag)1)<<DBG_PASTE_4(DBG_,mod,_,flag)) |
-
-MODULE_NAMES()
-
-#undef _module
-#undef _condition
-
-#define _module(mod)                            \
-    dbg_s_flag DBG_PASTE_2(dbg_s_flag_,mod) [] = \
-    {                                            \
-        DBG_PASTE_2(mod,_CONDITIONS())           \
-        { NULL, DBG_FLAG_NONE }                      \
-    };
-
-#define _condition(mod,flag)                                           \
-    { DBG_STRING(flag), ((KDbgFlag)1)<<DBG_PASTE_4(DBG_,mod,_,flag) },
-
-MODULE_NAMES()
-
-#undef _module
-#undef _condition
-
-#define _module(mod)                           \
-    {                                           \
-        DBG_STRING(mod),                         \
-        DBG_PASTE_2(dbg_s_flag_,mod),        \
-        0                                       \
-    },
-
-dbg_s_mod dbg_flag_mod [] = 
-{
-    MODULE_NAMES()
-    { NULL, NULL }
-};
-#undef _module
-
-#define _module(mod) 
-
-#endif /* if _KLIB_TEST_C_ */
-
-
-/*
- * For module 'mod' turn on or off the specific flags in
- * mask flags
- *
- * bits in mask are effected.
- * return previous 
- */
-KLIB_EXTERN KDbgMask CC KDbgSetModConds ( KDbgMod mod, KDbgMask mask, KDbgMask flags );
-KLIB_EXTERN bool CC KDbgTestModConds ( KDbgMod mod, KDbgMask flags );
-
-
-/*
- * Init()
- * Initialize the debug messages module to a known state
- */
-KLIB_EXTERN rc_t CC KDbgInit (void);
-
-/* 
- * param is coming in as utf-8/ASCII with NUL terminator or we fail
- * we also assume no more than 127 significant characters
- *
- * These strings can be utf-8 or ASCII even if we are using 
- * clib strXXX functions.
- */
-KLIB_EXTERN rc_t CC KDbgSetString (const char * string);
-
-/* KDbgMask KDbgFlagsGet  (KDbgMod mod); */
-/* bool     KDbgTestCond  (KDbgMask mask); */
-
-
-/*
- * Get the KDbgMod associated with a name.
- */
-KLIB_EXTERN rc_t CC KDbgGetModId (KDbgMod * mod, 
-                   const char * mod_name, size_t mod_size);
-
-/*
- * Get the KDbgCond associated with a name.
- */
-KLIB_EXTERN rc_t CC KDbgGetCndFlag (KDbgMod mod, KDbgFlag * flag,
-                      const char * cnd_name, size_t cnd_size);
-
-KLIB_EXTERN KDbgMask CC KDbgGetModFlags ( KDbgMod mod );
-
-KLIB_EXTERN rc_t CC KDbgMsg (const char * fmt, ...);
-
-#define DBGMSG(mod,flags,msg) \
-    (void)(((KDbgWriterGet() != NULL) && (KDbgTestModConds (mod, flags)))  \
-           ? KDbgMsg msg : 0)
-
-/* -----
- * Handlers for application and library writers.
- */
-KLIB_EXTERN KWrtHandler* CC KDbgHandlerGet ( void );
-KLIB_EXTERN KWrtWriter CC KDbgWriterGet ( void );
-KLIB_EXTERN void* CC KDbgWriterDataGet ( void );
-
-/* Handler
- *  sets output handler for standard output
- *
- *  "logger" [ IN ] and "self" [ IN, OPAQUE ] - callback function
- *  to handle log output
- */
-KLIB_EXTERN rc_t CC KDbgHandlerSet ( KWrtWriter writer, void * data );
-
-KLIB_EXTERN rc_t CC KDbgHandlerSetStdOut();
-KLIB_EXTERN rc_t CC KDbgHandlerSetStdErr();
-
-
-KLIB_EXTERN void CC KDbgSetRowId( uint64_t row_id );
-KLIB_EXTERN uint64_t CC KDbgGetRowId( void );
-KLIB_EXTERN void CC KDbgSetColName( const char * col_name );
-KLIB_EXTERN const char * CC KDbgGetColName( void );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#else /* #if _DEBUGGING */
-
-#define DBGMSG(mod,flags,msg) ((void)0)
-
-#define KDbgInit() ((rc_t)0)
-
-#define KDbgHandlerSetStdOut() ((rc_t)0)
-#define KDbgHandlerSetStdErr() ((rc_t)0)
-
-#define KDbgSetString(s) ((rc_t)0)
-
-#define KDbgHandlerSet(a,b) ((rc_t)0)
-
-#define KDbgHandlerGet() ((void*)NULL)
-#define KDbgWriterGet() ((void*)NULL)
-#define KDbgWriterDataGet() ((void*)NULL)
-
-#endif /* #if _DEBUGGING */
-
-#endif /*  _h_klib_debug_ */
diff --git a/interfaces/klib/defs.h b/interfaces/klib/defs.h
deleted file mode 100644
index 51e2aaf..0000000
--- a/interfaces/klib/defs.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_defs_
-#define _h_klib_defs_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * bitsz_t
- *  where size_t always denotes a quantity of bytes,
- *  bitsz_t denotes a quantity of bits.
- */
-typedef uint64_t bitsz_t;
-
-
-/*--------------------------------------------------------------------------
- * fptr_t
- *  "generic" function pointer type
- *  has very little real use other than to calm down compilers
- */
-typedef int ( CC * fptr_t ) ( void );
-
-
-/*--------------------------------------------------------------------------
- * remove_t
- *  usually when message signatures change, the compiler can
- *  and will pick up the changes and trigger an error. sometimes
- *  it will just issue a warning, and other times will not pick
- *  up on the significance of a change.
- *
- *  to ensure that a change of signature gets caught everywhere
- *  by the compiler, we can introduce an extra parameter that
- *  causes us to visit all dependent code.
- */
-typedef struct remove_t remove_t;
-
-
-/*--------------------------------------------------------------------------
- * KTime_t
- *  64 bit time_t
- *  operations are declared in <klib/time.h>
- */
-typedef int64_t KTime_t;
-typedef int64_t KTimeMs_t;
-
-/*--------------------------------------------------------------------------
- * KCreateMode
- *  values are defined in <kfs/defs.h>
- */
-typedef uint32_t KCreateMode;
-
-
-/*--------------------------------------------------------------------------
- * kfs defines
- */
-#ifndef KFILE_VERS
-#define KFILE_VERS 1
-#endif
-
-#ifndef KFile
-#if KFILE_VERS == 1
-#define KFile KFile_v1
-#elif KFILE_VERS == 2
-#define KFile KFile_v2
-#endif
-#endif
-
-#ifndef KDIRECTORY_VERS
-#define KDIRECTORY_VERS 1
-#endif
-
-#ifndef KDirectory
-#if KDIRECTORY_VERS == 1
-#define KDirectory KDirectory_v1
-#elif KDIRECTORY_VERS == 2
-#define KDirectory KDirectory_v2
-#endif
-#endif
-
-
-#if 1
-
-/*--------------------------------------------------------------------------
- * LPFX
- * SHLX
- * MODX
- *  take their input from make
- */
-#ifndef LIBPREFIX
- #define LPFX ""
-#else
- #define LPFXSTR2( str ) # str
- #define LPFXSTR( str ) LPFXSTR2 ( str )
- #define LPFX LPFXSTR ( LIBPREFIX )
-#endif
-#ifndef SHLIBEXT
- #define SHLX ""
-#else
- #define SHLXSTR2( str ) "." # str
- #define SHLXSTR( str ) SHLXSTR2 ( str )
- #define SHLX SHLXSTR ( SHLIBEXT )
-#endif
-#ifndef MODEXT
- #define MODX SHLX
-#else
- #define MODXSTR2( str ) "." # str
- #define MODXSTR( str ) MODXSTR2 ( str )
- #define MODX MODXSTR ( MODIBEXT )
-#endif
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_klib_defs_ */
diff --git a/interfaces/klib/extern.h b/interfaces/klib/extern.h
deleted file mode 100644
index 39aaac5..0000000
--- a/interfaces/klib/extern.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_extern_
-#define _h_klib_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-
-#define KLIB_EXTERN LIB_EXPORT
-#define KLIB_EXTERN_DATA extern LIB_EXPORT
-#define EXPORT_LATCH 1
-
-#else
-
-#define KLIB_EXTERN LIB_IMPORT
-#ifdef __cplusplus
-#define KLIB_EXTERN_DATA extern /* LIB_IMPORT_DATA */
-#else
-#define KLIB_EXTERN_DATA LIB_IMPORT_DATA
-#endif
-
-#endif
-
-#ifndef _h_kfc_extern_
-#include <kfc/extern.h>
-#endif
-
-#endif /* _h_klib_extern_ */
diff --git a/interfaces/klib/impl.h b/interfaces/klib/impl.h
deleted file mode 100644
index 35959ea..0000000
--- a/interfaces/klib/impl.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_impl_
-#define _h_klib_impl_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_namelist_
-#include <klib/namelist.h>
-#endif
-
-#ifndef _h_atomic_
-#include <atomic.h>
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-typedef union KNamelist_vt KNamelist_vt;
-
-
-/*--------------------------------------------------------------------------
- * KNamelist
- *  a virtual directory listing
- */
-struct KNamelist
-{
-    const KNamelist_vt *vt;
-    atomic_t refcount;
-};
-
-#ifndef KNAMELIST_IMPL
-#define KNAMELIST_IMPL KNamelist
-#endif
-
-typedef struct KNamelist_vt_v1 KNamelist_vt_v1;
-struct KNamelist_vt_v1
-{
-    /* version == 1.x */
-    uint32_t maj;
-    uint32_t min;
-
-    /* start minor version == 0 */
-    rc_t ( CC * destroy ) ( KNAMELIST_IMPL *self );
-    rc_t ( CC * count ) ( const KNAMELIST_IMPL *self, uint32_t *count );
-    rc_t ( CC * get ) ( const KNAMELIST_IMPL *self, uint32_t idx, const char **name );
-    /* end minor version == 0 */
-};
-
-union KNamelist_vt
-{
-    KNamelist_vt_v1 v1;
-};
-
-/* Init
- */
-KLIB_EXTERN rc_t CC KNamelistInit ( KNamelist *self, const KNamelist_vt *vt );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_impl_ */
diff --git a/interfaces/klib/klib-priv.h b/interfaces/klib/klib-priv.h
deleted file mode 100644
index 2b2580d..0000000
--- a/interfaces/klib/klib-priv.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_priv_
-#define _h_klib_priv_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_klib_writer_
-#include <klib/writer.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- */
-
-
-/* reporting structure
- */
-typedef struct ReportFuncs ReportFuncs;
-struct ReportFuncs
-{
-    void ( CC * report ) ( uint32_t indent, const char* name, uint32_t count, ... );
-    void ( CC * reportData ) ( uint32_t indent, const char* name, const char* data, uint32_t count, ... );
-    rc_t ( CC * reportData1 ) ( const char* data );
-    void ( CC * reportOpen ) ( uint32_t indent, const char* name, uint32_t count, ... );
-    void ( CC * reportOpen1 ) ( uint32_t indent, const char* name );
-    void ( CC * reportClose ) ( uint32_t indent, const char* name );
-    void ( CC * reportClose1 ) ( const char* name );
-    void ( CC * reportError ) ( uint32_t indent, rc_t rc, const char* function );
-    void ( CC * reportErrorStr ) ( uint32_t indent, rc_t rc, const char* function,
-        const char* name, const char* val );
-    void ( CC * reportErrorStrImpl ) ( uint32_t indent, rc_t rc, const char* function,
-        const char* name, const char* val, bool eol );
-    void ( CC * reportErrorStrInt ) ( uint32_t indent, rc_t rc, const char* function,
-        const char* names, const char* vals, const char* namei, uint32_t vali );
-    void ( CC * reportError3Str ) ( uint32_t indent, rc_t rc, const char* function,
-        const char* name, const char* v1, const char* v2, const char* v3, bool eol );
-};
-
-
-/* InitKFS
- */
-KLIB_EXTERN void CC ReportInitKFS (
-    rc_t ( CC * report_cwd ) ( const ReportFuncs *f, uint32_t indent ),
-    rc_t ( CC * report_redirect ) ( KWrtHandler* handler,
-        const char* filename, bool* to_file, bool finalize ) );
-
-/* InitConfig
- *  returns appname if available
- */
-KLIB_EXTERN const char* CC ReportInitConfig ( rc_t ( CC * report )
-    ( const ReportFuncs *f, uint32_t indent,
-      uint32_t configNodesSkipCount, va_list args ) );
-
-
-/* InitVDB
- */
-KLIB_EXTERN rc_t CC ReportInitVDB(
-    rc_t (CC *report_obj)(const ReportFuncs *f,
-        uint32_t indent, const char *path, bool *wasDbOrTableSet),
-    rc_t (CC *report_software)(const ReportFuncs *f,
-        uint32_t indent, const char *argv_0, const char *date, ver_t tool_ver),
-    rc_t (CC *whack)(void));
-
-
-/* RecordZombieFile
- */
-KLIB_EXTERN void CC ReportRecordZombieFile ( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_priv_ */
diff --git a/interfaces/klib/ksort-macro.h b/interfaces/klib/ksort-macro.h
deleted file mode 100644
index e86d57b..0000000
--- a/interfaces/klib/ksort-macro.h
+++ /dev/null
@@ -1,257 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_klib_ksort_macro_
-#define _h_klib_ksort_macro_
-
-#include <limits.h>
-#include <stdlib.h>
-
-
-/* Copyright (C) 1991,1992,1996,1997,1999,2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Written by Douglas C. Schmidt (schmidt at ics.uci.edu).
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-/* If you consider tuning this algorithm, you should consult first:
-   Engineering a sort function; Jon Bentley and M. Douglas McIlroy;
-   Software - Practice and Experience; Vol. 23 (11), 1249-1265, 1993.  */
-
-/* Discontinue quicksort algorithm when partition gets below this size.
-   This particular magic number was chosen to work best on a Sun 4/260. */
-#ifndef KSORT_MAX_THRESH
-#define KSORT_MAX_THRESH 4
-#endif
-
-/* Stack node declarations used to store unfulfilled partition obligations. */
-#ifndef ksort_stack_node_declared
-#define ksort_stack_node_declared 1
-typedef struct ksort_stack_node ksort_stack_node;
-struct ksort_stack_node
-{
-    char *lo;
-    char *hi;
-};
-#endif
-
-/* The next 4 #defines implement a very fast in-line stack abstraction. */
-/* The stack needs log (total_elements) entries (we could even subtract
-   log(MAX_THRESH)).  Since total_elements has type size_t, we get as
-   upper bound for log (total_elements):
-   bits per byte (CHAR_BIT) * sizeof(size_t).  */
-
-#ifndef KSORT_STACK_SIZE
-#define KSORT_STACK_SIZE	(CHAR_BIT * sizeof(size_t))
-#endif
-
-#ifndef KSORT_PUSH
-#define KSORT_PUSH(low, high)	((void) ((top->lo = (low)), (top->hi = (high)), ++top))
-#endif
-
-#ifndef KSORT_POP
-#define	KSORT_POP(low, high)	((void) (--top, (low = top->lo), (high = top->hi)))
-#endif
-
-#ifndef KSORT_STACK_EMPTY
-#define	KSORT_STACK_EMPTY	( stack >= top )
-#endif
-
-#ifndef KSORT_SWAP
-#define KSORT_SWAP( a, b, off, size )           \
-    do                                          \
-    {                                           \
-        register size_t i, end = off + size;    \
-        register char *__a = (a), *__b = (b);   \
-        for ( i = off; i < end; ++ i )          \
-        {                                       \
-            char __tmp = __a [ i ];             \
-            __a [ i ] = __b [ i ];              \
-            __b [ i ] = __tmp;                  \
-        }                                       \
-    } while (0)
-#endif
-
-#define KSORT_TSWAP( T, a, b )                  \
-    do                                          \
-    {                                           \
-        T tmp = * ( const T* ) ( a );           \
-        * ( T* ) ( a ) = * ( const T* ) ( b );  \
-        * ( T* ) ( b ) = tmp;                   \
-    }                                           \
-    while ( 0 )
-
-
-/* Order size using quicksort.  This implementation incorporates
-   four optimizations discussed in Sedgewick:
-
-   1. Non-recursive, using an explicit stack of pointer that store the
-   next array partition to sort.  To save time, this maximum amount
-   of space required to store an array of SIZE_MAX is allocated on the
-   stack.  Assuming a 32-bit (64 bit) integer for size_t, this needs
-   only 32 * sizeof(stack_node) == 256 bytes (for 64 bit: 1024 bytes).
-   Pretty cheap, actually.
-
-   2. Chose the pivot element using a median-of-three decision tree.
-   This reduces the probability of selecting a bad pivot value and
-   eliminates certain extraneous comparisons.
-
-   3. Only quicksorts TOTAL_ELEMS / MAX_THRESH partitions, leaving
-   insertion sort to order the MAX_THRESH items within each partition.
-   This is a big win, since insertion sort is faster for small, mostly
-   sorted array segments.
-
-   4. The larger of the two sub-partitions is always pushed onto the
-   stack first, with the algorithm then concentrating on the
-   smaller partition.  This *guarantees* no more than log (total_elems)
-   stack size is needed (actually O(1) in this case)!  */
-
-#define KSORT( PBASE, TOTAL_ELEMS, ELEM_SIZE, SWAP_OFFSET, SWAP_SIZE )            \
-    register char *base_ptr = ( char* ) ( PBASE );                                \
-    const size_t max_thresh = KSORT_MAX_THRESH * ( ELEM_SIZE );                   \
-    if ( ( TOTAL_ELEMS ) < 2)                                                     \
-        return;                                                                   \
-    if ( ( TOTAL_ELEMS ) > KSORT_MAX_THRESH)                                      \
-    {                                                                             \
-        char *lo = base_ptr;                                                      \
-        char *hi = & lo [ ( ELEM_SIZE ) * ( ( TOTAL_ELEMS ) - 1 ) ];              \
-        ksort_stack_node stack [ KSORT_STACK_SIZE ];                              \
-        ksort_stack_node *top = stack;                                            \
-        KSORT_PUSH (NULL, NULL);                                                  \
-        while ( ! KSORT_STACK_EMPTY )                                             \
-        {                                                                         \
-            char *left_ptr;                                                       \
-            char *right_ptr;                                                      \
-            char *mid = lo + ( ELEM_SIZE ) * ( ( hi - lo ) / ( ELEM_SIZE ) >> 1 );\
-            if ( CMP ( ( void* ) mid, ( void* ) lo ) < 0 )                        \
-                SWAP ( mid, lo, ( SWAP_OFFSET ), ( SWAP_SIZE ) );                 \
-            if ( CMP ( ( void* ) hi, ( void* ) mid) < 0 )                         \
-                SWAP ( mid, hi, ( SWAP_OFFSET ), ( SWAP_SIZE ) );                 \
-            else                                                                  \
-                goto jump_over;                                                   \
-            if ( CMP ( ( void* ) mid, ( void* ) lo ) < 0 )                        \
-                SWAP ( mid, lo, ( SWAP_OFFSET ), ( SWAP_SIZE ) );                 \
-        jump_over:                                                                \
-            left_ptr  = lo + ( ELEM_SIZE );                                       \
-            right_ptr = hi - ( ELEM_SIZE );                                       \
-            do                                                                    \
-            {                                                                     \
-                while ( CMP ( ( void* ) left_ptr, ( void* ) mid ) < 0 )           \
-                    left_ptr += ( ELEM_SIZE );                                    \
-                while ( CMP ( ( void* ) mid, ( void* ) right_ptr ) < 0 )          \
-                    right_ptr -= ( ELEM_SIZE );                                   \
-                if ( left_ptr < right_ptr )                                       \
-                {                                                                 \
-                    SWAP ( left_ptr, right_ptr, ( SWAP_OFFSET ), ( SWAP_SIZE ) ); \
-                    if ( mid == left_ptr )                                        \
-                        mid = right_ptr;                                          \
-                    else if ( mid == right_ptr )                                  \
-                        mid = left_ptr;                                           \
-                    left_ptr += ( ELEM_SIZE );                                    \
-                    right_ptr -= ( ELEM_SIZE );                                   \
-                }                                                                 \
-                else if ( left_ptr == right_ptr )                                 \
-                {                                                                 \
-                    left_ptr += ( ELEM_SIZE );                                    \
-                    right_ptr -= ( ELEM_SIZE );                                   \
-                    break;                                                        \
-                }                                                                 \
-            }                                                                     \
-            while ( left_ptr <= right_ptr );                                      \
-            if ((size_t) (right_ptr - lo) <= max_thresh)                          \
-            {                                                                     \
-                if ((size_t) (hi - left_ptr) <= max_thresh)                       \
-                    KSORT_POP (lo, hi);                                           \
-                else                                                              \
-                    lo = left_ptr;                                                \
-            }                                                                     \
-            else if ((size_t) (hi - left_ptr) <= max_thresh)                      \
-                hi = right_ptr;                                                   \
-            else if ((right_ptr - lo) > (hi - left_ptr))                          \
-            {                                                                     \
-                KSORT_PUSH (lo, right_ptr);                                       \
-                lo = left_ptr;                                                    \
-            }                                                                     \
-            else                                                                  \
-            {                                                                     \
-                KSORT_PUSH (left_ptr, hi);                                        \
-                hi = right_ptr;                                                   \
-            }                                                                     \
-        }                                                                         \
-    }                                                                             \
-    {                                                                             \
-        register char *run_ptr;                                                   \
-        char *const end_ptr = & base_ptr [(ELEM_SIZE)*((TOTAL_ELEMS)-1)];         \
-        char *tmp_ptr = base_ptr;                                                 \
-        char *thresh = base_ptr + max_thresh;                                     \
-        if ( thresh > end_ptr )                                                   \
-            thresh = end_ptr;                                                     \
-        for (run_ptr = tmp_ptr+(ELEM_SIZE);run_ptr<=thresh;run_ptr+=(ELEM_SIZE))  \
-            if ( CMP ( ( void* ) run_ptr, ( void* ) tmp_ptr ) < 0 )               \
-                tmp_ptr = run_ptr;                                                \
-        if (tmp_ptr != base_ptr)                                                  \
-            SWAP ( tmp_ptr, base_ptr, ( SWAP_OFFSET ), ( SWAP_SIZE ) );           \
-        tmp_ptr = base_ptr + ( ELEM_SIZE );                                       \
-        for ( run_ptr = base_ptr + ( 2 * ( ELEM_SIZE ) );                         \
-              run_ptr <= end_ptr; tmp_ptr = run_ptr, run_ptr += ( ELEM_SIZE ) )   \
-        {                                                                         \
-            for ( ; tmp_ptr >= base_ptr; tmp_ptr -= ( ELEM_SIZE ) )               \
-            {                                                                     \
-                if ( CMP ( run_ptr, tmp_ptr ) >= 0 )                              \
-                    break;                                                        \
-            }                                                                     \
-            tmp_ptr += ( ELEM_SIZE );                                             \
-            if ( tmp_ptr != run_ptr )                                             \
-            {                                                                     \
-                char *trav;                                                       \
-                trav = run_ptr + ( ELEM_SIZE );                                   \
-                while ( --trav >= run_ptr )                                       \
-                {                                                                 \
-                    char c = *trav;                                               \
-                    char *hi, *lo;                                                \
-                    for (hi=lo=trav; (lo-=(ELEM_SIZE)) >= tmp_ptr; hi=lo)         \
-                        *hi = *lo;                                                \
-                    *hi = c;                                                      \
-                }                                                                 \
-            }                                                                     \
-        }                                                                         \
-    }                                                                             \
-    ( void ) 0
-
-#endif /* _h_klib_ksort_macro_ */
diff --git a/interfaces/klib/log.h b/interfaces/klib/log.h
deleted file mode 100644
index f8262df..0000000
--- a/interfaces/klib/log.h
+++ /dev/null
@@ -1,381 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_log_
-#define _h_klib_log_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_klib_logfmt_
-#include <klib/logfmt.h>
-#endif
-
-#ifndef _h_klib_writer_
-#include <klib/writer.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * KLogLevel
- *  indicates the severity of message: emission of messages depends upon
- *  the setting of a global value that allows messages assigned higher priority
- * (lower numeric value) while filtering lower priority messages.
- *
- *  "fatal" - reported when about to abort
- *  "sys"   - an error occurred when interacting with OS
- *  "int"   - an internal logic error occurred
- *  "err"   - a user-level error occurred
- *  "warn"  - an unusual or undesired condition was detected
- *  "info"  - an event, state or condition is being reported
- *  "debug" - verbose output for use in debugging
- */
-typedef uint32_t KLogLevel;
-enum
-{
-    klogLevelMin = 0,
-    klogFatal = klogLevelMin,
-    klogSys,
-    klogInt,
-    klogErr,
-    klogWarn,
-    klogInfo,
-    klogDebug,
-    klogLevelMax = klogDebug
-};
-
-/* Get
- *  retrieve current process-global log level
- */
-KLIB_EXTERN KLogLevel CC KLogLevelGet (void);
-
-/* Set
- *  set process-global log level
- */
-KLIB_EXTERN rc_t CC KLogLevelSet ( KLogLevel lvl );
-
-
-/* KLogLevelAdjust
- *  adjust process-global log level by an offset from current
- */
-KLIB_EXTERN void CC KLogLevelAdjust ( int32_t adjust );
-
-
-/* KLogLevelExplain
- *  inserts level description
- *
- * buffer may not be NULL, num_writ may be NULL
- */
-KLIB_EXTERN rc_t CC KLogLevelExplain ( KLogLevel lvl, char* buffer, size_t bsize, size_t* num_writ );
-
-KLIB_EXTERN const char ** CC KLogGetParamStrings ( void );
-
-/* LastErrorCode
- * LastErrorCodeReset
- *  return or clear the last reported rc_t with log level klogErr or above
- */
-KLIB_EXTERN rc_t CC KLogLastErrorCode ( void );
-KLIB_EXTERN void CC KLogLastErrorCodeReset ( void );
-
-/* LastErrorCodeSet
- *  set the last reported rc_t with log level klogErr or above
- */
-KLIB_EXTERN void CC KLogLastErrorCodeSet ( KLogLevel lvl, rc_t rc );
-
-/* -----
- * Handlers for application and library writers.
- */
-KLIB_EXTERN KWrtHandler* CC KLogHandlerGet (void);
-KLIB_EXTERN KWrtHandler* CC KLogLibHandlerGet (void);
-
-KLIB_EXTERN KWrtWriter CC KLogWriterGet (void);
-KLIB_EXTERN KWrtWriter CC KLogLibWriterGet (void);
-KLIB_EXTERN void* CC KLogDataGet (void);
-KLIB_EXTERN void* CC KLogLibDataGet (void);
-
-
-/* Handler
- *  sets output handler for standard output
- *
- *  "logger" [ IN ] and "self" [ IN, OPAQUE ] - callback function
- *  to handle log output
- */
-KLIB_EXTERN rc_t CC KLogHandlerSet    (KWrtWriter writer, void * data);
-KLIB_EXTERN rc_t CC KLogLibHandlerSet (KWrtWriter writer, void * data);
-
-KLIB_EXTERN rc_t CC KLogHandlerSetStdOut    (void);
-KLIB_EXTERN rc_t CC KLogLibHandlerSetStdOut (void);
-KLIB_EXTERN rc_t CC KLogHandlerSetStdErr    (void);
-KLIB_EXTERN rc_t CC KLogLibHandlerSetStdErr (void);
-
-/* formatting */
-
-typedef uint32_t KLogFmtFlags;
-enum
-{
-    klogFmtTimestamp = 0x00000001,
-    klogFmtSeverity = 0x00000002,
-    klogFmtPid = 0x00000004,
-    klogFmtAppName = 0x00000008,
-    klogFmtAppVersion = 0x00000010,
-    klogFmtMessage = 0x00000020, /* actual message  */
-    klogFmtReason = 0x00000040, /* full RC message */
-    klogFmtReasonShort = 0x00000080, /* object and state only */
-    klogFmtRC = 0x00000100, /* rc enum textual values */
-    klogFmtModule = 0x00000200, /* rc enum name for module */
-    klogFmtTarget = 0x00000400, /* rc enum name for target */
-    klogFmtContext = 0x00000800, /* rc enum name for context */
-    klogFmtObject = 0x00001000, /* rc enum name for object */
-    klogFmtState = 0x00002000, /* rc enum name for state */
-    klogFmtModuleText = 0x00004000, /* rc enum text for module */
-    klogFmtTargetText = 0x00008000, /* rc enum text for target */
-    klogFmtContextText = 0x00010000, /* rc enum text for context */
-    klogFmtObjectText = 0x00020000, /* rc enum text for object */
-    klogFmtStateText = 0x00040000, /* rc enum text for state */
-    klogFmtLocalTimestamp = 0x00080000 /* print time stamp in local time, if both bits set local takes over */
-};
-
-KLIB_EXTERN KFmtHandler* CC KLogFmtHandlerGet (void);
-KLIB_EXTERN KFmtHandler* CC KLogLibFmtHandlerGet (void);
-
-KLIB_EXTERN KLogFmtFlags CC KLogFmtFlagsGet ( void );
-KLIB_EXTERN KLogFmtFlags CC KLogLibFmtFlagsGet ( void );
-
-KLIB_EXTERN KFmtWriter CC KLogFmtWriterGet (void);
-KLIB_EXTERN KFmtWriter CC KLogLibFmtWriterGet (void);
-KLIB_EXTERN void* CC KLogFmtDataGet (void);
-KLIB_EXTERN void* CC KLogLibFmtDataGet (void);
-
-KLIB_EXTERN rc_t CC KLogFmtFlagsSet    (KLogFmtFlags flags);
-KLIB_EXTERN rc_t CC KLogLibFmtFlagsSet (KLogFmtFlags flags);
-
-KLIB_EXTERN rc_t CC KLogFmtHandlerSet    (KFmtWriter formatter, KLogFmtFlags flags, void* data);
-KLIB_EXTERN rc_t CC KLogLibFmtHandlerSet (KFmtWriter formatter, KLogFmtFlags flags, void* data);
-
-KLIB_EXTERN rc_t CC KLogFmtHandlerSetDefault(void);
-KLIB_EXTERN rc_t CC KLogLibFmtHandlerSetDefault(void);
-
-/*--------------------------------------------------------------------------
- * Log
- *  global logging
- *
- *  this logging API - like most others - attempts to remain isolated
- *  from any actual logging implementation, such that output may be
- *  routed in several ways.
- *
- *  the default handler
- *
- *  the path from unstructured text to formatted XML is difficult in that
- *  it requires parsing, and is therefore error prone.
- *
- *  the path from structured reports to XML as well as less or unstructured
- *  text is simple to implement, but generally more of a burden to use.
- *
- *  the challenge is therefore to present an API that makes structured
- *  logging less painful than it might be.
- */
-
-
-/* Init
- *  initialize the logging module with executable identity and version,
- *  plus logging level. actual behavior is determined by the logging
- *  implementation.
- *
- */
-KLIB_EXTERN rc_t CC KLogInit (void );
-
-/* LogMsg
- *  makes an entry to the log file
- *
- *  "lvl" [ IN ] - severity of message
- *
- *  "msg" [ IN ] - NUL terminated string
- */
-KLIB_EXTERN rc_t CC LogMsg ( KLogLevel lvl, const char *msg );
-KLIB_EXTERN rc_t CC LogLibMsg ( KLogLevel lvl, const char *msg );
-
-/* pLogMsg
- *  makes a parameterized entry to the log file
- *
- *  "lvl" [ IN ] - severity of message
- *
- *  "msg" [ IN ] - NUL terminated string with named parameters
- *
- *  "fmt" [ IN ] - NUL terminated format string, behaves according
- *  to standard printf-style formatting
- */
-KLIB_EXTERN rc_t CC pLogMsg ( KLogLevel lvl, const char *msg, const char *fmt, ... );
-KLIB_EXTERN rc_t CC vLogMsg ( KLogLevel lvl, const char *msg, const char *fmt, va_list args );
-KLIB_EXTERN rc_t CC pLogLibMsg ( KLogLevel lvl, const char *msg, const char *fmt, ... );
-KLIB_EXTERN rc_t CC vLogLibMsg ( KLogLevel lvl, const char *msg, const char *fmt, va_list args );
-
-
-/* LogErr
- *  reports an error to log file
- *
- *  "lvl" [ IN ] - severity of message
- *
- *  "rc" [ IN ] - return code to be decoded
- *
- *  "msg" [ IN, NULL OKAY ] - optional NUL terminated message string
- */
-KLIB_EXTERN rc_t CC LogErr ( KLogLevel lvl, rc_t rc, const char *msg );
-KLIB_EXTERN rc_t CC LogLibErr ( KLogLevel lvl, rc_t rc, const char *msg );
-
-
-/* pLogErr
- *  reports an error to log file
- *
- *  "lvl" [ IN ] - severity of message
- *
- *  "rc" [ IN ] - return code to be decoded
- *
- *  "msg" [ IN ] - NUL terminated message string with named parameters
- *
- *  "fmt" [ IN ] - NUL terminated format string, behaves according
- *  to standard printf-style formatting
- */
-KLIB_EXTERN rc_t CC pLogErr ( KLogLevel lvl, rc_t rc, const char *msg, const char *fmt, ... );
-KLIB_EXTERN rc_t CC vLogErr ( KLogLevel lvl, rc_t rc, const char *msg, const char *fmt, va_list args );
-KLIB_EXTERN rc_t CC pLogLibErr ( KLogLevel lvl, rc_t rc, const char *msg, const char *fmt, ... );
-KLIB_EXTERN rc_t CC vLogLibErr ( KLogLevel lvl, rc_t rc, const char *msg, const char *fmt, va_list args );
-
-/* conditional wrapper */
-#ifdef _LIBRARY
-
-/*
- * Usage:
- *  LOGMSG (logWarn, (logWarn, "Something happened"));
- *
- * But we can't HAVE a pony...
- */
-#define LOGMSG(lvl,msg)         \
-    ((((unsigned)lvl) <= KLogLevelGet()) ? LogLibMsg (lvl, msg) : (rc_t)0)
-
-/*
- * fmt is  two fmt strings plus parameters 
- * usage resembles
- *   PLOGMSG (logWarn, (logWarn, "message with $(PARAM1) and $(PARAM2)", "PARAM1=%s,PARAM2=%d", "parameter1", int_var));
- */
-#define PLOGMSG(lvl,msg)        \
-    ((((unsigned)lvl) <= KLogLevelGet()) ? pLogLibMsg msg : (rc_t)0)
-
-/*
- * fmt is  two fmt strings plus parameters 
- * usage resembles
- *   VLOGMSG (logWarn, (logWarn, "message with $(PARAM1) and $(PARAM2)", "PARAM1=%s,PARAM2=%d", args));
- */
-#define VLOGMSG(lvl,msg)        \
-    ((((unsigned)lvl) <= KLogLevelGet()) ? vLogLibMsg msg : (rc_t)0)
-
-/*
- * Usage:
- *  LOGMSG (logWarn, rc, "Something wicked this way comes");
- */
-#define LOGERR(lvl,rc,msg)        \
-    ((((unsigned)lvl) <= KLogLevelGet()) ? LogLibErr (lvl,rc,msg) : (rc_t)0)
-
-/*
- * fmt is  two fmt strings plus parameters 
- * usage resembles
- *   PLOGERR (logWarn, (logWarn, rc, "message with $(PARAM1) and $(PARAM2)", "PARAM1=%s,PARAM2=%d", "parameter1", int_var));
- */
-#define PLOGERR(lvl,msg)        \
-    ((((unsigned)lvl) <= KLogLevelGet()) ? pLogLibErr msg : (rc_t)0)
-
-/*
- * fmt is  two fmt strings plus parameters 
- * usage resembles
- *   VLOGERR (logWarn, (logWarn, rc, "message with $(PARAM1) and $(PARAM2)", "PARAM1=%s,PARAM2=%d", args));
- */
-#define VLOGERR(lvl,msg)        \
-    ((((unsigned)lvl) <= KLogLevelGet()) ? vLogLibErr msg : (rc_t)0)
-
-#else
-
-/*
- * Usage:
- *  LOGMSG (logWarn, "Something happened");
- */
-#define LOGMSG(lvl,msg)         \
-    ((((unsigned)lvl) <= KLogLevelGet()) ? LogMsg (lvl,msg) : (rc_t)0)
-
-/*
- * fmt is  two fmt strings plus parameters 
- * usage resembles
- *   PLOGMSG (logWarn, (logWarn, "message with $(PARAM1) and $(PARAM2)", "PARAM1=%s,PARAM2=%d", "parameter1", int_var));
- */
-#define PLOGMSG(lvl,msg)        \
-    ((((unsigned)lvl) <= KLogLevelGet()) ? pLogMsg msg : (rc_t)0)
-
-/*
- * fmt is  two fmt strings plus parameters 
- * usage resembles
- *   VLOGMSG (logWarn, (logWarn, "message with $(PARAM1) and $(PARAM2)", "PARAM1=%s,PARAM2=%d", args));
- */
-#define VLOGMSG(lvl,msg)        \
-    ((((unsigned)lvl) <= KLogLevelGet()) ? vLogMsg msg : (rc_t)0)
-
-/*
- * Usage:
- *  LOGMSG (logWarn, rc, "Something wicked this way comes");
- */
-#define LOGERR(lvl,rc,msg)        \
-    ((((unsigned)lvl) <= KLogLevelGet()) ? LogErr (lvl,rc,msg) : (rc_t)0)
-
-/*
- * fmt is  two fmt strings plus parameters 
- * usage resembles
- *   PLOGERR (logWarn, (logWarn, rc, "message with $(PARAM1) and $(PARAM2)", "PARAM1=%s,PARAM2=%d", "parameter1", int_var));
- */
-#define PLOGERR(lvl,msg)        \
-    ((((unsigned)lvl) <= KLogLevelGet()) ? pLogErr msg : (rc_t)0)
-
-/*
- * fmt is  two fmt strings plus parameters 
- * usage resembles
- *   VLOGERR (logWarn, (logWarn, rc, "message with $(PARAM1) and $(PARAM2)", "PARAM1=%s,PARAM2=%d", args));
- */
-#define VLOGERR(lvl,msg)        \
-    ((((unsigned)lvl) <= KLogLevelGet()) ? vLogErr msg : (rc_t)0)
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_log_ */
diff --git a/interfaces/klib/logfmt.h b/interfaces/klib/logfmt.h
deleted file mode 100644
index 619a3ec..0000000
--- a/interfaces/klib/logfmt.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_logfmt_
-#define _h_klib_logfmt_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define PLOG_NAME(name)   #name
-#define	PLOG_C(name)	  PLOG_NAME(name) "=%c"
-#define	PLOG_S(name)	  PLOG_NAME(name) "=%s"
-#define	PLOG_I8(name)	  PLOG_NAME(name) "=%hhd"
-#define	PLOG_U8(name)	  PLOG_NAME(name) "=%hhu"
-#define	PLOG_X8(name)	  PLOG_NAME(name) "=0x%2.2hhX"
-#define	PLOG_I16(name)	  PLOG_NAME(name) "=%hd"
-#define	PLOG_U16(name)	  PLOG_NAME(name) "=%hu"
-#define	PLOG_X16(name)	  PLOG_NAME(name) "=0x%4.4hX"
-#define	PLOG_I32(name)	  PLOG_NAME(name) "=%d"
-#define	PLOG_U32(name)	  PLOG_NAME(name) "=%u"
-#define	PLOG_X32(name)	  PLOG_NAME(name) "=0x%8.8X"
-#define	PLOG_I64(name)	  PLOG_NAME(name) "=%ld"
-#define	PLOG_U64(name)	  PLOG_NAME(name) "=%lu"
-#define	PLOG_X64(name)	  PLOG_NAME(name) "=0x%16.16lX"
-#define	PLOG_PDIFF(name)  PLOG_NAME(name) "=%zd"
-#define	PLOG_SIZE(name)	  PLOG_NAME(name) "=0x%zu"
-#define PLOG_P(name)      PLOG_NAME(name) "=%p"
-/* use the above to fill in the below */
-#define PLOG_2(a,b)		    a "," b
-#define PLOG_3(a,b,c)		a "," b "," c
-#define PLOG_4(a,b,c,d)		a "," b "," c "," d
-#define PLOG_5(a,b,c,d,e)	a "," b "," c "," d "," e
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_logfmt_ */
diff --git a/interfaces/klib/misc.h b/interfaces/klib/misc.h
deleted file mode 100644
index 21469da..0000000
--- a/interfaces/klib/misc.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_misc_
-#define _h_klib_misc_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/** Is user a administrator? Has user root privileges? */
-KLIB_EXTERN bool CC is_iser_an_admin(void);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_klib_misc_ */
diff --git a/interfaces/klib/namelist.h b/interfaces/klib/namelist.h
deleted file mode 100644
index 8439d72..0000000
--- a/interfaces/klib/namelist.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_namelist_
-#define _h_klib_namelist_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KNamelist
- *  a generic list of NUL-terminated name strings
- */
-typedef struct KNamelist KNamelist;
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KLIB_EXTERN rc_t CC KNamelistAddRef ( const KNamelist *self );
-KLIB_EXTERN rc_t CC KNamelistRelease ( const KNamelist *self );
-
-/* Count
- *  returns the number of entries
- *
- *  "count" [ OUT ] - return parameter for entry count
- */
-KLIB_EXTERN rc_t CC KNamelistCount ( const KNamelist *self, uint32_t *count );
-
-/* Get
- *  get an indexed name
- *
- *  "idx" [ IN ] - a zero-based name index
- *
- *  "name" [ OUT ] - return parameter for NUL terminated name
- */
-KLIB_EXTERN rc_t CC KNamelistGet ( const KNamelist *self,
-    uint32_t idx, const char **name );
-
-
-/*--------------------------------------------------------------------------
- * VNamelist
- *  generic Vector namelist implementation
- */
-typedef struct VNamelist VNamelist;
-
-/* Make
- *  make an empty namelist
- *
- *  "names" [ OUT ] - return parameter for namelist object
- *
- *  "alloc_blocksize" [ IN ] - selects the number of names in
- *  a vector block; used for allocating and extending
- */
-KLIB_EXTERN rc_t CC VNamelistMake ( VNamelist **names, const uint32_t alloc_blocksize );
-
-/* Release
- *  ignores NULL references
- */
-KLIB_EXTERN rc_t CC VNamelistRelease ( const VNamelist *self );
-
-/* ToNamelist
- *  cast operator
- *
- *  "cast" [ OUT ] - return parameter for new KNamelist reference
- *  must be released by KNamelistRelease
- */
-KLIB_EXTERN rc_t CC VNamelistToNamelist ( VNamelist *self, KNamelist **cast );
-KLIB_EXTERN rc_t CC VNamelistToConstNamelist ( const VNamelist *self, const KNamelist **cast );
-
-
-/* Append
- *  appends a copy of string to the VNamelist
- *
- *  "src" [ IN ] - NUL terminated name string / String-struct ... to be copied
- *  and appended.
- */
-KLIB_EXTERN rc_t CC VNamelistAppend ( VNamelist *self, const char* src );
-KLIB_EXTERN rc_t CC VNamelistAppendString ( VNamelist *self, const String * src );
-
-/* Remove
- *  removes a string from the namelist
- *
- *  "s" [ IN ] - NUL terminated name string to be removed
- */
-KLIB_EXTERN rc_t CC VNamelistRemove( VNamelist *self, const char* s );
-
-/* Remove all
- *  removes all strings from the namelist ( calls free on them internally )
- *
- */
-KLIB_EXTERN rc_t CC VNamelistRemoveAll( VNamelist *self );
-
-
-/* Remove string at index ( and calls fron on it internally )
- *  returns error code if index is invalid
- *
- */
-KLIB_EXTERN rc_t CC VNamelistRemoveIdx( VNamelist *self, uint32_t idx );
-
-
-/* IndexOf
- *  searches linear in the namelist for the string
- *
- *  "s" [ IN ] - NUL terminated name string to be searched for
- *
- *  "found" [ OUT ] - index of the string if found
- *  unchanged if not found
- *
- *  returns RC( rcCont, rcNamelist, rcSearching, rcString, rcNotFound ) if not found
- */
-KLIB_EXTERN rc_t CC VNamelistIndexOf( VNamelist *self, const char* s, uint32_t *found );
-
-/* Count
- *  returns the number of entries
- *
- *  "count" [ OUT ] - return parameter for entry count
- */
-KLIB_EXTERN rc_t CC VNameListCount ( const VNamelist *self, uint32_t *count );
-
-/* Get
- *  get an indexed name
- *
- *  "idx" [ IN ] - a zero-based name index
- *
- *  "name" [ OUT ] - return parameter for NUL terminated name
- */
-KLIB_EXTERN rc_t CC VNameListGet ( const VNamelist *self, uint32_t idx, const char **name );
-
-
-/* Reorder
- *  sort the names according to case sensitivity
- *  and UNICODE character code ordering
- *
- *  "case_insensitive" [ IN ] - when true, perform "tolower" on
- *   each character before compare
- */
-KLIB_EXTERN void CC VNamelistReorder ( VNamelist *self, bool case_insensitive );
-
-
-/* foreach_String_part, foreach_Str_part
- *  splits a String or char-ptr by delim, invokes callback-funtion on each part
- *  trailing delim's without content are omitted
- */
-KLIB_EXTERN rc_t CC foreach_String_part( const String * src, const uint32_t delim,
-         rc_t ( CC * f ) ( const String * part, void *data ), void * data );
-         
-KLIB_EXTERN rc_t CC foreach_Str_part( const char * src, const uint32_t delim,
-         rc_t ( CC * f ) ( const String * part, void *data ), void * data );
-
-
-/* VNamelistSplitString, VNamelistSplitStr
- *  splits a String or char-ptr and adds parts to existing VNamelist
- */
-KLIB_EXTERN rc_t CC VNamelistSplitString ( VNamelist * list,
-        const String * str, const uint32_t delim );
-
-KLIB_EXTERN rc_t CC VNamelistSplitStr ( VNamelist * list,
-        const char * str, const uint32_t delim );
-
-
-/* VNamelistFromString, VNamelistFromStr
- *  splits a String or char-ptr and creates VNamelist from parts
- */
-KLIB_EXTERN rc_t CC VNamelistFromString ( VNamelist ** list,
-        const String * str, const uint32_t delim );
-
-KLIB_EXTERN rc_t CC VNamelistFromStr ( VNamelist ** list,
-        const char * str, const uint32_t delim );
-
-/* VNamelistJoin
- *  join all strings in the given list and put delim's inbetween them
- *  the function will allocate the result-String
- */
-KLIB_EXTERN rc_t CC VNamelistJoin( const VNamelist * list,
-        const uint32_t delim, const String ** rslt );
-
-/* VNamelistContainsString, VNamelistContainsStr
- *  loop through the list to and report if and where it contains the item
- */
-KLIB_EXTERN rc_t CC VNamelistContainsString( const VNamelist * list,
-        const String * item, int32_t * idx );
-KLIB_EXTERN rc_t CC VNamelistContainsStr( const VNamelist * list,
-        const char * item, int32_t * idx );
-        
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_namelist_ */
diff --git a/interfaces/klib/namelist.hpp b/interfaces/klib/namelist.hpp
deleted file mode 100644
index 58c7d6a..0000000
--- a/interfaces/klib/namelist.hpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_klib_namelist_
-#define _hpp_klib_namelist_
-
-#ifndef _h_klib_namelist_
-#include <klib/namelist.h>
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KNamelist
- *  a generic list of NUL-terminated name strings
- */
-struct KNamelist
-{
-    /* AddRef
-     * Release
-     *  ignores NULL references
-     */
-    inline int AddRef () const throw()
-    { return KNamelistAddRef ( this ); }
-    inline int Release () const throw()
-    { return KNamelistRelease ( this ); }
-
-    /* Count
-     *  returns the number of entries
-     *
-     *  "count" [ OUT ] - return parameter for entry count
-     */
-    rc_t Count ( uint32_t *count ) const throw()
-    { return KNamelistCount ( this, count ); }
-
-    /* Get
-     *  get an indexed name
-     *
-     *  "idx" [ IN ] - a zero-based name index
-     *
-     *  "name" [ OUT ] - return parameter for NUL terminated name
-     */
-    rc_t Get ( uint32_t idx, const char **name ) const throw()
-    { return KNamelistGet ( this, idx, name ); }
-
-private:
-    KNamelist ();
-    ~ KNamelist ();
-    KNamelist ( const KNamelist& );
-    KNamelist &operator = ( const KNamelist& );
-};
-
-
-/*--------------------------------------------------------------------------
- * VNamelist
- *  a vector-based list of NUL-terminated name strings
- */
-struct VNamelist
-{
-
-    inline static rc_t Make ( VNamelist **namelist, const uint32_t alloc_blocksize ) throw ()
-    { return VNamelistMake ( namelist, alloc_blocksize ); }
-
-    /* AddRef
-     * Release
-     *  ignores NULL references
-     */
-    inline int AddRef () const throw()
-    { return KNamelistAddRef ( ( const KNamelist * )this ); }
-    inline int Release () const throw()
-    { return VNamelistRelease ( this ); }
-
-    /* Count
-     *  returns the number of entries
-     *
-     *  "count" [ OUT ] - return parameter for entry count
-     */
-    rc_t Count ( uint32_t *count ) const throw()
-    { return KNamelistCount ( ( const KNamelist * )this, count ); }
-
-    /* Get
-     *  get an indexed name
-     *
-     *  "idx" [ IN ] - a zero-based name index
-     *
-     *  "name" [ OUT ] - return parameter for NUL terminated name
-     */
-    rc_t Get ( uint32_t idx, const char **name ) const throw()
-    { return KNamelistGet ( ( const KNamelist * )this, idx, name ); }
-    
-    /* Append
-     *  append a string...
-     *
-     *  "src" [ IN ] - the string to append
-     */
-    rc_t Append ( const char *src ) throw()
-    { return VNamelistAppend ( this, src ); }
-
-
-private:
-    VNamelist ();
-    ~ VNamelist ();
-    VNamelist ( const VNamelist& );
-    VNamelist &operator = ( const VNamelist& );
-};
-
- 
-#endif // _hpp_klib_namelist_
diff --git a/interfaces/klib/ncbi-vdb-version.h b/interfaces/klib/ncbi-vdb-version.h
deleted file mode 100644
index b56ba31..0000000
--- a/interfaces/klib/ncbi-vdb-version.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-#ifndef _h_klib_ncbi_vdb_version_
-#define _h_klib_ncbi_vdb_version_
-
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/** Return ncbi-vdb package version.
-    The returned string should not be released. */
-KLIB_EXTERN const char *GetPackageVersion(void);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _h_klib_ncbi_vdb_version_ */
diff --git a/interfaces/klib/num-gen.h b/interfaces/klib/num-gen.h
deleted file mode 100644
index 844107f..0000000
--- a/interfaces/klib/num-gen.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_num_gen_
-#define _h_klib_num_gen_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_rc_
-#include <klib/rc.h>
-#endif
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * A NUMBER GENERATOR
- * 
- *  input : string, for instance "3,6,8,12,44-49"
- *  ouptut: sequence of integers, for instance 3,6,8,12,44,45,46,47,48,49
- */
-
-
-/*--------------------------------------------------------------------------
- * opaque number-generator and it's iterator
- */
-struct num_gen;
-struct num_gen_iter;
-
-
-/*--------------------------------------------------------------------------
- * num_gen_make
- *
- *  creates a empty number-generator
- *  or creates a number-generator and parses the string
- *  or creates and presets it with a range
- */
-KLIB_EXTERN rc_t CC num_gen_make( struct num_gen ** self );
-KLIB_EXTERN rc_t CC num_gen_make_sorted( struct num_gen ** self, bool sorted );
-KLIB_EXTERN rc_t CC num_gen_make_from_str( struct num_gen ** self, const char * src );
-KLIB_EXTERN rc_t CC num_gen_make_from_str_sorted( struct num_gen ** self, const char * src, bool sorted );
-KLIB_EXTERN rc_t CC num_gen_make_from_range( struct num_gen ** self, int64_t first, uint64_t count );
-KLIB_EXTERN rc_t CC num_gen_copy( const struct num_gen * self, struct num_gen ** dest );
-
-/*--------------------------------------------------------------------------
- * num_gen_destroy
- *
- *  destroys a number-generator
- */
-KLIB_EXTERN rc_t CC num_gen_destroy( struct num_gen * self );
-
-
-/*--------------------------------------------------------------------------
- * num_gen_clear
- *
- *  resets a number-generator, to be empty just like after num_gen_make()
- */
-KLIB_EXTERN rc_t CC num_gen_clear( struct num_gen * self );
-
-
-/*--------------------------------------------------------------------------
- * num_gen_parse
- *
- *  parses a given string in this form: "3,6,8,12,44-49"
- *  does not clear the number-generator before parsing
- *  eventual overlaps with the previous content are consolidated
- */
-KLIB_EXTERN rc_t CC num_gen_parse( struct num_gen * self, const char * src );
-KLIB_EXTERN rc_t CC num_gen_parse_S( struct num_gen * self, const String * src );
-
-/*--------------------------------------------------------------------------
- * num_gen_add
- *
- *  inserts the given interval into the number-generator
- *
- *  num_gen_add( *g, 10, 30 )
- *  is equivalent to:
- *  num_gen_parse( *g, "10-39" );
- *
- *  eventual overlaps with the previous content are consolidated 
- */
-KLIB_EXTERN rc_t CC num_gen_add( struct num_gen * self, const int64_t first, const uint64_t count );
-
-
-/*--------------------------------------------------------------------------
- * num_gen_trim
- *
- *  checks if the content of the number-generator is inside the given interval
- *  removes or shortens internal nodes if necessary
- */
-KLIB_EXTERN rc_t CC num_gen_trim( struct num_gen * self, const int64_t first, const uint64_t count );
-
-
-/*--------------------------------------------------------------------------
- * num_gen_empty
- *
- *  checks if the generator has no ranges defined
- */
-KLIB_EXTERN bool CC num_gen_empty( const struct num_gen * self );
-
-
-/*--------------------------------------------------------------------------
- * num_gen_as_string
- *
- *  prints the content of the num_gen into the buffer
- *  *s = "1-5,20,24-25"
- */
-KLIB_EXTERN rc_t CC num_gen_as_string( const struct num_gen * self, char * buffer, size_t buffsize,
-                                        size_t * written, bool full_info );
-
-
-/*--------------------------------------------------------------------------
- * num_gen_contains_value
- *
- *  checks if the generator contains the given value
- */
-KLIB_EXTERN rc_t CC num_gen_contains_value( const struct num_gen * self, const int64_t value );
-
-
-/*--------------------------------------------------------------------------
- * num_gen_range_check
- *
- *  if the generator is empty --> set it to the given range
- *  if it is not empty ---------> trim it to the given range
- */
-KLIB_EXTERN rc_t CC num_gen_range_check( struct num_gen * self, const int64_t first, const uint64_t count );
-
-/*--------------------------------------------------------------------------
- * num_gen_iterator_make
- *
- *  creates a iterator from the number-generator
- *  the iterator contains a constant copy of the number-ranges
- *  after this call it is safe to destroy or change the number-generator
- *  returns an error-code if the number-generator was empty,
- *  and *iter will be NULL
- */
-KLIB_EXTERN rc_t CC num_gen_iterator_make( const struct num_gen * self, const struct num_gen_iter ** iter );
-
-
-/*--------------------------------------------------------------------------
- * num_gen_iterator_destroy
- *
- *  destroys the iterator
- */
-KLIB_EXTERN rc_t CC num_gen_iterator_destroy( const struct num_gen_iter * self );
-
-
-/*--------------------------------------------------------------------------
- * num_gen_iterator_count
- *
- *  returns how many values the iterator contains
- */
-KLIB_EXTERN rc_t CC num_gen_iterator_count( const struct num_gen_iter * self, uint64_t * count );
-
-
-/*--------------------------------------------------------------------------
- * num_gen_iterator_next
- *
- *  pulls the next value out of the iterator...
- *  returns an error-code if the iterator has no more values
- */
-KLIB_EXTERN bool CC num_gen_iterator_next( const struct num_gen_iter * self, int64_t * value, rc_t * rc );
-
-/*--------------------------------------------------------------------------
- * num_gen_iterator_min
- *
- *  pulls the lowest value out of the iterator...
- *  returns an error-code if the iterator has no more values
- */
-KLIB_EXTERN rc_t CC num_gen_iterator_min( const struct num_gen_iter * self, int64_t * value );
-
-
-/*--------------------------------------------------------------------------
- * num_gen_iterator_max
- *
- *  pulls the highest value out of the iterator...
- *  returns an error-code if the iterator has no more values
- */
-KLIB_EXTERN rc_t CC num_gen_iterator_max( const struct num_gen_iter * self, int64_t * value );
-
-
-/*--------------------------------------------------------------------------
- * num_gen_iterator_percent
- *
- *  return in value the percentage of the iterator...
- *  depending on fract-digits the percentage will be:
- *      fract_digits = 0 ... full percent's
- *      fract_digits = 1 ... 1/10-th of a percent
- *      fract_digits = 2 ... 1/100-th of a percent
- */
-KLIB_EXTERN rc_t CC num_gen_iterator_percent( const struct num_gen_iter * self, uint8_t fract_digits, uint32_t * value );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_num_gen_ */
diff --git a/interfaces/klib/out.h b/interfaces/klib/out.h
deleted file mode 100644
index 02aa06f..0000000
--- a/interfaces/klib/out.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_out_
-#define _h_klib_out_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_writer_
-#include <klib/writer.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* -----
- * Handlers for application and library writers.
- */
-
-KLIB_EXTERN KWrtHandler* CC KOutHandlerGet (void);
-
-/* Handler
- *  sets output handler for standard output
- *
- *  "logger" [ IN ] and "self" [ IN, OPAQUE ] - callback function
- *  to handle log output
- */
-KLIB_EXTERN rc_t CC KOutHandlerSet          (KWrtWriter writer, void * data);
-KLIB_EXTERN rc_t CC KOutHandlerSetStdOut    (void);
-KLIB_EXTERN rc_t CC KOutHandlerSetStdErr    (void);
-
-KLIB_EXTERN KWrtWriter CC KOutWriterGet (void);
-KLIB_EXTERN void * CC KOutDataGet (void);
-
-KLIB_EXTERN rc_t CC KOutInit (void);
-
-KLIB_EXTERN rc_t CC KOutMsg (const char * fmt, ...);
-
-#define KOutStr(str) KOutMsg("%s",str)
-
-/*
- * A usage could look like
- *
- * OUTMSG (kout_2, "Current Out Level is %d\n", OutLevelGet());
- *
- */
-#define OUTMSG(msg) \
-    ((KOutWriterGet() != NULL) ? KOutMsg msg : 0)
-
-#define OUTSTR(msg) \
-    ((KOutWriterGet() != NULL) ? KOutStr (msg) : 0)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_klib_out_ */
diff --git a/interfaces/klib/pack.h b/interfaces/klib/pack.h
deleted file mode 100644
index fc28ef7..0000000
--- a/interfaces/klib/pack.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_pack_
-#define _h_klib_pack_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * bit-packing operations
- *  packed bits have leading zeros eliminated
- *  unpacked bits have no more information, but may occupy more storage
- *
- *  packed bits are stored in big-endian byte order and big-bit-endian
- *  bit order. unpacked bits are in architecture native order.
- *
- *  little-endian architectures place the least significant information
- *  in the left-most addresses. Intel architecture still has bit ordering
- *  with LSB to the right. the only way to view byte and bit order as
- *  coherent in this architecture is in 2 dimensions, such that bit ordering
- *  within a byte is along one dimension and the bytes are another.
- *
- *  viewing a stream of bits is by definition uni-dimensional, and thus
- *  this code treats bit streams in big-bit-endian order, with the most
- *  significant bit of the most significant byte to the left, and each
- *  bit to the right has decreasing significance.
- *
- *  packed bits are left-aligned, such that an 8=>2 packing of the bytes
- *  [ 1, 2, 3 ] will yield a single byte of 0b01101100 ( 0x6C ).
- *
- *  a pack or unpack operation with identical bit sizes ( e.g. 16=>16 )
- *  will act like a memcpy on big-endian architectures and a byte-swap
- *  on little-endian architectures.
- */
-
-
-/* Pack
- *  accepts a series of unpacked source bits
- *  produces a series of packed destination bits by eliminating MSB
- *
- *  "unpacked" [ IN ] - original element size in bits
- *  must be in 2^^[3..6], i.e. { 8, 16, 32, 64 }
- *
- *  "packed" [ IN ] - packed element size in bits
- *  must be <= "unpacked"
- *
- *  "src" [ IN ] and "ssize" [ IN ] - source buffer
- *  with size given in bytes
- *
- *  "consumed" [ OUT, NULL OKAY ] - number of source bytes
- *  consumed. if NULL, then all source bytes MUST be consumed
- *  or an error will be generated.
- *
- *  "dst" [ OUT ] and "dst_off" [ IN ] - destination
- *  buffer bit address
- *
- *  "dsize" [ IN ] - size of "dst" in bits, not including "dst_off"
- *
- *  "psize" [ OUT ] - resultant packed size in bits
- *
- * NB - the implementation may allow packing in place
- */
-KLIB_EXTERN rc_t CC Pack ( uint32_t unpacked, uint32_t packed,
-    const void *src, size_t ssize, size_t *consumed,
-    void *dst, bitsz_t dst_off, bitsz_t dsize, bitsz_t *psize );
-
-
-/* Unpack
- *  accepts a series of packed source bits
- *  produces a series of unpacked destination bits by left-padding zeros
- *
- *  "packed" [ IN ] - packed element size in bits
- *
- *  "unpacked [ IN ] - original element size in bits
- *  must be >= "packed" and
- *  must be in 2^^[3..6], i.e. { 8, 16, 32, 64 }
- *
- *  "src" [ IN ] and "src_off" [ IN ] - source buffer
- *  bit address
- *
- *  "ssize" [ IN ] - number of bits in "src", not including "src_off"
- *
- *  "consumed" [ OUT, NULL OKAY ] - number of source bits
- *  consumed. if NULL, then all source bits MUST be consumed
- *  or an error will be generated.
- *
- *  "dst" [ OUT ] and "dsize" [ IN ] - destination buffer
- *  where size is given in bytes
- *
- *  "usize" [ OUT ] - resultant unpacked size in bytes
- *
- * NB - "src" and "dst" may have same address since
- *  the implementation unpacks from right to left, smaller to larger
- */
-KLIB_EXTERN rc_t CC Unpack ( uint32_t packed, uint32_t unpacked,
-    const void *src, bitsz_t src_off, bitsz_t ssize, bitsz_t *consumed,
-    void *dst, size_t dsize, size_t *usize );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_pack_ */
diff --git a/interfaces/klib/path-priv.h b/interfaces/klib/path-priv.h
deleted file mode 100644
index 23a4d43..0000000
--- a/interfaces/klib/path-priv.h
+++ /dev/null
@@ -1,266 +0,0 @@
-/*===========================================================================
-*
-*                            Public Domain Notice
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_path_priv_
-#define _h_klib_path_priv_
-
-#ifndef _h_vfs_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_vfs_path_
-#include <klib/path.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct String;
-
-
-#define NCBI_FILE_SCHEME       "ncbi-file"
-#define NCBI_ACCESSION_SCHEME  "ncbi-acc"
-#define HTTP_SCHEME            "http"
-#define FTP_SCHEME             "ftp"
-#define FASP_SCHEME            "fasp"
-#define NCBI_LEGREFSEQ_SCHEME  "x-ncbi-legrefseq"
-#define NCBI_OBJECT_SCHEME     "ncbi-obj"
-
-/* options for a VPath possibly obtained from a query string on an URI */
-typedef uint32_t KPOption_t;
-enum eKPOption_t
-{
-    kpopt_encrypted,
-    kpopt_pwpath,
-    kpopt_pwfd,
-    kpopt_readgroup,
-#if 0    
-    kpopt_temporary_pw_hack,
-#endif    
-    kpopt_vdb_ctx,
-    kpopt_gap_ticket, 
-    kpopt_count
-};
-
-
-/* =====
- * Much of what follows is expected to move into the interface klib/path.h
- * once it becomes supported.
- */
-
-/* MakeFmt
- *  make a path object from a format string plus arguments
- *
- *  "new_path" [ OUT ] - a reference to the new object.
- *
- *  "fmt" [ IN ] and "args" [ IN ] - arguments to string_printf
- *  ( see <klib/text.h> ) to build a NUL-terminated string
- *  that conforms with the rules for "posix_path"
- *
- * NB - SECURITY RISK IF USED DIRECTLY FROM EXTERNAL STRINGS.
- *      ALSO, FMT IS **NOT** PRINTF COMPATIBLE - see string_printf.
- */
-
-#if 0
-KLIB_EXTERN rc_t CC KPathMakeRelative ( KPath ** new_path, const KPath * base_path,
-                                       const char * relative_path );
-KLIB_EXTERN rc_t CC KPathMakeRelativeFmt ( KPath ** new_path, const KPath * base_path,
-                                          const char * fmt, ... );
-KLIB_EXTERN rc_t CC KPathVMakeRelativeFmt ( KPath ** new_path, const KPath * base_path,
-                                           const char * fmt, va_list args );
-KLIB_EXTERN rc_t CC KPathMakeCurrentPath ( KPath ** new_path );
-
-KLIB_EXTERN rc_t CC KPathMakeURI ( KPath ** new_path, const char * uri );
-#endif
-
-
-/* Option
- *  rc == 0 if the option has been specified
- *  for options with a parameter, the value of the parameter is copied to buffer
- */
-KLIB_EXTERN rc_t CC KPathOption ( const KPath * self, KPOption_t option,
-                                char * buffer, size_t buffer_size,
-                                size_t * num_read);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_vfs_path_priv_ */
-
-/*--------------------------------------------------------------------------
- *
- * The ABNF form described in RFC5234 will be used to define URLS and paths
- * with some handwaving instead of complete character definitions for case 
- * insensitivity.  CORE definitions from RFC5234 will be used again handwaving
- * case insensitivity.
- *
- * --------------------
- *
- * URL for a VPath
- *
- *  as per RFC 3986, an URI consists of:
- *
- *    URI           = scheme ":" heir-part [ "?" query ] [ "#" fragment ]
- *
- *  We will support however something intbetween an URI and an IRI in that we'll
- *  all UTF-8 rather than limit certain characters to ASCII.
- *
- *  For the NCBI path  URL:  The hier-part is intended to be compatible with the 
- *                    "file:" scheme  Authority on any of the Unix-like operating
- *                    systems must either be empty or "localhost".  For Windows
- *                    it must  be a host that can be used if the "file" url is
- *                    translated into a UNC style Windows path.  Also in a
- *                    Windows vfs: URL a single colon ':' will be allowed only at
- *                    the end of a single character rive letter for the first
- *                    sub-part of the path.
- *
- *    scheme        = "ncbi-file" ; ( case insensitive )
- *
- *    hier-part     = "//" authority path-abempty
- *                  / path-absolute
- *                  / path-relative
- *                  / path-empty
- *
- * by RFC 3986 authority is
- *    authority     = [ userinfo "@" ] host [ ":" port]
- * but at this point we only recognize
- *    authority     = host
- *
- * by RFC 3986 host is
- *    host          = IP-literal / IPv4address / reg-name
- * but at this point we only recognize
- *    host          = reg-name
- *
- *    reg-name      = *( unreserved / pct-encoded / sub-delims )
- *
- *    path          = path-abempty
- *                  / path-absolute
- *                  / path-noscheme
- *                  / path-rootless
- *                  / path-empty
- *
- *    path-abempty  = * ( "/" segment )
- *
- *    path-absolute = "/" segment-nz *( "/" segment )
- *
- *    path-noscheme = segment-nz-nc *( "/" segment )
- *
- *    path-rootless = segment-nz *( "/" segment )
- *
- *    path-empty    = ""
- *
- *    segment       = *pchar       ; can be empty
- *    segment-nz    = 1*pchar      ; can't be empty
- *    segment-nz-nc = 1*pchar-nz   ; can't be empty
- *
- *    pchar         = ":" / pchar-nc
- *
- *    pchar-nc      = unreserved / pct-encoded / sub-delims ? "@"
- *
- *    pct-encoded   = "%" HEXDIG HEXDIG ; hex digits are 0-9, a-f or A-F
- *
- *    authority   = "localhost" / host-name ; the host name is an O/S specific 
- *                                          ; name of a remote host 
- *
- *    query       = query_entry [ * ( "&" query_entry ) ]
- *
- *    query_entry = "encrypt" / "enc" / ( "pwfile=" hier-part ) / ( "pwfd=" fd )
- *
- *    fd          = 1* DIGIT
- *
- *    unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~" / UTF-8
- *
- *    reserved    = gen-delims / subdelims
- *
- *    gen-delims  = ":" / "/" / "?" / "#" / "[" / "]" / "@"
- *
- *    sub-delims  = "!" / "$" / "&" / "'" / "(" / ")" / "*"
- *                / "+" / "," / ";" / "="
- *
- * Handwaving on the UTF-8.  We'll accept it rather than requiring percent encoding
- * in most cases.
-
- * Examples:
- *         "ncbi-file://home/my-name/data-files"
- *         "ncbi-file://win-server/archive/secure/read12345?encrypted"
- *         "ncbi-file:///c:/scanned-data/0001/file.sra?enc?pwd-file=c:/Users/JamesMcCoy/ncbi.pwd"
- *
- *  We allow an implied scheme of "vfs" if none present.
- *  'host-name' is partially implemented for Windows.  Not currently for any the
- *  of the supported Unix systems.  We do not support IP addresses instead of 
- *  host names.
- *
- *  'path' can be either absolute or relative and must be posix style as per 
- *  RFC 3986 and matches the "file" scheme.
- *
- *  'fragment' is not yet implemented or defined.
- *
- *  'fd' is a system specific file handle.  Not yet supported on Windows.
- *
- * --------------------
- *
- * VFS posix_path representation:
- *
- * The internal representation of a path for VFS resembles very closely the
- * POSIX pathname crossed with the Windows UNC path.  Only the Unix "/" 
- * separator is allowed not the "\" for paths.
- *
- * posix-path     = full-path / relative-path
- *
- * full-path      = ["//" host] "/" [ directory-path "/" ] resource
- *
- * relative-path  = [ directory-path "/" ] resource
- *
- * directory-path = resource [ "/" directory-path ]
- *
- * resource       = string ; (UTF-8 O/S specific name for a directory or a file)
- *
- * host           = string ; (UTF-8 O/S specific name for the local or remote host)
- *
- * For a host "localhost" is a synonym for the current host.
- * The "//host" is not guaranteed to work for all systems except "//localhost"
- *
- * The resource "." is assumed to mean the local directory and will be stripped
- * when a path is made canonical.
- *
- * The resource ".." is assumed to mean the containing directory and when made 
- * canonical it will be left in at the begining for relative paths or removed along 
- * with the preceding resource name.
- *
- * For Windows the device is handled in a unique way with some potential for ambiguity.
- * The UNC approach for a named drive "C:" becomes "/c".  So "C:\" becomes "/c/".
- *
- * In the future the complex approach from the "file:" URL should be adopted 
- * with the ":" allowed only in the first directory name in a path.  RFC 3986 
- * notes though that this complex approach puts some five variants into the ABNF
- * to describe the path portion of an URL.
- */
diff --git a/interfaces/klib/path.h b/interfaces/klib/path.h
deleted file mode 100644
index eebcfb0..0000000
--- a/interfaces/klib/path.h
+++ /dev/null
@@ -1,252 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_path_
-#define _h_klib_path_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-    
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct String;
-
-
-/*--------------------------------------------------------------------------
- * KPath
- *  represents an unbound object query key
- *  may be created from a simple file-system path,
- *  a more formal URN or URL,
- *  or other modes of creation
- *
- *  a path will have these parts:
- *    scheme       : a scheme for retrieval
- *    auth         : login name for authentication
- *    host         : authoritative source
- *    port         : port for connecting with host
- *    path         : host-relative path
- *    query        : parameters for interpretation
- *    fragment     : internal component of object
- *    proj         : project id
- *    name         : alternate or primary name
- *
- *  file-system paths with no modifying parameters
- *  will be given standard "file" scheme. paths having
- *  parameters will be given the scheme "ncbi-file".
- *
- *  standard networking schemes ( "http", "ftp", etc. )
- *  are supported.
- *
- *  NCBI accessions are given the scheme "ncbi-acc".
- *
- *  NCBI remote object id paths receive scheme "ncbi-obj".
- */
-typedef struct KPath KPath;
-
-
-/* MakePath
- *  make a path object from a string conforming to
- *  either a standard POSIX path or a URI
- *
- *  "new_path" [ OUT ] - return parameter for new path object
- *
- *  "path_str" [ IN ] - a UTF-8 NUL-terminated string
- *  representing a POSIX path or URI, or
- *  a string_printf compatible format string
- *
- *  "path_fmt" [ IN ] and "args" [ IN ] - a UTF-8 NUL-terminated fmt string
- *  compatible with string_vprintf, plus argument list
- *
- *  Examples:
- *      "ncbi-file:/home/my-name/data-files"
- *      "ncbi-file://win-server/archive/secure/read12345?encrypted"
- *      "ncbi-file:///c/scanned-data/0001/file.sra?enc&pwfile=/c/Users/JamesMcCoy/ncbi.pwd"
-
-    KLIB_EXTERN rc_t CC MakePath_v1 ( KPath ** new_path, const char *path_str, ... );
-    KLIB_EXTERN rc_t CC VMakePath_v1 ( KPath ** new_path, const char *path_fmt, va_list args );
- */
-KLIB_EXTERN KPath * CC MakePath ( ctx_t ctx, const char *path_str, ... );
-KLIB_EXTERN KPath * CC VMakePath ( ctx_t ctx, const char *path_fmt, va_list args );
-
-/* MakeSysPath
- *  make a path object from an OS native filesystem path string
- *
- *  "new_path" [ OUT ] - return parameter for new path object
- *
- *  "sys_path" [ IN ] - a UTF-8 NUL-terminated string
- *  representing a native filesystem path
- *
- *  "wide_sys_path" [ IN ] - a wide NUL-terminated string
- *  representing a native filesystem path, where
- *  wchar_t is either USC-2 or UTF-32 depending upon libraries
-
-
-KLIB_EXTERN KPath * CC MakeSysPath ( ctx_t ctx, const char *sys_path );
-KLIB_EXTERN KPath * CC VMakeSysPath ( ctx_t ctx, const wchar_t * wide_sys_path );
- */
-
-/* MakeAccPath - TEMPORARY
- *  takes a textual accession representation
- *  creates a VPath representing an accession
- *
- *  "new_path" [ OUT ] - return parameter for new path object
- *
- *  "acc" [ IN ] - a NUL-terminated ASCII fmt string
-
-    LIB_EXPORT rc_t CC MakeAccPath_v1 ( KPath ** new_path, const char * acc, ... );
-    LIB_EXPORT rc_t CC VMakeAccPath_v1 ( KPath ** new_path, const char * fmt, va_list args );
- */
-
-KLIB_EXTERN KPath * CC MakeAccPath ( ctx_t ctx, const char * acc, ... );
-KLIB_EXTERN KPath * CC VMakeAccPath ( ctx_t ctx, const char * fmt, va_list args );
-
-/* MakeOidPath - TEMPORARY
- *  takes an integer oid
- *  creates a VPath representing an obj-id
- *
- *  "new_path" [ OUT ] - return parameter for new path object
- *
- *  "oid" [ IN ] - a non-zero object id
-
-    LIB_EXPORT rc_t CC MakeOidPath_v1 ( KPath ** new_path, uint32_t oid )
- */
-
-KLIB_EXTERN KPath * CC MakeOidPath ( ctx_t ctx, uint32_t oid );
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KLIB_EXTERN KPath * CC KPathDuplicate ( const KPath *self, ctx_t ctx );
-KLIB_EXTERN rc_t CC KPathRelease ( const KPath *self );
-
-
-/* IsFSCompatible
- *  asks if the path can be used with the OS' filesystems
- */
-KLIB_EXTERN bool CC KPathIsFSCompatible ( const KPath *self, ctx_t ctx );
-
-
-/* FromUri
- *  asks if the path was created from a formal URI
- */
-KLIB_EXTERN bool CC KPathFromUri ( const KPath *self, ctx_t ctx );
-
-/* Read*
- *  read the various parts
- *  copies out data into user-supplied buffer
- *
- *  "buffer" [ OUT ] and "buffer_size" [ IN ] - output buffer
- *  for data read. if sufficient space is available, the copy
- *  will be NUL-terminated.
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  for the number of valid bytes in "buffer" after a successful
- *  read. on failure due to insufficient buffer, contains the
- *  number of bytes required for transfer.
- */
-KLIB_EXTERN size_t CC KPathReadUri ( const KPath *self, ctx_t ctx,
-                                     char * buffer, size_t buffer_size );
-    KLIB_EXTERN size_t CC KPathReadScheme ( const KPath * self, ctx_t ctx,
-                                        char * buffer, size_t buffer_size );
-KLIB_EXTERN size_t CC KPathReadAuth ( const KPath *self, ctx_t ctx,
-                                      char * buffer, size_t buffer_size );
-KLIB_EXTERN size_t CC KPathReadHost ( const KPath *self, ctx_t ctx,
-                                      char * buffer, size_t buffer_size );
-KLIB_EXTERN size_t CC KPathReadPortName ( const KPath *self, ctx_t ctx,
-                                          char * buffer, size_t buffer_size );
-KLIB_EXTERN size_t CC KPathReadPath ( const KPath *self, ctx_t ctx,
-                                      char * buffer, size_t buffer_size );
-KLIB_EXTERN size_t CC KPathReadQuery ( const KPath *self, ctx_t ctx,
-                                       char * buffer, size_t buffer_size );
-KLIB_EXTERN size_t CC KPathReadParam ( const KPath *self, ctx_t ctx, 
-                                       const char * param, char * buffer, size_t buffer_size );
-KLIB_EXTERN size_t CC KPathReadFragment ( const KPath *self, ctx_t ctx,
-                                          char * buffer, size_t buffer_size );
-
-
-/* MakeUri
- *  convert a VPath into a URI
- */
-KLIB_EXTERN struct String const * CC KPathMakeUri ( const KPath *self, ctx_t ctx );
-
-
-
-/* MakeString
- *  convert a KPath into a String
- *  respects original source of path,
- *  i.e. does not add scheme unnecessarily
- */
-KLIB_EXTERN struct String const * CC KPathMakeString ( const KPath *self, ctx_t ctx );
-
-
-/* Get*
- *  retrieves internal parts
- *  returns pointers to internal String data
- *  Strings remain valid while "self" is valid
- */
-KLIB_EXTERN struct String *  CC KPathGetScheme ( const KPath *self, ctx_t ctx, struct String * str );
-KLIB_EXTERN struct String *  CC KPathGetAuth ( const KPath *self, ctx_t ctx, struct String * str );
-KLIB_EXTERN struct String *  CC KPathGetHost ( const KPath *self, ctx_t ctx, struct String * str );
-KLIB_EXTERN struct String *  CC KPathGetPortName ( const KPath *self, ctx_t ctx, struct String * str );
-KLIB_EXTERN uint16_t CC KPathGetPortNum ( const KPath *self, ctx_t ctx );
-KLIB_EXTERN struct String *  CC KPathGetPath ( const KPath *self, ctx_t ctx, struct String * str );
-KLIB_EXTERN struct String *  CC KPathGetQuery ( const KPath *self, ctx_t ctx, struct String * str );
-KLIB_EXTERN struct String *  CC KPathGetParam ( const KPath *self, ctx_t ctx, const char * param, struct String * str );
-KLIB_EXTERN struct String *  CC KPathGetFragment ( const KPath *self, ctx_t ctx, struct String * str );
-/* TEMPORARY */
-KLIB_EXTERN uint32_t CC KPathGetOid ( const KPath *self, ctx_t ctx );
-
-/* legacy support */
-/*
-#define KPathMake LegacyKPathMake
-KLIB_EXTERN rc_t KPathMake ( KPath ** new_path, const char * posix_path );
-#define KPathMakeFmt LegacyKPathMakeFmt
-rc_t KPathMakeFmt ( KPath ** new_path, const char * fmt, ... );
-#define KPathMakeVFmt LegacyKPathMakeVFmt
-rc_t KPathMakeVFmt ( KPath ** new_path, const char * fmt, va_list args );
-#define KPathMakeSysPath LegacyKPathMakeSysPath
-KLIB_EXTERN rc_t KPathMakeSysPath ( KPath ** new_path, const char * sys_path );
-*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_vfs_path_ */
diff --git a/interfaces/klib/pbstree.h b/interfaces/klib/pbstree.h
deleted file mode 100644
index 3d69bbb..0000000
--- a/interfaces/klib/pbstree.h
+++ /dev/null
@@ -1,287 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_pbstree_
-#define _h_klib_pbstree_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct BSTree;
-
-
-/*--------------------------------------------------------------------------
- * PBSTNode
- *  identifies a node within persisted binary search tree
- *
- *  a BSTree will contain BSTNodes, which themselves are intrusive but
- *  irrelevant internal tree links plus an externally defined data
- *  structure, having both key and value, and supporting multiple
- *  keys per node. the internal links permit navigation from node
- *  to node that is not possible with the PBSTNode.
- *
- *  a PBSTree does not contain structured nodes, but stores linkage
- *  and ordering information separately from the externally defined
- *  data, and rather than using pointers, assigns integer ids to the
- *  nodes themselves. navigation by pointers would require allocations,
- *  which are unnecessary and expensive when traversing a read-only
- *  persisted image. navigation is therefore intrusive on an externally
- *  allocated node structure.
- */
-typedef struct PBSTNode PBSTNode;
-struct PBSTNode
-{
-    struct
-    {
-        const void *addr;
-        size_t size;
-
-    } data;
-
-    const void *internal;
-    uint32_t id;
-};
-
-/* PBSTNodeNext
- *  updates the structure
- *  returns next 1-based node id or 0 for NULL
- */
-KLIB_EXTERN uint32_t CC PBSTNodeNext ( PBSTNode *self );
-
-/* PBSTNodePrev
- *  updates the structure
- *  returns prev 1-based node id or 0 for NULL
- */
-KLIB_EXTERN uint32_t CC PBSTNodePrev ( PBSTNode *self );
-
-/* PBSTNodeFindNext
- *  find next element satisfying criteria
- *  fills out "n" if found
- *  returns 1-based node id or 0 for NULL
- */
-KLIB_EXTERN uint32_t CC PBSTNodeFindNext ( PBSTNode *self,
-     bool ( CC * f ) ( const PBSTNode *n ) );
-
-/* PBSTNodeFindPrev
- *  find previous element satisfying criteria
- *  fills out "n" if found
- *  returns 1-based node id or 0 for NULL
- */
-KLIB_EXTERN uint32_t CC PBSTNodeFindPrev ( PBSTNode *self,
-    bool ( CC * f ) ( const PBSTNode *n ) );
-
-
-/*--------------------------------------------------------------------------
- * PBSTree
- *  a flattened binary search tree
- *
- *  mimics read-only behavior of a BSTree
- */
-typedef struct PBSTree PBSTree;
-
-/* PBSTreeMake
- *  make a PBSTree structure
- *
- *  "mem" [ IN ] - constant memory image of persisted tree
- *  with a lifetime exceeding that of the PBSTree itself
- *
- *  "byteswap" [ IN ] - if true, the persisted image needs
- *  to be read with byteswapping
- */
-KLIB_EXTERN rc_t CC PBSTreeMake ( PBSTree **pt, const void *addr, size_t size, bool byteswap );
-
-/* PBSTreeCount
- *  returns number of elements in tree
- *  not included within the BSTree interface itself, but
- *  was included here due to the fact that it is constant
- *
- *  return value:
- *    integer value >= 0
- */
-KLIB_EXTERN uint32_t CC PBSTreeCount ( const PBSTree *self );
-
-/* PBSTreeDepth
- *  returns number of layers in tree
- *
- *  return value:
- *    integer value >= 0
- */
-KLIB_EXTERN uint32_t CC PBSTreeDepth ( const PBSTree *self );
-
-/* PBSTreeSize
- *  returns the size in bytes
- *  of the PBSTree image
- */
-KLIB_EXTERN size_t CC PBSTreeSize ( const PBSTree *self );
-
-/* PBSTreeGetNode
- *  gets a PBSTNode from an id
- *
- *  "node" [ OUT ] - return parameter for node
- *
- *  "id" [ IN ] - a 1-based integer node id
- *
- *  return values:
- *    EINVAL => an invalid parameter was passed
- *    ENOENT => id out of range
- */
-KLIB_EXTERN rc_t CC PBSTreeGetNode ( const PBSTree *self, PBSTNode *node, uint32_t id );
-
-/* PBSTreeFind
- *  find an object within tree
- *
- *  "rtn" [ OUT ] - return parameter for node if found. its value
- *  is undefined unless the function returns success.
- *
- *  "item" [ IN ] - item to be matched against a node. will be
- *  supplied as the first parameter to the comparison function.
- *
- *  "cmp" [ IN ] - function that evaluates "item" against each internal
- *  node for relative position, returning 0 for match, negative when
- *  "item" is to left of node, and positive otherwise.
- *
- *  return value:
- *    0    => not found
- *    1..n => internal id of node, also recorded within "rtn"
- */
-KLIB_EXTERN uint32_t CC PBSTreeFind ( const PBSTree *self, PBSTNode *rtn,
-    const void *item, int ( CC * cmp ) ( const void *item, const PBSTNode *n , void * data), void * data );
-
-/* PBSTreeForEach
- *  executes a function on each tree element
- *
- *  "reverse" [ IN ] - if true, traverse from last to first element,
- *  if false, traverse in the normal forward direction.
- *
- *  "f" [ IN ] and "data" [ IN ] - callback function for evaluating each
- *  node within the tree. the passed out node structure is itself fully
- *  modifiable.
- */
-KLIB_EXTERN void CC PBSTreeForEach ( const PBSTree *self, bool reverse,
-    void ( CC * f ) ( PBSTNode *n, void *data ), void *data );
-
-/* PBSTreeDoUntil
- *  executes a function on each element
- *  until the function returns true
- *
- *  "reverse" [ IN ] - if true, traverse from last to first element,
- *  if false, traverse in the normal forward direction.
- *
- *  "f" [ IN ] and "data" [ IN ] - callback function for evaluating each
- *  node within the tree. the passed out node structure is itself fully
- *  modifiable. the function returns "true" to halt iteration.
- *
- *  return values:
- *    the last value returned by "f" or false if never invoked
- */
-KLIB_EXTERN bool CC PBSTreeDoUntil ( const PBSTree *self, bool reverse,
-    bool ( CC * f ) ( PBSTNode *n, void *data ), void *data );
-
-/* PBSTreeWhack
- *  whacks PBSTree object
- *  the constant memory image used to create the PBSTree may now be released
- */
-KLIB_EXTERN void CC PBSTreeWhack ( PBSTree *self );
-
-
-
-/*--------------------------------------------------------------------------
- * persistence functions
- */
-
-/* PTWriteFunc
- *  a generic streaming function
- */
-typedef rc_t ( CC * PTWriteFunc )
-    ( void *param, const void *buffer, size_t bytes, size_t *num_writ );
-
-/* PTAuxFunc
- *  a function to measure or write auxiliary node data
- *  where "node" is a BSTNode or TTNode.
- *
- *  when "write" is NULL, the number of bytes that would
- *  be written is returned in "num_writ".
- */
-typedef rc_t ( CC * PTAuxFunc )
-    ( void *param, const void *node, size_t *num_writ,
-      PTWriteFunc write, void *write_param );
-
-
-/*--------------------------------------------------------------------------
- * BSTree
- */
-
-/* BSTreePersist
- *  write a binary search tree to some storage location
- *
- *  the tree is persisted by making between one and three passes
- *  over its nodes, see description of "write" parameter.
- *
- *  the first pass examines internal tree structure and invokes
- *  a user-supplied function to determine overall size.
- *
- *  the second pass persists the internal structure in a packed
- *  format, using the user-supplied generic "write" function.
- *
- *  the third pass invokes another user-supplied function to write
- *  auxiliary node data to output.
- *
- *  "num_writ" [ OUT, NULL OKAY ] -  returns parameter for the number
- *  of bytes written as a result of persisting the tree. this will
- *  be the actual bytes written regardless of return status.
- *
- *  "write" [ IN, NULL OKAY ]  and "write_param" [ IN ] -  a generic
- *  output streaming function used for all operations. if NULL, then
- *  the function will exit after its first pass with the number of
- *  bytes required in "num_writ".
- *
- *  "aux" [ IN ] and "aux_param" [ IN ] - a specialized function for
- *  streaming auxiliary node data to output using the supplied "write"
- *  function. it is invoked during the first pass with a NULL write
- *  function for gathering size data, and during the third pass with
- *  a non-NULL write function.
- */
-KLIB_EXTERN rc_t CC BSTreePersist ( struct BSTree const *self, size_t *num_writ,
-    PTWriteFunc write, void *write_param, PTAuxFunc aux, void *aux_param );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_pbstree_ */
diff --git a/interfaces/klib/printf.h b/interfaces/klib/printf.h
deleted file mode 100644
index e56ed15..0000000
--- a/interfaces/klib/printf.h
+++ /dev/null
@@ -1,406 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_printf_
-#define _h_klib_printf_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct String;
-struct KSymbol;
-struct KDataBuffer;
-struct KWrtHandler;
-
-
-/*--------------------------------------------------------------------------
- * FORMAT
- *  a description of the string_printf formatting
- */
-
-#define SUPPORT_PERCENT_N 1
-
-
-/*
-  The standard C library formatting approach was taken as a basis.
-
-  This interface differs in some ways, in that it presents a sub-set of
-  the std. C format convention, and then extends it for klib.
-
-  The general substitution parameter format is:
-
-    '%' [ <flags> ] [ <field-width> ] [ '.' <precision> ] [ ':' <index> ] \
-        [ <storage-class-width> ] <storage-class>
-
-  where:
-
-    flags
-        = ' '           : prepend space to a numeral if it does not have a sign
-        | '+'           : always produce a sign on numeric conversion
-        | '-'           : left-align parameter within field
-        | '0'           : left-pad with zeros rather than spaces
-        | '#'           : use "alternate" representation
-        | ','           : produce comma-separated triples
-        | '\''          :  "      "
-        ;
-
-    field-width *(1)
-        = DECIMAL       : an unsigned base-10 numeral
-        | '*'           : take field width from args as type 'uint32_t'
-        ;
-
-    precision *(1)(2)(3)
-        = DECIMAL       : an unsigned base-10 numeral
-        | '*'           : take precision from args as type 'uint32_t'
-        |               : an empty precision means 0
-        ;
-
-    index
-        = idx           : a single, zero-based vector element
-        | idx '-' idx   : a fully-closed, zero-based interval
-        | idx '/' len   : a start index plus length
-        ;
-
-    idx
-        = DECIMAL       : an unsigned base-10 numeral
-        | '*'           : take index from args as type 'uint32_t'
-        | '$'           : last vector element
-        |               : an empty index means 0 or $
-        ;
-
-    len
-        = DECIMAL       : a base-10 numeral
-        | '*'           : take length from args as type 'uint32_t'
-        | '$'           : length-of ( vector )
-        |               : an empty length means $
-        ;
-
-    storage-class-width
-        = 't'           : tiny integer ( i.e. byte )
-        | 'h'           : half the normal size
-        | 'l'           : twice the normal size
-        | 'z'           : sizeof size_t
-        | time-modifier
-        ;
-
-    time-modifier
-        = 'h'           : date only
-        | 'l'           : date and time
-        | 'z'           : date, time and zone
-        ;
-
-    scalar storage-class
-        = 'd' | 'i'     : decimal signed integer
-        | 'u'           : decimal unsigned integer
-        | 'x'           : lower-case hex integer
-        | 'X'           : upper-case hex integer
-        | 'o'           : octal integer
-        | 'b'           : binary integer
-        | 'p'           : hex void*
-        | 'f'           : double
-        | 'e'           : scientific notation double
-        | 'g'           : general double
-        | 'c'           : UTF-32 character
-        | 'N'           : const KSymbol* [ <klib/symbol.h> ]
-        | 'V' *(2)      : tri-part version [ ver_t ]
-        | 'R'           : return code [ rc_t ]
-        | 'T'           : const KTime*  [ <klib/time.h> ]
-        | '!'           ; operating specific error code ( i.e. errno or GetLastError() )
-        | 'n' *(5)      ; output of number of characters printed so far to uint32_t*
-        ;
-
-    single-index vector storage-class *(6)(7)
-        = 'd' | 'i'     : as above
-        | 'u' | 'x'     : index range is ignored
-        | 'X' | 'o'     : start index is used
-        | 'b' | 'p'     : to select element
-        | 'f' | 'e' | 'g'
-        | 'N'           : const KSymbol* [ <klib/symbol.h> ]
-        | 'V' *(2)      : tri-part version [ ver_t ]
-        | 'R'           : return code [ rc_t ]
-        | 'T'           : const KTime*  [ <klib/time.h> ]
-        ;
-
-    index-range vector storage-class *(8)
-        = 'c' *(9)      : unbounded character vector
-        | 's' | 'S'     : bounded character vector
-        ;
-
-  Notes:
-     1. field-width and precision measure characters, not bytes
-     2. for version numbers, precision gives the number of fields,
-        where 1 = major, 2 = major.minor and 3 = major.minor.release.
-     3. in the absence of precision, versions are written with the
-        minimum number of fields required.
-     4. the storage-class-width is interpreted differently for storage-class
-        'T' ( const KTime* )
-     5. %n may not be supported for security purposes
-     6. when an index is specified, the argument is taken as an
-        unbounded vector. if an index range is given, only the
-        starting index is used, and only a single element is selected.
-     7. the vector reference class is determined by both the format
-        and the size modifier.
-     8. an index for character classes may specify a string as the
-        selection. when missing, the default start index is 0 while
-        the default end index is $.
-     9. a character vector is NOT assumed to be NUL-terminated,
-        and in this case the default end index is the start index.
-
- */
-
-
-/* string_printf
- *  provides a facility similar to snprintf
- *  formatting is similar but differs somewhat [ see FORMAT at bottom ]
- *
- *  "dst" [ OUT ] and "bsize" [ IN ] - output buffer for string
- *  will be NUL-terminated if possible
- *
- *  "num_writ" [ OUT, NULL OKAY ] - returns the number of non-NUL bytes
- *  written to "dst" or the required "bsize" to complete successfully,
- *  not including the NUL termination.
- *
- *  "fmt" [ IN ] and "args" [ IN, OPTIONAL ] - data to write
- *
- *  returns 0 if all bytes were successfully written and a NUL-byte was
- *  written into the buffer.
- *
- *  returns rcBuffer, rcInsufficient if the buffer was too small. in this
- *  case, it is possible that the only missing byte would be the NUL
- *  termination, and the output string may still be usable since "num_writ"
- *  indicates the actual number of text bytes.
- */
-KLIB_EXTERN rc_t CC string_printf ( char *dst, size_t bsize,
-    size_t *num_writ, const char *fmt, ... );
-KLIB_EXTERN rc_t CC string_vprintf ( char *dst, size_t bsize,
-    size_t *num_writ, const char *fmt, va_list args );
-
-
-/* KDataBufferPrintf
- *  provides a facility similar to string_printf
- *  except that it appends into a KDataBuffer
- *
- *  "buf" [ IN ] - previously initialized buffer
- *  MUST be initialized, or results are unpredictable
- *  ( except for the prediction that all will fail )
- */
-KLIB_EXTERN rc_t CC KDataBufferPrintf ( struct KDataBuffer * buf,
-    const char * fmt, ... );
-KLIB_EXTERN rc_t CC KDataBufferVPrintf ( struct KDataBuffer * buf,
-    const char * fmt, va_list args );
-
-
-/*--------------------------------------------------------------------------
- * structured_printf
- *  the engine behind string_printf
- */
-
-/* formatting
- */
-enum
-{
-    spfNone,                                    /* 'n', sptTerm                       */
-    spfText,                                    /* 'csS', literal                     */
-    spfSignedInt,                               /* 'di'                               */
-    spfUnsigned,                                /* 'bouxX'                            */
-    spfStdFloat,                                /* 'f'                                */
-    spfGenFloat,                                /* 'g'                                */
-    spfSciFloat,                                /* 'e'                                */
-    spfVersion,                                 /* 'V'                                */
-    spfSymbol,                                  /* 'N'                                */
-    spfTime,                                    /* [ 'hlz' + ] 'T'                    */
-    spfRC,                                      /* 'R'                                */
-    spfOSErr                                    /* '!'                                */
-};
-
-/* types
- */
-enum
-{
-    sptTerm,                                    /* terminates format                  */
-    sptLiteral,                                 /* char literal        - arg in fmt   */
-    sptSignedInt,                               /* signed scalar int   - arg is d     */
-    sptSignedInt8Vect,                          /* signed vector int   - arg is d8    */
-    sptSignedInt16Vect,                         /* signed vector int   - arg is d16   */
-    sptSignedInt32Vect,                         /* signed vector int   - arg is d32   */
-    sptSignedInt64Vect,                         /* signed vector int   - arg is d64   */
-    sptUnsignedInt,                             /* unsigned scalar int - arg is u     */
-    sptUnsignedInt8Vect,                        /* unsigned vector int - arg is u8    */
-    sptUnsignedInt16Vect,                       /* unsigned vector int - arg is u16   */
-    sptUnsignedInt32Vect,                       /* unsigned vector int - arg is u32   */
-    sptUnsignedInt64Vect,                       /* unsigned vector int - arg is u64   */
-    sptFloat,                                   /* scalar float        - arg is f     */
-    sptFloat32Vect,                             /* vector float        - arg is f32   */
-    sptFloat64Vect,                             /* vector float        - arg is f64   */
-    sptFloatLongVect,                           /* vector float        - arg is flong */
-    sptChar,                                    /* scalar character    - arg is c     */
-    sptNulTermString,                           /* vector character    - arg is s     */
-    sptString,                                  /* vector character    - arg is S     */
-    sptUCS2String,                              /* vector character    - arg is S     */
-    sptUTF32String,                             /* vector character    - arg is S     */
-    sptPointer,                                 /* object reference    - arg is p     */
-    sptRowId,                                   /* current row id      - arg is d     */
-    sptRowLen                                   /* current row length  - arg is u     */
-#if SUPPORT_PERCENT_N
-    , sptBytesPrinted                           /* output parameter    - arg is n     */
-#endif
-};
-
-
-/* format
- *  structured and constant format information
- *  takes the place of format string
- *  flags indicate whether fields are active
- *  and in some cases whether the value is external, in the next arg
- */
-typedef struct PrintFmt PrintFmt;
-struct PrintFmt
-{
-    union
-    {
-        struct
-        {
-            uint64_t min_field_width;           /* minimum field width in characters  */
-            uint64_t precision;                 /* precision in characters            */
-            uint64_t start_idx;                 /* zero-based starting vector index   */
-            uint64_t select_len;                /* length of selection or 0 for inf   */
-        } f;
-        struct
-        {
-            const char *text;                   /* string literal text pointer        */
-            size_t size;                        /* string literal text size           */
-        } l;
-    } u;
-    unsigned int upper_case_num       : 1;      /* upper-case numerals                */
-    unsigned int reverse_alnum        : 1;      /* reverse ordering of alpha-numeric  */
-    unsigned int thousands_separate   : 1;      /* separate numerals by thousands     */
-    unsigned int ext_field_width      : 1;      /* field width is external argument   */
-    unsigned int ext_precision        : 1;      /* precision is external argument     */
-    unsigned int inf_start_index      : 1;      /* start index is last in vector      */
-    unsigned int ext_start_index      : 1;      /* start index is external argument   */
-    unsigned int inf_stop_index       : 1;      /* stop index is last in vector       */
-    unsigned int ext_stop_index       : 1;      /* stop index is an external argument */
-    unsigned int ext_select_len       : 1;      /* selection length is external       */
-    unsigned int add_prefix           : 1;      /* '#' flag on 'boxX'                 */
-    unsigned int force_decimal_point  : 1;      /* '#' flag on 'efg'                  */
-    unsigned int leave_trailing_zeros : 1;      /* '#' flag on 'g'                    */
-    unsigned int print_time           : 1;
-    unsigned int print_date           : 1;
-    unsigned int print_weekday        : 1;
-    unsigned int print_timezone       : 1;
-    unsigned int hour_24              : 1;
-    unsigned int min_vers_components  : 1;
-    unsigned int explain_rc           : 1;
-    unsigned int type_cast            : 1;      /* if true, convert type for fmt      */
-    unsigned int pointer_arg          : 1;      /* argument is a pointer              */
-    uint32_t radix;                             /* 0 default, 2, 8, 10, 16, .. 36     */
-    uint8_t fmt;                                /* spf... from above                  */
-    uint8_t type;                               /* spt... from above                  */
-    char sign;                                  /* 0, ' ' or '+'                      */
-    char left_fill;                             /* 0 for left-align, ' ' or '0'       */
-};
-
-
-/* argument
- *  union of argument values
- *  passed as an array, much like va_arg
- */
-typedef union PrintArg PrintArg;
-union PrintArg
-{
-    int64_t d;                                  /* signed integer scalar              */
-    const int8_t *d8;                           /* signed integer vectors             */
-    const int16_t *d16;
-    const int32_t *d32;
-    const int64_t *d64;
-
-    uint64_t u;                                 /* unsigned integer scalar            */
-    const uint8_t *u8;                          /* unsigned integer vectors           */
-    const uint16_t *u16;
-    const uint32_t *u32;
-    const uint64_t *u64;
-
-    double f;                                   /* floating point scalar              */
-    const float *f32;                           /* floating point vectors             */
-    const double *f64;
-    const long double *flong;
-
-    uint32_t c;                                 /* character scalar                   */
-    const char *s;                              /* NUL-terminated char vector         */
-    struct String const *S;                     /* character vector                   */
-
-    const void *p;                              /* object reference                   */
-
-#if SUPPORT_PERCENT_N
-    uint32_t *n;                                /* output parameter                   */
-#endif
-};
-
-
-/* structured_printf
- *  uses constant format descriptors and argument block
- *  prints to "out" handler
- */
-KLIB_EXTERN rc_t CC structured_printf ( struct KWrtHandler const *out,
-    size_t *num_writ, const PrintFmt *fmt, const PrintArg *args );
-
-
-/* structured_sprintf
- *  uses constant format descriptors and argument block
- *  prints to UTF-8 character buffer "dst"
- */
-KLIB_EXTERN rc_t CC structured_sprintf ( char *dst, size_t bsize,
-    size_t *num_writ, const PrintFmt *fmt, const PrintArg *args );
-
-
-/* TEMPORARY */
-KLIB_EXTERN rc_t CC new_string_printf ( char *dst, size_t bsize,
-    size_t *num_writ, const char *fmt, ... );
-KLIB_EXTERN rc_t CC new_string_vprintf ( char *dst, size_t bsize,
-    size_t *num_writ, const char *fmt, va_list args );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_printf_ */
diff --git a/interfaces/klib/progressbar.h b/interfaces/klib/progressbar.h
deleted file mode 100644
index 8c0bffa..0000000
--- a/interfaces/klib/progressbar.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_progressbar_
-#define _h_progressbar_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_rc_
-#include <klib/rc.h>
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct progressbar;
-
-/*--------------------------------------------------------------------------
- * make_progressbar
- *
- *  creates a progressbar with zero-values inside
- *  does not output anything
- *  digits: 0  ... update_progressbar( pb, 7 ) 		---> 7%
- *          1  ... update_progressbar( pb, 71 )		---> 7.1%
- *          2  ... update_progressbar( pb, 715 )	---> 7.15%
- *  digits > 2 are internally stored as 2
- */
-KLIB_EXTERN rc_t CC make_progressbar( struct progressbar ** pb, const uint8_t digits );
-
-
-/*--------------------------------------------------------------------------
- * destroy_progressbar
- *
- *  destroy's the progressbar
- *  does not output anything
- */
-KLIB_EXTERN rc_t CC destroy_progressbar( struct progressbar * pb );
-
-
-/*--------------------------------------------------------------------------
- * update_progressbar
- *
- *  sets the progressbar to a specific percentage
- *  outputs only if the percentage has changed from the last call
- *  the meaning of the percent-value depends of the given didits value to make_progressbar()
- *		digits = 0		percent in full percent				 7 ---> 7%
- *      digits = 1		precent in 1/10-th of a percent 	71 ---> 7,1%
- *      digits = 2		precent in 1/100-th of a percent   715 ---> 7,15%
- *  expects the percents in increasing order ( does not jump back )
- *  writes a growing bar made from '-'-chars with the value at the end
- */
-KLIB_EXTERN rc_t CC update_progressbar( struct progressbar * pb, const uint32_t percent );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_progressbar_ */
diff --git a/interfaces/klib/ptrie.h b/interfaces/klib/ptrie.h
deleted file mode 100644
index d19e29f..0000000
--- a/interfaces/klib/ptrie.h
+++ /dev/null
@@ -1,296 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_ptrie_
-#define _h_klib_ptrie_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_pbstree_
-#include <klib/pbstree.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct Trie;
-struct String;
-
-
-/*--------------------------------------------------------------------------
- * PTNode
- *  a node within text tree
- *
- *  a Trie will contain TNodes, which themselves are intrusive but
- *  irrelevant internal tree links plus a key string plus an externally
- *  defined data structure, representing a value, and supporting multiple
- *  nodes per key. the internal links permit navigation from node
- *  to node that is not possible with the PTNode. furthermore, they
- *  provide direct access to the key string that is not normally stored
- *  verbatim within a persisted image.
- *
- *  a PTrie does not contain structured nodes, but stores linkage
- *  and ordering information separately from the externally defined
- *  data, and rather than using pointers, assigns integer ids to the
- *  nodes themselves. navigation by pointers would require allocations,
- *  which are unnecessary and expensive when traversing a read-only
- *  persisted image. navigation is therefore intrusive on an externally
- *  allocated node structure.
- */
-typedef struct PTNode PTNode;
-struct PTNode
-{
-    /* minimally value data
-       may also contain key string information,
-       either by reference or literal text */
-    struct
-    {
-        const void *addr;
-        size_t size;
-
-    } data;
-
-    /* used internally */
-    const void *internal;
-    uint32_t id;
-};
-
-/* MakeKey
- *  tries to make a key string from node
- *  will fail if key text was not embedded into image when created
- *
- *  "key" [ OUT ] - return parameter for a key string allocation
- *  that must be whacked with StringWhack when no longer needed.
- */
-KLIB_EXTERN rc_t CC PTNodeMakeKey ( const PTNode *self, struct String const **key );
-
-
-/*--------------------------------------------------------------------------
- * PTrie
- *  a persisted tree of text nodes
- *
- *  this is a collection of { key, value } pairs, where a many-value
- *  to one key paradigm is naturally supported, as in the b-tree.
- *
- *  the desired retrieval operations are:
- *   a) key -> id : value
- *   b) key -> { id : value, ... }
- *   c) RE -> id : value
- *   d) RE -> { id : value, ... }
- *   e) iteration across { id : value, ... }
- *   f) id : value -> key
- *
- *  the reverse retrieval operation is:
- *   a) id -> value
- *
- *  indexing of the id is performed externally, and should not be interpreted
- *  as a serial, integer value. it may be a byte offset or a combination of
- *  two integer values, as well as anything else.
- */
-typedef struct PTrie PTrie;
-
-/* Make
- *  make a persisted tree structure
- * MakeOrig - DEPRECATED
- *  includes code to handle original composite node encoding
- *
- *  "addr" [ IN ] and "size" [ IN ] - constant memory image of
- *  persisted text tree with a lifetime exceeding that of the
- *  PTrie itself
- *
- *  "byteswap" [ IN ] - true if persisted image must be byteswapped
- */
-KLIB_EXTERN rc_t CC PTrieMake ( PTrie **tt,
-    const void *addr, size_t size, bool byteswap );
-KLIB_EXTERN rc_t CC PTrieMakeOrig ( PTrie **tt,
-    const void *addr, size_t size, bool byteswap );
-
-/* Count
- *  returns number of { id : value } pairs in text tree
- *  not included within the Trie interface itself, but
- *  was included here due to the fact that it is constant
- *
- *  return value:
- *    integer value >= 0
- */
-KLIB_EXTERN uint32_t CC PTrieCount ( const PTrie *self );
-
-/* Size
- *  returns the size in bytes
- *  of the PTrie image
- */
-KLIB_EXTERN size_t CC PTrieSize ( const PTrie *self );
-
-/* GetNode
- *  gets a PTNode from an id
- *
- *  "node" [ OUT ] - return parameter for node
- *
- *  "id" [ IN ] - a 1-based integer node id
- *
- *  return values:
- *    EINVAL => an invalid parameter was passed
- *    ENOENT => id out of range
- */
-KLIB_EXTERN rc_t CC PTrieGetNode ( const PTrie *self, PTNode *node, uint32_t id );
-
-/* Find
- * PTrieFindRE
- *  find a single { id, value } pair  within tree
- *
- *  "key" [ IN ] - an exact match text string
- *
- *  "re" [ IN ] - a regular expression string
- *
- *  "rtn" [ OUT ] - return parameter for node if found.
- *  its value is undefined unless the function returns success.
- *
- *  "custom_cmp" [ IN, NULL OKAY ] and "data" [ OPAQUE ] - optional
- *  comparison function
- *
- *  return value:
- *    0    => not found
- *    1..n => id of found pair
- */
-KLIB_EXTERN uint32_t CC PTrieFind ( const PTrie *self, struct String const *key, PTNode *rtn,
-    int ( CC * custom_cmp ) ( const void *item, const PBSTNode *n ,void *data), void * data );
-
-#if 0
-KLIB_EXTERN uint32_t CC PTrieFindRE ( const PTrie *self, struct String const *re, PTNode *rtn );
-#endif
-
-/* FindAll
- * PTrieFindAllRE
- *  find multiple objects within tree
- *
- *  "key" [ IN ] - an exact match text string
- *
- *  "re" [ IN ] - a regular expression string
- *
- *  "buffer" [ OUT ] and "capacity" [ IN ] - a user-supplied
- *  array of PTNode with a capacity of "capacity" elements.
- *  if successful, the entire found set will be returned unordered within.
- *
- *  "num_found" [ OUT ] - indicates the size of the found set,
- *  regardless of return value, such that if the supplied
- *  buffer were to be too small, the required size is returned.
- *
- *  "custom_cmp" [ IN, NULL OKAY ] and "data" [ OPAQUE ] - optional
- *  comparison function
- *
- *  returns status codes:
- *    EINVAL  => an invalid parameter
- *    ENOENT  => the found set was empty
- *    ENOBUFS => the found set was too large
- */
-#if 0
-KLIB_EXTERN rc_t CC PTrieFindAll ( const PTrie *self, struct String const *key,
-    PTNode buffer [], uint32_t capacity, uint32_t *num_found,
-    int ( CC * custom_cmp ) ( const void *item, const PBSTNode *n, void *data ), void *data );
-KLIB_EXTERN rc_t CC PTrieFindAllRE ( const PTrie *self, struct String const *re,
-    PTNode buffer [], uint32_t capacity, uint32_t *num_found );
-#endif
-
-/* ForEach
- *  executes a function on each tree element
- *
- *  "f" [ IN ] and "data" [ IN ] - iteration callback function for
- *  examining each TNode in the tree
- */
-KLIB_EXTERN void CC PTrieForEach ( const PTrie *self,
-    void ( CC * f ) ( PTNode *n, void *data ), void *data );
-
-/* DoUntil
- *  executes a function on each tree element
- *  until the function returns true
- *
- *  "f" [ IN ] and "data" [ IN ] - iteration callback function for
- *  examining each TNode in the tree. the function returns "true"
- *  to halt iteration.
- *
- *  return values:
- *    the last value returned by "f" or false if never invoked
- */
-KLIB_EXTERN bool CC PTrieDoUntil ( const PTrie *self,
-    bool ( CC * f ) ( PTNode *n, void *data ), void *data );
-
-/* Whack
- *  tears down internal structure
- */
-KLIB_EXTERN void CC PTrieWhack ( PTrie *self );
-
-
-/*--------------------------------------------------------------------------
- * Trie
- */
-
-/* Persist
- *  much like BSTreePersist but operates on a Trie
- *
- *  "num_writ" [ OUT, NULL OKAY ] -  returns parameter for the number
- *  of bytes written as a result of persisting the b-tree. this will
- *  be the actual bytes written regardless of return status.
- *
- *  "ext_keys" [ IN ] - if true, does not store key data internally.
- *  key text gets encoded into the tree structure in all cases. when
- *  stored internally, any key text not represented by the tree will
- *  be explicitly written by this function. otherwise, the caller will
- *  be expected to store the text as desired. while internal storage
- *  will probably be more efficient, it will cause this function to
- *  fail if the Trie was built with ambiguous key transitions, i.e.
- *  if initialized with "cs_expand" false and keys were added having
- *  characters not included within the "accept" character set. this
- *  is because the tree channels all unrecognized characters through
- *  a single code, making their recovery impossible without being
- *  stored externally.
- *
- *  "write" [ IN, NULL OKAY ] and "write_param" [ IN ] -  a generic
- *  output streaming function used for all operations. if NULL, then
- *  the function will exit after its first pass with the number of
- *  bytes required in "num_writ".
- *
- *  "aux" [ IN ] and "aux_param" [ IN ] - a specialized function for
- *  streaming auxiliary node data to output using the supplied "write"
- *  function. it is invoked during the first pass with a NULL write
- *  function for gathering size data, and during the third pass with
- *  a non-NULL write function.
- */
-KLIB_EXTERN rc_t CC TriePersist ( struct Trie const *self, size_t *num_writ, bool ext_keys,
-    PTWriteFunc write, void *write_param, PTAuxFunc aux, void *aux_param );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_ptrie_ */
diff --git a/interfaces/klib/rc.h b/interfaces/klib/rc.h
deleted file mode 100644
index 08236ec..0000000
--- a/interfaces/klib/rc.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_rc_
-#define _h_klib_rc_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#if _DEBUGGING
-
-#ifndef _h_compiler_
-#include <compiler.h>
-#endif
-
-#include <assert.h>
-#endif
-
-
-/*--------------------------------------------------------------------------
- * RC
- *  upon success, all functions will return code 0
- *  other codes indicate failure or additional status information
- */
-
-#if _DEBUGGING && ! defined RECORD_RC_FILE_LINE
-#define RECORD_RC_FILE_LINE 1
-#elif ! defined RECORD_RC_FILE_LINE
-#define RECORD_RC_FILE_LINE 0
-#endif
-
-/* actual code declarations are in <kfc/rc.h> */
-#include <kfc/rc.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if RC_EMIT
-
-KLIB_EXTERN const char * CC GetRCFilename ( void );
-KLIB_EXTERN const char * CC GetRCFunction ( void );
-KLIB_EXTERN uint32_t CC GetRCLineno ( void );
-KLIB_EXTERN rc_t CC SetRCFileFuncLine ( rc_t rc, const char *filename, const char *funcname, uint32_t lineno );
-KLIB_EXTERN bool CC GetUnreadRCInfo ( rc_t *rc, const char **filename, const char **funcname, uint32_t *lineno );
-
-#if RECORD_RC_FILE_LINE
-
-    #if defined(__SUNPRO_CC)  &&  __SUNPRO_CC <= 0x590  &&  defined(__cplusplus)
-    
-        #define SET_RC_FILE_FUNC_LINE( rc ) \
-            SetRCFileFuncLine ( ( rc ), __FILE__, "(unknown)", __LINE__ )
-    
-    #else
-    
-        #define SET_RC_FILE_FUNC_LINE( rc ) \
-            SetRCFileFuncLine ( ( rc ), __FILE__, __func__, __LINE__ )
-    
-    #endif
-
-#else
-
-    #define SET_RC_FILE_FUNC_LINE( rc ) \
-        ( rc_t ) ( rc )
-
-#endif
-
-#ifdef assert
-#define ASSERT_MOD_TARG_CTX() \
-    assert ( ( int ) rcLastModule_v1_1  < ( 1 << 5 ) ), \
-    assert ( ( int ) rcLastTarget_v1_1  < ( 1 << 6 ) ), \
-    assert ( ( int ) rcLastContext_v1_1  < ( 1 << 7 ) )
-
-#define ASSERT_OBJ_STATE() \
-    assert ( ( int ) rcLastObject_v1_1  < ( 1 << 8 ) ), \
-    assert ( ( int ) rcLastState_v1_1  < ( 1 << 6 ) )
-#else
-#define ASSERT_MOD_TARG_CTX() ( void ) 0
-
-#define ASSERT_OBJ_STATE() ( void ) 0
-#endif
-
-/* CTX
- *  form a context from parts
- */
-#define CTX( mod, targ, ctx )                                \
-    ( rc_t ) ( ASSERT_MOD_TARG_CTX (),                       \
-               RAW_CTX ( mod, targ, ctx ) )
-
-/* RC
- *  form a complete return code from parts
- */
-#define SILENT_RC( mod, targ, ctx, obj, state )              \
-    ( rc_t ) ( ASSERT_OBJ_STATE (),                          \
-        CTX ( mod, targ, ctx )    | /* 18 bits */            \
-        ( ( rc_t ) ( obj ) << 6 ) | /*  8 bits */            \
-        ( ( rc_t ) ( state ) ) )    /*  6 bits */
-
-#define RC( mod, targ, ctx, obj, state )                     \
-    ( rc_t ) ( ASSERT_OBJ_STATE (),                          \
-    SET_RC_FILE_FUNC_LINE (                                  \
-        CTX ( mod, targ, ctx )    | /* 18 bits */            \
-        ( ( rc_t ) ( obj ) << 6 ) | /*  8 bits */            \
-        ( ( rc_t ) ( state ) ) ) )  /*  6 bits */
-
-/* ResetRCContext
- *  rewrite rc to reflect different context
- *  typically used to pass out return codes
- */
-#define ResetRCContext( rc, mod, targ, ctx ) \
-    ( ( ( rc ) & 0x3FFF ) | CTX ( mod, targ, ctx ) )
-
-/* ResetRCState
- *  rewrite rc to reflect different state
- *  typically used to pass out return codes
- */
-#define ResetRCState( rc, obj, state ) \
-    ( ( ( rc ) & 0xFFFFFFC0 ) | ( rc_t ) ( state ) )
-
-#endif /* __cplusplus */
-
-/* GetRCModule
- *  extract the module portion
- */
-#define GetRCModule( rc ) \
-    ( enum RCModule ) ( ( ( rc ) >> 27 ) & 0x1F )
-
-/* GetRCTarget
- *  extract the target portion
- */
-#define GetRCTarget( rc ) \
-    ( enum RCTarget ) ( ( ( rc ) >> 21 ) & 0x3F )
-
-/* GetRCContext
- *  extract the context portion
- */
-#define GetRCContext( rc ) \
-    ( enum RCContext ) ( ( ( rc ) >> 14 ) & 0x7F )
-
-/* GetRCObject
- *  extract the target object portion
- */
-#define GetRCObject( rc ) \
-    ( enum RCObject ) ( ( ( rc ) >> 6 ) & 0xFF )
-
-/* GetRCState
- *  extract the state portion
- */
-#define GetRCState( rc ) \
-    ( enum RCState ) ( ( rc ) & 0x3F )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_klib_rc_ */
diff --git a/interfaces/klib/refcount.h b/interfaces/klib/refcount.h
deleted file mode 100644
index 7951765..0000000
--- a/interfaces/klib/refcount.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_refcount_
-#define _h_klib_refcount_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_kfc_refcount_
-#include <kfc/refcount.h>
-#endif
-
-#ifndef FORCE_TRACK_REFERENCES
-#define FORCE_TRACK_REFERENCES 0
-#endif
-
-/* normally turned off */
-#if FORCE_TRACK_REFERENCES
-#undef TRACK_REFERENCES
-#define TRACK_REFERENCES 1
-#elif ! defined TRACK_REFERENCES
-#define TRACK_REFERENCES 0
-#endif
-
-/* include logging interface */
-#if TRACK_REFERENCES
-
-#include <klib/debug.h>
-
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KRefcount inline implementation
- */
-
-#if TRACK_REFERENCES
-
-#undef REFNEW
-#undef CNTMSG
-#undef REFMSG
-#undef REFNEW_COMMA
-#undef REFMSG_COMMA
-
-#ifndef REFMOD
-#define REFMOD DBG_REF
-#endif
-
-#ifndef REFCOND
-#define REFCOND DBG_REF_ANY
-#endif
-
-#define REFNEW( clsname, op, name, instance, refcount )                 \
-    DBGMSG ( REFMOD, REFCOND, ( "created %s, operation %s, name '%s', " \
-                                "instance 0x%zX: initial refcount %d\n",  \
-                                clsname, op, name, instance, refcount ))
-#define CNTMSG( clsname, op, instance, refcount )                       \
-    DBGMSG ( REFMOD, REFCOND, ( "about to %s instance 0x%zX: prior refcount = %d for %s\n", \
-                                op, instance, refcount, clsname ))
-#define REFMSG( clsname, op, instance ) \
-    CNTMSG ( clsname, op, instance, atomic32_read ( instance ) )
-#define REFNEW_COMMA( clsname, op, name, instance, refcount ) \
-    REFNEW ( clsname, op, name, instance, refcount ),
-#define REFMSG_COMMA( clsname, op, instance ) \
-    REFMSG ( clsname, op, instance ),
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_refcount_ */
diff --git a/interfaces/klib/report.h b/interfaces/klib/report.h
deleted file mode 100644
index 4f00232..0000000
--- a/interfaces/klib/report.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_report_
-#define _h_klib_report_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * An unrecoverable error happened.
- * We can help to solve it
- * by reporting information about known application execution environment.
- */
-
-
-/* Init
- *  initialize with common information
- *
- *  "argc" [ IN ] and "argv" [ IN ] - intact command line
- *
- *  "tool_version" [ IN ] - version of tool
- */
-KLIB_EXTERN void CC ReportInit ( int argc, char *argv [],
-    ver_t tool_version );
-
-
-/* BuildDate
- *  set the build date of the tool
- *
- *  "date" [ IN ] - pre-processor __DATE__
- */
-KLIB_EXTERN void CC ReportBuildDate ( const char *date );
-
-
-/* Silence
- *  tell report to be silent at exit
- *  useful especially in response to ^C
- */
-KLIB_EXTERN void CC ReportSilence ( void );
-
-
-/* Finalize
- *  perform cleanup
- *  optionally report error condition
- *
- *  "rc" [ IN ] - report environment information if not zero
- */
-KLIB_EXTERN rc_t CC ReportFinalize ( rc_t rc );
-
-/* ForceFinalize
- *  Finalize forcing report generation to stdout
- */
-KLIB_EXTERN rc_t CC ReportForceFinalize ( void );
-
-
-/* ResetObject
- *  Resets the name of the current object beeing processes(path or accession),
- *  usually from command line.
- *  Should be called each time
- *  when starting next command line argument processing.
- */
-KLIB_EXTERN rc_t CC ReportResetObject ( const char *path );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_report_ */
diff --git a/interfaces/klib/sort.h b/interfaces/klib/sort.h
deleted file mode 100644
index 2057c5d..0000000
--- a/interfaces/klib/sort.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_sort_
-#define _h_klib_sort_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_klib_ksort_macro_
-#include <klib/ksort-macro.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * ksort
- *  qsort with a function data pointer
- */
-KLIB_EXTERN void CC ksort ( void *pbase, size_t total_elems, size_t size,
-    int64_t ( CC * cmp ) ( const void*, const void*, void *data ), void *data );
-
-
-/* various custom ksort operations
- *  structures will generally want their own functions
- *  these fundamental types can be standardized
- */
-KLIB_EXTERN void CC ksort_int32_t ( int32_t *pbase, size_t total_elems );
-KLIB_EXTERN void CC ksort_uint32_t ( uint32_t *pbase, size_t total_elems );
-KLIB_EXTERN void CC ksort_int64_t ( int64_t *pbase, size_t total_elems );
-KLIB_EXTERN void CC ksort_uint64_t ( uint64_t *pbase, size_t total_elems );
-
-
-/* KSORT
- *  macro ( see <klib/ksort-macro.h> )
- *  allows creation of a custom qsort with inlined compare and swap
- *  MUCH faster than normal qsort or ksort.
- *
- *  basically you need to define a macro CMP() and another SWAP(),
- *  and the KSORT macro will fill in the rest.
- *
- *  CMP() needs to evaluate to a signed 32-bit integer.
- *  THIS WILL CHANGE TO BECOME LESS_THAN( a, b ).
- *
- *  SWAP() will generally be a custom operation, but can be
- *  defined in terms of a default operation similar to qsort.
- *
- *  an example usage follows:
- */
-#if 0
-static
-void ksort_int64_t ( int64_t *base, size_t count )
-{
-    /* swap is performed on full element, not byte-for-byte */
-#define SWAP( a, b, off, size )                             \
-    do                                                      \
-    {                                                       \
-        int64_t tmp = * ( const int64_t* ) ( a );           \
-        * ( int64_t* ) ( a ) = * ( const int64_t* ) ( b );  \
-        * ( int64_t* ) ( b ) = tmp;                         \
-    }                                                       \
-    while ( 0 )
-
-    /* 64-bit comparison producing a signed 32-bit result */
-#define CMP( a, b )                                                     \
-    ( ( * ( const int64_t* ) ( a ) < * ( const int64_t* ) ( b ) ) ? -1 : \
-      ( * ( const int64_t* ) ( a ) > * ( const int64_t* ) ( b ) ) )
-}
-
-    /* let the macro fill out the remainder */
-    KSORT ( base, count, sizeof * base, 0, sizeof * base );
-
-    /* free up macros for future use */
-#undef SWAP
-#undef CMP
-
-#endif
-
-
-/*--------------------------------------------------------------------------
- * kbsearch
- *  bsearch with a function data pointer
- */
-KLIB_EXTERN void* CC kbsearch ( const void *key, const void *base, size_t nmemb, size_t size,
-    int64_t ( CC * cmp ) ( const void*, const void*, void *data ), void *data );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_sort_ */
diff --git a/interfaces/klib/sra-release-version.h b/interfaces/klib/sra-release-version.h
deleted file mode 100644
index 11a2bfa..0000000
--- a/interfaces/klib/sra-release-version.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_sra_release_version_
-#define _h_klib_sra_release_version_
-
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* major . minor . release [ - [ type - ] revision ]
- *
- * Examples:
- *  "2.3.4-a0"
- *  "2.3.4-b3"
- *  "2.3.4-rc1"
- *  "2.3.4"
- *  "2.3.4-2"
- */
-typedef struct SraReleaseVersion SraReleaseVersion;
-struct SraReleaseVersion
-{
-    ver_t version;     /* major . minor . release */
-    uint32_t revision;
-    enum {
-        eSraReleaseVersionTypeAlpha,
-        eSraReleaseVersionTypeBeta,
-        eSraReleaseVersionTypeRC, /* release candidate */
-        eSraReleaseVersionTypeFinal
-    } type;
-};
-
-
-/* Get
- *  Get release version of this build of SRA Toolkit */
-KLIB_EXTERN rc_t CC SraReleaseVersionGet ( SraReleaseVersion *version );
-
-/* Cmp
- *  Compare two release versions
- *  result return values:
- *       0 - the versions are the same 
- *       1 - version2 is more recent than self
- *      -1 - self is more recent than version2
- */
-KLIB_EXTERN rc_t CC SraReleaseVersionCmp ( const SraReleaseVersion *self,
-    const SraReleaseVersion *version2, int32_t *result );
-
-/* Parse
- *  Initialize SraReleaseVersion from char version[size]
- */
-KLIB_EXTERN rc_t CC SraReleaseVersionInit ( SraReleaseVersion *self,
-    const char *version, size_t size );
-
-/* Print
- *  Convert SraReleaseVersion to version[size]
- */
-KLIB_EXTERN rc_t CC SraReleaseVersionPrint ( const SraReleaseVersion *self,
-    char *version, size_t size, size_t *num_writ );
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _h_klib_sra_release_version_ */
diff --git a/interfaces/klib/status.h b/interfaces/klib/status.h
deleted file mode 100644
index 736b8bd..0000000
--- a/interfaces/klib/status.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_status_
-#define _h_klib_status_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_writer_
-#include <klib/writer.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef uint32_t KStsLevel;
-
-enum
-{
-    STAT_USR = 1,       /* normal user verbosity  */
-    STAT_PWR,           /* power-user verbosity   */
-    STAT_QA,            /* qa-level description   */
-    STAT_PRG,           /* programmer description */
-    STAT_GEEK           /* absurdly verbose       */
-};
-
-KLIB_EXTERN KStsLevel CC KStsLevelGet( void );
-KLIB_EXTERN void CC KStsLevelSet( KStsLevel level );
-KLIB_EXTERN void CC KStsLevelAdjust( int32_t adjust );
-
-/* -----
- * Handlers for application and library writers.
- */
-KLIB_EXTERN KWrtHandler* CC KStsHandlerGet (void);
-KLIB_EXTERN KWrtHandler* CC KStsLibHandlerGet (void);
-
-KLIB_EXTERN KWrtWriter CC KStsWriterGet (void);
-KLIB_EXTERN KWrtWriter CC KStsLibWriterGet (void);
-
-KLIB_EXTERN void* CC KStsDataGet (void);
-KLIB_EXTERN void* CC KStsLibDataGet (void);
-
-/*
- * Init()
- * Initialize the debug messages module to a known state
- */
-KLIB_EXTERN rc_t CC KStsInit (void);
-
-KLIB_EXTERN rc_t CC KStsMsg (const char * fmt, ...);
-KLIB_EXTERN rc_t CC KStsLibMsg (const char * fmt, ...);
-
-/* Set
- */
-KLIB_EXTERN rc_t CC KStsHandlerSet    (KWrtWriter writer, void * data);
-KLIB_EXTERN rc_t CC KStsLibHandlerSet (KWrtWriter writer, void * data);
-
-KLIB_EXTERN rc_t CC KStsHandlerSetStdOut    ( void );
-KLIB_EXTERN rc_t CC KStsLibHandlerSetStdOut ( void );
-KLIB_EXTERN rc_t CC KStsHandlerSetStdErr    ( void );
-KLIB_EXTERN rc_t CC KStsLibHandlerSetStdErr ( void );
-
-/* formatting */
-typedef uint32_t KStsFmtFlags;
-enum KStsFmtFlagsEnum
-{
-    kstsFmtTimestamp = 0x00000001,
-    kstsFmtPid = 0x00000002,
-    kstsFmtAppName = 0x00000004,
-    kstsFmtAppVersion = 0x00000008,
-    kstsFmtMessage = 0x00000010, /* actual message */
-    kstsFmtLocalTimestamp = 0x00000020 /* print time stamp in local time, if both bits set local takes over */
-};
-
-KLIB_EXTERN KFmtHandler* CC KStsFmtHandlerGet (void);
-KLIB_EXTERN KFmtHandler* CC KStsLibFmtHandlerGet (void);
-
-KLIB_EXTERN KStsFmtFlags CC KStsFmtFlagsGet ( void );
-KLIB_EXTERN KStsFmtFlags CC KStsLibFmtFlagsGet ( void );
-
-KLIB_EXTERN KFmtWriter CC KStsFmtWriterGet (void);
-KLIB_EXTERN KFmtWriter CC KStsLibFmtWriterGet (void);
-KLIB_EXTERN void* CC KStsFmtDataGet (void);
-KLIB_EXTERN void* CC KStsLibFmtDataGet (void);
-
-KLIB_EXTERN rc_t CC KStsFmtFlagsSet    (KStsFmtFlags flags);
-KLIB_EXTERN rc_t CC KStsLibFmtFlagsSet (KStsFmtFlags flags);
-
-KLIB_EXTERN rc_t CC KStsFmtHandlerSet    (KFmtWriter formatter, KStsFmtFlags flags, void * data);
-KLIB_EXTERN rc_t CC KStsLibFmtHandlerSet (KFmtWriter formatter, KStsFmtFlags flags, void * data);
-
-KLIB_EXTERN rc_t CC KStsFmtHandlerSetDefault(void);
-KLIB_EXTERN rc_t CC KStsLibFmtHandlerSetDefault(void);
-
-/*
- * A usage could look like
- *
- *  STSMSG(4, ("Current Status Level is %d\n", KStsLevelGet()));
- *
- */
-#ifdef _LIBRARY
-
-#define STSMSG(lvl,msg) \
-    (void)((((unsigned)lvl) <= KStsLevelGet()) ? KStsLibMsg msg : 0)
-#define STATUS( lvl, ... ) \
-    ( void ) ( ( ( lvl ) <= KStsLevelGet () ) ? KStsLibMsg ( __VA_ARGS__ ) : 0 )
-
-#else
-
-#define STSMSG(lvl,msg) \
-    (void)((((unsigned)lvl) <= KStsLevelGet()) ? KStsMsg msg : 0)
-
-#define STATUS( lvl, ... ) \
-    ( void ) ( ( ( lvl ) <= KStsLevelGet () ) ? KStsMsg ( __VA_ARGS__ ) : 0 )
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_klib_status_ */
diff --git a/interfaces/klib/symbol.h b/interfaces/klib/symbol.h
deleted file mode 100644
index 7df9d41..0000000
--- a/interfaces/klib/symbol.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_symbol_
-#define _h_klib_symbol_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KSymbol
- *  a name to object mapping
- */
-typedef struct KSymbol KSymbol;
-struct KSymbol
-{
-    /* currently kept in a BSTree
-       this could change, though */
-    BSTNode n;
-
-    union
-    {
-        /* external object
-           neither known, nor owned,
-           i.e. just a borrowed reference */
-        const void *obj;
-
-        /* if object is a namespace, its scope */
-        BSTree scope;
-
-        /* unresolved forward decl id */
-        struct { uint32_t ctx, id; } fwd;
-
-    } u;
-
-    /* enclosing namespace
-       for name traceback */
-    KSymbol *dad;
-
-    /* symbol name */
-    String name;
-
-    /* symbol type */
-    uint32_t type;
-};
-
-
-/* Make
- *  create a symbol
- *
- *  "sym" [ OUT ] - return parameter for symbol
- *
- *  "name" [ IN ] - symbol name
- *
- *  "type" [ IN ] - symbol type
- *
- *  "obj" [ IN, NULL OKAY ] - optional object mapping
- *
- * This make will allocate storage for the KSymbol and
- * it's name.
- */
-KLIB_EXTERN rc_t CC KSymbolMake ( KSymbol **sym,
-    const String *name, uint32_t type, const void *obj );
-
-
-/* Init
- *  initialize a symbol without allocating space
- *
- *  "self" [ IN ] - where to initialize
- *
- *  "name" [ IN ] - symbol name
- *
- *  "type" [ IN ] - symbol type
- *
- *  "obj" [ IN, NULL OKAY ] - optional object mapping
- *
- */
-KLIB_EXTERN rc_t CC KSymbolInit ( KSymbol * self, 
-    const String * name, uint32_t type, const void * obj);
-
-
-
-/* Whack
- *  from BSTree
- */
-KLIB_EXTERN void CC KSymbolWhack ( BSTNode *n, void *ignore );
-
-/* there is currently no need for a real Destroy function 
- * but a macro to do nothing is included for orthogonality.
- */
-#define KSymbolDestroy(s,i) ((void)0)
-
-/* Cmp
- *  compare String* against KSymbol*
- */
-KLIB_EXTERN int64_t CC KSymbolCmp ( const void *item, const BSTNode *n );
-
-
-/* Sort
- *  compare KSymbol* against KSymbol*
- */
-KLIB_EXTERN int64_t CC KSymbolSort ( const BSTNode *item, const BSTNode *n );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_symbol_ */
diff --git a/interfaces/klib/symtab.h b/interfaces/klib/symtab.h
deleted file mode 100644
index fd2d406..0000000
--- a/interfaces/klib/symtab.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_symtab_
-#define _h_klib_symtab_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_vector_
-#include <klib/vector.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct BSTree;
-struct String;
-struct KSymbol;
-
-
-/*--------------------------------------------------------------------------
- * KSymTable
- *  scoped stack of BSTrees
- */
-typedef struct KSymTable KSymTable;
-struct KSymTable
-{
-    /* head of open namespace stack */
-    struct KSymbol *ns;
-
-    /* scope stack */
-    Vector stack;
-
-    /* intrinsic scope count */
-    uint32_t intrinsic;
-};
-
-
-/* Init
- *  create an empty symbol table
- *
- *  "intrinsic" [ IN, NULL OKAY ] - initial protected scope
- *  if not NULL, will be used as initial non-modifiable scope
- */
-KLIB_EXTERN rc_t CC KSymTableInit ( KSymTable *self, struct BSTree const *intrinsic );
-
-
-/* Whack
- *  must be called to clean up stack
- */
-#if NOT_MACRO
-KLIB_EXTERN void CC KSymTableWhack ( KSymTable *self );
-#endif
-#define KSymTableWhack( self ) \
-    VectorWhack ( & ( self ) -> stack, NULL, NULL )
-
-
-/* PushScope
- *  pushes a tree onto stack
- *
- *  "scope" [ IN ] - current top scope
- */
-KLIB_EXTERN rc_t CC KSymTablePushScope ( const KSymTable *self, struct BSTree *scope );
-
-
-/* PopScope
- *  removes a tree from stack
- *  noop if count <= self->intrinsic,
- *  because stack bottom will be intrinsic scope
- */
-KLIB_EXTERN void CC KSymTablePopScope ( const KSymTable *self );
-
-
-/* PushNamespace
- *  pushes a namespace scope onto stack
- */
-KLIB_EXTERN rc_t CC KSymTablePushNamespace ( const KSymTable *self, struct KSymbol *ns );
-
-
-/* PopNamespace
- */
-KLIB_EXTERN void CC KSymTablePopNamespace ( const KSymTable *self );
-
-
-/* CreateNamespace
- *  given a name, make it into a namespace,
- *
- *  "name" [ IN ] - name of namespace. if being created within
- *  another namespace, it will be linked to the parent.
- */
-KLIB_EXTERN rc_t CC KSymTableCreateNamespace ( KSymTable *self,
-    struct KSymbol **ns, struct String const *name );
-
-
-/* CreateSymbol
- *  given a name, create an object reference
- *
- *  "sym" [ OUT, NULL OKAY ] - optional return parameter for
- *  newly created symbol, which is entered into the top scope
- *  and only returned for convenience.
- *
- *  "name" [ IN ] - symbol name. if being created within a
- *  namespace, the symbol will be linked to the parent.
- *
- *  "id" [ IN ] - if the symbol type
- *
- *  "obj" [ IN, NULL OKAY ] - if the object has been created
- *  at the point of symbol definition, it may be provided.
- */
-KLIB_EXTERN rc_t CC KSymTableCreateSymbol ( KSymTable *self, struct KSymbol **sym,
-    struct String const *name, uint32_t id, const void *obj );
-#define KSymTableCreateConstSymbol( self, sym, name, id, obj ) \
-    KSymTableCreateSymbol ( self, ( struct KSymbol** ) ( sym ), name, id, obj )
-
-
-/* DupSymbol
- *  given a symbol, create a duplicate
- *
- *  "dup" [ OUT, NULL OKAY ] - optional return parameter for
- *  newly created symbol, which is entered into the top scope
- *  and only returned for convenience.
- *
- *  "sym" [ IN ] - symbol to copy.
- *
- *  "id" [ IN ] - if the symbol type
- *
- *  "obj" [ IN, NULL OKAY ] - if the object has been created
- *  at the point of symbol definition, it may be provided.
- */
-KLIB_EXTERN rc_t CC KSymTableDupSymbol ( KSymTable *self, struct KSymbol **dup,
-    struct KSymbol const *sym, uint32_t id, const void *obj );
-
-
-/* RemoveSymbol
- *  removes symbol from table
- *
- *  "sym" [ IN ] - symbol to be removed
- */
-KLIB_EXTERN rc_t CC KSymTableRemoveSymbol ( KSymTable *self, struct KSymbol const *sym );
-
-
-/* Find
- *  finds a symbol within the scope stack
- */
-KLIB_EXTERN struct KSymbol* CC KSymTableFind ( const KSymTable *self,
-    struct String const *name );
-KLIB_EXTERN struct KSymbol* CC KSymTableFindSymbol ( const KSymTable *self,
-    struct KSymbol const *sym );
-
-
-/* FindIntrinsic
- *  find an intrinsic symbol
- *  looks in stack scopes <= self->intrinsic
- */
-KLIB_EXTERN struct KSymbol* CC KSymTableFindIntrinsic ( const KSymTable *self,
-    struct String const *name );
-
-
-/* FindGlobal
- *  find a symbol at global scope
- */
-KLIB_EXTERN struct KSymbol* CC KSymTableFindGlobal ( const KSymTable *self,
-    struct String const *name );
-
-
-/* FindShallow
- *  find a symbol in top scope
- */
-KLIB_EXTERN struct KSymbol* CC KSymTableFindShallow ( const KSymTable *self,
-    struct String const *name );
-
-
-/* FindNext
- *  given a symbol that was found in nearest scope
- *  find next symbol of the same simple name in
- *  farther scopes
- *
- *  "sym" [ IN ] - previously found symbol
- *
- *  "scope" [ IN/OUT, NULL OKAY ] - if NULL or value is 0,
- *  the scope id for "sym" is dynamically located. otherwise,
- *  the value on input is used for continuing a search. on
- *  output and if not NULL, the value is set to the scope id
- *  where the returned symbol was found, or 0 if not found.
- */
-KLIB_EXTERN struct KSymbol* CC KSymTableFindNext ( const KSymTable *self,
-    struct KSymbol const *sym, uint32_t *scope );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_symtab_ */
diff --git a/interfaces/klib/text.h b/interfaces/klib/text.h
deleted file mode 100644
index d2ae45f..0000000
--- a/interfaces/klib/text.h
+++ /dev/null
@@ -1,557 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_text_
-#define _h_klib_text_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-#include <string.h> /* memcmp */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * String
- *  pseudo-intrinsic string
- */
-typedef struct String String;
-struct String
-{
-    const char *addr;
-    size_t size;
-    uint32_t len;
-};
-
-/* StringInit
- *  initializes a String object
- */
-#define StringInit( s, val, sz, length ) \
-    ( void ) \
-        ( ( s ) -> addr = ( val ), \
-          ( s ) -> size = ( sz ), \
-          ( s ) -> len = ( length ) )
-
-#define StringInitCString( s, cstr ) \
-    ( void ) \
-        ( ( s ) -> len = string_measure \
-          ( ( s ) -> addr = ( cstr ), & ( s ) -> size ) )
-
-/* CONST_STRING
- *  initialize a string from a manifest constant
- */
-#define CONST_STRING( s, val ) \
-    StringInit ( s, val, sizeof val - 1, sizeof val - 1 )
-
-/* StringSize
- *  size of string in bytes
- */
-#define StringSize( s ) \
-    ( s ) -> size
-
-/* StringLength
- *  length of string in characters
- */
-#define StringLength( s ) \
-    ( s ) -> len
-
-/* StringCopy
- *  allocates a copy of a string
- */
-KLIB_EXTERN rc_t CC StringCopy ( const String **cpy, const String *str );
-
-/* StringConcat
- *  concatenate one string onto another
- */
-KLIB_EXTERN rc_t CC StringConcat ( const String **cat,
-    const String *a, const String *b );
-
-/* StringSubstr
- *  creates a substring of an existing one
- *  note that the substring is always a non-allocated copy
- *  and is dependent upon the lifetime of its source
- *
- *  returns "sub" if "idx" was valid
- *  or NULL otherwise
- *
- *  "len" may be 0 to indicate infinite length
- *  or may extend beyond end of source string.
- */
-KLIB_EXTERN String* CC StringSubstr ( const String *str,
-    String *sub, uint32_t idx, uint32_t len );
-
-/* StringHead
- *  access the first character
- *
- *  this is an efficient enough function to be included.
- *  the generic functions of accessing characters by index
- *  are apt to be extremely inefficient with UTF-8, and
- *  as such are not included.
- *
- *  returns EINVAL if the character is bad,
- *  or ENODATA if the string is empty
- */
-KLIB_EXTERN rc_t CC StringHead ( const String *str, uint32_t *ch );
-
-/* StringPopHead
- *  remove and return the first character
- *
- *  returns EINVAL if the character is bad,
- *  or ENODATA if the string is empty
- */
-KLIB_EXTERN rc_t CC StringPopHead ( String *str, uint32_t *ch );
-
-/* StringEqual
- *  compare strings for equality
- *  not lexical for all characters
- */
-#define StringEqual( a, b ) \
-    ( ( a ) -> len == ( b ) -> len && \
-    memcmp ( ( a ) -> addr, ( b ) -> addr, ( a ) -> len ) == 0 )
-
-/* StringCompare
- *  compare strings for relative ordering
- *  not strictly lexical - generally orders by character code
- */
-KLIB_EXTERN int CC StringCompare ( const String *a, const String *b );
-
-/* StringCaseEqual
- *  compare strings for case-insensitive equality
- */
-KLIB_EXTERN bool CC StringCaseEqual ( const String *a, const String *b );
-
-/* StringCaseCompare
- *  compare strings for relative case-insensitive ordering
- */
-KLIB_EXTERN int CC StringCaseCompare ( const String *a, const String *b );
-
-/* StringOrder
- * StringOrderNoNullCheck
- *  compares strings as quickly as possible for
- *  deterministic ordering: first by length, then
- *  by binary ( byte-wise ) content.
- *
- *  performs more quickly than StringCompare for cases
- *  where only deterministic ordering is needed ( e.g. symbol table ).
- *
- *  the "NoNullCheck" version will crash if either a or b are NULL
- *  but avoids the overhead of checking when both are known to be good
- */
-KLIB_EXTERN int64_t CC StringOrder ( const String *a, const String *b );
-KLIB_EXTERN int64_t CC StringOrderNoNullCheck ( const String *a, const String *b );
-
-/* StringMatch
- *  creates a substring of "a" in "match"
- *  for all of the sequential matching characters between "a" and "b"
- *  starting from character [ 0 ].
- *
- *  returns the number of characters that match.
- */
-KLIB_EXTERN uint32_t CC StringMatch ( String *match,
-    const String *a, const String *b );
-
-/* StringMatchExtend
- *  extends a substring of "a" in "match"
- *  for all of the sequential matching characters between "a" and "b"
- *  starting from character [ match -> len ].
- *
- *  returns the number of matching characters that were extended.
- */
-KLIB_EXTERN uint32_t CC StringMatchExtend ( String *match,
-    const String *a, const String *b );
-
-/* StringHash
- *  hash value for string
- */
-#define StringHash( s ) \
-    string_hash ( ( s ) -> addr, ( s ) -> size )
-
-/* StringCopyUTF...
- *  creates a String from UTF16 or UTF32 UNICODE input
- *  wchar_t is one or the other, depending upon OS and compiler.
- */
-KLIB_EXTERN rc_t CC StringCopyUTF16 ( const String **cpy,
-    const uint16_t *text, size_t bytes );
-KLIB_EXTERN rc_t CC StringCopyUTF32 ( const String **cpy,
-    const uint32_t *text, size_t bytes );
-
-/* StringCopyWChar_t
- *  wchar_t is alternately defined as 16 or 32 bits
- */
-#define StringCopyWChar_t( cpy, text, bytes ) \
-    ( ( sizeof ( wchar_t ) == sizeof ( uint16_t ) ) ? \
-      StringCopyUTF16 ( cpy, ( const uint16_t* ) ( text ), bytes ) : \
-      StringCopyUTF32 ( cpy, ( const uint32_t* ) ( text ), bytes ) )
-
-/* StringWhack
- *  deallocates a string
- *  ignores strings not allocated by this library
- */
-KLIB_EXTERN void CC StringWhack ( const String* self );
-
-
-/* StringToInt
- *  simple string conversion functions
- *
- *  these functions are defined to consume the entire string.
- *  leading spaces are tolerated, repeated signs are accepted for signed conversion,
- *  decimal and hex encodings are accepted for unsigned conversion,
- *  decimal only for signed conversion.
- *
- *  "optional_rc" [ OUT, NULL OKAY ] - if non-null, user is interested
- *  in error conditions. if the parameter is present, the string must be
- *  completely consumed without overflow.
- *
- *  optional return values ( with { GetRCObject ( rc ), GetRCState ( rc ) }:
- *   0                            : no error
- *   { rcRange, rcExcessive }     : integer overflow
- *   { rcTransfer, rcIncomplete } : extra characters remain in string
- *   { rcData, rcInsufficient }   : no numeric text was found
- *
- *  return values - regardless of "optional_rc":
- *    val             : when no error
- *    val             : on incomplete transfer
- *    +/- max int64_t : when signed overflow occurs ( StringToI64 only )
- *    max uint64_t    : when unsigned overflow occurs ( StringToU64 only )
- *    0               : when no input text is found
- */
-KLIB_EXTERN int64_t StringToI64 ( const String * self, rc_t * optional_rc );
-KLIB_EXTERN uint64_t StringToU64 ( const String * self, rc_t * optional_rc );
-
-
-/*--------------------------------------------------------------------------
- * raw text strings
- *  the internal representation of text strings is implementation
- *  dependent. it is assumed to be ASCII-7 or UTF-8, although
- *  this is determined by the implementation library of these functions.
- *
- * NB - ASCII implementations are no longer being provided
- *  all text handling is UTF-8 unless explictly stated otherwise
- */
-
-/* string_size
- *  length of string in bytes
- */
-KLIB_EXTERN size_t CC string_size ( const char *str );
-
-/* string_len
- *  length of string in characters, when the size is known
- */
-KLIB_EXTERN uint32_t CC string_len ( const char *str, size_t size );
-
-/* string_measure
- *  measures length of string in both characters and bytes
- */
-KLIB_EXTERN uint32_t CC string_measure ( const char *str, size_t *size );
-
-/* string_copy
- *  copies whole character text into a buffer
- *  terminates with NUL byte if possible
- *  returns the number of bytes copied
- */
-KLIB_EXTERN size_t CC string_copy ( char *dst, size_t dst_size,
-    const char *src, size_t src_size );
-
-/* string_copy_measure
- *  copies whole character text into a buffer
- *  terminates with NUL byte if possible
- *  returns the number of bytes copied
- */
-KLIB_EXTERN size_t CC string_copy_measure ( char *dst, size_t dst_size, const char *src );
-
-/* string_dup
- *  replaces the broken C library strndup
- *  creates a NUL-terminated malloc'd string
- */
-KLIB_EXTERN char* CC string_dup ( const char *str, size_t size );
-
-/* string_dup_measure
- *  replaces the broken C library strdup
- *  creates a NUL-terminated malloc'd string
- *  returns size of string unless "size" is NULL
- */
-KLIB_EXTERN char* CC string_dup_measure ( const char *str, size_t *size );
-
-/* string_printf
- *  NOW IN <klib/printf.h>
- */
-
-/* tolower_copy
- *  copies whole character text in lower-case
- *  terminates with NUL byte if possible
- *  returns the number of bytes copied
- */
-KLIB_EXTERN size_t CC tolower_copy ( char *dst, size_t dst_size,
-    const char *src, size_t src_size );
-
-/* toupper_copy
- *  copies whole character text in upper-case
- *  terminates with NUL byte if possible
- *  returns the number of bytes copied
- */
-KLIB_EXTERN size_t CC toupper_copy ( char *dst, size_t dst_size,
-    const char *src, size_t src_size );
-
-/* string_cmp
- *  performs a safe strncmp
- *
- *  "max_chars" limits the extent of the comparison
- *  to not exceed supplied value, i.e. the number of
- *  characters actually compared will be the minimum
- *  of asize, bsize and max_chars.
- *
- *  if either string size ( or both ) < max_chars and
- *  all compared characters match, then the result will
- *  be a comparison of asize against bsize.
- */
-KLIB_EXTERN int CC string_cmp ( const char *a, size_t asize,
-    const char *b, size_t bsize, uint32_t max_chars );
-
-/* strcase_cmp
- *  like string_cmp except case insensitive
- */
-KLIB_EXTERN int CC strcase_cmp ( const char *a, size_t asize,
-    const char *b, size_t bsize, uint32_t max_chars );
-
-/* string_match
- *  returns the number of matching characters
- *
- *  "max_chars" limits the extent of the comparison
- *  to not exceed supplied value, i.e. the number of
- *  characters actually compared will be the minimum
- *  of asize, bsize and max_chars.
- *
- *  "msize" will be set to the size of the matched string
- *  if not NULL
- */
-KLIB_EXTERN uint32_t CC string_match ( const char *a, size_t asize,
-    const char *b, size_t bsize, uint32_t max_chars, size_t *msize );
-
-/* strcase_match
- *  like string_match except case insensitive
- */
-KLIB_EXTERN uint32_t CC strcase_match ( const char *a, size_t asize,
-    const char *b, size_t bsize, uint32_t max_chars, size_t *msize );
-
-/* string_chr
- *  performs a safe strchr
- *  "ch" is in UTF32
- */
-KLIB_EXTERN char* CC string_chr ( const char *str, size_t size, uint32_t ch );
-
-/* string_rchr
- *  performs a safe strrchr
- */
-KLIB_EXTERN char* CC string_rchr ( const char *str, size_t size, uint32_t ch );
-
-/* string_brk
- *  performs a safe strpbrk
- */
-#if 0
-KLIB_EXTERN char* CC string_brk ( const char *str, size_t size,
-    const char *accept, size_t asize );
-#endif
-
-/* string_rbrk
- */
-#if 0
-KLIB_EXTERN char* CC string_rbrk ( const char *str, size_t size,
-    const char *accept, size_t asize );
-#endif
-
-/* string_hash
- *  hashes a string
- */
-KLIB_EXTERN uint32_t CC string_hash ( const char *str, size_t size );
-
-/* string_idx
- *  seek an indexed character
- *
- *  the efficiency is based upon chosen internal
- *  string representation, which, when using single byte chars,
- *  is simple and efficient.
- *
- *  on the other hand, UTF-8 has a variable character width,
- *  requiring scanning of the entire string until the indexed
- *  character is found.
- */
-KLIB_EXTERN char* CC string_idx ( const char *str, size_t size, uint32_t idx );
-
-
-/* string_to_int
- *  simple string conversion functions
- *
- *  these functions are defined to consume the entire string.
- *  leading spaces are tolerated, repeated signs are accepted for signed conversion,
- *  decimal and hex encodings are accepted for unsigned conversion,
- *  decimal only for signed conversion.
- *
- *  "optional_rc" [ OUT, NULL OKAY ] - if non-null, user is interested
- *  in error conditions. if the parameter is present, the string must be
- *  completely consumed without overflow.
- *
- *  optional return values ( with { GetRCObject ( rc ), GetRCState ( rc ) }:
- *   0                            : no error
- *   { rcRange, rcExcessive }     : integer overflow
- *   { rcTransfer, rcIncomplete } : extra characters remain in string
- *   { rcData, rcInsufficient }   : no numeric text was found
- *
- *  return values - regardless of "optional_rc":
- *    val             : when no error
- *    val             : on incomplete transfer
- *    +/- max int64_t : when signed overflow occurs ( StringToI64 only )
- *    max uint64_t    : when unsigned overflow occurs ( StringToU64 only )
- *    0               : when no input text is found
- */
-KLIB_EXTERN int64_t string_to_I64 ( const char * str, size_t size, rc_t * optional_rc );
-KLIB_EXTERN uint64_t string_to_U64 ( const char * str, size_t size, rc_t * optional_rc );
-
-
-/*--------------------------------------------------------------------------
- * conversion between UTF-32 and UTF-8 UNICODE
- */
-
-/* utf8_utf32
- *  converts UTF-8 text to a single UTF-32 character
- *  returns the number of UTF8 bytes consumed, such that:
- *    return > 0 means success
- *    return == 0 means insufficient input
- *    return < 0 means bad input
- */
-KLIB_EXTERN int CC utf8_utf32 ( uint32_t *ch, const char *begin, const char *end );
-
-/* utf32_utf8
- *  converts a single UTF-32 character to UTF-8 text
- *  returns the number of UTF8 bytes generated, such that:
- *    return > 0 means success
- *    return == 0 means insufficient output
- *    return < 0 means bad character
- */
-KLIB_EXTERN int CC utf32_utf8 ( char *begin, char *end, uint32_t ch );
-
-
-/*--------------------------------------------------------------------------
- * support for 16 and 32-bit UTF formats
- */
-
-/* utf16_string_size/len/measure
- *  measures UTF-16 strings
- */
-KLIB_EXTERN size_t CC utf16_string_size ( const uint16_t *str );
-KLIB_EXTERN uint32_t CC utf16_string_len ( const uint16_t *str, size_t size );
-KLIB_EXTERN uint32_t CC utf16_string_measure ( const uint16_t *str, size_t *size );
-
-/* utf32_string_size/len/measure
- */
-KLIB_EXTERN size_t CC utf32_string_size ( const uint32_t *str );
-KLIB_EXTERN uint32_t CC utf32_string_len ( const uint32_t *str, size_t size );
-KLIB_EXTERN uint32_t CC utf32_string_measure ( const uint32_t *str, size_t *size );
-
-/* wchar_string_size/len/measure
- *  measures wchar_t strings
- */
-KLIB_EXTERN size_t CC wchar_string_size ( const wchar_t *str );
-KLIB_EXTERN uint32_t CC wchar_string_len ( const wchar_t *str, size_t size );
-KLIB_EXTERN uint32_t CC wchar_string_measure ( const wchar_t *str, size_t *size );
-
-/* conversion from UTF-16 to internal standard */
-KLIB_EXTERN uint32_t CC utf16_cvt_string_len ( const uint16_t *src,
-    size_t src_size, size_t *dst_size );
-KLIB_EXTERN uint32_t CC utf16_cvt_string_measure ( const uint16_t *src,
-    size_t *src_size, size_t *dst_size );
-KLIB_EXTERN size_t CC utf16_cvt_string_copy ( char *dst, size_t dst_size,
-    const uint16_t *src, size_t src_size );
-
-/* conversion from UTF-32 to internal standard */
-KLIB_EXTERN uint32_t CC utf32_cvt_string_len ( const uint32_t *src,
-    size_t src_size, size_t *dst_size );
-KLIB_EXTERN uint32_t CC utf32_cvt_string_measure ( const uint32_t *src,
-    size_t *src_size, size_t *dst_size );
-KLIB_EXTERN size_t CC utf32_cvt_string_copy ( char *dst, size_t dst_size,
-    const uint32_t *src, size_t src_size );
-
-/* conversion from wchar_t to internal standard */
-KLIB_EXTERN uint32_t CC wchar_cvt_string_len ( const wchar_t *src,
-    size_t src_size, size_t *dst_size );
-KLIB_EXTERN uint32_t CC wchar_cvt_string_measure ( const wchar_t *src,
-    size_t *src_size, size_t *dst_size );
-KLIB_EXTERN size_t CC wchar_cvt_string_copy ( char *dst, size_t dst_size,
-    const wchar_t *src, size_t src_size );
-
-/* conversion to wchar_t from internal standard */
-KLIB_EXTERN size_t CC string_cvt_wchar_copy ( wchar_t *dst, size_t dst_size,
-    const char *src, size_t src_size );
-
-/*--------------------------------------------------------------------------
- * support for ISO-8859-x 8-bit character sets
- */
-
-/* iso8859_utf32
- *  converts 8-bit text to a single UTF-32 character
- *  returns the number of 8-bit bytes consumed, such that:
- *    return > 0 means success
- *    return == 0 means insufficient input
- *    return < 0 means bad input
- */
-KLIB_EXTERN int CC iso8859_utf32 ( const uint32_t map [ 128 ],
-    uint32_t *ch, const char *begin, const char *end );
-
-/* iso8859_string_size/len/measure
- *  measures UTF-16 strings
- */
-KLIB_EXTERN size_t CC iso8859_string_size ( const uint32_t map [ 128 ],
-    const char *str );
-KLIB_EXTERN uint32_t CC iso8859_string_len ( const uint32_t map [ 128 ],
-    const char *str, size_t size );
-KLIB_EXTERN uint32_t CC iso8859_string_measure ( const uint32_t map [ 128 ],
-    const char *str, size_t *size );
-
-/* conversion from ISO-8859-x to internal standard */
-KLIB_EXTERN uint32_t CC iso8859_cvt_string_len ( const uint32_t map [ 128 ],
-    const char *src, size_t src_size, size_t *dst_size );
-KLIB_EXTERN uint32_t CC iso8859_cvt_string_measure ( const uint32_t map [ 128 ],
-    const char *src, size_t *src_size, size_t *dst_size );
-KLIB_EXTERN size_t CC iso8859_cvt_string_copy ( const uint32_t map [ 128 ],
-    char *dst, size_t dst_size, const char *src, size_t src_size );
-
-/* some externally defined character maps */
-KLIB_EXTERN_DATA const uint32_t iso8859_1 [ 128 ];
-KLIB_EXTERN_DATA const uint32_t cp1252 [ 128 ];
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_text_ */
diff --git a/interfaces/klib/time.h b/interfaces/klib/time.h
deleted file mode 100644
index 98989f6..0000000
--- a/interfaces/klib/time.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_time_
-#define _h_klib_time_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KTime_t
- *  64 bit time_t
- */
-
-
-/* Stamp
- *  current timestamp
- */
-KLIB_EXTERN KTime_t CC KTimeStamp ( void );
-KLIB_EXTERN KTimeMs_t CC KTimeMsStamp ( void );
-
-/*--------------------------------------------------------------------------
- * KTime
- *  simple time structure
- */
-typedef struct KTime KTime;
-struct KTime
-{
-    uint32_t year;        /* full year                                */
-    uint16_t month;       /* 0 .. 11                                  */
-    uint16_t day;         /* 0 .. 30                                  */
-    uint16_t weekday;     /* 0 .. 6 : 0 is Sunday                     */
-    int16_t tzoff;        /* -719 .. +719 minutes from Prime Meridian */
-    uint8_t hour;         /* 0 .. 23                                  */
-    uint8_t minute;       /* 0 .. 59                                  */
-    uint8_t second;       /* 0 .. 61 :  61 used for leap seconds      */
-    bool dst;             /* true if Daylight Savings Time in effect  */
-};
-
-
-/* Local
- *  populate "kt" from "ts" in local time zone
- */
-KLIB_EXTERN const KTime* CC KTimeLocal ( KTime *kt, KTime_t ts );
-
-
-/* Global
- *  populate "kt" from "ts" in GMT
- */
-KLIB_EXTERN const KTime* CC KTimeGlobal ( KTime *kt, KTime_t ts );
-
-
-/* MakeTime
- *  make a KTime_t from KTime
- */
-KLIB_EXTERN KTime_t CC KTimeMakeTime ( const KTime *self );
-
-
-KLIB_EXTERN rc_t CC KSleep( uint32_t seconds );
-KLIB_EXTERN rc_t CC KSleepMs( uint32_t milliseconds );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_klib_time_ */
diff --git a/interfaces/klib/token.h b/interfaces/klib/token.h
deleted file mode 100644
index 80bf714..0000000
--- a/interfaces/klib/token.h
+++ /dev/null
@@ -1,254 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_token_
-#define _h_klib_token_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KSymbol;
-
-
-/*--------------------------------------------------------------------------
- * KTokenText
- *  named text
- *
- *  it's likely that the name will need to become a refcounted object...
- */
-typedef struct KTokenText KTokenText;
-struct KTokenText
-{
-    String str;
-    String path;
-
-    rc_t ( CC * read ) ( void *self, KTokenText *tt, size_t save );
-    void *data;
-};
-
-
-/* Init
- *  initialize structure
- */
-#define KTokenTextInit( tt, text, fpath ) \
-    ( void ) ( ( tt ) -> str = * ( text ), \
-               ( tt ) -> path = * ( fpath ), \
-               ( tt ) -> read = NULL, \
-               ( tt ) -> data = NULL )
-#ifndef KTokenTextInit
-KLIB_EXTERN void CC KTokenTextInit ( KTokenText *tt, const String *text, const String *path );
-#endif
-
-#define KTokenTextInitCString( tt, text, fpath ) \
-    ( void ) ( StringInitCString ( & ( tt ) -> str, text ), \
-               StringInitCString ( & ( tt ) -> path, fpath ), \
-               ( tt ) -> read = NULL, \
-               ( tt ) -> data = NULL )
-#ifndef KTokenTextInitCString
-KLIB_EXTERN void CC KTokenTextInitCString ( KTokenText *tt, const char *text, const char *path );
-#endif
-
-/*--------------------------------------------------------------------------
- * KTokenID
- *  pre-defined ids for text tokens
- *  not every tokenizer will return all tokens
- */
-enum KTokenID
-{
-    eEndOfInput, eUnrecognized, eUntermComment,
-
-    /* space separators */
-    eWhiteSpace, eEndOfLine,
-
-    /* numeric */
-    eDecimal, eHex, eOctal, eFloat, eExpFloat, eMajMinRel,
-
-    /* string */
-    eUntermString, eString, eUntermEscapedString, eEscapedString,
-
-    /* names */
-    eIdent, eName,
-
-    /* punctuation */
-    ePeriod, eComma, eColon, eSemiColon, eQuestion, eTilde, eExclam,
-    eAtSign, eHash, eDollar, ePercent, eCaret, eAmpersand, eAsterisk,
-    ePlus, eMinus, eAssign, eFwdSlash, eBackSlash, ePipe,
-
-    /* paired punctuation */
-    eLeftParen, eRightParen,
-    eLeftCurly, eRightCurly,
-    eLeftAngle, eRightAngle,
-    eLeftSquare, eRightSquare,
-
-    /* compound tokens */
-    eDblPeriod, eDblColon, eEllipsis, eLogAnd, eLogOr,
-    eEqual, eNotEqual, eColonAssign, ePlusAssign, eOverArrow,
-
-    eDblLeftAngle, eDblRightAngle,
-    eDblLeftSquare, eDblRightSquare,
-
-    /* first free id */
-    eNumTokenIDs,
-
-    /* namespace type - needed by KSymTable */
-    eNamespace = eNumTokenIDs,
-    eNumSymtabIDs
-};
-
-
-/*--------------------------------------------------------------------------
- * KToken
- *  a string with an id and source information
- */
-typedef struct KToken KToken;
-struct KToken
-{
-    const KTokenText *txt;
-    struct KSymbol *sym;
-    String str;
-    uint32_t id;
-    uint32_t lineno;
-};
-
-
-/* conversion operators
- *  since the constants have a type id, the entire token is used
- */
-KLIB_EXTERN rc_t CC KTokenToI32 ( const KToken *self, int32_t *i );
-KLIB_EXTERN rc_t CC KTokenToU32 ( const KToken *self, uint32_t *i );
-KLIB_EXTERN rc_t CC KTokenToI64 ( const KToken *self, int64_t *i );
-KLIB_EXTERN rc_t CC KTokenToU64 ( const KToken *self, uint64_t *i );
-KLIB_EXTERN rc_t CC KTokenToF64 ( const KToken *self, double *d );
-KLIB_EXTERN rc_t CC KTokenToVersion ( const KToken *self, uint32_t *v );
-KLIB_EXTERN rc_t CC KTokenToString ( const KToken *self, char *buffer, size_t bsize, size_t *size );
-KLIB_EXTERN rc_t CC KTokenToWideString ( const KToken *self, uint32_t *buffer, uint32_t blen, uint32_t *len );
-
-
-/*--------------------------------------------------------------------------
- * KTokenSource
- *  a modifiable source of tokens
- */
-typedef struct KTokenSource KTokenSource;
-struct KTokenSource
-{
-    const KTokenText *txt;
-    String str;
-    uint32_t lineno;
-};
-
-/* Init
- */
-#define KTokenSourceInit( self, tt ) \
-    ( void ) ( ( self ) -> str = ( tt ) -> str, \
-               ( self ) -> txt = ( tt ), \
-               ( self ) -> lineno = 1 )
-#ifndef KTokenSourceInit
-KLIB_EXTERN void CC KTokenSourceInit ( KTokenSource *self, const KTokenText *txt );
-#endif
-
-/* Return
- *  returns token to source
- */
-KLIB_EXTERN void CC KTokenSourceReturn ( KTokenSource *self, const KToken *t );
-
-
-/* Consume
- *  consumes all remaining data
- */
-KLIB_EXTERN void CC KTokenSourceConsume ( KTokenSource *self );
-
-
-/* Avail
- *  the number of characters available
- */
-#define KTokenSourceAvail( self ) \
-    ( ( ( const KTokenSource* ) ( self ) ) -> str . len )
-#ifndef KTokenSourceAvail
-KLIB_EXTERN uint32_t CC KTokenSourceAvail ( const KTokenSource *self );
-#endif
-
-/*--------------------------------------------------------------------------
- * KTokenizer
- *  an encapsulation of the tokenizer code
- */
-typedef struct KTokenizer KTokenizer;
-
-
-/* Next
- *  scan for next token
- *
- *  "src" [ IN ] - source of token text
- *
- *  "t" [ OUT ] - scanned token
- *
- *  returns a pointer to "t" for convenience
- */
-KLIB_EXTERN KToken* CC KTokenizerNext ( const KTokenizer *self, KTokenSource *src, KToken *t );
-
-
-/* kDefaultTokenizer
- *  a constant KTokenizer* to obtain default behavior
- */
-#define kDefaultTokenizer ( ( const KTokenizer* ) 0 )
-
-
-/* kLineTokenizer
- *  behaves like default tokenizer
- *  except that eEndOfLine tokens are returned
- */
-#define kLineTokenizer ( ( const KTokenizer* ) 1 )
-
-
-/* kPOSIXPathTokenizer
- *  tokenizes a POSIX path string
- */
-#define kPOSIXPathTokenizer ( ( const KTokenizer* ) 2 )
-
-/* kKfgTokenizer
- * tokenizes a KFG config file 
- * with its name value pairs and comments
- */
-#define kKfgTokenizer  ( ( const KTokenizer* ) 3 )
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_token_ */
diff --git a/interfaces/klib/trie.h b/interfaces/klib/trie.h
deleted file mode 100644
index 0532c6a..0000000
--- a/interfaces/klib/trie.h
+++ /dev/null
@@ -1,293 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_trie_
-#define _h_klib_trie_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * TNode
- *  a node within trie
- */
-typedef struct TNode TNode;
-struct TNode
-{
-    BSTNode n;
-    String key;
-};
-
-/* TNodeMake
- *  creates a TNode of variable size
- *
- *  "n" will contain the returned node
- *
- *  "size" must be at least the size of a TNode
- */
-KLIB_EXTERN rc_t CC TNodeMake ( TNode **n, size_t size );
-
-/* TNodeWhack
- *  performs final whacking of node
- */
-KLIB_EXTERN void CC TNodeWhack ( TNode *self );
-
-
-/*--------------------------------------------------------------------------
- * Trie
- *  a tree of text nodes
- *
- *  this is a collection of { key, value } pairs, where a many-value
- *  to one key paradigm is naturally supported, as in the b-tree.
- *
- *  the desired insertion operations are:
- *   a) key -> value
- *   b) key -> { value, ... }
- *
- *  the desired retrieval operations are:
- *   a) key -> value
- *   b) key -> { value, ... }
- *   c) RE -> key : value
- *   d) RE -> { key : value, ... }
- *   e) iteration across { key : value, ... }
- *
- *  the reverse retrieval operation is externally managed by virtue of
- *  externalization of the TNode, which bundles together key and value.
- *  any external mechanism allowing access to the TNode will perform a
- *  reverse lookup.
- */
-typedef struct Trie Trie;
-struct Trie
-{
-    /* root node in the tree */
-    struct TTrans *root;
-
-    /* forward and reverse UTF-32 character maps */
-    const uint16_t *map;
-    const uint32_t *rmap;
-
-    /* range of acceptable UTF-32 input characters */
-    uint32_t first_char;
-    uint32_t last_char;
-
-    /* width of transition array */
-    uint16_t width;
-
-    /* limit to the number of values */
-    uint16_t limit;
-
-    /* automatically expand character set */
-    uint8_t cs_expand;
-
-#if _DEBUGGING
-    /* post-validate tree after every insert */
-    uint8_t validate;
-
-    uint8_t align1 [ 2 ];
-#else
-    uint8_t align1 [ 3 ];
-#endif
-};
-
-/* TrieInit
- *  initialize a text-tree structure
- *
- *  "accept" [ IN ] -  a character-set string where each character
- *  represents itself. the only exception is the '-' character,
- *  which - when sandwiched between two other characters - is
- *  interpreted en tot as a range expression. an example would be
- *  "-0-9" is identical to "-0123456789"
- *
- *  "limit" [ IN ] - sets the number of values to be accumulated in
- *  any container. if this limit would be exceeded by any insertion,
- *  the node is expanded and its values are re-distributed among
- *  its children.
- *
- *  "cs_expand" [ IN ] - if true, then any valid characters observed
- *  during insertions are automatically added to the accept character
- *  set. doing so will ensure that there are no ambiguous transitions.
- *
- *  returns status codes:
- *    EINVAL => an invalid parameter
- *    ENOMEM => failed to allocate internal structures
- */
-KLIB_EXTERN rc_t CC TrieInit ( Trie *tt, const char *accept,
-    uint32_t limit, bool cs_expand );
-
-/* TrieInsert
- *  inserts an item into tree
- *
- *  "item" [ IN ] -  a TNode forming the { key, value } pair.
- *
- *  returns status codes:
- *    EINVAL => an invalid parameter
- *    ENOMEM => failed to allocate internal structures
- */
-KLIB_EXTERN rc_t CC TrieInsert ( Trie *self, TNode *item );
-
-/* TrieInsertUnique
- *  behaves like TrieInsert if the key does not already have an
- *  associated value. fails otherwise, returning the existing node.
- *
- *  "item" [ IN ] - { key, value } pair
- *
- *  "exist" [ OUT, NULL OKAY ] - return parameter for existing node
- *  if insert failed due to unique constraint. NULL otherwise.
- *
- *  returns status codes:
- *    EINVAL => an invalid parameter
- *    EEXIST => the key is already bound to a value
- *    ENOMEM => failed to allocate internal structures
- */
-KLIB_EXTERN rc_t CC TrieInsertUnique ( Trie *self, TNode *item, TNode **exist );
-
-/* TrieUnlink
- *  remove an object from the tree
- *
- *  "item" [ IN ] - an actual TNode presumed to be held within tree.
- *
- *  return value:
- *    true  => node belonged to tree and was removed
- *    false => node does not belong to tree
- */
-KLIB_EXTERN bool CC TrieUnlink ( Trie *self, TNode *item );
-
-/* TrieValidate
- *  run validation check on tree structure
- *
- *  return status codes:
- *    ?
- *
- * TEMPORARY
- */
-#if 0
-KLIB_EXTERN int CC TrieValidate ( const Trie *self );
-#endif
-
-/* TrieFind
- * TrieFindRE
- *  find a single object within tree
- *
- *  "key" [ IN ] - an exact match text string
- *
- *  "re" [ IN ] - a regular expression string
- *
- *  return value:
- *    NULL    => no match
- *    TNode* => arbitrarily chosen matching node
- */
-KLIB_EXTERN TNode* CC TrieFind ( const Trie *self, const String *key );
-#if 0
-KLIB_EXTERN TNode* CC TrieFindRE ( const Trie *self, const String *re );
-#endif
-
-/* TrieFindAll
- * TrieFindAllRE
- *  find multiple objects within tree
- *
- *  "key" [ IN ] - an exact match text string
- *
- *  "re" [ IN ] - a regular expression string
- *
- *  "buffer" [ OUT ] and "capacity" [ IN ] - a user-supplied
- *  array of TNode* with a capacity of "capacity" elements.
- *  if successful, the entire found set will be returned unordered within.
- *
- *  "num_found" [ OUT ] - indicates the size of the found set,
- *  regardless of return value, such that if the supplied
- *  buffer were to be too small, the required size is returned.
- *
- *  returns status codes:
- *    EINVAL  => an invalid parameter
- *    ENOENT  => the found set was empty
- *    ENOBUFS => the found set was too large
- */
-KLIB_EXTERN rc_t CC TrieFindAll ( const Trie *self, const String *key,
-    TNode *buffer [], uint32_t capacity, uint32_t *num_found );
-#if 0
-KLIB_EXTERN rc_t CC TrieFindAllRE ( const Trie *self, const String *re,
-    TNode *buffer [], uint32_t capacity, uint32_t *num_found );
-#endif
-
-/* TrieForEach
- *  executes a function on each tree element
- *
- *  "f" [ IN ] and "data" [ IN ] - iteration callback function for
- *  examining each TNode in the tree
- */
-KLIB_EXTERN void CC TrieForEach ( const Trie *self,
-    void ( CC * f ) ( TNode *n, void *data ), void *data );
-
-/* TrieDoUntil
- *  executes a function on each tree element
- *  until the function returns true
- *
- *  "f" [ IN ] and "data" [ IN ] - iteration callback function for
- *  examining each TNode in the tree. the function returns "true"
- *  to halt iteration.
- *
- *  return values:
- *    the last value returned by "f" or false if never invoked
- */
-KLIB_EXTERN bool CC TrieDoUntil ( const Trie *self,
-    bool ( CC * f ) ( TNode *n, void *data ), void *data );
-
-/* TrieExplore
- *  executes a function on each element in the path of the key
- *  from furthest node to closest node
- *  until the function returns true or end of chain
- */
-KLIB_EXTERN bool CC TrieExplore ( const Trie *self, const String *key,
-    bool ( CC * f ) ( TNode *n, void *data ), void *data );
-
-/* TrieWhack
- *  tears down internal structure
- *
- *  "whack" [ IN, NULL OKAY ] and "data" [ IN ] - optional function
- *  to be invoked on TNode objects contained within. if NULL, the
- *  nodes will be whacked via "TNodeWhack"
- */
-KLIB_EXTERN void CC TrieWhack ( Trie *self,
-    void ( CC * whack ) ( TNode *n, void *data ), void *data );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_trie_ */
diff --git a/interfaces/klib/vector.h b/interfaces/klib/vector.h
deleted file mode 100644
index e615a5a..0000000
--- a/interfaces/klib/vector.h
+++ /dev/null
@@ -1,539 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_vector_
-#define _h_klib_vector_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KVector
- *  encapsulated vector interface
- *
- *  a vector obeys a particular set of messages
- *  it may be implemented as an array, but not necessarily.
- *
- *  the principal property of a vector is that it acts as a map
- *  between an integer key and a value of some type. in this case,
- *  we only accept unsigned integers as keys.
- */
-typedef struct KVector KVector;
-
-
-/* Make
- *  create an empty vector
- */
-KLIB_EXTERN rc_t CC KVectorMake ( KVector **v );
-
-
-/* AddRef
- * Release
- */
-KLIB_EXTERN rc_t CC KVectorAddRef ( const KVector *self );
-KLIB_EXTERN rc_t CC KVectorRelease ( const KVector *self );
-
-
-/* Get
- *  get an untyped value
- *  returns rc_t state of rcNull if index is not set
- *
- *  "key" [ IN ] - vector index
- *
- *  "value_buffer" [ OUT ] and "bsize" [ IN ] - return buffer for value
- *
- *  "bytes" [ OUT ] - return parameter for bytes in value
- *
- * NB - if rc_t state is rcInsufficient, "bytes" will contain
- *  the number of bytes required to access the indexed value
- */
-KLIB_EXTERN rc_t CC KVectorGet ( const KVector *self, uint64_t key,
-    void *value_buffer, size_t bsize, size_t *bytes );
-
-/* Get
- *  get typed values
- *  returns rc_t state of rcNull if index is not set
- *
- *  "key" [ IN ] - vector index
- *
- *  "value" [ OUT ] - return parameter for value
- */
-KLIB_EXTERN rc_t CC KVectorGetBool ( const KVector *self, uint64_t key, bool *value );
-KLIB_EXTERN rc_t CC KVectorGetBoolOld ( const KVector *self, uint64_t key, bool *value );
-
-KLIB_EXTERN rc_t CC KVectorGetI8 ( const KVector *self, uint64_t key, int8_t *value );
-KLIB_EXTERN rc_t CC KVectorGetI16 ( const KVector *self, uint64_t key, int16_t *value );
-KLIB_EXTERN rc_t CC KVectorGetI32 ( const KVector *self, uint64_t key, int32_t *value );
-KLIB_EXTERN rc_t CC KVectorGetI64 ( const KVector *self, uint64_t key, int64_t *value );
-
-KLIB_EXTERN rc_t CC KVectorGetU8 ( const KVector *self, uint64_t key, uint8_t *value );
-KLIB_EXTERN rc_t CC KVectorGetU16 ( const KVector *self, uint64_t key, uint16_t *value );
-KLIB_EXTERN rc_t CC KVectorGetU32 ( const KVector *self, uint64_t key, uint32_t *value );
-KLIB_EXTERN rc_t CC KVectorGetU64 ( const KVector *self, uint64_t key, uint64_t *value );
-
-KLIB_EXTERN rc_t CC KVectorGetF32 ( const KVector *self, uint64_t key, float *value );
-KLIB_EXTERN rc_t CC KVectorGetF64 ( const KVector *self, uint64_t key, double *value );
-
-KLIB_EXTERN rc_t CC KVectorGetPtr ( const KVector *self, uint64_t key, void **value );
-
-
-/* GetFirst
- *  get first non-null element
- *  returns key of found element in "first"
- */
-KLIB_EXTERN rc_t CC KVectorGetFirst ( const KVector *self, uint64_t *first,
-    void *value_buffer, size_t bsize, size_t *bytes );
-
-KLIB_EXTERN rc_t CC KVectorGetFirstBool ( const KVector *self, uint64_t *first, bool *value );
-
-KLIB_EXTERN rc_t CC KVectorGetFirstI8 ( const KVector *self, uint64_t *first, int8_t *value );
-KLIB_EXTERN rc_t CC KVectorGetFirstI16 ( const KVector *self, uint64_t *first, int16_t *value );
-KLIB_EXTERN rc_t CC KVectorGetFirstI32 ( const KVector *self, uint64_t *first, int32_t *value );
-KLIB_EXTERN rc_t CC KVectorGetFirstI64 ( const KVector *self, uint64_t *first, int64_t *value );
-
-KLIB_EXTERN rc_t CC KVectorGetFirstU8 ( const KVector *self, uint64_t *first, uint8_t *value );
-KLIB_EXTERN rc_t CC KVectorGetFirstU16 ( const KVector *self, uint64_t *first, uint16_t *value );
-KLIB_EXTERN rc_t CC KVectorGetFirstU32 ( const KVector *self, uint64_t *first, uint32_t *value );
-KLIB_EXTERN rc_t CC KVectorGetFirstU64 ( const KVector *self, uint64_t *first, uint64_t *value );
-
-KLIB_EXTERN rc_t CC KVectorGetFirstF32 ( const KVector *self, uint64_t *first, float *value );
-KLIB_EXTERN rc_t CC KVectorGetFirstF64 ( const KVector *self, uint64_t *first, double *value );
-
-KLIB_EXTERN rc_t CC KVectorGetFirstPtr ( const KVector *self, uint64_t *first, void **value );
-
-
-/* GetPrev
- *  given a starting key, get first previous non-null element
- *  returns key of found element in "prev"
- */
-KLIB_EXTERN rc_t CC KVectorGetPrev ( const KVector *self, uint64_t *prev,
-    uint64_t key, void *value_buffer, size_t bsize, size_t *bytes );
-
-KLIB_EXTERN rc_t CC KVectorGetPrevBool ( const KVector *self,
-    uint64_t *prev, uint64_t key, bool *value );
-KLIB_EXTERN rc_t CC KVectorGetPrevBoolOld ( const KVector *self,
-    uint64_t *prev, uint64_t key, bool *value );
-
-KLIB_EXTERN rc_t CC KVectorGetPrevI8 ( const KVector *self,
-    uint64_t *prev, uint64_t key, int8_t *value );
-KLIB_EXTERN rc_t CC KVectorGetPrevI16 ( const KVector *self,
-    uint64_t *prev, uint64_t key, int16_t *value );
-KLIB_EXTERN rc_t CC KVectorGetPrevI32 ( const KVector *self,
-    uint64_t *prev, uint64_t key, int32_t *value );
-KLIB_EXTERN rc_t CC KVectorGetPrevI64 ( const KVector *self,
-    uint64_t *prev, uint64_t key, int64_t *value );
-
-KLIB_EXTERN rc_t CC KVectorGetPrevU8 ( const KVector *self,
-    uint64_t *prev, uint64_t key, uint8_t *value );
-KLIB_EXTERN rc_t CC KVectorGetPrevU16 ( const KVector *self,
-    uint64_t *prev, uint64_t key, uint16_t *value );
-KLIB_EXTERN rc_t CC KVectorGetPrevU32 ( const KVector *self,
-    uint64_t *prev, uint64_t key, uint32_t *value );
-KLIB_EXTERN rc_t CC KVectorGetPrevU64 ( const KVector *self,
-    uint64_t *prev, uint64_t key, uint64_t *value );
-
-KLIB_EXTERN rc_t CC KVectorGetPrevF32 ( const KVector *self,
-    uint64_t *prev, uint64_t key, float *value );
-KLIB_EXTERN rc_t CC KVectorGetPrevF64 ( const KVector *self,
-    uint64_t *prev, uint64_t key, double *value );
-
-KLIB_EXTERN rc_t CC KVectorGetPrevPtr ( const KVector *self,
-    uint64_t *prev, uint64_t key, void **value );
-
-
-/* GetNext
- *  given a starting key, get first following non-null element
- *  returns key of found element in "next"
- */
-KLIB_EXTERN rc_t CC KVectorGetNext ( const KVector *self, uint64_t *next,
-    uint64_t key, void *value_buffer, size_t bsize, size_t *bytes );
-
-KLIB_EXTERN rc_t CC KVectorGetNextBool ( const KVector *self,
-    uint64_t *next, uint64_t key, bool *value );
-KLIB_EXTERN rc_t CC KVectorGetNextBoolOld ( const KVector *self,
-    uint64_t *next, uint64_t key, bool *value );
-
-KLIB_EXTERN rc_t CC KVectorGetNextI8 ( const KVector *self,
-    uint64_t *next, uint64_t key, int8_t *value );
-KLIB_EXTERN rc_t CC KVectorGetNextI16 ( const KVector *self,
-    uint64_t *next, uint64_t key, int16_t *value );
-KLIB_EXTERN rc_t CC KVectorGetNextI32 ( const KVector *self,
-    uint64_t *next, uint64_t key, int32_t *value );
-KLIB_EXTERN rc_t CC KVectorGetNextI64 ( const KVector *self,
-    uint64_t *next, uint64_t key, int64_t *value );
-
-KLIB_EXTERN rc_t CC KVectorGetNextU8 ( const KVector *self,
-    uint64_t *next, uint64_t key, uint8_t *value );
-KLIB_EXTERN rc_t CC KVectorGetNextU16 ( const KVector *self,
-    uint64_t *next, uint64_t key, uint16_t *value );
-KLIB_EXTERN rc_t CC KVectorGetNextU32 ( const KVector *self,
-    uint64_t *next, uint64_t key, uint32_t *value );
-KLIB_EXTERN rc_t CC KVectorGetNextU64 ( const KVector *self,
-    uint64_t *next, uint64_t key, uint64_t *value );
-
-KLIB_EXTERN rc_t CC KVectorGetNextF32 ( const KVector *self,
-    uint64_t *next, uint64_t key, float *value );
-KLIB_EXTERN rc_t CC KVectorGetNextF64 ( const KVector *self,
-    uint64_t *next, uint64_t key, double *value );
-
-KLIB_EXTERN rc_t CC KVectorGetNextPtr ( const KVector *self,
-    uint64_t *next, uint64_t key, void **value );
-
-
-/* Set
- *  set an untyped value
- *
- *  "key" [ IN ] - vector index
- *
- *  "value" [ IN ] and "bytes" [ IN ] - value buffer
- */
-KLIB_EXTERN rc_t CC KVectorSet ( KVector *self, uint64_t key,
-    const void *value, size_t bytes );
-
-/* Set
- *  set typed values
- *
- *  "key" [ IN ] - vector index
- *
- *  "data" [ IN ] - value
- */
-KLIB_EXTERN rc_t CC KVectorSetBool ( KVector *self, uint64_t key, bool value );
-KLIB_EXTERN rc_t CC KVectorSetBoolOld ( KVector *self, uint64_t key, bool value );
-
-KLIB_EXTERN rc_t CC KVectorSetI8 ( KVector *self, uint64_t key, int8_t value );
-KLIB_EXTERN rc_t CC KVectorSetI16 ( KVector *self, uint64_t key, int16_t value );
-KLIB_EXTERN rc_t CC KVectorSetI32 ( KVector *self, uint64_t key, int32_t value );
-KLIB_EXTERN rc_t CC KVectorSetI64 ( KVector *self, uint64_t key, int64_t value );
-
-KLIB_EXTERN rc_t CC KVectorSetU8 ( KVector *self, uint64_t key, uint8_t value );
-KLIB_EXTERN rc_t CC KVectorSetU16 ( KVector *self, uint64_t key, uint16_t value );
-KLIB_EXTERN rc_t CC KVectorSetU32 ( KVector *self, uint64_t key, uint32_t value );
-KLIB_EXTERN rc_t CC KVectorSetU64 ( KVector *self, uint64_t key, uint64_t value );
-
-KLIB_EXTERN rc_t CC KVectorSetF32 ( KVector *self, uint64_t key, float value );
-KLIB_EXTERN rc_t CC KVectorSetF64 ( KVector *self, uint64_t key, double value );
-
-KLIB_EXTERN rc_t CC KVectorSetPtr ( KVector *self, uint64_t key, const void *value );
-
-
-/* Unset
- *  unset an entry
- *  returns rc_t state rcNull if index is not set
- *
- *  "key" [ IN ] - vector index
- */
-KLIB_EXTERN rc_t CC KVectorUnset ( KVector *self, uint64_t key );
-
-
-/* Visit
- *  executes a function on each key/value pair
- *  returns early if "f" returns non-zero rc_t
- *
- *  "reverse" [ IN ] - if true, execute in reverse order
- *
- *  "f" [ IN ] and "user_data" [ IN, OPAQUE ] - function to be
- *  executed on each vector element or until the function
- *  returns true.
- */
-KLIB_EXTERN rc_t CC KVectorVisit ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, const void *value, size_t bytes, void *user_data ),
-    void *user_data );
-
-/* Visit
- *  visit typed values
- *  returns early if "f" returns non-zero rc_t
- *
- *  "reverse" [ IN ] - if true, execute in reverse order
- *
- *  "f" [ IN ] and "user_data" [ IN, OPAQUE ] - function to be
- *  executed on each vector element or until the function
- *  returns true.
- */
-KLIB_EXTERN rc_t CC KVectorVisitBool ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, bool value, void *user_data ),
-    void *user_data );
-KLIB_EXTERN rc_t CC KVectorVisitBoolOld ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, bool value, void *user_data ),
-    void *user_data );
-KLIB_EXTERN rc_t CC KVectorVisitI64 ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, int64_t value, void *user_data ),
-    void *user_data );
-KLIB_EXTERN rc_t CC KVectorVisitU64 ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, uint64_t value, void *user_data ),
-    void *user_data );
-KLIB_EXTERN rc_t CC KVectorVisitU32 ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, uint32_t value, void *user_data ),
-    void *user_data );
-KLIB_EXTERN rc_t CC KVectorVisitF64 ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, double value, void *user_data ),
-    void *user_data );
-KLIB_EXTERN rc_t CC KVectorVisitPtr ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, const void *value, void *user_data ),
-    void *user_data );
-
-
-
-/*--------------------------------------------------------------------------
- * Vector
- *  simple vector of void*
- */
-typedef struct Vector Vector;
-struct Vector
-{
-    void **v;
-    uint32_t start;
-    uint32_t len;
-    uint32_t mask;
-};
-
-/* Init
- *  initialize vector
- *
- *  "start" [ IN ] - initial index to vector, normally 0
- *
- *  "block" [ IN ] - selects the number of elements in
- *  a vector block; used for allocating and extending
- */
-KLIB_EXTERN void CC VectorInit ( Vector *self, uint32_t start, uint32_t block );
-
-
-/* Copy
- *  initialize a new vector from an existing one
- *  performs a shallow copy
- */
-KLIB_EXTERN rc_t CC VectorCopy ( const Vector *self, Vector *copy );
-
-
-/* Start
- *  returns the starting index
- */
-#define VectorStart( self ) \
-    ( * ( const uint32_t* ) & ( ( self ) -> start ) )
-
-
-/* Length
- *  return the vector length
- */
-#define VectorLength( self ) \
-    ( * ( const uint32_t* ) & ( ( self ) -> len ) )
-
-
-/* Block
- *  return the vector expansion block size
- */
-#define VectorBlock( self ) \
-    ( * ( const uint32_t* ) & ( ( self ) -> mask ) + 1 )
-
-
-/* Get
- *  retrieve an indexed element
- */
-KLIB_EXTERN void* CC VectorGet ( const Vector *self, uint32_t idx );
-
-
-/* Set
- *  sets an indexed element
- *  extends vector as required
- *
- *  "idx" [ IN ] - item index
- *
- *  "item" [ IN, OPAQUE ] - item to be appended to vector
- *
- *  returns rcExists if element is not NULL
- */
-KLIB_EXTERN rc_t CC VectorSet ( Vector *self, uint32_t idx, const void *item );
-
-
-/* Swap
- *  swaps value of an indexed element
- *  behaves like Set except that it allows overwrite
- *
- *  "idx" [ IN ] - item index
- *
- *  "item" [ IN, OPAQUE ] - new element value
- *
- *  "prior" [ OUT ] - prior element value
- */
-KLIB_EXTERN rc_t CC VectorSwap ( Vector *self, uint32_t idx,
-    const void *item, void **prior );
-
-
-/* Append
- *  appends item to end of vector
- *
- *  "idx" [ OUT, NULL OKAY ] - optional return parameter for item index
- *
- *  "item" [ IN, OPAQUE ] - item to be appended to vector
- */
-KLIB_EXTERN rc_t CC VectorAppend ( Vector *self, uint32_t *idx, const void *item );
-
-
-/* First
- * Last
- *  get item at either end of vector
- */
-KLIB_EXTERN void* CC VectorFirst ( const Vector *self );
-KLIB_EXTERN void* CC VectorLast ( const Vector *self );
-
-
-/* Find
- *  find an object within ordered vector
- *
- *  "key" [ IN ] - find criteria
- *
- *  "idx" [ OUT, NULL OKAY ] - optional return parameter for item index
- *
- *  "cmp" [ IN ] - comparison function that returns
- *  equivalent of "key" - "n"
- */
-KLIB_EXTERN void* CC VectorFind ( const Vector *self, const void *key, uint32_t *idx,
-    int64_t ( CC * cmp ) ( const void *key, const void *n ) );
-
-
-/* Insert
- *  insert an object to vector, even if duplicate
- *
- *  "item" [ IN ] - object to insert
- *
- *  "idx" [ OUT, NULL OKAY ] - optional return parameter for item index
- *
- *  "sort" [ IN ] - comparison function that returns
- *  equivalent of "item" - "n"
- *
- *  the treatment of order for items reported as identical
- *  i.e. sort function returns zero when they are compared,
- *  is undefined.
- *
- *  the current implementation treats '<=' as '<' such
- *  that all inserts are converted to a '<' or '>' comparison,
- *  but this should not be relied upon.
- */
-KLIB_EXTERN rc_t CC VectorInsert ( Vector *self, const void *item, uint32_t *idx,
-    int64_t ( CC * sort ) ( const void *item, const void *n ) );
-
-
-/* InsertUnique
- *  insert an object to vector, but only if unique.
- *
- *  "item" [ IN ] - object to insert
- *
- *  "idx" [ OUT, NULL OKAY ] - optional return parameter for
- *  item index. when return code state is rcExists, this value
- *  will be that of the existing item.
- *
- *  "sort" [ IN ] - comparison function that returns
- *  equivalent of "item" - "n"
- */
-KLIB_EXTERN rc_t CC VectorInsertUnique ( Vector *self, const void *item, uint32_t *idx,
-    int64_t ( CC * sort ) ( const void *item, const void *n ) );
-
-
-/* Merge
- *  merge a sorted vector into an existing, sorted vector
- *
- *  "unique" [ IN ] - eliminate duplicates if true
- *
- *  "v" [ IN ] - sorted vector of elements to merge
- *
- *  "sort" [ IN ] - comparison function that returns
- *  equivalent of "item" - "n"
- */
-KLIB_EXTERN rc_t CC VectorMerge ( Vector *self, bool unique, const Vector *v,
-    int64_t ( CC * sort ) ( const void *item, const void *n ) );
-
-
-/* Remove
- *  retrieves value at given index
- *  shifts all elements to right of index toward start,
- *  preserving order and decrements length by 1
- *  return removed item
- *
- *  "idx" [ IN ] - item index
- *
- *  "removed" [ OUT ] - removed element value
- */
-KLIB_EXTERN rc_t CC VectorRemove ( Vector *self, uint32_t idx, void **removed );
-
-
-/* Reorder
- *  execute ksort on vector with provided function
- */
-KLIB_EXTERN void CC VectorReorder ( Vector *self,
-    int64_t ( CC * cmp ) ( const void**, const void**, void *data ), void *data );
-
-
-/* ForEach
- *  executes a function on each vector element
- *
- *  "reverse" [ IN ] - if true, execute in reverse order
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - function to be
- *  executed on each vector element
- */
-KLIB_EXTERN void CC VectorForEach ( const Vector *self, bool reverse,
-    void ( CC * f ) ( void *item, void *data ), void *data );
-
-
-/* DoUntil
- *  executes a function on each element
- *  until the function returns true
- *
- *  "reverse" [ IN ] - if true, execute in reverse order
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - function to be
- *  executed on each vector element or until the function
- *  returns true.
- *
- *  return values:
- *    false unless "f" returns true
- */
-KLIB_EXTERN bool CC VectorDoUntil ( const Vector *self, bool reverse,
-    bool ( CC * f ) ( void *item, void *data ), void *data );
-
-
-/* Whack
- *  removes entries from vector and
- *  executes a user provided destructor
- */
-KLIB_EXTERN void CC VectorWhack ( Vector *self,
-    void ( CC * whack ) ( void *item, void *data ), void *data );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_vector_ */
diff --git a/interfaces/klib/vlen-encode.h b/interfaces/klib/vlen-encode.h
deleted file mode 100644
index c6527dc..0000000
--- a/interfaces/klib/vlen-encode.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_klib_vlen_encode_
-#define _h_klib_vlen_encode_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*****************************************************************************
- * This encoding is very similar to X.690's BER and/or Perl's pack('w').
- * It differs in that it handles signed values.
- * It uses bit 6 (of 7..0) of the first byte to store the sign.
- * The layout of bits from 7 to 0, from MSB to LSB is
- *  CSXXXXXX(CXXXXXXX)*
- * where:
- *  C is the continuation flag
- *  S is the sign flag, and
- *  X are the digits of the absolute value of the encoded number.
- * Thus a number x: |x| <
- *  0x40 is encoded in 1 byte,
- *  0x2000 in 2,
- *  0x80000000000000 (i.e. a 55 bit number) in 8, etc.
- * The worst case requires 10 bytes to encode.
- */
-
-/*****************************************************************************
- * encode 1 value into buffer
- *
- * Parameters:
- *  dst, dsize: buffer to write into of length dsize, can be null, 0
- *  act_size: (optional) number of bytes needed to encode
- *  x: the value to encode
- */
-KLIB_EXTERN rc_t CC vlen_encode1 ( void *dst, uint64_t dsize, uint64_t *act_size, int64_t x );
-
-/*****************************************************************************
- * encode array into buffer
- *
- * Parameters:
- *  dst, dsize: buffer to write into of length dsize, can be null, 0
- *  act_size: (optional) number of bytes needed to encode
- *  x, xcount: the array of xcount elements to encode
- */
-KLIB_EXTERN rc_t CC vlen_encode ( void *dst, uint64_t dsize, uint64_t *act_size, 
-        const int64_t x[], uint32_t xcount );
-
-/*****************************************************************************
- * decode 1 value from buffer
- *
- * Parameters:
- *  y: result
- *  src, ssize: buffer to read from of length ssize
- *  consumed: (optional) number of bytes used from src
- */
-KLIB_EXTERN rc_t CC vlen_decode1 ( int64_t *y, const void *src,
-        uint64_t ssize, uint64_t *consumed );
-
-/*****************************************************************************
- * decode array from buffer
- *
- * Parameters:
- *  y, count: result array of ycount elements
- *  src, ssize: buffer to read from of length ssize
- *  consumed: (optional) number of bytes used from src
- */
-KLIB_EXTERN rc_t CC vlen_decode ( int64_t *y, uint64_t ycount, const void *src,
-        uint64_t ssize, uint64_t *consumed );
-
-
-/*****************************************************************************
- * This encoding is very similar to X.690's BER and/or Perl's pack('w').
- * The layout of bits from 7 to 0, from MSB to LSB is
- *  CXXXXXXX(CXXXXXXX)*
- * where:
- *  C is the continuation flag
- *  X are the digits of the encoded number.
- * The worst case requires 10 bytes to encode.
- */
-
-/*****************************************************************************
- * encode 1 value into buffer
- *
- * Parameters:
- *  dst, dsize: buffer to write into of length dsize, can be null, 0
- *  act_size: (optional) number of bytes needed to encode
- *  x: the value to encode
- */
-KLIB_EXTERN rc_t CC vlen_encodeU1 ( void *dst, uint64_t dsize,
-        uint64_t *act_size, uint64_t x );
-
-/*****************************************************************************
- * encode array into buffer
- *
- * Parameters:
- *  dst, dsize: buffer to write into of length dsize, can be null, 0
- *  act_size: (optional) number of bytes needed to encode
- *  x, xcount: the array of xcount elements to encode
- */
-KLIB_EXTERN rc_t CC vlen_encodeU ( void *dst, uint64_t dsize, uint64_t *act_size,
-        const uint64_t x[], uint32_t xcount );
-
-/*****************************************************************************
- * decode 1 value from buffer
- *
- * Parameters:
- *  y: result
- *  src, ssize: buffer to read from of length ssize
- *  consumed: (optional) number of bytes used from src
- */
-KLIB_EXTERN rc_t CC vlen_decodeU1 ( uint64_t *y, const void *src, 
-        uint64_t ssize, uint64_t *consumed );
-
-/*****************************************************************************
- * decode array from buffer
- *
- * Parameters:
- *  y, count: result array of ycount elements
- *  src, ssize: buffer to read from of length ssize
- *  consumed: (optional) number of bytes used from src
- */
-KLIB_EXTERN rc_t CC vlen_decodeU ( uint64_t *y, uint64_t ycount, const void *src, 
-        uint64_t ssize, uint64_t *consumed );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_vlen_encode_ */
diff --git a/interfaces/klib/writer.h b/interfaces/klib/writer.h
deleted file mode 100644
index 4c8c175..0000000
--- a/interfaces/klib/writer.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_klib_writer_
-#define _h_klib_writer_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_klib_logfmt_
-#include <klib/logfmt.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* ----------
- * The writer module (which contains the log, status, out, and debug sub-modules)
- * is an ecapsulation and virtualization of standard output.
- *
- *  this logging API - like most others - attempts to remain isolated
- *  from any actual logging implementation, such that output may be
- *  routed in several ways.
- *
- *  the default handler
- *
- *  the path from unstructured text to formatted XML is difficult in that
- *  it requires parsing, and is therefore error prone.
- *
- *  the path from structured reports to XML as well as less or unstructured
- *  text is simple to implement, but generally more of a burden to use.
- *
- *  the challenge is therefore to present an API that makes structured
- *  logging less painful than it might be.
- *
- *
- * There are two parts with an unfortunate legacy quirky combination.
- *  There is a formater that will be shared by all sub-modules.
- *  There is the actual stream writer.
- *
- * Each submodule will have one or more calls that call the formatter and writer functions.
- */
-KLIB_EXTERN rc_t CC KWrtInit ( const char * appname, uint32_t vers );
-
-/* -----
- * The writer module core file/stream output function:
- *
- * The function's prototype matches as much as possible the KFS file writer prototype.
- *
- * If the self structure contained a KFile * and a position it could use the KFS file write
- */
-
-typedef rc_t ( CC * KWrtWriter ) ( void * self, const char * buffer, size_t bufsize, size_t * num_writ );
-
-/* ----
- * a Writer handler combines the function and its self object
- */
-typedef struct KWrtHandler
-{
-    KWrtWriter writer;
-    void *     data;    /* the actual type depends upon the writer function */
-} KWrtHandler;
-
-
-/*--------------------------------------------------------------------------
- * nvp - name/value pair
- */
-typedef struct wrt_nvp_t_struct {
-    const char *name;
-    const char *value;
-} wrt_nvp_t;
-
-KLIB_EXTERN void CC wrt_nvp_sort(size_t argc, wrt_nvp_t argv[]);
-KLIB_EXTERN const wrt_nvp_t* CC wrt_nvp_find( size_t argc, const wrt_nvp_t argv[], const char* key );
-KLIB_EXTERN const char* CC wrt_nvp_find_value( size_t argc, const wrt_nvp_t argv[], const char* key );
-
-/* -----
- * The formatter module core file/stream output function:
- *
- */
-
-typedef rc_t ( CC * KFmtWriter ) ( void* self, KWrtHandler* writer,
-                                   size_t argc, const wrt_nvp_t args[],
-                                   size_t envc, const wrt_nvp_t envs[]);
-/* ----
- * a formatter handler combines the function and custom data
- */
-typedef struct KFmtHandler KFmtHandler;
-struct KFmtHandler
-{
-    KFmtWriter formatter;
-    void* data;    /* the actual type depends upon the writer function */
-};
-
-
-/* kprintf
- *  performs a printf to our output writer
- */
-KLIB_EXTERN rc_t CC kprintf ( size_t *num_writ, const char * fmt, ... );
-KLIB_EXTERN rc_t CC vkprintf ( size_t *num_writ, const char * fmt, va_list args );
-
-
-/* kfprintf
- *  performs a printf to a KWrtHandler
- */
-KLIB_EXTERN rc_t CC kfprintf ( const KWrtHandler *out,
-    size_t *num_writ, const char * fmt, ... );
-KLIB_EXTERN rc_t CC vkfprintf ( const KWrtHandler *out,
-    size_t *num_writ, const char * fmt, va_list args );
-
-
-/* RCExplain
- *  explains rc code in "English'ish" language
- */
-KLIB_EXTERN rc_t CC RCExplain ( rc_t rc, char *buffer, size_t bsize, size_t *num_writ );
-
-KLIB_EXTERN rc_t CC LogInsertSpace(const char *spacer, char *buffer, size_t bsize, size_t *num_writ);
-
-/* generates a timestamp-string in GMT-time */
-KLIB_EXTERN rc_t CC LogTimestamp ( char *buffer, size_t bsize, size_t *num_writ );
-
-/* generates a timestamp-string in local time */
-KLIB_EXTERN rc_t CC LogSimpleTimestamp ( char *buffer, size_t bsize, size_t *num_writ );
-
-KLIB_EXTERN rc_t CC LogPID ( char *buffer, size_t bsize, size_t *num_writ );
-KLIB_EXTERN rc_t CC LogAppName ( char *buffer, size_t bsize, size_t *num_writ );
-KLIB_EXTERN rc_t CC LogAppVersion ( char *buffer, size_t bsize, size_t *num_writ );
-
-/* FlushLine
- *  flushes a buffer through output handler
- */
-KLIB_EXTERN rc_t CC LogFlush ( const KWrtHandler * handler, const char *buffer, const size_t bsize );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_klib_writer_ */
diff --git a/interfaces/kns/adapt.h b/interfaces/kns/adapt.h
deleted file mode 100644
index dd6d2c3..0000000
--- a/interfaces/kns/adapt.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kns_adapt_
-#define _h_kns_adapt_
-
-#ifndef _h_kns_extern_
-#include <kns/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-struct KStream;
-
-
-/*--------------------------------------------------------------------------
- * KStream
- *  adapters between KFile and KStream
- */
-
-/* FromKFilePair
- *  create a KStream from a pair of KFiles
- *  maintains a "pos" marker for input and output files
- *
- *  "strm" [ OUT ] - resultant KStream
- *
- *  "read" [ IN, NULL OKAY ] - file to use for stream reading
- *
- *  "write" [ IN, NULL OKAY ] - file to use for stream writing
- *
- * NB - EITHER "read" or "write" may be NULL, but not both.
- */
-KNS_EXTERN rc_t CC KStreamFromKFilePair ( struct KStream **strm,
-    struct KFile const *read, struct KFile *write );
-
-/* FromKStreamPair
- *  create a KStream from a pair of KStreams
- *
- *  "strm" [ OUT ] - resultant KStream
- *
- *  "read" [ IN, NULL OKAY ] - stream to use for input
- *
- *  "write" [ IN, NULL OKAY ] - stream to use for output
- *
- * NB - EITHER "read" or "write" may be NULL, but not both.
- */
-KNS_EXTERN rc_t CC KStreamFromKStreamPair ( struct KStream **strm,
-    struct KStream const *read, struct KStream *write );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kns_adapt_ */
diff --git a/interfaces/kns/ascp.h b/interfaces/kns/ascp.h
deleted file mode 100644
index d79c9c8..0000000
--- a/interfaces/kns/ascp.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kns_ascp_
-#define _h_kns_ascp_
-
-#ifndef _h_kns_extern_
-#include <kns/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum
-{
-    eAscpStateRunning,
-    eAscpStateExitSuccess,
-    eAscpStateExitWriteFailure,
-    eAscpStateExitFailure
-};
-
-typedef rc_t TQuitting ( void );
-typedef bool TProgress ( uint64_t id,
-    uint64_t state, uint64_t size, uint64_t percentage );
-
-typedef struct AscpOptions AscpOptions;
-struct AscpOptions
-{
-    uint64_t src_size;
-
-    uint64_t heartbeat;       /* in milliseconds */
-
-    uint64_t id; /* to pass to the callback */
-
-    const char *host;
-    const char *user;
-    char target_rate[512];
-       /* -l MAX-RATE Set the target transfer rate in Kbps */
-
-    const char *ascp_options; /* any arbitrary options to pass to ascp */
-
-/* progress logging */
-    const char *name;
-
-    TProgress *callback;
-
-    TQuitting *quitting;
-
-    bool status; /* whether to call STSMSG */
-
-    bool cache_key; /* Add the server's host key to PuTTY's cache */
-
-    bool disabled; /* output parameter for aspera_options */
-};
-
-/**  status - whether to print STSMSG(1-2) - information messages
-    ascp_bin and private_file should be freed by the caller */
-KNS_EXTERN rc_t CC ascp_locate ( const char **ascp_bin, const char **private_file,
-    bool use_config, bool status );
-
-/** Get a file by running aspera ascp binary */
-KNS_EXTERN rc_t CC aspera_get ( const char *ascp_bin, const char *private_file,
-    const char *src, const char *dest, AscpOptions *opt );
-
-/** Fill AscpOptions members initialized by ascp library */
-KNS_EXTERN rc_t CC aspera_options ( AscpOptions *opt );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/interfaces/kns/endpoint.h b/interfaces/kns/endpoint.h
deleted file mode 100644
index ff84042..0000000
--- a/interfaces/kns/endpoint.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_kns_endpoint_
-#define _h_kns_endpoint_
-
-#ifndef _h_kns_extern_
-#include <kns/extern.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct String;
-struct KNSManager;
-
-
-/*--------------------------------------------------------------------------
- * KEndPoint
- *  describe a socket endpoint
- */
- 
-typedef uint32_t KEndPointType;
-enum
-{
-    epIPV4,
-    epIPV6,
-    epIPC
-};
-
-#define IPC_NAME_MAX 256
-
-typedef struct KEndPoint KEndPoint;
-struct KEndPoint
-{
-	union 
-	{
-		struct
-		{
-			uint32_t addr;
-			uint16_t port;
-		} ipv4;
-
-        struct
-        {
-            uint8_t addr[ 16 ];
-			uint16_t port;
-        } ipv6;
-
-		char ipc_name [ IPC_NAME_MAX ];
-	} u;
-
-    KEndPointType type;
-};
-
-
-/* InitIPv4Endpoint
- *  initialize the endpoint with an IPv4 address and port
- *
- *  "ep" [ OUT ] - address of endpoint block to be intialized
- *
- *  "ipv4" [ IN, DEFAULT 0 ] - binary IPv4 address in native integer byte order
- *   i.e. 0x7F000001 represents 127.0.0.1. if the special address 0 is given, it
- *   represents any host-local interface address.
- *
- *  "port" [ IN, DEFAULT 0 ] - binary port number in native integer byte order.
- *   if the special port number 0 is given, it represents any available port.
- */
-KNS_EXTERN rc_t CC KNSManagerInitIPv4Endpoint ( struct KNSManager const *self,
-    KEndPoint *ep, uint32_t ipv4, uint16_t port );
-
-
-/* InitIPv6Endpoint
- *  initialize the endpoint with an IPv6 address and port
- *
- *  "ep" [ OUT ] - address of endpoint block to be intialized
- *
- *  "ipv6" [ IN, DEFAULT NULL ] - binary IPv6 address in native integer byte order
- *   has to point to a 16-byte long array ( = 128 bit ). The function will make
- *   a copy of this array. 0x1 represents 0:0:0:0:0:0:0:1 the loopback-device.
- *   If the special address ::0 is given, it represents any host-local interface
- *   address. ( in6addr_any is a 16-byte array with all bytes set to zero )
- *   If a NULL-pointer is passed in, the function treats it as in6addr_any.
- *
- *  "port" [ IN, DEFAULT 0 ] - binary port number in native integer byte order.
- *   if the special port number 0 is given, it represents any available port.
- */
-KNS_EXTERN rc_t CC KNSManagerInitIPv6Endpoint ( struct KNSManager const *self,
-    KEndPoint *ep, uint8_t *ipv6, uint16_t port );
-
-
-/* InitDNSEndpoint
- *  initialize the endpoint with a DNS name and a port number
- *
- *  "ep" [ OUT ] - address of endpoint block to be intialized
- *
- *  "dns" [ IN ] - textual DNS address.
- *
- *  "port" [ IN, DEFAULT 0 ] - binary port number in native integer byte order.
- *   if the special port number 0 is given, it represents any available port.
- */
-KNS_EXTERN rc_t CC KNSManagerInitDNSEndpoint ( struct KNSManager const *self,
-    KEndPoint *ep, struct String const *dns, uint16_t port );
-
-/* InitIPCEndpoint
- *  initialize the endpoint for interprocess communication
- *
- *  "ep" [ OUT ] - address of endpoint block to be intialized
- *
- *  "name" [ IN ] - IPC channel name
- *   ( a POSIX path to a Unix socket, or a name of a Windows pipe )
- */
-KNS_EXTERN rc_t CC KNSManagerInitIPCEndpoint ( struct KNSManager const *self,
-    KEndPoint *ep, struct String const * name );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kns_endpoint_ */
diff --git a/interfaces/kns/extern.h b/interfaces/kns/extern.h
deleted file mode 100644
index afd5c00..0000000
--- a/interfaces/kns/extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kns_extern_
-#define _h_kns_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define KNS_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define KNS_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_kns_extern_ */
diff --git a/interfaces/kns/http.h b/interfaces/kns/http.h
deleted file mode 100644
index ad83600..0000000
--- a/interfaces/kns/http.h
+++ /dev/null
@@ -1,376 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kns_http_
-#define _h_kns_http_
-
-#ifndef _h_kns_extern_
-#include <kns/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-struct String;
-struct KStream;
-struct KNSManager;
-
-
-/*--------------------------------------------------------------------------
- * KNSManager
- */
-
-/* SetHTTPTimeouts
- *  sets default read/write timeouts to supply to HTTP connections
- *
- *  "readMillis" [ IN ] and "writeMillis" - when negative, infinite timeout
- *   when 0, return immediately, positive gives maximum wait time in mS
- *   for reads and writes respectively.
- */
-KNS_EXTERN rc_t CC KNSManagerSetHTTPTimeouts ( struct KNSManager * self,
-    int32_t readMillis, int32_t writeMillis );
-
-
-/* GetHTTPProxyPath
- *  returns path to HTTP proxy server ( if set ) or NULL.
- *  return status is 0 if the path is valid, non-zero otherwise
- *
- *  returned reference to String must be freed via StringWhack.
- */
-KNS_EXTERN rc_t CC KNSManagerGetHTTPProxyPath ( struct KNSManager const * self,
-    struct String const ** proxy );
-
-
-/* SetHTTPProxyPath
- *  sets a path to HTTP proxy server.
- *  a NULL path format value removes all proxy settings.
- */
-KNS_EXTERN rc_t CC KNSManagerSetHTTPProxyPath ( struct KNSManager * self,
-    const char * fmt, ... );
-KNS_EXTERN rc_t CC KNSManagerVSetHTTPProxyPath ( struct KNSManager * self,
-    const char * fmt, va_list args );
-
-
-/* GetHTTPProxyEnabled
- *  returns true iff a non-NULL proxy path exists and user wants to use it
- *  users indicate desire to use proxy through configuration or SetHTTPProxyEnabled
- */
-KNS_EXTERN bool CC KNSManagerGetHTTPProxyEnabled ( struct KNSManager const * self );
-
-
-/* SetHTTPProxyEnabled
- *  sets http-proxy enabled state to supplied value
- *  returns the prior value as a convenience
- */
-KNS_EXTERN bool CC KNSManagerSetHTTPProxyEnabled ( struct KNSManager * self, bool enabled );
-
-
-/*------------------------------------------------------------------------------
- * KFile
- *  a KFile over HTTP
- */
-
-/* Make
- */
-KNS_EXTERN rc_t CC KNSManagerMakeHttpFile ( struct KNSManager const *self,
-    struct KFile const **file, struct KStream *conn, ver_t vers, const char *url, ... );
-KNS_EXTERN rc_t CC KNSManagerVMakeHttpFile ( struct KNSManager const *self,
-    struct KFile const **file, struct KStream *conn, ver_t vers, const char *url, va_list args );
-
-
-/*--------------------------------------------------------------------------
- * KClientHttp
- *  hyper text transfer protocol
- */
-typedef struct KClientHttp KClientHttp, KHttp;
-
-
-/* MakeClientHttp
- *  create an HTTP protocol
- *
- *  "http" [ OUT ] - return parameter for HTTP object
- *
- *  "opt_conn" [ IN, NULL OKAY ] - previously opened stream for communications.
- *
- *  "vers" [ IN ] - http version
- *   the only legal types are 1.0 ( 0x01000000 ) and 1.1 ( 0x01010000 )
- *
- *  "readMillis" [ IN ] and "writeMillis" - when negative, infinite timeout
- *   when 0, return immediately, positive gives maximum wait time in mS
- *   for reads and writes respectively.
- *
- *  "host" [ IN ] - parameter to give the host dns name for the connection
- *
- *  "port" [ IN, DEFAULT ZERO ] - if zero, defaults to standard for scheme
- *   if non-zero, is taken as explicit port specification
- */
-KNS_EXTERN rc_t CC KNSManagerMakeClientHttp ( struct KNSManager const *self,
-    KClientHttp **http, struct KStream *conn, ver_t vers,
-    struct String const *host, uint32_t port );
-
-KNS_EXTERN rc_t CC KNSManagerMakeTimedClientHttp ( struct KNSManager const *self,
-    KClientHttp **http, struct KStream *opt_conn, ver_t vers,
-    int32_t readMillis, int32_t writeMillis,
-    struct String const *host, uint32_t port );
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KNS_EXTERN rc_t CC KClientHttpAddRef ( const KHttp *self );
-KNS_EXTERN rc_t CC KClientHttpRelease ( const KHttp *self );
-
-/* compatibility for existing code */
-#define KNSManagerMakeHttp KNSManagerMakeClientHttp
-#define KNSManagerMakeTimedHttp KNSManagerMakeTimedClientHttp
-#define KHttpAddRef KClientHttpAddRef
-#define KHttpRelease KClientHttpRelease
-
-
-/*------------------------------------------------------------------------------
- * KClientHttpRequest
- *  hyper text transfer protocol
- *  a client request
- */
-typedef struct KClientHttpRequest KClientHttpRequest, KHttpRequest;
-
-
-/* MakeRequest
- *  create a request that can be used to contact HTTP server
- *
- *  "req" [ OUT ] - return parameter for HTTP request object
- *
- *  "vers" [ IN ] - http version
- *
- *  "conn" [ IN, NULL OKAY ] - previously opened stream for communications.
- *
- *  "url" [ IN ] - full resource identifier. if "conn" is NULL,
- *   the url is parsed for remote endpoint and is opened by mgr.
- */
-KNS_EXTERN rc_t CC KClientHttpMakeRequest ( const KClientHttp *self,
-    KClientHttpRequest **req, const char *url, ... );
-
-KNS_EXTERN rc_t CC KNSManagerMakeClientRequest ( struct KNSManager const *self,
-    KClientHttpRequest **req, ver_t version, struct KStream *conn, const char *url, ... );
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KNS_EXTERN rc_t CC KClientHttpRequestAddRef ( const KClientHttpRequest *self );
-KNS_EXTERN rc_t CC KClientHttpRequestRelease ( const KClientHttpRequest *self );
-
-
-/* Connection
- *  sets connection management headers
- *
- *  "close" [ IN ] - if "true", inform the server to close the connection
- *   after its response ( default for version 1.0 ). when "false" ( default
- *   for version 1.1 ), ask the server to keep the connection open.
- *
- * NB - the server is not required to honor the request
- */
-KNS_EXTERN rc_t CC KClientHttpRequestConnection ( KClientHttpRequest *self, bool close );
-
-
-/* SetNoCache
- *  guard against over-eager proxies that try to cache entire files
- *  and handle byte-ranges locally.
- */
-KNS_EXTERN rc_t CC KClientHttpRequestSetNoCache ( KClientHttpRequest *self );
-
-
-/* ByteRange
- *  set requested byte range of response
- *
- *  "pos" [ IN ] - beginning offset within remote entity
- *
- *  "bytes" [ IN ] - the number of bytes being requested
- */
-KNS_EXTERN rc_t CC KClientHttpRequestByteRange ( KClientHttpRequest *self, uint64_t pos, size_t bytes );
-
-
-/* AddHeader
- *  allow addition of an arbitrary HTTP header to message
- */
-KNS_EXTERN rc_t CC KClientHttpRequestAddHeader ( KClientHttpRequest *self,
-    const char *name, const char *val, ... );
-
-
-/* AddPostParam
- *  adds a parameter for POST
- */
-KNS_EXTERN rc_t CC KClientHttpRequestAddPostParam ( KClientHttpRequest *self, const char *fmt, ... );
-KNS_EXTERN rc_t CC KClientHttpRequestVAddPostParam ( KClientHttpRequest *self, const char *fmt, va_list args );
-
-/* compatibility for existing code */
-#define KHttpMakeRequest KClientHttpMakeRequest
-#define KNSManagerMakeRequest KNSManagerMakeClientRequest
-#define KHttpRequestAddRef KClientHttpRequestAddRef
-#define KHttpRequestRelease KClientHttpRequestRelease
-#define KHttpRequestConnection KClientHttpRequestConnection
-#define KHttpRequestByteRange KClientHttpRequestByteRange
-#define KHttpRequestAddHeader KClientHttpRequestAddHeader
-#define KHttpRequestAddPostParam KClientHttpRequestAddPostParam
-#define KHttpRequestVAddPostParam KClientHttpRequestVAddPostParam
-
-/*--------------------------------------------------------------------------
- * KClientHttpResult
- *  hyper text transfer protocol
- */
-typedef struct KClientHttpResult KClientHttpResult, KHttpResult;
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KNS_EXTERN rc_t CC KClientHttpResultAddRef ( const KClientHttpResult *self );
-KNS_EXTERN rc_t CC KClientHttpResultRelease ( const KClientHttpResult *self );
-
-
-/* HEAD
- *  send HEAD message
- */
-KNS_EXTERN rc_t CC KClientHttpRequestHEAD ( KClientHttpRequest *self, KClientHttpResult **rslt ); 
-
-/* GET
- *  send GET message
- *  all query AND post parameters are combined in URL
- */
-KNS_EXTERN rc_t CC KClientHttpRequestGET ( KClientHttpRequest *self, KClientHttpResult **rslt ); 
-
-/* POST
- *  send POST message
- *  query parameters are sent in URL
- *  post parameters are sent in body
- */
-KNS_EXTERN rc_t CC KClientHttpRequestPOST ( KClientHttpRequest *self, KClientHttpResult **rslt ); 
-
-
-/* Status
- *  access the response status code
- *  and optionally the message
- *
- *  "code" [ OUT ] - return parameter for status code
- *
- *  "msg_buff" [ IN, NULL OKAY ] and "buff_size" [ IN, ZERO OKAY ] -
- *   buffer for capturing returned message
- *
- *  "msg_size" [ OUT, NULL OKAY ] - size of returned message in bytes
- */
-KNS_EXTERN rc_t CC KClientHttpResultStatus ( const KClientHttpResult *self, uint32_t *code,
-    char *msg_buff, size_t buff_size, size_t *msg_size );
-
-
-/* KeepAlive
- *  retrieves keep-alive property of response
- *  requires HTTP/1.1
- */
-KNS_EXTERN bool CC KClientHttpResultKeepAlive ( const KClientHttpResult *self );
-
-
-/* Range
- *  retrieves position and partial size for partial requests
- *
- *  "pos" [ OUT ] - offset to beginning portion of response
- *
- *  "bytes" [ OUT ] - size of range
- */
-KNS_EXTERN rc_t CC KClientHttpResultRange ( const KClientHttpResult *self, uint64_t *pos, size_t *bytes );
-
-
-/* Size
- *  retrieves overall size of entity, if known
- *
- *  "response_size" [ OUT ] - size in bytes of response
- *   this is the number of bytes that may be expected from the input stream
- */
-KNS_EXTERN bool CC KClientHttpResultSize ( const KClientHttpResult *self, uint64_t *size );
-
-
-/* AddHeader
- *  allow addition of an arbitrary HTTP header to RESPONSE
- *  this can be used to repair or normalize odd server behavior
- */
-KNS_EXTERN rc_t CC KClientHttpResultAddHeader ( KClientHttpResult *self,
-    const char *name, const char *val, ... );
-
-
-/* GetHeader
- *  retrieve named header if present
- *  this cand potentially return a comma separated value list
- */
-KNS_EXTERN rc_t CC KClientHttpResultGetHeader ( const KClientHttpResult *self, const char *name,
-    char *buffer, size_t bsize, size_t *num_read );
-
-
-/* GetInputStream
- *  access the body of response as a stream
- *  only reads are supported
- *
- *  "s" [ OUT ] - return parameter for input stream reference
- *   must be released via KStreamRelease
- */
-KNS_EXTERN rc_t CC KClientHttpResultGetInputStream ( KClientHttpResult *self,
-    struct KStream  ** s );
-
-KNS_EXTERN bool CC KFileIsKHttpFile ( const struct KFile * self );
-
-    /* compatibility defines */
-#define KHttpResultAddRef KClientHttpResultAddRef
-#define KHttpResultRelease KClientHttpResultRelease
-#define KHttpRequestHEAD KClientHttpRequestHEAD
-#define KHttpRequestGET KClientHttpRequestGET
-#define KHttpRequestPOST KClientHttpRequestPOST
-#define KHttpResultStatus KClientHttpResultStatus
-#define KHttpResultKeepAlive KClientHttpResultKeepAlive
-#define KHttpResultRange KClientHttpResultRange
-#define KHttpResultSize KClientHttpResultSize
-#define KHttpResultAddHeader KClientHttpResultAddHeader
-#define KHttpResultGetHeader KClientHttpResultGetHeader
-#define KHttpResultGetInputStream KClientHttpResultGetInputStream
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kns_http_ */
diff --git a/interfaces/kns/impl.h b/interfaces/kns/impl.h
deleted file mode 100644
index f04ad86..0000000
--- a/interfaces/kns/impl.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kns_impl_
-#define _h_kns_impl_
-
-#ifndef _h_kns_extern_
-#include <kns/extern.h>
-#endif
-
-#ifndef _h_kns_stream_
-#include <kns/stream.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-typedef union KStream_vt KStream_vt;
-
-
-/*--------------------------------------------------------------------------
- * KStream
- *  a virtual stream
- */
-struct KStream
-{
-    const KStream_vt *vt;
-    KRefcount refcount;
-    uint8_t read_enabled;
-    uint8_t write_enabled;
-    uint8_t align [ 2 ];
-};
-
-#ifndef KSTREAM_IMPL
-#define KSTREAM_IMPL struct KStream
-#endif
-
-typedef struct KStream_vt_v1 KStream_vt_v1;
-struct KStream_vt_v1
-{
-    /* version == 1.x */
-    uint32_t maj;
-    uint32_t min;
-
-    /* start minor version == 0 */
-    rc_t ( CC * destroy ) ( KSTREAM_IMPL *self );
-    rc_t ( CC * read ) ( const KSTREAM_IMPL *self,
-        void *buffer, size_t bsize, size_t *num_read );
-    rc_t ( CC * write ) ( KSTREAM_IMPL *self,
-        const void *buffer, size_t size, size_t *num_writ );
-    /* end minor version == 0 */
-
-    /* start minor version == 1 */
-    rc_t ( CC * timed_read ) ( const KSTREAM_IMPL *self,
-        void *buffer, size_t bsize, size_t *num_read, struct timeout_t *tm );
-    rc_t ( CC * timed_write ) ( KSTREAM_IMPL *self,
-        const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm );
-    /* end minor version == 1 */
-};
-
-union KStream_vt
-{
-    KStream_vt_v1 v1;
-};
-
-
-/* Init
- *  initialize a newly allocated stream object
- */
-KNS_EXTERN rc_t CC KStreamInit ( KStream *self, const KStream_vt *vt,
-    const char *classname, const char *strname,
-    bool read_enabled, bool write_enabled );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kns_impl_ */
diff --git a/interfaces/kns/kns-mgr-priv.h b/interfaces/kns/kns-mgr-priv.h
deleted file mode 100644
index 674ce15..0000000
--- a/interfaces/kns/kns-mgr-priv.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_kns_mgr_priv_
-#define _h_kns_mgr_priv_
-
-#ifndef _h_kns_extern_
-#include <kns/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KStream;
-struct KHttpFile;
-struct KNSManager;
-struct KFile;
-struct KConfig;
-struct KClientHttpRequest;
-
-/************************** HTTP-retry-related stuff **************************/
-struct HttpRetrySchedule;
-
-struct HttpRetrySpecs
-{
-    struct HttpRetrySchedule** codes;
-    uint8_t count;
-};
-typedef struct HttpRetrySpecs HttpRetrySpecs;
-
-rc_t CC HttpRetrySpecsDestroy ( HttpRetrySpecs* self );
-
-rc_t CC HttpRetrySpecsInit ( HttpRetrySpecs* self, struct KConfig* kfg);
-
-bool HttpGetRetryCodes ( const HttpRetrySpecs* self, uint16_t code, uint8_t * max_retries, const uint16_t ** sleep_before_retry, bool * open_ended );
-
-/* MakeConfig
- *  create a manager instance using a custom configuration, for testing
- */
-KNS_EXTERN rc_t CC KNSManagerMakeConfig ( struct KNSManager **mgr, struct KConfig* kfg );
-
-/** MakeReliableHttpFile, KNSManagerMakeReliableClientRequest:
- * Make HTTP file/request from a reliable URL:
- * we will try harder to recover upon any error
- * (make more retries)
- */
-KNS_EXTERN rc_t CC KNSManagerMakeReliableHttpFile(
-    struct KNSManager const *self, struct KFile const **file,
-    struct KStream *conn, ver_t vers, const char *url, ...);
-KNS_EXTERN rc_t CC KNSManagerMakeReliableClientRequest ( 
-    struct KNSManager const *self, struct KClientHttpRequest **req, 
-    ver_t version, struct KStream *conn, const char *url, ... );
-
-typedef struct {
-    const char *url;
-    
-    const struct KNSManager * kns; /* used to retrieve HttpRetrySpecs */
-    uint32_t last_sleep;
-    uint32_t total_wait_ms;
-    uint32_t max_total_wait_ms;
-    
-    uint32_t last_status;
-    
-    uint8_t max_retries;    
-    uint8_t retries_count;    
-} KHttpRetrier;
-
-rc_t KHttpRetrierInit ( KHttpRetrier * self, const char * url, const struct KNSManager * kns );
-bool KHttpRetrierWait ( KHttpRetrier * self, uint32_t status );
-rc_t KHttpRetrierDestroy ( KHttpRetrier * self );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kns_mgr_priv_ */
diff --git a/interfaces/kns/manager-ext.h b/interfaces/kns/manager-ext.h
deleted file mode 100644
index cdab1d5..0000000
--- a/interfaces/kns/manager-ext.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_kns_manager_ext_
-#define _h_kns_manager_ext_
-
-#ifndef _h_kns_manager_
-#include <kns/manager.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct SraReleaseVersion;
-
-
-/*--------------------------------------------------------------------------
- * KNSManager Extension
- */
-
-/* NewReleaseVersion
- *  Get release version of the new (latest available) public SRA Toolkit
- */
-KNS_EXTERN rc_t CC KNSManagerNewReleaseVersion ( const KNSManager *self,
-    struct SraReleaseVersion *newVersion );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kns_manager_ext_ */
diff --git a/interfaces/kns/manager.h b/interfaces/kns/manager.h
deleted file mode 100644
index 6718714..0000000
--- a/interfaces/kns/manager.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_kns_manager_
-#define _h_kns_manager_
-
-#ifndef _h_kns_extern_
-#include <kns/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-
-
-/*--------------------------------------------------------------------------
- * KNSManager
- *  manages the network system
- */
-typedef struct KNSManager KNSManager;
-
-
-/* Make
- *  create a manager instance
- */
-KNS_EXTERN rc_t CC KNSManagerMake ( KNSManager **mgr );
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KNS_EXTERN rc_t CC KNSManagerAddRef ( const KNSManager *self );
-KNS_EXTERN rc_t CC KNSManagerRelease ( const KNSManager *self );
-
-
-/* SetVerbose
- *  set/clear verbosity flag of manager ( dflt is false )...
- *  the network-code has to request it
- */
-KNS_EXTERN void CC KNSManagerSetVerbose ( KNSManager *self, bool verbosity );
-
-
-/* IsVerbose
- *  request the verbosity flag of manager ( dflt is false )...
- */
-KNS_EXTERN bool CC KNSManagerIsVerbose ( const KNSManager *self );
-
-
-/* SetConnectionTimeouts
- *  sets default connect/read/write timeouts to supply to sockets
- *
- *  "connectMillis", "readMillis", "writeMillis" [ IN ] - when negative, infinite timeout
- *  when 0, return immediately, positive gives maximum wait time in sec/mS
- *  for connects, reads and writes respectively.
- */
-KNS_EXTERN rc_t CC KNSManagerSetConnectionTimeouts ( KNSManager *self,
-    int32_t connectSecs, int32_t readMillis, int32_t writeMillis );
-
-
-/* Set/Get UserAgent
- *  for http connections
- */
-KNS_EXTERN rc_t CC KNSManagerSetUserAgent ( KNSManager *self, const char * fmt, ... );
-KNS_EXTERN rc_t CC KNSManagerGetUserAgent ( const char ** user_agent );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kns_manager_ */
diff --git a/interfaces/kns/socket.h b/interfaces/kns/socket.h
deleted file mode 100644
index 9505f92..0000000
--- a/interfaces/kns/socket.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_kns_socket_
-#define _h_kns_socket_
-
-#ifndef _h_kns_extern_
-#include <kns/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KStream;
-struct KEndPoint;
-struct KNSManager;
-
-/*--------------------------------------------------------------------------
- * KSocket
- */
-typedef struct KSocket KSocket;
-
-
-/* MakeConnection
- * MakeTimedConnection
- * MakeRetryConnection
- * MakeRetryTimedConnection
- *  create a connection-oriented stream
- *
- *  "conn" [ OUT ] - a stream for communication with the server
- *
- *  "retryTimeout" [ IN ] - if connection is refused, retry with 1ms intervals: when negative, retry infinitely,
- *   when 0, do not retry, positive gives maximum wait time in seconds 
- *
- *  "readMillis" [ IN ] and "writeMillis" - when negative, infinite timeout
- *   when 0, return immediately, positive gives maximum wait time in mS
- *   for reads and writes respectively.
- *
- *  "from" [ IN ] - client endpoint
- *
- *  "to" [ IN ] - server endpoint 
- *
- *  both endpoints have to be of type epIP; creates a TCP connection
- */
-KNS_EXTERN rc_t CC KNSManagerMakeConnection ( struct KNSManager const * self,
-    struct KSocket **conn, struct KEndPoint const *from, struct KEndPoint const *to );
-
-KNS_EXTERN rc_t CC KNSManagerMakeTimedConnection ( struct KNSManager const * self,
-    struct KSocket **conn, int32_t readMillis, int32_t writeMillis,
-    struct KEndPoint const *from, struct KEndPoint const *to );
-
-KNS_EXTERN rc_t CC KNSManagerMakeRetryConnection ( struct KNSManager const * self,
-    struct KSocket **conn, int32_t retryTimeout, struct KEndPoint const *from, struct KEndPoint const *to );
-
-KNS_EXTERN rc_t CC KNSManagerMakeRetryTimedConnection ( struct KNSManager const * self,
-    struct KSocket **conn, int32_t retryTimeout, int32_t readMillis, int32_t writeMillis,
-    struct KEndPoint const *from, struct KEndPoint const *to );
-
-
-/* AddRef
- * Release
- */
-KNS_EXTERN rc_t CC KSocketAddRef ( const KSocket *self );
-KNS_EXTERN rc_t CC KSocketRelease ( const KSocket *self );
-
-
-/* GetStream
- */
-KNS_EXTERN rc_t CC KSocketGetStream ( const KSocket * self, struct KStream ** s );
-
-
-/* Query endpoints
- */
-KNS_EXTERN rc_t CC KSocketGetRemoteEndpoint ( const KSocket * self, struct KEndPoint * ep );
-KNS_EXTERN rc_t CC KSocketGetLocalEndpoint ( const KSocket * self, struct KEndPoint * ep );
-
-/*--------------------------------------------------------------------------
- * KListener
- */
-typedef struct KListener KListener;
-
-/* MakeListener
- *  create a listener socket for accepting incoming connections
- *  enter listening state upon first use,
- *
- *  "ep" [ IN ] - a local endpoint
- *
- *  "listener" [ IN ] - a listener socket
- */
-KNS_EXTERN rc_t CC KNSManagerMakeListener ( struct KNSManager const *self,
-    KListener **listener, struct KEndPoint const * ep );
-
-
-/* AddRef
- * Release
- */
-KNS_EXTERN rc_t CC KListenerAddRef ( const KListener *self );
-KNS_EXTERN rc_t CC KListenerRelease ( const KListener *self );
-
-
-/* Accept
- *  wait for an incoming connection
- *
- *  "conn" [ OUT ] - a stream for communication with the client 
- */
-KNS_EXTERN rc_t CC KListenerAccept ( KListener *self, struct KSocket **conn );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kns_socket_ */
diff --git a/interfaces/kns/stream.h b/interfaces/kns/stream.h
deleted file mode 100644
index 7935767..0000000
--- a/interfaces/kns/stream.h
+++ /dev/null
@@ -1,222 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kns_stream_
-#define _h_kns_stream_
-
-#ifndef _h_kns_extern_
-#include <kns/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct timeout_t;
-
-
-/*--------------------------------------------------------------------------
- * KStream
- *  the stream is defined to have no concept of size,
- *  and to not support any form of random access
- */
-typedef struct KStream KStream;
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KNS_EXTERN rc_t CC KStreamAddRef ( const KStream *self );
-KNS_EXTERN rc_t CC KStreamRelease ( const KStream *self );
-
-
-/* Read
- * TimedRead
- *  read data from stream
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - return parameter giving number of bytes
- *  actually read. when returned value is zero and return code is
- *  also zero, interpreted as end of stream.
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed reads. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KNS_EXTERN rc_t CC KStreamRead ( const KStream *self,
-    void *buffer, size_t bsize, size_t *num_read );
-KNS_EXTERN rc_t CC KStreamTimedRead ( const KStream *self,
-    void *buffer, size_t bsize, size_t *num_read, struct timeout_t *tm );
-
-/* ReadAll
- * TimedReadAll
- *  read from stream until "bsize" bytes have been retrieved
- *  or until end-of-input
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - return parameter giving number of bytes
- *  actually read. when returned value is zero and return code is
- *  also zero, interpreted as end of stream.
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed reads. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KNS_EXTERN rc_t CC KStreamReadAll ( const KStream *self,
-    void *buffer, size_t bsize, size_t *num_read );
-KNS_EXTERN rc_t CC KStreamTimedReadAll ( const KStream *self,
-    void *buffer, size_t bsize, size_t *num_read, struct timeout_t *tm );
-
-/* ReadExactly
- * TimedReadExactly
- *  read from stream until "bytes" have been retrieved
- *  or return incomplete transfer
- *
- *  "buffer" [ OUT ] and "bytes" [ IN ] - return buffer for read
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed reads. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KNS_EXTERN rc_t CC KStreamReadExactly ( const KStream *self,
-    void *buffer, size_t bytes );
-KNS_EXTERN rc_t CC KStreamTimedReadExactly ( const KStream *self,
-    void *buffer, size_t bytes, struct timeout_t *tm );
-
-
-/* Write
- * TimedWrite
- *  send data to stream
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed writes. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KNS_EXTERN rc_t CC KStreamWrite ( KStream *self,
-    const void *buffer, size_t size, size_t *num_writ );
-KNS_EXTERN rc_t CC KStreamTimedWrite ( KStream *self,
-    const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm );
-
-/* WriteAll
- * TimedWriteAll
- *  write to stream until "size" bytes have been transferred
- *  or until no further progress can be made
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed writes. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KNS_EXTERN rc_t CC KStreamWriteAll ( KStream *self,
-    const void *buffer, size_t size, size_t *num_writ );
-KNS_EXTERN rc_t CC KStreamTimedWriteAll ( KStream *self,
-    const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm );
-
-/* WriteExactly
- * TimedWriteExactly
- *  write to stream until "bytes" have been transferred
- *  or return incomplete transfer error
- *
- *  "buffer" [ IN ] and "bytes" [ IN ] - data to be written
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed writes. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-KNS_EXTERN rc_t CC KStreamWriteExactly ( KStream *self,
-    const void *buffer, size_t bytes );
-KNS_EXTERN rc_t CC KStreamTimedWriteExactly ( KStream *self,
-    const void *buffer, size_t bytes, struct timeout_t *tm );
-
-
-/* MakeStdIn
- *  creates a read-only stream on stdin
- */
-KNS_EXTERN rc_t CC KStreamMakeStdIn ( const KStream **std_in );
-
-/* MakeStdOut
- * MakeStdErr
- *  creates a write-only stream on stdout or stderr
- */
-KNS_EXTERN rc_t CC KStreamMakeStdOut ( KStream **std_out );
-KNS_EXTERN rc_t CC KStreamMakeStdErr ( KStream **std_err );
-
-
-/* MakeBuffered
- *  makes a one or two-way stream buffer
- *  either "in" or "out" may be NULL, but not both
- *  if neither are NULL, then the stream is two-way
- *
- *  each non-NULL stream will get a fixed-sized buffer
- *  of the size indicated, or default value if size == 0
- */
-KNS_EXTERN rc_t CC KStreamMakeBuffered ( KStream ** buffered,
-    const KStream * in, KStream * out, size_t bufer_size );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kns_stream_ */
diff --git a/interfaces/kproc/barrier.h b/interfaces/kproc/barrier.h
deleted file mode 100644
index 877e38f..0000000
--- a/interfaces/kproc/barrier.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kproc_barrier_
-#define _h_kproc_barrier_
-
-#ifndef _h_kproc_extern_
-#include <kproc/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * KBarrier
- *  a thread synchronization device
- *  detains all callers until the required number has been reached
- */
-typedef struct KBarrier KBarrier;
-
-
-/* Make
- *  create a barrier
- *
- *  "count" [ IN ] - the number of threads to block
- */
-KPROC_EXTERN rc_t CC KBarrierMake ( KBarrier **b, uint32_t count );
-
-
-/* AddRef
- * Release
- */
-KPROC_EXTERN rc_t CC KBarrierAddRef ( const KBarrier *self );
-KPROC_EXTERN rc_t CC KBarrierRelease ( const KBarrier *self );
-
-
-/* Wait
- *  block until the required number of callers has been reached
- */
-KPROC_EXTERN rc_t CC KBarrierWait ( KBarrier *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kproc_barrier_ */
diff --git a/interfaces/kproc/barrier.hpp b/interfaces/kproc/barrier.hpp
deleted file mode 100644
index 38fde17..0000000
--- a/interfaces/kproc/barrier.hpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_kproc_barrier_
-#define _hpp_kproc_barrier_
-
-#ifndef _h_kproc_barrier_
-#include <kproc/barrier.h>
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KBarrier
- *  a thread synchronization device
- *  detains all callers until the required number has been reached
- */
-struct KBarrier
-{
-    /* Make
-     *  create a barrier
-     *
-     *  "count" [ IN ] - the number of threads to block
-     */
-    static inline rc_t Make ( KBarrier **b, uint32_t count )
-        throw ()
-    { return KBarrierMake ( b, count ); }
-
-
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef () const
-        throw ()
-    { return KBarrierAddRef ( this ); }
-
-    inline rc_t Release () const
-        throw ()
-    { return KBarrierRelease ( this ); }
-
-
-    /* Wait
-     *  block until the required number of callers has been reached
-     */
-    inline rc_t Wait ()
-        throw ()
-    { return KBarrierWait ( this ); }
-
-private:
-    KBarrier ();
-    ~ KBarrier ();
-    KBarrier ( const KBarrier& );
-    KBarrier &operator = ( const KBarrier& );
-};
-
-
-#endif // _hpp_kproc_barrier_
diff --git a/interfaces/kproc/cond.h b/interfaces/kproc/cond.h
deleted file mode 100644
index c5938ac..0000000
--- a/interfaces/kproc/cond.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kproc_cond_
-#define _h_kproc_cond_
-
-#ifndef _h_kproc_extern_
-#include <kproc/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KLock;
-struct timeout_t;
-
-
-/*--------------------------------------------------------------------------
- * KCondition
- *  a POSIX-style condition object
- *  ( requires an external lock object )
- *
- *  usage: the user first acquires an external lock. then, depending upon
- *  the operation, will either test for a condition or establish it, where
- *  the former involves the potential to wait for a signal and the latter
- *  to generate a signal using the external lock for blocking.
- */
-typedef struct KCondition KCondition;
-
-
-/* Make
- *  create a condition
- */
-KPROC_EXTERN rc_t CC KConditionMake ( KCondition **cond );
-
-
-/* AddRef
- * Release
- */
-KPROC_EXTERN rc_t CC KConditionAddRef ( const KCondition *self );
-KPROC_EXTERN rc_t CC KConditionRelease ( const KCondition *self );
-
-
-/* Wait
- *  block on external lock until signalled
- */
-KPROC_EXTERN rc_t CC KConditionWait ( KCondition *self, struct KLock *lock );
-KPROC_EXTERN rc_t CC KConditionTimedWait ( KCondition *self, struct KLock *lock, struct timeout_t *tm );
-
-
-/* Signal
- *  signal waiting threads
- *  awaken at most a single thread
- *
- * NB - external lock used for synchronization must be locked by current thread
- */
-KPROC_EXTERN rc_t CC KConditionSignal ( KCondition *self );
-
-
-/* Broadcast
- *  signal waiting threads
- *  awaken all waiting thread
- *
- * NB - external lock used for synchronization must be locked by current thread
- */
-KPROC_EXTERN rc_t CC KConditionBroadcast ( KCondition *self );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kproc_cond_ */
diff --git a/interfaces/kproc/cond.hpp b/interfaces/kproc/cond.hpp
deleted file mode 100644
index c1ff6b8..0000000
--- a/interfaces/kproc/cond.hpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_kproc_cond_
-#define _hpp_kproc_cond_
-
-#ifndef _h_kproc_cond_
-#include <kproc/cond.h>
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KCondition
- *  a POSIX-style condition object
- *  ( requires an external lock object )
- *
- *  usage: the user first acquires an external lock. then, depending upon
- *  the operation, will either test for a condition or establish it, where
- *  the former involves the potential to wait for a signal and the latter
- *  to generate a signal using the external lock for blocking.
- */
-struct KCondition
-{
-    /* Make
-     *  create a condition
-     */
-    static inline rc_t Make ( KCondition **cond )
-        throw ()
-    { return KConditionMake ( cond ); }
-
-
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef () const
-        throw ()
-    { return KConditionAddRef ( this ); }
-
-    inline rc_t Release () const
-        throw ()
-    { return KConditionRelease ( this ); }
-
-
-    /* Wait
-     *  block on external lock until signaled
-     */
-    inline rc_t Wait ( struct KLock *lock )
-        throw ()
-    { return KConditionWait ( this, lock ); }
-
-    inline rc_t Wait ( struct KLock *lock, struct timeout_t *tm )
-        throw ()
-    { return KConditionTimedWait ( this, lock, tm ); }
-
-    inline rc_t TimedWait ( struct KLock *lock, struct timeout_t *tm )
-        throw ()
-    { return KConditionTimedWait ( this, lock, tm ); }
-
-
-    /* Signal
-     *  signal waiting threads
-     *  awaken at most a single thread
-     */
-    inline rc_t Signal ()
-        throw ()
-    { return KConditionSignal ( this ); }
-
-
-    /* Broadcast
-     *  signal waiting threads
-     *  awaken all waiting thread
-     */
-    inline rc_t Broadcast ()
-        throw ()
-    { return KConditionBroadcast ( this ); }
-
-private:
-    KCondition ();
-    ~ KCondition ();
-    KCondition ( const KCondition& );
-    KCondition &operator = ( const KCondition& );
-};
-
-#endif // _hpp_kproc_cond_
diff --git a/interfaces/kproc/extern.h b/interfaces/kproc/extern.h
deleted file mode 100644
index 874d6f2..0000000
--- a/interfaces/kproc/extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kproc_extern_
-#define _h_kproc_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define KPROC_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define KPROC_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_kproc_extern_ */
diff --git a/interfaces/kproc/impl.h b/interfaces/kproc/impl.h
deleted file mode 100644
index 4d99b04..0000000
--- a/interfaces/kproc/impl.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kproc_impl_
-#define _h_kproc_impl_
-
-#ifndef _h_kproc_extern_
-#include <kproc/extern.h>
-#endif
-
-#ifndef _h_kproc_task_
-#include <kproc/task.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-typedef union KTask_vt KTask_vt;
-
-
-/*--------------------------------------------------------------------------
- * KTask
- *  a deferred task abstraction
- *  specific task objects are constructed with required parameters
- *  and implement the Execute method to perform their operation
- */
-struct KTask
-{
-    const KTask_vt *vt;
-    KRefcount refcount;
-    uint8_t align [ 4 ];
-};
-
-#ifndef KTASK_IMPL
-#define KTASK_IMPL struct KTask
-#endif
-
-typedef struct KTask_vt_v1 KTask_vt_v1;
-struct KTask_vt_v1
-{
-    /* version == 1.x */
-    uint32_t maj;
-    uint32_t min;
-
-    /* start minor version == 0 */
-    rc_t ( CC * destroy ) ( KTASK_IMPL *self );
-    rc_t ( CC * execute ) ( KTASK_IMPL * self );
-    /* end minor version == 0 */
-};
-
-union KTask_vt
-{
-    KTask_vt_v1 v1;
-};
-
-/* Init
- *  initialize a newly allocated task object
- */
-KPROC_EXTERN rc_t CC KTaskInit ( KTask *self, const KTask_vt *vt, const char *clsname, const char *name );
-
-
-/* Destroy
- *  destroy task
- */
-KPROC_EXTERN rc_t CC KTaskDestroy ( KTask *self, const char *clsname );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kproc_impl_ */
diff --git a/interfaces/kproc/lock.h b/interfaces/kproc/lock.h
deleted file mode 100644
index 17109e1..0000000
--- a/interfaces/kproc/lock.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kproc_lock_
-#define _h_kproc_lock_
-
-#ifndef _h_kproc_extern_
-#include <kproc/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct timeout_t;
-
-
-/*--------------------------------------------------------------------------
- * KLock
- * KTimedLock
- *  a POSIX-style mutual exclusion lock
- *
- *  Mac/BSD doesn't supply proper support for timed pthread_mutex,
- *  so we have to provide additional structure to support it.
- *  in doing so, the timed version has become incompatible with
- *  the KCondition interface.
- *
- *  For reasons given above, we are dividing KLock into two classes
- *  to separate out support for timed acquire.
- */
-typedef struct KLock KLock;
-typedef struct KTimedLock KTimedLock;
-
-
-/* Make
- *  make a simple mutex
- */
-KPROC_EXTERN rc_t CC KLockMake ( KLock **lock );
-KPROC_EXTERN rc_t CC KTimedLockMake ( KTimedLock **lock );
-
-
-/* AddRef
- * Release
- */
-KPROC_EXTERN rc_t CC KLockAddRef ( const KLock *self );
-KPROC_EXTERN rc_t CC KLockRelease ( const KLock *self );
-KPROC_EXTERN rc_t CC KTimedLockAddRef ( const KTimedLock *self );
-KPROC_EXTERN rc_t CC KTimedLockRelease ( const KTimedLock *self );
-
-
-/* Acquire
- *  acquires lock
- *
- *  a NULL "tm" parameter should mean infinite
- */
-KPROC_EXTERN rc_t CC KLockAcquire ( KLock *self );
-KPROC_EXTERN rc_t CC KTimedLockAcquire ( KTimedLock *self, struct timeout_t *tm );
-
-/* Unlock
- *  releases lock
- */
-KPROC_EXTERN rc_t CC KLockUnlock ( KLock *self );
-KPROC_EXTERN rc_t CC KTimedLockUnlock ( KTimedLock *self );
-
-
-/*--------------------------------------------------------------------------
- * KRWLock
- *  a POSIX-style read/write lock
- */
-typedef struct KRWLock KRWLock;
-
-
-/* Make
- *  make a simple read/write lock
- */
-KPROC_EXTERN rc_t CC KRWLockMake ( KRWLock **lock );
-
-
-/* AddRef
- * Release
- */
-KPROC_EXTERN rc_t CC KRWLockAddRef ( const KRWLock *self );
-KPROC_EXTERN rc_t CC KRWLockRelease ( const KRWLock *self );
-
-
-/* AcquireShared
- *  acquires read ( shared ) lock
- *
- *  a NULL "tm" parameter should mean infinite
- */
-KPROC_EXTERN rc_t CC KRWLockAcquireShared ( KRWLock *self );
-KPROC_EXTERN rc_t CC KRWLockTimedAcquireShared ( KRWLock *self, struct timeout_t *tm );
-
-
-/* AcquireExcl
- *  acquires write ( exclusive ) lock
- *
- *  a NULL "tm" parameter should mean infinite
- */
-KPROC_EXTERN rc_t CC KRWLockAcquireExcl ( KRWLock *self );
-KPROC_EXTERN rc_t CC KRWLockTimedAcquireExcl ( KRWLock *self, struct timeout_t *tm );
-
-
-/* Unlock
- *  releases lock
- */
-KPROC_EXTERN rc_t CC KRWLockUnlock ( KRWLock *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kproc_lock_ */
diff --git a/interfaces/kproc/lock.hpp b/interfaces/kproc/lock.hpp
deleted file mode 100644
index 9e4c1bc..0000000
--- a/interfaces/kproc/lock.hpp
+++ /dev/null
@@ -1,163 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kproc_lock_
-#define _h_kproc_lock_
-
-#ifndef _h_kproc_lock_
-#include <kproc/lock.h>
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KLock
- *  a POSIX-style mutual exclusion lock
- */
-struct KLock
-{
-    /* Make
-     *  make a simple mutex
-     */
-    static inline rc_t Make ( KLock **lock )
-        throw ()
-    { return KLockMake ( lock ); }
-
-
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef () const
-        throw ()
-    { return KLockAddRef ( this ); }
-
-    inline rc_t Release () const
-        throw ()
-    { return KLockRelease ( this ); }
-
-
-    /* Acquire
-     *  acquires lock
-     */
-    inline rc_t Acquire ()
-        throw ()
-    { return KLockAcquire ( this ); }
-
-    inline rc_t Acquire ( struct timeout_t *tm )
-        throw ()
-    { return KLockTimedAcquire ( tthis, tm ); }
-
-    inline rc_t TimedAcquire ( struct timeout_t *tm )
-        throw ()
-    { return KLockTimedAcquire ( tthis, tm ); }
-
-    /* Unlock
-     *  releases lock
-     */
-    inline rc_t Unlock ()
-        throw ()
-    { return KLockUnlock ( this ): }
-
-private:
-    KLock ();
-    ~ KLock ();
-    KLock ( const KLock& );
-    KLock &operator = ( const KLock& );
-};
-
-
-/*--------------------------------------------------------------------------
- * KRWLock
- *  a POSIX-style read/write lock
- */
-struct KRWLock
-{
-    /* Make
-     *  make a simple read/write lock
-     */
-    static inline rc_t Make ( KRWLock **lock )
-        throw ()
-    { return KRWLockMake ( lock ): }
-
-
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef () const
-        throw ()
-    { return KRWLockAddRef ( this ); }
-
-    inline rc_t Release () const
-        throw ()
-    { return KRWLockRelease ( this ); }
-
-
-    /* AcquireShared
-     *  acquires read ( shared ) lock
-     */
-    inline rc_t AcquireShared ()
-        throw ()
-    { return KRWLockAcquireShared ( this ); }
-
-    inline rc_t AcquireShared ( struct timeout_t *tm )
-        throw ()
-    { return KRWLockTimedAcquireShared ( this, tm ); }
-
-    inline rc_t TimedAcquireShared ( struct timeout_t *tm )
-        throw ()
-    { return KRWLockTimedAcquireShared ( this, tm ); }
-
-
-    /* AcquireExcl
-     *  acquires write ( exclusive ) lock
-     */
-    inline rc_t AcquireExcl ()
-        throw ()
-    { return KRWLockAcquireExcl ( this ); }
-
-    inline rc_t AcquireExcl ( struct timeout_t *tm )
-        throw ()
-    { return KRWLockTimedAcquireExcl ( this, tm ); }
-
-    inline rc_t TimedAcquireExcl ( struct timeout_t *tm )
-        throw ()
-    { return KRWLockTimedAcquireExcl ( this, tm ); }
-
-
-    /* Unlock
-     *  releases lock
-     */
-    inline rc_t Unlock ()
-        throw ()
-    { return KRWLockUnlock ( this ); }
-
-private:
-    KRWLock ();
-    ~ KRWLock ();
-    KRWLock ( const KRWLock& );
-    KRWLock &operator = ( const KRWLock& );
-};
-
-#endif // _hpp_kproc_lock_
diff --git a/interfaces/kproc/procmgr.h b/interfaces/kproc/procmgr.h
deleted file mode 100644
index 4162322..0000000
--- a/interfaces/kproc/procmgr.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kproc_procmgr_
-#define _h_kproc_procmgr_
-
-#ifndef _h_kproc_extern_
-#include <kproc/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KTask;
-struct KTaskTicket;
-
-/*--------------------------------------------------------------------------
- * KProcMgr
- */
-typedef struct KProcMgr KProcMgr;
-
-
-/* Init
- *  initialize the proc mgr
- *  creates the singleton object
- */
-KPROC_EXTERN rc_t CC KProcMgrInit ( void );
-
-/* Whack
- *  tear down proc mgr
- *  runs any outstanding cleanup tasks
- *  deletes the singleton object
- *  intended to be called from an "atexit()" or similar task
- */
-KPROC_EXTERN rc_t CC KProcMgrWhack ( void );
-
-
-/* MakeSingleton
- *  access singleton process manager
- *  returns a new reference
- *  or an error code if not initialized
- *  VDB-2 ONLY
- */
-KPROC_EXTERN rc_t CC KProcMgrMakeSingleton ( KProcMgr ** mgr );
-
-
-/* AddRef
- * Release
- *  here to support refcounting API
- *  not generally useful in that the proc mgr
- *  will stay around until process exit
- */
-KPROC_EXTERN rc_t CC KProcMgrAddRef ( const KProcMgr *self );
-KPROC_EXTERN rc_t CC KProcMgrRelease ( const KProcMgr *self );
-
-
-/* AddCleanupTask
- *  add a task to be performed at process exit time
- *
- *  "ticket" [ OUT ] - an id that can be used later to remove task
- *
- *  "task" [ IN ] - task object that will be executed at process
- *   exit, unless previously removed ( see RemoveCleanupTask ).
- *   NB - a new reference to "task" will be created
- */
-KPROC_EXTERN rc_t CC KProcMgrAddCleanupTask ( KProcMgr *self,
-    struct KTaskTicket *ticket, struct KTask *task );
-
-
-/* RemoveCleanupTask
- *  remove a task from exit queue
- *  releases reference to task object
- *  returns an rcNotFound code if task no longer exists
- */
-KPROC_EXTERN rc_t CC KProcMgrRemoveCleanupTask ( KProcMgr *self,
-    struct KTaskTicket const *ticket );
-
-
-/* OnMainThread
- *  returns true if running on main thread
- */
-KPROC_EXTERN bool CC KProcMgrOnMainThread ( void );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kproc_procmgr_ */
diff --git a/interfaces/kproc/q-extern.h b/interfaces/kproc/q-extern.h
deleted file mode 100644
index 96f01d4..0000000
--- a/interfaces/kproc/q-extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kproc_q_extern_
-#define _h_kproc_q_extern_
-
-#if ! defined EXPORT_LATCH && _LIBRARY
-#define KQ_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define KQ_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_kproc_q_extern_ */
diff --git a/interfaces/kproc/queue.h b/interfaces/kproc/queue.h
deleted file mode 100644
index 32533a4..0000000
--- a/interfaces/kproc/queue.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kproc_queue_
-#define _h_kproc_queue_
-
-#include <kproc/q-extern.h>
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct timeout_t;
-
-
-/*--------------------------------------------------------------------------
- * KQueue
- *  a simple thread-safe queue structure supporting push/pop operation
- *  makes use of semaphore objects for synchronization
- */
-typedef struct KQueue KQueue;
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KQ_EXTERN rc_t CC KQueueAddRef ( const KQueue *self );
-KQ_EXTERN rc_t CC KQueueRelease ( const KQueue *self );
-
-/* Make
- * create an empty queue object
- *
- *  "capacity" [ IN ] - minimum queue length
- *  always expands to a power of 2, i.e. providing
- *  a length of 10 will result in a length of 16.
- */
-KQ_EXTERN rc_t CC KQueueMake ( KQueue **q, uint32_t capacity );
-
-/* Push
- *  add an object to the queue
- *
- *  "item" [ IN, OPAQUE ] - pointer to item being queued
- *
- *  "tm" [ IN, NULL OKAY ] - pointer to system specific timeout
- *  structure. if the queue is full, wait for indicated period
- *  of time for space to become available, or return status
- *  code indicating a timeout. when NULL and queue is full,
- *  Push will time out immediately and return status code.
- */
-KQ_EXTERN rc_t CC KQueuePush ( KQueue *self, const void *item, struct timeout_t *tm );
-
-/* Pop
- *  pop an object from queue
- *
- *  "item" [ OUT, OPAQUE* ] - return parameter for popped item
- *
- *  "tm" [ IN, NULL OKAY ] - pointer to system specific timeout
- *  structure. if the queue is empty, wait for indicated period
- *  of time for an object to become available, or return status
- *  code indicating a timeout. when NULL and queue is empty,
- *  Pop will time out immediately and return status code.
- */
-KQ_EXTERN rc_t CC KQueuePop ( KQueue *self, void **item, struct timeout_t *tm );
-
-/* Sealed
- *  ask if the queue has been closed off
- *  meaning there will be no further push operations
- *
- *  NB - if "self" is NULL, the return value is "true"
- *  since a NULL queue cannot accept items via push
- */
-KQ_EXTERN bool CC KQueueSealed ( const KQueue *self );
-
-/* Seal
- *  indicate that the queue has been closed off
- *  meaning there will be no further push operations
- */
-KQ_EXTERN rc_t CC KQueueSeal ( KQueue *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kproc_queue_ */
diff --git a/interfaces/kproc/sem.h b/interfaces/kproc/sem.h
deleted file mode 100644
index 423fa0c..0000000
--- a/interfaces/kproc/sem.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kproc_sem_
-#define _h_kproc_sem_
-
-#ifndef _h_kproc_extern_
-#include <kproc/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KLock;
-struct timeout_t;
-
-
-/*--------------------------------------------------------------------------
- * KSemaphore
- *  a metering device
- */
-typedef struct KSemaphore KSemaphore;
-
-
-/* Make
- *
- *  "count" [ IN ] - initial count value
- */
-KPROC_EXTERN rc_t CC KSemaphoreMake ( KSemaphore **sem, uint64_t count );
-
-
-/* AddRef
- * Release
- */
-KPROC_EXTERN rc_t CC KSemaphoreAddRef ( const KSemaphore *self );
-KPROC_EXTERN rc_t CC KSemaphoreRelease ( const KSemaphore *self );
-
-
-/* Wait
- *  block until a count becomes available
- *
- *  "lock" [ IN ] - externally acquired lock
- *
- *  "tm" [ IN, NULL OKAY ] - optional timeout where
- *  NULL means timeout value of 0
- */
-KPROC_EXTERN rc_t CC KSemaphoreWait ( KSemaphore *self, struct KLock *lock );
-KPROC_EXTERN rc_t CC KSemaphoreTimedWait ( KSemaphore *self,
-    struct KLock *lock, struct timeout_t *tm );
-
-
-/* Cancel
- *  signal that the count will never increase
- *
- * NB - external lock used for synchronization must be locked by current thread
- */
-KPROC_EXTERN rc_t CC KSemaphoreCancel ( KSemaphore *self );
-
-
-/* Signal
- *  signal that a count has become available
- *
- * NB - external lock used for synchronization must be locked by current thread
- */
-KPROC_EXTERN rc_t CC KSemaphoreSignal ( KSemaphore *self );
-
-
-/* Alloc
- *  allocate a count
- *  used for resource metering
- *
- *  "lock" [ IN ] - externally acquired lock
- *
- *  "count" [ IN ] - the resource count
- *
- *  "tm" [ IN, NULL OKAY ] - optional timeout where
- *  NULL means timeout value of 0
- */
-KPROC_EXTERN rc_t CC KSemaphoreAlloc ( KSemaphore *self,
-    struct KLock *lock, uint64_t count );
-KPROC_EXTERN rc_t CC KSemaphoreTimedAlloc ( KSemaphore *self,
-    struct KLock *lock, uint64_t count, struct timeout_t *tm );
-
-
-/* Free
- *  signal that resources have become available
- *
- * NB - external lock used for synchronization must be locked by current thread
- */
-KPROC_EXTERN rc_t CC KSemaphoreFree ( KSemaphore *self, uint64_t count );
-
-
-/* Count
- *  request the current resource usage
- *
- *  "count" [ OUT ] - return parameter for current count
- *
- * NB - external lock used for synchronization must be locked by current thread
- */
-KPROC_EXTERN rc_t CC KSemaphoreCount ( const KSemaphore *self, uint64_t *count );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kproc_sem_ */
diff --git a/interfaces/kproc/sem.hpp b/interfaces/kproc/sem.hpp
deleted file mode 100644
index 05b3178..0000000
--- a/interfaces/kproc/sem.hpp
+++ /dev/null
@@ -1,134 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_kproc_sem_
-#define _hpp_kproc_sem_
-
-#ifndef _h_kproc_sem_
-#include <kproc/sem.h>
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KSemaphore
- *  a metering device
- */
-struct KSemaphore
-{
-    /* Make
-     *
-     *  "count" [ IN ] - initial count value
-     */
-    static inline rc_t Make ( KSemaphore **sem, uint64_t count )
-        throw ()
-    { return KSemaphoreMake ( sem, count ); }
-
-
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef () const
-        throw ()
-    { return KSemaphoreAddRef ( this ); }
-
-    inline rc_t Release () const
-        throw ()
-    { return KSemaphoreRelease ( this ); }
-
-
-    /* Wait
-     *  block until a count becomes available
-     *
-     *  "lock" [ IN ] - externally acquired lock
-     */
-    inline rc_t Wait ( struct KLock *lock )
-        throw ()
-    { return KSemaphoreWait ( this, lock ); }
-
-    inline rc_t Wait ( struct KLock *lock, struct timeout_t *tm )
-        throw ()
-    { return KSemaphoreTimedWait ( this, lock, tm ); }
-
-    inline rc_t TimedWait ( struct KLock *lock, struct timeout_t *tm )
-        throw ()
-    { return KSemaphoreTimedWait ( this, lock, tm ); }
-
-
-    /* Signal
-     *  signal that a count has become available
-     */
-    inline rc_t Signal ()
-        throw ()
-    { return KSemaphoreSignal ( this ); }
-
-
-    /* Alloc
-     *  allocate a count
-     *  used for resource metering
-     *
-     *  "lock" [ IN ] - externally acquired lock
-     *
-     *  "count" [ IN ] - the resource count
-     */
-    inline rc_t Alloc ( struct KLock *lock, uint64_t count )
-        throw ()
-    { return KSemaphoreAlloc ( this, lock, count ); }
-
-    inline rc_t Alloc ( struct KLock *lock, uint64_t count, struct timeout_t *tm )
-        throw ()
-    { return KSemaphoreTimedAlloc ( this, lock, count, tm ); }
-
-    inline rc_t TimedAlloc ( struct KLock *lock, uint64_t count, struct timeout_t *tm )
-        throw ()
-    { return KSemaphoreTimedAlloc ( this, lock, count, tm ); }
-
-
-    /* Free
-     *  signal that resources have become available
-     */
-    inline rc_t Free ( uint64_t count )
-        throw ()
-    { return KSemaphoreFree ( this, count ); }
-
-
-    /* Count
-     *  request the current resource usage
-     *  valid only within lock
-     *
-     *  "count" [ OUT ] - return parameter for current count
-     */
-    inline rc_t Count ( uint64_t *count ) const
-        throw ()
-    { return KSemaphoreCount ( this, count ); }
-
-private:
-    KSemaphore ();
-    ~ KSemaphore ();
-    KSemaphore ( const KSemaphore& );
-    KSemaphore &operator = ( const KSemaphore& );
-};
-
-#endif // _hpp_kproc_sem_
diff --git a/interfaces/kproc/task.h b/interfaces/kproc/task.h
deleted file mode 100644
index 5e49547..0000000
--- a/interfaces/kproc/task.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kproc_task_
-#define _h_kproc_task_
-
-#ifndef _h_kproc_extern_
-#include <kproc/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-
-
-/*--------------------------------------------------------------------------
- * KTask
- *  a deferred task abstraction
- *  specific task objects are constructed with required parameters
- *  and implement the Execute method to perform their operation
- */
-typedef struct KTask KTask;
-
-
-/* AddRef
- * Release
- */
-KPROC_EXTERN rc_t CC KTaskAddRef ( const KTask *self );
-KPROC_EXTERN rc_t CC KTaskRelease ( const KTask *self );
-KPROC_EXTERN rc_t CC KTaskDestroy ( KTask *self, const char *clsname );
-
-/* Execute
- *  perform deferred operation
- */
-KPROC_EXTERN rc_t CC KTaskExecute ( KTask *self );
-
-/*--------------------------------------------------------------------------
- * KTaskTicket
- *  an opaque object holding task identification
- */
-typedef struct KTaskTicket KTaskTicket;
-struct KTaskTicket
-{
-    uint64_t info [ 2 ];
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kproc_task_ */
diff --git a/interfaces/kproc/thread.h b/interfaces/kproc/thread.h
deleted file mode 100644
index f82676a..0000000
--- a/interfaces/kproc/thread.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kproc_thread_
-#define _h_kproc_thread_
-
-#ifndef _h_kproc_extern_
-#include <kproc/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KThread
- *  a CPU execution thread
- */
-typedef struct KThread KThread;
-
-/* Make
- *  create and run a thread
- *
- *  "run_thread" [ IN ] - thread entrypoint
- *
- *  "data" [ IN, OPAQUE ] - user-supplied thread data
- */
-KPROC_EXTERN rc_t CC KThreadMake ( KThread **t,
-    rc_t ( CC * run_thread ) ( const KThread *self, void *data ), void *data );
-
-
-/* AddRef
- * Release
- */
-KPROC_EXTERN rc_t CC KThreadAddRef ( const KThread *self );
-KPROC_EXTERN rc_t CC KThreadRelease ( const KThread *self );
-
-
-/* Cancel
- *  signal the thread to finish
- */
-KPROC_EXTERN rc_t CC KThreadCancel ( KThread *self );
-
-
-/* Wait
- *  waits for a thread to exit
- *
- *  "status" [ OUT, NULL OKAY ] - return parameter for thread's exit code
- */
-KPROC_EXTERN rc_t CC KThreadWait ( KThread *self, rc_t *status );
-
-
-/* Detach
- *  allow thread to run independently of group
- */
-KPROC_EXTERN rc_t CC KThreadDetach ( KThread *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kproc_thread_ */
diff --git a/interfaces/kproc/thread.hpp b/interfaces/kproc/thread.hpp
deleted file mode 100644
index 53b9510..0000000
--- a/interfaces/kproc/thread.hpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_kproc_thread_
-#define _hpp_kproc_thread_
-
-#ifndef _h_kproc_thread_
-#include <kproc/thread.h>
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KThread
- *  a CPU execution thread
- */
-struct KThread
-{
-    /* Make
-     *  create and run a thread
-     *
-     *  "run_thread" [ IN ] - thread entrypoint
-     *
-     *  "data" [ IN, OPAQUE ] - user-supplied thread data
-     */
-    static inline rc_t Make ( KThread **t,
-             rc_t ( CC * run_thread ) ( const KThread *, void * ), void * data )
-        throw ()
-    { return KThreadMake ( t, run_thread, data ); }
-
-
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef () const
-        throw ()
-    { return KThreadAddRef ( this ); }
-
-    inline rc_t Release () const
-        throw ()
-    { return KThreadRelease ( this ); }
-
-
-    /* Cancel
-     *  signal the thread to finish
-     */
-    inline rc_t Cancel ()
-        throw ()
-    { return KThreadCancel ( this ); }
-
-
-    /* Wait
-     *  waits for a thread to exit
-     *
-     *  "status" [ OUT ] - return parameter for thread's exit code
-     */
-    inline rc_t Wait ( rc_t *status )
-        throw ()
-    { return KThreadWait ( this, status ); }
-
-
-    /* Detach
-     *  allow thread to run independently of group
-     */
-    inline rc_t Detach ()
-        throw ()
-    { return KThreadDetach ( this ); }
-
-private:
-    KThread ();
-    ~ KThread ();
-    KThread ( const KThread& );
-    KThread &operator = ( const KThread& );
-};
-
-#endif // _hpp_kproc_thread_
diff --git a/interfaces/kproc/timeout.h b/interfaces/kproc/timeout.h
deleted file mode 100644
index 738c9c3..0000000
--- a/interfaces/kproc/timeout.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kproc_timeout_
-#define _h_kproc_timeout_
-
-#ifndef _h_kproc_extern_
-#include <kproc/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_os_native_
-#include <os-native.h> /* struct timeout_t */
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * system specific timeout object
- */
-typedef struct timeout_t timeout_t;
-
-
-/* Init
- *  initialize a timeout in milliseconds
- */
-KPROC_EXTERN rc_t CC TimeoutInit ( timeout_t *tm, uint32_t msec );
-
-
-/* Prepare
- *  ensures that a timeout is prepared with an absolute value
-*/
-KPROC_EXTERN rc_t CC TimeoutPrepare ( timeout_t *tm );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kproc_timeout_ */
diff --git a/interfaces/krypto/aes-priv.h b/interfaces/krypto/aes-priv.h
deleted file mode 100644
index 3511bc0..0000000
--- a/interfaces/krypto/aes-priv.h
+++ /dev/null
@@ -1 +0,0 @@
-#error "OBSOLETE: DO NOT USE"
diff --git a/interfaces/krypto/cipher-impl.h b/interfaces/krypto/cipher-impl.h
deleted file mode 100644
index 02214d4..0000000
--- a/interfaces/krypto/cipher-impl.h
+++ /dev/null
@@ -1 +0,0 @@
-#error "OBSOLETE do not use"
diff --git a/interfaces/krypto/cipher-priv.h b/interfaces/krypto/cipher-priv.h
deleted file mode 100644
index 328ba6d..0000000
--- a/interfaces/krypto/cipher-priv.h
+++ /dev/null
@@ -1 +0,0 @@
-#error "Obsolete do not use"
diff --git a/interfaces/krypto/cipher-test.h b/interfaces/krypto/cipher-test.h
deleted file mode 100644
index f123525..0000000
--- a/interfaces/krypto/cipher-test.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#ifndef _h_krypto_cipher_test_
-#define _h_krypto_cipher_test_
-
-#include <krypto/extern.h>
-#include <klib/defs.h>
-
-#include <krypto/ciphermgr.h>
-
-KRYPTO_EXTERN rc_t KCipherTestVecAesNiMake (struct KCipher ** new_cipher,
-                                            kcipher_type type);
-KRYPTO_EXTERN rc_t KCipherTestVecRegMake   (struct KCipher ** new_cipher,
-                                            kcipher_type type);
-KRYPTO_EXTERN rc_t KCipherTestVecMake      (struct KCipher ** new_cipher,
-                                            kcipher_type type);
-KRYPTO_EXTERN rc_t KCipherTestByteMake     (struct KCipher ** new_cipher,
-                                            kcipher_type type);
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* #ifndef _h_krypto_cipher_test_ */
diff --git a/interfaces/krypto/cipher.h b/interfaces/krypto/cipher.h
deleted file mode 100644
index 2f22733..0000000
--- a/interfaces/krypto/cipher.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#ifndef _h_krypto_cipher_
-#define _h_krypto_cipher_
-
-#include <krypto/extern.h>
-#include <klib/defs.h>
-
-typedef struct KCipher KCipher;
-
-KRYPTO_EXTERN 
-rc_t CC KCipherAddref (const KCipher * self);
-
-KRYPTO_EXTERN rc_t CC KCipherRelease (const KCipher * self);
-
-KRYPTO_EXTERN rc_t CC KCipherBlockSize (const KCipher * self, size_t * bytes);
-
-KRYPTO_EXTERN rc_t CC KCipherSetEncryptKey (KCipher * self,
-                                            const void * user_key,
-                                            size_t user_key_size);
-
-KRYPTO_EXTERN rc_t CC KCipherSetDecryptKey (KCipher * self,
-                                            const void * user_key,
-                                            size_t user_key_size);
-
-/*
- * Set the ivec (Initialization vector or feedback) for the cipher
- * this is done automatically for the longer runs defined below.
- *
- * the size of ivec  must match KCipherBlockSize
- *
- * the ivec is copied into the cipher not used in place
- */
-KRYPTO_EXTERN
- rc_t CC KCipherSetEncryptIVec (KCipher * self, const void * ivec);
-
-KRYPTO_EXTERN
- rc_t CC KCipherSetDecryptIVec (KCipher * self, const void * ivec);
-
-
-typedef void (*cipher_ctr_func)(void * ivec);
-
-KRYPTO_EXTERN rc_t CC KCipherSetEncryptCtrFunc (KCipher * self, cipher_ctr_func func);
-
-KRYPTO_EXTERN rc_t CC KCipherSetDecryptCtrFunc (KCipher * self, cipher_ctr_func func);
-
-/*
- * 'in' can equal 'out'
- */
-KRYPTO_EXTERN rc_t CC KCipherEncrypt (KCipher * self, const void * in, void * out);
-
-KRYPTO_EXTERN rc_t CC KCipherDecrypt (KCipher * self, const void * in, void * out);
-
-
-/* ====================
- * longer runs of multiple blocks.
- *
- * The algorithms are well defined and standard in most cases.
- *
- * PT: plain text block
- * CT: cipher text block
- * EK: encryption key
- * DK: decryption key (might be sthe same as EK)
- * ENC: encrypt cipher function on a block using a key
- * DEC: decrypt cipher function on a block using a key
- * IV: initialization vector - used as feedback for chaining
- * N:  number used once (nonce)
- * FB: feedback is the next IV in a chained/feedback mode
- */
-
-/* -----
- * NOTE:
- * 'in' can be the same as 'out' but other overlaps are dangers as a block at a
- * time is written. The code does not look for overlaps at this point.
- */
-
-/* ----------
- * Electronic Code Book - simple cipher with no chaining feedback  just iterate
- * simple encrypt/decrypt with the plain, text, cipher text and key/
- *
- * CT = ENC (PT,EK)
- * PT = DEC (CT,DK)
- */
-
-/* -----
- * NOTE: currently an implmentation detail limits us to 8192 bit cipher block
- * size.  Changing MAX_BLOCK_SIZE in cipher.c can up that limit without 
- * causing any other compatibility issues. 
- *
- * Two local byte arrays are defined on the stack of 1024 bytes or 8192 bits.
- */
-KRYPTO_EXTERN rc_t CC KCipherEncryptECB (KCipher * self, const void * in, void * out,
-                                         uint32_t block_count);
-
-KRYPTO_EXTERN rc_t CC KCipherDecryptECB (KCipher * self, const void * in, void * out,
-                                         uint32_t block_count);
-
-/* ----------
- * Cipher-Block Chaining
- * CT = (FB = ENC (PT^IV, EK))
- * PT = DEC ((FB = CT), DK)
- *
- */
-KRYPTO_EXTERN rc_t CC KCipherEncryptCBC (KCipher * self, const void * in, void * out,
-                                         uint32_t block_count);
-
-KRYPTO_EXTERN rc_t CC KCipherDecryptCBC (KCipher * self, const void * in, void * out,
-                                         uint32_t block_count);
-
-/* ----------
- * Propagating cipher-block chaining
- * FB = PT ^ (CT = ENC ((PT^IV), EK))
- * FB = CT ^ (PT = DEC (CT,DK) ^ IV)
- */
-
-/* not yet implemented */
-
-/* ----------
- * Cipher Feedback
- * CT = (FB = PT) ^ ENC (IV, EK))
- * PT = (FB = CT) ^ ENC (IV, DK)
- *
- * NOTE the use of the encrypt function for decryption
- *
- * Not implemented as the openssl does something different
- */
-KRYPTO_EXTERN
-rc_t CC KCipherEncryptCFB (KCipher * self, const void * in, void * out,
-                           uint32_t block_count);
-
-KRYPTO_EXTERN
-rc_t CC KCipherDecryptCFB (KCipher * self, const void * in, void * out,
-                           uint32_t block_count);
-
-KRYPTO_EXTERN
-rc_t CC KCipherEncryptPCFB (KCipher * self, const void * in, void * out,
-                            uint32_t block_count);
-
-KRYPTO_EXTERN
-rc_t CC KCipherDecryptPCFB (KCipher * self, const void * in, void * out,
-                            uint32_t block_count);
-
-/* ----------
- * Output Feedback
- * CT = PT ^ (FB = ENC (IV, EK))
- * PT = CT ^ (FB = ENC (IV, DK))
- *
- * NOTE the use of the encrypt function for decryption
- *
- * Not implemented as the openssl does something different
- */
-KRYPTO_EXTERN
-rc_t CC KCipherEncryptOFB (KCipher * self, const void * in, void * out,
-                           uint32_t block_count);
-
-KRYPTO_EXTERN
-rc_t CC KCipherDecryptOFB (KCipher * self, const void * in, void * out,
-                           uint32_t block_count);
-
-/* ----------
- * Counter
- * IV is a nonce and not re-used as FB
- * CT = PT ^ ENC (N, EK)
- * PT = CT ^ ENC (N, DK)
- *
- * NOTE the use of the encrypt function for decryption
- *
- * nonce is a function that given an iv generates the next iv
- *
- */
-KRYPTO_EXTERN
-rc_t CC KCipherEncryptCTR (KCipher * self, const void * in,
-                           void * out, uint32_t block_count);
-KRYPTO_EXTERN
-rc_t CC KCipherDecryptCTR (KCipher * self, const void * in,
-                           void * out, uint32_t block_count);
-
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* #ifndef _h_krypto_cipher_ */
diff --git a/interfaces/krypto/ciphermgr-priv.h b/interfaces/krypto/ciphermgr-priv.h
deleted file mode 100644
index 943e067..0000000
--- a/interfaces/krypto/ciphermgr-priv.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-
-
-#ifdef  __cplusplus
-}
-#endif
-
-
-
-#endif /* #ifndef _h_krypto_manager_priv_ */
diff --git a/interfaces/krypto/ciphermgr.h b/interfaces/krypto/ciphermgr.h
deleted file mode 100644
index 2534400..0000000
--- a/interfaces/krypto/ciphermgr.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_krypto_manager_
-#define _h_krypto_manager_
-
-#ifndef _h_krypto_extern_
-#include <krypto/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-
-#ifndef _h_kfs_defs_
-#include <kfs/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* enabled/disable a set of in-house clean;y written aes ciphers. some optimize
- * for certain c processors */
-
-#define USE_NCBI_AES 1
-
-
-/*--------------------------------------------------------------------------
- * KCipherManager
- */
-struct KCipher;
-
-typedef struct KCipherManager KCipherManager;
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KRYPTO_EXTERN
-rc_t CC KCipherManagerAddRef (const KCipherManager *self);
-
-KRYPTO_EXTERN
-rc_t CC KCipherManagerRelease (const KCipherManager *self);
-
-
-/* MakeCipher
- */
-typedef uint32_t kcipher_type;
-enum
-{
-    kcipher_null, /* no encryption = just a copy */
-    kcipher_AES,
-    kcipher_count
-};
-
-
-KRYPTO_EXTERN
-rc_t CC KCipherManagerMakeCipher (const KCipherManager * self,
-                                  struct KCipher ** cipher,
-                                  kcipher_type type);
-
-/* Make
- */
-KRYPTO_EXTERN
-rc_t CC KCipherManagerMake (KCipherManager ** pmanager);
-
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_manager_ */
diff --git a/interfaces/krypto/encfile-priv.h b/interfaces/krypto/encfile-priv.h
deleted file mode 100644
index 84deaf7..0000000
--- a/interfaces/krypto/encfile-priv.h
+++ /dev/null
@@ -1,250 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_krypto_encfile_priv_
-#define _h_krypto_encfile_priv_
-
-#ifndef _h_krypto_extern_
-#include <krypto/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <krypto/encfile.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define DEBUG_STS(msg)     DBGMSG(DBG_KRYPTO,DBG_FLAG(DBG_KRYPTO_STS),msg)
-#define DEBUG_CFG(msg)     DBGMSG(DBG_KRYPTO,DBG_FLAG(DBG_KRYPTO_CFG_,msg)
-#define DEBUG_ENCRYPT(msg) DBGMSG(DBG_KRYPTO,DBG_FLAG(DBG_KRYPTO_ENCRYPT),msg)
-#define DEBUG_DECRYPT(msg) DBGMSG(DBG_KRYPTO,DBG_FLAG(DBG_KRYPTO_DECRYPT),msg)
-
-/* -----
- * Encrypted file structure:
- *   - File Header
- *   - zero or more data blocks
- *   - file footer
- *
- * File Header:
- *   - file signature "NCBInenc"
- *   - byte order flag 
- *   - version
- *
- * Data Block:
- *   - rkey - randomly generated 32 byte key for this block (encrypted using user key)
- *   - encrypted block of 32768 bytes size above says how many are really used (encrypted using rkey and salt above)
- *   - block-offset + (valid bytes in block % 32768)
- *   - crc-32 (includes phantom block start offset as initial seed)
- *
- * File Footer:
- *   - footer signature "foot"
- *   - checksum of crcs
- */
-
-
-/* ----------------------------------------------------------------------
- * Header - the file header
- * all constant values for the first version
- */
-typedef char KEncFileSig [8];
-typedef uint32_t Endian_t;
-typedef uint32_t KEncFileVersion;
-
-
-typedef struct KEncFileHeader KEncFileHeader;
-struct KEncFileHeader
-{
-    KEncFileSig     file_sig;   /* "NCBInenc" or "NCBIkenc" */
-    Endian_t        byte_order; /* do we byte swap on read? */
-    KEncFileVersion version;    /* simple incrementation starting at 1 */
-};
-
-
-/* ----------------------------------------------------------------------
- * KEncFileBlock
- *    The body of the file is blocks containing a portion of the decrypted
- *    file.  These are an ordered sequence with the last block being the
- *    same size as the rest but with only some of the data portion being
- *    a part of the file.
- *
- *    An encrypted file is longer than an unencrypted file by 
- *       a constant: the lengths of the header and the footer
- *       proportionally by the length of the block key and crc
- */
-
-/* -----
- * Key  the header for an encrypted block
- *
- * when initialized the first 38 bytes should be set to random data.
- * valid is a count of how many bytes in the block are valid data
- * offset is the offset of this block with in the decrypted file
- */
-typedef uint8_t KEncFileKey [32];
-
-
-/* -----
- * We sized the data portion of a block to match the KPageFile
- * structure allowing a KBufFile in front of a KEncFile to
- * operate in a fairly efficient manner
- */
-#define ENC_DATA_BLOCK_SIZE     (32*1024)
-typedef uint8_t KEncFileData [ENC_DATA_BLOCK_SIZE];
-
-typedef uint16_t KEncFileOffValid;
-
-typedef uint64_t KEncFileBlockId;
-typedef uint16_t KEncFileBlockValid;
-
-/* -----
- * we use the same 32 bit CRC as the rest of the project
- */
-typedef uint32_t KEncFileCRC;
-
-
-/*
- * NOTE:
- * The size of data + u + id + crc + crc_copy must remain divisible
- * by the size of key
- */
-typedef struct KEncFileBlock KEncFileBlock;
-struct KEncFileBlock
-{
-    KEncFileKey         key;  /* encrypted with the user key */
-    KEncFileData        data; /* encrypted with block key */
-    union
-    {
-        KEncFileBlockValid  valid; /* obscured and encrypted */
-        uint8_t bytes [16];        /* mostly fill */
-    } u;
-    KEncFileBlockId     id;        /* plain text */
-    KEncFileCRC         crc;       /* plain text */
-    KEncFileCRC         crc_copy;  /* plain text */
-};
-
-
-/* ----------------------------------------------------------------------
- * Foot - the ending of an encrypted file: 
- *   these are in plan text for non-decryption validation of the whole file
- *
- * In Version 1 the crc_checksum is required.
- * In Version 2 the crc_checksum is optional - if 0 it is not computed.
- */
-typedef uint64_t KEncFileFooter_t;
-typedef struct KEncFileFooter KEncFileFooter;
-struct KEncFileFooter
-{
-    KEncFileFooter_t block_count;  /* how many blocks do we have? */
-    KEncFileFooter_t crc_checksum; /* sum of crcs of all blocks */
-};
-
-
-/* ----------
- * Read mode is fully seekable if the underlying KFile is seekable some
- * integrity checking will not be performed in allowing this seeking.
- */
-KRYPTO_EXTERN rc_t CC KEncFileMakeRead_v1 (const struct KFile ** pself,
-                                           const struct KFile * encrypted_input,
-                                           const struct KKey * key);
-
-KRYPTO_EXTERN rc_t CC KEncFileMakeRead_v2 (const struct KFile ** pself,
-                                           const struct KFile * encrypted_input,
-                                           const struct KKey * key);
-
-
-/* ----------
- * Write mode encrypted file can only be written straight through from the
- * first byte to the last.
- */
-KRYPTO_EXTERN rc_t CC KEncFileMakeWrite_v1 (struct KFile ** pself,
-                                            struct KFile * encrypted_output,
-                                            const struct KKey * key);
-
-KRYPTO_EXTERN rc_t CC KEncFileMakeWrite_v2 (struct KFile ** pself,
-                                            struct KFile * encrypted_output,
-                                            const struct KKey * key);
-
-
-/* ----------
- * Update mode is read/write mode where seeking within the file is allowed.
- *
- * NOTE this is in the private interface because it is not actually working
- * yet.
- */
-KRYPTO_EXTERN rc_t CC KEncFileMakeUpdate_v1 (struct KFile ** pself, 
-                                             struct KFile * encrypted,
-                                             const struct KKey * key);
-
-KRYPTO_EXTERN rc_t CC KEncFileMakeUpdate_v2 (struct KFile ** pself, 
-                                             struct KFile * encrypted,
-                                             const struct KKey * key);
-
-
-/* ----------
- * Validate mode can not be read or written.
- * Upon open the whole file is read from beginning to end and all CRC
- * and other integrity checks are performed immediately
- */
-KRYPTO_EXTERN rc_t CC KEncFileValidate_v1 (const struct KFile * encrypted);
-
-KRYPTO_EXTERN rc_t CC KEncFileValidate_v2 (const struct KFile * encrypted);
-
-
-/* ----------
- * Identify whether a file is a KEncFile type encrypted file by the header.
- * read the header into a buffer and pass it into this function.  
- * The buffer_size needs to be at least 8 but more bytes lead to a better
- * check up to the size of the header of a KEncFile type encrypted file.
- * As the header may change in the future (in a backwards compatible way)
- * that size might change from the current 16.
- *
- * Possible returns:
- * 0:
- *      the file is an identified KEncFile type file.  False positives are
- *      possible if a file happens to match at 8 or more bytes
- *
- * RC (rcFS, rcFile, rcIdentifying, rcFile, rcWrongType)
- *      the file is definitely not a KEncFIle type encrypted file.
- *     
- * RC (rcFS, rcFile, rcIdentifying, rcParam, rcNull)
- *      bad parameters in the call
- *
- * RC (rcFS, rcFile, rcIdentifying, rcBuffer, rcInsufficient)
- *      not a large enough buffer to make an identification
- */
-KRYPTO_EXTERN rc_t CC KFileIsEnc_v1 (const char * buffer, size_t buffer_size);
-
-KRYPTO_EXTERN rc_t CC KFileIsEnc_v2 (const char * buffer, size_t buffer_size);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_krypto_encfile_priv_ */
diff --git a/interfaces/krypto/encfile.h b/interfaces/krypto/encfile.h
deleted file mode 100644
index df8efe1..0000000
--- a/interfaces/krypto/encfile.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*
- * This needs to be changed to true in about the middle of summer 2013
- *
- * When re-enabling this feature also fix test/kreypto/Makefile
- */
-#define SENC_IS_NENC_FOR_WRITER 0
-
-
-#ifndef _h_krypto_encfile_
-#define _h_krypto_encfile_
-
-#ifndef _h_krypto_extern_
-#include <krypto/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KFile;
-struct KKey;
-
-typedef struct KEncFile KEncFile;
-
-/* ----------
- * Read mode is fully seekable if the underlying KFile is seekable some
- * integrity checking will not be performed in allowing this seeking.
- *
- * One difference between update and read mode is the handling of
- * "missing blocks". Open for update will read a missing block as all
- * zero while 
- */
-KRYPTO_EXTERN rc_t CC KEncFileMakeRead (const struct KFile ** pself,
-                                        const struct KFile * encrypted_input,
-                                        const struct KKey * key);
-
-
-/* ----------
- * Write mode encrypted file can only be written straight through from the
- * first byte to the last.
- */
-KRYPTO_EXTERN rc_t CC KEncFileMakeWrite (struct KFile ** pself,
-                                         struct KFile * encrypted_output,
-                                         const struct KKey * key);
-
-
-/* ----------
- * Update mode is read/write mode where seeking within the file is allowed.
- * 
- * One difference between update and read mode is the handling of
- * "missing blocks". Open for update will read a missing block as all
- * zero while 
- */
-KRYPTO_EXTERN rc_t CC KEncFileMakeUpdate (struct KFile ** pself, 
-                                          struct KFile * encrypted,
-                                          const struct KKey * key);
-
-
-/* ----------
- * Validate mode can not be read or written.
- * Upon open the whole file is read from begining to end and all CRC
- * and other integrity checks are performed immedaitely
- */
-KRYPTO_EXTERN rc_t CC KEncFileValidate (const struct KFile * encrypted);
-
-
-/* ----------
- * Identify whether a file is a KEncFile type encrypted file by the header.
- * read the header into a buffer and pass it into this function.  
- * The buffer_size needs to be at least 8 but more bytes lead to a better
- * check up to the size of the header of a KEncFile type encrypted file.
- * As the header may change in the future (in a backwards compatible way)
- * that size might change from the current 16.
- *
- * Possible returns:
- * 0:
- *      the file is an identified KEncFile type file.  False positives are
- *      possible if a file happens to match at 8 or more bytes
- *
- * RC (rcFS, rcFile, rcIdentifying, rcFile, rcWrongType)
- *      the file is definitely not a KEncFIle type encrypted file.
- *     
- * RC (rcFS, rcFile, rcIdentifying, rcParam, rcNull)
- *      bad parameters in the call
- *
- * RC (rcFS, rcFile, rcIdentifying, rcBuffer, rcInsufficient)
- *      not a large enough buffer to make an identification
- */
-
-/* requires NCBInenc or NCBIsenc or signature but if available
- * checks the byte order and version fields
- */
-KRYPTO_EXTERN rc_t CC KFileIsEnc (const char * buffer, size_t buffer_size);
-
-/* same as above but requires NCBIsenc signature only */
-KRYPTO_EXTERN rc_t CC KFileIsSraEnc (const char * buffer, size_t buffer_size);
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_krypto_encfile_ */
diff --git a/interfaces/krypto/extern.h b/interfaces/krypto/extern.h
deleted file mode 100644
index 70c1b0c..0000000
--- a/interfaces/krypto/extern.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_krypto_extern_
-#define _h_krypto_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define KRYPTO_EXTERN LIB_EXPORT
-#define KRYPTO_EXTERN_DATA extern LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define KRYPTO_EXTERN LIB_IMPORT
-#ifdef __cplusplus
-#define KRYPTO_EXTERN_DATA extern /* LIB_IMPORT_DATA */
-#else
-#define KRYPTO_EXTERN_DATA LIB_IMPORT_DATA
-#endif
-
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_krypto_extern_ */
diff --git a/interfaces/krypto/key.h b/interfaces/krypto/key.h
deleted file mode 100644
index f170d7d..0000000
--- a/interfaces/krypto/key.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_key_
-#define _h_kfs_key_
-
-#ifndef _h_krypto_extern_
-#include <krypto/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct KKey KKey;
-
-
-typedef uint32_t KKeyType;
-enum eKKeyType
-{
-    kkeyNone,
-    kkeyAES128,
-    kkeyAES192,
-    kkeyAES256,
-    kkeyTypeCount
-};
-
-#define KKeyTypeDefault (kkeyAES128)
-
-struct KKey
-{
-    KKeyType type;
-    uint8_t  text [32]; /* might be more, might be less */
-};
-
-enum eKKeySize
-{
-    kkeyMinimumSize = 6
-};
-
-KRYPTO_EXTERN_DATA KKey KKeyEncrypt;
-KRYPTO_EXTERN_DATA KKey KKeyDecrypt;
-
-/* WGA ncryption passwords are only significant to 32 characters */
-#define WGA_MAX_PASSWORD (32)
-KRYPTO_EXTERN_DATA char WGAEncryptPassword[WGA_MAX_PASSWORD];
-KRYPTO_EXTERN_DATA char WGADecryptPassword[WGA_MAX_PASSWORD];
-
-typedef char KryptoKeyMapNCBI [32*2];
-typedef char KryptoKeyMapWGA  [2 + 32*2];
-typedef char KryptoKeyMap [(2*sizeof(KryptoKeyMapNCBI))+(2*sizeof(KryptoKeyMapWGA))+1];
-enum
-{
-    KryptoKeyMapEncrypt = 0,
-    KryptoKeyMapDecrypt = sizeof(KryptoKeyMapNCBI),
-    KryptoKeyMapWGAEncrypt = KryptoKeyMapDecrypt + sizeof(KryptoKeyMapNCBI),
-    KryptoKeyMapWGADecrypt = KryptoKeyMapWGAEncrypt + sizeof(KryptoKeyMapWGA),
-    KryptoKeyMapNul = KryptoKeyMapWGADecrypt + sizeof(KryptoKeyMapWGA)
-};
-
-KRYPTO_EXTERN  rc_t CC KKeyInitRead (KKey * self, KKeyType key_type, 
-                                     const void * password, size_t password_size);
-
-KRYPTO_EXTERN rc_t CC KKeyInitUpdate (KKey * key, KKeyType key_type, 
-                                      const void * password, size_t password_size);
-
-
-#define FAIL_SHORT_PASSWORD (false)
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_key_ */
diff --git a/interfaces/krypto/manager-priv.h b/interfaces/krypto/manager-priv.h
deleted file mode 100644
index f2f3346..0000000
--- a/interfaces/krypto/manager-priv.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#error "OBSOLETE do not use"
diff --git a/interfaces/krypto/manager.h b/interfaces/krypto/manager.h
deleted file mode 100644
index 0581659..0000000
--- a/interfaces/krypto/manager.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_krypto_manager_
-#define _h_krypto_manager_
-
-
-DO NOT USE
-
-#endif /* _h_krypto_manager_ */
diff --git a/interfaces/krypto/reencfile.h b/interfaces/krypto/reencfile.h
deleted file mode 100644
index ebef56a..0000000
--- a/interfaces/krypto/reencfile.h
+++ /dev/null
@@ -1,94 +0,0 @@
-
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_krypto_reencfile_
-#define _h_krypto_reencfile_
-
-#ifndef _h_krypto_extern_
-#include <krypto/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Currently only the read version is implmented
- */
-#define REENCFILE_WRITE_SUPPORTED 0
-/*
- * Currently the input encrypted KFile must respond to KFileSize
- * with the size of the encrypted file. 
- */
-#define REENCFILE_STREAM_SUPPORTED 0
-
-
-struct KFile;
-struct KKey;
-
-typedef struct KReencFile KReencFile;
-
-/* ----------
- * Read mode is fully seekable if the underlying KFile is seekable some
- * integrity checking will not be performed in allowing this seeking.
- */
-KRYPTO_EXTERN rc_t CC KReencFileMakeRead (const struct KFile ** pself, 
-                                          const struct KFile * encrypted,
-                                          const struct KKey * deckey,
-                                          const struct KKey * enckey);
-/* ----------
- * The same operation as above, but as input it accepts a plain text,
- * not encrypted file and encrypts it with enckey
- */
-KRYPTO_EXTERN rc_t CC KEncryptFileMakeRead (const struct KFile ** pself, 
-                                            const struct KFile * encrypted,
-                                            const struct KKey * enckey);
-
-
-/* ----------
- * Write mode encrypted file can only be written straight through form the
- * first byte to the last.
- */
-#if REENCFILE_WRITE_SUPPORTED
-KRYPTO_EXTERN rc_t CC KReencFileMakeWrite (struct KFile ** pself, 
-                                           struct KFile * encrypted,
-                                           const struct KKey * deckey,
-                                           const struct KKey * enckey);
-#endif
-
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_krypto_reencfile_ */
diff --git a/interfaces/krypto/rng-impl.h b/interfaces/krypto/rng-impl.h
deleted file mode 100644
index 96d03fe..0000000
--- a/interfaces/krypto/rng-impl.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kryptoimpl_
-#define _h_kryptoimpl_
-
-#include <krypto/extern.h>
-#include <krypto/rng.h>
-#include <klib/refcount.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-
-typedef union KRng_vt KRng_vt;
-
-struct KRng
-{
-    const union KRng_vt *vt;
-    KRefcount refcount;
-};
-
-#ifndef KRNG_IMPL
-#define KRNG_IMPL KRng
-#endif
-
-typedef struct KRng_vt_v1 KRng_vt_v1;
-struct KRng_vt_v1
-{
-    /* version == 1.x */
-    uint32_t maj;
-    uint32_t min;
-
-    /* start minor version == 0 */
-    rc_t (CC * destroy) (KRNG_IMPL * self);
-    rc_t (CC * seed)    (KRNG_IMPL * self);
-    rc_t (CC * reseed)  (KRNG_IMPL * self, const void * buff, size_t buff_size);
-    rc_t (CC * read)    (const KRNG_IMPL *self, void * buff, uint32_t buff_len,
-                         uint32_t * num_read);
-    /* end minor version == 0 */
-    /* start minor version == 1 */
-    /* end minor version == 1 */
-    /* end version == 1.x */
-};
-
-union KRng_vt
-{
-    KRng_vt_v1 v1;
-};
-
-KRYPTO_EXTERN rc_t CC KRngInit (KRng * self, union KRng_vt * vt, const char * type);
-KRYPTO_EXTERN rc_t CC KRngSysEntropy (KRng * self, uint8_t * buffer, size_t size);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kryptoimpl_ */
diff --git a/interfaces/krypto/rng.h b/interfaces/krypto/rng.h
deleted file mode 100644
index 32b0d47..0000000
--- a/interfaces/krypto/rng.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_krypto_rng_
-#define _h_krypto_rng_
-
-#ifndef _h_krypto_extern_
-#include <krypto/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct KRng KRng;
-
-/* attach a new 'ownership' reference */
-KRYPTO_EXTERN rc_t CC KRngAddRef (const KRng * self);
-
-/* release an 'ownership' reference */
-KRYPTO_EXTERN rc_t CC KRngRelease (const KRng * self);
-
-/* call to the system entropy function and [re-]seed the rng */
-KRYPTO_EXTERN rc_t CC KRngSeed (KRng * self);
-
-/* fill a buffer of a given size with random values: type sepcific as to the meaning or size of elements
- * return the number of elements actually written to the buffer */
-KRYPTO_EXTERN rc_t CC KRngRead (const KRng * self, void * buffer, uint32_t bsize, uint32_t * num_read);
-
-
-/*
- * Cryptographically secure pseudo-random number generator
- * elements are 8 bits long
- */
-KRYPTO_EXTERN rc_t CC KCSPRngMake (KRng ** pself);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_krypto_rng_ */
diff --git a/interfaces/krypto/testciphermgr.h b/interfaces/krypto/testciphermgr.h
deleted file mode 100644
index ffaa35a..0000000
--- a/interfaces/krypto/testciphermgr.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_krypto_manager_test_
-#define _h_krypto_manager_test_
-
-#include <krypto/ciphermgr.h>
-
-/* MakeCipher
- */
-typedef int32_t kcipher_subtype;
-enum
-{
-    ksubcipher_none = -1,
-    ksubcipher_byte,
-    ksubcipher_vec,
-    ksubcipher_vecreg,
-    ksubcipher_accelerated, /* for example AES-NI */ 
-    ksubcipher_count
-};
-
-extern kcipher_subtype KCipherSubType;
-
-
-KRYPTO_EXTERN
-rc_t CC KCipherManagerTestMakeCipher (const KCipherManager * self,
-                                      struct KCipher ** cipher,
-                                      kcipher_type type,
-                                      kcipher_subtype subtype);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_manager_ */
diff --git a/interfaces/krypto/wgaencrypt.h b/interfaces/krypto/wgaencrypt.h
deleted file mode 100644
index b8cfeeb..0000000
--- a/interfaces/krypto/wgaencrypt.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_krypto_wgaencryptfile_
-#define _h_krypto_wgaencryptfile_
-
-#ifndef _h_krypto_extern_
-#include <krypto/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-
-
-/*--------------------------------------------------------------------------
- * KFile
- *  wga extensions
- */
-
-/* MakeWGAEncRead
- *
- * Parameters:
- *   pself is a KFile that will represent the unencrypted side of operations.
- *
- *   encrypted is a KFile that will represent the encrypted side of operations.
- *
- *   key is an arbitrary array of characters
- *
- *   key_size is how many bytes to use from key.  Maximum used is 256.
- *
- *   encoding is one of the three values defined by FER_ENCODING above.  Any
- *   other values will cause a failure.
- *
- * KFileMakeWGAEncRead
- *   A file opened for read can only read and decrypt an encrypted file.  Seeks
- *   within the file are allowed if the KFile for the encrypted file allows
- *    seeks.
- * 
- * KFileMakeWGAEncUpdate
- *   A file opened for update must be able to read and write from the encrypted
- *   file.  Seeks within the file are allowed if the KFile for the encrypted 
- *   file allows seeks.
- *
- * KFileMakeWGAEncRead
- *   A Write opened file can only be written.  Seeks backwards are not allowed.
- *   Seeks forward will cause NUL data bytes to be inserted before encryption.
- *   An attempt will be made to truncate the encrypted file but failure of that
- *   operation will not fail this call.  Writes will begin at position 0.  If
- *   the file already existed and could not be truncated a corrupt file will
- *   result if the whole of the old contents are not over-written.
- *
- *
- * NOTE: cipher must be of type kcipherAES
- *
- */
-KRYPTO_EXTERN rc_t CC KFileMakeWGAEncRead (const struct KFile ** pself, 
-                                           const struct KFile * encrypted,
-                                           const char * key,
-                                           size_t key_size);
-
-
-/* IsWGAEnc
- *  identify whether a file is a KFileWGAEnc type encrypted file by the header.
- *  read the header into a buffer and pass it into this function.  
- *  The buffer_size needs to be at least 8 but more bytes lead to a better
- *  check up to the size of the header of a KFileWGAEnc type encrypted file.
- *  This file type is deprecated and is not versioned.  Hopefully we won't
- *  have to deal with changes to the format.
- *
- * Possible returns:
- *  0:
- *      the file is an identified KFileWGAEnc type file.  False positives are
- *      possible if a file happens to match at 8 or more bytes
- *
- *  RC (rcFS, rcFile, rcIdentifying, rcFile, rcWrongType)
- *      the file is definitely not a KFileWGAEnc type encrypted file.
- *     
- *  RC (rcFS, rcFile, rcIdentifying, rcParam, rcNull)
- *      bad parameters in the call
- *
- *  RC (rcFS, rcFile, rcIdentifying, rcBuffer, rcInsufficient)
- *      not a large enough buffer to make an identification
- */
-KRYPTO_EXTERN rc_t CC KFileIsWGAEnc (const void * buffer, size_t buffer_size);
-
-KRYPTO_EXTERN rc_t CC WGAEncValidate (const struct KFile * file, 
-                                      const char * password,
-                                      size_t password_size);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_wgaencryptfile_ */
diff --git a/interfaces/ktst/test_tools.hpp b/interfaces/ktst/test_tools.hpp
deleted file mode 100644
index 2e46d54..0000000
--- a/interfaces/ktst/test_tools.hpp
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _h_ktst_test_tools_
-#define _h_ktst_test_tools_
-
-////////////////////////////////////////////////////////////////////////////////
-// these macros are available outside of test cases' code
-
-#define LOG(log_level, msg) \
-    (log_level >= ncbi::NK::TestEnv::verbosity ? (std::cerr << msg) : std::cerr)
-
-#define TEST_MESSAGE(M) \
-{ ncbi_NK_saveLocation(__FILE__,__LINE__); \
-    LOG(ncbi::NK::LogLevel::e_message, M << std::endl); }
-
-#define TEST_CHECKPOINT(M) TEST_MESSAGE(M)
-
-// report failure from a fixture
-#define FAIL( msg_ )     \
-      _REPORT_CRITICAL_ERROR_( (msg_), __FILE__, __LINE__, true )
-
-#define GET_TEST_SUITE ncbi::NK::GetTestSuite
-
-#endif// _h_ktst_test_tools_
diff --git a/interfaces/ktst/unit_test.hpp b/interfaces/ktst/unit_test.hpp
deleted file mode 100644
index 5b12cba..0000000
--- a/interfaces/ktst/unit_test.hpp
+++ /dev/null
@@ -1,260 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ktst_unit_test_
-#define _h_ktst_unit_test_
-
-#include <ktst/unit_test_suite.hpp>
-
-////////////////////////////////////////////////////////////////////////////////
-namespace ncbi { namespace NK {
-
-// a utility template used to pass test character string case names to FixtureTestCase
-template<class T>
-struct TestCaseTraits
-{
-    static const char* name;
-};
-
-// create an executable test case class with the given fixture.
-template <class TCaseTraits, class TFixture>
-class FixtureTestCase : public ncbi::NK::TestCase, public TFixture { 
-public:
-    typedef TCaseTraits Traits;
-
-    // Represents the global test fixture. Cast to the correct data type in the test code
-    typedef void AUTO_TEST_CASE_FIXTURE;
-
-public: 
-    FixtureTestCase(void* globalFixture) 
-    : TestCase(TCaseTraits::name), _globalFixture (static_cast<AUTO_TEST_CASE_FIXTURE*>(globalFixture)) 
-    {
-    }
-
-protected: 
-    AUTO_TEST_CASE_FIXTURE* GET_GLOBAL_FIXTURE(void) const { return _globalFixture; } 
-    AUTO_TEST_CASE_FIXTURE* _globalFixture; 
-
-    const TFixture* GET_FIXTURE(void) const { return this; } 
-    TFixture* GET_FIXTURE(void) { return this; } 
-}; 
-
-// Create an invoker object for a test case with a given fixture.
-// The invoker object is static and registers itself with the global test suite during initialization.
-// When executed, the invoker will instantiate a fixture and a test case object and execute object's test method 
-// on the current thread.
-template <class TCase, class TFixture>
-class TestCaseInvoker : ncbi::NK::TestInvoker { 
-public: 
-    TestCaseInvoker() : TestInvoker(TCase::Traits::name) 
-    { 
-        ncbi::NK::GetTestSuite()->Add(this); 
-    } 
-private: 
-    virtual void Run(void* globalFixture) throw ()
-    { 
-        try
-        { 
-            TCase t(globalFixture); 
-            t.test_method(); 
-            SetErrorCounter(t.GetErrorCounter()); 
-        }
-        catch (const execution_aborted&)
-        {
-            SetErrorCounter(1);
-        } 
-        catch (const std::exception& ex)
-        {
-            if (!ncbi::NK::TestEnv::lastLocation.empty())
-            {
-                LOG(ncbi::NK::LogLevel::e_fatal_error, ncbi::NK::TestEnv::lastLocation << ": last checkpoint before exception \"" << ex.what() << "\"\n");
-            }        
-            SetErrorCounter(1);
-        } 
-        catch (...) // a non-framework exception escaped
-        { 
-            if (!ncbi::NK::TestEnv::lastLocation.empty())
-            {
-                LOG(ncbi::NK::LogLevel::e_fatal_error, ncbi::NK::TestEnv::lastLocation << ": last checkpoint before an unknown exception\n");
-            }        
-            SetErrorCounter(1);
-        } 
-    } 
-    static TestCaseInvoker instance;
-}; 
-
-// Create an out-of-thread invoker object for a test case with a given fixture.
-// The invoker object is static and registers itself with the global test suite during initialization.
-// When executed, the invoker will instantiate a fixture and a test case object and execute object's test method 
-// as a child process (Unix) or on a separate thread(Windows).
-template <class TCase, class TFixture, int rc, int timeout>
-class ProcessTestCaseInvoker : ncbi::NK::TestInvoker { 
-public: 
-    ProcessTestCaseInvoker() : TestInvoker(TCase::Traits::name) 
-    { 
-        ncbi::NK::GetTestSuite()->Add(this); 
-    } 
-private: 
-    virtual void Run(void* globalFixture) throw ()
-    { 
-        try
-        {
-            TCase t(globalFixture); 
-            TestCase :: TestMethod method = static_cast <TestCase :: TestMethod> ( & TCase::test_method );
-            if (ncbi::NK::TestEnv::RunProcessTestCase(t, method, timeout) != rc)
-            {
-                SetErrorCounter(1);
-            }
-            else
-            {
-                SetErrorCounter(t.GetErrorCounter());
-            }
-        }
-        catch (const execution_aborted&)
-        {
-            SetErrorCounter(1);
-        } 
-        catch (const std::exception& ex)
-        {
-            if (!ncbi::NK::TestEnv::lastLocation.empty())
-            {
-                LOG(ncbi::NK::LogLevel::e_fatal_error, ncbi::NK::TestEnv::lastLocation << ": last checkpoint before exception \"" << ex.what() << "\"\n");
-            }        
-            SetErrorCounter(1);
-        } 
-        catch (...) // a non-framework exception escaped
-        { 
-            if (!ncbi::NK::TestEnv::lastLocation.empty())
-            {
-                LOG(ncbi::NK::LogLevel::e_fatal_error, ncbi::NK::TestEnv::lastLocation << ": last checkpoint before an unknown exception\n");
-            }        
-            SetErrorCounter(1);
-        } 
-    }
-}; 
-
-}} // namespace
-
-// macros to be used to instantiate test cases
-
-// user code should not not use this directly. 
-#define DEFINE_TEST_CASE(testcase, F, rc, timeout) \
-    struct testcase { \
-        class dummy{}; \
-        typedef ncbi::NK::FixtureTestCase< ::ncbi::NK::TestCaseTraits<dummy>, F> Case;\
-        struct Instance : public Case { \
-            Instance(void* g) : Case(g) { ncbi::NK::saveLocation(__FILE__,__LINE__); }\
-            ~Instance() { ncbi::NK::saveLocation(__FILE__,__LINE__); }\
-            void test_method(); } ; \
-        class Invoker : public ::ncbi::NK::TestCaseInvoker<Instance, F> {}; \
-        class ProcessInvoker : public ::ncbi::NK::ProcessTestCaseInvoker<Instance, F, rc, timeout> {}; \
-    };\
-    namespace ncbi { namespace NK { template<> const char* TestCaseTraits< ::testcase::dummy > :: name = #testcase; } }
-
-// define an in-thread test case with a fixture
-#define FIXTURE_TEST_CASE(testcase, F) \
-    DEFINE_TEST_CASE(testcase, F, 0, 0) \
-    static testcase::Invoker testcase##Invoker;\
-    void testcase::Instance::test_method()
-
-// define an in-thread test case without a fixture
-#define TEST_CASE(test_name) FIXTURE_TEST_CASE(test_name, ncbi::NK::Empty)
-
-// define an out-of-thread test case with a fixture, expected exit code, and a timeout (in seconds)
-#define PROCESS_FIXTURE_TEST_CASE(testcase, F, rc, timeout) \
-    DEFINE_TEST_CASE(testcase, F, rc, timeout) \
-    static testcase::ProcessInvoker testcase##Invoker;\
-    void testcase::Instance::test_method()
-
-// define an out-of-thread test case with an expected exit code and a timeout (in seconds), no fixture
-#define PROCESS_TEST_CASE(test_name, rc, timeout) PROCESS_FIXTURE_TEST_CASE(test_name, ncbi::NK::Empty, rc, timeout)
-
-// fix param type
-#if ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED
-#define DECLARE_EXTERN_C_ENTRYPOINTS                             \
-    extern "C"                                                   \
-    {                                                            \
-        rc_t CC UsageSummary ( const char *progname )            \
-        { return ncbi::NK::TestEnv::UsageSummary ( progname ); } \
-                                                                 \
-        rc_t CC Usage ( const Args *args )                       \
-        { return ncbi::NK::TestEnv::Usage ( args ); }            \
-    }
-#else
-#define DECLARE_EXTERN_C_ENTRYPOINTS
-#endif
-
-// define a suite of test cases with a global fixture 
-// Note: Typed access to global fixture from the test cases' code is not currently implemented
-#define FIXTURE_TEST_SUITE( suite_name, F ) \
-DECLARE_EXTERN_C_ENTRYPOINTS \
-typedef F AUTO_TEST_CASE_FIXTURE; \
-int suite_name(int argc, char* argv[]) { \
-    try { \
-        ncbi::NK::TestEnv args(argc, argv); \
-        if (args.catch_system_errors) { \
-            args.set_handlers(); \
-        } \
-    } catch (...) { return 1; } \
-    ncbi::NK::counter_t ec = ncbi::NK::Main<AUTO_TEST_CASE_FIXTURE>(argc, argv, #suite_name); \
-    return ec == 0 ? 0 : -ec; /* positive rc represents the signal that killed the process */ \
-} 
-
-// define a suite of test cases with a global fixture
-// with callback to handle application command line arguments
-#define FIXTURE_TEST_SUITE_WITH_ARGS_HANDLER( suite_name, F, Handler ) \
-DECLARE_EXTERN_C_ENTRYPOINTS \
-typedef F AUTO_TEST_CASE_FIXTURE; \
-int suite_name(int argc, char* argv[]) { \
-    try { \
-        ncbi::NK::TestEnv args(argc, argv, Handler); \
-        if (args.catch_system_errors) { \
-            args.set_handlers(); \
-        } \
-    } catch (...) { return 1; } \
-    ncbi::NK::counter_t ec = ncbi::NK::Main<AUTO_TEST_CASE_FIXTURE>(argc, argv, #suite_name); \
-    return ec == 0 ? 0 : -ec; /* positive rc represents the signal that killed the process */ \
-}
-
-// define a suite of test cases with a global fixture; command line parsing, Usage and UsageSummary functions are supplied by the user's code
-#define FIXTURE_TEST_SUITE_WITH_USAGE( suite_name, F ) \
-typedef F AUTO_TEST_CASE_FIXTURE; \
-int suite_name(int argc, char* argv[]) { \
-    try { \
-        ncbi::NK::TestEnv args(argc, argv); \
-        if (args.catch_system_errors) { \
-            args.set_handlers(); \
-        } \
-    } catch (...) { return 1; } \
-    ncbi::NK::counter_t ec = ncbi::NK::Main<AUTO_TEST_CASE_FIXTURE>(argc, argv, #suite_name); \
-    return ec == 0 ? 0 : -ec; /* positive rc represents the signal that killed the process */ \
-} 
-
-#define TEST_SUITE( suite_name ) FIXTURE_TEST_SUITE(suite_name, ncbi::NK::Empty)
-#define TEST_SUITE_WITH_USAGE( suite_name ) FIXTURE_TEST_SUITE_WITH_USAGE(suite_name, ncbi::NK::Empty)
-#define TEST_SUITE_WITH_ARGS_HANDLER( suite_name, Handler ) FIXTURE_TEST_SUITE_WITH_ARGS_HANDLER(suite_name, ncbi::NK::Empty, Handler)
-
-#endif// _h_ktst_unit_test_
diff --git a/interfaces/ktst/unit_test_suite.hpp b/interfaces/ktst/unit_test_suite.hpp
deleted file mode 100644
index d534fc7..0000000
--- a/interfaces/ktst/unit_test_suite.hpp
+++ /dev/null
@@ -1,513 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef NCBI_NK_UNIT_TEST__SUITE_HPP
-#define NCBI_NK_UNIT_TEST__SUITE_HPP
-
-// turn on INT64_C, UINT64_C etc.
-#define __STDC_CONSTANT_MACROS
-#include <klib/defs.h>
-
-#include <string>
-#include <vector>
-#include <cassert>
-#include <iostream>
-#include <stdexcept>
-
-// it's generally a bad idea to make the test suite rely upon code under test
-#define ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED 0
-
-////////////////////////////////////////////////////////////////////////////////
-// these macros are available outside of test cases' code
-
-#define LOG(log_level, msg) \
-    (log_level >= ncbi::NK::TestEnv::verbosity ? (std::cerr << msg) : std::cerr)
-
-/*#define TESTMESSAGE(M) \
-{ ncbi::NK::saveLocation(__FILE__,__LINE__); \
-    LOG(ncbi::NK::LogLevel::e_message, M); }*/
-
-#define TEST_MESSAGE(M) \
-{ ncbi::NK::saveLocation(__FILE__,__LINE__); \
-    LOG(ncbi::NK::LogLevel::e_message, M << std::endl); }
-
-#define TEST_CHECKPOINT(M) TEST_MESSAGE(M)
-
-// report failure from a fixture
-#define FAIL( msg_ )     \
-      ncbi::NK::_REPORT_CRITICAL_ERROR_( (msg_), __FILE__, __LINE__, true )
-
-#define GET_TEST_SUITE ncbi::NK::GetTestSuite
-
-#define REQUIRE_THROW(code) \
-    do {   \
-        bool threw = false; \
-        try { code; } catch(...) { threw = true; } \
-        if (!threw) FAIL("expected exception not thrown"); \
-    } while (0)
-
-#define THROW_ON_RC(call) \
-    do { \
-        if ( ( rc_t ) ( call ) != ( rc_t ) 0 ) \
-            throw std::logic_error ( string ( __func__ ) + #call + " failed" ); \
-    } while (0)
-   
-////////////////////////////////////////////////////////////////////////////////
-
-#if ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED
-struct Args;
-#endif
-
-namespace ncbi { namespace NK { 
-
-typedef int counter_t; 
-
-class Empty {};
-
-class execution_aborted {};
-
-class LogLevel {
-public:
-    enum E {
-        e_undefined,
-        e_all,
-        e_test_suite,
-        e_message,
-        e_warning,
-        e_error,
-        e_fatal_error,
-        e_nothing
-    };
-};
-
-extern void saveLocation(const char* file, int line);
-extern void _REPORT_CRITICAL_ERROR_(const std::string& msg, const char* file, int line, bool is_msg);
-
-template<class T> const T abs(const T& a) { return a >= 0 ? a : -a; }
-
-class TestCase;
-
-class TestEnv {
-public:
-    typedef rc_t ArgsHandler(int argc, char* argv[]);
-
-    TestEnv(int argc, char* argv[], ArgsHandler *argsHandler = NULL);
-    ~TestEnv(void);
-
-    static void set_handlers(void);
-
-    static std::string lastLocation;
-    static LogLevel::E verbosity;
-    static bool verbositySet;
-    bool catch_system_errors;
-
-    static int RunProcessTestCase(TestCase&, void(TestCase::*)(), int);
-    
-    // Sleep functions return false if sleep was interrupted
-    static bool Sleep(unsigned int seconds);
-    static bool SleepMs(unsigned int milliseconds);
-    
-    static const int TEST_CASE_TIMED_OUT=14;
-    static const int TEST_CASE_FAILED=255;
-
-#if ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED
-    static struct Args* GetArgs() { return args; }
-#endif
-
-    static rc_t UsageSummary(const char* progname);
-#if ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED
-    static rc_t Usage(const Args* args);
-#else
-    static rc_t Usage(const char *progname);
-#endif
-
-    static bool in_child_process;
-    static std::string GetPidString();
-    
-    static std::string FormatLocation(const std::string& p_file, uint64_t p_line);
-
-    static void SetVerbosity(LogLevel::E v)
-    {   verbosity = v; verbositySet = true; }
-
-private:
-    static void TermHandler();
-
-    static void SigHandler(int sig);
-
-    rc_t process_args(int argc, char* argv[], ArgsHandler* argsHandler);
-
-    int argc2;
-    char** argv2;
-
-#if ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED
-    static struct Args* args;
-#endif
-};
-
-class TestCase {
-    void Init(const char* name);
-
-public:
-    typedef void ( TestCase ::* TestMethod ) ();
-
-protected:
-    TestCase(const std::string &name) { Init(name.c_str()); }
-    TestCase(const char* name)        { Init(name); }
-
-public:    
-    // explicit destruction, to be used before calling exit() in out-of-process test runner
-    virtual void clear() {}
-
-public:
-    ncbi::NK::counter_t GetErrorCounter(void) { return _ec; }
-    const char* GetName(void) const { return _name; }
-    void ErrorCounterAdd(ncbi::NK::counter_t ec) { _ec += ec; }
-
-protected:
-    void report_error(const char* msg, const char* file, int line, bool is_msg = false, bool isCritical = false);
-
-    void report_passed(const char* msg, const char* file, int line);
-
-    template<class T1>
-    void report_error2(const char* e1, const char* e2, T1 t1, T1 t2,
-        const char* file, int line, const char* eq, const char* ne,
-        bool isCritical = false)
-    {
-        ncbi::NK::saveLocation(file, line);
-        ++_ec;
-        LOG(LogLevel::e_error, TestEnv::FormatLocation(file, line));
-        if (isCritical) {
-            LOG(LogLevel::e_error, "fatal ");
-        }
-        LOG(LogLevel::e_error, "error in \"" << _name << "\": ");
-        if (isCritical) {
-            LOG(LogLevel::e_error, "critical ");
-        }
-        LOG(LogLevel::e_error, "check " << e1 << " " << eq << " " << e2
-            << " failed [" << t1 << " " << ne << " " << t2 << "]");
-        LOG(LogLevel::e_error, std::endl);
-        if (isCritical)
-        { throw ncbi::NK::execution_aborted(); }
-    }
-    // pointers reported as ints (otherwise << may crash if given an invalid pointer)
-    template<class T1>
-    void report_error2(const char* e1, const char* e2, const T1* t1, const T1* t2,
-        const char* file, int line, const char* eq, const char* ne,
-        bool isCritical = false)
-    {
-        report_error2(e1, e2, (uint64_t)t1, (uint64_t)t2,file, line, eq, ne,isCritical);
-    }
-    template<class T1>
-    void report_error2(const char* e1, const char* e2, T1* t1, T1* t2,
-        const char* file, int line, const char* eq, const char* ne,
-        bool isCritical = false)
-    {
-        report_error2(e1, e2, (uint64_t)t1, (uint64_t)t2,file, line, eq, ne,isCritical);
-    }
-
-
-    template<class T1, class T2>
-    void report_passed2(const char* e1, const char* e2,
-        const T1& t1, const T2& t2,
-        const char* file, int line, const char* eq, const char* ne)
-    {
-        ncbi::NK::saveLocation(file, line);
-        LOG(LogLevel::e_all, file << "(" << line << "): info: "
-            "check " << e1 << " " << eq << " " << e2 << " passed" << std::endl);
-    }
-
-    template<class T1, class T2, class T3>
-    void report_passed_close(const char* e1, const char* e2,
-        const T1& t1, const T2& t2, const T3& tolerance,
-        const char* file, int line)
-    {
-        ncbi::NK::saveLocation(file, line);
-        LOG(LogLevel::e_all, file << "(" << line << "): "
-            "info: difference between "
-            << e1 << "{" << t1 << "} and " << e2 << "{" << t2 << "} "
-            "doesn't exceed " << tolerance << std::endl);
-    }
-
-    template<class T1, class T2, class T3, class T4>
-    void report_error_close(const char* e1, const char* e2,
-        const T1& t1, const T2& t2, const T3& tolerance, const T4& diff,
-        const char* file, int line, bool isCritical = false)
-    {
-        ncbi::NK::saveLocation(file, line);
-        ++_ec;
-        LOG(LogLevel::e_error, file << "(" << line << "): ");
-        if (isCritical) {
-            LOG(LogLevel::e_error, "fatal ");
-        }
-        LOG(LogLevel::e_error, "error in \"" << _name << "\": "
-            "difference{" << diff << "} between "
-            << e1 << "{" << t1 << "} and " << e2 << "{" << t2 << "} "
-            "exceeds " << tolerance << std::endl);
-        if (isCritical)
-        { throw ncbi::NK::execution_aborted(); }
-    }
-
-    void _REPORT_CRITICAL_ERROR_(const std::string& msg, const char* file, int line, bool is_msg = false);
-
-#define CHECK(exp)       \
-  ( (exp)                      \
-      ? report_passed((#exp), __FILE__, __LINE__) \
-      : report_error ((#exp), __FILE__, __LINE__) )
-
-#define REPORT_ERROR(exp)       \
-        report_error (exp, __FILE__, __LINE__)
-
-/* TODO #define CHECK_MESSAGE(exp, M)       \
-  std::ostringstream s, s << M, \
-  ( (exp)                      \
-      ? report_passed(s.str(),__FILE__,__LINE__) \
-      : report_error (s.str(),__FILE__,__LINE__) )*/
-
-#define REQUIRE(exp)     \
-  ( (exp)                      \
-      ? report_passed        ((#exp), __FILE__, __LINE__) \
-      : _REPORT_CRITICAL_ERROR_((#exp), __FILE__, __LINE__) )
-
-#define CHECK_CLOSE(left, right, tolerance) \
-( (ncbi::NK::abs((left) - (right)) < (tolerance)) \
-?report_passed_close(#left,#right,(left),(right),(tolerance),__FILE__,__LINE__)\
-: report_error_close(#left,#right,(left),(right),(tolerance), \
-    ncbi::NK::abs((left) - (right)), __FILE__, __LINE__) )
-
-#define REQUIRE_CLOSE(left, right, tolerance) \
-( (ncbi::NK::abs((left) - (right)) < (tolerance)) \
-?report_passed_close(#left,#right,(left),(right),(tolerance),__FILE__,__LINE__)\
-: report_error_close(#left,#right,(left),(right),(tolerance), \
-    ncbi::NK::abs((left) - (right)), __FILE__, __LINE__, true) )
-
-    template<class T>
-    void AssertEqual(const T& e1, const T& e2, const char* e1str, const char* e2str, const char* file, unsigned int line, bool critical=false)
-    {
-        if (e1 == e2)
-        {
-            report_passed2(e1str, e2str, e1, e2, file, line, "==", "!=");
-        }
-        else
-        {
-            report_error2 (e1str, e2str, e1, e2, file, line, "==", "!=", critical);
-        }
-    }
-#define CHECK_EQUAL(e1, e2)     AssertEqual((e1),(e2),#e1,#e2,__FILE__,__LINE__, false)
-#define CHECK_EQ(e1, e2)        CHECK_EQUAL(e1,e2)
-#define REQUIRE_EQUAL(e1, e2)   AssertEqual((e1),(e2),#e1,#e2,__FILE__,__LINE__, true)
-#define REQUIRE_EQ(e1, e2)      REQUIRE_EQUAL(e1,e2)
-
-    template<class T>
-    void AssertNotEqual(const T& e1, const T& e2, const char* e1str, const char* e2str, const char* file, unsigned int line, bool critical=false)
-    {
-        if (e1 != e2)
-        {
-            report_passed2(e1str, e2str, e1, e2, file, line, "!=", "==");
-        }
-        else
-        {
-            report_error2 (e1str, e2str, e1, e2, file, line, "!=", "==", critical);
-        }
-    }
-#define CHECK_NE(e1, e2)     AssertNotEqual((e1),(e2),#e1,#e2,__FILE__,__LINE__, false)
-#define REQUIRE_NE(e1, e2)   AssertNotEqual((e1),(e2),#e1,#e2,__FILE__,__LINE__, true)
-
-    template<class T>
-    void AssertGreaterOrEqual(const T& e1, const T& e2, const char* e1str, const char* e2str, const char* file, unsigned int line, bool critical=false)
-    {
-        if (e1 >= e2)
-        {
-            report_passed2(e1str, e2str, e1, e2, file, line, ">=", "<");
-        }
-        else
-        {
-            report_error2 (e1str, e2str, e1, e2, file, line, ">=", "<", critical);
-        }
-    }
-#define CHECK_GE(e1, e2)    AssertGreaterOrEqual((e1),(e2),#e1,#e2,__FILE__,__LINE__, false)
-#define REQUIRE_GE(e1, e2)  AssertGreaterOrEqual((e1),(e2),#e1,#e2,__FILE__,__LINE__, true)
-
-    template<class T>
-    void AssertGreater(const T& e1, const T& e2, const char* e1str, const char* e2str, const char* file, unsigned int line, bool critical=false)
-    {
-        if (e1 > e2)
-        {
-            report_passed2(e1str, e2str, e1, e2, file, line, ">", "<=");
-        }
-        else
-        {
-            report_error2 (e1str, e2str, e1, e2, file, line, ">", "<=", critical);
-        }
-    }
-#define CHECK_GT(e1, e2)    AssertGreater((e1),(e2),#e1,#e2,__FILE__,__LINE__, false)
-#define REQUIRE_GT(e1, e2)  AssertGreater((e1),(e2),#e1,#e2,__FILE__,__LINE__, true)
-
-    template<class T>
-    void AssertLessOrEqual(const T& e1, const T& e2, const char* e1str, const char* e2str, const char* file, unsigned int line, bool critical=false)
-    {
-        if (e1 <= e2)
-        {
-            report_passed2(e1str, e2str, e1, e2, file, line, "<=", ">");
-        }
-        else
-        {
-            report_error2 (e1str, e2str, e1, e2, file, line, "<=", ">", critical);
-        }
-    }
-#define CHECK_LE(e1, e2)    AssertLessOrEqual((e1),(e2),#e1,#e2,__FILE__,__LINE__, false)
-#define REQUIRE_LE(e1, e2)  AssertLessOrEqual((e1),(e2),#e1,#e2,__FILE__,__LINE__, true)
-
-    template<class T>
-    void AssertLess(const T& e1, const T& e2, const char* e1str, const char* e2str, const char* file, unsigned int line, bool critical=false)
-    {
-        if (e1 < e2)
-        {
-            report_passed2(e1str, e2str, e1, e2, file, line, "<", ">=");
-        }
-        else
-        {
-            report_error2 (e1str, e2str, e1, e2, file, line, "<", ">=", critical);
-        }
-    }
-#define CHECK_LT(e1, e2)    AssertLess((e1),(e2),#e1,#e2,__FILE__,__LINE__, false)
-#define REQUIRE_LT(e1, e2)  AssertLess((e1),(e2),#e1,#e2,__FILE__,__LINE__, true)
-
-    void report_rc(rc_t rc, const char* callStr, const char* file, int line, int successExpected, bool isCritical = false);
-
-#define CHECK_RC(exp)   report_rc((exp), #exp, __FILE__, __LINE__, true, false)
-#define REQUIRE_RC(exp) report_rc((exp), #exp, __FILE__, __LINE__, true, true)
-#define CHECK_RC_FAIL(exp)   report_rc((exp), #exp, __FILE__, __LINE__, false, false)
-#define REQUIRE_RC_FAIL(exp) report_rc((exp), #exp, __FILE__, __LINE__, false, true)
-
-    template<class T>
-    void AssertNull(const T* e1, const char* e1str,const char* file, unsigned int line, bool critical=false)
-    {
-        if (e1 == 0)
-        {
-            report_passed2(e1str, "NULL", e1, (const T*)0, file, line, "==", "!=");
-        }
-        else
-        {
-            report_error2 (e1str, "NULL", e1, (const T*)0, file, line, "==", "!=", critical);
-        }
-    }
-#define CHECK_NULL(e1)   AssertNull((e1), #e1, __FILE__,__LINE__, false)
-#define REQUIRE_NULL(e1) AssertNull((e1), #e1, __FILE__,__LINE__, true)
-
-    template<class T>
-    void AssertNotNull(const T* e1, const char* e1str,const char* file, unsigned int line, bool critical=false)
-    {
-        if (e1 != 0)
-        {
-            report_passed2(e1str, "NULL", e1, (const T*)0, file, line, "!=", "==");
-        }
-        else
-        {
-            report_error2 (e1str, "NULL", e1, (const T*)0, file, line, "!=", "==", critical);
-        }
-    }
-#define CHECK_NOT_NULL(e1)   AssertNotNull((e1), #e1, __FILE__,__LINE__, false)
-#define REQUIRE_NOT_NULL(e1) AssertNotNull((e1), #e1, __FILE__,__LINE__, true)
-
-private:
-    const char* _name;
-    ncbi::NK::counter_t _ec;
-};
-
-class TestInvoker {
-protected:
-    TestInvoker(const std::string& name) : _name(name), _ec(0) {}
-    virtual ~TestInvoker(void) {}
-public:
-    virtual void Run(void* globalFixtute) throw () = 0;
-    const std::string& GetName(void) const { return _name; }
-    ncbi::NK::counter_t GetErrorCounter(void) { return _ec; }
-protected:
-    void SetErrorCounter(ncbi::NK::counter_t ec) { _ec = ec; }
-private:
-    const std::string _name;
-    ncbi::NK::counter_t _ec;
-};
-
-class TestRunner {
-    typedef std::vector<ncbi::NK::TestInvoker*> T;
-    typedef T::const_iterator TCI;
-
-public:
-    TestRunner();
-
-    int    argc;
-    char** argv;
-
-    void ReportTestNumber(void);
-    void SetArgs(int argc, char* argv[]);
-    void Add(ncbi::NK::TestInvoker* t);
-    counter_t Run(void* globalFixtute) const throw ();
-
-private:
-    T _cases;
-};
-
-extern ncbi::NK::TestRunner* GetTestSuite();
-
-template<class TFixture>
-ncbi::NK::counter_t Main(int argc, char* argv[],
-                         const char* suite_name)
-{
-    ncbi::NK::counter_t ec = 0;
-    ncbi::NK::TestRunner* t = ncbi::NK::GetTestSuite();
-    assert(t);
-    t->SetArgs(argc, argv);
-    t->ReportTestNumber();
-
-    TFixture globalFixtute;
-    LOG(ncbi::NK::LogLevel::e_test_suite,
-        "Entering test suite \"" << suite_name << "\"\n");
-    ec = t->Run(&globalFixtute);
-    LOG(ncbi::NK::LogLevel::e_test_suite,
-        "Leaving test suite \"" << suite_name << "\"\n");
-
-    switch (ec) 
-    {
-        case 0:
-          LOG(ncbi::NK::LogLevel::e_nothing, "\n*** No errors detected\n");
-          break;
-        case 1:
-          LOG(ncbi::NK::LogLevel::e_nothing, "\n*** " << ec <<
-           " failure detected in test suite \"" << suite_name << "\"\n");
-          break;
-        default:
-          LOG(ncbi::NK::LogLevel::e_nothing, "\n*** " << ec <<
-           " failures detected in test suite \"" << suite_name << "\"\n");
-          break;
-    }
-    return ec;
-}
-
-} } // namespace ncbi::NK
-
-
-#endif// NCBI_NK_UNIT_TEST__SUITE_HPP
diff --git a/interfaces/kxml/xml.h b/interfaces/kxml/xml.h
deleted file mode 100644
index 2f42564..0000000
--- a/interfaces/kxml/xml.h
+++ /dev/null
@@ -1,382 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kxml_xml_
-#define _h_kxml_xml_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#include <klib/defs.h>
-
-#include <stdarg.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-struct KNamelist;
-struct KXMLNodeset;
-
-
-/*--------------------------------------------------------------------------
- * XML node
- */
-typedef struct KXMLNode KXMLNode;
-
-/* AddRef
- * Release
- */
-KLIB_EXTERN rc_t CC KXMLNodeAddRef ( const KXMLNode *self );
-KLIB_EXTERN rc_t CC KXMLNodeRelease ( const KXMLNode *self );
-
-/* GetName
- * Get node path from parent nodeset
- */
-KLIB_EXTERN rc_t CC KXMLNodeGetName ( const KXMLNode *self, const char **name );
-
-/* Get element name (tag)
- */
-KLIB_EXTERN rc_t CC KXMLNodeElementName ( const KXMLNode *self, const char **name );
-
-/* Read
- */
-KLIB_EXTERN rc_t CC KXMLNodeRead ( const KXMLNode *self,
-    size_t offset, void *buffer, size_t size,
-    size_t *num_read, size_t *remaining );
-
-/* Write
- */
-KLIB_EXTERN rc_t CC KXMLNodeWrite ( KXMLNode *self,
-    size_t offset, const void *buffer, size_t size );
-
-/* Append
- */
-KLIB_EXTERN rc_t CC KXMLNodeAppend ( KXMLNode *self,
-    const void *buffer, size_t bsize );
-
-
-/* ReadAs ( formatted )
- *  reads as integer or float value in native byte order
- *  casts smaller-sized values to desired size, e.g.
- *    uint32_t to uint64_t
- *
- *  "i" [ OUT ] - return parameter for signed integer
- *  "u" [ OUT ] - return parameter for unsigned integer
- *  "f" [ OUT ] - return parameter for double float
- */
-KLIB_EXTERN rc_t CC KXMLNodeReadAsI16 ( const KXMLNode *self, int16_t *i );
-KLIB_EXTERN rc_t CC KXMLNodeReadAsU16 ( const KXMLNode *self, uint16_t *u );
-KLIB_EXTERN rc_t CC KXMLNodeReadAsI32 ( const KXMLNode *self, int32_t *i );
-KLIB_EXTERN rc_t CC KXMLNodeReadAsU32 ( const KXMLNode *self, uint32_t *u );
-KLIB_EXTERN rc_t CC KXMLNodeReadAsI64 ( const KXMLNode *self, int64_t *i );
-KLIB_EXTERN rc_t CC KXMLNodeReadAsU64 ( const KXMLNode *self, uint64_t *u );
-KLIB_EXTERN rc_t CC KXMLNodeReadAsF64 ( const KXMLNode *self, double *f );
-
-
-/* ReadCString ( formatted )
- *  reads as C-string
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - output buffer for
- *  NUL terminated string.
- *
- *  "size" [ OUT ] - return parameter giving size of string
- *  not including NUL byte. the size is set both upon success
- *  and insufficient buffer space error.
- */
-KLIB_EXTERN rc_t CC KXMLNodeReadCString ( const KXMLNode *self,
-    char *buffer, size_t bsize, size_t *size );
-
-/* ReadCStr
- *  reads node value as C-string
- *
- *  "str" [ IN ] - returned pointer to a NULL terminated string.
- *                 Caller responsible to dealloc (free)!
- *  "default_value" [IN] - default value used in case node value is empty, NULL - none
- */
-KLIB_EXTERN rc_t CC KXMLNodeReadCStr( const KXMLNode *self, char** str, const char* default_value );
-
-/* Write ( formatted )
- *  writes string
- *
- *  "str" [ IN ] - NULL terminated string.
- */
-KLIB_EXTERN rc_t CC KXMLNodeWriteCString ( KXMLNode *self, const char *str );
-
-
-/* OpenNodesetRead
- *
- * NB. OpenNodesetRead could return Nodeset with 0 elements.
- *  To make sure the node exists you should verify that (KXMLNodesetCount > 0)
- */
-KLIB_EXTERN rc_t CC KXMLNodeOpenNodesetRead ( const KXMLNode *self,
-    struct KXMLNodeset const **ns, const char *path, ... );
-KLIB_EXTERN rc_t CC KXMLNodeVOpenNodesetRead ( const KXMLNode *self,
-    struct KXMLNodeset const **ns, const char *path, va_list args );
-
-/* OpenNodesetUpdate
- */
-KLIB_EXTERN rc_t CC KXMLNodeOpenNodesetUpdate ( KXMLNode *self,
-    struct KXMLNodeset **ns, const char *path, ... );
-KLIB_EXTERN rc_t CC KXMLNodeVOpenNodesetUpdate ( KXMLNode *self,
-    struct KXMLNodeset **ns, const char *path, va_list args );
-
-/* ReadAttr
- */
-KLIB_EXTERN rc_t CC KXMLNodeReadAttr ( const KXMLNode *self,
-     const char *attr, void *buffer, size_t bsize,
-     size_t *num_read, size_t *remaining );
-
-/* WriteAttr
- */
-KLIB_EXTERN rc_t CC KXMLNodeWriteAttr ( KXMLNode *self,
-     const char *attr, const void *buffer, size_t size );
-
-
-/* ReadAttrAs ( formatted )
- *  reads as integer or float value in native byte order
- *  casts smaller-sized values to desired size, e.g.
- *    uint32_t to uint64_t
- *
- *  "i" [ OUT ] - return parameter for signed integer
- *  "u" [ OUT ] - return parameter for unsigned integer
- *  "f" [ OUT ] - return parameter for double float
- */
-KLIB_EXTERN rc_t CC KXMLNodeReadAttrAsI16 ( const KXMLNode *self, const char *attr, int16_t *i );
-KLIB_EXTERN rc_t CC KXMLNodeReadAttrAsU16 ( const KXMLNode *self, const char *attr, uint16_t *u );
-KLIB_EXTERN rc_t CC KXMLNodeReadAttrAsI32 ( const KXMLNode *self, const char *attr, int32_t *i );
-KLIB_EXTERN rc_t CC KXMLNodeReadAttrAsU32 ( const KXMLNode *self, const char *attr, uint32_t *u );
-KLIB_EXTERN rc_t CC KXMLNodeReadAttrAsI64 ( const KXMLNode *self, const char *attr, int64_t *i );
-KLIB_EXTERN rc_t CC KXMLNodeReadAttrAsU64 ( const KXMLNode *self, const char *attr, uint64_t *u );
-KLIB_EXTERN rc_t CC KXMLNodeReadAttrAsF64 ( const KXMLNode *self, const char *attr, double *f );
-
-
-/* ReadAttrCString ( formatted )
- *  reads as C-string
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - output buffer for
- *  NUL terminated string.
- *
- *  "size" [ OUT ] - return parameter giving size of string
- *  not including NUL byte. the size is set both upon success
- *  and insufficient buffer space error.
- */
-KLIB_EXTERN rc_t CC KXMLNodeReadAttrCString ( const KXMLNode *self, const char *attr,
-    char *buffer, size_t bsize, size_t *size );
-
-/* ReadAttrCStr
- *  reads attribute as C-string
- *
- *  "str" [ IN ] - returned pointer to a NULL terminated string.
- *                 Caller responsible to dealloc (free)!
- *  "default_value" [IN] - default value used in case node value is empty, NULL - none
- */
-KLIB_EXTERN rc_t CC KXMLNodeReadAttrCStr( const KXMLNode *self, const char *attr, char** str, const char* default_value);
-
-/* CountChildNodes
- *  count child nodes
- */
-KLIB_EXTERN rc_t CC KXMLNodeCountChildNodes(const KXMLNode *self,
-    uint32_t *count);
-
-/* GetNodeRead
- *  access indexed node
- *  "idx" [ IN ] - a zero-based index
- */
-KLIB_EXTERN rc_t CC KXMLNodeGetNodeRead ( const KXMLNode *self,
-    const KXMLNode **node, uint32_t idx );
-
-/* ListAttr
- *  list all named attributes
- */
-KLIB_EXTERN rc_t CC KXMLNodeListAttr ( const KXMLNode *self,
-    struct KNamelist const **names );
-
-/* ListChild
- *  list all named children
- */
-KLIB_EXTERN rc_t CC KXMLNodeListChild ( const KXMLNode *self,
-    struct KNamelist const **names );
-
-
-/* GetFirstChildNodeRead
- *  Returns the first(with index 0) sub-node of self using path.
- *  Is equivalent to:
- *          KXMLNodeOpenNodesetRead(self, &nc, path, ...);
- *          KXMLNodesetGetNodeRead(ns, node, 0);
- *  It will return NotFound error if any node exists
- */
-KLIB_EXTERN rc_t CC KXMLNodeGetFirstChildNodeRead ( const KXMLNode *self,
-    const KXMLNode **node, const char *path, ... );
-KLIB_EXTERN rc_t CC KXMLNodeVGetFirstChildNodeRead ( const KXMLNode *self,
-    const KXMLNode **node, const char *path, va_list args );
-
-
-/*--------------------------------------------------------------------------
- * XML node set
- */
-typedef struct KXMLNodeset KXMLNodeset;
-
-/* AddRef
- * Release
- */
-KLIB_EXTERN rc_t CC KXMLNodesetAddRef ( const KXMLNodeset *self );
-KLIB_EXTERN rc_t CC KXMLNodesetRelease ( const KXMLNodeset *self );
-
-/* Count
- *  retrieve the number of nodes in set
- */
-KLIB_EXTERN rc_t CC KXMLNodesetCount ( const KXMLNodeset *self, uint32_t *count );
-
-/* GetNode
- *  access indexed node
- *  "idx" [ IN ] - a zero-based index
- */
-KLIB_EXTERN rc_t CC KXMLNodesetGetNodeRead ( const KXMLNodeset *self,
-    const KXMLNode **node, uint32_t idx );
-
-
-/*--------------------------------------------------------------------------
- * XML document
- */
-typedef struct KXMLDoc KXMLDoc;
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KLIB_EXTERN rc_t CC KXMLDocAddRef ( const KXMLDoc *self );
-KLIB_EXTERN rc_t CC KXMLDocRelease ( const KXMLDoc *self );
-
-/* OpenNodesetRead
- *  opens a node set with given path
- */
-KLIB_EXTERN rc_t CC KXMLDocOpenNodesetRead ( const KXMLDoc *self,
-    const KXMLNodeset **ns, const char *path, ... );
-KLIB_EXTERN rc_t CC KXMLDocVOpenNodesetRead ( const KXMLDoc *self,
-    const KXMLNodeset **ns, const char *path, va_list args );
-
-/* OpenNodesetUpdate
- *  opens a node set with given path
- */
-KLIB_EXTERN rc_t CC KXMLDocOpenNodesetUpdate ( KXMLDoc *self,
-    KXMLNodeset **ns, const char *path, ... );
-KLIB_EXTERN rc_t CC KXMLDocVOpenNodesetUpdate ( KXMLDoc *self,
-    KXMLNodeset **ns, const char *path, va_list args );
-
-
-/*--------------------------------------------------------------------------
- * XML manager
- */
-typedef struct KXMLMgr KXMLMgr;
-
-/* Make
- *  make an XML manager object
- */
-KLIB_EXTERN rc_t CC KXMLMgrMakeRead ( const KXMLMgr **mgr );
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-KLIB_EXTERN rc_t CC KXMLMgrAddRef ( const KXMLMgr *self );
-KLIB_EXTERN rc_t CC KXMLMgrRelease ( const KXMLMgr *self );
-
-/* MakeDoc
- *  create a document object from source file
- */
-KLIB_EXTERN rc_t CC KXMLMgrMakeDocRead ( const KXMLMgr *self,
-    const KXMLDoc **doc, struct KFile const *src );
-
-/* MakeDoc
- *  create a document object from memory
- */
-KLIB_EXTERN rc_t KXMLMgrMakeDocReadFromMemory ( const KXMLMgr *self,
-    const KXMLDoc **result, const char* buffer, uint64_t size );
-
-/*--------------------------------------------------------------------------
- * KDirectory
- *  this will probably be relocated later on
- */
-struct KDirectory;
-struct KFile;
-struct String;
-struct VFSManager;
-struct VPath;
-
-/* OpenXTocDirRead
- *  open copycat XML as a chroot'd directory
- *  XML data comes from a KFile in this case
- *
- *  "dir" [ OUT ] - return parameter for directory object
- *
- *  "base_path" [ IN ] - NUL terminated string giving the path
- *   of the new directory relative to "self". NB - can be absolute
- *   or relative, but is always interpreted by "self".
- *
- *  "xml" [ IN ] - file containing XML data produced by copycat tool
- */
-rc_t CC KDirectoryOpenXTocDirRead (const struct KDirectory * self,
-                                   const struct KDirectory ** pnew_dir,
-                                   bool chroot,
-                                   const struct KFile * xml,
-                                   const char * path, ... );
-rc_t CC KDirectoryVOpenXTocDirRead (const struct KDirectory * self,
-                                    const struct KDirectory ** pnew_dir,
-                                    bool chroot,
-                                    const struct KFile * xml,
-                                    const char * _path,
-                                    va_list args );
-rc_t CC KDirectoryOpenXTocDirRead (const struct KDirectory * self,
-                                   const struct KDirectory ** pnew_dir,
-                                   bool chroot,
-                                   const struct KFile * xml,
-                                   const char * path, ... );
-rc_t CC KDirectoryOpenXTocDirReadDir (const struct KDirectory * self,
-                                      const struct KDirectory ** pnew_dir,
-                                      const struct KFile * xml,
-                                      const struct String * spath);
-
-rc_t CC VFSManagerOpenXTocDirRead (const struct VFSManager * self,
-                                   const struct KDirectory ** pnew_dir,
-                                   const struct KFile * xml,
-                                   const struct VPath * path);
-
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kxml_xml_ */
diff --git a/interfaces/kxml/xml.hpp b/interfaces/kxml/xml.hpp
deleted file mode 100644
index 9d7ce11..0000000
--- a/interfaces/kxml/xml.hpp
+++ /dev/null
@@ -1,198 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_klib_xml_
-#define _hpp_klib_xml_
-
-#ifndef _h_klib_xml_
-#include <kxml/xml.h>
-#endif
-
-/*--------------------------------------------------------------------------
- * XML node
- */
-struct KXMLNode
-{
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef ( void ) const
-    { return KXMLNodeAddRef ( this ); }
-    inline rc_t Release ( void ) const
-    { return KXMLNodeRelease ( this ); }
-
-    /* GetName
-     */
-    inline rc_t GetName ( const char **name ) const
-    { return KXMLNodeGetName ( this, name ); }
-
-    /* OpenNodesetRead
-     */
-    inline rc_t OpenNodesetRead ( struct KXMLNodeset const **ns,
-        const char *path, ... ) const
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t status = KXMLNodeVOpenNodesetRead ( this, ns, path, args );
-        va_end ( args );
-        return status;
-    }
-
-    /* ReadAttr
-     */
-    inline rc_t ReadAttr ( const char *attr, void *buffer, size_t bsize,
-         size_t *num_read, size_t *remaining ) const
-    {
-        return KXMLNodeReadAttr
-            ( this, attr, buffer, bsize, num_read, remaining );
-    }
-
-    /* CountNodes
-     *  count child nodes
-     */
-    inline rc_t CountChildNodes ( uint32_t *count ) const
-    { return KXMLNodeCountChildNodes ( this, count ); }
-
-    /* GetNodeRead
-     *  access indexed node
-     *  "idx" [ IN ] - a zero-based index
-     */
-    inline rc_t GetNodeRead ( const KXMLNode **node,
-        uint32_t idx ) const 
-    { return KXMLNodeGetNodeRead ( this, node, idx ); }
-
-    /* ListChild
-     *  list all named children
-     */
-    inline rc_t ListChild ( struct KNamelist const **names ) const
-    { return KXMLNodeListChild ( this, names ); }
-
-    inline rc_t GetFirstChildNodeRead ( const KXMLNode **node,
-        const char *path, ... ) const
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = KXMLNodeVGetFirstChildNodeRead ( this, node, path, args );
-        va_end ( args );
-        return rc;
-    }
-
-    inline rc_t Read ( int32_t *i ) const
-    { return KXMLNodeReadAsI32 ( this, i ); }
-
-    inline rc_t Read ( char *buffer, size_t bsize, size_t *size ) const
-    { return KXMLNodeReadCString ( this, buffer, bsize, size ); }
-
-    inline rc_t ReadAttr ( const char *attr, int32_t *i ) const 
-    { return KXMLNodeReadAttrAsI32 ( this, attr, i ); }
-
-    inline rc_t ReadAttr ( const char *attr,
-        char *buffer, size_t bsize, size_t *size ) const
-    { return KXMLNodeReadAttrCString ( this, attr, buffer, bsize, size ); }
-};
-
-/*--------------------------------------------------------------------------
- * XML node set
- */
-struct KXMLNodeset
-{
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef ( void ) const
-    { return KXMLNodesetAddRef ( this ); }
-    inline rc_t Release ( void ) const
-    { return KXMLNodesetRelease ( this ); }
-
-    /* Count
-     *  retrieve the number of nodes in set
-     */
-    inline rc_t Count ( uint32_t *count ) const
-    { return KXMLNodesetCount ( this, count ); }
-
-    /* GetNode
-     *  access indexed node
-     */
-    inline rc_t GetNodeRead ( const KXMLNode **node, uint32_t idx ) const
-    { return KXMLNodesetGetNodeRead ( this, node, idx ); }
-};
-
-/*--------------------------------------------------------------------------
- * XML document
- */
-struct KXMLDoc
-{
-    /* AddRef
-     * Release
-     *  ignores NULL references
-     */
-    inline rc_t AddRef ( void ) const
-    { return KXMLDocAddRef ( this ); }
-    inline rc_t Release ( void ) const
-    { return KXMLDocRelease ( this ); }
-
-    /* OpenNodesetRead
-     *  opens a node set with given path
-     */
-    inline rc_t OpenNodesetRead ( const KXMLNodeset **ns, const char *path, ... ) const
-    {
-        va_list args;
-        va_start ( args, path );
-        int status = KXMLDocVOpenNodesetRead ( this, ns, path, args );
-        va_end ( args );
-        return status;
-    }
-};
-
-/*--------------------------------------------------------------------------
- * XML manager
- */
-struct KXMLMgr
-{
-    /* Make
-     *  make an XML manager object
-     */
-    static inline rc_t MakeRead ( const KXMLMgr **mgr )
-    { return KXMLMgrMakeRead ( mgr ); }
-
-    /* AddRef
-     * Release
-     *  ignores NULL references
-     */
-    inline rc_t AddRef ( void ) const
-    { return KXMLMgrAddRef ( this ); }
-    inline rc_t Release ( void ) const
-    { return KXMLMgrRelease ( this ); }
-
-    /* MakeDoc
-     *  create a document object from source file
-     */
-    inline rc_t MakeDocRead ( const KXMLDoc **doc, struct KFile const *src ) const
-    { return KXMLMgrMakeDocRead ( this, doc, src ); }
-
-};
-
-#endif /* _hpp_klib_xml_ */
diff --git a/interfaces/loader/alignment-writer.h b/interfaces/loader/alignment-writer.h
deleted file mode 100644
index 5495c91..0000000
--- a/interfaces/loader/alignment-writer.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef BAM_LOAD_ALIGNMENT_WRITER_H_
-#define BAM_LOAD_ALIGNMENT_WRITER_H_ 1
-
-#include <klib/text.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-
-#include <insdc/insdc.h>
-
-#include <align/writer-alignment.h>
-
-typedef struct AlignmentWriter AlignmentWriter;
-typedef struct AlignmentRecord AlignmentRecord;
-
-struct AlignmentRecord {
-    KDataBuffer buffer;
-    TableWriterAlgnData data;
-    int64_t alignId;
-    bool isPrimary;
-
-    INSDC_coord_one read_id;
-    int64_t ref_id;
-    INSDC_coord_zero ref_start;
-    uint64_t global_ref_start;
-    bool ref_orientation;
-    uint32_t mapq;
-    uint64_t tmp_key_id;
-
-    INSDC_coord_zero read_start;
-    INSDC_coord_len read_len;
-
-    bool mate_ref_orientation;
-    int64_t mate_ref_id;
-    INSDC_coord_zero mate_ref_pos;
-    int64_t mate_align_id;
-    int32_t template_len;
-};
-
-#define AR_REF_ID(X) ((X).ref_id)
-#define AR_REF_START(X) ((X).global_ref_start)
-#define AR_REF_LEN(X) ((X).ref_len)
-#define AR_REF_ORIENT(X) ((X).ref_orientation)
-#define AR_READNO(X) ((X).read_id)
-#define AR_MAPQ(X) ((X).mapq)
-#define AR_KEY(X) ((X).tmp_key_id)
-
-#define AR_BASECOUNT(X) ((X).data.has_mismatch.elements)
-#define AR_HAS_MISMATCH(X) ((bool *)((X).data.has_mismatch.buffer))
-#define AR_HAS_OFFSET(X) ((bool *)((X).data.has_ref_offset.buffer))
-
-#define AR_NUM_MISMATCH(X) ((X).data.mismatch.elements)
-#define AR_MISMATCH(X) ((char *)((X).data.mismatch.buffer))
-
-#define AR_NUM_MISMATCH_QUAL(X) ((X).data.mismatch_qual.elements)
-#define AR_MISMATCH_QUAL(X) ((uint8_t *)((X).data.mismatch_qual.buffer))
-
-#define AR_NUM_OFFSET(X) ((X).data.ref_offset.elements)
-#define AR_OFFSET(X) ((INSDC_coord_zero *)((X).data.ref_offset.buffer))
-#define AR_OFFSET_TYPE(X) ((uint8_t *)((X).data.ref_offset_type.buffer))
-
-AlignmentWriter *AlignmentMake(VDatabase *db);
-
-rc_t AlignmentWriteRecord(AlignmentWriter * const self, AlignmentRecord * const data, bool expectUnsorted);
-
-rc_t AlignmentStartUpdatingSpotIds(AlignmentWriter * const self);
-
-rc_t AlignmentGetSpotKey(AlignmentWriter * const self, uint64_t *keyId, int64_t *alignId, bool *isPrimary);
-
-rc_t AlignmentGetRefPos(AlignmentWriter *const self, int64_t row, ReferenceStart *const rslt);
-
-rc_t AlignmentUpdateInfo(AlignmentWriter *const self, int64_t const spotId,
-                         int64_t const mateId, ReferenceStart const *const mateRefPos);
-
-rc_t AlignmentWhack(AlignmentWriter * const self, bool const commit);
-
-rc_t AlignmentRecordInit(AlignmentRecord *self, unsigned readlen,
-                         bool expectUnsorted,
-                         bool hasMismatchQual
-                         );
-
-#endif
diff --git a/interfaces/loader/common-writer.h b/interfaces/loader/common-writer.h
deleted file mode 100644
index cf94231..0000000
--- a/interfaces/loader/common-writer.h
+++ /dev/null
@@ -1,192 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_common_writer_
-#define _h_common_writer_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_insdc_sra_
-#include <insdc/sra.h>
-#endif
-
-#ifndef _h_mmarray_
-#include <loader/mmarray.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-
-struct VDBManager;
-struct VDatabase;
-struct KMemBank;
-struct KBTree;
-struct KLoadProgressbar;
-struct ReaderFile;
-struct CommonWriter;
-struct SequenceWriter;
-struct AlignmentWriter;
-struct Reference;
-
-/*--------------------------------------------------------------------------
- * CommonWriterSettings
- */
-enum LoaderModes {
-    mode_Archive,
-    mode_Analysis
-};
-
-typedef struct CommonWriterSettings
-{
-    uint64_t numfiles;
-    char const *inpath;
-    char const *outpath;
-    char const *tmpfs;
-    
-    struct KFile *noMatchLog;
-    
-    char const *schemaPath;
-    char const *schemaIncludePath;
-    
-    char const *refXRefPath;
-    
-    char const *QualQuantizer;
-    
-    char const *refFilter;
-
-    char const** refFiles; /* NULL-terminated array pointing to argv */
-    
-    char const *headerText;
-    
-    uint64_t maxAlignCount;
-    size_t cache_size;
-
-    uint64_t errCount;
-    uint64_t maxErrCount;
-    uint64_t maxErrPct;
-    uint64_t maxWarnCount_NoMatch;
-    uint64_t maxWarnCount_DupConflict;
-    uint64_t pid;
-    uint64_t minMatchCount; /* minimum number of matches to count as an alignment */
-    int minMapQual;
-    enum LoaderModes mode;
-    uint32_t maxSeqLen;
-    bool omit_aligned_reads;
-    bool omit_reference_reads;
-    bool no_real_output;
-    bool expectUnsorted;
-    bool noVerifyReferences;
-    bool onlyVerifyReferences;
-    bool useQUAL;
-    bool limit2config;
-    bool editAlignedQual;
-    bool keepMismatchQual;
-    bool acceptBadDups; /* accept spots with inconsistent PCR duplicate flags */
-    bool acceptNoMatch; /* accept without any matching bases */
-    uint8_t alignedQualValue;
-    bool allUnaligned; /* treat all records as unaligned */
-    bool noColorSpace;
-    bool noSecondary;
-    bool hasTI;
-    bool acceptHardClip;
-    INSDC_SRA_platform_id platform;
-    bool parseSpotName;
-    bool compressQuality;
-    uint64_t maxMateDistance;
-} CommonWriterSettings;
-
-/*--------------------------------------------------------------------------
- * SpotAssembler
- */
-
-#define FRAG_CHUNK_SIZE (128)
-
-typedef struct SpotAssembler {
-    const struct KLoadProgressbar *progress[4];
-    struct KBTree *key2id[NUM_ID_SPACES];
-    char *key2id_names;
-    struct MMArray *id2value;
-    struct KMemBank *fragsBoth; /*** mate will be there soon ***/
-    struct KMemBank *fragsOne;  /*** mate may not be found soon or even show up ***/
-    int64_t spotId;
-    int64_t primaryId;
-    int64_t secondId;
-    uint64_t alignCount;
-    
-    uint32_t idCount[NUM_ID_SPACES];
-    uint32_t key2id_hash[NUM_ID_SPACES];
-    
-    size_t key2id_max;
-    size_t key2id_name_max;
-    size_t key2id_name_alloc;
-    size_t key2id_count;
-    
-    size_t key2id_name[NUM_ID_SPACES];
-    /* this array is kept in name order */
-    /* this maps the names to key2id and idCount */
-    size_t key2id_oid[NUM_ID_SPACES];
-    
-    unsigned pass;
-    bool isColorSpace;
-    
-} SpotAssembler;
-
-INSDC_SRA_platform_id PlatformToId(const char* name);
-
-/*--------------------------------------------------------------------------
- * CommonWriter
- */
-typedef struct CommonWriter {
-    CommonWriterSettings settings;
-    SpotAssembler ctx;
-    struct Reference* ref;
-    struct SequenceWriter* seq;
-    struct AlignmentWriter* align;
-    bool had_alignments;
-    bool had_sequences;
-    unsigned err_count;
-    bool commit;
-} CommonWriter;
-
-rc_t CommonWriterInit(CommonWriter* self, struct VDBManager *mgr, struct VDatabase *db, const CommonWriterSettings* settings);
-
-rc_t CommonWriterArchive(CommonWriter* self, const struct ReaderFile *);
-rc_t CommonWriterComplete(CommonWriter* self, bool quitting, uint64_t maxDistance);
-
-rc_t CommonWriterWhack(CommonWriter* self);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_common_writer_ */
diff --git a/interfaces/loader/mmarray.h b/interfaces/loader/mmarray.h
deleted file mode 100644
index 7786b81..0000000
--- a/interfaces/loader/mmarray.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_mmarray_
-#define _h_mmarray_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-
-struct KFile;
-
-#define NUM_ID_SPACES (256u)
-
-struct MMArray;
-
-rc_t MMArrayMake(struct MMArray **rslt, struct KFile *fp, uint32_t elemSize);
-
-rc_t MMArrayGet(struct MMArray *const self, void **const value, uint64_t const element);
-
-void MMArrayWhack(struct MMArray *self);
-
-#endif
diff --git a/interfaces/loader/reference-writer.h b/interfaces/loader/reference-writer.h
deleted file mode 100644
index 2ce29f0..0000000
--- a/interfaces/loader/reference-writer.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef LOADER_REFERENCE_WRITER_H_
-#define LOADER_REFERENCE_WRITER_H_ 1
-
-#include <vdb/manager.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <klib/data-buffer.h>
-
-#include <align/writer-reference.h>
-#include "alignment-writer.h"
-
-typedef struct Reference {
-    const ReferenceMgr *mgr;
-    const ReferenceSeq *rseq;
-    int64_t lastRefId;
-    int32_t lastOffset;
-    unsigned curPos;
-    unsigned endPos;
-    unsigned length;
-    KDataBuffer coverage;
-    KDataBuffer mismatches;
-    KDataBuffer indels;
-    KDataBuffer pri_align;
-    KDataBuffer sec_align;
-    KDataBuffer pri_overlap;
-    KDataBuffer sec_overlap;
-    bool out_of_order;
-    bool acceptHardClip;
-    char last_id[256];
-} Reference;
-
-rc_t ReferenceInit(Reference *self, const VDBManager *mgr, VDatabase *db, 
-                   bool expectUnsorted,
-                   bool acceptHardClip,
-                   char const *refXRefPath,
-                   char const *inpath,
-                   uint32_t maxSeqLen,  /*TODO: save in Reference object, reuse in other functions*/
-                   char const** refFiles
-                   );
-rc_t ReferenceSetFile(Reference *self, const char *id, uint64_t length, uint8_t const md5[16], uint32_t maxSeqLen, bool *shouldUnmap);
-rc_t ReferenceVerify(Reference const *self, char const id[], uint64_t length, uint8_t const md5[16]);
-rc_t ReferenceGet1stRow(Reference const *self, int64_t *refID, char const refName[]);
-rc_t ReferenceAddAlignId(Reference *self,
-                         int64_t align_id,
-                         bool is_primary
-                         );
-rc_t ReferenceRead(Reference *self, AlignmentRecord *data, uint64_t const pos,
-                   uint32_t const rawCigar[], uint32_t const cigCount,
-                   char const seqDNA[], uint32_t const seqLen,
-                   uint8_t rna_orient, uint32_t *matches,
-                   bool acceptNoMatch, unsigned minMatchCount, uint32_t maxSeqLen);
-rc_t ReferenceWhack(Reference *self, bool commit, uint32_t maxSeqLen, rc_t (*const quitting)(void));
-
-#endif
diff --git a/interfaces/ncbi/clip.vschema b/interfaces/ncbi/clip.vschema
deleted file mode 100644
index 46f8466..0000000
--- a/interfaces/ncbi/clip.vschema
+++ /dev/null
@@ -1,147 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * NCBI Sequence Read Archive schema
- */
-version 1;
-
-include 'ncbi/sra.vschema';
-include 'ncbi/spotname.vschema';
-
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:tbl:clip
- *  common clip column processing
- *  shared by 454 and ion-torrent
- *
- *  uses spotdesc because it has a dependency upon spot_len
- *
- * history:
- *  1.0.1 - base explicitly upon spotdesc #1.0.1
- *  1.0.2 - base explicitly upon spotdesc #1.0.2
- */
-table NCBI:SRA:tbl:clip #1.0.2 = INSDC:SRA:tbl:spotdesc #1.0.2
-{
-    /* CLIP_ADAPTER_LEFT, CLIP_ADAPTER_RIGHT
-     *  adapter clips in 1-based coordinates
-     *  when value is 0, implies that they are NOT SET
-     */
-    column INSDC:coord:one CLIP_ADAPTER_LEFT = out_clip_adapt_left;
-    column INSDC:coord:one CLIP_ADAPTER_RIGHT = out_clip_adapt_right;
-
-    // casts are required to allow multple storage formats
-    INSDC:coord:one out_clip_adapt_left = cast ( .CLIP_ADAPTER_LEFT );
-    INSDC:coord:one out_clip_adapt_right = cast ( .CLIP_ADAPTER_RIGHT );
-
-
-    /* CLIP_QUALITY_LEFT, CLIP_QUALITY_RIGHT
-     *  quality clips in 1-based coordinates
-     *  when value is 0, implies that they are NOT SET
-     */
-    column INSDC:coord:one CLIP_QUALITY_LEFT = out_clip_qual_left;
-    column INSDC:coord:one CLIP_QUALITY_RIGHT = out_clip_qual_right;
-
-    // casts are required to allow multple storage formats
-    INSDC:coord:one out_clip_qual_left
-        = cast ( .CLIP_QUALITY_LEFT )
-        | < INSDC:coord:one > echo < 1 > ();
-    INSDC:coord:one out_clip_qual_right
-        = cast ( .CLIP_QUALITY_RIGHT )
-        | cast ( spot_len );
-
-    // support for reading 16-bit clips, as in v1 schema
-    readonly column U16 CLIP_ADAPTER_LEFT
-        = .CLIP_ADAPTER_LEFT
-        | cast ( out_clip_adapt_left );
-    readonly column U16 CLIP_ADAPTER_RIGHT
-        = .CLIP_ADAPTER_RIGHT
-        | cast ( out_clip_adapt_right );
-    readonly column U16 CLIP_QUALITY_LEFT = cast ( out_clip_qual_left );
-    readonly column U16 CLIP_QUALITY_RIGHT = cast ( out_clip_qual_right );
-
-
-    /* CLIP-MANIA
-     */
-
-    // 1-based fully-closed right edge is row-length
-    INSDC:coord:one spot_right = ( INSDC:coord:one ) spot_len;
-
-    // processed 1-based coordinates >= 1
-    INSDC:coord:one lim_clip_adapt_left
-        = < INSDC:coord:one > clip < 1, 0x7FFFFFFF > ( out_clip_adapt_left );
-    INSDC:coord:one max_clip_adapt_right
-        = < INSDC:coord:one, INSDC:coord:one > map < 0, 0x7FFFFFFF > ( out_clip_adapt_right );
-    INSDC:coord:one lim_clip_adapt_right
-        = < INSDC:coord:one > min ( spot_right, max_clip_adapt_right );
-    INSDC:coord:one lim_clip_qual_left
-        = < INSDC:coord:one > clip < 1, 0x7FFFFFFF > ( out_clip_qual_left );
-    INSDC:coord:one max_clip_qual_right
-        = < INSDC:coord:one, INSDC:coord:one > map < 0, 0x7FFFFFFF > ( out_clip_qual_right );
-    INSDC:coord:one lim_clip_qual_right
-        = < INSDC:coord:one > min ( spot_right, max_clip_qual_right );
-
-    // read-only columns with 0-based coordinates
-    readonly column INSDC:coord:zero CLIP_ADAPTER_LEFT
-        = ( INSDC:coord:zero ) < I32 > diff < 1 > ( lim_clip_adapt_left );
-    readonly column INSDC:coord:zero CLIP_ADAPTER_RIGHT
-        = ( INSDC:coord:zero ) < I32 > diff < 1 > ( lim_clip_adapt_right );
-    readonly column INSDC:coord:zero CLIP_QUALITY_LEFT
-        = ( INSDC:coord:zero ) < I32 > diff < 1 > ( lim_clip_qual_left );
-    readonly column INSDC:coord:zero CLIP_QUALITY_RIGHT
-        = ( INSDC:coord:zero ) < I32 > diff < 1 > ( lim_clip_qual_right );
-
-    // combined clips
-    INSDC:coord:one max_clip_left
-        = < INSDC:coord:one > max ( lim_clip_adapt_left, lim_clip_qual_left )
-        | lim_clip_adapt_left
-        | lim_clip_qual_left;
-    INSDC:coord:zero max_zclip_left
-        = ( INSDC:coord:zero ) < I32 > diff < 1 > ( max_clip_left );
-    INSDC:coord:one min_clip_right
-        = < INSDC:coord:one > min ( lim_clip_adapt_right, lim_clip_qual_right )
-        | lim_clip_adapt_right
-        | lim_clip_qual_right;
-
-
-    /* TRIMMED SEQUENCE
-     *  need to find the 0-based trim_start and trim_len
-     */
-    INSDC:coord:zero bio_start
-        = NCBI:SRA:bio_start ( out_read_start, out_read_type );
-    INSDC:coord:zero trim_start
-        = < INSDC:coord:zero > max ( bio_start, max_zclip_left )
-        | bio_start;
-
-    INSDC:coord:zero bio_end
-        = NCBI:SRA:bio_end < false > ( out_read_start, out_read_type, out_read_len );
-
-    I32 trim_stop
-        = < I32 > max ( min_clip_right, trim_start )
-        | spot_right;
-    INSDC:coord:len trim_len
-        = ( INSDC:coord:len ) < I32 > diff ( trim_stop, trim_start );
-};
diff --git a/interfaces/ncbi/extern.h b/interfaces/ncbi/extern.h
deleted file mode 100644
index 278f394..0000000
--- a/interfaces/ncbi/extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ncbi_extern_
-#define _h_ncbi_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define NCBI_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define NCBI_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_ncbi_extern_ */
diff --git a/interfaces/ncbi/kimpl-sra-cgi.h b/interfaces/ncbi/kimpl-sra-cgi.h
deleted file mode 100644
index d1b871a..0000000
--- a/interfaces/ncbi/kimpl-sra-cgi.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * =============================================================================
- *
- */
-
-#ifndef _h_ncbi_impl_sra_cgi_
-#define _h_ncbi_impl_sra_cgi_
-
-#include <stdint.h> // uint32_t
-#include <unistd.h> // ssize_t
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-typedef union SraCgiRequest_vt SraCgiRequest_vt;
-struct SraCgiRequest {
-    int err;
-    const SraCgiRequest_vt *vt;
-};
-typedef struct SraCgiRequest SraCgiRequest;
-
-#ifndef SRA_CGI_REQUEST
-#define SRA_CGI_REQUEST SraCgiRequest
-#endif
-
-typedef struct SraCgiRequest_vt_v1 SraCgiRequest_vt_v1;
-struct SraCgiRequest_vt_v1 {
-    uint32_t maj, min;
-    ssize_t (*read) (SRA_CGI_REQUEST *self,
-        void *buffer, size_t buffer_size);
-};
-union SraCgiRequest_vt {
-    SraCgiRequest_vt_v1 v1;
-};
-int SraCgiRequestInit(SraCgiRequest *self, const SraCgiRequest_vt *vt);
-
-
-typedef union SraCgiResponse_vt SraCgiResponse_vt;
-struct SraCgiResponse {
-    int err;
-    const SraCgiResponse_vt *vt;
-};
-typedef struct SraCgiResponse SraCgiResponse;
-#ifndef SRA_CGI_RESPONSE
-#define SRA_CGI_RESPONSE SraCgiResponse
-#endif
-
-typedef struct SraCgiResponse_vt_v1 SraCgiResponse_vt_v1;
-struct SraCgiResponse_vt_v1 {
-    uint32_t maj, min;
-    void (*status) (SRA_CGI_RESPONSE *self, unsigned int code);
-    void (*header) (SRA_CGI_RESPONSE *self,
-        const char *name, const void *buffer, size_t bytes);
-    ssize_t (*write) (SRA_CGI_RESPONSE *self,
-        const void *buffer, size_t bytes);
-};
-
-union SraCgiResponse_vt {
-    SraCgiResponse_vt_v1 v1;
-};
-int SraCgiResponseInit(SraCgiResponse *self, const SraCgiResponse_vt *vt);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ncbi_impl_sra_cgi_ */
-
diff --git a/interfaces/ncbi/ksra-cgi-lib.h b/interfaces/ncbi/ksra-cgi-lib.h
deleted file mode 100644
index 8b62638..0000000
--- a/interfaces/ncbi/ksra-cgi-lib.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * =============================================================================
- *
- */
-
-#ifndef _h_ncbi_ksra_cgi_lib_
-#define _h_ncbi_ksra_cgi_lib_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct SraCgiRequest;
-struct SraCgiResponse;
-
-/*------------------------------------------------------------------------------
- * VdbCgiFunction
- *
- * An entry point of the sra toolkit dynamic library
- * Is called by a CGI application
- */
-typedef
-int TVdbCgiFunction(struct SraCgiRequest *req, struct SraCgiResponse *resp);
-
-TVdbCgiFunction VdbCgiFunction;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ncbi_sra_cgi_ */
diff --git a/interfaces/ncbi/ksra-cgi.h b/interfaces/ncbi/ksra-cgi.h
deleted file mode 100644
index 0f33c92..0000000
--- a/interfaces/ncbi/ksra-cgi.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * =============================================================================
- *
- */
-
-#ifndef _h_ncbi_sra_cgi_
-#define _h_ncbi_sra_cgi_
-
-#include <stdint.h> /* uint32_t */
-#include <unistd.h> /* ssize_t */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*------------------------------------------------------------------------------
- * SraCgiRequest
- */
-
-struct SraCgiRequest;
-
-/* Read
- *  Read() attempts to read up to buffer_size bytes
- *  from CGI request into the buffer.
- *
- * Return value:
- *  On success, the number of bytes read is returned (zero indicates end of
- *  file).
- *
- *  On error, negative value is returned
- *  and SraCgiRequest->err is set appropriately.
- */
-ssize_t SraCgiRequestRead(struct SraCgiRequest *self,
-    void *buffer, size_t buffer_size);
-
-
-/*------------------------------------------------------------------------------
- * SraCgiResponse
- */
-
-struct SraCgiResponse;
-
-/* Status
- *
- * Set HTTP Response Status
- */
-void SraCgiResponseStatus(struct SraCgiResponse *self, unsigned int code);
-
-
-/* Header
- *
- * Set an HTTP Response Header
- *
- * "name" - header name
- * "buffer" contains the header string value
- * "bytes" - its size
- *
- * Return value:
- *  On success, the number of header bytes written are returned.
- *
- *  On error, negative value is returned
- *  and SraCgiResponse->err is set appropriately.
- */
-ssize_t SraCgiResponseHeader(struct SraCgiResponse *self,
-    const char *name, const void *buffer, size_t bytes);
-
-
-/* ALL HEADERS SHOULD BE SET BEFORE CALLING WRITE() */
-
-
-/* Write
- *  Write() writes up to count bytes to CGI output stream from the buffer.
- *
- * Return value:
- *  On success, the number of bytes written are returned (zero indicates nothing
- *  was written).
- *
- *  On error, negative value is returned
- *  and SraCgiResponse->err is set appropriately.
- */
-ssize_t SraCgiResponseWrite(struct SraCgiResponse *self,
-    const void *buffer, size_t bytes);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ncbi_sra_cgi_ */
diff --git a/interfaces/ncbi/ncbi.h b/interfaces/ncbi/ncbi.h
deleted file mode 100644
index 94b3c0e..0000000
--- a/interfaces/ncbi/ncbi.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ncbi_ncbi_
-#define _h_ncbi_ncbi_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*==========================================================================
- * NCBI types, constants
- */
-
-
-/* 16-bit integer sample data
- */
-typedef int16_t NCBI_isamp1;
-
-/* 32-bit floating point sample data
- */
-typedef float NCBI_fsamp1, NCBI_fsamp4 [ 4 ];
-
-/* ASN.1
- */
-typedef uint8_t NCBI_asn_binary; 
-typedef char NCBI_asn_text;
-
-/* GenInfo id - 64 bit because we are almost out of 32 bit ids
- */
-typedef uint64_t NCBI_gi;
-
-/* Taxonomy id
- */
-typedef uint32_t NCBI_taxid;
-
-/* Genbank status
- */
-typedef uint32_t NCBI_gb_state;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ncbi_ncbi_ */
diff --git a/interfaces/ncbi/ncbi.vschema b/interfaces/ncbi/ncbi.vschema
deleted file mode 100644
index 5dd7b1c..0000000
--- a/interfaces/ncbi/ncbi.vschema
+++ /dev/null
@@ -1,195 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * VDB Schema intrinsic types and functions
- */
-version 1;
-
-include 'vdb/vdb.vschema';
-include 'insdc/insdc.vschema';
-
-
-/*--------------------------------------------------------------------------
- * data types
- */
-
-// N-encoded phred has values limited to 1..63 and 0 used for N
-typedef INSDC:quality:phred NCBI:quality:n_encoded:phred;
-// N-encoded log-odds has values limite to -5..40 and -6 for N
-typedef INSDC:quality:log_odds NCBI:quality:n_encoded:log_odds;
-
-// these types have been restated
-alias INSDC:dna:text INSDC:fasta;
-alias INSDC:4na:packed INSDC:dna:4na;
-alias INSDC:2na:packed INSDC:dna:2na;
-alias INSDC:2na:packed NCBI:2na;
-alias INSDC:2cs:packed INSDC:color:2cs;
-alias INSDC:2cs:packed NCBI:2cs;
-alias INSDC:quality:phred NCBI:qual1;
-alias NCBI:quality:n_encoded:phred NCBI:SRA:enc_qual1;
-
-// 16-bit integer sample data
-typedef I16 NCBI:isamp1;
-
-// 32-bit floating point sample data
-typedef F32 NCBI:fsamp1, NCBI:fsamp4 [ 4 ];
-
-// ASN.1
-typedef B8 NCBI:asn:binary; 
-typedef ascii NCBI:asn:text;
-
-// GenInfo id - 64 bit because we are almost out of 32 bit ids
-typedef U64 NCBI:gi;
-
-// Taxonomy id
-typedef U32 NCBI:taxid;
-
-// Genbank status
-typedef U32 NCBI:gb_state;
-
-
-/*--------------------------------------------------------------------------
- * formats
- *  many of these formats are older than the current corresponding vdb fmts
- */
-
-fmtdef merged_t;
-fmtdef fp_encoded_t;
-fmtdef rl_encoded_t;
-fmtdef NCBI:zlib_encoded_t;
-fmtdef NCBI:fp_encoded_t;
-
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-
-/* merge
- * split
- *  the original versions of these functions
- *  used a slightly different format giving them
- *  a different signature from their vdb counterparts.
- *
- *  here to maintain backward compatibility for
- *  column schema functions
- */
-extern function
-merged_t NCBI:merge #1.0 ( any in, ... );
-
-extern function
-any NCBI:split #1.0 < U32 idx > ( merged_t in )
-    = vdb:split;
-
-
-/* cut
- * paste
- *  these have no compiler type-checking
- */
-extern function
-any NCBI:cut #1.0 < U32 idx, ... > ( any in )
-    = vdb:cut;
-
-extern function
-any NCBI:paste #1.0 ( any in, ... )
-    = vdb:paste;
-
-
-/* pack
- * unpack
- *  wildcard typed
- */
-extern function
-any NCBI:pack #1.0 < U32 from, U32 to > ( any in );
-
-extern function
-any NCBI:unpack #1.0 < U32 from, U32 to > ( any in );
-
-
-/* fp_decode
- *  OBSOLETE
- *  here to handle anything encoded with fp_encode
- */
-extern function
-any NCBI:fp_decode #1.0 ( fp_encoded_t in );
-
-
-/* fp_extend
- *  OBSOLETE
- *  here to handle anything encoded with fp_truncate
- */
-extern function
-any NCBI:fp_extend #1.0 < U32 bits > ( NCBI:fp_encoded_t in );
-
-
-/* run_length_encode
- * run_length_decode
- */
-extern function
-rl_encoded_t NCBI:run_length_encode #1.0 ( any in )
-    = vdb:rlencode;
-
-extern function
-any NCBI:run_length_decode #1.0 ( rl_encoded_t in )
-    = vdb:rldecode;
-
-
-/* zlib
- * unzip
- *  variation on the formatting
- */
-extern function
-NCBI:zlib_encoded_t NCBI:zlib #1.0 < * I32 strategy, I32 level > ( any in )
-    = vdb:zip;
-
-extern function
-any NCBI:unzip #1.0 ( NCBI:zlib_encoded_t in );
-
-
-/* zlib_huffman_compress
- *  invokes zlib in huffman + rle mode
- */
-schema function
-NCBI:zlib_encoded_t NCBI:zlib_huffman_compress #1.0 ( any in )
-{
-    // named as Huffman, but apply RLE as well
-    return NCBI:zlib < Z_RLE > ( in );
-}
-
-/* zlib_compress
- *  standard zlib
- */
-schema function
-NCBI:zlib_encoded_t NCBI:zlib_compress #1.0 ( any in )
-{
-    return NCBI:zlib < Z_DEFAULT_STRATEGY > ( in );
-}
-
-/* zlib_decompress
- *  alternate name for unzip
- */
-alias NCBI:unzip NCBI:zlib_decompress;
diff --git a/interfaces/ncbi/pnbrdb.vschema b/interfaces/ncbi/pnbrdb.vschema
deleted file mode 100644
index e0b1775..0000000
--- a/interfaces/ncbi/pnbrdb.vschema
+++ /dev/null
@@ -1,98 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-version 1;
-include 'vdb/vdb.vschema';
-
-/* PNBRDB
- *  the original flat-file pnbrdb structure was divided into two forks:
- *   1 - "hsp" containing full blastp hsps
- *   2 - "nbr" containing only pig->pig relationships with max score
- *
- *  each fork was organized into bin directories by "query" ( left-hand ) pig
- *  each bin contained entries for up to 1M query pigs with a numeric
- *  4 digit 1-based name generated as "( ( qpig - 1 ) / 1024 ) / 1024 + 1".
- *  this bin approach served as a primitive index.
- *
- *  within each bin directory, there are 1024 data files, where each data file
- *  represented 1024 query pigs. the file name incorporated a 4 digit 1-based
- *  file id generated as "( ( qpig - 1 ) / 1024 ) % 1024 + 1" making it possible
- *  to locate any entry by query pig within a 1024 entry neighborhood by using
- *  filesystem path alone.
- *
- *  within each data file, a fixed-size 1024-entry header gave the location of
- *  entries ordered according to the most common queries.
- *
- *  all basic data are contained within the "hsp" fork. the "nbr" fork served
- *  as a pre-calculated result of the query selecting all unique pig->pig pairs
- *  with their maximum score value.
- */
-
-/* The vdb representation of the pnbrdb has two tables
- *  1. table with one row per qpig (i.e. qpig = row_id) and two columns:
- *     offset and count. Offset indicates row_id in the second table where the
- *     hsps for the qpig are stored and count indicates the number of these rows.
- *  2. table with these coulmns: spig, max_score and blob. The blob contains all
- *     segments for given (qpig, spig) pair.
- */
-
-table NCBI:pnbr:table:qpig #1
-{
-    /* OFFSET
-     *  start position of hsps for qpig = row_id in the hsp table.
-     */
-    extern column <U64> izip_encoding OFFSET;
-
-    /* COUNT
-     *  number of hsps for qpig = row_id in the hsp table.
-     */
-    extern column <U64> izip_encoding COUNT;
-};
-
-table NCBI:pnbr:table:hsp #1
-{
-    /* SPIG
-     *  the subject pig column
-     */
-    extern column <U32> izip_encoding SPIG;
-
-    /* MAX_SCORE
-     *  max score between given query pig and subject pig
-     */
-    extern column <I32> izip_encoding MAX_SCORE;
-
-    /* SEGMENTS
-     *  blob for storing hsps for given qpig and spig.
-     */
-    extern column <B8> zip_encoding SEGMENTS;
-};
-
-database NCBI:pnbr:db:pnbr #1
-{
-    table NCBI:pnbr:table:qpig #1 QPIG_REFERENCE;
-    table NCBI:pnbr:table:hsp #1 HSP;
-};
-
diff --git a/interfaces/ncbi/seq-graph.vschema b/interfaces/ncbi/seq-graph.vschema
deleted file mode 100644
index 9a2962e..0000000
--- a/interfaces/ncbi/seq-graph.vschema
+++ /dev/null
@@ -1,180 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * seq-graph style named annotations
- */
-version 1;
-
-include 'vdb/vdb.vschema';
-
-
-/*--------------------------------------------------------------------------
- * types
- * constants
- */
-
-// example usage of data type:
-typedef utf8 NCBI:SeqGraph:sid;
-typedef utf8 NCBI:SeqGraph:name;
-typedef U32 NCBI:SeqGraph:len;
-typedef U32 NCBI:SeqGraph:scale;
-typedef I64 NCBI:SeqGraph:value;
-typedef NCBI:SeqGraph:value NCBI:SeqGraph:start;
-typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_q0;   // min
-typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_q10;  // 10th quantile
-typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_q50;  // median
-typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_q90;  // 90th quantile
-typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_q100; // max
-typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_zoom_q0;   // min zoomed to 100bp segment
-typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_zoom_q10;  // 10th quantile zoomed to 100bp segment
-typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_zoom_q50;  // median zoomed to 100bp segment
-typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_zoom_q90;  // 90th quantile zoomed to 100bp segment
-typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_zoom_q100; // max zoomed to 100bp segment
-typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_num_switches; // number of value switches in graph
-
-
-/*-------------------------------------------------------------------------- 
- * tables
- */
-table NCBI:SeqGraph:tbl:seqgraph #1.0
-{
-    /* SID
-     * Sequence id (Accession.version).
-     * Indexed.
-     */
-    extern column NCBI:SeqGraph:sid SID
-        = ( NCBI:SeqGraph:sid ) idx:text:project #1.0 < 'sid' > ( .SID );
-    physical column < NCBI:SeqGraph:sid > zip_encoding .SID
-        = ( NCBI:SeqGraph:sid ) idx:text:insert #1.0 < 'sid' > ( SID );
-
-    /* NAME
-     * Sequence name (which resolves into SID using assembly information)
-     * Indexed.
-     */
-    extern column NCBI:SeqGraph:name NAME
-        = ( NCBI:SeqGraph:name ) idx:text:project #1.0 < 'name' > ( .NAME );
-    physical column < NCBI:SeqGraph:name > zip_encoding .NAME
-        = ( NCBI:SeqGraph:name ) idx:text:insert #1.0 < 'name' > ( NAME );
-
-    /* START
-     * Sequence offset for the segment saved in this row. 
-     * In most cases this can be calculated from row id and LEN below.
-     */
-    extern column < NCBI:SeqGraph:start > izip_encoding START;
-
-    /* LEN
-     *  MAX_SEQ_LEN is used in our refseq schema
-     *  CHUNK_SIZE might be preferred
-     *  Mostly a constant ( = 5000), except for the last row for each sequence.
-     */
-    extern column < NCBI:SeqGraph:len > izip_encoding LEN;
-
-    /* SCALE
-     * Scaling factor for graph values.
-     * Mostly needed in order to store values as integers when actual values
-     * are real with a certain precision.
-     */
-    extern column < NCBI:SeqGraph:scale > izip_encoding SCALE;
-
-    /* GRAPH
-     * intensity values
-     */
-    extern column < NCBI:SeqGraph:value > izip_encoding GRAPH;
-
-
-    /* GR_Q0
-     * Minimal value for the row
-     */
-    extern column < NCBI:SeqGraph:gr_q0 > izip_encoding GR_Q0;
-
-
-    /* GR_Q10
-     * 10th quantile value for the row 
-     */
-    extern column < NCBI:SeqGraph:gr_q10 > izip_encoding GR_Q10;
-
-
-    /* GR_Q50
-     * Median value for the row 
-     */
-    extern column < NCBI:SeqGraph:gr_q50 > izip_encoding GR_Q50;
-
-
-    /* GR_Q90
-     * 90th quantile value for the row  
-     */
-    extern column < NCBI:SeqGraph:gr_q90 > izip_encoding GR_Q90;
-
-
-    /* GR_Q100
-     * Maximal value for the row
-     */
-    extern column < NCBI:SeqGraph:gr_q100 > izip_encoding GR_Q100;
-
-    /* GR_ZOOM_Q0
-     * Minimal values for 100bp segments of the graph chunk
-     */
-    extern column < NCBI:SeqGraph:gr_zoom_q0 > izip_encoding GR_ZOOM_Q0;
-
-
-    /* GR_ZOOM_Q10
-     * 10th quantile values for 100bp segments of the graph chunk
-     */
-    extern column < NCBI:SeqGraph:gr_zoom_q10 > izip_encoding GR_ZOOM_Q10;
-
-
-    /* GR_ZOOM_Q50
-     * Median values for 100bp segments of the graph chunk 
-     */
-    extern column < NCBI:SeqGraph:gr_zoom_q50 > izip_encoding GR_ZOOM_Q50;
-
-
-    /* GR_ZOOM_Q90
-     * 90th quantile values for 100bp segments of the graph chunk 
-     */
-    extern column < NCBI:SeqGraph:gr_zoom_q90 > izip_encoding GR_ZOOM_Q90;
-
-
-    /* GR_ZOOM_Q100
-     * Maximal values for 100bp segments of the graph chunk 
-     */
-    extern column < NCBI:SeqGraph:gr_zoom_q100 > izip_encoding GR_ZOOM_Q100;
-
-    /* NUM_SWITCHES
-     * Number of value switches within the graph. Helps client make the decision how better to
-     * represent the graph in ASN.1 (Seq-graph or Seq-table).
-     */
-    extern column < NCBI:SeqGraph:gr_num_switches > izip_encoding NUM_SWITCHES;
-};
-
-
-database NCBI:SeqGraph:database:kmergraph #1.0
-{
-    table NCBI:SeqGraph:tbl:seqgraph #1.0 LEFT;
-    table NCBI:SeqGraph:tbl:seqgraph #1.0 RIGHT;
-    table NCBI:SeqGraph:tbl:seqgraph #1.0 SUM;
-}
diff --git a/interfaces/ncbi/seq.vschema b/interfaces/ncbi/seq.vschema
deleted file mode 100644
index 403f8f0..0000000
--- a/interfaces/ncbi/seq.vschema
+++ /dev/null
@@ -1,894 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * Sequence schema implementation tables
- */
-version 1;
-
-include 'vdb/vdb.vschema';
-include 'ncbi/ncbi.vschema';
-include 'insdc/sra.vschema';
-
-
-/*--------------------------------------------------------------------------
- * n_encoding - implementation
- *  introduces common virtual productions
- */
-table NCBI:tbl:n_encoding #1
-{
-    U8 n_encoding_dummy
-        = read_unpack
-        | read_ndecode;
-};
-
-
-/*--------------------------------------------------------------------------
- * seqloc
- *  NCBI sequence locator table
- */
-table NCBI:tbl:seqloc #1.0
-{
-    /* SEQ_ID
-     *  a FASTA-style SeqId
-     */
-    extern column < ascii > zip_encoding SEQ_ID;
-
-    /* SEQ_START
-     *  provided in both 1 ( default ) and 0-based coordinates
-     */
-    extern default column < INSDC:coord:one > izip_encoding SEQ_START;
-    readonly column INSDC:coord:zero SEQ_START
-        = ( INSDC:coord:zero ) < INSDC:coord:one > diff < 1 > ( .SEQ_START );
-
-    /* SEQ_LEN
-     */
-    extern column < INSDC:coord:len > izip_encoding SEQ_LEN;
-};
-
-
-/*--------------------------------------------------------------------------
- * base_space - implementation
- *  READ column rules
- */
-
-/* color_from_dna
- *  use starting keys and color matrix to convert individual reads
- *  to base space.
- */
-extern function
-INSDC:x2cs:bin NCBI:color_from_dna #1 ( INSDC:x2na:bin bin_x2na,
-    INSDC:coord:zero read_start, INSDC:coord:len read_len,
-    INSDC:dna:text cs_key, U8 color_matrix );
-
-
-/* dcmp_base_space
- *  table to introduce common virtual productions
- */
-table NCBI:tbl:dcmp_base_space #1
-{
-    // rules to introduce purely virtual productions
-    // never expected to resolve...
-    INSDC:dna:text dcmp_virtual_productions
-        = out_dcmp_4na_bin
-        | out_dcmp_x2na_bin
-        | out_dcmp_2na_bin
-        | out_dcmp_2na_packed;
-}
-
-/* history:
- *  1.0.1 - base explicitly upon sequence #1.0.1, spotdesc #1.0.1
- *  1.0.2 - spotdesc #1.0.2
- *  1.0.3 - base upon dcmp_base_space for "out_dcmp_2na_bin"
- */
-table NCBI:tbl:base_space_common #1.0.3
-    = INSDC:tbl:sequence #1.0.1
-    , INSDC:SRA:tbl:spotdesc #1.0.2
-    , INSDC:SRA:tbl:stats #1.1.0
-    , NCBI:tbl:dcmp_base_space #1.0.0
-{
-	/* INSDC:tbl:sequence inherited virtual productions
-     */
-
-    // cs_native - tells user color space is not native
-    bool cs_native = < bool > echo < false > ();
-
-    // in_cs_key is not writable in base_space
-
-    // color-space key is completely artificial
-    INSDC:dna:text out_cs_key
-        = .CS_KEY
-        | < INSDC:dna:text > echo < 'T' > ( out_read_type )
-        | < INSDC:dna:text > echo < 'T' > ( out_read_len )
-        | < INSDC:dna:text > echo < 'T' > ();
-
-    // unambiguous synthesized 2cs
-    INSDC:2cs:bin out_2cs_bin
-        = < INSDC:x2cs:bin, INSDC:2cs:bin > map < INSDC:x2cs:map:BINSET, [ 0, 1, 2, 3, 0 ] > ( out_x2cs_bin );
-
-    // unambiguous unpacked 2na
-    INSDC:2na:bin out_2na_bin
-        = out_dcmp_2na_bin
-        | ( INSDC:2na:bin ) unpack ( out_2na_packed );
-
-    // synthesized color sequence
-    INSDC:x2cs:bin out_x2cs_bin
-        = NCBI:color_from_dna ( out_x2na_bin, out_read_start, out_read_len, out_cs_key, out_color_matrix );
-
-    // synthesized packed 2cs
-    INSDC:2cs:packed out_2cs_packed
-        = ( INSDC:2cs:packed ) pack ( out_2cs_bin );
-
-    // synthesized packed 4na
-    INSDC:4na:packed out_4na_packed
-        = ( INSDC:4na:packed ) pack ( out_4na_bin );
-
-    // synthesized color text
-    INSDC:color:text out_color_text
-        = < INSDC:x2cs:bin, INSDC:color:text > map <  INSDC:x2cs:map:BINSET, INSDC:x2cs:map:CHARSET > ( out_x2cs_bin );
-
-    // published color matrix
-    U8 out_color_matrix
-        = < U8 > echo < INSDC:color:default_matrix > ();
-
-    // spot_len and fixed_spot_len
-    INSDC:coord:len base_space_spot_len
-        = ( INSDC:coord:len ) row_len ( out_2na_packed );
-    INSDC:coord:len base_space_fixed_spot_len
-        = ( INSDC:coord:len ) fixed_row_len ( out_2na_packed );
-
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  out_signal
-	 *  in_dna_text
-	 *  out_4na_bin
-	 *  out_dna_text
-	 *  out_x2na_bin
-	 *  out_2na_packed
-	 */
-
-	/* INSDC:SRA:tbl:stats inherited productions
-	 *  in_stats_bin
-	 */
-
-	/* NCBI:tbl:dcmp_base_space inherited productions
-	 *  out_dcmp_2na_bin
-	 *  out_dcmp_4na_bin
-	 *  out_dcmp_x2na_bin
-	 *  out_dcmp_2na_packed
-	 */
-};
-
-
-/* base_space_nocol
- *  this table describes viewing rules
- *  but omits writing rules and physical column description
- *  in order to support older tables
- *
- * history:
- *  1.0.1 - base explicitly upon base_space_common #1.0.1
- *  1.0.2 - base explicitly upon base_space_common #1.0.2
- *  1.0.3 - " " 1.0.3
- */
-table NCBI:tbl:base_space_nocol #1.0.3
-    = NCBI:tbl:base_space_common #1.0.3
-    , NCBI:tbl:n_encoding #1
-{
-    // incoming is disabled
-
-    // synthesized dna text
-    INSDC:dna:text out_dna_text
-        = < INSDC:x2na:bin, INSDC:dna:text > map < INSDC:x2na:map:BINSET, INSDC:x2na:map:CHARSET > ( out_x2na_bin );
-
-    // synthesized 4na
-    INSDC:4na:bin out_4na_bin
-        = < INSDC:x2na:bin, INSDC:4na:bin > map < INSDC:x2na:map:BINSET, [ 1, 2, 4, 8, 15 ] > ( out_x2na_bin );
-
-    // unpacked 2na with ambiguities
-    INSDC:x2na:bin out_x2na_bin
-        = ( INSDC:x2na:bin ) read_ndecode;
-
-    // interface with n-encoded qualities
-    U8 read_unpack = out_2na_bin;
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  out_signal
-	 *  out_2na_packed
-	 */
-
-	/* NCBI:tbl:n_encoding inherited productions
-	 *  read_ndecode
-	 */
-};
-
-/* base_space #1
- *  this schema brings in standard .READ column for v1 tables
- *
- * history:
- *  1.0.1 - base explicitly upon base_space_nocol #1.0.1
- *  1.0.2 - base explicitly upon base_space_nocol #1.0.2
- *  1.0.3 - base explicitly upon base_space_nocol #1.0.3
- */
-table NCBI:tbl:base_space #1.0.3 = NCBI:tbl:base_space_nocol #1.0.3
-{
-    // 2-bit 2na representation (0..3)
-    INSDC:2na:packed out_2na_packed = .READ;
-
-    // no rules for writing to .READ
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  out_signal
-	 */
-
-	/* NCBI:tbl:n_encoding inherited productions
-	 *  read_ndecode
-	 */
-};
-
-
-/* base_space #2
- *  standard current base-space table
- *
- * history:
- *  2.0.2 - base_space_common #1.0.2
- *  2.0.3 - base_space_common #1.0.3 now has dcmp_base_space as well
- */
-table NCBI:tbl:base_space #2.0.3
-    = NCBI:tbl:base_space_common #1.0.3
-    , NCBI:tbl:dcmp_base_space #1
-{
-    /* input rules
-     */
-
-    // input text
-    INSDC:dna:text in_dna_text
-        = < INSDC:dna:text, INSDC:dna:text > map < '.acmgrsvtwyhkdbn','NACMGRSVTWYHKDBN' > ( READ );
-
-    // input 4na bin
-    INSDC:4na:bin in_4na_bin
-        = < INSDC:4na:bin > range_validate < 0, 15 > ( READ )
-        | ( INSDC:4na:bin ) unpack ( in_4na_packed )
-        | < INSDC:dna:text, INSDC:4na:bin > map < INSDC:4na:map:CHARSET, INSDC:4na:map:BINSET > ( in_dna_text )
-        | < INSDC:x2na:bin, INSDC:4na:bin > map < INSDC:x2na:map:BINSET, [ 1, 2, 4, 8, 15 ] > ( in_x2na_bin );
-
-    // input 4na packed
-    INSDC:4na:packed in_4na_packed = READ;
-
-    // input x2na bin
-    INSDC:x2na:bin in_x2na_bin
-        = < INSDC:x2na:bin > range_validate < 0, 4 > ( READ )
-        | < INSDC:4na:bin, INSDC:x2na:bin > map < INSDC:4na:map:BINSET, [ 4,0,1,4,2,4,4,4,3,4,4,4,4,4,4,4 ] > ( in_4na_bin );
-
-    // input 2na bin
-    INSDC:2na:bin in_2na_bin
-        = < INSDC:2na:bin > range_validate < 0, 3 > ( READ )
-        | ( INSDC:2na:bin ) unpack ( in_2na_packed )
-        | INSDC:SEQ:rand_4na_2na ( in_4na_bin );
-
-    // input 2na packed
-    INSDC:2na:packed in_2na_packed = READ;
-
-    // input 4na alt-read ( ambiguities )
-    INSDC:4na:bin in_alt_4na_bin
-        = < INSDC:4na:bin, INSDC:4na:bin > map < INSDC:4na:map:BINSET, [ 15,0,0,3,0,5,6,7,0,9,10,11,12,13,14,15 ] > ( in_4na_bin );
-
-    // preparing a feed into stats column
-    U8 in_stats_bin = in_2na_bin;
-
-
-    /* physical columns
-     */
-
-    physical column INSDC:2na:packed .READ
-        = in_2na_packed
-        | ( INSDC:2na:packed ) pack ( in_2na_bin );
-
-    physical column < INSDC:4na:bin > zip_encoding .ALTREAD
-        = < INSDC:4na:bin > trim < 0, 0 > ( in_alt_4na_bin );
-
-
-    /* output rules
-     */
-
-    // output 2na packed
-    INSDC:2na:packed out_2na_packed
-        = .READ
-        | out_dcmp_2na_packed;
-
-    // output x2na bin
-    INSDC:x2na:bin out_x2na_bin
-        = out_dcmp_x2na_bin
-        | < INSDC:4na:bin, INSDC:x2na:bin > map < INSDC:4na:map:BINSET, [ 4,0,1,4,2,4,4,4,3,4,4,4,4,4,4,4 ] > ( out_4na_bin );
-
-    // output 2na->4na bin
-    INSDC:4na:bin out_2na_4na_bin
-        = < INSDC:2na:bin, INSDC:4na:bin > map < INSDC:2na:map:BINSET, [ 1, 2, 4, 8 ] > ( out_2na_bin );
-
-    // output 4na bin
-    INSDC:4na:bin out_4na_bin
-        = < INSDC:4na:bin > bit_or < ALIGN_RIGHT > ( out_2na_4na_bin, .ALTREAD )
-        | out_dcmp_4na_bin
-        | out_2na_4na_bin;
-
-    // output text
-    INSDC:dna:text out_dna_text
-        = < INSDC:4na:bin, INSDC:dna:text > map < INSDC:4na:map:BINSET, INSDC:4na:map:CHARSET > ( out_4na_bin );
-
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  out_signal
-	 */
-
-	/* NCBI:tbl:dcmp_base_space inherited productions
-	 *  out_dcmp_2na_bin
-	 *  out_dcmp_4na_bin
-	 *  out_dcmp_x2na_bin
-	 *  out_dcmp_2na_packed
-	 */
-};
-
-
-
-
-/*--------------------------------------------------------------------------
- * color_space - implementation
- *  nucleotide sequences in color space
- */
-
-extern function
-INSDC:x2na:bin NCBI:dna_from_color #1 ( INSDC:x2cs:bin color_bin,
-     INSDC:coord:zero read_start, INSDC:coord:len read_len,
-     INSDC:dna:text cs_key, U8 color_matrix );
-
-
-/* dcmp_color_space
- *  declares common virtual productions
- */
-table NCBI:tbl:dcmp_color_space #1
-{
-    // rules to introduce purely virtual productions
-    // never expected to resolve...
-    INSDC:dna:text dcmp_virtual_productions
-        = out_dcmp_x2cs_bin
-        | out_dcmp_2cs_bin
-        | out_dcmp_2cs_packed;
-}
-
-/* history:
- *  1.0.1 - base explicitly upn sequence #1.0.1, spotdesc #1.0.1
- *  1.0.2 - spotdesc #1.0.2
- *  1.0.3 - base upon dcmp_color_space for "out_dcmp_2cs_bin"
- */
-table NCBI:tbl:color_space_common #1.0.3
-    = INSDC:tbl:sequence #1.0.1
-    , INSDC:SRA:tbl:spotdesc #1.0.2
-    , INSDC:SRA:tbl:stats #1.1.0
-    , NCBI:tbl:dcmp_color_space #1.0.0
-{
-    // cs_native - tells user color space is native
-    bool cs_native = < bool > echo < true > ();
-
-     // unambiguous unpacked 2cs
-    INSDC:2cs:bin out_2cs_bin
-        = out_dcmp_2cs_bin
-        | ( INSDC:2cs:bin ) unpack ( out_2cs_packed );
-
-     // unambiguous synthesized 2na
-    INSDC:2na:bin out_2na_bin
-        = < INSDC:x2na:bin, INSDC:2na:bin > map < INSDC:x2na:map:BINSET, [ 0, 1, 2, 3, 0 ] > ( out_x2na_bin );
-
-     // synthesized unpacked 4na
-    INSDC:4na:bin out_4na_bin
-        = < INSDC:x2na:bin, INSDC:4na:bin > map < INSDC:x2na:map:BINSET, [ 1, 2, 4, 8, 15 ] > ( out_x2na_bin );
-
-    // synthesized dna text
-    INSDC:dna:text out_dna_text
-        = < INSDC:x2na:bin, INSDC:dna:text > map < INSDC:x2na:map:BINSET, INSDC:x2na:map:CHARSET > ( out_x2na_bin );
-
-    // synthesized dna sequence
-    INSDC:x2na:bin out_x2na_bin
-        = NCBI:dna_from_color ( out_x2cs_bin, out_read_start, out_read_len, out_cs_key, out_color_matrix );
-
-    // synthesized packed 2na
-    INSDC:2na:packed out_2na_packed
-        = ( INSDC:2na:packed ) pack ( out_2na_bin );
-
-    // synthesized packed 4na
-    INSDC:4na:packed out_4na_packed
-        = ( INSDC:4na:packed ) pack ( out_4na_bin );
-
-    // synthesized color text
-    INSDC:color:text out_color_text
-        = < INSDC:x2cs:bin, INSDC:color:text > map <  INSDC:x2cs:map:BINSET, INSDC:x2cs:map:CHARSET > ( out_x2cs_bin );
-
-    // spot_len and fixed_spot_len
-    INSDC:coord:len color_space_spot_len
-        = ( INSDC:coord:len ) row_len ( out_2cs_packed );
-    INSDC:coord:len color_space_fixed_spot_len
-        = ( INSDC:coord:len ) fixed_row_len ( out_2cs_packed );
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  in_cs_key
-	 *  out_cs_key
-	 *  out_signal
-	 *  out_x2cs_bin
-	 *  in_color_text
-	 *  out_2cs_packed
-	 *  out_color_matrix
-	 */
-
-	/* INSDC:SRA:tbl:stats inherited productions
-	 *  in_stats_bin
-	 */
-
-	/* NCBI:tbl:dcmp_color_space inherited productions
-	 *  out_dcmp_2cs_bin
-	 *  out_dcmp_x2cs_bin
-	 *  out_dcmp_2cs_packed
-	 */
-};
-
-/* color_space_nocol
- *  this table describes viewing rules
- *  but omits writing rules and physical column description
- *  in order to support older tables
- *
- * history:
- *  1.0.1 - base explicitly upon color_space_common #1.0.1
- *  1.0.2 - color_space_common #1.0.2
- *  1.0.3 - color_space_common #1.0.3
- */
-table NCBI:tbl:color_space_nocol #1.0.3
-    = NCBI:tbl:color_space_common #1.0.3
-    , NCBI:tbl:n_encoding #1
-{
-    // incoming is disabled
-
-    // v1 color matrix was stored in metadata
-    U8 out_color_matrix
-        = < U8 > meta:read < "COLOR_MATRIX" > ()
-        | < U8 > echo < INSDC:color:default_matrix > ();
-
-    // unpacked 2cs with ambiguities
-    INSDC:x2cs:bin out_x2cs_bin
-        = ( INSDC:x2cs:bin ) read_ndecode;
-
-    // interface with n-encoded qualities
-    U8 read_unpack = out_2cs_bin;
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  out_cs_key
-	 *  out_signal
-	 *  out_2cs_packed
-	 */
-
-	/* NCBI:tbl:n_encoding inherited productions
-	 *  read_ndecode
-	 */
-};
-
-/* color_space #1
- *  this schema brings in .CSREAD and .CS_KEY columns for v1 tables
- *
- * history:
- *  1.0.1 - base explicitly upon color_space_nocol #1.0.1
- *  1.0.2 - color_space_nocol #1.0.2
- *  1.0.3 - color_space_nocol #1.0.3
- */
-table NCBI:tbl:color_space #1.0.3 = NCBI:tbl:color_space_nocol #1.0.3
-{
-    // stored as text
-    INSDC:dna:text out_cs_key = .CS_KEY;
-
-    // stored color sequence
-    INSDC:2cs:packed out_2cs_packed = .CSREAD;
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  out_signal
-	 */
-
-	/* NCBI:tbl:n_encoding inherited productions
-	 *  read_ndecode
-	 */
-};
-
-/* color_space #2
- *  standard current color-space table
- *
- * history:
- *  2.0.1 - base explicitly upon color_space_common #1.0.1
- *  2.0.2 - base explicitly upon color_space_common #1.0.2
- *  2.1.0 - introduce hooks for compressed color space
- */
-table NCBI:tbl:color_space #2.1
-    = NCBI:tbl:color_space_common #1.0.3
-    , NCBI:tbl:dcmp_color_space #1.0.0
-{
-    /* input rules
-     */
-
-    // input text is not modified
-    // illegal values are not detected here
-    INSDC:color:text in_color_text = CSREAD;
-
-    // input x2cs bin
-    // illegal values will be caught here
-    INSDC:x2cs:bin in_x2cs_bin
-        = < INSDC:x2cs:bin > range_validate < 0, 4 > ( CSREAD )
-        | < INSDC:color:text, INSDC:x2cs:bin > map < INSDC:x2cs:map:CHARSET, INSDC:x2cs:map:BINSET > ( in_color_text );
-
-    // input 2cs bin
-    INSDC:2cs:bin in_2cs_bin
-        = < INSDC:2cs:bin > range_validate < 0, 3 > ( CSREAD )
-        | ( INSDC:2cs:bin ) unpack ( in_2cs_packed )
-        | < INSDC:x2cs:bin, INSDC:2cs:bin > map < INSDC:x2cs:map:BINSET, [ 0, 1, 2, 3, 0 ] > ( in_x2cs_bin );
-
-    // input 2cs packed
-    INSDC:2cs:packed in_2cs_packed = CSREAD;
-
-    // input x2cs alt-csread ( ambiguity )
-    INSDC:x2cs:bin in_alt_x2cs_bin
-        = < INSDC:x2cs:bin, INSDC:x2cs:bin > map < INSDC:x2cs:map:BINSET, [ 0, 0, 0, 0, 4 ] > ( in_x2cs_bin );
-
-    // color-space keys ARE modified on input
-    INSDC:dna:text in_cs_key
-        = < INSDC:dna:text, INSDC:dna:text > map < 'acgt', 'ACGT' > ( CS_KEY );
-
-    // color matrix
-    U8 in_color_matrix = < U8 > range_validate < 0, 4 > ( COLOR_MATRIX );
-
-    // prepairing a feed into stats column
-    U8 in_stats_bin = in_2cs_bin;
-
-
-    /* physical columns
-     */
-
-    physical column INSDC:2cs:packed .CSREAD
-        = in_2cs_packed
-        | ( INSDC:2cs:packed ) pack ( in_2cs_bin );
-
-    physical column < INSDC:x2cs:bin > zip_encoding .ALTCSREAD
-        = < INSDC:x2cs:bin > trim < 0, 0 > ( in_alt_x2cs_bin );
-
-    physical column < INSDC:dna:text > zip_encoding .CS_KEY = in_cs_key;
-
-    physical column < U8 > zip_encoding .COLOR_MATRIX = in_color_matrix;
-
-
-    /* output rules
-     */
-
-    // output 2cs packed
-    INSDC:2cs:packed out_2cs_packed
-        = .CSREAD
-        | out_dcmp_2cs_packed;
-
-    // unpacked 2cs with ambiguity
-    INSDC:x2cs:bin out_x2cs_bin
-        = ( INSDC:x2cs:bin ) < U8 > bit_or < ALIGN_RIGHT > ( out_2cs_bin, .ALTCSREAD )
-        | out_dcmp_x2cs_bin
-        | ( INSDC:x2cs:bin ) out_2cs_bin;
-
-    // read directly from physical column
-    INSDC:dna:text out_cs_key = .CS_KEY;
-
-    // color matrix may be synthesized
-    U8 out_color_matrix
-        = .COLOR_MATRIX
-        | < U8 > echo < INSDC:color:default_matrix > ();
-
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  out_signal
-	 */
-
-	/* NCBI:tbl:dcmp_color_space inherited productions
-	 *  out_dcmp_2cs_bin
-	 *  out_dcmp_x2cs_bin
-	 *  out_dcmp_2cs_packed
-	 */
-};
-
-
-/*--------------------------------------------------------------------------
- * protein
- */
-table NCBI:tbl:protein #1 = INSDC:tbl:protein
-{
-    /* upper-case letters */
-    INSDC:protein:text in_protein_text = < INSDC:protein:text, INSDC:protein:text >
-        map < 'abcdefghijklmnopqrstvwxyzu','ABCDEFGHIJKLMNOPQRSTVWXYZU' > ( PROTEIN );
-
-    /* std aa */
-    INSDC:aa:bin in_aa_bin
-        = < INSDC:aa:bin > range_validate < 1, 27 > ( PROTEIN )
-        | < INSDC:protein:text, INSDC:aa:bin > map < INSDC:aa:map:CHARSET, INSDC:aa:map:BINSET > ( in_protein_text );
-
-    /* physical column */
-    physical column < INSDC:aa:bin > zip_encoding .PROTEIN = in_aa_bin;
-
-    /* output rules */
-    INSDC:aa:bin out_aa_bin = .PROTEIN;
-    INSDC:protein:text out_protein_text = < INSDC:aa:bin, INSDC:protein:text >
-        map < INSDC:aa:map:BINSET, INSDC:aa:map:CHARSET > ( out_aa_bin );
-};
-
-
-/*--------------------------------------------------------------------------
- * phred
- *  standard phred quality representation
- *  limits values on input to 1..63
- *  reserves value 0 as ambiguity symbol for reads
- */
-
-
-/* history:
- *  1.0.1 - base explicitly upon sequence #1.0.1
- */
-table NCBI:tbl:phred_quality_nocol #1.0.1 = INSDC:tbl:sequence #1.0.1, NCBI:tbl:n_encoding #1
-{
-    /* [CS]READ - decoding
-     */
-    U8 read_ndecode
-        = < INSDC:quality:phred, U8 > map < 0, 4 > ( out_qual_phred, read_unpack );
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  out_qual_phred
-	 *  out_qual_text_phred_33
-	 *  out_qual_text_phred_64
-	 */
-
-	/* NCBI:tbl:n_encoding inherited productions
-	 *  read_unpack
-	 */
-};
-
-/* history:
- *  1.0.1 - base explicitly upon phred_quality_nocol #1.0.1
- */
-table NCBI:tbl:phred_quality #1.0.1 = NCBI:tbl:phred_quality_nocol #1.0.1
-{
-    // read directly as n-encoded phred is compatible with phred
-    NCBI:quality:n_encoded:phred out_qual_phred = .QUALITY;
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  out_qual_text_phred_33
-	 *  out_qual_text_phred_64
-	 */
-
-	/* NCBI:tbl:n_encoding inherited productions
-	 *  read_unpack
-	 */
-};
-
-/* history:
- *  2.0.1 - added feed of in_stats_qual
- *  2.0.2 - added input of text encodings
- *  2.0.3 - base explicitly upon sequence #1.0.1
- *  2.0.4 - change compression from izip to zip
- *  2.0.5 - change from zip to delta_average_zip
- */
-table NCBI:tbl:phred_quality #2.0.4 = INSDC:tbl:sequence #1.0.1
-{
-    // read directly quality as  phred
-    INSDC:quality:phred out_qual_phred = .QUALITY;
-
-    // input rules
-    INSDC:quality:text:phred_33 in_qual_text_phred_33 = QUALITY;
-    INSDC:quality:text:phred_64 in_qual_text_phred_64 = QUALITY;
-
-    INSDC:quality:phred in_qual_phred
-        = QUALITY
-        | ( INSDC:quality:phred ) < B8 > diff < 33 > ( in_qual_text_phred_33 )
-        | ( INSDC:quality:phred ) < B8 > diff < 64 > ( in_qual_text_phred_64 );
-
-    // physical storage
-/*** next line is  for future change in production, but we have to wait until supporting code is released to the public ***/
-// physical column < INSDC:quality:phred > delta_average_zip_encoding .QUALITY = in_qual_phred;
-/*** NB *** MUST change table version to 2.0.5 and propagate to all derived tables ***/
-    physical column < INSDC:quality:phred > zip_encoding .QUALITY = in_qual_phred;
-
-    // feed to compressed statistics
-    INSDC:quality:phred in_stats_qual = in_qual_phred;
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  out_qual_text_phred_33
-	 *  out_qual_text_phred_64
-	 */
-};
-
-
-
-/*--------------------------------------------------------------------------
- * log_odds
- *  log-odds quality score support
- *
- *  conversion from log-odds to phred is via formula
- *    10 * log ( 1 + pow ( 10, x / 10 ) ) / log ( 10 ) + 0.499
- *  for x = -4..40 : when x = -5, phred = 0
- */
-
-// the map function requires two lookup tables:
-// the first table detects every legal value...
-const INSDC:quality:log_odds NCBI:quality:from:log_odds =
-[
-             -6,-5,-4,-3,-2,-1, 0,
-     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
-];
-
-// ...the second table gives positional translations
-const INSDC:quality:phred NCBI:quality:to:phred =
-[
-              0, 1, 1, 2, 2, 3, 3,
-     4, 4, 5, 5, 6, 7, 8, 9,10,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
-];
-
-function
-INSDC:quality:phred NCBI:log_odds_to_phred #1 ( INSDC:quality:log_odds qual_log_odds )
-{
-    // this range enforcement may not be required
-    INSDC:quality:log_odds log_odds_clip
-        = < INSDC:quality:log_odds > clip < -6, 40 > ( qual_log_odds );
-
-    // use the tables above to map from log-odds to phred
-    return < INSDC:quality:log_odds, INSDC:quality:phred >
-        map < NCBI:quality:from:log_odds, NCBI:quality:to:phred > ( log_odds_clip );
-}
-
-/* history:
- *  1.0.1 - base explicitly upon sequence #1.0.1
- */
-table NCBI:tbl:log_odds_quality_nocol #1.0.1 = INSDC:tbl:sequence #1.0.1, NCBI:tbl:n_encoding #1
-{
-    /* READ - decoding
-     */
-    U8 read_ndecode
-        = < INSDC:quality:log_odds, U8 > map < -6, 4 > ( out_qual_log_odds, read_unpack );
-
-    /* QUALITY
-     *  declared in INSDC:tbl:sequence as phred
-     *  introduce here as log-odds
-     */
-    extern column INSDC:quality:log_odds QUALITY = out_qual_log_odds;
-
-    // resolve for phred
-    INSDC:quality:phred out_qual_phred
-        = out_qual2_phred
-        | NCBI:log_odds_to_phred ( out_qual_log_odds );
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  out_qual_text_phred_33
-	 *  out_qual_text_phred_64
-	 */
-
-	/* NCBI:tbl:n_encoding inherited productions
-	 *  read_unpack
-	 */
-
-	/* NCBI:tbl:log_odds_quality_nocol productions
-	 *  out_qual2_phred
-	 *  out_qual_log_odds
-	 */
-};
-
-/* history:
- *  1.0.1 - base explicitly upon log_odds_quality_nocol #1.0.1
- */
-table NCBI:tbl:log_odds_quality #1.0.1 = NCBI:tbl:log_odds_quality_nocol #1.0.1
-{
-    // read directly as n-encoded log_odds is compatible with log_odds
-    NCBI:quality:n_encoded:log_odds out_qual_log_odds = .QUALITY;
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  out_qual_text_phred_33
-	 *  out_qual_text_phred_64
-	 */
-
-	/* NCBI:tbl:n_encoding inherited productions
-	 *  read_unpack
-	 */
-
-	/* NCBI:tbl:log_odds_quality_nocol inherited productions
-	 *  out_qual2_phred
-	 */
-};
-
-/* history:
- *  2.0.1 - base explicitly upon sequence #1.0.1
- *  2.1.0 - added production of in_qual_phred
- */
-table NCBI:tbl:log_odds_quality_nocol #2.1.0 = INSDC:tbl:sequence #1.0.1
-{
-    /* QUALITY
-     *  declared in INSDC:tbl:sequence as phred
-     *  introduce here as log-odds
-     */
-    extern column INSDC:quality:log_odds QUALITY
-        = out_qual_log_odds;
-
-    // resolve for phred
-    INSDC:quality:phred in_qual_phred
-        = NCBI:log_odds_to_phred ( in_qual_log_odds );
-
-    INSDC:quality:phred out_qual_phred
-        = NCBI:log_odds_to_phred ( out_qual_log_odds );
-
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  out_qual_text_phred_33
-	 *  out_qual_text_phred_64
-	 */
-
-	/* NCBI:tbl:log_odds_quality_nocol productions
-	 *  out_qual_log_odds
-	 */
-};
-
-/* history:
- *  2.0.1 - added feed of in_stats_qual
- *  2.0.2 - added input of text encodings
- *  2.0.3 - base explicitly upon log_odds_quality_nocol #2.0.1
- *  2.0.4 - changed compression from izip to zip
- *  2.1.0 - base explicitly upon log_odds_quality_nocol #2.1.0
- */
-table NCBI:tbl:log_odds_quality #2.1.0 = NCBI:tbl:log_odds_quality_nocol #2.1.0
-{
-    INSDC:quality:log_odds out_qual_log_odds= .QUALITY;
-
-    extern column INSDC:quality:text:log_odds_64 QUALITY
-        = out_qual_text_log_odds_64
-        | ( INSDC:quality:text:log_odds_64 ) < B8 > sum < 64 > ( out_qual_log_odds );
-
-    // input rules
-    INSDC:quality:text:log_odds_64 in_qual_text_log_odds_64 = QUALITY;
-
-    INSDC:quality:log_odds in_qual_log_odds
-        = QUALITY
-        | ( INSDC:quality:log_odds ) < B8 > diff < 64 > ( in_qual_text_log_odds_64 );
-
-    physical column < INSDC:quality:log_odds > zip_encoding .QUALITY
-        = in_qual_log_odds;
-
-    // feed to compressed statistics
-    INSDC:quality:log_odds in_stats_qual = in_qual_log_odds;
-
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  out_qual_text_phred_33
-	 *  out_qual_text_phred_64
-	 */
-
-	/* NCBI:tbl:log_odds_quality productions
-	 *  out_qual_text_log_odds_64
-	 */
-};
diff --git a/interfaces/ncbi/spotname.h b/interfaces/ncbi/spotname.h
deleted file mode 100644
index 9c7ee81..0000000
--- a/interfaces/ncbi/spotname.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ncbi_spotname_
-#define _h_ncbi_spotname_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*==========================================================================
- * NCBI Sequence Read Archive schema
- */
-
-
-/*--------------------------------------------------------------------------
- * types
- */
-
-/* spot_name_token
- *  a vector describing tokens recognized within a spot name
- *
- * COMPONENTS:
- *  0 - token id
- *  1 - token starting coordinate
- *  2 - token length
- */
-typedef uint16_t NCBI_SRA_spot_name_token [ 3 ];
-
-/* token values
- *
- *  tokens are produced by a schema-specific tokenizer function
- *  this function is purposely abstract because it may rely upon
- *  whatever information it needs to perform its task. the only
- *  requirement is that it produce these tokens as its output.
- *
- *  an empty name input must produce no tokens. in this case,
- *  there is no name to tokenize or data to produce.
- *
- *  a non-empty name must produce 1 or more tokens of output.
- *  all tokens must be ordered by starting character position.
- *
- *  if a name does not conform to any pattern recognized by the
- *  tokenizer, then the tokenizer emits a single token of "unrecognized"
- *
- *  if a name conforms to some pattern but does not have any
- *  substitution tokens, the tokenizer emits a single token of "recognized"
- *
- *  if a name may be tokenized, then the resulting tokens should
- *  describe only the portions of the string that should be removed
- *  from the name, e.g. "X" or "Y".
- *
- *  the standard coordinates "X".."L" are given in unsigned decimal.
- *  alternate representations are contained within their respective
- *  namespaces: "signed", "hex" and "octal".
- *
- *  the special coordinate "Q" represents the 454-specific encoding
- *  of X and Y into base-36, where the formula for Q is:
- *    Q = 4096 * X + Y
- *  and ASCII encoding:
- *    0..25 => "A-Z", 26..35 => "0-9"
- */
-enum
-{
-    NCBI_SRA_name_token_unrecognized =  1,
-    NCBI_SRA_name_token_recognized   =  2,
-    NCBI_SRA_name_token_Q            =  3,
-    NCBI_SRA_name_token_X            =  4,
-    NCBI_SRA_name_token_Y            =  5,
-    NCBI_SRA_name_token_T            =  6,
-    NCBI_SRA_name_token_L            =  7,
-    NCBI_SRA_name_token_signed_X     =  8,
-    NCBI_SRA_name_token_signed_Y     =  9,
-    NCBI_SRA_name_token_signed_T     = 10,
-    NCBI_SRA_name_token_signed_L     = 11,
-    NCBI_SRA_name_token_octal_X      = 12,
-    NCBI_SRA_name_token_octal_Y      = 13,
-    NCBI_SRA_name_token_octal_T      = 14,
-    NCBI_SRA_name_token_octal_L      = 15,
-    NCBI_SRA_name_token_hex_upper_X  = 16,
-    NCBI_SRA_name_token_hex_upper_Y  = 17,
-    NCBI_SRA_name_token_hex_upper_T  = 18,
-    NCBI_SRA_name_token_hex_upper_L  = 19,
-    NCBI_SRA_name_token_hex_lower_X  = 20,
-    NCBI_SRA_name_token_hex_lower_Y  = 21,
-    NCBI_SRA_name_token_hex_lower_T  = 22,
-    NCBI_SRA_name_token_hex_lower_L  = 23
-};
-
-
-/* token symbols
- *  when a name matches some pattern and tokens are recognized,
- *  the tokens are extracted from the name and sent to individual
- *  columns, and replaced with the symbols below to create a
- *  formatted name.
- */
-enum
-{
-    NCBI_SRA_name_symbol_Q           = 'Q',
-    NCBI_SRA_name_symbol_X           = 'X',
-    NCBI_SRA_name_symbol_Y           = 'Y',
-    NCBI_SRA_name_symbol_T           = 'T',
-    NCBI_SRA_name_symbol_L           = 'L',
-    NCBI_SRA_name_symbol_octal_X     = 'a',
-    NCBI_SRA_name_symbol_octal_Y     = 'b',
-    NCBI_SRA_name_symbol_octal_T     = 'c',
-    NCBI_SRA_name_symbol_octal_L     = 'd',
-    NCBI_SRA_name_symbol_hex_upper_X = 'e',
-    NCBI_SRA_name_symbol_hex_upper_Y = 'f',
-    NCBI_SRA_name_symbol_hex_upper_T = 'g',
-    NCBI_SRA_name_symbol_hex_upper_L = 'h',
-    NCBI_SRA_name_symbol_hex_lower_X = 'x',
-    NCBI_SRA_name_symbol_hex_lower_Y = 'y',
-    NCBI_SRA_name_symbol_hex_lower_T = 't',
-    NCBI_SRA_name_symbol_hex_lower_L = 'l'
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_ncbi_spotname_ */
diff --git a/interfaces/ncbi/spotname.vschema b/interfaces/ncbi/spotname.vschema
deleted file mode 100644
index 289f9c4..0000000
--- a/interfaces/ncbi/spotname.vschema
+++ /dev/null
@@ -1,377 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * NCBI Sequence Read Archive schema
- */
-version 1;
-
-include 'vdb/vdb.vschema';
-include 'insdc/sra.vschema';
-
-
-/*--------------------------------------------------------------------------
- * types
- */
-
-/* spot_name_token
- *  a vector describing tokens recognized within a spot name
- *
- * COMPONENTS:
- *  0 - token id
- *  1 - token starting coordinate
- *  2 - token length
- */
-alias text:token NCBI:SRA:spot_name_token;
-
-
-/* token values
- *
- *  tokens are produced by a schema-specific tokenizer function
- *  this function is purposely abstract because it may rely upon
- *  whatever information it needs to perform its task. the only
- *  requirement is that it produce these tokens as its output.
- *
- *  an empty name input must produce no tokens. in this case,
- *  there is no name to tokenize or data to produce.
- *
- *  a non-empty name must produce 1 or more tokens of output.
- *  all tokens must be ordered by starting character position.
- *
- *  if a name does not conform to any pattern recognized by the
- *  tokenizer, then the tokenizer emits a single token of "unrecognized"
- *
- *  if a name conforms to some pattern but does not have any
- *  substitution tokens, the tokenizer emits a single token of "recognized"
- *
- *  if a name may be tokenized, then the resulting tokens should
- *  describe only the portions of the string that should be removed
- *  from the name, e.g. "X" or "Y".
- *
- *  the standard coordinates "X".."L" are given in unsigned decimal.
- *  alternate representations are contained within their respective
- *  namespaces: "signed", "hex" and "octal".
- *
- *  the special coordinate "Q" represents the 454-specific encoding
- *  of X and Y into base-36, where the formula for Q is:
- *    Q = 4096 * X + Y
- *  and ASCII encoding:
- *    0..25 => "A-Z", 26..35 => "0-9"
- */
-const U16 NCBI:SRA:name_token:unrecognized =  1;
-const U16 NCBI:SRA:name_token:recognized   =  2;
-const U16 NCBI:SRA:name_token:Q            =  3;
-const U16 NCBI:SRA:name_token:X            =  4;
-const U16 NCBI:SRA:name_token:Y            =  5;
-const U16 NCBI:SRA:name_token:T            =  6;
-const U16 NCBI:SRA:name_token:L            =  7;
-const U16 NCBI:SRA:name_token:signed:X     =  8;
-const U16 NCBI:SRA:name_token:signed:Y     =  9;
-const U16 NCBI:SRA:name_token:signed:T     = 10;
-const U16 NCBI:SRA:name_token:signed:L     = 11;
-const U16 NCBI:SRA:name_token:octal:X      = 12;
-const U16 NCBI:SRA:name_token:octal:Y      = 13;
-const U16 NCBI:SRA:name_token:octal:T      = 14;
-const U16 NCBI:SRA:name_token:octal:L      = 15;
-const U16 NCBI:SRA:name_token:hex:upper:X  = 16;
-const U16 NCBI:SRA:name_token:hex:upper:Y  = 17;
-const U16 NCBI:SRA:name_token:hex:upper:T  = 18;
-const U16 NCBI:SRA:name_token:hex:upper:L  = 19;
-const U16 NCBI:SRA:name_token:hex:lower:X  = 20;
-const U16 NCBI:SRA:name_token:hex:lower:Y  = 21;
-const U16 NCBI:SRA:name_token:hex:lower:T  = 22;
-const U16 NCBI:SRA:name_token:hex:lower:L  = 23;
-
-
-/* token symbols
- *  when a name matches some pattern and tokens are recognized,
- *  the tokens are extracted from the name and sent to individual
- *  columns, and replaced with the symbols below to create a
- *  formatted name.
- */
-const ascii NCBI:SRA:name_symbol:Q           = '$Q';
-const ascii NCBI:SRA:name_symbol:X           = '$X';
-const ascii NCBI:SRA:name_symbol:Y           = '$Y';
-const ascii NCBI:SRA:name_symbol:T           = '$T';
-const ascii NCBI:SRA:name_symbol:L           = '$L';
-const ascii NCBI:SRA:name_symbol:octal:X     = '$a';
-const ascii NCBI:SRA:name_symbol:octal:Y     = '$b';
-const ascii NCBI:SRA:name_symbol:octal:T     = '$c';
-const ascii NCBI:SRA:name_symbol:octal:L     = '$d';
-const ascii NCBI:SRA:name_symbol:hex:upper:X = '$e';
-const ascii NCBI:SRA:name_symbol:hex:upper:Y = '$f';
-const ascii NCBI:SRA:name_symbol:hex:upper:T = '$g';
-const ascii NCBI:SRA:name_symbol:hex:upper:L = '$h';
-const ascii NCBI:SRA:name_symbol:hex:lower:X = '$x';
-const ascii NCBI:SRA:name_symbol:hex:lower:Y = '$y';
-const ascii NCBI:SRA:name_symbol:hex:lower:T = '$t';
-const ascii NCBI:SRA:name_symbol:hex:lower:L = '$l';
-
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-/* extract_spot_name
- *  generates input to .SPOT_NAME column
- *
- *  on NCBI:SRA:name_token:unrecognized, produces the entire spot name row
- *  otherwise, produces an empty row
- *
- *  "name" [ DATA ] - raw spot names from NAME column
- *
- *  "tok" [ DATA ] - delimiting tokens produced by sub-table
- */
-function ascii
-    NCBI:SRA:extract_spot_name #1 ( ascii name, NCBI:SRA:spot_name_token tok );
-
-
-/* extract_name_fmt
- *  generates input to .NAME_FMT column and/or updates skey index
- *
- *  on NCBI:SRA:name_token:unrecognized, produces an empty row
- *  otherwise, it creates a temporary "name_fmt" string from name row
- *
- *  an attempt is made to insert name_fmt into indicated text index
- *  ( normally 'skey' ). if the insert succeeds, i.e. associates "name_fmt"
- *  with a row_id, then the output for the row is empty.
- *
- *  if the insert fails due to key duplication, an attempt is made to
- *  extend the id range of associated rows. depending upon the type of index,
- *  this may succeed or fail, e.g. if the existing row range for "name_fmt" is
- *  n..m where m = row_id - 1, the range can be extended to n..row_id and
- *  the update succeeds. if the index supports discontiguous id ranges, the
- *  update will also succeed. upon any success updating the index, the output
- *  row will be empty.
- *
- *  finally, if the temporary "name_fmt" cannot be inserted into the index
- *  nor the existing id range updated, the output for the row will be "name_fmt".
- *
- *  "name" [ DATA ] - raw spot names from NAME column
- *
- *  "tok" [ DATA ] - delimiting tokens produced by sub-table
- */
-function ascii
-    NCBI:SRA:extract_name_fmt #1 < ascii idx > ( ascii name, NCBI:SRA:spot_name_token tok );
-
-
-/* extract_name_coord
- *  generates inputs to .X and .Y and possibly other columns
- *
- *  if no tokens match "coord"constant, produces an empty row
- *  otherwise, produces binary coordinate value
- *  if multiple tokens match criteria, all values must be equivalent
- *  because only a single value will be output per row
- *
- *  "coord" [ CONST ] - either NCBI:SRA:name_token:X or NCBI:SRA:name_token:Y
- *  both of these values also match the token NCBI:SRA:name_token:Q and extract
- *  contents appropriately.
- *
- *  "name" [ DATA ] - raw spot names from NAME column
- *
- *  "tok" [ DATA ] - delimiting tokens produced by sub-table
- */
-function INSDC:coord:val
-    NCBI:SRA:extract_name_coord #1 < U16 coord > ( ascii name, NCBI:SRA:spot_name_token tok );
-
-
-/* lookup
- */
-function INSDC:SRA:spot_ids_found NCBI:SRA:lookup #1.0
-    < ascii index_name, ascii query_by_name, U8 name_fmt_version > ( * ascii name_prefix );
-
-
-/*--------------------------------------------------------------------------
- * spotcoord
- *  spot coordinate table implementation
- */
-table NCBI:SRA:tbl:spotcoord #1 = INSDC:SRA:tbl:spotcoord #1
-{
-    // X and Y stored as I32
-    INSDC:coord:val out_x_coord = .X;
-    INSDC:coord:val out_y_coord = .Y;
-
-    // T and L are usually present but optional
-    INSDC:coord:val out_t_coord = .T;
-    INSDC:coord:val out_l_coord = .L;
-
-    // .X, .Y, .T and .L get either empty coordinate or proper coordinate
-    physical column < INSDC:coord:val > izip_encoding .X
-        = in_x_coord
-        | in_name_x_coord;
-    physical column < INSDC:coord:val > izip_encoding .Y
-        = in_y_coord
-        | in_name_y_coord;
-    physical column < INSDC:coord:val > izip_encoding .T
-        = in_t_coord
-        | in_name_t_coord;
-    physical column < INSDC:coord:val > izip_encoding .L
-        = in_l_coord
-        | in_name_l_coord;
-};
-
-
-/*--------------------------------------------------------------------------
- * skeyname
- *  spot name table implementation built upon prefix-tree skey index
- *
- * v1 - maintains a 1->1 key=>spot_id relationship
- *      with unique constraint on key. it does NOT
- *      implement name_fmt or x_coord or y_coord.
- *
- * v2 - maintains a 1->1 key=>spot_id-range relationship
- *      with unique constraint on key. it does NOT
- *      implement spot_name. X and Y are stored using
- *      16-bit unsigned quantities.
- *
- * v3 - maintains a flexible naming approach
- *      retrieves name directly from column if so stored
- *      synthesizes name from name_fmt, X and Y otherwise
- *      name_fmt is either retrieved directly from column
- *      or from skey index. X and Y are stored as 32-bit
- *      signed quantities.
- *
- * history:
- *  1.0.1 - explicitly account for spotname #1.0.1 ancestry
- *  2.0.1 - " "
- *  3.0.1 - moved .X and .Y to spotcoord table
- */
-table NCBI:SRA:tbl:skeyname #1.0.1 = INSDC:SRA:tbl:spotname #1.0.1
-{
-    // read the skey entry
-    ascii out_skey = ( ascii ) idx:text:project #1.0 < 'skey' > ();
-
-    // spot_name
-    ascii out_spot_name
-        = rewritten_spot_name
-        | out_skey;
-
-    // search skey entry
-    INSDC:SRA:spot_ids_found spot_ids_found
-        = ( INSDC:SRA:spot_ids_found ) NCBI:SRA:lookup #1 < 'skey' , 'QUERY_BY_NAME', 1 > ( out_slx_prefix ) 
-        | ( INSDC:SRA:spot_ids_found ) NCBI:SRA:lookup #1 < 'skey' , 'QUERY_BY_NAME', 0 > ();
-
-
-	/* INSDC:SRA:tbl:spotname inherited productions
-	 *  out_x_coord
-	 *  out_y_coord
-	 *  out_name_fmt
-	 */
-
-	/* NCBI:SRA:tbl:skeyname productions
-	 *  out_slx_prefix
-	 *  rewritten_spot_name
-	 */
-};
-
-table NCBI:SRA:tbl:skeyname_nocol #2.0.1 = INSDC:SRA:tbl:spotname #1.0.1
-{
-    // name_fmt
-    //  perform reverse lookup through index to get key
-    ascii out_name_fmt = ( ascii ) idx:text:project #1.0 < 'skey' > ();
-
-    // search skey entry
-    INSDC:SRA:spot_ids_found spot_ids_found
-        = ( INSDC:SRA:spot_ids_found ) NCBI:SRA:lookup #1 < 'skey' , 'QUERY_BY_NAME', 2 > ( out_slx_prefix ) 
-        | ( INSDC:SRA:spot_ids_found ) NCBI:SRA:lookup #1 < 'skey' , 'QUERY_BY_NAME', 2 > ();
-
-    // X and Y stored as U16
-    INSDC:coord:val out_x_coord = cast ( .X );
-    INSDC:coord:val out_y_coord = cast ( .Y );
-
-
-	/* NCBI:SRA:tbl:skeyname_nocol virtual productions
-	 *  out_slx_prefix
-	 */
-};
-
-table NCBI:SRA:tbl:skeyname #2.0.1 = NCBI:SRA:tbl:skeyname_nocol #2.0.1
-{
-    // spot_name_tok comes from a platform-specific tokenizer
-    // and must be of type 'NCBI:SRA:spot_name_token'
-    physical column < INSDC:coord:val > izip_encoding #1 .X
-        = NCBI:SRA:extract_name_coord < NCBI:SRA:name_token:X > ( NAME, in_spot_name_tok );
-    physical column < INSDC:coord:val > izip_encoding .Y
-        = NCBI:SRA:extract_name_coord < NCBI:SRA:name_token:Y > ( NAME, in_spot_name_tok );
-
-	/* NCBI:SRA:tbl:skeyname_nocol inherited virtual productions
-	 *  out_slx_prefix
-	 */
-
-	/* NCBI:SRA:tbl:skeyname virtual productions
-	 *  in_spot_name_tok
-	 */
-};
-
-table NCBI:SRA:tbl:skeyname #3.0.1 = INSDC:SRA:tbl:spotname #1.0.1, NCBI:SRA:tbl:spotcoord #1
-{
-    // spot_name
-    //  retrieve from hard column
-    ascii out_spot_name = .SPOT_NAME;
-
-    // name_fmt
-    //  retrieve from hard column or reverse lookup through index
-    ascii out_name_fmt = ( ascii ) idx:text:project #1.0 < 'skey' > ( .NAME_FMT );
-
-    INSDC:SRA:spot_ids_found  spot_ids_found
-        = ( INSDC:SRA:spot_ids_found ) NCBI:SRA:lookup #1 < 'skey' , 'QUERY_BY_NAME', 2 > ();
-
-
-    /* encoding rules
-     *  the sub-table will provide a platform-specific parser that
-     *  produces as its output a series of NCBI:SRA:spot_name_token
-     *  for each input row in the virtual production "spot_name_tok"
-     *
-     *  the tokenizer will look for X, Y or Q (combined) coordinates
-     *  within the spot name and issue tokens when found, or in the
-     *  case that none are found, an "unrecognized" token is issued.
-     *
-     *  the tokens are then processed here by common rules
-     */
-
-    // .SPOT_NAME gets either empty strings or unrecognized strings
-    physical column < ascii > zip_encoding .SPOT_NAME
-        = NCBI:SRA:extract_spot_name ( NAME, in_spot_name_tok );
-
-    // .NAME_FMT gets either empty strings or unindexed but recognized strings
-    physical column < ascii > zip_encoding .NAME_FMT
-        = NCBI:SRA:extract_name_fmt < 'skey' > ( NAME, in_spot_name_tok );
-
-    // .X, .Y, .T and .L get either empty coordinate or proper coordinate
-    INSDC:coord:val in_name_x_coord
-        = NCBI:SRA:extract_name_coord < NCBI:SRA:name_token:X > ( NAME, in_spot_name_tok );
-    INSDC:coord:val in_name_y_coord
-        = NCBI:SRA:extract_name_coord < NCBI:SRA:name_token:Y > ( NAME, in_spot_name_tok );
-    INSDC:coord:val in_name_t_coord
-        = NCBI:SRA:extract_name_coord < NCBI:SRA:name_token:T > ( NAME, in_spot_name_tok );
-    INSDC:coord:val in_name_l_coord
-        = NCBI:SRA:extract_name_coord < NCBI:SRA:name_token:L > ( NAME, in_spot_name_tok );
-
-
-	/* NCBI:SRA:tbl:skeyname virtual productions
-	 *  in_spot_name_tok
-	 */
-};
diff --git a/interfaces/ncbi/sra.vschema b/interfaces/ncbi/sra.vschema
deleted file mode 100644
index 2ad8f94..0000000
--- a/interfaces/ncbi/sra.vschema
+++ /dev/null
@@ -1,758 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * NCBI Sequence Read Archive schema
- */
-version 1;
-
-include 'vdb/vdb.vschema';
-include 'ncbi/seq.vschema';
-include 'ncbi/spotname.vschema';
-include 'insdc/sra.vschema';
-include 'ncbi/stats.vschema';
-
-
-/*--------------------------------------------------------------------------
- * types
- */
-
-
-/* Segment - DEPRECATED
- *  a ( start, len ) pair where start is a zero-based, unsigned coordinate
- */
-typedef U16 NCBI:SRA:Segment [ 2 ];
-
-
-/* SpotDesc - DEPRECATED
- *   uint16_t spot_len;
- *   uint16_t fixed_len;
- *   uint16_t signal_len;
- *   uint16_t clip_qual_right;
- *   uint8_t num_reads;
- *   uint8_t align [ 7 ];
- */
-typedef B8 NCBI:SRA:SpotDesc [ 16 ];
-
-
-/* ReadDesc - DEPRECATED
- *   SRASegment { uint16_t start, len; } seg;
- *   uint8_t type;
- *   char cs_key;
- *   char label [ 74 ];
- */
-typedef B8 NCBI:SRA:ReadDesc [ 80 ];
-
-
-// some types have been moved to INSDC
-alias INSDC:SRA:platform_id NCBI:SRA:platform_id;
-alias INSDC:SRA:read_type NCBI:SRA:read_type;
-alias INSDC:SRA:read_filter NCBI:SRA:read_filter;
-
-typedef NCBI:fsamp4 NCBI:SRA:rotated_fsamp4, NCBI:SRA:swapped_fsamp4;
-
-// 16-bit POSITION type
-typedef U16 NCBI:SRA:pos16;
-
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-/* bio_start
- *  searches through read_type vector
- *  returns the 0-based starting coordinate of first biological read
- *
- *  "read_start" [ DATA ] - vector of read start coordinates
- *
- *  "read_type" [ DATA ] - vector of read types
- */
-extern function INSDC:coord:zero
-    NCBI:SRA:bio_start #1 ( INSDC:coord:zero read_start, INSDC:SRA:xread_type read_type );
-
-
-/* bio_end
- *  searcehes through read_type vector
- *  returns the 0 based ending coording (either inclusive or exclusive) of last
- *  biological read
- *
- *  "read_start" [ DATA ] - vector of read start coordinates
- *
- *  "read_type" [ DATA ] - vector of read types
- *
- *  "read_len" [ DATA ] - vector of read lengths
- */
-extern function INSDC:coord:zero
-    NCBI:SRA:bio_end #1 < bool inclusive > ( INSDC:coord:zero read_start, INSDC:SRA:xread_type read_type, INSDC:coord:len read_len );
-
-
-/* fix_read_seg
- */
-extern function INSDC:coord:len [ 2 ]
-    NCBI:SRA:fix_read_seg #1 ( U16 [ 2 ] rd_seg, INSDC:coord:len spot_len );
-
-
-/* make_spot_desc
- *  assembles several bits of information together into a "C" structure
- *
- *  "spot_len" [ DATA ] - computed spot length value
- *
- *  "fixed_len" [ DATA, DFLT ZERO ] - the stated fixed length of all spots
- *  or zero if not fixed length
- *
- *  "sig_len" [ DATA, DFLT ZERO ] - the length of signal/intensity data
- *  or zero if not present
- *
- *  "trim_start" [ DATA ] - the first base included in the trim segment
- *
- *  "trim_len" [ DATA ] - the length of the trim segment
- *
- *  "num_reads" [ DATA ] - 1..n value
- */
-extern function NCBI:SRA:SpotDesc NCBI:SRA:make_spot_desc #1 ( INSDC:coord:len spot_len,
-    INSDC:coord:len fixed_len,  INSDC:coord:len sig_len, INSDC:coord:zero trim_start,
-    INSDC:coord:len trim_len, U8 num_reads );
-
-
-/* make_read_desc
- *  assembles several bits of information together into a "C" structure
- *  in theory resultant segments may intersect other read segments or leave holes in spot.
- *
- *  "num_reads" [ DATA ] - value indicating the resulting row-length of output
- *
- *  "read_start" [ DATA ] - ordered starting coordinates for each read
- *  not required to be sequential.
- *
- *  "read_len" [ DATA ] - ordered lengths of each read. may be zero when
- *  read has been described but is not identified in spot.
- *
- *  "read_type" [ DATA ] - ordered type id describing each read
- *
- *  "read_filt" [ DATA ] - ordered read filters
- *
- *  "cs_key" [ DATA ] - ordered color-space keys
- *
- *  "label_start" [ DATA ] - ordered starting coordinates for each label
- *  "label_len" [ DATA ] - ordered lengths of each label
- *
- *  "label" [ DATA ] - complete sequence of label characters, possibly empty
- *  individual read labels are identified as {start,len} pairs
- */
-extern function NCBI:SRA:ReadDesc NCBI:SRA:make_read_desc #1 ( U8 num_reads,
-    INSDC:coord:zero read_start, INSDC:coord:len read_len, INSDC:SRA:xread_type read_type,
-    INSDC:SRA:read_filter read_filt, INSDC:dna:text cs_key,
-    INSDC:coord:zero label_start, INSDC:coord:len label_len, ascii label );
-
-
-/* rotate
- *  rotate a quadruple by called base
- *  now normally replaced by swap
- *
- *  "T" [ TYPE ] - element type of quadruple to be rotated
- *
- *  "encoding" [ CONST ] - when true, rotate input left until corresponding
- *  element is in slot 0. when false, rotate input right to restore original
- *  order.
- *
- *  "in" [ DATA ] - data to be rotated, qualities, signal, intensities...
- *
- *  "called" [ DATA ] - {0..3} or {0..4} binary representation of called bases or colors
- */
-extern function < type T >
-T NCBI:SRA:rotate #1 < bool encoding > ( T in, U8 called );
-
-
-/* swap
- *  swap element 0 and the called element
- *  used to ensure that the called element is in slot 0
- *
- *  "T" [ TYPE ] - element type of quadruple to be swapped
- *
- *  "in" [ DATA ] - data to be swapped, qualities, signal, intensities...
- *
- *  "called" [ DATA ] - {0..3} or {0..4} binary representation of called bases or colors
- */
-extern function < type T >
-T NCBI:SRA:swap #1 ( T in, U8 called );
-
-
-/* normalize
- * denormalize
- *
- *  "T" [ TYPE ] - element type of quadruple to be [de]normalized
- *
- *  "intensity" [ DATA ] - intensity data
- *
- *  "called" [ DATA ] - {0..3} or {0..4} binary representation of called bases or colors
- */
-extern function < type T >
-T NCBI:SRA:normalize #1 ( T intensity, U8 called );
-
-extern function < type T >
-T NCBI:SRA:denormalize #1 ( T intensity, U8 called );
-
-
-/* make_position
- *  return a synthesized position row with 1-1 correspondence
- *
- *  "T" [ TYPE ] - position type being generated
- *
- *  "start" [ CONST ] - either 0 or 1, depending upon the coordinate system
- *
- *  "bases" [ DATA ] - the actual row of bases. the output row
- *  will be the same length, but with synthesized data
- */
-extern function < type T >
-T NCBI:SRA:make_position #1 < T start > ( any bases );
-
-/* fsamp4 compression
- *  performs compression individually
- *  on called channel and alternate channels
- */
-function NCBI:SRA:swapped_fsamp4 NCBI:SRA:fsamp4:decode #2 ( merged_fmt in )
-{
-    fzip_fmt cmp0 = split < 0 > ( in );
-    fzip_fmt cmp123 = split < 1 > ( in );
-    F32 ch0 = funzip ( cmp0 );
-    F32 ch123a = funzip ( cmp123 );
-    F32[3] ch123 = redimension ( ch123a );
-    return ( NCBI:SRA:swapped_fsamp4 ) < F32 > paste ( ch0, ch123 );
-}
-
-function merged_fmt NCBI:SRA:fsamp4:encode #2 < U32 called, U32 alt > ( NCBI:SRA:swapped_fsamp4 in )
-{
-    F32 ch0 = < F32 > cut < 0 > ( in );
-    F32[3] ch123 = < F32 > cut < 1, 2, 3 > ( in );
-    fzip_fmt cmp0 = fzip < called > ( ch0 );
-    F32 ch123a = redimension ( ch123 );
-    fzip_fmt cmp123 = fzip < alt > ( ch123a );
-    return merge ( cmp0, cmp123 );
-}
-
-
-/*--------------------------------------------------------------------------
- * spotdesc
- *  NCBI implementation productions
- */
-
-/* history:
- *  1.0.1 - base explicitly upon sequence #1.0.1, spotdesc #1.0.1
- *  1.0.2 - spotdesc #1.0.2
- */
-table NCBI:SRA:tbl:spotdesc_nocol #1.0.2 = INSDC:tbl:sequence #1.0.1, INSDC:SRA:tbl:spotdesc #1.0.2
-{
-    /* LABEL_SEG
-     */
-    readonly column NCBI:SRA:Segment LABEL_SEG
-        = out_label_seg
-        | cast ( out_label_seg32 )
-        | cast ( _out_label_seg32 );
-    U32 _out_label_startU32 = ( U32 ) out_label_start;
-    U32 [ 2 ] _out_label_seg32 = < U32 > paste ( _out_label_startU32, out_label_len );
-
-
-    /* READ_SEG
-     */
-    readonly column NCBI:SRA:Segment READ_SEG
-        = out_read_seg
-        | cast ( out_read_seg32 )
-        | cast ( _out_read_seg32 );
-    U32 _out_read_startU32 = ( U32 ) out_read_start;
-    U32 [ 2 ] _out_read_seg32 = < U32 > paste ( _out_read_startU32, out_read_len );
-
-
-    /* READ_DESC
-     */
-    readonly column NCBI:SRA:ReadDesc READ_DESC
-        = NCBI:SRA:make_read_desc ( out_nreads, out_read_start, out_read_len,
-              out_read_type, _out_rd_filter, out_cs_key, _out_label_start, _out_label_len, _out_label );
-    INSDC:SRA:read_filter _out_rd_filter
-        = out_rd_filter
-        | < INSDC:SRA:read_filter > echo < SRA_READ_FILTER_PASS > ( out_read_start );
-    ascii _out_label
-        = out_label
-        | < ascii > echo < '' > ();
-    INSDC:coord:zero _out_label_start
-        = out_label_start
-        | < INSDC:coord:zero > echo < 0 > ( out_read_start );
-    INSDC:coord:len _out_label_len
-        = out_label_len
-        | < INSDC:coord:len > echo < 0 > ( out_read_start );
-
-    /* SPOT_DESC
-     */
-    readonly column NCBI:SRA:SpotDesc SPOT_DESC
-        = NCBI:SRA:make_spot_desc ( spot_len, fixed_spot_len, signal_len,
-              trim_start, trim_len, out_nreads );
-
-    /* SIGNAL_LEN
-     *  normally the same as spot length when present,
-     *  but in some cases ( e.g. 454 ) it may be different
-     */
-    readonly column INSDC:coord:len SIGNAL_LEN
-        = signal_len;
-    readonly column U16 SIGNAL_LEN
-        = cast ( signal_len );
-
-
-	/* INSDC:SRA:tbl:spotdesc inherited productions
-	 *  trim_len
-	 *  out_label
-	 *  out_nreads
-	 *  trim_start
-	 *  out_read_len
-	 *  out_label_len
-	 *  out_rd_filter
-	 *  out_read_type
-	 *  out_read_start
-	 *  out_label_start
-	 *  static_fixed_spot_len
-	 */
-
-	/* NCBI:SRA:tbl:spotdesc_nocol productions
-	 *  out_read_seg
-	 *  out_label_seg
-	 *  out_read_seg32
-	 *  out_label_seg32
-	 */
-};
-
-/* history:
- *  1.0.1 - base explicitly upon spotdesc_nocol #1.0.1
- *  1.0.2 - base explicitly upon spotdesc_nocol #1.0.2
- */
-table NCBI:SRA:tbl:spotdesc_nophys #1.0.2 = NCBI:SRA:tbl:spotdesc_nocol #1.0.2
-{
-    // resolve virtual productions
-    U8 out_nreads = .NREADS; 
-    ascii out_label = .LABEL;
-    INSDC:SRA:xread_type out_read_type = .READ_TYPE;
-    INSDC:SRA:read_filter out_rd_filter  = .RD_FILTER;
-
-    INSDC:coord:zero out_label_start
-        = .LABEL_START
-        | ( INSDC:coord:zero ) < U32 > cut < 0 > ( out_label_seg32 );
-    INSDC:coord:len out_label_len
-        = .LABEL_LEN
-        | ( INSDC:coord:len ) < U32 > cut < 1 > ( out_label_seg32 );
-    U32 [ 2 ] out_label_seg32
-        = cast ( .LABEL_SEG );
-
-    INSDC:coord:zero out_read_start
-        = .READ_START
-        | ( INSDC:coord:zero ) < U32 > cut < 0 > ( out_read_seg32 );
-    INSDC:coord:len out_read_len
-        = .READ_LEN
-        | ( INSDC:coord:len ) < U32 > cut < 1 > ( out_read_seg32 );
-    U32 [ 2 ] out_read_seg32
-        = NCBI:SRA:fix_read_seg ( .READ_SEG, spot_len );
-
-
-	/* INSDC:SRA:tbl:spotdesc inherited productions
-	 *  trim_len
-	 *  trim_start
-	 *  out_read_type
-	 *  static_fixed_spot_len
-	 */
-
-	/* NCBI:SRA:tbl:spotdesc_nocol inherited productions
-	 *  out_read_seg
-	 *  out_label_seg
-	 */
-
-	/* NCBI:SRA:tbl:spotdesc_nophys productions
-	 *  .LABEL
-	 *  .NREADS
-	 *  .READ_LEN
-	 *  .READ_SEG
-	 *  .LABEL_LEN
-	 *  .LABEL_SEG
-	 *  .RD_FILTER
-	 *  .READ_TYPE
-	 *  .READ_START
-	 *  .LABEL_START
-	 */
-}
-
-/* history:
- *  1.0.1 - base explicitly upon spotdesc_nophys #1.0.1
- *  1.0.2 - base explicitly upon spotdesc_nophys #1.0.2
- */
-table NCBI:SRA:tbl:spotdesc #1.0.2 = NCBI:SRA:tbl:spotdesc_nophys #1.0.2
-{
-    // physical column encodings
-    // TBD - this has to be looked at, where dynamic segmentation is involved
-    physical column < U8 > zip_encoding .NREADS = NREADS;
-    physical column < ascii > zip_encoding .LABEL = LABEL;
-    physical column < INSDC:coord:zero > izip_encoding .LABEL_START = LABEL_START;
-    physical column < INSDC:coord:len > izip_encoding .LABEL_LEN = LABEL_LEN;
-    physical column < INSDC:coord:zero > izip_encoding .READ_START = READ_START;
-    physical column < INSDC:coord:len > izip_encoding .READ_LEN = in_read_len;
-    physical column < INSDC:SRA:xread_type > zip_encoding .READ_TYPE = in_read_type;
-    physical column < INSDC:SRA:read_filter > zip_encoding .RD_FILTER = READ_FILTER;
-
-
-	/* INSDC:SRA:tbl:spotdesc inherited productions
-	 *  trim_len
-	 *  trim_start
-	 *  out_read_type
-	 *  static_fixed_spot_len
-	 */
-
-	/* NCBI:SRA:tbl:spotdesc_nocol inherited productions
-	 *  out_read_seg
-	 *  out_label_seg
-	 */
-};
-
-
-/*--------------------------------------------------------------------------
- * pos
- *  synthetic POSITION column on read
- *
- * history:
- *  1.0.1 - base explicitly upon sequence #1.0.1
- */
-
-table NCBI:SRA:tbl:pos #1.0.1 = INSDC:tbl:sequence #1.0.1
-{
-    INSDC:position:one out_position
-        = < INSDC:position:one > NCBI:SRA:make_position < 1 > ( out_2na_packed )
-        | < INSDC:position:one > NCBI:SRA:make_position < 1 > ( out_2cs_packed );
-    NCBI:SRA:pos16 out_position16
-        = < NCBI:SRA:pos16 > NCBI:SRA:make_position < 1 > ( out_2na_packed )
-        | < NCBI:SRA:pos16 > NCBI:SRA:make_position < 1 > ( out_2cs_packed );
-};
-
-
-/*--------------------------------------------------------------------------
- * sra
- *  the NCBI SRA table
- */
-
-/* history:
- *  1.0.1 - base explicitly upon sra #1.0.1
- *  1.0.2 - base explicitly upon sra #1.0.2, spotdesc_nocol #1.0.1
- *  1.0.3 - base explicitly upon sra #1.0.3, spotdesc_nocol #1.0.2
- */
-table NCBI:SRA:tbl:sra_nopos #1.0.3 = INSDC:SRA:tbl:sra #1.0.3, NCBI:SRA:tbl:spotdesc_nocol #1.0.2
-{
-    // v1 declares the POSITION column for all tables
-    // but leaves all physical columns unstated
-
-    /* POSITION
-     *  1-based coordinates
-     *  describes a base's position on signal
-     */
-    column INSDC:position:one POSITION = out_position;
-    readonly column NCBI:SRA:pos16 POSITION = out_position16;
-
-    // zero-based coordinates available upon request
-    readonly column INSDC:position:zero POSITION
-        = ( INSDC:position:zero ) < I32 > diff < 1 > ( out_position );
-
-    // statistics
-    U64 base_count
-        = < U64 > meta:value < "BASE_COUNT" > ();
-    U64 spot_count
-        = < U64 > meta:value < ".seq/spot" > ()
-        | < U64 > meta:value < ".seq" > () ;
-
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  cs_native
-	 *  in_cs_key
-	 *  out_cs_key
-	 *  out_signal
-	 *  in_dna_text
-	 *  out_2cs_bin
-	 *  out_2na_bin
-	 *  out_4na_bin
-	 *  out_dna_text
-	 *  out_x2cs_bin
-	 *  out_x2na_bin
-	 *  in_color_text
-	 *  out_2cs_packed
-	 *  out_2na_packed
-	 *  out_4na_packed
-	 *  out_color_text
-	 *  out_qual_phred
-	 *  out_color_matrix
-	 */
-
-	/* INSDC:SRA:tbl:spotname inherited productions
-	 *  out_x_coord
-	 *  out_y_coord
-	 *  out_name_fmt
-	 *  out_spot_name
-	 *  spot_ids_found
-	 */
-
-	/* INSDC:SRA:tbl:spotdesc inherited productions
-	 *  trim_len
-	 *  out_label
-	 *  out_nreads
-	 *  trim_start
-	 *  out_read_len
-	 *  out_label_len
-	 *  out_rd_filter
-	 *  out_read_type
-	 *  out_read_start
-	 *  out_label_start
-	 *  static_fixed_spot_len
-	 */
-
-	/* INSDC:SRA:tbl:stats inherited productions
-	 *  max_spot_id
-	 *  min_spot_id
-	 *  in_stats_bin
-	 *  bio_base_count
-	 */
-
-	/* INSDC:SRA:tbl:sra inherited productions
-	 *  out_platform
-	 *  platform_name
-	 */
-
-	/* NCBI:SRA:tbl:spotdesc_nocol inherited productions
-	 *  out_read_seg
-	 *  out_label_seg
-	 *  out_read_seg32
-	 *  out_label_seg32
-	 */
-
-	/* NCBI:SRA:tbl:sra_nopos productions
-	 *  out_position
-	 *  out_position16
-	 */
-};
-
-/* history:
- *  1.0.1 - base explicitly upon sra #1.0.1
- *  1.0.2 - base explicitly upon sra_nopos #1.0.2, pos #1.0.1
- *  1.0.3 - base explicitly upon sra_nopos #1.0.3
- */
-table NCBI:SRA:tbl:sra #1.0.3 = NCBI:SRA:tbl:sra_nopos #1.0.3, NCBI:SRA:tbl:pos #1.0.1
-{
-    // the POSITION column is synthesized for all contemporary platforms but 454
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  cs_native
-	 *  in_cs_key
-	 *  out_cs_key
-	 *  out_signal
-	 *  in_dna_text
-	 *  out_2cs_bin
-	 *  out_2na_bin
-	 *  out_4na_bin
-	 *  out_dna_text
-	 *  out_x2cs_bin
-	 *  out_x2na_bin
-	 *  in_color_text
-	 *  out_2cs_packed
-	 *  out_2na_packed
-	 *  out_4na_packed
-	 *  out_color_text
-	 *  out_qual_phred
-	 *  out_color_matrix
-	 */
-
-	/* INSDC:SRA:tbl:spotname inherited productions
-	 *  out_x_coord
-	 *  out_y_coord
-	 *  out_name_fmt
-	 *  out_spot_name
-	 *  spot_ids_found
-	 */
-
-	/* INSDC:SRA:tbl:spotdesc inherited productions
-	 *  trim_len
-	 *  out_label
-	 *  out_nreads
-	 *  trim_start
-	 *  out_read_len
-	 *  out_label_len
-	 *  out_rd_filter
-	 *  out_read_type
-	 *  out_read_start
-	 *  out_label_start
-	 *  static_fixed_spot_len
-	 */
-
-	/* INSDC:SRA:tbl:stats inherited productions
-	 *  max_spot_id
-	 *  min_spot_id
-	 *  in_stats_bin
-	 *  bio_base_count
-	 */
-
-	/* INSDC:SRA:tbl:sra inherited productions
-	 *  out_platform
-	 *  platform_name
-	 */
-
-	/* NCBI:SRA:tbl:spotdesc_nocol inherited productions
-	 *  out_read_seg
-	 *  out_label_seg
-	 *  out_read_seg32
-	 *  out_label_seg32
-	 */
-};
-
-
-/* v2 consolidates many of the auxiliary columns into a single treatment
- * left out are reads, qualities and platform-specific columns
- *
- * history:
- * 2.1.2 - base upon sra #1.0.3, spotdesc #1.0.2, stats #1.1.2
- */
-table NCBI:SRA:tbl:sra_nopos #2.1.3 = INSDC:SRA:tbl:sra #1.0.3,
-    NCBI:SRA:tbl:skeyname #3.0.1, NCBI:SRA:tbl:spotdesc #1.0.2, NCBI:SRA:tbl:stats #1.2.0
-{
-    // this is already specified in INSDC:SRA:tbl:sra #1
-    // but putting it here will quiet down outputs
-    INSDC:SRA:platform_id out_platform = .PLATFORM;
-    
-    column INSDC:position:one POSITION
-        = out_position;
-    readonly column NCBI:SRA:pos16 POSITION
-        = cast ( _clip_position );
-    INSDC:position:one _clip_position
-        = < INSDC:position:one > clip < 0, 0xFFFF > ( out_position );
-    readonly column INSDC:position:zero POSITION
-        = ( INSDC:position:zero ) < I32 > diff < 1 > ( out_position );
-
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  cs_native
-	 *  in_cs_key
-	 *  out_cs_key
-	 *  out_signal
-	 *  in_dna_text
-	 *  out_2cs_bin
-	 *  out_2na_bin
-	 *  out_4na_bin
-	 *  out_dna_text
-	 *  out_x2cs_bin
-	 *  out_x2na_bin
-	 *  in_color_text
-	 *  out_2cs_packed
-	 *  out_2na_packed
-	 *  out_4na_packed
-	 *  out_color_text
-	 *  out_qual_phred
-	 *  out_color_matrix
-	 */
-
-	/* INSDC:SRA:tbl:spotdesc inherited productions
-	 *  trim_len
-	 *  trim_start
-	 *  out_read_type
-	 *  static_fixed_spot_len
-	 */
-
-	/* INSDC:SRA:tbl:stats inherited productions
-	 *  in_stats_bin
-	 */
-
-	/* INSDC:SRA:tbl:sra inherited productions
-	 *  out_platform
-	 *  platform_name
-	 */
-
-	/* NCBI:SRA:tbl:skeyname inherited productions
-	 *  in_spot_name_tok
-	 */
-
-	/* NCBI:SRA:tbl:spotdesc_nocol inherited productions
-	 *  out_read_seg
-	 *  out_label_seg
-	 */
-
-	/* NCBI:SRA:tbl:sra_nopos productions
-	 *  out_position
-	 */
-};
-
-/* most platforms don't have a native POSITION
- * mix in "pos" table to synthesize it
- *
- * history:
- *  2.1.2 - base upon sra#1.0.3, spotdesc #1.0.2, stats #1.1.2
- */
-table NCBI:SRA:tbl:sra #2.1.3 = INSDC:SRA:tbl:sra #1.0.3,
-    NCBI:SRA:tbl:skeyname #3.0.1, NCBI:SRA:tbl:spotdesc #1.0.2,
-    NCBI:SRA:tbl:stats #1.2.0, NCBI:SRA:tbl:pos #1.0.1
-{
-    readonly column INSDC:position:one POSITION
-        = out_position;
-    readonly column NCBI:SRA:pos16 POSITION
-        = out_position16;
-    readonly column INSDC:position:zero POSITION
-        = ( INSDC:position:zero ) < I32 > diff < 1 > ( out_position );
-
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  cs_native
-	 *  in_cs_key
-	 *  out_cs_key
-	 *  out_signal
-	 *  in_dna_text
-	 *  out_2cs_bin
-	 *  out_2na_bin
-	 *  out_4na_bin
-	 *  out_dna_text
-	 *  out_x2cs_bin
-	 *  out_x2na_bin
-	 *  in_color_text
-	 *  out_2cs_packed
-	 *  out_2na_packed
-	 *  out_4na_packed
-	 *  out_color_text
-	 *  out_qual_phred
-	 *  out_color_matrix
-	 */
-
-	/* INSDC:SRA:tbl:spotdesc inherited productions
-	 *  trim_len
-	 *  trim_start
-	 *  out_read_type
-	 *  static_fixed_spot_len
-	 */
-
-	/* INSDC:SRA:tbl:stats inherited productions
-	 *  in_stats_bin
-	 */
-
-	/* INSDC:SRA:tbl:sra inherited productions
-	 *  out_platform
-	 *  platform_name
-	 */
-
-	/* NCBI:SRA:tbl:skeyname inherited productions
-	 *  in_spot_name_tok
-	 */
-};
diff --git a/interfaces/ncbi/stats.vschema b/interfaces/ncbi/stats.vschema
deleted file mode 100644
index c462a8a..0000000
--- a/interfaces/ncbi/stats.vschema
+++ /dev/null
@@ -1,119 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * NCBI Sequence Read Archive schema
- */
-version 1;
-
-include 'insdc/sra.vschema';
-
-
-/*--------------------------------------------------------------------------
- * types
- */
-typeset NCBI:SRA:stats:qual_type
-{
-    INSDC:quality:phred,
-    INSDC:quality:log_odds,
-    INSDC:quality:log_odds [ 4 ]
-};
-
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-/*
-   trigger to build meta statistics: spot count, base count, etc.
- */
-extern function U8 NCBI:SRA:stats_trigger #1
-    ( U8 read_bin, U32 read_len, INSDC:SRA:xread_type read_type * ascii spot_group );
-
-/* trigger to build meta statistics from compressed reads
- */
-extern function
-U8 NCBI:SRA:cmp_stats_trigger #1 ( B8 cmp_read_bin, NCBI:SRA:stats:qual_type qual_bin,
-    U32 read_len, INSDC:SRA:xread_type read_type * ascii spot_group );
-
-extern function
-U8 NCBI:SRA:cmpf_stats_trigger #1 ( B8 cmp_read_bin, U32 spot_len,
-    U32 read_len, INSDC:SRA:xread_type read_type * ascii spot_group );
-
-
-/* trigger to build phred_quality statistics in meta
- */
-extern function
-U8 NCBI:SRA:phred_stats_trigger #1 ( INSDC:quality:phred qual_bin );
-
-/*--------------------------------------------------------------------------
- * table
- */
-
-/* stats
- *  holds sequence statistics
- *
- * history:
- *  1.0.1 - explicitly interit from sra #1.0.1
- *  1.1.0 - incorporate stats from compressed read
- *  1.1.1 - sra #1.0.2
- *  1.1.2 - sra #1.0.3 + cmp_base_count or to base_count
- */
-table NCBI:SRA:tbl:stats #1.2.0 = INSDC:SRA:tbl:stats #1.1, INSDC:SRA:tbl:sra #1.0.3
-{
-    INSDC:SRA:spotid_t min_spot_id
-        = < INSDC:SRA:spotid_t > meta:value < "STATS/TABLE/SPOT_MIN" > ();
-
-    INSDC:SRA:spotid_t max_spot_id
-        = < INSDC:SRA:spotid_t > meta:value < "STATS/TABLE/SPOT_MAX" > ();
-
-    U64 spot_count
-        = < U64 > meta:value < "STATS/TABLE/SPOT_COUNT" > ();
-
-    U64 base_count
-        = < U64 > meta:value < "STATS/TABLE/BASE_COUNT" > ();
-
-    U64 bio_base_count
-        = < U64 > meta:value < "STATS/TABLE/BIO_BASE_COUNT" > ();
-
-    U64 cmp_base_count
-        = < U64 > meta:value < "STATS/TABLE/CMP_BASE_COUNT" > () | base_count;
-
-    trigger meta_stats
-        = NCBI:SRA:stats_trigger ( in_stats_bin, in_read_len, in_read_type, in_spot_group )
-        | NCBI:SRA:stats_trigger ( in_stats_bin, in_read_len, in_read_type )
-        | NCBI:SRA:cmp_stats_trigger ( in_cmp_stats_bin, in_stats_qual, in_read_len, in_read_type, in_spot_group )
-        | NCBI:SRA:cmp_stats_trigger ( in_cmp_stats_bin, in_stats_qual, in_read_len, in_read_type )
-        | NCBI:SRA:cmpf_stats_trigger ( in_cmp_stats_bin, in_spot_len, in_read_len, in_read_type, in_spot_group )
-        | NCBI:SRA:cmpf_stats_trigger ( in_cmp_stats_bin, in_spot_len, in_read_len, in_read_type );
-        
-    trigger qual_stats
-        = NCBI:SRA:phred_stats_trigger #1 ( in_qual_phred );
-
-	/* INSDC:SRA:tbl:stats inherited virtual productions
-	 *  in_stats_bin
-	 */
-};
diff --git a/interfaces/ncbi/varloc.vschema b/interfaces/ncbi/varloc.vschema
deleted file mode 100644
index aad5bd1..0000000
--- a/interfaces/ncbi/varloc.vschema
+++ /dev/null
@@ -1,204 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * VarLoc table
- */
-version 1;
-
-include 'vdb/vdb.vschema';
-include 'insdc/insdc.vschema';
-include 'ncbi/ncbi.vschema';
-
-
-/*--------------------------------------------------------------------------
- * types
- *  http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/asn_spec/Variation-inst.html
- */
-typedef U8 NCBI:var:inst:type;
-const NCBI:var:inst:type NCBI:var:inst:value:unknown          = 0;
-const NCBI:var:inst:type NCBI:var:inst:value:identity         = 1;
-const NCBI:var:inst:type NCBI:var:inst:value:inv              = 2;
-const NCBI:var:inst:type NCBI:var:inst:value:snv              = 3;
-const NCBI:var:inst:type NCBI:var:inst:value:mnp              = 4;
-const NCBI:var:inst:type NCBI:var:inst:value:delins           = 5;
-const NCBI:var:inst:type NCBI:var:inst:value:del              = 6;
-const NCBI:var:inst:type NCBI:var:inst:value:ins              = 7;
-const NCBI:var:inst:type NCBI:var:inst:value:microsatellite   = 8;
-const NCBI:var:inst:type NCBI:var:inst:value:transposon       = 9;
-const NCBI:var:inst:type NCBI:var:inst:value:cnv              = 10;
-const NCBI:var:inst:type NCBI:var:inst:value:direct_copy      = 11;
-const NCBI:var:inst:type NCBI:var:inst:value:rev_direct_copy  = 12;
-const NCBI:var:inst:type NCBI:var:inst:value:inverted_copy    = 13;
-const NCBI:var:inst:type NCBI:var:inst:value:everted_copy     = 14;
-const NCBI:var:inst:type NCBI:var:inst:value:translocation    = 15;
-const NCBI:var:inst:type NCBI:var:inst:value:prot_missense    = 16;
-const NCBI:var:inst:type NCBI:var:inst:value:prot_nonsense    = 17;
-const NCBI:var:inst:type NCBI:var:inst:value:prot_neutral     = 18;
-const NCBI:var:inst:type NCBI:var:inst:value:prot_silent      = 19;
-const NCBI:var:inst:type NCBI:var:inst:value:prot_other       = 20;
-const NCBI:var:inst:type NCBI:var:inst:value:other            = 255;
-
-typedef U8 NCBI:var:source:type;
-const NCBI:var:source:type NCBI:var:source:value:dbSNP        = 1;
-const NCBI:var:source:type NCBI:var:source:value:dbVar        = 2;
-const NCBI:var:source:type NCBI:var:source:value:ClinVar      = 3;
-const NCBI:var:source:type NCBI:var:source:value:other        = 10;
-
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-/* tokenize_var_id
- *   splits into 2 tokens
- *   0 - prefix
- *   1 - suffix
- */
-extern function
-text:token NCBI:var:tokenize_var_id #1 ( ascii var_id );
-
-
-/*--------------------------------------------------------------------------
- * varloc
- *  this name is questionable
- */
-table NCBI:var:tbl:varloc #1
-{
-    /* SQL schema:
-       var_id             varchar(50),
-       parent_var_id      varchar(50) NULL OKAY,
-       var_type           int,
-       var_source         int,
-       gi                 int,
-       pos_from           int,
-       pos_to             int,
-       entrez_id          int,
-       score              int
-    */
-
-    /* VAR_ID
-     *  example: "rs5852452"
-     */
-    extern column ascii VAR_ID = out_var_id;
-
-    // on input, separate into 3 columns
-    ascii in_var_id = VAR_ID;
-    text:token in_var_id_tok = NCBI:var:tokenize_var_id ( in_var_id );
-    ascii in_var_id_prefix = extract_token < 0 > ( in_var_id, in_var_id_tok );
-    ascii in_var_id_suffix_text = extract_token < 1 > ( in_var_id, in_var_id_tok );
-    U32 in_var_id_suffix = strtonum ( in_var_id_suffix_text );
-
-    // prefix column
-    physical column < ascii > zip_encoding .VAR_ID_PREFIX = in_var_id_prefix;
-    physical column < U32 > izip_encoding .VAR_ID_SUFFIX_LEN = row_len ( in_var_id_suffix_text );
-    physical column < U32 > izip_encoding .VAR_ID_SUFFIX = in_var_id_suffix;
-
-    // on output, restore original id
-    U32 out_var_id_suffix = .VAR_ID_SUFFIX;
-    U32 out_var_id_suffix_len = .VAR_ID_SUFFIX_LEN;
-    ascii out_var_id_prefix = .VAR_ID_PREFIX;
-    ascii out_var_id = sprintf < "%s%0*u" > ( out_var_id_prefix, out_var_id_suffix_len, out_var_id_suffix );
-
-    /* PARENT_VAR_ID
-     *  example: "rs5852452"
-     *  may be EMPTY
-     */
-    extern column ascii PARENT_VAR_ID = out_parent_var_id;
-
-    // same treatment as VAR_ID
-    ascii in_parent_var_id = PARENT_VAR_ID;
-    text:token in_parent_var_id_tok = NCBI:var:tokenize_var_id ( in_parent_var_id );
-    ascii in_parent_var_id_prefix = extract_token < 0 > ( in_parent_var_id, in_parent_var_id_tok );
-    ascii in_parent_var_id_suffix_text = extract_token < 1 > ( in_parent_var_id, in_parent_var_id_tok );
-    U32 in_parent_var_id_suffix = strtonum ( in_parent_var_id_suffix_text );
-    physical column < ascii > zip_encoding .PARENT_VAR_ID_PREFIX = in_parent_var_id_prefix;
-    physical column < U32 > izip_encoding .PARENT_VAR_ID_SUFFIX_LEN = row_len ( in_parent_var_id_suffix_text );
-    physical column < U32 > izip_encoding .PARENT_VAR_ID_SUFFIX = in_parent_var_id_suffix;
-    U32 out_parent_var_id_suffix = .PARENT_VAR_ID_SUFFIX;
-    U32 out_parent_var_id_suffix_len = .PARENT_VAR_ID_SUFFIX_LEN;
-    ascii out_parent_var_id_prefix = .PARENT_VAR_ID_PREFIX;
-    ascii out_parent_var_id = sprintf < "%s%.*u" > ( out_parent_var_id_prefix, out_parent_var_id_suffix_len, out_parent_var_id_suffix );
-
-    /* VAR_TYPE
-     */
-    extern column < NCBI:var:inst:type > zip_encoding VAR_TYPE;
-
-    /* VAR_SOURCE
-     */
-    extern column < NCBI:var:source:type > zip_encoding VAR_SOURCE;
-
-    /* GI
-     */
-    extern column < NCBI:gi > izip_encoding GI;
-
-    /* POS_FROM
-     *  starting position
-     */
-    extern column < INSDC:coord:zero > izip_encoding POS_FROM;
-
-    INSDC:coord:zero in_pos_from = POS_FROM;
-    INSDC:coord:zero out_pos_from = .POS_FROM;
-
-    /* POS_TO
-     *  ending position
-     */
-    extern column INSDC:coord:zero POS_TO = out_pos_to;
-
-    INSDC:coord:zero in_pos_to = POS_TO;
-    INSDC:coord:len in_pos_len = ( INSDC:coord:len ) < I32 > diff < -1 > ( in_pos_to, in_pos_from );
-
-    physical column < INSDC:coord:len > izip_encoding .POS_LEN = in_pos_len;
-
-    INSDC:coord:zero out_pos_len = ( INSDC:coord:zero ) .POS_LEN;
-    INSDC:coord:zero out_pos_to = < INSDC:coord:zero > sum < -1 > ( out_pos_from, out_pos_len );
-
-    /* ENTREZ_ID
-     *  do we need this?
-     */
-    extern column < I32 > izip_encoding ENTREZ_ID;
-
-    /* SCORE
-     */
-    extern column < I32 > izip_encoding SCORE;
-};
-
-table NCBI:var:tbl:hitmap #1
-{
-    extern column U32 MAX_SEQ_LEN;    /* must be static                          */
-    extern column bool_encoding HITS; /* places on the reference with variations */
-};
-
-
-/*--------------------------------------------------------------------------
- * varloc
- *  contains the varloc table and hit table
- */
-database NCBI:var:db:varloc #1
-{
-    table NCBI:var:tbl:varloc VARLOC;
-    table NCBI:var:tbl:hitmap HITMAP;
-};
diff --git a/interfaces/ncbi/vdb-blast-priv.h b/interfaces/ncbi/vdb-blast-priv.h
deleted file mode 100644
index 6d4ede6..0000000
--- a/interfaces/ncbi/vdb-blast-priv.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ncbi_vdb_blast_priv_
-#define _h_ncbi_vdb_blast_priv_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#include <stddef.h>
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-struct VdbBlast2naReader;
-
-VDB_EXTERN uint64_t CC _VdbBlast2naReaderRead(
-    const struct VdbBlast2naReader *self,
-    uint32_t *status, uint64_t *read_id, size_t *starting_base,
-    uint8_t *buffer, size_t buffer_size);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ncbi_vdb_blast_priv_ */
diff --git a/interfaces/ncbi/vdb-blast.h b/interfaces/ncbi/vdb-blast.h
deleted file mode 100644
index 165b82c..0000000
--- a/interfaces/ncbi/vdb-blast.h
+++ /dev/null
@@ -1,606 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ncbi_vdb_blast_
-#define _h_ncbi_vdb_blast_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * defines
- */
-#ifdef __cplusplus
-#define VDB_BLAST_DECLARE( cls ) \
-    struct cls
-#else
-#define VDB_BLAST_DECLARE( cls ) \
-    typedef struct cls cls
-#endif
-
-/*--------------------------------------------------------------------------
- * status codes
- *  NB - TO BE COMPLETED DURING DEVELOPMENT OF TESTS AND INITIAL CODE
- */
-typedef uint32_t VdbBlastStatus;
-enum
-{
-    eVdbBlastNoErr,
-    eVdbBlastErr,
-    eVdbBlastMemErr,
-    eVdbBlastRunErr,
-    eVdbBlastEndOfSequence,
-    eVdbBlastChunkedSequence,  /* can't hand out direct pointer into cache */
-    eVdbBlastCircularSequence, /* chunked, where the 2nd chunk is a repeat of first */
-    eVdbBlastTooExpensive,
-    eVdbBlastInvalidId, /* an invalid read_id was used as an input parameter:
-                          usually accessing a filtered read via 4naReader */
-    eVdbBlastNotImplemented,
-};
-
-/*------------------------------------------------------------------------------
- * VdbBlastMgr
- */
-VDB_BLAST_DECLARE ( VdbBlastMgr );
-
-
-/* Init
- *  initialize library
- *
- *  "status" [ OUT ] - return parameter for status code
- */
-VDB_EXTERN VdbBlastMgr* CC VdbBlastInit ( VdbBlastStatus *status );
-
-
-/* AddRef
- *  attach a reference to existing object
- * Release
- *  drop reference to object
- *  deletes object when last reference is gone
- */
-VDB_EXTERN VdbBlastMgr* CC VdbBlastMgrAddRef ( VdbBlastMgr *self );
-VDB_EXTERN void CC VdbBlastMgrRelease ( VdbBlastMgr *self );
-
-
-/* IsCSraRun
- *  calls through to VDatabaseIsCSRA
- *  expensive...
- */
-VDB_EXTERN bool CC VdbBlastMgrIsCSraRun ( const VdbBlastMgr * self, const char *rundesc );
-
-
-/* OTHER FUNCTIONS FOR CONFIGURING SESSION BEHAVIOR */
-
-
-/*------------------------------------------------------------------------------
- * VdbBlastRunSet
- */
-VDB_BLAST_DECLARE ( VdbBlastRunSet );
-
-
-/* MakeRunSet
- *  create an empty run set
- *
- *  "status" [ OUT ] - return parameter for status code
- *
- *  "min_read_length" [ IN ] - min-length parameter for filtering
- *
- *  "protein" [ IN ] - if true, run set will contain only protein sequences
- *
- *  returns NULL upon any error
- */
-VDB_EXTERN VdbBlastRunSet* CC VdbBlastMgrMakeRunSet ( const VdbBlastMgr *self,
-    VdbBlastStatus *status, uint32_t min_read_length, bool protein );
-
-
-/* AddRef
- *  attach a reference to existing object
- * Release
- *  drop reference to object
- *  deletes object when last reference is gone
- */
-VDB_EXTERN VdbBlastRunSet* CC VdbBlastRunSetAddRef ( VdbBlastRunSet *self );
-VDB_EXTERN void CC VdbBlastRunSetRelease ( VdbBlastRunSet *self );
-
-
-/* AddRun
- *  add a run by accession or path
- *
- *  "rundesc" [ IN ] - NUL-terminated UTF-8 string
- *  giving run accession or path
- *
- *  returns status code
- */
-VDB_EXTERN VdbBlastStatus CC VdbBlastRunSetAddRun ( VdbBlastRunSet *self,
-    const char *rundesc );
-
-
-/* GetNumSequences
- *  returns the total number of biological sequences in run set
- * GetNumSequencesApprox
- *  returns a calculated estimate of the number of biological
- *  sequences in run set. may be used if the exact count function
- *  returns "eVdbBlastTooExpensive".
- */
-VDB_EXTERN uint64_t CC VdbBlastRunSetGetNumSequences
-    ( const VdbBlastRunSet *self, VdbBlastStatus *status );
-VDB_EXTERN uint64_t CC VdbBlastRunSetGetNumSequencesApprox
-    ( const VdbBlastRunSet *self );
-
-
-/* GetTotalLength
- *  returns the total number of bases in run set
- * GetTotalLengthApprox
- *  returns a calculated estimate of the total number
- *  of bases in run set. may be used if the exact length function
- *  returns "eVdbBlastTooExpensive".
- */
-VDB_EXTERN uint64_t CC VdbBlastRunSetGetTotalLength
-    ( const VdbBlastRunSet *self, VdbBlastStatus *status );
-VDB_EXTERN uint64_t CC VdbBlastRunSetGetTotalLengthApprox
-    ( const VdbBlastRunSet *self );
-
-
-/* GetMinSeqLen
- * GetMaxSeqLen
- * GetAvgSeqLen
- *  returns metrics of biological reads
- *  may be the result of estimated calculations ( see above )
- */
-VDB_EXTERN uint64_t CC VdbBlastRunSetGetMaxSeqLen
-    ( const VdbBlastRunSet *self );
-VDB_EXTERN uint64_t CC VdbBlastRunSetGetMinSeqLen
-    ( const VdbBlastRunSet *self );
-VDB_EXTERN uint64_t CC VdbBlastRunSetGetAvgSeqLen
-    ( const VdbBlastRunSet *self );
-
-
-/* GetName
- *  returns the total number of bytes needed for name
- *  which, if > bsize, means insufficient buffer error
- *  and if == bsize, means the name is NOT NUL-terminated
- *  otherwise, the buffer is NUL-terminated as well.
- */
-VDB_EXTERN size_t CC VdbBlastRunSetGetName ( const VdbBlastRunSet *self,
-    VdbBlastStatus *status, char *name_buffer, size_t bsize );
-
-
-/* IsProtein
- *  return the boolean value given when the set was created
- */
-VDB_EXTERN bool CC VdbBlastRunSetIsProtein ( const VdbBlastRunSet *self );
-
-
-#if NOT_DEFERRED
-/* LastUpdatedDate
- *  request the modification date of the SEQUENCE data
- *  or the READ DESCRIPTOR data, whichever is more recent
- */
-VDB_EXTERN time_t CC VdbBlastRunSetLastUpdatedDate ( const VdbBlastRunSet *self );
-#endif
-
-/* GetReadName
- *  returns the total number of bytes needed for name
- */
-VDB_EXTERN size_t CC VdbBlastRunSetGetReadName ( const VdbBlastRunSet *self,
-    uint64_t read_id, char *name_buffer, size_t bsize );
-
-/* GetReadId
- * Inverse function to GetReadName
- *
- *  returns status code
- */
-VDB_EXTERN VdbBlastStatus CC VdbBlastRunSetGetReadId ( const VdbBlastRunSet *self,
-    const char *name_buffer, size_t bsize, uint64_t *read_id );
-
-#if NOT_DEFERRED
-/* GetReadLength
- *  this API bothers me, because it has the potential of blowing up the cache
- *  and subverts the guarantee of the readers exclusive use of caches.
- *  Note that by getting a read and its length using the "Data" functions
- *  below, you can get the length as cheaply as you would here, at least in
- *  VDB-2.
- */
-uint64_t VdbBlastRunSetGetReadLength ( const VdbBlastRunSet *self,
-    uint64_t read_id );
-#endif
-
-
-/*------------------------------------------------------------------------------
- * VdbBlastReferenceSet
- */
-VDB_BLAST_DECLARE ( VdbBlastReferenceSet );
-
-
-/* GetReferenceSet
- *  return a set of all reference ( chromosome ) sequences within run set
- *  can be empty
- */
-VDB_EXTERN VdbBlastReferenceSet* CC VdbBlastRunSetMakeReferenceSet
-    ( const VdbBlastRunSet *self, VdbBlastStatus *status );
-
-
-/* AddRef
- *  attach a reference to existing object
- * Release
- *  drop reference to object
- *  deletes object when last reference is gone
- */
-VDB_EXTERN VdbBlastReferenceSet* CC VdbBlastReferenceSetAddRef
-    ( VdbBlastReferenceSet *self );
-VDB_EXTERN void CC VdbBlastReferenceSetRelease ( VdbBlastReferenceSet *self );
-
-
-/* GetNumSequences
- *  Returns the total number of biological sequences in reference set.
- *  Always returns the exact count.
- *  Never returns "eVdbBlastTooExpensive".
- */
-VDB_EXTERN uint64_t CC VdbBlastReferenceSetGetNumSequences
-    ( const VdbBlastReferenceSet *self, VdbBlastStatus *status );
-
-/* GetTotalLength
- *  Returns the total number of bases in reference set.
- *  Always returns the exact length.
- *  Never returns "eVdbBlastTooExpensive".
- */
-VDB_EXTERN uint64_t CC VdbBlastReferenceSetGetTotalLength
-    ( const VdbBlastReferenceSet *self, VdbBlastStatus *status );
-
-/* GetReadName
- *  returns the total number of bytes needed for name
- */
-VDB_EXTERN size_t CC VdbBlastReferenceSetGetReadName (
-    const VdbBlastReferenceSet *self,
-    uint64_t read_id, char *name_buffer, size_t bsize );
-
-VDB_EXTERN VdbBlastStatus CC VdbBlastReferenceSetGetReadId (
-    const VdbBlastReferenceSet *self,
-    const char *name_buffer, size_t bsize, uint64_t *read_id );
-
-/* GetReadLength
- *  returns the number of bases in reference sequence
- *
- * Upon success
- * the status is set to eVdbBlastNoErr when the reference is not circular
- * otherwise - to eVdbBlastCircularSequence 
- */
-VDB_EXTERN uint64_t CC VdbBlastReferenceSetGetReadLength (
-    const VdbBlastReferenceSet *self,
-    uint64_t read_id, VdbBlastStatus *status );
-
-
-/*------------------------------------------------------------------------------
- * VdbBlastReadSet
- */
-VDB_BLAST_DECLARE ( VdbBlastReadSet );
-
-
-#if 0
-/* MapHSP
- *  map a single HSP from result of ReferenceSet blast
- *  to a slice of all reads within ReadSet that align to the same region
- */
-VDB_EXTERN VdbBlastReadSet* CC VdbBlastReferenceSetMapHSP ( const VdbBlastReferenceSet * self, ... );
-#endif
-
-
-/* AddRef
- *  attach a reference to existing object
- * Release
- *  drop reference to object
- *  deletes object when last reference is gone
- */
-VDB_EXTERN VdbBlastReadSet* CC VdbBlastReadSetAddRef ( VdbBlastReadSet *self );
-VDB_EXTERN void CC VdbBlastReadSetRelease ( VdbBlastReadSet *self );
-
-
-/*------------------------------------------------------------------------------
- * VdbBlast2naReader
- */
-VDB_BLAST_DECLARE ( VdbBlast2naReader );
-
-
-/* Make2naReader
- *  create a reader onto the run set
- *
- *  "status" [ OUT ] - return parameter for status code
- *
- *  "initial_read_id" [ IN ] - starting position for reader
- */
-VDB_EXTERN VdbBlast2naReader* CC VdbBlastRunSetMake2naReader
-    ( const VdbBlastRunSet *self, VdbBlastStatus *status,
-      uint64_t initial_read_id );
-
-VDB_EXTERN VdbBlast2naReader* CC VdbBlastReferenceSetMake2naReader
-    ( const VdbBlastReferenceSet *self, VdbBlastStatus *status,
-      uint64_t initial_read_id );
-
-VDB_EXTERN VdbBlast2naReader* CC VdbBlastReadSetMake2naReader
-    ( const VdbBlastReadSet *self, VdbBlastStatus *status,
-      uint64_t initial_read_id );
-
-
-/* AddRef
- *  attach a reference to existing object
- * Release
- *  drop reference to object
- *  deletes object when last reference is gone
- */
-VDB_EXTERN VdbBlast2naReader* CC VdbBlast2naReaderAddRef
-    ( VdbBlast2naReader *self );
-VDB_EXTERN void CC VdbBlast2naReaderRelease ( VdbBlast2naReader *self );
-
-
-/* Read
- *  read a single sequence in packed 2na
- *
- *  "status" [ OUT ] - return parameter for status code
- *
- *  "read_id" [ OUT ] - id of read that was read
- *
- *  "buffer" [ OUT ] and "buffer_size" [ IN ] - externally provided buffer
- *  for single sequence in packed 2na, where buffer_size is in bytes.
- *
- *  returns number of bases read or 0 if no further bases could be read
- */
-VDB_EXTERN uint64_t CC VdbBlast2naReaderRead ( const VdbBlast2naReader *self,
-    VdbBlastStatus *status, uint64_t *read_id,
-    uint8_t *buffer, size_t buffer_size );
-
-
-/* Data
- *  read as many sequences as are available
- *
- *  "status" [ OUT ] - return parameter for status code
- *
- *  "buffer" [ OUT ] and "buffer_len" [ IN ] - externally provided buffer
- *  for biological read sequences
- *
- *  returns number of sequences available in "buffer"
- *  or 0 if nothing could be read
- */
-typedef struct Packed2naRead Packed2naRead;
-struct Packed2naRead
-{
-    uint64_t read_id;
-    void *starting_byte;
-    uint32_t offset_to_first_bit;
-    uint32_t length_in_bases;
-};
-
-VDB_EXTERN uint32_t CC VdbBlast2naReaderData ( VdbBlast2naReader *self,
-    VdbBlastStatus *status, Packed2naRead *buffer, uint32_t buffer_length );
-
-
-/*------------------------------------------------------------------------------
- * VdbBlast4naReader
- */
-VDB_BLAST_DECLARE ( VdbBlast4naReader );
-
-
-/* Make4naReader
- *  create a reader onto the run set
- *
- *  "status" [ OUT ] - return parameter for status code
- */
-VDB_EXTERN VdbBlast4naReader* CC VdbBlastRunSetMake4naReader
-    ( const VdbBlastRunSet *self, VdbBlastStatus *status );
-
-VDB_EXTERN VdbBlast4naReader* CC VdbBlastReferenceSetMake4naReader
-    ( const VdbBlastReferenceSet *self, VdbBlastStatus *status );
-
-VDB_EXTERN VdbBlast4naReader* CC VdbBlastReadSetMake4naReader
-    ( const VdbBlastReadSet *self, VdbBlastStatus *status );
-
-
-/* AddRef
- *  attach a reference to existing object
- * Release
- *  drop reference to object
- *  deletes object when last reference is gone
- */
-VDB_EXTERN VdbBlast4naReader* CC VdbBlast4naReaderAddRef
-    ( VdbBlast4naReader *self );
-VDB_EXTERN void CC VdbBlast4naReaderRelease ( VdbBlast4naReader *self );
-
-
-/* Read
- *  read a single sequence in unpacked, std 4na
- *
- *  "status" [ OUT ] - return parameter for status code
- *
- *  "read_id" [ IN ] - id of read to be read
- *
- *  "starting_base" [ IN ] - zero-based starting index into the sequence
- *
- *  "buffer" [ OUT ] and "buffer_len" [ IN ] - externally provided buffer
- *  for single sequence in unpacked 4na
- *
- *  returns number of bases read or 0 if no further bases could be read
- */
-VDB_EXTERN size_t CC VdbBlast4naReaderRead ( const VdbBlast4naReader *self,
-    VdbBlastStatus *status, uint64_t read_id, size_t starting_base,
-    uint8_t *buffer, size_t buffer_length );
-
-
-/* Data
- *  access cached data
- *
- *  "status" [ OUT ] - return parameter for status code
- *
- *  "read_id" [ IN ] - id of read to be accessed
- *
- *  "length" [ OUT ] - return parameter for sequence length
- *
- *  returns pointer to data or NULL upon error
- */
-VDB_EXTERN const uint8_t* CC VdbBlast4naReaderData
-    ( const VdbBlast4naReader *self,
-      VdbBlastStatus *status, uint64_t read_id, size_t *length );
-
-
-/*------------------------------------------------------------------------------
- * VdbBlastStdaaReader
- */
-VDB_BLAST_DECLARE ( VdbBlastStdaaReader );
-
-
-/* MakeStdaaReader
- *  create a reader onto the run set
- */
-VDB_EXTERN VdbBlastStdaaReader* CC VdbBlastRunSetMakeStdaaReader
-    ( const VdbBlastRunSet *self, VdbBlastStatus *status );
-
-
-/* AddRef
- *  attach a reference to existing object
- * Release
- *  drop reference to object
- *  deletes object when last reference is gone
- */
-VDB_EXTERN VdbBlastStdaaReader* CC VdbBlastStdaaReaderAddRef
-    ( VdbBlastStdaaReader *self );
-VDB_EXTERN void CC VdbBlastStdaaReaderRelease ( VdbBlastStdaaReader *self );
-
-
-/* Read
- *  read a single sequence in stdaa
- *
- *  "status" [ OUT ] - return parameter for status code
- *
- *  "pig" [ IN ] - protein id
- *
- *  "buffer" [ OUT ] and "buffer_len" [ IN ] - externally provided buffer
- *  for single sequence in unpacked Stdaa
- *
- *  returns number of residues read or 0 upon error
- */
-VDB_EXTERN size_t CC VdbBlastStdaaReaderRead ( const VdbBlastStdaaReader *self,
-    VdbBlastStatus *status, uint64_t pig,
-    uint8_t *buffer, size_t buffer_length );
-
-
-/* Data
- *  access cached data
- *
- *  "status" [ OUT ] - return parameter for status code
- *
- *  "length" [ OUT ] - return parameter for sequence length
- *
- *  returns pointer to data or NULL upon error
- */
-VDB_EXTERN const uint8_t* CC VdbBlastStdaaReaderData
-    ( const VdbBlastStdaaReader *self,
-      VdbBlastStatus *status, uint64_t pig, size_t *length );
-
-
-/* FUNCTIONS TO CONTROL VDB-LIBRARIES LOG GENERATION */
-
-/* KLogLevelSet
- * set log level of VDB-libraries
- *
- * returns status code
- */
-VDB_EXTERN VdbBlastStatus CC
-VdbBlastMgrKLogLevelSetInfo ( const VdbBlastMgr *self );
-
-VDB_EXTERN VdbBlastStatus CC
-VdbBlastMgrKLogLevelSetWarn ( const VdbBlastMgr *self );
-
-/* for level description see klib/log.h */
-VDB_EXTERN VdbBlastStatus CC VdbBlastMgrKLogLevelSet ( const VdbBlastMgr *self,
-    uint32_t level );
-
-VDB_EXTERN VdbBlastStatus CC VdbBlastMgrKStsLevelSet ( const VdbBlastMgr *self,
-    uint32_t level );
-
-/* KLogHandlerSet, KLogLibHandlerSet, KStsHandlerSet, KOutHandlerSet
- * set logging output handlers for different channels
- *
- * returns status code
- */
-VDB_EXTERN VdbBlastStatus CC VdbBlastMgrKLogHandlerSetStdOut
-    ( const VdbBlastMgr *self );
-VDB_EXTERN VdbBlastStatus CC VdbBlastMgrKLogLibHandlerSetStdOut
-    ( const VdbBlastMgr *self );
-VDB_EXTERN VdbBlastStatus CC VdbBlastMgrKStsHandlerSetStdOut
-    ( const VdbBlastMgr *self );
-VDB_EXTERN VdbBlastStatus CC VdbBlastMgrKOutHandlerSetStdOut
-    ( const VdbBlastMgr *self );
-
-VDB_EXTERN VdbBlastStatus CC VdbBlastMgrKLogHandlerSetStdErr
-    ( const VdbBlastMgr *self );
-VDB_EXTERN VdbBlastStatus CC VdbBlastMgrKLogLibHandlerSetStdErr
-    ( const VdbBlastMgr *self );
-VDB_EXTERN VdbBlastStatus CC VdbBlastMgrKStsHandlerSetStdErr
-    ( const VdbBlastMgr *self );
-VDB_EXTERN VdbBlastStatus CC VdbBlastMgrKOutHandlerSetStdErr
-    ( const VdbBlastMgr *self );
-
-
-/*  upon success, the writer will return code 0 */
-typedef uint32_t ( CC * VdbBlastKWrtWriter )
-    ( void * self, const char * buffer, size_t bufsize, size_t * num_writ );
-
-VDB_EXTERN VdbBlastStatus CC VdbBlastMgrKLogHandlerSet (const VdbBlastMgr *self,
-    VdbBlastKWrtWriter writer, void *data );
-VDB_EXTERN VdbBlastStatus CC VdbBlastMgrKLogLibHandlerSet
-    ( const VdbBlastMgr *self, VdbBlastKWrtWriter writer, void *data );
-VDB_EXTERN VdbBlastStatus CC VdbBlastMgrKOutHandlerSet (const VdbBlastMgr *self,
-    VdbBlastKWrtWriter writer, void *data );
-
-
-/* KDbgSetString 
- * set a string used to turn on debug messages
- *
- * returns status code
- */
-VDB_EXTERN VdbBlastStatus CC VdbBlastMgrKDbgSetString ( const VdbBlastMgr *self,
-    const char *string );
-
-/* KConfigPrint
- * print current configuration to the output handler
- *
- * returns status code
- */
-VDB_EXTERN VdbBlastStatus CC VdbBlastMgrKConfigPrint ( const VdbBlastMgr *self );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ncbi_vdb_blast_ */
diff --git a/interfaces/ncbi/wgs-contig.h b/interfaces/ncbi/wgs-contig.h
deleted file mode 100644
index cc547be..0000000
--- a/interfaces/ncbi/wgs-contig.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ncbi_wgs_contig_
-#define _h_ncbi_wgs_contig_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*==========================================================================
- * WGS Contig
- */
-
-
-/*--------------------------------------------------------------------------
- * types
- * constants
- */
-
-/* component_props
- *  a signed value describing either contigs or gaps
- *  where values >= 0 refer to contigs
- *  and negatives describe gaps
- */
-typedef int16_t NCBI_WGS_component_props;
-
-/* component description
- *  the sequencing status of the component
- *
- *  These typically correspond to keywords in the INSDC submission.
- *  Current acceptable values are_
- *    A           Active Finishing
- *    D           Draft HTG (often phase1 and phase2 are called Draft,
- *                whether or not they have the draft keyword).
- *    F           Finished HTG (phase3)
- *    G           Whole Genome Finishing
- *    O           Other sequence (typically means no HTG keyword)
- *    P           Pre Draft
- *    W           WGS contig
- */
-enum
-{
-    NCBI_WGS_component_WGS                  = 0,
-    NCBI_WGS_component_ActiveFinishing      = 1,
-    NCBI_WGS_component_DraftHTG             = 2,
-    NCBI_WGS_component_FinishedHTG          = 3,
-    NCBI_WGS_component_WholeGenomeFinishing = 4,
-    NCBI_WGS_component_OtherSequence        = 5,
-    NCBI_WGS_component_PreDraft             = 6
-};
-
-/* strand
- *  specifies the orientation of the component relative to scaffold
- *  values given allow strand to be determined as "prop / 16"
- *  yielding_
- *    0           unknown orientation
- *    1           plus strand
- *    2           negative strand
- */
-enum
-{
-    NCBI_WGS_strand_plus                    = 1 * 16,
-    NCBI_WGS_strand_minus                   = 2 * 16
-};
-
-
-/* gap description
- *  These typically correspond to keywords in the INSDC submission.
- *  Current acceptable values are_
- *    N           gap with specified size
- *    U           gap of unknown size, defaulting to 100 bases.
- */
-enum
-{
-    NCBI_WGS_gap_known                      = 1 * -1,
-    NCBI_WGS_gap_unknown                    = 2 * -1
-};
-
-/* gap_linkage
- * Describes linkage and linkage evidence
- */
-typedef int32_t NCBI_WGS_gap_linkage;
-
-/* gap type
- *  scaffold          a gap between two sequence contigs in a scaffold
- *  contig            an unspanned gap between two sequence contigs
- *  centromere        a gap inserted for the centromere
- *  short_arm         a gap inserted at the start of an acrocentric chromosome
- *  heterochromatin   a gap inserted for an especially large region of heterochromatic sequence
- *  telomere          a gap inserted for the telomere
- *  repeat            an unresolvable repeat
- */
-enum
-{
-    NCBI_WGS_gap_scaffold                   = 1 * -4,
-    NCBI_WGS_gap_contig                     = 2 * -4,
-    NCBI_WGS_gap_centromere                 = 3 * -4,
-    NCBI_WGS_gap_short_arm                  = 4 * -4,
-    NCBI_WGS_gap_heterochromatin            = 5 * -4,
-    NCBI_WGS_gap_telomere                   = 6 * -4,
-    NCBI_WGS_gap_repeat                     = 7 * -4
-};
-
-/* gap linkage evidence
- *  paired-ends       paired sequences from the two ends of a DNA fragment
- *  align_genus       alignment to a reference genome within the same genus
- *  align_xgenus      alignment to a reference genome within another genus
- *  align_trnscpt     alignment to a transcript from the same species
- *  within_clone      sequence on both sides of the gap is derived from
- *                    the same clone, but the gap is not spanned by paired-ends
- *  clone_contig      linkage is provided by a clone contig in the tiling path
- *  map               linkage asserted using a non-sequence based map
- *                    such as RH, linkage, fingerprint or optical
- *  strobe            strobe sequencing (PacBio)
- *  unspecified
- */
-enum
-{
-    NCBI_WGS_gap_linkage_linked                      = 1,
-    NCBI_WGS_gap_linkage_evidence_paired_ends        = 2,
-    NCBI_WGS_gap_linkage_evidence_align_genus        = 4,
-    NCBI_WGS_gap_linkage_evidence_align_xgenus       = 8,
-    NCBI_WGS_gap_linkage_evidence_align_trnscpt      = 16,
-    NCBI_WGS_gap_linkage_evidence_within_clone       = 32,
-    NCBI_WGS_gap_linkage_evidence_clone_contig       = 64,
-    NCBI_WGS_gap_linkage_evidence_map                = 128,
-    NCBI_WGS_gap_linkage_evidence_strobe             = 256,
-    NCBI_WGS_gap_linkage_evidence_unspecified        = 512,
-    NCBI_WGS_gap_linkage_evidence_pcr                = 1024
-};
-
-
-/*--------------------------------------------------------------------------
- * accession tokenization constants
- */
-
-/* tokenize_nuc_accession
- * tokenize_prot_accession
- *  scans name on input
- *  tokenizes into parts
- */
-enum
-{
-    NCBI_WGS_acc_token_unrecognized =  1,
-    NCBI_WGS_acc_token_prefix       =  2,
-    NCBI_WGS_acc_token_contig       =  3
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ncbi_wgs_contig_ */
diff --git a/interfaces/ncbi/wgs-contig.vschema b/interfaces/ncbi/wgs-contig.vschema
deleted file mode 100644
index 457df81..0000000
--- a/interfaces/ncbi/wgs-contig.vschema
+++ /dev/null
@@ -1,695 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * WGS Contig
- */
-version 1;
-
-include 'vdb/vdb.vschema';
-include 'ncbi/ncbi.vschema';
-include 'ncbi/seq.vschema';
-include 'ncbi/spotname.vschema';
-include 'ncbi/stats.vschema';
-
-
-/*--------------------------------------------------------------------------
- * types
- * constants
- */
-
-/* component_props
- *  a signed value describing contig or gap components of scaffolds, or
- *  gaps in contig sequences.
- *  Positive values refer to contigs and negatives describe gaps
- */
-typedef I16 NCBI:WGS:component_props;
-
-/* component description
- *  the sequencing status of the component
- *
- *  These typically correspond to keywords in the INSDC submission.
- *  Current acceptable values are:
- *    A           Active Finishing
- *    D           Draft HTG (often phase1 and phase2 are called Draft,
- *                whether or not they have the draft keyword).
- *    F           Finished HTG (phase3)
- *    G           Whole Genome Finishing
- *    O           Other sequence (typically means no HTG keyword)
- *    P           Pre Draft
- *    W           WGS contig
- */
-const NCBI:WGS:component_props NCBI:WGS:component:WGS                  = 0;
-const NCBI:WGS:component_props NCBI:WGS:component:ActiveFinishing      = 1;
-const NCBI:WGS:component_props NCBI:WGS:component:DraftHTG             = 2;
-const NCBI:WGS:component_props NCBI:WGS:component:FinishedHTG          = 3;
-const NCBI:WGS:component_props NCBI:WGS:component:WholeGenomeFinishing = 4;
-const NCBI:WGS:component_props NCBI:WGS:component:OtherSequence        = 5;
-const NCBI:WGS:component_props NCBI:WGS:component:PreDraft             = 6;
-
-/* strand
- *  specifies the orientation of the component relative to scaffold
- *  values given allow strand to be determined as "prop / 16"
- *  yielding:
- *    0           unknown orientation
- *    1           plus strand
- *    2           negative strand
- */
-const NCBI:WGS:component_props NCBI:WGS:strand:plus                    = 16;
-const NCBI:WGS:component_props NCBI:WGS:strand:minus                   = 32;
-
-
-/* gap description
- *  These typically correspond to keywords in the INSDC submission.
- *  Current acceptable values are:
- *    N           gap with specified size
- *    U           gap of unknown size, defaulting to 100 bases.
- */
-const NCBI:WGS:component_props NCBI:WGS:gap:known                      = -1;
-const NCBI:WGS:component_props NCBI:WGS:gap:unknown                    = -2;
-
-/* gap type
- *  scaffold          a gap between two sequence contigs in a scaffold
- *  contig            an unspanned gap between two sequence contigs
- *  centromere        a gap inserted for the centromere
- *  short_arm         a gap inserted at the start of an acrocentric chromosome
- *  heterochromatin   a gap inserted for an especially large region of heterochromatic sequence
- *  telomere          a gap inserted for the telomere
- *  repeat            an unresolvable repeat
- */
-const NCBI:WGS:component_props NCBI:WGS:gap:scaffold                   = -4;
-const NCBI:WGS:component_props NCBI:WGS:gap:contig                     = -8;
-const NCBI:WGS:component_props NCBI:WGS:gap:centromere                 = -12;
-const NCBI:WGS:component_props NCBI:WGS:gap:short_arm                  = -16;
-const NCBI:WGS:component_props NCBI:WGS:gap:heterochromatin            = -20;
-const NCBI:WGS:component_props NCBI:WGS:gap:telomere                   = -24;
-const NCBI:WGS:component_props NCBI:WGS:gap:repeat                     = -28;
-
-/* gap_linkage
- */
-typedef I32 NCBI:WGS:gap_linkage;
-
-/* gap linkage and linkage evidence 
- * There can be multiple linkage evidences or linkage with no evidence
- * 
- *  paired-ends       paired sequences from the two ends of a DNA fragment
- *  align_genus       alignment to a reference genome within the same genus
- *  align_xgenus      alignment to a reference genome within another genus
- *  align_trnscpt     alignment to a transcript from the same species
- *  within_clone      sequence on both sides of the gap is derived from
- *                    the same clone, but the gap is not spanned by paired-ends
- *  clone_contig      linkage is provided by a clone contig in the tiling path
- *  map               linkage asserted using a non-sequence based map
- *                    such as RH, linkage, fingerprint or optical
- *  strobe            strobe sequencing (PacBio)
- *  unspecified
- *  pcr               PCR
- */
-const NCBI:WGS:gap_linkage NCBI:WGS:gap:linkage:linked                 = 1;
-const NCBI:WGS:gap_linkage NCBI:WGS:gap:linkage_evidence:paired_ends   = 2;
-const NCBI:WGS:gap_linkage NCBI:WGS:gap:linkage_evidence:align_genus   = 4;
-const NCBI:WGS:gap_linkage NCBI:WGS:gap:linkage_evidence:align_xgenus  = 8;
-const NCBI:WGS:gap_linkage NCBI:WGS:gap:linkage_evidence:align_trnscpt = 16;
-const NCBI:WGS:gap_linkage NCBI:WGS:gap:linkage_evidence:within_clone  = 32;
-const NCBI:WGS:gap_linkage NCBI:WGS:gap:linkage_evidence:clone_contig  = 64;
-const NCBI:WGS:gap_linkage NCBI:WGS:gap:linkage_evidence:map           = 128;
-const NCBI:WGS:gap_linkage NCBI:WGS:gap:linkage_evidence:strobe        = 256;
-const NCBI:WGS:gap_linkage NCBI:WGS:gap:linkage_evidence:unspecified   = 512;
-const NCBI:WGS:gap_linkage NCBI:WGS:gap:linkage_evidence:pcr           = 1024;
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-/* tokenize_nuc_accession
- * tokenize_prot_accession
- *  scans name on input
- *  tokenizes into parts
- */
-extern function text:token
-    NCBI:WGS:tokenize_nuc_accession #1 ( ascii acc );
-extern function text:token
-    NCBI:WGS:tokenize_prot_accession #1 ( ascii acc );
-
-const U16 NCBI:WGS:acc_token:unrecognized =  1;
-const U16 NCBI:WGS:acc_token:prefix       =  2;
-const U16 NCBI:WGS:acc_token:contig       =  3;
-
-
-/* build_scaffold_read
- *  assembles contigs and gaps into a single row
- *  transcribes + strand contigs as they are,
- *  performs reverse complement of - strand contigs,
- *  fills gaps with stated number of N
- *
- * build_scaffold_quality
- *  assembles contig and gap qualities into a single row
- *  contig qualities are taken as they are,
- *  gap qualities are assigned a constant
- *
- *  "component_start" [ DATA ] - starting locations on each
- *   component or 0 for gaps. normal starting point is 0,
- *   but offsets are supported.
- *  NB - ONE-BASED COORDINATES
- *
- *  "component_len" [ DATA ] - length of contig sequence
- *   from component_start, or length of gap, projected onto
- *   scaffold at scaffold_start.
- *
- *  "component_props" [ DATA ] - see discussion of type
- *   distinguish between contigs and gaps, indicate strand
- *
- *  "component_id" [ DATA ] - foreign keys into SEQUENCE table
- *   row_len ( component_id ) == count-of-contigs ( component_props )
- */
-extern function INSDC:4na:bin NCBI:WGS:build_scaffold_read #1
-    ( INSDC:coord:one component_start, INSDC:coord:len component_len,
-      NCBI:WGS:component_props component_props, I64 component_id );
-
-extern function INSDC:quality:phred NCBI:WGS:build_scaffold_qual #1
-    ( INSDC:coord:one component_start, INSDC:coord:len component_len,
-      NCBI:WGS:component_props component_props, I64 component_id );
-
-
-/* build_read_type
- *  generate standard SRA read type from component properties
- *  contigs are biological, gaps are technical
- *
- *  "component_props" [ DATA ] - see discussion of type
- *   distinguish between contigs and gaps, indicate strand
- */
-extern function INSDC:SRA:xread_type
-    NCBI:WGS:build_read_type #1 ( NCBI:WGS:component_props component_props );
-
-
-/*--------------------------------------------------------------------------
- * nucleotide
- */
-table NCBI:WGS:tbl:nucleotide #1.1
-    = NCBI:tbl:base_space #2.0.3
-    , NCBI:tbl:phred_quality #2.0.4
-    , NCBI:SRA:tbl:stats #1.2.0
-{
-    /* ACCESSION
-     *  [<opt-prefix>]<4-letter-prefix><2-digit-version><6-or-7-digit-contig>
-     */
-    extern column ascii ACCESSION = out_accession;
-    extern column U32   ACC_VERSION = .ACC_VERSION | <U32> echo <1> ();
-
-    // input
-    ascii in_accession = ACCESSION;
-
-    // parsed input
-    text:token in_acc_token
-        = NCBI:WGS:tokenize_nuc_accession ( in_accession );
-    //  [<opt-prefix>]<4-letter-prefix><2-digit-version>
-    ascii in_acc_prefix
-        = extract_token < 0 > ( in_accession, in_acc_token );
-    // <6-or-7-digit-contig>
-    ascii in_contig_text
-        = extract_token < 1 > ( in_accession, in_acc_token );
-    U32 in_contig_len
-        = row_len ( in_contig_text );
-    U64 in_contig_bin
-        = strtonum ( in_contig_text );
-
-    // physical storage
-    physical column < ascii > zip_encoding .ACC_PREFIX = in_acc_prefix;
-    physical column < U32 > izip_encoding .ACC_CONTIG_LEN = in_contig_len;
-    physical column < U64 > izip_encoding .ACC_CONTIG = in_contig_bin;
-    physical column < U32 > izip_encoding .ACC_VERSION = ACC_VERSION; //needed to back-fill WGS data from ID where version may be > 1
-
-    // output
-    ascii out_acc_prefix
-        = .ACC_PREFIX
-        | < ascii > meta:read < 'ACC_PREFIX', true > ()
-        ;
-    U32 out_acc_contig_len
-        = .ACC_CONTIG_LEN
-        | < U32 > meta:value < 'ACC_CONTIG_LEN', true > ()
-        ;
-    U64 out_acc_contig
-        = .ACC_CONTIG
-        | ( U64 ) row_id ()
-        ;
-    ascii out_accession
-        = sprintf < "%s%0*u" > ( out_acc_prefix, out_acc_contig_len, out_acc_contig );
-
-    readonly column ascii ACC_PREFIX
-        = .ACC_PREFIX
-        | < ascii > meta:read < 'ACC_PREFIX', true > ()
-        ;
-    readonly column U32 ACC_CONTIG_LEN
-        = .ACC_CONTIG_LEN
-        | < U32 > meta:value < 'ACC_CONTIG_LEN', true > ()
-        ;
-
-    /* CONTIG_NAME
-     *  principal name
-     */
-    extern column utf8 CONTIG_NAME
-        = idx:text:project #1.0 < 'contig_name' > ( .CONTIG_NAME );
-
-    physical column < utf8 > zip_encoding .CONTIG_NAME
-        = idx:text:insert #1.0 < 'contig_name' > ( CONTIG_NAME );
-
-    ascii out_contig_name = cast ( CONTIG_NAME );
-
-    // NB - this is only useful if CONTIG_NAME is unique
-    // or if clustered by CONTIG_NAME
-    readonly column vdb:row_id_range CONTIG_NAME_ROW_RANGE
-        = idx:text:lookup #1.0 < 'contig_name', 'NAME_QUERY' > ();
-
-    /* EXTRA_SEQIDS
-     *  pipe-separated list of additional names
-     */
-    extern column < ascii > zip_encoding EXTRA_SEQIDS;
-
-    /* TITLE
-     */
-    extern column < ascii > zip_encoding TITLE;
-
-    /* GI
-     *  gi is indexed in a parallel table
-     */
-    extern column < NCBI:gi > izip_encoding GI;
-
-    /* TAXID
-     *  taxonomy id
-     */
-    extern column < NCBI:taxid > izip_encoding TAXID;
-
-    /* GB_STATE
-     *  genbank state
-     */
-    extern column < NCBI:gb_state > izip_encoding GB_STATE;
-
-    /* DESCR
-     *  ASN.1 description
-     */
-    extern column < NCBI:asn:binary > zip_encoding DESCR;
-
-    /* ANNOT
-     *  ASN.1 annotation
-     */
-    extern column < NCBI:asn:binary > zip_encoding ANNOT;
-
-    /* GAP_START
-     *  Starting position of a gap
-     */
-    extern column < INSDC:coord:zero > izip_encoding GAP_START;
-
-    /* GAP_LEN
-     *  Length of a gap
-     */
-    extern column < INSDC:coord:len > izip_encoding GAP_LEN;
-
-    /* GAP_PROPS
-     *  See description of type
-     */
-    extern column < NCBI:WGS:component_props > zip_encoding GAP_PROPS;
-
-    /* GAP_LINKAGE
-     *  See description of type
-     */
-    extern column < NCBI:WGS:gap_linkage> zip_encoding GAP_LINKAGE;
-
-
-    ascii out_seqid_gi = sprintf < "gi|%u" > ( .GI );
-    ascii out_seqid_gb = sprintf < "gb|%s.%u|" > ( out_accession, ACC_VERSION )
-                       | sprintf < "gb|%s.1|" > ( out_accession );
-    ascii out_seqid_gnl = sprintf < "gnl|WGS:%s|%s" > (.ACC_PREFIX, out_contig_name ) | <ascii> echo < '' > ();
-
-
-    /* outputs to spotname */
-    ascii out_seqid_name
-        = sprintf < "%s|%s" > ( out_seqid_gi , out_seqid_gb )
-		| sprintf < "%s" > ( out_seqid_gb );
-
-    ascii out_spot_name = sprintf < "%s %s" > ( out_seqid_name, .TITLE );
-
-    readonly column ascii SEQ_ID = out_seqid_name;
-    readonly column ascii SEQ_ID_GNL = out_seqid_gnl;
-
-    /* outputs to spotdesc */
-    // INSDC:coord:len in_read_len  = (INSDC:coord:len) row_len ( in_2na_bin );
-    INSDC:coord:len  out_read_len = (INSDC:coord:len) row_len ( out_2na_bin );
-    INSDC:coord:len  trim_len = (INSDC:coord:len) row_len ( out_2na_bin );
-    INSDC:coord:zero out_read_start = <INSDC:coord:zero> echo < 0 > ();
-    INSDC:coord:zero trim_start = <INSDC:coord:zero> echo < 0 > ();
-    INSDC:SRA:read_filter out_rd_filter = < INSDC:SRA:read_filter > echo < SRA_READ_FILTER_PASS > ();
-    INSDC:SRA:xread_type  out_read_type = < INSDC:SRA:xread_type > echo < SRA_READ_TYPE_BIOLOGICAL > ();
-    // help trigger statistics
-    INSDC:SRA:xread_type  _alt_in_read_type = < INSDC:SRA:xread_type > echo < SRA_READ_TYPE_BIOLOGICAL > ();
-    INSDC:coord:len       _alt_in_read_len  = (INSDC:coord:len) row_len ( in_2na_bin );
-
-    ascii out_label = < ascii > echo < "contig" > ();
-    INSDC:coord:len out_label_len = < INSDC:coord:len > echo < 6 > ();
-    INSDC:coord:zero out_label_start = < INSDC:coord:zero > echo < 0 > ();
-
-    INSDC:SRA:platform_id out_platform = < INSDC:SRA:platform_id > echo < SRA_PLATFORM_UNDEFINED > ();
-};
-
-
-/*--------------------------------------------------------------------------
- * protein
- *  contig
- */
-table NCBI:WGS:tbl:protein #1
-    = NCBI:tbl:protein #1.0.0
-{
-    /* ACCESSION
-     *  [<opt-prefix>]<4-letter-prefix><2-digit-version><6-or-7-digit-contig>
-     */
-    extern column ascii ACCESSION = out_accession;
-
-    // input
-    ascii in_accession = ACCESSION;
-
-    // parsed input
-    text:token in_acc_token
-        = NCBI:WGS:tokenize_prot_accession ( in_accession );
-    //  [<opt-prefix>]<4-letter-prefix><2-digit-version>
-    ascii in_acc_prefix
-        = extract_token < 0 > ( in_accession, in_acc_token );
-    // <6-or-7-digit-contig>
-    ascii in_contig_text
-        = extract_token < 1 > ( in_accession, in_acc_token );
-    U32 in_contig_len
-        = row_len ( in_contig_text );
-    I64 in_contig_bin
-        = strtonum ( in_contig_text );
-
-    // physical storage
-    physical column < ascii > zip_encoding .ACC_PREFIX = in_acc_prefix;
-    physical column < U32 > izip_encoding .ACC_CONTIG_LEN = in_contig_len;
-    physical column < U64 > izip_encoding .ACC_CONTIG = in_contig_bin;
-
-    // output
-    ascii out_acc_prefix
-        = .ACC_PREFIX
-        | < ascii > meta:read < 'ACC_PREFIX', true > ()
-        ;
-    U32 out_acc_contig_len
-        = .ACC_CONTIG_LEN
-        | < U32 > meta:value < 'ACC_CONTIG_LEN', true > ()
-        ;
-    U64 out_acc_contig
-        = .ACC_CONTIG
-        | ( U64 ) row_id ()
-        ;
-    ascii out_accession
-        = sprintf < "%s%0*u" > ( out_acc_prefix, out_acc_contig_len, out_acc_contig );
-
-    /* TITLE
-     */
-    extern column < ascii > zip_encoding TITLE;
-
-    /* GI
-     *  gi is indexed in a parallel table
-     */
-    extern column < NCBI:gi > izip_encoding GI;
-
-    /* GB_STATE
-     *  genbank state
-     */
-    extern column < NCBI:gb_state > izip_encoding GB_STATE;
-
-    /* DESCR
-     *  ASN.1 description
-     */
-    extern column < NCBI:asn:binary > zip_encoding DESCR;
-
-    /* ANNOT
-     *  ASN.1 annotation
-     */
-    extern column < NCBI:asn:binary > zip_encoding ANNOT;
-
-    /* outputs to spotname */
-    ascii out_seqid_name = sprintf < "TBD" > ( .ACC_PREFIX, out_accession );
-    ascii out_spot_name = sprintf < "%s %s" > ( out_seqid_name, .TITLE );
-
-    /* TBD
-     *  need to create an extension to NCBI:tbl:protein
-     *  that satisfies fastq-dump requirements for READ and QUALITY
-     */
-};
-
-
-/*--------------------------------------------------------------------------
- * gi_idx
- *  gi is row-id
- */
-table NCBI:WGS:tbl:gi_idx #1
-{
-    /* NUC_ROW_ID
-     *  row-id in nucleotide table
-     */
-    extern column < I64 > izip_encoding NUC_ROW_ID;
-
-    /* PROT_ROW_ID
-     *  row-id in protein table
-     */
-    extern column < I64 > izip_encoding PROT_ROW_ID;
-};
-
-
-/*--------------------------------------------------------------------------
- * scaffold
- *  records AGP data
- */
-table NCBI:WGS:tbl:scaffold #1
-{
-    /* SCAFFOLD_NAME
-     *  This is the identifier for the object being assembled.
-     *  This can be a chromosome, scaffold or contig.
-     *  If an accession.version identifier is not used to describe
-     *  the object the naming convention is to precede chromosome numbers
-     *  (e.g. chr1) and linkage group numbers  (e.g. LG3).
-     *  Contigs or scaffolds may have any identifier that is unique
-     *  within the assembly
-     */
-    extern column utf8 SCAFFOLD_NAME
-        = out_scaffold_name;
-    extern column ascii SCAFFOLD_NAME = cast (out_scaffold_name);
-    utf8 out_scaffold_name
-        = idx:text:project #1.0 < 'scaffold_name' > ( .SCAFFOLD_NAME );
-    physical column < utf8 > zip_encoding .SCAFFOLD_NAME
-        = idx:text:insert #1.0 < 'scaffold_name' > ( SCAFFOLD_NAME );
-
-    /* COMPONENT_START
-     *  starting position within the component sequence
-     */
-    extern column < INSDC:coord:one > izip_encoding COMPONENT_START;
-
-    /* COMPONENT_LEN
-     *  length of the component/gap projected onto the scaffold
-     */
-    extern column < INSDC:coord:len > izip_encoding COMPONENT_LEN;
-
-    /* COMPONENT_PROPS
-     *  see description of type
-     */
-    extern column < NCBI:WGS:component_props > zip_encoding COMPONENT_PROPS;
-
-    /* COMPONENT_ID
-     *  one row-id for each non-gap component
-     */
-    extern column < I64 > izip_encoding COMPONENT_ID;
-
-    /* COMPONENT_LINKAGE
-     *  see description of type
-     *  one row-id for each gap component
-     */
-    extern column < NCBI:WGS:gap_linkage > zip_encoding COMPONENT_LINKAGE;
-}
-
-table NCBI:WGS:view:scaffold #1 = NCBI:WGS:tbl:scaffold #1
-{
-    /* ACCESSION
-     *  scaffold accession
-     */
-    readonly column ascii ACCESSION
-        = out_accession;
-    I64 scaffold_row_id
-        = row_id ();
-    I64 acc_row_id
-        = < I64 > echo < 1 > ();
-    ascii acc_prefix
-        = < ascii > simple_sub_select < 'SEQUENCE', 'ACC_PREFIX' > ( acc_row_id );
-    U32 acc_contig_len
-        = < U32 > simple_sub_select < 'SEQUENCE', 'ACC_CONTIG_LEN' > ( acc_row_id );
-    ascii out_accession
-        = sprintf < "%sS%0*d" > ( acc_prefix, acc_contig_len, scaffold_row_id );
-
-    /* READ
-     *  base space construction of entire scaffold
-     */
-
-    // construct the read from contigs and gaps
-    INSDC:4na:bin out_4na_bin = NCBI:WGS:build_scaffold_read
-        ( .COMPONENT_START, .COMPONENT_LEN, .COMPONENT_PROPS, .COMPONENT_ID );
-
-    // various READ columns
-    default readonly column INSDC:dna:text READ
-        = < INSDC:4na:bin, INSDC:dna:text > map < INSDC:4na:map:BINSET, INSDC:4na:map:CHARSET > ( out_4na_bin );
-    readonly column INSDC:4na:bin READ
-        = out_4na_bin;
-    readonly column INSDC:4na:packed READ
-        = pack ( out_4na_bin );
-    readonly column INSDC:x2na:bin READ
-        = out_x2na_bin;
-    INSDC:x2na:bin out_x2na_bin
-        = < INSDC:4na:bin, INSDC:x2na:bin > map < INSDC:4na:map:BINSET, [ 4,0,1,4,2,4,4,4,3,4,4,4,4,4,4,4 ] > ( out_4na_bin );
-    readonly column INSDC:2na:bin READ
-        = out_2na_bin;
-    INSDC:2na:bin out_2na_bin
-        = < INSDC:x2na:bin, INSDC:2na:bin > map < INSDC:x2na:map:BINSET, [ 0, 1, 2, 3, 0 ] > ( out_x2na_bin );
-    readonly column INSDC:2na:packed READ
-        = pack ( out_2na_bin );
-
-
-    /* CSREAD
-     *  base space converted to color space
-     */
-    default readonly column INSDC:color:text CSREAD
-        = < INSDC:x2cs:bin, INSDC:color:text > map <  INSDC:x2cs:map:BINSET, INSDC:x2cs:map:CHARSET > ( out_x2cs_bin );
-    readonly column INSDC:x2cs:bin CSREAD
-        = out_x2cs_bin;
-    INSDC:x2cs:bin out_x2cs_bin
-        = NCBI:color_from_dna ( out_x2na_bin, out_read_start, .COMPONENT_LEN, out_cs_key, out_color_matrix );
-    readonly column INSDC:2cs:bin CSREAD
-        = out_2cs_bin;
-    INSDC:2cs:bin out_2cs_bin
-        = < INSDC:x2cs:bin, INSDC:2cs:bin > map < INSDC:x2cs:map:BINSET, [ 0, 1, 2, 3, 0 ] > ( out_x2cs_bin );
-    readonly column INSDC:2cs:packed CSREAD
-        = pack ( out_2cs_bin );
-
-    /* CS_NATIVE
-     *  is color-space the native sequence space
-     */
-    readonly column bool CS_NATIVE
-        = < bool > echo < false > ();
-
-    /* CS_KEY
-     *  leading call given in base-space
-     */
-    readonly column INSDC:dna:text CS_KEY
-        = out_cs_key;
-    INSDC:dna:text out_cs_key
-        = < INSDC:dna:text > echo < 'T' > ( .COMPONENT_LEN );
-
-    /* COLOR_MATRIX
-     *  matrix used for color-space conversions
-     */
-    readonly column U8 COLOR_MATRIX
-        = out_color_matrix;
-    U8 out_color_matrix
-        = < U8 > echo < INSDC:color:default_matrix > ();
-
-
-    /* QUALITY
-     *  base or color call qualities
-     */
-    INSDC:quality:phred out_qual_phred = NCBI:WGS:build_scaffold_qual
-        ( .COMPONENT_START, .COMPONENT_LEN, .COMPONENT_PROPS, .COMPONENT_ID );
-
-    // PHRED is default
-    default readonly column INSDC:quality:phred QUALITY
-        = out_qual_phred;
-
-    // textual encodings
-    readonly column INSDC:quality:text:phred_33 QUALITY
-        = ( INSDC:quality:text:phred_33 ) < B8 > sum < 33 > ( out_qual_phred );
-    readonly column INSDC:quality:text:phred_64 QUALITY
-        = ( INSDC:quality:text:phred_64 ) < B8 > sum < 64 > ( out_qual_phred );
-
-
-    /* PLATFORM
-     *  sequencing platform, if known
-     */
-    INSDC:SRA:platform_id out_platform
-        = < INSDC:SRA:platform_id > echo < SRA_PLATFORM_UNDEFINED > ();
-    readonly column INSDC:SRA:platform_id PLATFORM
-        = out_platform;
-
-    /* SPOT_ID
-     *  support for libsra
-     */
-    INSDC:SRA:spotid_t out_spot_id
-        = cast ( scaffold_row_id );
-    readonly column INSDC:SRA:spotid_t SPOT_ID
-        = out_spot_id;
-
-    /* NAME
-     *  spot name
-     */
-    readonly column ascii NAME
-        = out_scaffold_name;
-
-    /* SPOT_LEN
-     * TRIM_START
-     * TRIM_LEN
-     *  spot descriptor
-     */
-    readonly column INSDC:coord:len SPOT_LEN
-        = out_spot_len;
-    INSDC:coord:len out_spot_len
-        = < INSDC:coord:len > vec_sum ( .COMPONENT_LEN );
-    readonly column INSDC:coord:zero TRIM_START
-        = < INSDC:coord:zero > echo < 0 > ();
-    readonly column INSDC:coord:len TRIM_LEN
-        = out_spot_len;
-
-
-    /* READ_START
-     * READ_LEN
-     * READ_TYPE
-     *  read descriptor portion
-     */
-    readonly column INSDC:coord:zero READ_START
-        = out_read_start;
-    INSDC:coord:zero out_read_start
-        = ( INSDC:coord:zero ) < U32 > integral ( .COMPONENT_LEN );
-    readonly column INSDC:coord:len READ_LEN
-        = .COMPONENT_LEN;
-    readonly column INSDC:SRA:xread_type READ_TYPE
-        = out_read_type;
-    INSDC:SRA:xread_type out_read_type
-        = NCBI:WGS:build_read_type ( .COMPONENT_PROPS );
-}
-
-
-/*--------------------------------------------------------------------------
- * contig
- */
-database NCBI:WGS:db:contig #1.1
-{
-    table NCBI:WGS:tbl:nucleotide SEQUENCE;
-    table NCBI:WGS:tbl:protein PROTEIN;
-    table NCBI:WGS:tbl:gi_idx GI_IDX;
-    table NCBI:WGS:view:scaffold SCAFFOLD;
-};
diff --git a/interfaces/ngs/Model.graphml b/interfaces/ngs/Model.graphml
deleted file mode 100644
index 4d724c5..0000000
--- a/interfaces/ngs/Model.graphml
+++ /dev/null
@@ -1,801 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
-  <!--Created by yFiles for Java 2.11-->
-  <key for="graphml" id="d0" yfiles.type="resources"/>
-  <key for="port" id="d1" yfiles.type="portgraphics"/>
-  <key for="port" id="d2" yfiles.type="portgeometry"/>
-  <key for="port" id="d3" yfiles.type="portuserdata"/>
-  <key attr.name="url" attr.type="string" for="node" id="d4"/>
-  <key attr.name="description" attr.type="string" for="node" id="d5"/>
-  <key for="node" id="d6" yfiles.type="nodegraphics"/>
-  <key attr.name="Description" attr.type="string" for="graph" id="d7"/>
-  <key attr.name="url" attr.type="string" for="edge" id="d8"/>
-  <key attr.name="description" attr.type="string" for="edge" id="d9"/>
-  <key for="edge" id="d10" yfiles.type="edgegraphics"/>
-  <graph edgedefault="directed" id="G">
-    <data key="d7"/>
-    <node id="n0">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="353.0" width="218.0" x="187.0" y="347.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="73.17041015625" x="72.414794921875" y="3.0">Alignment<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel>AlignmentId
-ReferenceSpec
-MappingQuality
-ReadGroup
-ReadId
-AlignmentCategory
-AlignmentPosition
-AlignmentLength
-IsReversedOrientation
-TemplateLength
-MateAlignmentId
-MateReferenceSpec
-MateIsReversedOrientation</y:AttributeLabel>
-            <y:MethodLabel>getReferenceBases ()
-getFragment ()
-getFragmentBases ( clipped )
-getFragmentQualities ( clipped )
-getSoftClip ( edge )
-getShortCigar ( clipped )
-getLongCigar ( clipped )
-getMateAlignment ()</y:MethodLabel>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n1">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="175.0" width="290.0" x="-211.0" y="577.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="67.62255859375" x="111.188720703125" y="3.0">Fragment<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel>FragmentId
-ReadGroup
-ReadId
-FragmentName</y:AttributeLabel>
-            <y:MethodLabel>getFragmentBases ()
-getSubFragmentBases ( offset, length )
-getFragmentQualities ()
-getSubFragmentQualities ( offset, length )</y:MethodLabel>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n2">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="198.0" width="266.0" x="-161.0" y="315.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="36.8427734375" x="114.57861328125" y="3.0">Read<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel>ReadId
-ReadCategory
-NumFragments
-ReadGroup
-ReadName</y:AttributeLabel>
-            <y:MethodLabel>getIndexedFragment ( index )
-getReadBases ()
-getSubReadBases ( offset, length )
-getReadQualities ()
-getSubReadQualities ( offset length )
-</y:MethodLabel>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n3">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="116.0" width="266.0" x="554.0" y="295.5"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="45.1962890625" x="110.40185546875" y="3.0">Pileup<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel>ReferenceSpec
-ReferencePosition
-PileupDepth</y:AttributeLabel>
-            <y:MethodLabel>getPileupEvents ()</y:MethodLabel>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n4">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="264.0" width="229.0" x="478.0" y="464.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="82.1396484375" x="73.43017578125" y="3.0">PileupEvent<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel>ReferenceSpec
-ReferencePosition
-MappingQuality
-AlignmentId
-Alignment
-AlignmentPosition
-FirstAlignmentPosition
-LastAlignmentPosition
-EventType</y:AttributeLabel>
-            <y:MethodLabel>getAlignmentBase ()
-getAlignmentQuality ()
-getInsertionBases ()
-getInsertionQualities ()
-getDeletionCount ()</y:MethodLabel>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n5">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="86.0" width="194.0" x="755.0" y="464.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="132.36865234375" x="30.815673828125" y="3.0">PileupEventIterator<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel>[PileupEvent]</y:AttributeLabel>
-            <y:MethodLabel>nextPileupEvent ()</y:MethodLabel>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n6">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="86.0" width="202.0" x="195.0" y="110.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="123.3994140625" x="39.30029296875" y="3.0">AlignmentIterator<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel>[Alignment]</y:AttributeLabel>
-            <y:MethodLabel>nextAlignment ()</y:MethodLabel>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n7">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="77.0" width="155.0" x="-169.5" y="157.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="87.07177734375" x="33.964111328125" y="3.0">ReadIterator<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel>[Read]</y:AttributeLabel>
-            <y:MethodLabel>nextRead ()</y:MethodLabel>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n8">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="77.0" width="123.0" x="769.0" y="178.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="95.42529296875" x="13.787353515625" y="3.0">PileupIterator<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel>[Pileup]</y:AttributeLabel>
-            <y:MethodLabel>nextPileup ()</y:MethodLabel>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n9">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="97.0" width="176.0" x="-414.5" y="110.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="77.8994140625" x="49.05029296875" y="3.0">ReadGroup<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel>Name</y:AttributeLabel>
-            <y:MethodLabel>getRead ( readId )
-getReads ( categories )</y:MethodLabel>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n10">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="86.0" width="162.0" x="-302.5" y="-56.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="128.12841796875" x="16.935791015625" y="3.0">ReadGroupIterator<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel>[ReadGroup]</y:AttributeLabel>
-            <y:MethodLabel>nextReadGroup ()</y:MethodLabel>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n11">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="159.0" width="238.0" x="488.0" y="73.5"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="70.193359375" x="83.9033203125" y="3.0">Reference<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel>CommonName
-CanonicalName
-IsCircular</y:AttributeLabel>
-            <y:MethodLabel>getReferenceBases ( offset, length )
-getReferenceChunk ( offset, length )
-getAlignment ( alignmentId )
-getAlignments ( categories )
-getPileups ( categories )</y:MethodLabel>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n12">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="77.0" width="202.0" x="271.0" y="-66.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="120.42236328125" x="40.788818359375" y="3.0">ReferenceIterator<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel>[Reference]</y:AttributeLabel>
-            <y:MethodLabel>nextReference ()</y:MethodLabel>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n13">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="198.0" width="194.0" x="-26.0" y="-139.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="103.734375" x="45.1328125" y="3.0">ReadCollection<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel>Name</y:AttributeLabel>
-            <y:MethodLabel>getReadGroups ()
-getReadGroup ( name )
-getReferences ()
-getReference ( spec )
-getAlignment ( alignmentId )
-getAlignments ( categories )
-getRead ( readId )
-getReads ( categories )</y:MethodLabel>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n14">
-      <data key="d4"/>
-      <data key="d5"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="91.19999999999999" width="209.79999999999967" x="383.60000000000014" y="-229.29999999999998"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="66.07373046875" x="71.86313476562484" y="3.0">NCBI.NGS<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="( implementation-specific )" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel/>
-            <y:MethodLabel>static openReadCollection ( spec )</y:MethodLabel>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <edge id="e0" source="n0" target="n1">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e1" source="n2" target="n1">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e2" source="n4" target="n0">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e3" source="n3" target="n5">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e4" source="n5" target="n4">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="diamond" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e5" source="n6" target="n0">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-32.0" y="73.48907470703125">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e6" source="n0" target="n2">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="dashed" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-41.73501226999932" y="-47.09593372623726">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e7" source="n7" target="n2">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="diamond" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e8" source="n8" target="n3">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="diamond" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e9" source="n9" target="n7">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="32.47662353515625" y="33.810942563487714">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e10" source="n9" target="n2">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="39.1661330500778" y="72.7249867775106">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e11" source="n10" target="n9">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-59.01310904658317" y="33.66708175385955">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e12" source="n11" target="n6">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e13" source="n11" target="n0">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e14" source="n11" target="n8">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e15" source="n12" target="n11">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="diamond" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e16" source="n13" target="n10">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-59.23797607421875" y="-26.844034061519977">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e17" source="n13" target="n9">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-121.63126501968361" y="24.207806803793524">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e18" source="n13" target="n12">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="49.5347900390625" y="30.16600686402702">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e19" source="n13" target="n11">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="156.41876389649815" y="86.92812830870787">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e20" source="n13" target="n7">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-66.00308831124255" y="37.75768475141834">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e21" source="n13" target="n2">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-60.61519740735096" y="125.9923095703125">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e22" source="n13" target="n6">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="0.0826200123946137" y="39.3111572265625">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e23" source="n13" target="n0">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="24.010842195850415" y="144.04399338679">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e24" source="n14" target="n13">
-      <data key="d8"/>
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-111.17167211091464" y="3.848688046464474">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-  </graph>
-  <data key="d0">
-    <y:Resources/>
-  </data>
-</graphml>
diff --git a/interfaces/ngs/NOTES.txt b/interfaces/ngs/NOTES.txt
deleted file mode 100644
index 2371e2f..0000000
--- a/interfaces/ngs/NOTES.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-NGS API NOTES
-
-Alignments have ID numbers
-
-Reads (spots) have ID numbers
-
-Fragments (reads) have ID numbers
-  Andrew already did something like this for blast
-
diff --git a/interfaces/ngs/SimpleModel.graphml b/interfaces/ngs/SimpleModel.graphml
deleted file mode 100644
index d4b6e7e..0000000
--- a/interfaces/ngs/SimpleModel.graphml
+++ /dev/null
@@ -1,395 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
-  <!--Created by yEd 3.12-->
-  <key for="graphml" id="d0" yfiles.type="resources"/>
-  <key for="port" id="d1" yfiles.type="portgraphics"/>
-  <key for="port" id="d2" yfiles.type="portgeometry"/>
-  <key for="port" id="d3" yfiles.type="portuserdata"/>
-  <key attr.name="url" attr.type="string" for="node" id="d4"/>
-  <key attr.name="description" attr.type="string" for="node" id="d5"/>
-  <key for="node" id="d6" yfiles.type="nodegraphics"/>
-  <key attr.name="Description" attr.type="string" for="graph" id="d7"/>
-  <key attr.name="url" attr.type="string" for="edge" id="d8"/>
-  <key attr.name="description" attr.type="string" for="edge" id="d9"/>
-  <key for="edge" id="d10" yfiles.type="edgegraphics"/>
-  <graph edgedefault="directed" id="G">
-    <data key="d7"/>
-    <node id="n0">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="38.0" width="148.0" x="64.5" y="73.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="73.17041015625" x="37.414794921875" y="3.0">Alignment<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel/>
-            <y:MethodLabel/>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n1">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="38.0" width="109.0" x="-74.5" y="141.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="67.62255859375" x="20.688720703125" y="3.0">Fragment<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel/>
-            <y:MethodLabel/>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n2">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="38.0" width="100.0" x="-60.0" y="21.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="36.8427734375" x="31.57861328125" y="3.0">Read<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel/>
-            <y:MethodLabel/>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n3">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="38.0" width="118.0" x="235.0" y="21.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="45.1962890625" x="36.40185546875" y="3.0">Pileup<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel/>
-            <y:MethodLabel/>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n4">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="38.0" width="126.0" x="173.0" y="165.5"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="82.1396484375" x="21.93017578125" y="3.0">PileupEvent<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel/>
-            <y:MethodLabel/>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n5">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="38.0" width="124.5" x="-165.5" y="-71.5"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="77.8994140625" x="23.30029296875" y="3.0">ReadGroup<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel/>
-            <y:MethodLabel/>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n6">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="38.0" width="137.0" x="105.5" y="-71.5"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="70.193359375" x="33.4033203125" y="3.0">Reference<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel/>
-            <y:MethodLabel/>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n7">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="47.0" width="132.0" x="-26.0" y="-159.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="103.734375" x="14.1328125" y="3.0">ReadCollection<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel/>
-            <y:MethodLabel/>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <edge id="e0" source="n0" target="n1">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e1" source="n2" target="n1">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e2" source="n4" target="n0">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e3" source="n0" target="n2">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="dashed" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-14.19148897834745" y="-38.055172526208324">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e4" source="n5" target="n2">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-4.007963733963948" y="38.26432184694302">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e5" source="n6" target="n0">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e6" source="n7" target="n5">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-60.71504909969883" y="-2.652013919268711">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e7" source="n7" target="n6">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="0.40478052236488793" y="34.778252383897694">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e8" source="n7" target="n2">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-51.95935901388586" y="63.8672135966746">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e9" source="n7" target="n0">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="6.413753975550506" y="92.93783252936389">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e10" source="n6" target="n3">
-      <data key="d8"/>
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="3.528034544234771" y="40.1394934807687">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e11" source="n3" target="n4">
-      <data key="d8"/>
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="white_diamond" target="standard"/>
-          <y:EdgeLabel alignment="center" configuration="AutoFlippingLabel" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="custom" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-54.85623314421002" y="49.14751957888981">
-            <y:LabelModel>
-              <y:SmartEdgeLabelModel autoRotationEnabled="false" defaultAngle="0.0" defaultDistance="10.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartEdgeLabelModelParameter angle="0.0" distance="30.0" distanceToCenter="true" position="right" ratio="0.5" segment="0"/>
-            </y:ModelParameter>
-            <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
-          </y:EdgeLabel>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-  </graph>
-  <data key="d0">
-    <y:Resources/>
-  </data>
-</graphml>
diff --git a/interfaces/ngs/cstdint b/interfaces/ngs/cstdint
deleted file mode 100644
index 9a6118b..0000000
--- a/interfaces/ngs/cstdint
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdint.h>
diff --git a/interfaces/ngs/ncbi/NGS.hpp b/interfaces/ngs/ncbi/NGS.hpp
deleted file mode 100644
index 950c4f8..0000000
--- a/interfaces/ngs/ncbi/NGS.hpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_ngs_ncbi_NGS_
-#define _hpp_ngs_ncbi_NGS_
-
-#ifndef _hpp_ngs_read_collection_
-#include <ngs/ReadCollection.hpp>
-#endif
-
-#ifndef _hpp_ngs_reference_sequence_
-#include <ngs/ReferenceSequence.hpp>
-#endif
-
-
-/*==========================================================================
- * NCBI NGS Engine
- *  this class binds the NGS interface to NCBI's NGS implementation
- *  all of the code operates natively on SRA files
- */
-namespace ncbi
-{
-
-    /*----------------------------------------------------------------------
-     * typedefs used to import names from ngs namespace
-     */
-    typedef :: ngs :: String String;
-    typedef :: ngs :: ErrorMsg ErrorMsg;
-    typedef :: ngs :: ReadCollection ReadCollection;
-    typedef :: ngs :: ReferenceSequence ReferenceSequence;
-
-
-    /*======================================================================
-     * NGS
-     *  static implementation root
-     */
-    class NGS
-    {
-    public:
-
-        /* setAppVersionString
-         *  updates User-Agent header in HTTP communications
-         *
-         *  example usage:
-         *    ncbi::NGS::setAppVersionString ( "pileup-stats.1.0.0" );
-         */
-        static
-        void setAppVersionString ( const String & app_version )
-            throw ();
-
-        /* openReadCollection
-         *  create an object representing a named collection of reads
-         *  "spec" may be a path to an object
-         *  or may be an id, accession, or URL
-         */
-        static 
-        ReadCollection openReadCollection ( const String & spec )
-            throw ( ErrorMsg );
-
-        /* openReferenceSequence
-         *  create an object representing a named reference
-         *  "spec" may be a path to an object
-         *  or may be an id, accession, or URL
-         */
-        static 
-        ReferenceSequence openReferenceSequence ( const String & spec )
-            throw ( ErrorMsg );
-    };
-
-} // ncbi
-
-#endif // _hpp_ngs_ncbi_NGS_
diff --git a/interfaces/os/linux/os-native.h b/interfaces/os/linux/os-native.h
deleted file mode 100644
index 7dc63e8..0000000
--- a/interfaces/os/linux/os-native.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_os_native_
-#define _h_os_native_
-
-#ifndef _h_unix_native_
-#include "../unix/unix-native.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_os_native_ */
diff --git a/interfaces/os/mac/byteswap.h b/interfaces/os/mac/byteswap.h
deleted file mode 100644
index 172fd8b..0000000
--- a/interfaces/os/mac/byteswap.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_mac_byteswap_
-#define _h_mac_byteswap_
-
-#include <architecture/byte_order.h>
-
-/* make these look the same as on Linux
-   use the lower-level Mac routines, as
-   they are specific in their data types */
-#define bswap_16(x) OSSwapInt16 (x)
-#define bswap_32(x) OSSwapInt32 (x)
-#define bswap_64(x) OSSwapInt64 (x)
-
-#endif /* _h_mac_byteswap_ */
diff --git a/interfaces/os/mac/endian.h b/interfaces/os/mac/endian.h
deleted file mode 100644
index 367e1f0..0000000
--- a/interfaces/os/mac/endian.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_mac_endian_
-#define _h_mac_endian_
-
-#include <machine/endian.h>
-
-#define __LITTLE_ENDIAN   LITTLE_ENDIAN
-#define __BIG_ENDIAN      BIG_ENDIAN
-#define __PDP_ENDIAN      PDP_ENDIAN
-
-#define __BYTE_ORDER      BYTE_ORDER
-
-
-#endif /* _h_mac_endian_ */
diff --git a/interfaces/os/mac/os-native.h b/interfaces/os/mac/os-native.h
deleted file mode 100644
index 3e26ff5..0000000
--- a/interfaces/os/mac/os-native.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_os_native_
-#define _h_os_native_
-
-#ifndef _h_unix_native_
-#include "../unix/unix-native.h"
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * strdup - declared unless _ANSI_SOURCE is defined - redeclare anyway
- * strndup - implemented inline here
- */
-char *strdup ( const char *str );
-
-#if !defined(__MAC_10_6) || (__MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6)
-static __inline__
-char *strndup ( const char *str, size_t n )
-{
-    char *dupstr;
-
-    const char *end = ( const char* ) memchr ( str, 0, n );
-    if ( end != NULL )
-        n = end - str;
-
-    dupstr = (char*)malloc ( n + 1 );
-    if ( dupstr != NULL )
-    {
-        memcpy ( dupstr, str, n );
-        dupstr [ n ] = 0;
-    }
-
-    return dupstr;
-}
-#endif
-
-/*--------------------------------------------------------------------------
- * strchrnul - implemented inline here
- */
-static __inline__
-char *strchrnul ( const char *str, int c )
-{
-    int i;
-    for ( i = 0; str [ i ] != 0 && str [ i ] != c; ++i )
-        ( void ) 0;
-    return & ( ( char* ) str ) [ i ];
-}
-
-/*--------------------------------------------------------------------------
- * memchr - implemented inline here
- */
-static __inline__
-void *memrchr ( const void *s, int c, size_t n )
-{
-    size_t i;
-    const char *cp = (const char*)s;
-    for ( i = n; i > 0; )
-    {
-        if ( ( int ) cp [ -- i ] == c )
-            return ( void* ) & cp [ i ];
-    }
-    return NULL;
-}
-
-
-/*--------------------------------------------------------------------------
- * strtoll - declared unless _ANSI_SOURCE is defined - redeclare anyway
- * strtoul - older includes were not ready for c99
- *
- *  NB - the define __DARWIN_NO_LONG_LONG will be true for
- *       cases when long long would be int64_t.
- */
-#if __DARWIN_NO_LONG_LONG
-int64_t strtoll ( const char *s, char **end, int base );
-uint64_t strtoull ( const char *s, char **end, int base );
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_os_native_ */
diff --git a/interfaces/os/sun/arch-impl.h b/interfaces/os/sun/arch-impl.h
deleted file mode 100644
index c8fffd6..0000000
--- a/interfaces/os/sun/arch-impl.h
+++ /dev/null
@@ -1,287 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_arch_impl_
-#define _h_arch_impl_
-
-#include <stdint.h>
-#include <byteswap.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __inline__
-#define __inline__ inline
-#endif
-
-static __inline__
-int16_t uint16_lsbit ( uint16_t self )
-{
-    int rtn;
-    for ( rtn = 0; rtn < 16; ++ rtn )
-    {
-        if ( ( self & ( 1 << rtn) ) != 0 )
-            return ( int16_t ) rtn;
-    }
-    return -1;
-}
-
-static __inline__
-int32_t uint32_lsbit ( uint32_t self )
-{
-    int rtn;
-    for ( rtn = 0; rtn < 32; ++ rtn )
-    {
-        if ( ( self & ( 1 << rtn) ) != 0 )
-            return ( int32_t ) rtn;
-    }
-    return -1;
-}
-
-typedef struct int128_t int128_t;
-struct int128_t
-{
-    uint64_t lo;
-    int64_t hi;
-};
-
-static __inline__
-int64_t int128_hi ( const int128_t *self )
-{
-    return self -> hi;
-}
-
-static __inline__
-uint64_t int128_lo ( const int128_t *self )
-{
-    return self -> lo;
-}
-
-static __inline__
-void int128_sethi ( int128_t *self, int64_t i )
-{
-    self -> hi = i;
-}
-
-static __inline__
-void int128_setlo ( int128_t *self, uint64_t i )
-{
-    self -> lo = i;
-}
-
-typedef struct uint128_t uint128_t;
-struct uint128_t
-{
-    uint64_t lo;
-    uint64_t hi;
-};
-
-static __inline__
-uint64_t uint128_hi ( const uint128_t *self )
-{
-    return self -> hi;
-}
-
-static __inline__
-uint64_t uint128_lo ( const uint128_t *self )
-{
-    return self -> lo;
-}
-
-static __inline__
-void uint128_sethi ( uint128_t *self, uint64_t i )
-{
-    self -> hi = i;
-}
-
-static __inline__
-void uint128_setlo ( uint128_t *self, uint64_t i )
-{
-    self -> lo = i;
-}
-
-static __inline__
-void int128_add ( int128_t *self, const int128_t *i )
-{
-    int carry = ( ( int64_t ) self -> lo < 0 ) && ( ( int64_t ) i -> lo < 0 );
-    self -> hi += i -> hi;
-    self -> lo += i -> lo;
-    self -> hi += carry;
-}
-
-static __inline__
-void int128_sub ( int128_t *self, const int128_t *i )
-{
-    int carry = self -> lo < i -> lo;
-    self -> hi -= i -> hi;
-    self -> lo -= i -> lo;
-    self -> hi -= carry;
-}
-
-static __inline__
-void int128_sar ( int128_t *self, uint32_t i )
-{
-    if ( ( i &= 0x7F ) != 0 )
-    {
-        int64_t shifted = self -> hi;
-
-        if ( i >= 64 )
-        {
-            self -> hi >>= 63;
-            self -> lo = shifted >> ( i - 64 );
-        }
-        else
-        {
-            self -> lo >>= i;
-            shifted <<= 64 - i;
-            self -> hi >>= i;
-            self -> lo |= shifted;
-        }
-    }
-}
-
-static __inline__
-void int128_shl ( int128_t *self, uint32_t i )
-{
-    if ( ( i &= 0x7F ) != 0 )
-    {
-        uint64_t shifted = self -> lo;
-
-        if ( i >= 64 )
-        {
-            self -> lo = 0;
-            self -> hi = ( int64_t ) ( shifted << ( i - 64 ) );
-        }
-        else
-        {
-            self -> hi <<= i;
-            shifted >>= 64 - i;
-            self -> lo <<= i;
-            self -> hi |= ( int64_t ) shifted;
-        }
-    }
-}
-
-static __inline__
-void uint128_and ( uint128_t *self, const uint128_t *i )
-{
-    self -> hi &= i -> hi;
-    self -> lo &= i -> lo;
-}
-
-static __inline__
-void uint128_or ( uint128_t *self, const uint128_t *i )
-{
-    self -> hi |= i -> hi;
-    self -> lo |= i -> lo;
-}
-
-static __inline__
-void uint128_orlo ( uint128_t *self, uint64_t i )
-{
-    self -> lo |= i;
-}
-
-static __inline__
-void uint128_xor ( uint128_t *self, const uint128_t *i )
-{
-    self -> hi ^= i -> hi;
-    self -> lo ^= i -> lo;
-}
-
-static __inline__
-void uint128_not ( uint128_t *self )
-{
-    self -> hi = ~ self -> hi;
-    self -> lo = ~ self -> lo;
-}
-
-static __inline__
-void uint128_shr ( uint128_t *self, uint32_t i )
-{
-    if ( ( i &= 0x7F ) != 0 )
-    {
-        uint64_t shifted = self -> hi;
-
-        if ( i >= 64 )
-        {
-            self -> hi >>= 63;
-            self -> lo = shifted >> ( i - 64 );
-        }
-        else
-        {
-            self -> lo >>= i;
-            shifted <<= 64 - i;
-            self -> hi >>= i;
-            self -> lo |= shifted;
-        }
-    }
-}
-
-static __inline__
-void uint128_shl ( uint128_t *self, uint32_t i )
-{
-    if ( ( i &= 0x7F ) != 0 )
-    {
-        uint64_t shifted = self -> lo;
-
-        if ( i >= 64 )
-        {
-            self -> lo = 0;
-            self -> hi = shifted << ( i - 64 );
-        }
-        else
-        {
-            self -> hi <<= i;
-            shifted >>= 64 - i;
-            self -> lo <<= i;
-            self -> hi |= shifted;
-        }
-    }
-}
-
-static __inline__
-void uint128_bswap ( uint128_t *self )
-{
-    uint64_t tmp = bswap_64 ( self -> lo );
-    self -> lo = bswap_64 ( self -> hi );
-    self -> hi = tmp;
-}
-
-static __inline__
-void uint128_bswap_copy ( uint128_t *to, const uint128_t *from )
-{
-    uint64_t tmp = bswap_64 ( from -> lo );
-    to -> lo = bswap_64 ( from -> hi );
-    to -> hi = tmp;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_arch_impl_ */
diff --git a/interfaces/os/sun/atomic.h b/interfaces/os/sun/atomic.h
deleted file mode 100644
index c1ee0f4..0000000
--- a/interfaces/os/sun/atomic.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_atomic_
-#define _h_atomic_
-
-#ifndef _h_atomic32_
-#include "atomic32.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef int atomic_int;
-typedef struct atomic32_t atomic_t;
-
-/* ( * v ) */
-#define atomic_read( v ) \
-    atomic32_read ( v )
-
-/* ( * v ) = i */
-#define atomic_set( v, i ) \
-    atomic32_set ( v, i )
-
-/* prior = ( * v ), ( * v ) += i, prior */
-#define atomic_read_and_add( v, i ) \
-    atomic32_read_and_add ( v, i )
-
-/* ( * v ) += i */
-#define atomic_add( v, i ) \
-    atomic32_add ( v, i )
-
-/* ( * v ) += i */
-#define atomic_add_and_read( v, i ) \
-    atomic32_add_and_read ( v, i )
-
-/* ( void ) ++ ( * v ) */
-#define atomic_inc( v ) \
-    atomic32_inc ( v )
-
-/* ( void ) -- ( * v ) */
-#define atomic_dec( v ) \
-    atomic32_dec ( v )
-
-/* -- ( * v ) == 0 */
-#define atomic_dec_and_test( v ) \
-    atomic32_dec_and_test ( v )
-
-/* ++ ( * v ) == 0
-   when atomic_dec_and_test uses predecrement, you want
-   postincrement to this function. so it isn't very useful */
-#define atomic_inc_and_test( v ) \
-    atomic32_inc_and_test ( v )
-
-/* ( * v ) -- == 0
-   HERE's useful */
-#define atomic_test_and_inc( v ) \
-    atomic32_test_and_inc ( v )
-
-/* prior = ( * v ), ( * v ) = ( prior == t ? s : prior ), prior */
-#define atomic_test_and_set( v, s, t ) \
-    atomic32_test_and_set ( v, s, t )
-
-/*  void *atomic_test_and_set_ptr ( void *volatile *v, void *s, void *t ) */
-#define atomic_test_and_set_ptr( v, s, t ) \
-    atomic_cas_ptr ( ( volatile void* ) ( v ), ( t ), ( s ) )
-
-/* val = ( * v ), ( ( * v ) = ( val < t ) ? val + i : val ), val */
-#define atomic_read_and_add_lt( v, i, t ) \
-    atomic32_read_and_add_lt ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val <= t ) ? val + i : val ), val */
-#define atomic_read_and_add_le( v, i, t ) \
-    atomic32_read_and_add_le ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val == t ) ? val + i : val ), val */
-#define atomic_read_and_add_eq( v, i, t ) \
-    atomic32_read_and_add_eq ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val != t ) ? val + i : val ), val */
-#define atomic_read_and_add_ne( v, i, t ) \
-    atomic32_read_and_add_ne ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val >= t ) ? val + i : val ), val */
-#define atomic_read_and_add_ge( v, i, t ) \
-    atomic32_read_and_add_ge ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val > t ) ? val + i : val ), val */
-#define atomic_read_and_add_gt( v, i, t ) \
-    atomic32_read_and_add_gt ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( ( val & 1 ) == 1 ) ? val + i : val ), val */
-#define atomic_read_and_add_odd( v, i ) \
-    atomic32_read_and_add_odd ( v, i )
-
-/* val = ( * v ), ( ( * v ) = ( ( val & 1 ) == 0 ) ? val + i : val ), val */
-#define atomic_read_and_add_even( v, i ) \
-    atomic32_read_and_add_even ( v, i )
-
-/* DEPRECATED */
-
-/* val = ( * v ), ( * v ) = ( val < t ? val + i : val ), ( val < t ? 1 : 0 ) */
-#define atomic_add_if_lt( v, i, t ) \
-    atomic32_add_if_lt ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val <= t ? val + i : val ), ( val <= t ? 1 : 0 ) */
-#define atomic_add_if_le( v, i, t ) \
-    atomic32_add_if_le ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val == t ? val + i : val ), ( val == t ? 1 : 0 ) */
-#define atomic_add_if_eq( v, i, t ) \
-    atomic32_add_if_eq ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val >= t ? val + i : val ), ( val >= t ? 1 : 0 ) */
-#define atomic_add_if_ge( v, i, t ) \
-    atomic32_add_if_ge ( v, i, t )
-
-/* val = ( * v ), ( * v ) = ( val > t ? val + i : val ), ( val > t ? 1 : 0 ) */
-#define atomic_add_if_gt( v, i, t ) \
-    atomic32_add_if_gt ( v, i, t )
-
-#undef LOCK
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_atomic_ */
diff --git a/interfaces/os/sun/atomic32.h b/interfaces/os/sun/atomic32.h
deleted file mode 100644
index adf6d40..0000000
--- a/interfaces/os/sun/atomic32.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_atomic32_
-#define _h_atomic32_
-
-#include <sys/atomic.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __inline__
-#define __inline__ inline
-#endif
-
-/*
- * mimic common structure
- */
-typedef struct atomic32_t atomic32_t;
-struct atomic32_t
-{
-    volatile uint32_t counter;
-};
-
-/* int atomic32_read ( const atomic32_t *v ); */
-#define atomic32_read( v ) \
-    ( ( v ) -> counter )
-
-/* void atomic32_set ( atomic32_t *v, int i ); */
-#define atomic32_set( v, i ) \
-    ( ( void ) ( ( ( v ) -> counter ) = ( i ) ) )
-
-/* add to v -> counter and return the prior value
-   int atomic32_read_and_add ( atomic32_t *v, int i ) */
-#define atomic32_read_and_add( v, i ) \
-    ( atomic_add_32_nv ( & ( v ) -> counter, ( int32_t ) ( i ) ) - ( i ) )
-
-/* if no read is needed, define the least expensive atomic add */
-#define atomic32_add( v, i ) \
-    atomic_add_32 ( & ( v ) -> counter, ( int32_t ) ( i ) )
-
-/* add to v -> counter and return the result
-   int atomic32_add_and_read ( atomic32_t *v, int i ) */
-#define atomic32_add_and_read( v, i ) \
-    atomic_add_32_nv ( & ( v ) -> counter, ( int32_t ) ( i ) )
-
-/* void atomic32_inc ( atomic32_t *v ) */
-#define atomic32_inc( v ) \
-    atomic_inc_32 ( & ( v ) -> counter )
-
-/* void atomic32_dec ( atomic32_t *v ) */
-#define atomic32_dec( v ) \
-    atomic_dec_32 ( & ( v ) -> counter )
-
-/* decrement by one and test result for 0
-  int atomic32_dec_and_test ( atomic32_t *v ) */
-#define atomic32_dec_and_test( v ) \
-    ( atomic_dec_32_nv ( & ( v ) -> counter ) == 0 )
-
-/* when atomic32_dec_and_test uses predecrement, you want
-   postincrement to this function. so it isn't very useful
-   int atomic32_inc_and_test ( atomic32_t *v ) */
-#define atomic32_inc_and_test( v ) \
-    ( atomic_inc_32_nv ( & ( v ) -> counter ) == 0 )
-
-/* HERE's useful */
-#define atomic32_test_and_inc( v ) \
-    ( atomic_inc_32_nv ( & ( v ) -> counter ) == 1 )
-
-/* int atomic32_test_and_set ( atomic32_t *v, int s, int t ) */
-#define atomic32_test_and_set( v, s, t ) \
-    atomic_cas_32 ( & ( v ) -> counter, ( t ), ( s ) )
-
-/* conditional modifications */
-static __inline__
-int atomic32_read_and_add_lt ( atomic32_t *v, int i, int t )
-{
-    int val, rtn;
-    for ( rtn = atomic32_read ( v ); rtn < t; rtn = val )
-    {
-        val = atomic32_test_and_set ( v, rtn + i, rtn );
-	if ( val == rtn )
-            break;
-    }
-    return rtn;
-}
-
-#define atomic32_add_if_lt( v, i, t ) \
-    ( atomic32_read_and_add_lt ( v, i, t ) < ( t ) )
-
-static __inline__
-int atomic32_read_and_add_le ( atomic32_t *v, int i, int t )
-{
-    int val, rtn;
-    for ( rtn = atomic32_read ( v ); rtn <= t; rtn = val )
-    {
-        val = atomic32_test_and_set ( v, rtn + i, rtn );
-	if ( val == rtn )
-            break;
-    }
-    return rtn;
-}
-
-#define atomic32_add_if_le( v, i, t ) \
-    ( atomic32_read_and_add_le ( v, i, t ) <= ( t ) )
-
-static __inline__
-int atomic32_read_and_add_eq ( atomic32_t *v, int i, int t )
-{
-    return atomic32_test_and_set ( v, t + i, t );
-}
-
-#define atomic32_add_if_eq( v, i, t ) \
-    ( atomic32_read_and_add_eq ( v, i, t ) == ( t ) )
-
-static __inline__
-int atomic32_read_and_add_ne ( atomic32_t *v, int i, int t )
-{
-    int val, rtn;
-    for ( rtn = atomic32_read ( v ); rtn != t; rtn = val )
-    {
-        val = atomic32_test_and_set ( v, rtn + i, rtn );
-	if ( val == rtn )
-            break;
-    }
-    return rtn;
-}
-
-#define atomic32_add_if_ne( v, i, t ) \
-    ( atomic32_read_and_add_ne ( v, i, t ) != ( t ) )
-
-static __inline__
-int atomic32_read_and_add_ge ( atomic32_t *v, int i, int t )
-{
-    int val, rtn;
-    for ( rtn = atomic32_read ( v ); rtn >= t; rtn = val )
-    {
-        val = atomic32_test_and_set ( v, rtn + i, rtn );
-	if ( val == rtn )
-            break;
-    }
-    return rtn;
-}
-
-#define atomic32_add_if_ge( v, i, t ) \
-    ( atomic32_read_and_add_ge ( v, i, t ) >= ( t ) )
-
-static __inline__
-int atomic32_read_and_add_gt ( atomic32_t *v, int i, int t )
-{
-    int val, rtn;
-    for ( rtn = atomic32_read ( v ); rtn > t; rtn = val )
-    {
-        val = atomic32_test_and_set ( v, rtn + i, rtn );
-	if ( val == rtn )
-            break;
-    }
-    return rtn;
-}
-
-#define atomic32_add_if_gt( v, i, t ) \
-    ( atomic32_read_and_add_gt ( v, i, t ) > ( t ) )
-
-static __inline__
-int atomic32_read_and_add_odd ( atomic32_t *v, int i )
-{
-    int val, rtn;
-    for ( rtn = atomic32_read ( v ); ( rtn & 1 ) != 0; rtn = val )
-    {
-        val = atomic32_test_and_set ( v, rtn + i, rtn );
-	if ( val == rtn )
-            break;
-    }
-    return rtn;
-}
-
-static __inline__
-int atomic32_read_and_add_even ( atomic32_t *v, int i )
-{
-    int val, rtn;
-    for ( rtn = atomic32_read ( v ); ( rtn & 1 ) == 0; rtn = val )
-    {
-        val = atomic32_test_and_set ( v, rtn + i, rtn );
-	if ( val == rtn )
-            break;
-    }
-    return rtn;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_atomic32_ */
diff --git a/interfaces/os/sun/bitstr.h b/interfaces/os/sun/bitstr.h
deleted file mode 100644
index 338e78b..0000000
--- a/interfaces/os/sun/bitstr.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_bitstr_
-#define _h_bitstr_
-
-#include "endian.h"
-
-/* use 64-bit accumulator, 32-bit word size */
-#define WRDSIZE 32
-#define WRDSHIFT 5
-#define WRD uint32_t
-#define ACC uint64_t
-
-/* swap only on little-endian platforms */
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define BSWAP( x ) bswap_32 ( x )
-#else
-#define BSWAP( x ) ( x )
-#endif
-
-#include "./noarch/bitstr.h"
-
-#endif /* _h_bitstr_ */
diff --git a/interfaces/os/sun/byteswap.h b/interfaces/os/sun/byteswap.h
deleted file mode 100644
index d420058..0000000
--- a/interfaces/os/sun/byteswap.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_byteswap_
-#define _h_byteswap_
-
-#include <stdint.h>
-#include <sys/byteorder.h>
-
-/* N.B. Sun's BSWAP seems to be macro-based,
-   meaning that (x) will be evaluated multiple times */
-
-#define bswap_16(x) BSWAP_16 (x)
-#define bswap_32(x) BSWAP_32 (x)
-#define bswap_64(x) BSWAP_64 (x)
-
-#endif /* _h_byteswap_ */
diff --git a/interfaces/os/sun/endian.h b/interfaces/os/sun/endian.h
deleted file mode 100644
index e6132c8..0000000
--- a/interfaces/os/sun/endian.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_endian_
-#define _h_endian_
-
-#include <sys/isa_defs.h>
-
-#define __LITTLE_ENDIAN 1234
-#define __BIG_ENDIAN    4321
-#define __PDP_ENDIAN    3412
-
-#if defined _BIG_ENDIAN
-#define __BYTE_ORDER __BIG_ENDIAN
-#elif defined _LITTLE_ENDIAN
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#else
-#error "did not determine byte order"
-#endif
-
-#endif /* _h_endian_ */
diff --git a/interfaces/os/sun/fmtdef.h b/interfaces/os/sun/fmtdef.h
deleted file mode 100644
index d51c88f..0000000
--- a/interfaces/os/sun/fmtdef.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_fmtdef_
-#define _h_fmtdef_
-
-/* int64_t is "long long int" in 32 bit */
-#define LD64 "lld"
-#define LU64 "llu"
-#define LX64 "llX"
-#define Lx64 "llx"
-
-/* size_t is traditionally "unsigned int"
-   although it should have been "long unsigned int" */
-#define LUSZ "u"
-#define LXSZ "X"
-#define LxSZ "x"
-
-#endif /* _h_fmtdef_ */
diff --git a/interfaces/os/sun/noarch/bitstr.h b/interfaces/os/sun/noarch/bitstr.h
deleted file mode 100644
index 9bfcdba..0000000
--- a/interfaces/os/sun/noarch/bitstr.h
+++ /dev/null
@@ -1,417 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_noarch_bitstr_
-#define _h_noarch_bitstr_
-
-#ifndef _h_bitstr_
-#error "don't include <noarch/bitstr.h> directly - use <bitstr.h>"
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <byteswap.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __inline__
-#define __inline__ inline
-#endif
-
-/* bitcpy                                                                                                                                                                                                    
- *  copy a string of bits from source to dest                                                                                                                                                                
- *                                                                                                                                                                                                           
- *  both source and dest may have non-byte aligned pointers                                                                                                                                                  
- *  the number of bits to copy need not be byte aligned                                                                                                                                                      
- *                                                                                                                                                                                                           
- *  depending upon architecture and OS conventions, the word                                                                                                                                                 
- *  size may be adjusted to 1, 2, or 4 bytes, where the base                                                                                                                                                 
- *  pointers are always word aligned.                                                                                                                                                                        
- *                                                                                                                                                                                                           
- *  bits in memory are always treated as big-endian, meaning                                                                                                                                                 
- *  that on multi-byte fetches and stores, we perform byte-swapping                                                                                                                                          
- *  if there are shifts or masks                                                                                                                                                                             
- */
-static __inline__
-void bitcpy ( void *dbase, bitsz_t doff, const void *sbase, bitsz_t soff, bitsz_t sz )
-{
-    /* noop if sz == 0 */
-    if ( sz != 0 )
-    {
-        /* loop counter and destination word count */
-        size_t i, dcountz;
-
-        /* left & right masks and working register */
-        WRD lmask, rmask, reg;
-
-        /* produce word-aligned pointers */
-#if WRDSIZE == 8
-        /* 1-4. all at once */
-        WRD *dst = ( WRD* ) dbase + ( doff >> WRDSHIFT );
-        const WRD *src = ( const WRD* ) sbase + ( soff >> WRDSHIFT );
-#else
-        /* 1. capture word alignment adjustment */
-        size_t dadjust = ( size_t ) dbase & ( WRDSIZE / 8 - 1 );
-        size_t sadjust = ( size_t ) sbase & ( WRDSIZE / 8 - 1 );
-
-        /* 2. create word-aligned pointers */
-        WRD *dst = ( WRD* ) ( ( size_t ) dbase - dadjust );
-        const WRD *src = ( const WRD* ) ( ( size_t ) sbase - sadjust );
-
-        /* 3. incorporate alignment adjustment into offset bits */
-        doff += dadjust << 3;
-        soff += sadjust << 3;
-
-        /* 4. readjust pointers based upon offset */
-        dst += doff >> WRDSHIFT;
-        src += soff >> WRDSHIFT;
-#endif
-        /* 5. restate offsets */
-        doff &= ( WRDSIZE - 1 );
-        soff &= ( WRDSIZE - 1 );
-
-        /* calculate number of words - 1 in dst */
-        dcountz = ( doff + sz + ( WRDSIZE - 1 ) - WRDSIZE ) >> WRDSHIFT;
-
-        /* calculate masks */
-        lmask = rmask = ~ 0;
-        lmask >>= doff;
-        rmask >>= ( doff + sz ) & ( WRDSIZE - 1 );
-        if ( ( WRD ) ( rmask + 1 ) == 0 )
-            rmask = 0;
-
-        /* prime register with masked dst [ 0 ] */
-        reg = BSWAP ( dst [ 0 ] ) & ~ lmask;
-
-        /* if source and destination are aligned */
-        if ( doff == soff )
-        {
-            /* merge src [ 0 ] into reg through mask */
-            reg |= BSWAP ( src [ 0 ] ) & lmask;
-
-#if WRDSIZE > 8
-            /* straight copies don't need byteswap                                                                                                                                                           
-               other than on first and last words                                                                                                                                                            
-               put first word back into little-endian                                                                                                                                                        
-               for remainder of loop */
-            if ( dcountz > 0 )
-            {
-                reg = BSWAP ( reg );
-#endif
-                /* aligned buffers have n:n word ratio */
-                for ( i = 0; i < dcountz; )
-                {
-                    dst [ i ] = reg;
-                    reg = src [ ++ i ];
-                }
-
-#if WRDSIZE > 8
-                /* revert to big-endian */
-                reg = BSWAP ( reg );
-            }
-#endif
-        }
-
-        /* shifting alignment  */
-        else
-        {
-            /* source count may differ from dest count */
-            size_t scountz = ( soff + sz + ( WRDSIZE - 1 ) - WRDSIZE ) >> WRDSHIFT;
-
-            /* use double-word accumulator */
-            ACC acc = BSWAP ( src [ 0 ] );
-
-            /* shift amount */
-            int shift = ( int ) doff - ( int ) soff;
-            if ( shift > 0 )
-            {
-                /* take only valid bits in shifted initial src */
-                reg |= ( WRD ) ( acc >> shift ) & lmask;
-
-                /* because "shift" > 0, we know "dcountz" >= "scountz" */
-                for ( acc <<= WRDSIZE, i = 0; i < scountz; acc <<= WRDSIZE )
-                {
-                    dst [ i ] = BSWAP ( reg );
-                    ++ i;
-                    acc |= BSWAP ( src [ i ] );
-                    reg = ( WRD ) ( acc >> shift );
-                }
-
-                /* if "dcountz" > "scountz" */
-                if ( i < dcountz )
-                {
-                    dst [ i ] = BSWAP ( reg );
-                    reg = ( WRD ) ( acc >> shift );
-                }
-            }
-
-            else
-            {
-                /* need single word read-ahead and right-shift */
-                shift += WRDSIZE;
-
-                /* because "shift" was < 0, we know "dcountz" <= "scountz" */
-                for ( acc <<= WRDSIZE, i = 0; i < dcountz; acc <<= WRDSIZE )
-                {
-                    acc |= BSWAP ( src [ i + 1 ] );
-                    reg |= ( WRD ) ( acc >> shift ) & lmask;
-                    dst [ i ++ ] = BSWAP ( reg );
-                    lmask = ~ 0;
-                    reg = 0;
-                }
-
-                /* if "dcountz" < "scountz" */
-                if ( i < scountz )
-                    acc |= BSWAP ( src [ scountz ] );
-
-                reg |= ( WRD ) ( acc >> shift ) & lmask;
-            }
-        }
-
-        /* mask off unused bytes from src */
-        reg &= ~ rmask;
-
-        /* bring in saved bits from dst */
-        reg |= BSWAP ( dst [ dcountz ] ) & rmask;
-
-        /* write out last word */
-        dst [ dcountz ] = BSWAP ( reg );
-    }
-}
-
-/* bitcmp
- *  performs bitwise a - b, returning result as int
- *  result value has no meaning, only sign
- *  where < 0 means a < b, > 0 means a > b, and 0 means a == b
- *
- *  since the comparison produces a tri-state indicator of
- *  relative magnitude, the order of "a" and "b" is important.
- *  furthermore, the difference operator must be evaluated
- *  left to right, because the result indicates more than
- *  equality.
- *
- *  see bitcpy for general word alignment information
- */
-static __inline__
-int bitcmp ( const void *abase, bitsz_t aoff, const void *bbase, bitsz_t boff, bitsz_t sz )
-{
-    int diff = 0;
-
-    if ( sz != 0 )
-    {
-        /* loop counter and left word count */
-        size_t i, lcountz;
-
-        /* left & right masks and working registers */
-        WRD lmask, rmask, lreg, rreg;
-
-        /* produce word-aligned pointers */
-#if WRDSIZE == 8
-        /* 1-4. all at once */
-        const WRD *left = ( const WRD* ) abase + ( aoff >> WRDSHIFT );
-        const WRD *right = ( const WRD* ) bbase + ( boff >> WRDSHIFT );
-#else
-        /* 1. capture word alignment adjustment */
-        size_t aadjust = ( size_t ) abase & ( WRDSIZE / 8 - 1 );
-        size_t badjust = ( size_t ) bbase & ( WRDSIZE / 8 - 1 );
-
-        /* 2. create word-aligned pointers */
-        const WRD *left = ( const WRD* ) ( ( size_t ) abase - aadjust );
-        const WRD *right = ( const WRD* ) ( ( size_t ) bbase - badjust );
-
-        /* 3. incorporate alignment adjustment into offset bits */
-        aoff += aadjust << 3;
-        boff += badjust << 3;
-
-        /* 4. readjust pointers based upon offset */
-        left += aoff >> WRDSHIFT;
-        right += boff >> WRDSHIFT;
-#endif
-        /* 5. restate offsets */
-        aoff &= ( WRDSIZE - 1 );
-        boff &= ( WRDSIZE - 1 );
-
-        /* calculate number of words - 1 in left
-           since we know a-priori that "sz" > 0, we
-           know that the left and right counts must be
-           at least 1. our loops treat the last word
-           specially, so calculate a loop counter that
-           excludes the last word */
-        lcountz = ( aoff + sz + ( WRDSIZE - 1 ) - WRDSIZE ) >> WRDSHIFT;
-
-        /* calculate masks */
-        lmask = rmask = ~ 0;
-        lmask >>= aoff;
-        rmask >>= ( aoff + sz ) & ( WRDSIZE - 1 );
-        if ( ( WRD ) ( rmask + 1 ) == 0 )
-            rmask = 0;
-
-        /* significant bits from left [ 0 ] */
-        lreg = BSWAP ( left [ 0 ] ) & lmask;
-
-        /* if source and destination are aligned */
-        if ( aoff == boff )
-        {
-            /* test against right bits through mask */
-            rreg = BSWAP ( right [ 0 ] ) & lmask;
-
-            /* produce a difference of all but the last
-               aligned word, where initial word has been
-               left-masked. the last word is tested below. */
-            for ( i = 1; i <= lcountz; ++ i )
-            {
-                diff = ( int ) lreg - ( int ) rreg;
-                if ( diff != 0 )
-                    return diff;
-
-                /* byte-swapping occurs on little-endian architectures */
-                lreg = BSWAP ( left [ i ] );
-                rreg = BSWAP ( right [ i ] );
-            }
-
-            /* fall out to end for masked comparison of last word */
-        }
-
-        /* shifting alignment */
-        else
-        {
-            /* right count may differ from left count
-               since alignments differ, the span of "sz"
-               bits may hit a different number of words in
-               the left array than in the right. */
-            size_t rcountz = ( boff + sz + ( WRDSIZE - 1 ) - WRDSIZE ) >> WRDSHIFT;
-
-            /* use double-word accumulator
-               note that the extra bits get ignored */
-            ACC acc = BSWAP ( right [ 0 ] );
-
-            /* shift amount: positive if "b" needs to be right shifted.
-               NOTE - since the comparison must be successively performed
-               from left to right ( see above ), shifting is ALWAYS toward
-               right, making for special handling when "shift" < 0 ( see below ) */
-            int shift = ( int ) aoff - ( int ) boff;
-            if ( shift > 0 )
-            {
-                /* initial word from right operand, aligned with left */
-                rreg = ( WRD ) ( acc >> shift ) & lmask;
-
-                /* "shift" > 0 means "lcountz" >= "rcountz" */
-                for ( acc <<= WRDSIZE, i = 1; i <= rcountz; acc <<= WRDSIZE, ++ i )
-                {
-                    /* compare words at i-1 */
-                    diff = ( int ) lreg - ( int ) rreg;
-                    if ( diff != 0 )
-                        return diff;
-
-                    /* accumulate next word from right operand */
-                    acc |= BSWAP ( right [ i ] );
-
-                    /* bring in next word from left operand */
-                    lreg = BSWAP ( left [ i ] );
-
-                    /* produce aligned word from right operand */
-                    rreg = ( WRD ) ( acc >> shift );
-                }
-
-                /* if there is one more word in left */
-                if ( lcountz > rcountz )
-                {
-                    /* compare penultimate */
-                    diff = ( int ) lreg - ( int ) rreg;
-                    if ( diff != 0 )
-                        return diff;
-
-                    /* get last word in left */
-                    lreg = BSWAP ( left [ lcountz ] );
-
-                    /* last word from right is already in "acc" */
-                    rreg = ( WRD ) ( acc >> shift );
-                }
-
-                /* fall out to end for masked comparison of last word */
-            }
-
-            else
-            {
-                /* since all shifts must be toward right ( due to left to right
-                   comparison ), this alignment will require a pre-fetch from
-                   right operand into accumulator, and adjusting the negative
-                   shift amount to a positive right-shift. */
-                shift += WRDSIZE;
-
-                /* since "shift" was negative, we know "lcountz" <= "rcountz",
-                   so use "lcountz" as loop limit. pre-shift "acc" as loop init */
-                for ( acc <<= WRDSIZE, i = 1; i <= lcountz; acc <<= WRDSIZE, ++ i )
-                {
-                    /* accumulate next word from right operand */
-                    acc |= BSWAP ( right [ i ] );
-
-                    /* produce aligned word from right operand */
-                    rreg = ( WRD ) ( acc >> shift ) & lmask;
-
-                    /* now test against left */
-                    diff = ( int ) lreg - ( int ) rreg;
-                    if ( diff != 0 )
-                        return diff;
-
-                    /* bring in next word from left operand */
-                    lreg = BSWAP ( left [ i ] );
-
-                    /* no more left mask */
-                    lmask = ~ 0;
-                }
-
-                /* if there is one more word in right */
-                if ( lcountz < rcountz )
-                    acc |= BSWAP ( right [ rcountz ] );
-
-                /* produce "rreg" from "acc" */
-                rreg = ( WRD ) ( acc >> shift ) & lmask;
-
-                /* fall out to end for masked comparison of last word */
-            }
-        }
-
-        /* mask off unused bytes from right */
-        lreg &= ~ rmask;
-        rreg &= ~ rmask;
-
-        /* perform final comparison */
-        diff = ( int ) lreg - ( int ) rreg;
-    }
-
-    return diff;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_noarch_bitstr_ */
diff --git a/interfaces/os/sun/os-native.h b/interfaces/os/sun/os-native.h
deleted file mode 100644
index bcb83e8..0000000
--- a/interfaces/os/sun/os-native.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_os_native_
-#define _h_os_native_
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <time.h>
-
-#ifndef _h_unix_native_
-#include "../unix/unix-native.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __inline__
-#define __inline__ inline
-#endif
-
-/*--------------------------------------------------------------------------
- * index
- *  we should get rid of this entirely
- */
-#define index strchr
-
-
-#ifndef strndupa /* Solaris 11 adds some of these */
-/*--------------------------------------------------------------------------
- * strndup - implemented inline here
- */
-static __inline__
-char *strndup ( const char *str, size_t n )
-{
-    char *dupstr;
-
-    const char *end = ( const char* ) memchr ( str, 0, n );
-    if ( end != NULL )
-        n = end - str;
-
-    dupstr = ( char* ) malloc ( n + 1 );
-    if ( dupstr != NULL )
-    {
-        memcpy ( dupstr, str, n );
-        dupstr [ n ] = 0;
-    }
-
-    return dupstr;
-}
-
-/*--------------------------------------------------------------------------
- * strchrnul - implemented inline here
- */
-static __inline__
-char *strchrnul ( const char *str, int c )
-{
-    int i;
-    for ( i = 0; str [ i ] != 0 && str [ i ] != c; ++i )
-        ( void ) 0;
-    return & ( ( char* ) str ) [ i ];
-}
-#endif
-
-/*--------------------------------------------------------------------------
- * memchr - implemented inline here
- */
-static __inline__
-void *memrchr ( const void *s, int c, size_t n )
-{
-    size_t i;
-    const char *cp = ( const char* ) s;
-    for ( i = n; i > 0; )
-    {
-        if ( ( int ) cp [ -- i ] == c )
-            return ( void* ) & cp [ i ];
-    }
-    return NULL;
-}
-
-#ifndef strndupa
-static __inline__
-char *strsep ( char **stringp, const char *delim )
-{
-    char *s, *tok, c, delim_char;
-    const char *p_delim;
-
-    if ( ( s = *stringp ) == NULL )
-        return NULL;
-
-    for ( tok = s; ; )
-    {
-        c = *s++;
-	p_delim = delim;
-	do
-	{
-	    if ( ( delim_char = *p_delim++ ) == c )
-	    {
-	        if ( c == 0 )
-		    s = NULL;
-		else
-		  s[-1] = 0;
-		*stringp = s;
-		return ( tok );
-	    }
-	} while ( delim_char != 0 );
-    }
-}
-
-static __inline__
-const char *strcasestr (const char *s1, const char *s2)
-{
-    unsigned char c2 = tolower((unsigned char) *s2);
-    size_t l1 = strlen(s1), l2 = strlen(s2);
-    
-    if (l2 == 0) {
-        return s1;
-    }
-
-    while (l1 >= l2) {
-        if (tolower((unsigned char) *s1) == c2
-            &&  (l2 == 1  ||  strncasecmp(s1 + 1, s2 + 1, l2 - 1) == 0)) {
-            return s1;
-        }
-        ++s1;
-        --l1;
-    }
-
-    return NULL;
-}
-#endif
-
-static __inline__
-time_t timegm ( struct tm *gmt )
-{
-    /* XXX - extend past 2099.  (2100 isn't a leap year.) */
-    static const int days_so_far [ 12 ] =
-    {
-        0,  31,  59,  90, 120, 151,
-        181, 212, 243, 273, 304, 334
-    };
-    int days = ( ( gmt -> tm_year - 70 ) * 365 +
-                 ( ( gmt -> tm_year - 68 ) >> 2 ) +
-                 days_so_far [ gmt -> tm_mon ] + gmt -> tm_mday
-        );
-    if ( gmt -> tm_year % 4 == 0 && gmt -> tm_mon < 2 )
-        -- days;
-
-    return ( ( days * 24 + gmt -> tm_hour ) * 60 + gmt -> tm_min ) * 60 + gmt -> tm_sec;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_os_native_ */
diff --git a/interfaces/os/sun/strtol.h b/interfaces/os/sun/strtol.h
deleted file mode 100644
index 79f462f..0000000
--- a/interfaces/os/sun/strtol.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_strtol_
-#define _h_strtol_
-
-#ifndef _h_os_native_
-#include <os-native.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * strtoi32
- * strtoi32
- *  based upon actual usage
- */
-#define strtoi32( str, endp, base ) \
-    strtol ( str, endp, base )
-
-#define strtou32( str, endp, base ) \
-    strtoul ( str, endp, base )
-
-
-/*--------------------------------------------------------------------------
- * strtoi64
- * strtoi64
- *  based upon actual usage
- */
-#define strtoi64( str, endp, base ) \
-    strtoll ( str, endp, base )
-
-#define strtou64( str, endp, base ) \
-    strtoull ( str, endp, base )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_strtol_ */
diff --git a/interfaces/os/sun/va_copy.h b/interfaces/os/sun/va_copy.h
deleted file mode 100644
index 34fb64f..0000000
--- a/interfaces/os/sun/va_copy.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_va_copy_
-#define _h_va_copy_
-
-/* GCC may internally undef 'va_copy' upon include of stdarg.h
-   force it to be included before defining va_copy */
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* kludge - GCC stdarg has this line:
-   #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L
-   fix build for c99 */
-#if ! defined va_copy && defined __va_copy
-#define va_copy __va_copy
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_va_copy_ */
diff --git a/interfaces/os/unix/oserror.h b/interfaces/os/unix/oserror.h
deleted file mode 100644
index b703ebf..0000000
--- a/interfaces/os/unix/oserror.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_oserror_
-#define _h_oserror_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_oserror_ */
diff --git a/interfaces/os/unix/sysalloc.h b/interfaces/os/unix/sysalloc.h
deleted file mode 100644
index 2207943..0000000
--- a/interfaces/os/unix/sysalloc.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sysalloc_
-#define _h_sysalloc_
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sysalloc_ */
diff --git a/interfaces/os/unix/unix-native.h b/interfaces/os/unix/unix-native.h
deleted file mode 100644
index 236806a..0000000
--- a/interfaces/os/unix/unix-native.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_unix_native_
-#define _h_unix_native_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <time.h>
-#include <sys/time.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * timeout_t
- *  a structure for communicating a timeout
- *  which under Unix converts to an absolute time once prepared
- */
-struct timeout_t
-{
-    struct timespec ts;
-    uint32_t mS;
-    uint32_t prepared;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_unix_native_ */
diff --git a/interfaces/os/win/atomic.h b/interfaces/os/win/atomic.h
deleted file mode 100644
index 993d642..0000000
--- a/interfaces/os/win/atomic.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_atomic_
-#define _h_atomic_
-
-#define DFLT_ATOMIC_BITS 32
-
-#ifndef _h_atomic32_
-#include "atomic32.h"
-#endif
-
-#if ! defined _h_atomic64_ && _ARCH_BITS == 64
-#include "atomic64.h"
-#endif
-
-typedef struct atomic_ptr_t atomic_ptr_t;
-struct atomic_ptr_t
-{
-    void * volatile ptr;
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if DFLT_ATOMIC_BITS == 32
-#define ATOMIC_NAME( suffix ) \
-    atomic32_ ## suffix
-typedef LONG atomic_int;
-#else
-#define ATOMIC_NAME( suffix ) \
-    atomic64_ ## suffix
-typedef LONGLONG atomic_int;
-#endif
-
-typedef struct ATOMIC_NAME ( t ) atomic_t;
-
-/* ( * v ) */
-#define atomic_read( v ) \
-    ATOMIC_NAME ( read ) ( v )
-
-/* ( * v ) = i */
-#define atomic_set( v, i ) \
-    ATOMIC_NAME ( set ) ( v, i )
-
-/* prior = ( * v ), ( * v ) += i, prior */
-#define atomic_read_and_add( v, i ) \
-    ATOMIC_NAME ( read_and_add ) ( v, i )
-
-/* ( * v ) += i */
-#define atomic_add( v, i ) \
-    ATOMIC_NAME ( add ) ( v, i )
-
-/* ( * v ) += i */
-#define atomic_add_and_read( v, i ) \
-    ATOMIC_NAME ( add_and_read ) ( v, i )
-
-/* ( void ) ++ ( * v ) */
-#define atomic_inc( v ) \
-    ATOMIC_NAME ( inc ) ( v )
-
-/* ( void ) -- ( * v ) */
-#define atomic_dec( v ) \
-    ATOMIC_NAME ( dec ) ( v )
-
-/* -- ( * v ) == 0 */
-#define atomic_dec_and_test( v ) \
-    ATOMIC_NAME ( dec_and_test ) ( v )
-
-/* ++ ( * v ) == 0
-   when atomic_dec_and_test uses predecrement, you want
-   postincrement to this function. so it isn't very useful */
-#define atomic_inc_and_test( v ) \
-    ATOMIC_NAME ( inc_and_test ) ( v )
-
-/* ( * v ) -- == 0
-   HERE's useful */
-#define atomic_test_and_inc( v ) \
-    ATOMIC_NAME ( test_and_inc ) ( v )
-
-/* prior = ( * v ), ( * v ) = ( prior == t ? s : prior ), prior */
-#define atomic_test_and_set( v, s, t ) \
-    ATOMIC_NAME ( test_and_set ) ( v, s, t )
-
-/* THIS FUNCTION IS universal in the case of Windows, it uses the sizeof(ptr) */
-#define atomic_test_and_set_ptr( v, s, t ) \
-    InterlockedCompareExchangePointer( & ( v ) -> ptr, ( s ), ( t ) )
-
-/* val = ( * v ), ( ( * v ) = ( val < t ) ? val + i : val ), val */
-#define atomic_read_and_add_lt( v, i, t ) \
-    ATOMIC_NAME ( read_and_add_lt ) ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val <= t ) ? val + i : val ), val */
-#define atomic_read_and_add_le( v, i, t ) \
-    ATOMIC_NAME ( read_and_add_le ) ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val == t ) ? val + i : val ), val */
-#define atomic_read_and_add_eq( v, i, t ) \
-    ATOMIC_NAME ( read_and_add_eq ) ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val != t ) ? val + i : val ), val */
-#define atomic_read_and_add_ne( v, i, t ) \
-    ATOMIC_NAME ( read_and_add_ne ) ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val >= t ) ? val + i : val ), val */
-#define atomic_read_and_add_ge( v, i, t ) \
-    ATOMIC_NAME ( read_and_add_ge ) ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( val > t ) ? val + i : val ), val */
-#define atomic_read_and_add_gt( v, i, t ) \
-    ATOMIC_NAME ( read_and_add_gt ) ( v, i, t )
-
-/* val = ( * v ), ( ( * v ) = ( ( val & 1 ) == 1 ) ? val + i : val ), val */
-#define atomic_read_and_add_odd( v, i ) \
-    ATOMIC_NAME ( read_and_add_odd ) ( v, i )
-
-/* val = ( * v ), ( ( * v ) = ( ( val & 1 ) == 0 ) ? val + i : val ), val */
-#define atomic_read_and_add_even( v, i ) \
-    ATOMIC_NAME ( read_and_add_even ) ( v, i )
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_atomic_ */
diff --git a/interfaces/os/win/atomic32.h b/interfaces/os/win/atomic32.h
deleted file mode 100644
index ecb46a4..0000000
--- a/interfaces/os/win/atomic32.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_atomic32_
-#define _h_atomic32_
-
-#define WIN32_LEAN_AND_MEAN
-#include <WINDOWS.H>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct atomic32_t atomic32_t;
-struct atomic32_t
-{
-    volatile LONG counter;
-};
-
-/* int atomic32_read ( const atomic32_t *v ); */
-#define atomic32_read( v ) \
-    ( ( v ) -> counter )
-
-/* void atomic32_set ( atomic32_t *v, int i ); */
-#define atomic32_set( v, i ) \
-    ( ( void ) ( ( ( v ) -> counter ) = ( i ) ) )
-
-/* add to v -> counter and return the prior value */
-/* int atomic32_read_and_add ( atomic32_t *v, int i ) */
-#define atomic32_read_and_add( v, i ) \
-    InterlockedExchangeAdd ( & ( v ) -> counter, ( i ) )
-
-/* if no read is needed, define the least expensive atomic add */
-#define atomic32_add( v, i ) \
-    atomic32_read_and_add ( v, i )
-
-/* add to v -> counter and return the result */
-static __inline int atomic32_add_and_read ( atomic32_t *v, int i )
-{
-	return atomic32_read_and_add ( v, i ) + i;
-}
-
-/* void atomic32_inc ( atomic32_t *v ) */
-#define atomic32_inc( v ) \
-    InterlockedIncrement ( & ( v ) -> counter )
-
-/* void atomic32_dec ( atomic32_t *v ) */
-#define atomic32_dec( v ) \
-    InterlockedDecrement ( & ( v ) -> counter )
-
-/* decrement by one and test result for 0 */
-/* int atomic32_dec_and_test ( atomic32_t *v ) */
-#define atomic32_dec_and_test( v ) \
-    ( InterlockedDecrement ( & ( v ) -> counter ) == 0 )
-
-/* when atomic32_dec_and_test uses predecrement, you want
-   postincrement to this function. so it isn't very useful */
-/* int atomic32_inc_and_test ( atomic32_t *v ) */
-#define atomic32_inc_and_test( v ) \
-    ( InterlockedIncrement ( & ( v ) -> counter ) == 0 )
-
-/* HERE's useful */
-#define atomic32_test_and_inc( v ) \
-    ( atomic32_read_and_add ( v, 1 ) == 0 )
-
-/* int atomic32_test_and_set ( atomic32_t *v, int s, int t ) */
-#define atomic32_test_and_set( v, s, t ) \
-    InterlockedCompareExchange ( & ( v ) -> counter, ( s ), ( t ) )
-
-/* conditional modifications */
-static __inline int atomic32_read_and_add_lt ( atomic32_t *v, int i, int t )
-{
-	LONG val, val_intern;
-	for ( val = atomic32_read ( v ); val < t; val = val_intern )
-	{
-		val_intern = atomic32_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-static __inline int atomic32_read_and_add_le ( atomic32_t *v, int i, int t )
-{
-	LONG val, val_intern;
-	for ( val = atomic32_read ( v ); val <= t; val = val_intern )
-	{
-		val_intern = atomic32_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-static __inline int atomic32_read_and_add_eq ( atomic32_t *v, int i, int t )
-{
-	LONG val, val_intern;
-	for ( val = atomic32_read ( v ); val == t; val = val_intern )
-	{
-		val_intern = atomic32_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-static __inline int atomic32_read_and_add_ne ( atomic32_t *v, int i, int t )
-{
-	LONG val, val_intern;
-	for ( val = atomic32_read ( v ); val != t; val = val_intern )
-	{
-		val_intern = atomic32_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-static __inline int atomic32_read_and_add_ge ( atomic32_t *v, int i, int t )
-{
-	LONG val, val_intern;
-	for ( val = atomic32_read ( v ); val >= t; val = val_intern )
-	{
-		val_intern = atomic32_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-static __inline int atomic32_read_and_add_gt ( atomic32_t *v, int i, int t )
-{
-	LONG val, val_intern;
-	for ( val = atomic32_read ( v ); val > t; val = val_intern )
-	{
-		val_intern = atomic32_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-static __inline int atomic32_read_and_add_odd ( atomic32_t *v, int i )
-{
-	LONG val, val_intern;
-	for ( val = atomic32_read ( v ); ( val & 1 ) != 0; val = val_intern )
-	{
-		val_intern = atomic32_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-static __inline int atomic32_read_and_add_even ( atomic32_t *v, int i )
-{
-	LONG val, val_intern;
-	for ( val = atomic32_read ( v ); ( val & 1 ) == 0; val = val_intern )
-	{
-		val_intern = atomic32_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_atomic32_ */
diff --git a/interfaces/os/win/atomic64.h b/interfaces/os/win/atomic64.h
deleted file mode 100644
index de57561..0000000
--- a/interfaces/os/win/atomic64.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_atomic64_
-#define _h_atomic64_
-
-#define WIN32_LEAN_AND_MEAN
-#include <WINDOWS.H>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct atomic64_t atomic64_t;
-struct atomic64_t
-{
-    volatile LONGLONG counter;
-};
-
-/* int atomic64_read ( const atomic64_t *v ); */
-#define atomic64_read( v ) \
-    ( ( v ) -> counter )
-
-/* void atomic64_set ( atomic64_t *v, long int i ); */
-#define atomic64_set( v, i ) \
-    ( ( void ) ( ( ( v ) -> counter ) = ( i ) ) )
-
-/* add to v -> counter and return the prior value */
-/* int atomic32_read_and_add ( atomic32_t *v, int i ) */
-#define atomic64_read_and_add( v, i ) \
-    InterlockedExchangeAdd64 ( & ( v ) -> counter, ( i ) )
-
-/* if no read is needed, define the least expensive atomic add */
-#define atomic64_add( v, i ) \
-    atomic64_read_and_add ( v, i )
-
-/* add to v -> counter and return the result */
-static __inline LONG64 atomic64_add_and_read ( atomic64_t *v, int i )
-{
-	return atomic64_read_and_add ( v, i ) + i;
-}
-
-/* void atomic64_inc ( atomic64_t *v ) */
-#define atomic64_inc( v ) \
-    InterlockedIncrement64 ( & ( v ) -> counter )
-
-/* void atomic64_dec ( atomic64_t *v ) */
-#define atomic64_dec( v ) \
-    InterlockedDecrement64 ( & ( v ) -> counter )
-
-/* decrement by one and test result for 0 */
-/* int atomic64_dec_and_test ( atomic64_t *v ) */
-#define atomic64_dec_and_test( v ) \
-    ( InterlockedDecrement64 ( & ( v ) -> counter ) == 0 )
-
-/* when atomic64_dec_and_test uses predecrement, you want
-   postincrement to this function. so it isn't very useful */
-/* int atomic64_inc_and_test ( atomic64_t *v ) */
-#define atomic64_inc_and_test( v ) \
-    ( InterlockedIncrement64 ( & ( v ) -> counter ) == 0 )
-
-/* HERE's useful */
-#define atomic64_test_and_inc( v ) \
-    ( atomic64_read_and_add ( v, 1 ) == 0 )
-
-/* int atomic64_test_and_set ( atomic64_t *v, int s, int t ) */
-#define atomic64_test_and_set( v, s, t ) \
-    InterlockedCompareExchange64 ( & ( v ) -> counter, ( s ), ( t ) )
-
-/* conditional modifications */
-static __inline LONG64 atomic64_read_and_add_lt ( atomic64_t *v, int i, int t )
-{
-	LONG64 val, val_intern;
-	for ( val = atomic64_read ( v ); val < t; val = val_intern )
-	{
-		val_intern = atomic64_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-static __inline LONG64 atomic64_read_and_add_le ( atomic64_t *v, int i, int t )
-{
-	LONG64 val, val_intern;
-	for ( val = atomic64_read ( v ); val <= t; val = val_intern )
-	{
-		val_intern = atomic64_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-static __inline LONG64 atomic64_read_and_add_eq ( atomic64_t *v, int i, int t )
-{
-	LONG64 val, val_intern;
-	for ( val = atomic64_read( v ); val == t; val = val_intern )
-	{
-		val_intern = atomic64_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-static __inline LONG64 atomic64_read_and_add_ne ( atomic64_t *v, int i, int t )
-{
-	LONG64 val, val_intern;
-	for ( val = atomic64_read ( v ); val != t; val = val_intern )
-	{
-		val_intern = atomic64_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-static __inline LONG64 atomic64_read_and_add_ge ( atomic64_t *v, int i, int t )
-{
-	LONG64 val, val_intern;
-	for ( val = atomic64_read ( v ); val >= t; val = val_intern )
-	{
-		val_intern = atomic64_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-static __inline LONG64 atomic64_read_and_add_gt ( atomic64_t *v, int i, int t )
-{
-	LONG64 val, val_intern;
-	for ( val = atomic64_read ( v ); val > t; val = val_intern )
-	{
-		val_intern = atomic64_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-static __inline LONG64 atomic64_read_and_add_odd ( atomic64_t *v, int i )
-{
-	LONG64 val, val_intern;
-	for ( val = atomic64_read ( v ); ( val & 1 ) != 0; val = val_intern )
-	{
-		val_intern = atomic64_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-static __inline LONG64 atomic64_read_and_add_even ( atomic64_t *v, int i )
-{
-	LONG64 val, val_intern;
-	for ( val = atomic64_read ( v ); ( val & 1 ) == 0; val = val_intern )
-	{
-		val_intern = atomic64_test_and_set ( v, val + i, val );
-		if ( val_intern == val )
-			break;
-	}
-	return val;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_atomic64_ */
diff --git a/interfaces/os/win/byteswap.h b/interfaces/os/win/byteswap.h
deleted file mode 100644
index 4b92f51..0000000
--- a/interfaces/os/win/byteswap.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_win_byteswap_
-#define _h_win_byteswap_
-
-#ifndef _INC_STDLIB
-#include <stdlib.h>
-#endif
-
-/* make these look the same as on Linux
-   use the lower-level Windows routines, as
-   they are specific in their data types */
-#undef bswap_16
-#define bswap_16(x) _byteswap_ushort(x)
-#undef bswap_32
-#define bswap_32(x) _byteswap_ulong(x)
-#undef bswap_64
-#define bswap_64(x) _byteswap_uint64(x)
-
-#endif /* _h_win_byteswap_ */
diff --git a/interfaces/os/win/endian.h b/interfaces/os/win/endian.h
deleted file mode 100644
index 61d9c7d..0000000
--- a/interfaces/os/win/endian.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_win_endian_
-#define _h_win_endian_
-
-/* magic values pulled from RPCNDR.H */
-
-#define __LITTLE_ENDIAN   (0X00000010L)
-#define __BIG_ENDIAN      (0X00000000L)
-
-#if defined(__RPC_MAC__)
-#define __BYTE_ORDER      __BIG_ENDIAN
-#else
-#define __BYTE_ORDER      __LITTLE_ENDIAN
-#endif
-
-
-#endif /* _h_win_endian_ */
diff --git a/interfaces/os/win/os-native.h b/interfaces/os/win/os-native.h
deleted file mode 100644
index 4093703..0000000
--- a/interfaces/os/win/os-native.h
+++ /dev/null
@@ -1,238 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_os_native_
-#define _h_os_native_
-
-/* get this guy included so that off_t is 64 bit */
-#ifndef _STDINT_H
-#include "stdint.h"
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-/* specify at least NT 4.0 */
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0400
-#endif
-
-/* we should never include this directly */
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <winsock2.h>
-#include <ws2tcpip.h>
-
-#include <limits.h>
-
-#include <ctype.h>
-#include <direct.h>
-#include <math.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-/* to make code work that depends on POSIX-bits (octal!) under Windows */
-#define S_IWGRP 0020
-#define S_IWOTH 0002
-
-#define mode_t uint32_t
-
-/*--------------------------------------------------------------------------
- * timeout_t
- *  a structure for communicating a timeout
- *  which under Windows is a relative time
- */
-struct timeout_t
-{
-    uint32_t mS;
-    uint32_t prepared;
-};
-
-#ifndef putenv
-#define putenv( s ) _putenv ( s )
-#endif
-
-#define mkdir( d, m ) _mkdir( d )
-#define strcasecmp _stricmp
-#define strtoll _strtoi64
-#define strtok_r strtok_s
-
-#undef strdup
-#define strdup( str ) \
-    string_dup_measure ( ( str ), NULL )
-
-#undef strndup
-#define strndup( str, n ) \
-    string_dup ( ( str ), ( n ) )
-
-int __cdecl isalnum ( int ch );
-int __cdecl isalpha ( int ch );
-int __cdecl iscntrl ( int ch );
-int __cdecl isdigit ( int ch );
-int __cdecl isgraph ( int ch );
-int __cdecl islower ( int ch );
-int __cdecl isupper ( int ch );
-int __cdecl isprint ( int ch );
-int __cdecl ispunct ( int ch );
-int __cdecl isspace ( int ch );
-int __cdecl isxdigit ( int ch );
-int __cdecl tolower ( int ch );
-int __cdecl toupper ( int ch );
-
-#undef isascii
-int __cdecl isascii ( int ch );
-
-static __inline int isblank(int x)
-{
-    return (((x) == ' ') || ((x) == '\t'));
-}
-
-KLIB_EXTERN int CC snprintf ( char * buffer, size_t bufsize, const char * format, ... );
-
-static __inline
-void *memrchr ( const void *s, int c, size_t n )
-{
-    size_t i;
-    const char *cp = (const char*)s;
-    for ( i = n; i > 0; )
-    {
-        if ( ( int ) cp [ -- i ] == c )
-            return (void *)(cp + i);
-    }
-    return NULL;
-}
-
-static __inline
-char *strchrnul ( const char *s, int c_in )
-{
-    uint32_t i;
-    for ( i=0; s[i] != 0; ++i )
-    {
-        if ( s[i] == c_in ) 
-            break;
-    }
-  return ( char * )&s[ i ];
-}
-
-static __inline
-char *strsep ( char **stringp, const char *delim )
-{
-	char *s, *tok, c, delim_char;
-	const char *p_delim;
-
-	if ( ( s = *stringp ) == NULL )
-		return NULL;
-
-	for ( tok = s; ; )
-	{
-		c = *s++;
-		p_delim = delim;
-		do {
-			if ( ( delim_char = *p_delim++ ) == c )
-			{
-				if ( c == 0 )
-					s = NULL;
-				else
-					s[-1] = 0;
-				*stringp = s;
-				return ( tok );
-			}
-		} while ( delim_char != 0 );
-	}
-	return NULL;
-}
-
-#define gmtime_r(t, tm) gmtime_s(tm, t)
-#define timegm _mkgmtime
-
-static __inline
-int strncasecmp( const char *s1, const char *s2, size_t n )
-{
-    return _strnicmp( s1, s2, n );
-}
-
-static __inline 
-const char *strcasestr (const char *s1, const char *s2)
-{
-    unsigned char c2 = tolower((unsigned char) *s2);
-    size_t l1 = strlen(s1), l2 = strlen(s2);
-    
-    if (l2 == 0) {
-        return s1;
-    }
-
-    while (l1 >= l2) {
-        if (tolower((unsigned char) *s1) == c2
-            &&  (l2 == 1  ||  _strnicmp(s1 + 1, s2 + 1, l2 - 1) == 0)) {
-            return s1;
-        }
-        ++s1;
-        --l1;
-    }
-
-    return NULL;
-}
-
-static __inline
-long int lround ( double x )
-{
-    double val = ( x < 0.0 ) ? ceil ( x - 0.5 ) : floor ( x + 0.5 );
-    if ( val > ( double ) LONG_MAX )
-        return LONG_MAX;
-    if ( val < ( double ) LONG_MIN )
-        return LONG_MIN;
-    return ( long int ) val;
-}
-
-#define isalnum( ch ) isalnum   ( ( unsigned char ) ( ch ) )
-#define isalpha( ch ) isalpha   ( ( unsigned char ) ( ch ) )
-#define isascii( ch ) isascii   ( ( unsigned char ) ( ch ) )
-#define iscntrl( ch ) iscntrl   ( ( unsigned char ) ( ch ) )
-#define isdigit( ch ) isdigit   ( ( unsigned char ) ( ch ) )
-#define isgraph( ch ) isgraph   ( ( unsigned char ) ( ch ) )
-#define islower( ch ) islower   ( ( unsigned char ) ( ch ) )
-#define isupper( ch ) isupper   ( ( unsigned char ) ( ch ) )
-#define isprint( ch ) isprint   ( ( unsigned char ) ( ch ) )
-#define ispunct( ch ) ispunct   ( ( unsigned char ) ( ch ) )
-#define isspace( ch ) isspace   ( ( unsigned char ) ( ch ) )
-#define isxdigit( ch ) isxdigit ( ( unsigned char ) ( ch ) )
-#define tolower( ch ) tolower ( ( unsigned char ) ( ch ) )
-#define toupper( ch ) toupper ( ( unsigned char ) ( ch ) )
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_os_native_ */
diff --git a/interfaces/os/win/oserror.h b/interfaces/os/win/oserror.h
deleted file mode 100644
index 32fe03c..0000000
--- a/interfaces/os/win/oserror.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_oserror_
-#define _h_oserror_
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <winerror.h>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_oserror_ */
diff --git a/interfaces/os/win/strtol.h b/interfaces/os/win/strtol.h
deleted file mode 100644
index 524991c..0000000
--- a/interfaces/os/win/strtol.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_strtol_
-#define _h_strtol_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <ctype.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * strtoi32
- * strtoi32
- *  based upon actual usage
- */
-#define strtoi32( str, endp, base ) \
-    ( int32_t ) strtol ( str, endp, base )
-
-#define strtou32( str, endp, base ) \
-    ( uint32_t ) strtoul ( str, endp, base )
-
-
-/*--------------------------------------------------------------------------
- * strtoi64
- * strtoi64
- *  based upon actual usage
- */
-#define strtoi64( str, endp, base ) \
-    _strtoi64 ( str, endp, base )
-
-#define strtou64( str, endp, base ) \
-    _strtoui64 ( str, endp, base )
-    
-#if 0
-/*this implementation does not report overflow... */
-static __inline
-__int64 strtoi64( const char* str, char** endp, uint32_t base )
-{
-    int i = 0;
-    __int64 ret_value = 0;
-
-    if ( str != NULL && base != 1 && base <= 36 )
-    {
-        bool negate = false;
-
-        for ( ; isspace( str [ i ] ); ++ i )
-            ( void ) 0;
-
-        switch ( str [ i ] )
-        {
-        case '-':
-            negate = true;
-        case '+':
-            ++ i;
-            break;
-        }
-
-        if ( base == 0 )
-        {
-            if ( str [ i ] != '0' )
-                base = 10;
-            else if ( tolower ( str [ i + 1 ] == 'x' ) )
-            {
-                base = 16;
-                i += 2;
-            }
-            else
-            {
-                base = 8;
-                i += 1;
-            }
-        }
-
-        if ( base <= 10 )
-        {
-            for ( ; isdigit ( str [ i ] ); ++ i )
-            {
-                uint32_t digit = str [ i ] - '0';
-                if ( digit >= base )
-                    break;
-                ret_value *= base;
-                ret_value += digit;
-            }
-        }
-        else
-        {
-            for ( ; ; ++ i )
-            {
-                if ( isdigit ( str [ i ] ) )
-                {
-                    ret_value *= base;
-                    ret_value += str [ i ] - '0';
-                }
-                else if ( ! isalpha ( str [ i ] ) )
-                    break;
-                else
-                {
-                    uint32_t digit = toupper ( str [ i ] ) - 'A' + 10;
-                    if ( digit >= base )
-                        break;
-                    ret_value *= base;
-                    ret_value += digit;
-                }
-            }
-        }
-
-        if ( negate )
-            ret_value = - ret_value;
-    }
-
-    if ( endp != NULL )
-        * endp = (char *)str + i;
-
-    return ret_value;
-}
-
-static __inline
-unsigned __int64 strtou64( const char* str, char** endp, uint32_t base )
-{
-    return strtoi64( str, endp, base );
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_strtol_ */
diff --git a/interfaces/os/win/sysalloc.h b/interfaces/os/win/sysalloc.h
deleted file mode 100644
index 16c530e..0000000
--- a/interfaces/os/win/sysalloc.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sysalloc_
-#define _h_sysalloc_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#include <malloc.h>
-#include <stdlib.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* malloc, calloc, realloc
- */
-KLIB_EXTERN void * CC klib_malloc ( size_t bytes );
-KLIB_EXTERN void * CC klib_calloc ( size_t count, size_t size );
-KLIB_EXTERN void * CC klib_realloc ( void *obj, size_t bytes );
-
-/* free
- */
-KLIB_EXTERN void CC klib_free ( void *obj );
-
-#ifndef _c_sysalloc_
-
-#undef malloc
-#undef calloc
-#undef realloc
-#undef free
-
-#define malloc klib_malloc
-#define calloc klib_calloc
-#define realloc klib_realloc
-#define free klib_free
-
-#endif /* _c_sysalloc_ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sysalloc_ */
diff --git a/interfaces/rdbms/rdbms.h b/interfaces/rdbms/rdbms.h
deleted file mode 100644
index 791e0ae..0000000
--- a/interfaces/rdbms/rdbms.h
+++ /dev/null
@@ -1,362 +0,0 @@
-#ifndef _h_rdbms_rdbms_
-#define _h_rdbms_rdbms_
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* logdberr
- *  like logerr, but interprets error code as a db error code
- */
-void logdberr ( int err, const char *fmt, ... );
-
-/* strdberror
- *  a version of strerror that operates within db error code space
- *  returned string is owned by library
- */
-const char *strdberror ( int dberr );
-
-/* strdberror_r
- *  a version of strerror_r that operates within db error code space
- *  returns 0 on success, EINVAL if "dberr" is invalid, and
- *  ERANGE if insufficient space was provided to copy the data.
- */
-int strdberror_r ( int dberr, char *buf, size_t n );
-
-/*--------------------------------------------------------------------------
- * DBColumnType
- *  for discovering column type at runtime
- */
-enum
-{
-    colUnsupported,
-    colBool,
-    colI8,
-    colU8,
-    colI16,
-    colU16,
-    colI32,
-    colU32,
-    colI64,
-    colU64,
-    colF32,
-    colF64,
-    colText,
-    colBlob
-};
-
-
-/*--------------------------------------------------------------------------
- * DBRow
- */
-typedef struct DBBlob DBBlob;
-struct DBBlob
-{
-    /* the blob is in here */
-    void *addr;
-    size_t size;
-
-    /* when finished with the blob, whack it thus */
-    void *priv;
-    void ( * whack ) ( void *priv );
-};
-
-/* DBBlobWhack
- */
-#define DBBlobWhack( blob ) \
-    ( ( blob ) -> priv != NULL ? \
-      ( * ( blob ) -> whack ) ( ( blob ) -> priv ) : ( void ) 0 )
-
-typedef struct DBRow DBRow;
-typedef struct DBRow_vt DBRow_vt;
-struct DBRow_vt
-{
-    rc_t ( * whack ) ( DBRow *self );
-    rc_t ( * numColumns ) ( const DBRow *self, unsigned int *num_cols );
-    rc_t ( * colInfo ) ( const DBRow *self, unsigned int idx,
-        int *col_type, const String **name );
-    rc_t ( * colIdx ) ( const DBRow *self, const String *name,
-        unsigned int *idx );
-    bool ( * isNull ) ( const DBRow *self, unsigned int idx );
-
-    rc_t ( * getAsNum ) ( const DBRow *self, unsigned int idx, int64_t *i, double *d, bool *is_floating );
-    rc_t ( * getAsString ) ( const DBRow *self, unsigned int idx,
-        const String **value );
-    rc_t ( * getAsBlob ) ( const DBRow *self, unsigned int idx,
-        const void **value, size_t *bytes );
-    rc_t ( * stealBlob ) ( DBRow *self, unsigned int idx, DBBlob *blob );
-};
-struct DBRow
-{
-    const DBRow_vt *vt;
-};
-
-/* DBRowNumColumns
- *  read the number of columns in row
- */
-#define DBRowNumColumns( row, num_cols ) \
-    ( * ( row ) -> vt -> numColumns ) ( row, num_cols )
-
-/* DBRowColumnInfo
- *  read the type for indexed column as DBColumnType
- *  index is zero-based
- *  optionally reads column name if "name" is not NULL
- */
-#define DBRowColumnInfo( row, idx, col_type, name ) \
-    ( * ( row ) -> vt -> colInfo ) ( row, idx, col_type, name )
-
-/* DBRowColumnIdx
- *  determine zero-based index for named column
- */
-#define DBRowColumnIdx( row, name, idx ) \
-    ( * ( row ) -> vt -> colIdx ) ( row, name, idx )
-
-/* DBRowIsNull
- *  determine whether an indexed column value is NULL
- *  index is zero-based
- *  returns true only if row and column are valid,
- *  and column is NULL, obviously
- */
-#define DBRowIsNull( row, idx ) \
-    ( * ( row ) -> vt -> isNull ) ( row, idx )
-
-/* DBRowGetAs...
- *  column access functions
- *  all indices are zero-based
- */
-rc_t DBRowGetAsBool ( const DBRow *row, unsigned int idx, bool *value );
-rc_t DBRowGetAsI8 ( const DBRow *row, unsigned int idx, int8_t *value );
-rc_t DBRowGetAsU8 ( const DBRow *row, unsigned int idx, uint8_t *value );
-rc_t DBRowGetAsI16 ( const DBRow *row, unsigned int idx, int16_t *value );
-rc_t DBRowGetAsU16 ( const DBRow *row, unsigned int idx, uint16_t *value );
-rc_t DBRowGetAsI32 ( const DBRow *row, unsigned int idx, int32_t *value );
-rc_t DBRowGetAsU32 ( const DBRow *row, unsigned int idx, uint32_t *value );
-rc_t DBRowGetAsI64 ( const DBRow *row, unsigned int idx, int64_t *value );
-rc_t DBRowGetAsU64 ( const DBRow *row, unsigned int idx, uint64_t *value );
-rc_t DBRowGetAsF32 ( const DBRow *row, unsigned int idx, float *value );
-rc_t DBRowGetAsF64 ( const DBRow *row, unsigned int idx, double *value );
-#define DBRowGetAsString( row, idx, value ) \
-    ( * ( row ) -> vt -> getAsString ) ( row, idx, value )
-
-/* DBRowGetAsBlob
- *  special access that returns direct pointer to internal data
- *  only guaranteed to live while row exists
- *  ( here's where reference counting saves the day... )
- */
-#define DBRowGetAsBlob( row, idx, value, bytes ) \
-    ( * ( row ) -> vt -> getAsBlob ) ( row, idx, value, bytes )
-
-/* DBRowStealBlob
- *  even more special access that steals internal data from row
- *  or at least returns an allocation that is no longer associated
- *  with the column.
- *
- *  intended to invalidate the column and cause it to be NULL,
- *  but this is implementation dependent.
- */
-#define DBRowStealBlob( row, idx, blob ) \
-    ( * ( row ) -> vt -> stealBlob ) ( row, idx, blob )
-
-/* DBRowWhack
- *  whacks the row
- */
-#define DBRowWhack( row ) \
-    ( ( row ) == NULL ? 0 : ( * ( row ) -> vt -> whack ) ( row ) )
-
-
-/*--------------------------------------------------------------------------
- * DBResultSet
- */
-typedef struct DBResultSet DBResultSet;
-typedef struct DBResultSet_vt DBResultSet_vt;
-struct DBResultSet_vt
-{
-    rc_t ( * whack ) ( DBResultSet *self );
-    rc_t ( * numColumns ) ( const DBResultSet *self, unsigned int *num_cols );
-    rc_t ( * colInfo ) ( const DBResultSet *self, unsigned int idx,
-        int *col_type, const String **name );
-    rc_t ( * colIdx ) ( const DBResultSet *self, const String *name,
-        unsigned int *idx );
-
-    rc_t ( * getStatus ) ( const DBResultSet *self, int32_t *status );
-    rc_t ( * nextRow ) ( DBResultSet *self, DBRow **row );
-};
-struct DBResultSet
-{
-    const DBResultSet_vt *vt;
-};
-
-/* DBResultSetNumColumns
- *  read the number of columns in result
- */
-#define DBResultSetNumColumns( rs, num_cols ) \
-    ( * ( rs ) -> vt -> numColumns ) ( rs, num_cols )
-
-/* DBResultSetColumnInfo
- *  read the type for indexed column as DBColumnType
- *  index is zero-based
- *  optionally reads column name if "name" is not NULL
- */
-#define DBResultSetColumnInfo( rs, idx, col_type, name ) \
-    ( * ( rs ) -> vt -> colInfo ) ( rs, idx, col_type, name )
-
-/* DBResultSetColumnIdx
- *  determine zero-based index for named column
- */
-#define DBResultSetColumnIdx( rs, name, idx ) \
-    ( * ( rs ) -> vt -> colIdx ) ( rs, name, idx )
-
-/* DBResultSetGetStatus
- */
-#define DBResultSetGetStatus( rs, status ) \
-    ( * ( rs ) -> vt -> getStatus ) ( rs, status )
-
-/* DBResultSetNextRow
- *  returns dbNoErr if row was created
- *  returns dbEndData if no more rows were available
- *  returns something more sinister if an error occurred
- */
-#define DBResultSetNextRow( rs, row ) \
-    ( * ( rs ) -> vt -> nextRow ) ( rs, row )
-
-/* DBResultSetForEach
- *  iterates across all rows
- */
-rc_t DBResultSetForEach ( DBResultSet *rs,
-    void ( * f ) ( DBRow *row, void *data ), void * data );
-
-/* DBResultSetDoUntil
- *  iterates across all rows
- *  until the function returns true
- */
-rc_t DBResultSetDoUntil ( DBResultSet *rs,
-    bool ( * f ) ( DBRow *row, void *data ), void * data );
-
-/* DBResultSetWhack
- *  whacks the result set
- */
-#define DBResultSetWhack( rs ) \
-    ( ( rs ) == NULL ? 0 : ( * ( rs ) -> vt -> whack ) ( rs ) )
-
-
-/*--------------------------------------------------------------------------
- * Database
- */
-typedef struct Database Database;
-typedef struct Database_vt Database_vt;
-struct Database_vt
-{
-    rc_t ( * whack ) ( Database *self );
-    rc_t ( * setReturnSize ) ( Database *self, size_t max_size );
-    rc_t ( * execute ) ( Database *self, DBResultSet **rs, char *sql );
-};
-struct Database
-{
-    const Database_vt *vt;
-};
-
-/* DatabaseSetReturnSize
- *  sets maximum size for returns
- */
-#define DatabaseSetReturnSize( db, max_size ) \
-    ( * ( db ) -> vt -> setReturnSize ) ( db, max_size )
-
-/* DatabaseExecute
- *  issue an sql request
- */
-rc_t DatabaseExecute ( Database *db, DBResultSet **rs, const char *sql, ... );
-
-/* DatabaseGetStatus
- *  executes a stored procedure and returns status code
- */
-rc_t DatabaseGetStatus ( Database *db, int32_t *status, const char *sql, ... );
-
-/* DatabaseGetAs...
- *  column access functions on first row of a query
- *  all indices are zero-based
- */
-rc_t DatabaseGetAsBool ( Database *db, unsigned int idx,
-    bool *value, const char *sql, ... );
-rc_t DatabaseGetAsI8 ( Database *db, unsigned int idx,
-    int8_t *value, const char *sql, ... );
-rc_t DatabaseGetAsU8 ( Database *db, unsigned int idx,
-    uint8_t *value, const char *sql, ... );
-rc_t DatabaseGetAsI16 ( Database *db, unsigned int idx,
-    int16_t *value, const char *sql, ... );
-rc_t DatabaseGetAsU16 ( Database *db, unsigned int idx,
-    uint16_t *value, const char *sql, ... );
-rc_t DatabaseGetAsI32 ( Database *db, unsigned int idx,
-    int32_t *value, const char *sql, ... );
-rc_t DatabaseGetAsU32 ( Database *db, unsigned int idx,
-    uint32_t *value, const char *sql, ... );
-rc_t DatabaseGetAsI64 ( Database *db, unsigned int idx,
-    int64_t *value, const char *sql, ... );
-rc_t DatabaseGetAsU64 ( Database *db, unsigned int idx,
-    uint64_t *value, const char *sql, ... );
-rc_t DatabaseGetAsF32 ( Database *db, unsigned int idx,
-    float *value, const char *sql, ... );
-rc_t DatabaseGetAsF64 ( Database *db, unsigned int idx,
-    double *value, const char *sql, ... );
-rc_t DatabaseGetAsString ( Database *db, unsigned int idx,
-    const String **value, const char *sql, ... );
-
-/* DatabaseWhack
- *  tear down a connection
- */
-#define DatabaseWhack( db ) \
-    ( ( db ) == NULL ? 0 : ( * ( db ) -> vt -> whack ) ( db ) )
-
-
-/*--------------------------------------------------------------------------
- * DBManager
- *  something such as Sybase, ORACLE, etc.
- */
-typedef struct DBManager DBManager;
-struct DBManager
-{
-    rc_t ( * whack ) ( DBManager *self );
-    rc_t ( * connect ) ( const DBManager *self, const char *server,
-        const char *dbname, const char *user, const char *pass, Database **db );
-};
-
-/* DBManagerInit
- *  initialize object reference
- *  returns 0 if manager has been registered
- */
-rc_t DBManagerInit ( const DBManager **mgr, const char *name );
-
-
-/* DBManagerRegister
- *  makes an object known to DBManager
- */
-rc_t DBManagerRegister ( const DBManager *mgr, const char *name );
-
-
-/* DBManagerUnregister
- *  makes an object unknown to DBManager
- */
-rc_t DBManagerUnregister ( const DBManager *mgr, const char *name );
-
-
-/* DBManagerConnect
- *  establish a connection
- */
-#define DBManagerConnect( mgr, server, dbname, user, pass, db ) \
-    ( * ( mgr ) -> connect ) ( mgr, server, dbname, user, pass, db )
-
-/* DBManagerWhack
- */
-#define DBManagerWhack( mgr ) \
-    ( ( mgr ) == NULL ? 0 : ( * ( mgr ) -> whack ) ( mgr ) )
-
-rc_t DBManagerRelease(const DBManager *mgr);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_rdbms_rdbms_ */
diff --git a/interfaces/rdbms/sybase.h b/interfaces/rdbms/sybase.h
deleted file mode 100644
index 5bb932e..0000000
--- a/interfaces/rdbms/sybase.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef _h_rdbms_sybase_
-#define _h_rdbms_sybase_
-
-#ifndef _h_rdbms_rdbms_
-#include <rdbms/rdbms.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * Sybase
- */
-
-/* constants
- */
-#ifndef CS_VERSION_100
-#define CS_VERSION_100 112
-#endif
-
-#ifndef CS_VERSION_110
-#define CS_VERSION_110 1100
-#endif
-
-#ifndef CS_VERSION_125
-#define CS_VERSION_125 12500
-#endif
-
-#ifndef CS_VERSION_150
-#define CS_VERSION_150 15001
-#endif
-
-#ifndef MIN_CS_VERSION
-#define MIN_CS_VERSION CS_VERSION_125
-#endif
-
-#ifndef OS_CS_VERSION
-#define OS_CS_VERSION CS_VERSION_125
-#endif
-
-/* SybaseInit
- *  initializes the sybase rdbms
- */
-rc_t SybaseInit ( int version );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_rdbms_sybase_ */
diff --git a/interfaces/search/extern.h b/interfaces/search/extern.h
deleted file mode 100644
index 453811a..0000000
--- a/interfaces/search/extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_search_extern_
-#define _h_search_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define SEARCH_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define SEARCH_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_search_extern_ */
diff --git a/interfaces/search/grep.h b/interfaces/search/grep.h
deleted file mode 100644
index d8aeed6..0000000
--- a/interfaces/search/grep.h
+++ /dev/null
@@ -1,268 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_search_grep_
-#define _h_search_grep_
-
-#ifndef _h_search_extern_
-#include <search/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_insdc_insdc_
-#include <insdc/insdc.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * Fgrep
- */
-typedef struct Fgrep Fgrep;
-
-
-/* MatchCallback
- *
- *  "matchinfo" [ IN ] -
- *
- *  "flag" [ OUT ] -
- */
-typedef uint8_t FgrepContinueFlag;
-enum
-{
-    FGREP_CONTINUE = 1,
-    FGREP_STOP = 2
-};
-
-typedef struct FgrepMatch FgrepMatch;
-struct FgrepMatch
-{
-    int32_t position;
-    int32_t length;
-    int32_t whichpattern;
-};
-
-typedef rc_t ( CC * FgrepMatchCallback ) ( void *cbinfo,
-    const FgrepMatch *matchinfo, FgrepContinueFlag *flag );
-
-
-/* Make
- *
- *  "fg" [ OUT ] -
- *
- *  "mode" [ IN ]
- *
- *  "strings" [ IN ] and "numstrings" [ IN ] -
- */
-typedef uint8_t FgrepFlags;
-enum
-{
-    FGREP_MODE_ASCII = 1,
-    FGREP_MODE_ACGT = 2,
-    FGREP_TEXT_EXPANDED_2NA = 4,
-    FGREP_ALG_DUMB = 8,
-    FGREP_ALG_BOYERMOORE = 0x10,
-    FGREP_ALG_AHOCORASICK = 0x20
-};
-
-SEARCH_EXTERN rc_t CC FgrepMake ( Fgrep **fg, FgrepFlags mode,
-    const char *strings[], uint32_t numstrings );
-
-/* Whack
- */
- #if 0
-SEARCH_EXTERN void CC FgrepWhack ( Fgrep *self );
-#endif
-SEARCH_EXTERN void CC FgrepFree ( Fgrep *self );
-
-/* FindFirst
- *  Pass a matchinfo structure to get the info.
- *  Returns nonzero if found, 0 if nothing found.
- *
- *   "buf" [ IN ] and "len" [ IN ]
- *
- *  "matchinfo" [ OUT ]
- */
-SEARCH_EXTERN uint32_t CC FgrepFindFirst ( const Fgrep *self,
-    const char *buf, size_t len, FgrepMatch *matchinfo );
-
-
-/* FindAll
- * TBD - should this return rc_t?
- */
- #if 0
-SEARCH_EXTERN void CC FgrepFindAll ( const Fgrep *self, const char *buf, size_t len,
-    FgrepMatchCallback cb, void *cbinfo );
-#endif
-
-/*----------------------------------------------------------------
- * Fgrep appendix 
- */
-
-/*
- * Sees if a suffix of the pattern exact matches a prefix of the buffer.
- */
-SEARCH_EXTERN uint32_t CC has_left_exact_match(char *pattern, char *buf, size_t buflen,
-                              int32_t *length);
-
-SEARCH_EXTERN uint32_t CC has_right_exact_match(char *pattern, char *buf, size_t buflen, 
-                               int32_t *bestpos);
-
-SEARCH_EXTERN uint32_t CC has_inside_exact_match(char *pattern, char *buf, size_t buflen, 
-                                int32_t *skip);
-
-/*--------------------------------------------------------------------------
- * Agrep
- */
-typedef struct Agrep Agrep;
-
-
-/* MatchCallback
- */
-typedef struct AgrepMatch AgrepMatch;
-struct AgrepMatch
-{
-    int32_t position;
-    int32_t length;
-    int32_t score;
-};
-
-typedef uint8_t AgrepContinueFlag;
-enum
-{
-    AGREP_STOP = 1,
-    AGREP_CONTINUE = 2,
-    AGREP_MOREINFO = 4
-};
-
-typedef rc_t ( CC * AgrepMatchCallback ) ( const void *cbinfo, const AgrepMatch *matchinfo, AgrepContinueFlag *flag );
-
-
-/* Make
- */
-typedef uint32_t AgrepFlags;
-enum
-{
-    AGREP_MODE_ASCII = 0x0001, /* simple text grep */
-    AGREP_PATTERN_4NA = 0x0002, /* pattern is 4na - bio mode */
-    /* text flags */
-    AGREP_IGNORE_CASE = 0x0004, /* ignore case in ascii mode, bio mode always ignores case */
-    /* bio mode flags */
-    AGREP_TEXT_EXPANDED_2NA = 0x0008, /* search string can have 2na */
-    AGREP_ANYTHING_ELSE_IS_N = 0x0010, /* periods, dashes in 4na pattern treated as N */
-    
-    /* algorithm choice */
-    AGREP_ALG_DP = 0x0020,
-    AGREP_ALG_WUMANBER = 0x0040,
-    AGREP_ALG_MYERS = 0x0080, /* shoud be same, internally detect algo based on pattern size */
-    AGREP_ALG_MYERS_UNLTD = 0x0100, /* very faulty, at least will crash on low memory */
-
-    AGREP_EXTEND_SAME = 0x200,
-    AGREP_EXTEND_BETTER = 0x400,
-    AGREP_LEFT_MAINTAIN_SCORE = 0x800, /* Only supported in DP for now */
-    AGREP_ANCHOR_LEFT = 0x1000 /* Only supported in DP for now */
-};
-
-SEARCH_EXTERN rc_t CC AgrepMake(Agrep **self, AgrepFlags mode, const char *pattern);
-
-/* Whack
- */
-SEARCH_EXTERN void CC AgrepWhack ( Agrep *self );
-
-/* FindFirst
- *  Pass in a pointer to an AgrepMatch, and it will be filled out.
- *  Returns nonzero if something found, zero if nothing found.
- */
-SEARCH_EXTERN uint32_t CC AgrepFindFirst( const Agrep *self, int32_t threshold, const char *buf, size_t len, AgrepMatch *matchinfo);
-
-SEARCH_EXTERN uint32_t CC AgrepFindBest( const Agrep *self, int32_t threshold, const char *buf, int32_t len, AgrepMatch *match);
-
-/* FindAll
- */
-typedef struct AgrepCallArgs AgrepCallArgs;
-struct AgrepCallArgs
-{
-    const Agrep *self;
-
-    const char *buf;
-    size_t buflen;
-
-    AgrepMatchCallback cb;
-    void *cbinfo;
-
-    /*
-      This threshold is really intended for algorithms like DP and MYERS
-      that do not require the threshold to be part of the initial setup.
-      We may use this to override the one specified in the setup,
-      but we may not; if you want to use the one in the setup function,
-      pass -1 as the threshold.
-    */
-    int32_t threshold;
-};
-
-SEARCH_EXTERN void CC AgrepFindAll ( const AgrepCallArgs *args );
-
-/*--------------------------------------------------------------------------
- * Agrep appendix
- */
-
-SEARCH_EXTERN uint32_t CC has_left_approx_match(char *pattern, uint32_t errors, 
-                               char *buf, size_t buflen, 
-                               uint32_t *length, uint32_t *errcnt);
-
-SEARCH_EXTERN uint32_t CC has_right_approx_match(char *pattern, uint32_t errors, 
-                                char *buf, size_t buflen, 
-                                uint32_t *bestpos, uint32_t *errcnt);
-
-SEARCH_EXTERN uint32_t CC has_inside_approx_match(char *pattern, uint32_t plen, uint32_t errors, 
-                                 char *buf, size_t buflen, 
-                                 uint32_t *skip, uint32_t *errcnt);
-
-typedef struct LeftMatch LeftMatch;
-struct LeftMatch
-{
-    int32_t position;
-    int32_t hits;
-    int32_t misses;
-};
-
-typedef rc_t ( CC * LeftMatchCallback ) ( void *cbinfo, const LeftMatch *matchinfo, AgrepContinueFlag *flag );
-
-SEARCH_EXTERN size_t CC FindLongestCommonSubstring (
-    char const* pS1, char const* pS2, size_t const nLen1, size_t const nLen2,
-    size_t* pRetStart1, size_t* pRetStart2);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_search_grep_ */
diff --git a/interfaces/search/nucstrstr.h b/interfaces/search/nucstrstr.h
deleted file mode 100644
index 095bcf4..0000000
--- a/interfaces/search/nucstrstr.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==============================================================================
-
-  search/nucstrstr.h
-
-    nucleotide k-mer searching facility
- */
-
-
-#ifndef _h_search_nucstrstr_
-#define _h_search_nucstrstr_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <search/extern.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* set to 1 if buffer supplied to NucStrstrSearch is
-   always at least 16 bytes beyond than the sequence */
-#ifndef ENDLESS_BUFFER
-#define ENDLESS_BUFFER 1
-#endif
-
-/* normally used for test only */
-#ifndef ENABLE_AT_EXPR
-#define ENABLE_AT_EXPR 0
-#endif
-
-/* positional returns make little sense with Boolean logic */
-#ifndef ALLOW_POSITIONAL_OPERATOR_MIX
-#define ALLOW_POSITIONAL_OPERATOR_MIX 1
-#endif
-
-
-/*--------------------------------------------------------------------------
- * NucStrstr
- *  prepared handle for nucleotide k-mer strstr
- */
-typedef union NucStrstr NucStrstr;
-
-/* NucStrstrMake
- *  prepares search by parsing expression query string
- *  returns error if conversion was not possible.
- *
- *  "nss" [ OUT ] - return parameter for one-time search handle
- *
- *  "positional" [ IN ] - if non-zero, build an expression tree
- *  to return found position rather than simply a Boolean found.
- *  see NucStrstrSearch. if ENABLE_AT_EXPR is defined as non-zero,
- *  the <position_expr> production can switch this flag to true
- *  for the immediately following fasta_expr from within the
- *  expression string itself. if ALLOW_POSITIONAL_OPERATOR_MIX
- *  is defined as non-zero, operators '!', '&&' and '||' will
- *  be allowed when generating positional results. they will make
- *  no sense otherwise.
- *
- *  "query" [ IN ] and "len" [ IN ] - query string expression, such that:
- *       expr           : <unary_expr>
- *                      | <unary_expr> <boolean_op> <expr>
- *       unary_expr     : <primary_expr>
- *                      | '!' <unary_expr>
- *       primary_expr   : <position_expr>
- *                      | '^' <position_expr>
- *                      | <position_expr> '$'
- *                      | '(' <expr> ')'
- *       position_expr  : <fasta_expr>
- *                      | '@' <fasta_expr>
- *       fasta_expr     : FASTA
- *                      | "'" FASTA "'"
- *                      | '"' FASTA '"'
- *       boolean_op     : '&', '|', '&&', '||'
- *
- *    where the '@' operator may be used to force the "positional"
- *    flag to be true - conditionally enabled.
- *
- *  return values:
- *    EINVAL - invalid parameter or invalid expression
- */
-SEARCH_EXTERN int CC NucStrstrMake ( NucStrstr **nss, int positional,
-    const char *query, unsigned int len );
-
-/* NucStrstrWhack
- *  discard structure when no longer needed
- */
-SEARCH_EXTERN void CC NucStrstrWhack ( NucStrstr *self );
-
-/* NucStrstrSearch
- *  search buffer from starting position
- *
- *  "ncbi2na" [ IN ] - pointer to 2na data
- *
- *    N.B. - "ncbi2na" must be at least long enough to allow for
- *    full 16-byte loads at the tail of the search sequence:
- *
- *    - technically, the size requirement is:
- *     ( ( pos + len + 3 ) / 4 ) == bytes,
- *     ( ( bytes + 15 ) / 16 ) * 16 == min data size
- *
- *    - practically, if "ncbi2na" points to a data buffer
- *      that is at least 16 bytes longer than "bytes" above,
- *      then it is always sufficient, and sometimes excessive.
- *
- *  "pos" [ IN ] - starting base position for search,
- *  relative to "ncbi2na". may be >= 4.
- *
- *  "len" [ IN ] - the number of bases to include in
- *  the search, relative to "pos".
- *
- *  return values:
- *    0 if the pattern was not found
- *    1..N indicating starting position if "self" was
- *      prepared for positional return
- *   !0 if "self" was prepared normally by NucStrstrMake
- */
-SEARCH_EXTERN int CC NucStrstrSearch ( const NucStrstr *self,
-    const void *ncbi2na, unsigned int pos, unsigned int len,unsigned int* selflen );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_search_nucstrstr_ */
-
diff --git a/interfaces/search/ref-variation.h b/interfaces/search/ref-variation.h
deleted file mode 100644
index 3d67970..0000000
--- a/interfaces/search/ref-variation.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_search_ref_variation_
-#define _h_search_ref_variation_
-
-#ifndef _h_search_extern_
-#include <search/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_insdc_insdc_
-#include <insdc/insdc.h>
-#endif
-
-#ifndef REF_VAR_ALG
-#define REF_VAR_ALG 1
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if REF_VAR_ALG
-/*--------------------------------------------------------------------------
- * RefVarAlg
- *  while experimenting with algorithms...
- */
-typedef uint32_t RefVarAlg;
-enum
-{
-    refvarAlgSW = 1,
-    refvarAlgRA
-};
-
-#endif
-
-/*--------------------------------------------------------------------------
- * RefVariation
- */
-typedef struct RefVariation RefVariation;
-
-
-/* IUPACMake
- *  make a RefVarition object from IUPAC sequence data
- *
- *  "obj" [ OUT ] - return parameter for object
- *
- *  "ref" [ IN ] and "ref_len" [ IN ] - reference sequence
- *  against which the variation is expressed
- *
- *  "deletion_pos" [ IN ] and "deletion_len" [ IN, ZERO OKAY ] - location
- *  and length of deletion portion of variation, as expressed against "ref".
- *  these describe the portion of "ref" to be replaced.
- *
- *  "insertion" [ IN ] and "insertion_len" [ IN, ZERO OKAY ] - sequence to
- *  be inserted at "deletion_pos" as a substitution for deleted bases.
- *
- *  for a pure insertion, "deletion_len" should be zero and "insertion_len"
- *  should be non-zero. for a pure deletion, "deletion_len" should be non-zero
- *  and "insertion_len" should be zero. otherwise, the operation describes a
- *  substitution.
- */
-SEARCH_EXTERN rc_t CC RefVariationIUPACMake ( RefVariation ** obj,
-        INSDC_dna_text const* ref, size_t ref_len,
-        size_t deletion_pos, size_t deletion_len,
-        INSDC_dna_text const* insertion, size_t insertion_len
-#if REF_VAR_ALG
-        , RefVarAlg alg
-#endif
-    );
-
-
-/* AddRef
- * Release
- *  accepts NULL for self
- */
-SEARCH_EXTERN rc_t CC RefVariationAddRef ( RefVariation const* self );
-SEARCH_EXTERN rc_t CC RefVariationRelease ( RefVariation const* self );
-
-
-/* GetIUPACSearchQuery
- *  returns a minimum query string in IUPAC alphabet
- *  this string contains sufficient bounding bases to encompass
- *  all deletions and insertions
- *
- *  "query" [ OUT ] and "query_len" [ OUT, NULL OKAY ] - return parameter
- *  for query sequence.
- *
- * NB - "query" is owned by object, and cannot be freed by caller.
- *
- *  "query_start" [ OUT, NULL OKAY ] - return parameter for start of
- *  query sequence on ( original ) reference used to create object.
- */
-SEARCH_EXTERN rc_t CC RefVariationGetIUPACSearchQuery ( RefVariation const* self,
-    INSDC_dna_text const ** query, size_t * query_len, size_t * query_start );
-
-
-/* GetSearchQueryLenOnRef
- *  returns projected length of query sequence on reference
- *
- *  "query_len_on_ref" [ OUT ] - projected length of query sequence on reference
- */
-SEARCH_EXTERN rc_t CC RefVariationGetSearchQueryLenOnRef ( RefVariation const* self, size_t * query_len_on_ref );
-
-
-/* GetAllele
- *
- *  "allele" [ OUT ] and "allele_len" [ OUT ] - return parameter
- *  for allele sequence
- *
- * NB - "allele" is owned by object, and cannot be freed by caller.
- *
- *  "allele_start" [ OUT, NULL OKAY ] - return parameter for start of
- *  allele sequence on ( original ) reference used to create object.
- */
-SEARCH_EXTERN rc_t CC RefVariationGetAllele ( RefVariation const* self,
-    INSDC_dna_text const ** allele, size_t * allele_len, size_t * allele_start );
-
-
-/* GetAlleleLenOnRef
- *  returns projected length of allele on reference
- *
- *  "allele_len_on_ref" [ OUT ] - projected length of allele on reference
- */
-SEARCH_EXTERN rc_t CC RefVariationGetAlleleLenOnRef ( RefVariation const* self, size_t * allele_len_on_ref );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_search_ref_variation_ */
diff --git a/interfaces/search/smith-waterman.h b/interfaces/search/smith-waterman.h
deleted file mode 100644
index 0e2b236..0000000
--- a/interfaces/search/smith-waterman.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_search_smith_waterman_
-#define _h_search_smith_waterman_
-
-#ifndef _h_search_extern_
-#include <search/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct SmithWaterman SmithWaterman;
-
-typedef struct SmithWatermanMatch SmithWatermanMatch;
-struct SmithWatermanMatch
-{
-    int32_t position;
-    int32_t length;
-    int32_t score;
-};
-
-/* Make
- */
-SEARCH_EXTERN rc_t CC SmithWatermanMake ( SmithWaterman **self, const char *query );
-
-/* Whack
- */
-SEARCH_EXTERN void CC SmithWatermanWhack ( SmithWaterman *self );
-
-/* FindFirst
- *  threshold - minimum matching score: 0 will match anything, 2*strlen(query) and higher will only report perfect match
- *  Returns:    0 a match is found (details in the matchinfo, NULL is OK), 
- *              RC(rcText, rcString, rcSearching, rcQuery, rcNotFound) if nothing found, 
- *              other RC in case of an error.
- */
-SEARCH_EXTERN rc_t CC SmithWatermanFindFirst ( SmithWaterman *self, uint32_t threshold, const char *buf, size_t buf_size, SmithWatermanMatch* matchinfo );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif 
diff --git a/interfaces/simple/extern.h b/interfaces/simple/extern.h
deleted file mode 100644
index a3298ee..0000000
--- a/interfaces/simple/extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_simple_extern_
-#define _h_simple_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define SIMPLE_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define SIMPLE_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_simple_extern_ */
diff --git a/interfaces/simple/sra.hpp b/interfaces/simple/sra.hpp
deleted file mode 100644
index 3463bbf..0000000
--- a/interfaces/simple/sra.hpp
+++ /dev/null
@@ -1,1127 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_simple_sra_
-#define _hpp_simple_sra_
-
-#include <stdint.h>
-#include <string>
-#include <vector>
-#include <exception>
-
-/* NOTES
-
-   01. may need our own String abstraction to represent
-       pointers into cursor cache rather than copies.
-       std::string may be too heavyweight, but then
-       the same problem exists in Java... then again,
-       maybe it's just that we shouldn't use String for
-       bases...
-
- */
-
-extern "C"
-{
-    /*----------------------------------------------------------------------
-     * forwards and typedefs
-     */
-    struct SRA_Spot;
-    struct SRA_Object;
-    struct SRA_Sequence;
-    struct SRA_Reference;
-    struct SRA_Alignment;
-    struct SAM_Flags;
-    struct SAM_Headers;
-    struct SAM_Alignment;
-}
-
-namespace sra
-{
-
-    /*----------------------------------------------------------------------
-     * forwards and typedefs
-     */
-    typedef :: std :: string String;
-    typedef :: std :: exception Exception;
-    typedef :: SRA_Spot * SRASpotRef;
-    typedef :: SRA_Object * SRAObjectRef;
-    typedef :: SRA_Sequence * SRASequenceRef;
-    typedef :: SRA_Reference * SRAReferenceRef;
-    typedef :: SRA_Alignment * SRAAlignmentRef;
-    typedef :: SAM_Flags * SAMFlagsRef;
-    typedef :: SAM_Headers * SAMHeadersRef;
-    typedef :: SAM_Alignment * SAMAlignmentRef;
-
-
-    /*----------------------------------------------------------------------
-     * SRAException
-     *  all exceptions generated within sra :: simple are subclasses
-     */
-    class SRAException : public :: std :: exception
-    {
-    public:
-
-        const char * what () const
-            throw ();
-        
-        SRAException ()
-            throw ();
-
-        SRAException ( const String & message )
-            throw ();
-
-        SRAException ( const char * fmt, ... )
-            throw ();
-
-    public:
-
-        // C++ support
-
-        SRAException ( const SRAException & x )
-            throw ();
-        SRAException & operator = ( const SRAException & x )
-            throw ();
-
-        virtual ~ SRAException ()
-            throw ();
-
-    private:
-
-        String msg;
-    };
-
-
-    /*----------------------------------------------------------------------
-     * StringRef
-     *  behaves similarly to a String except that it points to
-     *  data held within a cache whenever possible.
-     */
-    class StringRef
-    {
-    public:
-
-        const char * data () const
-            throw ();
-
-        size_t length () const
-            throw ();
-
-        String toString () const
-            throw ( SRAException );
-
-    public:
-        StringRef ( const StringRef & s )
-            throw ();
-        StringRef & operator = ( const StringRef & s )
-            throw ();
-
-        virtual ~ StringRef ()
-            throw ();
-
-    private:
-
-        const char * str;
-        size_t len;
-
-        // TBD - additional opaque stuff for C object references
-    };
-
-    /*----------------------------------------------------------------------
-     * SRASequence
-     * SRASequenceIterator
-     *  a nucleotide sequence
-     */
-    class SRASequence
-    {
-    public:
-
-        /* name
-         *  returns a textual identifier if available
-         *  or a numeric version otherwise
-         */
-        String name () const
-            throw ( SRAException );
-
-        /* length
-         *  return the number of bases in sequence
-         */
-        uint64_t length () const
-            throw ( SRAException );
-
-        /* bases
-         *  returns bases using IUPAC character representation
-         */
-        String bases () const
-            throw ( SRAException );
-
-        /* isReverse
-         *  true if reverse read
-         */
-        bool isReverse () const
-            throw ( SRAException );
-
-        /* colorSpaceNative
-         *  returns true if the native sequence is in color-space
-         */
-        bool colorSpaceNative () const
-            throw ( SRAException );
-
-        /* hasColorSpace
-         *  returns true if sequence can return color-space
-         */
-        bool hasColorSpace () const
-            throw ();
-
-        /* colorSpaceKey
-         *  returns key ( starting base ) for first read
-         */
-        char colorSpaceKey () const
-            throw ( SRAException );
-
-        /* colorSpace
-         *  returns color-space representation
-         *  NB - may fail on some sequences
-         */
-        String colorSpace () const
-            throw ( SRAException );
-
-        /* qualities
-         *  returns per-base/color phred quality scores
-         */
-        std :: vector < uint8_t > qualities () const
-            throw ( SRAException );
-
-#if 0
-        // THESE ARE QUESTIONABLE...
-        // CONVENIENT PLACES TO ACCUMMULATE CRUFT, BUT
-        // DO WE WANT TO KEEP DRAGGING IT ALONG? AND
-        // HOW MUCH FACTORIZATION DO WE WANT IN API?
-
-        /* isTechnical
-         *  true if the sequence represents a technical read
-         */
-        bool isTechnical () const
-            throw ( SRAException );
-
-        /* hasPrimaryAlignment
-         *  returns true iff any part of sequence is aligned,
-         *  and the sequence is capable of returning an SRAAlignment
-         */
-        bool hasPrimaryAlignment () const
-            throw ();
-
-        /* primaryAlignment
-         *  if the sequence is aligned and the alignment is available
-         *  assign to an SRAAlignment
-         */
-        SRAAlignmentRef primaryAlignment () const
-            throw ( SRAException );
-
-#endif
-
-    public:
-
-        // C++ support
-
-        SRASequence & operator = ( SRASequenceRef s )
-            throw ();
-        SRASequence ( SRASequenceRef s )
-            throw ();
-
-        SRASequence & operator = ( const SRASequence & s )
-            throw ( SRAException );
-        SRASequence ( const SRASequence & s )
-            throw ( SRAException );
-
-        ~ SRASequence ()
-            throw ();
-
-    protected:
-
-        SRASequenceRef self;
-    };
-
-    class SRASequenceIterator : public SRASequence
-    {
-    public:
-
-        /* next
-         *  advance to the next sequence
-         *  returns false if no more sequences are available
-         */
-        bool next ()
-            throw ( SRAException );
-
-
-    public:
-
-        // C++ support
-
-        SRASequenceIterator ( SRASequenceRef r )
-            throw ();
-
-        SRASequenceIterator & operator = ( const SRASequenceIterator & i )
-            throw ( SRAException );
-        SRASequenceIterator ( const SRASequenceIterator & i )
-            throw ( SRAException );
-
-        ~ SRASequenceIterator ()
-            throw ();
-
-    private:
-        SRASequence & operator = ( const SRASequence & s )
-            throw ( SRAException );
-        SRASequenceIterator & operator = ( SRASequenceRef s )
-            throw ();
-    };
-
-
-    /*----------------------------------------------------------------------
-     * SRASpot
-     * SRASpotIterator
-     *  a complete machine read,
-     *  including technical and biological segments
-     */
-    class SRASpot : public SRASequence
-    {
-    public:
-
-        /* platform
-         *  return platform name as string
-         */
-        String platform () const
-            throw ( SRAException );
-
-        /* spotGroup
-         *  returns a spot group name if known
-         *  returns an empty string otherwise
-         */
-        String spotGroup () const
-            throw ( SRAException );
-
-        /* id
-         *  returns the spot's numeric identifier
-         */
-        int64_t id () const
-            throw ( SRAException );
-
-        /* numReads
-         *  return the number of individual sub-sequences
-         */
-        uint32_t numReads () const
-            throw ( SRAException );
-
-        /* reads
-         *  return all reads - mixed technical and biological
-         */
-        SRASequenceIterator reads () const
-            throw ( SRAException );
-
-        /* numBioReads
-         *  the number of biological reads
-         */
-        uint32_t numBioReads () const
-            throw ( SRAException );
-
-        /* bioReads
-         *  return only biological reads
-         *  if "trimmed" is true, apply quality clipping if indicated
-         */
-        SRASequenceIterator bioReads ( bool trimmed = false ) const
-            throw ( SRAException );
-
-    public:
-
-        // C++ support
-
-        SRASpot & operator = ( SRASpotRef r )
-            throw ();
-        SRASpot ( SRASpotRef r )
-            throw ();
-
-        SRASpot & operator = ( const SRASpot & s )
-            throw ( SRAException );
-        SRASpot ( const SRASpot & s )
-            throw ( SRAException );
-
-        ~ SRASpot ()
-            throw ();
-
-    protected:
-        SRASpotRef spot;
-    };
-
-    class SRASpotIterator : public SRASpot
-    {
-    public:
-
-        /* next
-         *  advance to the next spot
-         *  returns false if no more are available
-         */
-        bool next ()
-            throw ( SRAException );
-
-
-        SRASpotIterator ( SRASpotRef r )
-            throw ();
-
-        SRASpotIterator & operator = ( const SRASpotIterator & i )
-            throw ( SRAException );
-        SRASpotIterator ( const SRASpotIterator & i )
-            throw ( SRAException );
-
-        ~ SRASpotIterator ()
-            throw ();
-
-    private:
-        SRASpot & operator = ( const SRASpot & s )
-            throw ( SRAException );
-        SRASpotIterator & operator = ( SRASpotRef r )
-            throw ();
-    };
-
-
-    /*----------------------------------------------------------------------
-     * SRAReference
-     * SRAReferenceIterator
-     *  a reference sequence
-     */
-    class SRAReference : public SRASequence
-    {
-    public:
-
-        /* name
-         *  returns a textual identifier if available
-         *  or a numeric version otherwise
-         */
-        String name () const
-            throw ( SRAException );
-
-        /* accession
-         *  TBD - explain
-         */
-        String accession () const
-            throw ( SRAException );
-
-        /* isCircular
-         */
-        bool isCircular () const
-            throw ( SRAException );
-
-        /* baseCount
-         */
-        uint64_t baseCount () const
-            throw ( SRAException );
-
-        /* bases
-         *  returns bases using IUPAC character representation
-         *
-         *  "first" is a zero-based starting position,
-         *  "length" gives the total number of bases, which will be limited
-         *   to the reference boundaries unless circular
-         */
-        String bases ( uint64_t first, uint64_t length ) const
-            throw ( SRAException );
-
-    public:
-
-        // C++ support
-
-        SRAReference & operator = ( SRAReferenceRef r )
-            throw ();
-        SRAReference ( SRAReferenceRef r )
-            throw ();
-        
-        SRAReference & operator = ( const SRAReference & r )
-            throw ( SRAException );
-        SRAReference ( const SRAReference & r )
-            throw ( SRAException );
-
-        ~ SRAReference ()
-            throw ();
-
-    protected:
-
-        SRAReferenceRef self;
-    };
-
-    class SRAReferenceIterator : public SRAReference
-    {
-    public:
-
-        /* next
-         *  advance to the next reference
-         *  returns false if no more are available
-         */
-        bool next ()
-            throw ( SRAException );
-
-    public:
-
-        // C++ support
-
-        SRAReferenceIterator ( SRAReferenceRef r )
-            throw ();
-
-        SRAReferenceIterator & operator = ( const SRAReferenceIterator & i )
-            throw ( SRAException );
-        SRAReferenceIterator ( const SRAReferenceIterator & i )
-            throw ( SRAException );
-
-        ~ SRAReferenceIterator ()
-            throw ();
-
-    private:
-        SRAReference & operator = ( const SRAReference & r )
-            throw ( SRAException );
-        SRAReferenceIterator & operator = ( SRAReferenceRef r )
-            throw ();
-    };
-
-
-    /*----------------------------------------------------------------------
-     * SRAAlignment
-     * SRAAlignmentIterator
-     *  a relationship between two sequences
-     */
-    class SRAAlignment
-    {
-    public:
-
-        /* querySequence
-         *  get the query sequence
-         *  this is generally the sequence aligned against the reference
-         */
-        SRASequence querySequence () const
-            throw ( SRAException );
-
-        /* reference
-         *  get the reference sequence
-         */
-        SRAReference reference () const
-            throw ( SRAException );
-        
-        /* referenceStart
-         *  returns the alignment's zero-based starting coordinate on reference
-         */
-        uint64_t referenceStart () const
-            throw ( SRAException );
-
-        /* referenceLength
-         *  returns the alignment's projected length upon reference
-         */
-        uint64_t referenceLength () const
-            throw ( SRAException );
-
-        /* mappingQuality
-         *  how closely aligned are the sequences
-         */
-        int64_t mappingQuality () const
-            throw ( SRAException );
-
-        /* hasMate
-         */
-        bool hasMate () const
-            throw ();
-
-        /* mate
-         *  retrieve mate if available
-         */
-        SRAAlignmentRef mate () const
-            throw ( SRAException );
-
-        /* need to tell spot-id and read-idx of sequence
-           this could be available on the sequence object itself, but isn't.
-           it's very cheap in our case.
-        */
-
-        /* OTHER STUFF
-           read group ( should be modeled? should be from sequence? )
-           is read paired
-           is pair proper
-           is read on negative strand
-           is ( or is not ) primary alignment
-           is duplicate
-           is mate unmapped
-           is mate on negative strand
-           mate alignment start
-        */
-
-    public:
-
-        // C++ support
-
-        SRAAlignment & operator = ( SRAAlignmentRef a )
-            throw ();
-        SRAAlignment ( SRAAlignmentRef a )
-            throw ();
-
-        SRAAlignment & operator = ( const SRAAlignment & a )
-            throw ( SRAException );
-        SRAAlignment ( const SRAAlignment & a )
-            throw ( SRAException );
-
-        ~ SRAAlignment ()
-            throw ();
-
-    protected:
-
-        SRAAlignmentRef self;
-    };
-
-    class SRAAlignmentIterator : public SRAAlignment
-    {
-    public:
-
-        /* next
-         *  advance to the next alignment
-         */
-        bool next ()
-            throw ( SRAException );
-
-    public:
-
-        // C++ support
-
-        SRAAlignmentIterator ( SRAAlignmentRef a )
-            throw ();
-
-        SRAAlignmentIterator & operator = ( const SRAAlignmentIterator & i )
-            throw ( SRAException );
-        SRAAlignmentIterator ( const SRAAlignmentIterator & i )
-            throw ( SRAException );
-
-        ~ SRAAlignmentIterator ()
-            throw ();
-
-    private:
-        SRAAlignment & operator = ( const SRAAlignment & a )
-            throw ( SRAException );
-        SRAAlignmentIterator & operator = ( SRAAlignmentRef a )
-            throw ();
-    };
-
-
-    /*----------------------------------------------------------------------
-     * SRAAlignmentDetail
-     *  gives raw information about relationship between sequences
-     *  from the point of view of the query
-     */
-    class SRAAlignmentDetail
-    {
-    public:
-
-        /* hasOffset
-         *  a vector of boolean values corresponding to each query base
-         *  "false" means that there is no offset to apply to alignment
-         *  "true" means that there is an offset that must be applied
-         *  to the sequence alignment.
-         */
-        std :: vector < bool > hasOffset () const
-            throw ( SRAException );
-
-        /* offset
-         *  a packed vector of alignment offsets to be applied to the
-         *  query position before handling mismatches ( see documentation ).
-         *  NB - this is a signed quantity and can produce a negative
-         *  alignment coordinate in certain cases.
-         */
-        std :: vector < int32_t > offset () const
-            throw ( SRAException );
-
-        /* hasMismatch
-         *  a vector of boolean values corresponding to each query base
-         *  "false" means that the query sequence matches the reference
-         *  "true" means there is a mismatch, and the actual query base
-         *  may be obtained from the mismatch vector.
-         */
-        std :: vector < bool > hasMismatch () const
-            throw ( SRAException );
-
-        /* mismatch
-         *  a packed vector of query bases that differ from reference
-         *  there is one base for every "true" value in hasMismatch
-         */
-        std :: vector < char > mismatch () const
-            throw ( SRAException );
-            
-        // C++ constructor from alignment
-
-        SRAAlignmentDetail & operator = ( const SRAAlignment & a )
-            throw ( SRAException );
-        SRAAlignmentDetail ( const SRAAlignment & a )
-            throw ( SRAException );
-
-    public:
-
-        // C++ support
-
-        SRAAlignmentDetail & operator = ( SRAAlignmentRef r )
-            throw ();
-        SRAAlignmentDetail ( SRAAlignmentRef r )
-            throw ();
-
-        SRAAlignmentDetail & operator = ( const SRAAlignmentDetail & d )
-            throw ( SRAException );
-        SRAAlignmentDetail ( const SRAAlignmentDetail & d )
-            throw ( SRAException );
-
-        ~ SRAAlignmentDetail ()
-            throw ();
-
-    private:
-
-        SRAAlignmentRef self;
-    };
-
-
-    /*----------------------------------------------------------------------
-     * SRAObject
-     *  represents an SRA-capable object
-     */
-    class SRAObject
-    {
-    public:
-
-        /* constructor
-         *  tries to locate object described by "spec"
-         *  does not fully OPEN object
-         */
-        SRAObject ( const String & spec )
-            throw ( SRAException );
-
-        /* combine constructor
-         *  combines two objects into a single object
-         */
-        SRAObject ( const SRAObject & a, const SRAObject & b )
-            throw ( SRAException );
-
-        /* slice
-         *  create a sub-selection of object
-         *  the sub-selection is based upon reference spec
-         *  and/or coordinates within a reference
-         */
-        SRAObjectRef slice ( const String & referenceSpec ) const
-            throw ( SRAException );
-        SRAObjectRef slice ( uint64_t reference_start,
-                uint64_t reference_length, bool fully_contained ) const
-            throw ( SRAException );
-
-        /* open - IDEMPOTENT
-         *  causes object to create internal resources
-         */
-        void open ()
-            throw ( SRAException );
-
-        /* close
-         *  releases underlying resources
-         *  does NOT delete object
-         */
-        void close ()
-            throw ();
-
-        /* getReferences
-         *  returns an iterator of all references included within the object
-         */
-        SRAReferenceIterator getReferences () const
-            throw ( SRAException );
-
-        /* primaryAlignments
-         *  return an iterator of primary alignments
-         *  ordering is based upon object properties
-         */
-        SRAAlignmentIterator primaryAlignments () const
-            throw ( SRAException );
-        SRAAlignmentIterator primaryAlignments ( uint64_t startIdx, uint64_t count ) const
-            throw ( SRAException );
-
-        /* secondaryAlignments
-         *  return an iterator of secondary alignments
-         *  ordering is based upon object properties
-         */
-        SRAAlignmentIterator secondaryAlignments () const
-            throw ( SRAException );
-        SRAAlignmentIterator secondaryAlignments ( uint64_t startIdx, uint64_t count ) const
-            throw ( SRAException );
-
-        /* allAlignments
-         *  return an iterator of combined primary and secondary alignments
-         *  ordering is based upon object properties
-         */
-        SRAAlignmentIterator allAlignments () const
-            throw ( SRAException );
-
-
-        /* alignedSequences
-         *  return an iterator of aligned sequences
-         *  ordering is based upon object properties
-         */
-        SRASequenceIterator alignedSequences () const
-            throw ( SRAException );
-        SRASequenceIterator alignedSequences ( uint64_t startIdx, uint64_t count ) const
-            throw ( SRAException );
-
-        /* unalignedSequences
-         *  return an iterator of unaligned sequences
-         */
-        SRASequenceIterator unalignedSequences () const
-            throw ( SRAException );
-        SRASequenceIterator unalignedSequences ( uint64_t startIdx, uint64_t count ) const
-            throw ( SRAException );
-
-        /* allSequences
-         *  return an iterator of all sequences
-         */
-        SRASequenceIterator allSequences () const
-            throw ( SRAException );
-
-
-        /* alignedSpots
-         *  return an iterator of fully or partially aligned spots
-         */
-        SRASpotIterator alignedSpots ( bool partially_aligned ) const
-            throw ( SRAException );
-        SRASpotIterator alignedSpots ( uint64_t startIdx, uint64_t count, bool partially_aligned ) const
-            throw ( SRAException );
-
-        /* unalignedSpots
-         *  return an iterator of fully unaligned spots
-         */
-        SRASpotIterator unalignedSpots () const
-            throw ( SRAException );
-        SRASpotIterator unalignedSpots ( uint64_t startIdx, uint64_t count ) const
-            throw ( SRAException );
-
-        /* allSpots
-         *  return an iterator of all spots
-         */
-        SRASpotIterator allSpots () const
-            throw ( SRAException );
-        SRASpotIterator allSpots ( uint64_t startIdx, uint64_t count ) const
-            throw ( SRAException );
-
-    public:
-
-        // C++ support
-
-        SRAObject & operator = ( SRAObjectRef o )
-            throw ();
-        SRAObject ( SRAObjectRef o )
-            throw ();
-
-        SRAObject & operator = ( const SRAObject & o )
-            throw ( SRAException );
-        SRAObject ( const SRAObject & o )
-            throw ( SRAException );
-
-        ~ SRAObject ()
-            throw ();
-
-    protected:
-
-        SRAObjectRef self;
-    };
-
-
-    /*----------------------------------------------------------------------
-     * SAMAlignment
-     *  represents data in a SAM/BAM record
-     */
-    class SAMAlignment
-    {
-    public:
-
-        /* qName
-         *  query-template name
-         */
-        String qName () const
-            throw ( SRAException );
-
-        /* rName
-         *  reference-sequence name
-         */
-        String rName () const
-            throw ( SRAException );
-
-        /* pos
-         *  1-based leftmost mapping position
-         *  starting position on reference
-         */
-        uint32_t pos () const
-            throw ( SRAException );
-
-        /* mapQ
-         *  mapping quality
-         */
-        uint8_t mapQ () const
-            throw ( SRAException );
-
-        /* cigar
-         *  cigar-string
-         *  a quasi-run-length-encoded representation of alignment traceback
-         */
-        String cigar () const
-            throw ( SRAException );
-
-        /* rNext
-         *  ref. name of the mate/next segment
-         */
-        String rNext () const
-            throw ( SRAException );
-
-        /* pNext
-         *  ref. position of the mate/next segment
-         */
-        uint32_t pNext () const
-            throw ( SRAException );
-
-        /* tLen
-         *  observed template length
-         */
-        int32_t tLen () const
-            throw ( SRAException );
-
-        /* seq
-         *  IUPAC bases or color-space
-         */
-        String seq () const
-            throw ( SRAException );
-
-        /* qual
-         *  returns per-base/color phred-33 quality scores
-         *  NB - phred-33 is an ASCII encoding using offset of 33
-         */
-        String qual () const
-            throw ( SRAException );
-
-
-        // conversion from SRA alignment
-
-        SAMAlignment & operator = ( const SRAAlignment & a )
-            throw ();
-        SAMAlignment ( const SRAAlignment & a )
-            throw ();
-
-    public:
-
-        // C++ support
-
-        SAMAlignment & operator = ( SAMAlignmentRef r )
-            throw ();
-        SAMAlignment ( SAMAlignmentRef r )
-            throw ();
-
-        SAMAlignment & operator = ( const SAMAlignment & a )
-            throw ( SRAException );
-        SAMAlignment ( const SAMAlignment & a )
-            throw ( SRAException );
-
-        ~ SAMAlignment ()
-            throw ();
-
-    protected:
-
-        SAMAlignmentRef self;
-    };
-
-    class SAMAlignmentIterator : public SAMAlignment
-    {
-    public:
-
-        /* next
-         *  advance to the next alignment
-         */
-        bool next ()
-            throw ( SRAException );
-
-        // conversion from SRA alignment iterator
-
-        SAMAlignmentIterator & operator = ( const SRAAlignmentIterator & i )
-            throw ( SRAException );
-        SAMAlignmentIterator ( const SRAAlignmentIterator & i )
-            throw ( SRAException );
-
-    public:
-
-        // C++ support
-
-        SAMAlignmentIterator ( SAMAlignmentRef r )
-            throw ();
-
-        SAMAlignmentIterator & operator = ( const SAMAlignmentIterator & i )
-            throw ( SRAException );
-        SAMAlignmentIterator ( const SAMAlignmentIterator & i )
-            throw ( SRAException );
-
-        ~ SAMAlignmentIterator ()
-            throw ();
-
-    private:
-        SAMAlignment & operator = ( const SRAAlignment & a )
-            throw ();
-        SAMAlignment & operator = ( const SAMAlignment & a )
-            throw ();
-        SAMAlignmentIterator & operator = ( SAMAlignmentRef r )
-            throw ();
-    };
-
-
-    /*----------------------------------------------------------------------
-     * SAMHeaders
-     *  attempts to assemble SAM header information
-     */
-    class SAMHeaders
-    {
-    public:
-
-        /* toString
-         *  generate headers as a text object
-         */
-        String toString () const
-            throw ( SRAException );
-
-        /* TBD
-         * list of readgroups
-         */
-
-        // extraction from an object
-        SAMHeaders & operator = ( const SRAObject & o )
-            throw ( SRAException );
-        SAMHeaders ( const SRAObject & o )
-            throw ( SRAException );
-
-    public:
-
-        // C++ support
-
-        SAMHeaders & operator = ( const SAMHeaders & h )
-            throw ();
-        SAMHeaders ( const SAMHeaders & h )
-            throw ();
-
-        ~ SAMHeaders ()
-            throw ();
-
-    private:
-
-        SAMHeadersRef self;
-    };
-
-
-    /*----------------------------------------------------------------------
-     * SAMFlags
-     *  extract "SAM flags" bits/word from an alignment
-     */
-    class SAMFlags
-    {
-    public:
-
-        /* multipleSegments ( COSTLY )
-         *  template having multiple segments in sequencing
-         */
-        bool multipleSegments () const
-            throw ( SRAException );
-
-        /* properlyAligned ( VERY EXPENSIVE )
-         *  each segment properly aligned according to the aligner
-         *  all the reads are aligned to the same chromosome
-         */
-        bool properlyAligned () const
-            throw ( SRAException );
-
-        /* unmapped
-         *  segment unmapped
-         */
-        bool unmapped () const
-            throw ( SRAException );
-
-        /* mateUnmapped ( COSTLY )
-         *  next segment in the template unmapped
-         */
-        bool mateUnmapped () const
-            throw ( SRAException );
-
-        /* reverseComp
-         *  SEQ being reverse complemented
-         */
-        bool reverseComp () const
-            throw ( SRAException );
-
-        /* mateReverseComp ( VERY EXPENSIVE )
-         *  SEQ of the next segment in the template being reversed
-         */
-        bool mateReverseComp () const
-            throw ( SRAException );
-
-        /* isFirst
-         *  the first segment in the template
-         */
-        bool isFirst () const
-            throw ( SRAException );
-
-        /* isLast
-         *  the last segment in the template
-         */
-        bool isLast () const
-            throw ( SRAException );
-
-        /* isSecondary
-         *  secondary alignment
-         */
-        bool isSecondary () const
-            throw ( SRAException );
-
-        /* failsQualityControl ( COSTLY )
-         *  not passing quality controls
-         */
-        bool failsQualityControl () const
-            throw ( SRAException );
-
-        /* isDuplicate ( COSTLY )
-         *  PCR or optical duplicate
-         */
-        bool isDuplicate () const
-            throw ( SRAException );
-
-        /* bits ( VERY EXPENSIVE )
-         *  access flags as bit-field
-         *  NB - may incur performance penalty
-         *  unless needing all fields, it may be
-         *  cheaper to access bit-fields individually
-         */
-        uint16_t bits () const
-            throw ( SRAException );
-
-    public:
-
-    private:
-
-        SAMAlignmentRef self;
-    };
-}
-
-#endif /* _hpp_simple_sra_ */
diff --git a/interfaces/sra/454.vschema b/interfaces/sra/454.vschema
deleted file mode 100644
index a3f5bc5..0000000
--- a/interfaces/sra/454.vschema
+++ /dev/null
@@ -1,289 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * NCBI 454 Sequence Read Archive schema
- */
-version 1;
-
-include 'ncbi/sra.vschema';
-include 'ncbi/spotname.vschema';
-include 'ncbi/clip.vschema';
-
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-/* dynamic_read_desc
- *  uses inputs to determine read type and segmentation
- *
- *  "edit_distance" [ CONST, OPTIONAL ] - a tolerance figure for
- *  linker matching, where 0 requires exact match, 5 is default.
- *
- *  "spot" [ DATA ] - bases for entire spot
- *
- *  "key" [ DATA, CONTROL ] - bases for key sequence. for version 1,
- *  the first base following key is taken as biological start
- *
- *  "linker" [ DATA, CONTROL, OPTIONAL ] - if present, is used to separate
- *  all bases following "key" into mate pair biological reads
- *
- *  returns a trio for each identified read, with read type, start and length
- */
-typeset NCBI:SRA:_454_:drdparam_set { ascii, U8, INSDC:2na:packed };
-extern function
-U32 [ 3 ] NCBI:SRA:_454_:dynamic_read_desc #1 < * U32 edit_distance >
-    ( NCBI:SRA:_454_:drdparam_set spot, NCBI:SRA:_454_:drdparam_set key
-      * NCBI:SRA:_454_:drdparam_set linker );
-
-const U32 NCBI:SRA:_454_:dyn_read_type  = 0;
-const U32 NCBI:SRA:_454_:dyn_read_start = 1;
-const U32 NCBI:SRA:_454_:dyn_read_len   = 2;
-
-
-/* tokenize_spot_name
- *  scans name on input
- *  tokenizes into parts
- */
-extern function NCBI:SRA:spot_name_token
-    NCBI:SRA:_454_:tokenize_spot_name #1 ( ascii name );
-
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:_454_:common
- *  Roche 454 SRA Platform
- *
- * history:
- *  1.0.1 - explictly base upon sra #1.0.1
- *  1.0.2 - bring in clip processing from external table
- *  1.0.3 - base explicitly upon sra #1.0.2, clip #1.0.1
- *  1.0.4 - base explicitly upon sra #1.0.3, clip #1.0.2
- */
-table NCBI:SRA:_454_:common #1.0.4 = INSDC:SRA:tbl:sra #1.0.3, NCBI:SRA:tbl:clip #1.0.2
-{
-    /* PLATFORM
-     *  platform name is always 454
-     */
-    ascii platform_name
-        = < ascii > echo < "454" > ();
-
-    /* 454 TECHNICAL SEQUENCES
-     */
-    column INSDC:dna:text FLOW_CHARS = out_flow_chars;
-    INSDC:dna:text in_flow_chars
-        = < INSDC:dna:text, INSDC:dna:text > map < 'acgtn.', 'ACGTNN' > ( FLOW_CHARS );
-    column INSDC:dna:text KEY_SEQUENCE = out_key_sequence;
-    INSDC:dna:text in_key_sequence
-        = < INSDC:dna:text, INSDC:dna:text > map < 'acgtn.', 'ACGTNN' > ( KEY_SEQUENCE );
-    column INSDC:dna:text LINKER_SEQUENCE = out_linker_sequence;
-    INSDC:dna:text in_linker_sequence
-        = < INSDC:dna:text, INSDC:dna:text > map < 'acgtn.', 'ACGTNN' > ( LINKER_SEQUENCE );
-
-    // binary technical sequences
-    INSDC:x2na:bin out_flow_bin
-        = < INSDC:dna:text, INSDC:x2na:bin > map < INSDC:x2na:map:CHARSET, INSDC:x2na:map:BINSET > ( out_flow_chars );
-    INSDC:x2na:bin out_key_bin
-        = < INSDC:dna:text, INSDC:x2na:bin > map < INSDC:x2na:map:CHARSET, INSDC:x2na:map:BINSET > ( out_key_sequence );
-    INSDC:x2na:bin out_linker_bin
-        = < INSDC:dna:text, INSDC:x2na:bin > map < INSDC:x2na:map:CHARSET, INSDC:x2na:map:BINSET > ( out_linker_sequence );
-
-    /* SIGNAL
-     *  single channel integer
-     */
-    column NCBI:isamp1 SIGNAL = out_signal;
-    NCBI:isamp1 out_signal = .SIGNAL;
-
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  cs_native
-	 *  out_cs_key
-	 *  in_dna_text
-	 *  out_2cs_bin
-	 *  out_2na_bin
-	 *  out_4na_bin
-	 *  out_dna_text
-	 *  out_x2cs_bin
-	 *  out_x2na_bin
-	 *  out_2cs_packed
-	 *  out_2na_packed
-	 *  out_4na_packed
-	 *  out_color_text
-	 *  out_qual_phred
-	 *  out_color_matrix
-	 */
-
-	/* INSDC:SRA:tbl:spotname inherited productions
-	 *  out_x_coord
-	 *  out_y_coord
-	 *  out_name_fmt
-	 *  out_spot_name
-	 *  spot_ids_found
-	 */
-
-	/* INSDC:SRA:tbl:spotdesc inherited productions
-	 *  trim_len
-	 *  out_label
-	 *  out_nreads
-	 *  trim_start
-	 *  out_read_len
-	 *  out_label_len
-	 *  out_rd_filter
-	 *  out_read_type
-	 *  out_read_start
-	 *  out_label_start
-	 *  static_fixed_spot_len
-	 */
-
-	/* INSDC:SRA:tbl:stats inherited productions
-	 *  base_count
-	 *  spot_count
-	 *  max_spot_id
-	 *  min_spot_id
-	 *  in_stats_bin
-	 *  bio_base_count
-	 */
-
-	/* NCBI:tbl:n_encoding inherited productions
-	 *  read_unpack
-	 */
-
-	/* NCBI:SRA:_454_:common productions
-	 *  .SIGNAL
-	 *  .CLIP_ADAPTER_LEFT
-	 *  .CLIP_QUALITY_LEFT
-	 *  .CLIP_ADAPTER_RIGHT
-	 *  .CLIP_QUALITY_RIGHT
-	 *  out_flow_chars
-	 *  out_key_sequence
-	 *  out_linker_sequence
-	 */
-};
-
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:_454_:tbl:v2
- *  Roche 454 SRA Platform
- *
- * history:
- *  1.0.1 - explictly base upon sra #1.0.1 and related changes
- *  1.0.2 - respond to change to 454:common base table #1.0.2
- */
-
-// encodings are declared to have their own version
-// so that they may be changed over time independently
-physical INSDC:coord:one NCBI:SRA:_454_:encoding:CLIP #2
-{
-    decode { return ( INSDC:coord:one ) iunzip ( @ ); }
-    encode { return izip ( @ ); }
-}
-
-physical NCBI:isamp1 NCBI:SRA:_454_:encoding:SIGNAL #2
-{
-    decode { return ( NCBI:isamp1 ) iunzip ( @ ); }
-    encode { return izip ( @ ); }
-}
-
-physical INSDC:position:one NCBI:SRA:_454_:encoding:POSITION #2
-{
-    decode
-    {
-        I32 pos_1st_deriv = iunzip ( @ );
-        return ( INSDC:position:one ) < I32 > integral ( pos_1st_deriv );
-    }
-    encode
-    { 
-        I32 pos_1st_deriv = < I32 > deriv ( @ );
-        return izip ( pos_1st_deriv ); 
-    }
-}
-
-/* normalized v2 table
- *
- * history:
- *  1.0.6 - base upon updated ancestry
- *  1.0.7 - base upon updated ancestry
- */
-table NCBI:SRA:_454_:tbl:v2 #1.0.7
-    = NCBI:SRA:tbl:sra_nopos #2.1.3
-    , NCBI:tbl:base_space #2.0.3
-    , NCBI:tbl:phred_quality #2.0.3
-    , NCBI:SRA:_454_:common #1.0.4
-{
-    /* NAME tokenizing and coordinates
-     *  most work happens in skeyname table
-     *  we still obtain REGION from name
-     */
-    readonly column INSDC:coord:val REGION = ( INSDC:coord:val )
-        NCBI:SRA:extract_name_coord < NCBI:SRA:name_token:T > ( _out_name, out_spot_name_tok );
-    NCBI:SRA:spot_name_token out_spot_name_tok
-        = NCBI:SRA:_454_:tokenize_spot_name ( _out_name );
-
-    NCBI:SRA:spot_name_token in_spot_name_tok
-        = NCBI:SRA:_454_:tokenize_spot_name ( NAME );
-
-    // special sequences
-    INSDC:dna:text out_flow_chars
-        = .FLOW_CHARS
-        | < INSDC:dna:text > echo < 'TACG' > ( .SIGNAL )
-        | < INSDC:dna:text > echo < 'TACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACG' > ();
-
-    physical column < INSDC:dna:text > zip_encoding
-        .FLOW_CHARS = in_flow_chars;
-
-    INSDC:dna:text out_key_sequence
-        = .KEY_SEQUENCE
-        | < INSDC:dna:text > echo < 'TCAG' > ();
-
-    physical column < INSDC:dna:text > zip_encoding
-        .KEY_SEQUENCE = in_key_sequence;
-
-    INSDC:dna:text out_linker_sequence = .LINKER_SEQUENCE;
-    physical column < INSDC:dna:text > zip_encoding
-        .LINKER_SEQUENCE = in_linker_sequence;
-
-// linker needs to be representable by its own table
-// either in metadata or somewhere else
-
-    // position stored as normal 1-based coordinate
-    INSDC:position:one out_position = .POSITION;
-    physical column NCBI:SRA:_454_:encoding:POSITION #2
-        .POSITION = POSITION;
-
-    // clips
-    physical column NCBI:SRA:_454_:encoding:CLIP #2
-        .CLIP_ADAPTER_LEFT = CLIP_ADAPTER_LEFT;
-    physical column NCBI:SRA:_454_:encoding:CLIP #2
-        .CLIP_ADAPTER_RIGHT = CLIP_ADAPTER_RIGHT;
-    physical column NCBI:SRA:_454_:encoding:CLIP #2
-        .CLIP_QUALITY_LEFT = CLIP_QUALITY_LEFT;
-    physical column NCBI:SRA:_454_:encoding:CLIP #2
-        .CLIP_QUALITY_RIGHT = CLIP_QUALITY_RIGHT;
-
-    // signal
-    physical column NCBI:SRA:_454_:encoding:SIGNAL #2
-        .SIGNAL = SIGNAL;
-};
diff --git a/interfaces/sra/abi.h b/interfaces/sra/abi.h
deleted file mode 100644
index 5fdc108..0000000
--- a/interfaces/sra/abi.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_sra_abi_
-#define _h_sra_abi_
-
-#ifndef _h_sra_rd_extern_
-#include <sra/rd-extern.h>
-#endif
-
-#ifndef _h_sra_sradb_
-#include <sra/sradb.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * AbsolidReader
- */
-typedef struct AbsolidReader AbsolidReader;
-
-/* Make
- *  create AbsolidReader reference based
- *  on opened table and properties:
- *     table      - SRATable
- *     accession  - accession
- *     minReadLen - minimal length of the outputed read, 0 - no minimum (FUSE)
- *     origFormat - excludes SRR accession & length on defline
- *     noclip     - don't clip quality left and right
- *     minSpotId  - starting spot id, 0 - ignored (run information used)
- *     maxSpotId  - ending spot id, 0 - ignored (run information used)
- *                  you cannot seek out of range of [minSpotId:maxSpotId]
- */
-SRA_RD_EXTERN rc_t CC AbsolidReaderMake(const AbsolidReader** self, const SRATable* table,
-                                        const char* accession, bool origFormat,
-                                        bool noClip, uint32_t minReadLen,
-                                        spotid_t minSpotId, spotid_t maxSpotId, bool signal);
-
-/* Whack
- *  releases object obtained from AbsolidReaderMake
- */
-SRA_RD_EXTERN rc_t CC AbsolidReaderWhack(const AbsolidReader* self);
-
-/* FirstSpot
- *  set current spot to first in the run
- */
-SRA_RD_EXTERN rc_t CC AbsolidReaderFirstSpot(const AbsolidReader* self);
-
-/* SeekSpot
- *  set current spot
- * if error occured current spot position becomes 0
- */
-SRA_RD_EXTERN rc_t CC AbsolidReaderSeekSpot(const AbsolidReader* self, spotid_t spot);
-
-/* NextSpot
- *  Seek to next spot from current
- */
-SRA_RD_EXTERN rc_t CC AbsolidReaderNextSpot(const AbsolidReader* self);
-
-/* CurrentSpot
- *  Get current spot
- *  sopt [OUT] - pointer to assign value of the current spot
- * returns GetRCState(rc) == rcExhausted when out of spots
- */
-SRA_RD_EXTERN rc_t CC AbsolidReaderCurrentSpot(const AbsolidReader* self, spotid_t* spot);
-
-/* SpotInfo
- *  Get current spot information
- *  spotname [OUT] - pointer to assign value of the current spot name (can be NULL)
- *  spotname_sz [OUT] - pointer to assign value of the length of the spot name (can be NULL)
- *  spot_len [OUT] - pointer to assign value of the current spot length (can be NULL)
- *  num_reads[OUT] - pointer to assign value of the number of reads in current spot (can be NULL)
- */
-SRA_RD_EXTERN rc_t CC AbsolidReader_SpotInfo(const AbsolidReader* self,
-                                             const char** spotname, size_t* spotname_sz,
-                                             uint32_t* spot_len, uint32_t* num_reads);
-/* SpotReadInfo
- *  Get read information for current spot
- *  readid    [IN]  - 1-based read id
- *  read_type [OUT] - pointer to assign value of the read type (can be NULL)
- *  read_label[OUT] - pointer to assign value of the read label (can be NULL)
- *  read_label_sz [OUT] - pointer to assign value of the length of the read label (can be NULL)
- *  read_start[OUT] - pointer to assign value of the read start in spot (can be NULL)
- *  read_len  [OUT] - pointer to assign value of the read length (can be NULL)
- *  cskey     [OUT] - pointer to assign value of the read color space key (can be NULL)
- *  if start and len is == 0 read is empty
- */
-SRA_RD_EXTERN rc_t CC AbsolidReader_SpotReadInfo(const AbsolidReader* self, uint32_t readId, SRAReadTypes* read_type, 
-                                                 const char** read_label, INSDC_coord_len* read_label_sz,
-                                                 INSDC_coord_zero* read_start, INSDC_coord_len* read_len);
-
-/* SpotPrefix
- *  retrieve current spot name prefix
- *  prefix [OUT] - pointer to assign value of the spot name prefix
- *  prefix_sz [OUT] - pointer to assign value of the length of the spot name prefix
- */
-SRA_RD_EXTERN rc_t CC AbsolidReaderSpotName(const AbsolidReader* self,
-                                            const char** prefix, size_t* prefix_sz,
-                                            const char** suffix, size_t* suffix_sz);
-
-/* BaseName
- *  retrieve name string for the spot, result always has '\0' at the and (asciiz string)
- *  readid [IN] - 1-based, if <= 0 than the whole spot, otherwise particular read
- *  label  [IN] - overrides read label appending (printLabel), set to NULL by default
- *  data   [IN] - pointer to buffer for printing
- *  dsize  [IN] - data buffer size
- *  written [IN,OUT] - optional number of bytes occupied by string
- *                     (not including the trailing '\0' used to end output), may by more than dsize
- */
-SRA_RD_EXTERN rc_t CC AbsolidReaderHeader(const AbsolidReader* self, uint32_t readId,
-                                          char* data, size_t dsize, size_t* written);
-
-/* Base
- *  retrieve bases for the spot
- *  other parameters see description for AbsolidReaderBaseName above
- */
-SRA_RD_EXTERN rc_t CC AbsolidReaderBase(const AbsolidReader* self, uint32_t readId,
-                                        char* data, size_t dsize, size_t* written);
-
-/* Quality
- *  retrieve quality string for the spot
- *  other parameters see description for AbsolidReaderBaseName above
- */
-SRA_RD_EXTERN rc_t CC AbsolidReaderQuality(const AbsolidReader* self, uint32_t readId,
-                                           char* data, size_t dsize, size_t* written);
-
-/* Signals
- *  retrieve signal string for the spot
- *  other parameters see description for AbsolidReaderBaseName above
- */
-SRA_RD_EXTERN rc_t CC AbsolidReaderSignalFTC(const AbsolidReader* self, uint32_t readId,
-                                             char* data, size_t dsize, size_t* written);
-SRA_RD_EXTERN rc_t CC AbsolidReaderSignalCY3(const AbsolidReader* self, uint32_t readId,
-                                             char* data, size_t dsize, size_t* written);
-SRA_RD_EXTERN rc_t CC AbsolidReaderSignalTXR(const AbsolidReader* self, uint32_t readId,
-                                             char* data, size_t dsize, size_t* written);
-SRA_RD_EXTERN rc_t CC AbsolidReaderSignalCY5(const AbsolidReader* self, uint32_t readId,
-                                             char* data, size_t dsize, size_t* written);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_abi_ */
diff --git a/interfaces/sra/abi.vschema b/interfaces/sra/abi.vschema
deleted file mode 100644
index b4588d9..0000000
--- a/interfaces/sra/abi.vschema
+++ /dev/null
@@ -1,241 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * NCBI ABI Sequence Read Archive schema
- */
-version 1;
-
-include 'ncbi/sra.vschema';
-include 'ncbi/spotname.vschema';
-
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:ABI
- *  ABI SRA Platform
- */
-
-/* tokenize_spot_name
- *  scans name on input
- *  tokenizes into parts
- */
-extern function NCBI:SRA:spot_name_token
-    NCBI:SRA:ABI:tokenize_spot_name #1 ( ascii name );
-
-
-/* NCBI:SRA:ABI:common
- *  basic table interface based upon ABI's pipelines
- *
- * history:
- *  1.0.1 - base explicitly upon changes to sra #1.0.1
- *  1.0.2 - base explicitly upon sra #1.0.2
- *  1.0.3 - base explicitly upon sra #1.0.3
- */
-table NCBI:SRA:ABI:common #1.0.3 = INSDC:SRA:tbl:sra #1.0.3
-{
-    // platform name is always 'ABSOLID'
-    ascii platform_name
-        = < ascii > echo < "ABSOLID" > ();
-
-    /* TRIMMED SEQUENCE
-     *  need to find the 0-based trim_start and trim_len
-     */
-    INSDC:coord:zero bio_start = NCBI:SRA:bio_start ( out_read_start, out_read_type );
-    INSDC:coord:zero trim_start = bio_start;
-    U32 trim_left = ( U32 ) trim_start;
-    INSDC:coord:len trim_len = ( INSDC:coord:len ) < U32 > diff ( spot_len, trim_left );
-
-    /* COORDINATES
-     *  in addition to X and Y,
-     *  ABI has PANEL
-     */
-    column INSDC:coord:val PANEL = out_panel_coord;
-
-    // signal
-    column NCBI:fsamp4 SIGNAL
-        = out_signal;
-
-    NCBI:fsamp4 out_signal = ( NCBI:fsamp4 )
-        < NCBI:SRA:swapped_fsamp4 > NCBI:SRA:swap ( out_signal_swapped, out_x2cs_bin );
-
-
-	/* INSDC:tbl:sequence inherited productions
-	 *  cs_native
-	 *  in_cs_key
-	 *  out_cs_key
-	 *  out_signal_swapped
-	 *  out_2cs_bin
-	 *  out_2na_bin
-	 *  out_4na_bin
-	 *  out_dna_text
-	 *  out_x2cs_bin
-	 *  out_x2na_bin
-	 *  in_color_text
-	 *  out_2cs_packed
-	 *  out_2na_packed
-	 *  out_4na_packed
-	 *  out_color_text
-	 *  out_qual_phred
-	 *  out_color_matrix
-	 */
-
-	/* INSDC:SRA:tbl:spotname inherited productions
-	 *  out_x_coord
-	 *  out_y_coord
-	 *  out_name_fmt
-	 *  out_spot_name
-	 *  spot_ids_found
-	 */
-
-	/* INSDC:SRA:tbl:spotdesc inherited productions
-	 *  out_label
-	 *  out_nreads
-	 *  out_read_len
-	 *  out_label_len
-	 *  out_rd_filter
-	 *  out_read_type
-	 *  out_read_start
-	 *  out_label_start
-	 *  static_fixed_spot_len
-	 */
-
-	/* INSDC:SRA:tbl:stats inherited productions
-	 *  base_count
-	 *  spot_count
-	 *  max_spot_id
-	 *  min_spot_id
-	 *  in_stats_bin
-	 *  bio_base_count
-	 */
-
-	/* INSDC:SRA:tbl:sra inherited productions
-	 *  out_platform
-	 */
-
-	/* NCBI:SRA:ABI:common productions
-	 *  out_panel_coord
-	 */
-};
-
-
-/* NCBI:SRA:ABI:tbl:v2 #1
- *  normalized v2 table
- *
- * history:
- *  1.0.1 - changes to sra #1.0.1
- *  1.0.2 - changes to common #1.0.2
- *  1.0.3 - sra #2.1.2, color_space #2.0.2, common #1.0.3
- *  1.0.4 - updated ancestry
- */
-physical NCBI:SRA:swapped_fsamp4 NCBI:SRA:ABI:encoding:SIGNAL #2
-{
-    decode { return NCBI:SRA:fsamp4:decode #2 ( @ ); }
-    encode { return NCBI:SRA:fsamp4:encode #2 < 14, 10 > ( @ ); }
-}
-
-table NCBI:SRA:ABI:tbl:v2 #1.0.4
-    = NCBI:SRA:tbl:sra #2.1.3
-    , NCBI:tbl:color_space #2.1.0
-    , NCBI:tbl:phred_quality #2.0.4
-    , NCBI:SRA:ABI:common #1.0.3
-{
-    /* NAME tokenizing and coordinates
-     *  most work happens in skeyname table
-     *  we still obtain PANEL from name
-     */
-    INSDC:coord:val out_panel_coord = ( INSDC:coord:val )
-        NCBI:SRA:extract_name_coord < NCBI:SRA:name_token:T > ( _out_name, out_spot_name_tok );
-    NCBI:SRA:spot_name_token out_spot_name_tok
-        = NCBI:SRA:ABI:tokenize_spot_name ( _out_name );
-
-    NCBI:SRA:spot_name_token in_spot_name_tok
-        = NCBI:SRA:ABI:tokenize_spot_name ( NAME );
-
-
-    /* SIGNAL
-     *  optional, no longer archived
-     */
-
-    // support for individual color inputs
-    extern column NCBI:fsamp1 FTC
-    {
-        read = out_ftc;
-        validate = < F32 > no_compare #1 ( in_ftc, out_ftc );
-    }
-    NCBI:fsamp1 in_ftc = FTC;
-    NCBI:fsamp1 out_ftc
-        = ( NCBI:fsamp1 ) < F32 > cut < 0 > ( out_signal );
-
-    extern column NCBI:fsamp1 FAM
-    {
-        read = out_fam;
-        validate = < F32 > no_compare #1 ( in_fam, out_fam );
-    }
-    NCBI:fsamp1 in_fam = FAM;
-    NCBI:fsamp1 out_fam
-        = ( NCBI:fsamp1 ) < F32 > cut < 0 > ( out_signal );
-
-    extern column NCBI:fsamp1 CY3
-    {
-        read = out_cy3;
-        validate = < F32 > no_compare #1 ( in_cy3, out_cy3 );
-    }
-    NCBI:fsamp1 in_cy3 = CY3;
-    NCBI:fsamp1 out_cy3
-        = ( NCBI:fsamp1 ) < F32 > cut < 1 > ( out_signal );
-
-    extern column NCBI:fsamp1 TXR
-    {
-        read = out_txr;
-        validate = < F32 > no_compare #1 ( in_txr, out_txr );
-    }
-    NCBI:fsamp1 in_txr = TXR;
-    NCBI:fsamp1 out_txr
-        = ( NCBI:fsamp1 ) < F32 > cut < 2 > ( out_signal );
-
-    extern column NCBI:fsamp1 CY5
-    {
-        read = out_cy5;
-        validate = < F32 > no_compare #1 ( in_cy5, out_cy5 );
-    }
-    NCBI:fsamp1 in_cy5 = CY5;
-    NCBI:fsamp1 out_cy5
-        = ( NCBI:fsamp1 ) < F32 > cut < 3 > ( out_signal );
-
-    // intermediate input (writing) production
-    NCBI:fsamp4 in_signal
-        = SIGNAL
-        | ( NCBI:fsamp4 ) < F32 > paste ( in_ftc, in_cy3, in_txr, in_cy5 )
-        | ( NCBI:fsamp4 ) < F32 > paste ( in_fam, in_cy3, in_txr, in_cy5 );
-
-    // overridden output production
-    NCBI:SRA:swapped_fsamp4 out_signal_swapped = .SIGNAL;
-
-    // rule for writing SIGNAL
-    physical column NCBI:SRA:ABI:encoding:SIGNAL #2 .SIGNAL
-        = ( NCBI:SRA:swapped_fsamp4 ) < NCBI:fsamp4 > NCBI:SRA:swap ( in_signal, in_x2cs_bin )
-        | ( NCBI:SRA:swapped_fsamp4 ) < NCBI:fsamp4 > NCBI:SRA:swap ( in_signal, in_2cs_bin );
-};
diff --git a/interfaces/sra/extern.h b/interfaces/sra/extern.h
deleted file mode 100644
index aa32b37..0000000
--- a/interfaces/sra/extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_extern_
-#define _h_sra_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define SRA_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define SRA_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_sra_extern_ */
diff --git a/interfaces/sra/fastq.h b/interfaces/sra/fastq.h
deleted file mode 100644
index b53c3b3..0000000
--- a/interfaces/sra/fastq.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_sra_fastq_
-#define _h_sra_fastq_
-
-#ifndef _h_sra_rd_extern_
-#include <sra/rd-extern.h>
-#endif
-
-#ifndef _h_sra_sradb_
-#include <sra/sradb.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * FastqReader
- */
-typedef struct FastqReader FastqReader;
-
-/* Make
- *  create FastqReader reference based
- *  on opened table and properties:
- *     table      - SRATable
- *     accession  - accession
- *     minReadLen - minimal length of the outputed read, 0 - no minimum (FUSE)
- *     colorSpace - color space sequence
- *     origFormat - excludes SRR accession & length on defline
- *     fasta      - prepare only reads, no qualities
- *     readLabel  - prints read label on the name line
- *     readId     - prints .read in spot id on the name line (not in origFormat)
- *     noclip     - don't clip quality left and right
- *     offset     - offset to use for quality conversion (default is 33)
- *     csKey      - desired color space key, '\0' - do not convert
- *     minSpotId  - starting spot id, 0 - ignored (run information used)
- *     maxSpotId  - ending spot id, 0 - ignored (run information used)
- *                  you cannot seek out of range of [minSpotId:maxSpotId]
- */
-SRA_RD_EXTERN rc_t CC FastqReaderMake(const FastqReader** self, const SRATable* table, const char* accession,
-                                      bool colorSpace, bool origFormat, bool fasta,
-                                      bool printLabel, bool printReadId,
-                                      bool noClip, bool SuppressQualForCSKey, uint32_t minReadLen,
-                                      char offset, char csKey,
-                                      spotid_t minSpotId, spotid_t maxSpotId);
-
-/* Whack
- *  releases object obtained from FastqReaderMake
- */
-SRA_RD_EXTERN rc_t CC FastqReaderWhack(const FastqReader* self);
-
-/* FirstSpot
- *  set current spot to first in the run
- */
-SRA_RD_EXTERN rc_t CC FastqReaderFirstSpot(const FastqReader* self);
-
-/* SeekSpot
- *  set current spot
- * if error occured current spot position becomes 0
- */
-SRA_RD_EXTERN rc_t CC FastqReaderSeekSpot(const FastqReader* self, spotid_t spot);
-
-/* NextSpot
- *  Seek to next spot from current
- */
-SRA_RD_EXTERN rc_t CC FastqReaderNextSpot(const FastqReader* self);
-
-/* CurrentSpot
- *  Get current spot
- *  sopt [OUT] - pointer to assign value of the current spot
- * returns GetRCState(rc) == rcExhausted when out of spots
- */
-SRA_RD_EXTERN rc_t CC FastqReaderCurrentSpot(const FastqReader* self, spotid_t* spot);
-
-/* SpotInfo
- *  Get current spot information
- *  spotname [OUT] - pointer to assign value of the current spot name (can be NULL)
- *  spotname_sz [OUT] - pointer to assign value of the length of the spot name (can be NULL)
- *  spotgroup [OUT] - pointer to assign value of the current spot group (can be NULL)
- *  spotgroup_sz [OUT] - pointer to assign value of the length of the spot group (can be NULL)
- *  spot_len [OUT] - pointer to assign value of the current spot length (can be NULL)
- *  num_reads[OUT] - pointer to assign value of the number of reads in current spot (can be NULL)
- */
-SRA_RD_EXTERN rc_t CC FastqReader_SpotInfo(const FastqReader* self,
-                                           const char** spotname, size_t* spotname_sz,
-                                           const char** spotgroup, size_t* spotgroup_sz,
-                                           uint32_t* spot_len, uint32_t* num_reads);
-
-/* SpotReadInfo
- *  Get read information for current spot
- *  readid    [IN]  - 1-based read id
- *  read_type [OUT] - pointer to assign value of the read type (can be NULL)
- *  read_label[OUT] - pointer to assign value of the read label (can be NULL)
- *  read_label_sz [OUT] - pointer to assign value of the length of the read label (can be NULL)
- *  read_start[OUT] - pointer to assign value of the read start in spot (can be NULL)
- *  read_len  [OUT] - pointer to assign value of the read length (can be NULL)
- *  cskey     [OUT] - pointer to assign value of the read color space key (can be NULL)
- *  if start and len is == 0 read is empty
- */
-SRA_RD_EXTERN rc_t CC FastqReader_SpotReadInfo(const FastqReader* self, uint32_t readId, SRAReadTypes* read_type, 
-                                               const char** read_label, INSDC_coord_len* read_label_sz,
-                                               INSDC_coord_zero* read_start, INSDC_coord_len* read_len);
-
-/* BaseName
- *  retrieve name string for the spot, result always has '\0' at the and (asciiz string)
- *  readid [IN] - 1-based, if <= 0 than the whole spot, otherwise particular read
- *  label  [IN] - overrides read label appending (printLabel), set to NULL by default
- *  data   [IN] - pointer to buffer for printing
- *  dsize  [IN] - data buffer size
- *  written [IN,OUT] - optional number of bytes occupied by string
- *                     (not including the trailing '\0' used to end output), may by more than dsize
- */
-SRA_RD_EXTERN rc_t CC FastqReaderBaseName(const FastqReader* self, uint32_t readId,
-                                          bool* label, char* data, size_t dsize, size_t* written);
-
-/* Base
- *  retrieve bases for the spot
- *  other parameters see description for FastqReaderBaseName above
- */
-SRA_RD_EXTERN rc_t CC FastqReaderBase(const FastqReader* self, uint32_t readId,
-                                      char* data, size_t dsize, size_t* written);
-
-/* QualityName
- *  retrieve quality name string for the spot
- *  other parameters see description for FastqReaderBaseName above
- */
-SRA_RD_EXTERN rc_t CC FastqReaderQualityName(const FastqReader* self, uint32_t readId,
-                                             bool* label, char* data, size_t dsize, size_t* written);
-
-/* Quality
- *  retrieve quality string for the spot
- *  other parameters see description for FastqReaderBaseName above
- */
-SRA_RD_EXTERN rc_t CC FastqReaderQuality(const FastqReader* self, uint32_t readId,
-                                         char* data, size_t dsize, size_t* written);
-
-/* GetCurrentSpotData
- *  retrieve current spot data as a blob
- *  other parameters see description for FastqReaderBaseName above
- */
-SRA_RD_EXTERN rc_t CC FastqReader_GetCurrentSpotData(const FastqReader* self,
-                                                     char* data, size_t dsize, size_t* written);
-
-/* GetCurrentSpotSplitData
- * same as above but split spot into line with individual reads
- */
-SRA_RD_EXTERN rc_t CC FastqReader_GetCurrentSpotSplitData(const FastqReader* self,
-                                                          char* data, size_t dsize, size_t* written);
-
-/* GetNextSpotData (streaming function)
- *  move to the next spot and retrieve current spot data as a blob
- *  other parameters see description for FastqReaderBaseName above
- */
-SRA_RD_EXTERN rc_t CC FastqReader_GetNextSpotData(const FastqReader* self,
-                                                  char* data, size_t dsize, size_t* written);
-
-/* GetNextSpotSplitData (streaming function)
- * same as above but split spot into line with individual reads
- */
-SRA_RD_EXTERN rc_t CC FastqReader_GetNextSpotSplitData(const FastqReader* self,
-                                                       char* data, size_t dsize, size_t* written);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_fastq_ */
diff --git a/interfaces/sra/generic-fastq.vschema b/interfaces/sra/generic-fastq.vschema
deleted file mode 100644
index 2c29d13..0000000
--- a/interfaces/sra/generic-fastq.vschema
+++ /dev/null
@@ -1,265 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-/*==========================================================================
- * NCBI Generic Fastq Sequence Read Archive schema
- */
-version 1;
-
-include 'insdc/sra.vschema';
-include 'ncbi/sra.vschema';
-include 'ncbi/clip.vschema';
-include 'ncbi/spotname.vschema';
-
-/* tokenize_spot_name - currently ascii only capability */
-
-extern function NCBI:SRA:spot_name_token
-    NCBI:SRA:GenericFastq:tokenize_spot_name #1 ( ascii name );
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:GenericFastq:sequence
- *  Generic Fastq SRA Platform
- */
-table NCBI:SRA:GenericFastq:sequence #1
-    = NCBI:SRA:tbl:sra #2.1.3
-    , NCBI:tbl:base_space #2.0.3
-    , NCBI:tbl:phred_quality #2.0.4
-    , NCBI:SRA:tbl:clip #1.0.2
-{
-    ascii platform_name
-        = < ascii > echo < "UNDEFINED" > ();
-
-    INSDC:SRA:platform_id out_platform
-        = < INSDC:SRA:platform_id > echo < SRA_PLATFORM_UNDEFINED > ();
-
-	/* ascii only spot name tokenizer */
-
-    NCBI:SRA:spot_name_token out_spot_name_tok
-        = NCBI:SRA:GenericFastq:tokenize_spot_name ( _out_name );
-
-    NCBI:SRA:spot_name_token in_spot_name_tok
-        = NCBI:SRA:GenericFastq:tokenize_spot_name ( NAME );
-
-    /* clips */
-
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_ADAPTER_LEFT = CLIP_ADAPTER_LEFT;
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_ADAPTER_RIGHT = CLIP_ADAPTER_RIGHT;
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_QUALITY_LEFT = CLIP_QUALITY_LEFT;
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_QUALITY_RIGHT = CLIP_QUALITY_RIGHT;
-}
-
-database NCBI:SRA:GenericFastq:db #1
-{
-    table NCBI:SRA:GenericFastq:sequence #1.0 SEQUENCE;
-};
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:GenericFastq:sequence_no_name
- *  Generic Fastq SRA Platform (without name)
- */
-table NCBI:SRA:GenericFastq:sequence_no_name #1
-    = NCBI:SRA:tbl:sra #2.1.3
-    , NCBI:tbl:base_space #2.0.3
-    , NCBI:tbl:phred_quality #2.0.4
-    , NCBI:SRA:tbl:clip #1.0.2
-{
-    ascii platform_name
-        = < ascii > echo < "UNDEFINED" > ();
-
-    INSDC:SRA:platform_id out_platform
-        = < INSDC:SRA:platform_id > echo < SRA_PLATFORM_UNDEFINED > ();
-
-    /* clips */
-
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_ADAPTER_LEFT = CLIP_ADAPTER_LEFT;
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_ADAPTER_RIGHT = CLIP_ADAPTER_RIGHT;
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_QUALITY_LEFT = CLIP_QUALITY_LEFT;
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_QUALITY_RIGHT = CLIP_QUALITY_RIGHT;
-}
-
-database NCBI:SRA:GenericFastqNoNames:db #1
-{
-    table NCBI:SRA:GenericFastq:sequence_no_name #1.0 SEQUENCE;
-};
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:GenericFastq:sequence_log_odds
- *  Generic Fastq SRA Platform (for log_odds)
- */
-table NCBI:SRA:GenericFastq:sequence_log_odds #1
-    = NCBI:SRA:tbl:sra #2.1.3
-    , NCBI:tbl:base_space #2.0.3
-    , NCBI:tbl:log_odds_quality #2.1.0
-    , NCBI:SRA:tbl:clip #1.0.2
-{
-    ascii platform_name
-        = < ascii > echo < "UNDEFINED" > ();
-
-    INSDC:SRA:platform_id out_platform
-        = < INSDC:SRA:platform_id > echo < SRA_PLATFORM_UNDEFINED > ();
-
-	/* ascii only spot name tokenizer */
-
-    NCBI:SRA:spot_name_token out_spot_name_tok
-        = NCBI:SRA:GenericFastq:tokenize_spot_name ( _out_name );
-
-    NCBI:SRA:spot_name_token in_spot_name_tok
-        = NCBI:SRA:GenericFastq:tokenize_spot_name ( NAME );
-
-    /* clips */
-
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_ADAPTER_LEFT = CLIP_ADAPTER_LEFT;
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_ADAPTER_RIGHT = CLIP_ADAPTER_RIGHT;
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_QUALITY_LEFT = CLIP_QUALITY_LEFT;
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_QUALITY_RIGHT = CLIP_QUALITY_RIGHT;
-}
-
-database NCBI:SRA:GenericFastqLogOdds:db #1
-{
-    table NCBI:SRA:GenericFastq:sequence_log_odds #1.0 SEQUENCE;
-};
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:GenericFastq:sequence_nanopore
- *  Oxford Nanopore SRA Platform
- */
-table NCBI:SRA:GenericFastq:sequence_nanopore #1
-    = NCBI:SRA:tbl:sra #2.1.3
-    , NCBI:tbl:base_space #2.0.3
-    , NCBI:tbl:phred_quality #2.0.4
-{
-    ascii platform_name
-        = < ascii > echo < "OXFORD_NANOPORE" > ();
-        
-    INSDC:SRA:platform_id out_platform
-        = < INSDC:SRA:platform_id > echo < SRA_PLATFORM_OXFORD_NANOPORE > ();
-
-	/* ascii only spot name tokenizer */
-
-    NCBI:SRA:spot_name_token out_spot_name_tok
-        = NCBI:SRA:GenericFastq:tokenize_spot_name ( _out_name );
-
-    NCBI:SRA:spot_name_token in_spot_name_tok
-        = NCBI:SRA:GenericFastq:tokenize_spot_name ( NAME );
-
-	/* channel and read number columns */
-
-    extern column < U32 > izip_encoding #1 CHANNEL;
-    extern column < U32 > izip_encoding #1 READ_NUMBER;
-}
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:GenericFastq:consensus_nanopore
- *  Oxford Nanopore SRA Platform
- */
-table NCBI:SRA:GenericFastq:consensus_nanopore #1
-    = NCBI:SRA:tbl:sra #2.1.3
-    , NCBI:tbl:base_space #2.0.3
-    , NCBI:tbl:phred_quality #2.0.4
-{
-    ascii platform_name
-        = < ascii > echo < "OXFORD_NANOPORE" > ();
-        
-    INSDC:SRA:platform_id out_platform
-        = < INSDC:SRA:platform_id > echo < SRA_PLATFORM_OXFORD_NANOPORE > ();
-
-	/* ascii only spot name tokenizer */
-
-    NCBI:SRA:spot_name_token out_spot_name_tok
-        = NCBI:SRA:GenericFastq:tokenize_spot_name ( _out_name );
-
-    NCBI:SRA:spot_name_token in_spot_name_tok
-        = NCBI:SRA:GenericFastq:tokenize_spot_name ( NAME );
-
-	/* channel and read number columns */
-
-    extern column < U32 > izip_encoding #1 CHANNEL;
-    extern column < U32 > izip_encoding #1 READ_NUMBER;
-}
-
-database NCBI:SRA:GenericFastqNanopore:db #1
-{
-    table NCBI:SRA:GenericFastq:sequence_nanopore #1.0 SEQUENCE;
-    table NCBI:SRA:GenericFastq:consensus_nanopore #1.0 CONSENSUS;
-};
-
-database NCBI:SRA:GenericFastqNanoporeConsensusOnly:db #1
-{
-    table NCBI:SRA:GenericFastq:consensus_nanopore #1.0 CONSENSUS;
-};
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:GenericFastq:absolid
- *  Generic fastq for AB Solid platform
- */
-table NCBI:SRA:GenericFastq:absolid #1
-    = NCBI:SRA:tbl:sra #2.1.3
-    , NCBI:tbl:color_space #2.1.0
-    , NCBI:tbl:phred_quality #2.0.4
-    , NCBI:SRA:tbl:clip #1.0.2
-{
-    ascii platform_name
-        = < ascii > echo < "UNDEFINED" > ();
-
-    INSDC:SRA:platform_id out_platform
-        = < INSDC:SRA:platform_id > echo < SRA_PLATFORM_UNDEFINED > ();
-
-	/* ascii only spot name tokenizer */
-
-    NCBI:SRA:spot_name_token out_spot_name_tok
-        = NCBI:SRA:GenericFastq:tokenize_spot_name ( _out_name );
-
-    NCBI:SRA:spot_name_token in_spot_name_tok
-        = NCBI:SRA:GenericFastq:tokenize_spot_name ( NAME );
-
-    /* clips */
-
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_ADAPTER_LEFT = CLIP_ADAPTER_LEFT;
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_ADAPTER_RIGHT = CLIP_ADAPTER_RIGHT;
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_QUALITY_LEFT = CLIP_QUALITY_LEFT;
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_QUALITY_RIGHT = CLIP_QUALITY_RIGHT;
-}
-
-database NCBI:SRA:GenericFastqAbsolid:db #1
-{
-    table NCBI:SRA:GenericFastq:absolid #1.0 SEQUENCE;
-};
diff --git a/interfaces/sra/helicos.vschema b/interfaces/sra/helicos.vschema
deleted file mode 100644
index e758a0b..0000000
--- a/interfaces/sra/helicos.vschema
+++ /dev/null
@@ -1,85 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * NCBI Helicos Sequence Read Archive schema
- */
-version 1;
-
-include 'ncbi/sra.vschema';
-include 'ncbi/spotname.vschema';
-
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-/* tokenize_spot_name
- *  scans name on input
- *  tokenizes into parts
- */
-extern function NCBI:SRA:spot_name_token
-    NCBI:SRA:Helicos:tokenize_spot_name #1 ( ascii name );
-
-
-/* Helicos:tbl
- *
- * history:
- *  1.0.1 - explictly base upon ancestry
- *  1.0.2 - base explicitly upon latest ancestry
- *  1.0.3 - base explicitly upon latest ancestry
- *  1.0.4 - base explicitly upon latest ancestry
- */
-table NCBI:SRA:Helicos:tbl:v2 #1.0.4
-    = NCBI:SRA:tbl:sra #2.1.3
-    , NCBI:tbl:base_space #2.0.3
-    , NCBI:tbl:phred_quality #2.0.3
-{
-    ascii platform_name
-        = < ascii > echo < "HELICOS" > ();
-
-    /* NAME tokenizing and coordinates
-     *  most work happens in skeyname table
-     *  we still obtain REGION from name
-     */
-
-    readonly column INSDC:coord:val CHANNEL = ( INSDC:coord:val )
-        NCBI:SRA:extract_name_coord < NCBI:SRA:name_token:L > ( _out_name, out_spot_name_tok );
-    readonly column INSDC:coord:val FIELD = ( INSDC:coord:val )
-        NCBI:SRA:extract_name_coord < NCBI:SRA:name_token:T > ( _out_name, out_spot_name_tok );
-    NCBI:SRA:spot_name_token out_spot_name_tok
-        = NCBI:SRA:Helicos:tokenize_spot_name ( _out_name );
-
-    readonly column INSDC:coord:val CAMERA = out_x_coord;
-    readonly column INSDC:coord:val POS = out_y_coord;
-
-    NCBI:SRA:spot_name_token in_spot_name_tok
-        = NCBI:SRA:Helicos:tokenize_spot_name ( NAME );
-
-    INSDC:coord:zero trim_start
-        = < INSDC:coord:zero > echo < 0 > ();
-    INSDC:coord:len trim_len = spot_len;
-};
diff --git a/interfaces/sra/illumina.h b/interfaces/sra/illumina.h
deleted file mode 100644
index 73062f8..0000000
--- a/interfaces/sra/illumina.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_sra_illumina_
-#define _h_sra_illumina_
-
-#ifndef _h_sra_rd_extern_
-#include <sra/rd-extern.h>
-#endif
-
-#ifndef _h_sra_sradb_
-#include <sra/sradb.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * IlluminaReader
- */
-typedef struct IlluminaReader IlluminaReader;
-
-/* Make
- *  create IlluminaReader reference based
- *  on opened table and properties:
- *     table      - SRATable
- *     accession  - accession
- *     read       - output reads
- *     qual1      - output quality1
- *     qual4      - output quality4
- *     intensity  - output intensity
- *     noise      - output noise
- *     signal     - output signal
- *     qseq       - output QSEQ format
- *     minSpotId  - starting spot id, 0 - ignored (run information used)
- *     maxSpotId  - ending spot id, 0 - ignored (run information used)
- *                  you cannot seek out of range of [minSpotId:maxSpotId]
- */
-SRA_RD_EXTERN rc_t CC IlluminaReaderMake(const IlluminaReader** self, const SRATable* table, const char* accession,
-                                         bool read, bool qual1, bool qual4,
-                                         bool intensity, bool noise, bool signal, bool qseq,
-                                         spotid_t minSpotId, spotid_t maxSpotId);
-/* Whack
- *  releases object obtained from IlluminaReaderMake
- */
-SRA_RD_EXTERN rc_t CC IlluminaReaderWhack(const IlluminaReader* self);
-
-/* FirstSpot
- *  set current spot to first in the run
- */
-SRA_RD_EXTERN rc_t CC IlluminaReaderFirstSpot(const IlluminaReader* self);
-
-/* SeekSpot
- *  set current spot
- * if error occured current spot position becomes 0
- */
-SRA_RD_EXTERN rc_t CC IlluminaReaderSeekSpot(const IlluminaReader* self, spotid_t spot);
-
-/* NextSpot
- *  Seek to next spot from current
- */
-SRA_RD_EXTERN rc_t CC IlluminaReaderNextSpot(const IlluminaReader* self);
-
-/* CurrentSpot
- *  Get current spot
- *  sopt [OUT] - pointer to assign value of the current spot
- * returns GetRCState(rc) == rcExhausted when out of spots
- */
-SRA_RD_EXTERN rc_t CC IlluminaReaderCurrentSpot(const IlluminaReader* self, spotid_t *spot);
-
-/* SpotInfo
- *  Get current spot information
- *  spotname [OUT] - pointer to assign value of the current spot name (can be NULL)
- *  spot_len [OUT] - pointer to assign value of the current spot length (can be NULL)
- *  num_reads[OUT] - pointer to assign value of the number of reads in current spot (can be NULL)
- */
-SRA_RD_EXTERN rc_t CC IlluminaReader_SpotInfo(const IlluminaReader* self,
-                                              const char** spotname, size_t* spotname_sz,
-                                              INSDC_coord_val* lane, INSDC_coord_val* tile, 
-                                              INSDC_coord_val* x, INSDC_coord_val* y,
-                                              uint32_t* spot_len, uint32_t* num_reads);
-/* SpotReadInfo
- *  Get read information for current spot
- *  readid    [IN]  - 1-based read id
- *  read_label[OUT] - pointer to assign value of the read label (can be NULL)
- *  read_type [OUT] - pointer to assign value of the read type (can be NULL)
- *  read_start[OUT] - pointer to assign value of the read start in spot (can be NULL)
- *  read_len  [OUT] - pointer to assign value of the read length (can be NULL)
- *  cskey     [OUT] - pointer to assign value of the read color space key (can be NULL)
- *  if start and len is == 0 read is empty
- */
-SRA_RD_EXTERN rc_t CC IlluminaReader_SpotReadInfo(const IlluminaReader* self, uint32_t readId, SRAReadTypes* read_type,
-                                                  const char** read_label, INSDC_coord_len* read_label_sz,
-                                                  INSDC_coord_zero* read_start, INSDC_coord_len* read_len);
-
-/* Base
- *  retrieve bases for the spot, result always has '\0' at the and (asciiz string)
- *  data   [IN] - pointer to buffer for printing
- *  dsize  [IN] - data buffer size
- *  written [IN,OUT] - optional number of bytes occupied by string
- *                     (not including the trailing '\0' used to end output), may by more than dsize
- */
-SRA_RD_EXTERN rc_t CC IlluminaReaderBase(const IlluminaReader* self, char* data, size_t dsize, size_t* written);
-
-/* Noise
- *  retrieve noise in 4 floats per base format
- *  other parameters see description for IlluminaReaderBase above
- */
-SRA_RD_EXTERN rc_t CC IlluminaReaderNoise(const IlluminaReader* self, char* data, size_t dsize, size_t* written);
-
-/* Intensity
- *  retrieve intensity in 4 floats per base format
- *  other parameters see description for IlluminaReaderBase above
- */
-SRA_RD_EXTERN rc_t CC IlluminaReaderIntensity(const IlluminaReader* self, char* data, size_t dsize, size_t* written);
-
-/* Signal
- *  retrieve signal in 4 floats per base format
- *  other parameters see description for IlluminaReaderBase above
- */
-SRA_RD_EXTERN rc_t CC IlluminaReaderSignal(const IlluminaReader* self, char* data, size_t dsize, size_t* written);
-
-/* Quality (BINARY)
- *  retrieve quality as single bytes per bases
- *  readid [IN] - 1-based, if <= 0 than the whole spot, otherwise particular read
- *  other parameters see description for IlluminaReaderBase above
- */
-SRA_RD_EXTERN rc_t CC IlluminaReaderQuality1(const IlluminaReader* self, uint32_t readId, char* data, size_t dsize, size_t* written);
-
-/* Quality
- *  retrieve quality in 4 integers per base format
- *  other parameters see description for IlluminaReaderBase above
- */
-SRA_RD_EXTERN rc_t CC IlluminaReaderQuality4(const IlluminaReader* self, char* data, size_t dsize, size_t* written);
-
-/* QSeq
- *  spot information as in QSEQ format
- *  other parameters see description for IlluminaReaderBase above
- */
-SRA_RD_EXTERN rc_t CC IlluminaReaderQSeq(const IlluminaReader* self, uint32_t readId, bool spot_group,
-                                         char* data, size_t dsize, size_t* written);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_illumina_ */
diff --git a/interfaces/sra/illumina.vschema b/interfaces/sra/illumina.vschema
deleted file mode 100644
index 84d65aa..0000000
--- a/interfaces/sra/illumina.vschema
+++ /dev/null
@@ -1,408 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * NCBI Illumina Sequence Read Archive schema
- */
-version 1;
-
-include 'ncbi/sra.vschema';
-include 'ncbi/spotname.vschema';
-
-
-/*--------------------------------------------------------------------------
- * types
- */
-
-typedef INSDC:quality:log_odds NCBI:qual4 [ 4 ];
-typedef NCBI:qual4 NCBI:SRA:rotated_qual4, NCBI:SRA:swapped_qual4;
-
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-/* tokenize_spot_name
- *  scans name on input
- *  tokenizes into parts
- */
-extern function NCBI:SRA:spot_name_token
-    NCBI:SRA:Illumina:tokenize_spot_name #1 ( ascii name );
-
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:Illumina:qual4
- *  4-channel log-odds-ish quality
- */
-
-/* history:
- *  1.0.1 - base explicitly upon updated ancestry
- */
-table NCBI:SRA:Illumina:qual4_nocol #1.0.1
-    = INSDC:tbl:sequence #1.0.1
-    , NCBI:tbl:log_odds_quality_nocol #1.0.1
-{
-    /* QUALITY
-     *  4-channel quality column
-     */
-    readonly column NCBI:qual4 QUALITY = out_qual4;
-
-    NCBI:qual4 out_qual4
-        = < NCBI:qual4 > NCBI:SRA:swap ( out_qual4_swapped, read_unpack )
-        | < NCBI:qual4 > NCBI:SRA:rotate < false > ( out_qual4_rotated, read_unpack );
-
-
-    /* single-channel output
-     *  convert 4-channel log-odds to single channel
-     *  must retain n-encoding, which was intended to be the 4-channel pattern
-     *  ( -5, -5, -5, -5 ) and a base of 'A'
-     */
-
-    // first, extract quality for called base
-    INSDC:quality:log_odds out_qual1_ch0
-        = < INSDC:quality:log_odds> cut < 0 > ( out_qual4_swapped )
-        | < INSDC:quality:log_odds> cut < 0 > ( out_qual4_rotated );
-
-    // clip it to -5 and above
-    INSDC:quality:log_odds out_qual1_clip
-        = < INSDC:quality:log_odds > clip < -5, 127 > ( out_qual1_ch0 );
-
-    // convert 4 channel to single 32-bit value
-    U32 out_qual4_32
-        = redimension ( out_qual4_swapped )
-        | redimension ( out_qual4_rotated );
-
-    // detect ( -5, -5, -5, -5 ) and introduce a -6 value into log-odds
-    // this is treated as an 'N', but still not ready
-    INSDC:quality:log_odds out_qual1_fives
-        = < U32, INSDC:quality:log_odds > map < 0xFBFBFBFB, -6 > ( out_qual4_32, out_qual1_clip );
-
-    // now slam zeros into anything that doesn't correspond to an A
-    // essentially this leaves all of the A qualities. any having -6 are really N.
-    INSDC:quality:log_odds out_qual1_n
-        = < U8, INSDC:quality:log_odds > map < [ 1, 2, 3 ], [ 0, 0, 0 ] > ( read_unpack, out_qual1_fives );
-
-    // finally, produce log-odds with n-encoded as -6
-    INSDC:quality:log_odds out_qual_log_odds
-        = < INSDC:quality:log_odds, INSDC:quality:log_odds > map < -6, -6 > ( out_qual1_n, out_qual1_clip );
-
-
-	/* NCBI:tbl:n_encoding inherited productions
-	 *  read_unpack
-	 */
-
-	/* NCBI:SRA:Illumina:qual4_nocol productions
-	 *  out_qual4_rotated
-	 *  out_qual4_swapped
-	 */
-};
-
-
-/* 4-channel log-odds compression
- */
-
-// encoded type - a single byte code for 4-channel pattern
-typedef B8 NCBI:SRA:encoded_qual4;
-
-// decoding function
-extern function
-NCBI:SRA:swapped_qual4 NCBI:SRA:qual4_decode #1 ( NCBI:SRA:encoded_qual4 in );
-
-// encoding function
-extern function
-NCBI:SRA:encoded_qual4 NCBI:SRA:qual4_encode #1 ( NCBI:SRA:swapped_qual4 in );
-
-// compression rules
-physical NCBI:SRA:swapped_qual4 NCBI:SRA:qual4_encoding #1
-{
-    encode
-    {
-        // produce codes
-        NCBI:SRA:encoded_qual4 encoded = NCBI:SRA:qual4_encode ( @ );
-
-        // gzip
-        return zip < Z_RLE, Z_BEST_SPEED > ( encoded );
-    }
-
-    decode
-    {
-        // gunzip
-        NCBI:SRA:encoded_qual4 unzipped = unzip ( @ );
-        
-        // inflate to swapped
-        return NCBI:SRA:qual4_decode ( unzipped );
-    }
-}
-
-/* history:
- *  1.0.1 - base upon updated qual4_nocol
- */
-table NCBI:SRA:Illumina:qual4 #1.0.1 = NCBI:SRA:Illumina:qual4_nocol #1.0.1
-{
-    // read directly as swapped, n-encoded log_odds
-    NCBI:SRA:swapped_qual4 out_qual4_swapped = .QUALITY;
-
-	/* NCBI:tbl:n_encoding inherited virtual productions
-	 *  read_unpack
-	 */
-};
-
-/* history:
- *  2.0.2 - base upon updated ancestry
- *  2.0.3 - base upon updated ancestry
- *  2.0.4 - base upon updated ancestry
- *  2.1.0 - base upon updated ancestry, added in_qual_log_odds
- */
-table NCBI:SRA:Illumina:qual4 #2.1.0
-    = NCBI:tbl:base_space #2.0.3
-    , NCBI:tbl:log_odds_quality_nocol #2.1.0
-{
-    /* QUALITY
-     *  4-channel log-odds
-     */
-    extern column NCBI:qual4 QUALITY = out_qual4;
-
-    NCBI:SRA:swapped_qual4 in_qual4
-        = ( NCBI:SRA:swapped_qual4 ) < NCBI:qual4 > NCBI:SRA:swap ( QUALITY, in_x2na_bin )
-        | ( NCBI:SRA:swapped_qual4 ) < NCBI:qual4 > NCBI:SRA:swap ( QUALITY, in_2na_bin );
-
-    NCBI:qual4 out_qual4
-        = < NCBI:SRA:swapped_qual4 > NCBI:SRA:swap ( .QUALITY, out_x2na_bin );
-
-    physical column NCBI:SRA:qual4_encoding .QUALITY = in_qual4;
-
-    // feed to compressed statistics
-    NCBI:qual4 in_stats_qual = in_qual4;
-
-    // single channel
-    INSDC:quality:log_odds in_qual_log_odds
-        = < INSDC:quality:log_odds > cut < 0 > ( in_qual4 );
-    INSDC:quality:log_odds out_qual_log_odds
-        = < INSDC:quality:log_odds > cut < 0 > ( .QUALITY );
-};
-
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:Illumina
- *  Illumina SRA Platform
- */
-
-
-/* NCBI:SRA:Illumina:common #1
- *  basic table interface based upon Illumina's pipelines
- *
- * history:
- *  1.0.1 - explictly base upon sra #1.0.1
- *  1.0.2 - base explicitly upon sra #1.0.2
- *  1.0.3 - base explicitly upon sra #1.0.3
- */
-table NCBI:SRA:Illumina:common #1.0.3 = INSDC:SRA:tbl:sra #1.0.3
-{
-    // platform name is always 'ILLUMINA'
-    ascii platform_name
-        = < ascii > echo < "ILLUMINA" > ();
-
-    /* TRIMMED SEQUENCE
-     *  need to find the 0-based trim_start and trim_len
-     */
-    INSDC:coord:zero bio_start = NCBI:SRA:bio_start ( out_read_start, out_read_type );
-    INSDC:coord:zero trim_start = bio_start;
-    U32 trim_left = ( U32 ) trim_start;
-    INSDC:coord:len trim_len = (INSDC:coord:len) < U32 > diff ( spot_len, trim_left );
-
-    /* COORDINATES
-     *  in addition to X and Y,
-     *  Illumina has LANE and TILE
-     */
-    readonly column INSDC:coord:val LANE = out_lane_coord;
-    readonly column INSDC:coord:val TILE = out_tile_coord;
-};
-
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:Illumina:tbl:v2 #1
- *  normalized v2 table
- *  still has variants based upon quality type
- *
- * history:
- *  1.0.1 - explictly base upon sra #1.0.1 and related tables
- *  1.0.2 - updated ancestry
- *  1.0.3 - updated ancestry
- */
-
-physical NCBI:SRA:swapped_fsamp4 NCBI:SRA:Illumina:encoding:SIGNAL #2
-{
-    decode { return NCBI:SRA:fsamp4:decode #2 ( @ ); }
-    encode { return NCBI:SRA:fsamp4:encode #2 < 14, 10 > ( @ ); }
-}
-
-physical NCBI:fsamp4 NCBI:SRA:Illumina:encoding:NOISE #2
-{
-    decode
-    {
-        F32 dcmp = funzip ( @ );
-        return redimension ( dcmp );
-    }
-    encode
-    {
-	F32 ncmp = redimension ( @ );
-        return fzip < 10 > ( ncmp );
-    }
-}
-
-physical NCBI:SRA:swapped_fsamp4 NCBI:SRA:Illumina:encoding:INTENSITY #2
-{
-    decode { return NCBI:SRA:fsamp4:decode #2 ( @ ); }
-    encode { return NCBI:SRA:fsamp4:encode #2 < 14, 10 > ( @ ); }
-}
-
-// v2 base table
-table NCBI:SRA:Illumina:tbl:v2 #1.0.4
-    = NCBI:SRA:tbl:sra #2.1.3
-    , NCBI:tbl:base_space #2.0.3
-    , NCBI:SRA:Illumina:common #1.0.3
-{
-    /* NAME tokenizing and coordinates
-     *  most work happens in skeyname table
-     *  we still obtain LANE and TILE from name
-     */
-    INSDC:coord:val out_lane_coord = ( INSDC:coord:val )
-        NCBI:SRA:extract_name_coord < NCBI:SRA:name_token:L > ( _out_name, out_spot_name_tok );
-    INSDC:coord:val out_tile_coord = ( INSDC:coord:val )
-        NCBI:SRA:extract_name_coord < NCBI:SRA:name_token:T > ( _out_name, out_spot_name_tok );
-    NCBI:SRA:spot_name_token out_spot_name_tok
-        = NCBI:SRA:Illumina:tokenize_spot_name ( _out_name );
-
-    NCBI:SRA:spot_name_token in_spot_name_tok
-        = NCBI:SRA:Illumina:tokenize_spot_name ( NAME );
-
-    /* SIGNAL
-     *  optional, no longer archived
-     */
-    extern column NCBI:fsamp4 SIGNAL
-    {
-        read = out_signal;
-        validate = < NCBI:fsamp4 > no_compare #1 ( in_signal, out_signal );
-    }
-    NCBI:fsamp4 in_signal = SIGNAL;
-    NCBI:fsamp4 out_signal
-        = < NCBI:SRA:swapped_fsamp4 > NCBI:SRA:swap ( .SIGNAL, out_x2na_bin );
-
-    physical column NCBI:SRA:Illumina:encoding:SIGNAL #2 .SIGNAL
-        = ( NCBI:SRA:swapped_fsamp4 ) < NCBI:fsamp4 > NCBI:SRA:swap ( in_signal, in_x2na_bin )
-        | ( NCBI:SRA:swapped_fsamp4 ) < NCBI:fsamp4 > NCBI:SRA:swap ( in_signal, in_2na_bin );
-
-    /* NOISE
-     *  optional, no longer archived
-     */
-    extern column NCBI:fsamp4 NOISE
-    {
-        read = out_noise;
-        validate = < NCBI:fsamp4 > no_compare #1 ( in_noise, out_noise );
-    }
-    NCBI:fsamp4 in_noise = NOISE;
-    NCBI:fsamp4 out_noise = .NOISE;
-
-    physical column NCBI:SRA:Illumina:encoding:NOISE #2 .NOISE = in_noise;
-
-    /* INTENSITY
-     *  optional, no longer archived
-     */
-    extern column NCBI:fsamp4 INTENSITY
-    {
-        read = out_intensity;
-        validate = < NCBI:fsamp4 > no_compare #1 ( in_intensity, out_intensity );
-    }
-    NCBI:fsamp4 in_intensity = INTENSITY;
-    NCBI:fsamp4 out_intensity
-        = < NCBI:fsamp4 > NCBI:SRA:denormalize ( out_norm_intensity, out_x2na_bin );
-    NCBI:fsamp4 out_norm_intensity
-        = ( NCBI:fsamp4 ) < NCBI:SRA:swapped_fsamp4 > NCBI:SRA:swap ( .INTENSITY, out_x2na_bin );
-    NCBI:fsamp4 in_norm_intensity
-        = < NCBI:fsamp4 > NCBI:SRA:normalize ( in_intensity, in_x2na_bin )
-        | < NCBI:fsamp4 > NCBI:SRA:normalize ( in_intensity, in_2na_bin );
-    physical column NCBI:SRA:Illumina:encoding:INTENSITY #2 .INTENSITY
-        = ( NCBI:SRA:swapped_fsamp4 ) < NCBI:fsamp4 > NCBI:SRA:swap ( in_norm_intensity, in_x2na_bin )
-        | ( NCBI:SRA:swapped_fsamp4 ) < NCBI:fsamp4 > NCBI:SRA:swap ( in_norm_intensity, in_2na_bin );
-
-	/* INSDC:tbl:sequence inherited virtual productions
-	 *  out_qual_phred
-	 */
-
-	/* INSDC:SRA:tbl:spotdesc inherited productions
-	 *  static_fixed_spot_len
-	 */
-};
-
-/* 4-channel log-odds qualities
- *
- * history:
- *  1.0.2 - updated ancestry
- *  1.0.3 - updated ancestry
- *  1.0.4 - updated ancestry
- *  1.1.0 - updated ancestry
- */
-table NCBI:SRA:Illumina:tbl:q4:v2 #1.1.0
-    = NCBI:SRA:Illumina:tbl:v2 #1.0.4
-    , NCBI:SRA:Illumina:qual4 #2.1.0
-{
-	/* INSDC:SRA:tbl:spotdesc inherited virtual productions
-	 *  static_fixed_spot_len
-	 */
-};
-
-/* 1-channel log-odds qualities
- *
- * history:
- *  1.0.2 - updated ancestry
- *  1.0.3 - updated ancestry
- *  1.0.4 - updated ancestry
- *  1.1.0 - updated ancestry
- */
-table NCBI:SRA:Illumina:tbl:q1:v2 #1.1
-    = NCBI:SRA:Illumina:tbl:v2 #1.0.4
-    , NCBI:tbl:log_odds_quality #2.1.0
-{
-	/* INSDC:SRA:tbl:spotdesc inherited productions
-	 *  static_fixed_spot_len
-	 */
-};
-
-/* phred qualities
- *
- * history:
- *  1.0.2 - updated ancestry
- *  1.0.3 - updated ancestry
- *  1.0.4 - updated ancestry
- */
-table NCBI:SRA:Illumina:tbl:phred:v2 #1.0.4
-    = NCBI:SRA:Illumina:tbl:v2 #1.0.4
-    , NCBI:tbl:phred_quality #2.0.3
-{
-	/* INSDC:SRA:tbl:spotdesc inherited virtual productions
-	 *  static_fixed_spot_len
-	 */
-};
diff --git a/interfaces/sra/impl.h b/interfaces/sra/impl.h
deleted file mode 100644
index 815d5a6..0000000
--- a/interfaces/sra/impl.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_impl_h_
-#define _h_sra_impl_h_
-
-#ifndef _h_sra_path_extern_
-#include <sra/path-extern.h>
-#endif
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KNamelist;
-struct KDirectory;
-typedef union SRAPath_vt SRAPath_vt;
-typedef struct SRAPath_vt_v1 SRAPath_vt_v1;
-typedef struct SRAPath_vt_v2 SRAPath_vt_v2;
-
-
-/*--------------------------------------------------------------------------
- * SRAPath
- */
-struct SRAPath
-{
-    const SRAPath_vt *vt;
-};
-
-#ifndef SRAPATH_IMPL
-#define SRAPATH_IMPL struct SRAPath
-#endif
-
-struct SRAPath_vt_v1
-{
-    /* version == 1.x */
-    uint32_t maj;
-    uint32_t min;
-
-    rc_t ( CC *addref ) ( const SRAPATH_IMPL *self );
-    rc_t ( CC *release ) ( const SRAPATH_IMPL *self );
-    rc_t ( CC *version ) ( const SRAPATH_IMPL *self, uint32_t *version );
-    rc_t ( CC *clear ) ( SRAPATH_IMPL *self );
-    rc_t ( CC *addRepPath ) ( SRAPATH_IMPL *self, const char *path );
-    rc_t ( CC *addVolPath ) ( SRAPATH_IMPL *self, const char *path );
-    rc_t ( CC *fullPath ) ( const SRAPATH_IMPL *self, const char *rep, const char *vol,
-			 const char *acc, char *path, size_t path_max );
-    bool ( CC *testPath ) ( const SRAPATH_IMPL *self, const char *path );
-    rc_t ( CC *findPath ) ( const SRAPATH_IMPL *self, const char *acc, char *path, size_t path_max, size_t *rep_len );
-    rc_t ( CC *listPath ) ( const SRAPATH_IMPL *self, struct KNamelist **runs, bool deep );
-};
-
-struct SRAPath_vt_v2
-{
-    /* version == 2.x */
-    uint32_t maj;
-    uint32_t min;
-
-    rc_t ( CC *addref ) ( const SRAPATH_IMPL *self );
-    rc_t ( CC *release ) ( const SRAPATH_IMPL *self );
-    rc_t ( CC *version ) ( const SRAPATH_IMPL *self, uint32_t *version );
-    rc_t ( CC *clear ) ( SRAPATH_IMPL *self );
-    rc_t ( CC *addRepPath ) ( SRAPATH_IMPL *self, const char *path );
-    rc_t ( CC *addVolPath ) ( SRAPATH_IMPL *self, const char *path );
-    rc_t ( CC *fullPath ) ( const SRAPATH_IMPL *self, const char *rep, const char *vol,
-			 const char *acc, char *path, size_t path_max );
-    bool ( CC *testPath ) ( const SRAPATH_IMPL *self, const char *path );
-    rc_t ( CC *findPath ) ( const SRAPATH_IMPL *self, const char *acc, char *path, size_t path_max, size_t *rep_len );
-};
-
-union SRAPath_vt
-{
-    SRAPath_vt_v1 v1;
-    SRAPath_vt_v2 v2;
-};
-
-
-/* SRAPathMakeImpl
- *  make the SRAPath object within a shared library called "libsra-path"
- */
-MOD_EXPORT rc_t CC SRAPathMakeImpl ( struct SRAPath **pm, struct KDirectory const *dir );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_impl_h_ */
diff --git a/interfaces/sra/ion-torrent.vschema b/interfaces/sra/ion-torrent.vschema
deleted file mode 100644
index ed0d97c..0000000
--- a/interfaces/sra/ion-torrent.vschema
+++ /dev/null
@@ -1,117 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * NCBI Ion Torrent Sequence Read Archive schema
- */
-version 1;
-
-include 'ncbi/sra.vschema';
-include 'ncbi/spotname.vschema';
-include 'ncbi/clip.vschema';
-
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-
-/* tokenize_spot_name
- *  scans name on input
- *  tokenizes into parts
- */
-extern function NCBI:SRA:spot_name_token
-    NCBI:SRA:IonTorrent:tokenize_spot_name #1 ( ascii name );
-
-
-/*--------------------------------------------------------------------------
- * table
- */
-
-physical INSDC:position:one NCBI:SRA:IonTorrent:encoding:POSITION #1
-{
-    decode
-    {
-        I32 pos_1st_deriv = iunzip ( @ );
-        return ( INSDC:position:one ) < I32 > integral ( pos_1st_deriv );
-    }
-    encode
-    { 
-        I32 pos_1st_deriv = < I32 > deriv ( @ );
-        return izip ( pos_1st_deriv ); 
-    }
-}
-
-/* IonTorrent:tbl
- *
- * history:
- *  1.0.1 - updated ancestry
- *  1.0.2 - updated ancestry
- *  1.0.3 - updated ancestry
- */
-table NCBI:SRA:IonTorrent:tbl:v2 #1.0.3
-    = INSDC:SRA:tbl:sra #1.0.3
-    , NCBI:SRA:tbl:sra_nopos #2.1.3
-    , NCBI:tbl:base_space #2.0.3
-    , NCBI:tbl:phred_quality #2.0.3
-    , NCBI:SRA:tbl:clip #1.0.2
-{
-    /* PLATFORM is always ION_TORRENT */
-    ascii platform_name
-        = < ascii > echo < "ION_TORRENT" > ();
-
-    /* NAME tokenizing and coordinates
-     *  most work happens in skeyname table
-     */
-    NCBI:SRA:spot_name_token out_spot_name_tok
-        = NCBI:SRA:IonTorrent:tokenize_spot_name ( _out_name );
-
-    NCBI:SRA:spot_name_token in_spot_name_tok
-        = NCBI:SRA:IonTorrent:tokenize_spot_name ( NAME );
-
-    // special sequences
-    column < INSDC:dna:text > zip_encoding FLOW_CHARS;
-    column < INSDC:dna:text > zip_encoding KEY_SEQUENCE;
-
-    // position stored as normal 1-based coordinate
-    INSDC:position:one out_position = .POSITION;
-    physical column NCBI:SRA:IonTorrent:encoding:POSITION
-        .POSITION = POSITION;
-
-
-    // clips
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_ADAPTER_LEFT = CLIP_ADAPTER_LEFT;
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_ADAPTER_RIGHT = CLIP_ADAPTER_RIGHT;
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_QUALITY_LEFT = CLIP_QUALITY_LEFT;
-    physical column < INSDC:coord:one > izip_encoding
-        .CLIP_QUALITY_RIGHT = CLIP_QUALITY_RIGHT;
-
-    // signal
-    column < NCBI:isamp1 > izip_encoding SIGNAL;
-};
diff --git a/interfaces/sra/nanopore.vschema b/interfaces/sra/nanopore.vschema
deleted file mode 100644
index c1643f5..0000000
--- a/interfaces/sra/nanopore.vschema
+++ /dev/null
@@ -1,84 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-/*==========================================================================
- * NCBI Oxford Nanopore Sequence Read Archive schema
- */
-version 1;
-
-include 'insdc/sra.vschema';
-include 'ncbi/sra.vschema';
-
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:Nanopore:consensus
- *  Oxford Nanopore SRA Platform
- */
-table NCBI:SRA:Nanopore:consensus #1
-    = NCBI:SRA:tbl:sra #2.1.3
-    , NCBI:tbl:base_space #2.0.3
-    , NCBI:tbl:phred_quality #2.0.3
-{
-    extern column < U32 > izip_encoding #1 CHANNEL;
-
-    extern column < U32 > izip_encoding #1 READ_NUMBER;
-
-    extern column bool_encoding #1 HIGH_QUALITY;
-    
-    ascii platform_name
-        = < ascii > echo < "OXFORD_NANOPORE" > ();
-        
-    INSDC:SRA:platform_id out_platform
-        = < INSDC:SRA:platform_id > echo < SRA_PLATFORM_OXFORD_NANOPORE > ();
-}
-
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:Nanopore:sequence
- *  Oxford Nanopore SRA Platform
- */
-table NCBI:SRA:Nanopore:sequence #1
-    = NCBI:SRA:tbl:sra #2.1.3
-    , NCBI:tbl:base_space #2.0.3
-    , NCBI:tbl:phred_quality #2.0.3
-{
-    extern column < U32 > izip_encoding #1 CHANNEL;
-
-    extern column < U32 > izip_encoding #1 READ_NUMBER;
-
-    ascii platform_name
-        = < ascii > echo < "OXFORD_NANOPORE" > ();
-        
-    INSDC:SRA:platform_id out_platform
-        = < INSDC:SRA:platform_id > echo < SRA_PLATFORM_OXFORD_NANOPORE > ();
-}
-
-
-database NCBI:SRA:Nanopore:db #1
-{
-    table NCBI:SRA:Nanopore:sequence #1.0 SEQUENCE;
-    table NCBI:SRA:Nanopore:consensus #1.0 CONSENSUS;
-};
diff --git a/interfaces/sra/pacbio.h b/interfaces/sra/pacbio.h
deleted file mode 100644
index 0c3ea64..0000000
--- a/interfaces/sra/pacbio.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_pacbio_
-#define _h_sra_pacbio_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*==========================================================================
- * PACBIO types, constants
- */
-
-
-/* hole status for pacbio spots
- */
-#define sra_read_filter_t "INSDC:SRA:read_filter"
-typedef uint8_t PACBIO_HOLE_STATUS;
-enum
-{
-    SRA_PACBIO_HOLE_SEQUENCING = 0,
-    SRA_PACBIO_HOLE_ANTIHOLE = 1,
-    SRA_PACBIO_HOLE_FIDUCIAL = 2,
-    SRA_PACBIO_HOLE_SUSPECT = 3,
-    SRA_PACBIO_HOLE_ANTIMIRROR = 4,
-    SRA_PACBIO_HOLE_FDZMW = 5,
-    SRA_PACBIO_HOLE_FBZMW = 6,
-    SRA_PACBIO_HOLE_ANTIBEAMLET = 7,
-    SRA_PACBIO_HOLE_OUTSIDEFOV = 8
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_sra_pacbio_ */
diff --git a/interfaces/sra/pacbio.vschema b/interfaces/sra/pacbio.vschema
deleted file mode 100644
index e118e25..0000000
--- a/interfaces/sra/pacbio.vschema
+++ /dev/null
@@ -1,307 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-/*==========================================================================
- * NCBI PacBio Fastq Sequence Read Archive schema
- */
-version 1;
-
-include 'insdc/sra.vschema';
-include 'ncbi/sra.vschema';
-
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:PacBio
- *  Pacific Biotech SRA Platform
- *
- * history:
- *  1.0.2 - updated ancestry
- *  1.0.3 - updated ancestry
- */
-table NCBI:SRA:PacBio:common #1.0.3 = NCBI:SRA:tbl:sra #2.1.3
-{
-}
-
-/* history:
- *  1.0.2 - updated ancestry
- *  1.0.3 - updated ancestry
- */
-table NCBI:SRA:PacBio:smrt:fastq #1.0.3
-    = NCBI:SRA:PacBio:common #1.0.3
-    , NCBI:tbl:base_space #2.0.3
-    , NCBI:tbl:phred_quality #2.0.3
-{
-    /* PLATFORM
-     *  platform name is always "PACBIO_SMRT"
-     */
-    ascii platform_name
-        = < ascii > echo < "PACBIO_SMRT" > ();
-
-    /* TRIMMED SEQUENCE
-     *  need to find the 0-based trim_start and trim_len
-     */
-    INSDC:coord:zero bio_start
-        = NCBI:SRA:bio_start ( out_read_start, out_read_type );
-
-    INSDC:coord:zero trim_start = bio_start;
-
-    U32 trim_left = ( U32 ) trim_start;
-    INSDC:coord:len trim_len = ( INSDC:coord:len )
-        < U32 > diff ( spot_len, trim_left );
-}
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:PacBio:smrt:db
- *  Pacific Biotech SRA Platform
- */
-table NCBI:SRA:PacBio:smrt:indelsubst #1
-{
-    // probability that the current base is an insertion
-    column < U8 > zip_encoding INSERTION_QV;
-
-    // probability of a deletion error following current base
-    // and identity of deleted base, if it exists
-    column < U8 > zip_encoding DELETION_QV;
-    column < INSDC:dna:text > zip_encoding DELETION_TAG;
-
-    // probability of a substitution error
-    // and most likely alternative base call
-    column < U8 > zip_encoding SUBSTITUTION_QV;
-    column < INSDC:dna:text > zip_encoding SUBSTITUTION_TAG;
-};
-
-typedef U8 PacBio:hole:status;
-const PacBio:hole:status PacBio:hole:SEQUENCING  = 0;
-const PacBio:hole:status PacBio:hole:ANTIHOLE    = 1;
-const PacBio:hole:status PacBio:hole:FIDUCIAL    = 2;
-const PacBio:hole:status PacBio:hole:SUSPECT     = 3;
-const PacBio:hole:status PacBio:hole:ANTIMIRROR  = 4;
-const PacBio:hole:status PacBio:hole:FDZMW       = 5;
-const PacBio:hole:status PacBio:hole:FBZMW       = 6;
-const PacBio:hole:status PacBio:hole:ANTIBEAMLET = 7;
-const PacBio:hole:status PacBio:hole:OUTSIDEFOV  = 8;
-
-/* history:
- *  1.0.1 - updated ancestry
- *  1.0.2 - updated ancestry
- */
-table NCBI:SRA:PacBio:smrt:basecalls #1.0.2
-    = INSDC:SRA:tbl:spotcoord #1
-    , NCBI:tbl:base_space #2.0.3
-    , NCBI:tbl:phred_quality #2.0.3
-    , NCBI:SRA:PacBio:smrt:indelsubst #1
-{
-    /* PLATFORM
-     *  platform name is always "PACBIO_SMRT"
-     */
-    ascii platform_name
-        = < ascii > echo < "PACBIO_SMRT" > ();
-
-    // basecalls will be routed to READ column
-    readonly column INSDC:dna:text BASECALL
-        = out_dna_text;
-
-    // quality value for each base
-    readonly column INSDC:quality:phred QUALITY_VALUE
-        = out_qual_phred;
-
-    // zero-based hole number
-    column < U32 > izip_encoding HOLE_NUMBER;
-
-    // hole status
-    column < PacBio:hole:status > zip_encoding HOLE_STATUS;
-
-    // optional column pair to describe hole status
-    // when/if it does not line up with our constants above
-    column < ascii > zip_encoding HOLE_STATUS_VALUE;
-    column < INSDC:coord:len > izip_encoding HOLE_STATUS_VALUE_LEN;
-
-    // hole ( X,Y ) pair will be split and sent to X and Y columns
-    column I16 [ 2 ] HOLE_XY
-        = < I16 > paste ( x_clip_I16, y_clip_I16 );
-    I16 x_clip_I16 = cast ( out_x_coord );
-    I16 y_clip_I16 = cast ( out_y_coord );
-
-    I16 in_x16_coord = < I16 > cut < 0 > ( HOLE_XY );
-    I16 in_y16_coord = < I16 > cut < 1 > ( HOLE_XY );
-
-    INSDC:coord:val in_x_coord = cast ( in_x16_coord );
-    INSDC:coord:val in_y_coord = cast ( in_y16_coord );
-
-    // the number of bases in ZMW
-    readonly column INSDC:coord:len NUM_EVENT
-        = base_space_spot_len;
-};
-
-/* history:
- *  1.0.1 - updated ancestry
- *  1.0.2 - updated ancestry
- */
-table NCBI:SRA:PacBio:smrt:sequence #1.0.2
-    = NCBI:SRA:PacBio:smrt:basecalls #1.0.2
-    , NCBI:SRA:tbl:sra_nopos #2.1.3
-{
-    // pulse information
-    column < U16 > izip_encoding PRE_BASE_FRAMES;
-    column < U16 > izip_encoding WIDTH_IN_FRAMES;
-
-    // spot to pulse map
-    default column INSDC:position:zero PULSE_INDEX
-        = .PULSE_INDEX;
-    readonly column INSDC:position:one PULSE_INDEX
-        = out_position;
-    INSDC:position:one out_position
-        = ( INSDC:position:one ) < INSDC:position:zero > sum < 1 > ( .PULSE_INDEX );
-
-    column NCBI:SRA:pos16 PULSE_INDEX
-        = cast ( .PULSE_INDEX );
-    NCBI:SRA:pos16 in_pulse_index16
-        = PULSE_INDEX;
-
-    INSDC:position:zero in_pulse_index32
-        = PULSE_INDEX
-        | cast ( in_pulse_index16 );
-
-    physical column < INSDC:position:zero > izip_encoding .PULSE_INDEX
-        = in_pulse_index32;
-
-    /* clip quality */
-    extern column < INSDC:coord:zero > izip_encoding CLIP_QUALITY_LEFT;
-    extern column < INSDC:coord:one > izip_encoding CLIP_QUALITY_RIGHT;
-
-    /* TRIMMED SEQUENCE
-     *  need to find the 0-based trim_start and trim_len
-     */
-    INSDC:coord:zero trim_start
-        = .CLIP_QUALITY_LEFT
-        | NCBI:SRA:bio_start ( out_read_start, out_read_type );
-
-    U32 trim_right
-        = ( U32 ) .CLIP_QUALITY_RIGHT
-        | spot_len;
-
-    U32 trim_left = ( U32 ) trim_start;
-    INSDC:coord:len trim_len = ( INSDC:coord:len )
-        < U32 > diff ( trim_right, trim_left );
-};
-
-/* history:
- *  1.0.1 - updated ancestry
- *  1.0.2 - updated ancestry
- */
-table NCBI:SRA:PacBio:smrt:cons #1.0.2
-    = NCBI:SRA:PacBio:smrt:basecalls #1.0.2
-    , NCBI:SRA:tbl:sra #2.1.3
-{
-    // documented in both hdf5 and xsd as signed...
-    column < I32 > izip_encoding NUM_PASSES;
-
-    /* TRIMMED SEQUENCE
-     *  need to find the 0-based trim_start and trim_len
-     */
-    INSDC:coord:zero trim_start
-        = NCBI:SRA:bio_start ( out_read_start, out_read_type );
-
-    U32 trim_left = ( U32 ) trim_start;
-    INSDC:coord:len trim_len = ( INSDC:coord:len )
-        < U32 > diff ( spot_len, trim_left );
-};
-
-/* these encoding rules attempt to compress the channels individually,
-   although they may compress fine interleaved as they are... */
-physical
-F32 [ 4 ] NCBI:SRA:PacBio:smrt:F32_4ch_encoding #1.0 < U32 mantissa >
-{
-    decode
-    {
-        fzip_fmt cmp0 = split < 0 > ( @ );
-        fzip_fmt cmp1 = split < 1 > ( @ );
-        fzip_fmt cmp2 = split < 2 > ( @ );
-        fzip_fmt cmp3 = split < 3 > ( @ );
-
-        F32 ch0 = funzip ( cmp0 );
-        F32 ch1 = funzip ( cmp1 );
-        F32 ch2 = funzip ( cmp2 );
-        F32 ch3 = funzip ( cmp3 );
-
-        return < F32 > paste ( ch0, ch1, ch2, ch3 );
-    }
-
-    encode
-    {
-        F32 ch0 = < F32 > cut < 0 > ( @ );
-        F32 ch1 = < F32 > cut < 1 > ( @ );
-        F32 ch2 = < F32 > cut < 2 > ( @ );
-        F32 ch3 = < F32 > cut < 3 > ( @ );
-
-        fzip_fmt cmp0 = fzip < mantissa > ( ch0 );
-        fzip_fmt cmp1 = fzip < mantissa > ( ch1 );
-        fzip_fmt cmp2 = fzip < mantissa > ( ch2 );
-        fzip_fmt cmp3 = fzip < mantissa > ( ch3 );
-
-        return merge ( cmp0, cmp1, cmp2, cmp3 );
-    }
-}
-
-table NCBI:SRA:PacBio:smrt:zmw_metrics #1
-{
-    column NCBI:SRA:PacBio:smrt:F32_4ch_encoding < 24 > BASE_FRACTION;
-    column < F32 > fzip_encoding < 24 > BASE_IPD;
-    column < F32 > fzip_encoding < 24 > BASE_RATE;
-    column < F32 > fzip_encoding < 24 > BASE_WIDTH;
-    column NCBI:SRA:PacBio:smrt:F32_4ch_encoding < 24 > CHAN_BASE_QV;
-    column NCBI:SRA:PacBio:smrt:F32_4ch_encoding < 24 > CHAN_DEL_QV;
-    column NCBI:SRA:PacBio:smrt:F32_4ch_encoding < 24 > CHAN_INS_QV;
-    column NCBI:SRA:PacBio:smrt:F32_4ch_encoding < 24 > CHAN_SUB_QV;
-    column < F32 > fzip_encoding < 24 > LOCAL_BASE_RATE;
-    column < F32 > fzip_encoding < 24 > DARK_BASE_RATE;
-    column < F32 > fzip_encoding < 24 > HQ_RGN_START_TIME;
-    column < F32 > fzip_encoding < 24 > HQ_RGN_END_TIME;
-    column NCBI:SRA:PacBio:smrt:F32_4ch_encoding < 24 > HQ_RGN_SNR;
-    column < I8 > zip_encoding PRODUCTIVITY;
-    column < F32 > fzip_encoding < 24 > READ_SCORE;
-    column < F32 > fzip_encoding < 24 > READ_BASE_QV;
-    column < F32 > fzip_encoding < 24 > READ_DEL_QV;
-    column < F32 > fzip_encoding < 24 > READ_INS_QV;
-    column < F32 > fzip_encoding < 24 > READ_SUB_QV;
-};
-
-table NCBI:SRA:PacBio:smrt:passes #1
-{
-    column < U8 > zip_encoding ADAPTER_HIT_BEFORE;
-    column < U8 > zip_encoding ADAPTER_HIT_AFTER;
-    column < U8 > zip_encoding PASS_DIRECTION;
-    column < I32 > izip_encoding PASS_NUM_BASES;
-    column < I32 > izip_encoding PASS_START_BASE;
-};
-
-database NCBI:SRA:PacBio:smrt:db #1.0.1
-{
-    table NCBI:SRA:PacBio:smrt:sequence #1.0 SEQUENCE;
-    table NCBI:SRA:PacBio:smrt:cons #1.0 CONSENSUS;
-    table NCBI:SRA:PacBio:smrt:passes #1.0 PASSES;
-    table NCBI:SRA:PacBio:smrt:zmw_metrics #1.0 ZMW_METRICS;
-};
diff --git a/interfaces/sra/path-extern.h b/interfaces/sra/path-extern.h
deleted file mode 100644
index 26f671c..0000000
--- a/interfaces/sra/path-extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_path_extern_
-#define _h_sra_path_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define SRA_PATH_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define SRA_PATH_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_sra_path_extern_ */
diff --git a/interfaces/sra/pevents.vschema b/interfaces/sra/pevents.vschema
deleted file mode 100644
index 8072810..0000000
--- a/interfaces/sra/pevents.vschema
+++ /dev/null
@@ -1,91 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * NCBI Likelihood & Event schema
- */
-version 1;
-include 'vdb/vdb.vschema';
-
-typedef U8 INSDC:phred;
-typedef ascii INSDC:event:text;
-const INSDC:event:text INSDC:event:CHARSET = "ACGT0123B+-";
-const INSDC:event:text INSDC:event:ACCEPTSET = "ACGTacgt0123B+-";
-
-extern function < U32 dim >
-U32 NCBI:SRA:sort_order #1.0 ( F32[dim] likelihoods );
-
-extern function < U32 dim >
-F32 NCBI:SRA:reorder #1.0 ( U32 sort_order, F32[dim] likelihoods );
-
-extern function < U32 dim >
-F32 NCBI:SRA:restore_order #1.0 ( U32 sort_order, F32[dim] likelihoods );
-
-extern function < U32 sdim, U32 rdim >
-INSDC:phred[rdim] NCBI:SRA:likelihood_to_phred #1.0 ( F32 like_scale, F32[sdim] likelihoods );
-
-extern function < U32 sdim, U32 rdim >
-F32[rdim] NCBI:SRA:phred_to_likelihood #1.0 ( F32 like_scale, F32[sdim] phred );
-
-table NCBI:SRA:tbl:pevents #1.0
-{
-    // event labels - single character events
-    extern column
-        INSDC:event:text PEVENTS = .PEVENTS;
-
-    physical column < INSDC:event:text >
-        zip_encoding #1.0 .PEVENTS = PEVENTS;
-
-    // likelihoods
-    extern default column
-        F32[4] LIKELIHOODS = likelihoods;
-    extern readonly column
-        INSDC:phred[4] LIKELIHOODS = phred;
-
-    U32 sort_encode = NCBI:SRA:sort_order < 4 > ( LIKELIHOODS );
-
-    physical column < U32 >
-        zip_encoding #1.0 < Z_RLE > .SORT_ORDER = sort_encode;
-
-    F32 reorder = NCBI:SRA:reorder < 4 > ( sort_encode, LIKELIHOODS );
-    F32 like_scale = vdb:fixed_vec_sum < F32, 4 > ( reorder );
-
-    physical column < F32 >
-        fzip_encoding #1.0 < 4 > .SCALE = like_scale;
-
-    INSDC:phred cut_phred = NCBI:SRA:likelihood_to_phred #1.0 < 4, 3 > ( like_scale, reorder );
-
-    physical column < INSDC:phred >
-        zip_encoding #1.0 < 5 > .PHRED = cut_phred;
-
-    // normalization scaling factors
-    extern readonly column
-        F32 LIKELIHOOD_NORM = .SCALE;
-
-    // phred scores
-    extern readonly column
-        INSDC:phred[4] PHRED = phred;
-};
diff --git a/interfaces/sra/rd-extern.h b/interfaces/sra/rd-extern.h
deleted file mode 100644
index 02c2984..0000000
--- a/interfaces/sra/rd-extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_rd_extern_
-#define _h_sra_rd_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define SRA_RD_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define SRA_RD_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_sra_rd_extern_ */
diff --git a/interfaces/sra/sch-extern.h b/interfaces/sra/sch-extern.h
deleted file mode 100644
index 37d38b8..0000000
--- a/interfaces/sra/sch-extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_sch_extern_
-#define _h_sra_sch_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define SRA_SCH_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define SRA_SCH_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_sra_sch_extern_ */
diff --git a/interfaces/sra/sff-file.h b/interfaces/sra/sff-file.h
deleted file mode 100644
index 4b36bc3..0000000
--- a/interfaces/sra/sff-file.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_sra_sff_file_
-#define _h_sra_sff_file_
-
-#include <klib/defs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* ======================================================================
- * SFF defines an 8 bit value in the file that tells of the format of the 
- * data signal (flowgrams in Roche 454 SFF parlance).
- *
- * The only currently defined format is a 16 bit unsigned integer in
- * units one hundredths. This enum is to easily allow us to add other
- * formats if ever required.
- */
-typedef enum SFFFormatCode
-{
-    SFFFormatCodeUnset = 0,
-    /* values are 16 integers of hundreths of units: 0 = 0.00, 1 = 0.01, 2 = 0.02, ... */
-    SFFFormatCodeUI16Hundreths,
-    /* currently (SFF (00000001) yet this is the only one SFFFormatCode is defined */
-    SFFFormatCodeUndefined
-}	SFFFormatCode;
-
-/* ----------------------------------------------------------------------
- * Common Header Section 
- * (Genome Sequencer Data Analysis Software Manual Section 13.3.8.1)
- */
-#define SFFCommonHeader_size 31
-
-typedef struct SFFCommonHeader_struct
-{
-    uint32_t magic_number;         /* four bytes ".sff" as string: with wrong endian it would be "ffs." */
-    uint32_t version;              /* four bytes 0x00000001 */
-    uint64_t index_offset;         /* index_offset and index_length are the offset and length of an */
-    uint32_t index_length;         /* optional index of the reads in the file. If no index both are 0 */
-    uint32_t number_of_reads;      /* The number of reads in the file (not individual datum) */
-    uint16_t header_length;        /* length of all headers in this set.  31 + flow_length + key_length + pad to 8 byte boundary */
-    uint16_t key_length;           /* length of the key sequence for these reads */
-    uint16_t num_flows_per_read;   /* the number of flows for each read in this file */
-    uint8_t  flowgram_format_code; /* SFFFormatCode between (SFFFormatCodeUnset..FormateCodeUndefined) exclusive */
-    /* not included variable length portion of header:
-        flow chars   - sequence of uint8_t, actual length is num_flows_per_read above
-        key sequence - sequence of uint8_t, actual length is key_length above
-        padding      - sequence of zeroed uint8_t to make total length of file header 8-byte padded
-    */
-} SFFCommonHeader;
-
-/* ----------------------------------------------------------------------
- * Read Header Section 
- * (Genome Sequencer Data Analysis Software Manual Section 13.3.8.2)
- */
-#define SFFReadHeader_size 16
-
-typedef struct SFFReadHeader_struct
-{
-    uint16_t    header_length;            /* length in bytes of the full section including padding */
-    uint16_t    name_length;            /* length of the name of this spot */
-    uint32_t    number_of_bases;
-    uint16_t    clip_quality_left;
-    uint16_t    clip_quality_right;
-    uint16_t    clip_adapter_left;
-    uint16_t    clip_adapter_right;
-    /* not included variable length portion of header:
-        name    - sequence of uint8_t, actual length is name_length above
-        padding - sequence of zeroed uint8_t to make total length of read header 8-byte padded
-
-        read data section:
-
-        signal - sequence of uint16_t (if flowgram_format_code == SFFFormatCodeUI16Hundreths, see enum above),
-                 actual length is num_flows_per_read from file header above
-        flow_index_per_base (position) - sequence of uint8_t, actual length in number_of_bases above
-        bases - sequence of uint8_t, actual length in number_of_bases above
-        quality_scores - sequence of uint8_t, actual length in number_of_bases above
-        padding - sequence of zeroed uint8_t to make total length of read data section 8-byte padded
-    */
-} SFFReadHeader;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_sff_file_ */
diff --git a/interfaces/sra/sff.h b/interfaces/sra/sff.h
deleted file mode 100644
index b958d49..0000000
--- a/interfaces/sra/sff.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_sra_sff_
-#define _h_sra_sff_
-
-#ifndef _h_sra_rd_extern_
-#include <sra/rd-extern.h>
-#endif
-
-#ifndef _h_sra_sradb_
-#include <sra/sradb.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * SFFReader
- */
-typedef struct SFFReader SFFReader;
-
-/* Make
- *  create SFFReader reference based
- *  on table and properties:
- *     table      - SRATable
- *     accession  - accession
- *     minSpotId  - starting spot id, 0 - ignored (run information used)
- *     maxSpotId  - ending spot id, 0 - ignored (run information used)
- *                  you cannot seek out of range of [minSpotId:maxSpotId]
- */
-SRA_RD_EXTERN rc_t CC SFFReaderMake(const SFFReader** self, const SRATable* table, const char* accession,
-                                    spotid_t minSpotId, spotid_t maxSpotId);
-
-/* Whack
- *  releases object obtained from SFFReaderMake
- */
-SRA_RD_EXTERN rc_t CC SFFReaderWhack(const SFFReader* self);
-
-/* FirstSpot
- *  set current spot to first in the run
- */
-SRA_RD_EXTERN rc_t CC SFFReaderFirstSpot(const SFFReader* self);
-
-/* SeekSpot
- *  set current spot
- * if error occured current spot position becomes 0
- */
-SRA_RD_EXTERN rc_t CC SFFReaderSeekSpot(const SFFReader* self, spotid_t spot);
-
-/* NextSpot
- *  Seek to next spot from current
- */
-SRA_RD_EXTERN rc_t CC SFFReaderNextSpot(const SFFReader* self);
-
-/* CurrentSpot
- *  Get current spot
- *  sopt [OUT] - pointer to assign value of the current spot
- * returns GetRCState(rc) == rcExhausted when out of spots
- */
-SRA_RD_EXTERN rc_t CC SFFReaderCurrentSpot(const SFFReader* self, spotid_t* spot);
-
-/* SpotInfo
- *  Get current spot information
- *  spotname [OUT] - pointer to assign value of the current spot name (can be NULL)
- *  spot_len [OUT] - pointer to assign value of the current spot length (can be NULL)
- *  num_reads[OUT] - pointer to assign value of the number of reads in current spot (can be NULL)
- */
-SRA_RD_EXTERN rc_t CC SFFReader_SpotInfo(const SFFReader* self, const char** spotname, size_t* spotname_sz,
-                                         uint32_t* spot_len, uint32_t* num_reads);
-
-/* SpotReadInfo
- *  Get read information for current spot
- *  readid    [IN]  - 1-based read id
- *  read_label[OUT] - pointer to assign value of the read label (can be NULL)
- *  read_type [OUT] - pointer to assign value of the read type (can be NULL)
- *  read_start[OUT] - pointer to assign value of the read start in spot (can be NULL)
- *  read_len  [OUT] - pointer to assign value of the read length (can be NULL)
- *  cskey     [OUT] - pointer to assign value of the read color space key (can be NULL)
- *  if start and len is == 0 read is empty
- */
-SRA_RD_EXTERN rc_t CC SFFReader_SpotReadInfo(const SFFReader* self, uint32_t readId, SRAReadTypes* read_type,
-                                             const char** read_label, INSDC_coord_len* read_label_sz,
-                                             INSDC_coord_zero* read_start, INSDC_coord_len* read_len);
-
-/* Header
- *  retrieve binary file header
- *  spots [IN,OPT]   - sets number of reads in header, ignored if spots == 0
- *  data [IN]        - pointer to buffer for printing
- *  dsize [IN]       - data buffer size
- *  written [IN,OUT] - number of bytes occupied by data, may by more than dsize
- */
-SRA_RD_EXTERN rc_t CC SFFReaderHeader(const SFFReader* self, spotid_t spots, char* data, size_t dsize, size_t* written);
-
-/* Base
- *  retrieve bases for the spot
- *  other parameters see description for SFFReaderHeader above
- */
-SRA_RD_EXTERN rc_t CC SFFReaderReadHeader(const SFFReader* self, char* data, size_t dsize, size_t* written);
-
-/* QualityName
- *  retrieve quality name string for the spot
- *  other parameters see description for SFFReaderHeader above
- */
-SRA_RD_EXTERN rc_t CC SFFReaderReadData(const SFFReader* self, char* data, size_t dsize, size_t* written);
-
-/* GetCurrentSpotData
- *  retrieve current spot data as a blob
- *  other parameters see description for SFFReaderHeader above
- */
-SRA_RD_EXTERN rc_t CC SFFReader_GetCurrentSpotData(const SFFReader* self, char* data, size_t dsize, size_t* written);
-
-/* GetNextSpotData (streaming function)
- *  move to the next spot and retrieve current spot data as a blob
- *  other parameters see description for SFFReaderHeader above
- */ 
-SRA_RD_EXTERN rc_t CC SFFReader_GetNextSpotData(const SFFReader* self, char* data, size_t dsize, size_t* written);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_sff_ */
diff --git a/interfaces/sra/sradb-priv.h b/interfaces/sra/sradb-priv.h
deleted file mode 100644
index 8fdf027..0000000
--- a/interfaces/sra/sradb-priv.h
+++ /dev/null
@@ -1,407 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_sradb_priv_
-#define _h_sra_sradb_priv_
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_klib_text
-#include <klib/text.h>
-#endif
-
-#ifndef _h_klib_vector
-#include <klib/vector.h>
-#endif
-
-#ifndef _h_sra_sradb_
-#include <sra/sradb.h>
-#endif
-
-#ifndef _h_sra_srapath_
-#include <sra/srapath.h>
-#endif
-
-#ifndef _h_sra_path_extern_
-#include <sra/path-extern.h>
-#endif
-
-#ifndef _h_sra_sch_extern_
-#include <sra/sch-extern.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-struct KDirectory;
-struct KDBManager;
-struct KTable;
-struct KLock;
-struct KConfig;
-struct VDBManager;
-struct VTable;
-struct VSchema;
-struct SRAPath;
-struct SRACacheUsage;
-struct SRACacheMetrics;
-/*--------------------------------------------------------------------------
- * SRAMgr
- *  opaque handle to SRA library
- */
- 
-/*  SRAMgrResolve
- *  Convert accession name into a file system path
- */
- 
-SRA_EXTERN rc_t CC SRAMgrResolve( const SRAMgr *self, const char* acc, char* buf, size_t buf_size );
-
-/* Flush
- *  flushes least recently used accessions until the cache size is under the specified threshold
- */
-SRA_EXTERN rc_t CC SRAMgrFlush ( struct SRAMgr const *self, const struct SRACacheMetrics* );
-
-/* RunBGTasks
- *  perform single pass of garbage collection tasks and exit.
- *  also retrieves and processes update messages.
- */
-SRA_EXTERN rc_t CC SRAMgrRunBGTasks ( struct SRAMgr const *self );
-
-/* GetVDBManager
- *  returns a new reference to VDBManager used by SRAMgr
- */
-SRA_EXTERN rc_t CC SRAMgrGetVDBManagerRead ( const SRAMgr *self, struct VDBManager const **vmgr );
-SRA_EXTERN rc_t CC SRAMgrGetVDBManagerUpdate ( SRAMgr *self, struct VDBManager **vmgr );
-
-/* GetKDBManager
- *  returns a new reference to KDBManager used indirectly by SRAMgr
- */
-SRA_EXTERN rc_t CC SRAMgrGetKDBManagerRead ( const SRAMgr *self, struct KDBManager const **kmgr );
-SRA_EXTERN rc_t CC SRAMgrGetKDBManagerUpdate ( SRAMgr *self, struct KDBManager **kmgr );
-
-/* ModDate
- *  return a modification timestamp for table
- */
-SRA_EXTERN rc_t CC SRAMgrVGetTableModDate ( const SRAMgr *self,
-    KTime_t *mtime, const char *spec, va_list args );
-
-SRA_EXTERN rc_t CC SRAMgrGetTableModDate ( const SRAMgr *self,
-    KTime_t *mtime, const char *spec, ... );
-
-/* ConfigReload
- *  update SRAPath object
- */
-SRA_EXTERN rc_t CC SRAMgrConfigReload( const SRAMgr *self, struct KDirectory const *wd );
-
-/* 
- *  Accession Cache usage stats
- */
-SRA_EXTERN rc_t CC SRAMgrGetCacheUsage( const SRAMgr *self, struct SRACacheUsage* stats );
-
-/* 
- *  Configure Accession Cache 
- *  soft_threshold, hard_threshold - new threshold values ( -1 : do not change; < -1 invalid )
- */
-SRA_EXTERN rc_t CC SRAMgrConfigureCache( const SRAMgr *self,  int32_t soft_threshold, int32_t hard_threshold );
-
-/*--------------------------------------------------------------------------
- * SRATable
- */
-
-/* OpenAltTableRead
- *  opens a table within a database structure with a specific name
- */
-SRA_EXTERN rc_t CC SRAMgrOpenAltTableRead ( const SRAMgr *self,
-    const SRATable **tbl, const char *altname, const char *spec, ... );
-
-/* GetVTable
- *  returns a new reference to underlying VTable
- */
-SRA_EXTERN rc_t CC SRATableGetVTableRead ( const SRATable *self, struct VTable const **vtbl );
-SRA_EXTERN rc_t CC SRATableGetVTableUpdate ( SRATable *self, struct VTable **vtbl );
-
-/* GetKTable
- *  returns a new reference to underlying KTable
- */
-SRA_EXTERN rc_t CC SRATableGetKTableRead ( const SRATable *self, struct KTable const **ktbl );
-SRA_EXTERN rc_t CC SRATableGetKTableUpdate ( SRATable *self, struct KTable **ktbl );
-
-
-/* MakeSingleFileArchive
- *  makes a single-file-archive file from an SRA table
- *
- *  contents are ordered by frequency and necessity of access
- *
- *  "lightweight" [ IN ] - when true, include only those components
- *  required for read and quality operations.
- *
- *  "ext" [OUT,NULL] - optional file name extension to use for file
- */
-SRA_EXTERN rc_t CC SRATableMakeSingleFileArchive ( const SRATable *self,
-    struct KFile const **sfa, bool lightweight, const char** ext );
-
-/* SingleFileArchiveExt
- *  retrieve archive extension based on object in the spec
- */
-SRA_EXTERN rc_t CC SRAMgrSingleFileArchiveExt(const SRAMgr *self,
-    const char* spec, const bool lightweight, const char** ext);
-/*--------------------------------------------------------------------------
- * SRAPath
- */
-
-/* FindWithRepLen
- *  finds location of run within rep-server/volume matrix
- *  returns length of rep-server portion
- */
-SRA_EXTERN rc_t CC SRAPathFindWithRepLen ( struct SRAPath const *self,
-    const char *accession, char *path, size_t path_max, size_t *rep_len );
-
-
-
-/*--------------------------------------------------------------------------
- * SRASchema
- */
-
-SRA_SCH_EXTERN rc_t CC SRASchemaMake ( struct VSchema **schema, struct VDBManager const *mgr );
-
-
-#if 0
-
-/*--------------------------------------------------------------------------
- * SRATableData  - DEPRECATED
- *  a collection of spots with several data series, minimally including
- *  base or color calls and their quality ( confidence ) values, and
- *  optionally signal-related values ( signal, intensity, noise, ... ).
- */
-union NucStrstr;
-
-typedef struct SRASpotStructure SRASpotStructure;
-struct SRASpotStructure
-{ 
-    /* preformatted query expression
-       for fixed_seq when search is needed */
-    union NucStrstr *q_str;
-
-    /* read of fixed len if != 0
-       either teminated by fixed_seq or by the end */
-    uint16_t fixed_len;
-
-    /* SRAReadTypes */
-	uint8_t read_type;
-
-    /* colorspace key */
-    char cs_key;
-
-    char fixed_seq [ 1024 ];
-
-    /* label for the read */
-    char read_label [ 54 ];
-
-};
-
-typedef struct SRASpotCoord SRASpotCoord;
-struct SRASpotCoord
-{
-    uint32_t x, y, tile;
-	uint32_t  lane;
-	spotid_t id;
-
-    /* prefix part of spotname */
-	uint32_t platename_len;
-	char spotname [ 1024 ];
-
-};
-
-typedef struct SRATableData SRATableData;
-struct SRATableData
-{
-	uint64_t base_count;
-	uint64_t spot_count;
-	uint64_t bad_spot_count;
-	spotid_t max_spotid;
-
-    /* the spot is always fixed len read */
-	uint32_t fixed_len;
-
-    /* number of reads per spot */
-	uint32_t num_reads;
-
-    /* read mask containing bio reads */
-	uint32_t read_mask_bio;
-
-    /* read description */
-	SRASpotStructure read_descr [ 32 ];
-    uint16_t read_len [ 32 ];
-
-    /* platform type and name */
-	uint8_t platform;
-	char platform_str [ 31 ];
-
-	uint16_t prefix_len;
-
-    /* spot coordinates */
-	SRASpotCoord coord;
-
-};
-
-/* GetTableData
- *  returns a pointer to internal table data
- *  or NULL if "self" is invalid
- *
- * NB - THIS OBJECT IS NOT REFERENCE COUNTED
- */
-SRA_EXTERN const SRATableData *CC SRATableGetTableData ( const SRATable *self );
-
-#endif
-
-/*--------------------------------------------------------------------------
- * SRA Accession Cache
- */
-struct SRACacheIndex;
-
-typedef struct SRACacheMetrics
-{   
-    uint32_t elements; /* open accessions */
-    
-    /* not in use currently: */
-    uint64_t bytes; /* expanded cache bytes, i.e. cursor */
-    uint32_t threads;
-    uint32_t fds;
-} SRACacheMetrics;
-
-#define SRACacheThresholdSoftBytesDefault       ((uint64_t)0)
-#define SRACacheThresholdSoftElementsDefault    ((uint32_t)1000)
-#define SRACacheThresholdSoftThreadsDefault     ((uint32_t)0)
-#define SRACacheThresholdSoftFdsDefault         ((uint32_t)0)
-
-#define SRACacheThresholdHardBytesDefault       ((uint64_t)0)
-#define SRACacheThresholdHardElementsDefault    ((uint32_t)10000)
-#define SRACacheThresholdHardThreadsDefault     ((uint32_t)0)
-#define SRACacheThresholdHardFdsDefault         ((uint32_t)0)
-
-SRA_EXTERN bool CC SRACacheMetricsLessThan(const SRACacheMetrics* a, const SRACacheMetrics* b);
-
-typedef struct SRACacheElement 
-{
-    DLNode dad;
-    
-    SRATable*   object;
-    
-    KTime_t lastAccessed;
-    
-    struct SRACacheIndex* index;
-    uint32_t key;
-
-    SRACacheMetrics metrics;
-} SRACacheElement;
-
-SRA_EXTERN rc_t CC SRACacheElementMake(SRACacheElement**        self, 
-                                       SRATable*                object, 
-                                       struct SRACacheIndex*    index, 
-                                       uint32_t                 key, 
-                                       const SRACacheMetrics*   metrics);
-SRA_EXTERN rc_t CC SRACacheElementDestroy(SRACacheElement* self);
-
-typedef struct SRACacheIndex
-{
-    BSTNode dad;
-    
-    String* prefix;
-    KVector* body; /* KVector<SRACacheElement*> */
-} SRACacheIndex;
-
-SRA_EXTERN rc_t CC SRACacheIndexMake(SRACacheIndex** self, String* prefix);
-SRA_EXTERN rc_t CC SRACacheIndexDestroy(SRACacheIndex* self);
-
-typedef struct SRACacheUsage {
-    /* config */
-    uint32_t soft_threshold;
-    uint32_t hard_threshold;    
-    /* usage stats */ 
-    uint32_t elements;
-    uint64_t requests;
-    uint64_t hits;
-    uint64_t misses;
-    uint64_t busy;
-} SRACacheUsage;
-
-typedef struct SRACache
-{
-    BSTree indexes; /* grows as needed */
-
-    DLList lru; /* DLList<SRACacheElement*>;  head is the oldest */
-    
-    struct KLock* mutex; 
-
-    SRACacheMetrics softThreshold;
-    SRACacheMetrics hardThreshold;
-    SRACacheMetrics current;
-    
-    uint64_t requests;
-    uint64_t hits;
-    uint64_t misses;
-    uint64_t busy;
-} SRACache;
-
-SRA_EXTERN rc_t CC SRACacheInit(SRACache**, struct KConfig*);
-
-SRA_EXTERN rc_t CC SRACacheGetSoftThreshold(SRACache* self, SRACacheMetrics* metrics);
-SRA_EXTERN rc_t CC SRACacheSetSoftThreshold(SRACache* self, const SRACacheMetrics* metrics);
-
-SRA_EXTERN rc_t CC SRACacheGetHardThreshold(SRACache* self, SRACacheMetrics* metrics);
-SRA_EXTERN rc_t CC SRACacheSetHardThreshold(SRACache* self, const SRACacheMetrics* metrics);
-
-SRA_EXTERN rc_t CC SRACacheGetUsage(SRACache* self, SRACacheUsage* usage);
-
-/* flush tables until usage is lower than specified in self->softThreshold */
-SRA_EXTERN rc_t CC SRACacheFlush(SRACache* self); 
-
-/* 
-    if found, moves element to the back of the list; return NULL object if not in the cache 
-    if found but the refcount is not 1, returns RC( rcSRA, rcData, rcAccessing, rcParam, rcBusy)
-*/
-SRA_EXTERN rc_t CC SRACacheGetTable(SRACache* self, const char* acc, const SRATable** object); 
-
-/* 
- * fails if table is already in the cache.
- * Does not affect usage stats.
- */
-SRA_EXTERN rc_t CC SRACacheAddTable(SRACache* self, const char* acc, SRATable*); 
-
-SRA_EXTERN rc_t CC SRACacheWhack(SRACache* self);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_sradb_priv_ */
diff --git a/interfaces/sra/sradb.h b/interfaces/sra/sradb.h
deleted file mode 100644
index 747a109..0000000
--- a/interfaces/sra/sradb.h
+++ /dev/null
@@ -1,545 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_sradb_
-#define _h_sra_sradb_
-
-#ifndef _h_sra_extern_
-#include <sra/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_insdc_insdc_
-#include <insdc/insdc.h>
-#endif
-
-#ifndef _h_insdc_sra_
-#include <insdc/sra.h>
-#endif
-
-#include <stdarg.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct VSchema;
-struct VTypedef;
-struct VTypedecl;
-struct VDatatypes;
-struct KMDataNode;
-struct KDirectory;
-struct SRANamelist;
-
-
-/*--------------------------------------------------------------------------
- * version
- *  current API version is 3.1
- */
-#define SRADB_CURRENT_VERSION 0x03010000
-
-
-/*--------------------------------------------------------------------------
- * spotid_t
- *  a 1-based integer spot identifier
- *  unique within table
- *  see <insdc/sra.h>
- */
-typedef INSDC_SRA_spotid_t spotid_t;
-
-
-/*--------------------------------------------------------------------------
- * REFERENCE COUNTING
- *  most objects used in the API are reference counted.
- *
- *  all functions that return an object return an original reference
- *  to that object ( unless otherwise noted ).
- *
- *  *Release functions are used to discard a reference. under normal
- *  operation objects will be returned by an API function and freed via
- *  the corresponding release.
- *
- *  *AddRef functions are used to attach an additional reference to
- *  an object, which increases the number of *Release messages needed
- *  to actually free an object. manipulating the reference count of an
- *  object is not normally required.
- */
-
-
-/*--------------------------------------------------------------------------
- * SRAMgr
- *  opaque handle to SRA library
- */
-typedef struct SRAMgr SRAMgr;
-
-
-/* MakeRead
- *  create library reference for read-only access
- *
- *  "wd" [ IN, NULL OKAY ] - optional working directory for
- *  accessing the file system. mgr will attach its own reference
- *
- *  NB - not implemented in update libary
- *  and the read-only library may not be mixed with read/write
- */
-SRA_EXTERN rc_t CC SRAMgrMakeRead ( const SRAMgr **mgr );
-SRA_EXTERN rc_t CC SRAMgrMakeReadWithDir ( const SRAMgr **mgr, struct KDirectory const *wd );
-
-
-/* Release
- *  releases reference to object
- *  obtained from MakeRead, MakeUpdate,
- *  or AddRef ( see above )
- */
-SRA_EXTERN rc_t CC SRAMgrRelease ( const SRAMgr *self );
-
-
-/* AddRef
- *  attach a new reference to an existing object
- *  ( see above )
- */
-SRA_EXTERN rc_t CC SRAMgrAddRef ( const SRAMgr *self );
-
-
-/* Version
- *  returns the library version
- */
-SRA_EXTERN rc_t CC SRAMgrVersion ( const SRAMgr *self, uint32_t *version );
-
-
-/* OpenDatatypes - DEPRECATED
- *  open datatype registry object for requested access
- *
- *  "dt" [ OUT ] - return parameter for datatypes object
- */
-SRA_EXTERN rc_t CC SRAMgrOpenDatatypesRead ( const SRAMgr *self,
-    struct VDatatypes const **dt );
-
-
-/* GetSchema
- *  get a reference to the schema used to create new tables
- *
- *  "schema" [ OUT ] - return parameter for reference to SRA schema
- *
- * NB - returns a new reference that must be released via VSchemaRelease
- */
-SRA_EXTERN rc_t CC SRAMgrGetSchemaRead ( const SRAMgr *self, struct VSchema const **schema );
-
-
-/* UseSchema
- *  allows SRA schema to be entirely replaced
- *  affects creation/update of all subsequent tables
- *
- *  "schema" [ IN ] - new schema to be applied
- *
- * NB - manager will attach a new reference to schema object,
- *  you are still responsible for releasing it via VSchemaRelease
- */
-SRA_EXTERN rc_t CC SRAMgrUseSchemaRead ( const SRAMgr *self, struct VSchema const *schema );
-
-
-/* Writable
- *  returns 0 if table is writable
- *  rcLocked if locked, rcReadonly if read-only
- *  other code upon error
- *
- *  "path" [ IN ] - NUL terminated table path
- */
-SRA_EXTERN rc_t CC SRAMgrWritable ( const SRAMgr *self, const char *path, ... );
-SRA_EXTERN rc_t CC SRAMgrVWritable ( const SRAMgr *self, const char *path, va_list args );
-
-
-/*--------------------------------------------------------------------------
- * SRANamelist
- */
-typedef struct SRANamelist SRANamelist;
-
-/* AddRef
- * Release
- *  see REFERENCE COUNTING, above
- */
-SRA_EXTERN rc_t CC SRANamelistAddRef ( const SRANamelist *self );
-SRA_EXTERN rc_t CC SRANamelistRelease ( const SRANamelist *self );
-
-
-/* Count
- *  gets the number of names
- *
- *  "count" [ OUT ] - return value
- */
-SRA_EXTERN rc_t CC SRANamelistCount ( const SRANamelist *self, uint32_t *count );
-
-
-/* Get
- *  gets an indexed name
- *
- *  "idx" [ IN ] - zero-based name index
- *
- *  "name" [ OUT ] - return parameter for NUL terminated name
- */
-SRA_EXTERN rc_t CC SRANamelistGet ( const SRANamelist *self,
-    uint32_t idx, const char **name );
-    
-    
-/*--------------------------------------------------------------------------
- * SRATable
- *  a collection of spots with several data series, minimally including
- *  base or color calls and their quality ( confidence ) values, and
- *  optionally signal-related values ( signal, intensity, noise, ... ).
- *
- *  to discover the series available, use "SRATableListCol" to get
- *  the names, and "SRATableColDatatypes" to list data types available
- *  for each name.
- *
- *  see below for standard readable columns
- */
-typedef struct SRATable SRATable;
-
-/* AddRef
- * Release
- *  see REFERENCE COUNTING, above
- */
-SRA_EXTERN rc_t CC SRATableAddRef ( const SRATable *self );
-SRA_EXTERN rc_t CC SRATableRelease ( const SRATable *self );
-
-
-/* OpenRead
- *  open an existing table
- *
- *  "tbl" [ OUT ] - return parameter for table
- *
- *  "spec" [ IN ] - NUL terminated UTF-8 string giving path
- *  to table.
- */
-SRA_EXTERN rc_t CC SRAMgrOpenTableRead ( const SRAMgr *self,
-    const SRATable **tbl, const char *spec, ... );
-SRA_EXTERN rc_t CC SRAMgrVOpenTableRead ( const SRAMgr *self,
-    const SRATable **tbl, const char *spec, va_list args );
-
-/* Locked
- *  returns true if locked
- */
-SRA_EXTERN bool CC SRATableLocked ( const SRATable *self );
-
-
-/* BaseCount
- *  get the number of stored bases
- *
- *  "num_bases" [ OUT ] - return parameter for base count
- */
-SRA_EXTERN rc_t CC SRATableBaseCount ( const SRATable *self, uint64_t *num_bases );
-
-
-/* SpotCount
- *  get the number of stored spots
- *
- *  "spot_count" [ OUT ] - return parameter for spot count
- */
-SRA_EXTERN rc_t CC SRATableSpotCount ( const SRATable *self, uint64_t *spot_count );
-
-
-/* MinSpotId
- *  returns the minimum spot id
- *
- *  a table will contain a collection of spots with ids from
- *  min(spot_id) to max(spot_id) unless empty.
- *
- *  "id" [ OUT ] - return parameter of last spot id
- *  or zero if the table is empty.
- */
-SRA_EXTERN rc_t CC SRATableMinSpotId ( const SRATable *self, spotid_t *id );
-
-/* MaxSpotId
- *  returns the maximum spot id
- *
- *  a table will contain a collection of spots with ids from
- *  1 to max ( spot_id ) unless empty.
- *
- *  "id" [ OUT ] - return parameter of last spot id
- *  or zero if the table is empty.
- */
-SRA_EXTERN rc_t CC SRATableMaxSpotId ( const SRATable *self, spotid_t *id );
-
-
-/* GetSpotId
- *  convert spot name to spot id
- *  may fail if original textual spot name is not present
- *
- *  "id" [ OUT ] - return parameter for 1-based spot id
- *
- *  "spot_name" [ IN ] - external spot name string
- *  in platform canonical format.
- */
-SRA_EXTERN rc_t CC SRATableGetSpotId ( const SRATable *self,
-    spotid_t *id, const char *spot_name );
-
-
-/* ListCol
- *  returns a list of simple column names
- *  each name represents at least one typed column
- *
- *  "names" [ out ] - return parameter for names list
- */
-SRA_EXTERN rc_t CC SRATableListCol ( const SRATable *self, SRANamelist **names );
-
-
-/* ColDatatypes
- *  returns list of typedecls for named column
- *
- *  "col" [ IN ] - column name
- *
- *  "dflt_idx" [ OUT, NULL OKAY ] - returns the zero-based index
- *  into "typedecls" of the default datatype for the named column
- *
- *  "typedecls" [ OUT ] - list of datatypes available for named column
- */
-SRA_EXTERN rc_t CC SRATableColDatatypes ( const SRATable *self, const char *col,
-    uint32_t *dflt_idx, SRANamelist **typedecls );
-
-
-/* MetaRevision
- *  returns current revision number
- *  where 0 ( zero ) means tip
- */
-SRA_EXTERN rc_t CC SRATableMetaRevision ( const SRATable *self, uint32_t *revision );
-
-
-/* MaxRevision
- *  returns the maximum revision available
- */
-SRA_EXTERN rc_t CC SRATableMaxMetaRevision ( const SRATable *self, uint32_t *revision );
-
-
-/* UseMetaRevision
- *  opens indicated revision of metadata
- *  all non-zero revisions are read-only
- */
-SRA_EXTERN rc_t CC SRATableUseMetaRevision ( const SRATable *self, uint32_t revision );
-
-
-/* OpenMDataNode
- *  open a metadata node
- *
- *  "node" [ OUT ] - return parameter for metadata node
- *
- *  "path" [ IN ] - simple or hierarchical NUL terminated
- *  path to node
- */
-SRA_EXTERN rc_t CC SRATableOpenMDataNodeRead ( const SRATable *self,
-    struct KMDataNode const **node, const char *path, ... );
-SRA_EXTERN rc_t CC SRATableVOpenMDataNodeRead ( const SRATable *self,
-    struct KMDataNode const **node, const char *path, va_list args );
-
-
-/*  SRATableGetSchema
- *  returns current schema of the open cursor
- */
-SRA_EXTERN struct VSchema const* CC SRATableGetSchema ( const SRATable *self );
-
-
-
-/*--------------------------------------------------------------------------
- * SRAColumn
- *  represents a spot data column, where the column is configured as
- *  a sequence of blobs, and each blob is a sequence of records,
- *  indexed by spot id.
- */
-typedef struct SRAColumn SRAColumn;
-
-/* AddRef
- * Release
- *  see REFERENCE COUNTING, above
- */
-SRA_EXTERN rc_t CC SRAColumnAddRef ( const SRAColumn *self );
-SRA_EXTERN rc_t CC SRAColumnRelease ( const SRAColumn *self );
-
-
-/* OpenColumnRead
- *  open a column for read
- *
- *  "col" [ OUT ] - return parameter for newly opened column
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving column name
- *
- *  "datatype" [ IN, NULL OKAY ] - optional NUL terminated typedecl
- *  string describing fully qualified column data type, or if NULL
- *  the default type for column.
- */
-SRA_EXTERN rc_t CC SRATableOpenColumnRead ( const SRATable *self,
-    const SRAColumn **col, const char *name, const char *datatype );
-
-
-/* Datatype
- *  access data type
- *
- *  "type" [ OUT, NULL OKAY ] - returns the column type declaration
- *
- *  "def" [ OUT, NULL OKAY ] - returns the definition of the type
- *  returned in "type_decl"
- *
- * NB - one of "type" and "def" must be non-NULL
- */
-SRA_EXTERN rc_t CC SRAColumnDatatype ( const SRAColumn *self,
-    struct VTypedecl *type, struct VTypedef *def );
-
-
-/* GetRange
- *  get a contiguous range around a spot id, e.g. tile for Illumina
- *
- *  "id" [ IN ] - return parameter for 1-based spot id
- *
- *  "first" [ OUT, NULL OKAY ] and "last" [ OUT, NULL OKAY ] -
- *  id range is returned in these output parameters, where
- *  at least ONE must be NOT-NULL
- */
-SRA_EXTERN rc_t CC SRAColumnGetRange ( const SRAColumn *self,
-    spotid_t id, spotid_t *first, spotid_t *last );
-
-
-/* Read
- *  read row data
- *
- *  "id" [ IN ] - spot row id between 1 and max ( spot id )
- *
- *  "base" [ OUT ] and "offset" [ OUT ] - pointer and bit offset
- *  to start of spot row data.
- *
- *  "size" [ OUT ] - size in bits of row data
- */
-SRA_EXTERN rc_t CC SRAColumnRead ( const SRAColumn *self, spotid_t id,
-    const void **base, bitsz_t *offset, bitsz_t *size );
-
-
-
-/*--------------------------------------------------------------------------
- * SRA column formatted type descriptions
- *
- *  most datatypes are constructed as vectors, rather than structures.
- *  this permits flexibility in data transformations and removes compiler
- *  dependency in layout.
- */
-
-
-/* SRAPlatforms
- *  see <insdc/sra.h>
- */
-typedef INSDC_SRA_platform_id SRAPlatforms;
-
-
-/* SRAReadTypes
- *  read type bits
- *  see <insdc/sra.h>
- */
-typedef INSDC_SRA_xread_type SRAReadTypes;
-
-
-/* SRAReadFilter
- *  read filter attribute bits
- *  see <insdc/sra.h>
- */
-typedef INSDC_SRA_read_filter SRAReadFilter;
-
-
-/* SRASpotDesc - DEPRECATED
- *  a structure returned by SPOT_DESC column
- */
-#define sra_spot_desc_t "NCBI:SRA:SpotDesc"
-typedef struct SRASpotDesc SRASpotDesc;
-struct SRASpotDesc
-{
-    /* lengths in bases */
-    uint16_t spot_len;
-    uint16_t fixed_len;
-    uint16_t signal_len;
-
-    /* quality clips */
-    uint16_t clip_qual_right;
-
-    /* number of reads per spot */
-    uint8_t num_reads;
-
-    /* pad out to have 16 byte structure size */
-    uint8_t align [ 7 ];
-};
-
-/* SRASegment - DEPRECATED
- *  a paired starting coordinate and length
- */
-#define sra_segment_t "NCBI:SRA:Segment"
-typedef struct SRASegment SRASegment;
-struct SRASegment
-{
-    uint16_t start;
-    uint16_t len;
-};
-
-/* SRAReadDesc - DEPRECATED
- *  a structure 
- */
-#define sra_read_desc_t "NCBI:SRA:ReadDesc"
-typedef struct SRAReadDesc SRAReadDesc;
-struct SRAReadDesc
-{
-    /* location and length in bases of read
-       within READ and QUALITY columns */
-    SRASegment seg;
-
-    /* read type from SRAReadTypes */
-    uint8_t type;
-
-    /* optional color space key */
-    char cs_key;
-
-    /* NUL terminated read label */
-    char label [ 74 ];
-};
-
-/* SRAPhredPair
- *  pairs an event character with a phred score
- *  event characters are "ACGT0123B+-"
- */
-#define sra_phred_pair_t "NCBI:SRA:PhredPair"
-typedef struct SRAPhredPair SRAPhredPair;
-struct SRAPhredPair
-{
-    char event;
-    INSDC_quality_phred phred;
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_sradb_ */
diff --git a/interfaces/sra/sradb.hpp b/interfaces/sra/sradb.hpp
deleted file mode 100644
index 2bb3b5b..0000000
--- a/interfaces/sra/sradb.hpp
+++ /dev/null
@@ -1,441 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_sra_sradb_
-#define _hpp_sra_sradb_
-
-#ifdef _hpp_sra_wsradb_
-#error "read and update libraries are mutually exclusive"
-#endif
-
-#ifndef _h_sra_sradb_
-#include <sra/sradb.h>
-#endif
-
-
-/*--------------------------------------------------------------------------
- * SRAMgr
- *  opaque handle to SRA library
- */
-struct SRAMgr
-{
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef () const throw ()
-    { return SRAMgrAddRef ( this ); }
-
-    inline rc_t Release () const throw ()
-    { return SRAMgrRelease ( this ); }
-
-
-    /* Make
-     *  create library handle for read-only access
-     *
-     *  NB - not implemented in read/write library,
-     *  and the read-only library may not be mixed with read/write
-     */
-    static inline rc_t Make ( const SRAMgr **mgr ) throw ()
-    { return SRAMgrMakeRead ( mgr ); }
-    static inline rc_t Make ( const SRAMgr **mgr, const KDirectory *wd ) throw ()
-    { return SRAMgrMakeReadWithDir ( mgr, wd ); }
-
-
-    /* Version
-     *  returns the library version
-     */
-    inline rc_t Version ( uint32_t *version ) const throw ()
-    { return SRAMgrVersion ( this, version ); }
-
-
-    /* OpenDatatypes
-     *  open datatype registry object for requested access
-     *  see <vdb/types.hpp> for VDatatypes
-     *
-     *  "dt" [ OUT ] - return parameter for datatypes object
-     */
-    inline rc_t OpenDatatypes ( const VDatatypes **dt ) const throw ()
-    { return SRAMgrOpenDatatypesRead ( this, dt ); }
-
-
-    /* GetSchema
-     *  get a reference to the schema used to create new tables
-     *
-     *  "schema" [ OUT ] - return parameter for reference to SRA schema
-     *
-     * NB - returns a new reference that must be released via VSchemaRelease
-     */
-    inline rc_t GetSchemaRead ( const VSchema **schema ) const throw ()
-    { return SRAMgrGetSchemaRead ( this, schema ); }
-
-
-    /* UseSchema
-     *  allows SRA schema to be entirely replaced
-     *  affects creation/update of all subsequent tables
-     *
-     *  "schema" [ IN ] - new schema to be applied
-     *
-     * NB - manager will attach a new reference to schema object,
-     *  you are still responsible for releasing it via VSchemaRelease
-     */
-    inline rc_t UseSchemaRead ( const VSchema *schema ) const throw ()
-    { return SRAMgrUseSchemaRead ( this, schema ); }
-
-
-    /* Writable
-     *  returns 0 if table is writable
-     *  rcLocked if locked, rcReadonly if read-only
-     *  other code upon error
-     *
-     *  "path" [ IN ] - NUL terminated table path
-     */
-    inline bool Writable ( const char *path, ... ) const throw ()
-    {
-        va_list args;
-        va_start ( args, path );
-        bool locked = SRAMgrVWritable ( this, path, args );
-        va_end ( args );
-        return locked;
-    }
-    inline bool Writable ( const char *path, va_list args ) const throw ()
-    { return SRAMgrVWritable ( this, path, args ); }
-
-
-    /* OpenTable
-     *  open an existing table for read
-     *
-     *  "tbl" [ OUT ] - return parameter for table
-     *
-     *  "path" [ IN ] - NUL terminated run name
-     */
-    inline rc_t OpenTable ( const SRATable **tbl,
-        const char *path, ... ) const throw ()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = SRAMgrVOpenTableRead ( this, tbl, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenTable ( const SRATable **tbl, const char *path,
-        va_list args ) const throw ()
-    { return SRAMgrVOpenTableRead ( this, tbl, path, args ); }
-    
-private:
-    SRAMgr ();
-    ~ SRAMgr ();
-    SRAMgr ( const SRAMgr& );
-    SRAMgr &operator = ( const SRAMgr& );
-};
-
-
-/*--------------------------------------------------------------------------
- * SRATable
- *  a collection of spots with several data series, minimally including
- *  base or color calls and their quality ( confidence ) values, and
- *  optionally signal-related values ( signal, intensity, noise, ... ).
- */
-struct SRATable
-{
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef () const throw ()
-    { return SRATableAddRef ( this ); }
-
-    inline rc_t Release () const throw ()
-    { return SRATableRelease ( this ); }
-
-
-    /* Locked
-     *  returns true if locked
-     */
-    inline bool Locked () const throw ()
-    { return SRATableLocked ( this ); }
-
-
-    /* BaseCount
-     *  get the number of stored bases
-     *
-     *  "num_bases" [ OUT ] - return parameter for base count
-     */
-    inline rc_t BaseCount ( uint64_t *num_bases ) const throw ()
-    { return SRATableBaseCount ( this, num_bases ); }
-
-
-    /* SpotCount
-     *  get the number of stored spots
-     *
-     *  "spot_count" [ OUT ] - return parameter for spot count
-     */
-    inline rc_t SpotCount ( uint64_t *spot_count ) const throw ()
-    { return SRATableSpotCount ( this, spot_count ); }
-
-
-    /* MaxSpotId
-     *  returns the maximum spot id
-     *
-     *  a table will contain a collection of spots with ids from
-     *  1 to max ( spot_id ).
-     *
-     *  "id" [ OUT ] - return parameter of last spot id
-     */
-    inline rc_t MaxSpotId ( spotid_t *id ) const throw ()
-    { return SRATableMaxSpotId ( this, id ); }
-
-
-    /* MinSpotId
-     *  returns the minimum spot id
-     *
-     *  a table will contain a collection of spots with ids from
-     *  min to max ( spot_id ).
-     *
-     *  "id" [ OUT ] - return parameter of last spot id
-     */
-    inline rc_t MinSpotId ( spotid_t *id ) const throw ()
-    { return SRATableMinSpotId ( this, id ); }
-
-    /* GetSpotId
-     *  project a spot id from a spot name
-     *
-     *  "id" [ OUT ] - return parameter for 1-based spot id
-     *
-     *  "spot_name" [ IN ] - external spot name string
-     */
-    inline rc_t GetSpotId ( spotid_t *id, const char *spot_name ) const throw ()
-    { return SRATableGetSpotId ( this, id, spot_name ); }
-
-
-    /* ListCol
-     *  returns a list of column names
-     *
-     *  "names" [ out ] - return parameter for names list
-     */
-    inline rc_t ListCol ( SRANamelist **names ) const throw ()
-    { return SRATableListCol ( this, names ); }
-
-
-    /* ColDatatypes
-     *  returns list of typedecls for named column
-     *
-     *  "col" [ IN ] - column name
-     *
-     *  "dflt_idx" [ OUT, NULL OKAY ] - returns the zero-based index
-     *  into "typedecls" of the default datatype for the named column
-     *
-     *  "typedecls" [ OUT ] - list of datatypes available for named column
-     */
-    inline rc_t ColDatatypes ( const char *col,
-        uint32_t *dflt_idx, SRANamelist **typedecls ) const throw ()
-    { return SRATableColDatatypes ( this, col, dflt_idx, typedecls ); }
-
-
-    /* OpenColumn
-     *  open a column for read
-     *
-     *  "col" [ OUT ] - return parameter for newly opened column
-     *
-     *  "name" [ IN ] - NUL terminated string in UTF-8 giving column name
-     *
-     *  "datatype" [ IN - NULL OKAY ] - optional NUL terminated
-     *   string describing fully qualified column data type in ASCII
-     */
-    inline rc_t OpenColumn ( const SRAColumn **col,
-        const char *name, const char *datatype = 0 ) const throw ()
-    { return SRATableOpenColumnRead ( this, col, name, datatype ); }
-
-
-    /* MetaRevision
-     *  returns current revision number
-     *  where 0 ( zero ) means tip
-     */
-    inline rc_t MetaRevision ( uint32_t *revision ) const throw ()
-    { return SRATableMetaRevision ( this, revision ); }
-
-
-    /* MaxRevision
-     *  returns the maximum revision available
-     */
-    inline rc_t MaxMetaRevision ( uint32_t *revision ) const throw ()
-    { return SRATableMaxMetaRevision ( this, revision ); }
-
-
-    /* UseMetaRevision
-     *  opens indicated revision of metadata
-     *  all non-zero revisions are read-only
-     */
-    inline rc_t UseMetaRevision ( uint32_t revision ) const throw ()
-    { return SRATableUseMetaRevision ( this, revision ); }
-
-
-    /* OpenMDataNode
-     *  open a metadata node
-     *
-     *  "node" [ OUT ] - return parameter for metadata node
-     *
-     *  "path" [ IN ] - simple or hierarchical NUL terminated
-     *  path to node
-     */
-    inline rc_t OpenMDataNode ( const KMDataNode **node,
-        const char *path, ... ) const throw ()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = SRATableVOpenMDataNodeRead ( this, node, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenMDataNode ( const KMDataNode **node,
-        const char *path, va_list args ) const throw ()
-    { return SRATableVOpenMDataNodeRead ( this, node, path, args ); }
-
-
-    /*  GetSchema
-    *  returns current schema of the open cursor
-    */
-    inline struct VSchema const* GetSchema () const throw ()
-    { return SRATableGetSchema ( this ); }
-
-private:
-    SRATable ();
-    ~ SRATable ();
-    SRATable ( const SRATable& );
-    SRATable &operator = ( const SRATable& );
-};
-
-
-/*--------------------------------------------------------------------------
- * SRAColumn
- *  represents a spot data column, where the column is configured as
- *  a sequence of blobs, and each blob is a sequence of records,
- *  indexed by spot id.
- */
-struct SRAColumn
-{
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef () const throw ()
-    { return SRAColumnAddRef ( this ); }
-
-    inline rc_t Release () const throw ()
-    { return SRAColumnRelease ( this ); }
-
-
-    /* Datatype
-     *  access data type
-     *
-     *  "type" [ OUT, NULL OKAY ] - returns the column type declaration
-     *
-     *  "def" [ OUT, NULL OKAY ] - returns the definition of the type
-     *  returned in "type_decl"
-     *
-     * NB - one of "type" and "def" must be non-NULL
-     */
-    inline int Datatype ( struct VTypedecl *type, struct VTypedef *def ) const throw ()
-    { return SRAColumnDatatype ( this, type, def ); }
-
-
-    /* GetRange
-     *  get a contiguous range around a spot id, e.g. tile for Illumina
-     *
-     *  "id" [ IN ] - return parameter for 1-based spot id
-     *
-     *  "first" [ OUT, NULL OKAY ] and "last" [ OUT, NULL OKAY ] -
-     *  id range is returned in these output parameters, where
-     *  at least ONE must be NOT-NULL
-     */
-    inline rc_t GetRange ( spotid_t id, spotid_t *first, spotid_t *last ) const throw ()
-    { return SRAColumnGetRange ( this, id, first, last ); }
-
-
-    /* Read
-     *  read row data
-     *
-     *  "id" [ IN ] - spot row id between 1 and max ( spot id )
-     *
-     *  "base" [ OUT ] and "offset" [ OUT ] - pointer and bit offset
-     *  to start of spot row data.
-     *
-     *  "size" [ OUT ] - size in bits of row data
-     */
-    inline rc_t Read ( spotid_t id,
-        const void **base, bitsz_t *offset, bitsz_t *size ) const throw ()
-    { return SRAColumnRead ( this, id, base, offset, size ); }
-
-
-private:
-    SRAColumn ();
-    ~ SRAColumn ();
-    SRAColumn ( const SRAColumn& );
-    SRAColumn &operator = ( const SRAColumn& );
-};
-
-
-/*--------------------------------------------------------------------------
- * SRANamelist
- *  a list of names, types or other strings
- */
-struct SRANamelist
-{
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef () const throw ()
-    { return SRANamelistAddRef ( this ); }
-
-    inline rc_t Release () const throw ()
-    { return SRANamelistRelease ( this ); }
-
-
-    /* Count
-     *  gets the number of names
-     *
-     *  "count" [ OUT ] - return value
-     */
-    inline rc_t Count ( uint32_t *count ) const throw ()
-    { return SRANamelistCount ( this, count ); }
-
-
-    /* Get
-     *  gets an indexed name
-     *
-     *  "idx" [ IN ] - zero-based name index
-     *
-     *  "name" [ OUT ] - return parameter for NUL terminated name
-     */
-    inline rc_t Get ( uint32_t idx, const char **name ) const throw ()
-    { return SRANamelistGet ( this, idx, name ); }
-
-
-private:
-    SRANamelist ();
-    ~ SRANamelist ();
-    SRANamelist ( const SRANamelist& );
-    SRANamelist &operator = ( const SRANamelist& );
-};
-
-#endif // _hpp_sra_sradb_
diff --git a/interfaces/sra/srapath.h b/interfaces/sra/srapath.h
deleted file mode 100644
index 9965e8d..0000000
--- a/interfaces/sra/srapath.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_srapath_
-#define _h_sra_srapath_
-
-#ifndef _h_sra_extern_
-#include <sra/extern.h>
-#endif
-
-#ifndef _h_klib_callconv_
-#include <klib/callconv.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define TOOLS_USE_SRAPATH 0
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KNamelist;
-struct KDirectory;
-
-
-/*--------------------------------------------------------------------------
- * SRAPath
- *  manages accession -> path conversion
- */
-typedef struct SRAPath SRAPath;
-
-
-/* Make
- *  create path manager
- *
- *  the path manager should already be configured with
- *  standard search paths, but can be augmented by using
- *  the Add*Path messages.
- *
- *  "dir" [ IN, NULL OKAY ] - optional root directory to use
- *  attaches a new reference
- */
-SRA_EXTERN rc_t CC SRAPathMake ( SRAPath **pm, struct KDirectory const *dir );
-
-
-/* AddRef
- * Release
- */
-SRA_EXTERN rc_t CC SRAPathAddRef ( const SRAPath *self );
-SRA_EXTERN rc_t CC SRAPathRelease ( const SRAPath *self );
-
-/* Version
- *  returns the library version
- */
-SRA_EXTERN rc_t CC SRAPathVersion ( const SRAPath *self, uint32_t *version );
-
-
-/* Clear
- *  forget existing server and volume paths for the default repository
- */
-SRA_EXTERN rc_t CC SRAPathClear ( SRAPath *self );
-
-
-/* AddRepPath
- *  add a replication path to the default repository
- *
- *  "rep" [ IN ] - NUL-terminated server search path
- *  may be a compound path with ':' separator characters, e.g.
- *  "/panfs/traces01:/panfs/traces31"
- *
- *  NB - servers are searched in the order provided,
- *  first to last, until one of them satisfies a request,
- *  at which time the successful server is placed at the
- *  head of the search path.
- */
-SRA_EXTERN rc_t CC SRAPathAddRepPath ( SRAPath *self, const char *rep );
-
-
-/* AddVolPath
- *  add a volume path to the default repository
- *
- *  "vol" [ IN ] - NUL-terminated volume search path
- *  may be a compound path with ':' separator characters, e.g.
- *  "sra2:sra1:sra0"
- *
- *  NB - volumes are searched in the order provided,
- *  first to last. they are never re-ordered.
- */
-SRA_EXTERN rc_t CC SRAPathAddVolPath ( SRAPath *self, const char *vol );
-
-
-/* Full
- *  creates full path from server, volume & accession
- *
- *  "rep" [ IN ] - NUL terminated full path of replication
- *  server, e.g. "/panfs/traces01"
- *
- *  "vol" [ IN ] - NUL terminated relative path of volume,
- *  e.g. "sra2"
- *
- *  "accession" [ IN ] - NUL terminated run accession,
- *  e.g. "SRR000001"
- *
- *  "path" [ OUT ] and "path_max" [ IN ] - return buffer for
- *  NUL-terminated full path to accession.
- */
-SRA_EXTERN rc_t CC SRAPathFull ( const SRAPath *self, const char *rep,
-    const char *vol, const char *accession, char *path, size_t path_max );
-
-
-/* Test
- *  returns true if path appears to be accession
- *  the test is a heuristic, and may return false positives
- *
- *  "path" [ IN ] - NUL terminated path to run
- */
-SRA_EXTERN bool CC SRAPathTest ( const SRAPath *self, const char *path );
-
-
-/* Find
- *  finds location of run within rep-server/volume matrix
- *
- *  "accession" [ IN ] - NUL terminated run accession,
- *   e.g. "SRR000001"
- *
- *  "path" [ OUT ] and "path_max" [ IN ] - return buffer for
- *  NUL-terminated full path to accession.
- *
- *  returns 0 if path exists, rc state rcNotFound if
- *  path cannot be found, and rcInsufficient if buffer is
- *  too small.
- */
-SRA_EXTERN rc_t CC SRAPathFind ( const SRAPath *self,
-    const char *accession, char *path, size_t path_max );
-
-
-/* List
- *  list all runs known to SRAPath
- *  this can be VERY SLOW due to the large number of runs
- *
- *  "runs" [ OUT ] - return parameter for ordered list of accessions
- *
- *  "deep" [ IN ] - when false, list only first responding server
- */
-SRA_EXTERN rc_t CC SRAPathList ( const SRAPath *self, struct KNamelist **runs, bool deep );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_srapath_ */
diff --git a/interfaces/sra/srapath.hpp b/interfaces/sra/srapath.hpp
deleted file mode 100644
index a863dfa..0000000
--- a/interfaces/sra/srapath.hpp
+++ /dev/null
@@ -1,176 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_sra_srapath_
-#define _hpp_sra_srapath_
-
-#ifndef _h_sra_srapath_
-#include <sra/srapath.h>
-#endif
-
-
-/*--------------------------------------------------------------------------
- * SRAPath
- *  archive specific path manager
- */
-struct SRAPath
-{
-    /* Make
-     *  create path manager
-     *
-     *  the path manager should already be configured with
-     *  standard search paths, but can be augmented by using
-     *  the Add*Path messages.
-     *
-     *  "dir" [ IN, NULL OKAY ] - optional root directory to use
-     *  attaches a new reference
-     */
-    static inline rc_t Make ( SRAPath **pm,
-        struct KDirectory const *dir = NULL ) throw()
-    { return SRAPathMake ( pm, dir ); }
-
-
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef () const  throw()
-    { return SRAPathAddRef ( this ); }
-
-    inline rc_t Release () const  throw()
-    { return SRAPathRelease ( this ); }
-
-
-    /* Version
-     *  returns the library version
-     */
-    inline rc_t Version ( uint32_t *version ) const  throw()
-    { return SRAPathVersion ( this, version ); }
-
-
-    /* Clear
-     *  forget all existing server and volume paths
-     */
-    inline rc_t Clear () throw()
-    { return SRAPathClear ( this ); }
-
-    /* AddRepPath
-     *  add a replication path
-     *
-     *  "rep" [ IN ] - NUL-terminated server search path
-     *  may be a compound path with ':' separator characters, e.g.
-     *  "/panfs/traces01:/panfs/traces31"
-     *
-     *  NB - servers are searched in the order provided,
-     *  first to last, until one of them satisfies a request,
-     *  at which time the successful server is placed at the
-     *  head of the search path.
-     */
-    inline rc_t AddRepPath ( const char *rep )  throw()
-    { return SRAPathAddRepPath ( this, rep ); }
-
-
-    /* AddVolPath
-     *  add a volume path
-     *
-     *  "vol" [ IN ] - NUL-terminated volume search path
-     *  may be a compound path with ':' separator characters, e.g.
-     *  "sra2:sra1:sra0"
-     *
-     *  NB - volumes are searched in the order provided,
-     *  first to last. they are never re-ordered.
-     */
-    inline rc_t AddVolPath ( const char *vol )  throw()
-    { return SRAPathAddVolPath ( this, vol ); }
-
-
-    /* Full
-     *  creates full path from server, volume & accession
-     *
-     *  "rep" [ IN ] - NUL terminated full path of replication
-     *  server, e.g. "/panfs/traces01"
-     *
-     *  "vol" [ IN ] - NUL terminated relative path of volume,
-     *  e.g. "sra2"
-     *
-     *  "accession" [ IN ] - NUL terminated run accession,
-     *  e.g. "SRR000001"
-     *
-     *  "path" [ OUT ] and "path_max" [ IN ] - return buffer for
-     *  NUL-terminated full path to accession.
-     */
-    inline rc_t Full ( const char *rep, const char *vol,
-        const char *accession, char *path, size_t path_max ) const  throw()
-    { return SRAPathFull ( this, rep, vol, accession, path, path_max ); }
-
-
-    /* Test
-     *  returns true if path appears to be accession
-     *  the test is a heuristic, and may return false positives
-     *
-     *  "path" [ IN ] - NUL terminated path to run
-     */
-    inline bool Test ( const char *path ) const  throw()
-    { return SRAPathTest ( this, path ); }
-
-
-    /* Find
-     *  finds location of run within rep-server/volume matrix
-     *
-     *  "accession" [ IN ] - NUL terminated run accession,
-     *   e.g. "SRR000001"
-     *
-     *  "path" [ OUT ] and "path_max" [ IN ] - return buffer for
-     *  NUL-terminated full path to accession.
-     *
-     *  returns 0 if path exists, rc state rcNotFound if
-     *  path cannot be found, and rcInsufficient if buffer is
-     *  too small.
-     */
-    inline rc_t Find ( const char *accession, char *path,
-        size_t path_max ) const throw()
-    { return SRAPathFind ( this, accession, path, path_max ); }
-
-
-    /* List
-     *  list all runs known to SRAPath
-     *  this can be VERY SLOW due to the large number of runs
-     *
-     *  "runs" [ OUT ] - return parameter for ordered list of accessions
-     *
-     *  "deep" [ IN ] - when false, list only first responding server
-     */
-    inline rc_t List ( struct KNamelist **runs,
-        bool deep = false ) const  throw()
-    { return SRAPathList ( this, runs, deep ); }
-
-private:
-    SRAPath ();
-    ~ SRAPath ();
-    SRAPath ( const SRAPath& );
-    SRAPath &operator = ( const SRAPath& );
-};
-
-#endif // _hpp_sra_srapath_
diff --git a/interfaces/sra/sraschema.h b/interfaces/sra/sraschema.h
deleted file mode 100644
index 428061c..0000000
--- a/interfaces/sra/sraschema.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_sraschema_
-#define _h_sra_sraschema_
-
-#ifndef _h_sra_extern_
-#include <sra/extern.h>
-#endif
-
-#ifndef _h_klib_callconv_
-#include <klib/callconv.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct SRAMgr;
-struct VSchema;
-struct VDBManager;
-
-
-/*--------------------------------------------------------------------------
- * SRASchema
- *  a schema object pre-loaded with default SRA schema
- */
-
-
-/* Make
- *  create an instance of the default SRA schema
- */
-SRA_EXTERN rc_t CC SRAMgrMakeSRASchema ( struct SRAMgr const *self, struct VSchema **schema );
-SRA_EXTERN rc_t CC VDBManagerMakeSRASchema ( struct VDBManager const *self, struct VSchema **schema );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_sraschema_ */
diff --git a/interfaces/sra/types.h b/interfaces/sra/types.h
deleted file mode 100644
index 5cfa126..0000000
--- a/interfaces/sra/types.h
+++ /dev/null
@@ -1,350 +0,0 @@
-/*=======================================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_types_
-#define _h_sra_types_
-
-#ifndef _h_sra_extern_
-#include <sra/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * logical intrinsics
- *  CS101 datatypes
- *
- *  logical types are intrinsic and have no signed property. they exist
- *  mainly to support bit manipulation operations. actual numeric types
- *  inherit their size and byte-swapping from logical types.
- */
-
-#define vdb_bit1_t          "B1"
-#define vdb_bit8_t          "B8"
-#define vdb_bit16_t        "B16"
-#define vdb_bit32_t        "B32"
-#define vdb_bit64_t        "B64"
-#define vdb_bit128_t      "B128"
-
-
-/*--------------------------------------------------------------------------
- * numeric types
- *  CS101 datatypes
- *
- *  in general, all numbers are named type + size in bits, where
- *  type = "U" for unsigned, "I" for signed, and "F" for floats.
- */
-
-#define vdb_uint1_t         "U1"       /* supertype "B1"      */
-#define vdb_int8_t          "I8"       /* supertype "B8"      */
-#define vdb_uint8_t         "U8"       /* supertype "B8"      */
-#define vdb_int16_t        "I16"       /* supertype "B16"     */
-#define vdb_uint16_t       "U16"       /* supertype "B16"     */
-#define vdb_int32_t        "I32"       /* supertype "B32"     */
-#define vdb_uint32_t       "U32"       /* supertype "B32"     */
-#define vdb_int64_t        "I64"       /* supertype "B64"     */
-#define vdb_uint64_t       "U64"       /* supertype "B64"     */
-#define vdb_int128_t      "I128"       /* supertype "B128"    */
-#define vdb_uint128_t     "U128"       /* supertype "B128"    */
-#define vdb_float32_t      "F32"       /* supertype "B32"     */
-#define vdb_float64_t      "F64"       /* supertype "B64"     */
-
-
-/*--------------------------------------------------------------------------
- * boolean
- */
-
-#define vdb_bool_t      "bool"          /* supertype "U8"     */
-
-
-/*--------------------------------------------------------------------------
- * character types
- */
-
-#define vdb_utf8_t      "utf8"          /* supertype "B8"     */
-#define vdb_utf16_t     "utf16"         /* supertype "B16"    */
-#define vdb_utf32_t     "utf32"         /* supertype "B32"    */
-#define vdb_ascii_t     "ascii"         /* supertype "utf8"   */
-
-
-/*--------------------------------------------------------------------------
- * INSDC types
- */
-#define insdc_fasta_t   "INSDC:dna:text"        /* supertype "ascii"  */
-#define insdc_csfasta_t "INSDC:color:text"      /* supertype "ascii"  */
-#define insdc_2na_t     "INSDC:2na:packed"      /* supertype "B1[2]"  */
-#define insdc_4na_t     "INSDC:4na:packed"      /* supertype "B1[4]"  */
-#define insdc_2cs_t     "INSDC:2cs:packed"      /* supertype "B1[2]"  */
-#define insdc_phred_t   "INSDC:quality:phred"   /* supertype "U8"     */
-#define insdc_logodds_t "INSDC:quality:log_odds"/* supertype "I8"     */
-
-
-/*--------------------------------------------------------------------------
- * NCBI types
- *  types common within NCBI.
- *
- *  partial byte sized types do not have a registered supertype,
- *  but are commented to indicate their size
- */
-
-#define ncbi_qual4_t    "NCBI:qual4"         /* supertype "I8[4]"  */
-#define ncbi_isamp1_t   "NCBI:isamp1"        /* supertype "I16"    */
-#define ncbi_isamp4_t   "NCBI:isamp4"        /* supertype "I16[4]" */
-#define ncbi_fsamp1_t   "NCBI:fsamp1"        /* supertype "F32"    */
-#define ncbi_fsamp4_t   "NCBI:fsamp4"        /* supertype "F32[4]" */
-
-
-/* alias names */
-#define ncbi_2na_t      insdc_2na_t
-#define ncbi_4na_t      insdc_4na_t
-#define ncbi_2cs_t      insdc_2cs_t
-#define ncbi_qual1_t    insdc_phred_t
-
-
-/*--------------------------------------------------------------------------
- * VTypedef
- *  used to describe properties of a type
- *
- *  when properly filled out, the structure indicates
- *  the 1-based runtime id of type, that of its supertype
- *  or 0 if none, the size in bits of type, the size in
- *  bits of the supertype ( or element type, when dim > 1 )
- *  and the vector dimension given when type was introduced,
- *  as well as whether the type is a signed numeric.
- *
- *  example: "typedef I8 NCBI:qual4 [ 4 ]" translates to:
- *    type_id   = runtime type id of NCBI:qual4
- *    super_id  = runtime type id of I8
- *    size      = 8
- *    dim       = 4
- *    sign      = true
- */
-typedef struct VTypedef VTypedef;
-struct VTypedef
-{
-    /* runtime type id */
-    uint32_t type_id;
-
-    /* supertype id */
-    uint32_t super_id;
-
-    /* size of type element */
-    bitsz_t type_size;
-
-    /* vector dimension */
-    uint32_t dim;
-
-    /* signed property */
-    uint32_t sign;
-};
-
-
-/* Sizeof
- *  returns the bit size of declared type
- *
- *  technically, this is self -> size * self -> dim.
- */
-/* bitsz_t VTypedefSizeof ( const VTypedef *self ); */
-#define VTypedefSizeof(T) ((bitsz_t)(((T)->type_size) * ((T)->dim)))
-
-
-/*--------------------------------------------------------------------------
- * VDatatypes
- */
-typedef struct VDatatypes VDatatypes;
-
-
-/* forward */
-struct VTypedecl;
-
-
-/* AddRef
- * Release
- */
-SRA_EXTERN rc_t CC VDatatypesAddRef ( const VDatatypes *self );
-SRA_EXTERN rc_t CC VDatatypesRelease ( const VDatatypes *self );
-
-
-/* RegisterOpaque
- * RegisterSubtype
- *  registers new datatypes
- *
- *  "newtype" [ IN ] - NUL terminated fully qualified type name
- *
- *  "supertype" [ IN ] and "dim" [ IN ] - NUL terminated fully
- *  qualified parent equivalency type and vector dimension
- *  -OR-
- *  "bits" [ IN ] - size in bits of element.
- *
- *  "byte_swap" [ IN, CONDITIONALLY NULL OKAY ] - a byte swapping function
- *  required when size > 8 and and integral multiple of 8.
- */
-#if 0
-SRA_EXTERN rc_t CC VDatatypesRegisterOpaque ( VDatatypes *self,
-    const char *newtype, uint16_t bits,
-    void ( CC * byte_swap ) ( void *elem ) );
-SRA_EXTERN rc_t CC VDatatypesRegisterSubtype ( VDatatypes *self,
-    const char *newtype, const char *supertype, uint16_t dim,
-    void ( CC * byte_swap ) ( void *elem ) );
-#endif
-
-/* DefineSubtype
- *  creates a subtype definition
- *
- *    typedef = [ 'typedef' ] <supertype> <typedecl>
- */
-#if 0
-SRA_EXTERN rc_t CC VDatatypesDefineSubtype ( VDatatypes *self,
-    const char *definition, ... );
-SRA_EXTERN rc_t CC VDatatypesVDefineSubtype ( VDatatypes *self,
-    const char *definition, va_list args );
-#endif
-
-/* ResolveTypedecl
- *  converts a typedecl string to type id and vector dimension
- *
- *  "resolved" [ OUT ] - resolved type declaration
- *
- *  "typedecl" [ IN ] - type declaration
- */
-SRA_EXTERN rc_t CC VDatatypesResolveTypedecl ( const VDatatypes *self,
-    struct VTypedecl *resolved, const char *typedecl, ... );
-SRA_EXTERN rc_t CC VDatatypesVResolveTypedecl ( const VDatatypes *self,
-    struct VTypedecl *resolved, const char *typedecl, va_list args );
-
-
-/* ResolveTypename
- *  convert a type id into its type definition
- *
- *  "resolved" [ OUT ] - resolved type definition
- *
- *  "typname" [ IN ] - NUL-terminated type name
- */
-SRA_EXTERN rc_t CC VDatatypesResolveTypename ( const VDatatypes *self,
-    VTypedef *resolved, const char *typname );
-
-
-/* ResolveTypeid
- *  convert a type id into its type definition
- *
- *  "resolved" [ OUT ] - resolved type definition
- *
- *  "type_id" [ IN ] - 1-based runtime type id
- */
-SRA_EXTERN rc_t CC VDatatypesResolveTypeid ( const VDatatypes *self,
-    VTypedef *resolved, uint32_t type_id );
-
-
-/* SizeofTypedecl
- *  returns the bit size of type declaration
- */
-SRA_EXTERN rc_t CC VDatatypesSizeofTypedecl ( const VDatatypes *self,
-    bitsz_t *type_size, struct VTypedecl const *td );
-
-
-/* SizeofTypeid
- *  returns the bit size of typeid
- *
- *  "type_size" [ OUT ] - bit size of a type
- *
- *  "type_id" [ IN ] - numerical index of a type
- *
- *  "all_elements" [ IN ] - for multi-dimesional types
- *  return the sum of sizes, otherwise - only for a single element
- */
-SRA_EXTERN rc_t CC VDatatypesSizeofTypeid ( const VDatatypes *self,
-    bitsz_t *type_size, uint32_t type_id, bool all_elements );
-
-
-/* MakeTypedecl
- *  convert a VTypedecl into canonical text
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - output buffer for
- *  NUL terminated type declaration string
- *
- *  "typedecl" [ IN ] - binary representation of typedecl
- */
-SRA_EXTERN rc_t CC VDatatypesMakeTypedecl ( const VDatatypes *self,
-    char *buffer, size_t bsize, struct VTypedecl const *typedecl );
-
-
-/* ToSupertype
- *  cast a typedecl to a size-equivalent supertype decl
- *  returns not-found and leaves "typedecl" unchanged
- *  if no supertype exists
- *
- *  "typedecl" [ IN, OUT ] - populated with a correct
- *  type id and vector dimension on input, will be updated
- *  to contain a supertype and equivalent dimension on
- *  output. e.g.:
- *
- *    IN -  { type_id NCBI:qual4, dim 1 }
- *    OUT - { type_id I8, dim 4 }
- */
-SRA_EXTERN rc_t CC VDatatypesToSupertype ( const VDatatypes *self, struct VTypedecl *typedecl );
-
-
-/* ToIntrinsic
- *  cast a typedecl ( if necessary ) to a size-equivalent
- *  intrinsic typedecl.
- *
- *  returns not-found and leaves "typedecl" unchanged
- *  if no intrinsic supertype exists
- *
- *  leaves "typedecl" unchanged if it is already intrinsic.
- *
- *  "typedecl" [ IN, OUT ] - populated with a correct
- *  type id and vector dimension on input, will be updated
- *  to contain a supertype and equivalent dimension on
- *  output. e.g.:
- *
- *    IN -  { type_id NCBI:qual4, dim 1 }
- *    OUT - { type_id I8, dim 4 }
- */
-SRA_EXTERN rc_t CC VDatatypesToIntrinsic ( const VDatatypes *self, struct VTypedecl *typedecl );
-
-
-/* ToAncestor
- *  cast a typedecl to a size-equivalent ancestor decl
- *  returns true if cast can be performed
- */
-SRA_EXTERN bool CC VDatatypesToAncestor ( const VDatatypes *self,
-    struct VTypedecl const *to, struct VTypedecl const *from );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_sra_types_ */
diff --git a/interfaces/sra/wsradb.h b/interfaces/sra/wsradb.h
deleted file mode 100644
index 70baa6b..0000000
--- a/interfaces/sra/wsradb.h
+++ /dev/null
@@ -1,242 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_wsradb_
-#define _h_sra_wsradb_
-
-#ifndef _h_sra_extern_
-#include <sra/extern.h>
-#endif
-
-#ifndef _h_sra_sradb_
-#include <sra/sradb.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct VSchema;
-struct KDirectory;
-
-
-/*--------------------------------------------------------------------------
- * SRAMgr
- *  opaque handle to SRA library
- */
-
-
-/* MakeUpdate
- *  create library handle for read/write access
- *
- *  "wd" [ IN, NULL OKAY ] - optional working directory for
- *  accessing the file system. mgr will attach its own reference.
- *
- *  NB - not implemented in read-only library,
- *  and the read-only library may not be mixed with read/write
- */
-SRA_EXTERN rc_t CC SRAMgrMakeUpdate ( SRAMgr **mgr, struct KDirectory *wd );
-
-
-/* SetMD5Mode
- *  sets default MD5 file mode for all objects
- *  opened for update under manager
- */
-SRA_EXTERN rc_t CC SRAMgrSetMD5Mode ( SRAMgr *self, bool useMD5 );
-
-
-/* Lock
- *  apply lock
- *
- *  if object is already locked, the operation is idempotent
- *  and returns an rc state of rcLocked
- *
- *  "path" [ IN ] - NUL terminated path
- */
-SRA_EXTERN rc_t CC SRAMgrLock ( SRAMgr *self, const char *path, ... );
-SRA_EXTERN rc_t CC SRAMgrVLock ( SRAMgr *self, const char *path, va_list args );
-
-
-/* Unlock
- *  remove lock
- *
- *  if object is already unlocked, the operation is idempotent
- *  and returns an rc state of rcUnlocked
- *
- *  "path" [ IN ] - NUL terminated path
- */
-SRA_EXTERN rc_t CC SRAMgrUnlock ( SRAMgr *self, const char *path, ... );
-SRA_EXTERN rc_t CC SRAMgrVUnlock ( SRAMgr *self, const char *path, va_list args );
-
-
-/* DropTable
- *  drop an existing table
- *
- *  "force" [ IN ] - if true, make every attempt to remove table
- *
- *  "path" [ IN ]  - NUL terminated table name
- */
- SRA_EXTERN rc_t CC SRAMgrDropTable ( SRAMgr *self, bool force, const char *path, ... );
- SRA_EXTERN rc_t CC SRAMgrVDropTable ( SRAMgr *self, bool force, const char *path, va_list args );
-
-
-/*--------------------------------------------------------------------------
- * SRATable
- *  a collection of spots with several data series, minimally including
- *  base or color calls and their quality ( confidence ) values, and
- *  optionally signal-related values ( signal, intensity, noise, ... ).
- */
-
-/* Create
- *  creates a new table
- *
- *  "tbl" [ OUT ] - return parameter for table
- *
- *  "typespec" [ IN ] - type and optionally version of table schema,
- *  e.g. 'MY_NAMESPACE:MyTable' or 'MY_NAMESPACE:MyTable#1.1'
- *
- *  "path" [ IN ] - NUL terminated table name
- */
-SRA_EXTERN rc_t CC SRAMgrCreateTable ( SRAMgr *self, SRATable **tbl,
-    const char *typespec, const char *path, ... );
-SRA_EXTERN rc_t CC SRAMgrVCreateTable ( SRAMgr *self, SRATable **tbl,
-    const char *typespec, const char *path, va_list args );
-
-
-/* OpenUpdate
- *  open an existing table
- *
- *  "run" [ OUT ] - return parameter for table
- *
- *  "path" [ IN ] - NUL terminated table name
- */
-SRA_EXTERN rc_t CC SRAMgrOpenTableUpdate ( SRAMgr *self,
-    SRATable **tbl, const char *path, ... );
-SRA_EXTERN rc_t CC SRAMgrVOpenTableUpdate ( SRAMgr *self,
-    SRATable **tbl, const char *path, va_list args );
-
-
-/* NewSpot
- *  creates a new spot record, returns spot id.
- *
- *  "id" [ OUT ] - return parameter for id of newly created spot
- */
-SRA_EXTERN rc_t CC SRATableNewSpot ( SRATable *self, spotid_t *id );
-
-
-/* OpenSpot
- *  opens an existing spot record from id
- *
- *  "id" [ IN ] - 1-based spot id
- */
-SRA_EXTERN rc_t CC SRATableOpenSpot ( SRATable *self, spotid_t id );
-
-
-/* CloseSpot
- *  closes a spot opened with either NewSpot or OpenSpot
- */
-SRA_EXTERN rc_t CC SRATableCloseSpot ( SRATable *self );
-
-
-/* Commit
- *  commit all changes
- */
-SRA_EXTERN rc_t CC SRATableCommit ( SRATable *self );
-
-
-/* OpenColumnWrite
- *  open a column for write
- *
- *  "idx" [ OUT ] - return parameter for 1-based column index.
- *
- *  "col" [ OUT, NULL OKAY ] - optional return parameter for
- *  newly opened column.
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving column name
- *
- *  "datatype" [ IN ] - NUL terminated string in ASCII
- *   describing fully qualified column data type
- */
-SRA_EXTERN rc_t CC SRATableOpenColumnWrite ( SRATable *self, uint32_t *idx,
-    SRAColumn **col, const char *name, const char *datatype );
-
-
-/* SetIdxColumnDefault
- *  give a default value for column
- *
- *  if no value gets written to a column within an open spot,
- *  this value is substituted.
- *
- *  "idx" [ IN ] - 1-based column index
- *
- *  "base" [ IN ] and "offset" [ IN ] - pointer and bit offset
- *  to start of row data
- *
- *  "size" [ IN ] - size in bits of row data
- */
-SRA_EXTERN rc_t CC SRATableSetIdxColumnDefault ( SRATable *self, uint32_t idx,
-    const void *base, bitsz_t offset, bitsz_t size );
-
-
-/* WriteIdxColumn
- *  write row data to an indexed column
- *
- *  "idx" [ IN ] - 1-based column index
- *
- *  "base" [ IN ] and "offset" [ IN ] - pointer and bit offset
- *  to start of row data
- *
- *  "size" [ IN ] - size in bits of row data
- */
-SRA_EXTERN rc_t CC SRATableWriteIdxColumn ( SRATable *self, uint32_t idx,
-    const void *base, bitsz_t offset, bitsz_t size );
-
-
-/* MetaFreeze
- *  freezes current metadata revision
- *  further modification will begin on a copy
- */
-SRA_EXTERN rc_t CC SRATableMetaFreeze ( SRATable *self );
-
-
-/* OpenMDataNode
- *  open a metadata node
- */
-SRA_EXTERN rc_t CC SRATableOpenMDataNodeUpdate ( SRATable *self,
-    struct KMDataNode **node, const char *path, ... );
-SRA_EXTERN rc_t CC SRATableVOpenMDataNodeUpdate ( SRATable *self,
-    struct KMDataNode **node, const char *path, va_list args );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_wsradb_ */
diff --git a/interfaces/sra/wsradb.hpp b/interfaces/sra/wsradb.hpp
deleted file mode 100644
index cd69111..0000000
--- a/interfaces/sra/wsradb.hpp
+++ /dev/null
@@ -1,591 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_sra_wsradb_
-#define _hpp_sra_wsradb_
-
-#ifdef _hpp_sra_sradb_
-#error "read and update libraries are mutually exclusive"
-#endif
-
-#ifndef _h_sra_wsradb_
-#include <sra/wsradb.h>
-#endif
-
-
-/*--------------------------------------------------------------------------
- * SRAMgr
- *  opaque handle to SRA library
- */
-struct SRAMgr
-{
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef () const throw()
-    { return SRAMgrAddRef ( this ); }
-
-    inline rc_t Release () const throw()
-    { return SRAMgrRelease ( this ); }
-
-
-    /* Make
-     *  create library handle for read/write access
-     *
-     *  NB - not implemented in read-only library,
-     *  and the read-only library may not be mixed with read/write
-     */
-    static inline rc_t Make ( SRAMgr **mgr, struct KDirectory *wd = 0 )  throw()
-    { return SRAMgrMakeUpdate ( mgr, wd ); }
-
-
-
-    /* SetMD5Mode
-     *  sets default MD5 file mode for all objects
-     *  opened for update under manager
-     */
-    inline rc_t SetMD5Mode ( bool useMD5 )  throw()
-    { return SRAMgrSetMD5Mode ( this, useMD5 ); }
-
-
-    /* Lock
-     *  apply lock
-     *
-     *  if table is already locked, the operation is idempotent
-     *  and returns an rc state of rcLocked
-     *
-     *  "path" [ IN ] - NUL terminated table path
-     */
-    inline rc_t Lock ( const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = SRAMgrVLock ( this, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t Lock ( const char *path, va_list args ) throw()
-    { return SRAMgrVLock ( this, path, args ); }
-
-
-    /* Unlock
-     *  remove lock
-     *
-     *  if table is already unlocked, the operation is idempotent
-     *  and returns an rc state of rcUnlocked
-     *
-     *  "path" [ IN ] - NUL terminated table path
-     */
-    inline rc_t SRAMgrUnlock ( SRAMgr *self, const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = SRAMgrVUnlock ( this, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t SRAMgrUnlock ( SRAMgr *self, const char *path, 
-        va_list args ) throw()
-    { return SRAMgrVUnlock ( this, path, args ); }
-
-
-    /* DropTable
-     *  drop an existing table
-     *
-     *  "force" [ IN ] - if true, make every attempt to remove table
-     *
-     *  "path" [ IN ]  - NUL terminated table name
-     */
-    inline rc_t DropTable ( bool force, const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = SRAMgrVDropTable ( this, force, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t DropTable ( bool force, const char *path, va_list args ) throw()
-    { return SRAMgrVDropTable ( this, force, path, args ); }
-
-
-    /* OpenDatatypes
-     *  open datatype registry object for requested access
-     *  see <vdb/types.hpp> for VDatatypes
-     *
-     *  "dt" [ OUT ] - return parameter for datatypes object
-     */
-    inline rc_t OpenDatatypes ( struct VDatatypes const **dt ) const throw()
-    { return SRAMgrOpenDatatypesRead ( this, dt ); }
-
-
-    /* GetSchema
-     *  get a reference to the schema used to create new tables
-     *
-     *  "schema" [ OUT ] - return parameter for reference to SRA schema
-     *
-     * NB - returns a new reference that must be released via VSchemaRelease
-     */
-    inline rc_t GetSchemaRead ( struct VSchema const **schema ) const throw()
-    { return SRAMgrGetSchemaRead ( this, schema ); }
-
-
-    /* UseSchema
-     *  allows SRA schema to be entirely replaced
-     *  affects creation/update of all subsequent tables
-     *
-     *  "schema" [ IN ] - new schema to be applied
-     *
-     * NB - manager will attach a new reference to schema object,
-     *  you are still responsible for releasing it via VSchemaRelease
-     */
-    inline rc_t UseSchemaRead ( struct VSchema const *schema ) const throw()
-    { return SRAMgrUseSchemaRead ( this, schema ); }
-
-
-    /* Writable
-     *  returns 0 if table is writable
-     *  rcLocked if locked, rcReadonly if read-only
-     *  other code upon error
-     *
-     *  "path" [ IN ] - NUL terminated table path
-     */
-    inline bool Writable ( const char *path, ... ) const throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        bool locked = SRAMgrVWritable ( this, path, args );
-        va_end ( args );
-        return locked;
-    }
-    inline bool Writable ( const char *path, va_list args ) const throw()
-    { return SRAMgrVWritable ( this, path, args ); }
-
-    /* Create
-     *  creates a new table
-     *
-     *  "tbl" [ OUT ] - return parameter for table
-     *
-     *  "typespec" [ IN ] - type and optionally version of table schema,
-     *  e.g. 'MY_NAMESPACE:MyTable' or 'MY_NAMESPACE:MyTable#1.1'
-     *
-     *  "path" [ IN ] - NUL terminated table name
-     */
-    inline rc_t CreateTable ( SRATable **tbl, const char *typespec,
-        const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = SRAMgrVCreateTable ( this, tbl, typespec, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t CreateTable ( SRATable **tbl, const char *typespec,
-        const char *path, va_list args ) throw()
-    { return SRAMgrVCreateTable ( this, tbl, typespec, path, args ); }
-
-
-    /* OpenTable
-     *  open an existing table for read
-     *
-     *  "tbl" [ OUT ] - return parameter for table
-     *
-     *  "path" [ IN ] - NUL terminated run name
-     */
-    inline rc_t OpenTable ( const SRATable **tbl,
-        const char *path, ... ) const throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = SRAMgrVOpenTableRead ( this, tbl, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenTable ( const SRATable **tbl, const char *path,
-        va_list args ) const throw()
-    { return SRAMgrVOpenTableRead ( this, tbl, path, args ); }
-
-
-    inline rc_t OpenTable ( SRATable **tbl, const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = SRAMgrVOpenTableUpdate ( this, tbl, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenTable ( SRATable **tbl, const char *path, va_list args ) throw()
-    { return SRAMgrVOpenTableUpdate ( this, tbl, path, args ); }
-
-
-private:
-    SRAMgr ();
-    ~ SRAMgr ();
-    SRAMgr ( const SRAMgr& );
-    SRAMgr &operator = ( const SRAMgr& );
-};
-
-
-/*--------------------------------------------------------------------------
- * SRATable
- *  a collection of spots with several data series, minimally including
- *  base or color calls and their quality ( confidence ) values, and
- *  optionally signal-related values ( signal, intensity, noise, ... ).
- */
-struct SRATable
-{
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef () const throw()
-    { return SRATableAddRef ( this ); }
-
-    inline rc_t Release () const throw()
-    { return SRATableRelease ( this ); }
-
-
-    /* Locked
-     *  returns true if locked
-     */
-    inline bool Locked () const throw()
-    { return SRATableLocked ( this ); }
-
-
-    /* BaseCount
-     *  get the number of stored bases
-     *
-     *  "num_bases" [ OUT ] - return parameter for base count
-     */
-    inline rc_t BaseCount ( uint64_t *num_bases ) const throw()
-    { return SRATableBaseCount ( this, num_bases ); }
-
-
-    /* SpotCount
-     *  get the number of stored spots
-     *
-     *  "spot_count" [ OUT ] - return parameter for spot count
-     */
-    inline rc_t SpotCount ( uint64_t *spot_count ) const throw()
-    { return SRATableSpotCount ( this, spot_count ); }
-
-
-    /* MaxSpotId
-     *  returns the maximum spot id
-     *
-     *  a table will contain a collection of spots with ids from
-     *  min to max ( spot_id ).
-     *
-     *  "id" [ OUT ] - return parameter of last spot id
-     */
-    inline rc_t MaxSpotId ( spotid_t *id ) const throw()
-    { return SRATableMaxSpotId ( this, id ); }
-
-    /* MinSpotId
-     *  returns the minimum spot id
-     *
-     *  a table will contain a collection of spots with ids from
-     *  min to max ( spot_id ).
-     *
-     *  "id" [ OUT ] - return parameter of last spot id
-     */
-    inline rc_t MinSpotId ( spotid_t *id ) const throw()
-    { return SRATableMinSpotId ( this, id ); }
-
-    /* GetSpotId
-     *  project a spot id from a spot name
-     *
-     *  "id" [ OUT ] - return parameter for 1-based spot id
-     *
-     *  "spot_name" [ IN ] - external spot name string
-     */
-    inline rc_t GetSpotId ( spotid_t *id, const char *spot_name ) const throw()
-    { return SRATableGetSpotId ( this, id, spot_name ); }
-
-
-    /* NewSpot
-     *  creates a new spot record, returning spot id.
-     *
-     *  "id" [ OUT ] - return parameter for id of newly created spot
-     */
-    inline rc_t NewSpot ( spotid_t *id ) throw()
-    { return SRATableNewSpot ( this, id ); }
-
-
-    /* OpenSpot
-     *  opens an existing spot record from id
-     *
-     *  "id" [ IN ] - 1-based spot id
-     */
-    inline rc_t OpenSpot ( spotid_t id ) throw()
-    { return SRATableOpenSpot ( this, id ); }
-
-
-    /* CloseSpot
-     *  closes a spot opened with either NewSpot or OpenSpot
-     */
-    inline rc_t CloseSpot () throw()
-    { return SRATableCloseSpot ( this ); }
-
-
-    /* Commit
-     *  commit all changes
-     */
-    inline rc_t Commit () throw()
-    { return SRATableCommit ( this ); }
-
-
-    /* ListCol
-     *  returns a list of column names
-     *
-     *  "names" [ out ] - return parameter for names list
-     */
-    inline rc_t ListCol ( SRANamelist **names ) const throw()
-    { return SRATableListCol ( this, names ); }
-
-
-    /* ColDatatypes
-     *  returns list of typedecls for named column
-     *
-     *  "col" [ IN ] - column name
-     *
-     *  "dflt_idx" [ OUT, NULL OKAY ] - returns the zero-based index
-     *  into "typedecls" of the default datatype for the named column
-     *
-     *  "typedecls" [ OUT ] - list of datatypes available for named column
-     */
-    inline rc_t ColDatatypes ( const char *col,
-        uint32_t *dflt_idx, SRANamelist **typedecls ) const throw()
-    { return SRATableColDatatypes ( this, col, dflt_idx, typedecls ); }
-
-
-    /* OpenColumn
-     *  open a column for read
-     *
-     *  "col" [ OUT ] - return parameter for newly opened column
-     *
-     *  "name" [ IN ] - NUL terminated string in UTF-8 giving column name
-     *
-     *  "datatype" [ IN - NULL OKAY ] - optional NUL terminated
-     *   string describing fully qualified column data type in ASCII
-     */
-    inline rc_t OpenColumn ( const SRAColumn **col,
-        const char *name, const char *datatype = 0 ) const throw()
-    { return SRATableOpenColumnRead ( this, col, name, datatype ); }
-
-
-    /* OpenColumn
-     *  open a column for write
-     *
-     *  "idx" [ OUT ] - return parameter for 1-based column index.
-     *
-     *  "col" [ OUT, NULL OKAY ] - optional return parameter for
-     *  newly opened column.
-     *
-     *  "name" [ IN ] - NUL terminated string in UTF-8 giving column name
-     *
-     *  "datatype" [ IN ] - NUL terminated string in ASCII
-     *   describing fully qualified column data type
-     */
-    inline rc_t OpenColumn ( uint32_t *idx, SRAColumn **col,
-        const char *name, const char *datatype ) throw()
-    { return SRATableOpenColumnWrite ( this, idx, col, name, datatype ); }
-
-
-    /* SetIdxColumnDefault
-     *  give a default value for column
-     *
-     *  if no value gets written to a column within an open spot,
-     *  this value is substituted.
-     *
-     *  "idx" [ IN ] - 1-based column index
-     *
-     *  "base" [ IN ] and "offset" [ IN ] - pointer and bit offset
-     *  to start of row data
-     *
-     *  "size" [ IN ] - size in bits of row data
-     */
-    inline rc_t SetIdxColumnDefault ( uint32_t idx,
-        const void *base, bitsz_t offset, bitsz_t size ) throw()
-    { return SRATableSetIdxColumnDefault ( this, idx, base, offset, size ); }
-
-
-    /* WriteIdxColumn
-     *  write row data to an indexed column
-     *
-     *  "idx" [ IN ] - 1-based column index
-     *
-     *  "base" [ IN ] and "offset" [ IN ] - pointer and bit offset
-     *  to start of row data
-     *
-     *  "size" [ IN ] - size in bits of row data
-     */
-    inline rc_t WriteIdxColumn ( uint32_t idx,
-        const void *base, bitsz_t offset, bitsz_t size ) throw()
-    { return SRATableWriteIdxColumn ( this, idx, base, offset, size ); }
-
-
-    /* MetaRevision
-     *  returns current revision number
-     *  where 0 ( zero ) means tip
-     */
-    inline rc_t MetaRevision ( uint32_t *revision ) const throw()
-    { return SRATableMetaRevision ( this, revision ); }
-
-
-    /* MaxRevision
-     *  returns the maximum revision available
-     */
-    inline rc_t MaxMetaRevision ( uint32_t *revision ) const throw()
-    { return SRATableMaxMetaRevision ( this, revision ); }
-
-
-    /* UseMetaRevision
-     *  opens indicated revision of metadata
-     *  all non-zero revisions are read-only
-     */
-    inline rc_t UseMetaRevision ( uint32_t revision ) const throw()
-    { return SRATableUseMetaRevision ( this, revision ); }
-
-
-    /* MetaFreeze
-     *  freezes current metadata revision
-     *  further modification will begin on a copy
-     */
-    inline rc_t MetaFreeze () throw()
-    { return SRATableMetaFreeze ( this ); }
-
-
-    /* OpenMDataNode
-     *  open a metadata node
-     *
-     *  "node" [ OUT ] - return parameter for metadata node
-     *
-     *  "path" [ IN ] - simple or hierarchical NUL terminated
-     *  path to node
-     */
-    inline rc_t OpenMDataNode ( struct KMDataNode const **node,
-        const char *path, ... ) const throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = SRATableVOpenMDataNodeRead ( this, node, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenMDataNode ( struct KMDataNode const **node,
-        const char *path, va_list args ) const throw()
-    { return SRATableVOpenMDataNodeRead ( this, node, path, args ); }
-
-    inline rc_t OpenMDataNode ( struct KMDataNode **node,
-        const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = SRATableVOpenMDataNodeUpdate ( this, node, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenMDataNode ( struct KMDataNode **node,
-        const char *path, va_list args ) throw()
-    { return SRATableVOpenMDataNodeUpdate ( this, node, path, args ); }
-
-
-private:
-    SRATable ();
-    ~ SRATable ();
-    SRATable ( const SRATable& );
-    SRATable &operator = ( const SRATable& );
-};
-
-
-/*--------------------------------------------------------------------------
- * SRAColumn
- *  represents a spot data column, where the column is configured as
- *  a sequence of blobs, and each blob is a sequence of records,
- *  indexed by spot id.
- */
-struct SRAColumn
-{
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef () const throw()
-    { return SRAColumnAddRef ( this ); }
-
-    inline rc_t Release () const throw()
-    { return SRAColumnRelease ( this ); }
-
-
-    /* Datatype
-     *  access data type
-     *
-     *  "type" [ OUT, NULL OKAY ] - returns the column type declaration
-     *
-     *  "def" [ OUT, NULL OKAY ] - returns the definition of the type
-     *  returned in "type_decl"
-     *
-     * NB - one of "type" and "def" must be non-NULL
-     */
-    inline int Datatype ( struct VTypedecl *type,
-        struct VTypedef *def ) const throw()
-    { return SRAColumnDatatype ( this, type, def ); }
-
-
-    /* GetRange
-     *  get a contiguous range around a spot id, e.g. tile for Illumina
-     *
-     *  "id" [ IN ] - return parameter for 1-based spot id
-     *
-     *  "first" [ OUT, NULL OKAY ] and "last" [ OUT, NULL OKAY ] -
-     *  id range is returned in these output parameters, where
-     *  at least ONE must be NOT-NULL
-     */
-    inline rc_t GetRange ( spotid_t id, spotid_t *first,
-        spotid_t *last ) const throw()
-    { return SRAColumnGetRange ( this, id, first, last ); }
-
-
-    /* Read
-     *  read row data
-     *
-     *  "id" [ IN ] - spot row id between 1 and max ( spot id )
-     *
-     *  "base" [ OUT ] and "offset" [ OUT ] - pointer and bit offset
-     *  to start of spot row data.
-     *
-     *  "size" [ OUT ] - size in bits of row data
-     */
-    inline rc_t Read ( spotid_t id,
-        const void **base, bitsz_t *offset, bitsz_t *size ) const throw()
-    { return SRAColumnRead ( this, id, base, offset, size ); }
-
-private:
-    SRAColumn ();
-    ~ SRAColumn ();
-    SRAColumn ( const SRAColumn& );
-    SRAColumn &operator = ( const SRAColumn& );
-};
-
-#endif // _hpp_sra_sradb_
diff --git a/interfaces/svdb/extern.h b/interfaces/svdb/extern.h
deleted file mode 100644
index 6a8b940..0000000
--- a/interfaces/svdb/extern.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_svdb_extern_
-#define _h_svdb_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define SVDB_EXTERN MOD_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define SVDB_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#if defined _MSC_VER && ! defined _STATIC
-#define MOD_EXPORT __declspec ( dllexport )
-#else
-#define MOD_EXPORT
-#endif
-
-#endif /* _h_svdb_extern_ */
diff --git a/interfaces/svdb/svdb.h b/interfaces/svdb/svdb.h
deleted file mode 100644
index 3f12d2e..0000000
--- a/interfaces/svdb/svdb.h
+++ /dev/null
@@ -1,531 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_svdb_
-#define _h_svdb_
-
-#ifndef _h_svdb_extern_
-#include <svdb/extern.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ALL_COLUMNS 0
-#define STATIC_COLUMNS 1
-#define NON_STATIC_COLUMNS 2
-#define VISIBLE_COLUMNS 3
-#define NON_VISIBLE_COLUMNS 4
-
-/*****************************************************************************
-    (1)
-    translate an accession into a path ( if possible )
-
-    returns:    NULL, if accession is not an accession
-                path, if the accession is an accession
-
-    ! path has to be free'd by caller !
-*/
-SVDB_EXTERN const char * CC svdb_accession_2_path( const char * accession );
-
-
-/*****************************************************************************
-    (2)
-    opens a vdb-object by path ( an accession has to be translated into a path )
-
-    returns:    NULL,   if path cannot be opened
-                handle, if the path can be opened ( as db or as table )
-
-    ! handle has to be closed by caller with svdb_close() !
-*/
-SVDB_EXTERN void * CC svdb_open_path( const char * path );
-
-
-/*****************************************************************************
-    (3)
-    closes an open vdb-object
-
-    ! NULL ptr will be ignored !
-*/
-SVDB_EXTERN void CC svdb_close( void * self );
-
-
-/*****************************************************************************
-    (4)
-    returns the last error as plain-text if one occured
-
-    ! NULL ptr will be ignored !
-    returns empty string if no error occured or self == NULL
-*/
-SVDB_EXTERN const char * CC svdb_last_err( void );
-
-
-/*****************************************************************************
-    (5)
-    returns if the svdb-object is a database
-
-    ! NULL ptr will be ignored !
-*/
-SVDB_EXTERN int CC svdb_is_db( void * self );
-
-
-/*****************************************************************************
-    (6)
-    returns how many tables are if the svdb-object
-
-    ! NULL ptr will be ignored !
-*/
-SVDB_EXTERN int CC svdb_count_tabs( void * self );
-
-
-/*****************************************************************************
-    (7)
-    returns the name of a table, indexed by tab_id
-
-    ! NULL ptr in self will be ignored !
-    ! returns NULL if tab_id is out of bounds !
-*/
-SVDB_EXTERN const char * CC svdb_tabname( void * self, const int tab_id );
-
-
-/*****************************************************************************
-    (8)
-    returns the index of a table, found by name-lookup
-
-    ! NULL ptr in self will be ignored !
-    ! returns -1 if the given name is not in the svdb-object !
-*/
-SVDB_EXTERN int CC svdb_tab_idx( void * self, const char * name );
-
-
-/*****************************************************************************
-    (9)
-    returns how many columns a table has
-
-    ! NULL ptr in self will be ignored !
-    ! returns 0 if tab_id is out of bounds !
-*/
-SVDB_EXTERN int CC svdb_count_cols( void * self, const int tab_id,
-            const int selection );
-
-
-/*****************************************************************************
-    (10)
-    returns the name of a column in a table
-
-    ! NULL ptr in self will be ignored !
-    ! returns NULL if tab_id/col_id is out of bounds !
-*/
-SVDB_EXTERN const char * CC svdb_colname( void * self, const int tab_id,
-            const int selection, const int col_id );
-
-
-/*****************************************************************************
-    (11)
-    returns the index of a column in a table, found by name-lookup
-
-    ! NULL ptr in self will be ignored !
-    ! returns -1 if tab_id is out of bounds !
-    ! returns -1 if the given name is not in the svdb-object !
-*/
-SVDB_EXTERN int CC svdb_col_idx( void * self, const int tab_id,
-            const int selection, const char * name );
-
-
-/*****************************************************************************
-    (12)
-    changes the visibility of a column
-
-    ! NULL ptr in self will be ignored !
-    ! returns 0 if tab_id or col_id is out of bounds !
-    ! returns 1 if suceessful !
-*/
-SVDB_EXTERN int CC svdb_set_column_visibility( void * self, const int tab_id,
-            const int selection, const int col_id, const int visible );
-
-
-/*****************************************************************************
-    (13)
-    returns the index of the default-type of a column in a table
-
-    ! NULL ptr in self will be ignored !
-    ! returns -1 if tab_id/col_id is out of bounds !
-*/
-SVDB_EXTERN int CC svdb_dflt_type_idx( void * self, const int tab_id,
-            const int selection, const int col_id );
-
-
-/*****************************************************************************
-    (14)
-    returns how many types a column in a table has
-
-    ! NULL ptr in self will be ignored !
-    ! returns 0 if tab_id/col_id is out of bounds !
-*/
-SVDB_EXTERN int CC svdb_count_types( void * self, const int tab_id,
-            const int selection, const int col_id );
-
-
-/*****************************************************************************
-    (15)
-    returns the name of the type of a column in a table
-
-    ! NULL ptr in self will be ignored !
-    ! returns NULL if tab_id/col_id/type_id is out of bounds !
-*/
-SVDB_EXTERN const char * CC svdb_typename( void * self, const int tab_id,
-            const int selection, const int col_id, const int type_id );
-
-
-/*****************************************************************************
-    (16)
-    returns the index of a type in a column/table, found by name-lookup
-
-    ! NULL ptr in self will be ignored !
-    ! returns -1 if tab_id/col_id is out of bounds !
-    ! returns -1 if the given type is not a type of this column !
-*/
-SVDB_EXTERN int CC svdb_type_idx( void * self, const int tab_id,
-            const int selection, const int col_id, const char * name );
-
-
-/*****************************************************************************
-    (17)
-    returns the domain-id of a type of a column in a table
-
-    ! NULL ptr in self will be ignored !
-    ! returns -1 if tab_id/col_id/type_id is out of bounds !
-*/
-SVDB_EXTERN int CC svdb_typedomain( void * self, const int tab_id,
-            const int selection, const int col_id, const int type_id );
-
-
-/*****************************************************************************
-    (18)
-    returns the bitsize of a type of a column in a table
-
-    ! NULL ptr in self will be ignored !
-    ! returns -1 if tab_id/col_id/type_id is out of bounds !
-*/
-SVDB_EXTERN int CC svdb_typebits( void * self, const int tab_id,
-            const int selection, const int col_id, const int type_id );
-
-
-/*****************************************************************************
-    (19)
-    returns the dimensionality of a type of a column in a table
-
-    ! NULL ptr in self will be ignored !
-    ! returns -1 if tab_id/col_id/type_id is out of bounds !
-*/
-SVDB_EXTERN int CC svdb_typedim( void * self, const int tab_id,
-            const int selection, const int col_id, const int type_id );
-
-
-/*****************************************************************************
-    (20)
-    opens a table of a svdb-object
-
-    ! NULL ptr in self will be ignored !
-    ! returns -1 if tab_id is out of bounds !
-    NULL or empty string as defline opens all readable columns without a cast
-    defline = "READ,QUALITY" opens only these 2 columns (if the table has them)
-    defline = "(INSDC:2na:bin)READ" opens columns with a cast
-*/
-SVDB_EXTERN int CC svdb_open_table( void * self, const int tab_id,
-            const char *defline );
-
-
-/*****************************************************************************
-    (21)
-    returns the length of the longest column-name that is enabled
-
-    ! NULL ptr in self will be ignored !
-    ! returns 0 if tab_id is out of bounds !
-*/
-SVDB_EXTERN int CC svdb_max_colname_length( void * self, const int tab_id,
-            const int selection );
-
-
-/*****************************************************************************
-    (22)
-    sets the element-separator-string
-
-    ! NULL ptr in self will be ignored !
-    tab_id = -1 ... for all tables
-    col_id = -1 ... for all columns
-    s      = separator-string to set
-*/
-SVDB_EXTERN void CC svdb_set_elem_separator( void * self, const int tab_id,
-            const int selection, const int col_id, const char * s );
-
-
-/*****************************************************************************
-    (23)
-    sets the dimension-separator-string
-
-    ! NULL ptr in self will be ignored !
-    tab_id = -1 ... for all tables
-    col_id = -1 ... for all columns
-    s      = separator-string to set
-*/
-SVDB_EXTERN void CC svdb_set_dim_separator( void * self, const int tab_id,
-            const int selection, const int col_id, const char * s );
-
-
-/*****************************************************************************
-    (24)
-    returns if a column is enabled...
-
-    ! NULL ptr in self will be ignored !
-*/
-SVDB_EXTERN int CC svdb_is_enabled( void * self, const int tab_id,
-            const int selection, const int col_id );
-
-
-/*****************************************************************************
-    (25)
-    returns how many rows a table has
-
-    ! NULL ptr in self will be ignored !
-    ! returns 0 if tab_id is out of bounds !
-*/
-SVDB_EXTERN unsigned long long int CC svdb_row_range( void * self,
-            const int tab_id );
-
-
-/*****************************************************************************
-    (26)
-    returns the offset of the first row ( offset to zero )
-
-    ! NULL ptr in self will be ignored !
-    ! returns 0 if tab_id is out of bounds !
-*/
-SVDB_EXTERN signed long long int CC svdb_first_row( void * self,
-            const int tab_id );
-
-
-/*****************************************************************************
-    (27)
-    returns a data-cell as text
-
-    ! NULL ptr in self/buf will be ignored !
-    ! returns 0 if tab_id, col_id, row is out of bounds !
-    returns the numbers of characters written into buf, if successful
-*/
-SVDB_EXTERN int CC svdb_cell( void * self, char * buf, int buflen,
-            const int tab_id, const int selection, const int col_id,
-            const unsigned long long int row );
-
-
-/*****************************************************************************
-    (28/29)
-    returns the row-number of the row where the pattern was found in col
-
-    ! NULL ptr in self/pattern will be ignored !
-    ! returns 0xFFFFFFFFFFFFFFFF if tab_id, col_id, row is out of bounds !
-    ! returns 0xFFFFFFFFFFFFFFFF if pattern not found... !
-*/
-SVDB_EXTERN unsigned long long int CC svdb_find_fwd( void * self, const int tab_id,
-            const int selection, const int col_id, const unsigned long long int row,
-            const int chunksize, const char * pattern );
-SVDB_EXTERN unsigned long long int CC svdb_find_bwd( void * self, const int tab_id,
-            const int selection, const int col_id, const unsigned long long int row,
-            const int chunksize, const char * pattern );
-
-
-/*****************************************************************************
-    (30)
-    returns a the id of the meta-root-node of a table
-
-    ! NULL ptr in self will be ignored !
-    ! returns -1 if tab_id is out of bounds, or no metadata found !
-*/
-SVDB_EXTERN int CC svdb_tab_meta_root( void * self, const int tab_id );
-
-
-/*****************************************************************************
-    (31)
-    returns the name of a meta-node
-
-    ! NULL ptr in self/buf will be ignored !
-    ! returns 0 if tab_id, meta_id is out of bounds !
-    returns the numbers of characters written into buf, if successful
-*/
-SVDB_EXTERN int CC svdb_tab_meta_name( void * self, const int tab_id,
-            const int meta_id, char * buf, int buflen );
-
-
-/*****************************************************************************
-    (32)
-    returns the length of the value of a meta-node ( in bytes )
-
-    ! NULL ptr in self will be ignored !
-    ! returns 0 if tab_id, meta_id is out of bounds !
-*/
-SVDB_EXTERN int CC svdb_tab_meta_value_len( void * self, const int tab_id,
-            const int meta_id );
-
-
-/*****************************************************************************
-    (33)
-    returns if the meta-value contains only printable chars
-
-    ! NULL ptr in self will be ignored !
-    ! returns 0 if tab_id, meta_id is out of bounds !
-*/
-SVDB_EXTERN int CC svdb_tab_meta_value_printable( void * self,
-            const int tab_id, const int meta_id );
-
-
-/*****************************************************************************
-    (34)
-    returns a ptr to the meta-node-value
-
-    ! NULL ptr in self will be ignored !
-    ! returns 0 if tab_id, meta_id is out of bounds !
-*/
-SVDB_EXTERN const char * CC svdb_tab_meta_value_ptr( void * self, const int tab_id,
-                                              const int meta_id );
-
-
-/*****************************************************************************
-    (35)
-    returns the value of a meta-node as ascii-text (this is a guess)
-
-    ! NULL ptr in self/buf will be ignored !
-    ! returns 0 if tab_id, meta_id is out of bounds !
-    returns the numbers of characters written into buf, if successful
-*/
-SVDB_EXTERN int CC svdb_tab_meta_value( void * self, const int tab_id,
-            const int meta_id, char * buf, int buflen, int trim );
-
-
-/*****************************************************************************
-    (36)
-    returns the number of childs of a meta-node
-
-    ! NULL ptr in self will be ignored !
-    ! returns -1 if tab_id, meta_id is out of bounds !
-*/
-SVDB_EXTERN int CC svdb_tab_meta_child_count( void * self,
-            const int tab_id, const int meta_id );
-
-
-/*****************************************************************************
-    (37)
-    returns the id of a meta-node child
-
-    ! NULL ptr in self will be ignored !
-    ! returns -1 if tab_id, meta_id, child_idx is out of bounds !
-*/
-SVDB_EXTERN int CC svdb_tab_meta_child_id( void * self, const int tab_id,
-            const int meta_id, const int child_idx );
-
-
-
-
-
-/*****************************************************************************
-    (38)
-
-*/
-SVDB_EXTERN void * CC svdb_open_fastq( const char * path );
-
-
-/*****************************************************************************
-    (39)
-
-*/
-SVDB_EXTERN void CC svdb_close_fastq( void * self );
-
-
-/*****************************************************************************
-    (40)
-    returns what the fastq-obj can produce
-    0 ... nothing, handle invalid
-    1 ... only READ ( that means fasta )
-    2 ... READ and QUALITY ( but not spot splitting )
-    3 ... READ, QUALITY and READ_START/READ_LEN ( splitted spots )
-*/
-SVDB_EXTERN int CC svdb_fastq_scope( void * self );
-
-
-/*****************************************************************************
-    (41)
-    returns how many reads a fastq-row has
-*/
-SVDB_EXTERN int CC svdb_fastq_readcount( void * self, const unsigned long long int row );
-
-
-/*****************************************************************************
-    (42)
-    produces a fastq-name ( without the prefix... @/+ ) into a buffer
-    seq ... 0 the whole unsplitted spot
-    seq >   0 the read/part of the spot 1,2
-    returns the number of bytes written
-*/
-SVDB_EXTERN int CC svdb_fastq_name( void * self, char * buf, int buflen,
-                                   int seq, const unsigned long long int row );
-
-
-/*****************************************************************************
-    (43)
-    produces a fastq-sequence into a buffer
-    seq ... 0 the whole unsplitted spot
-    seq >   0 the read/part of the spot 1,2
-    returns the number of bytes written
-*/
-SVDB_EXTERN int CC svdb_fastq_sequence( void * self, char * buf, int buflen,
-                                       int seq, const unsigned long long int row );
-
-/*****************************************************************************
-    (44)
-    produces a fastq-quality into a buffer
-    seq ... 0 the whole unsplitted spot
-    seq >   0 the read/part of the spot 1,2
-    returns the number of bytes written
-*/
-SVDB_EXTERN int CC svdb_fastq_quality( void * self, char * buf, int buflen,
-                                      int seq, const unsigned long long int row );
-
-
-SVDB_EXTERN int CC svdb_fastq_rd_type_available( void * self );
-
-SVDB_EXTERN int CC svdb_fastq_rd_filter_available( void * self );
-
-SVDB_EXTERN int CC svdb_fastq_read_type_is_bio( void * self, int seq, const unsigned long long int row );
-
-SVDB_EXTERN int CC svdb_fastq_read_filter_is_pass( void * self, int seq, const unsigned long long int row );
-
-SVDB_EXTERN unsigned long long int CC svdb_fastq_row_count( void * self );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/interfaces/tui/extern.h b/interfaces/tui/extern.h
deleted file mode 100644
index 65b326f..0000000
--- a/interfaces/tui/extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_tui_extern_
-#define _h_tui_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define TUI_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define TUI_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_tui_extern_ */
diff --git a/interfaces/tui/tui.h b/interfaces/tui/tui.h
deleted file mode 100644
index f9a47fb..0000000
--- a/interfaces/tui/tui.h
+++ /dev/null
@@ -1,297 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_tui_
-#define _h_tui_
-
-#ifndef _h_tui_extern_
-#include <tui/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KTUIMgr
- *  the manager that creates a KTUI instance...
- */
-typedef struct KTUIMgr KTUIMgr;
-
-
-
-/*--------------------------------------------------------------------------
- * KTUI
- *  a handle to platform specific details of a text user interface
- */
-struct KTUI;
-
-
-/*--------------------------------------------------------------------------
- * KTUI_event_type
- */
-typedef uint32_t KTUI_event_type;
-enum
-{
-    ktui_event_none = 0,
-    ktui_event_kb,
-    ktui_event_mouse,
-    ktui_event_window
-};
-
-
-typedef uint32_t KTUI_key;
-enum
-{
-    ktui_down = 1,
-    ktui_up,
-    ktui_left,
-    ktui_right,
-    ktui_home,
-    ktui_end,
-    ktui_bksp,
-    ktui_F1,
-    ktui_F2,
-    ktui_F3,
-    ktui_F4,
-    ktui_F5,
-    ktui_F6,
-    ktui_F7,
-    ktui_F8,
-    ktui_F9,
-    ktui_F10,
-    ktui_F11,
-    ktui_F12,
-    ktui_del,
-    ktui_ins,
-    ktui_pgdn,
-    ktui_pgup,
-    ktui_enter,
-    ktui_tab,
-    ktui_shift_tab,
-    ktui_alpha,
-	ktui_none
-};
-
-/*--------------------------------------------------------------------------
- * open sturcture for event
- */
-
-typedef struct KTUI_kb_data
-{
-    KTUI_key code;
-    uint32_t key;
-} KTUI_kb_data;
-
-
-typedef uint32_t KTUI_mouse_button;
-enum
-{
-    ktui_mouse_button_none = 1,
-    ktui_mouse_button_left,
-    ktui_mouse_button_middle,
-    ktui_mouse_button_right,
-	ktui_mouse_button_up
-};
-
-typedef uint32_t KTUI_mouse_action;
-enum
-{
-    ktui_mouse_action_none = 1,
-    ktui_mouse_action_button,
-	ktui_mouse_action_move,
-	ktui_mouse_action_scroll
-};
-
-typedef struct KTUI_mouse_data
-{
-    uint32_t x, y, raw_event;
-    KTUI_mouse_button button;
-	KTUI_mouse_action action;
-} KTUI_mouse_data;
-
-
-typedef struct KTUI_win_data
-{
-    uint32_t w, h;
-} KTUI_win_data;
-
-
-union tui_event_data
-{
-    KTUI_kb_data     kb_data;
-    KTUI_mouse_data  mouse_data;
-    KTUI_win_data    win_data;
-};
-
-typedef struct tui_event
-{
-    SLNode node;
-    KTUI_event_type event_type;
-    union tui_event_data data;
-} tui_event;
-
-
-/*--------------------------------------------------------------------------
- * open sturcture for command
- */
-
-typedef uint32_t KTUI_color;
-enum
-{
-    KTUI_c_black = 0,
-    KTUI_c_gray,
-    KTUI_c_red,
-    KTUI_c_dark_red,
-    KTUI_c_green,
-    KTUI_c_dark_green,
-    KTUI_c_yellow,
-    KTUI_c_brown,
-    KTUI_c_blue,
-    KTUI_c_dark_blue,
-    KTUI_c_magenta,
-    KTUI_c_dark_magenta,
-    KTUI_c_cyan,
-    KTUI_c_dark_cyan,
-    KTUI_c_white,
-    KTUI_c_light_gray
-};
-
-
-typedef uint32_t KTUI_attrib;
-enum
-{
-    KTUI_a_none = 0,
-    KTUI_a_bold = 1,
-    KTUI_a_underline = 2,
-    KTUI_a_blink = 4,
-    KTUI_a_inverse = 8
-};
-
-
-typedef struct tui_point
-{
-    uint32_t x, y;
-} tui_point;
-
-
-typedef struct tui_rect
-{
-    tui_point top_left;
-    uint32_t w, h;
-} tui_rect;
-
-
-/* attribute and color */
-typedef struct tui_ac
-{
-    KTUI_attrib attr;
-    KTUI_color fg;
-    KTUI_color bg;
-} tui_ac;
-
-
-/* Make
- *  creates a platform specific TUI object
- */
-TUI_EXTERN rc_t CC KTUIMake ( const KTUIMgr * mgr, struct KTUI ** self, uint32_t timeout );
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-TUI_EXTERN rc_t CC KTUIAddRef ( const struct KTUI * self );
-TUI_EXTERN rc_t CC KTUIRelease ( const struct KTUI * self );
-
-
-/* SetTimeout
- *  changes the timeout value...
- */
-TUI_EXTERN rc_t CC KTUISetTimeout ( struct KTUI * self, uint32_t timeout );
-
-
-/* Read
- *  reads one event ( keyboard, mouse or window event )
- */
-TUI_EXTERN rc_t CC KTUIGet ( struct KTUI * self, tui_event * event );
-
-
-/* Rect
- *  Print a string into the internal screen buffer with the given coordinates and attribute
- */
-LIB_EXPORT rc_t CC KTUIPrint( struct KTUI * self, const tui_point * p, const tui_ac * ac, const char * s, uint32_t l );
-
-
-/* Rect
- *  Fill a rectangle of the internal screen buffer with the given attribute and char
- *  if r == NULL it fills the whole screen buffer ( effectivly clear-screen )
- */
-TUI_EXTERN rc_t CC KTUIRect ( struct KTUI * self, const tui_rect * r, const tui_ac * ac, const char c );
-
-
-/* Flush
- *  flush the content of the internal screen buffer out to the console
- */
-TUI_EXTERN rc_t CC KTUIFlush ( struct KTUI * self, bool forced );
-
-
-/* GetExtent
- *  query how many rows/columns the terminal has
- */
-TUI_EXTERN rc_t CC KTUIGetExtent ( struct KTUI * self, int * cols, int * lines );
-
-
-/* ClrScr
- *  calls GetExtend, then clears the whole screen
- */
-TUI_EXTERN rc_t CC KTUIClrScr( struct KTUI * self, KTUI_color bg );
-
-
-TUI_EXTERN void CC set_ac( tui_ac * dst, KTUI_attrib attr, KTUI_color fg, KTUI_color bg );
-TUI_EXTERN void CC copy_ac( tui_ac * dst, const tui_ac * src );
-TUI_EXTERN void CC inverse_ac( tui_ac * dst, const tui_ac * src );
-
-TUI_EXTERN void CC set_rect( tui_rect * dst, int x, int y, int w, int h );
-TUI_EXTERN void CC copy_rect( tui_rect * dst, const tui_rect * src );
-
-TUI_EXTERN bool CC is_alpha_key( tui_event * event, char c );
-TUI_EXTERN bool CC is_key_code( tui_event * event, KTUI_key k );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_tui_ */
diff --git a/interfaces/tui/tui.hpp b/interfaces/tui/tui.hpp
deleted file mode 100644
index 71a596c..0000000
--- a/interfaces/tui/tui.hpp
+++ /dev/null
@@ -1,739 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_tui_
-#define _hpp_tui_
-
-#ifndef _h_tui_
-#include <tui/tui.h>
-#endif
-
-#ifndef _h_tui_dlg_
-#include <tui/tui_dlg.h>
-#endif
-
-#ifndef _h_klib_printf_
-#include <klib/printf.h>
-#endif
-
-#include <string>
-#include <cstring>
-
-namespace tui {
-
-typedef int tui_coord;
-typedef int tui_id;
-typedef long long int tui_long;
-
-class Tui;  // forward decl because of beeing friend with Point, Rect and Ac 
-class Dlg;
-class Std_Dlg_Base;  
-class Std_Dlg_Pick;
-class Std_Dlg_File_Pick;
-class Std_Dlg_Dir_Pick;
-class Dlg_Runner;
-
-class Tui_Point
-{
-    private :
-        tui_point p_;     // open struct from interfaces/tui/tui.h
-
-    public :
-        Tui_Point( const tui_coord x, const tui_coord y ) { set( x, y ); }; // ctor from 2 coordinates
-        Tui_Point( const Tui_Point &other ) { set( other.get_x(), other.get_y() ); };      // copy-ctor
-
-        Tui_Point & operator= ( const Tui_Point & other )  // assignment operator
-            { if ( this != &other ) set( other.get_x(), other.get_y() ); return *this; }
-
-        const tui_coord get_x( void ) const { return p_.x; };
-        const tui_coord get_y( void ) const { return p_.y; };
-        void set_x( const tui_coord x ) { p_.x = x; };
-        void set_y( const tui_coord y ) { p_.y = y; };
-        void set( const tui_coord x, const tui_coord y ) { p_.x = x; p_.y = y; };
-
-        friend class Tui;   // so the Tui-class can access the private struct of this class
-};
-
-
-class Tui_Rect
-{
-    private :
-        tui_rect r_;     // open struct from interfaces/tui/tui.h
-
-    public :
-        Tui_Rect( const tui_coord x, const tui_coord y, const tui_coord w, const tui_coord h ) { set( x, y, w, h ); };
-        Tui_Rect( void ) { set( 0, 0, 1, 1 ); };
-        Tui_Rect( const Tui_Rect &other ) { set( other ); };      // copy-ctor
-
-        Tui_Rect & operator= ( const Tui_Rect & other )  // assignment operator
-            { if ( this != &other ) set( other ); return *this; }
-
-        const tui_coord get_x( void ) const { return r_.top_left.x; };
-        const tui_coord get_y( void ) const { return r_.top_left.y; };
-        const tui_coord get_w( void ) const { return r_.w; };
-        const tui_coord get_h( void ) const { return r_.h; };
-        void get( tui_coord &x, tui_coord &y, tui_coord &w, tui_coord &h ) const
-        { x = r_.top_left.x; y = r_.top_left.y; w = r_.w; h = r_.h; }
-
-        void set_x( const tui_coord x ) { r_.top_left.x = x; };
-        void set_y( const tui_coord y ) { r_.top_left.y = y; };
-        void set_w( const tui_coord w ) { r_.w = w; };
-        void set_h( const tui_coord h ) { r_.h = h; };
-        void set( const tui_coord x, const tui_coord y, const tui_coord w, const tui_coord h )
-            { r_.top_left.x = x; r_.top_left.y = y; r_.w = w; r_.h = h; };
-        void set( Tui_Rect const &other )
-            { r_.top_left.x = other.r_.top_left.x; r_.top_left.y = other.r_.top_left.y; r_.w = other.r_.w; r_.h = other.r_.h; };
-        void change( const tui_coord dx, const tui_coord dy, const tui_coord dw, const tui_coord dh )
-            { r_.top_left.x += dx; r_.top_left.y += dy, r_.w += dw, r_.h += dh; };
-
-        friend class Tui;   // so the Tui-class can access the private struct of this class
-        friend class Dlg;
-        friend class Std_Dlg_Pick;
-        friend class Std_Dlg_File_Pick;
-        friend class Std_Dlg_Dir_Pick;
-};
-
-class Tui_Ac
-{
-    private :
-        tui_ac ac_;     // open struct from interfaces/tui/tui.h
-
-    public :
-        Tui_Ac( const KTUI_attrib attr, const KTUI_color fg, const KTUI_color bg ) { set( attr, fg, bg ); };
-        Tui_Ac( const Tui_Ac &other ) { set( other ); };      // copy-ctor
-
-        Tui_Ac & operator= ( const Tui_Ac & other )  // assignment operator
-            { if ( this != &other ) set( other ); return *this; }
-
-        const KTUI_attrib get_attrib( void ) const { return ac_.attr; };
-        const KTUI_color get_fg( void ) const { return ac_.fg; };
-        const KTUI_color get_bg( void ) const { return ac_.bg; };
-        void set_attrib( const KTUI_attrib attr ) { ac_.attr = attr; };
-        void set_fg( const KTUI_color fg ) { ac_.fg = fg; };
-        void set_bg( const KTUI_color bg ) { ac_.bg = bg; };
-        void set( const KTUI_attrib attr, const KTUI_color fg, const KTUI_color bg ) { ac_.attr = attr; ac_.fg = fg; ac_.bg = bg; };
-        void set( const Tui_Ac &other ) { ac_.attr = other.ac_.attr; ac_.fg = other.ac_.fg; ac_.bg = other.ac_.bg; };
-
-        friend class Tui;   // so the Tui-class can access the private struct of this class
-};
-
-
-class Tui_Event
-{
-    private :
-        tui_event ev_;     // open struct from interfaces/tui/tui.h
-
-    public :
-        Tui_Event( void ) { ev_.event_type = ktui_event_none; };
-
-        bool get_from_tui( void );
-
-        KTUI_event_type get_type( void ) const { return ev_.event_type; };
-
-        KTUI_key get_key_type( void ) const { return ev_.data.kb_data.code; };
-        int get_key( void ) const { return ev_.data.kb_data.key; };
-
-        tui_coord get_mouse_x( void ) const { return ev_.data.mouse_data.x; };
-        tui_coord get_mouse_y( void ) const { return ev_.data.mouse_data.y; };
-        KTUI_mouse_button get_mouse_button( void ) const { return ev_.data.mouse_data.button; };
-
-        tui_coord get_window_width( void ) const { return ev_.data.win_data.w; };
-        tui_coord get_window_height( void ) const { return ev_.data.win_data.h; };
-
-        bool empty( void ) const { return ( get_type() == ktui_event_none ); };
-
-        friend class Tui;   // so the Tui-class can access the private struct of this class
-        friend class Dlg;
-};
-
-
-class Tui
-{
-    private :
-        struct KTUI * tui_;    // opaque struct from interfaces/tui/tui.h
-        static Tui * instance;
-
-        Tui( const int timeout = 10000 ) { KTUIMake ( NULL, &tui_, timeout ); };    // private constructor
-        Tui( const Tui & );     // prevent copy construction
-        Tui& operator=( const Tui& );   // prevent assignment
-        ~Tui( void ) { KTUIRelease ( tui_ ); };
-
-    public :
-        static Tui * getInstance( void );
-        static void clean_up( void );
-
-        bool SetTimeout( const int timeout ) { return ( KTUISetTimeout ( tui_, timeout ) == 0 ); };
-
-        bool Print ( const Tui_Point &p, const Tui_Ac &ac, const std::string &s, const int l = 0 )
-            { return ( KTUIPrint( tui_, &( p.p_ ), &( ac.ac_ ), s.c_str(), ( l == 0 ) ? (int)s.length() : l ) == 0 ); };
-
-        bool PaintRect( const Tui_Rect &r, const Tui_Ac &ac, const char c = ' ' )
-            { return ( KTUIRect( tui_, &( r.r_ ), &( ac.ac_ ), c ) == 0 ); }
-
-        bool Flush( bool forced = false ) { return ( KTUIFlush ( tui_, forced ) == 0 ); };
-
-        bool GetExtent ( tui_coord * cols, tui_coord * lines ) const { return ( KTUIGetExtent ( tui_, cols, lines ) == 0 ); };
-        bool GetExtent ( Tui_Rect &r )
-        {
-            tui_coord cols, lines;
-            bool res = ( KTUIGetExtent ( tui_, &cols, &lines ) == 0 );
-            if ( res ) r.set( 0, 0, cols, lines );
-            return res;
-        }
-
-        bool ClrScr( const KTUI_color bg ) { return ( KTUIClrScr( tui_, bg ) == 0 ); };
-
-        friend class Tui_Event;
-        friend class Dlg;
-        friend class Std_Dlg_Base;
-};
-
-
-class Tui_Dlg_Event
-{
-    private :
-        tuidlg_event ev_;     // open struct from interfaces/tui/tui_dlg.h
-
-    public :
-        Tui_Dlg_Event( void ) { ev_.event_type = ktuidlg_event_none; };
-
-        const KTUIDlg_event_type get_type( void ) const { return ev_.event_type; };
-        const tui_id get_widget_id( void ) const { return ev_.widget_id; };
-        const tui_long get_value_1( void ) const { return ev_.value_1; };
-        const tui_long get_value_2( void ) const { return ev_.value_2; };
-        const void * get_ptr_value( void ) const { return ev_.ptr_0; };
-        const bool empty( void ) const { return ( ev_.event_type == ktuidlg_event_none ); };
-
-        friend class Dlg_Runner;
-};
-
-
-class Tui_Menu
-{
-    private :
-        struct KTUI_Menu * menu_;
-
-    public :
-        Tui_Menu( void ) { KTUI_Menu_Make ( &menu_ ); };
-        ~Tui_Menu( void ) { KTUI_Menu_Release ( menu_ ); };
-
-        bool Add( const char * path, tui_id id, char shortcut ) { return ( KTUI_Menu_Add ( menu_, path, id, shortcut ) == 0 ); }
-        bool Remove( tui_id id ) { return ( KTUI_Menu_Remove ( menu_, id ) == 0 ); };
-
-        struct KTUI_Menu * get( bool inc_ref_count )
-        {
-            if ( inc_ref_count )
-            {
-                if ( KTUI_Menu_AddRef ( menu_ ) == 0 ) return menu_; else return NULL;
-            }
-            else
-                return menu_;
-        };
-};
-
-
-class Grid
-{
-    private :
-        TUIWGrid_data grid_data_;
-        char buffer[ 1024 ];
-
-        static void static_str_cb( TUIWGridStr what, uint64_t col, uint64_t row,
-                                   uint32_t col_width, const char ** value, void * data, void * instance )
-        {
-            Grid *g = static_cast< Grid* >( instance );
-            g->buffer[ 0 ] = 0;
-            switch( what )
-            {
-                case kGrid_Col   : g->Col_Hdr_Request( col, col_width, data, g->buffer, sizeof g->buffer ); break; 
-                case kGrid_Row   : g->Row_Hdr_Request( row, col_width, data, g->buffer, sizeof g->buffer ); break; 
-                case kGrid_Cell  : g->Cell_Request( col, row, col_width, data, g->buffer, sizeof g->buffer ); break;
-            }
-            *value = g->buffer;
-        };
-
-        static void static_int_cb( TUIWGridInt what, uint64_t col, uint32_t widget_width,
-                                   uint64_t * value, void * data, void * instance )
-        {
-            Grid *g = static_cast< Grid* >( instance );
-            switch( what )
-            {
-                case kGrid_Get_Width    : *value = g->Get_Col_Width( col, widget_width, data ); break;
-                case kGrid_Set_Width    : g->Set_Col_Width( col, widget_width, data, *value ); break;
-                case kGrid_Get_ColCount : *value = g->Get_Col_Count( widget_width, data ); break;
-                case kGrid_Get_RowCount : *value = g->Get_Row_Count( widget_width, data ); break;
-                case kGrid_Prepare_Page : g->Prepare_Page( col, widget_width, data ); break;
-                case kGrid_Next_Row     : g->Next_Row( col, data ); break;
-                default : *value = 0;
-            }
-        };
-
-    public :
-        Grid( void * data );
-        virtual ~Grid() {};
-
-        void show_header( bool show ) { grid_data_.show_header = show; };
-        void show_row_header( int width ) { grid_data_.row_hdr_width = width; grid_data_.show_row_header = ( width > 0 ); };
-        void show_h_scroll( bool show ) { grid_data_.show_h_scroll = show; };
-        void show_v_scroll( bool show ) { grid_data_.show_v_scroll = show; };
-
-        TUIWGrid_data * get_ptr( void ) { return &grid_data_; };
-
-        /* overwrite these in derived classes */
-        virtual void Col_Hdr_Request( tui_long col, uint32_t col_width, void * data, char * buffer, size_t buffer_size )
-            { string_printf ( buffer, buffer_size, NULL, "C %lu", col+1 ); };
-
-        virtual void Row_Hdr_Request( tui_long row, uint32_t col_width, void * data, char * buffer, size_t buffer_size )
-            { string_printf ( buffer, buffer_size, NULL, "R %lu", row+1 ); };
-
-        virtual void Cell_Request( tui_long col, tui_long row, uint32_t col_width, void * data, char * buffer, size_t buffer_size )
-            { string_printf ( buffer, buffer_size, NULL, "Z %lu-%lu", col + 1, row + 1 ); };
-
-        virtual tui_long Get_Col_Width( tui_long col, uint32_t widget_width, void * data ) { return 12; };
-        virtual void Set_Col_Width( tui_long col, uint32_t widget_width, void * data, tui_long value ) {};
-        virtual tui_long Get_Col_Count( uint32_t widget_width, void * data ) { return 8; };
-        virtual tui_long Get_Row_Count( uint32_t widget_width, void * data ) { return 32; };
-        virtual void Prepare_Page( uint64_t row, uint32_t row_count, void * data ) { ; };
-        virtual void Next_Row( uint64_t row, void * data ) { ; };
-};
-
-
-class Dlg
-{
-    private :
-        struct KTUIDlg * dlg_;  // opaque struct from interfaces/tui/tui_dlg.h
-
-    public :
-        Dlg( void )
-        {
-            Tui * instance = Tui::getInstance();
-            KTUIDlgMake ( instance->tui_, &dlg_, /*parent*/ NULL, /*palette*/ NULL, /*rect*/ NULL );
-        };
-
-        ~Dlg( void ) { KTUIDlgRelease ( dlg_ ); };
-
-        bool SetCaption( const char * s ) { return ( KTUIDlgSetCaption ( dlg_, s ) == 0 ); };
-        bool SetCaption( std::string &s ) { return ( KTUIDlgSetCaption ( dlg_, s.c_str() ) == 0 ); };
-        bool SetCaptionF( const char * fmt, ... );
-
-        Tui_Rect center( uint32_t x_margin, uint32_t y_margin )
-        {
-            Tui_Rect r;
-            GetRect( r );
-            r.set_w( r.get_w() - ( 2 * x_margin ) );
-            r.set_x( r.get_x() + x_margin );
-            r.set_h( r.get_h() - ( 2 * y_margin ) );
-            r.set_y( r.get_y() + y_margin );
-            return r;
-        };
-
-        void center( Tui_Rect &r )
-        {
-            Tui_Rect rd;
-            GetRect( rd );
-            if ( r.get_w() > ( rd.get_w() - 2 ) ) r.set_w( rd.get_w() - 2 );
-            if ( r.get_h() > ( rd.get_h() -2 ) ) r.set_h( rd.get_h() - 2 );
-            r.set_x( rd.get_x() + ( ( rd.get_w() - r.get_w() ) / 2 ) );
-            r.set_y( rd.get_y() + ( ( rd.get_h() - r.get_h() ) / 2 ) );
-        };
-
-
-        void SetData( void * data ) { KTUIDlgSetData ( dlg_, data ); };
-        void * GetData( void ) { return KTUIDlgGetData ( dlg_ ); };
-
-        void SetDone( bool done ) { KTUIDlgSetDone ( dlg_, done ); };
-        bool IsDone( void ) { return KTUIDlgGetDone ( dlg_ ); };
-
-        void SetChanged( void ) { KTUIDlgSetChanged ( dlg_ ); };
-        void ClearChanged( void ) { KTUIDlgClearChanged ( dlg_ ); };
-        bool IsChanged( void ) { return KTUIDlgGetChanged ( dlg_ ); };
-
-        bool GetRect( Tui_Rect &r ) { return ( KTUIDlgGetRect ( dlg_, &( r.r_ ) ) == 0 ); };
-        bool SetRect( Tui_Rect const &r, bool redraw ) { return ( KTUIDlgSetRect ( dlg_, &( r.r_ ), redraw ) == 0 ); };
-        virtual bool Resize( Tui_Rect const &r );
-
-        bool IsMenuActive( void ) { return KTUIDlgGetMenuActive ( dlg_ ); };
-        bool SetMenuActive( bool active ) { return ( KTUIDlgSetMenuActive ( dlg_, active ) == 0 ); };
-        bool SetMenu( Tui_Menu &menu ) { return ( KTUIDlgSetMenu ( dlg_, menu.get( true ) ) == 0 ); };
-        bool ToggleMenu( void ) { return SetMenuActive( !IsMenuActive() ); };
-
-        bool SetWidgetCaption( tui_id id, const char * caption ) { return ( KTUIDlgSetWidgetCaption ( dlg_, id, caption ) == 0 ); };
-        bool SetWidgetCaption( tui_id id, std::string caption ) { return ( KTUIDlgSetWidgetCaption ( dlg_, id, caption.c_str() ) == 0 ); };
-        bool SetWidgetCaptionF( tui_id id, const char * fmt, ... );
-        bool GetWidgetRect( tui_id id, Tui_Rect &r ) { return ( KTUIDlgGetWidgetRect ( dlg_, id, &( r.r_ ) ) == 0 ); };
-        bool SetWidgetRect( tui_id id, Tui_Rect const &r, bool redraw ) { return ( KTUIDlgSetWidgetRect ( dlg_, id, &( r.r_ ), redraw ) == 0 ); };
-
-        bool SetWidgetCanFocus( tui_id id, bool can_focus ) { return ( KTUIDlgSetWidgetCanFocus ( dlg_, id, can_focus ) == 0 ); };
-
-        bool IsWidgetVisisble( tui_id id ) { return KTUIDlgGetWidgetVisible ( dlg_, id ); };
-        bool SetWidgetVisible( tui_id id, bool visible ) { return ( KTUIDlgSetWidgetVisible ( dlg_, id, visible ) == 0 ); };
-
-        bool HasWidgetChanged( tui_id id ) { return KTUIDlgGetWidgetChanged ( dlg_, id ); };
-        bool SetWidgetChanged( tui_id id, bool changed ) { return ( KTUIDlgSetWidgetChanged ( dlg_, id, changed ) == 0 ); };
-
-        bool GetWidgetBoolValue( tui_id id ) { return KTUIDlgGetWidgetBoolValue ( dlg_, id ); };
-        bool SetWidgetBoolValue( tui_id id, bool value ) { return ( KTUIDlgSetWidgetBoolValue ( dlg_, id, value ) == 0 ); };
-
-        bool SetWidgetBackground( tui_id id, KTUI_color value ) { return ( KTUIDlgSetWidgetBg ( dlg_, id, value ) == 0 ); };
-        bool ReleaseWidgetBackground( tui_id id ) { return ( KTUIDlgReleaseWidgetBg ( dlg_, id ) == 0 ); };
-
-		bool SetWidgetForeground( tui_id id, KTUI_color value ) { return ( KTUIDlgSetWidgetFg ( dlg_, id, value ) == 0 ); };
-        bool ReleaseWidgetForeground( tui_id id ) { return ( KTUIDlgReleaseWidgetFg ( dlg_, id ) == 0 ); };
-
-        tui_long GetWidgetInt64Value( tui_id id ) { return KTUIDlgGetWidgetInt64Value ( dlg_, id ); };
-        bool SetWidgetInt64Value( tui_id id, tui_long value ) { return ( KTUIDlgSetWidgetInt64Value ( dlg_, id, value ) == 0 ); };
-
-        tui_long GetWidgetInt64Min( tui_id id ) { return KTUIDlgGetWidgetInt64Min ( dlg_, id ); };
-        bool SetWidgetInt64Min( tui_id id, tui_long value ) { return ( KTUIDlgSetWidgetInt64Min ( dlg_, id, value ) == 0 ); };
-
-        tui_long GetWidgetInt64Max( tui_id id ) { return KTUIDlgGetWidgetInt64Max ( dlg_, id ); };
-        bool SetWidgetInt64Max( tui_id id, tui_long value ) { return ( KTUIDlgSetWidgetInt64Max ( dlg_, id, value ) == 0 ); };
-
-        int GetWidgetPercent( tui_id id ) { return KTUIDlgGetWidgetPercent ( dlg_, id ); };
-        bool SetWidgetPercent( tui_id id, int value ) { return ( KTUIDlgSetWidgetPercent ( dlg_, id, value ) == 0 ); };
-
-        int GetWidgetPrecision( tui_id id ) { return KTUIDlgGetWidgetPrecision ( dlg_, id ); };
-        bool SetWidgetPrecision( tui_id id, int value ) { return ( KTUIDlgSetWidgetPrecision( dlg_, id, value ) == 0 ); };
-        int CalcPercent( tui_long value, tui_long max, int precision ) { return KTUIDlgCalcPercent ( value, max, precision ); };
-
-        const char * GetWidgetText( tui_id id ) { return KTUIDlgGetWidgetText( dlg_, id ); };
-        std::string GetWidgetString( tui_id id ) { return std::string( KTUIDlgGetWidgetText( dlg_, id ) ); };
-        bool SetWidgetText( tui_id id, const char * value ) { return ( KTUIDlgSetWidgetText ( dlg_, id, value ) == 0 ); };
-        bool SetWidgetText( tui_id id, std::string &s ) { return ( KTUIDlgSetWidgetText ( dlg_, id, s.c_str() ) == 0 ); };
-        bool SetWidgetTextF( tui_id id, const char * fmt, ... );
-        size_t GetWidgetTextLength( tui_id id ) { return KTUIDlgGetWidgetTextLength( dlg_, id ); };
-        bool SetWidgetTextLength( tui_id id, size_t value ) { return ( KTUIDlgSetWidgetTextLength ( dlg_, id, value ) == 0 ); };
-
-        bool AddWidgetString( tui_id id, const char * txt ) { return ( KTUIDlgAddWidgetString ( dlg_, id, txt ) == 0 ); };
-        bool AddWidgetString( tui_id id, std::string &s ) { return ( KTUIDlgAddWidgetString ( dlg_, id, s.c_str() ) == 0 ); };
-        bool AddWidgetStringN( tui_id id, int n, ... );
-        bool AddWidgetStringF( tui_id id, const char * fmt, ... );
-        bool AddWidgetStrings( tui_id id, VNamelist * src ) { return ( KTUIDlgAddWidgetStrings ( dlg_, id, src ) == 0 ); };
-        const char * GetWidgetStringByIdx( tui_id id, tui_id idx ) { return KTUIDlgGetWidgetStringByIdx ( dlg_, id, idx ); };
-        bool RemoveWidgetStringByIdx( tui_id id, tui_id idx ) { return ( KTUIDlgRemoveWidgetStringByIdx ( dlg_, id, idx ) == 0 ); };
-        bool RemoveAllWidgetStrings( tui_id id ) { return ( KTUIDlgRemoveAllWidgetStrings ( dlg_, id ) == 0 ); };
-        tui_id GetWidgetStringCount( tui_id id ) { return KTUIDlgGetWidgetStringCount ( dlg_, id ); };
-        tui_id HasWidgetString( tui_id id, const char * txt ) { return KTUIDlgHasWidgetString( dlg_, id, txt ); };
-        tui_id HasWidgetString( tui_id id, std::string &txt ) { return KTUIDlgHasWidgetString( dlg_, id, txt.c_str() ); };
-        tui_id GetWidgetSelectedString( tui_id id ) { return KTUIDlgGetWidgetSelectedString( dlg_, id ); };
-        bool SetWidgetSelectedString( tui_id id, tui_id idx ) { return ( KTUIDlgSetWidgetSelectedString ( dlg_, id, idx ) == 0 ); };
-
-        bool AddLabel( tui_id id, Tui_Rect const &r, const char * s ) { return ( KTUIDlgAddLabel( dlg_, id, &( r.r_ ), s ) == 0 ); };
-        bool AddButton( tui_id id, Tui_Rect const &r, const char * s ) { return ( KTUIDlgAddBtn ( dlg_, id, &( r.r_ ), s ) == 0 ); };
-
-        bool AddCheckBox( tui_id id, Tui_Rect const &r, const char * s, bool enabled )
-        {
-            bool res = ( KTUIDlgAddCheckBox ( dlg_, id, &( r.r_ ), s ) == 0 );
-            if ( res ) res = SetWidgetBoolValue( id, enabled );
-            return res;
-        };
-
-        bool AddInput( tui_id id, Tui_Rect const &r, const char * s, size_t length ) { return ( KTUIDlgAddInput ( dlg_, id, &( r.r_ ), s, length ) == 0 ); };
-        bool AddRadioBox( tui_id id, Tui_Rect const &r ) { return ( KTUIDlgAddRadioBox ( dlg_, id, &( r.r_ ) ) == 0 ); };
-        bool AddList( tui_id id, Tui_Rect const &r ) { return ( KTUIDlgAddList ( dlg_, id, &( r.r_ ) ) == 0 ); };
-        bool SetHScroll( tui_id id, bool enabled ) { return ( KTUIDlgSetHScroll ( dlg_, id, enabled ) == 0 ); };
-        bool AddProgress( tui_id id, Tui_Rect const &r, int percent, int precision ) { return ( KTUIDlgAddProgress ( dlg_, id, &( r.r_ ), percent, precision ) == 0 ); };
-        bool AddSpinEdit( tui_id id, Tui_Rect const &r, tui_long value, tui_long min, tui_long max ) { return ( KTUIDlgAddSpinEdit ( dlg_, id, &( r.r_ ), value, min, max ) == 0 ); };
-        bool AddGrid( tui_id id, Tui_Rect const &r, Grid &grid, bool cached ) { return( KTUIDlgAddGrid ( dlg_, id, &( r.r_ ), grid.get_ptr(), cached ) == 0 ); };
-
-        bool HasWidget( tui_id id ) { return KTUIDlgHasWidget ( dlg_, id ); };
-
-        tui_long GetGridCol( tui_id id ) { uint64_t col = 0; KTUIDlgGetGridCol( dlg_, id, &col ); return col; };
-        bool SetGridCol( tui_id id, tui_long col ) { return ( KTUIDlgSetGridCol( dlg_, id, col ) == 0 ); };
-        tui_long GetGridRow( tui_id id ) { uint64_t row = 0; KTUIDlgGetGridRow( dlg_, id, &row ); return row; };
-        bool SetGridRow( tui_id id, tui_long row ) { return ( KTUIDlgSetGridRow( dlg_, id, row ) == 0 ); };
-
-        bool RemoveWidget( tui_id id ) { return ( KTUIDlgRemove ( dlg_, id ) == 0 ); };
-        bool Draw( bool forced = false ) { return ( KTUIDlgDraw( dlg_, forced ) == 0 ); };
-        bool DrawWidget( tui_id id ) { return ( KTUIDlgDrawWidget( dlg_, id ) == 0 ); };
-        bool DrawCaption( void ) { return ( KTUIDlgDrawCaption( dlg_ ) == 0 ); };
-
-        bool SetFocus( tui_id id ) { return ( KTUIDlgSetFocus( dlg_, id ) == 0 ); };
-        bool MoveFocus( bool forward ) { return ( KTUIDlgMoveFocus( dlg_, forward ) == 0 ); };
-        bool FocusValid( void ) { return KTUIDlgFocusValid( dlg_ ); };
-        tui_id GetFocusId( void ) { return KTUIDlgGetFocusId( dlg_ ); };
-
-        bool HandleEvent( Tui_Event &ev ) { return ( KTUIDlgHandleEvent( dlg_, &( ev.ev_ ) ) == 0 ); };
-        bool GetDlgEvent( tuidlg_event * event ) { return ( KTUIDlgGet ( dlg_, event ) == 0 ); };
-
-        friend class Std_Dlg_Base;
-};
-
-class Dlg_Runner
-{
-    private :
-        Dlg &dlg_;
-        void * data_;
-
-        bool handle_dlg_event_loop( void );
-        bool handle_tui_event( Tui_Event &ev );
-        bool handle_dlg_event( Tui_Event &ev );
-
-
-    public :
-        Dlg_Runner( Dlg &dlg, void * data ) : dlg_( dlg ), data_( data ) { };
-        virtual ~Dlg_Runner() {};
-
-        void run( void );
-
-        virtual bool on_kb_alpha( Dlg &dlg, void * data, int code )               { return false; };
-        virtual bool on_kb_special_key( Dlg &dlg, void * data, KTUI_key key )     { return false; };
-        virtual bool on_mouse( Dlg &dlg, void * data, tui_coord x, tui_coord y, KTUI_mouse_button button ) { return false; };
-        virtual bool on_win( Dlg &dlg, void * data, tui_coord w, tui_coord h )    { return dlg_.Resize( tui::Tui_Rect( 0, 0, w, h ) ); };
-        virtual bool on_focus( Dlg &dlg, void * data, Tui_Dlg_Event &dev )        { return false; };
-        virtual bool on_focus_lost( Dlg &dlg, void * data, Tui_Dlg_Event &dev )   { return false; };
-        virtual bool on_select( Dlg &dlg, void * data, Tui_Dlg_Event &dev )       { return false; };
-        virtual bool on_changed( Dlg &dlg, void * data, Tui_Dlg_Event &dev )      { return false; };
-        virtual bool on_menu( Dlg &dlg, void * data, Tui_Dlg_Event &dev )         { return false; };
-};
-
-
-class Std_Dlg_Base
-{
-    protected :
-        Dlg * parent_;
-        KTUI_color bg1_, bg2_;
-        bool allow_dir_create_;
-        Tui_Rect R_;
-        char buffer[ 1024 ];
-        char caption[ 256 ];
-
-        void prepare( struct KTUI ** tui, struct KTUIDlg ** parent_dlg )
-        {
-            *tui = NULL;
-            *parent_dlg = NULL;
-            if ( parent_ != NULL )
-                *parent_dlg = parent_->dlg_;
-            else
-            {
-                Tui * instance = Tui::getInstance();
-                *tui = instance->tui_;
-            }
-        }
-
-        void post_process( void )
-        {
-            if ( parent_ != NULL )
-                parent_->Draw();
-        }
-
-    public :
-        Std_Dlg_Base( void ) : parent_( NULL ), bg1_( KTUI_c_brown ), bg2_( KTUI_c_dark_green ),
-                               allow_dir_create_( false ), R_( 0, 0, 35, 1 )
-        {
-			buffer[ 0 ] = 0;
-			caption[ 0 ] = 0;
-		};
-
-        void set_parent( Dlg * parent ) { parent_ = parent; };
-        void set_location( Tui_Rect const &r ) { R_.set( r ); };
-        void set_colors( const KTUI_color c1, const KTUI_color c2 ) { bg1_ = c1; bg2_ = c2; };
-        void set_color1( const KTUI_color c ) { bg1_ = c; };
-        void set_color2( const KTUI_color c ) { bg2_ = c; };
-        void allow_dir_create() { allow_dir_create_ = true; };
-
-        void set_caption( const char * txt ) { if ( txt != NULL ) string_printf ( caption, sizeof caption, NULL, "%s", txt ); };
-        void set_caption2( const std::string &txt ) { set_caption( txt.c_str() ); };
-
-        void set_text( const char * txt ) { if ( txt != NULL ) string_printf ( buffer, sizeof buffer, NULL, "%s", txt ); };
-        void set_text2( std::string &txt ) { set_text( txt.c_str() ); };
-        const char * get_text( void ) { return buffer; };
-        std::string get_text2( void ) { return buffer; };
-
-        Tui_Rect center( void )
-        {
-            tui_coord w = R_.get_w();
-            tui_coord cols, lines;
-            Tui::getInstance()->GetExtent( &cols, &lines );
-            return Tui_Rect( ( cols / 2 ) - ( w / 2 ), ( lines / 2 ) - 3, w, 1 );
-        };
-};
-
-
-class Std_Dlg_Info_Line : public Std_Dlg_Base
-{
-    private :
-
-        bool execute_int( void )
-        {
-            struct KTUI * tui = NULL;
-            struct KTUIDlg * parent_dlg = NULL;
-            prepare( &tui, &parent_dlg ); /* get either tui-ptr or parent_dlg-ptr for calling actual dlg-function */
-
-            rc_t rc = TUI_ShowMessage ( tui, parent_dlg, caption, buffer, 
-                                        R_.get_x(), R_.get_y(), R_.get_w(), bg1_, bg2_ );
-
-            post_process(); /* draw the parent */
-            return ( rc == 0 );
-        }
-
-    public :
-        bool execute( void ) { return execute_int(); };
-};
-
-
-class Std_Dlg_Input : public Std_Dlg_Base
-{
-    private :
-
-        bool execute_int( void )
-        {
-            struct KTUI * tui = NULL;
-            struct KTUIDlg * parent_dlg = NULL;
-            prepare( &tui, &parent_dlg ); /* get either tui-ptr or parent_dlg-ptr for calling actual dlg-function */
-
-            bool selected;
-
-            rc_t rc = TUI_EditBuffer( tui, parent_dlg, caption, buffer, sizeof buffer,
-                                      R_.get_x(), R_.get_y(), R_.get_w(),
-                                      &selected, bg1_, bg2_ );
-
-            post_process(); /* draw the parent */
-            return ( rc == 0 && selected );
-        }
-
-    public :
-        bool execute( void ) { return execute_int(); };
-};
-
-
-class Std_Dlg_Question : public Std_Dlg_Base
-{
-    private :
-
-        bool execute_int( void )
-        {
-            struct KTUI * tui = NULL;
-            struct KTUIDlg * parent_dlg = NULL;
-            prepare( &tui, &parent_dlg ); /* get either tui-ptr or parent_dlg-ptr for calling actual dlg-function */
-
-            bool yes;
-
-            rc_t rc = TUI_YesNoDlg ( tui, parent_dlg, caption, buffer,
-                                     R_.get_x(), R_.get_y(), R_.get_w(), &yes, bg1_, bg2_ );
-
-            post_process(); /* draw the parent */
-            return ( rc == 0 && yes );
-        }
-
-    public :
-
-        bool execute( void ) { return execute_int(); };
-};
-
-
-class Std_Dlg_Pick : public Std_Dlg_Base
-{
-    private :
-        VNamelist * list_;
-
-        bool execute_int( unsigned int * selection )
-        {
-            struct KTUI * tui = NULL;
-            struct KTUIDlg * parent_dlg = NULL;
-            prepare( &tui, &parent_dlg ); /* get either tui-ptr or parent_dlg-ptr for calling actual dlg-function */
-
-            bool selected;
-            if ( R_.get_h() < 6 ) R_.set_h( 6 );
-
-            rc_t rc = TUI_PickFromList( tui, parent_dlg, caption, list_, selection,
-                                        &( R_.r_ ), &selected, bg1_, bg2_ );
-
-            post_process(); /* draw the parent */
-            return ( rc == 0 && selected );
-        }
-
-    public :
-        Std_Dlg_Pick( void ) { VNamelistMake ( &list_, 100 ); };
-        virtual ~Std_Dlg_Pick( void ) { VNamelistRelease( list_ ); };
-
-        void add_entry( const char * txt ) { VNamelistAppend ( list_, txt ); };
-        bool execute( unsigned int * selection ) { return execute_int( selection ); };
-};
-
-
-class Std_Dlg_File_Pick : public Std_Dlg_Base
-{
-    private :
-        char ext[ 32 ];
-        uint32_t dir_h;
-
-        bool execute_int( void )
-        {
-            struct KTUI * tui = NULL;
-            struct KTUIDlg * parent_dlg = NULL;
-            prepare( &tui, &parent_dlg ); /* get either tui-ptr or parent_dlg-ptr for calling actual dlg-function */
-
-            bool done;
-            if ( R_.get_h() < 12 ) R_.set_h( 12 );
-            if ( dir_h == 0 ) dir_h = ( R_.get_h() - 6 ) / 2 ;
-
-            rc_t rc = FileDlg ( tui, parent_dlg, buffer, sizeof buffer, ext, &done,
-                                &( R_.r_ ), dir_h, bg1_, bg2_ );
-
-            post_process(); /* draw the parent */
-            return ( rc == 0 && done );
-        }
-
-    public :
-        Std_Dlg_File_Pick( void ) { ext[ 0 ] = 0; dir_h = 0; };
-
-        void set_ext( const char * txt ) { if ( txt != NULL ) string_printf ( ext, sizeof ext, NULL, "%s", txt ); };
-        void set_ext2( const std::string &txt ) { set_ext( txt.c_str() ); };
-        void set_dir_h( uint32_t value ) { dir_h = value; };
-
-        bool execute( void ) { return execute_int(); };
-};
-
-
-class Std_Dlg_Dir_Pick : public Std_Dlg_Base
-{
-    private :
-        bool execute_int( void )
-        {
-            struct KTUI * tui = NULL;
-            struct KTUIDlg * parent_dlg = NULL;
-            prepare( &tui, &parent_dlg ); /* get either tui-ptr or parent_dlg-ptr for calling actual dlg-function */
-
-            bool done;
-            if ( R_.get_h() < 12 ) R_.set_h( 12 );
-
-            rc_t rc = DirDlg ( tui, parent_dlg, buffer, sizeof buffer, &done,
-                               &( R_.r_ ), bg1_, bg2_, allow_dir_create_ );
-
-            post_process(); /* draw the parent */
-            return ( rc == 0 && done );
-        }
-
-    public :
-        Std_Dlg_Dir_Pick( void ) { };
-        bool execute( void ) { return execute_int(); };
-};
-
-
-} // namespace tui
-
-#endif // _hpp_tui_
\ No newline at end of file
diff --git a/interfaces/tui/tui_dlg.h b/interfaces/tui/tui_dlg.h
deleted file mode 100644
index e9a65a0..0000000
--- a/interfaces/tui/tui_dlg.h
+++ /dev/null
@@ -1,367 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_tui_dlg_
-#define _h_tui_dlg_
-
-#ifndef _h_tui_extern_
-#include <tui/extern.h>
-#endif
-
-#ifndef _h_klib_namelist_
-#include <klib/namelist.h>
-#endif
-
-#ifndef _h_tui_
-#include <tui/tui.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * KTUIPalette
- */
-typedef uint32_t KTUIPa_entry;
-enum
-{
-    ktuipa_dlg = 1,
-    ktuipa_dlg_caption,
-    ktuipa_dlg_focus,
-
-    ktuipa_label,
-    ktuipa_button,
-    ktuipa_checkbox,
-    ktuipa_input,
-    ktuipa_input_hint,
-    ktuipa_radiobox,
-    ktuipa_list,
-    ktuipa_progress,
-    ktuipa_spinedit,
-    ktuipa_grid,
-    ktuipa_grid_col_hdr,
-    ktuipa_grid_row_hdr,
-    ktuipa_grid_cursor,
-
-    ktuipa_menu,
-    ktuipa_menu_sel,
-    ktuipa_menu_hi,
-
-    ktuipa_last
-};
-
-
-struct KTUIPalette;
-
-TUI_EXTERN rc_t CC KTUIPaletteMake ( struct KTUIPalette ** self );
-TUI_EXTERN rc_t CC KTUIPaletteAddRef ( const struct KTUIPalette * self );
-TUI_EXTERN rc_t CC KTUIPaletteRelease ( const struct KTUIPalette * self );
-
-TUI_EXTERN const tui_ac * CC KTUIPaletteGet ( const struct KTUIPalette * self, KTUIPa_entry what );
-TUI_EXTERN rc_t CC KTUIPaletteSet ( struct KTUIPalette * self, KTUIPa_entry what, const tui_ac * ac );
-TUI_EXTERN rc_t CC KTUIPaletteDefault ( struct KTUIPalette * self );
-TUI_EXTERN rc_t CC KTUIPaletteCopy ( struct KTUIPalette * dst, const struct KTUIPalette * src );
-
-LIB_EXPORT rc_t CC KTUIPaletteSet_fg ( struct KTUIPalette * self, KTUIPa_entry what, KTUI_color fg );
-LIB_EXPORT rc_t CC KTUIPaletteSet_bg ( struct KTUIPalette * self, KTUIPa_entry what, KTUI_color bg );
-
-/*--------------------------------------------------------------------------
- * The Menu of a Dialog
- */
-struct KTUI_Menu;
-
-TUI_EXTERN rc_t CC KTUI_Menu_Make ( struct KTUI_Menu ** self );
-TUI_EXTERN rc_t CC KTUI_Menu_AddRef ( const struct KTUI_Menu * self );
-TUI_EXTERN rc_t CC KTUI_Menu_Release ( struct KTUI_Menu * self );
-
-TUI_EXTERN rc_t CC KTUI_Menu_Add ( struct KTUI_Menu * self, const char * path, uint32_t cmd, char shortcut );
-TUI_EXTERN rc_t CC KTUI_Menu_Remove ( struct KTUI_Menu * self, uint32_t cmd );
-
-
-/*--------------------------------------------------------------------------
- * KTUIDlg_event_type
- */
-typedef uint32_t KTUIDlg_event_type;
-enum
-{
-    ktuidlg_event_none = 0,
-    ktuidlg_event_focus,
-    ktuidlg_event_focus_lost,
-    ktuidlg_event_select,
-    ktuidlg_event_changed,
-    ktuidlg_event_menu
-};
-
-
-/*--------------------------------------------------------------------------
- * KTUIDlg_event
- */
-typedef struct tuidlg_event
-{
-    SLNode node;                        /* needed internally */
-    KTUIDlg_event_type event_type;      /* what has happened */
-    uint32_t widget_id;                 /* which widget did it happen to */
-    uint64_t value_1;                   /* what was selected in case of ktuidlg_event_select */
-    uint64_t value_2;                   /* what was selected in case of ktuidlg_event_select */
-    void * ptr_0;                       /* depends on the widget type... */
-} tuidlg_event;
-
-
-/*--------------------------------------------------------------------------
- * KTUIDlg
- *  a handle to a TUI-Dialog
- */
-struct KTUIDlg;
-
-TUI_EXTERN rc_t CC KTUIDlgMake ( struct KTUI * tui, struct KTUIDlg ** self, struct KTUIDlg * parent,
-                   struct KTUIPalette * palette, tui_rect * r );
-TUI_EXTERN rc_t CC KTUIDlgAddRef ( const struct KTUIDlg * self );
-TUI_EXTERN rc_t CC KTUIDlgRelease ( const struct KTUIDlg * self );
-
-TUI_EXTERN struct KTUI * CC KTUIDlgGetTui ( struct KTUIDlg * self );
-TUI_EXTERN struct KTUIPalette * CC KTUIDlgGetPalette ( struct KTUIDlg * self );
-TUI_EXTERN struct KTUIDlg * CC KTUIDlgGetParent ( struct KTUIDlg * self );
-
-TUI_EXTERN rc_t CC KTUIDlgAbsoluteRect ( struct KTUIDlg * self, tui_rect * dst, tui_rect * src );
-TUI_EXTERN rc_t CC KTUIDlgSetCaption ( struct KTUIDlg * self, const char * caption );
-
-TUI_EXTERN void CC KTUIDlgSetData ( struct KTUIDlg * self, void * data );
-TUI_EXTERN void * CC KTUIDlgGetData ( struct KTUIDlg * self );
-
-TUI_EXTERN void CC KTUIDlgSetDone ( struct KTUIDlg * self, bool done );
-TUI_EXTERN bool CC KTUIDlgGetDone ( struct KTUIDlg * self );
-
-TUI_EXTERN void CC KTUIDlgSetChanged ( struct KTUIDlg * self );
-TUI_EXTERN void CC KTUIDlgClearChanged ( struct KTUIDlg * self );
-TUI_EXTERN bool CC KTUIDlgGetChanged ( struct KTUIDlg * self );
-
-TUI_EXTERN rc_t CC KTUIDlgGetRect ( struct KTUIDlg * self, tui_rect * r );
-TUI_EXTERN rc_t CC KTUIDlgSetRect ( struct KTUIDlg * self, const tui_rect * r, bool redraw );
-
-TUI_EXTERN bool CC KTUIDlgGetMenuActive ( const struct KTUIDlg * self );
-TUI_EXTERN rc_t CC KTUIDlgSetMenuActive ( struct KTUIDlg * self, bool active );
-TUI_EXTERN rc_t CC KTUIDlgSetMenu ( struct KTUIDlg * self, struct KTUI_Menu * menu );
-
-TUI_EXTERN const char * CC KTUIDlgGetWidgetCaption ( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetCaption ( struct KTUIDlg * self, uint32_t id, const char * caption );
-
-TUI_EXTERN struct KTUIPalette * CC KTUIDlgNewWidgetPalette ( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN rc_t CC KTUIDlgReleaseWidgetPalette ( struct KTUIDlg * self, uint32_t id );
-
-TUI_EXTERN rc_t CC KTUIDlgGetWidgetRect ( struct KTUIDlg * self, uint32_t id, tui_rect * r );
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetRect ( struct KTUIDlg * self, uint32_t id, const tui_rect * r, bool redraw );
-
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetCanFocus ( struct KTUIDlg * self, uint32_t id, bool can_focus );
-
-TUI_EXTERN bool CC KTUIDlgGetWidgetVisible ( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetVisible ( struct KTUIDlg * self, uint32_t id, bool visible );
-
-TUI_EXTERN bool CC KTUIDlgGetWidgetChanged ( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetChanged ( struct KTUIDlg * self, uint32_t id, bool changed );
-
-TUI_EXTERN bool CC KTUIDlgGetWidgetBoolValue ( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetBoolValue ( struct KTUIDlg * self, uint32_t id, bool value );
-
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetBg ( struct KTUIDlg * self, uint32_t id, KTUI_color value );
-TUI_EXTERN rc_t CC KTUIDlgReleaseWidgetBg ( struct KTUIDlg * self, uint32_t id );
-
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetFg ( struct KTUIDlg * self, uint32_t id, KTUI_color value );
-TUI_EXTERN rc_t CC KTUIDlgReleaseWidgetFg ( struct KTUIDlg * self, uint32_t id );
-
-TUI_EXTERN int64_t CC KTUIDlgGetWidgetInt64Value ( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetInt64Value ( struct KTUIDlg * self, uint32_t id, int64_t value );
-
-TUI_EXTERN int64_t CC KTUIDlgGetWidgetInt64Min ( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetInt64Min ( struct KTUIDlg * self, uint32_t id, int64_t value );
-
-TUI_EXTERN int64_t CC KTUIDlgGetWidgetInt64Max ( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetInt64Max ( struct KTUIDlg * self, uint32_t id, int64_t value );
-
-TUI_EXTERN int32_t CC KTUIDlgGetWidgetPercent ( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetPercent ( struct KTUIDlg * self, uint32_t id, int32_t value );
-TUI_EXTERN int32_t CC KTUIDlgGetWidgetPrecision ( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetPrecision( struct KTUIDlg * self, uint32_t id, int32_t value );
-TUI_EXTERN int32_t CC KTUIDlgCalcPercent ( int64_t value, int64_t max, uint32_t precision );
-
-TUI_EXTERN const char * CC KTUIDlgGetWidgetText( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetText ( struct KTUIDlg * self, uint32_t id, const char * value );
-TUI_EXTERN size_t CC KTUIDlgGetWidgetTextLength( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetTextLength ( struct KTUIDlg * self, uint32_t id, size_t value );
-
-TUI_EXTERN rc_t CC KTUIDlgAddWidgetString ( struct KTUIDlg * self, uint32_t id, const char * txt );
-TUI_EXTERN rc_t CC KTUIDlgAddWidgetStrings ( struct KTUIDlg * self, uint32_t id, VNamelist * src );
-TUI_EXTERN const char * CC KTUIDlgGetWidgetStringByIdx ( struct KTUIDlg * self, uint32_t id, uint32_t idx );
-TUI_EXTERN rc_t CC KTUIDlgRemoveWidgetStringByIdx ( struct KTUIDlg * self, uint32_t id, uint32_t idx );
-TUI_EXTERN rc_t CC KTUIDlgRemoveAllWidgetStrings ( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN uint32_t CC KTUIDlgGetWidgetStringCount ( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN uint32_t CC KTUIDlgHasWidgetString( struct KTUIDlg * self, uint32_t id, const char * txt );
-TUI_EXTERN uint32_t CC KTUIDlgGetWidgetSelectedString( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetSelectedString ( struct KTUIDlg * self, uint32_t id, uint32_t selection );
-
-TUI_EXTERN rc_t CC KTUIDlgAddLabel( struct KTUIDlg * self, uint32_t id, const tui_rect * r, const char * caption );
-TUI_EXTERN rc_t CC KTUIDlgAddLabel2( struct KTUIDlg * self, uint32_t id, uint32_t x, uint32_t y, uint32_t w,
-                                     const char * caption );
-
-TUI_EXTERN rc_t CC KTUIDlgAddBtn ( struct KTUIDlg * self, uint32_t id, const tui_rect * r, const char * caption );
-TUI_EXTERN rc_t CC KTUIDlgAddBtn2 ( struct KTUIDlg * self, uint32_t id, uint32_t x, uint32_t y, uint32_t w,
-                                    const char * caption );
-
-TUI_EXTERN rc_t CC KTUIDlgAddCheckBox ( struct KTUIDlg * self, uint32_t id, const tui_rect * r, const char * caption );
-
-TUI_EXTERN rc_t CC KTUIDlgAddInput ( struct KTUIDlg * self, uint32_t id, const tui_rect * r, const char * txt, size_t length );
-
-TUI_EXTERN rc_t CC KTUIDlgAddRadioBox ( struct KTUIDlg * self, uint32_t id, const tui_rect * r );
-
-TUI_EXTERN rc_t CC KTUIDlgAddList ( struct KTUIDlg * self, uint32_t id, const tui_rect * r );
-
-TUI_EXTERN rc_t CC KTUIDlgSetHScroll ( struct KTUIDlg * self, uint32_t id, bool enabled );
-
-
-TUI_EXTERN rc_t CC KTUIDlgAddProgress ( struct KTUIDlg * self, uint32_t id,
-                                        const tui_rect * r, int32_t percent, int32_t precision );
-
-TUI_EXTERN rc_t CC KTUIDlgAddSpinEdit ( struct KTUIDlg * self, uint32_t id,
-                                        const tui_rect * r, int64_t value, int64_t min, int64_t max );
-
-TUI_EXTERN bool CC KTUIDlgHasWidget ( struct KTUIDlg * self, uint32_t id );
-
-
-/* ****************************************************************************************** */
-
-typedef uint32_t TUIWGridStr;
-enum
-{
-    kGrid_Col = 1,
-    kGrid_Row,
-    kGrid_Cell
-};
-
-typedef void ( * TUIWGridCallbackStr  ) ( TUIWGridStr what,
-                                           uint64_t col, uint64_t row, uint32_t col_width,
-                                           const char ** value, void * data, void * instance );
-
-typedef uint32_t TUIWGridInt;
-enum
-{
-    kGrid_Get_Width = 1,
-    kGrid_Set_Width,
-    kGrid_Get_ColCount,
-    kGrid_Get_RowCount,
-    kGrid_Prepare_Page,
-    kGrid_Next_Row
-};
-
-typedef void ( * TUIWGridCallbackInt  ) ( TUIWGridInt what,
-                                           uint64_t col, uint32_t widget_width,
-                                           uint64_t * value, void * data, void * instance );
-
-typedef struct TUIWGrid_data
-{
-    TUIWGridCallbackStr  cb_str;
-    TUIWGridCallbackInt  cb_int;
-    void * data;
-    void * instance;
-    void * int_string_cache;
-    uint64_t col, row, col_offset, row_offset;
-    bool show_header, show_row_header, show_h_scroll, show_v_scroll, row_offset_changed;
-    uint32_t default_col_width, row_hdr_width;
-} TUIWGrid_data;
-
-
-TUI_EXTERN rc_t CC KTUIDlgAddGrid ( struct KTUIDlg * self, uint32_t id,
-                                    const tui_rect * r, TUIWGrid_data * grid_data, bool cached );
-
-TUI_EXTERN TUIWGrid_data * CC KTUIDlgGetWidgetGridData( struct KTUIDlg * self, uint32_t id );
-TUI_EXTERN rc_t CC KTUIDlgSetWidgetGridData( struct KTUIDlg * self, uint32_t id, TUIWGrid_data * grid_data, bool cached );
-
-
-TUI_EXTERN rc_t CC KTUIDlgGetGridCol( struct KTUIDlg * self, uint32_t id, uint64_t *col );
-TUI_EXTERN rc_t CC KTUIDlgSetGridCol( struct KTUIDlg * self, uint32_t id, uint64_t col );
-TUI_EXTERN rc_t CC KTUIDlgGetGridRow( struct KTUIDlg * self, uint32_t id, uint64_t *row );
-TUI_EXTERN rc_t CC KTUIDlgSetGridRow( struct KTUIDlg * self, uint32_t id, uint64_t row );
-
-/* ****************************************************************************************** */
-
-
-TUI_EXTERN rc_t CC KTUIDlgRemove ( struct KTUIDlg * self, uint32_t id );
-
-TUI_EXTERN rc_t CC KTUIDlgDraw( struct KTUIDlg * self, bool forced );
-
-TUI_EXTERN rc_t CC KTUIDlgDrawWidget( struct KTUIDlg * self, uint32_t id );
-
-TUI_EXTERN rc_t CC KTUIDlgDrawCaption( struct KTUIDlg * self );
-
-
-TUI_EXTERN rc_t CC KTUIDlgSetFocus( struct KTUIDlg * self, uint32_t id );
-
-TUI_EXTERN rc_t CC KTUIDlgMoveFocus( struct KTUIDlg * self, bool forward );
-
-TUI_EXTERN bool CC KTUIDlgFocusValid( struct KTUIDlg * self );
-
-TUI_EXTERN uint32_t CC KTUIDlgGetFocusId( struct KTUIDlg * self );
-
-TUI_EXTERN void KTUIDlgPushEvent( struct KTUIDlg * self,
-                       KTUIDlg_event_type event_type, uint32_t widget_id,
-                       uint64_t value_1, uint64_t value_2, void * ptr_0 );
-
-TUI_EXTERN rc_t CC KTUIDlgHandleEvent( struct KTUIDlg * self, tui_event * event );
-
-TUI_EXTERN rc_t CC KTUIDlgGet ( struct KTUIDlg * self, tuidlg_event * event );
-
-
-/* ****************************************************************************************** */
-
-TUI_EXTERN rc_t CC TUI_ShowMessage ( struct KTUI * tui, struct KTUIDlg * parent, const char * caption,
-                       const char * txt, uint32_t x, uint32_t y, uint32_t w, KTUI_color bg1, KTUI_color bg2 );
-
-TUI_EXTERN rc_t CC TUI_YesNoDlg ( struct KTUI * tui, struct KTUIDlg * parent, const char * caption,
-                    const char * question, uint32_t x, uint32_t y, uint32_t w, bool * yes, KTUI_color bg1, KTUI_color bg2 );
-
-TUI_EXTERN rc_t CC TUI_ShowFile( struct KTUI * tui, struct KTUIDlg * parent, const char * caption,
-                   const char * filename, tui_rect * r, KTUI_color bg1, KTUI_color bg2 );
-
-TUI_EXTERN rc_t CC TUI_EditBuffer( struct KTUI * tui, struct KTUIDlg * parent, const char * caption,
-                     char * buffer, size_t buflen, uint32_t x, uint32_t y, uint32_t w, bool * selected,
-                     KTUI_color bg1, KTUI_color bg2 );
-
-TUI_EXTERN rc_t CC TUI_PickFromList( struct KTUI * tui, struct KTUIDlg * parent,
-        const char * caption, const VNamelist * list,
-        uint32_t * selection, tui_rect * r, bool * selected, KTUI_color bg1, KTUI_color bg2 );
-
-TUI_EXTERN rc_t CC FileDlg ( struct KTUI * tui, struct KTUIDlg * parent,
-        char * buffer, uint32_t buffer_size, const char * extension, bool * done, tui_rect * r,
-        uint32_t dir_h, KTUI_color bg1, KTUI_color bg2 );
-
-TUI_EXTERN rc_t CC DirDlg ( struct KTUI * tui, struct KTUIDlg * parent,
-        char * buffer, uint32_t buffer_size, bool * done, tui_rect * r,
-        KTUI_color bg1, KTUI_color bg2, bool allow_dir_create );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_tui_dlg_ */
diff --git a/interfaces/vdb/blob.h b/interfaces/vdb/blob.h
deleted file mode 100644
index 2474091..0000000
--- a/interfaces/vdb/blob.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vdb_blob_
-#define _h_vdb_blob_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-
-
-/*--------------------------------------------------------------------------
- * VBlob
- *  a collection of data cells
- */
-typedef struct VBlob VBlob;
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-VDB_EXTERN rc_t CC VBlobAddRef ( const VBlob *self );
-VDB_EXTERN rc_t CC VBlobRelease ( const VBlob *self );
-
-
-/* IdRange
- *  returns id range for blob
- *
- *  "first" [ OUT, NULL OKAY ] and "count" [ OUT, NULL OKAY ] -
- *  id range is returned in these output parameters, where
- *  at least ONE must be NOT-NULL
- */
-VDB_EXTERN rc_t CC VBlobIdRange ( const VBlob *self,
-    int64_t *first, uint64_t *count );
-
-/* Size
- *  returns the size of a blob in bytes
- *
- *  AVAILABILITY: version 2.7
- */
-VDB_EXTERN rc_t CC VBlobSize ( const VBlob * self, size_t * bytes );
-
-
-/* Read
- *  read entire single cell of byte-aligned data into a buffer
- *
- *  "row_id" [ IN ] - allows ReadDirect random access to any cell
- *  in column
- *
- *  "elem_bits" [ IN ] - expected element size in bits, required
- *  to be compatible with the actual element size, and be a multiple
- *  of 8 ( byte-aligned ). for non-byte-aligned data, see ReadBits
- *
- *  "buffer" [ OUT ] and "blen" [ IN ] - return buffer for row data
- *  where "blen" gives buffer capacity in elements. the total buffer
- *  size in bytes == ( "elem_bits" * "blen" + 7 ) / 8.
- *
- *  "row_len" [ OUT ] - return parameter for the number of elements
- *  in the requested row.
- *
- *  when the return code is 0, "row_len" will contain the number of
- *  elements read into buffer. if the return code indicates that the
- *  buffer is too small, "row_len" will give the required buffer length.
- */
-VDB_EXTERN rc_t CC VBlobRead ( const VBlob *self, int64_t row_id,
-    uint32_t elem_bits, void *buffer, uint32_t blen, uint32_t *row_len );
-
-
-/* ReadBits
- *  read single row of potentially bit-aligned cell data into a buffer
- *
- *  "elem_bits" [ IN ] - expected element size in bits, required to be
- *  compatible with the actual element size, and may ( or may not ) be
- *  a multiple of 8 ( byte aligned ).
- *
- *  "start" [ IN ] - zero-based starting index to first element,
- *  valid from 0 .. row_len - 1
- *
- *  "buffer" [ IN ], "boff" [ IN ] and "blen" [ IN ] -
- *  return buffer for row data, where "boff" is in BITS
- *  and "blen" is in ELEMENTS.
- *
- *  "num_read" [ OUT ] - return parameter for the number of elements
- *  read, which is <= "blen"
- *
- *  "remaining" [ OUT, NULL OKAY ] - optional return parameter for
- *  the number of elements remaining to be read. specifically,
- *  "start" + "num_read" + "remaining" == row length, assuming that
- *  "start" <= row length.
- */
-VDB_EXTERN rc_t CC VBlobReadBits ( const VBlob *self, int64_t row_id,
-    uint32_t elem_bits, uint32_t start, void *buffer, uint32_t boff,
-    uint32_t blen, uint32_t *num_read, uint32_t *remaining );
-
-
-/* CellData
- *  access pointer to single cell of potentially bit-aligned cell data
- *
- *  "elem_bits" [ OUT, NULL OKAY ] - optional return parameter for
- *  element size in bits
- *
- *  "base" [ OUT ] and "boff" [ OUT, NULL OKAY ] -
- *  compound return parameter for pointer to row starting bit
- *  where "boff" is in BITS
- *
- *  "row_len" [ OUT, NULL OKAY ] - the number of elements in cell
- */
-VDB_EXTERN rc_t CC VBlobCellData ( const VBlob *self, int64_t row_id,
-    uint32_t *elem_bits, const void **base, uint32_t *boff, uint32_t *row_len );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_vdb_blob_ */
diff --git a/interfaces/vdb/built-in.vschema b/interfaces/vdb/built-in.vschema
deleted file mode 100644
index 25cb28b..0000000
--- a/interfaces/vdb/built-in.vschema
+++ /dev/null
@@ -1,412 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * VDB built-in functions, formats and types
- */
-version 1;
-
-
-/*--------------------------------------------------------------------------
- * types
- */
-
-// Row id range consist of row_id_start and row_id_stop
-typedef I64 vdb:row_id_range [ 2 ];
-
-
-/*--------------------------------------------------------------------------
- * typesets
- */
-typeset integer_set { I8, U8, I16, U16, I32, U32, I64, U64 };
-typeset float_set { F32, F64 };
-typeset numeric_set { integer_set, float_set };
-typeset text_set { utf8, utf16, utf32, ascii };
-typeset text8_set { utf8, ascii };
-typeset transpose_set { B8, B16, B32, B64 };
-
-
-/*--------------------------------------------------------------------------
- * formats
- */
-fmtdef merged_fmt;
-fmtdef transposed_fmt;
-fmtdef delta_averaged_fmt;
-
-
-/*--------------------------------------------------------------------------
- * constants
- */
-const U8 ALIGN_LEFT = 0;
-const U8 ALIGN_RIGHT = 1;
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-
-/* cast
- *  performs a "C++ reinterpret_cast" style cast
- *  rewrites input as required to produce output
- *
- *  legal operations include numeric_set -> numeric_set,
- *  numeric <-> character, etc.
- */
-function
-any cast #1.0 ( any in )
-    = vdb:cast;
-
-/* bit_or
- *  performs a bitwise operation 'OR' for every byte in A and B
- *  A and B are not neccesarily have the same size
- *  the resulting row will have the size of B while OR operation is done for portion of A overlapping B
- *  For different sizes of A and B 'align' parameter provides what edge of A and B are aligned
- *  possible values ALIGN_LEFT, ALIGN_RIGHT
- * 
- */
-function < type T >
-T  bit_or #1 < U8 align > ( T  A, T B  )
-    = vdb:bit_or;
-
-/* trim
- * performs trimming of value val from column A
- * align provides left- or right- trimming
- */
-function < type T >
-T trim #1 < U8 align, T val > ( T A )
-    = vdb:trim;
-
-
-/* redimension
- *  performs a change of dimension without changing bit pattern
- */
-function
-any redimension #1.0 ( any in )
-    = vdb:redimension;
-
-
-/* row_id
- *  returns the row id of a request
- */
-function
-I64 row_id #1.0 ()
-    = vdb:row_id;
-
-
-/* row_len
- *  returns the number of elements in a row
- *
- *  "in" [ DATA ] - column supplying row. if row does not exist
- *  in column, the resultant length is 0.
- */
-function
-U32 row_len #1.0 ( any in )
-    = vdb:row_len;
-
-
-/* fixed_row_len
- *  returns non-zero if the entire page
- *  has a uniform row-length, zero otherwise
- *
- *  "in" [ DATA ] - column to query
- */
-function
-U32 fixed_row_len #1.0 ( any in )
-    = vdb:fixed_row_len;
-
-
-/* compare
- *  evaluates src [ i ] == cmp [ i ]
- *  causes writing exception if unequal.
- *
- *  For whole types, equality is bitwise equal
- *  for floating point types see below.
- *
- *  "T" [ TYPE ] - base element type to be processed
- *
- *  "sig_bits" [ OPTIONAL CONST >= 1 ] - for floating point types, ignored
- *  otherwise, the number of significant binary digits in the mantissas to
- *  compare such that |x - y| <= 1, for corresponding numbers x (in a) and
- *  y (in b) both scaled according to sig_bits and their common magnitude.
- *  "sig_bits" may be an array, if so "sel" is required (see below).
- *
- *  "src" [ DATA ] - standard input data derived from source
- *
- *  "cmp" [ DATA ] - feedback data after being written and re-read
- *
- */
-validate function < type T >
-void compare #1.0 < * U32 sig_bits > ( T src, T cmp )
-    = vdb:compare;
-
-validate function < type T >
-void no_compare #1.0 ( T src, T cmp )
-    = vdb:no_compare;
-
-
-/* compare2f
- *  evaluates src [ i ] == cmp [ i ]
- *  causes writing exception if unequal.
- *
- *  "T" [ TYPE ] - base element type to be processed
- *
- *  "sig_bits" [ CONST >= 1 ] - for floating point types, ignored otherwise,
- *  array containing the number of significant binary digits in the mantissas
- *  to compare such that |x - y| <= 1, for corresponding numbers x (in a) and
- *  y (in b) both scaled according to sig_bits and their common magnitude.
- *
- *  "src" [ DATA ] - standard input data derived from source
- *
- *  "cmp" [ DATA ] - feedback data after being written and re-read
- *
- *  "sel" [ DATA ] - data to select which element of "sig_bits" to
- *  use for the comparison.  The valid values of "sel" are
- *  [0 .. length sig_bits).
- *
-validate function < type T >
-void compare2f #1.0 < U32 sig_bits > ( float_set src, float_set cmp, T sel )
-    = vdb:compare2f;
-*/
-
-/* range_validate
- *  passes input through if all values fall between lower and
- *  upper bounds, INCLUSIVE
- *
- *  "T" [ TYPE ] - type to be validated
- *
- *  "lower" [ CONST ] and "upper" [ CONST ] - inclusive
- *  bounds on input values
- *
- *  "in" [ DATA ] - data to be validated
- */
-function < type T >
-T range_validate #1.0 < T lower, T upper > ( T in )
-    = vdb:range_validate;
-
-
-/* select
- *  return first non-empty input for id
- *  inputs are taken from first to last
- *
- *  "T" [ TYPE ] - data type of selection
- *
- *  "first" [ DATA ] - first of N inputs
- *
- *  "second" [ DATA ] - second of N inputs
- *  all other inputs are optional and must
- *  be compatible with type "T"
- */
-function < type T >
-T select #1.0 ( T first, T second, ... )
-    = vdb:select;
-
-
-/* transpose
- *  transpose a page of unformatted data
- *
- *  for example - convert a simple page of values,
- *  where vertical scale is row id and horizontal element index:
- *
- *        1   2   3
- *      +---+---+---+
- *    1 | a | b | c |
- *      +---+---+---+
- *    2 | d | e | f |
- *      +---+---+---+
- *    3 | g | h | i |
- *      +---+---+---+
- *    4 | j | k | l |
- *      +---+---+---+
- *
- *  into:
- *
- *        1   2   3   4
- *      +---+---+---+---+
- *    1 | a | d | g | j |
- *      +---+---+---+---+
- *    2 | b | e | h | k |
- *      +---+---+---+---+
- *    3 | c | f | i | l |
- *      +---+---+---+---+
- *
- *  variable row-lengths are supported. The output blob is
- *  formatted, meaning that the result can no longer be addressed
- *  as a matrix, but the transposition has be applied to data.
- *
- *  "in" [ DATA ] - unformatted data to be transposed
- */
-function
-transposed_fmt transpose #1 ( transpose_set in )
-    = vdb:transpose;
-
-
-/* detranspose
- *  pardoning the awful name, apply a transposition on the result
- *  of "transpose" to produce the original blob. "transpose"
- *  itself cannot be reused because of its signature.
- */
-function
-transpose_set detranspose #1 ( transposed_fmt in )
-    = vdb:detranspose;
-
-/*
- * delta_average computes average representation of the maximium 
- * lengh row and deltas every row against it
- */
-function
-delta_averaged_fmt delta_average #1 ( any in ) 
-     = vdb:delta_average;
-
-function
-any undelta_average #1 ( delta_averaged_fmt in )
-    = vdb:undelta_average;
-
-/* merge
- *  merges all input blobs of any format/type into a single blob
- */
-function
-merged_fmt merge #1.0 ( any in, ... )
-    = vdb:merge;
-
-
-/* split
- *  extracts a single blob from a merged blob by index
- *
- *  "idx" [ CONST ] - blob index
- */
-
-function
-any split #1.0 < U32 idx > ( merged_fmt in )
-    = vdb:split;
-
-
-/* meta:read
- *  reads table metadata node as a row
- * meta:value
- *  reads metadata node as single value,
- *  performing size conversion if necessary,
- *  e.g. I8 TO I64, I32 TO I16
- *
- *  "T" [ TYPE ] - cast data type of metadata node
- *
- *  "node" [ CONST ] - path to metadata node
- */
-function < type T >
-T meta:read #1.0 < ascii node, * bool deterministic > ();
-
-function < type T >
-T meta:value #1.0 < ascii node, * bool deterministic > ();
-
-
-/* meta:write
- *  writes row data to table metadata node
- *
- *  "T" [ TYPE ] - cast data type of metadata node
- *
- *  "node" [ CONST ] - path to metadata node
- *
- *  "in" [ DATA ] - source of row data
- */
-function < type T >
-T meta:write #1.0 < ascii node > ( T in );
-
-
-/* meta:attr:read
- *  reads table metadata attribute as a row
- *
- *  "node" [ CONST ] - path to metadata node
- *
- *  "attr" [ CONST ] - attribute name on node
- */
-function
-ascii meta:attr:read #1.0 < ascii node, ascii attr, * bool deterministic > ();
-
-
-/* meta:attr:write
- *  write row data as table metadata attribute
- *
- *  "node" [ CONST ] - path to metadata node
- *
- *  "attr" [ CONST ] - attribute name on node
- */
-function
-ascii meta:attr:write #1.0 < ascii node, ascii attr > ( ascii in );
-
-
-/* parameter:read
- *  reads named cursor parameter text
- *
- *  "name" [ CONST ] - parameter name
- */
-function
-text8_set parameter:read #1.0 < ascii name, * bool deterministic > ();
-
-
-/* environment:read
- *  reads named environment variable text
- *
- *  "name" [ CONST ] - environment variable name
- */
-function
-text8_set environment:read #1.0 < ascii name > ();
-
-// case sensivity mode
-const U8 CASE_SENSITIVE         =  0;
-const U8 CASE_INSENSITIVE_LOWER =  1;
-const U8 CASE_INSENSITIVE_UPPER =  2;
-
-/* idx:text:project
- *  perform a reverse lookup in an index
- *  if key not found then use substitute
- *
- *  "index_name" [ CONST ] - name of text index
- *
- *  "substitute" [ DATA, OPTIONAL ] - source
- *  of values to substitute for values not
- *  found in the index.
- *
- *  Version 1.1: look into "substitute" (if available) first and then to the index,
- *  added parameter "case_sensitivity"
- */
-function text8_set idx:text:project #1.1 < ascii index_name, * U8 case_sensitivity > ( * text8_set substitute );
-
-
-/* idx:text:insert
- *  inserts "key" into index. returns key if insertion into index failed or
- *  when "case_insensitive" is true
- *
- *  Version 1.1: added parameter "case_sensitivity"
- */
-function text8_set idx:text:insert #1.1 < ascii index_name, * U8 case_sensitivity > ( text8_set key );
-
-
-/* idx:text:lookup
- *  perform a lookup in an index
- *  returns vdb:row_id_range associated with the
- *
- *  Version 1.1: added parameter "case_sensitivity"
- */
-function vdb:row_id_range  idx:text:lookup #1.1 < ascii index_name , ascii query_by_name, * U8 case_sensitivity > ();
diff --git a/interfaces/vdb/cursor.h b/interfaces/vdb/cursor.h
deleted file mode 100644
index e596be6..0000000
--- a/interfaces/vdb/cursor.h
+++ /dev/null
@@ -1,490 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vdb_cursor_
-#define _h_vdb_cursor_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_klib_namelist_
-#include <klib/namelist.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct VBlob;
-struct VTable;
-struct VTypedesc;
-struct VTypedecl;
-
-
-/*--------------------------------------------------------------------------
- * KCreateMode
- *  mode definitions for cursor creation
- *
- *  NB - typedef'd as uint32_t in <klib/defs.h> to ensure uniformly
- *  predictable binary representation.
- */
-enum
-{
-    kcmUpdate,          /* kcmOpen   */
-    kcmReplace,         /* kcmInit   */
-    kcmInsert           /* kcmCreate */
-};
-
-/*--------------------------------------------------------------------------
- * VCursor
- *  a row cursor onto a VTable
- */
-typedef struct VCursor VCursor;
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-VDB_EXTERN rc_t CC VCursorAddRef ( const VCursor *self );
-VDB_EXTERN rc_t CC VCursorRelease ( const VCursor *self );
-
-
-/* CreateCursor
- *  creates a cursor object onto table
- *  multiple read cursors are allowed
- *  only a single write cursor is allowed
- *
- *  "curs" [ OUT ] - return parameter for newly created cursor
- *
- *  "mode" [ IN ] - describes update behavior
- *    kcmUpdate   : allow inserts or updates
- *    kcmReplace  : replace all existing rows with newly written rows
- *    kcmInsert   : allow only inserts, i.e. new rows
- *
- *  NB - CreateCursorRead will be deprecated in future releases
- *  use CreateCachedCursorRead instead.
- */
-VDB_EXTERN rc_t CC VTableCreateCursorRead ( struct VTable const *self, const VCursor **curs );
-VDB_EXTERN rc_t CC VTableCreateCursorWrite ( struct VTable *self, VCursor **curs, KCreateMode mode );
-
-
-/* CreateCachedCursorRead
- *  creates a read cursor object onto table with a cache limit in bytes
- *
- *  AVAILABILITY: version 2.1
- *
- *  "curs" [ OUT ] - return parameter for newly created cursor
- *
- *  "capacity" [ IN ] - the maximum bytes to cache on the cursor before
- *  dropping least recently used blobs
- */
-VDB_EXTERN rc_t CC VTableCreateCachedCursorRead ( struct VTable const *self,
-    const VCursor **curs, size_t capacity );
-
-
-/* AddColumn
- *  add a column to an unopened cursor
- *
- *  "idx" [ OUT ] - return parameter for column index
- *
- *  "name" [ IN ] - NUL terminated column name spec.
- *  to identify a column by name, provide the column name
- *  by itself. if there are multiple types available under
- *  that name, the default type for that column will be
- *  selected. to select a specific type, the name may
- *  be cast to that type using a cast expression, e.g.
- *    "( type ) name"
- *
- * NB - may return a non-zero status code of rcColumn, rcExists
- *  if the column was not added. the return "idx" will still
- *  be set properly and this does NOT indicate an error.
- */
-VDB_EXTERN rc_t CC VCursorAddColumn ( const VCursor *self,
-    uint32_t *idx, const char *name, ... );
-VDB_EXTERN rc_t CC VCursorVAddColumn ( const VCursor *self,
-    uint32_t *idx, const char *name, va_list args );
-
-
-/* GetColumnIdx
- *  retrieve column index by name spec
- *
- *  "idx" [ OUT ] - return parameter for column index
- *
- *  "name" [ IN ] - NUL terminated column name spec.
- */
-VDB_EXTERN rc_t CC VCursorGetColumnIdx ( const VCursor *self,
-    uint32_t *idx, const char *name, ... );
-VDB_EXTERN rc_t CC VCursorVGetColumnIdx ( const VCursor *self,
-    uint32_t *idx, const char *name, va_list args );
-
-
-/* Datatype
- *  returns typedecl and/or typedef for column data
- *
- *  "idx" [ IN ] - column index
- *
- *  "type" [ OUT, NULL OKAY ] - returns the column type declaration
- *
- *  "def" [ OUT, NULL OKAY ] - returns the definition of the type
- *  returned in "type_decl"
- *
- * NB - one of "type" and "def" must be non-NULL
- */
-VDB_EXTERN rc_t CC VCursorDatatype ( const VCursor *self, uint32_t idx,
-    struct VTypedecl *type, struct VTypedesc *desc );
-
-
-/* IdRange
- *  returns id range for column
- *
- *  "idx" [ IN, DEFAULT ZERO ] - single column index or
- *  zero to indicate the range for all columns in cursor
- *
- *  "id" [ IN ] - page containing this row id is target
- *
- *  "first" [ OUT, NULL OKAY ] and "count" [ OUT, NULL OKAY ] -
- *  id range is returned in these output parameters, where
- *  at least ONE must be NOT-NULL
- */
-VDB_EXTERN rc_t CC VCursorIdRange ( const VCursor *self, uint32_t idx,
-    int64_t *first, uint64_t *count );
-
-
-/* Open
- *  open cursor, resolving schema for the set of opened columns
- *
- *  when cursor is created for read, its initial row id
- *  is set to first row available in any contained column.
- *
- *  when cursor is created for write, its initial row id
- *  is set for inserts ( appending ). when empty, initial
- *  row id is set to 1. otherwise, it is set to 1 beyond
- *  the last row available in any contained column.
- *
- *  NB - there is no corresponding "Close"
- *  use "Release" instead.
- */
-VDB_EXTERN rc_t CC VCursorOpen ( const VCursor *self );
-
-
-/* RowId
- *  report current row id
- * SetRowId
- *  seek to given row id
- */
-VDB_EXTERN rc_t CC VCursorRowId ( const VCursor *self, int64_t *row_id );
-VDB_EXTERN rc_t CC VCursorSetRowId ( const VCursor *self, int64_t row_id );
-
-
-/* FindNextRowId
- * FindNextRowIdDirect
- *  returns next non-empty row given either the cursor's current row-id + 1,
- *  or a direct "start_id" provided as a parameter.
- *
- *  if the starting row-id has a non-null cell, that row-id will be returned.
- *  otherwise, the first row-id following the starting id that has a non-null cell
- *  will be returned. in the event that no non-null cells can be found, the returned
- *  rc_t will have RCState of rcNotFound.
- *
- *  "idx" [ IN, ZERO OKAY ] - when non-zero, represents the one-based index of a
- *  particular column. when zero, represents all columns simultaneously.
- *
- *  "start_id" [ IN ] - when specified directly, gives a starting row id to
- *  use when starting the search for non-null cells. if the row "start_id"
- *  contains non-null cells, it will be returned immediately.
- *
- *  when "start_id" is not used ( VCursorFindNextRowId ), the cursor's current
- *  row-id + 1 will be substituted. the meaning is that if the last accessed
- *  row was valid, this will find the next valid row. if the last accessed row
- *  was not valid ( null cell ), then it is known to be invalid and the search
- *  starts with the following row.
- *
- *  "next" [ OUT ] - return parameter for found row-id. when the "rc_t" is 0
- */
-VDB_EXTERN rc_t CC VCursorFindNextRowId ( const VCursor *self,
-    uint32_t idx, int64_t * next );
-VDB_EXTERN rc_t CC VCursorFindNextRowIdDirect ( const VCursor *self,
-    uint32_t idx, int64_t start_id, int64_t * next );
-
-
-/* OpenRow
- *  open currently closed row indicated by row id
- */
-VDB_EXTERN rc_t CC VCursorOpenRow ( const VCursor *self );
-
-/* CommitRow
- *  commit row after writing
- *  prevents further writes
- */
-VDB_EXTERN rc_t CC VCursorCommitRow ( VCursor *self );
-
-/* RepeatRow
- *  repeats the current row by the count provided
- *  row must have been committed
- *
- *  AVAILABILITY: version 2.6
- *
- *  "count" [ IN ] - the number of times to repeat
- *  the current row.
- */
-VDB_EXTERN rc_t CC VCursorRepeatRow ( VCursor *self, uint64_t count );
-
-/* CloseRow
- *  balances OpenRow message
- *  if there are uncommitted modifications,
- *  discard all changes. otherwise,
- *  advance to next row
- */
-VDB_EXTERN rc_t CC VCursorCloseRow ( const VCursor *self );
-
-
-/* FlushPage
- *  forces flush of all buffered page data
- *  fails if row is open
- *
- *  pages are normally auto-committed based upon
- *  size and column affinity
- */
-VDB_EXTERN rc_t CC VCursorFlushPage ( VCursor *self );
-
-
-/* GetBlob
- *  retrieve a blob of data containing the current row id
- * GetBlobDirect
- *  retrieve a blob of data containing the requested row id
- *
- *  "blob" [ OUT ] - return parameter for a new reference
- *  to VBlob containing requested cell. NB - must be released
- *  via VBlobRelease when no longer needed.
- *
- *  "row_id" [ IN ] - allows ReadDirect random access to any cell
- *  in column
- *
- *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
- */
-VDB_EXTERN rc_t CC VCursorGetBlob ( const VCursor *self,
-    struct VBlob const **blob, uint32_t col_idx );
-VDB_EXTERN rc_t CC VCursorGetBlobDirect ( const VCursor *self,
-    struct VBlob const **blob, int64_t row_id, uint32_t col_idx );
-
-
-/* Read
- *  read entire single row of byte-aligned data into a buffer
- * ReadDirect
- *  bypass the need to use SetRowId/OpenRow/CloseRow for addressing
- *
- *  "row_id" [ IN ] - allows ReadDirect random access to any cell
- *  in column
- *
- *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
- *
- *  "elem_bits" [ IN ] - expected element size in bits, required
- *  to be compatible with the actual element size, and be a multiple
- *  of 8 ( byte-aligned ). for non-byte-aligned data, see ReadBits
- *
- *  "buffer" [ OUT ] and "blen" [ IN ] - return buffer for row data
- *  where "blen" gives buffer capacity in elements. the total buffer
- *  size in bytes == ( "elem_bits" * "blen" + 7 ) / 8.
- *
- *  "row_len" [ OUT ] - return parameter for the number of elements
- *  in the requested row.
- *
- *  when the return code is 0, "row_len" will contain the number of
- *  elements read into buffer. if the return code indicates that the
- *  buffer is too small, "row_len" will give the required buffer length.
- */
-VDB_EXTERN rc_t CC VCursorRead ( const VCursor *self, uint32_t col_idx,
-    uint32_t elem_bits, void *buffer, uint32_t blen, uint32_t *row_len );
-VDB_EXTERN rc_t CC VCursorReadDirect ( const VCursor *self, int64_t row_id, uint32_t col_idx,
-    uint32_t elem_bits, void *buffer, uint32_t blen, uint32_t *row_len );
-
-
-/* ReadBits
- *  read single row of potentially bit-aligned column data into a buffer
- * ReadBitsDirect
- *  bypass the need to use SetRowId/OpenRow/CloseRow for addressing
- *
- *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
- *
- *  "elem_bits" [ IN ] - expected element size in bits, required to be
- *  compatible with the actual element size, and may ( or may not ) be
- *  a multiple of 8 ( byte aligned ).
- *
- *  "start" [ IN ] - zero-based starting index to first element,
- *  valid from 0 .. row_len - 1
- *
- *  "buffer" [ IN ], "boff" [ IN ] and "blen" [ IN ] -
- *  return buffer for row data, where "boff" is in BITS
- *  and "blen" is in ELEMENTS.
- *
- *  "num_read" [ OUT ] - return parameter for the number of elements
- *  read, which is <= "blen"
- *
- *  "remaining" [ OUT, NULL OKAY ] - optional return parameter for
- *  the number of elements remaining to be read. specifically,
- *  "start" + "num_read" + "remaining" == row length, assuming that
- *  "start" <= row length.
- */
-VDB_EXTERN rc_t CC VCursorReadBits ( const VCursor *self, uint32_t col_idx,
-    uint32_t elem_bits, uint32_t start, void *buffer, uint32_t boff,
-    uint32_t blen, uint32_t *num_read, uint32_t *remaining );
-VDB_EXTERN rc_t CC VCursorReadBitsDirect ( const VCursor *self, int64_t row_id, uint32_t col_idx,
-    uint32_t elem_bits, uint32_t start, void *buffer, uint32_t boff,
-    uint32_t blen, uint32_t *num_read, uint32_t *remaining );
-
-
-/* CellData
- *  access pointer to single cell of potentially bit-aligned column data
- * CellDataDirect
- *  bypass the need to use SetRowId/OpenRow/CloseRow for addressing
- *
- *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
- *
- *  "elem_bits" [ OUT, NULL OKAY ] - optional return parameter for
- *  element size in bits
- *
- *  "base" [ OUT ] and "boff" [ OUT, NULL OKAY ] -
- *  compound return parameter for pointer to row starting bit
- *  where "boff" is in BITS
- *
- *  "row_len" [ OUT, NULL OKAY ] - the number of elements in cell
- */
-VDB_EXTERN rc_t CC VCursorCellData ( const VCursor *self, uint32_t col_idx,
-    uint32_t *elem_bits, const void **base, uint32_t *boff,
-    uint32_t *row_len );
-VDB_EXTERN rc_t CC VCursorCellDataDirect ( const VCursor *self, int64_t row_id,
-    uint32_t col_idx, uint32_t *elem_bits, const void **base,
-    uint32_t *boff, uint32_t *row_len );
-
-
-/* VCursorDataPrefetch
- * -- will prefecth rows into CursorCache (if it exists)
- * -- no OUT parameters - just primes the cache 
- * -- will cache every produced blob (even a small one)
- * -- will suspend flushing the cache after inserting first row
- * -- conducts sort-unique on row_ids to linearize data access
- *
- * "row_ids" [ IN ] - rows to be prefetched
- * 
- * "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
- * 
- * "num_rows" [ IN ] -  number of rows in row_ids
- *
- * "min/max_valid_row_id [IN] - ignor all row_ids[i] which will not hit this range
- * 
- * "continue_on_error" [ IN ] - whether to continue on a failure to prefetch a rows
- */
-
-LIB_EXPORT rc_t CC VCursorDataPrefetch ( const VCursor * self,
-    const int64_t * row_ids, uint32_t col_idx, uint32_t num_rows,
-    int64_t min_valid_row_id, int64_t max_valid_row_id, bool continue_on_error );
-
-
-/* Default
- *  give a default row value for cell
- *  TBD - document full cell data, not append
- *
- *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
- *
- *  "elem_bits" [ IN ] - stated element size in bits, required
- *  to be compatible with the actual element size
- *
- *  "buffer" [ IN ] and "boff" [ IN ] - compound pointer and offset
- *  to start of default row data where "boff" is in BITS
- *
- *  "row_len" [ IN ] - the number of elements in default row
- */
-VDB_EXTERN rc_t CC VCursorDefault ( VCursor *self, uint32_t col_idx,
-    bitsz_t elem_bits, const void *buffer, bitsz_t boff,
-    uint64_t row_len );
-
-
-/* Write
- *  append bit-aligned column data to cell
- *
- *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
- *
- *  "elem_bits" [ IN ] - stated element size in bits, required
- *  to be compatible with the actual element size
- *
- *  "buffer" [ IN ] and "boff" [ IN ] - compound pointer and offset
- *  to start of default row data where "boff" is in BITS
- *
- *  "count" [ IN ] - the number of elements to append
- */
-VDB_EXTERN rc_t CC VCursorWrite ( VCursor *self, uint32_t col_idx,
-    bitsz_t elem_bits, const void *buffer, bitsz_t boff,
-    uint64_t count );
-
-
-/* Commit
- *  commit changes made to cursor
- *  fails if row is open
- */
-VDB_EXTERN rc_t CC VCursorCommit ( VCursor *self );
-
-
-/* OpenParent
- *  duplicate reference to parent table
- *  NB - returned reference must be released
- */
-VDB_EXTERN rc_t CC VCursorOpenParentRead ( const VCursor *self, struct VTable const **tbl );
-VDB_EXTERN rc_t CC VCursorOpenParentUpdate ( VCursor *self, struct VTable **tbl );
-
-
-/* GetUserData
- * SetUserData
- *  store/retrieve an opaque pointer to user data
- *
- *  "data" [ OUT ] - return parameter for getting data
- *  "data" [ IN ] - parameter for setting data
- *
- *  "destroy" [ IN, NULL OKAY ] - optional destructor param
- *  invoked from destructor of "self"
- */
-VDB_EXTERN rc_t CC VCursorGetUserData ( const VCursor *self, void **data );
-VDB_EXTERN rc_t CC VCursorSetUserData ( const VCursor *self,
-    void *data, void ( CC * destroy ) ( void *data ) );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_vdb_cursor_ */
diff --git a/interfaces/vdb/cursor.hpp b/interfaces/vdb/cursor.hpp
deleted file mode 100644
index ba89e2d..0000000
--- a/interfaces/vdb/cursor.hpp
+++ /dev/null
@@ -1,388 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb_cursor_
-#define _hpp_vdb_cursor_
-
-#ifndef _h_vdb_cursor_
-#include <vdb/cursor.h>
-#endif
-
-
-/*--------------------------------------------------------------------------
- * VCursor
- *  a row cursor onto a VTable
- */
-struct VCursor
-{
-    /* AddRef
-     * Release
-     *  all objects are reference counted
-     *  NULL references are ignored
-     */
-    inline rc_t AddRef () const throw()
-    { return VCursorAddRef ( this ); }
-
-    inline rc_t Release () const throw()
-    { return VCursorRelease ( this ); }
-
-
-    /* AddColumn
-     *  add a column to an unopened cursor
-     *
-     *  "idx" [ OUT ] - return parameter for column index
-     *
-     *  "name" [ IN ] - NUL terminated column name spec.
-     *  to identify a column by name, provide the column name
-     *  by itself. if there are multiple types available under
-     *  that name, the default type for that column will be
-     *  selected. to select a specific type, the name may
-     *  be cast to that type using a cast expression, e.g.
-     *    "( type ) name"
-     *  the special name "*" may be added to a read cursor.
-     */
-    inline rc_t AddColumn ( uint32_t *idx,
-        const char *name, ... ) const throw()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VCursorVAddColumn ( this, idx, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t AddColumn ( uint32_t *idx,
-        const char *name, va_list args ) const throw()
-    { return VCursorVAddColumn ( this, idx, name, args ); }
-
-
-    /* GetColumnIdx
-     *  retrieve column index by name spec
-     *
-     *  "idx" [ OUT ] - return parameter for column index
-     *
-     *  "name" [ IN ] - NUL terminated column name spec.
-     */
-    inline rc_t GetColumnIdx ( uint32_t *idx,
-        const char *name, ... ) const throw()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VCursorVGetColumnIdx ( this, idx, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t GetColumnIdx ( uint32_t *idx,
-        const char *name, va_list args ) const throw()
-    { return  VCursorVGetColumnIdx ( this, idx, name, args ); }
-
-
-    /* Datatype
-     *  returns typedecl and/or typedef for column data
-     *
-     *  "idx" [ IN ] - column index
-     *
-     *  "type" [ OUT, NULL OKAY ] - returns the column type declaration
-     *
-     *  "def" [ OUT, NULL OKAY ] - returns the definition of the type
-     *  returned in "type_decl"
-     *
-     * NB - one of "type" and "def" must be non-NULL
-     */
-    inline rc_t Datatype ( uint32_t idx, VTypedecl *type, 
-        VTypedesc *desc ) const throw()
-    { return VCursorDatatype ( this, idx, type, desc ); }
-
-
-    /* IdRange
-     *  returns id range for column
-     *
-     *  "idx" [ IN, OPTIONAL ] - single column index or
-     *  zero to indicate the range for all columns in cursor
-     *
-     *  "id" [ IN ] - page containing this row id is target
-     *
-     *  "first" [ OUT, NULL OKAY ] and "last" [ OUT, NULL OKAY ] -
-     *  id range is returned in these output parameters, where
-     *  at least ONE must be NOT-NULL
-     */
-    inline rc_t IdRange ( int64_t *first, uint64_t *count ) const throw()
-    { return VCursorIdRange ( this, 0, first, count ); }
-
-    inline rc_t IdRange ( uint32_t idx, int64_t *first,
-        uint64_t *count ) const throw()
-    { return VCursorIdRange ( this, idx, first, count ); }
-
-
-    /* Open
-     *  open cursor, resolving schema for the set of opened columns
-     *
-     *  when cursor is created for read, its initial row id
-     *  is set to first row available in any contained column.
-     *
-     *  when cursor is created for write, its initial row id
-     *  is set for inserts ( appending ). when empty, initial
-     *  row id is set to 1. otherwise, it is set to 1 beyond
-     *  the last row available in any contained column.
-     *
-     *  NB - there is no corresponding "Close"
-     *  use "Release" instead.
-     */
-    inline rc_t Open () const throw()
-    { return VCursorOpen ( this ); }
-
-
-    /* RowId
-     *  report current row id
-     * SetRowId
-     *  seek to given row id
-     */
-    inline rc_t RowId ( int64_t *row_id ) const throw()
-    { return VCursorRowId ( this, row_id ); }
-
-    inline rc_t SetRowId ( int64_t row_id ) const throw()
-    { return VCursorSetRowId ( this, row_id ); }
-
-
-    /* OpenRow
-     *  open currently closed row indicated by row id
-     */
-    inline rc_t OpenRow () const throw()
-    { return VCursorOpenRow ( this ); }
-
-
-    /* CommitRow
-     *  commit row after writing
-     *  prevents further writes
-     */
-    inline rc_t CommitRow () throw()
-    { return VCursorCommitRow ( this ); }
-
-
-    /* CloseRow
-     *  balances OpenRow message
-     *  if there are uncommitted modifications,
-     *  discard all changes. otherwise,
-     *  advance to next row
-     */
-    inline rc_t CloseRow () const throw()
-    { return VCursorCloseRow ( this ); }
-
-
-    /* FlushPage
-     *  forces flush of all buffered page data
-     *  fails if row is open
-     *
-     *  pages are normally auto-committed based upon
-     *  size and column affinity
-     */
-    inline rc_t FlushPage () throw()
-    { return VCursorFlushPage ( this ); }
-
-
-    /* Read
-     *  read entire single row of byte-aligned data into a buffer
-     *
-     *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
-     *
-     *  "elem_bits" [ IN ] - expected element size in bits, required
-     *  to be compatible with the actual element size, and be a multiple
-     *  of 8 ( byte-aligned ). for non-byte-aligned data, see ReadBits
-     *
-     *  "buffer" [ OUT ] and "blen" [ IN ] - return buffer for row data
-     *  where "blen" gives buffer capacity in elements. the total buffer
-     *  size in bytes == ( "elem_bits" * "blen" + 7 ) / 8.
-     *
-     *  "row_len" [ OUT ] - return parameter for the number of elements
-     *  in the requested row.
-     *
-     *  when the return code is 0, "row_len" will contain the number of
-     *  elements read into buffer. if the return code indicates that the
-     *  buffer is too small, "row_len" will give the required buffer length.
-     */
-    inline rc_t Read ( uint32_t col_idx, uint32_t elem_bits,
-        void *buffer, uint32_t blen, uint32_t *row_len ) const throw()
-    {
-        return VCursorRead ( this, col_idx, elem_bits, buffer, blen,  row_len );
-    }
-    inline rc_t Read ( int64_t row_id, uint32_t col_idx, uint32_t elem_bits,
-        void *buffer, uint32_t blen, uint32_t *row_len ) const throw()
-    {
-        return VCursorReadDirect ( this, row_id, col_idx, elem_bits, buffer, blen, row_len );
-    }
-
-
-    /* ReadBits
-     *  read single row of potentially bit-aligned column data into a buffer
-     *
-     *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
-     *
-     *  "elem_bits" [ IN ] - expected element size in bits, required to be
-     *  compatible with the actual element size, and may ( or may not ) be
-     *  a multiple of 8 ( byte aligned ).
-     *
-     *  "start" [ IN ] - zero-based starting index to first element,
-     *  valid from 0 .. row_len - 1
-     *
-     *  "buffer" [ IN ], "boff" [ IN ] and "blen" [ IN ] -
-     *  return buffer for row data, where "boff" is in BITS
-     *  and "blen" is in ELEMENTS.
-     *
-     *  "num_read" [ OUT ] - return parameter for the number of elements
-     *  read, which is <= "blen"
-     *
-     *  "remaining" [ OUT, NULL OKAY ] - optional return parameter for
-     *  the number of elements remaining to be read. specifically,
-     *  "start" + "num_read" + "remaining" == row length, assuming that
-     *  "start" <= row length.
-     */
-    inline rc_t ReadBits ( const VCursor *self, uint32_t col_idx,
-        uint32_t elem_bits, uint32_t start, void *buffer, uint32_t boff,
-        uint32_t blen, uint32_t *num_read, uint32_t *remaining ) const throw()
-    {
-        return VCursorReadBits ( this, col_idx, elem_bits, start,
-            buffer, boff, blen, num_read, remaining );
-    }
-    inline rc_t ReadBits ( const VCursor *self, int64_t row_id, uint32_t col_idx,
-        uint32_t elem_bits, uint32_t start, void *buffer, uint32_t boff,
-        uint32_t blen, uint32_t *num_read, uint32_t *remaining ) const throw()
-    {
-        return VCursorReadBitsDirect ( this, row_id, col_idx, elem_bits, 
-            start, buffer, boff, blen, num_read, remaining );
-    }
-
-
-    /* CellData
-     *  access pointer to single cell of potentially bit-aligned column data
-     *  can fail if row is dynamically generated
-     *
-     *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
-     *
-     *  "elem_bits" [ OUT, NULL OKAY ] - optional return parameter for
-     *  element size in bits
-     *
-     *  "base" [ OUT ] and "boff" [ OUT, NULL OKAY ] -
-     *  compound return parameter for pointer to row starting bit
-     *  where "boff" is in BITS
-     *
-     *  "row_len" [ OUT, NULL OKAY ] - the number of elements in cell
-     */
-    inline rc_t CellData ( uint32_t col_idx, uint32_t *elem_bits,
-        const void **base, uint32_t *boff, uint32_t *row_len ) const throw()
-    {
-        return VCursorCellData ( this, col_idx, elem_bits, base, boff, row_len );
-    }
-    inline rc_t CellData ( int64_t row_id, uint32_t col_idx, uint32_t *elem_bits,
-        const void **base, uint32_t *boff, uint32_t *row_len ) const throw()
-    {
-        return VCursorCellDataDirect ( this, row_id, col_idx, elem_bits,
-            base, boff, row_len );
-    }
-
-    /* Default
-     *  give a default row value for column
-     *
-     *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
-     *
-     *  "elem_bits" [ IN ] - stated element size in bits, required
-     *  to be compatible with the actual element size
-     *
-     *  "buffer" [ IN ] and "boff" [ IN ] - compound pointer and offset
-     *  to start of default row data where "boff" is in BITS
-     *
-     *  "row_len" [ IN ] - the number of elements in default row
-     */
-    inline rc_t Default ( uint32_t col_idx, uint32_t elem_bits,
-        const void *buffer, uint32_t boff, uint32_t row_len ) throw()
-    {
-        return VCursorDefault ( this, col_idx, elem_bits, buffer, boff, row_len );
-    }
-
-
-    /* Write
-     *  append bit-aligned column data to row
-     *
-     *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
-     *
-     *  "elem_bits" [ IN ] - stated element size in bits, required
-     *  to be compatible with the actual element size
-     *
-     *  "buffer" [ IN ] and "boff" [ IN ] - compound pointer and offset
-     *  to start of default row data where "boff" is in BITS
-     *
-     *  "count" [ IN ] - the number of elements to append
-     */
-    inline rc_t Write ( uint32_t col_idx, uint32_t elem_bits,
-        const void *buffer, uint32_t boff, uint32_t count ) throw()
-    {
-        return VCursorWrite ( this, col_idx, elem_bits, buffer, boff, count );
-    }
-
-
-    /* Commit
-     *  commit changes made to cursor
-     *  fails if row is open
-     */
-    inline rc_t Commit () throw()
-    { return VCursorCommit ( this ); }
-
-
-    /* OpenParent
-     *  duplicate reference to parent table
-     *  NB - returned reference must be released
-     */
-    inline rc_t OpenParent ( const VTable **tbl ) const throw()
-    { return VCursorOpenParentRead ( this, tbl ); }
-
-    inline rc_t OpenParent ( VTable **tbl ) throw()
-    { return VCursorOpenParentUpdate ( this, tbl ); }
-
-
-    /* GetUserData
-     * SetUserData
-     *  store/retrieve an opaque pointer to user data
-     *
-     *  "data" [ OUT ] - return parameter for getting data
-     *  "data" [ IN ] - parameter for setting data
-     *
-     *  "destroy" [ IN, NULL OKAY ] - optional destructor param
-     *  invoked from destructor of "self"
-     */
-    inline rc_t GetUserData ( void **data ) const throw()
-    { return VCursorGetUserData ( this, data ); }
-
-    inline rc_t SetUserData ( void *data,
-        void ( CC * destroy ) ( void *data ) = 0 ) const throw()
-    { return VCursorSetUserData ( this, data, destroy ); }
-
-
-private:
-    VCursor ();
-    ~ VCursor ();
-    VCursor ( const VCursor& );
-    VCursor &operator = ( const VCursor& );
-};
-
-#endif // _hpp_vdb_cursor_
diff --git a/interfaces/vdb/database.h b/interfaces/vdb/database.h
deleted file mode 100644
index 2753eee..0000000
--- a/interfaces/vdb/database.h
+++ /dev/null
@@ -1,334 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vdb_database_
-#define _h_vdb_database_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifndef _h_kdb_column_
-#include <kdb/column.h>
-#endif
-
-#ifndef _h_klib_namelist_
-#include <klib/namelist.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct VSchema;
-struct KMetadata;
-struct VDBManager;
-
-
-/*--------------------------------------------------------------------------
- * VDatabase
- *  opaque connection to a database within file system
- */
-typedef struct VDatabase VDatabase;
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-VDB_EXTERN rc_t CC VDatabaseAddRef ( const VDatabase *self );
-VDB_EXTERN rc_t CC VDatabaseRelease ( const VDatabase *self );
-
-
-/* CreateDB
- *  create a new or open an existing database using manager
- *
- *  "db" [ OUT ] - return parameter for newly opened database
- *
- *  "schema" [ IN ] - schema object containg database
- *  declaration to be used in creating db.
- *
- *  "typespec" [ IN ] - type and optionally version of db schema,
- *  e.g. 'MY_NAMESPACE:MyDatabase' or 'MY_NAMESPACE:MyDatabase#1.1'
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to database
- */
-VDB_EXTERN rc_t CC VDBManagerCreateDB ( struct VDBManager *self, VDatabase **db,
-    struct VSchema const *schema, const char *typespec,
-    KCreateMode cmode, const char *path, ... );
-VDB_EXTERN rc_t CC VDBManagerVCreateDB ( struct VDBManager *self, VDatabase **db,
-    struct VSchema const *schema, const char *typespec,
-    KCreateMode cmode, const char *path, va_list args );
-
-
-/* CreateDB
- *  create a new or open an existing database under parent database
- *
- *  "db" [ OUT ] - return parameter for newly opened database
- *
- *  "member" [ IN ] - name of database member template under parent
- *  the named member is a db template rather than a named database.
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "name" [ IN ] - NUL terminated string in
- *  db-native character set giving actual table name
- */
-VDB_EXTERN rc_t CC VDatabaseCreateDB ( VDatabase *self, VDatabase **db,
-    const char *member, KCreateMode cmode, const char *name, ... );
-VDB_EXTERN rc_t CC VDatabaseVCreateDB ( VDatabase *self, VDatabase **db,
-    const char *member, KCreateMode cmode, const char *name, va_list args );
-
-VDB_EXTERN rc_t CC VDatabaseDropDB ( VDatabase *self, const char *name, ... );
-VDB_EXTERN rc_t CC VDatabaseVDropDB ( VDatabase *self, const char *name, va_list args );
-
-VDB_EXTERN rc_t CC VDatabaseDropTable ( VDatabase *self, const char *name, ... );
-VDB_EXTERN rc_t CC VDatabaseVDropTable ( VDatabase *self, const char *name, va_list args );
-    
-
-/* OpenDBRead
- *  open a database for read using manager
- * OpenDBUpdate
- *  open a database for read/write using manager
- *
- *  "db" [ OUT ] - return parameter for newly opened database
- *
- *  "schema" [ IN, NULL OKAY ] - schema object containg database
- *  declaration to be used in creating db [ needed by manager ].
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to database
- */
-VDB_EXTERN rc_t CC VDBManagerOpenDBRead ( struct VDBManager const *self,
-    const VDatabase **db, struct VSchema const *schema,
-    const char *path, ... );
-VDB_EXTERN rc_t CC VDBManagerVOpenDBRead ( struct VDBManager const *self,
-    const VDatabase **db, struct VSchema const *schema,
-    const char *path, va_list args );
-
-VDB_EXTERN rc_t CC VDBManagerOpenDBUpdate ( struct VDBManager *self,
-    VDatabase **db, struct VSchema const *schema,
-    const char *path, ... );
-VDB_EXTERN rc_t CC VDBManagerVOpenDBUpdate ( struct VDBManager *self,
-    VDatabase **db, struct VSchema const *schema,
-    const char *path, va_list args );
-
-
-/* OpenDBRead
- *  open a database for read under parent db
- * OpenDBUpdate
- *  open or create a database for read/write under parent db
- *
- *  "db" [ OUT ] - return parameter for newly opened database
- *
- *  "name" [ IN ] - NUL terminated string in
- *  db-native character set giving name of database member
- */
-VDB_EXTERN rc_t CC VDatabaseOpenDBRead ( const VDatabase *self,
-    const VDatabase **db, const char *name, ... );
-VDB_EXTERN rc_t CC VDatabaseVOpenDBRead ( const VDatabase *self,
-    const VDatabase **db, const char *name, va_list args );
-
-VDB_EXTERN rc_t CC VDatabaseOpenDBUpdate ( VDatabase *self,
-    VDatabase **db, const char *name, ... );
-VDB_EXTERN rc_t CC VDatabaseVOpenDBUpdate ( VDatabase *self,
-    VDatabase **db, const char *name, va_list args );
-
-
-/* Typespec
- *  retrieve database typespec
- *
- *  AVAILABILITY: version 2.2
- *
- *  "ts_buff" [ IN ] and "ts_size" [ IN ] - buffer for return of NUL-terminated
- *  database typespec, e.g. 'NCBI:db:abc #1.1'
- */
-VDB_EXTERN rc_t CC VDatabaseTypespec ( const VDatabase *self,
-    char *ts_buff, size_t ts_size );
-
-
-/* Locked
- *  returns true if locked
- */
-VDB_EXTERN bool CC VDatabaseLocked ( const VDatabase *self );
-
-
-/* IsAlias
- *  returns true if object name is an alias
- *  returns path to fundamental name if it was aliased
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - optional output buffer
- *  for fundamenta object name if "alias" is not a fundamental name, 
- *
- *  "name" [ IN ] - NUL terminated object name
- */
-VDB_EXTERN bool CC VDatabaseIsAlias ( const VDatabase *self, uint32_t type,
-    char *resolved, size_t rsize, const char *name );
-
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-VDB_EXTERN rc_t CC VDatabaseWritable ( const VDatabase *self, uint32_t type,
-    const char *name, ... );
-VDB_EXTERN rc_t CC VDatabaseVWritable ( const VDatabase *self, uint32_t type,
-    const char *name, va_list args );
-
-/* Lock
- *  apply lock
- *
- *  if object is already locked, the operation is idempotent
- *  and returns an rc state of rcLocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-VDB_EXTERN rc_t CC VDatabaseLock ( VDatabase *self, uint32_t type,
-    const char *name, ... );
-VDB_EXTERN rc_t CC VDatabaseVLock ( VDatabase *self, uint32_t type,
-    const char *name, va_list args );
-
-/* Unlock
- *  remove lock
- *
- *  if object is already unlocked, the operation is idempotent
- *  and returns an rc state of rcUnlocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-VDB_EXTERN rc_t CC VDatabaseUnlock ( VDatabase *self, uint32_t type,
-    const char *name, ... );
-VDB_EXTERN rc_t CC VDatabaseVUnlock ( VDatabase *self, uint32_t type,
-    const char *name, va_list args );
-
-
-/* OpenMetadataRead
- * OpenMetadataUpdate
- *  opens metadata file
- *
- *  "meta" [ OUT ] - return parameter for metadata
- */
-VDB_EXTERN rc_t CC VDatabaseOpenMetadataRead ( const VDatabase *self, struct KMetadata const **meta );
-VDB_EXTERN rc_t CC VDatabaseOpenMetadataUpdate ( VDatabase *self, struct KMetadata **meta );
-
-
-/* ColumnCreateParams
- *  sets the creation parameters for physical columns
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "checksum" [ IN ] - the type of checksum information to
- *  apply when writing blobs
- *
- *  "pgsize" [ IN, DEFAULT ZERO ] - size of internal column "pages"
- *  the default value is indicated by 0 ( zero ).
- *  NB - CURRENTLY THE ONLY SUPPORTED PAGE SIZE IS 1 ( ONE ) BYTE.
- */
-VDB_EXTERN rc_t CC VDatabaseColumnCreateParams ( VDatabase *self,
-    KCreateMode cmode, KChecksum checksum, size_t pgsize );
-
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-VDB_EXTERN rc_t CC VDatabaseOpenManagerRead ( const VDatabase *self, struct VDBManager const **mgr );
-VDB_EXTERN rc_t CC VDatabaseOpenManagerUpdate ( VDatabase *self, struct VDBManager **mgr );
-
-
-/* OpenParent
- *  duplicate reference to parent database
- *  NB - returned reference must be released
- */
-VDB_EXTERN rc_t CC VDatabaseOpenParentRead ( const VDatabase *self, const VDatabase **par );
-VDB_EXTERN rc_t CC VDatabaseOpenParentUpdate ( VDatabase *self, VDatabase **par );
-
-
-/* OpenSchema
- *  duplicate reference to db schema
- *  NB - returned reference must be released
- */
-VDB_EXTERN rc_t CC VDatabaseOpenSchema ( const VDatabase *self, struct VSchema const **schema );
-
-
-/* lists the tables of the database
- *
- * "names" [ OUT ] - return parameter for table 
- */
-VDB_EXTERN rc_t CC VDatabaseListTbl ( const VDatabase *self, KNamelist **names );
-
-/* lists the sub-databases of the database
- *
- * "names" [ OUT ] - return parameter for databases
- */
-VDB_EXTERN rc_t CC VDatabaseListDB ( const VDatabase *self, KNamelist **names );
-
-/* GetUserData
- * SetUserData
- *  store/retrieve an opaque pointer to user data
- *
- *  "data" [ OUT ] - return parameter for getting data
- *  "data" [ IN ] - parameter for setting data
- *
- *  "destroy" [ IN, NULL OKAY ] - optional destructor param
- *  invoked from destructor of "self"
- */
-VDB_EXTERN rc_t CC VDatabaseGetUserData ( const VDatabase *self, void **data );
-VDB_EXTERN rc_t CC VDatabaseSetUserData ( const VDatabase *self,
-    void *data, void ( CC * destroy ) ( void *data ) );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_vdb_database_ */
diff --git a/interfaces/vdb/database.hpp b/interfaces/vdb/database.hpp
deleted file mode 100644
index 6edaa48..0000000
--- a/interfaces/vdb/database.hpp
+++ /dev/null
@@ -1,347 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb_database_
-#define _hpp_vdb_database_
-
-#ifndef _h_vdb_database_
-#include <vdb/database.h>
-#endif
-
-#ifndef _h_vdb_table_
-#include <vdb/table.h>
-#endif
-
-/*--------------------------------------------------------------------------
- * VDatabase
- *  opaque connection to a database within file system
- */
-struct VDatabase
-{
-
-    /* AddRef
-     * Release
-     *  all objects are reference counted
-     *  NULL references are ignored
-    */
-    inline rc_t AddRef () const throw ()
-    { return VDatabaseAddRef ( this ); }
-    inline rc_t Release () const throw ()
-    { return VDatabaseRelease ( this ); }
-
-
-    /* CreateDB
-     *  create a new or open an existing database under parent database
-     *
-     *  "db" [ OUT ] - return parameter for newly opened database
-     *
-     *  "member" [ IN ] - name of database member template under parent
-     *  the named member is a db template rather than a named database.
-     *
-     *  "cmode" [ IN ] - creation mode
-     *
-     *  "name" [ IN ] - NUL terminated string in
-     *  db-native character set giving actual table name
-    */
-    inline rc_t CreateDB ( VDatabase **db, const char *member,
-        KCreateMode cmode, const char *name, ... ) throw ()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VDatabaseVCreateDB ( this, db, member, cmode, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t CreateDB ( VDatabase **db, const char *member,
-        KCreateMode cmode, const char *name, va_list args ) throw ()
-    { return VDatabaseVCreateDB ( this, db, member, cmode, name, args ); }
-
-
-    /* OpenDBRead
-     *  open a database for read under parent db
-     * OpenDBUpdate
-     *  open or create a database for read/write under parent db
-     *
-     *  "db" [ OUT ] - return parameter for newly opened database
-     *
-     *  "name" [ IN ] - NUL terminated string in
-     *  db-native character set giving name of database member
-     */
-    inline rc_t OpenDB ( const VDatabase **db, const char *name, ... ) const throw ()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VDatabaseVOpenDBRead ( this, db, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenDB ( const VDatabase **db, const char *name, va_list args ) const throw ()
-    { return VDatabaseVOpenDBRead ( this, db, name, args ); }
-
-    inline rc_t OpenDB ( VDatabase **db, const char *name, ... ) throw ()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VDatabaseVOpenDBUpdate ( this, db, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenDB ( VDatabase **db, const char *name, va_list args ) throw ()
-    { return VDatabaseVOpenDBUpdate ( this, db, name, args ); }
-
-
-    /* CreateTable
-     *  create a new or open an existing table under database
-     *
-     *  "tbl" [ OUT ] - return parameter for newly opened table
-     *
-     *  "member" [ IN ] - name of table member template under database
-     *  the named member is a table template rather than a named table.
-     *
-     *  "cmode" [ IN ] - creation mode
-     *
-     *  "cmode_mask" [ IN ] - if a bit of "cmode_mask" is set (1) then
-     *  the corresponding bit of "cmode" is used for the table,
-     *  otherwise (0) the corresponding bit is taken from db and "cmode"'s
-     *  bit is ignored
-     *  the mask for setting mode (kcmOpen, kcmInit, kcmCreate) is at least
-     *  one bit set in the mask kcmValueMask.
-     *
-     *  "name" [ IN ] - NUL terminated string in
-     *  db-native character set giving actual table name
-     */
-    /* DEPRECATED */ inline rc_t CreateTable ( VTable **tbl, const char *member,
-        KCreateMode cmode, const char *name, ... ) throw ()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VDatabaseVCreateTable ( this, tbl, member, cmode, name, args );
-        va_end ( args );
-        return rc;
-    }
-    /* DEPRECATED */ inline rc_t CreateTable ( VTable **tbl, const char *member,
-        KCreateMode cmode, const char *name, va_list args ) throw ()
-    { return VDatabaseVCreateTable ( this, tbl, member, cmode, name, args ); }
-
-    inline rc_t CreateTable ( VTable **tbl, const char *member, const char *name, ... ) throw ()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VDatabaseVCreateTableDefault ( this, tbl, member, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t CreateTable ( VTable **tbl, const char *member, const char *name, va_list args ) throw ()
-    { return VDatabaseVCreateTableDefault ( this, tbl, member, name, args ); }
-
-    inline rc_t CreateTable ( VTable **tbl, const char *member,
-        KCreateMode cmode, KCreateMode cmode_mask, const char *name, ... ) throw ()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VDatabaseVCreateTableByMask ( this, tbl, member, cmode, cmode_mask, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t CreateTable ( VTable **tbl, const char *member,
-        KCreateMode cmode, KCreateMode cmode_mask, const char *name, va_list args ) throw ()
-    { return VDatabaseVCreateTableByMask ( this, tbl, member, cmode, cmode_mask, name, args ); }
-
-
-    /* OpenTableRead
-     *  open a table for read under database
-     * OpenTableUpdate
-     *  open or create a table for read/write under database
-     *
-     *  "tbl" [ OUT ] - return parameter for newly opened table
-     *
-     *  "name" [ IN ] - NUL terminated string in
-     *  db-native character set giving name of table member
-     */
-    inline rc_t OpenTable( const VTable **tbl,
-        const char *name, ... ) const throw ()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VDatabaseVOpenTableRead ( this, tbl, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenTable( const VTable **tbl,
-        const char *name, va_list args ) const throw ()
-    { return VDatabaseVOpenTableRead ( this, tbl, name, args ); }
-
-    inline rc_t OpenTable( VTable **tbl, const char *name, ... ) throw ()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VDatabaseVOpenTableUpdate ( this, tbl, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenTable( VTable **tbl, const char *name, va_list args ) throw ()
-    { return VDatabaseVOpenTableUpdate ( this, tbl, name, args ); }
-
-
-    /* Locked
-     *  returns true if locked
-     */
-    inline bool Locked ( ) const throw ()
-    { return VDatabaseLocked ( this ); }
-
-
-    /* Writable
-     *  returns 0 if object is writable
-     *  or a reason why if not
-     *
-     *  "type" [ IN ] - a KDBPathType
-     *  valid values are kptDatabase, kptTable and kptIndex
-     *
-     *  "path" [ IN ] - NUL terminated path
-     */
-    inline rc_t Writable ( uint32_t type, const char *name, ... ) const throw ()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VDatabaseVWritable ( this, type, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t Writable ( uint32_t type, const char *name, va_list args ) const throw ()
-    { return VDatabaseVWritable ( this, type, name, args ); }
-
-
-    /* Lock
-     *  apply lock
-     *
-     *  if object is already locked, the operation is idempotent
-     *  and returns an rc state of rcLocked
-     *
-     *  "type" [ IN ] - a KDBPathType
-     *  valid values are kptDatabase, kptTable and kptIndex
-     *
-     *  "path" [ IN ] - NUL terminated path
-     */
-    inline rc_t CC Lock ( uint32_t type, const char *name, ... ) throw ()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VDatabaseVLock ( this, type, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t CC Lock ( uint32_t type, const char *name, va_list args ) throw ()
-    { return VDatabaseVLock ( this, type, name, args ); }
-
-
-    /* Unlock
-     *  remove lock
-     *
-     *  if object is already unlocked, the operation is idempotent
-     *  and returns an rc state of rcUnlocked
-     *
-     *  "type" [ IN ] - a KDBPathType
-     *  valid values are kptDatabase, kptTable and kptIndex
-     *
-     *  "path" [ IN ] - NUL terminated path
-     */
-    inline rc_t CC Unlock ( uint32_t type, const char *name, ... ) throw ()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VDatabaseVUnlock ( this, type, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t CC Unlock ( uint32_t type, const char *name, va_list args ) throw ()
-    { return VDatabaseVUnlock ( this, type, name, args ); }
-
-
-    /* OpenMetadataRead
-     * OpenMetadataUpdate
-     *  opens metadata file
-     *
-     *  "meta" [ OUT ] - return parameter for metadata
-     */
-    inline rc_t OpenMetadata ( const KMetadata **meta ) const throw ()
-    { return VDatabaseOpenMetadataRead ( this, meta ); }
-    inline rc_t OpenMetadata ( KMetadata **meta ) throw ()
-    { return VDatabaseOpenMetadataUpdate ( this, meta ); }
-
-
-    /* OpenManager
-     *  duplicate reference to manager
-     *  NB - returned reference must be released
-     */
-    inline rc_t OpenManager ( const VDBManager **mgr ) const throw ()
-    { return VDatabaseOpenManagerRead ( this, mgr ); }
-    inline rc_t OpenManager ( VDBManager **mgr ) throw ()
-    { return VDatabaseOpenManagerUpdate ( this, mgr ); }
-
-
-    /* OpenParent
-     *  duplicate reference to parent database
-     *  NB - returned reference must be released
-     */
-    inline rc_t OpenParent ( const VDatabase **par ) const throw ()
-    { return VDatabaseOpenParentRead ( this, par ); }
-    inline rc_t OpenParent ( VDatabase **par ) throw ()
-    { return VDatabaseOpenParentUpdate ( this, par ); }
-
-
-    /* lists the tables of the database
-     *
-     * "names" [ OUT ] - return parameter for table 
-     */
-    inline rc_t ListTbl( KNamelist **names ) const throw ()
-    { return VDatabaseListTbl( this, names ); }
-
-
-    /* GetUserData
-     * SetUserData
-     *  store/retrieve an opaque pointer to user data
-     *
-     *  "data" [ OUT ] - return parameter for getting data
-     *  "data" [ IN ] - parameter for setting data
-     *
-     *  "destroy" [ IN, NULL OKAY ] - optional destructor param
-     *  invoked from destructor of "self"
-     */
-    inline rc_t GetUserData ( void **data ) const throw ()
-    { return VDatabaseGetUserData ( this, data ); }
-    inline rc_t SetUserData ( void *data,
-        void ( CC * destroy ) ( void *data ) ) throw ()
-    { return VDatabaseSetUserData ( this, data, destroy ); }
-
-
-private:
-    VDatabase ();
-    ~ VDatabase ();
-    VDatabase ( const VDatabase& );
-    VDatabase &operator = ( const VDatabase& );
-};
-
-#endif
diff --git a/interfaces/vdb/dependencies.h b/interfaces/vdb/dependencies.h
deleted file mode 100644
index 353ecb7..0000000
--- a/interfaces/vdb/dependencies.h
+++ /dev/null
@@ -1,231 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-#ifndef _h_vdb_dependencies_
-#define _h_vdb_dependencies_
-
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_klib_rc_
-#include <klib/rc.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct VDatabase;
-struct VTable;
-
-
-/*--------------------------------------------------------------------------
- * VDBDependencies
- *  information about VDatabase dependencies
- *
- *  object contains zero or more dependencies
- *
- *  each dependency has a number of properties, accessible via index
- */
-typedef struct VDBDependencies VDBDependencies;
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored */
-VDB_EXTERN rc_t CC VDBDependenciesAddRef ( const VDBDependencies *self );
-VDB_EXTERN rc_t CC VDBDependenciesRelease ( const VDBDependencies *self );
-
-/* ListDependencies
- *  create dependencies object: list dependencies
- *
- *  Cache could be updated after the fuction call, if caching is enabled.
- *
- *  "dep" [ OUT ] - return for VDBDependencies object
- *
- *  "missing" [ IN ] - if true, list only missing dependencies
- *  otherwise, list all dependencies
- */
-VDB_EXTERN rc_t CC VDatabaseListDependencies ( struct VDatabase const *self,
-    const VDBDependencies **dep, bool missing );
-
-/* ListDependenciesWithCaching
- *  create dependencies object: list dependencies
- *
- *  Allows to control cache update inside the function.
- *
- *  "dep" [ OUT ] - return for VDBDependencies object
- *
- *  "missing" [ IN ] - if true, list only missing dependencies
- *  otherwise, list all dependencies
- *
- *  "disableCaching" [ IN ] - if true, disable caching inside of the function
- *  otherwise, do not change the caching state
- */
-VDB_EXTERN rc_t CC VDatabaseListDependenciesWithCaching (
-    struct VDatabase const *self,
-    const VDBDependencies **dep, bool missing,
-    bool disableCaching );
-
-/* Count
- *  retrieve the number of dependencies
- *
- *  "count" [ OUT ] - return parameter for dependencies count
- */
-VDB_EXTERN rc_t CC VDBDependenciesCount ( const VDBDependencies *self,
-    uint32_t *count );
-
-
-/* Type
- *  describe the dependency object type ( see kbd/manager.h )
- *
- *  "type" [ OUT ] - a KDBPathType
- *
- *  "idx" [ IN ] - zero-based index of dependency
- */
-VDB_EXTERN rc_t CC VDBDependenciesType ( const VDBDependencies *self,
-    uint32_t *type, uint32_t idx );
-
-
-/* Local
- *  retrieve local property
- *
- *  "local" [ OUT ] - true if object is stored internally
- *
- *  "idx" [ IN ] - zero-based index of dependency
- */
-VDB_EXTERN rc_t CC VDBDependenciesLocal ( const VDBDependencies *self,
-    bool *local, uint32_t idx );
-
-
-/* SeqId
- *  retrieve sequence id of object
- *
- *  "seq_id" [ OUT ] - returned pointer should not be freed.
- *   becomes invalid after VDBDependenciesRelease
- *
- *  "idx" [ IN ] - zero-based index of dependency
- */
-VDB_EXTERN rc_t CC VDBDependenciesSeqId ( const VDBDependencies *self,
-    const char **seq_id, uint32_t idx );
-
-
-/* Name
- *  retrieve object name
- *
- * "name" [ OUT ] - returner pointed should not be freed.
- *  it becomes invalid after VDBDependenciesRelease
- *
- *  "idx" [ IN ] - zero-based index of dependency
- */
-VDB_EXTERN rc_t CC VDBDependenciesName ( const VDBDependencies *self,
-    const char **name, uint32_t idx );
-
-
-/* Circular
- *  retrieve circular property
- *  reference sequences may be circular
- *
- *  "circular" [ OUT ] - true if dependency is a circular reference table
- *
- *  "idx" [ IN ] - zero-based index of dependency
- */
-VDB_EXTERN rc_t CC VDBDependenciesCircular ( const VDBDependencies *self,
-    bool *circular, uint32_t idx );
-
-
-/* Path
- *  returns [Local] path for resolved dependency,
- *  returns NULL for local and missing dependency.
- *
- *  "path" [ OUT ] - returned pointer should not be freed.
- *   it becomes invalid after VDBDependenciesRelease
- *
- *  "idx" [ IN ] - zero-based index of dependency
- */
-VDB_EXTERN rc_t CC VDBDependenciesPath ( const VDBDependencies *self,
-    const char **path, uint32_t idx );
-
-/* PathRemote
- *  returns Remote path for dependency,
- *  returns NULL for not found dependency.
- *
- *  "path" [ OUT ] - returned pointer should not be freed.
- *   it becomes invalid after VDBDependenciesRelease
- *
- *  "idx" [ IN ] - zero-based index of dependency
- */
-VDB_EXTERN rc_t CC VDBDependenciesPathRemote ( const VDBDependencies *self,
-    const char **path, uint32_t idx );
-
-/* PathCache
- *  returns Cache path for dependency,
- *  returns NULL for not found dependency.
- *
- *  "path" [ OUT ] - returned pointer should not be freed.
- *   it becomes invalid after VDBDependenciesRelease
- *
- *  "idx" [ IN ] - zero-based index of dependency
- */
-VDB_EXTERN rc_t CC VDBDependenciesPathCache ( const VDBDependencies *self,
-    const char **path, uint32_t idx );
-
-/* Error
- *  trying to analyze rc code and object
- *  in order to recognize dependencies error
- *
- *  db OR table - only one is required
- */
-VDB_EXTERN bool CC UIError( rc_t rc,
-    struct VDatabase const *db, struct VTable const *table);
-
-/* report error(s) via PLOGERR based on an object
- * log_list - if true logs the missing items list also
- */
-VDB_EXTERN void CC UIDatabaseLOGError( rc_t rc,
-    struct VDatabase const *db, bool log_list );
-VDB_EXTERN void CC UITableLOGError( rc_t rc,
-    struct VTable const *table, bool log_list );
-
-/* return human-readable string explaining rc code.
- * the string should not be freed
- */
-VDB_EXTERN const char* CC UIDatabaseGetErrorString(rc_t rc);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _h_vdb_dependencies_ */
diff --git a/interfaces/vdb/extern.h b/interfaces/vdb/extern.h
deleted file mode 100644
index 7f4fa98..0000000
--- a/interfaces/vdb/extern.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vdb_extern_
-#define _h_vdb_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define VDB_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define VDB_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#if defined _MSC_VER && ! defined _STATIC
-#define MOD_EXPORT __declspec ( dllexport )
-#else
-#define MOD_EXPORT
-#endif
-
-#endif /* _h_vdb_extern_ */
diff --git a/interfaces/vdb/manager.h b/interfaces/vdb/manager.h
deleted file mode 100644
index a21f769..0000000
--- a/interfaces/vdb/manager.h
+++ /dev/null
@@ -1,226 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vdb_manager_
-#define _h_vdb_manager_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDirectory;
-struct VPath;
-
-/*--------------------------------------------------------------------------
- * VDBManager
- *  opaque handle to library
- */
-typedef struct VDBManager VDBManager;
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-VDB_EXTERN rc_t CC VDBManagerAddRef ( const VDBManager *self );
-VDB_EXTERN rc_t CC VDBManagerRelease ( const VDBManager *self );
-
-
-/* MakeRead
- * MakeUpdate
- *  create library handle for specific use
- *  NB - only one of the functions will be implemented
- *
- *  "wd" [ IN, NULL OKAY ] - optional working directory for
- *  accessing the file system. mgr will attach its own reference.
- */
-VDB_EXTERN rc_t CC VDBManagerMakeRead ( const VDBManager **mgr, struct KDirectory const *wd );
-VDB_EXTERN rc_t CC VDBManagerMakeUpdate ( VDBManager **mgr, struct KDirectory *wd );
-
-
-/* Version
- *  returns the library version
- */
-VDB_EXTERN rc_t CC VDBManagerVersion ( const VDBManager *self, uint32_t *version );
-
-
-/* Writable
- *  returns 0 if table is writable
- *  rcLocked if locked, rcReadonly if read-only
- *  other code upon error
- *
- *  "path" [ IN ] - NUL terminated path
- */
-VDB_EXTERN rc_t CC VDBManagerWritable ( const VDBManager *self,
-    const char *path, ... );
-VDB_EXTERN rc_t CC VDBManagerVWritable ( const VDBManager *self,
-    const char *path, va_list args );
-
-/* Lock
- *  apply lock
- *
- *  if object is already locked, the operation is idempotent
- *  and returns an rc state of rcLocked
- *
- *  "path" [ IN ] - NUL terminated path
- */
-VDB_EXTERN rc_t CC VDBManagerLock ( VDBManager *self, const char *path, ... );
-VDB_EXTERN rc_t CC VDBManagerVLock ( VDBManager *self, const char *path, va_list args );
-
-/* Unlock
- *  remove lock
- *
- *  if object is already unlocked, the operation is idempotent
- *  and returns an rc state of rcUnlocked
- *
- *  "path" [ IN ] - NUL terminated path
- */
-VDB_EXTERN rc_t CC VDBManagerUnlock ( VDBManager *self, const char *path, ... );
-VDB_EXTERN rc_t CC VDBManagerVUnlock ( VDBManager *self, const char *path, va_list args );
-
-
-/* Drop
- *  drop an object based on its path
- *
- *  "path" [ IN ] - NUL terminated string in UTF-8 giving path to the vdb object
- */
-VDB_EXTERN rc_t CC VDBManagerDrop ( VDBManager *self, uint32_t obj_type, const char *path, ... );
-VDB_EXTERN rc_t CC VDBManagerVDrop ( VDBManager *self, uint32_t obj_type, const char *path, va_list args );
-
-
-/* AddSchemaIncludePath
- *  add a path to schema for locating input files
- */
-VDB_EXTERN rc_t CC VDBManagerAddSchemaIncludePath ( const VDBManager *self,
-    const char *path, ... );
-VDB_EXTERN rc_t CC VDBManagerVAddSchemaIncludePath ( const VDBManager *self,
-    const char *path, va_list args );
-
-
-/* AddLoadLibraryPath
- *  add a path to loader for locating dynamic libraries
- */
-VDB_EXTERN rc_t CC VDBManagerAddLoadLibraryPath ( const VDBManager *self,
-    const char *path, ... );
-VDB_EXTERN rc_t CC VDBManagerVAddLoadLibraryPath ( const VDBManager *self,
-    const char *path, va_list args );
-
-
-/* GetUserData
- * SetUserData
- *  store/retrieve an opaque pointer to user data
- *
- *  "data" [ OUT ] - return parameter for getting data
- *  "data" [ IN ] - parameter for setting data
- *
- *  "destroy" [ IN, NULL OKAY ] - optional destructor param
- *  invoked from destructor of "self"
- */
-VDB_EXTERN rc_t CC VDBManagerGetUserData ( const VDBManager *self, void **data );
-VDB_EXTERN rc_t CC VDBManagerSetUserData ( const VDBManager *self,
-    void *data, void ( CC * destroy ) ( void *data ) );
-
-
-/* GetObjVersion
- *  returns the vdb-version of the given object
- *
- *  "version" [ OUT ] - discovered vdb-version
- *
- *  "path"    [ IN ] - path to the object to be examined ( database or table )
- */
-VDB_EXTERN rc_t CC VDBManagerGetObjVersion ( const VDBManager *self,
-    ver_t * version, const char *path );
-
-
-/* GetObjModDate
- *  returns the load/modification timestamp of the given object
- *
- *  "ts" [ OUT ] - discovered modification timestamp written in object,
- *  or from filesystem
- *
- *  "path"    [ IN ] - path to the object to be examined ( database or table )
- */
-VDB_EXTERN rc_t CC VDBManagerGetObjModDate ( const VDBManager *self,
-    KTime_t * ts, const char *path );
-
-
-/* PathType
- *  check the path type of an object/directory path.
- *
- *  this is an extension of the KDirectoryPathType ( see <kdb/manager.h> )
- *  and will return the KDirectory values if a path type is not specifically
- *  a VDB or KDB object.
- */
-VDB_EXTERN int CC VDBManagerPathType ( const VDBManager * self,
-    const char *path, ... );
-VDB_EXTERN int CC VDBManagerVPathType ( const VDBManager * self,
-    const char *path, va_list args );
-
-
-/* GetCacheRoot
- *  query the cache-root
- *
- *  path [ OUT ] - VPath of location of current cache-root
- */
-VDB_EXTERN rc_t CC VDBManagerGetCacheRoot ( const VDBManager * self,
-    struct VPath const ** path );
-
-
-/* SetCacheRoot
- *  set a new cache-root
- *
- *  path [ IN ] - VPath of new location of cache-root
- *  
- *  The change to the cache-root is temporary, it is not automatically stored
- *  in the configuration-file. If the manager is released, the change will be
- *  forgotten. If the user wants to make the change permanent, he has to obtain
- *  a reference to the config-manager 'KConfig' and call KConfigCommit().
- */
-
-VDB_EXTERN rc_t CC VDBManagerSetCacheRoot ( const VDBManager * self,
-    struct VPath const * path );
- 
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_vdb_manager_ */
diff --git a/interfaces/vdb/manager.hpp b/interfaces/vdb/manager.hpp
deleted file mode 100644
index e5d8248..0000000
--- a/interfaces/vdb/manager.hpp
+++ /dev/null
@@ -1,386 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb_manager_
-#define _hpp_vdb_manager_
-
-#ifndef _h_vdb_manager_
-#include <vdb/manager.h>
-#endif
-
-#ifndef _h_vdb_table_
-#include <vdb/table.h>
-#endif
-
-#ifndef _h_vdb_schema_
-#include <vdb/schema.h>
-#endif
-
-#ifndef _h_vdb_database_
-#include <vdb/database.h>
-#endif
-
-/*--------------------------------------------------------------------------
- * forward decl. for CreateDB
- */
-struct VDatabase;
-struct VSchema;
-struct VPath;
-
-/*--------------------------------------------------------------------------
- * VDBManager
- *  opaque handle to library
- */
-struct VDBManager
-{
-    /* AddRef
-     * Release
-     *  all objects are reference counted
-     *  NULL references are ignored
-     */
-    inline rc_t AddRef () const throw()
-    { return VDBManagerAddRef ( this ); }
-
-    inline rc_t Release () const throw()
-    { return VDBManagerRelease ( this ); }
-
-
-    /* CreateDB
-     *  create a new or open an existing database using manager
-     *
-     *  "db" [ OUT ] - return parameter for newly opened database
-     *
-     *  "schema" [ IN ] - schema object containg database
-     *  declaration to be used in creating db.
-     *
-     *  "typespec" [ IN ] - type and optionally version of db schema,
-     *  e.g. 'MY_NAMESPACE:MyDatabase' or 'MY_NAMESPACE:MyDatabase#1.1'
-     *
-     *  "cmode" [ IN ] - creation mode
-     *
-     *  "path" [ IN ] - NUL terminated string in
-     *  wd-native character set giving path to database
-     */
-    inline rc_t CreateDB ( VDatabase **db, struct VSchema const *schema,
-        const char *typespec, KCreateMode cmode, const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = VDBManagerVCreateDB ( this, db, schema, typespec, cmode, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t CreateDB ( VDatabase **db, struct VSchema const *schema,
-        const char *typespec, KCreateMode cmode, const char *path, va_list args ) throw()
-    { return VDBManagerVCreateDB ( this, db, schema, typespec, cmode, path, args ); }
-
-
-    /* OpenDBRead
-     *  open a database for read using manager
-     * OpenDBUpdate
-     *  open a database for read/write using manager
-     *
-     *  "db" [ OUT ] - return parameter for newly opened database
-     *
-     *  "schema" [ IN, NULL OKAY ] - schema object containg database
-     *  declaration to be used in creating db [ needed by manager ].
-     *
-     *  "path" [ IN ] - NUL terminated string in
-     *  wd-native character set giving path to database
-     */
-    inline rc_t OpenDB( const VDatabase **db, struct VSchema const *schema,
-        const char *path, ... ) const throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = VDBManagerVOpenDBRead ( this, db, schema, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenDB( const VDatabase **db, struct VSchema const *schema,
-        const char *path, va_list args ) const throw()
-    { return VDBManagerVOpenDBRead ( this, db, schema, path, args ); }
-
-    inline rc_t OpenDB( VDatabase **db, struct VSchema const *schema,
-        const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = VDBManagerVOpenDBUpdate ( this, db, schema, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenDB( VDatabase **db, struct VSchema const *schema,
-        const char *path, va_list args ) throw()
-    { return VDBManagerVOpenDBUpdate ( this, db, schema, path, args ); }
-
-
-    /* CreateTable
-     *  create a new or open an existing table using manager
-     *
-     *  "tbl" [ OUT ] - return parameter for newly opened table
-     *
-     *  "schema" [ IN ] - schema object containg table
-     *  declaration to be used in creating tbl.
-     *
-     *  "typespec" [ IN ] - type and optionally version of table schema,
-     *  e.g. 'MY_NAMESPACE:MyTable' or 'MY_NAMESPACE:MyTable#1.1'
-     *
-     *  "cmode" [ IN ] - creation mode
-     *
-     *  "path" [ IN ] - NUL terminated string in
-     *  wd-native character set giving path to table
-     */
-    inline rc_t CreateTable ( VTable **tbl, struct VSchema const *schema,
-        const char *typespec, KCreateMode cmode, const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = VDBManagerVCreateTable ( this, tbl, schema, typespec, cmode, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t CreateTable ( VTable **tbl, struct VSchema const *schema,
-        const char *typespec, KCreateMode cmode, const char *path, va_list args ) throw()
-    { return VDBManagerVCreateTable ( this, tbl, schema, typespec, cmode, path, args ); }
-
-
-    /* OpenTableRead
-     *  open a table for read using manager
-     * OpenTableUpdate
-     *  open a table for read/write using manager
-     *
-     *  "tbl" [ OUT ] - return parameter for newly opened table
-     *
-     *  "schema" [ IN, NULL OKAY ] - optional schema object with
-     *  latest versions of table schema.
-     *
-     *  "path" [ IN ] - NUL terminated string in
-     *  wd-native character set giving path to table
-     */
-    inline rc_t OpenTable ( const VTable **tbl, struct VSchema const *schema,
-        const char *path, ... ) const throw ()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = VDBManagerVOpenTableRead ( this, tbl, schema, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenTable ( const VTable **tbl, struct VSchema const *schema,
-        const char *path, va_list args ) const throw ()
-    { return VDBManagerVOpenTableRead ( this, tbl, schema, path, args ); }
-
-    inline rc_t OpenTable ( VTable **tbl, struct VSchema const *schema,
-        const char *path, ... ) throw ()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = VDBManagerVOpenTableUpdate ( this, tbl, schema, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenTable ( VTable **tbl, struct VSchema const *schema,
-        const char *path, va_list args ) throw ()
-    { return VDBManagerVOpenTableUpdate ( this, tbl, schema, path, args ); }
-
-
-    /* MakeSchema
-     *  create a schema object
-     */
-    inline rc_t MakeSchema ( VSchema **schema ) const throw()
-    { return VDBManagerMakeSchema ( this, schema ); }
-
-
-    /* MakeRead
-     * MakeUpdate
-     *  create library handle for specific use
-     *  NB - only one of the functions will be implemented
-     *
-     *  "wd" [ IN, NULL OKAY ] - optional working directory for
-     *  accessing the file system. mgr will attach its own reference.
-     */
-    static inline rc_t MakeRead ( const VDBManager **mgr,
-        const KDirectory *wd = 0 ) throw()
-    { return VDBManagerMakeRead ( mgr, wd ); }
-
-    static inline rc_t MakeUpdate ( VDBManager **mgr,
-        KDirectory *wd = 0 ) throw()
-    { return VDBManagerMakeUpdate ( mgr, wd ); }
-
-
-    /* Version
-     *  returns the library version
-     */
-    inline rc_t Version ( uint32_t *version ) const throw()
-    { return VDBManagerVersion ( this, version ); }
-
-
-    /* Writable
-     *  returns 0 if object is writable
-     *  or a reason why if not
-     *
-     *  "path" [ IN ] - NUL terminated path
-     */
-    inline rc_t Writable ( const char *path, ... ) const throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = VDBManagerVWritable ( this, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t Writable ( const char *path, va_list args ) const throw()
-    { return VDBManagerVWritable ( this, path, args ); }
-
-
-    /* Lock
-     *  apply lock
-     *
-     *  if object is already locked, the operation is idempotent
-     *  and returns an rc state of rcLocked
-     *
-     *  "path" [ IN ] - NUL terminated path
-     */
-    inline rc_t Lock ( const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = VDBManagerVLock ( this, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t Lock ( const char *path, va_list args ) throw()
-    { return VDBManagerVLock ( this, path, args ); }
-
-
-    /* Unlock
-     *  remove lock
-     *
-     *  if object is already unlocked, the operation is idempotent
-     *  and returns an rc state of rcUnlocked
-     *
-     *  "path" [ IN ] - NUL terminated path
-     */
-    inline rc_t Unlock ( const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = VDBManagerVUnlock ( this, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t Unlock ( const char *path, va_list args ) throw()
-    { return VDBManagerVUnlock ( this, path, args ); }
-
-
-    /* Drop
-     *  drop an object based on its path
-     *
-     *  "path" [ IN ] - NUL terminated string in UTF-8 giving path to the vdb object
-     */
-    inline rc_t Drop( uint32_t obj_type, const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = VDBManagerVDrop ( this, obj_type, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t Drop( uint32_t obj_type, const char *path, va_list args ) throw()
-    { return VDBManagerVDrop ( this, obj_type, path, args ); }
-
-
-    /* AddSchemaIncludePath
-     *  add a path to schema for locating input files
-     */
-    inline rc_t AddSchemaIncludePath ( const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = VDBManagerVAddSchemaIncludePath ( this, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t AddSchemaIncludePath ( const char *path, va_list args ) throw()
-    { return VDBManagerVAddSchemaIncludePath ( this, path, args ); }
-
-
-    /* AddLoadLibraryPath
-     *  add a path to loader for locating dynamic libraries
-     */
-    inline rc_t AddLoadLibraryPath ( const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = VDBManagerVAddLoadLibraryPath ( this, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t AddLoadLibraryPath ( const char *path, va_list args ) throw()
-    { return VDBManagerVAddLoadLibraryPath ( this, path, args ); }
-
-
-    /* GetUserData
-     * SetUserData
-     *  store/retrieve an opaque pointer to user data
-     *
-     *  "data" [ OUT ] - return parameter for getting data
-     *  "data" [ IN ] - parameter for setting data
-     *
-     *  "destroy" [ IN, NULL OKAY ] - optional destructor param
-     *  invoked from destructor of "self"
-     */
-    inline rc_t GetUserData ( void **data ) const throw()
-    { return VDBManagerGetUserData ( this, data ); }
-
-    inline rc_t SetUserData ( void *data,
-        void ( CC * destroy ) ( void *data ) = 0 ) const throw()
-    { return VDBManagerSetUserData ( this, data, destroy ); }
-
-    /* GetCacheRoot
-     * SetCacheRoot
-     * get/set CacheRoot ( location for user-repo/dbgap-repo )
-     *
-     * "path" [ OUT ] - VPath pointing to current location
-     * "path" [ IN ]  - VPath of new location
-     *
-     */
-    inline rc_t GetCacheRoot ( struct VPath const ** path ) const throw()
-    { return VDBManagerGetCacheRoot ( this, path ); }
-
-    inline rc_t SetCacheRoot ( struct VPath const * path ) const throw()
-    { return VDBManagerSetCacheRoot ( this, path ); }
-
-
-private:
-    VDBManager ();
-    ~ VDBManager ();
-    VDBManager ( const VDBManager& );
-    VDBManager &operator = ( const VDBManager& );
-};
-
-#endif // _hpp_vdb_manager_
diff --git a/interfaces/vdb/report.h b/interfaces/vdb/report.h
deleted file mode 100644
index 90d3695..0000000
--- a/interfaces/vdb/report.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vdb_report_
-#define _h_vdb_report_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct VDBManager;
-struct VDatabase;
-struct VTable;
-
-
-/*--------------------------------------------------------------------------
- * An unrecoverable error happened.
- * We can help to solve it
- * by reporting information about known application execution environment.
- */
-
-
-/* SetVDBManager
- *  remember the manager in use
- */
-VDB_EXTERN rc_t CC ReportSetVDBManager ( struct VDBManager const *mgr );
-
-
-/* SetDatabase
- *  To be called after application successfully opened Database
- *  specified in command line.
- *  If the application supports multiple objects passed in command line
- *  to be processed in a loop: should be called for each argument database.
- *
- *  "path" [ IN ] - path to the database that is used to access it
- */
-VDB_EXTERN rc_t CC ReportResetDatabase ( const char *path,
-    struct VDatabase const *db );
-
-
-/* SetTable
- *  To be called after application successfully opened Table
- *  specified in command line.
- *  If the application supports multiple objects passed in command line
- *  to be processed in a loop: should be called for each argument table.
- *
- *  "path" [ IN ] - path to the table that is used to access it
- */
-VDB_EXTERN rc_t CC ReportResetTable ( const char *path,
-    struct VTable const *tbl );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_vdb_report_ */
diff --git a/interfaces/vdb/schema.h b/interfaces/vdb/schema.h
deleted file mode 100644
index e0db467..0000000
--- a/interfaces/vdb/schema.h
+++ /dev/null
@@ -1,460 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vdb_schema_
-#define _h_vdb_schema_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KNamelist;
-struct VDBManager;
-
-
-/*--------------------------------------------------------------------------
- * VSchema
- *  a virtual table schema
- *
- *  a schema is built from column, type and sub-schema declarations. The
- *  pseudo-BNF below gives a simplified description of the structure,
- *  with certain contextual constraints omitted.
- *
- *  at the global level, both read and write column declarations are permitted.
- *  type declarations are permitted at any level but always enter into global
- *  scope.
- *
- *  column names may be overloaded to allow for multiple data types under a
- *  single name. a column is identified by its ( name, datatype ) pair. the
- *  pairing ( name, NULL ) identifies the default type for name.
- *
- *  column declarations are intentionally created by assignment ( '=' ) or
- *  are updated with additional productions by appending ( '+=' ). this
- *  distinction is intended to prevent unintended consequences.
- *
- *  column productions come in the form of a simple column assignment, a
- *  data conversion function, or a sub-schema function. the simple column
- *  production takes a column name, the functions take some combination of
- *  constant and column name parameters.
- *
- *  a column assignment source ( column, function or sub-schema ) will have
- *  its own data type. when assigned directly, it must match the destination
- *  type either exactly or as the result of implicit type promotion. as an
- *  alternative, an explicit up or down cast ( or casts ) may be performed as
- *  an aid in source resolution.
- *
- *  read column declarations introduce a virtual column by ( name, datatype ).
- *  globally, they may be declared as "extern" to make them accessible via the
- *  API. extern columns may have any of their productions tagged as "default"
- *  to assign significance to the pair ( name, NULL ). when more than one type
- *  for a name is tagged as default, the most recently resolved is arbitrarily
- *  chosen. read source columns may be virtual or physical if the latter is
- *  within scope.
- *
- *  write column declarations introduce virtual columns by ( name, datatype ),
- *  and define physical column ( encoding, decoding ) bindings. virtual columns
- *  may be introduced as "extern" at global scope, where they have no source
- *  productions given that they take their input from the API. non-extern
- *  write columns are virtual and allow normal column productions with the
- *  exception that they may not be sourced by physical columns.
- *
- *  one special write column declaration introduces physical columns by
- *  name only ( name overloading cannot exist in the physical layer ) and
- *  requires a special production that binds together two sub-schema functions;
- *  one for encoding and the other for decoding.
- */
-typedef struct VSchema VSchema;
-
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-VDB_EXTERN rc_t CC VSchemaAddRef ( const VSchema *self );
-VDB_EXTERN rc_t CC VSchemaRelease ( const VSchema *self );
-
-
-/* Make
- *  create a schema object
- */
-VDB_EXTERN rc_t CC VDBManagerMakeSchema ( struct VDBManager const *self, VSchema **schema );
-
-
-/* AddIncludePath
- *  add an include path to schema for locating input files
- */
-VDB_EXTERN rc_t CC VSchemaAddIncludePath ( VSchema *self, const char *path, ... );
-VDB_EXTERN rc_t CC VSchemaVAddIncludePath ( VSchema *self, const char *path, va_list args );
-
-
-/* ParseText
- *  parse schema text
- *  add productions to existing schema
- *
- *  "name" [ IN, NULL OKAY ] - optional name
- *  representing text, e.g. filename
- *
- *  "text" [ IN ] and "bytes" [ IN ] - input buffer of text
- */
-VDB_EXTERN rc_t CC VSchemaParseText ( VSchema *self, const char *name,
-    const char *text, size_t bytes );
-
-
-/* ParseFile
- *  parse schema file
- *  add productions to existing schema
- *
- *  "name" [ IN ] - filename, absolute or valid relative to
- *  working directory or within an include path
- */
-VDB_EXTERN rc_t CC VSchemaParseFile ( VSchema *self, const char *name, ... );
-VDB_EXTERN rc_t CC VSchemaVParseFile ( VSchema *self, const char *name, va_list args );
-
-
-/* Dump
- *  dump schema as text
- *
- *  "mode" [ IN ] - selects textual conversion mode ( see VSchemaDumpMode )
- *
- *  "decl" [ IN, NULL OKAY ] - selects a declaration to dump
- *
- *  "flush" [ IN ] and "dst" [ IN, OPAQUE ] - callback for delivering
- *  buffered schema text
- */
-enum VSchemaDumpMode
-{
-    sdmPrint,            /* standard display for reading and printing */
-    sdmCompact           /* compacted white-space representation      */
-};
-
-VDB_EXTERN rc_t CC VSchemaDump ( const VSchema *self, uint32_t mode, const char *decl,
-    rc_t ( CC * flush ) ( void *dst, const void *buffer, size_t bsize ), void *dst );
-
-
-/* IncludeFiles
- *  generates a list of paths to include file
- */
-VDB_EXTERN rc_t CC VSchemaIncludeFiles ( const VSchema *self, struct KNamelist const **list );
-
-
-/*--------------------------------------------------------------------------
- * VTypedecl
- *  a runtime type id and vector dimension
- *
- *  describes the general form of a type declaration: "TYPE [ DIM ]"
- */
-typedef struct VTypedecl VTypedecl;
-struct VTypedecl
-{
-    /* runtime type id */
-    uint32_t type_id;
-
-    /* vector dimension */
-    uint32_t dim;
-};
-
-
-/* Resolve
- *  converts a typedecl string to type id and vector dimension
- *
- *  "resolved" [ OUT ] - resolved type declaration
- *
- *  "typedecl" [ IN ] - type declaration
- */
-VDB_EXTERN rc_t CC VSchemaResolveTypedecl ( const VSchema *self,
-    VTypedecl *resolved, const char *typedecl, ... );
-VDB_EXTERN rc_t CC VSchemaVResolveTypedecl ( const VSchema *self,
-    VTypedecl *resolved, const char *typedecl, va_list args );
-
-
-/* ToText
- *  convert a VTypedecl into canonical text
- *
- *  "schema" [ IN ] - schema object that would know about this type
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - output buffer for
- *  NUL terminated type declaration string
- */
-VDB_EXTERN rc_t CC VTypedeclToText ( const VTypedecl *self,
-    const VSchema *schema, char *buffer, size_t bsize );
-
-
-/* ToSupertype
- *  attempt to cast a typedecl to a size-equivalent supertype decl
- *
- *  "schema" [ IN ] - schema object that would know about this type
- *
- *  "cast" [ OUT ] - return parameter for supertype decl
- *  valid only if function returns true.
- *
- *  returns true if cast succeeded
- */
-VDB_EXTERN bool CC VTypedeclToSupertype ( const VTypedecl *self,
-    const VSchema *schema, VTypedecl *cast );
-
-
-/* ToType
- *  attempt to cast a typedecl to a size-equivalent ancestor decl
- *
- *  "schema" [ IN ] - schema object that would know about this type
- *
- *  "ancestor" [ IN ] - target type or typeset for cast
- *
- *  "cast" [ OUT ] - return parameter for ancestor decl
- *  valid only if function returns true. if "ancestor" was a typeset,
- *  the value of "cast" will be the closest matching ancestral type.
- *
- *  "distance" [ OUT, NULL OKAY ] - optional linear measure of casting
- *  generations. valid only if function returns true. a value of 0 means
- *  that "self" is a direct match with "ancestor", a value of 1 means that
- *  "self" is an immediate subtype of "ancestor", etc.
- *
- *  returns true if cast succeeded
- */
-VDB_EXTERN bool CC VTypedeclToType ( const VTypedecl *self,
-    const VSchema *schema,  uint32_t ancestor,
-    VTypedecl *cast, uint32_t *distance );
-
-
-/* ToTypedecl
- *  attempt to cast a typedecl to a size-equivalent ancestor decl
- *
- *  "schema" [ IN ] - schema object that would know about this type
- *
- *  "ancestor" [ IN ] - target typedecl or typeset for cast
- *
- *  "cast" [ OUT, NULL OKAY ] - return parameter for ancestor decl
- *  valid only if function returns true. if "ancestor" was a typeset,
- *  the value of "cast" will be the closest matching ancestral type.
- *
- *  "distance" [ OUT, NULL OKAY ] - optional linear measure of casting
- *  generations. valid only if function returns true. a value of 0 means
- *  that "self" is a direct match with "ancestor", a value of 1 means that
- *  "self" is an immediate subtype of "ancestor", etc.
- *
- *  returns true if cast succeeded
- */
-VDB_EXTERN bool CC VTypedeclToTypedecl ( const VTypedecl *self,
-    const VSchema *schema, const VTypedecl *ancestor,
-    VTypedecl *cast, uint32_t *distance );
-
-
-/* CommonAncestor
- *  find a common ancestor between "self" and "peer"
- *  returns distance as sum of distances from each to "ancestor"
- *
- *  "schema" [ IN ] - schema object that would know about this type
- *
- *  "peer" [ IN ] - typedecl or typeset to compare against self
- *
- *  "ancestor" [ OUT, NULL OKAY ] - return parameter for closest
- *  common ancestor decl. valid only if function returns true.
- *
- *  "distance" [ OUT, NULL OKAY ] - optional linear measure of casting
- *  generations. valid only if function returns true. a value of 0 means
- *  that "self" is a direct match with "peer", a value of 1 means that
- *  "self" is an immediate subtype of "peer", or vice-versa, etc.
- *  measured as the sum of distances self=>ancestor and peer=>ancestor
- */
-VDB_EXTERN bool CC VTypedeclCommonAncestor ( const VTypedecl *self, const VSchema *schema,
-    const VTypedecl *peer, VTypedecl *ancestor, uint32_t *distance );
-
-
-/*--------------------------------------------------------------------------
- * VTypedesc
- *  describes the fundamental properties of a VTypedecl
- *  replaces the deprecated structure VTypedef
- *
- *  VTypedecl describes an element in terms of the element's
- *  super-type id and vector dimension.
- *
- *  VTypedesc describes an element in terms of the element's
- *  intrinsic type domain and size, and the vector dimension
- *  is adjusted to reflect the intrinsic super-type.
- *
- *  the effect is as if a VTypedecl were cast toward its most
- *  fundamental supertype using "VTypedeclToSupertype", and
- *  the final size and dimension are taken from there:
- *
- *    given - VTypedecl td; const VSchema *schema;
- *    while ( VTypedeclToSupertype ( & td, schema, & td ) )
- *        ( void ) 0;
- *
- *    then -
- *    VTypedesc desc =
- *    {
- *      bit_sizeof_type ( td . type_id ),
- *      td . dim,
- *      domain_of_type ( td . type_id )
- *    }
- */
-enum
-{
-    /* boolean domain */
-    vtdBool = 1,
-
-    /* numeric domains */
-    vtdUint, vtdInt, vtdFloat,
-
-    /* textual domains */
-    vtdAscii, vtdUnicode
-};
-
-typedef struct VTypedesc VTypedesc;
-struct VTypedesc
-{
-    /* sizeof intrinsic supertype */
-    uint32_t intrinsic_bits;
-
-    /* recalculated vector dimension */
-    uint32_t intrinsic_dim;
-
-    /* data domain */
-    uint32_t domain;
-};
-
-
-/* Sizeof
- */
-VDB_EXTERN uint32_t CC VTypedescSizeof ( const VTypedesc *self );
-
-
-/* DescribeTypedecl
- *  produce a description of typedecl properties
- */
-VDB_EXTERN rc_t CC VSchemaDescribeTypedecl ( const VSchema *self,
-    VTypedesc *desc, const VTypedecl *td );
-
-
-
-/*--------------------------------------------------------------------------
- * VSchemaRuntimeTable
- *  an object that represents a table ( or sub-table ) created at runtime
- *  that can be used to create a VTable object
- */
-typedef struct VSchemaRuntimeTable VSchemaRuntimeTable;
-
-
-/* Make
- *  make a table in the schema provided
- *
- *  "tbl" [ OUT ] - return parameter for new schema table object
- *
- *  "type_name" [ IN ] - NUL terminated string giving desired typename of table
- *   may include version spec - otherwise, a version of #1.0 will be assigned.
- *
- *  "supertype_spec" [ IN, NULL OKAY ] - optional supertype spec, giving
- *   either a single super-table type string or multiple comma-separated tables
- */
-VDB_EXTERN rc_t CC VSchemaMakeRuntimeTable ( VSchema *self,
-    VSchemaRuntimeTable **tbl, const char *type_name, const char *supertype_spec );
-
-
-/* Close
- *  close the schema table handle
- *  discards any uncomitted data
- */
-VDB_EXTERN rc_t CC VSchemaRuntimeTableClose ( VSchemaRuntimeTable *self );
-
-
-/* Commit
- *  commits table data
- *  closes object to further modification
- */
-VDB_EXTERN rc_t CC VSchemaRuntimeTableCommit ( VSchemaRuntimeTable *self );
-
-
-/* AddColumn
- *  add a simple column to the table
- *
- *  "td" [ IN ] - data type of column, obtained from schema object
- *
- *  "encoding" [ IN, NULL OKAY ] - optional compression/encoding type
- *  specified as a NUL-terminated string
- *
- *  "name" [ IN ] - NUL-terminated simple ASCII name
- *   conforming to column name requirements
- */
-VDB_EXTERN rc_t CC VSchemaRuntimeTableAddColumn ( VSchemaRuntimeTable *self, 
-    const VTypedecl *td, const char *encoding, const char *name, ... );
-VDB_EXTERN rc_t CC VSchemaRuntimeTableVAddColumn ( VSchemaRuntimeTable *self, 
-    const VTypedecl *td, const char *encoding, const char *name, va_list args );
-
-
-/* AddTypedColumn
- *  Gerber versions of AddColumn
- *
- *  AddBooleanColumn - simple boolean column with default compression
- *                     provides both packed ( single bit ) and byte versions
- *  AddIntegerColumn - sized integer column with appropriate sign, size and compression
- *  AddFloatColumn   - sized floating point column with lossy compression
- *  AddAsciiColumn   - 8-bit ASCII text column with standard compression
- *  AddUnicodeColumn - UTF8, UTF16, or UTF32 text column with standard compression
- */
-VDB_EXTERN rc_t CC VSchemaRuntimeTableAddBooleanColumn ( VSchemaRuntimeTable *self,
-    const char *name, ... );
-VDB_EXTERN rc_t CC VSchemaRuntimeTableAddIntegerColumn ( VSchemaRuntimeTable *self,
-    uint32_t bits, bool has_sign,  const char *name, ... );
-VDB_EXTERN rc_t CC VSchemaRuntimeTableAddFloatColumn ( VSchemaRuntimeTable *self,
-    uint32_t bits, uint32_t significant_mantissa_bits,  const char *name, ... );
-VDB_EXTERN rc_t CC VSchemaRuntimeTableAddAsciiColumn ( VSchemaRuntimeTable *self,
-    const char *name, ... );
-VDB_EXTERN rc_t CC VSchemaRuntimeTableAddUnicodeColumn ( VSchemaRuntimeTable *self,
-    uint32_t bits, const char *name, ... );
-
-VDB_EXTERN rc_t CC VSchemaRuntimeTableVAddBooleanColumn ( VSchemaRuntimeTable *self,
-    const char *name, va_list args );
-VDB_EXTERN rc_t CC VSchemaRuntimeTableVAddIntegerColumn ( VSchemaRuntimeTable *self,
-    uint32_t bits, bool has_sign,  const char *name, va_list args );
-VDB_EXTERN rc_t CC VSchemaRuntimeTableVAddFloatColumn ( VSchemaRuntimeTable *self,
-    uint32_t bits, uint32_t significant_mantissa_bits,  const char *name, va_list args );
-VDB_EXTERN rc_t CC VSchemaRuntimeTableVAddAsciiColumn ( VSchemaRuntimeTable *self,
-    const char *name, va_list args );
-VDB_EXTERN rc_t CC VSchemaRuntimeTableVAddUnicodeColumn ( VSchemaRuntimeTable *self,
-    uint32_t bits, const char *name, va_list args );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_vdb_schema_ */
diff --git a/interfaces/vdb/schema.hpp b/interfaces/vdb/schema.hpp
deleted file mode 100644
index e1ac4a4..0000000
--- a/interfaces/vdb/schema.hpp
+++ /dev/null
@@ -1,252 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb_schema_
-#define _hpp_vdb_schema_
-
-#ifndef _h_vdb_schema_
-#include <vdb/schema.h>
-#endif
-
-/*--------------------------------------------------------------------------
- * VSchema
- *  a virtual table schema
- */
-struct VSchema
-{
-    /* AddRef
-     * Release
-     *  all objects are reference counted
-     *  NULL references are ignored
-     */
-    inline rc_t AddRef () const throw()
-    { return VSchemaAddRef ( this ); }
-    inline rc_t Release () const throw()
-    { return VSchemaRelease ( this ); }
-
-
-    /* AddIncludePath
-     *  add an include path to schema for locating input files
-     */
-    inline rc_t AddIncludePath ( const char *path, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, path );
-        rc_t rc = VSchemaVAddIncludePath ( this, path, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t AddIncludePath ( const char *path, va_list args ) throw()
-    { return VSchemaVAddIncludePath ( this, path, args ); }
-
-
-    /* ParseText
-     *  parse schema text
-     *  add productions to existing schema
-     *
-     *  "name" [ IN, NULL OKAY ] - optional name
-     *  representing text, e.g. filename
-     *
-     *  "text" [ IN ] and "bytes" [ IN ] - input buffer of text
-     */
-    inline rc_t ParseText ( const char *name, const char *text, size_t bytes ) throw()
-    { return VSchemaParseText ( this, name, text, bytes ); }
-
-
-    /* ParseFile
-     *  parse schema file
-     *  add productions to existing schema
-     *
-     *  "name" [ IN ] - filename, absolute or valid relative to
-     *  working directory or within an include path
-     */
-    inline rc_t ParseFile ( const char *name, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VSchemaVParseFile ( this, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t ParseFile ( const char *name, va_list args ) throw()
-    { return VSchemaVParseFile ( this, name, args ); }
-
-
-    /* Dump
-     *  dump schema as text
-     *
-     *  "mode" [ IN ] - selects textual conversion mode ( see VSchemaDumpMode )
-     *
-     *  "decl" [ IN, NULL OKAY ] - selects a declaration to dump
-     *
-     *  "flush" [ IN ] and "dst" [ IN, OPAQUE ] - callback for delivering
-     *  buffered schema text
-     */
-    inline rc_t Dump ( uint32_t mode, const char *decl,
-        rc_t ( CC * flush ) ( void *dst, const void *buffer, size_t bsize ), 
-        void *dst ) const throw()
-    { return VSchemaDump ( this, mode, decl, flush, dst ); }
-
-
-    /* IncludeFiles
-     *  generates a list of paths to include file
-     */
-    inline rc_t IncludeFiles ( struct KNamelist const **list ) const throw()
-    { return VSchemaIncludeFiles ( this, list ); }
-
-
-    /* Resolve
-     *  converts a typedecl string to type id and vector dimension
-     *
-     *  "resolved" [ OUT ] - resolved type declaration
-     *
-     *  "typedecl" [ IN ] - type declaration
-     */
-    inline rc_t ResolveTypedecl ( VTypedecl *resolved,
-        const char *typedecl, ... ) const throw()
-    {
-        va_list args;
-        va_start ( args, typedecl );
-        rc_t rc = VSchemaVResolveTypedecl ( this, resolved, typedecl, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t ResolveTypedecl ( VTypedecl *resolved,
-        const char *typedecl, va_list args ) const throw()
-    { return VSchemaVResolveTypedecl ( this, resolved, typedecl, args ); }
-
-
-    /* ToText
-     *  convert a VTypedecl into canonical text
-     *
-     *  "schema" [ IN ] - schema object that would know about this type
-     *
-     *  "buffer" [ OUT ] and "bsize" [ IN ] - output buffer for
-     *  NUL terminated type declaration string
-     */
-    inline bool TypedeclToText ( const VTypedecl *decl, char *buffer,
-        size_t bsize ) const throw()
-    { return VTypedeclToText ( decl, this, buffer, bsize ); }
-
-
-    /* ToSupertype
-     *  attempt to cast a typedecl to a size-equivalent supertype decl
-     *
-     *  "schema" [ IN ] - schema object that would know about this type
-     *
-     *  "cast" [ OUT ] - return parameter for supertype decl
-     *  valid only if function returns true.
-     *
-     *  returns true if cast succeeded
-     */
-    inline bool TypedeclToSupertype ( const VTypedecl *decl,
-        VTypedecl *cast ) const throw()
-    { return VTypedeclToSupertype ( decl, this, cast ); }
-
-
-    /* ToType
-     *  attempt to cast a typedecl to a size-equivalent ancestor decl
-     *
-     *  "schema" [ IN ] - schema object that would know about this type
-     *
-     *  "ancestor" [ IN ] - target type or typeset for cast
-     *
-     *  "cast" [ OUT ] - return parameter for ancestor decl
-     *  valid only if function returns true. if "ancestor" was a typeset,
-     *  the value of "cast" will be the closest matching ancestral type.
-     *
-     *  "distance" [ OUT, NULL OKAY ] - optional linear measure of casting
-     *  generations. valid only if function returns true. a value of 0 means
-     *  that "self" is a direct match with "ancestor", a value of 1 means that
-     *  "self" is an immediate subtype of "ancestor", etc.
-     *
-     *  returns true if cast succeeded
-     */
-    inline bool TypedeclToType ( const VTypedecl *decl, uint32_t ancestor,
-        VTypedecl *cast, uint32_t *distance ) const throw()
-    { return VTypedeclToType ( decl, this, ancestor, cast, distance ); }
-
-
-    /* ToTypedecl
-     *  attempt to cast a typedecl to a size-equivalent ancestor decl
-     *
-     *  "schema" [ IN ] - schema object that would know about this type
-     *
-     *  "ancestor" [ IN ] - target typedecl or typeset for cast
-     *
-     *  "cast" [ OUT, NULL OKAY ] - return parameter for ancestor decl
-     *  valid only if function returns true. if "ancestor" was a typeset,
-     *  the value of "cast" will be the closest matching ancestral type.
-     *
-     *  "distance" [ OUT, NULL OKAY ] - optional linear measure of casting
-     *  generations. valid only if function returns true. a value of 0 means
-     *  that "self" is a direct match with "ancestor", a value of 1 means that
-     *  "self" is an immediate subtype of "ancestor", etc.
-     *
-     *  returns true if cast succeeded
-     */
-    inline bool TypedeclToTypedecl ( const VTypedecl *decl, const VTypedecl *ancestor,
-        VTypedecl *cast, uint32_t *distance ) const throw()
-    { return VTypedeclToTypedecl ( decl, this, ancestor, cast, distance ); }
-
-
-    /* CommonAncestor
-     *  find a common ancestor between "self" and "peer"
-     *  returns distance as sum of distances from each to "ancestor"
-     *
-     *  "schema" [ IN ] - schema object that would know about this type
-     *
-     *  "peer" [ IN ] - typedecl or typeset to compare against self
-     *
-     *  "ancestor" [ OUT, NULL OKAY ] - return parameter for closest
-     *  common ancestor decl. valid only if function returns true.
-     *
-     *  "distance" [ OUT, NULL OKAY ] - optional linear measure of casting
-     *  generations. valid only if function returns true. a value of 0 means
-     *  that "self" is a direct match with "peer", a value of 1 means that
-     *  "self" is an immediate subtype of "peer", or vice-versa, etc.
-     *  measured as the sum of distances self=>ancestor and peer=>ancestor
-     */
-    inline bool TypedeclCommonAncestor ( const VTypedecl *decl, const VTypedecl *peer,
-        VTypedecl *ancestor, uint32_t *distance ) const throw()
-    { return VTypedeclCommonAncestor ( decl, this, peer, ancestor, distance ); }
-
-
-    /* DescribeTypedecl
-     *  produce a description of typedecl properties
-     */
-    inline rc_t DescribeTypedecl ( VTypedesc *desc, const VTypedecl *td ) const throw()
-    { return VSchemaDescribeTypedecl ( this, desc, td ); }
-
-
-private:
-    VSchema ();
-    ~ VSchema ();
-    VSchema ( const VSchema& );
-    VSchema &operator = ( const VSchema& );
-};
-
-#endif
\ No newline at end of file
diff --git a/interfaces/vdb/table.h b/interfaces/vdb/table.h
deleted file mode 100644
index c08f0b7..0000000
--- a/interfaces/vdb/table.h
+++ /dev/null
@@ -1,424 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vdb_table_
-#define _h_vdb_table_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifndef _h_kdb_column_
-#include <kdb/column.h>
-#endif
-
-#ifndef _h_kdb_index_
-#include <kdb/index.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct VSchema;
-struct KMetadata;
-struct KNamelist;
-struct VDatabase;
-struct VDBManager;
-
-
-/*--------------------------------------------------------------------------
- * VTable
- *  a collection of columns indexed by row id, metadata, indices
- */
-typedef struct VTable VTable;
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-VDB_EXTERN rc_t CC VTableAddRef ( const VTable *self );
-VDB_EXTERN rc_t CC VTableRelease ( const VTable *self );
-
-
-/* CreateTable
- *  create a new or open an existing table using manager
- *
- *  "tbl" [ OUT ] - return parameter for newly opened table
- *
- *  "schema" [ IN ] - schema object containg table
- *  declaration to be used in creating tbl.
- *
- *  "typespec" [ IN ] - type and optionally version of table schema,
- *  e.g. 'MY_NAMESPACE:MyTable' or 'MY_NAMESPACE:MyTable#1.1'
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to table
- */
-VDB_EXTERN rc_t CC VDBManagerCreateTable ( struct VDBManager *self, VTable **tbl,
-    struct VSchema const *schema, const char *typespec,
-    KCreateMode cmode, const char *path, ... );
-VDB_EXTERN rc_t CC VDBManagerVCreateTable ( struct VDBManager *self, VTable **tbl,
-    struct VSchema const *schema, const char *typespec,
-    KCreateMode cmode, const char *path, va_list args );
-
-
-/* CreateTable
- *  create a new or open an existing table under database
- *
- *  "tbl" [ OUT ] - return parameter for newly opened table
- *
- *  "member" [ IN ] - name of table member template under database
- *  the named member is a table template rather than a named table.
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "cmode_mask" [ IN ] - if a bit of "cmode_mask" is set (1) then
- *  the corresponding bit of "cmode" is used for the table,
- *  otherwise (0) the corresponding bit is taken from db and "cmode"'s
- *  bit is ignored.
- *  the mask for setting mode (kcmOpen, kcmInit, kcmCreate) is at least
- *  one bit set in the mask kcmValueMask.
- *
- *  "name" [ IN ] - NUL terminated string in
- *  db-native character set giving actual table name
- */
-/*VDB_EXTERN rc_t CC VDatabaseCreateTableDefault ( struct VDatabase *self, VTable **tbl,
-    const char *member, const char *name, ... );
-VDB_EXTERN rc_t CC VDatabaseVCreateTableDefault ( VDatabase *self, VTable **tbl,
-    const char *member, const char *name, va_list args )
-*/
-VDB_EXTERN rc_t CC VDatabaseCreateTableByMask ( struct VDatabase *self, VTable **tbl,
-    const char *member, KCreateMode cmode, KCreateMode cmode_mask, const char *name, ... );
-VDB_EXTERN rc_t CC VDatabaseVCreateTableByMask ( struct VDatabase *self, VTable **tbl,
-    const char *member, KCreateMode cmode, KCreateMode cmode_mask, const char *name, va_list args );
-/* the following function is DEPRECATED, it's left for backward compatibility only */
-VDB_EXTERN rc_t CC VDatabaseCreateTable ( struct VDatabase *self, VTable **tbl,
-    const char *member, KCreateMode cmode, const char *name, ... );
-/* the following function is DEPRECATED, it's left for backward compatibility only */
-VDB_EXTERN rc_t CC VDatabaseVCreateTable ( struct VDatabase *self, VTable **tbl,
-    const char *member, KCreateMode cmode, const char *name, va_list args );
-
-
-/* OpenTableRead
- *  open a table for read using manager
- * OpenTableUpdate
- *  open a table for read/write using manager
- *
- *  "tbl" [ OUT ] - return parameter for newly opened table
- *
- *  "schema" [ IN, NULL OKAY ] - optional schema object with
- *  latest versions of table schema.
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to table
- */
-VDB_EXTERN rc_t CC VDBManagerOpenTableRead ( struct VDBManager const *self,
-    const VTable **tbl, struct VSchema const *schema,
-    const char *path, ... );
-VDB_EXTERN rc_t CC VDBManagerVOpenTableRead ( struct VDBManager const *self,
-    const VTable **tbl, struct VSchema const *schema,
-    const char *path, va_list args );
-
-VDB_EXTERN rc_t CC VDBManagerOpenTableUpdate ( struct VDBManager *self,
-    VTable **tbl, struct VSchema const *schema,
-    const char *path, ... );
-VDB_EXTERN rc_t CC VDBManagerVOpenTableUpdate ( struct VDBManager *self,
-    VTable **tbl, struct VSchema const *schema,
-    const char *path, va_list args );
-
-
-/* OpenTableRead
- *  open a table for read under database
- * OpenTableUpdate
- *  open or create a table for read/write under database
- *
- *  "tbl" [ OUT ] - return parameter for newly opened table
- *
- *  "name" [ IN ] - NUL terminated string in
- *  db-native character set giving name of table member
- */
-VDB_EXTERN rc_t CC VDatabaseOpenTableRead ( struct VDatabase const *self,
-    const VTable **tbl, const char *name, ... );
-VDB_EXTERN rc_t CC VDatabaseVOpenTableRead ( struct VDatabase const *self,
-    const VTable **tbl, const char *name, va_list args );
-
-VDB_EXTERN rc_t CC VDatabaseOpenTableUpdate ( struct VDatabase *self,
-    VTable **tbl, const char *name, ... );
-VDB_EXTERN rc_t CC VDatabaseVOpenTableUpdate ( struct VDatabase *self,
-    VTable **tbl, const char *name, va_list args );
-
-
-/* Typespec
- *  retrieve table typespec
- *
- *  AVAILABILITY: version 2.1
- *
- *  "ts_buff" [ IN ] and "ts_size" [ IN ] - buffer for return of NUL-terminated
- *  table typespec, e.g. 'NCBI:tbl:abc #1.1'
- */
-VDB_EXTERN rc_t CC VTableTypespec ( const VTable *self,
-    char *ts_buff, size_t ts_size );
-
-
-/* Locked
- *  returns true if locked
- */
-VDB_EXTERN bool CC VTableLocked ( const VTable *self );
-
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-VDB_EXTERN rc_t CC VTableWritable ( const VTable *self, uint32_t type,
-    const char * name, ... );
-VDB_EXTERN rc_t CC VTableVWritable ( const VTable *self, uint32_t type,
-    const char * name, va_list args );
-
-/* Lock
- *  apply lock
- *
- *  if object is already locked, the operation is idempotent
- *  and returns an rc state of rcLocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-VDB_EXTERN rc_t CC VTableLock ( VTable *self, uint32_t type,
-    const char * name, ... );
-VDB_EXTERN rc_t CC VTableVLock ( VTable *self, uint32_t type,
-    const char * name, va_list args );
-
-/* Unlock
- *  remove lock
- *
- *  if object is already unlocked, the operation is idempotent
- *  and returns an rc state of rcUnlocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-VDB_EXTERN rc_t CC VTableUnlock ( VTable *self, uint32_t type,
-    const char * name, ... );
-VDB_EXTERN rc_t CC VTableVUnlock ( VTable *self, uint32_t type,
-    const char * name, va_list args );
-
-
-/* OpenMetadataRead
- * OpenMetadataUpdate
- *  opens metadata file
- *
- *  "meta" [ OUT ] - return parameter for metadata
- */
-VDB_EXTERN rc_t CC VTableOpenMetadataRead ( const VTable *self, struct KMetadata const **meta );
-VDB_EXTERN rc_t CC VTableOpenMetadataUpdate ( VTable *self, struct KMetadata **meta );
-
-
-/* ColumnCreateParams
- *  sets the creation parameters for physical columns
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "checksum" [ IN ] - the type of checksum information to
- *  apply when writing blobs
- *
- *  "pgsize" [ IN, DEFAULT ZERO ] - size of internal column "pages"
- *  the default value is indicated by 0 ( zero ).
- *  NB - CURRENTLY THE ONLY SUPPORTED PAGE SIZE IS 1 ( ONE ) BYTE.
- */
-VDB_EXTERN rc_t CC VTableColumnCreateParams ( VTable *self,
-    KCreateMode cmode, KChecksum checksum, size_t pgsize );
-
-
-/* CreateIndex
- * VCreateIndex
- *  create a new or open an existing index
- *
- *  "idx" [ OUT ] - return parameter for newly opened index
- *
- *  "type" [ IN ] - type of index to create
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
- */
-VDB_EXTERN rc_t CC VTableCreateIndex ( VTable *self, KIndex **idx,
-    KIdxType type, KCreateMode cmode, const char *name, ... );
-VDB_EXTERN rc_t CC VTableVCreateIndex ( VTable *self, KIndex **idx,
-    KIdxType type, KCreateMode cmode, const char *name, va_list args );
-
-
-/* OpenIndexRead
- * VOpenIndexRead
- *  open an index for read
- *
- *  "idx" [ OUT ] - return parameter for newly opened index
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
- */
-VDB_EXTERN rc_t CC VTableOpenIndexRead ( const VTable *self,
-    const KIndex **idx, const char *name, ... );
-VDB_EXTERN rc_t CC VTableVOpenIndexRead ( const VTable *self,
-    const KIndex **idx, const char *name, va_list args );
-
-
-/* OpenIndexUpdate
- * VOpenIndexUpdate
- *  open an index for read/write
- *
- *  "idx" [ OUT ] - return parameter for newly opened index
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
- */
-
-VDB_EXTERN rc_t CC VTableOpenIndexUpdate ( VTable *self,
-    KIndex **idx, const char *name, ... );
-VDB_EXTERN rc_t CC VTableVOpenIndexUpdate ( VTable *self,
-    KIndex **idx, const char *name, va_list args );
-
-
-/* ListColumns
- *  list readable or writable column names
- *
- *  "names" [ OUT ] - return parameter for namelist
- *
- *  availability: v2.1
- */
-VDB_EXTERN rc_t CC VTableListReadableColumns ( const VTable *self, struct KNamelist **names );
-VDB_EXTERN rc_t CC VTableListWritableColumns ( VTable *self, struct KNamelist **names );
-
-
-/* ListCol
- *  alias for VTableListReadableColumns
- *
- *  availability: v2.0
- */
-VDB_EXTERN rc_t CC VTableListCol ( const VTable *self, struct KNamelist **names );
-
-
-/* ListDatatypes
- *  returns list of typedecls for named column
- *
- *  "col" [ IN ] - column name
- *
- *  "dflt_idx" [ OUT, NULL OKAY ] - returns the zero-based index
- *  into "typedecls" of the default datatype for the named column
- *
- *  "typedecls" [ OUT ] - list of datatypes available for named column
- *
- *  availability: v2.1
- */
-VDB_EXTERN rc_t CC VTableListReadableDatatypes ( const VTable *self, const char *col,
-    uint32_t *dflt_idx, struct KNamelist **typedecls );
-VDB_EXTERN rc_t CC VTableListWritableDatatypes ( VTable *self,
-    const char *col, struct KNamelist **typedecls );
-
-
-/* ColumnDatatypes
- *  alias for VTableListReadableDatatypes
- *
- *  availability: v2.0
- */
-VDB_EXTERN rc_t CC VTableColumnDatatypes ( const VTable *self, const char *col,
-    uint32_t *dflt_idx, struct KNamelist **typedecls );
-
-
-/* Reindex
- *  optimize column indices
- */
-VDB_EXTERN rc_t CC VTableReindex ( VTable *self );
-
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-VDB_EXTERN rc_t CC VTableOpenManagerRead ( const VTable *self, struct VDBManager const **mgr );
-VDB_EXTERN rc_t CC VTableOpenManagerUpdate ( VTable *self, struct VDBManager **mgr );
-
-
-/* OpenParent
- *  duplicate reference to parent database
- *  NB - returned reference must be released
- */
-VDB_EXTERN rc_t CC VTableOpenParentRead ( const VTable *self, struct VDatabase const **db );
-VDB_EXTERN rc_t CC VTableOpenParentUpdate ( VTable *self, struct VDatabase **db );
-
-
-/* OpenSchema
- *  duplicate reference to table schema
- *  NB - returned reference must be released
- */
-VDB_EXTERN rc_t CC VTableOpenSchema ( const VTable *self, struct VSchema const **schema );
-
-
-/* GetUserData
- * SetUserData
- *  store/retrieve an opaque pointer to user data
- *
- *  "data" [ OUT ] - return parameter for getting data
- *  "data" [ IN ] - parameter for setting data
- *
- *  "destroy" [ IN, NULL OKAY ] - optional destructor param
- *  invoked from destructor of "self"
- */
-VDB_EXTERN rc_t CC VTableGetUserData ( const VTable *self, void **data );
-VDB_EXTERN rc_t CC VTableSetUserData ( const VTable *self,
-    void *data, void ( CC * destroy ) ( void *data ) );
-
-
-/* IsEmpty
- *  check if the table is empty
- */
-VDB_EXTERN rc_t CC VTableIsEmpty( const VTable *self, bool * empty );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_vdb_table_ */
diff --git a/interfaces/vdb/table.hpp b/interfaces/vdb/table.hpp
deleted file mode 100644
index 3270a22..0000000
--- a/interfaces/vdb/table.hpp
+++ /dev/null
@@ -1,328 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb_table_
-#define _hpp_vdb_table_
-
-#ifndef _h_vdb_table_
-#include <vdb/table.h>
-#endif
-
-#ifndef _h_vdb_cursor_
-#include <vdb/cursor.h>
-#endif
-
-
-/*--------------------------------------------------------------------------
- * VTable
- *  a collection of columns indexed by row id, metadata, indices
- */
-struct VTable
-{
-    /* AddRef
-     * Release
-     *  all objects are reference counted
-     *  NULL references are ignored
-     */
-    inline rc_t AddRef ( const VTable *self ) const throw()
-    { return VTableAddRef ( this ); }
-    inline rc_t Release ( const VTable *self ) const throw()
-    { return VTableRelease ( this ); }
-
-    /* Locked
-     *  returns true if locked
-     */
-    inline bool Locked () const throw()
-    { return VTableLocked ( this ); }
-
-
-    /* Writable
-     *  returns 0 if object is writable
-     *  or a reason why if not
-     *
-     *  "type" [ IN ] - a KDBPathType
-     *  valid values are kptIndex and kptColumn
-     *
-     *  "path" [ IN ] - NUL terminated path
-     */
-     inline rc_t Writable ( uint32_t type, 
-        const char * name, ... ) const throw()
-     {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VTableVWritable ( this, type, name, args );
-        va_end ( args );
-        return rc;
-     }
-     inline rc_t Writable ( uint32_t type, 
-        const char * name, va_list args ) const throw()
-    { return VTableVWritable ( this, type, name, args ); }
-
-
-    /* Lock
-     *  apply lock
-     *
-     *  if object is already locked, the operation is idempotent
-     *  and returns an rc state of rcLocked
-     *
-     *  "type" [ IN ] - a KDBPathType
-     *  valid values are kptIndex and kptColumn
-     *
-     *  "name" [ IN ] - NUL terminated path
-     */
-    inline rc_t Lock ( uint32_t type, const char * name, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VTableVLock ( this, type, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t Lock ( uint32_t type, const char * name, va_list args ) throw()
-    { return VTableVLock ( this, type, name, args ); }
-
-    
-    /* Unlock
-     *  remove lock
-     *
-     *  if object is already unlocked, the operation is idempotent
-     *  and returns an rc state of rcUnlocked
-     *
-     *  "type" [ IN ] - a KDBPathType
-     *  valid values are kptIndex and kptColumn
-     *
-     *  "name" [ IN ] - NUL terminated path
-     */
-     inline rc_t Unlock ( uint32_t type, const char * name, ... ) throw()
-     {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VTableVUnlock ( this, type, name, args );
-        va_end ( args );
-        return rc;
-     }
-    inline rc_t UnLock ( uint32_t type, const char * name, va_list args ) throw()
-    { return VTableVUnlock ( this, type, name, args ); }
-
-
-    /* OpenMetadataRead
-     * OpenMetadataUpdate
-     *  opens metadata file
-     *
-     *  "meta" [ OUT ] - return parameter for metadata
-     */
-    inline rc_t OpenMetadataRead ( struct KMetadata const **meta ) const throw()
-    { return VTableOpenMetadataRead ( this, meta ); }
-    inline rc_t OpenMetadataUpdate ( struct KMetadata **meta ) throw()
-    { return VTableOpenMetadataUpdate ( this, meta ); }
-    
-
-    /* ColumnCreateParams
-     *  sets the creation parameters for physical columns
-     *
-     *  "cmode" [ IN ] - creation mode
-     *
-     *  "checksum" [ IN ] - the type of checksum information to
-     *  apply when writing blobs
-     *
-     *  "pgsize" [ IN, DEFAULT ZERO ] - size of internal column "pages"
-     *  the default value is indicated by 0 ( zero ).
-     *  NB - CURRENTLY THE ONLY SUPPORTED PAGE SIZE IS 1 ( ONE ) BYTE.
-     */
-    inline rc_t ColumnCreateParams ( KCreateMode cmode, 
-        KChecksum checksum, size_t pgsize ) throw()
-    { return VTableColumnCreateParams ( this, cmode, checksum, pgsize ); }
-
-
-    /* CreateIndex
-     * VCreateIndex
-     *  create a new or open an existing index
-     *
-     *  "idx" [ OUT ] - return parameter for newly opened index
-     *
-     *  "type" [ IN ] - type of index to create
-     *
-     *  "cmode" [ IN ] - creation mode
-     *
-     *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
-     */
-    inline rc_t CreateIndex ( KIndex **idx,
-        KIdxType type, KCreateMode cmode, const char *name, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VTableVCreateIndex ( this, idx, type, cmode, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t CreateIndex ( KIndex **idx,
-        KIdxType type, KCreateMode cmode, const char *name, va_list args ) throw()
-    { return VTableVCreateIndex ( this, idx, type, cmode, name, args ); }
-
-
-    /* OpenIndexRead
-     * VOpenIndexRead
-     *  open an index for read
-     *
-     *  "idx" [ OUT ] - return parameter for newly opened index
-     *
-     *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
-     */
-    inline rc_t OpenIndexRead ( const KIndex **idx,
-        const char *name, ... ) const throw()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VTableVOpenIndexRead ( this, idx, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenIndexRead ( const KIndex **idx,
-        const char *name, va_list args ) const throw()
-    { return VTableVOpenIndexRead ( this, idx, name, args ); }
-
-
-    /* OpenIndexUpdate
-     * VOpenIndexUpdate
-     *  open an index for read/write
-     *
-     *  "idx" [ OUT ] - return parameter for newly opened index
-     *
-     *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
-     */
-    inline rc_t OpenIndexUpdate ( KIndex **idx,
-        const char *name, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, name );
-        rc_t rc = VTableVOpenIndexUpdate ( this, idx, name, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t OpenIndexUpdate ( KIndex **idx,
-        const char *name, va_list args ) throw()
-    { return VTableVOpenIndexUpdate ( this, idx, name, args ); }
-
-
-    /* List
-     *  create table listings
-     */
-    inline rc_t ListCol ( struct KNamelist **names ) const throw()
-    { return VTableListCol ( this, names ); }
-
-
-    /* ColumnDatatypes
-     *  returns list of typedecls for named column
-     *
-     *  "col" [ IN ] - column name
-     *
-     *  "dflt_idx" [ OUT, NULL OKAY ] - returns the zero-based index
-     *  into "typedecls" of the default datatype for the named column
-     *
-     *  "typedecls" [ OUT ] - list of datatypes available for named column
-     */
-    inline rc_t ColumnDatatypes ( const char *col,
-        uint32_t *dflt_idx, struct KNamelist **typedecls ) const throw()
-    { return VTableColumnDatatypes ( this, col, dflt_idx, typedecls ); }
-
-
-    /* Reindex
-     *  optimize column indices
-     */
-    inline rc_t Reindex () throw()
-    { return VTableReindex ( this ); }
-
-
-    /* OpenManager
-     *  duplicate reference to manager
-     *  NB - returned reference must be released
-     */
-    inline rc_t OpenManager ( struct VDBManager const **mgr ) const throw()
-    { return VTableOpenManagerRead ( this, mgr ); }
-    inline rc_t OpenManager ( struct VDBManager **mgr ) throw()
-    { return VTableOpenManagerUpdate ( this, mgr ); }
-
-
-    /* OpenParent
-     *  duplicate reference to parent database
-     *  NB - returned reference must be released
-     */
-    inline rc_t OpenParent ( struct VDatabase const **db ) const throw()
-    { return VTableOpenParentRead ( this, db ); }
-    inline rc_t OpenParent ( struct VDatabase **db ) throw()
-    { return VTableOpenParentUpdate ( this, db ); }
-
-
-    /* OpenSchema
-     *  duplicate reference to table schema
-     *  NB - returned reference must be released
-     */
-    inline rc_t OpenSchema ( struct VSchema const **schema ) const throw()
-    { return  VTableOpenSchema ( this, schema ); }
-
-
-    /* GetUserData
-     * SetUserData
-     *  store/retrieve an opaque pointer to user data
-     *
-     *  "data" [ OUT ] - return parameter for getting data
-     *  "data" [ IN ] - parameter for setting data
-     *
-     *  "destroy" [ IN, NULL OKAY ] - optional destructor param
-     *  invoked from destructor of "self"
-     */
-    inline rc_t GetUserData ( void **data ) const throw()
-    { return VTableGetUserData ( this, data ); }
-    inline rc_t SetUserData ( void *data,
-        void ( CC * destroy ) ( void *data ) ) const throw()
-    { return VTableSetUserData ( this, data, destroy ); }
-
-
-    /* CreateCursor
-     *  creates a cursor object onto table
-     *  multiple read cursors are allowed
-     *  only a single write cursor is allowed
-     *
-     *  "curs" [ OUT ] - return parameter for newly created cursor
-     *
-     *  "mode" [ IN ] - describes update behavior
-     *    kcmUpdate   : allow inserts or updates
-     *    kcmReplace  : replace all existing rows with newly written rows
-     *    kcmInsert   : allow only inserts, i.e. new rows
-     */
-    inline rc_t CreateCursor ( const VCursor **curs ) const throw()
-    { return VTableCreateCursorRead ( this, curs ); }
-    inline rc_t CreateCursor ( VCursor **curs, KCreateMode mode ) throw()
-    { return VTableCreateCursorWrite ( this, curs, mode ); }
-
-private:
-    VTable ();
-    ~ VTable ();
-    VTable ( const VTable& );
-    VTable &operator = ( const VTable& );
-};
-
-#endif //  _hpp_vdb_table_
diff --git a/interfaces/vdb/types.h b/interfaces/vdb/types.h
deleted file mode 100644
index 9e79909..0000000
--- a/interfaces/vdb/types.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*=======================================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/* THIS FILE IS DEPRECATED. */
-#if _DEBUGGING && defined __GNUC__
-#warning "this file is deprecated"
-#endif
-
-#ifndef _h_vdb_types_
-#define _h_vdb_types_
-
-#ifndef _h_sra_types_
-#include <sra/types.h>
-#endif
-
-#endif /*  _h_vdb_types_ */
diff --git a/interfaces/vdb/types.hpp b/interfaces/vdb/types.hpp
deleted file mode 100644
index 1865964..0000000
--- a/interfaces/vdb/types.hpp
+++ /dev/null
@@ -1,230 +0,0 @@
-/*=======================================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb_types_
-#define _hpp_vdb_types_
-
-// types are defined here
-#ifndef _h_vdb_types_
-#include <vdb/types.h>
-#endif
-
-
-/*--------------------------------------------------------------------------
- * VDatatypes
- */
-struct VDatatypes
-{
-    /* AddRef
-     * Release
-     */
-    inline rc_t AddRef () const throw()
-    { return VDatatypesAddRef ( this ); }
-
-    inline rc_t Release () const throw()
-    { return VDatatypesRelease ( this ); }
-
-
-    /* RegisterOpaque
-     * RegisterSubtype
-     *  registers new datatypes
-     *
-     *  "newtype" [ IN ] - NUL terminated fully qualified type name
-     *
-     *  "supertype" [ IN ] and "dim" [ IN ] - NUL terminated fully
-     *  qualified parent equivalency type and vector dimension
-     *  -OR-
-     *  "bits" [ IN ] - size in bits of element.
-     *
-     *  "byte_swap" [ IN, CONDITIONALLY NULL OKAY ] - a byte swapping function
-     *  required when size > 8 and and integral multiple of 8.
-     */
-#if 0 /* is omitted in sra/types.h too */
-    inline rc_t RegisterOpaque ( const char *newtype,
-       uint16_t bits, void ( CC *byte_swap ) ( void *elem ) ) throw()
-    { return VDatatypesRegisterOpaque ( this, newtype, bits, byte_swap ); }
-
-    inline rc_t RegisterSubtype ( const char *newtype, const char *supertype,
-        uint16_t dim, void ( CC *byte_swap ) ( void *elem ) ) throw()
-    { return VDatatypesRegisterSubtype ( this, newtype, supertype, dim, byte_swap ); }
-#endif
-
-
-    /* DefineSubtype
-     *  creates a subtype definition
-     *
-     *    typedef = [ 'typedef' ] <supertype> <typedecl>
-     */
-#if 0 /* is omitted in sra/types.h too */
-     inline rc_t DefineSubtype ( const char *definition, ... ) throw()
-    {
-        va_list args;
-        va_start ( args, definition );
-        rc_t rc = VDatatypesVDefineSubtype ( this, definition, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t DefineSubtype ( const char *definition, va_list args ) throw()
-    { return VDatatypesVDefineSubtype ( this, definition, args ); }
-#endif
-
-
-    /* ResolveTypedecl
-     *  converts a typedecl string to type id and vector dimension
-     *
-     *  "resolved" [ OUT ] - resolved type declaration
-     *
-     *  "typedecl" [ IN ] - type declaration
-     */
-    inline rc_t ResolveTypedecl ( VTypedecl *resolved,
-        const char *typedecl, ... ) const throw()
-    {
-        va_list args;
-        va_start ( args, typedecl );
-        rc_t rc = VDatatypesVResolveTypedecl ( this, resolved, typedecl, args );
-        va_end ( args );
-        return rc;
-    }
-    inline rc_t ResolveTypedecl ( VTypedecl *resolved,
-        const char *typedecl, va_list args ) const throw()
-    { return VDatatypesVResolveTypedecl ( this, resolved, typedecl, args ); }
-
-
-    /* ResolveTypename
-     *  convert a type id into its type definition
-     *
-     *  "resolved" [ OUT ] - resolved type definition
-     *
-     *  "typname" [ IN ] - NUL-terminated type name
-     */
-    inline rc_t ResolveTypename ( VTypedef *resolved,
-        const char *typname ) const throw()
-    { return VDatatypesResolveTypename ( this, resolved, typname ); }
-
-
-    /* ResolveTypeid
-     *  convert a type id into its type definition
-     *
-     *  "resolved" [ OUT ] - resolved type definition
-     *
-     *  "type_id" [ IN ] - 1-based runtime type id
-     */
-    inline rc_t ResolveTypeid ( VTypedef *resolved,
-        uint32_t type_id ) const throw()
-    { return VDatatypesResolveTypeid ( this, resolved, type_id ); }
-
-
-    /* SizeofTypedecl
-     *  returns the bit size of type declaration
-     */
-    inline rc_t SizeofTypedecl ( bitsz_t *type_size,
-        const VTypedecl *td ) const throw()
-    { return VDatatypesSizeofTypedecl ( this, type_size, td ); }
-
-
-    /* SizeofTypeid
-     *  returns the bit size of typeid
-     *
-     *  "type_size" [ OUT ] - bit size of a type
-     *
-     *  "type_id" [ IN ] - numerical index of a type
-     *
-     *  "all_elements" [ IN ] - for multi-dimesional types
-     *  return the sum of sizes, otherwise - only for a single element
-     */
-    inline rc_t SizeofTypeid ( bitsz_t *type_size, uint32_t type_id,
-        bool all_elements ) const throw()
-    { return VDatatypesSizeofTypeid ( this, type_size, type_id, all_elements ); }
-
-
-    /* MakeTypedecl
-     *  convert a VTypedecl into canonical text
-     *
-     *  "buffer" [ OUT ] and "bsize" [ IN ] - output buffer for
-     *  NUL terminated type declaration string
-     *
-     *  "typedecl" [ IN ] - binary representation of typedecl
-     */
-    inline rc_t MakeTypedecl ( char *buffer, size_t bsize,
-        const VTypedecl *typedecl ) const throw()
-    { return VDatatypesMakeTypedecl ( this, buffer, bsize, typedecl ); }
-
-
-    /* ToSupertype
-     *  cast a typedecl to a size-equivalent supertype decl
-     *  returns not-found and leaves "typedecl" unchanged
-     *  if no supertype exists
-     *
-     *  "typedecl" [ IN, OUT ] - populated with a correct
-     *  type id and vector dimension on input, will be updated
-     *  to contain a supertype and equivalent dimension on
-     *  output. e.g.:
-     *
-     *    IN -  { type_id NCBI:qual4, dim 1 }
-     *    OUT - { type_id I8, dim 4 }
-     */
-    inline rc_t ToSupertype ( VTypedecl *typedecl ) const throw()
-    { return VDatatypesToSupertype ( this,  typedecl ); }
-
-
-    /* ToIntrinsic
-     *  cast a typedecl ( if necessary ) to a size-equivalent
-     *  intrinsic typedecl.
-     *
-     *  returns not-found and leaves "typedecl" unchanged
-     *  if no intrinsic supertype exists
-     *
-     *  leaves "typedecl" unchanged if it is already intrinsic.
-     *
-     *  "typedecl" [ IN, OUT ] - populated with a correct
-     *  type id and vector dimension on input, will be updated
-     *  to contain a supertype and equivalent dimension on
-     *  output. e.g.:
-     *
-     *    IN -  { type_id NCBI:qual4, dim 1 }
-     *    OUT - { type_id I8, dim 4 }
-     */
-    inline rc_t ToIntrinsic ( VTypedecl *typedecl ) const throw()
-    { return VDatatypesToIntrinsic ( this, typedecl ); }
-
-
-    /* ToAncestor
-     *  cast a typedecl to a size-equivalent ancestor decl
-     *  returns true if cast can be performed
-     */
-    inline bool ToAncestor ( const VTypedecl *to,
-        const VTypedecl *from ) const throw()
-    { return VDatatypesToAncestor ( this, to, from ); }
-
-
-private:
-    VDatatypes ();
-    ~ VDatatypes ();
-    VDatatypes ( const VDatatypes& );
-    VDatatypes &operator = ( const VDatatypes& );
-};
-
-#endif //  _hpp_vdb_types_
diff --git a/interfaces/vdb/vdb-priv.h b/interfaces/vdb/vdb-priv.h
deleted file mode 100644
index b130bb4..0000000
--- a/interfaces/vdb/vdb-priv.h
+++ /dev/null
@@ -1,342 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vdb_vdb_priv_
-#define _h_vdb_vdb_priv_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDatabase;
-struct KTable;
-struct KMetadata;
-struct KDBManager;
-struct KDirectory;
-struct VDBManager;
-struct VFSManager;
-struct VResolver;
-struct VSchema;
-struct VTypedef;
-struct VDatabase;
-struct VTable;
-struct VCursor;
-struct VCursorParams;
-struct VXformInfo;
-struct KDataBuffer;
-struct KNamelist;
-
-
-/*--------------------------------------------------------------------------
- * VDBManager
- */
-
-
-/* MakeRsrc
- *  common make, regardless of library
- */
-VDB_EXTERN rc_t CC VDBManagerMakeRsrc ( struct VDBManager **mgr, struct VFSManager * vfs );
-
-
-/* OpenKDBManager
- *  returns a new reference to KDBManager used by VDBManager
- */
-VDB_EXTERN rc_t CC VDBManagerOpenKDBManagerRead ( struct VDBManager const *self,
-    struct KDBManager const **kmgr );
-VDB_EXTERN rc_t CC VDBManagerOpenKDBManagerUpdate ( struct VDBManager *self,
-    struct KDBManager **kmgr );
-
-#define VDBManagerGetKDBManagerRead VDBManagerOpenKDBManagerRead
-#define VDBManagerGetKDBManagerUpdate VDBManagerOpenKDBManagerUpdate
-
-
-/* ListExternalSchemaModules
- */
-VDB_EXTERN rc_t CC VDBManagerListExternalSchemaModules ( struct VDBManager const *self,
-    struct KNamelist **list );
-
-/* DisablePagemapThread
- *  this can cause difficulties for some clients
- */
-VDB_EXTERN rc_t CC VDBManagerDisablePagemapThread ( struct VDBManager const *self );
-
-/* DisableFlushThread
- *  Disable the background cursor flush thread, may be useful when debugging
- */
-VDB_EXTERN rc_t CC VDBManagerDisableFlushThread ( struct VDBManager *self );
-
-
-/* Make with custom VFSManager */
-VDB_EXTERN rc_t CC VDBManagerMakeReadWithVFSManager (
-    struct VDBManager const **mgr,
-    struct KDirectory const *wd, struct VFSManager *vmgr );
-VDB_EXTERN rc_t CC VDBManagerMakeUpdateWithVFSManager (
-    struct VDBManager **mgr, struct KDirectory *wd, struct VFSManager *vmgr );
-
-
-/** Reset VResolver to set protected repository context */
-VDB_EXTERN rc_t CC VDBManagerSetResolver
-    ( struct VDBManager const * self, struct VResolver * resolver );
-
-/*--------------------------------------------------------------------------
- * VSchema
- */
-
-/* DescribeTypedef - PRIVATE
- *  a type is defined as either:
- */
-VDB_EXTERN rc_t CC VSchemaDescribeTypedef ( struct VSchema const *self,
-    struct VTypedef *def, uint32_t type_id );
-
-/* LastIntrinsicTypeId - PRIVATE
- *  used to allow cast to intrinsics
- */
-VDB_EXTERN uint32_t CC VSchemaLastIntrinsicTypeId ( struct VSchema const *self );
-
-/* ListLegacyTables - PRIVATE
- *  scan all tables defined in schema
- *  return the fully-qualified and versioned name of each legacy SRA table
- */
-VDB_EXTERN rc_t CC VSchemaListLegacyTables ( struct VSchema const *self, struct KNamelist **list );
-
-
-/*--------------------------------------------------------------------------
- * VDatabase
- */
-
-/* OpenKDatabase
- *  returns a new reference to underlying KDatabase
- */
-VDB_EXTERN rc_t CC VDatabaseOpenKDatabaseRead ( struct VDatabase const *self, struct KDatabase const **kdb );
-VDB_EXTERN rc_t CC VDatabaseOpenKDatabaseUpdate ( struct VDatabase *self, struct KDatabase **kdb );
-
-
-/* IsCSRA
- *  ask an open database if it conforms to cSRA schema
- */
-VDB_EXTERN bool CC VDatabaseIsCSRA ( struct VDatabase const *self );
-
-
-/*--------------------------------------------------------------------------
- * VTable
- */
-
-/* OpenKTable
- *  returns a new reference to underlying KTable
- */
-VDB_EXTERN rc_t CC VTableOpenKTableRead ( struct VTable const *self, struct KTable const **ktbl );
-VDB_EXTERN rc_t CC VTableOpenKTableUpdate ( struct VTable *self, struct KTable **ktbl );
-
-#define VTableGetKTableRead VTableOpenKTableRead
-#define VTableGetKTableUpdate VTableOpenKTableUpdate
-
-
-/* DropColumn
- */
-VDB_EXTERN rc_t CC VTableDropColumn ( struct VTable *self, const char *name, ... );
-VDB_EXTERN rc_t CC VTableVDropColumn ( struct VTable *self, const char *name, va_list args );
-
-/* RenameColumn
- */
-VDB_EXTERN rc_t CC VTableRenameColumn ( struct VTable *self, bool force,
-    const char *from, const char *to );
-
-/* ListPhysColumns
- * ListSeededWritableColumns
- *  avail: 2.4
- */
-VDB_EXTERN rc_t CC VTableListPhysColumns ( struct VTable const *self, struct KNamelist **names );
-VDB_EXTERN rc_t CC VTableListSeededWritableColumns ( struct VTable *self,
-    struct KNamelist **names, struct KNamelist const *seed );
-
-
-/* HasStaticColumn
- *  given a physical column name, report whether it exists
- *  and is ( currently ) static
- *  avail: 2.5
- */
-VDB_EXTERN bool CC VTableHasStaticColumn ( struct VTable const *self, const char *name );
-VDB_EXTERN bool CC VTableVHasStaticColumn ( struct VTable const *self, const char *name, va_list args );
-
-
-/* VUntypedTableTest
- *  support for tables created before embedded schema
- *
- *  "ktbl" [ IN ] - physical table to recognize
- *
- *  "meta" [ IN ] - open metadata for table
- *
- *  returns true if table is recognized
- */
-typedef bool ( CC * VUntypedTableTest )
-   ( struct KTable const *ktbl, struct KMetadata const *meta );
-
-
-/* StoreSchema
- *  stores current schema definition in metadata
- *
- *  useful if table was opened using a later version of schema than
- *  was used for its creation.
- */
-VDB_EXTERN rc_t VTableStoreSchema ( struct VTable *self );
-
-
-/*--------------------------------------------------------------------------
- * VCursor
- */
-
-
-/* CreateCursorView
- *  creates a read-only cursor onto table
- *  uses table schema as base
- *  uses view described in viewspec as view
- *
- *  AVAILABILITY: version 2.3
- *
- *  for pre-vdb-2.3 tables, defaults to CreateCursorRead, ignoring
- *  schema specification
- *
- *  "curs" [ OUT ] - return parameter for newly created cursor
- *
- *  "viewspec" [ IN ] - NUL terminated string describing the view schema
- */
-VDB_EXTERN rc_t CC VTableCreateCursorView ( struct VTable const *self,
-    struct VCursor const **curs, const char *viewspec );
-
-/* PermitPostOpenAdd
- *  allows columns to be added to open cursor
- *  for write cursor, the effect lasts until the first row commit
- */
-VDB_EXTERN rc_t CC VCursorPermitPostOpenAdd ( struct VCursor const *self );
-/*  SuspendTriggers
- *  blocks resolution of schema-based triggers
- *
- */
-VDB_EXTERN rc_t CC VCursorSuspendTriggers ( struct VCursor const *self );
-
-/*  VCursorGetSchema
- *  returns current schema of the open cursor
- */
-VDB_EXTERN struct VSchema const* CC VCursorGetSchema ( struct VCursor const *self);
-
-/* PageIdRange
- *  returns id range for page
- *
- *  "id" [ IN ] - page containing this row id is target
- *
- *  "first" [ OUT, NULL OKAY ] and "last" [ OUT, NULL OKAY ] -
- *  id range is returned in these output parameters, where
- *  at least ONE must be NOT-NULL
- */
-VDB_EXTERN rc_t CC VCursorPageIdRange ( struct VCursor const *self,
-    uint32_t idx, int64_t id, int64_t *first, int64_t *last );
-
-
-/* IsStaticColumn
- *  answers question: "does this column have the same value for every cell?"
- */
-VDB_EXTERN rc_t CC VCursorIsStaticColumn ( struct VCursor const *self,
-    uint32_t col_idx, bool *is_static );
-
-
-VDB_EXTERN rc_t CC VCursorLinkedCursorGet(const struct VCursor *cself,const char *tbl, struct VCursor const **curs);
-VDB_EXTERN rc_t CC VCursorLinkedCursorSet(const struct VCursor *cself,const char *tbl, struct VCursor const *curs);
-
-VDB_EXTERN uint64_t CC VCursorSetCacheCapacity(struct VCursor *self,uint64_t capacity);
-VDB_EXTERN uint64_t CC VCursorGetCacheCapacity(const struct VCursor *self);
-
-
-/*--------------------------------------------------------------------------
- * VCursorParams
- */
-
-/* Get
- *  return KDataBuffer value by reference
- */
-VDB_EXTERN rc_t CC VCursorParamsGet ( struct VCursorParams const *self,
-    const char *name, struct KDataBuffer **value );
-
-/* Set
- *  set a textual parameter value
- */
-VDB_EXTERN rc_t CC VCursorParamsSet( struct VCursorParams const *self,
-    const char *name, const char *fmt, ... );
-VDB_EXTERN rc_t CC VCursorParamsVSet ( struct VCursorParams const *self,
-    const char *name, const char *fmt, va_list args );
-
-/* Unset
- *  set the value of a named parameter to "undefined"
- */
-VDB_EXTERN rc_t CC VCursorParamsUnset ( struct VCursorParams const *self, const char *name );
-
-
-/*--------------------------------------------------------------------------
- * xform
- */
-
-/*
-  uses vftReserved code
-  returns little-endian data, no row-wise rle
-  fixed row-length is calculated as dst->elem_count / num_rows
- */
-#define vftLegacyBlob vftReserved
-
-typedef struct VLegacyBlobResult VLegacyBlobResult;
-struct VLegacyBlobResult
-{
-    struct KDataBuffer *dst;
-    uint8_t byte_order;
-};
-
-typedef rc_t ( CC * VNoHdrBlobFunc ) ( void *self,
-    struct VXformInfo const *info, VLegacyBlobResult *rslt,
-    struct KDataBuffer const *src );
-
-/* function to call to test table against schema */
-typedef bool ( CC * VUntypedFunc )
-    ( struct KTable const *tbl, struct KMetadata const *meta );
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_vdb_vdb_priv_ */
diff --git a/interfaces/vdb/vdb.h b/interfaces/vdb/vdb.h
deleted file mode 100644
index 910b214..0000000
--- a/interfaces/vdb/vdb.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vdb_vdb_
-#define _h_vdb_vdb_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*==========================================================================
- * VDB schema
- */
-
-/* bit align for packed data */
-enum
-{
-    ALIGN_LEFT  =  0,
-    ALIGN_RIGHT =  1
-};
-    
-/* case sensivity mode */
-enum
-{
-    CASE_SENSITIVE          = 0,
-    CASE_INSENSITIVE_LOWER  = 1,
-    CASE_INSENSITIVE_UPPER  = 2
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_vdb_vdb_ */
diff --git a/interfaces/vdb/vdb.vschema b/interfaces/vdb/vdb.vschema
deleted file mode 100644
index 15d8f67..0000000
--- a/interfaces/vdb/vdb.vschema
+++ /dev/null
@@ -1,859 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * VDB external functions, formats and types
- */
-version 1;
-
-// built-in functions should be known to all
-include 'vdb/built-in.vschema';
-
-
-/*--------------------------------------------------------------------------
- * types
- */
-
-/* text_token
- *  a vector describing tokens recognized within a text string
- *
- * COMPONENTS:
- *  0 - token id
- *  1 - token starting coordinate
- *  2 - token length
- */
-typedef U16 text:token [ 3 ];
-
-
-/*--------------------------------------------------------------------------
- * typesets
- */
-typeset pack_set { B8, B16, B32, B64, integer_set };
-typeset izip_set { integer_set };
-typeset fzip_set { F32 };
-
-
-/*--------------------------------------------------------------------------
- * formats
- */
-fmtdef izip_fmt;
-fmtdef fzip_fmt;
-fmtdef rle_fmt;
-fmtdef zlib_fmt;
-fmtdef bzip2_fmt;
-
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-/* echo
- *  returns single or repeated constant value
- *
- *  "T" [ TYPE ] - type of constant data to return
- *
- *  "val" [ CONST ] - a data constant
- *
- *  "row_len" [ DATA, OPTIONAL ] - if omitted, "val" will be
- *  issued once and the resultant row-length will be the length
- *  of "val". otherwise, "val" will be repeated and/or truncated
- *  as necessary to produce a row-length equal to that of input.
- *
- * USAGE:
- *  to echo a single constant value
- *    U16 len = row_len ( col ) | < U16 > echo < 0 > ();
- *
- *  to create a row of repeated values
- *    ascii allN = < ascii > echo < 'N' > ( col );
- */
-function < type T >
-T echo #1.0 < T val > ( * any row_len )
-    = vdb:echo;
-
-
-/* exists
- *  returns constant or dynamic value if predicate input exists
- *
- *  "T" [ TYPE ] - type of data to return
- *
- *  "cval" [ CONST, OPTIONAL ] - a data constant. when present,
- *  the function will behave like "echo" ( see below )
- *
- *  "predicate" [ DATA ] - an input whose existence determines
- *  whether the function will operate or not.
- *
- *  "dval" [ DATA, OPTIONAL ] - data value, either passed through
- *  or used to determine a repeat count of "cval" ( see below )
- *
- * USAGE:
- *  when "cval" is omitted, "dval" must be present and will be
- *  passed through depending upon the existence of "predicate"
- *    U8 count = < U8 > exists ( col, count2 );
- *
- *  when "cval" is present, "dval" may be omitted, and "cval" will
- *  be passed through just like echo depending upon "predicate"
- *   U8 count = < U8 > exists < 2 > ( col2 ) | < U8 > echo < 1 > ();
- *
- *  when "cval" and "dval" are both present, the behavior is
- *  like echo, but gated with "predicate"
- *    ascii poly = < ascii > exists < 'a' > ( col, repeat );
- */
-function < type T >
-T exists #1.0 < * T cval > ( any predicate, * T dval )
-    = vdb:exists;
-
-
-/* map
- *  translate input elements
- *  behaves much like the Unix "tr" command
- *  except that charsets are not [currently] supported
- *
- *  "A" [ TYPE ] - input data type, e.g. "ascii"
- *
- *  "B" [ TYPE ] - output data type, e.g. "ascii" or "U8"
- *
- *  "from" [ CONST ] - set of key values.
- *
- *  "to" [ CONST ] - set of mapped values,
- *  where length ( from ) === length ( to )
- *
- *  "in" [ DATA ] - input data to be matched against keys
- *  in "from". also serves as source data when "src" is omitted
- *
- *  "src" [ DATA, OPTIONAL ] - source data to be edited by
- *  substituting "to" values when corresponding "in" value
- *  matches key in "from". if omitted, "in" is used.
- *
- * USAGE:
- *  to upper case letters from a given alphabet
- *    ascii upper = < ascii, ascii > map < 'acgtn', 'ACGTN' > ( in );
- *
- *  to translate from ascii to binary
- *    U8 bin = < ascii, U8 > map < 'ACGTN', [ 0, 1, 2, 3, 0 ] > ( in );
- *
- *  to alter certain values of a column based upon values in another
- *    U8 n_encoded = < ascii, U8 > map < 'N', 0 > ( read, quality );
- *
- * CAVEATS:
- *  the full canonical mode of operation uses separate inputs
- *  for key matching and output source.
- *
- *  when a single input is specified:
- *   - sizeof ( A ) must equal sizeof ( B )
- *   - A must be a proper subset of B -OR-
- *   - "from" keys must match every possible "in" value ( total substitution )
- */
-function < type A, type B >
-B map #1.0 < A from, B to > ( A in, * B src )
-    = vdb:map;
-
-
-/* clip
- *  limit data values to given bounds
- *
- *  "T" [ TYPE ] - input and output data type
- *
- *  "dim" [ CONST >= 1 ] - fixed dimension on
- *  input and output vectors
- *
- *  "lower" [ CONST ] - lower bound, inclusive
- *
- *  "upper" [ CONST ] - upper bounds, inclusive
- *
- *  "in" [ DATA ] - data to be clipped
- */
-function < type T >
-T clip #1.0 < T lower, T upper > ( T in )
-    = vdb:clip;
-
-function < type T, U32 dim >
-T [ dim ] vclip #1.0 < T lower, T upper > ( T [ dim ] in )
-    = vdb:clip;
-
-
-/* ceil
- *  round up to the nearest integer
- *
- *  "in" [ DATA ] - data to be processed
- */
-function
-numeric_set ceil #1.0 ( float_set in )
-    = vdb:ceil;
-
-/* floor
- *  round down to the nearest integer
- *
- *  "in" [ DATA ] - data to be processed
- */
-function
-numeric_set floor #1.0 ( float_set in )
-    = vdb:floor;
-
-/* round
- *  round to nearest integer away from zero
- *
- *  "T" [ TYPE = { F32, F64 } ] - input and output data type
- *
- *  "in" [ DATA ] - data to be processed
- */
-function
-numeric_set round #1.0 ( float_set in )
-    = vdb:round;
-
-/* trunc
- *  round to the nearest integer not larger in absolute value
- *
- *  "T" [ TYPE = { F32, F64 } ] - input and output data type
- *
- *  "in" [ DATA ] - data to be processed
- */
-function
-numeric_set trunc #1.0 ( float_set in )
-    = vdb:trunc;
-
-
-/* min
- *  return the minimum value of each element
- * max
- *  return the maximum value of each element
- *
- *  "T" [ TYPE ] - input and output data type
- *
- *  "a" [ DATA ] - first operand
- *
- *  "b" [ DATA ] - second operand
- *
- * SYNOPSIS:
- *  compares two inputs element by element
- *  returns min or max element of each
- *
- * USAGE:
- *  intersections
- *    U32 left = < U32 > max ( left_a, left_b );
- *    U32 right = < U32 > min ( right_a, right_b );
- */
-function < type T >
-T min #1.0 ( T a, T b )
-    = vdb:min;
-
-function < type T >
-T max #1.0 ( T a, T b )
-    = vdb:max;
-
-
-/* sum
- *  return the sum of inputs
- * diff
- *  return the difference of inputs
- *
- *  "T" [ TYPE ] - input and output data type
- *  must be member of numeric_set
- *
- *  "k" [ CONST, DEFAULT 0 ] - optional constant
- *  to be added or subtracted
- *
- *  "a" [ DATA ] - left-most operand
- *
- *  "b" [ DATA ] - optional subtractand
- *
- * SYNOPSIS:
- *  incorporates "k" into expression for every row
- *  returns sum or difference of inputs for all rows
- *
- * USAGE:
- *  length of half-closed interval
- *    U32 len = < U32 > diff ( stop, start );
- *  convert one-based coordinate to zero based
- *    U32 zero_based = < U32 > diff < 1 > ( one_based );
- */
-function < type T >
-T sum #1.0 < * T k > ( T a, ... )
-    = vdb:sum;
-
-function < type T >
-T diff #1.0 < * T k > ( T a * T b )
-    = vdb:diff;
-
-/* deriv
- *  return the 1st derivative of an input row
- * integral
- *  return the "integral" of an input row
- *   integral   -> starts with 1st value
- *   integral_0 -> starts with 0
- *
- *  "T" [ TYPE ] - input and output data type
- *  must be signed integer of any size
- *
- *  "in" [ DATA ] - input to be modified
- *
- * SYNOPSIS:
- *  derivative function is ( in [ i ] - in [ i - 1 ] )
- *    for i = 0 .. length ( in ) - 1,
- *    assuming in [ 0 - 1 ] = 0 ( i.e. leaves in [ 0 ] intact ).
- *
- *  integral function is sum ( in [ 0 ] .. in [ i ] )
- *    for i = 0 .. length ( in ) - 1.
- *
- *  integral_0 function is sum ( in [ 0 ] .. in [ i - 1 ] )
- *    for i = 1 .. length ( in ) - 1,
- *    setting output [ 0 ] = 0.
- *
- * USAGE:
- *  "deriv" and "integral" are reciprocal functions.
- *  the oddity is that "deriv" creates an output series
- *  with the same length as the input series, causing the
- *  first element of input to be copied to first element
- *  of output.
- *
- *  "integral_0" always creates an output with the first
- *  element being 0. the oddity here is again that the output
- *  series is the same length as the input, dropping the effect
- *  from the last element of input. its utility is primarily in
- *  operations such as creating absolute offsets from a series of
- *  lengths.
- *
- * EXAMPLES:
- *  given an input series ( 15, 17, 12, 315 ):
- *  "deriv" produces ( 15, 2, -5, 303 ) [ NOTICE first element ]
- *  integrating ( 15, 2, -5, 303 ):
- *  "integral" produces ( 15, 17, 12, 315 ), while
- *  "integral_0" produces ( 0, 15, 17, 12 ).
- *
- *  generating starting offsets from a series of lengths ( 15, 17, 12, 315 ):
- *  "integral_0" produces ( 0, 15, 32, 44 ) which can be used
- *  to accompany the input series for starts and lengths.
- */
-
-function < type T >
-T deriv #1.0 ( T in )
-    = vdb:deriv;
-function < type T >
-T integral #1.0 ( T in )
-    = vdb:integral;
-function < type T >
-T integral_0 #1.0.1 ( T in )
-    = vdb:integral_0;
-
-/* delta
- *  return the 1st derivative of a whole blob
- * undelta
- *  return the integral of a whole blob
- *
- *  "T" [ TYPE ] - input and output data type
- *  must be signed integer of any size
- *
- *  "in" [ DATA ] - input to be modified
- *
- * SYNOPSIS:
- *  similar to deriv/integral but operates on full blob
- */
-
-function < type T > T delta #1.0  ( T in ) = vdb:delta;
-function < type T > T undelta #1.0  ( T in ) = vdb:undelta;
-
-
-/* outlier_encode
- *  removes a given outlier from a data series
- * outlier_decode
- *  removes the effect of outlier_encode
- *
- *  "T" [ TYPE ] - input and output data type
- *  must be an integer of any size
- *
- *  "in" [ DATA ] - input to be modified
- *
- * SYNOPSIS:
- *  The encode replaces every element that is equal to the
- *  outlier with (the value of the previous element) * 2 + 1
- *  and the remaining elements are replaced with their value * 2.
- */
-
-function < type T > T outlier_encode #1.0 < T outlier > ( T in ) = vdb:outlier_encode;
-function < type T > T outlier_decode #1.0 < T outlier > ( T in ) = vdb:outlier_decode;
-
-/* add_row_id
- *  return the sum of an input and its row-id
- * sub_row_id
- *  return the difference of an input and its row-id
- *
- *  "T" [ TYPE ] - input and output data type
- *  must be member of numeric_set
- *
- *  "in" [ DATA ] - input to be modified
- *
- * SYNOPSIS:
- *  adjusts for relationship between input and row-id
- *  used primarily to reduce serial ids to constants
- */
-function < type T >
-T add_row_id #1.0 ( T in )
-    = vdb:add_row_id;
-
-function < type T >
-T sub_row_id #1.0 ( T in )
-    = vdb:sub_row_id;
-
-
-/* cut
- *  extract one or more elements from input vector
- *  to form an output vector of equal or less dimension
- *
- *  "T" [ TYPE ] - base element type to be processed
- *
- *  "idx" [ CONST ] - mandatory initial element index
- *  count of parameters must equal dimension of output type
- *
- *  "in" [ DATA ] - source of input vectors where the vector
- *  element type is known, but any dimension is accepted.
- *
- * USAGE:
- *  extracting a single channel from a 4 channel vector
- *    F32 [ 4 ] vect ...
- *    F32 chan = < F32 > cut < 0 > ( vect );
- *
- *  extracting multiple channels
- *    U8 [ 16 ] in ...
- *    U8 [ 3 ] out = < U8 > cut < 5, 1, 3 > ( in );
- *
- *  reversing channels
- *    I16 [ 2 ] norm ...
- *    I16 [ 2 ] rev = < I16 > cut < 1, 0 > ( norm );
- */
-function < type T >
-T [ * ] cut #1.0 < U32 idx, ... > ( T [ * ] in )
-    = vdb:cut;
-
-
-/* paste
- *  combine all elements of all inputs into a single vector
- *  output dimension is sum of all input dimensions after type normalization
- *
- *  "T" [ TYPE ] - base element type to be processed
- *
- *  "in" [ DATA ] - first of an arbitrary number of columns
- *  the total of input elements produces an output of "T [ total ]"
- */
-function < type T >
-T [ * ] paste #1.0 ( T [ * ] in, ... )
-    = vdb:paste;
-
-
-/* vec_sum
- *  compute the sum of all the elements of the row
- *
- *  "T" [ TYPE ] - base element type to be processed
- *
- *  "in" [ DATA ] - the input
- */
-function < type T >
-T vec_sum #1.0 ( T [ * ] in )
-    = vdb:vec_sum;
-
-/* vec_sum
- *  compute the sum of all the elements of the input vector
- *
- *  "T" [ TYPE ] - base element type to be processed
- *
- *  "in" [ DATA ] - the input
- */
-function < type T >
-T fixed_vec_sum #1.0 ( T [ * ] in )
-    = vdb:fixed_vec_sum;
-
-
-/* checksum
- *  compute a checksum ( hash ) of all of the input bytes
- *  to be used in a trigger production
- *
- *  "node" [ CONST ] - path to metadata node where checksum
- *   will be stored.
- *
- *  "algorithm" [ CONST ] - type of checksum to perform:
- *    'crc-32'  # match against POSIX cksum
- *    'md5'     #  "   "  md5sum
- *    'sha-1'   #  "   "  sha1sum
- *    'sha-256' #  "   "  sha256sum
- *    'sha-384' #  "   "  sha384sum
- *    'sha-512' #  "   "  sha512sum
- *
- *  "in" [ DATA ] - the octet-stream to be checksummed
- */
-function
-bool checksum #1.0 < ascii node, ascii algorithm > ( B8 in )
-    = vdb:checksum;
-
-/* md5sum
- *  compute an md5 checksum of all of the input bytes
- */
-function
-bool md5sum #1.0 < ascii node > ( B8 in )
-{
-    return checksum < node, 'md5' > ( in );
-}
-
-
-/* pack
- *  packs words into bit-aligned units
- *  words are expected in architecture native byte-order
- *  and returned in "big-bit-endian" order
- *
- *  the packed size is determined by the dimension of the
- *  left-hand assignment value.
- *
- *  "in" [ DATA ] - B8, B16, B32 or B64 data
- */
-function
-B1 [ * ] pack #1.0 ( pack_set in )
-    = vdb:pack;
-
-
-/* unpack
- *  unpacks bit-aligned units into words
- *  input is expected in "big-bit-endian" order
- *  and returned in architecture native byte-order
- *
- *  the unpacked type is determined from the left-hand
- *  assignment value.
- *
- *  "in" [ DATA ] - B[1]..B[64]
- */
-function
-pack_set unpack #1.0 ( B1 [ * ] in )
-    = vdb:unpack;
-
-
-/* izip
- * iunzip
- *  integer compression
- */
-function
-izip_fmt izip #2.1 ( izip_set in )
-    = vdb:izip;
-
-function
-izip_set iunzip #2.1 ( izip_fmt in )
-    = vdb:iunzip;
-
-physical < type T >
-T izip_encoding #1.0
-{
-    decode { return ( T ) iunzip ( @ ); }
-    encode { return izip ( @ ); }
-};
-
-
-/* fzip
- * funzip
- *  floating point compression
- *
- *  "mantissa" [ CONST ] - the number of mantissa bits
- *  to preserve
- */
-function
-fzip_fmt fzip #1.0 < U32 mantissa > ( fzip_set in )
-    = vdb:fzip;
-
-function
-fzip_set funzip #1.0 ( fzip_fmt in )
-    = vdb:funzip;
-
-physical < type T >
-T fzip_encoding #1.0 < U32 mantissa >
-{
-    decode { return funzip ( @ ); }
-    encode { return fzip < mantissa > ( @ ); }
-};
-
-
-/* rlencode
- * rldecode
- *  run-length encoding
- */
-function
-rle_fmt rlencode #1.0 ( any in )
-    = vdb:rlencode;
-
-function
-any rldecode #1.0 ( rle_fmt in )
-    = vdb:rldecode;
-
-
-/* zip
- * unzip
- *  run things through zlib
- *
- *  "strategy" [ CONST, OPTIONAL ] - set the compression strategy
- *
- *  "level" [ CONST, OPTIONAL ] - set the amount of compression
- *  from 0..9 ( none to best compression ), or use -1 for zlib
- *  default behavior.
- */
-
-// zlib strategy
-const I32 Z_FILTERED            =  1;
-const I32 Z_HUFFMAN_ONLY        =  2;
-const I32 Z_RLE                 =  3;
-const I32 Z_DEFAULT_STRATEGY    =  0;
-
-// zlib level
-const I32 Z_NO_COMPRESSION      =  0;
-const I32 Z_BEST_SPEED          =  1;
-const I32 Z_BEST_COMPRESSION    =  9;
-const I32 Z_DEFAULT_COMPRESSION = -1;
-
-function
-zlib_fmt zip #1.0 < * I32 strategy, I32 level > ( any in )
-    = vdb:zip;
-
-function
-any unzip #1.0 ( zlib_fmt in )
-    = vdb:unzip;
-
-physical < type T >
-T zip_encoding #1.0 < * I32 strategy, I32 level >
-{
-    decode { return unzip ( @ ); }
-    encode { return zip < strategy, level > ( @ ); }
-};
-
-physical
-bool bool_encoding #1.0
-{
-    decode
-    {
-        B1 bit = unzip ( @ );
-        return ( bool ) unpack ( bit );
-    }
-
-    encode
-    {
-        U8 lim = < U8 > clip < 0, 1 > ( @ );
-        B1 bit = pack ( lim );
-        return zip < Z_RLE, Z_BEST_SPEED > ( bit );
-    }
-}
-
-physical < type T >
-T delta_izip_encoding #1.0
-{
-    decode
-    {
-        T dlt = iunzip ( @ );
-        return < T > undelta ( dlt );
-    }
-
-    encode
-    {
-        T dlt = <T> delta ( @ );
-        return izip ( dlt );
-    }
-}
-physical < type T >
-T delta_zip_encoding #1.0
-{
-    decode
-    {
-        T dlt = unzip ( @ );
-        return < T > undelta ( dlt );
-    }
-
-    encode
-    {
-        T dlt = <T> delta ( @ );
-        return zip < Z_RLE, Z_BEST_SPEED > ( dlt );
-    }
-}
-physical < type T >
-T delta_average_zip_encoding #1.0
-{
-    decode
-    {
-        delta_averaged_fmt t = unzip ( @ );
-        return undelta_average ( t );
-    }
-
-    encode
-    {
-        delta_averaged_fmt t = delta_average ( @ );
-        return zip < Z_RLE, Z_BEST_SPEED > ( t );
-    }
-}
-
-/* bzip
- * bunzip
- *  run things through bzip2
- *
- *  "blockSize100k" [ CONST, OPTIONAL ] - set the compression workspace size
- *  from 1..9 inclusive, produces a workspace of blockSize100K * 100000 bytes
- *  default is 5
- *
- *  "workFactor" [ CONST, OPTIONAL ] - set compression level
- *  from 0..250 inclusive, where 0 means bzip2 default, currently 30
- */
-
-function
-bzip2_fmt bzip #1.0 < * U32 blockSize100k, U32 workFactor > ( any in )
-    = vdb:bzip;
-
-function
-any bunzip #1.0 ( bzip2_fmt in )
-    = vdb:bunzip;
-
-physical < type T >
-T bzip_encoding #1.0 < * U32 blockSize100k, U32 workFactor >
-{
-    decode { return bunzip ( @ ); }
-    encode { return bzip < blockSize100k, workFactor > ( @ ); }
-};
-
-
-/* simple_sub_select
- *  project a column from another table within database
- *
- *  "T" [ TYPE ] - data type of column
- *   must be compatible with source column
- *
- *  "tbl" [ CONST ] - name of table within parent
- *
- *  "col" [ CONST ] - column spec, i.e. simple name or
- *   typed name spec
- *
- *  "row" [ DATA ] - row to select
- *
- *  "idx" [ DATA ] - one-based indexing of what element to pick, defaults to all if not given
- */
-function < type T >
-T simple_sub_select #1.0 < ascii tbl, ascii col > ( I64 row *  I32 idx )
-    = vdb:simple_sub_select_1;
-
-
-/* extract_token
- *  extract a textual token from an input string
- *
- *  "idx" [ CONST ] - a zero-based index of the token
- *  if value < row_len ( tok ), then the substring of
- *  indexed token is returned. otherwise, returns empty.
- *
- *  "str" [ DATA ] - input text. type must be compatible with
- *  output production, meaning types must be same, or ascii input
- *  with utf8 output.
- *
- *  "tok" [ DATA ] - results of tokenizing "str"
- */
-function
-text_set extract_token #1.0 < U32 idx > ( text_set str, text:token tok )
-    = vdb:extract_token;
-
-
-/* strtonum
- *  convert string to number
- *
- *  "radix" [ CONST, DEFAULT 10 ]
- *   if not specified, or if given as 0, the default will be 10
- *   unless the string begins with "0x" or "0X", in which case radix will be 16
- *   octal is NOT inferred ( i.e. leading "0" does not imply octal )
- *
- *  "str" [ DATA ] - text to be converted
- */
-function
-numeric_set strtonum #1.0 < * U32 radix > ( text_set str )
-    = vdb:strtonum;
-
-
-/* sprintf
- *  formatted print to a string
- *
- *  formatting rules differ somewhat from C sprintf:
- *
- *        '%' [ <flags> ] [ <field-width> ] [ '.' <precision> ] [ ':' <index> ] <storage-class>
- *
- *  where:
- *
- *    flags
- *        = ' '           : prepend space to a numeral if it does not have a sign
- *        | '+'           : always produce a sign on numeric conversion
- *        | '-'           : left-align parameter within field
- *        | '0'           : left-pad with zeroes rather than spaces
- *        | '#'           : use "alternate" representation
- *        | ','           : produce comma-separated triples
- *        ;
- *
- *    field-width
- *        = DECIMAL       : a base-10 numeral
- *        | '*'           : take field width from args
- *        ;
- *
- *    precision
- *        = DECIMAL       : a base-10 numeral
- *        | '*'           : take precision from args
- *        |               : an empty precision means 0
- *        ;
- *
- *    index
- *        = idx           : a single, zero-based vector element
- *        | idx '-' idx   : a fully-closed, zero-based interval
- *        | idx '/' len   : a start index plus length
- *        ;
- *
- *    idx
- *        = DECIMAL       : an unsigned base-10 numeral
- *        | '*'           : take index from args
- *        | '$'           : last element in cell
- *        |               : an empty index means 0 or $
- *        ;
- *
- *    len
- *        = DECIMAL       : a base-10 numeral
- *        | '*'           : take length from args
- *        | '$'           : row-length of ( cell )
- *        |               : an empty length means $
- *        ;
- *
- *
- *    storage-class
- *        = 'd' | 'i'     : general decimal integer
- *        | 'u'           : decimal unsigned integer
- *        | 'x'           : lower-case hex
- *        | 'X'           : upper-case hex
- *        | 'o'           : octal
- *        | 'b'           : binary
- *        | 'f'           : floating point
- *        | 'e'           : scientific notation
- *        | 'g'           : general floating point
- *        | 'c' | 's'     : character
- *        ;
- *
- *
- *  "fmt" [ CONST ] - constant format string, adhering to
- *  the description above
- *
- *  "p1" [ DATA ] - first param
- *  this and any subsequent params must correspond to format
- *  in type/position/number.
- */
-function
-text_set sprintf #1.0 < ascii fmt > ( any p1, ... )
-    = vdb:sprintf;
diff --git a/interfaces/vdb/xform.h b/interfaces/vdb/xform.h
deleted file mode 100644
index 402f351..0000000
--- a/interfaces/vdb/xform.h
+++ /dev/null
@@ -1,826 +0,0 @@
-/*=======================================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vdb_xform_
-#define _h_vdb_xform_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_vdb_schema_
-#include <vdb/schema.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDataBuffer;
-struct VCursorParams;
-
-/*--------------------------------------------------------------------------
- * VFormatdecl
- */
-typedef struct VFormatdecl VFormatdecl;
-struct VFormatdecl
-{
-    VTypedecl td;
-    uint32_t fmt;
-};
-
-
-/* Resolve
- *  converts a fmtdecl string to fmt id, type id and vector dimension
- *
- *  "resolved" [ OUT ] - resolved fmtdecl
- *
- *  "fmtdecl" [ IN ] - type declaration
- */
-VDB_EXTERN rc_t CC VSchemaResolveFmtdecl ( struct VSchema const *self,
-    VFormatdecl *resolved, const char *fmtdecl, ... );
-VDB_EXTERN rc_t CC VSchemaVResolveFmtdecl ( struct VSchema const *self,
-    VFormatdecl *resolved, const char *fmtdecl, va_list args );
-
-
-/* ToText
- *  convert a VFormatdecl into canonical text
- *
- *  "schema" [ IN ] - schema object that would know about this type
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - output buffer for
- *  NUL terminated type declaration string
- */
-VDB_EXTERN rc_t CC VFormatdeclToText ( const VFormatdecl *self,
-    struct VSchema const *schema, char *buffer, size_t bsize );
-
-
-/* ToFormatdecl
- *  attempt to cast a fmtdecl to a size-equivalent ancestor decl
- *
- *  "schema" [ IN ] - schema object that would know about this type
- *
- *  "ancestor" [ IN ] - target fmtdecl or typespec for cast
- *
- *  "cast" [ OUT, NULL OKAY ] - return parameter for ancestor decl
- *  valid only if function returns true. if "ancestor" contained a typeset,
- *  the value of "cast" will be the closest matching ancestral type.
- *
- *  "distances" [ OUT, NULL OKAY ] - optional linear measure of independent
- *  casting generations for format ( 0 ) and type ( 1 ). valid only if function
- *  returns true. a value of 0 means that "self" is a direct match with "ancestor",
- *  a value of 1 means that "self" is an immediate subtype of "ancestor", etc.
- *
- *  returns true if cast succeeded
- */
-VDB_EXTERN bool CC VFormatdeclToFormatdecl ( const VFormatdecl *self,
-    const VSchema *schema, const VFormatdecl *ancestor,
-    VFormatdecl *cast, uint32_t distances [ 2 ] );
-
-
-/*--------------------------------------------------------------------------
- * VBlobHeader
- *  opaque blob header
- *  used by external functions to read and populate blob headers
- */
-typedef struct VBlobHeader VBlobHeader;
-
-
-/* Release
- *  used to release forked headers
- */
-VDB_EXTERN rc_t CC VBlobHeaderRelease ( const VBlobHeader *self );
-
-
-/* Version
- *  returns previously written blob format version
- */
-VDB_EXTERN uint8_t CC VBlobHeaderVersion ( const VBlobHeader *self );
-VDB_EXTERN void CC VBlobHeaderSetVersion ( VBlobHeader *self, uint8_t version );
-
-
-/* OpPushTail
- * OpPopHead
- * OpPopTail
- *  op-code stack interface
- *
- *  functions that apply encoding to a blob may use this stack to
- *  record one or more "op-codes" that may be useful to decoders
- *  when used in combination with the argument (operand) stack.
- *
- *  the op-code values and significance is entirely defined by the
- *  external functions, and their use is optional (a trivial example
- *  is described below in the argument stack comment).
- *
- *  during update operations, the stack may be pushed as well as popped.
- *  during read-only operations, only pop is permitted.
- */
-VDB_EXTERN rc_t CC VBlobHeaderOpPushTail ( VBlobHeader *self, uint8_t op );
-VDB_EXTERN rc_t CC VBlobHeaderOpPopHead ( const VBlobHeader *self, uint8_t *op );
-VDB_EXTERN rc_t CC VBlobHeaderOpPopTail ( const VBlobHeader *self, uint8_t *op );
-
-
-/* ArgPushTail
- * ArgPopHead
- * ArgPopTail
- *  argument (operand) stack interface
- *
- *  provides arguments to accompany encoding and decoding operations,
- *  where the operation may be implicit or indicated via a related
- *  op-code.
- *
- *  here is a trivial example for a hypothetical function that performs
- *  bit-packing on a series of signed integers. it has two possible
- *  operations: translation and pack. it translates the values by subtracting
- *  the MIN(x) value, converting the sequence into unsigned values starting
- *  at 0. pack will left-truncate bits if the translated MAX(x) can be represented
- *  with fewer bits than in use:
- *
- *    1. calculate min/max
- *    2. if MIN(x) != 0
- *       2a. ArgPushTail ( MIN ( x ) )
- *       2b. OpPushTail ( TRANSLATE-OPCODE ) # e.g. 1
- *       2c. translate sequence by - min
- *       2d. translate MAX ( x )
- *    3. calculate bits required for MAX(x)
- *    4. if bits-required < bits-used
- *       4a. ArgPushTail ( bits-required )
- *       4b. OpPushTail ( PACK-OPCODE )      # e.g. 2
- *       4c. pack sequence
- *
- *  on decode, the process would be reversed:
- *
- *    1. OpPopTail ( & op-code )
- *    2. if op-code == PACK-OPCODE
- *       2a. ArgPopTail ( & packed-bits )
- *       2b. unpack sequence from packed-bits to current size
- *       2c. OpPopTail ( & op-code )
- *    3. if op-code == TRANSLATE-OPCODE
- *       3a. ArgPopTail ( & offset )
- *       3b. translate sequence by + offset
- *
- *  during update operations, the stack may be pushed as well as popped.
- *  during read-only operations, only pop is permitted.
- */
-VDB_EXTERN rc_t CC VBlobHeaderArgPushTail ( VBlobHeader *self, int64_t arg );
-VDB_EXTERN rc_t CC VBlobHeaderArgPopHead ( const VBlobHeader *self, int64_t *arg );
-VDB_EXTERN rc_t CC VBlobHeaderArgPopTail ( const VBlobHeader *self, int64_t *arg );
-
-
-/* CreateFork
- *  create a parallel, writable blob header
- *
- *  blob headers are designed to record operations and arguments
- *  that are serially applied to data. some functions may need to
- *  run operations in parallel ( e.g. compresion ) where each fork
- *  is allowed to compete for best performance.
- *
- *  this function creates an alternate, parallel header object that
- *  may be used to replace the actual headers associated with the blob.
- *
- * NB - returned object must ALWAYS be released before exiting function
- */
-VDB_EXTERN rc_t CC VBlobHeaderCreateFork ( const VBlobHeader *self, VBlobHeader **rslt );
-
-
-/*==========================================================================
- * transformation functions
- *
- *  transformation functions are declared in schema and provided in
- *  dynamically loadable shared libraries. the types described in the
- *  following section will be used during data processing.
- */
-
-
-/* VFormatdesc
- *  combines VFormatdecl and VTypedesc
- */
-typedef struct VFormatdesc VFormatdesc;
-struct VFormatdesc
-{
-    VFormatdecl fd;
-    VTypedesc desc;
-};
-
-
-/* XformInfo
- *  constant input parameter block
- *
- *  "mgr" [ IN ] - db mgr object
- *
- *  "schema" [ IN ] - cursor schema
- *
- *  "tbl" [ IN ] - owning table. can be used
- *   to access enclosing database
- */
-#define VTABLE_PASSED_TO_XFORM 1
-#define VPRODUCTION_PASSED_TO_XFORM 1
-
-struct VProduction;
-typedef struct VXformInfo VXformInfo;
-struct VXformInfo
-{
-#if VMGR_PASSED_TO_XFORM
-    struct VDBManager const *mgr;
-#endif
-#if VSCHEMA_PASSED_TO_XFORM
-    struct VSchema const *schema;
-#endif
-#if VTABLE_PASSED_TO_XFORM
-    struct VTable const *tbl;
-#endif
-#if VPRODUCTION_PASSED_TO_XFORM
-    struct VProduction const *prod;
-#endif
-    VFormatdesc fdesc;
-};
-
-
-/* VRowData
- *  row function input block
- *
- *  "base" [ IN ] and "first_elem" [ IN ] - first element in row
- *  i.e. for any row of type "T", "( ( const T* ) base ) [ first_elem ]"
- *  is the first element.
- *
- *  "elem_count" [ IN ] - the number of elements in this row
- *
- *  "element_bits" [ IN ] - the number of bits in each element
- *
- *  "variant" [ IN ] - describes variant of union "u"
- */
-typedef uint8_t VRowDataVariant;
-enum { vrdData, vrdControl };
-
-typedef struct VRowData VRowData;
-struct VRowData
-{
-    union
-    {
-        struct
-        {
-            /* the number of elements in this row */
-            uint64_t elem_count;
-
-            /* element size in bits */
-            uint64_t elem_bits;
-
-            /* page data base address plus
-               offset to first element of row */
-            uint64_t first_elem;
-            const void *base;
-			uint64_t base_elem_count; /*** the number of elements memory is valid from base; needed for prefetch***/
-        } data;
-
-    } u;
-    int64_t blob_stop_id;
-
-    /* describes variant of "u" */
-    VRowDataVariant variant;
-};
-
-
-/* VRowResult
- *  row function output block
- *
- *  for functions that operate on a single row of input
- *  but generate an output of independent length.
- *
- *  "data" [ IN/OUT ] - externally allocated data buffer
- *  may be resized or replaced, and must be checked for
- *  adequate capacity before writing.
- *
- *  "elem_count" [ OUT, DEFAULT ZERO ] - return parameter for
- *  the number of elements in result
- *
- *  "elem_bits" [ IN ] - element size in bits
- *
- *  "no_cache" [ OUT, DEFAULT ZERO ] - to indicate whether this result is
- *  cache-able
- */
-typedef struct VRowResult VRowResult;
-struct VRowResult
-{
-    /* return slot for number of elements written */
-    uint64_t elem_count;
-
-    /* size of elements in bits */
-    uint64_t elem_bits;
-
-    /* externally allocated data buffer
-       NB - must be checked for storage capacity before writing */
-    struct KDataBuffer *data;
-    
-    uint8_t no_cache;
-};
-
-
-/* VFixedRowResult
- *  fixed row function output block
- *
- *  for functions that operate on a single row of input
- *  and generate an output row of the same length.
- *
- *  NB. These functions are considered to be deterministic.
- *
- *  "base" [ IN ] and "first_element" [ IN ] - first element in row
- *  i.e. for any row of type "T", "( ( const T* ) base ) [ row_start ]"
- *  is the first element.
- *
- *  "elem_count" [ IN ] - fixed length of output row
- *
- *  "elem_bits" [ IN ] - element size in bits
- */
-typedef struct VFixedRowResult VFixedRowResult;
-struct VFixedRowResult
-{
-    /* fixed row length */
-    uint64_t elem_count;
-
-    /* size of elements in bits */
-    uint64_t elem_bits;
-
-    /* externally allocated buffer of fixed length */
-    uint64_t first_elem;
-    void *base;
-};
-
-
-/* VByteOrder
- *  single byte indicator of byte order
- *
- *  "vboNone" - data are byte order independent
- *
- *  "vboNative" - data are in native byte order
- *
- *  "vboLittleEndian" - specific byte orders
- *  "vboBigEndian"
- */
-typedef uint8_t VByteOrder;
-enum
-{
-    vboNone,
-    vboNative,
-    vboLittleEndian,
-    vboBigEndian
-};
-
-
-/* VBlobData
- *  blob function input block
- *
- *  describes entire blob of input without row boundaries
- *  the size of the blob in bits will be "elem_count" * "elem_bits"
- *
- *  "data" [ IN ] - pointer to first byte in blob
- *
- *  "elem_count" [ IN ] - the number of elements in blob
- *
- *  "elem_bits" [ IN ] - element size in bits
- *
- *  "byte_order" [ IN ] - byte order of input data
- */
-typedef struct VBlobData VBlobData;
-struct VBlobData
-{
-    /* element size in bits */
-    uint64_t elem_bits;
-
-    /* blob data buffer */
-    uint64_t elem_count;
-    const void *data;
-
-    /* byte order of data */
-    VByteOrder byte_order;
-};
-
-
-/* VBlobResult
- *  blob function output block
- *
- *  describes entire blob of output without row boundaries
- *
- *  "header" [ OUT, NULL OKAY ] - optional return parameter
- *  for substituted header when encoding
- *
- *  "data" [ IN ] - pointer to output buffer
- *
- *  "elem_count" [ IN/OUT ] - the maximum number
- *  of elements in blob ( at the current elem_bits )
- *
- *  "elem_bits" [ IN/OUT ] - element size in bits
- *
- *  "byte_order" [ IN/OUT ] - byte order of input data
- */
-typedef struct VBlobResult VBlobResult;
-struct VBlobResult
-{
-    /* element size in bits */
-    uint64_t elem_bits;
-
-    /* blob data buffer */
-    uint64_t elem_count;
-    void *data;
-
-    /* optional replacement header */
-    VBlobHeader *header;
-
-    /* byte order of data */
-    VByteOrder byte_order;
-};
-
-
-/* VBlobFunc
- *  functions that create blobs from a single input
- *
- *  "info" [ IN ] - runtime objects and information
- *
- *  "dst" [ IN ] - return parameter block
- *
- *  "src" [ IN ] - single input parameter
- *
- *  "hdr" [ IN ] - blob header belonging to either the "src"
- *  or "dst" blob depending upon activity. when encoding, "hdr"
- *  pertains to the "dst" blob, and should be populated with
- *  information needed when decoding, when "hdr" will pertain
- *  to "src".
- *
- *  return values:
- *    0 for no error
- *    RC ( *, rcFunction, rcExecuting, rcBuffer, rcInsufficient )
- *      when output buffer is insufficient. this condition is an
- *      error on decompression, but not on compress. on compress,
- *      the size of input buffer == size of output buffer. if no
- *      compression is possible, the library will store data as is.
- *    RC ( *, rcFunction, rcExecuting, *, * )
- *      general errors have this RC format, where your module
- *      and proper object and state defines are substituted.
- */
-typedef rc_t ( CC * VBlobFunc ) ( void *self, const VXformInfo *info,
-    VBlobResult *dst, const VBlobData *src, VBlobHeader *hdr );
-
-
-/* VArrayFunc
- *  functions that perform element-wise transforms
- *
- *  "info" [ IN ] - runtime objects and information
- *
- *  "dst" [ IN ] - return buffer
- *
- *  "src" [ IN ] - input buffer
- *
- *  "elem_count" [ IN ] - the number of elements
- *  in both input and output
- */
-typedef rc_t ( CC * VArrayFunc ) ( void *self, const VXformInfo *info,
-    void *dst, const void *src, uint64_t elem_count );
-
-
-/* VNonDetRowFunc
- *  functions that operate on a single row of input data
- *  and produce a single row of output data, where the
- *  number of elements in the output row is unrelated to
- *  the number of elements of input.
- *  NB. these functions are considered non-deterministic.
- *
- *  "info" [ IN ] - runtime objects and information
- *
- *  "row_id" [ IN ] - specific row id being processed
- *
- *  "rslt" [ IN ] - return parameter block
- *
- *  "argc" [ IN ] and "argv" [ IN ] - zero or more input
- *  parameter blocks
- */
-typedef rc_t ( CC * VNonDetRowFunc ) ( void *self,
-    const VXformInfo *info, int64_t row_id, VRowResult *rslt,
-    uint32_t argc, const VRowData argv [] );
-
-
-/* VRowFunc
- *  functions that operate on a single row of input data
- *  and produce a single row of output data, where the
- *  number of elements in the output row is unrelated to
- *  the number of elements of input.  The results are
- *  cached.
- *
- *  "info" [ IN ] - runtime objects and information
- *
- *  "row_id" [ IN ] - specific starting row id being processed
- *
- *  "rslt" [ IN ] - return parameter block
- *
- *  "argc" [ IN ] and "argv" [ IN ] - zero or more input
- *  parameter blocks
- */
-typedef rc_t ( CC * VRowFunc ) ( void *self,
-     const VXformInfo *info, int64_t row_id, VRowResult *rslt,
-     uint32_t argc, const VRowData argv [] );
-
-    
-/* VFixedRowFunc
- *  functions that operate on a single row of input data
- *  and produce a single row of output data, where the
- *  number of elements in the output row is known to be
- *  equal to the number of elements of input.
- *
- *  "info" [ IN ] - runtime objects and information
- *
- *  "row_id" [ IN ] - specific row id being processed
- *
- *  "rslt" [ IN ] - return parameter block
- *
- *  "argc" [ IN ] and "argv" [ IN ] - zero or more input
- *  parameter blocks
- */
-typedef rc_t ( CC * VFixedRowFunc ) ( void *self,
-    const VXformInfo *info, int64_t row_id, const VFixedRowResult *rslt,
-    uint32_t argc, const VRowData argv [] );
-
-
-
-/*==========================================================================
- * factory functions
- *
- *  factory functions are declared in schema - normally implicitly but
- *  sometimes explicitly - and provided in dynamically loadable shared
- *  libraries. the types described in the following section will be used
- *  during cursor open to generate optimized code for data processing.
- */
-
-
-/* XfactInfo
- *  constant input parameter block
- *  holds references to managers and container hierarchy
- *  as well as transform return type information
- *
- *  "mgr" [ IN ] - db mgr object
- *
- *  "dt" [ IN ] - type system mgr
- *
- *  "tbl" [ IN ] - owning table. can be used
- *   to access enclosing database
- *
- *  "desc" [ IN ] - description of return data type
- */
-typedef struct VXfactInfo VXfactInfo;
-struct VXfactInfo
-{
-    struct VDBManager const *mgr;
-    struct VSchema const *schema;
-    struct VTable const *tbl;
-    struct VCursorParams const *parms;
-    VFormatdesc fdesc;
-};
-
-
-/* VFactoryParams
- *  block of parameters to be evaluated by factory
- *  used to "templatize" runtime function
- *
- *  "argc" [ IN ] and "argv" [ IN, DYNAMIC ] - variable
- *  length array of input parameter description blocks:
- *
- *    "desc" [ IN ] - type descriptor tells data domain
- *    and size information for a single element of input
- *
- *    "count" [ IN ] - gives the dimensionality of
- *    data vector.
- *
- *    "data" [ IN, UNION ] - array of input elements
- *    selected by "desc.domain" and "desc.intrinsic_bits"
- */
-typedef struct VFactoryParams VFactoryParams;
-struct VFactoryParams
-{
-    uint32_t argc;
-    uint32_t align;
-
-    struct
-    {
-        /* describes constant element,
-           i.e. sizeof ( arg typedecl ) */
-        VTypedesc desc;
-
-        /* describes length of param vector:
-           bool, numeric: count of [ elem, elem, ... ]
-           utf8: number of bytes
-           other text: number of characters */
-        uint32_t count;
-
-        union
-        {
-            /* boolean */
-            const bool *b;
-
-            /* integer */
-            const int8_t *i8;
-            const int16_t *i16;
-            const int32_t *i32;
-            const int64_t *i64;
-
-            /* unsigned integer */
-            const uint8_t *u8;
-            const uint16_t *u16;
-            const uint32_t *u32;
-            const uint64_t *u64;
-
-            /* floating point */
-            const float *f32;
-            const double *f64;
-
-            /* ascii */
-            const char *ascii;
-
-            /* unicode */
-            const char *utf8;
-            const uint16_t *utf16;
-            const uint32_t *utf32;
-
-            /* missing function pointer */
-
-        } data;
-
-    } argv [ 16 ];
-};
-
-
-/* FunctionParams
- *  block of parameter typedecls to be evaluated by factory
- *  used to "templatize" runtime function
- *
- *  "argc" [ IN ] and "argv" [ IN, DYNAMIC ] - description
- *  of runtime parameters. actual dimension is given by "argc"
- */
-typedef struct VFunctionParams VFunctionParams;
-struct VFunctionParams
-{
-    uint32_t argc;
-    uint32_t align;
-    VFormatdesc argv [ 16 ];
-};
-
-
-/* FuncDesc
- *  parameter block for describing runtime function
- *  guaranteed to be zeroed on input
- *
- *  "self"  [ OUT, OPAQUE ] - optional object or
- *  data pointer for function.
- *
- *  "whack" [ OUT, NULL OKAY ] - optional destructor
- *  called with "self" when function is released
- *
- *  "u" [ OUT ] - several variants of function
- *
- *  "variant" [ OUT ] - selects variant of "u"
- */
-typedef uint32_t VFuncType;
-enum
-{
-    vftInvalid,
-    vftReserved,
-    vftRow,
-	vftRowFast,  /*** function is fast, so window can be stretched to the max **/
-    vftIdDepRow, /*** function dependent on row_id ***/
-    vftFixedRow,
-    vftNonDetRow,
-    vftArray,
-    vftBlob
-};
-
-typedef struct VFuncDesc VFuncDesc;
-struct VFuncDesc
-{
-    /* object and optional destructor */
-    void *self;
-    void ( CC * whack ) ( void *self );
-    
-    /* runtime function */
-    union
-    {
-        VRowFunc rf;
-        VNonDetRowFunc ndf;
-        VFixedRowFunc pf;
-        VArrayFunc af;
-        VBlobFunc bf;
-    } u;
-    
-    VFuncType variant;
-};
-
-
-/* TransformFactory
- *  unified typedef for row, page and blob transformation function factories
- *
- *  "self" [ IN, OPAQUE ] - NULL or const object pointer
- *  value registered with the manager
- *
- *  "info" [ IN ] - managers and table for the column,
- *  plus column type information
- *
- *  "rslt" [ IN ] - return value parameter block for resolved function
- *
- *  "cp" [ IN ] - constant template parameters
- *
- *  "dp" [ IN ] - type information for runtime parameters
- */
-typedef
-rc_t ( CC * VTransformFactory ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp );
-
-
-/* VTransDesc
- *  describes a transform factory
- */
-typedef struct VTransDesc VTransDesc;
-struct VTransDesc
-{
-    /* opaque factory data object */
-    void *fself;
-    void ( CC * whack ) ( void *fself );
-
-    /* factory entrypoint */
-    VTransformFactory factory;
-
-    /* interface version */
-    uint32_t itf_version;
-};
-
-#define VTRANSVERS( maj, min, rel ) \
-    ( ( ( maj ) << 24 ) | ( ( min ) << 16 ) | ( rel ) )
-
-/* actual factory function implementation name */
-#define VTRANSFACT_NAME( fact ) \
-    fact ## _fact
-
-/* exported factory name */
-#define VTRANSFACT_DECL( fact ) \
-    rc_t CC fact ( VTransDesc *desc )
-
-/* factory declaration with no self parameter */
-#define VTRANSFACT_IMPL( fact, maj, min, rel ) \
-    VTRANSFACT_IMPL_SELF( fact, maj, min, rel, NULL )
-
-/* factory declaration with static or constant self parameter */
-#define VTRANSFACT_IMPL_SELF( fact, maj, min, rel, self ) \
-    static rc_t CC VTRANSFACT_NAME ( fact ) ( const void*, \
-        const VXfactInfo*, VFuncDesc*, const VFactoryParams*, const VFunctionParams* ); \
-    rc_t CC fact ( VTransDesc *desc ) \
-    { \
-        desc -> fself = ( self ); \
-        desc -> whack = NULL; \
-        desc -> factory = VTRANSFACT_NAME ( fact ); \
-        desc -> itf_version = VTRANSVERS ( maj, min, rel ); \
-        return 0; \
-    } \
-    static rc_t CC VTRANSFACT_NAME ( fact )
-
-/* factory declaration with dynamically allocated self parameter */
-#define VTRANSFACT_IMPL_CONSTRUCT( fact, maj, min, rel, construct, destroy ) \
-    static rc_t CC VTRANSFACT_NAME ( fact ) ( const void*, \
-        const VXfactInfo*, VFuncDesc*, const VFactoryParams*, const VFunctionParams* ); \
-    rc_t CC fact ( VTransDesc *desc ) \
-    { \
-        desc -> whack = ( destroy ); \
-        desc -> factory = VTRANSFACT_NAME ( fact ); \
-        desc -> itf_version = VTRANSVERS ( maj, min, rel ); \
-        return construct ( & desc -> fself ); \
-    } \
-    static rc_t CC VTRANSFACT_NAME ( fact )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_vdb_xform_ */
diff --git a/interfaces/vfs/extern.h b/interfaces/vfs/extern.h
deleted file mode 100644
index fd1731a..0000000
--- a/interfaces/vfs/extern.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vfs_extern_
-#define _h_vfs_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define VFS_EXTERN LIB_EXPORT
-#define VFS_EXTERN_DATA extern LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define VFS_EXTERN LIB_IMPORT
-#ifdef __cplusplus
-#define VFS_EXTERN_DATA extern /* LIB_IMPORT_DATA */
-#else
-#define VFS_EXTERN_DATA LIB_IMPORT_DATA
-#endif
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_vfs_extern_ */
diff --git a/interfaces/vfs/keyring-priv.h b/interfaces/vfs/keyring-priv.h
deleted file mode 100644
index b88c722..0000000
--- a/interfaces/vfs/keyring-priv.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_keyring_priv_
-#define _h_keyring_priv_
-
-#ifndef _h_vfs_extern_
-#include <vfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define KEYRING_IPC_NAME "vdb-keyring"
-
-VFS_EXTERN_DATA const char* KeyRingDefaultDataDir;
-
-VFS_EXTERN rc_t StartKeyRing(const char* dataDir);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_keyring_priv_ */
diff --git a/interfaces/vfs/manager-priv.h b/interfaces/vfs/manager-priv.h
deleted file mode 100644
index c146dd0..0000000
--- a/interfaces/vfs/manager-priv.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_vfs_manager_priv_
-#define _h_vfs_manager_priv_
-
-#ifndef _h_vfs_extern_
-#include <vfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-
-#ifndef _h_kfs_defs_
-#include <kfs/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct VFSManager;
-struct KDirectory;
-struct KFile;
-struct VPath;
-struct VResolver;
-struct SRAPath;
-struct KConfig;
-
-/* this resembles the interface functions in manager.h
- * but allows the use of a KDirectory for the base instead of a VPath
- * of a directory
- *
- * this is expected to be more temporary if this code base continues.
- * much longer
- */
-VFS_EXTERN rc_t CC VFSManagerResolvePathRelativeDir (const struct VFSManager * self,
-                                                     uint32_t flags,
-                                                     const struct  KDirectory * base_dir,
-                                                     const struct  VPath * in_path,
-                                                     struct VPath ** out_path);
-
-
-
-/* bad interface.  Bad! Bad!
- * but needed to hack VFS into KDB
- * MORE THAN BAD. REFLECTS A TOTAL MISUNDERSTANDING OF FS.
- */
-VFS_EXTERN rc_t CC VFSManagerOpenFileReadDirectoryRelative (const struct VFSManager *self, 
-    const struct KDirectory * dir, struct KFile const **f, const struct VPath * path);
-
-VFS_EXTERN rc_t CC VFSManagerOpenFileReadDirectoryRelativeDecrypt (const struct VFSManager *self, 
-    const struct KDirectory * dir, struct KFile const **f, const struct VPath * path);
-
-VFS_EXTERN rc_t CC VFSManagerOpenDirectoryReadDirectoryRelative ( const struct VFSManager *self,
-    struct KDirectory const * dir, struct KDirectory const **d, const struct VPath * path );
-
-VFS_EXTERN rc_t CC VFSManagerOpenDirectoryReadDirectoryRelativeDecrypt ( const struct VFSManager *self,
-    struct KDirectory const * dir, struct KDirectory const **d, const struct VPath * path );
-
-VFS_EXTERN rc_t CC VFSManagerOpenDirectoryUpdateDirectoryRelative ( const struct VFSManager *self,
-    struct KDirectory const * dir, struct KDirectory **d, const struct VPath * path );
-
-#define VPathMakeDirectoryRelative LegacyVPathMakeDirectoryRelative
-VFS_EXTERN rc_t CC VPathMakeDirectoryRelative ( struct VPath ** new_path,
-    struct KDirectory const * dir, const char * posix_path);
-
-
-VFS_EXTERN rc_t CC VFSManagerOpenFileReadDecrypt (const struct VFSManager *self,
-                                                  struct KFile const **f,
-                                                  const struct VPath * path);
-
-
-/*
- * quick hack for vdb-validate for immediate testing release
- */
-VFS_EXTERN rc_t CC VFSManagerWGAValidateHack (const struct VFSManager * self, 
-                                              const struct KFile * file,
-                                              const char * path); /* we'll move this to a vpath */
-
-/*
- * Access to VFSManager's instance of configuration object, for testing purposes
- */
-VFS_EXTERN const struct KConfig* CC VFSManagerGetConfig(const struct VFSManager * self);
-
-/* Make using a custom KConfig
- */
-VFS_EXTERN rc_t CC VFSManagerMakeFromKfg ( struct VFSManager ** pmanager,
-    struct KConfig * cfg );
-
-/*
- * Set/get pathname of the object_id/object_name bindings file (used for testing; should go away when the functionality
- *  is rolled into KeyRing server)
- * Set to NULL to use the default location ("~/.ncbi/objid.mapping")
- */
-VFS_EXTERN void VFSManagerSetBindingsFile(struct VFSManager * self, const char* path);
-VFS_EXTERN const char* VFSManagerGetBindingsFile(struct VFSManager * self);
-
-
-/** Reset VResolver when we need to change protected repository context */
-VFS_EXTERN rc_t CC VFSManagerSetResolver
-    ( struct VFSManager * self, struct VResolver * resolver );
-
-
-/* GetCacheRoot
- *  query the cache-root
- *
- *  path [ OUT ] - VPath of location of current cache-root
- */
-VFS_EXTERN rc_t CC VFSManagerGetCacheRoot ( const struct VFSManager * self,
-    struct VPath const ** path );
-
-
-/* SetCacheRoot
- *  set a new cache-root
- *
- *  path [ IN ] - VPath of new location of cache-root
- */
-
-VFS_EXTERN rc_t CC VFSManagerSetCacheRoot ( const struct VFSManager * self,
-    struct VPath const * path );
-    
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_vfs_manager_priv_ */
diff --git a/interfaces/vfs/manager.h b/interfaces/vfs/manager.h
deleted file mode 100644
index 9779ef3..0000000
--- a/interfaces/vfs/manager.h
+++ /dev/null
@@ -1,322 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_vfs_manager_
-#define _h_vfs_manager_
-
-#ifndef _h_vfs_extern_
-#include <vfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-
-#ifndef _h_kfs_defs_
-#include <kfs/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-struct VPath;
-struct VResolver;
-struct KDirectory;
-struct KNSManager;
-struct VPath;
-
-/* temporary */
-
-
-/*--------------------------------------------------------------------------
- * VFSManager
- */
-typedef struct VFSManager VFSManager;
-
-#define VFS_KRYPTO_PASSWORD_MAX_SIZE 4096
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-VFS_EXTERN rc_t CC VFSManagerAddRef ( const VFSManager *self );
-VFS_EXTERN rc_t CC VFSManagerRelease ( const VFSManager *self );
-
-/* OpenFileRead
- *  opens an existing file with read-only access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] VPath representing the path, URL or URN of the desired file
- */
-VFS_EXTERN rc_t CC VFSManagerOpenFileRead (const VFSManager *self, 
-                                           struct KFile const **f,
-                                           const struct VPath * path);
-
-VFS_EXTERN rc_t CC VFSManagerOpenDirectoryRead ( const VFSManager *self,
-    struct KDirectory const **d, const struct VPath * path );
-
-/* it forces decryption to be used for kdb */
-VFS_EXTERN rc_t CC VFSManagerOpenDirectoryReadDecrypt ( const VFSManager *self,
-    struct KDirectory const **d, const struct VPath * path );
-
-/* VPath has already been resolved to a URL and an optional cache file */
-VFS_EXTERN rc_t CC VFSManagerOpenDirectoryReadDecryptRemote (const struct VFSManager *self,
-    struct KDirectory const **d, const struct VPath * path, const struct VPath * cache);
-
-VFS_EXTERN rc_t CC VFSManagerOpenDirectoryUpdate ( const VFSManager *self,
-    struct KDirectory **d, const struct VPath * path );
-
-/* OpenFileWrite
- *  opens an existing file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if true, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "path" [ IN ] VPath representing the path, URL or URN of the desired file
- */
-VFS_EXTERN rc_t CC VFSManagerOpenFileWrite (const VFSManager *self,
-                                            struct KFile **f,
-                                            bool update,
-                                            const struct VPath * path);
-
-/* CreateFile
- *  opens a file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if true, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] VPath representing the path, URL or URN of the desired file
- */
-VFS_EXTERN rc_t CC VFSManagerCreateFile (const VFSManager *self, 
-                                         struct KFile **f,
-                                         bool update, uint32_t access,
-                                         KCreateMode mode,
-                                         const struct VPath * path );
-
-
-/* Remove
- *  remove an accessible object from its directory
- *
- *  "force" [ IN ] - if true and target is a directory,
- *  remove recursively
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-VFS_EXTERN rc_t CC VFSManagerRemove (const VFSManager *self, bool force,
-                                     const struct VPath * path );
-
-
-/* Make
- */
-VFS_EXTERN rc_t CC VFSManagerMake ( VFSManager ** pmanager );
-
-/* GetCWD
- */
-VFS_EXTERN rc_t CC VFSManagerGetCWD (const VFSManager * self, struct KDirectory ** cwd);
-
-VFS_EXTERN rc_t CC VFSManagerGetResolver ( const VFSManager * self, struct VResolver ** resolver );
-
-VFS_EXTERN rc_t CC VFSManagerGetKNSMgr ( const VFSManager * self, struct KNSManager ** kns );
-
-
-VFS_EXTERN rc_t CC VFSManagerGetKryptoPassword (const VFSManager * self, char * new_password, size_t max_size, size_t * size);
-
-/*
-  NULL value for self
-  RC (rcVFS, rcEncryptionKey, rcUpdating, rcSelf, rcNull);
-
-  NULL value for password or 0 value for size
-  RC (rcVFS, rcEncryptionKey, rcUpdating, rcParam, rcNull);
-
-  size greater than VFS_KRYPTO_PASSWORD_MAX_SIZE
-  RC (rcVFS, rcEncryptionKey, rcUpdating, rcSize, rcExcessive);
-
-  illegal CR or LF (NL) in the password
-  RC (rcVFS, rcEncryptionKey, rcUpdating, rcEncryptionKey, rcInvalid);
-
-  path/file name for password too long for function as written
-  RC (rcVFS, rcEncryptionKey, rcUpdating, rcPath, rcExcessive);
-
-  existing password path/file name is not a file
-  RC (rcVFS, rcEncryptionKey, rcUpdating, rcPath, rcIncorrect);
-
-  unknown file type for configured path/file name
-  RC (rcVFS, rcEncryptionKey, rcUpdating, rcPath, rcCorrupt);
-
-  incomplete writes to temporary password file
-  RC (rcVFS, rcEncryptionKey, rcWriting, rcFile, rcInsufficient);
-
-  other errors from KFS and KLIB
-*/
-
-/* pwd_dir[pwd_dir_size] -
-    Output parameters for path to directory containing the password file.
-    pwd_dir is not updated if pwd_dir == NULL or pwd_dir_size == 0
-                  or pwd_dir_size is insufficient to copy the path
- */
-VFS_EXTERN rc_t CC VFSManagerUpdateKryptoPassword (const VFSManager * self, 
-                                                   const char * password,
-                                                   size_t size,
-                                                   char * pwd_dir,
-                                                   size_t pwd_dir_size);
-
-
-VFS_EXTERN rc_t CC VFSManagerResolveSpec ( const VFSManager * self,
-                                           const char * spec,
-                                           struct VPath ** path_to_build,
-                                           const struct KFile ** remote_file,
-                                           const struct VPath ** local_cache,
-                                           bool resolve_acc );
-
-struct KDirectory;
-
-VFS_EXTERN rc_t CC VFSManagerResolveSpecIntoDir ( const VFSManager * self,
-                                                  const char * spec,
-                                                  const struct KDirectory ** dir,
-                                                  bool resolve_acc );
-
-/*--------------------------------------------------------------------------
- * KConfig
- *  placing some KConfig code that relies upon VFS here
- */
-struct KConfig;
-struct KConfigNode;
-
-/* ReadVPath
- *  read a VPath node value
- *
- * self [ IN ] - KConfig object
- * path [ IN ] - path to the node
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-VFS_EXTERN rc_t CC KConfigReadVPath ( struct KConfig const* self, const char* path, struct VPath** result );
-
-/* ReadVPath
- *  read a VPath node value
- *
- * self [ IN ] - KConfigNode object
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-VFS_EXTERN rc_t CC KConfigNodeReadVPath ( struct KConfigNode const *self, struct VPath** result );
-
-/* ResolvePath
- *
- * take a VPath and resolve to a final form apropriate for KDB
- *
- * that is take a relative path and resolve it against the CWD
- * or take an accession and resolve into the local or remote 
- * VResolver file based on config. It is just a single resolution percall
- *
- * flags
- *      can disable all Accession resolution
- *      can let VPath With no scheme be treated as a possible accession
- *
- */
-
-/* bit values for flags */
-    /* allow no local accession resolution */
-#define vfsmgr_rflag_no_acc_local (1<<0)
-    /* allow no remote accession resolution */
-#define vfsmgr_rflag_no_acc_remote (1<<1)
-    /* never do VResolver Accession resolution */
-#define vfsmgr_rflag_no_acc  (vfsmgr_rflag_no_acc_local|vfsmgr_rflag_no_acc_remote)
-    /* use VResolver Accession resolution for simple names with no scheme */
-
-#define vfsmgr_rflag_kdb_acc (1<<2)
-    /* over ridden by vfsmgr_rflag_no_acc */
-
-
-VFS_EXTERN rc_t CC VFSManagerResolvePath (const VFSManager * self,
-                                          uint32_t flags,
-                                          const struct  VPath * in_path,
-                                          struct VPath ** out_path);
-
-VFS_EXTERN rc_t CC VFSManagerResolvePathRelative (const VFSManager * self,
-                                                  uint32_t flags,
-                                                  const struct  VPath * base_path,
-                                                  const struct  VPath * in_path,
-                                                  struct VPath ** out_path);
-
-/*
- * Registering bindings between dbGaP object Ids and object names
- */                                                  
-
-/* VFSManagerRegisterObject
- *  registers a binding between an object Id and an object name (object = accession or dbGaP file) 
- * 
- * self [ IN ] - VFSManager object
- * oid [ IN ] - object id
- * obj [ IN ] - Vpath representing the object's name (scheme is "ncbi-acc" for accessions, "ncbi-file" for dbGaP files; 
- *              the name itself is the 'path' component
- */
-VFS_EXTERN rc_t CC VFSManagerRegisterObject(struct VFSManager* self, uint32_t oid, const struct VPath* obj);
-
-/* VFSManagerGetObjectId
- *  look up an object id by an object name 
- * 
- * self [ IN ] - VFSManager object
- * obj [ IN ] - Vpath representing the object's name (scheme is "ncbi-acc" for accessions, "ncbi-file" for dbGaP files; 
- *              the name itself is the 'path' component
- * oid [ OUT ] - object id
- */
-VFS_EXTERN rc_t CC VFSManagerGetObjectId(const struct VFSManager* self, const struct VPath* obj, uint32_t* oid);
-
-/* VFSManagerGetObject
- *  look up an object name by an object id
- * 
- * self [ IN ] - VFSManager object
- * oid [ IN ] - object id
- * obj [ OUT ] - Vpath representing the object's name (scheme is "ncbi-acc" for accessions, "ncbi-file" for dbGaP files; 
- *              the name itself is the 'path' component
- */
-VFS_EXTERN rc_t CC VFSManagerGetObject(const struct VFSManager* self, uint32_t oid, struct VPath** obj);
-
-
-                                                  
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_manager_ */
diff --git a/interfaces/vfs/path-priv.h b/interfaces/vfs/path-priv.h
deleted file mode 100644
index 66c3fb3..0000000
--- a/interfaces/vfs/path-priv.h
+++ /dev/null
@@ -1,266 +0,0 @@
-/*===========================================================================
-*
-*                            Public Domain Notice
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vfs_path_priv_
-#define _h_vfs_path_priv_
-
-#ifndef _h_vfs_extern_
-#include <vfs/extern.h>
-#endif
-
-#ifndef _h_vfs_path_
-#include <vfs/path.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct String;
-
-
-#define NCBI_FILE_SCHEME       "ncbi-file"
-#define NCBI_ACCESSION_SCHEME  "ncbi-acc"
-#define HTTP_SCHEME            "http"
-#define FTP_SCHEME             "ftp"
-#define FASP_SCHEME            "fasp"
-#define NCBI_LEGREFSEQ_SCHEME  "x-ncbi-legrefseq"
-#define NCBI_OBJECT_SCHEME     "ncbi-obj"
-
-/* options for a VPath possibly obtained from a query string on an URI */
-typedef uint32_t VPOption_t;
-enum eVPOption_t
-{
-    vpopt_encrypted,
-    vpopt_pwpath,
-    vpopt_pwfd,
-    vpopt_readgroup,
-#if 0    
-    vpopt_temporary_pw_hack,
-#endif    
-    vpopt_vdb_ctx,
-    vpopt_gap_ticket, 
-    vpopt_count
-};
-
-
-/* =====
- * Much of what follows is expected to move into the interface vfs/path.h
- * once it becomes supported.
- */
-
-/* MakeFmt
- *  make a path object from a format string plus arguments
- *
- *  "new_path" [ OUT ] - a reference to the new object.
- *
- *  "fmt" [ IN ] and "args" [ IN ] - arguments to string_printf
- *  ( see <klib/text.h> ) to build a NUL-terminated string
- *  that conforms with the rules for "posix_path"
- *
- * NB - SECURITY RISK IF USED DIRECTLY FROM EXTERNAL STRINGS.
- *      ALSO, FMT IS **NOT** PRINTF COMPATIBLE - see string_printf.
- */
-
-#if 0
-VFS_EXTERN rc_t CC VPathMakeRelative ( VPath ** new_path, const VPath * base_path,
-                                       const char * relative_path );
-VFS_EXTERN rc_t CC VPathMakeRelativeFmt ( VPath ** new_path, const VPath * base_path,
-                                          const char * fmt, ... );
-VFS_EXTERN rc_t CC VPathVMakeRelativeFmt ( VPath ** new_path, const VPath * base_path,
-                                           const char * fmt, va_list args );
-VFS_EXTERN rc_t CC VPathMakeCurrentPath ( VPath ** new_path );
-
-VFS_EXTERN rc_t CC VPathMakeURI ( VPath ** new_path, const char * uri );
-#endif
-
-
-/* Option
- *  rc == 0 if the option has been specified
- *  for options with a parameter, the value of the parameter is copied to buffer
- */
-VFS_EXTERN rc_t CC VPathOption ( const VPath * self, VPOption_t option,
-                                char * buffer, size_t buffer_size,
-                                size_t * num_read);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_vfs_path_priv_ */
-
-/*--------------------------------------------------------------------------
- *
- * The ABNF form described in RFC5234 will be used to define URLS and paths
- * with some handwaving instead of complete character definitions for case 
- * insensitivity.  CORE definitions from RFC5234 will be used again handwaving
- * case insensitivity.
- *
- * --------------------
- *
- * URL for a VPath
- *
- *  as per RFC 3986, an URI consists of:
- *
- *    URI           = scheme ":" heir-part [ "?" query ] [ "#" fragment ]
- *
- *  We will support however something intbetween an URI and an IRI in that we'll
- *  all UTF-8 rather than limit certain characters to ASCII.
- *
- *  For the NCBI path  URL:  The hier-part is intended to be compatible with the 
- *                    "file:" scheme  Authority on any of the Unix-like operating
- *                    systems must either be empty or "localhost".  For Windows
- *                    it must  be a host that can be used if the "file" url is
- *                    translated into a UNC style Windows path.  Also in a
- *                    Windows vfs: URL a single colon ':' will be allowed only at
- *                    the end of a single character rive letter for the first
- *                    sub-part of the path.
- *
- *    scheme        = "ncbi-file" ; ( case insensitive )
- *
- *    hier-part     = "//" authority path-abempty
- *                  / path-absolute
- *                  / path-relative
- *                  / path-empty
- *
- * by RFC 3986 authority is
- *    authority     = [ userinfo "@" ] host [ ":" port]
- * but at this point we only recognize
- *    authority     = host
- *
- * by RFC 3986 host is
- *    host          = IP-literal / IPv4address / reg-name
- * but at this point we only recognize
- *    host          = reg-name
- *
- *    reg-name      = *( unreserved / pct-encoded / sub-delims )
- *
- *    path          = path-abempty
- *                  / path-absolute
- *                  / path-noscheme
- *                  / path-rootless
- *                  / path-empty
- *
- *    path-abempty  = * ( "/" segment )
- *
- *    path-absolute = "/" segment-nz *( "/" segment )
- *
- *    path-noscheme = segment-nz-nc *( "/" segment )
- *
- *    path-rootless = segment-nz *( "/" segment )
- *
- *    path-empty    = ""
- *
- *    segment       = *pchar       ; can be empty
- *    segment-nz    = 1*pchar      ; can't be empty
- *    segment-nz-nc = 1*pchar-nz   ; can't be empty
- *
- *    pchar         = ":" / pchar-nc
- *
- *    pchar-nc      = unreserved / pct-encoded / sub-delims ? "@"
- *
- *    pct-encoded   = "%" HEXDIG HEXDIG ; hex digits are 0-9, a-f or A-F
- *
- *    authority   = "localhost" / host-name ; the host name is an O/S specific 
- *                                          ; name of a remote host 
- *
- *    query       = query_entry [ * ( "&" query_entry ) ]
- *
- *    query_entry = "encrypt" / "enc" / ( "pwfile=" hier-part ) / ( "pwfd=" fd )
- *
- *    fd          = 1* DIGIT
- *
- *    unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~" / UTF-8
- *
- *    reserved    = gen-delims / subdelims
- *
- *    gen-delims  = ":" / "/" / "?" / "#" / "[" / "]" / "@"
- *
- *    sub-delims  = "!" / "$" / "&" / "'" / "(" / ")" / "*"
- *                / "+" / "," / ";" / "="
- *
- * Handwaving on the UTF-8.  We'll accept it rather than requiring percent encoding
- * in most cases.
-
- * Examples:
- *         "ncbi-file://home/my-name/data-files"
- *         "ncbi-file://win-server/archive/secure/read12345?encrypted"
- *         "ncbi-file:///c:/scanned-data/0001/file.sra?enc?pwd-file=c:/Users/JamesMcCoy/ncbi.pwd"
- *
- *  We allow an implied scheme of "vfs" if none present.
- *  'host-name' is partially implemented for Windows.  Not currently for any the
- *  of the supported Unix systems.  We do not support IP addresses instead of 
- *  host names.
- *
- *  'path' can be either absolute or relative and must be posix style as per 
- *  RFC 3986 and matches the "file" scheme.
- *
- *  'fragment' is not yet implemented or defined.
- *
- *  'fd' is a system specific file handle.  Not yet supported on Windows.
- *
- * --------------------
- *
- * VFS posix_path representation:
- *
- * The internal representation of a path for VFS resembles very closely the
- * POSIX pathname crossed with the Windows UNC path.  Only the Unix "/" 
- * separator is allowed not the "\" for paths.
- *
- * posix-path     = full-path / relative-path
- *
- * full-path      = ["//" host] "/" [ directory-path "/" ] resource
- *
- * relative-path  = [ directory-path "/" ] resource
- *
- * directory-path = resource [ "/" directory-path ]
- *
- * resource       = string ; (UTF-8 O/S specific name for a directory or a file)
- *
- * host           = string ; (UTF-8 O/S specific name for the local or remote host)
- *
- * For a host "localhost" is a synonym for the current host.
- * The "//host" is not guaranteed to work for all systems except "//localhost"
- *
- * The resource "." is assumed to mean the local directory and will be stripped
- * when a path is made canonical.
- *
- * The resource ".." is assumed to mean the containing directory and when made 
- * canonical it will be left in at the begining for relative paths or removed along 
- * with the preceding resource name.
- *
- * For Windows the device is handled in a unique way with some potential for ambiguity.
- * The UNC approach for a named drive "C:" becomes "/c".  So "C:\" becomes "/c/".
- *
- * In the future the complex approach from the "file:" URL should be adopted 
- * with the ":" allowed only in the first directory name in a path.  RFC 3986 
- * notes though that this complex approach puts some five variants into the ABNF
- * to describe the path portion of an URL.
- */
diff --git a/interfaces/vfs/path.h b/interfaces/vfs/path.h
deleted file mode 100644
index 33f9c11..0000000
--- a/interfaces/vfs/path.h
+++ /dev/null
@@ -1,294 +0,0 @@
-/*===========================================================================
-*
-*                            Public Domain Notice
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vfs_path_
-#define _h_vfs_path_
-
-#ifndef _h_vfs_extern_
-#include <vfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct String;
-struct VFSManager;
-
-
-/*--------------------------------------------------------------------------
- * VPath
- *  represents an unbound object query key
- *  may be created from a simple file-system path,
- *  a more formal URN or URL,
- *  or other modes of creation
- *
- *  a path will have these parts:
- *    scheme       : a scheme for retrieval
- *    auth         : login name for authentication
- *    host         : authoritative source
- *    port         : port for connecting with host
- *    path         : host-relative path
- *    query        : parameters for interpretation
- *    fragment     : internal component of object
- *    proj         : project id
- *    name         : alternate or primary name
- *
- *  file-system paths with no modifying parameters
- *  will be given standard "file" scheme. paths having
- *  parameters will be given the scheme "ncbi-file".
- *
- *  standard networking schemes ( "http", "ftp", etc. )
- *  are supported.
- *
- *  NCBI accessions are given the scheme "ncbi-acc".
- *
- *  NCBI remote object id paths receive scheme "ncbi-obj".
- */
-typedef struct VPath VPath;
-
-
-/* MakePath
- *  make a path object from a string conforming to
- *  either a standard POSIX path or a URI
- *
- *  "new_path" [ OUT ] - return parameter for new path object
- *
- *  "path_str" [ IN ] - a UTF-8 NUL-terminated string
- *  representing a POSIX path or URI, or
- *  a string_printf compatible format string
- *
- *  "path_fmt" [ IN ] and "args" [ IN ] - a UTF-8 NUL-terminated fmt string
- *  compatible with string_vprintf, plus argument list
- *
- *  Examples:
- *      "ncbi-file:/home/my-name/data-files"
- *      "ncbi-file://win-server/archive/secure/read12345?encrypted"
- *      "ncbi-file:///c/scanned-data/0001/file.sra?enc&pwfile=/c/Users/JamesMcCoy/ncbi.pwd"
- */
-VFS_EXTERN rc_t CC VFSManagerMakePath ( struct VFSManager const * self,
-    VPath ** new_path, const char * path_str, ... );
-VFS_EXTERN rc_t CC VFSManagerVMakePath ( struct VFSManager const * self,
-    VPath ** new_path, const char * path_fmt, va_list args );
-
-
-/* MakeSysPath
- *  make a path object from an OS native filesystem path string
- *
- *  "new_path" [ OUT ] - return parameter for new path object
- *
- *  "sys_path" [ IN ] - a UTF-8 NUL-terminated string
- *  representing a native filesystem path
- *
- *  "wide_sys_path" [ IN ] - a wide NUL-terminated string
- *  representing a native filesystem path, where
- *  wchar_t is either USC-2 or UTF-32 depending upon libraries
- */
-VFS_EXTERN rc_t CC VFSManagerMakeSysPath ( struct VFSManager const * self,
-    VPath ** new_path, const char * sys_path );
-VFS_EXTERN rc_t CC VFSManagerWMakeSysPath ( struct VFSManager const * self,
-    VPath ** new_path, const wchar_t * wide_sys_path );
-
-
-/* MakeAccPath - TEMPORARY
- *  takes a textual accession representation
- *  creates a VPath representing an accession
- *
- *  "new_path" [ OUT ] - return parameter for new path object
- *
- *  "acc" [ IN ] - a NUL-terminated ASCII fmt string
- */
-VFS_EXTERN rc_t CC VFSManagerMakeAccPath ( struct VFSManager const * self,
-    VPath ** new_path, const char * acc, ... );
-VFS_EXTERN rc_t CC VFSManagerVMakeAccPath ( struct VFSManager const * self,
-    VPath ** new_path, const char * fmt, va_list args );
-
-
-/* MakeOidPath - TEMPORARY
- *  takes an integer oid
- *  creates a VPath representing an obj-id
- *
- *  "new_path" [ OUT ] - return parameter for new path object
- *
- *  "oid" [ IN ] - a non-zero object id
- */
-VFS_EXTERN rc_t CC VFSManagerMakeOidPath ( struct VFSManager const * self,
-    VPath ** new_path, uint32_t oid );
-
-
-/* MakePathWithExtension
- *  makes a copy of original path
- *  appends an extension to path portion of orig
- */
-VFS_EXTERN rc_t CC VFSManagerMakePathWithExtension ( struct VFSManager const * self,
-    VPath ** new_path, const VPath * orig, const char * extension );
-
-
-/* ExtractAccessionOrOID
- *  given an arbitrary path, possibly with extensions,
- *  extract the portion of the leaf qualifying as an
- *  accession or OID
- */
-VFS_EXTERN rc_t CC VFSManagerExtractAccessionOrOID ( struct VFSManager const * self,
-    VPath ** acc_or_oid, const VPath * orig );
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-VFS_EXTERN rc_t CC VPathAddRef ( const VPath *self );
-VFS_EXTERN rc_t CC VPathRelease ( const VPath *self );
-
-
-/* IsAcessionOrOID
- *  asks if the path pattern could possibly be an accession or oid
- */
-VFS_EXTERN bool CC VPathIsAccessionOrOID ( const VPath * self );
-
-
-/* IsFSCompatible
- *  asks if the path can be used with the OS' filesystems
- */
-VFS_EXTERN bool CC VPathIsFSCompatible ( const VPath * self );
-
-
-/* FromUri
- *  asks if the path was created from a formal URI
- */
-VFS_EXTERN bool CC VPathFromUri ( const VPath * self );
-
-
-/* MarkHighReliability
- *  mark a path as representing either a reliable URL
- *  or one where the reliability is unknown.
- *
- *  a highly-reliable URL is one that should be expected
- *  to work. this property makes errors more suspicious,
- *  and more likely to be temporary, leading to harder work
- *  within the networking module.
- *
- *  "high_reliability" [ IN ] - set to true for high reliability
- */
-VFS_EXTERN rc_t CC VPathMarkHighReliability ( VPath * self, bool high_reliability );
-
-/* IsHighlyReliable
- *  returns "true" if the path represents a high-reliability URL
- */
-VFS_EXTERN bool CC VPathIsHighlyReliable ( const VPath * self );
-
-
-/* Read*
- *  read the various parts
- *  copies out data into user-supplied buffer
- *
- *  "buffer" [ OUT ] and "buffer_size" [ IN ] - output buffer
- *  for data read. if sufficient space is available, the copy
- *  will be NUL-terminated.
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  for the number of valid bytes in "buffer" after a successful
- *  read. on failure due to insufficient buffer, contains the
- *  number of bytes required for transfer.
- */
-VFS_EXTERN rc_t CC VPathReadUri ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read );
-VFS_EXTERN rc_t CC VPathReadScheme ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read );
-VFS_EXTERN rc_t CC VPathReadAuth ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read );
-VFS_EXTERN rc_t CC VPathReadHost ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read );
-VFS_EXTERN rc_t CC VPathReadPortName ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read );
-VFS_EXTERN rc_t CC VPathReadPath ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read );
-VFS_EXTERN rc_t CC VPathReadSysPath ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read );
-VFS_EXTERN rc_t CC VPathReadQuery ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read );
-VFS_EXTERN rc_t CC VPathReadParam ( const VPath * self, const char * param,
-    char * buffer, size_t buffer_size, size_t * num_read );
-VFS_EXTERN rc_t CC VPathReadFragment ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read );
-
-
-/* MakeUri
- *  convert a VPath into a URI
- */
-VFS_EXTERN rc_t CC VPathMakeUri ( const VPath * self,
-    struct String const ** uri );
-
-
-/* MakeSysPath
- *  convert a VPath into an OS-specific path string
- */
-VFS_EXTERN rc_t CC VPathMakeSysPath ( const VPath * self,
-    struct String const ** sys_path );
-
-
-/* MakeString
- *  convert a VPath into a String
- *  respects original source of path,
- *  i.e. does not add scheme unnecessarily
- */
-VFS_EXTERN rc_t CC VPathMakeString ( const VPath * self,
-    struct String const ** str );
-
-
-/* Get*
- *  retrieves internal parts
- *  returns pointers to internal String data
- *  Strings remain valid while "self" is valid
- */
-VFS_EXTERN rc_t CC VPathGetScheme ( const VPath * self, struct String * str );
-VFS_EXTERN rc_t CC VPathGetAuth ( const VPath * self, struct String * str );
-VFS_EXTERN rc_t CC VPathGetHost ( const VPath * self, struct String * str );
-VFS_EXTERN rc_t CC VPathGetPortName ( const VPath * self, struct String * str );
-VFS_EXTERN uint16_t CC VPathGetPortNum ( const VPath * self );
-VFS_EXTERN rc_t CC VPathGetPath ( const VPath * self, struct String * str );
-VFS_EXTERN rc_t CC VPathGetQuery ( const VPath * self, struct String * str );
-VFS_EXTERN rc_t CC VPathGetParam ( const VPath * self, const char * param, struct String * str );
-VFS_EXTERN rc_t CC VPathGetFragment ( const VPath * self, struct String * str );
-/* TEMPORARY */
-VFS_EXTERN uint32_t CC VPathGetOid ( const VPath * self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_vfs_path_ */
diff --git a/interfaces/vfs/resolver.h b/interfaces/vfs/resolver.h
deleted file mode 100644
index 46024d5..0000000
--- a/interfaces/vfs/resolver.h
+++ /dev/null
@@ -1,263 +0,0 @@
-/*===========================================================================
-*
-*                            Public Domain Notice
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vfs_resolver_
-#define _h_vfs_resolver_
-
-#ifndef _h_vfs_extern_
-#include <vfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KFile;
-struct VPath;
-struct KConfig;
-struct KRepository;
-struct VFSManager;
-
-
-/*--------------------------------------------------------------------------
- * VResolver
- */
-typedef struct VResolver VResolver;
-
-
-/* Make
- *  ask the VFS manager to make a resolver
- */
-VFS_EXTERN rc_t CC VFSManagerMakeResolver ( struct VFSManager const * self,
-    VResolver ** new_resolver, struct KConfig const * cfg );
-VFS_EXTERN rc_t CC KRepositoryMakeResolver ( struct KRepository const * self,
-    VResolver ** new_resolver, struct KConfig const * cfg );
-
-
-/* AddRef
- * Release
- */
-VFS_EXTERN rc_t CC VResolverAddRef ( const VResolver * self );
-VFS_EXTERN rc_t CC VResolverRelease ( const VResolver * self );
-
-
-/* Accepted protocol list ordered by preference */
-typedef uint32_t VRemoteProtocols;
-enum
-{
-      eProtocolHttp
-    , eProtocolFasp
-    , eProtocolFaspHttp
-    , eProtocolHttpFasp
-    , eProtocolLastDefined
-};
-
-
-/* Query
- *  resolve object location to either an existing local path,
- *  or a pair of remote URL + local cache location.
- *
- *  "protocols" [ IN ] - the desired protocols for remote resolution
- *
- *  "query" [ IN ] - a path that can represent:
- *     accession : a recognizable accession from NCBI or known organization
- *     obj-id    : a dbGaP object id
- *     name      : a dbGaP filename
- *     path      : a filesystem path
- *     url       : a remote location
- *
- *  "local" [ OUT, NULL OKAY ] - optional return parameter for local path:
- *     accession : resolve to local user or site path
- *     obj-id    : resolve to local user protected path
- *     name      : resolve to local user protected path
- *     url       : set to NULL
- *
- *  "remote" [ OUT, NULL OKAY ] - optional return parameter for remote path:
- *     accession : resolve to URL
- *     obj-id    : resolve to URL
- *     name      : resolve to URL
- *     url       : set to duplicate
- *
- *  "cache" [ OUT, NULL OKAY ] - optional return parameter for cache path:
- *     accession : resolve to user cache path
- *     obj-id    : resolve to user cache path
- *     path      : set to NULL
- *     url       : resolve to user cache path
- *
- *  any of the output parameters may be NULL, but not all, i.e. there
- *  must be at least one non-NULL return parameter.
- *
- *  if you DON'T want local resolution, pass NULL for "local" and
- *  the query will be resolved remotely. if you don't want remote
- *  resolution, pass NULL for "remote".
- *
- *  a query that is resolved locally will always return NULL for
- *  "remote" and "cache", if the parameters are provided.
- */
-VFS_EXTERN rc_t CC VResolverQuery ( const VResolver * self,
-    VRemoteProtocols protocols, struct VPath const * query,
-    struct VPath const ** local, struct VPath const ** remote,
-    struct VPath const ** cache );
-
-
-/* Local - DEPRECATED
- *  Find an existing local file/directory that is named by the accession.
- *  rcState of rcNotFound means it does not exist.
- *
- *  other rc code for failure are possible.
- *
- *  Accession must be an ncbi-acc scheme or a simple name with no 
- *  directory paths.
- */
-VFS_EXTERN rc_t CC VResolverLocal ( const VResolver * self,
-    struct VPath const * accession, struct VPath const ** path );
-
-
-/* Remote - DEPRECATED
- *  Find an existing remote file that is named by the accession.
- *
- *  rcState of rcNotFound means it did not exist and can not be 
- *  downloaded. Probably a bad accession name.
- *
- *  Need a specific rc for no network configured.
- *  Need a specific rc for network access permitted.
- *
- *  Other rc code for failure are possible.
- *
- *  Accession must be an ncbi-acc scheme or a simple name with no 
- *  directory paths.
- *
- */
-VFS_EXTERN rc_t CC VResolverRemote ( const VResolver * self,
-    VRemoteProtocols protocols, struct VPath const * accession,
-    struct VPath const ** path /* , struct KFile const ** opt_file_rtn */ );
-
-/* Cache - DEPRECATED
- *  Find a cache directory that might or might not contain a partially
- *  downloaded file.
- *
- *  Accession must be an ncbi-acc scheme, an http url or a simple name with no 
- *  directory paths. All three should return the same directory URL as a VPath. (?)
- *  Or should it be a directory or a file url depending upon finding a partial
- *  download? This would require co-ordination with all download mechanisms that
- *  we permit.
- *
- *  With refseq holding wgs objects we have a case were the downloaded file is not
- *  named the same as the original accession as the file archive you want is a
- *  container for other files.
- *
- *  Find local will give a path that has a special scheme in these cases. 
- *  Find remote will give the url for the container that contains the accession
- *  so using the returned VPath from resolve remote is better than the original
- *  accession in this one case.  I think...
- */
-VFS_EXTERN rc_t CC VResolverCache ( const VResolver * self,
-    struct VPath const * url, struct VPath const ** path, uint64_t file_size );
-
-
-/* EnableState
- *  modifies how the various properties are interpreted
- */
-typedef uint32_t VResolverEnableState;
-enum
-{
-    vrUseConfig = 0,            /* take enable/disable state from KConfig */
-    vrAlwaysEnable = 1,         /* always enable, regardless of KConfig   */
-    vrAlwaysDisable = 2         /* always disable, regardless of KConfig  */
-};
-
-
-/* LocalEnable
- *  modify settings for using local repositories,
- *  meaning site, user-public and user-protected.
- *
- *  "enable" [ IN ] - enable or disable local access,
- *  or follow settings in KConfig
- *
- *  returns the previous state of "remote-enabled" property
- *
- * NB - in VDB-2, the state is associated with library code
- *  shared libraries in separate closures will have separate
- *  state. this can only occur if dynamic ( manual ) loading of
- *  shared libraries is used, and will not occur with normal
- *  usage. in VDB-3 the state will be stored with the process,
- *  not the library.
- */
-VFS_EXTERN VResolverEnableState CC VResolverLocalEnable ( const VResolver * self,
-    VResolverEnableState enable );
-
-
-/* RemoteEnable
- *  modify settings for using remote repositories
- *
- *  "enable" [ IN ] - enable or disable remote access,
- *  or follow settings in KConfig
- *
- *  returns the previous state of "remote-enabled" property
- *
- * NB - in VDB-2, the state is associated with library code
- *  shared libraries in separate closures will have separate
- *  state. this can only occur if dynamic ( manual ) loading of
- *  shared libraries is used, and will not occur with normal
- *  usage. in VDB-3 the state will be stored with the process,
- *  not the library.
- */
-VFS_EXTERN VResolverEnableState CC VResolverRemoteEnable ( const VResolver * self,
-    VResolverEnableState enable );
-
-
-/* CacheEnable
- *  modify settings for caching files in user repositories
- *
- *  "enable" [ IN ] - enable or disable user repository cache,
- *  or follow settings in KConfig
- *
- *  returns the previous state of "cache-enabled" property
- *
- * NB - in VDB-2, the state is associated with library code
- *  shared libraries in separate closures will have separate
- *  state. this can only occur if dynamic ( manual ) loading of
- *  shared libraries is used, and will not occur with normal
- *  usage. in VDB-3 the state will be stored with the process,
- *  not the library.
- */
-VFS_EXTERN VResolverEnableState CC VResolverCacheEnable ( const VResolver * self,
-    VResolverEnableState enable );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_vfs_resolver_ */
diff --git a/interfaces/xfs/doc.h b/interfaces/xfs/doc.h
deleted file mode 100644
index 745b32f..0000000
--- a/interfaces/xfs/doc.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _doc_h_
-#define _doc_h_
-
-#include <klib/refcount.h>
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*  Forwards and others
- */
-struct KRefcount;
-struct KFile;
-
-struct XFSDoc;
-union XFSDoc_vt;
-
-/******************************************************************
- * Another awkward structure which should represent memory buffer
- * with file interface. Will be used for implementing virtual files
- * like README.txt, etc ...
- * There are two general interfaces :
- *      XFSDoc - buffer
- *      XFSDocFile - file
- * Also, we are providing some generic TEXT Doc functionality
- ******************************************************************/
-
-/*))    Just a buffer interface and some methods
- ((*/
-struct XFSDoc_vt_v1 {
-        /* version for pension */
-    uint32_t maj;
-    uint32_t min;
-
-    rc_t ( CC * dispose ) ( struct XFSDoc * self );
-
-    rc_t ( CC * get ) ( const struct XFSDoc * self, const char ** B );
-    rc_t ( CC * size ) ( const struct XFSDoc * self, uint64_t * S ); 
-};
-
-union XFSDoc_vt {
-    struct XFSDoc_vt_v1 v1;
-};
-
-XFS_EXTERN rc_t CC XFSDocInit (
-                            const struct XFSDoc * self,
-                            const union XFSDoc_vt * VT
-                            );
-XFS_EXTERN rc_t CC XFSDocDispose (
-                            const struct XFSDoc * self
-                            );
-XFS_EXTERN rc_t CC XFSDocAddRef (
-                            const struct XFSDoc * self
-                            );
-XFS_EXTERN rc_t CC XFSDocRelease (
-                            const struct XFSDoc * self
-                            );
-XFS_EXTERN rc_t CC XFSDocGet (
-                            const struct XFSDoc * self,
-                            const char ** B
-                            );
-XFS_EXTERN rc_t CC XFSDocSize (
-                            const struct XFSDoc * self,
-                            uint64_t * Size
-                            );
-
-/*))    Just a file to make. Name is OK to be NULL
- ((*/
-XFS_EXTERN rc_t CC XFSDocFileMake (
-                            const char * Name,      /* Ok to be NULL */
-                            const struct XFSDoc * Doc,
-                            struct KFile ** File
-                            );
-
-/*))    Usefull TextDoc interface
- ((*/
-XFS_EXTERN rc_t CC XFSTextDocMake (
-                            struct XFSDoc ** TextDoc
-                            );
-XFS_EXTERN rc_t CC XFSTextDocAppend (
-                            struct XFSDoc * self,
-                            const char * Fmt,
-                            ...
-                            );
-XFS_EXTERN rc_t CC XFSTextDocVAppend (
-                            struct XFSDoc * self,
-                            const char * Fmt,
-                            va_list args
-                            );
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _doc_h_ */
diff --git a/interfaces/xfs/editors.h b/interfaces/xfs/editors.h
deleted file mode 100644
index b8092f2..0000000
--- a/interfaces/xfs/editors.h
+++ /dev/null
@@ -1,310 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _xfs_editors_h_
-#define _xfs_editors_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*))
- ||   Lyrics.
- ++   That file contains editor interfaces for XFSNode: File, Dir, Attr
- ||
-((*/
-
-/*)))
- ///   And other forwards.
-(((*/
-struct XFSHandle;
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))  Base editor for all types of editors
- ((*/
-struct XFSEditor {
-
-        /* Victim node for editor
-         */
-    const struct XFSNode * Node;
-
-        /* Data - some editor related data
-         */
-    void * Data;
-
-        /* Mandatary method to dispose editor
-         */
-    rc_t ( CC * dispose ) ( const struct XFSEditor * self );
-};
-
-XFS_EXTERN rc_t CC XFSEditorInit (
-                            const struct XFSEditor * self,
-                            const struct XFSNode * Node,
-                            rc_t ( CC * dispose )
-                                    ( const struct XFSEditor * self )
-                            );
-
-XFS_EXTERN rc_t CC XFSEditorDispose ( const struct XFSEditor * self );
-XFS_EXTERN const struct XFSNode * CC XFSEditorNode (
-                            const struct XFSEditor * self
-                            );
-XFS_EXTERN void * CC XFSEditorData ( const struct XFSEditor * self );
-XFS_EXTERN rc_t CC XFSEditorSetData (
-                            const struct XFSEditor * self,
-                            void * Data
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))   Editors, which are Dir, File and Attr
- ((*/
-
-/*)))
- (((    Directory editor, and relative methods
-  )))
- (((*/
-struct XFSDirEditor {
-    struct XFSEditor Papahen;
-
-    rc_t ( CC * list ) (
-                        const struct XFSDirEditor * self,
-                        const struct KNamelist ** List
-                        );
-    rc_t ( CC * find ) (
-                        const struct XFSDirEditor * self,
-                        const char * Name,
-                        const struct XFSNode ** Node
-                        );
-        /*) Creates and opens file with write access
-         (*/
-    rc_t ( CC * create_file ) (
-                        const struct XFSDirEditor * self,
-                        const char * Name,
-                        XFSNMode Mode,
-                        const struct XFSHandle ** Handle
-                        );
-        /*) Creates and directory no mode or access involved
-         (*/
-    rc_t ( CC * create_dir ) (
-                        const struct XFSDirEditor * self,
-                        const char * Name
-                        );
-        /*) Deletes both file or directory
-         (*/
-    rc_t ( CC * delete ) (
-                        const struct XFSDirEditor * self,
-                        const char * Name
-                        );
-        /*) Move is always happens within filesystem
-         (*/
-    rc_t ( CC * move ) (
-                        const struct XFSDirEditor * self,
-                        const char * OldName,
-                        const struct XFSNode * NewDir,
-                        const char * NewName
-                        );
-};
-
-XFS_EXTERN rc_t CC XFSDirEditorList (
-                                const struct XFSDirEditor * self,
-                                const struct KNamelist ** List
-                                );
-XFS_EXTERN rc_t CC XFSDirEditorFind (
-                                const struct XFSDirEditor * self,
-                                const char * Name,
-                                const struct XFSNode ** Node
-                                );
-XFS_EXTERN rc_t CC XFSDirEditorCreate (
-                                const struct XFSDirEditor * self,
-                                const char * Name,
-                                XFSNMode Mode,
-                                const struct XFSHandle ** Handle
-                                );
-XFS_EXTERN rc_t CC XFSDirEditorCreateDir (
-                                const struct XFSDirEditor * self,
-                                const char * Name
-                                );
-XFS_EXTERN rc_t CC XFSDirEditorDelete (
-                                const struct XFSDirEditor * self,
-                                const char * Name
-                                );
-XFS_EXTERN rc_t CC XFSDirEditorMove (
-                                const struct XFSDirEditor * self,
-                                const char * OldName,
-                                const struct XFSNode * NewDir,
-                                const char * NewName
-                                );
-
-/*)))
- (((    File editor, and relative methods
-  )))
- (((*/
-struct XFSFileEditor {
-    struct XFSEditor Papahen;
-
-    rc_t ( CC * open ) (
-                    const struct XFSFileEditor * self,
-                    XFSNMode Mode
-                    );
-
-    rc_t ( CC * close ) (
-                    const struct XFSFileEditor * self
-                    );
-
-    rc_t ( CC * read ) (
-                    const struct XFSFileEditor * self,
-                    uint64_t Offset,
-                    void * Buffer,
-                    size_t SizeToRead,
-                    size_t * NumReaded
-                    );
-
-    rc_t ( CC * write ) (
-                    const struct XFSFileEditor * self,
-                    uint64_t Offset,
-                    const void * Buffer,
-                    size_t SizeToWrite,
-                    size_t * NumWritten
-                    );
-
-    rc_t ( CC * size ) (
-                    const struct XFSFileEditor * self,
-                    uint64_t * Size
-                    );
-    rc_t ( CC * set_size ) (
-                    const struct XFSFileEditor * self,
-                    uint64_t Size
-                    );
-
-};
-
-XFS_EXTERN rc_t CC XFSFileEditorOpen (
-                                const struct XFSFileEditor * self,
-                                XFSNMode Mode
-                                );
-
-XFS_EXTERN rc_t CC XFSFileEditorClose (
-                                const struct XFSFileEditor * self
-                                );
-
-XFS_EXTERN rc_t CC XFSFileEditorRead (
-                                const struct XFSFileEditor * self,
-                                uint64_t Offset,
-                                void * Buffer,
-                                size_t SizeToRead,
-                                size_t * NumReaded
-                                );
-
-XFS_EXTERN rc_t CC XFSFileEditorWrite (
-                                const struct XFSFileEditor * self,
-                                uint64_t Offset,
-                                const void * Buffer,
-                                size_t SizeToWrite,
-                                size_t * NumWritten
-                                );
-
-XFS_EXTERN rc_t CC XFSFileEditorSize (
-                                    const struct XFSFileEditor * self,
-                                    uint64_t * Size
-                                    );
-
-XFS_EXTERN rc_t CC XFSFileEditorSetSize (
-                                    const struct XFSFileEditor * self,
-                                    uint64_t Size
-                                    );
-
-/*)))
- (((    Attribute editor, and relative methods
-  )))
- (((*/
-
-struct XFSAttrEditor {
-    struct XFSEditor Papahen;
-
-    rc_t ( CC * permissions ) (
-                    const struct XFSAttrEditor * self,
-                    const char ** Permissions
-                    );
-    rc_t ( CC * set_permissions ) (
-                    const struct XFSAttrEditor * self,
-                    const char * Permissions
-                    );
-
-    rc_t ( CC * date ) (
-                    const struct XFSAttrEditor * self,
-                    KTime_t * Time
-                    );
-    rc_t ( CC * set_date ) (
-                    const struct XFSAttrEditor * self,
-                    KTime_t Time
-                    );
-
-    rc_t ( CC * type ) (
-                    const struct XFSAttrEditor * self,
-                    XFSNType * Type
-                    );
-};
-
-XFS_EXTERN rc_t CC XFSAttrEditorPermissions (
-                                    const struct XFSAttrEditor * self,
-                                    const char ** Permissions
-                                    );
-
-XFS_EXTERN rc_t CC XFSAttrEditorDate (
-                                    const struct XFSAttrEditor * self,
-                                    KTime_t * Time
-                                    );
-
-XFS_EXTERN rc_t CC XFSAttrEditorType (
-                                    const struct XFSAttrEditor * self,
-                                    XFSNType * Type
-                                    );
-
-XFS_EXTERN rc_t CC XFSAttrEditorSetPermissions (
-                                    const struct XFSAttrEditor * self,
-                                    const char * Permissions
-                                    );
-
-XFS_EXTERN rc_t CC XFSAttrEditorSetDate (
-                                    const struct XFSAttrEditor * self,
-                                    KTime_t Time
-                                    );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _xfs_editors_h_ */
diff --git a/interfaces/xfs/extern.h b/interfaces/xfs/extern.h
deleted file mode 100644
index fc23112..0000000
--- a/interfaces/xfs/extern.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
- /* Like a monkey in a fish bowl */
-
-#ifndef _h_xfs_extern_
-#define _h_xfs_extern_
-
-#if defined _LIBRARY
- #define XFS_EXTERN LIB_EXPORT
- #define XFS_EXTERN_DATA extern LIB_EXPORT
-
-  #if ! defined EXPORT_LATCH
-  #define EXPORT_LATCH 1
-  #endif /* EXPORT_LATCH */
-#else
- #define XFS_EXTERN LIB_IMPORT
-#endif /* _LIBRARY */
-
- #ifndef _h_klib_extern_
- #include <klib/extern.h>
- #endif
-
- #endif /* _h_xfs_extern_ */
-
diff --git a/interfaces/xfs/handle.h b/interfaces/xfs/handle.h
deleted file mode 100644
index 15ae5ad..0000000
--- a/interfaces/xfs/handle.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _handle_h_
-#define _handle_h_
-
-#include <klib/refcount.h>
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*  Forwards and others
- */
-struct XFSNode;
-struct XFSHandle;
-
-/******************************************************************
- * Very awkward structure which need to be reimplemented
- * To avoid such things like getting list of files under Windows
- * which looks like :
- *    Handle = CreateFile ( file_name, open_existing, other_flags );
- *    GetFileInformation ( Handle, FILEINFO );
- *    FindFiles ( Handle );
- * Apparently it need to keep referrenced Node, and last file handle
- * for XFSFileEditor, which is only used to read/write data.
- * All other editors suppose to work on-place only
- ******************************************************************/
-XFS_EXTERN rc_t CC XFSHandleMake (
-                            const struct XFSNode * Node,
-                            const struct XFSHandle ** Handle
-                            );
-
-/*))
- // Here we are deleting Handle
-((*/
-XFS_EXTERN rc_t CC XFSHandleDestroy (
-                            const struct XFSHandle * self
-                            );
-
-/*))
- // This method will add referrence to XFSHandle
-((*/
-XFS_EXTERN rc_t CC XFSHandleAddRef (
-                            const struct XFSHandle * self
-                            );
-
-/*))
- // This method will release referrence or destroy XFSHandle
-((*/
-XFS_EXTERN rc_t CC XFSHandleRelease (
-                            const struct XFSHandle * self
-                            );
-
-/*))
- // That method will return handle on hanlde
-((*/
-XFS_EXTERN void * CC XFSHandleGet (
-                            const struct XFSHandle * self
-                            );
-
-/*))
- // That method will set handle on handle
-((*/
-XFS_EXTERN rc_t CC XFSHandleSet (
-                            const struct XFSHandle * self,
-                            void * Handle
-                            );
-
-/*))
- // That method will return node for handle
-((*/
-XFS_EXTERN const struct XFSNode * CC XFSHandleNode (
-                            const struct XFSHandle * self
-                            );
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _handle_h_ */
diff --git a/interfaces/xfs/model.h b/interfaces/xfs/model.h
deleted file mode 100644
index 809ce56..0000000
--- a/interfaces/xfs/model.h
+++ /dev/null
@@ -1,248 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _xfs_model_h_
-#define _xfs_model_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*))
- ||   Lyrics.
- ++   That file contains interfaces for model which contains formal
- ||   description for XFS Tree.
-((*/
-
-/*)))
- ///   XFSModel and other forwards.
-(((*/
-struct XFSModel;
-struct XFSModelNode;
-struct KNamelist;
-
-/*))    Common name defines for model property names
- ((*/
-#define XFS_MODEL_ROOT      "root"       /* the only mandatory node
-                                            to have */
-#define XFS_MODEL_AS        "as"         /* use this node as template
-                                            overridden properties */
-#define XFS_MODEL_TYPE      "type"       /* mandatory, used for tree
-                                            rendering */
-#define XFS_MODEL_LABEL     "label"      /* name which will be used at
-                                            rendered tree, could be
-                                            overriden by alias */
-#define XFS_MODEL_SECURITY  "security"   /* in real life those are
-                                            permissions */
-#define XFS_MODEL_CHILDREN  "children"   /* usually any container, it
-                                            is list of names of children
-                                            with labels */
-
-#define XFS_MODEL_SOURCE    "source"
-#define XFS_MODEL_TEXT      "text"
-#define XFS_MODEL_PASSWD    "password"
-#define XFS_MODEL_ENCTYPE   "enctype"
-#define XFS_MODEL_MODE      "mode"
-#define XFS_MODEL_MODE_RO   "RO"
-#define XFS_MODEL_MODE_RW   "RW"
-#define XFS_MODEL_PROJECTID "project-id"
-#define XFS_MODEL_OBJECTID  "object-id"
-#define XFS_MODEL_ACCESSION "accession"
-
-/*)))
- ///   Methods
-(((*/
-XFS_EXTERN
-const char * CC
-XFSModelNodeName ( const struct XFSModelNode * self );
-
-XFS_EXTERN
-const char * CC
-XFSModelNodeType ( const struct XFSModelNode * self );
-
-XFS_EXTERN
-bool CC
-XFSModelNodeReadOnly ( const struct XFSModelNode * self );
-
-XFS_EXTERN
-const char * CC
-XFSModelNodeAs ( const struct XFSModelNode * self );
-
-XFS_EXTERN
-const char * CC
-XFSModelNodeLabel ( const struct XFSModelNode * self );
-
-XFS_EXTERN
-const char * CC
-XFSModelNodeSecurity ( const struct XFSModelNode * self );
-
-XFS_EXTERN
-bool CC
-XFSModelNodeIsRoot ( const struct XFSModelNode * self );
-
-XFS_EXTERN
-rc_t CC
-XFSModelNodePropertyNames (
-                    const struct XFSModelNode * self,
-                    const struct KNamelist ** Properties
-                    );
-
-XFS_EXTERN
-const char * CC
-XFSModelNodeProperty (
-                    const struct XFSModelNode * self,
-                    const char * PropertyName
-                    );
-
-XFS_EXTERN
-rc_t CC
-XFSModelNodeChildrenNames (
-                    const struct XFSModelNode * self,
-                    const struct KNamelist ** Children
-                    );
-
-XFS_EXTERN
-const char * CC
-XFSModelNodeChildAlias (
-                    const struct XFSModelNode * self,
-                    const char * ChildName
-                    );
-
-XFS_EXTERN
-rc_t CC
-XFSModelMake (
-            struct XFSModel ** Model,
-            const char * Resource,      /* OK to be NULL */
-            const char * Version        /* OK to be NULL */
-            );
-
-XFS_EXTERN
-rc_t CC
-XFSModelDispose ( struct XFSModel * self );
-
-XFS_EXTERN
-rc_t CC
-XFSModelAddRef ( const struct XFSModel * self );
-
-XFS_EXTERN
-rc_t CC
-XFSModelRelease ( const struct XFSModel * self );
-
-XFS_EXTERN
-const struct XFSModelNode * CC
-XFSModelRootNode ( const struct XFSModel * self );
-
-XFS_EXTERN
-const struct XFSModelNode * CC
-XFSModelLookupNode ( const struct XFSModel * self, const char * Name );
-
-XFS_EXTERN
-const char * CC
-XFSModelResource ( const struct XFSModel * self );
-
-XFS_EXTERN
-const char * CC
-XFSModelVersion ( const struct XFSModel * self );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* Model Editing methods                                             */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-XFS_EXTERN
-rc_t CC
-XFSModelFromScratch (
-            struct XFSModel ** Model,
-            const char * Version
-            );
-
-XFS_EXTERN
-rc_t CC
-XFSModelAddNode (
-            struct XFSModel * self,
-            const char * NodeName,  /* not null */
-            const char * Type       /* not null */
-            );
-
-XFS_EXTERN
-rc_t CC
-XFSModelAddRootNode (
-            struct XFSModel * self,
-            const char * Type       /* not null */
-            );
-
-XFS_EXTERN
-rc_t CC
-XFSModelNodeSetProperty (
-            struct XFSModelNode * self,
-            const char * Key,       /* not null */
-            const char * Value      /* could be null */
-            );
-
-XFS_EXTERN
-rc_t CC
-XFSModelNodeSetLabel (
-            struct XFSModelNode * self,
-            const char * Label      /* could be null */
-            );
-
-XFS_EXTERN
-rc_t CC
-XFSModelNodeSetSecurity (
-            struct XFSModelNode * self,
-            const char * Security   /* could be null */
-            );
-
-XFS_EXTERN
-rc_t CC
-XFSModelNodeSetSource (
-            struct XFSModelNode * self,
-            const char * Source     /* could be null */
-            );
-
-XFS_EXTERN
-rc_t CC
-XFSModelNodeSetChildren (
-            struct XFSModelNode * self,
-            const char * CommaSeparChildrenNames    /* could be null */
-            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-XFS_EXTERN
-void CC
-XFSModelNodeDDump ( const struct XFSModelNode * self );
-
-XFS_EXTERN
-void CC
-XFSModelDDump ( const struct XFSModel * self );
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _xfs_model_h_ */
diff --git a/interfaces/xfs/node.h b/interfaces/xfs/node.h
deleted file mode 100644
index b2324f9..0000000
--- a/interfaces/xfs/node.h
+++ /dev/null
@@ -1,217 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _xfs_node_h_
-#define _xfs_node_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*))
- ||   Lyrics.
- ++   That file contains interfaces for XFS Tree
- ||
-((*/
-
-/*)))
- ///   XFSModel and other forwards.
-(((*/
-struct XFSTree;
-struct XFSNode;
-struct XFSModel;
-struct XFSPath;
-struct KRefcount;
-
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))   Node itself
- ((*/
-union XFSNode_vt;
-
-struct XFSDirEditor;
-struct XFSFileEditor;
-struct XFSAttrEditor;
-
-struct XFSNode {
-    const union XFSNode_vt * vt;
-
-    KRefcount refcount;
-
-    char * Name;
-};
-
-struct XFSNode_vt_v1 {
-        /* version, as is */
-    uint32_t maj;
-    uint32_t min;
-
-        /* needed for authomatic node recognition */
-    uint32_t ( CC * flavor ) ( const struct XFSNode * self );
-
-        /* needed for authomatic node dipsosal */
-    rc_t ( CC * dispose ) ( const struct XFSNode * self );
-
-        /* will return node for path */
-    rc_t ( CC * findnode ) (
-                    const struct XFSNode * self, 
-                    const struct XFSPath * Path,
-                    uint32_t PathIndex,
-                    const struct XFSNode ** Node
-                    );
-
-        /* returns interface to node as a directory, if exists */
-    rc_t ( CC * dir ) (
-                    const struct XFSNode * self,
-                    const struct XFSDirEditor ** Dir
-                    );
-
-        /* returns interface to node as a file, if exists */
-    rc_t ( CC * file ) (
-                    const struct XFSNode * self,
-                    const struct XFSFileEditor ** File
-                    );
-
-        /* returns interface which allows access node attributes */
-    rc_t ( CC * attr ) (
-                    const struct XFSNode * self,
-                    const struct XFSAttrEditor ** Attr
-                    );
-
-        /* quite stupid method which will print some info about node */
-    rc_t ( CC * describe ) (
-                    const struct XFSNode * self,
-                    char * Buffer,
-                    size_t BufferSize
-                    );
-};
-
-union XFSNode_vt {
-    struct XFSNode_vt_v1 v1;
-};
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-XFS_EXTERN rc_t CC XFSNodeInit (
-                            const struct XFSNode * self,
-                            const char * NodeName
-                            );
-
-XFS_EXTERN rc_t CC XFSNodeInitVT (
-                            const struct XFSNode * self,
-                            const char * NodeName,
-                            const union XFSNode_vt * VT /*  Could be
-                                                            NULL */
-                            );
-
-XFS_EXTERN rc_t CC XFSNodeMake (
-                            const struct XFSModel * ModelNode,
-                            const char * NodeName,
-                            const char * NameAlias,   /* NULL is OK */
-                            const struct XFSNode ** Node
-                            );
-
-XFS_EXTERN rc_t CC XFSNodeDispose ( const struct XFSNode * self );
-
-XFS_EXTERN rc_t CC XFSNodeAddRef ( const struct XFSNode * self );
-
-XFS_EXTERN rc_t CC XFSNodeRelease ( const struct XFSNode * self );
-
-XFS_EXTERN rc_t CC XFSNodeFindNode (
-                            const struct XFSNode * self, 
-                            const struct XFSPath * Path,
-                            uint32_t PathIndex,
-                            const struct XFSNode ** Node
-                            );
-
-    /*  That method checks values and inits useful variables
-     */
-XFS_EXTERN rc_t CC XFSNodeFindNodeCheckInitStandard (
-                            const struct XFSNode * self, 
-                            const struct XFSPath * Path,
-                            uint32_t PathIndex,
-                            const struct XFSNode ** Node,
-                            const char ** NodeName,
-                            uint32_t * PathCount,
-                            bool * IsLast
-                            );
-
-        /* returns interface to node as a directory, if exists */
-XFS_EXTERN rc_t CC XFSNodeDirEditor (
-                            const struct XFSNode * self,
-                            const struct XFSDirEditor ** Dir
-                            );
-
-        /* returns interface to node as a file, if exists */
-XFS_EXTERN rc_t CC XFSNodeFileEditor (
-                            const struct XFSNode * self,
-                            const struct XFSFileEditor ** File
-                            );
-
-        /* returns interface which allows access node attributes */
-XFS_EXTERN rc_t CC XFSNodeAttrEditor (
-                            const struct XFSNode * self,
-                            const struct XFSAttrEditor ** Attr
-                            );
-
-        /* describes node content */
-XFS_EXTERN rc_t CC XFSNodeDescribe (
-                                const struct XFSNode * self,
-                                char * Buffer,
-                                size_t BufferSize
-                                );
-
-XFS_EXTERN rc_t CC XFSNodeDump ( const struct XFSNode * self );
-
-XFS_EXTERN const char * CC XFSNodeName ( const struct XFSNode * self );
-
-XFS_EXTERN uint32_t CC XFSNodeFlavor ( const struct XFSNode * self );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-    /*)))   Way to make special Bogus nodes
-     (((*/
-XFS_EXTERN rc_t CC XFSNodeNotFoundMake (
-                            const char * NodeName,
-                            const struct XFSNode ** Node
-                            );
-
-XFS_EXTERN rc_t CC XFSNodeBadPathMake (
-                            const char * NodeName,
-                            const struct XFSNode ** Node
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _xfs_node_h_ */
diff --git a/interfaces/xfs/path.h b/interfaces/xfs/path.h
deleted file mode 100644
index 3e93983..0000000
--- a/interfaces/xfs/path.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _path_h_
-#define _path_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   another and hope more successifull attempt to create
-  ))))  good usable interface to a Path
- ((((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))  Universal method which should load config from resource
- ((*/
-
-struct XFSPath;
-
-XFS_EXTERN rc_t CC XFSPathMake (
-                                const struct XFSPath ** Out,
-                                bool AddPrecedingSlash,
-                                const char * Format,
-                                ...
-                                );
-
-XFS_EXTERN rc_t CC XFSPathVMake (
-                                const struct XFSPath ** Out,
-                                bool AddPrecedingSlash,
-                                const char * Format,
-                                va_list Args
-                                );
-
-    /*)) These two methods are requireing KDirectory,
-     //  and I am not sure if those should be here ... later
-    ((*/
-XFS_EXTERN rc_t CC XFSPathMakeAbsolute (
-                                const struct XFSPath ** Out,
-                                bool AddPrecedingSlash,
-                                const char * Format,
-                                ...
-                                );
-
-XFS_EXTERN rc_t CC XFSPathVMakeAbsolute (
-                                const struct XFSPath ** Out,
-                                bool AddPrecedingSlash,
-                                const char * Format,
-                                va_list Args
-                                );
-
-XFS_EXTERN rc_t CC XFSPathDup (
-                                const struct XFSPath * In,
-                                const struct XFSPath ** Out
-                                );
-
-XFS_EXTERN rc_t CC XFSPathAddRef ( const struct XFSPath * self );
-XFS_EXTERN rc_t CC XFSPathRelease ( const struct XFSPath * self );
-
-
-XFS_EXTERN rc_t CC XFSPathSet (
-                                const struct XFSPath * self,
-                                bool AddPrecedingSlash,
-                                const char * Format,
-                                ...
-                                );
-XFS_EXTERN rc_t CC XFSPathSetPath (
-                                const struct XFSPath * self,
-                                const struct XFSPath * Path
-                                );
-XFS_EXTERN rc_t CC XFSPathAppend (
-                                const struct XFSPath * self,
-                                const char * Format,
-                                ...
-                                );
-XFS_EXTERN rc_t CC XFSPathAppendPath (
-                                const struct XFSPath * self,
-                                const struct XFSPath * Path
-                                );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-XFS_EXTERN bool CC XFSPathIsAbsolute (
-                                const struct XFSPath * self
-                                );
-
-XFS_EXTERN uint32_t CC XFSPathPartCount (
-                                const struct XFSPath * self
-                                );
-
-XFS_EXTERN const char * CC XFSPathPartGet (
-                                const struct XFSPath * self,
-                                uint32_t Index
-                                );
-
-XFS_EXTERN const char * CC XFSPathGet (
-                                const struct XFSPath * self
-                                );
-
-XFS_EXTERN const char * CC XFSPathOrig (
-                                const struct XFSPath * self
-                                );
-
-XFS_EXTERN rc_t CC XFSPathParent (
-                                const struct XFSPath * self,
-                                const struct XFSPath ** Parent
-                            );
-
-    /*) Don'd frorget to free Name after calling */
-XFS_EXTERN const char *  CC XFSPathName (
-                                const struct XFSPath * self
-                                );
-
-
-XFS_EXTERN bool CC XFSPathEqual (
-                                const struct XFSPath * Path1,
-                                const struct XFSPath * Path2
-                                );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-    /*) These methods will allow to compose part of the path.
-      | NOTE: there are two positions : From - inclusive, and To -
-      |       exclusive
-      | NOTE: these methods will allocate string, and caller should
-      |       free it.
-      (*/
-XFS_EXTERN rc_t CC XFSPathSub (
-                            const struct XFSPath * self,
-                            size_t From,
-                            size_t To,
-                            const struct XFSPath ** Path
-                            );
-
-XFS_EXTERN rc_t CC XFSPathFrom (
-                            const struct XFSPath * self,
-                            size_t From,
-                            const struct XFSPath ** Path
-                            );
-
-XFS_EXTERN rc_t CC XFSPathTo (
-                            const struct XFSPath * self,
-                            size_t To,
-                            const struct XFSPath ** Path
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-    /*) That method will check if Path is base path for 'self'. i.e.
-      | self could be composed as concatenation of Path and RelPath
-      | RelPath could be zero, in that case it will be not returned
-      (*/
-XFS_EXTERN bool CC XFSPathIsBase (
-                                const struct XFSPath * self,
-                                const struct XFSPath * Path,
-                                const struct XFSPath ** RelPath
-                                );
-XFS_EXTERN bool CC XFSPathSIsBase (
-                                const char * self,
-                                const char * Path,
-                                const struct XFSPath ** RelPath
-                                );
-
-    /*) That method will check if Path is child ( sub ) path for 'self'.
-      | i.e. Path could be composed as concatenation of self and RelPath
-      | RelPath could be zero, in that case it will be not returned
-      (*/
-XFS_EXTERN bool CC XFSPathIsChild (
-                                const struct XFSPath * self,
-                                const struct XFSPath * Path,
-                                const struct XFSPath ** RelPath
-                                );
-XFS_EXTERN bool CC XFSPathSIsChild (
-                                const char * self,
-                                const char * Path,
-                                const struct XFSPath ** RelPath
-                                );
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-XFS_EXTERN void CC XFSPathDump ( const struct XFSPath * self );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _path_h_ */
diff --git a/interfaces/xfs/perm.h b/interfaces/xfs/perm.h
deleted file mode 100644
index c8d24bb..0000000
--- a/interfaces/xfs/perm.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _perm_h_
-#define _perm_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*))
- ||   Lyrics: XFSPerm - permissions for filesystem objects
- ||
- ||   The permissions are stored as string in format :
- ||
- ||         rwxrwxrwx[ user[:group[:other]]]
- ||         oooggguuu
- ||
- ||   Where first mandatary part is standard unix permissions string,
- ||   and first three characters are read-write-execute permitions for
- ||   others, second three characters are read-write-execute permissions
- ||   for group, and third three characters are read-write-execute
- ||   permissions for user. The rest of a string is a triplet for
- ||   of names for 'user', 'group' and 'other' ( which is for windows )
- ||
- ||   BTW that primitive is storeing data in char format, no gid or uid
- ||   because it should work well on different platforms. The final 
- ||   transformation to native format will be implemented on each 
- ||   platform.
- ||
- ||   So, righot now there is XFSPerm structure, which contains three
- ||   XFSAuth structures which represents user/group/other
- ||
-((*/
-
-/*)))
- ///   And other forwards.
-(((*/
-
-struct XFSPerm;
-struct XFSAuth;
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))   XFSPerm make/dispose
- ((*/
-
-/*))
- //    Currently used types
-(*/
-
-/*))
- //    Parses permission string and makes XFSPerm 
-(*/
-XFS_EXTERN rc_t CC XFSPermMake (
-                            const char * PermAsString,
-                            const struct XFSPerm ** Permissions
-                            );
-
-/*))
- //    Disposes XFSPerm
-(*/
-XFS_EXTERN rc_t CC XFSPermDispose (
-                            const struct XFSPerm * self
-                            );
-
-/*))
- //    Returns Authority by it's type
-(*/
-XFS_EXTERN const struct XFSAuth * CC XFSPermAuth (
-                            const struct XFSPerm * self,
-                            XFSAType Type
-                            );
-
-
-/*))
- //    Generates string which represents XFSPerm object
-(*/
-XFS_EXTERN rc_t CC XFSPermToString (
-                            const struct XFSPerm * self,
-                            char * Buffer,
-                            size_t BufferSize
-                            );
-
-/*))
- //    Some defaults Don't yet know for what ... to make configurable ?
-((*/
-XFS_EXTERN const char * CC XFSPermDefaultName ( XFSAType Type );
-XFS_EXTERN rc_t CC XFSPermSetDefaultName (
-                            XFSAType Type,
-                            const char * Name
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))   XFSAuth
- ((*/
-
-/*))
- //     Returns name of authority, which could be defaulted
-((*/
-XFS_EXTERN const char * CC XFSAuthName ( const struct XFSAuth * self );
-
-/*))
- //     These three methods will return permissions for authority
-((*/
-XFS_EXTERN bool CC XFSAuthCanRead ( const struct XFSAuth * self );
-XFS_EXTERN bool CC XFSAuthCanWrite ( const struct XFSAuth * self );
-XFS_EXTERN bool CC XFSAuthCanExecute ( const struct XFSAuth * self );
-
-/*))
- //     That method will convert XFSPerm to unix like access uint32_t
-((*/
-XFS_EXTERN rc_t CC XFSPermToNum (
-                                    const char * Perm,
-                                    uint32_t * Access
-                                    );
-
-XFS_EXTERN rc_t CC XFSPermToChar (
-                                    uint32_t Access,
-                                    char * Buf,
-                                    size_t BufSize
-                                    );
-
-/*))
- //     Some usefull defaults ... not sure
-((*/
-XFS_EXTERN const char * CC XFSPermRODefContChar ();
-XFS_EXTERN const char * CC XFSPermRODefNodeChar ();
-XFS_EXTERN uint32_t CC XFSPermRODefContNum ();
-XFS_EXTERN uint32_t CC XFSPermRODefNodeNum ();
-
-XFS_EXTERN const char * CC XFSPermRWDefContChar ();
-XFS_EXTERN const char * CC XFSPermRWDefNodeChar ();
-XFS_EXTERN uint32_t CC XFSPermRWDefContNum ();
-XFS_EXTERN uint32_t CC XFSPermRWDefNodeNum ();
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _perm_h_ */
diff --git a/interfaces/xfs/tree.h b/interfaces/xfs/tree.h
deleted file mode 100644
index 3a87e8c..0000000
--- a/interfaces/xfs/tree.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _xfs_tree_h_
-#define _xfs_tree_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*))
- ||   Lyrics.
- ++   That file contains interfaces for XFS Tree and TreeDepot
- ||
-((*/
-
-/*)))
- ///   XFSModel and other forwards.
-(((*/
-struct XFSTree;
-struct XFSTreeDepot;
-struct XFSNode;
-struct XFSModel;
-struct KNamelist;
-struct VPath;
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- ((    Really I will introduce separate TreeMake and Verify methods
-  ))   I think it is more convinient than checking model on Make stage
- ((*/
-
-/*))   Verification flags, here would be more then
- //    Will think about it later
-((*/
-#define XFS_CHECK_INTEGRITY      (1 << 0)
-#define XFS_CHECK_REMOTE_CONTENT (1 << 1)
-#define XFS_CHECK_LOOCAL_CONTENT (1 << 2)
-
-XFS_EXTERN
-rc_t CC
-XFSTreeVerifyModel ( const struct XFSModel * Model, uint32_t Flags );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-XFS_EXTERN
-rc_t CC
-XFSTreeMake ( const struct XFSModel * Model, struct XFSTree ** Tree );
-
-XFS_EXTERN
-rc_t CC
-XFSTreeDispose ( struct XFSTree * self );
-
-XFS_EXTERN
-rc_t CC
-XFSTreeAddRef ( const struct XFSTree * self );
-
-XFS_EXTERN
-rc_t CC
-XFSTreeRelease ( const struct XFSTree * self );
-
-XFS_EXTERN
-rc_t CC
-XFSTreeFindNode (
-                const struct XFSTree * self,
-                const char * Path,
-                const struct XFSNode ** Node
-                );
-
-XFS_EXTERN
-rc_t CC
-XFSTreeFindNodeForPath (
-                const struct XFSTree * self,
-                const struct VPath * Path,
-                const struct XFSNode ** Node
-                );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))))
- ((((   Lyrics. That is a place for storeing and retrieving current
-  ))))           version of tree, and it is almost thread safe :lol:
- ((((*/
-
-XFS_EXTERN
-rc_t CC
-XFSTreeDepotMake ( const struct XFSTreeDepot ** Depot );
-
-XFS_EXTERN
-rc_t CC
-XFSTreeDepotDispose ( const struct XFSTreeDepot * self );
-
-XFS_EXTERN
-rc_t CC
-XFSTreeDepotGet (
-            const struct XFSTreeDepot * self,
-            const struct XFSTree ** Tree
-            );
-
-XFS_EXTERN
-rc_t CC
-XFSTreeDepotSet (
-            const struct XFSTreeDepot * self,
-            const struct XFSTree * Tree
-            );
-
-XFS_EXTERN
-rc_t CC
-XFSTreeDepotVersion (
-                    const struct XFSTreeDepot * self,
-                    char * Buffer,
-                    size_t BufferSize
-                    );
-
-XFS_EXTERN
-rc_t CC
-XFSTreeDepotResource (
-                    const struct XFSTreeDepot * self,
-                    char * Buffer,
-                    size_t BufferSize
-                    );
-
-XFS_EXTERN
-rc_t CC
-XFSTreeDepotFindNode (
-                    const struct XFSTreeDepot * self,
-                    const char * Path,
-                    const struct XFSNode ** Node
-                    );
-
-XFS_EXTERN
-rc_t CC
-XFSTreeDepotFindNodeForPath (
-                    const struct XFSTreeDepot * self,
-                    const struct VPath * Path,
-                    const struct XFSNode ** Node
-                    );
-
-/* Enuff for today */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _xfs_tree_h_ */
diff --git a/interfaces/xfs/xfs-defs.h b/interfaces/xfs/xfs-defs.h
deleted file mode 100644
index 0b117b0..0000000
--- a/interfaces/xfs/xfs-defs.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_xfs_defs_
-#define _h_xfs_defs_
-
-#include <klib/rc.h>
-
-#ifndef _h_xfs_extern_
-#include <xfs/extern.h>
-#endif /* _h_xfs_extern_ */
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#define XFS_SIZE_8192       8192
-#define XFS_SIZE_4096       4096
-#define XFS_SIZE_2048       2048
-#define XFS_SIZE_1024       1024
-#define XFS_SIZE_512         512 
-#define XFS_SIZE_128         128 
-#define XFS_SIZE_64           64
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*  Another great masterpiece lol
- */
-#define XFS_RC(State)   RC(rcFS, rcNoTarg, rcProcessing, rcNoObj, State)
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-    /* Something to do :
-     *      XFS_CA   - XFS Check Arg
-     *      XFS_CAN  - XFS Check Arg Null
-     *      XFS_CSA  - XFS Check Set Arg
-     *      XFS_CSAN - XFS Check Set Arg Null
-     */
-
-#define XFS_CA(Var,Value)    if ( ( Var ) == Value ) { return XFS_RC ( rcInvalid ); }
-
-#define XFS_CAN(Var)         if ( ( Var ) == NULL ) { return XFS_RC ( rcNull ); }
-
-#define XFS_CSA(Var,Value)   if ( ( Var ) != NULL ) { * ( Var ) = Value; }
-
-#define XFS_CSAN(Var)        if ( ( Var ) != NULL ) { * ( Var ) = NULL; }
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*\
- *  That enum is used for opening files mode only. I'll put it here
-\*/
-typedef enum XFSNMode {
-    kxfsNone  = 00,
-    kxfsRead  = 01,
-    kxfsWrite = 02,
-    kxfsReadWrite = kxfsRead | kxfsWrite
-} XFSNMode;
-
-/*\
- *  All types of file XFS recognises as good standing
-\*/
-typedef enum XFSNType {
-    kxfsNotFound = 0,
-    kxfsBadPath,
-    kxfsFile,
-    kxfsDir,
-    kxfsLink
-} XFSNType;
-
-/*\
- *  All authority types recognised by XFS on good will
-\*/
-typedef enum XFSAType {
-    kxfsUser = 0,
-    kxfsGroup,
-    kxfsOther
-} XFSAType;
-
-/*\
- *  Wery useful enum used for describing state of object
-\*/
-typedef enum XFSStatus {
-    kxfsInvalid = 0,
-    kxfsReady,
-    kxfsComplete,
-    kxfsGood = kxfsComplete,    /* kinda Good and Complete are same */
-    kxfsBroken
-} XFSStatus;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* _h_xfs_defs_ */
diff --git a/interfaces/xfs/xfs.h b/interfaces/xfs/xfs.h
deleted file mode 100644
index 8ccb072..0000000
--- a/interfaces/xfs/xfs.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_xfs_
-#define _h_xfs_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*  Lyrics - that part should be used in client programs.
- *  There are no any data handling, just filesystem start and stop.
- *  Client should create instance of XFSControl structure by calling
- *  XFSControlMake method. File system will start and mounted by call
- *  XFSStart method. To stop filesystem, XFSStop method
- *  should be called, and mount should be destroyed by XFSControlDipsose
- *  method.
- *
- *  The typical scheme of usage is :
- *
- *      struct XFSModel * TheModel;
- *      struct XFSTree * TheTree;
- *      XFSControl TheControl;
- *      
- *      XFSModelMake ( & TheModel );
- *      XFSTreeMake ( Model, & TheTree );
- *      XFSControlMake ( TheTree, & TheControl );
- *          ... here some initialisation action, like arg settings
- *      XFSControlSetArg ( TheControl, Arg, Value );
- *      XFSStart ( TheControl, true/false );
- *          ... here some action
- *      XFSStop ( TheControl );
- *      XFSControlDispose ( TheControl );
- *      XFSPeerDestroyDummy(Peer);
- */
-
-/*  Struct XFSControl. Apparently need to have XFS arguments, which
- *  are different on Dokan and Fuse, and may be some handle
- */
-struct XFSControl;
-struct XFSTree;
-
-/*  Init/Destroy XFSControl structure
- */
-XFS_EXTERN rc_t CC XFSControlMake(
-                            const struct XFSTree * Tree,
-                            struct XFSControl ** Control
-                            );
-XFS_EXTERN rc_t CC XFSControlDispose( struct XFSControl * self );
-
-/*  Started filesystem, and creating mount point.
- */
-XFS_EXTERN rc_t CC XFSStart( struct XFSControl * self );
-/*  Unmount and stoping filesystem
- */
-XFS_EXTERN rc_t CC XFSStop( struct XFSControl * self ); 
-
-/*  Returns current XFSTree structure from control
- */
-XFS_EXTERN rc_t CC XFSControlGetTree (
-                                    struct XFSControl * self,
-                                    const struct XFSTree ** Tree
-                                    );
-
-/*  Very special platform specific metnod which allows to unmount
- *  Fuse/Dokan without calling external program
- */
-XFS_EXTERN rc_t CC XFSUnmountAndDestroy ( const char * MountPoint );
-
-/*  Control argumenting, not sure it will be left in the same way
-    These methods will not take affect after XFSStart
- */
-XFS_EXTERN rc_t CC XFSControlSetArg (
-                    struct XFSControl * self,
-                    const char * Arg,
-                    const char * Value
-                    );
-XFS_EXTERN const char * CC XFSControlGetArg (
-                    struct XFSControl * self,
-                    const char * Arg
-                    );
-XFS_EXTERN bool CC XFSControlHasArg (
-                    struct XFSControl * self,
-                    const char * Arg
-                    );
-
-XFS_EXTERN rc_t CC XFSControlSetAppName(
-                    struct XFSControl * self,
-                    const char * AppName
-                    );
-XFS_EXTERN const char * CC XFSControlGetAppName(
-                    struct XFSControl * self
-                    );
-
-XFS_EXTERN rc_t CC XFSControlSetMountPoint(
-                    struct XFSControl * self,
-                    const char * MountPoint
-                    );
-XFS_EXTERN const char * CC XFSControlGetMountPoint(
-                    struct XFSControl * self
-                    );
-
-/*  If You will call that method with LogFile = NULL, it will
-    redirect log to some undisclosured standard place.
- */
-XFS_EXTERN rc_t CC XFSControlSetLogFile (
-                    struct XFSControl * self,
-                    const char * LogFile
-                    );
-XFS_EXTERN const char * CC XFSControlGetLogFile (
-                    struct XFSControl * self
-                    );
-
-/*  By default it always run in foreground, but could be set once
- *  as a daemon at the begining of application ... and no way back.
- */
-XFS_EXTERN rc_t CC XFSControlDaemonize (
-                    struct XFSControl * self
-                    );
-XFS_EXTERN bool CC XFSControlIsDaemonize (
-                    struct XFSControl * self
-                    );
-
-/*  That method setup a label which will be shown in /etc/mtab entry
-    You may use NULL, and in that case label will be "XFS"
- */
-XFS_EXTERN rc_t CC XFSControlSetLabel(
-                    struct XFSControl * self,
-                    const char * Label
-                    );
-XFS_EXTERN const char * CC XFSControlGetLabel(
-                    struct XFSControl * self
-                    );
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* _h_xfs_ */
diff --git a/interfaces/xfs/xlog.h b/interfaces/xfs/xlog.h
deleted file mode 100644
index 3930a52..0000000
--- a/interfaces/xfs/xlog.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _xlog_h_
-#define _xlog_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*) Fowards, and others
- (*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))
- |||    Log init/dispose
-(((*/
-
-XFS_EXTERN rc_t CC XFSLogInit ( const char * LogFile );
-XFS_EXTERN rc_t CC XFSLogDestroy ( );
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _xlog_h_ */
diff --git a/libs/Makefile b/libs/Makefile
deleted file mode 100644
index 65e06d4..0000000
--- a/libs/Makefile
+++ /dev/null
@@ -1,89 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-by_default: default
-
-TOP ?= $(abspath ..)
-MODULE = libs
-
-include $(TOP)/build/Makefile.shell
-
-include $(TOP)/build/Makefile.config
-
-#-------------------------------------------------------------------------------
-# default
-#
-SUBDIRS =    \
-	ext      \
-	kfc      \
-	klib     \
-	kproc    \
-	kfs      \
-	kns      \
-	kfg      \
-	krypto   \
-	vfs      \
-	kapp     \
-	kdb      \
-	vdb      \
-	vxf      \
-	search   \
-	sraxf    \
-	align    \
-	axf      \
-	wgsxf    \
-	ktst     \
-	loader   \
-	blast    \
-	ascp     \
-	sra      \
-	ngs      \
-	ngs-c++  \
-	ngs-jni  \
-	ngs-py   \
-	kxml     \
-	hdf5     \
-	ncbi-vdb \
-	tui
-
-# common targets for non-leaf Makefiles; must follow a definition of SUBDIRS
-include $(TOP)/build/Makefile.targets
-
-$(SUBDIRS):
-	@ $(MAKE) -C $@
-	
-ncbi-vdb: $(patsubst ncbi-vdb,,$(SUBDIRS))	
-
-test:
-	@true
-    
-.PHONY: default $(SUBDIRS) test
-
-#-------------------------------------------------------------------------------
-# pass-through
-#
-out debug profile release GCC ICC VC++:
-	@ $(MAKE) TOP=$(TOP) -f $(TOP)/build/Makefile.env $@
-
-.PHONY: out debug profile release GCC ICC VC++
diff --git a/libs/align/.gitignore b/libs/align/.gitignore
deleted file mode 100644
index c253038..0000000
--- a/libs/align/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.def
diff --git a/libs/align/Makefile b/libs/align/Makefile
deleted file mode 100644
index 8351953..0000000
--- a/libs/align/Makefile
+++ /dev/null
@@ -1,163 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/align
-
-INT_LIBS = \
-	libncbi-bam \
-	libalign-writer \
-	libalign-access \
-	libalign-reader
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES =              \
-	$(BAM_OBJ)          \
-	$(ALIGN_ACCESS_OBJ) \
-	$(ALIGN_READER_OBJ) \
-	$(ALIGN_WRITER_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# libncbi-bam
-#
-$(ILIBDIR)/libncbi-bam: $(addprefix $(ILIBDIR)/libncbi-bam.,$(ILIBEXT))
-
-BAM_SRC = \
-	bam
-
-BAM_OBJ = \
-	$(addsuffix .$(LOBX),$(BAM_SRC))
-
-BAM_LIB = 
-
-$(ILIBDIR)/libncbi-bam.$(LIBX): $(BAM_OBJ)
-	$(LD) --slib -o $@ $^ $(BAM_LIB)
-
-
-#-------------------------------------------------------------------------------
-# align-access
-#
-$(ILIBDIR)/libalign-access: $(addprefix $(ILIBDIR)/libalign-access.,$(ILIBEXT))
-
-ALIGN_ACCESS_SRC = \
-	align-access
-
-ALIGN_ACCESS_OBJ = \
-	$(addsuffix .$(LOBX),$(ALIGN_ACCESS_SRC))
-
-ALIGN_ACCESS_LIB = 
-
-$(ILIBDIR)/libalign-access.$(LIBX): $(ALIGN_ACCESS_OBJ)
-	$(LD) --slib -o $@ $^ $(ALIGN_ACCESS_LIB)
-
-#-------------------------------------------------------------------------------
-# align-reader
-#
-$(ILIBDIR)/libalign-reader: $(addprefix $(ILIBDIR)/libalign-reader.,$(ILIBEXT))
-
-ALIGN_READER_SRC = \
-	align_mgr \
-	al_iterator \
-	ref_iterator \
-	pl_iterator \
-	dna-reverse-cmpl \
-	reference-cmn \
-	reader-cmn \
-	reader-refseq \
-	reader-wgs \
-	reference \
-	refseq-mgr \
-	quality-quantizer
-
-ALIGN_READER_OBJ = \
-	$(addsuffix .$(LOBX),$(ALIGN_READER_SRC))
-
-ALIGN_READER_LIB = 
-
-$(ILIBDIR)/libalign-reader.$(LIBX): $(ALIGN_READER_OBJ)
-	$(LD) --slib -o $@ $^ $(ALIGN_READER_LIB)
-
-#-------------------------------------------------------------------------------
-# align-writer
-#
-$(ILIBDIR)/libalign-writer: $(addprefix $(ILIBDIR)/libalign-writer.,$(LIBX))
-
-ALIGN_WRITER_SRC = \
-    dna-reverse-cmpl \
-	reader-cmn \
-	reference-cmn \
-	reader-refseq \
-	reader-wgs \
-	refseq-mgr \
-	writer-cmn \
-	writer-refseq \
-	writer-alignment \
-	writer-sequence \
-	writer-ref \
-	writer-reference
-
-ALIGN_WRITER_OBJ = \
-	$(addsuffix .$(LOBX),$(ALIGN_WRITER_SRC))
-
-ALIGN_WRITER_LIB = 
-
-$(ILIBDIR)/libalign-writer.$(LIBX): $(ALIGN_WRITER_OBJ)
-	$(LD) --slib -o $@ $^ $(ALIGN_WRITER_LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/align/al_iterator.c b/libs/align/al_iterator.c
deleted file mode 100644
index b4c8775..0000000
--- a/libs/align/al_iterator.c
+++ /dev/null
@@ -1,565 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <align/extern.h>
-
-#include <klib/rc.h>
-#include <klib/container.h>
-#include <klib/refcount.h>
-#include <klib/sort.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <insdc/insdc.h>
-#include <align/iterator.h>
-#include <align/manager.h>
-#include <vdb/cursor.h>
-#include <sysalloc.h>
-
-#include "debug.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-#define COL_READ "READ"
-#define COL_HAS_MISMATCH "HAS_MISMATCH"
-#define COL_HAS_REF_OFFSET "HAS_REF_OFFSET"
-#define COL_REF_OFFSET "REF_OFFSET"
-
-typedef struct pos_offset
-{
-    uint32_t pos;
-    int32_t offset;
-} pos_offset;
-
-
-struct AlignmentIterator
-{
-    struct AlignMgr const *amgr;   /* the alignment-manager... */
-
-    /* data to walk */
-    bool * has_mismatch;    /* copy of HAS_MISMATCH */
-    INSDC_4na_bin * read;   /* copy of READ */
-    uint32_t read_len;      /* length of READ */
-    uint32_t ref_len;       /* length of projection on reference */
-
-    INSDC_coord_zero ref_window_start;  /* where the requested window on the reference starts */
-    INSDC_coord_len  ref_window_len;    /* how long the requested window on the reference is */
-
-    pos_offset * pos_ofs;   /* computed by walking HAS_REF_OFFSET, REF_OFFSET ( method 1 ) */
-    uint32_t pos_ofs_idx;   /* current index into pos_ofs[] */
-    uint32_t pos_ofs_cnt;   /* how many pos_ofs-values are there */
-
-    int32_t abs_ref_start;  /* absolute reference-related start-position   */
-    int32_t rel_ref_pos;    /* relative reference-related position ( relative to start of sequence )  */
-    uint32_t seq_pos;       /* position on the sequence, as the reference sees it */
-    uint32_t skip;          /* how many bases to skip if we are in DELETE */
-    uint32_t flags;         /* flags it, when we are in INSERT/DELETE */
-    uint32_t inserts;       /* how many inserts */
-
-    KRefcount refcount;
-    bool free_on_whack;     /* true if allocated and allowing references */
-    uint8_t align [ 3 ];
-};
-
-
-/* forward decl. for private helper functions */
-static rc_t compute_posofs(  AlignmentIterator * self,
-    const bool * has_ref_offset,
-    const int32_t * ref_offset,
-    uint32_t ref_offset_len );
-
-static void al_iter_adjust_next( AlignmentIterator * self );
-
-LIB_EXPORT void CC AlignIteratorRecordDestroy ( void *obj, void *data )
-{
-    /* nothing to do, because there are no sub-allocations etc. ... */
-}
-
-
-static rc_t get_idx_and_read( struct VCursor const *curs,
-                              const char * name,
-                              int64_t row_id,
-                              const void ** base,
-                              uint32_t * len )
-{
-    uint32_t column_idx;
-    rc_t rc = VCursorGetColumnIdx ( curs, &column_idx, "%s", name );
-    if ( rc != 0 )
-        LOGERR( klogInt, rc, "VCursorGetColumnIdx() failed" );
-    else
-    {
-        uint32_t elem_bits, boff, len_intern;
-        const void * ptr;
-        rc = VCursorCellDataDirect ( curs, row_id, column_idx, 
-                                     &elem_bits, &ptr, &boff, &len_intern );
-        if ( rc != 0 )
-            LOGERR( klogInt, rc, "VCursorCellDataDirect() failed" );
-        else
-        {
-            assert( boff == 0 );
-            if ( len != NULL ) *len = len_intern;
-            if ( base != NULL ) *base = ptr;
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC AlignIteratorRecordPopulate ( void *obj,
-    const PlacementRecord *placement, struct VCursor const *curs, 
-    INSDC_coord_zero ref_window_start, INSDC_coord_len ref_window_len, void *data )
-{
-    /* read the data required to build a Alignment-Iterator,
-       then create the Alignment-Iterator into the already allocated memory */
-    const void * base;
-    const void * base_has_ref_offset;
-    const void * base_ref_offset;
-
-    INSDC_coord_len data_len;
-    uint32_t ref_offset_len;
-    rc_t rc;
-
-    AlignmentIterator *iter = ( AlignmentIterator * ) obj;
-    AlignMgr *almgr = ( AlignMgr * ) data;
-
-    uint8_t * ptr = ( void* ) iter;
-    ptr += ( sizeof *iter );
-
-    rc = get_idx_and_read( curs, COL_HAS_MISMATCH, placement->id, &base, &data_len );
-    if ( rc == 0 )
-    {
-        /* copy HAS_MISMATCH into place, point the header-value to it, advance */
-        memcpy( ptr, base, data_len );
-        iter->has_mismatch = (bool *)ptr;
-        ptr += data_len;
-    }
-
-    if ( rc == 0 )
-    {
-        rc = get_idx_and_read( curs, COL_READ, placement->id, &base, &data_len );
-        /* copy READ into place, point the header-value to it, advance */
-        if ( rc == 0 )
-        {
-            memcpy( ptr, base, data_len );
-            iter->read = ( INSDC_4na_bin * )ptr;
-            iter->read_len = data_len;
-            iter->abs_ref_start = placement->pos;
-            iter->ref_len = placement->len;
-            iter->rel_ref_pos = 0;
-            iter->seq_pos = 0;
-            ptr += data_len;
-            iter->pos_ofs = (pos_offset *)ptr;
-            iter->ref_window_start = ref_window_start;
-            iter->ref_window_len = ref_window_len;
-            iter->free_on_whack = false;
-        }
-    }
-
-    if ( rc == 0 )
-    {
-        rc = get_idx_and_read( curs, COL_HAS_REF_OFFSET, placement->id, &base_has_ref_offset, &data_len );
-    }
-    if ( rc == 0 )
-    {
-        rc = get_idx_and_read( curs, COL_REF_OFFSET, placement->id, &base_ref_offset, &ref_offset_len );
-    }
-    if ( rc == 0 )
-    {
-        rc = compute_posofs( iter,
-                             ( const bool * )base_has_ref_offset, 
-                             ( const int32_t * )base_ref_offset, 
-                             ref_offset_len );
-    }
-    if ( rc == 0 )
-    {
-        if ( iter->pos_ofs_idx == 0 )
-            al_iter_adjust_next( iter );
-        KRefcountInit( &iter->refcount, 1, "AlignmentIterator", "Make", "align" );
-        data_len = 0;
-        while( ( iter->abs_ref_start + iter->rel_ref_pos ) < ref_window_start && rc == 0 )
-        {
-            rc = AlignmentIteratorNext ( iter );
-            data_len++;
-        }
-    }
-    if ( rc == 0 )  {   rc = AlignMgrAddRef ( almgr );  }
-    if ( rc == 0 )  {   iter->amgr = almgr;  }
-
-/*
-    if ( rc == 0 )
-    {
-        OUTMSG(( "placement[%lu] at %u (w=%u) next(%u) \n", 
-                 placement->id, iter->abs_ref_start, ref_window_start, data_len ));
-    }
-*/
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC AlignIteratorRecordSize ( struct VCursor const *curs, int64_t row_id, size_t *size, void *data )
-{
-    uint32_t ref_offset_len, read_len;
-
-    rc_t rc = get_idx_and_read( curs, COL_REF_OFFSET, row_id, NULL, &ref_offset_len );
-    if ( rc == 0 )
-        rc = get_idx_and_read( curs, COL_READ, row_id, NULL, &read_len );
-
-    if ( rc == 0 )
-    {
-        AlignmentIterator * ali = NULL;
-        size_t po_size = ( ( sizeof *(ali->pos_ofs) ) * ( ref_offset_len ) );
-        *size = ( ( sizeof *ali ) + ( read_len * 2 ) + po_size );
-    }
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC AlignMgrMakeAlignmentIterator ( struct AlignMgr const *self,
-    AlignmentIterator **iter,
-    bool copy,
-    INSDC_coord_zero ref_pos,
-    INSDC_coord_len ref_len,
-    const INSDC_4na_bin *read,
-    INSDC_coord_len read_len,
-    const bool *has_mismatch,
-    const bool *has_ref_offset,
-    const int32_t *ref_offset,
-    uint32_t ref_offset_len,
-    INSDC_coord_zero ref_window_start,
-    INSDC_coord_len ref_window_len )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcAlign, rcIterator, rcConstructing, rcSelf, rcNull );
-    else
-    {
-        if ( iter == NULL || has_mismatch == NULL || has_ref_offset == NULL ||
-             read == NULL || read_len == 0 )
-            rc = RC( rcAlign, rcIterator, rcConstructing, rcParam, rcNull );
-        else
-        {
-            AlignmentIterator * ali = NULL;
-            size_t po_size = ( ( sizeof *(ali->pos_ofs) ) * ( ref_offset_len ) );
-            size_t full_size = ( sizeof *ali ) + ( read_len * 2 ) + po_size;
-      
-            uint8_t * ptr = calloc( full_size, 1 );
-            *iter = NULL;
-            if ( ptr == NULL )
-                rc = RC( rcAlign, rcIterator, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                ali = ( AlignmentIterator * )ptr;
-                ptr += ( sizeof *ali );
-
-                KRefcountInit( &ali->refcount, 1, "AlignmentIterator", "Make", "align" );
-
-                /* copy HAS_MISMATCH into place, point the header-value to it, advance */
-                memcpy( ptr, has_mismatch, read_len );
-                ali->has_mismatch = (bool *)ptr;
-                ptr += read_len;
-
-                /* copy READ into place, point the header-value to it, advance */
-                memcpy( ptr, read, read_len );
-                ali->read = ( INSDC_4na_bin * )ptr;
-                ptr += read_len;
-
-                ali->read_len = read_len;
-                ali->ref_len = ref_len;
-                ali->abs_ref_start = ref_pos;
-                ali->pos_ofs = (pos_offset *)ptr;
-                ali->ref_window_start = ref_window_start;
-                ali->ref_window_len = ref_window_len;
-                ali->free_on_whack = true;
-
-                rc = compute_posofs( ali, has_ref_offset, ref_offset, ref_offset_len );
-                if ( ali->pos_ofs_idx == 0 )
-                    al_iter_adjust_next( ali );
-
-                if ( rc == 0 )
-                {
-                    rc = AlignMgrAddRef ( self );
-                    if ( rc == 0 )
-                        ali->amgr = self;
-                }
-            }
-
-            if ( rc == 0 )
-                *iter = ali;
-            else
-                free( ali );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC AlignmentIteratorAddRef( const AlignmentIterator * cself )
-{
-    rc_t rc = 0;
-    if ( cself == NULL )
-        rc = RC( rcAlign, rcIterator, rcAttaching, rcSelf, rcNull );
-    else
-    {
-        if ( KRefcountAdd( &cself->refcount, "AlignmentIterator" ) != krefOkay )
-        {
-            rc = RC( rcAlign, rcIterator, rcAttaching, rcError, rcUnexpected );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC AlignmentIteratorRelease( const AlignmentIterator * cself )
-{
-    rc_t rc = 0;
-    if ( cself == NULL )
-        rc = RC( rcAlign, rcIterator, rcReleasing, rcSelf, rcNull );
-    else
-    {
-        if ( KRefcountDrop( &cself->refcount, "AlignmentIterator" ) == krefWhack )
-        {
-            AlignmentIterator * self = ( AlignmentIterator * ) cself;
-            AlignMgrRelease ( self->amgr );
-            if ( self->free_on_whack )
-                free( self );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC AlignmentIteratorNext ( AlignmentIterator *self )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcAlign, rcIterator, rcPositioning, rcSelf, rcNull );
-    else
-    {
-        self->flags = 0;
-        self->rel_ref_pos++;
-
-        if ( self->rel_ref_pos >= self->ref_len )
-            rc = SILENT_RC( rcAlign, rcIterator, rcPositioning, rcItem, rcDone );
-        else
-        {
-            if ( self->skip > 0 )
-            {
-                self->flags |=  align_iter_skip;
-                self->skip--;
-            }
-            else if ( self->inserts > 0 )
-            {
-                self->seq_pos += ( self->inserts + 1 );
-                self->inserts = 0;
-            }
-            else
-            {
-                self->seq_pos++;
-            }
-            al_iter_adjust_next( self );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT int32_t CC AlignmentIteratorState ( const AlignmentIterator *self,
-                                               INSDC_coord_zero *seq_pos )
-{
-    uint32_t res = align_iter_invalid;
-    if ( self != NULL )
-    {
-        INSDC_coord_zero pos = self->seq_pos;
-        if ( pos < self->read_len )
-        {
-            res = ( self->read[ pos ] & 0x0F );
-
-            if ( self->rel_ref_pos < 1 )
-                res |= align_iter_first;
-
-            if ( self->rel_ref_pos == ( self->ref_len - 1 ) )
-                res |= align_iter_last;
-
-            if ( !self->has_mismatch[ pos ] )
-                res |= align_iter_match;
-
-            res |= self->flags;
-
-            if ( seq_pos != NULL )
-                *seq_pos = pos;
-        }
-    }
-    return res;
-}
-
-
-LIB_EXPORT rc_t CC AlignmentIteratorPosition ( const AlignmentIterator *self,
-                                               INSDC_coord_zero *pos )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcAlign, rcIterator, rcPositioning, rcSelf, rcNull );
-    else
-    {
-        if ( pos == NULL )
-            rc = RC( rcAlign, rcIterator, rcPositioning, rcParam, rcNull );
-        else
-        {
-            *pos = ( self->abs_ref_start + self->rel_ref_pos );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT uint32_t CC AlignmentIteratorBasesInserted
-    ( const AlignmentIterator *self, const INSDC_4na_bin **bases )
-{
-    uint32_t res = 0;
-    if ( ( self != NULL )&&( bases != NULL ) )
-    {
-        res = self->inserts;
-        *bases = &( self->read[ self->seq_pos + 1 ] );
-    }
-    return res;
-}
-
-
-LIB_EXPORT uint32_t CC AlignmentIteratorBasesDeleted
-    ( const AlignmentIterator *self, INSDC_coord_zero *pos )
-{
-    uint32_t res = 0;
-    if ( ( self != NULL )&&( pos != NULL ) )
-    {
-        res = ( self->skip );
-        *pos = ( self->abs_ref_start + self->rel_ref_pos + 1 ); 
-    }
-    return res;
-}
-
-
-/* ============ private static functions ============ */
-static rc_t compute_posofs(  AlignmentIterator * self,
-    const bool * has_ref_offset, const int32_t * ref_offset, uint32_t ref_offset_len )
-{
-    rc_t rc = 0;
-
-    self->pos_ofs_idx = 0;
-    self->pos_ofs_cnt = ref_offset_len;
-    if ( ref_offset_len > 0 )
-    {
-        int32_t shift = 0;
-        uint32_t seq_position;
-        uint32_t src = 0;
-        uint32_t dst = 0;
-
-        if ( has_ref_offset[ 0 ] && ( ref_offset[ 0 ] < 0 ) )
-        {
-            shift = ref_offset[ src++ ];
-            self->seq_pos = -( shift );
-            self->pos_ofs_cnt--;
-        }
-
-        seq_position = self->seq_pos;
-        while( seq_position < self->read_len && rc == 0 )
-        {
-            if ( has_ref_offset[ seq_position ] )
-            {
-                /* we do have to process a reference-offset ! */
-                if ( src < ref_offset_len )
-                {
-                    /* we do have a ref-offset value available... */
-                    int32_t ro = ref_offset[ src++ ];
-                    if ( ro == 0 )
-                    {
-                        /* zero-values in REF_OFFSET are an error ! */
-                        rc = RC( rcAlign, rcIterator, rcConstructing, rcItem, rcNull );
-                    }
-                    else
-                    {
-                        /* ref-offset is positive: DELETE against the reference */
-                        self->pos_ofs[ dst ].pos = ( seq_position + shift - 1 );
-                        self->pos_ofs[ dst++ ].offset = ro;
-                        shift += ro;
-
-                        /* !!! CHANGE on May 04 2012 !!!
-                           the unused bits in has_ref_offset after an insert ( negative ro )
-                           are used now to hint the position of a "B"-cigar-string-case
-                           for cSRA-files created Complete-Genomic-Submissions
-                           that means we have to jump forward with seq_position in this case!
-                        */
-                        if ( ro < 0 )
-                        {
-							/* Jan 15 2015 */
-							/* fix the increment in case of 2 subsequent inserts ( which should be merged, but are not ) */
-							
-                            seq_position -= ( ro + 1 );
-                        }
-                    }
-                }
-                else
-                {
-                    /* if has_ref_offset has more flags than ref_offset has values... */
-                    rc = RC( rcAlign, rcIterator, rcConstructing, rcItem, rcTooBig );
-                }
-            }
-            ++seq_position;
-        }
-
-/*      OUTMSG(( "pos_ofs:" ));
-        for ( src = 0; src < self->pos_ofs_cnt; ++src )
-        {
-            OUTMSG(( "[%u/%u]", self->pos_ofs[ src ].pos, self->pos_ofs[ src ].offset ));
-        }
-        OUTMSG(( "\n" )); */
-    }
-    return rc;
-}
-
-
-static void al_iter_adjust_next( AlignmentIterator * self )
-{
-    if ( self->pos_ofs_idx < self->pos_ofs_cnt )
-    {
-        if ( self->rel_ref_pos == self->pos_ofs[ self->pos_ofs_idx ].pos )
-        {
-            /* we have to adjust... */
-            int32_t ro = self->pos_ofs[ self->pos_ofs_idx++ ].offset;
-            if ( ro < 0 )
-            {
-                self->flags |= align_iter_insert;
-                self->inserts = (-ro);
-            }
-            else
-            {
-                self->flags |= align_iter_delete;
-                self->skip = ro;
-            }
-        }
-    }
-}
diff --git a/libs/align/align-access.c b/libs/align/align-access.c
deleted file mode 100644
index ff96e3d..0000000
--- a/libs/align/align-access.c
+++ /dev/null
@@ -1,812 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <align/extern.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <align/align-access.h>
-#include <atomic32.h>
-
-#include <vfs/path.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-
-#include "bam-priv.h"
-
-struct AlignAccessMgr
-{
-    atomic32_t refcount;
-};
-
-LIB_EXPORT rc_t CC AlignAccessMgrMake(const AlignAccessMgr **mgr) {
-    AlignAccessMgr *self = malloc(sizeof(*self));
-
-    *mgr = self;
-    if (self != NULL) {
-        atomic32_set(&self->refcount, 1);
-        return 0;
-    }
-    return RC(rcAlign, rcMgr, rcConstructing, rcMemory, rcExhausted);
-}
-
-LIB_EXPORT rc_t CC AlignAccessMgrAddRef( const AlignAccessMgr *self ) {
-    if (self != NULL)
-        atomic32_inc(&((AlignAccessMgr *)self)->refcount);
-    return 0;
-}
-
-static
-rc_t CC AlignAccessMgrWhack(AlignAccessMgr *self) {
-    return 0;
-}
-
-LIB_EXPORT rc_t CC AlignAccessMgrRelease(const AlignAccessMgr *cself) {
-    rc_t rc = 0;
-    AlignAccessMgr *self = (AlignAccessMgr *)cself;
-    
-    if (cself != NULL) {
-        if (atomic32_dec_and_test(&self->refcount)) {
-            rc = AlignAccessMgrWhack(self);
-            if (rc)
-                atomic32_set(&self->refcount, 1);
-            else
-                free(self);
-        }
-    }
-    return rc;
-}
-
-struct AlignAccessDB {
-    atomic32_t refcount;
-    const AlignAccessMgr *mgr;
-    const BAMFile *innerSelf;
-};
-
-LIB_EXPORT rc_t CC AlignAccessMgrMakeBAMDB(const AlignAccessMgr *self, const AlignAccessDB **db, const VPath *bam) {
-    AlignAccessDB *lhs = malloc(sizeof(*lhs));
-    rc_t rc;
-
-    if (lhs == NULL)
-        return RC(rcAlign, rcMgr, rcConstructing, rcMemory, rcExhausted);
-    
-    rc = BAMFileMakeWithVPath(&lhs->innerSelf, bam);
-    if (rc) {
-        free(lhs);
-        return rc;
-    }
-    lhs->mgr = self;
-    AlignAccessMgrAddRef(lhs->mgr);
-    atomic32_set(&lhs->refcount, 1);
-    
-    *db = lhs;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC AlignAccessMgrMakeIndexBAMDB(const AlignAccessMgr *self, const AlignAccessDB **db, const VPath *bam, const VPath *bam_index) {
-    rc_t rc = AlignAccessMgrMakeBAMDB(self, db, bam);
-    if (rc == 0) {
-        rc = BAMFileOpenIndexWithVPath((**db).innerSelf, bam_index);
-        if (rc == 0)
-            return 0;
-        AlignAccessDBRelease(*db);
-        *db = NULL;
-    }
-    return rc;
-}
-
-
-/* ExportBAMFile
- *  export the BAMFile object in use by the AlignAccessDB, if any
- *  must be released via BAMFileRelease
- */
-LIB_EXPORT rc_t CC AlignAccessDBExportBAMFile ( const AlignAccessDB *self, const BAMFile **result )
-{
-    rc_t rc;
-
-    if ( result == NULL )
-        rc = RC ( rcAlign, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcAlign, rcTable, rcAccessing, rcSelf, rcNull );
-        else if ( self -> innerSelf == NULL )
-            rc = RC ( rcAlign, rcTable, rcAccessing, rcType, rcIncorrect );
-        else
-        {
-            rc = BAMFileAddRef ( * result = self -> innerSelf );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        * result = NULL;
-    }
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC AlignAccessDBAddRef(const AlignAccessDB *cself) {
-    if (cself != NULL)
-        atomic32_inc(&((AlignAccessDB *)cself)->refcount);
-    return 0;
-}
-
-static rc_t CC AlignAccessDBWhack(AlignAccessDB *self) {
-    rc_t rc;
-    
-    rc = BAMFileRelease(self->innerSelf);
-    if (rc)
-        return rc;
-    return AlignAccessMgrRelease(self->mgr);
-}
-
-LIB_EXPORT rc_t CC AlignAccessDBRelease(const AlignAccessDB *cself) {
-    rc_t rc = 0;
-    AlignAccessDB *self = (AlignAccessDB *)cself;
-    
-    if (cself != NULL) {
-        if (atomic32_dec_and_test(&self->refcount)) {
-            rc = AlignAccessDBWhack(self);
-            if (rc)
-                atomic32_set(&self->refcount, 1);
-            else
-                free(self);
-        }
-    }
-    return rc;
-}
-
-struct AlignAccessRefSeqEnumerator {
-    atomic32_t refcount;
-    const AlignAccessDB *parent;
-    int cur, end;
-};
-
-LIB_EXPORT rc_t CC AlignAccessDBEnumerateRefSequences(const AlignAccessDB *self, AlignAccessRefSeqEnumerator **refseq_enum) {
-    AlignAccessRefSeqEnumerator *lhs;
-    unsigned cur = 0;
-    unsigned end;
-    
-    BAMFileGetRefSeqCount(self->innerSelf, &end);
-    if (BAMFileIsIndexed(self->innerSelf)) {
-        while (cur != end && BAMFileIndexHasRefSeqId(self->innerSelf, cur) == 0)
-            ++cur;
-        if (cur == end)
-            return AlignAccessRefSeqEnumeratorEOFCode;
-    }
-    lhs = malloc(sizeof(*lhs));
-    *refseq_enum = lhs;
-    if (lhs != NULL) {
-        lhs->parent = self;
-        AlignAccessDBAddRef(lhs->parent);
-        lhs->cur = cur;
-        lhs->end = end;
-        atomic32_set(&lhs->refcount, 1);
-        return 0;
-    }
-    return RC(rcAlign, rcDatabase, rcConstructing, rcMemory, rcExhausted);
-}
-
-LIB_EXPORT rc_t CC AlignAccessRefSeqEnumeratorAddRef(const AlignAccessRefSeqEnumerator *self) {
-    if (self != NULL)
-        atomic32_inc(&((AlignAccessRefSeqEnumerator *)self)->refcount);
-    return 0;
-}
-
-static
-rc_t CC AlignAccessRefSeqEnumeratorWhack(AlignAccessRefSeqEnumerator *self) {
-    return AlignAccessDBRelease(self->parent);
-}
-
-LIB_EXPORT rc_t CC AlignAccessRefSeqEnumeratorRelease(const AlignAccessRefSeqEnumerator *cself) {
-    rc_t rc = 0;
-    AlignAccessRefSeqEnumerator *self = (AlignAccessRefSeqEnumerator *)cself;
-    
-    if (cself != NULL) {
-        if (atomic32_dec_and_test(&self->refcount)) {
-            rc = AlignAccessRefSeqEnumeratorWhack(self);
-            if (rc)
-                atomic32_set(&self->refcount, 1);
-            else
-                free(self);
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC AlignAccessRefSeqEnumeratorGetID(const AlignAccessRefSeqEnumerator *cself, char *id_buffer, size_t buffer_size, size_t *id_size) {
-    rc_t rc = 0;
-    const BAMRefSeq *cur;
-    size_t id_act_size;
-    
-    if (cself == NULL)
-        return 0;
-    if (id_buffer == NULL && id_size == NULL)
-        return RC(rcAlign, rcTable, rcAccessing, rcParam, rcNull);
-    rc = BAMFileGetRefSeq(cself->parent->innerSelf, cself->cur, &cur);
-    if (rc)
-        return rc;
-    id_act_size = string_size( cur->name ) + 1;
-    if (id_size != NULL)
-        *id_size = id_act_size;
-    if (id_buffer != NULL) {
-        if (buffer_size >= id_act_size)
-            memcpy(id_buffer, cur->name, id_act_size);
-        else
-            rc = RC(rcAlign, rcTable, rcAccessing, rcBuffer, rcInsufficient);
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC AlignAccessRefSeqEnumeratorGetLength ( const AlignAccessRefSeqEnumerator *cself,
-                                           uint64_t *length )
-{
-    rc_t rc = 0;
-    const BAMRefSeq *cur;
-    
-    if (cself == NULL)
-        return 0;
-    if (length == NULL)
-        return RC(rcAlign, rcTable, rcAccessing, rcParam, rcNull);
-    rc = BAMFileGetRefSeq(cself->parent->innerSelf, cself->cur, &cur);
-    if (rc)
-        return rc;
-    *length = cur->length;
-    
-    return 0;
-}
-
-LIB_EXPORT rc_t CC AlignAccessRefSeqEnumeratorNext(const AlignAccessRefSeqEnumerator *cself) {
-    AlignAccessRefSeqEnumerator *self = (AlignAccessRefSeqEnumerator *)cself;
-    
-    if (cself->cur + 1 >= cself->end)
-        return AlignAccessRefSeqEnumeratorEOFCode;
-    
-    ++self->cur;
-    if (!BAMFileIsIndexed(cself->parent->innerSelf))
-    	return 0;
-	if (BAMFileIndexHasRefSeqId(cself->parent->innerSelf, cself->cur))
-		return 0;
-	return AlignAccessRefSeqEnumeratorNext(cself);
-}
-
-struct AlignAccessAlignmentEnumerator {
-    const AlignAccessDB *parent;
-    const BAMAlignment *innerSelf;
-    uint64_t endpos;
-    uint64_t startpos;
-    BAMFilePosition pos;
-    atomic32_t refcount;
-    int atend;
-    int refSeqID;
-};
-
-static rc_t CC AlignAccessDBMakeEnumerator(const AlignAccessDB *self, AlignAccessAlignmentEnumerator **align_enum) {
-    AlignAccessAlignmentEnumerator *lhs = malloc(sizeof(*lhs));
-    
-    *align_enum = lhs;
-    if (lhs == NULL)
-        return RC(rcAlign, rcTable, rcConstructing, rcMemory, rcExhausted);
-    
-    lhs->innerSelf = NULL;
-    lhs->parent = self;
-    AlignAccessDBAddRef(lhs->parent);
-    atomic32_set(&lhs->refcount, 1);
-    lhs->atend = 0;
-    lhs->refSeqID = -1;
-    lhs->endpos = 0;
-    lhs->startpos = 0;
-    
-    return 0;
-}
-
-LIB_EXPORT rc_t CC AlignAccessDBEnumerateAlignments(const AlignAccessDB *self, AlignAccessAlignmentEnumerator **align_enum) {
-    rc_t rc;
-    
-    *align_enum = NULL;
-
-    rc = BAMFileRewind(self->innerSelf);
-    if (rc)
-        return rc;
-    rc = AlignAccessDBMakeEnumerator(self, align_enum);
-    if (rc)
-        return rc;
-    return AlignAccessAlignmentEnumeratorNext(*align_enum);
-}
-
-LIB_EXPORT rc_t CC AlignAccessDBWindowedAlignments(
-                                     const AlignAccessDB *self,
-                                     AlignAccessAlignmentEnumerator **align_enum,
-                                     const char *refSeqName, uint64_t pos, uint64_t wsize
-) {
-    AlignAccessAlignmentEnumerator *lhs;
-    unsigned i, n;
-    const BAMRefSeq *rs;
-    uint64_t endpos = pos + wsize;
-    rc_t rc;
-    
-    *align_enum = NULL;
-
-    BAMFileGetRefSeqCount(self->innerSelf, &n);
-    for (i = 0; i != n; ++i) {
-        BAMFileGetRefSeq(self->innerSelf, i, &rs);
-        if (strcmp(refSeqName, rs->name) == 0)
-            break;
-    }
-    if (i == n || pos >= rs->length) {
-        return RC(rcAlign, rcTable, rcConstructing, rcParam, rcInvalid);
-    }
-
-    if (wsize == 0 || endpos > rs->length)
-        endpos = rs->length;
-
-    rc = BAMFileSeek(self->innerSelf, i, pos, endpos);
-    if ( rc != 0 )
-    {
-        if ( GetRCState( rc ) == rcNotFound && GetRCObject( rc ) == (enum RCObject)rcData )
-            rc = AlignAccessAlignmentEnumeratorEOFCode;
-        return rc;
-    }
-    rc = AlignAccessDBMakeEnumerator(self, &lhs);
-    if (rc)
-        return rc;
-
-    lhs->refSeqID = i;
-    lhs->endpos = endpos;
-    lhs->startpos = pos;
-
-    *align_enum = lhs;
-    return AlignAccessAlignmentEnumeratorNext(*align_enum);
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorNext(const AlignAccessAlignmentEnumerator *cself) {
-    rc_t rc;
-    AlignAccessAlignmentEnumerator *self = (AlignAccessAlignmentEnumerator *)cself;
-    int32_t refSeqID;
-
-AGAIN:
-    if (self->innerSelf != NULL) {
-        BAMAlignmentRelease(self->innerSelf);
-        self->innerSelf = NULL;
-    }
-    if (self->atend != 0)
-        return AlignAccessAlignmentEnumeratorEOFCode;
-    
-    BAMFileGetPosition(self->parent->innerSelf, &self->pos);
-    rc = BAMFileRead2(self->parent->innerSelf, &self->innerSelf);
-    if (rc) {
-        if (GetRCState(rc) == rcNotFound && GetRCObject(rc) == rcRow) {
-            self->atend = 1;
-            rc = AlignAccessAlignmentEnumeratorEOFCode;
-        }
-        return rc;
-    }
-    if (self->refSeqID == -1)
-        return 0;
-    
-    BAMAlignmentGetRefSeqId(self->innerSelf, &refSeqID);
-    if (self->refSeqID != refSeqID) {
-        self->atend = 1;
-        rc = AlignAccessAlignmentEnumeratorEOFCode;
-    }
-    else if (self->endpos != 0) {
-        int64_t pos;
-        uint32_t length;
-        uint64_t endpos;
-        
-        BAMAlignmentGetPosition2(self->innerSelf, &pos, &length);
-        if (pos < 0 || pos >= (int64_t)self->endpos) {
-            self->atend = 1;
-            rc = AlignAccessAlignmentEnumeratorEOFCode;
-        }
-        else {
-            endpos = (uint64_t)pos + length;
-            if (endpos <= self->startpos)
-                goto AGAIN;
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorAddRef ( const AlignAccessAlignmentEnumerator *self ) {
-    if (self != NULL)
-        atomic32_inc(&((AlignAccessAlignmentEnumerator *)self)->refcount);
-    return 0;
-}
-
-static
-rc_t CC AlignAccessAlignmentEnumeratorWhack(AlignAccessAlignmentEnumerator *self) {
-    if (self->innerSelf)
-        BAMAlignmentRelease(self->innerSelf);
-    AlignAccessDBRelease(self->parent);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorRelease ( const AlignAccessAlignmentEnumerator *cself ) {
-    rc_t rc = 0;
-    AlignAccessAlignmentEnumerator *self = (AlignAccessAlignmentEnumerator *)cself;
-    
-    if (cself != NULL) {
-        if (atomic32_dec_and_test(&self->refcount)) {
-            rc = AlignAccessAlignmentEnumeratorWhack(self);
-            if (rc)
-                atomic32_set(&self->refcount, 1);
-            else
-                free(self);
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorGetRefSeqID(
-                                               const AlignAccessAlignmentEnumerator *self,
-                                               char *id_buffer, size_t buffer_size, size_t *id_size
-) {
-    rc_t rc = 0;
-    int32_t id;
-    const BAMRefSeq *cur;
-    size_t id_act_size;
-    
-    if (self == NULL)
-        return 0;
-    if (id_buffer == NULL && id_size == NULL)
-        return RC(rcAlign, rcTable, rcAccessing, rcParam, rcNull);
-    rc = BAMAlignmentGetRefSeqId(self->innerSelf, &id);
-    if (rc)
-        return rc;
-    if (id < 0)
-        return RC(rcAlign, rcTable, rcAccessing, rcData, rcNotFound);
-    rc = BAMFileGetRefSeq(self->parent->innerSelf, id, &cur);
-    if (rc)
-        return rc;
-    id_act_size = string_size( cur->name ) + 1;
-    if (id_size != NULL)
-        *id_size = id_act_size;
-    if (id_buffer != NULL) {
-        if (buffer_size >= id_act_size)
-            memcpy(id_buffer, cur->name, id_act_size);
-        else
-            rc = RC(rcAlign, rcTable, rcAccessing, rcBuffer, rcInsufficient);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorGetRefSeqPos(
-                                                const AlignAccessAlignmentEnumerator *self,
-                                                uint64_t *start_pos
-) {
-    rc_t rc;
-    int64_t pos;
-    
-    rc = BAMAlignmentGetPosition(self->innerSelf, &pos);
-    if (rc)
-        return rc;
-    if (pos < 0)
-        return RC(rcAlign, rcTable, rcAccessing, rcData, rcNotFound);
-
-    *start_pos = pos;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorGetRefSeqLen(
-                                                              const AlignAccessAlignmentEnumerator *self,
-                                                              uint32_t *reflen
-                                                              )
-{
-    rc_t rc;
-    uint32_t length;
-    int64_t pos;
-    
-    rc = BAMAlignmentGetPosition2(self->innerSelf, &pos, &length);
-    if (rc)
-        return rc;
-    if (pos < 0)
-        return RC(rcAlign, rcTable, rcAccessing, rcData, rcNotFound);
-    
-    *reflen = length;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorGetMapQuality(
-                                                 const AlignAccessAlignmentEnumerator *self,
-                                                 uint8_t *score
-) {
-    uint8_t y = 0;
-    
-    if (self && self->innerSelf) {
-        uint16_t flags;
-    
-        BAMAlignmentGetFlags(self->innerSelf, &flags);
-        if ((flags & BAMFlags_SelfIsUnmapped) == 0)
-            BAMAlignmentGetMapQuality(self->innerSelf, &y);
-	}
-    if (score) *score = y;
-    
-    return 0;
-}
-
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorGetShortSeqAccessionID(
-                                                        const AlignAccessAlignmentEnumerator *self,
-                                                        char *id_buffer, size_t buffer_size, size_t *id_size
-) {
-    rc_t rc;
-    size_t id_act_size;
-    const char *readGroupName;
-    
-    if (self == NULL)
-        return 0;
-    if (id_buffer == NULL && id_size == NULL)
-        return RC(rcAlign, rcTable, rcAccessing, rcParam, rcNull);
-    
-    rc = BAMAlignmentGetReadGroupName(self->innerSelf, &readGroupName);
-    if (rc)
-        return rc;
-    if (readGroupName == 0)
-        *id_size = 0;
-    else {
-        id_act_size = string_size( readGroupName ) + 1;
-        if (id_size != NULL)
-            *id_size = id_act_size;
-        if (id_buffer != NULL) {
-            if (buffer_size >= id_act_size)
-                memcpy(id_buffer, readGroupName, id_act_size);
-            else
-                rc = RC(rcAlign, rcTable, rcAccessing, rcBuffer, rcInsufficient);
-        }
-    }
-    return rc;    
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorGetShortSeqID(
-                                                 const AlignAccessAlignmentEnumerator *self,
-                                                 char *id_buffer, size_t buffer_size, size_t *id_size
-) {
-    rc_t rc;
-    size_t id_act_size;
-    const char *readName;
-    
-    if (self == NULL)
-        return 0;
-    if (id_buffer == NULL && id_size == NULL)
-        return RC(rcAlign, rcTable, rcAccessing, rcParam, rcNull);
-    
-    rc = BAMAlignmentGetReadName(self->innerSelf, &readName);
-    if (rc)
-        return rc;
-
-    id_act_size = string_size( readName ) + 1;
-    if (id_size != NULL)
-        *id_size = id_act_size;
-    if (id_buffer != NULL) {
-        if (buffer_size >= id_act_size)
-            memcpy(id_buffer, readName, id_act_size);
-        else
-            rc = RC(rcAlign, rcTable, rcAccessing, rcBuffer, rcInsufficient);
-    }
-    return rc;    
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorGetCIGAR(
-    const AlignAccessAlignmentEnumerator *self,
-    uint64_t *start_pos, char *cigar_buffer, size_t buffer_size, size_t *cigar_size
-) {
-    int i;
-    unsigned n;
-    rc_t rc;
-    uint32_t sp = 0;
-    char *cigbuf = cigar_buffer;
-    const char *const endp = cigar_buffer + buffer_size;
-    
-    if (cigar_buffer == NULL && cigar_size == NULL) {
-        /* no result can be returned */
-        rc = RC(rcAlign, rcTable, rcAccessing, rcParam, rcNull);
-    }
-    
-    rc = BAMAlignmentGetCigarCount(self->innerSelf, &n);
-    if (rc)
-        return rc;
-    if (n == 0) {
-        if (cigar_size != NULL)
-            *cigar_size = 0;
-        if (start_pos != NULL)
-            *start_pos = 0;
-        cigbuf[0] = 0;
-        return 0;
-    }
-    for (i = 0; i != n; ++i) {
-        char cig1[20];
-        BAMCigarType op;
-        uint32_t len;
-        int cig1len;
-        
-        BAMAlignmentGetCigar(self->innerSelf, i, &op, &len);
-        if (i == 0 && op == ct_SoftClip) {
-            sp = len;
-            continue;
-        }
-        if (i == 0 && op == ct_HardClip)
-            continue;
-        if (i == n - 1 && (op == ct_SoftClip || op == ct_HardClip))
-            continue;
-        
-        cig1len = sprintf(cig1, "%c%u", op, len);
-        if (cigbuf + cig1len < endp) {
-            if (cigar_buffer != NULL) {
-                memcpy(cigbuf, cig1, cig1len);
-                cigbuf[cig1len] = 0;
-            }
-        }
-        else
-            rc = RC(rcAlign, rcTable, rcAccessing, rcBuffer, rcInsufficient);
-        cigbuf += cig1len;
-    }
-    if (cigar_size != NULL)
-        *cigar_size = cigbuf - cigar_buffer + 1;
-    if (start_pos != NULL)
-        *start_pos = sp;
-    return rc;
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorGetShortSequence(
-                                                    const AlignAccessAlignmentEnumerator *self,
-                                                    char *seq_buffer, size_t buffer_size, size_t *seq_size
-) {
-    rc_t rc;
-    uint32_t act_size;
-
-    if (self == NULL)
-        return 0;
-    if (seq_buffer == NULL && seq_size == NULL)
-        return RC(rcAlign, rcTable, rcAccessing, rcParam, rcNull);
-    
-    rc = BAMAlignmentGetReadLength(self->innerSelf, &act_size);
-    if (rc)
-        return rc;
-    
-    ++act_size;
-    if (seq_size != NULL)
-        *seq_size = act_size;
-    
-    if (seq_buffer != NULL) {
-        if (buffer_size >= act_size) {
-            rc = BAMAlignmentGetSequence(self->innerSelf, seq_buffer);
-            seq_buffer[act_size - 1] = 0;
-        }
-        else
-            rc = RC(rcAlign, rcTable, rcAccessing, rcBuffer, rcInsufficient);
-    }
-    return rc;    
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorGetStrandDirection(
-                                                      const AlignAccessAlignmentEnumerator *self,
-                                                      AlignmentStrandDirection *result
-) {
-    uint16_t flags;
-    rc_t rc;
-    
-    if (result == NULL)
-        return RC(rcAlign, rcTable, rcAccessing, rcParam, rcNull);
-
-    *result = asd_Unknown;
-    if (self == NULL)
-        return 0;
-    
-    rc = BAMAlignmentGetFlags(self->innerSelf, &flags);
-    if (rc)
-        return rc;
-    
-    *result = ((flags & BAMFlags_SelfIsReverse) == BAMFlags_SelfIsReverse) ? asd_Reverse : asd_Forward;
-    
-    return 0;
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorGetIsPaired(const AlignAccessAlignmentEnumerator *self,
-                                               bool *result)
-{
-    uint16_t flags;
-    rc_t rc;
-    
-    if (result == NULL)
-        return RC(rcAlign, rcTable, rcAccessing, rcParam, rcNull);
-    
-    *result = asd_Unknown;
-    if (self == NULL)
-        return 0;
-    
-    rc = BAMAlignmentGetFlags(self->innerSelf, &flags);
-    if (rc)
-        return rc;
-    
-    *result = ((flags & BAMFlags_IsMappedAsPair) == 0) ? false : true;
-    
-    return 0;
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorGetIsFirstInPair(const AlignAccessAlignmentEnumerator *self,
-                                                    bool *result)
-{
-    uint16_t flags;
-    rc_t rc;
-    
-    if (result == NULL)
-        return RC(rcAlign, rcTable, rcAccessing, rcParam, rcNull);
-    
-    if (self == NULL)
-        return 0;
-    
-    rc = BAMAlignmentGetFlags(self->innerSelf, &flags);
-    if (rc)
-        return rc;
-    
-    *result = ((flags & BAMFlags_IsFirst) == 0) ? false : true;
-    
-    return 0;
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorGetIsSecondInPair(const AlignAccessAlignmentEnumerator *self,
-                                                     bool *result)
-{
-    uint16_t flags;
-    rc_t rc;
-    
-    if (result == NULL)
-        return RC(rcAlign, rcTable, rcAccessing, rcParam, rcNull);
-    
-    if (self == NULL)
-        return 0;
-    
-    rc = BAMAlignmentGetFlags(self->innerSelf, &flags);
-    if (rc)
-        return rc;
-    
-    *result = ((flags & BAMFlags_IsSecond) == 0) ? false : true;
-    
-    return 0;
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorGetRecordID(const AlignAccessAlignmentEnumerator *self, uint64_t *result)
-{
-    if (result == NULL)
-        return RC(rcAlign, rcTable, rcAccessing, rcParam, rcNull);
-    
-    if (self == NULL)
-        return 0;
-    
-    *(BAMFilePosition *)result = self->pos;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC AlignAccessAlignmentEnumeratorGetBAMAlignment(const AlignAccessAlignmentEnumerator *self, const BAMAlignment **result)
-{
-    *result = self->innerSelf;
-    return BAMAlignmentAddRef(self->innerSelf);
-}
diff --git a/libs/align/align_mgr.c b/libs/align/align_mgr.c
deleted file mode 100644
index c700463..0000000
--- a/libs/align/align_mgr.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <align/extern.h>
-
-#include <klib/rc.h>
-#include <klib/container.h>
-#include <klib/refcount.h>
-#include <klib/sort.h>
-#include <insdc/insdc.h>
-#include <align/iterator.h>
-#include <align/manager.h>
-#include <sysalloc.h>
-
-#include "debug.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-struct AlignMgr
-{
-    KRefcount refcount;
-    /* what else will be here ? */
-};
-
-
-LIB_EXPORT rc_t CC AlignMgrMakeRead ( const struct AlignMgr **self )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcAlign, rcIterator, rcConstructing, rcSelf, rcNull );
-    else
-    {
-        AlignMgr * alm = calloc( sizeof * alm, 1 );
-        if ( alm == NULL )
-            rc = RC( rcAlign, rcIterator, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            KRefcountInit( &alm->refcount, 1, "AlignMgr", "Make", "align" );
-        }
-
-        if ( rc == 0 )
-            *self = alm;
-        else
-            free( alm );
-    }
-    return rc;
-
-}
-
-
-LIB_EXPORT rc_t CC AlignMgrAddRef ( const AlignMgr *self )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcAlign, rcIterator, rcAttaching, rcSelf, rcNull );
-    else
-    {
-        if ( KRefcountAdd( &self->refcount, "AlignMgr" ) != krefOkay )
-        {
-            rc = RC( rcAlign, rcIterator, rcAttaching, rcError, rcUnexpected );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC AlignMgrRelease ( const AlignMgr *cself )
-{
-    rc_t rc = 0;
-    if ( cself == NULL )
-        rc = RC( rcAlign, rcIterator, rcReleasing, rcSelf, rcNull );
-    else
-    {
-        if ( KRefcountDrop( &cself->refcount, "AlignMgr" ) == krefWhack )
-        {
-            AlignMgr * self = ( AlignMgr * ) cself;
-            free( self );
-        }
-    }
-    return rc;
-
-}
diff --git a/libs/align/bam-priv.h b/libs/align/bam-priv.h
deleted file mode 100644
index 1b2d37c..0000000
--- a/libs/align/bam-priv.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_bam_priv_
-#define _h_bam_priv_
-
-#ifndef _h_align_bam_
-#include <align/bam.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* Get the aligned position on the Ref. Seq.
- */
-rc_t BAMAlignmentGetNthPosition(const BAMAlignment *cself, uint32_t n, int64_t *pos);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_bam_priv_ */
diff --git a/libs/align/bam.c b/libs/align/bam.c
deleted file mode 100644
index ebae8b2..0000000
--- a/libs/align/bam.c
+++ /dev/null
@@ -1,5054 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <align/extern.h>
-#include <klib/defs.h>
-#include <klib/debug.h>
-#include <klib/sort.h>
-#include <klib/rc.h>
-#include <kfs/file.h>
-#include <kfs/directory.h>
-#include <kfs/mmap.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-#include <klib/text.h>
-#include <klib/refcount.h>
-#include <sysalloc.h>
-
-#include <atomic32.h>
-#include <strtol.h>
-
-#include <align/bam.h>
-#include "bam-priv.h"
-
-#include <vfs/manager.h>
-#include <vfs/path.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-#if 1
-/*_DEBUGGING*/
-#include <stdio.h>
-#endif
-
-#include <endian.h>
-#include <byteswap.h>
-
-#include <zlib.h>
-
-#include <os-native.h>
-
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-static uint16_t LE2HUI16(void const *X) { uint16_t y; memcpy(&y, X, sizeof(y)); return y; }
-static uint32_t LE2HUI32(void const *X) { uint32_t y; memcpy(&y, X, sizeof(y)); return y; }
-static uint64_t LE2HUI64(void const *X) { uint64_t y; memcpy(&y, X, sizeof(y)); return y; }
-static  int16_t  LE2HI16(void const *X) {  int16_t y; memcpy(&y, X, sizeof(y)); return y; }
-static  int32_t  LE2HI32(void const *X) {  int32_t y; memcpy(&y, X, sizeof(y)); return y; }
-/* static  int64_t  LE2HI64(void const *X) {  int64_t y; memcpy(&y, X, sizeof(y)); return y; } */
-#endif
-#if __BYTE_ORDER == __BIG_ENDIAN
-static uint16_t LE2HUI16(void const *X) { uint16_t y; memcpy(&y, X, sizeof(y)); return (uint16_t)bswap_16(y); }
-static uint32_t LE2HUI32(void const *X) { uint32_t y; memcpy(&y, X, sizeof(y)); return (uint32_t)bswap_32(y); }
-static uint64_t LE2HUI64(void const *X) { uint64_t y; memcpy(&y, X, sizeof(y)); return (uint64_t)bswap_64(y); }
-static  int16_t  LE2HI16(void const *X) {  int16_t y; memcpy(&y, X, sizeof(y)); return ( int16_t)bswap_16(y); }
-static  int32_t  LE2HI32(void const *X) {  int32_t y; memcpy(&y, X, sizeof(y)); return ( int32_t)bswap_32(y); }
-static  int64_t  LE2HI64(void const *X) {  int64_t y; memcpy(&y, X, sizeof(y)); return ( int64_t)bswap_64(y); }
-#endif
-
-typedef struct BAMIndex BAMIndex;
-typedef struct BGZFile BGZFile;
-
-/* MARK: BGZFile *** Start *** */
-
-#define VALIDATE_BGZF_HEADER 1
-#if (ZLIB_VERNUM < 0x1230)
-#undef VALIDATE_BGZF_HEADER
-#warning "zlib too old, inflateGetHeader not available, not validating BGZF headers"
-#else
-#endif
-
-#define ZLIB_BLOCK_SIZE ( 64 * 1024 )
-typedef uint8_t zlib_block_t[ZLIB_BLOCK_SIZE];
-
-#define MEM_ALIGN_SIZE ( 64 * 1024 )
-/* MEM_CHUNK_SIZE must be an integer multiple of ZLIB_BLOCK_SIZE.
- * The multiple must be >= 2 shouldn't be < 3.
- */
-#define MEM_CHUNK_SIZE ( 256 * ZLIB_BLOCK_SIZE )
-#define CG_NUM_SEGS 4
-
-typedef struct BGZFile_vt_s {
-    rc_t (*FileRead)(void *, zlib_block_t, unsigned *);
-    uint64_t (*FileGetPos)(void const *);
-    float (*FileProPos)(void const *);
-    uint64_t (*FileGetSize)(void const *);
-    rc_t (*FileSetPos)(void *, uint64_t);
-    void (*FileWhack)(void *);
-} BGZFile_vt;
-
-struct BGZFile {
-    uint64_t fsize;
-    uint64_t fpos;  /* position in file of first byte in buffer */
-    const uint8_t *buf;   /* page aligned or memmapped */
-    const KFile *kfp;
-    uint8_t *_buf;  /* allocated */
-    unsigned malign;
-    size_t bcount;  /* number of valid bytes in buffer */
-    uint32_t bpos;  /* position in buffer of read head */
-    z_stream zs;
-};
-
-static
-rc_t BGZFileGetMoreBytes(BGZFile *self)
-{
-    rc_t rc;
-    
-    self->fpos += self->bpos;
-    self->bpos &= (MEM_ALIGN_SIZE - 1);
-    self->fpos -= self->bpos;
-
-    rc = KFileRead(self->kfp, self->fpos, self->_buf + self->malign,
-                   MEM_CHUNK_SIZE, &self->bcount);
-    if (rc) {
-        DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("Error reading BAM file: %R\n", rc));
-        return rc;
-    }
-    if (self->bcount == 0 || self->bcount == self->bpos)
-        return RC(rcAlign, rcFile, rcReading, rcData, rcInsufficient);
-
-    self->zs.avail_in = (uInt)(self->bcount - self->bpos);
-    self->zs.next_in = (Bytef *)&self->buf[self->bpos];
-    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("Read %u bytes from BAM file at position %lu\n", self->zs.avail_in, self->fpos));
-    
-    return 0;
-}
-
-static
-rc_t BGZFileRead(BGZFile *self, zlib_block_t dst, unsigned *pNumRead)
-{
-#if VALIDATE_BGZF_HEADER
-    uint8_t extra[256];
-    gz_header head;
-#endif
-    rc_t rc = 0;
-    unsigned loops;
-    int zr;
-    
-    *pNumRead = 0;
-    if (self->bcount == 0 || self->zs.avail_in == 0) {
-        rc = BGZFileGetMoreBytes(self);
-        if (rc)
-            return rc;
-    }
-
-#if VALIDATE_BGZF_HEADER
-    memset(&head, 0, sizeof(head));
-    head.extra = extra;
-    head.extra_max = sizeof(extra);
-    
-    zr = inflateGetHeader(&self->zs, &head);
-    assert(zr == Z_OK);
-#endif
-    
-    self->zs.next_out = (Bytef *)dst;
-    self->zs.avail_out = sizeof(zlib_block_t);
-
-    for (loops = 0; loops != 2; ++loops) {
-        {
-            uLong const initial = self->zs.total_in;
-            
-            zr = inflate(&self->zs, Z_FINISH);
-            {
-                uLong const final = self->zs.total_in;
-                uLong const len = final - initial;
-                
-                self->bpos += len;
-            }
-        }
-        assert(self->zs.avail_in == self->bcount - self->bpos);
-        
-        switch (zr) {
-        case Z_OK:
-        case Z_BUF_ERROR:
-            rc = BGZFileGetMoreBytes(self);
-            if ( rc != 0 )
-            {
-                if ( GetRCObject( rc ) == (enum RCObject)rcData && GetRCState( rc ) == rcInsufficient )
-                {
-                    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("EOF in Zlib block after %lu bytes\n", self->fpos + self->bpos));
-                    rc = RC( rcAlign, rcFile, rcReading, rcFile, rcTooShort );
-                }
-                return rc;
-            }
-            break;
-        case Z_STREAM_END:
-            DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("Zlib block size (before/after): %u/%u\n", self->zs.total_in, self->zs.total_out));
-#if VALIDATE_BGZF_HEADER
-            if (head.done) {
-                unsigned const extra_len = head.extra_len;
-                unsigned i;
-                unsigned bsize = 0;
-                
-                DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("GZIP Header extra length: %u\n", extra_len));
-                for (i = 0; i < extra_len; ) {
-                    uint8_t const si1 = extra[i + 0];
-                    uint8_t const si2 = extra[i + 1];
-                    unsigned const slen = LE2HUI16(&extra[i + 2]);
-                    
-                    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("GZIP Header extra: %c%c(%u)\n", si1, si2, slen));
-                    if (si1 == 'B' && si2 == 'C') {
-                        bsize = 1 + LE2HUI16(&extra[i + 4]);
-                        DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("BGZF Header extra field BC: bsize %u\n", bsize));
-                        break;
-                    }
-                    i += slen + 4;
-                }
-                if (bsize == 0 || bsize != self->zs.total_in) {
-                    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("BGZF Header extra field BC not found\n"));
-                    rc = RC(rcAlign, rcFile, rcReading, rcFormat, rcInvalid); /* not BGZF */
-                }
-            }
-            else {
-                DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("GZIP Header not found\n"));
-                rc = RC(rcAlign, rcFile, rcReading, rcFile, rcCorrupt);
-            }
-#endif
-            *pNumRead = (unsigned)self->zs.total_out; /* <= 64k */
-            zr = inflateReset(&self->zs);
-            assert(zr == Z_OK);
-            return rc;
-        default:
-            DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("Unexpected Zlib result %i\n", zr));
-            return RC(rcAlign, rcFile, rcReading, rcFile, rcCorrupt);
-        }
-    }
-    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("Failed reading BAM file after %lu bytes\n", self->fpos + self->bpos));
-    return RC(rcAlign, rcFile, rcReading, rcFile, rcTooShort);
-}
-
-static uint64_t BGZFileGetPos(const BGZFile *self)
-{
-    return self->fpos + self->bpos;
-}
-
-/* returns the position as proportion of the whole file */ 
-static float BGZFileProPos(BGZFile const *const self)
-{
-    return BGZFileGetPos(self) / (double)self->fsize;
-}
-
-static rc_t BGZFileSetPos(BGZFile *const self, uint64_t const pos)
-{
-    if (self->fpos > pos || pos >= self->fpos + self->bcount) {
-        /* desired position is outside of current buffer */
-        self->fpos = pos ^ (pos & ((uint64_t)(MEM_ALIGN_SIZE - 1)));
-        self->bpos = (unsigned)(pos - self->fpos);
-        self->bcount = 0; /* force re-read */
-    }
-    else {
-        /* desired position is inside of current buffer */
-        unsigned const bpos = (unsigned)(pos - self->fpos); /* < 64k */
-
-        self->bpos = bpos; /* pos - self->fpos; */
-        self->zs.avail_in = (uInt)(self->bcount - bpos);
-        self->zs.next_in = (Bytef *)&self->buf[bpos];
-    }
-    return 0;
-}
-
-typedef rc_t (*BGZFileWalkBlocks_cb)(void *ctx, const BGZFile *file,
-                                     rc_t rc, uint64_t fpos,
-                                     const zlib_block_t data, unsigned dsize);
-
-/* Without Decompression */
-static rc_t BGZFileWalkBlocksND(BGZFile *const self, BGZFileWalkBlocks_cb const cb, void *const ctx)
-{
-    rc_t rc = 0;
-#if VALIDATE_BGZF_HEADER
-    uint8_t extra[256];
-    char dummy[64];
-    gz_header head;
-    int zr;
-
-    memset(&head, 0, sizeof(head));
-    head.extra = extra;
-    head.extra_max = sizeof(extra);
-    
-    do {
-        unsigned loops;
-        unsigned hsize = 0;
-        unsigned bsize = 0;
-        unsigned bsize2;
-        uint64_t const fpos = self->fpos + self->bpos;
-        
-        self->zs.next_out = (Bytef *)dummy;
-        self->zs.avail_out = sizeof(dummy);
-        
-        zr = inflateGetHeader(&self->zs, &head);
-        assert(zr == Z_OK);
-        
-        for (loops = 0; loops != 2; ++loops) {
-            {
-                uLong const orig = self->zs.total_in;
-                
-                zr = inflate(&self->zs, Z_BLOCK); /* Z_BLOCK stops at end of header */
-                {
-                    uLong const final = self->zs.total_in;
-                    uLong const bytes = final - orig;
-                    
-                    self->bpos += bytes;
-                    hsize += bytes;
-                }
-            }
-            if (head.done) {
-                unsigned i;
-                
-                for (i = 0; i < head.extra_len; ) {
-                    if (extra[i] == 'B' && extra[i + 1] == 'C') {
-                        bsize = 1 + LE2HUI16(&extra[i + 4]);
-                        break;
-                    }
-                    i += LE2HUI16(&extra[i + 2]);
-                }
-                break;
-            }
-            else if (self->zs.avail_in == 0) {
-                rc = BGZFileGetMoreBytes(self);
-                if (rc) {
-                    rc = RC(rcAlign, rcFile, rcReading, rcFile, rcTooShort);
-                    goto DONE;
-                }
-            }
-            else {
-                rc = RC(rcAlign, rcFile, rcReading, rcFile, rcCorrupt);
-                goto DONE;
-            }
-        }
-        if (bsize == 0) {
-            rc = RC(rcAlign, rcFile, rcReading, rcFormat, rcInvalid); /* not BGZF */
-            break;
-        }
-        bsize2 = bsize;
-        bsize -= hsize;
-        for ( ; ; ) {
-            unsigned const max = (unsigned)(self->bcount - self->bpos); /* <= 64k */
-            unsigned const len = bsize > max ? max : bsize;
-            
-            self->bpos += len;
-            bsize -= len;
-            if (self->bpos == self->bcount) {
-                rc = BGZFileGetMoreBytes(self);
-                if (rc) {
-                    if (bsize)
-                        rc = RC(rcAlign, rcFile, rcReading, rcFile, rcTooShort);
-                    goto DONE;
-                }
-            }
-            else {
-                zr = inflateReset(&self->zs);
-                assert(zr == Z_OK);
-                self->zs.avail_in = (uInt)(self->bcount - self->bpos);
-                self->zs.next_in = (Bytef *)&self->buf[self->bpos];
-                rc = cb(ctx, self, 0, fpos, NULL, bsize2);
-                break;
-            }
-        }
-    } while (rc == 0);
-DONE:
-    if ( GetRCState( rc ) == rcInsufficient && GetRCObject( rc ) == (enum RCObject)rcData )
-        rc = 0;
-    rc = cb( ctx, self, rc, self->fpos + self->bpos, NULL, 0 );
-#endif
-    return rc;
-}
-
-static rc_t BGZFileWalkBlocksUnzip(BGZFile *const self, zlib_block_t *const bufp, BGZFileWalkBlocks_cb const cb, void *const ctx)
-{
-    rc_t rc;
-    rc_t rc2;
-    
-    do {
-        uint64_t const fpos = self->fpos + self->bpos;
-        unsigned dsize;
-        
-        rc2 = BGZFileRead(self, *bufp, &dsize);
-        rc = cb(ctx, self, rc2, fpos, *bufp, dsize);
-    } while (rc == 0 && rc2 == 0);
-    if ( GetRCState( rc2 ) == rcInsufficient && GetRCObject( rc2 ) == (enum RCObject)rcData )
-        rc2 = 0;
-    rc = cb( ctx, self, rc2, self->fpos + self->bpos, NULL, 0 );
-    return rc ? rc : rc2;
-}
-
-static rc_t BGZFileWalkBlocks(BGZFile *self, bool decompress, zlib_block_t *bufp,
-                              BGZFileWalkBlocks_cb cb, void *ctx)
-{
-    rc_t rc;
-    
-#if VALIDATE_BGZF_HEADER
-#else
-    decompress = true;
-#endif
-    self->fpos = 0;
-    self->bpos = 0;
-    
-    rc = BGZFileGetMoreBytes(self);
-    if (rc)
-        return rc;
-    
-    if (decompress)
-        return BGZFileWalkBlocksUnzip(self, bufp, cb, ctx);
-    else
-        return BGZFileWalkBlocksND(self, cb, ctx);
-}
-
-static uint64_t BGZFileGetSize(BGZFile const *const self)
-{
-    return self->fsize;
-}
-
-static void BGZFileWhack(BGZFile *self)
-{
-    inflateEnd(&self->zs);
-    KFileRelease(self->kfp);
-    if (self->_buf)
-        free(self->_buf);
-}
-
-static rc_t BGZFileInit(BGZFile *self, const KFile *kfp, BGZFile_vt *vt)
-{
-    int i;
-    rc_t rc;
-    static BGZFile_vt const my_vt = {
-        (rc_t (*)(void *, zlib_block_t, unsigned *))BGZFileRead,
-        (uint64_t (*)(void const *))BGZFileGetPos,
-        (float (*)(void const *))BGZFileProPos,
-        (uint64_t (*)(void const *))BGZFileGetSize,
-        (rc_t (*)(void *, uint64_t))BGZFileSetPos,
-        (void (*)(void *))BGZFileWhack
-    };
-    
-    memset(self, 0, sizeof(*self));
-    memset(vt, 0, sizeof(*vt));
-    
-    i = inflateInit2(&self->zs, MAX_WBITS + 16); /* max + enable gzip headers */
-    switch (i) {
-    case Z_OK:
-        break;
-    case Z_MEM_ERROR:
-        return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
-    default:
-        return RC(rcAlign, rcFile, rcConstructing, rcNoObj, rcUnexpected);
-    }
-    
-    rc = KFileSize(kfp, &self->fsize);
-    if (rc)
-        return rc;
-    
-    self->_buf = malloc(MEM_CHUNK_SIZE + MEM_ALIGN_SIZE);
-    if (self->_buf == NULL)
-        return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
-    self->malign = (MEM_ALIGN_SIZE - ((intptr_t)self->_buf & (MEM_ALIGN_SIZE - 1))) & (MEM_ALIGN_SIZE - 1);
-    self->buf = self->_buf + self->malign;
-    
-    self->kfp = kfp;
-    KFileAddRef(kfp);
-
-    *vt = my_vt;
-    
-    return 0;
-}
-
-#ifndef WINDOWS
-
-/* MARK: BGZThreadFile *** Start *** */
-
-#include <kproc/thread.h>
-#include <kproc/lock.h>
-#include <kproc/cond.h>
-
-typedef struct BGZThreadFile_s BGZThreadFile;
-
-#define BUFFER_COUNT (3)
-
-typedef struct BGZThreadFileWorkQElem_s BGZThreadFileWorkQElem;
-
-struct BGZThreadFileWorkQElem_s {
-    uint8_t *buf;
-    uint64_t pos;
-    unsigned bsz;
-};
-
-struct BGZThreadFile_s {
-    BGZFile file;
-    KLock *lock;
-    KCondition *have_data;
-    KCondition *need_data;
-    KThread *th;
-    uint64_t pos;
-    BGZThreadFileWorkQElem que[BUFFER_COUNT];
-    rc_t volatile rc;
-    unsigned volatile nque;
-    bool eof;
-    uint8_t buffer[sizeof(zlib_block_t) * BUFFER_COUNT];
-};
-
-static rc_t BGZThreadFileRead(BGZThreadFile *self, zlib_block_t dst, unsigned *pNumRead)
-{
-    rc_t rc;
-    
-    *pNumRead = 0;
-    
-    KLockAcquire(self->lock);
-    if ((rc = self->rc) == 0) {
-        while (self->nque == 0 && (rc = self->rc) == 0)
-            KConditionWait(self->have_data, self->lock);
-        if (rc == 0) {
-            BGZThreadFileWorkQElem const work = self->que[0];
-            
-            self->pos = work.pos;
-            if (work.buf) {
-                memcpy(dst, work.buf, *pNumRead = work.bsz);
-                memmove(&self->que[0], &self->que[1], --self->nque * sizeof(self->que[0]));
-                KConditionSignal(self->need_data);
-            }
-            else {
-                self->eof = true;
-                self->rc = rc = RC(rcAlign, rcFile, rcReading, rcData, rcInsufficient);
-            }
-        }
-    }
-    KLockUnlock(self->lock);
-    return rc;
-}
-
-static rc_t CC BGZThreadFileMain(KThread const *const th, void *const vp)
-{
-    BGZThreadFile *const self = (BGZThreadFile *)vp;
-    rc_t rc = 0;
-    unsigned bufno;
-    
-    KLockAcquire(self->lock);
-    for (bufno = 0; ; bufno = (bufno + 1) % BUFFER_COUNT) {
-        while (self->nque == BUFFER_COUNT)
-            KConditionWait(self->need_data, self->lock);
-        {
-            BGZThreadFileWorkQElem work;
-            
-            work.pos = BGZFileGetPos(&self->file);
-            work.buf = &self->buffer[bufno * sizeof(zlib_block_t)];
-            rc = BGZFileRead(&self->file, work.buf, &work.bsz);
-            if ( GetRCObject( rc ) == (enum RCObject)rcData && GetRCState( rc ) == rcInsufficient )
-                work.buf = NULL;
-            else if ( rc != 0 )
-                break;
-            self->que[self->nque++] = work;
-            KConditionSignal(self->have_data);
-        }
-    }
-    self->rc = rc;
-    KLockUnlock(self->lock);
-    return 0;
-}
-
-static uint64_t BGZThreadFileGetPos(BGZThreadFile const *const self)
-{
-    return self->pos;
-}
-
-/* returns the position as proportion of the whole file */ 
-static float BGZThreadFileProPos(BGZThreadFile const *const self)
-{
-    return BGZThreadFileGetPos(self) / (double)self->file.fsize;
-}
-
-static uint64_t BGZThreadFileGetSize(BGZThreadFile const *const self)
-{
-    return BGZFileGetSize(&self->file);
-}
-
-static rc_t BGZThreadFileSetPos(BGZThreadFile *const self)
-{
-    return RC(rcAlign, rcFile, rcPositioning, rcFunction, rcUnsupported);
-}
-
-static void BGZThreadFileWhack(BGZThreadFile *const self)
-{
-    KThreadCancel(self->th);
-    KThreadWait(self->th, NULL);
-    BGZFileWhack(&self->file);
-    KConditionRelease(self->need_data);
-    KConditionRelease(self->have_data);
-    KLockRelease(self->lock);
-    KThreadRelease(self->th);
-}
-
-static rc_t BGZThreadFileInit(BGZThreadFile *self, const KFile *kfp, BGZFile_vt *vt)
-{
-    rc_t rc;
-    static BGZFile_vt const my_vt = {
-        (rc_t (*)(void *, zlib_block_t, unsigned *))BGZThreadFileRead,
-        (uint64_t (*)(void const *))BGZThreadFileGetPos,
-        (float (*)(void const *))BGZThreadFileProPos,
-        (uint64_t (*)(void const *))BGZThreadFileGetSize,
-        (rc_t (*)(void *, uint64_t))BGZThreadFileSetPos,
-        (void (*)(void *))BGZThreadFileWhack
-    };
-    
-    memset(self, 0, sizeof(*self));
-    
-    rc = BGZFileInit(&self->file, kfp, vt);
-    if (rc == 0) {
-        rc = KLockMake(&self->lock);
-        if (rc == 0) {
-            rc = KConditionMake(&self->have_data);
-            if (rc == 0) {
-                rc = KConditionMake(&self->need_data);
-                if (rc == 0) {
-                    rc = KThreadMake(&self->th, BGZThreadFileMain, self);
-                    if (rc == 0) {
-                        *vt = my_vt;
-                        return 0;
-                    }
-                    KConditionRelease(self->need_data);
-                }
-                KConditionRelease(self->have_data);
-            }
-            KLockRelease(self->lock);
-        }
-        BGZFileWhack(&self->file);
-    }
-    memset(self, 0, sizeof(*self));
-    memset(vt, 0, sizeof(*vt));
-    return rc;
-}
-
-#endif
-
-/* MARK: BAMFile structures */
-
-struct BAMIndex {
-    BAMFilePosition *refSeq[1];
-};
-
-struct BAMFile {
-    uint64_t fpos_first;
-    uint64_t fpos_cur;
-    
-    union {
-        BGZFile plain;
-#ifndef WINDOWS
-        BGZThreadFile thread;
-#endif
-    } file;
-    BGZFile_vt vt;
-    
-    BAMRefSeq *refSeq;          /* pointers into headerData1 except name points into headerData2 */ 
-    BAMReadGroup *readGroup;    /* pointers into headerData1 */
-    char const *version;
-    char const *header;
-    char    *headerData1;       /* gets used for refSeq and readGroup */
-    uint8_t *headerData2;       /* gets used for refSeq */
-    BAMAlignment *bufLocker;
-    BAMAlignment *nocopy;       /* used to hold current record for BAMFileRead2 */
-    BAMIndex const *ndx;
-    
-    size_t nocopy_size;
-    
-    unsigned refSeqs;
-    unsigned readGroups;
-    
-    KRefcount refcount;
-    unsigned ucfirst;           /* offset of first record in uncompressed buffer */
-    unsigned bufSize;           /* current size of uncompressed buffer */
-    unsigned bufCurrent;        /* location in uncompressed buffer of read head */
-    bool eof;
-    bool threaded;
-    zlib_block_t buffer;        /* uncompressed buffer */
-};
-
-/* MARK: Alignment structures */
-
-struct bam_alignment_s {
-    uint8_t rID[4];
-    uint8_t pos[4];
-    uint8_t read_name_len;
-    uint8_t mapQual;
-    uint8_t bin[2];
-    uint8_t n_cigars[2];
-    uint8_t flags[2];
-    uint8_t read_len[4];
-    uint8_t mate_rID[4];
-    uint8_t mate_pos[4];
-    uint8_t ins_size[4];
-    char read_name[1 /* read_name_len */];
-/* if you change length of read_name,
- * adjust calculation of offsets in BAMAlignmentSetOffsets */
-/*  uint32_t cigar[n_cigars];
- *  uint8_t seq[(read_len + 1) / 2];
- *  uint8_t qual[read_len];
- *  uint8_t extra[...];
- */
-};
-
-typedef union bam_alignment_u {
-    struct bam_alignment_s cooked;
-    uint8_t raw[sizeof(struct bam_alignment_s)];
-} bam_alignment;
-
-struct offset_size_s {
-    unsigned offset;
-    unsigned size; /* this is the total length of the tag; length of data is size - 3 */
-};
-
-struct BAMAlignment {
-    KRefcount refcount;
-    
-    BAMFile *parent;
-    bam_alignment const *data;
-    uint8_t *storage;
-    unsigned datasize;
-        
-    unsigned cigar;
-    unsigned seq;
-    unsigned qual;
-    unsigned numExtra;
-    unsigned hasColor;
-    struct offset_size_s extra[1];
-};
-
-static const char cigarChars[] = {
-    ct_Match,
-    ct_Insert,
-    ct_Delete,
-    ct_Skip,
-    ct_SoftClip,
-    ct_HardClip,
-    ct_Padded,
-    ct_Equal,
-    ct_NotEqual
-    /* ct_Overlap must not appear in actual BAM file */
-};
-
-/* MARK: Alignment accessors */
-
-static int32_t getRefSeqId(const BAMAlignment *cself) {
-    return LE2HI32(cself->data->cooked.rID);
-}
-
-static int32_t getPosition(const BAMAlignment *cself) {
-    return LE2HI32(cself->data->cooked.pos);
-}
-
-static uint8_t getReadNameLength(const BAMAlignment *cself) {
-    return cself->data->cooked.read_name_len;
-}
-
-static uint16_t getBin(const BAMAlignment *cself) {
-    return LE2HUI16(cself->data->cooked.bin);
-}
-
-static uint8_t getMapQual(const BAMAlignment *cself) {
-    return cself->data->cooked.mapQual;
-}
-
-static uint16_t getCigarCount(const BAMAlignment *cself) {
-    return LE2HUI16(cself->data->cooked.n_cigars);
-}
-
-static uint16_t getFlags(const BAMAlignment *cself) {
-    return LE2HUI16(cself->data->cooked.flags);
-}
-
-static uint32_t getReadLen(const BAMAlignment *cself) {
-    return LE2HUI32(cself->data->cooked.read_len);
-}
-
-static int32_t getMateRefSeqId(const BAMAlignment *cself) {
-    return LE2HI32(cself->data->cooked.mate_rID);
-}
-
-static int32_t getMatePos(const BAMAlignment *cself) {
-    return LE2HI32(cself->data->cooked.mate_pos);
-}
-
-static int32_t getInsertSize(const BAMAlignment *cself) {
-    return LE2HI32(cself->data->cooked.ins_size);
-}
-
-static char const *getReadName(const BAMAlignment *cself) {
-    return &cself->data->cooked.read_name[0];
-}
-
-static void const *getCigarBase(BAMAlignment const *cself)
-{
-    return &cself->data->raw[cself->cigar];
-}
-
-static int opt_tag_cmp(uint8_t const a[2], uint8_t const b[2])
-{
-    int const d0 = (int)a[0] - (int)b[0];
-    return d0 ? d0 : ((int)a[1] - (int)b[1]);
-}
-
-static int64_t CC OptTag_sort(void const *A, void const *B, void *ctx)
-{
-    BAMAlignment const *const self = ctx;
-    unsigned const a_off = ((struct offset_size_s const *)A)->offset;
-    unsigned const b_off = ((struct offset_size_s const *)B)->offset;
-    uint8_t const *const a = &self->data->raw[a_off];
-    uint8_t const *const b = &self->data->raw[b_off];
-    int const diff = opt_tag_cmp(a, b);
-    
-    return diff ? (int64_t)diff : (int64_t)a - (int64_t)b;
-}
-
-static unsigned tag_findfirst(BAMAlignment const *const self, char const tag[2])
-{
-    unsigned f = 0;
-    unsigned e = self->numExtra;
-    
-    while (f < e) {
-        unsigned const m = (f + e) >> 1;
-        char const *const mtag = &self->data->raw[self->extra[m].offset];
-        int const d = opt_tag_cmp(tag, mtag);
-        
-        if (d > 0)
-            f = m + 1;
-        else
-            e = m;
-    }
-    return f;
-}
-
-static unsigned tag_runlength(BAMAlignment const *const self,
-                              char const tag[2],
-                              unsigned const at)
-{
-    unsigned n;
-    
-    for (n = 0; n + at < self->numExtra; ++n) {
-        if (opt_tag_cmp(tag, &self->data->raw[self->extra[n + at].offset]) != 0)
-            break;
-    }
-    return n;
-}
-
-static struct offset_size_s const *tag_search(BAMAlignment const *const self,
-                                              char const tag[2],
-                                              int const which)
-{
-    unsigned const fnd = tag_findfirst(self, tag);
-    unsigned const run = tag_runlength(self, tag, fnd);
-    unsigned const want = which < 0 ? (run + which) : which;
-    
-    return run == 0 ? NULL : &self->extra[fnd + (want % run)];
-}
-
-static char const *get_RG(BAMAlignment const *cself)
-{
-    struct offset_size_s const *const x = tag_search(cself, "RG", 0);
-    return (char const *)(x && cself->data->raw[x->offset + 2] == 'Z' ? &cself->data->raw[x->offset + 3] : NULL);
-}
-
-static struct offset_size_s const *get_CS_info(BAMAlignment const *cself)
-{
-    return tag_search(cself, "CS", 0);
-}
-
-static struct offset_size_s const *get_CQ_info(BAMAlignment const *cself)
-{
-    return tag_search(cself, "CQ", 0);
-}
-
-static char const *get_CS(BAMAlignment const *cself)
-{
-    struct offset_size_s const *const x = get_CS_info(cself);
-    return (char const *)(x && cself->data->raw[x->offset + 2] == 'Z' ? &cself->data->raw[x->offset + 3] : NULL);
-}
-
-static uint8_t const *get_CQ(BAMAlignment const *cself)
-{
-    struct offset_size_s const *const x = get_CQ_info(cself);
-    return (uint8_t const *)(x && cself->data->raw[x->offset + 2] == 'Z' ? &cself->data->raw[x->offset + 3] : NULL);
-}
-
-static struct offset_size_s const *get_OQ_info(BAMAlignment const *cself)
-{
-    return tag_search(cself, "OQ", 0);
-}
-
-static uint8_t const *get_OQ(BAMAlignment const *cself)
-{
-    struct offset_size_s const *const x = get_OQ_info(cself);
-    return (uint8_t const *)(x && cself->data->raw[x->offset + 2] == 'Z' ? &cself->data->raw[x->offset + 3] : NULL);
-}
-
-static char const *get_XT(BAMAlignment const *cself)
-{
-    struct offset_size_s const *const x = tag_search(cself, "XT", 0);
-    return (char const *)(x && cself->data->raw[x->offset + 2] == 'Z' ? &cself->data->raw[x->offset + 3] : NULL);
-}
-
-static uint8_t const *get_XS(BAMAlignment const *cself)
-{
-    struct offset_size_s const *const x = tag_search(cself, "XS", -1); /* want last one */
-    return (uint8_t const *)(x && cself->data->raw[x->offset + 2] == 'A' ? &cself->data->raw[x->offset + 3] : NULL);
-}
-
-static struct offset_size_s const *get_CG_ZA_info(BAMAlignment const *cself)
-{
-    struct offset_size_s const *const x = tag_search(cself, "ZA", 0);
-    return x;
-}
-
-static struct offset_size_s const *get_CG_ZI_info(BAMAlignment const *cself)
-{
-    struct offset_size_s const *const x = tag_search(cself, "ZI", 0);
-    return x;
-}
-
-static struct offset_size_s const *get_CG_GC_info(BAMAlignment const *cself)
-{
-    struct offset_size_s const *const x = tag_search(cself, "GC", 0);
-    return x;
-}
-
-static struct offset_size_s const *get_CG_GS_info(BAMAlignment const *cself)
-{
-    struct offset_size_s const *const x = tag_search(cself, "GS", 0);
-    return x;
-}
-
-static struct offset_size_s const *get_CG_GQ_info(BAMAlignment const *cself)
-{
-    struct offset_size_s const *const x = tag_search(cself, "GQ", 0);
-    return x;
-}
-
-/* MARK: BAMFile Reading functions */
-
-/* returns (rcData, rcInsufficient) if eof */
-static rc_t BAMFileFillBuffer(BAMFile *self)
-{
-    rc_t const rc = self->vt.FileRead(&self->file, self->buffer, &self->bufSize);
-    if (rc)
-        return rc;
-    if (self->bufSize == 0 || self->bufSize <= self->bufCurrent)
-        return SILENT_RC(rcAlign, rcFile, rcReading, rcData, rcInsufficient);
-    return 0;
-}
-
-static rc_t BAMFileReadn(BAMFile *self, const unsigned len, uint8_t dst[/* len */]) {
-    rc_t rc;
-    unsigned cur;
-    unsigned n = 0;
-    
-    if (len == 0)
-        return 0;
-    
-    for (cur = 0; ; cur += n) {
-        if (self->bufSize > self->bufCurrent) {
-            n = self->bufSize - self->bufCurrent;
-            if (cur + n > len)
-                n = len - cur;
-            memcpy(&dst[cur], &self->buffer[self->bufCurrent], n);
-            self->bufCurrent += n;
-        }
-        if (self->bufCurrent != self->bufSize && self->bufSize != 0)
-            return 0;
-        if (self->bufSize != 0) {
-            /* a seek has not just been done so update the file position.
-             * if we didn't and a request for the position is made before the
-             * next read, we will not have the position of the next read.
-             *
-             * if a seek had just been done then
-             *    self->fpos_cur == BGZFileGetPos(&self->file)
-             * is already true.
-             */
-            self->fpos_cur = self->vt.FileGetPos(&self->file);
-            self->bufCurrent = 0;
-            self->bufSize = 0;
-            if (cur + n == len)
-                return 0;
-        }
-
-        rc = BAMFileFillBuffer(self);
-        if (rc)
-            return rc;
-    }
-}
-
-static void const *BAMFilePeek(BAMFile const *const self, unsigned const offset)
-{
-    return &self->buffer[self->bufCurrent + offset];
-}
-
-static unsigned BAMFileMaxPeek(BAMFile const *self)
-{
-    return self->bufSize > self->bufCurrent ? self->bufSize - self->bufCurrent : 0;
-}
-
-static int32_t BAMFilePeekI32(BAMFile *self)
-{
-    return LE2HI32(BAMFilePeek(self, 0));
-}
-
-static rc_t BAMFileReadI32(BAMFile *self, int32_t *rhs)
-{
-    uint8_t buf[sizeof(int32_t)];
-    rc_t rc = BAMFileReadn(self, sizeof(int32_t), buf);
-    
-    if (rc == 0)
-        *rhs = LE2HI32(buf);
-    return rc;
-}
-
-/* MARK: BAM File header parsing functions */
-
-static int64_t CC comp_ReadGroup(const void *a, const void *b, void *ignored) {
-    return strcmp(((BAMReadGroup const *)a)->name, ((BAMReadGroup const *)b)->name);
-}
-
-static rc_t ParseHD(BAMFile *self, char hdata[], size_t hlen, unsigned *used)
-{
-    unsigned i;
-    unsigned tag;
-    unsigned value;
-    int st = 0;
-    int ws = 1;
-
-    for (i = 0; i < hlen; ++i) {
-        char const cc = hdata[i];
-        
-        if (ws && isspace(cc))
-            continue;
-        ws = 0;
-        
-        switch (st) {
-        case 0:
-            tag = i;
-            ++st;
-            break;
-        case 1:
-            if (isspace(cc))
-                return RC(rcAlign, rcFile, rcParsing, rcData, rcInvalid);
-            ++st;
-            break;
-        case 2:
-            if (cc != ':')
-                return RC(rcAlign, rcFile, rcParsing, rcData, rcInvalid);
-            hdata[i] = '\0';
-            value = i + 1;
-            ++st;
-            break;
-        case 3:
-            if (cc == '\t' || cc == '\r' || cc == '\n') {
-                hdata[i] = '\0';
-                
-                if (strcmp(&hdata[tag], "VN") == 0)
-                    self->version = &hdata[value];
-                
-                ++st;
-                ws = 1;
-            }
-            break;
-        case 4:
-            if (cc == '@')
-                goto DONE;
-            tag = i;
-            st = 1;
-            break;
-        }
-    }
-    if (st == 4) {
-DONE:
-        *used = i;
-        return 0;
-    }
-    return RC(rcAlign, rcFile, rcParsing, rcData, rcInvalid);
-}
-
-static rc_t ParseSQ(BAMFile *self, char hdata[], size_t hlen, unsigned *used, unsigned const rs_by_name[])
-{
-    unsigned i;
-    unsigned tag;
-    unsigned value;
-    int st = 0;
-    int ws = 1;
-    BAMRefSeq rs;
-    
-    memset(&rs, 0, sizeof(rs));
-    
-    for (i = 0; i < hlen; ++i) {
-        char const cc = hdata[i];
-        
-        if (ws && isspace(cc))
-            continue;
-        ws = 0;
-        
-        switch (st) {
-        case 0:
-            tag = i;
-            ++st;
-            break;
-        case 1:
-            if (isspace(cc))
-                return RC(rcAlign, rcFile, rcParsing, rcData, rcInvalid);
-            ++st;
-            break;
-        case 2:
-#define HACKAMATIC 1
-#if HACKAMATIC
-            if (cc != ':') {
-                if (i + 1 >= hlen || hdata[i+1] != ':')
-                    return RC(rcAlign, rcFile, rcParsing, rcData, rcInvalid);
-                else
-                    ++i;
-            }
-#else
-            if (cc != ':')
-                return RC(rcAlign, rcFile, rcParsing, rcData, rcInvalid);
-#endif
-            hdata[i] = '\0';
-            value = i + 1;
-            ++st;
-            break;
-        case 3:
-            if (cc == '\t' || cc == '\r' || cc == '\n') {
-                unsigned j;
-                
-                hdata[i] = '\0';
-                
-                while (value < i && isspace(hdata[value]))
-                    ++value;
-                for (j = i; value < j && isspace(hdata[j - 1]); )
-                    hdata[--j] = '\0';
-                
-                if (strcmp(&hdata[tag], "SN") == 0)
-                    rs.name = &hdata[value];
-                else if (strcmp(&hdata[tag], "LN") == 0)
-                    rs.length = strtou64(&hdata[value], NULL, 10);
-                else if (strcmp(&hdata[tag], "AS") == 0)
-                    rs.assemblyId = &hdata[value];
-#if HACKAMATIC
-                else if (strcmp(&hdata[tag], "M5") == 0 || strcmp(&hdata[tag], "MD5") == 0)
-#else
-                else if (strcmp(&hdata[tag], "M5") == 0)
-#endif
-#undef HACKAMATIC
-                {
-                    unsigned len = j - value;
-                    
-                    if ((hdata[value] == '\'' || hdata[value] == '"') && hdata[value + len - 1] == hdata[value]) {
-                        ++value;
-                        len -= 2;
-                    }
-                    if (len == 32) {
-                        rs.checksum = &rs.checksum_array[0];
-                        for (j = 0; j != 16; ++j) {
-                            int const ch1 = toupper(hdata[value + j * 2 + 0]);
-                            int const ch2 = toupper(hdata[value + j * 2 + 1]);
-                            
-                            if (isxdigit(ch1) && isxdigit(ch2)) {
-                                rs.checksum_array[j] =
-                                    ((ch1 > '9' ? (ch1 - ('A' - 10)) : (ch1 - '0')) << 4) +
-                                     (ch2 > '9' ? (ch2 - ('A' - 10)) : (ch2 - '0'));
-                            }
-                            else {
-                                rs.checksum = NULL;
-                                break;
-                            }
-                        }
-                    }
-                }
-                else if (strcmp(&hdata[tag], "UR") == 0)
-                    rs.uri = &hdata[value];
-                else if (strcmp(&hdata[tag], "SP") == 0)
-                    rs.species = &hdata[value];
-                
-                ++st;
-                ws = 1;
-            }
-            break;
-        case 4:
-            if (cc == '@')
-                goto DONE;
-            tag = i;
-            st = 1;
-            break;
-        }
-    }
-DONE:
-    if (st == 4) {
-        unsigned f = 0;
-        unsigned e = self->refSeqs;
-        
-        if (rs.name == NULL) /* required tags */
-            return RC(rcAlign, rcFile, rcParsing, rcConstraint, rcViolated);
-        
-        while (f < e) {
-            unsigned const m = (f + e) >> 1;
-            BAMRefSeq *const x = &self->refSeq[rs_by_name[m]];
-            int const cmp = strcmp(rs.name, x->name);
-            
-            if (cmp < 0)
-                e = m;
-            else if (cmp > 0)
-                f = m + 1;
-            else {
-                x->assemblyId = rs.assemblyId;
-                x->uri = rs.uri;
-                x->species = rs.species;
-                if (rs.checksum) {
-                    x->checksum = &x->checksum_array[0];
-                    memcpy(x->checksum_array, rs.checksum_array, 16);
-                }
-                else
-                    x->checksum = NULL;
-                break;
-            }
-        }
-        *used = i;
-        return 0;
-    }
-    return RC(rcAlign, rcFile, rcParsing, rcData, rcInvalid);
-}
-
-static rc_t ParseRG(BAMFile *self, char hdata[], size_t hlen, unsigned *used, BAMReadGroup *dst)
-{
-    unsigned i;
-    unsigned tag;
-    unsigned value;
-    int st = 0;
-    int ws = 1;
-#if _DEBUGGING
-/*    char const *cur = hdata; */
-#endif
-    
-    memset(dst, 0, sizeof(*dst));
-    
-    for (i = 0; i < hlen; ++i) {
-        char const cc = hdata[i];
-        
-        if (ws && isspace(cc))
-            continue;
-        ws = 0;
-        
-        switch (st) {
-        case 0:
-            tag = i;
-            ++st;
-            break;
-        case 1:
-            if (isspace(cc))
-                return RC(rcAlign, rcFile, rcParsing, rcData, rcInvalid);
-            ++st;
-            break;
-        case 2:
-            if (cc != ':')
-                return RC(rcAlign, rcFile, rcParsing, rcData, rcInvalid);
-#if _DEBUGGING
-            /* cur = hdata + i + 1; */
-#endif
-            hdata[i] = '\0';
-            value = i + 1;
-            ++st;
-            break;
-        case 3:
-            if (cc == '\t' || cc == '\r' || cc == '\n') {
-                unsigned j = i;
-#if _DEBUGGING
-                /* cur = hdata + i + 1; */
-#endif
-                hdata[i] = '\0';
-
-                while (value < i && isspace(hdata[value]))
-                    ++value;
-                while (value < j && isspace(hdata[j - 1]))
-                    hdata[--j] = '\0';
-                
-                if ((hdata[value] == '\"' || hdata[value] == '\'') && hdata[value] == hdata[j - 1]) {
-                    ++value;
-                    hdata[j - 1] = '\0';
-                }
-                if (strcmp(&hdata[tag], "ID") == 0)
-                    dst->name = &hdata[value];
-                else if (strcmp(&hdata[tag], "SM") == 0)
-                    dst->sample = &hdata[value];
-                else if (strcmp(&hdata[tag], "LB") == 0)
-                    dst->library = &hdata[value];
-                else if (strcmp(&hdata[tag], "DS") == 0)
-                    dst->description = &hdata[value];
-                else if (strcmp(&hdata[tag], "PU") == 0)
-                    dst->unit = &hdata[value];
-                else if (strcmp(&hdata[tag], "PI") == 0)
-                    dst->insertSize = &hdata[value];
-                else if (strcmp(&hdata[tag], "CN") == 0)
-                    dst->center = &hdata[value];
-                else if (strcmp(&hdata[tag], "DT") == 0)
-                    dst->runDate = &hdata[value];
-                else if (strcmp(&hdata[tag], "PL") == 0)
-                    dst->platform = &hdata[value];
-                
-                ++st;
-                ws = 1;
-            }
-            break;
-        case 4:
-            if (cc == '@')
-                goto DONE;
-            tag = i;
-            st = 1;
-            break;
-        }
-    }
-    if (st == 4) {
-DONE:
-        *used = i;
-        if (dst->name == NULL) /* required */
-            return RC(rcAlign, rcFile, rcParsing, rcConstraint, rcViolated);
-        return 0;
-    }
-    return RC(rcAlign, rcFile, rcParsing, rcData, rcInvalid);
-}
-
-static rc_t ParseHeader(BAMFile *self, char hdata[], size_t hlen, unsigned const rs_by_name[]) {
-    unsigned rg = 0;
-    unsigned i;
-    unsigned tag;
-    int st = 0;
-    int ws = 1;
-    unsigned used;
-    rc_t rc;
-    
-    for (i = 0; i < hlen; ++i) {
-        char const cc = hdata[i];
-        
-        if (ws && isspace(cc))
-            continue;
-        ws = 0;
-        
-        switch (st) {
-        case 0:
-            if (cc == '@')
-                ++st;
-            else
-                return RC(rcAlign, rcFile, rcParsing, rcData, rcInvalid);
-            break;
-        case 1:
-            if (isspace(cc))
-                return RC(rcAlign, rcFile, rcParsing, rcData, rcInvalid);
-            tag = i;
-            ++st;
-            break;
-        case 2:
-            if (isspace(cc)) {
-                hdata[i] = '\0';
-                if (i - tag == 2) {
-                    if (strcmp(&hdata[tag], "HD") == 0) {
-                        rc = ParseHD(self, &hdata[i + 1], hlen - i - 1, &used);
-                        if (rc) return rc;
-                        i += used;
-                        st = 0;
-                    }
-                    else if (strcmp(&hdata[tag], "SQ") == 0) {
-                        rc = ParseSQ(self, &hdata[i + 1], hlen - i - 1, &used, rs_by_name);
-                        if (rc) return rc;
-                        i += used;
-                        st = 0;
-                    }
-                    else if (strcmp(&hdata[tag], "RG") == 0) {
-                        rc = ParseRG(self, &hdata[i + 1], hlen - i - 1, &used, &self->readGroup[rg]);
-                        if (GetRCObject(rc) == rcConstraint && GetRCState(rc) == rcViolated) {
-                            (void)LOGERR(klogWarn, rc, "Read Group is missing ID in BAM header");
-                            rc = 0;
-                            if (self->readGroups) --self->readGroups;
-                        }
-                        else if (rc)
-                            return rc;
-                        else
-                            ++rg;
-                        i += used;
-                        st = 0;
-                    }
-                }
-                if (st == 2) {
-                    ++st;
-                    ws = 0;
-                }
-            }
-            else if (i - tag > 2)
-                ++st;
-            break;
-        case 3:
-            if (cc == '\r' || cc == '\n') {
-                st = 0;
-                ws = 1;
-            }
-            break;
-        }
-    }
-    ksort( self->readGroup, self->readGroups, sizeof(self->readGroup[0]), comp_ReadGroup, NULL );
-    for (rg = 0; rg != self->readGroups; ++rg) {
-        if (rg > 0 && strcmp(self->readGroup[rg - 1].name, self->readGroup[rg].name) == 0)
-            return RC(rcAlign, rcFile, rcParsing, rcConstraint, rcViolated);  /* name must be unique */
-        self->readGroup[rg].id = rg;
-    }
-    for (i = 0; i < self->refSeqs; ++i) {
-        if (self->refSeq[i].length == 0) {
-            (void)PLOGMSG(klogWarn, (klogWarn, "Reference '$(ref)' has zero length", "ref=%s", self->refSeq[i].name));
-        }
-    }
-    
-    return 0;
-}
-
-static rc_t CountReadGroups(char const txt[], size_t len, unsigned *reads) {
-    const char *const endp = txt + len;
-    
-    *reads = 0;
-    
-    do {
-        while (txt != endp && isspace(*txt))
-            ++txt;
-        if (txt == endp || txt + 3 >= endp)
-            break;
-        
-        if (txt[0] == '@' && txt[1] == 'R' && txt[2] == 'G')
-            ++*reads;
-        
-        txt = memchr(txt, '\n', endp - txt);
-    } while (txt);
-    return 0;
-}
-
-static rc_t ReadMagic(BAMFile *self)
-{
-    uint8_t sig[4];
-    rc_t rc = BAMFileReadn(self, 4, sig);
-    
-    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("BAM signature: '%c%c%c' %u\n", sig[0], sig[1], sig[2], sig[3]));
-    if (rc == 0 && (sig[0] != 'B' || sig[1] != 'A' || sig[2] != 'M' || sig[3] != 1))
-        rc = RC(rcAlign, rcFile, rcReading, rcHeader, rcBadVersion);
-    return rc;
-}
-
-static rc_t ReadHeaders(BAMFile *self,
-                        char **headerText, size_t *headerTextLen,
-                        uint8_t **refData, unsigned *numrefs)
-{
-    unsigned hlen;
-    char *htxt = NULL;
-    unsigned nrefs;
-    uint8_t *rdat = NULL;
-    unsigned rdsz;
-    unsigned rdms;
-    unsigned i;
-    int32_t i32;
-    rc_t rc = BAMFileReadI32(self, &i32);
-    
-    if (rc) return rc;
-
-    if (i32 < 0) {
-        rc = RC(rcAlign, rcFile, rcReading, rcHeader, rcInvalid);
-        goto BAILOUT;
-    }
-    hlen = i32;
-    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("BAM Header text size: %u\n", hlen));
-    if (hlen) {
-        htxt = malloc(hlen + 1);
-        if (htxt == NULL) {
-            rc = RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
-            goto BAILOUT;
-        }
-        
-        rc = BAMFileReadn(self, hlen, (uint8_t *)htxt); if (rc) goto BAILOUT;
-        htxt[hlen] = '\0';
-    }
-    rc = BAMFileReadI32(self, &i32); if (rc) goto BAILOUT;
-    if (i32 < 0) {
-        rc = RC(rcAlign, rcFile, rcReading, rcHeader, rcInvalid);
-        goto BAILOUT;
-    }
-    nrefs = i32;
-    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("BAM Header reference count: %u\n", nrefs));
-    if (nrefs) {
-        rdms = nrefs * 16;
-        if (rdms < 4096)
-            rdms = 4096;
-        rdat = malloc(rdms);
-        if (rdat == NULL) {
-            rc = RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
-            goto BAILOUT;
-        }
-        for (i = rdsz = 0; i < nrefs; ++i) {
-            rc = BAMFileReadI32(self, &i32); if (rc) goto BAILOUT;
-            if (i32 <= 0) {
-                rc = RC(rcAlign, rcFile, rcReading, rcHeader, rcInvalid);
-                goto BAILOUT;
-            }
-            if (rdsz + i32 + 8 > rdms) {
-                void *tmp;
-                
-                do { rdms <<= 1; } while (rdsz + i32 + 8 > rdms);
-                tmp = realloc(rdat, rdms);
-                if (tmp == NULL) {
-                    rc = RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
-                    goto BAILOUT;
-                }
-                rdat = tmp;
-            }
-            memcpy(rdat + rdsz, &i32, 4);
-            rdsz += 4;
-            rc = BAMFileReadn(self, i32, &rdat[rdsz]); if (rc) goto BAILOUT;
-            rdsz += i32;
-            rc = BAMFileReadI32(self, &i32); if (rc) goto BAILOUT;
-            memcpy(rdat + rdsz, &i32, 4);
-            rdsz += 4;
-        }
-    }
-    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("BAM Header reference size: %u\n", rdsz));
-    
-    *headerText = htxt;
-    *headerTextLen = hlen;
-    *refData = rdat;
-    *numrefs = nrefs;
-    return 0;
-    
-BAILOUT:
-    if (htxt)
-        free(htxt);
-    if (rdat)
-        free(rdat);
-    
-    return rc;
-}
-
-static int64_t CC comp_RefSeqName(const void *A, const void *B, void *ignored) {
-    BAMFile const *self = (BAMFile const *)ignored;
-    unsigned const a = *(unsigned const *)A;
-    unsigned const b = *(unsigned const *)B;
-    
-    return strcmp(self->refSeq[a].name, self->refSeq[b].name);
-}
-
-static rc_t ProcessHeader(BAMFile *self, char const headerText[])
-{
-    unsigned *rs_by_name = NULL;
-    unsigned i;
-    unsigned cp;
-    char *htxt;
-    uint8_t *rdat;
-    size_t hlen;
-    unsigned nrefs;
-    rc_t rc = ReadMagic(self);
-
-    if (rc) return rc;
-
-    rc = ReadHeaders(self, &htxt, &hlen, &rdat, &nrefs);
-    if (rc) return rc;
-    
-    self->fpos_first = self->fpos_cur;
-    self->ucfirst = self->bufCurrent;
-    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("BAM Data records start at: %lu+%u\n", self->ucfirst, self->fpos_first));
-
-    if (headerText) {
-        free(htxt);
-        hlen = string_size( headerText );
-        htxt = malloc(hlen + 1);
-        if (htxt == NULL) {
-            free(rdat);
-            return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
-        }
-        memcpy(htxt, headerText, hlen + 1);
-    }
-    
-    self->headerData2 = rdat;
-    if (hlen) {
-        self->header = htxt;
-        self->headerData1 = malloc(hlen + 1);
-        if (self->headerData1 == NULL)
-            return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
-        memcpy(self->headerData1, self->header, hlen + 1);
-    }
-    else {
-        htxt = malloc(1);
-        htxt[0] = '\0';
-        self->header = htxt;
-        self->headerData1 = NULL;
-    }
-    self->refSeqs = nrefs;
-    if (nrefs) {
-        self->refSeq = calloc(nrefs, sizeof(self->refSeq[0]));
-        if (self->refSeq == NULL)
-            return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
-        
-        rs_by_name = calloc(nrefs, sizeof(rs_by_name[0]));
-        if (rs_by_name == NULL)
-            return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
-        
-        for (i = cp = 0; i < nrefs; ++i) {
-            uint32_t nlen;
-            uint32_t rlen;
-            
-            rs_by_name[i] = i;
-            self->refSeq[i].id = i;
-            memcpy(&nlen, &self->headerData2[cp], 4);
-            cp += 4;
-            self->refSeq[i].name = (char const *)&self->headerData2[cp];
-            cp += nlen;
-            memcpy(&rlen, &self->headerData2[cp], 4);
-            self->headerData2[cp] = 0;
-            cp += 4;
-            self->refSeq[i].length = rlen;
-        }
-        ksort((void *)rs_by_name, self->refSeqs, sizeof(rs_by_name[0]), comp_RefSeqName, self);
-    }
-    if (self->headerData1) {
-        rc = CountReadGroups(self->headerData1, hlen, &self->readGroups);
-        if (rc == 0) {
-            self->readGroup = calloc(self->readGroups, sizeof(self->readGroup[0]));
-            if (self->readGroup != NULL)
-                rc = ParseHeader(self, self->headerData1, hlen, rs_by_name);
-            else
-                rc = RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
-        }
-    }
-    if (rs_by_name != NULL)
-        free((void *)rs_by_name);
-    
-    return rc;
-}
-
-/* MARK: BAM File destructor */
-
-static rc_t BAMIndexWhack(const BAMIndex *);
-
-static rc_t BAMFileWhack(BAMFile *self) {
-    if (self->refSeq)
-        free(self->refSeq);
-    if (self->readGroup)
-        free(self->readGroup);
-    if (self->header)
-        free((void *)self->header);
-    if (self->headerData1)
-        free((void *)self->headerData1);
-    if (self->headerData2)
-        free((void *)self->headerData2);
-    if (self->ndx)
-        BAMIndexWhack(self->ndx);
-    if (self->nocopy)
-        free(self->nocopy);
-    if (self->vt.FileWhack)
-        self->vt.FileWhack(&self->file);
-
-    return 0;
-}
-
-/* MARK: BAM File constructors */
-
-/* file is retained */
-static rc_t BAMFileMakeWithKFileAndHeader(BAMFile const **cself,
-                                          KFile const *file,
-                                          char const *headerText,
-                                          bool threaded)
-{
-    BAMFile *self = calloc(1, sizeof(*self));
-    rc_t rc;
-    
-    if (self == NULL)
-        return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
-    
-    KRefcountInit(&self->refcount, 1, "BAMFile", "new", "");
-#ifndef WINDOWS
-    if (threaded)
-        rc = BGZThreadFileInit(&self->file.thread, file, &self->vt);
-    else
-#endif
-        rc = BGZFileInit(&self->file.plain, file, &self->vt);
-
-    if (rc == 0) {
-        rc = ProcessHeader(self, headerText);
-        if (rc == 0) {
-            *cself = self;
-            return 0;
-        }
-    }
-    BAMFileWhack(self);
-    return rc;
-}
-
-/* file is retained */
-LIB_EXPORT rc_t CC BAMFileMakeWithKFile(const BAMFile **cself, const KFile *file)
-{
-    return BAMFileMakeWithKFileAndHeader(cself, file, NULL, false);
-}
-
-LIB_EXPORT rc_t CC BAMFileVMakeWithDir(const BAMFile **result,
-                                         const KDirectory *dir,
-                                         const char *path,
-                                         va_list args
-                                         )
-{
-    rc_t rc;
-    const KFile *kf;
-    
-    if (result == NULL)
-        return RC(rcAlign, rcFile, rcOpening, rcParam, rcNull);
-    *result = NULL;
-    rc = KDirectoryVOpenFileRead(dir, &kf, path, args);
-    if (rc == 0) {
-        rc = BAMFileMakeWithKFile(result, kf);
-        KFileRelease(kf);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC BAMFileMakeWithDir(const BAMFile **result,
-                                        const KDirectory *dir,
-                                        const char *path, ...
-                                        )
-{
-    va_list args;
-    rc_t rc;
-    
-    va_start(args, path);
-    rc = BAMFileVMakeWithDir(result, dir, path, args);
-    va_end(args);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC BAMFileMake(const BAMFile **cself, const char *path, ...)
-{
-    KDirectory *dir;
-    va_list args;
-    rc_t rc;
-    
-    if (cself == NULL)
-        return RC(rcAlign, rcFile, rcOpening, rcParam, rcNull);
-    *cself = NULL;
-    
-    rc = KDirectoryNativeDir(&dir);
-    if (rc) return rc;
-    va_start(args, path);
-    rc = BAMFileVMakeWithDir(cself, dir, path, args);
-    va_end(args);
-    KDirectoryRelease(dir);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC BAMFileMakeWithHeader ( const BAMFile **cself,
-                                          char const headerText[],
-                                          char const path[], ... )
-{
-    KDirectory *dir;
-    va_list args;
-    rc_t rc;
-    const KFile *kf;
-    
-    if (cself == NULL)
-        return RC(rcAlign, rcFile, rcOpening, rcParam, rcNull);
-    *cself = NULL;
-    
-    rc = KDirectoryNativeDir(&dir);
-    if (rc) return rc;
-    va_start(args, path);
-    rc = KDirectoryVOpenFileRead(dir, &kf, path, args);
-    if (rc == 0) {
-        rc = BAMFileMakeWithKFileAndHeader(cself, kf, headerText, false);
-        KFileRelease(kf);
-    }
-    va_end(args);
-    KDirectoryRelease(dir);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC BAMFileMakeWithVPath(const BAMFile **cself, const VPath *path)
-{
-    VFSManager *vfs = NULL;
-    KFile const *fp = NULL;
-    rc_t rc = 0;
-
-    rc = VFSManagerMake(&vfs);
-    if (rc) return rc;
-
-    rc = VFSManagerOpenFileRead(vfs, &fp, path);
-    VFSManagerRelease(vfs);
-    if (rc) return rc;
-
-    rc = BAMFileMakeWithKFile(cself, fp);
-    if (rc) return rc;
-
-    KFileRelease(fp);
-    return 0;
-}
-
-/* MARK: BAM File ref-counting */
-
-LIB_EXPORT rc_t CC BAMFileAddRef(const BAMFile *cself) {
-    if (cself != NULL)
-        KRefcountAdd(&cself->refcount, "BAMFile");
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMFileRelease(const BAMFile *cself) {
-    rc_t rc = 0;
-    BAMFile *self = (BAMFile *)cself;
-    
-    if (cself != NULL) {
-        if (KRefcountDrop(&self->refcount, "BAMFile") == krefWhack) {
-            rc = BAMFileWhack(self);
-            free(self);
-        }
-    }
-    return rc;
-}
-
-/* MARK: BAM File positioning */
-
-LIB_EXPORT float CC BAMFileGetProportionalPosition(const BAMFile *self)
-{
-    return self->vt.FileProPos(&self->file);
-}
-
-LIB_EXPORT rc_t CC BAMFileGetPosition(const BAMFile *self, BAMFilePosition *pos) {
-    *pos = (self->fpos_cur << 16) | self->bufCurrent;
-    return 0;
-}
-
-static rc_t BAMFileSetPositionInt(const BAMFile *cself, uint64_t fpos, uint16_t bpos)
-{
-    rc_t rc;
-    BAMFile *self = (BAMFile *)cself;
-    
-    if (cself->fpos_first > fpos || fpos > cself->vt.FileGetSize(&cself->file) ||
-        (fpos == cself->fpos_first && bpos < cself->ucfirst))
-    {
-        return RC(rcAlign, rcFile, rcPositioning, rcParam, rcInvalid);
-    }
-    if (cself->fpos_cur == fpos) {
-        if (bpos <= cself->bufSize) {
-            self->eof = false;
-            self->bufCurrent = bpos;
-            return 0;
-        }
-        return RC(rcAlign, rcFile, rcPositioning, rcParam, rcInvalid);
-    }
-    rc = self->vt.FileSetPos(&self->file, fpos);
-    if (rc == 0) {
-        self->eof = false;
-        self->bufSize = 0; /* force re-read */
-        self->bufCurrent = bpos;
-        self->fpos_cur = fpos;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC BAMFileSetPosition(const BAMFile *cself, const BAMFilePosition *pos)
-{
-    return BAMFileSetPositionInt(cself, *pos >> 16, (uint16_t)(*pos));
-}
-
-LIB_EXPORT rc_t CC BAMFileRewind(const BAMFile *cself)
-{
-    return BAMFileSetPositionInt(cself, cself->fpos_first, cself->ucfirst);
-}
-
-static void BAMFileAdvance(BAMFile *const self, unsigned distance)
-{
-    self->bufCurrent += distance;
-    if (self->bufCurrent == self->bufSize) {
-        self->fpos_cur = self->vt.FileGetPos(&self->file);
-        self->bufCurrent = 0;
-        self->bufSize = 0;
-    }
-}
-
-/* MARK: BAM Alignment contruction */
-
-static int TagTypeSize(int const type)
-{
-    switch (type) {
-        case dt_ASCII:      /* A */
-        case dt_INT8:       /* c */
-        case dt_UINT8:      /* C */
-            return 1;
-
-        case dt_INT16:      /* s */
-        case dt_UINT16:     /* S */
-            return 2;
-
-        case dt_INT:        /* i */
-        case dt_UINT:       /* I */
-        case dt_FLOAT32:    /* f */
-            return 4;
-#if 0
-        case dt_FLOAT64:    /* d */
-            return 8;
-#endif
-        case dt_CSTRING:    /* Z */
-        case dt_HEXSTRING:  /* H */
-            return -'S';
-
-        case dt_NUM_ARRAY:  /* B */
-            return -'A';
-    }
-    return 0;
-}
-
-static void ColorCheck(BAMAlignment *const self, char const tag[2], unsigned const len)
-{
-    if (tag[0] == 'C' && len != 0) {
-        int const ch = tag[1];
-        int const flag = ch == 'Q' ? 2 : ch == 'S' ? 1 : 0;
-        
-        if (flag)
-            self->hasColor ^= (len << 2) | flag;
-    }
-}
-
-static rc_t ParseOptData(BAMAlignment *const self, size_t const maxsize,
-                         size_t const xtra, size_t const datasize)
-{
-    size_t const maxExtra = (maxsize - (sizeof(*self) - sizeof(self->extra))) / sizeof(self->extra[0]);
-    char const *const base = (char const *)self->data->raw;
-    unsigned i = 0;
-    unsigned len;
-    unsigned offset;
-    
-    self->numExtra = 0;
-    for (len = 0, offset = (unsigned)xtra; offset < datasize; offset += len) {
-        int const valuelen1 = TagTypeSize(base[offset + 2]);
-        unsigned valuelen;
-        
-        if (valuelen1 < 0) {
-            char const *const value = &base[offset + 3];
-            
-            if (-valuelen1 == 'S') {
-                valuelen = 0;
-                while (value[valuelen] != '\0') {
-                    ++valuelen;
-                    if (offset + valuelen >= datasize) {
-                        rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
-                        return rc;
-                    }
-                }
-                ColorCheck(self, base + offset, valuelen);
-                ++valuelen;
-            }
-            else {
-                int const elem_size = TagTypeSize(value[0]);
-                
-                assert(-valuelen1 == 'A');
-                if (elem_size <= 0) {
-                    rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcUnexpected);
-                    return rc;
-                }
-                else {
-                    int const elem_count = LE2HI32(&value[1]);
-                    
-                    valuelen = elem_size * elem_count + 1 + 4;
-                    if (offset + valuelen >= datasize) {
-                        rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
-                        return rc;
-                    }
-                }
-            }
-        }
-        else if (valuelen1 == 0) {
-            rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcUnexpected);
-            return rc;
-        }
-        else
-            valuelen = valuelen1;
-        
-        len = valuelen + 3;
-        if (i < maxExtra) {
-            self->extra[i].offset = offset;
-            self->extra[i].size   = len;
-        }
-        ++i;
-    }
-    self->numExtra = i;
-    if (2 <= i && i <= maxExtra)
-        ksort(self->extra, i, sizeof(self->extra[0]), OptTag_sort, self);
-
-    return 0;
-}
-
-static rc_t ParseOptDataLog(BAMAlignment *const self, unsigned const maxsize,
-                            unsigned const xtra, unsigned const datasize)
-{
-    unsigned const maxExtra = (maxsize - (sizeof(*self) - sizeof(self->extra))) / sizeof(self->extra[0]);
-    char const *const base = (char const *)self->data->raw;
-    unsigned i = 0;
-    unsigned len;
-    unsigned offset;
-    
-    self->numExtra = 0;
-    for (len = 0, offset = (unsigned)xtra; offset < datasize; offset += len) {
-        int const type = base[offset + 2];
-        int const valuelen1 = TagTypeSize(type);
-        unsigned valuelen;
-        
-        if (valuelen1 > 0)
-            valuelen = valuelen1;
-        else if (valuelen1 < 0) {
-            char const *const value = &base[offset + 3];
-            
-            if (-valuelen1 == 'S') {
-                valuelen = 0;
-                while (value[valuelen] != '\0') {
-                    ++valuelen;
-                    if (offset + valuelen >= datasize) {
-                        rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
-                        (void)LOGERR(klogErr, rc,
-                                     "Parsing BAM optional fields: "
-                                     "unterminated string");
-                        return rc;
-                    }
-                }
-                ColorCheck(self, base + offset, valuelen);
-                ++valuelen;
-            }
-            else {
-                int const elem_type = value[0];
-                int const elem_size = TagTypeSize(elem_type);
-                
-                assert(-valuelen1 == 'A');
-                if (elem_size <= 0) {
-                    rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcUnexpected);
-                    (void)LOGERR(klogErr, rc,
-                                 "Parsing BAM optional fields: "
-                                 "unknown array type");
-                    return rc;
-                }
-                else {
-                    int const elem_count = LE2HI32(&value[1]);
-                    
-                    valuelen = elem_size * elem_count + 1 + 4;
-                    if (offset + valuelen >= datasize) {
-                        rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
-                        (void)LOGERR(klogErr, rc,
-                                     "Parsing BAM optional fields: "
-                                     "array too big");
-                        return rc;
-                    }
-                }
-            }
-        }
-        else {
-            rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcUnexpected);
-            (void)LOGERR(klogErr, rc,
-                                    "Parsing BAM optional fields: "
-                                    "unknown type");
-            return rc;
-        }
-        
-        len = valuelen + 3;
-        if (i < maxExtra) {
-            self->extra[i].offset = offset;
-            self->extra[i].size   = len;
-        }
-        ++i;
-    }
-    self->numExtra = i;
-    if (2 <= i && i <= maxExtra)
-        ksort(self->extra, i, sizeof(self->extra[0]), OptTag_sort, self);
-    
-    return 0;
-}
-
-static unsigned CC BAMAlignmentSize(unsigned const max_extra_tags)
-{
-    BAMAlignment const *const y = NULL;
-    
-    return sizeof(*y) + (max_extra_tags ? max_extra_tags - 1 : 0) * sizeof(y->extra);
-}
-
-static unsigned BAMAlignmentSetOffsets(BAMAlignment *const self)
-{
-    unsigned const nameLen = getReadNameLength(self);
-    unsigned const cigCnt  = getCigarCount(self);
-    unsigned const readLen = getReadLen(self);
-    unsigned const cigar   = (unsigned)(&((struct bam_alignment_s const *)NULL)->read_name[nameLen] - (const char *)NULL);
-    unsigned const seq     = cigar + 4 * cigCnt;
-    unsigned const qual    = seq + (readLen + 1) / 2;
-    unsigned const xtra    = qual + readLen;
-    
-    self->cigar = cigar;
-    self->seq   = seq;
-    self->qual  = qual;
-    
-    return xtra;
-}
-
-static bool BAMAlignmentInit(BAMAlignment *const self, unsigned const maxsize,
-                             unsigned const datasize, void const *const data)
-{
-    memset(self, 0, sizeof(*self));
-    self->data = data;
-    self->datasize = datasize;
-    {
-        unsigned const xtra = BAMAlignmentSetOffsets(self);
-        
-        if (   datasize >= xtra
-            && datasize >= self->cigar
-            && datasize >= self->seq
-            && datasize >= self->qual)
-        {
-            rc_t const rc = ParseOptData(self, maxsize, xtra, datasize);
-
-            if (rc == 0)
-                return true;
-        }
-        return false;
-    }
-}
-
-static bool BAMAlignmentInitLog(BAMAlignment *const self, unsigned const maxsize,
-                                unsigned const datasize, void const *const data)
-{
-    memset(self, 0, sizeof(*self));
-    self->data = data;
-    self->datasize = datasize;
-    {
-        unsigned const xtra = BAMAlignmentSetOffsets(self);
-        
-        if (   datasize >= xtra
-            && datasize >= self->cigar
-            && datasize >= self->seq
-            && datasize >= self->qual)
-        {
-            rc_t const rc = ParseOptDataLog(self, maxsize, xtra, datasize);
-            
-            if (rc == 0) {
-                DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("{"
-                                                                "\"BAM record\": "
-                                                                "{ "
-                                                                    "\"size\": %u, "
-                                                                    "\"name length\": %u, "
-                                                                    "\"cigar count\": %u, "
-                                                                    "\"read length\": %u, "
-                                                                    "\"extra count\": %u "
-                                                                "}"
-                                                            "}\n",
-                                                            (unsigned)datasize,
-                                                            (unsigned)getReadNameLength(self),
-                                                            (unsigned)getCigarCount(self),
-                                                            (unsigned)getReadLen(self),
-                                                            (unsigned)self->numExtra));
-                return true;
-            }
-        }
-        DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("{"
-                                                        "\"BAM record\": "
-                                                        "{ "
-                                                            "\"size\": %u, "
-                                                            "\"name length\": %u, "
-                                                            "\"cigar count\": %u, "
-                                                            "\"read length\": %u "
-                                                        "}"
-                                                    "}\n",
-                                                    (unsigned)datasize,
-                                                    (unsigned)getReadNameLength(self),
-                                                    (unsigned)getCigarCount(self),
-                                                    (unsigned)getReadLen(self)));
-        return false;
-    }
-}
-
-static void BAMAlignmentLogParseError(BAMAlignment const *self)
-{
-    char const *const reason = self->cigar > self->datasize ? "BAM Record CIGAR too long"
-                             : self->seq   > self->datasize ? "BAM Record SEQ too long"
-                             : self->qual  > self->datasize ? "BAM Record QUAL too long"
-                             : self->qual + getReadLen(self) > self->datasize ? "BAM Record EXTRA too long"
-                             : "BAM Record EXTRA parsing failure";
-    
-    LOGERR(klogErr, SILENT_RC(rcAlign, rcFile, rcReading, rcRow, rcInvalid), reason);
-}
-
-/* MARK: BAM Alignment readers */
-
-/* returns
- *  (rcAlign, rcFile, rcReading, rcBuffer, rcNotAvailable)
- * or
- *  (rcAlign, rcFile, rcReading, rcBuffer, rcInsufficient)
- * if should read with copy
- */
-static
-rc_t BAMFileReadNoCopy(BAMFile *const self, unsigned actsize[], BAMAlignment rhs[],
-                       unsigned const maxsize)
-{
-    unsigned const maxPeek = BAMFileMaxPeek(self);
-    bool isgood;
-
-    *actsize = 0;
-    
-    if (maxPeek == 0) {
-        rc_t const rc = BAMFileFillBuffer(self);
-
-        if (rc == 0)
-            return BAMFileReadNoCopy(self, actsize, rhs, maxsize);
-
-        if ( GetRCObject( rc ) == (enum RCObject)rcData && GetRCState( rc ) == rcInsufficient )
-        {
-            self->eof = true;
-            return SILENT_RC(rcAlign, rcFile, rcReading, rcRow, rcNotFound);
-        }
-        return rc;
-    }
-    if (maxPeek < 4)
-        return SILENT_RC(rcAlign, rcFile, rcReading, rcBuffer, rcNotAvailable);
-    else {
-        int32_t const i32 = BAMFilePeekI32(self);
-
-        if (i32 <= 0)
-            return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
-        
-        if (maxPeek < ( uint32_t ) i32 + 4)
-            return SILENT_RC(rcAlign, rcFile, rcReading, rcBuffer, rcNotAvailable);
-        
-        isgood = BAMAlignmentInitLog(rhs, maxsize, i32, BAMFilePeek(self, 4));
-        rhs[0].parent = self;
-        KRefcountInit(&rhs->refcount, 1, "BAMAlignment", "ReadNoCopy", "");
-    }
-    *actsize = BAMAlignmentSize(rhs[0].numExtra);
-    if (isgood && *actsize > maxsize)
-        return SILENT_RC(rcAlign, rcFile, rcReading, rcBuffer, rcInsufficient);
-
-    BAMFileAdvance(self, 4 + rhs->datasize);
-    return isgood ? 0 : RC(rcAlign, rcFile, rcReading, rcRow, rcInvalid);
-}
-
-static
-unsigned BAMAlignmentSizeFromData(unsigned const datasize, void const *data)
-{
-    BAMAlignment temp;
-    
-    BAMAlignmentInit(&temp, sizeof(temp), datasize, data);
-    
-    return BAMAlignmentSize(temp.numExtra);
-}
-
-static bool BAMAlignmentIsEmpty(BAMAlignment const *const self)
-{
-    if (getReadNameLength(self) == 0)
-        return true;
-    if (self->hasColor == 3)
-        return false;
-    if (getReadLen(self) != 0)
-        return false;
-    if (getCigarCount(self) != 0)
-        return false;
-    return true;
-}
-
-static
-rc_t BAMFileReadCopy(BAMFile *const self, BAMAlignment const *rslt[], bool const log)
-{
-    void *storage;
-    void const *data;
-    unsigned datasize;
-    rc_t rc;
-    
-    rslt[0] = NULL;
-    {
-        int32_t i32;
-
-        rc = BAMFileReadI32(self, &i32);
-        if ( rc != 0 )
-        {
-            if ( GetRCObject( rc ) == (enum RCObject)rcData && GetRCState( rc ) == rcInsufficient )
-            {
-                self->eof = true;
-                rc = RC( rcAlign, rcFile, rcReading, rcRow, rcNotFound );
-            }
-            return rc;
-        }
-        if (i32 <= 0)
-            return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
-        
-        datasize = i32;
-    }
-    if (BAMFileMaxPeek(self) < datasize) {
-        data = storage = malloc(datasize);
-        if (storage == NULL)
-            return RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
-        
-        rc = BAMFileReadn(self, datasize, storage);
-    }
-    else {
-        storage = NULL;
-        data = (bam_alignment *)&self->buffer[self->bufCurrent];
-        
-        BAMFileAdvance(self, datasize);
-    }
-    if (rc == 0) {
-        unsigned const rsltsize = BAMAlignmentSizeFromData(datasize, data);
-        BAMAlignment *const y = malloc(rsltsize);
-
-        if (y) {
-            if ((log ? BAMAlignmentInitLog : BAMAlignmentInit)(y, rsltsize, datasize, data)) {
-                if (storage == NULL)
-                    self->bufLocker = y;
-                else
-                    y->storage = storage;
-
-                y->parent = self;
-                KRefcountInit(&y->refcount, 1, "BAMAlignment", "ReadCopy", "");
-                BAMFileAddRef(self);
-                rslt[0] = y;
-
-                if (BAMAlignmentIsEmpty(y))
-                    return RC(rcAlign, rcFile, rcReading, rcRow, rcEmpty);
-                return 0;
-            }
-            rc = RC(rcAlign, rcFile, rcReading, rcRow, rcInvalid);
-            free(y);
-        }
-        else
-            rc = RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
-    }
-    free(storage);
-
-    return rc;
-}
-
-static
-rc_t BAMFileBreakLock(BAMFile *const self)
-{
-    if (self->bufLocker != NULL) {
-        if (self->bufLocker->storage == NULL)
-            self->bufLocker->storage = malloc(self->bufLocker->datasize);
-        if (self->bufLocker->storage == NULL)
-            return RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
-        
-        memcpy(self->bufLocker->storage, self->bufLocker->data, self->bufLocker->datasize);
-        self->bufLocker->data = (bam_alignment *)&self->bufLocker->storage[0];
-        self->bufLocker = NULL;
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMFileRead2(const BAMFile *cself, const BAMAlignment **rhs)
-{
-    BAMFile *const self = (BAMFile *)cself;
-    unsigned actsize = 0;
-    rc_t rc;
-    
-    if (self == NULL || rhs == NULL)
-        return RC(rcAlign, rcFile, rcReading, rcParam, rcNull);
-    
-    *rhs = NULL;
-    
-    if (self->bufCurrent >= self->bufSize && self->eof)
-        return RC(rcAlign, rcFile, rcReading, rcRow, rcNotFound);
-
-    rc = BAMFileBreakLock(self);
-    if (rc)
-        return rc;
-
-    if (self->nocopy_size == 0) {
-        size_t const size = 4096u;
-        void *const temp = malloc(size);
-
-        if (temp == NULL)
-            return RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
-
-        self->nocopy = temp;
-        self->nocopy_size = size;
-    }
-
-AGAIN:
-    rc = BAMFileReadNoCopy(self, &actsize, self->nocopy, (unsigned)self->nocopy_size);
-    if (rc == 0) {
-        *rhs = self->nocopy;
-        if (BAMAlignmentIsEmpty(self->nocopy)) {
-            rc = RC(rcAlign, rcFile, rcReading, rcRow, rcEmpty);
-            LOGERR(klogWarn, rc, "BAM Record contains no alignment or sequence data");
-        }
-    }
-    else if ( GetRCObject( rc ) == (enum RCObject)rcBuffer && GetRCState( rc ) == rcInsufficient )
-    {
-        unsigned const size = (actsize + 4095u) & ~4095u;
-        void *const temp = realloc(self->nocopy, size);
-
-        if (temp == NULL)
-            return RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
-        
-        self->nocopy = temp;
-        self->nocopy_size = size;
-
-        goto AGAIN;
-    }
-    else if ( GetRCObject( rc ) == (enum RCObject)rcBuffer && GetRCState( rc ) == rcNotAvailable )
-    {
-        rc = BAMFileReadCopy( self, rhs, true );
-    }
-    else if (GetRCObject(rc) == rcRow && GetRCState(rc) == rcInvalid) {
-        BAMAlignmentLogParseError(self->nocopy);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC BAMFileRead(const BAMFile *cself, const BAMAlignment **rhs)
-{
-    BAMFile *const self = (BAMFile *)cself;
-    
-    if (self == NULL || rhs == NULL)
-        return RC(rcAlign, rcFile, rcReading, rcParam, rcNull);
-    
-    *rhs = NULL;
-    
-    if (self->bufCurrent >= self->bufSize && self->eof)
-        return RC(rcAlign, rcFile, rcReading, rcRow, rcNotFound);
-    else {
-        rc_t const rc = BAMFileBreakLock(self);
-        if (rc)
-            return rc;
-    }
-    return BAMFileReadCopy(self, rhs, false);
-}
-
-/* MARK: BAM File header info accessor */
-
-LIB_EXPORT rc_t CC BAMFileGetRefSeqById(const BAMFile *cself, int32_t id, const BAMRefSeq **rhs)
-{
-    *rhs = NULL;
-    if (id >= 0 && id < cself->refSeqs)
-        *rhs = &cself->refSeq[id];
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMFileGetReadGroupByName(const BAMFile *cself, const char *name, const BAMReadGroup **rhs)
-{
-    BAMReadGroup rg;
-    
-    *rhs = NULL;
-
-    rg.name = name;
-    if (rg.name != NULL)
-        *rhs = kbsearch(&rg, cself->readGroup, cself->readGroups, sizeof(rg), comp_ReadGroup, NULL);
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMFileGetRefSeqCount(const BAMFile *cself, unsigned *rhs)
-{
-    *rhs = cself->refSeqs;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMFileGetRefSeq(const BAMFile *cself, unsigned i, const BAMRefSeq **rhs)
-{
-    *rhs = NULL;
-    if (i < cself->refSeqs)
-        *rhs = &cself->refSeq[i];
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMFileGetReadGroupCount(const BAMFile *cself, unsigned *rhs)
-{
-    *rhs = cself->readGroups;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMFileGetReadGroup(const BAMFile *cself, unsigned i, const BAMReadGroup **rhs)
-{
-    *rhs = NULL;
-    if (i < cself->readGroups)
-        *rhs = &cself->readGroup[i];
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMFileGetHeaderText(BAMFile const *cself, char const **header, size_t *header_len)
-{
-    *header = cself->header;
-    *header_len = *header ? string_size( *header ) : 0;
-    return 0;
-}
-
-/* MARK: BAM Alignment destructor */
-
-static rc_t BAMAlignmentWhack(BAMAlignment *self)
-{
-    if (self->parent->bufLocker == self)
-        self->parent->bufLocker = NULL;
-    if (self != self->parent->nocopy) {
-        BAMFileRelease(self->parent);
-        free(self->storage);
-        free(self);
-    }
-    return 0;
-}
-
-/* MARK: BAM Alignment ref-counting */
-
-LIB_EXPORT rc_t CC BAMAlignmentAddRef(const BAMAlignment *cself)
-{
-    if (cself != NULL)
-        KRefcountAdd(&cself->refcount, "BAMAlignment");
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentRelease(const BAMAlignment *cself)
-{
-    if (cself && KRefcountDrop(&cself->refcount, "BAMAlignment") == krefWhack)
-        BAMAlignmentWhack((BAMAlignment *)cself);
-
-    return 0;
-}
-
-#if 0
-LIB_EXPORT uint16_t CC BAMAlignmentIffyFields(const BAMAlignment *self)
-{
-}
-
-LIB_EXPORT uint16_t CC BAMAlignmentBadFields(const BAMAlignment *self)
-{
-}
-#endif
-
-/* MARK: BAM Alignment accessors */
-
-static uint32_t BAMAlignmentGetCigarElement(const BAMAlignment *self, unsigned i)
-{
-    return LE2HUI32(&((uint8_t const *)getCigarBase(self))[i * 4]);
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetRefSeqId(const BAMAlignment *cself, int32_t *rhs)
-{
-    *rhs = getRefSeqId(cself);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetPosition(const BAMAlignment *cself, int64_t *rhs)
-{
-    *rhs = getPosition(cself);
-    return 0;
-}
-
-LIB_EXPORT bool CC BAMAlignmentIsMapped(const BAMAlignment *cself)
-{
-    if (((getFlags(cself) & BAMFlags_SelfIsUnmapped) == 0) && getRefSeqId(cself) >= 0 && getPosition(cself) >= 0)
-        return true;
-    return false;
-}
-
-/* static bool BAMAlignmentIsMateMapped(const BAMAlignment *cself)
-{
-    if (((getFlags(cself) & BAMFlags_MateIsUnmapped) == 0) && getMateRefSeqId(cself) >= 0 && getMatePos(cself) >= 0)
-        return true;
-    return false;
-} */
-
-LIB_EXPORT rc_t CC BAMAlignmentGetAlignmentDetail(
-                                                  const BAMAlignment *self,
-                                                  BAMAlignmentDetail *rslt, uint32_t count, uint32_t *actual,
-                                                  int32_t *pfirst, int32_t *plast
-                                                  )
-{
-    unsigned i;
-    unsigned ccnt; /* cigar count */
-    int32_t  gpos; /* refSeq pos in global coordinates */
-    unsigned rpos; /* read pos (always local coordinates) */
-    uint32_t rlen; /* read length */
-    int32_t first = -1;
-    int32_t last = -1;
-
-    if (!self)
-        return RC(rcAlign, rcFile, rcReading, rcSelf, rcNull);
-
-    rlen = getReadLen(self);
-    ccnt = getCigarCount(self);
-    gpos = getPosition(self);
-    
-    if (gpos < 0)
-        ccnt = 0;
-    
-    if (actual)
-        *actual = ccnt;
-    
-    if (pfirst)
-        *pfirst = -1;
-
-    if (plast)
-        *plast = -1;
-
-    if (ccnt == 0)
-        return 0;
-    
-    if (rslt == NULL) {
-        if (actual == NULL)
-            return RC(rcAlign, rcFile, rcReading, rcParam, rcNull);
-        count = 0;
-    }
-    
-    if (count < ccnt)
-        return RC(rcAlign, rcFile, rcReading, rcBuffer, rcInsufficient);
-        
-    for (rpos = 0, i = 0; i != ccnt; ++i) {
-        uint32_t len = BAMAlignmentGetCigarElement(self, i);
-        int op = len & 0x0F;
-        
-        if (op > sizeof(cigarChars))
-            return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
-        
-        op = cigarChars[op];
-        len >>= 4;
-        
-        rslt[i].refSeq_pos = gpos;
-        rslt[i].read_pos = rpos;
-        rslt[i].length = len;
-        rslt[i].type = (BAMCigarType)op;
-        
-        switch ((BAMCigarType)op) {
-        case ct_Match:
-        case ct_Equal:
-            if (first == -1)
-                first = i;
-            last = i;
-            gpos += len;
-            rpos += len;
-            break;
-        case ct_Insert:
-        case ct_SoftClip:
-            gpos += len;
-            break;
-        case ct_Delete:
-        case ct_Skip:
-            rpos += len;
-            break;
-        case ct_HardClip:
-        case ct_Padded:
-            rslt[i].refSeq_pos = -1;
-            rslt[i].read_pos = -1;
-            break;
-        default:
-            break;
-        }
-        
-        if (rslt[i].read_pos > rlen)
-            return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
-    }
-    if (pfirst)
-        *pfirst = first;
-    
-    if (plast)
-        *plast = last;
-    
-    return 0;
-}
-
-static
-unsigned ReferenceLengthFromCIGAR(const BAMAlignment *self)
-{
-    unsigned i;
-    unsigned n = getCigarCount(self);
-    unsigned y;
-    
-    for (i = 0, y = 0; i != n; ++i) {
-        uint32_t const len = BAMAlignmentGetCigarElement(self, i);
-        
-        switch (cigarChars[len & 0x0F]) {
-        case ct_Match:
-        case ct_Equal:
-        case ct_NotEqual:
-        case ct_Delete:
-        case ct_Skip:
-            y += len >> 4;
-            break;
-        default:
-            break;
-        }
-    }
-    return y;
-}
-
-static
-unsigned SequenceLengthFromCIGAR(const BAMAlignment *self)
-{
-    unsigned i;
-    unsigned n = getCigarCount(self);
-    unsigned y;
-    
-    for (i = 0, y = 0; i != n; ++i) {
-        uint32_t const len = BAMAlignmentGetCigarElement(self, i);
-        
-        switch (cigarChars[len & 0x0F]) {
-        case ct_Match:
-        case ct_Equal:
-        case ct_NotEqual:
-        case ct_Insert:
-        case ct_SoftClip:
-            y += len >> 4;
-            break;
-        default:
-            break;
-        }
-    }
-    return y;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetPosition2(const BAMAlignment *cself, int64_t *rhs, uint32_t *length)
-{
-    *rhs = getPosition(cself);
-    if (*rhs >= 0)
-        *length = ReferenceLengthFromCIGAR(cself);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetReadGroupName(const BAMAlignment *cself, const char **rhs)
-{
-    *rhs = get_RG(cself);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetReadName(const BAMAlignment *cself, const char **rhs)
-{
-    *rhs = getReadName(cself);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetReadName2(const BAMAlignment *cself, const char **rhs, size_t *length)
-{
-    *length = getReadNameLength(cself) - 1;
-    *rhs = getReadName(cself);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetReadName3(const BAMAlignment *cself, const char **rhs, size_t *length)
-{
-    char const *const name = getReadName(cself);
-    size_t len = getReadNameLength(cself);
-    size_t i;
-    
-    for (i = len; i; ) {
-        int const ch = name[--i];
-        
-        if (ch == '/') {
-            len = i;
-            break;
-        }
-        if (!isdigit(ch))
-            break;
-    }
-    *rhs = name;
-    *length = len;
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetFlags(const BAMAlignment *cself, uint16_t *rhs)
-{
-    *rhs = getFlags(cself);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetMapQuality(const BAMAlignment *cself, uint8_t *rhs)
-{
-    *rhs = getMapQual(cself);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetCigarCount(const BAMAlignment *cself, unsigned *rhs)
-{
-    *rhs = getCigarCount(cself);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetRawCigar(const BAMAlignment *cself, uint32_t const *rslt[], uint32_t *length)
-{
-    *rslt = getCigarBase(cself);
-    *length = getCigarCount(cself);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetCigar(const BAMAlignment *cself, uint32_t i, BAMCigarType *type, uint32_t *length)
-{
-    uint32_t x;
-    
-    if (i >= getCigarCount(cself))
-        return RC(rcAlign, rcFile, rcReading, rcParam, rcInvalid);
-
-    x = BAMAlignmentGetCigarElement(cself, i);
-    *type = (BAMCigarType)(cigarChars[x & 0x0F]);
-    *length = x >> 4;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetReadLength(const BAMAlignment *cself, uint32_t *rhs)
-{
-    *rhs = getReadLen(cself);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetSequence2(const BAMAlignment *cself, char *rhs, uint32_t start, uint32_t stop)
-{
-    /*
-     *   =    A    C    M    G    R    S    V    T    W    Y    H    K    D    B    N
-     * 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
-     * 1111 1000 0100 1100 0010 1010 0110 1110 0001 1001 0101 1101 0011 1011 0111 0000
-     *   N    T    G    K    C    Y    S    B    A    W    R    D    M    H    V    =
-     */
-    static const char  tr[16] = "=ACMGRSVTWYHKDBN";
- /* static const char ctr[16] = "=TGKCYSBAWRDMHVN"; */
-    unsigned const n = getReadLen(cself);
-    const uint8_t * const seq = &cself->data->raw[cself->seq];
-    unsigned si, di;
-    
-    if (stop == 0 || stop > n)
-        stop = n;
-    
-    for (di = 0, si = start; si != stop; ++si, ++di) {
-        unsigned const b4na2 = seq[si >> 1];
-        unsigned const b4na = (si & 1) == 0 ? (b4na2 >> 4) : (b4na2 & 0x0F);
-        
-        rhs[di] = tr[b4na];
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetSequence(const BAMAlignment *cself, char *rhs)
-{
-    return BAMAlignmentGetSequence2(cself, rhs, 0, 0);
-}
-
-LIB_EXPORT bool CC BAMAlignmentHasColorSpace(BAMAlignment const *cself)
-{
-    return get_CS(cself) != NULL;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetCSKey(BAMAlignment const *cself, char rhs[1])
-{
-    char const *const vCS = get_CS(cself);
-    
-    if (vCS)
-        rhs[0] = vCS[0];
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetCSSeqLen(BAMAlignment const *cself, uint32_t *rhs)
-{
-    struct offset_size_s const *const vCS = get_CS_info(cself);
-    
-    *rhs = vCS ? vCS->size - 5 : 0;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetCSSequence(BAMAlignment const *cself, char rhs[], uint32_t seqlen)
-{
-    char const *const vCS = get_CS(cself);
-    
-    if (vCS) {
-        unsigned i;
-        
-        for (i = 0;i != seqlen; ++i) {
-            char const ch = vCS[i+1];
-            
-            rhs[i] = (ch == '4') ? '.' : ch;
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetQuality(const BAMAlignment *cself, const uint8_t **rhs)
-{
-    *rhs = &cself->data->raw[cself->qual];
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetQuality2(BAMAlignment const *cself, uint8_t const **rhs, uint8_t *offset)
-{
-    uint8_t const *const OQ = get_OQ(cself);
-    
-    if (OQ) {
-        struct offset_size_s const *const oq = get_OQ_info(cself);
-        
-        if (oq->size - 4 == getReadLen(cself)) {
-            *offset = 33;
-            *rhs = OQ;
-        }
-        else
-            return RC(rcAlign, rcRow, rcReading, rcData, rcInconsistent);
-    }
-    else {
-        *offset = 0;
-        *rhs = &cself->data->raw[cself->qual];
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetCSQuality(BAMAlignment const *cself, uint8_t const **rhs, uint8_t *offset)
-{
-    struct offset_size_s const *const cs = get_CS_info(cself);
-    struct offset_size_s const *const cq = get_CQ_info(cself);
-    uint8_t const *const CQ = get_CQ(cself);
-    
-    if (cs && cq && CQ) {
-        if (cs->size == cq->size) {
-            *offset = 33;
-            *rhs = CQ + 1;
-            return 0;
-        }
-        if (cs->size == cq->size + 1) {
-            *offset = 33;
-            *rhs = CQ;
-            return 0;
-        }
-        return RC(rcAlign, rcRow, rcReading, rcData, rcInconsistent);
-    }
-    *offset = 0;
-    *rhs = &cself->data->raw[cself->qual];
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetMateRefSeqId(const BAMAlignment *cself, int32_t *rhs)
-{
-    *rhs = getMateRefSeqId(cself);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetMatePosition(const BAMAlignment *cself, int64_t *rhs)
-{
-    *rhs = getMatePos(cself);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentGetInsertSize(const BAMAlignment *cself, int64_t *rhs)
-{
-    *rhs = getInsertSize(cself);
-    return 0;
-}
-
-static int FormatOptData(BAMAlignment const *const self,
-                         size_t const maxsize,
-                         char buffer[])
-{
-    char const *const base = (char const *)&self->data->raw[self->qual + getReadLen(self)];
-    unsigned i;
-    unsigned offset;
-    unsigned cur = 0;
-    int j;
-    
-    for (i = 0, offset = 0; i < self->numExtra; ++i) {
-        int type;
-        union { float f; uint32_t i; } fi;
-        
-        if (cur + 7 > maxsize)
-            return -1;
-        buffer[cur++] = '\t';
-        buffer[cur++] = base[offset++];
-        buffer[cur++] = base[offset++];
-        buffer[cur++] = ':';
-        type = base[offset++];
-
-        switch (type) {
-            case dt_ASCII:      /* A */
-                buffer[cur++] = 'A';
-                buffer[cur++] = ':';
-                buffer[cur++] = base[offset++];
-                break;
-
-            case dt_INT8:       /* c */
-                buffer[cur++] = 'i';
-                buffer[cur++] = ':';
-                j = snprintf(buffer + cur, maxsize - cur, "%i", (int)*((int8_t const *)(base + offset)));
-                if ((cur += j) >= maxsize)
-                    return -1;
-                offset += 1;
-                break;
-
-            case dt_UINT8:      /* C */
-                buffer[cur++] = 'i';
-                buffer[cur++] = ':';
-                j = snprintf(buffer + cur, maxsize - cur, "%u", (unsigned)*((uint8_t const *)(base + offset)));
-                if ((cur += j) >= maxsize)
-                    return -1;
-                offset += 1;
-                break;
-                
-            case dt_INT16:      /* s */
-                buffer[cur++] = 'i';
-                buffer[cur++] = ':';
-                j = snprintf(buffer + cur, maxsize - cur, "%i", (int)LE2HI16(base + offset));
-                if ((cur += j) >= maxsize)
-                    return -1;
-                offset += 2;
-                break;
-
-            case dt_UINT16:     /* S */
-                buffer[cur++] = 'i';
-                buffer[cur++] = ':';
-                j = snprintf(buffer + cur, maxsize - cur, "%u", (unsigned)LE2HUI16(base + offset));
-                if ((cur += j) >= maxsize)
-                    return -1;
-                offset += 2;
-                break;
-                
-            case dt_INT:        /* i */
-                buffer[cur++] = 'i';
-                buffer[cur++] = ':';
-                j = snprintf(buffer + cur, maxsize - cur, "%i", (int)LE2HI32(base + offset));
-                if ((cur += j) >= maxsize)
-                    return -1;
-                offset += 4;
-                break;
-
-            case dt_UINT:       /* I */
-                buffer[cur++] = 'i';
-                buffer[cur++] = ':';
-                j = snprintf(buffer + cur, maxsize - cur, "%i", (int)LE2HI32(base + offset));
-                if ((cur += j) >= maxsize)
-                    return -1;
-                offset += 4;
-                break;
-
-            case dt_FLOAT32:    /* f */
-                buffer[cur++] = 'f';
-                buffer[cur++] = ':';
-                fi.i = LE2HUI32(base + offset);
-                j = snprintf(buffer + cur, maxsize - cur, "%f", fi.f);
-                if ((cur += j) >= maxsize)
-                    return -1;
-                offset += 4;
-                break;
-
-            case dt_HEXSTRING:  /* H */
-            case dt_CSTRING:    /* Z */
-                buffer[cur++] = type == dt_CSTRING ? 'Z' : 'H';
-                buffer[cur++] = ':';
-                for ( ; ; ) {
-                    int const ch = base[offset++];
-                    
-                    if (ch == '\0')
-                        break;
-                    if (cur >= maxsize)
-                        return -1;
-                    buffer[cur++] = ch;
-                }
-                break;
-
-            case dt_NUM_ARRAY:  /* B */
-                buffer[cur++] = 'B';
-                buffer[cur++] = ':';
-                {
-                    int const elemtype = base[offset++];
-                    unsigned const elemcount = LE2HUI32(base + offset);
-                    unsigned k;
-
-                    if (cur + 2 >= maxsize)
-                        return -1;
-                    buffer[cur++] = elemtype;
-                    offset += 4;
-                    for (k = 0; k < elemcount; ++k) {
-                        buffer[cur++] = ',';
-                        switch (elemtype) {
-                            case dt_INT8:
-                                j = snprintf(buffer + cur, maxsize - cur, "%i", (int)*((int8_t const *)(base + offset)));
-                                if ((cur += j) >= maxsize)
-                                    return -1;
-                                offset += 1;
-                                break;
-                                
-                            case dt_UINT8:
-                                j = snprintf(buffer + cur, maxsize - cur, "%u", (unsigned)*((uint8_t const *)(base + offset)));
-                                if ((cur += j) >= maxsize)
-                                    return -1;
-                                offset += 1;
-                                break;
-                                
-                            case dt_INT16:
-                                j = snprintf(buffer + cur, maxsize - cur, "%i", (int)LE2HI16(base + offset));
-                                if ((cur += j) >= maxsize)
-                                    return -1;
-                                offset += 2;
-                                break;
-                                
-                            case dt_UINT16:
-                                j = snprintf(buffer + cur, maxsize - cur, "%u", (unsigned)LE2HUI16(base + offset));
-                                if ((cur += j) >= maxsize)
-                                    return -1;
-                                offset += 2;
-                                break;
-                                
-                            case dt_INT:
-                                j = snprintf(buffer + cur, maxsize - cur, "%i", (int)LE2HI32(base + offset));
-                                if ((cur += j) >= maxsize)
-                                    return -1;
-                                offset += 4;
-                                break;
-                                
-                            case dt_UINT:
-                                j = snprintf(buffer + cur, maxsize - cur, "%u", (unsigned)LE2HUI32(base + offset));
-                                if ((cur += j) >= maxsize)
-                                    return -1;
-                                offset += 4;
-                                break;
-                                
-                            case dt_FLOAT32:
-                                fi.i = LE2HUI32(base + offset);
-                                j = snprintf(buffer + cur, maxsize - cur, "%f", fi.f);
-                                if ((cur += j) >= maxsize)
-                                    return -1;
-                                offset += 4;
-
-                            default:
-                                return -1;
-                                break;
-                        }
-                    }
-                }
-                break;
-
-            default:
-                return -1;
-                break;
-        }
-    }
-    return cur;
-}
-
-static rc_t FormatSAM(BAMAlignment const *self,
-                      size_t *const actsize,
-                      size_t const maxsize,
-                      char *const buffer)
-{
-    int i = 0;
-    size_t cur = 0;
-    unsigned j;
-    int const refSeqId = getRefSeqId(self);
-    int const refPos = getPosition(self);
-    unsigned const cigCount = getCigarCount(self);
-    uint32_t const *const cigar = getCigarBase(self);
-    int const mateRefSeqId = getMateRefSeqId(self);
-    int const mateRefPos = getMatePos(self);
-    unsigned const readlen = getReadLen(self);
-
-    i = snprintf(&buffer[cur], maxsize - cur,
-                 "%s\t%i\t%s\t%i\t%i\t",
-                 getReadName(self),
-                 getFlags(self),
-                 refSeqId < 0 ? "*" : self->parent->refSeq[refSeqId].name,
-                 refPos < 0 ? 0 : refPos + 1,
-                 getMapQual(self)
-                 );
-    if ((cur += i) > maxsize)
-        return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
-
-    if (cigCount > 0) {
-        for (j = 0; j < cigCount; ++j) {
-            uint32_t const el = cigar[j];
-            BAMCigarType const type = (BAMCigarType)(cigarChars[el & 0x0F]);
-            unsigned const length = el >> 4;
-
-            i = snprintf(&buffer[cur], maxsize - cur, "%u%c", length, type);
-            if ((cur += i) > maxsize)
-                return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
-        }
-    }
-    else {
-        if ((cur + 1) > maxsize)
-            return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
-        buffer[cur++] = '*';
-    }
-    i = snprintf(&buffer[cur], maxsize - cur,
-                 "\t%s\t%i\t%i\t",
-                 mateRefSeqId < 0 ? "*" : mateRefSeqId == refSeqId ? "=" : self->parent->refSeq[mateRefSeqId].name,
-                 mateRefPos < 0 ? 0 : mateRefPos + 1,
-                 getInsertSize(self)
-                 );
-    if ((cur += i) > maxsize)
-        return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
-    if (readlen) {
-        uint8_t const *const qual = &self->data->raw[self->qual];
-        
-        if (cur + 2 * readlen + 1 > maxsize)
-            return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
-        BAMAlignmentGetSequence(self, &buffer[cur]);
-        cur += readlen;
-        buffer[cur] = '\t';
-        ++cur;
-        
-        for (j = 0; j < readlen; ++j) {
-            if (qual[j] != 0xFF)
-                goto HAS_QUAL;
-        }
-        if (1) {
-            buffer[cur++] = '*';
-        }
-        else {
-    HAS_QUAL:
-            for (j = 0; j < readlen; ++j)
-                buffer[cur++] = qual[j] + 33;
-        }
-    }
-    else {
-        i = snprintf(&buffer[cur], maxsize - cur, "*\t*");
-        if ((cur += i) > maxsize)
-            return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
-    }
-    i = FormatOptData(self, maxsize - cur, &buffer[cur]);
-    if (i < 0)
-        return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
-    if ((cur += i) + 2 > maxsize)
-        return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
-    buffer[cur++] = '\n';
-    buffer[cur] = '\0';
-    *actsize = cur;
-
-    return 0;
-}
-
-#define FORMAT_SAM_SCRATCH_SIZE ((size_t)(64u * 1024u))
-static rc_t FormatSAMBuffer(BAMAlignment const *self,
-                            size_t actSize[],
-                            size_t const maxsize,
-                            char *const buffer)
-{
-    char scratch[FORMAT_SAM_SCRATCH_SIZE];
-    size_t actsize = 0;
-    rc_t const rc = FormatSAM(self, &actsize, FORMAT_SAM_SCRATCH_SIZE, scratch);
-
-    actSize[0] = actsize;
-    if (rc) return rc;
-    
-    if (actsize > maxsize)
-        return RC(rcAlign, rcReading, rcRow, rcBuffer, rcInsufficient);
-
-    memcpy(buffer, scratch, actsize);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentFormatSAM(BAMAlignment const *self,
-                                         size_t *const actSize,
-                                         size_t const maxsize,
-                                         char *const buffer)
-{
-    if (self == NULL)
-        return RC(rcAlign, rcReading, rcRow, rcSelf, rcNull);
-    if (buffer == NULL)
-        return RC(rcAlign, rcReading, rcRow, rcParam, rcNull);
-    else {
-        size_t actsize = 0;
-        rc_t const rc = (maxsize < FORMAT_SAM_SCRATCH_SIZE ? FormatSAMBuffer : FormatSAM)(self, &actsize, maxsize, buffer);
-
-        if (actSize)
-            *actSize = actsize;
-        return rc;
-    }
-}
-
-typedef struct OptForEach_ctx_s {
-    BAMOptData *val;
-    BAMOptData **alloced;
-    size_t valsize;
-    rc_t rc;
-    BAMOptionalDataFunction user_f;
-    void *user_ctx;
-} OptForEach_ctx_t;
-
-static bool i_OptDataForEach(BAMAlignment const *cself, void *Ctx, char const tag[2], BAMOptDataValueType type, unsigned count, void const *value, unsigned size)
-{
-    OptForEach_ctx_t *ctx = (OptForEach_ctx_t *)Ctx;
-    size_t const need = (size_t)&((BAMOptData const *)NULL)->u.f64[(count * size + sizeof(double) - 1)/sizeof(double)];
-    
-    if (need > ctx->valsize) {
-        void *const temp = realloc(ctx->alloced, need);
-        if (temp == NULL) {
-            ctx->rc = RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
-            return true;
-        }
-        *ctx->alloced = ctx->val = temp;
-        ctx->valsize = need;
-    }
-    ctx->val->type = type;
-    ctx->val->element_count = (type == dt_CSTRING || type == dt_HEXSTRING) ? size - 1 : count;
-    
-    memcpy(ctx->val->u.u8, value, size * count);
-#if __BYTE_ORDER == __BIG_ENDIAN
-    {{
-        unsigned di;
-        uint32_t elem_count = ctx->val->element_count;
-        
-        switch (size) {
-        case 2:
-            for (di = 0; di != elem_count; ++di)
-                ctx->val->u.u16[di] = LE2HUI16(&ctx->val->u.u16[di]);
-            break;
-        case 4:
-            for (di = 0; di != elem_count; ++di)
-                ctx->val->u.u32[di] = LE2HUI32(&ctx->val->u.u32[di]);
-            break;
-        case 8:
-            for (di = 0; di != elem_count; ++di)
-                ctx->val->u.u64[di] = LE2HUI64(&ctx->val->u.u64[di]);
-            break;
-        }
-    }}
-#endif
-    ctx->rc = ctx->user_f(ctx->user_ctx, tag, ctx->val);
-    return ctx->rc != 0;
-}
-
-LIB_EXPORT rc_t CC BAMAlignmentOptDataForEach(const BAMAlignment *cself, void *user_ctx, BAMOptionalDataFunction f)
-{
-    union u {
-        BAMOptData value;
-        uint8_t storage[4096];
-    } value_auto;
-    OptForEach_ctx_t ctx;
-    rc_t rc = 0;
-    unsigned i;
-    
-    ctx.val = &value_auto.value;
-    ctx.alloced = NULL;
-    ctx.valsize = sizeof(value_auto);
-    ctx.rc = 0;
-    ctx.user_f = f;
-    ctx.user_ctx = user_ctx;
-    
-    for (i = 0; i != cself->numExtra; ++i) {
-        char const *const tag = (char const *)&cself->data->raw[cself->extra[i].offset];
-        uint8_t type = tag[2];
-        uint8_t const *const vp = (uint8_t const *)&tag[3];
-        unsigned len = cself->extra[i].size - 3;
-        unsigned size = cself->extra[i].size - 3;
-        unsigned count = 1;
-        unsigned offset = 0;
-        
-        if (type == dt_NUM_ARRAY) {
-            unsigned elem_size = 0;
-            uint32_t elem_count = 0;
-            
-            offset = len = 5;
-            switch (vp[0]) {
-            case dt_INT8:
-            case dt_UINT8:
-                elem_size = 1;
-                break;
-            case dt_INT16:
-            case dt_UINT16:
-                elem_size = 2;
-                break;
-            case dt_FLOAT32:
-            case dt_INT:
-            case dt_UINT:
-                elem_size = 4;
-                break;
-#if 0
-            case dt_FLOAT64:
-                elem_size = 8;
-                break;
-#endif
-            default:
-                rc = RC(rcAlign, rcFile, rcReading, rcData, rcUnexpected);
-                break;
-            }
-            if (rc)
-                break;
-            elem_count = LE2HUI32(&vp[1]);
-            len += elem_size * elem_count;
-            type = vp[0];
-            count = elem_count;
-            size = elem_size;
-            break;
-        }
-        if (i_OptDataForEach(cself, &ctx, tag, type, count, &vp[offset], size))
-            break;
-    }
-    rc = rc ? rc : ctx.rc;
-    if (ctx.alloced)
-        free(ctx.alloced);
-    return rc;
-}
-
-/* MARK: Complete Genomics stuff */
-
-LIB_EXPORT bool CC BAMAlignmentHasCGData(BAMAlignment const *self)
-{
-    return get_CG_GC_info(self) && get_CG_GS_info(self) && get_CG_GQ_info(self);
-}
-
-static bool BAMAlignmentParseCGTag(BAMAlignment const *self, size_t const max_cg_segs, unsigned cg_segs[/* max_cg_segs */])
-{
-    /*** patern in cg_segs should be nSnGnSnG - no more then 7 segments **/
-    struct offset_size_s const *const GCi = get_CG_GC_info(self);
-    char const *cg  = (char const *)&self->data->raw[GCi->offset + 3];
-    char const *const end = cg + GCi->size - 4;
-    unsigned iseg = 0;
-    char last_op = 'S';
-
-    memset(cg_segs, 0, max_cg_segs * sizeof(cg_segs[0]));
-    
-    while (cg < end && iseg < max_cg_segs) {
-        char *endp;
-        long const op_len = strtol(cg, &endp, 10);
-        char const op = *(cg = endp);
-        
-        ++cg;
-        if (op==last_op) {
-            cg_segs[iseg] += op_len;
-        }
-        else {
-            last_op = op;
-            ++iseg;
-            cg_segs[iseg] = (unsigned)op_len;
-        }
-    }
-    return true;
-}
-
-static
-rc_t ExtractInt32(BAMAlignment const *self, int32_t *result,
-                  struct offset_size_s const *const tag)
-{
-    int64_t y;
-    int const type = self->data->raw[tag->offset + 2];
-    void const *const pvalue = &self->data->raw[tag->offset + 3];
-    
-    switch (type) {
-    case 'c':
-        if (tag->size == 4)
-            y = *((int8_t const *)pvalue);
-        else
-            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
-        break;
-    case 'C':
-        if (tag->size == 4)
-            y = *((uint8_t const *)pvalue);
-        else
-            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
-        break;
-    case 's':
-        if (tag->size == 5)
-            y = LE2HI16(pvalue);
-        else
-            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
-        break;
-    case 'S':
-        if (tag->size == 5)
-            y = LE2HUI16(pvalue);
-        else
-            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
-        break;
-    case 'i':
-        if (tag->size == 7)
-            y = LE2HI32(pvalue);
-        else
-            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
-        break;
-    case 'I':
-        if (tag->size == 7)
-            y = LE2HUI32(pvalue);
-        else
-            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
-        break;
-    default:
-        return RC(rcAlign, rcRow, rcReading, rcData, rcNotFound);
-    }
-    if (INT32_MIN <= y && y <= INT32_MAX) {
-        *result = (int32_t)y;
-        return 0;
-    }
-    return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
-}
-
-LIB_EXPORT
-rc_t CC BAMAlignmentGetCGAlignGroup(BAMAlignment const *self,
-                                    char buffer[],
-                                    size_t max_size,
-                                    size_t *act_size)
-{
-    struct offset_size_s const *const ZA = get_CG_ZA_info(self);
-    struct offset_size_s const *const ZI = get_CG_ZI_info(self);
-    
-    if (ZA && ZI) {
-        rc_t rc;
-        int32_t za;
-        int32_t zi;
-        
-        rc = ExtractInt32(self, &za, ZA); if (rc) return rc;
-        rc = ExtractInt32(self, &zi, ZI); if (rc) return rc;
-        return string_printf(buffer, max_size, act_size, "%i_%i", zi, za);
-    }
-    return RC(rcAlign, rcRow, rcReading, rcData, rcNotFound);
-}
-
-LIB_EXPORT
-rc_t CC BAMAlignmentGetCGSeqQual(BAMAlignment const *self,
-                                 char sequence[],
-                                 uint8_t quality[])
-{
-    struct offset_size_s const *const GCi = get_CG_GC_info(self);
-    struct offset_size_s const *const GSi = get_CG_GS_info(self);
-    struct offset_size_s const *const GQi = get_CG_GQ_info(self);
-    
-    if (GCi && GSi && GQi) {
-        char const *const vGS = (char const *)&self->data->raw[GSi->offset + 3];
-        char const *const GQ  = (char const *)&self->data->raw[GQi->offset + 3];
-        unsigned const GSsize = GSi->size - 4;
-        unsigned const sn = getReadLen(self);
-        unsigned cg_segs[2*CG_NUM_SEGS-1]; /** 4 segments + 3gaps **/
-        unsigned i,G,S;
-        
-        if (GSi->size != GQi->size)
-            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
-        
-        if (SequenceLengthFromCIGAR(self) != sn)
-            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
-
-        if (!BAMAlignmentParseCGTag(self, 2*CG_NUM_SEGS-1, cg_segs))
-            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
-        
-        for (S = cg_segs[0], G = 0, i = 1; i < CG_NUM_SEGS; ++i) { /** sum all S and G **/
-            S += cg_segs[2*i];
-            G += cg_segs[2*i-1];
-        }
-        if (G + G != GSsize || S + G > sn || sn + G != 35) {
-            /*fprintf(stderr, "GSsize: %u; sn: %u; S: %u; G: %u\n", GSsize, sn, S, G);*/
-            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
-        }
-        if (G > 0) {
-            unsigned nsi = cg_segs[0];   /** new index into sequence */
-            unsigned osi = nsi + G;      /** old index into sequence */
-            unsigned k;                  /** index into inserted sequence **/
-            
-            /***make room for inserts **/
-            memmove(sequence + osi, sequence + nsi, sn - nsi);
-            memmove(quality  + osi, quality  + nsi, sn - nsi);
-            
-            for (i = 1, k = 0; i < CG_NUM_SEGS && nsi < osi; ++i) {/*** when osi and nsi meet we are done ***/
-                unsigned j;
-                
-                for (j = cg_segs[2*i-1]; j > 0; --j) { /** insert mode **/
-                    sequence[nsi] = vGS[k];
-                    quality [nsi] = GQ[k] - 33;
-                    ++nsi; ++k;
-                    sequence[nsi] = vGS[k];
-                    quality [nsi] = GQ[k] - 33;
-                    ++nsi;
-                    ++osi;
-                    ++k;
-                }
-                if (nsi < osi){
-                    for (j = cg_segs[2*i]; j > 0; --j) { /** copy mode **/
-                        sequence[nsi] = sequence[osi];
-                        quality[nsi]  = quality[osi];
-                        ++nsi;
-                        ++osi;
-                    }
-                }
-            }
-        }
-        return 0;
-    }
-    return RC(rcAlign, rcRow, rcReading, rcData, rcNotFound);
-}
-
-
-static unsigned splice(uint32_t cigar[], unsigned n, unsigned at, unsigned out, unsigned in, uint32_t const new_values[/* in */])
-{
-    assert(at + out <= n);
-    memmove(&cigar[at + in], &cigar[at + out], (n - at - out) * 4);
-    if (in)
-        memcpy(&cigar[at], new_values, in * 4);
-    return n + in - out;
-}
-
-#define OPCODE_2_FIX (0xF)
-
-static unsigned insert_B(unsigned S, unsigned G, unsigned const n, uint32_t cigar[/* n */])
-{
-    unsigned i;
-    unsigned pos;
-    unsigned const T = S + G;
-    
-    for (pos = i = 0; i < n; ++i) {
-        int const opcode = cigar[i] & 0xF;
-        
-        switch (opcode) {
-        case 0:
-        case 1:
-        case 4:
-        case 7:
-        case 8:
-            {{
-                unsigned const len = cigar[i] >> 4;
-                unsigned const nxt = pos + len;
-                
-                if (pos <= T && T <= nxt) {
-                    unsigned const l = T - pos;
-                    unsigned const r = len - l;
-                    unsigned B = i + 2;
-                    unsigned in = 4;
-                    uint32_t Ops[4];
-                    uint32_t *ops = Ops;
-                    
-                    Ops[0] = (l << 4) | opcode;
-                    Ops[1] = (G << 4) | 9; /* B */
-                    Ops[2] = (G << 4) | 0; /* M this is not backwards */
-                    Ops[3] = (r << 4) | opcode;
-                    
-                    if (r == 0)
-                        --in;
-                    if (l == 0) {
-                        ++ops;
-                        --in;
-                        --B;
-                    }
-                    return splice(cigar, n, i, 1, in, ops);
-                }
-                pos = nxt;
-            }}
-            break;
-        default:
-            break;
-        }
-    }
-    return n;
-}
-
-#if 0
-static unsigned fix_I(uint32_t cigar[], unsigned n)
-{
-    unsigned i;
-    /* int last_b = 0; */
-    
-    for (i = 0; i < n; ++i) {
-        unsigned const opcode = cigar[i] & 0xF;
-        
-        if (opcode == 0xF) {
-            unsigned const oplen = cigar[i] >> 4;
-            uint32_t ops[2];
-            
-            if (0/*last_b*/) {
-                ops[0] = (oplen << 4) | 0; /* M */
-                ops[1] = (oplen << 4) | 9; /* B */
-            }
-            else {
-                ops[0] = (oplen << 4) | 9; /* B */
-                ops[1] = (oplen << 4) | 0; /* M */
-            }
-            
-            n = splice(cigar, n, i, 1, 2, ops);
-            ++i;
-        }
-/*      else if (opcode == 9)
-            last_b = 1;
-        else
-            last_b = 0; */
-    }
-    return n;
-}
-
-static unsigned fix_IN(uint32_t cigar[], unsigned n)
-{
-    unsigned i;
-    
-    for (i = 1; i < n; ++i) {
-        unsigned const opL = cigar[i-1] & 0xF;
-        unsigned const opI = cigar[ i ] & 0xF;
-        
-        if (opL == 1 && opI == 3) {
-            unsigned const oplen = cigar[i-1] >> 4;
-            uint32_t ops[2];
-            
-            ops[0] = (oplen << 4) | 9; /* B */
-            ops[1] = (oplen << 4) | 0; /* M */
-            
-            n = splice(cigar, n, i-1, 1, 2, ops);
-            ++i;
-        }
-        else if (opL == 3 && opI == 1) {
-            unsigned const oplen = cigar[i] >> 4;
-            uint32_t ops[2];
-            
-            ops[0] = (oplen << 4) | 9; /* M */
-            ops[1] = (oplen << 4) | 0; /* B */
-            
-            n = splice(cigar, n, i, 1, 2, ops);
-            ++i;
-        }
-    }
-    return n;
-}
-#endif
-
-static unsigned canonicalize(uint32_t cigar[], unsigned n)
-{
-    unsigned i;
-    
-    for (i = n; i > 0; ) {
-        --i;
-        if (cigar[i] >> 4 == 0 || (cigar[i] & 0xF) == 6)
-            n = splice(cigar, n, i, 1, 0, NULL);
-    }
-    for (i = 1; i < n; ) {
-        unsigned const opL = cigar[i-1] & 0xF;
-        unsigned const opI = cigar[ i ] & 0xF;
-        
-        if (opI == opL) {
-            unsigned const oplen = (cigar[i] >> 4) + (cigar[i-1] >> 4);
-            uint32_t const op = (oplen << 4) | opI;
-
-            n = splice(cigar, n, i-1, 2, 1, &op);
-        }
-        else
-            ++i;
-    }
-#if 0
-    if ((cigar[0] & 0xF) == 1)
-        cigar[0] = (cigar[0] & ~(uint32_t)0xF) | 4; /* I -> S */
-    if ((cigar[n - 1] & 0xF) == 1)
-        cigar[n - 1] = (cigar[n - 1] & ~(uint32_t)0xF) | 4; /* I -> S */
-#endif
-    return n;
-}
-
-/* static void reverse(uint32_t cigar[], unsigned n)
-{
-    unsigned i;
-    unsigned j;
-    
-    for (j = n - 1, i = 0; i < j; ++i, --j) {
-        uint32_t const tmp = cigar[i];
-        cigar[i] = cigar[j];
-        cigar[j] = tmp;
-    }
-} */
-
-static unsigned GetCGCigar(BAMAlignment const *self, unsigned const N, uint32_t cigar[/* N */])
-{
-    unsigned i;
-    unsigned G;
-    unsigned S;
-    unsigned n = getCigarCount(self);
-    unsigned cg_segs[2*CG_NUM_SEGS-1]; /** 4 segments + 3 gaps **/
-    
-    if (!BAMAlignmentParseCGTag(self, 2*CG_NUM_SEGS-1, cg_segs))
-        return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
-    
-    if (N < n + 5)
-        return RC(rcAlign, rcRow, rcReading, rcBuffer, rcInsufficient);
-    
-    memcpy(cigar, getCigarBase(self), n * 4);
-    n = canonicalize(cigar, n); /* just in case */
-    for (i = 0, S = 0; i < CG_NUM_SEGS - 1; ++i) {
-        S += cg_segs[2*i];
-        G  = cg_segs[2*i+1];
-        if (G > 0) {
-            n = insert_B(S, G, n, cigar);
-            S += G;
-        }
-    }
-    return n;
-}
-
-LIB_EXPORT
-rc_t CC BAMAlignmentGetCGCigar(BAMAlignment const *self,
-                               uint32_t *cigar,
-                               uint32_t cig_max,
-                               uint32_t *cig_act)
-{
-    struct offset_size_s const *const GCi = get_CG_GC_info(self);
-    
-    *cig_act = 0;
-    
-    if (GCi) {
-        *cig_act = GetCGCigar(self, cig_max, cigar);
-        return 0;
-    }
-    return RC(rcAlign, rcRow, rcReading, rcData, rcNotFound);
-}
-
-/* MARK: end CG stuff */
-
-LIB_EXPORT rc_t BAMAlignmentGetTI(BAMAlignment const *self, uint64_t *ti)
-{
-    char const *const TI = get_XT(self);
-    long long unsigned temp;
-    
-    if (TI && sscanf(TI, "ti|%llu", &temp) == 1) {
-        *ti = (uint64_t)temp;
-        return 0;
-    }
-    return RC(rcAlign, rcRow, rcReading, rcData, rcNotFound);
-}
-
-LIB_EXPORT rc_t BAMAlignmentGetRNAStrand(BAMAlignment const *const self, uint8_t *const rslt)
-{
-    if (rslt) {
-        uint8_t const *const XS = get_XS(self);
-        
-	    *rslt = XS ? XS[0] : ' ';
-    }
-    return 0;
-}
-
-/* MARK: BAMIndex stuff */
-
-static uint64_t get_pos(uint8_t const buf[])
-{
-    return LE2HUI64(buf);
-}
-
-#define MAX_BIN 37449
-static uint16_t bin2ival(uint16_t bin)
-{
-    if (bin < 1)
-        return 0; /* (bin - 0) << 15; */
-    
-    if (bin < 9)
-        return (bin - 1) << 12;
-    
-    if (bin < 73)
-        return (bin - 9) << 9;
-    
-    if (bin < 585)
-        return (bin - 73) << 6;
-    
-    if (bin < 4681)
-        return (bin - 585) << 3;
-    
-    if (bin < 37449)
-        return (bin - 4681) << 0;
-    
-    return 0;
-}
-
-static uint16_t bin_ival_count(uint16_t bin)
-{
-    if (bin < 1)
-        return 1 << 15;
-    
-    if (bin < 9)
-        return 1 << 12;
-    
-    if (bin < 73)
-        return 1 << 9;
-    
-    if (bin < 585)
-        return 1 << 6;
-    
-    if (bin < 4681)
-        return 1 << 3;
-    
-    if (bin < 37449)
-        return 1;
-    
-    return 0;
-}
-
-enum BAMIndexStructureTypes {
-    bai_StartStopPairs,
-    bai_16kIntervals
-};
-
-typedef rc_t (*WalkIndexStructureCallBack)(const uint8_t data[], size_t dlen,
-                                           unsigned refNo,
-                                           unsigned refs,
-                                           enum BAMIndexStructureTypes type,
-                                           unsigned binNo,
-                                           unsigned bins,
-                                           unsigned elements,
-                                           void *ctx);
-
-static
-rc_t WalkIndexStructure(uint8_t const buf[], size_t const blen,
-                        WalkIndexStructureCallBack func,
-                        void *ctx
-                        )
-{
-    unsigned cp = 0;
-    int32_t nrefs;
-    unsigned i;
-    rc_t rc;
-    
-    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("Index data length: %u", blen));
-
-    if (cp + 4 > blen)
-        return RC(rcAlign, rcIndex, rcReading, rcData, rcInsufficient);
-    
-    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("Index signature: '%c%c%c%u'", buf[cp+0], buf[cp+1], buf[cp+2], buf[cp+3]));
-    if (memcmp(buf + cp, "BAI\1", 4) != 0)
-        return RC(rcAlign, rcIndex, rcReading, rcFormat, rcUnknown);
-    
-    cp += 4;
-    if (cp + 4 > blen)
-        return RC(rcAlign, rcIndex, rcReading, rcData, rcInsufficient);
-
-    nrefs = LE2HI32(buf + cp); cp += 4;
-    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("Index reference count: %i", nrefs));
-    
-    if (nrefs == 0)
-        return RC(rcAlign, rcIndex, rcReading, rcData, rcEmpty);
-    
-    for (i = 0; i < nrefs; ++i) {
-        int32_t bins;
-        int32_t chunks;
-        int32_t intervals;
-        unsigned di;
-        
-        DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("Index reference %u: starts at %u", i, cp));
-        if (cp + 4 > blen)
-            return RC(rcAlign, rcIndex, rcReading, rcData, rcInsufficient);
-        
-        bins = LE2HI32(buf + cp); cp += 4;
-        DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("Index reference %u: %i bins", i, nrefs));
-
-        for (di = 0; di < bins; ++di) {
-            uint32_t binNo;
-            
-            if (cp + 8 > blen)
-                return RC(rcAlign, rcIndex, rcReading, rcData, rcInsufficient);
-
-            binNo = LE2HUI32(buf + cp); cp += 4;
-            chunks = LE2HI32(buf + cp); cp += 4;
-            DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("Index reference %u, bin %u: %i chunks", i, binNo, chunks));
-            
-            if (cp + 16 * chunks > blen)
-                return RC(rcAlign, rcIndex, rcReading, rcData, rcInsufficient);
-            rc = func(&buf[cp], 16 * chunks, i, nrefs, bai_StartStopPairs, binNo, bins, chunks, ctx);
-            if (rc)
-                return rc;
-            cp += 16 * chunks;
-        }
-        if (cp + 4 > blen)
-            return RC(rcAlign, rcIndex, rcReading, rcData, rcInsufficient);
-
-        intervals = LE2HI32(buf + cp); cp += 4;
-        DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("Index reference %u: %i intervals", i, intervals));
-
-        if (cp + 8 * intervals > blen)
-            return RC(rcAlign, rcIndex, rcReading, rcData, rcInsufficient);
-        rc = func(&buf[cp], 8 * intervals, i, nrefs, bai_16kIntervals, ~(unsigned)0, bins, intervals, ctx);
-        if (rc)
-            return rc;
-        cp += 8 * intervals;
-    }
-    if (cp > blen)
-        return RC(rcAlign, rcIndex, rcReading, rcData, rcInsufficient);
-    return 0;
-}
-
-struct LoadIndex1_s {
-    const BAMFile *self;
-    int refNo;
-    unsigned refs;
-    unsigned intervals;
-    unsigned total_interval_count;
-};
-
-static
-rc_t LoadIndex1(const uint8_t data[], size_t dlen, unsigned refNo,
-                unsigned refs, enum BAMIndexStructureTypes type,
-                unsigned binNo, unsigned bins,
-                unsigned elements, void *Ctx)
-{
-    struct LoadIndex1_s *ctx = (struct LoadIndex1_s *)Ctx;
-    
-    ctx->refs = refs;
-    if (refNo != ctx->refNo) {
-        ctx->total_interval_count += ctx->intervals;
-        ctx->intervals = 0;
-        ctx->refNo = refNo;
-    }
-    if (elements != 0) {
-        if (refNo > ctx->self->refSeqs)
-            return RC(rcAlign, rcIndex, rcReading, rcData, rcInvalid);
-        ctx->intervals = (ctx->self->refSeq[refNo].length + 16383) >> 14;
-        if (type == bai_16kIntervals && elements > ctx->intervals)
-            return RC(rcAlign, rcIndex, rcReading, rcData, rcExcessive);
-    }
-    return 0;
-}
-
-struct LoadIndex2_s {
-    const BAMFile *self;
-    BAMFilePosition **refSeq;
-    BAMFilePosition *cur;
-#if _DEBUGGING
-    BAMFilePosition *end;
-#endif
-    const uint8_t *base;
-    unsigned bins[MAX_BIN + 1];
-    bool hasData;
-};
-
-static
-rc_t LoadIndex2a(const uint8_t data[], size_t dlen, unsigned refNo,
-                 unsigned refs, enum BAMIndexStructureTypes type,
-                 unsigned binNo, unsigned bins,
-                 unsigned elements, struct LoadIndex2_s *ctx)
-{
-    const unsigned max_ival = (ctx->self->refSeq[refNo].length + 16383) >> 14;
-    unsigned i;
-    unsigned cp;
-    unsigned k;
-    uint32_t chunk_count;
-    uint64_t minOffset[1u << 15];
-
-    assert(ctx->refSeq[refNo] == NULL);
-    ctx->refSeq[refNo] = ctx->cur;
-    ctx->cur += max_ival;
-    
-#if _DEBUGGING
-    assert(refNo < ctx->self->refSeqs);
-    assert(ctx->cur <= ctx->end);
-    assert(elements <= max_ival);
-#endif
-    /* get the positions of the first records in the 16kbp intervals */
-    for (cp = i = 0; i != elements; ++i, cp += 8)
-        ctx->refSeq[refNo][i] = get_pos(&data[cp]);
-    /* get the positions of the first records in the 16kbp bins */
-    for (i = MAX_BIN; i != 0; ) {
-        const unsigned ival = bin2ival(--i);
-        const unsigned n_ival = bin_ival_count(i);
-        uint64_t found;
-        
-        cp = ctx->bins[i];
-        if (cp == 0)
-            continue;
-        if (n_ival > 1)
-            break;
-        
-        assert(i == LE2HI32(ctx->base + cp));
-        cp += 4;
-        chunk_count = LE2HI32(ctx->base + cp); cp += 4;
-        found = ctx->refSeq[refNo][ival];
-        for (k = 0; k < chunk_count; ++k) {
-            const uint64_t start = get_pos(ctx->base + cp);
-            
-            cp += 16;
-            if (found == 0 || start < found)
-                found = start;
-        }
-        ctx->refSeq[refNo][ival] = found;
-    }
-    /* The interval list now contains the offsets to the first alignment
-     * that starts at or after the interval's starting position.
-     * An interval's starting position is 16kpb * interval number.
-     *
-     * We will now use the information from the bigger bins to find the
-     * offsets of the first chunk of alignments that ends after an
-     * interval's first alignment.
-     */
-    memset(minOffset, 0, sizeof(minOffset));
-    for (i = 0; i != MAX_BIN; ++i) {
-        const unsigned ival = bin2ival(i);
-        unsigned n_ival = bin_ival_count(i);
-        
-        cp = ctx->bins[i];
-        if (cp == 0)
-            continue;
-        if (n_ival <= 1)
-            break;
-        
-        if (ival + n_ival > max_ival)
-            n_ival = max_ival - ival;
-        
-        chunk_count = LE2HI32(ctx->base + cp + 4); cp += 8;
-        for (k = 0; k < chunk_count; ++k) {
-            const uint64_t start = get_pos(ctx->base + cp);
-            const uint64_t end   = get_pos(ctx->base + cp + 8);
-            unsigned l;
-            
-            cp += 16;
-            for (l = 0; l != n_ival; ++l) {
-                if (start < ctx->refSeq[refNo][ival + l] &&
-                    ctx->refSeq[refNo][ival + l] <= end &&
-                    (start < minOffset[ival + l] ||
-                     minOffset[ival + l] == 0
-                     )
-                    )
-                {
-                    minOffset[ival + l] = start;
-                }
-            }
-        }
-    }
-    /* update the intervals to the new earlier offsets if any */
-    for (i = 0; i != max_ival; ++i) {
-        if (minOffset[i] != 0)
-            ctx->refSeq[refNo][i] = minOffset[i];
-    }
-    memset(ctx->bins, 0, sizeof(ctx->bins));
-    ctx->hasData = false;
-    return 0;
-}
-
-static
-rc_t LoadIndex2(const uint8_t data[], size_t dlen, unsigned refNo,
-                unsigned refs, enum BAMIndexStructureTypes type,
-                unsigned binNo, unsigned bins,
-                unsigned elements, void *Ctx)
-{
-    struct LoadIndex2_s *ctx = (struct LoadIndex2_s *)Ctx;
-    
-    if (type == bai_StartStopPairs) {
-        if (binNo < MAX_BIN && elements != 0) {
-            ctx->bins[binNo] = &data[-8] - ctx->base;
-            ctx->hasData = true;
-        }
-    }
-    else if (elements != 0 || ctx->hasData)
-        return LoadIndex2a(data, dlen, refNo, refs, type, binNo, bins,
-                           elements, (struct LoadIndex2_s *)Ctx);
-    return 0;
-}    
-
-static
-rc_t LoadIndex(BAMFile *self, const uint8_t buf[], size_t blen)
-{
-    BAMIndex *idx;
-    rc_t rc;
-    struct LoadIndex1_s loadIndex1ctx;
-    unsigned const posArray = ((uintptr_t)&((const BAMFilePosition **)(NULL))[self->refSeqs]) / sizeof(BAMFilePosition *);
-
-    memset(&loadIndex1ctx, 0, sizeof(loadIndex1ctx));
-    loadIndex1ctx.refNo = -1;
-    loadIndex1ctx.self = self;
-    
-    rc = WalkIndexStructure(buf, blen, LoadIndex1, &loadIndex1ctx);
-    if (rc == 0) {
-        loadIndex1ctx.total_interval_count += loadIndex1ctx.intervals;
-        idx = calloc(1, posArray * sizeof(BAMFilePosition *) +
-                     loadIndex1ctx.total_interval_count * sizeof(BAMFilePosition));
-        if (idx == NULL)
-            rc = RC(rcAlign, rcIndex, rcReading, rcMemory, rcExhausted);
-        else {
-            struct LoadIndex2_s *loadIndex2ctx;
-            
-            if (self->ndx)
-                BAMIndexWhack(self->ndx);
-            self->ndx = idx;
-            
-            loadIndex2ctx = malloc(sizeof(*loadIndex2ctx));
-            if (loadIndex2ctx == NULL) {
-                rc = RC(rcAlign, rcIndex, rcReading, rcMemory, rcExhausted);
-                free(idx);
-                self->ndx = NULL;
-            }
-            else {
-                memset(loadIndex2ctx->bins, 0, sizeof(loadIndex2ctx->bins));
-                loadIndex2ctx->self = self;
-                loadIndex2ctx->refSeq = &idx->refSeq[0];
-                loadIndex2ctx->base = buf;
-                loadIndex2ctx->hasData = false;
-                loadIndex2ctx->cur = (BAMFilePosition *)&idx->refSeq[posArray];
-#if _DEBUGGING
-                loadIndex2ctx->end = loadIndex2ctx->cur + loadIndex1ctx.total_interval_count;
-#endif
-                
-                WalkIndexStructure(buf, blen, LoadIndex2, loadIndex2ctx);
-                free(loadIndex2ctx);
-            }
-        }
-    }
-    return rc;
-}
-
-static
-rc_t BAMFileOpenIndexKFile(const BAMFile *self, KFile const *kf)
-{
-    rc_t rc;
-    size_t fsize;
-    uint8_t *buf;
-    {
-        uint64_t u64;
-
-        rc = KFileSize(kf, &u64);
-        if (sizeof(size_t) < sizeof(u64) && (size_t)u64 != u64) {
-            return RC(rcAlign, rcIndex, rcReading, rcData, rcExcessive);
-        }
-        fsize = u64;
-    }
-    if (rc == 0) {
-        buf = malloc(fsize);
-        if (buf != NULL) {
-            size_t nread;
-            
-            rc = KFileReadAll(kf, 0, buf, fsize, &nread);
-            if (rc == 0) {
-                if (nread == fsize) {
-                    rc = LoadIndex((BAMFile *)self, buf, nread);
-                    free(buf);
-                    return rc;
-                }
-                rc = RC(rcAlign, rcIndex, rcReading, rcData, rcInvalid);
-            }
-            free(buf);
-        }
-        else
-            rc = RC(rcAlign, rcIndex, rcReading, rcMemory, rcExhausted);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC BAMFileOpenIndex(const BAMFile *self, const char *path)
-{
-    const KFile *kf;
-    rc_t rc;
-    KDirectory *dir;
-    
-    rc = KDirectoryNativeDir(&dir);
-    if (rc) return rc;
-    rc = KDirectoryOpenFileRead(dir, &kf, "%s", path);
-    KDirectoryRelease(dir);
-    if (rc) return rc;
-    rc = BAMFileOpenIndexKFile(self, kf);
-    KFileRelease(kf);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC BAMFileOpenIndexWithVPath(const BAMFile *self, const VPath *path)
-{
-    VFSManager *vfs = NULL;
-    KFile const *fp = NULL;
-    rc_t rc = 0;
-
-    rc = VFSManagerMake(&vfs);
-    if (rc) return rc;
-
-    rc = VFSManagerOpenFileRead(vfs, &fp, path);
-    VFSManagerRelease(vfs);
-    if (rc) return rc;
-
-    rc = BAMFileOpenIndexKFile(self, fp);
-    KFileRelease(fp);
-    return rc;
-}
-
-LIB_EXPORT bool CC BAMFileIsIndexed(const BAMFile *self)
-{
-	if (self && self->ndx)
-		return true;
-	return false;
-}
-
-LIB_EXPORT bool CC BAMFileIndexHasRefSeqId(const BAMFile *self, uint32_t refSeqId)
-{
-	if (self && self->ndx && self->ndx->refSeq[refSeqId])
-		return true;
-	return false;
-}
-
-static void BAMAlignmentAlignInfo(BAMAlignment *const self,
-                                  int32_t ref[],
-                                  int32_t beg[],
-                                  int32_t end[])
-{
-    (void)BAMAlignmentSetOffsets(self);
-    
-    ref[0] = getRefSeqId(self);
-    end[0] = (beg[0] = getPosition(self)) + ReferenceLengthFromCIGAR(self);
-}
-
-static
-rc_t BAMFileGetAlignPosAtFilePos(BAMFile *const self,
-                                 BAMFilePosition const *const fpos,
-                                 int32_t ref[],
-                                 int32_t beg[],
-                                 int32_t end[])
-{
-    rc_t rc = BAMFileSetPosition(self, fpos);
-    
-    if (rc == 0) {
-        BAMAlignment x;
-        int32_t i32;
-        
-        rc = BAMFileReadI32(self, &i32); if (rc) return rc;
-        if (i32 <= 0)
-            return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
-
-        memset(&x, 0, sizeof(x));
-        x.datasize = i32;
-        if (x.datasize <= BAMFileMaxPeek(self)) {
-            x.data = (void *)&self->buffer[self->bufCurrent];
-            BAMFileAdvance(self, x.datasize);
-
-            BAMAlignmentAlignInfo(&x, ref, beg, end);
-        }
-        else {
-            void *const temp = malloc(x.datasize);
-            
-            if (temp) {
-                x.data = temp;
-                
-                rc = BAMFileReadn(self, x.datasize, temp);
-                if (rc == 0)
-                    BAMAlignmentAlignInfo(&x, ref, beg, end);
-                
-                free(temp);
-            }
-            else
-                rc = RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC BAMFileSeek(const BAMFile *self, uint32_t refSeqId, uint64_t alignStart, uint64_t alignEnd)
-{
-    BAMFilePosition rpos = 0;
-    rc_t rc;
-    int32_t prev_alignPos;
-    int32_t alignPos;
-    int32_t alignEndPos;
-    int32_t refSeq;
-    
-    if (self->ndx == NULL)
-        return RC(rcAlign, rcFile, rcPositioning, rcIndex, rcNotFound);
-    if (refSeqId >= self->refSeqs)
-        return RC(rcAlign, rcFile, rcPositioning, rcData, rcNotFound);
-    if (self->ndx->refSeq[refSeqId] == NULL)
-        return RC(rcAlign, rcFile, rcPositioning, rcData, rcNotFound);
-    if (alignStart >= self->refSeq[refSeqId].length)
-        return RC(rcAlign, rcFile, rcPositioning, rcData, rcNotFound);
-    if (alignEnd > self->refSeq[refSeqId].length)
-        alignEnd = self->refSeq[refSeqId].length;
-    
-    {
-        unsigned adjust = 0;
-        uint32_t ival_start = (uint32_t)(alignStart >> 14);
-        {
-            uint32_t const ival_end = (uint32_t)((alignEnd + 16383) >> 14);
-            
-            /* find the first interval >= alignStart that has an alignment */
-            while (ival_start != ival_end && (rpos = self->ndx->refSeq[refSeqId][ival_start]) == 0)
-                ++ival_start;
-        }
-        if (rpos == 0)
-            return RC(rcAlign, rcFile, rcPositioning, rcData, rcNotFound);
-        do {
-            rc = BAMFileGetAlignPosAtFilePos((BAMFile *)self, &rpos, &refSeq, &alignPos, &alignEndPos);
-            if (rc)
-                return RC(rcAlign, rcFile, rcPositioning, rcIndex, rcInvalid);
-            if (refSeq != refSeqId)
-                return RC(rcAlign, rcFile, rcPositioning, rcData, rcNotFound);
-            if (alignPos <= alignEnd)
-                break; /* we found the interval we were looking for */
-            
-            /* we over-shot */
-            if (++adjust >= ival_start)
-                return RC(rcAlign, rcFile, rcPositioning, rcData, rcNotFound);
-            if ((rpos = self->ndx->refSeq[refSeqId][ival_start - adjust]) == 0)
-                return RC(rcAlign, rcFile, rcPositioning, rcData, rcNotFound);
-        } while (1);
-    }
-    prev_alignPos = alignPos;
-    
-    do {
-        if (alignPos > alignEnd)
-            return RC(rcAlign, rcFile, rcPositioning, rcData, rcNotFound);
-        
-        /* if the alignment overlaps the target range then we are done */
-        if (alignPos >= alignStart || alignEndPos >= alignStart)
-            return BAMFileSetPosition(self, &rpos);
-        
-        /* start linear scan */
-        BAMFileGetPosition(self, &rpos);
-        rc = BAMFileGetAlignPosAtFilePos((BAMFile *)self, &rpos, &refSeq, &alignPos, &alignEndPos);
-        if (rc) return rc;
-        if (refSeq != refSeqId)
-            return RC(rcAlign, rcFile, rcPositioning, rcData, rcNotFound);
-        
-        /*  indexed BAM must be sorted by position
-         *  so verify that we are not out of order
-         *  whether this means that the index is bad
-         *  or the file is bad, likely both
-         *  fix the file and regenerate the index
-         */
-        if (prev_alignPos > alignPos)
-            return RC(rcAlign, rcFile, rcPositioning, rcIndex, rcInvalid);
-        prev_alignPos = alignPos;
-    } while (1);
-}
-
-static rc_t BAMIndexWhack(const BAMIndex *cself) {
-    free((void *)cself);
-    return 0;
-}
-
-/* MARK: BAM Validation Stuff */
-
-static rc_t OpenVPathRead(const KFile **fp, struct VPath const *path)
-{
-    char buffer[4096];
-    size_t blen;
-    rc_t rc = VPathReadPath(path, buffer, sizeof(buffer), &blen);
-    
-    if (rc == 0) {
-        KDirectory *dir;
-        
-        rc = KDirectoryNativeDir(&dir);
-        if (rc == 0) {
-            rc = KDirectoryOpenFileRead(dir, fp, "%.*s", (int)blen, buffer);
-            KDirectoryRelease(dir);
-        }
-    }
-    return rc;
-}
-
-static rc_t ReadVPath(void **data, size_t *dsize, struct VPath const *path)
-{
-    const KFile *fp;
-    rc_t rc = OpenVPathRead(&fp, path);
-    
-    if (rc == 0) {
-        uint8_t *buff;
-        uint64_t fsz;
-        size_t bsz = 0;
-        
-        rc = KFileSize(fp, &fsz);
-        if (rc == 0) {
-            if ((size_t)fsz != fsz)
-                return RC(rcAlign, rcFile, rcReading, rcFile, rcTooBig);
-            buff = malloc(fsz);
-            if (buff == NULL)
-                return RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
-            do {
-                size_t nread;
-                
-                rc = KFileRead(fp, 0, buff + bsz, fsz - bsz, &nread);
-                if (rc)
-                    break;
-                bsz += nread;
-            } while (bsz < (size_t)fsz);
-            if (rc == 0) {
-                *data = buff;
-                *dsize = bsz;
-                return 0;
-            }
-            free(buff);
-        }
-    }
-    return rc;
-}
-
-static rc_t VPath2BGZF(BGZFile *bgzf, struct VPath const *path)
-{
-    const KFile *fp;
-    BGZFile_vt dummy;
-    rc_t rc = OpenVPathRead(&fp, path);
-    
-    if (rc == 0) {
-        rc = BGZFileInit(bgzf, fp, &dummy);
-        KFileRelease(fp);
-    }
-    return rc;
-}
-
-struct index_data {
-    uint64_t position;
-    unsigned refNo;
-    unsigned binNo;
-    bool found;
-};
-
-struct buffer_data {
-    uint64_t position;
-    size_t size;
-};
-
-typedef struct BAMValidate_ctx_s BAMValidate_ctx_t;
-struct BAMValidate_ctx_s {
-    BAMValidateCallback callback;
-    void *ctx;
-    BAMValidateStats *stats;
-    const uint8_t *bai;
-    int32_t *refLen;
-    struct index_data *position;
-    uint8_t *buf;
-    uint8_t *nxt;
-    size_t bsize;
-    size_t alloced;
-    size_t dnext;
-    uint32_t options;
-    uint32_t lastRefId;
-    uint32_t lastRefPos;
-    unsigned npositions;
-    unsigned mpositions;
-    unsigned nrefs;
-    bool cancelled;
-};
-
-static
-rc_t IndexValidateStructure(const uint8_t data[], size_t dlen,
-                            unsigned refNo,
-                            unsigned refs,
-                            enum BAMIndexStructureTypes type,
-                            unsigned binNo,
-                            unsigned bins,
-                            unsigned elements,
-                            void *Ctx)
-{
-    BAMValidate_ctx_t *ctx = Ctx;
-    rc_t rc = 0;
-    
-    ctx->stats->baiFilePosition = data - ctx->bai;
-    rc = ctx->callback(ctx->ctx, 0, ctx->stats);
-    if (rc)
-        ctx->cancelled = true;
-    return rc;
-}
-
-static int64_t CC comp_index_data(const void *A, const void *B, void *ignored)
-{
-    const struct index_data *a = A;
-    const struct index_data *b = B;
-    
-    if (a->position < b->position)
-        return -1;
-    else if (a->position > b->position)
-        return 1;
-    else
-        return 0;
-}
-
-static
-rc_t BAMValidateLoadIndex(const uint8_t data[], size_t dlen,
-                          unsigned refNo,
-                          unsigned refs,
-                          enum BAMIndexStructureTypes type,
-                          unsigned binNo,
-                          unsigned bins,
-                          unsigned elements,
-                          void *Ctx)
-{
-    BAMValidate_ctx_t *ctx = Ctx;
-    unsigned const n = type == bai_16kIntervals ? elements : elements * 2;
-    unsigned i;
-    unsigned j;
-    
-    if (type == bai_StartStopPairs && binNo >= MAX_BIN)
-        return 0;
-    
-    if (ctx->npositions + elements > ctx->mpositions) {
-        void *temp;
-        
-        do { ctx->mpositions <<= 1; } while (ctx->npositions + elements > ctx->mpositions);
-        temp = realloc(ctx->position, ctx->mpositions * sizeof(ctx->position[0]));
-        if (temp == NULL)
-            return RC(rcAlign, rcIndex, rcReading, rcMemory, rcExhausted);
-        ctx->position = temp;
-    }
-    for (j = i = 0; i != n; ++i) {
-        uint64_t const pos = get_pos(&data[i * 8]);
-        
-        if (type == bai_StartStopPairs && (i & 1) != 0)
-            continue;
-        
-        if (pos) {
-            ctx->position[ctx->npositions + j].refNo = refNo;
-            ctx->position[ctx->npositions + j].binNo = binNo;
-            ctx->position[ctx->npositions + j].position = pos;
-            ++j;
-        }
-    }
-    ctx->npositions += j;
-    return 0;
-}
-
-static
-rc_t BAMValidateHeader(const uint8_t data[],
-                       unsigned dsize,
-                       unsigned *header_len,
-                       unsigned *refs_start,
-                       unsigned *nrefs,
-                       unsigned *data_start
-                       )
-{
-    int32_t hlen;
-    int32_t refs;
-    unsigned i;
-    unsigned cp;
-    
-    if (dsize < 8)
-        return RC(rcAlign, rcFile, rcValidating, rcData, rcIncomplete);
-    
-    if (memcmp(data, "BAM\1", 4) != 0)
-        return RC(rcAlign, rcFile, rcValidating, rcFormat, rcUnrecognized);
-    
-    hlen = LE2HI32(&data[4]);
-    if (hlen < 0)
-        return RC(rcAlign, rcFile, rcValidating, rcData, rcInvalid);
-    
-    if (dsize < hlen + 12)
-        return RC(rcAlign, rcFile, rcValidating, rcData, rcIncomplete);
-    
-    refs = LE2HI32(&data[hlen + 8]);
-    if (refs < 0)
-        return RC(rcAlign, rcFile, rcValidating, rcData, rcInvalid);
-    
-    for (cp = hlen + 12, i = 0; i != refs; ++i) {
-        int32_t nlen;
-        
-        if (dsize < cp + 4)
-            return RC(rcAlign, rcFile, rcValidating, rcData, rcIncomplete);
-        
-        nlen = LE2HI32(&data[cp]);
-        if (nlen < 0)
-            return RC(rcAlign, rcFile, rcValidating, rcData, rcInvalid);
-        
-        if (dsize < cp + nlen + 4)
-            return RC(rcAlign, rcFile, rcValidating, rcData, rcIncomplete);
-        
-        cp += nlen + 4;
-    }
-    
-    *nrefs = refs;
-    *refs_start = 12 + (*header_len = hlen);
-    *data_start = cp;
-    return 0;
-}
-
-static rc_t BAMValidateIndex(struct VPath const *bampath,
-                             struct VPath const *baipath,
-                             BAMValidateOption options,
-                             BAMValidateCallback callback,
-                             void *callbackContext
-                             )
-{
-    rc_t rc = 0;
-    BGZFile bam;
-    uint8_t *bai = NULL;
-    size_t bai_size;
-    BAMValidateStats stats;
-    BAMValidate_ctx_t ctx;
-    uint8_t data[2 * ZLIB_BLOCK_SIZE];
-    uint32_t dsize = 0;
-    uint64_t pos = 0;
-    uint32_t temp;
-    int32_t ref = -1;
-    int32_t rpos = -1;
-    
-    if ((options & bvo_IndexOptions) == 0)
-        return callback(callbackContext, 0, &stats);
-
-    rc = ReadVPath((void **)&bai, &bai_size, baipath);
-    if (rc)
-        return rc;
-    
-    memset(&stats, 0, sizeof(stats));
-    memset(&ctx, 0, sizeof(ctx));
-    
-    ctx.bai = bai;
-    ctx.stats = &stats;
-    ctx.options = options;
-    ctx.ctx = callbackContext;
-    ctx.callback = callback;
-    
-    if ((options & bvo_IndexOptions) == bvo_IndexStructure)
-        return WalkIndexStructure(bai, bai_size, IndexValidateStructure, &ctx);
-
-    rc = VPath2BGZF(&bam, bampath);
-    if (rc == 0) {
-        ctx.mpositions = 1024 * 32;
-        ctx.position = malloc(ctx.mpositions * sizeof(ctx.position[0]));
-        if (ctx.position == NULL)
-            return RC(rcAlign, rcIndex, rcReading, rcMemory, rcExhausted);
-        
-        rc = WalkIndexStructure(bai, bai_size, BAMValidateLoadIndex, &ctx);
-        free(bai);
-        if (rc) {
-            stats.indexStructureIsBad = true;
-            rc = callback(callbackContext, rc, &stats);
-        }
-        else {
-            unsigned i = 0;
-            
-            stats.indexStructureIsGood = true;
-            stats.baiFileSize = ctx.npositions;
-            
-            ksort(ctx.position, ctx.npositions, sizeof(ctx.position[0]), comp_index_data, 0);
-            
-            stats.bamFileSize = bam.fsize;
-            
-            while (i < ctx.npositions) {
-                uint64_t const ifpos = ctx.position[i].position >> 16;
-                uint16_t const bpos = (uint16_t)ctx.position[i].position;
-                
-                stats.baiFilePosition = i;
-                if (i == 0 || ifpos != pos) {
-                    stats.bamFilePosition = pos = ifpos;
-                    rc = BGZFileSetPos(&bam, pos);
-                    if (rc == 0)
-                        rc = BGZFileRead(&bam, data, &dsize);
-                    if (rc) {
-                        ++stats.indexFileOffset.error;
-                        do {
-                            ++i;
-                            if (i == ctx.npositions)
-                                break;
-                            if (ctx.position[i].position >> 16 != pos)
-                                break;
-                            ++stats.indexFileOffset.error;
-                        } while (1);
-                    }
-                    else
-                        ++stats.indexFileOffset.good;
-
-                    rc = callback(callbackContext, rc, &stats);
-                    if (rc)
-                        break;
-                }
-                else
-                    ++stats.indexFileOffset.good;
-                if ((options & bvo_IndexOptions) > bvo_IndexOffsets1) {
-                    int32_t rsize = 0;
-                    BAMAlignment algn;
-                    
-                    if (bpos >= dsize)
-                        goto BAD_BLOCK_OFFSET;
-                    if (dsize - bpos < 4) {
-                    READ_MORE:
-                        if (dsize > ZLIB_BLOCK_SIZE)
-                            goto BAD_BLOCK_OFFSET;
-
-                        rc = BGZFileRead(&bam, data + dsize, &temp);
-                        if (rc) {
-                            ++stats.blockCompression.error;
-                            goto BAD_BLOCK_OFFSET;
-                        }
-                        dsize += temp;
-                        if (dsize - bpos < 4 || dsize - bpos < rsize)
-                            goto BAD_BLOCK_OFFSET;
-                    }
-                    rsize = LE2HI32(data + bpos);
-                    if (rsize <= 0)
-                        goto BAD_BLOCK_OFFSET;
-                    if (rsize > 0xFFFF) {
-                        ++stats.indexBlockOffset.warning;
-                        ++i;
-                        continue;
-                    }
-                    if (dsize - bpos < rsize)
-                        goto READ_MORE;
-/*                    rc = BAMAlignmentParse(&algn, data + bpos + 4, rsize); */
-                    if (rc)
-                        goto BAD_BLOCK_OFFSET;
-                    ++stats.indexBlockOffset.good;
-                    if ((options & bvo_IndexOptions) > bvo_IndexOffsets2) {
-                        int32_t const refSeqId = getRefSeqId(&algn);
-                        uint16_t const binNo = getBin(&algn);
-                        int32_t const position = getPosition(&algn);
-                        
-                        if (ctx.position[i].refNo == refSeqId &&
-                            (ctx.position[i].binNo == binNo ||
-                             ctx.position[i].binNo == ~((unsigned)0)
-                        ))
-                            ++stats.indexBin.good;
-                        else if (ctx.position[i].refNo == refSeqId)
-                            ++stats.indexBin.warning;
-                        else
-                            ++stats.indexBin.error;
-                        
-                        if (refSeqId < ref || position < rpos)
-                            ++stats.inOrder.error;
-                        
-                        ref = refSeqId;
-                        rpos = position;
-                    }
-                }
-                if (0) {
-                BAD_BLOCK_OFFSET:
-                    ++stats.indexBlockOffset.error;
-                }
-                ++i;
-            }
-        }
-        
-        free(ctx.position);
-        BGZFileWhack(&bam);
-    }
-    stats.bamFilePosition = stats.bamFileSize;
-    return callback(callbackContext, rc, &stats);
-}
-
-static rc_t BAMValidate3(BAMValidate_ctx_t *ctx,
-                         BAMAlignment const *algn
-                         )
-{
-    rc_t rc = 0;
-    uint16_t const flags = getFlags(algn);
-    int32_t const refSeqId = getRefSeqId(algn);
-    int32_t const refPos = getPosition(algn);
-    unsigned const mapQ = getMapQual(algn);
-    bool const aligned =
-        ((flags & BAMFlags_SelfIsUnmapped) == 0) && 
-        (refSeqId >= 0) && (refSeqId < ctx->nrefs) &&
-        (refPos >= 0) && (refPos < ctx->refLen[refSeqId]) && (mapQ > 0);
-    
-    if (ctx->options & bvo_ExtraFields) {
-    }
-    if (aligned) {
-        if ((ctx->options & bvo_Sorted) != 0) {
-            if (ctx->lastRefId < refSeqId || (ctx->lastRefId == refSeqId && ctx->lastRefPos <= refPos))
-                ++ctx->stats->inOrder.good;
-            else
-                ++ctx->stats->inOrder.error;
-            ctx->lastRefId = refSeqId;
-            ctx->lastRefPos = refPos;
-        }
-        if (ctx->options & bvo_CIGARConsistency) {
-        }
-        if (ctx->options & bvo_BinConsistency) {
-        }
-    }
-    if (ctx->options & bvo_FlagsConsistency) {
-    }
-    if (ctx->options & bvo_QualityValues) {
-    }
-    if (ctx->options & bvo_MissingSequence) {
-    }
-    if (ctx->options & bvo_MissingQuality) {
-    }
-    if (ctx->options & bvo_FlagsStats) {
-    }
-    return rc;
-}
-
-static rc_t BAMValidate2(void *Ctx, const BGZFile *file,
-                         rc_t rc, uint64_t fpos,
-                         const zlib_block_t data, unsigned dsize)
-{
-    BAMValidate_ctx_t *ctx = Ctx;
-    rc_t rc2;
-    bool fatal = false;
-    
-    ctx->stats->bamFilePosition = fpos;
-    if (rc) {
-        if (ctx->options == bvo_BlockHeaders)
-            ++ctx->stats->blockHeaders.error;
-        else
-            ++ctx->stats->blockCompression.error;
-    }
-    else if (ctx->options == bvo_BlockHeaders) {
-        ++ctx->stats->blockHeaders.good;
-    }
-    else if (ctx->options == bvo_BlockCompression) {
-        ++ctx->stats->blockHeaders.good;
-        ++ctx->stats->blockCompression.good;
-    }
-    else if (dsize) {
-        ctx->bsize += dsize;
-        if (!ctx->stats->bamHeaderIsBad && !ctx->stats->bamHeaderIsGood) {
-            unsigned header_len;
-            unsigned refs_start;
-            unsigned nrefs;
-            unsigned data_start;
-            
-            rc2 = BAMValidateHeader(ctx->buf, ctx->bsize,
-                                       &header_len, &refs_start,
-                                       &nrefs, &data_start);
-            
-            if (rc2 == 0) {
-                ctx->stats->bamHeaderIsGood = true;
-                if (ctx->options & bvo_BinConsistency) {
-                    ctx->refLen = malloc(nrefs * sizeof(ctx->refLen[0]));
-                    if (ctx->refLen == NULL) {
-                        rc = RC(rcAlign, rcFile, rcValidating, rcMemory, rcExhausted);
-                        fatal = true;
-                    }
-                    else {
-                        unsigned cp;
-                        unsigned i;
-                        
-                        ctx->nrefs = nrefs;
-                        for (i = 0, cp = refs_start; cp != data_start; ++i) {
-                            int32_t len;
-                            
-                            memcpy(&len, &ctx->buf[cp], 4);
-                            memcpy(&ctx->refLen[i], &ctx->buf[cp + 4 + len], 4);
-                            cp += len + 8;
-                        }
-                    }
-                }
-                ctx->dnext = data_start;
-            }
-            else if ( GetRCState( rc2 ) != rcIncomplete || GetRCObject( rc2 ) != (enum RCObject)rcData)
-            {
-                ctx->stats->bamHeaderIsBad = true;
-                ctx->options = bvo_BlockCompression;
-                rc = rc2;
-            }
-            else
-                ctx->dnext = ctx->bsize;
-        }
-        if (rc == 0) {
-            if (ctx->stats->bamHeaderIsGood) {
-                unsigned cp = ctx->dnext;
-                
-                while (cp + 4 < ctx->bsize) {
-                    int32_t rsize;
-                    
-                    rsize = LE2HI32(&ctx->buf[cp]);
-                    if (rsize < 0) {
-                        ++ctx->stats->blockStructure.error;
-                        ctx->options = bvo_BlockStructure;
-                        
-                        /* throw away the rest of the current buffer */
-                        if (cp >= ctx->bsize - dsize)
-                            cp = ctx->bsize;
-                        else
-                            cp = ctx->bsize - dsize;
-                        
-                        rc = RC(rcAlign, rcFile, rcValidating, rcData, rcInvalid);
-                        break;
-                    }
-                    else if (cp + 4 + rsize < ctx->bsize) {
-                        if (rsize > UINT16_MAX)
-                            ++ctx->stats->blockStructure.warning;
-                        else
-                            ++ctx->stats->blockStructure.good;
-                        if (ctx->options > bvo_BlockStructure) {
-                            BAMAlignment algn;
-                            
-/*                            rc = BAMAlignmentParse(&algn, &ctx->buf[cp + 4], rsize); */
-                            if (rc == 0) {
-                                ++ctx->stats->recordStructure.good;
-                                if (ctx->options > bvo_RecordStructure)
-                                    rc = BAMValidate3(ctx, &algn);
-                            }
-                            else
-                                ++ctx->stats->recordStructure.error;
-                        }
-                        cp += 4 + rsize;
-                    }
-                    else
-                        break;
-                }
-                if (&ctx->buf[cp] >= data) {
-                    if (cp < ctx->bsize) {
-                        ctx->bsize -= cp;
-                        memmove(ctx->buf, &ctx->buf[cp], ctx->bsize);
-                        cp = ctx->bsize;
-                    }
-                    else {
-                        assert(cp == ctx->bsize);
-                        cp = ctx->bsize = 0;
-                    }
-                }
-                ctx->dnext = cp;
-            }
-            if (ctx->alloced < ctx->bsize + ZLIB_BLOCK_SIZE) {
-                void *temp;
-                
-                temp = realloc(ctx->buf, ctx->alloced + ZLIB_BLOCK_SIZE);
-                if (temp == NULL) {
-                    rc = RC(rcAlign, rcFile, rcValidating, rcMemory, rcExhausted);
-                    fatal = true;
-                }
-                else {
-                    ctx->buf = temp;
-                    ctx->alloced += ZLIB_BLOCK_SIZE;
-                }
-            }
-            ctx->nxt = &ctx->buf[ctx->dnext];
-        }
-    }
-    rc2 = ctx->callback(ctx->ctx, rc, ctx->stats);
-    ctx->cancelled |= rc2 != 0;
-    return fatal ? rc : rc2;
-}
-
-static rc_t BAMValidateBAM(struct VPath const *bampath,
-                           BAMValidateOption options,
-                           BAMValidateCallback callback,
-                           void *callbackContext
-                           )
-{
-    rc_t rc;
-    BGZFile bam;
-    BAMValidate_ctx_t ctx;
-    BAMValidateStats stats;
-
-    if (bampath == NULL)
-        return RC(rcAlign, rcFile, rcValidating, rcParam, rcNull);
-    
-    memset(&ctx, 0, sizeof(ctx));
-    memset(&stats, 0, sizeof(stats));
-    
-    ctx.callback = callback;
-    ctx.ctx = callbackContext;
-    ctx.options = options;
-    ctx.stats = &stats;
-    
-    if (options > bvo_BlockCompression) {
-        ctx.alloced = ZLIB_BLOCK_SIZE * 2;
-        ctx.nxt = ctx.buf = malloc(ctx.alloced);
-        
-        if (ctx.buf == NULL)
-            return RC(rcAlign, rcFile, rcValidating, rcMemory, rcExhausted);
-    }
-    
-    if (options > bvo_RecordStructure)
-        options = bvo_RecordStructure | (options & 0xFFF0);
-    
-    rc = VPath2BGZF(&bam, bampath);
-    if (rc == 0) {
-        stats.bamFileSize = bam.fsize;
-        if ((options & 7) > bvo_BlockHeaders)
-            rc = BGZFileWalkBlocks(&bam, true, (zlib_block_t *)&ctx.nxt, BAMValidate2, &ctx);
-        else
-            rc = BGZFileWalkBlocks(&bam, false, NULL, BAMValidate2, &ctx);
-    }
-    BGZFileWhack(&bam);
-    return rc;
-}
-
-static rc_t CC dummy_cb(void *ctx, rc_t result, const BAMValidateStats *stats)
-{
-    return 0;
-}
-
-LIB_EXPORT rc_t CC BAMValidate(struct VPath const *bampath,
-                               struct VPath const *baipath,
-                               BAMValidateOption options,
-                               BAMValidateCallback callback,
-                               void *callbackContext
-                               )
-{
-    if (callback == NULL)
-        callback = dummy_cb;
-    if (bampath == NULL)
-        return RC(rcAlign, rcFile, rcValidating, rcParam, rcNull);
-    if (baipath == NULL) {
-        if (options & bvo_IndexOptions)
-            return RC(rcAlign, rcFile, rcValidating, rcParam, rcNull);
-        return BAMValidateBAM(bampath, options, callback, callbackContext);
-    }
-    return BAMValidateIndex(bampath, baipath, options, callback, callbackContext);
-}
diff --git a/libs/align/debug.h b/libs/align/debug.h
deleted file mode 100644
index 7c03771..0000000
--- a/libs/align/debug.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#ifndef _h_align_debug_
-#define _h_align_debug_
-
-#include <klib/debug.h>
-
-#if _DEBUGGING
-
-#define ALIGN_DBGF(msg) DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_WRITER), msg)
-#define ALIGN_DBG(fmt, ...) ALIGN_DBGF(("%s:%u: " fmt "\n", __func__, __LINE__, __VA_ARGS__))
-#define ALIGN_DBGERR(rc) if(rc != 0) {ALIGN_DBGF(("%s:%u: %R\n", __func__, __LINE__, rc));}
-#define ALIGN_DBGERRP(fmt, rc, ...) if(rc != 0) {ALIGN_DBGF(("%s:%u: %R " fmt "\n", __func__, __LINE__, rc, __VA_ARGS__));}
-
-#define ALIGN_C_DBGF(msg) DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_COMPRESS), msg)
-#define ALIGN_C_DBG(fmt, ...) ALIGN_C_DBGF(("%s:%u: " fmt "\n", __func__, __LINE__, __VA_ARGS__))
-#define ALIGN_C_DBGERR(rc) if(rc != 0) {ALIGN_C_DBGF(("%s:%u: %R\n", __func__, __LINE__, rc));}
-#define ALIGN_C_DBGERRP(fmt, rc, ...) if(rc != 0) {ALIGN_C_DBGF(("%s:%u: %R " fmt "\n", __func__, __LINE__, rc, __VA_ARGS__));}
-
-#define ALIGN_R_DBGF(msg) DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_COVERAGE), msg)
-#define ALIGN_R_DBG(fmt, ...) ALIGN_R_DBGF(("%s:%u: " fmt "\n", __func__, __LINE__, __VA_ARGS__))
-#define ALIGN_R_DBGERR(rc) if(rc != 0) {ALIGN_R_DBGF(("%s:%u: %R\n", __func__, __LINE__, rc));}
-#define ALIGN_R_DBGERRP(fmt, rc, ...) if(rc != 0) {ALIGN_R_DBGF(("%s:%u: %R " fmt "\n", __func__, __LINE__, rc, __VA_ARGS__));}
-
-#define ALIGN_CF_DBGF(msg) DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_CFG), msg)
-#define ALIGN_CF_DBG(fmt, ...) ALIGN_CF_DBGF(("%s:%u: " fmt "\n", __func__, __LINE__, __VA_ARGS__))
-#define ALIGN_CF_DBGERR(rc) if(rc != 0) {ALIGN_CF_DBGF(("%s:%u: %R\n", __func__, __LINE__, rc));}
-#define ALIGN_CF_DBGERRP(fmt, rc, ...) if(rc != 0) {ALIGN_CF_DBGF(("%s:%u: %R " fmt "\n", __func__, __LINE__, rc, __VA_ARGS__));}
-
-#else
-
-#define ALIGN_DBGF(msg) ((void)0)
-#define ALIGN_DBG(fmt, ...) ((void)0)
-#define ALIGN_DBGERR(rc) ((void)0)
-#define ALIGN_DBGERRP(fmt, rc, ...) ((void)0)
-
-#define ALIGN_C_DBGF(msg) ((void)0)
-#define ALIGN_C_DBG(fmt, ...) ((void)0)
-#define ALIGN_C_DBGERR(rc) ((void)0)
-#define ALIGN_C_DBGERRP(fmt, rc, ...) ((void)0)
-
-#define ALIGN_R_DBGF(msg) ((void)0)
-#define ALIGN_R_DBG(fmt, ...) ((void)0)
-#define ALIGN_R_DBGERR(rc) ((void)0)
-#define ALIGN_R_DBGERRP(fmt, rc, ...) ((void)0)
-
-#define ALIGN_CF_DBGF(msg) ((void)0)
-#define ALIGN_CF_DBG(fmt, ...) ((void)0)
-#define ALIGN_CF_DBGERR(rc) ((void)0)
-#define ALIGN_CF_DBGERRP(fmt, rc, ...) ((void)0)
-
-#endif
-
-#endif /* _h_align_debug_ */
diff --git a/libs/align/dna-reverse-cmpl.c b/libs/align/dna-reverse-cmpl.c
deleted file mode 100644
index c9cbb83..0000000
--- a/libs/align/dna-reverse-cmpl.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <align/extern.h>
-
-#include <klib/rc.h>
-#include <insdc/insdc.h>
-#include <sysalloc.h>
-
-#include "debug.h"
-#include <align/dna-reverse-cmpl.h>
-#include <string.h>
-
-LIB_EXPORT rc_t CC DNAReverseCompliment(const INSDC_dna_text* seq, INSDC_dna_text* cmpl, uint32_t len)
-{
-    rc_t rc = 0;
-    uint32_t i;
-    static INSDC_dna_text compl[256] = "~";
-
-    if( seq == NULL || cmpl == NULL ) {
-        rc = RC( rcAlign, rcType, rcConverting, rcParam, rcNull);
-    } else {
-        if( compl[0] == '~' ) {
-            INSDC_dna_text* x = (INSDC_dna_text*)&compl[0];
-            memset(x, 0, sizeof(compl));
-            x['A'] = x['a'] = 'T';
-            x['T'] = x['t'] = 'A';
-            x['U'] = x['u'] = 'A';
-            x['G'] = x['g'] = 'C';
-            x['C'] = x['c'] = 'G';
-            x['Y'] = x['y'] = 'R';
-            x['R'] = x['r'] = 'Y';
-            x['S'] = x['s'] = 'S';
-            x['W'] = x['w'] = 'W';
-            x['K'] = x['k'] = 'M';
-            x['M'] = x['m'] = 'K';
-            x['B'] = x['b'] = 'V';
-            x['D'] = x['d'] = 'H';
-            x['H'] = x['h'] = 'D';
-            x['V'] = x['v'] = 'B';
-            x['N'] = x['n'] = 'N';
-            x['0'] = '0';
-            x['1'] = '1';
-            x['2'] = '2';
-            x['3'] = '3';
-        }
-        cmpl += len;
-        for(i = 0; i < len; i++) {
-            *--cmpl= compl[(int)seq[i]];
-            if( *cmpl == '\0' ) {
-                rc = RC(rcAlign, rcFormatter, rcWriting, rcData, rcInvalid);
-                break;
-            }
-        }
-    }
-    ALIGN_DBGERR(rc);
-    return rc;
-}
diff --git a/libs/align/pl_iterator.c b/libs/align/pl_iterator.c
deleted file mode 100644
index 0e62d85..0000000
--- a/libs/align/pl_iterator.c
+++ /dev/null
@@ -1,689 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <align/extern.h>
-
-#include <klib/rc.h>
-#include <klib/vector.h>
-#include <klib/refcount.h>
-#include <klib/sort.h>
-#include <klib/text.h>
-#include <klib/out.h>
-#include <insdc/insdc.h>
-#include <align/manager.h>
-#include <align/iterator.h>
-#include <sysalloc.h>
-
-#include "debug.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-typedef struct window
-{
-    INSDC_coord_zero first;
-    INSDC_coord_len len;
-} window;
-
-
-typedef struct pi_entry
-{
-    DLNode n;                       /* to have it in a DLList */
-    PlacementIterator *pi;          /* the placement-iterator we have added */
-    window nxt_avail;               /* the next available position of the placement-iterator */
-} pi_entry;
-
-
-typedef struct pi_window
-{
-    DLNode n;                       /* to have it in a DLList */
-    window w;                       /* the window of the placement-iterator */
-    DLList pi_entries;              /* it has a DLList of pi_entry-struct's */
-    uint32_t count;                 /* how many entries do we have */
-} pi_window;
-
-
-typedef struct pi_ref
-{
-    DLNode n;                       /* to have it in a DLList */
-    char * name;                    /* the name of the reference it referes to */
-    window outer;                   /* the sum of all windows it has... */
-    bool outer_initialized;         /* has the outer-window been initialized */
-    DLList pi_windows;              /* it has a DLList of pi_window-struct's */
-} pi_ref;
-
-
-struct PlacementSetIterator
-{
-    KRefcount refcount;
-    struct AlignMgr const *amgr;    /* the alignment-manager... ( right now: we store it, but that's it )*/
-    DLList pi_refs;                 /* a list of references we have to iterate over... */
-    pi_ref * current_ref;           /* what is the current reference, we are handling ? */
-    pi_window * current_window;     /* what is the current window, we are handling ? */
-    pi_entry * current_entry;       /* what is the current pi-entry, we are handling ? */
-};
-
-
-/* =================================================================================================== */
-
-
-LIB_EXPORT rc_t CC AlignMgrMakePlacementSetIterator ( struct AlignMgr const *self,
-    PlacementSetIterator **iter )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcAlign, rcIterator, rcConstructing, rcSelf, rcNull );
-    else
-    {
-        if ( iter == NULL  )
-            rc = RC( rcAlign, rcIterator, rcConstructing, rcParam, rcNull );
-        else
-        {
-            PlacementSetIterator * psi = calloc( sizeof * psi, 1 );
-            if ( psi == NULL )
-                rc = RC( rcAlign, rcIterator, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = AlignMgrAddRef ( self );
-                if ( rc == 0 )
-                {
-                    KRefcountInit( &psi->refcount, 1, "PlacementSetIterator", "Make", "align" );
-                    psi->amgr = self;
-                    psi->current_ref = NULL;          /* we don't know that yet */
-                    psi->current_window = NULL;
-                    psi->current_entry = NULL;
-                    DLListInit( &psi->pi_refs );
-                }
-            }
-            if ( rc == 0 )
-                *iter = psi;
-            else
-                free( psi );
-        }
-    }
-
-    return rc;
-}
-
-
-/* =================================================================================================== */
-
-
-static int cmp_pchar( const char * a, const char * b )
-{
-    int res = 0;
-    if ( ( a != NULL )&&( b != NULL ) )
-    {
-        size_t len_a = string_size( a );
-        size_t len_b = string_size( b );
-        res = string_cmp ( a, len_a, b, len_b, ( len_a < len_b ) ? len_b : len_a );
-    }
-    return res;
-}
-
-
-/* =================================================================================================== */
-
-
-typedef struct pi_ref_cb_ctx
-{
-    const char * name;
-    pi_ref *res;
-} pi_ref_cb_ctx;
-
-
-static bool CC find_pi_ref_callback( DLNode *n, void *data )
-{
-    pi_ref_cb_ctx *ctx = ( pi_ref_cb_ctx * )data;
-    pi_ref * pr = ( pi_ref * ) n;
-    bool res = ( cmp_pchar( ctx->name, pr->name ) == 0 );
-    if ( res )
-    {
-        ctx->res = pr;
-    }
-    return res;
-}
-
-
-static pi_ref * find_pi_ref( const DLList * list, const char * name )
-{
-    pi_ref_cb_ctx ctx;
-    ctx.res = NULL;
-    ctx.name = name;
-    DLListDoUntil ( list, false, find_pi_ref_callback, &ctx );
-    return ctx.res;
-}
-
-
-/* =================================================================================================== */
-
-typedef struct pi_window_cb_ctx
-{
-    window *w;
-    pi_window *res;
-} pi_window_cb_ctx;
-
-
-static bool CC find_pi_window_callback( DLNode *n, void *data )
-{
-    pi_window_cb_ctx *ctx = ( pi_window_cb_ctx * )data;
-    pi_window * pw = ( pi_window * ) n;
-    bool res = ( pw->w.first == ctx->w->first && pw->w.len == ctx->w->len );
-    if ( res )
-        ctx->res = pw;
-    return res;
-}
-
-
-static pi_window * find_pi_window( const DLList * list, window * w )
-{
-    pi_window_cb_ctx ctx;
-    ctx.res = NULL;
-    ctx.w = w;
-    DLListDoUntil ( list, false, find_pi_window_callback, &ctx );
-    return ctx.res;
-}
-
-
-/* =================================================================================================== */
-
-
-static rc_t make_pi_window( pi_window ** pw, DLList * list, window * w )
-{
-    rc_t rc = 0;
-    *pw = calloc( 1, sizeof ** pw );
-    if ( *pw == NULL )
-        rc = RC( rcAlign, rcIterator, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        (*pw)->w.first = w->first;
-        (*pw)->w.len = w->len;
-        DLListInit( &( (*pw)->pi_entries ) );
-        DLListPushTail ( list, ( DLNode * )(*pw) );
-    }
-    return rc;
-}
-
-
-static rc_t add_to_pi_window( pi_window * pw, PlacementIterator *pi )
-{
-    rc_t rc = 0;
-    pi_entry * pie = calloc( 1, sizeof *pie );
-    if ( pie == NULL )
-        rc = RC( rcAlign, rcIterator, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        rc = PlacementIteratorNextAvailPos ( pi, &(pie->nxt_avail.first), &(pie->nxt_avail.len) );
-        if ( rc == 0 )
-        {
-            pie->pi = pi;  /* store the placement-iterator in it's entry-struct */
-            DLListPushTail ( &pw->pi_entries, ( DLNode * )pie );
-            pw->count += 1;
-        }
-        else
-        {
-            free( pie );
-            ALIGN_DBG( "PlacementIter has no placements...", 0 );
-        }
-    }
-    return rc;
-}
-
-
-/* =================================================================================================== */
-
-
-static rc_t make_pi_ref( pi_ref ** pr, DLList * list, const char * name )
-{
-    rc_t rc = 0;
-    *pr = calloc( 1, sizeof ** pr );
-    if ( *pr == NULL )
-        rc = RC( rcAlign, rcIterator, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        (*pr)->name = string_dup_measure ( name, NULL );
-        DLListInit( &( (*pr)->pi_windows ) );
-        DLListPushTail ( list, ( DLNode * )(*pr) );
-    }
-    return rc;
-}
-
-
-static rc_t add_to_pi_ref( pi_ref * pr, window * w, PlacementIterator *pi )
-{
-    rc_t rc = 0;
-    pi_window * pw = find_pi_window( &pr->pi_windows, w );
-
-    if ( pw == NULL )
-        rc = make_pi_window( &pw, &pr->pi_windows, w );
-    if ( rc == 0 )
-        rc = add_to_pi_window( pw, pi );
-
-    if ( rc == 0 )
-    {
-        /* keep track of the outer window... */
-        if ( DLListHead( &pr->pi_windows ) == NULL )
-        {
-            /* first window ?*/
-            pr->outer.first = w->first;
-            pr->outer.len = w->len;
-        }
-        else
-        {
-            if ( w->first < pr->outer.first )
-                pr->outer.first = w->first;
-            if ( w->first + w->len > pr->outer.first + pr->outer.len )
-                pr->outer.len = ( ( w->first + w->len ) - pr->outer.first ) + 1;
-        }
-    }
-    else if ( ( pw != NULL )&&( GetRCState( rc ) == rcDone ) )
-    {
-        /* add_to_pi_window() was not successful because iterator has no
-           alignments int the requested window, that means we have to delete
-           the window if it is empty */
-        if ( pw->count == 0 )
-        {
-            /* first we have to take the pw out of the pr->pi_windows - list...
-               it was pushed at the tail of it, so we pop it from there */
-            DLListPopTail( &pr->pi_windows );
-            /* because it is empty ( count == 0 ) we can just free it now */
-            free( pw );
-        }
-    }
-    return rc;
-}
-
-
-/* =================================================================================================== */
-
-
-LIB_EXPORT rc_t CC PlacementSetIteratorAddPlacementIterator ( PlacementSetIterator *self,
-    PlacementIterator *pi )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcAlign, rcIterator, rcConstructing, rcSelf, rcNull );
-    else
-    {
-        if ( pi == NULL  )
-            rc = RC( rcAlign, rcIterator, rcConstructing, rcParam, rcNull );
-        else
-        {
-            const char * name;      /* what reference are we aligning against */
-            window w;               /* where does the pi start/end, against said reference */
-
-            /* to find the name of the reference used, important for adding the iterator */
-            rc = PlacementIteratorRefWindow ( pi, &name, &(w.first), &(w.len) );
-            if ( rc == 0 )
-            {
-                pi_ref * pr = find_pi_ref( &self->pi_refs, name );
-                /* if we do not have a pi_ref yet with this name: make one! */
-                if ( pr == NULL )
-                    rc = make_pi_ref( &pr, &self->pi_refs, name );
-                /* add the placement-iterator to the newly-made or existing pi_ref! */
-                if ( rc == 0 )
-                    rc = add_to_pi_ref( pr, &w, pi );
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC PlacementSetIteratorAddRef ( const PlacementSetIterator *cself )
-{
-    rc_t rc = 0;
-    if ( cself == NULL )
-        rc = RC( rcAlign, rcIterator, rcAttaching, rcSelf, rcNull );
-    else
-    {
-        if ( KRefcountAdd( &cself->refcount, "PlacementSetIterator" ) != krefOkay )
-        {
-            rc = RC( rcAlign, rcIterator, rcAttaching, rcError, rcUnexpected );
-        }
-    }
-    return rc;
-}
-
-
-/* =================================================================================================== */
-
-
-static void CC pi_entry_whacker( DLNode *n, void *data )
-{
-    pi_entry * pie = ( pi_entry * )n;
-    if ( pie->pi != NULL )
-    {
-        PlacementIteratorRelease ( pie->pi );
-        pie->pi = NULL;
-    }
-    free( pie );
-}
-
-static void CC pi_window_whacker( DLNode *n, void *data )
-{
-    pi_window * pw = ( pi_window * )n;
-    DLListWhack ( &pw->pi_entries, pi_entry_whacker, NULL );
-    free( pw );
-}
-
-static void CC pi_ref_whacker( DLNode *n, void *data )
-{
-    pi_ref * pr = ( pi_ref * )n;
-    DLListWhack ( &pr->pi_windows, pi_window_whacker, NULL );
-    free( pr->name );
-    free( pr );
-}
-
-
-static void pl_set_iter_clear_curr_ref_window( PlacementSetIterator *self )
-{
-    if ( self->current_window != NULL )
-    {
-        pi_window_whacker( (DLNode *)self->current_window, NULL );
-        self->current_window = NULL;
-    }
-}
-
-
-static void pl_set_iter_clear_curr_ref( PlacementSetIterator *self )
-{
-    if ( self->current_ref != NULL )
-    {
-        pi_ref_whacker( (DLNode *)self->current_ref, NULL );
-        self->current_ref = NULL;
-    }
-}
-
-/* =================================================================================================== */
-
-
-LIB_EXPORT rc_t CC PlacementSetIteratorRelease ( const PlacementSetIterator *cself )
-{
-    rc_t rc = 0;
-    if ( cself == NULL )
-        rc = RC( rcAlign, rcIterator, rcReleasing, rcSelf, rcNull );
-    else
-    {
-        if ( KRefcountDrop( &cself->refcount, "PlacementSetIterator" ) == krefWhack )
-        {
-            PlacementSetIterator * self = ( PlacementSetIterator * ) cself;
-
-            pl_set_iter_clear_curr_ref_window( self );
-            pl_set_iter_clear_curr_ref( self );
-
-            /* release the DLList of pi-ref's and the pi's in it... */
-            DLListWhack ( &self->pi_refs, pi_ref_whacker, NULL );
-
-            AlignMgrRelease ( self->amgr );
-
-            free( self );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC PlacementSetIteratorNextReference ( PlacementSetIterator *self,
-    INSDC_coord_zero *first_pos, INSDC_coord_len *len, struct ReferenceObj const ** refobj )
-{
-    rc_t rc = 0;
-    if ( refobj != NULL ) { *refobj = NULL; }
-
-    if ( self == NULL )
-        return RC( rcAlign, rcIterator, rcReleasing, rcSelf, rcNull );
-
-    pl_set_iter_clear_curr_ref_window( self );
-    pl_set_iter_clear_curr_ref( self );
-    self->current_entry = NULL;     /* what is the current pi-entry, we are handling ? */
-
-    /* !!! here we are taking the next reference from the top of the list */
-    self->current_ref = ( pi_ref * )DLListPopHead ( &self->pi_refs );
-
-    if ( self->current_ref == NULL )
-    {
-        return SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone );
-    }
-
-    if ( first_pos != NULL ) *first_pos = self->current_ref->outer.first;
-    if ( len != NULL) *len = self->current_ref->outer.len;
-
-    /* if the caller wants to know the ref-obj... */
-    if ( refobj != NULL )
-    {
-        pi_window *pw = ( pi_window * )DLListHead( &(self->current_ref->pi_windows) );
-        if ( pw != NULL )
-        {
-            pi_entry * pie = ( pi_entry * )DLListHead( &(pw->pi_entries) );
-            if ( pie != NULL )
-            {
-                rc = PlacementIteratorRefObj( pie->pi, refobj );
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC PlacementSetIteratorNextWindow ( PlacementSetIterator *self,
-    INSDC_coord_zero *first_pos, INSDC_coord_len *len )
-{
-    rc_t rc = 0;
-    if ( first_pos != NULL ) { *first_pos = 0; }
-    if ( len != NULL ) { *len = 0; }
-
-    if ( self == NULL )
-        return RC( rcAlign, rcIterator, rcReleasing, rcSelf, rcNull );
-
-    self->current_entry = NULL;     /* what is the current pi-entry, we are handling ? */
-
-    if ( self->current_ref == NULL )
-    {
-        return SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone );
-    }
-
-    pl_set_iter_clear_curr_ref_window( self );
-
-    /* !!! here we are taking the next window from the top of the list */
-    self->current_window = ( pi_window * )DLListPopHead ( &(self->current_ref->pi_windows) );
-
-    /* check if we have reached the last window on this reference... */
-    if ( self->current_window == NULL )
-    {
-        return SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone );
-    }
-
-    /* point to the first entry in this window... */
-    self->current_entry = ( pi_entry * )DLListHead( &(self->current_window->pi_entries) );
-
-    /* if the caller wants to know first_pos / len */
-    if ( first_pos != NULL )
-    {
-        *first_pos = self->current_window->w.first;
-    }
-    if ( len != NULL )
-    {
-        *len = self->current_window->w.len;
-    }
-
-    return rc;
-}
-
-typedef struct pi_ref_nxt_avail_pos_ctx
-{
-    uint32_t count;
-    INSDC_coord_zero min_pos;
-    INSDC_coord_len min_len;
-    bool min_pos_initialized;
-    rc_t rc;
-} pi_ref_nxt_avail_pos_ctx;
-
-static void CC nxt_avail_pos_cb( DLNode * n, void * data )
-{
-    pi_ref_nxt_avail_pos_ctx * ctx = ( pi_ref_nxt_avail_pos_ctx * ) data;
-    if ( ctx->rc == 0 )
-    {
-        pi_entry * pie = ( pi_entry * )n;
-        rc_t rc = PlacementIteratorNextAvailPos ( pie->pi, &(pie->nxt_avail.first), &(pie->nxt_avail.len) );
-        if ( rc == 0 )
-        {
-/*            OUTMSG(( "nxt_avail.first=%u w.last=%u\n", pie->nxt_avail.first, pie->w.last )); */
-            ( ctx->count )++;
-            if ( ctx->min_pos_initialized )
-            {
-                if ( pie->nxt_avail.first < ctx->min_pos )
-                {
-                    ctx->min_pos = pie->nxt_avail.first;
-                    ctx->min_len = pie->nxt_avail.len;
-                }
-            }
-            else
-            {
-                ctx->min_pos = pie->nxt_avail.first;
-                ctx->min_len = pie->nxt_avail.len;
-                ctx->min_pos_initialized = true;
-            }
-        }
-        else
-        {
-            if ( GetRCState( rc ) != rcDone )
-                ctx->rc = rc;
-        }
-    }
-}
-
-
-LIB_EXPORT rc_t CC PlacementSetIteratorNextAvailPos ( const PlacementSetIterator *cself,
-    INSDC_coord_zero *pos, INSDC_coord_len *len )
-{
-    rc_t rc = 0;
-    if ( cself == NULL )
-        rc = RC( rcAlign, rcIterator, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        if ( pos == NULL )
-            rc = RC( rcAlign, rcIterator, rcAccessing, rcParam, rcNull );
-        else
-        {
-            PlacementSetIterator *self = ( PlacementSetIterator * )cself;
-            if ( self->current_ref == NULL || self->current_window == NULL )
-            {
-                rc = SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone );
-            }
-            else
-            {
-                /* loop through all the pi_entry int the current_pi_ref */
-                pi_ref_nxt_avail_pos_ctx ctx;
-                ctx.count = 0;
-                ctx.rc = 0;
-                ctx.min_pos = 0;
-                ctx.min_len = 0;
-                ctx.min_pos_initialized = false;
-                DLListForEach ( &(self->current_window->pi_entries),
-                                false, nxt_avail_pos_cb, &ctx );
-                rc = ctx.rc;
-                if ( ctx.count == 0 )
-                {
-                    rc = SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone );
-                }
-                else
-                {
-                    *pos = ctx.min_pos;
-                    if ( len != NULL )
-                    {
-                        *len = ctx.min_len;
-                    }
-                }
-            } 
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC PlacementSetIteratorNextRecordAt ( PlacementSetIterator *self,
-    INSDC_coord_zero pos, const PlacementRecord **rec )
-{
-    rc_t rc = 0;
-    pi_window * pw;
-    bool done;
-
-    if ( rec == NULL )
-        return RC( rcAlign, rcIterator, rcAccessing, rcParam, rcNull );
-    *rec = NULL;
-    if ( self == NULL )
-        return RC( rcAlign, rcIterator, rcAccessing, rcSelf, rcNull );
-    if ( self->current_ref == NULL )
-    {
-        /* no more reference to iterator over! the iterator is done! */
-        return SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone );
-    }
-    if ( self->current_window == NULL )
-    {
-        /* no more windows to iterator over! the iterator is done! */
-        return SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone );
-    }
-
-    pw = self->current_window;
-    done = false;
-    do
-    {
-        if ( self->current_entry == NULL )
-        {
-            self->current_entry = ( pi_entry * )DLListHead( &(pw->pi_entries) );
-        }
-        done = ( self->current_entry == NULL );
-        rc = ( done ? SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone ) : 0 );
-        if ( rc == 0 )
-        {
-            rc = PlacementIteratorNextRecordAt ( self->current_entry->pi, pos, rec );
-            done = ( GetRCState( rc ) != rcDone );
-            if ( !done )
-            {
-                self->current_entry = ( pi_entry * )DLNodeNext( ( DLNode * )self->current_entry );
-                done = ( self->current_entry == NULL );
-                rc = ( done ? SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone ) : 0 );
-            }
-        }
-    } while ( !done );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC PlacementSetIteratorNextIdAt ( PlacementSetIterator *self,
-    INSDC_coord_zero pos, int64_t *row_id, INSDC_coord_len *len )
-{
-    const PlacementRecord *rec;
-    rc_t rc = PlacementSetIteratorNextRecordAt ( self, pos, &rec );
-    if ( rc == 0 )
-    {
-        if ( row_id != NULL ) *row_id = rec->id;
-        if ( len != NULL ) *len = rec->len;
-    }
-    return rc;
-}
diff --git a/libs/align/quality-quantizer.c b/libs/align/quality-quantizer.c
deleted file mode 100644
index f1a57d7..0000000
--- a/libs/align/quality-quantizer.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <align/extern.h>
-#include <klib/defs.h>
-#include <align/quality-quantizer.h>
-
-#include <stdint.h>
-#include <string.h>
-#include <ctype.h>
-
-#include <os-native.h>
-
-
-LIB_EXPORT
-bool CC QualityQuantizerInitMatrix(uint8_t dst[256], char const quant[])
-{
-    unsigned i = 0;
-    unsigned limit = 0;
-    unsigned value = 0;
-    unsigned cur;
-    int ws = 1;
-    int st = 0;
-    
-    memset(dst, 0, 256);
-    for (cur = 0; quant[cur] != 0; ++cur) {
-        int const ch = quant[cur];
-        
-        if (ws) {
-            if (isspace(ch))
-                continue;
-            ws = false;
-        }
-        switch (st) {
-        case 0:
-            if (isdigit(ch)) {
-                value = (value * 10) + ch - '0';
-                break;
-            }
-            else if (isspace(ch)) {
-                ++st;
-                ws = true;
-                break;
-            }
-            ++st;
-            /* no break */
-        case 1:
-            if (ch != ':')
-                return false;
-            ws = true;
-            ++st;
-            break;
-        case 2:
-            if (isdigit(ch)) {
-                limit  = (limit * 10) + ch - '0';
-                break;
-            }
-            else if (isspace(ch)) {
-                ++st;
-                ws = true;
-                break;
-            }
-            else if (ch == '-' && limit == 0) {
-                memset(dst + i, value, 256 - i);
-                return true;
-            }
-            ++st;
-            /* no break */
-        case 3:
-            if (ch != ',')
-                return false;
-            ws = true;
-            st = 0;
-            if (i > limit)
-                return false;
-            /* set from dst[i..(limit - 1)] = value
-             * not inclusive of the endpoint
-             */
-            memset(dst + i, value, limit - i);
-            i = limit;
-            limit = value = 0;
-            break;
-        }
-    }
-    return false;
-}
diff --git a/libs/align/reader-cmn.c b/libs/align/reader-cmn.c
deleted file mode 100644
index ae0c22d..0000000
--- a/libs/align/reader-cmn.c
+++ /dev/null
@@ -1,317 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was readten as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-
-#include "reader-cmn.h"
-#include "debug.h"
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-
-struct TableReader
-{
-    const VCursor* curs;
-    const TableReaderColumn* cols;
-    int64_t curr;
-};
-
-
-rc_t CC TableReader_Make( const TableReader** cself, const VTable* table,
-                          TableReaderColumn* cols, size_t cache )
-{
-    rc_t rc = 0;
-    const VCursor* curs;
-
-    if ( table == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcConstructing, rcParam, rcInvalid );
-    }
-    else
-    {
-        rc = VTableCreateCachedCursorRead( table, &curs, cache );
-        if ( rc == 0 )
-        {
-            rc = TableReader_MakeCursor( cself, curs, cols );
-            VCursorRelease( curs );
-        }
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-rc_t CC TableReader_MakeCursor( const TableReader** cself, const VCursor* cursor,
-                                TableReaderColumn* cols )
-{
-    rc_t rc = 0;
-    TableReader* obj = NULL;
-
-    if ( cself == NULL || cursor == NULL || cols == NULL || cols->name == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcConstructing, rcParam, rcInvalid );
-    }
-    else if ( ( obj = calloc( 1, sizeof( *obj ) ) ) == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcConstructing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        rc = VCursorAddRef( cursor );
-        if ( rc == 0 )
-        {
-            obj->curs = cursor;
-/*            obj->cursor_open = false; */
-            obj->cols = cols;
-            while ( rc == 0 && cols->name != NULL)
-            {
-                if ( !( cols->flags & ercol_Skip ) )
-                {
-                    rc = VCursorAddColumn( obj->curs, &cols->idx, "%s", cols->name );
-                    if ( rc != 0 )
-                    {
-                        if ( ( rc != 0 && ( cols->flags & ercol_Optional ) ) || GetRCState( rc ) == rcExists )
-                        {
-                            rc = 0;
-                        }
-                        else
-                        {
-                            ALIGN_DBGERRP( "cannot add column '%s' to cursor", rc, cols->name );
-                        }
-                    }
-                }
-                cols++;
-            }
-            if ( rc == 0 )
-            {
-                rc = VCursorOpen( obj->curs );
-            }
-        }
-    }
-
-
-    if( rc == 0 )
-    {
-        *cself = obj;
-/*        ALIGN_DBG("ok%c", '!'); */
-    }
-    else
-    {
-        TableReader_Whack( obj );
-        ALIGN_DBGERRP( "TableReader_MakeCursor() failed", rc, 0 );
-    }
-    return rc;
-}
-
-
-void CC TableReader_Whack( const TableReader* cself )
-{
-    if ( cself != NULL )
-    {
-        VCursorRelease( cself->curs );
-        free( ( TableReader* ) cself );
-    }
-}
-
-/*
-rc_t CC TableReader_OpenCursor( const TableReader* cself )
-{
-    TableReader * tr = ( TableReader * )cself;
-    VCursor * curs = ( VCursor * )tr->curs;
-    rc_t rc = VCursorOpen( curs );
-    tr->cursor_open = ( rc == 0 );
-    return rc;
-}
-*/
-
-rc_t CC TableReader_ReadRow( const TableReader* cself, int64_t rowid )
-{
-    rc_t rc = 0;
-	TableReaderColumn * c = NULL;
-	
-    if ( cself == NULL )
-    {
-        rc = RC(rcAlign, rcType, rcOpening, rcSelf, rcNull);
-    }
-    else if ( cself->curr != rowid )
-    {
-/*
-        if ( !cself->cursor_open )
-            rc = TableReader_OpenCursor( cself );
-*/
-        if ( rc == 0 )
-        {
-            rc = VCursorCloseRow( cself->curs );
-            if ( rc == 0 )
-            {
-                rc = VCursorSetRowId( cself->curs, rowid );
-                if ( rc == 0 )
-                {
-                    rc = VCursorOpenRow( cself->curs );
-                    if ( rc == 0 )
-                    {
-                        uint32_t boff = 0;
-                        c = ( TableReaderColumn* )( cself->cols );
-                        while ( c->name != NULL && rc == 0 )
-                        {
-                            if ( c->idx != 0 )
-                            {
-                                /* TBD - FIX ME
-                                   this can be dangerous, since VCursorCellData
-                                   can cause cache flushes, invalidating previous
-                                   reads. THESE MUST BE FETCHED UPON DEMAND, NOT
-                                   PREFETCHED!!
-                                */
-                                rc = VCursorCellData( cself->curs, c->idx, NULL, (const void**)&c->base.var, &boff, &c->len );
-                                if ( rc != 0 )
-                                {
-                                    if ( c->flags & ercol_Optional )
-                                        rc = 0;
-                                    c->base.var = NULL;
-                                    c->len = 0;
-                                }
-                                else if ( boff != 0 )
-                                {
-                                    rc = RC( rcAlign, rcType, rcReading, rcData, rcUnsupported );
-                                }
-                            }
-                            c++;
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    if ( rc != 0 )
-    {
-        ALIGN_DBGERRP( "column %s row %ld", rc, c ? c->name : "<none>", rowid );
-    }
-    else
-    {
-        ( ( TableReader* )cself )->curr = rowid;
-    }
-    return rc;
-}
-
-
-rc_t CC TableReader_IdRange( const TableReader* cself, int64_t* first, uint64_t* count )
-{
-    rc_t rc = 0;
-    if ( cself == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcRetrieving, rcSelf, rcNull );
-    }
-    else
-    {
-/*
-        if ( !cself->cursor_open )
-            rc = TableReader_OpenCursor( cself );
-        if ( rc == 0 )
-*/
-            rc = VCursorIdRange( cself->curs, 0, first, count );
-    }
-    return rc;
-}
-
-
-rc_t CC TableReader_OpenIndex( const TableReader* cself, const char* name, const KIndex** idx )
-{
-    rc_t rc = 0;
-
-    if ( cself == NULL || name == NULL || idx == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcNull );
-    }
-    else
-    {
-/*
-        if ( !cself->cursor_open )
-            rc = TableReader_OpenCursor( cself );
-        if ( rc == 0 )
-        {
-*/
-            const VTable* tbl;
-            rc = VCursorOpenParentRead( cself->curs, &tbl );
-            if ( rc == 0 )
-            {
-                rc = VTableOpenIndexRead( tbl, idx, "%s", name );
-                VTableRelease( tbl );
-            }
-/*        } */
-    }
-    return rc;
-}
-
-
-rc_t CC TableReader_PageIdRange( const TableReader *cself, int64_t rowid,
-                                 int64_t *pfirst, int64_t *plast )
-{
-    rc_t rc = 0;
-    
-    if ( cself == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcOpening, rcSelf, rcNull );
-    }
-    else
-    {
-/*
-        if ( !cself->cursor_open )
-            rc = TableReader_OpenCursor( cself );
-        if ( rc == 0 )
-        {
-*/
-            if ( pfirst != NULL || plast != NULL )
-            {
-                int64_t first = INT64_MAX;
-                int64_t last = INT64_MIN;
-                unsigned i;
-                
-                for ( i = 0; cself->cols[ i ].name != NULL; ++i )
-                {
-                    if ( cself->cols[i].idx != 0 )
-                    {
-                        int64_t tfirst;
-                        int64_t tlast;
-                        
-                        rc = VCursorPageIdRange( cself->curs, cself->cols[ i ].idx, rowid, &tfirst, &tlast );
-                        if ( rc == 0 )
-                        {
-                            if ( first > tfirst ) { first = tfirst; }
-                            if ( last < tlast ) { last = tlast; }
-                        }
-                    }
-                }
-                if ( pfirst != NULL ) { *pfirst = first; }
-                if ( plast  != NULL ) { *plast  = last; }
-            }
-/*        } */
-    }
-    return rc;
-}
diff --git a/libs/align/reader-cmn.h b/libs/align/reader-cmn.h
deleted file mode 100644
index 3310999..0000000
--- a/libs/align/reader-cmn.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was readten as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#ifndef _h_align_reader_cmn_
-#define _h_align_reader_cmn_
-
-#include <insdc/insdc.h>
-#include <insdc/sra.h>
-
-enum TableReaderColumn_Array {
-    ercol_Optional = 0x01,
-    ercol_Skip = 0x02
-};
-
-/* use ercol_Ignore to skip optional column when cursor is created */
-typedef struct TableReaderColumn_struct {
-    uint32_t idx;
-    const char* name;
-    union {
-        const void* var;
-        const char* str;
-        const bool* buul;
-        const uint8_t* u8;
-        const int16_t* i16;
-        const uint16_t* u16;
-        const int32_t* i32;
-        const uint32_t* u32;
-        const int64_t* i64;
-        const uint64_t* u64;
-        const INSDC_coord_one* coord1;
-        const INSDC_coord_zero* coord0;
-        const INSDC_coord_len* coord_len;
-        const INSDC_coord_val* coord_val;
-        const INSDC_SRA_xread_type* read_type;
-        const INSDC_SRA_read_filter* read_filter;
-    } base;
-    uint32_t len;
-    uint32_t flags;
-} TableReaderColumn;
-
-typedef struct TableReader TableReader;
-
-rc_t CC TableReader_Make(const TableReader** cself, const VTable* table, TableReaderColumn* cols, size_t cache);
-
-rc_t CC TableReader_MakeCursor(const TableReader** cself, const VCursor* cursor, TableReaderColumn* cols );
-
-rc_t CC TableReader_OpenCursor( const TableReader* cself );
-
-void CC TableReader_Whack(const TableReader* cself);
-
-rc_t CC TableReader_ReadRow(const TableReader* cself, int64_t rowid);
-
-rc_t CC TableReader_IdRange(const TableReader* cself, int64_t* first, uint64_t* count);
-
-rc_t CC TableReader_OpenIndex(const TableReader* cself, const char* name, const KIndex** idx);
-
-rc_t CC TableReader_PageIdRange(const TableReader *cself, int64_t rowid, int64_t *first, int64_t *last);
-
-#endif /* _h_align_reader_cmn_ */
diff --git a/libs/align/reader-refseq.c b/libs/align/reader-refseq.c
deleted file mode 100644
index f7761ed..0000000
--- a/libs/align/reader-refseq.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was readten as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <align/extern.h>
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <insdc/insdc.h>
-#include <vdb/manager.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <align/reader-refseq.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include "reader-cmn.h"
-#include "reference-cmn.h"
-#include "debug.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <ctype.h>
-#include <assert.h>
-
-static const TableReaderColumn TableReaderRefSeq_cols[] =
-{
-    /* order important, see code below! */
-    {0, "(INSDC:dna:text)READ", {NULL}, 0, 0},
-    {0, "(INSDC:4na:bin)READ", {NULL}, 0, ercol_Skip},
-    {0, "QUALITY", {NULL}, 0, ercol_Skip | ercol_Optional},
-    {0, "SEQ_LEN", {NULL}, 0, 0},
-    {0, NULL, {NULL}, 0, 0}
-};
-
-struct TableReaderRefSeq {
-    const TableReader* base;
-    TableReaderColumn cols[sizeof(TableReaderRefSeq_cols)/sizeof(TableReaderRefSeq_cols[0])];
-    char seq_id[256];
-    uint32_t max_seq_len;
-    INSDC_coord_len total_seq_len;
-    bool circular;
-    bool has_md5;
-    uint8_t md5[16];
-    const TableReaderColumn* read;
-    const TableReaderColumn* seq_len;
-};
-
-LIB_EXPORT rc_t CC TableReaderRefSeq_MakeTable(const TableReaderRefSeq** cself, const VDBManager* vmgr,
-                                               const VTable* table, uint32_t options, size_t cache)
-{
-    rc_t rc = 0;
-    TableReaderRefSeq* self = NULL;
-
-    if( cself == NULL || table == NULL ) {
-        rc = RC(rcAlign, rcType, rcConstructing, rcParam, rcNull);
-    } else if( (self = calloc(1, sizeof(*self))) == NULL ) {
-        rc = RC(rcAlign, rcType, rcConstructing, rcMemory, rcExhausted);
-    } else {
-        const TableReader* tmp;
-        TableReaderColumn static_cols[] = {
-            /* order important, see code below! */
-            {0, "MAX_SEQ_LEN", {NULL}, 0, 0},
-            {0, "SEQ_ID", {NULL}, 0, 0},
-            {0, "TOTAL_SEQ_LEN", {NULL}, 0, 0},
-            {0, "CIRCULAR", {NULL}, 0, 0},
-            {0, "MD5", {NULL}, 0, ercol_Optional},
-            {0, NULL, {NULL}, 0, 0}
-        };
-        if( (rc = TableReader_Make(&tmp, table, static_cols, 0)) == 0 ) {
-            if( (rc = TableReader_ReadRow(tmp, 1)) == 0 ) {
-                self->max_seq_len = static_cols[0].base.u32[0];
-                self->total_seq_len = static_cols[2].base.u64[0];
-                if( self->total_seq_len != static_cols[2].base.u64[0] ) {
-                    rc = RC(rcAlign, rcType, rcConstructing, rcData, rcOutofrange);
-                }
-                if( static_cols[1].base.var != NULL ) {
-                    if ( static_cols[ 1 ].len > sizeof( self->seq_id ) - 1 )
-                    {
-                        rc = RC( rcAlign, rcType, rcConstructing, rcBuffer, rcInsufficient );
-                    }
-                    else
-                    {
-                        string_copy( self->seq_id, ( sizeof self->seq_id ) -  1, static_cols[1].base.str, static_cols[1].len );
-                        self->seq_id[ static_cols[ 1 ].len ] = '\0';
-                    }
-                }
-                self->circular = static_cols[3].base.buul[0];
-                if( static_cols[4].base.var != NULL ) {
-                    memcpy(self->md5, static_cols[4].base.var, sizeof(self->md5));
-                    self->has_md5 = true;
-                }
-            }
-            TableReader_Whack(tmp);
-        }
-
-        memcpy(self->cols, TableReaderRefSeq_cols, sizeof(TableReaderRefSeq_cols));
-        if( options & errefseq_4NA) {
-            self->cols[0].flags |= ercol_Skip;
-            self->cols[1].flags &= ~ercol_Skip;
-            self->read = &self->cols[1];
-        } else {
-            self->read = &self->cols[0];
-        }
-        self->seq_len = &self->cols[3];
-        rc = TableReader_Make(&self->base, table, self->cols, cache);
-    }
-    if( rc == 0 ) {
-        *cself = self;
-        /* ALIGN_DBG("table 0x%p opened 0x%p", table, self); */
-    } else {
-        TableReaderRefSeq_Whack(self);
-        ALIGN_DBGERRP("table for 0x%p", rc, table);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableReaderRefSeq_MakePath(const TableReaderRefSeq** cself, const VDBManager* vmgr,
-                                              const char* path, uint32_t options, size_t cache)
-{
-    rc_t rc = 0;
-    const VTable* tbl = NULL;
-
-    if( vmgr == NULL || path == NULL ) {
-        rc = RC(rcAlign, rcType, rcConstructing, rcParam, rcNull);
-    } else if( (rc = VDBManagerOpenTableRead(vmgr, &tbl, NULL, "%s", path)) == 0 ) {
-        rc = TableReaderRefSeq_MakeTable(cself, vmgr, tbl, options, cache);
-        VTableRelease(tbl);
-    }
-    if( rc == 0 ) {
-        /* ALIGN_DBG("table %s opened 0x%p", path, *cself); */
-    } else {
-        ALIGN_DBGERRP("table for %s", rc, path);
-    }
-    return rc;
-}
-
-LIB_EXPORT void CC TableReaderRefSeq_Whack(const TableReaderRefSeq* cself)
-{
-    if( cself != NULL ) {
-        /* ALIGN_DBG("table 0x%p closed", cself); */
-        TableReader_Whack(cself->base);
-        free((TableReaderRefSeq*)cself);
-    }
-}
-
-LIB_EXPORT rc_t CC TableReaderRefSeq_SeqId(const TableReaderRefSeq* cself, const char** id, uint32_t* id_sz)
-{
-    rc_t rc = 0;
-    if( cself == NULL || id == NULL || id_sz == NULL ) {
-        rc = RC(rcAlign, rcType, rcReading, rcParam, rcNull);
-    } else {
-        *id = cself->seq_id;
-        *id_sz = string_size(cself->seq_id);
-    }
-    ALIGN_DBGERR(rc);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableReaderRefSeq_SeqLength(const TableReaderRefSeq* cself, INSDC_coord_len* len)
-{
-    rc_t rc = 0;
-    if( cself == NULL || len == NULL ) {
-        rc = RC(rcAlign, rcType, rcReading, rcParam, rcNull);
-    } else {
-        *len = cself->total_seq_len;
-    }
-    ALIGN_DBGERR(rc);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableReaderRefSeq_Circular(const TableReaderRefSeq* cself, bool* circular)
-{
-    rc_t rc = 0;
-    if( cself == NULL || circular == NULL ) {
-        rc = RC(rcAlign, rcType, rcReading, rcParam, rcNull);
-    } else {
-        *circular = cself->circular;
-    }
-    ALIGN_DBGERR(rc);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableReaderRefSeq_MD5(const TableReaderRefSeq* cself, const uint8_t** md5)
-{
-    rc_t rc = 0;
-    if( cself == NULL || md5 == NULL ) {
-        rc = RC(rcAlign, rcType, rcReading, rcParam, rcNull);
-    } else {
-        *md5 = cself->has_md5 ? cself->md5 : NULL;
-    }
-    ALIGN_DBGERR(rc);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableReaderRefSeq_Read(const TableReaderRefSeq* cself, INSDC_coord_zero offset, INSDC_coord_len len,
-                                          uint8_t* buffer, INSDC_coord_len* written)
-{
-    rc_t rc = 0;
-
-    if ( cself == NULL || buffer == NULL || written == NULL )
-	{
-        rc = RC( rcAlign, rcType, rcReading, rcParam, rcNull );
-    }
-	else if( len == 0 )
-	{
-        *written = 0;
-    }
-	else
-	{
-		rc = ReferenceSeq_ReOffset( cself->circular, cself->total_seq_len, &offset );
-		if ( rc == 0 )
-		{
-			INSDC_coord_len q = 0;
-			*written = 0;
-			do
-			{
-				int64_t rowid = offset / cself->max_seq_len + 1;
-				INSDC_coord_zero s = offset % cself->max_seq_len;
-				
-				rc = TableReader_ReadRow( cself->base, rowid );
-				if ( rc == 0 && ( cself->read->len == 0 || cself->read->base.str == NULL ) )
-				{
-					/* TableReader_ReadRow() can return rc == 0 for an optional column!
-					   in these cases len/base.str are zero/NULL */
-					rc = RC( rcAlign, rcType, rcReading, rcItem, rcNull );			
-				}
-				
-				if ( rc == 0 )
-				{
-					q = cself->seq_len->base.coord_len[0] - s;
-					if ( q > len )
-					{
-						q = len;
-					}
-					memcpy( &buffer[*written], cself->read->base.str + s, q );
-					*written += q;
-					offset += q;
-					len -= q;
-				}
-				
-				/* SEQ_LEN < MAX_SEQ_LEN is last row unless it is CIRCULAR */
-				if ( rc == 0 && ( cself->seq_len->base.coord_len[ 0 ] < cself->max_seq_len ) )
-				{
-					if ( !cself->circular )
-					{
-						break;
-					}
-					offset = 0;
-				}
-			} while( rc == 0 && q > 0 && len > 0 );
-		}
-	}
-    ALIGN_DBGERR( rc );
-    return rc;
-}
diff --git a/libs/align/reader-wgs.c b/libs/align/reader-wgs.c
deleted file mode 100644
index 8e89c6e..0000000
--- a/libs/align/reader-wgs.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was readten as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <align/extern.h>
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <insdc/insdc.h>
-#include <vdb/manager.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include "reader-cmn.h"
-#include "reference-cmn.h"
-#include "reader-wgs.h"
-#include "debug.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <ctype.h>
-#include <assert.h>
-
-static const TableReaderColumn TableReaderWGS_cols[] =
-{
-    /* order important, see code below! */
-    {0, "(INSDC:dna:text)READ", {NULL}, 0, 0},
-    {0, "(INSDC:4na:bin)READ", {NULL}, 0, ercol_Skip},
-    {0, NULL, {NULL}, 0, 0}
-};
-
-struct TableReaderWGS {
-    TableReader const *base;
-    TableReaderColumn cols[sizeof(TableReaderWGS_cols)/sizeof(TableReaderWGS_cols[0])];
-    TableReaderColumn const *read;
-};
-
-rc_t TableReaderWGS_MakeTable(TableReaderWGS const **const pself,
-                              VDBManager const *vmgr,
-                              VTable const *const table,
-                              uint32_t const options,
-                              size_t const cache)
-{
-    assert(pself != NULL);
-    assert(table != NULL);
-    {
-        TableReaderWGS *const self = calloc(1, sizeof(*self));
-    
-        memcpy(self->cols, TableReaderWGS_cols, sizeof(TableReaderWGS_cols));
-        self->read = &self->cols[0];
-    
-        if (options != 0) {
-            self->cols[0].flags |=  ercol_Skip;
-            self->cols[1].flags &= ~ercol_Skip;
-            self->read = &self->cols[1];
-        }
-        {
-            rc_t const rc = TableReader_Make(&self->base, table, self->cols, cache);
-            if (rc == 0) {
-                *pself = self;
-                return 0;
-            }
-            free(self);
-
-            return rc;
-        }
-    }
-}
-
-void TableReaderWGS_Whack(TableReaderWGS const *const self)
-{
-    if (self) {
-        TableReader_Whack(self->base);
-        free((TableReaderWGS *)self);
-    }
-}
-
-rc_t TableReaderWGS_SeqLength(TableReaderWGS const *const self, int64_t row, INSDC_coord_len *const result)
-{
-    assert(self != NULL);
-    assert(result != NULL);
-    {
-        rc_t const rc = TableReader_ReadRow(self->base, row);
-        if (rc == 0)
-            *result = self->read->len;
-
-        ALIGN_DBGERR(rc);
-        return rc;
-    }
-}
-
-rc_t TableReaderWGS_Circular(TableReaderWGS const *const self, int64_t row, bool *const result)
-{
-    assert(self != NULL);
-    assert(result != NULL);
-    
-    *result = false;
-
-    return 0;
-}
-
-rc_t TableReaderWGS_MD5(TableReaderWGS const *const self, int64_t row, uint8_t const **const result)
-{
-    assert(self != NULL);
-    assert(result != NULL);
-    
-    *result = NULL;
-    
-    return 0;
-}
-
-rc_t TableReaderWGS_Read(TableReaderWGS const *const self, int64_t const row,
-                         INSDC_coord_zero const offset,
-                         INSDC_coord_len const len,
-                         uint8_t *const buffer,
-                         INSDC_coord_len *const written)
-{
-    assert(self != NULL);
-    assert(buffer != NULL);
-    assert(written != NULL);
-    
-    *written = 0;
-    if (len == 0)
-        return 0;
-    {
-        rc_t const rc = TableReader_ReadRow(self->base, row);
-        if (rc == 0) {
-            INSDC_coord_len const max = self->read->len;
-
-            if (offset >= max)
-                return 0;
-            {
-                uint8_t const *const src = self->read->base.u8 + offset;
-                INSDC_coord_len const end = offset + len;
-                INSDC_coord_len const N = end < max ? (end - offset) : (max - offset);
-        
-                *written = N;
-                memcpy(buffer, src, N);
-            }
-        }
-        ALIGN_DBGERR(rc);
-        return rc;
-    }
-}
diff --git a/libs/align/reader-wgs.h b/libs/align/reader-wgs.h
deleted file mode 100644
index 93d7c83..0000000
--- a/libs/align/reader-wgs.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was readten as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct VDBManager;
-struct VTable;
-
-typedef struct TableReaderWGS TableReaderWGS;
-
-rc_t TableReaderWGS_MakeTable(const TableReaderWGS ** cself,
-                              const struct VDBManager* vmgr,
-                              const struct VTable* table,
-                              uint32_t options, size_t cache);
-
-void TableReaderWGS_Whack(const TableReaderWGS* cself);
-
-rc_t TableReaderWGS_SeqLength(const TableReaderWGS* cself, int64_t row, INSDC_coord_len* len);
-
-rc_t TableReaderWGS_Circular(const TableReaderWGS* cself, int64_t row, bool* circular);
-
-/* *md5 is NULL if not present */
-rc_t CC TableReaderWGS_MD5(const TableReaderWGS* cself, int64_t row, const uint8_t** md5);
-
-/* read a chunk of refseq into buffer from offset up to offset + len
-   if offset is beyond non-circular refseq size error is returned
- */
-rc_t CC TableReaderWGS_Read(const TableReaderWGS* cself, int64_t row,
-                            INSDC_coord_zero offset, INSDC_coord_len len,
-                            uint8_t* buffer, INSDC_coord_len* written);
-#ifdef __cplusplus
-}
-#endif
diff --git a/libs/align/ref_iterator.c b/libs/align/ref_iterator.c
deleted file mode 100644
index 65e8f9a..0000000
--- a/libs/align/ref_iterator.c
+++ /dev/null
@@ -1,863 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <align/extern.h>
-
-#include <klib/rc.h>
-#include <klib/container.h>
-#include <klib/refcount.h>
-#include <klib/sort.h>
-#include <klib/text.h>
-#include <klib/out.h>
-#include <insdc/insdc.h>
-#include <align/reference.h>
-#include <align/iterator.h>
-#include <align/manager.h>
-#include <sysalloc.h>
-
-#include "debug.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-#define COL_READ "(INSDC:4na:bin)READ"
-#define COL_HAS_MISMATCH "(bool)HAS_MISMATCH"
-#define COL_HAS_REF_OFFSET "(bool)HAS_REF_OFFSET"
-#define COL_REF_OFFSET "(I32)REF_OFFSET"
-#define COL_READ_GROUP "(ascii)SEQ_SPOT_GROUP"
-
-
-typedef struct spot_group
-{
-    DLNode n;                       /* to have it in a DLList */
-    char * name;                    /* the name of the read-group, can be NULL */
-    size_t len;                     /* the length of the name */
-    DLList records;                 /* has list of PlacementRecords... */
-} spot_group;
-
-
-static rc_t make_spot_group( spot_group ** sg, DLList * list, const char * name, size_t len )
-{
-    rc_t rc = 0;
-    *sg = calloc( 1, sizeof ** sg );
-    if ( *sg == NULL )
-        rc = RC( rcAlign, rcIterator, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        if ( len > 0 && name != NULL )
-        {
-            (*sg)->name = string_dup( name, len );
-            if ( (*sg)->name != NULL )
-            {
-                (*sg)->len = len;
-            }
-        }
-        /* if name is NULL, the spot-group is initialized with 0 via calloc() */
-        DLListInit( &( (*sg)->records ) );
-        DLListPushTail ( list, ( DLNode * )(*sg) );
-    }
-    return rc;
-}
-
-
-static void CC whack_the_placement_record( DLNode *n, void *data )
-{    PlacementRecordWhack ( ( PlacementRecord * )n );   }
-
-static void free_spot_group( spot_group *sg )
-{
-    if ( sg->name != NULL ) free( sg->name );
-    DLListWhack ( &sg->records, whack_the_placement_record, NULL );
-    free( sg );
-}
-
-
-static void CC whack_the_spot_group( DLNode *n, void *data )
-{    free_spot_group ( ( spot_group * )n );   }
-
-static void clear_spot_group_list( DLList * list )
-{
-    DLListWhack ( list, whack_the_spot_group, NULL );
-}
-
-
-typedef struct find_spot_group_cb_ctx
-{
-    const char * name;
-    size_t len;
-    spot_group *res;
-} find_spot_group_cb_ctx;
-
-
-static bool CC find_spot_group_callback( DLNode *n, void *data )
-{
-    find_spot_group_cb_ctx *ctx = ( find_spot_group_cb_ctx * )data;
-    spot_group * sg = ( spot_group * ) n;
-    bool res = false;
-
-    if ( ctx->name == NULL || sg->name == NULL )
-    {
-        res = true;
-    }
-    else
-    {
-        res = ( string_cmp ( sg->name, sg->len, 
-                             ctx->name, ctx->len, 
-                             ( sg->len < ctx->len ) ? ctx->len : sg->len ) == 0 );
-    }
-
-    if ( res )
-    {
-        ctx->res = sg;
-    }
-    return res;
-}
-
-static spot_group * find_spot_group( DLList * list, const char * name, size_t len )
-{
-    find_spot_group_cb_ctx ctx;
-    ctx.res = NULL;
-    ctx.name = name;
-    ctx.len = len;
-    DLListDoUntil ( list, false, find_spot_group_callback, &ctx );
-    return ctx.res;
-}
-
-static rc_t add_to_spot_groups( DLList * list, const PlacementRecord *rec )
-{
-    rc_t rc = 0;
-    spot_group * sg = find_spot_group( list, rec->spot_group, rec->spot_group_len );
-    if ( sg == NULL )
-    {
-        rc = make_spot_group( &sg, list, rec->spot_group, rec->spot_group_len );
-    }
-    if ( rc == 0 )
-    {
-        DLListPushTail ( &sg->records, ( DLNode * )(rec) );
-    }
-    return rc;
-}
-
-
-static uint32_t remove_invalid_records( const struct ReferenceObj * const refobj,
-                                        DLList * list, INSDC_coord_zero pos )
-{
-    uint32_t res = 0;
-    spot_group * sg = ( spot_group * )DLListHead( list );
-    while ( sg != NULL )
-    {
-        spot_group *nxt = ( spot_group * )DLNodeNext( ( DLNode * )sg );
-        PlacementRecord *rec = ( PlacementRecord * )DLListHead( &sg->records );
-        while ( rec != NULL )
-        {
-            PlacementRecord *nxt_rec = ( PlacementRecord * )DLNodeNext( ( DLNode * )rec );
-            INSDC_coord_zero end_pos = ( rec->pos + rec->len );
-            bool remove = ( end_pos <= pos );
-            if ( !remove )
-            {
-                AlignmentIterator * al_iter = PlacementRecordCast ( rec, placementRecordExtension0 );
-                int32_t state = AlignmentIteratorState ( al_iter, NULL );
-                remove = ( ( state & align_iter_invalid ) == align_iter_invalid );
-            }
-            if ( remove )
-            {
-                DLListUnlink ( &sg->records, ( DLNode * )rec );
-                PlacementRecordWhack ( rec );
-            }
-            else
-            {
-                res++;
-            }
-            rec = nxt_rec;
-        }
-        sg = nxt;
-    }
-    return res;
-}
-
-
-static void inc_alignment_iterators( DLList * list, INSDC_coord_zero pos )
-{
-    spot_group * sg = ( spot_group * )DLListHead( list );
-    while ( sg != NULL )
-    {
-        spot_group *nxt = ( spot_group * )DLNodeNext( ( DLNode * )sg );
-        PlacementRecord *rec = ( PlacementRecord * )DLListHead( &sg->records );
-        while ( rec != NULL )
-        {
-            PlacementRecord *nxt_rec = ( PlacementRecord * )DLNodeNext( ( DLNode * )rec );
-            AlignmentIterator * al_iter = PlacementRecordCast ( rec, placementRecordExtension0 );
-            if ( rec->pos <= pos && al_iter != NULL )
-            {
-                AlignmentIteratorNext ( al_iter );
-            }
-            rec = nxt_rec;
-        }
-        sg = nxt;
-    }
-}
-
-/* ======================================================================================== */
-
-
-struct ReferenceIterator
-{
-    KRefcount refcount;
-    struct AlignMgr const *amgr;
-
-    DLList spot_groups;                     /* has a list of spot-groups... */
-
-    int32_t min_mapq;                       /* has a minimum mapq-value... */
-    PlacementRecordExtendFuncs ext_func;    /* has a struct with record-extension-functions from client*/
-    PlacementRecordExtendFuncs int_func;    /* has a struct with record-extension-functions for itself*/
-
-    uint32_t depth;                         /* how many records are in the list */
-    INSDC_coord_zero current_pos;           /* what is the current ref-position on the current ref. */
-    INSDC_coord_zero last_pos;              /* what is the current ref-position on the current ref. */
-    INSDC_coord_zero nxt_avail_pos;         /* what is the next available ref-position on the current ref. */
-    spot_group *current_spot_group;         /* what is the next spot-group to be handled */
-    PlacementRecord *current_rec;           /* the current-record at the current position */
-    bool need_init;                         /* do we need to init for the first next()-call */
-    PlacementSetIterator * pl_set_iter;     /* holds a list of placement-iterators */
-    struct ReferenceObj const * refobj;     /* cached result of ReferenceIteratorNextReference(...) */
-};
-
-
-LIB_EXPORT void CC RefIterRecordDestroy ( void *obj, void *data )
-{
-    /* nothing to do, because there are no sub-allocations etc. ... */
-}
-
-
-LIB_EXPORT rc_t CC RefIterRecordSize ( struct VCursor const *curs,
-    int64_t row_id, size_t * size, void *data, void * placement_ctx )
-{
-    /* discover the size of the ref-iter-part to be allocated... */
-    return AlignIteratorRecordSize ( curs, row_id, size, data );
-}
-
-
-LIB_EXPORT rc_t CC RefIterRecordPopulate ( void *obj,
-    const PlacementRecord *placement, struct VCursor const *curs,
-    INSDC_coord_zero ref_window_start, INSDC_coord_len ref_window_len, void *data, void * placement_ctx )
-{
-    return AlignIteratorRecordPopulate ( obj, placement, curs, ref_window_start, ref_window_len, data );
-}
-
-
-static void CC RefIterDestroyRecPart( void *obj, void *data )
-{
-    AlignmentIterator *iter = ( AlignmentIterator * )obj;
-    if ( iter != NULL )
-        AlignmentIteratorRelease( iter );
-}
-
-LIB_EXPORT rc_t CC AlignMgrMakeReferenceIterator ( struct AlignMgr const *self,
-    ReferenceIterator **iter, const PlacementRecordExtendFuncs *ext_1, int32_t min_mapq )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcAlign, rcIterator, rcConstructing, rcSelf, rcNull );
-    else
-    {
-        if ( iter == NULL  )
-            rc = RC( rcAlign, rcIterator, rcConstructing, rcParam, rcNull );
-        else
-        {
-            ReferenceIterator * refi = calloc( sizeof * refi, 1 );
-            if ( refi == NULL )
-                rc = RC( rcAlign, rcIterator, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                KRefcountInit( &refi->refcount, 1, "ReferenceIterator", "Make", "align" );
-                refi->min_mapq = min_mapq;
-                if ( ext_1 != NULL )
-                {
-                    refi->ext_func.data = ext_1->data;
-                    refi->ext_func.destroy = ext_1->destroy;
-                    refi->ext_func.populate = ext_1->populate;
-                    refi->ext_func.alloc_size = ext_1->alloc_size;
-                    refi->ext_func.fixed_size = ext_1->fixed_size;
-                }
-
-                refi->int_func.data = ( void * )self;
-                refi->int_func.destroy = RefIterDestroyRecPart;
-                refi->int_func.populate = RefIterRecordPopulate;
-                refi->int_func.alloc_size = RefIterRecordSize; 
-
-                DLListInit( &(refi->spot_groups) );
-                rc = AlignMgrMakePlacementSetIterator ( self, &refi->pl_set_iter );
-                refi->need_init = true;
-            }
-
-            if ( rc == 0 )
-                rc = AlignMgrAddRef ( self );
-
-            if ( rc == 0 )
-            {
-                refi->amgr = self;
-                *iter = refi;
-            }
-            else
-                free( refi );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceIteratorAddRef ( const ReferenceIterator *self )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcAlign, rcIterator, rcAttaching, rcSelf, rcNull );
-    else
-    {
-        if ( KRefcountAdd( &self->refcount, "ReferenceIterator" ) != krefOkay )
-        {
-            rc = RC( rcAlign, rcIterator, rcAttaching, rcError, rcUnexpected );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceIteratorRelease ( const ReferenceIterator *cself )
-{
-    rc_t rc = 0;
-    if ( cself == NULL )
-        rc = RC( rcAlign, rcIterator, rcReleasing, rcSelf, rcNull );
-    else
-    {
-        if ( KRefcountDrop( &cself->refcount, "ReferenceIterator" ) == krefWhack )
-        {
-            ReferenceIterator * self = ( ReferenceIterator * ) cself;
-            /* we 'own' the records! - we have to destroy them, if some are left in here */
-            clear_spot_group_list( &self->spot_groups );
-            rc = PlacementSetIteratorRelease ( self->pl_set_iter );
-            AlignMgrRelease ( self->amgr );
-            free( self );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceIteratorAddPlacementIterator( ReferenceIterator *self,
-    PlacementIterator *pi )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcAlign, rcIterator, rcConstructing, rcSelf, rcNull );
-    else
-    {
-        if ( pi == NULL )
-            rc = RC( rcAlign, rcIterator, rcConstructing, rcParam, rcNull );
-        else
-        {
-            rc = PlacementSetIteratorAddPlacementIterator ( self->pl_set_iter, pi );
-        }
-    }
-    return rc;
-}
-
-
-#define ALIGN_COL_COUNT 4
-
-static const char * align_cols[ ALIGN_COL_COUNT ] = 
-{ COL_REF_OFFSET, COL_HAS_REF_OFFSET, COL_HAS_MISMATCH, COL_READ };
-
-
-static rc_t prepare_align_cursor( struct VCursor const *align )
-{
-    rc_t rc = 0;
-    uint32_t i, throw_away_idx;
-
-    for ( i = 0; i < ALIGN_COL_COUNT && rc == 0; ++i ) {
-        rc =VCursorAddColumn ( align, &throw_away_idx, "%s", align_cols[ i ] );
-        if( GetRCState(rc) == rcExists ) {
-            rc = 0;
-        }
-    }
-        
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceIteratorAddPlacements( ReferenceIterator *self,
-     struct ReferenceObj const *ref_obj, INSDC_coord_zero ref_pos, INSDC_coord_len ref_len,
-     struct VCursor const *ref, struct VCursor const *align, align_id_src ids,
-     const char * spot_group, void * placement_ctx )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcAlign, rcIterator, rcConstructing, rcSelf, rcNull );
-    else
-    {
-        if ( ref_obj == NULL )
-            rc = RC( rcAlign, rcIterator, rcConstructing, rcParam, rcNull );
-        else
-        {
-            if ( align != NULL )
-                rc = prepare_align_cursor( align );
-
-            if ( rc == 0 )
-            {
-                PlacementIterator *pi;
-
-                rc = ReferenceObj_MakePlacementIterator ( ref_obj, &pi, ref_pos, ref_len, self->min_mapq,
-                        ref, align, ids, &self->int_func, &self->ext_func, spot_group, placement_ctx );
-                if ( rc == 0 )
-                {
-                    rc = PlacementSetIteratorAddPlacementIterator ( self->pl_set_iter, pi );
-                    if ( GetRCState( rc ) == rcDone ) { rc = 0; }
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-
-static rc_t fill_recordlist( ReferenceIterator *self, INSDC_coord_zero pos )
-{
-    rc_t rc;
-    do
-    {
-        const PlacementRecord *rec;
-        /* from the placement-set-iterator into our list... */
-        rc = PlacementSetIteratorNextRecordAt ( self->pl_set_iter, pos, &rec );
-        if ( rc == 0 )
-        {
-            if ( rec->pos == pos )
-            {
-                self->depth++;
-                rc = add_to_spot_groups( &self->spot_groups, rec );
-            }
-            else
-                PlacementRecordWhack ( rec );
-        }
-    } while( rc == 0 );
-
-    if ( GetRCState( rc ) == rcDone ) { rc = 0; }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceIteratorNextReference ( ReferenceIterator *self,
-    INSDC_coord_zero *first_pos, INSDC_coord_len *len, struct ReferenceObj const ** refobj )
-{
-    rc_t rc = 0;
-
-    if ( refobj != NULL )
-        *refobj = NULL;
-
-    if ( self == NULL )
-        rc = RC( rcAlign, rcIterator, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        struct ReferenceObj const * robj;
-        rc = PlacementSetIteratorNextReference ( self->pl_set_iter, first_pos, len, &robj );
-        clear_spot_group_list( &self->spot_groups );
-        if ( rc == 0 )
-        {
-            /* cache the returned refobj in order to get to reference-bases later... */
-            self->refobj = robj;
-            self->need_init = true;
-        }
-        else
-        {
-            self->refobj = NULL;
-        }
-
-        if ( refobj != NULL )
-        {
-            *refobj = self->refobj;
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceIteratorNextWindow ( ReferenceIterator *self,
-    INSDC_coord_zero *first_pos, INSDC_coord_len *len )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcAlign, rcIterator, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        rc = PlacementSetIteratorNextWindow ( self->pl_set_iter, first_pos, len );
-        clear_spot_group_list( &self->spot_groups );
-        if ( rc == 0 )
-        {
-            self->need_init = true;
-            self->current_pos = *first_pos;
-            self->current_spot_group = NULL;
-            self->last_pos = self->current_pos + *len - 1;
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceIteratorNextSpotGroup ( ReferenceIterator *self,
-    const char ** name, size_t * len )
-{
-    rc_t rc = 0;
-
-    if ( self->current_spot_group == NULL )
-    {
-        self->current_spot_group = ( spot_group * )DLListHead( &self->spot_groups );
-        if ( self->current_spot_group == NULL )
-        {
-            rc = SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone );
-        }
-    }
-    else
-    {
-        spot_group *nxt  = ( spot_group * )DLNodeNext( ( DLNode * ) self->current_spot_group );
-        if ( nxt == NULL )
-        {
-            rc = SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone );
-        }
-        else
-        {
-            self->current_spot_group = nxt;
-        }
-    }
-    self->current_rec = NULL;
-
-    if ( rc == 0 && self->current_spot_group != NULL )
-    {
-        if ( name != NULL )
-        {
-            *name = self->current_spot_group->name;
-        }
-        if ( len != NULL )
-        {
-            *len = self->current_spot_group->len;
-        }
-    }
-    return rc;
-}
-
-
-/* iterates the PlacementSetIterator forward to reach self->current_pos on the reference */
-static rc_t first_ref_iter_nxt_pos( ReferenceIterator *self, bool skip_empty )
-{
-    rc_t rc;
-    bool loop;
-    self->need_init = false;
-    do
-    {
-        rc = PlacementSetIteratorNextAvailPos ( self->pl_set_iter, &self->nxt_avail_pos, NULL );
-        loop = ( rc == 0 );
-        if ( loop )
-        {
-            loop = ( self->nxt_avail_pos <= self->current_pos );
-            if ( loop )
-            {
-                rc = fill_recordlist( self, self->nxt_avail_pos );
-                self->depth = remove_invalid_records( self->refobj, &self->spot_groups, self->nxt_avail_pos - 1 );
-            }
-        }
-    } while ( loop );
-
-    if ( skip_empty && self->nxt_avail_pos > self->current_pos && self->depth == 0 )
-    {
-        self->current_pos = self->nxt_avail_pos;
-    }
-    self->depth = remove_invalid_records( self->refobj, &self->spot_groups, self->current_pos );
-
-    if ( GetRCState( rc ) == rcDone ) rc = 0;
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceIteratorNextPos ( ReferenceIterator *self, bool skip_empty )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcAlign, rcIterator, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        self->current_rec = NULL;
-        if ( self->need_init )
-        {
-            rc = first_ref_iter_nxt_pos( self, skip_empty );
-        }
-        else
-        {
-            /* increment the current position */
-            self->current_pos++;
-
-            if ( self->current_pos <= self->last_pos )
-            {
-                /* jump over gaps, if requested ... */
-                if ( self->depth == 0 && skip_empty )
-                {
-                    self->current_pos = self->nxt_avail_pos;
-                }
-
-                /* increment the internal alignment-iterator of every placement-record */
-                inc_alignment_iterators( &self->spot_groups, self->current_pos );
-
-                /* loop through the list to look if we have to remove records,
-                   that do end before this new position */
-                self->depth = remove_invalid_records( self->refobj, &self->spot_groups, self->current_pos );
-
-                rc = fill_recordlist( self, self->current_pos );
-                if ( rc == 0 )
-                {
-                    self->current_spot_group = NULL;
-                    /* set our sights to the next position... */
-                    rc = PlacementSetIteratorNextAvailPos ( self->pl_set_iter, &self->nxt_avail_pos, NULL );
-                    if ( GetRCState( rc ) == rcDone )
-                    {
-                        if ( self->depth > 0 )
-                        {
-                            rc = 0;
-                        }
-                        else if ( !skip_empty )
-                        {
-                            if ( self->current_pos <= self->last_pos ) rc = 0;
-                        }
-                    }
-                }
-            }
-            else
-            {
-                rc = SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone );
-                clear_spot_group_list( &self->spot_groups );
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceIteratorPosition ( const ReferenceIterator *self,
-    INSDC_coord_zero *pos, uint32_t * depth, INSDC_4na_bin * base )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcAlign, rcIterator, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        /* return position, many records our record-list, and the base at this position */
-        if ( pos != NULL )
-        {
-            *pos = self->current_pos;
-        }
-
-        if ( depth != NULL )
-        {
-            *depth = self->depth;
-        }
-
-        if ( base != NULL )
-        {
-            uint32_t written;
-            *base = 0;
-            /* problem! how to get the base if depth == 0 */
-            if ( self->current_rec != NULL )
-            {
-                rc = ReferenceObj_Read( self->current_rec->ref, self->current_pos, 1, base, &written );
-            }
-            else if ( self->refobj != NULL )
-            {
-                rc = ReferenceObj_Read( self->refobj, self->current_pos, 1, base, &written );
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceIteratorNextPlacement ( ReferenceIterator *self,
-    const PlacementRecord **rec )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-    {
-        rc = RC( rcAlign, rcIterator, rcAccessing, rcSelf, rcNull );
-    }
-    else if ( rec == NULL )
-    {
-        rc = RC( rcAlign, rcIterator, rcAccessing, rcParam, rcNull );
-    }
-    else
-    {
-        if ( self->current_spot_group == NULL )
-        {
-            rc = SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone );
-        }
-        else
-        {
-            if ( self->current_rec == NULL )
-            {
-                self->current_rec = ( PlacementRecord * )DLListHead( &self->current_spot_group->records );
-            }
-            else
-            {
-                self->current_rec = ( PlacementRecord * )DLNodeNext( ( DLNode * )self->current_rec );
-            }
-
-            if ( self->current_rec == NULL )
-            {
-                rc = SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone );
-            }
-            else
-            {
-                *rec = self->current_rec;
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceIteratorGetPlacement ( ReferenceIterator *self,
-    const PlacementRecord **rec )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-    {
-        rc = RC( rcAlign, rcIterator, rcAccessing, rcSelf, rcNull );
-    }
-    else if ( rec == NULL )
-    {
-        rc = RC( rcAlign, rcIterator, rcAccessing, rcParam, rcNull );
-    }
-    else
-    {
-        if ( self->current_spot_group == NULL )
-        {
-            rc = SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone );
-        }
-        else
-        {
-            if ( self->current_rec != NULL )
-            {
-                /* remove the 'previous' current-rec! */
-                DLListPopHead ( &self->current_spot_group->records );
-                PlacementRecordWhack ( self->current_rec );
-                self->depth--;
-                self->current_rec = NULL;
-            }
-
-            self->current_rec = ( PlacementRecord * )DLListHead( &self->current_spot_group->records );
-            if ( self->current_rec == NULL )
-            {
-                rc = SILENT_RC( rcAlign, rcIterator, rcAccessing, rcOffset, rcDone );
-            }
-            else
-            {
-                *rec = self->current_rec;
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT int32_t CC ReferenceIteratorState ( const ReferenceIterator *self,
-    INSDC_coord_zero *seq_pos )
-{
-    int32_t res = align_iter_invalid;
-    if ( seq_pos != NULL )
-    {
-        *seq_pos = 0;
-    }
-    if ( self != NULL )
-    {
-        /* PlacementRecordCast returns NULL if self->current_rec is NULL */
-        AlignmentIterator * al_iter = PlacementRecordCast ( self->current_rec, placementRecordExtension0 );
-        if ( al_iter != NULL )
-            res = AlignmentIteratorState ( al_iter, seq_pos );
-    }
-    return res;
-}
-
-
-LIB_EXPORT uint32_t CC ReferenceIteratorBasesInserted ( const ReferenceIterator *self,
-    const INSDC_4na_bin **bases )
-{
-    uint32_t res = align_iter_invalid;
-    if ( bases != NULL )
-    {
-        *bases = NULL;
-    }
-    if ( self != NULL )
-    {
-        /* PlacementRecordCast returns NULL if self->current_rec is NULL */
-        AlignmentIterator * al_iter = PlacementRecordCast ( self->current_rec, placementRecordExtension0 );
-        if ( al_iter != NULL )
-            res = AlignmentIteratorBasesInserted( al_iter, bases );
-    }
-    return res;
-}
-
-
-LIB_EXPORT uint32_t CC ReferenceIteratorBasesDeleted ( const ReferenceIterator *self,
-    INSDC_coord_zero *pos, const INSDC_4na_bin **bases )
-{
-    uint32_t res = align_iter_invalid;
-    if ( bases != NULL )
-    {
-        *bases = NULL;
-    }
-    if ( self != NULL )
-    {
-        /* PlacementRecordCast returns NULL if self->current_rec is NULL */
-        AlignmentIterator * al_iter = PlacementRecordCast ( self->current_rec, placementRecordExtension0 );
-        if ( al_iter != NULL )
-        {
-            INSDC_coord_zero temp_pos;
-            res = AlignmentIteratorBasesDeleted( al_iter, &temp_pos );
-            if ( ( res & align_iter_invalid ) != align_iter_invalid )
-            {
-                if ( pos != NULL ) { *pos = temp_pos; }
-                /* where to get the reference-bases from ? PlacementRecord.ref ! */
-                if ( res > 0 && bases != NULL )
-                {
-                    uint8_t * buffer = malloc( res );
-                    if ( buffer != NULL )
-                    {
-                        INSDC_coord_len written;
-                        rc_t rc = ReferenceObj_Read( self->current_rec->ref, temp_pos, res, buffer, &written );
-                        if ( rc == 0 )
-                        {
-                            *bases = buffer;
-                        }
-                    }
-                }
-            }
-        }
-    }
-    return res;
-}
diff --git a/libs/align/reference-cmn.c b/libs/align/reference-cmn.c
deleted file mode 100644
index 59e7c3d..0000000
--- a/libs/align/reference-cmn.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*==============================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*/
-#include <align/extern.h>
-
-#include <klib/rc.h>
-#include <insdc/insdc.h>
-
-#include "reference-cmn.h"
-#include <sysalloc.h>
-
-rc_t CC ReferenceSeq_ReOffset(bool circular, INSDC_coord_len seq_len, INSDC_coord_zero* offset)
-{
-    if( !circular && (*offset < 0 || *offset >= seq_len) ) {
-        return RC(rcAlign, rcType, rcReading, rcOffset, rcOutofrange);
-    } else if( *offset < 0 ) {
-        *offset = seq_len - ((-(*offset)) % seq_len);
-    } else if( circular && *offset > seq_len ) {
-        *offset %= seq_len;
-    }
-    return 0;
-}
diff --git a/libs/align/reference-cmn.h b/libs/align/reference-cmn.h
deleted file mode 100644
index 76fac49..0000000
--- a/libs/align/reference-cmn.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was readten as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#ifndef _h_align_reference_cmn_
-#define _h_align_reference_cmn_
-
-#include <klib/defs.h>
-
-/* Validates and adjusts offset for a RefSeq based on its attributes
- * circular [IN]
- * seq_len [IN]
- * offset [IN,OUT] always be >= 0 upon return
- */
-rc_t CC ReferenceSeq_ReOffset(bool circular, INSDC_coord_len seq_len, INSDC_coord_zero* offset);
-
-#endif /* _h_align_reference_cmn_ */
diff --git a/libs/align/reference.c b/libs/align/reference.c
deleted file mode 100644
index bc5ae34..0000000
--- a/libs/align/reference.c
+++ /dev/null
@@ -1,1943 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was readten as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <align/extern.h>
-
-#include <klib/rc.h>
-#include <klib/container.h>
-#include <klib/refcount.h>
-#include <klib/vector.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <insdc/insdc.h>
-#include <vdb/manager.h>
-#include <vdb/database.h>
-#include <vdb/cursor.h>
-#include <vdb/table.h>
-#include <vdb/vdb-priv.h>
-#include <align/iterator.h>
-#include <align/reference.h>
-#include <align/refseq-mgr.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include "reader-cmn.h"
-#include "reference-cmn.h"
-#include "debug.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <ctype.h>
-#include <assert.h>
-
-/* This is a temporary define, used to test code to deal with
-   circular references and new means of tracking window end */
-
-enum EReferenceList_ColNames
-{
-    ereflst_cn_READ_dna,
-    ereflst_cn_READ_4na,
-    ereflst_cn_SEQ_LEN,
-    ereflst_cn_PRIMARY_ALIGNMENT_IDS,
-    ereflst_cn_SECONDARY_ALIGNMENT_IDS,
-    ereflst_cn_EVIDENCE_INTERVAL_IDS,
-    ereflst_cn_OVERLAP_REF_POS,
-    ereflst_cn_OVERLAP_REF_LEN
-};
-
-const TableReaderColumn ReferenceList_cols[] =
-{
-    { 0, "(INSDC:dna:text)READ",    { NULL }, 0, 0 },
-    { 0, "(INSDC:4na:bin)READ",     { NULL }, 0, ercol_Skip },
-    { 0, "SEQ_LEN",                 { NULL }, 0, 0 },
-    { 0, "PRIMARY_ALIGNMENT_IDS",   { NULL }, 0, ercol_Skip },
-    { 0, "SECONDARY_ALIGNMENT_IDS", { NULL }, 0, ercol_Skip | ercol_Optional },
-    { 0, "EVIDENCE_INTERVAL_IDS",   { NULL }, 0, ercol_Skip | ercol_Optional },
-    { 0, "OVERLAP_REF_POS",         { NULL }, 0, ercol_Optional },
-    { 0, "OVERLAP_REF_LEN",         { NULL }, 0, ercol_Optional },
-    { 0, NULL,                      { NULL }, 0, 0 }
-};
-
-enum EPlacementIterator_ColNames
-{
-    eplacementiter_cn_REF_POS,
-    eplacementiter_cn_REF_LEN,
-    eplacementiter_cn_MAPQ,
-    eplacementiter_cn_READ_GROUP
-};
-
-const TableReaderColumn PlacementIterator_cols[] =
-{
-    { 0, "REF_POS",     { NULL }, 0, 0 },
-    { 0, "REF_LEN",     { NULL }, 0, 0 },
-    { 0, "MAPQ",        { NULL }, 0, 0 },
-    { 0, "SPOT_GROUP",  { NULL }, 0, 0 },
-    { 0, NULL,          { NULL }, 0, 0 }
-};
-
-struct ReferenceList
-{
-    KRefcount refcount;
-    const RefSeqMgr* refseqmgr;
-    const VCursor* cursor;
-    BSTree name_tree;
-    BSTree seqid_tree;
-    uint32_t options;
-    size_t cache;
-    uint32_t max_seq_len;
-    uint32_t nodes_qty;
-    uint32_t nodes_max_qty;
-    const TableReader* reader;
-    TableReaderColumn reader_cols[ sizeof( ReferenceList_cols ) / sizeof( ReferenceList_cols[ 0 ] ) ];
-    const TableReader* iter;
-    TableReaderColumn iter_cols[ sizeof( PlacementIterator_cols ) / sizeof( PlacementIterator_cols[ 0 ] ) ];
-    /* last are children using realloc!! */
-    ReferenceObj* nodes[ 2 ];
-};
-
-struct ReferenceObj
-{
-    /* we use this in 2 lists so we need to adjust results of Find, etc calls for name tree!! */
-    BSTNode by_seqid; /* primary key */
-    BSTNode by_name; /* struct addr will be by_name[-1]; */
-    ReferenceList* mgr;
-    uint32_t id;
-    uint32_t bin;
-    char* name;
-    char* seqid;
-    bool circular;
-    bool read_present;
-    int64_t start_rowid;
-    int64_t end_rowid;
-    INSDC_coord_len seq_len;
-};
-
-
-static int64_t CC ReferenceObj_CmpSeqId( const void *item, const BSTNode *n )
-{
-    return strcasecmp( ( const char* )item, ( ( const ReferenceObj* )n )->seqid );
-}
-
-
-static int64_t CC ReferenceObj_SortSeqId( const BSTNode *item, const BSTNode *n )
-{
-    return ReferenceObj_CmpSeqId( ( ( const ReferenceObj* )item )->seqid, n );
-}
-
-
-static int64_t CC ReferenceObj_CmpName( const void *item, const BSTNode *n )
-{
-    return strcasecmp( ( const char* )item, ( ( const ReferenceObj* )&n[ -1 ] )->name );
-}
-
-
-static int64_t CC ReferenceObj_SortName( const BSTNode *item, const BSTNode *n )
-{
-    return ReferenceObj_CmpName( ( ( const ReferenceObj* )&item[ -1 ] )->name, n );
-}
-
-static rc_t ReferenceObj_Alloc( ReferenceObj** self, const char* seqid, size_t seqid_sz,
-                                const char* name, size_t name_sz)
-{
-    rc_t rc = 0;
-    if ( self == NULL || seqid == NULL || seqid_sz == 0 || name == NULL || name_sz == 0 )
-    {
-        rc = RC( rcAlign, rcIndex, rcConstructing, rcParam, rcNull );
-    }
-    else
-    {
-        ReferenceObj* obj = calloc( 1,  sizeof( *obj ) + seqid_sz + 1 + name_sz + 1 );
-        if ( obj == NULL )
-        {
-            rc = RC( rcAlign, rcIndex, rcConstructing, rcMemory, rcExhausted );
-        }
-        else
-        {
-            obj->seqid = ( char* )&obj[ 1 ];
-            obj->name = obj->seqid;
-            obj->name += seqid_sz + 1;
-            memcpy( obj->seqid, seqid, seqid_sz );
-            obj->seqid[ seqid_sz ] = '\0';
-            memcpy( obj->name, name, name_sz );
-            obj->name[ name_sz ] = '\0';
-            *self = obj;
-        }
-    }
-    return rc;
-}
-
-
-/* helper function for ReferenceList_MakeCursor() */
-static rc_t ReferenceList_handle_filter( const KIndex* iname, const char * filt_name, uint32_t bin_size,
-                                         int64_t *start, int64_t tbl_start, uint64_t *count, int *bin_num,
-                                         TableReaderColumn *h, const TableReader* tmp )
-{
-    rc_t rc = 0;
-    if ( strncmp( filt_name, "START_ROW:", 10 ) )
-    {
-        if ( bin_size == 0 || strncmp( filt_name, "BIN_NUM:", 8 ) )
-        {
-            rc = KIndexFindText( iname, filt_name, start, count, NULL, NULL );
-            if( rc == 0 && bin_size > 0 )
-            {
-                /** change start to the beginning of the bin **/
-                *bin_num = ( *start - tbl_start ) / bin_size;
-            }
-        }
-        else
-        {
-            *bin_num = atoi( filt_name + 8 );
-        }
-        if ( bin_size > 0 )
-        {
-            *start = tbl_start + ( bin_size * (*bin_num) );
-            rc = TableReader_ReadRow( tmp, *start );
-            if ( rc == 0 )
-            {
-                int64_t r_start;
-                char name[ 4096 ];
-                if ( h[ 0 ].len < sizeof( name ) )
-                {
-                    memcpy( name, h[ 0 ].base.str, h[ 0 ].len );
-                    name[ h[ 0 ].len ] = '\0';
-                    rc = KIndexFindText( iname, name, &r_start, count, NULL, NULL );
-                    if ( rc == 0 && *start > r_start )
-                    { /*** move start to the beginning of the fully contained sequence **/
-                        *start = r_start + *count;
-                    }
-                }
-                else
-                {
-                    rc = RC( rcAlign, rcType, rcConstructing, rcName, rcTooLong );
-                }
-            }
-        }
-    }
-    else
-    {
-        int64_t req_start = atoi( filt_name + 10 );
-        if ( req_start >= *start && req_start < *start + *count )
-        {
-            int64_t delta = req_start - *start;
-            *start = req_start;
-            *count -= delta;
-        }
-        else
-        {
-            rc = RC( rcAlign, rcType, rcConstructing, rcId, rcOutofrange );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceList_MakeCursor( const ReferenceList** cself, const VCursor* cursor, uint32_t options,
-                                             const char* filt_name, const uint32_t numbins )
-{
-    rc_t rc = 0;
-    ReferenceList* self = NULL;
-
-    if ( cself == NULL || cursor == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcConstructing, rcParam, rcNull );
-    }
-    else if ( ( self = calloc( 1, sizeof( *self ) ) ) == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcConstructing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        const TableReader* tmp = NULL;
-        uint32_t bin_size;
-        int bin_num = -1;
-        TableReaderColumn h[] =
-        {
-            { 0, "NAME",        {NULL}, 0, 0 }, /*0*/
-            { 0, "SEQ_ID",      {NULL}, 0, 0 }, /*1*/
-            { 0, "SEQ_LEN",     {NULL}, 0, 0 }, /*2*/
-            { 0, "CIRCULAR",    {NULL}, 0, 0 }, /*3*/
-            { 0, "MAX_SEQ_LEN", {NULL}, 0, 0 }, /*4*/
-            { 0, "SEQ_START",   {NULL}, 0, 0 }, /*5*/
-            { 0, "CMP_READ",    {NULL}, 0, 0 }, /*6*/
-            { 0, NULL,          {NULL}, 0, 0 }
-        };
-        KRefcountInit( &self->refcount, 1, "ReferenceList", "Make", "align" );
-        BSTreeInit( &self->name_tree );
-        BSTreeInit( &self->seqid_tree );
-        self->options = options;
-        self->nodes_max_qty = sizeof( self->nodes ) / sizeof( self->nodes[ 0 ] );
-
-        rc = VCursorAddRef( self->cursor = cursor );
-        if ( rc == 0 )
-        {
-            rc = TableReader_MakeCursor( &tmp, cursor, h );
-            if ( rc == 0 )
-            {
-                int64_t start, tbl_start, tbl_stop;
-                uint64_t count;
-                const KIndex* iname = NULL;
-                bool only_one = false;
-
-                /* index is optional */
-                rc_t rctmp = TableReader_OpenIndex( tmp, "i_name", &iname );
-                ALIGN_DBGERRP( "index '%s' was not found", rctmp, "i_name" );
-
-                rc = TableReader_IdRange( tmp, &start, &count );
-                assert( rc == 0 );
-                tbl_start = start;
-                tbl_stop  = start + count -1;
-                if ( numbins > 0 )
-                {
-                    bin_size = ( count + numbins -1 ) / numbins;
-                }
-                else
-                {
-                    bin_size = 0;
-                }
-
-                if ( iname && filt_name )
-                {
-                    if ( bin_size == 0 )
-                    {
-                        only_one = true;
-                    }
-                    rc = ReferenceList_handle_filter( iname, filt_name, bin_size, &start, tbl_start,
-                                                      &count, &bin_num, h, tmp );
-                }
-
-                if ( rc == 0 )
-                {
-                    ReferenceObj* node = NULL;
-                    uint32_t last_name_len = 0;
-                    bool read_determination_done = false;
-
-                    while ( rc == 0  && start <= tbl_stop )
-                    {
-                        if ( bin_num < 0 && count == 0 )
-                        {
-                            /*** normal loop without binning ***/
-                            break;
-                        }
-                        rc = TableReader_ReadRow( tmp, start );
-                        if ( rc == 0 )
-                        {
-                            if ( node == NULL || last_name_len != h[0].len ||
-                                 strncmp( h[ 0 ].base.str, node->name, h[ 0 ].len) != 0 )
-                            {
-                                uint32_t cur_bin = ( bin_size > 0 ) ? ( start-tbl_start ) / bin_size : 0;
-                                if ( only_one && self->nodes_qty == 1 )
-                                {
-                                    break;
-                                }
-                                if ( bin_num >= 0 && cur_bin != bin_num )
-                                {
-                                    break;
-                                }
-                                if ( node == NULL && h[ 4 ].len > 0 )
-                                {
-                                    self->max_seq_len = h[ 4 ].base.u32[ 0 ];
-                                }
-                                if ( self->nodes_qty == self->nodes_max_qty )
-                                {
-                                    ReferenceList* tmp = realloc( self, sizeof( *self ) + sizeof( node ) * self->nodes_max_qty );
-                                    if ( tmp == NULL )
-                                    {
-                                        rc = RC(rcAlign, rcType, rcConstructing, rcMemory, rcExhausted);
-                                    }
-                                    else
-                                    {
-                                        self = tmp;
-                                        self->nodes_max_qty += sizeof( self->nodes ) / sizeof( self->nodes[ 0 ] );
-                                    }
-                                }
-                                if ( rc == 0 )
-                                {
-                                    rc = ReferenceObj_Alloc( &node, h[ 1 ].base.str, h[ 1 ].len, h[ 0 ].base.str, h[ 0 ].len );
-                                    if ( rc == 0 )
-                                    {
-                                        node->id = self->nodes_qty;
-                                        self->nodes[ self->nodes_qty++ ] = node;
-                                        last_name_len = h[ 0 ].len;
-                                        node->circular = h[ 3 ].len ? h[ 3 ].base.buul[ 0 ] : false;
-                                        node->start_rowid = start;
-                                        node->seq_len = 0;
-                                        node->bin = cur_bin;
-                                        read_determination_done = false;
-                                        rc = BSTreeInsertUnique( &self->seqid_tree, &node->by_seqid, NULL, ReferenceObj_SortSeqId );
-                                        if ( rc == 0 )
-                                        {
-                                            rc = BSTreeInsertUnique( &self->name_tree, &node->by_name, NULL, ReferenceObj_SortName );
-                                        }
-                                    }
-                                }
-                            }
-                            if ( rc == 0 )
-                            {
-                                INSDC_coord_len cur_seq_len = h[ 2 ].base.coord_len[ 0 ];
-                                if ( cur_seq_len == 0 )
-                                {
-                                    /* assign it to max-seq-len */
-                                    cur_seq_len = h[ 4 ].base.coord_len[ 0 ];
-                                }
-
-                                if ( h[ 6 ].len > 0 )
-                                {/** CMP_READ > 0 -- truly local ***/
-                                    node->read_present = true; 
-                                    read_determination_done = true;
-                                }
-                                else if ( h[ 5 ].base.coord1[ 0 ] != 0 )
-                                { /*** truly remote ***/
-                                    node->read_present = false;
-                                    read_determination_done = true;
-                                } /*** else still not sure **/
-
-                                if ( read_determination_done && iname != NULL )
-                                {
-                                    /* scroll to last row for this reference projecting the seq_len */
-                                    int64_t r_start;
-                                    uint64_t r_count;
-                                    if ( KIndexFindText( iname, node->name, &r_start, &r_count, NULL, NULL ) == 0 )
-                                    {
-                                        assert( node->start_rowid == r_start );
-                                        /* not last ref row */
-                                        if ( start != r_start + r_count - 1 )
-                                        {
-                                            /* we need to pickup last row SEQ_LEN for this reference
-                                            so we step back 2 rows in table from this ref end row
-                                            and also skip rows already scanned for read presence */
-                                            r_count -= ( start - r_start ) + 2;
-                                            node->seq_len += cur_seq_len * r_count;
-                                            start += r_count;
-                                            count -= r_count;
-                                        }
-                                    }
-                                }
-                                node->seq_len += cur_seq_len;
-                                node->end_rowid = start;
-                            }
-                        }
-                        else if ( GetRCState( rc ) == rcNotFound && GetRCObject( rc ) == rcRow )
-                        {
-                            rc = 0;
-                        }
-                        start++;
-                        count--;
-                    }
-                    for ( start = 0; rc == 0 && start < self->nodes_qty; start++ )
-                    {
-                        self->nodes[ start ]->mgr = self;
-                    }
-                    if ( rc == 0 && self->max_seq_len == 0 )
-                    {
-                        rc = RC(rcAlign, rcType, rcConstructing, rcData, rcCorrupt);
-                    }
-                }
-                KIndexRelease( iname );
-            }
-        }
-        TableReader_Whack( tmp );
-    }
-
-    if ( rc == 0 )
-    {
-        *cself = self;
-        /* ALIGN_DBG("created 0x%p with cursor 0x%p", self, cursor); */
-    }
-    else
-    {
-        *cself = NULL;
-        ReferenceList_Release( self );
-        /* ALIGN_DBGERRP( "failed for cursor 0x%p", rc, cursor ); */
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceList_MakeTable( const ReferenceList** cself, const VTable* table, uint32_t options,
-                                            size_t cache, const char* filt_name, const uint32_t numbins )
-{
-    rc_t rc = 0;
-    const VCursor* curs;
-
-    if ( table == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcConstructing, rcParam, rcNull );
-    }
-    else
-    {
-        rc = VTableCreateCachedCursorRead( table, &curs, cache );
-        if ( rc == 0 )
-        {
-            rc = VCursorPermitPostOpenAdd( curs );
-            if ( rc == 0 )
-            {
-                rc = ReferenceList_MakeCursor( cself, curs, options, filt_name, numbins );
-                if ( rc == 0 )
-                {
-                    ( (ReferenceList*)(*cself))->cache = cache;
-                }
-                VCursorRelease(curs);
-            }
-        }
-    }
-    ALIGN_DBGERRP( "failed for table 0x%p", rc, table );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceList_MakeDatabase( const ReferenceList** cself, const VDatabase* db, uint32_t options,
-                                               size_t cache, const char* name, const uint32_t numbins )
-{
-    rc_t rc = 0;
-    const VTable* tbl = NULL;
-    const char* nm = "REFERENCE";
-    /*const char* nm = (options & ereferencelist_useEvidence) ? "EVIDENCE_INTERVAL" : "REFERENCE";*/
-
-    if ( db == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcConstructing, rcParam, rcNull );
-    }
-    else
-    {
-        rc = VDatabaseOpenTableRead( db, &tbl, nm );
-        if ( rc == 0 )
-        {
-            rc = ReferenceList_MakeTable( cself, tbl, options, cache, name, numbins );
-            VTableRelease( tbl );
-        }
-    }
-    ALIGN_DBGERRP( "failed for database 0x%p", rc, db );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceList_MakePath( const ReferenceList** cself, const VDBManager* vmgr, const char* dbpath,
-                                           uint32_t options, size_t cache, const char* name, const uint32_t numbins )
-{
-    rc_t rc = 0;
-    const VDatabase* db = NULL;
-
-    if ( vmgr == NULL || dbpath == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcConstructing, rcParam, rcNull );
-    }
-    else
-    {
-        rc = VDBManagerOpenDBRead( vmgr, &db, NULL, "%s", dbpath );
-        if ( rc == 0 )
-        {
-            rc = ReferenceList_MakeDatabase( cself, db, options, cache, name, numbins );
-            VDatabaseRelease( db );
-        }
-    }
-    ALIGN_DBGERRP( "failed for database %s", rc, dbpath );
-    return rc;
-}
-
-
-static rc_t ReferenceList_OpenCursor( ReferenceList* self )
-{
-    rc_t rc = 0;
-
-    assert( self != NULL );
-
-    memcpy( self->reader_cols, ReferenceList_cols, sizeof( ReferenceList_cols ) );
-
-    if ( self->options & ereferencelist_4na )
-    {
-        self->reader_cols[ ereflst_cn_READ_dna ].flags |= ercol_Skip;
-        self->reader_cols[ ereflst_cn_READ_4na ].flags &= ~ercol_Skip;
-    }
-
-    if ( self->options & ereferencelist_usePrimaryIds )
-    {
-        self->reader_cols[ ereflst_cn_PRIMARY_ALIGNMENT_IDS ].flags &= ~ercol_Skip;
-    }
-
-    if ( self->options & ereferencelist_useSecondaryIds )
-    {
-        self->reader_cols[ ereflst_cn_SECONDARY_ALIGNMENT_IDS ].flags &= ~ercol_Skip;
-    }
-
-    if ( self->options & ereferencelist_useEvidenceIds )
-    {
-        self->reader_cols[ ereflst_cn_EVIDENCE_INTERVAL_IDS ].flags &= ~ercol_Skip;
-    }
-
-    if ( !( self->options &
-          ( ereferencelist_usePrimaryIds | ereferencelist_useSecondaryIds | ereferencelist_useEvidenceIds ) ) )
-    {
-        self->reader_cols[ ereflst_cn_OVERLAP_REF_POS ].flags |= ercol_Skip;
-        self->reader_cols[ ereflst_cn_OVERLAP_REF_LEN ].flags |= ercol_Skip;
-    }
-    rc = TableReader_MakeCursor( &self->reader, self->cursor, self->reader_cols );
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-static rc_t ReferenceList_OpenCursor2( ReferenceList* self, align_id_src ids )
-{
-    rc_t rc = 0;
-
-    assert( self != NULL );
-    if ( ids != primary_align_ids && ids != secondary_align_ids && ids != evidence_align_ids )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcOutofrange );
-    }
-    else if ( ids == primary_align_ids && !( self->options & ereferencelist_usePrimaryIds ) )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else if ( ids == secondary_align_ids && !( self->options & ereferencelist_useSecondaryIds ) )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else if ( ids == evidence_align_ids && !( self->options & ereferencelist_useEvidenceIds ) )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else
-    {
-        const VTable* vtbl = NULL;
-        rc = VCursorOpenParentRead( self->cursor, &vtbl );
-        if ( rc == 0 )
-        {
-            if ( rc == 0 )
-            {
-                const VDatabase* db = NULL;
-                rc = VTableOpenParentRead( vtbl, &db );
-                if ( rc == 0 )
-                {
-                    rc = VDatabaseOpenTableRead( db, &vtbl, ids == primary_align_ids ? "PRIMARY_ALIGNMENT" :
-                           ( ids == secondary_align_ids ? "SECONDARY_ALIGNMENT" : "EVIDENCE_INTERVAL" ) );
-                    if ( rc == 0 )
-                    {
-                        memcpy( self->iter_cols, PlacementIterator_cols, sizeof( PlacementIterator_cols ) );
-                        rc = TableReader_Make( &self->iter, vtbl, self->iter_cols, self->cache );
-                    }
-                    VDatabaseRelease( db );
-                }
-            }
-            VTableRelease( vtbl );
-        }
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-static rc_t ReferenceList_RefSeqMgr( const ReferenceList* cself, const RefSeqMgr** rmgr )
-{
-    rc_t rc = 0;
-
-    assert( rmgr != NULL );
-
-    if ( cself->refseqmgr == NULL )
-    {
-        const VTable* vtbl = NULL;
-        rc = VCursorOpenParentRead( cself->cursor, &vtbl );
-        if ( rc == 0 )
-        {
-            const VDBManager* vmgr;
-            rc = VTableOpenManagerRead( vtbl, &vmgr );
-            if ( rc == 0 )
-            {
-                rc = RefSeqMgr_Make( &( (ReferenceList*)cself )->refseqmgr, vmgr,
-                                     ( cself->options & ereferencelist_4na ) ? errefseq_4NA : 0, cself->cache, 2 );
-                VDBManagerRelease( vmgr );
-            }
-            VTableRelease( vtbl );
-        }
-    }
-    *rmgr = cself->refseqmgr;
-    ALIGN_DBGERR(rc);
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceList_AddRef( const ReferenceList *cself )
-{
-    rc_t rc = 0;
-    if ( cself != NULL )
-    {
-        if ( KRefcountAdd( &cself->refcount, "ReferenceList" ) != krefOkay )
-        {
-            rc = RC( rcAlign, rcType, rcAttaching, rcError, rcUnexpected );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT void CC ReferenceList_Release( const ReferenceList* cself )
-{
-    if ( cself != NULL )
-    {
-        if ( KRefcountDrop(&cself->refcount, "ReferenceList") == krefWhack )
-        {
-            ReferenceList* self = ( ReferenceList* )cself;
-            TableReader_Whack( self->reader );
-            TableReader_Whack( cself->iter );
-            RefSeqMgr_Release( self->refseqmgr );
-            while( self->nodes_qty-- > 0 )
-            {
-                free( self->nodes[ self->nodes_qty ] );
-            }
-            VCursorRelease( cself->cursor );
-            KRefcountWhack( &self->refcount, "ReferenceList" );
-            free( self );
-        }
-    }
-}
-
-
-LIB_EXPORT rc_t CC ReferenceList_Count(const ReferenceList* cself, uint32_t* count)
-{
-    rc_t rc = 0;
-    if ( cself == NULL || count == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcNull );
-    }
-    else
-    {
-        *count = cself->nodes_qty;
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceList_Find( const ReferenceList* cself, const ReferenceObj** obj,
-                                       const char* key, size_t key_sz )
-{
-    rc_t rc = 0;
-    char buf[4096], *b = buf;
-
-    if ( cself == NULL || obj == NULL || key == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcSearching, rcParam, rcNull );
-    }
-    else if ( key_sz >= sizeof( buf ) && ( b = malloc( key_sz + 1 ) ) == NULL )
-    {
-        rc = RC(rcAlign, rcType, rcSearching, rcMemory, rcExhausted);
-    }
-    else
-    {
-        memcpy( b, key, key_sz );
-        b[ key_sz ] = '\0';
-        *obj = ( ReferenceObj* )BSTreeFind( &cself->seqid_tree, b, ReferenceObj_CmpSeqId );
-        if ( *obj == NULL )
-        {
-            const BSTNode* n = BSTreeFind( &cself->name_tree, b, ReferenceObj_CmpName );
-            if ( n != NULL )
-            {
-                *obj = ( ReferenceObj* )&n[ -1 ];
-            }
-        }
-        if ( *obj == NULL )
-        {
-            rc = RC( rcAlign, rcType, rcSearching, rcItem, rcNotFound );
-        }
-        else
-        {
-            rc = ReferenceList_AddRef( cself );
-            if ( rc != 0 )
-            {
-                *obj = NULL;
-            }
-        }
-
-        if ( b != buf )
-        {
-            free( b );
-        }
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceList_Get( const ReferenceList* cself, const ReferenceObj** obj, uint32_t idx )
-{
-    rc_t rc = 0;
-    if ( cself == NULL || obj == NULL || idx >= cself->nodes_qty )
-    {
-        rc = RC( rcAlign, rcType, rcRetrieving, rcParam, rcInvalid );
-    }
-    else
-    {
-        rc = ReferenceList_AddRef( cself );
-        if ( rc == 0 )
-        {
-            *obj = cself->nodes[ idx ];
-        }
-        else
-        {
-            *obj = NULL;
-        }
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t ReferenceObj_AddRef( const ReferenceObj *cself )
-{
-    if ( cself == NULL )
-    {
-        return RC( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    } 
-    else
-    {
-        return ReferenceList_AddRef( cself->mgr );
-    }
-}
-
-
-LIB_EXPORT void ReferenceObj_Release( const ReferenceObj *cself )
-{
-    ReferenceList_Release( cself ? cself->mgr : NULL );
-}
-
-
-LIB_EXPORT rc_t CC ReferenceObj_Idx( const ReferenceObj* cself, uint32_t* idx )
-{
-    rc_t rc = 0;
-    if ( cself == NULL || idx == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else
-    {
-        *idx = cself->id;
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceObj_IdRange( const ReferenceObj* cself, int64_t* start, int64_t* stop )
-{
-    rc_t rc = 0;
-    if ( cself == NULL || (start == NULL && stop == NULL) )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else
-    {
-        if ( start != NULL )
-        {
-            *start = cself->start_rowid;
-        }
-        if ( stop != NULL )
-        {
-            *stop = cself->end_rowid;
-        }
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceObj_Bin( const ReferenceObj* cself, uint32_t* bin )
-{
-    rc_t rc = 0;
-    if ( cself == NULL || bin == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else
-    {
-        *bin = cself->bin;
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-
-}
-
-
-LIB_EXPORT rc_t CC ReferenceObj_SeqId( const ReferenceObj* cself, const char** seqid )
-{
-    rc_t rc = 0;
-    if ( cself == NULL || seqid == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else
-    {
-        *seqid = cself->seqid;
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceObj_Name( const ReferenceObj* cself, const char** name )
-{
-    rc_t rc = 0;
-    if ( cself == NULL || name == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else
-    {
-        *name = cself->name;
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceObj_SeqLength( const ReferenceObj* cself, INSDC_coord_len* len )
-{
-    rc_t rc = 0;
-    if ( cself == NULL || len == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else
-    {
-        *len = cself->seq_len;
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceObj_Circular( const ReferenceObj* cself, bool* circular )
-{
-    rc_t rc = 0;
-    if ( cself == NULL || circular == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else
-    {
-        *circular = cself->circular;
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceObj_External( const ReferenceObj* cself, bool* external, char** path )
-{
-    rc_t rc = 0;
-
-    if ( cself == NULL || external == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else
-    {
-        const RefSeqMgr* rmgr;
-        *external = !cself->read_present;
-        if ( path != NULL && !cself->read_present )
-        {
-            rc = ReferenceList_RefSeqMgr( cself->mgr, &rmgr );
-            if ( rc == 0 )
-            {
-                *path = NULL;
-                rc = RefSeqMgr_Exists( rmgr, cself->seqid, string_size( cself->seqid ), NULL );
-                if ( GetRCObject( rc ) == (enum RCObject)rcTable && GetRCState( rc ) == rcNotFound )
-                {
-                    rc = 0;
-                }
-            }
-        }
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceObj_Read( const ReferenceObj* cself, INSDC_coord_zero offset, INSDC_coord_len len,
-                                      uint8_t* buffer, INSDC_coord_len* written )
-{
-    rc_t rc = 0;
-
-    if( cself == NULL || buffer == NULL || written == NULL )
-    {
-        rc = RC ( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else
-    {
-        rc = ReferenceSeq_ReOffset( cself->circular, cself->seq_len, &offset );
-        if ( rc == 0 )
-        {
-            if ( cself->mgr->reader != NULL || ( rc = ReferenceList_OpenCursor( cself->mgr ) ) == 0 )
-            {
-                int cid = ( cself->mgr->options & ereferencelist_4na ) ? ereflst_cn_READ_4na : ereflst_cn_READ_dna;
-                INSDC_coord_len q = 0;
-                *written = 0;
-                do
-                {
-                    int64_t rowid = cself->start_rowid + offset / cself->mgr->max_seq_len;
-                    INSDC_coord_zero s = offset % cself->mgr->max_seq_len;
-                    rc = TableReader_ReadRow( cself->mgr->reader, rowid );
-                    if ( rc == 0 )
-                    {
-                        q = cself->mgr->reader_cols[ereflst_cn_SEQ_LEN].base.coord_len[0] - s;
-                        if ( q > len ) { q = len; }
-                        memcpy( &buffer[ *written ], &cself->mgr->reader_cols[ cid ].base.str[ s ], q );
-                        *written += q;
-                        offset += q;
-                        len -= q;
-                    }
-                    /* SEQ_LEN < MAX_SEQ_LEN is last row unless it is CIRCULAR */
-                    if ( cself->mgr->reader_cols[ ereflst_cn_SEQ_LEN ].base.coord_len[ 0 ] < cself->mgr->max_seq_len )
-                    {
-                        if ( !cself->circular ) { break; }
-                        offset = 0;
-                    }
-                } while ( rc == 0 && q > 0 && len > 0 );
-            }
-        }
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceObj_GetIdCount( const ReferenceObj* cself, int64_t row_id, uint32_t *count )
-{
-    rc_t rc = 0;
-
-    if ( cself == NULL || count == NULL )
-    {
-        rc = RC ( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else if ( cself->mgr == NULL )
-    {
-        rc = RC ( rcAlign, rcType, rcAccessing, rcItem, rcInvalid );
-    }
-    else
-    {
-        *count = 0;
-
-        if ( cself->mgr->reader == NULL )
-            rc = ReferenceList_OpenCursor( cself->mgr );
-
-        if ( rc == 0 )
-        {
-            rc = TableReader_ReadRow( cself->mgr->reader, row_id );
-            if ( rc == 0 )
-            {
-                TableReaderColumn *col = &( cself->mgr->reader_cols[ ereflst_cn_PRIMARY_ALIGNMENT_IDS ] );
-                count[ 0 ] = col->len;
-                col = &( cself->mgr->reader_cols[ ereflst_cn_SECONDARY_ALIGNMENT_IDS ] );
-                count[ 1 ] = col->len;
-                col = &( cself->mgr->reader_cols[ ereflst_cn_EVIDENCE_INTERVAL_IDS ] );
-                count[ 2 ] = col->len;
-            }
-        }
-    }
-    return rc;
-}
-
-
-typedef struct PlacementRecExtensionInfo PlacementRecExtensionInfo;
-struct PlacementRecExtensionInfo
-{
-    /* data, destructor and size for extension 1 */
-    void * data;
-    void ( CC * destroy ) ( void *obj, void *data );
-    size_t size;
-};
-
-
-LIB_EXPORT void * CC PlacementRecordCast ( const PlacementRecord *self, uint32_t ext )
-{
-    void * res = NULL;
-    if ( self != NULL )
-    {
-        uint8_t * ptr = ( uint8_t * ) self;
-        PlacementRecExtensionInfo * ext_info;
-
-/**********************************************
-    +---------------+
-    | core          |   PlacementRecord *
-    +---------------+
-    | read_group    |   char *
-    +---------------+
-    | ext_info1     |   PlacementRecExtensionInfo *
-    | ext_info2     |   PlacementRecExtensionInfo *
-    +---------------+
-    | ext1          |   ??? *
-    +---------------+
-    | ext2          |   ??? *
-    +---------------+
-**********************************************/
-        ptr += ( sizeof * self );
-        ptr += self->spot_group_len;
-        ext_info = ( PlacementRecExtensionInfo * )( ptr );
-        ptr += ( 2 * ( sizeof * ext_info ) );
-        switch( ext )
-        {
-            case placementRecordExtension0 : res = ( void * ) ptr;
-                                             break;
-
-            case placementRecordExtension1 : res = ( void * ) ( ptr + ext_info->size );
-                                             break;
-        }
-    }
-    return res;
-}
-
-
-LIB_EXPORT void * CC PlacementRecord_get_ext_data_ptr ( const PlacementRecord *self, uint32_t ext )
-{
-    void * res = NULL;
-    if ( self != NULL )
-    {
-        uint8_t * ptr = ( uint8_t * ) self;
-        PlacementRecExtensionInfo * ext_info;
-        ptr += ( sizeof * self );
-        ptr += self->spot_group_len;    /* ptr points now to the 1st ext-info-block */
-        ext_info = ( PlacementRecExtensionInfo * )( ptr );
-        switch( ext )
-        {
-        case placementRecordExtension0 : res = ext_info[ 0 ].data; break;
-        case placementRecordExtension1 : res = ext_info[ 1 ].data; break;
-        }
-    }
-    return res;
-}
-
-
-LIB_EXPORT void CC PlacementRecordWhack( const PlacementRecord *cself )
-{
-    if ( cself != NULL ) 
-    {
-        PlacementRecord * self = ( PlacementRecord * )cself;
-        PlacementRecExtensionInfo * ext_info;
-        uint8_t * ptr = ( uint8_t * )self;
-        ptr += sizeof( *self );
-        ptr += self->spot_group_len;
-        ext_info = ( PlacementRecExtensionInfo * ) ptr;
-
-        /* destroy from the outer callback-block beginning */
-        if ( ext_info[ 1 ].destroy != NULL )
-        {
-            void *obj = PlacementRecordCast ( self, placementRecordExtension1 );
-            ext_info[ 1 ].destroy( obj, ext_info[ 1 ].data );
-        }
-
-        if ( ext_info[ 0 ].destroy != NULL )
-        {
-            void *obj = PlacementRecordCast ( self, placementRecordExtension0 );
-            ext_info[ 0 ].destroy( obj, ext_info[ 0 ].data );
-        }
-        /* now deallocate ( or put back into pool ) */
-        free( self );
-    }
-}
-
-struct PlacementIterator
-{
-    const ReferenceObj* obj;
-    INSDC_coord_zero ref_window_start;
-    INSDC_coord_len ref_window_len;
-
-    int64_t last_ref_row_of_window_rel;     /* relative to start of reference, not window */
-    int64_t cur_ref_row_rel;                /* current row relative to start of reference */
-    int64_t rowcount_of_ref;                /* precomputed: how many rows does this reference has */
-
-    /* own reader in case of ref cursor based construction */
-    const TableReader* ref_reader;
-    TableReaderColumn* ref_cols;
-    TableReaderColumn ref_cols_own[sizeof(ReferenceList_cols)/sizeof(ReferenceList_cols[0])];
-
-    /* own reader in case of align cursor based construction */
-    const TableReader* align_reader;
-    TableReaderColumn* align_cols;
-    TableReaderColumn align_cols_own[sizeof(PlacementIterator_cols)/sizeof(PlacementIterator_cols[0])];
-
-    /* current reference table row */
-    int64_t current_reftable_row;
-
-    const TableReaderColumn* ids_col;
-    Vector ids;
-    /* PlacementRecord c-tor params */
-    PlacementRecordExtendFuncs ext_0;
-    PlacementRecordExtendFuncs ext_1;
-
-    /* if this field is :
-     * NULL ... group by original read-group from the source-file
-     * points to empty string ... do not perform grouping at all
-     * point to non-empty string ... group by this string
-    */
-    const char * spot_group;
-    size_t spot_group_len;
-    int32_t min_mapq;
-
-    const VCursor* align_curs;
-    void * placement_ctx;           /* source-specific context */
-};
-
-
-static void enter_spotgroup ( PlacementIterator *iter, const char * spot_group )
-{
-    if ( spot_group == NULL )
-    {
-        iter->spot_group = NULL;
-        iter->spot_group_len = 0;
-    }
-    else
-    {
-        iter->spot_group_len = string_size ( spot_group );
-        if ( iter->spot_group_len > 0 )
-        {
-            iter->spot_group = string_dup_measure ( spot_group, NULL );
-        }
-        else
-        {
-            iter->spot_group = calloc( 1, 1 );
-        }
-    }
-}
-
-
-static int64_t calc_overlaped( PlacementIterator * o, align_id_src ids )
-{
-    int64_t res = o->ref_window_start;
-    bool from_ref_table = false;
-
-/*
-    uint32_t ofs = 0;
-    switch ( ids )
-    {
-        case primary_align_ids   : ofs = 0; break;
-        case secondary_align_ids : ofs = 1; break;
-        case evidence_align_ids  : ofs = 2; break;
-    }
-
-    if ( o->ref_cols[ ereflst_cn_OVERLAP_REF_LEN ].idx != 0 && 
-         o->ref_cols[ ereflst_cn_OVERLAP_REF_LEN ].len > ofs )
-    {
-        INSDC_coord_len overlap_ref_len = o->ref_cols[ ereflst_cn_OVERLAP_REF_LEN ].base.coord_len[ ofs ];
-        if ( overlap_ref_len < o->obj->mgr->max_seq_len )
-        {
-            if ( o->ref_cols[ ereflst_cn_OVERLAP_REF_POS ].idx != 0 && 
-                 o->ref_cols[ ereflst_cn_OVERLAP_REF_POS ].len > ofs )
-            {
-                res = o->ref_cols[ereflst_cn_OVERLAP_REF_POS].base.coord0[ ofs ];
-                from_ref_table = true;
-            }
-        }
-    }
-*/
-
-    if ( !from_ref_table )
-    {
-        /* default is step back 10 rows/50k bases */
-        int64_t ref_pos_lookback = ( 10 * o->obj->mgr->max_seq_len );
-        if ( o->obj->circular )
-        {
-            int64_t const half = ( o->obj->seq_len / 2 );
-
-            if ( ref_pos_lookback > half )
-            {
-                /* go back no more than one full length */
-                ref_pos_lookback = half;
-            }
-            res = ( o->ref_window_start - ref_pos_lookback ); /* could become negative */
-        }
-        else
-        {
-            res = ( o->ref_window_start < ref_pos_lookback ? 0 : ( o->ref_window_start - ref_pos_lookback ) );
-        }
-    }
-    return res;
-}
-
-
-LIB_EXPORT rc_t CC ReferenceObj_MakePlacementIterator ( const ReferenceObj* cself,
-    PlacementIterator **iter,
-    INSDC_coord_zero ref_window_start, INSDC_coord_len ref_window_len,
-    int32_t min_mapq,
-    struct VCursor const *ref_cur, struct VCursor const *align_cur, align_id_src ids,
-    const PlacementRecordExtendFuncs *ext_0, const PlacementRecordExtendFuncs *ext_1,
-    const char * spot_group, void * placement_ctx )
-{
-    rc_t rc = 0;
-    PlacementIterator* o = NULL;
-
-    if ( cself == NULL || iter == NULL || ref_window_len < 1 )
-    {
-        rc = RC(rcAlign, rcType, rcAccessing, rcParam, rcInvalid);
-    }
-    else if ( ( rc = ReferenceSeq_ReOffset( cself->circular, cself->seq_len, &ref_window_start ) ) != 0 )
-    {
-    }
-    else if ( ( o = calloc( 1, sizeof( *o ) ) ) == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        rc = ReferenceList_AddRef( cself->mgr );
-        if ( rc == 0 )
-        {
-            ReferenceList* mgr = cself->mgr;
-            o->obj = cself;
-            /* o->wrapped_around = false; */
-            ReferenceObj_AddRef( o->obj );
-            o->min_mapq = min_mapq;
-            o->placement_ctx = placement_ctx;
-
-            if ( ext_0 != NULL )
-            {
-                o->ext_0.data = ext_0->data;
-                o->ext_0.destroy = ext_0->destroy;
-                o->ext_0.populate = ext_0->populate;
-                o->ext_0.alloc_size = ext_0->alloc_size;
-                o->ext_0.fixed_size = ext_0->fixed_size;
-            }
-
-            if ( ext_1 != NULL )
-            {
-                o->ext_1.data = ext_1->data;
-                o->ext_1.destroy = ext_1->destroy;
-                o->ext_1.populate = ext_1->populate;
-                o->ext_1.alloc_size = ext_1->alloc_size;
-                o->ext_1.fixed_size = ext_1->fixed_size;
-            }
-
-            if ( ref_cur == NULL )
-            {
-                if ( mgr->reader == NULL )
-                {
-                    rc = ReferenceList_OpenCursor( mgr );
-                }
-                if ( rc == 0 )
-                {
-                    o->ref_reader = mgr->reader;
-                    o->ref_cols = mgr->reader_cols;
-                }
-            }
-            else
-            {
-                memcpy( o->ref_cols_own, ReferenceList_cols, sizeof( o->ref_cols_own ) );
-                o->ref_cols = o->ref_cols_own;
-                rc = TableReader_MakeCursor( &o->ref_reader, ref_cur, o->ref_cols_own );
-            }
-
-            if ( align_cur == NULL )
-            {
-                bool b_assign = ( mgr->iter != NULL );
-                if ( !b_assign )
-                {
-                    rc = ReferenceList_OpenCursor2( mgr, ids );
-                    b_assign = ( rc == 0 );
-                }
-                if ( b_assign )
-                {
-                    o->align_reader = mgr->iter;
-                    o->align_cols = mgr->iter_cols;
-                }
-            }
-            else
-            {
-                memcpy( o->align_cols_own, PlacementIterator_cols, sizeof( o->align_cols_own ) );
-                o->align_cols = o->align_cols_own;
-                o->align_curs = align_cur;
-                rc = TableReader_MakeCursor( &o->align_reader, align_cur, o->align_cols );
-            }
-
-            if ( rc == 0 )
-            {
-                int64_t first_ref_row_of_window_rel = ( ref_window_start / mgr->max_seq_len );
-                int64_t first_ref_row_of_window_abs = ( cself->start_rowid + first_ref_row_of_window_rel );
-
-                /* in bases */
-                o->ref_window_start = ref_window_start;
-                o->ref_window_len = ref_window_len;
-
-                /* in reference-rows */
-                o->last_ref_row_of_window_rel = ref_window_start;
-                o->last_ref_row_of_window_rel += ( ref_window_len - 1 );
-                o->last_ref_row_of_window_rel /= mgr->max_seq_len;
-                o->rowcount_of_ref = ( cself->end_rowid - cself->start_rowid ) + 1;
-
-                /* get effective starting offset based on overlap
-                   from alignments which started before the requested pos */
-                rc = TableReader_ReadRow( o->ref_reader, first_ref_row_of_window_abs );
-                if ( rc == 0 )
-                {
-                    int64_t ref_pos_overlapped = calc_overlaped( o, ids );
-                    ALIGN_DBG( "ref_pos_overlapped: %,li", ref_pos_overlapped );
-
-                    /* the absolute row where we are reading from */
-                    o->cur_ref_row_rel = ( ref_pos_overlapped / mgr->max_seq_len ) - 1;
-
-                    VectorInit( &o->ids, 0, 100 );
-
-                    o->ids_col = &o->ref_cols[ids == primary_align_ids ? ereflst_cn_PRIMARY_ALIGNMENT_IDS :
-                            ( ids == secondary_align_ids ? ereflst_cn_SECONDARY_ALIGNMENT_IDS : ereflst_cn_EVIDENCE_INTERVAL_IDS ) ];
-
-                    ALIGN_DBG( "iter.last_ref_row_of_window_rel: %,li", o->last_ref_row_of_window_rel );
-                    ALIGN_DBG( "iter.rowcount_of_ref: %,li", o->rowcount_of_ref );
-                    ALIGN_DBG( "iter.cur_ref_row_rel: %,li", o->cur_ref_row_rel );
-                }
-            }
-
-            if ( rc != 0 )
-            {
-                ReferenceObj_Release( o->obj );
-            }
-        }
-    }
-
-    if ( rc == 0 )
-    {
-        enter_spotgroup ( o, spot_group );
-        *iter = o;
-        ALIGN_DBG( "iter for %s:%s opened 0x%p", cself->seqid, cself->name, o );
-    }
-    else
-    {
-        *iter = NULL;
-        PlacementIteratorRelease( o );
-        ALIGN_DBGERRP( "iter for %s:%s", rc, cself->seqid, cself->name );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC PlacementIteratorAddRef ( const PlacementIterator *cself )
-{
-    return ReferenceList_AddRef(cself ? cself->obj->mgr : NULL);
-}
-
-
-static void CC PlacementIterator_whack_recs( void *item, void *data )
-{
-    PlacementRecordWhack( ( PlacementRecord * ) item );
-}
-
-
-LIB_EXPORT rc_t CC PlacementIteratorRelease ( const PlacementIterator *cself )
-{
-    if ( cself != NULL )
-    {
-        PlacementIterator* self = ( PlacementIterator* )cself;
-
-        VectorWhack( &self->ids, PlacementIterator_whack_recs, NULL );
-
-        if ( self->ref_reader != self->obj->mgr->reader )
-        {
-            TableReader_Whack( self->ref_reader );
-        }
-        if ( self->align_reader != self->obj->mgr->iter )
-        {
-            TableReader_Whack( self->align_reader );
-        }
-        ReferenceObj_Release( self->obj );
-        ReferenceList_Release( self->obj->mgr );
-        if ( self->spot_group != NULL )
-        {
-            free( ( void * )self->spot_group );
-        }
-        free( self );
-    }
-    return 0;
-}
-
-
-LIB_EXPORT rc_t CC PlacementIteratorRefWindow( const PlacementIterator *self,
-                                               const char **idstr, INSDC_coord_zero* pos, INSDC_coord_len* len )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL || (idstr == NULL || pos == NULL || len == NULL ) )
-    {
-        rc = RC(rcAlign, rcType, rcAccessing, rcParam, rcInvalid);
-    }
-    else
-    {
-        if ( idstr != NULL ) { *idstr = self->obj->seqid; }
-        if ( pos != NULL )   { *pos = self->ref_window_start; }
-        if ( len != NULL )   { *len = self -> ref_window_len; }
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC PlacementIteratorRefObj( const PlacementIterator * self,
-                                            struct ReferenceObj const ** refobj )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL || refobj == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else
-    {
-        *refobj = self->obj;
-    }
-    ALIGN_DBGERR( rc );
-    return rc;
-}
-
-
-#if _DEBUGGING
-/*
-static void CC PlacementRecordVector_dump( void *item, void *data )
-{
-    const PlacementRecord* i = ( const PlacementRecord* )item;
-    ALIGN_DBG( " {pos:%,u, len:%,u, id:%,li}", i->pos, i->len, i->id );
-}
-*/
-#endif
-
-
-/* this comparison function performs last-to-first
-   ordering in the Vector. for this reason, all
-   comparisons and return values are reversed. */
-static int64_t CC PlacementRecordVector_cmp( const void** left, const void** right, void* data )
-{
-    const PlacementRecord* l = *( ( const PlacementRecord** )left );
-    const PlacementRecord* r = *( ( const PlacementRecord** )right );
-
-    /* order by pos desc
-       return right - left rather than
-       normal left - right to reverse result */
-    int32_t d = r -> pos - l -> pos;
-    if ( d != 0 )
-        return d;
-
-    /* ...len asc */
-    if ( l -> len != r -> len )
-        return (int64_t)l -> len - (int64_t)r -> len;
-
-    /* ...id desc */
-    return r -> id < l -> id ? -1 : r -> id > l -> id;
-}
-
-
-static rc_t allocate_populate_rec( const PlacementIterator *cself,
-                                   PlacementRecord **rec,
-                                   struct VCursor const *curs,
-                                   int64_t id,
-                                   INSDC_coord_zero apos,
-                                   INSDC_coord_len alen )
-{
-    rc_t rc = 0;
-
-    {
-        PlacementRecExtensionInfo * ext_info;
-        size_t spot_group_len, size0, size1, total_size;
-
-        if ( cself->spot_group_len > 0 )
-        {
-            /* use the read-group from the PlacementIterator as an fix override ... */
-            spot_group_len = cself->spot_group_len;
-        }
-        else
-        {
-            if ( cself->spot_group != NULL )
-            {
-                /* iterator has an empty (not NULL) spot-group: use the orignal data! */
-                spot_group_len = cself->align_cols[eplacementiter_cn_READ_GROUP].len;
-            }
-            else
-            {
-                /* do not use spotgroups at all ! */
-                spot_group_len = 0;
-            }
-        }
-
-        /* use callback or fixed size to discover the size of portions 0 and 1 */
-        if ( cself->ext_0.alloc_size != NULL )
-        {
-            rc = cself->ext_0.alloc_size( curs, id, &size0, cself->ext_0.data, cself->placement_ctx );
-            if ( rc != 0 )
-                return rc;
-        }
-        else
-            size0 = cself->ext_0.fixed_size;
-
-        if ( cself->ext_1.alloc_size != NULL )
-        {
-            rc = cself->ext_1.alloc_size( curs, id, &size1, cself->ext_1.data, cself->placement_ctx );
-            if ( rc != 0 )
-                return rc;
-        }
-        else
-            size1 = cself->ext_1.fixed_size;
-        
-        /* allocate the record ( or take it from a pool ) */
-        total_size = ( sizeof **rec ) + spot_group_len + ( 2 * ( sizeof *ext_info ) ) + size0 + size1;
-        *rec = calloc( 1, total_size );
-        if ( *rec == NULL )
-        {
-            rc = RC( rcAlign, rcType, rcAccessing, rcMemory, rcExhausted );
-        }
-        else
-        {
-            PlacementRecord *pr = * rec;
-            uint8_t * ptr = ( uint8_t * )( * rec );
-            ptr += sizeof ( **rec );
-            pr->spot_group = (char *)ptr;
-            ptr += spot_group_len ;
-            ext_info = ( PlacementRecExtensionInfo * )ptr;
-
-            /* prepopulate the core-record : */
-            pr->id  = id;               /* the row-id */
-            pr->ref = cself->obj;       /* the ReferenceObj it refers to */
-            pr->pos = apos;             /* the positon on the reference */
-            pr->len = alen;             /* the length on the reference */
-            pr->mapq = cself->align_cols[eplacementiter_cn_MAPQ].base.i32[ 0 ]; /* mapq */
-
-            /* populate the spot-group : (with the values discovered at the "size-phase" ) */
-            pr->spot_group_len = spot_group_len;
-            if ( cself->spot_group_len > 0 )
-            {
-                /* we make a copy of the spot-group-override commin from the iterator */
-                string_copy ( pr->spot_group, spot_group_len, cself->spot_group, spot_group_len );
-            }
-            else
-            {
-                if ( cself->spot_group != NULL )
-                {
-                    /* iterator has an empty (not NULL) spot-group: use the orignal data! */
-                    string_copy( pr->spot_group, spot_group_len,
-                                 cself->align_cols[eplacementiter_cn_READ_GROUP].base.str, spot_group_len );
-                }
-            }
-
-            ext_info[ 0 ].data = cself->ext_0.data;          /* the opt. context ptr. */
-            ext_info[ 0 ].destroy = cself->ext_0.destroy;    /* the opt. destructor */
-            ext_info[ 0 ].size = size0;                      /* discovered size from above */
-
-            ext_info[ 1 ].data = cself->ext_1.data;          /* the opt. context ptr. */
-            ext_info[ 1 ].destroy = cself->ext_1.destroy;    /* the opt. destructor */
-            ext_info[ 1 ].size = size1;                      /* discovered size from above */
-
-            /* pass the record now to the opt. populate-callbacks */
-            if ( cself->ext_0.populate != NULL )
-            {
-                void * obj = PlacementRecordCast ( pr, placementRecordExtension0 );
-                rc = cself->ext_0.populate( obj, pr, curs,
-                                            cself->ref_window_start,
-                                            cself->ref_window_len,
-                                            cself->ext_0.data,
-                                            cself->placement_ctx );
-                if ( rc != 0 && cself->ext_0.destroy != NULL )
-                {
-                    void *obj = PlacementRecordCast ( pr, placementRecordExtension0 );
-                    cself->ext_0.destroy( obj, cself->ext_0.data );
-                }
-            }
-
-            if ( rc == 0 && cself->ext_1.populate != NULL )
-            {
-                void * obj = PlacementRecordCast ( pr, placementRecordExtension1 );
-                rc = cself->ext_1.populate( obj, pr, curs, 
-                                            cself->ref_window_start,
-                                            cself->ref_window_len,
-                                            cself->ext_1.data,
-                                            cself->placement_ctx );
-                if ( rc != 0 )
-                {
-                    if ( cself->ext_1.destroy != NULL )
-                    {
-                        void *obj = PlacementRecordCast ( pr, placementRecordExtension1 );
-                        cself->ext_1.destroy( obj, cself->ext_1.data );
-                    }
-                    if ( cself->ext_0.destroy != NULL )
-                    {
-                        void *obj = PlacementRecordCast ( pr, placementRecordExtension0 );
-                        cself->ext_0.destroy( obj, cself->ext_0.data );
-                    }
-
-                }
-            }
-
-            if ( rc != 0 )
-            {
-                /* free */
-                free( *rec );
-                *rec = NULL;
-            }
-        }
-    }
-    return rc;
-}
-
-
-static rc_t make_alignment( PlacementIterator *self, int64_t align_id,
-                            INSDC_coord_zero apos, INSDC_coord_len alen )
-{
-    PlacementRecord *rec;
-    rc_t rc = allocate_populate_rec( self, &rec, self->align_curs, align_id, apos, alen );
-    if ( rc == 0 )
-    {
-        /*ALIGN_DBG("align %p: {%li, %u, %u} - added[%u]", rec, cself->ids_col->base.i64[i],
-            apos, alen, VectorLength(&cself->ids));*/
-        rc = VectorAppend( &self->ids, NULL, rec );
-        if ( rc != 0 )
-            PlacementRecordWhack( rec );
-    }
-    else
-    {
-        if ( GetRCState( rc ) == rcIgnored )
-            rc = 0; /* do not break the loop if a record is filtered out! */
-    }
-    return rc;
-}
-
-
-/*
-  we have read a single row from REFERENCE, including the
-  alignment ids. use each alignment id from this row to
-  populate internal vector
-*/
-static rc_t read_alignments( PlacementIterator *self )
-{
-    rc_t rc = 0;
-    uint32_t i;
-    /* fill out vector */
-    /*ALIGN_DBG("align rows: %u", cself->ids_col->len);*/
-    for ( i = 0; rc == 0 && i < self->ids_col->len; i++ )
-    {
-        int64_t row_id = self->ids_col->base.i64[ i ];
-        rc = TableReader_ReadRow( self->align_reader, row_id );
-        if ( rc == 0 )
-        {
-            INSDC_coord_zero apos = self->align_cols[ eplacementiter_cn_REF_POS ].base.coord0[ 0 ];
-            INSDC_coord_len alen  = self->align_cols[ eplacementiter_cn_REF_LEN ].base.coord_len[ 0 ];
-
-#if 0
-            ALIGN_DBG( "alignment read: {row_id:%,li, apos:%,d, alen:%u}", row_id, apos, alen );
-#endif
-
-            /* at this point we have the position of the alignment.
-               we want it to intersect with the window */
-
-            /* test mapq */
-            if ( self->align_cols[eplacementiter_cn_MAPQ].base.i32[ 0 ] < self->min_mapq )
-                continue;
-
-            /* case 1: alignment, which is expressed in
-               linear coordinates, is entirely to left of
-               window. */
-            if ( (INSDC_coord_zero)( apos + alen ) <= self -> ref_window_start )
-            {
-                /* ignore this alignment */
-                continue;
-            }
-
-            /* case 2: alignment is to the right of window */
-            if ( apos >= ( self -> ref_window_start + self -> ref_window_len ) )
-            {
-                /* if not circular, it cannot intersect */
-                if ( ! self -> obj -> circular )
-                {
-                    /* this seems like it indicates end of window,
-                       however there is no guarantee that the ids
-                       being fetched are in reference order. they are
-                       supposed to be in row order ( cluster ) to
-                       reduce random access to cursor. unless row
-                       order is guaranteed to be reference order,
-                       we cannot know that the loop can be terminated. */
-                    continue;
-                }
-
-                /* circular, but still within linear range
-                   means it cannot wrap around to intersect */
-                if ( (INSDC_coord_zero)( apos + alen ) <= self->obj->seq_len )
-                    continue;
-
-            }
-            else if ( ( self->obj->circular )&&
-                       ( apos + alen > self->obj->seq_len )&&
-                       ( self->cur_ref_row_rel < 0 ) ) 
-            {
-                /* the end of the alignment sticks over the end of the reference! 
-                   ---> we have the rare case of an alignment that wraps arround !
-                   let as insert the alignment 2 times!
-                   ( one with neg. position, one at real position ) */
-                rc =  make_alignment( self, row_id, apos - self->obj->seq_len, alen );
-            }
-
-            /* having arrived here, we know the alignment intersects our window
-               apos MAY be < 0 if the alignment wrapped around */
-            if ( rc == 0 && self->cur_ref_row_rel >= 0 )
-                rc =  make_alignment( self, row_id, apos, alen );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC PlacementIteratorNextAvailPos( const PlacementIterator *cself,
-    INSDC_coord_zero *pos, INSDC_coord_len *len )
-{
-    rc_t rc = 0;
-    PlacementIterator* self = (PlacementIterator*)cself;
-
-    if ( self == NULL || ( pos == NULL && len == NULL ) )
-    {
-        rc = RC( rcAlign, rcType, rcSelecting, rcParam, rcInvalid );
-    }
-    else
-    {
-        while ( rc == 0 && VectorLength( &self->ids ) == 0 )
-        {
-            /* read ids */
-
-            self->cur_ref_row_rel++;   /* increment row offset */
-
-#if 0
-            ALIGN_DBG( "ref row: ref-start-row-id:%,li - curr-rel-row:%,li - of:%,li",
-                       self->obj->start_rowid, self->cur_ref_row_rel, self->last_ref_row_of_window_rel );
-#endif
-
-            if ( self->cur_ref_row_rel > self->last_ref_row_of_window_rel )
-                rc = SILENT_RC( rcAlign, rcType, rcSelecting, rcRange, rcDone );
-            else
-            {
-                int64_t row = ( self->obj->start_rowid + self->cur_ref_row_rel );
-                if ( self->cur_ref_row_rel < 0 )
-                    row += self->rowcount_of_ref;
-
-                rc = TableReader_ReadRow( self->ref_reader, row );
-                if ( rc == 0 )
-                    rc = read_alignments( self );
-
-                if ( ( rc == 0 || GetRCState( rc ) == rcDone) && VectorLength( &cself->ids ) > 0 )
-                {
-                    VectorReorder( &self->ids, PlacementRecordVector_cmp, NULL );
-#if _DEBUGGING && 0
-                    ALIGN_DBG( "REFERENCE row %li %u recs order by pos asc, len desc, id asc",
-                                row, VectorLength( &cself->ids ) );
-                    VectorForEach( &self->ids, true, PlacementRecordVector_dump, NULL );
-#endif
-                }
-            }
-        }
-
-        if ( rc == 0 || GetRCState( rc ) == rcDone )
-        {
-            uint32_t count = VectorLength( &cself->ids );
-            if ( count > 0 )
-            {
-                PlacementRecord * r = VectorLast( &cself->ids );
-                rc = 0;
-                if ( pos != NULL ) { *pos = r->pos; }
-                if ( len != NULL ) { *len = r->len; }
-
-#if 0
-                ALIGN_DBG( "PlacementIteratorNextAvailPos( id=%,li, pos=%,d, len=%,u, n=%,u )", r->id, r->pos, r->len, count );
-#endif
-
-                if ( !( cself->obj->circular ) && ( r->pos >= ( cself->ref_window_start + cself->ref_window_len ) ) )
-                {
-                    /* the alignment !starts! after the end of the of the requested window! */
-                    rc = SILENT_RC( rcAlign, rcType, rcSelecting, rcRange, rcDone );
-                }
-            }
-            else
-            {
-                ALIGN_DBG( "PlacementIteratorNextAvailPos( no placements )", 0 );
-            }
-        }
-    }
-
-    if ( rc != 0 && GetRCState(rc) != rcDone )
-        ALIGN_DBGERR( rc );
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC PlacementIteratorNextRecordAt( PlacementIterator *cself,
-    INSDC_coord_zero pos, const PlacementRecord **rec )
-{
-    rc_t rc = 0;
-    if ( cself == NULL || rec == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else
-    {
-        uint32_t vlen = VectorLength( &cself->ids );
-        *rec = NULL;
-        if ( vlen > 0 )
-        {
-            PlacementRecord* r = VectorLast( &cself->ids );
-            if ( r->pos == pos )
-            {
-                VectorRemove( &cself->ids, vlen - 1, (void**)rec );
-            }
-        }
-    }
-
-    if ( rc == 0 && *rec == NULL )
-    {
-        rc = SILENT_RC( rcAlign, rcType, rcSelecting, rcOffset, rcDone );
-    }
-    else
-    {
-        ALIGN_DBGERR( rc );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC PlacementIteratorNextIdAt( PlacementIterator *cself,
-                                              INSDC_coord_zero pos, int64_t *row_id, INSDC_coord_len *len )
-{
-    rc_t rc = 0;
-    const PlacementRecord* r = NULL;
-
-    if ( cself == NULL || row_id == NULL )
-    {
-        rc = RC( rcAlign, rcType, rcAccessing, rcParam, rcInvalid );
-    }
-    else
-    {
-        rc = PlacementIteratorNextRecordAt( cself, pos, &r );
-        if ( rc  == 0 )
-        {
-            *row_id = r->id;
-            if ( len != NULL ) { *len = r->len; }
-            PlacementRecordWhack( r );
-        }
-    }
-
-    if ( GetRCState( rc ) != rcDone )
-    {
-        ALIGN_DBGERR( rc );
-    }
-    return rc;
-}
diff --git a/libs/align/refseq-mgr-priv.h b/libs/align/refseq-mgr-priv.h
deleted file mode 100644
index 4e746c7..0000000
--- a/libs/align/refseq-mgr-priv.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was readten as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#ifndef _h_align_refseq_mgr_priv_
-#define _h_align_refseq_mgr_priv_
-
-#include <align/refseq-mgr.h>
-
-typedef bool (*RefSeqMgr_ForEachVolume_callback)(char const server[], char const volume[], void *data);
-
-rc_t RefSeqMgr_ForEachVolume(const RefSeqMgr* cself, RefSeqMgr_ForEachVolume_callback cb, void *data);
-
-#endif /* _h_align_refseq_mgr_priv_ */
diff --git a/libs/align/refseq-mgr.c b/libs/align/refseq-mgr.c
deleted file mode 100644
index e6d8db9..0000000
--- a/libs/align/refseq-mgr.c
+++ /dev/null
@@ -1,1273 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was readten as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <align/extern.h>
-
-#include <klib/rc.h>
-#include <klib/container.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-#include <kdb/manager.h>
-#include <kdb/meta.h>
-#include <kfg/config.h>
-#include <insdc/insdc.h>
-#include <vdb/database.h>
-#include <vdb/vdb-priv.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-#include <align/refseq-mgr.h>
-#include <sysalloc.h>
-
-#include "refseq-mgr-priv.h"
-#include "reader-wgs.h"
-#include "debug.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-struct RefSeqMgr {
-    KConfig *kfg;
-    VDBManager const *vmgr;
-    RefSeq *mru;
-    RefSeq *lru;
-    RefSeq **refSeq;
-    size_t cache;
-    uint32_t reader_options;
-    unsigned num_open_max;
-    unsigned num_open;
-    unsigned nRefSeqs;
-    unsigned maxRefSeqs;
-};
-
-typedef struct RefSeq_VT RefSeq_VT;
-
-enum {
-    refSeqType_RefSeq = 1,
-    refSeqType_RefSeq_odd, /* for some weirdos, like hs37d5, that aren't accessioned */
-    refSeqType_WGS,
-    refSeqType_MAX
-};
-
-struct RefSeq_RefSeq {
-    TableReaderRefSeq const *reader;
-    char name[1];
-};
-
-struct RefSeq_WGS {
-    TableReaderWGS const *reader;
-    int64_t row;
-    unsigned prefixLen; /* e.g. AFNW01000001; common prefix is 'AFNW01' */
-    char name[1];
-};
-
-struct RefSeq {
-    RefSeq_VT const *vt;
-    RefSeqMgr const *mgr;
-    struct RefSeq *newer;
-    struct RefSeq *older;
-    union {
-        struct RefSeq_RefSeq refSeq;
-        struct RefSeq_WGS wgs;
-    } u;
-};
-
-struct RefSeq_VT {
-    RefSeq *(*init)(RefSeq *self, RefSeqMgr const *mgr, unsigned namelen, char const name[]);
-    char const *(*name)(RefSeq const *self);
-    bool (*isopen)(RefSeq const *self);
-    rc_t (*open)(RefSeq *self, RefSeqMgr const *mgr);
-    void (*close)(RefSeq *self);
-    rc_t (*setRow)(RefSeq *self, unsigned N, char const full[]);
-    rc_t (*read)(RefSeq const *self, INSDC_coord_zero offset,
-                 INSDC_coord_len len, uint8_t *buffer,
-                 INSDC_coord_len *written);
-    rc_t (*circular)(RefSeq const *self, bool *result);
-    rc_t (*length)(RefSeq const *self, INSDC_coord_len *result);
-    rc_t (*checksum)(RefSeq const *self, uint8_t const **result);
-    int (*compare)(RefSeq const *self, unsigned qlen, char const qry[]);
-};
-
-static RefSeq *RefSeq_RefSeq_init(RefSeq *self,
-                                   RefSeqMgr const *mgr,
-                                   unsigned namelen,
-                                   char const name[]);
-static char const *RefSeq_RefSeq_name(RefSeq const *self);
-static bool RefSeq_RefSeq_isopen(RefSeq const *self);
-static rc_t RefSeq_RefSeq_open(RefSeq *self, RefSeqMgr const *mgr);
-static rc_t RefSeq_RefSeq_odd_open(RefSeq *self, RefSeqMgr const *mgr);
-static void RefSeq_RefSeq_close(RefSeq *self);
-static rc_t RefSeq_RefSeq_setRow(RefSeq *self, unsigned N, char const name[]);
-static rc_t RefSeq_RefSeq_read(RefSeq const *self,
-                               INSDC_coord_zero offset,
-                               INSDC_coord_len len,
-                               uint8_t *buffer,
-                               INSDC_coord_len *written);
-static rc_t RefSeq_RefSeq_circular(RefSeq const *self,
-                                   bool *result);
-static rc_t RefSeq_RefSeq_length(RefSeq const *self,
-                                INSDC_coord_len *result);
-static rc_t RefSeq_RefSeq_checksum(RefSeq const *self,
-                                   uint8_t const **result);
-static int RefSeq_RefSeq_compare(RefSeq const *self, unsigned const qlen,
-                                 char const qry[]);
-
-static RefSeq_VT const RefSeq_RefSeq_VT = {
-    RefSeq_RefSeq_init,
-    RefSeq_RefSeq_name,
-    RefSeq_RefSeq_isopen,
-    RefSeq_RefSeq_open,
-    RefSeq_RefSeq_close,
-    RefSeq_RefSeq_setRow,
-    RefSeq_RefSeq_read,
-    RefSeq_RefSeq_circular,
-    RefSeq_RefSeq_length,
-    RefSeq_RefSeq_checksum,
-    RefSeq_RefSeq_compare
-};
-
-static RefSeq_VT const RefSeq_RefSeq_odd_VT = {
-    RefSeq_RefSeq_init,
-    RefSeq_RefSeq_name,
-    RefSeq_RefSeq_isopen,
-    RefSeq_RefSeq_odd_open,
-    RefSeq_RefSeq_close,
-    RefSeq_RefSeq_setRow,
-    RefSeq_RefSeq_read,
-    RefSeq_RefSeq_circular,
-    RefSeq_RefSeq_length,
-    RefSeq_RefSeq_checksum,
-    RefSeq_RefSeq_compare
-};
-
-static RefSeq *RefSeq_WGS_init(RefSeq *self,
-                                RefSeqMgr const *mgr,
-                                unsigned const namelen,
-                                char const name[]);
-static char const *RefSeq_WGS_name(RefSeq const *self);
-static bool RefSeq_WGS_isopen(RefSeq const *self);
-static rc_t RefSeq_WGS_open(RefSeq *self, RefSeqMgr const *mgr);
-static void RefSeq_WGS_close(RefSeq *self);
-static rc_t RefSeq_WGS_setRow(RefSeq *self, unsigned N, char const name[]);
-static rc_t RefSeq_WGS_read(RefSeq const *const self,
-                            INSDC_coord_zero const offset,
-                            INSDC_coord_len const len,
-                            uint8_t *const buffer,
-                            INSDC_coord_len *const written);
-static rc_t RefSeq_WGS_circular(RefSeq const *const self,
-                                bool *const result);
-static rc_t RefSeq_WGS_length(RefSeq const *const self,
-                              INSDC_coord_len *const result);
-static rc_t RefSeq_WGS_checksum(RefSeq const *const self,
-                                uint8_t const **const result);
-static int RefSeq_WGS_compare(RefSeq const *self, unsigned const qlen,
-                              char const qry[]);
-
-
-static RefSeq_VT const RefSeq_WGS_VT = {
-    RefSeq_WGS_init,
-    RefSeq_WGS_name,
-    RefSeq_WGS_isopen,
-    RefSeq_WGS_open,
-    RefSeq_WGS_close,
-    RefSeq_WGS_setRow,
-    RefSeq_WGS_read,
-    RefSeq_WGS_circular,
-    RefSeq_WGS_length,
-    RefSeq_WGS_checksum,
-    RefSeq_WGS_compare
-};
-
-static RefSeq *RefSeq_RefSeq_alloc(unsigned const namelen)
-{
-    RefSeq *const self = calloc(1, sizeof(RefSeq) + namelen);
-    if (self)
-        self->vt = &RefSeq_RefSeq_VT;
-    return self;
-}
-
-static RefSeq *RefSeq_RefSeq_odd_alloc(unsigned const namelen)
-{
-    RefSeq *const self = RefSeq_RefSeq_alloc(namelen);
-    if (self)
-        self->vt = &RefSeq_RefSeq_odd_VT;
-    return self;
-}
-
-static RefSeq *RefSeq_WGS_alloc(unsigned const namelen)
-{
-    RefSeq *const self = calloc(1, sizeof(RefSeq) + namelen);
-    if (self)
-        self->vt = &RefSeq_WGS_VT;
-    return self;
-}
-
-static RefSeq *RefSeq_RefSeq_init(RefSeq *const super,
-                                   RefSeqMgr const *const mgr,
-                                   unsigned const namelen,
-                                   char const name[])
-{
-    struct RefSeq_RefSeq *const self = &super->u.refSeq;
-    
-    memcpy(self->name, name, namelen);
-    self->name[namelen] = '\0';
-    super->mgr = mgr;
-    
-    return super;
-}
-
-static RefSeq *RefSeq_WGS_init(RefSeq *const super,
-                                RefSeqMgr const *const mgr,
-                                unsigned const namelen,
-                                char const name[])
-{
-    struct RefSeq_WGS *const self = &super->u.wgs;
-    unsigned prefixLen = 0;
-    unsigned digits = 0;
-    
-    while (prefixLen < namelen && digits < 2) {
-        int const ch = name[prefixLen];
-        if (isdigit(ch))
-            ++digits;
-        else
-            digits = 0;
-        ++prefixLen;
-    }
-    assert(digits == 2);
-    assert(prefixLen > 0);
-    assert(prefixLen < namelen);
-
-    memcpy(self->name, name, namelen);
-    self->name[prefixLen] = '\0';
-    self->prefixLen = prefixLen;
-    super->mgr = mgr;
-
-    return super;
-}
-
-static char const *RefSeq_RefSeq_name(RefSeq const *super)
-{
-    return super->u.refSeq.name;
-}
-
-static char const *RefSeq_WGS_name(RefSeq const *super)
-{
-    return super->u.wgs.name;
-}
-
-static bool RefSeq_RefSeq_isopen(RefSeq const *const super)
-{
-    return (super->u.refSeq.reader == NULL) ? false : true;
-}
-
-static bool RefSeq_WGS_isopen(RefSeq const *const super)
-{
-    return (super->u.wgs.reader == NULL) ? false : true;
-}
-
-static void RefSeq_RefSeq_close(RefSeq *const super)
-{
-    TableReaderRefSeq const *const reader = super->u.refSeq.reader;
-    
-    super->u.refSeq.reader = NULL;
-    TableReaderRefSeq_Whack(reader);
-}
-
-static void RefSeq_WGS_close(RefSeq *const super)
-{
-    TableReaderWGS const *const reader = super->u.wgs.reader;
-    
-    super->u.wgs.reader = NULL;
-    TableReaderWGS_Whack(reader);
-}
-
-static rc_t RefSeq_RefSeq_setRow(RefSeq *const super,
-                                 unsigned const N, char const name[])
-{
-    return 0;
-}
-
-static rc_t RefSeq_WGS_setRow(RefSeq *const super,
-                              unsigned const N, char const name[])
-{
-    struct RefSeq_WGS *const self = &super->u.wgs;
-    unsigned i;
-    int64_t row = 0;
-
-    assert(strncmp(name, self->name, self->prefixLen) == 0);
-    for (i = self->prefixLen; i < N; ++i) {
-        int const ch = name[i];
-        
-        if (isdigit(ch))
-            row = (row * 10) + (ch - '0');
-        else if (ch == '.')
-            break;
-        else {
-            row = 0;
-            break;
-        }
-    }
-    if (row) {
-        self->row = row;
-        return 0;
-    }
-    return RC(rcAlign, rcTable, rcAccessing, rcRow, rcInvalid);
-}
-
-static rc_t RefSeq_RefSeq_read(RefSeq const *const super,
-                               INSDC_coord_zero const offset,
-                               INSDC_coord_len const length,
-                               uint8_t *const buffer,
-                               INSDC_coord_len *const written)
-{
-    return TableReaderRefSeq_Read(super->u.refSeq.reader, offset, length, buffer, written);
-}
-
-static rc_t RefSeq_WGS_read(RefSeq const *const super,
-                            INSDC_coord_zero const offset,
-                            INSDC_coord_len const length,
-                            uint8_t *const buffer,
-                            INSDC_coord_len *const written)
-{
-    return TableReaderWGS_Read(super->u.wgs.reader, super->u.wgs.row, offset, length, buffer, written);
-}
-
-static rc_t RefSeq_RefSeq_circular(RefSeq const *const super, bool *const result)
-{
-    return TableReaderRefSeq_Circular(super->u.refSeq.reader, result);
-}
-
-static rc_t RefSeq_WGS_circular(RefSeq const *const super, bool *const result)
-{
-    return TableReaderWGS_Circular(super->u.wgs.reader, super->u.wgs.row, result);
-}
-
-static rc_t RefSeq_RefSeq_length(RefSeq const *const super, INSDC_coord_len *const result)
-{
-    return TableReaderRefSeq_SeqLength(super->u.refSeq.reader, result);
-}
-
-static rc_t RefSeq_WGS_length(RefSeq const *const super, INSDC_coord_len *const result)
-{
-    return TableReaderWGS_SeqLength(super->u.wgs.reader, super->u.wgs.row, result);
-}
-
-static rc_t RefSeq_RefSeq_checksum(RefSeq const *const super, uint8_t const **const result)
-{
-    return TableReaderRefSeq_MD5(super->u.refSeq.reader, result);
-}
-
-static rc_t RefSeq_WGS_checksum(RefSeq const *const super, uint8_t const **const result)
-{
-    return TableReaderWGS_MD5(super->u.wgs.reader, super->u.wgs.row, result);
-}
-
-static int RefSeq_RefSeq_compare(RefSeq const *super,
-                                 unsigned const qlen, char const qry[])
-{
-    char const *const fnd = super->u.refSeq.name;
-    unsigned i;
-    
-    for (i = 0; ; ++i) {
-        int const a = i == qlen ? '\0' : qry[i];
-        int const b = fnd[i];
-        
-        if (a < b)
-            return -1;
-        
-        if (b < a)
-            return 1;
-        
-        if (a == 0)
-            break;
-    }
-    return 0;
-}
-
-static int RefSeq_WGS_compare(RefSeq const *super, unsigned const qlen, char const qry[])
-{
-    struct RefSeq_WGS const *const self = &super->u.wgs;
-    char const *const fnd = self->name;
-    unsigned const prefixLen = self->prefixLen;
-    unsigned i;
-
-    for (i = 0; i < prefixLen && i < qlen; ++i) {
-        int const a = qry[i];
-        int const b = fnd[i];
-        int const diff = a - b;
-
-        if (diff != 0)
-            return diff;
-    }
-    return i == prefixLen ? 0 : qry[i];
-}
-
-static unsigned FindAccession(unsigned const N,
-                              RefSeq const * const *const refSeq,
-                              unsigned const qlen, char const qry[],
-                              bool *matched)
-{
-    unsigned f = 0;
-    unsigned e = N;
-    
-    while (f < e) {
-        unsigned const m = f + ((e - f) >> 1);
-        int const diff = refSeq[m]->vt->compare(refSeq[m], qlen, qry);
-
-        if (diff == 0) {
-            *matched = true;
-            return m;
-        }
-        if (diff < 0)
-            e = m;
-        else
-            f = m + 1;
-    }
-    *matched = false;
-    return f;
-}
-
-static rc_t get_schema_info(KMetadata const *const meta,
-                            unsigned const bsz, char buffer[])
-{
-    KMDataNode const *node;
-    rc_t rc = KMetadataOpenNodeRead(meta, &node, "schema");
-    
-    if (rc == 0) {
-        size_t sz;
-        
-        rc = KMDataNodeReadAttr(node, "name", buffer, bsz - 1, &sz);
-        KMDataNodeRelease(node);
-        if (rc == 0) {
-            buffer[sz] = '\0';
-            while (sz) {
-                --sz;
-                if (buffer[sz] == '#') {
-                    buffer[sz] = '\0';
-                    break;
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-static rc_t get_tbl_schema_info(VTable const *const tbl,
-                                unsigned const bsz, char buffer[])
-{
-    KMetadata const *meta;
-    rc_t rc = VTableOpenMetadataRead(tbl, &meta);
-    
-    buffer[0] = '\0';
-    if (rc == 0) rc = get_schema_info(meta, bsz, buffer);
-    KMetadataRelease(meta);
-    return rc;
-}
-
-static rc_t get_db_schema_info(VDatabase const *db,
-                               unsigned const bsz, char buffer[])
-{
-    KMetadata const *meta;
-    rc_t rc = VDatabaseOpenMetadataRead(db, &meta);
-    
-    buffer[0] = '\0';
-    if (rc == 0) rc = get_schema_info(meta, bsz, buffer);
-    KMetadataRelease(meta);
-    return rc;
-}
-
-static rc_t RefSeq_RefSeq_open(RefSeq *const super, RefSeqMgr const *const mgr)
-{
-    struct RefSeq_RefSeq *const self = &super->u.refSeq;
-    VTable const *tbl;
-    rc_t rc = VDBManagerOpenTableRead(mgr->vmgr, &tbl, NULL, self->name);
-    
-    if (tbl) {
-        char scheme[1024];
-        
-        get_tbl_schema_info(tbl, sizeof(scheme), scheme);
-        if (strcmp(scheme, "NCBI:refseq:tbl:reference") == 0) {
-            rc = TableReaderRefSeq_MakeTable(&self->reader, mgr->vmgr, tbl,
-                                             mgr->reader_options, mgr->cache);
-        }
-        else {
-            rc = RC(rcAlign, rcTable, rcOpening, rcType, rcInvalid);
-        }
-        VTableRelease(tbl);
-    }
-    return rc;
-}
-
-static rc_t RefSeq_RefSeq_odd_open(RefSeq *const super, RefSeqMgr const *const mgr)
-{
-    struct RefSeq_RefSeq *const self = &super->u.refSeq;
-    VTable const *tbl;
-    rc_t rc = VDBManagerOpenTableRead(mgr->vmgr, &tbl, NULL, "ncbi-acc:%s?vdb-ctx=refseq", self->name);
-    
-    if (tbl) {
-        char scheme[1024];
-        
-        get_tbl_schema_info(tbl, sizeof(scheme), scheme);
-        if (strcmp(scheme, "NCBI:refseq:tbl:reference") == 0) {
-            rc = TableReaderRefSeq_MakeTable(&self->reader, mgr->vmgr, tbl,
-                                             mgr->reader_options, mgr->cache);
-        }
-        else {
-            rc = RC(rcAlign, rcTable, rcOpening, rcType, rcInvalid);
-        }
-        VTableRelease(tbl);
-    }
-    return rc;
-}
-
-static rc_t RefSeq_WGS_open(RefSeq *const super, RefSeqMgr const *const mgr)
-{
-    struct RefSeq_WGS *const self = &super->u.wgs;
-    VDatabase const *db;
-    rc_t rc = VDBManagerOpenDBRead(mgr->vmgr, &db, NULL, self->name);
-
-    if (db) {
-        char scheme[1024];
-        
-        get_db_schema_info(db, sizeof(scheme), scheme);
-        if (strcmp(scheme, "NCBI:WGS:db:contig") == 0) {
-            VTable const *tbl;
-            
-            rc = VDatabaseOpenTableRead(db, &tbl, "SEQUENCE");
-            if (tbl) {
-                rc = TableReaderWGS_MakeTable(&self->reader, mgr->vmgr, tbl,
-                                                 mgr->reader_options, mgr->cache);
-                VTableRelease(tbl);
-            }
-        }
-        else {
-            rc = RC(rcAlign, rcTable, rcOpening, rcType, rcInvalid);
-        }
-        VDatabaseRelease(db);
-    }
-    return rc;
-}
-
-static int AccessionType(VDBManager const *const mgr,
-                         unsigned const N, char const accession[],
-                         rc_t *const rc)
-{
-    char scheme[1024];
-    bool isOdd = false;
-
-    scheme[0] = '\0';
-    {
-        KMetadata const *meta = NULL;
-        {
-            VDatabase const *db = NULL;
-
-            *rc = VDBManagerOpenDBRead(mgr, &db, NULL, "%.*s", (int)N, accession);
-            if (db) {
-                *rc = VDatabaseOpenMetadataRead(db, &meta);
-                VDatabaseRelease(db);
-            }
-            else {
-                VTable const *tbl = NULL;
-
-                *rc = VDBManagerOpenTableRead(mgr, &tbl, NULL, "%.*s", (int)N, accession);
-                if (tbl) {
-                    *rc = VTableOpenMetadataRead(tbl, &meta);
-                    VTableRelease(tbl);
-                }
-                else {
-                    isOdd = true;
-                    *rc = VDBManagerOpenTableRead(mgr, &tbl, NULL, "ncbi-acc:%.*s?vdb-ctx=refseq", (int)N, accession);
-                    if (tbl) {
-                        *rc = VTableOpenMetadataRead(tbl, &meta);
-                        VTableRelease(tbl);
-                    }
-                }
-            }
-        }
-        if (meta) {
-            KMDataNode const *node = NULL;
-
-            *rc = KMetadataOpenNodeRead(meta, &node, "schema");
-            KMetadataRelease(meta);
-            if (node) {
-                size_t sz = 0;
-
-                *rc = KMDataNodeReadAttr(node, "name", scheme, sizeof(scheme) - 1, &sz);
-                KMDataNodeRelease(node);
-                scheme[sz] = '\0';
-                while (sz) {
-                    --sz;
-                    if (scheme[sz] == '#') {
-                        scheme[sz] = '\0';
-                        break;
-                    }
-                }
-            }
-        }
-    }
-    if (strcmp(scheme, "NCBI:WGS:db:contig") == 0)
-        return refSeqType_WGS;
-    if (strcmp(scheme, "NCBI:refseq:tbl:reference") == 0)
-        return isOdd ? refSeqType_RefSeq_odd : refSeqType_RefSeq;
-    return 0;
-}
-
-static void WhackAllReaders(RefSeqMgr *const mgr);
-
-LIB_EXPORT rc_t CC RefSeqMgr_SetCache(RefSeqMgr const *const cself, size_t cache, uint32_t keep_open_num)
-{
-    if (cself) {
-        RefSeqMgr *const self = (RefSeqMgr *)cself;
-        
-        WhackAllReaders(self);
-        assert(self->num_open == 0);
-        self->cache = cache;
-        self->num_open_max = keep_open_num;
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC RefSeqMgr_Make( const RefSeqMgr** cself, const VDBManager* vmgr,
-                                   uint32_t reader_options, size_t cache, uint32_t keep_open_num )
-{
-    rc_t rc = 0;
-    RefSeqMgr* obj = NULL;
-    
-    if ( cself == NULL || vmgr == NULL )
-    {
-        rc = RC( rcAlign, rcIndex, rcConstructing, rcParam, rcNull );
-    }
-    else
-    {
-        obj = calloc( 1, sizeof( *obj ) );
-        if ( obj == NULL )
-        {
-            rc = RC( rcAlign, rcIndex, rcConstructing, rcMemory, rcExhausted );
-        }
-        else
-        {
-            rc = KConfigMake( &obj->kfg, NULL );
-            if ( rc == 0 )
-            {
-                rc = VDBManagerAddRef( vmgr );
-                if ( rc == 0 )
-                {
-                    obj->vmgr = vmgr;
-                    obj->cache = cache;
-                    obj->num_open_max = keep_open_num;
-                    obj->reader_options = reader_options;
-                }
-            }
-        }
-    }
-
-    if ( rc == 0 )
-    {
-        *cself = obj;
-/*        ALIGN_DBG( "max_open: %u", obj->num_open_max ); */
-    }
-    else
-    {
-        RefSeqMgr_Release( obj );
-        ALIGN_DBGERR( rc );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC RefSeqMgr_Release(const RefSeqMgr* cself)
-{
-    if( cself != NULL ) {
-        RefSeqMgr* self = (RefSeqMgr*)cself;
-        unsigned i;
-
-        WhackAllReaders(self);
-        for (i = 0; i < self->nRefSeqs; ++i)
-            free(self->refSeq[i]);
-        free(self->refSeq);
-        VDBManagerRelease(self->vmgr);
-        KConfigRelease(self->kfg);
-        free(self);
-    }
-    return 0;
-}
-
-static rc_t NewRefSeq(RefSeqMgr *const self,
-                                int const type,
-                                unsigned const at,
-                                unsigned const N,
-                                char const accession[])
-{
-    if (self->nRefSeqs + 1 > self->maxRefSeqs) {
-        unsigned const maxRefSeqs = (self->maxRefSeqs == 0) ? 32 : (self->maxRefSeqs << 1);
-        void *tmp = realloc(self->refSeq, maxRefSeqs * sizeof(self->refSeq[0]));
-        
-        if (tmp == NULL)
-            return RC(rcAlign, rcTable, rcAccessing, rcMemory, rcExhausted);
-        
-        self->maxRefSeqs = maxRefSeqs;
-        self->refSeq = tmp;
-    }
-    ALIGN_CF_DBG("Inserting '%.*s' at %u", N, accession, at);
-    memmove(&self->refSeq[at + 1], &self->refSeq[at], sizeof(self->refSeq[0]) * (self->nRefSeqs - at));
-    ++self->nRefSeqs;
-    {
-        RefSeq *rs = NULL;
-    
-        switch (type) {
-        case refSeqType_RefSeq:
-            rs = RefSeq_RefSeq_alloc(N);
-            break;
-        case refSeqType_RefSeq_odd:
-            rs = RefSeq_RefSeq_odd_alloc(N);
-            break;
-        case refSeqType_WGS:
-            rs = RefSeq_WGS_alloc(N);
-            break;
-        default:
-            assert("unknown type of RefSeq object");
-            break;
-        }
-        self->refSeq[at] = rs;
-    
-        if (rs == NULL)
-            return RC(rcAlign, rcTable, rcAccessing, rcMemory, rcExhausted);
-
-        rs->vt->init(rs, self, N, accession);
-    }
-    return 0;
-}
-
-static rc_t exists(RefSeqMgr *const self, unsigned const N, char const accession[])
-{
-    rc_t rc = 0;
-    bool matched = false;
-    unsigned const at = FindAccession(self->nRefSeqs,
-                                      (RefSeq const **)self->refSeq,
-                                      N, accession, &matched);
-    if (matched)
-        return 0;
-    {
-        int const type = AccessionType(self->vmgr, N, accession, &rc);
-        if (type)
-            rc = 0;
-        else if (rc == 0)
-            rc = RC(rcAlign, rcTable, rcAccessing, rcType, rcUnexpected);
-        if (rc == 0)
-            rc = NewRefSeq(self, type, at, N, accession);
-        else {
-            ALIGN_CF_DBG("failed to open %.*s", N, accession);
-            ALIGN_DBGERR(rc);
-        }
-    }    
-    return rc;
-}
-
-static void MakeNewest(RefSeqMgr *const self, RefSeq *const rs)
-{
-    if (self->mru == rs) /* is already newest */
-        return;
-
-    {   /* unlink rs from list */
-        RefSeq *const older = rs->older;
-        RefSeq *const newer = rs->newer;
-
-        if (older) older->newer = newer;
-        if (newer) newer->older = older;
-    }
-    /* make rs be head of list */
-    {
-        RefSeq *const prev = self->mru;
-
-        if (prev) prev->newer = rs;
-        rs->older = prev;
-        rs->newer = NULL;
-    }
-    self->mru = rs;
-    if (self->lru == NULL)
-        self->lru = rs;
-}
-
-static rc_t GetSeq(RefSeqMgr *const self, RefSeq **result,
-                               unsigned const N, char const accession[])
-{
-    rc_t rc = 0;
-    bool matched = false;
-    unsigned const at = FindAccession(self->nRefSeqs,
-                                      (RefSeq const **)self->refSeq,
-                                      N, accession, &matched);
-    
-    if (!matched) {
-        int const type = AccessionType(self->vmgr, N, accession, &rc);
-        if (type)
-            rc = 0;
-        else if (rc == 0)
-            rc = RC(rcAlign, rcTable, rcAccessing, rcType, rcUnexpected);
-        if (rc == 0)
-            rc = NewRefSeq(self, type, at, N, accession);
-        else {
-            ALIGN_CF_DBG("failed to open %.*s", N, accession);
-            ALIGN_DBGERR(rc);
-        }
-    }
-    if (rc)
-        return rc;
-    {
-        RefSeq *const fnd = self->refSeq[at];
-
-        *result = fnd;
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t RefSeqMgr_Exists(const RefSeqMgr* cself, const char* accession, uint32_t accession_sz, char** path)
-{
-    if (cself == NULL || accession == NULL || accession_sz == 0) {
-        return RC(rcAlign, rcIndex, rcAccessing, rcParam, rcNull);
-    }
-    else {
-        return exists((RefSeqMgr *)cself, accession_sz, accession);
-    }
-}
-
-LIB_EXPORT rc_t CC RefSeqMgr_Read(const RefSeqMgr* cself, const char* seq_id, uint32_t seq_id_sz,
-                                  INSDC_coord_zero offset, INSDC_coord_len len,
-                                  uint8_t* buffer, INSDC_coord_len* written)
-{
-    RefSeq const *obj;
-    rc_t rc = 0;
-
-    if( (rc = RefSeqMgr_GetSeq(cself, &obj, seq_id, seq_id_sz)) == 0 ) {
-        rc = RefSeq_Read(obj, offset, len, buffer, written);
-        RefSeq_Release(obj);
-    }
-    return rc;
-}
-
-static void WhackAllReaders(RefSeqMgr *const self)
-{
-    unsigned i;
-    
-    for (i = 0; i < self->nRefSeqs; ++i) {
-        RefSeq *const rs = self->refSeq[i];
-
-        if (rs->vt->isopen(rs)) {
-            ALIGN_CF_DBG("closing %s", rs->vt->name(rs));
-            rs->vt->close(rs);
-            --self->num_open;
-        }
-        rs->newer = rs->older = NULL;
-    }
-    self->mru = self->lru = NULL;
-}
-
-static rc_t GetReader(RefSeqMgr *const self, RefSeq *const obj)
-{
-    if (obj->vt->isopen(obj))
-        return 0;
-    {
-        unsigned const max_open = self->num_open_max;
-
-        while (max_open > 0 && self->num_open >= max_open) {
-            RefSeq *const lru = self->lru;
-
-            assert(lru);
-            ALIGN_CF_DBG("closing %s", lru->vt->name(lru));
-            self->lru = lru->newer;
-            --self->num_open;
-            lru->vt->close(lru);
-            lru->newer = lru->older = NULL;
-        }
-    }
-    {
-        rc_t const rc = obj->vt->open(obj, self);
-
-        if (rc) return rc;
-    }
-    MakeNewest(self, obj);
-    ++self->num_open;
-    ALIGN_CF_DBG("opened %s", obj->vt->name(obj));
-
-    return 0;
-}
-
-static rc_t GetSeqInternal(RefSeqMgr *const self,
-                              RefSeq const **const result,
-                              unsigned const seq_id_sz,
-                              char const seq_id[])
-{
-    RefSeq *obj = NULL;
-    
-    if (self->mru == NULL || self->mru->vt->compare(self->mru, seq_id_sz, seq_id) != 0) {
-        rc_t const rc = GetSeq(self, &obj, seq_id_sz, seq_id);
-        if (rc)
-            return rc;
-    }
-    else
-        obj = self->mru;
-    {
-        rc_t const rc = GetReader(self, obj);
-        if (rc)
-            return rc;
-    }
-    obj->vt->setRow(obj, seq_id_sz, seq_id);
-    *result = obj;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC RefSeqMgr_GetSeq(RefSeqMgr const *const cmgr,
-                                    RefSeq const **result,
-                                    char const *seq_id,
-                                    uint32_t seq_id_sz)
-{
-    rc_t rc;
-
-    if (cmgr == NULL || result == NULL || seq_id == NULL)
-        rc = RC(rcAlign, rcIndex, rcConstructing, rcParam, rcNull);
-    else
-        rc = GetSeqInternal((RefSeqMgr *)cmgr, result, seq_id_sz, seq_id);
-
-    if (rc)
-        ALIGN_DBGERRP("SEQ_ID: '%.*s'", rc, seq_id_sz, seq_id);
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC RefSeq_Read(const RefSeq* cself, INSDC_coord_zero offset, INSDC_coord_len len,
-                               uint8_t* buffer, INSDC_coord_len* written)
-{
-    rc_t rc = 0;
-
-    if (cself == NULL || buffer == NULL || written == NULL)
-        rc = RC(rcAlign, rcFile, rcReading, rcParam, rcNull);
-    else {
-        RefSeq *const self = (RefSeq *)cself;
-        RefSeqMgr *const mgr = (RefSeqMgr *)self->mgr;
-        
-        rc = GetReader(mgr, self);
-        if (rc == 0)
-            rc = self->vt->read(self, offset, len, buffer, written);
-    }
-    ALIGN_DBGERR(rc);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC RefSeq_Circular(const RefSeq* cself, bool* circular)
-{
-    rc_t rc = 0;
-
-    if (cself == NULL)
-        rc = RC(rcAlign, rcFile, rcReading, rcParam, rcNull);
-    else {
-        RefSeq const *const self = (RefSeq *)cself;
-        
-        rc = self->vt->circular(self, circular);
-    }
-    ALIGN_DBGERR(rc);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC RefSeq_SeqLength(const RefSeq* cself, INSDC_coord_len* len)
-{
-    rc_t rc = 0;
-
-    if (cself == NULL)
-        rc = RC(rcAlign, rcFile, rcReading, rcParam, rcNull);
-    else {
-        RefSeq const *const self = (RefSeq *)cself;
-        
-        rc = self->vt->length(self, len);
-    }
-    ALIGN_DBGERR(rc);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC RefSeq_MD5(const RefSeq* cself, const uint8_t** md5)
-{
-    rc_t rc = 0;
-
-    if (cself == NULL)
-        rc = RC(rcAlign, rcFile, rcReading, rcParam, rcNull);
-    else {
-        RefSeq const *const self = (RefSeq *)cself;
-        
-        rc = self->vt->checksum(self, md5);
-    }
-    ALIGN_DBGERR(rc);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC RefSeq_Name(const RefSeq* cself, const char** name)
-{
-    rc_t rc = 0;
-    
-    if (cself == NULL)
-        rc = RC(rcAlign, rcFile, rcReading, rcParam, rcNull);
-    else {
-        RefSeq const *const self = (RefSeq *)cself;
-        
-        *name = self->vt->name(self);
-    }
-    ALIGN_DBGERR(rc);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC RefSeq_Release(const RefSeq* cself)
-{
-    return 0;
-}
-
-static
-rc_t RefSeqMgr_ConfigValue ( const KConfig *kfg, const char *node_path, char *value, size_t value_size )
-{
-    const KConfigNode *node;
-    rc_t rc = KConfigOpenNodeRead ( kfg, & node, "%s", node_path );
-    if ( rc == 0 )
-    {
-        size_t num_read, remaining;
-        rc = KConfigNodeRead ( node, 0, value, value_size - 1, & num_read,  & remaining );
-        if ( rc == 0 )
-        {
-            if ( remaining != 0 )
-                rc = RC ( rcSRA, rcMgr, rcConstructing, rcString, rcExcessive );
-            else
-                value [ num_read ] = 0;
-        }
-        
-        KConfigNodeRelease ( node );
-    }
-    return rc;
-}
-
-static
-rc_t RefSeqMgr_KfgReadRepositories(const KConfig* kfg, char* paths, size_t paths_sz)
-{
-    /* servers are children of refseq/repository, e.g.:             /refseq/repository/main="..." */
-    /* volumes are in refseq/repository/<serverName>/volumes, e.g.: /refseq/repository/main/volumes="..." */
-    /* all server/volume combinations are returned in paths separated by ':' */
-    
-    rc_t rc = 0;
-    const KConfigNode *node;
-#define KFG_PATH "/refseq/repository/"
-    paths[0] = 0;
-    
-    rc = KConfigOpenNodeRead ( kfg, & node, KFG_PATH );
-    if ( rc == 0 )
-    {
-        KNamelist* children;
-        rc = KConfigNodeListChild ( node, &children );
-        if ( rc == 0 )
-        {
-            uint32_t count;
-            rc = KNamelistCount ( children, &count );
-            if ( rc == 0 )
-            {
-                uint32_t i;
-                for (i = 0; i < count; ++i) /* for all servers */
-                {
-                    const char* name;
-                    rc = KNamelistGet ( children, i, &name );
-                    if ( rc == 0 )
-                    {
-#define BufSize 4096
-                        char server[ BufSize ];
-                        char buf[ BufSize ];
-                        size_t num_writ;
-                        
-                        rc = string_printf(buf, BufSize, &num_writ, KFG_PATH "%s", name);
-                        if (rc == 0)
-                        {
-                            rc = RefSeqMgr_ConfigValue ( kfg, buf, server, sizeof(server) );
-                            if (rc == 0)
-                            {
-                                rc = string_printf(buf, BufSize, &num_writ, KFG_PATH "%s/volumes", name);
-                                if (rc == 0)
-                                {
-                                    char volumes[ BufSize ];
-                                    rc = RefSeqMgr_ConfigValue ( kfg, buf, volumes, sizeof(volumes) );
-                                    if (rc == 0)
-                                    {   /* create a server/volume pair for every combination, append to paths, ':' - separate */
-                                        char *vol_rem = volumes;
-                                        char *vol_sep;
-                                        
-                                        do {
-                                            char const *volume = vol_rem;
-                                            vol_sep = string_chr(volume, string_size(volume), ':');
-                                            if(vol_sep) {
-                                                vol_rem = vol_sep + 1;
-                                                *vol_sep = 0;
-                                            }
-                                            string_copy(paths + string_size(paths), paths_sz - string_size(paths), server, string_size(server));
-                                            if (paths[string_size(paths)-1] != '/')
-                                            {
-                                                string_copy(paths + string_size(paths), paths_sz - string_size(paths), "/", 1);
-                                            }
-                                            string_copy(paths + string_size(paths), paths_sz - string_size(paths), volume, string_size(volume));
-                                            string_copy(paths + string_size(paths), paths_sz - string_size(paths), ":", 1);
-                                        } while(vol_sep);
-                                    }
-                                }
-                            }
-                        }
-#undef BufSize
-                    }
-                    if ( rc != 0 )
-                    {
-                        break;
-                    }
-                }
-            }
-            KNamelistRelease ( children );
-        }
-        
-        KConfigNodeRelease ( node );
-    }
-    if (GetRCState(rc) == rcNotFound)
-    {
-        paths[0] = '\0';
-        return 0;
-    }
-    return 0;
-}
-
-static
-rc_t RefSeqMgr_KfgReadStr(const KConfig* kfg, const char* path, char* value, size_t value_sz)
-{
-    rc_t rc = 0;
-    const KConfigNode *node;
-    
-    if ( (rc = KConfigOpenNodeRead(kfg, &node, "%s", path)) == 0 ) {
-        size_t num_read, remaining;
-        if( (rc = KConfigNodeRead(node, 0, value, value_sz - 1, &num_read, &remaining)) == 0 ) {
-            if( remaining != 0 ) {
-                rc = RC(rcAlign, rcIndex, rcConstructing, rcString, rcTooLong);
-            } else {
-                value[num_read] = '\0';
-            }
-        }
-        KConfigNodeRelease(node);
-    } else if( GetRCState(rc) == rcNotFound ) {
-        rc = 0;
-        value[0] = '\0';
-    }
-    return rc;
-}
-
-rc_t RefSeqMgr_ForEachVolume(const RefSeqMgr* cself, RefSeqMgr_ForEachVolume_callback cb, void *data)
-{
-    rc_t rc = 0;
-    char servers[4096];
-    char volumes[4096];
-    
-    if( cself == NULL || cb == NULL ) {
-        rc = RC(rcAlign, rcType, rcConstructing, rcParam, rcNull);
-    } else if( cb(".", NULL, data) ) {
-        /* found in local dir */
-    } else if( (rc = RefSeqMgr_KfgReadStr(cself->kfg, "refseq/paths", servers, sizeof(servers))) != 0 ) {
-        ALIGN_DBGERRP("%s", rc, "RefSeqMgr_KfgReadStr(paths)");
-    } else {
-        bool found = false;
-        if( servers[0] != '\0' ) {
-            char *srv_sep;
-            char *srv_rem = servers;
-            do {
-                char const* server = srv_rem;
-                
-                srv_sep = strchr(server, ':');
-                if(srv_sep) {
-                    srv_rem = srv_sep + 1;
-                    *srv_sep = 0;
-                }
-                if( cb(server, NULL, data) ) {
-                    found = true;
-                    break;
-                }
-            } while(srv_sep);
-        }
-        if( !found ) {
-            /* locate refseq servers/volumes in possibly multiple repositories */
-            if( (rc = RefSeqMgr_KfgReadRepositories(cself->kfg, servers, sizeof(servers))) != 0 ) {
-                ALIGN_DBGERRP("%s", rc, "RefSeqMgr_KfgReadStr(refseq/repository/*)");
-            };
-            if( servers[0] != '\0' ) {
-                char *srv_sep;
-                char *srv_rem = servers;
-                do {
-                    char const* server = srv_rem;
-                    
-                    srv_sep = strchr(server, ':');
-                    if(srv_sep) {
-                        srv_rem = srv_sep + 1;
-                        *srv_sep = 0;
-                    }
-                    if( cb(server, NULL, data) ) {
-                        found = true;
-                        break;
-                    }
-                } while(srv_sep);
-            }
-        }
-        if( !found ) {
-            if ( (rc = RefSeqMgr_KfgReadStr(cself->kfg, "refseq/servers", servers, sizeof(servers))) != 0 ||
-                (rc = RefSeqMgr_KfgReadStr(cself->kfg, "refseq/volumes", volumes, sizeof(volumes))) != 0 ) {
-                ALIGN_DBGERRP("%s", rc, "RefSeqMgr_KfgReadStr(servers/volumes)");
-            }
-            /* servers and volumes are deprecated and optional */
-            if( rc == 0 && (servers[0] != '\0' || volumes[0] != '\0') ) {
-                char *srv_sep;
-                char *srv_rem = servers;
-                do {
-                    char vol[ 4096 ];
-                    char const *server = srv_rem;
-                    char *vol_rem = vol;
-                    char *vol_sep;
-                    
-                    string_copy ( vol, sizeof vol, volumes, string_size( volumes ) );
-                    srv_sep = strchr(server, ':');
-                    if(srv_sep) {
-                        srv_rem = srv_sep + 1;
-                        *srv_sep = 0;
-                    }
-                    do {
-                        char const *volume = vol_rem;
-                        
-                        vol_sep = strchr(volume, ':');
-                        if(vol_sep) {
-                            vol_rem = vol_sep + 1;
-                            *vol_sep = 0;
-                        }
-                        found = cb(server, volume, data);
-                    } while(!found && vol_sep);
-                } while(!found && srv_sep);
-            }
-        }
-    }
-    return rc;
-}
diff --git a/libs/align/writer-alignment.c b/libs/align/writer-alignment.c
deleted file mode 100644
index 3ce67c6..0000000
--- a/libs/align/writer-alignment.c
+++ /dev/null
@@ -1,440 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <align/extern.h>
-
-#include <klib/rc.h>
-#include <insdc/insdc.h>
-#include <vdb/database.h>
-#include <vdb/cursor.h>
-#include <align/writer-alignment.h>
-#include "writer-priv.h"
-#include "reader-cmn.h"
-#include "debug.h"
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <ctype.h>
-#include <assert.h>
-
-static const TableWriterColumn TableWriterAlgn_cols[ewalgn_cn_Last] =
-{
-    /* order is important, see enum in .h !!! */
-    {0, "TMP_KEY_ID", sizeof(uint64_t) * 8, ewcol_Temporary | ewcol_Ignore},
-    {0, "PLOIDY", sizeof(uint32_t) * 8, ewcol_Ignore},
-    {0, "SEQ_SPOT_ID", sizeof(int64_t) * 8, ewcol_IsArray | ewcol_Ignore},
-    {0, "SEQ_READ_ID", sizeof(INSDC_coord_one) * 8, ewcol_IsArray },
-    {0, "READ_START", sizeof(INSDC_coord_zero) * 8, ewcol_IsArray | ewcol_Ignore},
-    {0, "READ_LEN", sizeof(INSDC_coord_len) * 8, ewcol_IsArray | ewcol_Ignore},
-    {0, "REF_ID", sizeof(int64_t) * 8, ewcol_Ignore},
-    {0, "REF_START", sizeof(INSDC_coord_zero) * 8, ewcol_Ignore},
-    {0, "GLOBAL_REF_START", sizeof(uint64_t) * 8, 0},
-    {0, "REF_LEN", sizeof(INSDC_coord_len) * 8, 0},
-    {0, "REF_ORIENTATION", sizeof(bool) * 8, 0},
-    {0, "REF_PLOIDY", sizeof(uint32_t) * 8, ewcol_IsArray | ewcol_Ignore},
-    {0, "MATE_REF_ORIENTATION", sizeof(bool) * 8, ewcol_Ignore},
-    {0, "MATE_REF_ID", sizeof(int64_t) * 8, ewcol_Ignore},
-    {0, "MATE_REF_POS", sizeof(INSDC_coord_zero) * 8, ewcol_Ignore},
-    {0, "MATE_ALIGN_ID", sizeof(int64_t) * 8, ewcol_Ignore},
-    {0, "TEMPLATE_LEN", sizeof(INSDC_coord_zero) * 8, ewcol_Ignore},
-    {0, "MAPQ", sizeof(int32_t) * 8, 0},
-    {0, "HAS_MISMATCH", sizeof(bool) * 8, ewcol_IsArray},
-    {0, "(bool)HAS_REF_OFFSET", sizeof(bool) * 8, ewcol_IsArray},
-    {0, "MISMATCH", sizeof(INSDC_dna_text) * 8, ewcol_IsArray},
-    {0, "REF_OFFSET", sizeof(int32_t) * 8, ewcol_IsArray},
-    {0, "REF_OFFSET_TYPE", sizeof(uint8_t) * 8, ewcol_IsArray},
-    {0, "EVIDENCE_ALIGNMENT_IDS", sizeof(int64_t) * 8, ewcol_IsArray | ewcol_Ignore},
-    {0, "ALIGN_GROUP", sizeof(char) * 8, ewcol_IsArray | ewcol_Ignore },
-    {0, "LINKAGE_GROUP", sizeof(char) * 8, ewcol_IsArray | ewcol_Ignore },
-    {0, "MISMATCH_QUALITY", sizeof(uint8_t) * 8, ewcol_IsArray | ewcol_Ignore},
-    {0, "MATE_GLOBAL_REF_START", sizeof(uint64_t) * 8, ewcol_Ignore},
-    {0, "MATE_REF_START", sizeof(INSDC_coord_zero) * 8, ewcol_Ignore}
-};
-
-static const TableReaderColumn TableAlgnReadTmpKey_cols[] = {
-    {0, "TMP_KEY_ID", {NULL}, 0, 0},
-    {0, "GLOBAL_REF_START", {NULL}, 0, ercol_Skip},
-    {0, "REF_ID", {NULL}, 0, ercol_Skip},
-    {0, "REF_START", {NULL}, 0, ercol_Skip},
-    {0, NULL, {NULL}, 0, 0}
-};
-
-struct TableWriterAlgn {
-    uint32_t options;
-    const TableWriter* base;
-    const char* ref_table_name;
-    uint8_t cursor_id;
-    TableWriterColumn cols[ewalgn_cn_Last];
-    uint8_t spotid_cursor_id;
-    TableWriterColumn cols_spotid[5];
-    const TableReader* tmpkey_reader;
-    TableReaderColumn cols_read_tmpkey[sizeof(TableAlgnReadTmpKey_cols) / sizeof(TableAlgnReadTmpKey_cols[0])];
-};
-
-LIB_EXPORT rc_t CC TableWriterAlgn_Make(const TableWriterAlgn** cself, VDatabase* db,
-                                        ETableWriterAlgn_TableType type, uint32_t options)
-{
-    rc_t rc = 0;
-    TableWriterAlgn* self = NULL;
-    const char* tbl_nm = __func__;
-
-    if( cself == NULL || db == NULL ) {
-        rc = RC(rcAlign, rcFormatter, rcConstructing, rcParam, rcNull);
-    } else {
-        self = calloc(1, sizeof(*self));
-        if( self == NULL ) {
-            rc = RC(rcAlign, rcFormatter, rcConstructing, rcMemory, rcExhausted);
-        } else {
-            self->ref_table_name = "REFERENCE";
-            memcpy(self->cols, TableWriterAlgn_cols, sizeof(TableWriterAlgn_cols));
-            switch(type) {
-            case ewalgn_tabletype_PrimaryAlignment:
-                tbl_nm = "PRIMARY_ALIGNMENT";
-                self->cols[ewalgn_cn_ALIGN_GROUP].flags &= ~ewcol_Ignore;
-                self->cols[ewalgn_cn_LINKAGE_GROUP].flags &= ~ewcol_Ignore;
-                if (options & ewalgn_co_MISMATCH_QUALITY)
-                    self->cols[ewalgn_cn_MISMATCH_QUALITY].flags &= ~ewcol_Ignore;
-                break;
-            case ewalgn_tabletype_SecondaryAlignment:
-                tbl_nm = "SECONDARY_ALIGNMENT";
-#if 0
-                self->cols[ewalgn_cn_HAS_MISMATCH].flags |= ewcol_Ignore;
-                self->cols[ewalgn_cn_MISMATCH].flags |= ewcol_Ignore;
-#else
-                self->cols[ewalgn_cn_MISMATCH].name = "TMP_MISMATCH";
-                self->cols[ewalgn_cn_HAS_MISMATCH].name = "TMP_HAS_MISMATCH";
-#endif
-                self->cols[ewalgn_cn_MATE_REF_ORIENTATION].flags &= ~ewcol_Ignore;
-                self->cols[ewalgn_cn_MATE_REF_ID].flags &= ~ewcol_Ignore;
-                self->cols[ewalgn_cn_MATE_REF_POS].flags &= ~ewcol_Ignore;
-                self->cols[ewalgn_cn_MATE_ALIGN_ID].flags &= ~ewcol_Ignore;
-                self->cols[ewalgn_cn_TEMPLATE_LEN].flags &= ~ewcol_Ignore;
-                /* self->cols[ewalgn_cn_ALIGN_GROUP].flags &= ~ewcol_Ignore; why? */
-                self->cols[ewalgn_cn_LINKAGE_GROUP].flags &= ~ewcol_Ignore;
-                break;
-            case ewalgn_tabletype_EvidenceInterval:
-                tbl_nm = "EVIDENCE_INTERVAL";
-                options |= ewalgn_co_unsorted;
-                options |= ewalgn_co_PLOIDY;
-                self->cols[ewalgn_cn_SEQ_SPOT_ID].flags |= ewcol_Ignore;
-                self->cols[ewalgn_cn_SEQ_READ_ID].flags |= ewcol_Ignore;
-                self->cols[ewalgn_cn_EVIDENCE_ALIGNMENT_IDS].flags &= ~ewcol_Ignore;
-                break;
-            case ewalgn_tabletype_EvidenceAlignment:
-                tbl_nm = "EVIDENCE_ALIGNMENT";
-                self->ref_table_name = "EVIDENCE_INTERVAL";
-                self->cols[ewalgn_cn_REF_PLOIDY].flags &= ~ewcol_Ignore;
-#if 0
-                self->cols[ewalgn_cn_HAS_MISMATCH].flags |= ewcol_Ignore;
-                self->cols[ewalgn_cn_MISMATCH].flags |= ewcol_Ignore;
-#else
-                self->cols[ewalgn_cn_MISMATCH].name = "TMP_MISMATCH";
-                self->cols[ewalgn_cn_HAS_MISMATCH].name = "TMP_HAS_MISMATCH";
-#endif
-                options |= ewalgn_co_unsorted;
-                break;
-            default:
-                rc = RC(rcAlign, rcFormatter, rcConstructing, rcType, rcUnrecognized);
-            }
-            if( options & ewalgn_co_SEQ_SPOT_ID ) {
-                self->cols[ewalgn_cn_SEQ_SPOT_ID].flags &= ~ewcol_Ignore;
-            }
-            if( options & ewalgn_co_TMP_KEY_ID ) {
-                self->cols[ewalgn_cn_TMP_KEY_ID].flags &= ~ewcol_Ignore;
-            }
-            if( options & ewalgn_co_PLOIDY ) {
-                self->cols[ewalgn_cn_PLOIDY].flags &= ~ewcol_Ignore;
-                self->cols[ewalgn_cn_READ_START].flags &= ~ewcol_Ignore;
-                self->cols[ewalgn_cn_READ_LEN].flags &= ~ewcol_Ignore;
-            }
-            if( options & ewalgn_co_unsorted ) {
-                self->cols[ewalgn_cn_REF_ID].flags &= ~ewcol_Ignore;
-                self->cols[ewalgn_cn_REF_START].flags &= ~ewcol_Ignore;
-                self->cols[ewalgn_cn_GLOBAL_REF_START].flags |= ewcol_Ignore;
-                if( type == ewalgn_tabletype_SecondaryAlignment ) {
-                    self->cols[ewalgn_cn_MISMATCH].name = "TMP_MISMATCH";
-                    self->cols[ewalgn_cn_MISMATCH].flags &= ~ewcol_Ignore;
-                    self->cols[ewalgn_cn_HAS_MISMATCH].name = "TMP_HAS_MISMATCH";
-                    self->cols[ewalgn_cn_HAS_MISMATCH].flags &= ~ewcol_Ignore;
-                }
-            }
-            if( options & ewalgn_co_MATE_ALIGN_ID_only ) {
-                self->cols[ewalgn_cn_MATE_REF_ORIENTATION].flags |= ewcol_Ignore;
-                self->cols[ewalgn_cn_MATE_REF_ID].flags |= ewcol_Ignore;
-                self->cols[ewalgn_cn_MATE_REF_POS].flags |= ewcol_Ignore;
-                self->cols[ewalgn_cn_TEMPLATE_LEN].flags |= ewcol_Ignore;
-            }
-            if( (rc = TableWriter_Make(&self->base, db, tbl_nm, NULL)) == 0 ) {
-                static TableWriterData const d = { "", 0 };
-
-                rc = TableWriter_AddCursor(self->base, self->cols, sizeof(self->cols)/sizeof(self->cols[0]), &self->cursor_id);
-                TW_COL_WRITE_DEF(self->base, self->cursor_id, self->cols[ewalgn_cn_LINKAGE_GROUP], d);
-                self->options = options;
-            }
-        }
-    }
-    if( rc == 0 ) {
-        *cself = self;
-        ALIGN_DBG("table %s created", tbl_nm);
-    } else {
-        TableWriterAlgn_Whack(self, false, NULL);
-        ALIGN_DBGERR(rc);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableWriterAlgn_Whack(const TableWriterAlgn* cself, bool commit, uint64_t* rows)
-{
-    rc_t rc = 0;
-    if( cself != NULL ) {
-        VTable* vtbl;
-
-        TableReader_Whack(cself->tmpkey_reader);
-        if( (rc = TableWriter_GetVTable(cself->base, &vtbl)) == 0 ) {
-            KMetadata* meta;
-            if( (rc = VTableOpenMetadataUpdate(vtbl, &meta)) == 0 ) {
-                KMDataNode* node;
-                if( (rc = KMetadataOpenNodeUpdate(meta, &node, "CONFIG/REF_TABLE")) == 0 ) {
-                    rc = KMDataNodeWriteCString(node, cself->ref_table_name);
-                    KMDataNodeRelease(node);
-                }
-                KMetadataRelease(meta);
-            }
-        }
-        rc = TableWriter_Whack(cself->base, commit, rows);
-        free((TableWriterAlgn*)cself);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableWriterAlgn_WriteDefault(const TableWriterAlgn* cself, enum ETableWriterAlgn_ColNames col, const TableWriterData* data)
-{
-    return TableWriter_ColumnDefault(cself->base, 0, &cself->cols[col], data);
-}
-
-LIB_EXPORT rc_t CC TableWriterAlgn_GetNextRowId(const TableWriterAlgn* cself, int64_t* rowid)
-{
-    return TableWriter_GetNextRowId(cself->base, rowid, cself->cursor_id);
-}
-
-LIB_EXPORT rc_t CC TableWriterAlgn_Write(const TableWriterAlgn* cself, const TableWriterAlgnData* data, int64_t* rowid)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL || data == NULL ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( (rc = TableWriter_OpenRow(cself->base, rowid, cself->cursor_id)) == 0 ) {
-        TW_COL_WRITE_VAR(cself->base, cself->cols[ewalgn_cn_PLOIDY], data->ploidy);
-
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_SEQ_SPOT_ID], data->seq_spot_id);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_SEQ_READ_ID], data->seq_read_id);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_READ_START], data->read_start);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_READ_LEN], data->read_len);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_TMP_KEY_ID], data->tmp_key_id);
-
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_HAS_REF_OFFSET], data->has_ref_offset);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_REF_OFFSET], data->ref_offset);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_REF_OFFSET_TYPE], data->ref_offset_type);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_REF_ID], data->ref_id);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_REF_START], data->ref_start);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_GLOBAL_REF_START], data->global_ref_start);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_HAS_MISMATCH], data->has_mismatch);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_MISMATCH], data->mismatch);
-        TW_COL_WRITE_VAR(cself->base, cself->cols[ewalgn_cn_REF_LEN], data->ref_len);
-
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_REF_ORIENTATION], data->ref_orientation);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_REF_PLOIDY], data->ref_ploidy);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_MAPQ], data->mapq);
-
-        if( data->mate_align_id.elements != 1 ) {
-            TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_MATE_ALIGN_ID], data->mate_align_id);
-        } else {
-            TW_COL_WRITE_BUF(cself->base, cself->cols[ewalgn_cn_MATE_ALIGN_ID], data->mate_align_id.buffer,
-                             ((const int64_t*)(data->mate_align_id.buffer))[0] ? 1 : 0);
-        }
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_MATE_REF_ORIENTATION], data->mate_ref_orientation);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_MATE_REF_ID], data->mate_ref_id);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_MATE_REF_POS], data->mate_ref_pos);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_TEMPLATE_LEN], data->template_len);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_EVIDENCE_ALIGNMENT_IDS], data->alingment_ids);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_ALIGN_GROUP], data->align_group);
-        TW_COL_WRITE(cself->base, cself->cols[ewalgn_cn_LINKAGE_GROUP], data->linkageGroup);
-
-        if( rc == 0 ) {
-            rc = TableWriter_CloseRow(cself->base);
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableWriterAlgn_TmpKeyStart(const TableWriterAlgn* cself)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( (cself->options & ewalgn_co_SEQ_SPOT_ID) || !(cself->options & ewalgn_co_TMP_KEY_ID) ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcParam, rcViolated);
-        ALIGN_DBGERR(rc);
-    } else if( (rc = TableWriter_CloseCursor(cself->base, cself->cursor_id, NULL)) == 0 ) {
-        TableWriterAlgn* self = (TableWriterAlgn*)cself;
-        VTable* vtbl = NULL;
-        
-        memcpy(&self->cols_read_tmpkey, &TableAlgnReadTmpKey_cols, sizeof(TableAlgnReadTmpKey_cols));
-        if (self->cols[ewalgn_cn_GLOBAL_REF_START].flags & ewcol_Ignore) {
-            self->cols_read_tmpkey[2].flags = 0;
-            self->cols_read_tmpkey[3].flags = 0;
-        }
-        else
-            self->cols_read_tmpkey[1].flags = 0;
-
-        if( (rc = TableWriter_GetVTable(self->base, &vtbl)) == 0 &&
-            (rc = TableReader_Make(&self->tmpkey_reader, vtbl, self->cols_read_tmpkey, 50 * 1024 * 1024)) == 0 ) {
-            int64_t v = 0;
-            
-            memcpy(self->cols_spotid + 0, &TableWriterAlgn_cols[ewalgn_cn_SEQ_SPOT_ID], sizeof(self->cols_spotid[0]));
-            memcpy(self->cols_spotid + 1, &TableWriterAlgn_cols[ewalgn_cn_MATE_GLOBAL_REF_START], sizeof(self->cols_spotid[0]));
-            memcpy(self->cols_spotid + 2, &TableWriterAlgn_cols[ewalgn_cn_MATE_REF_ID], sizeof(self->cols_spotid[0]));
-            memcpy(self->cols_spotid + 3, &TableWriterAlgn_cols[ewalgn_cn_MATE_REF_START], sizeof(self->cols_spotid[0]));
-            memcpy(self->cols_spotid + 4, &TableWriterAlgn_cols[ewalgn_cn_MATE_ALIGN_ID], sizeof(self->cols_spotid[0]));
-            
-            self->cols_spotid[0].flags &= ~ewcol_Ignore;
-            if (self->options & ewalgn_co_MATE_POSITION) {
-                if (self->cols[ewalgn_cn_GLOBAL_REF_START].flags & ewcol_Ignore) {
-                    self->cols_spotid[2].flags &= ~ewcol_Ignore;
-                    self->cols_spotid[3].flags &= ~ewcol_Ignore;
-                }
-                else
-                    self->cols_spotid[1].flags &= ~ewcol_Ignore;
-                self->cols_spotid[4].flags &= ~ewcol_Ignore;
-            }
-            else {
-                self->cols_spotid[1].flags |= ewcol_Ignore;
-                self->cols_spotid[2].flags |= ewcol_Ignore;
-                self->cols_spotid[3].flags |= ewcol_Ignore;
-                self->cols_spotid[4].flags |= ewcol_Ignore;
-            }
-            rc = TableWriter_AddCursor(self->base, self->cols_spotid,
-                                       sizeof(self->cols_spotid) / sizeof(self->cols_spotid[0]),
-                                       &self->spotid_cursor_id);
-
-            TW_COL_WRITE_DEF_VAR(self->base, self->spotid_cursor_id, self->cols_spotid[0], v);
-            TW_COL_WRITE_DEF_VAR(self->base, self->spotid_cursor_id, self->cols_spotid[1], v);
-            TW_COL_WRITE_DEF_VAR(self->base, self->spotid_cursor_id, self->cols_spotid[2], v);
-            TW_COL_WRITE_DEF_VAR(self->base, self->spotid_cursor_id, self->cols_spotid[3], v);
-            TW_COL_WRITE_DEF_VAR(self->base, self->spotid_cursor_id, self->cols_spotid[4], v);
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableWriterAlgn_TmpKey(const TableWriterAlgn* cself, int64_t rowid, uint64_t* key_id)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL || rowid == 0 || key_id == NULL ) {
-        rc = RC( rcAlign, rcType, rcReading, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( cself->tmpkey_reader == NULL ) {
-        rc = RC( rcAlign, rcType, rcReading, rcMode, rcNotOpen);
-        ALIGN_DBGERR(rc);
-    } else if( (rc = TableReader_ReadRow(cself->tmpkey_reader, rowid)) == 0 ) {
-        memcpy(key_id, cself->cols_read_tmpkey[0].base.var, sizeof(*key_id));
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableWriterAlgn_RefStart(const TableWriterAlgn* cself, int64_t rowid, ReferenceStart *const rslt)
-{
-    rc_t rc = 0;
-    
-    if( cself == NULL || rowid == 0 || rslt == NULL ) {
-        rc = RC( rcAlign, rcType, rcReading, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( cself->tmpkey_reader == NULL ) {
-        rc = RC( rcAlign, rcType, rcReading, rcMode, rcNotOpen);
-        ALIGN_DBGERR(rc);
-    } else if( (rc = TableReader_ReadRow(cself->tmpkey_reader, rowid)) == 0 ) {
-        if (cself->cols_read_tmpkey[1].flags & ewcol_Ignore) {
-            memcpy(&rslt->local.ref_id, cself->cols_read_tmpkey[2].base.var, sizeof(rslt->local.ref_id));
-            memcpy(&rslt->local.ref_start, cself->cols_read_tmpkey[3].base.var, sizeof(rslt->local.ref_start));
-        }
-        else
-            memcpy(&rslt->global_ref_start, cself->cols_read_tmpkey[1].base.var, sizeof(rslt->global_ref_start));
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableWriterAlgn_Write_SpotId(const TableWriterAlgn* cself, int64_t rowid, int64_t spot_id)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL || rowid == 0 ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( cself->options & ewalgn_co_SEQ_SPOT_ID ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcParam, rcViolated);
-        ALIGN_DBGERR(rc);
-    } else if( (rc = TableWriter_OpenRowId(cself->base, rowid, cself->spotid_cursor_id)) == 0 ) {
-        TW_COL_WRITE_VAR(cself->base, cself->cols_spotid[0], spot_id);
-        if( rc == 0 ) {
-            rc = TableWriter_CloseRow(cself->base);
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableWriterAlgn_Write_SpotInfo(const TableWriterAlgn* cself,
-                                                  int64_t rowid,
-                                                  int64_t spot_id,
-                                                  int64_t mate_id,
-                                                  ReferenceStart const *ref_start)
-{
-    rc_t rc = 0;
-    
-    if( cself == NULL || rowid == 0 ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( cself->options & ewalgn_co_SEQ_SPOT_ID ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcParam, rcViolated);
-        ALIGN_DBGERR(rc);
-    } else if( (rc = TableWriter_OpenRowId(cself->base, rowid, cself->spotid_cursor_id)) == 0 ) {
-        TW_COL_WRITE_VAR(cself->base, cself->cols_spotid[0], spot_id);
-        TW_COL_WRITE_VAR(cself->base, cself->cols_spotid[1], ref_start->global_ref_start);
-        TW_COL_WRITE_VAR(cself->base, cself->cols_spotid[2], ref_start->local.ref_id);
-        TW_COL_WRITE_VAR(cself->base, cself->cols_spotid[3], ref_start->local.ref_start);
-        TW_COL_WRITE_VAR(cself->base, cself->cols_spotid[4], mate_id);
-        
-        if( rc == 0 ) {
-            rc = TableWriter_CloseRow(cself->base);
-        }
-    }
-    return rc;
-}
diff --git a/libs/align/writer-cmn.c b/libs/align/writer-cmn.c
deleted file mode 100644
index 128b8a4..0000000
--- a/libs/align/writer-cmn.c
+++ /dev/null
@@ -1,589 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <klib/printf.h>
-#include <klib/text.h>
-#include <kdb/meta.h>
-#include <kapp/main.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/schema.h>
-#include <vdb/vdb-priv.h>
-#include <align/writer-cmn.h>
-#include "writer-priv.h"
-#include "debug.h"
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#define TW_MAX_CURSORS 8
-
-struct TableWriter {
-    /* db OR mgr not both */
-    VDatabase* vdb;
-    VDBManager* vmgr;
-    char* table_path;
-    VSchema* vschema;
-    bool is_update;
-
-    VTable* vtbl;
-    char* table;
-    struct {
-        uint32_t col_qty; /* != 0 cursor is used */
-        const TableWriterColumn* cols;
-        VCursor* cursor; /* != NULL cursor is opened */
-        uint64_t rows;
-    } *curr, cursors[TW_MAX_CURSORS];
-};
-
-static
-rc_t TableWriter_Init(TableWriter** self, const char* table, const char* table_path)
-{
-    rc_t rc = 0;
-
-    if( self == NULL || table == NULL ) {
-        rc = RC(rcAlign, rcType, rcConstructing, rcParam, rcNull);
-    } else if( (*self = calloc(1, sizeof(**self))) == NULL ) {
-        rc = RC(rcAlign, rcType, rcConstructing, rcMemory, rcExhausted);
-    } else {
-        (*self)->table = string_dup( table, string_size( table ) );
-        if( (*self)->table == NULL ) {
-            rc = RC(rcAlign, rcType, rcConstructing, rcMemory, rcExhausted);
-        } else if( table_path != NULL ) {
-            (*self)->table_path = string_dup( table_path, string_size( table_path ) );
-            if( (*self)->table_path == NULL ) {
-                rc = RC(rcAlign, rcType, rcConstructing, rcMemory, rcExhausted);
-            }
-        }
-    }
-    return rc;
-}
-
-static
-rc_t TableWriter_OpenCursor(const TableWriter* cself, uint8_t cursor_id)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL || cursor_id >= TW_MAX_CURSORS || cself->cursors[cursor_id].col_qty == 0 ) {
-        rc = RC(rcAlign, rcType, rcConstructing, rcParam, rcInvalid);
-    } else if( cself->cursors[cursor_id].cursor == NULL ) {
-        TableWriter* self = (TableWriter*)cself;
-
-        if( self->vtbl == NULL ) {
-            if( self->vmgr != NULL ) {
-                rc = VDBManagerCreateTable(self->vmgr, &self->vtbl, self->vschema, self->table, kcmCreate | kcmMD5, "%s", self->table_path);
-            } else if( self->is_update ) {
-                rc = VDatabaseOpenTableUpdate(self->vdb, &self->vtbl, "%s", self->table);
-            } else {
-                rc = VDatabaseCreateTable(self->vdb, &self->vtbl, self->table, kcmCreate | kcmMD5, "%s", self->table_path);
-            }
-        }
-
-        if( rc == 0 &&
-            (rc = VTableColumnCreateParams(self->vtbl, kcmCreate, kcsCRC32, 0)) == 0 &&
-            (rc = VTableCreateCursorWrite(self->vtbl, &self->cursors[cursor_id].cursor, kcmInsert)) == 0 ) {
-            uint32_t i;
-            for(i = 0; rc == 0 && i < self->cursors[cursor_id].col_qty; i++) {
-                if( !(self->cursors[cursor_id].cols[i].flags & ewcol_Ignore) ) {
-                    if( (rc = VCursorAddColumn(self->cursors[cursor_id].cursor,
-                                               (uint32_t*)&self->cursors[cursor_id].cols[i].idx,
-                                               "%s", self->cursors[cursor_id].cols[i].name)) == 0 ) {
-                        ALIGN_DBG("column %s opened", self->cursors[cursor_id].cols[i].name);
-                    } else {
-                        (void)PLOGERR(klogErr, (klogErr, rc, "table $(table) failed to create column '$(column)'",
-                                                             "table=%s,column=%s", self->table, self->cursors[cursor_id].cols[i].name));
-                    }
-                }
-            }
-            if( rc == 0 ) {
-                rc = VCursorOpen(self->cursors[cursor_id].cursor);
-            }
-        }
-        if( rc == 0 ) {
-            ALIGN_DBG("table %s opened cursor %u for writing", self->table, cursor_id);
-        } else {
-            ALIGN_DBGERRP("table %s failed to open cursor %u for writing", rc, self->table, cursor_id);
-        }
-    }
-    return rc;
-}
-
-rc_t CC TableWriter_Make(const TableWriter** cself, VDatabase *db, const char* table, const char* table_path)
-{
-    rc_t rc = 0;
-    TableWriter* obj = NULL;
-
-    if( cself == NULL ) {
-        rc = RC(rcAlign, rcType, rcConstructing, rcParam, rcNull);
-    } else if( (rc = TableWriter_Init(&obj, table, table_path ? table_path : table)) == 0 &&
-               (rc = VDatabaseAddRef(db)) == 0 ) {
-        obj->vdb = db;
-    }
-    if( rc == 0 ) {
-        *cself = obj;
-        ALIGN_DBG("table %s opened for writing", (*cself)->table);
-    } else {
-        TableWriter_Whack(obj, false, NULL);
-        ALIGN_DBGERRP("table %s at %s", rc, table, table_path);
-    }
-    return rc;
-}
-
-rc_t CC TableWriter_MakeMgr(const TableWriter** cself, VDBManager* mgr, const char* schema_path,
-                            const char* type, const char* table_path)
-{
-    rc_t rc = 0;
-    TableWriter* obj = NULL;
-
-    if( cself == NULL || mgr == NULL || schema_path == NULL || type == NULL || table_path == NULL) {
-        rc = RC(rcAlign, rcType, rcConstructing, rcParam, rcNull);
-    } else if( (rc = TableWriter_Init(&obj, type, table_path)) == 0 &&
-               (rc = VDBManagerMakeSchema(mgr, &obj->vschema)) == 0 &&
-               (rc = VSchemaParseFile(obj->vschema, "%s", schema_path)) == 0 &&
-               (rc = VDBManagerAddRef(mgr)) == 0 ) {
-       obj->vmgr = mgr;
-    }
-    if( rc == 0 ) {
-        *cself = obj;
-        ALIGN_DBG("table %s at %s opened for writing", (*cself)->table, (*cself)->table_path);
-    } else {
-        TableWriter_Whack(obj, false, NULL);
-        ALIGN_DBGERRP("table %s at %s", rc, type, table_path);
-    }
-    return rc;
-}
-
-rc_t CC TableWriter_MakeUpdate(const TableWriter** cself, VDatabase *db, const char* table)
-{
-    rc_t rc = 0;
-    TableWriter* obj = NULL;
-
-    if( cself == NULL || db == NULL ) {
-        rc = RC(rcAlign, rcType, rcConstructing, rcParam, rcNull);
-    } else if( (rc = TableWriter_Init(&obj, table, NULL)) == 0 &&
-               (rc = VDatabaseAddRef(db)) == 0 ) {
-        obj->is_update = true;
-        obj->vdb = db;
-    }
-    if( rc == 0 ) {
-        *cself = obj;
-        ALIGN_DBG("table %s opened for update", (*cself)->table);
-    } else {
-        TableWriter_Whack(obj, false, NULL);
-        ALIGN_DBGERRP("table %s", rc, table);
-    }
-    return rc;
-}
-
-rc_t CC TableWriter_GetVTable(const TableWriter* cself, VTable** vtbl)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL || vtbl == NULL ) {
-        rc = RC(rcAlign, rcType, rcAccessing, rcParam, rcNull);
-    } else {
-        *vtbl = cself->vtbl;
-    }
-    return rc;
-}
-
-rc_t CC TableWriter_Sign(const TableWriter *const cself,
-                         const char loader_name[],
-                         const ver_t loader_version,
-                         const char loader_date[],
-                         const char app_name[],
-                         const ver_t app_version)
-{
-    rc_t rc = 0;
-    KMetadata* meta = NULL;
-    KMDataNode* root = NULL;
-
-    if( cself == NULL || loader_name == NULL || loader_date == NULL || app_name == NULL || app_version == 0 ) {
-        rc = RC(rcAlign, rcMetadata, rcWriting, rcParam, rcNull);
-    } else if( (rc = VTableOpenMetadataUpdate(cself->vtbl, &meta)) == 0 &&
-               (rc = KMetadataOpenNodeUpdate(meta, &root, "/")) == 0 ) {
-        KMDataNode *node = NULL;
-        if( (rc = KMDataNodeOpenNodeUpdate(root, &node, "SOFTWARE")) == 0 ) {
-            char str_vers[64];
-            KMDataNode *subNode = NULL;
-            if( (rc = KMDataNodeOpenNodeUpdate(node, &subNode, "loader")) == 0 ) {
-                if( (rc = string_printf(str_vers, sizeof(str_vers), NULL, "%V", loader_version)) == 0 ) {
-                    rc = KMDataNodeWriteAttr(subNode, "vers", str_vers);
-                }
-                if(rc == 0) {
-                    rc = KMDataNodeWriteAttr(subNode, "date", loader_date);
-                }
-                if(rc == 0) {
-                    const char* tool_name = strrchr(loader_name, '/');
-                    const char* r = strrchr(loader_name, '\\');
-                    if( tool_name != NULL && r != NULL && tool_name < r ) {
-                        tool_name = r;
-                    }
-                    if( tool_name++ == NULL) {
-                        tool_name = loader_name;
-                    }
-                    rc = KMDataNodeWriteAttr(subNode, "name", tool_name);
-                }
-                KMDataNodeRelease(subNode);
-            }
-            if(rc == 0 && (rc = KMDataNodeOpenNodeUpdate(node, &subNode, "formatter")) == 0 ) {
-                if( (rc = string_printf(str_vers, sizeof(str_vers), NULL, "%V", app_version)) == 0 ) {
-                    rc = KMDataNodeWriteAttr(subNode, "vers", str_vers);
-                }
-                if(rc == 0) {
-                    rc = KMDataNodeWriteAttr(subNode, "name", app_name);
-                }
-                KMDataNodeRelease(subNode);
-            }
-            KMDataNodeRelease(node);
-        }
-        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(root, &node, "LOAD")) == 0 ) {
-            KMDataNode *subNode = NULL;
-            if( (rc = KMDataNodeOpenNodeUpdate(node, &subNode, "timestamp")) == 0 ) {
-                time_t t = time(NULL);
-                rc = KMDataNodeWrite(subNode, &t, sizeof(t));
-                KMDataNodeRelease(subNode);
-            }
-            KMDataNodeRelease(node);
-        }
-    }
-    KMDataNodeRelease(root);
-    KMetadataRelease(meta);
-    return rc;
-}
-
-rc_t CC TableWriter_Whack(const TableWriter* cself, bool commit, uint64_t* rows)
-{
-    rc_t rc = 0;
-
-    if( rows != NULL ) {
-        *rows = 0;
-    }
-    if( cself != NULL ) {
-        TableWriter* self = (TableWriter*)cself;
-        uint32_t i, j;
-        
-        for(i = 0; i < TW_MAX_CURSORS; i++) {
-            if( self->cursors[i].col_qty > 0 ) {
-                self->curr = &self->cursors[i];
-                if( self->curr->cursor != NULL ) {
-                    rc_t rc1 = 0, rc2;
-                    if( commit ) {
-                        rc1 = VCursorCommit(self->curr->cursor);
-                    }
-                    rc2 = VCursorRelease(self->curr->cursor);
-                    rc = rc ? rc : (rc1 ? rc1 : rc2);
-                    self->curr->cursor = NULL;
-                }
-                if( i == 0 && rows != NULL ) {
-                    *rows = self->curr->rows;
-                }
-            }
-        }
-        for(i = 0; i < TW_MAX_CURSORS; i++) {
-            if( self->cursors[i].col_qty > 0 ) {
-                self->curr = &self->cursors[i];
-                for(j = 0; j < self->curr->col_qty; j++) {
-                    if( self->curr->cols[j].idx != 0 && (self->curr->cols[j].flags & ewcol_Temporary) ) {
-                        rc_t rc1;
-                        if( (rc1 = VTableDropColumn(self->vtbl, "%s", self->curr->cols[j].name)) != 0 ) {
-                            (void)PLOGERR(klogWarn, (klogWarn, rc1,
-                                "table $(table) failed to drop temporary column '$(column)'",
-                                "table=%s,column=%s", self->table, self->curr->cols[j].name));
-                        } else {
-                            ALIGN_DBG("table %s dropped tmp col %s", self->table, self->curr->cols[j].name);
-                        }
-                    }
-                }
-            }
-        }
-        if( commit && rc == 0 && self->vtbl != NULL ) {
-            rc = VTableReindex(self->vtbl);
-        }
-        VTableRelease(self->vtbl);
-        VSchemaRelease(self->vschema);
-        VDBManagerRelease(self->vmgr);
-        VDatabaseRelease(self->vdb);
-        if( rc == 0 ) {
-            ALIGN_DBG("table %s%s%s", self->table, self->table_path ? " at " : "", self->table_path ? self->table_path : "");
-        } else {
-            ALIGN_DBGERRP("table %s%s%s", rc, self->table, self->table_path ? " at " : "", self->table_path ? self->table_path : "");
-        }
-        free(self->table);
-        free(self->table_path);
-        free(self);
-    }
-    return rc;
-}
-
-rc_t CC TableWriter_AddCursor(const TableWriter* cself, TableWriterColumn* cols, uint32_t col_qty, uint8_t* cursor_id)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL || cols == NULL || col_qty == 0 || cursor_id == NULL ) {
-        rc = RC(rcAlign, rcType, rcOpening, rcParam, rcInvalid);
-        ALIGN_DBGERR(rc);
-    } else {
-        uint32_t i;
-        TableWriter* self = (TableWriter*)cself;
-
-        *cursor_id = TW_MAX_CURSORS;
-        for(i = 0; i < TW_MAX_CURSORS; i++) {
-            if( self->cursors[i].col_qty == 0 ) {
-                self->cursors[i].col_qty = col_qty;
-                self->cursors[i].cols = cols;
-                self->cursors[i].cursor = NULL;
-                self->cursors[i].rows = 0;
-                *cursor_id = i;
-                break;
-            }
-        }
-        if( *cursor_id >= TW_MAX_CURSORS ) {
-            rc = RC(rcAlign, rcType, rcOpening, rcConstraint, rcExhausted);
-        }
-    }
-    if( rc != 0 ) {
-        ALIGN_DBGERRP("table %s", rc, cself->table);
-    } else {
-        ALIGN_DBG("table %s added cursor %hu", cself->table, *cursor_id);
-    }
-    return rc;
-}
-
-rc_t CC TableWriter_CloseCursor(const TableWriter* cself, uint8_t cursor_id, uint64_t* rows)
-{
-    rc_t rc = 0;
-
-    assert(cself != NULL);
-    assert(cursor_id < TW_MAX_CURSORS);
-    if (cself == NULL) abort();
-    if (cursor_id >= TW_MAX_CURSORS) abort();
-
-    if (cself->cursors[cursor_id].cursor == NULL)
-        return 0;
-    else {
-        rc_t rc2 = 0;
-        TableWriter* self = (TableWriter*)cself;
-        uint64_t r = 0;
-
-        if( rows == NULL ) {
-            rows = &r;
-        }
-        self->curr = &self->cursors[cursor_id];
-        rc = VCursorCommit(self->curr->cursor);
-        *rows = cself->curr->rows;
-        rc2 = VCursorRelease(self->curr->cursor);
-        self->curr->cursor = NULL;
-        rc = rc ? rc : rc2;
-    }
-    if( rc == 0 ) {
-        ALIGN_DBG("table %s closed cursor %hu rows %ld", cself->table, cursor_id, *rows);
-    } else {
-        ALIGN_DBGERRP("table %s cursor %hu row %ld", rc, cself->table, cursor_id, *rows);
-    }
-    return rc;
-}
-
-rc_t CC TableWriter_Flush(const TableWriter *cself, const uint8_t cursor_id)
-{
-    rc_t rc = 0;
-    
-    if( cself == NULL || cursor_id >= TW_MAX_CURSORS || cself->cursors[cursor_id].col_qty == 0 ) {
-        rc = RC(rcAlign, rcType, rcOpening, rcParam, rcInvalid);
-        ALIGN_DBGERR(rc);
-    }
-    else if( cself->cursors[cursor_id].cursor != NULL ) {
-        rc = VCursorFlushPage(cself->cursors[cursor_id].cursor);
-        if( rc == 0 ) {
-            ALIGN_DBG("table %s cursor %hu flushed", cself->table, cursor_id);
-        } else {
-            ALIGN_DBGERRP("table %s cursor %hu flushing", rc, cself->table, cursor_id);
-        }
-    }
-    return rc;
-}
-
-rc_t CC TableWriter_OpenRow(const TableWriter* cself, int64_t* rowid, const uint8_t cursor_id)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL || cursor_id >= TW_MAX_CURSORS || cself->cursors[cursor_id].col_qty == 0 ) {
-        rc = RC(rcAlign, rcType, rcOpening, rcParam, rcInvalid);
-        ALIGN_DBGERR(rc);
-    }
-    else if( cself->cursors[cursor_id].cursor != NULL || (rc = TableWriter_OpenCursor(cself, cursor_id)) == 0 ) {
-        TableWriter* self = (TableWriter*)cself;
-
-        self->curr = &self->cursors[cursor_id];
-        if( (rc = VCursorOpenRow(self->curr->cursor)) == 0 && rowid != NULL ) {
-            rc = VCursorRowId(self->curr->cursor, rowid);
-        }
-        if( rc == 0 ) {
-            ALIGN_DBG("table %s cursor %hu opened row %ld", self->table, cursor_id, self->curr->rows + 1);
-        } else {
-            ALIGN_DBGERRP("table %s cursor %hu row %ld", rc, self->table, cursor_id, self->curr->rows + 1);
-        }
-    }
-    return rc;
-}
-
-rc_t CC TableWriter_OpenRowId(const TableWriter* cself, const int64_t rowid, const uint8_t cursor_id)
-{
-    rc_t rc = 0;
-    
-    if( cself == NULL || cursor_id >= TW_MAX_CURSORS || cself->cursors[cursor_id].col_qty == 0 ) {
-        rc = RC(rcAlign, rcType, rcOpening, rcParam, rcInvalid);
-        ALIGN_DBGERR(rc);
-    } else if( cself->cursors[cursor_id].cursor != NULL || (rc = TableWriter_OpenCursor(cself, cursor_id)) == 0 ) {
-        TableWriter* self = (TableWriter*)cself;
-
-        self->curr = &self->cursors[cursor_id];
-        /* loop through missed rows to assign default values */
-        if( rowid > self->curr->rows + 1 ) {
-            int64_t r;
-            for(r = self->curr->rows + 1; rc == 0 && r < rowid; r++) {
-                if( (rc = VCursorOpenRow(self->curr->cursor)) == 0 &&
-                    (rc = VCursorCommitRow(self->curr->cursor)) == 0 ) {
-                    ALIGN_DBG("table %s written default row for cursor %hu row %ld", self->table, cursor_id, r);
-                    rc = VCursorCloseRow(self->curr->cursor);
-                }
-            }
-        }
-        if( rc == 0 /* && (rc = VCursorSetRowId(cself->curr->cursor, rowid)) == 0 */ ) {
-            rc = VCursorOpenRow(cself->curr->cursor);
-        }
-        if( rc == 0 ) {
-            if( rowid > self->curr->rows + 1) {
-                self->curr->rows = rowid - 1;
-            }
-            ALIGN_DBG("table %s cursor %hu opened row %ld", self->table, cursor_id, rowid);
-        } else {
-            ALIGN_DBGERRP("table %s cursor %hu row %ld", rc, self->table, cursor_id, rowid);
-        }
-    }
-    return rc;
-}
-
-rc_t CC TableWriter_GetNextRowId(const TableWriter* cself, int64_t* rowid, const uint8_t cursor_id)
-{
-    rc_t rc = 0;
-    
-    if( cself == NULL || cursor_id >= TW_MAX_CURSORS || cself->cursors[cursor_id].col_qty == 0 ) {
-        rc = RC(rcAlign, rcType, rcOpening, rcParam, rcInvalid);
-        ALIGN_DBGERR(rc);
-    } else {
-        *rowid = cself->cursors[cursor_id].rows + 1;
-        ALIGN_DBG("table %s next rowid %li", cself->table, *rowid);
-    }
-    return rc;
-}
-
-rc_t CC TableWriter_ColumnDefault(const TableWriter* cself, const uint8_t cursor_id,
-                                  const TableWriterColumn* column, const TableWriterData *data)
-{
-    rc_t rc = 0;
-    if( cself == NULL || cursor_id >= TW_MAX_CURSORS || cself->cursors[cursor_id].col_qty == 0 ||
-        column == NULL || data == NULL ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcParam, rcNull);
-    } else if( !(column->flags & ewcol_IsArray) && data->elements != 1 ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcData, rcTooLong);
-        ALIGN_DBGERRP("column %s is not an array of values", rc, column->name);
-    } else if( cself->cursors[cursor_id].cursor != NULL || (rc = TableWriter_OpenCursor(cself, cursor_id)) == 0 ) {
-        if( column->idx != 0 ) {
-            rc = VCursorDefault(cself->cursors[cursor_id].cursor, column->idx, column->element_bits, data->buffer, 0, data->elements);
-        }
-    }
-    if( rc != 0 ) {
-        ALIGN_DBGERRP("table %s column %s default value", rc, cself->table, column->name);
-    } else {
-        ALIGN_DBG("table %s column %s default value %lu elements", cself->table, column->name, data->elements);
-    }
-    return rc;
-}
-
-rc_t CC TableWriter_ColumnWrite(const TableWriter* cself,
-    const TableWriterColumn* column, const TableWriterData *data)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL || column == NULL || data == NULL ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcParam, rcInvalid);
-    }
-    else if( cself->curr == NULL || cself->curr->cursor == NULL ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcMode, rcInvalid);
-    }
-    else if( !(column->flags & ewcol_IsArray) && data->elements > 1 ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcData, rcTooLong);
-        ALIGN_DBGERRP("column %s is not an array of values", rc, column->name);
-    }
-    else if (column->idx != 0) {
-        const char platform[] = "PLATFORM";
-        /* Do not try to write PLATFORM column when it is empty
-          (e.g. cg-load writes PLATFORM defult) */
-        if (data->buffer != NULL || data-> elements != 0 ||
-            string_cmp(platform, sizeof platform - 1, column->name,
-                string_measure(column->name, NULL), sizeof platform - 1) != 0)
-        {
-            rc = VCursorWrite(cself->curr->cursor, column->idx,
-                column->element_bits, data->buffer, 0, data->elements);
-        }
-    }
-
-    if( rc != 0 ) {
-        ALIGN_DBGERRP("table %s column %s row %ld", rc, cself->table, column->name, cself->curr->rows + 1);
-    }
-    else {
-        ALIGN_DBG("table %s column %s value %lu elements", cself->table, column->name, data->elements);
-    }
-
-    return rc;
-}
-
-rc_t CC TableWriter_CloseRow(const TableWriter* cself)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL ) {
-        rc = RC(rcAlign, rcType, rcClosing, rcSelf, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( cself->curr == NULL || cself->curr->cursor == NULL ) {
-        rc = RC( rcAlign, rcType, rcClosing, rcMode, rcInvalid);
-    } else {
-        if( (rc = VCursorCommitRow(cself->curr->cursor)) == 0 ) {
-            rc = VCursorCloseRow(cself->curr->cursor);
-        }
-        if( rc == 0 ) {
-            cself->curr->rows++;
-        } else {
-            ALIGN_DBGERRP("table %s row %ld", rc, cself->table, cself->curr->rows + 1);
-        }
-        ((TableWriter*)cself)->curr = NULL;
-    }
-    return rc;
-}
diff --git a/libs/align/writer-priv.h b/libs/align/writer-priv.h
deleted file mode 100644
index dab67f5..0000000
--- a/libs/align/writer-priv.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#ifndef _h_align_writer_priv_
-#define _h_align_writer_priv_
-
-#include <vdb/manager.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <kdb/meta.h>
-
-#include <align/writer-cmn.h>
-
-enum TableWriterColumn_Array {
-    ewcol_Ignore = 0x01,
-    ewcol_IsArray = 0x02,
-    ewcol_Temporary = 0x04
-};
-
-/* use ewcol_Ignore to skip optional column when cursor is created */
-typedef struct TableWriterColumn_struct {
-    uint32_t idx;
-    const char* name;
-    bitsz_t element_bits;
-    uint32_t flags;
-} TableWriterColumn;
-
-typedef struct TableWriter TableWriter;
-
-rc_t CC TableWriter_Make(const TableWriter** cself, VDatabase *db, const char* table, const char* table_path /* NULL */);
-
-rc_t CC TableWriter_MakeMgr(const TableWriter** cself, VDBManager* mgr, const char* schema_path, const char* type, const char* table_path);
-
-rc_t CC TableWriter_MakeUpdate(const TableWriter** cself, VDatabase *db, const char* table);
-
-/* add scursor based on column list */
-rc_t CC TableWriter_AddCursor(const TableWriter* cself, TableWriterColumn* cols, uint32_t col_qty, uint8_t* cursor_id);
-
-rc_t CC TableWriter_GetVTable(const TableWriter* cself, VTable** vtbl);
-
-rc_t CC TableWriter_Sign(const TableWriter *const cself,
-                         const char loader_name[],
-                         const ver_t loader_version,
-                         const char loader_date[],
-                         const char app_name[],
-                         const ver_t app_version);
-
-/* optionally return internal vtbl still open but committed */
-rc_t CC TableWriter_Whack(const TableWriter* cself, bool commit, uint64_t* rows);
-
-/* commits and closes cursor_id, returns number of rows written in cursor, optionally */
-rc_t CC TableWriter_CloseCursor(const TableWriter* cself, uint8_t cursor_id, uint64_t* rows);
-
-/* flushes any pending writes into the table */
-rc_t CC TableWriter_Flush(const TableWriter *cself, const uint8_t cursor_id);
-
-/* CANNOT OPEN ROWS IN MULTIPLE CURSORS AT ONCE
-    Use sequence:
-    OpenRow
-    ColumnWrite - 0 (better set some defaults if not writing to a column!) or more times.
-    CloseRow
- */
-/* open a row for writing by cursor_id */
-rc_t CC TableWriter_OpenRow(const TableWriter* cself, int64_t* rowid, const uint8_t cursor_id);
-
-/* open a specific row for writing by cursor_id */
-rc_t CC TableWriter_OpenRowId(const TableWriter* cself, const int64_t rowid, const uint8_t cursor_id);
-
-/* return sequentially next rowid which will be created on OpenRow request */
-rc_t CC TableWriter_GetNextRowId(const TableWriter* cself, int64_t* rowid, const uint8_t cursor_id);
-
-/* writes cursor_id cursor default value to column
-   column pointer must use same object as passed into AddCursor
- */
-rc_t CC TableWriter_ColumnDefault(const TableWriter* cself, const uint8_t cursor_id,
-                                  const TableWriterColumn* column, const TableWriterData *data);
-
-/* writes value to column into cursor last passed to OpenRow*
-   column pointer must use same object as passed into AddCursor
- */
-rc_t CC TableWriter_ColumnWrite(const TableWriter* cself,
-                                const TableWriterColumn* column, const TableWriterData *data);
-
-/* closes row in cursor last used in OpenRow* */
-rc_t CC TableWriter_CloseRow(const TableWriter* cself);
-
-#define TW_COL_WRITE_DEF(writer, curs, col, data) \
-    if( rc == 0 ) { \
-        rc = TableWriter_ColumnDefault(writer, curs, &(col), &(data)); \
-    }
-
-#define TW_COL_WRITE_DEF_VAR(writer, curs, col, var) \
-    if( rc == 0 ) { \
-        TableWriterData dz; \
-        dz.buffer = &(var); \
-        dz.elements = 1; \
-        TW_COL_WRITE_DEF(writer, curs, col, dz); \
-    }
-
-#define TW_COL_WRITE_DEF_BUF(writer, curs, col, buf, elems) \
-    if( rc == 0 ) { \
-        TableWriterData dz; \
-        dz.buffer = buf; \
-        dz.elements = elems; \
-        TW_COL_WRITE_DEF(writer, curs, col, dz); \
-    }
-
-#define TW_COL_WRITE(writer, col, data) \
-    if( rc == 0 && (col).idx != 0) { \
-        rc = TableWriter_ColumnWrite(writer, &(col), &(data)); \
-    }
-
-#define TW_COL_WRITE_VAR(writer, col, var) \
-    if( rc == 0 && (col).idx != 0) { \
-        TableWriterData dz; \
-        dz.buffer = &(var); \
-        dz.elements = 1; \
-        TW_COL_WRITE(writer, col, dz); \
-    }
-
-#define TW_COL_WRITE_BUF(writer, col, buf, elems) \
-    if( rc == 0 && (col).idx != 0) { \
-        TableWriterData dz; \
-        dz.buffer = buf; \
-        dz.elements = elems; \
-        TW_COL_WRITE(writer, col, dz); \
-    }
-
-#endif /* _h_align_writer_priv_ */
diff --git a/libs/align/writer-ref.c b/libs/align/writer-ref.c
deleted file mode 100644
index d4d04a9..0000000
--- a/libs/align/writer-ref.c
+++ /dev/null
@@ -1,481 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <align/extern.h>
-
-#include <klib/rc.h>
-#include <kfs/file.h>
-#include <insdc/insdc.h>
-#include <vdb/table.h>
-#include <align/writer-refseq.h>
-#include "writer-ref.h"
-#include "writer-priv.h"
-#include "debug.h"
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <ctype.h>
-#include <assert.h>
-
-static const TableWriterColumn TableWriterRefData_cols[ewrefd_cn_Last + 1] =
-{
-    /* order is important, see enum in .h !!! */
-    {0, "MAX_SEQ_LEN", sizeof(uint32_t) * 8, 0},
-    {0, "NAME", sizeof(char) * 8, ewcol_IsArray},
-    {0, "(INSDC:dna:text)CS_KEY", sizeof(char) * 8, 0},
-    {0, "(INSDC:dna:text)CMP_READ", sizeof(char) * 8, ewcol_IsArray},
-    {0, "QUALITY", sizeof(INSDC_quality_phred) * 8, ewcol_IsArray},
-    {0, "SEQ_ID", sizeof(char) * 8, ewcol_IsArray},
-    {0, "SEQ_START", sizeof(INSDC_coord_one) * 8, 0},
-    {0, "SEQ_LEN", sizeof(INSDC_coord_len) * 8, 0},
-    {0, "CIRCULAR", sizeof(bool) * 8, 0}
-};
-
-static const TableWriterColumn TableWriterRefCoverage_cols[ewrefcv_cn_Last + 1] =
-{
-    /* order is important, see enum in .h !!! */
-    {0, "CGRAPH_HIGH", sizeof(uint8_t) * 8, 0},
-    {0, "CGRAPH_LOW", sizeof(uint8_t) * 8, 0},
-    {0, "CGRAPH_MISMATCHES", sizeof(uint32_t) * 8, 0},
-    {0, "CGRAPH_INDELS", sizeof(uint32_t) * 8, 0},
-    {0, "OVERLAP_REF_POS", sizeof(INSDC_coord_zero) * 8, ewcol_IsArray},
-    {0, "OVERLAP_REF_LEN", sizeof(INSDC_coord_len) * 8, ewcol_IsArray},
-    {0, "PRIMARY_ALIGNMENT_IDS", sizeof(int64_t) * 8, ewcol_IsArray},
-    {0, "SECONDARY_ALIGNMENT_IDS", sizeof(int64_t) * 8, ewcol_IsArray},
-    {0, "EVIDENCE_INTERVAL_IDS", sizeof(int64_t) * 8, ewcol_IsArray}
-};
-
-struct TableWriterRef {
-    uint32_t options;
-    const TableWriter* base;
-    uint8_t cursor_id;
-    TableWriterColumn cols_data[sizeof(TableWriterRefData_cols)/sizeof(TableWriterRefData_cols[0])];
-    uint8_t coverage_cursor_id;
-    TableWriterColumn cols_coverage[sizeof(TableWriterRefCoverage_cols)/sizeof(TableWriterRefCoverage_cols[0])];
-    INSDC_coord_one seq_start_last;
-    uint32_t max_seq_len;
-    char last_cs_key;
-    uint64_t last_seq_id_len;
-    char last_seq_id[2048];
-    int64_t last_coverage_row;
-};
-
-rc_t CC TableWriterRef_Make(const TableWriterRef** cself, VDatabase* db, const uint32_t options)
-{
-    rc_t rc = 0;
-    TableWriterRef* self = NULL;
-
-    if( cself == NULL ) {
-        rc = RC(rcAlign, rcFormatter, rcConstructing, rcParam, rcNull);
-    } else {
-        self = calloc(1, sizeof(*self));
-        if( self == NULL ) {
-            rc = RC(rcAlign, rcFormatter, rcConstructing, rcMemory, rcExhausted);
-        } else {
-            memcpy(self->cols_data, TableWriterRefData_cols, sizeof(TableWriterRefData_cols));
-            memcpy(self->cols_coverage, TableWriterRefCoverage_cols, sizeof(TableWriterRefCoverage_cols));
-            if( !(options & ewref_co_QUALITY) ) {
-                self->cols_data[ewrefd_cn_QUALITY].flags |= ewcol_Ignore;
-            }
-            if( (rc = TableWriter_Make(&self->base, db, "REFERENCE", NULL)) == 0 &&
-                (rc = TableWriter_AddCursor(self->base, self->cols_data,
-                            sizeof(self->cols_data) / sizeof(self->cols_data[0]), &self->cursor_id)) == 0 ) {
-                self->options = options;
-            }
-            if( rc == 0 && (options & ewref_co_Coverage) ) {
-                rc = TableWriter_AddCursor(self->base, self->cols_coverage,
-                    sizeof(self->cols_coverage) / sizeof(self->cols_coverage[0]), &self->coverage_cursor_id);
-            }
-        }
-    }
-    if( rc == 0 ) {
-        *cself = self;
-        ALIGN_DBG("table %s", "created");
-    } else {
-        TableWriterRef_Whack(self, false, NULL);
-        ALIGN_DBGERR(rc);
-    }
-    return rc;
-}
-
-static
-rc_t TableWriterRef_DefaultCoverage(const TableWriterRef* cself, int64_t rowid)
-{
-    rc_t rc = 0;
-    int64_t i;
-    ReferenceSeqCoverage c;
-
-    memset(&c, 0, sizeof(c));
-    for(i = cself->last_coverage_row + 1; rc == 0 && i < rowid; i++) {
-        rc = TableWriterRef_WriteCoverage(cself, i, 0, &c);
-    }
-    return rc;
-}
-
-rc_t CC TableWriterRef_Whack(const TableWriterRef* cself, bool commit, uint64_t* rows)
-{
-    rc_t rc = 0;
-    if( cself != NULL ) {
-        TableWriterRef* self = (TableWriterRef*)cself;
-
-        if( commit && (cself->options & ewref_co_Coverage) ) {
-            int64_t next_row;
-            if( (rc = TableWriter_GetNextRowId(cself->base, &next_row, 0)) == 0 ) {
-                if( (next_row - 1) > cself->last_coverage_row ) {
-                    ALIGN_DBG("adding default coverage to tail of table (%li,%li]", cself->last_coverage_row, next_row);
-                    rc = TableWriterRef_DefaultCoverage(cself, next_row);
-                }
-            }
-        }
-        if( rc == 0 ) {
-            rc = TableWriter_Whack(cself->base, commit, rows);
-        }
-        free(self);
-    }
-    return rc;
-}
-
-static
-rc_t TableWriterRef_WriteDefaults(const TableWriterRef* cself)
-{
-    rc_t rc = 0;
-    if( cself != NULL ) {
-        TableWriterRef* self = (TableWriterRef*)cself;
-        self->max_seq_len = TableWriterRefSeq_MAX_SEQ_LEN;
-        self->seq_start_last = 1;
-        self->last_cs_key = 'T';
-        self->last_seq_id_len = 0;
-        TW_COL_WRITE_DEF_VAR(self->base, cself->cursor_id, self->cols_data[ewrefd_cn_MAX_SEQ_LEN], self->max_seq_len);
-        if( rc == 0 && (cself->options & ewref_co_Coverage) ) {
-            ReferenceSeqCoverage c;
-
-            memset(&c, 0, sizeof(c));
-            TW_COL_WRITE_DEF_VAR(self->base, self->coverage_cursor_id, self->cols_coverage[ewrefcv_cn_CGRAPH_HIGH], c.low);
-            TW_COL_WRITE_DEF_VAR(self->base, self->coverage_cursor_id, self->cols_coverage[ewrefcv_cn_CGRAPH_LOW], c.high);
-            TW_COL_WRITE_DEF_VAR(self->base, self->coverage_cursor_id, self->cols_coverage[ewrefcv_cn_CGRAPH_MISMATCHES], c.mismatches);
-            TW_COL_WRITE_DEF_VAR(self->base, self->coverage_cursor_id, self->cols_coverage[ewrefcv_cn_CGRAPH_INDELS], c.indels);
-            TW_COL_WRITE_DEF_BUF(self->base, self->coverage_cursor_id, self->cols_coverage[ewrefcv_cn_OVERLAP_REF_POS],
-                    c.overlap_ref_pos, sizeof(c.overlap_ref_pos) / sizeof(c.overlap_ref_pos[0]));
-            TW_COL_WRITE_DEF_BUF(self->base, self->coverage_cursor_id, self->cols_coverage[ewrefcv_cn_OVERLAP_REF_LEN],
-                    c.overlap_ref_len, sizeof(c.overlap_ref_len) / sizeof(c.overlap_ref_len[0]));
-            TW_COL_WRITE_DEF(self->base, self->coverage_cursor_id, self->cols_coverage[ewrefcv_cn_PRIMARY_ALIGNMENT_IDS], c.ids[ewrefcov_primary_table]);
-            TW_COL_WRITE_DEF(self->base, self->coverage_cursor_id, self->cols_coverage[ewrefcv_cn_SECONDARY_ALIGNMENT_IDS], c.ids[ewrefcov_secondary_table]);
-            TW_COL_WRITE_DEF(self->base, self->coverage_cursor_id, self->cols_coverage[ewrefcv_cn_EVIDENCE_INTERVAL_IDS], c.ids[ewrefcov_evidence_table]);
-        }
-    }
-    return rc;
-}
-
-rc_t CC TableWriterRef_WriteDefaultData(const TableWriterRef* cself, enum ETableWriterRefData_ColNames col,
-                                        const TableWriterData* data)
-{
-    rc_t rc = 0;
-    if( cself == NULL || data == NULL ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( cself->last_cs_key == '\0' && (rc = TableWriterRef_WriteDefaults(cself)) != 0 ) {
-        ALIGN_DBGERR(rc);
-    } else {
-        TW_COL_WRITE_DEF(cself->base, cself->cursor_id, cself->cols_data[col], (*data));
-        if( col == ewrefd_cn_MAX_SEQ_LEN ) {
-            ((TableWriterRef*)cself)->max_seq_len = *((uint32_t*)data->buffer);
-        }
-    }
-    return rc;
-}
-
-rc_t CC TableWriterRef_WriteDefaultCovarage(const TableWriterRef* cself, enum ETableWriterRefCoverage_ColNames col,
-                                            const TableWriterData* data)
-{
-    rc_t rc = 0;
-    if( cself == NULL || data == NULL ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( cself->last_cs_key == '\0' && (rc = TableWriterRef_WriteDefaults(cself)) != 0 ) {
-        ALIGN_DBGERR(rc);
-    } else {
-        TW_COL_WRITE_DEF(cself->base, cself->coverage_cursor_id, cself->cols_coverage[col], (*data));
-    }
-    return rc;
-}
-
-rc_t CC TableWriterRef_Write(const TableWriterRef* cself, const TableWriterRefData* data, int64_t* rowid)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL || data == NULL ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( cself->last_cs_key == '\0' && (rc = TableWriterRef_WriteDefaults(cself)) != 0 ) {
-        ALIGN_DBGERR(rc);
-    } else if( data->read.elements > cself->max_seq_len ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcData, rcInvalid);
-        ALIGN_DBGERRP("%s is longer than %s", rc, cself->cols_data[ewrefd_cn_READ].name, cself->cols_data[ewrefd_cn_MAX_SEQ_LEN].name);
-    } else if( data->seq_id.elements > sizeof(cself->last_seq_id) ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcBuffer, rcInsufficient);
-        ALIGN_DBGERRP("%s is longer than %s", rc, cself->cols_data[ewrefd_cn_READ].name, cself->cols_data[ewrefd_cn_MAX_SEQ_LEN].name);
-    } else if( (rc = TableWriter_OpenRow(cself->base, rowid, cself->cursor_id)) == 0 ) {
-        const INSDC_dna_text* b = data->read.buffer;
-        INSDC_coord_len const len = data->read.elements;
-        bool write_read = data->seq_id.elements < 1 || data->force_READ_write;
-        INSDC_coord_len trim_len = len;
-        
-        if( cself->last_seq_id_len != data->seq_id.elements ||
-            strncmp(cself->last_seq_id, data->seq_id.buffer, cself->last_seq_id_len) != 0 ) {
-            /* new seq_id: reset counters and mem it */
-            TableWriterRef* self = (TableWriterRef*)cself;
-            self->last_seq_id_len = data->seq_id.elements;
-            memcpy(self->last_seq_id, data->seq_id.buffer, cself->last_seq_id_len);
-            self->seq_start_last = 1;
-            self->last_cs_key = 'T';
-        }
-        /* trunc trailing N */
-        b += len - 1;
-        while( trim_len > 0 && (*b == 'N' || *b == 'n' || *b == '.') ) {
-            trim_len--; b--;
-        }
-        TW_COL_WRITE(cself->base, cself->cols_data[ewrefd_cn_NAME], data->name);
-        TW_COL_WRITE_BUF(cself->base, cself->cols_data[ewrefd_cn_READ], data->read.buffer, (write_read ? trim_len : 0));
-        TW_COL_WRITE(cself->base, cself->cols_data[ewrefd_cn_QUALITY], data->quality);
-        TW_COL_WRITE(cself->base, cself->cols_data[ewrefd_cn_SEQ_ID], data->seq_id);
-        if( trim_len == 0 ) {
-            TW_COL_WRITE_VAR(cself->base, cself->cols_data[ewrefd_cn_SEQ_START], trim_len);
-        } else {
-            TW_COL_WRITE_VAR(cself->base, cself->cols_data[ewrefd_cn_SEQ_START], cself->seq_start_last);
-        }
-        TW_COL_WRITE_VAR(cself->base, cself->cols_data[ewrefd_cn_SEQ_LEN], len);
-        TW_COL_WRITE_VAR(cself->base, cself->cols_data[ewrefd_cn_CS_KEY], cself->last_cs_key);
-        TW_COL_WRITE_VAR(cself->base, cself->cols_data[ewrefd_cn_CIRCULAR], data->circular);
-        if( rc == 0 && (rc = TableWriter_CloseRow(cself->base)) == 0 ) {
-            TableWriterRef* self = (TableWriterRef*)cself;
-            
-            self->last_cs_key = ((const char*)(data->read.buffer))[data->read.elements - 1];
-            switch (self->last_cs_key) {
-            case 'A':
-            case 'C':
-            case 'G':
-            case 'T':
-                break;
-            default:
-                self->last_cs_key = 'T';
-                break;
-            }
-            self->seq_start_last += data->read.elements;
-        }
-    }
-    return rc;
-}
-
-rc_t CC TableWriterRef_WriteCoverage(const TableWriterRef* cself, int64_t rowid, INSDC_coord_zero offset, const ReferenceSeqCoverage* coverage)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL || coverage == NULL ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( cself->last_cs_key == '\0' && (rc = TableWriterRef_WriteDefaults(cself)) != 0 ) {
-        ALIGN_DBGERR(rc);
-    } else if( !(cself->options & ewref_co_Coverage) ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcData, rcUnexpected);
-        ALIGN_DBGERRP("coverage %s", rc, "data");
-    } else if( offset > cself->seq_start_last ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcData, rcInvalid);
-        ALIGN_DBGERRP("%i is beyond last written chunk", rc, offset);
-    } else {
-        if( (rowid + offset / cself->max_seq_len) - cself->last_coverage_row > 1 ) {
-            /* fill in gap in coverage rows with default values */
-            ALIGN_DBG("gap in coverage rows (%li,%li) -> use defaults", cself->last_coverage_row, rowid + offset / cself->max_seq_len);
-            rc = TableWriterRef_DefaultCoverage(cself, rowid + offset / cself->max_seq_len);
-        }
-        if( rc == 0 && (rc = TableWriter_OpenRowId(cself->base, rowid + offset / cself->max_seq_len, cself->coverage_cursor_id)) == 0 ) {
-            TW_COL_WRITE_VAR(cself->base, cself->cols_coverage[ewrefcv_cn_CGRAPH_HIGH], coverage->high);
-            TW_COL_WRITE_VAR(cself->base, cself->cols_coverage[ewrefcv_cn_CGRAPH_LOW], coverage->low);
-            TW_COL_WRITE_VAR(cself->base, cself->cols_coverage[ewrefcv_cn_CGRAPH_MISMATCHES], coverage->mismatches);
-            TW_COL_WRITE_VAR(cself->base, cself->cols_coverage[ewrefcv_cn_CGRAPH_INDELS], coverage->indels);
-            TW_COL_WRITE_BUF(cself->base, cself->cols_coverage[ewrefcv_cn_OVERLAP_REF_POS],
-                    coverage->overlap_ref_pos, sizeof(coverage->overlap_ref_pos) / sizeof(coverage->overlap_ref_pos[0]));
-            TW_COL_WRITE_BUF(cself->base, cself->cols_coverage[ewrefcv_cn_OVERLAP_REF_LEN],
-                    coverage->overlap_ref_len, sizeof(coverage->overlap_ref_len) / sizeof(coverage->overlap_ref_len[0]));
-            TW_COL_WRITE(cself->base, cself->cols_coverage[ewrefcv_cn_PRIMARY_ALIGNMENT_IDS], coverage->ids[ewrefcov_primary_table]);
-            TW_COL_WRITE(cself->base, cself->cols_coverage[ewrefcv_cn_SECONDARY_ALIGNMENT_IDS], coverage->ids[ewrefcov_secondary_table]);
-            TW_COL_WRITE(cself->base, cself->cols_coverage[ewrefcv_cn_EVIDENCE_INTERVAL_IDS], coverage->ids[ewrefcov_evidence_table]);
-            if( rc == 0 ) {
-                TableWriterRef* self = (TableWriterRef*)cself;
-                self->last_coverage_row = rowid + offset / cself->max_seq_len;
-                rc = TableWriter_CloseRow(cself->base);
-            }
-        }
-    }
-    return rc;
-}
-
-struct TableWriterRefCoverage {
-    const TableWriter* base;
-    bool init; /* default written indicator */
-    uint8_t cursor_id;
-    TableWriterColumn cols[ewrefcv_cn_ReCover + 1];
-};
-
-rc_t CC TableWriterRefCoverage_MakeCoverage(const TableWriterRefCoverage** cself, VDatabase* db, const uint32_t options)
-{
-    rc_t rc = 0;
-    TableWriterRefCoverage* self = NULL;
-
-    if( cself == NULL ) {
-        rc = RC(rcAlign, rcFormatter, rcConstructing, rcParam, rcNull);
-    } else {
-        self = calloc(1, sizeof(*self));
-        if( self == NULL ) {
-            rc = RC(rcAlign, rcFormatter, rcConstructing, rcMemory, rcExhausted);
-        } else {
-            memcpy(self->cols, TableWriterRefCoverage_cols, sizeof(self->cols));
-            if( (rc = TableWriter_MakeUpdate(&self->base, db, "REFERENCE")) == 0 ) {
-                rc = TableWriter_AddCursor(self->base, self->cols,
-                        sizeof(self->cols) / sizeof(self->cols[0]), &self->cursor_id);
-            }
-        }
-    }
-    if( rc == 0 ) {
-        *cself = self;
-        ALIGN_R_DBG("table %s", "opened");
-    } else {
-        TableWriterRefCoverage_Whack(self, false, NULL);
-        ALIGN_DBGERR(rc);
-    }
-    return rc;
-}
-rc_t CC TableWriterRefCoverage_MakeIds(const TableWriterRefCoverage** cself, VDatabase* db, const char  * col_name)
-{
-    rc_t rc = 0;
-    TableWriterRefCoverage* self = NULL;
-
-    if( cself == NULL ) {
-        rc = RC(rcAlign, rcFormatter, rcConstructing, rcParam, rcNull);
-    } else {
-        self = calloc(1, sizeof(*self));
-        if( self == NULL ) {
-            rc = RC(rcAlign, rcFormatter, rcConstructing, rcMemory, rcExhausted);
-        } else {
-            if( (rc = TableWriter_MakeUpdate(&self->base, db, "REFERENCE")) == 0 ) {
-                self->cols[0].idx = 0;
-                self->cols[0].name = col_name;
-                self->cols[0].element_bits = 8 * sizeof(int64_t);
-                self->cols[0].flags=ewcol_IsArray;
-                rc = TableWriter_AddCursor(self->base, self->cols,1, &self->cursor_id);
-            }
-        }
-    }
-    if( rc == 0 ) {
-        *cself = self;
-        ALIGN_R_DBG("table %s", "opened");
-    } else {
-        TableWriterRefCoverage_Whack(self, false, NULL);
-        ALIGN_DBGERR(rc);
-    }
-    return rc;
-}
-
-
-rc_t CC TableWriterRefCoverage_Whack(const TableWriterRefCoverage* cself, bool commit, uint64_t* rows)
-{
-    rc_t rc = 0;
-    if( cself != NULL ) {
-        TableWriterRefCoverage* self = (TableWriterRefCoverage*)cself;
-        rc = TableWriter_Whack(cself->base, commit, rows);
-        free(self);
-    }
-    return rc;
-}
-
-
-rc_t CC TableWriterRefCoverage_WriteCoverage(const TableWriterRefCoverage* cself, int64_t rowid, const ReferenceSeqCoverage* coverage)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL || coverage == NULL ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    }
-    else {
-        if( !cself->init ) {
-            /* set the defaults */
-            ReferenceSeqCoverage c;
-            
-            memset(&c, 0, sizeof(c));
-            TW_COL_WRITE_DEF_VAR(cself->base, cself->cursor_id, cself->cols[ewrefcv_cn_CGRAPH_HIGH], c.low);
-            TW_COL_WRITE_DEF_VAR(cself->base, cself->cursor_id, cself->cols[ewrefcv_cn_CGRAPH_LOW], c.high);
-            TW_COL_WRITE_DEF_VAR(cself->base, cself->cursor_id, cself->cols[ewrefcv_cn_CGRAPH_MISMATCHES], c.mismatches);
-            TW_COL_WRITE_DEF_VAR(cself->base, cself->cursor_id, cself->cols[ewrefcv_cn_CGRAPH_INDELS], c.indels);
-            TW_COL_WRITE_DEF_BUF(cself->base, cself->cursor_id, cself->cols[ewrefcv_cn_OVERLAP_REF_POS],
-                                 c.overlap_ref_pos, sizeof(c.overlap_ref_pos) / sizeof(c.overlap_ref_pos[0]));
-            TW_COL_WRITE_DEF_BUF(cself->base, cself->cursor_id, cself->cols[ewrefcv_cn_OVERLAP_REF_LEN],
-                                 c.overlap_ref_len, sizeof(c.overlap_ref_len) / sizeof(c.overlap_ref_len[0]));
-            
-            ((TableWriterRefCoverage*)cself)->init = true;
-        }
-        if( rc == 0 && (rc = TableWriter_OpenRowId(cself->base, rowid, cself->cursor_id)) == 0 ) {
-            TW_COL_WRITE_VAR(cself->base, cself->cols[ewrefcv_cn_CGRAPH_HIGH], coverage->high);
-            TW_COL_WRITE_VAR(cself->base, cself->cols[ewrefcv_cn_CGRAPH_LOW], coverage->low);
-            TW_COL_WRITE_VAR(cself->base, cself->cols[ewrefcv_cn_CGRAPH_MISMATCHES], coverage->mismatches);
-            TW_COL_WRITE_VAR(cself->base, cself->cols[ewrefcv_cn_CGRAPH_INDELS], coverage->indels);
-            TW_COL_WRITE_BUF(cself->base, cself->cols[ewrefcv_cn_OVERLAP_REF_POS],
-                             coverage->overlap_ref_pos, sizeof(coverage->overlap_ref_pos) / sizeof(coverage->overlap_ref_pos[0]));
-            TW_COL_WRITE_BUF(cself->base, cself->cols[ewrefcv_cn_OVERLAP_REF_LEN],
-                             coverage->overlap_ref_len, sizeof(coverage->overlap_ref_len) / sizeof(coverage->overlap_ref_len[0]));
-            
-            if( rc == 0 ) {
-                rc = TableWriter_CloseRow(cself->base);
-            }
-        }
-    }
-    return rc;
-}
-rc_t CC TableWriterRefCoverage_WriteIds(const TableWriterRefCoverage* cself, int64_t rowid, const int64_t* buf,uint32_t num)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL || (buf  == NULL && num > 0)) {
-        rc = RC(rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    }
-    else {
-        if( !cself->init ) {
-            /* set the defaults */
-            TW_COL_WRITE_DEF_BUF(cself->base, cself->cursor_id, cself->cols[0],NULL,0);
-            ((TableWriterRefCoverage*)cself)->init = true;
-        }
-        if( rc == 0 && (rc = TableWriter_OpenRowId(cself->base, rowid, cself->cursor_id)) == 0 ) {
-            TW_COL_WRITE_BUF(cself->base, cself->cols[0],buf,num);
-            if( rc == 0 ) {
-                rc = TableWriter_CloseRow(cself->base);
-            }
-        }
-    }
-    return rc;
-}
-
diff --git a/libs/align/writer-ref.h b/libs/align/writer-ref.h
deleted file mode 100644
index e059a0b..0000000
--- a/libs/align/writer-ref.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_align_writer_ref_
-#define _h_align_writer_ref_
-
-#include <vdb/database.h>
-#include <align/writer-alignment.h>
-#include <align/writer-reference.h>
-
-enum ETableWriterRefData_ColNames {
-    ewrefd_cn_MAX_SEQ_LEN, /* static/default value from refseq writer */
-    ewrefd_cn_NAME,
-    ewrefd_cn_CS_KEY, /* handled by writer */
-    ewrefd_cn_READ,
-    ewrefd_cn_QUALITY,
-    ewrefd_cn_SEQ_ID,
-    ewrefd_cn_SEQ_START, /* calculated on fly by writer */
-    ewrefd_cn_SEQ_LEN, /* calculated on fly by writer */
-    ewrefd_cn_CIRCULAR, 
-    ewrefd_cn_Last = ewrefd_cn_CIRCULAR
-};
-
-enum ETableWriterRefCoverage_ColNames {
-    /* coverage data starts here */
-    ewrefcv_cn_CGRAPH_HIGH=0,
-    ewrefcv_cn_CGRAPH_LOW,
-    ewrefcv_cn_CGRAPH_MISMATCHES,
-    ewrefcv_cn_CGRAPH_INDELS,
-    ewrefcv_cn_OVERLAP_REF_POS,
-    ewrefcv_cn_OVERLAP_REF_LEN,
-    ewrefcv_cn_ReCover = ewrefcv_cn_OVERLAP_REF_LEN,
-    ewrefcv_cn_PRIMARY_ALIGNMENT_IDS,
-    ewrefcv_cn_SECONDARY_ALIGNMENT_IDS,
-    ewrefcv_cn_EVIDENCE_INTERVAL_IDS,
-    ewrefcv_cn_Last = ewrefcv_cn_EVIDENCE_INTERVAL_IDS
-};
-
-enum ETableWriterRef_ColOptions {
-    ewref_co_SaveRead = 0x01, /* always write READ */
-    ewref_co_QUALITY = 0x02,  /* use QUALITY column, by default not opened */
-    ewref_co_Coverage = 0x04  /* use coverage columns, by default not opened */
-};
-
-typedef struct TableWriterRefData_struct {
-    TableWriterData name;
-    bool force_READ_write;
-    TableWriterData read;
-    TableWriterData quality;
-    TableWriterData seq_id;
-    bool circular;
-} TableWriterRefData;
-
-typedef struct TableWriterRef TableWriterRef;
-
-rc_t CC TableWriterRef_Make(const TableWriterRef** cself, VDatabase* db, const uint32_t options);
-
-/* rows optional here */
-rc_t CC TableWriterRef_Whack(const TableWriterRef* cself, bool commit, uint64_t* rows);
-
-rc_t CC TableWriterRef_WriteDefaultData(const TableWriterRef* cself, enum ETableWriterRefData_ColNames col,
-                                        const TableWriterData* data);
-
-rc_t CC TableWriterRef_WriteDefaultCovarage(const TableWriterRef* cself, enum ETableWriterRefCoverage_ColNames col,
-                                            const TableWriterData* data);
-
-/* rowid optional here */
-rc_t CC TableWriterRef_Write(const TableWriterRef* cself, const TableWriterRefData* data, int64_t* rowid);
-
-rc_t CC TableWriterRef_WriteCoverage(const TableWriterRef* cself, int64_t rowid, INSDC_coord_zero offset, const ReferenceSeqCoverage* coverage);
-
-
-
-
-typedef struct TableWriterRefCoverage TableWriterRefCoverage;
-
-rc_t CC TableWriterRefCoverage_MakeCoverage(const TableWriterRefCoverage** cself, VDatabase* db, const uint32_t options);
-rc_t CC TableWriterRefCoverage_MakeIds(const TableWriterRefCoverage** cself, VDatabase* db, const char *col_name);
-/* rows optional here */
-rc_t CC TableWriterRefCoverage_Whack(const TableWriterRefCoverage* cself, bool commit, uint64_t* rows);
-rc_t CC TableWriterRefCoverage_WriteCoverage(const TableWriterRefCoverage* cself, int64_t rowid, const ReferenceSeqCoverage* coverage);
-rc_t CC TableWriterRefCoverage_WriteIds(const TableWriterRefCoverage* cself, int64_t rowid, const int64_t* buf,uint32_t num);
-
-#endif /* _h_align_writer_ref_ */
diff --git a/libs/align/writer-reference.c b/libs/align/writer-reference.c
deleted file mode 100644
index 329b931..0000000
--- a/libs/align/writer-reference.c
+++ /dev/null
@@ -1,3186 +0,0 @@
-/*==============================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*/
-#include <align/extern.h>
-
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <klib/sort.h>
-#include <klib/data-buffer.h>
-#include <klib/container.h>
-#include <klib/checksum.h>
-#include <klib/text.h>
-#include <kfs/mmap.h>
-#include <kfs/file.h>
-#include <kdb/manager.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/manager.h>
-#include <vdb/vdb-priv.h>
-#include <sra/sradb.h>
-
-#include <align/writer-reference.h>
-#include <align/writer-refseq.h>
-#include <align/refseq-mgr.h>
-#include <align/align.h>
-#include "refseq-mgr-priv.h"
-#include "writer-ref.h"
-#include "reader-cmn.h"
-#include "reference-cmn.h"
-#include "debug.h"
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-/*
- * ReferenceSeq objects:
- *  ReferenceSeq objects may be unattached, i.e. they might not yet represent an
- *  actual sequence.
- *
- *  ReferenceSeq objects may be attached, i.e. they represent a sequence from
- *  either RefSeq or a fasta file.
- *
- *  A ReferenceSeq object may be refered to by more than one id, but a
- *  ReferenceSeq object has only one canonical id.
- *
- *  More than one ReferenceSeq object may be associated with the same seqId.
- *
- *  More than one ReferenceSeq object may be attached to the same sequence.
- *  This will cause the REFERENCE table to have more than one copy of the
- *  sequence.
- *
- *  ReferenceSeq objects may be created from the config file.  These objects
- *  will have an id, a seqId, but no fastaSeqId.  These are unattached.
- *
- *  ReferenceSeq objects may be created from explicit fasta files.  These
- *  objects will have a fastaSeqId, but *** NO id OR seqId ***. These are
- *  attached.
- *
- *  ReferenceSeq objects may be created on the fly by requesting an id that
- *  isn't already in the collection.  These objects will have the requested id.
- *
- * When a reference is requested (by id):
- *  Resolve the id to a ReferenceSeq object.
- *  If the object is unattached, attach it to a sequence.
- *  If the sequence is not yet written to the REFERENCE table, write it to the
- *  REFERENCE table.  NAME gets id; SEQID gets seqId unless seqId is null, then
- *  SEQID gets id.
- *
- * Resolving id's to ReferenceSeq objects:
- *  Search the id index and if the found object is attached, return it.
- *  Search the identifiers in the fastaSeqIds or seqIds.
- *  If different objects were found from both searches, use sequence length and
- *  MD5 to break the tie (if both match then use RefSeq).  If no sequence length
- *  or MD5 then fail.
- *  If no objects were found from either search, then create a new unattached
- *  ReferenceSeq object.
- *  If the object's id is null, set it to the id.
- *  It the object was not found in the id index, add it.
- *
- * Attaching ReferenceSeq objects to sequences:
- *  Search RefSeq for seqId.
- *  Else search RefSeq for id.
- *  Else search for seqId in the loaded fasta files.
- *  Else search data directory for id.fasta or id.fa; load it or fail.
- *  Else search data directory for seqId.fasta or seqId.fa; load it or fail.
- *  Else fail.
- *  If failed, mark the object as dead.
- *
- *
- *
- * Config file:
- *  The config file consists of lines containing whitespace (preferably tab)
- *  seperated fields.  The fields are:
- *      NAME (unique)
- *      SEQID
- *      extra (optional)
- *
- *  There is one ReferenceSeq object created per record in the config file.
- *  NAME is stored in id; SEQID is stored in seqId; if extra contains the word
- *  'circular' (case-insensitive), true is stored in circular.  These
- *  ReferenceSeq object are created in the unattached state, i.e. not attached
- *  to a fasta file or a RefSeq library object.
- *
- *  If SEQID is equal to UNMAPPED_SEQID_VALUE (see below) the Reference will be
- *  considered to be unmapped.
- *
- * Fasta files:
- *  Fasta file consists of one of more sequences.  A sequence in a fasta file
- *  consists of a seqid line followed by lines containing the bases of the
- *  sequence.  A seqid line starts with '>' and the next word (whitespace
- *  delimited) is the seqid.  The seqid may consist of '|' delimited identifiers
- *  (this is purposely vague).  The fasta seqid is stored in fastaSeqId.
- *
- * Fasta files may be loaded explicitly:
- *  When a fasta file is loaded explicitly, a new ReferenceSeq object is created
- *  (with id == NULL) for each sequence found in the file.
- *
- * Fasta files may be loaded implicitly:
- *  When an id can't be found in the set of ReferenceSeq objects and can't be
- *  found as an accession by RefSeq, an attempt is made to load a fasta file
- *  named <id>.fasta or <id>.fa in the directory given to the constructor.  If
- *  this succeeds, a new ReferenceSeq object with the given id is attached to
- *  the sequence.  In this situation, to avoid ambiquity, there can be only one
- *  sequence in the fasta file.
- *
- */
-
-#define UNMAPPED_SEQID_VALUE "*UNMAPPED"
-
-enum ReferenceSeqType {
-    rst_unattached,
-    rst_local,
-    rst_refSeqById,
-    rst_refSeqBySeqId,
-    rst_unmapped,
-    rst_renamed,
-    rst_dead
-};
-
-struct ReferenceSeq {
-    ReferenceMgr *mgr;
-    char *id;
-    char *seqId;
-    char *fastaSeqId;
-
-    char **used;
-    unsigned num_used;
-    
-    /* ref table position */
-    int64_t start_rowid;
-    /* total reference length */
-    INSDC_coord_len seq_len;
-    int type;
-    bool circular;
-    uint8_t md5[16];
-    union {
-        struct {
-            KDataBuffer buf;
-            uint8_t const *data;
-        } local;
-        RefSeq const *refseq;
-    } u;
-};
-
-#define BUCKET_BITS (12U)
-#define BUCKETS (1U << BUCKET_BITS)
-#define BUCKET_MASK (BUCKETS - 1U)
-
-typedef struct {
-    unsigned count;
-    unsigned *index;
-} Bucket;
-
-typedef struct {
-    int length, type;
-} compress_buffer_t;
-
-struct ReferenceMgr {
-    TableWriterRef const *writer;
-    KDirectory const *dir;
-    RefSeqMgr const *rmgr;
-    VDatabase *db;
-    ReferenceSeq *refSeq;       /* == refSeqs.base      */
-    
-    int64_t ref_rowid;
-    
-    size_t cache;
-    
-    uint32_t options;
-    uint32_t num_open_max;
-    uint32_t num_open;
-    uint32_t max_seq_len;
-    
-    KDataBuffer compress;       /* [compress_buffer_t]  */
-    KDataBuffer seq;            /* [byte](max_seq_len)  */
-    KDataBuffer refSeqs;        /* [ReferenceSeq]       */
-
-    Bucket used[BUCKETS];
-    Bucket ht[BUCKETS];
-};
-
-static unsigned hash(unsigned const length, char const key[])
-{
-    /* FNV-1a hash with folding */
-    uint64_t h = 0xcbf29ce484222325ull;
-    unsigned i;
-    
-    for (i = 0; i < length; ++i) {
-        int const ch = key[i];
-        uint64_t const octet = (uint8_t)toupper(ch);
-
-        h = (h ^ octet) * 0x100000001b3ull;
-    }
-    return (unsigned)(((h ^ (h >> 32))) & ((uint64_t)BUCKET_MASK));
-}
-
-static unsigned hash0(char const key[])
-{
-    /* FNV-1a hash with folding */
-    uint64_t h = 0xcbf29ce484222325ull;
-    unsigned i;
-    
-    for (i = 0; ; ++i) {
-        int const ch = key[i];
-        if (ch != '\0') {
-            uint64_t const octet = (uint8_t)toupper(ch);
-            h = (h ^ octet) * 0x100000001b3ull;
-            continue;
-        }
-        break;
-    }
-    return (unsigned)(((h ^ (h >> 32))) & ((uint64_t)BUCKET_MASK));
-}
-
-static void addToHashBucket(Bucket *const bucket, unsigned const index)
-{
-    unsigned i;
-    void *tmp = NULL;
-    
-    for (i = 0; i < bucket->count; ++i) {
-        if (bucket->index[i] == index)
-            return;
-    }
-    
-    tmp = realloc(bucket->index, (1 + bucket->count) * sizeof(bucket->index[0]));
-    assert(tmp != NULL);
-	if (tmp == NULL)
-        abort();
-
-    bucket->index = tmp;
-    bucket->index[bucket->count++] = index;
-}
-
-static void addToHashTable(ReferenceMgr *const self, ReferenceSeq const *const rs)
-{
-    unsigned const index = rs - self->refSeq;
-    
-    if (rs->id)
-        addToHashBucket(&self->ht[hash0(rs->id)], index);
-    if (rs->seqId)
-        addToHashBucket(&self->ht[hash0(rs->seqId)], index);
-}
-
-static
-void CC ReferenceSeq_Whack(ReferenceSeq *self)
-{
-    unsigned i;
-    
-    for (i = 0; i < self->num_used; ++i)
-        free(self->used[i]);
-
-    if (self->type == rst_local) {
-        KDataBufferWhack(&self->u.local.buf);
-    }
-    else if (self->type == rst_refSeqById || self->type == rst_refSeqBySeqId) {
-        RefSeq_Release(self->u.refseq);
-    }
-    free(self->id);
-    free(self->seqId);
-    free(self->fastaSeqId);
-    free(self->used);
-}
-
-struct OpenConfigFile_ctx {
-    char const *name;
-    KDirectory const *dir;
-    KFile const **kfp;
-    rc_t rc;
-};
-
-static
-bool OpenConfigFile(char const server[], char const volume[], void *Ctx)
-{
-    struct OpenConfigFile_ctx *ctx = Ctx;
-    KDirectory const *dir;
-    
-    if(volume == NULL) {
-        ctx->rc = KDirectoryOpenDirRead(ctx->dir, &dir, false, "%s", server);
-    } else {
-        ctx->rc = KDirectoryOpenDirRead(ctx->dir, &dir, false, "%s/%s", server, volume);
-    }
-    if (ctx->rc == 0) {
-        ctx->rc = KDirectoryOpenFileRead(dir, ctx->kfp, "%s", ctx->name);
-        KDirectoryRelease(dir);
-        if (ctx->rc == 0) {
-            return true;
-        }
-    }
-    return false;
-}
-
-static
-rc_t FindAndOpenConfigFile(RefSeqMgr const *const rmgr,
-                           KDirectory const *const dir,
-                           KFile const **const kfp, char const conf[])
-{
-    rc_t rc = KDirectoryOpenFileRead(dir, kfp, "%s", conf);
-    
-    if (rc) {
-        struct OpenConfigFile_ctx ctx;
-
-        ctx.name = conf;
-        ctx.dir = dir;
-        ctx.kfp = kfp;
-        ctx.rc = 0;
-        
-        rc = RefSeqMgr_ForEachVolume(rmgr, OpenConfigFile, &ctx);
-        if (rc == 0 && *kfp == NULL) {
-            rc = RC(rcAlign, rcIndex, rcConstructing, rcFile, rcNotFound);
-        }
-    }
-    return rc;
-}
-
-enum comparison_weights {
-    no_match        = 0,
-    substring_match = (1u << 0),
-    expected_prefix = (1u << 1),
-    exact_match     = (1u << 2),
-    seqId_match     = (1u << 3),
-    id_match        = (1u << 4),
-    seq_len_match   = (1u << 5),
-    md5_match       = (1u << 6),
-    attached        = (1u << 7)
-};
-
-static
-unsigned str_weight(char const str[], char const qry[], unsigned const qry_len)
-{
-    char const *const fnd = strcasestr(str, qry);
-    unsigned wt = no_match;
-    
-    if (fnd) {
-        unsigned const fnd_len = (unsigned)string_size(fnd);
-        unsigned const fndlen = (fnd_len > qry_len && fnd[qry_len] == '|') ? qry_len : fnd_len;
-        
-        if (fndlen == qry_len && (fnd == str || fnd[-1] == '|')) {
-            wt |= substring_match;
-            
-            if (fnd == str) {
-                if (fnd[fndlen] == '\0')
-                    wt |= exact_match;
-            }
-            else {
-                /* check for expected prefices */
-                char const *ns = fnd - 1;
-                
-                while (ns != str && ns[-1] != '|')
-                    --ns;
-                
-                if (   memcmp(ns, "ref|", 4) == 0
-                    || memcmp(ns, "emb|", 4) == 0
-                    || memcmp(ns, "dbj|", 4) == 0
-                    || memcmp(ns, "tpg|", 4) == 0
-                    || memcmp(ns, "tpe|", 4) == 0
-                    || memcmp(ns, "tpd|", 4) == 0
-                    || memcmp(ns, "gpp|", 4) == 0
-                    || memcmp(ns,  "gb|", 3) == 0
-                   )
-                {
-                    wt |= expected_prefix;
-                }
-            }
-        }
-    }
-    return wt;
-}
-
-static void addToIndex(ReferenceMgr *const self, char const ID[],
-                       ReferenceSeq *const rs)
-{
-    unsigned const n = rs->num_used;
-    unsigned i;
-
-    for (i = 0; i < n; ++i) {
-        if (strcmp(ID, rs->used[i]) == 0)
-            goto SKIP_INSERT_ID;
-    }
-    {
-        unsigned const length = (unsigned)string_size(ID);
-        char *id = string_dup(ID, length);
-        void *tmp = realloc(rs->used, (n + 1) * sizeof(rs->used[0]));
-
-        assert(tmp != NULL && id != NULL);
-        if (tmp == NULL || id == NULL) abort();
-
-        ++rs->num_used;
-        rs->used = tmp;
-        rs->used[n] = id;
-    }
-SKIP_INSERT_ID:
-    addToHashBucket(&self->used[hash0(ID)], rs - self->refSeq);
-}
-
-static int findId(ReferenceMgr const *const self, char const id[])
-{
-    unsigned const hv = hash0(id);
-    Bucket const *const bucket = &self->used[hv];
-    unsigned const n = bucket->count;
-    unsigned i;
-    
-    for (i = 0; i < n; ++i) {
-        unsigned const index = bucket->index[i];
-        ReferenceSeq const *rs = &self->refSeq[index];
-        unsigned const m = rs->num_used;
-        unsigned j;
-        
-        if (rs->type == rst_dead)
-            continue;
-        for (j = 0; j < m; ++j) {
-            if (strcmp(id, rs->used[j]) == 0)
-                return index;
-        }
-    }
-    return -1;
-}
-
-static ReferenceSeq *newReferenceSeq(ReferenceMgr *const self, ReferenceSeq const *const template)
-{
-    unsigned const last_rs = (unsigned)self->refSeqs.elem_count;
-    rc_t const rc = KDataBufferResize(&self->refSeqs, last_rs + 1);
-
-    assert(rc == 0);
-    if (rc) abort();
-
-    self->refSeq = self->refSeqs.base;
-    {
-        ReferenceSeq *const rslt = &self->refSeq[last_rs];
-        if (template)
-            *rslt = *template;
-        else
-            memset(rslt, 0, sizeof(*rslt));
-        rslt->mgr = self;
-        return rslt;
-    }
-}
-
-static
-int64_t CC config_cmp(void const *A, void const *B, void *Data)
-{
-    struct {
-        unsigned id;
-        unsigned seqId;
-        unsigned extra;
-        unsigned extralen;
-    } const *const a = A;
-    struct {
-        unsigned id;
-        unsigned seqId;
-        unsigned extra;
-        unsigned extralen;
-    } const *const b = B;
-    char const *const data = Data;
-    
-    return strcmp(&data[a->id], &data[b->id]);
-}
-
-static
-rc_t ReferenceMgr_ProcessConf(ReferenceMgr *const self, char Data[], unsigned const len)
-{
-    rc_t rc;
-    unsigned i;
-    unsigned j;
-    struct {
-        unsigned id;
-        unsigned seqId;
-        unsigned extra;
-        unsigned extralen;
-    } *data, tmp;
-    KDataBuffer buf;
-    
-    memset(&buf, 0, sizeof(buf));
-    buf.elem_bits = sizeof(data[0]) * 8;
-    
-    for (j = i = 0; i < len; ++j) {
-        unsigned lineEnd;
-        unsigned id;
-        unsigned acc;
-        unsigned ii;
-        
-        for (lineEnd = i; lineEnd != len; ++lineEnd) {
-            int const ch = Data[lineEnd];
-            
-            if (ch == '\n')
-                break;
-            if (ch == '\r')
-                break;
-        }
-        if (i == lineEnd) {
-            ++i;
-            continue;
-        }
-        Data[lineEnd] = '\0';
-        for (id = i; id != lineEnd; ++id) {
-            int const ch = Data[id];
-            
-            if (!isspace(ch))
-                break;
-        }
-        for (ii = id; ii != lineEnd; ++ii) {
-            int const ch = Data[ii];
-            
-            if (isspace(ch)) {
-                Data[ii++] = '\0';
-                break;
-            }
-        }
-        for (acc = ii; acc < lineEnd; ++acc) {
-            int const ch = Data[acc];
-            
-            if (!isspace(ch))
-                break;
-        }
-        if (acc >= lineEnd)
-            return RC(rcAlign, rcFile, rcReading, rcFormat, rcInvalid);
-        
-        for (ii = acc; ii != lineEnd; ++ii) {
-            int const ch = Data[ii];
-            
-            if (isspace(ch)) {
-                Data[ii++] = '\0';
-                break;
-            }
-        }
-        tmp.id = id;
-        tmp.seqId = acc;
-        tmp.extra = ii;
-        tmp.extralen = lineEnd > ii ? lineEnd - ii : 0;
-        
-        if ((rc = KDataBufferResize(&buf, buf.elem_count + 1)) != 0) return rc;
-        data = buf.base;
-        
-        data[buf.elem_count-1] = tmp;
-        i = lineEnd + 1;
-    }
-    
-    /* check unique */
-    ksort(data, buf.elem_count, sizeof(data[0]), config_cmp, Data);
-    for (i = 1; i < buf.elem_count; ++i) {
-        if (strcmp(&Data[data[i-1].id], &Data[data[i].id]) == 0)
-            return RC(rcAlign, rcIndex, rcConstructing, rcItem, rcExists);
-    }
-
-    for (i = 0; i != buf.elem_count; ++i) {
-        unsigned const extralen = data[i].extralen;
-        char const *const id    = &Data[data[i].id];
-        char const *const seqId = &Data[data[i].seqId];
-        char const *const extra = extralen ? &Data[data[i].extra] : NULL;
-        bool circular = false;
-        ReferenceSeq *rs;
-        
-        if (extra && extralen >= 8) {
-            char const *const circ = strcasestr(extra, "circular");
-            
-            circular = circ && (circ == extra || isspace(circ[-1])) &&
-                       (circ[8] == '\0' || isspace(circ[8]));
-        }
-        rs = newReferenceSeq(self, NULL);
-
-        rs->id = string_dup(id, string_size(id));
-        if (rs->id == NULL)
-            return RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
-
-        if (strcmp(seqId, UNMAPPED_SEQID_VALUE) == 0) {
-            rs->type = rst_unmapped;
-        }
-        else {
-            rs->seqId = string_dup(seqId, string_size(seqId));
-            if (rs->seqId == NULL)
-                return RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
-        }
-        rs->circular = circular;
-        
-        addToHashTable(self, rs);
-    }
-    KDataBufferWhack(&buf);
-    return 0;
-}
-
-static
-rc_t ReferenceMgr_Conf(ReferenceMgr *const self, char const conf[])
-{
-    rc_t rc;
-    const KFile* kf = NULL;
-
-    if (conf == NULL)
-        return 0;
-    
-    rc = FindAndOpenConfigFile(self->rmgr, self->dir, &kf, conf);
-    if (rc == 0) {
-        uint64_t sz;
-        KDataBuffer buf;
-        
-        rc = KFileSize(kf, &sz);
-        assert(rc == 0);
-        if (sz == 0)
-            (void)PLOGMSG(klogWarn, (klogWarn, "Configuration file '$(file)' is empty", "file=%s", conf));
-        else {
-            rc = KDataBufferMakeBytes(&buf, sz + 1);
-            if (rc == 0) {
-                size_t nread;
-                
-                rc = KFileReadAll(kf, 0, buf.base, sz, &nread);
-                if (rc == 0) {
-                    assert(nread == sz);
-                    ((char *)buf.base)[sz] = '\n'; /* make sure that last line is terminated */
-                    rc = ReferenceMgr_ProcessConf(self, buf.base, (unsigned)(sz + 1));
-                }
-                KDataBufferWhack(&buf);
-            }
-        }
-        KFileRelease(kf);
-    }
-    return rc;
-}
-
-static
-rc_t FastaFile_GetSeqIds(KDataBuffer *const buf, char const data[], uint64_t const len)
-{
-    uint64_t pos;
-    int st = 0;
-    
-    for (pos = 0; pos < len; ++pos) {
-        int const ch = data[pos];
-        
-        if (st == 0) {
-            if (ch == '>') {
-                uint64_t const n = buf->elem_count;
-                rc_t rc = KDataBufferResize(buf, n + 1);
-                
-                if (rc)
-                    return rc;
-                ((uint64_t *)buf->base)[n] = pos;
-                st = 1;
-            }
-        }
-        else if (ch == '\r' || ch == '\n') 
-            st = 0;
-    }
-    return 0;
-}
-
-static
-rc_t ImportFasta(ReferenceSeq *const obj, KDataBuffer const *const buf)
-{
-    unsigned seqId;
-    unsigned seqIdLen;
-    unsigned ln;
-    unsigned src;
-    unsigned dst;
-    unsigned start=0;
-    char *const data = buf->base;
-    unsigned const len = buf->elem_count;
-    char *fastaSeqId = NULL;
-    rc_t rc;
-    MD5State mds;
-    
-    if (len == 0)
-        return 0;
-    assert(data[0] == '>');
-    
-    for (ln = 1; ln != len; ++ln) {
-        int const ch = data[ln];
-        
-        if (ch == '\r' || ch == '\n') {
-            data[ln] = '\0';
-            start = ln + 1;
-            break;
-        }
-    }
-    for (seqId = 1; seqId != ln; ++seqId) {
-        if (!isspace(data[seqId]))
-            break;
-    }
-    for (seqIdLen = 0; seqId + seqIdLen < ln; ++seqIdLen) {
-        if (isspace(data[seqId + seqIdLen])) {
-            ln = seqId + seqIdLen;
-            data[ln] = '\0';
-            break;
-        }
-    }
-    if (seqIdLen == 0)
-        return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
-    
-    fastaSeqId = string_dup(&data[seqId], string_size(&data[seqId]));
-    if (fastaSeqId == NULL)
-        return RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
-    
-    MD5StateInit(&mds);
-    for (dst = src = start; src != len; ++src) {
-        int const ch = toupper(data[src]);
-        
-        if (isspace(ch))
-            continue;
-        
-        if (strchr(INSDC_4na_map_CHARSET, ch) == NULL && ch != 'X')
-            return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
-        
-        data[dst] = ch == 'X' ? 'N' : ch;
-        MD5StateAppend(&mds, data + dst, 1);
-        ++dst;
-    }
-    MD5StateFinish(&mds, obj->md5);
-    rc = KDataBufferSub(buf, &obj->u.local.buf, start, dst - start);
-    if (rc == 0) {
-        obj->fastaSeqId = fastaSeqId;
-        obj->type = rst_local;
-        obj->seq_len = dst - start;
-    }
-    else
-        obj->type = rst_dead;
-    return rc;
-}
-
-static KDataBuffer subBuffer(KDataBuffer const *const buf, uint64_t const offset, unsigned const length)
-{
-    KDataBuffer sub;
-    memset(&sub, 0, sizeof(sub));
-    KDataBufferSub(buf, &sub, offset, length);
-    return sub;
-}
-
-static int compareSeqIdFields(unsigned const alen, char const a[], unsigned const blen, char const b[])
-{
-    unsigned i;
-
-    for (i = 0; i < alen && i < blen; ++i) {
-        int const cha = a[i];
-        int const chb = b[i];
-        int const diff = toupper(cha) - toupper(chb);
-
-        if (diff < 0)
-            return -1;
-
-        if (diff > 0)
-            return 1;
-
-        if (cha == '\0')
-            return 0;
-    }
-    return alen < blen ? -1 : alen == blen ? 0 : 1;
-}
-
-typedef struct {
-    unsigned length;
-    uint64_t offset;
-} seqIdField_t;
-
-static int64_t cmpSeqIdField(void const *A, void const *B, void *Ctx)
-{
-    char const *const data = Ctx;
-    seqIdField_t const *a = A;
-    seqIdField_t const *b = B;
-    char const *avalue = &data[a->offset];
-    unsigned const alen = a->length;
-    char const *bvalue = &data[b->offset];
-    unsigned const blen = b->length;
-    int const diff = compareSeqIdFields(alen, avalue, blen, bvalue);
-
-    return diff != 0 ? diff : a->offset < b->offset ? -1 : 1;
-}
-
-static bool isInKnownSet(unsigned const len, char const id[])
-{
-    if (len == 2 || len == 3) {
-        int const id1 = id[0];
-        int const id2 = id[1];
-
-        if (len == 3) {
-            int const id3 = id[2];
-
-            if (id1 == 'd' && id2 == 'b' && id3 == 'j') return true;
-            if (id1 == 'e' && id2 == 'm' && id3 == 'b') return true;
-            if (id1 == 'g' && id2 == 'p' && id3 == 'p') return true;
-            if (id1 == 'r' && id2 == 'e' && id3 == 'f') return true;
-            if (id1 == 't' && id2 == 'p') {
-                if (id3 == 'd' || id3 == 'e' || id3 == 'g') return true;
-            }
-            return false;
-        }
-        if (id1 == 'g') {
-            if (id2 == 'b' || id2 == 'i')
-                return true;
-        }
-    }
-    return false;
-}
-
-static rc_t ImportFastaFileMany(ReferenceMgr *const self,
-                                unsigned const seqIds, uint64_t const seqIdOffset[],
-                                KDataBuffer const *const buf)
-{
-    unsigned const datalen = buf->elem_count;
-    char *const data = buf->base;
-    seqIdField_t *found = NULL;
-    seqIdField_t *ignore = NULL;
-    unsigned found_entries = 0;
-    unsigned found_entries_max = seqIds;
-    unsigned ignore_entries = 0;
-    unsigned ignore_entries_max = 0;
-    unsigned i;
-    rc_t rc = 0;
-
-    found = malloc(found_entries_max * sizeof(found[0]));
-    assert(found);
-    if (found == NULL)
-        abort();
-
-    for (i = 0; i < seqIds; ++i) {
-        uint64_t const ofs = seqIdOffset[i];
-        uint64_t const nxt = (i < seqIds - 1) ? seqIdOffset[i + 1] : datalen;
-        unsigned const len = (unsigned)(nxt - ofs);
-        unsigned j = 1;
-        unsigned k;
-
-        for (k = j; k < len; ++k) {
-            int const ch = data[ofs + k];
-
-            if (ch == '|' || isspace(ch)) {
-                char const *const str = &data[ofs + j];
-                unsigned const len = k - j;
-
-                if (len > 0 && (isspace(ch) || !isInKnownSet(len, str))) {
-                    if (found_entries == found_entries_max) {
-                        unsigned const new_max = found_entries_max * 2;
-                        void *const tmp = realloc(found, new_max * sizeof(found[0]));
-
-                        assert(tmp);
-                        if (tmp == NULL)
-                            abort();
-
-                        found = tmp;
-                        found_entries_max = new_max;
-                    }
-                    found[found_entries].length = len;
-                    found[found_entries].offset = ofs + j;
-                    ++found_entries;
-                }
-                j = k + 1;
-            }
-            if (isspace(ch))
-                break;
-        }
-    }
-    ksort(found, found_entries, sizeof(found[0]), cmpSeqIdField, (void *)data);
-
-    for (i = 1; i < found_entries; ++i) {
-        unsigned const llen = ignore_entries_max > 0 ? ignore[ignore_entries - 1].length : 0;
-        char const *const last = ignore_entries_max > 0 ? data + ignore[ignore_entries - 1].offset : 0;
-
-        unsigned const plen = found[i - 1].length;
-        char const *const prv = data + found[i - 1].offset;
-
-        unsigned const qlen = found[i].length;
-        char const *const qry = data + found[i].offset;
-
-        bool const issame = compareSeqIdFields(plen, prv, qlen, qry) == 0;
-        bool const islast = llen > 0 ? compareSeqIdFields(llen, last, qlen, qry) == 0 : false;
-
-        if (issame && !islast) {
-            if (ignore_entries == ignore_entries_max) {
-                unsigned const new_max = ignore_entries_max == 0 ? (4096 / sizeof(ignore[0])) : (ignore_entries_max * 2);
-                void *const tmp = realloc(ignore, new_max * sizeof(ignore[0]));
-
-                assert(tmp);
-                if (tmp == NULL)
-                    abort();
-
-                ignore = tmp;
-                ignore_entries_max = new_max;
-            }
-            ignore[ignore_entries] = found[i - 1];
-            ++ignore_entries;
-        }
-    }
-    free(found);
-
-    for (i = 0; i < seqIds; ++i) {
-        unsigned index = 0;
-        uint64_t const ofs = seqIdOffset[i];
-        uint64_t const nxt = (i < seqIds - 1) ? seqIdOffset[i + 1] : datalen;
-        unsigned const len = (unsigned)(nxt - ofs);
-        unsigned j = 1;
-        unsigned k;
-        char const *const seqId = &data[ofs + 1];
-        {
-            ReferenceSeq new_seq;
-            KDataBuffer sub = subBuffer(buf, ofs, len);
-
-            memset(&new_seq, 0, sizeof(new_seq));
-            rc = ImportFasta(&new_seq, &sub);
-            KDataBufferWhack(&sub);
-            if (rc) {
-                PLOGERR(klogInfo, (klogInfo, rc, "Error reading '$(defline)'; ignored", "defline=%s", seqId));
-                continue;
-            }
-            else {
-                ReferenceSeq *p = newReferenceSeq(self, &new_seq);
-                index = p - self->refSeq;
-                addToHashBucket(&self->ht[hash0(seqId)], index);
-            }
-        }
-        for (k = j; k < len; ++k) {
-            int const ch = data[ofs + k];
-
-            if (ch == '\0' || ch == '|' || isspace(ch)) {
-                unsigned const length = k - j;
-                uint64_t const offset = ofs + j;
-                char const *const value = &data[offset];
-
-                if (length == 0 || (!isspace(ch) && isInKnownSet(length, value)))
-                    goto IGNORED;
-                {
-                    unsigned f = 0;
-                    unsigned e = ignore_entries;
-
-                    while (f < e) {
-                        unsigned const m = f + (e - f) / 2;
-                        unsigned const flen = ignore[m].length;
-                        char const *const fnd = data + ignore[m].offset;
-                        int const diff = compareSeqIdFields(length, value, flen, fnd);
-
-                        if (diff == 0)
-                            goto IGNORED;
-                        if (diff < 0)
-                            e = m;
-                        else
-                            f = m + 1;
-                    }
-                }
-                addToHashBucket(&self->ht[hash(length, value)], index);
-            IGNORED:
-                j = k + 1;
-                if (ch == '\0' || isspace(ch))
-                    break;
-            }
-        }
-    }
-
-    free(ignore);
-    return rc;
-}
-
-#define READ_CHUNK_SIZE (1024 * 1024)
-
-static
-rc_t ImportFastaFile(ReferenceMgr *const self, KFile const *kf,
-                     ReferenceSeq *rslt)
-{
-    uint64_t file_size;
-    rc_t rc = KFileSize(kf, &file_size);
-    
-    if (rc == 0) {
-        KDataBuffer fbuf;
-
-        rc = KDataBufferMakeBytes(&fbuf, file_size);
-        if (rc == 0) {
-            char *const data = fbuf.base;
-            uint64_t inbuf = 0;
-
-            while (inbuf < file_size) {
-                uint64_t const remain = file_size - inbuf;
-                size_t nread = 0;
-                
-                rc = KFileRead(kf, inbuf, &data[inbuf], remain > READ_CHUNK_SIZE ? READ_CHUNK_SIZE : remain, &nread);
-                if (rc != 0 || nread == 0)
-                    break;
-                inbuf += nread;
-            }
-            if (rc == 0) {
-                char const *const base = fbuf.base;
-                KDataBuffer seqIdBuf;
-                
-                memset(&seqIdBuf, 0, sizeof(seqIdBuf));
-                seqIdBuf.elem_bits = sizeof(file_size) * 8;
-                
-                rc = FastaFile_GetSeqIds(&seqIdBuf, base, file_size);
-                if (rc == 0) {
-                    uint64_t const *const seqIdOffset = seqIdBuf.base;
-                    unsigned const seqIds = (unsigned)seqIdBuf.elem_count;
-
-                    if (rslt) {
-                        KDataBuffer sub = subBuffer(&fbuf, seqIdOffset[0], (unsigned)(file_size - seqIdOffset[0]));
-
-                        if (seqIds > 1)
-                            rc = RC(rcAlign, rcFile, rcReading, rcItem, rcUnexpected);
-                        
-                        rc = ImportFasta(rslt, &sub);
-                        KDataBufferWhack(&sub);
-                        if (rc == 0)
-                            addToHashTable(self, rslt);
-                    }
-                    else {
-                        ImportFastaFileMany(self, seqIds, seqIdOffset, &fbuf);
-                    }
-                }
-                KDataBufferWhack(&seqIdBuf);
-            }
-            KDataBufferWhack(&fbuf);
-        }
-    }
-    return rc;
-}
-
-static
-rc_t OpenFastaFile(KFile const **const kf,
-                   KDirectory const *const dir,
-                   char const base[],
-                   unsigned const len)
-{
-    char fname_a[4096];
-    char *fname_h = NULL;
-    char *fname = fname_a;
-    rc_t rc;
-    
-    if (len + 7 >= sizeof(fname_a)) {
-        fname_h = malloc(len + 7);
-        if (fname_h)
-            fname = fname_h;
-        else
-            return RC(rcAlign, rcFile, rcOpening, rcMemory, rcExhausted);
-    }
-    memcpy(fname, base, len);
-    memcpy(fname + len, ".fasta", 7);
-    
-    ALIGN_CF_DBGF(("trying to open fasta file: %.s\n", fname));
-    rc = KDirectoryOpenFileRead(dir, kf, "%s", fname);
-    if (rc) {
-        fname[len + 3] = '\0'; /* base.fasta -> base.fa */
-        
-        ALIGN_CF_DBGF(("trying to open fasta file: %.s\n", fname));
-        rc = KDirectoryOpenFileRead(dir, kf, "%s", fname);
-    }
-    free(fname_h);
-    return rc;
-}
-
-#if 1
-void ReferenceSeq_Dump(ReferenceSeq const *const rs)
-{
-    static char const *types[] = {
-        "'unattached'",
-        "'fasta'",
-        "'RefSeq-by-id'",
-        "'RefSeq-by-seqid'",
-        "'unmapped'",
-        "'dead'"
-    };
-    unsigned j;
-    
-    ((void)types); /* stupid warning */
-    ALIGN_CF_DBGF(("{ "));
-    ALIGN_CF_DBGF(("type: %s, ", (rs->type < 0 || rs->type > rst_dead) ? "null" : types[rs->type]));
-    
-    if (rs->id)
-        ALIGN_CF_DBGF(("id: '%s', ", rs->id));
-    else
-        ALIGN_CF_DBGF(("id: null, "));
-    
-    if (rs->seqId)
-        ALIGN_CF_DBGF(("seqId: '%s', ", rs->seqId));
-    else
-        ALIGN_CF_DBGF(("seqId: null, "));
-    
-    if (rs->fastaSeqId)
-        ALIGN_CF_DBGF(("fastaSeqId: '%s', ", rs->fastaSeqId));
-    else
-        ALIGN_CF_DBGF(("fastaSeqId: null, "));
-    
-    ALIGN_CF_DBGF(("seq-len: %u, ", rs->seq_len));
-    ALIGN_CF_DBGF(("circular: %s, ", rs->circular ? "true" : "false"));
-    
-    ALIGN_CF_DBGF(("md5: '"));
-    for (j = 0; j != 16; ++j)
-        ALIGN_CF_DBGF(("%02X", rs->md5[j]));
-    ALIGN_CF_DBGF(("', "));
-    
-    ALIGN_CF_DBGF(("keys: [ "));
-    for (j = 0; j != rs->num_used; ++j) {
-        char const *key = rs->used[j];
-        
-        ALIGN_CF_DBGF(("'%s', ", key));
-    }
-    ALIGN_CF_DBGF(("] }"));
-}
-
-LIB_EXPORT void ReferenceMgr_DumpConfig(ReferenceMgr const *const self)
-{
-    unsigned const n = (unsigned)self->refSeqs.elem_count;
-    unsigned i;
-    
-    ALIGN_CF_DBGF(("config: [\n"));
-    for (i = 0; i != n; ++i) {
-        ALIGN_CF_DBGF(("\t"));
-        ReferenceSeq_Dump(&self->refSeq[i]);
-        ALIGN_CF_DBGF((",\n"));
-    }
-    ALIGN_CF_DBGF(("]\n"));
-}
-#endif
-
-static
-rc_t ReferenceSeq_GetRefSeqInfo(ReferenceSeq *const self)
-{
-    rc_t rc;
-    uint8_t const *md5;
-    
-    assert(self != NULL);
-    assert(self->type == rst_refSeqById || self->type == rst_refSeqBySeqId);
-    
-    if ((rc = RefSeq_Circular(self->u.refseq, &self->circular)) != 0)
-        return rc;
-    if ((rc = RefSeq_SeqLength(self->u.refseq, &self->seq_len)) != 0)
-        return rc;
-    if ((rc = RefSeq_MD5(self->u.refseq, &md5)) != 0)
-        return rc;
-    
-    if (md5)
-        memcpy(self->md5, md5, 16);
-    else
-        memset(self->md5, 0, 16);
-    return 0;
-}
-
-
-/* Try to attach to a RefSeq or a fasta file */
-static
-rc_t ReferenceSeq_Attach(ReferenceMgr *const self, ReferenceSeq *const rs)
-{
-    unsigned const seqid_len = rs->seqId ? (unsigned)string_size(rs->seqId) : 0;
-    unsigned const id_len = rs->id ? (unsigned)string_size(rs->id) : 0;
-    rc_t rc = 0;
-    KFile const *kf = NULL;
-    
-    assert(rs->type == rst_unattached);
-    assert(id_len != 0 || seqid_len != 0);
-    
-    if (seqid_len) {
-        ALIGN_CF_DBGF(("trying to open refseq: %.*s\n", seqid_len, rs->seqId));
-        if (RefSeqMgr_Exists(self->rmgr, rs->seqId, seqid_len, NULL) == 0) {
-            rc = RefSeqMgr_GetSeq(self->rmgr, &rs->u.refseq, rs->seqId, seqid_len);
-            if (rc == 0) {
-                rs->type = rst_refSeqBySeqId;
-                rc = ReferenceSeq_GetRefSeqInfo(rs);
-            }
-            return rc;
-        }
-    }
-    if (id_len) {
-        ALIGN_CF_DBGF(("trying to open refseq: %.*s\n", id_len, rs->id));
-        if (RefSeqMgr_Exists(self->rmgr, rs->id, id_len, NULL) == 0) {
-            rc = RefSeqMgr_GetSeq(self->rmgr, &rs->u.refseq, rs->id, id_len);
-            if (rc == 0) {
-                rs->type = rst_refSeqById;
-                rc = ReferenceSeq_GetRefSeqInfo(rs);
-            }
-            return rc;
-        }
-    }
-    if (id_len) {
-        ALIGN_CF_DBGF(("trying to open fasta: %.*s\n", id_len, rs->id));
-        rc = OpenFastaFile(&kf, self->dir, rs->id, id_len);
-        if (rc && seqid_len) {
-            ALIGN_CF_DBGF(("trying to open fasta: %.*s\n", seqid_len, rs->seqId));
-            rc = OpenFastaFile(&kf, self->dir, rs->seqId, seqid_len);
-        }
-    }
-    else {
-        ALIGN_CF_DBGF(("trying to open fasta: %.*s\n", seqid_len, rs->seqId));
-        rc = OpenFastaFile(&kf, self->dir, rs->seqId, seqid_len);
-    }
-    if (kf) {
-        ReferenceSeq tmp = *rs;
-        
-        ALIGN_CF_DBGF(("importing fasta"));
-        rc = ImportFastaFile(self, kf, rs);
-        KFileRelease(kf);
-        if (rc != 0)
-            *rs = tmp;
-        return rc;
-    }
-    return 0;
-}
-
-struct Candidate {
-    int weight;
-    unsigned index;
-};
-
-static int64_t CC cmpCandidate(void const *A, void const *B, void *Ctx)
-{
-    struct Candidate const *const a = A;
-    struct Candidate const *const b = B;
-
-    return (int64_t)(a->weight - b->weight);
-}
-
-static void sortCandidateList(unsigned const len, struct Candidate *list)
-{
-    if (len > 1)
-        ksort(list, len, sizeof(list[0]), cmpCandidate, NULL);
-}
-
-static void candidates(ReferenceMgr *const self,
-                       unsigned *const count,
-                       struct Candidate **const rslt,
-                       unsigned const idLen,
-                       char const id[],
-                       unsigned const seq_len,
-                       uint8_t const md5[16])
-{
-    unsigned const hv = hash(idLen, id);
-    Bucket const bucket = self->ht[hv];
-    unsigned num_possible = 0;
-    struct Candidate *possible = malloc(sizeof(possible[0]) * bucket.count);
-    unsigned i;
-
-    assert(possible != NULL);
-    if (possible == NULL)
-        abort();
-    for (i = 0; i < bucket.count; ++i) {
-        unsigned const index = bucket.index[i];
-        ReferenceSeq *const rs = &self->refSeq[index];
-
-        if (rs->type != rst_dead) {
-            bool const sameId = rs->id != NULL && strcmp(rs->id, id) == 0;
-            bool const sameSeqId = rs->seqId != NULL && strcasecmp(rs->seqId, id) == 0;
-            int const sameFastaSeqId = rs->fastaSeqId != NULL ? str_weight(rs->fastaSeqId, id, idLen) : 0;
-            struct Candidate nv;
-
-            nv.weight = (sameId ? id_match : 0) | (sameSeqId ? seqId_match : 0) | sameFastaSeqId;
-            nv.index = index;
-
-            if (nv.weight > 0)
-                possible[num_possible++] = nv;
-        }
-    }
-    if (num_possible == 0) {
-        free(possible);
-        possible = NULL;
-    }
-    *count = num_possible;
-    *rslt = possible;
-}
-
-static rc_t tryFastaOrRefSeq(ReferenceMgr *const self,
-                     ReferenceSeq **const rslt,
-                     unsigned const idLen,
-                     char const id[],
-                     bool *tryAgain)
-{
-    KFile const *kf = NULL;
-    rc_t rc = 0;
-
-    if (OpenFastaFile(&kf, self->dir, id, idLen) == 0) {
-        /* found a fasta file; load it and try again */
-        rc = ImportFastaFile(self, kf, NULL);
-        if (rc == 0) {
-            *tryAgain = true;
-            return 0;
-        }
-    }
-    /* didn't find a fasta file; try RefSeq */
-    ALIGN_CF_DBGF(("trying to open refseq: %s\n", id));
-    if (RefSeqMgr_Exists(self->rmgr, id, idLen, NULL) == 0) {
-        ReferenceSeq *const seq = newReferenceSeq(self, NULL);
-
-        rc = RefSeqMgr_GetSeq(self->rmgr, &seq->u.refseq, id, idLen);
-        if (rc == 0) {
-            unsigned const hv = hash(idLen, id);
-            seq->id = string_dup(id, idLen);
-            seq->type = rst_refSeqById;
-
-            addToHashBucket(&self->ht[hv], seq - self->refSeq);
-
-            ReferenceSeq_GetRefSeqInfo(seq);
-            *rslt = seq;
-        }
-    }
-    else {
-        /* nothing found and out of options */
-        rc = RC(rcAlign, rcFile, rcConstructing, rcId, rcNotFound);
-    }
-    return rc;
-}
-
-static void setSeqLenBit(ReferenceMgr *const self, unsigned const N, struct Candidate *const C, unsigned const seq_len)
-{
-    unsigned i;
-    for (i = 0; i < N; ++i) {
-        unsigned const index = C[i].index;
-        ReferenceSeq const *const rs = &self->refSeq[index];
-
-        if (seq_len == rs->seq_len)
-            C[i].weight |= seq_len_match;
-    }
-}
-
-static void setMD5Bit(ReferenceMgr *const self, unsigned const N, struct Candidate *const C, uint8_t const md5[])
-{
-    unsigned i;
-    for (i = 0; i < N; ++i) {
-        unsigned const index = C[i].index;
-        ReferenceSeq const *const rs = &self->refSeq[index];
-
-        if (memcmp(md5, rs->md5, 16) == 0)
-            C[i].weight |= md5_match;
-    }
-}
-
-static void setAttachedBit(ReferenceMgr *const self, unsigned const N, struct Candidate *const C)
-{
-    unsigned i;
-    for (i = 0; i < N; ++i) {
-        unsigned const index = C[i].index;
-        ReferenceSeq const *const rs = &self->refSeq[index];
-
-        if (rs->type != rst_unattached)
-            C[i].weight |= attached;
-    }
-}
-
-static ReferenceSeq *checkForMultiMapping(ReferenceMgr *const self, ReferenceSeq *const chosen, bool *const wasRenamed)
-{
-    unsigned const hv = hash0(chosen->seqId);
-    Bucket const bucket = self->ht[hv];
-    unsigned i;
-
-    for (i = 0; i < bucket.count; ++i) {
-        ReferenceSeq *qry = &self->refSeq[bucket.index[i]];
-        if (qry == chosen || qry->type == rst_dead || qry->type == rst_unattached || qry->type == rst_renamed || qry->seqId == NULL)
-            continue;
-        if (strcasecmp(chosen->seqId, qry->seqId) == 0) {
-            void *const oldId = chosen->id;
-
-            chosen->type = rst_renamed;
-            chosen->id = string_dup(qry->id, string_size(qry->id));
-            *wasRenamed = true;
-            free(oldId);
-            return qry;
-        }
-    }
-    return chosen;
-}
-
-static rc_t tryFasta(ReferenceMgr *const self,
-                     ReferenceSeq **const rslt,
-                     char const seqId[],
-                     unsigned const seq_len,
-                     uint8_t const md5[16])
-{
-    ReferenceSeq *const seq = *rslt;
-    unsigned const hv = hash0(seqId);
-    Bucket const bucket = self->ht[hv];
-    unsigned best = bucket.count;
-    unsigned best_score = 0;
-    unsigned i;
-
-    for (i = 0; i < bucket.count; ++i) {
-        unsigned score = 0;
-        ReferenceSeq *const qry = &self->refSeq[bucket.index[i]];
-
-        if (qry != seq && qry->fastaSeqId != NULL) {
-            char const *const substr = strcasestr(qry->fastaSeqId, seqId);
-            if (substr != NULL) {
-                unsigned const at = substr - qry->fastaSeqId;
-                unsigned const slen = (unsigned)string_size(seqId);
-                unsigned const qlen = (unsigned)string_size(qry->fastaSeqId);
-                if (at == 0 && slen == qlen)
-                    score |= exact_match;
-                else {
-                    bool const leftEdge = at == 0 || qry->fastaSeqId[at - 1] == '|';
-                    bool const rightEdge = (at + slen) == qlen || qry->fastaSeqId[at + slen] == '|';
-
-                    if (leftEdge && rightEdge)
-                        score |= substring_match;
-                }
-            }
-        }
-        if (score == 0)
-            continue;
-
-        if (seq_len != 0 && qry->seq_len == seq_len)
-            score |= seq_len_match;
-        if (md5 != NULL && memcmp(md5, qry->md5, 16) == 0)
-            score |= md5_match;
-        if (score > best_score) {
-            best = i;
-            best_score = score;
-        }
-    }
-    if (best != bucket.count) {
-        *rslt = &self->refSeq[bucket.index[best]];
-        return 0;
-    }
-    else {
-        return RC(rcAlign, rcFile, rcConstructing, rcId, rcNotFound);
-    }
-}
-
-static rc_t findSeq(ReferenceMgr *const self,
-                    ReferenceSeq **const rslt,
-                    char const id[],
-                    unsigned const seq_len,
-                    uint8_t const md5[16],
-                    bool const allowMultiMapping,
-                    bool wasRenamed[])
-{
-    unsigned const idLen = (unsigned)string_size(id);
-    unsigned num_possible = 0;
-    struct Candidate *possible = NULL;
-    ReferenceSeq *chosen = NULL;
-    rc_t rc = 0;
-
-    candidates(self, &num_possible, &possible, idLen, id, seq_len, md5);
-    if (num_possible == 0) {
-        /* nothing was found; try a fasta file */
-        bool tryAgain = false;
-        rc_t const rc = tryFastaOrRefSeq(self, rslt, idLen, id, &tryAgain);
-
-        if (rc != 0 && !tryAgain)
-            return rc;
-
-        return findSeq(self, rslt, id, seq_len, md5, allowMultiMapping, wasRenamed);
-    }
-    if (num_possible > 1) {
-        if (seq_len != 0)
-            setSeqLenBit(self, num_possible, possible, seq_len);
-        if (md5 != NULL)
-            setMD5Bit(self, num_possible, possible, md5);
-        sortCandidateList(num_possible, possible);
-        setAttachedBit(self, num_possible, possible);
-        sortCandidateList(num_possible - 1, possible);
-    }
-    /* if there is no second best OR the best is better than the second best
-     * then we have a clear choice
-     */
-    if (num_possible == 1 || (possible[num_possible - 1].weight & ~attached) > (possible[num_possible - 2].weight & ~attached)) {
-        unsigned const index = possible[num_possible - 1].index;
-        chosen = &self->refSeq[index];
-    }
-    free(possible);
-    if (chosen == NULL) {
-        /* there was no clear choice */
-        return RC(rcAlign, rcFile, rcConstructing, rcId, rcAmbiguous);
-    }
-    if (chosen->seqId != NULL && !allowMultiMapping) {
-        chosen = checkForMultiMapping(self, chosen, wasRenamed);
-    }
-    if (chosen->type == rst_unattached) {
-        rc = ReferenceSeq_Attach(self, chosen);
-        if (rc == 0 && chosen->type == rst_unattached) {
-            /* still not attached; try seqId fasta */
-            char const *const seqId = chosen->seqId;
-
-            chosen->type = rst_dead;
-            if (seqId)
-                rc = tryFasta(self, &chosen, seqId, seq_len, md5);
-            else
-                rc = RC(rcAlign, rcFile, rcConstructing, rcId, rcNotFound);
-        }
-    }
-    if (rc == 0) {
-        if (chosen->id == NULL)
-            chosen->id = string_dup(id, idLen);
-        if (chosen->seqId == NULL && chosen->fastaSeqId != NULL)
-            chosen->seqId = string_dup(chosen->fastaSeqId, string_size(chosen->fastaSeqId));
-        *rslt = chosen;
-    }
-    if (rc)
-        chosen->type = rst_dead;
-    addToIndex(self, id, chosen);
-    return rc;
-}
-
-static
-rc_t ReferenceMgr_OpenSeq(ReferenceMgr *const self,
-                          ReferenceSeq **const rslt,
-                          char const id[],
-                          unsigned const seq_len,
-                          uint8_t const md5[16],
-                          bool const allowMultiMapping,
-                          bool wasRenamed[])
-{
-    int const fnd = findId(self, id);
-    
-    assert(rslt != NULL);
-    *rslt = NULL;
-    if (fnd >= 0) {
-        ReferenceSeq *const obj = &self->refSeq[fnd];
-        
-        if (obj->type == rst_dead)
-            return RC(rcAlign, rcIndex, rcSearching, rcItem, rcInvalid);
-        if (obj->type == rst_renamed) {
-            bool dummy = false;
-
-            *wasRenamed = true;
-            return ReferenceMgr_OpenSeq(self, rslt, obj->id, seq_len, md5, allowMultiMapping, &dummy);
-        }
-        if (obj->type == rst_refSeqBySeqId || obj->type == rst_refSeqById) {
-            RefSeq const *dummy = NULL;
-            char const *const key = (obj->type == rst_refSeqById) ? obj->id : obj->seqId;
-            rc_t const rc = RefSeqMgr_GetSeq(self->rmgr, &dummy, key, (unsigned)string_size(key));
-            
-            assert(rc == 0);
-            assert(dummy == obj->u.refseq);
-        }
-        *rslt = obj;
-        return 0;
-    }
-    return findSeq(self, rslt, id, seq_len, md5, allowMultiMapping, wasRenamed);
-}
-
-LIB_EXPORT rc_t CC ReferenceMgr_SetCache(ReferenceMgr const *const self, size_t cache, uint32_t num_open)
-{
-    return RefSeqMgr_SetCache(self->rmgr, cache, num_open);
-}
-
-static
-rc_t OpenDataDirectory(KDirectory const **rslt, char const path[])
-{
-    KDirectory *dir;
-    rc_t rc = KDirectoryNativeDir(&dir);
-    
-    if (rc == 0) {
-        if (path) {
-            rc = KDirectoryOpenDirRead(dir, rslt, false, "%s", path);
-            KDirectoryRelease(dir);
-        }
-        else
-            *rslt = dir;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC ReferenceMgr_Make(ReferenceMgr const **cself, VDatabase *db,
-                                     VDBManager const* vmgr,
-                                     const uint32_t options, char const conf[], char const path[],
-                                     uint32_t max_seq_len, size_t cache, uint32_t num_open)
-{
-    rc_t rc;
-    ReferenceMgr *self;
-    uint32_t wopt = 0;
-    
-    if (cself == NULL)
-        return RC(rcAlign, rcIndex, rcConstructing, rcParam, rcNull);
-    
-    wopt |= (options & ewrefmgr_co_allREADs) ? ewref_co_SaveRead : 0;
-    wopt |= (options & ewrefmgr_co_Coverage) ? ewref_co_Coverage : 0;
-
-    if (max_seq_len == 0)
-        max_seq_len = TableWriterRefSeq_MAX_SEQ_LEN;
-    
-    self = calloc(1, sizeof(*self));
-    if (self) {
-        rc = KDataBufferMakeBytes(&self->seq, max_seq_len);
-        if (rc == 0) {
-            self->compress.elem_bits = sizeof(compress_buffer_t) * 8;
-            self->refSeqs.elem_bits = sizeof(ReferenceSeq) * 8;
-            
-            self->options = options;
-            self->cache = cache;
-            self->num_open_max = num_open;
-            self->max_seq_len = max_seq_len;
-            if (db) VDatabaseAddRef(self->db = db);
-            rc = OpenDataDirectory(&self->dir, path);
-            if (rc == 0) {
-                rc = RefSeqMgr_Make(&self->rmgr, vmgr, 0, cache, num_open);
-                if (rc == 0) {
-                    rc = ReferenceMgr_Conf(self, conf);
-                    if (rc == 0) {
-                        *cself = self;
-                        ALIGN_DBG("conf %s, local path '%s'", conf ? conf : "", path ? path : "");
-                        return 0;
-                    }
-                    (void)PLOGERR(klogErr, (klogErr, rc, "failed to open configuration $(file)", "file=%s/%s", path ? path : ".", conf));
-                }
-            }
-        }
-        ReferenceMgr_Release(self, false, NULL, false, NULL);
-    }
-    else
-        rc = RC(rcAlign, rcIndex, rcConstructing, rcMemory, rcExhausted);
-
-    ALIGN_DBGERR(rc);
-
-    return rc;
-}
-
-#define ID_CHUNK_SZ 256
-
-typedef struct TChunk32_struct {
-    struct TChunk32_struct* next;
-    uint32_t id[ID_CHUNK_SZ]; /*** will only work with positive ids **/
-} TChunk32;
-
-typedef struct AlignId32List_struct {
-	TChunk32* head;
-	TChunk32* tail;
-	uint32_t  tail_qty;  /** number elements in the last chunk **/
-	uint32_t  chunk_qty; /** number of chunks */
-} AlignId32List;
-typedef struct AlignIdList_struct {
-	AlignId32List **sub_list;
-	uint32_t        sub_list_count; 
-} AlignIdList;
-
-static uint64_t AlignId32ListCount(AlignId32List *l)
-{ return (l->chunk_qty>0)?ID_CHUNK_SZ*(l->chunk_qty-1)+ l->tail_qty:0;}
-
-static uint64_t AlignIdListCount(AlignIdList *l)
-{
-	uint64_t ret=0;
-	if(l){
-		uint32_t i;
-		for(i=0;i<l->sub_list_count;i++){
-			if(l->sub_list[i]){
-				ret += AlignId32ListCount(l->sub_list[i]);
-			}
-		}
-	}
-	return ret;
-}
-static uint64_t AlignIdListFlatCopy(AlignIdList *l,int64_t *buf,uint64_t num_elem,bool do_sort)
-{
-	uint64_t res=0;
-	uint32_t i,j;
-	AlignId32List* cl;
-	assert(l!=0);
-
-	if((cl = l->sub_list[0])!=NULL){
-		TChunk32* head  = cl->head;
-		while(head !=  cl->tail){
-			for(i=0;i<ID_CHUNK_SZ && res < num_elem;i++,res++){
-				buf[res] = head->id[i];
-			}
-			head = head->next;
-		}
-		for(i=0;i<cl->tail_qty && res < num_elem;i++,res++){
-			buf[res] = head->id[i];
-		}
-	}
-	for(j = 1; j< l->sub_list_count && res < num_elem;j++){
-		if((cl = l->sub_list[j])!=NULL){
-			TChunk32* head  = cl->head;
-			uint64_t  hi = ((uint64_t)j) << 32;
-			while(head !=  cl->tail){
-				for(i=0;i<ID_CHUNK_SZ && res < num_elem;i++,res++){
-					buf[res] = hi | head->id[i];
-				}
-				head = head->next;
-			}
-			for(i=0;i<cl->tail_qty && res < num_elem;i++,res++){
-				buf[res] = hi | head->id[i];
-			}
-		}
-	}
-	if(do_sort && res > 1) 
-		ksort_int64_t(buf,res);
-	return res;
-}
-
-static rc_t AlignId32ListAddId(AlignId32List *l,const uint32_t id)
-{
-	if(l->tail  == NULL){
-		l->head = l->tail = malloc(sizeof(*l->tail));
-		if(l->tail == NULL) return RC(rcAlign, rcTable, rcCommitting, rcMemory, rcExhausted);
-		l->chunk_qty =1;
-		l->tail_qty = 0;	
-	}
-	if(l->tail_qty == ID_CHUNK_SZ){/** chunk is full **/
-		l->tail->next = malloc(sizeof(*l->tail));
-		if(l->tail == NULL) return RC(rcAlign, rcTable, rcCommitting, rcMemory, rcExhausted);
-		l->tail = l->tail->next;
-		l->chunk_qty ++;
-		l->tail_qty = 0;	
-	}
-	l->tail->id[l->tail_qty++]=id;
-	return 0;
-}
-
-static rc_t AlignIdListAddId(AlignIdList *l,const int64_t id)
-{
-	uint32_t  sub_id,id32;
-	if(id < 0) return RC(rcAlign, rcTable, rcCommitting, rcId, rcOutofrange);
-	id32 = (uint32_t) id;
-	sub_id = id >> 32;
-	if(sub_id >= l->sub_list_count) return RC(rcAlign, rcTable, rcCommitting, rcId, rcOutofrange);
-	if(l->sub_list[sub_id] == NULL){
-		l->sub_list[sub_id] = calloc(1,sizeof(AlignId32List));
-		if(l->sub_list[sub_id] == NULL) return RC(rcAlign, rcTable, rcCommitting, rcMemory, rcExhausted);
-	}
-	return AlignId32ListAddId(l->sub_list[sub_id],id32);
-}
-
-static void AlignId32ListRelease(AlignId32List *l)
-{
-	if(l){
-		while(l->head != l->tail){
-			TChunk32* head = l->head;
-			l->head = l->head->next;
-			free(head);
-		}
-		free(l->head);
-		free(l);
-	}
-}
-static void AlignIdListRelease(AlignIdList *l)
-{
-        if(l){
-		uint32_t i;
-		for(i=0;i<l->sub_list_count;i++){
-			AlignId32ListRelease(l->sub_list[i]);
-		}
-		free(l->sub_list);
-		free(l);
-        }
-}
-
-
-typedef struct {
-    AlignIdList*	idlist;
-    ReferenceSeqCoverage cover;
-    INSDC_coord_len bin_seq_len;
-} TCover;
-
-static
-void ReferenceMgr_TCoverRelease(TCover* c)
-{
-	if(c){
-		AlignIdListRelease(c->idlist);
-		c->idlist = NULL;
-	}
-}
-static 
-rc_t ReferenceMgr_TCoverSetMaxId(TCover* c,int64_t id)
-{
-	uint32_t  sub_id;
-	if(id < 0) return RC(rcAlign, rcTable, rcCommitting, rcId, rcOutofrange);
-	sub_id = id >> 32;
-	if(c->idlist == NULL){
-		c->idlist = calloc(1,sizeof(AlignIdList));
-		if(c->idlist==NULL) return RC(rcAlign, rcTable, rcCommitting, rcMemory, rcExhausted);
-		c->idlist->sub_list_count = sub_id+1;
-		c->idlist->sub_list = calloc(c->idlist->sub_list_count,sizeof(c->idlist->sub_list[0]));
-		if(c->idlist->sub_list == NULL) return RC(rcAlign, rcTable, rcCommitting, rcMemory, rcExhausted);
-	} else {
-		return RC(rcAlign, rcTable, rcCommitting, rcParam, rcUnexpected);
-	}
-	return 0;
-}
-
-static
-rc_t CoverageGetSeqLen(ReferenceMgr const *const mgr, TCover data[], uint64_t const rows)
-{
-    TableReaderColumn acols[] =
-    {
-        {0, "(INSDC:coord:len)SEQ_LEN", {NULL}, 0, 0},
-        {0, NULL, {NULL}, 0, 0}
-    };
-    VTable const *tbl;
-    rc_t rc = VDatabaseOpenTableRead(mgr->db, &tbl, "REFERENCE");
-    
-    if (rc == 0) {
-        TableReader const *reader;
-        
-        rc = TableReader_Make(&reader, tbl, acols, 0);
-        if (rc == 0) {
-            uint64_t i;
-            
-            for (i = 0; i != rows; ++i) {
-                rc = TableReader_ReadRow(reader, i + 1);
-                if (rc == 0 && acols->len > 0)
-                    data[i].bin_seq_len = acols->base.coord_len[0];
-            }
-            TableReader_Whack(reader);
-        }
-        VTableRelease(tbl);
-    }
-    return rc;
-}
-
-static
-rc_t ReferenceMgr_ReCover(const ReferenceMgr* cself, uint64_t ref_rows, rc_t (*const quitting)(void))
-{
-    rc_t rc = 0;
-    uint64_t new_rows = 0;
-    const TableWriterRefCoverage* cover_writer = NULL;
-    
-    TableReaderColumn acols[] =
-    {
-        {0, "REF_ID", {NULL}, 0, 0},
-        {0, "REF_START", {NULL}, 0, 0},
-        {0, "CIGAR_LONG",{NULL}, 0, 0},
-        {0, "REF_POS",{NULL}, 0, 0},
-        {0, NULL, {NULL}, 0, 0}
-    };
-    const int64_t** al_ref_id = &acols[0].base.i64;
-    const INSDC_coord_zero** al_ref_start = &acols[1].base.coord0;
-    const TableReaderColumn* cigar =  &acols[2];
-    const INSDC_coord_zero** al_ref_pos = &acols[3].base.coord0;
-    /* order is important see ReferenceSeqCoverage struct */
-    struct {
-        const char* nm;
-	    const char* col;
-        bool ids_only;
-    } tbls[] = { {"PRIMARY_ALIGNMENT", "PRIMARY_ALIGNMENT_IDS",false},
-        {"SECONDARY_ALIGNMENT", "SECONDARY_ALIGNMENT_IDS",false},
-        {"EVIDENCE_INTERVAL", "EVIDENCE_INTERVAL_IDS", true} };
-	int tbls_qty=(sizeof(tbls)/sizeof(tbls[0]));
-    rc_t rc1 = 0;
-    int64_t rr;
-    uint32_t i;
-    uint8_t* hilo=NULL;
-    TCover* data = NULL;
-    
-    /* allocate mem for ref_rows of reference coverage*/
-    if((data = calloc(ref_rows, (sizeof(*data) + cself->max_seq_len))) == NULL) {
-		rc = RC(rcAlign, rcTable, rcCommitting, rcMemory, rcExhausted);
-    } else {
-		/** allocation for both data and hilo was done in 1 shot ***/
-		hilo = (uint8_t *)&data[ref_rows];
-        rc = CoverageGetSeqLen(cself, data, ref_rows);
-    }
-    /* grep through tables for coverage data */
-    ALIGN_R_DBG("covering REFERENCE rowid range [1:%ld]",ref_rows);
-    for(i = 0; rc == 0 && i < tbls_qty; i++) { /* TABLE LOOP STARTS */
-        const VTable* table = NULL;
-        const TableReader* reader = NULL;
-        int64_t al_from;
-        uint64_t al_qty;
-        
-        ALIGN_R_DBG("covering REFERENCE with %s", tbls[i].nm);
-        if((rc = VDatabaseOpenTableRead(cself->db, &table, "%s", tbls[i].nm)) != 0) {
-            if(GetRCState(rc) == rcNotFound) {
-                ALIGN_R_DBG("table %s was not found, ignored", tbls[i].nm);
-                rc = 0;
-                continue;
-            } else {
-                break;
-            }
-        }
-        if((rc = TableReader_Make(&reader, table, acols, cself->cache)) == 0 &&
-           (rc = TableReader_IdRange(reader, &al_from, &al_qty)) == 0) {
-            int64_t al_rowid;
-            
-            for(al_rowid = al_from; rc == 0 && al_rowid < al_from + al_qty; al_rowid++) {
-                if((rc = TableReader_ReadRow(reader, al_rowid)) != 0) {
-                    break;
-                }
-                rr    = **al_ref_id-1;
-                /**** Record ALIGNMENT_IDS ***/
-                if(  data[rr].idlist == NULL 
-                   && (rc = ReferenceMgr_TCoverSetMaxId(data+rr,al_from + al_qty))!=0){
-                    break; /*** out-of-memory ***/
-                }
-                if((rc = AlignIdListAddId(data[rr].idlist,al_rowid))!=0){
-                    break; /*** out-of-memory ***/
-                }
-                /**** Done alignment ids ***/
-                if(!tbls[i].ids_only) { /*** work on statistics ***/
-                    char const *c = cigar->base.str;
-                    const char *c_end = c + cigar->len;
-                    int64_t const global_ref_pos = rr*cself->max_seq_len + **al_ref_start; /** global_ref_start **/
-                    int64_t const global_refseq_start = global_ref_pos -  **al_ref_pos;   /** global_ref_start of current reference **/
-                    unsigned const bin_no = (unsigned)(global_ref_pos / cself->max_seq_len);
-                    TCover *const bin = &data[bin_no];
-                    uint8_t *const cov = &hilo[global_ref_pos];
-                    int64_t ref_offset = 0;
-                    int64_t max_ref_offset = 0;
-                    int64_t min_ref_offset = 0;
-                    int64_t j;
-
-                    while (rc == 0 && c < c_end) {
-                        int op_len = (int)strtol(c, (char **)&c, 10);
-                        int const op = *c++;
-                        
-                        switch (op){
-                        case 'I':/* extra bases in the read **/
-                            ++bin->cover.indels;
-                        case 'S':/* skip in the read */
-                            break;
-                        case 'B':/* back up in the sequence */
-                            if (ref_offset > op_len)
-                                ref_offset -= op_len;
-                            else
-                                ref_offset = 0;
-                            break;
-                        case 'D': /** delete in the reference ***/
-                            ++bin->cover.indels;
-                        case 'N': /** expected skip in the reference ***/
-                            ref_offset += op_len;
-                            break;
-                        case 'X':
-                            bin->cover.mismatches += op_len;
-                        case '=':
-                            ref_offset += op_len;
-                            break;
-                        default:
-                            rc = RC(rcAlign, rcTable, rcCommitting, rcData, rcUnrecognized);
-                        }
-                        if (min_ref_offset > ref_offset)
-                            min_ref_offset = ref_offset;
-                        if (max_ref_offset < ref_offset)
-                            max_ref_offset = ref_offset;
-                    }
-                    for (j = min_ref_offset; j < max_ref_offset; ++j) {
-                        unsigned const hl = cov[j];
-                        
-                        if (hl < UINT8_MAX)
-                            cov[j] = hl + 1;
-                    }
-                    /*** check if OVERLAPS are needed ***/
-                    {
-                        int64_t min_rr = (global_ref_pos + min_ref_offset)/cself->max_seq_len;
-                        int64_t max_rr = (global_ref_pos + max_ref_offset)/cself->max_seq_len;
-                        
-                        if(min_rr < 0) min_rr = 0;
-                        if(max_rr >= ref_rows) max_rr = ref_rows -1;
-                        
-                        assert(min_rr<= max_rr);
-                        
-                        if(min_rr < max_rr){
-                            int64_t  overlap_ref_pos; /** relative the beginning of the reference **/
-                            uint32_t overlap_ref_len = (global_ref_pos + max_ref_offset) % cself->max_seq_len ;
-                            
-                            min_rr++;
-                            if (global_ref_pos + min_ref_offset > global_refseq_start) {
-                                overlap_ref_pos = global_ref_pos + min_ref_offset - global_refseq_start;
-                            }
-                            else {
-                                overlap_ref_pos = 1;
-                            }
-                            for (; min_rr < max_rr; ++min_rr) {
-                                if (  data[min_rr].cover.overlap_ref_pos[i] == 0 /*** NOT SET***/
-                                    || overlap_ref_pos < data[min_rr].cover.overlap_ref_pos[i])
-                                {
-									data[min_rr].cover.overlap_ref_pos[i] = (INSDC_coord_zero)overlap_ref_pos;
-                                }
-                                data[min_rr].cover.overlap_ref_len[i] = cself->max_seq_len; /*** in between chunks get full length of overlap **/
-                            }
-                            if (  data[min_rr].cover.overlap_ref_pos[i] == 0
-                                || overlap_ref_pos < data[min_rr].cover.overlap_ref_pos[i])
-                            {
-								data[min_rr].cover.overlap_ref_pos[i] = (INSDC_coord_zero)overlap_ref_pos;
-                            }
-                            if (overlap_ref_len > data[min_rr].cover.overlap_ref_len[i])
-								data[min_rr].cover.overlap_ref_len[i] = overlap_ref_len;
-                        }
-                    }
-                } /**** DONE WITH WORK ON STATISTICS ***/
-                ALIGN_DBGERR(rc);
-                rc = rc ? rc : quitting();
-            }
-		    /*** HAVE TO RELEASE **/
-		    TableReader_Whack(reader);
-		    VTableRelease(table);
-		    /*** NOW SAVE AND RELEASE THE COLUMN ***/
-		    if((rc = TableWriterRefCoverage_MakeIds(&cover_writer, cself->db, tbls[i].col)) == 0) {
-                for(rr=0; rc ==0 &&  rr < ref_rows; rr ++){
-                    uint64_t num_elem = AlignIdListCount(data[rr].idlist);
-                    uint64_t num_elem_copied = 0;
-                    if(num_elem > 0){
-#define BUF_STACK_COUNT 128 * 1024
-                        int64_t buf_stack[BUF_STACK_COUNT];
-                        int64_t *buf_alloc = NULL;
-                        int64_t *buf = buf_stack;
-                        if(num_elem > BUF_STACK_COUNT){
-                            buf=buf_alloc=malloc(num_elem*sizeof(buf[0]));
-                            if(buf_alloc == NULL) 
-                                rc = RC(rcAlign, rcTable, rcCommitting, rcMemory, rcExhausted);
-                        }
-                        if(rc == 0){
-                            num_elem_copied = AlignIdListFlatCopy(data[rr].idlist,buf,num_elem,true);
-                            assert(num_elem == num_elem_copied);
-                        }
-                        ReferenceMgr_TCoverRelease(data+rr); /** release memory ***/
-                        if(rc == 0){
-                            rc = TableWriterRefCoverage_WriteIds(cover_writer, rr+1, buf, (uint32_t)num_elem);
-                        }
-                        if(buf_alloc) free(buf_alloc);
-                    } else {
-                        rc = TableWriterRefCoverage_WriteIds(cover_writer, rr+1, NULL,0);
-                    }
-                }
-                if(rc == 0){
-                    rc = TableWriterRefCoverage_Whack(cover_writer, rc == 0, &new_rows);
-                    if(rc == 0  && ref_rows != new_rows) {
-                        rc = RC(rcAlign, rcTable, rcCommitting, rcData, rcInconsistent);
-                    }
-                }
-                ALIGN_DBGERR(rc);
-		    }
-		} else {
-			TableReader_Whack(reader);
-			VTableRelease(table);
-		}
-	}/* TABLE LOOP ENDS **/
-    /* prep and write coverage data */
-	if(rc == 0) {
-        uint64_t k;
-        
-		rc = TableWriterRefCoverage_MakeCoverage(&cover_writer, cself->db, 0);
-		for (rr = 0, k = 0; rc == 0 && rr != ref_rows; ++rr, k += cself->max_seq_len) {
-            unsigned hi = 0;
-            unsigned lo = 255;
-            
-		    for (i = 0; i != data[rr].bin_seq_len; ++i) {
-                unsigned const depth = hilo[k + i];
-                
-                if (hi < depth) hi = depth;
-                if (lo > depth) lo = depth;
-		    }
-            data[rr].cover.high = hi;
-            data[rr].cover.low  = lo;
-		    rc = TableWriterRefCoverage_WriteCoverage(cover_writer,rr+1, &data[rr].cover);
-		}
-		free(data);
-		rc1 = TableWriterRefCoverage_Whack(cover_writer, rc == 0, &new_rows);
-		rc = rc ? rc : rc1;
-		if(rc == 0 && ref_rows != new_rows) {
-		    rc = RC(rcAlign, rcTable, rcCommitting, rcData, rcInconsistent);
-		}
-	}
-    ALIGN_DBGERR(rc);
-	return rc;
-}
-
-LIB_EXPORT rc_t CC ReferenceMgr_Release(const ReferenceMgr *cself,
-                                        const bool commit,
-                                        uint64_t *const Rows,
-                                        const bool build_coverage,
-                                        rc_t (*const quitting)(void)
-                                       )
-{
-    rc_t rc = 0;
-
-    if (cself != NULL) {
-        ReferenceMgr *const self = (ReferenceMgr *)cself;
-        uint64_t rows = 0;
-        unsigned i;
-
-        rc = TableWriterRef_Whack(self->writer, commit, &rows);
-        if (Rows) *Rows = rows;
-        KDirectoryRelease(self->dir);
-
-        for (i = 0; i != self->refSeqs.elem_count; ++i)
-            ReferenceSeq_Whack(&self->refSeq[i]);
-
-        KDataBufferWhack(&self->compress);
-        KDataBufferWhack(&self->seq);
-        KDataBufferWhack(&self->refSeqs);
-
-        if (rc == 0 && build_coverage && commit && rows > 0)
-            rc = ReferenceMgr_ReCover(cself, rows, quitting);
-#if 0 
-        {
-            VTable* t = NULL;
-            
-            if (VDatabaseOpenTableUpdate(self->db, &t, "SECONDARY_ALIGNMENT") == 0) {
-                VTableDropColumn(t, "TMP_MISMATCH");
-                VTableDropColumn(t, "TMP_HAS_MISMATCH");
-            }
-            VTableRelease(t);
-        }
-#endif
-        VDatabaseRelease(self->db);
-        RefSeqMgr_Release(self->rmgr);
-        free(self);
-    }
-    return rc;
-}
-
-static
-rc_t ReferenceSeq_ReadDirect(ReferenceSeq *self,
-                             int offset,
-                             unsigned const len,
-                             bool read_circular,
-                             uint8_t buffer[],
-                             unsigned* written,
-                             bool force_linear)
-{
-    *written = 0;
-    if (len == 0)
-        return 0;
-    
-    if (read_circular || self->circular) {
-        if (offset < 0) {
-            unsigned const n = (-offset) / self->seq_len;
-            offset = (self->seq_len * (n + 1) + offset) % self->seq_len;
-        }
-        else if (offset > self->seq_len)
-            offset %= self->seq_len;
-    }
-    else if (offset >= self->seq_len)
-        return RC(rcAlign, rcType, rcReading, rcOffset, rcOutofrange);
-    
-    if (self->type == rst_local) {
-        uint8_t const *const src = self->u.local.buf.base;
-        unsigned dst_off = 0;
-        
-        while (dst_off < len) {
-            unsigned const writable = len - dst_off;
-            unsigned const readable = self->seq_len - offset;
-            unsigned const to_write = readable < writable ? readable : writable;
-            
-            memcpy(&buffer[dst_off], &src[offset], to_write);
-            *written += to_write;
-            if (!self->circular)
-                break;
-            offset = 0;
-            dst_off += to_write;
-        }
-        return 0;
-    }
-    else if (self->type == rst_refSeqById || self->type == rst_refSeqBySeqId) {
-        unsigned to_write = len;
-        
-        if (!self->circular || force_linear) {
-            unsigned const readable = self->seq_len - offset;
-            
-            if (to_write > readable)
-                to_write = readable;
-        }
-        return RefSeq_Read(self->u.refseq, offset, to_write, buffer, written);
-    }
-    return RC(rcAlign, rcType, rcReading, rcType, rcInvalid);
-}
-
-static
-rc_t ReferenceMgr_LoadSeq(ReferenceMgr *const self, ReferenceSeq *obj)
-{
-    KDataBuffer readBuf;
-    rc_t rc = KDataBufferMake(&readBuf, 8, self->max_seq_len);
-    
-    if (rc == 0) {
-        char const *const id = obj->id;
-        char const *const seqId = obj->seqId ? obj->seqId : id;
-        TableWriterRefData data;
-        INSDC_coord_zero offset = 0;
-        
-        obj->start_rowid = self->ref_rowid + 1;
-        data.name.buffer = id;
-        data.name.elements = string_size(id);
-        data.read.buffer = readBuf.base;
-        data.seq_id.buffer = seqId;
-        data.seq_id.elements = string_size(seqId);
-        data.force_READ_write = obj->type == rst_local || (self->options & ewrefmgr_co_allREADs);
-        data.circular = obj->circular;
-        
-        if (self->writer == NULL) {
-            uint32_t wopt = 0;
-            
-            wopt |= (self->options & ewrefmgr_co_allREADs) ? ewref_co_SaveRead : 0;
-            wopt |= (self->options & ewrefmgr_co_Coverage) ? ewref_co_Coverage : 0;
-            if((rc = TableWriterRef_Make(&self->writer, self->db, wopt)) == 0) {
-                TableWriterData mlen;
-                
-                mlen.buffer = &self->max_seq_len;
-                mlen.elements = 1;
-                rc = TableWriterRef_WriteDefaultData(self->writer, ewrefd_cn_MAX_SEQ_LEN, &mlen);
-            }
-        }
-        while (rc == 0 && offset < obj->seq_len) {
-            unsigned row_len;
-            
-            rc = ReferenceSeq_ReadDirect(obj, offset, self->max_seq_len, false,
-                                         readBuf.base, &row_len, true);
-            if (rc != 0 || row_len == 0) break;
-            
-            data.read.elements = row_len;
-            rc = TableWriterRef_Write(self->writer, &data, NULL);
-            offset += row_len;
-            ++self->ref_rowid;
-        }
-        KDataBufferWhack(&readBuf);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC ReferenceMgr_GetSeq(ReferenceMgr const *const cself,
-                                       ReferenceSeq const **const seq,
-                                       const char *const id,
-                                       bool *const shouldUnmap,
-                                       bool const allowMultiMapping,
-                                       bool wasRenamed[])
-{
-    ReferenceMgr *const self = (ReferenceMgr *)cself;
-    
-    if  (self == NULL || seq == NULL || id == NULL)
-        return RC(rcAlign, rcFile, rcConstructing, rcParam, rcNull);
-    
-    *seq = NULL;
-    *shouldUnmap = false;
-    {
-        ReferenceSeq *obj;
-        rc_t rc = ReferenceMgr_OpenSeq(self, &obj, id, 0, NULL, allowMultiMapping, wasRenamed);
-        
-        if (rc) return rc;
-        if (obj->type == rst_unmapped) {
-            *shouldUnmap = true;
-            return 0;
-        }
-        if (obj->start_rowid == 0) {
-            rc = ReferenceMgr_LoadSeq(self, obj);
-            if (rc) return rc;
-        }
-        *seq = obj;
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC ReferenceMgr_Verify(ReferenceMgr const *const cself,
-                                       char const id[],
-                                       INSDC_coord_len const length,
-                                       uint8_t const md5[16],
-                                       bool const allowMultiMapping,
-                                       bool wasRenamed[])
-{
-    if (cself == NULL || id == NULL)
-        return RC(rcAlign, rcFile, rcValidating, rcParam, rcNull);
-    {
-        ReferenceMgr *self = (ReferenceMgr *)cself;
-        ReferenceSeq *rseq;
-        rc_t rc = ReferenceMgr_OpenSeq(self, &rseq, id, length, md5, allowMultiMapping, wasRenamed);
-        
-        if (rc) return rc;
-        if (rseq->seq_len != length) {
-            rc = RC(rcAlign, rcFile, rcValidating, rcSize, rcUnequal);
-            ALIGN_DBGERRP("%s->%s SEQ_LEN verification", rc, id, rseq->seqId);
-        }
-        if (md5 && memcmp(md5, rseq->md5, sizeof(rseq->md5)) != 0) {
-            unsigned i;
-            
-            rc = RC(rcAlign, rcTable, rcValidating, rcChecksum, rcUnequal);
-            ALIGN_DBGERRP("%s->%s MD5 verification", rc, id, rseq->seqId);
-            ALIGN_DBGF((" found '"));
-            for(i = 0; i < sizeof(rseq->md5); i++) {
-                ALIGN_DBGF(("%02hx", rseq->md5[i]));
-            }
-            ALIGN_DBGF(("'  != requested '"));
-            for(i = 0; i < sizeof(rseq->md5); i++) {
-                ALIGN_DBGF(("%02hx", md5[i]));
-            }
-            ALIGN_DBGF(("'\n"));
-        } else {
-            ALIGN_DBG("%s->%s MD5 verification ok", id, rseq->seqId);
-        }
-        if(rc == 0) {
-            ALIGN_DBG("%s verification ok", id);
-        } else {
-            ALIGN_DBGERRP("%s verification", rc, id);
-        }
-        return rc;
-    }
-}
-
-LIB_EXPORT rc_t CC ReferenceMgr_FastaPath(const ReferenceMgr* cself, const char* fasta_path)
-{
-    rc_t rc = 0;
-    KDirectory* dir;
-
-    if(cself == NULL || fasta_path == NULL) {
-        rc = RC(rcAlign, rcFile, rcConstructing, rcParam, rcNull);
-    } else if((rc = KDirectoryNativeDir(&dir)) == 0) {
-        const KFile* kf;
-        if((rc = KDirectoryOpenFileRead(dir, &kf, "%s", fasta_path)) == 0) {
-            rc = ReferenceMgr_FastaFile(cself, kf);
-            KFileRelease(kf);
-        }
-        KDirectoryRelease(dir);
-    }
-    ALIGN_DBGERRP("from file %s", rc, fasta_path);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC ReferenceMgr_FastaFile(const ReferenceMgr* cself, const KFile* file)
-{
-    if(cself == NULL || file == NULL) {
-        return RC(rcAlign, rcFile, rcConstructing, rcParam, rcNull);
-    }
-    return ImportFastaFile((ReferenceMgr *)cself, file, NULL);
-}
-
-typedef struct {
-    unsigned length: 28, gentype:4, type: 8, code: 8;
-} cigar_bin_t;
-
-static
-rc_t cigar2offset_2(unsigned const cigar_len,
-                    cigar_bin_t const cigar[],
-                    unsigned const out_sz,
-                    unsigned const out_used,
-                    compress_buffer_t out_offset[],
-                    INSDC_coord_len out_seq_len[],
-                    INSDC_coord_len out_ref_len[],
-                    INSDC_coord_len out_max_ref_len[])
-{
-    unsigned i;
-    INSDC_coord_len seq_len = 0;
-    INSDC_coord_len ref_len = 0;
-    INSDC_coord_len max_ref_len = 0;
-    
-    for (i = 0; i < cigar_len; ++i) {
-        unsigned const op_len = cigar[i].length;
-        char const op = cigar[i].code;
-        uint8_t const type = cigar[i].type;
-        
-        switch(op) {
-            case 'M':
-            case '=':
-            case 'X':
-                seq_len += op_len;
-                ref_len += op_len;
-                if(max_ref_len < ref_len)
-                    max_ref_len = ref_len;
-                break;
-            case 'B':
-                /* Complete Genomics CIGAR style specific:
-                 overlap between consecutive reads
-                 ex: sequence 6 bases: ACACTG, reference 2 bases: ACTG,
-                 cigar will be: 2M2B2M
-                 no need to move sequence position
-                 */
-            case 'S':
-            case 'I':
-                if (seq_len < out_sz) {
-                    out_offset[seq_len].length = -op_len;
-                    out_offset[seq_len].type   = type;
-                    ALIGN_C_DBGF(("%s:%u: seq_pos: %u, ref_pos: %u, offset: %i\n", __func__, __LINE__, seq_len, ref_len, -op_len));
-                    if (op == 'B') ref_len -= op_len;
-                    else           seq_len += op_len;
-                }
-                else
-                    return RC(rcAlign, rcFile, rcProcessing, rcData, rcInconsistent);
-                break;
-            case 'N':
-            case 'D':
-                if (seq_len < out_sz) {
-                    out_offset[seq_len].length = op_len;
-                    out_offset[seq_len].type   = type;
-                    ALIGN_C_DBGF(("%s:%u: seq_pos: %u, ref_pos: %u, offset: %i\n", __func__, __LINE__, seq_len, ref_len, op_len));
-                }
-                else {
-                    out_offset[seq_len-1].length = op_len;
-                    out_offset[seq_len-1].type   = type;
-                    ALIGN_C_DBGF(("%s:%u: seq_pos: %u, ref_pos: %u, offset: %i\n", __func__, __LINE__, seq_len-1, ref_len, op_len));
-                }
-                ref_len += op_len;
-                if(max_ref_len < ref_len)
-                    max_ref_len = ref_len;
-                break;
-            default:
-                break;
-        }
-    }
-    out_seq_len[0] = seq_len;
-    out_ref_len[0] = ref_len;
-    out_max_ref_len[0] = max_ref_len;
-    
-    ALIGN_C_DBGF(("%s:%u: SEQLEN: %u, REFLEN: %u, MAXREFLEN: %u\n", __func__, __LINE__, seq_len, ref_len, max_ref_len));
-    
-    return 0;
-}
-
-static char const cigar_op_codes[] = "MIDNSHP=XB";
-
-static NCBI_align_ro_type const cigar_op_types[] = {
-    NCBI_align_ro_normal,			/* M */
-    NCBI_align_ro_normal,			/* I */
-    NCBI_align_ro_normal,			/* D */
-    NCBI_align_ro_intron_unknown,	/* N */
-    NCBI_align_ro_soft_clip,		/* S */
-    NCBI_align_ro_normal,			/* H */
-    NCBI_align_ro_normal,			/* P */
-    NCBI_align_ro_normal,			/* = */
-    NCBI_align_ro_normal,			/* X */
-    NCBI_align_ro_complete_genomics	/* B */
-};
-
-enum {
-    gen_match_type,
-    gen_insert_type,
-    gen_delete_type,
-    gen_ignore_type
-};
-
-static int const cigar_op_gentypes[] = {
-    gen_match_type,			/* M */
-    gen_insert_type,		/* I */
-    gen_delete_type,		/* D */
-    gen_delete_type,		/* N */
-    gen_insert_type,		/* S */
-    gen_ignore_type,		/* H */
-    gen_ignore_type,		/* P */
-    gen_match_type,			/* = */
-    gen_match_type,			/* X */
-    gen_insert_type			/* B */
-};
-
-static
-rc_t cigar_bin(cigar_bin_t cigar[],
-               unsigned const cigar_len,
-               void const *cigar_in)
-{
-    unsigned i;
-    uint32_t const *const cigar_bin = cigar_in;
-    
-    ALIGN_C_DBGF(("%s:%u: '", __func__, __LINE__));
-    for (i = 0; i < cigar_len; ++i) {
-        uint32_t c;
-        
-        memcpy(&c, cigar_bin + i, 4);
-        {
-            int const op = c & 0x0F;
-            int const len = c >> 4;
-            
-            if (op >= sizeof(cigar_op_codes)) {
-                rc_t const rc = RC(rcAlign, rcFile, rcProcessing, rcData, rcUnrecognized);
-                (void)PLOGERR(klogErr, (klogErr, rc, "Invalid or unrecognized CIGAR operation (binary code: $(opbin))", "opbin=%u", op));
-                return rc;
-            }
-            ALIGN_C_DBGF(("%u%c", len, cigar_op_codes[op]));
-            cigar[i].length = len;
-            cigar[i].code = cigar_op_codes[op];
-            cigar[i].type = cigar_op_types[op];
-            cigar[i].gentype = cigar_op_gentypes[op];
-        }
-    }
-    ALIGN_C_DBGF(("'[%u]\n", cigar_len));
-    return 0;
-}
-
-static
-rc_t cigar_string(cigar_bin_t cigar[],
-                  unsigned const cigar_len,
-                  void const *cigar_in)
-{
-    unsigned i;
-    unsigned j;
-    char const *const cigar_string = cigar_in;
-    
-    ALIGN_C_DBGF(("%s:%u: '%s'[%u]\n", __func__, __LINE__, cigar_in, cigar_len));
-    for (i = j = 0; j < cigar_len; ++j) {
-        int len = 0;
-        
-        for (; ;) {
-            int const ch = cigar_string[i++];
-            
-            if (isdigit(ch))
-                len = (len * 10) + (ch - '0');
-            else {
-                int op;
-                
-                for (op = 0; op < sizeof(cigar_op_codes); ++op) {
-                    if (ch == cigar_op_codes[op])
-                        break;
-                }
-                if (op == sizeof(cigar_op_codes)) {
-                    rc_t const rc = RC(rcAlign, rcFile, rcProcessing, rcData, rcUnrecognized);
-                    (void)PLOGERR(klogErr, (klogErr, rc, "Invalid or unrecognized CIGAR operation '$(opcode)'", "opcode=%c", ch));
-                    return rc;
-                }
-                cigar[j].length = len;
-                cigar[j].code = cigar_op_codes[op];
-                cigar[j].type = cigar_op_types[op];
-                cigar[j].gentype = cigar_op_gentypes[op];
-                break;
-            }
-        }
-    }
-    return 0;
-}
-
-static int cigar_string_op_count(char const cigar[])
-{
-    unsigned n = 0;
-    int st = 0;
-    int i = 0;
-    
-    for (; ;) {
-        int const ch = cigar[i];
-        
-        if (ch == '\0')
-        break;
-        
-        switch (st) {
-            case 0:
-                if (!isdigit(ch))
-                return -1;
-                ++st;
-                break;
-            case 1:
-                if (!isdigit(ch)) {
-                    ++n;
-                    --st;
-                }
-                break;
-        }
-        ++i;
-    }
-    return st == 0 ? n : -1;
-}
-
-static unsigned cigar_remove_ignored(unsigned opcount, cigar_bin_t cigar[])
-{
-    unsigned i = opcount;
-    
-    while (i) {
-        unsigned const oi = i;
-        unsigned const type = cigar[--i].gentype;
-        
-        if (type == gen_ignore_type) {
-            memmove(cigar + i, cigar + oi, (opcount - oi) * sizeof(cigar[0]));
-            --opcount;
-        }
-    }
-    return opcount;
-}
-
-static
-rc_t cigar2offset(int const options,
-                  unsigned const cigar_len,
-                  void const *in_cigar,
-                  unsigned const out_sz,
-                  unsigned const out_used,
-                  uint8_t const intron_type,
-                  compress_buffer_t out_offset[],
-                  INSDC_coord_len out_seq_len[],
-                  INSDC_coord_len out_ref_len[],
-                  INSDC_coord_len out_max_ref_len[],
-                  INSDC_coord_len out_adjust[])
-{
-    bool const binary = (options & ewrefmgr_cmp_Binary) ? true : false;
-    int const maxopcount = binary ? cigar_len : cigar_string_op_count(in_cigar);
-
-    memset(out_offset, 0, out_used * sizeof(*out_offset));
-    
-    if (maxopcount > 0) {
-        cigar_bin_t  scigar[256];
-        cigar_bin_t *hcigar = NULL;
-        cigar_bin_t *cigar = scigar;
-        
-        if (maxopcount > sizeof(scigar)/sizeof(scigar[0])) {
-            hcigar = malloc(maxopcount * sizeof(hcigar[0]));
-            
-            if (hcigar == NULL) {
-                rc_t const rc = RC(rcAlign, rcFile, rcProcessing, rcMemory, rcExhausted);
-                (void)PLOGERR(klogErr, (klogErr, rc, "out of memory trying to allocate $(bytes) bytes for CIGAR operations", "bytes=%u", (unsigned)(maxopcount * sizeof(hcigar[0]))));
-                return rc;
-            }
-            cigar = hcigar;
-        }
-        {
-            rc_t const rc = (binary ? cigar_bin : cigar_string)(cigar,
-                                                                maxopcount,
-                                                                in_cigar);
-            if (rc)
-                return rc;
-        }
-        /* check for hard clipping if not accepted */
-        if ((options & ewrefmgr_co_AcceptHardClip) == 0) {
-            unsigned i;
-
-            for (i = 0; i < maxopcount; ++i) {
-                if (cigar[i].code == 'H') {
-                    rc_t const rc = RC(rcAlign, rcFile, rcProcessing, rcData, rcNotAvailable);
-                    (void)LOGERR(klogErr, rc, "Hard clipping of sequence data is not allowed");
-                    return rc;
-                }
-            }
-        }
-        {
-            unsigned first = 0;
-            unsigned opcount = cigar_remove_ignored(maxopcount, cigar);
-            
-            out_adjust[0] = 0;
-            if ((options & ewrefmgr_cmp_Exact) == 0) {
-                /* remove any leading delete operations */
-                for (first = 0; first < opcount; ++first) {
-                    if (cigar[first].gentype != gen_delete_type)
-                        break;
-                    out_adjust[0] += cigar[first].length;
-                }
-                /* make sure any adjacent deletes and inserts are ordered so that
-                 * the delete follows the insert
-                 */
-                {
-                    unsigned i;
-#if 1
-                    for (i = first; i < opcount - 1; ) {
-                        cigar_bin_t const cur = cigar[i + 0];
-                        cigar_bin_t const nxt = cigar[i + 1];
-                        
-                        if (cur.gentype != gen_delete_type)
-                            ;
-                        else if (nxt.gentype == gen_delete_type) {
-                            unsigned const type = (cur.type == NCBI_align_ro_normal && nxt.type == NCBI_align_ro_normal) ? NCBI_align_ro_normal : NCBI_align_ro_intron_unknown;
-                            int const code = type == NCBI_align_ro_normal ? 'D' : 'N';
-                            unsigned const length = cur.length + nxt.length;
-                            
-                            --opcount;
-                            memmove(cigar + i, cigar + i + 1, (opcount - i) * sizeof(cigar[0]));
-                            
-                            cigar[i].type = type;
-                            cigar[i].code = code;
-                            cigar[i].length = length;
-
-                            continue;
-                        }
-                        else if (nxt.gentype == gen_insert_type) {
-                            if (nxt.type == NCBI_align_ro_complete_genomics) {
-                                assert(i + 2 < opcount);
-                                cigar[i + 0] = nxt;
-                                cigar[i + 1] = cigar[i + 2];
-                                cigar[i + 2] = cur;
-                                ++i;
-                            }
-                            else {
-                                cigar[i + 0] = nxt;
-                                cigar[i + 1] = cur;
-                            }
-                        }
-                        ++i;
-                    }
-#else
-                    for (i = first + 1; i < opcount; ) {
-                        if (cigar[i].gentype == gen_insert_type && cigar[i-1].gentype == gen_delete_type) {
-                            cigar_bin_t const prv = cigar[i - 1];
-                            cigar_bin_t const cur = cigar[i];
-                            
-                            cigar[  i] = prv;
-                            cigar[--i] = cur;
-                            if (i <= first + 1)
-                                i  = first + 1;
-                        }
-                        else
-                            ++i;
-                    }
-#endif
-                }
-                /* merge adjacent delete type operations D+D -> D else becomes N */
-                {
-                    unsigned i;
-                    
-                    for (i = first + 1; i < opcount;) {
-                        if (cigar[i].gentype == gen_delete_type && cigar[i-1].gentype == gen_delete_type) {
-                            cigar[i].length += cigar[i-1].length;
-                            if (cigar[i].type == NCBI_align_ro_normal && cigar[i-1].type == NCBI_align_ro_normal) {
-                                cigar[i].type = NCBI_align_ro_normal;
-                                cigar[i].code = 'D';
-                            }
-                            else {
-                                cigar[i].type = NCBI_align_ro_intron_unknown;
-                                cigar[i].code = 'N';
-                            }
-                            memcpy(cigar + i - 1, cigar + i, (opcount - i) * sizeof(cigar[0]));
-                            --opcount;
-                        }
-                        else
-                            ++i;
-                    }
-                }
-            }
-            /* remove any ignored operations */
-            {
-                unsigned i = opcount;
-                
-                while (i) {
-                    unsigned const oi = i;
-                    cigar_bin_t const op = cigar[--i];
-                    
-                    if (op.gentype == gen_ignore_type) {
-                        memcpy(cigar + i, cigar + oi, (opcount - oi) * sizeof(cigar[0]));
-                        --opcount;
-                    }
-                }
-            }
-            /* make the intron the known type */
-            {
-                unsigned i;
-                
-                for (i = first; i < opcount; ++i) {
-                    if (cigar[i].type == NCBI_align_ro_intron_unknown)
-                        cigar[i].type = intron_type;
-                }
-            }
-            {
-                rc_t const rc = cigar2offset_2(opcount - first,
-                                               cigar + first,
-                                               out_sz,
-                                               out_used,
-                                               out_offset,
-                                               out_seq_len,
-                                               out_ref_len,
-                                               out_max_ref_len);
-                if (hcigar)
-                    free(hcigar);
-                return rc;
-            }
-        }
-        {
-        }
-    }
-    else {
-        rc_t const rc = RC(rcAlign, rcFile, rcProcessing, rcData, rcUnrecognized);
-        (void)PLOGERR(klogErr, (klogErr, rc, "Invalid CIGAR string '$(cigar)'", "cigar=%s", in_cigar));
-        return rc;
-    }
-}
-
-LIB_EXPORT rc_t CC ReferenceSeq_TranslateOffset_int(ReferenceSeq const *const cself,
-                                                    INSDC_coord_zero const offset,
-                                                    int64_t *const ref_id,
-                                                    INSDC_coord_zero *const ref_start,
-                                                    uint64_t *const global_ref_start)
-{
-    if(cself == NULL)
-        return RC(rcAlign, rcFile, rcProcessing, rcSelf, rcNull);
-        
-    if (ref_id)
-        *ref_id = cself->start_rowid + offset / cself->mgr->max_seq_len;
-    
-    if (ref_start)
-        *ref_start = offset % cself->mgr->max_seq_len;
-    
-    if (global_ref_start)
-        *global_ref_start = (cself->start_rowid - 1) * cself->mgr->max_seq_len + offset;
-        
-    return 0;
-}
-
-LIB_EXPORT rc_t CC ReferenceMgr_Compress(const ReferenceMgr* cself,
-                                         uint32_t options,
-                                         const char* id,
-                                         INSDC_coord_zero offset,
-                                         const char* seq,
-                                         INSDC_coord_len seq_len,
-                                         const void* cigar,
-                                         uint32_t cigar_len,
-                                         INSDC_coord_zero allele_offset,
-                                         const char* allele,
-                                         INSDC_coord_len allele_len,
-                                         INSDC_coord_zero offset_in_allele,
-                                         const void* allele_cigar,
-                                         uint32_t allele_cigar_len,
-                                         uint8_t const rna_orient,
-                                         TableWriterAlgnData* data)
-{
-    rc_t rc = 0;
-    bool shouldUnmap = false;
-    bool wasRenamed = false;
-    const ReferenceSeq* refseq;
-
-    if(cself == NULL || id == NULL) {
-        rc = RC(rcAlign, rcFile, rcProcessing, rcParam, rcNull);
-    }
-    else if((rc = ReferenceMgr_GetSeq(cself, &refseq, id, &shouldUnmap, false, &wasRenamed)) == 0) {
-        assert(shouldUnmap == false);
-        assert(wasRenamed == false);
-        rc = ReferenceSeq_Compress(refseq, options, offset, seq, seq_len, cigar, cigar_len,
-                                   allele_offset, allele, allele_len,offset_in_allele,
-                                   allele_cigar, allele_cigar_len, rna_orient, data);
-        ReferenceSeq_Release(refseq);
-    }
-    ALIGN_C_DBGERR(rc);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC ReferenceSeq_Compress(ReferenceSeq const *const cself,
-                                         uint32_t options,
-                                         INSDC_coord_zero offset,
-                                         const char* seq, INSDC_coord_len seq_len,
-                                         const void* cigar, uint32_t cigar_len,
-                                         INSDC_coord_zero allele_offset, const char* allele,
-                                         INSDC_coord_len allele_len,
-                                         INSDC_coord_zero offset_in_allele,
-                                         const void* allele_cigar, uint32_t allele_cigar_len,
-                                         uint8_t const rna_orient,
-                                         TableWriterAlgnData* data)
-{
-    rc_t rc = 0;
-    ReferenceSeq *const self = (ReferenceSeq *)cself;
-
-    if (self == NULL || seq == NULL || cigar == NULL || cigar_len == 0 || data == NULL ||
-        (!(allele == NULL && allele_len == 0 && allele_cigar == NULL && allele_cigar_len == 0) &&
-         !(allele != NULL && allele_cigar != NULL && allele_cigar_len != 0)))
-    {
-        return RC(rcAlign, rcFile, rcProcessing, rcParam, rcInvalid);
-    }
-
-    if (seq_len > self->mgr->compress.elem_count) {
-        rc = KDataBufferResize(&self->mgr->compress, seq_len);
-        if (rc) return rc;
-    }
-    {
-        INSDC_coord_len i, seq_pos = 0, allele_ref_end = 0, ref_len = 0, rl = 0, max_rl = 0;
-        INSDC_coord_zero* read_start = &((INSDC_coord_zero*)(data->read_start.buffer))[data->ploidy];
-        INSDC_coord_len* read_len = &((INSDC_coord_len*)(data->read_len.buffer))[data->ploidy];
-        bool* has_ref_offset, *has_mismatch;
-        int32_t *const ref_offset       = (int32_t *)data->ref_offset.buffer;
-        uint8_t *const ref_offset_type  = (uint8_t *)data->ref_offset_type.buffer;
-        uint8_t *mismatch;
-        uint8_t sref_buf[64 * 1024];
-        void *href_buf = NULL;
-        uint8_t *ref_buf = sref_buf;
-        compress_buffer_t allele_off_buf[1024];
-        INSDC_coord_len position_adjust = 0;
-#if _DEBUGGING
-        uint64_t i_ref_offset_elements, i_mismatch_elements;
-        char x[4096];
-#endif
-
-        if(data->ploidy == 0) {
-            data->has_ref_offset.elements = seq_len;
-            data->ref_offset.elements = 0;
-            data->has_mismatch.elements = seq_len;
-            data->mismatch.elements = 0;
-            *read_start = 0;
-        }
-        else {
-            data->has_ref_offset.elements += seq_len;
-            data->has_mismatch.elements += seq_len;
-            *read_start = read_start[-1] + read_len[-1];
-        }
-        *read_len = seq_len;
-        has_ref_offset = &((bool*)(data->has_ref_offset.buffer))[*read_start];
-        has_mismatch = &((bool*)(data->has_mismatch.buffer))[*read_start];
-        mismatch = (uint8_t*)(data->mismatch.buffer);
-
-#if _DEBUGGING
-        i_ref_offset_elements = data->ref_offset.elements;
-        i_mismatch_elements = data->mismatch.elements;
-        ALIGN_C_DBG("align%s '%.*s'[%u] to '%s:%s' at %i", (options & ewrefmgr_cmp_Exact) ? " EXACT" : "",
-                    seq_len, seq, seq_len, cself->id, cself->seqId, offset);
-#endif
-        if(allele != NULL) {
-            /* determine length of reference for subst by allele */
-            ALIGN_C_DBG("apply allele %.*s[%u] at %i w/cigar below",
-                        allele_len, allele, allele_len, allele_offset);
-            rc = cigar2offset(options|ewrefmgr_cmp_Exact,
-                              allele_cigar_len,
-                              allele_cigar,
-                              sizeof(allele_off_buf) / sizeof(*allele_off_buf),
-                              allele_len,
-                              ' ',
-                              allele_off_buf,
-                              &seq_pos,
-                              &allele_ref_end,
-                              &max_rl,
-                              &position_adjust);
-            /* where allele ends on reference */
-            allele_ref_end += allele_offset;
-        }
-        if(rc == 0) {
-            rc = cigar2offset(options,
-                              cigar_len,
-                              cigar,
-                              (unsigned)self->mgr->compress.elem_count,
-                              seq_len,
-                              rna_orient,
-                              self->mgr->compress.base,
-                              &seq_pos,
-                              &rl,
-                              &max_rl,
-                              &position_adjust);
-            offset += position_adjust;
-        }
-        if (allele != NULL) {
-            if (allele_ref_end < offset || offset + rl < allele_offset) {
-                /* allele and alignment don't intersect             */
-                /* TODO: [VDB-1585] try to make this recoverable    */
-                rc = RC(rcAlign, rcFile, rcProcessing, rcData, rcInvalid);
-                (void)PLOGERR(klogWarn, (klogWarn, rc,
-                    "allele $(a) offset $(ao) $(ac) is not within referenced region in $(id) at offset $(ro) $(rc)",
-                    "a=%.*s,ao=%i,ac=%.*s,id=%s,ro=%i,rc=%.*s",
-                    allele_len, allele, allele_offset, (options & ewrefmgr_cmp_Binary) ? 0 : allele_cigar_len, allele_cigar,
-                    self->seqId, offset, (options & ewrefmgr_cmp_Binary) ? 0 : cigar_len, cigar));
-            }
-        }
-        if(rc == 0) {
-            ref_len = rl;
-            if((offset + max_rl) > self->seq_len && !self->circular) {
-                max_rl = self->seq_len - offset;
-                if(max_rl < rl) {
-                    /* ref_len used for compression cannot be shorter than ref_len derived from cigar,
-                       if there is a shortage it will fail later here */
-                    max_rl = rl;
-                }
-                ALIGN_C_DBG("max_ref_len truncated to %u cause it goes beyond refseq length %lu at offset %i",
-                             max_rl, cself->seq_len, offset);
-            }
-            ALIGN_C_DBG("chosen REF_LEN %u, ref len for match %u", ref_len, max_rl);
-
-            if (seq_len != seq_pos) {
-                rc = RC(rcAlign, rcFile, rcProcessing, rcData, rcInvalid);
-            }
-            if (rc == 0) {
-                if (max_rl > sizeof(sref_buf)) {
-                    if (href_buf)
-                        free(href_buf);
-                    href_buf = malloc(max_rl);
-                    if (href_buf == NULL)
-                        rc = RC(rcAlign, rcFile, rcProcessing, rcMemory, rcExhausted);
-                    ref_buf = href_buf;
-                }
-            }
-            if (rc == 0) {
-                if(allele != NULL) {
-                    /* subst allele in reference */
-                    if(allele_offset <= offset) {
-                        /* move allele start inside referenced chunk */
-                        allele     += offset_in_allele;
-                        allele_len -= offset_in_allele;
-                        rl = 0;
-                    } else {
-                        /* fetch portion of reference which comes before allele */
-                        rl = allele_offset - offset;
-                        rc = ReferenceSeq_ReadDirect(self, offset, rl, true, ref_buf, &i, false);
-                        if(rc == 0 && rl != i) {
-                            /* here we need to test it otherwise excessive portion of allele could be fetch in next if */
-                            rc = RC(rcAlign, rcFile, rcProcessing, rcRange, rcExcessive);
-                        }
-                    }
-                    if(rc == 0 && allele_len < (max_rl - rl)) {
-                        memcpy(&ref_buf[rl], allele, allele_len);
-                        rl += allele_len;
-                        /* append tail of actual reference */
-                        rc = ReferenceSeq_ReadDirect(self, allele_ref_end, max_rl - rl, true, &ref_buf[rl], &i, false);
-                        rl += i;
-                    } else if(rc == 0) {
-                        /* allele is longer than needed */
-                        memcpy(&ref_buf[rl], allele, max_rl - rl);
-                        rl = max_rl;
-                    }
-                }
-                else {
-                    rc = ReferenceSeq_ReadDirect(self, offset, max_rl, true, ref_buf, &rl, false);
-                }
-                if (rc != 0 || max_rl != rl) {
-                    rc = rc ? rc : RC(rcAlign, rcFile, rcProcessing, rcRange, rcExcessive);
-                    ALIGN_C_DBGERRP("refseq is shorter: at offset %i need %u bases", rc, offset, max_rl);
-                }
-                else {
-                    compress_buffer_t *const compress_buf = self->mgr->compress.base;
-                    unsigned ro = (unsigned)data->ref_offset.elements;
-                    int ref_pos;
-                    
-                    for (seq_pos = 0, ref_pos = 0; seq_pos < seq_len; seq_pos++, ref_pos++) {
-                        int const length = compress_buf[seq_pos].length;
-                        int const type = compress_buf[seq_pos].type;
-
-#if 0
-                        ALIGN_C_DBG("seq_pos: %u, ref_pos: %i, offset: %i, type: %i, ro: %u", seq_pos, ref_pos, length, type, ro);
-#endif
-                        if (length == 0 && type == 0)
-                            has_ref_offset[seq_pos] = 0;
-                        else {
-                            has_ref_offset[seq_pos] = 1;
-                            ref_offset[ro] = length;
-                            ref_offset_type[ro] = type;
-                            ref_pos += length;
-                            ++ro;
-                        }
-                        if (ref_pos < 0 || ref_pos >= max_rl ||
-                            ((toupper(ref_buf[ref_pos]) != toupper(seq[seq_pos])) && (seq[seq_pos] != '=')))
-                        {
-                            has_mismatch[seq_pos] = 1;
-                            mismatch[data->mismatch.elements++] = seq[seq_pos];
-                        }
-                        else {
-                            has_mismatch[seq_pos] = 0;
-                        }
-                    }
-                    data->ref_offset.elements = data->ref_offset_type.elements = ro;
-                }
-            }
-        }
-#if _DEBUGGING
-        if(rc == 0) {
-            int32_t j;
-            memset(x, '-', sizeof(x) - 1);
-            x[sizeof(x) - 2] = '\0';
-
-            ALIGN_C_DBG("ref: %.*s [%u]", max_rl, ref_buf, max_rl);
-            ALIGN_C_DBGF(("%s:%u: ref: ", __func__, __LINE__));
-            for(seq_pos = 0, j = 0, rl = 0, i = 0; seq_pos < seq_len; seq_pos++, j++) {
-                if(has_ref_offset[seq_pos]) {
-                    if(ref_offset[i_ref_offset_elements + rl] > 0) {
-                        ALIGN_C_DBGF(("%.*s", (uint32_t)(ref_offset[i_ref_offset_elements + rl]), &ref_buf[j]));
-                    } else {
-                        i = -ref_offset[i_ref_offset_elements + rl];
-                    }
-                    j += ref_offset[i_ref_offset_elements + rl];
-                    rl++;
-                }
-                ALIGN_C_DBGF(("%c", (j < 0 || j >= max_rl) ? '-' : (i > 0) ? tolower(ref_buf[j]) : ref_buf[j]));
-                if(i > 0 ) {
-                    i--;
-                }
-            }
-            ALIGN_C_DBGF(("\n%s:%u: seq: ", __func__, __LINE__));
-            for(i = 0, j = 0; i < seq_len; i++) {
-                if(has_ref_offset[i] && ref_offset[i_ref_offset_elements + j++] > 0) {
-                    ALIGN_C_DBGF(("%.*s", ref_offset[i_ref_offset_elements + j - 1], x));
-                }
-                ALIGN_C_DBGF(("%c", seq[i]));
-            }
-            ALIGN_C_DBGF((" [%u]\n", seq_len));
-            ALIGN_C_DBGF(("%s:%u: hro: ", __func__, __LINE__));
-            for(i = 0, j = 0; i < seq_len; i++) {
-                if(has_ref_offset[i] && ref_offset[i_ref_offset_elements + j++] > 0) {
-                    ALIGN_C_DBGF(("%.*s", ref_offset[i_ref_offset_elements + j - 1], x));
-                }
-                ALIGN_C_DBGF(("%c", has_ref_offset[i] + '0'));
-            }
-            ALIGN_C_DBGF((", ro:"));
-            for(i = i_ref_offset_elements; i < data->ref_offset.elements; i++) {
-                ALIGN_C_DBGF((" %i,", ref_offset[i]));
-            }
-            ALIGN_C_DBGF(("[%u]\n", data->ref_offset.elements - i_ref_offset_elements));
-            ALIGN_C_DBGF(("%s:%u: hmm: ", __func__, __LINE__));
-            for(i = 0, j = 0; i < seq_len; i++) {
-                if(has_ref_offset[i] && ref_offset[i_ref_offset_elements + j++] > 0) {
-                    ALIGN_C_DBGF(("%.*s", ref_offset[i_ref_offset_elements + j - 1], x));
-                }
-                ALIGN_C_DBGF(("%c", has_mismatch[i] + '0'));
-            }
-            ALIGN_C_DBGF((", mm: '%.*s'[%u]\n", (int)(data->mismatch.elements - i_mismatch_elements),
-                &mismatch[i_mismatch_elements], data->mismatch.elements - i_mismatch_elements));
-        }
-#endif
-        if(rc == 0) {
-            if(data->ploidy == 0) {
-                int64_t *const ref_id = (int64_t *)data->ref_id.buffer;
-                INSDC_coord_zero *const ref_start = (INSDC_coord_zero *)data->ref_start.buffer;
-                uint64_t *const global_ref_start = (uint64_t *)data->global_ref_start.buffer;
-                
-                data->ref_1st_row_id = self->start_rowid;
-                data->effective_offset = offset;
-                data->ref_len = ref_len;
-                ALIGN_C_DBGF(("%s:%u: reference 1st ROW_ID %li OFFSET %i REF_LEN %u",
-                    __func__, __LINE__, data->ref_1st_row_id, data->effective_offset, data->ref_len));
-                
-                ReferenceSeq_TranslateOffset_int(self, offset, ref_id, ref_start, global_ref_start);
-                
-                if (ref_id) {
-                    data->ref_id.elements = 1;
-                    ALIGN_C_DBGF((" REF_ID %li", ref_id[0]));
-                }
-                if (ref_start) {
-                    data->ref_start.elements = 1;
-                    ALIGN_C_DBGF((" REF_START %i", ref_start[0]));
-                }
-                if (global_ref_start) {
-                    data->global_ref_start.elements = 1;
-                    ALIGN_C_DBGF((" GLOBAL_REF_START %lu", global_ref_start[0]));
-                }
-                ALIGN_C_DBGF(("\n"));
-            } else {
-                if(data->ref_1st_row_id != self->start_rowid || data->effective_offset != offset) {
-                    rc = RC(rcAlign, rcFile, rcProcessing, rcData, rcInconsistent);
-                    (void)PLOGERR(klogErr, (klogErr, rc,
-                        "all reads in alignment record must align to same refseq at same location $(r1)@$(o1) <> $(r2):$(a2)@$(o2)",
-                        "r1=%li,o1=%i,r2=%s,a2=%s,o2=%i", data->ref_1st_row_id, data->effective_offset, self->id, self->seqId, offset));
-                } else if(data->ref_len != ref_len) {
-                    rc = RC(rcAlign, rcFile, rcProcessing, rcData, rcInconsistent);
-                    (void)PLOGERR(klogErr, (klogErr, rc,
-                        "all reads in alignment record must have same size projection on refseq $(rl1) <> $(rl2) $(r):$(a)@$(o)",
-                        "rl1=%u,rl2=%u,r=%s,a=%s,o=%i", data->ref_len, ref_len, self->id, self->seqId, offset));
-                }
-            }
-        }
-        if(rc == 0) {
-            data->ploidy++;
-            data->read_start.elements = data->ploidy;
-            data->read_len.elements = data->ploidy;
-        }
-        if (href_buf)
-            free(href_buf);
-    }
-    ALIGN_C_DBGERR(rc);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC ReferenceSeq_Read(const ReferenceSeq* cself, INSDC_coord_zero offset, INSDC_coord_len len,
-                                     uint8_t* buffer, INSDC_coord_len* ref_len)
-{
-    rc_t rc = 0;
-
-    if(cself == NULL || buffer == NULL || ref_len == NULL) {
-        rc = RC(rcAlign, rcFile, rcReading, rcParam, rcNull);
-    } else {
-        rc = ReferenceSeq_ReadDirect((ReferenceSeq*)cself, offset, len, true, buffer, ref_len, false);
-    }
-    ALIGN_DBGERR(rc);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC ReferenceSeq_Get1stRow(const ReferenceSeq* cself, int64_t* row_id)
-{
-    rc_t rc = 0;
-
-    if(cself == NULL || row_id == NULL) {
-        rc = RC(rcAlign, rcFile, rcReading, rcParam, rcNull);
-    } else {
-        *row_id = cself->start_rowid;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC ReferenceSeq_GetID(ReferenceSeq const *const self, char const **const rslt)
-{
-    assert(self != NULL);
-    assert(rslt != NULL);
-    *rslt = self->id;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC ReferenceSeq_AddCoverage(const ReferenceSeq* cself, INSDC_coord_zero offset, const ReferenceSeqCoverage* data)
-{
-    rc_t rc = 0;
-
-    if(cself == NULL || data == NULL) {
-        rc = RC(rcAlign, rcFile, rcReading, rcParam, rcNull);
-    } else if(!(cself->mgr->options & ewrefmgr_co_Coverage)) {
-        rc = RC(rcAlign, rcType, rcWriting, rcData, rcUnexpected);
-        ALIGN_R_DBGERRP("coverage %s", rc, "data");
-    } else if((rc = ReferenceSeq_ReOffset(cself->circular, cself->seq_len, &offset)) == 0) {
-        rc = TableWriterRef_WriteCoverage(cself->mgr->writer, cself->start_rowid, offset, data);
-    }
-    ALIGN_DBGERR(rc);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC ReferenceSeq_Release(const ReferenceSeq *cself)
-{
-    return 0;
-}
diff --git a/libs/align/writer-refseq.c b/libs/align/writer-refseq.c
deleted file mode 100644
index c180b8b..0000000
--- a/libs/align/writer-refseq.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <align/extern.h>
-
-#include <klib/rc.h>
-#include <insdc/insdc.h>
-#include <vdb/manager.h>
-#include <align/writer-refseq.h>
-#include "writer-priv.h"
-#include "debug.h"
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <ctype.h>
-#include <assert.h>
-
-static const TableWriterColumn TableWriterRefSeq_cols[ewrefseq_cn_Last + 1] =
-{
-    /* order is important, see enum in .h !!! */
-    {0, "MAX_SEQ_LEN", sizeof(uint32_t) * 8, 0},
-    {0, "DEF_LINE", sizeof(char) * 8, ewcol_IsArray},
-    {0, "(INSDC:dna:text)CS_KEY", sizeof(char) * 8, 0},
-    {0, "(INSDC:dna:text)READ", sizeof(char) * 8, ewcol_IsArray},
-    {0, "QUALITY", sizeof(INSDC_quality_phred) * 8, ewcol_IsArray},
-    {0, "SEQ_ID", sizeof(char) * 8, ewcol_IsArray},
-    {0, "SEQ_START", sizeof(INSDC_coord_one) * 8, 0},
-    {0, "SEQ_LEN", sizeof(INSDC_coord_len) * 8, 0},
-    {0, "CIRCULAR", sizeof(bool) * 8, 0}
-};
-
-struct TableWriterRefSeq {
-    const TableWriter* base;
-    uint8_t cursorid;
-    TableWriterColumn cols[sizeof(TableWriterRefSeq_cols)/sizeof(TableWriterRefSeq_cols[0])];
-    INSDC_coord_one seq_start_last;
-    uint32_t max_seq_len;
-    INSDC_dna_text last_cs_key;
-};
-
-LIB_EXPORT rc_t CC TableWriterRefSeq_Make(const TableWriterRefSeq** cself, VDBManager* mgr, const char* schema_path,
-                                          const char* table_path, const uint32_t options)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL ) {
-        rc = RC(rcAlign, rcFormatter, rcConstructing, rcParam, rcNull);
-    } else {
-        TableWriterRefSeq* self = calloc(1, sizeof(*self));
-        if( self == NULL ) {
-            rc = RC(rcAlign, rcFormatter, rcConstructing, rcMemory, rcExhausted);
-        } else {
-            memcpy(self->cols, TableWriterRefSeq_cols, sizeof(TableWriterRefSeq_cols));
-            if( !(options & ewrefseq_co_QUALITY) ) {
-                self->cols[ewrefseq_cn_QUALITY].flags |= ewcol_Ignore;
-            }
-            if( (rc = TableWriter_MakeMgr(&self->base, mgr, schema_path, "NCBI:refseq:tbl:reference", table_path)) == 0 ) {
-                rc = TableWriter_AddCursor(self->base, self->cols, sizeof(self->cols)/sizeof(self->cols[0]), &self->cursorid);
-            }
-        }
-        if( rc == 0 ) {
-            *cself = self;
-            ALIGN_DBG("table %s created", table_path);
-        } else {
-            TableWriterRefSeq_Whack(self, false, NULL, 0, 0, NULL, NULL, 0);
-            ALIGN_DBGERRP("table %s", rc, table_path);
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableWriterRefSeq_Whack(const TableWriterRefSeq* cself,
-                                           bool commit, uint64_t* rows,
-                                           const char loader_name[],
-                                           const ver_t loader_version,
-                                           const char loader_date[],
-                                           const char app_name[],
-                                           const ver_t app_version)
-{
-    rc_t rc = 0;
-
-    if( cself != NULL ) {
-        rc_t rc1;
-        if( commit ) {
-            rc = TableWriter_Sign(cself->base, loader_name, loader_version, loader_date, app_name, app_version);
-        }
-        rc1 = TableWriter_Whack(cself->base, rc ? false : commit, rows);
-        rc = rc ? rc : rc1;
-        free((TableWriterRefSeq*)cself);
-    }
-    return rc;
-}
-
-static
-rc_t TableWriterRefSeq_WriteDefaults(const TableWriterRefSeq* cself)
-{
-    rc_t rc = 0;
-    if( cself != NULL ) {
-        TableWriterRefSeq* self = (TableWriterRefSeq*)cself;
-        self->max_seq_len = TableWriterRefSeq_MAX_SEQ_LEN;
-        self->seq_start_last = 1;
-        self->last_cs_key = 'T';
-        TW_COL_WRITE_DEF_VAR(cself->base, cself->cursorid, cself->cols[ewrefseq_cn_MAX_SEQ_LEN], cself->max_seq_len);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableWriterRefSeq_WriteDefault(const TableWriterRefSeq* cself,
-                                                  enum ETableWriterRefSeq_ColNames col, const TableWriterData* data)
-{
-    rc_t rc = 0;
-    if( cself == NULL || data == NULL ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( cself->last_cs_key == '\0' && (rc = TableWriterRefSeq_WriteDefaults(cself)) != 0 ) {
-        ALIGN_DBGERR(rc);
-    } else {
-        TW_COL_WRITE_DEF(cself->base, cself->cursorid, cself->cols[col], (*data));
-        if( col == ewrefseq_cn_MAX_SEQ_LEN ) {
-            ((TableWriterRefSeq*)cself)->max_seq_len = *((uint32_t*)data->buffer);
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableWriterRefSeq_Write(const TableWriterRefSeq* cself, const TableWriterRefSeqData* data, int64_t* rowid)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL || data == NULL ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( cself->last_cs_key == '\0' && (rc = TableWriterRefSeq_WriteDefaults(cself)) != 0 ) {
-        ALIGN_DBGERR(rc);
-    } else if( data->read.elements > cself->max_seq_len ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcData, rcInvalid);
-        ALIGN_DBGERRP("%s is longer than %s", rc, cself->cols[ewrefseq_cn_READ].name, cself->cols[ewrefseq_cn_MAX_SEQ_LEN].name);
-    } else if( (rc = TableWriter_OpenRow(cself->base, rowid, cself->cursorid)) == 0 ) {
-        INSDC_coord_len len = data->read.elements;
-        TW_COL_WRITE(cself->base, cself->cols[ewrefseq_cn_READ], data->read);
-        TW_COL_WRITE(cself->base, cself->cols[ewrefseq_cn_QUALITY], data->quality);
-        TW_COL_WRITE_VAR(cself->base, cself->cols[ewrefseq_cn_SEQ_START], cself->seq_start_last);
-        TW_COL_WRITE_VAR(cself->base, cself->cols[ewrefseq_cn_SEQ_LEN], len);
-        TW_COL_WRITE_VAR(cself->base, cself->cols[ewrefseq_cn_CS_KEY], cself->last_cs_key);
-        if( rc == 0 && (rc = TableWriter_CloseRow(cself->base)) == 0 ) {
-            TableWriterRefSeq* self = (TableWriterRefSeq*)cself;
-            
-            self->last_cs_key = ((const INSDC_dna_text*)(data->read.buffer))[data->read.elements - 1];
-            self->seq_start_last += len;
-        }
-    }
-    return rc;
-}
diff --git a/libs/align/writer-sequence.c b/libs/align/writer-sequence.c
deleted file mode 100644
index 1b0bcb0..0000000
--- a/libs/align/writer-sequence.c
+++ /dev/null
@@ -1,778 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <align/extern.h>
-
-#include <klib/rc.h>
-#include <klib/vector.h>
-#include <klib/sort.h>
-#include <klib/data-buffer.h>
-#include <klib/printf.h>
-#include <insdc/insdc.h>
-#include <vdb/database.h>
-#include <vdb/cursor.h>
-#include <sra/sradb.h>
-#include <align/writer-sequence.h>
-#include "writer-priv.h"
-#include "reader-cmn.h"
-#include "debug.h"
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-static const TableWriterColumn TableWriterSeq_cols[ewseq_cn_Last + 1] =
-{
-    /* order is important, see Write below!!! */
-    {0, "(INSDC:dna:text)CMP_READ", sizeof(char) * 8, ewcol_IsArray},
-    {0, "(INSDC:color:text)CMP_CSREAD", sizeof(char) * 8, ewcol_IsArray | ewcol_Ignore},
-    {0, "CS_KEY", sizeof(char) * 8, ewcol_IsArray | ewcol_Ignore},
-    {0, "QUALITY", sizeof(INSDC_quality_phred) * 8, ewcol_IsArray},
-    {0, "PRIMARY_ALIGNMENT_ID", sizeof(int64_t) * 8, ewcol_IsArray},
-    {0, "ALIGNMENT_COUNT", sizeof(uint8_t) * 8, ewcol_IsArray},
-    {0, "PLATFORM", sizeof(INSDC_SRA_platform_id) * 8, 0},
-    {0, "LABEL", sizeof(char) * 8, ewcol_IsArray},
-    {0, "LABEL_START", sizeof(INSDC_coord_zero) * 8, ewcol_IsArray},
-    {0, "LABEL_LEN", sizeof(INSDC_coord_len) * 8, ewcol_IsArray},
-    {0, "READ_TYPE", sizeof(SRAReadTypes) * 8, ewcol_IsArray},
-    {0, "READ_START", sizeof(INSDC_coord_zero) * 8, ewcol_IsArray},
-    {0, "READ_LEN", sizeof(INSDC_coord_len) * 8, ewcol_IsArray},
-    {0, "TMP_KEY_ID", sizeof(uint64_t) * 8, ewcol_Temporary},
-    {0, "SPOT_GROUP", sizeof(char) * 8, ewcol_IsArray | ewcol_Ignore},
-    {0, "READ_FILTER", sizeof(uint8_t) * 8, ewcol_IsArray},
-    {0, "TI", sizeof(uint64_t) * 8, ewcol_IsArray | ewcol_Ignore},
-    {0, "NAME", sizeof(char) * 8, ewcol_IsArray | ewcol_Ignore},
-    {0, "CMP_LINKAGE_GROUP", sizeof(char) * 8, ewcol_IsArray},
-};
-
-static const TableReaderColumn TableSeqReadTmpKey_cols[] = {
-    {0, "TMP_KEY_ID", {NULL}, 0, 0},
-    {0, "READ_LEN", {NULL}, 0, 0},
-    {0, NULL, {NULL}, 0, 0}
-};
-
-static const TableReaderColumn TableSeqReadREAD_cols[] = {
-    {0, "(INSDC:dna:text)READ", {NULL}, 0, 0},
-    {0, "READ_START", {NULL}, 0, 0},
-    {0, "READ_LEN", {NULL}, 0, 0},
-    {0, "ALIGNMENT_COUNT", {NULL}, 0, 0},
-    {0, NULL, {NULL}, 0, 0}
-};
-
-struct TableWriterSeq {
-    uint32_t options;
-    const TableWriter* base;
-    uint8_t cursor_id;
-    TableWriterColumn cols[sizeof(TableWriterSeq_cols)/sizeof(TableWriterSeq_cols[0])];
-    int init; /* default written indicator */
-    int64_t qual_buf_sz;
-    uint8_t* qual_buf;
-    uint8_t discrete_qual[256];
-    uint8_t alignd_cursor_id;
-    TableWriterColumn cols_alignd[2];
-    const TableReader* reader;
-    TableReaderColumn cols_read[5];
-    KVector *stats;
-    unsigned statsCount;
-    int64_t tmpKeyIdFirst;
-    int64_t tmpKeyIdLast;
-    bool flush;
-    bool haveFirstHalfAligned;
-    bool haveFirstUnaligned;
-    int64_t firstHalfAligned;
-    int64_t firstUnaligned;
-};
-
-static bool TableWriterSeq_InitQuantMatrix(uint8_t dst[256], char const quant[])
-{
-    unsigned i = 0;
-    unsigned limit = 0;
-    unsigned value = 0;
-    unsigned cur;
-    int ws = 1;
-    int st = 0;
-    
-    memset(dst, 0, 256);
-    for (cur = 0; quant[cur] != 0; ++cur) {
-        int const ch = quant[cur];
-        
-        if (ws) {
-            if (isspace(ch))
-                continue;
-            ws = false;
-        }
-        switch (st) {
-        case 0:
-            if (isdigit(ch)) {
-                value = (value * 10) + ch - '0';
-                break;
-            }
-            else if (isspace(ch)) {
-                ++st;
-                ws = true;
-                break;
-            }
-            ++st;
-            /* no break */
-        case 1:
-            if (ch != ':')
-                return false;
-            ws = true;
-            ++st;
-            break;
-        case 2:
-            if (isdigit(ch)) {
-                limit  = (limit * 10) + ch - '0';
-                break;
-            }
-            else if (isspace(ch)) {
-                ++st;
-                ws = true;
-                break;
-            }
-            else if (ch == '-' && limit == 0) {
-                memset(dst + i, value, 256 - i);
-                return true;
-            }
-            ++st;
-            /* no break */
-        case 3:
-            if (ch != ',')
-                return false;
-            ws = true;
-            st = 0;
-            if (i > limit)
-                return false;
-            memset(dst + i, value, limit - i);
-            i = limit;
-            limit = value = 0;
-            break;
-        }
-    }
-    if (st == 0) {
-        switch (value) {
-        case 1:
-            break;
-        case 2:
-            break;
-        }
-    }
-    return false;
-}
-
-typedef struct { uint64_t distance, count; } stats_pair_t;
-
-typedef struct { 
-    stats_pair_t *stats;
-    unsigned i;
-} pb_t;
-
-static rc_t CC stats_cb(uint64_t key, uint64_t value, void *user_data)
-{
-    pb_t *pb = user_data;
-    
-    pb->stats[pb->i].distance = key;
-    pb->stats[pb->i].count = value;
-    ++pb->i;
-    
-    return 0;
-}
-
-static int64_t CC stats_cmp_count(const void *A, const void *B, void *ignore)
-{
-    if (((stats_pair_t const *)A)->distance == 0)
-        return -1;
-    if (((stats_pair_t const *)B)->distance == 0)
-        return 1;
-    if (((stats_pair_t const *)B)->count < ((stats_pair_t const *)A)->count)
-        return -1;
-    if (((stats_pair_t const *)B)->count > ((stats_pair_t const *)A)->count)
-        return 1;
-    if (((stats_pair_t const *)B)->distance < ((stats_pair_t const *)A)->distance)
-        return 1;
-    if (((stats_pair_t const *)B)->distance > ((stats_pair_t const *)A)->distance)
-        return -1;
-    return 0;
-}
-
-static int64_t CC stats_cmp_distance(const void *A, const void *B, void *ignore)
-{
-    if (((stats_pair_t const *)A)->distance < ((stats_pair_t const *)B)->distance)
-        return -1;
-    if (((stats_pair_t const *)A)->distance > ((stats_pair_t const *)B)->distance)
-        return 1;
-    return 0;
-}
-
-static rc_t TableWriterSeq_WriteStatistics(TableWriterSeq const *cself, KMDataNode *node)
-{
-    pb_t pb;
-    rc_t rc;
-    KDataBuffer buf;
-    
-    rc = KDataBufferMake(&buf, 8 * sizeof(pb.stats[0]), cself->statsCount);
-    if (rc) return rc;
-    
-    pb.stats = buf.base;
-    pb.i = 0;
-    rc = KVectorVisitU64(cself->stats, 0, stats_cb, &pb);
-    if (rc == 0) {
-        unsigned i;
-        unsigned const n = cself->statsCount < 126 ? cself->statsCount : 126;
-        uint64_t *const distance = buf.base;
-        
-        ksort(pb.stats, cself->statsCount, sizeof(pb.stats[0]), stats_cmp_count, NULL);
-        ksort(pb.stats, n, sizeof(pb.stats[0]), stats_cmp_distance, NULL);
-        for (i = 0; i != n; ++i) {
-            distance[i] = pb.stats[i].distance;
-        }
-        rc = KMDataNodeWrite(node, distance, n * sizeof(distance[0]));
-    }
-    KDataBufferWhack(&buf);
-    return rc;
-}
-
-static rc_t TableWriterSeq_CollectStatistics(TableWriterSeq *self, const TableWriterData* primary_alignment_id)
-{
-    rc_t rc;
-    int64_t mate[2] = {0, 0};
-    uint64_t distance = 0;
-    uint64_t count = 0;
-    
-    memcpy(mate, primary_alignment_id->buffer, sizeof(mate[0]) * primary_alignment_id->elements);
-    if (mate[0] && mate[1]) {
-        distance = (mate[0] < mate[1]) ? (mate[1] - mate[0]) : (mate[0] - mate[1]);
-    }
-    else
-        return 0;
-    if (self->stats == NULL) {
-        rc = KVectorMake(&self->stats); if (rc) return rc;
-    }
-    rc = KVectorGetU64(self->stats, distance, &count);
-    if (GetRCObject(rc) == rcItem && GetRCState(rc) == rcNotFound) {
-        rc = KVectorSetU64(self->stats, distance, 1);
-        if (rc == 0) ++self->statsCount;
-    }
-    else if (rc == 0) {
-        ++count;
-        rc = KVectorSetU64(self->stats, distance, count);
-    }
-    return rc;
-}
-
-static rc_t MakeSequenceTable(TableWriterSeq *self, VDatabase* db,
-                              char const qual_quantization[])
-{
-    char const *tblName = (self->options & ewseq_co_ColorSpace) ? "CS_SEQUENCE" : "SEQUENCE";
-
-    if (qual_quantization && strcmp(qual_quantization, "0") == 0) {
-        self->options |= ewseq_co_FullQuality;
-    }
-    if( !(self->options & ewseq_co_FullQuality) ) {
-        char const *quant_string = qual_quantization;
-        
-        if (quant_string == NULL || strcmp(quant_string, "1") == 0) {
-            quant_string = "1:10,10:20,20:30,30:-";
-        } else if (strcmp(quant_string, "2") == 0) {
-            quant_string = "1:30,30:-";
-        }
-        if (!TableWriterSeq_InitQuantMatrix(self->discrete_qual, quant_string)) {
-            return RC(rcAlign, rcFormatter, rcConstructing, rcParam, rcInvalid);
-        }
-    }
-    memcpy(self->cols, TableWriterSeq_cols, sizeof(TableWriterSeq_cols));
-    if (self->options & ewseq_co_KeepKey) {
-        self->cols[ewseq_cn_TMP_KEY_ID].flags &= ~ewcol_Temporary;
-        if (self->options & ewseq_co_SaveRead)
-            self->cols[ewseq_cn_READ].name = "(INSDC:dna:text)READ";
-    }
-    if( self->options & ewseq_co_AlignData ) {
-        self->cols[ewseq_cn_TMP_KEY_ID].flags |= ewcol_Ignore;
-    } else {
-        self->cols[ewseq_cn_PRIMARY_ALIGNMENT_ID].flags |= ewcol_Ignore;
-        self->cols[ewseq_cn_ALIGNMENT_COUNT].flags |= ewcol_Ignore;
-    }
-    if(self->options & ewseq_co_NoLabelData) {
-        self->cols[ewseq_cn_LABEL].flags |= ewcol_Ignore;
-        self->cols[ewseq_cn_LABEL_LEN].flags |= ewcol_Ignore;
-        self->cols[ewseq_cn_LABEL_START].flags |= ewcol_Ignore;
-    }
-    if(self->options & ewseq_co_ColorSpace) {
-        self->cols[ewseq_cn_READ].flags |= ewcol_Ignore;
-        self->cols[ewseq_cn_CSREAD].flags &= ~ewcol_Ignore;
-        self->cols[ewseq_cn_CSKEY].flags &= ~ewcol_Ignore;
-    }
-    if( self->options & ewseq_co_SpotGroup) {
-        self->cols[ewseq_cn_SPOT_GROUP].flags &= ~ewcol_Ignore;
-    }
-    if( self->options & ewseq_co_TI) {
-        self->cols[ewseq_cn_TI].flags &= ~ewcol_Ignore;
-    }
-    if( self->options & ewseq_co_SpotName) {
-        self->cols[ewseq_cn_NAME].flags &= ~ewcol_Ignore;
-    }
-    return TableWriter_Make(&self->base, db, tblName, "SEQUENCE");
-}
-
-LIB_EXPORT rc_t CC TableWriterSeq_Make(const TableWriterSeq** cself, VDatabase* db,
-                                       uint32_t options, char const qual_quantization[])
-{
-    rc_t rc = 0;
-    TableWriterSeq* self = NULL;
-
-    options |= ewseq_co_SaveQual; /* TODO: remove when ready */
-    if( cself == NULL || db == NULL ) {
-        rc = RC(rcAlign, rcFormatter, rcConstructing, rcParam, rcNull);
-    } else {
-        self = calloc(1, sizeof(*self));
-        if( self == NULL ) {
-            rc = RC(rcAlign, rcFormatter, rcConstructing, rcMemory, rcExhausted);
-        } else {
-            self->options = options;
-            rc = MakeSequenceTable(self, db, qual_quantization);
-        }
-    }
-    if( rc == 0 ) {
-        *cself = self;
-        ALIGN_DBG("table %s", "created");
-    } else {
-        TableWriterSeq_Whack(self, false, NULL);
-        ALIGN_DBGERR(rc);
-    }
-    return rc;
-}
-
-static rc_t CompressREAD(TableWriterSeq *self)
-{
-    rc_t rc = 0;
-    VTable *vtbl = NULL;
-    uint8_t cursor_id = 0;
-    int64_t row = 0;
-    
-    memcpy(&self->cols_read, &TableSeqReadREAD_cols, sizeof(self->cols_read));
-    rc = TableWriter_GetVTable(self->base, &vtbl);
-    assert(rc == 0);
-    rc = TableReader_Make(&self->reader, vtbl, self->cols_read, 50 * 1024 * 1024);
-    assert(rc == 0);
-    
-    self->cols[0] = TableWriterSeq_cols[0];
-    rc = TableWriter_AddCursor(self->base, self->cols, 1, &cursor_id);
-    assert(rc == 0);
-    
-    for (row = 1; ; ++row) {
-        rc = TableReader_ReadRow(self->reader, row);
-        if (rc) {
-            if (GetRCState(rc) == rcNotFound) {
-                rc = 0;
-                break;
-            }
-            return rc;
-        }
-        rc = TableWriter_OpenRowId(self->base, row, cursor_id);
-        assert(rc == 0);
-        {
-            char const *const seq = self->cols_read[0].base.str;
-            INSDC_coord_zero const *const start = self->cols_read[1].base.coord0;
-            INSDC_coord_len const *const length = self->cols_read[2].base.coord_len;
-            uint8_t const *const cnt = self->cols_read[3].base.u8;
-            int const nreads = (int)self->cols_read[1].len;
-            int i;
-            
-            TW_COL_WRITE_BUF(self->base, self->cols[0], NULL, 0);
-            for (i = 0; i < nreads; ++i) {
-                if (cnt[i] == 0) {
-                    TW_COL_WRITE_BUF(self->base, self->cols[0], &seq[start[i]], length[i]);
-                }
-            }
-        }
-        rc = TableWriter_CloseRow(self->base);
-        assert(rc == 0);
-    }
-    rc = TableWriter_CloseCursor(self->base, cursor_id, NULL);
-    assert(rc == 0);
-    TableReader_Whack(self->reader);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC TableWriterSeq_Whack(const TableWriterSeq* cself, bool commit, uint64_t* rows)
-{
-    rc_t rc = 0;
-
-    if( cself != NULL ) {
-        TableWriterSeq* self = (TableWriterSeq*)cself;
-        VTable *vtbl;
-        
-        TableReader_Whack(cself->reader);
-        if (commit) {
-            rc = TableWriter_CloseCursor(cself->base, 1, NULL);
-            assert(rc == 0);
-            if ((cself->options & (ewseq_co_KeepKey | ewseq_co_SaveRead)) == (ewseq_co_KeepKey | ewseq_co_SaveRead))
-                CompressREAD(self);
-
-            if ((rc = TableWriter_GetVTable(cself->base, &vtbl)) == 0 ) {
-                KMetadata* meta;
-                
-                if ((rc = VTableOpenMetadataUpdate(vtbl, &meta)) == 0) {
-                    KMDataNode* node = NULL;
-                    
-                    if (cself->stats) {
-                        if ((rc = KMetadataOpenNodeUpdate(meta, &node, "MATE_STATISTICS")) == 0) {
-                            rc = TableWriterSeq_WriteStatistics(cself, node);
-                            KMDataNodeRelease(node);
-                        }
-                    }
-                    if ((rc = KMetadataOpenNodeUpdate(meta, &node, "unaligned")) == 0) {
-                        KMDataNode *sub = NULL;
-                        
-                        KMDataNodeOpenNodeUpdate(node, &sub, "first-unaligned");
-                        KMDataNodeWriteB64(sub, &self->firstUnaligned);
-                        KMDataNodeRelease(sub);
-                        
-                        KMDataNodeOpenNodeUpdate(node, &sub, "first-half-aligned");
-                        KMDataNodeWriteB64(sub, &self->firstHalfAligned);
-                        KMDataNodeRelease(sub);
-
-                        KMDataNodeRelease(node);
-                    }
-                    KMetadataRelease(meta);
-                }
-            }
-        }
-
-        rc = TableWriter_Whack(cself->base, commit && (rc == 0), rows);
-        KVectorRelease(cself->stats);
-        free(self->qual_buf);
-        free(self);
-    }
-    return rc;
-}
-
-static
-rc_t TableWriteSeq_WriteDefaults(TableWriterSeq *const self)
-{
-    static TableWriterData const d = { "", 0 };
-    rc_t rc = 0;
-
-    self->init = 1;
-    rc = TableWriter_AddCursor(self->base, self->cols, sizeof(self->cols)/sizeof(self->cols[0]), &self->cursor_id);
-    if( (self->options & ewseq_co_AlignData) ) {
-        TW_COL_WRITE_DEF(self->base, self->cursor_id, self->cols[ewseq_cn_PRIMARY_ALIGNMENT_ID], d);
-        TW_COL_WRITE_DEF(self->base, self->cursor_id, self->cols[ewseq_cn_ALIGNMENT_COUNT], d);
-    }
-    TW_COL_WRITE_DEF(self->base, self->cursor_id, self->cols[ewseq_cn_LINKAGE_GROUP], d);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableWriteSeq_WriteDefault(const TableWriterSeq* cself,
-                                              enum ETableWriterSeq_ColNames col, const TableWriterData* data)
-{
-    rc_t rc = 0;
-    if( !cself->init ) {
-        rc = TableWriteSeq_WriteDefaults((TableWriterSeq *)cself);
-    }
-    if( rc == 0 ) {
-        rc = TableWriter_ColumnDefault(cself->base, cself->cursor_id, &cself->cols[col], data);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableWriterSeq_GetNextRowId(const TableWriterSeq* cself, int64_t* rowid)
-{
-    return TableWriter_GetNextRowId(cself->base, rowid, cself->cursor_id);
-}
-
-static void UpdateAlignmentRowStats(TableWriterSeq *const self, int64_t rowid, TableWriterData const *const alignment_count)
-{
-    uint8_t const *const ac = alignment_count->buffer;
-    if (ac) {
-        unsigned const nreads = (unsigned)alignment_count->elements;
-        unsigned naligned = 0;
-        unsigned i;
-
-        for (i = 0; i < nreads; ++i) {
-            if (ac[i] != 0) {
-                ++naligned;
-            }
-        }
-        if (naligned == 0) {
-            if (!self->haveFirstUnaligned) {
-                self->firstUnaligned = rowid;
-                self->haveFirstUnaligned = true;
-            }
-        }
-        else if (naligned < nreads) {
-            if (!self->haveFirstHalfAligned) {
-                self->firstHalfAligned = rowid;
-                self->haveFirstHalfAligned = true;
-            }
-        }
-    }
-}
-
-LIB_EXPORT rc_t CC TableWriterSeq_Write(const TableWriterSeq* cself, const TableWriterSeqData* data, int64_t* rowid)
-{
-    rc_t rc = 0;
-    int lbl;
-
-    if( cself == NULL || data == NULL ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-        return rc;
-    }
-    if( !cself->init && (rc = TableWriteSeq_WriteDefaults((TableWriterSeq *)cself)) != 0 ) {
-        ALIGN_DBGERR(rc);
-    }
-    else if( data->quality.buffer == NULL || data->sequence.elements != data->quality.elements ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcData, data->quality.buffer ? rcInconsistent : rcEmpty);
-        ALIGN_DBGERRP("sequence and quality length %lu <> %lu", rc, data->sequence.elements, data->quality.elements);
-    }
-    else if( data->read_start.elements != data->nreads ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcData, rcInconsistent);
-        ALIGN_DBGERRP("nreads and read_start length %u <> %lu", rc, data->nreads, data->read_start.elements);
-    }
-    else if( data->read_len.elements != data->nreads ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcData, rcInconsistent );
-        ALIGN_DBGERRP("nreads and read_len length %u <> %lu", rc, data->nreads, data->read_len.elements);
-    }
-    else if( (cself->options & ewseq_co_AlignData) && data->primary_alignment_id.elements != data->nreads ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcData, rcInconsistent);
-        ALIGN_DBGERRP("nreads and primary_alignment_id length %u <> %lu", rc, data->nreads, data->primary_alignment_id.elements);
-    }
-    else if( (cself->options & ewseq_co_AlignData) && data->alignment_count.elements != data->nreads ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcData, rcInconsistent);
-        ALIGN_DBGERRP("nreads and alignment_count length %u <> %lu", rc, data->nreads, data->alignment_count.elements);
-    }
-    else if( data->no_quantize_mask.buffer && data->no_quantize_mask.elements != data->quality.elements ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcData, rcInconsistent);
-        ALIGN_DBGERRP("quality and no_quantize_mask length %u <> %lu", rc, data->quality.elements, data->no_quantize_mask.elements);
-    }
-    else if( !(cself->options & ewseq_co_NoLabelData) &&
-               (lbl = ((data->label.buffer ? 1 : 0) + (data->label_start.buffer ? 1 : 0) +
-                                                  (data->label_len.buffer ? 1 : 0))) != 0 && lbl != 3 )
-    {
-        rc = RC(rcAlign, rcType, rcWriting, rcData, rcInconsistent);
-        ALIGN_DBGERRP("LABEL %s", rc, "incomplete");
-    }
-    else if( (rc = TableWriter_OpenRow(cself->base, rowid, cself->cursor_id)) == 0 ) {
-        if( cself->options & ewseq_co_AlignData ) {
-            UpdateAlignmentRowStats((TableWriterSeq *)cself, *rowid, &data->alignment_count);
-            TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_PRIMARY_ALIGNMENT_ID], data->primary_alignment_id);
-            TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_ALIGNMENT_COUNT], data->alignment_count);
-            if (rc == 0) {
-                rc = TableWriterSeq_CollectStatistics((TableWriterSeq *)cself, &data->primary_alignment_id);
-            }
-        }
-        if( cself->options & ewseq_co_SaveRead ) {
-            TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_READ], data->sequence);
-        }
-        else {
-            uint32_t i;
-            const char* seq = data->sequence.buffer;
-            const uint8_t* ac = data->alignment_count.buffer;
-            const INSDC_coord_zero* rs = data->read_start.buffer;
-            const INSDC_coord_len* rl = data->read_len.buffer;
-
-            TW_COL_WRITE_BUF(cself->base, cself->cols[ewseq_cn_READ], NULL, 0);
-            TW_COL_WRITE_BUF(cself->base, cself->cols[ewseq_cn_CSREAD], NULL, 0);
-            for(i = 0; i < data->nreads; i++ ) {
-                if( ac[i] == 0 ) {
-                    TW_COL_WRITE_BUF(cself->base, cself->cols[ewseq_cn_READ], &seq[rs[i]], rl[i]);
-                    TW_COL_WRITE_BUF(cself->base, cself->cols[ewseq_cn_CSREAD], &seq[rs[i]], rl[i]);
-                }
-            }
-        }
-        if( cself->options & ewseq_co_FullQuality ) {
-            TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_QUALITY], data->quality);
-        } else {
-            uint64_t i;
-            const uint8_t* b = data->quality.buffer;
-            if( data->quality.elements > cself->qual_buf_sz ) {
-                uint8_t* p = realloc(cself->qual_buf, data->quality.elements * cself->cols[ewseq_cn_QUALITY].element_bits);
-                if( p == NULL ) {
-                    rc = RC(rcAlign, rcType, rcWriting, rcMemory, rcExhausted);
-                    ALIGN_DBGERRP("quality %s", rc, "discretization");
-                } else {
-                    ((TableWriterSeq*)cself)->qual_buf_sz = data->quality.elements;
-                    ((TableWriterSeq*)cself)->qual_buf = p;
-                }
-            }
-            if (data->no_quantize_mask.buffer) {
-                bool const *mask = data->no_quantize_mask.buffer;
-                
-                for(i = 0; i < data->quality.elements; i++ ) {
-                    uint8_t const q = b[i] & 0x3F;
-                    cself->qual_buf[i] = mask[i] ? q : cself->discrete_qual[q];
-                }
-            }
-            else {
-                for(i = 0; i < data->quality.elements; i++ ) {
-                    cself->qual_buf[i] = cself->discrete_qual[b[i]];
-                }
-            }
-            if (cself->options & ewseq_co_SaveQual) {
-                TW_COL_WRITE_BUF(cself->base, cself->cols[ewseq_cn_QUALITY], cself->qual_buf, data->quality.elements);
-            }
-            else {
-                uint32_t i;
-                uint8_t const *const qual = data->sequence.buffer;
-                uint8_t const *const aligned = data->alignment_count.buffer;
-                INSDC_coord_zero const *const rs = data->read_start.buffer;
-                INSDC_coord_len const *const rl = data->read_len.buffer;
-                
-                TW_COL_WRITE_BUF(cself->base, cself->cols[ewseq_cn_QUALITY], NULL, 0);
-                for (i = 0; i < data->nreads; ++i) {
-                    if (!aligned[i]) {
-                        INSDC_coord_zero const readStart = rs[i];
-                        INSDC_coord_len const readLen = rl[i];
-                        
-                        TW_COL_WRITE_BUF(cself->base, cself->cols[ewseq_cn_QUALITY], &qual[readStart], readLen);
-                    }
-                }
-            }
-        }
-        if( !(cself->options & ewseq_co_NoLabelData) ) {
-            TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_LABEL], data->label);
-            TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_LABEL_START], data->label_start);
-            TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_LABEL_LEN], data->label_len);
-        }
-        TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_READ_TYPE], data->read_type);
-        TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_READ_START], data->read_start);
-        TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_READ_LEN], data->read_len);
-        TW_COL_WRITE_VAR(cself->base, cself->cols[ewseq_cn_TMP_KEY_ID], data->tmp_key_id);
-        TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_SPOT_GROUP], data->spot_group);
-        TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_CSKEY], data->cskey);
-        TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_READ_FILTER], data->read_filter);
-        TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_PLATFORM], data->platform);
-        TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_TI], data->ti);
-        TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_NAME], data->spot_name);
-        if (data->linkageGroup.elements > 0)
-            TW_COL_WRITE(cself->base, cself->cols[ewseq_cn_LINKAGE_GROUP], data->linkageGroup);
-        if( rc == 0 ) {
-            rc = TableWriter_CloseRow(cself->base);
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableWriterSeq_TmpKeyStart(const TableWriterSeq* cself)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( cself->options & ewseq_co_AlignData ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcParam, rcViolated);
-        ALIGN_DBGERR(rc);
-    } else if( (rc = TableWriter_CloseCursor(cself->base, 0, NULL)) == 0 ) {
-        TableWriterSeq* self = (TableWriterSeq*)cself;
-        VTable* vtbl = NULL;
-        
-        self->tmpKeyIdFirst = INT64_MAX;
-        self->tmpKeyIdLast = INT64_MIN;
-        memcpy(&self->cols_read, &TableSeqReadTmpKey_cols, sizeof(self->cols_read));
-        if( (rc = TableWriter_GetVTable(cself->base, &vtbl)) == 0 &&
-            (rc = TableReader_Make(&self->reader, vtbl, self->cols_read, 50 * 1024 * 1024)) == 0 ) {
-            memcpy(self->cols_alignd, &TableWriterSeq_cols[ewseq_cn_PRIMARY_ALIGNMENT_ID], sizeof(self->cols_alignd));
-            rc = TableWriter_AddCursor(self->base, self->cols_alignd,
-                                       sizeof(self->cols_alignd) / sizeof(self->cols_alignd[0]),
-                                       &self->alignd_cursor_id);
-            self->init = 2;
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableWriterSeq_TmpKey(const TableWriterSeq* cself, int64_t rowid, uint64_t* key_id)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL || rowid == 0 || key_id == NULL ) {
-        rc = RC( rcAlign, rcType, rcReading, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( cself->reader == NULL ) {
-        rc = RC( rcAlign, rcType, rcReading, rcMode, rcNotOpen);
-        ALIGN_DBGERR(rc);
-    } else if( (rc = TableReader_ReadRow(cself->reader, rowid)) == 0 ) {
-        memcpy(key_id, cself->cols_read[0].base.var, sizeof(*key_id));
-        if (cself->tmpKeyIdLast < rowid || rowid < cself->tmpKeyIdFirst) {
-            rc = TableReader_PageIdRange(cself->reader, rowid,
-                                        &((TableWriterSeq*)cself)->tmpKeyIdFirst,
-                                        &((TableWriterSeq*)cself)->tmpKeyIdLast);
-            ((TableWriterSeq*)cself)->flush = rc == 0;
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC TableWriterSeq_WriteAlignmentData(const TableWriterSeq* cself, int64_t rowid,
-                                                     const TableWriterData* primary_alignment_id,
-                                                     const TableWriterData* alignment_count)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( cself->options & ewseq_co_AlignData ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcParam, rcViolated);
-        ALIGN_DBGERR(rc);
-    } else if( rowid == 0 ) {
-        rc = TableWriter_Flush(cself->base, cself->alignd_cursor_id);
-    }
-    else if( primary_alignment_id == NULL || alignment_count == NULL ) {
-        rc = RC( rcAlign, rcType, rcWriting, rcParam, rcNull);
-        ALIGN_DBGERR(rc);
-    } else if( primary_alignment_id->elements != alignment_count->elements ) {
-        rc = RC(rcAlign, rcType, rcWriting, rcData, rcInconsistent);
-        ALIGN_DBGERRP("primary_alignment_id and alignment_count length %u <> %lu",
-            rc, primary_alignment_id->elements, alignment_count->elements);
-    }
-    else {
-        if (cself->flush) {
-            rc = TableWriter_Flush(cself->base, cself->alignd_cursor_id);
-            ((TableWriterSeq*)cself)->flush = false;
-        }
-        if( rc == 0 &&
-           (rc = TableWriter_OpenRowId(cself->base, rowid, cself->alignd_cursor_id)) == 0 )
-        {
-            UpdateAlignmentRowStats((TableWriterSeq *)cself, rowid, alignment_count);
-            TW_COL_WRITE(cself->base, cself->cols_alignd[0], *primary_alignment_id);
-            TW_COL_WRITE(cself->base, cself->cols_alignd[1], *alignment_count);
-            if( rc == 0 ) {
-                rc = TableWriter_CloseRow(cself->base);
-            }
-            if (rc == 0) {
-                rc = TableWriterSeq_CollectStatistics((TableWriterSeq *)cself, primary_alignment_id);
-            }
-        }
-    }
-    return rc;
-}
diff --git a/libs/ascp/Makefile b/libs/ascp/Makefile
deleted file mode 100644
index 1e725bb..0000000
--- a/libs/ascp/Makefile
+++ /dev/null
@@ -1,87 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/ascp
-
-INT_LIBS = \
-    libascp
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES = \
-	$(OBJ)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# testing framework
-#
-$(ILIBDIR)/libascp: $(addprefix $(ILIBDIR)/libascp.,$(LIBX))
-
-SRC = \
-	ascp \
-	ascp-path \
-	connect
-#	silent-system
-
-OBJ = \
-	$(addsuffix .$(LOBX),$(SRC))
-
-$(ILIBDIR)/libascp.$(LIBX): $(OBJ)
-	$(LD) --slib -o $@ $^ $(LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/ascp/ascp-priv.h b/libs/ascp/ascp-priv.h
deleted file mode 100644
index 557adbc..0000000
--- a/libs/ascp/ascp-priv.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_libs_ascp_ascp_priv_
-#define _h_libs_ascp_ascp_priv_
-
-#include <kns/ascp.h> /* EAscpState */
-#include <klib/text.h> /* String */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define STS_INFO 1
-#define STS_DBG 2
-
-typedef enum {
-      eUnknown
-    , eChild
-    , eStart
-    , eLog
-    , eKeyStart
-    , eKeyMayBeIn
-    , eKeyIn
-    , eKeyEnd
-    , eProgress
-    , eWriteFailed
-    , eFailed
-    , eCompleted
-    , eEnd
-} EAscpState;
-
-rc_t ascpParse(const char *buf, size_t len, const char *filename,
-    EAscpState *state, String *line);
-
-bool ascp_path(const char **cmd, const char **key);
-
-rc_t run_ascp(const char *ascp_bin, const char *private_file,
-    const char *src, const char *dest, const AscpOptions *opt);
-
-rc_t mkAscpCmd(const char *ascp_bin, const char *private_file,
-    const char *src, const char *dest, const AscpOptions *opt,
-    char *const argv[], size_t argvSz);
-
-int silent_system(const char *command);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/libs/ascp/ascp.c b/libs/ascp/ascp.c
deleted file mode 100644
index dbf568a..0000000
--- a/libs/ascp/ascp.c
+++ /dev/null
@@ -1,840 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ==============================================================================
-*
-*/
-
-#include "ascp-priv.h"
-
-#include <kfg/config.h> /* KConfig */
-
-#include <kfs/directory.h> /* KDirectory */
-
-#include <klib/log.h> /* LOGERR */
-#include <klib/out.h> /* OUTMSG */
-#include <klib/printf.h> /* string_vprintf */
-#include <klib/rc.h>
-#include <klib/status.h> /* STSMSG */
-
-#include <sysalloc.h> /* free */
-
-#include <assert.h>
-#include <stdlib.h> /* free */
-#include <string.h> /* memset */
-
-#include <limits.h>
-#ifndef PATH_MAX
-#define PATH_MAX 4096
-#endif
-
-#define DISP_RC(rc, err) (void)((rc == 0) ? 0 : LOGERR(klogInt, rc, err))
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 != 0 && rc == 0) { rc = rc2; } obj = NULL; } while (false)
-
-#define STS_INFO 1
-#define STS_FIN 3
-
-static bool _StringStartsWith(const String *self, const char *buf) {
-    size_t len = 0;
-    assert(self && buf);
-    len = string_size(buf);
-    assert(len);
-/*printf("_StringStartsWith(%.*s, %s)\n", self->len, self->addr, buf);*/
-    if (self->len < len) {
-        return false;
-    }
-    return string_cmp(self->addr, self->len, buf, len, (uint32_t)len) == 0;
-}
-
-static
-bool _StringHas(const String *self, const char *buf, String *res)
-{
-    String dummy;
-    size_t len = 0;
-    assert(self && buf);
-    if (res == NULL) {
-        res = &dummy;
-    }
-    len = string_size(buf);
-    assert(len);
-    StringInit(res, self->addr, self->size, self->len);
-    while (true) {
-        if (res->len < len) {
-            StringInit(res, NULL, 0, 0);
-            return false;
-        }
-        if (_StringStartsWith(res, buf)) {
-            res->len = (uint32_t)len;
-            res->size = len;
-            return true;
-        }
-        res->size = res->len - 1;
-        res->len = res->len - 1;
-        ++res->addr;
-    }
-}
-
-typedef struct {
-    EAscpState s;
-    char *msg;
-    bool failure;
-} SAscpState;
-static void SAscpStateFini(SAscpState *self) {
-    assert(self);
-
-/* #if ! WINDOWS #endif */
-    free(self->msg);
-
-    memset(self, 0, sizeof *self);
-}
-
-static bool sStatus = false;
-
-static rc_t parseAscpLine(const String *s, SAscpState *state, const char *name)
-{
-    bool debug = true;
-    if (!sStatus) {
-        debug = false;
-    }
-
-    assert(s && state);
-
-    memset(state, 0, sizeof *state);
-
-    if (_StringHas(s, "CHILD: ", NULL)) {
-        if (sStatus) {
-            OUTMSG(("%.*s\n",  s->len, s->addr));
-        }
-        state->s = eChild;
-    }
-    else if (_StringStartsWith(s, "Cannot open log file: ")) {
-        if (debug) OUTMSG(("matched: LOG: '%.*s'\n", s->len, s->addr));
-        state->s = eLog;
-    }
-    else if (_StringStartsWith(s, "The server's host key is not")) {
-        if (debug) OUTMSG(("matched: KeySTART: '%.*s'\n", s->len, s->addr));
-        state->s = eKeyStart;
-    }
-    else if (_StringHas(s, "no guarantee that the server is th", NULL)) {
-        if (debug) OUTMSG(("matched: KeyIN: '%.*s'\n", s->len, s->addr));
-        state->s = eKeyIn;
-    }
-    else if (_StringHas(s, "think it is.", NULL)) {
-        if (debug) OUTMSG(("matched: KeyIN: '%.*s'\n", s->len, s->addr));
-        state->s = eKeyIn;
-    }
-    else if (_StringHas(s, "The server's rsa2 key fingerprint ", NULL)) {
-        if (debug) OUTMSG(("matched: KeyIN: '%.*s'\n", s->len, s->addr));
-        state->s = eKeyIn;
-    }
-    else if (_StringHas(s, "ssh-rsa 1024 ", NULL)) {
-        if (debug) OUTMSG(("matched: KeyIN: '%.*s'\n", s->len, s->addr));
-        state->s = eKeyIn;
-    }
-    else if (_StringHas(s, "If you trust this host, enter ", NULL)) {
-        if (debug) OUTMSG(("matched: KeyIN: '%.*s'\n", s->len, s->addr));
-        state->s = eKeyIn;
-    }
-    else if (_StringHas(s, "PuTTY's cache and carry on connect", NULL)) {
-        if (debug) OUTMSG(("matched: KeyIN: '%.*s'\n", s->len, s->addr));
-        state->s = eKeyIn;
-    }
-    else if (_StringHas(s, "If you want to carry on connecting", NULL)) {
-        if (debug) OUTMSG(("matched: KeyIN: '%.*s'\n", s->len, s->addr));
-        state->s = eKeyIn;
-    }
-    else if (_StringHas(s, "adding the key to the cache, enter", NULL)) {
-        if (debug) OUTMSG(("matched: KeyIN: '%.*s'\n", s->len, s->addr));
-        state->s = eKeyIn;
-    }
-    else if (_StringHas(s, " you do not trust this host, press", NULL)) {
-        if (debug) OUTMSG(("matched: KeyIN: '%.*s'\n", s->len, s->addr));
-        state->s = eKeyIn;
-    }
-    else if (_StringHas(s, "connection.", NULL)) {
-        if (debug) OUTMSG(("matched: KeyIN: '%.*s'\n", s->len, s->addr));
-        state->s = eKeyIn;
-    }
-    else if (_StringHas(s, "Store key in cache? (y/n) ", NULL)) {
-        if (debug) OUTMSG(("matched: KeyEND: '%.*s'\n", s->len, s->addr));
-        state->s = eKeyEnd;
-    }
-    else if (string_chr(s->addr, s->len, '%') != NULL) {
-        if (debug) OUTMSG(("matched: PROGRESS: '%.*s'\n", s->len, s->addr));
-        state->s = eProgress;
-        if ((state->msg = string_dup(s->addr, s->len)) == NULL) {
-            return RC(rcNS, rcStorage, rcAllocating, rcMemory, rcExhausted);
-        }
-    }
-    else if (_StringStartsWith(s, "Completed: ")) {
-        if (debug) OUTMSG(("matched: COMPLETED: '%.*s'\n", s->len, s->addr));
-        state->s = eCompleted;
-        if ((state->msg = string_dup(s->addr, s->len)) == NULL) {
-            return RC(rcNS, rcStorage, rcAllocating, rcMemory, rcExhausted);
-        }
-    }
-    else if (_StringStartsWith(s, "Partial Completion: ")) {
-        if (debug) OUTMSG(("matched: END: '%.*s'\n", s->len, s->addr));
-        state->s = eEnd;
-        if ((state->msg = string_dup(s->addr, s->len)) == NULL) {
-            return RC(rcNS, rcStorage, rcAllocating, rcMemory, rcExhausted);
-        }
-    }    
-    else if (_StringStartsWith(s, "Connection abandoned.")) {
-/* printed in caller     printf("matched: END: '%.*s'\n", s->len, s->addr); */
-        state->s = eFailed;
-        if ((state->msg = string_dup(s->addr, s->len)) == NULL) {
-            return RC(rcNS, rcStorage, rcAllocating, rcMemory, rcExhausted);
-        }
-    }
-    else if (_StringHas(s, "failed to open connection to remot", NULL)) {
-/* printed in caller       printf("matched: END: '%.*s'\n", s->len, s->addr); */
-        state->s = eFailed;
-        if ((state->msg = string_dup(s->addr, s->len)) == NULL) {
-            return RC(rcNS, rcStorage, rcAllocating, rcMemory, rcExhausted);
-        }
-    }
-    else if (_StringHas(s, "exiting", NULL)) {
-        state->s = eFailed;
-        if ((state->msg = string_dup(s->addr, s->len)) == NULL) {
-            return RC(rcNS, rcStorage, rcAllocating, rcMemory, rcExhausted);
-        }
-    }
-    else if (_StringStartsWith(s, "Session Stop  (Error: Disk write ")) {
-   if (debug) OUTMSG(("matched: Disk write failed: '%.*s'\n", s->len, s->addr));
-        state->s = eWriteFailed;
-        if ((state->msg = string_dup(s->addr, s->len)) == NULL) {
-            return RC(rcNS, rcStorage, rcAllocating, rcMemory, rcExhausted);
-        }
-    }
-    else if (_StringStartsWith(s, "Session Stop ")) {
-        if (debug) OUTMSG(("matched: COMPLETED: '%.*s'\n", s->len, s->addr));
-        state->s = eFailed;
-        if ((state->msg = string_dup(s->addr, s->len)) == NULL) {
-            return RC(rcNS, rcStorage, rcAllocating, rcMemory, rcExhausted);
-        }
-    }
-    else if (_StringHas(s, " bits/sec), in 1 file", NULL)) {
-        if (debug) OUTMSG(("matched: END: '%.*s'\n", s->len, s->addr));
-        state->s = eEnd;
-        if ((state->msg = string_dup(s->addr, s->len)) == NULL) {
-            return RC(rcNS, rcStorage, rcAllocating, rcMemory, rcExhausted);
-        }
-    }
-    else if (_StringStartsWith(s, name)) {
-        /* in the beginning:
-           line starting by dest file name, then some white characters */
-        if (debug) OUTMSG(("matched: PROGRESS: '%.*s'\n", s->len, s->addr));
-        state->s = eProgress;
-        if ((state->msg = string_dup(s->addr, s->len)) == NULL) {
-            return RC(rcNS, rcStorage, rcAllocating, rcMemory, rcExhausted);
-        }
-    }
-    else {
-        OUTMSG(("LINE = (%d) '%.*s'\n", s->len, s->len, s->addr));
-/*      assert(0); */
-    }
-    return 0;
-}
-
-rc_t ascpParse(const char *buf, size_t len, const char *filename,
-    EAscpState *state, String *line)
-{
-    bool failure = false;
-    const char *p = buf;
-    int64_t l = len;
-    assert(buf && len && filename && state && line);
-    StringInit(line, NULL, 0, 0);
-    while (true) {
-        const char *n = string_chr(p, l, '\n');
-        const char *r = string_chr(p, l, '\r');
-        if (n == NULL) {
-            if (r != NULL) {
-                n = r;
-            }
-        }
-        else {
-            if (r != NULL) {
-                if (r < n) {
-                    n = r;
-                }
-            }
-        }
-        if (n != NULL) {
-            StringInit(line, p, n - p, (uint32_t)(n - p));
-            l -= n - p + 1;
-        }
-        else {
-            StringInit(line, p, l, (uint32_t)l);
-        }
-        if (line->addr && line->len && line->addr[line->len - 1] == '\r') {
-            line->size = line->len - 1;
-            line->len = line->len - 1;
-        }
-        if (line->addr && line->len && line->addr[0] == '\r') {
-            ++line->addr;
-            line->size = line->len - 1;
-            line->len = line->len - 1;
-        }
-        if (line->len != 0) {
-            SAscpState full;
-            rc_t rc = parseAscpLine(line, &full, filename);
-            if (rc != 0) {
-                return rc;
-            }
-            switch (full.s) {
-                case eChild:
-                    break;
-                case eUnknown:
-                    switch (*state) {
-                        case eKeyStart:
-                        case eKeyMayBeIn:
-                        case eKeyIn:
-                            *state = eKeyMayBeIn;
-                            break;
-                        case eCompleted:
-                        case eFailed:
-                        case eWriteFailed:
-                            *state = eEnd;
-                            /* report to user */
-                            break;
-                        case eProgress:
-                            if (sStatus) {
-                                OUTMSG(("\n"));
-                            }
-/*                          no break; */
-                        default:
-                            *state = eUnknown;
-                            /* report to user */
-                            break;
-                    }
-                    break;
-                case eFailed:
-                    if (*state == eProgress) {
-                        if (sStatus) {
-                            OUTMSG(("\n"));
-                        }
-                    }
-                    failure = true;
-                    *state = full.s;
-                    if (sStatus) {
-                        OUTMSG(("%s\n", full.msg));
-                    }
-/*                  no break; */
-                    break;
-                case eWriteFailed:
-                    if (*state == eProgress) {
-                        if (sStatus) {
-                            OUTMSG(("\n"));
-                        }
-                    }
-                    failure = true;
-                    *state = full.s;
-                    if (sStatus) {
-                        OUTMSG(("%s\n", full.msg));
-                    }
-/*                  no break; */
-                    break;
-                case eCompleted:
-                    if (*state == eProgress) {
-                        if (sStatus) {
-                            OUTMSG(("\n"));
-                        }
-                    }
-                    failure = false;
-                    *state = full.s;
-                    if (sStatus) {
-                        OUTMSG(("%s\n", full.msg));
-                    }
-/*                  no break; */
-                    break;
-                case eProgress:
-                    if (*state == eProgress) {
-                        if (sStatus) {
-                            OUTMSG(("\r"));
-                        }
-                    }
-                    *state = full.s;
-                    if (sStatus) {
-                        OUTMSG(("%s", full.msg));
-                    }
-                    break;
-                case eEnd:
-                    if (*state == eProgress) {
-                        if (sStatus) {
-                            OUTMSG(("\n"));
-                        }
-                    }
-                    *state = full.s;
-                    if (sStatus) {
-                        OUTMSG(("%s\n", full.msg));
-                    }
-                    /* report to user */
-                    break;
-                default:
-                    *state = full.s;
-                    break;
-            }
-            SAscpStateFini(&full);
-        }
-        if (n == NULL || l <= 0) {
-            break;
-        }
-        if (*state == eKeyEnd) {
-            String end;
-            if (_StringHas(line, "Store key in cache? (y/n) ", &end)) {
-                if (n > end.addr + end.len) {
-                    l += n - end.addr + end.len;
-                    n = end.addr + end.len - 1;
-                }
-            }
-        }
-        p = n + 1;
-        if (p >= buf + len) {
-            break;
-        }
-    }
-    if (sStatus) {
-        STSMSG(STS_FIN, ("%.*s", len, buf));
-    }
-    if (failure) {
-        /* ignore it */
-    }
-    return 0;
-}
-
-static bool _KConfigAscpDisabled(const KConfig *self, bool status) {
-    bool disabled = false;
-    const char path[] = "tools/ascp/disabled";
-    rc_t rc = KConfigReadBool(self, path, &disabled);
-    if (rc != 0) {
-        if (rc != SILENT_RC(rcKFG, rcNode, rcOpening, rcPath, rcNotFound)) {
-            DISP_RC(rc, path);
-        }
-        else {
-            if (status) {
-                STSMSG(STS_DBG, ("'%s': not found in configuration", path));
-            }
-        }
-        disabled = false;
-    }
-    else {
-        if (status) {
-            STSMSG(STS_DBG, ("'%s' = '%s'", path, disabled ? "true" : "false"));
-        }
-    }
-    return disabled;
-}
-
-static String* _KConfigAscpString(const KConfig *self,
-    const char *path, const char *name)
-{
-    String *ascp = NULL;
-    rc_t rc = KConfigReadString(self, path, &ascp);
-    if (rc == 0) {
-        assert(ascp);
-/*      STSMSG(STS_INFO, ("Using %s from configuration: '%s'",
-            name, ascp->addr)); */
-        return ascp;
-    }
-    else {
-        if (rc != SILENT_RC(rcKFG, rcNode, rcOpening, rcPath, rcNotFound)) {
-            DISP_RC(rc, path);
-        }
-        else {
-/*          STSMSG(STS_DBG, ("'%s': not found in configuration", path)); */
-        }
-        free(ascp);
-        return NULL;
-    }
-}
-
-/******************************************************************************/
-
-static int _SilentSystem(const char *fmt, ...) {
-    rc_t rc = 0;
-    char buffer[4096];
-    size_t num_writ = 0;
-    va_list args;
-    va_start(args, fmt);
-    rc = string_vprintf(buffer, sizeof buffer, &num_writ, fmt, args);
-    va_end(args);
-    if (rc != 0) {
-        LOGERR(klogInt, rc, "while making ascp command line");
-        return 1;
-    }
-    return silent_system(buffer);
-}
-
-static bool _SystemHelp(const char *command, bool status) {
-    int value = 0;
-    if (status) {
-        STSMSG(STS_DBG, ("Checking '%s'", command));
-    }
-    value = _SilentSystem("\"%s\" -h", command);
-    if (value == 0) {
-        if (status) {
-            STSMSG(STS_INFO, ("Using '%s'", command));
-        }
-        return true;
-    }
-    else {
-        if (status) {
-            STSMSG(STS_DBG, ("'%s': not found", command));
-        }
-        return false;
-    }
-}
-
-static rc_t _KConfigGetAscpRate(const KConfig *self,
-    char *max_rate, size_t max_rate_sz)
-{
-    String *s = NULL;
-
-    assert(self && max_rate && max_rate_sz);
-
-    max_rate[0] = '\0';
-
-    s = _KConfigAscpString(self, "tools/ascp/max_rate", "Aspera max rate");
-    if (s != NULL) {
-        if (s->size == 0) {
-            free(s);
-        }
-        else {
-            size_t sz = string_copy(max_rate, max_rate_sz, s->addr, s->size);
-
-            free(s);
-
-            if (sz >= max_rate_sz) {
-                return RC(rcNS, rcNode, rcReading, rcBuffer, rcInsufficient);
-            }
-        }
-
-        return 0;
-    }
-
-    return 0;
-}
-
-static rc_t _KConfigGetAscp(const KConfig *self,
-    const char **ascp_bin, const char **private_file)
-{
-    String *bin = NULL;
-    String *key = NULL;
-    assert(self && ascp_bin && private_file);
-    *ascp_bin = *private_file = NULL;
-    bin = _KConfigAscpString(self, "tools/ascp/path", "ascp");
-    key = _KConfigAscpString(self, "tools/ascp/key", "Aspera key");
-    if (bin != NULL && key != NULL) {
-        *ascp_bin = string_dup_measure(bin->addr, NULL);
-        *private_file = string_dup_measure(key->addr, NULL);
-        free(bin);
-        free(key);
-        if (*ascp_bin == NULL || *private_file == NULL) {
-            free((void*)*ascp_bin);
-            free((void*)*private_file);
-            *ascp_bin = *private_file = NULL;
-            return RC(rcNS, rcStorage, rcAllocating, rcMemory, rcExhausted);
-        }
-        return 0;
-    }
-    free(bin);
-    free(key);
-    return 0;
-}
-static bool _KDirectoryFileFound(const KDirectory *self,
-    const char *path, bool status)
-{
-    KPathType type = kptNotFound;
-    if (status) {
-        STSMSG(STS_DBG, ("Checking '%s'", path));
-    }
-    type = KDirectoryPathType(self, "%s", path);
-    if ((type & ~kptAlias) == kptFile) {
-        if (status) {
-            STSMSG(STS_DBG, ("'%s': found", path));
-        }
-        return true;
-    }
-    else {
-        if (status) {
-            STSMSG(STS_DBG, ("'%s': not found", path));
-        }
-        return false;
-    }
-}
-
-static rc_t returnAscp(const char *bin, const char *key,
-    const char **ascp_bin, const char **private_file, bool *found)
-{
-    assert(found);
-    *found = false;
-
-    if (bin == NULL || key == NULL) {
-        return 0;
-    }
-
-    *ascp_bin = string_dup_measure(bin, NULL);
-    *private_file = string_dup_measure(key, NULL);
-
-    if (*ascp_bin == NULL || *private_file == NULL) {
-        free((void*)*ascp_bin);
-        free((void*)*private_file);
-        *ascp_bin = *private_file = NULL;
-        return RC(rcNS,
-            rcStorage, rcAllocating, rcMemory, rcExhausted);
-    }
-
-    *found = true;
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC ascp_locate(const char **ascp_bin, const char **private_file,
-    bool use_config, bool status)
-{
-    static const char *bin = NULL;
-    static const char *key = NULL;
-    rc_t rc = 0;
-    KConfig *cfg = NULL;
-    bool found = false;
-    if (ascp_bin == NULL || private_file == NULL) {
-        return RC(rcNS, rcFile, rcCopying, rcParam, rcNull);
-    }
-    *ascp_bin = *private_file = NULL;
-    rc = returnAscp(bin, key, ascp_bin, private_file, &found);
-    if (rc != 0 || found) {
-        return rc;
-    }
-    rc = KConfigMake(&cfg, NULL);
-    if (rc != 0) {
-        return rc;
-    }
-    if (_KConfigAscpDisabled(cfg, status)) {
-        if (status) {
-            STSMSG(STS_INFO, ("Use of Aspera transfer is disabled "
-                "by the configuration, using HTTP transfer"));
-        }
-    }
-    else {
-        KDirectory *dir = NULL;
-        rc = _KConfigGetAscp(cfg, &bin, &key);
-        if (bin != NULL) {
-            assert(key && !rc);
-            RELEASE(KConfig, cfg);
-            rc = returnAscp(bin, key, ascp_bin, private_file, &found);
-            if (rc != 0 || found) {
-                return rc;
-            }
-        }
-        rc = KDirectoryNativeDir(&dir);
-        if (rc != 0) {
-            return rc;
-        }
-        while (ascp_path(&bin, &key)) {
-            if (_SystemHelp(bin, status)) {
-                if (_KDirectoryFileFound(dir, key, status)) {
-                    break;
-                }
-            }
-        }
-        RELEASE(KDirectory, dir);
-    }
-    RELEASE(KConfig, cfg);
-
-    rc = returnAscp(bin, key, ascp_bin, private_file, &found);
-    if (rc != 0 || found) {
-        return rc;
-    }
-    else {
-        return RC(rcNS, rcFile, rcCopying, rcFile, rcNotFound);
-    }
-}
-
-LIB_EXPORT rc_t CC aspera_get(
-    const char *ascp_bin, const char *private_file, const char *aSrc,
-    const char *dest, AscpOptions *opt)
-{
-    char path[PATH_MAX] = "";
-    AscpOptions dummy;
-    bool status = false;
-    int64_t prev = -1;
-    int attempt = 0;
-    KDirectory *dir = NULL;
-    TQuitting *quitting = NULL;
-    const char *src = aSrc;
-    rc_t rc = KDirectoryNativeDir(&dir);
-    if (rc != 0) {
-        return rc;
-    }
-    if (ascp_bin == NULL || private_file == NULL ||
-        src == NULL || dest == NULL)
-    {
-        return RC(rcNS, rcFile, rcCopying, rcParam, rcNull);
-    }
-    if (opt == NULL) {
-        memset(&dummy, 0, sizeof dummy);
-        opt = &dummy;
-    }
-
-    if (opt->ascp_options == NULL && opt->target_rate[0] == '\0') {
-        KConfig *cfg = NULL;
-        rc_t rc = KConfigMake(&cfg, NULL);
-        DISP_RC(rc, "cannot KConfigMake");
-        if (rc == 0) {
-            rc = _KConfigGetAscpRate(cfg,
-                opt->target_rate, sizeof opt->target_rate);
-            DISP_RC(rc, "cannot get aspera max rate");
-        }
-        RELEASE(KConfig, cfg);
-    }
-
-    sStatus = status = opt->status;
-    quitting = opt->quitting;
-
-    {
-        /* remove trailing #... or ?... from src path:
-           it could come from Revolver */
-        size_t s = string_size(aSrc);
-        const char *n = string_chr(aSrc, s, '#');
-        const char *q = string_chr(aSrc, s, '?');
-        if (q != NULL && (n == NULL || q < n)) {
-            n = q;
-        }
-        if (n != NULL) {
-            if (n - aSrc + 1 > sizeof path) {
-                return RC(rcNS, rcFile, rcCopying, rcBuffer, rcInsufficient);
-            }
-            else {
-#if _DEBUGGING
-                size_t s =
-#endif
-                    string_copy(path, sizeof path, aSrc, n - aSrc);
-                assert(s <= sizeof path);
-                src = path;
-            }
-        }
-    }
-
-    while (true) {
-        rc = run_ascp(ascp_bin, private_file, src, dest, opt);
-        if (rc == 0) {
-            if (status) {
-                STSMSG(STS_DBG, ("ascp finished with success"));
-            }
-            break;
-        }
-        else if (rc == SILENT_RC(rcExe,
-            rcProcess, rcExecuting, rcMemory, rcExhausted))
-        {
-            if (status) {
-                STSMSG(STS_DBG, ("ascp failed: %R", rc));
-            }
-            break;
-        }
-        else {
-            rc_t rc2 = 0;
-            uint64_t size = 0;
-            if (quitting != NULL) {
-                rc2 = quitting();
-                if (rc2 != 0) {
-                    break;
-                }
-            }
-            if (status) {
-                STSMSG(STS_DBG, ("ascp failed: %R", rc));
-            }
-            rc2 = KDirectoryFileSize(dir, &size, "%s", dest);
-            if (rc2 ==
-                SILENT_RC(rcFS, rcDirectory, rcAccessing, rcPath, rcNotFound))
-            {
-                if (prev < 0) {
-                    if (status) {
-                        STSMSG(0, ("fasp download failed. "
-                            "File not found. Retrying..."));
-                    }
-                    prev = 0;
-                }
-                else {
-                    if (status) {
-                        STSMSG(0, ("fasp download failed. File not found."));
-                    }
-                    break;
-                }
-            }
-            else if (rc2 != 0 || (int64_t)size < prev) {
-                if (status) {
-                    STSMSG(0, ("fasp download failed. KDirectoryFileSize "
-                        "after ascp run: rc = %ld, size = %ld", rc, size));
-                }
-                break;
-            }
-            else if ((int64_t)size > prev) {
-                if (status) {
-                    STSMSG(STS_INFO, ("  fasp download failed. %ld bytes "
-                        "received so far. Retrying...", size));
-                }
-                attempt = 0;
-                prev = size;
-            }
-            else {
-                if (attempt++ > 3) {
-                    break;
-                }
-                if (status) {
-                    STSMSG(STS_INFO, ("  fasp download failed. %ld bytes "
-                        "received so far. Retrying %d...", size, attempt));
-                }
-            }
-        }
-    }
-
-    RELEASE(KDirectory, dir);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC aspera_options(AscpOptions *opt) {
-    KConfig *cfg = NULL;
-    rc_t rc = 0;
-    if (opt == NULL) {
-        return RC(rcNS, rcFile, rcVisiting, rcParam, rcNull);
-    }
-    memset(opt, 0, sizeof *opt);
-    rc = KConfigMake(&cfg, NULL);
-    if (rc == 0) {
-        rc = _KConfigGetAscpRate(cfg,
-            opt->target_rate, sizeof opt->target_rate);
-        opt->disabled = _KConfigAscpDisabled(cfg, false);
-    }
-    RELEASE(KConfig, cfg);
-    return rc;
-}
-
-/*rc_t mkAscpCmd(const char *ascp_bin, const char *private_file,
-    const char *src, const char *dest, const AscpOptions *opt,
-    char *const argv[], size_t argvSz)
-{
-    rc_t rc = 0;
-    return rc;
-}*/
diff --git a/libs/ascp/linux/ascp-path.c b/libs/ascp/linux/ascp-path.c
deleted file mode 100644
index 013812c..0000000
--- a/libs/ascp/linux/ascp-path.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ==============================================================================
-*
-*/
-
-#include "ascp-priv.h" /* ascp_path */
-
-#include <klib/printf.h> /* string_printf */
-
-#include <assert.h>
-#include <limits.h> /* PATH_MAX */
-#include <stdlib.h> /* getenv */
-
-static int size_of(const char **array) {
-    int i = 0;
-    while (*(array++) != NULL) {
-        ++i;
-    }
-    return i;
-}
-
-bool ascp_path(const char **cmd, const char **key) {
-    static int idx = 0;
-    static const char *k[] = {
-        "/opt/aspera/etc/asperaweb_id_dsa.openssh",
-        "/opt/aspera/etc/asperaweb_id_dsa.putty",
-
-        "/opt/aspera/etc/asperaweb_id_dsa.openssh",
-        "/opt/aspera/etc/asperaweb_id_dsa.putty",
-
-        "/opt/aspera/etc/asperaweb_id_dsa.openssh",
-        "/opt/aspera/etc/asperaweb_id_dsa.putty",
-        NULL
-    };
-    static const char *c[] = {
-                            "ascp",                 "ascp",
-                   "/usr/bin/ascp",        "/usr/bin/ascp",
-            "/opt/aspera/bin/ascp", "/opt/aspera/bin/ascp",
-            NULL
-        };
-    int size = size_of(c);
-    assert(cmd != NULL && key != NULL);
-    assert(size_of(c) == size_of(k));
-    if (idx < size) {
-        *cmd = c[idx];
-        *key = k[idx];
-        ++idx;
-        return true;
-    }
-    else {
-        rc_t rc = 0;
-        static char k[PATH_MAX] = "";
-        static char c[PATH_MAX] = "";
-        if (idx > size + 1) {
-            *cmd = *key = NULL;
-            idx = 0;
-            return false;
-        }
-        {
-            size_t num_writ = 0;
-            const char* home = getenv("HOME");
-            if (home == NULL) {
-                home = "";
-            }
-            if (idx == size) {
-                rc = string_printf(k, sizeof k, &num_writ,
-                    "%s/.aspera/connect/etc/asperaweb_id_dsa.openssh", home);
-            }
-            else {
-                rc = string_printf(k, sizeof k, &num_writ,
-                    "%s/.aspera/connect/etc/asperaweb_id_dsa.putty"  , home);
-            }
-            if (rc != 0 || num_writ >= PATH_MAX) {
-                assert(0);
-                k[0] = '\0';
-            }
-            else {
-                rc = string_printf(c, sizeof c, &num_writ,
-                    "%s/.aspera/connect/bin/ascp", home);
-                if (rc != 0 || num_writ >= PATH_MAX) {
-                    assert(0);
-                    c[0] = '\0';
-                }
-            }
-        }
-        if (rc != 0) {
-            *cmd = *key = NULL;
-            idx = 0;
-            return false;
-        }
-        else {
-            *cmd = c;
-            *key = k;
-            ++idx;
-            return true;
-        }
-    }
-}
diff --git a/libs/ascp/mac/ascp-path.c b/libs/ascp/mac/ascp-path.c
deleted file mode 100644
index 6b3747a..0000000
--- a/libs/ascp/mac/ascp-path.c
+++ /dev/null
@@ -1,74 +0,0 @@
-#include "ascp-priv.h" /* ascp_path */
-#include <klib/printf.h> /* string_printf */
-#include <assert.h>
-#include <limits.h> /* PATH_MAX */
-#include <stdlib.h> /* getenv */
-
-bool ascp_path(const char **cmd, const char **key) {
-    static int idx = 0;
-    static const char *k[] = {
- "/Applications/Aspera Connect.app/Contents/Resources/asperaweb_id_dsa.openssh",
- "/Applications/Aspera Connect.app/Contents/Resources/asperaweb_id_dsa.putty",
-    };
-    static const char c[] = "/Applications/Aspera Connect.app/Contents/"
-        "Resources/ascp";
-    assert(cmd != NULL && key != NULL);
-    if (idx == 0 || idx == 1) {
-        ++idx;
-        *cmd = c;
-        *key = k[idx];
-        return true;
-    }
-    else if (idx == 2 || idx == 3) {
-        rc_t rc = 0;
-        static char k[PATH_MAX] = "";
-        static char c[PATH_MAX] = "";
-        {
-            size_t num_writ = 0;
-            const char* home = getenv("HOME");
-            if (home == NULL) {
-                home = "";
-            }
-            if (idx == 2) {
-                rc = string_printf(k, sizeof k, &num_writ,
-"%s/Applications/Aspera Connect.app/Contents/Resources/asperaweb_id_dsa.openssh"
-                , home);
-            }
-            else {
-                rc = string_printf(k, sizeof k, &num_writ,
-"%s/Applications/Aspera Connect.app/Contents/Resources/asperaweb_id_dsa.putty"
-                , home);
-            }
-            if (rc != 0 || num_writ >= PATH_MAX) {
-                assert(0);
-                k[0] = '\0';
-            }
-            else {
-                rc = string_printf(c, sizeof c, &num_writ,
- "%s/Applications/Aspera Connect.app/Contents/Resources/ascp"
-                   , home);
-                if (rc != 0 || num_writ >= PATH_MAX) {
-                    assert(0);
-                    c[0] = '\0';
-                }
-            }
-        }
-        if (rc != 0) {
-            *cmd = *key = NULL;
-            idx = 0;
-            return false;
-        }
-        else {
-            *cmd = c;
-            *key = k;
-            ++idx;
-            return true;
-        }
-        return true;
-    }
-    else {
-        idx = 0;
-        *cmd =  *key = NULL;
-        return false;
-    }
-}
diff --git a/libs/ascp/unix/connect.c b/libs/ascp/unix/connect.c
deleted file mode 100644
index 26415c5..0000000
--- a/libs/ascp/unix/connect.c
+++ /dev/null
@@ -1,618 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "ascp-priv.h" /* STS_DBG */
-
-#include <kfs/directory.h> /* KDirectory */
-
-#include <klib/time.h> /* KTimeStamp */
-#include <klib/printf.h> /* string_printf */
-#include <klib/text.h> /* string_copy */
-#include <klib/log.h> /* LOGERR */
-#include <klib/status.h> /* STSMSG */
-#include <klib/out.h> /* OUTMSG */
-#include <klib/rc.h> /* RC */
-
-#include <assert.h>
-#include <ctype.h> /* isspace */
-#include <os-native.h>
-#include <errno.h>
-#include <fcntl.h> /* open */
-#include <signal.h> /* kill */
-#include <stdlib.h> /* system */
-#include <stdio.h> /* fflush */
-#include <unistd.h> /* dup */
-#include <sys/wait.h> /* waitpid */
-
-#define DISP_RC(rc, err) (void)((rc == 0) ? 0 : LOGERR(klogInt, rc, err))
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 != 0 && rc == 0) { rc = rc2; } obj = NULL; } while (false)
-
-static int logevp(const char *file, char *const argv[]) {
-    int result = 0;
-    if (STS_INFO > KStsLevelGet()) {
-        return 0;
-    }
-    result = printf("%s", file);
-    while (true) {
-        int res = printf(" %s", *argv);
-        if (result >= 0) {
-            if (res < 0) {
-                result = res;
-            }
-            else {
-                result += res;
-            }
-        }
-        if (*(++argv) == NULL) {
-            break;
-        }
-    }
-    printf("\n");
-    return result;
-}
-
-static
-uint64_t humanize(uint64_t number, char *sfx, uint64_t *fraction)
-{
-    assert(sfx);
-    if (fraction != NULL) {
-        *fraction = 0;
-    }
-    *sfx = 'B';
-    if (number > 1024L * 1024L * 1024L) {
-        if (fraction != NULL) {
-            number *= 1000;
-        }
-        number /=     1024L * 1024L * 1024L;
-        if (fraction != NULL) {
-            *fraction = number % 1000;
-            number /= 1000;
-        }
-        *sfx = 'G';
-    }
-    else if (number > 1024L * 1024L) {
-        number /=     1024L * 1024L;
-        *sfx = 'M';
-    }
-    else if (number > 1024) {
-        number /=     1024;
-        *sfx = 'K';
-    }
-    return number;
-}
-
-static void progress(const char *acc, uint64_t sz,
-    uint64_t srcSz, uint64_t hSrc, char sfSrc, KTime_t date)
-{
-    if (sz > 0) {
-        if (srcSz > 0) {
-            uint64_t p = 100 * sz / srcSz;
-            char sf = 'B';
-            uint64_t fr = 0;
-            uint64_t h = humanize(sz, &sf, &fr);
-            if (p > 0) {
-                if (sfSrc != 'B' && sf != 'B') {
-                    if (fr == 0) {
-                        if (date == 0) {
-                            OUTMSG(("%s %,ld/%,ld %ld%c/%,ld%c %ld%%        \r",
-                                    acc, sz, srcSz, h,sf,hSrc,sfSrc,p));
-                        }
-                        else {
-                            OUTMSG(("%s %,ld/%,ld %ld%c/%,ld%c %ld%% %ld    \r",
-                                    acc, sz, srcSz, h,sf,hSrc,sfSrc,p,
-                                    KTimeStamp() - date));
-                        }
-                    }
-                    else {
-                        OUTMSG(("%s %,ld/%,ld %ld.%03ld%c/%,ld%c %ld%%      \r",
-                                acc, sz, srcSz,h,fr,sf,hSrc,sfSrc,p));
-                    }
-                }
-                else {
-                    OUTMSG(("%s %,ld/%,ld %ld%%                             \r",
-                        acc, sz, srcSz, p));
-                }
-            }
-            else {
-                if (sfSrc != 'B' && sf != 'B') {
-                    if (fr == 0) {
-                        OUTMSG((
-                        "%s %,ld/%,ld %ld%c/%ld%c                           \r",
-                         acc, sz,srcSz,h, sf,hSrc,sfSrc));
-                    }
-                    else {
-                        OUTMSG((
-                        "%s %,ld/%,ld %ld.%03ld%c/%ld%c                     \r",
-                         acc, sz,srcSz,h, fr,sf,hSrc,sfSrc));
-                    }
-                }
-                else {
-                    OUTMSG(("%s %,ld/%,ld                 \r", acc, sz, srcSz));
-                }
-            }
-        }
-        else {
-            OUTMSG(("%s %,ld                                     \r", acc, sz));
-        }
-    }
-    else {
-        OUTMSG(("                                                \r%s\r", acc));
-    }
-}
-
-/******************************************************************************/
-rc_t run_ascp(const char *path, const char *key,
-    const char *src, const char *dest, const AscpOptions *opt)
-{
-    const char *host = NULL;
-    const char *user = NULL;
-    const char *maxRate = NULL;
-    bool cache_key = false;
-    uint64_t heartbeat = 0;
-    const char *acc = NULL;
-    uint64_t srcSz = 0;
-    uint64_t id = 0;
-    TProgress *callback = NULL;
-    TQuitting *quitting = NULL;
-    rc_t rc = 0;
-    pid_t nPid = 0;
-    int pipeto[2];      /* pipe to feed the exec'ed program input */
-    int pipefrom[2];    /* pipe to get the exec'ed program output */
-#define ARGV_SZ 64
-    char *argv[ARGV_SZ];
-    char extraOptions[4096] = "";
-
-    int i = 0;
-    int ret = 0;
-    i = 0;
-
-    if (opt != NULL) {
-        acc = opt->name;
-        cache_key = opt->cache_key;
-        callback = opt->callback;
-        heartbeat = opt->heartbeat;
-        host = opt->host;
-        id = opt->id;
-        quitting = opt->quitting;
-        srcSz = opt->src_size;
-        user = opt->user;
-
-        if (opt->ascp_options != NULL) {
-            size_t s = string_size(opt->ascp_options);
-            if (s >= sizeof extraOptions) {
-                LOGERR(klogErr,
-                    RC(rcExe, rcProcess, rcCreating, rcBuffer, rcInsufficient),
-                    "extra ascp options are ignored");
-                
-                maxRate = opt->target_rate;
-            }
-            else {
-                string_copy
-                    (extraOptions, sizeof extraOptions, opt->ascp_options, s);
-            }
-        }
-        else {
-            maxRate = opt->target_rate;
-        }
-    }
-
-    if (acc == NULL) {
-        acc = dest;
-    }
-
-    if (heartbeat > 0) {
-        heartbeat /= 1000;
-        if (heartbeat == 0) {
-            heartbeat = 1;
-        }
-    }
-
-    if (pipe(pipeto) != 0) {
-        perror("pipe() to");
-        rc = RC(rcExe, rcFileDesc, rcCreating, rcFileDesc, rcFailed);
-        LOGERR(klogErr, rc, "while pipe");
-        return rc;
-    }
-    if (pipe(pipefrom) != 0) {
-        perror("pipe() from");
-        rc = RC(rcExe, rcFileDesc, rcCreating, rcFileDesc, rcFailed);
-        LOGERR(klogErr, rc, "while pipe");
-        return rc;
-    }
-
-    argv[i++] = (char*)path;
-    argv[i++] = "-i";
-    argv[i++] = (char*)key;
-    argv[i++] = "-pQTk1";
-    if (maxRate != NULL && maxRate[0] != '\0') {
-        argv[i++] = "-l";
-        argv[i++] = (char*)maxRate;
-    }
-    if (user != NULL) {
-        argv[i++] = "--user";
-        argv[i++] = (char*)user;
-    }
-    if (host != NULL) {
-        argv[i++] = "--host";
-        argv[i++] = (char*)user;
-    }
-
-    if (extraOptions[0] != '\0') {
-        bool done = false;
-        char *c = extraOptions;
-        while (!done) {
-            while (true) {
-                if (*c == '\0') {
-                    break;
-                }
-                else if (isspace(*c)) {
-                    ++c;
-                }
-                else {
-                    break;
-                }
-            }
-            if (*c == '\0') {
-                break;
-            }
-            else {
-                argv[i++] = c;
-            }
-            while (true) {
-                if (*c == '\0') {
-                    done = true;
-                    break;
-                }
-                else if (isspace(*c)) {
-                    *(c++) = '\0';
-                    break;
-                }
-                ++c;
-            }
-            if (i > ARGV_SZ - 4) {
-                LOGERR(klogErr,
-                    RC(rcExe, rcProcess, rcCreating, rcBuffer, rcInsufficient),
-                    "too mary extra ascp options - some of them are ignored");
-                break;
-            }
-        }
-    }
-
-    argv[i++] = (char*)src;
-    argv[i++] = (char*)dest;
-    argv[i++] = NULL;
-
-    logevp(path, argv);
-
-    if (quitting) {
-        rc = quitting();
-    }
-    if (rc != 0) {
-        return rc;
-    }
-
-    nPid = fork();
-    if (nPid < 0 ) {
-        perror("fork() 1");
-        rc = RC(rcExe, rcProcess, rcCreating, rcProcess, rcFailed);
-        LOGERR(klogErr, rc, "after fork");
-        return rc;
-    }
-    else if (nPid == 0) {
-        /* dup pipe read/write to stdin/stdout */
-        dup2(pipeto  [0], STDIN_FILENO);
-        dup2(pipefrom[1], STDOUT_FILENO);
-        dup2(pipefrom[1], STDERR_FILENO);
-        close(pipeto[1]);
-        ret = execvp(path, argv);
-        STSMSG(STS_DBG, ("CHILD: Done %s %s %s = %d", path, src, dest, ret));
-        exit(EXIT_FAILURE);
-    }
-    else {
-        bool progressing = false;
-        bool writeFailed = false;
-        EAscpState state = eStart;
-        const char y[] = "y\n";
-        const char n[] = "n\n";
-        int status = 0;
-        int w = 0;
-        int fd = pipefrom[0];
-        const char *answer = n;
-        String line;
-        StringInit(&line, NULL, 0, 0);
-        if (cache_key) {
-            answer = y;
-        }
-
-        {
-            int flags = fcntl(fd, F_GETFL, 0);
-            fcntl(fd, F_SETFL, flags | O_NONBLOCK);
-        }
-
-        close(pipeto[0]);
-        close(pipefrom[1]);
-        assert(sizeof y == sizeof n);
-
-        {
-            int hang = 0;
-            uint64_t prev = 0;
-            KTime_t tPrev = 0;
-            char sfSrc = 'B';
-            uint64_t hSrc = humanize(srcSz, &sfSrc, NULL);
-            int sig = 0;
-            uint64_t i = 0;
-            KDirectory *dir = NULL;
-            rc_t rc = KDirectoryNativeDir(&dir);
-            DISP_RC(rc, "KDirectoryNativeDir");
-            if (rc != 0) {
-                return rc;
-            }
-            while (w == 0) {
-                bool quit = false;
-                w = waitpid(nPid, &status, WNOHANG);
-                if (w == 0) {
-                    bool got = false;
-                    rc_t rc = 0;
-                    if (quitting) {
-                        rc = quitting();
-                    }
-                    if (rc != 0 || quit) {
-                        if (sig == 0) {
-                            sig = SIGINT;
-                        }
-                        else if (sig >= SIGKILL) {
-                            break;
-                        }
-                        else {
-                            ++sig;
-                        }
-                        if (progressing) {
-                            OUTMSG(("\n"));
-                        }
-                        PLOGMSG(klogInfo, (klogInfo, "^C pressed: "
-                            "Senging $(sgn) to ascp", "sgn=%s", sig));
-                        kill(nPid, sig);
-                    }
-                    while (true) {
-                        char buf[4096];
-                        int s = read(fd, buf, sizeof buf);
-                        if (s == 0) {
-                            break;
-                        }
-                        else if (s < 0) {
-                            if (errno != EAGAIN) {
-                                if (progressing) {
-                                    OUTMSG(("\n"));
-                                }
-                                perror("read(child)");
-                            }
-                            break;
-                        }
-                        ascpParse(buf, s, dest, &state, &line);
-                        switch (state) {
-                            case eKeyEnd:
-                                write(pipeto[1], answer, sizeof y - 1);
-                                break;
-                            case eWriteFailed:
-                                writeFailed = true;
-                                break;
-                            default:
-                                break;
-                        }
-                        got = true;
-                    }
-                    if (!got) {
-                        sleep(1);
-                        ++i;
-                        if ((heartbeat > 0 && i >= heartbeat) || (i > 99)) {
-                            uint64_t size = 0;
-                            rc_t rc = KDirectoryFileSize(dir, &size, "%s", dest);
-                            if (rc != 0) {
-                                size = 0;
-                            }
-                            else {
-                                if (size != prev) {
-                                   prev = size;
-                                   tPrev = 0;
-                                   hang = 0;
-                                }
-                                else {
-                                    KTime_t date = 0;
-                                    rc_t rc = KDirectoryDate(dir, &date, "%s", dest);
-                                    if (rc == 0) {
-                                        tPrev = date;
-                                        if ((KTimeStamp() - date) > 60 * 99) {
-                                            /* no file update during 99' */
-                                            if (hang == 0) {
-                                                write(pipeto[1],
-                                                    answer, sizeof y - 1);
-                                                ++hang;
-                                            }
-                                            else if (hang < 9) {
-                                                ++hang;
-                                                sig = 0;
-                                            }
-                                            else {
-                                                if (sig == 0) {
-                                                    sig = SIGINT;
-                                                }
-                                                else {
-                                                    ++sig;
-                                                }
-                                                if (progressing) {
-                                                   OUTMSG(("\n"));
-                                                }
-                                                if (sig > SIGKILL) {
-                                                   rc = RC(rcExe,
-                                                       rcProcess, rcExecuting,
-                                                       rcProcess,rcDetached);
-                                                   return rc;
-                                                }
-
-                                                PLOGMSG(klogInfo, (klogInfo,
-                                                    "Senging $(sgn) to ascp",
-                                                    "sgn=%s", sig));
-                                                kill(nPid, sig);
-                                            }
-                                        }
-                                    }
-                                }
-                            }
-                            if (heartbeat > 0) {
-                                if (callback) {
-                                    quit = !callback(id,
-                                        eAscpStateRunning, size, 0);
-                                }
-                                else {
-                                    progress(acc, size, srcSz, hSrc, sfSrc,
-                                        tPrev);
-                                }
-                                progressing = true;
-                            }
-                            i = 0;
-                        }
-                    }
-                }
-            }
-            RELEASE(KDirectory, dir);
-        }
-
-        if (progressing) {
-            OUTMSG(("\n"));
-        }
-
-        while (1) {
-            char buf[4096];
-            int s = read(fd, buf, sizeof buf);
-            if (s == 0) {
-                break;
-            }
-            else if (s < 0) {
-                if (errno != EAGAIN) {
-                    perror("read(child)");
-                    break;
-                }
-                continue;
-            }
-            ascpParse(buf, s, dest, &state, &line);
-            if (state == eWriteFailed) {
-                writeFailed = true;
-            }
-        }
-        STSMSG(    STS_DBG, ("ascp exited with pid=%d status=%d", w, status));
-        if (WIFEXITED(status)) {
-            STSMSG(STS_DBG, ("ascp exited with exit status %d",
-                WEXITSTATUS(status)));
-        }
-        else {
-            STSMSG(STS_DBG, ("ascp has not terminated correctly"));
-        }
-        if (w == -1) {
-            perror("waitpid");
-            rc = RC(rcExe, rcProcess, rcWaiting, rcProcess, rcFailed);
-            LOGERR(klogErr, rc, "after waitpid");
-            exit(EXIT_FAILURE);
-        }
-        if (WIFEXITED(status)) {
-    	    if (WEXITSTATUS(status) == 0) {
-	            STSMSG(STS_DBG, ("ascp succeed"));
-                if (callback) {
-                    callback(id, eAscpStateExitSuccess, 0, 0);
-                }
-            } else if (writeFailed) {
-                rc = RC(rcExe, rcProcess, rcExecuting, rcMemory, rcExhausted);
-                if (callback) {
-                    callback(id, eAscpStateExitWriteFailure, 0, 0);
-                }
-            }
-            else {
-                if (rc == 0) {
-                    rc = RC(rcExe, rcProcess, rcWaiting, rcProcess, rcFailed);
-                }
-                PLOGERR(klogErr, (klogErr, rc,
-                    "ascp failed with $(ret)", "ret=%d", WEXITSTATUS(status)));
-                if (callback) {
-                    callback(id, eAscpStateExitFailure, 0, 0);
-                }
-            }
-        } else if (WIFSIGNALED(status)) {
-            if (rc == 0) {
-                if (quitting) {
-                    rc = quitting();
-                    if (rc == 0) {
-                        rc = RC(rcExe,
-                            rcProcess, rcWaiting, rcProcess, rcFailed);
-                    }
-                }
-            }
-            if (rc != SILENT_RC(rcExe, rcProcess, rcExecuting,
-                rcProcess, rcCanceled))
-            {
-                PLOGERR(klogErr, (klogErr, rc, "ascp killed by signal $(sig)",
-                    "sig=%d", WTERMSIG(status)));
-                if (callback) {
-                    callback(id, eAscpStateExitFailure, 0, 0);
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-int silent_system(const char *command) {
-    int ret = 0;
-
-    int oldOut = 0;
-    int youngOut = 0;
-    int oldErr = 0;
-    int youngErr = 0;
-
-    fflush(stdout);
-    oldOut = dup(STDOUT_FILENO);
-    youngOut = open("/dev/null", O_WRONLY);
-    dup2(youngOut, STDOUT_FILENO);
-    close(youngOut);
-
-    fflush(stderr);
-    oldErr = dup(STDERR_FILENO);
-    youngErr = open("/dev/null", O_WRONLY);
-    dup2(youngErr, STDERR_FILENO);
-    close(youngErr);
-
-    ret = system(command);
-
-    fflush(stdout);
-    dup2(oldOut, STDOUT_FILENO);
-    close(oldOut);    
-
-    fflush(stderr);
-    dup2(oldErr, STDERR_FILENO);
-    close(oldErr);    
-
-    return ret;
-}
diff --git a/libs/ascp/win/ascp-path.c b/libs/ascp/win/ascp-path.c
deleted file mode 100644
index 2aafb36..0000000
--- a/libs/ascp/win/ascp-path.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "ascp-priv.h" /* ascp_path */
-#include <assert.h>
-
-static int size_of(const char **array) {
-    int i = 0;
-    while (*(array++) != NULL) {
-        ++i;
-    }
-    return i;
-}
-
-bool ascp_path(const char **cmd, const char **key) {
-    static int idx = 0;
-
-    static const char *c[] = {
-        "C:\\Program Files (x86)\\Aspera\\Aspera Connect\\bin\\ascp.exe",
-        "C:\\Program Files (x86)\\Aspera\\Aspera Connect\\bin\\ascp.exe",
-
-              "C:\\Program Files\\Aspera\\Aspera Connect\\bin\\ascp.exe",
-              "C:\\Program Files\\Aspera\\Aspera Connect\\bin\\ascp.exe",
-    };
-
-    static const char *k[] = {
-"C:\\Program Files (x86)\\Aspera\\Aspera Connect\\etc\\asperaweb_id_dsa.openssh"
-                                                                               ,
-"C:\\Program Files (x86)\\Aspera\\Aspera Connect\\etc\\asperaweb_id_dsa.putty",
-
-      "C:\\Program Files\\Aspera\\Aspera Connect\\etc\\asperaweb_id_dsa.openssh"
-                                                                               ,
-      "C:\\Program Files\\Aspera\\Aspera Connect\\etc\\asperaweb_id_dsa.putty",
-    };
-
-    int size = 4;
-
-    assert(cmd != NULL && key != NULL);
-//  assert(size_of(c) == size_of(k));
-
-    if (idx < size) {
-        *cmd = c[idx];
-        *key = k[idx];
-        ++idx;
-        return true;
-    }
-    else {
-        *cmd =  *key = NULL;
-        idx = 0;
-        return false;
-    }
-}
diff --git a/libs/ascp/win/connect.c b/libs/ascp/win/connect.c
deleted file mode 100644
index 0f44429..0000000
--- a/libs/ascp/win/connect.c
+++ /dev/null
@@ -1,525 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "ascp-priv.h" /* STS_DBG */
-
-#include <kfs/directory.h> /* KDirectory */
-#include <kfs/impl.h> /* KSysDir */
-#include <kfs/kfs-priv.h> /* KDirectoryPosixStringToSystemString */
-
-#include <klib/log.h> /* LOGERR */
-#include <klib/out.h> /* OUTMSG */
-#include <klib/printf.h> /* string_printf */
-#include <klib/rc.h>
-#include <klib/status.h> /* STSMSG */
-
-#include <Windows.h>
-
-#include <assert.h>
-#include <stdio.h> /* stderr */
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
-
-#define STS_FIN 3
-
-static void beat(uint64_t heartbeat, bool flush) {
-    static int i = 0;
-    static char c = '1';
-    return;
-    if (heartbeat == 0) {
-        return;
-    }
-    if (flush) {
-        fprintf(stderr, "\n");
-/*      fflush(stderr); */
-        return;
-    }
-    fprintf(stderr, "%c", c);
-    if (++i >= 60) {
-        fprintf(stderr,
-            "\r                                                            \r");
-        i = 0;
-        ++c;
-        switch (c) {
-            case ':':
-                c = 'A';
-                break;
-            case '[':
-                c = 'a';
-                break;
-            case 127:
-                c = '!';
-                break;
-        }
-    }
-}
-
-static rc_t mkAscpCommand(char *buffer, size_t len,
-    const char *path, const char *key,
-    const char *src, const char *dest, const AscpOptions *opt)
-{
-    KDirectory *dir = NULL;
-    const char *maxRate = NULL;
-    const char *host = NULL;
-    const char *user = NULL;
-    size_t num_writ = 0;
-
-    size_t pos = 0;
-
-    char system[MAX_PATH] = "";
-
-    rc_t rc = KDirectoryNativeDir(&dir);
-    if (rc != 0) {
-        return rc;
-    }
-
-    rc = KDirectoryPosixStringToSystemString(
-        dir, system, sizeof system, "%s", dest);
-    if (rc == 0) {
-        if (opt != NULL) {
-            if (opt->host != NULL && opt->host[0] != '\0') {
-                host = opt->host;
-            }
-            if (opt->target_rate != NULL && opt->target_rate[0] != '\0') {
-                maxRate = opt->target_rate;
-            }
-            if (opt->user != NULL && opt->user[0] != '\0') {
-                user = opt->user;
-            }
-        }
-
-        rc = string_printf(buffer, len, &num_writ,
-            "\"%s\" -i \"%s\" -pQTk1%s%s%s%s%s%s %s %s",
-            path, key,
-            maxRate == NULL ? "" : " -l", maxRate == NULL ? "" : maxRate,
-            host == NULL ? "" : " --host ", host == NULL ? "" : host,
-            user == NULL ? "" : " --user ", user == NULL ? "" : host,
-            src, system);
-        if (rc != 0) {
-            LOGERR(klogInt, rc, "while creating ascp command line");
-        }
-        else {
-            assert(num_writ < len);
-        }
-    }
-
-    RELEASE(KDirectory, dir);
-
-    return rc;
-}
-
-static int execute(const char *command, uint64_t heartbeat,
-    bool cacheKey, bool *writeFailed, bool *canceled,
-    const char *name, TQuitting *quitting)
-{
-    DWORD exitCode = STILL_ACTIVE;
-    HANDLE g_hChildStd_IN_Rd = NULL;
-    HANDLE g_hChildStd_IN_Wr = NULL;
-    HANDLE g_hChildStd_OUT_Rd = NULL;
-    HANDLE g_hChildStd_OUT_Wr = NULL;
-    SECURITY_ATTRIBUTES saAttr; 
-    BOOL bSuccess = FALSE;
-    PROCESS_INFORMATION pi;
-    STARTUPINFO si;
-
-    wchar_t wcommand[5000];
-
-    assert(writeFailed && canceled);
-    *writeFailed = false;
-
-    STSMSG(STS_INFO, ("Starting %s ", command));
-
-    saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); 
-    saAttr.bInheritHandle = TRUE; 
-    saAttr.lpSecurityDescriptor = NULL; 
-
-    // Create a pipe for the child process's STDOUT. 
-    if (!CreatePipe(&g_hChildStd_OUT_Rd, &g_hChildStd_OUT_Wr, &saAttr,
-        0))
-    {
-        rc_t rc = RC(rcExe, rcFileDesc, rcCreating, rcFileDesc, rcFailed);
-        LOGERR(klogErr, rc, "Stdout CreatePipe");
-        return 1;
-    }
-
-    // Ensure the read handle to the pipe for STDOUT is not inherited.
-    if (!SetHandleInformation(g_hChildStd_OUT_Rd, HANDLE_FLAG_INHERIT,
-        0))
-    {
-        rc_t rc = RC(rcExe, rcFileDesc, rcCreating, rcFileDesc, rcFailed);
-        LOGERR(klogErr, rc, "Stdout SetHandleInformation");
-        return 1;
-    }
-
-    // Create a pipe for the child process's STDIN. 
-    if (!CreatePipe(&g_hChildStd_IN_Rd, &g_hChildStd_IN_Wr, &saAttr,
-        0))
-    {
-        puts("Stdin CreatePipe");
-        return 1;
-    }
-
-    // Ensure the write handle to the pipe for STDIN is not inherited.  
-    if (!SetHandleInformation(g_hChildStd_IN_Wr, HANDLE_FLAG_INHERIT,
-        0))
-    {
-        puts("Stdin SetHandleInformation");
-        return 1;
-    }
-
-    // Set up members of the PROCESS_INFORMATION structure. 
-    ZeroMemory(&pi, sizeof(pi)); 
-
-    // Set up members of the STARTUPINFO structure. 
-    // This structure specifies the STDIN and STDOUT handles for redirection.
-    ZeroMemory(&si, sizeof(si));
-    si.cb = sizeof(si);
-    si.hStdError = g_hChildStd_OUT_Wr;
-    si.hStdOutput = g_hChildStd_OUT_Wr;
-    si.hStdInput = g_hChildStd_IN_Rd;
-    si.dwFlags |= STARTF_USESTDHANDLES;
-
-    mbstowcs(wcommand, command, strlen(command) + 1);
-
-    bSuccess = CreateProcess(
-        NULL,//_In_opt_ LPCTSTR              lpApplicationName,
-        wcommand,//_Inout_opt_  LPTSTR lpCommandLine, command line 
-        NULL,//_In_opt_ LPSECURITY_ATTRIBUTES process security attributes 
-        NULL,//_In_opt_ LPSECURITY_ATTRIBUTES primary thread security attributes
-        TRUE,//_In_     BOOL                  handles are inherited 
-        0,   //_In_     DWORD                 creation flags 
-        NULL,//_In_opt_ LPVOID                use parent's environment 
-        NULL,//_In_opt_ LPCTSTR               use parent's current directory 
-        &si, //_In_     LPSTARTUPINFO         STARTUPINFO pointer 
-        &pi  //_Out_    LPPROCESS_INFORMATION receives PROCESS_INFORMATION 
-    );
-    if (bSuccess) {
-        bool progressing = false;
-        EAscpState state = eStart;
-        const char y[] = "y\r\n";
-        const char n[] = "n\r\n";
-        const char *answer = cacheKey ? y : n;
-        bool first = true;
-        CHAR chBuf[4096];
-        DWORD dwRead = 0;
-        DWORD dwWritten = 0;
-        DWORD dwFileSize = 0;
-        HANDLE hParentStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
-        DWORD dwMilliseconds = 1000;
-        DWORD dwMillisecondsRemains = 1000;
-        String line;
-        StringInit(&line, NULL, 0, 0);
-        if (heartbeat > 0) {
-            dwMillisecondsRemains = (DWORD)heartbeat;
-        }
-        // Write to the pipe that is the standard input for a child process. 
-        // Data is written to the pipe's buffers, so it is not necessary to wait
-        // until the child process is running before writing data.
-        assert(sizeof y == sizeof n);
-        bSuccess = WriteFile(g_hChildStd_IN_Wr, answer, sizeof y - 1,
-            &dwWritten, NULL);
-        if (!bSuccess) {
-            puts("failed to write to child's Stdin");
-            return 1;
-        }
-        if (!CloseHandle(g_hChildStd_IN_Wr)) {
-            puts("StdInWr CloseHandle");
-            return 1;
-        }
-        CloseHandle(pi.hThread);
-
-        // Successfully created the process.  Wait for it to finish.
-        while (true) {
-            char noprogress[] = "\r                                "
-                "                                               \r";
-            if (exitCode != STILL_ACTIVE) {
-/*                  printf(">>GetExitCodeProcess = %d\n", exitCode); */
-            }
-            bSuccess = GetExitCodeProcess(pi.hProcess, &exitCode);
-            if (exitCode != STILL_ACTIVE) {
-/*                  printf(">>GetExitCodeProcess = %d\n", exitCode); */
-            }
-            if (!bSuccess) {
-                rc_t rc = RC(rcExe,
-                    rcProcess, rcExecuting, rcProcess, rcFailed);
-                if (progressing) {
-                    WriteFile(hParentStdOut, noprogress, sizeof noprogress - 1,
-                        &dwWritten, NULL);
-                }
-                LOGERR(klogErr, rc,
-                    "Executed command, couldn't get exit code");
-                return 1;
-            }
-            if (exitCode == STILL_ACTIVE) {
-                if (first) {
-                    first = false;
-                }
-                else {
-                    if (STS_DBG > KStsLevelGet()) {
-                        beat(heartbeat, false);
-                    }
-                }
-                WaitForSingleObject(pi.hProcess, dwMilliseconds);
-                dwFileSize = GetFileSize(g_hChildStd_OUT_Rd,  NULL);
-                if (dwFileSize > 0) {
-                    STSMSG(STS_FIN + 1,
-                        ("GetFileSize(ChildStdOut) = %d", dwFileSize));
-                }
-                while (dwFileSize > 0) {
-                    bSuccess = ReadFile(g_hChildStd_OUT_Rd,
-                        chBuf, sizeof chBuf, &dwRead, NULL);
-                    if (!bSuccess) {
-                        if (progressing) {
-                            WriteFile(hParentStdOut, noprogress,
-                                sizeof noprogress - 1, &dwWritten, NULL);
-                        }
-                        break;
-                    }
-                    ascpParse(chBuf, dwRead, name, &state, &line);
-                    if (state == eWriteFailed) {
-                        *writeFailed = true;
-                    }
-                    else if (state == eProgress) {
-                        if (heartbeat > 0) {
-                            if (dwMillisecondsRemains > dwMilliseconds) {
-                                dwMillisecondsRemains -= dwMilliseconds;
-                            }
-                            else {
-                                const char *p = chBuf;
-                                size_t l = dwRead;
-                                if (line.addr != NULL && line.len != 0) {
-                                    p = line.addr;
-                                    l = line.len;
-                                    WriteFile(hParentStdOut, "\r", 1,
-                                        &dwWritten, NULL);
-                                    bSuccess = WriteFile(hParentStdOut, p,
-                                        (DWORD)l, &dwWritten, NULL);
-                                    dwMillisecondsRemains = (DWORD)heartbeat;
-                                    progressing = true;
-                                }
-                            }
-                        }
-                    }
-/*                      OUTMSG(("%.*s", dwRead, chBuf)); */
-                    if (STS_DBG <= KStsLevelGet()) {
-                        if (KStsMsg("%.*s", dwRead, chBuf) != 0) {
-                            bSuccess = WriteFile(hParentStdOut, chBuf,
-                                dwRead, &dwWritten, NULL);
-                        }
-                    }
-                    dwFileSize = GetFileSize(g_hChildStd_OUT_Rd,  NULL);
-                    if (dwFileSize > 0) {
-                        STSMSG(STS_FIN + 1,
-                            ("GetFileSize(ChildStdOut) = %d", dwFileSize));
-                    }
-                }
-            }
-            else {
-                if (STS_DBG > KStsLevelGet()) {
-//                  beat(heartbeat, true);
-                }
-                if (progressing) {
-                    WriteFile(hParentStdOut, noprogress,
-                        sizeof noprogress - 1, &dwWritten, NULL);
-                }
-                break;
-            }
-            if (quitting != NULL) {
-                rc_t rc = quitting();
-                if (rc != 0) {
-                    if (progressing) {
-                        WriteFile(hParentStdOut, noprogress,
-                            sizeof noprogress - 1, &dwWritten, NULL);
-                    }
-                    *canceled = true;
-                    break;
-                }
-            }
-        }
-        if (!*canceled) {
-            WaitForSingleObject(pi.hProcess, INFINITE);
-
-        // Get the exit code.
-/*      printf(">GetExitCodeProcess = %d\n", exitCode); */
-            bSuccess = GetExitCodeProcess(pi.hProcess, &exitCode);
-            if (!bSuccess) {
-                rc_t rc = RC(rcExe,
-                    rcProcess, rcExecuting, rcProcess, rcFailed);
-                LOGERR(klogErr,
-                    rc, "Executed command but couldn't get exit code");
-                return 1;
-            }
-        }
-/*      printf("<GetExitCodeProcess = %d\n", exitCode); */
-
-        CloseHandle(pi.hProcess);
-
-        if (exitCode != 0 && STS_DBG > KStsLevelGet()) {
-            if (KStsMsg("%.*s", dwRead, chBuf) != 0) {
-                bSuccess = WriteFile(hParentStdOut, chBuf,
-                    dwRead, &dwWritten, NULL);
-            }
-        }
-        if (dwFileSize > 0) {
-            STSMSG(STS_FIN, ("GetFileSize(ChildStdOut) = %d", dwFileSize));
-        }
-        while (dwFileSize > 0) { 
-            bSuccess = ReadFile(g_hChildStd_OUT_Rd,
-                chBuf, sizeof chBuf, &dwRead, NULL);
-            if (!bSuccess || dwRead == 0) {
-                break; 
-            }
-            ascpParse(chBuf, dwRead, name, &state, &line);
-            if (state == eWriteFailed) {
-                *writeFailed = true;
-            }
-            dwFileSize = GetFileSize(g_hChildStd_OUT_Rd,  NULL);
-            if (dwFileSize > 0) {
-                STSMSG(STS_FIN, ("GetFileSize(ChildStdOut) = %d", dwFileSize));
-            }
-        }
-
-        return exitCode;
-    }
-    else {
-        return GetLastError();
-    }
-}
-
-rc_t run_ascp(const char *path, const char *key,
-    const char *src, const char *dest, const AscpOptions *opt)
-{
-    rc_t rc = 0;
-    uint64_t heartbeat = 0;
-    char buffer[MAX_PATH * 3] = "";
-    bool writeFailed = false;
-    TQuitting *quitting = NULL;
-
-    if (opt != NULL) {
-        heartbeat = opt->heartbeat;
-        quitting = opt->quitting;
-    }
-
-    rc = mkAscpCommand(buffer, sizeof buffer, path, key, src, dest, opt);
-    if (rc == 0) {
-        bool cacheKey = false;
-        if (opt != NULL && opt->cache_key) {
-            cacheKey = true;
-        }
-        {
-            int value = 0;
-            bool canceled = false;
-            const char *name = strrchr(dest, '/');
-            if (name == NULL) {
-                name = dest;
-            }
-            else {
-                if (*(name + 1) != '\0') {
-                    ++name;
-                }
-                else {
-                    name = dest;
-                }
-            }
-            value = execute(buffer, heartbeat, cacheKey,
-                &writeFailed, &canceled, name, quitting);
-            if (value != 0) {
-                if (writeFailed) {
-                    rc = RC(rcExe, rcProcess, rcExecuting,
-                        rcMemory, rcExhausted);
-                }
-                else {
-                    rc = RC(rcExe, rcProcess, rcExecuting, rcProcess, rcFailed);
-                }
-            }
-            if (value == 0 && rc == 0 && canceled && quitting != NULL) {
-                rc = quitting();
-            }
-        }
-    }
-
-    return rc;
-}
-
-int silent_system(const char *command) {
-    HANDLE g_hChildStd_OUT_Rd = NULL;
-    HANDLE g_hChildStd_OUT_Wr = NULL;
-    BOOL bSuccess = FALSE;
-    PROCESS_INFORMATION pi;
-    STARTUPINFO si;
-    SECURITY_ATTRIBUTES saAttr; 
-
-    wchar_t wcommand[5000];
-
-    // Set the bInheritHandle flag so pipe handles are inherited. 
-    saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); 
-    saAttr.bInheritHandle = TRUE; 
-    saAttr.lpSecurityDescriptor = NULL; 
-
-    // Create a pipe for the child process's STDOUT. 
-    if (!CreatePipe(&g_hChildStd_OUT_Rd, &g_hChildStd_OUT_Wr, &saAttr, 0)) {
-        rc_t rc = RC(rcExe, rcFileDesc, rcCreating, rcFileDesc, rcFailed);
-        LOGERR(klogErr, rc, "Stdout CreatePipe");
-        return 1;
-    }
-
-    // Ensure the read handle to the pipe for STDOUT is not inherited.
-    if (!SetHandleInformation(g_hChildStd_OUT_Rd, HANDLE_FLAG_INHERIT, 0)) {
-        rc_t rc = RC(rcExe, rcFileDesc, rcCreating, rcFileDesc, rcFailed);
-        LOGERR(klogErr, rc, "Stdout SetHandleInformation");
-        return 1;
-    }
-
-    ZeroMemory(&pi, sizeof(pi)); 
-
-    ZeroMemory(&si, sizeof(si));
-    si.cb = sizeof(si);
-    si.hStdError = g_hChildStd_OUT_Wr;
-    si.hStdOutput = g_hChildStd_OUT_Wr;
-    si.dwFlags |= STARTF_USESTDHANDLES;
-
-    mbstowcs(wcommand, command, strlen(command) + 1);
-
-    bSuccess = CreateProcess(
-        NULL,           //_In_opt_    LPCTSTR               lpApplicationName,
-        wcommand,       //_Inout_opt_ LPTSTR                lpCommandLine,
-        NULL,           //_In_opt_    LPSECURITY_ATTRIBUTES lpProcessAttributes,
-        NULL,           //_In_opt_    LPSECURITY_ATTRIBUTES lpThreadAttributes,
-        TRUE,           //_In_        BOOL                  bInheritHandles,
-        0,              //_In_        DWORD                 dwCreationFlags,
-        NULL,           //_In_opt_    LPVOID                lpEnvironment,
-        NULL,           //_In_opt_    LPCTSTR               lpCurrentDirectory,
-        &si,            //_In_        LPSTARTUPINFO         lpStartupInfo,
-        &pi             //_Out_       LPPROCESS_INFORMATION lpProcessInformation
-    );
-    if (bSuccess) {
-        return 0;
-    }
-    else {
-        return GetLastError();
-    }
-}
diff --git a/libs/axf/.gitignore b/libs/axf/.gitignore
deleted file mode 100644
index c253038..0000000
--- a/libs/axf/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.def
diff --git a/libs/axf/Makefile b/libs/axf/Makefile
deleted file mode 100644
index f6e6ec6..0000000
--- a/libs/axf/Makefile
+++ /dev/null
@@ -1,142 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/axf
-
-INT_LIBS = \
-	libaxf \
-	libwaxf
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES =     \
-	$(AXF_OBJ) \
-	$(WAXF_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(ALL_LIBS): makedirs
-	@ $(MAKE_CMD) $(TARGDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(TARGDIR)/,$(ALL_LIBS))
-
-.PHONY: $(TARGDIR)/all $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# alignment transform library
-#
-$(TARGDIR)/libaxf: $(addprefix $(ILIBDIR)/libaxf.,$(ILIBEXT))
-
-AXF_SRC = \
-	ref-tbl-sub-select \
-	ref-restore-read \
-	align-restore-read \
-	raw-restore-read \
-	raw-restore-qual \
-	seq-restore-read \
-	seq-restore-linkage-group \
-	seq-construct-read \
-	cigar \
-	project_read_from_sequence \
-	not-my-row \
-	template-len \
-	get-sam-flags \
-	align-ref-pos \
-	align-ref-name \
-	align-ref-seq-id \
-	align-local_ref_id \
-	align-local_ref_start \
-	generate-mismatch-qual \
-	mismatch-restore-qual \
-	ref-preserve_qual \
-	ref-tbl \
-	make-cmp-read_desc \
-	get_mate_align_ids
-
-AXF_OBJ = \
-	$(addsuffix .$(LOBX),$(AXF_SRC))
-
-AXF_LIB = \
-	-lalign-reader \
-	-dvdb \
-	-dkdb \
-	-dklib \
-	-dm \
-	-dz
-
-$(ILIBDIR)/libaxf.$(LIBX): $(AXF_OBJ)
-	$(LD) --slib -o $@ $^ $(AXF_LIB)
-
-
-#-------------------------------------------------------------------------------
-# alignment transform update library
-#
-$(TARGDIR)/libwaxf: $(addprefix $(ILIBDIR)/libwaxf.,$(ILIBEXT))
-
-WAXF_SRC = \
-	$(AXF_SRC) \
-	refseq-stats
-
-WAXF_OBJ = \
-	$(addsuffix .$(LOBX),$(WAXF_SRC))
-
-WAXF_LIB = \
-	-lalign-reader \
-	-dwvdb \
-	-dwkdb \
-	-lkfg \
-	-dklib \
-	-dm \
-	-dz
-
-$(ILIBDIR)/libwaxf.$(LIBX): $(WAXF_OBJ)
-	$(LD) --slib -o $@ $^ $(WAXF_LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/axf/align-local_ref_id.c b/libs/axf/align-local_ref_id.c
deleted file mode 100644
index 3f57f98..0000000
--- a/libs/axf/align-local_ref_id.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-#include <insdc/insdc.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <bitstr.h>
-
-#include "ref-tbl.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-typedef struct LocalRefID LocalRefID;
-struct LocalRefID
-{
-    uint32_t max_seq_len;
-};
-
-static
-void CC LocalRefIDWhack ( void *obj )
-{
-    LocalRefID * self = obj;
-    if ( self != NULL )
-    {
-        free ( self );
-    }
-}
-
-static
-rc_t LocalRefIDMake ( LocalRefID **objp, const VTable *tbl, const VCursor *native_curs)
-{
-    rc_t rc;
-    /* create the object */
-    LocalRefID *obj = malloc ( sizeof * obj );
-    if ( obj == NULL )
-    {
-        rc = RC( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        const VCursor *curs=NULL;
-        /* open the reference table cursor*/
-        rc = AlignRefTableCursor( tbl, native_curs, &curs, NULL );
-        if ( rc == 0 )
-        {
-            uint32_t itmp;
-            rc = VCursorAddColumn( curs, &itmp, "(U32)MAX_SEQ_LEN" );
-            if ( rc == 0 || GetRCState( rc ) == rcExists )
-            {
-                const void *base;
-                uint32_t row_len;
-                rc = VCursorCellDataDirect( curs, 1, itmp, NULL, &base, NULL, &row_len );
-                if ( rc == 0 )
-                {
-                    assert( row_len == 1 );
-                    memcpy( &obj->max_seq_len, base, 4 );
-                }
-            }
-                    
-            if ( ( GetRCObject( rc ) == ( enum RCObject )rcColumn ) && ( GetRCState( rc ) == rcNotFound ) )
-            {
-                obj->max_seq_len = 0;
-                rc = 0;
-            }
-
-            VCursorRelease( curs );
-            if ( rc == 0 )
-            {
-                *objp = obj;
-                return 0;
-            }
-        }
-        free ( obj );
-    }
-    return rc;
-}
-
-/*
- function I64 NCBI:align:local_ref_id ( U64 global_ref_start )
- */
-static
-rc_t CC align_local_ref_id ( void *data, const VXformInfo *info, void *Dst, const void *Src, uint64_t elem_count )
-{
-    LocalRefID const *self = ( void const *) data;
-    int64_t *dst=( int64_t* )Dst;
-    uint64_t const *global_ref_start = Src; 
-    uint64_t i;
-
-    for ( i = 0; i != elem_count; ++i )
-    {
-        dst[ i ] = global_ref_start[ i ] / self->max_seq_len + 1;
-    }
-    return 0;
-}
-
-VTRANSFACT_IMPL ( NCBI_align_local_ref_id, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    LocalRefID *fself;
-    rc_t rc = LocalRefIDMake ( & fself, info -> tbl,  (const VCursor*)info->parms );
-    if ( rc == 0 )
-    {
-        rslt -> self = fself;
-        rslt -> whack = LocalRefIDWhack;
-        rslt -> u . af = align_local_ref_id;
-        rslt -> variant = vftArray;
-    }
-
-    return rc;
-}
diff --git a/libs/axf/align-local_ref_start.c b/libs/axf/align-local_ref_start.c
deleted file mode 100644
index 17a5af2..0000000
--- a/libs/axf/align-local_ref_start.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-#include <insdc/insdc.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <bitstr.h>
-
-#include "ref-tbl.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-typedef struct LocalRefStart LocalRefStart;
-struct LocalRefStart
-{
-    uint32_t max_seq_len;
-};
-
-static
-void CC LocalRefStartWhack ( void *obj )
-{
-    LocalRefStart * self = obj;
-    if ( self != NULL )
-    {
-        free ( self );
-    }
-}
-
-static
-rc_t LocalRefStartMake ( LocalRefStart **objp, const VTable *tbl, const VCursor *native_curs )
-{
-    rc_t rc;
-
-    /* create the object */
-    LocalRefStart *obj = malloc( sizeof * obj );
-    if ( obj == NULL )
-    {
-        rc = RC( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        const VCursor *curs = NULL;
-
-        /* open the reference table cursor*/
-        rc = AlignRefTableCursor( tbl, native_curs, &curs, NULL );
-        if ( rc == 0 )
-        {
-            uint32_t itmp;
-            rc = VCursorAddColumn( curs, &itmp, "(U32)MAX_SEQ_LEN" );
-            if (  rc == 0 || GetRCState( rc ) == rcExists )
-            {
-                const void *base;
-                uint32_t row_len;
-                rc = VCursorCellDataDirect( curs, 1, itmp, NULL, &base, NULL, &row_len );
-                if( rc == 0 )
-                {
-                    assert( row_len == 1 );
-                    memcpy( &obj->max_seq_len, base, 4 );
-                }
-            }
-
-            if ( GetRCObject( rc ) == ( enum RCObject ) rcColumn && GetRCState( rc ) == rcNotFound )
-            {
-                obj->max_seq_len = 0;
-                rc = 0;
-            }
-
-            VCursorRelease( curs );
-
-            if ( rc == 0 )
-            {
-                *objp = obj;
-                return 0;
-            }
-        }
-        free ( obj );
-    }
-    return rc;
-}
-
-
-/*
- function INSDC:coord:zero NCBI:align:local_ref_start ( U64 global_ref_start )
- */
-static
-rc_t CC align_local_ref_start ( void *data, const VXformInfo *info, void *Dst, const void *Src, uint64_t elem_count )
-{
-    LocalRefStart const *self = ( void const * )data;
-    INSDC_coord_zero *dst=Dst;
-    uint64_t const *global_ref_start = Src;
-    unsigned i;
-    
-    for ( i = 0; i != elem_count; ++i )
-    {
-        dst[ i ] = global_ref_start[ i ] % self->max_seq_len;
-    }
-    return 0;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_local_ref_start, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    LocalRefStart *fself;
-    rc_t rc = LocalRefStartMake ( & fself, info -> tbl, (const VCursor*)info->parms  );
-    if ( rc == 0 )
-    {
-        rslt -> self = fself;
-        rslt -> whack = LocalRefStartWhack;
-        rslt -> u . af = align_local_ref_start;
-        rslt -> variant = vftArray;
-    }
-
-    return rc;
-}
diff --git a/libs/axf/align-ref-name.c b/libs/axf/align-ref-name.c
deleted file mode 100644
index a401ccc..0000000
--- a/libs/axf/align-ref-name.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-#include <insdc/insdc.h>
-#include <klib/data-buffer.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <bitstr.h>
-
-#include "ref-tbl.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-#ifdef _DEBUGGING
-#define SUB_DEBUG(msg) DBGMSG(DBG_SRA,DBG_FLAG(DBG_SRA_SUB),msg)
-#else
-#define SUB_DEBUG(msg)
-#endif
-
-
-typedef struct RefName RefName;
-struct RefName
-{
-    const VCursor *curs;
-    uint32_t name_idx;
-};
-
-static
-void CC RefNameWhack ( void *obj )
-{
-    RefName * self = obj;
-    if ( self != NULL )
-    {
-        VCursorRelease ( self -> curs );
-        free ( self );
-    }
-}
-
-static
-rc_t RefNameMake ( RefName **objp, const VTable *tbl, const VCursor *native_curs )
-{
-    rc_t rc;
-
-    /* create the object */
-    RefName *obj = malloc ( sizeof * obj );
-    if ( obj == NULL )
-    {
-        rc = RC( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        obj->curs = NULL;
-        
-        SUB_DEBUG( ( "SUB.Make in 'align-ref-name.c'\n" ) );
-
-        /* open the reference cursor */
-        rc = AlignRefTableCursor( tbl, native_curs, &obj->curs, NULL );
-        if ( rc == 0 )
-        {
-            /* add columns to cursor */
-            rc = VCursorAddColumn( obj->curs, &obj->name_idx, "(utf8)REF_NAME" );
-            if ( GetRCObject( rc ) == ( enum RCObject )rcColumn && GetRCState( rc ) == rcNotFound )
-            {
-                rc = VCursorAddColumn( obj->curs, &obj->name_idx, "(utf8)NAME" );
-            }
-            if ( GetRCState( rc ) == rcExists )
-            {
-                rc = 0;
-            }
-            if ( rc == 0 )
-            {
-                *objp = obj;
-                return 0;
-            }
-            VCursorRelease ( obj -> curs );
-        }
-        free ( obj );
-    }
-    return rc;
-}
-
-
-enum align_ref_name_args {
-    REF_ID
-};
-
-/*
- function ascii NCBI:align:ref_name ( I64 ref_id );
-*/
-static
-rc_t CC align_ref_name ( void *data, const VXformInfo *info,
-    int64_t row_id, VRowResult *rslt, uint32_t argc, const VRowData argv[] )
-{
-    rc_t rc;
-    RefName const *self = ( void const * )data;
-    char const *name = NULL;
-    uint32_t name_len;
-
-    /* get start and length of reference segment */
-    int64_t const *ref_id = argv[REF_ID].u.data.base;
-
-    if ( argv[ REF_ID ].u.data.elem_count == 0 )
-    {
-        rc = RC( rcAlign, rcFunction, rcExecuting, rcRow, rcNotFound );
-    }
-    else
-    {
-        assert( argv[ REF_ID ].u.data.elem_bits == sizeof( *ref_id ) * 8 );
-
-        ref_id += argv[ REF_ID ].u.data.first_elem;
-        
-        SUB_DEBUG( ( "SUB.Rd in 'align-ref-name.c' at #%lu\n", ref_id[ 0 ] ) );
-
-        rc = VCursorCellDataDirect( self->curs, ref_id[ 0 ], self->name_idx, NULL, (void const **)&name, NULL, &name_len );
-    }
-    
-    if ( GetRCState( rc ) == rcNotFound && GetRCObject( rc ) == rcRow )
-    {
-        name = "";
-        name_len = 0;
-    }
-    else if ( rc != 0 )
-    {
-        return rc;
-    }
-
-    rc = KDataBufferCast( rslt->data, rslt->data, sizeof( name[ 0 ] ) * 8, true );
-    if ( rc != 0 )
-        return rc;
-
-    rc = KDataBufferResize( rslt->data, name_len );
-    if ( rc != 0 )
-        return rc;
-    
-    memcpy( rslt->data->base, name, sizeof( name[ 0 ] ) * name_len );
-    rslt->elem_count = name_len;
-    rslt->elem_bits = sizeof( name[ 0 ] ) * 8;
-
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_ref_name, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    RefName *fself;
-    rc_t rc = RefNameMake ( & fself, info -> tbl, ( const VCursor* )info->parms  );
-    if ( rc == 0 )
-    {
-        rslt -> self = fself;
-        rslt -> whack = RefNameWhack;
-        rslt -> u . rf = align_ref_name;
-        rslt -> variant = vftRow;
-    }
-
-    return rc;
-}
diff --git a/libs/axf/align-ref-pos.c b/libs/axf/align-ref-pos.c
deleted file mode 100644
index 22b0760..0000000
--- a/libs/axf/align-ref-pos.c
+++ /dev/null
@@ -1,299 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-#include <insdc/insdc.h>
-#include <klib/data-buffer.h>
-#include <klib/container.h>
-#include <klib/rc.h>
-#include <klib/debug.h>
-#include <sysalloc.h>
-
-#include <bitstr.h>
-
-#include "ref-tbl.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#ifdef _DEBUGGING
-#define SUB_DEBUG(msg) DBGMSG(DBG_SRA,DBG_FLAG(DBG_SRA_SUB),msg)
-#else
-#define SUB_DEBUG(msg)
-#endif
-
-typedef struct RefPos RefPos;
-
-struct RefPos
-{
-    const VCursor *curs;
-    uint32_t name_idx;
-    uint32_t name_range_idx;
-    uint32_t max_seq_len;
-/***** cache ****/
-    BSTree   tr_range; /** region tree ***/
-};
-
-typedef struct {
-    int64_t start_id;
-    int64_t stop_id;
-}RowRange;
-
-typedef struct {
-    BSTNode  n;
-    RowRange rr;
-}BSTRowRange;
-
-
-static
-int64_t CC row_range_cmp ( const void *a, const BSTNode *b )
-{
-	const int64_t  *key=a;
-	const BSTRowRange *node = ( const BSTRowRange* ) b;
-	if ( key[ 0 ] < node->rr.start_id ) return -1;
-	if ( key[ 0 ] > node->rr.stop_id ) return +1;
-	return 0;
-}
-
-static
-int64_t CC row_range_sort( const BSTNode *a, const BSTNode *b )
-{
-    const BSTRowRange * item = ( const BSTRowRange* ) a;
-    const BSTRowRange * node = ( const BSTRowRange* ) b;
-    return item->rr.start_id < node->rr.start_id ?
-        -1 : item->rr.start_id > node->rr.start_id;
-}    
-
-
-static
-void CC bst_range_free ( BSTNode *n, void *ignore )
-{
-    free( n );
-}
-
-
-static
-void CC RefPosWhack ( void *obj )
-{
-    RefPos * self = obj;
-    if ( self != NULL )
-    {
-    	BSTreeWhack( &self->tr_range, bst_range_free, NULL );
-        VCursorRelease ( self -> curs );
-        free ( self );
-    }
-}
-
-static
-rc_t RefPosMake ( RefPos **objp, const VTable *tbl, const VCursor *native_curs )
-{
-    rc_t rc;
-
-    /* create the object */
-    RefPos *obj = malloc ( sizeof * obj );
-    if ( obj == NULL )
-    {
-        rc = RC( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        obj->curs=NULL;
-        BSTreeInit( &obj->tr_range );
-        /* open the reference table cursor*/
-
-        SUB_DEBUG( ( "SUB.Make in 'align-ref-pos.c'\n" ) );
-	  
-        rc = AlignRefTableCursor( tbl, native_curs, &obj->curs, NULL );
-        if ( rc == 0 )
-        {
-            uint32_t itmp;
-            rc = VCursorAddColumn( obj->curs, &itmp, "(U32)MAX_SEQ_LEN" );
-            if ( ( rc == 0 ) || GetRCState( rc ) == rcExists )
-            {
-                const void * base;
-                uint32_t row_len;
-                rc = VCursorCellDataDirect( obj->curs, 1, itmp, NULL, &base, NULL, &row_len );
-                if ( rc == 0 )
-                {
-                    assert( row_len == 1 );
-                    memcpy( &obj->max_seq_len, base, 4 );
-                }
-            }
-
-            if ( GetRCObject( rc ) == ( enum RCObject )rcColumn && GetRCState( rc ) == rcNotFound )
-            {
-                /*** no MAX_SEQ_LEN means that REF_POS==REF_START **/
-                VCursorRelease( obj->curs );
-                obj->curs = NULL;
-                obj->max_seq_len = 0;
-                obj->name_range_idx = 0;
-                obj->name_idx = 0;
-                rc = 0;
-            }
-            else if ( rc == 0 )
-            {
-                /* add columns to cursor */
-                rc = VCursorAddColumn( obj->curs, &obj->name_idx, "(utf8)NAME" );
-                if ( rc == 0 || GetRCState( rc ) == rcExists )
-                {
-                    rc = VCursorAddColumn( obj->curs, &obj->name_range_idx, "NAME_RANGE" );
-                }
-                if ( GetRCState( rc ) == rcExists )
-                {
-                    rc = 0;
-                }
-            }
-        }
-
-        if ( rc == 0 )
-        {
-            *objp = obj;
-        }
-        else
-        {
-            VCursorRelease( obj->curs );
-            free( obj );
-        }
-    }
-
-    return rc;
-}
-
-enum align_ref_pos_args {
-    REF_ID,
-    REF_START,
-    REF_PLOIDY,
-    PLOIDY
-};
-
-
-/*
-function INSDC:coord:zero NCBI:align:ref_pos ( I64 ref_id, INSDC:coord:zero ref_start );
-*/
-static
-rc_t CC align_ref_pos ( void *data, const VXformInfo *info,
-    int64_t row_id, VRowResult *rslt, uint32_t argc, const VRowData argv[] )
-{
-    rc_t rc = 0;
-    RefPos const *self = ( void const * )data;
-    int64_t ref_row_id = 0;
-    INSDC_coord_zero *ref_pos;
-    unsigned const ploidy = ( unsigned const )argv[ REF_START ].u.data.elem_count;
-    unsigned i;
-
-    /* get start and length of reference segment */
-    int64_t const *ref_id = 0;
-    INSDC_coord_zero const *ref_start;
-
-    assert( argv[ REF_ID ].u.data.elem_bits == sizeof( *ref_id ) * 8 );
-    assert( argv[ REF_START ].u.data.elem_bits == sizeof( *ref_start ) * 8 );
-
-    ref_start = argv[ REF_START ].u.data.base;
-    ref_start += argv[ REF_START ].u.data.first_elem;
-
-    if ( self->curs != NULL )
-    {
-        char const *name = NULL;
-        uint32_t name_len;
-        BSTRowRange *brr;
-
-        ref_id = argv[ REF_ID ].u.data.base;
-        ref_id += argv[ REF_ID ].u.data.first_elem;
-
-        brr = ( BSTRowRange * )BSTreeFind( &self->tr_range, &ref_id[ 0 ], row_range_cmp );
-        if ( brr == NULL )
-        {
-            RowRange *new_rr;
-
-            SUB_DEBUG( ( "SUB.Rd in 'align-ref-pos.c' at #%lu\n", ref_id[ 0 ] ) );
-
-            rc = VCursorCellDataDirect( self->curs, ref_id[ 0 ], self->name_idx, NULL, (void const **)&name, NULL, &name_len );
-            if ( rc != 0 )
-                return rc;
-
-            rc = VCursorParamsSet( ( struct VCursorParams const * )self->curs, "QUERY_SEQ_NAME", "%.*s", name_len, name );
-            if ( rc != 0 )
-                return rc;
-
-            rc = VCursorCellDataDirect( self->curs, ref_id[ 0 ], self->name_range_idx, NULL, (void const **)&new_rr, NULL, NULL );
-            if ( rc != 0 )
-                return rc;
-
-            brr = malloc( sizeof( *brr ) );
-            if ( brr == NULL )
-            {
-                return RC( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-            }
-            else
-            {
-                memcpy( &brr->rr, new_rr, sizeof( *new_rr ) );
-                BSTreeInsert( ( BSTree* )&self->tr_range, ( BSTNode* )brr, row_range_sort );
-            }
-        }
-        ref_row_id = brr->rr.start_id;
-    }
-
-    rc = KDataBufferResize( rslt->data, ploidy );
-    if ( rc != 0 )
-        return rc;
-    
-    ref_pos = rslt->data->base;
-    for ( i = 0; i != ploidy; ++i )
-    {
-        ref_pos[ i ] = ref_start[ i ];
-        if ( self->curs != NULL )
-        {
-            ref_pos[ i ] += ( INSDC_coord_zero )( ( ref_id[ 0 ] - ref_row_id ) * self->max_seq_len );
-        }
-    }
-    rslt->elem_count = ploidy;
-    rslt->elem_bits = sizeof( ref_pos[ 0 ] ) * 8;
-
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_ref_pos, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    RefPos *fself;
-    rc_t rc = RefPosMake( &fself, info -> tbl, ( const VCursor* )info->parms );
-    if ( rc == 0 )
-    {
-        rslt -> self = fself;
-        rslt -> whack = RefPosWhack;
-        rslt -> u . rf = align_ref_pos;
-        rslt -> variant = vftRowFast;
-    }
-
-    return rc;
-}
diff --git a/libs/axf/align-ref-seq-id.c b/libs/axf/align-ref-seq-id.c
deleted file mode 100644
index 6afe3f3..0000000
--- a/libs/axf/align-ref-seq-id.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-#include <insdc/insdc.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <klib/debug.h>
-#include <sysalloc.h>
-
-#include <bitstr.h>
-
-#include "ref-tbl.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#ifdef _DEBUGGING
-#define SUB_DEBUG(msg) DBGMSG(DBG_SRA,DBG_FLAG(DBG_SRA_SUB),msg)
-#else
-#define SUB_DEBUG(msg)
-#endif
-
-
-typedef struct RefSeqID RefSeqID;
-struct RefSeqID
-{
-    const VCursor *curs;
-    uint32_t seqID_idx;
-};
-
-static
-void CC RefSeqIDWhack ( void *obj )
-{
-    RefSeqID * self = obj;
-    if ( self != NULL )
-    {
-        VCursorRelease ( self -> curs );
-        free ( self );
-    }
-}
-
-static
-rc_t RefSeqIDMake ( RefSeqID **objp, const VTable *tbl, const VCursor *native_curs )
-{
-    rc_t rc;
-
-    /* create the object */
-    RefSeqID *obj = malloc ( sizeof * obj );
-    if ( obj == NULL )
-    {
-        rc = RC( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        obj->curs=NULL;
-
-        SUB_DEBUG( ( "SUB.Make in 'align_ref_seq_id.c'\n" ) );
-
-        /* open the reference cursor */
-        rc = AlignRefTableCursor( tbl, native_curs, &obj->curs, NULL );
-        if ( rc == 0 )
-        {
-            /* add columns to cursor */
-            rc = VCursorAddColumn( obj->curs, &obj->seqID_idx, "SEQ_ID" );
-            if ( GetRCObject( rc ) == ( enum RCObject ) rcColumn && GetRCState( rc ) == rcNotFound )
-            {
-                rc = VCursorAddColumn( obj->curs, &obj->seqID_idx, "REF_SEQ_ID" );
-            }
-            
-            if ( GetRCState( rc ) == rcExists )
-            {
-                rc = 0;
-            }
-
-            if ( rc == 0 )
-            {
-                *objp = obj;
-                return 0;
-            }
-
-            VCursorRelease ( obj -> curs );
-        }
-        free ( obj );
-    }
-    return rc;
-}
-
-enum align_ref_name_args {
-    REF_ID
-};
-
-/*
- function ascii NCBI:align:ref_seq_id ( I64 ref_id );
-*/
-static
-rc_t CC align_ref_seq_id ( void *data, const VXformInfo *info,
-    int64_t row_id, VRowResult *rslt, uint32_t argc, const VRowData argv[] )
-{
-    rc_t rc;
-    RefSeqID const *self = ( void const * )data;
-    char const *name = NULL;
-    uint32_t name_len;
-
-    /* get start and length of reference segment */
-    int64_t const *ref_id = argv[REF_ID].u.data.base;
-
-    assert( argv[ REF_ID ].u.data.elem_bits == sizeof( *ref_id ) * 8) ;
-
-    if ( self->curs == NULL || argv[ REF_ID ].u.data.elem_count == 0 )
-    {
-        rslt->elem_count = 0;
-        return 0;
-    }
-
-    ref_id += argv[ REF_ID] .u.data.first_elem;
-
-    SUB_DEBUG( ( "SUB.Rd in 'align_ref_seq_id.c' at #%lu\n", ref_id[ 0 ] ) );
-    
-    rc = VCursorCellDataDirect( self->curs, ref_id[ 0 ], self->seqID_idx, NULL, (void const **)&name, NULL, &name_len );
-    if ( GetRCState( rc ) == rcNotFound && GetRCObject( rc ) == rcRow )
-    {
-        name = "";
-        name_len = 0;
-    }
-    else if ( rc != 0 )
-    {
-        return rc;
-    }
-
-    rc = KDataBufferCast( rslt->data, rslt->data, sizeof( name[ 0 ] ) * 8, true );
-    if ( rc != 0 )
-        return rc;
-
-    rc = KDataBufferResize( rslt->data, name_len );
-    if ( rc != 0 )
-        return rc;
-    
-    memcpy( rslt->data->base, name, sizeof( name[ 0 ] ) * name_len );
-    rslt->elem_count = name_len;
-    rslt->elem_bits = sizeof( name[ 0 ] ) * 8;
-    return rc;
-}
-
-VTRANSFACT_IMPL ( NCBI_align_ref_seq_id, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    RefSeqID *fself;
-    rc_t rc = RefSeqIDMake ( & fself, info -> tbl, (const VCursor*)info->parms  );
-    if ( rc == 0 )
-    {
-        rslt -> self = fself;
-        rslt -> whack = RefSeqIDWhack;
-        rslt -> u . rf = align_ref_seq_id;
-        rslt -> variant = vftRow;
-    }
-
-    return rc;
-}
diff --git a/libs/axf/align-restore-read.c b/libs/axf/align-restore-read.c
deleted file mode 100644
index c43f521..0000000
--- a/libs/axf/align-restore-read.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <insdc/insdc.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-
-
-static
-rc_t CC align_restore_read_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    int mmi, roi, rri, di, bi;
-    const INSDC_4na_bin	*ref_read 	= argv[ 0 ].u.data.base;
-    const uint32_t	ref_read_len 	= (uint32_t)argv[ 0 ].u.data.elem_count;
-    const uint8_t	*has_mismatch	= argv[ 1 ].u.data.base;
-    const uint32_t	has_mismatch_len= (uint32_t)argv[ 1 ].u.data.elem_count;
-    const INSDC_4na_bin *mismatch	= argv[ 2 ].u.data.base;
-    const uint32_t	mismatch_len	= (uint32_t)argv[ 2 ].u.data.elem_count;
-    const uint8_t	*has_ref_offset	   = argv[ 3 ].u.data.base;
-    const uint32_t	has_ref_offset_len = (uint32_t)argv[ 3 ].u.data.elem_count;
-    const int32_t 	*ref_offset	= argv[ 4 ].u.data.base;
-    const uint32_t	ref_offset_len  = (uint32_t)argv[ 4 ].u.data.elem_count;
-    uint32_t ploidy = 1, rl;
-    const INSDC_coord_len* read_len = &has_mismatch_len;
-
-    INSDC_4na_bin *dst;
-    uint32_t	dst_len;
-    
-    assert( argv[ 0 ].u.data.elem_bits == 8 );
-    assert( argv[ 1 ].u.data.elem_bits == 8 );
-    assert( argv[ 2 ].u.data.elem_bits == 8 );
-    assert( argv[ 3 ].u.data.elem_bits == 8 );
-    assert( argv[ 4 ].u.data.elem_bits == 32 );
-
-    ref_read	   += argv [ 0 ] . u . data . first_elem;
-    has_mismatch   += argv [ 1 ] . u . data . first_elem;
-    mismatch	   += argv [ 2 ] . u . data . first_elem;
-    has_ref_offset += argv [ 3 ] . u . data . first_elem;
-    ref_offset     += argv [ 4 ] . u . data . first_elem;
-
-    if ( has_mismatch_len != has_ref_offset_len )
-		return RC( rcXF, rcFunction, rcExecuting, rcData, rcInconsistent );
-
-    if ( argc > 5 )
-    {
-        assert( argv[ 5 ].u.data.elem_bits == 32 );
-        ploidy = (uint32_t)argv[ 5 ].u.data.elem_count;
-        read_len = argv[ 5 ].u.data.base;
-        read_len += argv[ 5 ].u.data.first_elem;
-    }
-    dst_len = has_mismatch_len;
-
-    /* resize output row for the total number of reads */    
-    rslt -> data -> elem_bits = 8;
-    rc = KDataBufferResize ( rslt -> data, dst_len );
-    if ( rc != 0 ) return rc;
-    rslt -> elem_count = dst_len;
-    dst = rslt -> data -> base;
-
-    /**** MAIN RESTORATION LOOP ***/
-    for ( mmi = roi = rri = di = bi = 0, rl = 1; di < (int)dst_len; di++, rri++, rl++, bi++ )
-    {
-        if ( has_ref_offset[ di ] && bi >= 0 ) /** bi can only become negative on Bs; skip has_ref_offset if Bs are not exhausted ***/
-        {
-            if ( roi >= (int)ref_offset_len )
-                return RC( rcXF, rcFunction, rcExecuting, rcData, rcInconsistent );
-            memcpy ( & bi, ref_offset + roi, sizeof bi );
-            rri += bi; /** can lead to negative rri ***/                
-            roi++;
-        }
-
-        if ( has_mismatch[ di ] )
-        {
-            if ( mmi >= (int)mismatch_len )
-                return RC( rcXF, rcFunction, rcExecuting, rcData, rcInconsistent );
-            dst[ di ] = mismatch[ mmi ];
-            mmi++;
-        }
-        else
-        {
-            if ( rri < 0 || rri >= (int)ref_read_len ) /*** can not have match after rolling back off the right edge ***/
-            {
-                return RC( rcXF, rcFunction, rcExecuting, rcData, rcInconsistent );
-            }
-            dst[ di ] = ref_read[ rri ];
-        }
-
-        if ( ploidy > 1 && rl == read_len[ 0 ] )
-        {
-            rri = -1;
-            rl = 0;
-            ploidy--;
-            read_len++;
-        }
-    }
-    return 0;
-}
-
-
-/* 
- * function
- * INSDC:4na:bin ALIGN:align_restore_read #1( INSDC:4na:bin ref_read, bool has_mismatch, INSDC:4na:bin mismatch, bool has_ref_offset, I32 ref_offset);
- */
-VTRANSFACT_IMPL ( ALIGN_align_restore_read, 1, 0, 1 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-
-    rslt->u.rf = align_restore_read_impl;
-    rslt->variant = vftRow;
-    rslt -> whack = NULL;
-    return 0;
-}
diff --git a/libs/axf/cigar.c b/libs/axf/cigar.c
deleted file mode 100644
index b9f2425..0000000
--- a/libs/axf/cigar.c
+++ /dev/null
@@ -1,2578 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-#include <klib/printf.h>
-
-#include <klib/out.h>
-
-#include <align/align.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <os-native.h>
-
-#include <insdc/insdc.h>
-
-#define ARG_BASE(TYPE, N) (((TYPE const *)argv[(N)].u.data.base) + argv[(N)].u.data.first_elem)
-#define ARG_ALIAS(TYPE, NAME, N) TYPE const *const NAME = ARG_BASE(TYPE, N)
-#define ARG_ALIAS_COND(TYPE, NAME, N, ALT) TYPE const *const NAME = ((argc > (N)) ? ARG_BASE(TYPE, N) : ALT)
-
-typedef struct {
-    int version;
-} self_t;
-
-static
-rc_t op2b( KDataBuffer *dst, unsigned const offset, unsigned *const count, int const opcode, unsigned oplen )
-{
-    unsigned digits = 1;
-    unsigned scale = 10;
-    
-    if ( oplen == 0 )
-    {
-        *count = 0;
-        return 0;
-    }
-
-    while ( scale < oplen )
-    {
-        scale *= 10;
-        ++digits;
-    }
-
-    if ( scale == oplen ) /* oplen is whole power of 10 */
-        ++digits;
-
-    *count = digits + 1;
-    
-    if ( dst != NULL )
-    {
-        unsigned const need = offset + digits + 1;
-        
-        if ( need > dst->elem_count )
-        {
-            rc_t rc = KDataBufferResize( dst, need );
-            if ( rc != 0 ) return rc;
-        }
-
-        {
-            char *const base = &( ( char * )dst->base )[ offset ];
-            
-            base[ digits ] = opcode;
-            do
-            {
-                unsigned const digit = oplen % 10;
-                
-                oplen /= 10;
-                base[ --digits ] = digit + '0';
-            } while ( digits );
-        }
-    }
-    return 0;
-}
-
-
-static
-rc_t cigar_string(KDataBuffer *dst, size_t boff,
-                  INSDC_coord_len *const bsize, bool const full,
-                  bool const has_mismatch[], bool const has_ref_offset[],
-                  INSDC_coord_zero const read_start, INSDC_coord_zero const read_end,
-                  int32_t const ref_offset[], unsigned const ro_len, unsigned *ro_offset)
-{
-    size_t bsz = 0;
-    unsigned nwrit;
-    uint32_t i, m, mm;
-    rc_t rc;
-    unsigned cur_off = ro_offset ? *ro_offset : 0;
-    
-#define BUF_WRITE(OP, LEN) if ((rc = op2b(dst, (unsigned const)(bsz + boff), &nwrit, (int const)(OP), (unsigned)(LEN))) != 0) return rc; bsz += nwrit;
-
-#define MACRO_FLUSH_MATCH    { BUF_WRITE('=', m); m = 0; }
-#define MACRO_FLUSH_MISMATCH { BUF_WRITE(i == read_end ? 'S' : 'X', mm); mm = 0; }
-
-#define MACRO_FLUSH_BOTH \
-if(m+mm > 0) { \
-    if(i==read_end && has_ref_offset[i]) { \
-        BUF_WRITE('M', m); BUF_WRITE('S', mm); \
-    } else { \
-        BUF_WRITE('M', m + mm) \
-    } \
-    m=mm=0; \
-}
-
-#define MACRO_FLUSH \
-if(full){ \
-    MACRO_FLUSH_MATCH; \
-    MACRO_FLUSH_MISMATCH; \
-} else { \
-    MACRO_FLUSH_BOTH; \
-}
-
-    for( i = read_start, bsz = m = mm = 0; i < (uint32_t)read_end; i++ )
-    {
-        if( has_ref_offset[ i ] ) /*** No offset in the reference **/
-        {
-            int32_t offset;
-            
-            if ( cur_off >= ro_len ) /*** bad data ***/
-                return RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-            
-            offset = ref_offset[ cur_off++ ];
-            
-            if( offset > 0 ) /*** insert in the reference, delete in sequence ***/
-            {
-                if ( i == 0 ) /**** deletes in the beginning are disallowed, REF_START should have been moved and delete converted to insert **/
-                    return RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-                MACRO_FLUSH;
-                BUF_WRITE( 'D', offset );
-            }
-            else if ( offset < 0 ) /**** delete from the reference ***/
-            {
-                offset = -offset;
-                if ( i + offset > (uint32_t)read_end )
-                    return RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-                if ( i > 0 ) /** normally indels are before the current base ***/
-                {
-                    MACRO_FLUSH;
-                    BUF_WRITE( 'I', offset );
-                }
-                else
-                { /***  this  is a soft clip at the beginning ***/
-                    BUF_WRITE( 'S', offset );
-                }
-                i += offset;
-            }
-            else
-            { /*** Not possible ??? ***/
-                return RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-            }
-        }
-
-        if ( i < (uint32_t)read_end )
-        {
-            if ( has_mismatch[ i ] )
-            {
-                if ( full )
-                {
-                    MACRO_FLUSH_MATCH;
-                }
-                mm++;
-            }
-            else
-            {
-                if ( full )
-                {
-                    MACRO_FLUSH_MISMATCH;
-                }
-                else
-                {
-                    m += mm;
-                    mm = 0;
-                }
-                m++;
-            }
-        }
-    }
-    MACRO_FLUSH;
-    *bsize = (INSDC_coord_len)bsz;
-    if ( ro_offset )
-        *ro_offset = cur_off;
-    return 0;
-    
-#undef BUF_WRITE
-#undef MACRO_FLUSH_MATCH
-#undef MACRO_FLUSH_MISMATCH
-#undef MACRO_FLUSH_BOTH
-#undef MACRO_FLUSH
-}
-
-typedef struct {
-    int opcode_M, opcode_X, opcode_S;
-} cigar_opcode_options_t;
-
-static
-rc_t cigar_string_2_0(KDataBuffer *dst,
-                      size_t boff,
-                      INSDC_coord_len *const bsize,
-                      bool const has_mismatch[],
-                      bool const has_ref_offset[],
-                      INSDC_coord_zero const read_start,
-                      INSDC_coord_zero const read_end,
-                      int32_t const ref_offset[],
-                      unsigned const ro_len,
-                      unsigned ro_offset[],
-                      unsigned const reflen,
-                      cigar_opcode_options_t const *ops)
-{
-    int ri;
-    unsigned si;
-    unsigned di;
-    rc_t rc;
-    unsigned nwrit;
-    unsigned cur_off = ro_offset ? *ro_offset : 0;
-    unsigned op_len;
-    int opcode;
-    
-#define BUF_WRITE(OP, LEN) { if ((rc = op2b(dst, (unsigned const)(di + boff), &nwrit, (int const)(OP), (unsigned)(LEN))) != 0) return rc; di += nwrit; }
-    si = read_start;
-    if ( /* !use_S && */ read_start == read_end && reflen > 0 ) /** full delete as a last ploidy ends up written nowhere  **/
-    {
-        di=0;
-        opcode = 'D';
-        op_len = reflen;
-    }
-    else for ( op_len = di = 0, opcode = ri = 0; si < ( unsigned )read_end && ri <= ( int )reflen; )
-    {
-        if ( has_ref_offset[ si ] )
-        {
-            int offs;
-            
-            if ( op_len > 0 )
-            {
-                BUF_WRITE( opcode, op_len );
-                op_len = 0;
-            }
-            if ( cur_off >= ro_len ) /*** bad data ***/
-                return RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-            
-            offs = ref_offset[ cur_off++ ];
-            if ( offs < 0 )
-            {
-                unsigned j;
-                for ( j = 1; j < (unsigned)-offs && ( si + j ) < ( unsigned )read_end; )
-                {
-                    if ( has_ref_offset[ si + j ] ) /*** structured insert **/
-                    {
-                        BUF_WRITE( si ? 'I' : ops->opcode_S, j );
-                        offs += j;
-                        si   += j;
-                        j = 1;
-                    }
-                    else
-                    {
-                        j++;
-                    }
-                }
-                if ( offs < 0 )
-                {
-                    BUF_WRITE( si ? 'I' : ops->opcode_S, -offs );
-                    si -= offs;
-                }
-                continue;
-            }
-            else if ( offs > 0 )
-            {
-                BUF_WRITE( 'D', offs );
-                ri += offs;
-            }
-            else
-                return RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-        }
-        
-        if ( ri < ( int )reflen )
-        {
-            int const op_nxt = ( has_mismatch[ si ] ? ops->opcode_X : ops->opcode_M );
-            
-            if ( op_len == 0 || opcode == op_nxt )
-                ++op_len;
-            else
-            {
-                BUF_WRITE( opcode, op_len );
-                op_len = 1;
-            }
-            opcode = op_nxt;
-        }
-        else
-            break;
-        ++si;
-        ++ri;
-    }
-    
-    BUF_WRITE( opcode, op_len );
-    if ( si < (unsigned)read_end )
-    {
-        if ( cur_off + 1 < ro_len )
-        {
-            assert( read_end + ref_offset[ cur_off ] == si );
-            cur_off++;
-            BUF_WRITE( 'I', read_end - si );
-        }
-        else
-        {
-            BUF_WRITE( ops->opcode_S, read_end - si );
-        }
-    }
-    *bsize = di;
-    if ( ro_offset != NULL )
-        *ro_offset = cur_off;
-    
-    return 0;
-#undef BUF_WRITE
-}
-
-static
-rc_t cigar_string_2(KDataBuffer *dst, size_t boff,
-                    INSDC_coord_len *bsize, const int version,
-                    bool const has_mismatch[], bool const has_ref_offset[],
-                    INSDC_coord_zero const read_start, INSDC_coord_zero const read_end,
-                    int32_t const ref_offset[], unsigned const ro_len, unsigned * ro_offset,
-                    unsigned const reflen, bool use_S)
-{
-    cigar_opcode_options_t const ops = {
-        version == 1 ? '=' : 'M',
-        version == 1 ? 'X' : 'M',
-        use_S ? 'S' : 'I'
-    };
-    return cigar_string_2_0(dst, boff, bsize, has_mismatch, has_ref_offset, read_start, read_end, ref_offset, ro_len, ro_offset, reflen, &ops);
-}
-
-static
-rc_t cigar_string_2_1(KDataBuffer *dst, size_t boff,
-                      INSDC_coord_len *bsize, const int version,
-                      bool const has_mismatch[], bool const has_ref_offset[],
-                      INSDC_coord_zero const read_start, INSDC_coord_zero const read_end,
-                      int32_t const ref_offset[], unsigned const ro_len, unsigned ro_offset[],
-                      uint8_t const ref_offset_type[],
-                      unsigned const reflen)
-{
-    int ri;
-    unsigned si = read_start;
-    unsigned di;
-    rc_t rc;
-    unsigned nwrit;
-    unsigned cur_off = ro_offset ? *ro_offset : 0;
-    unsigned op_len;
-    int opcode;
-    int const opM = (version & 1) ? '=' : 'M';
-    int const opX = (version & 1) ? 'X' : 'M';
-    
-#define BUF_WRITE(OP, LEN) { if ((rc = op2b(dst, (unsigned const)(di + boff), &nwrit, (int const)(OP), (unsigned)(LEN))) != 0) return rc; di += nwrit; }
-    if (read_start == read_end && reflen > 0) {
-        /** full delete as a last ploidy ends up written nowhere  **/
-        di = 0;
-        opcode = 'D';
-        op_len = reflen;
-    }
-    else for (op_len = di = 0, opcode = ri = 0; si < (unsigned)read_end && ri <= (int)reflen; ) {
-        if (has_ref_offset[si]) {
-            int offs;
-            int type;
-            
-            if (op_len > 0) {
-                BUF_WRITE(opcode, op_len);
-                op_len = 0;
-            }
-            if (cur_off >= ro_len) /*** bad data ***/
-                return RC(rcXF, rcFunction, rcExecuting, rcData, rcInvalid);
-            
-            type = ref_offset_type[cur_off];
-            offs = ref_offset[cur_off];
-            ++cur_off;
-            
-            if (offs < 0) {
-		unsigned const ins = -offs;
-		if( (version & 1) /*CIGAR_LONG*/ && type == 5 /** complete genomics **/ && ri >= ins /** safety **/){
-			BUF_WRITE('B', ins);
-			ri -= ins;
-		} else {
-			int const opc = (type == 1) ? 'S' : 'I';
-			BUF_WRITE(opc, ins);
-			si += ins;
-			continue;
-		}
-            } else if (offs > 0) {
-                int const opc = type == 0 ? 'D' : 'N';
-                
-                BUF_WRITE(opc, offs);
-                ri += offs;
-            }
-        }
-        if (ri < (int)reflen) {
-            int const op_nxt = (has_mismatch[si] ? opX : opM);
-            
-            if (op_len == 0 || opcode == op_nxt)
-                ++op_len;
-            else {
-                BUF_WRITE(opcode, op_len);
-                op_len = 1;
-            }
-            opcode = op_nxt;
-        }
-        else
-            break;
-        ++si;
-        ++ri;
-    }
-    
-    BUF_WRITE(opcode, op_len);
-    *bsize = di;
-    if (ro_offset != NULL)
-        *ro_offset = cur_off;
-    
-    return 0;
-#undef BUF_WRITE
-}
-
-static INSDC_coord_len right_soft_clip(unsigned seq_len, unsigned ref_len,
-                                       unsigned noffsets,
-                                       int32_t const ref_offset[])
-{
-    INSDC_coord_len a = ref_len;
-    unsigned i;
-    
-    for ( i = 0; i < noffsets; ++i )
-        a -= ref_offset[ i ];
-    return a < seq_len ? seq_len - a : 0;
-}
-
-static
-rc_t CC cigar_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    self_t const *self = data;
-    unsigned const rdln   = ( unsigned const )argv[ 0 ].u.data.elem_count;
-    unsigned const ro_len = ( unsigned const )argv[ 2 ].u.data.elem_count;
-    bool const *has_mismatch   = argv[ 0 ].u.data.base;
-    bool const *has_ref_offset = argv[ 1 ].u.data.base;
-    int32_t const *ref_offset  = argv[ 2 ].u.data.base;
-    rc_t rc;
-    
-    assert( argv[ 0 ].u.data.elem_bits == 8 );
-    assert( argv[ 1 ].u.data.elem_bits == 8 );
-    assert( argv[ 2 ].u.data.elem_bits == 32 );
-
-    assert( rdln == argv[ 1 ].u.data.elem_count );
-
-    has_mismatch   += argv[ 0 ].u.data.first_elem;
-    has_ref_offset += argv[ 1 ].u.data.first_elem;
-    ref_offset     += argv[ 2 ].u.data.first_elem;
-
-    rslt->data->elem_bits = 8;
-    if ( argc == 3 )
-    {
-        INSDC_coord_len count;
-        
-        rc = cigar_string( rslt->data, 0, &count, self->version & 0x1,
-                           has_mismatch, has_ref_offset,
-                           0, rdln, ref_offset, ro_len, NULL);
-        rslt->elem_count = count;
-    }
-    else
-    {
-        int32_t const *const rfln = argv[ 3 ].u.data.base;
-        INSDC_coord_len count;
-        
-        rc = cigar_string_2( rslt->data, 0, &count, self->version & 0x1,
-                            has_mismatch, has_ref_offset,
-                            0, rdln, ref_offset, ro_len, NULL,
-                            rfln[ argv[ 3 ].u.data.first_elem ], true );
-        rslt->elem_count = count;
-    }
-    return rc;
-}
-
-static
-rc_t CC cigar_impl_2 ( void *data, const VXformInfo *info, int64_t row_id,
-                        VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    self_t const *self = data;
-    bool const *has_mismatch        = argv[0].u.data.base;
-    bool const *has_ref_offset      = argv[1].u.data.base;
-    int32_t const *ref_offset       = argv[2].u.data.base;
-    INSDC_coord_len const *read_len = argv[3].u.data.base;
-    uint8_t const *const ref_offset_type = argc >= 6 ? ((uint8_t const *)argv[5].u.data.base) + argv[5].u.data.first_elem : NULL;
-    uint32_t const nreads = (uint32_t const)argv[ 3 ].u.data.elem_count;
-    uint32_t const ro_len = (uint32_t const)argv[ 2 ].u.data.elem_count;
-    uint32_t n;
-    uint32_t ro_offset = 0;
-    rc_t rc = 0;
-    INSDC_coord_zero start;
-    INSDC_coord_len *cigar_len = NULL;
-    KDataBuffer *buf = ( self->version & 0x04 ) ? NULL : rslt->data;
-    
-    assert( argv[ 0 ].u.data.elem_bits == 8 );
-    assert( argv[ 1 ].u.data.elem_bits == 8 );
-    assert( argv[ 2 ].u.data.elem_bits == 32 );
-    assert( argv[ 3 ].u.data.elem_bits == 32 );
-    
-    has_mismatch   += argv[ 0 ].u.data.first_elem;
-    has_ref_offset += argv[ 1 ].u.data.first_elem;
-    ref_offset     += argv[ 2 ].u.data.first_elem;
-    read_len       += argv[ 3 ].u.data.first_elem;
-
-    if (self->version & 0x4) {
-        rslt->data->elem_bits = sizeof(cigar_len[0]) * 8;
-        rslt->elem_count = nreads;
-
-        rc = KDataBufferResize(rslt->data, rslt->elem_count);
-        if (rc != 0)
-            return rc;
-
-        cigar_len = rslt->data->base;
-        if (argv[0].u.data.elem_count == 0 || argv[1].u.data.elem_count == 0) {
-            memset(cigar_len, 0, sizeof(cigar_len[0]) * nreads);
-            return 0;
-        }
-    }
-    else {
-        rslt->data->elem_bits = 8;
-        rslt->elem_count = 0;
-    }
-
-    for (n = 0, start = 0, ro_offset = 0; n < nreads; start += read_len[n], ++n) {
-        INSDC_coord_len cnt;
-        INSDC_coord_len *const count = (self->version & 0x04) ? cigar_len + n : &cnt;
-        
-        if (argc == 4) {
-            rc = cigar_string(buf, (size_t)rslt->elem_count, count, self->version & 0x1,
-                              has_mismatch, has_ref_offset,
-                              start, start + read_len[n],
-                              ref_offset, ro_len, &ro_offset);
-        }
-        else if (argc == 5) {
-            int32_t const *const reflen = argv[4].u.data.base;
-            
-            rc = cigar_string_2(buf, (size_t)rslt->elem_count, count, self->version & 0x1,
-                                has_mismatch, has_ref_offset,
-                                start, start + read_len[n],
-                                ref_offset, ro_len, &ro_offset,
-                                reflen[argv[4].u.data.first_elem], nreads == 1 ? true : false);
-        }
-        else { /* should be new function */
-            int32_t const *const reflen = argv[4].u.data.base;
-            
-            rc = cigar_string_2_1(buf, (size_t)rslt->elem_count, count, self->version & 0x1,
-                                  has_mismatch, has_ref_offset,
-                                  start, start + read_len[n],
-                                  ref_offset, ro_len, &ro_offset,
-                                  ref_offset_type,
-                                  reflen[argv[4].u.data.first_elem]);
-        }
-        if (rc != 0)
-            return rc;
-        if ((self->version & 0x04) == 0)
-            rslt->elem_count += cnt;
-    }
-    return 0;
-}
-
-static
-void CC self_whack( void *ptr )
-{
-    free( ptr );
-}
-
-
-/* 
- * function
- * ascii ALIGN:cigar #1 ( bool has_mismatch, bool has_ref_offset, I32 ref_offset);
- */
-VTRANSFACT_IMPL ( ALIGN_cigar, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    self_t self;
-
-    self.version =cp -> argv [ 0 ] . data . u8 [ 0 ];
-    switch(self.version){
-    case 0:
-    case 1:
-        break;
-    default:
-        return RC ( rcXF, rcFunction, rcConstructing, rcParam, rcIncorrect );
-    }
-    rslt->u.rf = cigar_impl;
-    rslt->variant = vftRow;
-    rslt -> self = malloc ( sizeof self );
-    memcpy(rslt -> self,&self,sizeof(self));
-    rslt -> whack = self_whack;
-
-    return 0;
-}
-
-VTRANSFACT_IMPL ( ALIGN_cigar_2, 2, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    self_t self;
-    VTypedesc const return_type = info->fdesc.desc;
-    int const version = cp->argv[0].data.u8[0];
-
-    self.version = version;
-    switch (version) {
-    case 0:
-    case 1:
-        break;
-    default:
-        return RC( rcXF, rcFunction, rcConstructing, rcParam, rcIncorrect );
-    }
-
-    if (return_type.domain == vtdAscii && return_type.intrinsic_bits == 8)
-    {
-        self.version |= 0x2;
-    }
-    else if (return_type.domain == vtdUint && return_type.intrinsic_bits == sizeof(INSDC_coord_len) * 8)
-    {
-        self.version |= 0x4;
-    }
-    else
-    {
-        return RC( rcXF, rcFunction, rcConstructing, rcParam, rcIncorrect );
-    }
-
-    rslt->u.rf = cigar_impl_2;
-    rslt->variant = vftRow;
-    rslt->self = malloc(sizeof(self));
-    if (rslt->self == NULL)
-        return RC( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-
-    memcpy(rslt->self, &self, sizeof(self));
-    rslt->whack = self_whack;
-    return 0;
-}
-
-static
-rc_t CC edit_distance_impl ( void *data, const VXformInfo *info, int64_t row_id,
-                             VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    uint32_t i, roi, mrun;
-    uint32_t len = ( uint32_t ) argv[ 0 ].u.data.elem_count;
-    uint32_t *dst;
-    
-    uint8_t const *has_mismatch   = argv [ 0 ] . u . data . base;
-    uint8_t const *has_ref_offset = argv [ 1 ] . u . data . base;
-    int32_t const *ref_offset     = argv [ 2 ] . u . data . base;
-    
-    assert( argv[ 0 ].u.data.elem_bits == 8 );
-    assert( argv[ 1 ].u.data.elem_bits == 8 );
-    assert( argv[ 2 ].u.data.elem_bits == 32 );
-    
-    assert( len == argv[ 1 ].u.data.elem_count );
-    
-    has_mismatch   += argv [ 0 ] . u . data . first_elem;
-    has_ref_offset += argv [ 1 ] . u . data . first_elem;
-    ref_offset     += argv [ 2 ] . u . data . first_elem;
-    
-    /* resize output row for the total number of reads */    
-    rslt->data->elem_bits = rslt->elem_bits;
-    rc = KDataBufferResize( rslt -> data, 1 );
-    if ( rc != 0 )
-        return rc;
-    
-    rslt -> elem_count = 1;
-    dst = rslt -> data -> base;
-    dst[ 0 ] = 0;
-    if( len == 0 )
-        return 0; /** nothing to do **/
-    
-    if ( has_ref_offset[ 0 ] ) /** skip mismatches from the beginning == soft clip ***/
-    {
-        if ( ref_offset[ 0 ] > 0 )  /**** deletes in the beginning are disallowed, REF_START should have been moved and delete converted to insert **/
-            return RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid  );
-
-        i = -( ref_offset [ 0 ] );
-        roi = 1;
-        mrun = 0;
-    }
-    else
-    {
-        i = roi = 0;
-    }
-
-    for ( mrun = 0; i < len; i++ )
-    {
-        if ( has_mismatch[ i ] )
-        {
-            mrun++;
-        }
-        else /*** intentionally skipping last run of mismatches **/
-        {
-            dst[ 0 ] += mrun;
-            mrun = 0;
-        }
-    }
-    return 0;
-}
-
-/*
- * function
- * ascii NCBI:align:edit_distance #1 ( bool has_mismatch, bool has_ref_offset, I32 ref_offset);
- */
-VTRANSFACT_IMPL ( NCBI_align_edit_distance, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = edit_distance_impl;
-    rslt->variant = vftRow;
-    return 0;
-}
-
-
-/*
- * edit distance = sum of lengths of inserts
- *               + sum of lengths of deletes
- *               + number of mismatches
- * excluding soft clips
- */
-
-unsigned edit_distance(bool const has_ref_offset[],
-                       bool const has_mismatch[],
-                       unsigned const readlen,
-                       unsigned const reflen,
-                       int32_t const ref_offset[],
-                       unsigned const offsets)
-{
-    if ( readlen == 0 )
-    {
-        /* full delete */
-        return reflen;
-    }
-    else
-    {
-        INSDC_coord_len const rsc = right_soft_clip( readlen, reflen, offsets, ref_offset );
-        unsigned indels = 0;
-        unsigned misses = 0;
-        unsigned i = 0;
-        unsigned j = 0;
-        
-        if ( has_ref_offset[ 0 ] && ref_offset[ j ] < 0 )
-            j = i = 1;
-        
-        /* sum of insert lengths + sum of delete lengths excluding soft clips */
-        for ( ; i < readlen - rsc; ++i )
-        {
-            if ( has_ref_offset[ i ] )
-            {
-                int const offset = ref_offset[ j++ ];
-                
-                if ( offset < 0 )
-                    indels += -offset;
-                else
-                    indels +=  offset;
-            }
-        }
-
-        /* sum of mismatches not in inserts or soft clips */
-        for ( j = i = 0; i < readlen - rsc; )
-        {
-            if ( has_ref_offset[ i ] )
-            {
-                int offset = ref_offset[ j++ ];
-                
-                if ( offset < 0 )
-                {
-                    i += -offset;
-                    continue;
-                }
-            }
-            misses += has_mismatch[ i ] ? 1 : 0;
-            ++i;
-        }
-        return indels + misses;
-    }
-}
-
-
-static
-rc_t CC edit_distance_2_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    unsigned const nreads = argc > 4 ? ( unsigned const )argv[ 4 ].u.data.elem_count : 1;
-    unsigned const len = ( unsigned const )argv[ 0 ].u.data.elem_count;
-    unsigned const noffsets = ( unsigned const )argv[ 2 ].u.data.elem_count;
-    INSDC_coord_len const dummy_rl = len;
-
-    ARG_ALIAS     ( bool           , has_mismatch  , 0 );
-    ARG_ALIAS     ( bool           , has_ref_offset, 1 );
-    ARG_ALIAS     ( int32_t        , ref_offset    , 2 );
-    ARG_ALIAS     ( INSDC_coord_len, ref_len       , 3 );
-    ARG_ALIAS_COND( INSDC_coord_len, readlen       , 4, &dummy_rl );
-    
-    assert( argv[ 0 ].u.data.elem_bits == sizeof( has_mismatch  [ 0 ] ) * 8 );
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( has_ref_offset[ 0 ] ) * 8 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( ref_offset    [ 0 ] ) * 8 );
-    assert( argv[ 3 ].u.data.elem_bits == sizeof( ref_len       [ 0 ] ) * 8 );
-
-    rslt->data->elem_bits = rslt->elem_bits;
-    if ( len == 0 )
-    {
-        return KDataBufferResize( rslt->data, rslt->elem_count = 0 );
-    }
-    
-    assert( len == argv[ 1 ].u.data.elem_count );
-
-    rslt->elem_count = nreads;
-    rc = KDataBufferResize( rslt->data, nreads );
-    if ( rc == 0 )
-    {
-        unsigned i;
-        unsigned start = 0;
-        unsigned offset = 0;
-        uint32_t *const dst = rslt->data->base;
-        
-        for ( i = 0; i < nreads; ++i )
-        {
-            unsigned const rlen = readlen[ i ];
-            unsigned j;
-            unsigned offsets = 0;
-            
-            for ( j = 0; j < rlen; ++j )
-            {
-                if ( has_ref_offset[ start + j ] )
-                    ++offsets;
-            }
-
-            if ( offsets + offset > noffsets )
-                return RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-            
-            dst[ i ] = edit_distance( has_ref_offset + start,
-                                   has_mismatch + start,
-                                   rlen,
-                                   ref_len[ 0 ],
-                                   ref_offset + offset,
-                                   offsets );
-            start += rlen;
-            offset += offsets;
-        }
-    }
-    return rc;
-}
-
-
-/*
- * function
- * U32 NCBI:align:edit_distance #2 ( bool has_mismatch, bool has_ref_offset,
- *     I32 ref_offset, INSDC:coord:len ref_len );
- */
-VTRANSFACT_IMPL ( NCBI_align_edit_distance_2, 2, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = edit_distance_2_impl;
-    rslt->variant = vftRow;
-    return 0;
-}
-
-
-/*
- * function
- * U32 NCBI:align:edit_distance #3 ( bool has_mismatch, bool has_ref_offset,
- *     I32 ref_offset, NCBI:align:ro_type ref_offset_type, INSDC:coord:len read_len );
- */
-static
-rc_t CC edit_distance_3_impl(void *const data, VXformInfo const info[],
-                             int64_t const row_id,
-                             VRowResult rslt[],
-                             uint32_t const argc,
-                             VRowData const argv[/* argc */])
-{
-    rc_t rc;
-    unsigned const nreads = (unsigned const)argv[4].u.data.elem_count;
-    ARG_ALIAS(              bool, has_mismatch   , 0);
-    ARG_ALIAS(              bool, has_ref_offset , 1);
-    ARG_ALIAS(           int32_t, ref_offset     , 2);
-    ARG_ALIAS(NCBI_align_ro_type, ref_offset_type, 3);
-    ARG_ALIAS(   INSDC_coord_len, read_len       , 4);
-    
-    rslt->data->elem_bits = rslt->elem_bits;
-    rslt->elem_count = nreads;
-    rc = KDataBufferResize(rslt->data, nreads);
-    if (rc == 0) {
-        uint32_t *const result = rslt->data->base;
-        unsigned cur = 0;
-        unsigned cur_ro = 0;
-        unsigned n;
-        
-        for (n = 0; n < nreads; ++n) {
-            unsigned const len = read_len[n];
-            unsigned j;
-            unsigned miss = 0;
-            unsigned indel = 0;
-            unsigned cur_ro2 = cur_ro;
-            
-            for (j = 0; j < len; ) {
-                if (has_ref_offset[cur] != 0) {
-                    int const offset = ref_offset[cur_ro];
-                    
-                    ++cur_ro;
-                    if (offset < 0) {
-                        unsigned const dist = -offset;
-                        
-                        cur += dist;
-                        j += dist;
-                        continue;
-                    }
-                }
-                if (has_mismatch[cur])
-                    ++miss;
-                ++cur;
-                ++j;
-            }
-            while (cur_ro2 < cur_ro) {
-                int const type = ref_offset_type[cur_ro2];
-                
-                if (type == 0) {
-                    int const offset = ref_offset[cur_ro2];
-                    
-                    if (offset < 0)
-                        indel += -offset;
-                    else
-                        indel += +offset;
-                }
-                ++cur_ro2;
-            }
-            result[n] = miss + indel;
-        }
-    }
-    return rc;
-}
-
-VTRANSFACT_IMPL ( NCBI_align_edit_distance_3, 3, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-     VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = edit_distance_3_impl;
-    rslt->variant = vftRow;
-    return 0;
-}
-
-
-/*
- * function bool ALIGN:generate_has_mismatch #1 (INSDC:4na:bin reference,
- *     INSDC:4na:bin subject, bool has_ref_offset, I32 ref_offset);
- */
-static
-rc_t CC generate_has_mismatch_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    int32_t si, ri, roi;
-    uint32_t ref_len = ( uint32_t )argv[ 0 ].u.data.elem_count;
-    uint32_t sbj_len = ( uint32_t )argv[ 1 ].u.data.elem_count;
-    uint32_t hro_len = ( uint32_t )argv[ 2 ].u.data.elem_count;
-    uint32_t ro_len  = ( uint32_t )argv[ 3 ].u.data.elem_count;
-    const uint8_t *ref  = argv [ 0 ] . u . data . base;
-    const uint8_t *sbj  = argv [ 1 ] . u . data . base;
-    const uint8_t *has_ref_offset     = argv [ 2 ] . u . data . base;
-    const int32_t *ref_offset = argv [ 3 ] . u . data . base;
-
-    uint8_t * dst;
-    uint32_t  len = 0;
-
-    rslt -> data -> elem_bits = 8;
-    if ( sbj_len == 0 )
-    {
-        rc = KDataBufferResize ( rslt -> data, 0 );
-        if ( rc != 0 )
-            return rc;
-        rslt -> elem_count = 0;
-        return 0;
-    }
-    assert( sbj_len == hro_len );
-    len = sbj_len;
-
-    ref            += argv [ 0 ] . u . data . first_elem;
-    sbj            += argv [ 1 ] . u . data . first_elem;
-    has_ref_offset += argv [ 2 ] . u . data . first_elem;
-    ref_offset     += argv [ 3 ] . u . data . first_elem;
-
-    /* resize output row for the total number of reads */
-    rslt -> data -> elem_bits = 8;
-    rc = KDataBufferResize ( rslt -> data, len );
-    if ( rc != 0 )
-        return rc;
-    rslt -> elem_count = len;
-    dst = rslt -> data->base;
-    for ( si = ri = roi = 0; si < ( int32_t )len; si++, ri++ )
-    {
-        if ( has_ref_offset[ si ] != 0 ) /*** need to offset the reference ***/
-        {
-            if ( roi >= ( int32_t )ro_len )
-            {
-                return RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-            }
-            ri += ref_offset[ roi++ ];
-        }
-
-        if ( ri >= 0 && ri < ( int32_t )ref_len && sbj[ si ] == ref[ ri ] )
-            dst[ si ]=0;
-        else
-            dst[ si ]=1;
-    }
-    return 0;
-}
-
-
-VTRANSFACT_IMPL ( ALIGN_generate_has_mismatch, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = generate_has_mismatch_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-/*
- * function bool ALIGN:generate_mismatch #1 (INSDC:4na:bin reference,INSDC:4na:bin subject, bool has_ref_offset, I32 ref_offset);
- */
-static
-rc_t CC generate_mismatch_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    int32_t si, ri, roi;
-    uint32_t ref_len = ( uint32_t )argv[ 0 ].u.data.elem_count;
-    uint32_t sbj_len = ( uint32_t )argv[ 1 ].u.data.elem_count;
-    uint32_t hro_len = ( uint32_t )argv[ 2 ].u.data.elem_count;
-    uint32_t ro_len  = ( uint32_t )argv[ 3 ].u.data.elem_count;
-    const uint8_t *ref  = argv [ 0 ] . u . data . base;
-    const uint8_t *sbj  = argv [ 1 ] . u . data . base;
-    const uint8_t *has_ref_offset     = argv [ 2 ] . u . data . base;
-    const int32_t *ref_offset = argv [ 3 ] . u . data . base;
-    uint8_t	buf[ 5 * 1024 ];
-    uint32_t  len;
-
-    rslt -> data -> elem_bits = 8;
-    if ( sbj_len == 0 )
-    {
-        return KDataBufferResize( rslt->data, rslt->elem_count = 0 );
-    }
-    assert( sbj_len == hro_len );
-
-    ref            += argv [ 0 ] . u . data . first_elem;
-    sbj            += argv [ 1 ] . u . data . first_elem;
-    has_ref_offset += argv [ 2 ] . u . data . first_elem;
-    ref_offset     += argv [ 3 ] . u . data . first_elem;
-
-    for ( si = ri = roi = 0, len = 0; si < ( int32_t )sbj_len; si++, ri++ )
-    {
-        if ( has_ref_offset[ si ] != 0 )/*** need to offset the reference ***/
-        {
-            if ( roi >= ( int32_t )ro_len )
-            {
-                return RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-            }
-            ri += ref_offset[ roi++ ];
-        }
-
-        if ( ri >=0 && ri < ( int32_t )ref_len && sbj[ si ] == ref[ ri ] )
-        {
-            /*noop*/
-        }
-        else
-        {
-            if ( len > sizeof( buf ) )
-                return RC( rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient );
-
-            buf[ len++ ] = sbj[ si ];
-        }
-    }
-
-    /* resize output row for the total number of reads */
-    rc = KDataBufferResize ( rslt -> data, len );
-    if ( rc != 0 )
-        return rc;
-    rslt -> elem_count = len;
-    memcpy( rslt -> data->base, buf, len );
-    return 0;
-}
-
-
-VTRANSFACT_IMPL ( ALIGN_generate_mismatch, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = generate_mismatch_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-
-/*
- * function INSDC:quality:phred NCBI:align:generate_mismatch_qual #1 (INSDC:quality:phred qual,bool has_mismatch)
- */
-static
-rc_t CC generate_mismatch_qual_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    const uint8_t *q    = argv[ 0 ].u.data.base; 
-    const uint8_t *h_mm = argv[ 1 ].u.data.base;
-    uint8_t	buf[ 5 * 1024 ];
-    uint32_t mm_cnt, i;
-
-    q    += argv[ 0 ].u.data.first_elem;
-    h_mm += argv[ 1 ].u.data.first_elem;
-
-    for ( mm_cnt = 0, i = 0; i < argv[ 0 ].u.data.elem_count; i++ )
-    {
-        if( h_mm[ i ] )
-        {
-            buf[ mm_cnt++ ] = q[ i ];
-        }
-    }
-
-    /* resize output row for the total number of reads */
-    rslt -> data -> elem_bits = 8;
-    rc = KDataBufferResize ( rslt -> data, mm_cnt );
-    if ( rc != 0 )
-        return rc;
-    rslt -> elem_count = mm_cnt;
-    if ( mm_cnt > 0 )
-        memcpy( rslt -> data->base, buf, mm_cnt );
-
-    return 0;
-}
-
-
-VTRANSFACT_IMPL ( ALIGN_generate_mismatch_qual, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = generate_mismatch_qual_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-
-/*
- * function ascii NCBI:align:get_mismatch_read #1
- *    ( bool has_mismatch, INSDC:dna:text mismatch )
- */
-static
-rc_t CC get_mismatch_read_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    char *result;
-    unsigned const readlen = ( unsigned const )argv[ 0 ].u.data.elem_count;
-    
-    rslt->data->elem_bits = sizeof( result[ 0 ] ) * 8;
-    rslt->elem_count = readlen;
-    rc = KDataBufferResize( rslt->data, rslt->elem_count );
-    if ( rc == 0 )
-    {
-        unsigned i;
-        unsigned j;
-        bool const *has_mismatch = argv[ 0 ].u.data.base;
-        char const *mismatch = argv[ 1 ].u.data.base;
-        
-        assert( argv[ 0 ].u.data.elem_bits == sizeof( has_mismatch[ 0 ] ) * 8 );
-        has_mismatch += argv[ 0 ].u.data.first_elem;
-        
-        assert( argv[ 1 ].u.data.elem_bits == sizeof( mismatch[ 0 ] ) * 8 );
-        mismatch += argv[ 1 ].u.data.first_elem;
-        
-        result = rslt->data->base;
-        for ( i = j = 0; i != readlen; ++i )
-        {
-            result[ i ] = has_mismatch[ i ] ? mismatch[ j++ ] : '=';
-        }
-    }
-
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_get_mismatch_read, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = get_mismatch_read_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-
-/*
- * function INSDC:coord:len NCBI:align:get_left_soft_clip #1 (
- *     bool has_ref_offset, INSDC:coord:zero ref_offset )
- */
-static
-rc_t CC left_soft_clip_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    INSDC_coord_len result;
-    unsigned const n_offsets = ( unsigned const )argv[ 1 ].u.data.elem_count;
-    
-    result = 0;
-    
-    if ( n_offsets > 0 )
-    {
-        bool const *has_ref_offset = argv[ 0 ].u.data.base;
-        int32_t const *ref_offset = argv[ 1 ].u.data.base;
-        
-        assert( argv[ 0 ].u.data.elem_bits == sizeof( has_ref_offset[ 0 ] ) * 8 );
-        assert( argv[ 1 ].u.data.elem_bits == sizeof( ref_offset[ 0 ] ) * 8 );
-        
-        has_ref_offset += argv[ 0 ].u.data.first_elem;
-        ref_offset += argv[ 1 ].u.data.first_elem;
-        
-        if ( has_ref_offset[ 0 ] && ref_offset[ 0 ] < 0 )
-        {
-            result = -ref_offset[ 0 ];
-        }
-    }
-
-    rslt->data->elem_bits = sizeof( result ) * 8;
-    rslt->elem_count = 1;
-    rc = KDataBufferResize( rslt->data, 1 );
-    if ( rc == 0 )
-        memcpy( rslt->data->base, &result, sizeof( result ) );
-
-    return rc;
-}
-
-
-static
-rc_t CC left_soft_clip_impl_2 ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    INSDC_coord_len* result;
-    const bool* has_ref_offset = argv[ 0 ].u.data.base;
-    const int32_t* ref_offset = argv[ 1 ].u.data.base;
-    const uint64_t n_offsets = argv[ 1 ].u.data.elem_count;
-    const INSDC_coord_len* read_len = argv[ 2 ].u.data.base;
-    const uint32_t nreads = ( const uint32_t )argv[ 2 ].u.data.elem_count;
-    uint32_t n, roi;
-    INSDC_coord_zero start;
-
-    assert( argv[ 0 ].u.data.elem_bits == sizeof( has_ref_offset[ 0 ] ) * 8 );
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( ref_offset[ 0 ] ) * 8 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( read_len[ 0 ] ) * 8 );
-    
-    has_ref_offset += argv[ 0 ].u.data.first_elem;
-    ref_offset += argv[ 1 ].u.data.first_elem;
-    read_len += argv[ 2 ].u.data.first_elem;
-
-    rslt->data->elem_bits = sizeof( *result ) * 8;
-    rslt->elem_count = nreads;
-    rc = KDataBufferResize( rslt->data, rslt->elem_count );
-    result = rslt->data->base;
-
-    for ( n = roi = start = 0; rc == 0 && n < nreads; start += read_len[ n++ ] )
-    {
-        if ( has_ref_offset[ start ] && ref_offset[ roi ] < 0 )
-        {
-            if ( roi >= n_offsets )
-            {
-                rc = RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-                break;
-            }
-            result[ n ] = -ref_offset[ roi ];
-        }
-        else
-        {
-            result[ n ] = 0;
-        }
-
-        if ( n < nreads - 1 && roi < n_offsets )
-        {
-            /* scroll through has_ref_offset and consume ref_offsets for this read
-               only if there is next read or more offsets */
-            uint32_t k;
-            for ( k = start; k < start + read_len[ n ]; k++ )
-            {
-                if ( has_ref_offset[ k ] )
-                {
-                    if ( roi >= n_offsets )
-                    {
-                        rc = RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-                        break;
-                    }
-                    roi++;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_get_left_soft_clip, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = left_soft_clip_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_get_left_soft_clip_2, 2, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = left_soft_clip_impl_2;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-/*
- * function INSDC:coord:len NCBI:align:get_right_soft_clip #1 ( 
- *     bool has_mismatch, INSDC:coord:len left_clip )
- */
-static
-rc_t CC right_soft_clip_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    INSDC_coord_len result = 0;
-    INSDC_coord_len left = 0;
-    uint32_t right = ( uint32_t )argv[ 0 ].u.data.elem_count;
-    bool const *has_mismatch = argv[ 0 ].u.data.base;
-    bool const *has_ref_offset = NULL;
-    int32_t    last_ref_offset = 0;
-    
-    assert( argv[ 0 ].u.data.elem_bits == sizeof( has_mismatch[ 0 ] ) * 8 );
-    has_mismatch += argv[ 0 ].u.data.first_elem;
-    
-    if ( argc > 2 )
-    {
-        has_ref_offset = argv[ 2 ].u.data.base;
-        has_ref_offset += argv[ 2 ].u.data.first_elem;
-        if ( argc > 3 )
-        {
-            const int32_t *ro = argv[ 3 ].u.data.base;
-            ro += argv[ 3 ].u.data.first_elem;
-            if ( argv[ 3 ].u.data.elem_count > 0 )
-            {
-                last_ref_offset = ro[ argv[ 3 ].u.data.elem_count - 1 ];
-            }
-        }
-    }
-    
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( left ) * 8 );
-    left = ( ( INSDC_coord_len const * )argv[ 1 ].u.data.base )[ argv[ 1 ].u.data.first_elem ];
-    
-    while ( right != left && has_mismatch[ right - 1 ] &&
-            ( has_ref_offset == NULL || has_ref_offset[ right - 1 ] == 0 ) )
-    {
-        ++result;
-        --right;
-    }
-
-    while ( right > 0 && last_ref_offset < 0 && has_ref_offset[ right - 1 ] == 0 ) /*** some mismatches from left needs to be recovered to cover for inserts **/
-    {
-        last_ref_offset++;
-        right--;
-    }
-
-    if ( last_ref_offset < -1 )
-    {
-        last_ref_offset ++;
-        if ( result < (INSDC_coord_len)-last_ref_offset )
-            result=0;
-        else
-            result += last_ref_offset;
-    }
-    else if ( last_ref_offset > 0 )
-    {
-        result += last_ref_offset;
-    }
-    
-    rslt->data->elem_bits = sizeof( result ) * 8;
-    rslt->elem_count = 1;
-    rc = KDataBufferResize( rslt->data, 1 );
-    if ( rc == 0 )
-        memcpy( rslt->data->base, &result, sizeof( result ) );
-
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_get_right_soft_clip, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = right_soft_clip_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_get_right_soft_clip_2, 2, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = right_soft_clip_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-/*
- * function INSDC:coord:len NCBI:align:get_right_soft_clip #3 
- *     ( bool has_ref_offset, I32 ref_offset, INSDC:coord:len ref_len )
- */
-static
-rc_t CC right_soft_clip_3_impl ( void *data, const VXformInfo *info, int64_t row_id,
-                              VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    INSDC_coord_len const ref_len = ( ( INSDC_coord_len const * )argv[ 2 ].u.data.base )[ argv[ 2 ].u.data.first_elem ];
-    unsigned const seq_len = ( unsigned const )argv[ 0 ].u.data.elem_count;
-    int32_t const *ref_offset  = &( ( int32_t const * )argv[ 1 ].u.data.base )[ argv[ 1 ].u.data.first_elem ];
-    unsigned const n = ( unsigned const )argv[ 1 ].u.data.elem_count;
-    
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( ref_offset[ 0 ] ) * 8 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( ref_len         ) * 8 );
-
-    rslt->data->elem_bits = rslt->elem_bits;
-    rslt->elem_count = 1;
-    rc = KDataBufferResize( rslt->data, 1 );
-    if ( rc == 0 )
-    {
-        ( ( INSDC_coord_len * )rslt->data->base )[ 0 ] = right_soft_clip( seq_len, ref_len, n, ref_offset );
-    }
-
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_get_right_soft_clip_3, 3, 0, 0 )
-    ( const void *Self, const VXfactInfo *info, VFuncDesc *rslt,
-      const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = right_soft_clip_3_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-static
-rc_t CC right_soft_clip_4_impl ( void *data, const VXformInfo *info, int64_t row_id,
-                                 VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    INSDC_coord_len* result;
-    const bool* has_ref_offset = argv[ 0 ].u.data.base;
-    const int32_t* ref_offset = argv[ 1 ].u.data.base;
-#if 0
-    const uint64_t n_offsets = argv[ 1 ].u.data.elem_count;
-#endif
-    const INSDC_coord_len* read_len = argv[ 2 ].u.data.base;
-    const uint32_t nreads = ( const uint32_t )argv[ 2 ].u.data.elem_count;
-    const INSDC_coord_len* ref_len = argv[ 3 ].u.data.base;
-    uint32_t n, roi;
-    INSDC_coord_zero start;
-
-    assert( argv[ 0 ].u.data.elem_bits == sizeof( has_ref_offset[ 0 ] ) * 8 );
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( ref_offset[ 0 ] ) * 8 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( read_len[ 0 ] ) * 8 );
-    assert( argv[ 3 ].u.data.elem_bits == sizeof( ref_len[ 0 ] ) * 8 );
-    assert( argv[ 3 ].u.data.elem_count == 1);
-    
-    has_ref_offset += argv[ 0 ].u.data.first_elem;
-    ref_offset += argv[ 1 ].u.data.first_elem;
-    read_len += argv[ 2 ].u.data.first_elem;
-    ref_len += argv[ 3 ].u.data.first_elem;
-
-    rslt->data->elem_bits = sizeof( *result ) * 8;
-    rslt->elem_count = nreads;
-    rc = KDataBufferResize( rslt->data, rslt->elem_count );
-    result = rslt->data->base;
-
-    for( n = roi = start = 0; rc == 0 && n < nreads; ++n )
-    {
-        INSDC_coord_len const rlen = read_len[ n ];
-        unsigned k;
-        unsigned offset_count;
-        
-        for ( k = offset_count = 0; k < rlen; ++k )
-        {
-            if ( has_ref_offset[ k + start ] )
-                ++offset_count;
-        }
-
-        result[ n ] = right_soft_clip( rlen, ref_len[ 0 ], offset_count, ref_offset );
-        ref_offset += offset_count;
-        start += rlen;
-#if 0
-        result[ n ] = read_len[ n ] - ref_len[ 0 ];
-        for ( k = start; k < start + read_len[ n ]; k++ )
-        {
-            if ( has_ref_offset[ k ] )
-            {
-                if ( roi >= n_offsets )
-                {
-                    rc = RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-                    break;
-                }
-                result[ n ] += ref_offset[ roi++ ];
-            }
-        }
-#endif
-    }
-
-    return rc;
-}
-
-VTRANSFACT_IMPL ( NCBI_align_get_right_soft_clip_4, 4, 0, 0 )
-    ( const void *Self, const VXfactInfo *info, VFuncDesc *rslt,
-      const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = right_soft_clip_4_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-/* extern function INSDC:coord:len NCBI:align:get_right_soft_clip #5
- *     ( bool has_ref_offset, I32 ref_offset, NCBI:align:ro_type ref_offset_type,
- *		 INSDC:coord:len read_len )
- */
-static
-rc_t CC right_soft_clip_5_impl ( void *data, const VXformInfo *info, int64_t row_id,
-                                VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    unsigned const nreads = argv[3].u.data.elem_count;
-    ARG_ALIAS(              bool,  has_ref_offset, 0);
-    ARG_ALIAS(           int32_t,      ref_offset, 1);
-    ARG_ALIAS(NCBI_align_ro_type, ref_offset_type, 2);
-    ARG_ALIAS(   INSDC_coord_len,        read_len, 3);
-    
-    rslt->data->elem_bits = sizeof(INSDC_coord_len) * 8;
-    rslt->elem_count = nreads;
-    rc = KDataBufferResize(rslt->data, nreads);
-    if (rc == 0) {
-        INSDC_coord_len *const result = rslt->data->base;
-        unsigned cur = 0;
-        unsigned cur_ro = 0;
-        unsigned n;
-        
-        for (n = 0; n < nreads; ++n) {
-            unsigned const len = read_len[n];
-            unsigned clip = 0;
-            unsigned j;
-            
-            for (j = 0; j < len; ++j, ++cur) {
-                if (has_ref_offset[cur] != 0) {
-                    int const offset = ref_offset[cur_ro];
-                    int const type = ref_offset_type[cur_ro];
-                    
-                    ++cur_ro;
-                    if (j > 0 && offset < 0 && type == 1) {
-                        assert(clip == 0);
-                        clip = -offset;
-                    }
-                }
-            }
-            result[n] = clip;
-        }
-    }
-    
-    return rc;
-}
-
-VTRANSFACT_IMPL(NCBI_align_get_right_soft_clip_5, 5, 0, 0 )
-    (const void *Self, const VXfactInfo *info, VFuncDesc *rslt,
-     const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = right_soft_clip_5_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-/*
- * function ascii NCBI:align:get_clipped_cigar #1 ( ascii cigar )
- */
-static
-rc_t CC clipped_cigar_impl ( void *data, const VXformInfo *info, int64_t row_id,
-                              VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    char const *cigar = argv[ 0 ].u.data.base;
-    unsigned const ciglen = ( unsigned const )argv[ 0 ].u.data.elem_count;
-    int n;
-    unsigned start = 0;
-    unsigned end = ciglen;
-    
-    assert( argv[ 0 ].u.data.elem_bits == sizeof( cigar[ 0 ] ) * 8 );
-    cigar += argv[ 0 ].u.data.first_elem;
-    
-    for ( n = 0; n != ciglen; ++n )
-    {
-        if ( !isdigit( cigar[ n ] ) )
-            break;
-    }
-
-    if ( cigar[ n ] == 'S' )
-        start = n + 1;
-    
-    if ( cigar[ end - 1 ] == 'S' )
-    {
-        --end;
-        while ( end > start && isdigit( cigar[ end - 1 ] ) )
-            --end;
-    }
-    
-    rslt->data->elem_bits = sizeof( cigar[ 0 ] ) * 8;
-    rslt->elem_count = ( end > start ) ? end - start : 0;
-    rc = KDataBufferResize( rslt->data, rslt->elem_count );
-    if ( rc == 0 && rslt->elem_count > 0 )
-        memcpy( rslt->data->base, &cigar[ start ], ( size_t )rslt->elem_count );
-    
-    return rc;
-}
-
-static
-rc_t CC clipped_cigar_impl_v2 ( void *data, const VXformInfo *info, int64_t row_id,
-                                VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc = 0;
-    const char* cigar = argv[ 0 ].u.data.base;
-    const INSDC_coord_len* cigar_len = argv[ 1 ].u.data.base;
-    const uint32_t nreads = ( const uint32_t )argv[ 1 ].u.data.elem_count;
-    INSDC_coord_len * new_cigar_len;
-    uint32_t n;
-    INSDC_coord_zero rstart;
-    
-    assert( argv[ 0 ].u.data.elem_bits == sizeof( *cigar ) * 8 );
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( *cigar_len ) * 8 );
-
-    if ( argv[ 0 ].u.data.elem_count == 0 )
-    {
-        return KDataBufferResize( rslt->data, rslt->elem_count = 0 );
-    }
-    
-    cigar += argv[ 0 ].u.data.first_elem;
-    cigar_len += argv[ 1 ].u.data.first_elem;
-
-    if ( data != NULL )
-    {
-        rslt->data->elem_bits = sizeof( *cigar_len ) * 8;
-        rslt->elem_count = nreads;
-        rc = KDataBufferResize( rslt->data, rslt->elem_count );
-        new_cigar_len = rslt->data->base;
-    }
-    else
-    {
-        rslt->elem_count = 0;
-        rslt->data->elem_bits = sizeof( *cigar ) * 8;
-    }
-
-    for ( n = rstart = 0; n < nreads; rstart += cigar_len[ n++ ] )
-    {
-        INSDC_coord_zero i = rstart, start = rstart;
-        INSDC_coord_zero end = start + cigar_len[ n ];
-
-        /* drop all \d+S groups at head */
-        while ( i < end )
-        {
-            if ( cigar[ i ] == 'S' )
-            {
-                start = i + 1;
-            }
-            else if ( !isdigit( cigar[ i ] ) )
-            {
-                break;
-            }
-            i++;
-        }
-
-        /* drop all \d+S groups at tail */
-        while ( end > start )
-        {
-            end--;
-            if ( cigar[ end ] != 'S' && !isdigit( cigar[ end ] ) )
-            {
-                break;
-            }
-        }
-
-        if ( data == NULL )
-        {
-            int64_t x = end - start + 1;
-            if ( x > 0 )
-            {
-                rc = KDataBufferResize( rslt->data, rslt->elem_count + x );
-                if ( rc == 0 )
-                {
-                    char* b = rslt->data->base;
-                    memcpy( &b[ rslt->elem_count ], &cigar[ start ], ( size_t )x );
-                    rslt->elem_count += x;
-                }
-            }
-        }
-        else
-        {
-            new_cigar_len[ n ] = end - start + 1;
-        }
-    }
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_get_clipped_cigar, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = clipped_cigar_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_get_clipped_cigar_2, 2, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    const VTypedesc* tp = &info->fdesc.desc;
-
-    if ( tp->domain == vtdAscii && tp->intrinsic_bits == 8 )
-    {
-        rslt->self = NULL;
-    }
-    else if ( tp->domain == vtdUint && tp->intrinsic_bits == sizeof( INSDC_coord_len ) * 8 )
-    {
-        rslt->self = rslt; /* something different from NULL :) */
-    }
-    else
-    {
-        return RC( rcXF, rcFunction, rcConstructing, rcParam, rcIncorrect );
-    }
-    rslt->u.rf = clipped_cigar_impl_v2;
-    rslt->variant = vftRow;
-    rslt->whack = NULL;
-    return 0;
-}
-
-
-
-/*
- * function I32 NCBI:align:get_clipped_ref_offset #1 (
- *     bool has_ref_offset, I32 ref_offset )
- */
-static
-rc_t CC clipped_ref_offset_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    unsigned start = 0;
-    unsigned const n_offsets = ( unsigned const )argv[ 1 ].u.data.elem_count;
-    int32_t const *ref_offset = argv[ 1 ].u.data.base;
-    
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( ref_offset[ 0 ] ) * 8 );
-    ref_offset += argv[ 1 ].u.data.first_elem;
-    
-    if ( n_offsets > 0 )
-    {
-        bool const *has_ref_offset = argv[ 0 ].u.data.base;
-        
-        assert( argv[ 0 ].u.data.elem_bits == sizeof( has_ref_offset[ 0 ] ) * 8 );
-        has_ref_offset += argv[ 0 ].u.data.first_elem;
-        
-        if ( has_ref_offset[ 0 ] && ref_offset[ 0 ] < 0 )
-        {
-            start = 1;
-        }
-    }
-
-    rslt->data->elem_bits = sizeof( ref_offset[ 0 ] ) * 8;
-    rslt->elem_count = n_offsets - start;
-    rc = KDataBufferResize( rslt->data, rslt->elem_count );
-    if ( rc == 0 )
-        memcpy( rslt->data->base,
-                &ref_offset[ start ],
-                ( size_t )( sizeof( ref_offset[ 0 ] ) * rslt->elem_count ) );
-
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_get_clipped_ref_offset, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = clipped_ref_offset_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-/*
- * function INSDC:coord:len NCBI:align:get_ref_len #1 (
- *     bool has_ref_offset, I32 ref_offset, INSDC:coord:len right_clip )
- */
-static
-rc_t CC get_ref_len_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    INSDC_coord_len result,right=0;
-    
-    unsigned const read_len = ( unsigned const )argv[ 0 ].u.data.elem_count;
-    unsigned const n_offsets = ( unsigned const )argv[ 1 ].u.data.elem_count;
-    bool const *hro = argv[ 0 ].u.data.base;
-    int32_t const *ref_offset = argv[ 1 ].u.data.base;
-    
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( ref_offset[ 0 ] ) * 8 );
-    
-    hro += argv[ 0 ].u.data.first_elem;
-    ref_offset += argv[ 1 ].u.data.first_elem;
-
-    if ( argc > 2 )
-    {
-        right = ( ( INSDC_coord_len* )argv[ 2 ].u.data.base )[ argv[ 2 ].u.data.first_elem ];
-        
-        assert( argv[ 2 ].u.data.elem_bits == sizeof( right ) * 8 );
-        assert( read_len >= right );
-    }
-
-    if ( n_offsets == 0 )
-    {
-        if ( read_len < right )
-            return RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-        result = read_len - right;
-    }
-    else
-    {
-        int32_t  ires, rov;
-        unsigned i;
-        
-        if ( argc > 2 ) /*** clipping ***/
-        {
-            for ( i = 0, ires = read_len - right; i < n_offsets; i++ )
-            {
-                memcpy( &rov, ref_offset + i, sizeof rov );
-                ires += rov;
-            }
-        }
-        else
-        {
-            int32_t sum_pos, sum_neg;
-            for ( i = 0, sum_pos = sum_neg = 0; i < n_offsets; i++ )
-            {
-                memcpy( &rov, ref_offset + i, sizeof rov );
-                if ( rov > 0 )
-                    sum_pos += rov;
-                else
-                    sum_neg += rov;            
-            }
-
-            if ( sum_pos + sum_neg >= 0 ) /** all offsets may not over-shorten needed reference ***/
-            {
-                ires = read_len + sum_pos + sum_neg;
-            }
-            else /** inefficient case - exact reach into the reference is needed **/
-            {
-                unsigned j;
-                for ( i = 0, j = 0, sum_pos = 0, ires = 0; j < read_len; j++ )
-                {
-                    if ( hro[ i ] )
-                    {
-                        if ( i >= n_offsets )
-                            return RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-                        memcpy( &rov, ref_offset + i, sizeof rov );
-                        ires += rov;
-                        i++;
-                    }
-                    sum_pos ++;
-                    if ( sum_pos > ires )
-                        ires=sum_pos;
-                }
-            }
-        }
-
-        if ( ires < 0 )
-            return RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-        result = ires;
-    }
-
-    rslt->data->elem_bits = sizeof( result ) * 8;
-    rslt->elem_count = 1;
-    rc = KDataBufferResize( rslt->data, rslt->elem_count );
-    if ( rc == 0 )
-        memcpy( rslt->data->base, &result, sizeof( result ) );
-
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_get_ref_len, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = get_ref_len_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-/*
- * function INSDC:coord:len NCBI:align:get_ref_len #2 (
- *											bool has_ref_offset,
- *											I32 ref_offset)
- */
-static
-rc_t CC get_ref_len_2_impl ( void *data, const VXformInfo *info, int64_t row_id,
-                          VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    ARG_ALIAS(int32_t, refOffset, 1);
-    unsigned const n = (unsigned)argv[1].u.data.elem_count;
-    int result = (unsigned)argv[0].u.data.elem_count; 
-    unsigned i;
-
-    for (i = 0; i < n; ++i)
-        result += (int)refOffset[i];
-    
-    rslt->data->elem_bits = sizeof(INSDC_coord_len) * 8;
-    rc = KDataBufferResize(rslt->data, rslt->elem_count = 1);
-    if (rc == 0)
-        ((INSDC_coord_len *)rslt->data->base)[0] = result;
-
-    return rc;
-}
-
-
-VTRANSFACT_IMPL(NCBI_align_get_ref_len_2, 2, 0, 0)(const void *Self, const VXfactInfo *info,
-                     VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp)
-{
-    rslt->u.rf = get_ref_len_2_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-/*
- * function < type T > T NCBI:align:clip #1 ( T value,
- *     INSDC:coord:len left, INSDC:coord:len right )
- */
-static
-rc_t CC clip_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    INSDC_coord_len left  = ( ( INSDC_coord_len const * )argv[ 1 ].u.data.base )[ argv[ 1 ].u.data.first_elem ];
-    INSDC_coord_len right = ( ( INSDC_coord_len const * )argv[ 2 ].u.data.base )[ argv[ 2 ].u.data.first_elem ];
-
-    rslt->data->elem_bits = argv[ 0 ].u.data.elem_bits;
-    if ( argv[ 0 ].u.data.elem_count >= left + right )
-    {
-        rslt->elem_count = argv[ 0 ].u.data.elem_count - left - right;
-    }
-    else
-    {
-        rslt->elem_count = 0;
-    }
-
-    rc = KDataBufferResize( rslt->data, rslt->elem_count );
-    if ( rc == 0 )
-    {
-        if ( ( rslt->data->elem_bits & 7 ) == 0 )
-        {
-            memcpy( rslt->data->base,
-                    &( ( char const * )argv[ 0 ].u.data.base )[ ( ( left + argv[ 0 ].u.data.first_elem ) * argv[ 0 ].u.data.elem_bits ) >> 3 ],
-                    ( size_t )( ( rslt->elem_count * rslt->data->elem_bits ) >> 3 ) );
-        }
-        else
-        {
-            bitcpy( rslt->data->base, 
-                    0,
-                    argv[ 0 ].u.data.base,
-                    ( left + argv[ 0 ].u.data.first_elem ) * argv[ 0 ].u.data.elem_bits,
-                    rslt->elem_count * rslt->data->elem_bits );
-        }
-    }
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_clip, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = clip_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-static
-rc_t CC clip_impl_2 ( void *data, const VXformInfo *info, int64_t row_id,
-                      VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    const INSDC_coord_len* read_len = argv[ 1 ].u.data.base;
-    const uint32_t nreads = ( const uint32_t )argv[ 1 ].u.data.elem_count;
-    const INSDC_coord_len* left =  argv[ 2 ].u.data.base;
-    const INSDC_coord_len* right = argv[ 3 ].u.data.base;
-    uint32_t n;
-    INSDC_coord_zero start;
-
-    assert( argv[ 1 ].u.data.elem_count == argv[ 2 ].u.data.elem_count );
-    assert( argv[ 1 ].u.data.elem_count == argv[ 3 ].u.data.elem_count );
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( read_len[ 0 ] ) * 8 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( left[ 0 ] ) * 8 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( right[ 0 ] ) * 8 );
-
-    read_len += argv[ 1 ].u.data.first_elem;
-    left += argv[ 2 ].u.data.first_elem;
-    right += argv[ 3 ].u.data.first_elem;
-
-    rslt->data->elem_bits = argv[ 0 ].u.data.elem_bits;
-    rslt->elem_count = 0;
-    rc = KDataBufferResize( rslt->data, rslt->elem_count );
-    if ( rc != 0 )
-        return rc;
-    if ( argv[ 0 ].u.data.elem_count == 0 )
-        return 0;
-
-    for ( n = start = 0; rc == 0 && n < nreads; start += read_len[ n++ ] )
-    {
-        uint64_t x = left[n] + right[n];
-
-        if ( argv[ 0 ].u.data.elem_count < start ||
-             argv[ 0 ].u.data.elem_count < start + read_len[ n ] )
-        {
-            rc = RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-        }
-/*
-        assert(argv[0].u.data.elem_count >= start);
-        assert(argv[0].u.data.elem_count >= start + read_len[n]);
-*/
-        else if ( read_len[ n ] > x )
-        {
-            x = read_len[ n ] - x;
-            if ( x > 0 )
-            {
-                rc = KDataBufferResize( rslt->data, rslt->elem_count + x );
-                if ( rc == 0 )
-                {
-                    bitcpy( rslt->data->base,
-                            rslt->elem_count * argv[ 0 ].u.data.elem_bits,
-                            argv[ 0 ].u.data.base,
-                            ( argv[ 0 ].u.data.first_elem + start + left[ n ] ) * argv[ 0 ].u.data.elem_bits,
-                            x * rslt->data->elem_bits );
-                    rslt->elem_count += x;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_clip_2, 2, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = clip_impl_2;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-/*
- * function bool NCBI:align:get_ref_mismatch #1
- *     ( bool has_mismatch, bool has_ref_offset, I32 ref_offset,
- *       INSDC:coord:len ref_len )
- */
-static
-rc_t CC get_ref_mismatch_impl ( void *data, const VXformInfo *info, int64_t row_id,
-                   VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    bool const *has_mismatch       = argv [ 0 ] . u . data . base;
-    bool const *has_ref_offset     = argv [ 1 ] . u . data . base;
-    int32_t const *ref_offset      = argv [ 2 ] . u . data . base;
-    INSDC_coord_len const *ref_len = argv [ 3 ] . u . data . base; 
-    
-    assert( argv[ 0 ].u.data.elem_bits == sizeof( has_mismatch[ 0 ] ) * 8 );
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( has_ref_offset[ 0 ] ) * 8 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( ref_offset[ 0 ] ) * 8 );
-    assert( argv[ 3 ].u.data.elem_bits == sizeof( ref_len[ 0 ] ) * 8 );
-    
-    has_mismatch   += argv[ 0 ].u.data.first_elem;
-    has_ref_offset += argv[ 1 ].u.data.first_elem;
-    ref_offset     += argv[ 2 ].u.data.first_elem;
-    
-    rslt->data->elem_bits = sizeof( bool ) * 8;
-    rslt->elem_count = ref_len[ argv[ 3 ].u.data.first_elem ];
-    rc = KDataBufferResize( rslt->data, rslt->elem_count );
-    if ( rc == 0 )
-    {
-        bool *result = ( bool* )rslt->data->base;
-        unsigned j;
-        unsigned ri;
-        unsigned si;
-        
-        memset( result, 0, ( size_t )( sizeof( result[ 0 ] ) * rslt->elem_count ) );
-        for ( j = ri = si = 0; si < argv[ 0 ].u.data.elem_count; )
-        {
-            if ( has_ref_offset[ si ] )
-            {
-                int offset = ref_offset[ j++ ];
-                
-                if ( offset > 0 )
-                    ri += offset;
-                else
-                {
-                    si -= offset;
-                    continue;
-                }
-            }
-            if ( ri >= rslt->elem_count )
-                break;
-            if ( has_mismatch[ si ] )
-            {
-                result[ ri ] = 1;
-            }
-            ++si;
-            ++ri;
-        }
-    }
-
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_get_ref_mismatch, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = get_ref_mismatch_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-
-/*
- * function bool NCBI:align:get_ref_insert #1
- *     ( bool has_mismatch, bool has_ref_offset, I32 ref_offset,
- *       INSDC:coord:len ref_len )
- */
-static
-rc_t CC get_ref_insert_impl ( void *data, const VXformInfo *info, int64_t row_id,
-                               VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    bool const *has_mismatch       = argv [ 0 ] . u . data . base;
-    bool const *has_ref_offset     = argv [ 1 ] . u . data . base;
-    int32_t const *ref_offset      = argv [ 2 ] . u . data . base;
-    INSDC_coord_len const *ref_len = argv [ 3 ] . u . data . base; 
-    
-    assert( argv[ 0 ].u.data.elem_bits == sizeof( has_mismatch[ 0 ] ) * 8 );
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( has_ref_offset[ 0 ] ) * 8 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( ref_offset[ 0 ] ) * 8 );
-    assert( argv[ 3 ].u.data.elem_bits == sizeof( ref_len[ 0 ] ) * 8 );
-    
-    has_mismatch   += argv[ 0 ].u.data.first_elem;
-    has_ref_offset += argv[ 1 ].u.data.first_elem;
-    ref_offset     += argv[ 2 ].u.data.first_elem;
-    
-    rslt->data->elem_bits = sizeof( bool ) * 8;
-    rslt->elem_count = ref_len[ argv[ 3 ].u.data.first_elem ];
-    rc = KDataBufferResize( rslt->data, rslt->elem_count );
-    if ( rc == 0 )
-    {
-        bool *result = ( bool* )rslt->data->base;
-        unsigned j;
-        unsigned ri;
-        unsigned si;
-        
-        memset( result, 0, ( size_t )( sizeof( result[ 0 ] ) * rslt->elem_count ) );
-        for ( j = ri = si = 0; si < argv[ 0 ].u.data.elem_count; )
-        {
-            if ( has_ref_offset[ si ] )
-            {
-                int offset = ref_offset[ j++ ];
-                
-                if ( offset > 0 )
-                {
-                    ri += offset;
-                }
-                else
-                {
-                    if ( si > 0 )
-                    {
-                        if ( ri >= 1 )
-                            result[ ri - 1 ] = 1;
-                        result[ ri ] = 1;
-                    }
-                    si -= offset;
-                    continue;
-                }
-            }
-            ++si;
-            ++ri;
-        }
-    }
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_get_ref_insert, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = get_ref_insert_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-
-/*
- * function bool NCBI:align:get_ref_delete #1
- *     ( bool has_mismatch, bool has_ref_offset, I32 ref_offset,
- *       INSDC:coord:len ref_len )
- */
-static
-rc_t CC get_ref_delete_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    bool const *has_mismatch       = argv [ 0 ] . u . data . base;
-    bool const *has_ref_offset     = argv [ 1 ] . u . data . base;
-    int32_t const *ref_offset      = argv [ 2 ] . u . data . base;
-    INSDC_coord_len const *ref_len = argv [ 3 ] . u . data . base; 
-    
-    assert( argv[ 0 ].u.data.elem_bits == sizeof( has_mismatch[ 0 ] ) * 8 );
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( has_ref_offset[ 0 ] ) * 8 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( ref_offset[ 0 ] ) * 8 );
-    assert( argv[ 3 ].u.data.elem_bits == sizeof( ref_len[ 0 ] ) * 8 );
-    
-    has_mismatch   += argv[ 0 ].u.data.first_elem;
-    has_ref_offset += argv[ 1 ].u.data.first_elem;
-    ref_offset     += argv[ 2 ].u.data.first_elem;
-    
-    rslt->data->elem_bits = sizeof( bool ) * 8;
-    rslt->elem_count = ref_len[ argv[ 3 ].u.data.first_elem ];
-    rc = KDataBufferResize( rslt->data, rslt->elem_count );
-    if ( rc == 0 )
-    {
-        bool *result = ( bool* )rslt->data->base;
-        unsigned j;
-        unsigned ri;
-        unsigned si;
-        
-        memset( result, 0, ( size_t )( sizeof( result[ 0 ] ) * rslt->elem_count ) );
-        for ( j = ri = si = 0; si < argv[ 0 ].u.data.elem_count; )
-        {
-            if ( has_ref_offset[ si ] )
-            {
-                int offset = ref_offset[ j++ ];
-                
-                if ( offset > 0 )
-                {
-                    memset( &result[ ri ], 1, offset );
-                    ri += offset;
-                }
-                else
-                {
-                    si -= offset;
-                    continue;
-                }
-            }
-            ++si;
-            ++ri;
-        }
-    }
-
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_get_ref_delete, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = get_ref_delete_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-
-#define USE_BIGGER_PRESERVE_BORDER 1
-/*
- * function bool NCBI:align:get_preserve_qual #1
- *     ( bool has_mismatch, bool has_ref_offset, I32 ref_offset,
- *       INSDC:coord:len ref_len )
- */
-static
-rc_t CC get_ref_preserve_qual_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    bool const *has_mismatch       = argv [ 0 ] . u . data . base;
-    bool const *has_ref_offset     = argv [ 1 ] . u . data . base;
-    int32_t const *ref_offset      = argv [ 2 ] . u . data . base;
-    INSDC_coord_len const *ref_len = argv [ 3 ] . u . data . base; 
-    
-    assert( argv[ 0 ].u.data.elem_bits == sizeof( has_mismatch[ 0 ] ) * 8 );
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( has_ref_offset[ 0 ] ) * 8 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( ref_offset[ 0 ] ) * 8 );
-    assert( argv[ 3 ].u.data.elem_bits == sizeof( ref_len[ 0 ] ) * 8 );
-    
-    has_mismatch   += argv[ 0 ].u.data.first_elem;
-    has_ref_offset += argv[ 1 ].u.data.first_elem;
-    ref_offset     += argv[ 2 ].u.data.first_elem;
-    
-    rslt->data->elem_bits = sizeof( bool ) * 8;
-    rslt->elem_count = ref_len[ argv[ 3 ].u.data.first_elem ];
-    rc = KDataBufferResize( rslt->data, rslt->elem_count );
-    if ( rc == 0 )
-    {
-        bool *result = ( bool* )rslt->data->base;
-        unsigned j;
-        unsigned ri;
-        unsigned si;
-        
-        memset( result, 0, ( size_t )( sizeof( result[ 0 ] ) * rslt->elem_count ) );
-        for ( j = ri = si = 0; si < argv[ 0 ].u.data.elem_count; )
-        {
-            if ( has_ref_offset[ si ] )
-            {
-                int offset = ref_offset[ j++ ];
-                
-                if ( offset > 0 )
-                {
-                    /* Preserve the qualities for deleted bases + plus the border */
-#if USE_BIGGER_PRESERVE_BORDER
-                    if ( ri >= 2 ) result[ ri - 2 ] = 1;
-#endif
-                    if ( ri >= 1 ) result[ ri - 1 ] = 1;
-                    memset( &result[ ri ], 1, offset );
-                    ri += offset;
-                    result[ ri ] = 1;
-#if USE_BIGGER_PRESERVE_BORDER
-                    if ( ri + 1 < rslt->elem_count ) result[ ri + 1 ] = 1;
-#endif
-                }
-                else
-                {
-                    if ( si > 0 )
-                    {
-                        /* Preserve the qualites for the bases bordering the insert */
-#if USE_BIGGER_PRESERVE_BORDER
-                        if ( ri >= 2 ) result[ ri - 2 ] = 1;
-#endif
-                        if ( ri >= 1 ) result[ ri - 1 ] = 1;
-                        result[ ri ] = 1;
-#if USE_BIGGER_PRESERVE_BORDER
-                        if ( ri + 1 < rslt->elem_count ) result[ ri + 1 ] = 1;
-#endif
-                    }
-                    si -= offset;
-                    continue;
-                }
-            }
-            if ( ri >= rslt->elem_count ) break;
-            if ( has_mismatch[ si ] )
-            {
-#if USE_BIGGER_PRESERVE_BORDER
-                if ( ri >= 1 ) result[ ri - 1 ] = 1;
-#endif
-                result[ ri ] = 1;
-#if USE_BIGGER_PRESERVE_BORDER
-                if ( ri + 1 < rslt->elem_count ) result[ ri + 1 ] = 1;
-#endif
-            }
-            ++si;
-            ++ri;
-        }
-    }
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_get_ref_preserve_qual, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = get_ref_preserve_qual_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-
-/*
- * function bool NCBI:align:get_seq_preserve_qual #1
- *    ( bool ref_preserve_qual, bool has_ref_offset, I32 ref_offset );
- */
-static
-rc_t CC get_seq_preserve_qual_impl ( void *data, const VXformInfo *info, int64_t row_id,
-                                    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    bool const *ref_pq             = argv [ 0 ] . u . data . base;
-    bool const *has_ref_offset     = argv [ 1 ] . u . data . base;
-    int32_t const *ref_offset      = argv [ 2 ] . u . data . base;
-    
-    assert( argv[ 0 ].u.data.elem_bits == sizeof( ref_pq[ 0 ] ) * 8 );
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( has_ref_offset[ 0 ] ) * 8 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( ref_offset[ 0 ] ) * 8 );
-    
-    ref_pq         += argv[ 0 ].u.data.first_elem;
-    has_ref_offset += argv[ 1 ].u.data.first_elem;
-    ref_offset     += argv[ 2 ].u.data.first_elem;
-    
-    rslt->data->elem_bits = sizeof( bool ) * 8;
-    rslt->elem_count = argv[ 1 ].u.data.elem_count;
-    rc = KDataBufferResize( rslt->data, rslt->elem_count );
-    if ( rc == 0 )
-    {
-        bool *result = ( bool* )rslt->data->base;
-        unsigned j;
-        unsigned ri;
-        unsigned si;
-        
-        memset( result, 1, ( size_t )( sizeof( result[ 0 ] ) * rslt->elem_count ) );
-        for ( j = ri = si = 0; si < argv[ 1 ].u.data.elem_count; )
-        {
-            if ( has_ref_offset[ si ] )
-            {
-                int offset = ref_offset[ j++ ];
-                
-                if ( offset > 0 )
-                {
-                    ri += offset;
-                }
-                else
-                {
-                    si -= offset;
-                    continue;
-                }
-            }
-            if ( ri >= argv[ 0 ].u.data.elem_count ) break;
-            result[ si ] = ref_pq[ ri ];
-            ++si;
-            ++ri;
-        }
-    }
-
-    return rc;
-}
-
-VTRANSFACT_IMPL ( NCBI_align_get_seq_preserve_qual, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-                                                               VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = get_seq_preserve_qual_impl;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-
-
-/*
- * function ascii NCBI:align:rna_orientation #1 ( NCBI:align:ro_type *ref_offset_type );
- */
-static
-rc_t CC get_rna_orientation(void *data, const VXformInfo *info, int64_t row_id,
-                        VRowResult *rslt, uint32_t argc, const VRowData argv [])
-{
-    rc_t rc;
-    uint8_t const *const offset_type = argc == 1 ? ((uint8_t const *)argv[0].u.data.base) + argv[0].u.data.first_elem : NULL;
-    unsigned const count = argc == 1 ? (unsigned)argv[0].u.data.elem_count : 0;
-
-    assert(argv[ 0 ].u.data.elem_bits == sizeof(offset_type[0]) * 8);
-    
-    rslt->data->elem_bits = sizeof(char) * 8;
-    rslt->elem_count = 1;
-    rc = KDataBufferResize(rslt->data, 1);
-    if ( rc == 0 )
-    {
-        unsigned p_count = 0;
-        unsigned m_count = 0;
-    	unsigned i;
-        char *orient = rslt->data->base;
-        
-        for (i = 0; i < count; ++i) {
-            if (offset_type[i] == NCBI_align_ro_intron_plus)
-                ++p_count;
-            else if (offset_type[i] == NCBI_align_ro_intron_minus)
-                ++m_count;
-        }
-        if (p_count > 0 && m_count == 0)
-            *orient = '+';
-        else if (m_count > 0 && p_count == 0)
-            *orient = '-';
-        else
-            rslt->elem_count = 0;
-    }
-    
-    return rc;
-}
-
-VTRANSFACT_IMPL ( NCBI_align_rna_orientation, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = get_rna_orientation;
-    rslt->variant = vftRow;
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    return 0;
-}
diff --git a/libs/axf/generate-mismatch-qual.c b/libs/axf/generate-mismatch-qual.c
deleted file mode 100644
index e19c1e7..0000000
--- a/libs/axf/generate-mismatch-qual.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-#include <insdc/insdc.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <bitstr.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-enum args {
-    QUAL,
-    HAS_MISMATCH,
-    LEFT_CLIP,
-    RIGHT_CLIP
-};
-
-static
-rc_t CC generate_mismatch_qual ( void *data, const VXformInfo *info,
-    int64_t row_id, VRowResult *rslt, uint32_t argc, const VRowData argv[] )
-{
-    INSDC_quality_phred const *qual = argv[ QUAL ].u.data.base;
-    bool const *has_mismatch = argv[ HAS_MISMATCH ].u.data.base;
-    INSDC_coord_len const *left  = argv[ LEFT_CLIP ].u.data.base;
-    INSDC_coord_len const *right = argv[ RIGHT_CLIP ].u.data.base;
-    unsigned const readlen = ( unsigned const )argv[ QUAL ].u.data.elem_count;
-    INSDC_quality_phred *dst;
-    rc_t rc;
-    unsigned i;
-    unsigned j;
-    
-    assert( argv[ QUAL ].u.data.elem_bits == sizeof( qual[ 0 ] ) * 8 );
-    assert( argv[ HAS_MISMATCH ].u.data.elem_bits == sizeof( has_mismatch[ 0 ] ) * 8 );
-    assert( argv[ LEFT_CLIP ].u.data.elem_bits == sizeof( left[ 0 ] ) * 8 );
-    assert( argv[ RIGHT_CLIP ].u.data.elem_bits == sizeof( right[ 0 ] ) * 8 );
-    assert( argv[ HAS_MISMATCH ].u.data.elem_count == readlen );
-    
-    qual += argv[ QUAL ].u.data.first_elem;
-    has_mismatch += argv[ HAS_MISMATCH ].u.data.first_elem;
-    left  += argv[ LEFT_CLIP  ].u.data.first_elem;
-    right += argv[ RIGHT_CLIP ].u.data.first_elem;
-    
-    rslt->data->elem_bits = argv[ QUAL ].u.data.elem_bits;
-    rc = KDataBufferResize( rslt->data, argv[ QUAL ].u.data.elem_count );
-    if ( rc != 0 )
-        return rc;
-    dst = rslt->data->base;
-    
-    for ( j = 0, i = left[ 0 ]; i != readlen - right[ 0 ]; ++i )
-    {
-        if ( has_mismatch[ i ] )
-            dst[ j++ ] = qual[ i ];
-    }
-    rslt->elem_count = j;
-    return 0;
-}
-
-
-/*
- * function INSDC:quality:phred NCBI:align:generate_mismatch_qual #2 (
- *    INSDC:quality:phred qual, bool has_mismatch,
- *    INSDC:coord:len left_clip, INSDC:coord:len right_clip );
- */
-VTRANSFACT_IMPL ( NCBI_align_generate_mismatch_qual_2, 2, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt -> u . rf = generate_mismatch_qual;
-    rslt -> variant = vftRow;
-    
-    return 0;
-}
-
-static
-rc_t CC compress_quality_impl ( void *data, const VXformInfo *info,
-    int64_t row_id, VRowResult *rslt, uint32_t argc, const VRowData argv[] )
-{
-    INSDC_quality_phred const *qual = argv[ 0 ].u.data.base;
-    bool const *preserve = argv[ 1 ].u.data.base;
-    unsigned const readlen = ( unsigned const )argv[ 0 ].u.data.elem_count;
-    INSDC_quality_phred *dst;
-    rc_t rc;
-    unsigned i;
-    unsigned j;
-    
-    assert( argv[ 0 ].u.data.elem_bits == sizeof( qual[ 0 ] ) * 8 );
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( preserve[ 0 ] ) * 8 );
-    assert( argv[ 1 ].u.data.elem_count == readlen );
-    
-    qual += argv[ 0 ].u.data.first_elem;
-    preserve += argv[ 1 ].u.data.first_elem;
-    
-    rslt->data->elem_bits = argv[ 0 ].u.data.elem_bits;
-    rc = KDataBufferResize( rslt->data, argv[ 0 ].u.data.elem_count );
-    if ( rc != 0 )
-        return rc;
-    dst = rslt->data->base;
-    
-    for ( j = 0, i = 0; i != readlen; ++i )
-    {
-        if ( preserve[ i ] )
-            dst[ j++ ] = qual[ i ];
-    }
-    rslt->elem_count = j;
-    return 0;
-}
-
-
-/*
- * function INSDC:quality:phred NCBI:align:compress_quality #1
- *    ( INSDC:quality:phred quality, bool preserved );
- */
-VTRANSFACT_IMPL ( NCBI_align_compress_quality, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt -> u . rf = compress_quality_impl;
-    rslt -> variant = vftRow;
-    
-    return 0;
-}
diff --git a/libs/axf/get-sam-flags.c b/libs/axf/get-sam-flags.c
deleted file mode 100644
index 632c777..0000000
--- a/libs/axf/get-sam-flags.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <insdc/sra.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-
-/* "properly aligned" fragments according to the aligner
-   may mean minimally that the fragments are on the same
-   chromosome. */
-#define PROPER_ALIGNED_MEANS_SAME_CHROMOSOME 1
-
-
-static
-rc_t CC get_sam_flags_impl(void *data, const VXformInfo *info,
-                           int64_t row_id, VRowResult *rslt,
-                           uint32_t nreads,
-                           uint32_t argc, const VRowData argv [] ) 
-{
-    rc_t 	rc;
-    int32_t	*dst;
-    const INSDC_coord_one  *rid = argv[ 1 ].u.data.base; /* SEQ_READ_ID */
-    const int32_t         *tlen = argv[ 2 ].u.data.base; /* TEMPLATE_LEN */
-    const bool	           *ro1 = argv[ 3 ].u.data.base; /* REF_ORIENTATION */
-    const bool             *ro2 = argv[ 4 ].u.data.base; /* MATE_REF_ORIENTATION */
-    const bool             *sec = argv[ 5 ].u.data.base; 
-    const bool             mate_present = ( argv[ 4 ].u.data.elem_count > 0 );
-    const SRAReadFilter    *flt = argc > 6 ? argv[ 6 ].u.data.base : NULL;
-
-    assert( argv[ 1 ].u.data.elem_count == 1 );
-    assert( argv[ 2 ].u.data.elem_count == 1 );
-    assert( argv[ 3 ].u.data.elem_count == 1 );
-    assert( argv[ 5 ].u.data.elem_count == 1 );
-    
-    rc = KDataBufferResize( rslt->data, 1 );
-    if( rc != 0 )
-        return rc;
-    rslt->elem_count=1;
-    dst = rslt->data->base;
-    dst[ 0 ] = 0;
-    if( nreads == 0 )
-        return 0;
-    
-    rid  += argv[ 1 ].u.data.first_elem;
-    tlen += argv[ 2 ].u.data.first_elem;
-    ro1  += argv[ 3 ].u.data.first_elem;
-    ro2  += argv[ 4 ].u.data.first_elem;
-    sec  += argv[ 5 ].u.data.first_elem;
-    if ( flt != NULL )
-        flt += argv[ 6 ].u.data.first_elem;
-    
-    /***************** SAM FLAGS************
-      Bit  Description
-     0x001 template having multiple fragments in sequencing
-     0x002 each fragment properly aligned according to the aligner
-     0x004 fragment unmapped
-     0x008 next fragment in the template unmapped
-     0x010 SEQ being reverse complemented
-     0x020 SEQ of the next fragment in the template being reversed
-     0x040 the first fragment in the template
-     0x080 the last fragment in the template
-     0x100 secondary alignment
-     0x200 not passing quality controls
-     0x400 PCR or optical duplicate
-    ****************************/
-    if ( ro1[ 0 ] )
-        dst[ 0 ] |= 0x10;
-
-    if ( sec[ 0 ] )
-        dst[ 0 ] |= 0x100;
-
-    if ( nreads > 1 )
-    {
-        if ( rid[ 0 ] == 1 )
-            dst[ 0 ] |= 0x40;
-
-        if ( rid[ 0 ] == nreads )
-            dst[ 0 ] |= 0x80;
-
-        dst[ 0 ] |= 0x1;
-
-        if( mate_present )
-        {
-#if PROPER_ALIGNED_MEANS_SAME_CHROMOSOME
-           if ( tlen[ 0 ] != 0 )
-#endif
-                dst[ 0 ] |= 0x2;
-           if ( ro2 [ 0 ] )
-                dst[ 0 ] |= 0x20;
-        }
-        else
-        {
-            dst[ 0 ] |= 0x8;
-        }
-    }
-
-    if ( flt != NULL )
-    {
-        if ( flt[ 0 ] == SRA_READ_FILTER_REJECT )
-        {
-            dst[ 0 ] |= 0x200;
-        }
-        else if ( flt[ 0 ] == SRA_READ_FILTER_CRITERIA )
-        {
-            dst[ 0 ] |= 0x400;
-        }
-    }
-    return rc;	
-}
-
-
-static
-rc_t CC get_sam_flags_impl_v1(  void  *data, const VXformInfo * info, int64_t row_id,
-                                VRowResult * rslt, uint32_t argc, const VRowData argv [] ) 
-{
-	uint32_t nreads = 0;
-    INSDC_coord_len const *read_len = argv[ 0 ].u.data.base;
-    unsigned i;
-    
-    assert( argv[ 0 ].u.data.elem_bits == sizeof( read_len[ 0 ] ) * 8 );
-    read_len += argv[ 0 ].u.data.first_elem;
-   
-#if 1 
-    for ( i = 0, nreads = 0; i != argv[ 0 ].u.data.elem_count; ++i )
-    {
-        if ( read_len[ i ] != 0 )
-            ++nreads;
-    }
-#else
-    nreads = argv[ 0 ].u.data.elem_count;
-#endif
-
-    return get_sam_flags_impl( data, info, row_id, rslt, nreads, argc, argv );
-}
-
-
-static
-rc_t CC get_sam_flags_impl_v2( void * data,const VXformInfo * info, int64_t row_id,
-                               VRowResult * rslt, uint32_t argc, const VRowData argv [] ) 
-{
-	uint32_t nreads = 1;
-    int64_t const *mate_id = argv[ 0 ].u.data.base;
-    unsigned i;
-    
-    assert( argv[ 0 ].u.data.elem_bits == sizeof( mate_id[ 0 ] ) * 8 );
-    mate_id += argv[ 0 ].u.data.first_elem;
-    
-    for ( i = 0; i != argv[ 0 ].u.data.elem_count; ++i )
-    {
-        if ( mate_id[ i ] != 0 )
-            ++nreads;
-    }
-
-    return get_sam_flags_impl( data, info, row_id, rslt, nreads, argc, argv );
-}
-
-
-/*
- * extern function U32 NCBI:align:get_sam_flags #1 (INSDC:coord:len read_len,
- *                                                  INSDC:coord:one read_id,
- *                                                  I32 template_len,
- *                                                  bool strand,
- *                                                  bool mate_strand,
- *                                                  bool is_secondary);
- *
- */
-VTRANSFACT_IMPL ( NCBI_align_get_sam_flags, 1, 0, 0 ) ( const void *self, const VXfactInfo *info, VFuncDesc *rslt,
-                                                 const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftRow;
-    rslt->u.rf = get_sam_flags_impl_v1;
-    return 0;
-}
-
-
-/*
- * extern function U32 NCBI:align:get_sam_flags #2 (I64 mate_id,
- *                                                  INSDC:coord:one read_id,
- *                                                  I32 template_len,
- *                                                  bool strand,
- *                                                  bool mate_strand,
- *                                                  bool is_secondary);
- *
- */
-VTRANSFACT_IMPL ( NCBI_align_get_sam_flags_2, 2, 0, 0 ) ( const void *self, const VXfactInfo *info, VFuncDesc *rslt,
-                                                       const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftRow;
-    rslt->u.rf = get_sam_flags_impl_v2;
-    return 0;
-}
diff --git a/libs/axf/get_mate_align_ids.c b/libs/axf/get_mate_align_ids.c
deleted file mode 100644
index 0f84374..0000000
--- a/libs/axf/get_mate_align_ids.c
+++ /dev/null
@@ -1,332 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-
-#include <kdb/meta.h>
-
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-#include <klib/sort.h>
-#include <klib/vector.h>
-#include <klib/debug.h>
-
-#include <insdc/sra.h>
-#include <insdc/insdc.h>
-
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <ctype.h>
-
-typedef struct ID_cache_t
-{
-    uint32_t idx;
-    VCursor const *curs;
-    KVector *j_cache;
-    KVector *p_cache;
-}ID_cache_t;
-
-#define MIN_DIFF_TO_CACHE 10000
-#define TMP_CACHE_PAGESIZE (16*1024)
-
-#ifdef _DEBUGGING
-#define SUB_DEBUG(msg) DBGMSG(DBG_SRA,DBG_FLAG(DBG_SRA_SUB),msg)
-#else
-#define SUB_DEBUG(msg)
-#endif
-
-
-#if 0
-static rc_t lookup_mate( ID_cache_t *const self, int64_t const id, int64_t *mateid )
-{
-    return KVectorGetI64( self->j_cache, ( uint64_t )id,mateid );
-}
-
-static rc_t cache_mate( ID_cache_t *self, int64_t id, int64_t mateid )
-{
-    return KVectorSetU64( self->j_cache, ( uint64_t )id, mateid );
-}
-#endif
-
-static rc_t fetch_mates( ID_cache_t *self, int64_t spotid, const int64_t **ids, uint32_t * rlen )
-{
-    rc_t rc = 0;
-    uint32_t elem_bits;
-    uint32_t boff;
-
-    SUB_DEBUG( ( "SUB.Rd in 'get_mate_align_ids.c' at #%lu\n", spotid ) );
-
-    rc = VCursorCellDataDirect( self->curs, spotid, self->idx,&elem_bits, (const void**) ids, &boff, rlen );
-    assert( *rlen == 0 || elem_bits == 64 );
-    assert( boff == 0 );
-    return rc;
-}
-
-static rc_t fetch_mate_id( ID_cache_t *self, int64_t spotid, int64_t const id, int64_t *mateid )
-{
-    rc_t rc = 0;
-    uint32_t rlen;
-    int i;
-    const int64_t *base;
-
-    rc = fetch_mates( self, spotid,&base,&rlen );
-    if ( rc != 0 )
-        return rc;
-    if ( rlen > 2 )
-        return RC( rcXF, rcFunction, rcExecuting, rcConstraint, rcViolated );
-    mateid[ 0 ] = 0;
-    for( i = 0; i < ( int )rlen; i++ )
-    {
-        if ( base[ i ] != id )
-        {
-            mateid[ 0 ] = base[ i ];
-        }
-    }
-    return rc;
-}
-
-
-#if 0
-static rc_t get_mate_algn_id_impl( ID_cache_t *const self,
-                                   int64_t const row,
-                                   int64_t rslt[],
-                                   int64_t const spotid )
-{
-    rc_t rc = 0;
-    bool page_processed = false;
-    int64_t first, first_blob, last, last_blob;
-
-    /** check cache **/
-    rc = lookup_mate( self, row, rslt );
-    if ( rc == 0 )
-        return 0;
-
-    /** Page boundary is defined by the variable "first" **/
-    rc = VCursorPageIdRange( self->curs, self->idx, spotid, &first_blob, &last_blob );
-    if ( rc != 0 )
-        return rc;
-    first = spotid & ~( TMP_CACHE_PAGESIZE - 1 );
-    if ( first < first_blob )
-        first = first_blob;
-    last = first + TMP_CACHE_PAGESIZE -1;
-    if ( last > last_blob )
-        last = last_blob;
-
-    rc = KVectorGetBool( self->p_cache, ( uint64_t )first, &page_processed );
-    if ( rc == 0 && page_processed )
-    {
-        /*** This page was processed before. Row did not need caching. Just fetch Row being asked **/
-        return fetch_mate_id( self, spotid, row, rslt );
-    }
-    else
-    {
-        /** unprocessed page **/
-        int64_t i;
-		rc = KVectorSetBool( self->p_cache, ( uint64_t )first, true ); /** mark as processed **/
-        if( rc != 0 )
-            return rc;
-	
-        for ( i = first; i <= last; i++ )
-        {
-            int64_t	ids[ 2 ] = { 0, 0 };
-            const int64_t *ptr;
-            uint32_t rlen;
-            rc = fetch_mates( self, i, &ptr, &rlen );
-            if ( rc != 0 )
-            {
-                if ( GetRCState ( rc ) == rcNotFound )
-                    rc = 0;
-                else
-                    return rc;
-            }
-            memcpy( ids, ptr, rlen * sizeof( *ptr ) );
-            if ( ids[ 0 ] != 0 && ids[ 1 ] != 0 && labs( ids[ 0 ] - ids[ 1 ] ) > MIN_DIFF_TO_CACHE )
-            {
-                rc = cache_mate( ( ID_cache_t* )self, ids[ 0 ], ids[ 1 ] );
-                if( rc != 0 )
-                    return rc;
-                rc = cache_mate( ( ID_cache_t* )self, ids[ 1 ], ids[ 0 ] );
-                if( rc != 0 )
-                    return rc;
-            }
-            if ( i == spotid )
-            {
-                if( ids[ 0 ] == row )
-                {
-                    rslt[ 0 ] = ids[ 1 ];
-                }
-                else if( ids[ 1 ] == row )
-                {
-                    rslt[ 0 ] = ids[ 0 ];
-                }
-                else
-                {
-                    return RC( rcXF, rcFunction, rcExecuting, rcData, rcInconsistent );
-                } 
-            }
-        }
-    }
-    return rc;
-}
-#endif
-
-
-static rc_t CC get_mate_algn_id_drvr( void * Self,
-                                      const VXformInfo * info,
-                                      int64_t row_id,
-                                      VRowResult *rslt,
-                                      uint32_t argc,
-                                      const VRowData argv [] )
-{
-    rc_t rc;
-    ID_cache_t *self = Self;
-
-    rslt->data->elem_bits = rslt->elem_bits;
-    rc = KDataBufferResize( rslt->data, 1 );
-    if ( rc == 0 )
-    {
-#if 0
-        rc = get_mate_algn_id_impl( self,
-                                    row_id,
-                                    rslt->data->base,
-                                    ( ( int64_t const * )argv[ 0 ].u.data.base )[ argv[ 0 ].u.data.first_elem ] );
-#else
-        rc = fetch_mate_id( self,
-                            ( ( int64_t const * )argv[ 0 ].u.data.base )[ argv[ 0 ].u.data.first_elem ],
-                            row_id,
-                            rslt->data->base );
-#endif
-        if ( rc == 0 )
-        {
-            if ( *( int64_t* )rslt->data->base == 0 )
-                rslt->elem_count = 0;
-            else
-                rslt->elem_count = 1;
-        }
-    }
-    return rc;
-}
-
-
-/* open_sub_cursor */
-static rc_t open_sub_cursor( ID_cache_t *self, const VXfactInfo *info, const VCursor *native_curs )
-{
-    rc_t rc;
-
-    rc = VCursorLinkedCursorGet( native_curs, "SEQUENCE", &self->curs );
-    if ( rc != 0 )
-    {
-        const VDatabase *db;
-        const VTable *tbl;
-        /* get at the parent database */
-        rc = VTableOpenParentRead ( info -> tbl, & db );
-        if ( rc != 0 )
-            return rc;
-        /* open the table */
-        rc = VDatabaseOpenTableRead ( db, &tbl, "SEQUENCE" );
-        VDatabaseRelease ( db );
-        if ( rc != 0 )
-            return rc;
-        /* create a cursor */
-        rc = VTableCreateCachedCursorRead( tbl, &self->curs, 32*1024*1024 );
-        VTableRelease( tbl );
-        if ( rc != 0 )
-            return rc;
-        rc = VCursorPermitPostOpenAdd( self->curs );
-        if ( rc != 0 )
-            return rc;
-        rc = VCursorOpen( self->curs );
-        if ( rc != 0 )
-            return rc;
-        rc = VCursorLinkedCursorSet( native_curs, "SEQUENCE", self->curs );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    rc = VCursorAddColumn( self->curs, &self->idx, "(I64)PRIMARY_ALIGNMENT_ID" );
-    if ( rc == 0 )
-    {
-        rc = KVectorMake( &self->j_cache );
-        if ( rc == 0 )
-            rc = KVectorMake( &self->p_cache );
-        if ( rc == 0 )
-            return 0;
-    }
-    VCursorRelease( self->curs );
-    return rc;
-}
-
-
-/* close_sub_cursor
- */
-static void CC close_sub_cursor( void * data )
-{
-    ID_cache_t *self = data;
-
-    VCursorRelease( self->curs );
-    KVectorRelease( self->j_cache );
-    KVectorRelease( self->p_cache );
-    free( self );
-}
-
-
-/*
- * extern function I64[2] NCBI:align:get_mate_id #1 (I64 spotId);
- */
-VTRANSFACT_IMPL( NCBI_align_get_mate_align_id, 1, 0, 0 ) ( const void * Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    ID_cache_t *self = calloc( 1, sizeof( *self ) );
-
-    if ( self == NULL )
-        return RC( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-
-    SUB_DEBUG( ( "SUB.Make in 'get_mate_align_ids.c'\n" ) );
-
-    rc = open_sub_cursor( self, info, ( const VCursor* )info->parms );
-    if ( rc == 0 ) {
-        rslt->self = self;
-        rslt->u.rf = get_mate_algn_id_drvr;
-        rslt->variant = vftIdDepRow;
-        rslt->whack = close_sub_cursor;
-    }
-    else {
-        free(self);
-    }
-
-    return rc;
-}
diff --git a/libs/axf/make-cmp-read_desc.c b/libs/axf/make-cmp-read_desc.c
deleted file mode 100644
index e05f674..0000000
--- a/libs/axf/make-cmp-read_desc.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/schema.h>
-
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <insdc/insdc.h>
-#include <align/refseq-mgr.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <insdc/sra.h>
-
-static void copy( void * dst, size_t doff, void const * src, size_t soff, size_t bits )
-{
-    if ( ( doff & 7 ) == 0 && ( soff & 7 ) == 0 && ( bits & 7 ) == 0 )
-    {
-        memcpy( &( ( char * )dst )[ doff >> 3 ], &( ( char const * )src )[ soff >> 3 ], bits >> 3 );
-    }
-    else
-    {
-        bitcpy( dst, doff, src, soff, bits );
-    }
-}
-
-
-static
-rc_t CC make_cmp_read_desc_inv_impl( void *data, const VXformInfo *info, int64_t row_id,
-    VFixedRowResult const *rslt, uint32_t argc, VRowData const argv [] )
-{
-    int64_t const *const alignId = &( ( int64_t const * )argv[ 1 ].u.data.base )[ argv[ 1 ].u.data.first_elem ];
-    void const *const ZERO = data;
-    void const *const base = argv[ 0 ].u.data.base;
-    unsigned src = ( unsigned )( argv[ 0 ].u.data.first_elem * rslt->elem_bits );
-    unsigned dst = ( unsigned )(rslt->first_elem * rslt->elem_bits );
-    unsigned i;
-    
-    for ( i = 0; i != rslt->elem_count; ++i )
-    {
-        bool const aligned = alignId[ i ] != 0;
-
-        copy( rslt->base,
-              dst,
-              !aligned ? base : ZERO,
-              !aligned ? src : 0,
-              ( size_t )rslt->elem_bits );
-
-        src += ( unsigned )rslt->elem_bits;
-        dst += ( unsigned )rslt->elem_bits;
-    }
-    return 0;
-}
-
-
-static
-rc_t CC make_cmp_read_desc_impl( void *data, const VXformInfo *info, int64_t row_id,
-    VFixedRowResult const *rslt, uint32_t argc, VRowData const argv [] )
-{
-    int64_t const *const alignId = &( ( int64_t const * )argv[ 1 ].u.data.base )[ argv[ 1 ].u.data.first_elem ];
-    void const *const ZERO = data;
-    void const *const base = argv[ 0 ].u.data.base;
-    unsigned src = ( unsigned )( argv[ 0 ].u.data.first_elem * rslt->elem_bits );
-    unsigned dst = ( unsigned )( rslt->first_elem * rslt->elem_bits );
-    unsigned i;
-    
-    for ( i = 0; i != rslt->elem_count; ++i )
-    {
-        bool const aligned = alignId[ i ] != 0;
-
-        copy( rslt->base,
-              dst,
-              aligned ? base : ZERO,
-              aligned ? src : 0,
-              ( size_t )rslt->elem_bits );
-
-        src += ( unsigned )rslt->elem_bits;
-        dst += ( unsigned )rslt->elem_bits;
-    }
-    return 0;
-}
-
-
-static
-rc_t CC make_read_start_impl( void *data, const VXformInfo *info, int64_t row_id,
-                              VFixedRowResult const *rslt, uint32_t argc, VRowData const argv [] )
-{
-    INSDC_coord_zero *const dst = &( ( INSDC_coord_zero * )rslt->base )[ rslt->first_elem ];
-    INSDC_coord_len const *const readlen = &( ( INSDC_coord_len const * )argv[ 0 ].u.data.base )[ argv[ 0 ].u.data.first_elem ];
-    INSDC_coord_zero start;
-    unsigned i;
-    
-    for ( start = 0, i = 0; i != rslt->elem_count; ++i )
-    {
-        INSDC_coord_len const rlen = readlen[ i ];
-
-        dst[ i ] = start;
-        start += rlen;
-    }
-    return 0;
-}
-
-
-static rc_t make_cmp_read_desc_factory( const void *Self,
-                                        const VXfactInfo *info,
-                                        VFuncDesc *rslt,
-                                        const VFactoryParams *cp,
-                                        const VFunctionParams *dp )
-{
-    rslt->self = calloc( 1, ( info->fdesc.desc.intrinsic_bits * info->fdesc.desc.intrinsic_bits + 7 ) >> 3 );
-    if ( rslt->self == NULL )
-        return RC( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    rslt->whack = free;
-    rslt->u.pf = cp->argv[ 0 ].data.b[ 0 ] ? make_cmp_read_desc_inv_impl : make_cmp_read_desc_impl;
-    rslt->variant = vftFixedRow;
-    return 0;
-}
-
-
-/* 
- * function < type T >
- * T NCBI:align:make_cmp_read_desc #1 <bool invert>(T operand, I64 align_id);
- */
-VTRANSFACT_IMPL ( NCBI_align_make_cmp_read_desc, 1, 0, 0 )
-    ( const void *Self, const VXfactInfo *info, VFuncDesc *rslt,
-      const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    return make_cmp_read_desc_factory( Self, info, rslt, cp, dp );
-}
-
-/*
- * extern function INSDC:coord:zero NCBI:align:make_read_start #1
- *     (INSDC:coord:len read_len, I64 align_id);
- */
-VTRANSFACT_IMPL ( NCBI_align_make_read_start, 1, 0, 0 )
-    ( const void *Self, const VXfactInfo *info, VFuncDesc *rslt,
-      const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.pf = make_read_start_impl;
-    rslt->variant = vftFixedRow;
-    return 0;
-}
diff --git a/libs/axf/mismatch-restore-qual.c b/libs/axf/mismatch-restore-qual.c
deleted file mode 100644
index b3884fc..0000000
--- a/libs/axf/mismatch-restore-qual.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <insdc/insdc.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-
-static
-rc_t CC mismatch_restore_qual_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    unsigned i, j;
-    INSDC_quality_phred const *qual	= argv[ 0 ].u.data.base;
-    unsigned const nqual = ( unsigned const )argv[ 0 ].u.data.elem_count;
-    bool const *mismatch = argv[ 1 ].u.data.base;
-    unsigned const nmis = ( unsigned const )argv[ 1 ].u.data.elem_count;
-    INSDC_quality_phred const rqual = ( INSDC_quality_phred const )( intptr_t )data;
-    INSDC_quality_phred *dst;
-    
-    qual += argv[ 0 ].u.data.first_elem;
-    mismatch += argv[ 1 ].u.data.first_elem;
-    
-    rslt->data->elem_bits = argv[ 0 ].u.data.elem_bits;
-    rc = KDataBufferResize( rslt -> data, nmis );
-    if ( rc != 0 )
-        return rc;
-    rslt -> elem_count = nmis;
-    dst = rslt -> data -> base;
-    
-    for ( j = i = 0; i != nmis; ++i )
-    {
-        dst[ i ] = mismatch[ i ] ? qual[ j++ ] : rqual;
-    }
-    assert( j == nqual );
-    return 0;
-}
-
-
-/* 
- * function INSDC:quality:phred NCBI:align:mismatch_restore_qual #1 < INSDC:quality:phred matched_qual >
- *    ( INSDC:quality:phred mismatch_qual, bool has_mismatch );
- */
-VTRANSFACT_IMPL ( NCBI_align_mismatch_restore_qual, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->self = ( void * )( intptr_t )cp->argv[ 0 ].data.u8[ 0 ];
-    rslt->u.rf = mismatch_restore_qual_impl;
-    rslt->variant = vftRow;
-    rslt -> whack = NULL;
-    return 0;
-}
-
-static
-rc_t CC decompress_quality_impl ( void *data, const VXformInfo *info, int64_t row_id,
-                                  VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    unsigned i, j;
-    INSDC_quality_phred const *qual	= argv[ 0 ].u.data.base;
-    unsigned const nqual = ( unsigned const )argv[ 0 ].u.data.elem_count;
-    bool const *preserved = argv[ 1 ].u.data.base;
-    unsigned const readlen = ( unsigned const )argv[ 1 ].u.data.elem_count;
-    INSDC_quality_phred const rqual = ( INSDC_quality_phred const )( intptr_t )data;
-    INSDC_quality_phred *dst;
-    
-    qual += argv[ 0 ].u.data.first_elem;
-    preserved += argv[ 1 ].u.data.first_elem;
-    
-    rslt->data->elem_bits = argv[ 0 ].u.data.elem_bits;
-    rc = KDataBufferResize( rslt -> data, readlen );
-    if ( rc != 0 )
-        return rc;
-    rslt -> elem_count = readlen;
-    dst = rslt -> data -> base;
-    
-    for ( j = i = 0; i != readlen; ++i )
-    {
-        dst[ i ] = preserved[ i ] ? qual[ j++ ] : rqual;
-    }
-    assert( j == nqual );
-    return 0;
-}
-
-
-/* 
- * function INSDC:quality:phred NCBI:align:decompress_quality #1
- *    < INSDC:quality:phred restored_qual_value >
- *    ( INSDC:quality:phred cmp_quality, bool preserved );
- */
-VTRANSFACT_IMPL ( NCBI_align_decompress_quality, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-                                                              VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->self = ( void * )( intptr_t )cp->argv[ 0 ].data.u8[ 0 ];
-    rslt->u.rf = decompress_quality_impl;
-    rslt->variant = vftRow;
-    rslt -> whack = NULL;
-    return 0;
-}
diff --git a/libs/axf/not-my-row.c b/libs/axf/not-my-row.c
deleted file mode 100644
index 5817276..0000000
--- a/libs/axf/not-my-row.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-static
-rc_t CC not_my_row_impl( void * data, const VXformInfo * info, int64_t row_id,
-                         VRowResult * rslt, uint32_t argc, const VRowData argv [] ) 
-{
-	rc_t 	rc;
-	const int64_t* src = argv[ 0 ].u.data.base;
-	uint32_t len = ( uint32_t )argv[ 0 ].u.data.elem_count;
-	
-	src += argv[ 0 ].u.data.first_elem;
-	assert( argv[ 0 ].u.data.elem_bits == 64 );
-	rc = KDataBufferResize( rslt->data, len );
-	if( rc == 0 )
-    {
-		int64_t *dst;
-		int i, j;
-		dst = rslt->data->base;
-		for( i = j = 0; i < ( int )len; i++ )
-        {
-			if ( src[ i ] != row_id && src[i] > 0 ) /**we used alignment is as 0 to indicate no alignmnent**/
-            {
-				dst[ j++ ] = src[ i ];
-			}
-		}
-		rslt->elem_count = j;
-	}
-	return rc;	
-}
-
-VTRANSFACT_IMPL ( NCBI_align_not_my_row, 1, 0, 0 ) ( const void *self, const VXfactInfo *info, VFuncDesc *rslt,
-                                                 const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftIdDepRow; /*** row_id influences behavior of the function ***/ 
-    rslt->u.ndf = not_my_row_impl;
-    return 0;
-}
diff --git a/libs/axf/project_read_from_sequence.c b/libs/axf/project_read_from_sequence.c
deleted file mode 100644
index f0e95de..0000000
--- a/libs/axf/project_read_from_sequence.c
+++ /dev/null
@@ -1,285 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/debug.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <insdc/insdc.h>
-#include <align/refseq-mgr.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <insdc/sra.h>
-
-#ifdef _DEBUGGING
-#define SUB_DEBUG(msg) DBGMSG(DBG_SRA,DBG_FLAG(DBG_SRA_SUB),msg)
-#else
-#define SUB_DEBUG(msg)
-#endif
-
-typedef struct RestoreRead RestoreRead;
-struct RestoreRead
-{
-    const VCursor *curs;
-    uint32_t col_idx;
-    uint32_t read_len_idx;
-    uint32_t read_start_idx;
-};
-
-static
-void CC RestoreReadWhack ( void *obj )
-{
-    RestoreRead * self = obj;
-    if ( self != NULL )
-    {
-        VCursorRelease ( self -> curs );
-        free ( self );
-    }
-}
-
-static
-rc_t RestoreReadMake ( RestoreRead **objp, const VXfactInfo *info, const VFactoryParams *cp,
-                       const VCursor *native_curs )
-{
-    rc_t rc;
-    RestoreRead * obj;
-
-    SUB_DEBUG( ( "SUB.Make in 'project_read_from_sequence.c'\n" ) );
-
-    /* create the object */
-    obj = malloc ( sizeof ( * obj ) );
-    if ( obj == NULL )
-    {
-        rc = RC ( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        rc = VCursorLinkedCursorGet( native_curs, "SEQUENCE", &obj->curs );
-        if ( rc != 0 )
-        {
-            const VDatabase * db;
-            const VTable * tbl;
-            uint64_t cache_size = 32*1024*1024;
-            uint64_t native_cursor_cache_size = VCursorGetCacheCapacity(native_curs);
-
-            /* get at the parent database */
-            rc = VTableOpenParentRead ( info -> tbl, & db );
-            if ( rc != 0 )
-                return rc;
-
-            /* open the table */
-            rc = VDatabaseOpenTableRead ( db, &tbl, "SEQUENCE" );
-            VDatabaseRelease ( db );
-            if ( rc != 0 )
-                return rc;
-
-            if(native_cursor_cache_size/4 > cache_size){
-                /* share cursor size with native cursor **/
-                cache_size = native_cursor_cache_size/4;
-                native_cursor_cache_size -= cache_size;
-                VCursorSetCacheCapacity((VCursor*)native_curs,native_cursor_cache_size);
-            }
-            /* create a cursor */
-            rc = VTableCreateCachedCursorRead( tbl, &obj->curs, cache_size );
-            VTableRelease( tbl );
-            if ( rc != 0 )
-                return rc;
-
-            rc = VCursorPermitPostOpenAdd( obj->curs );
-            if ( rc != 0 )
-                return rc;
-            rc = VCursorOpen( obj->curs );
-            if ( rc != 0 )
-                return rc;
-            rc = VCursorLinkedCursorSet( native_curs, "SEQUENCE", obj->curs );
-            if ( rc != 0 )
-                return rc;
-        }
-
-        if ( rc == 0 )
-        {
-            /* add columns to cursor */
-            assert ( cp -> argc == 1 );
-            rc = VCursorAddColumn ( obj -> curs, & obj -> col_idx, "%.*s",
-                                    cp -> argv [ 0 ] . count, cp -> argv [ 0 ] . data . ascii );
-            if ( rc == 0 || GetRCState( rc ) == rcExists )
-                rc = VCursorAddColumn ( obj -> curs, & obj -> read_len_idx, "(INSDC:coord:len)READ_LEN" );
-
-            if ( rc == 0 || GetRCState( rc ) == rcExists )
-                rc = VCursorAddColumn ( obj -> curs, & obj -> read_start_idx, "(INSDC:coord:zero)READ_START" );
-
-            if ( rc == 0  || GetRCState( rc ) == rcExists)
-            {
-                VTypedesc src;
-                rc = VCursorDatatype ( obj -> curs, obj -> col_idx, NULL, & src );
-                if ( rc == 0 )
-                {
-                    /* selected column should have same characteristics */
-                    if ( src . domain != info -> fdesc . desc . domain                 ||
-                         src . intrinsic_bits != info -> fdesc . desc . intrinsic_bits ||
-                         src . intrinsic_dim != info -> fdesc . desc. intrinsic_dim )
-                    {
-                        rc = RC ( rcXF, rcFunction, rcConstructing, rcType, rcInconsistent );
-                    }
-                    else if ( ( src . intrinsic_bits & 7 ) != 0 )
-                    {
-                        rc = RC ( rcXF, rcFunction, rcConstructing, rcType, rcUnsupported );
-                    }
-                    else
-                    {
-                        * objp = obj;
-                        return 0;
-                    }
-                }
-            }
-        }
-        free ( obj );
-    }
-    return rc;
-}
-
-
-static
-rc_t CC project_from_sequence_impl ( void *data, const VXformInfo *info,
-    int64_t row_id, VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    RestoreRead *self =  data;
-
-    rc_t rc;
-    INSDC_coord_zero read_id;
-    const int64_t *spot_id = argv [ 0 ] . u . data . base;
-    const INSDC_coord_one *read_id_in = argv [ 1 ] . u . data . base;
-    const INSDC_coord_one *read_start;
-    const INSDC_coord_len *read_len;
-    const void *src;
-    uint32_t src_sz;
-    uint32_t src_bits;
-    uint32_t nreads;
-    uint32_t nreads_2;
-    
-    spot_id += argv [ 0 ] . u . data . first_elem;
-    read_id_in += argv [ 1 ] . u . data . first_elem;
-
-    assert( argv[ 0 ].u.data.elem_bits == 64 );
-    assert( argv[ 0 ].u.data.elem_count == 1 );
-
-    assert( argv[ 1 ].u.data.elem_bits == 32 );
-    assert( argv[ 1 ].u.data.elem_count == 1 );
-
-    if ( spot_id[ 0 ] == 0 ) /*** valid case , the projection should be empty ***/
-    {
-        rslt->elem_count = 0;
-        return 0;
-    }
-    assert( read_id_in[ 0 ] > 0 );
-    read_id = read_id_in[ 0 ] - 1; /** make zero - based **/
-
-    SUB_DEBUG( ( "SUB.Rd in 'project_read_from_sequence.c' at #%lu\n", spot_id[ 0 ] ) );
-
-    rc = VCursorCellDataDirect( self->curs, spot_id[ 0 ], self->read_len_idx,
-                                NULL, ( void const ** )&read_len, NULL, &nreads );
-    if ( rc != 0 )
-        return rc;
-    
-    rc = VCursorCellDataDirect( self->curs, spot_id[ 0 ], self->read_start_idx,
-                                NULL, ( void const ** )&read_start, NULL, &nreads_2 );
-    if ( rc != 0 )
-        return rc;
-    
-    if ( nreads != nreads_2 || read_id >= (INSDC_coord_zero)nreads )
-    {
-        return RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-    }
-    
-    rc = VCursorCellDataDirect( self->curs, spot_id[ 0 ], self->col_idx,
-                                &src_bits, &src, NULL, &src_sz );
-    if ( rc != 0 )
-        return rc;
-    
-    if ( src_sz == nreads )
-    {
-        rslt->elem_count = 1;
-        rslt->data->elem_bits = src_bits;
-        rc = KDataBufferResize( rslt->data, 1 );
-        if ( rc == 0 )
-        {
-            memcpy( rslt->data->base,
-                    &( ( char const * )src )[ ( read_id * src_bits ) >> 3 ],
-                    src_bits >> 3 );
-        }
-    }
-    else if ( src_sz == read_start[ nreads - 1 ] + read_len[ nreads - 1 ] )
-    {
-        /* like READ or QUALITY */
-        rslt->elem_count = read_len[ read_id ];
-        rslt->data->elem_bits = src_bits;
-        rc = KDataBufferResize( rslt->data, rslt->elem_count );
-        if ( rc == 0 )
-        {
-            memcpy( rslt->data->base,
-                    &( ( char const * )src )[ ( read_start[ read_id ] * src_bits ) >> 3 ],
-                    ( size_t )( ( src_bits * rslt->elem_count ) >> 3 ) );
-        }
-    }
-    else
-    {
-        /* don't know how to break up the read or should use simple_sub_select */
-        return RC( rcXF, rcFunction, rcExecuting, rcConstraint, rcViolated );
-    }
-    return 0;
-}
-
-/* 
- * function
- * INSDC:4na:bin NCBI:align:project_from_sequence #1 < ascii col > ( I64 seq_spot_id, INSDC:coord:one seq_read_id )
- *     = ALIGN:project_from_sequence;
- */
-VTRANSFACT_IMPL ( ALIGN_project_from_sequence, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    RestoreRead *fself;
-    rc_t rc = RestoreReadMake ( & fself, info, cp, (const VCursor*)info->parms  );
-    if ( rc == 0 )
-    {
-        rslt->self = fself;
-        rslt->u.ndf = project_from_sequence_impl;
-        rslt->variant = vftRow;
-        rslt -> whack = RestoreReadWhack;
-    }
-    return rc;
-}
diff --git a/libs/axf/raw-restore-qual.c b/libs/axf/raw-restore-qual.c
deleted file mode 100644
index 09c7c6f..0000000
--- a/libs/axf/raw-restore-qual.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <insdc/insdc.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-
-static
-rc_t CC raw_restore_read_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    int i, j;
-    const INSDC_4na_bin	*qual	= argv[ 0 ].u.data.base;
-    const uint32_t	read_len 	= (uint32_t)argv[ 0 ].u.data.elem_count;
-    const uint8_t	*strand		= argv[ 1 ].u.data.base;
-    const uint32_t	strand_len 	= (uint32_t)argv[ 1 ].u.data.elem_count;
-    
-    INSDC_4na_bin *dst;
-    
-    assert( argv[ 0 ].u.data.elem_bits == 8 );
-    assert( argv[ 1 ].u.data.elem_bits == 8 );
-    assert( strand_len == 1 );
-    
-    qual   += argv[ 0 ].u.data.first_elem;
-    strand += argv[ 1 ].u.data.first_elem;
-    
-    /* resize output row for the total number of reads */    
-    rslt -> data -> elem_bits = 8;
-    rc = KDataBufferResize ( rslt -> data, read_len );
-    if ( rc != 0 )
-        return rc;
-    rslt -> elem_count = read_len;
-    dst = rslt -> data -> base;
-    /**** MAIN RESTORATION LOOP ***/
-    if ( strand[ 0 ] == false ) /*** nothing to do **/
-    {
-        memcpy( dst, qual, read_len );
-    } else for ( i = 0, j = read_len - 1; i < (int)read_len; i++, j-- )
-    {
-        dst[ i ] = qual[ j ];
-    }
-    return 0;
-}
-
-
-/* 
- * function
- * INSDC:quality:phred NCBI:align:raw_restore_qual #1( INSDC:quality:phred align_qual, bool ref_orientation);
- */
-VTRANSFACT_IMPL ( NCBI_align_raw_restore_qual, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-
-    rslt->u.rf = raw_restore_read_impl;
-    rslt->variant = vftRow;
-    rslt -> whack = NULL;
-    return 0;
-}
diff --git a/libs/axf/raw-restore-read.c b/libs/axf/raw-restore-read.c
deleted file mode 100644
index 771c849..0000000
--- a/libs/axf/raw-restore-read.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <insdc/insdc.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-
-
-static INSDC_4na_bin  map[]={
-/*0  0000 - 0000*/ 0,
-/*1  0001 - 1000*/ 8,
-/*2  0010 - 0100*/ 4,
-/*3  0011 - 1100*/ 12,
-/*4  0100 - 0010*/ 2,
-/*5  0101 - 1010*/ 10,
-/*6  0110 - 0110*/ 6,
-/*7  0111 - 1110*/ 14,
-/*8  1000 - 0001*/ 1,
-/*9  1001 - 1001*/ 9,
-/*10  1010 - 0101*/ 5,
-/*11  1011 - 1101*/ 13,
-/*12  1100 - 0011*/ 3,
-/*13  1101 - 1011*/ 11,
-/*14  1110 - 0111*/ 7,
-/*15  1111 - 1111*/ 15
-};
-
-
-
-static
-rc_t CC raw_restore_read_impl ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    int i, j;
-    const INSDC_4na_bin	*read 	= argv[ 0 ].u.data.base;
-    const uint32_t	read_len 	= (uint32_t)argv[ 0 ].u.data.elem_count;
-    const uint8_t	*strand		= argv[ 1 ].u.data.base;
-    const uint32_t	strand_len 	= (uint32_t)argv[ 1 ].u.data.elem_count;
-    
-    INSDC_4na_bin *dst;
-    
-    assert( argv[ 0 ].u.data.elem_bits == 8 );
-    assert( argv[ 1 ].u.data.elem_bits == 8 );
-    assert( strand_len == 1 );
-    
-    read   += argv[ 0 ].u.data.first_elem;
-    strand += argv[ 1 ].u.data.first_elem;
-    
-    /* resize output row for the total number of reads */    
-    rslt -> data -> elem_bits = 8;
-    rc = KDataBufferResize ( rslt -> data, read_len );
-    if ( rc != 0 )
-        return rc;
-    rslt -> elem_count = read_len;
-    dst = rslt -> data -> base;
-
-    /**** MAIN RESTORATION LOOP ***/
-    if ( strand[ 0 ] == false ) /*** nothing to do **/
-    {
-        memcpy( dst, read, read_len );
-    }
-    else for ( i = 0, j = read_len - 1; i < (int)read_len; i++, j-- )
-    {
-        dst[ i ] = map[ read[ j ]&15 ];
-    }
-    return 0;
-}
-
-
-/* 
- * function
- * INSDC:4na:bin ALIGN:raw_restore_read #1( INSDC:4na:bin ref_read, bool ref_orientation);
- */
-VTRANSFACT_IMPL ( ALIGN_raw_restore_read, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-
-    rslt->u.rf = raw_restore_read_impl;
-    rslt->variant = vftRow;
-    rslt -> whack = NULL;
-    return 0;
-}
diff --git a/libs/axf/ref-preserve_qual.c b/libs/axf/ref-preserve_qual.c
deleted file mode 100644
index d2fff46..0000000
--- a/libs/axf/ref-preserve_qual.c
+++ /dev/null
@@ -1,429 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <insdc/insdc.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <vdb/cursor.h>
-#include <vdb/database.h>
-#include <vdb/vdb-priv.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <klib/container.h>
-#include <klib/text.h>
-#include <klib/pack.h>
-#include <klib/sort.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-
-struct node {
-    BSTNode link;
-    char const *name;
-    uint8_t *bitmap;
-    int64_t first_row;
-    uint64_t row_count;
-    size_t namelen;
-};
-typedef struct node Node;
-
-static
-int64_t CC NodeNameCmp( void const *a, BSTNode const *n )
-{
-    String b;
-    
-    StringInit( &b, ( ( Node const * )n )->name, ( ( Node const * )n )->namelen,
-                    ( uint32_t )( ( Node const * )n )->namelen );
-    return StringOrderNoNullCheck( a, &b );
-}
-
-static
-int64_t CC NodeCmp( BSTNode const *A, BSTNode const *B )
-{
-    String a;
-    String b;
-    
-    StringInit( &a, ( ( Node const * )A )->name, ( ( Node const * )A )->namelen, 
-                    ( uint32_t )( ( Node const * )A )->namelen );
-    StringInit( &b, ( ( Node const * )B )->name, ( ( Node const * )B )->namelen,
-                    ( uint32_t )( ( Node const * )B )->namelen );
-    return StringOrderNoNullCheck( &a, &b );
-}
-
-static
-void CC NodeWhack( BSTNode *n, void *data )
-{
-    free( n );
-}
-
-
-static
-rc_t NodeProcessIDs( Node *self, unsigned row, VCursor const *curs, uint32_t const cid[],
-                     bool buf[], size_t sz, size_t *bmax, INSDC_coord_len const max_seq_len,
-                     bool isPrimary, int64_t const ID[], unsigned N )
-{
-    rc_t rc = 0;
-    unsigned i;
-    bitsz_t dummy;
-    size_t max = *bmax;
-    
-    for ( i = 0; i != N; ++i )
-    {
-        uint64_t const *globalRefStart;
-        bool const *preserveQual;
-        uint32_t elem_bits;
-        uint32_t boff;
-        uint32_t n;
-        unsigned offset;
-
-        rc = VCursorCellDataDirect( curs, ID[ i ], cid[ 0 ], &elem_bits,
-                                    ( void const ** )&globalRefStart, &boff, &n );
-        if ( rc != 0 )
-            return rc;
-
-        rc = VCursorCellDataDirect( curs, ID[ i ], cid[ 1 ], &elem_bits,
-                                    ( void const ** )&preserveQual, &boff, &n );
-        if ( rc != 0 )
-            return rc;
-        
-        offset = ( globalRefStart[ 0 ] ) % max_seq_len;
-        if ( offset + n > max )
-        {
-            max = offset + n;
-        }
-
-        if ( max >= sz ) 
-        {
-            return RC( rcXF, rcNode, rcConstructing, rcBuffer, rcInsufficient );
-        }
-
-        {
-            unsigned j;
-            
-            for ( j = 0; j != n; ++j )
-            {
-                buf[ j + offset ] |= preserveQual[ j ];
-            }
-        }
-    }
-
-    Pack( 8, 1, buf, max_seq_len, NULL, self->bitmap, ( size_t )row * max_seq_len,
-         ( size_t )self->row_count * max_seq_len, &dummy );
-
-    if ( max > max_seq_len )
-    {
-        max -= max_seq_len;
-        memmove( buf, buf + max_seq_len, max );
-        memset( buf + max, 0, max_seq_len );
-    }
-    else
-    {
-        memset( buf, 0, max );
-        max = 0;
-    }
-    *bmax = max;
-
-    return rc;
-}
-
-
-static
-rc_t OpenAlignCursor( VCursor const **curs, uint32_t cid[], VDatabase const *db, bool isPrimary )
-{
-    char const * tname = isPrimary ? "PRIMARY_ALIGNMENT" : "SECONDARY_ALIGNMENT";
-    VTable const * atbl;
-    rc_t rc = VDatabaseOpenTableRead( db, &atbl, tname );
-    
-    if ( rc == 0 )
-    {
-        VCursor const *acurs;
-        rc = VTableCreateCursorRead( atbl, &acurs );
-        VTableRelease( atbl );
-        
-        while ( rc == 0 )
-        {
-            rc = VCursorAddColumn( acurs, &cid[ 0 ], "(U64)GLOBAL_REF_START" );
-            assert( rc == 0 );
-            if ( rc != 0 )
-                break;
-            
-            rc = VCursorAddColumn( acurs, &cid[ 1 ], "(bool)REF_PRESERVE_QUAL" );
-            assert( rc == 0 );
-            if ( rc != 0 )
-                break;
-            
-            rc = VCursorOpen( acurs );
-            if ( rc != 0 )
-                break;
-
-            *curs = acurs;
-            return 0;
-        }
-        VCursorRelease( acurs );
-    }
-    return rc;
-}
-
-
-static
-rc_t NodeLoadIDs( Node *self, VTable const *tbl, VDatabase const *db, bool buf[],
-                  size_t sz, INSDC_coord_len const max_seq_len, bool isPrimary )
-{
-    char const *cname = isPrimary ? "PRIMARY_ALIGNMENT_IDS" : "SECONDARY_ALIGNMENT_IDS";
-    VCursor const *algn;
-    uint32_t algn_cid[ 2 ];
-    rc_t rc = OpenAlignCursor( &algn, algn_cid, db, isPrimary );
-
-    if ( rc == 0 )
-    {
-        VCursor const *curs;
-        rc = VTableCreateCursorRead( tbl, &curs );
-        
-        if ( rc == 0 )
-        {
-            uint32_t cid;
-            
-            rc = VCursorAddColumn( curs, &cid, cname );
-            if ( rc == 0 )
-            {
-                rc = VCursorOpen( curs );
-                if ( rc == 0 )
-                {
-                    unsigned i;
-                    size_t bmax = 0;
-                    
-                    memset( buf, 0, sz );
-                    for ( i = 0; i != self->row_count; ++i )
-                    {
-                        void const *base;
-                        uint32_t elem_bits;
-                        uint32_t boff;
-                        uint32_t n;
-                        
-                        rc = VCursorCellDataDirect( curs, self->first_row + i, cid,
-                                                    &elem_bits, &base, &boff, &n );
-                        if ( rc != 0 )
-                            break;
-                        if ( n > 0 )
-                        {
-                            rc = NodeProcessIDs( self, i, algn, algn_cid,
-                                                 buf, sz, &bmax, max_seq_len,
-                                                 isPrimary, base, n );
-                            if ( rc != 0 )
-                                break;
-                        }
-                    }
-                }
-            }
-            VCursorRelease( curs );
-        }
-        VCursorRelease( algn );
-    }
-    else if ( !isPrimary )
-        rc = 0;
-    
-    return rc;
-}
-
-
-static
-rc_t NodeLoad( Node *self, VTable const *tbl, VDatabase const *db, bool buf[],
-               size_t sz, INSDC_coord_len const max_seq_len )
-{
-    rc_t rc = NodeLoadIDs( self, tbl, db, buf, sz, max_seq_len, true );
-    if ( rc == 0 )
-    {
-        rc = NodeLoadIDs( self, tbl, db, buf, sz, max_seq_len, false );
-    }
-    return rc;
-}
-
-
-static
-rc_t NodeMake( Node **rslt, VTable const *tbl, String const *refName, INSDC_coord_len const max_seq_len )
-{
-    Node *self;
-    int64_t data[ 2 ];
-    VDatabase const *db;
-    VCursor const *curs;
-    rc_t rc = VTableCreateCursorRead( tbl, &curs );
-    
-    if ( rc == 0 )
-    {
-        uint32_t cid;
-        
-        rc = VCursorAddColumn( curs, &cid, "NAME_RANGE" );
-        if ( rc == 0 )
-        {
-            rc = VCursorParamsSet( ( struct VCursorParams const * )curs, "QUERY_SEQ_NAME", "%.*s",
-                                    refName->len, refName->addr );
-            if ( rc == 0 )
-            {
-                rc = VCursorOpen( curs );
-                if ( rc == 0 )
-                {
-                    rc = VCursorOpenRow( curs );
-                    if ( rc == 0 )
-                    {
-                        uint32_t dummy;
-                        rc = VCursorRead( curs, cid, 64, data, 2, &dummy );
-                    }
-                }
-            }
-        }
-        VCursorRelease( curs );
-    }
-    if ( rc != 0 )
-        return rc;
-    
-    self = malloc( ( size_t )( sizeof( *self ) + refName->len + ( ( ( data[ 1 ] - data[ 0 ] + 1 ) * max_seq_len + 7 ) >> 3 )  ) );
-    if ( self == NULL )
-        return RC( rcXF, rcNode, rcConstructing, rcMemory, rcExhausted );
-    
-    memcpy( &self[ 1 ], refName->addr, self->namelen = refName->len );
-    self->name = ( char const * )&self[ 1 ];
-    self->bitmap = ( uint8_t * )&self->name[ refName->len ];
-    self->row_count = data[ 1 ] - ( self->first_row = data[ 0 ] ) + 1;
-    
-    rc = VTableOpenParentRead( tbl, &db );
-    if ( rc == 0 )
-    {
-        void *scratch = malloc( 32 * max_seq_len );
-        if ( scratch != NULL )
-        {
-            rc = NodeLoad( self, tbl, db, scratch, 32 * max_seq_len, max_seq_len );
-            if ( rc == 0 )
-            {
-                VDatabaseRelease( db );
-                free( scratch );
-                *rslt = self;
-                return 0;
-            }
-            free( scratch );
-        }
-        else
-        {
-            rc = RC( rcXF, rcNode, rcConstructing, rcMemory, rcExhausted );
-        }
-        VDatabaseRelease( db );
-    }
-    free( self );
-    *rslt = NULL;
-    
-    return rc;
-}
-
-
-/* generate_preserve_qual
- *  compute the positions where corresponding qualities should be preserved
- *  when converting to an analysis database.
- * Preserve where:
- *  there is a mismatch
- *  two positions to each side of an insert
- *
- * extern function bool NCBI:align:generate_preserve_qual #1
- *  ( utf8 ref_name, INSDC:coord:len seq_len, U32 max_seq_len );
- */
-static
-rc_t CC generate_preserve_qual_impl( void *Self, VXformInfo const *info,
-                                     int64_t row_id, VRowResult *rslt,
-                                     uint32_t argc, VRowData const argv[] )
-{
-    BSTree *tree = Self;
-    Node *map;
-    rc_t rc;
-    String refName;
-    uint32_t const max_seq_len = ( ( uint32_t const * )argv[ 2 ].u.data.base )[ argv[ 2 ].u.data.first_elem ];
-    INSDC_coord_len const seq_len = ( ( INSDC_coord_len const * )argv[ 1 ].u.data.base )[ argv[ 1 ].u.data.first_elem ];
-
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( seq_len ) * 8 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( max_seq_len ) * 8 );
-    
-    rslt->data->elem_bits = rslt->elem_bits;
-    rslt->elem_count = seq_len;
-    rc = KDataBufferResize( rslt->data, rslt->elem_count );
-    if ( rc != 0 )
-        return rc;
-    memset( rslt->data->base, 0, ( size_t )( ( seq_len * rslt->elem_bits + 7 ) >> 3 ) );
-    return 0;
-
-    /* ??? this code cannot be reached !!! */
-    StringInit( &refName,
-                &( ( char const * )argv[ 0 ].u.data.base )[ argv[ 0 ].u.data.first_elem ],
-                ( size_t )argv[ 0 ].u.data.elem_count,
-                ( uint32_t )argv[ 0 ].u.data.elem_count );
-    map = ( Node * )BSTreeFind( tree, &refName, NodeNameCmp );
-    if ( !map )
-    {
-        rc = NodeMake( &map, info->tbl, &refName, max_seq_len );
-        if ( rc != 0 )
-            return rc;
-        rc = BSTreeInsert( tree, &map->link, NodeCmp );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    {{
-        size_t const start = ( size_t )( ( row_id - map->first_row ) * max_seq_len );
-        size_t dummy;
-        
-        Unpack( 1, 8, map->bitmap, start, seq_len, NULL, rslt->data->base, seq_len, &dummy );
-    }}
-    
-    return 0;
-}
-
-static
-void CC Whack_generate_preserve_qual( void *vp )
-{
-    BSTreeWhack( vp, NodeWhack, NULL );
-    free( vp );
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_generate_preserve_qual, 1, 0, 0 )
-    ( const void *Self, VXfactInfo const *info,
-      VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->self = malloc( sizeof( BSTree ) );
-    if ( rslt->self )
-    {
-        BSTreeInit( ( BSTree * )rslt->self );
-        rslt->u.rf = generate_preserve_qual_impl;
-        rslt->variant = vftIdDepRow;
-        rslt -> whack = Whack_generate_preserve_qual;
-        return 0;
-    }
-    return RC( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-}
diff --git a/libs/axf/ref-restore-read.c b/libs/axf/ref-restore-read.c
deleted file mode 100644
index bdf7400..0000000
--- a/libs/axf/ref-restore-read.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/debug.h>
-
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <vdb/cursor.h>
-#include <vdb/manager.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <insdc/insdc.h>
-#include <align/refseq-mgr.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-
-#ifdef _DEBUGGING
-#define SUB_DEBUG(msg) DBGMSG(DBG_SRA,DBG_FLAG(DBG_SRA_SUB),msg)
-#else
-#define SUB_DEBUG(msg)
-#endif
-
-typedef struct RestoreRead RestoreRead;
-struct RestoreRead
-{
-    const RefSeqMgr* rmgr;
-};
-
-
-static
-void CC RestoreReadWhack ( void *obj )
-{
-    RestoreRead * self = obj;
-    if ( self != NULL )
-    {
-        rc_t rc;
-        rc = RefSeqMgr_Release( self->rmgr );
-        assert( rc == 0 );
-        free( self );
-    }
-}
-
-
-static
-rc_t RestoreReadMake ( RestoreRead **objp, const VDBManager *mgr )
-{
-	rc_t rc = 0;
-	RestoreRead *obj;
-
-	assert( objp != NULL );
-    assert( mgr != NULL );
-
-    obj = calloc( 1, sizeof( *obj ) );
-    if ( obj == NULL )
-    {
-		rc = RC( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        SUB_DEBUG( ( "SUB.Make in 'ref_restore_read.c'\n" ) );
-
-        rc = RefSeqMgr_Make( &obj->rmgr, mgr, errefseq_4NA, 8 * 1024 * 1024, 5 );
-        if ( rc == 0 )
-        {
-		    *objp = obj;
-        }
-        else
-        {
-            *objp = NULL;
-            RestoreReadWhack( obj );
-        }
-	}
-	return rc;
-}
-
-
-static
-rc_t CC ref_restore_read_impl ( void *data, const VXformInfo *info, int64_t row_id,
-                                VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    RestoreRead* self = data;
-    uint8_t* dst;
-    uint32_t read_len     = (uint32_t)argv[ 0 ].u.data.elem_count;
-    const uint8_t *read   = argv[ 0 ].u.data.base;
-    uint32_t seqid_len    = (uint32_t)argv[ 1 ].u.data.elem_count;
-    const char* seqid     = argv[ 1 ].u.data.base;
-    INSDC_coord_one   seq_start;
-    INSDC_coord_len   seq_len;
-
-    assert( argv[ 0 ].u.data.elem_bits == 8 );
-    assert( argv[ 1 ].u.data.elem_bits == 8 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( INSDC_coord_one ) * 8 );
-    assert( argv[ 3 ].u.data.elem_bits == sizeof( INSDC_coord_len ) * 8 );
-    assert( argv[ 2 ].u.data.elem_count == 1 );
-    assert( argv[ 3 ].u.data.elem_count == 1 );
-
-    read   += argv [ 0 ] . u . data . first_elem;
-    seqid  += argv [ 1 ] . u . data . first_elem;
-    seq_start = ( ( INSDC_coord_one* )argv[ 2 ].u.data.base )[ argv[ 2 ].u.data.first_elem ];
-    seq_len   = ( ( INSDC_coord_len* )argv[ 3 ].u.data.base )[ argv[ 3 ].u.data.first_elem ];
-
-    if ( seq_len < read_len )
-    {
-        rc = RC( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-    }
-    else
-    {
-        /* resize output row for the total number of reads */    
-        rslt->data->elem_bits = 8;
-        rc = KDataBufferResize( rslt->data, seq_len );
-        if ( rc == 0 )
-        {
-            rslt->elem_count = seq_len;
-            dst = rslt->data->base;
-
-            if ( seq_len > 0 )
-            {
-                if ( read_len > 0 )
-                {
-                    memcpy( dst, read, read_len );
-                    if ( read_len < seq_len )
-                    {
-                        memset( dst + read_len, 15, seq_len - read_len ); /* pad with 'N' */
-                    }
-                }
-                else if ( seq_start == 0 )
-                {
-                    memset( dst, 15, seq_len ); /* fill with 'N' */
-                }
-                else
-                {
-                    INSDC_coord_len read = 0;
-
-                    SUB_DEBUG( ( "SUB.Rd in 'ref_restore_read.c' at: %.*s at %u.%u\n", seqid_len, seqid, seq_start, seq_len ) );
-
-                    rc = RefSeqMgr_Read( self->rmgr, seqid, seqid_len, seq_start - 1, seq_len, dst, &read );
-                    if ( rc == 0 )
-                    {
-                        if ( read != seq_len )
-                        {
-                            rc = RC( rcXF, rcFunction, rcExecuting, rcData, read < seq_len ? rcTooShort : rcTooLong );
-                        }
-                    }
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-/* 
- * function
- * INSDC:4na:bin ALIGN:ref_restore_read #1 (  INSDC:4na:bin rd , ascii seq_id , INSDC:coord:one seq_start, INSDC:coord:len seq_len);
- */
-VTRANSFACT_IMPL ( ALIGN_ref_restore_read, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-                                                     VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    RestoreRead *fself;
-    rc_t rc = RestoreReadMake ( & fself, info -> mgr);
-    if ( rc == 0 )
-    {
-        rslt->self = fself;
-        rslt->u.ndf = ref_restore_read_impl;
-        rslt->variant = vftRow;
-        rslt -> whack = RestoreReadWhack;
-    }
-    return rc;
-}
diff --git a/libs/axf/ref-tbl-sub-select.c b/libs/axf/ref-tbl-sub-select.c
deleted file mode 100644
index d565b27..0000000
--- a/libs/axf/ref-tbl-sub-select.c
+++ /dev/null
@@ -1,533 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-#include <insdc/insdc.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <klib/debug.h>
-#include <sysalloc.h>
-
-#include <bitstr.h>
-
-#include "ref-tbl.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-#ifdef _DEBUGGING
-#define SUB_DEBUG(msg) DBGMSG(DBG_SRA,DBG_FLAG(DBG_SRA_SUB),msg)
-#else
-#define SUB_DEBUG(msg)
-#endif
-
-
-typedef struct RefTableSubSelect RefTableSubSelect;
-struct RefTableSubSelect
-{
-    rc_t (*func)(struct RefTableSubSelect* self, int64_t ref_row_id,
-                 INSDC_coord_zero offset, INSDC_coord_len ref_len,
-                 uint32_t ref_ploidy, VRowResult* rslt);
-    const VCursor *curs;
-    uint32_t out_idx;
-    union {
-        struct {
-            uint32_t circular_idx;
-            uint32_t name_idx;
-            uint32_t name_range_idx;
-            uint32_t seq_len_idx;
-            uint32_t max_seq_len_idx;
-            uint32_t cmp_read_idx;
-            /* set once upon 1st call */
-            /* set once per each call, if changed from previous */
-            char* name;
-            int64_t start_id;
-            int64_t stop_id;
-            uint32_t name_len;
-            uint32_t max_seq_len;
-            INSDC_coord_len seq_len;
-            bool circular;
-            bool local;
-        } ref;
-        struct {
-            uint32_t ref_id_idx;
-            uint32_t ref_start_idx;
-            uint32_t ref_len_idx;
-            uint32_t read_start_idx;
-            uint32_t read_len_idx;
-            struct RefTableSubSelect* parent;
-        } mod;
-    } u;
-};
-
-/*
-  ref_ploidy != 0 means that offset here is relative to ref_row_id, so it can be
-    negative or positive and can extend between rows within same refseq
-  ref_ploidy means that offset is normal REF_START
- */
-
-static
-rc_t CC REFERENCE_TABLE_sub_select( RefTableSubSelect* self, int64_t ref_row_id,
-                                    INSDC_coord_zero offset, INSDC_coord_len ref_len,
-                                    uint32_t ref_ploidy, VRowResult* rslt )
-{
-    rc_t rc = 0;
-    INSDC_coord_len num_read;
-
-    if ( ref_row_id < self->u.ref.start_id || ref_row_id > self->u.ref.stop_id )
-    {
-        /* update cached ref data if ref has changed */
-        const char* n;
-        uint32_t n_len;
-        struct {
-            int64_t start_id;
-            int64_t stop_id;
-        } *out;
-    
-        SUB_DEBUG( ( "SUB.Rd in 'ref-tbl-sub-select.c' (REF) at #%lu offset %lu\n", ref_row_id, offset ) );
-
-        rc = VCursorCellDataDirect( self->curs, ref_row_id, self->u.ref.name_idx, NULL, ( const void** )&n, NULL, &n_len );
-        if ( rc == 0 )
-        {
-            rc = VCursorParamsSet( ( const struct VCursorParams * )(self->curs), "QUERY_SEQ_NAME", "%.*s", n_len, n );
-            if ( rc == 0 )
-            {
-                rc = VCursorCellDataDirect( self->curs, ref_row_id, self->u.ref.name_range_idx, NULL, (const void**)&out, NULL, NULL );
-                if ( rc == 0 )
-                {
-                    if ( self->u.ref.name_len < n_len )
-                    {
-                        void* p = realloc( self->u.ref.name, n_len );
-                        if ( p == NULL )
-                            rc = RC( rcXF, rcFunction, rcSelecting, rcMemory, rcExhausted );
-                        else
-                            self->u.ref.name = ( char* )p;
-                    }
-
-                    if ( rc == 0 )
-                    {
-                        const bool* c;
-                        INSDC_coord_len* sl;
-                        uint32_t* m;
-                        uint32_t cmp_read_len = 0;
-                        int64_t row;
-                        
-                        memcpy( self->u.ref.name, n, n_len );
-                        self->u.ref.name_len = n_len;
-                        self->u.ref.start_id = out->start_id;
-                        self->u.ref.stop_id = out->stop_id;
-                        for ( row = out->start_id; row <= out->stop_id && cmp_read_len == 0; ++row )
-                        {
-                            uint32_t tmp_len = 0;
-                            void const *dummy = NULL;
-                            
-                            rc = VCursorCellDataDirect( self->curs, row, self->u.ref.cmp_read_idx, NULL, &dummy, NULL, &tmp_len );
-                            if ( rc != 0 ) break;
-                            cmp_read_len += tmp_len;
-                        }
-
-                        if ( rc == 0 )
-                        {
-                            rc = VCursorCellDataDirect( self->curs, self->u.ref.stop_id, self->u.ref.circular_idx, NULL, (const void**)&c, NULL, NULL );
-                            if ( rc == 0 )
-                            {
-                                rc = VCursorCellDataDirect( self->curs, self->u.ref.stop_id, self->u.ref.seq_len_idx, NULL, (const void**)&sl, NULL, NULL );
-                                if ( rc == 0 )
-                                {
-                                    rc = VCursorCellDataDirect( self->curs, self->u.ref.stop_id, self->u.ref.max_seq_len_idx, NULL, (const void**)&m, NULL, NULL);
-                                    if ( rc == 0 )
-                                    {
-                                        self->u.ref.circular = c[ 0 ] || cmp_read_len != 0;
-                                        self->u.ref.seq_len = m[ 0 ] * (INSDC_coord_len)( self->u.ref.stop_id - self->u.ref.start_id ) + sl[0];
-                                        self->u.ref.max_seq_len = m[ 0 ];
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    if ( rc == 0 && ref_ploidy != 0 )
-    {
-        /* convert offset to normal from start of ref relative to current row */
-        offset += self->u.ref.max_seq_len * (INSDC_coord_len)( ref_row_id - self->u.ref.start_id );
-
-        if ( self->u.ref.circular )
-        {
-            /* make offset positive starting from refseq actual start */
-            if ( offset < 0 )
-                offset = self->u.ref.seq_len - ( ( -offset ) % self->u.ref.seq_len );
-            else
-                offset %= self->u.ref.seq_len;
-        }
-        else if ( offset < 0 || offset >= (INSDC_coord_zero)self->u.ref.seq_len )
-            rc = RC( rcXF, rcFunction, rcSelecting, rcData, rcCorrupt );
-
-        ref_row_id = self->u.ref.start_id + offset / self->u.ref.max_seq_len;
-        offset %= self->u.ref.max_seq_len;
-    }
-
-    /* read the data */
-    for ( num_read = 0; rc == 0 && num_read < ref_len && ref_row_id <= self->u.ref.stop_id; offset = 0 )
-    {
-        uint32_t bits;
-        const void* output;
-        uint32_t boff;
-        uint32_t row_len;
-        
-        rc = VCursorCellDataDirect( self->curs, ref_row_id, self->out_idx, &bits, &output, &boff, &row_len );
-        if ( rc == 0 )
-        {
-            /* row_len MUST be > offset */
-            if ( row_len <= (uint32_t)offset )
-                rc = RC(rcXF, rcFunction, rcSelecting, rcData, rcCorrupt);
-            else
-            {
-                row_len -= offset;
-                if ( ref_len < row_len + num_read )
-                    row_len = ref_len - num_read;
-
-                /* copy data */
-                bitcpy( rslt->data->base, rslt->elem_count * bits, output, offset * bits + boff, row_len * bits );
-                rslt->elem_count += row_len;
-                num_read += row_len;
-
-                if ( ++ref_row_id > self->u.ref.stop_id && self->u.ref.circular )
-                    ref_row_id = self->u.ref.start_id;
-            }
-        }
-    }
-
-    /* detect incomplete read */
-    if ( rc == 0 && num_read == 0 )
-        rc = RC( rcXF, rcFunction, rcSelecting, rcTransfer, rcIncomplete );
-
-    return rc;
-}
-
-static
-rc_t CC ALIGN_CMN_TABLE_sub_select(RefTableSubSelect* self, int64_t ref_row_id,
-                                   INSDC_coord_zero offset, INSDC_coord_len ref_len,
-                                   uint32_t ref_ploidy, VRowResult* rslt)
-{
-	rc_t rc=0;
-    INSDC_coord_len num_read = 0;
-    const int64_t* al_ref_id = NULL;
-    int64_t al_ref_id_value;
-    const INSDC_coord_zero* al_ref_start = NULL;
-    
-    SUB_DEBUG( ( "SUB.Rd in 'ref-tbl-sub-select.c' (ALIGN) at #%lu offset %lu\n", ref_row_id, offset ) );
-
-    if ( offset < 0 )
-    {
-        rc = VCursorCellDataDirect( self->curs, ref_row_id, self->u.mod.ref_id_idx, NULL, (void const **)&al_ref_id, NULL, NULL );
-        if ( rc == 0 )
-        {
-            rc = VCursorCellDataDirect( self->curs, ref_row_id, self->u.mod.ref_start_idx, NULL, (void const **)&al_ref_start, NULL, NULL);
-            if ( rc == 0 )
-            {
-                memcpy ( &al_ref_id_value, al_ref_id, sizeof *al_ref_id );
-                if ( -offset > (INSDC_coord_zero)ref_len )
-                {
-                    /* requested chunk is to the left and is not using allele data */
-                    rc = RC( rcXF, rcFunction, rcSelecting, rcData, rcCorrupt );
-                }
-                else
-                {
-                    rc = self->u.mod.parent->func( self->u.mod.parent, al_ref_id_value, offset + al_ref_start[0],
-                                                    -offset, ref_ploidy, rslt );
-                    if ( rc == 0 )
-                    {
-                        /* read left portion of underlying reference */
-                        num_read += (INSDC_coord_len)rslt->elem_count;
-                        offset = 0;
-                    }
-                }
-            }
-        }
-    }
-
-    if ( rc == 0 && num_read < ref_len )
-    {
-        /* copy self */
-        void const* output;
-        uint32_t bits, boff, rs_len, rl_len;
-        const INSDC_coord_zero* rs;
-        const INSDC_coord_len* rl;
-        
-        rc = VCursorCellDataDirect( self->curs, ref_row_id, self->out_idx, &bits, &output, &boff, NULL );
-        if ( rc == 0 )
-        {
-            rc = VCursorCellDataDirect( self->curs, ref_row_id, self->u.mod.read_start_idx, NULL, (void const **)&rs, NULL, &rs_len );
-            if ( rc == 0 )
-            {
-                rc = VCursorCellDataDirect( self->curs, ref_row_id, self->u.mod.read_len_idx, NULL, (void const **)&rl, NULL, &rl_len );
-                if ( rc == 0 )
-                {
-                    assert( rs_len == rl_len );
-                    assert( ref_ploidy > 0 && ref_ploidy <= rl_len );
-                    if ( offset > (INSDC_coord_zero)rl[ ref_ploidy - 1 ] )
-                    {
-                        /* requested chunk starts beyond allele */
-                        rc = RC( rcXF, rcFunction, rcSelecting, rcData, rcCorrupt );
-                    }
-                    else
-                    {
-                        INSDC_coord_len left = ref_len - num_read;
-                        if ( ( rl[ ref_ploidy - 1 ] - offset ) < left )
-                        {
-                            left = rl[ ref_ploidy - 1 ] - offset;
-                        }
-                        bitcpy( rslt->data->base, rslt->elem_count * bits, output, ( rs[ref_ploidy - 1] + offset ) * bits + boff, left * bits );
-                        num_read += left;
-                        rslt->elem_count += left;
-                    }
-                }
-            }
-        }
-    }
-
-    if ( rc == 0 && num_read < ref_len )
-    {
-        const INSDC_coord_len* al_ref_len;
-        /* copy right portion of underlying reference */
-        if ( al_ref_id == NULL || al_ref_start == NULL )
-        {
-            rc = VCursorCellDataDirect( self->curs, ref_row_id, self->u.mod.ref_id_idx, NULL, (void const **)&al_ref_id, NULL, NULL );
-            if ( rc == 0 )
-                rc = VCursorCellDataDirect( self->curs, ref_row_id, self->u.mod.ref_start_idx, NULL, (void const **)&al_ref_start, NULL, NULL );
-        }
-
-        if ( rc == 0 )
-            rc = VCursorCellDataDirect( self->curs, ref_row_id, self->u.mod.ref_len_idx, NULL, (void const **)&al_ref_len, NULL, NULL );
-
-        memcpy ( & al_ref_id_value, al_ref_id, sizeof *al_ref_id );
-        if ( rc == 0 )
-            rc = self->u.mod.parent->func( self->u.mod.parent, al_ref_id_value, al_ref_start[0] + al_ref_len[0],
-                                            ref_len - num_read, ref_ploidy, rslt );
-
-    }
-    return rc;
-}
-
-
-static
-void CC RefTableSubSelect_Whack ( void *obj )
-{
-    if ( obj != NULL )
-    {
-        RefTableSubSelect* self = ( RefTableSubSelect* )obj;
-        VCursorRelease( self->curs );
-        if ( self->func != REFERENCE_TABLE_sub_select )
-        {
-            RefTableSubSelect_Whack( self->u.mod.parent );
-        }
-        else
-        {
-            free( self->u.ref.name );
-        }
-        free( self );
-    }
-}
-
-/* normal way to do it */
-#define IS_ADDED(c, i, n) ((rc = VCursorAddColumn(c, i, "%s", n)) == 0 || \
-                           (GetRCObject(rc) == (enum RCObject)rcColumn && GetRCState(rc) == rcExists))
-
-static
-rc_t RefTableSubSelect_Make( RefTableSubSelect **objp, const VTable *tbl, const VCursor *native_curs, const char* out_col_name )
-{
-    rc_t rc;
-
-    /* create the object */
-    RefTableSubSelect* obj = ( RefTableSubSelect* )calloc( 1, sizeof( *obj ) );
-    if ( obj == NULL )
-    {
-        rc = RC( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        const VTable *reftbl = NULL;
-
-        SUB_DEBUG( ( "SUB.Make in 'ref-tbl-sub-select.c' col=%s\n", out_col_name ) );
-
-        /* open the reference table cursor*/
-        rc = AlignRefTableCursor( tbl, native_curs, &obj->curs, &reftbl );
-        if ( rc == 0 )
-        {
-            /* add columns to cursor */
-            if ( IS_ADDED( obj->curs, &obj->u.ref.circular_idx, "CIRCULAR" ) )
-            {
-                /* normal REFERENCE table */
-                if ( IS_ADDED( obj->curs, &obj->u.ref.name_idx, "(utf8)NAME" ) )
-                {
-                    if ( IS_ADDED( obj->curs, &obj->u.ref.name_range_idx, "NAME_RANGE" ) )
-                    {
-                        if ( IS_ADDED( obj->curs, &obj->u.ref.seq_len_idx, "SEQ_LEN" ) )
-                        {
-                            if ( IS_ADDED( obj->curs, &obj->u.ref.max_seq_len_idx, "MAX_SEQ_LEN" ) )
-                            {
-                                if ( IS_ADDED( obj->curs, &obj->u.ref.cmp_read_idx, "CMP_READ" ) )
-                                {
-                                    obj->func = REFERENCE_TABLE_sub_select;
-                                    rc = 0;
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-            else if ( GetRCObject( rc ) == ( enum RCObject )rcColumn && GetRCState( rc ) == rcNotFound )
-            {
-                /* try as align_cmn */
-                rc = RefTableSubSelect_Make( &obj->u.mod.parent, reftbl, native_curs, out_col_name );
-                if ( rc == 0 )
-                {
-                    if ( IS_ADDED( obj->curs, &obj->u.mod.ref_id_idx, "REF_ID" ) )
-                    {
-                        if ( IS_ADDED( obj->curs, &obj->u.mod.ref_start_idx, "REF_START" ) )
-                        {
-                            if ( IS_ADDED( obj->curs, &obj->u.mod.ref_len_idx, "REF_LEN" ) )
-                            {
-                                if ( IS_ADDED( obj->curs, &obj->u.mod.read_start_idx, "READ_START" ) )
-                                {
-                                    if ( IS_ADDED( obj->curs, &obj->u.mod.read_len_idx, "READ_LEN" ) )
-                                    {
-                                        obj->func = ALIGN_CMN_TABLE_sub_select;
-                                        rc = 0;
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-
-            if ( rc == 0 )
-            {
-                if ( IS_ADDED( obj->curs, &obj->out_idx,  out_col_name ) )
-                    rc = 0;
-            }
-
-            if ( rc == 0 )
-            {
-                *objp = obj;
-                VTableRelease( reftbl );
-                return 0;
-            }
-
-            VCursorRelease( obj->curs );
-        }
-        VTableRelease( reftbl );
-        free( obj );
-    }
-    return rc;
-}
-
-static
-rc_t CC reftbl_sub_select ( void *data, const VXformInfo *info,
-                            int64_t row_id, VRowResult *rslt, uint32_t argc, const VRowData argv[] )
-{
-    rc_t rc;
-    RefTableSubSelect* self = ( RefTableSubSelect* )data;
-    const int64_t* ref_id = ( const int64_t* )argv[ 0 ].u.data.base;
-    const INSDC_coord_zero* ref_start = ( const INSDC_coord_zero* )argv[ 1 ].u.data.base;
-    const INSDC_coord_len* ref_len = ( const INSDC_coord_len* )argv[ 2 ].u.data.base;
-    const uint32_t* ref_ploidy = NULL;
-    
-    if ( argc > 3 )
-    {
-        ref_ploidy = ( const uint32_t* )argv[ 3 ].u.data.base;
-        ref_ploidy += argv[3].u.data.first_elem;
-        assert( argv[ 3 ].u.data.elem_bits == sizeof( *ref_ploidy ) * 8 );
-    }
-    assert( argv[ 0 ].u.data.elem_bits == sizeof( *ref_id ) * 8 );
-    assert( argv[ 1 ].u.data.elem_bits == sizeof( *ref_start ) * 8 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( *ref_len ) * 8 );
-
-    ref_id += argv[ 0 ].u.data.first_elem;
-    ref_start += argv[ 1 ].u.data.first_elem;
-    ref_len += argv[ 2 ].u.data.first_elem;
-
-    /* get the memory for output row */
-    rslt->data->elem_bits = rslt->elem_bits;
-    rc = KDataBufferResize( rslt->data, ref_len[ 0 ] );
-    if ( rc == 0 )
-    {
-        /* must set it to 0 here - functions above accumulate */
-        rslt->elem_count = 0;
-        if ( ref_len[ 0 ] > 0 )
-        {
-            int64_t ref_id_val;
-            memcpy( &ref_id_val, ref_id, sizeof ref_id_val );
-            rc = self->func( self, ref_id_val, ref_start[ 0 ], ref_len[ 0 ], ref_ploidy ? ref_ploidy[ 0 ] : 0, rslt );
-        }
-    }
-
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( ALIGN_ref_sub_select, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    RefTableSubSelect *fself;
-    rc_t rc = RefTableSubSelect_Make( &fself, info -> tbl, ( const VCursor* )info->parms, "(INSDC:4na:bin)READ" );
-    if ( rc == 0 )
-    {
-        rslt -> self = fself;
-        rslt -> whack = RefTableSubSelect_Whack;
-        rslt -> u . ndf = reftbl_sub_select;
-        rslt -> variant = vftRow;
-    }
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_align_ref_sub_select_preserve_qual, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-                                                   VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    RefTableSubSelect *fself;
-    rc_t rc = RefTableSubSelect_Make( & fself, info -> tbl, (const VCursor*)info->parms , "(bool)PRESERVE_QUAL" );
-    if ( rc == 0 )
-    {
-        rslt -> self = fself;
-        rslt -> whack = RefTableSubSelect_Whack;
-        rslt -> u . ndf = reftbl_sub_select;
-        rslt -> variant = vftRow;
-    }
-    return rc;
-}
diff --git a/libs/axf/ref-tbl.c b/libs/axf/ref-tbl.c
deleted file mode 100644
index 50de0a8..0000000
--- a/libs/axf/ref-tbl.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/vdb-priv.h>
-#include <vdb/cursor.h>
-#include <kdb/meta.h>
-#include <klib/rc.h>
-
-#include "ref-tbl.h"
-#include <string.h>
-
-rc_t AlignRefTableCursor( const VTable* table, const VCursor *native_curs,
-                          const VCursor** ref_cursor,const VTable **reftbl )
-{
-	rc_t rc = 0;
-	char ref_tbl_name[ 512 ] = "REFERENCE";
-	const KMetadata * meta;
-	const VCursor * curs;
-
-    rc = VTableOpenMetadataRead( table, &meta );
-	if ( rc == 0 )
-    {
-	    const KMDataNode* node;
-        rc = KMetadataOpenNodeRead( meta, &node, "CONFIG/REF_TABLE" );
-        if ( rc == 0 )
-        {
-            size_t sz;
-            rc = KMDataNodeReadCString( node, ref_tbl_name, sizeof( ref_tbl_name ), &sz );
-            ref_tbl_name[ sz ] = '\0';
-            KMDataNodeRelease( node );
-        }
-        KMetadataRelease( meta );
-    }
-
-	rc = VCursorLinkedCursorGet( native_curs,ref_tbl_name,&curs );
-	if ( rc != 0 )
-    {
-		const VDatabase *db;
-        const VTable *tbl;
-
-        /* get at the parent database */
-        rc = VTableOpenParentRead ( table, & db );
-        if ( rc != 0 )
-            return rc;
-
-        /* open the table */
-        rc = VDatabaseOpenTableRead ( db, &tbl, "%s", ref_tbl_name );
-        VDatabaseRelease ( db );
-        if ( rc != 0 )
-            return rc;
-
-        /* create a cursor */
-        rc = VTableCreateCachedCursorRead( tbl, &curs, 1024*1024*1024 );
-		if ( reftbl != NULL )
-        {
-			*reftbl = tbl;
-        }
-        else
-        {
-			VTableRelease( tbl );
-		}
-        if ( rc != 0 )
-            return rc;
-
-        rc = VCursorPermitPostOpenAdd( curs );
-        if ( rc != 0 )
-            return rc;
-
-        rc = VCursorOpen( curs );
-        if ( rc != 0 )
-            return rc;
-
-        if ( native_curs != NULL )
-            rc = VCursorLinkedCursorSet( native_curs, ref_tbl_name, curs );
-        if ( rc != 0 )
-            return rc;
-
-	}
-	*ref_cursor = curs;
-
-	return 0;
-}
diff --git a/libs/axf/ref-tbl.h b/libs/axf/ref-tbl.h
deleted file mode 100644
index 24cbf80..0000000
--- a/libs/axf/ref-tbl.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_axf_ref_tbl_
-#define _h_axf_ref_tbl_
-
-/* Caller must release ref_cursor */
-rc_t AlignRefTableCursor(const VTable* table, const VCursor *native_curs, const VCursor** ref_cursor, const VTable **reftbl);
-
-#endif /* _h_axf_ref_tbl_ */
diff --git a/libs/axf/refseq-stats.c b/libs/axf/refseq-stats.c
deleted file mode 100644
index 62f0590..0000000
--- a/libs/axf/refseq-stats.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <klib/checksum.h>
-#include <kdb/meta.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-typedef struct refseq_meta_stats_data_struct {
-    uint64_t total_seq_len;
-    uint32_t crc32;
-    MD5State md5;
-    KMDataNode* stats;
-    uint64_t buf_sz;
-    char* buf;
-} refseq_meta_stats_data;
-
-
-static
-void CC refseq_meta_stats_whack( void* self )
-{
-    if( self != NULL ) {
-        refseq_meta_stats_data* data = self;
-        KMDataNodeRelease(data->stats);
-        free(data->buf);
-        free(data);
-    }
-}
-
-static
-rc_t CC refseq_meta_stats( void *self, const VXformInfo *info, int64_t row_id,
-                           VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc = 0;
-    KMDataNode* node;
-    refseq_meta_stats_data* data = self;
-    uint64_t i, seq_len = argv[ 0 ].u.data.elem_count;
-    const INSDC_4na_bin * seq = argv[ 0 ].u.data.base;
-
-    uint64_t read_len = seq_len;
-   
-    seq +=  argv[0].u.data.first_elem;
-
-    if ( argc > 1 )
-    {
-        const INSDC_coord_len * read_len_ptr = argv [ 1 ] . u . data . base;
-        read_len_ptr += argv [ 1 ] . u . data . first_elem;
-        read_len = * read_len_ptr;
-    }
-
-    assert( data != NULL );
-
-    assert ( seq_len <= read_len );
-
-    if ( data->buf_sz < read_len )
-    {
-        char * x = realloc( data->buf, ( size_t )read_len );
-        if ( x == NULL )
-        {
-            rc = RC( rcVDB, rcFunction, rcUpdating, rcMemory, rcExhausted );
-        }
-        else
-        {
-            data->buf = x;
-            data->buf_sz = read_len;
-        }
-    }
-
-    for ( i = 0; rc == 0 && i < seq_len; ++ i )
-    {
-        data->buf[ i ] = INSDC_4na_map_CHARSET[ seq[ i ] ];
-    }
-
-    for ( ; rc == 0 && i < read_len; ++ i )
-    {
-        data->buf[ i ] = 'N';
-    }
-
-    if ( rc == 0 )
-    {
-        rc = KMDataNodeOpenNodeUpdate( data->stats, &node, "TOTAL_SEQ_LEN" );
-        if ( rc == 0 )
-        {
-            if ( data->total_seq_len + read_len < data->total_seq_len )
-            {
-                rc = RC( rcVDB, rcFunction, rcUpdating, rcMetadata, rcOutofrange );
-            }
-            else
-            {
-                data->total_seq_len += read_len;
-                rc = KMDataNodeWriteB64( node, &data->total_seq_len );
-            }
-            KMDataNodeRelease( node );
-        }
-    }
-
-    if ( rc == 0 )
-    {
-        rc = KMDataNodeOpenNodeUpdate( data->stats, &node, "CRC32" );
-        if ( rc == 0 )
-        {
-            data->crc32 = CRC32( data->crc32, data->buf, ( size_t )read_len );
-            rc = KMDataNodeWriteB32( node, &data->crc32 );
-            KMDataNodeRelease( node );
-        }
-    }
-
-    if ( rc == 0 )
-    {
-        rc = KMDataNodeOpenNodeUpdate( data->stats, &node, "MD5" );
-        if ( rc == 0 )
-        {
-            uint8_t digest[ 16 ];
-            MD5State md5;
-            MD5StateAppend( &data->md5, data->buf, ( size_t )read_len );
-            memcpy( &md5, &data->md5, sizeof( md5 ) );
-            MD5StateFinish( &md5, digest );
-            rc = KMDataNodeWrite( node, digest, sizeof( digest ) );
-            KMDataNodeRelease( node );
-        }
-    }
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( NCBI_refSeq_stats, 2, 0, 0 ) ( const void *self, const VXfactInfo *info, VFuncDesc *rslt,
-                                                 const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc = 0;
-
-    if ( dp->argc < 1 )
-    {
-        rc = RC( rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid );
-    }
-    else
-    {
-        refseq_meta_stats_data * data;
-        data = calloc( 1, sizeof( refseq_meta_stats_data ) );
-        if ( data == NULL )
-        {
-            rc = RC( rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted );
-        }
-        else
-        {
-            KMetadata *meta;
-            rc = VTableOpenMetadataUpdate( ( VTable* )info->tbl, &meta );
-            if ( rc == 0 )
-            {
-                rc = KMetadataOpenNodeUpdate( meta, &data->stats, "STATS" );
-                KMetadataRelease( meta );
-            }
-
-            if ( rc == 0 )
-            {
-                rslt->self = data;
-                rslt->whack = refseq_meta_stats_whack;
-                rslt->variant = vftNonDetRow;
-                rslt->u.rf = refseq_meta_stats;
-                data->crc32 = 0;
-                CRC32Init();
-                MD5StateInit( &data->md5 );
-            }
-            else
-            {
-                refseq_meta_stats_whack( data );
-            }
-        }
-    }
-    return rc;
-}
diff --git a/libs/axf/seq-construct-read.c b/libs/axf/seq-construct-read.c
deleted file mode 100644
index 4be2527..0000000
--- a/libs/axf/seq-construct-read.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/schema.h>
-
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <insdc/insdc.h>
-#include <align/refseq-mgr.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <insdc/sra.h>
-
-
-static
-rc_t CC seq_construct_read ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    uint8_t *dst;
-
-    /* base pointers to input data */
-    const uint8_t *aligned = argv [ 0 ] . u . data . base;
-    const INSDC_coord_len *aligned_len = argv [ 1 ] . u . data . base;
-    const uint8_t *unaligned = argv [ 2 ] . u . data . base;
-    const INSDC_coord_len *unaligned_len = argv [ 3 ] . u . data . base;
-
-    /* the number of reads */
-    uint32_t i, seqlen, aligned_seqlen, unaligned_seqlen;
-    uint32_t nreads = (uint32_t)argv [ 1 ] . u . data . elem_count;
-
-    /* require the same dimension for both inputs */
-    if ( argv [ 1 ] . u . data . elem_count != argv [ 3 ] . u . data . elem_count )
-        return RC ( rcXF, rcFunction, rcExecuting, rcData, rcInconsistent );
-
-    /* offset base pointers to start of row */
-    aligned += argv [ 0 ] . u . data . first_elem;
-    aligned_len += argv [ 1 ] . u . data . first_elem;
-    unaligned += argv [ 2 ] . u . data . first_elem;
-    unaligned_len += argv [ 3 ] . u . data . first_elem;
-
-    /* calculate new sequence length */
-    for ( i = seqlen = 0; i < nreads; ++ i )
-        seqlen += unaligned_len [ i ] != 0 ? unaligned_len [ i ] : aligned_len [ i ];
-
-    /* set output buffer size */
-    rslt -> data -> elem_bits = 8;
-    rc = KDataBufferResize ( rslt -> data, seqlen );
-    if ( rc != 0 )
-        return rc;
-
-    /* produce final sequence */
-    for ( dst = rslt -> data -> base, i = seqlen = aligned_seqlen = unaligned_seqlen = 0; i < nreads; ++ i )
-    {
-        /* give preference to unaligned */
-        if ( unaligned_len [ i ] != 0 )
-        {
-            memcpy ( & dst [ seqlen ], & unaligned [ unaligned_seqlen ], unaligned_len [ i ] );
-            seqlen += unaligned_len [ i ];
-        }
-        else
-        {
-            memcpy ( & dst [ seqlen ], & aligned [ aligned_seqlen ], aligned_len [ i ] );
-            seqlen += aligned_len [ i ];
-        }
-
-        aligned_seqlen += aligned_len [ i ];
-        unaligned_seqlen += unaligned_len [ i ];
-    }
-
-    rslt -> elem_count = seqlen;
-
-    return 0;
-}
-
-/* 
- * function < type T >
- * T NCBI:align:seq_construct_read #1 (T     read, INSDC:coord:len     read_len,
- *                                     T cmp_read, INSDC:coord:len cmp_read_len);
- */
-VTRANSFACT_IMPL ( NCBI_align_seq_construct_read, 1, 0, 0 )
-    ( const void *Self, const VXfactInfo *info,
-      VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    if (info->fdesc.desc.intrinsic_bits * info->fdesc.desc.intrinsic_dim != 8)
-        return RC(rcAlign, rcFunction, rcConstructing, rcType, rcIncorrect);
-    rslt->u.ndf = seq_construct_read;
-    rslt->variant = vftRow;
-    return 0;
-}
diff --git a/libs/axf/seq-restore-linkage-group.c b/libs/axf/seq-restore-linkage-group.c
deleted file mode 100644
index 9261d66..0000000
--- a/libs/axf/seq-restore-linkage-group.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/schema.h>
-
-#include <kdb/meta.h>
-
-#include <insdc/insdc.h>
-#include <insdc/sra.h>
-
-#include <align/refseq-mgr.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/debug.h>
-#include <klib/time.h>
-#include <klib/vector.h>
-#include <klib/data-buffer.h>
-#include <klib/sort.h>
-
-#include <vdb/vdb-priv.h>
-
-#include <bitstr.h>
-#include <sysalloc.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-
-#ifdef _DEBUGGING
-#define SUB_DEBUG(msg) DBGMSG(DBG_SRA,DBG_FLAG(DBG_SRA_SUB),msg)
-#else
-#define SUB_DEBUG(msg)
-#endif
-
-typedef struct Restorer Restorer;
-struct Restorer
-{
-    const VCursor *curs;
-    uint32_t colId;
-};
-
-static
-void CC restorerWhack(void *const obj)
-{
-    if (obj != NULL) {
-        Restorer const *const self = obj;
-        VCursorRelease(self->curs);
-    }
-    free(obj);
-}
-
-static
-rc_t CC seqRestoreLinkageGroup(void *const Self,
-                               VXformInfo const *const info,
-                               int64_t const row_id,
-                               VRowResult *const rslt,
-                               uint32_t argc, VRowData const argv[/* argc */])
-{
-    Restorer const *const self = (Restorer const *)Self;
-    int64_t const *const alignId = &((int64_t const *)argv[1].u.data.base)[argv[1].u.data.first_elem];
-    unsigned const n = (unsigned)argv[1].u.data.elem_count;
-    char const *const linkageGroup = &((char const *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-    unsigned const linkageGroupLen = (unsigned)argv[0].u.data.elem_count;
-    int64_t foreignKey = 0;
-    unsigned i;
-
-    assert(argv[0].u.data.elem_bits == 8 * sizeof(linkageGroup[0]));
-    assert(argv[1].u.data.elem_bits == 8 * sizeof(alignId[0]));
-
-    rslt->data->elem_bits = 8;
-    for (i = 0; i < n && foreignKey == 0; ++i) {
-        foreignKey = alignId[i];
-    }
-    if (foreignKey == 0) {
-        rc_t const rc = KDataBufferResize(rslt->data, linkageGroupLen);
-        rslt->elem_count = linkageGroupLen;
-        if (rc == 0)
-            memcpy(rslt->data->base, linkageGroup, linkageGroupLen);
-        return rc;
-    }
-    else {
-        void const *linkageGroup = NULL;
-        uint32_t linkageGroupLen = 0;
-        uint32_t elem_size = 0;
-        uint32_t offset = 0;
-        rc_t const rc = VCursorCellDataDirect(self->curs, foreignKey, self->colId, &elem_size, &linkageGroup, &offset, &linkageGroupLen);
-
-        if (rc == 0) {
-            rc_t const rc = KDataBufferResize(rslt->data, linkageGroupLen);
-            assert(elem_size == rslt->data->elem_bits);
-            assert(offset == 0);
-            rslt->elem_count = linkageGroupLen;
-            if (rc == 0)
-                memcpy(rslt->data->base, linkageGroup, linkageGroupLen);
-            return rc;
-        }
-        return rc;
-    }
-}
-
-
-/* 
- * function
-   ascii NCBI:align:seq_restore_linkage_group #1 ( ascii cmp_linkage_group,
-                                                   I64 align_id )
-
- */
-VTRANSFACT_IMPL ( ALIGN_seq_restore_linkage_group, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-                                                     VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    VCursor const *const nativeCurs = (VCursor const *)info->parms;
-
-    VCursor const *myCurs = NULL;
-    uint32_t colId = 0;
-
-    rc_t rc = VCursorLinkedCursorGet(nativeCurs, "PRIMARY_ALIGNMENT", &myCurs);
-    if (GetRCObject(rc) == rcName && GetRCState(rc) == rcNotFound) {
-        VTable const *tbl = NULL;
-        VDatabase const *db = NULL;
-
-        rc = VTableOpenParentRead(info->tbl, &db);
-        assert(rc == 0 && db != NULL);
-        if (rc != 0 || db == NULL) abort();
-
-        rc = VDatabaseOpenTableRead(db, &tbl, "PRIMARY_ALIGNMENT");
-        VDatabaseRelease(db);
-        if (rc == 0) {
-            rc = VTableCreateCachedCursorRead(tbl, &myCurs, 32UL * 1024UL * 1024UL);
-            VTableRelease(tbl);
-        }
-        if (rc == 0)
-            rc = VCursorLinkedCursorSet(nativeCurs, "PRIMARY_ALIGNMENT", myCurs);
-    }
-    if (rc == 0) {
-        rc = VCursorAddColumn(myCurs, &colId, "LINKAGE_GROUP");
-        if (GetRCState(rc) == rcExists)
-            rc = 0;
-        if (rc == 0)
-            rc = VCursorOpen(myCurs);
-    }
-    if (rc == 0)
-    {
-        Restorer *fself = malloc(sizeof(*fself));
-
-        assert(fself);
-        if (fself == NULL) abort();
-
-        fself->curs = myCurs;
-        fself->colId = colId;
-
-        rslt->self = fself;
-        rslt->u.ndf = seqRestoreLinkageGroup;
-        rslt->variant = vftRow;
-        rslt->whack = restorerWhack;
-    }
-    return rc;
-}
diff --git a/libs/axf/seq-restore-read.c b/libs/axf/seq-restore-read.c
deleted file mode 100644
index f5afb6a..0000000
--- a/libs/axf/seq-restore-read.c
+++ /dev/null
@@ -1,749 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/schema.h>
-
-#include <kdb/meta.h>
-
-#include <insdc/insdc.h>
-#include <insdc/sra.h>
-
-#include <align/refseq-mgr.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/debug.h>
-#include <klib/time.h>
-#include <klib/vector.h>
-#include <klib/data-buffer.h>
-#include <klib/sort.h>
-
-#include <vdb/vdb-priv.h>
-
-#include <bitstr.h>
-#include <sysalloc.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-
-#ifdef _DEBUGGING
-#define SUB_DEBUG(msg) DBGMSG(DBG_SRA,DBG_FLAG(DBG_SRA_SUB),msg)
-#else
-#define SUB_DEBUG(msg)
-#endif
-
-/**********************************
-VERSION     effect
-
-1           in case of random-joins oscillation memory usage
-            prefetch of align-id's in the cursor-cache
-                                                                
-2           in case of random-joins steady memroy usage
-            prefetch of align-id's in dedicated cache
-
-**********************************/
-#define READ_RESTORER_VERSION 2
-#define ROW_ID_INC_COUNT 100
-
-#if READ_RESTORER_VERSION == 2
-
-/* --------------------------- id_list --------------------------- */
-
-
-typedef struct id_list
-{
-    int64_t * list;
-    uint32_t count;
-} id_list;
-
-
-static bool sort_align_ids( const id_list * src, id_list * dst )
-{
-    bool res;
-    dst -> count = 0;
-    dst -> list = malloc( src -> count * sizeof( dst -> list[ 0 ] ) );
-    res = ( dst -> list != NULL );
-    if ( res )
-    {
-        uint32_t i;
-        /* filter out the zero id's */
-        for( i = 0; i < src -> count; i++ )
-        {
-            if ( src -> list[ i ] > 0 )
-                dst -> list[ dst -> count ++ ] = src -> list[ i ];
-        }
-        /* now we can sort */
-        if ( dst -> count > 0 )
-            ksort_int64_t( dst -> list, dst -> count );
-    }
-    return res;
-}
-
-
-/* --------------------------- rr_entry --------------------------- */
-
-typedef struct rr_entry
-{
-    uint32_t read_len;
-    INSDC_4na_bin read[ 1 ];
-} rr_entry;
-
-
-static rc_t rr_entry_release ( uint64_t key, const void * item, void * data )
-{
-    if ( item != NULL )
-        free( ( void * ) item );
-    return 0;
-}
-
-static bool rr_entry_make ( rr_entry ** entry, const INSDC_4na_bin * read, uint32_t read_len )
-{
-    bool res = ( entry != NULL && read != NULL );
-    if ( res )
-    {
-        rr_entry * obj = malloc ( ( sizeof * obj ) + read_len - 1 );
-        res = ( obj != NULL );
-        if ( res )
-        {
-            obj -> read_len = read_len;
-            memcpy( &( obj -> read[ 0 ] ), read, read_len );
-            *entry = obj;
-        }
-    }
-    return res;
-}
-
-
-/* --------------------------- rr_store --------------------------- */
-
-typedef struct rr_store
-{
-    KVector * v;
-    int64_t first_seq_row_id;
-    int64_t last_seq_row_id;
-} rr_store;
-
-
-static void rr_store_release ( rr_store * rr )
-{
-    if ( rr != NULL )
-    {
-        KVectorVisitPtr( rr->v, false, rr_entry_release, NULL );        
-        KVectorRelease ( rr->v );
-        free( ( void * ) rr );
-    }
-}
-
-static rc_t rr_store_make ( rr_store ** rr )
-{
-    rc_t rc;
-    if ( rr == NULL )
-        rc = RC ( rcXF, rcFunction, rcConstructing, rcSelf, rcNull );
-    else
-    {
-        KVector * v;
-        *rr = NULL;
-        rc = KVectorMake ( &v );
-        if ( rc == 0 )
-        {
-            rr_store * obj = malloc ( sizeof * obj );
-            if ( obj == NULL )
-            {
-                KVectorRelease ( v );
-                rc = RC ( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-            }
-            else
-            {
-                obj -> v = v;
-                *rr = obj;
-            }
-        }
-    }
-    return rc;
-}
-
-
-static bool rr_store_alignment( rr_store * rr, int64_t align_id, const VCursor * curs, uint32_t read_idx )
-{
-    bool res = false;
-    const INSDC_4na_bin * read = NULL;
-    uint32_t read_len;
-    rc_t rc = VCursorCellDataDirect( curs, align_id, read_idx, NULL, ( const void** ) &read, NULL, &read_len );
-    if ( rc == 0 )
-    {
-        rr_entry * entry;
-        res = rr_entry_make ( &entry, read, read_len );
-        if ( res )
-        {
-            uint64_t key = ( uint64_t ) align_id;
-            res = ( KVectorSetPtr ( rr -> v, key, entry ) == 0 );
-            if ( !res )
-                rr_entry_release( key, entry, NULL );
-        }
-    }
-    return res;
-}
-
-
-static bool rr_fill_cache( rr_store ** rr, const id_list * ids, const VCursor * curs, uint32_t read_idx,
-    int64_t row_id, int64_t last_row_id )
-{
-    bool res = ( rr_store_make ( rr ) == 0 );
-    if ( res )
-    {
-        id_list sorted;
-        res = sort_align_ids( ids, &sorted );
-        if ( res )
-        {
-            uint32_t i;
-            
-            rr_store * r = * rr;
-            for( i = 0; i < sorted . count; i++ )
-                rr_store_alignment( r, sorted . list[ i ], curs, read_idx );
-            free( ( void * ) sorted . list );
-            
-            r -> first_seq_row_id = row_id;
-            r -> last_seq_row_id = last_row_id;
-        }
-    }
-    return res;
-}
-
-
-static bool rr_get_read ( rr_store * rr, int64_t align_id, rr_entry ** entry )
-{
-    uint64_t key = ( uint64_t ) align_id;
-    bool res = ( KVectorGetPtr ( rr -> v, key, ( void ** )entry ) == 0 );
-    if ( res && ( *entry == NULL ) ) res = false;
-    return res;
-}
-
-#endif
-
-/* ---------------------------------------------------------------- */
-
-typedef struct Read_Restorer Read_Restorer;
-struct Read_Restorer
-{
-    const VCursor *curs;
-    uint32_t read_idx;
-    
-    int64_t  last_row_id;
-    int64_t  first_sequential_row_id;
-    int64_t  prefetch_start_id;
-    int64_t  prefetch_stop_id;
-
-#if READ_RESTORER_VERSION == 2
-    uint32_t row_id_increments;     /* count how often we have an increment of the row_id */
-    rr_store * read_store;          /* if NULL we are not caching... */
-#endif
-};
-
-static
-void CC Read_Restorer_Whack ( void *obj )
-{
-    Read_Restorer * self = obj;
-    if ( self != NULL )
-    {
-        VCursorRelease ( self -> curs );
-#if READ_RESTORER_VERSION == 2
-        rr_store_release ( self -> read_store );
-#endif
-        free ( self );
-    }
-}
-
-
-static
-rc_t open_RR_cursor( Read_Restorer * obj, const VTable *tbl, const VCursor* native_curs, const char * tablename )
-{
-    rc_t rc = VCursorLinkedCursorGet( native_curs, tablename, &obj->curs );
-    if ( rc != 0 )
-    {
-        /* get at the parent database */
-        const VDatabase *db;
-        rc = VTableOpenParentRead ( tbl, & db );
-        if ( rc == 0 )
-        {
-            const VTable *patbl;
-            /* open the primary alignment table */
-            rc = VDatabaseOpenTableRead ( db, & patbl, tablename );
-            VDatabaseRelease ( db );
-            if ( rc == 0 )
-            {
-                /* create a cursor */
-                rc = VTableCreateCachedCursorRead( patbl, &obj->curs, 32*1024*1024UL );
-                /* rc = VTableCreateCursorRead( patbl, &obj->curs ); */
-                VTableRelease ( patbl );
-                if ( rc == 0 )
-                {
-                    /* add columns to cursor */
-                    rc = VCursorAddColumn ( obj -> curs, & obj -> read_idx, "( INSDC:4na:bin ) READ" );
-                    if ( rc == 0 )
-                    {
-                        rc = VCursorOpen ( obj -> curs );
-                        if ( rc == 0 )
-                            rc = VCursorLinkedCursorSet( native_curs, tablename, obj->curs );
-                    }
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-
-static
-rc_t Read_Restorer_Make( Read_Restorer **objp, const VTable *tbl, const VCursor* native_curs )
-{
-    rc_t rc;
-
-    /* create the object */
-    Read_Restorer *obj = malloc ( sizeof * obj );
-    if ( obj == NULL )
-    {
-        *objp = NULL;
-        rc = RC ( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        memset( obj, 0, sizeof * obj );
-        rc = open_RR_cursor( obj, tbl, native_curs, "PRIMARY_ALIGNMENT" );
-        if ( rc == 0 )
-        {
-#if READ_RESTORER_VERSION == 2
-            /* - we have no cache to begin with ( obj->read_store is NULL because of memset above )
-               - we make one if sequential access is detected */
-#endif
-            if ( rc == 0 )
-            {
-                SUB_DEBUG( ( "SUB.Make in 'seq-restore-read.c'\n" ) );
-                * objp = obj;
-            }
-        }
-        if ( rc != 0 )
-            free( obj );
-    }
-    return rc;
-}
-
-
-static INSDC_4na_bin  map[]={
-/*0  0000 - 0000*/ 0,
-/*1  0001 - 1000*/ 8,
-/*2  0010 - 0100*/ 4,
-/*3  0011 - 1100*/ 12,
-/*4  0100 - 0010*/ 2,
-/*5  0101 - 1010*/ 10,
-/*  0110 - 0110*/ 6,
-/*7  0111 - 1110*/ 14,
-/*8  1000 - 0001*/ 1,
-/*9  1001 - 1001*/ 9,
-/*10  1010 - 0101*/ 5,
-/*11  1011 - 1101*/ 13,
-/*12  1100 - 0011*/ 3,
-/*13  1101 - 1011*/ 11,
-/*14  1110 - 0111*/ 7,
-/*15  1111 - 1111*/ 15
-};
-
-#if READ_RESTORER_VERSION == 2
-
-
-/* caching strategy for READ_RESTORER_VERSION_2 */
-static void handle_caching( Read_Restorer * self, id_list * ids, int64_t row_id, int64_t last_row_id )
-{
-    bool is_sequential = ( self -> read_store != NULL );
-    if ( is_sequential )
-    {
-        /* we are in sequential mode, because we have a cache,
-           check if we still are in sequential mode, decrement the age of the cache */
-        bool is_in_cache = ( ( row_id >= self -> read_store -> first_seq_row_id ) &&
-                             ( row_id <= self -> read_store -> last_seq_row_id ) );
-        if ( !is_in_cache )
-        {
-            is_sequential = ( row_id == self -> read_store -> last_seq_row_id + 1 );
-            
-            /* blow away the cache no matter if we are sequential or not */
-            rr_store_release ( self -> read_store );
-            self -> read_store = NULL;
-            self -> row_id_increments = 0;
-            
-            if ( is_sequential )
-            {
-                /* fill it again */
-                if ( !rr_fill_cache( & self -> read_store, ids, self -> curs, self -> read_idx, row_id, last_row_id ) )
-                    self -> read_store = NULL;
-            }
-        }
-    }
-    else
-    {
-        /* we are not in sequential mode, because we do not have a cache
-           count how often we incremented the row-id by 1 to enter sequential mode */
-        if ( row_id == ( self -> last_row_id + 1 ) )
-        {
-            self -> row_id_increments ++;
-            is_sequential = ( self -> row_id_increments > ROW_ID_INC_COUNT );
-            if ( is_sequential )
-            {
-                if ( !rr_fill_cache( & self -> read_store, ids, self -> curs, self -> read_idx, row_id, last_row_id ) )
-                    self -> row_id_increments = 0;
-            }
-        }
-        else
-            self -> row_id_increments = 0;
-    }
-
-    self -> last_row_id = row_id;
-}
-
-/* --------------------------------------------------------------------------------------
-    Strategy for impl2:
-
-    ( 1 ) - keep track of are we in sequential mode, is row_id continoulsy increasing?
-          - if not trow away the cache
-          
-    ( 2 ) - when entering sequential mode, create the cache, fill it with k/v-pairs
-            key ... alignment-id
-            value.. READ
-            
-    ( 3 ) - if in sequential mode, keep track of the row_id beeing in the cache-window
-            if end of window reached: throw away the cache
-
--------------------------------------------------------------------------------------- */
-
-
-/* --------------------------------------------------------------------------------------
-    argv[ 0 ]   ... CMP_READ
-    argv[ 1 ]   ... PRIM_ALIG_ID
-    argv[ 2 ]   ... READ_LEN
-    argv[ 3 ]   ... READ_TYPE
--------------------------------------------------------------------------------------- */
-static rc_t CC seq_restore_read_impl2 ( void *data, const VXformInfo *info, int64_t row_id,
-                                 VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    Read_Restorer   *self = data;
-    INSDC_4na_bin   *dst;
-    INSDC_coord_len len;
-    id_list align_ids;
-    uint32_t i; 
-    uint32_t src_len                 = (uint32_t)argv[ 0 ] . u . data . elem_count;
-    const INSDC_4na_bin * src        = argv[ 0 ] . u . data.base;
-    const uint32_t num_reads         = (uint32_t)argv[ 1 ]. u . data . elem_count;
-    const INSDC_coord_len * read_len = argv[ 2 ] . u . data.base;
-    const uint8_t *read_type         = argv[ 3 ] . u . data.base;
-    int64_t last_row_id              = argv[ 1 ] . blob_stop_id;
-    
-    align_ids.list  = ( int64_t * )argv[ 1 ].u.data.base;
-    align_ids.count = ( uint32_t )( argv[ 1 ].u.data.base_elem_count - argv[ 1 ].u.data.first_elem );
-    
-    assert( argv[ 0 ].u.data.elem_bits == 8 );
-    assert( argv[ 1 ].u.data.elem_bits == 64 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( INSDC_coord_len ) * 8 );
-    assert( argv[ 2 ].u.data.elem_count == num_reads );
-    assert( argv[ 3 ].u.data.elem_count == num_reads );
-    
-    src   += argv [ 0 ] . u . data . first_elem;
-    align_ids.list += argv [ 1 ] . u . data . first_elem;
-    read_len  += argv [ 2 ] . u . data . first_elem;
-    read_type += argv [ 3 ] . u . data . first_elem;
-
-    handle_caching( self, &align_ids, row_id, last_row_id );
-
-    for ( i = 0, len = 0; i < num_reads; i++ )
-        len += read_len[ i ];
-
-    /* resize output row */    
-    rslt->data->elem_bits = 8;
-    rc = KDataBufferResize( rslt->data, len );
-    rslt->elem_count = len;
-    dst = rslt->data->base;
-    
-    if ( rc == 0 && len > 0 )
-    {
-        if ( len == src_len ) /*** shortcut - all data is local ***/
-            memcpy( dst, src, len );
-        else
-        {
-            rr_entry * ep;
-            const INSDC_4na_bin * rd;
-            uint32_t rd_len;
-            bool found_in_cache;
-            
-            for ( i = 0; i < num_reads && rc == 0; i++ ) /*** checking read by read ***/
-            {
-                int64_t align_id = align_ids.list[ i ];
-                if ( align_id > 0 )
-                {
-                    found_in_cache = false;
-                    if ( self -> read_store != NULL )
-                        found_in_cache = rr_get_read ( self -> read_store, align_id, &ep );
-                    if ( found_in_cache )
-                    {
-                        /* we found it in the cache... */
-                        rd = &( ep->read[ 0 ] );
-                        rd_len = ep->read_len;
-                    }
-                    else
-                    {
-                        /* we did not find it in the cache, get it from the alignment-table... */
-                        rc = VCursorCellDataDirect( self -> curs, align_id, self -> read_idx,
-                                                    NULL, ( const void** ) &rd, NULL, &rd_len );
-                    }
-                    
-                    if ( rc == 0 )
-                    {
-                        if ( rd_len == read_len[ i ] )
-                        {
-                            if ( read_type[ i ] & SRA_READ_TYPE_FORWARD )
-                            {
-                                memcpy( dst, rd, read_len[ i ] );
-                            }
-                            else if ( read_type[ i ] & SRA_READ_TYPE_REVERSE )
-                            {
-                                int j, k;
-                                for( j = 0, k = read_len[ i ] - 1; j < (int)read_len[ i ]; j++, k-- )
-                                {
-                                    dst[ j ] = map [ rd[ k ] & 15 ];
-                                }
-                            }
-                            else
-                            {
-                                rc = RC( rcXF, rcFunction, rcExecuting, rcData, rcInconsistent );
-                            }
-                        }
-                        else
-                        {
-                            rc = RC( rcXF, rcFunction, rcExecuting, rcData, rcInconsistent );
-                        }
-                    }
-
-                }
-                else /*** data is in READ column **/
-                {
-                    if ( src_len >= read_len[ i ] )
-                    {
-                        memcpy( dst, src, read_len[ i ] );
-                        src_len -= read_len[ i ];
-                        src     += read_len[ i ];
-                    }
-                    else
-                    {
-                        return RC( rcXF, rcFunction, rcExecuting, rcData, rcInconsistent );
-                    }
-                }
-                dst += read_len[ i ];
-            }
-        }
-    }
-
-    return rc;
-}
-
-#else
-
-static
-rc_t CC seq_restore_read_impl1 ( void *data, const VXformInfo *info, int64_t row_id,
-                                 VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    int i;
-    Read_Restorer   *self = data;
-    INSDC_4na_bin   *dst;
-    INSDC_coord_len     len;
-    uint32_t        src_len     = (uint32_t)argv[ 0 ].u.data.elem_count;
-    const INSDC_4na_bin *src    = argv[ 0 ].u.data.base;
-    const uint32_t  num_reads   = (uint32_t)argv[ 1 ].u.data.elem_count;
-    const int64_t   *align_id   = argv[ 1 ].u.data.base;
-    const INSDC_coord_len *read_len = argv[ 2 ].u.data.base;
-    const uint8_t   *read_type  = argv[ 3 ].u.data.base;
-    bool is_sequential = false;
-    
-    assert( argv[ 0 ].u.data.elem_bits == 8 );
-    assert( argv[ 1 ].u.data.elem_bits == 64 );
-    assert( argv[ 2 ].u.data.elem_bits == sizeof( INSDC_coord_len ) * 8 );
-    assert( argv[ 2 ].u.data.elem_count == num_reads );
-    assert( argv[ 3 ].u.data.elem_count == num_reads );
-    
-    
-    src   += argv [ 0 ] . u . data . first_elem;
-    align_id  += argv [ 1 ] . u . data . first_elem;
-    read_len  += argv [ 2 ] . u . data . first_elem;
-    read_type += argv [ 3 ] . u . data . first_elem;
-
-    if ( row_id != self->last_row_id  && row_id != self->last_row_id + 1 )
-    {
-        self->first_sequential_row_id = row_id;
-        is_sequential = false;
-    }
-    else if ( row_id > self->first_sequential_row_id + 100 )
-    {
-        is_sequential = true;
-    }
-    self->last_row_id = row_id;
-    
-    
-    /* is_sequential = false; forcing it to false ... Sept. 16th 2015 to analyze prefetching */
-    
-    for ( i = 0, len = 0; i < (int)num_reads; i++ )
-    {
-        len += read_len[ i ];
-    }
-
-    /* resize output row */    
-    rslt->data->elem_bits = 8;
-    rc = KDataBufferResize( rslt->data, len );
-    rslt->elem_count = len;
-    dst = rslt->data->base;
-    if ( rc == 0 && len > 0 )
-    {
-        if ( len == src_len ) /*** shortcut - all data is local ***/
-        {
-            memcpy( dst, src, len );
-        }
-        else
-        {
-            if ( is_sequential &&
-                 ( row_id < self->prefetch_start_id || row_id > self->prefetch_stop_id ) )
-            { /* do prefetch */
-                uint32_t num_rows = ( argv[ 1 ].u.data.base_elem_count - argv[ 1 ].u.data.first_elem );
-                
-                /*
-                KTimeMs_t ts = KTimeMsStamp();
-                fprintf( stderr, "\nprefetch row_id #%lu ( start_id #%lu, stop_id #%lu ) num_rows = %d\n", row_id, self->prefetch_start_id, self->prefetch_stop_id, num_rows );
-                */
-                
-                VCursorDataPrefetch( self->curs,
-                                     align_id,
-                                     self->read_idx,
-                                     num_rows,
-                                     1,
-                                     INT64_MAX,
-                                     true );
-                                     
-                /*
-                ts = KTimeMsStamp() - ts;
-                fprintf( stderr, "prefetch done in %lu ms\n", ts );
-                */
-                
-                self->prefetch_start_id=row_id;
-                self->prefetch_stop_id =argv[1].blob_stop_id;
-            }
-            for( i = 0; i < (int)num_reads && rc == 0; i++ ) /*** checking read by read ***/
-            {
-                if ( align_id[ i ] > 0 )
-                {
-                    const INSDC_4na_bin *r_src;
-                    uint32_t             r_src_len;
-
-                    SUB_DEBUG( ( "SUB.Rd in 'seq-restore-read.c' at #%lu\n", align_id[ i ] ) );
-
-                    rc = VCursorCellDataDirect( self -> curs, align_id[ i ], self -> read_idx,
-                                                NULL, ( const void** ) &r_src, NULL, &r_src_len );
-                    if ( rc == 0 )
-                    {
-                        if ( r_src_len == read_len[ i ] )
-                        {
-                            if ( read_type[ i ] & SRA_READ_TYPE_FORWARD )
-                            {
-                                memcpy( dst, r_src, read_len[ i ] );
-                            }
-                            else if ( read_type[ i ] & SRA_READ_TYPE_REVERSE )
-                            {
-                                int j, k;
-                                for( j = 0, k = read_len[ i ] - 1; j < (int)read_len[ i ]; j++, k-- )
-                                {
-                                    dst[ j ] = map [ r_src[ k ] & 15 ];
-                                }
-                            }
-                            else
-                            {
-                                rc = RC( rcXF, rcFunction, rcExecuting, rcData, rcInconsistent );
-                            }
-                        }
-                        else
-                        {
-                            rc = RC( rcXF, rcFunction, rcExecuting, rcData, rcInconsistent );
-                        }
-                    }
-                }
-                else /*** data is in READ column **/
-                {
-                    if ( src_len >= read_len[ i ] )
-                    {
-                        memcpy( dst, src, read_len[ i ] );
-                        src_len -= read_len[ i ];
-                        src     += read_len[ i ];
-                    }
-                    else
-                    {
-                        return RC( rcXF, rcFunction, rcExecuting, rcData, rcInconsistent );
-                    }
-                }
-                dst += read_len[ i ];
-            }
-        }
-    }
-
-    return rc;
-}
-
-#endif
-
-/* 
- * function
-   INSDC:4na:bin NCBI:align:seq_restore_read #1 ( INSDC:4na:bin cmp_rd,
-                                                  I64 align_id,
-                                                  INSDC:coord:len read_len,
-                                                  INSDC:SRA:xread_type rd_type )
-
- */
-VTRANSFACT_IMPL ( ALIGN_seq_restore_read, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-                                                     VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    Read_Restorer * fself;
-    rc_t rc = Read_Restorer_Make ( & fself, info -> tbl,  (const VCursor*)info->parms );
-    if ( rc == 0 )
-    {
-        rslt -> self = fself;
-#if READ_RESTORER_VERSION == 2
-        rslt -> u.ndf = seq_restore_read_impl2;
-#else
-        rslt -> u.ndf = seq_restore_read_impl1;
-#endif
-        rslt -> variant = vftRow;
-        rslt -> whack = Read_Restorer_Whack;
-    }
-    return rc;
-}
diff --git a/libs/axf/template-len.c b/libs/axf/template-len.c
deleted file mode 100644
index 5646c61..0000000
--- a/libs/axf/template-len.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-static
-rc_t CC template_len_impl( void * data, const VXformInfo * info, int64_t row_id,
-                           VRowResult *rslt, uint32_t argc, const VRowData argv [] ) 
-{
-    rc_t 	rc;
-    int32_t	*dst;
-    const INSDC_coord_zero *p1 = argv[ 0 ].u.data.base;     /* REF_POS */
-    const INSDC_coord_zero *p2 = argv[ 1 ].u.data.base;     /* MATE_REF_POS */
-    const INSDC_coord_len  *l1 = argv[ 2 ].u.data.base;     /* REF_LEN */
-    const INSDC_coord_len  *l2 = argv[ 3 ].u.data.base;     /* MATE_REF_LEN */
-    const char             *n1 = argv[ 4 ].u.data.base;     /* REF_NAME */
-    const char             *n2 = argv[ 5 ].u.data.base;     /* MATE_REF_NAME */
-    const INSDC_coord_one  *r1 = argv[ 6 ].u.data.base;     /* SEQ_READ_ID ( 1 or 2 ) */
-
-    /** primary should have everything defines ***/
-    assert( argv[ 0 ].u.data.elem_count == 1 );
-    assert( argv[ 2 ].u.data.elem_count == 1 );
-    assert( argv[ 4 ].u.data.elem_count > 0 );
-    assert( argv[ 6 ].u.data.elem_count == 1 );
-
-    rc = KDataBufferResize( rslt->data, 1 );
-    if ( rc != 0 )
-        return rc;
-    rslt->elem_count = 1;
-    dst = rslt->data->base;
-    dst[ 0 ] = 0;
-
-    /*** check if the mate is mapped **/
-    if ( argv[ 1 ].u.data.elem_count > 0
-         && argv[ 3 ].u.data.elem_count > 0
-         && argv[ 4 ].u.data.elem_count == argv[ 5 ].u.data.elem_count )
-    {
-        n1 += argv[ 4 ].u.data.first_elem;
-        n2 += argv[ 5 ].u.data.first_elem;
-        r1 += argv[ 6 ].u.data.first_elem;
-        
-        if ( argv[ 4 ].u.data.elem_count == argv[ 5 ].u.data.elem_count
-             && memcmp( n1, n2, ( size_t )( argv[ 4 ].u.data.elem_count ) ) == 0 ) /*** same reference name ***/
-        {
-#if 1
-            unsigned const self_left  = p1[ argv[ 0 ].u.data.first_elem ];
-            unsigned const mate_left  = p2[ argv[ 1 ].u.data.first_elem ];
-            unsigned const self_right = self_left + l1[ argv[ 2 ].u.data.first_elem ];
-            unsigned const mate_right = mate_left + l2[ argv[ 3 ].u.data.first_elem ];
-            unsigned const  leftmost  = ( self_left  < mate_left ) ? self_left  : mate_left;
-            unsigned const rightmost  = ( self_right > mate_right ) ? self_right : mate_right;
-            unsigned const tlen = rightmost - leftmost;
-            
-            /* The standard says, "The leftmost segment has a plus sign and the rightmost has a minus sign." */
-            if (   ( self_left <= mate_left && self_right >= mate_right )     /* mate fully contained within self or */
-                || ( mate_left <= self_left && mate_right >= self_right ) )    /* self fully contained within mate; */
-            {
-                if ( self_left < mate_left || ( r1[ 0 ] == 1 && self_left == mate_left ) )
-                    dst[ 0 ] = tlen;
-                else
-                    dst[ 0 ] = -( ( int32_t )tlen );
-            }
-            else if (   ( self_right == mate_right && mate_left == leftmost ) /* both are rightmost, but mate is leftmost */
-                      || self_right == rightmost )
-            {
-                dst[ 0 ] = -( ( int32_t )tlen );
-            }
-            else
-                dst[ 0 ] = tlen;
-#else
-            dst[ 0 ] = p2[ argv[ 1 ].u.data.first_elem ] -  p1[ argv[ 0 ].u.data.first_elem ];
-            if( dst[ 0 ] < 0 )
-            {
-                dst[ 0 ] -= l1[ argv[ 2 ].u.data.first_elem ];
-            }
-            else if ( dst[ 0 ] > 0 )
-            {
-                dst[ 0 ] += l2[ argv[ 3 ].u.data.first_elem ];
-            }
-            else if ( r1[ 0 ] == 1 ) /*** bam wants to give positive TLEN ***/
-            {
-                dst[ 0 ] = l1[ argv[ 2 ].u.data.first_elem ];
-            }
-            else if ( r1[ 0 ] == 2 ) /*** bam wants to give negative TLEN ***/
-            {
-                dst[ 0 ] = -l2[ argv[ 3 ].u.data.first_elem ];
-            } 
-#endif
-        }
-    }
-    return 0;	
-}
-
-VTRANSFACT_IMPL ( NCBI_align_template_len, 1, 0, 0 ) ( const void *self, const VXfactInfo *info, VFuncDesc *rslt,
-                                                 const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftRowFast;
-    rslt->u.rf = template_len_impl;
-    return 0;
-}
diff --git a/libs/blast/Makefile b/libs/blast/Makefile
deleted file mode 100644
index 08a3d0e..0000000
--- a/libs/blast/Makefile
+++ /dev/null
@@ -1,91 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: all
-
-TOP ?= $(abspath ../..)
-
-MODULE = libs/blast
-
-INT_LIBS = \
-
-ALL_LIBS = \
-	$(INT_LIBS) \
-	$(EXT_LIBS)
-
-include $(TOP)/build/Makefile.env
-
-ifeq (64,$(BITS))
-	INT_LIBS += libvdb-blast
-	OBJFILES = $(BLAST_OBJ)
-endif    
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# blast
-#
-$(ILIBDIR)/libvdb-blast: $(addprefix $(ILIBDIR)/libvdb-blast.,$(ILIBEXT))
-
-BLAST_SRC = \
-	blast-mgr \
-	reader \
-	reference \
-	run-set \
-
-BLAST_OBJ = \
-	$(addsuffix .$(LOBX),$(BLAST_SRC))
-
-BLAST_LIB = \
-
-$(ILIBDIR)/libvdb-blast.$(LIBX): $(BLAST_OBJ)
-	$(LD) --slib -o $@ $^ $(BLAST_LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/blast/blast-mgr.c b/libs/blast/blast-mgr.c
deleted file mode 100644
index 584fec4..0000000
--- a/libs/blast/blast-mgr.c
+++ /dev/null
@@ -1,670 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vdb/extern.h>
-#include "blast-mgr.h" /* BTableType */
-#include <kdb/manager.h> /* KDBManagerRelease */
-#include <kdb/meta.h> /* KMetadataRelease */
-#include <kfg/config.h> /* KConfig */
-#include <kfs/directory.h> /* KDirectoryRelease */
-#include <klib/debug.h> /* KDbgSetString */
-#include <klib/log.h> /* KLogLevel */
-#include <klib/out.h>  /* KOutHandlerSetStdOut */
-#include <klib/refcount.h> /* KRefcount */
-#include <klib/status.h> /* STSMSG */
-#include <sra/sraschema.h> /* VDBManagerMakeSRASchema */
-#include <vdb/database.h> /* VDBManagerOpenDBRead */
-#include <vdb/manager.h> /* VDBManager */
-#include <vdb/schema.h> /* VSchema */
-#include <vdb/table.h> /* VDBManagerOpenTableRead */
-#include <vdb/vdb-priv.h> /* VDBManagerOpenKDBManagerRead */
-
-#include <vfs/manager.h> /* VFSManager */
-#include <vfs/path.h> /* VPath */
-#include <vfs/resolver.h> /* VResolver */
-
-#include <sysalloc.h>
-#include <stdio.h> /* fprintf */
-#include <string.h> /* memset */
-
-#define TOOLKIT "sratoolkit2_7_0"
-
-/******************************************************************************/
-
-static const char VDB_BLAST_MGR[] = "VdbBlastMgr";
-
-struct VdbBlastMgr {
-    KRefcount refcount;
-    VSchema *schema;
-    const VDBManager *mgr;
-    const KDBManager *kmgr;
-    VFSManager * vfs;
-    KDirectory *dir;
-    VResolver *resolver;
-};
-
-rc_t _VdbBlastMgrNativeToPosix(const VdbBlastMgr *self,
-    const char *native, char *posix, size_t size)
-{
-    rc_t rc = 0;
-    VPath *temp_v_path = NULL;
-    assert(self);
-    rc = VFSManagerMakeSysPath(self->vfs, &temp_v_path, native);
-    if (rc == 0) {
-        size_t written = 0;
-        rc = VPathReadPath(temp_v_path, posix, size, &written);
-    }
-    RELEASE(VPath, temp_v_path);
-    return rc;
-}
-
-static
-void _VdbBlastMgrWhack(VdbBlastMgr *self)
-{
-    assert(self);
-
-    VSchemaRelease(self->schema);
-    VDBManagerRelease(self->mgr);
-    KDBManagerRelease(self->kmgr);
-    VFSManagerRelease ( self -> vfs );
-    KDirectoryRelease(self->dir);
-    VResolverRelease(self->resolver);
-
-    memset(self, 0, sizeof *self);
-
-    free(self);
-
-    STSMSG(1, ("Deleted VdbBlastMgr"));
-}
-
-LIB_EXPORT
-VdbBlastMgr* CC VdbBlastInit(uint32_t *status)
-{
-    VdbBlastMgr *item = NULL;
-    rc_t rc = 0;
-
-    uint32_t dummy = eVdbBlastNoErr;
-    if (status == NULL)
-    {   status = &dummy; }
-
-    *status = eVdbBlastErr;
-
-    if (getenv(TOOLKIT) != NULL) {
-#if _DEBUGGING
-fprintf(stderr, "DEBUGNG with " TOOLKIT " release\n");
-#else
-fprintf(stderr, "RELEASE with " TOOLKIT " release\n");
-#endif
-    }
-    item = calloc(1, sizeof *item);
-    if (item == NULL) {
-        *status = eVdbBlastMemErr;
-        return item;
-    }
-
-    if ( rc == 0 )
-    {
-        rc = VFSManagerMake ( & item -> vfs );
-        if ( rc != 0 )
-            LOGERR ( klogInt, rc, "Error in VFSManagerMake" );
-    }
-
-    if (rc == 0) {
-        rc = VFSManagerGetCWD( item -> vfs, &item->dir);
-        if (rc != 0)
-        {   LOGERR(klogInt, rc, "Error in VFSManagerGetCWD"); }
-    }
-
-    if (rc == 0) {
-        rc = VDBManagerMakeRead(&item->mgr, NULL);
-        if (rc != 0)
-        {   LOGERR(klogInt, rc, "Error in VDBManagerMakeRead"); }
-    }
-
-    if (rc == 0) {
-        rc = VDBManagerOpenKDBManagerRead(item->mgr, &item->kmgr);
-        if (rc != 0)
-        {   LOGERR(klogInt, rc, "Error in VDBManagerOpenKDBManagerRead"); }
-    }
-
-    if (rc == 0) {
-        rc = VDBManagerMakeSRASchema(item->mgr, &item->schema);
-        if (rc != 0)
-        {   LOGERR(klogInt, rc, "Error in VDBManagerMakeSRASchema"); }
-    }
-
-    if (rc == 0) {
-        VFSManager* mgr = NULL;
-        KConfig* cfg = NULL;
-        if (rc == 0) {
-            rc = VFSManagerMake(&mgr);
-        }
-        if (rc == 0) {
-            rc = KConfigMake(&cfg, NULL);
-        }
-        if (rc == 0) {
-            rc = VFSManagerMakeResolver(mgr, &item->resolver, cfg);
-        }
-        RELEASE(KConfig, cfg);
-        RELEASE(VFSManager, mgr);
-    }
-
-    if (rc != 0) {
-        _VdbBlastMgrWhack(item);
-        item = NULL;
-        STSMSG(1, ("Error: failed to create VdbBlastMgr"));
-    }
-    else {
-        KRefcountInit(&item->refcount, 1, VDB_BLAST_MGR, __func__, "mgr");
-        *status = eVdbBlastNoErr;
-        STSMSG(1, ("Created VdbBlastMgr"));
-    }
-
-    return item;
-}
-
-LIB_EXPORT
-VdbBlastMgr* CC VdbBlastMgrAddRef(VdbBlastMgr *self)
-{
-    if (self == NULL) {
-        STSMSG(2, ("VdbBlastMgrAddRef(NULL)"));
-        return self;
-    }
-
-    if (KRefcountAdd(&self->refcount, VDB_BLAST_MGR) == krefOkay) {
-        STSMSG(2, ("VdbBlastMgrAddRef"));
-        return self;
-    }
-
-    STSMSG(1, ("Error: failed to VdbBlastMgrAddRef"));
-    return NULL;
-}
-
-LIB_EXPORT
-void CC VdbBlastMgrRelease(VdbBlastMgr *self)
-{
-    if (self == NULL)
-    {   return; }
-
-    STSMSG(2, ("VdbBlastMgrRelease"));
-    if (KRefcountDrop(&self->refcount, VDB_BLAST_MGR) != krefWhack)
-    {   return; }
-
-    _VdbBlastMgrWhack(self);
-}
-
-
-LIB_EXPORT bool CC VdbBlastMgrIsCSraRun(
-    const VdbBlastMgr *self, const char *rundesc)
-{
-    bool csra = false;
-    rc_t rc = 0;
-    const VDBManager *aMgr = NULL;
-    const VDBManager *mgr = NULL;
-    const VDatabase *db = NULL;
-    if (self != NULL) {
-        mgr = self->mgr;
-    }
-    if (mgr == NULL) {
-        rc = VDBManagerMakeRead(&mgr, NULL);
-        if (rc != 0) {
-            return false;
-        }
-        if (self != NULL && self->mgr == NULL) {
-            ((VdbBlastMgr*)self)->mgr = mgr;
-        }
-        else {
-            aMgr = mgr;
-        }
-    }
-    rc = VDBManagerOpenDBRead(mgr, &db,
-        self == NULL ? NULL : self->schema, "%s", rundesc);
-    if (rc == 0) {
-        csra = VDatabaseIsCSRA(db);
-    }
-    RELEASE(VDatabase, db);
-    RELEASE(VDBManager, aMgr);
-    return csra;
-}
-
-
-static bool _VdbBlastMgrSchemaEquals(const VdbBlastMgr *self,
-    const VDatabase *db, const char *rundesc,
-    const char* name, uint32_t max_chars)
-{
-    bool equals = false;
-
-    const KMetadata *meta = NULL;
-    const KMDataNode *node = NULL;
-
-    char buffer[512] = "";
-    size_t size = 0;
-
-    rc_t rc = 0;
-
-    assert(self);
-
-    if (db != NULL) {
-        rc = VDatabaseOpenMetadataRead(db, &meta);
-    }
-    else {
-        const VTable *tbl = NULL;
-        rc = VDBManagerOpenTableRead(self->mgr, &tbl, self->schema, rundesc);
-
-        if (rc == 0) {
-            rc = VTableOpenMetadataRead(tbl, &meta);
-        }
-
-        RELEASE(VTable, tbl);
-    }
-
-    if (rc == 0) {
-        rc = KMetadataOpenNodeRead(meta, &node, "schema");
-    }
-
-    if (rc == 0) {
-        rc = KMDataNodeReadAttr(node, "name", buffer, sizeof buffer, &size);
-    }
-
-    if (rc == 0) {
-        STSMSG(1, ("%s.schema at name='%.*s'", rundesc, (uint32_t)size, buffer));
-
-        if (size >= sizeof name && 
-            string_cmp(buffer, max_chars, name, max_chars, max_chars)
-                == 0)
-        {
-            equals = true;
-        }
-    }
-
-    RELEASE(KMDataNode, node);
-    RELEASE(KMetadata, meta);
-
-    return equals;
-}
-
-BTableType _VdbBlastMgrBTableType(
-    const VdbBlastMgr *self, const char *rundesc)
-{
-    BTableType type = btpSRA;
-
-    rc_t rc = 0;
-
-    const VDatabase *db = NULL;
-
-    assert(self);
-
-    rc = VDBManagerOpenDBRead(self->mgr, &db, NULL, rundesc);
-
-    if (rc == 0) {
-        const char name[] = "NCBI:WGS:db:contig";
-
-        if (_VdbBlastMgrSchemaEquals(self, db, rundesc, name, sizeof name - 1))
-        {
-            STSMSG(1, ("%s is WGS", rundesc));
-            type = btpWGS;
-        }
-
-        RELEASE(VDatabase, db);
-    }
-    else {
-        const char name[] = "NCBI:refseq:tbl:reference";
-
-        if (_VdbBlastMgrSchemaEquals(self, db, rundesc, name, sizeof name - 1))
-        {
-            STSMSG(1, ("%s is REFSEQ", rundesc));
-            type = btpREFSEQ;
-        }
-    }
-
-    if (type == btpSRA) {
-        STSMSG(1, ("%s is SRA", rundesc));
-    }
-
-    return type;
-}
-
-static
-VdbBlastStatus _VdbBlastMgrOpenSequenceTable(const VdbBlastMgr *self,
-    const char *path,
-    const VTable **tbl,
-    const VDatabase **db)
-{
-    KPathType type = kptNotFound;
-    VSchema *schema = NULL;
-
-    assert(self && tbl && db);
-    *tbl = NULL;
-
-    /* Always use VDBManagerMakeSRASchema to VDBManagerOpenTableRead
-       Otherwise CMP_BASE_COUNT column sometimes cannot be found */
-    schema = self->schema;
-
-    type = KDBManagerPathType(self->kmgr, "%s", path);
-    if (type == kptNotFound) {
-        STSMSG(1, ("Error: cannot find '%s'", path));
-        return eVdbBlastErr;
-    }
-
-    if ((type & ~kptAlias) == kptDatabase) {
-        const char *table = "SEQUENCE";
-        rc_t rc = VDBManagerOpenDBRead(self->mgr, db, NULL, "%s", path);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error in VDBManagerOpenDBRead($(name))", "name=%s", path));
-            STSMSG(1, ("Error: failed to open DB '%s'", path));
-            return eVdbBlastErr;
-        }
-        assert(*db);
-        rc = VDatabaseOpenTableRead(*db, tbl, table);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error in VDatabaseOpenTableRead($(name), $(tbl))",
-                "name=%s,tbl=%s", path, table));
-            STSMSG(1, ("Error: failed to open DB table '%s/%s'", path, table));
-        }
-        else {
-            STSMSG(1, ("Opened DB table '%s/%s'", path, table));
-        }
-
-        return rc != 0 ? eVdbBlastErr : eVdbBlastNoErr;
-    }
-
-    while (true) {
-        rc_t rc = VDBManagerOpenTableRead(self->mgr, tbl, schema, "%s", path);
-        if (rc == 0) {
-            if (schema == NULL) {
-                STSMSG(1, ("Opened table '%s'(schema=NULL)", path));
-            }
-            else {
-                STSMSG(1, ("Opened table '%s'(SRASchema)", path));
-            }
-            return eVdbBlastNoErr;
-        }
-
-        assert(self->schema);
-
-        if (schema == NULL)
-        {   schema = self->schema; }
-        else {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error in VDBManagerOpenTableRead($(name))", "name=%s", path));
-            STSMSG(1, ("Error: failed to open table '%s'", path));
-            return eVdbBlastRunErr;
-        }
-    }
-}
-
-VdbBlastStatus _VdbBlastMgrFindNOpenSeqTable(const VdbBlastMgr *self,
-    const char *rundesc,
-    const VTable **tbl,
-    BTableType *type,
-    char **fullpath,
-    const VDatabase **db)
-{
-    VdbBlastStatus status = eVdbBlastNoErr;
-    char *path = (char*) rundesc;
-
-    assert(self && type);
-
-    status = _VdbBlastMgrOpenSequenceTable(self, path, tbl, db);
-    if (status == eVdbBlastNoErr) {
-        STSMSG(1, ("Added run %s(%s)", rundesc, path));
-    }
-    else {
-        STSMSG(1, ("Error: failed to add run %s(%s)", rundesc, path));
-    }
-
-    *type = _VdbBlastMgrBTableType(self, path);
-
-    if (path != rundesc) {
-        free(path);
-        path = NULL;
-    }
-
-    return status;
-}
-
-/******************************************************************************/
-
-/* KConfigPrint
- * print current configuration to the output handler
- */
-LIB_EXPORT uint32_t VdbBlastMgrKConfigPrint(const VdbBlastMgr *self) {
-    KConfig *kfg = NULL;
-
-    rc_t rc = KConfigMake(&kfg, NULL);
-
-    if (rc == 0) {
-        rc = KConfigPrint(kfg, 0);
-    }
-
-    {
-        rc_t rc2 = KConfigRelease(kfg);
-        if (rc == 0 && rc2 != 0) {
-            rc = rc2;
-        }
-    }
-
-    if (rc != 0) {
-        LOGERR(klogInt, rc, "An error occured when printing Configiration");
-        return eVdbBlastErr;
-    }
-
-    return eVdbBlastNoErr;
-}
-
-LIB_EXPORT uint32_t CC VdbBlastMgrKDbgSetString(const VdbBlastMgr *self,
-    const char *string)
-{
-    rc_t rc = KDbgSetString(string);
-
-    if (rc != 0) {
-        LOGERR(klogInt, rc, "An error occured when setting KDbgString");
-        return eVdbBlastErr;
-    }
-
-    return eVdbBlastNoErr;
-}
-
-LIB_EXPORT uint32_t CC VdbBlastMgrKLogHandlerSet(const VdbBlastMgr *self,
-    KWrtWriter writer, void *data)
-{
-    rc_t rc = KLogHandlerSet(writer, data);
-
-    if (rc != 0) {
-        LOGERR(klogInt, rc, "An error occured when setting KLogHandler");
-        return eVdbBlastErr;
-    }
-
-    return eVdbBlastNoErr;
-}
-
-LIB_EXPORT uint32_t CC VdbBlastMgrKLogHandlerSetStdErr(
-    const VdbBlastMgr *self)
-{
-    rc_t rc = KLogHandlerSetStdErr();
-
-    if (rc != 0) {
-        LOGERR(
-            klogInt, rc, "An error occured when setting KLogHandler to StdErr");
-        return eVdbBlastErr;
-    }
-
-    return eVdbBlastNoErr;
-}
-
-LIB_EXPORT uint32_t CC VdbBlastMgrKLogHandlerSetStdOut(
-    const VdbBlastMgr *self)
-{
-    rc_t rc = KLogHandlerSetStdOut();
-
-    if (rc != 0) {
-        LOGERR(
-            klogInt, rc, "An error occured when setting KLogHandler to StdOut");
-        return eVdbBlastErr;
-    }
-
-    return eVdbBlastNoErr;
-}
-
-LIB_EXPORT uint32_t CC VdbBlastMgrKLogLibHandlerSet(const VdbBlastMgr *self,
-    KWrtWriter writer, void *data)
-{
-    rc_t rc = KLogLibHandlerSet(writer, data);
-
-    if (rc != 0) {
-        LOGERR(klogInt, rc, "An error occured when setting KLogLibHandler");
-        return eVdbBlastErr;
-    }
-
-    return eVdbBlastNoErr;
-}
-
-LIB_EXPORT
-uint32_t CC VdbBlastMgrKLogLibHandlerSetStdErr(const VdbBlastMgr *self)
-{
-    rc_t rc = KLogLibHandlerSetStdErr();
-
-    if (rc != 0) {
-        LOGERR(klogInt, rc,
-            "An error occured when setting KLogLibHandler to StdErr");
-        return eVdbBlastErr;
-    }
-
-    return eVdbBlastNoErr;
-}
-
-LIB_EXPORT
-uint32_t CC VdbBlastMgrKLogLibHandlerSetStdOut(const VdbBlastMgr *self)
-{
-    rc_t rc = KLogLibHandlerSetStdOut();
-
-    if (rc != 0) {
-        LOGERR(klogInt, rc,
-            "An error occured when setting KLogLibHandler to StdOut");
-        return eVdbBlastErr;
-    }
-
-    return eVdbBlastNoErr;
-}
-
-LIB_EXPORT uint32_t CC VdbBlastMgrKOutHandlerSet(const VdbBlastMgr *self,
-    VdbBlastKWrtWriter writer, void *data)
-{
-    rc_t rc = KOutHandlerSet(writer, data);
-
-    if (rc != 0) {
-        LOGERR(klogInt, rc, "An error occured when setting KOutHandler");
-        return eVdbBlastErr;
-    }
-
-    return eVdbBlastNoErr;
-}
-
-LIB_EXPORT
-uint32_t CC VdbBlastMgrKOutHandlerSetStdErr(const VdbBlastMgr *self)
-{
-    rc_t rc = KOutHandlerSetStdErr();
-
-    if (rc != 0) {
-        LOGERR(
-            klogInt, rc, "An error occured when setting KOutHandler to StdErr");
-        return eVdbBlastErr;
-    }
-
-    return eVdbBlastNoErr;
-}
-
-LIB_EXPORT
-uint32_t CC VdbBlastMgrKOutHandlerSetStdOut(const VdbBlastMgr *self)
-{
-    rc_t rc = KOutHandlerSetStdOut();
-
-    if (rc != 0) {
-        LOGERR(
-            klogInt, rc, "An error occured when setting KOutHandler to StdOut");
-        return eVdbBlastErr;
-    }
-
-    return eVdbBlastNoErr;
-}
-
-LIB_EXPORT
-uint32_t CC VdbBlastMgrKStsHandlerSetStdErr(const VdbBlastMgr *self)
-{
-    rc_t rc = KStsHandlerSetStdErr();
-
-    if (rc != 0) {
-        LOGERR(
-            klogInt, rc, "An error occured when setting KStsHandler to StdErr");
-        return eVdbBlastErr;
-    }
-
-    return eVdbBlastNoErr;
-}
-
-LIB_EXPORT
-uint32_t CC VdbBlastMgrKStsHandlerSetStdOut(const VdbBlastMgr *self)
-{
-    rc_t rc = KStsHandlerSetStdOut();
-
-    if (rc != 0) {
-        LOGERR(
-            klogInt, rc, "An error occured when setting KStsHandler to StdOut");
-        return eVdbBlastErr;
-    }
-
-    return eVdbBlastNoErr;
-}
-
-LIB_EXPORT uint32_t CC VdbBlastMgrKLogLevelSet(const VdbBlastMgr *self,
-    KLogLevel lvl)
-{
-    rc_t rc = KLogLevelSet(lvl);
-
-    if (rc != 0) {
-        LOGERR(klogInt, rc, "An error occured when setting KLogLevel");
-        return eVdbBlastErr;
-    }
-
-    return eVdbBlastNoErr;
-}
-
-LIB_EXPORT uint32_t CC VdbBlastMgrKLogLevelSetInfo(
-    const VdbBlastMgr *self)
-{   return VdbBlastMgrKLogLevelSet(self, klogInfo); }
-
-LIB_EXPORT uint32_t CC VdbBlastMgrKLogLevelSetWarn(
-    const VdbBlastMgr *self)
-{   return VdbBlastMgrKLogLevelSet(self, klogWarn); }
-
-LIB_EXPORT VdbBlastStatus CC VdbBlastMgrKStsLevelSet(const VdbBlastMgr *self,
-    uint32_t level)
-{
-    KStsLevelSet(level);
-    return eVdbBlastNoErr; 
-}
diff --git a/libs/blast/blast-mgr.h b/libs/blast/blast-mgr.h
deleted file mode 100644
index 322290b..0000000
--- a/libs/blast/blast-mgr.h
+++ /dev/null
@@ -1,78 +0,0 @@
-#ifndef _h_libs_blast_blast_mgr_
-#define _h_libs_blast_blast_mgr_
-
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_klib_printf_
-#include <klib/printf.h> /* otherwise magic error */
-#endif
-
-#ifndef _h_ncbi_vdb_blast_
-#include <ncbi/vdb-blast.h> /* VdbBlastStatus */
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if _DEBUGGING
-#define S STSMSG(9,(""));
-#else
-#define S
-#endif
-
-#define RELEASE(type, thing) do { rc_t rc2 = type##Release(thing); \
-    if (rc2 != 0 && rc == 0) { rc = rc2; } thing = NULL; } while (false)
-
-struct VDatabase;
-struct VTable;
-
-typedef uint32_t BTableType;
-enum {
-      btpUndefined
-    , btpSRA
-    , btpWGS
-    , btpREFSEQ
-};
-
-BTableType _VdbBlastMgrBTableType(const struct VdbBlastMgr *self,
-    const char *rundesc);
-
-VdbBlastStatus _VdbBlastMgrFindNOpenSeqTable(const VdbBlastMgr *self,
-    const char *rundesc,
-    const struct VTable **tbl,
-    BTableType *type,
-    char **fullpath,
-    const struct VDatabase **db);
-
-rc_t _VdbBlastMgrNativeToPosix(const VdbBlastMgr *self, const char *native, char *posix, size_t size);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_libs_blast_blast_mgr_ */
diff --git a/libs/blast/reader.c b/libs/blast/reader.c
deleted file mode 100644
index cd1798f..0000000
--- a/libs/blast/reader.c
+++ /dev/null
@@ -1,2361 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * =============================================================================
- *
- */
-
-#include <vdb/extern.h>
-
-#include "blast-mgr.h" /* BTableType */
-#include "reader.h" /* Data2na */
-#include "reference.h" /* _ReferencesWhack */
-#include "run-set.h" /* VdbBlastRunSet */
-
-#include <ncbi/vdb-blast-priv.h>  /* VDB_READ_DIRECT */
-
-#include <insdc/sra.h> /* SRA_READ_TYPE_BIOLOGICAL */
-
-#include <sra/srapath.h> /* SRAPath */
-
-#include <vdb/manager.h> /* VDBManager */
-#include <vdb/schema.h> /* VSchema */
-#include <vdb/database.h> /* VDatabase */
-#include <vdb/table.h> /* VTable */
-#include <vdb/cursor.h> /* VCursor */
-#include <vdb/blob.h> /* VBlob */
-#include <vdb/vdb-priv.h> /* VCursorPermitPostOpenAdd */
-
-#include <kdb/manager.h> /* kptDatabase */
-#include <kdb/table.h> /* KTable */
-
-#include <vfs/path.h> /* VPath */
-
-#include <kfg/config.h> /* KConfig */
-
-#include <kproc/lock.h> /* KLock */
-
-#include <klib/debug.h> /* DBGMSG */
-#include <klib/log.h> /* PLOGMSG */
-#include <klib/rc.h> /* GetRCState */
-#include <klib/refcount.h> /* KRefcount */
-#include <klib/status.h> /* STSMSG */
-#include <klib/text.h> /* String */
-
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdlib.h> /* calloc */
-#include <string.h> /* memset */
-
-#include <stdio.h> /* fprintf */
-
-/******************************************************************************/
-
-static void *_NotImplementedP(const char *func) {
-    PLOGERR(klogErr, (klogErr, -1,
-        "$(func): is not implemented", "func=%s", func));
-    return 0;
-}
-
-static size_t _NotImplemented(const char *func)
-{   return (size_t)_NotImplementedP(func); }
-
-/******************************************************************************/
-/** Packed2naRead **/
-
-static
-void _Packed2naReadPrint(const Packed2naRead *self, const void *blob)
-{
-    static char *b = NULL;
-    static size_t bsz = 0;
-    int last = 0;
-    unsigned i = 0;
-    size_t num_writ = 0;
-    size_t size = 0;
-    assert(self);
-    fflush(stderr);
-    if (b == NULL) {
-        bsz = self->length_in_bases + 64;
-        b = malloc(bsz);
-        if (b == NULL)
-        {   return; }
-    }
-    else if (bsz < self->length_in_bases + 64) {
-        char *tmp = NULL;
-        bsz = self->length_in_bases + 64;
-        tmp = realloc(b, bsz);
-        if (tmp == NULL)
-        {   return; }
-        b = tmp;
-    }
-    if (string_printf(b, bsz, &num_writ, "%lu\t%p\t", self->read_id, blob))
-    {
-        return;
-    }
-    assert(num_writ < bsz);
-    last = string_measure(b, &size);
-    {
-        unsigned ib = 0;
-        uint32_t offset = self->offset_to_first_bit;
-        for (ib = 0; ib < self->length_in_bases; ++ib) {
-            int j = 0;
-            uint8_t a[4];
-            uint8_t u = 0;
-            if (i >= self->length_in_bases)
-            {   break; }
-            u = ((uint8_t*)self->starting_byte)[ib];
-            a[0] = (u >> 6) & 3;
-            a[1] = (u >> 4) & 3;
-            a[2] = (u >> 2) & 3;
-            a[3] = u & 3;
-            for (j = offset / 2; j < 4; ++j) {
-                const char c[] = "ACGT";
-                uint8_t h = a[j];
-                if (i >= self->length_in_bases)
-                {   break; }
-                assert(h < 4);
-                b[last++] = c[h];
-                ++i;
-            }
-            offset = 0;
-        }
-        b[last++] = '\n';
-        b[last++] = '\0';
-        fprintf(stderr, "%s", b);
-        fflush(stderr);
-    }
-}
-
-/******************************************************************************/
-/** ReaderCols **/
-
-static void ReaderColsReset(ReaderCols *self) {
-    assert(self);
-
-    self   ->col_PRIMARY_ALIGNMENT_ID
-     = self->col_READ_FILTER
-     = self->col_READ_LEN
-     = self->col_TRIM_LEN
-     = self->col_TRIM_START
-     = 0;
-}
-
-static
-void ReaderColsFini(ReaderCols *self)
-{
-    assert(self);
-
-    free(self->primary_alignment_id);
-    free(self->read_filter);
-    free(self->read_len);
-
-    memset(self, 0, sizeof *self);
-}
-
-/* readId is an index in primary_alignment_id : 0-based */
-static bool ReaderColsIsReadCompressed(const ReaderCols *self,
-    uint32_t readId)
-{
-    assert(self);
-
-    if (self->col_PRIMARY_ALIGNMENT_ID == 0) {
-        return false; /* not cSRA */
-    }
-
-    assert(self->primary_alignment_id);
-
-    if (self->primary_alignment_id[readId] != 0) {
-        return true; /* has alignment == compressed */
-    }
-    else {
-        /* does not have alignment == not compressed == is stored in CMP_READ */
-        return false;
-    }
-}
-
-/******************************************************************************/
-
-static
-uint32_t _VCursorReadArray(const VCursor *self,
-    int64_t row_id,
-    uint32_t col,
-    void **buffer,
-    uint8_t elem_size,
-    uint8_t nReads,
-    const char *name)
-{
-    rc_t rc = 0;
-    uint32_t row_len = 0;
-
-    assert(buffer && elem_size && nReads && name);
-
-    if (*buffer == NULL) {
-        *buffer = calloc(nReads, elem_size);
-        if (*buffer == NULL) {
-            return eVdbBlastMemErr;
-        }
-    }
-
-    rc = VCursorReadDirect(self,
-        row_id, col, 8, *buffer, nReads * elem_size * 8, &row_len);
-    if (rc != 0) {
-        PLOGERR(klogInt, (klogInt, rc,
-            "Error in VCursorReadDirect($(name))", "name=%s", name));
-    }
-
-/* TODO: needs to be verified what row_len is expected
-    if (row_len != 1) return eVdbBlastErr; */
-
-    S
-
-    return rc == 0 ? eVdbBlastNoErr : eVdbBlastErr;
-}
-
-static
-uint32_t _VCursorAddReaderCols(const VCursor *self,
-    ReaderCols *cols, bool cSra, uint32_t tableId)
-{
-    rc_t rc = 0;
-
-    assert(self && cols);
-
-    if (rc == 0) {
-        const char name[] = "READ_FILTER";
-        rc = VCursorAddColumn(self, &cols->col_READ_FILTER, name);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error in VCursorOpen($(name))", "name=%s", name));
-        }
-        else {
-            assert(cols->col_READ_FILTER);
-        }
-    }
-
-    if (rc == 0) {
-        const char name[] = "READ_LEN";
-        rc = VCursorAddColumn(self, &cols->col_READ_LEN, name);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error in VCursorOpen($(name))", "name=%s", name));
-        }
-        else {
-            assert(cols->col_READ_LEN);
-        }
-    }
-
-    if (rc == 0) {
-        const char name[] = "TRIM_LEN";
-        rc = VCursorAddColumn(self, &cols->col_TRIM_LEN, name);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error in VCursorOpen($(name))", "name=%s", name));
-        }
-        else {
-            assert(cols->col_TRIM_LEN);
-        }
-    }
-
-    if (rc == 0) {
-        const char name[] = "TRIM_START";
-        rc = VCursorAddColumn(self, &cols->col_TRIM_START, name);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error in VCursorOpen($(name))", "name=%s", name));
-        }
-        else {
-            assert(cols->col_TRIM_START);
-        }
-    }
-
-    if (rc == 0 && cSra) {
-        const char name[] = "PRIMARY_ALIGNMENT_ID";
-        rc = VCursorAddColumn(self, &cols->col_PRIMARY_ALIGNMENT_ID, name);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error in VCursorOpen($(name))", "name=%s", name));
-        }
-        else {
-            assert(cols->col_PRIMARY_ALIGNMENT_ID);
-        }
-    }
-
-    return rc ? eVdbBlastErr : eVdbBlastNoErr;
-}
-
-static uint32_t _VCursorReadReaderCols(const VCursor *self,
-    const ReadDesc *desc, ReaderCols *cols)
-{
-    uint32_t status = eVdbBlastNoErr;
-    rc_t rc = 0;
-    uint32_t row_len = ~0;
-    int64_t row_id = 0;
-    uint8_t nReads = 0;
-
-    assert(desc && cols && desc->run);
-
-    row_id = desc->spot;
-    nReads = desc->run->rd.nReads;
-    assert(desc->nReads);
-    nReads = desc->nReads;
-
-    if (cols->nReadsAllocated != 0 && cols->nReadsAllocated < nReads) {
-        /* LOG */
-
-        /* TODO: find a better way/place to realloc cols data buffers */
-        free(cols->primary_alignment_id);
-        cols->primary_alignment_id = NULL;
-        free(cols->read_filter);
-        cols->read_filter = NULL;
-        free(cols->read_len);
-        cols->read_len = NULL;
-    }
-
-    status = _VCursorReadArray(self, row_id, cols->col_READ_LEN,
-        (void **)&cols->read_len, sizeof *cols->read_len, nReads,
-        "READ_LEN");
-    if (status != eVdbBlastNoErr)
-    {   return status; }
-
-    status = _VCursorReadArray(self, row_id, cols->col_READ_FILTER,
-        (void **)&cols->read_filter, sizeof *cols->read_filter, nReads,
-        "READ_FILTER");
-    if (status != eVdbBlastNoErr)
-    {   return status; }
-
-    if (cols->col_PRIMARY_ALIGNMENT_ID != 0) {
-        status = _VCursorReadArray(self, row_id, cols->col_PRIMARY_ALIGNMENT_ID,
-            (void **)&cols->primary_alignment_id,
-            sizeof *cols->primary_alignment_id, nReads, "PRIMARY_ALIGNMENT_ID");
-        if (status != eVdbBlastNoErr) {
-            return status;
-        }
-    }
-
-    cols->nReadsAllocated = nReads;
-
-    rc = VCursorReadDirect(self, row_id, cols->col_TRIM_LEN,
-        8 * sizeof cols->TRIM_LEN, &cols->TRIM_LEN, sizeof cols->TRIM_LEN,
-        &row_len);
-    if (rc != 0) {
-        PLOGERR(klogInt, (klogInt, rc, "Error in VCursorReadDirect"
-            " TRIM_LEN, spot=$(spot))", "spot=%ld", row_id));
-        return eVdbBlastErr;
-    }
-    else if (row_len != 1) {
-        STSMSG(1, ("Error: VCursorReadDirect(TRIM_LEN, spot=%lu) "
-            "returned row_len=%u", row_id, row_len));
-/* TODO */ return eVdbBlastErr;
-    }
-
-    rc = VCursorReadDirect(self, row_id, cols->col_TRIM_START,
-        8 * sizeof cols->TRIM_LEN, &cols->TRIM_START, sizeof cols->TRIM_START,
-        &row_len);
-    if (rc != 0) {
-        PLOGERR(klogInt, (klogInt, rc, "Error in VCursorReadDirect"
-            " TRIM_START, spot=$(spot))", "spot=%ld", row_id));
-        return eVdbBlastErr;
-    }
-    else if (row_len != 1) {
-        STSMSG(1, ("Error: VCursorReadDirect(TRIM_START, spot=%lu) "
-            "returned row_len=%u", row_id, row_len));
-/* TODO */ return eVdbBlastErr;
-    }
-
-    return status;
-}
-
-/******************************************************************************/
-
-static
-bool _ReadDescNextRead(ReadDesc *self, VdbBlastStatus *status)
-{
-    uint32_t read = 0;
-    int i = 0;
-    const RunDesc *rd = NULL;
-    uint8_t nReads = 1;
-
-    assert(self && self->run && status);
-
-    rd = &self->run->rd;
-
-    if (_VdbBlastRunVarReadNum(self->run)) {
-        bool found = false;
-        if (_ReadDescFindNextRead(self, &found)) {
-            S
-            return false;
-        }
-        else if (found) {
-            *status = _ReadDescFixReadId(self);
-            S
-            return true;
-        }
-        else {
-            S
-            return false;
-        }
-    }
-
-    if (rd->nBioReads == 0) {
-        S
-        return false;
-    }
-
-    if (self->tableId == VDB_READ_UNALIGNED) {
-        nReads = rd->nReads;
-    }
-
-    for (i = self->read + 1; i <= nReads; ++i) {
-        if (rd->readType[i - 1] & SRA_READ_TYPE_BIOLOGICAL) {
-            S
-            read = i;
-            break;
-        }
-    }
-
-    if (read == 0) {
-        if (++self->spot > rd->spotCount) {
-            S
-            return false;
-        }
-
-        for (i = 1; i <= nReads; ++i) {
-            if (rd->readType[i - 1] & SRA_READ_TYPE_BIOLOGICAL) {
-                S
-                read = i;
-                break;
-            }
-        }
-    }
-
-    if (read > 0) {
-        S
-        self->read = read;
-        ++self->read_id;
-        *status = _ReadDescFixReadId(self);
-    }
-    else
-    {   S }
-
-    return read;
-}
-
-static
-bool _ReadDescSameRun(const ReadDesc *self)
-{
-    assert(self);
-
-    if (self->prev == NULL && self->run == NULL) {
-        S
-        return false;
-    }
-
-    S
-    return self->prev == self->run;
-}
-
-/******************************************************************************/
-
-static uint64_t _Reader2naReset(Reader2na *self,
-    bool *alive, VdbBlastStatus *status)
-{
-    uint32_t mode = 0;
-    VdbBlastRun *run = NULL;
-    uint64_t read_id = 0;
-    uint64_t table_id = 0;
-
-    assert(self && alive);
-
-    mode = self->mode;
-    run = (VdbBlastRun*)self->desc.run;
-    read_id = self->desc.read_id;
-    table_id = self->desc.tableId;
-
-    VCursorRelease(self->curs);
-    ReaderColsFini(&self->cols);
-
-    _ReferencesWhack(self->refs);
-
-    memset(self, 0, sizeof *self);
-
-    if (table_id == VDB_READ_UNALIGNED && self->mode & VDB_READ_ALIGNED) {
-        read_id += _VdbBlastRunGetNumAlignments(run, status);
-        self->desc.tableId = VDB_READ_ALIGNED;
-        *alive = true;
-    }
-    else {
-        *alive = false;
-    }
-
-    self->mode = mode;
-
-    return read_id;
-}
-
-static
-bool _Reader2naEor(const Reader2na *self)
-{
-    assert(self);
-    S
-    return self->eor;
-}
-
-static uint32_t _Reader2naReadReaderCols(Reader2na *self) {
-    assert(self);
-    return _VCursorReadReaderCols(self->curs, &self->desc, &self->cols);
-}
-
-static
-uint32_t _Reader2naGetBlob(Reader2na *self,
-    const VBlob **blob,
-    const ReadDesc *desc,
-    int64_t *first,
-    uint64_t *count)
-{
-    bool fresh = false;
-
-    assert(self && blob && desc && first && count
-        && desc->run && desc->run->path);
-
-    for (fresh = false; ;) {
-        rc_t rc = 0;
-
-        if (*blob == NULL) {
-            rc = VCursorGetBlobDirect
-                (self->curs, blob, desc->spot, self->col_READ);
-            if (rc) {
-                PLOGERR(klogInt, (klogInt, rc, "Error in VCursorGetBlobDirect"
-                    "($(path), READ, spot=$(spot))",
-                    "path=%s,spot=%ld", desc->run->path, desc->spot));
-                return eVdbBlastErr;
-            }
-
-            fresh = true;
-        }
-
-        rc = VBlobIdRange(*blob, first, count);
-        if (rc) {
-            PLOGERR(klogInt, (klogInt, rc, "Error in VBlobIdRange($(path))",
-                "path=%s", desc->run->path));
-            return eVdbBlastErr;
-        }
-
-        if ((int64_t)desc->spot >= *first &&
-            desc->spot < *first + *count) {
-            S
-            return eVdbBlastNoErr;
-        }
-
-        if (fresh) {
-            S
-            return eVdbBlastErr;
-        }
-
-        rc = VBlobRelease(*blob);
-        *blob = NULL;
-        if (rc) {
-            PLOGERR(klogInt, (klogInt, rc, "Error in VBlobRelease($(path))",
-                "path=%s", desc->run->path));
-            return eVdbBlastErr;
-        }
-    }
-
-    S
-    return eVdbBlastErr;
-}
-
-static
-uint32_t _Reader2naCalcReadReaderColsParams(const ReadDesc *desc,
-    const ReaderCols *cols,
-    uint32_t *start,
-    uint32_t min_read_length)
-{
-    uint32_t i = 1;
-    uint32_t to_read = 0;
-    assert(desc && cols && start);
-    assert(desc->run && desc->run->path);
-
-    *start = 0;
-
-    assert(cols->read_len && cols->read_filter);
-    for (i = 1; i < desc->read; ++i) {
-        if (!_VdbBlastRunVarReadNum(desc->run)) {
-            assert(i <= desc->run->rd.nReads);
-        }
-
-        /* do not count CMP_READ-s where primary_alignment_id != 0
-           as are not stored in CMP_READ) */
-        if (!ReaderColsIsReadCompressed(cols, i - 1)) {
-            *start += cols->read_len[i - 1];
-        }
-    }
-    S
-
-    if (cols->read_len[desc->read - 1] == 0) {
-        S
-        DBGMSG(DBG_BLAST, DBG_FLAG(DBG_BLAST_BLAST),
-            ("%s: %s:%d:%d(%d): READ_LEN=0\n",
-            __func__, desc->run->path, desc->spot, desc->read, desc->read_id));
-        return 0;
-    }
-    else if (cols->read_filter[desc->read - 1] != READ_FILTER_PASS) {
-        S
-        DBGMSG(DBG_BLAST, DBG_FLAG(DBG_BLAST_BLAST),
-            ("%s: %s:%d:%d(%d): READ_FILTER != READ_FILTER_PASS\n",
-            __func__, desc->run->path, desc->spot, desc->read, desc->read_id));
-        return 0;
-    }
-    else if (cols->TRIM_LEN > 0
-        && *start >= cols->TRIM_START + cols->TRIM_LEN)
-    {
-        return 0;
-    }
-    else {
-        uint32_t end = 0;
-
-        /* do not count CMP_READ-s where primary_alignment_id != 0
-           as are not stored in CMP_READ) */
-        if (ReaderColsIsReadCompressed(cols, desc->read - 1)) {
-            to_read = 0;
-            S
-            DBGMSG(DBG_BLAST, DBG_FLAG(DBG_BLAST_BLAST),
-                ("%s: %s:%d:%d(%d): PRIMARY_ALIGNMENT_ID != 0\n", __func__,
-                 desc->run->path, desc->spot, desc->read, desc->read_id));
-        }
-        else {
-            to_read = cols->read_len[desc->read - 1];
-            end = *start + to_read;
-            if (cols->TRIM_LEN > 0 && cols->TRIM_START > (int32_t)*start) {
-                uint32_t delta = cols->TRIM_START - *start;
-                if (to_read > delta) {
-                    *start = cols->TRIM_START;
-                    to_read -= delta;
-                    assert(*start + to_read == end);
-                }
-                else {
-                    to_read = 0;
-                }
-            }
-        }
-        if (to_read > 0) {
-            if (cols->TRIM_LEN > 0 &&
-                end > (cols->TRIM_START + cols->TRIM_LEN))
-            {
-                uint32_t delta = end - (cols->TRIM_START + cols->TRIM_LEN);
-                assert(delta < to_read);
-                to_read -= delta;
-            }
-            if (to_read < min_read_length) {
-                S
-                DBGMSG(DBG_BLAST, DBG_FLAG(DBG_BLAST_BLAST),
-                    ("%s: %s:%d:%d(%d): READ_LEN=%d: TOO SHORT (<%d)\n",
-                    __func__, desc->run->path, desc->spot, desc->read,
-                    desc->read_id, cols->read_len[desc->read - 1],
-                    min_read_length));
-                return 0;
-            }
-            else {
-                DBGMSG(DBG_BLAST, DBG_FLAG(DBG_BLAST_BLAST),
-                    ("%s: %s:%d:%d(%d): READ_LEN=%d\n", __func__,
-                    desc->run->path, desc->spot, desc->read,
-                    desc->read_id, cols->read_len[desc->read - 1]));
-            }
-        }
-    }
-
-    return to_read;
-}
-
-static
-bool _Reader2naNextData(Reader2na *self,
-    const VBlob *blob,
-    uint32_t *status,
-    Packed2naRead *out,
-    uint32_t min_read_length)
-{
-    uint32_t start = 0;
-    uint32_t to_read = 0;
-    const ReadDesc *desc = NULL;
-    assert(self && status && out && self->curs);
-    desc = &self->desc;
-    memset(out, 0, sizeof *out);
-
-    *status = _Reader2naReadReaderCols(self);
-    if (*status != eVdbBlastNoErr) {
-        S
-        return false;
-    }
-    if (!self->curs || !desc->run) {
-        S
-        *status = eVdbBlastErr;
-        return false;
-    }
-
-    assert(self->cols.read_len && self->cols.read_filter);
-    if (!_VdbBlastRunVarReadNum(desc->run)) {
-        assert(desc->read <= desc->run->rd.nReads);
-    }
-
-    to_read = _Reader2naCalcReadReaderColsParams(&self->desc, &self->cols,
-        &start, min_read_length);
-    if (to_read == 0) {
-        return true;
-    }
-    else {
-        uint32_t elem_bits = 0;
-        rc_t rc = 0;
-
-        S
-        DBGMSG(DBG_BLAST, DBG_FLAG(DBG_BLAST_BLAST),
-            ("%s: %s:%d:%d(%d): READ_LEN=%d\n", __func__,
-            self->desc.run->path, self->desc.spot, self->desc.read,
-            self->desc.read_id, self->cols.read_len[desc->read - 1]));
-
-        rc = VBlobCellData(blob, desc->spot, &elem_bits,
-            (const void **)&out->starting_byte, &out->offset_to_first_bit,
-            &out->length_in_bases);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc, "Error during CellData "
-                "for $(acc)/READ/$(spot)) /2na",
-                "acc=%s,spot=%zu", self->desc.run->acc, self->desc.spot));
-            DBGMSG(DBG_BLAST, DBG_FLAG(DBG_BLAST_BLAST),
-               ("%s: %s:%d:%d(%d): READ_LEN=%d: "
-                "ERROR WHILE READING: SKIPPED FOR NOW\n", __func__,
-                self->desc.run->path, self->desc.spot, self->desc.read,
-                self->desc.read_id, self->cols.read_len[desc->read - 1]));
-            /* special case */
-            *status = eVdbBlastErr;
-            return true;
-        }
-
-        if (elem_bits != 2) {
-            S
-            *status = eVdbBlastErr;
-            return false;
-        }
-
-        if (out->length_in_bases < start) {
-            S
-            *status = eVdbBlastErr;
-            return false;
-        }
-
-        out->offset_to_first_bit += start * 2;
-        S
-
-        out->length_in_bases = to_read;
-        while (out->offset_to_first_bit >= 8) {
-            out->starting_byte = ((uint8_t*)out->starting_byte) + 1;
-            out->offset_to_first_bit -= 8;
-        }
-        out->read_id = desc->read_id;
-        S
-        return true;
-    }
-}
-
-static
-uint32_t _Reader2naData(Reader2na *self,
-    Data2na *data,
-    VdbBlastStatus *status,
-    Packed2naRead *buffer,
-    uint32_t buffer_length,
-    uint32_t min_read_length)
-{
-    ReadDesc *desc = NULL;
-    uint32_t n = 0;
-    int64_t first = 0;
-    uint64_t count = 0;
-    VdbBlastStatus dummy = eVdbBlastNoErr;
-    if (status == NULL)
-    {   status = &dummy; }
-    *status = eVdbBlastErr;
-    if (buffer_length && buffer == NULL) {
-        S
-        return 0;
-    }
-
-    assert(self && self->curs && data);
-    desc = &self->desc;
-    *status = _Reader2naGetBlob(self, &data->blob, desc, &first, &count);
-    if (*status == eVdbBlastErr) {
-        S
-        return 0;
-    }
-
-    for (n = 0; n < buffer_length; ) {
-        Packed2naRead *p = buffer + n;
-        bool ignorable
-            = _Reader2naNextData(self, data->blob, status, p, min_read_length);
-        if (*status == eVdbBlastErr) {
-            if (ignorable) {
-                /* special case */
-                if (n > 0) { /* let's retry during next call */
-                    S
-                    *status = eVdbBlastNoErr;
-                }
-                else
-                {   S }
-                return n;
-            }
-            S
-            return 0;
-        }
-        if (p->length_in_bases > 0)
-        {   ++n; }
-        if (!_ReadDescNextRead(desc, status)) {
-            if (*status != eVdbBlastNoErr) {
-                return 0;
-            }
-            S
-            self->eor = true;
-            break;
-        }
-        if (desc->spot >= first + count) {
-            S
-            break;
-        }
-    }
-
-    *status = eVdbBlastNoErr;
-    return n;
-}
-/* struct Packed2naRead {
-    uint64_t read_id;
-    void *starting_byte;
-    uint32_t offset_to_first_bit;
-    uint32_t length_in_bases; }; */
-
-static
-uint64_t _Reader2naRead(Reader2na *self,
-    uint32_t *status,
-    uint64_t *read_id,
-    size_t *starting_base,
-    uint8_t *buffer,
-    size_t buffer_size,
-    uint32_t min_read_length)
-{
-    uint32_t num_read = 0;
-    uint32_t to_read = 0;
-    ReadDesc *desc = NULL;
-    uint32_t start = 0;
-    uint32_t remaining = 0;
-    rc_t rc = 0;
-    assert(self && status && read_id && starting_base);
-    desc = &self->desc;
-    *read_id = desc->read_id;
-    *starting_base = self->starting_base;
-
-    if (_Reader2naEor(self)) {
-        S
-        *status = eVdbBlastNoErr;
-        return 0;
-    }
-
-    *status = _Reader2naReadReaderCols(self);
-    if (*status != eVdbBlastNoErr) {
-        S
-        return 0;
-    }
-
-    *status = eVdbBlastErr;
-    if (!self->curs || !desc->run) {
-        S
-        return 0;
-    }
-
-    assert(desc->run->path);
-
-    *status = eVdbBlastNoErr;
-    if (!_VdbBlastRunVarReadNum(desc->run) && desc->run->rd.nBioReads == 0) {
-        S
-        return 0;
-    }
-
-    to_read = _Reader2naCalcReadReaderColsParams(&self->desc, &self->cols,
-        &start, min_read_length);
-    if (to_read <= self->starting_base) {
-        S
-        DBGMSG(DBG_BLAST, DBG_FLAG(DBG_BLAST_BLAST), (
-        "%s: %s:%d:%d(%d): READ_LEN=%d: TOO SHORT (starting_base=%d)\n",
-            __func__, desc->run->path, desc->spot, desc->read,
-            desc->read_id, self->cols.read_len[desc->read - 1],
-            self->starting_base));
-        to_read = 0;
-    }
-    else {
-        to_read -= (uint32_t)self->starting_base;
-        start   += (uint32_t)self->starting_base;
-    }
-    if (to_read > 0) {
-        S
-        rc = VCursorReadBitsDirect(self->curs, desc->spot, self->col_READ, 2,
-            start, buffer, 0, (uint32_t)buffer_size * 4, &num_read, &remaining);
-        if (rc) {
-            if (rc == SILENT_RC
-                (rcVDB, rcCursor, rcReading, rcBuffer, rcInsufficient))
-            {
-                S
-                rc = 0;
-                num_read = (uint32_t)buffer_size * 4;
-            }
-            else {
-                PLOGERR(klogInt, (klogInt, rc,
-                    "Error in VCursorReadBitsDirect"
-                    "($(path), READ, spot=$(spot))", "path=%s,spot=%ld",
-                    desc->run->path, desc->spot));
-                *status = eVdbBlastErr;
-                return 0;
-            }
-        }
-        *status
-            = (num_read == 0 && remaining == 0) ? eVdbBlastErr : eVdbBlastNoErr;
-        S
-    }
-
-    if (num_read >= to_read) {
-        self->starting_base = 0;
-        num_read = to_read;
-        if (!_ReadDescNextRead(desc, status))
-        {   self->eor = true; }
-        S
-    }
-    else {
-        self->starting_base += num_read;
-        S
-    }
-
-    return num_read;
-}
-
-static VdbBlastStatus _VdbBlastRunMakeReaderColsCursor(
-    const VdbBlastRun *self, const VCursor **curs, uint32_t *read_col_idx,
-    bool INSDC2na, ReaderCols *cols, const ReadDesc *desc)
-{
-    rc_t rc = 0;
-    const VTable *tbl = NULL;
-    bool cmpRead = false;
-    const char *read_col_name = INSDC2na ? "(INSDC:2na:packed)READ"
-                                         : "(INSDC:4na:bin)READ";
-    assert(self && self->obj && desc);
-
-    if (desc->tableId == VDB_READ_ALIGNED) {
-        tbl = self->obj->prAlgnTbl;
-    }
-    else {
-        tbl = self->obj->seqTbl;
-        cmpRead = self->cSra;
-    }
-
-    if (cmpRead) {
-        read_col_name = INSDC2na ? "(INSDC:2na:packed)CMP_READ"
-                                 : "(INSDC:4na:bin)CMP_READ";
-    }
-
-    rc = _VTableMakeCursor(tbl, curs, read_col_idx, read_col_name, self->acc);
-
-    if (rc == 0) {
-        assert(*curs);
-        return _VCursorAddReaderCols(*curs, cols, cmpRead, desc->tableId);
-    }
-
-    return eVdbBlastErr;
-}
-
-static VdbBlastStatus _Reader2naOpenCursor(Reader2na *self) {
-    const ReadDesc *desc = NULL;
-    const VdbBlastRun *run = NULL;
-
-    assert(self);
-
-    desc = &self->desc;
-    run = desc->run;
-
-    assert(run && self->curs == NULL && run->obj);
-
-    return _VdbBlastRunMakeReaderColsCursor(run, &self->curs, &self->col_READ,
-        true, &self->cols, desc);
-    /*return _VTableMakeReaderColsCursor(run->obj->seqTbl, &self->curs,
-        &self->col_READ, true, &self->cols, run->cSra);*/
-}
-
-/******************************************************************************/
-
-void _Core2naFini(Core2na *self) {
-    VdbBlastStatus status;
-    bool keep = false;
-    assert(self);
-    _Reader2naReset(&self->reader, &keep, &status);
-    KLockRelease(self->mutex);
-    memset(self, 0, sizeof *self);
-}
-
-static
-uint32_t _Core2naOpen1stRun(Core2na *self,
-    RunSet *runs,
-    uint64_t initial_read_id)
-{
-    Reader2na *reader = NULL;
-    VdbBlastStatus status = eVdbBlastNoErr;
-
-    assert(self && runs);
-
-    reader = &self->reader;
-
-    if (reader->curs) {
-        return eVdbBlastNoErr;
-    }
-
-    if (runs->run && runs->krun) {
-        self->initial_read_id = initial_read_id;
-        if (reader->mode != VDB_READ_REFERENCE) {
-            status = _RunSetFindReadDesc
-                (runs, initial_read_id, &reader->desc);
-            if (status == eVdbBlastNoErr) {
-                status = _Reader2naOpenCursor(reader);
-                if (status != eVdbBlastNoErr) {
-                    bool keep = true;
-                    S
-                    _Reader2naReset(reader, &keep, &status);
-                }
-            }
-            else
-            {   S }
-        }
-        else if (reader->refs == NULL) {
-            reader->refs = _RunSetMakeReferences(runs, &status);
-            if (reader->refs == NULL) {
-                status = eVdbBlastErr;
-            }
-        }
-    }
-    else {
-        S
-        self->eos = true;
-    }
-
-    return status;
-}
-
-static VdbBlastStatus _Core2naOpenNextRunOrTbl
-    (Core2na *core, const RunSet *runs)
-{
-    VdbBlastStatus status = eVdbBlastNoErr;
-    uint64_t read_id = 0;
-    ReadDesc *desc = NULL;
-    Reader2na *reader = NULL;
-    bool keep = true;
-
-    assert(core && runs);
-
-    reader = &core->reader;
-    desc = &reader->desc;
-
-    assert(desc->run);
-
-    read_id = _Reader2naReset(reader, &keep, &status) + 1;
-    if (status != eVdbBlastNoErr) {
-        return status;
-    }
-
-    if (!keep) {
-        if (core->irun >= runs->krun - 1) { /* No more runs to read */
-            S
-            core->eos = true;
-            return eVdbBlastNoErr;
-        }
-        ++core->irun;
-    }
-
-    while (core->irun < runs->krun) {
-        uint32_t status = eVdbBlastNoErr;
-
-        VdbBlastRun *run = &runs->run[core->irun];
-        if (run == NULL) {
-            S
-            return eVdbBlastErr;
-        }
-
-        status = _VdbBlastRunFillReadDesc(run, 0, desc);
-        if (status != eVdbBlastNoErr) {
-            S
-            return status;
-        }
-
-        desc->read_id = read_id;
-        status = _ReadDescFixReadId(desc);
-        if (status != eVdbBlastNoErr) {
-            return status;
-        }
-        status = _Reader2naOpenCursor(reader);
-        if (status == eVdbBlastNoErr) {
-            S
-        }
-        else {
-            S
-        }
-
-        return status;
-    }
-
-    S
-    return eVdbBlastNoErr;
-}
-
-static
-uint32_t _Core2naDataSeq(Core2na *self,
-    Data2na *data,
-    const RunSet *runs,
-    VdbBlastStatus *status,
-    Packed2naRead *buffer,
-    uint32_t buffer_length)
-{
-    uint32_t num_read = 0;
-
-    assert(self && data && status && runs);
-
-    *status = eVdbBlastNoErr;
-
-    while (*status == eVdbBlastNoErr && num_read == 0) {
-        if (_Reader2naEor(&self->reader) || data->irun != self->irun) {
-            S
-            VBlobRelease(data->blob);
-            data->blob = NULL;
-        }
-        if (_Reader2naEor(&self->reader)) {
-            S
-            *status = _Core2naOpenNextRunOrTbl(self, runs);
-            if (*status != eVdbBlastNoErr) {
-                STSMSG(1, ("Error: "
-                    "failed to VdbBlast2naReaderData: cannot open next read"));
-                return 0;
-            }
-        }
-        if (data->irun != self->irun)
-        {   data->irun = self->irun; }
-
-        if (self->eos) {
-            STSMSG(1, ("VdbBlast2naReaderData: End Of Set"));
-            return 0;
-        }
-
-        num_read = _Reader2naData(&self->reader, data, status,
-            buffer, buffer_length, self->min_read_length);
-    }
-
-    if (*status == eVdbBlastNoErr) {
-        STSMSG(3, ("VdbBlast2naReaderData = %ld", num_read));
-    }
-    else {
-        STSMSG(1, ("Error: failed to VdbBlast2naReaderData"));
-    }
-
-    return num_read;
-}
-
-static
-uint32_t _Core2naData(Core2na *self,
-    Data2na *data,
-    const RunSet *runs,
-    VdbBlastStatus *status,
-    Packed2naRead *buffer,
-    uint32_t buffer_length)
-{
-    assert(self);
-
-    if (self->reader.mode != VDB_READ_REFERENCE) {
-        return _Core2naDataSeq(self, data, runs, status, buffer, buffer_length);
-    }
-    else {
-        return _Core2naDataRef(self, data, status, buffer, buffer_length);
-    }
-}
-
-static
-uint64_t _Core2naReadSeq(Core2na *self,
-    const RunSet *runs,
-    uint32_t *status,
-    uint64_t *read_id,
-    size_t *starting_base,
-    uint8_t *buffer,
-    size_t buffer_size)
-{
-    uint64_t num_read = 0;
-
-    assert(self && status && runs);
-
-    if (buffer_size == 0) {
-        S
-        *status = eVdbBlastErr;
-        return 0;
-    }
-
-    *status = eVdbBlastNoErr;
-
-    while (*status == eVdbBlastNoErr && num_read == 0) {
-        if (_Reader2naEor(&self->reader)) {
-            S
-            *status = _Core2naOpenNextRunOrTbl(self, runs);
-            if (*status != eVdbBlastNoErr) {
-                S
-                return 0;
-            }
-        }
-
-        if (self->eos) {
-            S
-            return 0;
-        }
-
-        num_read = _Reader2naRead(&self->reader, status,
-            read_id, starting_base, buffer, buffer_size, self->min_read_length);
-        S
-    }
-
-    return num_read;
-}
-
-uint64_t _Core2naRead(Core2na *self, const RunSet *runs,
-    uint32_t *status, uint64_t *read_id, size_t *starting_base,
-    uint8_t *buffer, size_t buffer_size)
-{
-    assert(self);
-
-    if (self->reader.mode != VDB_READ_REFERENCE) {
-        return _Core2naReadSeq(self, runs, status,
-            read_id, starting_base, buffer, buffer_size);
-    }
-    else {
-        return _Core2naReadRef(self, status, read_id, buffer, buffer_size);
-    }
-}
-
-void _Core4naFini(Core4na *self) {
-    assert(self);
-
-    VCursorRelease(self->curs);
-    VBlobRelease(self->blob);
-    KLockRelease(self->mutex);
-
-    ReaderColsFini(&self->cols);
-
-    memset(self, 0, sizeof *self);
-}
-
-static size_t _Core4naReadSeq(Core4na *self, const RunSet *runs,
-    uint32_t *status, uint64_t read_id, size_t starting_base,
-    uint8_t *buffer, size_t buffer_length)
-{
-    uint32_t num_read = 0;
-    ReadDesc *desc = NULL;
-    assert(self && runs && status);
-    desc = &((Core4na*)self)->desc;
-
-    *status = _RunSetFindReadDesc(runs, read_id, desc);
-    if (*status != eVdbBlastNoErr) {
-        S
-    }
-    else {
-        rc_t rc = 0;
-        if (!_ReadDescSameRun(desc)) {
-            S
-            ReaderColsReset(&self->cols);
-            VCursorRelease(self->curs);
-            ((Core4na*)self)->curs = NULL;
-            assert(desc->run && desc->run->obj);
-            *status = _VdbBlastRunMakeReaderColsCursor(desc->run,
-                &((Core4na*)self)->curs, &((Core4na*)self)->col_READ, false,
-                &(((Core4na*)self)->cols), desc);
-            S
-        }
-
-        if (*status == eVdbBlastNoErr && rc == 0) {
-            uint32_t remaining = 0;
-            uint32_t start = 0;
-            uint32_t to_read = 0;
-            assert(desc->run && desc->read <= desc->run->rd.nReads
-                && desc->run->path);
-            *status = _VCursorReadReaderCols(self->curs,
-                desc, &((Core4na*)self)->cols);
-            if (*status == eVdbBlastNoErr) {
-                assert(self->cols.read_len && self->cols.read_filter);
-                to_read = _Reader2naCalcReadReaderColsParams(&self->desc,
-                    &self->cols, &start, self->min_read_length);
-                if (to_read == 0) {
-                    /* When _Reader2naCalcReadReaderColsParams returns 0
-                    then this read is skipped by 2na reader (usually filtered)
-                    and should not be accessed by 4na reader */
-                    *status = eVdbBlastInvalidId;
-                    S
-                }
-                else {
-                    if (to_read >= starting_base) {
-                        to_read -= (uint32_t)starting_base;
-                        start   += (uint32_t)starting_base;
-                        if (buffer_length < to_read) {
-                            to_read = (uint32_t)buffer_length;
-                        }
-                        S
-                        rc = VCursorReadBitsDirect(self->curs,
-                            desc->spot, self->col_READ, 8,
-                            start, buffer, 0, to_read, &num_read, &remaining);
-                        if (rc != 0) {
-                            PLOGERR(klogInt, (klogInt, rc,
-                                "Error in VCursorReadBitsDirect"
-                                "($(path), READ, spot=$(spot))",
-                                "path=%s,spot=%ld",
-                                desc->run->path, desc->spot));
-                        }
-                    }
-                    else {
-                        S
-                        *status = eVdbBlastErr;
-                    }
-                }
-            }
-        }
-
-        if (*status == eVdbBlastNoErr)
-        {   *status = rc ? eVdbBlastErr : eVdbBlastNoErr; }
-    }
-
-    S
-    return num_read;
-}
-
-static size_t _Core4naRead(Core4na *self, const RunSet *runs,
-    uint32_t *status, uint64_t read_id, size_t starting_base,
-    uint8_t *buffer, size_t buffer_length)
-{
-    assert(self);
-
-    if (self->mode != VDB_READ_REFERENCE) {
-        return _Core4naReadSeq(self, runs, status,
-            read_id, starting_base, buffer, buffer_length);
-    }
-    else {
-        return _Core4naReadRef(self, runs, status,
-            read_id, starting_base, buffer, buffer_length);
-    }
-}
-
-static const uint8_t* _Core4naDataSeq(Core4na *self, const RunSet *runs,
-    uint32_t *status, uint64_t read_id, size_t *length)
-{
-    ReadDesc *desc = NULL;
-    assert(self && runs && status && length);
-    desc = &self->desc;
-
-    *length = 0;
-
-    *status = _RunSetFindReadDesc(runs, read_id, desc);
-    if (*status != eVdbBlastNoErr)
-    {   S }
-    else {
-        rc_t rc = 0;
-        const uint8_t *base = NULL;
-        if (!_ReadDescSameRun(desc)) {
-            S
-            ReaderColsReset(&self->cols);
-            VCursorRelease(self->curs);
-            self->curs = NULL;
-            assert(desc->run && desc->run->obj);
-            *status = _VdbBlastRunMakeReaderColsCursor(desc->run, &self->curs,
-                &self->col_READ, false, &self->cols, desc);
-            S
-        }
-
-        if (*status == eVdbBlastNoErr) {
-            *status = _VCursorReadReaderCols(self->curs, desc, &self->cols);
-            S
-        }
-
-        if (rc == 0 && *status == eVdbBlastNoErr) {
-            assert(self->cols.read_len && self->cols.read_filter
-                && desc->run->path);
-
-            if (self->cols.read_filter[desc->read - 1]
-                != READ_FILTER_PASS)
-            {   /* FILTERed reads are not returned by 2na reader:
-                   4na readed should not ask for them */
-                *status = eVdbBlastInvalidId;
-                S
-            }
-            else if (ReaderColsIsReadCompressed(&self->cols, desc->read - 1)) {
-                /* Compressed CMP_READs are not returned by 2na reader:
-                   4na readed should not ask for them */
-                *status = eVdbBlastInvalidId; /*  */
-                S
-            }
-            else {
-                if (self->blob) {
-                    VBlobRelease(self->blob);
-                    self->blob = NULL;
-                }
-
-                if (rc == 0 && *status == eVdbBlastNoErr) {
-                    rc = VCursorGetBlobDirect
-                        (self->curs, &self->blob, desc->spot, self->col_READ);
-                    if (rc != 0) {
-                        PLOGERR(klogInt, (klogInt, rc,
-                            "Error in VCursorGetBlobDirect"
-                            "($(path), READ, spot=$(spot))",
-                            "path=%s,spot=%ld", desc->run->path, desc->spot));
-                    }
-                }
-
-                if (rc == 0 && *status == eVdbBlastNoErr) {
-                    uint32_t boff = 0;
-                    uint32_t elem_bits = 0;
-                    uint32_t row_len = 0;
-
-                    rc = VBlobCellData(self->blob, desc->spot,
-                        &elem_bits, (const void**)&base, &boff, &row_len);
-                    if (rc != 0) {
-                        PLOGERR(klogInt, (klogInt, rc, "Error in VBlobCellData"
-                            "$(path), READ, spot=$(spot))",
-                            "path=%s,spot=%ld", desc->run->path, desc->spot));
-                    }
-                    else {
-                        if (elem_bits != 8) {
-                            S
-                            *status = eVdbBlastErr;
-                            base = NULL;
-                        }
-                        else {
-                            size_t to_read
-                                = self->cols.read_len[desc->read - 1];
-
-                            if (to_read < self->min_read_length) {
-                                S
-                                /* NOP */
-                            }
-                            else {
-                                uint32_t start = 0;
-                                to_read = _Reader2naCalcReadReaderColsParams(
-                                    &self->desc, &self->cols,
-                                    &start, self->min_read_length);
-                                base += boff + start;
-                                if (row_len >= start) {
-                                    row_len -= start;
-                                    if (to_read > row_len) {
-                                        S
-                                        *status = eVdbBlastErr;
-                                    }
-                                    else {
-                                        S
-                                        *length = to_read;
-                                        *status = eVdbBlastNoErr;
-                                    }
-                                }
-                                else {
-                                    S
-                                    *status = eVdbBlastErr;
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        if (*status == eVdbBlastNoErr) {
-            if (rc != 0)
-            {   *status = eVdbBlastErr; }
-        }
-
-        return base;
-    }
-
-    return NULL;
-}
-
-static const uint8_t* _Core4naData(Core4na *self, const RunSet *runs,
-    uint32_t *status, uint64_t read_id, size_t *length)
-{
-    assert(self);
-
-    if (self->mode != VDB_READ_REFERENCE) {
-        return _Core4naDataSeq(self, runs, status, read_id, length);
-    }
-    else {
-        return _Core4naDataRef(self, runs, status, read_id, length);
-    }
-}
-
-/******************************************************************************/
-
-static const char VDB_BLAST_2NA_READER[] = "VdbBlast2naReader";
-
-struct VdbBlast2naReader {
-    KRefcount refcount;
-    VdbBlastRunSet *set;
-    Data2na data;
-    KVdbBlastReadMode mode;
-};
-
-static
-VdbBlast2naReader *_VdbBlastRunSetMake2naReader(VdbBlastRunSet *self,
-    VdbBlastStatus *status,
-    uint64_t initial_read_id,
-    Core2na *core2na,
-    KVdbBlastReadMode mode)
-{
-    VdbBlast2naReader *item = NULL;
-    assert(self && status);
-    if (core2na == NULL) {
-        core2na
-            = mode != VDB_READ_REFERENCE ? &self->core2na : &self->core2naRef;
-    }
-    else {
-        core2na->initial_read_id = initial_read_id;
-    }
-    core2na->reader.mode = mode;
-    if (!core2na->hasReader) {
-        _VdbBlastRunSetBeingRead(self);
-        *status = _Core2naOpen1stRun(core2na, &self->runs, initial_read_id);
-        if (*status != eVdbBlastNoErr) {
-            STSMSG(1, ("Error: failed to create VdbBlast2naReader: "
-                "cannot open the first read"));
-            return NULL;
-        }
-        core2na->initial_read_id = initial_read_id;
-        core2na->reader.mode = mode;
-        core2na->hasReader = true;
-    }
-    else if (core2na->initial_read_id != initial_read_id) {
-        STSMSG(1, ("Error: failed to create VdbBlast2naReader"
-            "(initial_read_id=%ld): allowed initial_read_id=%ld",
-            initial_read_id, core2na->initial_read_id));
-        *status = eVdbBlastErr;
-        return NULL;
-    }
-    else if (core2na->reader.mode != mode) {
-        STSMSG(1, ("Error: failed to create VdbBlast2naReader"
-            "(mode=%d): allowed mode=%d", mode, core2na->reader.mode));
-        *status = eVdbBlastErr;
-        return NULL;
-    }
-    item = calloc(1, sizeof *item);
-    if (item == NULL) {
-        *status = eVdbBlastMemErr;
-        return NULL;
-    }
-
-    item->set = VdbBlastRunSetAddRef((VdbBlastRunSet*)self);
-    item->mode = mode;
-
-    KRefcountInit(&item->refcount, 1,
-        VDB_BLAST_2NA_READER, __func__, "2naReader");
-
-    *status = eVdbBlastNoErr;
-
-    return item;
-}
-
-LIB_EXPORT
-VdbBlast2naReader* CC VdbBlastRunSetMake2naReaderExt(const VdbBlastRunSet *self,
-    VdbBlastStatus *status,
-    uint64_t initial_read_id,
-    KVdbBlastReadMode mode)
-{
-    VdbBlast2naReader *item = NULL;
-    KLock *mutex = NULL;
-
-    VdbBlastStatus dummy = eVdbBlastNoErr;
-    if (status == NULL)
-    {   status = &dummy; }
-
-    if (self) {
-        rc_t rc = 0;
-        mutex = mode != VDB_READ_REFERENCE
-            ? self->core2na.mutex : self->core2naRef.mutex;
-        assert(mutex);
-        rc = KLockAcquire(mutex);
-        if (rc != 0) {
-            LOGERR(klogInt, rc, "Error in KLockAcquire");
-        }
-        else {
-            item = _VdbBlastRunSetMake2naReader
-                ((VdbBlastRunSet*)self, status, initial_read_id, NULL, mode);
-            rc = KLockUnlock(mutex);
-            if (rc != 0) {
-                LOGERR(klogInt, rc, "Error in KLockUnlock");
-                VdbBlast2naReaderRelease(item);
-                item = NULL;
-            }
-        }
-        if (rc != 0) {
-            *status = eVdbBlastErr;
-        }
-    }
-    else {
-        *status = eVdbBlastErr;
-    }
-
-    if (item != NULL) {
-        STSMSG(1, (
-            "Created VdbBlast2naReader(initial_read_id=%ld)", initial_read_id));
-    }
-    else {
-        STSMSG(1, ("Error: failed to create "
-            "VdbBlast2naReader(initial_read_id=%ld)", initial_read_id));
-    }
-
-    return item;
-}
-
-LIB_EXPORT
-VdbBlast2naReader* CC VdbBlastRunSetMake2naReader(const VdbBlastRunSet *self,
-    uint32_t *status,
-    uint64_t initial_read_id)
-{
-    return VdbBlastRunSetMake2naReaderExt(self, status, initial_read_id,
-        VDB_READ_UNALIGNED);
-}
-
-LIB_EXPORT
-VdbBlast2naReader* CC VdbBlast2naReaderAddRef(VdbBlast2naReader *self)
-{
-    if (self == NULL) {
-        STSMSG(1, ("VdbBlast2naReaderAddRef(NULL)"));
-        return self;
-    }
-
-    if (KRefcountAdd(&self->refcount, VDB_BLAST_2NA_READER)
-        == krefOkay)
-    {
-        STSMSG(1, ("VdbBlast2naReaderAddRef"));
-        return self;
-    }
-
-    STSMSG(1, ("Error: failed to VdbBlast2naReaderAddRef"));
-    return NULL;
-}
-
-static
-void _VdbBlast2naReaderWhack(VdbBlast2naReader *self)
-{
-    if (self == NULL) {
-        return;
-    }
-
-    if (self->set != NULL) {
-        STSMSG(1, ("Deleting VdbBlast2naReader(initial_read_id=%ld)",
-            self->set->core2na.initial_read_id));
-    }
-    else {
-        STSMSG(1, ("Deleting VdbBlast2naReader(self->set=NULL)",
-            self->set->core2na.initial_read_id));
-    }
-
-    VBlobRelease(self->data.blob);
-    VdbBlastRunSetRelease(self->set);
-
-    memset(self, 0, sizeof *self);
-
-    free(self);
-}
-
-LIB_EXPORT
-void CC VdbBlast2naReaderRelease(VdbBlast2naReader *self)
-{
-    if (self == NULL) {
-        return;
-    }
-
-    STSMSG(1, ("VdbBlast2naReaderRelease"));
-    if (KRefcountDrop(&self->refcount, VDB_BLAST_2NA_READER) != krefWhack) {
-        return;
-    }
-
-    _VdbBlast2naReaderWhack(self);
-}
-
-LIB_EXPORT
-uint64_t CC _VdbBlast2naReaderRead(const VdbBlast2naReader *self,
-    uint32_t *status,
-    uint64_t *read_id,
-    size_t *starting_base,
-    uint8_t *buffer,
-    size_t buffer_size)
-{
-    uint32_t dummy = eVdbBlastNoErr;
-    if (status == NULL)
-    {   status = &dummy; }
-
-    if (self == NULL) {
-        *status = eVdbBlastErr;
-        return 0;
-    }
-
-    return _VdbBlastRunSet2naRead(self->set, status, read_id,
-        starting_base, buffer, buffer_size, self->mode);
-}
-
-LIB_EXPORT
-uint64_t CC VdbBlast2naReaderRead(const VdbBlast2naReader *self,
-    uint32_t *status,
-    uint64_t *read_id,
-    uint8_t *buffer,
-    size_t buffer_size)
-{
-    size_t starting_base = 0;
-
-    return _VdbBlast2naReaderRead(self,
-        status, read_id, &starting_base, buffer, buffer_size);
-}
-
-LIB_EXPORT
-uint32_t CC VdbBlast2naReaderData(VdbBlast2naReader *self,
-    uint32_t *status,
-    Packed2naRead *buffer,
-    uint32_t buffer_length)
-{
-    bool verbose = false;
-    uint32_t n = 0;
-    rc_t rc = 0;
-    const Core2na *core2na = NULL;
-
-    uint32_t dummy = eVdbBlastNoErr;
-    if (status == NULL)
-    {   status = &dummy; }
-
-    *status = eVdbBlastErr;
-
-    if (self == NULL)
-    {   return 0; }
-
-    if ((buffer_length != 0 && buffer == NULL) || (buffer_length == 0))
-    {   return 0; }
-
-    *status = eVdbBlastNoErr;
-
-    assert(self->set);
-
-    core2na = self->mode != VDB_READ_REFERENCE
-        ? &self->set->core2na : &self->set->core2naRef;
-
-    rc = KLockAcquire(core2na->mutex);
-    if (rc != 0) {
-        LOGERR(klogInt, rc, "Error in KLockAcquire");
-    }
-    if (0 && verbose) {
-        char b[256];
-        string_printf(b, sizeof b, NULL, "KLockAcquire(%p)\n", core2na->mutex);
-        assert(!rc);
-        fprintf(stderr, "%s", b);
-        fflush(stderr);
-    }
-    if (rc == 0) {
-        n = _Core2naData((Core2na*)core2na, &self->data,
-            &self->set->runs, status, buffer, buffer_length);
-        S
-        if (n > 0 && verbose)
-        {   _Packed2naReadPrint(buffer, self->data.blob); }
-        if (0 && verbose) {
-            char b[256];
-            string_printf(b, sizeof b, NULL, "KLockUnlock(%p)\n",
-                core2na->mutex);
-            assert(!rc);
-            fprintf(stderr, "%s", b);
-            fflush(stderr);
-        }
-        rc = KLockUnlock(core2na->mutex);
-        if (rc != 0)
-        {   LOGERR(klogInt, rc, "Error in KLockUnlock"); }
-    }
-    if (rc)
-    {   *status = eVdbBlastErr; }
-
-    S
-    return n;
-}
-
-/******************************************************************************/
-static const char VDB_BLAST_4NA_READER[] = "VdbBlast4naReader";
-
-struct VdbBlast4naReader {
-    KRefcount refcount;
-    VdbBlastRunSet *set;
-    KVdbBlastReadMode mode;
-};
-
-LIB_EXPORT
-VdbBlast4naReader* CC VdbBlastRunSetMake4naReaderExt(const VdbBlastRunSet *self,
-    uint32_t *status,
-    KVdbBlastReadMode mode)
-{
-    uint32_t dummy = eVdbBlastNoErr;
-    if (status == NULL) {
-        status = &dummy;
-    }
-
-    if (self) {
-        VdbBlast4naReader *item = calloc(1, sizeof *item);
-        if (item == NULL) {
-            *status = eVdbBlastMemErr;
-            return NULL;
-        }
-
-        item->set = VdbBlastRunSetAddRef((VdbBlastRunSet*)self);
-        item->mode = mode;
-
-        KRefcountInit(&item->refcount, 1,
-            VDB_BLAST_4NA_READER, __func__, "4naReader");
-
-        _VdbBlastRunSetBeingRead(self);
-
-        *status = eVdbBlastNoErr;
-
-        STSMSG(1, ("Created VdbBlast4naReader"));
-
-        return item;
-    }
-    else {
-        *status = eVdbBlastErr;
-
-        STSMSG(1, ("VdbBlastRunSetMake4naReader(self=NULL)"));
-
-        return NULL;
-    }
-}
-
-LIB_EXPORT
-VdbBlast4naReader* CC VdbBlastRunSetMake4naReader(const VdbBlastRunSet *self,
-    uint32_t *status)
-{
-    return VdbBlastRunSetMake4naReaderExt(self, status, VDB_READ_UNALIGNED);
-}
-
-LIB_EXPORT
-VdbBlast4naReader* CC VdbBlast4naReaderAddRef(VdbBlast4naReader *self)
-{
-    if (self == NULL) {
-        STSMSG(1, ("VdbBlast4naReaderAddRef(NULL)"));
-        return self;
-    }
-
-    if (KRefcountAdd(&self->refcount, VDB_BLAST_4NA_READER)
-        == krefOkay)
-    {
-        STSMSG(1, ("VdbBlast4naReaderAddRef"));
-        return self;
-    }
-
-    STSMSG(1, ("Error: failed to VdbBlast4naReaderAddRef"));
-    return NULL;
-}
-
-LIB_EXPORT
-void CC VdbBlast4naReaderRelease(VdbBlast4naReader *self)
-{
-    if (self == NULL)
-    {   return; }
-
-    STSMSG(1, ("VdbBlast4naReaderRelease"));
-    if (KRefcountDrop(&self->refcount, VDB_BLAST_4NA_READER) != krefWhack)
-    {   return; }
-
-    STSMSG(1, ("Deleting VdbBlast4naReader"));
-
-    VdbBlastRunSetRelease(self->set);
-
-    memset(self, 0, sizeof *self);
-    free(self);
-}
-
-LIB_EXPORT
-size_t CC VdbBlast4naReaderRead(const VdbBlast4naReader *self,
-    uint32_t *status,
-    uint64_t read_id,
-    size_t starting_base,
-    uint8_t *buffer,
-    size_t buffer_length)
-{
-    size_t n = 0;
-    rc_t rc = 0;
-    Core4na *c = NULL;
-
-    uint32_t dummy = eVdbBlastNoErr;
-    if (status == NULL)
-    {   status = &dummy; }
-
-    if (self == NULL) {
-        S
-        *status = eVdbBlastErr;
-        return 0;
-    }
-
-    assert(self->set);
-
-    c = self->mode != VDB_READ_REFERENCE
-        ? &self->set->core4na : &self->set->core4naRef;
-
-    rc = KLockAcquire(c->mutex);
-    if (rc != 0) {
-        LOGERR(klogInt, rc, "Error in KLockAcquire");
-    }
-    else {
-        n = _Core4naRead(c, &self->set->runs, status,
-            read_id, starting_base, buffer, buffer_length);
-        rc = KLockUnlock(c->mutex);
-        if (rc != 0) {
-            LOGERR(klogInt, rc, "Error in KLockUnlock");
-        }
-    }
-    if (rc != 0) {
-        *status = eVdbBlastErr;
-    }
-
-    if (*status == eVdbBlastNoErr) {
-        STSMSG(3, (
-            "VdbBlast4naReaderRead(read_id=%ld, starting_base=%ld) = %ld",
-            read_id, starting_base, n));
-    }
-    else {
-        STSMSG(2, ("Error: failed to "
-            "VdbBlast4naReaderRead(read_id=%ld, starting_base=%ld)",
-            read_id, starting_base));
-    }
-
-    return n;
-}
-
-LIB_EXPORT
-const uint8_t* CC VdbBlast4naReaderData(const VdbBlast4naReader *self,
-    uint32_t *status,
-    uint64_t read_id,
-    size_t *length)
-{
-    const uint8_t *d = NULL;
-    rc_t rc = 0;
-    Core4na *c = NULL;
-
-    uint32_t dummy = eVdbBlastNoErr;
-    if (status == NULL)
-    {   status = &dummy; }
-
-    if (self == NULL || length == NULL) {
-        if (self == NULL)
-        {   STSMSG(1, ("VdbBlast4naReaderData(self=NULL)")); }
-        if (length == NULL)
-        {   STSMSG(1, ("VdbBlast4naReaderData(length=NULL)")); }
-        *status = eVdbBlastErr;
-        return 0;
-    }
-
-    assert(self->set);
-
-    c = self->mode != VDB_READ_REFERENCE
-        ? &self->set->core4na : &self->set->core4naRef;
-
-    rc = KLockAcquire(c->mutex);
-    if (rc != 0) {
-        LOGERR(klogInt, rc, "Error in KLockAcquire");
-    }
-    else {
-        d = _Core4naData(c, &self->set->runs, status, read_id, length);
-        rc = KLockUnlock(c->mutex);
-        if (rc != 0) {
-            LOGERR(klogInt, rc, "Error in KLockUnlock");
-        }
-    }
-    if (rc) {
-        *status = eVdbBlastErr;
-    }
-
-    if (*status == eVdbBlastNoErr) {
-        STSMSG(3, ("VdbBlast4naReaderData(read_id=%ld, length=%ld)",
-            read_id, *length));
-    }
-    else {
-        STSMSG(1, ("Error: failed to VdbBlast4naReaderData(read_id=%ld)",
-            read_id));
-    }
-
-    return d;
-}
-
-/******************************************************************************/
-static const char VDB_BLAST_AA_READER[] = "VdbBlastStdaaReader";
-
-struct VdbBlastStdaaReader {
-    KRefcount refcount;
-};
-
-LIB_EXPORT
-VdbBlastStdaaReader* CC VdbBlastRunSetMakeStdaaReader(
-    const VdbBlastRunSet *self,
-    uint32_t *status)
-{
-    VdbBlastStdaaReader *item = NULL;
-
-    uint32_t dummy = eVdbBlastNoErr;
-    if (status == NULL)
-    {   status = &dummy; }
-
-    item = calloc(1, sizeof *item);
-    if (item == NULL) {
-        *status = eVdbBlastMemErr;
-        STSMSG(1, ("Error: failed to create VdbBlastStdaaReader"));
-        return NULL;
-    }
-
-    KRefcountInit(&item->refcount, 1,
-        VDB_BLAST_AA_READER, __func__, "aaReader");
-
-    _VdbBlastRunSetBeingRead(self);
-
-    *status = eVdbBlastNoErr;
-
-    STSMSG(1, ("Created VdbBlastStdaaReader"));
-
-    return item;
-}
-
-LIB_EXPORT
-VdbBlastStdaaReader* CC VdbBlastStdaaReaderAddRef(
-    VdbBlastStdaaReader *self)
-{
-    if (self == NULL) {
-        STSMSG(1, ("VdbBlastStdaaReaderAddRef(NULL)"));
-        return self;
-    }
-
-    if (KRefcountAdd(&self->refcount, VDB_BLAST_AA_READER) == krefOkay) {
-        STSMSG(1, ("VdbBlastStdaaReaderAddRef"));
-        return self;
-    }
-
-    STSMSG(1, ("Error: failed to VdbBlastStdaaReaderAddRef"));
-    return NULL;
-}
-
-LIB_EXPORT
-void CC VdbBlastStdaaReaderRelease(VdbBlastStdaaReader *self)
-{
-    if (self == NULL)
-    {   return; }
-
-    STSMSG(1, ("VdbBlastStdaaReaderRelease"));
-    if (KRefcountDrop(&self->refcount, VDB_BLAST_AA_READER) != krefWhack)
-    {   return; }
-
-    STSMSG(1, ("Deleting VdbBlastStdaaReader"));
-    free(self);
-    memset(self, 0, sizeof *self);
-}
-
-LIB_EXPORT
-size_t CC VdbBlastStdaaReaderRead(const VdbBlastStdaaReader *self,
-    uint32_t *status,
-    uint64_t pig,
-    uint8_t *buffer,
-    size_t buffer_length)
-{   return _NotImplemented(__func__); }
-
-LIB_EXPORT
-const uint8_t* CC VdbBlastStdaaReaderData(const VdbBlastStdaaReader *self,
-    uint32_t *status,
-    uint64_t pig,
-    size_t *length)
-{   return _NotImplementedP(__func__); }
-
-
-/******************************************************************************/
-
-static const char VDB_BLAST_REFERENCE_SET[] = "VdbBlastReferenceSet";
-
-struct VdbBlastReferenceSet {
-    KRefcount refcount;
-    const VdbBlastRunSet *rs;
-};
-
-
-LIB_EXPORT VdbBlastReferenceSet* CC VdbBlastRunSetMakeReferenceSet(
-    const VdbBlastRunSet *self,
-    VdbBlastStatus *status)
-{
-    VdbBlastReferenceSet *p = calloc(1, sizeof *p);
-
-    VdbBlastStatus dummy = eVdbBlastNoErr;
-    if (status == NULL)
-    {   status = &dummy; }
-
-    if (p == NULL) {
-        *status = eVdbBlastMemErr;
-    }
-    else {
-        KRefcountInit(&p->refcount, 1, VDB_BLAST_REFERENCE_SET,
-            __func__, "referenceSet");
-        *status = eVdbBlastNoErr;
-    }
-
-    p->rs = VdbBlastRunSetAddRef((VdbBlastRunSet*)self);
-
-    return p;
-}
-
-
-static
-void _VdbBlastReferenceSetWhack(VdbBlastReferenceSet *self)
-{
-    if (self == NULL) {
-        return;
-    }
-
-    STSMSG(1, ("Deleting VdbBlastReferenceSet"));
-
-    VdbBlastRunSetRelease((VdbBlastRunSet*)self->rs);
-
-    memset(self, 0, sizeof *self);
-
-    free(self);
-}
-
-
-LIB_EXPORT VdbBlastReferenceSet* CC VdbBlastReferenceSetAddRef
-    (VdbBlastReferenceSet *self)
-{
-    if (self == NULL) {
-        STSMSG(1, ("VdbBlastReferenceSetAddRef(NULL)"));
-        return self;
-    }
-
-    if (KRefcountAdd(&self->refcount, VDB_BLAST_REFERENCE_SET)
-        == krefOkay)
-    {
-        STSMSG(1, ("VdbBlastReferenceSetAddRef"));
-        return self;
-    }
-
-    STSMSG(1, ("Error: failed to VdbBlastReferenceSetAddRef"));
-    return NULL;
-}
-
-
-LIB_EXPORT
-void CC VdbBlastReferenceSetRelease(VdbBlastReferenceSet *self)
-{
-    if (self == NULL) {
-        return;
-    }
-
-    STSMSG(1, ("VdbBlastReferenceSetRelease"));
-    if (KRefcountDrop(&self->refcount, VDB_BLAST_REFERENCE_SET) != krefWhack) {
-        return;
-    }
-
-    _VdbBlastReferenceSetWhack(self);
-}
-
-
-LIB_EXPORT VdbBlast2naReader* CC VdbBlastReferenceSetMake2naReader(
-    const VdbBlastReferenceSet *self,
-    VdbBlastStatus *status,
-    uint64_t initial_read_id)
-{
-    return VdbBlastRunSetMake2naReaderExt
-        (self->rs, status, initial_read_id, VDB_READ_REFERENCE);
-}
-
-
-LIB_EXPORT VdbBlast4naReader* CC VdbBlastReferenceSetMake4naReader(
-    const VdbBlastReferenceSet *self,
-    VdbBlastStatus *status)
-{
-    return VdbBlastRunSetMake4naReaderExt(self->rs, status, VDB_READ_REFERENCE);
-}
-
-
-static const struct References* _VdbBlastReferenceSetCheckReferences(
-
-    const VdbBlastReferenceSet *self, VdbBlastStatus *status)
-{
-    assert(status);
-
-    if (self == NULL || self->rs == NULL ||
-        self->rs->core2naRef.reader.refs == NULL)
-    {
-        *status = eVdbBlastErr;
-        return NULL;
-    }
-
-    _VdbBlastRunSetBeingRead(self->rs);
-
-    *status = eVdbBlastNoErr;
-    return self->rs->core2naRef.reader.refs;
-}
-
-
-static const struct References* _VdbBlastReferenceSetInitReferences(
-    const VdbBlastReferenceSet *self,
-    VdbBlastStatus *status)
-{
-    VdbBlastRunSet *rs = NULL;
-    Reader2na *reader = NULL;
-
-    assert(status);
-
-    if (self == NULL || self->rs == NULL) {
-        *status = eVdbBlastErr;
-        return NULL;
-    }
-
-    rs = (VdbBlastRunSet*)self->rs;
-
-    _VdbBlastRunSetBeingRead(rs);
-
-    reader = &rs->core2naRef.reader;
-
-    *status = eVdbBlastNoErr;
-
-    if (reader->refs == NULL) {
-        rc_t rc = KLockAcquire(rs->core2naRef.mutex);
-        if (rc != 0) {
-            *status = eVdbBlastErr;
-            return NULL;
-        }
-
-        if (reader->refs == NULL) {
-            reader->refs = _RunSetMakeReferences(&rs->runs, status);
-        }
-
-        KLockUnlock(rs->core2naRef.mutex);
-    }
-
-    return reader->refs;
-}
-
-
-LIB_EXPORT uint64_t CC VdbBlastReferenceSetGetNumSequences(
-    const VdbBlastReferenceSet *self,
-    VdbBlastStatus *status)
-{
-    const struct References *refs = NULL;
-
-    VdbBlastStatus dummy = eVdbBlastNoErr;
-    if (status == NULL) {
-        status = &dummy;
-    }
-
-    refs = _VdbBlastReferenceSetInitReferences(self, status);
-    if (*status != eVdbBlastNoErr) {
-        return 0;
-    }
-
-    assert                           (refs);
-    return _ReferencesGetNumSequences(refs, status);
-}
-
-
-LIB_EXPORT uint64_t CC VdbBlastReferenceSetGetTotalLength(
-    const VdbBlastReferenceSet *self,
-    VdbBlastStatus *status)
-{
-    const struct References *refs = NULL;
-
-    VdbBlastStatus dummy = eVdbBlastNoErr;
-    if (status == NULL) {
-        status = &dummy;
-    }
-
-    refs = _VdbBlastReferenceSetInitReferences(self, status);
-    if (*status != eVdbBlastNoErr) {
-        return 0;
-    }
-
-    assert                          (refs);
-    return _ReferencesGetTotalLength(refs, status);
-}
-
-
-LIB_EXPORT size_t CC VdbBlastReferenceSetGetReadName(
-    const VdbBlastReferenceSet *self,
-    uint64_t read_id,
-    char *name_buffer,
-    size_t bsize)
-{
-    if (bsize > 0 && name_buffer != NULL) {
-        name_buffer[0] = '\0';
-    }
-
-    {
-        VdbBlastStatus status = eVdbBlastErr;
-
-        const struct References *refs
-            = _VdbBlastReferenceSetCheckReferences(self, &status);
-        if (status != eVdbBlastNoErr) {
-            return 0;
-        }
-
-        assert                       (refs);
-        return _ReferencesGetReadName(refs, read_id, name_buffer, bsize);
-    }
-}
-
-
-LIB_EXPORT VdbBlastStatus CC VdbBlastReferenceSetGetReadId(
-    const VdbBlastReferenceSet *self,
-    const char *name_buffer,
-    size_t bsize,
-    uint64_t *read_id)
-{
-    VdbBlastStatus status = eVdbBlastErr;
-
-    const struct References *refs
-        = _VdbBlastReferenceSetCheckReferences(self, &status);
-    if (status != eVdbBlastNoErr) {
-        return status;
-    }
-
-    assert                     (refs);
-    return _ReferencesGetReadId(refs, name_buffer, bsize, read_id);
-}
-
-
-LIB_EXPORT uint64_t CC VdbBlastReferenceSetGetReadLength(
-    const VdbBlastReferenceSet *self,
-    uint64_t read_id,
-    VdbBlastStatus *status)
-{
-    VdbBlastStatus dummy = eVdbBlastNoErr;
-    if (status == NULL)
-    {   status = &dummy; }
-
-    *status = eVdbBlastErr;
-
-    {
-        const struct References *refs
-            = _VdbBlastReferenceSetCheckReferences(self, status);
-        if (*status != eVdbBlastNoErr) {
-            return 0;
-        }
-
-        assert                         (refs);
-        return _ReferencesGetReadLength(refs, read_id, status);
-    }
-}
-
-
-/* EOF */
diff --git a/libs/blast/reader.h b/libs/blast/reader.h
deleted file mode 100644
index c215785..0000000
--- a/libs/blast/reader.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#ifndef _h_libs_blast_reader_
-#define _h_libs_blast_reader_
-
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <stddef.h> /* size_t */
-#include <stdint.h> /* uint64_t */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct Core2na;
-struct RunSet;
-
-typedef struct Data2na {
-    uint32_t irun;
-    const struct VBlob *blob;
-} Data2na;
-
-uint64_t _Core2naRead(struct Core2na *self,
-    const struct RunSet *runs, uint32_t *status, uint64_t *read_id,
-    size_t *starting_base, uint8_t *buffer, size_t buffer_size);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_libs_blast_reader_ */
diff --git a/libs/blast/reference.c b/libs/blast/reference.c
deleted file mode 100644
index 3f8f680..0000000
--- a/libs/blast/reference.c
+++ /dev/null
@@ -1,1710 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include "reference.h" /* _ReferencesWhack */
-
-#include "blast-mgr.h" /* BTableType */
-#include "reader.h" /* Data2na */
-#include "run-set.h" /* Core4na */
-
-#include <klib/log.h> /* PLOGMSG */
-#include <klib/rc.h> /* SILENT_RC */
-#include <klib/status.h> /* STSMSG */
-
-#include <vdb/blob.h> /* VBlob */
-#include <vdb/cursor.h> /* VCursor */
-#include <vdb/table.h> /* VTable */
-
-#include <string.h> /* strcmp */
-
-/******************************************************************************/
-
-#define MAX_SEQ_LEN 5000
-
-/******************************************************************************/
-
-#define MAX_BIT64 (~((uint64_t)-1 >> 1))
-
-static bool _is_set_read_id_reference_bit(uint64_t read_id) {
-    return read_id & MAX_BIT64;
-}
-
-static
-uint64_t _clear_read_id_reference_bit(uint64_t read_id, bool *bad)
-{
-    assert(bad);
-
-    *bad = false;
-
-    if (! _is_set_read_id_reference_bit(read_id)) {
-        *bad = true;
-        S
-        return read_id;
-    }
-
-    return read_id & ~MAX_BIT64;
-}
-
-static uint64_t _set_read_id_reference_bit
-    (uint64_t read_id, VdbBlastStatus *status)
-{
-    assert(status);
-
-    if (_is_set_read_id_reference_bit(read_id)) {
-        *status = eVdbBlastErr;
-        S
-        return read_id;
-    }
-
-    return read_id | MAX_BIT64;
-}
-
-/******************************************************************************/
-typedef struct {
-    BSTNode n;
-
-    const char *str;
-    uint32_t rfdi;
-} BstNode;
-static void BstNodeInit(BstNode *self, const char *str, uint32_t rfdi) {
-    assert(self && str);
-
-    self->str  = str;
-    self->rfdi = rfdi;
-}
-
-static void CC BstNodeWhack(BSTNode *n, void *ignore) {
-    memset(n, 0, sizeof *n);
-
-    free(n);
-}
-
-static int64_t CC BstNodeCmpStr(const void *item, const BSTNode *n) {
-    const char *c = item;
-    const BstNode *rn = (const BstNode*)n;
-
-    if (c == NULL || rn == NULL || rn->str == NULL) {
-        return 1;
-    }
-
-    return strcmp(c, rn->str);
-}
-
-static int64_t CC BstNodeCmpString(const void *item, const BSTNode *n) {
-    const String *c = item;
-    const BstNode *rn = (const BstNode*)n;
-
-    if (c == NULL || rn == NULL || rn->str == NULL) {
-        return 1;
-    }
-
-    return string_cmp(c->addr, c->size, rn->str, string_size(rn->str),
-                                                 string_size(rn->str));
-}
-
-static int64_t CC RunBstSort(const BSTNode *item, const BSTNode *n) {
-    const BstNode *rn = (const BstNode*)item;
-
-    assert(rn);
-
-    return BstNodeCmpStr(rn->str, n);
-}
-
-/******************************************************************************/
-struct VdbBlastRef {
-    uint32_t iRun;  /* in run table */
-    char *SEQ_ID;
-    uint64_t first; /* spot  in REFERENCE table */
-    uint64_t count; /* spots in REFERENCE table */
-    bool external;  /* reference */
-    bool circular;  /* reference */
-    size_t base_count; /* number of bases in reference */
-};
-static void _VdbBlastRefWhack(VdbBlastRef *self) {
-    assert(self);
-
-    free(self->SEQ_ID);
-
-    memset(self, 0, sizeof *self);
-}
-
-static VdbBlastStatus _VdbBlastRefSetCounts(VdbBlastRef *self, uint64_t cur_row,
-    int64_t first_row, const VCursor *cursor, uint32_t idxREAD_LEN, int64_t idx,
-    uint64_t *base_count)
-{
-    assert(self && base_count);
-
-    *base_count = 0;
-
-    if (self->count != 0) {
-        return eVdbBlastNoErr;
-    }
-
-    assert(cur_row != first_row);
-
-    self->count = cur_row - self->first;
-
-    {
-        uint32_t read_len = 0;
-        uint32_t row_len = 0;
-        rc_t rc = VCursorReadDirect(cursor, self->first + self->count - 1,
-            idxREAD_LEN, 8, &read_len, 4, &row_len);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error in VCursorReadDirect(READ_LEN, spot=$(spot))",
-                "spot=%ld", self->first + self->count - 1));
-            return eVdbBlastErr;
-        }
-        else if (row_len != 4) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Bad row_len in VCursorReadDirect(READ_LEN, spot=$(spot))",
-                "spot=%ld", self->first + self->count - 1));
-            return eVdbBlastErr;
-        }
-        else {
-            self->base_count = (self->count - 1) * MAX_SEQ_LEN + read_len;
-        }
-
-    }
-
-    STSMSG(1, ("%i) '%s'[%i-%i(%i)][%lu]", idx, self->SEQ_ID, self->first,
-        self->first + self->count - 1, self->count, self->base_count));
-
-    *base_count = self->base_count;
-
-    return eVdbBlastNoErr;
-}
-
-/******************************************************************************/
-void _RefSetFini(RefSet *self) {
-    size_t i = 0;
-
-    if (self == NULL) {
-        return;
-    }
-
-    BSTreeWhack(&self->tRuns   , BstNodeWhack, NULL);
-    BSTreeWhack(&self->tExtRefs, BstNodeWhack, NULL);
-
-    for (i = 0; i < self->rfdk; ++i) {
-        _VdbBlastRefWhack(&self->rfd[i]);
-    }
-
-    free(self->rfd);
-
-    memset(self, 0, sizeof *self);
-}
-
-/******************************************************************************/
-typedef struct References {
-    const RunSet *rs;     /* table of runs */
-
-    RefSet       *refs;
-
-    size_t        rfdi; /* refs member being read */
-    size_t        spot; /* next spot to be read in refs member being read */
-    bool      circular; /* for circular references
-                         - if true than the spot is provided the second time */
-
-    const VCursor *curs; /* to REFERENCE table of current refs member ([rfdi])*/
-    uint32_t   idxREAD; /* index of READ column in VCursor */
-    uint64_t   read_id;
-    bool           eos; /* end if set: no more sequences to read */
-} References;
-void _ReferencesWhack(const References *cself) {
-    References *self = (References *)cself;
-
-    if (self == NULL) {
-        return;
-    }
-
-    VCursorRelease(self->curs);
-
-    memset(self, 0, sizeof *self);
-
-    free(self);
-}
-
-const References* _RunSetMakeReferences
-    (RunSet *self, VdbBlastStatus *status)
-{
-    rc_t rc = 0;
-    uint64_t totalLen = 0;
-    uint32_t irun = 0;
-    References *r = NULL;
-    RefSet *refs = NULL;
-    const VCursor *c = NULL;
-    uint32_t iREAD_LEN = 0;
-    assert(self && status);
-    refs = &self->refs;
-    r = calloc(1, sizeof *r);
-    if (r == NULL) {
-        *status = eVdbBlastMemErr;
-        return NULL;
-    }
-    assert(!refs->rfd);
-    refs->rfdn = 512; /* initially allocated number of references */
-    refs->rfd = calloc(1, refs->rfdn * sizeof *refs->rfd);
-    if (refs->rfd == NULL) {
-        *status = eVdbBlastMemErr;
-        return NULL;
-    }
-    BSTreeInit(&refs->tRuns);
-    BSTreeInit(&refs->tExtRefs);
-    r->rs = self;
-    r->refs = refs;
-    for (irun = 0; irun < self->krun; ++irun) {
-        const void *crntSeqId = NULL;
-        uint32_t iCIRCULAR = 0; 
-        uint32_t iCMP_READ = 0;
-        uint32_t iSEQ_ID   = 0;
-        int64_t first = 0;
-        uint64_t count = 0;
-        uint64_t cur_row = 0;
-        const VdbBlastRun *run = &self->run[irun];
-        if (run->obj == NULL || run->obj->db == NULL) {
-            continue;
-        }
-        {
-            BstNode *n
-                = (BstNode*)BSTreeFind(&refs->tRuns, run->acc, BstNodeCmpStr);
-            if (n != NULL) {
-                continue; /* ignore repeated runs */
-            }
-            else {
-                n = calloc(1, sizeof *n);
-                if (n == NULL) {
-                    *status = eVdbBlastMemErr;
-                    return NULL;
-                }
-            }
-            BstNodeInit(n, run->acc, refs->rfdk);
-            BSTreeInsert(&refs->tRuns, (BSTNode*)n, RunBstSort);
-        }
-        if (run->obj->refTbl == NULL) {
-            rc = VDatabaseOpenTableRead(run->obj->db,
-                &run->obj->refTbl, "REFERENCE");
-            if (rc != 0) {
-          /* Do not log error : this DB does not have any reference - it happens
-                PLOGERR(klogInt, (klogInt, rc,
-                    "Cannot open REFERENCE table for $(acc))",
-                    "acc=%s", run->acc));*/
-                continue;
-            }
-        }
-        rc = VTableCreateCursorRead(run->obj->refTbl, &c);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Cannot create REFERENCE Cursor for $(acc))",
-                "acc=%s", run->acc));
-            continue;
-        }
-        if (rc == 0) {
-            rc = VCursorAddColumn(c, &iCIRCULAR, "CIRCULAR");
-            if (rc != 0) {
-                PLOGERR(klogInt, (klogInt, rc,
-                    "Cannot add REFERENCE/CIRCULAR Column for $(acc))",
-                    "acc=%s", run->acc));
-            }
-        }
-        if (rc == 0) {
-            rc = VCursorAddColumn(c, &iCMP_READ, "CMP_READ");
-            if (rc != 0) {
-                PLOGERR(klogInt, (klogInt, rc,
-                    "Cannot add REFERENCE/CMP_READ Column for $(acc))",
-                    "acc=%s", run->acc));
-            }
-        }
-        if (rc == 0) {
-            rc = VCursorAddColumn(c, &iREAD_LEN, "READ_LEN");
-            if (rc != 0) {
-                PLOGERR(klogInt, (klogInt, rc,
-                    "Cannot add REFERENCE/READ_LEN Column for $(acc))",
-                    "acc=%s", run->acc));
-            }
-        }
-        if (rc == 0) {
-            rc = VCursorAddColumn(c, &iSEQ_ID, "SEQ_ID");
-            if (rc != 0) {
-                PLOGERR(klogInt, (klogInt, rc,
-                    "Cannot add REFERENCE/SEQ_ID Column for $(acc))",
-                    "acc=%s", run->acc));
-            }
-        }
-        if (rc == 0) {
-            rc = VCursorOpen(c);
-            if (rc != 0) {
-                PLOGERR(klogInt, (klogInt, rc,
-                    "Cannot open REFERENCE Cursor for $(acc))",
-                    "acc=%s", run->acc));
-            }
-        }
-        if (rc == 0) {
-            rc = VCursorIdRange(c, iSEQ_ID, &first, &count);
-            if (rc != 0) {
-                PLOGERR(klogInt, (klogInt, rc,
-                    "Cannot get REFERENCE/CursorIdRange for $(acc))",
-                    "acc=%s", run->acc));
-            }
-        }
-
-        for (cur_row = first;
-            cur_row < first + count && rc == 0; ++cur_row)
-        {
-            bool newRef = false;
-
-            const void *base = NULL;
-            uint32_t elem_bits = 0, boff = 0, row_len = 0;
-            char *SEQ_ID = NULL;
-
-            rc = VCursorCellDataDirect(c, cur_row, iSEQ_ID,
-                &elem_bits, &base, &boff, &row_len);
-            if (rc == 0 && (elem_bits != 8 || boff != 0)) {
-                rc = RC(rcSRA, rcCursor, rcReading, rcData, rcUnexpected);
-            }
-            if (rc != 0) {
-                PLOGERR(klogInt, (klogInt, rc, "Cannot get "
-                    "CellDataDirect for $(acc)/REFERENCE/SEQ_ID/$(row)",
-                    "acc=%s,row=%lu", run->acc, cur_row));
-                break;
-            }
-            if (crntSeqId == NULL) { /* the first reference in a run */
-                newRef = true;
-            }
-            else if (crntSeqId != base) { /* pointer to SeqId has changed -
-                                             might be a new reference*/
-                newRef = true;
-            }
-
-            if (newRef) {
-                crntSeqId = base;
-                SEQ_ID = string_dup(base, row_len);
-                if (SEQ_ID == NULL) {
-                    *status = eVdbBlastMemErr;
-                    return NULL;
-                }
-                if (refs->rfdk > 0 && /* there are previous references */
-                    cur_row != first) /* not the first reference row in a run */
-                {
-                    const VdbBlastRef *rfd1 = &refs->rfd[refs->rfdk - 1];
-                    if (string_cmp(rfd1->SEQ_ID, string_size(rfd1->SEQ_ID),
-                            SEQ_ID, string_size(SEQ_ID), string_size(SEQ_ID))
-                        == 0)
-                    {
-                     /* a SEQ_ID with a different pointer but the same value:
-                       (e.g. SRR520124/REFERENCE) */
-                        free((void*)SEQ_ID);
-                        SEQ_ID = NULL;
-                        newRef = false;
-                    }
-                }
-            }
-
-            if (newRef) {
-                bool CIRCULAR = false;
-                bool external = false;
-                VdbBlastRef *rfd  = NULL;
-                rc = VCursorCellDataDirect(c, cur_row, iCIRCULAR,
-                    &elem_bits, &base, &boff, &row_len);
-                if (rc == 0 &&
-                    (base == NULL || elem_bits != 8 || boff != 0))
-                {
-                    rc = RC(rcSRA, rcCursor, rcReading, rcData, rcUnexpected);
-                }
-                if (rc != 0) {
-                    PLOGERR(klogInt, (klogInt, rc, "Error during "
-                        "CellDataDirect for $(acc)/REFERENCE/CIRCULAR/$(row)",
-                        "acc=%s,row=%lu", run->acc, cur_row));
-                    break;
-                }
-                CIRCULAR = *(bool*)base;
-
-                rc = VCursorCellDataDirect(c, cur_row, iCMP_READ,
-                    &elem_bits, &base, &boff, &row_len);
-                if (rc != 0) {
-                    PLOGERR(klogInt, (klogInt, rc, "Cannot get "
-                        "CellDataDirect for $(acc)/REFERENCE/CMP_READ/$(row)",
-                        "acc=%s,row=%lu", run->acc, cur_row));
-                    break;
-                }
-                else if (base == NULL
-                    || elem_bits == 0 || row_len == 0)
-                {
-                    external = true;
-                }
-
-                if (refs->rfdk >= refs->rfdn) {
-                    void *tmp = NULL;
-                    refs->rfdn *= 2;
-                    tmp = realloc(refs->rfd, refs->rfdn * sizeof *refs->rfd);
-                    if (tmp == NULL) {
-                        *status = eVdbBlastMemErr;
-                        return NULL;
-                    }
-                    refs->rfd = tmp;
-                }
-
-                rfd = &refs->rfd[refs->rfdk];
-
-                if (refs->rfdk != 0) {
-                    uint64_t bc;
-                    *status = _VdbBlastRefSetCounts(&refs->rfd[refs->rfdk - 1],
-                        cur_row, first, c, iREAD_LEN, refs->rfdk - 1, &bc);
-                    if (*status != eVdbBlastNoErr) {
-                        return NULL;
-                    }
-                    totalLen += bc;
-                }
-
-                if (external) {
-                    BstNode *n = (BstNode*)
-                        BSTreeFind(&refs->tExtRefs, SEQ_ID, BstNodeCmpStr);
-                    if (n != NULL) {  /* we already have this reference */
-                        free(SEQ_ID); /* in one of the previous runs */
-                        SEQ_ID = NULL;
-                    }
-                    else {
-                        n = calloc(1, sizeof *n);
-                        if (n == NULL) {
-                            *status = eVdbBlastMemErr;
-                            return NULL;
-                        }
-                        BstNodeInit(n, SEQ_ID, refs->rfdk);
-                        BSTreeInsert(&refs->tExtRefs, (BSTNode*)n, RunBstSort);
-                    }
-                }
-
-                if (SEQ_ID != NULL) { /* we already have it in refs->tExtRefs */
-                    rfd->iRun     = irun;
-                    rfd->SEQ_ID   = SEQ_ID;
-                    rfd->first    = cur_row;
-                    rfd->circular = CIRCULAR;
-                    rfd->external = external;
-
-                    rfd->count      = 0; /* will initialize later */
-                    rfd->base_count = 0; /* uninitialized */
-
-                    ++refs->rfdk;
-                }
-            }
-        }
-        if (refs->rfdk > 0 && refs->rfd[refs->rfdk - 1].count == 0) {
-            uint64_t bc;
-            *status = _VdbBlastRefSetCounts(&refs->rfd[refs->rfdk - 1],
-                cur_row, first, c, iREAD_LEN, refs->rfdk - 1, &bc);
-            if (*status != eVdbBlastNoErr) {
-                return NULL;
-            }
-            totalLen += bc;
-        }
-        RELEASE(VCursor, c);
-    }
-    refs->totalLen = totalLen;
-    *status = eVdbBlastNoErr;
-    return r;
-}
-
-/******************************************************************************/
-uint64_t _ReferencesGetNumSequences
-    (const References *self, VdbBlastStatus *status)
-{
-    assert(status);
-
-    if (self == NULL || self->refs == NULL) {
-        *status = eVdbBlastErr;
-        return 0;
-    }
-
-    *status = eVdbBlastNoErr;
-    return self->refs->rfdk;
-}
-
-uint64_t _ReferencesGetTotalLength
-    (const References *self, VdbBlastStatus *status)
-{
-    assert(status);
-
-    if (self == NULL || self->refs == NULL) {
-        *status = eVdbBlastErr;
-        return 0;
-    }
-
-    *status = eVdbBlastNoErr;
-    return self->refs->totalLen;
-}
-
-
-uint64_t _ReferencesGetReadLength(const struct References *self,
-    uint64_t read_id,
-    VdbBlastStatus *status)
-{
-    bool bad = false;
-    read_id = _clear_read_id_reference_bit(read_id, &bad);
-
-    assert(status);
-
-    if (bad) {
-        *status = eVdbBlastInvalidId;
-        return 0;
-    }
-
-    if (self == NULL || self->refs == NULL ||
-        self->refs->rfdk <= read_id)
-    {
-        return 0;
-    }
-
-    {
-        const VdbBlastRef *r = NULL;
-        assert(self->refs->rfd);
-        r = &self->refs->rfd[read_id];
-
-        if (r->circular) {
-            *status = eVdbBlastCircularSequence;
-        }
-        else {
-            *status = eVdbBlastNoErr;
-        }
-
-        return r->base_count;
-    }
-}
-
-
-#define REF_SEPARATOR '/'
-
-size_t CC _ReferencesGetReadName(const struct References *self,
-    uint64_t read_id, char *name_buffer, size_t bsize)
-{
-    const VdbBlastRef *r = NULL;
-    const char *acc = NULL;
-
-    bool bad = false;
-    read_id = _clear_read_id_reference_bit(read_id, &bad);
-    if (bad) {
-        return 0;
-    }
-
-    if (self == NULL || self->refs == NULL ||
-        self->refs->rfdk <= read_id)
-    {
-        return 0;
-    }
-
-    assert(self->refs->rfd);
-    r = &self->refs->rfd[read_id];
-
-    if (!r->external) {
-        if (self->rs == NULL || self->rs->krun <= r->iRun) {
-            return 0;
-        }
-
-        acc = self->rs->run[r->iRun].acc;
-    }
-
-    {
-        const char *SEQ_ID = self->refs->rfd[read_id].SEQ_ID;
-
-        size_t num_writ = 0;
-        if (acc == NULL) {
-            string_printf(name_buffer, bsize, &num_writ, "%s", SEQ_ID);
-        }
-        else {
-            string_printf(name_buffer, bsize, &num_writ,
-                "%s%c%s", acc, REF_SEPARATOR, SEQ_ID);
-        }
-        return num_writ;
-    }
-}
-
-/******************************************************************************/
-VdbBlastStatus _ReferencesGetReadId(const References *self,
-    const char *name_buffer, size_t bsize, uint64_t *read_id)
-{
-    int32_t rfdi = ~0;
-    const char *sp = name_buffer;
-    const RefSet *refs = NULL;
-    String acc, seq;
-    BstNode *n = NULL;
-    if (self == NULL || self->refs == NULL || self->rs == NULL ||
-        name_buffer == NULL || bsize == 0 || read_id == NULL)
-    {
-        return eVdbBlastErr;
-    }
-    refs = self->refs;
-    memset(&acc, 0 , sizeof acc);
-    memset(&seq, 0 , sizeof seq);
-
-    sp = string_chr(name_buffer, bsize, REF_SEPARATOR);
-    if (sp != NULL) {
-        StringInit(&acc, name_buffer, sp - name_buffer, sp - name_buffer);
-        if ((sp - name_buffer) >= bsize) {
-            return eVdbBlastErr;
-        }
-    }
-
-    if (sp != NULL) {
-        StringInit(&seq, sp + 1, bsize - (sp - name_buffer) - 1,
-                                 bsize - (sp - name_buffer) - 1);
-    }
-    else {
-        StringInit(&seq, name_buffer, bsize, bsize);
-    }
-    if (acc.size != 0) {
-        bool found = false;
-        int32_t iRun = ~0;
-        n = (BstNode*)BSTreeFind(&refs->tRuns, &acc, BstNodeCmpString);
-        if (n == NULL) {
-            return eVdbBlastErr;
-        }
-        iRun = refs->rfd[n->rfdi].iRun;
-        assert(iRun < self->rs->krun);
-        assert(!string_cmp(self->rs->run[iRun].acc,
-               string_size(self->rs->run[iRun].acc),
-               acc.addr, acc.size, acc.size));
-        for (rfdi = n->rfdi; rfdi < refs->rfdk; ++rfdi) {
-            const VdbBlastRef *r = &refs->rfd[rfdi];
-            if (r->iRun != iRun) {
-                return eVdbBlastErr;
-            }
-            if (string_cmp(seq.addr, seq.size,
-                r->SEQ_ID, string_size(r->SEQ_ID), string_size(r->SEQ_ID)) == 0)
-            {
-                assert(!r->external);
-                found = true;
-                break;
-            }
-        }
-        if (!found) {
-            return eVdbBlastErr;
-        }
-    }
-    else {
-        n = (BstNode*)BSTreeFind(&refs->tExtRefs, &seq, BstNodeCmpString);
-        if (n == NULL) {
-            return eVdbBlastErr;
-        }
-        rfdi = n->rfdi;
-        assert(refs->rfd[rfdi].external);
-    }
-    {
-        VdbBlastStatus status = eVdbBlastNoErr;
-        assert(rfdi < refs->rfdk);
-        *read_id = _set_read_id_reference_bit(rfdi, &status);
-        return status;
-    }
-}
-
-/******************************************************************************/
-static uint64_t _ReferencesRead2na(References *self,
-    VdbBlastStatus *status, uint64_t *read_id,
-    size_t *starting_base, uint8_t *buffer, size_t buffer_size)
-{
-    rc_t rc = 0;
-    uint64_t total = 0;
-    const VdbBlastRef *rfd = NULL;
-    uint8_t *begin = buffer;
-    assert(status && self && self->rs && read_id && starting_base);
-    *status = eVdbBlastNoErr;
-    assert(self->refs);
-    rfd = &self->refs->rfd[self->rfdi];
-    while (total < buffer_size * 4) {
-        uint32_t start = 0;
-        uint32_t to_read = 0;
-        uint32_t num_read = 0;
-        uint32_t remaining = 0;
-        if (self->spot == 0 ||
-           /* the very first call: open the first spot of the first reference */
-
-            self->rfdi != self->read_id) /* should switch to a next reference */
-        {
-            const VdbBlastRef *rfd1 = NULL;
-            const VTable *t = NULL;
-            assert(!total);
-            if (self->rfdi != self->read_id) {/* switching to a next reference*/
-                if (self->rfdi + 1 != self->read_id) { /* should never happen */
-                    *status = eVdbBlastErr;
-                    S
-                    return 0;
-                }
-                *starting_base = 0;
-                ++self->rfdi;
-                if (self->rfdi >= self->refs->rfdk) {
-                    self->eos = true;
-                    *status = eVdbBlastNoErr; /* end of set */
-                    S
-                    return 0;
-                }
-                rfd1 = rfd;
-                rfd = &self->refs->rfd[self->rfdi];
-            }
-            if (rfd->iRun >= self->rs->krun) {
-                S
-                return 0;
-            }
-            if (self->rs->run == NULL || self->rs->run[rfd->iRun].obj == NULL ||
-                self->rs->run[rfd->iRun].obj->refTbl == NULL)
-            {
-                S
-                return 0;
-            }
-            if (self->rfdi == 0 || rfd1->iRun != rfd->iRun) {
-                const char *acc = self->rs->run[rfd->iRun].acc;
-                t = self->rs->run[rfd->iRun].obj->refTbl;
-                RELEASE(VCursor, self->curs);
-                rc = VTableCreateCursorRead(t, &self->curs);
-                if (rc != 0) {
-                    PLOGERR(klogInt, (klogInt, rc,
-                        "Cannot create REFERENCE Cursor for $(acc)) /Read2na",
-                        "acc=%s", acc));
-                    return 0;
-                }
-                rc = VCursorAddColumn(self->curs,
-                    &self->idxREAD, "(INSDC:2na:packed)READ");
-                if (rc != 0) {
-                    PLOGERR(klogInt, (klogInt, rc, "Cannot add "
-                        "REFERENCE/READ Column for $(acc)) /Read2na",
-                        "acc=%s", acc));
-                    return 0;
-                }
-                rc = VCursorOpen(self->curs);
-                if (rc != 0) {
-                    PLOGERR(klogInt, (klogInt, rc,
-                        "Cannot open REFERENCE Cursor for $(acc)) /Read2na",
-                        "acc=%s", acc));
-                    return 0;
-                }
-            }
-            else {
-                if (self->curs == NULL || self->idxREAD == 0) {
-                    *status = eVdbBlastErr;
-                    S /* should never happen */
-                    return 0;
-                }
-            }
-            if (self->spot == 0) {
-                self->read_id = 0;
-            }
-            self->spot = rfd->first;
-        }
-        start = (uint32_t)*starting_base;
-        to_read = (uint32_t)(buffer_size * 4 - total);
-        rc = VCursorReadBitsDirect(self->curs, self->spot, self->idxREAD,
-            2, start, begin, 0, to_read, &num_read, &remaining);
-        total += num_read;
-        *status = eVdbBlastNoErr;
-        *read_id = _set_read_id_reference_bit(self->read_id, status);
-        if (*status != eVdbBlastNoErr) {
-            break;
-        }
-        if (rc != 0) {
-            if (rc == SILENT_RC
-                (rcVDB, rcCursor, rcReading, rcBuffer, rcInsufficient))
-            {
-                S
-                if (num_read == 0) {
-                    *status = eVdbBlastErr;
-                    S /* should never happen */
-                }
-                else {
-                    rc = 0;
-                }
-                *starting_base += num_read;
-                break;
-            }
-            else {
-                PLOGERR(klogInt, (klogInt, rc, "Error in VCursorReadBitsDirect"
-                    "($(path), READ, spot=$(spot)) /Read2na",
-                    "path=%s,spot=%ld",
-                    self->rs->run[rfd->iRun].path, self->spot));
-                *status = eVdbBlastErr;
-                return 0;
-            }
-        }
-        else {
-            if (remaining != 0) { /* The buffer is filled. */
-                S     /* There remains more data to read in the current spot. */
-                *starting_base += num_read;
-                break;
-            }
-            ++self->spot;
-            *starting_base = 0;
-            if (self->spot >= rfd->first + rfd->count) {
-                if (rfd->circular && ! self->circular) {
-                       /* end of the first repeat of a circular sequence */
-                    *status = eVdbBlastCircularSequence;
-                    self->circular = true;
-                    self->spot = rfd->first;
-                }
-                else { /* end of sequence */
-                    self->circular = false;
-                    ++self->read_id;
-                }
-                break;
-            }
-            begin += num_read / 4;
-            if ((num_read % 4) != 0) {
-                S
-                *status = eVdbBlastErr;
-                break; /* should never happen */
-            }
-        }
-    }
-    return total;
-}
-
-#if _DEBUGGING
-#define COMPARE
-#endif
-static uint32_t _ReferencesData2na(References *self,
-    Data2na *data, VdbBlastStatus *status,
-    Packed2naRead *buffer, uint32_t buffer_length)
-{
-    uint32_t num_read = 0;
-    assert(data && status && self && self->rs);
-    *status = eVdbBlastNoErr;
-    assert(self->refs);
-    for (num_read = 0; num_read < buffer_length; ) {
-        Packed2naRead *out = NULL;
-        rc_t rc = 0;
-        const VdbBlastRef *rfd = &self->refs->rfd[self->rfdi];
-        const char *acc = self->rs->run[rfd->iRun].acc;
-        int64_t first = 0;
-        uint64_t count = 0;
-        uint64_t last_spot = 0;
-        uint32_t elem_bits = 0;
-#ifdef COMPARE
-        uint32_t row_len = 0;
-#endif
-        size_t first_spot = 0;
-        bool full_scan = false;
-        *status = eVdbBlastErr;
-        assert(buffer);
-        RELEASE(VBlob, data->blob);
-        out = &buffer[num_read];
-        assert(self->refs);
-        if (self->spot == 0 ||
-         /* the very first call: open the first spot of the first reference */
-
-            self->rfdi != self->read_id) /* should switch to a next reference */
-        {
-            const VdbBlastRef *rfd1 = NULL;
-            const VTable *t = NULL;
-            if (self->rfdi != self->read_id) {/* switching to a next reference*/
-                if (self->rfdi + 1 != self->read_id) { /* should never happen */
-                    S
-                    return 0;
-                }
-                ++self->rfdi;
-                if (self->rfdi >= self->refs->rfdk) {
-                    self->eos = true;
-                    *status = eVdbBlastNoErr; /* end of set */
-                    S
-                    return 0;
-                }
-                rfd1 = rfd;
-                rfd = &self->refs->rfd[self->rfdi];
-            }
-            if (rfd->iRun >= self->rs->krun) {
-                S
-                return 0;
-            }
-            if (self->rs->run == NULL || self->rs->run[rfd->iRun].obj == NULL ||
-                self->rs->run[rfd->iRun].obj->refTbl == NULL)
-            {
-                S
-                return 0;
-            }
-            if (self->rfdi == 0 || rfd1->iRun != rfd->iRun) {
-                const char *acc = self->rs->run[rfd->iRun].acc;
-                t = self->rs->run[rfd->iRun].obj->refTbl;
-                RELEASE(VCursor, self->curs);
-                rc = VTableCreateCursorRead(t, &self->curs);
-                if (rc != 0) {
-                    PLOGERR(klogInt, (klogInt, rc,
-                        "Cannot create REFERENCE Cursor for $(acc)) /Data2na",
-                        "acc=%s", acc));
-                    return 0;
-                }
-                rc = VCursorAddColumn(self->curs,
-                    &self->idxREAD, "(INSDC:2na:packed)READ");
-                if (rc != 0) {
-                    PLOGERR(klogInt, (klogInt, rc,
-                        "Cannot add REFERENCE/READ Column for $(acc)) /Data2na",
-                        "acc=%s", acc));
-                    return 0;
-                }
-                rc = VCursorOpen(self->curs);
-                if (rc != 0) {
-                    PLOGERR(klogInt, (klogInt, rc,
-                        "Cannot open REFERENCE Cursor for $(acc) /Data2na)",
-                        "acc=%s", acc));
-                    return 0;
-                }
-            }
-            else {
-                if (self->curs == NULL || self->idxREAD == 0) {
-                    S /* should never happen */
-                    return 0;
-                }
-            }
-            if (self->spot == 0) {
-                self->read_id = 0;
-            }
-            self->spot = rfd->first;
-            data->irun = self->rfdi;
-        }
-        rc = VCursorGetBlobDirect(self->curs,
-            &data->blob, self->spot, self->idxREAD);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Cannot GetBlob REFERENCE/READ for $(acc)/$(spot) /2na)",
-                "acc=%s,spot=%zu", acc, self->spot));
-            return 0;
-        }
-        if (data->blob == NULL) {
-            S
-            return 0;
-        }
-        rc = VBlobIdRange(data->blob, &first, &count);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Cannot BlobIdRange REFERENCE/READ for $(acc)/$(spot) /2na",
-                "acc=%s,spot=%zu", acc, self->spot));
-            return 0;
-        }
-        if (self->spot < first || self->spot >= first + count) {
-            /* requested blob b(spot) but spot < b.first || spot > b.last:
-               should never happen */
-            S /* PLOGERR */
-            return 0;
-        }
-        if (first > rfd->first + rfd->count) { /* should never happen */
-            S /* PLOGERR */
-            return 0;
-        }
-        last_spot = first + count;
-        if (rfd->first + rfd->count < last_spot) {
-            last_spot = rfd->first + rfd->count;
-        }
-        first_spot = self->spot;
-#ifdef COMPARE
-        for (; self->spot < last_spot; ++self->spot) {
-            if (self->spot == first_spot) {
-                rc = VBlobCellData(data->blob, self->spot, &elem_bits,
-                    (const void **)&out->starting_byte,
-                    &out->offset_to_first_bit, &row_len);
-                if (rc == 0 && elem_bits != 2) {
-                    rc = RC(rcSRA, rcCursor, rcReading, rcData, rcUnexpected);
-                }
-                if (rc != 0) {
-                    PLOGERR(klogInt, (klogInt, rc, "Error during CellData "
-                        "for $(acc)/REFERENCE/READ/$(spot)) /2na",
-                        "acc=%s,spot=%zu", acc, self->spot));
-                    return 0;
-                }
-                else {
-                    out->length_in_bases = row_len;
-                }
-            }
-            else if (self->spot != last_spot - 1) {
-                out->length_in_bases += row_len;
-            }
-            else {
-                const void *base = NULL;
-                rc = VBlobCellData(data->blob, self->spot,
-                    &elem_bits, &base, NULL, &row_len);
-                if (rc == 0 && elem_bits != 2) {
-                    rc = RC(rcSRA, rcCursor, rcReading, rcData, rcUnexpected);
-                }
-                if (rc != 0) {
-                    PLOGERR(klogInt, (klogInt, rc, "Error during CellData "
-                        "for $(acc)/REFERENCE/READ/$(spot)) /2na",
-                        "acc=%s,spot=%zu", acc, self->spot));
-                    return 0;
-                }
-                else {
-                    out->length_in_bases += row_len;
-                }
-            }
-        }
-#endif
-        {
-            const void *base = NULL;
-            uint32_t boff = 0;
-            uint32_t len = 0;
-            rc = VBlobCellData
-                (data->blob, first_spot, &elem_bits, &base, &boff, &len);
-            if (rc == 0 && elem_bits != 2) {
-                rc = RC(rcSRA, rcCursor, rcReading, rcData, rcUnexpected);
-            }
-            if (rc != 0) {
-                PLOGERR(klogInt, (klogInt, rc, "Error during CellData "
-                    "for $(acc)/REFERENCE/READ/$(spot)) /2na",
-                    "acc=%s,spot=%zu", acc, first_spot));
-                return 0;
-            }
-            if (first_spot + 1 == last_spot) {
-                /* the only chunk */
-            }
-            else if (len != MAX_SEQ_LEN) {
-                full_scan = true;
-                assert(0);
-            }
-            else {
-                const void *last_base = NULL;
-                uint32_t boff = 0;
-                uint32_t last_len = 0;
-                rc = VBlobCellData(data->blob, last_spot - 1,
-                    &elem_bits, &last_base, &boff, &last_len);
-                if (rc == 0 && elem_bits != 2) {
-                    rc = RC(rcSRA, rcCursor, rcReading, rcData, rcUnexpected);
-                }
-                if (rc != 0) {
-                    PLOGERR(klogInt, (klogInt, rc, "Error during CellData "
-                        "for $(acc)/REFERENCE/READ/$(spot)) /2na",
-                        "acc=%s,spot=%zu", acc, last_spot - 1));
-                    return 0;
-                }
-                else {
-                    size_t chunk_len = ((const uint8_t*)last_base
-                                         - (const uint8_t*)base) * 4 + last_len;
-                    size_t num_ref_chunks
-                        = (chunk_len + MAX_SEQ_LEN - 1) / MAX_SEQ_LEN;
-                    if (num_ref_chunks != last_spot - first_spot) {
-                        full_scan = true;
-                    }
-                    else {
-                        len = chunk_len;
-                    }
-                }
-            }
-            if (!full_scan) {
-#ifdef COMPARE
-                assert(out->starting_byte == base);
-                assert(out->offset_to_first_bit == boff);
-                assert(out->length_in_bases == len);
-                assert(self->spot == last_spot);
-#else
-                out->starting_byte = (void*)base;
-                out->offset_to_first_bit = boff;
-                out->length_in_bases = len;
-                self->spot = last_spot;
-#endif
-            }
-        }
-#ifndef COMPARE
-        if (full_scan)
-#endif
-        {
-            const void *starting_byte = NULL;
-            const void *prev_base = NULL;
-            size_t length_in_bases = 0;
-            uint32_t offset_to_first_bit = 0;
-            for (self->spot = first_spot;
-                self->spot < last_spot; ++self->spot)
-            {
-                const void *base = NULL;
-                uint32_t boff = 0;
-                uint32_t len = 0;
-                rc = VBlobCellData(data->blob, self->spot,
-                    &elem_bits, &base, &boff, &len);
-                if (rc == 0 && elem_bits != 2) {
-                    rc = RC(rcSRA, rcCursor, rcReading, rcData, rcUnexpected);
-                }
-                if (rc != 0) {
-                    PLOGERR(klogInt, (klogInt, rc, "Error during CellData "
-                        "for $(acc)/REFERENCE/READ/$(spot)) /2na",
-                        "acc=%s,spot=%zu", acc, self->spot));
-                    return 0;
-                }
-                if (self->spot == first_spot) {
-                    starting_byte = base;
-                    offset_to_first_bit = boff;
-                }
-                else {
-                    if ((const uint8_t*)prev_base + MAX_SEQ_LEN / 4 != base) {
-                        assert(full_scan);
-                        break;
-                    }
-                }
-                prev_base = base;
-                length_in_bases += len;
-            }
-#ifdef COMPARE
-            if (!full_scan) {
-                assert(out->starting_byte == starting_byte);
-                assert(out->offset_to_first_bit == offset_to_first_bit);
-                assert(out->length_in_bases == length_in_bases);
-                assert(self->spot == last_spot);
-            }
-#endif
-            if (full_scan) {
-                out->starting_byte = (void*)starting_byte;
-                out->offset_to_first_bit = offset_to_first_bit;
-                out->length_in_bases = length_in_bases;
-            }
-        }
-        *status = eVdbBlastNoErr;
-        out->read_id = _set_read_id_reference_bit(self->read_id, status);
-        if (*status != eVdbBlastNoErr) {
-            break;
-        }
-        if (self->spot < rfd->first + rfd->count) {
-            *status = eVdbBlastChunkedSequence;
-        }
-        else if (rfd->circular && ! self->circular) {
-               /* end of the first repeat of a circular sequence */
-            *status = eVdbBlastCircularSequence;
-            self->circular = true;
-            self->spot = rfd->first;
-        }
-        else { /* end of sequence */
-            *status = eVdbBlastNoErr;
-            self->circular = false;
-            ++self->read_id;
-        }
-        ++num_read;
-        break;
-    }
-    return num_read;
-}
-
-/******************************************************************************/
-uint64_t _Core2naReadRef(Core2na *self, VdbBlastStatus *status,
-    uint64_t *read_id, uint8_t *buffer, size_t buffer_size)
-{
-    uint64_t num_read = 0;
-
-    References *r = NULL;
-
-    assert(status);
-
-    *status = eVdbBlastNoErr;
-
-    if (self == NULL) {
-        *status = eVdbBlastErr;
-        return 0;
-    }
-
-    if (self->reader.refs == NULL) { /* do not have any reference */
-        self->eos = true;
-        return 0;
-    }
-
-    r = (References*)(self->reader.refs);
-
-    assert(r->refs);
-
-    if (r->rfdi > r->refs->rfdk) {
-        self->eos = true;
-    }
-
-    if (self->eos) {
-        return 0;
-    }
-
-    num_read = _ReferencesRead2na(r, status, read_id,
-        &self->reader.starting_base, buffer, buffer_size);
-
-    if (num_read == 0 && *status == eVdbBlastNoErr && r->eos) {
-        self->eos = true;
-    }
-
-    return num_read;
-}
-
-uint32_t _Core2naDataRef(struct Core2na *self,
-    Data2na *data, VdbBlastStatus *status,
-    Packed2naRead *buffer, uint32_t buffer_length)
-{
-    uint32_t num_read = 0;
-
-    References *r = NULL;
-
-    assert(status);
-
-    *status = eVdbBlastNoErr;
-
-    if (self == NULL) {
-        *status = eVdbBlastErr;
-        return 0;
-    }
-
-    if (self->reader.refs == NULL) { /* do not have any reference */
-        self->eos = true;
-        return 0;
-    }
-
-    r = (References*)(self->reader.refs);
-
-    assert(r->refs);
-
-    if (r->rfdi > r->refs->rfdk) {
-        self->eos = true;
-    }
-
-    if (self->eos) {
-        return 0;
-    }
-
-    num_read = _ReferencesData2na(r, data, status, buffer, buffer_length);
-    if (num_read == 0 && *status == eVdbBlastNoErr && r->eos) {
-        self->eos = true;
-    }
-
-    return num_read;
-}
-
-/******************************************************************************/
-size_t _Core4naReadRef(Core4na *self, const RunSet *runs,
-    uint32_t *status, uint64_t read_id, size_t starting_base,
-    uint8_t *buffer, size_t buffer_length)
-{
-    size_t total = 0;
-    uint8_t *begin = buffer;
-    const VdbBlastRef *rfd = NULL;
-    const VdbBlastRun *run = NULL;
-    uint64_t spot = 0;
-
-    bool circular = false;
-                 /* true when returning a circular reference the second time */
-
-    uint32_t start = 0;
-    assert(status);
-    if (self == NULL || runs == NULL ||
-        runs->refs.rfd == NULL || runs->refs.rfdk == 0)
-    {
-        *status = eVdbBlastErr;
-        return 0;
-    }
-    {
-        bool bad = false;
-        read_id = _clear_read_id_reference_bit(read_id, &bad);
-        if (bad) {
-            *status  = eVdbBlastInvalidId;
-            return 0;
-        }
-    }
-    if (read_id >= runs->refs.rfdk) {
-        *status  = eVdbBlastInvalidId;
-        return 0;
-    }
-    rfd = &runs->refs.rfd[read_id];
-    *status = eVdbBlastErr;
-    if (runs->run == NULL) {
-        return 0;
-    }
-    run = &runs->run[rfd->iRun];
-    if (self->curs != NULL) {
-        if (self->desc.tableId != read_id) {
-            VCursorRelease(self->curs);
-            self->curs = NULL;
-        }
-    }
-    if (self->curs == NULL) {
-        rc_t rc = 0;
-        if (rfd->iRun >= runs->krun) {
-            return 0;
-        }
-        if (run->obj == NULL || run->obj->refTbl == NULL) {
-            return 0;
-        }
-        rc = VTableCreateCursorRead(run->obj->refTbl, &self->curs);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Cannot create REFERENCE Cursor for $(acc))",
-                "acc=%s", run->acc));
-            return 0;
-        }
-        rc = VCursorAddColumn(self->curs,
-            &self->col_READ, "(INSDC:4na:bin)READ");
-        if (rc == 0) {
-            rc = VCursorOpen(self->curs);
-        }
-        if (rc != 0) {
-            RELEASE(VCursor, self->curs);
-            PLOGERR(klogInt, (klogInt, rc,
-                "Cannot make REFERENCE/READ Cursor for $(acc)) /Read4na",
-                "acc=%s", run->acc));
-            return 0;
-        }
-        self->desc.tableId = read_id;
-        self->desc.spot = 0;
-    }
-    *status = eVdbBlastNoErr;
-
-    if (rfd->circular) {
-        assert(rfd->base_count);
-        if (starting_base >= rfd->base_count) {
-            starting_base -= rfd->base_count;
-            circular = true;
-        }
-    }
-
-    spot = rfd->first + starting_base / MAX_SEQ_LEN;
-    if (spot >= rfd->first + rfd->count) {
-        return 0;
-    }
-    start = starting_base % MAX_SEQ_LEN;
-    while (total < buffer_length) {
-        rc_t rc = 0;
-        uint32_t num_read = 0;
-        uint32_t remaining = 0;
-        uint32_t to_read = (uint32_t)(buffer_length - total);
-        if (to_read == 0) {
-            S
-            break;
-        }
-        rc = VCursorReadBitsDirect(self->curs, spot, self->col_READ,
-            8, start, begin, 0, to_read, &num_read, &remaining);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error in VCursorReadBitsDirect($(path), READ, spot=$(spot))",
-                "path=%s,spot=%ld", run->path, spot));
-            *status = eVdbBlastErr;
-            break;
-        }
-        else {
-            total += num_read;
-            if (total > buffer_length) {
-                total = buffer_length;
-            }
-            if (total == buffer_length) {
-                break;
-            }
-            begin += num_read;
-            if (remaining > 0) {
-            }
-            else if (++spot >= rfd->first + rfd->count) {
-                if (rfd->circular && ! circular) {
-                    *status = eVdbBlastCircularSequence;
-                }
-                break; /* end of reference */
-            }
-            else {     /* next spot */
-                start = 0;
-            }
-        }
-    }
-    return total;
-}
-
-const uint8_t* _Core4naDataRef(Core4na *self, const RunSet *runs,
-    uint32_t *status, uint64_t read_id, size_t *length)
-{
-    const void *out = NULL;
-    rc_t rc = 0;
-    const VdbBlastRef *rfd = NULL;
-    const VdbBlastRun *run = NULL;
-    int64_t first = 0;
-    uint64_t count = 0;
-    uint64_t last_spot = 0;
-    size_t first_spot = 0;
-    bool full_scan = false;
-    assert(status);
-    *status = eVdbBlastErr;
-    if (length == NULL || self == NULL || runs == NULL ||
-        runs->refs.rfd == NULL || runs->refs.rfdk == 0)
-    {
-        return NULL;
-    }
-    *length = 0;
-    {
-        bool bad = false;
-        read_id = _clear_read_id_reference_bit(read_id, &bad);
-        if (bad) {
-            *status  = eVdbBlastInvalidId;
-            return NULL;
-        }
-    }
-    if (read_id >= runs->refs.rfdk) {
-        *status  = eVdbBlastInvalidId;
-        return NULL;
-    }
-    rfd = &runs->refs.rfd[read_id];
-    if (runs->run == NULL) {
-        return NULL;
-    }
-    run = &runs->run[rfd->iRun];
-    if (self->curs != NULL) {
-        if (self->desc.tableId != read_id) {
-            RELEASE(VCursor, self->curs);
-        }
-    }
-    if (self->curs == NULL) {
-        rc_t rc = 0;
-        if (rfd->iRun >= runs->krun) {
-            return NULL;
-        }
-        if (run->obj == NULL || run->obj->refTbl == NULL) {
-            return NULL;
-        }
-        rc = VTableCreateCursorRead(run->obj->refTbl, &self->curs);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Cannot create REFERENCE Cursor for $(acc))",
-                "acc=%s", run->acc));
-            return NULL;
-        }
-        rc = VCursorAddColumn(self->curs,
-            &self->col_READ, "(INSDC:4na:bin)READ");
-        if (rc == 0) {
-            rc = VCursorOpen(self->curs);
-        }
-        if (rc != 0) {
-            RELEASE(VCursor, self->curs);
-            PLOGERR(klogInt, (klogInt, rc,
-                "Cannot make REFERENCE/READ Cursor for $(acc)) /Data4na",
-                "acc=%s", run->acc));
-            return NULL;
-        }
-        self->desc.tableId = read_id;
-        self->desc.spot = 0;
-    }
-    if (self->blob) {
-        RELEASE(VBlob, self->blob);
-    }
-    if (self->desc.spot == 0) {
-        self->desc.spot = rfd->first;
-    }
-    else {
-        if (self->desc.spot >= rfd->first + rfd->count) {
-            *status = eVdbBlastNoErr;  /* end of reference */
-            return NULL;
-        }
-    }
-    rc = VCursorGetBlobDirect(self->curs,
-        &self->blob, self->desc.spot, self->col_READ);
-    if (rc != 0) {
-        PLOGERR(klogInt, (klogInt, rc,
-            "Cannot GetBlob REFERENCE/READ for $(acc)/$(spot) /4na)",
-            "acc=%s,spot=%zu", run->acc, self->desc.spot));
-        return 0;
-    }
-    if (self->blob == NULL) {
-        S
-        return 0;
-    }
-    rc = VBlobIdRange(self->blob, &first, &count);
-    if (rc != 0) {
-        PLOGERR(klogInt, (klogInt, rc,
-            "Cannot BlobIdRange REFERENCE/READ for $(acc)/$(spot) /4na",
-            "acc=%s,spot=%zu", run->acc, self->desc.spot));
-        return 0;
-    }
-    if (self->desc.spot < first || self->desc.spot >= first + count) {
-        /* requested blob b(spot) but spot < b.first || spot > b.last:
-           should never happen */
-        S /* PLOGERR */
-        return 0;
-    }
-    if (first > rfd->first + rfd->count) { /* should never happen */
-        S /* PLOGERR */
-        return 0;
-    }
-    last_spot = first + count;
-    if (rfd->first + rfd->count < last_spot) {
-        last_spot = rfd->first + rfd->count;
-    }
-    {
-#ifdef COMPARE
-        uint32_t row_len = 0;
-#endif
-        first_spot = self->desc.spot;
-#ifdef COMPARE
-        for (; self->desc.spot < last_spot; ++self->desc.spot) {
-            uint32_t elem_bits = 0;
-            uint32_t offset_to_first_bit = 0;
-            if (self->desc.spot == first_spot) {
-                rc = VBlobCellData(self->blob, self->desc.spot, &elem_bits,
-                    &out, &offset_to_first_bit, &row_len);
-                if (rc == 0 &&
-                    (elem_bits != 8 || offset_to_first_bit != 0))
-                {
-                    rc = RC(rcSRA, rcCursor, rcReading, rcData, rcUnexpected);
-                }
-                if (rc != 0) {
-                    PLOGERR(klogInt, (klogInt, rc, "Error during CellData "
-                        "for $(acc)/REFERENCE/READ/$(spot)) /4na",
-                        "acc=%s,spot=%zu", run->acc, self->desc.spot));
-                    return NULL;
-                }
-                else {
-                    *length = row_len;
-                }
-            }
-            else if (self->desc.spot != last_spot - 1) {
-                *length += row_len;
-            }
-            else {
-                const void *base = NULL;
-                rc = VBlobCellData(self->blob, self->desc.spot,
-                    &elem_bits, &base, NULL, &row_len);
-                if (rc == 0 && elem_bits != 8) {
-                    rc = RC(rcSRA, rcCursor, rcReading, rcData, rcUnexpected);
-                }
-                if (rc != 0) {
-                    PLOGERR(klogInt, (klogInt, rc, "Error during CellData "
-                        "for $(acc)/REFERENCE/READ/$(spot)) /4na",
-                        "acc=%s,spot=%zu", run->acc, self->desc.spot));
-                    return NULL;
-                }
-                else {
-                    *length += row_len;
-                }
-            }
-        }
-#endif
-    }
-    {
-        const void *base = NULL;
-        uint32_t boff = 0;
-        uint32_t len = 0;
-        uint32_t elem_bits = 0;
-        rc = VBlobCellData
-            (self->blob, first_spot, &elem_bits, &base, &boff, &len);
-        if (rc == 0 && (elem_bits != 8 || boff != 0)) {
-            rc = RC(rcSRA, rcCursor, rcReading, rcData, rcUnexpected);
-        }
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc, "Error during CellData "
-                "for $(acc)/REFERENCE/READ/$(spot)) /4na",
-                "acc=%s,spot=%zu", run->acc, first_spot));
-            return NULL;
-        }
-        if (first_spot + 1 == last_spot) {
-            /* the only chunk */
-        }
-        else if (len != MAX_SEQ_LEN) {
-            full_scan = true;
-            assert(0);
-        }
-        else {
-            const void *last_base = NULL;
-            uint32_t boff = 0;
-            uint32_t last_len = 0;
-            rc = VBlobCellData(self->blob, last_spot - 1,
-                &elem_bits, &last_base, &boff, &last_len);
-            if (rc == 0 && (elem_bits != 8 || boff != 0)) {
-                rc = RC(rcSRA, rcCursor, rcReading, rcData, rcUnexpected);
-            }
-            if (rc != 0) {
-                PLOGERR(klogInt, (klogInt, rc, "Error during CellData "
-                    "for $(acc)/REFERENCE/READ/$(spot)) /4na",
-                    "acc=%s,spot=%zu", run->acc, last_spot - 1));
-                return 0;
-            }
-            else {
-                size_t chunk_len = ((const uint8_t*)last_base
-                                     - (const uint8_t*)base) + last_len;
-                size_t num_ref_chunks
-                    = (chunk_len + MAX_SEQ_LEN - 1) / MAX_SEQ_LEN;
-                if (num_ref_chunks != last_spot - first_spot) {
-                    full_scan = true;
-                }
-                else {
-                    len = chunk_len;
-                }
-            }
-        }
-        if (!full_scan) {
-#ifdef COMPARE
-            assert(out == base);
-            assert(*length == len);
-            assert(self->desc.spot == last_spot);
-#else
-            out = base;
-            *length = len;
-            self->desc.spot = last_spot;
-#endif
-        }
-    }
-#ifndef COMPARE
-    if (full_scan)
-#endif
-    {
-            const void *starting_byte = NULL;
-            const void *prev_base = NULL;
-            size_t length_in_bases = 0;
-            uint32_t elem_bits = 0;
-            for (self->desc.spot = first_spot;
-                self->desc.spot < last_spot; ++self->desc.spot)
-            {
-                const void *base = NULL;
-                uint32_t boff = 0;
-                uint32_t len = 0;
-                rc = VBlobCellData(self->blob, self->desc.spot,
-                    &elem_bits, &base, &boff, &len);
-                if (rc == 0 && (elem_bits != 8 || boff != 0)) {
-                    rc = RC(rcSRA, rcCursor, rcReading, rcData, rcUnexpected);
-                }
-                if (rc != 0) {
-                    PLOGERR(klogInt, (klogInt, rc, "Error during CellData "
-                        "for $(acc)/REFERENCE/READ/$(spot)) /4na",
-                        "acc=%s,spot=%zu", run->acc, self->desc.spot));
-                    return 0;
-                }
-                if (self->desc.spot == first_spot) {
-                    starting_byte = base;
-                }
-                else {
-                    if ((const uint8_t*)prev_base + MAX_SEQ_LEN != base) {
-                        assert(full_scan);
-                        break;
-                    }
-                }
-                prev_base = base;
-                length_in_bases += len;
-            }
-#ifdef COMPARE
-            if (!full_scan) {
-                assert(out == starting_byte);
-                assert(*length == length_in_bases);
-                assert(self->desc.spot == last_spot);
-            }
-#endif
-            if (full_scan) {
-                out = starting_byte;
-                *length = length_in_bases;
-            }
-    }
-    if (self->desc.spot < rfd->first + rfd->count) {
-        *status = eVdbBlastChunkedSequence;
-    }
-    else if (rfd->circular && ! self->desc.circular) {
-        *status = eVdbBlastCircularSequence;
-        self->desc.circular = true;
-        self->desc.spot = rfd->first;
-    }
-    else {
-        *status = eVdbBlastNoErr;
-        self->desc.circular = false;
-    }
-    return out;
-}
-
-/******************************************************************************/
diff --git a/libs/blast/reference.h b/libs/blast/reference.h
deleted file mode 100644
index 0b0272d..0000000
--- a/libs/blast/reference.h
+++ /dev/null
@@ -1,86 +0,0 @@
-#ifndef _h_libs_blast_reference_
-#define _h_libs_blast_reference_
-
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_ncbi_vdb_blast_
-#include <ncbi/vdb-blast.h> /* VdbBlastStatus */
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-struct Core2na;
-struct Core4na;
-struct Data2na;
-struct References;
-struct RunSet;
-
-
-uint32_t _Core2naDataRef(struct Core2na *self,
-    struct Data2na *data, VdbBlastStatus *status,
-    Packed2naRead *buffer, uint32_t buffer_length);
-
-uint64_t _Core2naReadRef(struct Core2na *self, VdbBlastStatus *status,
-    uint64_t *read_id, uint8_t *buffer, size_t buffer_size);
-
-
-const uint8_t* _Core4naDataRef(struct Core4na *self, const struct RunSet *runs,
-    uint32_t *status, uint64_t read_id, size_t *length);
-
-size_t _Core4naReadRef(struct Core4na *self, const struct RunSet *runs,
-    uint32_t *status, uint64_t read_id, size_t starting_base,
-    uint8_t *buffer, size_t buffer_length);
-
-
-const struct References* _RunSetMakeReferences
-    (struct RunSet *self, VdbBlastStatus *status);
-
-void _ReferencesWhack(const struct References *self);
-
-uint64_t _ReferencesGetNumSequences
-    (const struct References *self, VdbBlastStatus *status);
-
-VdbBlastStatus _ReferencesGetReadId(const struct References *self,
-    const char *name_buffer, size_t bsize, uint64_t *read_id);
-
-size_t CC _ReferencesGetReadName(const struct References *self,
-    uint64_t read_id, char *name_buffer, size_t bsize);
-
-uint64_t _ReferencesGetTotalLength
-    (const struct References *self, VdbBlastStatus *status);
-
-uint64_t _ReferencesGetReadLength
-    (const struct References *self, uint64_t read_id, VdbBlastStatus *status);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_libs_blast_reference_ */
diff --git a/libs/blast/run-set.c b/libs/blast/run-set.c
deleted file mode 100644
index 91727fa..0000000
--- a/libs/blast/run-set.c
+++ /dev/null
@@ -1,3251 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vdb/extern.h>
-
-#include "reader.h" /* _RunSetFindReadDesc */
-#include "blast-mgr.h" /* BTableType */
-#include "run-set.h" /* VdbBlastRunSet */
-
-#include <kdb/kdb-priv.h> /* KTableGetPath */
-#include <kdb/table.h> /* KTable */
-
-#include <klib/debug.h> /* DBGMSG */
-#include <klib/log.h> /* LOGERR */
-#include <klib/rc.h> /* RC */
-#include <klib/refcount.h> /* KRefcount */
-#include <klib/status.h> /* STSMSG */
-
-#include <kproc/lock.h> /* KLockMake */
-
-#include <ncbi/vdb-blast.h> /* VdbBlastRunSet */
-
-#include <vdb/cursor.h> /* VCursor */
-#include <vdb/database.h> /* VDatabase */
-#include <vdb/table.h> /* VTable */
-#include <vdb/vdb-priv.h> /* VTableOpenKTableRead */
-
-#include <sysalloc.h>
-
-#include <string.h> /* memset */
-#include <time.h> /* time_t */
-
-#include <limits.h> /* PATH_MAX */
-#ifndef PATH_MAX
-#define PATH_MAX 4096
-#endif
-
-void _Core2naFini(Core2na *self);
-void _Core4naFini(Core4na *self);
-
-/******************************************************************************/
-
-static void *_NotImplementedP(const char *func) {
-    PLOGERR(klogErr, (klogErr, -1,
-        "$(func): is not implemented", "func=%s", func));
-    return 0;
-}
-
-static size_t _NotImplemented(const char *func)
-{   return (size_t)_NotImplementedP(func); }
-
-static uint64_t CC Min(uint64_t cand,
-    uint64_t champ, int64_t minRead, bool *done)
-{
-    assert(done);
-    if (minRead >= 0) {
-        if (cand < minRead) {
-            return champ;
-        }
-        else if (cand == minRead) {
-            *done = true;
-            return minRead;
-        }
-    } 
-    return cand < champ ? cand : champ;
-}
-
-static uint64_t CC Max(uint64_t cand,
-    uint64_t champ, int64_t minRead, bool *done)
-{
-    return cand > champ ? cand : champ;
-}
-
-static char* _CanonocalName(const char *name) {
-    size_t noExtSize = 0;
-    size_t namelen = 0;
-    const char ext[] = ".sra";
-
-    if (name == NULL) {
-        return NULL;
-    }
-
-    noExtSize = namelen = string_size(name);
-
-    if (namelen >= sizeof(ext)) {
-        const char *tail = NULL;
-        noExtSize -= sizeof ext - 1;
-        tail = name + noExtSize;
-        if (string_cmp(ext, sizeof ext - 1, tail, sizeof ext - 1, 99) != 0) {
-            noExtSize = namelen;
-        }
-    }
-
-    return string_dup(name, noExtSize);
-}
-
-/******************************************************************************/
-
-static rc_t _VCursorCellDataDirect(const VCursor *self,
-    int64_t row_id, uint32_t col_idx, uint32_t elemBits,
-    const void **base, uint32_t nreads, const char *name)
-{
-    uint32_t elem_bits = 0;
-    uint32_t row_len = 0;
-    uint32_t boff = 0;
-
-    rc_t rc = VCursorCellDataDirect(self, row_id, col_idx,
-        &elem_bits, base, &boff, &row_len);
-
-    if (rc != 0) {
-        PLOGERR(klogInt, (klogInt, rc,
-            "Error during VCursorCellDataDirect($(name), $(spot))",
-            "name=%s,spot=%lu", name, col_idx));
-    }
-    else if (boff != 0 || elem_bits != elemBits) {
-        rc = RC(rcSRA, rcCursor, rcReading, rcData, rcUnexpected);
-        PLOGERR(klogInt, (klogInt, rc,
-            "Bad VCursorCellDataDirect($(name), $(spot)) result: "
-            "boff=$(boff), elem_bits=$(elem_bits)",
-            "name=%s,spot=%lu,boff=%u,elem_bits=%u",
-            name, col_idx, boff, elem_bits));
-    }
-    else if (row_len != nreads) {
-        rc = RC(rcSRA, rcCursor, rcReading, rcData, rcUnexpected);
-        PLOGERR(klogInt, (klogInt, rc,
-            "Bad VCursorCellDataDirect($(name), $(spot)) result: "
-            "row_len=$(row_len)",
-            "name=%s,spot=%lu,row_len=%u", name, col_idx, row_len));
-    }
-
-    return rc;
-}
-
-/******************************************************************************/
-
-static VdbBlastStatus _VDatabaseOpenAlignmentTable(const VDatabase *self,
-    const char *path,
-    const VTable **tbl)
-{
-    const char *table = "PRIMARY_ALIGNMENT";
-
-    rc_t rc = VDatabaseOpenTableRead(self, tbl, table);
-    if (rc != 0) {
-        PLOGERR(klogInt, (klogInt, rc,
-            "Error in VDatabaseOpenTableRead($(name), $(tbl))",
-            "name=%s,tbl=%s", path, table));
-        STSMSG(1, ("Error: failed to open DB table '%s/%s'", path, table));
-    }
-    else {
-        STSMSG(1, ("Opened DB table '%s/%s'", path, table));
-    }
-
-    return rc != 0 ? eVdbBlastErr : eVdbBlastNoErr;;
-}
-
-/******************************************************************************/
-
-typedef struct {
-    const VCursor *curs;
-    uint32_t colREAD_LEN;
-    uint32_t colREAD_TYPE;
-    uint64_t techBasesPerSpot;
-    bool techBasesPerSpotEquals;
-    uint64_t bioBasesCnt;
-} ApprCnt;
-static rc_t _ApprCntInit(ApprCnt *self, const VTable *tbl, const char *acc) {
-    rc_t rc = 0;
-
-    assert(self);
-
-    memset(self, 0, sizeof *self);
-
-    self->techBasesPerSpotEquals = true;
-    self->techBasesPerSpot = ~0;
-
-    if (rc == 0) {
-        rc = VTableCreateCursorRead(tbl, &self->curs);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error during VTableCreateCursorRead for $(acc)",
-                "acc=%s", acc));
-        }
-    }
-
-    if (rc == 0) {
-        const char name[] = "READ_LEN";
-        rc = VCursorAddColumn(self->curs, &self->colREAD_LEN, name);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error during VCursorAddColumn($(name))", "name=%s", name));
-        }
-    }
-
-    if (rc == 0) {
-        const char name[] = "READ_TYPE";
-        rc = VCursorAddColumn(self->curs, &self->colREAD_TYPE, name);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error during VCursorAddColumn($(name))", "name=%s", name));
-        }
-    }
-
-    if (rc == 0) {
-        rc = VCursorOpen(self->curs);
-        if (rc != 0) {
-            LOGERR(klogInt, rc, "Error during VCursorOpen");
-        }
-    }
-
-    return rc;
-}
-
-static rc_t _ApprCntFini(ApprCnt *self) {
-    rc_t rc = 0;
-    assert(self);
-    RELEASE(VCursor, self->curs);
-    memset(self, 0, sizeof *self);
-    return rc;
-}
-
-static rc_t _ApprCntChunk(ApprCnt *self,
-    uint64_t chunk, uint64_t l, uint64_t nspots, uint32_t nreads)
-{
-    rc_t rc = 0;
-    uint64_t start = nspots / 10 * chunk + 1;
-    uint64_t spot = 0;
-    uint64_t end = start + l;
-    assert(self);
-    if (end - 1 > nspots) {
-        end = nspots + 1;
-    }
-    for (spot = start; spot < end; ++spot) {
-        uint64_t techBases = 0;
-        uint64_t bioBases = 0;
-        uint32_t read = 0;
-        const uint32_t *readLen = NULL;
-        const INSDC_read_type *readType = NULL;
-        const void *base = NULL;
-        rc = _VCursorCellDataDirect(self->curs, spot, self->colREAD_LEN,
-            32, &base, nreads, "READ_LEN");
-        if (rc != 0) {
-            return rc;
-        }
-        readLen = base;
-        rc = _VCursorCellDataDirect(self->curs, spot, self->colREAD_TYPE,
-            8, &base, nreads, "READ_TYPE");
-        if (rc != 0) {
-            return rc;
-        }
-        readType = base;
-        for (read = 0; read < nreads; ++read) {
-            INSDC_read_type type = readType[read] & 1;
-            if (type == READ_TYPE_BIOLOGICAL) {
-                bioBases += readLen[read];
-            }
-            else {
-                techBases += readLen[read];
-            }
-        }
-        if (self->techBasesPerSpotEquals) {
-            if (self->techBasesPerSpot != techBases) {
-                if (self->techBasesPerSpot == ~0) {
-                    self->techBasesPerSpot = techBases;
-                }
-                else {
-                    self->techBasesPerSpotEquals = false;
-                }
-            }
-        }
-        self->bioBasesCnt += bioBases;
-    }
-    return rc;
-}
-
-/******************************************************************************/
-
-static rc_t _VTableLogRowData(const VTable *self,
-    const char *column, void *buffer, uint32_t blen)
-{
-    rc_t rc = 0;
-
-#if _DEBUGGING
-    if (buffer && blen == 64) {
-        uint64_t data = *((uint64_t*)buffer);
-        const KTable *ktbl = NULL;
-        rc_t rc = VTableOpenKTableRead(self, &ktbl);
-        if (rc == 0) {
-            const char *path = NULL;
-            rc = KTableGetPath(ktbl, &path);
-            if (rc == 0) {
-                DBGMSG(DBG_BLAST, DBG_FLAG(DBG_BLAST_BLAST),
-                    ("%s: %s: %lu\n", path, column, data));
-            }
-        }
-
-        KTableRelease(ktbl);
-    }
-#endif
-
-    if (rc != 0)
-    {   PLOGERR(klogInt, (klogInt, rc, "Error in $(f)", "f=%s", __func__)); }
-
-    return rc;
-}
-
-static rc_t _VTableMakeCursorImpl(const VTable *self, const VCursor **curs,
-    uint32_t *col_idx, const char *col_name, bool canBeMissed, const char *acc)
-{
-    rc_t rc = 0;
-
-    assert(curs && col_name);
-
-    if (rc == 0) {
-        rc = VTableCreateCursorRead(self, curs);
-        if (rc != 0) {
-            LOGERR(klogInt, rc, "Error during VTableCreateCursorRead");
-        }
-    }
-
-    if (rc == 0) {
-        VCursorPermitPostOpenAdd(*curs);
-        if (rc != 0) {
-            LOGERR(klogInt, rc, "Error during VCursorPermitPostOpenAdd");
-        }
-    }
-
-    if (rc == 0) {
-        rc = VCursorOpen(*curs);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error in VCursorOpen($(name))", "name=%s", col_name));
-        }
-    }
-
-    if (rc == 0) {
-        assert(*curs);
-        rc = VCursorAddColumn(*curs, col_idx, "%s", col_name);
-        if (rc != 0 && !canBeMissed) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error in VCursorAddColumn($(name))", "name=%s", col_name));
-        }
-    }
-
-    STSMSG(2, ("Prepared a VCursor to read '%s'", col_name));
-
-    return rc;
-}
-
-rc_t _VTableMakeCursor(const VTable *self, const VCursor **curs,
-    uint32_t *col_idx, const char *col_name, const char *acc)
-{
-    return _VTableMakeCursorImpl(self, curs, col_idx, col_name, false, acc);
-}
-
-/*static*/
-uint32_t _VTableReadFirstRowImpl(const VTable *self, const char *name,
-    void *buffer, uint32_t blen, EColType *is_static, bool canBeMissed,
-    uint32_t *row_len, const char *acc)
-{
-    VdbBlastStatus status = eVdbBlastNoErr;
-
-    rc_t rc = 0;
-
-    const VCursor *curs = NULL;
-    uint32_t idx = 0;
-
-    uint32_t dummy = 0;
-    if (row_len == NULL) {
-        row_len = &dummy;
-    }
-
-    assert(self && name);
-
-    blen *= 8;
-
-    rc = _VTableMakeCursorImpl(self, &curs, &idx, name, canBeMissed, acc);
-    if (rc != 0) {
-        if (rc ==
-            SILENT_RC(rcVDB, rcCursor, rcOpening, rcColumn, rcUndefined)
-         || rc ==
-            SILENT_RC(rcVDB, rcCursor, rcUpdating, rcColumn, rcNotFound))
-        {
-            if (!canBeMissed) {
-                PLOGMSG(klogInfo, (klogInfo, "$(f): Column '$(name)' not found",
-                    "f=%s,name=%s", __func__, name));
-            }
-            if (is_static != NULL) {
-                *is_static = eColTypeAbsent;
-            }
-            status = eVdbBlastTooExpensive;
-        }
-        else {
-            status = eVdbBlastErr;
-            if (is_static != NULL) {
-                *is_static = eColTypeError;
-            }
-        }
-    }
-
-    if (status == eVdbBlastNoErr && rc == 0) {
-        rc = VCursorOpenRow(curs);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error in VCursorOpenRow($(name))", "name=%s", name));
-        }
-    }
-
-    if (status == eVdbBlastNoErr && rc == 0 && buffer != NULL && blen > 0) {
-        rc = VCursorRead(curs, idx, 8, buffer, blen, row_len);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error in VCursorRead($(name))", "name=%s", name));
-        }
-    }
-
-/* TODO: needs to be verified what row_len is expected
-    if (*row_len != 1) return eVdbBlastErr; */
-
-    STSMSG(2, ("Read the first row of '%s'", name));
-
-    if (status == eVdbBlastNoErr && rc == 0) {
-        if (blen == 64) {
-            _VTableLogRowData(self, name, buffer, blen);
-        }
-        if (is_static != NULL) {
-            bool isStatic = false;
-            rc = VCursorIsStaticColumn(curs, idx, &isStatic);
-            if (rc != 0) {
-                PLOGERR(klogInt, (klogInt, rc,
-                    "Error in VCursorIsStaticColumn($(name))",
-                    "name=%s", name));
-            }
-            else {
-                *is_static = isStatic ? eColTypeStatic : eColTypeNonStatic;
-            }
-        }
-    }
-
-    VCursorRelease(curs);
-
-    if (status == eVdbBlastNoErr && rc != 0) {
-        status = eVdbBlastErr;
-    }
-    return status;
-}
-
-static VdbBlastStatus _VTableReadFirstRow(const VTable *self, const char *name,
-    void *buffer, uint32_t blen, EColType *is_static, const char *acc)
-{
-    return _VTableReadFirstRowImpl
-        (self, name, buffer, blen, is_static, false, NULL, acc);
-}
-
-static INSDC_SRA_platform_id _VTableReadPLATFORMoptional
-    (const VTable *self, const char *acc)
-{
-    INSDC_SRA_platform_id platform = SRA_PLATFORM_UNDEFINED;
-
-    VdbBlastStatus status = _VTableReadFirstRowImpl(self,
-        "PLATFORM", &platform, sizeof platform, NULL, true, NULL, acc);
-
-    if (status == eVdbBlastNoErr) {
-        return platform;
-    }
-    else {
-        return SRA_PLATFORM_UNDEFINED;
-    }
-}
-
-static bool _VTableVarReadNum(const VTable *self, const char *acc) {
-    return _VTableReadPLATFORMoptional(self, acc) == SRA_PLATFORM_PACBIO_SMRT;
-}
-
-static uint64_t BIG = 10000 /*11*/; 
-static rc_t _VTableBioBaseCntApprox(const VTable *self,
-    uint64_t nspots, uint32_t nreads, uint64_t *bio_base_count, const char *acc)
-{
-    rc_t rc = 0;
-    uint64_t c = nspots;
-    uint64_t d = 1;
-    ApprCnt ac;
-    rc = _ApprCntInit(&ac, self, acc);
-    assert(bio_base_count);
-    if (rc == 0) {
-        if (nspots < BIG) {
-            STSMSG(2,
-                ("VdbBlastRunSetGetTotalLengthApprox: counting all reads\n"));
-            rc = _ApprCntChunk(&ac, 0, nspots, nspots, nreads);
-        }
-        else {
-            uint64_t i = 0;
-            uint64_t l = 0;
-            uint64_t n = 10 /* 3 */;
-            while (c > BIG) {
-                c /= 2;
-                d *= 2;
-            }
-            l = c / n;
-            if (l == 0) {
-                l = 1;
-            }
-            for (i = 1; i < n - 1 && rc == 0; ++i) {
-                rc = _ApprCntChunk(&ac, i, l, nspots, nreads);
-            }
-        }
-    }
-    if (rc == 0) {
-        VdbBlastStatus status = eVdbBlastNoErr;
-        if (nspots < BIG) {
-            *bio_base_count = ac.bioBasesCnt;
-        }
-        else {
-            if (ac.techBasesPerSpotEquals && ac.techBasesPerSpot == ~0) {
-                ac.techBasesPerSpotEquals = false;
-            }
-            if (ac.techBasesPerSpotEquals ) {
-                uint64_t baseCount = 0;
-                status = _VTableReadFirstRow(self,
-                    "BASE_COUNT", &baseCount, sizeof baseCount, NULL, acc);
-                if (status == eVdbBlastNoErr) {
-                    STSMSG(2, ("VdbBlastRunSetGetTotalLengthApprox: "
-                        "fixed technical reads length\n"));
-                    *bio_base_count = baseCount - nspots * ac.techBasesPerSpot;
-                }
-                else {
-                    STSMSG(1, ("VdbBlastRunSetGetTotalLengthApprox: "
-                        "cannot read BASE_COUNT\n"));
-                }
-            }
-            if (!ac.techBasesPerSpotEquals || status != eVdbBlastNoErr) {
-/*              double dd = nspots / c; */
-                STSMSG(2, ("VdbBlastRunSetGetTotalLengthApprox: "
-                    "extrapolating variable read length\n"));
-                *bio_base_count = ac.bioBasesCnt * d;
-            }
-        }
-    }
-    _ApprCntFini(&ac);
-    return rc;
-}
-
-static
-uint32_t _VTableGetNReads(const VTable *self, uint32_t *nreads, const char *acc)
-{
-    rc_t rc = 0;
-    VdbBlastStatus status = eVdbBlastNoErr;
-    const VCursor *curs = NULL;
-    uint32_t idx = 0;
-
-    const char name[] = "READ_LEN";
-
-    assert(nreads);
-
-    rc = _VTableMakeCursor(self, &curs, &idx, name, acc);
-    if (rc != 0) {
-        status = eVdbBlastErr;
-        if (rc ==
-            SILENT_RC(rcVDB, rcCursor, rcOpening, rcColumn, rcUndefined))
-        {
-            PLOGMSG(klogInfo, (klogInfo, "$(f): Column '$(name)' not found",
-                "f=%s,name=%s", __func__, name));
-        }
-        else {
-            PLOGMSG(klogInfo, (klogInfo, "$(f): Cannot open column '$(name)'",
-                "f=%s,name=%s", __func__, name));
-        }
-    }
-
-    if (status == eVdbBlastNoErr) {
-        uint32_t elem_bits, elem_off, elem_cnt;
-        const void *base = NULL;
-        rc = VCursorCellDataDirect(curs, 1, idx,
-                &elem_bits, &base, &elem_off, &elem_cnt);
-        if (rc != 0) {
-            status = eVdbBlastErr;
-            PLOGMSG(klogInfo, (klogInfo,
-                "$(f): Cannot '$(name)' CellDataDirect",
-                "f=%s,name=%s", __func__, name));
-        }
-        else if (elem_off != 0 || elem_bits != 32) {
-            status = eVdbBlastErr;
-            PLOGERR(klogInt, (klogInt, rc,
-                "Bad VCursorCellDataDirect(READ_LEN) result: "
-                "boff=$(elem_off), elem_bits=$(elem_bits)",
-                "elem_off=%u, elem_bits=%u", elem_off, elem_bits));
-        }
-        else {
-            *nreads = elem_cnt;
-        }
-    }
-    
-    RELEASE(VCursor, curs);
-
-    return status;
-}
-
-static bool _VTableCSra(const VTable *self) {
-    bool cSra = false;
-
-    KNamelist *names = NULL;
-
-    uint32_t i = 0, count = 0;
-
-    rc_t rc = VTableListPhysColumns(self, &names);
-
-    if (rc == 0) {
-        rc = KNamelistCount(names, &count);
-    }
-
-    for (i = 0 ; i < count && rc == 0; ++i) {
-        const char *name = NULL;
-        rc = KNamelistGet(names, i, &name);
-        if (rc == 0) {
-            const char b[] = "CMP_READ";
-            if (string_cmp(name, string_measure(name, NULL),
-                b, sizeof b - 1, sizeof b - 1) == 0)
-            {
-                cSra = true;
-                break;
-            }
-        }
-    }
-
-    RELEASE(KNamelist, names);
-
-    return cSra;
-}
-
-/******************************************************************************/
-
-static void _RunDescFini(RunDesc *self) {
-    assert(self);
-    free(self->readLen);
-    free(self->readType);
-    free(self->rdFilter);
-    memset(self, 0, sizeof *self);
-}
-
-static
-uint64_t _RunDescMakeReadId(const RunDesc *self, uint64_t spot, uint8_t read,
-    uint64_t read_id, VdbBlastStatus *status)
-{
-    bool overflow = false;
-
-    assert(self && status);
-
-    *status = eVdbBlastNoErr;
-
-    if (self->readIdDesc.idType == eFixedReadN) {
-        return read_id;
-    }
-
-    assert(self->readIdDesc.idType == eFactor10);
-
-    read_id = read * self->spotBits + spot;
-    if (read_id < self->spotBits) {
-        overflow = true;
-    }
-
-    if (self->readIdDesc.runBits > 0) {
-        uint64_t prev = read_id;
-        read_id *= self->readIdDesc.runBits;
-        read_id += self->index;
-        if (read_id < prev) {
-            overflow = true;
-        }
-    }
-
-    if (overflow) {
-        *status = eVdbBlastErr;
-    }
-
-    return read_id;
-}
-
-/******************************************************************************/
-/* VdbBlastDb */
-static void _VdbBlastDbWhack(VdbBlastDb *self) {
-    if (self == NULL) {
-        return;
-    }
-
-    VCursorRelease(self->cursACCESSION);
-    VCursorRelease(self->cursSeq);
-
-    VTableRelease(self->prAlgnTbl);
-    VTableRelease(self->refTbl);
-    VTableRelease(self->seqTbl);
-
-    VDatabaseRelease(self->db);
-
-    memset(self, 0, sizeof *self);
-
-    free(self);
-}
-
-static rc_t _VdbBlastDbOpenSeqCurs(VdbBlastDb *self, const char *acc) {
-    rc_t rc = 0;
-    const VCursor *curs = NULL;
-    assert(self);
-    if (self->cursSeq != NULL) {
-        return 0;
-    }
-    rc = VTableCreateCursorRead(self->seqTbl, &self->cursSeq);
-    if (rc != 0) {
-        PLOGERR(klogInt, (klogInt, rc,
-            "Error during VTableCreateCursorRead for $(acc)", "acc=%s", acc));
-    }
-    else {
-        curs = self->cursSeq;
-    }
-    if (rc == 0) {
-        const char name[] = "READ_FILTER";
-        rc = VCursorAddColumn(curs, &self->col_READ_FILTER, name);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error during VCursorAddColumn($(name))", "name=%s", name));
-        }
-    }
-    if (rc == 0) {
-        const char name[] = "READ_LEN";
-        rc = VCursorAddColumn(curs, &self->col_READ_LEN, name);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error during VCursorAddColumn($(name))", "name=%s", name));
-        }
-    }
-    if (rc == 0) {
-        const char name[] = "READ_TYPE";
-        rc = VCursorAddColumn(curs, &self->col_READ_TYPE, name);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error during VCursorAddColumn($(name))", "name=%s", name));
-        }
-    }
-    if (rc == 0) {
-        const char name[] = "TRIM_LEN";
-        rc = VCursorAddColumn(curs, &self->col_TRIM_LEN, name);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error during VCursorAddColumn($(name))", "name=%s", name));
-        }
-    }
-    if (rc == 0) {
-        const char name[] = "TRIM_START";
-        rc = VCursorAddColumn(curs, &self->col_TRIM_START, name);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error during VCursorAddColumn($(name))", "name=%s", name));
-        }
-    }
-    if (rc == 0) {
-        rc = VCursorOpen(curs);
-        if (rc != 0) {
-            LOGERR(klogInt, rc, "Error during VCursorOpen");
-        }
-    }
-    return rc;
-}
-
-typedef enum {
-    eFirstRead,
-    eNextRead,
-    eAllReads,
-} TReadType;
-static rc_t _VdbBlastDbFindRead
-    (const VdbBlastDb *self, ReadDesc *rd, TReadType type, bool *found)
-{
-    rc_t rc = 0;
-
-    int64_t first = 0;
-    uint64_t count = 0;
-
-    const VCursor *curs = NULL;
-
-    assert(self && rd && found);
-
-    *found = false;
-
-    if (type == eAllReads) {
-        memset(rd, 0, sizeof *rd);
-    }
-
-    curs = self->cursSeq;
-
-    rc = VCursorIdRange(curs, self->col_READ_LEN, &first, &count);
-
-    if (rc == 0) {
-        int64_t i = 0;
-        uint32_t c = 0;
-        if (type == eNextRead) {
-            if (rd->spot < first) {
-                return -1;
-            }
-            i = rd->spot - first;
-            c = rd->read;
-            if (c + 1 >= rd->nReads) {
-                c = 0;
-                ++i;
-            }
-        }
-        for (; i < count; ++i) {
-            int64_t spot = first + i;
-
-            const void *base = NULL;
-            uint32_t elem_bits = 0;
-            uint32_t elem_cnt = 0;
-            uint32_t elem_off = 0;
-            rc = VCursorCellDataDirect(curs, spot, self->col_READ_TYPE,
-                &elem_bits, &base, &elem_off, &elem_cnt);
-            if (rc != 0) {
-                break;
-            }
-            else {
-                INSDC_read_type *aRt = (INSDC_read_type*)base;
-                for (; c < elem_cnt; ++c) {
-                    INSDC_read_type *rt = aRt + c;
-                    assert(rt);
-
-                    if (*rt & SRA_READ_TYPE_BIOLOGICAL) {
-                        *found = true;
-                        if (type == eAllReads) {
-                            ++rd->spot;
-                        }
-                        else {
-                            rd->spot = spot;
-                            rd->read = c + 1;
-                            rd->nReads = elem_cnt;
-                            return rc;
-                        }
-                    }
-                }
-                c = 0;
-            }
-        }
-    }
-
-    return rc;
-}
-
-static rc_t _VdbBlastDbFindFirstRead
-    (const VdbBlastDb *self, ReadDesc *rd, bool *found)
-{   return _VdbBlastDbFindRead(self, rd, eFirstRead, found); }
-static rc_t _VdbBlastDbFindNextRead
-    (const VdbBlastDb *self, ReadDesc *rd, bool *found)
-{   return _VdbBlastDbFindRead(self, rd, eNextRead , found); }
-
-rc_t _ReadDescFindNextRead(ReadDesc *self, bool *found) {
-    assert(self && self->run && self->run);
-    return _VdbBlastDbFindNextRead(self->run->obj, self, found);
-}
-
-static rc_t _VdbBlastDbOpenCursAndGetFirstRead
-    (VdbBlastDb *self, ReadDesc *desc, bool *found, const char *acc)
-{
-    rc_t rc = _VdbBlastDbOpenSeqCurs(self, acc);
-    if (rc == 0) {
-        rc = _VdbBlastDbFindFirstRead(self, desc, found);
-    }
-    return rc;
-}
-
-static rc_t _VdbBlastDbOpenCursAndGetAllReads
-    (VdbBlastDb *self, ReadDesc *desc, const char *acc)
-{
-    rc_t rc = _VdbBlastDbOpenSeqCurs(self, acc);
-    if (rc == 0) {
-        bool found = false;
-        rc = _VdbBlastDbFindRead(self, desc, eAllReads, &found);
-    }
-    return rc;
-}
-
-uint64_t _VdbBlastRunSetGetAllReads
-    (const VdbBlastRunSet *self, uint32_t run)
-{
-    ReadDesc desc;
-
-    assert(self);
-
-    if (run >= self->runs.krun) {
-        return 0;
-    }
-
-    if (_VdbBlastDbOpenCursAndGetAllReads
-        (self->runs.run[run].obj, &desc, self->runs.run[run].acc))
-    {
-        return 0;
-    }
-
-    return desc.spot;
-}
-
-static rc_t _VdbBlastDbGetNReads
-    (VdbBlastDb *self, uint64_t spot, uint32_t *nReads, const char *acc)
-{
-    rc_t rc = _VdbBlastDbOpenSeqCurs(self, acc);
-    assert(self && nReads);
-    *nReads = 0;
-    if (rc == 0) {
-        const void *base = NULL;
-        uint32_t elem_bits = 0;
-        uint32_t elem_cnt = 0;
-        uint32_t elem_off = 0;
-        rc = VCursorCellDataDirect(self->cursSeq, spot, self->col_READ_TYPE,
-            &elem_bits, &base, &elem_off, &elem_cnt);
-        if (rc == 0) {
-            *nReads = elem_cnt;
-        }
-        else {
-            PLOGERR(klogInt, (klogInt, rc, "Cannot get "
-                "CellDataDirect for $(acc)/READ_TYPE/$(spot)",
-                "acc=%s,spot=%lu", acc, spot));
-        }
-    }
-    return rc;
-}
-
-/******************************************************************************/
-/*VdbBlastRun*/
-
-static void _VdbBlastRunFini(VdbBlastRun *self) {
-    if (self == NULL) {
-        return;
-    }
-
-    _VdbBlastDbWhack(self->obj);
-
-    free(self->acc);
-    free(self->path);
-
-    _RunDescFini(&self->rd);
-
-    memset(self, 0, sizeof *self);
-}
-
-static VdbBlastStatus _VdbBlastRunInit(VdbBlastRun *self, VdbBlastDb *obj,
-    const char *rundesc, BTableType type, const KDirectory *dir,
-    char *fullpath, uint32_t min_read_length, uint32_t index)
-{
-    rc_t rc = 0;
-    const char *acc = rundesc;
-    char rbuff[4096] = "";
-    size_t size = 0;
-
-    char slash = '/';
-
-    assert(!dir && self && obj && type != btpUndefined && rundesc);
-
-    {
-        KDirectory *dir = NULL;
-        if (KDirectoryNativeDir(&dir) != 0) {
-            LOGERR(klogInt, rc, "Error during KDirectoryNativeDir");
-            return eVdbBlastErr;
-        }
-/* TODO This is obsolete and incorrect */
-        rc = KDirectoryResolvePath(dir, true,
-            rbuff, sizeof rbuff, "%s", rundesc);
-        KDirectoryRelease(dir);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc,
-                "Error during KDirectoryResolvePath($(path))",
-                "path=%s", rundesc));
-            return eVdbBlastErr;
-        }
-    }
-
-    memset(self, 0, sizeof *self);
-
-    self->rd.index = index;
-    self->obj = obj;
-    self->type = type;
-
-    self->alignments
-        = self->bioBases = self->bioBasesApprox
-        = self->bioReads = self->bioReadsApprox = ~0;
-
-    acc = strrchr(rbuff, slash);
-    if (acc == NULL) {
-        acc = rbuff;
-    }
-    else if (string_measure(acc, &size) > 1) {
-        ++acc;
-    }
-    else {
-        acc = rbuff;
-    }
-
-    if (fullpath == NULL) {
-        self->path = string_dup(rbuff, sizeof(rbuff));
-        if (self->path == NULL) {
-            return eVdbBlastMemErr;
-        }
-    }
-    else {
-        self->path = fullpath;
-    }
-    self->acc = _CanonocalName(acc);
-    if (self->acc == NULL) {
-        return eVdbBlastMemErr;
-    }
-
-    self->min_read_length = min_read_length;
-
-    self->cSra = _VTableCSra(self->obj->seqTbl);
-
-    return eVdbBlastNoErr;
-}
-
-static uint32_t Bits(uint64_t n, EReadIdType idType) {
-    uint32_t bits = 1;
-
-    if (idType == eFixedReadN) {
-        return 0;
-    }
-
-    assert(idType == eFactor10);
-
-    if (n == 0) {
-        return 0;
-    }
-
-    while (n > 0) {
-        bits *= 10;
-        n /= 10;
-    }
-
-    return bits;
-}
-
-/*static*/ VdbBlastStatus _VdbBlastRunFillRunDesc(VdbBlastRun *self) {
-    VdbBlastStatus status = eVdbBlastNoErr;
-    RunDesc *rd = NULL;
-
-    int i = 0;
-    const char *col = NULL;
-
-    assert(self);
-
-    rd = &self->rd;
-
-    if (rd->spotCount || rd->readType || rd->nReads || rd->nBioReads) {
-        if (self->cSra && rd->cmpBaseCount == ~0) {
-            rc_t rc = RC(rcSRA, rcTable, rcReading, rcColumn, rcNotFound);
-            PLOGERR(klogInt, (klogInt, rc,
-                "Cannot read CMP_BASE_COUNT column for $(p)",
-                "p=%s", self->path));
-            STSMSG(1, ("Error: failed to read %s/%s",
-                self->path, "CMP_BASE_COUNT"));
-            return eVdbBlastErr;
-        }
-        else {
-            S
-            return eVdbBlastNoErr;
-        }
-    }
-
-    assert(self->path && self->obj);
-
-    col = "SPOT_COUNT";
-    status = _VTableReadFirstRow(self->obj->seqTbl,
-        col, &rd->spotCount, sizeof rd->spotCount, NULL, self->acc);
-    if (status != eVdbBlastNoErr) {
-        STSMSG(1, ("Error: failed to read %s/%s", self->path, col));
-        return status;
-    }
-
-    rd->spotBits = Bits(rd->spotCount, rd->readIdDesc.idType);
-
-    if (self->type == btpWGS) {
-        S
-        status = eVdbBlastNoErr;
-        rd->nReads = rd->spotCount > 0 ? 1 : 0;
-    }
-    else if (self->type == btpREFSEQ) {
-        S
-        status = eVdbBlastNoErr;
-        rd->nReads = 1;
-    }
-    else {
-        uint32_t nreads = 0;
-        status = _VTableGetNReads(self->obj->seqTbl, &nreads, self->acc);
-        if (status == eVdbBlastNoErr) {
-            rd->nReads = nreads;
-        }
-    }
-
-    switch (self->type) {
-        case btpSRA:
-            col = "PLATFORM";
-            status = _VTableReadFirstRow(self->obj->seqTbl,
-                col, &rd->platform, sizeof rd->platform, NULL, self->acc);
-            if (status != eVdbBlastNoErr) {
-                STSMSG(1, ("Error: failed to read %s/%s", self->path, col));
-                return status;
-            }
-            switch (rd->platform) { /* TODO */
-                case SRA_PLATFORM_ILLUMINA:
-                case SRA_PLATFORM_ABSOLID:
-                case SRA_PLATFORM_COMPLETE_GENOMICS:
-                    rd->varReadLen = false;
-                    break;
-                case SRA_PLATFORM_UNDEFINED:
-                case SRA_PLATFORM_454:
-                case SRA_PLATFORM_HELICOS:
-                case SRA_PLATFORM_PACBIO_SMRT:
-                case SRA_PLATFORM_ION_TORRENT:
-                case SRA_PLATFORM_CAPILLARY:
-                case SRA_PLATFORM_OXFORD_NANOPORE:
-                default:
-                    rd->varReadLen = true;
-                    break;
-            }
-            break;
-        case btpWGS:
-            rd->varReadLen = true;
-            break;
-        case btpREFSEQ:
-            break;
-        default:
-            assert(0);
-            break;
-    }
-
-    col = "READ_TYPE";
-    if (rd->readType == NULL) {
-        rd->readType = calloc(rd->nReads, sizeof *rd->readType);
-        if (rd->readType == NULL)
-        {   return eVdbBlastMemErr; }
-    }
-    {
-        bool optional = self->type == btpREFSEQ;
-        status = _VTableReadFirstRowImpl(self->obj->seqTbl, col, rd->readType,
-            rd->nReads * sizeof *rd->readType, &rd->readTypeStatic,
-            optional, NULL, self->acc);
-    }
-    /* TODO: check case when ($#READ_TYPE == 0 && nreads > 0) */
-    if (status != eVdbBlastNoErr) {
-        if (status == eVdbBlastTooExpensive) {
-            status = eVdbBlastNoErr;
-        }
-        else {
-            STSMSG(1, ("Error: failed to read %s/%s", self->path, col));
-            return status;
-        }
-    }
-
-    col = "READ_LEN";
-    if (rd->readLen == NULL) {
-        rd->readLen = calloc(rd->nReads, sizeof *rd->readLen);
-        if (rd->readLen == NULL)
-        {   return eVdbBlastMemErr; }
-    }
-    status = _VTableReadFirstRow(self->obj->seqTbl, col, rd->readLen,
-        rd->nReads * sizeof *rd->readLen, &rd->readLenStatic, self->acc);
-    /* TODO: check case when ($#READ_TYPE == 0 && nreads > 0) */
-    if (status != eVdbBlastNoErr) {
-        STSMSG(1, ("Error: failed to read %s/%s", self->path, col));
-        return status;
-    }
-
-    col = "READ_FILTER"; /* col = "RD_FILTER"; */
-    if (rd->rdFilter == NULL) {
-        rd->rdFilter = calloc(rd->nReads, sizeof *rd->rdFilter);
-        if (rd->rdFilter == NULL)
-        {   return eVdbBlastMemErr; }
-    }
-    status = _VTableReadFirstRow(self->obj->seqTbl, col, rd->rdFilter,
-        rd->nReads * sizeof *rd->rdFilter, &rd->rdFilterStatic, self->acc);
-    if (status != eVdbBlastNoErr) {
-        if (status == eVdbBlastTooExpensive) {
-            status = eVdbBlastNoErr;
-        }
-        else {
-            STSMSG(1, ("Error: failed to read %s/%s", self->path, col));
-            return status;
-        }
-    }
-
-    col = "BIO_BASE_COUNT";
-    status = _VTableReadFirstRowImpl(self->obj->seqTbl, col, &rd->bioBaseCount,
-        sizeof rd->bioBaseCount, NULL, true, NULL, self->acc);
-     /* Do not generate error message when BIO_BASE_COUNT is not found */
-
-    if (status != eVdbBlastNoErr) {
-        if (status == eVdbBlastTooExpensive) {
-            status = eVdbBlastNoErr;
-            rd->bioBaseCount = ~0;
-        }
-        else {
-            STSMSG(1, ("Error: failed to read %s/%s", self->path, col));
-            return status;
-        }
-    }
-
-    col = "CMP_BASE_COUNT";
-    status = _VTableReadFirstRow(self->obj->seqTbl, col,
-        &rd->cmpBaseCount, sizeof rd->cmpBaseCount, NULL, self->acc);
-    if (status != eVdbBlastNoErr) {
-        if (status == eVdbBlastTooExpensive) {
-            /* CMP_BASE_COUNT should be always found */
-            rc_t rc = RC(rcSRA, rcTable, rcReading, rcColumn, rcNotFound);
-            PLOGERR(klogInt, (klogInt, rc,
-                "Cannot read CMP_BASE_COUNT column for $(p)",
-                "p=%s", self->path));
-            STSMSG(1, ("Error: failed to read %s/%s",
-                self->path, "CMP_BASE_COUNT"));
-            rd->cmpBaseCount = ~0;
-            return eVdbBlastErr;
-        }
-        else {
-            STSMSG(1, ("Error: failed to read %s/%s", self->path, col));
-            return status;
-        }
-    }
-
-    if (self->type == btpREFSEQ) {
-        rd->nBioReads = 1;
-        /* rd->bioLen is set incorrectly for refseq-s */
-    }
-    else {
-        for (rd->nBioReads = 0, i = 0; i < rd->nReads; ++i) {
-            S
-            if (rd->readType[i] & SRA_READ_TYPE_BIOLOGICAL) {
-                if ((rd->rdFilterStatic == eColTypeStatic &&
-                     rd->rdFilter[i] == READ_FILTER_PASS) 
-                    || (rd->rdFilterStatic == eColTypeAbsent))
-                {
-                    ++rd->nBioReads;
-                    rd->bioLen += rd->readLen[i];
-                }
-                else {
-                    ++rd->nBioReads;
-                }
-            }
-        }
-    }
-    S /* LOG nBioReads */
-
-    return status;
-}
-
-bool _VdbBlastRunVarReadNum(const VdbBlastRun *self) {
-    VdbBlastStatus status = _VdbBlastRunFillRunDesc((VdbBlastRun*)self);
-    if (status != eVdbBlastNoErr) {
-        LOGERR(klogInt, 1, "Cannot fill run descriptor");
-    }
-
-    assert(self);
-
-    return self->rd.platform == SRA_PLATFORM_PACBIO_SMRT;
-}
-
-/* _VdbBlastRunGetNumSequences
-    returns (number of spots) * (number of biological reads in spot).
-    If read_filter is not static: some reads could be filtered,
-    so status is set to eVdbBlastTooExpensive */
-/*static*/
-uint64_t _VdbBlastRunGetNumSequences(VdbBlastRun *self,
-    VdbBlastStatus *status)
-{
-    assert(self && status);
-
-    *status = eVdbBlastNoErr;
-
-    if (self->bioReads == ~0) {
-        RunDesc *rd = NULL;
-
-        if (self->type == btpREFSEQ) {
-            S
-            self->bioReads = 1;
-        }
-        else if (_VdbBlastRunVarReadNum(self)) {
-            rc_t rc = 0;
-            ReadDesc desc;
-            memset(&desc, 0, sizeof desc);
-            rc = _VdbBlastDbOpenCursAndGetAllReads(self->obj, &desc, self->acc);
-            if (rc != 0) {
-                *status = eVdbBlastErr;
-            }
-            else {
-                self->bioReads = desc.spot;
-            }
-        }
-        else {
-            *status = _VdbBlastRunFillRunDesc(self);
-            if (*status != eVdbBlastNoErr) {
-                S
-                return 0;
-            }
-
-            rd = &self->rd;
-
-            if (rd->rdFilterStatic != eColTypeStatic) {
-                self->bioReadsTooExpensive = true;
-            }
-
-            if (self->cSra) {
-                self->bioReadsTooExpensive = true;
-            }
-
-            if (_VdbBlastRunVarReadNum(self)) {
-                self->bioReads = 0;
-                S
-            }
-            else {
-                self->bioReads = rd->spotCount * rd->nBioReads;
-                S
-            }
-        }
-    }
-    else {
-        S
-    }
-
-    if (*status == eVdbBlastNoErr && self->bioReadsTooExpensive) {
-        *status = eVdbBlastTooExpensive;
-    }
-    return self->bioReads;
-}
-
-static uint64_t _VdbBlastRunCountBioBaseCount(VdbBlastRun *self,
-    VdbBlastStatus *status)
-{
-    uint64_t bio_base_count = 0;
-
-    rc_t rc = _VTableBioBaseCntApprox(self->obj->seqTbl,
-        self->rd.spotCount, self->rd.nReads, &bio_base_count, self->acc);
-
-    if (rc != 0) {
-        *status = eVdbBlastErr;
-    }
-
-    return bio_base_count;
-}
-
-static uint64_t _VdbBlastSraRunGetLengthApprox(VdbBlastRun *self,
-    VdbBlastStatus *status)
-{
-    assert(self && status);
-
-    *status = eVdbBlastNoErr;
-
-    if (self->bioBasesApprox == ~0) {
-        if (! self->bioBasesTooExpensive && self->bioBases != ~0) {
-            self->bioBasesApprox = self->bioBases;
-        }
-        else {
-            RunDesc *rd = NULL;
-            *status = _VdbBlastRunFillRunDesc(self);
-            if (*status != eVdbBlastNoErr) {
-                S
-                return 0;
-            }
-
-            rd = &self->rd;
-            if (rd->nReads == 0) {
-                S
-                self->bioBasesApprox = 0;
-            }
-            else if (rd->varReadLen) {
-                S
-                self->bioBasesApprox
-                    = _VdbBlastRunCountBioBaseCount(self, status);
-            }
-            else {
-                if (self->type == btpREFSEQ) {
-                    if (rd->bioBaseCount == ~0) {
-                        S
-                        *status = eVdbBlastErr;
-                    }
-                    else {
-                        self->bioBasesApprox = rd->bioBaseCount;
-                    }
-                }
-                else {
-                    uint8_t read = 0;
-                    S
-                    for (read = 0, self->bioBasesApprox = 0;
-                        read < rd->nReads; ++read)
-                    {
-                        if (rd->readType[read] & SRA_READ_TYPE_BIOLOGICAL) {
-                            self->bioBasesApprox += rd->readLen[read];
-                        }
-                    }
-                    self->bioBasesApprox *= rd->spotCount;
-                }
-            }
-        }
-    }
-
-    return self->bioBasesApprox;
-}
-
-static uint64_t _VdbBlastRunGetNumSequencesApprox(VdbBlastRun *self,
-    VdbBlastStatus *status)
-{
-
-    assert(self && status);
-
-    *status = eVdbBlastNoErr;
-
-    if (self->bioReadsApprox == ~0) {
-        RunDesc *rd = NULL;
-
-        if (! self->bioReadsTooExpensive && self->bioReads != ~0) {
-            self->bioReadsApprox = self->bioReads;
-        }
-        else if (self->type == btpREFSEQ) {
-            S
-            self->bioReadsApprox = 1;
-        }
-        else if (self->cSra) {
-/* Number of Bio Reads for cSra == number of CMP reads
-    = Number of all bio reads * CMP_BASE_COUNT / BIO_BASE_COUNT
-   Number of all bio reads = nSpots * n of bio reads per spot */
-            double r = 0;
-            uint64_t n = 0;
-
-            *status = _VdbBlastRunFillRunDesc(self);
-            if (*status != eVdbBlastNoErr) {
-                S
-                return 0;
-            }
-
-            rd = &self->rd;
-
-            n = _VdbBlastSraRunGetLengthApprox(self, status);
-            if (*status != eVdbBlastNoErr) {
-                S
-                return 0;
-            }
-            r = rd->cmpBaseCount * rd->spotCount * rd->nBioReads;
-            r /= n;
-            self->bioReadsApprox = r;
-        }
-        else if (_VdbBlastRunVarReadNum(self)) {
-            self->bioReads = _VdbBlastRunGetNumSequences(self, status);
-        }
-        else {
-            *status = _VdbBlastRunFillRunDesc(self);
-            if (*status != eVdbBlastNoErr) {
-                S
-                return 0;
-            }
-
-            rd = &self->rd;
-
-            self->bioReadsApprox = rd->spotCount * rd->nBioReads;
-            S
-        }
-    }
-
-    return self->bioReadsApprox;
-}
-
-static uint64_t _VdbBlastRunGetLength
-    (VdbBlastRun *self, VdbBlastStatus *status)
-{
-    VdbBlastStatus dummy = eVdbBlastNoErr;
-    if (status == NULL)
-    {   status = &dummy; }
-
-    *status = eVdbBlastNoErr;
-
-    if (self->bioBasesTooExpensive) {
-        *status = eVdbBlastTooExpensive;
-        return 0;
-    }
-    else if (self->bioBases == ~0) {
-        if (self->cSra) {
-            *status = _VdbBlastRunFillRunDesc(self);
-            if (*status != eVdbBlastNoErr) {
-                S
-                return 0;
-            }
-            self->bioBases = self->rd.cmpBaseCount;
-        }
-        else {
-/* if BIO_BASE_COUNT is not found then status is set to eVdbBlastTooExpensive */
-            *status = _VTableReadFirstRowImpl(self->obj->seqTbl,
-                "BIO_BASE_COUNT", &self->bioBases,
-                sizeof self->bioBases, NULL, true, NULL, self->acc);
-            if (*status == eVdbBlastTooExpensive) {
-                self->bioBasesTooExpensive = true;
-            }
-        }
-    }
-
-    if (*status == eVdbBlastNoErr) {
-        S
-        return self->bioBases;
-    }
-    else {
-        S
-        return 0;
-    }
-}
-
-static uint64_t _VdbBlastRunGetLengthApprox(VdbBlastRun *self,
-    VdbBlastStatus *status)
-{
-    if (self->cSra) {
-        return _VdbBlastRunGetLength(self, status);
-    }
-    else {
-        return _VdbBlastSraRunGetLengthApprox(self, status);
-    }
-}
-
-static uint64_t _VdbBlastRunScan(const VdbBlastRun *self,
-    uint64_t (*cmp)
-        (uint64_t cand, uint64_t champ, int64_t minRead, bool *done),
-    uint64_t minRead, uint64_t start, VdbBlastStatus *status)
-{
-    uint64_t res = start;
-    uint64_t bad = start;
-    uint64_t spot = 0;
-    bool done = false;
-    rc_t rc = 0;
-    const VCursor *curs = NULL;
-    uint32_t idxREAD_LEN = 0;
-    uint32_t idxREAD_TYPE = 0;
-    assert(self && status &&
-        (self->rd.spotCount || self->rd.readType ||
-         self->rd.nReads    || self->rd.nBioReads));
-    rc = _VTableMakeCursor
-        (self->obj->seqTbl, &curs, &idxREAD_LEN, "READ_LEN", self->acc);
-    if (rc != 0) {
-        return bad;
-    }
-    if (_VdbBlastRunVarReadNum(self)) {
-        rc = VCursorAddColumn(curs, &idxREAD_TYPE, "READ_TYPE");
-        if (rc != 0) {
-            return bad;
-        }
-    }
-    for (spot = 1;
-        spot <= self->rd.spotCount && *status == eVdbBlastNoErr && !done;
-        ++spot)
-    {
-        uint32_t elem_bits, elem_off, elem_cnt;
-        const void *base = NULL;
-        if (_VdbBlastRunVarReadNum(self)) {
-            rc = VCursorCellDataDirect(curs, spot, idxREAD_TYPE,
-                &elem_bits, &base, &elem_off, &elem_cnt);
-            if (rc != 0) {
-                *status = eVdbBlastErr;
-                PLOGMSG(klogInfo, (klogInfo,
-                    "$(f): Cannot '$(name)' CellDataDirect",
-                    "f=%s,name=%s", __func__, "READ_TYPE"));
-                res = bad;
-                break;
-            }
-            else {
-                INSDC_read_type *aRt = (INSDC_read_type*)base;
-                uint32_t c = 0;
-                for (c = 0; c < elem_cnt; ++c) {
-                    INSDC_read_type *rt = aRt + c;
-                    assert(rt);
-
-                    if (*rt & SRA_READ_TYPE_BIOLOGICAL) {
-                        uint32_t elem_bits, elem_off, elem_cnt;
-                        const void *base = NULL;
-                        rc = VCursorCellDataDirect(curs, spot, idxREAD_LEN,
-                            &elem_bits, &base, &elem_off, &elem_cnt);
-                        if (rc != 0) {
-                            *status = eVdbBlastErr;
-                            PLOGMSG(klogInfo, (klogInfo,
-                                "$(f): Cannot '$(name)' CellDataDirect",
-                                "f=%s,name=%s", __func__, "READ_LEN"));
-                            res = bad;
-                            break;
-                        }
-                        else if (elem_off != 0 || elem_bits != 32) {
-                            *status = eVdbBlastErr;
-                            PLOGERR(klogInt, (klogInt, rc,
-                                "Bad VCursorCellDataDirect(READ_LEN) result: "
-                                "boff=$(elem_off), elem_bits=$(elem_bits)",
-                                "elem_off=%u,elem_bits=%u",
-                                elem_off, elem_bits));
-                            res = bad;
-                            break;
-                        }
-                        else {
-                            uint8_t read = c;
-                            const uint32_t *readLen = base;
-                            res = cmp(readLen[read], res, minRead, &done);
-                        }
-                    }
-                }
-            }
-        }
-        else {
-            rc = VCursorCellDataDirect(curs, spot, idxREAD_LEN,
-                &elem_bits, &base, &elem_off, &elem_cnt);
-            if (rc != 0) {
-                *status = eVdbBlastErr;
-                PLOGMSG(klogInfo, (klogInfo,
-                    "$(f): Cannot '$(name)' CellDataDirect",
-                    "f=%s,name=%s", __func__, "READ_LEN"));
-                res = bad;
-                break;
-            }
-            else if (elem_off != 0 || elem_bits != 32) {
-                *status = eVdbBlastErr;
-                PLOGERR(klogInt, (klogInt, rc,
-                    "Bad VCursorCellDataDirect(READ_LEN) result: "
-                    "boff=$(elem_off), elem_bits=$(elem_bits)",
-                    "elem_off=%u,elem_bits=%u", elem_off, elem_bits));
-                res = bad;
-                break;
-            }
-            else {
-                uint8_t read = 0;
-                const uint32_t *readLen = base;
-                assert(self->rd.readType && self->rd.readLen);
-                assert(self->rd.nReads == elem_cnt);
-                for (read = 0; read < self->rd.nReads; ++read) {
-                    if (self->rd.readType[read] & SRA_READ_TYPE_BIOLOGICAL) {
-                       res = cmp(readLen[read], res, minRead, &done);
-                    }
-                }
-            }
-        }
-    }
-    RELEASE(VCursor, curs);
-    return res;
-}
-
-static
-VdbBlastStatus _VdbBlastRunGetWgsAccession(VdbBlastRun *self, int64_t spot,
-    char *name_buffer, size_t bsize, size_t *num_required)
-{
-    rc_t rc = 0;
-    uint32_t row_len = 0;
-
-    assert(num_required);
-
-    if (self == NULL || spot <= 0 || name_buffer == NULL || bsize == 0) {
-        STSMSG(0, ("Error: some of %s parameters is NULL or 0", __func__));
-        return eVdbBlastErr;
-    }
-    assert(self->obj);
-    if (self->obj->seqTbl == NULL) {
-        STSMSG(0, ("Error: %s: VTable is NULL in VdbBlastRun", __func__));
-        return eVdbBlastErr;
-    }
-
-    if (self->obj->cursACCESSION == NULL) {
-        rc = _VTableMakeCursor(self->obj->seqTbl, &self->obj->cursACCESSION,
-            &self->obj->col_ACCESSION, "ACCESSION", self->acc);
-        if (rc != 0) {
-            VCursorRelease(self->obj->cursACCESSION);
-            self->obj->cursACCESSION = NULL;
-            return eVdbBlastErr;
-        }
-    }
-
-    assert(self->obj->cursACCESSION && rc == 0);
-
-    rc = VCursorReadDirect(self->obj->cursACCESSION, spot,
-        self->obj->col_ACCESSION, 8, name_buffer, bsize, &row_len);
-    *num_required = row_len;
-    if (row_len > 0) /* include ending '\0' */
-    {   ++(*num_required); }
-    if (rc == 0) {
-        if (bsize > row_len)
-        { name_buffer[row_len] = '\0'; }
-        return eVdbBlastNoErr;
-    }
-    else if (rc == SILENT_RC
-        (rcVDB, rcCursor, rcReading, rcBuffer, rcInsufficient))
-    {   return eVdbBlastNoErr; }
-    else {
-        assert(self->path);
-        PLOGERR(klogInt, (klogInt, rc, "Error in VCursorReadDirect"
-            "$(path), ACCESSION, spot=$(spot))",
-            "path=%s,spot=%ld", self->path, spot));
-        return eVdbBlastErr;
-    }
-}
-
-uint64_t _VdbBlastRunGetNumAlignments(VdbBlastRun *self,
-    VdbBlastStatus *status)
-{
-    assert(status);
-
-    *status = eVdbBlastNoErr;
-
-    if (self->alignments == ~0) {
-        assert(self->obj);
-
-        if (self->obj->prAlgnTbl == NULL) {
-            self->alignments = 0;
-        }
-        else {
-            const char col[] = "SPOT_COUNT";
-            *status = _VTableReadFirstRow(self->obj->prAlgnTbl, col,
-                &self->alignments, sizeof self->alignments, NULL, self->acc);
-            if (*status != eVdbBlastNoErr) {
-                STSMSG(1, ("Error: failed to read %s/%s", self->path, col));
-                return 0;
-            }
-        }
-    }
-
-    assert(self->alignments != ~0);
-
-    return self->alignments;
-}
-
-#ifdef TEST_VdbBlastRunFillReadDesc
-LIB_EXPORT
-#endif
-VdbBlastStatus _VdbBlastRunFillReadDesc(VdbBlastRun *self,
-    uint64_t read_id, ReadDesc *desc)
-{
-    VdbBlastStatus status = eVdbBlastNoErr;
-
-    const VdbBlastRun *prev = NULL;
-    const RunDesc *rd = NULL;
-    
-    int bioIdx = 0;
-
-    if (self == NULL || desc == NULL) {
-        S
-        return eVdbBlastErr;
-    }
-
-    prev = desc->run;
-    memset(desc, 0, sizeof *desc);
-    desc->prev = prev;
-    desc->run = self;
-
-    rd = &self->rd;
-
-    if (rd->nReads == 0 || rd->readType == NULL) {
-        status = _VdbBlastRunFillRunDesc(self);
-        if (status != eVdbBlastNoErr)
-        {   return status; }
-        assert(rd->nReads && rd->readType);
-    }
-
-    if (rd->readIdDesc.idType == eFixedReadN || read_id == 0) {
-        if (!_VdbBlastRunVarReadNum(self)) {
-            desc->nReads = rd->nReads;
-            desc->spot = read_id / rd->nBioReads + 1;
-            if (desc->spot <= rd->spotCount) {
-                int idInSpot
-                    = read_id - (desc->spot - 1) * rd->nBioReads; /* 0-based */
-
-                int i = 0;
-                for (i = 0; i < rd->nReads; ++i) {
-                    if (rd->readType[i] & SRA_READ_TYPE_BIOLOGICAL) {
-                        if (bioIdx++ == idInSpot) {
-                            S
-                            desc->tableId = VDB_READ_UNALIGNED;
-                            desc->read = i + 1;
-                            desc->read_id = _RunDescMakeReadId(rd,
-                                desc->spot, desc->read, read_id, &status);
-                            return status;
-                        }
-                    }
-                }
-                S
-            }
-            else {
-                uint64_t alignments = 0;
-                S
-                desc->spot -= rd->spotCount;
-                alignments = _VdbBlastRunGetNumAlignments(self, &status);
-                if (status != eVdbBlastNoErr) {
-                    return status;
-                }
-                if (desc->spot <= alignments) {
-                    desc->tableId = VDB_READ_ALIGNED;
-                    desc->read = 1;
-                    return eVdbBlastNoErr;
-                }
-                S
-            }
-        }
-        else {
-            bool found = false;
-            if (_VdbBlastDbOpenCursAndGetFirstRead
-                (self->obj, desc, &found, self->acc) == 0)
-            {
-                return eVdbBlastNoErr;
-            }
-        }
-    }
-    else if (rd->readIdDesc.idType == eFactor10) {
-        if (rd->readIdDesc.runBits > 0) {
-            read_id /= rd->readIdDesc.runBits;
-        }
-        if (rd->spotBits > 0) {
-            rc_t rc = 0;
-            desc->read = read_id / rd->spotBits;
-            desc->spot = read_id % rd->spotBits;
-            if (desc->read > 0 && desc->spot > 0) {
-                rc = _VdbBlastDbGetNReads
-                    (self->obj, desc->spot, &desc->nReads, self->acc);
-                if (rc == 0) {
-                    desc->tableId = VDB_READ_UNALIGNED;
-                    S
-                    return eVdbBlastNoErr;
-                }
-                else {
-                    S
-                }
-            }
-            else {
-                S
-            }
-        }
-    }
-    else {
-        assert(0);
-    }
-
-    memset(desc, 0, sizeof *desc);
-    return eVdbBlastErr;
-}
-
-VdbBlastStatus _VdbBlastRunSetFindFirstRead(const VdbBlastRunSet *self,
-    uint64_t *read_id, bool useGetFirstRead)
-{
-    VdbBlastStatus status = eVdbBlastErr;
-    const RunSet *rs = NULL;
-    ReadDesc desc;
-    assert(self);
-    memset(&desc, 0, sizeof desc);
-    rs = &self->runs;
-    _VdbBlastRunSetBeingRead(self);
-    if (useGetFirstRead) {
-        bool found = false;
-        uint32_t i = 0;
-        for (i = 0; i < rs->krun; ++i) {
-            VdbBlastRun *run = &rs->run[i];
-            rc_t rc = _VdbBlastDbOpenCursAndGetFirstRead
-                (rs->run[i].obj, &desc, &found, rs->run[i].acc);
-            if (rc != 0) {
-                break;
-            }
-            else if (!found) {
-                continue;
-            }
-
-            if (desc.spot == 0) {
-                if (rs->krun > 1) {
-                    desc.prev = run;
-                }
-            }
-            else {
-                desc.run = run;
-                status = _ReadDescFixReadId(&desc);
-                break;
-            }
-        }
-    }
-    else {
-        status = _RunSetFindReadDesc(rs, 0, &desc);
-        if (status == eVdbBlastNoErr) {
-            status = _ReadDescFixReadId(&desc);
-        }
-    }
-    if (status == eVdbBlastNoErr) {
-        assert(read_id);
-        *read_id = desc.read_id;
-    }
-    return status;
-}
-
-EReadIdType _VdbBlastRunSetGetReadIdType(const VdbBlastRunSet *self) {
-    assert(self);
-
-    return self->readIdDesc.idType;
-}
-
-static VdbBlastStatus _VdbBlastRunGetReadId(VdbBlastRun *self, const char *acc,
-    uint64_t spot, /* 1-based */
-    uint32_t read, /* 1-based */
-    uint64_t *read_id)
-{
-    uint64_t id = ~0;
-    VdbBlastStatus status = eVdbBlastErr;
-    size_t size;
-
-    assert(self && acc && read_id && self->acc);
-    assert(memcmp(self->acc, acc, string_measure(self->acc, &size)) == 0);
-
-    if ((spot <= 0 && read > 0) || (spot > 0 && read <= 0)) {
-        S
-        return eVdbBlastErr;
-    }
-
-    if (spot > 0) {
-        if (self->type != btpSRA) {
-            return eVdbBlastErr;
-        }
-
-        if (self->rd.readIdDesc.idType == eFixedReadN) {
-            for (id = (spot - 1) * self->rd.nBioReads; ; ++id) {
-                ReadDesc desc;
-                status = _VdbBlastRunFillReadDesc(self, id, &desc);
-                if (status != eVdbBlastNoErr)
-                {   return status; }
-                if (desc.spot < spot) {
-                    S
-                    return eVdbBlastErr;
-                }
-                if (desc.spot > spot) {
-                    S
-                    return eVdbBlastErr;
-                }
-                if (desc.read == read) {
-                    *read_id = id;
-                    return eVdbBlastNoErr;
-                }
-            }
-            S
-            return eVdbBlastErr;
-        }
-        else if (self->rd.readIdDesc.idType == eFactor10) {
-            if (spot <= self->rd.spotCount) {
-                if (self->rd.readIdDesc.varReadN) {
-                    /* TODO How to make sure this read exists in this spot?*/
-                }
-                else {
-                    if (read > self->rd.nReads) {
-                        S
-                        return eVdbBlastErr;
-                    }
-                    else {
-                        /* TODO how to check it when READ_TYPE is variable
-                                withing a run (is it possible?) */
-                        if (read == 0) {
-                            S
-                            return eVdbBlastErr;
-                        }
-                        if (! (self->rd.readType[read - 1]
-                                & SRA_READ_TYPE_BIOLOGICAL))
-                        {
-                            S
-                            return eVdbBlastErr;
-                        }
-                    }
-                }
-                id = _RunDescMakeReadId(&self->rd, spot, read, ~0, &status);
-                *read_id = id;
-                return status;
-            }
-            else {
-                S
-                return eVdbBlastErr;
-            }
-        }
-        else {
-            assert(0);
-            return eVdbBlastErr;
-        }
-    }
-    else {
-        uint64_t n = ~0;
-        uint64_t i = ~0;
-        if (self->type == btpSRA)
-        {   return eVdbBlastErr; }
-        else if (self->type == btpREFSEQ) {
-            *read_id = 0;
-            return eVdbBlastNoErr;
-        }
-        else if (self->type == btpWGS) {
-            n = _VdbBlastRunGetNumSequences(self, &status);
-            if (status != eVdbBlastNoErr
-                && status != eVdbBlastTooExpensive)
-            {
-                return status;
-            }
-            /* TODO optimize: avoid full run scan */
-            for (i = 0; i < n ; ++i) {
-                size_t need = ~0;
-#define SZ 4096
-                char name_buffer[SZ + 1];
-                if (string_measure(acc, &size) > SZ) {
-                    S
-                    return eVdbBlastErr;
-                }
-#undef SZ
-                status = _VdbBlastRunGetWgsAccession(
-                    self, i + 1, name_buffer, sizeof name_buffer, &need);
-                if (need > sizeof name_buffer) {
-                    S
-                    return eVdbBlastErr;
-                }
-                if (strcmp(name_buffer, acc) == 0) {
-                    i = _RunDescMakeReadId(&self->rd, i + 1, 1, i, &status);
-                    *read_id = i;
-                    return status;
-                }
-            }
-        }
-        else { assert(0); }
-        return eVdbBlastErr;
-    }
-}
-
-static uint64_t _VdbBlastRunGetSequencesAmount(
-    VdbBlastRun *self, VdbBlastStatus *status)
-{
-    uint64_t n = _VdbBlastRunGetNumSequences(self, status);
-
-    assert(status);
-
-    if (*status == eVdbBlastNoErr) {
-        n += _VdbBlastRunGetNumAlignments(self, status);
-    }
-
-    return n;
-}
-
-/******************************************************************************/
-
-VdbBlastStatus _ReadDescFixReadId(ReadDesc *self) {
-    VdbBlastStatus status = eVdbBlastNoErr;
-
-    assert(self && self->run);
-
-    self->read_id = _RunDescMakeReadId
-        (&self->run->rd, self->spot, self->read, self->read_id, &status);
-
-    return status;
-}
-
-/******************************************************************************/
-
-static  void _RunSetFini(RunSet *self) {
-    assert(self);
-
-    if (self->run) {
-        uint32_t i = 0;
-
-        for (i = 0; i < self->krun; ++i) {
-            _VdbBlastRunFini(&self->run[i]);
-        }
-
-        free(self->run);
-    }
-
-    _RefSetFini(&self->refs);
-    
-    memset(self, 0, sizeof *self);
-}
-
-static VdbBlastStatus _RunSetAllocTbl(RunSet *self) {
-    size_t nmemb = 16;
-
-    if (self == NULL)
-    {   return eVdbBlastErr; }
-
-    if (self->run && self->krun < self->nrun) {
-        return eVdbBlastNoErr;
-    }
-
-    if (self->run == NULL) {
-        self->run = calloc(nmemb, sizeof *self->run);
-        if (self->run == NULL)
-        {   return eVdbBlastMemErr; }
-        S
-    }
-    else {
-        void *p = NULL;
-        nmemb += self->nrun;
-        p = realloc(self->run, nmemb * sizeof *self->run);
-        if (p == NULL)
-        {   return eVdbBlastMemErr; }
-        self->run = p;
-        S
-    }
-
-    self->nrun = nmemb;
-    return eVdbBlastNoErr;
-}
-
-static VdbBlastStatus _RunSetAddObj(RunSet *self, VdbBlastDb *obj,
-    const char *rundesc, BTableType type, const KDirectory *dir,
-    char *fullpath, uint32_t min_read_length)
-{
-
-    VdbBlastRun* run = NULL;
-
-    VdbBlastStatus status = _RunSetAllocTbl(self);
-    if (status != eVdbBlastNoErr) {
-        return status;
-    }
-
-    assert(self && self->run);
-
-    run = &self->run[self->krun];
-
-    status = _VdbBlastRunInit(run,
-        obj, rundesc, type, dir, fullpath, min_read_length, self->krun++);
-
-    return status;
-}
-
-static uint64_t _RunSetGetNumSequences
-    (const RunSet *self, VdbBlastStatus *aStatus)
-{
-    uint64_t num = 0;
-    uint32_t i = 0;
-
-    assert(self && aStatus);
-
-    *aStatus = eVdbBlastNoErr;
-
-    for (i = 0; i < self->krun; ++i) {
-        VdbBlastStatus status = eVdbBlastNoErr;
-        VdbBlastRun *run = NULL;
-
-        assert(self->run);
-
-        run = &self->run[i];
-
-        num += _VdbBlastRunGetNumSequences(run, &status);
-        if (status != eVdbBlastNoErr) {
-            assert(run->path);
-
-            if (*aStatus == eVdbBlastNoErr) {
-                *aStatus = status; 
-            }
-
-            if (status != eVdbBlastTooExpensive) {
-                STSMSG(1, (
-                    "Error: failed to GetNumSequences(on run %s)", run->path));
-                return 0;
-            }
-
-            assert(*aStatus == eVdbBlastTooExpensive);
-        }
-    }
-
-    STSMSG(1, ("_RunSetGetNumSequences = %ld", num));
-
-    return num;
-}
-
-static
-uint64_t _RunSetGetNumSequencesApprox(const RunSet *self,
-    VdbBlastStatus *status)
-{
-    uint64_t num = 0;
-    uint32_t i = 0;
-
-    assert(self && status);
-
-    *status = eVdbBlastNoErr;
-
-    for (i = 0; i < self->krun; ++i) {
-        VdbBlastRun *run = NULL;
-
-        assert(self->run);
-
-        run = &self->run[i];
-
-        num += _VdbBlastRunGetNumSequencesApprox(run, status);
-        if (*status != eVdbBlastNoErr) {
-            assert(run->path);
-
-            STSMSG(1, (
-                "Error: failed to GetNumSequencesApprox(on run %s)",
-                run->path));
-
-            return 0;
-        }
-    }
-
-    STSMSG(1, ("_RunSetGetNumSequencesApprox = %ld", num));
-
-    return num;
-}
-
-static
-uint64_t _RunSetGetTotalLength(const RunSet *self,
-    VdbBlastStatus *status)
-{
-    uint64_t num = 0;
-    uint32_t i = 0;
-    assert(self && status);
-
-    if (self->krun)
-    {   assert(self->run); }
-
-    for (i = 0; i < self->krun; ++i) {
-        VdbBlastRun *run = &self->run[i];
-        assert(run && run->path);
-        num += _VdbBlastRunGetLength(run, status);
-        if (*status != eVdbBlastNoErr) {
-            STSMSG(1, (
-                "Error: failed to _RunSetGetTotalLength(on run %s)",
-                run->path));
-            return 0;
-        }
-    }
-
-    STSMSG(1, ("_RunSetGetTotalLength = %ld", num));
-
-    return num;
-}
-
-static uint64_t _RunSetGetTotalLengthApprox(const RunSet *self,
-    VdbBlastStatus *status)
-{
-    uint64_t num = 0;
-
-    uint32_t i = 0;
-
-    assert(self && status);
-
-    for (num = 0, i = 0; i < self->krun; ++i) {
-        VdbBlastRun *run = NULL;
-
-        assert(self->run);
-
-        run = &self->run[i];
-
-        num += _VdbBlastRunGetLengthApprox(run, status);
-        if (*status != eVdbBlastNoErr) {
-            STSMSG(1, ("Error: failed "
-                "to _VdbBlastRunGetLengthApprox(on run %s)", run->path));
-            return 0;
-        }
-    }
-
-    STSMSG(1, ("VdbBlastRunSetGetTotalLengthApprox = %ld", num));
-
-    return num;
-}
-
-static size_t _RunSetGetName(const RunSet *self,
-    VdbBlastStatus *status, char *name_buffer, size_t bsize)
-{
-    size_t need = 0, idx = 0;
-    int i = 0;
-    size_t size;
-    
-    assert(self && status);
-    for (i = 0; i < self->krun; ++i) {
-        VdbBlastRun *run = &self->run[i];
-        if (run && run->acc) {
-            if (i)
-            {   ++need; }
-            need += string_measure(run->acc, &size);
-        }
-        else {
-            S
-            return 0;
-        }
-    }
-
-    if (name_buffer == NULL || bsize == 0) {
-        S
-        return need;
-    }
-
-    for (i = 0; i < self->krun; ++i) {
-        VdbBlastRun *run = &self->run[i];
-        if (run && run->acc) {
-            if (i)
-            {   name_buffer[idx++] = '|'; }
-            if (idx >= bsize) {
-                S
-                return need;
-            }
-            string_copy(name_buffer + idx, bsize - idx,
-                run->acc, string_size(run->acc));
-            idx += string_measure(run->acc, &size);
-            if (idx >= bsize) {
-                S
-                return need;
-            }
-        }
-    }
-    name_buffer[idx++] = '\0';
-    *status = eVdbBlastNoErr;
-
-    S
-    return need;
-}
-
-typedef struct {
-    uint64_t read_id;
-} ReadId;
-static VdbBlastStatus _RunSetFindReadDescContinuous(
-    const RunSet *self, uint64_t read_id, ReadDesc *desc)
-{
-    uint64_t i = 0;
-    uint64_t prev = 0;
-    uint64_t crnt = 0;
-
-    assert(self && desc);
-
-    for (i = 0, prev = 0; i < self->krun; ++i) {
-        VdbBlastStatus status = eVdbBlastNoErr;
-        VdbBlastRun *run = NULL;
-        uint64_t l = 0;
-
-        if (prev > 0 && i < prev) {
-            S
-            return eVdbBlastErr;
-        }
-
-        run = &self->run[i];
-        if (run == NULL) {
-            S
-            return eVdbBlastErr;
-        }
-
-        l = _VdbBlastRunGetSequencesAmount(run, &status);
-        if (status != eVdbBlastNoErr &&
-            status != eVdbBlastTooExpensive)
-        {
-            S
-            return status;
-        }
-
-        if (crnt + l <= read_id) {
-            crnt += l;
-        }
-        else {
-            uint64_t a_read_id = read_id - crnt;
-            status = _VdbBlastRunFillReadDesc(run, a_read_id, desc);
-            if (status == eVdbBlastNoErr) {
-                S
-                desc->read_id = read_id;
-            }
-            else
-            {   S }
-
-            return status;
-        }
-
-        prev = i;
-    }
-
-    S
-    return eVdbBlastErr;
-}
-
-static VdbBlastStatus _RunSetFindReadDescFactor10(
-    const RunSet *self, uint64_t read_id, ReadDesc *desc)
-{
-    VdbBlastStatus status = eVdbBlastErr;
-
-    VdbBlastRun *run = NULL;
-    uint64_t i = 0;
-
-    assert(self && desc && self->run);
-
-    if (self->run[0].rd.readIdDesc.runBits > 0) {
-        i = read_id % self->run[0].rd.readIdDesc.runBits;
-    }
-    else {
-        i = 0;
-    }
-
-    if (i >= self->krun) {
-        S
-        return eVdbBlastErr;
-    }
-
-    run = &self->run[i];
-
-    status = _VdbBlastRunFillReadDesc(run, read_id, desc);
-    if (status == eVdbBlastNoErr) {
-        S
-        desc->read_id = read_id;
-    }
-    else
-    {   S }
-
-    return status;
-}
-
-VdbBlastStatus _RunSetFindReadDesc(const RunSet *self,
-    uint64_t read_id, ReadDesc *desc)
-{
-    if (self == NULL || desc == NULL || self->krun == 0) {
-        S
-        return eVdbBlastErr;
-    }
-
-    switch (self->run[0].rd.readIdDesc.idType) {
-        case eFixedReadN:
-            return _RunSetFindReadDescContinuous(self, read_id, desc);
-        case eFactor10:
-            return _RunSetFindReadDescFactor10(self, read_id, desc);
-        default:
-            assert(0);
-            return eVdbBlastErr;
-    }
-}
-
-/******************************************************************************/
-
-static const char VDB_BLAST_RUN_SET[] = "VdbBlastRunSet";
-
-static void _VdbBlastRunSetWhack(VdbBlastRunSet *self) {
-    assert(self);
-
-    STSMSG(1, ("Deleting VdbBlastRunSet(min_read_length=%d, protein=%s)",
-        self->core2na.min_read_length, self->protein ? "true" : "false"));
-
-    VdbBlastMgrRelease(self->mgr);
-
-    _RunSetFini(&self->runs);
-    _Core2naFini(&self->core2na);
-    _Core4naFini(&self->core4na);
-    _Core2naFini(&self->core2naRef);
-    _Core4naFini(&self->core4naRef);
-
-    memset(self, 0, sizeof *self);
-    free(self);
-}
-
-LIB_EXPORT
-VdbBlastRunSet *VdbBlastMgrMakeRunSet(const VdbBlastMgr *cself,
-    VdbBlastStatus *status,
-    uint32_t min_read_length,
-    bool protein)
-{
-    rc_t rc = 0;
-    VdbBlastRunSet *item = NULL;
-    VdbBlastMgr *self = (VdbBlastMgr*)cself;
-
-    VdbBlastStatus dummy = eVdbBlastNoErr;
-    if (status == NULL)
-    {   status = &dummy; }
-
-    *status = eVdbBlastNoErr;
-
-    item = calloc(1, sizeof *item);
-    if (item == NULL) {
-        *status = eVdbBlastMemErr;
-        return item;
-    }
-
-    item->protein = protein;
-
-    item->core2na.min_read_length = min_read_length;
-
-    item->core2naRef.min_read_length = min_read_length;
-
-    item->core4na.min_read_length = min_read_length;
-    item->core4na.mode = VDB_READ_UNALIGNED;
-
-    item->core4naRef.min_read_length = min_read_length;
-    item->core4naRef.mode = VDB_READ_REFERENCE;
-
-    item->minSeqLen = ~0;
-    item->avgSeqLen = ~0;
-    item->maxSeqLen = ~0;
-
-    if (rc == 0) {
-        rc = KLockMake(&item->core2na.mutex);
-        if (rc != 0) {
-            LOGERR(klogInt, rc, "Error in KLockMake");
-        }
-    }
-    if (rc == 0) {
-        rc = KLockMake(&item->core2naRef.mutex);
-        if (rc != 0) {
-            LOGERR(klogInt, rc, "Error in KLockMake");
-        }
-    }
-    if (rc == 0) {
-        rc = KLockMake(&item->core4na.mutex);
-        if (rc != 0) {
-            LOGERR(klogInt, rc, "Error in KLockMake");
-        }
-    }
-    if (rc == 0) {
-        rc = KLockMake(&item->core4naRef.mutex);
-        if (rc != 0) {
-            LOGERR(klogInt, rc, "Error in KLockMake");
-        }
-    }
-    if (rc == 0) {
-        item->mgr = VdbBlastMgrAddRef(self);
-        if (item->mgr) {
-            KRefcountInit(&item->refcount,
-                1, VDB_BLAST_RUN_SET, __func__, "set");
-            STSMSG(1, ("Created VdbBlastRunSet(min_read_length=%d, protein=%s)",
-                min_read_length, protein ? "true" : "false"));
-            return item;
-        }
-    }
-
-    STSMSG(1, ("Error: failed to create VdbBlastRunSet"));
-    _VdbBlastRunSetWhack(item);
-
-    *status = eVdbBlastErr;
-
-    return NULL;
-}
-
-LIB_EXPORT void CC VdbBlastRunSetRelease(VdbBlastRunSet *self) {
-    if (self == NULL) {
-        return;
-    }
-
-    STSMSG(1, ("VdbBlastRunSetRelease"));
-    if (KRefcountDrop(&self->refcount, VDB_BLAST_RUN_SET) != krefWhack)
-    {   return; }
-
-    _VdbBlastRunSetWhack(self);
-}
-
-LIB_EXPORT
-VdbBlastRunSet* CC VdbBlastRunSetAddRef(VdbBlastRunSet *self)
-{
-    if (self == NULL) {
-        STSMSG(1, ("VdbBlastRunSetAddRef(NULL)"));
-        return self;
-    }
-
-    if (KRefcountAdd(&self->refcount, VDB_BLAST_RUN_SET) == krefOkay) {
-        STSMSG(1, ("VdbBlastRunSetAddRef"));
-        return self;
-    }
-
-    STSMSG(1, ("Error: failed to VdbBlastRunSetAddRef"));
-    return NULL;
-}
-
-LIB_EXPORT
-VdbBlastStatus CC VdbBlastRunSetAddRun(VdbBlastRunSet *self,
-    const char *native)
-{
-    rc_t rc = 0;
-    char rundesc[PATH_MAX] = "";
-    VdbBlastStatus status = eVdbBlastNoErr;
-    BTableType type = btpUndefined;
-
-    /* allocated in _VdbBlastMgrFindNOpenSeqTable()
-       in _RunSetAddObj() is assigned to VdbBlastRun::path
-       freed during VdbBlastRun release */
-    char *fullpath = NULL;
-
-    VdbBlastDb *obj = NULL;
-    if (self == NULL || self->mgr == NULL || self->beingRead) {
-        S
-        return eVdbBlastErr;
-    }
-
-    obj = calloc(1, sizeof *obj);
-    if (obj == NULL) {
-        return eVdbBlastMemErr;
-    }
-
-    rc = _VdbBlastMgrNativeToPosix(self->mgr, native, rundesc, sizeof rundesc);
-    if (rc != 0) {
-        S
-        status = eVdbBlastErr;
-    }
-
-    status = _VdbBlastMgrFindNOpenSeqTable(self->mgr,
-        rundesc, &obj->seqTbl, &type, &fullpath, &obj->db);
-    if (status != eVdbBlastNoErr) {
-        S
-        PLOGMSG(klogInfo,
-            (klogInfo, "failed to open $(rundesc)", "rundesc=%s", rundesc));
-    }
-    else {
-        S
-        PLOGMSG(klogInfo,
-            (klogInfo, "opened $(rundesc)", "rundesc=%s", rundesc));
-    }
-
-    if (status == eVdbBlastNoErr && _VTableCSra(obj->seqTbl)) {
-        if (obj->db == NULL) {
-            S
-            status = eVdbBlastErr;
-        }
-        else {
-            status = _VDatabaseOpenAlignmentTable(
-                obj->db, rundesc, &obj->prAlgnTbl);
-        }
-    }
-
-    if (status == eVdbBlastNoErr) {
-        if (_VTableVarReadNum(obj->seqTbl, rundesc)) {
-            self->readIdDesc.varReadN = true;
-            self->readIdDesc.idType   = eFactor10;
-        }
-
-        status = _RunSetAddObj(&self->runs, obj, rundesc, type,
-            NULL, fullpath, self->core2na.min_read_length);
-        S
-    }
-
-    return status;
-}
-
-void _VdbBlastRunSetBeingRead(const VdbBlastRunSet *cself) {
-    uint32_t i = 0;
-    uint32_t runBits = 0;
-    VdbBlastRunSet *self = (VdbBlastRunSet*)cself;
-    EReadIdType idType = eFixedReadN;
-
-    if (self == NULL || self->beingRead) {
-        return;
-    }
-
-    idType = self->readIdDesc.idType;
-    runBits = Bits(self->runs.krun - 1, idType);
-
-    for (i = 0; i < self->runs.krun; ++i) {
-        VdbBlastRun *r = &self->runs.run[i];
-        assert(r);
-        r->rd.readIdDesc.idType = idType;
-        r->rd.readIdDesc.runBits = runBits;
-        r->rd.readIdDesc.varReadN = _VdbBlastRunVarReadNum(r);
-    }
-
-    self->beingRead = true;
-}
-
-LIB_EXPORT
-bool CC VdbBlastRunSetIsProtein(const VdbBlastRunSet *self)
-{
-    if (self == NULL) {
-        STSMSG(1, ("VdbBlastRunSetIsProtein(self=NULL)"));
-        return false;
-    }
-
-    STSMSG(1, (
-        "VdbBlastRunSetIsProtein = %s", self->protein ? "true" : "false"));
-
-    return self->protein;
-}
-
-LIB_EXPORT
-uint64_t CC VdbBlastRunSetGetNumSequences(const VdbBlastRunSet *self,
-    VdbBlastStatus *status)
-{
-    VdbBlastStatus dummy = eVdbBlastNoErr;
-    if (status == NULL)
-    {   status = &dummy; }
-
-    if (self == NULL) {
-        *status = eVdbBlastErr;
-        return 0;
-    }
-
-    _VdbBlastRunSetBeingRead(self);
-
-    return _RunSetGetNumSequences(&self->runs, status);
-}
-
-LIB_EXPORT uint64_t CC VdbBlastRunSetGetNumSequencesApprox(
-    const VdbBlastRunSet *self)
-{
-    uint64_t num = 0;
-    VdbBlastStatus status = eVdbBlastNoErr;
-
-    _VdbBlastRunSetBeingRead(self);
-
-    num = _RunSetGetNumSequencesApprox(&self->runs, &status);
-
-    STSMSG(1, ("VdbBlastRunSetGetNumSequencesApprox=%lu", num));
-
-    return num;
-}
-
-LIB_EXPORT
-uint64_t CC VdbBlastRunSetGetTotalLength(const VdbBlastRunSet *self,
-    VdbBlastStatus *status)
-{
-    VdbBlastStatus dummy = eVdbBlastNoErr;
-    if (status == NULL)
-    {   status = &dummy; }
-
-    if (self == NULL) {
-        *status = eVdbBlastErr;
-        return 0;
-    }
-
-    _VdbBlastRunSetBeingRead(self);
-
-    return _RunSetGetTotalLength(&self->runs, status);
-}
-
-LIB_EXPORT
-uint64_t CC VdbBlastRunSetGetTotalLengthApprox(
-    const VdbBlastRunSet *self)
-{
-    VdbBlastStatus status = eVdbBlastNoErr;
-
-    if (self == NULL) {
-        STSMSG(1, ("VdbBlastRunSetGetTotalLengthApprox(self=NULL)"));
-        return 0;
-    }
-
-    _VdbBlastRunSetBeingRead(self);
-
-    return _RunSetGetTotalLengthApprox(&self->runs, &status);
-}
-
-LIB_EXPORT
-uint64_t CC VdbBlastRunSetGetMinSeqLen(const VdbBlastRunSet *self)
-{
-    if (self->minSeqLen == ~0) {
-        bool empty = true;
-        VdbBlastStatus status = eVdbBlastNoErr;
-        uint64_t res = ~0;
-        uint32_t i = 0;
-        _VdbBlastRunSetBeingRead(self);
-        for (i = 0; i < self->runs.krun; ++i) {
-            VdbBlastRun *run = &self->runs.run[i];
-            assert(run);
-            if (run->type == btpREFSEQ) {
-                uint64_t cand = _VdbBlastRunGetLengthApprox(run, &status);
-                if (status != eVdbBlastNoErr) {
-                    S
-                    return ~0;
-                }
-                if (cand < res && cand >= self->core2na.min_read_length) {
-                    res = cand;
-                }
-            }
-            else {
-                status = _VdbBlastRunFillRunDesc(run);
-                if (status != eVdbBlastNoErr) {
-                    S
-                    return ~0;
-                }
-                if (!run->rd.varReadLen) {
-                    uint8_t read = 0;
-                    assert(run->rd.readType && run->rd.readLen);
-                    for (read = 0; read < run->rd.nReads; ++read) {
-                        if (run->rd.readType[i] & SRA_READ_TYPE_BIOLOGICAL) {
-                            if (run->rd.readLen[i]
-                                == self->core2na.min_read_length)
-                            {
-                                ((VdbBlastRunSet*)self)->minSeqLen
-                                    = self->core2na.min_read_length;
-                                return self->minSeqLen;
-                            }
-                            else if (run->rd.readLen[i]
-                                    > self->core2na.min_read_length
-                                && run->rd.readLen[i] < res)
-                            {
-                                res = run->rd.readLen[i];
-                                empty = false;
-                            }
-                        }
-                    }
-                }
-                else {
-                    res = _VdbBlastRunScan(
-                        run, Min, self->core2na.min_read_length, res, &status);
-                    if (status != eVdbBlastNoErr) {
-                        S
-                        return ~0;
-                    }
-                }
-            }
-        }
-        if (empty && res == ~0) {
-            res = 0;
-        }
-        ((VdbBlastRunSet*)self)->minSeqLen = res;
-    }
-    return self->minSeqLen;
-}
-
-LIB_EXPORT
-uint64_t CC VdbBlastRunSetGetMaxSeqLen(const VdbBlastRunSet *self)
-{
-    if (self->maxSeqLen == ~0) {
-        VdbBlastStatus status = eVdbBlastNoErr;
-        uint64_t res = 0;
-        uint32_t i = 0;
-        _VdbBlastRunSetBeingRead(self);
-        for (i = 0; i < self->runs.krun; ++i) {
-            VdbBlastRun *run = &self->runs.run[i];
-            assert(run);
-            if (run->type == btpREFSEQ) {
-                uint64_t cand = _VdbBlastRunGetLengthApprox(run, &status);
-                if (status != eVdbBlastNoErr) {
-                    S
-                    return ~0;
-                }
-                if (cand > res) {
-                    res = cand;
-                }
-            }
-            else {
-                status = _VdbBlastRunFillRunDesc(run);
-                if (status != eVdbBlastNoErr) {
-                    S
-                    return ~0;
-                }
-                if (!run->rd.varReadLen) {
-                    uint8_t read = 0;
-                    assert(run->rd.readType && run->rd.readLen);
-                    for (read = 0; read < run->rd.nReads; ++read) {
-                        if (run->rd.readType[i] & SRA_READ_TYPE_BIOLOGICAL) {
-                            if (run->rd.readLen[i] > res) {
-                                res = run->rd.readLen[i];
-                            }
-                        }
-                    }
-                }
-                else {
-                    res = _VdbBlastRunScan(
-                        run, Max, -1, res, &status);
-                    if (status != eVdbBlastNoErr) {
-                        S
-                        return ~0;
-                    }
-                }
-            }
-        }
-        ((VdbBlastRunSet*)self)->maxSeqLen = res;
-    }
-    return self->maxSeqLen;
-}
-
-LIB_EXPORT
-uint64_t CC VdbBlastRunSetGetAvgSeqLen(const VdbBlastRunSet *self)
-{
-    uint64_t num = 0;
-
-    if (self == NULL) {
-        STSMSG(1, ("VdbBlastRunSetGetAvgSeqLen(self=NULL)"));
-        return 0;
-    }
-
-    if (self->avgSeqLen == ~0) {
-        uint64_t n = 0;
-        _VdbBlastRunSetBeingRead(self);
-
-        n = VdbBlastRunSetGetNumSequencesApprox(self);
-        if (n != 0) {
-            num = VdbBlastRunSetGetTotalLengthApprox(self) / n;
-        }
-        else {
-            num = n;
-        }
-        ((VdbBlastRunSet*)self)->avgSeqLen = num;
-    }
-
-    STSMSG(1, ("VdbBlastRunSetGetAvgSeqLen = %ld", num));
-    return self->avgSeqLen;
-}
-
-LIB_EXPORT size_t CC VdbBlastRunSetGetName(const VdbBlastRunSet *self,
-    VdbBlastStatus *status, char *name_buffer, size_t bsize)
-{
-    size_t sz = 0;
-
-    VdbBlastStatus dummy = eVdbBlastNoErr;
-    if (status == NULL)
-    {   status = &dummy; }
-
-    *status = eVdbBlastErr;
-
-    if (self == NULL)
-    {   return 0; }
-
-    _VdbBlastRunSetBeingRead(self);
-
-    sz = _RunSetGetName(&self->runs, status, name_buffer, bsize);
-
-    STSMSG(1, ("VdbBlastRunSetGetName = '%.*s'", bsize, name_buffer));
-
-    return sz;
-}
-
-LIB_EXPORT
-time_t CC VdbBlastRunSetLastUpdatedDate(const VdbBlastRunSet *self)
-{
-    _VdbBlastRunSetBeingRead(self);
-    return _NotImplemented(__func__);
-}
-
-LIB_EXPORT
-size_t CC VdbBlastRunSetGetReadName(const VdbBlastRunSet *self,
-    uint64_t read_id, /* 0-based in RunSet */
-    char *name_buffer,
-    size_t bsize)
-{
-    rc_t rc = 0;
-    VdbBlastStatus status = eVdbBlastNoErr;
-    size_t need = 0;
-    size_t num_writ = 0;
-
-    ReadDesc desc;
-    memset(&desc, 0, sizeof desc);
-
-    if (name_buffer && bsize)
-    {   name_buffer[0] = '\0'; }
-
-    if (self == NULL) {
-        STSMSG(1, ("VdbBlastRunSetGetReadName(self=NULL)"));
-        return 0;
-    }
-
-    _VdbBlastRunSetBeingRead(self);
-
-    status = _RunSetFindReadDesc(&self->runs, read_id, &desc);
-    if (status != eVdbBlastNoErr) {
-        STSMSG(1, ("Error: failed to VdbBlastRunSetGetReadName: "
-            "cannot find RunSet ReadDesc"));
-        return 0;
-    }
-
-    assert(desc.run && desc.run->path && desc.run->acc && desc.spot
-        && desc.read);
-
-    if (desc.run->type == btpUndefined) {
-        desc.run->type
-            = _VdbBlastMgrBTableType(self->mgr, desc.run->path);
-        assert(desc.run->type != btpUndefined);
-    }
-    if (desc.run->type == btpWGS) {
-        if (desc.read != 1) {
-            STSMSG(1, ("Error: failed to VdbBlastRunSetGetReadName: "
-                "Unexpected read='%u' for run '%s', spot='%lu'",
-                desc.read, desc.run->path, desc.spot));
-            return 0;
-        }
-        status = _VdbBlastRunGetWgsAccession(
-            desc.run, desc.spot, name_buffer, bsize, &need);
-        if (status != eVdbBlastNoErr)
-        {   need = 0; }
-        return need;
-    }
-    else if (desc.run->type == btpREFSEQ) {
-        rc = string_printf(name_buffer, bsize, &num_writ, "%s", desc.run->acc);
-        if (rc == 0) {
-            S
-            need = num_writ;
-        }
-        else if (GetRCObject(rc) == (enum RCObject)rcBuffer
-            && GetRCState(rc) == rcInsufficient)
-        {
-            size_t size;
-            S
-            need = string_measure(desc.run->acc, &size) + 1;
-        }
-    }
-    else {
-        rc = string_printf(name_buffer, bsize, &num_writ,
-            "%s.%lu.%u", desc.run->acc, desc.spot, desc.read);
-        if (rc == 0) {
-            S
-            need = num_writ;
-        }
-        else if (GetRCObject(rc) == (enum RCObject)rcBuffer
-            && GetRCState(rc) == rcInsufficient)
-        {
-            int i = 0;
-            size_t size;
-            S
-            need = string_measure(desc.run->acc, &size) + 2;
-            i = desc.spot;
-            while (i > 0) {
-                ++need;
-                i /= 10;
-            }
-            i = desc.read;
-            while (i > 0) {
-                ++need;
-                i /= 10;
-            }
-        }
-        else
-        {   LOGERR(klogInt, rc, "Unexpecter error in string_printf"); }
-    }
-
-    STSMSG(1, ("VdbBlastRunSetGetName = '%.*s'", bsize, name_buffer));
-    return need;
-}
-
-LIB_EXPORT uint32_t CC VdbBlastRunSetGetReadId(const VdbBlastRunSet *self,
-    const char *name_buffer, size_t bsize, uint64_t *read_id)
-{
-    VdbBlastStatus status = eVdbBlastNoErr;
-    bool found = false;
-
-    uint64_t result = 0;
-    char *acc = NULL;
-    uint64_t spot = 0;
-    uint32_t read = 0;
-    uint32_t i = ~0;
-    if (self == NULL || name_buffer == NULL || name_buffer[0] == '\0' ||
-        bsize == 0 || read_id == 0)
-    {   return eVdbBlastErr; }
-
-    {
-        size_t n = bsize;
-        const char *end = name_buffer + bsize;
-        char *dot2 = NULL;
-        char *dot1 = memchr(name_buffer, '.', bsize);
-        if (dot1 != NULL) {
-            if (dot1 == name_buffer)
-            {   return eVdbBlastErr; }
-            if (dot1 - name_buffer + 1 >= bsize)
-            {   return eVdbBlastErr; }
-            n -= (dot1 - name_buffer + 1);
-            dot2 = memchr(dot1 + 1, '.', n);
-            if (dot2 != NULL) {
-                if (dot2 - name_buffer + 1 >= bsize)
-                {   return eVdbBlastErr; }
-                acc = string_dup(name_buffer, dot1 - name_buffer + 1);
-                if (acc == NULL)
-                {   return eVdbBlastMemErr; }
-                acc[dot1 - name_buffer] = '\0';
-                while (++dot1 < dot2) {
-                    char c = *dot1;
-                    if (c < '0' || c > '9') {
-                        S
-                        status = eVdbBlastErr;
-                        break;
-                    }
-                    spot = spot * 10 + c - '0';
-                }
-                while (status == eVdbBlastNoErr && ++dot2 < end) {
-                    char c = *dot2;
-                    if (c < '0' || c > '9') {
-                        S
-                        status = eVdbBlastErr;
-                        break;
-                    }
-                    read = read * 10 + c - '0';
-                }
-            }
-            else {
-                acc = malloc(bsize + 1);
-                if (acc == NULL)
-                {   return eVdbBlastMemErr; }
-                string_copy(acc, bsize + 1, name_buffer, bsize);
-                acc[bsize] = '\0';
-            }
-        }
-        else {
-            acc = malloc(bsize + 1);
-            if (acc == NULL)
-            {   return eVdbBlastMemErr; }
-            string_copy(acc, bsize + 1, name_buffer, bsize);
-            acc[bsize] = '\0';
-        }
-    }
-
-    _VdbBlastRunSetBeingRead(self);
-
-    for (i = 0; i < self->runs.krun && status == eVdbBlastNoErr; ++i) {
-        uint64_t id = ~0;
-        VdbBlastRun *run = self->runs.run + i;
-        size_t size;
-        assert(run && run->acc);
-        if (string_measure(run->acc, &size)
-            == string_measure(acc, &size))
-        {
-            if (strcmp(run->acc, acc) == 0) {
-                status = _VdbBlastRunGetReadId(run, acc, spot, read, &id);
-                if (status == eVdbBlastNoErr) {
-                    if (run->rd.readIdDesc.idType == eFixedReadN) {
-                        id += result;
-                    }
-                    *read_id = id;
-                    found = true;
-                }
-                break;
-            }
-        }
-        else if ((string_measure(run->acc, &size) < string_measure(acc, &size))
-            && (run->type == btpWGS)
-            && (memcmp(run->acc, acc, string_measure(run->acc, &size))
-                == 0))
-        {
-            status = _VdbBlastRunGetReadId(run, acc, spot, read, &id);
-            if (status == eVdbBlastNoErr) {
-                if (run->rd.readIdDesc.idType == eFixedReadN) {
-                    result += id;
-                }
-                else {
-                    result = id;
-                }
-                *read_id = result;
-                found = true;
-            }
-            break;
-        }
-        result += _VdbBlastRunGetSequencesAmount(run, &status);
-        if (status != eVdbBlastNoErr) {
-            if (status == eVdbBlastTooExpensive) {
-                status = eVdbBlastNoErr;
-            }
-            else {
-                break;
-            }
-        }
-    }
-
-    if (status == eVdbBlastNoErr && !found) {
-        S
-        status = eVdbBlastErr;
-    }
-
-    free (acc);
-    acc = NULL;
-
-    return status;
-}
-
-/* TODO: make sure
-         ReadLength is correct when there are multiple reads in the same spot */
-LIB_EXPORT
-uint64_t CC VdbBlastRunSetGetReadLength(const VdbBlastRunSet *self,
-    uint64_t read_id)
-{
-    rc_t rc = 0;
-    const VCursor *curs = NULL;
-    uint32_t col_idx = 0;
-    char buffer[84] = "";
-    uint32_t row_len = 0;
-    ReadDesc desc;
-    VdbBlastStatus status = eVdbBlastErr;
-
-    if (self == NULL) {
-        STSMSG(1, ("VdbBlastRunSetGetReadLength(self=NULL)"));
-        return 0;
-    }
-
-    status = _RunSetFindReadDesc(&self->runs, read_id, &desc);
-    if (status != eVdbBlastNoErr) {
-        STSMSG(1, ("Error: failed to VdbBlastRunSetGetReadLength: "
-            "cannot find RunSet ReadDesc"));
-        return 0;
-    }
-    assert(desc.run && desc.spot && desc.run->path);
-
-    _VdbBlastRunSetBeingRead(self);
-
-    if (rc == 0) {
-        rc = _VTableMakeCursor
-            (desc.run->obj->seqTbl, &curs, &col_idx, "READ", desc.run->acc);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc, "Error in _VTableMakeCursor"
-                "$(path), READ)", "path=%s", desc.run->path));
-        }
-    }
-    if (rc == 0) {
-        rc = VCursorReadDirect
-            (curs, desc.spot, col_idx, 8, buffer, sizeof buffer, &row_len);
-        if (rc != 0) {
-            PLOGERR(klogInt, (klogInt, rc, "Error in VCursorReadDirect"
-                "$(path), READ, spot=$(spot))",
-                "path=%s,spot=%ld", desc.run->path, desc.spot));
-        }
-    }
-    VCursorRelease(curs);
-    curs = NULL;
-    if (rc == 0) {
-        STSMSG(1, ("VdbBlastRunSetGetReadLength = %ld", row_len));
-        return row_len;
-    }
-    else {
-        STSMSG(1, ("Error: failed to VdbBlastRunSetGetReadLength"));
-        return 0;
-    }
-}
-
-uint64_t _VdbBlastRunSet2naRead(const VdbBlastRunSet *self,
-    VdbBlastStatus *status, uint64_t *read_id, size_t *starting_base,
-    uint8_t *buffer, size_t buffer_size, KVdbBlastReadMode mode)
-{
-    uint64_t n = 0; 
-    rc_t rc = 0;
-    assert(self && status);
-
-    rc = KLockAcquire(self->core2na.mutex);
-    if (rc != 0) {
-        LOGERR(klogInt, rc, "Error in KLockAcquire");
-    }
-    else {
-        const Core2na *c
-            = mode != VDB_READ_REFERENCE ? &self->core2na : &self->core2naRef;
-        n = _Core2naRead((Core2na*)c, &self->runs, status,
-            read_id, starting_base, buffer, buffer_size);
-        if (n == 0 && self->core2na.eos) {
-            *read_id = ~0;
-        }
-        rc = KLockUnlock(self->core2na.mutex);
-        if (rc != 0) {
-            LOGERR(klogInt, rc, "Error in KLockUnlock");
-        }
-    }
-    if (rc != 0) {
-        *status = eVdbBlastErr;
-    }
-
-    if (*status == eVdbBlastNoErr || *status == eVdbBlastCircularSequence) {
-        if (read_id != NULL && starting_base != NULL) {
-            STSMSG(3, (
-                "VdbBlast2naReaderRead(read_id=%ld, starting_base=%ld) = %ld",
-                *read_id, *starting_base, n));
-        }
-        else {
-            STSMSG(2, ("VdbBlast2naReaderRead = %ld", n));
-        }
-    }
-    else {
-        if (read_id != NULL && starting_base != NULL) {
-            STSMSG(1, ("Error: failed to VdbBlast2naReaderRead(%ld)", n));
-        }
-        else {
-            STSMSG(1, ("Error: failed to VdbBlast2naReaderRead"));
-        }
-    }
-    return n;
-}
-
-/******************************************************************************/
diff --git a/libs/blast/run-set.h b/libs/blast/run-set.h
deleted file mode 100644
index c0317b5..0000000
--- a/libs/blast/run-set.h
+++ /dev/null
@@ -1,312 +0,0 @@
-#ifndef _h_libs_blast_run_set_
-#define _h_libs_blast_run_set_
-
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include "blast-mgr.h" /* BTableType */
-
-#ifndef _h_insdc_insdc_
-#include <insdc/insdc.h> /* INSDC_coord_len */
-#endif
-
-#ifndef _h_insdc_sra_
-#include <insdc/sra.h> /* INSDC_SRA_platform_id */
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h> /* BSTree */
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h> /* KRefcount */
-#endif
-
-#ifndef _h_ncbi_vdb_blast_
-#include <ncbi/vdb-blast.h> /* VdbBlastStatus */
-#endif
-
-#include <stdbool.h> /* bool */
-#include <stddef.h> /* size_t */
-#include <stdint.h> /* uint32_t */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
-    eColTypeError,
-    eColTypeAbsent,
-    eColTypeStatic,
-    eColTypeNonStatic
-} EColType;
-
-typedef enum {
-    eFixedReadN,
-    eFactor10,
-} EReadIdType;
-
-typedef struct {
-    EReadIdType idType;
-    uint32_t runBits;
-    bool varReadN;
-} ReadIdDesc;
-
-typedef struct {
-    uint32_t index;
-
-    uint64_t spotCount;
-    uint32_t spotBits;
-
-    uint8_t nReads;
-    uint8_t nBioReads; /* knowing filtering (if static) and min_read_len info */
-    uint64_t bioLen; /* per read. is assigned just when allStatic */
-    INSDC_SRA_platform_id platform;
-
-    uint64_t bioBaseCount; /* BIO_BASE_COUNT, ~0 if not found */
-    uint64_t cmpBaseCount; /* CMP_BASE_COUNT, ~0 if not found */
-
-    INSDC_read_type *readType;
-    EColType readTypeStatic;
-
-    uint32_t *readLen;
-    EColType readLenStatic;
-
-    uint8_t *rdFilter;
-    EColType rdFilterStatic;
-
-    bool varReadLen;
-    ReadIdDesc readIdDesc;
-} RunDesc;
-
-typedef struct {
-    const struct VDatabase *db;
-
-    const struct VTable *seqTbl;
-    const struct VTable *prAlgnTbl;
-    const struct VTable *refTbl;
-
-    /* WGS */
-    const struct VCursor *cursACCESSION;
-    uint32_t col_ACCESSION;
-
-    /* SRA_PLATFORM_PACBIO_SMRT : variable read number */
-    const struct VCursor *cursSeq;
-    uint32_t col_READ_FILTER;
-    uint32_t col_READ_LEN;
-    uint32_t col_READ_TYPE;
-    uint32_t col_TRIM_LEN;
-    uint32_t col_TRIM_START;
-} VdbBlastDb;
-
-typedef struct {
-    /* rundesc; */
-    char *acc;
-    char *path;
-
-    VdbBlastDb *obj;
-    BTableType type;
-    bool cSra;
-
-   /* bioReads = numSequences = number-of-spots * number-of-bio-reads-in-spot */
-    uint64_t bioReads;
-
-    uint64_t alignments; /* rows number in PRIMARY_ALIGNMENT table */
-
-    bool bioReadsTooExpensive; /* numSequences is TooExpensive */
-    uint64_t bioReadsApprox;   /* numSequencesApprox; */
-
-    uint64_t bioBases;         /* length; */
-    bool bioBasesTooExpensive; /* totalLength is TooExpensive */
-    uint64_t bioBasesApprox;   /* lengthApprox; */
-
-    RunDesc rd;
-
-    uint32_t min_read_length;
-} VdbBlastRun;
-
-typedef struct VdbBlastRef VdbBlastRef;
-typedef struct {
-    VdbBlastRef  *rfd;
-    size_t        rfdk; /* Number of rfd members */
-    size_t        rfdn; /* Allocated rfd members */
-
-    uint64_t  totalLen; /* Total number of bases in reference set.
-                           Base count for circular references is doubled. */
-
-    BSTree tRuns;       /* rundesc-s */
-    BSTree tExtRefs;    /* SEQ_ID-s */
-} RefSet;
-
-void _RefSetFini(RefSet *self);
-
-typedef struct RunSet {
-    VdbBlastRun *run;
-    uint32_t krun; /* number of run-s */
-    uint32_t nrun; /* sizeof of run-s */
-
-    RefSet refs;
-} RunSet;
-
-typedef struct {
-    const VdbBlastRun *prev;
-
-    VdbBlastRun *run;
-
-    uint32_t tableId;
- /* VDB_READ_UNALIGNED, VDB_READ_ALIGNED or VDB_READ_DIRECT */
-
-    uint64_t spot; /* 1-based */
-    uint32_t read; /* 1-based */
-    uint32_t nReads; /* is variable in SRA_PLATFORM_PACBIO_SMRT */
-
-    uint64_t read_id; /* BioReadId in RunSet */
-
-    bool circular;
-               /* we are going to return a circular reference the second time */
-} ReadDesc;
-
-typedef struct {
-    uint32_t col_PRIMARY_ALIGNMENT_ID;
-    uint32_t col_READ_FILTER;
-    uint32_t col_READ_LEN;
-    uint32_t col_TRIM_LEN;
-    uint32_t col_TRIM_START;
-
-    int64_t *primary_alignment_id;
-    uint8_t *read_filter;
-    uint32_t *read_len;
-    INSDC_coord_len TRIM_LEN;
-    INSDC_coord_val TRIM_START;
-
-    uint8_t nReadsAllocated;
-} ReaderCols;
-
-/* cSRA READ mode : is ignored for non-cSRA runs */
-typedef uint32_t KVdbBlastReadMode;
-enum {
-    VDB_READ_UNALIGNED =       1, /* return unaligned reads */
-    VDB_READ_ALIGNED   =       2, /* return aligned reads */
-    VDB_READ_REFERENCE =       3, /* return reference sequence */
-};
-
-struct References;
-
-typedef struct {
-    bool eor;
-    ReadDesc desc;
-    uint32_t col_READ;
-    const struct VCursor *curs;
-    size_t starting_base; /* 0-based, in current read */
-    ReaderCols cols;
-    KVdbBlastReadMode mode;
-    const struct References *refs;
-} Reader2na;
-
-typedef struct Core2na {
-    uint32_t min_read_length;
-    bool hasReader;
-    struct KLock *mutex;
-    uint64_t initial_read_id;
-    uint32_t irun; /* index in RunSet */
-    bool eos;
-    Reader2na reader;
-} Core2na;
-
-typedef struct Core4na {
-    uint32_t min_read_length;
-    struct KLock *mutex;
-    ReadDesc desc;
-    const struct VCursor *curs;
-    const struct VBlob *blob; /* TODO */
-    ReaderCols cols;
-    uint32_t col_READ;
-    KVdbBlastReadMode mode;
-} Core4na;
-
-struct VdbBlastRunSet {
-    KRefcount refcount;
-    bool protein;
-    VdbBlastMgr *mgr;
-
-    RunSet runs;
-
-    bool beingRead;
-    ReadIdDesc readIdDesc;
-
-    Core2na core2na;
-    Core4na core4na;
-
-    Core2na core2naRef;
-    Core4na core4naRef;
-
-    uint64_t minSeqLen;
-    uint64_t avgSeqLen;
-    uint64_t maxSeqLen;
-};
-
-rc_t _VTableMakeCursor(const struct VTable *self, const struct VCursor **curs,
-    uint32_t *col_idx, const char *col_name, const char *acc);
-
-rc_t _ReadDescFindNextRead(ReadDesc *self, bool *found);
-VdbBlastStatus _ReadDescFixReadId(ReadDesc *self);
-
-uint64_t _VdbBlastRunAdjustSequencesAmountForAlignments(VdbBlastRun *self,
-    VdbBlastStatus *status);
-
-#ifdef TEST_VdbBlastRunFillReadDesc
-VDB_EXTERN
-#endif
-uint32_t _VdbBlastRunFillReadDesc(VdbBlastRun *self,
-    uint64_t read_id, ReadDesc *desc);
-
-uint64_t _VdbBlastRunGetNumAlignments(VdbBlastRun *self,
-    VdbBlastStatus *status);
-
-bool _VdbBlastRunVarReadNum(const VdbBlastRun *self);
-
-uint32_t _RunSetFindReadDesc(const struct RunSet *self,
-    uint64_t read_id, ReadDesc *desc);
-
-uint64_t _VdbBlastRunSet2naRead(const VdbBlastRunSet *self,
-    VdbBlastStatus *status, uint64_t *read_id, size_t *starting_base,
-    uint8_t *buffer, size_t buffer_size, KVdbBlastReadMode mode);
-
-void _VdbBlastRunSetBeingRead(const VdbBlastRunSet *self);
-
-VdbBlastStatus _VdbBlastRunSetFindFirstRead
-    (const VdbBlastRunSet *self, uint64_t *read_id, bool useGetFirstRead);
-
-uint64_t _VdbBlastRunSetGetAllReads(const VdbBlastRunSet *self, uint32_t run);
-
-EReadIdType _VdbBlastRunSetGetReadIdType(const VdbBlastRunSet *self);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_libs_blast_run_set_ */
diff --git a/libs/cipher/cipher-1.7/PKG-INFO b/libs/cipher/cipher-1.7/PKG-INFO
deleted file mode 100644
index d875d2c..0000000
--- a/libs/cipher/cipher-1.7/PKG-INFO
+++ /dev/null
@@ -1,13 +0,0 @@
-Metadata-Version: 1.0
-Name: cipher
-Version: 1.7
-Summary: UNKNOWN
-Home-page: UNKNOWN
-Author: sra-toolkit
-Author-email: sra-toolkit at ncbi.nlm.nih.gov
-License: UNKNOWN
-Description: NCBI encryption wrapper for SRA encryption library
-        ==================================================
-        
-        [Documentation](https://dsubmit.ncbi.nlm.nih.gov/docs/cipher/)
-Platform: UNKNOWN
diff --git a/libs/cipher/cipher-1.7/README.md b/libs/cipher/cipher-1.7/README.md
deleted file mode 100644
index 6ed2deb..0000000
--- a/libs/cipher/cipher-1.7/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-NCBI encryption wrapper for SRA encryption library
-==================================================
-
-[Documentation](https://dsubmit.ncbi.nlm.nih.gov/docs/cipher/)
\ No newline at end of file
diff --git a/libs/cipher/cipher-1.7/cipher.egg-info/PKG-INFO b/libs/cipher/cipher-1.7/cipher.egg-info/PKG-INFO
deleted file mode 100644
index 9db8ad0..0000000
--- a/libs/cipher/cipher-1.7/cipher.egg-info/PKG-INFO
+++ /dev/null
@@ -1,13 +0,0 @@
-Metadata-Version: 1.0
-Name: cipher
-Version: 1.7
-Summary: UNKNOWN
-Home-page: UNKNOWN
-Author: sra-toolkit
-Author-email: sra-toolkit at ncbi.nlm.nih.gov
-License: UNKNOWN
-Description: NCBI encryption wrapper for SRA encryption library
-        ==================================================
-        
-        [Documentation](https://dsubmit.ncbi.nlm.nih.gov/docs/cipher/)
-Platform: UNKNOWN
diff --git a/libs/cipher/cipher-1.7/cipher.egg-info/SOURCES.txt b/libs/cipher/cipher-1.7/cipher.egg-info/SOURCES.txt
deleted file mode 100644
index 7464e95..0000000
--- a/libs/cipher/cipher-1.7/cipher.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-decrypt.py
-encrypt.py
-requirements-test.txt
-setup.cfg
-setup.py
-./README.md
-cipher/__init__.py
-cipher.egg-info/PKG-INFO
-cipher.egg-info/SOURCES.txt
-cipher.egg-info/dependency_links.txt
-cipher.egg-info/not-zip-safe
-cipher.egg-info/top_level.txt
\ No newline at end of file
diff --git a/libs/cipher/cipher-1.7/cipher.egg-info/dependency_links.txt b/libs/cipher/cipher-1.7/cipher.egg-info/dependency_links.txt
deleted file mode 100644
index 8b13789..0000000
--- a/libs/cipher/cipher-1.7/cipher.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/libs/cipher/cipher-1.7/cipher.egg-info/not-zip-safe b/libs/cipher/cipher-1.7/cipher.egg-info/not-zip-safe
deleted file mode 100644
index d3f5a12..0000000
--- a/libs/cipher/cipher-1.7/cipher.egg-info/not-zip-safe
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/libs/cipher/cipher-1.7/cipher.egg-info/top_level.txt b/libs/cipher/cipher-1.7/cipher.egg-info/top_level.txt
deleted file mode 100644
index 7c55fd6..0000000
--- a/libs/cipher/cipher-1.7/cipher.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-cipher
diff --git a/libs/cipher/cipher-1.7/cipher/__init__.py b/libs/cipher/cipher-1.7/cipher/__init__.py
deleted file mode 100644
index 0768ceb..0000000
--- a/libs/cipher/cipher-1.7/cipher/__init__.py
+++ /dev/null
@@ -1,393 +0,0 @@
-from ctypes import (c_int, c_char_p, cdll, Structure, c_uint32, ARRAY,
-                    c_char, POINTER, c_size_t, c_void_p, c_uint64, byref,
-                    create_string_buffer, c_uint)
-import platform
-
-import os
-
-
-def check_rc(rc):
-    if rc:
-        raise RuntimeError("bad rc, %d", rc)
-    return 1
-
-def get_lib_name():
-    if platform.system() == "Windows":
-        return "ncbi-vdb.dll"
-    elif platform.system() == "Darwin":
-        return "libncbi-vdb.dylib"
-    else:
-        return "libncbi-vdb.so"
-
-
-_krypto = _kfs = cdll.LoadLibrary( get_lib_name() )
-
-
-class _KKey(Structure):
-    _fields_ = [("type", c_uint32),
-                ("text", ARRAY(c_char, 32))]
-
-
-def errcheck(result, func, args):
-    return check_rc(result)
-
-# setting up declarations for functions
-KKeyInitRead = _krypto.KKeyInitRead
-KKeyInitRead.restype = c_uint
-KKeyInitRead.argtypes = [POINTER(_KKey), c_int, c_char_p, c_size_t]
-KKeyInitRead.errcheck = errcheck
-
-KEncFileMakeRead = _krypto.KEncFileMakeRead
-KEncFileMakeRead.restype = c_uint
-KEncFileMakeRead.argtypes = (POINTER(c_void_p), c_void_p, POINTER(_KKey))
-KEncFileMakeRead.errcheck = errcheck
-
-KEncryptFileMakeRead = _krypto.KEncryptFileMakeRead
-KEncryptFileMakeRead.restype = c_uint
-KEncryptFileMakeRead.argtypes = (POINTER(c_void_p), c_void_p, POINTER(_KKey))
-KEncryptFileMakeRead.errcheck = errcheck
-
-KEncFileMakeUpdate = _krypto.KEncFileMakeUpdate
-KEncFileMakeUpdate.restype = c_uint
-KEncFileMakeUpdate.argtypes = (POINTER(c_void_p), c_void_p, POINTER(_KKey))
-KEncFileMakeUpdate.errcheck = errcheck
-
-KEncFileMakeWrite = _krypto.KEncFileMakeWrite
-KEncFileMakeWrite.restype = c_uint
-KEncFileMakeWrite.argtypes = (POINTER(c_void_p), c_void_p, POINTER(_KKey))
-KEncFileMakeWrite.errcheck = errcheck
-
-KReencFileMakeRead = _krypto.KReencFileMakeRead
-KReencFileMakeRead.restype = c_uint
-KReencFileMakeRead.argtypes = [POINTER(c_void_p), c_void_p, POINTER(_KKey), POINTER(_KKey)]
-KReencFileMakeRead.errcheck = errcheck
-
-KFileMakeFDFileRead = _kfs.KFileMakeFDFileRead
-KFileMakeFDFileRead.restype = c_uint
-KFileMakeFDFileRead.argtypes = [POINTER(c_void_p), c_int]
-KFileMakeFDFileRead.errcheck = errcheck
-
-KFileMakeFDFileWrite = _kfs.KFileMakeFDFileWrite
-KFileMakeFDFileWrite.restype = c_uint
-KFileMakeFDFileWrite.argtypes = [POINTER(c_void_p), c_int, c_int]
-KFileMakeFDFileWrite.errcheck = errcheck
-
-KFileRelease = _kfs.KFileRelease
-KFileRelease.argtypes = [c_void_p]
-
-KFileReadAll = _kfs.KFileReadAll
-KFileReadAll.restype = c_uint
-KFileReadAll.argtypes = [c_void_p, c_uint64, c_void_p, c_size_t, POINTER(c_size_t)]
-KFileReadAll.errcheck = errcheck
-
-KFileWrite = _kfs.KFileWrite
-KFileWrite.restype = c_uint
-KFileWrite.argtypes = [c_void_p, c_uint64, c_char_p, c_size_t, POINTER(c_size_t)]
-KFileWrite.errcheck = errcheck
-
-KFileWriteAll = _kfs.KFileWriteAll
-KFileWriteAll.restype = c_uint
-KFileWriteAll.argtypes = [c_void_p, c_uint64, c_char_p, c_size_t, POINTER(c_size_t)]
-KFileWriteAll.errcheck = errcheck
-
-KFileSize = _kfs.KFileSize
-KFileSize.restype = c_uint
-KFileSize.argtypes = [c_void_p, POINTER(c_uint64)]
-KFileSize.errcheck = errcheck
-
-KFileSetSize = _kfs.KFileSetSize
-KFileSetSize.restype = c_uint
-KFileSetSize.argtypes = [c_void_p, c_uint64]
-KFileSetSize.errcheck = errcheck
-
-_kkeyAES128 = 1
-
-class _KFile(object):
-    def __init__(self):
-        self._kfile = None
-
-    def __dealloc__(self):
-        if self._kfile:
-            KFileRelease(self._kfile)
-
-    def __enter__(self):
-        return self
-
-    def __exit__(self, t, value, traceback):
-        self.close()
-
-    def close(self):
-        if self._kfile:
-            KFileRelease(self._kfile)
-            self._kfile = None
-
-    def write_all(self, buf, offset):
-        """
-        Write `buf` bytes into file at given `offset`
-        :param buf: Byte-string to write.
-        :param offset: Offset position in bytes to start writing at
-        """
-        if not self._kfile:
-            raise ValueError("I/O operation on closed file")
-        written = c_size_t()
-        KFileWriteAll(self._kfile, offset, buf, len(buf), byref(written))
-        return written.value
-
-    def read_all(self, size, offset):
-        """
-        Read `size` bytes from `offset`, might return less than `size` bytes if EOF is reached before.
-
-        :param size: Number of bytes to read
-        :param offset: Offset to start read at
-        :return: A byte-buffer containing read bytes
-        """
-        if not self._kfile:
-            raise ValueError("I/O operation on closed file")
-        read = c_size_t()
-        buf = create_string_buffer(size)
-        KFileReadAll(self._kfile, offset, buf, size, byref(read))
-        # return buf.value[0:read.value]
-        return buf[0:read.value]
-
-    @property
-    def size(self):
-        """ Size of the file in bytes
-        """
-        if not self._kfile:
-            raise ValueError("I/O operation on closed file")
-        sz = c_uint64()
-        KFileSize(self._kfile, byref(sz))
-        return sz.value
-
-
-class _KFileStream(_KFile):
-    def __init__(self):
-        super(_KFileStream, self).__init__()
-        self.pos = 0
-
-    def write(self, buf):
-        """ Write `buf` into current position of the file.
-
-        :param buf: Byte-string to write into file
-        """
-        left = len(buf)
-        total_written = 0
-        while left:
-            written = self.write_all(buf[total_written:], self.pos)
-            self.pos += written
-            total_written += written
-            left -= written
-        return total_written
-
-    def seek(self, pos):
-        """ Sets current position in the file """
-        self.pos = pos
-
-    def read(self, size=-1):
-        """ Read `size` bytes from file
-        """
-        strings = []
-        if not self._kfile:
-            raise ValueError("I/O operation on closed file")
-        if size == -1:
-            strings = []
-            while 1:
-                s = self.read_all(16 * 1024, self.pos)
-                self.pos += len(s)
-                if not s:
-                    break
-                strings.append(s)
-            return b''.join(strings)
-        else:
-            res = self.read_all(size, self.pos)
-            self.pos += len(res)
-            return res
-
-    def truncate(self, size=None):
-        """
-        Truncate file up to current position (default) or up to `size`
-        """
-        if size is None:
-            size = self.pos
-        KFileSetSize(self._kfile, size)
-
-
-class Decryptor(_KFileStream):
-    """
-    Create a read-only file-like object that will decrypt `src_file` using `password`.
-
-    :param password: Byte string with password for decryption.
-    :param src_file: Integer file descriptor of input file.
-    :param close: If true `src_file` will be closed when this object is closed.
-    """
-
-    def __dealloc__(self):
-        if self.src_file:
-            os.close(self.src_file)
-
-    def __init__(self, password, src_file, close=True):
-        super(Decryptor, self).__init__()
-        self.kencfile = c_void_p()
-        self.src_file = src_file
-        self._close = close
-        key = _KKey()
-        kfile = c_void_p()
-        KKeyInitRead(byref(key), _kkeyAES128, password, len(password))
-        KFileMakeFDFileRead(byref(kfile), src_file)
-        kencfile = c_void_p()
-        try:
-            KEncFileMakeRead(byref(kencfile), kfile, byref(key))
-        except:
-            KFileRelease(kfile)
-            raise
-        self._kfile = kencfile
-
-    def close(self):
-        """
-        Releases memory and closes `src_file` if was requested so in constructor.
-        """
-        super(Decryptor, self).close()
-        if self.src_file and self._close:
-            os.close(self.src_file)
-            self.src_file = None
-
-
-class Encryptor(_KFileStream):
-    """
-    Create a file-like object that will encrypt input data and write it into `out_file` file descriptor.
-
-    Call `write` method on this object to write encrypted data into out_file.
-
-    :param password: Byte string with password.
-    :param out_file: Integer file descriptor of output file.
-    :param close: If true `out_file` descriptor will be closed when this object is closed.
-    :param update: If true encrypted file can be appended/modified, otherwise it will be truncated.
-    """
-
-    def __dealloc__(self):
-        if self.src_file and self._close:
-            os.close(self.src_file)
-
-    def __init__(self, password, out_file, close=True, update=False):
-        super(Encryptor, self).__init__()
-        kfile = c_void_p()
-        self.key = _KKey()
-        self.out_file = out_file
-        kencfile = c_void_p()
-        self._close = close
-        KKeyInitRead(byref(self.key), _kkeyAES128, password, len(password))
-        KFileMakeFDFileWrite(byref(kfile), 1 if update else 0, out_file)
-        try:
-            if update:
-                KEncFileMakeUpdate(byref(kencfile), kfile, byref(self.key))
-            else:
-                KEncFileMakeWrite(byref(kencfile), kfile, byref(self.key))
-        except:
-            KFileRelease(kfile)
-            raise
-        self._kfile = kencfile
-
-    def close(self):
-        """ Releases memory and closes `out_file` if was requested so in constructor.
-        """
-        super(Encryptor, self).close()
-        if self.out_file and self._close:
-            os.close(self.out_file)
-            self.out_file = None
-
-    def flush(self):
-        # TODO: implement this
-        pass
-
-
-class Reencryptor(_KFileStream):
-    """
-    Create a read-only file-like object that will decrypt `src_file` using `dec_password` and then
-    encrypt it with `enc_password`.  This objects acts like a decryptor attached to encryptor.
-
-    :param dec_password: Byte-string of decryption password used to decrypt `src_file`.
-    :param enc_password: Byte-string of encryption password used to encrypt returned data.
-    :param src_file: An integer file descriptor of input file, it should have read operation allowed.
-    :param close: If true `src_file` descriptor will be closed when this object is closed.
-    """
-
-    def __init__(self, dec_password, enc_password, src_file, close=True):
-        super(Reencryptor, self).__init__()
-        kfile = c_void_p()
-        dec_key = _KKey()
-        enc_key = _KKey()
-        self.src_file = src_file
-        kencfile = c_void_p()
-        self._close = close
-        KKeyInitRead(byref(dec_key), _kkeyAES128, dec_password, len(dec_password))
-        KKeyInitRead(byref(enc_key), _kkeyAES128, enc_password, len(enc_password))
-        KFileMakeFDFileRead(byref(kfile), src_file)
-        try:
-            KReencFileMakeRead(byref(kencfile), kfile, byref(dec_key), byref(enc_key))
-        except:
-            KFileRelease(kfile)
-            raise
-        self._kfile = kencfile
-
-    def __dealloc__(self):
-        if self.src_file and self._close:
-            os.close(self.src_file)
-
-    def close(self):
-        """
-        Releases memory and closes `src_file` if was requested so in constructor
-        """
-        super(Reencryptor, self).close()
-        if self.src_file and self._close:
-            os.close(self.src_file)
-            self.src_file = None
-
-
-class FDFileReader(_KFileStream):
-    """
-    Deprecated, do not use.  Will be removed in 1.6
-    Create a read-only file-like object that will read `f` file-object
-
-    :param f: Source file-like object, should have `fileno` method.
-    :param close: If true will close `f` when this object is closed
-    """
-
-    def __init__(self, f, close=True):
-        super(FDFileReader, self).__init__()
-        self._f = f
-        kfile = c_void_p()
-        KFileMakeFDFileRead(byref(kfile), f.fileno())
-        self._kfile = kfile
-        self._close = close
-
-    def close(self):
-        super(FDFileReader, self).close()
-        if self._close:
-            self._f.close()
-
-
-class EncryptingReader(_KFileStream):
-    """
-    Create a read-only file-like object that will read and encrypt `src_file` using `password`
-
-    :param src_file: An integer file descriptor to be encrypted.
-    :param password: Byte-string password used to encrypt.
-    :param close: If true `src_file` descriptor will be closed when this object is closed
-    """
-
-    def __init__(self, src_file, password, close=True):
-        enc_key = _KKey()
-        KKeyInitRead(byref(enc_key), _kkeyAES128, password, len(password))
-        kencfile = c_void_p()
-        KEncryptFileMakeRead(byref(kencfile), src_file._kfile, byref(enc_key))
-        self._kfile = kencfile
-        self._close = close
-        self._src_file = src_file
-
-    def close(self):
-        """
-        Releases memory and closes `src_file` if it was requested so in constructor
-        """
-        super(EncryptingReader, self).close()
-        if self._close:
-            self._src_file.close()
diff --git a/libs/cipher/cipher-1.7/decrypt.py b/libs/cipher/cipher-1.7/decrypt.py
deleted file mode 100644
index 6933bf9..0000000
--- a/libs/cipher/cipher-1.7/decrypt.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-import cipher
-import getpass
-from optparse import OptionParser
-import shutil
-import sys
-
-
-if __name__ == '__main__':
-    version = '%prog 1.0'
-    parser = OptionParser(usage='''usage: %prog [options] INFILE OUTFILE
-    Decrypts file''', version=version)
-    parser.add_option('-P', '--password', dest='password', default=None)
-    args, values = parser.parse_args()
-    if len(values) < 2:
-        parser.print_usage()
-        sys.exit(2)
-    in_file, out_file = values
-    if not args.password:
-        args.password = getpass.getpass()
-
-    with open(in_file, 'rb') as in_f:
-        with open(out_file, 'wb') as out_f:
-            dec = cipher.Decryptor(args.password.encode('ascii'), in_f.fileno(), close=False)
-            shutil.copyfileobj(dec, out_f)
diff --git a/libs/cipher/cipher-1.7/encrypt.py b/libs/cipher/cipher-1.7/encrypt.py
deleted file mode 100644
index e9a85f7..0000000
--- a/libs/cipher/cipher-1.7/encrypt.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-import cipher
-import getpass
-from optparse import OptionParser
-import shutil
-import sys
-
-
-if __name__ == '__main__':
-    version = '%prog 1.0'
-    parser = OptionParser(usage='''usage: %prog [options] INFILE OUTFILE
-    Encrypts file''', version=version)
-    parser.add_option('-P', '--password', dest='password', default=None)
-    args, values = parser.parse_args()
-    if len(values) < 2:
-        parser.print_usage()
-        sys.exit(2)
-    in_name, out_file = values
-    if not args.password:
-        args.password = getpass.getpass()
-
-    with open(in_name, 'rb')  as in_f:
-        with open(out_file, 'wb') as out_f:
-            with cipher.Encryptor(args.password.encode('ascii'), out_f.fileno(), close=False, update=False) as enc:
-                shutil.copyfileobj(in_f, enc)
diff --git a/libs/cipher/cipher-1.7/requirements-test.txt b/libs/cipher/cipher-1.7/requirements-test.txt
deleted file mode 100644
index 55af511..0000000
--- a/libs/cipher/cipher-1.7/requirements-test.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-coverage~=3.6
-pytest~=2.7
-teamcity-messages~=1.12
-pytest-gitignore~=1.1
-pytest-cov~=1.8
\ No newline at end of file
diff --git a/libs/cipher/cipher-1.7/setup.cfg b/libs/cipher/cipher-1.7/setup.cfg
deleted file mode 100644
index c3b20c9..0000000
--- a/libs/cipher/cipher-1.7/setup.cfg
+++ /dev/null
@@ -1,16 +0,0 @@
-[metadata]
-name = cipher
-author = sra-toolkit
-author-email = sra-toolkit at ncbi.nlm.nih.gov
-is_pure = false
-
-[files]
-scripts = 
-	decrypt.py
-	encrypt.py
-
-[egg_info]
-tag_build = 
-tag_date = 0
-tag_svn_revision = 0
-
diff --git a/libs/cipher/cipher-1.7/setup.py b/libs/cipher/cipher-1.7/setup.py
deleted file mode 100644
index e67c4fe..0000000
--- a/libs/cipher/cipher-1.7/setup.py
+++ /dev/null
@@ -1,4 +0,0 @@
-from setuptools import setup
-
-
-setup(setup_requires=['packit'], packit=True)
diff --git a/libs/csra2/Makefile b/libs/csra2/Makefile
deleted file mode 100644
index d49e69f..0000000
--- a/libs/csra2/Makefile
+++ /dev/null
@@ -1,87 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: all
-
-TOP ?= $(abspath ../..)
-MODULE = libs/csra2
-
-INT_LIBS = \
-	libcsra2
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-include $(TOP)/build/Makefile.env
-
-RWORKDIR = $(TOP)/$(MODULE)
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-
-all std: makedirs
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# csra2
-#
-$(ILIBDIR)/libcsra2: $(addprefix $(ILIBDIR)/libcsra2.,$(ILIBEXT))
-
-CSRA2_SRC = \
-	blah
-
-CSRA2_OBJ = \
-	$(addsuffix .$(LOBX),$(CSRA2_SRC))
-
-CSRA2_LIB = \
-
-$(ILIBDIR)/libcsra2.$(LIBX): $(CSRA2_OBJ)
-	$(LD) --slib -o $@ $^ $(CSRA2_LIB)
-
-
-#-------------------------------------------------------------------------------
-# white-box test
-#
diff --git a/libs/hdf5/.gitignore b/libs/hdf5/.gitignore
deleted file mode 100644
index 09fa285..0000000
--- a/libs/hdf5/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.vers.h
-*.def
diff --git a/libs/hdf5/Makefile b/libs/hdf5/Makefile
deleted file mode 100644
index c7d3f7d..0000000
--- a/libs/hdf5/Makefile
+++ /dev/null
@@ -1,122 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: all
-
-TOP ?= $(abspath ../..)
-MODULE = libs/hdf5
-
-INT_LIBS = \
-
-EXT_LIBS = \
-	libkdf5
-
-ALL_LIBS = \
-	$(INT_LIBS) \
-	$(EXT_LIBS)
-
-OBJFILES = \
-	$(KDF5_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-ifdef HDF5_INCDIR
-	INCDIRS += $(addprefix -I,$(HDF5_INCDIR))
-endif
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-ifeq (1,$(HAVE_HDF5))
-
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-$(EXT_LIBS): makedirs
-	@ $(MAKE_CMD) $(LIBDIR)/$@
-
-else
-
-all std: $(ALL_LIBS)
-
-$(INT_LIBS):
-	@ echo "NOTE - internal library $(@F) cannot be built:"         \
-	       "It requires 'libhdf5' and its development headers."
-
-$(EXT_LIBS):
-	@ echo "NOTE - library $(@F) cannot be built:"                  \
-	       "It requires 'libhdf5' and its development headers."
-endif
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS)) \
-	$(addprefix $(LIBDIR)/,$(EXT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# hdf5
-#
-$(LIBDIR)/libkdf5: $(addprefix $(LIBDIR)/libkdf5.,$(LIBEXT))
-
-KDF5_SRC = \
-	hdf5dir \
-	hdf5file \
-	hdf5arrayfile
-
-KDF5_OBJ = \
-	$(addsuffix .$(LOBX),$(KDF5_SRC))
-
-KDF5_LIB = \
-	-lhdf5 \
-	-lz \
-
-ifdef HDF5_LIBDIR
-	KDF5_LIB += $(addprefix -L,$(HDF5_LIBDIR))
-endif
-
-$(LIBDIR)/libkdf5.$(SHLX): $(KDF5_OBJ)
-	$(LD) --dlib --vers $(SRCDIR)/../ncbi-vdb/libncbi-vdb.vers -o $@ $^ $(KDF5_LIB)
-
-$(LIBDIR)/libkdf5.$(LIBX): $(KDF5_OBJ)
-	$(LD) --slib --vers $(SRCDIR)/../ncbi-vdb/libncbi-vdb.vers -o $@ $^ $(KDF5_LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/hdf5/hdf5arrayfile-priv.h b/libs/hdf5/hdf5arrayfile-priv.h
deleted file mode 100644
index 00a2cd7..0000000
--- a/libs/hdf5/hdf5arrayfile-priv.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_hdf5arrayfile_priv_
-#define _h_hdf5arrayfile_priv_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _h_kfs_extern_
-#include <kfs/extern.h>
-#endif
-
-#ifndef _h_kfs_impl_
-#include <kfs/impl.h>
-#endif
-
-#ifndef _HDF5_H
-#include <hdf5.h>
-#endif
-
-/* object structure */
-struct HDF5ArrayFile
-{
-    KArrayFile dad;
-
-    KFile * parent;
-    /* the handle of the dataset, equivalent of the file-handle
-       opened in  */
-    hid_t dataset_handle;
-
-    /* the handle of the datatype of the elemens */
-    hid_t datatype_handle;
-    /* the enum of the datatype-class */
-    H5T_class_t datatype_class;
-    /* the actual size in bytes of the datatype */
-    size_t element_size;
-
-    /* the handle of the table-layout of the data in this dataset */
-    hid_t dataspace_handle;
-    uint8_t dimensionality;
-    hsize_t * extents;
-    uint64_t total_elements;
-    uint64_t total_bytes;
-
-    /* the handle of the buffer-layout of the dest. buffer */
-    hid_t dst_dataspace_handle;
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_hdf5arrayfile_priv_ */
\ No newline at end of file
diff --git a/libs/hdf5/hdf5arrayfile.c b/libs/hdf5/hdf5arrayfile.c
deleted file mode 100644
index 61d2f81..0000000
--- a/libs/hdf5/hdf5arrayfile.c
+++ /dev/null
@@ -1,656 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-typedef struct HDF5ArrayFile HDF5ArrayFile;
-#define KARRAYFILE_IMPL HDF5ArrayFile
-
-#include "hdf5arrayfile-priv.h"
-
-#include <klib/rc.h>
-#include <klib/namelist.h>
-#include <klib/text.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-static
-rc_t HDF5ArrayFile_open ( HDF5ArrayFile * self, hid_t dataset_handle )
-{
-    rc_t rc = 0;
-
-    self -> dataset_handle = dataset_handle;
-
-    /* take care of the datatype */
-    self->datatype_handle = H5Dget_type( self->dataset_handle );
-    if ( self->datatype_handle < 0 )
-        return RC( rcFS, rcFile, rcOpening, rcData, rcInvalid );
-    self->datatype_class = H5Tget_class( self->datatype_handle );
-    if ( self->datatype_class == H5T_NO_CLASS )
-        rc = RC( rcFS, rcFile, rcOpening, rcData, rcInvalid );
-    else
-    {
-        self->element_size  = H5Tget_size( self->datatype_handle );
-        if ( self->element_size == 0 )
-            rc = RC( rcFS, rcFile, rcOpening, rcData, rcInvalid );
-    }
-    if ( rc != 0 )
-    {
-        H5Tclose( self->datatype_handle );
-        return rc;
-    }
-
-    /* detect the dimensions ( dataspace ) */
-    self->dataspace_handle = H5Dget_space( self->dataset_handle );
-    if ( self->dataspace_handle < 0 )
-        return RC( rcFS, rcFile, rcOpening, rcData, rcInvalid );
-    self->dimensionality = H5Sget_simple_extent_ndims( self->dataspace_handle );
-    if ( self->dimensionality < 1 )
-        rc = RC( rcFS, rcFile, rcOpening, rcData, rcInvalid );
-    else
-    {
-        self->extents = malloc( sizeof( hsize_t ) * self->dimensionality );
-        if ( self->extents == NULL )
-            rc = RC( rcFS, rcFile, rcOpening, rcMemory, rcExhausted );
-        else
-        {
-            int h5res = H5Sget_simple_extent_dims( self->dataspace_handle, self->extents, NULL );
-            if ( h5res < 0 )
-                rc = RC( rcFS, rcFile, rcOpening, rcData, rcInvalid );
-            else
-            {
-                int i;
-                self->total_elements = self->extents[ 0 ];
-                for ( i = 1; i < self->dimensionality; ++i )
-                    self->total_elements *= self->extents[ i ];
-                self->total_bytes = self->total_elements * self->element_size;
-            }
-            if ( rc != 0 )
-                free( self->extents );
-        }
-    }
-
-    if ( rc != 0 )
-        H5Dclose( self->dataspace_handle );
-    return rc;
-}
-
-
-static
-rc_t HDF5ArrayFile_close ( HDF5ArrayFile * self )
-{
-    if ( self->extents != NULL )
-        free( self->extents );
-    if ( self->datatype_handle >= 0 )
-        H5Tclose( self->datatype_handle );
-    if ( self->dataspace_handle >= 0 )
-        H5Sclose( self->dataspace_handle );
-    if ( self->dataset_handle >= 0 )
-        H5Dclose( self->dataset_handle );
-    return 0;
-}
-
-
-
-/* Destroy
- */
-static
-rc_t CC HDF5ArrayFileDestroy ( HDF5ArrayFile *self )
-{
-    HDF5ArrayFile_close ( self );
-    free ( self );
-    return 0;
-}
-
-
-/* Dimensionality
- *  returns the number of dimensions in the ArrayFile
- *
- *  "dim" [ OUT ] - return parameter for number of dimensions
- */
-static
-rc_t CC HDF5ArrayFileDimensionality ( const HDF5ArrayFile *self, uint8_t *dim )
-{
-    *dim = self->dimensionality;
-    return 0;
-}
-
-
-/* SetDimensionality
- *  sets the number of dimensions in the ArrayFile
- *
- *  "dim" [ IN ] - new number of dimensions; must be > 0
- */
-static
-rc_t CC HDF5ArrayFileSetDimensionality ( HDF5ArrayFile *self, uint8_t dim )
-{
-    self->dimensionality = dim;
-    return 0;
-}
-
-
-/* DimExtents
- *  returns the extent of every dimension
- *
- *  "dim" [ IN ] - the dimensionality of "extents"
- *
- *  "extents" [ OUT ] - returns the extent for every dimension
- */
-static
-rc_t CC HDF5ArrayFileDimExtents ( const HDF5ArrayFile *self, uint8_t dim, uint64_t *extents )
-{
-    uint8_t i;
-
-    if ( dim != self->dimensionality )
-        return RC( rcFS, rcFile, rcAccessing, rcParam, rcInvalid );
-    for ( i = 0; i < dim; ++i )
-        extents[ i ] = (uint64_t) self->extents[ i ];
-    return 0;
-}
-
-
-/* SetDimExtents
- *  sets the new extents for every dimension
- *
- *  "dim" [ IN ] - the dimensionality of "extents"
- *
- *  "extents" [ IN ] - new extents for every dimension
- */
-static
-rc_t CC HDF5ArrayFileSetDimExtents ( HDF5ArrayFile *self, uint8_t dim, uint64_t *extents )
-{
-    uint8_t i;
-
-    if ( dim != self->dimensionality )
-        return RC( rcFS, rcFile, rcResizing, rcParam, rcInvalid );
-    for ( i = 0; i < dim; ++i )
-        self->extents[ i ] = (hsize_t) extents[ i ];
-    return 0;
-}
-
-
-/* ElementSize
- *  returns the element size in bits
- *
- *  "elem_bits" [ OUT ] - size of each element in bits
- */
-static
-rc_t CC HDF5ArrayFileElementSize ( const HDF5ArrayFile *self, uint64_t *elem_bits )
-{
-    *elem_bits = ( self->element_size * 8 );
-    return 0;
-}
-
-
-static
-rc_t HDF5ArrayMakeRdWrOfsCnt( uint8_t dim, 
-                              const uint64_t *pos, const uint64_t *elem_count,
-                              hsize_t **ofs, hsize_t **cnt )
-{
-    uint8_t i;
-
-    *ofs = malloc( sizeof ( hsize_t ) * dim );
-    if ( *ofs == NULL )
-        return RC( rcFS, rcFile, rcReading, rcMemory, rcExhausted );
-    *cnt = malloc( sizeof ( hsize_t ) * dim );
-    if ( *cnt == NULL )
-    {
-        free( *ofs );
-        return RC( rcFS, rcFile, rcReading, rcMemory, rcExhausted );
-    }
-    for ( i = 0; i < dim; ++i )
-    {
-        (*ofs)[ i ] = (hsize_t)pos[ i ];
-        (*cnt)[ i ] = (hsize_t)elem_count[ i ];
-    }
-    return 0;
-}
-
-
-static
-hsize_t HDF5ArrayCalcTotal( const uint8_t dim, const hsize_t *count )
-{
-    uint8_t i;
-    hsize_t res = count[ 0 ];
-    for ( i = 1; i < dim; ++i )
-        res *= count[ i ];
-    return res;
-}
-
-
-static
-rc_t HDF5ArrayFileRead_intern ( const HDF5ArrayFile *self,
-    const hsize_t *ofs, void *buffer, const hsize_t *count )
-{
-    rc_t rc = 0;
-    herr_t status;
-
-    /* first we select a hyperslab in the source-dataspace */
-    status = H5Sselect_hyperslab( self->dataspace_handle, 
-                H5S_SELECT_SET, ofs, NULL, count, NULL );
-    if ( status < 0 )
-        rc = RC( rcFS, rcFile, rcReading, rcTransfer, rcInvalid );
-    else
-    {
-        /* calculate how many data-elements to read total */
-        hsize_t total = HDF5ArrayCalcTotal( self->dimensionality, count );
-        if ( total < 1 )
-            rc = RC( rcFS, rcFile, rcReading, rcParam, rcInvalid );
-        else
-        {
-            /* then we create a temp. dst-dataspace */
-            hid_t dst_space = H5Screate_simple( 1, &total, NULL );
-            if ( dst_space < 0 )
-                rc = RC( rcFS, rcFile, rcReading, rcTransfer, rcInvalid );
-            else
-            {
-                hid_t native_type = H5Tget_native_type( self->datatype_handle, H5T_DIR_ASCEND );
-                status = H5Dread( self->dataset_handle,   /* src dataset */
-                                  native_type,            /* discovered datatype */
-                                  dst_space,              /* temp. 1D dataspace */
-                                  self->dataspace_handle, /* src dataspace */
-                                  H5P_DEFAULT,            /* default transfer property list */
-                                  buffer );               /* dst-buffer */
-                if ( status < 0 )
-                    rc = RC( rcFS, rcFile, rcReading, rcTransfer, rcInvalid );
-
-                H5Tclose( native_type );
-                H5Sclose( dst_space );
-            }
-        }
-    }
-    return rc;
-}
-
-/* Read
- *  read from n-dimensional position
- *
- *  "dim" [ IN ] - the dimensionality of all vectors
- *
- *  "pos"  [ IN ] - n-dimensional starting position in elements
- *
- *  "buffer" [ OUT ] and "elem_count" [ IN ] - return buffer for read
- *  where "elem_count" is n-dimensional in elements
- *
- *  "num_read" [ OUT ] - n-dimensional return parameter giving back
- *      the number of read elements in every dimension
- */
-static
-rc_t CC HDF5ArrayFileRead ( const HDF5ArrayFile *self, uint8_t dim,
-    const uint64_t *pos, void *buffer, const uint64_t *elem_count,
-    uint64_t *num_read )
-{
-    rc_t rc;
-    hsize_t * hf_ofs;
-    hsize_t * hf_count;
-
-    if ( dim != self->dimensionality )
-        return RC( rcFS, rcFile, rcReading, rcParam, rcInvalid );
-
-    rc = HDF5ArrayMakeRdWrOfsCnt( dim, pos, elem_count, &hf_ofs, &hf_count );
-    if ( rc != 0 )
-        return rc;
-
-    rc = HDF5ArrayFileRead_intern ( self, hf_ofs, buffer, hf_count );
-    if ( rc == 0 )
-    {
-        uint8_t i;
-        for ( i = 0; i < dim; ++i )
-            num_read[ i ] = elem_count[ i ];
-    }
-
-    free( hf_count );
-    free( hf_ofs );
-
-    return rc;
-}
-
-
-static
-rc_t HDF5ArrayFileRead_v_intern ( const HDF5ArrayFile *self, uint8_t dim,
-    const hsize_t *ofs, char * buffer, const uint64_t buffer_size, uint64_t * num_read )
-{
-    rc_t rc = 0;
-
-    hsize_t * hf_count = malloc( sizeof ( hsize_t ) * dim );
-    if ( hf_count == NULL )
-        return RC( rcFS, rcFile, rcReading, rcMemory, rcExhausted );
-    else
-    {
-        herr_t status;
-        uint8_t i;
-
-        for ( i = 0; i < dim; ++i ) hf_count[ i ] = 1;
-
-        /* first we select a hyperslab in the source-dataspace */
-        status = H5Sselect_hyperslab( self->dataspace_handle, 
-                    H5S_SELECT_SET, ofs, NULL, hf_count, NULL );
-        if ( status < 0 )
-            rc = RC( rcFS, rcFile, rcReading, rcTransfer, rcInvalid );
-        else
-        {
-            /* calculate how many data-elements to read total */
-            hsize_t total = HDF5ArrayCalcTotal( self->dimensionality, hf_count );
-            if ( total < 1 )
-                rc = RC( rcFS, rcFile, rcReading, rcParam, rcInvalid );
-            else
-            {
-                /* then we create a temp. dst-dataspace */
-                hid_t dst_space = H5Screate_simple( 1, &total, NULL );
-                if ( dst_space < 0 )
-                    rc = RC( rcFS, rcFile, rcReading, rcTransfer, rcInvalid );
-                else
-                {
-                    hid_t memtype = H5Tcopy ( H5T_C_S1 );
-                    status = H5Tset_size ( memtype, H5T_VARIABLE );
-                    if ( status < 0 )
-                        rc = RC( rcFS, rcFile, rcReading, rcTransfer, rcInvalid );
-                    else
-                    {
-                        char * rdata[ 1 ];
-                        status = H5Dread ( self->dataset_handle, memtype, dst_space,
-                                           self->dataspace_handle, H5P_DEFAULT, rdata );
-                        if ( status < 0 )
-                            rc = RC( rcFS, rcFile, rcReading, rcTransfer, rcInvalid );
-                        else
-                        {
-                            uint32_t len = string_size ( rdata[ 0 ] );
-                            *num_read = string_copy ( buffer, buffer_size, rdata[ 0 ], len );
-                        }
-                        H5Dvlen_reclaim ( memtype, dst_space, H5P_DEFAULT, rdata );
-                    }
-                    H5Tclose( memtype );
-                    H5Sclose( dst_space );
-                }
-            }
-        }
-        free( hf_count );
-    }
-    return rc;
-}
-
-
-/* Read_v
- *  reads ONE element from n-dimensional position, but the element is of variable length
- *
- *  "dim" [ IN ] - the dimensionality of all vectors
- *
- *  "pos"  [ IN ] - n-dimensional starting position in elements
- *
- *  "buffer" [ OUT ] and "elem_count" [ IN ] - return buffer for read
- *  where "buffer_size" is the size of the buffer
- *
- *  "num_read" [ OUT ] - return parameter giving back the variable length of the one
- *    element
- */
-static
-rc_t CC HDF5ArrayFileRead_v ( const HDF5ArrayFile *self, uint8_t dim,
-    const uint64_t *pos, char * buffer, const uint64_t buffer_size,
-    uint64_t *num_read )
-{
-    rc_t rc = 0;
-    hsize_t * hf_ofs;
-    uint8_t i;
-
-    if ( dim != self->dimensionality )
-        return RC( rcFS, rcFile, rcReading, rcParam, rcInvalid );
-
-    *num_read = 0;
-    hf_ofs = malloc( sizeof ( hsize_t ) * dim );
-    if ( hf_ofs == NULL )
-        return RC( rcFS, rcFile, rcReading, rcMemory, rcExhausted );
-
-    for ( i = 0; i < dim; ++i )
-        hf_ofs[ i ] = ( hsize_t )pos[ i ];
-
-    rc = HDF5ArrayFileRead_v_intern ( self, dim, hf_ofs, buffer, buffer_size, num_read );
-
-    free( hf_ofs );
-
-    return rc;
-}
-
-
-static
-rc_t HDF5ArrayFileWrite_intern ( const HDF5ArrayFile *self,
-    const hsize_t *ofs, const void *buffer, const hsize_t *count )
-{
-    rc_t rc = 0;
-    herr_t status;
-
-    /* first we select a hyperslab in the source-dataspace */
-    status = H5Sselect_hyperslab( self->dataspace_handle, 
-                H5S_SELECT_SET, ofs, NULL, count, NULL );
-    if ( status < 0 )
-        rc = RC( rcFS, rcFile, rcWriting, rcTransfer, rcInvalid );
-    else
-    {
-        /* calculate how many data-elements to write total */
-        hsize_t total = HDF5ArrayCalcTotal( self->dimensionality, count );
-        if ( total < 1 )
-            rc = RC( rcFS, rcFile, rcWriting, rcParam, rcInvalid );
-        else
-        {
-            /* then we create a temp. dst-dataspace */
-            hid_t src_space = H5Screate_simple( 1, &total, NULL );
-            if ( src_space < 0 )
-                rc = RC( rcFS, rcFile, rcWriting, rcTransfer, rcInvalid );
-            else
-            {
-                status = H5Dwrite( self->dataset_handle,   /* src dataset */
-                                   self->datatype_handle,  /* discovered datatype */
-                                   src_space,              /* temp. 1D dataspace */
-                                   self->dataspace_handle, /* src dataspace */
-                                   H5P_DEFAULT,            /* default transfer property list */
-                                   buffer );               /* dst-buffer */
-                if ( status < 0 )
-                    rc = RC( rcFS, rcFile, rcWriting, rcTransfer, rcInvalid );
-                H5Sclose( src_space );
-            }
-        }
-    }
-    return rc;
-}
-
-
-/* Write
- *  write into n-dimensional position
- *
- *  "dim" [ IN ] - the dimensionality of all vectors
- *
- *  "pos"  [ IN ] - n-dimensional offset where to write to
- *                   in elements
- *
- *  "buffer" [ IN ] and "elem_count" [ IN ] - data to be written
- *  where "elem_count" is n-dimensional in elements
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of elements actually written per dimension
- */
-static
-rc_t CC HDF5ArrayFileWrite ( HDF5ArrayFile *self, uint8_t dim,
-    const uint64_t *pos, const void *buffer, const uint64_t *elem_count,
-    uint64_t *num_writ )
-{
-    rc_t rc;
-    hsize_t * hf_ofs;
-    hsize_t * hf_count;
-
-    if ( dim != self->dimensionality )
-        return RC( rcFS, rcFile, rcReading, rcParam, rcInvalid );
-
-    rc = HDF5ArrayMakeRdWrOfsCnt( dim, pos, elem_count, &hf_ofs, &hf_count );
-    if ( rc != 0 )
-        return rc;
-    rc = HDF5ArrayFileWrite_intern ( self, hf_ofs, buffer, hf_count );
-    if ( rc == 0 )
-    {
-        uint8_t i;
-        for ( i = 0; i < dim; ++i )
-            num_writ[ i ] = elem_count[ i ];
-    }
-    free( hf_count );
-    free( hf_ofs );
-    return rc;
-}
-
-
-
-/* GetMeta
- *  extracts metadata into a string-vector
- *
- *  "key"   [ IN ]  - the key which part of the metadata to retrieve
- *
- *  "list"  [ OUT ] - the metadata will be filled into this list
- *
- */
-static
-rc_t CC HDF5ArrayFileGetMeta ( const HDF5ArrayFile *self, const char *key,
-    const KNamelist **list )
-{
-    rc_t rc;
-    hid_t attr = H5Aopen_by_name( self->dataset_handle, ".", key, H5P_DEFAULT, H5P_DEFAULT );
-    if ( attr < 0 )
-        rc = RC( rcFS, rcFile, rcReading, rcTransfer, rcInvalid );
-    else
-    {
-        hid_t datatype = H5Aget_type( attr );
-        if ( datatype < 0 )
-            rc = RC( rcFS, rcFile, rcReading, rcTransfer, rcInvalid );
-        else
-        {
-            hid_t space = H5Aget_space( attr );
-            if ( space < 0 )
-                rc = RC( rcFS, rcFile, rcReading, rcTransfer, rcInvalid );
-            else
-            {
-                hsize_t dims[1];
-                char ** rdata;
-                H5Sget_simple_extent_dims( space, dims, NULL );
-                rdata = ( char ** )malloc( dims[0] * sizeof( char *) );
-                if ( rdata == NULL )
-                    rc = RC( rcFS, rcFile, rcOpening, rcMemory, rcExhausted );
-                else
-                {
-                    hid_t memtype = H5Tcopy( H5T_C_S1 );
-                    if ( memtype < 0 )
-                        rc = RC( rcFS, rcFile, rcReading, rcTransfer, rcInvalid );
-                    else
-                    {
-                        herr_t status = H5Tset_size( memtype, H5T_VARIABLE );
-                        if ( status < 0 )
-                            rc = RC( rcFS, rcFile, rcReading, rcTransfer, rcInvalid );
-                        else
-                        {
-                            status = H5Aread( attr, memtype, rdata );
-                            if ( status < 0 )
-                                rc = RC( rcFS, rcFile, rcReading, rcTransfer, rcInvalid );
-                            else
-                            {
-                                VNamelist *names;
-                                rc = VNamelistMake ( &names, 5 );
-                                if ( rc == 0 )
-                                {
-                                    int i;
-                                    for ( i = 0; i < dims[0]; ++i )
-                                        VNamelistAppend ( names, rdata[i] );
-                                    rc = VNamelistToConstNamelist ( names, list );
-                                    VNamelistRelease ( names );
-                                }
-                            }
-                        }
-                        H5Dvlen_reclaim( memtype, space, H5P_DEFAULT, rdata );
-                        H5Tclose( memtype );
-                    }
-                    free( rdata );
-                }
-                H5Sclose( space );
-            }
-            H5Tclose( datatype );
-        }
-        H5Aclose( attr );
-    }
-    return rc;
-}
-
-
-static KArrayFile_vt_v1 vtHDF5ArrayFile =
-{
-    /* version 1.0 */
-    1, 0,
-
-    /* start minor version 0 methods */
-    HDF5ArrayFileDestroy,
-    HDF5ArrayFileDimensionality,
-    HDF5ArrayFileSetDimensionality,
-    HDF5ArrayFileDimExtents,
-    HDF5ArrayFileSetDimExtents,
-    HDF5ArrayFileElementSize,
-    HDF5ArrayFileRead,
-    HDF5ArrayFileWrite,
-    HDF5ArrayFileGetMeta,
-    HDF5ArrayFileRead_v
-    /* end minor version 0 methods */
-
-};
-
-
-/* not static because imported by hdf5file.c via forward decl. */
-rc_t HDF5ArrayFileMake ( struct HDF5ArrayFile **fp,
-        KFile * parent, hid_t dataset_handle,
-        bool read_enabled, bool write_enabled )
-{
-    rc_t rc;
-    HDF5ArrayFile *f;
-
-    if ( fp == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcSelf, rcNull );
-    *fp = NULL;
-
-    if ( parent == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-
-    f = malloc ( sizeof *f );
-    if ( f == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-
-    rc = KArrayFileInit ( & f -> dad, ( const KArrayFile_vt * )&vtHDF5ArrayFile, 
-                          read_enabled, write_enabled );
-    if ( rc == 0 )
-    {
-        f -> parent = parent;
-        rc = HDF5ArrayFile_open ( f, dataset_handle );
-        if ( rc == 0 )
-        {
-            * fp = f;
-            return 0;
-        }
-    }
-    free ( f );
-    return rc;
-
-}
\ No newline at end of file
diff --git a/libs/hdf5/hdf5dir.c b/libs/hdf5/hdf5dir.c
deleted file mode 100644
index c9d187d..0000000
--- a/libs/hdf5/hdf5dir.c
+++ /dev/null
@@ -1,879 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-typedef struct HDF5Dir HDF5Dir;
-#define KDIR_IMPL HDF5Dir
-
-#define H5Gopen_vers 2
-#define H5Eset_auto_vers 2
-
-#include <kfs/extern.h> /* may need to be changed */
-#include <kfs/impl.h>
-#include <hdf5.h>
-#include <klib/rc.h>
-#include <klib/namelist.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/out.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <stdarg.h>
-
-
-#if 0 /* These directives merely serve to limit portability. */
-#define _XOPEN_SOURCE 600
-#include <fcntl.h>
-#include <linux/fadvise.h>
-#include <dirent.h>
-#endif
-
-typedef struct HDF5File HDF5File;
-
-/* import of HDF5FileMake from hdf5file.c */
-rc_t CC HDF5FileMake ( HDF5File **fp, hid_t dataset_handle,
-        bool read_enabled, bool write_enabled );
-
-/* object structure */
-struct HDF5Dir
-{
-    KDirectory dad;
-
-    /* extend here */
-    KDirectory *parent;
-    hid_t hdf5_handle;
-    hid_t file_access_property_list;
-    bool h5root;
-
-    uint32_t root;
-    uint32_t size;
-    char path [ PATH_MAX ];
-};
-
-
-/* KSysDirMake
- *  allocate an uninialized object
- */
-static
-HDF5Dir * HDF5DirMake ( size_t path_size )
-{
-    HDF5Dir *dir = malloc ( ( sizeof * dir - sizeof dir -> path + 2 ) + path_size );
-    return dir;
-}
-
-
-/* forward decl. because the real function has to be placed after the vt */
-static
-rc_t HDF5DirInit ( HDF5Dir *self, enum RCContext ctx, uint32_t dad_root,
-    const char *path, uint32_t path_size, bool update, bool chroot );
-
-static
-uint32_t CC HDF5DirPathType ( const HDF5Dir *self,
-    const char *path, va_list args );
-
-
-/* Destroy
- */
-static
-rc_t CC HDF5DirDestroy ( HDF5Dir *self )
-{
-    KDirectoryRelease ( ( KDirectory* ) self -> parent );
-    if ( self->h5root )
-    {
-        H5Fclose( self->hdf5_handle );
-        H5Pclose( self->file_access_property_list );
-    }
-    else
-        H5Oclose( self->hdf5_handle );
-    free( self );
-    return 0;
-}
-
-
-/* callback context to be passed to the hdf5-callback-function */
-struct dir_list_cb_ctx
-{
-    VNamelist *groups;
-    const HDF5Dir *dir;
-    bool ( CC * f ) ( const KDirectory *dir, const char *name, void *data );
-    void * data;
-};
-
-
-/* callback function to be passed into "H5Literate" */
-static
-herr_t dir_list_cb( hid_t loc_id, const char * name,
-                    const H5L_info_t * linfo, void * data )
-{
-    struct dir_list_cb_ctx * ctx = ( struct dir_list_cb_ctx * )data;
-
-    /* avoid compiler warnings */
-    loc_id = loc_id;
-    linfo = linfo;
-
-    if ( ctx != NULL && ctx->groups != NULL )
-    {
-        if ( ctx->f != NULL )
-        {
-            if ( ctx->f( &(ctx->dir->dad), name, ctx->data ) )
-                VNamelistAppend ( ctx->groups, name );
-        }
-        else
-            VNamelistAppend ( ctx->groups, name );
-    }
-    return 0;
-}
-
-/* List
- *  create a directory listing
- *
- *  "list" [ OUT ] - return parameter for list object
- *
- *  "f" [ IN, NULL OKAY ] and "data" [ IN, OPAQUE ] - optional
- *  filter function to execute on each path. receives a base directory
- *  and relative path for each entry. if "f" returns true, the name will
- *  be added to the list.
- *
- *  "path" [ IN, NULL OKAY ] - optional parameter for target
- *  directory. if NULL, interpreted to mean "."
- */
-static
-rc_t CC HDF5DirList ( const HDF5Dir *self, struct KNamelist **list,
-    bool ( CC * f ) ( const KDirectory *dir, const char *name, void *data ),
-    void *data, const char *path, va_list args )
-{
-    rc_t rc;
-    if ( path[0] == '.' && path[1] == 0 )
-    {
-        struct dir_list_cb_ctx ctx;
-        rc = VNamelistMake ( &ctx.groups, 5 );
-        if ( rc == 0 )
-        {
-            ctx.dir = self;
-            ctx.f = f;
-            ctx.data = data;
-            H5Literate( self->hdf5_handle, H5_INDEX_NAME, H5_ITER_INC,
-                        NULL, dir_list_cb, &ctx );
-            rc = VNamelistToNamelist ( ctx.groups, list );
-            VNamelistRelease ( ctx.groups );
-        }
-    }
-    else
-    {
-        const KDirectory *sub;
-        rc = KDirectoryVOpenDirRead ( &self->dad, &sub, false, path, args );
-        if ( rc == 0 )
-        {
-            rc = KDirectoryList( sub, list, f, data, "." );
-            KDirectoryRelease( sub );
-        }
-    }
-    return rc;
-}
-
-
-static
-rc_t HDF5DirVisitcb( const HDF5Dir *self,
-    rc_t ( CC * f ) ( const KDirectory *dir, uint32_t type, const char *name, void *data ),
-    const uint32_t type, const char * name, void * data )
-{
-    int status;
-    char buffer[ PATH_MAX ];
-
-    if ( self->h5root )
-        status = snprintf ( buffer, sizeof buffer, "/%s", name );
-    else
-        status = snprintf ( buffer, sizeof buffer, "/%s%s", self->path, name );
-
-    if ( status < 0 || ( size_t ) status >= sizeof buffer )
-        return RC ( rcFS, rcDirectory, rcVisiting, rcPath, rcExcessive );
-    
-    return f( &self->dad, type, buffer, data );
-}
-
-/* Visit
- *  visit each path under designated directory,
- *  recursively if so indicated
- *
- *  "recurse" [ IN ] - if true, recursively visit sub-directories
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - function to execute
- *  on each path. receives a base directory and relative path
- *  for each entry. if "f" returns true, the iteration will
- *  terminate and that value will be returned. NB - "dir" will not
- *  be the same as "self".
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- *
- * VisitFull hits all files types that including those are normally hidden
- */
-static
-rc_t CC HDF5DirVisit ( const HDF5Dir *self, bool recurse,
-    rc_t ( CC * f ) ( const KDirectory *dir, uint32_t type, const char *name, void *data ),
-    void *data, const char *path, va_list args )
-{
-    KNamelist *objects;
-    rc_t rc = HDF5DirList ( self, &objects, NULL, NULL, path, args );
-    if ( rc == 0 )
-    {
-        uint32_t idx, count;
-        rc = KNamelistCount ( objects, &count );
-        for ( idx = 0; idx < count && rc == 0; ++idx )
-        {
-            const char * name;
-            rc = KNamelistGet ( objects, idx, &name );
-            if ( rc == 0 )
-            {
-                uint32_t type = KDirectoryPathType ( &self->dad, "%s", name );
-                switch ( type )
-                {
-                case kptDataset  :
-                case kptDatatype :
-                case kptDir :
-                    rc = HDF5DirVisitcb( self, f, type, name, data );
-                    break;
-                }
-                if ( recurse && type == kptDir )
-                {
-                    const KDirectory *sub;
-                    rc = KDirectoryOpenDirRead ( &self->dad, &sub, false, "%s", name );
-                    if ( rc == 0 )
-                    {
-                        KDirectoryVisit( sub, true, f, "%s", data );
-                        KDirectoryRelease( sub );
-                    }
-                }
-            }
-        }
-        KNamelistRelease( objects );
-    }
-    return rc;
-}
-
-
-/* VisitUpdate
- *  like Visit except that the directory passed back to "f"
- *  is available for update operations
- */
-static
-rc_t CC HDF5DirVisitUpdate ( HDF5Dir *self, bool recurse,
-    rc_t ( CC * f ) ( KDirectory *dir, uint32_t type, const char *name, void *data ),
-    void *data, const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-
-static uint32_t HDF5DirPathTypeOnBuffer( const HDF5Dir *self, const char *buffer )
-{
-    H5O_info_t obj_info;
-    herr_t h5e = H5Oget_info_by_name( self->hdf5_handle, buffer, &obj_info, H5P_DEFAULT );
-    if ( h5e >= 0 )
-    {
-        switch( obj_info.type )
-        {
-        case H5O_TYPE_GROUP : return kptDir; break;
-        case H5O_TYPE_DATASET : return kptDataset; break;
-        case H5O_TYPE_NAMED_DATATYPE : return kptDatatype; break;
-        default : return kptBadPath; break;
-        }
-    }
-    else
-        return kptBadPath;
-}
-
-/* PathType
- *  returns a KPathType
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- */
-static uint32_t CC HDF5DirPathType ( const HDF5Dir *self, const char *path, va_list args )
-{
-    char buffer[ PATH_MAX ];
-    rc_t rc = string_vprintf ( buffer, sizeof buffer, NULL, path, args );
-    if ( rc != 0 )
-        return kptBadPath;
-
-    return HDF5DirPathTypeOnBuffer( self, buffer );
-}
-
-/* ResolvePath
- *  resolves path to an absolute or directory-relative path
- *
- *  "absolute" [ IN ] - if true, always give a path starting
- *  with '/'. NB - if the directory is chroot'd, the absolute path
- *  will still be relative to directory root.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character set
- *  the resolved path will be directory relative
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target path. NB - need not exist.
- */
-static
-rc_t CC HDF5DirResolvePath ( const HDF5Dir *self, bool absolute,
-    char *resolved, size_t rsize, const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-/* ResolveAlias
- *  resolves an alias path to its immediate target
- *  NB - the resolved path may be yet another alias
- *
- *  "absolute" [ IN ] - if true, always give a path starting
- *  with '/'. NB - if the directory is chroot'd, the absolute path
- *  will still be relative to directory root.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character set
- *  the resolved path will be directory relative
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting an object presumed to be an alias.
- */
-static
-rc_t CC HDF5DirResolveAlias ( const HDF5Dir *self, bool absolute,
-    char *resolved, size_t rsize, const char *alias, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-/* Rename
- *  rename an object accessible from directory, replacing
- *  any existing target object of the same type
- *
- *  "from" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- *
- *  "to" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- *
- *  "force" [ IN ] - not false means try to do more if it fails internally
- */
-static
-rc_t CC HDF5DirRename ( HDF5Dir *self, bool force, const char *from, const char *to )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-/* Remove
- *  remove an accessible object from its directory
- *
- *  "force" [ IN ] - if true and target is a directory,
- *  remove recursively
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-static
-rc_t CC HDF5DirRemove ( HDF5Dir *self, bool force,
-    const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-/* ClearDir
- *  remove all directory contents
- *
- *  "force" [ IN ] - if true and directory entry is a
- *  sub-directory, remove recursively
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- */
-static
-rc_t CC HDF5DirClearDir ( HDF5Dir *self, bool force,
-    const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-
-static
-rc_t HDF5DirVAccess ( const HDF5Dir *self,
-    uint32_t *access, const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-
-/* SetAccess
- *  set access to object a la Unix "chmod"
- *
- *  "recurse" [ IN ] - if non zero and "path" is a directory,
- *  apply changes recursively.
- *
- *  "access" [ IN ] and "mask" [ IN ] - definition of change
- *  where "access" contains new bit values and "mask defines
- *  which bits should be changed.
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-static
-rc_t CC HDF5DirSetAccess ( HDF5Dir *self, bool recurse,
-    uint32_t access, uint32_t mask, const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-
-static
-rc_t HDF5DirVDate ( const HDF5Dir *self,
-    KTime_t * date, const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-
-static
-rc_t HDF5DirVSetDate ( HDF5Dir * self, bool recurse,
-    KTime_t date, const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-
-static
-struct KSysDir * HDF5DirGetSysdir ( const HDF5Dir *cself )
-{
-    return NULL;
-}
-
-
-/* CreateAlias
- *  creates a path alias according to create mode
- *
- *  "access" [ IN ] - standard Unix directory access mode
- *  used when "mode" has kcmParents set and alias path does
- *  not exist.
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "targ" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target alias
- */
-static
-rc_t CC HDF5DirCreateAlias ( HDF5Dir *self,
-    uint32_t access, KCreateMode mode,
-    const char *targ, const char *alias )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-/* OpenFileRead
- *  opens an existing file with read-only access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-static
-rc_t CC HDF5DirOpenFileRead ( const HDF5Dir *self,
-    struct KFile const **f, const char *path, va_list args )
-{
-    char buffer[ PATH_MAX ];
-    uint32_t path_type;
-    size_t psize;
-    hid_t dataset_handle;
-    rc_t rc;
-    HDF5File *f5p;
-
-    *f = NULL;
-
-    rc = string_vprintf ( buffer, sizeof buffer, &psize, path, args );
-    if ( rc != 0 )
-        return rc;
-
-    path_type = HDF5DirPathTypeOnBuffer( self, buffer );
-    if ( path_type != kptDataset )
-        return RC( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-
-    dataset_handle = H5Dopen2( self->hdf5_handle, buffer, H5P_DEFAULT );
-    if ( dataset_handle < 0 )
-        return RC( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-
-    rc = HDF5FileMake ( &f5p, dataset_handle, true, false );
-    if ( rc == 0 )
-        *f = ( struct KFile const * )f5p;
-
-    return rc;
-}
-
-/* OpenFileWrite
- *  opens an existing file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if true, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-static
-rc_t CC HDF5DirOpenFileWrite ( HDF5Dir *self,
-    struct KFile **f, bool update, const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-/* CreateFile
- *  opens a file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if true, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-static
-rc_t CC HDF5DirCreateFile ( HDF5Dir *self, struct KFile **f,
-    bool update, uint32_t access, KCreateMode mode, const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-/* FileSize
- *  returns size in bytes of target file
- *
- *  "size" [ OUT ] - return parameter for file size
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-static
-rc_t CC HDF5DirFileSize ( const HDF5Dir *self,
-    uint64_t *size, const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-/* FilePhysicalSize
- *  returns physical allocated size in bytes of target file.  It might
- * or might not differ form FileSize
- *
- *  "size" [ OUT ] - return parameter for file size
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-static
-rc_t CC HDF5DirFilePhysicalSize ( const HDF5Dir *self,
-    uint64_t *size, const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-/* SetFileSize
- *  sets size in bytes of target file
- *
- *  "size" [ IN ] - new file size
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-static
-rc_t CC HDF5DirSetFileSize ( HDF5Dir *self,
-    uint64_t size, const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-/* FileLocator
- *  returns a 64-bit key pretinent only to the particular file
- *  system device holding tha file.
- *
- *  It can be used as a form of sort key except that it is not 
- *  guaranteed to be unique.
- *
- *  "locator" [ OUT ] - return parameter for file locator
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-static
-rc_t CC HDF5DirFileLocator ( const HDF5Dir *self,
-    uint64_t *locator, const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-/* FileContiguous
- *  returns size in bytes of target file
- *
- *  "size" [ OUT ] - return parameter for file size
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-static
-rc_t CC HDF5DirFileContiguous ( const HDF5Dir *self,
-    bool *contiguous, const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-/* OpenDirRead
- * OpenDirUpdate
- *  opens a sub-directory
- *
- *  "chroot" [ IN ] - if true, the new directory becomes
- *  chroot'd and will interpret paths beginning with '/'
- *  relative to itself.
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- */
-static
-rc_t CC HDF5DirOpenDirRead ( const HDF5Dir *self,
-    const KDirectory **sub, bool chroot, const char *path, va_list args )
-{
-    rc_t rc;
-    char buffer[ PATH_MAX ];
-    size_t buffer_size;
-    uint32_t type;
-    HDF5Dir * new_dir;
-
-    *sub = NULL;
-
-    rc = string_vprintf ( buffer, sizeof buffer, &buffer_size, path, args );
-    if ( rc != 0 )
-        return rc;
-
-    type = HDF5DirPathTypeOnBuffer( self, buffer );
-    switch( type )
-    {
-    case kptNotFound :
-        return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcNotFound );
-    case kptBadPath :
-        return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcInvalid );
-    case kptDir : break;
-    default :
-        return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcIncorrect );
-    }
-
-    new_dir = HDF5DirMake ( buffer_size );
-    if ( new_dir == NULL )
-        return RC ( rcFS, rcDirectory, rcOpening, rcMemory, rcExhausted );
-
-                    /* self, RCContext, dad_root, path, path_size, update, chroot */
-    rc = HDF5DirInit ( new_dir, rcOpening, 0, buffer, buffer_size, false, false );
-    if ( rc == 0 )
-    {
-        new_dir -> hdf5_handle = H5Gopen( self -> hdf5_handle, buffer, H5P_DEFAULT );
-        if ( new_dir -> hdf5_handle >= 0 )
-        {
-            new_dir -> parent = (KDirectory *)&self->dad;
-            new_dir -> h5root = false;
-            KDirectoryAddRef ( &self->dad );
-            * sub = & new_dir -> dad;
-            return 0;
-        }
-        else
-            rc = RC( rcFS, rcDirectory, rcOpening, rcItem, rcInvalid );
-    }
-    free( new_dir );
-    return rc;
-}
-
-static
-rc_t CC HDF5DirOpenDirUpdate ( HDF5Dir *self,
-    KDirectory **sub, bool chroot, const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-/* CreateDir
- *  create a sub-directory
- *
- *  "access" [ IN ] - standard Unix directory mode, e.g.0775
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- */
-static
-rc_t CC HDF5DirCreateDir ( HDF5Dir *self,
-    uint32_t access, KCreateMode mode, const char *path, va_list args )
-{
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcUnsupported );
-}
-
-
-/* vtable & factory */
-static struct KDirectory_vt_v1 HDF5Dir_vt =
-{
-    /* interface version */
-    1, 3,
-
-    HDF5DirDestroy,
-    HDF5DirList,
-    HDF5DirVisit,
-    HDF5DirVisitUpdate,
-    HDF5DirPathType,
-    HDF5DirResolvePath,
-    HDF5DirResolveAlias,
-    HDF5DirRename,
-    HDF5DirRemove,
-    HDF5DirClearDir,
-    HDF5DirVAccess,
-    HDF5DirSetAccess,
-    HDF5DirCreateAlias,
-    HDF5DirOpenFileRead,
-    HDF5DirOpenFileWrite,
-    HDF5DirCreateFile,
-    HDF5DirFileSize,
-    HDF5DirSetFileSize,
-    HDF5DirOpenDirRead,
-    HDF5DirOpenDirUpdate,
-    HDF5DirCreateDir,
-    NULL, /* we don't track files*/
-    /* end minor version 0 methods*/
-
-    /* start minor version 1 methods*/
-    HDF5DirVDate,
-    HDF5DirVSetDate,
-    HDF5DirGetSysdir,
-    /* end minor version 1 methods*/
-
-    /* start minor version 2 methods */
-    HDF5DirFileLocator,
-    HDF5DirFilePhysicalSize,
-    HDF5DirFileContiguous,
-    /* end minor version 2 methods */
-
-    /* start minor version 3 methods */
-    /*
-    HDF5DirOpenDatasetRead,
-    HDF5DirOpenDatasetUpdate
-    */
-};
-
-
-static
-rc_t HDF5DirInit ( HDF5Dir *self, enum RCContext ctx, uint32_t dad_root,
-    const char *path, uint32_t path_size, bool update, bool chroot )
-{
-    rc_t rc = KDirectoryInit ( & self -> dad, ( const KDirectory_vt* ) & HDF5Dir_vt,
-                          "HDF5Dir", path ? path : "(null)", update );
-    if ( rc != 0 )
-        return ResetRCContext ( rc, rcFS, rcDirectory, ctx );
-
-    if ( path != NULL )
-        memcpy ( self -> path, path, path_size );
-    self -> root = chroot ? path_size : dad_root;
-    self -> size = path_size + 1;
-    self -> path [ path_size ] = '/';
-    self -> path [ path_size + 1 ] = 0;
-
-    return 0;
-}
-
-
-/* MakeHDF5RootDir
-    - takes a KDirectory and a path
-    - if the path points to a hdf5-file, the object will be created
- */
-LIB_EXPORT rc_t CC MakeHDF5RootDir ( KDirectory * self, KDirectory ** hdf5_dir,
-                                     bool absolute, const char *path )
-{
-    rc_t rc;
-    char resolved[ PATH_MAX ];
-    uint32_t path_type;
-    HDF5Dir * new_dir;
-    size_t path_size;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcConstructing, rcSelf, rcNull );
-    if ( hdf5_dir == NULL )
-        return RC ( rcFS, rcDirectory, rcConstructing, rcParam, rcNull );
-    * hdf5_dir = NULL;
-
-    rc = KDirectoryResolvePath ( self, absolute, resolved, sizeof resolved, "%s", path );
-    if ( rc != 0 ) return rc;
-    path_size = string_size( resolved );
-
-    path_type = ( KDirectoryPathType ( self, "%s", resolved ) & ~ kptAlias );
-    switch ( path_type )
-    {
-    case kptNotFound :
-        return RC ( rcFS, rcDirectory, rcConstructing, rcPath, rcNotFound );
-    case kptBadPath :
-        return RC ( rcFS, rcDirectory, rcConstructing, rcPath, rcInvalid );
-    case kptFile : break;
-    default :
-        return RC ( rcFS, rcDirectory, rcConstructing, rcPath, rcIncorrect );
-    }
-
-    /* mute the error stack */
-    H5Eset_auto( H5E_DEFAULT, NULL, NULL );
-
-    new_dir = HDF5DirMake ( path_size );
-    if ( new_dir == NULL )
-        return RC ( rcFS, rcDirectory, rcConstructing, rcMemory, rcExhausted );
-
-                     /* self, RCContext, dad_root, path, path_size, update, chroot */
-    rc = HDF5DirInit ( new_dir, rcAccessing, 0, resolved, path_size, false, false );
-    if ( rc == 0 )
-    {
-        /* create a access-property list for file-access */
-        new_dir -> file_access_property_list = H5Pcreate( H5P_FILE_ACCESS );
-        /* set the property-list to use the stdio (buffered) VFL-driver */
-        H5Pset_fapl_stdio ( new_dir -> file_access_property_list );
-        /* open the hdf5-file using the given property-list */
-        new_dir -> hdf5_handle = H5Fopen( resolved, 
-                                          H5F_ACC_RDONLY, 
-                                          new_dir -> file_access_property_list /*H5P_DEFAULT*/ );
-        if ( new_dir -> hdf5_handle >= 0 )
-        {
-            new_dir -> parent = self;
-            new_dir -> h5root = true;
-            * hdf5_dir = & new_dir -> dad;
-            KDirectoryAddRef ( & new_dir -> dad );
-            return 0;
-        }
-        else
-            rc = RC( rcFS, rcDirectory, rcConstructing, rcItem, rcInvalid );
-    }
-    free( new_dir );
-    return rc;
-}
diff --git a/libs/hdf5/hdf5file.c b/libs/hdf5/hdf5file.c
deleted file mode 100644
index f64f62a..0000000
--- a/libs/hdf5/hdf5file.c
+++ /dev/null
@@ -1,383 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-typedef struct HDF5File HDF5File;
-#define KFILE_IMPL HDF5File
-
-#include <kfs/extern.h> /* may need to be changed */
-#include "hdf5arrayfile-priv.h"
-
-#include <klib/rc.h>
-#include <klib/namelist.h>
-#include <klib/text.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-/* object structure */
-struct HDF5File
-{
-    KFile dad;
-
-    /* it maintains a inner HDF5ArrayFile */
-    struct HDF5ArrayFile * array_file;
-};
-
-typedef struct KSysFile KSysFile;
-
-/* import of HDF5ArrayFileMake from hdf5arrayfile.c */
-rc_t HDF5ArrayFileMake ( struct HDF5ArrayFile **fp,
-        KFile *parent, hid_t dataset_handle,
-        bool read_enabled, bool write_enabled );
-
-
-/* Destroy
- */
-static
-rc_t CC HDF5FileDestroy ( HDF5File *self )
-{
-    /* release the ref-counted inner array-file */
-    rc_t rc = KArrayFileRelease( & self -> array_file->dad );
-    free ( self );
-    return rc;
-}
-
-
-/* GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- */
-static
-struct KSysFile * CC HDF5FileGetSysFile ( const HDF5File *self, uint64_t *offset )
-{
-    return NULL;
-}
-
-
-/* RandomAccess
- *  ALMOST by definition, the file is random access
- *  certain file types ( notably compressors ) will refuse random access
- *
- *  returns 0 if random access, error code otherwise
- */
-static
-rc_t CC HDF5FileRandomAccess ( const HDF5File *self )
-{
-    return 0;
-}
-
-
-/* Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC HDF5FileSize ( const HDF5File *self, uint64_t *size )
-{
-    *size = self->array_file->total_bytes;
-    return 0;
-}
-
-
-/* SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC HDF5FileSetSize ( HDF5File *self, uint64_t size )
-{
-    return RC ( rcFS, rcFile, rcAccessing, rcInterface, rcUnsupported );
-}
-
-
-static
-rc_t CC HDF5FileCalcTotalBytes( const HDF5File *self, const uint8_t dim,
-                                uint64_t * total_elements )
-{
-    rc_t rc;
-    uint64_t * extents;
-
-    *total_elements = 0;
-    extents = malloc( dim * sizeof ( *extents ) );
-    if ( extents == NULL )
-        return RC ( rcFS, rcFile, rcAccessing, rcMemory, rcExhausted );
-    rc = KArrayFileDimExtents ( &( self->array_file->dad ), dim, extents );
-    if ( rc == 0 )
-    {
-        uint8_t i;
-        *total_elements = extents[ 0 ];
-        for ( i = 1; i < dim; ++i )
-            *total_elements *= extents[ i ];
-    }
-    free( extents );
-    return rc;
-}
-
-
-static
-rc_t CC HDF5FileReadDim1( const HDF5File *self, uint64_t elem_size, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    uint64_t af_offset, af_count, af_read;
-    rc_t rc;
-
-    af_offset = ( pos / elem_size );
-    af_count = ( bsize / elem_size );
-    if ( ( af_count % elem_size ) > 0 )
-        af_count++;
-    if ( ( af_count * elem_size ) > bsize )
-        return RC ( rcFS, rcFile, rcReading, rcOffset, rcInvalid );
-
-    rc = KArrayFileRead ( &( self->array_file->dad ), 1,
-                          &af_offset, buffer, &af_count, &af_read );
-    if ( rc != 0 ) return rc;
-    *num_read = ( af_read * elem_size );
-    return 0;
-}
-
-
-static
-bool zero_in_array( uint8_t dim, uint64_t *a )
-{
-    bool res = false;
-    uint8_t i;
-    for ( i = 0; i < dim && res == false; ++i )
-        if ( a[ i ] == 0 )
-            res = true;
-    return res;
-}
-
-/* translates a flat position into a multi-dim coordinate */
-static
-void pos_2_coord( uint8_t dim, uint64_t *extents, 
-                  uint64_t pos, uint64_t *coord )
-{
-    int8_t i;
-    for ( i = dim - 1; i >= 0; --i )
-    {
-        uint64_t ext = extents[ i ];
-        coord[ i ] = pos % ext;
-        pos /= ext;
-    }
-}
-
-
-static
-rc_t CC HDF5FileReadOneElement( const HDF5File *self, uint8_t dim, uint64_t elem_size,
-    uint64_t pos, void *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc;
-    uint64_t * extents;
-    uint64_t * coord;
-    uint64_t * elem_count;
-    uint64_t * elem_read;
-    uint8_t i;
-
-    *num_read = 0;
-    extents = malloc( dim * 4 * sizeof ( *extents ) );
-    if ( extents == NULL )
-        return RC ( rcFS, rcFile, rcAccessing, rcMemory, rcExhausted );
-    coord      = ( extents + dim );
-    elem_count = ( coord + dim );
-    elem_read  = ( elem_count + dim );
-
-    rc = KArrayFileDimExtents ( &( self->array_file->dad ), dim, extents );
-    if ( rc != 0 )
-    {
-        free( extents );
-        return rc;
-    }
-    if ( zero_in_array( dim, extents ) )
-    {
-        free( extents );
-        return RC ( rcFS, rcFile, rcAccessing, rcParam, rcNull );
-    }
-
-    pos /= elem_size;
-    pos_2_coord( dim, extents, pos, coord );
-    for ( i = 0; i < dim; ++i )
-        elem_count[ i ] = 1;
-    rc = KArrayFileRead ( &( self->array_file->dad ), dim,
-                          coord, buffer, elem_count, elem_read );
-    if ( rc == 0 )
-        *num_read = elem_size;
-    free( extents );
-    return rc;
-}
-
-
-/* Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-rc_t CC HDF5FileRead ( const HDF5File *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc;
-    uint64_t elem_size, total_elements;
-    uint8_t dim;
-
-    *num_read = 0;
-    rc = KArrayFileElementSize ( &( self->array_file->dad ), &elem_size );
-    if ( rc != 0 ) return rc;
-    elem_size >>= 3; /* KArrayFileElementSize() returns value in bits */
-
-    rc = KArrayFileDimensionality ( &( self->array_file->dad ), &dim );
-    if ( rc != 0 ) return rc;
-
-    rc = HDF5FileCalcTotalBytes( self, dim, &total_elements );
-    if ( rc != 0 ) return rc;
-
-    /* dont read behind the end of the data */
-    if ( pos >= ( total_elements * elem_size ) )
-        return RC ( rcFS, rcFile, rcReading, rcOffset, rcInvalid );
-    /* read only at offsets that are multiples of the datatype_size */
-    if ( ( pos % elem_size ) != 0 )
-        return RC ( rcFS, rcFile, rcReading, rcOffset, rcInvalid );
-
-    if ( dim == 1 )
-        rc = HDF5FileReadDim1( self, elem_size, pos, buffer, bsize, num_read );
-    else
-        rc = HDF5FileReadOneElement( self, dim, elem_size, pos, buffer, bsize, num_read );
-
-    return rc;
-}
-
-
-/* Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- */
-static
-rc_t CC HDF5FileWrite ( HDF5File *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ)
-{
-    return RC ( rcFS, rcFile, rcAccessing, rcInterface, rcUnsupported );
-}
-
-
-/* Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC HDF5FileType ( const HDF5File *self )
-{
-    return RC ( rcFS, rcFile, rcAccessing, rcInterface, rcUnsupported );
-}
-
-
-static KFile_vt_v1 vtHDF5File =
-{
-    /* version 1.1 */
-    1, 1,
-
-    /* start minor version 0 methods */
-    HDF5FileDestroy,
-    HDF5FileGetSysFile,
-    HDF5FileRandomAccess,
-    HDF5FileSize,
-    HDF5FileSetSize,
-    HDF5FileRead,
-    HDF5FileWrite,
-    /* end minor version 0 methods */
-
-    /* start minor version == 1 */
-    HDF5FileType
-    /* end minor version == 1 */
-};
-
-
-/* not static because imported by hdf5file.c via forward decl. */
-rc_t HDF5FileMake ( HDF5File **fp, hid_t dataset_handle,
-        bool read_enabled, bool write_enabled )
-{
-    rc_t rc;
-    HDF5File *f;
-
-    if ( dataset_handle < 0 )
-        return RC ( rcFS, rcFile, rcConstructing, rcFileDesc, rcInvalid );
-
-    f = malloc ( sizeof *f );
-    if ( f == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-
-    rc = KFileInit ( & f -> dad, ( const KFile_vt* ) &vtHDF5File,
-                         "HDF5File", "no-name", read_enabled, write_enabled );
-    if ( rc == 0 )
-    {
-        /* make the inner Arrayfile...*/
-        rc = HDF5ArrayFileMake ( & f -> array_file, & f -> dad, dataset_handle,
-                             read_enabled, write_enabled );
-        if ( rc == 0 )
-        {
-            * fp = f;
-            return 0;
-        }
-        KArrayFileRelease( & f -> array_file -> dad );
-    }
-    free ( f );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC MakeHDF5ArrayFile ( const KFile * self, KArrayFile ** f )
-{
-    HDF5File * hdf5_self;
-
-    if ( f == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    *f = NULL;
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcSelf, rcNull );
-    /* check if the addr of the vt is the one in this file
-       if not - then self is not of the type HDF5File */
-    if ( self->vt != ( const KFile_vt* )&vtHDF5File )
-        return RC ( rcFS, rcFile, rcConstructing, rcParam, rcInvalid );
-    hdf5_self = ( HDF5File * )self;
-    *f = ( KArrayFile * ) hdf5_self -> array_file;
-    return KArrayFileAddRef ( *f );
-}
diff --git a/libs/kapp/Makefile b/libs/kapp/Makefile
deleted file mode 100644
index f0fa2bb..0000000
--- a/libs/kapp/Makefile
+++ /dev/null
@@ -1,152 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/kapp
-
-include $(TOP)/build/Makefile.env
-
-INT_LIBS = \
-	libkapp \
-	libkapp-norsrc \
-    libload
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES = \
-	$(KAPP_OBJ) \
-	$(KAPPR_OBJ) \
-	$(LOADLIB_OBJ)
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# OS specific application support
-#
-$(ILIBDIR)/libkapp: $(addprefix $(ILIBDIR)/libkapp.,$(LIBX))
-
-KAPP_CMN = \
-	args \
-	args-conv \
-	args-conv-os \
-	tokenizer \
-	sysmain \
-	ram \
-	log-xml
-
-KAPP_SRC = \
-	main \
-	$(KAPP_CMN)
-
-KAPP_OBJ = \
-	$(addsuffix .$(OBJX),$(KAPP_SRC))
-
-KAPP_LIB = \
-	-dvfs \
-	-dklib
-
-$(ILIBDIR)/libkapp.$(LIBX): $(KAPP_OBJ)
-	$(LD) --slib -o $@ $^ $(KAPP_LIB)
-
-
-#-------------------------------------------------------------------------------
-# KMane without KRsrc support
-#
-$(ILIBDIR)/libkapp-norsrc: $(addprefix $(ILIBDIR)/libkapp-norsrc.,$(LIBX))
-
-KAPPR_SRC = \
-	main-norsrc \
-	$(KAPP_CMN)
-
-main-norsrc.$(OBJX): main.c
-	$(CC) -o $@ $(OPT) -DNO_KRSRC=1 $< $(LOC_INFO) -D__file_ext__=c
-
-KAPPR_OBJ = \
-	$(addsuffix .$(OBJX),$(KAPPR_SRC))
-
-KAPPR_LIB = \
-
-$(ILIBDIR)/libkapp-norsrc.$(LIBX): $(KAPPR_OBJ)
-	$(LD) --slib -o $@ $^ $(KAPPR_LIB)
-
-
-#-------------------------------------------------------------------------------
-# loaders common libarary
-#
-$(ILIBDIR)/libload: $(addprefix $(ILIBDIR)/libload.,$(LIBX))
-
-LOADLIB_SRC = \
-	progressbar \
-	loader-file \
-	loader-meta
-
-ifneq (win,$(OS))
-	LOADLIB_SRC += queue-file
-endif
-
-LOADLIB_OBJ = \
-	$(addsuffix .$(LOBX),$(LOADLIB_SRC))
-
-LOADLIB_LIB = \
-	-dkfs \
-	-dklib
-
-ifneq (win,$(OS))
-	LOADLIB_LIB += -dkq
-endif
-
-$(ILIBDIR)/libload.$(LIBX): $(LOADLIB_OBJ)
-	$(LD) --slib -o $@ $^ $(LOADLIB_LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/kapp/args-conv.c b/libs/kapp/args-conv.c
deleted file mode 100644
index 6a858ed..0000000
--- a/libs/kapp/args-conv.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <kapp/args-conv.h>
-
-#include <string.h>
-
-rc_t ArgsConvDefault(const Args * args, uint32_t arg_index, const char * arg, size_t arg_len, void ** result, WhackParamFnP * whack)
-{
-    char * res = (char *)malloc(arg_len + 1);
-    if (!result)
-        return RC(rcRuntime, rcArgv, rcConstructing, rcMemory, rcExhausted);
-    
-    memcpy(res, arg, arg_len);
-    res[arg_len] = 0;
-    
-    *result = res;
-    return 0;
-}
diff --git a/libs/kapp/args.c b/libs/kapp/args.c
deleted file mode 100644
index 30be2ae..0000000
--- a/libs/kapp/args.c
+++ /dev/null
@@ -1,2380 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <kapp/extern.h>
-#include <sysalloc.h>
-
-#include <klib/container.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <klib/report.h>
-#include <klib/sra-release-version.h> /* SraReleaseVersionGet */
-#include <klib/status.h>
-#include <klib/text.h>
-#include <klib/vector.h>
-
-#include <kfg/config.h>
-#include <kapp/main.h>
-#include <kapp/args.h>
-#include <kapp/args-conv.h>
-
-#include "args_debug.h"
-
-#include <assert.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-
-#define USE_INLINING   0
-#ifndef USE_OPTFILE
-#define USE_OPTFILE    0
-#endif
-#define USE_EARLY_HELP 1
-#define USE_EARLY_VERSION 1
-
-/* many tools acquired some usage for '-q'
-   other than the standard meaning of "be quiet".
-   while we phase this out, allow these tools
-   to replace the default usage. */
-#define HONOR_LEGACY_Q_ALIAS 1
-#if HONOR_LEGACY_Q_ALIAS
-#define LEGACY_Q_ALIAS_DEPRECATED 1
-#define LEGACY_Q_ALIAS_ERROR      0
-#endif
-
-bool CC is_valid_name (const char * string)
-{
-    /* we do not allow leading - or empty names */
-    if ((*string == '\0') || (*string == '-'))
-        return false;
-    /* we do not allow ASCII control or ASCII space
-     * but we do not disallow punctuation.  Use at your own risk */
-    for ( ; *string != '\0'; ++string)
-        if (isspace (*string) || iscntrl (*string))
-            return false;
-    return true;
-}
-
-
-/* ==========
- * ParamValue
- *   the value for an option is a NUL terminated ASCII / UTF-8 string
- */
-typedef void * ParamValueP;
-
-typedef struct ParamValueContainer {
-    uint32_t        param_index;
-    ParamValueP     param_value;
-    ConvertParamFnP convert_fn;
-    WhackParamFnP   whack;
-} ParamValueContainer;
-
-/*
- * Whack
- *   undo the Make.  That is free the memory
- */
-static
-void CC ParamValueNotConvWhack (void * self)
-{
-    assert (self); /* not an absolute requirement but if NULL we got programming error */
-    
-    free (self);
-}
-
-static
-void CC ParamValueVectorWhack (void * self, void * ignored)
-{
-    ParamValueContainer * p_container;
-    assert (self);
-    
-    p_container = (ParamValueContainer *)self;
-    if (p_container->whack)
-        p_container->whack(p_container->param_value);
-    
-    free (self);
-}
-
-/*
- * Make
- *   allocated memory for a ASCII/UTF-8 string including one extra for NUL
- *   the value passed in must be a NUL termintaed string as well
- */
-static
-rc_t CC ParamValueMake (ParamValueContainer * p_container, uint32_t arg_index, const char * value, size_t value_size, ConvertParamFnP convert_fn)
-{
-    size_t alloc_size;
-    
-    assert (p_container);
-    assert (value);
-    
-    if (value_size == 0)
-        return RC ( rcExe, rcArgv, rcConstructing, rcParam, rcEmpty );
-
-    p_container->param_index = arg_index;
-    p_container->whack = ParamValueNotConvWhack;
-    p_container->convert_fn = convert_fn;
-    
-    alloc_size = value_size + 1;
-    p_container->param_value = malloc (alloc_size);
-
-    if (p_container->param_value == NULL)
-    {
-        fprintf (stderr, "Error allocating memory for option parameter %s\n",
-                 value);
-        return RC (rcExe, rcArgv, rcConstructing, rcMemory, rcExhausted);
-    }
-
-    string_copy (p_container->param_value, alloc_size, value, value_size);
-    return 0;
-}
-
-/* ==========
- * Option
- *  this is the primary node ofr an option
- *  It contains the name of the long option that is also the key to pulling
- *  out values.  The storage of these nodes is in a BSTree.
- */
-typedef struct Option
-{
-    BSTNode     n;              /* BSTree node storage */
-
-    size_t      size;           /* name length (size if UTF-8) */
-    Vector      values;         /* Vector of set values */
-    uint32_t    count;          /* count of times option seen on the command line */
-    uint32_t    max_count;      /* if non-zero, how many times is it legal to be seen */
-    bool        needs_value;    /* does this option take/require a value? */
-    bool        required;       
-    bool        deprecated;     /* a warning if used */
-    bool        error;          /* an error if used */
-    ConvertParamFnP  convert_fn;
-    char        name [1];       /* key value The 1 will be the NUL */
-} Option;
-
-static
-rc_t CC OptionMake (Option ** pself, const char * name, size_t size, uint32_t max_count, bool needs_value, bool required, ConvertParamFnP convert_fn)
-{
-    Option *   self;
-    rc_t rc;
-
-    assert (pself);
-    assert (name);
-    assert ((needs_value == true)||(needs_value == false)); /* not really but lets be rigorous */
-    assert ((required == true)||(required == false)); /* not really but lets be rigorous */
-
-    self = malloc (sizeof (*self) + size);
-    if (self == NULL)
-    {
-        rc = RC (rcExe, rcArgv, rcConstructing, rcMemory, rcExhausted);
-        PLOGERR (klogErr, (klogErr, rc, "Error adding option '$(O)'","O=--%s",name));
-    }
-    else 
-    {
-        if ((self->needs_value = needs_value) != false)
-            VectorInit (&self->values,0,4);
-        else
-            memset (&self->values, 0, sizeof(self->values) );
-
-        self->required = required;
-        self->deprecated = self->error = false;
-        self->count = 0;
-        self->max_count = max_count;
-        self->size = size;
-        self->convert_fn = convert_fn;
-        string_copy (self->name, size+1, name, size);
-    }
-    *pself = self;
-    return 0;
-}
-
-static
-void CC OptionWhack (Option * self)
-{
-    assert (self);
-
-    if (self->needs_value)
-        VectorWhack (&self->values, ParamValueVectorWhack, NULL);
-
-    free (self);
-}
-
-static
-void CC OptionTreeWhack (BSTNode * node, void * ignored)
-{
-    OptionWhack ((Option*)node);
-}
-#ifdef OptionGetName_needed
-static
-const char * CC OptionGetName (const Option * self, size_t * size)
-{
-    assert (self);
-    if (size)
-        *size = self->size;
-    return self->name;
-}
-#endif
-/*
- * NeedsValue
- *  return bool, does this option require a value
- */
-static
-bool CC OptionNeedsValue (const Option * self)
-{
-    assert (self);
-
-    return self->needs_value;
-}
-
-/*
- * GetCount
- *  return the count of values seen so far.
- */
-static
-uint32_t CC OptionGetCount (const Option *self)
-{
-    assert (self);
-
-    return self->count;
-}
-
-/* 
- * GetValue
- *    returns the address of the Nth value (not a copy of the value)
- */
-static
-rc_t CC OptionGetValue (const Option * self, uint32_t number, const void ** value)
-{
-    ParamValueContainer * p_container;
-    /* SKH -- not sure why this was here. 
-       const char * pc; */
-    /* uint32_t count; */
-
-    assert (self);
-    assert (value);
-
-    /* count = OptionGetCount(self); */
-
-    p_container = VectorGet (&self->values, number);
-    /* SKH -- this was checking pc, which is uninitialized */
-    if (p_container == NULL)
-        return RC (rcExe, rcArgv, rcAccessing, rcIndex, rcExcessive);
-    
-    *value = p_container->param_value;
-    
-    return 0;
-}
-
-/*
- * add a value to this node.  If a value isn't needed this is just incrementing the count
- */
-static
-rc_t CC OptionAddValue (Option * option, uint32_t arg_index, const char * value, size_t size)
-{
-    rc_t rc = 0;
-
-    assert (option);
-    
-    ++option->count;
-
-/*     KOutMsg ("%s: name %s count %u max_count %u value %s\n", __func__, option->name, option->count, option->max_count, value); */
-    if (option->max_count && (option->count > option->max_count))
-    {
-        --option->count;
-        rc = RC (rcExe, rcArgv, rcInserting, rcData, rcExcessive);
-        PLOGERR (klogErr,
-                 (klogErr, rc, "Too many occurrences of option '$(O)'",
-                  "O=--%s", option->name));
-    }
-    else if (option->needs_value)
-    {
-        ParamValueContainer * p_container;
-
-        assert (value);     /* gotta have a value */
-        /* value can't be a NULL string */
-        if (size == 0)
-        {
-            rc = RC (rcExe, rcArgv, rcConstructing, rcParam, rcEmpty );
-            return rc;
-        }
-
-        p_container = (ParamValueContainer *)malloc( sizeof *p_container );
-        if (p_container == NULL)
-        {
-            rc = RC (rcExe, rcArgv, rcConstructing, rcMemory, rcExhausted);
-            return rc;
-        }
-
-        rc = ParamValueMake (p_container, arg_index, value, size, option->convert_fn);
-        if (rc == 0)
-        {
-            /* NOTE: effectively going in as a char ** though we will 
-             * pull it out as a char* with the same value */
-            rc = VectorAppend (&option->values, NULL, p_container);
-            if (rc)
-            {
-                PLOGERR (klogErr,
-                         (klogErr, rc, "error capturing parameter '$(O)'",
-                          "O=--%s", option->name));
-                p_container->whack (p_container->param_value);
-            }
-            else
-            {
-                ARGS_DBG( "added option-value %s", option->name );
-            }
-        }
-    }
-    return rc;
-}
-
-static
-int64_t CC OptionCmp (const void * item, const BSTNode * n)
-{
-    const char * name;
-    const Option * option;
-    size_t l;
-
-    assert (item);
-    assert (n);
-
-    name = item;
-    option = (Option*)n;
-    l = string_size (name);
-    return string_cmp (name, l, option->name, option->size, (uint32_t)(l + option->size) );
-}
-
-static
-int64_t CC OptionSort (const BSTNode * item, const BSTNode * n)
-{
-    const Option * l = (Option*)item;
-    const Option * r = (Option*)n;
-    return string_cmp (l->name, l->size, r->name, r->size, (uint32_t)(l->size + r->size) );
-}
-
-/* ==========
- */
-typedef struct OptAlias
-{
-    BSTNode     n;              /* BSTree Node storage */
-
-    Option *   option;          /* full name node for which this is an alias */
-    size_t      size;
-    bool        deprecated;     /* warning if used */
-    bool        error;          /* error if used */
-    char        name[1];        /* utf8 name */
-} OptAlias;
-
-static
-rc_t CC OptAliasMake (OptAlias ** pself, const char * name, size_t size,
-                      Option * option)
-{
-    OptAlias * self;
-
-    assert (pself);
-    assert (name);
-    if (size == 0)
-    {
-        rc_t rc = RC (rcExe, rcArgv, rcConstructing, rcName, rcEmpty);
-        PLOGERR (klogErr,
-                 (klogErr, rc, "Alias name is empty for parameter '$(B)",
-                  "B=%s", option->name));
-        *pself = NULL;
-        return rc;
-    }
-
-    self = malloc (sizeof (*self) + size);
-    if (self == NULL)
-    {
-        rc_t rc = RC (rcExe, rcArgv, rcConstructing, rcMemory, rcExhausted);
-        PLOGERR (klogErr,
-                 (klogErr, rc, "Error creating structure for alias '$(A)' for parameter '$(B)", 
-                  "A=%s,B=%s", name, option->name));
-        *pself = NULL;
-        return rc;
-    }
-    self->option = option;
-    self->size = size;
-    self->deprecated = self->error = false;
-    string_copy (self->name, size + 1, name, size);
-    *pself = self;
-    return 0;
-}
-
-static
-void CC OptAliasWhack (const OptAlias * self)
-{
-    assert (self);
-    free ((void*)self);
-}
-
-static
-void CC OptAliasTreeWhack (BSTNode * node, void * ignored)
-{
-    assert (node); /* catch programming errors; freeing NULL wouldn't hurt */
-
-    OptAliasWhack ((OptAlias*)node);
-}
-
-#if 0
-static
-const char * CC OptAliasName (const OptAlias * self, size_t * size)
-{
-    assert (self);
-
-    if (size)
-        *size = self->size;
-    return self->name;
-}
-#endif
-static
-Option * CC OptAliasOption (const OptAlias *self)
-{
-    assert (self != NULL);
-
-    return self->option;
-}
-
-static
-int64_t CC OptAliasCmp (const void * item, const BSTNode * n)
-{
-    const char * name;
-    const OptAlias * option;
-    size_t l;
-
-    assert (item);
-    assert (n);
-
-    name = item;
-    option = (OptAlias*)n;
-    l = string_size (name);
-    return string_cmp (name, l, option->name, option->size, (uint32_t)( l + option->size ) );
-}
-
-static
-int64_t CC OptAliasSort (const BSTNode * item, const BSTNode * n)
-{
-    const OptAlias * l;
-    const OptAlias * r;
-
-    assert (item);
-    assert (n);
-
-    l = (OptAlias*)item;
-    r = (OptAlias*)n;
-    return string_cmp (l->name, l->size, r->name, r->size, (uint32_t)( l->size + r->size ) );
-}
-
-#if NOT_USED_YET
-static
-rc_t CC OptDefMakeCopy (OptDef ** pself, OptDef * original)
-{
-    OptDef * self;
-    size_t nsize;
-    size_t asize;
-    size_t hsize;
-
-    nsize = string_size (original->name);
-    asize = original->aliases ? string_size (original->aliases) : 0;
-    hsize = original->help ? string_size (original->help) : 0;
-
-    self = malloc (sizeof (*self) + nsize + 1 + asize + 1 + hsize + 1);
-    if (self == NULL)
-    {
-        rc_t rc;
-        /* assuming DebugMsg is stderr equivalent */
-        rc = RC (rcExe, rcArgv, rcConstructing, rcMemory, rcExhausted);
-        LOGERR (klogFatal, rc, "error creating help for option");
-        return rc;
-    }
-    self->name = (char*)(self+1);
-    string_copy (self->name, nsize + 1, original->name, nsize);
-    self->aliases = self->name + nsize + 1;
-    if (original->aliases)
-    {
-        string_copy (self->aliases, asize + 1, original->aliases, asize);
-    }
-    else
-        self->aliases[0] = '\0';
-    self->help = self->aliases + asize + 1;
-    if (original->help)
-    {
-        string_copy (self->help, hsize + 1, original->help, asize);
-    }
-    else
-        self->help[0] = '\0';
-    self->max_count = original->max_count;
-    self->needs_value = original->needs_value;
-    *pself = self;
-    return 0;
-}
-static
-void CC OptDefCopyVectorWhack (void * self, void * ignored)
-{
-    free (self);
-}
-
-#endif
-
-#if NOT_USED_YET
-
-typedef struct HelpGroup
-{
-    rc_t ( CC * header_fmt) (Args * args, const char * header);
-    Vector options;
-    const char header[1];
-} HelpGroup;
-
-
-static
-rc_t CC HelpGroupMake (HelpGroup ** pself, const char * name)
-{
-    HelpGroup * self;
-    size_t size;
-
-    size = string_size (name);
-    self = malloc (sizeof (*self) + size);
-    if (self == NULL)
-    {
-        fprintf (stderr, "Error allocating help group structure %s\n", name);
-        return RC (rcExe, rcArgv, rcConstructing, rcMemory, rcExhausted);
-    }
-    string_copy (self->name, size+1, name, size);
-    VectorInit (&self->optdefs, 0, 16);
-
-    *pself = self;
-    return 0;
-}
-
-
-static
-rc_t CC HelpGroupAddOptDef (HelpGroup * self, OptDef * option)
-{
-    OptDef * opt;
-    rc_t rc;
-
-    rc = OptDefCopy (&opt, option);
-    if (rc)
-        return rc;
-
-    rc = VectorAppend (&self->optdefs, NULL, opt);
-    if (rc)
-    {
-        fprintf (stderr, "Error appending option for help\n");
-        OptDefCopyVectorWhack (opt, NULL);
-        return rc;
-    }
-    return 0;
-}
-
-static
-void CC HelpGroupVectorWhack (void * item, void * ignored)
-{
-    HelpGroup * self = item;
-
-    assert (self);
-    VectorWhack (&self->optdefs, OptDefCopyVectorWhack, NULL);
-    free (self);
-}
-#endif
-
-typedef struct Parameter
-{
-    uint32_t position;
-    ConvertParamFnP  convert_fn;
-} Parameter;
-
-static
-rc_t CC ParamMake (Parameter ** p_parameter, uint32_t position, ConvertParamFnP convert_fn)
-{
-    Parameter * parameter;
-    
-    parameter = malloc (sizeof(Parameter));
-    if (parameter == NULL)
-    {
-        fprintf (stderr, "Error allocating parameter structure\n");
-        return RC (rcExe, rcArgv, rcConstructing, rcMemory, rcExhausted);
-
-    }
-    
-    parameter->position = position;
-    parameter->convert_fn = convert_fn;
-    
-    *p_parameter = parameter;
-    return 0;
-}
-
-static
-void ParamWhack (Parameter * param)
-{
-    assert(param);
-    free(param);
-}
-
-static
-void CC ParamVectorWhack (void * item, void * ignored)
-{
-    ParamWhack(item);
-}
-
-static
-rc_t CC ParamGetValue (const Vector * param_values, uint32_t number, const void ** value)
-{
-    ParamValueContainer * p_container;
-    
-    assert (param_values);
-    assert (value);
-    
-    p_container = VectorGet (param_values, number);
-    if (p_container == NULL)
-        return RC (rcExe, rcArgv, rcAccessing, rcIndex, rcExcessive);
-    
-    *value = p_container->param_value;
-    
-    return 0;
-}
-
-/*
- * add a param value to param_values vector.  Calls convert_fn if provided
- */
-static
-rc_t CC ParamAddValue (Vector * param_values, uint32_t arg_index, const char * value, size_t size, ConvertParamFnP convert_fn)
-{
-    ParamValueContainer * p_container;
-    rc_t rc = 0;
-    
-    assert (param_values);
-    
-    p_container = (ParamValueContainer *)malloc( sizeof *p_container );
-    if (p_container == NULL)
-    {
-        rc = RC (rcExe, rcArgv, rcConstructing, rcMemory, rcExhausted);
-        return rc;
-    }
-
-    assert (value);     /* gotta have a value */
-    /* value can't be a NULL string */
-    if (size == 0)
-    {
-        rc = RC (rcExe, rcArgv, rcConstructing, rcParam, rcEmpty);
-        return rc;
-    }
-    
-    rc = ParamValueMake (p_container, arg_index, value, size, convert_fn);
-    if (rc == 0)
-    {
-        rc = VectorAppend (param_values, NULL, p_container);
-        if (rc)
-        {
-            PLOGERR (klogErr,
-                     (klogErr, rc, "error capturing parameter at index: $(O)",
-                      "O=%u", arg_index));
-            p_container->whack (p_container->param_value);
-        }
-        else
-        {
-            ARGS_DBG( "added param-value at index: %u", arg_index );
-        }
-    }
-
-    return rc;
-}
-
-
-/* ==========
- */
-struct Args
-{
-    BSTree names;
-    BSTree aliases;
-    Vector params;
-    Vector argv;
-    Vector param_values;
-    Vector help;
-#if NOT_USED_YET
-    HelpGroup * def_help;
-#endif
-#if HONOR_LEGACY_Q_ALIAS
-    bool   qalias_replaced;
-#endif
-};
-
-rc_t CC ArgsMake (Args ** pself)
-{
-    rc_t rc;
-    Args * self;
-
-    assert (pself);
-
-    self = malloc (sizeof (*self));
-    if (self == NULL)
-    {
-        rc = RC (rcExe, rcArgv, rcConstructing, rcMemory, rcExhausted);
-    }
-    else
-    {
-#if NOT_USED_YET
-        HelpGroup * help;
-#endif
-        BSTreeInit (&self->names);
-        BSTreeInit (&self->aliases);
-        VectorInit (&self->params,0,8);
-        VectorInit (&self->argv,0,8);
-        VectorInit (&self->param_values,0,8);
-        VectorInit (&self->help,0,16);
-#if HONOR_LEGACY_Q_ALIAS
-        self -> qalias_replaced = false;
-#endif
-#if NOT_USED_YET
-        rc = HelpGroupMake (&help, "NCBI Options");
-        if (rc)
-        {
-            ArgsWhack (self);
-        }
-        else
-        {
-            self->def_help = help;
-            rc = VectorAppend (&self->help, NULL, help);
-        }
-#else
-        rc = 0;
-#endif
-    }
-    *pself = (rc == 0) ? self : NULL;
-    return rc;
-}
-
-rc_t CC ArgsWhack (Args * self)
-{
-    if (self)
-    {
-        BSTreeWhack (&self->names, OptionTreeWhack, NULL);
-        BSTreeWhack (&self->aliases, OptAliasTreeWhack, NULL);
-        VectorWhack (&self->params, ParamVectorWhack, NULL);
-        VectorWhack (&self->argv, ParamValueVectorWhack, NULL);
-        VectorWhack (&self->param_values, ParamValueVectorWhack, NULL);
-#if NOT_USED_YET
-        VectorWhack (&self->help, HelpGroupVectorWhack, NULL);
-#endif
-        free (self);
-    }
-    return 0;
-}
-
-
-rc_t CC ArgsAddOption (Args * self, const OptDef * option)
-{
-    rc_t rc = 0;
-    Option * node;
-    Option * prev;
-    const char * name;
-    size_t size; /* will be used for the help tree side */
-
-    if (self == NULL)
-    {
-        rc = RC (rcExe, rcArgv, rcConstructing, rcSelf, rcNull);
-        LOGERR (klogInt, rc, "Error adding an opion with no object");
-        return rc;
-    }
-    if (option == NULL)
-    {
-        rc = RC (rcExe, rcArgv, rcConstructing, rcParam, rcNull);
-        LOGERR (klogInt, rc, "Error adding an option with no option name");
-        return rc;
-    }
-    name = option->name;
-    if (! is_valid_name (name))
-    {
-        rc = RC (rcExe, rcArgv, rcConstructing, rcName, rcInvalid);
-        PLOGERR (klogInt, (klogInt, rc, "Error using illegal option name '$(O)'", "O=--%s", name));
-        return rc;
-    }
-    size = string_size (name);
-    rc = OptionMake (&node, name, size, option->max_count, option->needs_value, option->required, option->convert_fn);
-    if (rc)
-        return rc;
-    size ++;
-
-    prev = NULL;
-    rc = BSTreeInsertUnique (&self->names, &node->n, (BSTNode**)&prev, OptionSort);
-    if (rc)
-    {
-        if (GetRCState(rc) == rcBusy)
-        {
-            rc = RC (rcExe, rcArgv, rcConstructing, rcName, rcBusy);
-            PLOGERR (klogInt,
-                     (klogInt, rc, "duplicate option name '$(O)'", "O=--%s", name));
-        }
-        else
-            PLOGERR (klogInt,
-                     (klogInt, rc, "unknown error inserting option name '$(O)'", "O=--%s", name));
-
-        OptionWhack (node);
-        return rc;
-    }
-    if (option->aliases)     /* any single character aliases? */
-    {
-        const char * startc;
-        const char * endc;
-        int incr;
-
-        for ((startc = option->aliases),(endc = startc + string_size (startc));
-             startc < endc; startc += incr)
-        {
-            OptAlias * snode;
-            OptAlias * sprev;
-            uint32_t c;
-            char alias_name [8]; /* 4 should be enough + 1 for NUL */
-
-            incr = utf8_utf32 (&c, startc, endc);
-            if (incr < 0)
-            {
-                rc = RC (rcExe, rcArgv, rcConstructing, rcName, rcCorrupt);
-                PLOGERR (klogInt,
-                         (klogInt, rc, "Error parsing alias string '$(A)' from '$(B)' for '$(C)'",
-                          "A=%s,B=%s,C=%s", startc, option->aliases, name));
-                break;
-            }
-            if (incr > 4)
-            {
-                rc = RC (rcExe, rcArgv, rcConstructing, rcName, rcCorrupt);
-                PLOGERR (klogInt,
-                         (klogInt, rc,"Error parsing UTF-8 string '$(S)'",
-                          "S=%s", startc));
-                break;
-            }
-            size = string_copy (alias_name, sizeof (alias_name), startc, incr);
-            if (! is_valid_name (alias_name))
-            {
-                rc = RC (rcExe, rcArgv, rcConstructing, rcName, rcInvalid);
-                PLOGERR (klogInt,
-                         (klogInt, rc, "Error using invalid alias name '$(S)'",
-                          "S=%s", alias_name));
-                break;
-            }
-#if 0
-            size += incr + 1;
-#endif
-            rc = OptAliasMake (&snode, alias_name, incr, node);
-            if (rc)
-                break;
-            rc = BSTreeInsertUnique (&self->aliases, &snode->n, (BSTNode**)&sprev, OptAliasSort);
-            if (rc)
-            {
-                if (GetRCState(rc) == rcExists)
-                {
-#if HONOR_LEGACY_Q_ALIAS
-                    if ( ! self -> qalias_replaced && size == 1 && alias_name [ 0 ] == 'q' )
-                    {
-                        BSTreeUnlink ( & self -> aliases, & sprev -> n );
-                        rc = BSTreeInsertUnique ( & self -> aliases, & snode -> n, NULL, OptAliasSort );
-                        if ( rc != 0 )
-                            BSTreeInsert ( & self -> aliases, & sprev -> n, OptAliasSort );
-                        else
-                        {
-                            OptAliasWhack ( sprev );
-                            self -> qalias_replaced = true;
-#if LEGACY_Q_ALIAS_DEPRECATED
-                            snode -> deprecated = true;
-#elif LEGACY_Q_ALIAS_ERROR
-                            snode -> error = true;
-#endif
-                            continue;
-                        }
-                    }
-#endif
-                    rc = RC (rcExe, rcArgv, rcConstructing, rcName, rcExists);
-                    PLOGERR (klogInt,
-                             (klogInt, rc, "duplicate alias name '$(S)'",
-                              "S=%s", alias_name));
-                }
-                else
-                {
-                    PLOGERR (klogErr,
-                             (klogErr, rc, "unknown error inserting alias '$(S)'",
-                              "S=%s", alias_name));
-                }
-
-                OptAliasWhack (snode);
-                break;
-            }
-        }
-    }
-    return rc;
-}
-
-rc_t CC ArgsAddLongOption ( Args * self, const char * opt_short_names, const char * long_name,
-    const char * opt_param_names, const char * help_text, uint32_t max_count, bool required )
-{
-    OptDef opt;
-    const char * help [ 2 ];
-
-    if ( max_count > 0xFFFF )
-        return RC ( rcExe, rcArgv, rcConstructing, rcParam, rcExcessive );
-
-    memset ( & opt, 0, sizeof opt );
-    memset ( help, 0, sizeof help );
-
-    help [ 0 ] = help_text;
-
-    opt . name = long_name;
-    opt . aliases = opt_short_names;
-    opt . help = help;
-    opt . max_count = ( uint16_t ) max_count;
-    opt . needs_value = ( bool ) ( opt_param_names != NULL && opt_param_names [ 0 ] != 0 );
-    opt . required = required;
-
-    return ArgsAddOption ( self, & opt );
-}
-
-rc_t CC ArgsAddOptionArray (Args * self, const OptDef * option, uint32_t count
-    /*, rc_t (*header_fmt)(Args * args, const char * header), const char * header */ )
-{
-    rc_t rc;
-#if NOT_USED_YET
-    HelpGroup * hg;
-
-    rc = HelpGroupMake (&hg, header, header_fmt, option, count);
-    if (rc == 0)
-    {
-
-        rc = VectorAppend (&self->help, NULL, hg);
-        if (rc == 0)
-        {
-
-            /* count might be zero for help only sections */
-            for (rc = 0; count > 0; --count, ++option)
-            {
-                rc = ArgsAddOption (self, option);
-                if (rc)
-                    break;
-            }
-            if (rc == 0)
-                return 0;
-        }
-        else
-            HelpGroupVectorWhack (hg, NULL);
-    }
-#else
-    for (rc = 0; (rc == 0) && (count > 0); --count, ++option)
-    {
-        rc = ArgsAddOption (self, option);
-    }
-#endif
-    return rc;
-}
-
-rc_t CC ArgsAddParam ( Args * self, const ParamDef * param_def )
-{
-    rc_t rc;
-    Parameter * param;
-    uint32_t params_count;
-    
-    assert(self);
-    assert(param_def);
-    
-    params_count = VectorLength(&self->params);
-    
-    rc = ParamMake (&param, params_count, param_def->convert_fn);
-    if (rc)
-        return rc;
-    
-    rc = VectorAppend(&self->params, NULL, param);
-    if (rc != 0)
-    {
-        ParamWhack(param);
-    }
-    
-    return rc;
-}
-
-rc_t CC ArgsAddLongParam ( Args * self, const char * param_name, const char * help_text, ConvertParamFnP opt_cvt )
-{
-    ParamDef param;
-
-    memset ( & param, 0, sizeof param );
-
-    param . convert_fn = opt_cvt;
-
-    return ArgsAddParam ( self, & param );
-}
-
-rc_t CC ArgsAddParamArray (Args * self, const ParamDef * param, uint32_t count)
-{
-    rc_t rc;
-    
-    for (rc = 0; (rc == 0) && (count > 0); --count, ++param)
-    {
-        rc = ArgsAddParam (self, param);
-    }
-    
-    return 0;
-}
-
-/*
- */
-rc_t CC next_arg (const Args * self, int * pix, int max, const char ** pvalue)
-{
-    int ix;
-    ParamValueContainer * p_container;
-
-    if (*pix >= max)
-        return RC (rcApp, rcArgv, rcAccessing, rcString, rcNotFound);
-
-    ix = *pix;
-    ix++;
-    p_container = (ParamValueContainer *) VectorGet (&self->argv, ix);
-    assert(p_container);
-    *pvalue = (const char *) p_container->param_value;
-    *pix = ix;
-    return 0;
-}
-
-typedef struct ArgsReqCheckData
-{
-    Option * missing_option;
-    rc_t rc;
-} ArgsReqCheckData;
-
-static
-void CC ArgsCheckRequiredInt (BSTNode * n, void * _data)
-{
-#if 1
-    ArgsReqCheckData * data;
-    Option * opt;
-    rc_t rc;
-
-    data = _data;
-    opt = (Option*)n;
-    if (opt->required && ! opt->count)
-    {
-        rc = RC( rcExe, rcArgv, rcParsing, rcParam, rcNotFound );
-        PLOGERR (klogWarn, (klogWarn, rc, "Error missing required parameter '$(P)'",
-                            "P=%s", opt->name));
-        if (data->missing_option == NULL)
-        {
-            data->missing_option = opt;
-            data->rc = rc;
-        }
-    }
-#endif
-}
-
-/* check for required parameters */
-rc_t CC ArgsCheckRequired (Args * self)
-{
-    ArgsReqCheckData r = { NULL, false };
-
-    BSTreeForEach ( &self->names, false, ArgsCheckRequiredInt, &r );
-
-    return r.rc;
-}
-
-static
-rc_t CC ProcessArgConversion(Args * self, ParamValueContainer * p_container)
-{
-    rc_t rc = 0;
-    
-    assert(p_container);
-    
-    if (p_container->convert_fn)
-    {
-        char * param_value = (char *)p_container->param_value;
-        WhackParamFnP whack = p_container->whack;
-        
-        p_container->param_value = NULL;
-        p_container->whack = NULL;
-        rc = p_container->convert_fn(self, p_container->param_index, param_value, string_size(param_value), &p_container->param_value, &p_container->whack);
-        whack(param_value);
-        
-        if (rc == 0 && p_container->whack == NULL)
-        {
-            p_container->whack = ParamValueNotConvWhack;
-        }
-    }
-    
-    return rc;
-}
-
-static
-rc_t CC ProcessArgsConversion(Args * self)
-{
-    rc_t rc = 0;
-    uint32_t i, param_count = VectorLength(&self->param_values);
-    ParamValueContainer * p_container;
-    
-    for (i = 0; i < param_count; ++i)
-    {
-        p_container = VectorGet (&self->param_values, i);
-        rc = ProcessArgConversion(self, p_container);
-        if (rc != 0)
-            break;
-    }
-    
-    if (rc == 0)
-    {
-        BSTNode* node = BSTreeFirst(&self->names);
-        while (node)
-        {
-            Option * option = (Option *)node;
-            uint32_t option_values_count = VectorLength(&option->values);
-            if (option->needs_value)
-            {
-                for (i = 0; i < option_values_count; ++i)
-                {
-                    p_container = VectorGet (&option->values, i);
-                    rc = ProcessArgConversion(self, p_container);
-                    if (rc != 0)
-                        break;
-                }
-                
-                if (rc != 0)
-                    break;
-            }
-            
-            node = BSTNodeNext(node);
-        }
-    }
-    
-    return rc;
-    
-}
-
-static
-rc_t ArgsParseInt (Args * self, int argc, char *argv[])
-{
-    rc_t rc = 0;        /* hard fail - quit processing */
-    rc_t orc = 0;       /* soft fail - keep processing but we'll fail in the end */
-    rc_t qrc = 0;       /* transient - if set will move to a previously unset orc */
-    int ix, ix_from, ix_to;
-    size_t jx;
-    Option * node;
-    const char * parg;
-    char * equal_sign;
-    
-    char name [32];
-    const char * value = NULL;
-    size_t value_len;
-    bool needs_value;
-    uint32_t n_in_argv_before;
-
-    n_in_argv_before = VectorLength( &self->argv );
-
-    /* first capture original argument list and store in our format */
-    for ( ix = 0; ix < argc; ++ix )
-    {
-        size_t len;
-        ParamValueContainer * p_container;
-
-        parg = argv[ix];
-        len = string_size ( parg );
-        
-        p_container = (ParamValueContainer *)malloc( sizeof *p_container );
-        if (p_container == NULL)
-        {
-            rc = RC (rcExe, rcArgv, rcConstructing, rcMemory, rcExhausted);
-            break;
-        }
-
-        rc = ParamValueMake ( p_container, ix, parg, len, NULL );
-        if ( rc == 0 )
-            rc = VectorAppend ( &self->argv, NULL, p_container );
-        if ( rc )
-        {
-            if (p_container->whack != NULL)
-                p_container->whack(p_container->param_value);
-            break;
-        }
-        else
-            ARGS_DBG( "ArgsParse: inserted '%s' into self->argv", parg );
-    }
-    
-    if ( rc )
-        return rc;
-
-    if ( n_in_argv_before == 0 )
-    {
-        ix_from = 1;
-        ix_to = argc;
-    }
-    else
-    {
-        ix_from = n_in_argv_before;
-        ix_to = n_in_argv_before + argc;
-    }
-
-    for ( ix = ix_from; ix < ix_to; ++ix )
-    {
-        ParamValueContainer * p_container = (ParamValueContainer *)VectorGet( &self->argv, ix );
-        parg = ( const char * )p_container->param_value;
-
-        ARGS_DBG( "ArgsParse: parsing '%s' from self->argv", parg );
-
-        if ( parg[ 0 ] != '-' )
-        {
-            uint32_t params_count = VectorLength( &self->param_values );
-            Parameter * param = VectorGet( &self->params, params_count );
-            rc = ParamAddValue( &self->param_values, ix, parg, string_size( parg ), param ? param->convert_fn : NULL );
-            if ( rc )
-                break;
-            ARGS_DBG( "ArgsParse: appending to param_values '%s'", parg );
-        }
-        else
-        {
-            node = NULL;
-            if ( parg[ 1 ] == '-' )
-            {
-                size_t nlen = string_copy( name, sizeof( name ), parg + 2, string_size( parg + 2 ) );
-                ARGS_DBG( "ArgsParse: '%s' is a '--' parameter!", parg );
-                equal_sign = string_chr( name, nlen, '=' );
-                if ( equal_sign )
-                    *equal_sign = '\0';
-
-                node = ( Option* )BSTreeFind( &self->names, name, OptionCmp );
-                if ( node == NULL )
-                {
-                    qrc = RC( rcApp, rcArgv, rcParsing, rcParam, rcUnknown );
-                    PLOGERR (klogErr,
-                             (klogErr, qrc,
-                              "Unknown argument '$(O)'", "O=--%s", name ));
-/*                     break; */
-                    if (orc == 0) /* non-fatal */
-                        orc = qrc;
-                }
-                else
-                {
-                    needs_value = OptionNeedsValue( node );
-                    ARGS_DBG( "ArgsParse: found node for parameter '%s'", parg );
-                    if ( needs_value )
-                    {
-                        ARGS_DBG( "ArgsParse: parameter '%s' needs value", parg );
-                        if ( equal_sign != NULL )
-                            value = parg + 2 + ( ( equal_sign + 1 ) - name );
-
-                        else if ( ix + 1 >= ix_to )
-                        {
-                            rc = RC( rcExe, rcArgv, rcParsing, rcParam, rcExhausted );
-                            PLOGERR (klogErr,
-                                     (klogErr, qrc,"Option '$(O)' is missing a value", "O=--%s", node->name ));
-                        }
-                        else
-                        {
-                            ARGS_DBG( "ArgsParse: calling next_arg()", 0 );
-                            rc = next_arg( self, &ix, ix_to, &value );
-                        }
-
-                        if ( rc == 0 )
-                        {
-                            assert ( value != NULL );
-
-                            value_len = string_size( value );
-
-                            rc = OptionAddValue( node, ix, value, value_len );
-                        }
-                    }
-                    else
-                    {
-                        rc = OptionAddValue( node, ix, NULL, 0 );
-                    }
-
-                    if ( rc != 0 )
-                        break;
-
-                    if ( node -> error )
-                    {
-                        rc = RC ( rcApp, rcArgv, rcParsing, rcParam, rcUnsupported );
-                        PLOGERR (klogErr,
-                                 (klogErr, rc,
-                                  "Deprecated argument '$(O)' is no longer supported.", "O=--%s", name ));
-                        break;
-                    }
-
-                    if ( node -> deprecated )
-                    {
-                        PLOGMSG (klogWarn,
-                                 (klogWarn,
-                                  "Deprecated argument '$(O)' may not be supported in future releases.", "O=--%s", name ));
-                    }
-                }
-            }
-            else
-            {
-                const char * end;
-                uint32_t name_len;
-
-                end = parg + string_size( parg );
-                ARGS_DBG( "ArgsParse: '%s' is a '-' parameter!", parg );
-                for ( jx = 1; parg[ jx ]; jx += name_len )
-                {
-                    OptAlias *alias;
-                    uint32_t c;
-
-                    name_len = utf8_utf32( &c, parg + jx, end ); 
-                    string_copy( name, sizeof( name ), parg + jx, name_len );
-
-                    alias = ( OptAlias* )BSTreeFind( &self->aliases, name, OptAliasCmp );
-                    if ( alias == NULL )
-                    {
-                        qrc = RC( rcApp, rcArgv, rcParsing, rcParam, rcUnknown );
-                        PLOGERR (klogErr,
-                                 (klogErr, qrc,
-                                  "Unknown argument '$(O)'", "O=-%s", name ));
-
-                        if (orc == 0)
-                            orc = qrc;
-                    }
-                    else
-                    {
-                        bool break_loop = false;
-                        node = OptAliasOption( alias );
-                        if ( OptionNeedsValue( node ) )
-                        {
-                            if ( parg[ jx + name_len ] == '=' )
-                            {
-                                ++jx;
-                                if ( parg[ jx + name_len ] )
-                                    value = parg + jx + name_len;
-                                else
-                                {
-                                    qrc = RC( rcExe, rcArgv, rcParsing, rcParam, rcExhausted );
-                                    LOGERR (klogErr, qrc,
-                                            "Value missing with alias followed by =" );
-                                    if (orc == 0)
-                                        orc = qrc;
-                                    break_loop = true;
-                                }
-                            }
-                            else if ( parg[ jx + name_len ] )
-                            {
-                                value = parg + jx + name_len;
-                            }
-                            else if ( ix + 1 >= ix_to )
-                            {
-                                rc = RC( rcExe, rcArgv, rcParsing, rcParam, rcExhausted );
-                                PLOGERR (klogErr,
-                                         (klogErr, rc,
-                                          "Option '$(O)' ( alias for '$(N)' ) is missing a value",
-                                          "O=-%s,N=--%s", name, node->name ));
-                                break;
-                            }
-                            else
-                            {
-                                ParamValueContainer * next_p_container = (ParamValueContainer *) VectorGet( &self->argv, ++ix );
-                                assert(next_p_container);
-                                value = ( const char * ) next_p_container->param_value;
-                            }
-                            ARGS_DBG( "ArgsParse: the value of '%s' is '%s'", name, value );
-
-                            if ( rc == 0 )
-                                rc = OptionAddValue( node, ix, value, string_size( value ) );
-                            break_loop = true;
-                        }
-                        else
-                        {
-                            rc = OptionAddValue( node, ix, NULL, 0 );
-                        }
-
-                        if ( rc != 0 )
-                            break;
-
-                        if ( node -> error )
-                        {
-                            rc = RC ( rcApp, rcArgv, rcParsing, rcParam, rcUnsupported );
-                            PLOGERR (klogErr,
-                                     (klogErr, rc,
-                                      "Deprecated argument '$(O)' ( alias for '$(N)' ) is no longer supported.",
-                                      "O=-%s,N=--%s"
-                                      , name
-                                      , node->name
-                                         ));
-                            break;
-                        }
-
-                        if ( alias -> error )
-                        {
-                            rc = RC ( rcApp, rcArgv, rcParsing, rcParam, rcUnsupported );
-                            PLOGERR (klogErr,
-                                     (klogErr, rc,
-                                      "Deprecated argument '$(O)' is no longer supported. "
-                                      "Please use '$(N)' instead.",
-                                      "O=-%s,N=--%s"
-                                      , name
-                                      , node->name
-                                         ));
-                            break;
-                        }
-
-                        if ( node -> error )
-                        {
-                            PLOGMSG (klogWarn,
-                                     (klogWarn,
-                                      "Deprecated argument '$(O)' ( alias for '$(N)' ) may not be supported in future releases.",
-                                      "O=-%s,N=--%s"
-                                      , name
-                                      , node->name
-                                         ));
-                        }
-
-                        else if ( alias -> deprecated )
-                        {
-                            PLOGMSG (klogWarn,
-                                     (klogWarn,
-                                      "Deprecated argument '$(O)' may not be supported in future releases. "
-                                      "Please use '$(N)' instead.",
-                                      "O=-%s,N=--%s"
-                                      , name
-                                      , node->name
-                                         ));
-                        }
-
-                        if ( break_loop )
-                            break;
-                    }
-                }
-            }
-        }
-        if ( rc )
-            break;
-    }
-    
-    if (rc == 0)
-    {
-        rc = ProcessArgsConversion(self);
-    }
-
-#if _DEBUGGING
-    (void)ArgsHandleDebug (self);
-#endif
-#if USE_EARLY_HELP
-    if (rc == 0)
-    {
-        rc = ArgsHandleHelp (self);
-        /* if "help" wasn't found we aren't using standard arguments so don't
-         * call it an error: if OptionGout changes this might have to as well */
-        if (rc == SILENT_RC (rcExe, rcArgv, rcAccessing, rcName, rcNotFound))
-            rc = 0;
-    }
-#endif
-#if USE_EARLY_VERSION
-    if (rc == 0)
-    {
-        rc = ArgsHandleVersion (self);
-        if (rc == SILENT_RC (rcExe, rcArgv, rcAccessing, rcName, rcNotFound))
-            rc = 0;
-    }
-#endif
-    /* now recovery non-fatal errors into final rc */
-    if (rc == 0)
-        rc = orc;
-
-    if ( rc )
-    {
-        ReportSilence();
-    }
-    return rc;
-}
-
-rc_t CC ArgsParse (Args * self, int argc, char *argv[])
-{
-    KLogLevel lvl = KLogLevelGet ();
-    rc_t rc = KLogLevelSet ( klogWarn );
-    rc = ArgsParseInt ( self, argc, argv );
-    KLogLevelSet ( lvl );
-    return rc;
-}
-
-rc_t CC ArgsOptionCount (const Args * self, const char * option_name, uint32_t * count)
-{
-    rc_t rc;
-
-    if (self == NULL)
-        return RC (rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
-    else if (count == NULL)
-        return RC (rcExe, rcArgv, rcAccessing, rcParam, rcNull);
-    else
-    {
-        const Option * node;
-
-        node = (const Option*)BSTreeFind (&self->names, option_name, OptionCmp);
-        if (node == NULL)
-        {
-            rc = RC (rcExe, rcArgv, rcAccessing, rcName, rcNotFound);
-/* this was removed to shut up about "help" not being found during tests
-            PLOGERR (klogWarn, (klogWarn, rc, "Option name not found '$(S)'", "S=%s", option_name));
- */
-            return rc;
-        }
-
-        *count = OptionGetCount (node);
-        return 0;
-    }
-}
-
-rc_t CC ArgsOptionValue (const Args * self, const char * option_name, uint32_t iteration,
-                                     const void ** value_bin)
-{
-    const Option * node;
-    rc_t rc;
-
-    if (self == NULL)
-        return RC (rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
-
-    if ((option_name == NULL) || (value_bin == NULL))
-        return RC (rcExe, rcArgv, rcAccessing, rcParam, rcNull);
-
-    *value_bin = NULL;
-
-    node = (const Option*)BSTreeFind (&self->names, option_name, OptionCmp);
-    if (node == NULL)
-        return RC (rcExe, rcArgv, rcAccessing, rcName, rcNotFound);
-    
-    rc = OptionGetValue (node, iteration, value_bin);
-    return rc;
-}
-
-rc_t CC ArgsParamCount (const Args * self, uint32_t * count)
-{
-    if (self == NULL)
-        return RC (rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
-    else if (count == NULL)
-        return RC (rcExe, rcArgv, rcAccessing, rcParam, rcNull);
-
-    *count = VectorLength (&self->param_values);
-    return 0;
-}
-
-rc_t CC ArgsParamValue (const Args * self, uint32_t iteration, const void ** value)
-{
-    rc_t rc;
-    
-    if (self == NULL)
-        return RC (rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
-
-    if (value == NULL)
-        return RC (rcExe, rcArgv, rcAccessing, rcParam, rcNull);
-
-    if (iteration >= VectorLength (&self->param_values))
-    {
-        *value = NULL;
-        return RC (rcExe, rcArgv, rcAccessing, rcParam, rcExcessive);
-    }
-
-    
-    rc = ParamGetValue (&self->param_values, iteration, value);
-    return rc;
-}
-
-rc_t CC ArgsArgvCount (const Args * self, uint32_t * count)
-{
-    if (self == NULL)
-        return RC (rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
-    else if (count == NULL)
-        return RC (rcExe, rcArgv, rcAccessing, rcArgv, rcNull);
-
-    *count = VectorLength (&self->argv);
-    return 0;
-}
-#ifdef ArgsArgc
-#undef ArgsArgc
-#endif
-
-rc_t CC ArgsArgc (const Args * self, uint32_t * count)
-{
-    return ArgsArgvCount (self, count);
-}
-
-rc_t CC ArgsArgvValue (const Args * self, uint32_t iteration, const char ** value_string)
-{
-    ParamValueContainer * p_container;
-    
-    if (self == NULL)
-        return RC (rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
-
-    if (value_string == NULL)
-        return RC (rcExe, rcArgv, rcAccessing, rcArgv, rcNull);
-
-    if (iteration >= VectorLength (&self->argv))
-    {
-        *value_string = NULL;
-        return RC (rcExe, rcArgv, rcAccessing, rcArgv, rcExcessive);
-    }
-
-    p_container = (ParamValueContainer*) VectorGet (&self->argv, iteration);
-    assert(p_container);
-    
-    *value_string = (const char *)p_container->param_value;
-    return 0;
-}
-
-#define USAGE_MAX_SIZE 81
-static
-const char * verbose_usage[] = 
-{ "Increase the verbosity of the program status messages.",
-  "Use multiple times for more verbosity.","Negates quiet.", NULL };
-static
-const char * quiet_usage[] = 
-{ "Turn off all status messages for the program.",
-  "Negated by verbose.", NULL };
-static
-const char * debug_usage[] = 
-{ "Turn on debug output for module.",
-  "All flags if not specified.", NULL };
-static
-const char * help_usage[] = 
-{ "Output a brief explanation for the program.", NULL };
-static
-const char * report_usage[] = 
-{ "Control program execution environment report generation (if implemented).",
-    "One of (never|error|always). Default is error.", NULL };
-static
-const char * version_usage[] = 
-{ "Display the version of the program then quit.", NULL };
-static
-const char * optfile_usage[] = 
-{ "Read more options and parameters from the file.", NULL};
-static 
-char log0 [USAGE_MAX_SIZE];
-static 
-char log1 [USAGE_MAX_SIZE];
-static
-const char * log_usage[] = 
-{ "Logging level as number or enum string.", log0, log1, NULL };
-static
-const char * no_user_settings_usage[] = 
-{ "Turn off user-specific configuration.", NULL };
-
-static
-void CC gen_log_usage (const char ** _buffers)
-{
-    static const char div[] = "|";
-
-    /* these have to be mutable for this to work */
-    char ** buffers = (char **) _buffers;
-
-    char * pc;
-    char * p0;
-    char * p1;
-    size_t rem;
-    size_t used;
-    KLogLevel level;
-
-    rc_t rc;
-    char buffv[USAGE_MAX_SIZE];
-
-
-    p0 = pc = buffers[1];
-    p1 = pc = buffers[2];
-
-    *p0 = *p1 = '\0';
-
-    rem = USAGE_MAX_SIZE; /* makes an assumption */
-    pc = buffv;
-    for (level = klogLevelMin; level <= klogLevelMax; ++level)
-    {
-        rc = KLogLevelExplain (level, pc, rem, &used);
-        if (rc || used == 0)
-        {
-            p0 = NULL;
-            pc = NULL;
-            break;
-        }
-        pc += used;
-        rem -= used;
-        strcpy (pc, div);
-        pc += sizeof div - 1;
-        rem -= sizeof div - 1;
-    }
-    if (p0)
-    {
-        pc -= sizeof div - 1;
-        rem += sizeof div - 1;
-        *pc = '\0';
-        
-        rc = string_printf (p0, USAGE_MAX_SIZE, & used,
-                            "One of (%s) or (%u-%u)",
-                            buffv, klogLevelMin, klogLevelMax);
-        if (used == 0)
-            p0 = NULL;
-    }
-    rc = KLogLevelExplain (KLogLevelGet(), buffv, sizeof buffv, &used);
-    if (rc || used == 0)
-        p1 = NULL;
-    else
-    {
-        buffv[used] = '\0';
-        rc = string_printf (p1, USAGE_MAX_SIZE, & used,
-                         "Current/default is %s",
-                         buffv);
-        if (used == 0)
-            p1 = NULL;
-    }
-    if (p0 == NULL)
-    {
-        p0 = p1;
-        p1 = NULL;
-    }
-}
-
-
-
-OptDef StandardOptions[]  =
-{
-    {
-        OPTION_HELP            , ALIAS_HELP     , NULL, help_usage,
-        OPT_UNLIM, false, false
-    },
-    {
-        OPTION_VERSION         , ALIAS_VERSION  , NULL, version_usage,
-        OPT_UNLIM, false, false
-    },
-    {
-        OPTION_LOG_LEVEL       , ALIAS_LOG_LEVEL, gen_log_usage,     log_usage,
-        OPT_UNLIM, true, false
-    },
-    {
-        OPTION_VERBOSE         , ALIAS_VERBOSE  , NULL, verbose_usage,
-        OPT_UNLIM, false, false
-    },
-    {
-        OPTION_QUIET           , ALIAS_QUIET    , NULL, quiet_usage,
-        OPT_UNLIM, false, false
-    },
-#if USE_OPTFILE
-    {
-        OPTION_OPTFILE         , ALIAS_OPTFILE  , NULL, optfile_usage,
-        OPT_UNLIM, true , false, ArgsConvFilepath
-    },
-#endif
-    {
-        OPTION_DEBUG           , ALIAS_DEBUG    , NULL, debug_usage, 
-        OPT_UNLIM, true , false
-    },
-    {
-        OPTION_NO_USER_SETTINGS, NULL           , NULL, no_user_settings_usage,
-        OPT_UNLIM, false, false
-    },
-    {   /* OPTION_REPORT is used in klib/report.c */
-        OPTION_REPORT          , NULL           , NULL, report_usage, 
-        OPT_UNLIM, true , false
-    }
-};
-
-rc_t CC ArgsAddStandardOptions(Args * self)
-{
-    return ArgsAddOptionArray (self, StandardOptions,
-                               sizeof (StandardOptions) / sizeof (OptDef)
-                               /*, NULL, NULL */ );
-}
-
-rc_t CC ArgsMakeStandardOptions (Args** pself)
-{
-    Args * self;
-    rc_t rc;
-
-    rc = ArgsMake (&self);
-    if (rc == 0)
-    {
-        rc = ArgsAddStandardOptions (self);
-        if (rc)
-            ArgsWhack (self);
-    }
-    *pself = (rc == 0) ? self : NULL;
-    return rc;
-}
-
-rc_t CC ArgsHandleHelp (Args * self)
-{
-    uint32_t count;
-    rc_t rc;
-
-    rc = ArgsOptionCount (self, OPTION_HELP, &count);
-    if (rc == 0)
-    {
-        if (count)
-        {
-            /* this is a call into the main program code */
-            Usage(self);
-            ArgsWhack (self);
-            exit (0);
-        }
-    }
-    return rc;
-}
-
-
-rc_t CC ArgsHandleVersion (Args * self)
-{
-    uint32_t count;
-    rc_t rc;
-
-    rc = ArgsOptionCount (self, OPTION_VERSION, &count);
-    if (rc == 0)
-    {
-        if (count)
-        {
-            const char * progname = UsageDefaultName;
-            const char * fullpath = UsageDefaultName;
-
-            char cSra [ 512 ] = "";
-            SraReleaseVersion sraVersion;
-            memset ( & sraVersion, 0, sizeof sraVersion );
-            {
-                rc_t rc = SraReleaseVersionGet ( & sraVersion );
-                if ( rc == 0 ) {
-                    rc = SraReleaseVersionPrint
-                        ( & sraVersion, cSra, sizeof cSra, NULL );
-                }
-            }
-
-            if (self)
-                rc = ArgsProgram (self, &fullpath, &progname);
-
-            HelpVersion (fullpath, KAppVersion());
-
-            ArgsWhack (self);
-            exit (0);
-        }
-    }
-    return rc;
-}
-
-rc_t CC ArgsHandleLogLevel (const Args * self)
-{
-    uint32_t count;
-    rc_t rc;
-
-    rc = ArgsOptionCount (self, OPTION_LOG_LEVEL, &count);
-    if (rc == 0)
-    {
-        if (count != 0) {
-            const char * value;
-            uint32_t ix;
-
-            for (ix = 0; ix < count; ++ix)
-            {
-                rc = ArgsOptionValue (self, OPTION_LOG_LEVEL,
-                                      ix, (const void**)&value);
-                if (rc == 0)
-                    rc = LogLevelSet (value);
-                if (rc)
-                    break;
-            }
-        }
-    }
-    return rc;
-}
-
-rc_t CC ArgsHandleStatusLevel (const Args * self)
-{
-    uint32_t vcount, qcount;
-    rc_t rc;
-
-    rc = ArgsOptionCount (self, OPTION_VERBOSE, &vcount);
-    if (rc == 0)
-    {
-        rc = ArgsOptionCount (self, OPTION_QUIET, &qcount);
-        if (rc == 0)
-        {
-            KStsLevel current;
-
-            current = KStsLevelGet();
-
-            if (vcount)
-            {
-                rc_t irc;
-
-                irc = SILENT_RC (rcExe, rcArgv, rcParsing, rcParam, rcIncorrect);
-                if (qcount)
-                {
-                    PLOGERR (klogErr,
-                             (klogErr, irc,
-                              "$(V)($(v)) and $(Q)($(q)) should not be used together",
-                              "V=%s,v=%s,Q=$s,q=%s",
-                              OPTION_VERBOSE,ALIAS_VERBOSE,
-                              OPTION_QUIET,ALIAS_QUIET));
-                }
-                KStsLevelSet (current + vcount);
-            }
-            else if (qcount)
-                KStsLevelSet (0);
-        }
-    }
-    return rc;
-}
-
-rc_t CC ArgsHandleNoUserSettings (const Args * self)
-{
-    uint32_t count = 0;
-    rc_t rc = ArgsOptionCount (self, OPTION_NO_USER_SETTINGS, &count);
-    if (rc == 0 && count != 0)
-        KConfigDisableUserSettings ();
-    return rc;
-}
-
-
-#if USE_OPTFILE
-rc_t CC ArgsHandleOptfile (Args * self)
-{
-    return Args_parse_inf_file (self, OPTION_OPTFILE);
-}
-#endif
-
-
-#if _DEBUGGING
-rc_t CC ArgsHandleDebug (const Args * self)
-{
-    uint32_t count;
-    rc_t rc;
-
-    rc = ArgsOptionCount (self, OPTION_DEBUG, &count);
-    if (rc == 0)
-    {
-        if (count == 0)
-        {
-        }
-        else
-        {
-            const char * value;
-            uint32_t ix;
-
-            for (ix = 0; ix < count; ++ix)
-            {
-                rc = ArgsOptionValue (self, OPTION_DEBUG,
-                                      ix, (const void**)&value);
-                if (rc == 0)
-                    rc = KDbgSetString (value);
-                if (rc)
-                    break;
-            }
-        }
-    }
-    return rc;
-}
-#endif
-
-rc_t CC ArgsHandleStandardOptions (Args * self)
-{
-    rc_t rc = 0;
-
-    do
-    {
-        rc = ArgsHandleHelp (self);
-        if (rc != 0)
-            break;
-
-        rc = ArgsHandleVersion (self);
-        if (rc != 0)
-            break;
-
-        rc = ArgsHandleLogLevel (self);
-        if (rc != 0)
-            break;
-
-        rc = ArgsHandleStatusLevel (self);
-        if (rc != 0)
-            break;
-
-        rc = ArgsHandleNoUserSettings (self);
-        if (rc != 0)
-            break;
-
-#if _DEBUGGING 
-	/* called a second time in case more symbols in in files */
-        rc = ArgsHandleDebug (self);
-        if (rc != 0)
-            break;
-#endif
-    } while (0); /* not a real loop */
-
-    return rc;
-}
-
-static
-rc_t ArgsMakeAndHandleInt ( Args ** pself, int argc, char ** argv,
-    const ParamDef *params, uint32_t param_count, uint32_t optdef_count, va_list ap )
-{
-    rc_t rc;
-    Args * self;
-
-    *pself = NULL;
-    rc = ArgsMakeStandardOptions (&self);
-    if ( rc == 0 && param_count != 0 )
-    {
-        if ( params == NULL )
-            return RC ( rcExe, rcArgv, rcConstructing, rcParam, rcNull );
-
-        rc = ArgsAddParamArray ( self, params, param_count );
-    }
-    if (rc == 0)
-    {
-        for (;;)
-        {
-            /* load added OptDef tables */
-            if (optdef_count != 0)
-            {
-                while (optdef_count--)
-                {
-                    OptDef * options;
-                    uint32_t opt_count;
-
-                    options = va_arg (ap, OptDef *);
-                    opt_count = va_arg (ap, uint32_t);
-
-                    rc = ArgsAddOptionArray (self, options, opt_count /* , NULL, NULL */);
-                    if (rc)
-                        break;
-                }
-
-                if (rc)
-                    break;
-            }
-
-            rc = ArgsParse (self, argc, argv);
-            if (rc)
-                break;
-
-#if USE_OPTFILE
-            /*
-             * recursively check for files full of options
-             * we want this done before flagging missing arguments
-             */
-            rc = ArgsHandleOptfile (self);
-            if (rc)
-                break;
-#endif
-            /*
-             * now handle (maybe even rehandle except the optfile
-             * the standard arguments all applications/tools support
-             */
-            rc = ArgsHandleStandardOptions (self);
-            if (rc)
-                break;
-
-            rc = ArgsCheckRequired (self);
-            if (rc)
-            {
-                MiniUsage(self);
-                break;
-            }
-
-            *pself = self;
-            return 0;
-
-            break;
-        }
-    
-        ArgsWhack (self);
-    }
-    return rc;
-}
-
-rc_t CC ArgsMakeAndHandle (Args ** pself, int argc, char ** argv, uint32_t table_count, ...)
-{
-    rc_t rc;
-    va_list args;
-    va_start ( args, table_count );
-    rc = ArgsMakeAndHandleInt ( pself, argc, argv, NULL, 0, table_count, args );
-    va_end ( args );
-    return rc;
-}
-
-rc_t CC ArgsMakeAndHandle2 (Args ** pself, int argc, char ** argv,
-                            ParamDef * params, uint32_t param_count, uint32_t table_count, ...)
-{
-    rc_t rc;
-    va_list args;
-    va_start ( args, table_count );
-    rc = ArgsMakeAndHandleInt ( pself, argc, argv, params, param_count, table_count, args );
-    va_end ( args );
-    return rc;
-}
-
-
-/* NOTE:
- * This needs to move into a unix/win32 seperated file
- * and quite probably outside of args.
- */
-
-const char * CC trim_path (const char * full_name)
-{
-    const char * name;
-
-    name = strrchr (full_name, '/');
-    if (name == NULL)
-        name = full_name;
-    else
-        ++name; /* skip past '/' */
-    return name;
-}
-
-
-rc_t CC ArgsProgram (const Args * args, const char ** fullpath, const char ** progname)
-{
-    const char * defaultname = UsageDefaultName;
-    const char * f;
-    rc_t rc;
-
-    rc = ArgsArgvValue (args, 0, &f);
-    if (rc == 0)
-    {
-        if (fullpath)
-            *fullpath = f;
-        if (progname)
-            *progname = trim_path (f);
-    }
-    else
-    {
-        f = defaultname;
-        
-        if (fullpath != NULL)
-        {
-            if (*fullpath == NULL)
-                *fullpath = f;
-            else
-                f = *fullpath;
-        }
-        if (progname)
-        {
-            if (*progname == NULL)
-                *progname = trim_path (f);
-        }
-    }
-    return rc;
-}
-
-void CC HelpVersion (const char * fullpath, ver_t version)
-{
-    rc_t rc = 0;
-    char cSra[512] = "";
-    SraReleaseVersion sraVersion;
-    memset(&sraVersion, 0, sizeof sraVersion);
-    rc = SraReleaseVersionGet(&sraVersion);
-    if (rc == 0) {
-        rc = SraReleaseVersionPrint(&sraVersion, cSra, sizeof cSra, NULL);
-    }
-    if (rc != 0 || cSra[0] == '\0' ||
-        (sraVersion.version == version && sraVersion.revision == 0 &&
-         sraVersion.type == eSraReleaseVersionTypeFinal))
-    {
-        OUTMSG (("\n%s : %.3V\n\n", fullpath, version));
-    }
-    else {
-        OUTMSG (("\n%s : %.3V ( %s )\n\n", fullpath, version, cSra));
-    }
-}
-
-
-static void print_indented( const size_t first_indent, const size_t indent,
-                            const size_t max_line_len, const char ** msgs )
-{
-    const char * msg;
-    size_t line_len;
-
-    if ( *msgs == NULL )
-    {
-        OUTMSG(( "\n" ));
-        return;
-    }
-
-    if ( first_indent < indent )
-    {
-        OUTMSG(( "%*s", indent - first_indent, " " ));
-        line_len = indent;
-    }
-    else
-    {
-        OUTMSG(( "  " ));
-        line_len = first_indent + 2;
-    }
-    while ( ( msg = *msgs++ ) != NULL )
-    {
-        while ( msg != NULL )
-        {
-            const char * space = strchr( msg, ' ' );
-            if ( space != NULL )
-            {
-                /* space found, can we print the word on the current line? */
-                int wordlen = (int) ( space - msg );
-                if ( ( line_len + wordlen + 1 ) < max_line_len )
-                {
-                    if ( wordlen > 1 )
-                        OUTMSG(( "%.*s", wordlen + 1, msg )); /* yes */
-                }
-                else
-                {
-                    OUTMSG(( "\n%*s%.*s", indent, " ", wordlen + 1, msg )); /* no: new line */
-                    line_len = indent;
-                }
-                line_len += ( wordlen + 1 );
-                msg += ( wordlen + 1 );
-            }
-            else
-            {
-                /* no space found, can we print the string on the current line? */
-                size_t remainder = string_size( msg );
-                if ( line_len + remainder < max_line_len )
-                {
-                    OUTMSG(( "%s ", msg )); /* yes */
-                }
-                else
-                {
-                    OUTMSG(( "\n%*s%s ", indent, " ", msg )); /* no: new line */
-                    line_len = indent;
-                }
-                line_len += remainder;
-                msg = NULL; /* we are done with one source-line... */
-            }
-        }
-    }
-    OUTMSG(( "\n" ));
-}
-
-void CC HelpOptionLine(const char * alias, const char * option, const char * param, const char ** msgs)
-{
-/*    const char * msg; */
-#define INDENT 2
-#define MSG_INDENT 35
-#define MSG_MAXLEN 80
-
-    bool has_alias = (alias != NULL && alias[0] != '\0');
-    bool has_opt = (option != NULL && option[0] != '\0');
-
-    if( has_alias || has_opt )
-    {
-        int n = 0, msgc = 0;
-
-        OUTMSG(("%*s%n", INDENT, " ", & msgc ));
-
-        if( has_alias )
-        {
-            OUTMSG(("-%s%n", alias, &n));
-            msgc += n;
-        }
-
-        if( has_alias && has_opt )
-        {
-            OUTMSG(("|"));
-            msgc++;
-        }
-
-        if( has_opt )
-        {
-            OUTMSG(("--%s%n", option, &n));
-            msgc += n;
-        }
-
-        if( param != NULL)
-        {
-            OUTMSG((" <%s>%n", param, &n));
-            msgc += n;
-        }
-
-        print_indented( msgc, MSG_INDENT, MSG_MAXLEN, msgs );
-    }
-}
-
-void CC HelpParamLine (const char * param, const char * const * msgs)
-{
-    int msgc;
-    const char * msg;
-
-    msg = *msgs++;
-
-    if (param)
-    {
-        OUTMSG (("%*s%s%n", INDENT, " ", param, &msgc));
-	if (msg == NULL)
-	    OUTMSG (("\n"));
-	else
-	{
-	    OUTMSG (("%*s%s\n", MSG_INDENT-msgc, " ", msg));
-	}
-    }
-    if (msg != NULL)
-	while ((msg = *msgs++) != NULL)
-	    OUTMSG (("%*s%s\n", MSG_INDENT, " ", msg));
-}
-
-void CC HelpOptionsStandard(void){
-    HelpOptionLine(ALIAS_HELP1    ,OPTION_HELP     , NULL    , help_usage);
-
-    HelpOptionLine(ALIAS_VERSION  ,OPTION_VERSION  , NULL    , version_usage);
-
-    gen_log_usage(log_usage);
-    HelpOptionLine(ALIAS_LOG_LEVEL,OPTION_LOG_LEVEL, "level" , log_usage);
-
-    HelpOptionLine(ALIAS_VERBOSE  ,OPTION_VERBOSE  , NULL    , verbose_usage);
-    HelpOptionLine(ALIAS_QUIET    ,OPTION_QUIET    , NULL    , quiet_usage);
-#if USE_OPTFILE
-    HelpOptionLine(ALIAS_OPTFILE  ,OPTION_OPTFILE  , "file"  , optfile_usage);
-#endif
-#if _DEBUGGING
-    HelpOptionLine(ALIAS_DEBUG    ,OPTION_DEBUG, "Module[-Flag]", debug_usage); 
-#endif
-}
-
-
-void CC HelpOptionsReport (void)
-{
-    HelpOptionLine (ALIAS_REPORT, OPTION_REPORT, "type", report_usage);
-}
-
-
-rc_t CC MiniUsage (const Args * args)
-{
-    KWrtWriter w;
-    void * d;
-    const char * progname;
-    rc_t rc;
-
-    w = KOutWriterGet();
-    d = KOutDataGet();
-
-    rc = ArgsProgram (args, NULL, &progname);
-    if (rc)
-        progname = UsageDefaultName;
-    KOutHandlerSetStdErr();
-    UsageSummary (progname);
-    KOutMsg ("\nUse option --help for more information.\n\n");
-
-    KOutHandlerSet (w,d);
-
-    return rc;
-}
-
-
-bool CC Is32BitAndDisplayMessage( void )
-{
-#if _ARCH_BITS == 32
-    KOutMsg ( "\nThis tool cannot run in a 32-bit environment,\nplease use the 64-bit version of this tool\n\n" );
-    return true;
-#else
-    return false;
-#endif
-}
diff --git a/libs/kapp/args_debug.h b/libs/kapp/args_debug.h
deleted file mode 100644
index ea4c509..0000000
--- a/libs/kapp/args_debug.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#ifndef _h_args_priv_libs_
-#define _h_args_priv_libs_
-
-#include <klib/debug.h>
-
-#if _DEBUGGING
-
-#define ARGS_DBGF(msg) DBGMSG(DBG_ARGS, DBG_FLAG(DBG_ARGS_WRITER), msg)
-#define ARGS_DBG(fmt, ...) ARGS_DBGF(("%s:%u: " fmt "\n", __func__, __LINE__, __VA_ARGS__))
-#define ARGS_DBGERR(rc) if(rc != 0) {ARGS_DBGF(("%s:%u: %R\n", __func__, __LINE__, rc));}
-#define ARGS_DBGERRP(fmt, rc, ...) if(rc != 0) {ARGS_DBGF(("%s:%u: %R " fmt "\n", __func__, __LINE__, rc, __VA_ARGS__));}
-
-#else
-
-#define ARGS_DBGF(msg) ((void)0)
-#define ARGS_DBG(fmt, ...) ((void)0)
-#define ARGS_DBGERR(rc) ((void)0)
-#define ARGS_DBGERRP(fmt, rc, ...) ((void)0)
-
-#endif
-
-#endif
diff --git a/libs/kapp/linux/ram.c b/libs/kapp/linux/ram.c
deleted file mode 100644
index 47ccfb0..0000000
--- a/libs/kapp/linux/ram.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "../main-priv.h"
-#include <kapp/main.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-
-
-/* KAppGetTotalRam
- *  Linux specific function of getting amount of RAM
- */
-rc_t KAppGetTotalRam ( uint64_t * totalRam )
-{
-    rc_t rc;
-
-    long numPages;
-    long pageSize;
-
-    assert ( totalRam != 0 );
-
-    numPages = sysconf( _SC_PHYS_PAGES );
-    if ( numPages < 0 )
-    {
-		int status = errno;
-        rc = RC ( rcApp, rcNoTarg, rcInitializing, rcMemory, rcFailed );
-        PLOGERR ( klogFatal, ( klogFatal, rc,
-					"failed to retrieve number of RAM pages. error code: $(status) - $(msg)"
-                    , "status=%d,msg=%!"
-                    , status, status 
-                        ));
-        return rc;
-    }
-
-    pageSize = sysconf( _SC_PAGESIZE );
-    if ( pageSize < 0 )
-    {
-		int status = errno;
-        rc = RC ( rcApp, rcNoTarg, rcInitializing, rcMemory, rcFailed );
-        PLOGERR ( klogFatal, (klogFatal, rc,
-                    "failed to retrieve RAM page size. error code: $(status) - $(msg)"
-                    , "status=%d,msg=%!"
-                    , status, status
-                        ));
-        return rc;
-    }
-
-    *totalRam = (uint64_t) pageSize * numPages;
-
-    return 0;
-}
diff --git a/libs/kapp/loader-file.c b/libs/kapp/loader-file.c
deleted file mode 100644
index 8d94bb9..0000000
--- a/libs/kapp/loader-file.c
+++ /dev/null
@@ -1,643 +0,0 @@
-/*==============================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*/
-#include <kapp/extern.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/md5.h>
-#include <kfs/bzip.h>
-#include <kfs/gzip.h>
-#include <kapp/progressbar.h>
-#include <kapp/queue-file.h>
-
-#include <kapp/loader-file.h>
-#define KFILE_IMPL KLoaderFile
-#include <kfs/impl.h>
-
-#include <sysalloc.h>
-#include <stdlib.h>
-#include <string.h>
-#include <os-native.h> /* for strdup on Windows */
-
-#define DBG(msg) DBGMSG(DBG_LOADLIB,DBG_FLAG(DBG_LOADLIB_FILE), msg)
-
-#if _DEBUGGING
-#   ifndef KLoaderFile_BUFFERSIZE
-#       define KLoaderFile_BUFFERSIZE (256 * 1024)
-#   endif
-#else
-#   undef KLoaderFile_BUFFERSIZE
-#   define KLoaderFile_BUFFERSIZE (256 * 1024)
-#endif
-
-struct KLoaderFile
-{
-    KFile dad;
-    /* physical file */
-    uint64_t kfile_pos;
-    const KFile* kfile;
-    const KLoadProgressbar* job;
-
-    const KFile* file;
-    const KDirectory* dir;
-    char* filename;
-    char* realname;
-    bool has_md5;
-    bool ahead;
-    uint8_t md5_digest[16];
-
-    /* current file */
-    enum {
-        compress_none = 0,
-        compress_gzip,
-        compress_bzip2
-    } compress_type;
-    uint64_t pos;
-    bool eof;
-    uint32_t eol; /* next line start in buffer (next symbol after previously detected eol) */
-    uint64_t line_no;
-
-    /* file buffer */
-    uint8_t *buffer_pos;
-    uint32_t avail;
-    uint8_t *buffer;
-    size_t buffer_size;
-#if _DEBUGGING
-    uint32_t small_reads; /* used to detect ineffective reads from file */
-#endif
-};
-
-static
-rc_t CC KLoaderFile_Destroy(KLoaderFile* self)
-{
-    if( self != NULL ) {
-        DBG(("%s %s\n", __func__, self->realname));
-        KFileRelease(self->kfile);
-        self->kfile = NULL;
-    }
-    return 0;
-}
-
-static
-struct KSysFile* CC KLoaderFile_GetSysFile(const KLoaderFile *self, uint64_t *offset)
-{
-    return KFileGetSysFile(self ? self->kfile : NULL, offset);
-}
-
-static
-rc_t CC KLoaderFile_RandomAccess(const KLoaderFile *self)
-{
-    return KFileRandomAccess(self ? self->kfile : NULL);
-}
-
-static
-uint32_t CC KLoaderFile_Type(const KLoaderFile *self)
-{
-    if( self && self->kfile ) {
-        return KFileType(self->kfile);
-    }
-    return KDirectoryPathType(self ? self->dir : NULL, "%s", self->realname);
-}
-
-static
-rc_t CC KLoaderFile_Size(const KLoaderFile *self, uint64_t *size)
-{
-    if( self && self->kfile ) {
-        return KFileSize(self->kfile, size);
-    }
-    return KDirectoryFileSize(self ? self->dir : NULL, size, "%s", self->realname);
-}
-
-static
-rc_t CC KLoaderFile_SetSize(KLoaderFile *self, uint64_t size)
-{
-    return RC(rcApp, rcFile, rcUpdating, rcInterface, rcUnsupported);
-}
-
-static
-rc_t CC KLoaderFile_ReadKFile(const KLoaderFile* cself, uint64_t pos, void *buffer, size_t size, size_t *num_read)
-{
-    rc_t rc = KFileRead(cself ? cself->kfile : NULL, pos, buffer, size, num_read);
-    DBG(("%s: %s: %lu\n", __func__, cself->realname, *num_read));
-    if( rc == 0 && cself->job != NULL ) {
-        if( pos > cself->kfile_pos ) {
-            rc = KLoadProgressbar_Process(cself->job, pos - cself->kfile_pos, false);
-            ((KLoaderFile*)cself)->kfile_pos = pos;
-        }
-        pos += *num_read;
-        if( pos > cself->kfile_pos ) {
-            rc = KLoadProgressbar_Process(cself->job, pos - cself->kfile_pos, false);
-            ((KLoaderFile*)cself)->kfile_pos= pos;
-        }
-    }
-    return rc;
-}
-
-static
-rc_t CC KLoaderFile_WriteKFile(KLoaderFile *self, uint64_t pos, const void *buffer, size_t size, size_t *num_writ)
-{
-    return RC(rcApp, rcFile, rcWriting, rcInterface, rcUnsupported);
-}
-
-static KFile_vt_v1 KLoaderFile_vtbl = {
-    1, 1,
-    KLoaderFile_Destroy,
-    KLoaderFile_GetSysFile,
-    KLoaderFile_RandomAccess,
-    KLoaderFile_Size,
-    KLoaderFile_SetSize,
-    KLoaderFile_ReadKFile,
-    KLoaderFile_WriteKFile,
-    KLoaderFile_Type
-};
-
-static
-rc_t KLoaderFile_Open(KLoaderFile* self)
-{
-    rc_t rc = 0;
-
-    DBG(("%s opening %s\n", __func__, self->realname));
-    if( (rc = KDirectoryOpenFileRead(self->dir, &self->kfile, "%s", self->realname)) == 0 ) {
-        if( self->has_md5 ) {
-            const KFile *md5File = NULL;
-            DBG(("%s opening as md5 wrapped %s\n", __func__, self->realname));
-            if( (rc = KFileMakeMD5Read(&md5File, self->file, self->md5_digest)) == 0) {
-                self->file = md5File;
-            }
-        }
-        if( rc == 0 ) {
-            const KFile *z = NULL;
-            switch(self->compress_type) {
-                case compress_none:
-                    break;
-                case compress_gzip:
-                    DBG(("%s opening as gzip wrapped %s\n", __func__, self->realname));
-                    if( (rc = KFileMakeGzipForRead(&z, self->file)) == 0 ) {
-                        KFileRelease(self->file);
-                        self->file = z;
-                    }
-                    break;
-                case compress_bzip2:
-                    DBG(("%s opening as bzip2 wrapped %s\n", __func__, self->realname));
-                    if( (rc = KFileMakeBzip2ForRead(&z, self->file)) == 0 ) {
-                        KFileRelease(self->file);
-                        self->file = z;
-                    }
-                    break;
-                default:
-                    rc = RC(rcApp, rcFile, rcOpening, rcType, rcUnexpected);
-                    break;
-            }
-#if ! WINDOWS
-            if( rc == 0 && self->ahead ) {
-                const KFile *z = NULL;
-                if( (rc = KQueueFileMakeRead(&z, self->pos, self->file,
-                                             self->buffer_size * 10,  self->buffer_size, 0)) == 0 ) {
-                    KFileRelease(self->file);
-                    self->file = z;
-                }
-            }
-#endif
-        }
-    }
-    if( rc != 0 ) {
-        PLOGERR(klogErr, (klogErr, rc, "opening $(file)", PLOG_S(file), self->filename));
-        KFileRelease(self->file);
-    }
-    return rc;
-}
-
-/* Fill
- *  fill buffer as far as possible, shift unread data in buffer to buffer start
- */
-static
-rc_t KLoaderFile_Fill(KLoaderFile *self)
-{
-    rc_t rc = 0;
-
-    if (self->kfile == NULL) {
-        rc = KLoaderFile_Open(self);
-    }
-    if( rc == 0 ) {
-        /* determine space in buffer available */
-        size_t to_read = self->buffer_size - self->avail;
-        if( to_read > 0 ) {
-#if _DEBUGGING
-            if( to_read < self->buffer_size * 0.5 ) {
-                self->small_reads++;
-                if( self->small_reads > 10 ) {
-                    PLOGMSG(klogWarn, (klogWarn, "$(filename) INEFFECTIVE READING: $(times) times, now $(bytes) bytes",
-                        PLOG_3(PLOG_S(filename),PLOG_U32(times),PLOG_U32(bytes)), self->filename, self->small_reads, to_read));
-                }
-            }
-#endif
-            /* shift left unread data */
-            memmove(self->buffer, self->buffer_pos, self->avail);
-            /* skip read chunk in buffer */
-            self->pos += self->buffer_pos - self->buffer;
-            /* reset pointer */
-            self->buffer_pos = self->buffer;
-            do { /* fill buffer up to eof */
-                size_t num_read = 0;
-                if( (rc = KFileRead(self->file, self->pos + self->avail,
-                                    &self->buffer[self->avail], to_read, &num_read)) == 0 ) {
-                    self->eof = (num_read == 0);
-                    self->avail += (uint32_t) num_read;
-                    to_read -= num_read;
-                    DBG(("KLoaderFile read %s from %lu %u bytes%s\n",
-                         self->filename, self->pos + self->avail - num_read, num_read, self->eof ? " EOF" : ""));
-                }
-            } while( rc == 0 && to_read > 0 && !self->eof );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KLoaderFile_IsEof(const KLoaderFile* cself, bool* eof)
-{
-    if( cself == NULL || eof == NULL ) {
-        return RC(rcApp, rcFile, rcConstructing, rcParam, rcNull);
-    }
-    /* end of file is when file is at eof and nothing in buffer or last readline returned the buffer */
-    *eof = cself->eof && ((cself->avail - cself->eol) == 0);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLoaderFile_Close(const KLoaderFile* cself)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL ) {
-        rc = RC(rcApp, rcFile, rcConstructing, rcParam, rcNull);
-    } else {
-        /* TBD possible delays if file has md5 set */
-        DBG(("%s closing %s\n", __func__, cself->realname));
-        rc = KFileRelease(cself->file);
-        KFileAddRef(&cself->dad);
-        ((KLoaderFile*)cself)->file = &cself->dad;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KLoaderFile_Reset(const KLoaderFile* cself)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL ) {
-        rc = RC(rcApp, rcFile, rcConstructing, rcParam, rcNull);
-    } else {
-        KLoaderFile* self = (KLoaderFile*)cself;
-        if( cself->pos != 0 && (cself->ahead || cself->compress_type != compress_none) ) {
-            /* threaded buffering || data in buffer is not first portion of the file */
-            rc = KLoaderFile_Close(cself);
-            self->avail = 0;
-            self->buffer[0] = 0;
-            self->eof = false;
-        } else {
-            self->avail += (uint32_t) ( self->buffer_pos - self->buffer );
-        }
-        self->pos = 0;
-        self->eol = 0;
-        self->line_no = 0;
-        self->buffer_pos = self->buffer;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KLoaderFile_SetReadAhead(const KLoaderFile* cself, bool read_ahead)
-{
-    if( cself == NULL ) {
-        return RC(rcApp, rcFile, rcConstructing, rcParam, rcNull);
-    }
-#if ! WINDOWS
-    ((KLoaderFile*)cself)->ahead = read_ahead;
-#endif
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLoaderFile_LOG(const KLoaderFile* cself, KLogLevel lvl, rc_t rc, const char *msg, const char *fmt, ...)
-{
-    va_list args;
-    va_start(args, fmt);
-    rc = KLoaderFile_VLOG(cself, lvl, rc, msg, fmt, args);
-    va_end(args);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KLoaderFile_VLOG(const KLoaderFile* cself, KLogLevel lvl, rc_t rc, const char *msg, const char *fmt, va_list args)
-{
-    if( cself == NULL || (msg == NULL && rc == 0) ) {
-        rc = RC(rcApp, rcFile, rcAccessing, rcParam, rcInvalid);
-        LOGERR(klogErr, rc, __func__);
-    }  else if( msg == NULL && rc != 0 ) {
-        if( cself->line_no == 0 ) {
-            PLOGERR(lvl, (lvl, rc, "$(file):$(offset)", "file=%s,offset=%lu", cself->filename, cself->pos));
-        } else {
-            PLOGERR(lvl, (lvl, rc, "$(file):$(line)", "file=%s,line=%lu", cself->filename, cself->line_no));
-        }
-    } else {
-        rc_t fmt_rc;
-        char xfmt[4096];
-        const char* f = fmt ? fmt : "";
-        const char* c = fmt ? "," : "";
-
-        if( cself->line_no == 0 ) {
-            fmt_rc = string_printf(xfmt, sizeof xfmt, NULL, "file=%s,offset=%lu%s%s", cself->filename, cself->pos, c, f);
-        } else {
-            fmt_rc = string_printf(xfmt, sizeof xfmt, NULL, "file=%s,line=%lu%s%s", cself->filename, cself->line_no, c, f);
-        }
-        if ( fmt_rc == 0 ) {
-            fmt = xfmt;
-        }
-        if( rc == 0 ) {
-            VLOGMSG(lvl, (lvl, msg, fmt, args));
-        } else {
-            VLOGERR(lvl, (lvl, rc, msg, fmt, args));
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KLoaderFile_Offset(const KLoaderFile* cself, uint64_t* offset)
-{
-    if( cself == NULL || offset == NULL ) {
-        return RC(rcApp, rcFile, rcConstructing, rcParam, rcNull);
-    }
-    *offset = cself->pos + (cself->buffer_pos - cself->buffer);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLoaderFile_Line(const KLoaderFile* cself, uint64_t* line)
-{
-    if( cself == NULL || line == NULL ) {
-        return RC(rcApp, rcFile, rcConstructing, rcParam, rcNull);
-    }
-    *line = cself->line_no;
-    return 0;
-}
-
-static
-rc_t KLoaderFile_AllocateBuffer(KLoaderFile *self)
-{
-    self->buffer_size = KLoaderFile_BUFFERSIZE;
-    if( (self->buffer = malloc(self->buffer_size)) == NULL ) {
-        self->buffer_size = 0;
-        return RC(rcApp, rcFile, rcConstructing, rcMemory, rcExhausted);
-    }
-    self->buffer[0] = 0;
-    self->buffer_pos = self->buffer;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLoaderFile_Readline(const KLoaderFile* cself, const void** buffer, size_t* length)
-{
-    rc_t rc = 0;
-
-    if(cself == NULL || buffer == NULL || length == NULL) {
-        rc = RC( rcApp, rcFile, rcAccessing, rcParam, rcNull);
-    } else {
-        KLoaderFile *self = (KLoaderFile*)cself;
-        uint8_t* nl;
-        bool refilled = false;
-        bool eof;
-        
-        rc = KLoaderFile_IsEof(cself, &eof);
-        if( rc == 0 && eof ) {
-            *buffer = NULL;
-            return 0;
-        }
-        
-        while( rc == 0 ) {
-            bool CR_last = false;
-            int i, cnt = self->avail - self->eol;
-            uint8_t* buf = &self->buffer_pos[self->eol];
-            *buffer = buf;
-            /* find first eol from current position */
-            for(nl = NULL, i = 0; i < cnt && nl == NULL; i++) {
-                if(buf[i] == '\n' || buf[i] == '\r') {
-                    nl = &buf[i];
-                }
-            }
-            if( nl != NULL || refilled ) {
-                break;
-            }
-            refilled = true;
-            /* none found we need to push out processed portion and load full buffer */
-            if( self->eol > 0 ) {
-                /* mark that line ended on buffer end and last char in buffer is \r */
-                CR_last = self->eol == self->avail && self->buffer_pos[self->eol - 1] == '\r';
-                self->buffer_pos += self->eol;
-                self->avail -= self->eol;
-                self->eol = 0;
-            }
-            if( (rc = KLoaderFile_Fill(self)) == 0 ) {
-                if( CR_last && self->buffer_pos[0] == '\n' ) {
-                    /* in previous chunk last char was \r and in next chunk 1st char is \n
-                    this is \r\n seq split by buffer, need to ignore \n */
-                    self->eol++;
-                }
-            }
-        }
-        if( rc == 0 ) {
-            if( nl == NULL ) {
-                self->eol = self->avail;
-                *length = self->avail;
-                if( self->buffer_size == self->avail ) {
-                    /* buffer could be copied and next call will provide tail of line */
-                    rc = RC( rcApp, rcFile, rcReading, rcString, rcTooLong);
-                } 
-            } else {
-                *length = nl - (uint8_t*)*buffer;
-                self->eol = (uint32_t) ( nl - self->buffer_pos + 1 );
-                if( *nl == '\r' && nl < &self->buffer[self->buffer_size - 1] && *(nl + 1) == '\n' ) {
-                    /* \r\n */
-                    self->eol++;
-                }
-                self->line_no++;
-            }
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KLoaderFile_Read(const KLoaderFile* cself, size_t advance, size_t size, const void** buffer, size_t* length)
-{
-    rc_t rc = 0;
-
-    if (cself == NULL || buffer == NULL || length == NULL ) {
-        return RC(rcApp, rcFile, rcPositioning, rcSelf, rcNull);
-    } else {
-        KLoaderFile* self = (KLoaderFile*)cself;
-        if( advance > 0 ) {
-            if(advance >= self->avail) {
-                self->pos += advance;
-                self->avail = 0;
-                self->eol = 0;
-            } else {
-                self->buffer_pos += advance;
-                self->avail -= (uint32_t) advance;
-                self->eol = (uint32_t) ( self->eol > advance ? self->eol - advance : 0 );
-            }
-        }
-        if( size > self->avail || self->avail == 0 ) {
-            rc = KLoaderFile_Fill(self);
-        }
-        if( rc == 0 ) {
-            *buffer = self->buffer_pos;
-            *length = self->avail;
-            if( self->avail == 0 && self->eof ) {
-                *buffer = NULL;
-            } else if( size > self->avail ) {
-                if( !self->eof ) {
-                    rc = RC( rcApp, rcFile, rcReading, rcBuffer, rcInsufficient);
-                }
-            } else if( size > 0 ) {
-                *length = size;
-            }
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KLoaderFile_Name(const KLoaderFile *self, const char **name)
-{
-    if( self == NULL || name == NULL ) {
-        return RC(rcApp, rcFile, rcAccessing, rcParam, rcNull);
-    }
-    *name = self->filename;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLoaderFile_FullName(const KLoaderFile *self, const char **name)
-{
-    if( self == NULL || name == NULL ) {
-        return RC(rcApp, rcFile, rcAccessing, rcParam, rcNull);
-    } else {
-        *name = self->realname;
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLoaderFile_ResolveName(const KLoaderFile *self, char *resolved, size_t rsize)
-{
-    if( self == NULL || resolved == NULL ) {
-        return RC(rcApp, rcFile, rcAccessing, rcParam, rcNull);
-    }
-    return KDirectoryResolvePath(self->dir, true, resolved, rsize, "%s", self->realname);
-}
-
-LIB_EXPORT rc_t CC KLoaderFile_Release(const KLoaderFile* cself, bool exclude_from_progress)
-{
-    rc_t rc = 0;
-
-    if( cself != NULL ) {
-        KLoaderFile* self = (KLoaderFile*)cself;
-        DBG(("%s: '%s'%s\n", __func__, cself->filename, exclude_from_progress ? " excluded" : ""));
-        /* may return md5 check error here */
-        if( (rc = KFileRelease(self->file)) == 0 && !exclude_from_progress ) {
-            PLOGMSG(klogInt, (klogInfo, "done file $(file) $(bytes) bytes",
-                    "severity=file,file=%s,bytes=%lu",
-                    self->filename, self->pos + (self->buffer_pos - self->buffer)));
-        }
-        KLoadProgressbar_Release(self->job, exclude_from_progress);
-        KDirectoryRelease(self->dir);
-        free(self->filename);
-        free(self->realname);
-        free(self->buffer);
-        free(self);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KLoaderFile_Make(const KLoaderFile **file, const KDirectory* dir, const char* filename,
-                                    const uint8_t* md5_digest, bool read_ahead)
-{
-    rc_t rc = 0;
-    KLoaderFile* obj = NULL;
-
-    if( file == NULL || dir == NULL || filename == NULL ) {
-        rc = RC(rcApp, rcFile, rcConstructing, rcParam, rcNull);
-    } else {
-        *file = NULL;
-        if( (obj = calloc(1, sizeof(*obj))) == NULL ||
-            (obj->filename = strdup(filename)) == NULL ) {
-            rc = RC(rcApp, rcFile, rcConstructing, rcMemory, rcExhausted);
-        } else {
-            if( (rc = KDirectoryAddRef(dir)) == 0 ) {
-                obj->dir = dir;
-                if( md5_digest != NULL ) {
-                    obj->has_md5 = true;
-                    memcpy(obj->md5_digest, md5_digest, sizeof(obj->md5_digest));
-                }
-                if( (rc = KLoaderFile_AllocateBuffer(obj)) == 0 ) {
-                    char resolved[4096];
-                    char* ext = NULL;
-
-                    strcpy(resolved, filename);
-                    ext = strrchr(resolved, '.');
-                    DBG(("%s adding %s\n", __func__, resolved));
-                    rc = KLoadProgressbar_File(&obj->job, resolved, obj->dir);
-                    if( ext != NULL && strcmp(ext, ".gz") == 0 ) {
-                        obj->compress_type = compress_gzip;
-                    } else if( ext != NULL && strcmp(ext, ".bz2") == 0 ) {
-                        obj->compress_type = compress_bzip2;
-                    }
-                    if( rc != 0 && obj->compress_type != compress_none ) {
-                        *ext = '\0';
-                        DBG(("%s retry adding as %s\n", __func__, resolved));
-                        if( (rc = KLoadProgressbar_File(&obj->job, resolved, obj->dir)) == 0 ) {
-                            obj->has_md5 = false;
-                            obj->compress_type = compress_none;
-                        }
-                    }
-                    if( rc == 0 &&
-                        (rc = KFileInit(&obj->dad, (const KFile_vt*)&KLoaderFile_vtbl, "KLoaderFile", filename, true, false)) == 0 ) {
-                        obj->file = &obj->dad;
-#if WINDOWS
-                        obj->ahead = false;
-#else
-                        obj->ahead = read_ahead;
-#endif
-                        obj->realname = strdup(resolved);
-                        if( obj->realname == NULL ) {
-                            rc = RC(rcApp, rcFile, rcConstructing, rcMemory, rcExhausted);
-                        }
-                    }
-                }
-            }
-        }
-    }
-    if( rc == 0 ) {
-        *file = obj;
-    } else {
-        *file = NULL;
-        KLoaderFile_Release(obj, false);
-    }
-    return rc;
-}
diff --git a/libs/kapp/loader-meta.c b/libs/kapp/loader-meta.c
deleted file mode 100644
index fa45e78..0000000
--- a/libs/kapp/loader-meta.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*==============================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <kapp/extern.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <kdb/meta.h>
-#include <kapp/loader-meta.h>
-#include <kapp/main.h>
-
-#include <string.h>
-#include <assert.h>
-#include <time.h>
-
-static
-rc_t MakeVersion(ver_t vers, char* b, size_t bsize)
-{
-    assert(b != NULL && bsize != 0);
-    return string_printf(b, bsize, NULL, "%V", vers);
-}
-
-LIB_EXPORT rc_t CC KLoaderMeta_Write(KMDataNode* root,
-                                     const char* argv0, const char* argv0_date,
-                                     const char* app_name, ver_t app_version)
-{
-    return KLoaderMeta_WriteWithVersion ( root, argv0, argv0_date, KAppVersion(), app_name, app_version );
-}
-
-rc_t CC KLoaderMeta_WriteWithVersion(struct KMDataNode* root,
-                                     const char* argv0, const char* argv0_date, ver_t argv0_version,
-                                     const char* app_name, ver_t app_version)
-{
-    rc_t rc = 0;
-    KMDataNode *node = NULL;
-
-    if( root == NULL || argv0 == NULL || argv0_date == NULL ) {
-        rc = RC(rcApp, rcMetadata, rcWriting, rcParam, rcNull);
-    } else if( (rc = KMDataNodeOpenNodeUpdate(root, &node, "SOFTWARE")) == 0 ) {
-        char str_vers[64];
-        KMDataNode *subNode = NULL;
-        if( (rc = KMDataNodeOpenNodeUpdate(node, &subNode, "loader")) == 0 ) {
-            if( (rc = MakeVersion(argv0_version, str_vers, sizeof(str_vers))) == 0 ) {
-                rc = KMDataNodeWriteAttr(subNode, "vers", str_vers);
-            }
-            if(rc == 0) {
-                rc = KMDataNodeWriteAttr(subNode, "date", argv0_date);
-            }
-            if(rc == 0) {
-                const char* tool_name = strrchr(argv0, '/');
-                const char* r = strrchr(argv0, '\\');
-                if( tool_name != NULL && r != NULL && tool_name < r ) {
-                    tool_name = r;
-                }
-                if( tool_name++ == NULL) {
-                    tool_name = argv0;
-                }
-                rc = KMDataNodeWriteAttr(subNode, "name", tool_name);
-            }
-            KMDataNodeRelease(subNode);
-        }
-        if(rc == 0 && (rc = KMDataNodeOpenNodeUpdate(node, &subNode, "formatter")) == 0 ) {
-            if( (rc = MakeVersion(app_version, str_vers, sizeof(str_vers))) == 0 ) {
-                rc = KMDataNodeWriteAttr(subNode, "vers", str_vers);
-            }
-            if(rc == 0) {
-                rc = KMDataNodeWriteAttr(subNode, "name", app_name ? app_name : "internal");
-            }
-            KMDataNodeRelease(subNode);
-        }
-        KMDataNodeRelease(node);
-    }
-    if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(root, &node, "LOAD")) == 0 ) {
-        KMDataNode *subNode = NULL;
-        if( (rc = KMDataNodeOpenNodeUpdate(node, &subNode, "timestamp")) == 0 ) {
-            time_t t = time(NULL);
-            rc = KMDataNodeWrite(subNode, &t, sizeof(t));
-            KMDataNodeRelease(subNode);
-        }
-        KMDataNodeRelease(node);
-    }
-    return rc;
-}
diff --git a/libs/kapp/log-xml.c b/libs/kapp/log-xml.c
deleted file mode 100644
index b3b8df4..0000000
--- a/libs/kapp/log-xml.c
+++ /dev/null
@@ -1,416 +0,0 @@
-/*==============================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <kapp/extern.h>
-#include <kapp/main.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/status.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <kxml/xml.h>
-#include <kfs/file.h>
-#include <kfs/kfs-priv.h>
-#include <kfs/directory.h>
-#include <klib/rc.h>
-#include <kapp/log-xml.h>
-
-#include <os-native.h>
-
-#include <ctype.h>
-#include <string.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <assert.h>
-
-#define DBG(msg) DBGMSG(DBG_LOADLIB,DBG_FLAG(DBG_LOADLIB_XLOG), msg)
-
-enum OptDefIndex {
-    eopt_file = 0,
-    eopt_fd
-};
-
-const char* XMLLogger_file_usage[] = {"produce XML-formatted log file", NULL};
-const char* XMLLogger_fd_usage[] = {NULL, "produce XML-formatted output to given file descriptor", NULL};
-
-const OptDef XMLLogger_Args[] =
-{
-    {"xml-log", "z", NULL, XMLLogger_file_usage, 1, true, false},
-    {"xml-log-fd", NULL, NULL, XMLLogger_fd_usage, 1, true, false}
-};
-const size_t XMLLogger_ArgsQty = sizeof(XMLLogger_Args) / sizeof(XMLLogger_Args[0]);
-
-typedef struct XMLFormatterFile
-{
-    KFile* file;
-    uint64_t pos;
-} XMLFormatterFile;
-
-typedef struct XMLFormatterData
-{
-    XMLFormatterFile* file;
-    KFmtHandler fmt;
-    KWrtHandler wrt;
-} XMLFormatterData;
-
-struct XMLLogger {
-    XMLFormatterFile file;
-    XMLFormatterData log;
-    XMLFormatterData loglib;
-    XMLFormatterData sts;
-    XMLFormatterData stslib;
-};
-
-LIB_EXPORT
-rc_t CC XMLLogger_Encode(const char* src, char *dst, size_t dst_sz, size_t *num_writ)
-{
-    rc_t rc = 0;
-
-    if( src == NULL || dst == NULL || num_writ == NULL ) {
-        rc = RC(rcApp, rcArgv, rcParsing, rcParam, rcNull);
-    } else {
-        *num_writ = 0;
-        do {
-            size_t bytes;
-            const char* p;
-            switch(*src) {
-                case '\'':
-                    bytes = 6;
-                    p = "'";
-                    break;
-                case '"':
-                    bytes = 6;
-                    p = """;
-                    break;
-                case '&':
-                    bytes = 5;
-                    p = "&";
-                    break;
-                case '<':
-                    bytes = 4;
-                    p = "<";
-                    break;
-                case '>':
-                    bytes = 4;
-                    p = ">";
-                    break;
-                default:
-                    bytes = 1;
-                    p = src;
-                    break;
-            }
-            if( (*num_writ + bytes) > dst_sz ) {
-                rc = RC(rcApp, rcLog, rcEncoding, rcBuffer, rcInsufficient);
-                break;
-            } else {
-                memcpy(dst, p, bytes);
-                *num_writ = *num_writ + bytes;
-                dst += bytes;
-            }
-        } while(*src++ != '\0');
-        *num_writ = *num_writ - 1;
-    }
-    return rc;
-}
-
-static
-rc_t CC LoaderXMLFormatter( void* data, KWrtHandler* writer,
-                            size_t argc, const wrt_nvp_t args[],
-                            size_t envc, const wrt_nvp_t envs[])
-
-{
-    rc_t rc = 0;
-    size_t i, remaining, num_writ = 0;
-    XMLFormatterData* self = (XMLFormatterData*)data;
-    char buffer[4096];
-    const char* severity, *msg_val = NULL;
-    bool severity_std = false;
-    char* pbuffer;
-    const char* const tag_nvp_name = "severity";
-    const wrt_nvp_t* msg_nvp = NULL;
-    static const char* tags[] = {
-        "fatal",
-        "system",
-        "internal",
-        "error",
-        "warning",
-        "info"
-    };
-
-    msg_nvp = wrt_nvp_find(envc, envs, "message");
-    if( msg_nvp != NULL ) {
-        msg_val = msg_nvp->value;
-    }
-    severity = wrt_nvp_find_value(argc, args, tag_nvp_name);
-    if( severity == NULL ) {
-        severity = wrt_nvp_find_value(envc, envs, tag_nvp_name);
-        if( severity != NULL ) {
-            severity_std = true;
-            /* translate std severity name to full name */
-            for(i = 0; i < sizeof(tags)/sizeof(tags[0]); i++) {
-                if( strncmp(severity, tags[i], strlen(severity)) == 0 ) {
-                    severity = tags[i];
-                    break;
-                }
-            }
-        }
-    }
-    if( severity == NULL ) {
-        severity = "status";
-    }
-
-#define FIX_UP() if(rc != 0){break;} remaining -= num_writ; pbuffer += num_writ
-    
-    pbuffer = buffer;
-    remaining = sizeof(buffer);
-    do {
-        size_t k, pq = envc;
-        const wrt_nvp_t* p = envs;
-        const char* subst = NULL;
-
-        rc = LogInsertSpace("<", pbuffer, remaining, &num_writ);
-        FIX_UP();
-        rc = LogInsertSpace(severity, pbuffer, remaining, &num_writ);
-        FIX_UP();
-        /* print env first and than args! */
-        for(k = 0; rc == 0 && k < 2; k++) {
-            for(i = 0; i < pq; i++ ) {
-                if( strcmp(p[i].name, tag_nvp_name) == 0 ) {
-                    continue;
-                }
-                if( p == args ) {
-                    if( i == 0 && msg_nvp != NULL ) {
-                        /* grab args attr buffer start */
-                        subst = pbuffer;
-                    }
-                    if( severity_std ) {
-                        /* allow only specific attributes from message into xml log
-                           for LOG calls with standard severity */
-                        int x, yes = 0;
-                        static const char* allowed_attr[] = {
-                            "file", "line", "offset",
-                            "spot", "spot_name", "spotname"
-                        };
-                        for(x = 0; x < sizeof(allowed_attr)/sizeof(allowed_attr[0]); x++) {
-                            if( strcasecmp(p[i].name, allowed_attr[x]) == 0 ) {
-                                yes = 1;
-                                break;
-                            }
-                        }
-                        if( !yes ) {
-                            continue;
-                        }
-                    }
-                }
-                rc = LogInsertSpace(" ", pbuffer, remaining, &num_writ);
-                FIX_UP();
-                rc = XMLLogger_Encode(p[i].name, pbuffer, remaining, &num_writ);
-                FIX_UP();
-                rc = LogInsertSpace("=\"", pbuffer, remaining, &num_writ);
-                FIX_UP();
-                rc = XMLLogger_Encode(p[i].value, pbuffer, remaining, &num_writ);
-                FIX_UP();
-                rc = LogInsertSpace("\"", pbuffer, remaining, &num_writ);
-                FIX_UP();
-            }
-            p = args;
-            pq = argc;
-        }
-        if( subst != NULL && subst[0] != '\0' ) {
-            /* hack 'message' to print curr argv to std log as text attr="value" */
-            ((wrt_nvp_t*)msg_nvp)->value = subst + 1; /* \0 terminated pre LogInsertSpace behavior */
-            if( (rc = self->fmt.formatter(self->fmt.data, &self->wrt, 0, NULL, envc, envs)) != 0 ) {
-                break;
-            }
-            ((wrt_nvp_t*)msg_nvp)->value = msg_val;
-        }
-        rc = LogInsertSpace("/>\n", pbuffer, remaining, &num_writ);
-        FIX_UP();
-    } while(false);
-
-    if( self->file->file != NULL ) {
-        if( rc != 0 ) {
-            pbuffer = buffer;
-            remaining = sizeof(buffer);
-            rc = string_printf(pbuffer, remaining, & num_writ, "<error severity=\"err\" message=\"XML log failed: %R\"/>\n", rc);
-            pbuffer += num_writ <= remaining ? num_writ : 0;
-        }
-        rc = KFileWrite(self->file->file, self->file->pos, buffer, pbuffer - buffer, &num_writ);
-        self->file->pos += num_writ;
-    }
-    rc = self->fmt.formatter(self->fmt.data, &self->wrt, argc, args, envc, envs);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC XMLLogger_Make(const XMLLogger** cself, KDirectory* dir, const Args *args)
-{
-    rc_t rc = 0;
-    const char* path = NULL, *sfd = NULL;
-    int fd = -1;
-    uint32_t count;
-
-    if( (rc = ArgsOptionCount(args, XMLLogger_Args[eopt_file].name, &count)) != 0 || count > 1 ) {
-        rc = rc ? rc : RC(rcApp, rcArgv, rcParsing, rcParam, rcExcessive);
-    } else if( count > 0 && (rc = ArgsOptionValue(args, XMLLogger_Args[eopt_file].name, 0, (const void **)&path)) != 0 ) {
-
-    } else if( (rc = ArgsOptionCount(args, XMLLogger_Args[eopt_fd].name, &count)) != 0 || count > 1 ) {
-        rc = rc ? rc : RC(rcApp, rcArgv, rcParsing, rcParam, rcExcessive);
-    } else if( count > 0 && (rc = ArgsOptionValue(args, XMLLogger_Args[eopt_fd].name, 0, (const void **)&sfd)) != 0 ) {
-
-    } else {
-        do {
-            long val = 0;
-            char* end = NULL;
-
-            if( sfd != NULL ) {
-                if( path != NULL ) {
-                    rc = RC(rcApp, rcArgv, rcParsing, rcParam, rcExcessive);
-                    break;
-                }
-                errno = 0;
-                val = strtol(sfd, &end, 10);
-                if( errno != 0 || sfd == end || *end != '\0' || val < 0 || val > INT_MAX ) {
-                    rc = RC(rcApp, rcArgv, rcReading, rcParam, rcInvalid);
-                    break;
-                }
-                fd = val;
-            }
-            rc = XMLLogger_Make2(cself, dir, path, fd);
-        } while( false );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC XMLLogger_Make2(const XMLLogger** self, KDirectory* dir, const char* logpath, const int fd)
-{
-    rc_t rc = 0;
-    XMLLogger* obj;
-    KDirectory* my_dir = NULL;
-
-    const uint32_t lopt = klogFmtTimestamp | klogFmtSeverity |
-                          klogFmtMessage | klogFmtAppName | klogFmtAppVersion | klogFmtReasonShort;
-
-    const uint32_t sopt = kstsFmtTimestamp | kstsFmtMessage | kstsFmtAppName | kstsFmtAppVersion;
-
-    KLogFmtFlagsSet(lopt);
-    KLogLibFmtFlagsSet(lopt);
-    KStsFmtFlagsSet(sopt);
-    KStsLibFmtFlagsSet(sopt);
-
-    obj = calloc(1, sizeof(*obj));
-    if( obj == NULL ) {
-        rc = RC(rcApp, rcLog, rcAllocating, rcMemory, rcExhausted);
-    } else if( fd < 0 && dir == NULL && (rc = KDirectoryNativeDir(&my_dir)) != 0 ) {
-    } else if( fd >= 0 && (rc = KFileMakeFDFileWrite(&obj->file.file, false, fd)) != 0 ) {
-    } else if( logpath != NULL && fd < 0 && (rc = KDirectoryCreateFile(dir ? dir : my_dir, &obj->file.file, false, 0644, kcmInit, "%s", logpath)) != 0 ) {
-    } else {
-    
-        obj->file.pos = 0;
-        obj->log.file = &obj->file;
-        obj->log.fmt.formatter = KLogFmtWriterGet();
-        obj->log.fmt.data = KLogFmtDataGet();
-        obj->log.wrt.writer = KLogWriterGet();
-        obj->log.wrt.data = KLogDataGet();
-
-        obj->loglib.file = &obj->file;
-        obj->loglib.fmt.formatter = KLogLibFmtWriterGet();
-        obj->loglib.fmt.data = KLogLibFmtDataGet();
-        obj->loglib.wrt.writer = KLogLibWriterGet();
-        obj->loglib.wrt.data = KLogLibDataGet();
-
-        obj->sts.file = &obj->file;
-        obj->sts.fmt.formatter = KStsFmtWriterGet();
-        obj->sts.fmt.data = KStsFmtDataGet();
-        obj->sts.wrt.writer = KStsWriterGet();
-        obj->sts.wrt.data = KStsDataGet();
-
-        obj->stslib.file = &obj->file;
-        obj->stslib.fmt.formatter = KStsLibFmtWriterGet();
-        obj->stslib.fmt.data = KStsLibFmtDataGet();
-        obj->stslib.wrt.writer = KStsLibWriterGet();
-        obj->stslib.wrt.data = KStsLibDataGet();
-
-        if( (rc = KLogFmtHandlerSet(LoaderXMLFormatter, lopt, &obj->log)) == 0 &&
-            (rc = KLogLibFmtHandlerSet(LoaderXMLFormatter, lopt, &obj->loglib)) == 0 &&
-            (rc = KStsFmtHandlerSet(LoaderXMLFormatter, sopt, &obj->sts)) == 0 &&
-            (rc = KStsLibFmtHandlerSet(LoaderXMLFormatter, sopt, &obj->stslib)) == 0 ) {
-            /* make log valid XML */
-            if( obj->file.file != NULL ) {
-                size_t num_writ = 0;
-                rc = KFileWrite(obj->file.file, obj->file.pos, "<Log>\n", 6, &num_writ);
-                obj->file.pos += num_writ;
-            }
-        }
-    }
-    KDirectoryRelease(my_dir);
-    if( rc == 0 ) {
-        *self = obj;
-        if( fd >= 0 ) {
-            DBG(("XML Log file set to handle %d\n", fd));
-        } else if( logpath != NULL) {
-            DBG(("XML Log file set to %s\n", logpath));
-        } 
-    } else {
-        XMLLogger_Release(obj);
-        *self = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT void CC XMLLogger_Usage(void)
-{
-    size_t i;
-    for(i = 0; i < XMLLogger_ArgsQty; i++ ) {
-        if( XMLLogger_Args[i].help[0] != NULL ) {
-            HelpOptionLine(XMLLogger_Args[i].aliases, XMLLogger_Args[i].name, "logfile", XMLLogger_Args[i].help);
-        }
-    }
-}
-
-LIB_EXPORT void CC XMLLogger_Release(const XMLLogger* cself)
-{
-    if( cself != NULL ) {
-        XMLLogger* self = (XMLLogger*)cself;
-        KLogFmtHandlerSet(self->log.fmt.formatter, 0, self->log.fmt.data);
-        KLogLibFmtHandlerSet(self->loglib.fmt.formatter, 0, self->loglib.fmt.data);
-        KLogHandlerSet(self->log.wrt.writer, self->log.wrt.data);
-        KLogLibHandlerSet(self->loglib.wrt.writer, self->loglib.wrt.data);
-        KStsFmtHandlerSet(self->sts.fmt.formatter, 0, self->sts.fmt.data);
-        KStsLibFmtHandlerSet(self->stslib.fmt.formatter, 0, self->stslib.fmt.data);
-        KStsHandlerSet(self->sts.wrt.writer, self->sts.wrt.data);
-        KStsLibHandlerSet(self->stslib.wrt.writer, self->stslib.wrt.data);
-        /* make log valid XML */
-        if( self->file.file != NULL ) {
-            if( self->file.pos > 0 ) {
-                KFileWrite(self->file.file, self->file.pos, "</Log>\n", 7, NULL);
-            }
-            KFileRelease(self->file.file);
-        }
-        free(self);
-    }
-}
diff --git a/libs/kapp/mac/ram.c b/libs/kapp/mac/ram.c
deleted file mode 100644
index 7c21f6f..0000000
--- a/libs/kapp/mac/ram.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "../main-priv.h"
-#include <kapp/main.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-#include <sys/sysctl.h>
-
-/* KAppGetTotalRam
- *  Mac specific function of getting amount of RAM
- */
-rc_t KAppGetTotalRam ( uint64_t * totalRam )
-{
-    rc_t rc;
-
-    size_t len = sizeof *totalRam;
-    int ret;
-
-    assert ( totalRam != 0 );
-
-    ret = sysctlbyname("hw.memsize", totalRam, &len, NULL, 0 );
-    if ( ret < 0 )
-    {
-		int status = errno;
-        rc = RC ( rcApp, rcNoTarg, rcInitializing, rcMemory, rcFailed );
-        PLOGERR ( klogFatal, ( klogFatal, rc,
-                    "failed to retrieve number of RAM pages. error code: $(status) - $(msg)"
-                    , "status=%d,msg=%!"
-                    , status, status
-                        ));
-        return rc;
-    }
-
-    return 0;
-}
diff --git a/libs/kapp/main-priv.h b/libs/kapp/main-priv.h
deleted file mode 100644
index 7c9c827..0000000
--- a/libs/kapp/main-priv.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_main_priv_
-#define _h_main_priv_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_kapp_extern_
- #include <kapp/extern.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-    
-/*--------------------------------------------------------------------------
- * KMane
- *  invoked by platform specific "main" entrypoint
- */
-
-/* KMane
- *  executable entrypoint "main" is implemented by
- *  an OS-specific wrapper that takes care of establishing
- *  signal handlers, logging, etc.
- *
- *  in turn, OS-specific "main" will invoke "KMain" as
- *  platform independent main entrypoint.
- *
- *  "argc" [ IN ] - the number of textual parameters in "argv"
- *  should never be < 0, but has been left as a signed int
- *  for reasons of tradition.
- *
- *  "argv" [ IN ] - array of NUL terminated strings expected
- *  to be in the shell-native character set: ASCII or UTF-8
- *  element 0 is expected to be executable identity or path.
- */
-rc_t KMane ( int argc, char *argv [] );
-
-/*KAppGetTotalRam
- * returns total physical RAM installed in the system
- * in bytes
- */
-rc_t KAppGetTotalRam ( uint64_t * totalRam );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_main_priv_ */
diff --git a/libs/kapp/main.c b/libs/kapp/main.c
deleted file mode 100644
index 1a6ddae..0000000
--- a/libs/kapp/main.c
+++ /dev/null
@@ -1,516 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kapp/extern.h>
-#include "main-priv.h"
-#include <sysalloc.h>
-#include <kapp/main.h>
-#include <kfg/config.h>
-#include <kproc/procmgr.h>
-#include <klib/report.h>
-#include <klib/writer.h>
-#include <klib/log.h>
-#include <klib/text.h>
-#include <klib/status.h>
-#include <klib/rc.h>
-#include <kns/manager.h>
-
-#if ! NO_KRSRC
-#include <kfc/except.h>
-#include <kfc/rsrc.h>
-#include <kfc/rsrc-global.h>
-#include <kfc/ctx.h>
-#endif
-
-#include <strtol.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-#if 0
-/* NextArg
- *  extracts the next argument from a switch parameter
- *
- *  "arg" is an indirect pointer to somewhere within an
- *  argument string, representing the last character parsed,
- *  e.g. "-auv"
- *         ^    : "arg" indicates the 'a'.
- *  in the example given, NextArg will advance the pointer
- *  to point to the 'u'.
- *
- *  had "arg" pointed instead to the 'v' above, i.e. there
- *  are no characters remaining in "arg" to be parsed, then
- *  an attempt to return the next element of "argv" will be
- *  made by invoking NextArgh.
- *
- *  "arg" [ IN, OUT ] - current argument string as indicated above
- *
- *  "i" [ IN, OUT ] - loop counter. required to be < argc,
- *  advanced if necessary to access next argument in argv.
- *
- *  "argc" [ IN ] - number of arguments in argv
- *
- *  "argv" [ IN ] - program arguments
- *
- *  "handle_null" [ IN, NULL OKAY ] and "data" [ IN, OPAQUE ] -
- *  optional callback function to handle NULL arguments. default
- *  behavior is to log error using "logerr" and invoke "exit".
- */
-const char * CC NextArg ( const char **argp, int *i, int argc, char *argv [],
-    const char * ( CC * handle_null ) ( void *data ), void *data )
-{
-    if ( argp != NULL )
-    {
-        const char *arg = * argp;
-        if ( arg != NULL && arg [ 0 ] != 0 && arg [ 1 ] != 0 )
-        {
-            * argp = "-";
-            return arg + 1;
-        }
-        return NextArgh ( i, argc, argv, handle_null, data );
-    }
-
-    /* report a fatal error if no arg given */
-    if ( handle_null == NULL )
-    {
-        rc_t rc = RC ( rcApp, rcArgv, rcAccessing, rcParam, rcNull );
-        LOGERR ( klogFatal, ( klogFatal, rc, "internal error" ));
-        exit ( 5 );
-    }
-
-    return ( * handle_null ) ( data );
-}
-#endif
-
-rc_t CC KAppCheckEnvironment ( bool require64Bits, uint64_t requireRamSize )
-{
-    rc_t rc;
-    uint64_t totalRam;
-#if _ARCH_BITS != 64
-    if ( require64Bits )
-    {
-        rc = RC ( rcApp, rcNoTarg, rcInitializing, rcResources, rcUnsupported );
-        LOGERR ( klogFatal, rc, "can only be run as 64-bit application" );
-        return rc;
-    }
-#endif
-
-    rc = KAppGetTotalRam ( & totalRam );
-    if ( rc != 0 )
-    {
-        return rc;
-    }
-
-    if ( requireRamSize && totalRam < requireRamSize )
-    {
-        rc = RC ( rcApp, rcNoTarg, rcInitializing, rcResources, rcUnsupported );
-        PLOGERR ( klogFatal, ( klogFatal, rc,  "there is not enough RAM in the system." 
-                                           " required size: $(REQUIRED) B, present: $(PRESENT) B"
-                              , "REQUIRED=%lu,PRESENT=%lu"
-                              , requireRamSize
-                              , totalRam ) );
-        return rc;
-    }
-
-    return 0;
-}
-
-/* AsciiToXXX
- *  replacement for atoi
- *  converts NUL terminated string in "arg" to integer
- *  invokes error handler if there is a format error in string
- *
- *  "arg" [ IN ] - NUL terminated textual representation of integer
- *  obeys standard conversion rules:
- *    starts with "0x" or "0X" - interpret as hex
- *    starts with '0' - interpret as octal
- *    otherwise - interpret as decimal
- *
- *  "handler_error" [ IN, NULL OKAY ] and "data" [ IN, OPAQUE ] -
- *  optional callback function to handle case where "arg" could not
- *  be processed in its entirety. default behavior is to log error
- *  using "logerr" and invoke "exit".
- */
-static
-void CC HandleAsciiToIntError ( const char *arg, void *ignore )
-{
-    rc_t rc;
-
-    if ( arg == NULL )
-        rc = RC ( rcApp, rcNumeral, rcConverting, rcString, rcNull );
-    else if ( arg [ 0 ] == 0 )
-        rc = RC ( rcApp, rcNumeral, rcConverting, rcString, rcEmpty );
-    else
-        rc = RC ( rcApp, rcNumeral, rcConverting, rcString, rcInvalid );
-
-    LOGERR ( klogFatal, rc, "expected numeral" );
-    exit ( 10 );
-}
-
-int32_t CC AsciiToI32 ( const char *arg,
-    void ( CC * handle_error ) ( const char *arg, void *data ), void *data )
-{
-    if ( handle_error == NULL )
-        handle_error = HandleAsciiToIntError;
-
-    if ( arg != NULL && arg [ 0 ] != 0 )
-    {
-        char *end;
-        long int i = strtol ( arg, & end, 0 );
-        if ( end [ 0 ] == 0 )
-        {
-            if ( sizeof i == sizeof ( int32_t ) )
-                return ( int32_t ) i;
-
-            if ( ( ( i < 0 ) && ( ( ( uint64_t ) - i ) >> 32 ) == 0 ) ||
-                 ( ( i > 0 ) && ( ( ( uint64_t ) i ) >> 32 ) == 0 ) )
-                return ( int32_t ) i;
-        }
-    }
-
-    ( * handle_error ) ( arg, data );
-    return 0;
-}
-
-uint32_t CC AsciiToU32 ( const char *arg,
-    void ( CC * handle_error ) ( const char *arg, void *data ), void *data )
-{
-    if ( handle_error == NULL )
-        handle_error = HandleAsciiToIntError;
-
-    if ( arg != NULL && arg [ 0 ] != 0 )
-    {
-        char *end;
-        unsigned long int i = strtoul ( arg, & end, 0 );
-        if ( end [ 0 ] == 0 )
-        {
-            if ( sizeof i == sizeof ( uint32_t ) )
-                return ( uint32_t ) i;
-
-            if ( ( ( ( uint64_t ) i ) >> 32 ) == 0 )
-                return ( uint32_t ) i;
-        }
-    }
-
-    ( * handle_error ) ( arg, data );
-    return 0;
-}
-
-int64_t CC AsciiToI64 ( const char *arg,
-    void ( CC * handle_error ) ( const char *arg, void *data ), void *data )
-{
-    if ( handle_error == NULL )
-        handle_error = HandleAsciiToIntError;
-
-    if ( arg != NULL && arg [ 0 ] != 0 )
-    {
-        char *end;
-        int64_t i = strtoi64 ( arg, & end, 0 );
-
-        if ( end [ 0 ] == 0 )
-            return i;
-    }
-
-    ( * handle_error ) ( arg, data );
-    return 0;
-}
-
-uint64_t CC AsciiToU64 ( const char *arg,
-    void ( CC * handle_error ) ( const char *arg, void *data ), void *data )
-{
-    if ( handle_error == NULL )
-        handle_error = HandleAsciiToIntError;
-
-    if ( arg != NULL && arg [ 0 ] != 0 )
-    {
-        char *end;
-        uint64_t i = strtou64 ( arg, & end, 0 );
-
-        if ( end [ 0 ] == 0 )
-            return i;
-    }
-
-    ( * handle_error ) ( arg, data );
-    return 0;
-}
-
-/* KLogLevelParamStrings
- *  Used to compare against command line parameters
- *  These must match KLogLEvel enum in log.h
- */
-static
-void CC logLevelFromString ( const char * str, void *data )
-{
-    KLogLevel ix;
-    const char ** paramStrings;
-
-    paramStrings = KLogGetParamStrings();
-
-    for ( ix = klogLevelMin; ix <= klogLevelMax; ++ix )
-    {
-        if ( strcmp ( str, paramStrings [ ( int ) ix ] ) == 0 )
-        {
-            * ( int32_t* ) data = ix;
-            return;
-        }
-    }
-
-    /* this RC should reflect an invalid string parameter to set the log level */
-    PLOGERR ( klogFatal, ( klogFatal, RC ( rcApp, rcArgv, rcParsing, rcRange, rcInvalid ),
-                           "log level '$(lvl)' is unrecognized", "lvl=%s", str ));
-    exit ( 10 );
-}
-
-static
-rc_t LogLevelAbsolute ( const char * string )
-{
-    int32_t 	new_level;
-    int32_t	absolute_level = -1;	/* if this remains -1 then we didn't have a good symbolic string */
-
-    /* parse as if integer value but fail over to symbolic strings */
-    new_level = AsciiToU32 ( string, logLevelFromString, & absolute_level );
-
-    return KLogLevelSet( ( KLogLevel ) ( ( absolute_level == -1 ) ? new_level : absolute_level ) );
-}
-
-static
-rc_t LogLevelRelative ( const char * string )
-{
-    int32_t adjust = 0;
-    int i;
-
-    for ( i = 0; string [ i ] != 0; ++ i )
-    {
-        switch ( string [ i ] )
-        {
-        case '+':
-            ++ adjust;
-            break;
-            
-        case '-':
-            -- adjust;
-            break;
-            
-        default:
-            return RC ( rcApp, rcArgv, rcParsing, rcToken, rcUnrecognized );
-        }
-    }
-    KLogLevelAdjust(adjust);
-    return 0;
-}
-
-rc_t CC NextLogLevelCommon ( const char * level_parameter )
-{
-    if ( level_parameter == NULL )
-        return RC ( rcApp, rcArgv, rcParsing, rcString, rcNull );
-
-    if ( ( level_parameter [ 0 ] == '+' ) || ( level_parameter [ 0 ] == '-' ) )
-        return LogLevelRelative ( level_parameter );
-
-    return LogLevelAbsolute ( level_parameter );
-}
-
-#if 0
-static
-void CC HandleLogLevelError ( rc_t rc )
-{
-    LOGERR ( klogFatal, rc, "expected log level" );
-    exit ( 10 );
-}
-
-/* NextLogLevel
- *  handle a numeric or textual argument to --log-level <level>  The --log-level is not
- *  specified here and could be any string of the programmers choice
- */ 
-void CC NextLogLevel ( const char ** argp,
-		    int *ip,
-		    int argc,
-		    char *argv [],
-		    const char* ( CC * handle_null ) ( void *data ), void *data )
-{
-    rc_t rc = NextLogLevelCommon ( NextArg ( argp, ip, argc, argv, handle_null, data ) );
-    if ( rc != 0 )
-    {
-        if ( handle_null != NULL )
-            ( * handle_null ) ( data );
-        else
-            HandleLogLevelError ( rc );
-    }
-}
-
-/* NextLogLevelh
- *  handle a numeric or textual argument to --log-level <level>  The --log-level is not
- *  specified here and could be any string of the programmers choice
- */ 
-void CC NextLogLevelh (int *ip,
-		    int argc,
-		    char *argv [],
-		    const char* ( CC * handle_null ) ( void *data ), void *data )
-{
-    rc_t rc = NextLogLevelCommon ( NextArgh ( ip, argc, argv, handle_null, data ) );
-    if ( rc != 0 )
-    {
-        if ( handle_null != NULL )
-            ( * handle_null ) ( data );
-        else
-            HandleLogLevelError ( rc );
-    }
-}
-#endif
-
-/* KMane
- *  executable entrypoint "main" is implemented by
- *  an OS-specific wrapper that takes care of establishing
- *  signal handlers, logging, etc.
- *
- *  in turn, OS-specific "main" will invoke "KMain" as
- *  platform independent main entrypoint.
- *
- *  "argc" [ IN ] - the number of textual parameters in "argv"
- *  should never be < 0, but has been left as a signed int
- *  for reasons of tradition.
- *
- *  "argv" [ IN ] - array of NUL terminated strings expected
- *  to be in the shell-native character set: ASCII or UTF-8
- *  element 0 is expected to be executable identity or path.
- */
-#if NO_KRSRC
-static
-void CC atexit_task ( void )
-{
-    KProcMgrWhack ();
-}
-#endif
-
-rc_t KMane ( int argc, char *argv [] )
-{
-    rc_t rc;
-    KNSManager * kns;
-#if NO_KRSRC
-    int status;
-#else
-    KCtx local_ctx, * ctx = & local_ctx;
-    DECLARE_FUNC_LOC ( rcExe, rcProcess, rcExecuting );
-#endif
-
-    /* get application version */
-    ver_t vers = KAppVersion ();
-
-    /* initialize error reporting */
-    ReportInit ( argc, argv, vers );
-
-#if NO_KRSRC
-    /* initialize cleanup tasks */
-    status = atexit ( atexit_task );
-    if ( status != 0 )
-        return SILENT_RC ( rcApp, rcNoTarg, rcInitializing, rcFunction, rcNotAvailable );
-
-    /* initialize proc mgr */
-    rc = KProcMgrInit ();
-    if ( rc != 0 )
-        return rc;
-
-    kns = ( KNSManager* ) ( size_t ) -1;
-#else
-    ON_FAIL ( KRsrcGlobalInit ( & local_ctx, & s_func_loc, false ) )
-    {
-        assert ( ctx -> rc != 0 );
-        return ctx -> rc;
-    }
-
-    kns = ctx -> rsrc -> kns;
-#endif
-
-    /* initialize the default User-Agent in the kns-manager to default value - using "vers" and argv[0] above strrchr '/' */
-    {
-        const char * tool = argv[ 0 ];
-        size_t tool_size = string_size ( tool );
-
-        const char * sep = string_rchr ( tool, tool_size, '/' );
-        if ( sep ++ == NULL )
-            sep = tool;
-        else
-            tool_size -= sep - tool;
-
-        sep = string_chr ( tool = sep, tool_size, '.' );
-        if ( sep != NULL )
-            tool_size = sep - tool;
-
-        KNSManagerSetUserAgent ( kns, PKGNAMESTR " sra-toolkit %.*s.%V", ( uint32_t ) tool_size, tool, vers );
-    }
-
-    /* initialize logging */
-    rc = KWrtInit(argv[0], vers);
-    if ( rc == 0 )
-        rc = KLogLibHandlerSetStdErr ();
-    if ( rc == 0 )
-        rc = KStsLibHandlerSetStdOut ();
-
-    if ( rc == 0 )
-    {
-#if KFG_COMMON_CREATION
-        KConfig *kfg;
-        rc = KConfigMake ( & kfg );
-        if ( rc == 0 )
-        {
-#endif
-            rc = KMain ( argc, argv );
-            if ( rc != 0 )
-            {
-
-#if _DEBUGGING
-                rc_t rc2;
-                uint32_t lineno;
-                const char *filename, *function;
-                while ( GetUnreadRCInfo ( & rc2, & filename, & function, & lineno ) )
-                {
-                    pLogErr ( klogWarn, rc2, "$(filename):$(lineno) within $(function)"
-                              , "filename=%s,lineno=%u,function=%s"
-                              , filename
-                              , lineno
-                              , function
-                        );
-                }
-#endif
-
-            }
-#if KFG_COMMON_CREATION
-            KConfigRelease ( kfg );
-        }
-#endif
-    }
-
-    /* finalize error reporting */
-    ReportSilence ();
-    ReportFinalize ( rc );
-
-#if ! NO_KRSRC
-    KRsrcGlobalWhack ( ctx );
-#endif
-
-    return rc;
-}
diff --git a/libs/kapp/progressbar.c b/libs/kapp/progressbar.c
deleted file mode 100644
index 4eb07a0..0000000
--- a/libs/kapp/progressbar.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/*==============================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*/
-#include <kapp/extern.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <klib/debug.h>
-#include <klib/container.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kapp/progressbar.h>
-
-#include <stdlib.h>
-#include <string.h>
-
-#define DBG(msg) DBGMSG(DBG_LOADLIB,DBG_FLAG(DBG_LOADLIB_PBAR), msg)
-
-struct KLoadProgressbar
-{
-    SLNode node;
-    bool active;
-    uint64_t used;
-    uint64_t total;
-};
-
-struct KJobs {
-    const char* severity;
-    SLList jobs;
-    uint64_t percent;
-} g_jobs =
-{
-    "status",
-    {NULL, NULL},
-    0
-};
-
-LIB_EXPORT rc_t CC KLoadProgressbar_Make(const KLoadProgressbar** cself, uint64_t size)
-{
-    rc_t rc = 0;
-    KLoadProgressbar* obj = NULL;
-
-    if( cself == NULL ) {
-        rc = RC(rcApp, rcFunction, rcConstructing, rcSelf, rcNull);
-    } else if( (obj = calloc(1, sizeof(*obj))) == NULL ) {
-        *cself = NULL;
-        rc = RC(rcApp, rcFunction, rcConstructing, rcMemory, rcExhausted);
-    } else {
-        DBG(("%s: %p %lu\n", __func__, obj, size));
-        SLListPushTail(&g_jobs.jobs, &obj->node);
-        *cself = obj;
-        obj->active = true;
-        obj->total = size;
-    }
-    return rc;
-}
-
-static
-bool CC job_active( SLNode *n, void *data )
-{
-    return ((KLoadProgressbar*)n)->active;
-}
-
-static
-void CC job_whack( SLNode *n, void *data )
-{
-    free(n);
-}
-
-struct job_data {
-    float percent;
-    uint64_t qty;
-};
-
-static
-void CC job_percent( SLNode *node, void *data )
-{
-    const KLoadProgressbar* n = (const KLoadProgressbar*)node;
-    struct job_data* d = (struct job_data*)data;
-    if (n->used && n->total)
-        d->percent += n->used * 100 / n->total;
-    d->qty++;
-}
-
-static
-void CC job_report(bool force_report, bool final)
-{
-    struct job_data d;
-
-    memset(&d, 0, sizeof(d));
-    SLListForEach(&g_jobs.jobs, job_percent, &d);
-    d.qty = (uint64_t) (d.qty ? d.percent / d.qty : (final ? 100 : 0) );
-    if( force_report || d.qty != g_jobs.percent ) {
-        g_jobs.percent = d.qty;
-        PLOGMSG(klogInfo, (klogInfo, "processed $(percent)%",
-            "severity=%s,percent=%lu", g_jobs.severity, g_jobs.percent));
-    }
-}
-
-LIB_EXPORT void CC KLoadProgressbar_Release(const KLoadProgressbar* cself, bool exclude)
-{
-    if( cself ) {
-        KLoadProgressbar* self = (KLoadProgressbar*)cself;
-        if( exclude ) {
-            SLListUnlink(&g_jobs.jobs, &self->node);
-            free(self);
-        } else {
-            self->active = false;
-        }
-        if( !SLListDoUntil(&g_jobs.jobs, job_active, NULL) ) {
-            /* no more active jobs: make last report and drop whole list */
-            job_report(false, true);
-            SLListWhack(&g_jobs.jobs, job_whack, NULL);
-        }
-    }
-}
-
-LIB_EXPORT rc_t CC KLoadProgressbar_Append(const KLoadProgressbar* cself, uint64_t chunk)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL ) {
-        rc = RC(rcApp, rcFunction, rcWriting, rcSelf, rcNull);
-    } else {
-        uint64_t c = cself->total + chunk;
-        DBG(("%s: +%lu\n", __func__, chunk));
-        if( c >= cself->total ) {
-            ((KLoadProgressbar*)cself)->total += chunk;
-        } else {
-            rc = RC(rcApp, rcFunction, rcResizing, rcData, rcOutofrange);
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KLoadProgressbar_File(const KLoadProgressbar** cself, const char* filename, const KDirectory* dir)
-{
-    rc_t rc = 0;
-    uint64_t sz;
-    KDirectory* tmp = (KDirectory*)dir;
-
-    if( cself == NULL || filename == NULL ) {
-        rc = RC(rcApp, rcFunction, rcWriting, rcParam, rcNull);
-    } else if( tmp == NULL && (rc = KDirectoryNativeDir(&tmp)) != 0 ) {
-    } else if( (rc = KDirectoryFileSize(tmp, &sz, "%s", filename)) == 0 ) {
-        rc = KLoadProgressbar_Make(cself, sz);
-    }
-    if( tmp != dir ) {
-        KDirectoryRelease(tmp);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KLoadProgressbar_KFile(const KLoadProgressbar** cself, const KFile* file)
-{
-    rc_t rc = 0;
-    uint64_t sz;
-
-    if( cself == NULL || file == NULL ) {
-        rc = RC(rcApp, rcFunction, rcWriting, rcParam, rcNull);
-    } else if( (rc = KFileSize(file, &sz)) == 0 ) {
-        rc = KLoadProgressbar_Make(cself, sz);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KLoadProgressbar_Process(const KLoadProgressbar* cself, uint64_t chunk, bool force_report)
-{
-    rc_t rc = 0;
-
-    if( cself == NULL ) {
-        rc = RC(rcApp, rcFunction, rcLogging, rcSelf, rcNull);
-    } else {
-        ((KLoadProgressbar*)cself)->used += chunk;
-        DBG(("%s: %p +%lu %lu of %lu\n", __func__, cself, chunk, cself->used, cself->total));
-        job_report(force_report, false);
-    }
-    return rc;
-}
diff --git a/libs/kapp/queue-file.c b/libs/kapp/queue-file.c
deleted file mode 100644
index adf6bcc..0000000
--- a/libs/kapp/queue-file.c
+++ /dev/null
@@ -1,925 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-typedef struct KQueueFile KQueueFile;
-#define KFILE_IMPL KQueueFile
-
-#include <kapp/extern.h>
-#include <kapp/queue-file.h>
-#include <kfs/file.h>
-#include <kfs/impl.h>
-#include <kproc/timeout.h>
-#include <kproc/thread.h>
-#include <kproc/queue.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <os-native.h>
-#include <klib/out.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#if _DEBUGGING && 0
-#define DEFAULT_BLOCK_SIZE 4 * 1024
-#define QFMSG( msg, ... ) \
-    KOutMsg ( msg, __VA_ARGS__ )
-#else
-#define DEFAULT_BLOCK_SIZE 64 * 1024
-#define QFMSG( msg, ... ) \
-    ( void ) 0
-#endif
-
-#define DEFAULT_TIMEOUT_MS 150
-
-/*--------------------------------------------------------------------------
- * KQueueFileBuffer
- *  a block that describes its valid bytes and position
- */
-typedef struct KQueueFileBuffer KQueueFileBuffer;
-struct KQueueFileBuffer
-{
-    uint64_t pos;
-    size_t bytes;
-    rc_t rc;
-    uint32_t align;
-    uint8_t data [ 1 ];
-};
-
-static
-bool KQueueFileBufferContains ( const KQueueFileBuffer *self, uint64_t pos )
-{
-    if ( self != NULL )
-    {
-        if ( self -> pos <= pos && ( self -> pos + self -> bytes ) > pos )
-            return true;
-    }
-    return false;
-}
-
-
-/*--------------------------------------------------------------------------
- * KQueueFile
- *  an extension to KFile that runs on a background thread
- */
-struct KQueueFile
-{
-    KFile dad;
-
-    /* the source file's size on open */
-    uint64_t apparent_size;
-
-    /* starting position for read-ahead */
-    uint64_t start_pos;
-
-    /* the file really being accessed */
-    KFile *f;
-
-    /* buffer info */
-    KQueueFileBuffer *b;
-    size_t bsize;
-
-    /* thread and buffer queue */
-    KThread *t;
-    KQueue *q;
-
-    /* captured upon open */
-    rc_t rc_from_size_on_open;
-
-    /* timeout when queue is not responding */
-    uint32_t timeout_ms;
-};
-
-/* Whack
- */
-static
-rc_t KQueueFileWhackRead ( KQueueFile *self )
-{
-    void *b;
-
-    /* no more reading */
-    QFMSG ( "%s: sealing queue\n", __func__ );
-    KQueueSeal ( self -> q );
-
-    /* flush the queue */
-    QFMSG ( "%s: popping queue\n", __func__ );
-    while ( KQueuePop ( self -> q, & b, NULL ) == 0 )
-    {
-        QFMSG ( "%s: dousing a buffer\n", __func__ );
-        free ( b );
-    }
-
-    /* wait for thread to exit */
-    QFMSG ( "%s: waiting for bg thread to exit\n", __func__ );
-    KThreadWait ( self -> t, NULL );
-
-    /* tear it down */
-    QFMSG ( "%s: freeing object\n", __func__ );
-    free ( self -> b );
-    KThreadRelease ( self -> t );
-    KQueueRelease ( self -> q );
-    KFileRelease ( self -> f );
-    free ( self );
-
-    return 0;
-}
-
-static
-rc_t KQueueFileFlush ( KQueueFile *self, KQueueFileBuffer *b )
-{
-    rc_t rc;
-
-    /* timeout is in mS */
-    timeout_t tm;
-    QFMSG ( "%s: initializing timeout for %,umS\n", __func__, self->timeout_ms);
-    TimeoutInit ( & tm, self->timeout_ms );
-
-    /* push buffer */
-    QFMSG ( "%s: pushing buffer...\n", __func__ );
-    rc = KQueuePush ( self -> q, b, & tm );
-    QFMSG ( "%s: ...done: rc = %R\n", __func__, rc );
-    if ( rc != 0 )
-    {
-        /* see if the bg thread exited */
-        if ( GetRCState ( rc ) == rcReadonly )
-        {
-            rc = RC ( rcApp, rcFile, rcWriting, rcTransfer, rcIncomplete );
-            QFMSG ( "%s: resetting rc to %R\n", __func__, rc );
-        }
-        return rc;
-    }
-
-    QFMSG ( "%s: forgetting about buffer\n", __func__ );
-    self -> b = NULL;
-    return 0;
-}
-
-static
-rc_t KQueueFileWhackWrite ( KQueueFile *self )
-{
-    void *b;
-    rc_t rc = 0;
-
-    /* flush last buffer */
-    if ( self -> b != NULL )
-    {
-        QFMSG ( "%s: have non-null buffer\n", __func__ );
-        if ( self -> b -> bytes != 0 )
-        {
-            QFMSG ( "%s: buffer has %zu bytes\n", __func__, self -> b -> bytes );
-            rc = KQueueFileFlush ( self, self -> b );
-        }
-
-        free ( self -> b );
-        self -> b = NULL;
-    }
-
-    /* no more writing */
-    QFMSG ( "%s: sealing queue\n", __func__ );
-    KQueueSeal ( self -> q );
-
-    /* wait for thread to exit */
-    QFMSG ( "%s: waiting for bg thread to exit\n", __func__ );
-    KThreadWait ( self -> t, NULL );
-
-    /* the file should be written
-       but flush the queue if bg thread didn't */
-    QFMSG ( "%s: popping queue\n", __func__ );
-    while ( KQueuePop ( self -> q, & b, NULL ) == 0 )
-    {
-        QFMSG ( "%s: dousing a buffer\n", __func__ );
-        free ( b );
-    }
-
-    /* tear it down */
-    QFMSG ( "%s: freeing object\n", __func__ );
-    KThreadRelease ( self -> t );
-    KQueueRelease ( self -> q );
-    KFileRelease ( self -> f );
-    free ( self );
-
-    return rc;
-}
-
-/* GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- */
-static
-struct KSysFile* CC KQueueFileGetSysFile ( const KQueueFile *self, uint64_t *offset )
-{
-    return NULL;
-}
-
-/* RandomAccess
- *  ALMOST by definition, the file is random access
- *
- *  certain file types will refuse random access
- *  these include FIFO and socket based files, but also
- *  wrappers that require serial access ( e.g. compression )
- *
- *  returns 0 if random access, error code otherwise
- */
-static
-rc_t CC KQueueFileRandomAccess ( const KQueueFile *self )
-{
-    return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported );
-}
-
-/* Type
- *  returns a KQueueFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KQueueFileType ( const KQueueFile *self )
-{
-    return kptFIFO;
-}
-
-/* Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KQueueFileSize ( const KQueueFile *self, uint64_t *size )
-{
-    * size = self -> apparent_size;
-    return self -> rc_from_size_on_open;
-}
-
-/* SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KQueueFileSetSize ( KQueueFile *self, uint64_t size )
-{
-    return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported );
-}
-
-
-/* RunRead
- *  runs read loop on background thread
- */
-static
-rc_t CC KQueueFileRunRead ( const KThread *t, void *data )
-{
-    KQueueFile *self = data;
-
-    rc_t rc;
-    bool loop;
-    uint64_t pos;
-    size_t num_read;
-
-    QFMSG ( "BG: %s: running read-ahead loop\n", __func__ );
-    for ( rc = 0, loop = true, pos = self -> start_pos; loop; pos += num_read )
-    {
-        timeout_t tm;
-
-        KQueueFileBuffer *b = malloc ( sizeof * b - sizeof b -> data + self -> bsize );
-        if ( b == NULL )
-        {
-            rc = RC ( rcApp, rcFile, rcReading, rcMemory, rcExhausted );
-            QFMSG ( "BG: %s: failed to allocate %zu byte buffer\n", __func__, self -> bsize );
-            b = malloc ( sizeof * b );
-            if ( b == NULL )
-                break;
-
-            num_read = 0;
-            b -> rc = rc;
-            QFMSG ( "BG: %s: created empty buffer with rc = %R.\n", __func__, b -> rc );
-            loop = false;
-        }
-        else
-        {
-            QFMSG ( "BG: %s: reading %zu byte buffer\n", __func__, self -> bsize );
-            b -> rc = KFileReadAll ( self -> f, pos, b -> data, self -> bsize, & num_read );
-            QFMSG ( "BG: %s: read %zu bytes, rc = %R\n", __func__, num_read, b -> rc );
-            if ( b -> rc != 0 || num_read == 0 )
-                loop = false;
-        }
-
-        /* update buffer data */
-        b -> pos = pos;
-        b -> bytes = num_read;
-#if _DEBUGGING
-        b -> align = 0;
-#endif
-
-PushAgain:
-        /* timeout is in mS */
-        QFMSG ( "BG: %s: initializing timeout for %,umS\n", __func__, self->timeout_ms );
-        TimeoutInit ( & tm, self->timeout_ms );
-
-        /* push buffer */
-        QFMSG ( "BG: %s: pushing buffer...\n", __func__ );
-        rc = KQueuePush ( self -> q, b, & tm );
-        QFMSG ( "BG: %s: ...done: rc = %R\n", __func__, rc );
-        if ( rc != 0 )
-        {
-            /* if queue has been sealed by fg */
-            if ( GetRCState ( rc ) == rcReadonly )
-            {
-                rc = 0;
-                QFMSG ( "BG: %s: clearing rc\n", __func__ );
-
-            } else if( GetRCObject(rc) == ( enum RCObject )rcTimeout && GetRCState(rc) == rcExhausted ) {
-                goto PushAgain;
-            }
-            QFMSG ( "BG: %s: dousing buffer\n", __func__ );
-            free ( b );
-            break;
-        }
-    }
-    
-    /* going to exit thread */
-    QFMSG ( "BG: %s: sealing thread\n", __func__ );
-    KQueueSeal ( self -> q );
-
-    QFMSG ( "BG: %s: exit with rc = %R\n", __func__, rc );
-    return rc;
-}
-
-/* Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - return parameter giving number of bytes
- *  actually read. when returned value is zero and return code is
- *  also zero, interpreted as end of file.
- */
-static
-rc_t CC KQueueFileNoRead ( const KQueueFile *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    return RC ( rcFS, rcFile, rcReading, rcFile, rcWriteonly );
-}
-
-static
-rc_t CC KQueueFileRead ( const KQueueFile *cself, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc;
-    size_t to_read;
-    KQueueFile *self = ( KQueueFile* ) cself;
-    KQueueFileBuffer *b = self -> b;
-
-    assert ( num_read != NULL );
-    assert ( * num_read == 0 );
-    assert ( buffer != NULL && bsize != 0 );
-
-    /* detect attempt to back up */
-    if ( b != NULL && pos < b -> pos )
-    {
-        QFMSG ( "%s: detected attempt to back up from %lu to %lu\n", __func__, b -> pos, pos );
-        return RC ( rcApp, rcFile, rcReading, rcConstraint, rcViolated );
-    }
-    
-    QFMSG ( "%s: loop to read %zu bytes at offset %lu\n", __func__, bsize, pos );
-    while ( ! KQueueFileBufferContains ( b, pos ) )
-    {
-        /* fetch next buffer */
-        KQueueFileBuffer *tmp;
-
-        /* timeout is in mS */
-        timeout_t tm;
-        QFMSG ( "%s: initializing timeout for %,umS\n", __func__, self->timeout_ms );
-        TimeoutInit ( & tm, self->timeout_ms );
-
-        /* pop buffer */
-        QFMSG ( "%s: popping buffer...\n", __func__ );
-        rc = KQueuePop ( self -> q, ( void** ) & tmp, & tm );
-        QFMSG ( "%s: ...done: rc = %R\n", __func__, rc );
-        if ( rc != 0 )
-        {
-            /* see if the bg thread is done */
-            if ( GetRCState ( rc ) == rcDone && GetRCObject ( rc ) == ( enum RCObject )rcData )
-            {
-                QFMSG ( "%s: BG thread has exited with end-of-input\n", __func__ );
-                return 0;
-            } else if( GetRCObject(rc) == ( enum RCObject )rcTimeout && GetRCState(rc) == rcExhausted ) {
-                continue; /* timeout is not a problem, try again */
-            }
-
-            QFMSG ( "%s: read failed with rc = %R\n", __func__, rc );
-            return rc;
-        }
-
-        /* queue is not supposed to be able to contain NULL */
-        assert ( tmp != NULL );
-
-        /* buffer may indicate read error or end of input */
-        if ( tmp -> rc != 0 || tmp -> bytes == 0 )
-        {
-            rc = tmp -> rc;
-            QFMSG ( "%s: BG thread has delivered %zu size buffer with rc = %R\n", __func__, tmp -> bytes, rc );
-            free ( tmp );
-            return rc;
-        }
-
-        /* free existing buffer */
-        if ( b != NULL )
-        {
-            QFMSG ( "%s: freeing buffer of %zu bytes at position %lu\n", __func__, b -> bytes, b -> pos );
-            free ( b );
-        }
-
-        /* take new buffer */
-        self -> b = b = tmp;
-        QFMSG ( "%s: caching buffer of %zu bytes at position %lu\n", __func__, b -> bytes, b -> pos );
-    }
-
-    pos -= b -> pos;
-    to_read = b -> bytes - ( size_t ) pos;
-    if ( to_read > bsize )
-        to_read = bsize;
-
-    QFMSG ( "%s: copying %zu bytes from buffer at local offset %lu\n", __func__, to_read, pos );
-    memcpy ( buffer, & b -> data [ pos ], to_read );
-
-    QFMSG ( "%s: successful read\n", __func__ );
-    * num_read = to_read;
-    return 0;
-}
-
-
-/* RunWrite
- *  runs write loop on background thread
- */
-static
-rc_t CC KQueueFileRunWrite ( const KThread *t, void *data )
-{
-    KQueueFile *self = data;
-
-    rc_t rc;
-    do
-    {
-        size_t num_writ;
-        KQueueFileBuffer *b;
-
-        /* timeout is in mS */
-        timeout_t tm;
-        TimeoutInit ( & tm, self->timeout_ms );
-
-        /* pop buffer */
-        rc = KQueuePop ( self -> q, ( void** ) & b, & tm );
-        if ( rc != 0 )
-        {
-            /* see if the fg thread is done */
-            if ( GetRCState ( rc ) == rcDone && GetRCObject ( rc ) == ( enum RCObject )rcData )
-            {
-                rc = 0;
-            }
-            else if ( GetRCObject(rc) == ( enum RCObject )rcTimeout && GetRCState(rc) == rcExhausted )
-            {
-                rc = 0;
-                continue;
-            }
-
-            break;
-        }
-
-        /* queue won't accept NULL object references */
-        assert ( b != NULL );
-
-        /* look at buffer for end of input */
-        if ( b -> rc != 0 || b -> bytes == 0 )
-        {
-            free ( b );
-            break;
-        }
-
-        /* write to file */
-        rc = KFileWriteAll ( self -> f, b -> pos, b -> data, b -> bytes, & num_writ );
-        assert ( num_writ == b -> bytes || rc != 0 );
-
-        /* TBD - need a better way to deal with this */
-        if ( rc != 0 )
-        {
-            PLOGERR ( klogSys, ( klogSys, rc, "$(func): wrote $(num_writ) of $(bytes) bytes to file",
-                                 "func=%s,num_writ=%zu,bytes=%zu", __func__, num_writ, b -> bytes ) );
-        }
-
-        /* done with buffer */
-        free ( b );
-    }
-    while ( rc == 0 );
-
-    /* going to exit thread */
-    KQueueSeal ( self -> q );
-
-    return rc;
-}
-
-/* Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- */
-static
-rc_t CC KQueueFileNoWrite ( KQueueFile *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    return RC ( rcApp, rcFile, rcWriting, rcFile, rcReadonly );
-}
-
-static
-rc_t CC KQueueFileWrite ( KQueueFile *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    rc_t rc;
-    size_t total, to_write;
-
-    for ( rc = 0, total = 0; total < size; pos += to_write, total += to_write )
-    {
-        /* current buffer */
-        KQueueFileBuffer *b = self -> b;
-
-        /* if we have a buffer, test for a write within bounds */
-        if ( self -> b != NULL )
-        {
-            /* an attempt to write first byte BEFORE
-               current buffer or BEYOND current contents
-               or AT current end while being full provokes
-               a flush of the current buffer */
-            if ( pos < b -> pos ||
-                 pos > b -> pos + b -> bytes ||
-                 pos == b -> pos + self -> bsize )
-            {
-                rc = KQueueFileFlush ( self, b );
-                if ( rc != 0 )
-                {   /* the background thread is probably gone */
-                    break;
-                }
-            }
-        }
-
-        /* if by now we don't have a buffer, allocate one */
-        if ( self -> b == NULL )
-        {
-            b = malloc ( sizeof * b - sizeof b -> data + self -> bsize );
-            if ( b == NULL )
-            {
-                rc = RC ( rcApp, rcFile, rcWriting, rcMemory, rcExhausted );
-                break;
-            }
-
-            self -> b = b;
-            b -> pos = pos/* + total*/;
-            b -> bytes = 0;
-            b -> rc = 0;
-#if _DEBUGGING
-            b -> align = 0;
-#endif
-        }
-
-        assert ( b != NULL );
-        assert ( b == self -> b );
-/*        assert ( pos >= b -> pos ); */
-        assert ( pos <= b -> pos + b -> bytes );
-        assert ( pos < b -> pos + self -> bsize );
-
-        /* write into the buffer */
-        to_write = size - total;
-        if ( b -> bytes + to_write > self -> bsize )
-            to_write = self -> bsize - b -> bytes;
-
-        memcpy ( & b -> data [ b -> bytes ], & ( ( const uint8_t* ) buffer ) [ total ], to_write );
-        b -> bytes += to_write;
-    }
-
-
-    * num_writ = total;
-    if ( total != 0 )
-        return 0;
-
-    return rc;
-}
-
-
-static KFile_vt_v1 KQueueFileRead_vt_v1 =
-{
-    /* version 1.1 */
-    1, 1,
-
-    /* v1.0 */
-    KQueueFileWhackRead,
-    KQueueFileGetSysFile,
-    KQueueFileRandomAccess,
-    KQueueFileSize,
-    KQueueFileSetSize,
-    KQueueFileRead,
-    KQueueFileNoWrite,
-
-    /* v1.1 */
-    KQueueFileType
-};
-
-
-static KFile_vt_v1 KQueueFileWrite_vt_v1 =
-{
-    /* version 1.1 */
-    1, 1,
-
-    /* v1.0 */
-    KQueueFileWhackWrite,
-    KQueueFileGetSysFile,
-    KQueueFileRandomAccess,
-    KQueueFileSize,
-    KQueueFileSetSize,
-    KQueueFileNoRead,
-    KQueueFileWrite,
-
-    /* v1.1 */
-    KQueueFileType
-};
-
-
-/* MakeRead
- *  make a queue file for reading-ahead on background thread
- *
- *  when the file is created, a background thread is started
- *  that begins reading from "src" at position "pos", into
- *  buffers of size "buffer_size". each buffer is pushed into
- *  a cross-thread queue where it is consumed by the reading
- *  thread.
- *
- *  the background thread is throttled by queue capacity - determined
- *  by "queue_bytes" and "block_size", such that if the queue is full,
- *  the thread will sleep. the consumer thread is also throttled by the
- *  queue in that it will sleep if the queue is empty with pending data.
- *
- *  the background thread will exit upon reaching end of file,
- *  upon a permanent error, or if the queue is sealed by the consumer
- *  thread.
- *
- *  when the file is collected in response to a release message,
- *  the queue will be sealed against further inserts, pending buffers
- *  will be discarded, the background thread will be joined, and
- *  the source file will be released.
- *
- *  the intended usage is serial reading of the file. reads
- *  may only progress forward, i.e. backing up is not permitted.
- *
- *  "qf" [ OUT ] - return parameter for queue file
- *
- *  "pos" [ IN ] - starting position for reads from "src".
- *  NB - "src" must support being addressed at this position.
- *
- *  "src" [ IN ] - source file for read-ahead on background thread.
- *  must have read permissions.
- *
- *  "queue_bytes" [ IN ] - the read-ahead limit of the background
- *  thread, in bytes. this is the amount of data that will be queued
- *  for the consumer thread before the bg thread sleeps.
- *
- *  "block_size" [ IN, DEFAULT ZERO ] - optional parameter giving
- *  desired block size when reading from "src". this may be used
- *  to tune reading for source data, e.g. 64K blocks for gzip.
- */
-LIB_EXPORT rc_t CC KQueueFileMakeRead ( const KFile **qfp, uint64_t pos,
-    const KFile *src, size_t queue_bytes, size_t block_size, uint32_t timeout_ms )
-{
-    rc_t rc;
-
-    if ( qfp == NULL )
-        rc = RC ( rcApp, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( src == NULL )
-            rc = RC ( rcApp, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! src -> read_enabled )
-        {
-            if ( src -> write_enabled )
-                rc = RC ( rcApp, rcFile, rcConstructing, rcFile, rcWriteonly );
-            else
-                rc = RC ( rcApp, rcFile, rcConstructing, rcFile, rcNoPerm );
-        }
-        else if ( pos == 0 || ( rc = KFileRandomAccess ( src ) ) == 0 )
-        {
-            KQueueFile *qf = malloc ( sizeof * qf );
-            if ( qf == NULL )
-                rc = RC ( rcApp, rcFile, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KFileInit ( & qf -> dad, ( const KFile_vt* ) & KQueueFileRead_vt_v1, "KQueueFile", "no-name", true, false );
-                if ( rc == 0 )
-                {
-                    qf -> f = ( KFile* ) src;
-                    rc = KFileAddRef ( src );
-                    if ( rc == 0 )
-                    {
-                        uint32_t capacity;
-
-                        /* zero block size means default */
-                        if ( block_size == 0 )
-                            block_size = DEFAULT_BLOCK_SIZE;
-
-                        /* queue capacity is expressed in bytes originally
-                           translate to buffer count */
-                        capacity = ( queue_bytes + block_size - 1 ) / block_size;
-                        if ( capacity == 0 )
-                            capacity = 1;
-
-                        /* actual capacity will be a power of 2 */
-                        rc = KQueueMake ( & qf -> q, capacity );
-                        if ( rc == 0 )
-                        {
-                            /* capture current size if supported */
-                            qf -> rc_from_size_on_open = KFileSize ( src, & qf -> apparent_size );
-
-                            /* starting position for read */
-                            qf -> start_pos = pos;
-
-                            /* requested buffer size */
-                            qf -> b = NULL;
-                            qf -> bsize = block_size;
-
-                            /* timeout */
-                            qf -> timeout_ms = timeout_ms == 0 ? DEFAULT_TIMEOUT_MS : timeout_ms;
-
-                            /* finally, start the background thread */
-                            rc = KThreadMake ( & qf -> t, KQueueFileRunRead, qf );
-                            if ( rc == 0 )
-                            {
-                                * qfp = & qf -> dad;
-                                return 0;
-                            }
-
-                            KQueueRelease ( qf -> q );
-                        }
-
-                        KFileRelease ( qf -> f );
-                    }
-                }
-
-                free ( qf );
-            }
-        }
-
-        * qfp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* MakeWrite
- *  make a queue file for writing-behind on background thread
- *
- *  when the file is created, a background thread is started that
- *  waits for buffers to appear in the cross-thread queue. as the producer
- *  thread writes, data are accumulated into buffers which are pushed
- *  into the queue as they fill, and written in turn on the bg thread.
- *
- *  the producer thread is throttled by queue capacity - determined by
- *  "queue_bytes" and "block_size", such that if the queue is full,
- *  the thread will sleep. the background thread is also throttled by
- *  the queue in that it will sleep if the queue is empty with pending
- *  data.
- *
- *  the background thread will exit upon a permanent error, or if the
- *  queue is sealed by the producer thread.
- *
- *  when the file is collected in response to a release message,
- *  the queue will be sealed against further inserts, pending buffers
- *  will be written, the background thread will be joined, and
- *  the source file will be released.
- *
- *  the intended usage is serial writing of the file. random writes
- *  will be accepted, but may reduce the queue efficiency.
- *
- *  "qf" [ OUT ] - return parameter for queue file
- *
- *  "dst" [ IN ] - destination file for write-behind on background thread.
- *  must have write permissions.
- *
- *  "queue_bytes" [ IN ] - the write-behind limit of the producer
- *  thread, in bytes. this is the amount of data that will be queued
- *  for the background thread before the producer thread sleeps.
- *
- *  "block_size" [ IN, DEFAULT ZERO ] - optional parameter giving
- *  desired block size when writing to "dst". this may be used
- *  to tune writing for source data, e.g. 64K blocks for gzip.
- */
-LIB_EXPORT rc_t CC KQueueFileMakeWrite ( KFile **qfp,
-    KFile *dst, size_t queue_bytes, size_t block_size, uint32_t timeout_ms )
-{
-    rc_t rc;
-
-    if ( qfp == NULL )
-        rc = RC ( rcApp, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( dst == NULL )
-            rc = RC ( rcApp, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! dst -> write_enabled )
-        {
-            if ( dst -> read_enabled )
-                rc = RC ( rcApp, rcFile, rcConstructing, rcFile, rcReadonly );
-            else
-                rc = RC ( rcApp, rcFile, rcConstructing, rcFile, rcNoPerm );
-        }
-        else
-        {
-            KQueueFile *qf = malloc ( sizeof * qf );
-            if ( qf == NULL )
-                rc = RC ( rcApp, rcFile, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KFileInit ( & qf -> dad, ( const KFile_vt* ) & KQueueFileWrite_vt_v1, "KQueueFile", "no-name", false, true );
-                if ( rc == 0 )
-                {
-                    qf -> f = dst;
-                    rc = KFileAddRef ( dst );
-                    if ( rc == 0 )
-                    {
-                        uint32_t capacity;
-
-                        /* zero block size means default */
-                        if ( block_size == 0 )
-                            block_size = DEFAULT_BLOCK_SIZE;
-
-                        /* queue capacity is expressed in bytes originally
-                           translate to buffer count */
-                        capacity = ( queue_bytes + block_size - 1 ) / block_size;
-                        if ( capacity == 0 )
-                            capacity = 1;
-
-                        /* actual capacity will be a power of 2 */
-                        rc = KQueueMake ( & qf -> q, capacity );
-                        if ( rc == 0 )
-                        {
-                            /* capture current size if supported */
-                            qf -> rc_from_size_on_open = KFileSize ( dst, & qf -> apparent_size );
-
-                            /* starting position not used */
-                            qf -> start_pos = 0;
-
-                            /* requested buffer size */
-                            qf -> b = NULL;
-                            qf -> bsize = block_size;
-
-                            /* timeout */
-                            qf -> timeout_ms = timeout_ms == 0 ? DEFAULT_TIMEOUT_MS : timeout_ms;
-
-                            /* finally, start the background thread */
-                            rc = KThreadMake ( & qf -> t, KQueueFileRunWrite, qf );
-                            if ( rc == 0 )
-                            {
-                                * qfp = & qf -> dad;
-                                return 0;
-                            }
-
-                            KQueueRelease ( qf -> q );
-                        }
-
-                        KFileRelease ( qf -> f );
-                    }
-                }
-
-                free ( qf );
-            }
-        }
-
-        * qfp = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/kapp/sun/sysmain.c b/libs/kapp/sun/sysmain.c
deleted file mode 100644
index d0c53e3..0000000
--- a/libs/kapp/sun/sysmain.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "../main-priv.h"
-#include <sysalloc.h>
-#include <kapp/main.h>
-#include <klib/log.h>
-#include <klib/report.h>
-#include <klib/rc.h>
-#include <atomic32.h>
-
-#undef __XOPEN_OR_POSIX
-#define __XOPEN_OR_POSIX 1
-
-#undef __EXTENSIONS__
-#define __EXTENSIONS__ 1
-
-#include <unistd.h>
-#include <signal.h>
-#include <sys/signal.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <errno.h>
-#include <assert.h>
-
-#if ! _DEBUGGING && ! defined CATCH_SIGSEGV
-#define CATCH_SIGSEGV 1
-#endif
-
-/*--------------------------------------------------------------------------
- * Main
- */
-
-static bool no_hup;
-static atomic32_t hangup;
-static atomic32_t quitting;
-
-/* Quitting
- *  is the program supposed to exit
- */
-rc_t Quitting ( void )
-{
-    if ( atomic32_read ( & quitting ) == 0 )
-        return 0;
-    LOGMSG ( klogInfo, "EXITING..." );
-    return RC ( rcExe, rcProcess, rcExecuting, rcProcess, rcCanceled );
-}
-
-/* SignalQuit
- *  tell the program to quit
- */
-rc_t SignalQuit ( void )
-{
-    ReportSilence ();
-    
-    if ( kill ( 0, SIGTERM ) != 0 ) switch ( errno )
-    {
-    case EINVAL:
-        return RC ( rcExe, rcProcess, rcSignaling, rcMessage, rcInvalid );
-    case EPERM:
-        return RC ( rcExe, rcProcess, rcSignaling, rcMessage, rcUnauthorized );
-    default:
-        return RC ( rcExe, rcProcess, rcSignaling, rcNoObj, rcUnknown );
-    }
-    return 0;
-}
-
-/* Hangup
- *  has the program received a SIGHUP
- */
-rc_t Hangup ( void )
-{
-    if ( atomic32_read ( & hangup ) == 0 )
-        return 0;
-    LOGMSG ( klogInfo, "HANGUP...\n" );
-    return RC ( rcExe, rcProcess, rcExecuting, rcProcess, rcIncomplete );
-}
-
-/* SignalHup
- *  send the program a SIGHUP
- */
-rc_t SignalHup ( void )
-{
-    if ( kill ( 0, SIGHUP ) != 0 ) switch ( errno )
-    {
-    case EINVAL:
-        return RC ( rcExe, rcProcess, rcSignaling, rcMessage, rcInvalid );
-    case EPERM:
-        return RC ( rcExe, rcProcess, rcSignaling, rcMessage, rcUnauthorized );
-    default:
-        return RC ( rcExe, rcProcess, rcSignaling, rcNoObj, rcUnknown );
-    }
-    return 0;
-}
-
-/* SignalNoHup
- *  tell the program to stay alive even after SIGHUP
- */
-rc_t SignalNoHup ( void )
-{
-    no_hup = true;
-    return 0;
-}
-
-/* SigHupHandler
- */
-static
-void SigHupHandler ( int sig )
-{
-    ( ( void ) sig );
-    atomic32_inc ( & hangup );
-    if ( ! no_hup )
-        atomic32_inc ( & quitting );
-    PLOGMSG ( klogInfo, ( klogInfo, "SIGNAL - $(sig)\n", "sig=HUP" ));
-}
-
-/* SigQuitHandler
- */
-static
-void SigQuitHandler ( int sig )
-{
-    const char *msg;
-
-    ReportSilence ();
-    
-    atomic32_inc ( & quitting );
-    switch ( sig )
-    {
-    case SIGINT:
-        msg = "^C";
-        break;
-    case SIGQUIT:
-        msg = "QUIT";
-        break;
-    case SIGTERM:
-        msg = "TERM";
-        break;
-    default:
-        PLOGMSG ( klogWarn, ( klogWarn, "SIGNAL - $(sig)\n", "sig=%d", sig ));
-        return;
-    }
-
-    PLOGMSG ( klogInfo, ( klogInfo, "SIGNAL - $(sig)", "sig=%s", msg ) );
-}
-
-/* SigSegvHandler
- */
-#if CATCH_SIGSEGV
-static
-void SigSegvHandler ( int sig )
-{
-    ( ( void ) sig );
-    PLOGMSG ( klogFatal, ( klogFatal, "SIGNAL - $(sig)\n", "sig=Segmentation fault" ));
-    abort ();
-    exit ( 1 );
-}
-#endif
-
-/* main
- *  Unix specific main entrypoint
- */
-int main ( int argc, char *argv [] )
-{
-    static struct
-    {
-        void ( * handler ) ( int );
-        int sig;
-    } sigs [] =
-    {
-        { SigHupHandler, SIGHUP },
-        { SigQuitHandler, SIGINT },
-        { SigQuitHandler, SIGQUIT },
-#if CATCH_SIGSEGV        
-        { SigSegvHandler, SIGSEGV },
-#endif        
-        { SigQuitHandler, SIGTERM }
-    };
-
-    rc_t rc;
-    int i, status;
-    struct sigaction sig_saves [ sizeof sigs / sizeof sigs [ 0 ] ];
-
-    /* get application version */
-    uint32_t vers = KAppVersion ();
-
-    /* initialize logging to default values */
-    KLogInit ();
-
-    /* install signal handlers */
-    for ( i = 0; i < sizeof sigs / sizeof sigs [ 0 ]; ++ i )
-    {
-        struct sigaction act;
-        memset ( & act, 0, sizeof act );
-        act . sa_handler = sigs [ i ] . handler;
-        act . sa_flags = SA_RESETHAND;
-
-        status = sigaction ( sigs [ i ] . sig, & act, & sig_saves [ i ] );
-        if ( status < 0 )
-        {
-            PLOGMSG ( klogFatal, ( klogFatal,
-                                   "failed to install handler for signal $(sig) - $(msg)"
-                                   , "sig=%d,msg='%s'"
-                                   , sigs [ i ] . sig
-                                   , strerror ( errno )
-                          ));
-            return 2;
-        }
-    }
-
-    /* run this guy */
-    rc = KMane ( argc, argv );
-
-    /* remove handlers, for what it's worth */
-    for ( i = 0; i < sizeof sigs / sizeof sigs [ 0 ]; ++ i )
-        sigaction ( sigs [ i ] . sig, & sig_saves [ i ], NULL );
-
-    return ( rc == 0 ) ? 0 : 3;
-}
diff --git a/libs/kapp/tokenizer.c b/libs/kapp/tokenizer.c
deleted file mode 100644
index 2f5c78d..0000000
--- a/libs/kapp/tokenizer.c
+++ /dev/null
@@ -1,525 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kapp/extern.h>
-#include <sysalloc.h>
-
-#include <kapp/args.h>
-
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <klib/text.h>
-
-#include <vfs/path.h>
-#include <vfs/manager.h>
-#include <kfs/file.h>
-
-#include <os-native.h>
-
-#include <string.h>
-#include <stdlib.h>
-
-
-#define ARGV_INC 10
-#define TOKEN_INC 512
-
-/*
-   strtok() not used, because we tokenize the content of a file!
-   we do that in chunks of 4096 char's
-   a token can span multiple chunks!
-   we also support quoting and escaping ( a la bash )
-*/
-
-typedef struct tokenzr
-{
-    int * argc;
-    char *** argv;
-    char *token;
-    size_t allocated;
-    size_t used;
-    uint32_t state;
-    uint32_t nargs;
-    char escape[ 3 ];
-    char n_escape;
-    char m_escape;
-} tokenzr;
-
-
-static rc_t make_tokenzr( tokenzr **t, int * argc, char *** argv )
-{
-    rc_t rc = 0;
-    if ( t == NULL )
-    {
-        rc = RC( rcApp, rcNoTarg, rcConstructing, rcSelf, rcNull );
-    }
-    else
-    {
-        tokenzr *t1 = malloc( sizeof *t1 );
-        if ( t1 == NULL )
-        {
-            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-        }
-        else
-        {
-            t1->token = malloc( TOKEN_INC );
-            if ( t1->token == NULL )
-            {
-                rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-            }
-            else
-            {
-                t1->allocated = TOKEN_INC;
-                t1->used = 0;
-                t1->state = 0;
-                t1->nargs = 0;
-                t1->argc = argc;
-                t1->argv = argv;
-                t1->n_escape = 0;
-                t1->m_escape = 0;
-            }
-        }
-        if ( rc == 0 )
-        {
-            *t = t1;
-        }
-    }
-    return rc;
-}
-
-
-static void free_tokenzr( tokenzr *t )
-{
-    if ( t != NULL )
-    {
-        if ( t->token != NULL )
-            free( t->token );
-        free( t );
-    }
-}
-
-
-static rc_t expand_argv( tokenzr *t )
-{
-    rc_t rc = 0;
-    char ** pargv = *(t->argv);
-
-    if ( pargv == NULL )
-    {
-        pargv = malloc( ARGV_INC * ( sizeof pargv[ 0 ] ) );
-        if ( pargv != NULL )
-        {
-            t->nargs = ARGV_INC;
-            ( *(t->argc) ) = 0;
-        }
-        else
-            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        if ( (uint32_t) ( *(t->argc) ) >= t->nargs )
-        {
-            char ** pargv1 = realloc( pargv, ( ( t->nargs + ARGV_INC ) * ( sizeof pargv[ 0 ] ) ) );
-            if ( pargv1 != NULL )
-            {
-                t->nargs += ARGV_INC;
-                pargv = pargv1;
-            }
-            else
-            {
-                rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-                free( pargv );
-                pargv = NULL;
-            }
-        }
-    }
-    if ( rc == 0 )
-    {
-        *(t->argv) =  pargv;
-    }
-    return rc;
-}
-
-
-static rc_t add_string_to_argv( tokenzr *t, const char * str, size_t len )
-{
-    rc_t rc = expand_argv( t );
-    if ( rc == 0 )
-    {
-        int argc = *(t->argc);
-        char ** pargv = *(t->argv);
-
-        pargv[ argc ] = string_dup ( str, len );
-        if ( pargv[ argc ] == NULL )
-            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            ( *(t->argc) )++;
-            *(t->argv) =  pargv;
-            t->used = 0;
-        }
-    }
-    return rc;
-}
-
-
-static rc_t add_token_to_argv( tokenzr *t )
-{
-    return add_string_to_argv( t, t->token, t->used );
-}
-
-
-static rc_t add_buffer_to_token( tokenzr *t, const char *buffer, size_t buflen )
-{
-    rc_t rc = 0;
-    if ( t->used + buflen > t->allocated )
-    {
-        size_t new_size = t->used + buflen + TOKEN_INC;
-        char * temp = realloc( t->token, new_size );
-        if ( temp == NULL )
-        {
-            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-        }
-        else
-        {
-            t->token = temp;
-            t->allocated = new_size;
-        }
-    }
-    if ( rc == 0 )
-    {
-        memcpy( t->token + t->used, buffer, buflen );
-        t->used += buflen;
-    }
-    return rc;
-}
-
-
-/* this is the 'normal' state, that the buffer is divided into tokens by white-space */
-const static char delim0[] = " \r\n\f\t\v\\\"";
-static rc_t tokenize_state0( tokenzr *t, bool *done, char ** ptr, const char *buffer, size_t buflen )
-{
-    rc_t rc;
-    char * s = strpbrk ( *ptr, delim0 );
-    if ( s == NULL )
-    {
-        /* delimiting char not found!
-            ---> add everything to the tokenbuffer */
-        size_t to_add = buflen - ( *ptr - buffer );
-        rc = add_buffer_to_token( t, *ptr, to_add );
-        *done = true;
-    }
-    else
-    {
-        /* delimiting char found!
-            ---> add everything from ptr to s to the tokenbuffer
-            ---> then add token to argv
-            ---> then clear token */
-        rc = add_buffer_to_token( t, *ptr, s - *ptr );
-        if ( rc == 0 )
-        {
-            if ( t->used > 0 && *s != '\\' )
-                rc = add_token_to_argv( t );
-            *ptr = s + 1;
-            *done = ( *ptr >= buffer + buflen );
-            switch( *s )
-            {
-                case '"'  : t->state =  1; break;
-                case '\\' : t->state =  2; break;
-            }
-        }
-    }
-    return rc;
-}
-
-
-/* this state, provides 'quoting' ( prevents tokenizing by putting quotes "" around strings
-    which would be otherwise separated by whitespace ) */
-const static char delim1[] = "\"";
-static rc_t tokenize_state1( tokenzr *t, bool *done, char ** ptr, const char *buffer, size_t buflen )
-{
-    rc_t rc;
-    char * s = strpbrk ( *ptr, delim1 );
-    if ( s == NULL )
-    {
-        /* delimiting char not found!
-            ---> add everything to the tokenbuffer */
-        size_t to_add = buflen - ( *ptr - buffer );
-        rc = add_buffer_to_token( t, *ptr, to_add );
-        *done = true;
-    }
-    else
-    {
-        /* delimiting char found!
-            ---> add everything from ptr to s to the tokenbuffer
-            ---> then add token to argv
-            ---> then clear token */
-        rc = add_buffer_to_token( t, *ptr, s - *ptr );
-        if ( rc == 0 )
-        {
-            if ( t->used > 0 )
-                rc = add_token_to_argv( t );
-            *ptr = s + 1;
-            *done = ( *ptr >= buffer + buflen );
-            if ( *s == '"' )
-                t->state = 0;
-        }
-    }
-    return rc;
-}
-
-
-/* this state, provides 'escaping' ( \nnn or \xHH or \' or \" ) */
-static rc_t tokenize_state2( tokenzr *t, bool *done, char ** ptr, const char *buffer, size_t buflen )
-{
-    rc_t rc = 0;
-    char c = **ptr;
-    switch( c )
-    {
-        case '\\' : /* no break intended ! */
-        case '\'' :
-        case '\"' : rc = add_buffer_to_token( t, (*ptr)++, 1 );
-                    break;
-
-        case 't'  : rc = add_buffer_to_token( t, "\t", 1 );
-                    (*ptr)++;
-                    break;
-        case 'n'  : rc = add_buffer_to_token( t, "\n", 1 );
-                    (*ptr)++;
-                    break;
-        case 'r'  : rc = add_buffer_to_token( t, "\r", 1 );
-                    (*ptr)++;
-                    break;
-
-    }
-    t->state = 0;
-    *done = ( *ptr >= buffer + buflen );
-    return rc;
-}
-
-
-static rc_t tokenize_buffer( tokenzr *t, const char *buffer, size_t buflen )
-{
-    rc_t rc = 0;
-    char * ptr = ( char * ) buffer;
-    bool done = false;
-    while ( rc == 0 && !done )
-        switch( t->state )
-        {
-            case 0 : rc = tokenize_state0( t, &done, &ptr, buffer, buflen ); break;
-            case 1 : rc = tokenize_state1( t, &done, &ptr, buffer, buflen ); break;
-            case 2 : rc = tokenize_state2( t, &done, &ptr, buffer, buflen ); break;
-        }
-    return rc;
-}
-
-
-static rc_t tokenize_file_and_progname_into_argv( const char * filename, const char * progname,
-                                                  int * argc, char *** argv )
-{
-    rc_t rc2, rc = 0;
-    VFSManager *vfs_mgr;
-
-    ( *argv ) = NULL;
-    ( *argc ) = 0;
-    rc = VFSManagerMake ( &vfs_mgr );
-    if ( rc != 0 )
-        LOGERR( klogInt, rc, "VFSManagerMake() failed" );
-    else
-    {
-        VPath * vfs_path;
-        rc = VFSManagerMakePath ( vfs_mgr, &vfs_path, "%s", filename );
-        if ( rc != 0 )
-            LOGERR( klogInt, rc, "VPathMake() failed" );
-        else
-        {
-            struct KFile const *my_file;
-            rc = VFSManagerOpenFileRead ( vfs_mgr, &my_file, vfs_path );
-            if ( rc != 0 )
-                LOGERR( klogInt, rc, "VFSManagerOpenFileRead() failed" );
-            else
-            {
-                tokenzr *t;
-                uint64_t pos = 0;
-                char buffer[ 4096 + 1 ];
-                size_t num_read;
-
-                rc = make_tokenzr( &t, argc, argv );
-                if ( rc != 0 )
-                    LOGERR( klogInt, rc, "make_tokenzr() failed" );
-                else
-                {
-                    if ( progname != NULL )
-                        rc = add_string_to_argv( t, progname, string_size( progname ) );
-
-                    if ( rc == 0 )
-                    {
-                        do
-                        {
-                            rc = KFileRead ( my_file, pos, buffer, ( sizeof buffer ) - 1, &num_read );
-                            if ( rc != 0 )
-                                LOGERR( klogInt, rc, "KFileRead() failed" );
-                            else if ( num_read > 0 )
-                            {
-                                buffer[ num_read ]  = 0;
-                                rc = tokenize_buffer( t, buffer, num_read );
-                                if ( rc != 0 )
-                                    LOGERR( klogInt, rc, "tokenize_buffer() failed" );
-                                pos += num_read;
-                            }
-                        } while ( rc == 0 && num_read > 0 );
-                    }
-
-                    if ( rc == 0 && t->used > 0 )
-                    {
-                        rc = add_token_to_argv( t );
-                        if ( rc != 0 )
-                            LOGERR( klogInt, rc, "add_token_to_argv() failed" );
-                    }
-                    free_tokenzr( t );
-                }
-                rc2 = KFileRelease ( my_file );
-                if ( rc2 != 0 )
-                    LOGERR( klogInt, rc2, "KFileRelease() failed" );
-            }
-            rc2 = VPathRelease ( vfs_path );
-            if ( rc2 != 0 )
-                LOGERR( klogInt, rc2, "VPathRelease() failed" );
-        }
-        rc2 = VFSManagerRelease ( vfs_mgr );
-        if ( rc2 != 0 )
-            LOGERR( klogInt, rc2, "VFSManagerRelease() failed" );
-    }
-    return rc;
-}
-
-
-rc_t CC Args_tokenize_file_into_argv( const char * filename, int * argc, char *** argv )
-{
-    return tokenize_file_and_progname_into_argv( filename, NULL, argc, argv );
-}
-
-
-rc_t CC Args_tokenize_file_and_progname_into_argv( const char * filename, const char * progname,
-                                                               int * argc, char *** argv )
-{
-    return tokenize_file_and_progname_into_argv( filename, progname, argc, argv );
-}
-
-
-void CC Args_free_token_argv( int argc, char * argv[] )
-{
-    if ( argv != NULL )
-    {
-        int i;
-        for ( i = 0; i < argc; ++i )
-            free( argv[ i ] );
-        free( argv );
-    }
-}
-
-
-static int sized_str_cmp( const char *a, const char *b )
-{
-    size_t asize = string_size ( a );
-    size_t bsize = string_size ( b );
-    return strcase_cmp ( a, asize, b, bsize, (uint32_t) ( ( asize > bsize ) ? asize : bsize ) );
-}
-
-
-/* get's the filename following a file_option - parameter into the file-name-buffer */
-rc_t CC Args_find_option_in_argv( int argc, char * argv[],
-                                              const char * option_name,
-                                              char * option, size_t option_len )
-{
-    rc_t rc = 0;
-    int i, opt_idx;
-
-    if ( option == NULL )
-        return RC( rcRuntime, rcArgv, rcConstructing, rcParam, rcNull );
-
-    option[ 0 ] = 0;
-
-    if ( argv == NULL || argc < 1 )
-        return RC( rcRuntime, rcArgv, rcConstructing, rcSelf, rcNull );
-    if ( option_name == NULL || option_len == 0 )
-        return RC( rcRuntime, rcArgv, rcConstructing, rcParam, rcNull );
-
-    opt_idx = -1;
-    for ( i = 0; i < argc && ( option[ 0 ] == 0 ); ++i )
-    {
-        if ( sized_str_cmp( (const char *)argv[i], option_name ) == 0 )
-        {
-                opt_idx = ( i + 1 );
-        }
-        else if ( i == opt_idx )
-        {
-            string_copy( option, option_len, argv[i], string_size( argv[i] ) );
-        }
-    }
-    if ( option[ 0 ] == 0 )
-        rc = RC( rcRuntime, rcArgv, rcConstructing, rcParam, rcNotFound );
-    return rc;
-}
-
-
-rc_t CC Args_parse_inf_file( Args * args, const char * file_option )
-{
-    uint32_t count;
-    rc_t rc = ArgsOptionCount( args, file_option, &count );
-    if ( rc != 0 )
-        LOGERR( klogInt, rc, "ArgsOptionCount() failed" );
-    else if ( count > 0 )
-    {
-        uint32_t count2 = 0;
-        do
-        {
-            uint32_t idx;
-            for ( idx = count2; idx < count && rc == 0; ++idx )
-            {
-                const char *filename;
-                rc = ArgsOptionValue( args, file_option, idx, (const void **)&filename );
-                if ( rc != 0 )
-                    LOGERR( klogInt, rc, "ArgsOptionValue() failed" );
-                else if ( filename != NULL )
-                {
-                    int argc;
-                    char ** argv;
-                    rc = Args_tokenize_file_into_argv( filename, &argc, &argv );
-                    if ( rc == 0 && argv != NULL && argc > 0 )
-                    {
-                        rc = ArgsParse ( args, argc, argv );
-                        Args_free_token_argv( argc, argv );
-                    }
-                }
-            }
-            count2 = count;
-            rc = ArgsOptionCount( args, file_option, &count );
-            if ( rc != 0 )
-                LOGERR( klogInt, rc, "ArgsOptionCount() failed" );
-        } while ( rc == 0 && count > count2 );
-    }
-    return rc;
-}
diff --git a/libs/kapp/unix/args-conv-os.c b/libs/kapp/unix/args-conv-os.c
deleted file mode 100644
index bfc9748..0000000
--- a/libs/kapp/unix/args-conv-os.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <kapp/args-conv.h>
-
-rc_t ArgsConvFilepath(const Args * args, uint32_t arg_index, const char * arg, size_t arg_len, void ** result, WhackParamFnP * whack)
-{
-    return ArgsConvDefault(args, arg_index, arg, arg_len, result, whack);
-}
diff --git a/libs/kapp/unix/sysmain.c b/libs/kapp/unix/sysmain.c
deleted file mode 100644
index 15986d3..0000000
--- a/libs/kapp/unix/sysmain.c
+++ /dev/null
@@ -1,296 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "../main-priv.h"
-#include <sysalloc.h>
-#include <kapp/main.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/status.h>
-#include <klib/report.h>
-#include <klib/rc.h>
-#include <atomic32.h>
-
-#include <unistd.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <errno.h>
-#include <assert.h>
-
-#if ! _DEBUGGING && ! defined CATCH_SIGSEGV
-#define CATCH_SIGSEGV 1
-#endif
-
-#if ! defined CATCH_SIGHUP
-#define CATCH_SIGHUP 0
-#endif
-
-#if _DEBUGGING && ! defined PRODUCE_CORE
-#define PRODUCE_CORE 1
-#endif
- 
-
-/*--------------------------------------------------------------------------
- * Main
- */
-
-static bool no_hup;
-static atomic32_t hangup;
-static atomic32_t quitting;
-
-/* Quitting
- *  is the program supposed to exit
- */
-rc_t Quitting ( void )
-{
-    if ( atomic32_read ( & quitting ) == 0 )
-        return 0;
-    LOGMSG ( klogInfo, "EXITING..." );
-    return RC ( rcExe, rcProcess, rcExecuting, rcProcess, rcCanceled );
-}
-
-/* SignalQuit
- *  tell the program to quit
- */
-rc_t SignalQuit ( void )
-{
-    ReportSilence ();
-
-    if ( kill ( 0, SIGTERM ) != 0 ) switch ( errno )
-    {
-    case EINVAL:
-        return RC ( rcExe, rcProcess, rcSignaling, rcMessage, rcInvalid );
-    case EPERM:
-        return RC ( rcExe, rcProcess, rcSignaling, rcMessage, rcUnauthorized );
-    default:
-        return RC ( rcExe, rcProcess, rcSignaling, rcNoObj, rcUnknown );
-    }
-    return 0;
-}
-
-/* Hangup
- *  has the program received a SIGHUP
- */
-rc_t Hangup ( void )
-{
-    if ( atomic32_read ( & hangup ) == 0 )
-        return 0;
-    LOGMSG ( klogInfo, "HANGUP...\n" );
-    return RC ( rcExe, rcProcess, rcExecuting, rcProcess, rcIncomplete );
-}
-
-/* SignalHup
- *  send the program a SIGHUP
- */
-rc_t SignalHup ( void )
-{
-    if ( kill ( 0, SIGHUP ) != 0 ) switch ( errno )
-    {
-    case EINVAL:
-        return RC ( rcExe, rcProcess, rcSignaling, rcMessage, rcInvalid );
-    case EPERM:
-        return RC ( rcExe, rcProcess, rcSignaling, rcMessage, rcUnauthorized );
-    default:
-        return RC ( rcExe, rcProcess, rcSignaling, rcNoObj, rcUnknown );
-    }
-    return 0;
-}
-
-/* SignalNoHup
- *  tell the program to stay alive even after SIGHUP
- */
-rc_t SignalNoHup ( void )
-{
-    no_hup = true;
-    return 0;
-}
-
-/* SigHupHandler
- */
-#if CATCH_SIGHUP
-static
-void SigHupHandler ( int sig )
-{
-    ( ( void ) sig );
-    atomic32_inc ( & hangup );
-    if ( ! no_hup )
-        atomic32_inc ( & quitting );
-    PLOGMSG ( klogInfo, (klogInfo, "SIGNAL - $(sig)\n", "sig=HUP" ));
-}
-#endif
-
-/* SigQuitHandler
- */
-static
-void SigQuitHandler ( int sig )
-{
-    const char *msg;
-
-    ReportSilence ();
-
-    atomic32_inc ( & quitting );
-    switch ( sig )
-    {
-    case SIGINT:
-        msg = "^C";
-        break;
-    case SIGQUIT:
-        msg = "QUIT";
-        break;
-    case SIGTERM:
-        msg = "TERM";
-        break;
-    default:
-        PLOGMSG ( klogWarn, ( klogWarn, "SIGNAL - $(sig)\n", "sig=%d", sig ));
-        return;
-    }
-
-    PLOGMSG ( klogInfo, ( klogInfo, "SIGNAL - $(sig)", "sig=%s", msg ));
-}
-
-/* SigCoreHandler
- */
-#if ! PRODUCE_CORE
-static
-void SigCoreHandler ( int sig )
-{
-    PLOGMSG ( klogFatal, ( klogFatal, "SIGNAL - $(sig)\n", "sig=%d", sig ));
-    exit ( 1 );
-}
-#endif
-
-/* SigSegvHandler
- */
-#if CATCH_SIGSEGV
-static
-void SigSegvHandler ( int sig )
-{
-    ( ( void ) sig );
-    PLOGMSG ( klogFatal, ( klogFatal, "SIGNAL - $(sig)\n", "sig=Segmentation fault" ));
-#if PRODUCE_CORE
-    abort ();
-#endif
-    exit ( 1 );
-}
-#endif
-
-/* main
- *  Unix specific main entrypoint
- */
-int main ( int argc, char *argv [] )
-{
-    static struct
-    {
-        void ( * handler ) ( int );
-        int sig;
-    } sigs [] =
-    {
-#if CATCH_SIGHUP
-        { SigHupHandler, SIGHUP },
-#endif
-        { SigQuitHandler, SIGINT }, 
-#if CATCH_SIGSEGV
-        { SigSegvHandler, SIGSEGV },
-#endif
-        { SigQuitHandler, SIGTERM }
-    }
-#if ! PRODUCE_CORE
-    , core_sigs [] = 
-    {
-#if ! CATCH_SIGSEGV
-        { SigCoreHandler, SIGSEGV },
-#endif
-        { SigCoreHandler, SIGQUIT },
-        { SigCoreHandler, SIGILL },
-        { SigCoreHandler, SIGABRT },
-        { SigCoreHandler, SIGFPE }
-    }
-#endif
-    ;
-
-    rc_t rc;
-    int i, status;
-    struct sigaction sig_saves [ sizeof sigs / sizeof sigs [ 0 ] ];
-#if ! PRODUCE_CORE    
-    struct sigaction core_sig_saves [ sizeof core_sigs / sizeof core_sigs [ 0 ] ];
-#endif
-
-    /* install signal handlers */
-    for ( i = 0; i < sizeof sigs / sizeof sigs [ 0 ]; ++ i )
-    {
-        struct sigaction act;
-        memset ( & act, 0, sizeof act );
-        act . sa_handler = sigs [ i ] . handler;
-        act . sa_flags = SA_RESETHAND;
-
-        status = sigaction ( sigs [ i ] . sig, & act, & sig_saves [ i ] );
-        if ( status < 0 )
-        {
-            PLOGMSG ( klogFatal, ( klogFatal,
-                     "failed to install handler for signal $(sig) - $(msg)"
-                     , "sig=%d,msg='%s'"
-                     , sigs [ i ] . sig
-                     , strerror ( errno )
-                          ));
-            return 2;
-        }
-    }
-
-    /* install signal handlers to prevent generating core files */
-#if ! PRODUCE_CORE
-    for ( i = 0; i < sizeof core_sigs / sizeof core_sigs [ 0 ]; ++ i )
-    {
-        struct sigaction act;
-        memset ( & act, 0, sizeof act );
-        act . sa_handler = core_sigs [ i ] . handler;
-
-        status = sigaction ( core_sigs [ i ] . sig, & act, & core_sig_saves [ i ] );
-        if ( status < 0 )
-        {
-            PLOGMSG ( klogFatal, ( klogFatal,
-                     "failed to install handler for signal $(sig) - $(msg)"
-                     , "sig=%d,msg='%s'"
-                     , core_sigs [ i ] . sig
-                     , strerror ( errno )
-                          ));
-            return 4;
-        }
-    }
-#endif
-
-    /* run this guy */
-    rc = KMane ( argc, argv );
-
-    /* remove handlers, for what it's worth */
-    for ( i = 0; i < sizeof sigs / sizeof sigs [ 0 ]; ++ i )
-        sigaction ( sigs [ i ] . sig, & sig_saves [ i ], NULL );
-
-    return ( rc == 0 ) ? 0 : 3;
-}
-
diff --git a/libs/kapp/win/args-conv-os.c b/libs/kapp/win/args-conv-os.c
deleted file mode 100644
index 87596de..0000000
--- a/libs/kapp/win/args-conv-os.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <kapp/args-conv.h>
-
-#include <os-native.h>
-
-#include "main-priv-win.h"
-
-rc_t ArgsConvFilepath(const Args * args, uint32_t arg_index, const char * arg, size_t arg_len, void ** result, WhackParamFnP * whack)
-{
-    wchar_t arg_wide[MAX_PATH];
-    char * res;
-    
-    string_cvt_wchar_copy(arg_wide, MAX_PATH, arg, arg_len);
-    
-    res = rewrite_arg_as_path(arg_wide, false);
-    if (!res)
-        return RC (rcRuntime, rcArgv, rcConstructing, rcMemory, rcExhausted);
-    
-    *result = res;
-    
-    return 0;
-}
diff --git a/libs/kapp/win/main-priv-win.h b/libs/kapp/win/main-priv-win.h
deleted file mode 100644
index b5484f9..0000000
--- a/libs/kapp/win/main-priv-win.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_main_priv_win_
-#define _h_main_priv_win_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-    
-/*
- * Windows function to convert arguments from wchar_t string to utf-8 string
- * Also checks and converts path from Windows to POSIX format
- *
- * "arg" windows command line argument
- *
- * "known_as_path" indicates whether we need a path conversion path.
- * If it set to false, then rewrite_arg will only convert argument to utf-8.
- * 
- * "after_main" indicates whether rewrite happens before or inside calling KMane
- */
-char * CC rewrite_arg_as_path ( const wchar_t *arg, bool before_kmane );
-    
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_main_priv_ */
diff --git a/libs/kapp/win/ram.c b/libs/kapp/win/ram.c
deleted file mode 100644
index 27743c5..0000000
--- a/libs/kapp/win/ram.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define UNICODE 1
-#define _UNICODE 1
-
-#include "../main-priv.h"
-#include <klib/log.h>
-#include <klib/rc.h>
-
-#include <WINDOWS.H>
-#include <assert.h>
-
-/* KAppGetTotalRam
- *  Windows specific function of getting amount of RAM
- */
-rc_t KAppGetTotalRam ( uint64_t * totalRam )
-{
-    rc_t rc;
-    BOOL ret;
-
-    assert ( totalRam != 0 );
-
-    ret = GetPhysicallyInstalledSystemMemory ( totalRam );
-    if ( ! ret )
-    {
-		DWORD error = GetLastError();
-        rc = RC ( rcApp, rcNoTarg, rcInitializing, rcMemory, rcFailed );
-        PLOGERR ( klogFatal, ( klogFatal, rc,
-                    "failed to retrieve size of RAM. error code: $(ERR_CODE) - $(ERR_MESSAGE)"
-                    , "ERR_CODE=%u,ERR_MESSAGE=%!"
-                    , (uint32_t)error, (uint32_t)error ));
-        return rc;
-    }
-
-    *totalRam *= 1024;
-
-    return 0;
-}
diff --git a/libs/kapp/win/sysmain.c b/libs/kapp/win/sysmain.c
deleted file mode 100644
index 90a56ec..0000000
--- a/libs/kapp/win/sysmain.c
+++ /dev/null
@@ -1,300 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define UNICODE 1
-#define _UNICODE 1
-
-#include "../main-priv.h"
-#include <sysalloc.h>
-#include <kapp/main.h>
-#include <klib/log.h>
-#include <klib/status.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/report.h> 
-#include <atomic32.h>
-
-/* #define _WIN32_WINNT 0x0500 */
-/* commented out: 10/21/2010 by wolfgang
-   reason: Kurt introduced in sysdll.c a new functionality
-   which requires a newer windows-version 
-   (i realized it as compiler parameter in build/Makefile.vc++) */
-
-#include <WINDOWS.H>
-#include <OBJBASE.H>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <ctype.h>
-#include <os-native.h>
-
-/*--------------------------------------------------------------------------
- * Main
- */
-
-static bool no_hup;
-static atomic32_t hangup;
-static atomic32_t quitting;
-
-static bool convert_args_paths = true;
-
-/* Quitting
- *  is the program supposed to exit
- */
-rc_t CC Quitting ( void )
-{
-    if ( atomic32_read ( & quitting ) == 0 )
-        return 0;
-    LOGMSG ( klogInfo, "EXITING..." );
-    return RC ( rcExe, rcProcess, rcExecuting, rcProcess, rcCanceled );
-}
-
-/* SignalQuit
- *  tell the program to quit
- */
-rc_t CC SignalQuit ( void )
-{
-    return RC ( rcExe, rcProcess, rcSignaling, rcNoObj, rcUnknown );
-}
-
-/* Hangup
- *  has the program received a SIGHUP
- */
-rc_t CC Hangup ( void )
-{
-    if ( atomic32_read ( & hangup ) == 0 )
-        return 0;
-    LOGMSG ( klogInfo, "HANGUP...\n" );
-    return RC ( rcExe, rcProcess, rcExecuting, rcProcess, rcIncomplete );
-}
-
-/* SignalHup
- *  send the program a SIGHUP
- */
-rc_t CC SignalHup ( void )
-{
-    return RC ( rcExe, rcProcess, rcSignaling, rcNoObj, rcUnknown );
-}
-
-/* SignalNoHup
- *  tell the program to stay alive even after SIGHUP
- */
-rc_t CC SignalNoHup ( void )
-{
-    no_hup = true;
-    return 0;
-}
-
-
-BOOL CC Our_HandlerRoutine( DWORD dwCtrlType )
-{
-    BOOL res = FALSE;
-    switch( dwCtrlType )
-    {
-    case CTRL_C_EVENT : ReportSilence ();
-                        atomic32_inc ( & quitting );
-                        res = TRUE;
-                        break;
-    }
-    return res;
-}
-
-
-/* main
- *  Windows specific main entrypoint
- */
-static
-int main2 ( int argc, char *argv [] )
-{
-    rc_t rc;
-
-    SetConsoleCtrlHandler( ( PHANDLER_ROUTINE ) Our_HandlerRoutine, TRUE );
-
-    /* run this guy */
-    rc = KMane ( argc, argv );
-
-    return ( rc == 0 ) ? 0 : 3;
-}
-
-static
-char * convert_arg_utf8( const wchar_t *arg )
-{
-    size_t src_size, dst_size;
-    char * utf8;
-    /* measure the string */
-    wchar_cvt_string_measure ( arg, & src_size, & dst_size );
-    
-    /* allocate a UTF-8 buffer */
-    utf8 = malloc ( dst_size + 1 );
-    if ( utf8 != NULL )
-    {
-        /* copy the wide argument to utf8 */
-        wchar_cvt_string_copy ( utf8, dst_size + 1,
-                               arg, src_size );
-        
-        /* terminate the string */
-        utf8 [ dst_size ] = 0;
-    }
-    
-    return utf8;
-}
-
-char * CC rewrite_arg_as_path ( const wchar_t *arg, bool before_kmane )
-{
-    char *utf8;
-    bool has_drive = false;
-    size_t i, src_size, dst_size;
-    DWORD len;
-
-    /* detect drive or full path */
-    wchar_t rewrit [ MAX_PATH ];
-    /* 
-       we don't want to rewrite twice, 
-       so if we rewrote first time
-           from wmain (before_kmane = true, convert_args_paths = true),
-       then we skip second rewrite by checking convert_args_paths to be true
-     */
-    if ( arg [ 0 ] < 128 && (before_kmane || !convert_args_paths))
-    {
-        bool rewrite = false;
-
-        /* look for non-drive path */
-        if ( arg [ 0 ] == '\\' || arg [ 0 ] == '/' )
-        {
-            /* full path - not network */
-            if ( arg [ 1 ] != '\\' && arg [ 1 ] != '/' )
-            {
-                /* check for cygdrive */
-                if ( memcmp( arg, L"/cygdrive/", sizeof L"/cygdrive/" - sizeof L"" ) == 0 )
-                    arg += sizeof "/cygdrive" - 1;
-                else
-                    rewrite = true;
-             
-            }
-            
-        }
-        /* look for drive path */
-        else if ( isalpha ( arg [ 0 ] ) && arg [ 1 ] == ':' )
-        {
-            has_drive = true;
-
-            /* look for drive relative */
-            if ( arg [ 2 ] != '\\' && arg [ 2 ] != '/' )
-                rewrite = true;
-        }
-        if ( rewrite )
-        {
-            /* incomplete path */
-            len = GetFullPathNameW ( arg, sizeof rewrit / sizeof rewrit [ 0 ], rewrit, NULL );
-            if ( len == 0 || len >= MAX_PATH )
-            {
-                /* complain */
-                return NULL;
-            }
-            arg = rewrit;
-
-            has_drive = ( isalpha ( arg [ 0 ] ) && arg [ 1 ] == ':' );
-        }
-    }
-
-    /* allocate a UTF-8 buffer */
-    utf8 = convert_arg_utf8 ( arg );
-    if ( utf8 != NULL )
-    {
-        dst_size = string_size(utf8);
-        if (has_drive) 
-        {
-            utf8 [ 1 ] = utf8 [ 0 ];
-            utf8 [ 0 ] = '/';
-        }
-
-        /* map all backslashes to fwdslashes */
-        for ( i = 0; i < dst_size; ++ i )
-        {
-            if ( utf8 [ i ] == '\\' )
-                utf8 [ i ] = '/';
-        }
-    }
-
-    return utf8;
-}
-
-int __cdecl wmain ( int argc, wchar_t *wargv [], wchar_t *envp [] )
-{
-    char **argv;
-    int i, status;
-
-    /* must initialize COM... must initialize COM... */
-    /* CoInitializeEx ( NULL, COINIT_MULTITHREADED ); */
-    CoInitialize(NULL);
-
-    /* create a copy of args */
-    argv = calloc ( argc + 1, sizeof * argv );
-    if ( argv == NULL )
-        status = 5;
-    else
-    {
-        /* convert wchar_t arguments to UTF-8
-           rewriting anything that looks like a path */
-        for ( i = 0; i < argc; ++ i )
-        {
-            if ( convert_args_paths )
-            {
-                argv [ i ] = rewrite_arg_as_path ( wargv [ i ], true );
-            }
-            else
-            {
-                argv [ i ] = convert_arg_utf8 ( wargv [ i ] );
-            }
-            
-            if ( argv [ i ] == NULL )
-                break;
-        }
-
-        /* perform normal main operations on UTF-8 with POSIX-style paths */
-        if ( i == argc )
-            status = main2 ( argc, argv );
-
-        /* tear down argv */
-        while ( -- i >= 0 )
-            free ( argv [ i ] );
-        free ( argv );
-    }
-
-    /* balance the COM initialization */
-    CoUninitialize ();
-
-    return status;
-}
-
-void  __declspec( dllexport ) __stdcall wmainCRTStartupNoPathConversion()
-{
-    convert_args_paths = false;
-    wmainCRTStartup();
-}
diff --git a/libs/kdb/Makefile b/libs/kdb/Makefile
deleted file mode 100644
index 9dbfb99..0000000
--- a/libs/kdb/Makefile
+++ /dev/null
@@ -1,164 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/kdb
-
-INT_LIBS = \
-	libkdb \
-	libwkdb
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES = \
-	$(KDB_OBJ) \
-	$(WKDB_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-DEFINES += -DUSE_BSTREE_IN_COLUMN_IDX1
-
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS) $(ALL_DEFS)
-
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# kdb
-#
-$(ILIBDIR)/libkdb: $(addprefix $(ILIBDIR)/libkdb.,$(ILIBEXT))
-
-KDB_CMN = \
-	btree \
-	dbmgr-cmn \
-#	database-cmn
-
-KDB_SRC = \
-	$(KDB_CMN) \
-	kdb \
-	dbmgr \
-	dbcc-cmn \
-	database \
-	database-cc \
-	table \
-	table-cc \
-	column \
-	column-cc \
-	coldata \
-	colidx \
-	colidx0 \
-	colidx1 \
-	colidx2 \
-	idxblk \
-	meta \
-	index \
-	idstats \
-	trieidx-v1 \
-	trieval-v1 \
-	ptrieval-v1 \
-	trieidx-v2 \
-	trieval-v2 \
-	ptrieval-v2 \
-	u64idx-v3
-
-KDB_OBJ = \
-	$(addsuffix .$(LOBX),$(KDB_SRC))
-
-KDB_LIB = \
-	-dvfs \
-	-dkrypto \
-	-dkfs \
-	-dklib
-
-$(ILIBDIR)/libkdb.$(LIBX): $(KDB_OBJ)
-	$(LD) --slib -o $@ $^ $(KDB_LIB)
-
-
-#-------------------------------------------------------------------------------
-# wkdb
-#
-$(ILIBDIR)/libwkdb: $(addprefix $(ILIBDIR)/libwkdb.,$(ILIBEXT))
-
-WKDB_SRC = \
-	$(KDB_CMN) \
-	wkdb \
-	wdbmgr \
-	wdatabase \
-	wtable \
-	wcolumn \
-	wcoldata \
-	wcolidx \
-	wcolidx0 \
-	wcolidx1 \
-	wcolidx2 \
-	idxblk \
-	widxblk \
-	wmeta \
-	windex \
-	wtrieidx-v1 \
-	wtrieidx-v2 \
-	wu64idx-v3
-
-WKDB_OBJ = \
-	$(addsuffix .$(LOBX),$(WKDB_SRC))
-
-WKDB_LIB = \
-	-dvfs \
-	-dkrypto \
-	-dkfs \
-	-dklib
-
-$(ILIBDIR)/libwkdb.$(LIBX): $(WKDB_OBJ)
-	$(LD) --slib -o $@ $^ $(WKDB_LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/kdb/btree.c b/libs/kdb/btree.c
deleted file mode 100644
index 9490dc1..0000000
--- a/libs/kdb/btree.c
+++ /dev/null
@@ -1,579 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define BTREE_KEY2ID 1
-
-#include <kdb/extern.h>
-#include <kdb/btree.h>
-#include <kfs/file.h>
-#include <kfs/pagefile.h>
-#include <klib/refcount.h>
-#include <klib/btree.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-/*--------------------------------------------------------------------------
- * KBTree
- *  this implementation is an extremely simplified structure
- *  meant to provide the ability to create an index for temporary use
- */
-#define eByteOrderTag 0x05031988
-#define eByteOrderReverse 0x88190305
-
-
-/* v3 does not store values, but stores keys in node pages */
-typedef struct KBTreeHdr_v3 KBTreeHdr_v3;
-struct KBTreeHdr_v3
-{
-    /* last entry id */
-    uint32_t id_seq;
-
-    /* key min/max */
-    uint16_t key_min, key_max;
-
-    /* type [ 0 ] is type
-       type [ 1 ] is non-zero if comparison function was used
-       rest are for alignment */
-    uint8_t type [ 4 ];
-
-    /* tree root */
-    uint32_t root;
-
-    /* next to last */
-    uint32_t version;
-
-    /* last */
-    uint32_t endian;
-};
-
-struct Pager {
-    KPageFile *pager;
-    rc_t rc;
-};
-
-static void const *PagerAlloc(Pager *self, uint32_t *newid)
-{
-    KPage *page = NULL;
-    self->rc = KPageFileAlloc(self->pager, &page, newid);
-    return (void const *)page;
-}
-
-static void const *PagerUse(Pager *self, uint32_t pageid)
-{
-    KPage *page = NULL;
-    self->rc = KPageFileGet(self->pager, &page, pageid);
-    return (void const *)page;
-}
-
-static void const *PagerAccess(Pager *self, void const *page)
-{
-    void const *mem = NULL;
-    self->rc = KPageAccessRead((KPage const *)page, &mem, NULL);
-    return mem;
-}
-
-static void *PagerUpdate(Pager *self, void const *page)
-{
-    void *mem = NULL;
-    self->rc = KPageAccessUpdate((KPage *)page, &mem, NULL);
-    return mem;
-}
-
-static void PagerUnuse(Pager *self, void const *page)
-{
-    KPageRelease((KPage const *)page);
-}
-
-static Pager_vt const KPageFile_vt = {
-    PagerAlloc,
-    PagerUse,
-    PagerAccess,
-    PagerUpdate,
-    PagerUnuse
-};
-
-typedef struct KBTreeHdr_v3 KBTreeHdr;
-
-static
-rc_t KBTreeReadHeader ( KBTreeHdr *hdr, const KFile *f )
-{
-    uint64_t eof;
-    rc_t rc = KFileSize ( f, & eof );
-    if ( rc == 0 )
-    {
-        size_t num_read;
-
-        /* this would be an empty file */
-        if ( eof == 0 )
-        {
-            memset ( hdr, 0, sizeof * hdr );
-            return RC ( rcDB, rcTree, rcConstructing, rcData, rcNotFound );
-        }
-
-        if ( eof < sizeof * hdr )
-            return RC ( rcDB, rcTree, rcConstructing, rcData, rcCorrupt );
-
-        rc = KFileReadAll ( f, eof - sizeof * hdr, hdr, sizeof * hdr, & num_read );
-        if ( rc == 0 && num_read != sizeof * hdr )
-            rc = RC ( rcDB, rcTree, rcConstructing, rcData, rcInsufficient );
-        if ( rc == 0 )
-        {
-            if ( hdr -> endian != eByteOrderTag )
-            {
-                if ( hdr -> endian == eByteOrderReverse )
-                    return RC ( rcDB, rcTree, rcConstructing, rcByteOrder, rcIncorrect );
-                return RC ( rcDB, rcTree, rcConstructing, rcData, rcCorrupt );
-            }
-            if ( hdr -> version != 2 )
-                return RC ( rcDB, rcTree, rcConstructing, rcHeader, rcBadVersion );
-        }
-    }
-    return rc;
-}
-
-struct KBTree
-{
-    /* file itself */
-    KFile *file;
-
-    /* page cache layered on top */
-    Pager pgfile;
-
-    /* "header" is stored at end */
-    KBTreeHdr hdr;
-
-    KRefcount refcount;
-
-    bool read_only;
-};
-
-/* Whack
- */
-static
-rc_t KBTreeWhack ( KBTree *self )
-{
-    if ( self -> read_only || self -> file == NULL )
-        KPageFileRelease ( self -> pgfile.pager );
-    else
-    {
-        size_t num_writ;
-
-        /* request page file size */
-        uint64_t eof;
-        rc_t rc = KPageFileSize ( self -> pgfile.pager, & eof, NULL, NULL );
-        if ( rc != 0 )
-            return rc;
-
-        /* drop the page file and its cache */
-        KPageFileRelease ( self -> pgfile.pager );
-
-        /* write header to tail */        
-        rc = KFileWrite ( self -> file, eof, & self -> hdr, sizeof self -> hdr, & num_writ );
-        if ( rc == 0 && num_writ != sizeof self -> hdr )
-            rc = RC ( rcDB, rcTree, rcPersisting, rcTransfer, rcIncomplete );
-        if ( rc == 0 )
-            rc = KFileSetSize ( self -> file, eof + sizeof self -> hdr );
-        if ( rc != 0 )
-        {
-            /* TBD - can issue a warning here */
-        }
-    }
-
-    KFileRelease ( self -> file );
-    free ( self );
-    return 0;
-}
-
-
-/* MakeRead
- * MakeUpdate
- *  make a b-tree object backed by supplied KFile
- *
- *  "backing" [ IN ] - open file with read permissions.
- *   NB - a reference will be attached to this file.
- *
- *  "climit" [ IN ] - cache limit in bytes. the internal cache will
- *   retain UP TO ( but not exceeding ) the limit specified. a value
- *   of 0 ( zero ) will disable caching.
- *
- *  "cmp" [ IN, NULL OKAY ] - optional comparison callback function for opaque keys.
- *   specific key types will use internal comparison functions. for opaque keys, a
- *   NULL function pointer will cause ordering by size and binary comparison.
- */
-LIB_EXPORT rc_t CC KBTreeMakeRead_1 ( const KBTree **btp,
-    const KFile *backing, size_t climit )
-{
-    rc_t rc;
-
-    if ( btp == NULL )
-        rc = RC ( rcDB, rcTree, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( backing == NULL )
-            rc = RC ( rcDB, rcTree, rcConstructing, rcFile, rcNull );
-        else
-        {
-            KBTree *bt = malloc ( sizeof * bt );
-            if ( bt == NULL )
-                rc = RC ( rcDB, rcTree, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KBTreeReadHeader ( & bt -> hdr, backing );
-                if ( rc == 0 )
-                {
-                    rc = KFileAddRef ( backing );
-                    if ( rc == 0 )
-                    {
-                        /* create page file */
-                        rc = KPageFileMakeRead ( ( const KPageFile** ) & bt -> pgfile.pager, backing, climit );
-                        if ( rc == 0 )
-                        {
-                            /* ready to go */
-                            bt -> file = ( KFile* ) backing;
-                            KRefcountInit ( & bt -> refcount, 1, "KBTree", "make-read", "btree" );
-                            bt -> read_only = true;
-
-                            * btp = bt;
-                            return 0;
-                        }
-
-                        KFileRelease ( backing );
-                    }
-                }
-
-                free ( bt );
-            }
-        }
-
-        * btp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* MakeUpdate
- *  make a b-tree object backed by supplied KFile
- *
- *  "backing" [ IN ] - open file with read & write permissions.
- *   NB - a reference will be attached to this file.
- *
- *  "climit" [ IN ] - cache limit in bytes. the internal cache will
- *   retain UP TO ( but not exceeding ) the limit specified. a value
- *   of 0 ( zero ) will disable caching.
- *
- *  "write_through" [ IN ] - if true, causes flushing of modified page
- *   after its value is released
- *
- *  "type" [ IN ] - describes the key type ( see above )
- *
- *  "key_chunk_size" [ IN ] - the "chunking" ( alignment ) factor for
- *   storing keys, rounded up to the nearest power of 2.
- *
- *  "value_chunk_size" [ IN ] - chunking factor for values
- *   ( see "key_chunk_size" )
- *
- *  "min_key_size" [ IN ] and "max_key_size" [ IN ] - specifies the allowed
- *   opaque key sizes. min == max implies fixed size. ignored for well
- *   known fixed size key types.
- *
- *  "min_value_size" [ IN ] and "max_value_size" [ IN ] - specifies the allowed
- *   value sizes. min == max implies fixed size.
- *
- *  "cmp" [ IN ] - comparison callback function for opaque keys.
- */
-LIB_EXPORT rc_t CC KBTreeMakeUpdate_1 ( KBTree **btp, KFile *backing,
-    size_t climit )
-{
-    rc_t rc;
-
-    if ( btp == NULL )
-        rc = RC ( rcDB, rcTree, rcConstructing, rcParam, rcNull );
-    else
-    {
-        {
-            KBTree *bt = calloc ( 1,sizeof * bt );
-            if ( bt == NULL )
-                rc = RC ( rcDB, rcTree, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                if ( backing == NULL || ( rc = KBTreeReadHeader ( & bt -> hdr, backing )) == 0 || GetRCState ( rc ) == rcNotFound )
-                {
-                    /* detect empty file */
-                    if ( bt -> hdr . version == 0 )
-                    {
-                        assert ( bt -> hdr . id_seq == 0 );
-                        bt -> hdr . type [ 0 ] = 0;
-                        bt -> hdr . type [ 1 ] = 0;
-                        bt -> hdr . key_min = 0;
-                        bt -> hdr . key_max = 0;
-                        bt -> hdr . version = 3;
-                        bt -> hdr . endian = eByteOrderTag;
-                        rc = 0;
-                    }
-                    else
-                    {
-                        /* check for parameter equivalence */
-                        if ( bt -> hdr . version < 3 )
-                            rc = RC ( rcDB, rcTree, rcConstructing, rcHeader, rcBadVersion );
-                    }
-
-                    if ( rc == 0 )
-                    {
-                        if(backing) rc = KFileAddRef ( backing );
-                        if ( rc == 0 )
-                        {
-                            /* create page file */
-                            rc = KPageFileMakeUpdate ( & bt -> pgfile.pager, backing, climit, false );
-                            if ( rc == 0 )
-                            {
-                                /* ready to go */
-                                bt -> file = backing;
-                                KRefcountInit ( & bt -> refcount, 1, "KBTree", "make-update", "btree" );
-                                bt -> read_only = false;
-
-                                * btp = bt;
-                                return 0;
-                            }
-
-                            if(backing) KFileRelease ( backing );
-                        }
-                    }
-                }
-
-                free ( bt );
-            }
-        }
-
-        * btp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KBTreeAddRef ( const KBTree *self )
-{
-    if ( self != NULL ) switch ( KRefcountAdd ( & self -> refcount, "KBTree" ) )
-    {
-    case krefOkay:
-        break;
-    default:
-        return RC ( rcDB, rcTree, rcAttaching, rcConstraint, rcViolated );
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KBTreeRelease ( const KBTree *self )
-{
-    if ( self != NULL ) switch ( KRefcountDrop ( & self -> refcount, "KBTree" ) )
-    {
-    case krefOkay:
-        break;
-    case krefWhack:
-        return KBTreeWhack ( ( KBTree* ) self );
-    default:
-        return RC ( rcDB, rcTree, rcReleasing, rcConstraint, rcViolated );
-    }
-    return 0;
-}
-
-
-/* DropBacking
- *  used immediately prior to releasing
- *  prevents modified pages from being flushed to disk
- *  renders object nearly useless
- */
-LIB_EXPORT rc_t CC KBTreeDropBacking ( KBTree *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcTree, rcDetaching, rcSelf, rcNull );
-
-    rc = KPageFileDropBacking ( self -> pgfile.pager );
-    if ( rc == 0 )
-    {
-        rc = KFileRelease ( self -> file );
-        if ( rc == 0 )
-            self -> file = NULL;
-    }
-
-    return rc;
-}
-
-
-/* Size
- *  returns size in bytes of file and cache
- *
- *  "lsize" [ OUT, NULL OKAY ] - return parameter for logical size
- *
- *  "fsize" [ OUT, NULL OKAY ] - return parameter for file size
- *
- *  "csize" [ OUT, NULL OKAY ] - return parameter for cache size
- */
-LIB_EXPORT rc_t CC KBTreeSize ( const KBTree *self,
-    uint64_t *lsize, uint64_t *fsize, size_t *csize )
-{
-    size_t dummysz;
-    uint64_t dummy64;
-
-    if ( self != NULL )
-        return KPageFileSize ( self -> pgfile.pager, lsize, fsize, csize );
-
-    if ( lsize == NULL )
-        lsize = & dummy64;
-    if ( fsize == NULL )
-        fsize = & dummy64;
-    if ( csize == NULL )
-        csize = & dummysz;
-
-    * lsize = 0;
-    * fsize = 0;
-    * csize = 0;
-
-    return RC ( rcDB, rcTree, rcAccessing, rcSelf, rcNull );
-}
-
-
-/* Find
- *  searches for a match
- *
- *  "val" [ OUT ] - return parameter for value found
- *   accessed via KBTreeValueAccess* described above
- *   must be balanced with a call to KBTreeValueWhack.
- *
- *  "key" [ IN ] and "key_size" [ IN ] - describes an
- *   opaque key
- */
-LIB_EXPORT rc_t CC KBTreeFind ( const KBTree *self, uint64_t *id,
-    const void *key, size_t key_size )
-{
-    rc_t rc;
-
-    if ( id == NULL )
-        rc = RC ( rcDB, rcTree, rcSelecting, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcTree, rcSelecting, rcSelf, rcNull );
-        else if ( key_size == 0 )
-            rc = RC ( rcDB, rcTree, rcSelecting, rcParam, rcEmpty );
-        else if ( key == NULL )
-            rc = RC ( rcDB, rcTree, rcSelecting, rcParam, rcNull );
-        else if ( self -> hdr . root == 0 )
-            rc = RC ( rcDB, rcTree, rcSelecting, rcItem, rcNotFound );
-        else
-        {
-            uint32_t id32 = 0;
-            rc = BTreeFind(self->hdr.root, (Pager *)&self->pgfile, &KPageFile_vt, &id32, key, key_size);
-            if (self->pgfile.rc)
-                rc = self->pgfile.rc;
-            *id = id32;
-        }
-    }
-
-    return rc;
-}
-
-
-/* Entry
- *  searches for a match or creates a new entry
- *
- *  "val" [ OUT ] - return parameter for value found
- *   accessed via KBTreeValueAccess* described above
- *   must be balanced with a call to KBTreeValueWhack.
- *
- *  "was_inserted" [ OUT ] - if true, the returned value was the result of an
- *   insertion and can be guaranteed to be all 0 bits. otherwise, the returned
- *   value will be whatever was there previously.
- *
- *  "alloc_size" [ IN ] - the number of value bytes to allocate upon insertion,
- *   i.e. if the key was not found. this value must agree with the limits
- *   specified in Make ( see above ).
- *
- *  "key" [ IN ] and "key_size" [ IN ] - describes an
- *   opaque key
- */
-LIB_EXPORT rc_t CC KBTreeEntry ( KBTree *self, uint64_t *id,
-    bool *was_inserted, const void *key, size_t key_size )
-{
-    rc_t rc;
-
-    bool dummy;
-    if ( was_inserted == NULL )
-        was_inserted = & dummy;
-    * was_inserted = false;
-
-    if ( id == NULL )
-        rc = RC ( rcDB, rcTree, rcUpdating, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcTree, rcUpdating, rcSelf, rcNull );
-        else if ( key_size == 0 )
-            rc = RC ( rcDB, rcTree, rcUpdating, rcParam, rcEmpty );
-        else if ( key == NULL )
-            rc = RC ( rcDB, rcTree, rcUpdating, rcParam, rcNull );
-        else
-        {
-            uint32_t id32 = *id;
-            rc = BTreeEntry(&self->hdr.root, (Pager *)&self->pgfile, &KPageFile_vt, &id32, was_inserted, key, key_size);
-            if (self->pgfile.rc)
-                rc = self->pgfile.rc;
-            *id = id32;
-        }
-    }
-
-    return rc;
-}
-
-
-/* ForEach
- *  executes a function on each tree element
- *
- *  "reverse" [ IN ] - if true, iterate in reverse order
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - callback function
- */
-LIB_EXPORT rc_t CC KBTreeForEach ( const KBTree *self, bool reverse, void ( CC * f ) ( const void *key, size_t key_size, uint32_t id, void *data ), void *data )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcTree, rcVisiting, rcSelf, rcNull );
-    else if ( f == NULL )
-        return RC ( rcDB, rcTree, rcVisiting, rcFunction, rcNull );
-    else
-        return BTreeForEach(self->hdr.root, (Pager *)&self->pgfile, &KPageFile_vt, reverse, f, data);
-}
diff --git a/libs/kdb/cc-priv.h b/libs/kdb/cc-priv.h
deleted file mode 100644
index fe25705..0000000
--- a/libs/kdb/cc-priv.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- *============================================================================
- *
- */
-
-#ifndef _h_cc_priv_
-#define _h_cc_priv_
-
-#ifndef _h_kdb_consistency_check_
-#include <kdb/consistency-check.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDirectory;
-
-
-rc_t DirectoryCheckMD5 ( const KDirectory *dir, const char *name,
-    CCReportInfoBlock *info, CCReportFunc report, void *data );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_cc_priv_ */
diff --git a/libs/kdb/coldata-priv.h b/libs/kdb/coldata-priv.h
deleted file mode 100644
index 45e98c0..0000000
--- a/libs/kdb/coldata-priv.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_coldata_priv_
-#define _h_coldata_priv_
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-typedef union KColumnPageMap KColumnPageMap;
-
-
-/*--------------------------------------------------------------------------
- * KColumnData
- *  data fork
- *
- *  only handling append-mode today
- *
- *  kept 64-bit aligned
- */
-typedef struct KColumnData KColumnData;
-struct KColumnData
-{
-    /* cached end of data fork */
-    uint64_t eof;
-
-    /* data fork itself */
-    struct KFile const *f;
-
-    /* page size */
-    size_t pgsize;
-};
-
-/* DefaultPageSize
- *  static method
- */
-#define KColumnDataDefaultPageSize( reuse_pages ) \
-    ( ( reuse_pages ) ? 4096 : 1 )
-
-/* Open
- */
-rc_t KColumnDataOpenRead ( KColumnData *self,
-    const KDirectory *dir, uint64_t eof, size_t pgsize );
-
-/* Whack
- */
-rc_t KColumnDataWhack ( KColumnData *self );
-
-/* Read
- *  reads from the data fork using a blob map
- */
-rc_t KColumnDataRead ( const KColumnData *self, const KColumnPageMap *pm,
-    size_t offset, void *buffer, size_t bsize, size_t *num_read );
-
-
-/*--------------------------------------------------------------------------
- * KColumnPageMap
- *  map of pages involved in column blob
- */
-union KColumnPageMap
-{
-    /* for non-paged data forks, a single page id
-       describes the start of the blob, where the
-       remainder is sequential */
-    uint64_t pg;
-};
-
-/* Open
- *  opens a page map by raw page id and size
- *
- *  "pm" [ OUT ] - modifiable parameter for blob page map
- *
- *  "pg" [ IN ] and "sz" [ IN ] - identifies pages of data fork included
- *  within the blob.
- */
-rc_t KColumnPageMapOpen ( KColumnPageMap *pm,
-    KColumnData *cd, uint64_t pg, size_t sz );
-
-/* Whack
- *  disposes of memory in the case of a page array
- */
-void KColumnPageMapWhack ( KColumnPageMap *self, const KColumnData *cd );
-
-/* Id
- *  captures id of initial page
- */
-rc_t KColumnPageMapId ( const KColumnPageMap *self,
-    const KColumnData *cd, uint64_t *pg );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_coldata_priv_ */
diff --git a/libs/kdb/coldata.c b/libs/kdb/coldata.c
deleted file mode 100644
index 44fecd6..0000000
--- a/libs/kdb/coldata.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "coldata-priv.h"
-#include <kfs/file.h>
-#include <kfs/buffile.h>
-#include <kfs/impl.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-
-
-#define DATA_READ_FILE_BUFFER 0
-
-
-/*--------------------------------------------------------------------------
- * KColumnData
- */
-
-
-/* Init
- */
-static
-rc_t KColumnDataInit ( KColumnData *self, uint64_t pos, size_t pgsize )
-{
-    rc_t rc = KFileSize ( self -> f, & self -> eof );
-    if ( rc == 0 )
-    {
-        if ( self -> eof < pos || pgsize == 0 || ( pos % pgsize ) != 0 )
-            rc = RC ( rcDB, rcColumn, rcConstructing, rcData, rcCorrupt );
-        else
-        {
-            self -> eof = pos;
-            self -> pgsize = pgsize;
-            return 0;
-        }
-    }
-
-    KFileRelease ( self -> f );
-    self -> f = NULL;
-    return rc;
-}
-
-/* Open
- */
-rc_t KColumnDataOpenRead ( KColumnData *self,
-    const KDirectory *dir, uint64_t eof, size_t pgsize )
-{
-    rc_t rc = KDirectoryOpenFileRead ( dir,
-        & self -> f, "data" );
-#if DATA_READ_FILE_BUFFER
-    if ( rc == 0 )
-    {
-        const KFile * orig = self -> f;
-        rc = KBufFileMakeRead ( & self -> f, self -> f, DATA_READ_FILE_BUFFER );
-        if ( rc == 0 )
-        {
-            KFileRelease ( orig );
-        }
-        else
-        {
-            self -> f = orig;
-            rc = 0;
-        }
-    }
-#endif
-    if ( rc == 0 )
-        rc = KColumnDataInit ( self, eof, pgsize );
-    return rc;
-}
-
-/* Whack
- */
-rc_t KColumnDataWhack ( KColumnData *self )
-{
-    rc_t rc = KFileRelease ( self -> f );
-    if ( rc == 0 )
-        self -> f = NULL;
-    return rc;
-}
-
-/* Read
- *  reads from the data fork using a blob map
- */
-rc_t KColumnDataRead ( const KColumnData *self, const KColumnPageMap *pm,
-    size_t offset, void *buffer, size_t bsize, size_t *num_read )
-{
-    uint64_t pos;
-
-    assert ( self != NULL );
-    assert ( pm != NULL );
-
-    if ( bsize == 0 )
-    {
-        assert ( num_read != NULL );
-        * num_read = 0;
-        return 0;
-    }
-
-    pos = pm -> pg * self -> pgsize;
-    return KFileRead ( self -> f, pos + offset, buffer, bsize, num_read );
-}
-
-
-/*--------------------------------------------------------------------------
- * KColumnPageMap
- *  map of pages involved in column blob
- */
-
-/* Open
- *  opens an blob by raw page id and size
- *
- *  "pm" [ OUT ] - modifiable parameter for blob page map
- *
- *  "pg" [ IN ] and "sz" [ IN ] - identifies pages of data fork included
- *  within the blob.
- */
-rc_t KColumnPageMapOpen ( KColumnPageMap *self,
-    KColumnData *cd, uint64_t pg, size_t sz )
-{
-    uint64_t pos;
-
-    assert ( cd != NULL );
-    pos = pg * cd -> pgsize;
-    if ( pos + sz > cd -> eof )
-    {
-        if ( pos >= cd -> eof )
-            return RC ( rcDB, rcBlob, rcOpening, rcPagemap, rcExcessive );
-        return RC ( rcDB, rcBlob, rcOpening, rcRange, rcExcessive );
-    }
-
-    assert ( self != NULL );
-    self -> pg = pg;
-
-    return 0;
-}
-
-/* Whack
- *  disposes of memory in the case of a page array
- */
-void KColumnPageMapWhack ( KColumnPageMap *self, const KColumnData *cd )
-{
-    assert ( self != NULL );
-    assert ( cd != NULL );
-}
-
-/* Id
- *  captures id of initial page
- */
-rc_t KColumnPageMapId ( const KColumnPageMap *self,
-    const KColumnData *cd, uint64_t *pg )
-{
-    assert ( self != NULL );
-    assert ( cd != NULL );
-    assert ( pg != NULL );
-
-    * pg = self -> pg;
-    return 0;
-}
diff --git a/libs/kdb/colfmt-priv.h b/libs/kdb/colfmt-priv.h
deleted file mode 100644
index 0564ede..0000000
--- a/libs/kdb/colfmt-priv.h
+++ /dev/null
@@ -1,339 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_colfmt_priv_
-#define _h_colfmt_priv_
-
-#ifndef _h_kdbfmt_priv_
-#include "kdbfmt-priv.h"
-#endif
-
-#include <endian.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KColLocDesc
- *  general location descriptor
- */
-typedef struct KColLocDesc KColLocDesc;
-struct KColLocDesc
-{
-    /* the data fork page id */
-    uint64_t pg;
-
-    union
-    {
-        /* pertains to KColBlobLoc */
-        struct
-        {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-            /* the blob size in bytes */
-            uint32_t size : 31;
-
-            /* used for level-0 journal */
-            uint32_t remove : 1;
-#else
-            uint32_t remove : 1;
-            uint32_t size : 31;
-#endif
-        } blob;
-
-        /* pertains to KColBlockLoc */
-        struct
-        {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-            /* the block size in bytes */
-            uint32_t size : 27;
-
-            /* block type */
-            uint32_t id_type : 2;
-            uint32_t pg_type : 2;
-
-            /* block compression */
-            uint32_t compressed : 1;
-#else
-            uint32_t compressed : 1;
-            uint32_t pg_type : 2;
-            uint32_t id_type : 2;
-            uint32_t size : 27;
-#endif
-        } blk;
-
-        /* the general 32 bits */
-        uint32_t gen;
-
-    } u;
-
-    /* the id range */
-    uint32_t id_range;
-    int64_t start_id;
-};
-
-
-/*--------------------------------------------------------------------------
- * KColBlobLoc
- *  a single blob locator
- *  stored in level-0 index
- *  and in various compressed forms in level-2
- */
-typedef struct KColLocDesc KColBlobLoc;
-
-
-/*--------------------------------------------------------------------------
- * KColBlockLoc
- *  an index block locator
- *  stored in level-1 index
- *
- *  the type ids pertain to group representation of { start_id, id_range }
- *  and { pg, size } from KColBlobLoc. An individual KColBlobLoc has no
- *  context and must represent all data. a KColBlockLoc stores grouped locators
- *  and can economize on representations.
- *
- *  there are 4 types of representations applied to each index and data:
- *   0) fully specified "random" access - having { id, range } or { pg, size }
- *      this type can group together locators with no apparent relationship
- *      whatsoever. they are stored within a b-tree ordered by id.
- *
- *   1) uniformly sized discontiguous sequence - any time the range/size is a
- *      constant, then it needs only to be represented once.
- *
- *   2) predictable sequence - when id/pg [ n + 1 ] == id/pg [ n ] +
- *      range/size [ n ] they need not both be stored since the range/size
- *      is a delta of id/pg. the storage format is by magnitude while
- *      the in-core format is by id, with a 32-bit magnitude of the
- *      final entry in a header.
- *
- *   3) uniformly sized contiguous sequence - when the conditions of type #2 apply
- *      and the range/size is always the same, then all values except for the
- *      count are known and may be eliminated.
- *
- *  the specific interpretation of KColBlockLoc depends upon the combination
- *  of id and pg types:
- *
- *   a) when both are "btypePredictable"
- *      "pos"       => idx2 offset to 12 byte block
- *      "size"      => "count", i.e. number of blobs in block
- *      "start_id"  => first id in block
- *      "id_range"  => span of ids, evenly divided into "count" blob indices
- *      "block::pg" => data offset to first blob in block
- *      "block::sz" => size of each blob in block
- *
- *   b) when id type is "btypePredictable":
- *      "pos"       => idx2 offset to dynamically sized block
- *      "size"      => size of block
- *      "start_id"  => first id in block
- *      "id_range"  => span of ids, evenly divided into "count" blob indices
- *      "count"     => functionally derived from pg type and "size"
- *
- *   c) all other cases:
- *      "pos"       => idx2 offset to dynamically sized block
- *      "size"      => size of block
- *      "start_id"  => first id in block
- *      "id_range"  => span of ids
- *      "count"     => functionally derived from id/pg types and "size"
- */
-enum
-{
-    btypeRandom,       /* { pg/id, span/sz } */
-    btypeUniform,      /* { pg/id }          */
-    btypeMagnitude,    /* { span/sz }        */
-    btypePredictable   /* {}                 */
-};
-
-typedef struct KColLocDesc KColBlockLoc;
-
-
-/* KColumnHdr
- *  stored in either "idx1" ( under v1 )
- *  or in "idx" ( v2+ )
- *
- *  in ALL cases, "idx1" starts with at least
- *  a HDBHdr giving the column's current version.
- *  when this version == 1, then the entire header
- *  is in idx1.
- *
- * - ALL VERSIONS -
- *  "dad" - gives endian and version information
- *
- * - VERSION 1 -
- *  "data_eof" - official eof of last segment of data fork
- *
- *  "idx2_eof" - official eof of idx block fork
- *
- *  "num_blocks" - describes the number of idx blocks
- *  in idx2, as well as the number of block descriptors
- *  ( KColBlockLoc ) in idx1.
- *
- *  "page_size" - number of bytes in data pages.
- *  when 1 ( in practice anything less than some higher
- *  power of 2, 64 minimum, 4K typical, 64K etc. ), the
- *  data fork operates in append mode.
- *
- *  "checksum" - one of the blob-wise checksum modes:
- *  kcsNone, kcsCRC32, kcsMD5, tbd...
- *
- *  "align" - round header size out to multiples of 8 bytes
- *
- * - VERSION 3 -
- *  "idx0_count" - a committed entry count on idx0. in v1, this
- *  was always inferred from the file system. in v2, the code
- *  was never writing this value, so it's garbage.
- *
- * - VERSION 4 -
- *  idx1 needs to be written in straight-shot mode when MD5
- *  is involved. in version 3 it had been written in append mode.
- *
- * - VERSION 5 -
- *  "data_limit" - when not zero, imposes a limit for opening
- *  new blobs in append mode and an absolute file size limit
- *  in paged mode ( requiring limit to be a multiple of page_size ).
- *
- *  "data_total" - total size of all segments of data fork
- *
- *  "data_seg" - zero-based id of last data segment
- */
-#define KCOL_CURRENT_VERSION 3
-#define vCUR v3
-
-typedef struct KColumnHdr KColumnHdr;
-struct KColumnHdr
-{
-    KDBHdr dad;
-
-    union
-    {
-        /* v1 header */
-        struct
-        {
-            uint64_t data_eof;
-            uint64_t idx2_eof;
-            uint32_t num_blocks;
-            uint32_t page_size;
-            uint8_t checksum;
-
-            uint8_t align1 [ 7 ];
-
-        } v1;
-
-        /* v2 header - note one field should be ignored */
-        struct
-        {
-            uint64_t data_eof;
-            uint64_t idx2_eof;
-            uint32_t ignore;
-            uint32_t num_blocks;
-            uint32_t page_size;
-            uint8_t checksum;
-
-            uint8_t align1 [ 3 ];
-
-        } v2;
-
-        /* v3 header - same as v2, except idx2_count is
-           being populated by the implementation */
-
-        /* v4 header - same as v3 in every way
-           except that idx1 is expected to be
-           written without MD5 append-mode information */
-        struct
-        {
-            uint64_t data_eof;
-            uint64_t idx2_eof;
-            uint32_t idx0_count;
-            uint32_t num_blocks;
-            uint32_t page_size;
-            uint8_t checksum;
-
-            uint8_t align1 [ 3 ];
-
-        } v3, v4;
-
-        /* v5 header ( proposed ) - supports multi-file data fork */
-        struct
-        {
-            uint64_t data_limit;
-            uint64_t data_total;
-            uint64_t data_eof;
-            uint64_t idx2_eof;
-            uint32_t idx0_count;
-            uint32_t num_blocks;
-            uint32_t page_size;
-            uint32_t data_seg;
-            uint8_t checksum;
-
-            uint8_t align1 [ 7 ];
-
-        } v5;
-
-    } u;
-};
-
-/* NULL_HDR
- *  substitute for a variable when needed
- */
-#define NULL_HDR \
-    ( * ( const KColumnHdr* ) 0 )
-
-/* KColumnHdrOffset
- *  calculates the idx file offset to beginning of indices
- */
-#define KColumnHdrOffset( hdr, var ) \
-    ( sizeof ( hdr ) - sizeof ( hdr ) . u + sizeof ( hdr ) . u . var )
-
-/* KColumnHdrMinSize
- *  calculates the minimum size of a header
- */
-#define KColumnHdrMinSize( hdr ) \
-    sizeof ( hdr ) . dad
-
-/* KColBlockLocEntryCount - INTERNAL
- *  returns the number of entries within a block
- *  uses the original size of the uncompressed block
- *
- *  "orig" [ IN, OUT ] - taken as the original size of an
- *  uncompressed block, but may be updated in the case of
- *  all predictable types.
- */
-uint32_t KColBlockLocEntryCount ( const KColBlockLoc *self, size_t *orig );
-
-/* KColBlockLocAllocSize - INTERNAL
- *  returns a size for the block
- *  since a type 3 index ( range/size only ) is nice for storage
- *  but needs to be converted to id/pos for in-memory lookup
- */
-size_t KColBlockLocAllocSize ( const KColBlockLoc *self,
-    size_t orig, uint32_t count );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_colfmt_priv_ */
diff --git a/libs/kdb/colidx-priv.h b/libs/kdb/colidx-priv.h
deleted file mode 100644
index 4c68939..0000000
--- a/libs/kdb/colidx-priv.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_colidx_priv_
-#define _h_colidx_priv_
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifndef _h_colfmt_priv_
-#include "colfmt-priv.h"
-#endif
-
-#ifndef _h_colidx0_priv_
-#include "colidx0-priv.h"
-#endif
-
-#ifndef _h_colidx1_priv_
-#include "colidx1-priv.h"
-#endif
-
-#ifndef _h_colidx2_priv_
-#include "colidx2-priv.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx
- *  the index fork
- */
-typedef struct KColumnIdx KColumnIdx;
-struct KColumnIdx
-{
-    /* first active id within db
-       and first id on upper limit
-       i.e. outside of db such that
-       id_upper - id_first == num_ids */
-    int64_t id_first;
-    int64_t id_upper;
-
-    /* level 0 index */
-    KColumnIdx0 idx0;
-
-    /* level 1 index */
-    KColumnIdx1 idx1;
-
-    /* level 2 index */
-    KColumnIdx2 idx2;
-};
-
-/* Open
- */
-rc_t KColumnIdxOpenRead ( KColumnIdx *self, const KDirectory *dir,
-    uint64_t *data_eof, size_t *pgsize, int32_t *checksum );
-
-/* Whack
- */
-rc_t KColumnIdxWhack ( KColumnIdx *self );
-
-/* Version
- */
-rc_t KColumnIdxVersion ( const KColumnIdx *self, uint32_t *version );
-#define KColumnIdxVersion( self, version ) \
-    KColumnIdx1Version ( & ( self ) -> idx1, version )
-
-/* ByteOrder
- */
-rc_t KColumnIdxByteOrder ( const KColumnIdx *self, bool *reversed );
-#define KColumnIdxByteOrder( self, reversed ) \
-    KColumnIdx1ByteOrder ( & ( self ) -> idx1, reversed )
-
-/* IdRange
- *  returns range of ids contained within
- */
-rc_t KColumnIdxIdRange ( const KColumnIdx *self,
-    int64_t *first, int64_t *last );
-
-/* FindFirstRowId
- */
-rc_t KColumnIdxFindFirstRowId ( const KColumnIdx * self,
-    int64_t * found, int64_t start );
-
-/* LocateBlob
- *  locate an existing blob
- */
-rc_t KColumnIdxLocateBlob ( const KColumnIdx *self,
-    KColBlobLoc *loc, int64_t first, int64_t last );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_colidx_priv_ */
diff --git a/libs/kdb/colidx.c b/libs/kdb/colidx.c
deleted file mode 100644
index 7e8a8c0..0000000
--- a/libs/kdb/colidx.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "colidx-priv.h"
-#include "idxblk-priv.h"
-#include <kfs/file.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx
- *  the index fork
- */
-
-
-/* EstablishIdRange
- */
-static
-void KColumnIdxEstablishIdRange ( KColumnIdx *self )
-{
-    int64_t first, upper;
-
-    if ( ! KColumnIdx0IdRange ( & self -> idx0, & self -> id_first, & self -> id_upper ) )
-    {
-        if ( ! KColumnIdx1IdRange ( & self -> idx1, & self -> id_first, & self -> id_upper ) )
-            self -> id_first = self -> id_upper = 1;
-    }
-    else if ( KColumnIdx1IdRange ( & self -> idx1, & first, & upper ) )
-    {
-        if ( self -> id_first > first )
-            self -> id_first = first;
-        if ( self -> id_upper < upper )
-            self -> id_upper = upper;
-    }
-}
-
-/* Open
- */
-rc_t KColumnIdxOpenRead ( KColumnIdx *self, const KDirectory *dir,
-    uint64_t *data_eof, size_t *pgsize, int32_t *checksum )
-{
-    rc_t rc;
-    uint64_t idx2_eof;
-    uint32_t idx0_count;
-
-    assert ( self != NULL );
-
-    rc = KColumnIdx1OpenRead ( & self -> idx1,
-        dir, data_eof, & idx0_count, & idx2_eof, pgsize, checksum );
-    if ( rc == 0 )
-    {
-        rc = ( self -> idx1 . vers < 3 ) ?
-            KColumnIdx0OpenRead_v1 ( & self -> idx0, dir, self -> idx1 . bswap ):
-            KColumnIdx0OpenRead ( & self -> idx0, dir, idx0_count, self -> idx1 . bswap );
-        if ( rc == 0 )
-        {
-            rc = KColumnIdx2OpenRead ( & self -> idx2, dir, idx2_eof );
-            if ( rc == 0 || GetRCState ( rc ) == rcNotFound )
-            {
-                KColumnIdxEstablishIdRange ( self );
-                return 0;
-            }
-
-            KColumnIdx0Whack ( & self -> idx0 );
-        }
-
-        KColumnIdx1Whack ( & self -> idx1 );
-    }
-
-    return 0;
-}
-
-/* Whack
- */
-rc_t KColumnIdxWhack ( KColumnIdx *self )
-{
-    rc_t rc;
-
-    assert ( self != NULL );
-
-    rc = KColumnIdx1Whack ( & self -> idx1 );
-    if ( rc == 0 )
-    {
-        KColumnIdx0Whack ( & self -> idx0 );
-        KColumnIdx2Whack ( & self -> idx2 );
-    }
-
-    return rc;
-}
-
-/* Version
- */
-#ifndef KColumnIdxVersion
-rc_t KColumnIdxVersion ( const KColumnIdx *self, uint32_t *version )
-{
-    return KColumnIdx1Version ( & self -> idx1, version );
-}
-#endif
-
-/* IdRange
- *  returns range of ids contained within
- */
-rc_t KColumnIdxIdRange ( const KColumnIdx *self,
-    int64_t *first, int64_t *last )
-{
-    assert ( self != NULL );
-    assert ( first != NULL );
-    assert ( last != NULL );
-
-    * first = self -> id_first;
-    * last = self -> id_upper - 1;
-
-    if ( self -> id_first == self -> id_upper )
-        return RC ( rcDB, rcColumn, rcAccessing, rcRange, rcInvalid );
-    return 0;
-}
-
-/* FindFirstRowId
- */
-rc_t KColumnIdxFindFirstRowId ( const KColumnIdx * self,
-    int64_t * found, int64_t start )
-{
-    rc_t rc0, rc1;
-    KColBlockLoc bloc;
-    int64_t best0, best1;
-
-    assert ( self != NULL );
-    assert ( found != NULL );
-
-    /* global reject */
-    if ( start < self -> id_first || start >= self -> id_upper )
-        return RC ( rcDB, rcColumn, rcSelecting, rcRow, rcNotFound );
-
-    /* look in idx0 */
-    rc0 = KColumnIdx0FindFirstRowId ( & self -> idx0, found, start );
-    if ( rc0 == 0 )
-    {
-        if ( * found == start )
-            return 0;
-
-        best0 = * found;
-        assert ( best0 > start );
-    }
-
-    /* look in main index */
-    /* KColumnIdx1LocateFirstRowIdBlob returns the blob containing 'start', if such blob exists, otherwise the next blob (or RC if there's no next) */
-    rc1 = KColumnIdx1LocateFirstRowIdBlob ( & self -> idx1, & bloc, start );
-    if ( rc1 != 0 )
-    {
-        return rc0;
-    }
-    if ( start >= bloc . start_id )
-    {   /* found inside a blob */
-        best1 = start;
-    }
-    else
-    {   /* not found; pick the start of the next blob */
-        best1 = bloc . start_id;
-    }
-
-    if ( rc0 != 0 )
-    {
-        * found = best1;
-        return 0;
-    }
-
-    /* found in both - return lesser */
-
-    /* "found" already contains 'best0" */
-    assert ( * found == best0 );
-    if ( best1 < best0 )
-        * found = best1;
-
-    return 0;
-}
-
-/* LocateBlob
- *  locate an existing blob
- */
-rc_t KColumnIdxLocateBlob ( const KColumnIdx *self,
-    KColBlobLoc *loc, int64_t first, int64_t upper )
-{
-    rc_t rc;
-
-    assert ( self != NULL );
-
-    /* convert "last" to "upper" */
-    if ( first >= ++ upper )
-        return RC ( rcDB, rcColumn, rcSelecting, rcRange, rcInvalid );
-
-    /* global reject */
-    if ( first < self -> id_first || upper > self -> id_upper )
-        return RC ( rcDB, rcColumn, rcSelecting, rcBlob, rcNotFound );
-
-    /* look in idx0 */
-    rc = KColumnIdx0LocateBlob ( & self -> idx0, loc, first, upper );
-    if ( GetRCState ( rc ) == rcNotFound )
-    {
-        KColBlockLoc bloc;
-
-        /* find block containing range */
-        rc = KColumnIdx1LocateBlock ( & self -> idx1, & bloc, first, upper );
-        if ( rc == 0 )
-        {
-            /* find location in idx2 */
-            rc = KColumnIdx2LocateBlob ( & self -> idx2,
-                loc, & bloc, first, upper, self -> idx1 . bswap );
-        }
-    }
-
-    return rc;
-}
diff --git a/libs/kdb/colidx0-priv.h b/libs/kdb/colidx0-priv.h
deleted file mode 100644
index 0e29158..0000000
--- a/libs/kdb/colidx0-priv.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_colidx0_priv_
-#define _h_colidx0_priv_
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifndef _h_colfmt_priv_
-#include "colfmt-priv.h"
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx0
- *  level 0 index - event journaling
- */
-typedef struct KColumnIdx0 KColumnIdx0;
-struct KColumnIdx0
-{
-    /* the in-core indices */
-    BSTree bst;
-    size_t count;
-};
-
-
-/* Open
- */
-rc_t KColumnIdx0OpenRead_v1 ( KColumnIdx0 *self,
-    const KDirectory *dir, bool bswap );
-rc_t KColumnIdx0OpenRead ( KColumnIdx0 *self,
-    const KDirectory *dir, uint32_t count, bool bswap );
-
-/* Whack
- */
-void KColumnIdx0Whack ( KColumnIdx0 *self );
-
-/* IdRange
- *  returns range of ids contained within
- */
-bool KColumnIdx0IdRange ( const KColumnIdx0 *self,
-    int64_t *first, int64_t *upper );
-
-/* FindFirstRowId
- */
-rc_t KColumnIdx0FindFirstRowId ( const KColumnIdx0 * self,
-    int64_t * found, int64_t start );
-
-/* LocateBlob
- *  locate an existing blob
- */
-rc_t KColumnIdx0LocateBlob ( const KColumnIdx0 *self,
-    KColBlobLoc *loc, int64_t first, int64_t upper );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_colidx0_priv_ */
diff --git a/libs/kdb/colidx0.c b/libs/kdb/colidx0.c
deleted file mode 100644
index fbdfe10..0000000
--- a/libs/kdb/colidx0.c
+++ /dev/null
@@ -1,433 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "colidx0-priv.h"
-#include <kfs/file.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <byteswap.h>
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx0Node
- *  a b-tree node
- */
-typedef struct KColumnIdx0Node KColumnIdx0Node;
-struct KColumnIdx0Node
-{
-    BSTNode n;
-    KColBlobLoc loc;
-};
-
-/* Find
- */
-static
-int64_t CC KColumnIdx0NodeFind ( const void *item, const BSTNode *n )
-{
-#define a ( * ( const int64_t* ) item )
-#define b ( ( const KColumnIdx0Node* ) n )
-
-    if ( a < b -> loc . start_id )
-        return -1;
-    return a >= ( b -> loc . start_id + b -> loc . id_range );
-
-#undef a
-#undef b
-}
-
-/* Sort
- */
-static
-int64_t CC KColumnIdx0NodeSort ( const BSTNode *item, const BSTNode *n )
-{
-#define a ( ( const KColumnIdx0Node* ) item )
-#define b ( ( const KColumnIdx0Node* ) n )
-
-    if ( ( a -> loc . start_id + a -> loc . id_range ) <= b -> loc . start_id )
-        return -1;
-    return a -> loc . start_id >= ( b -> loc . start_id + b -> loc . id_range );
-
-#undef a
-#undef b
-}
-
-/* Whack
- */
-static
-void CC KColumnIdx0NodeWhack ( BSTNode *n, void *ignore )
-{
-    free ( n );
-}
-
-/* Next
- */
-#define KColumnIdx0NodeNext( node ) \
-    ( const KColumnIdx0Node* ) BSTNodeNext ( & ( node ) -> n )
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx0
- *  level 0 index - event journaling
- */
-
-/* Init
- */
-static
-rc_t KColumnIdx0Inflate ( KColumnIdx0 *self,
-     const KColBlobLoc *buffer, uint32_t count )
-{
-    uint32_t i;
-    KColumnIdx0Node *n;
-
-    for ( n = NULL, i = 0; i < count; ++ i )
-    {
-        KColumnIdx0Node *exist;
-
-        if ( n == NULL )
-        {
-            n = malloc ( sizeof * n );
-            if ( n == NULL )
-                return RC ( rcDB, rcColumn, rcConstructing, rcMemory, rcExhausted );
-        }
-
-        n -> loc = buffer [ i ];
-        if ( BSTreeInsertUnique ( & self -> bst,
-             & n -> n, ( BSTNode** ) & exist, KColumnIdx0NodeSort ) )
-        {
-            assert ( n -> loc . start_id == exist -> loc . start_id );
-            assert ( n -> loc . id_range == exist -> loc . id_range );
-
-            assert ( ! n -> loc . u . blob . remove );
-            exist -> loc . pg = n -> loc . pg;
-            exist -> loc . u . blob . size = n -> loc . u . blob . size;
-        }
-        else
-        {
-            ++ self -> count;
-            n = NULL;
-        }
-    }
-
-    free ( n );
-
-    return 0;
-}
-
-static
-void KColumnIdx0Swap ( KColBlobLoc *buffer, uint32_t count )
-{
-    uint32_t i;
-    for ( i = 0; i < count; ++ i )
-    {
-        buffer [ i ] . pg = bswap_64 ( buffer [ i ] . pg );
-        buffer [ i ] . u . gen = bswap_32 ( buffer [ i ] . u . gen );
-        buffer [ i ] . id_range = bswap_32 ( buffer [ i ] . id_range );
-        buffer [ i ] . start_id = bswap_64 ( buffer [ i ] . start_id );
-    }
-}
-
-static
-rc_t KColumnIdx0Init_v1 ( KColumnIdx0 *self, const KFile *f, bool bswap )
-{
-    rc_t rc;
-    KColBlobLoc *buffer = malloc ( 2048 * sizeof * buffer );
-    if ( buffer == NULL )
-        rc = RC ( rcDB, rcColumn, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        uint64_t pos;
-        size_t num_read;
-
-        for ( pos = 0;; pos += num_read )
-        {
-            uint32_t count;
-
-            rc = KFileReadAll ( f, pos,
-                buffer, 2048 * sizeof * buffer, & num_read );
-            if ( rc != 0 )
-                break;
-            if ( num_read == 0 )
-                break;
-            if ( ( num_read % sizeof * buffer ) != 0 )
-            {
-                rc = RC ( rcDB, rcColumn, rcConstructing, rcIndex, rcCorrupt );
-                break;
-            }
-
-            count = (uint32_t)( num_read / sizeof * buffer );
-
-            if ( bswap )
-                KColumnIdx0Swap ( buffer, count );
-
-            rc = KColumnIdx0Inflate ( self, buffer, count );
-            if ( rc != 0 )
-                break;
-        }
-
-        free ( buffer );
-    }
-    return rc;
-}
-
-static
-rc_t KColumnIdx0Init ( KColumnIdx0 *self, const KFile *f, uint32_t total, bool bswap )
-{
-    rc_t rc;
-    KColBlobLoc *buffer = malloc ( 2048 * sizeof * buffer );
-    if ( buffer == NULL )
-        rc = RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        uint32_t i, count;
-
-        for ( rc = 0, i = 0; i < total; i += count )
-        {
-            size_t num_read;
-
-            count = total - i;
-            if ( count > 2048 )
-                count = 2048;
-
-            rc = KFileReadAll ( f, i * sizeof * buffer,
-                buffer, count * sizeof * buffer, & num_read );
-            if ( rc != 0 )
-                break;
-
-            /* detect EOF */
-            if ( num_read == 0 )
-            {
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcData, rcCorrupt );
-                break;
-            }
-
-            /* detect short read -
-               see comment in idx1. */
-            if ( ( num_read % sizeof * buffer ) != 0 )
-            {
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcTransfer, rcIncomplete );
-                break;
-            }
-
-            count = (uint32_t)( num_read / sizeof * buffer );
-
-            if ( bswap )
-                KColumnIdx0Swap ( buffer, count );
-
-            rc = KColumnIdx0Inflate ( self, buffer, count );
-            if ( rc != 0 )
-                break;
-        }
-
-        free ( buffer );
-    }
-    return rc;
-}
-
-/* Open
- */
-rc_t KColumnIdx0OpenRead_v1 ( KColumnIdx0 *self, const KDirectory *dir, bool bswap )
-{
-    rc_t rc;
-    uint64_t eof;
-
-    BSTreeInit ( & self -> bst );
-    self -> count = 0;
-
-    rc = KDirectoryVFileSize ( dir, & eof, "idx0", NULL );
-    if ( rc == 0 )
-    {
-        if ( eof != 0 )
-        {
-            const KFile *f;
-            rc = KDirectoryVOpenFileRead ( dir, & f, "idx0", NULL );
-            if ( rc == 0 )
-            {
-                rc = KColumnIdx0Init_v1 ( self, f, bswap );
-                KFileRelease ( f );
-            }
-        }
-    }
-    else if ( GetRCState ( rc ) == rcNotFound )
-    {
-        rc = 0;
-    }
-
-    return rc;
-}
-
-rc_t KColumnIdx0OpenRead ( KColumnIdx0 *self, const KDirectory *dir, uint32_t count, bool bswap )
-{
-    BSTreeInit ( & self -> bst );
-    self -> count = 0;
-
-    if ( count != 0 )
-    {
-        const KFile *f;
-        rc_t rc = KDirectoryVOpenFileRead ( dir, & f, "idx0", NULL );
-        if ( rc == 0 )
-        {
-            rc = KColumnIdx0Init ( self, f, count, bswap );
-            KFileRelease ( f );
-        }
-        return rc;
-    }
-
-    return 0;
-}
-
-/* Whack
- */
-void KColumnIdx0Whack ( KColumnIdx0 *self )
-{
-    BSTreeWhack ( & self -> bst, KColumnIdx0NodeWhack, NULL );
-    BSTreeInit ( & self -> bst );
-}
-
-/* IdRange
- *  returns range of ids contained within
- */
-bool KColumnIdx0IdRange ( const KColumnIdx0 *self,
-    int64_t *first, int64_t *upper )
-{
-    const KColumnIdx0Node *a, *z;
-
-    assert ( self != NULL );
-    assert ( first != NULL );
-    assert ( upper != NULL );
-
-    a = ( const KColumnIdx0Node* ) BSTreeFirst ( & self -> bst );
-    if ( a == NULL )
-        return false;
-
-    z = ( const KColumnIdx0Node* ) BSTreeLast ( & self -> bst );
-    assert ( z != NULL );
-
-    * first = a -> loc . start_id;
-    * upper = z -> loc . start_id + z -> loc . id_range;
-    assert ( * first < * upper );
-
-    return true;
-}
-
-
-/* FindFirstRowId
- */
-typedef struct FindFirstRowIdData FindFirstRowIdData;
-struct FindFirstRowIdData
-{
-    int64_t start;
-    const KColumnIdx0Node * next;
-};
-
-static
-int64_t CC KColumnIdx0NodeFindFirstRowId ( const void * item, const BSTNode * n )
-{
-    FindFirstRowIdData * pb = ( FindFirstRowIdData * ) item;
-
-#define a ( pb -> start )
-#define b ( ( const KColumnIdx0Node * ) n )
-
-    if ( a < b -> loc . start_id )
-    {
-        if ( pb -> next == NULL )
-            pb -> next = b;
-        else if ( b -> loc . start_id < pb -> next -> loc . start_id )
-            pb -> next = b;
-        return -1;
-    }
-
-    return a >= ( b -> loc . start_id + b -> loc . id_range );
-
-#undef a
-#undef b
-}
-
-rc_t KColumnIdx0FindFirstRowId ( const KColumnIdx0 * self,
-    int64_t * found, int64_t start )
-{
-    FindFirstRowIdData pb;
-    const KColumnIdx0Node * n;
-
-    assert ( self != NULL );
-    assert ( found != NULL );
-
-    pb . start = start;
-    pb . next = NULL;
-
-    n = ( const KColumnIdx0Node* )
-        BSTreeFind ( & self -> bst, & pb, KColumnIdx0NodeFindFirstRowId );
-
-    if ( n != NULL )
-    {
-        assert ( start >= n -> loc . start_id && start < n -> loc . start_id + n -> loc . id_range );
-        * found = start;
-        return 0;
-    }
-
-    if ( pb . next != 0 )
-    {
-        assert ( pb . next -> loc . start_id > start );
-        * found = pb . next -> loc . start_id;
-        return 0;
-    }
-
-    return SILENT_RC ( rcDB, rcColumn, rcSelecting, rcRow, rcNotFound );
-}
-
-/* LocateBlob
- *  locate an existing blob
- */
-rc_t KColumnIdx0LocateBlob ( const KColumnIdx0 *self,
-    KColBlobLoc *loc, int64_t first, int64_t upper )
-{
-    const KColumnIdx0Node *n;
-
-    assert ( self != NULL );
-    assert ( loc != NULL );
-    assert ( first < upper );
-
-    n = ( const KColumnIdx0Node* )
-        BSTreeFind ( & self -> bst, & first, KColumnIdx0NodeFind );
-
-    if ( n == NULL )
-        return SILENT_RC ( rcDB, rcColumn, rcSelecting, rcBlob, rcNotFound );
-
-    assert ( first >= n -> loc . start_id );
-    assert ( first < ( n -> loc . start_id + n -> loc . id_range ) );
-
-    if ( upper > ( n -> loc . start_id + n -> loc . id_range ) )
-        return RC ( rcDB, rcColumn, rcSelecting, rcRange, rcInvalid );
-
-    * loc = n -> loc;
-    assert ( ! loc -> u . blob . remove );
-    return 0;
-}
diff --git a/libs/kdb/colidx1-priv.h b/libs/kdb/colidx1-priv.h
deleted file mode 100644
index 7844545..0000000
--- a/libs/kdb/colidx1-priv.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_colidx1_priv_
-#define _h_colidx1_priv_
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifndef _h_colfmt_priv_
-#include "colfmt-priv.h"
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#ifndef LAZY_LOAD_COLUMN_IDX1
-#define LAZY_LOAD_COLUMN_IDX1 0
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KColIdxBlock;
-struct KColBlockLocInfo;
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx1
- *  level 1 index
- */
-typedef struct KColumnIdx1 KColumnIdx1;
-struct KColumnIdx1
-{
-#if USE_BSTREE_IN_COLUMN_IDX1
-    /* tree of level-2 block locators */
-    BSTree bst;
-#else
-    /***** binary searched array with state *****/
-    uint64_t last_found;
-    const KColBlockLoc *data;
-#endif
-    struct KFile const *f;
-    struct KFile const *fidx;
-    uint32_t count;
-    uint32_t vers;
-#if LAZY_LOAD_COLUMN_IDX1
-    uint32_t load_off;
-    rc_t load_rc;
-#endif
-    bool bswap;
-    bool loaded;
-    uint8_t align [ sizeof ( size_t ) - 2 ];
-};
-
-/* Open
- */
-rc_t KColumnIdx1OpenRead ( KColumnIdx1 *self, const KDirectory *dir,
-    uint64_t *data_eof, uint32_t *idx0_count, uint64_t *idx2_eof,
-    size_t *pgsize, int32_t *checksum );
-
-/* Whack
- */
-rc_t KColumnIdx1Whack ( KColumnIdx1 *self );
-
-/* Version
- */
-rc_t KColumnIdx1Version ( const KColumnIdx1 *self, uint32_t *version );
-#define KColumnIdx1Version( self, version ) \
-    ( * ( version ) = ( self ) -> vers, 0 )
-
-/* ByteOrder
- */
-rc_t KColumnIdx1ByteOrder ( const KColumnIdx1 *self, bool *reversed );
-#define KColumnIdx1ByteOrder( self, reversed ) \
-    ( * ( reversed ) = ( self ) -> bswap, 0 )
-
-/* IdRange
- *  returns range of ids contained within
- */
-bool KColumnIdx1IdRange ( const KColumnIdx1 *self,
-    int64_t *first, int64_t *upper );
-
-/* LocateFirstRowIdBlob
- */
-rc_t KColumnIdx1LocateFirstRowIdBlob ( const KColumnIdx1 * self,
-    KColBlockLoc * bloc, int64_t start );
-
-/* LocateBlock
- *  locates an idx2 block by range
- */
-rc_t KColumnIdx1LocateBlock ( const KColumnIdx1 *self,
-    KColBlockLoc *bloc, int64_t first, int64_t upper );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_colidx1_priv_ */
diff --git a/libs/kdb/colidx1.c b/libs/kdb/colidx1.c
deleted file mode 100644
index 46f7759..0000000
--- a/libs/kdb/colidx1.c
+++ /dev/null
@@ -1,771 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "colidx1-priv.h"
-#include <kfs/file.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <byteswap.h>
-
-#if USE_BSTREE_IN_COLUMN_IDX1
-
-/*--------------------------------------------------------------------------
- * KColumnIdx1Node
- *  a binary search tree node
- */
-typedef struct KColumnIdx1Node KColumnIdx1Node;
-struct KColumnIdx1Node
-{
-    BSTNode n;
-    KColBlockLoc loc;
-};
-
-/* Find
- */
-static
-int64_t CC KColumnIdx1NodeFind ( const void *item, const BSTNode *n )
-{
-#define a ( * ( const int64_t* ) item )
-#define b ( ( const KColumnIdx1Node* ) n )
-
-    if ( a < b -> loc . start_id )
-        return -1;
-    return a >= ( b -> loc . start_id + b -> loc . id_range );
-
-#undef a
-#undef b
-}
-
-/* Sort
- */
-static
-int64_t CC KColumnIdx1NodeSort ( const BSTNode *item, const BSTNode *n )
-{
-#define a ( ( const KColumnIdx1Node* ) item )
-#define b ( ( const KColumnIdx1Node* ) n )
-
-    if ( ( a -> loc . start_id + a -> loc . id_range ) <= b -> loc . start_id )
-        return -1;
-    return a -> loc . start_id >= ( b -> loc . start_id + b -> loc . id_range );
-
-#undef a
-#undef b
-}
-
-/* Whack
- */
-static
-void CC KColumnIdx1NodeWhack ( BSTNode *n, void *ignore )
-{
-    free ( n );
-}
-
-#endif /* USE_BSTREE_IN_COLUMN_IDX1 */
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx1
- *  level 1 index
- */
-
-/* Init
- */
-#if USE_BSTREE_IN_COLUMN_IDX1
-static
-rc_t KColumnIdx1Inflate ( KColumnIdx1 *self,
-    const KColBlockLoc *buffer, uint32_t count )
-{
-    uint32_t i;
-    for ( i = 0; i < count; ++ i )
-    {
-        KColumnIdx1Node *exist, *n = malloc ( sizeof * n );
-        if ( n == NULL )
-            return RC ( rcDB, rcColumn, rcConstructing, rcMemory, rcExhausted );
-
-        n -> loc = buffer [ i ];
-        if ( BSTreeInsertUnique ( & self -> bst,
-             & n -> n, ( BSTNode** ) & exist, KColumnIdx1NodeSort ) )
-        {
-            free ( n );
-            return RC ( rcDB, rcColumn, rcConstructing, rcIndex, rcCorrupt );
-        }
-
-        ++ self -> count;
-    }
-
-    return 0;
-}
-#endif /* USE_BSTREE_IN_COLUMN_IDX1 */
-
-static
-void KColumnIdx1Swap ( KColBlockLoc *buffer, uint32_t count )
-{
-    uint32_t i;
-    for ( i = 0; i < count; ++ i )
-    {
-        buffer [ i ] . pg = bswap_64 ( buffer [ i ] . pg );
-        buffer [ i ] . u . gen = bswap_32 ( buffer [ i ] . u . gen );
-        buffer [ i ] . id_range = bswap_32 ( buffer [ i ] . id_range );
-        buffer [ i ] . start_id = bswap_64 ( buffer [ i ] . start_id );
-    }
-}
-
-#if ! USE_BSTREE_IN_COLUMN_IDX1
-static
-rc_t KColumnIdx1Init ( KColumnIdx1 *self, uint32_t off, uint32_t count )
-{
-    rc_t rc = 0;
-    KColBlockLoc * data = malloc ( count * sizeof  * data );
-    if ( data == NULL )
-        rc = RC ( rcDB, rcColumn, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        size_t num_read;
-        uint32_t i, cnt;
-        for ( rc = 0, i = 0; i < count; off += ( uint32_t ) num_read, i += cnt )
-        {
-            cnt = count - i;
-            rc = KFileReadAll ( self -> f, off,
-                & data [ i ], cnt * sizeof * data, & num_read );
-            if ( rc != 0 )
-                break;
-            if ( num_read == 0 )
-                break;
-            if ( ( num_read % sizeof * data ) != 0 )
-            {
-                rc = RC ( rcDB, rcColumn, rcConstructing, rcIndex, rcCorrupt );
-                break;
-            }
-            
-            if ( self -> bswap )
-                KColumnIdx1Swap ( & data [ i ], cnt );
-        }
-
-        if ( rc != 0 )
-            free ( data );
-        else
-        {
-            self -> data = data;
-            self -> count = count;
-            self -> loaded = true;
-        }
-    }
-
-    return rc;
-}
-
-#else /* USE_BSTREE_IN_COLUMN_IDX1 */
-static
-rc_t KColumnIdx1Init ( KColumnIdx1 *self, uint32_t off, uint32_t count )
-{
-    rc_t rc;
-    KColBlockLoc *buffer = malloc ( 2048 * sizeof * buffer );
-    if ( buffer == NULL )
-        rc = RC ( rcDB, rcColumn, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        size_t num_read;
-        uint32_t i, cnt;
-        for ( rc = 0, i = 0; i < count; off += ( uint32_t ) num_read, i += cnt )
-        {
-            cnt = count - i;
-            if ( cnt > 2048 )
-                cnt = 2048;
-
-            rc = KFileReadAll ( self -> f, off,
-                buffer, cnt * sizeof * buffer, & num_read );
-            if ( rc != 0 )
-                break;
-            if ( num_read == 0 )
-                break;
-            if ( ( num_read % sizeof * buffer ) != 0 )
-            {
-                rc = RC ( rcDB, rcColumn, rcConstructing, rcIndex, rcCorrupt );
-                break;
-            }
-
-            if ( self -> bswap )
-                KColumnIdx1Swap ( buffer, cnt );
-
-            rc = KColumnIdx1Inflate ( self, buffer, cnt );
-            if ( rc != 0 )
-                break;
-        }
-
-        if ( rc == 0 )
-            self -> loaded = true;
-
-        free ( buffer );
-    }
-    return rc;
-}
-#endif /* USE_BSTREE_IN_COLUMN_IDX1 */
-
-/* Open
- */
-rc_t KColumnIdx1OpenRead ( KColumnIdx1 *self, const KDirectory *dir,
-    uint64_t *data_eof, uint32_t *idx0_count, uint64_t *idx2_eof,
-    size_t *pgsize, int32_t *checksum )
-{
-    rc_t rc;
-#if USE_BSTREE_IN_COLUMN_IDX1
-    BSTreeInit ( & self -> bst );
-#else
-    self -> last_found = 0;
-    self -> data = NULL;
-#endif
-    self -> fidx = NULL;
-    self -> count = 0;
-    self -> vers = 0;
-#if LAZY_LOAD_COLUMN_IDX1
-    self -> load_off = 0;
-    self -> load_rc = 0;
-#endif
-    self -> bswap = false;
-    self -> loaded = false;
-            
-    rc = KDirectoryVOpenFileRead ( dir, & self -> f, "idx1", NULL );
-    if ( rc == 0 )
-    {
-        KColumnHdr hdr;
-        size_t num_bytes;
-        rc = KFileReadAll ( self -> f, 0, & hdr, sizeof hdr, & num_bytes );
-        if ( rc == 0 )
-        {
-            if ( num_bytes == 0 )
-                rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcNotFound );
-            else if ( num_bytes < KColumnHdrMinSize ( hdr ) )
-                rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcCorrupt );
-            else
-            {
-                rc = KDBHdrValidate ( & hdr . dad, num_bytes, 1, KCOL_CURRENT_VERSION );
-                if ( GetRCState ( rc ) == rcIncorrect && GetRCObject ( rc ) == rcByteOrder )
-                {
-                    self -> bswap = true;
-                    hdr . dad . endian = bswap_32 ( hdr . dad . endian );
-                    hdr . dad . version = bswap_32 ( hdr . dad . version );
-                    rc = KDBHdrValidate ( & hdr . dad, num_bytes, 1, KCOL_CURRENT_VERSION );
-                }
-                if ( rc == 0 )
-                {
-                    uint32_t off, count;
-
-                    switch ( hdr . dad . version )
-                    {
-                    case 1:
-                        if ( num_bytes < KColumnHdrOffset ( hdr, v1 ) )
-                            rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcCorrupt );
-                        else
-                        {
-                            if ( self -> bswap )
-                            {
-                                hdr . u . v1 . data_eof = bswap_64 ( hdr . u . v1 . data_eof );
-                                hdr . u . v1 . idx2_eof = bswap_64 ( hdr . u . v1 . idx2_eof );
-                                hdr . u . v1 . num_blocks = bswap_32 ( hdr . u . v1 . num_blocks );
-                                hdr . u . v1 . page_size = bswap_32 ( hdr . u . v1 . page_size );
-                            }
-
-                            * data_eof = hdr . u . v1 . data_eof;
-                            * idx2_eof = hdr . u . v1 . idx2_eof;
-                            * pgsize = hdr . u . v1 . page_size;
-                            * checksum = hdr . u . v1 . checksum;
-                            count = hdr . u . v1 . num_blocks;
-                            off = KColumnHdrOffset ( hdr, v1 );
-
-                            /* not supported in v1 */
-                            * idx0_count = 0;
-                        }
-                        break;
-
-                    default:
-                        rc = KDirectoryVOpenFileRead ( dir, ( const KFile** ) & self -> fidx, "idx", NULL );
-                        if ( rc == 0 )
-                        {
-                            off = sizeof hdr . dad;
-                            rc = KFileReadAll ( self -> fidx, 0, & hdr, sizeof hdr, & num_bytes );
-                            if ( rc == 0 )
-                            {
-                                if ( num_bytes < KColumnHdrOffset ( hdr, v2 ) )
-                                    rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcCorrupt );
-                                else
-                                {
-                                    rc = KDBHdrValidate ( & hdr . dad,
-                                        num_bytes, 2, KCOL_CURRENT_VERSION );
-                                    if ( GetRCState ( rc ) == rcIncorrect && GetRCObject ( rc ) == rcByteOrder )
-                                    {
-                                        if ( ! self->bswap ) /* catch mis-matched endianess */
-                                            rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcCorrupt );
-                                        else
-                                        {
-                                            hdr . dad . endian = bswap_32 ( hdr . dad . endian );
-                                            hdr . dad . version = bswap_32 ( hdr . dad . version );
-                                            rc = KDBHdrValidate ( & hdr . dad, num_bytes, 1, KCOL_CURRENT_VERSION );
-                                        }
-                                    }
-                                    else if ( self -> bswap ) /* catch mis-matched endianess */
-                                        rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcCorrupt );
-
-                                    if ( rc == 0 ) switch ( hdr . dad . version )
-                                    {
-                                    case 2:
-                                        if ( self -> bswap )
-                                        {
-                                            hdr. u . v2 . data_eof = bswap_64 ( hdr. u . v2 . data_eof );
-                                            hdr. u . v2 . idx2_eof = bswap_64 ( hdr. u . v2 . idx2_eof );
-                                            hdr. u . v2 . num_blocks = bswap_32 ( hdr. u . v2 . num_blocks );
-                                            hdr. u . v2 . page_size = bswap_32 ( hdr. u . v2 . page_size );
-                                        }
-
-                                        * data_eof = hdr . u . v2 . data_eof;
-                                        * idx2_eof = hdr . u . v2 . idx2_eof;
-                                        * pgsize = hdr . u . v2 . page_size;
-                                        * checksum = hdr . u . v2 . checksum;
-                                        count = hdr . u . v2 . num_blocks;
-                                        * idx0_count = 0;
-                                        break;
-
-                                    case 3:
-                                        if ( self -> bswap )
-                                        {
-                                            hdr. u . v3 . data_eof = bswap_64 ( hdr. u . v3 . data_eof );
-                                            hdr. u . v3 . idx2_eof = bswap_64 ( hdr. u . v3 . idx2_eof );
-                                            hdr. u . v3 . idx0_count = bswap_32 ( hdr. u . v3 . idx0_count );
-                                            hdr. u . v3 . num_blocks = bswap_32 ( hdr. u . v3 . num_blocks );
-                                            hdr. u . v3 . page_size = bswap_32 ( hdr. u . v3 . page_size );
-                                        }
-
-                                        * data_eof = hdr . u . v3 . data_eof;
-                                        * idx2_eof = hdr . u . v3 . idx2_eof;
-                                        * idx0_count = hdr . u . v3 . idx0_count;
-                                        * pgsize = hdr . u . v3 . page_size;
-                                        * checksum = hdr . u . v3 . checksum;
-                                        count = hdr . u . v3 . num_blocks;
-                                        break;
-
-                                    default:
-                                        rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcBadVersion );
-                                    }
-                                }
-                            }
-                        }
-                    }
-
-                    if ( rc == 0 )
-                    {
-                        self -> vers = hdr . dad . version;
-#if LAZY_LOAD_COLUMN_IDX1
-                        self -> load_off = off;
-                        self -> count = count;
-#else
-                        rc = KColumnIdx1Init ( self, off, count );
-                        if ( rc == 0 )
-#endif
-                            return rc;
-                    }
-
-                    KFileRelease ( self -> fidx );
-                    self -> fidx = NULL;
-                }
-            }
-        }
-
-        KFileRelease ( self -> f );
-        self -> f = NULL;
-    }
-
-    return rc;
-}
-
-#if LAZY_LOAD_COLUMN_IDX1
-static
-rc_t KColumnIdx1LazyLoad ( const KColumnIdx1 * cself )
-{
-    uint32_t off, count;
-    KColumnIdx1 * self = ( KColumnIdx1* ) cself;
-
-    assert ( self != NULL );
-    if ( self -> loaded )
-        return self -> load_rc;
-
-    count = self -> count;
-    off = self -> load_off;
-    self -> count = 0;
-    self -> load_off = 0;
-
-    if ( count == 0 )
-    {
-        self -> loaded = true;
-        return 0;
-    }
-
-    return self -> load_rc = KColumnIdx1Init ( self, off, count );
-}
-#else
-#define KColumnIdx1LazyLoad( self ) 0
-#endif
-
-
-/* Whack
- */
-rc_t KColumnIdx1Whack ( KColumnIdx1 *self )
-{
-    rc_t rc = KFileRelease ( self -> fidx );
-    if ( rc == 0 )
-    {
-        self -> fidx = NULL;
-        rc = KFileRelease ( self -> f );
-        if ( rc == 0 )
-        {
-            self -> f = NULL;
-#if USE_BSTREE_IN_COLUMN_IDX1
-            BSTreeWhack ( & self -> bst, KColumnIdx1NodeWhack, NULL );
-            BSTreeInit ( & self -> bst );
-#else
-            free ( ( void * ) self -> data );
-            self -> data = NULL;
-#endif
-        }
-    }
-    return rc;
-}
-
-/* Version
- */
-#ifndef KColumnIdx1Version
-rc_t KColumnIdx1Version ( const KColumnIdx1 *self, uint32_t *version )
-{
-    * version = ( uint32_t ) self -> vers;
-    return 0;
-}
-#endif
-
-/* IdRange
- *  returns range of ids contained within
- */
-bool KColumnIdx1IdRange ( const KColumnIdx1 *self,
-    int64_t *first, int64_t *upper )
-{
-    rc_t rc = KColumnIdx1LazyLoad ( self );
-    if ( rc != 0 )
-        return false;
-
-    assert ( self != NULL );
-    assert ( first != NULL );
-    assert ( upper != NULL );
-#if USE_BSTREE_IN_COLUMN_IDX1
-    {
-        const KColumnIdx1Node *a, *z;
-        a = ( const KColumnIdx1Node* ) BSTreeFirst ( & self -> bst );
-        z = ( const KColumnIdx1Node* ) BSTreeLast ( & self -> bst );
-
-        if ( a == NULL )
-            return false;
-
-        assert ( z != NULL );
-
-        * first = a -> loc . start_id;
-        * upper = z -> loc . start_id + z -> loc . id_range;
-    }
-#else
-    if ( self -> count == 0 )
-        return false;
-
-    *first = self->data[0].start_id ;
-    *upper = self->data[self->count-1].start_id + self->data[self->count-1].id_range;
-#endif
-    assert ( * first < * upper );
-
-    return true;
-}
-
-/* LocateFirstRowIdBlob
- */
-#if USE_BSTREE_IN_COLUMN_IDX1
-typedef struct FindFirstRowIdData FindFirstRowIdData;
-struct FindFirstRowIdData
-{
-    int64_t start;
-    const KColumnIdx1Node * next;
-};
-
-static
-int64_t CC KColumnIdx1NodeFindFirstRowId ( const void * item, const BSTNode * n )
-{
-    FindFirstRowIdData * pb = ( FindFirstRowIdData * ) item;
-
-#define a ( pb -> start )
-#define b ( ( const KColumnIdx1Node * ) n )
-
-    if ( a < b -> loc . start_id )
-    {
-        if ( pb -> next == NULL )
-            pb -> next = b;
-        else if ( b -> loc . start_id < pb -> next -> loc . start_id )
-            pb -> next = b;
-        return -1;
-    }
-
-    return a >= ( b -> loc . start_id + b -> loc . id_range );
-
-#undef a
-#undef b
-}
-#endif /* USE_BSTREE_IN_COLUMN_IDX1 */
-
-rc_t KColumnIdx1LocateFirstRowIdBlob ( const KColumnIdx1 * self,
-    KColBlockLoc * bloc, int64_t start )
-{
-    rc_t rc = KColumnIdx1LazyLoad ( self );
-    if ( rc != 0 )
-        return rc;
-
-    assert ( self != NULL );
-    assert ( bloc != NULL );
-
-#if USE_BSTREE_IN_COLUMN_IDX1
-    {
-        FindFirstRowIdData pb;
-        const KColumnIdx1Node * n;
-
-        pb . start = start;
-        pb . next = NULL;
-
-        n = ( const KColumnIdx1Node* )
-            BSTreeFind ( & self -> bst, & pb, KColumnIdx1NodeFindFirstRowId );
-
-        if ( n != NULL )
-        {
-            assert ( start >= n -> loc . start_id && start < n -> loc . start_id + n -> loc . id_range );
-            * bloc = n -> loc;
-            return 0;
-        }
-
-        if ( pb . next != NULL )
-        {
-            assert ( start < pb . next -> loc . start_id );
-            * bloc = pb . next -> loc;
-            return 0;
-        }
-        
-    }
-#else /* USE_BSTREE_IN_COLUMN_IDX1 */
-    if ( self -> count != 0 )
-    {
-        const KColBlockLoc * data = self -> data;
-        if ( data [ 0 ] . start_id <= start )
-        {
-            uint64_t high = self -> count - 1;
-            if ( data [ high ] . start_id + data [ high ] . id_range > start )
-            {
-                uint64_t low, last_found = self -> last_found;
-                assert ( last_found <= high );
-                if ( data [ last_found ] . start_id <= start )
-                {
-                    if ( data [ last_found ] . start_id + data [ last_found ] . id_range > start )
-                    {
-                        * bloc = data [ last_found ];
-                        return 0;
-                    }
-
-                    if ( last_found < high && data [ last_found + 1 ] . start_id > start )
-                    {
-                        * bloc = data [ last_found + 1 ];
-                        return 0;
-                    }
-
-                    low = last_found;
-                }
-                else
-                {
-                    low = 0;
-                    high = last_found;
-                }
-
-                while ( low < high )
-                {
-                    last_found = ( low + high ) / 2;
-                    if ( data [ last_found ] . start_id > start )
-                        high = last_found;
-                    else if ( data [ last_found + 1 ] . start_id > start )
-                        break;
-                    else
-                        low = last_found + 1;
-
-                    if ( low == high )
-                    {
-                        last_found = high;
-                        break;
-                    }
-                    else
-                    {
-                        int64_t left_diff = start - data [ low ] . start_id;
-                        int64_t right_diff = data [ high ] . start_id - start;
-
-                        if ( left_diff < 0 || right_diff < 0 )
-                            return SILENT_RC ( rcDB, rcColumn, rcSelecting, rcBlob, rcNotFound );
-
-                        assert ( data [ high ] . start_id - data [ low ] . start_id != 0 );
-                        last_found = ( high * left_diff + low * right_diff )
-                            / ( data [ high ] . start_id - data [ low ] . start_id );
-
-                        assert ( last_found <= high );
-                        assert ( last_found >= low );
-                    }
-                }
-
-                /* check what we have at last_found */
-                if ( start >= data [ last_found ] . start_id )
-                {
-                    if ( start < data [ last_found ] . start_id + data [ last_found ] . id_range )
-                    {
-                        * bloc = data [ last_found ];
-                        return 0;
-                    }
-
-                    assert ( last_found < self -> count );
-                    if ( start < data [ last_found + 1 ] . start_id )
-                    {
-                        * bloc = data [ last_found + 1 ];
-                        return 0;
-                    }
-                }
-            }
-        }
-    }
-#endif /* USE_BSTREE_IN_COLUMN_IDX1 */
-
-    return SILENT_RC ( rcDB, rcColumn, rcSelecting, rcBlob, rcNotFound );
-}
-
-/* LocateBlock
- *  locates an idx2 block by range
- *  return values:
- */
-rc_t KColumnIdx1LocateBlock ( const KColumnIdx1 *self,
-    KColBlockLoc *bloc, int64_t first, int64_t upper )
-{
-    rc_t rc = KColumnIdx1LazyLoad ( self );
-    if ( rc != 0 )
-        return rc;
-
-    assert ( self != NULL );
-    assert ( bloc != NULL );
-    assert ( first < upper );
-
-#if USE_BSTREE_IN_COLUMN_IDX1
-    {
-        const KColumnIdx1Node *n = ( const KColumnIdx1Node* )
-            BSTreeFind ( & self -> bst, & first, KColumnIdx1NodeFind );
-
-        if ( n == NULL )
-            return RC ( rcDB, rcColumn, rcSelecting, rcBlob, rcNotFound );
-
-        assert ( first >= n -> loc . start_id );
-        assert ( first < ( n -> loc . start_id + n -> loc . id_range ) );
-
-        if ( upper > ( n -> loc . start_id + n -> loc . id_range ) )
-            return RC ( rcDB, rcColumn, rcSelecting, rcRange, rcInvalid );
-
-        * bloc = n -> loc;
-    }
-#else /* USE_BSTREE_IN_COLUMN_IDX1 */
-    {
-        const KColBlockLoc * data = self->data;
-        uint64_t last_found = self->last_found;
-        uint64_t low;
-        uint64_t high;
-
-        if(   self -> count == 0 /** empty **/
-              || first < data[0].start_id /** out of range **/
-            ) return RC ( rcDB, rcColumn, rcSelecting, rcBlob, rcNotFound );
-
-        high = self -> count-1;
-        if ( first >= data[high].start_id ) /** treat high bin separately ***/
-        {
-            last_found = low = high;
-        }
-        else
-        {
-            low = 0;
-            if( last_found == high)    /** previous search was in high bin, but this one is not ***/
-                last_found = high/2;   /** set in the middle??? **/
-        }
-        while(low < high)
-        {
-            assert (last_found < self -> count-1 ); /** because of operations preceding this loop **/
-            if(first < data[last_found].start_id){/*search to the left*/
-                high= last_found;
-            } else if(first >= data[last_found+1].start_id){ /* seach to the right */
-                low = last_found+1;
-            } else { /** we have a potential answer **/
-                break;
-            }
-#if 1
-            assert ( high >= low );
-#else
-            if ( high < low ) /*** is it still needed???***/
-                return RC ( rcDB, rcColumn, rcSelecting, rcBlob, rcNotFound );
-#endif
-
-            if(high==low){ /** windows is closed **/
-                last_found = high;
-                break;
-            }else { /*** linear approximation of a pivot point ***/
-                int64_t left_diff = first - data[low].start_id;
-                int64_t right_diff = data[high].start_id - first; /* ?? is this right? */
-
-                if ( left_diff < 0 || right_diff < 0 )
-                    return RC ( rcDB, rcColumn, rcSelecting, rcBlob, rcNotFound );
-
-                assert ( data[high].start_id - data[low].start_id != 0 );
-                last_found = ( high*left_diff + low * right_diff )
-                    / ( data[high].start_id - data[low].start_id );
-
-                assert(last_found <= high);
-                assert(last_found >= low);
-            }
-        }
-
-        /** we have an answer **/
-        if((first < data[last_found].start_id) ||
-            (first >=  data[last_found].start_id+data[last_found].id_range))
-            return RC ( rcDB, rcColumn, rcSelecting, rcBlob, rcNotFound );
-
-        if(upper > data[last_found].start_id+data[last_found].id_range)
-            return RC ( rcDB, rcColumn, rcSelecting, rcRange, rcInvalid );
-
-        * bloc = data[last_found];
-        ((KColumnIdx1*)self)->last_found = last_found;
-    }
-#endif /* USE_BSTREE_IN_COLUMN_IDX1 */
-    return 0;
-}
diff --git a/libs/kdb/colidx2-priv.h b/libs/kdb/colidx2-priv.h
deleted file mode 100644
index 2e28a65..0000000
--- a/libs/kdb/colidx2-priv.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_colidx2_priv_
-#define _h_colidx2_priv_
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifndef _h_colfmt_priv_
-#include "colfmt-priv.h"
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#include <klib/data-buffer.h>
-#include "idxblk-priv.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx2
- *  level 2 index
- */
-
-typedef struct KColumnIdx2BlockCache
-{
-    /* single page cache */
-    void *block;
-    int64_t start_id;
-    size_t count;
-    KColIdxBlock iblk;
-} KColumnIdx2BlockCache;
-
-typedef struct KColumnIdx2 KColumnIdx2;
-struct KColumnIdx2
-{
-    /* for adding new blocks */
-    uint64_t eof;
-
-    /* idx2 itself */
-    struct KFile const *f;
-
-    /* full caching mechanism */
-    KDataBuffer cstorage;
-    uint32_t	last;
-};
-
-/* Open
- */
-rc_t KColumnIdx2OpenRead ( KColumnIdx2 *self,
-    const KDirectory *dir, uint64_t eof );
-
-/* Whack
- */
-rc_t KColumnIdx2Whack ( KColumnIdx2 *self );
-
-/* LocateBlob
- *  locate an existing blob
- */
-rc_t KColumnIdx2LocateBlob ( const KColumnIdx2 *self,
-    KColBlobLoc *loc, const KColBlockLoc *bloc,
-    int64_t first, int64_t upper, bool bswap );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_colidx2_priv_ */
diff --git a/libs/kdb/colidx2.c b/libs/kdb/colidx2.c
deleted file mode 100644
index 61b49c4..0000000
--- a/libs/kdb/colidx2.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "colidx2-priv.h"
-#include "idxblk-priv.h"
-#include <kfs/file.h>
-#include <kfs/buffile.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <byteswap.h>
-
-
-#define IDX2_READ_FILE_BUFFER 64 * 1024
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx2
- *  level 2 index
- */
-
-/* Init
- */
-static
-rc_t KColumnIdx2Init ( KColumnIdx2 *self, uint64_t idx2_eof )
-{
-    rc_t rc;
-
-#if 0
-    memset(&self->cstorage,0,sizeof(self->cstorage));
-    self->cstorage.elem_bits = sizeof(KColumnIdx2BlockCache)*8;
-    self->last = 0;
-#endif
-    rc = KFileSize ( self -> f, & self -> eof );
-    if ( rc == 0 )
-    {
-        if ( self -> eof < idx2_eof )
-            rc = RC ( rcDB, rcColumn, rcConstructing, rcIndex, rcCorrupt );
-        else
-        {
-            self -> eof = idx2_eof;
-            return 0;
-        }
-    }
-    
-    KFileRelease ( self -> f );
-
-    self -> f = NULL;
-    return rc;
-}
-
-/* Open
- */
-rc_t KColumnIdx2OpenRead ( KColumnIdx2 *self,
-    const KDirectory *dir, uint64_t eof )
-{
-    rc_t rc;
-
-    rc = KDataBufferMake ( & self -> cstorage, sizeof ( KColumnIdx2BlockCache ) * 8, 0 );
-    if ( rc != 0 )
-    {
-        memset ( self, 0, sizeof * self );
-        return rc;
-    }
-
-    self -> last = 0;
-
-    if ( eof == 0 )
-    {
-#if 0
-        KDataBufferResize(&self->cstorage,0);
-        self -> last = 0;
-#endif
-        self -> eof = 0;
-        self -> f = NULL;
-        return 0;
-    }
-
-    rc = KDirectoryOpenFileRead ( dir,
-                                  & self -> f, "idx2" );
-#if IDX2_READ_FILE_BUFFER
-    if ( rc == 0 )
-    {
-        const KFile * orig = self -> f;
-
-        rc = KBufFileMakeRead ( & self -> f, self -> f, eof+1);
-	if ( rc == 0 )
-        {
-            KFileRelease ( orig );
-        }
-        else
-        {
-            self -> f = orig;
-            rc = 0;
-        }
-    }
-#endif
-    if ( rc == 0 )
-        rc = KColumnIdx2Init ( self, eof );
-    return rc;
-}
-
-/* Whack
- */
-rc_t KColumnIdx2Whack ( KColumnIdx2 *self )
-{
-    rc_t rc = KFileRelease ( self -> f );
-    if ( rc == 0 )
-    {
-        int i;
-        KColumnIdx2BlockCache * cache=(KColumnIdx2BlockCache *)self -> cstorage.base;
-        self -> f = NULL;
-        for(i=0;i<self->cstorage.elem_count;i++){
-            free(cache[i].block);
-        }
-        KDataBufferWhack(&self->cstorage);
-    }
-    return rc;
-}
-
-/* LocateBlob
- *  locate an existing blob
- */
-rc_t KColumnIdx2LocateBlob ( const KColumnIdx2 *self,
-    KColBlobLoc *loc, const KColBlockLoc *bloc,
-    int64_t first, int64_t upper, bool bswap )
-{
-    rc_t rc;
-
-    /* compression not supported */
-    if ( bloc -> u . blk . compressed )
-        rc = RC ( rcDB, rcIndex, rcSelecting, rcNoObj, rcUnsupported );
-    else
-    {
-        uint64_t buffer [ 1024 / 8 ]; /* make sure is uint64_t aligned */
-        void *block = buffer;
-
-        /* determine the number of entries in block */
-        size_t orig = bloc -> u . blk . size;
-        uint32_t count = KColBlockLocEntryCount ( bloc, & orig );
-
-        /* determine the size to allocate */
-        size_t block_size = KColBlockLocAllocSize ( bloc, orig, count );
-
-        /* allocate a block */
-        if ( block_size > sizeof buffer )
-            block = malloc ( block_size );
-        if ( block == NULL )
-            rc = RC ( rcDB, rcIndex, rcSelecting, rcMemory, rcExhausted );
-        else
-        {
-            size_t num_read;
-            rc = KFileReadAll ( self -> f, bloc -> pg, block, orig, & num_read );
-            if ( rc == 0 )
-            {
-                if ( num_read != orig )
-                    rc = RC ( rcDB, rcIndex, rcSelecting, rcTransfer, rcIncomplete );
-                else
-                {
-                    KColIdxBlock iblk;
-                    rc = KColIdxBlockInit ( & iblk, bloc, orig, block, block_size, bswap );
-                    if ( rc == 0 )
-                    {
-                        uint32_t span;
-                        int64_t start_id;
-                        int slot = KColIdxBlockFind ( & iblk,
-                            bloc, count, first, & start_id, & span );
-                        if ( slot < 0 )
-                            rc = RC ( rcDB, rcIndex, rcSelecting, rcRange, rcNotFound );
-                        else if ( upper > ( start_id + span ) )
-                            rc = RC ( rcDB, rcIndex, rcSelecting, rcRange, rcInvalid );
-                        else
-                        {
-                            loc -> start_id = start_id;
-                            loc -> id_range = span;
-
-                            KColIdxBlockGet ( & iblk,
-                                bloc, count, slot, & loc -> pg, & span );
-                            loc -> u . blob . size = span;
-                        }
-                    }
-                }
-            }
-
-            if ( block != buffer )
-                free ( block );
-        }
-    }
-
-    return rc;
-}
diff --git a/libs/kdb/column-cc.c b/libs/kdb/column-cc.c
deleted file mode 100644
index ef86f0f..0000000
--- a/libs/kdb/column-cc.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- *============================================================================
- *
- */
-
-#include <kdb/extern.h>
-
-#define KONST const
-#include "column-priv.h"
-#undef KONST
-
-#include "cc-priv.h"
-
-#include <klib/rc.h>
-
-#include <string.h>
-
-struct col_check_ctx {
-    CCReportFunc report;
-    void *ctx;
-    int found;
-    rc_t rc;
-    bool failed;
-};
-
-static
-rc_t CC col_check_report(const CCReportInfoBlock *nfo, void *Ctx)
-{
-    struct col_check_ctx *ctx = Ctx;
-    
-    if (nfo->type == ccrpt_MD5) {
-        const char *fname = nfo->info.MD5.file;
-        
-        if (strcmp(fname, "data") == 0)
-            ctx->found |= 1;
-        else if (strcmp(fname, "idx0") == 0)
-            ctx->found |= 2;
-        else if (strcmp(fname, "idx1") == 0)
-            ctx->found |= 4;
-        else if (strcmp(fname, "idx2") == 0)
-            ctx->found |= 8;
-        
-        if (nfo->info.MD5.rc != 0 && !ctx->failed) {
-            ctx->failed = true;
-            ctx->rc = nfo->info.MD5.rc;
-        }
-    }
-    else if (nfo->type == ccrpt_Done && nfo->info.done.rc != 0 && !ctx->failed) {
-        ctx->failed = true;
-        ctx->rc = nfo->info.done.rc;
-    }
-
-    return 0;
-}
-
-static
-rc_t CC CheckExists(const KDirectory *dir, uint32_t type, const char *name, void *Ctx)
-{
-    struct col_check_ctx *ctx = Ctx;
-    
-    if ((type & ~kptAlias) == kptFile) {
-        if (strcmp(name, "data") == 0)
-            ctx->found |= 1;
-        else if (strcmp(name, "idx0") == 0)
-            ctx->found |= 2;
-        else if (strcmp(name, "idx1") == 0)
-            ctx->found |= 4;
-        else if (strcmp(name, "idx2") == 0)
-            ctx->found |= 8;
-    }
-    return 0;
-}
-
-static
-rc_t KColumnCheckMD5(const KColumn *self,
-                     CCReportInfoBlock *nfo,
-                     CCReportFunc report, void *ctx)
-{
-    struct col_check_ctx local_ctx;
-    rc_t rc;
-    
-    local_ctx.report = report;
-    local_ctx.ctx = ctx;
-    local_ctx.found = 0;
-    local_ctx.failed = false;
-    local_ctx.rc = 0;
-    
-    rc = DirectoryCheckMD5(self->dir, "md5", nfo, col_check_report, &local_ctx);
-    if (rc == 0 && !local_ctx.failed && local_ctx.found != 0x0F) {
-        local_ctx.found = 0;
-        KDirectoryVisit(self->dir, false, CheckExists, &local_ctx, NULL);
-        nfo->type = ccrpt_Done;
-        if (local_ctx.found == 0x0F) {
-            nfo->info.done.rc = RC(rcDB, rcColumn, rcValidating, rcChecksum, rcNotFound);
-            nfo->info.done.mesg = "Some files are missing checksums";
-        }
-        else {
-            nfo->info.done.rc = RC(rcDB, rcColumn, rcValidating, rcFile, rcNotFound);
-            nfo->info.done.mesg = "Some files are missing";
-        }
-        rc = report(nfo, ctx);
-    }
-    else if (rc == 0) {
-        nfo->type = ccrpt_Done;
-        nfo->info.done.rc = 0;
-        nfo->info.done.mesg = "md5 ok";
-        rc = report(nfo, ctx);
-    }
-    else {
-        nfo->type = ccrpt_Done;
-        rc = report(nfo, ctx);
-    }
-
-    return rc;
-}
-
-static
-rc_t KColumnCheckBlobs(const KColumn *self,
-                       CCReportInfoBlock *nfo,
-                       CCReportFunc report, void *ctx)
-{
-    int64_t start;
-    uint64_t row;
-    uint64_t rows;
-    rc_t rc;
-    
-    rc = KColumnIdRange(self, &start, &rows);
-    if (rc) {
-        nfo->info.done.rc = rc;
-        nfo->info.done.mesg = "could not be read";
-        nfo->type = ccrpt_Done;
-        return report(nfo, ctx);
-    }
-    for (row = 0; row < rows && rc == 0; ) {
-        const KColumnBlob *blob;
-        int64_t first;
-        uint32_t count;
-        
-        rc = KColumnOpenBlobRead(self, &blob, row + start);
-        if (rc) {
-            if (GetRCObject(rc) == rcBlob && GetRCState(rc) == rcNotFound) {
-                rc = 0;
-                ++row; /* try with the next row; linear scan seems wrong */
-                continue;
-            }
-            nfo->info.done.rc = rc;
-            nfo->info.done.mesg = "could not be read";
-            nfo->type = ccrpt_Done;
-            return report(nfo, ctx);
-        }
-        rc = KColumnBlobIdRange(blob, &first, &count);
-        if (rc) {
-            KColumnBlobRelease(blob);
-            nfo->info.done.rc = rc;
-            nfo->info.done.mesg = "could not be read";
-            nfo->type = ccrpt_Done;
-            return report(nfo, ctx);
-        }
-        rc = KColumnBlobValidate(blob);
-        KColumnBlobRelease(blob);
-        if (rc) {
-            nfo->info.done.rc = rc;
-            nfo->info.done.mesg = "contains bad data";
-            nfo->type = ccrpt_Done;
-            return report(nfo, ctx);
-        }
-        nfo->type = ccrpt_Blob;
-        nfo->info.blob.start = first;
-        nfo->info.blob.count = count;
-        rc = report(nfo, ctx);
-
-        row += count;
-    }
-    nfo->info.done.rc = 0;
-    nfo->info.done.mesg = "checksums ok";
-    nfo->type = ccrpt_Done;
-    rc = report(nfo, ctx);
-    return rc;
-}
-
-LIB_EXPORT
-rc_t CC KColumnConsistencyCheck(const KColumn *self,
-    uint32_t level, CCReportInfoBlock *nfo, CCReportFunc report, void *ctx )
-{
-    rc_t rc = 0;
-
-    bool indexOnly = level & CC_INDEX_ONLY;
-    if (indexOnly) {
-        level &= ~CC_INDEX_ONLY;
-    }
-
-    if (KDirectoryPathType(self->dir, "md5") != kptNotFound)
-        rc = level == 0 ? KColumnCheckMD5(self, nfo, report, ctx) : 0;
-    else {
-        nfo->type = ccrpt_Done;
-        nfo->info.done.mesg = "missing md5 file";
-        nfo->info.done.rc = 0; /* RC(rcDB, rcColumn, rcValidating, rcFile, rcNotFound); */
-        
-        rc = report(nfo, ctx);
-        
-        if (level == 0)
-            level = 1;
-    }
-    
-    if (rc == 0 && level > 0)
-        rc = KColumnCheckBlobs(self, nfo, report, ctx);
-    return rc;
-}
diff --git a/libs/kdb/column-priv.h b/libs/kdb/column-priv.h
deleted file mode 100644
index dc9a84f..0000000
--- a/libs/kdb/column-priv.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_column_priv_
-#define _h_column_priv_
-
-#ifndef _h_kdb_column_
-#include <kdb/column.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifndef _h_coldata_priv_
-#include "coldata-priv.h"
-#endif
-
-#ifndef _h_colidx_priv_
-#include "colidx-priv.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KTable;
-struct KDBManager;
-struct KDirectory;
-
-
-/*--------------------------------------------------------------------------
- * KColumn
- */
-struct KColumn
-{
-    struct KTable const *tbl;
-    struct KDBManager const *mgr;
-    struct KDirectory const *dir;
-
-    KColumnIdx idx;
-    KColumnData df;
-
-    KRefcount refcount;
-    uint32_t csbytes;
-    int32_t checksum;
-    char path [ 1 ];
-};
-
-/* Attach
- * Sever
- *  like Release, except called internally
- *  indicates that a child object is letting go...
- */
-KColumn *KColumnAttach ( const KColumn *self );
-rc_t KColumnSever ( const KColumn *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_column_priv_ */
diff --git a/libs/kdb/column.c b/libs/kdb/column.c
deleted file mode 100644
index 11ce321..0000000
--- a/libs/kdb/column.c
+++ /dev/null
@@ -1,1132 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define KONST const
-#include <kdb/extern.h>
-#include "column-priv.h"
-#include "dbmgr-priv.h"
-#include "table-priv.h"
-#include "kdb-priv.h"
-#include <kdb/kdb-priv.h>
-#include <klib/checksum.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <klib/printf.h>
-#include <klib/debug.h>
-#include <atomic32.h>
-#include <sysalloc.h>
-#undef KONST
-
-#include <limits.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-#include <byteswap.h>
-
-
-#ifdef _DEBUGGING
-#define POS_DEBUG(msg) DBGMSG(DBG_KDB,DBG_FLAG(DBG_KDB_POS),msg)
-#else
-#define POS_DEBUG(msg)
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KColumn
- *  a collection of blobs indexed by oid
- */
-
-
-/* Whack
- */
-static
-rc_t KColumnWhack ( KColumn *self )
-{
-    rc_t rc;
-
-    KRefcountWhack ( & self -> refcount, "KColumn" );
-
-    /* shut down index */
-    rc = KColumnIdxWhack ( & self -> idx );
-    if ( rc == 0 )
-    {
-        /* shut down data fork */
-        KColumnDataWhack ( & self -> df );
-
-        /* release owning table
-           should never fail, and our recovery is flawed */
-        if ( self -> tbl != NULL )
-        {
-            rc = KTableSever ( self -> tbl );
-            if ( rc == 0 )
-                self -> tbl = NULL;
-        }
-
-        /* release manager
-           should never fail */
-        if ( rc == 0 )
-            rc = KDBManagerSever ( self -> mgr );
-
-        if ( rc == 0 )
-        {
-            KDirectoryRelease ( self -> dir );
-            free ( self );
-            return 0;
-        }
-    }
-
-    KRefcountInit ( & self -> refcount, 1, "KColumn", "whack", "kcol" );
-    return rc;
-}
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KColumnAddRef ( const KColumn *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KColumn" ) )
-        {
-        case krefLimit:
-            return RC ( rcDB, rcColumn, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KColumnRelease ( const KColumn *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KColumn" ) )
-        {
-        case krefWhack:
-            return KColumnWhack ( ( KColumn* ) self );
-        case krefNegative:
-            return RC ( rcDB, rcColumn, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Attach
- * Sever
- */
-KColumn *KColumnAttach ( const KColumn *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "KColumn" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( KColumn* ) self;
-}
-
-rc_t KColumnSever ( const KColumn *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "KColumn" ) )
-        {
-        case krefWhack:
-            return KColumnWhack ( ( KColumn* ) self );
-        case krefNegative:
-            return RC ( rcDB, rcColumn, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Make
- */
-static
-rc_t KColumnMake ( KColumn **colp, const KDirectory *dir, const char *path )
-{
-    KColumn *col = malloc ( sizeof * col + strlen ( path ) );
-    if ( col == NULL )
-        return RC ( rcDB, rcColumn, rcConstructing, rcMemory, rcExhausted );
-
-    memset ( col, 0, sizeof * col );
-    col -> dir = dir;
-    KRefcountInit ( & col -> refcount, 1, "KColumn", "make", path );
-    strcpy ( col -> path, path );
-
-    * colp = col;
-    return 0;
-}
-
-static
-rc_t KColumnMakeRead ( KColumn **colp, const KDirectory *dir, const char *path )
-{
-    rc_t rc = KColumnMake ( colp, dir, path );
-    if ( rc == 0 )
-    {
-        size_t pgsize;
-        uint64_t data_eof;
-        KColumn *self = * colp;
-
-        rc = KColumnIdxOpenRead ( & self -> idx,
-            dir, & data_eof, & pgsize, & self -> checksum );
-        if ( rc == 0 )
-        {
-            rc = KColumnDataOpenRead ( & self -> df,
-                dir, data_eof, pgsize );
-            if ( rc == 0 )
-            {
-                switch ( self -> checksum )
-                {
-                case kcsNone:
-                    break;
-                case kcsCRC32:
-                    self -> csbytes = 4;
-                    break;
-                case kcsMD5:
-                    self -> csbytes = 16;
-                    break;
-                }
-
-                return 0;
-            }
-
-            KColumnIdxWhack ( & self -> idx );
-        }
-
-        free ( self );
-    }
-
-    * colp = NULL;
-    return rc;
-}
-
-
-/* OpenColumnRead
- * VOpenColumnRead
- *  open a column for read
- *
- *  "col" [ OUT ] - return parameter for newly opened column
- *
- *  "path" [ IN ] - NUL terminated string in UTF-8 giving path to col
- *  where "." acts as a structure name separator, i.e. struct.member
- */
-static
-rc_t KDBManagerVOpenColumnReadInt ( const KDBManager *self,
-    const KColumn **colp, const KDirectory *wd, bool try_srapath,
-    const char *path, va_list args )
-{
-    char colpath [ 4096 ];
-    rc_t rc;
-    size_t z;
-
-/*    rc = KDirectoryVResolvePath ( wd, 1,
-        colpath, sizeof colpath, path, args ); */
-    rc = string_vprintf( colpath, sizeof colpath, &z, path, args );
-    if ( rc == 0 )
-    {
-        KColumn *col;
-        const KDirectory *dir;
-
-        /* open table directory */
-        rc = KDBOpenPathTypeRead ( self, wd, colpath, &dir, kptColumn, NULL, try_srapath );
-        if ( rc == 0 )
-        {
-            rc = KColumnMakeRead ( & col, dir, colpath );
-            if ( rc == 0 )
-            {
-                col -> mgr = KDBManagerAttach ( self );
-                * colp = col;
-                return 0;
-            }
-
-            KDirectoryRelease ( dir );
-        }
-    }
-    
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDBManagerOpenColumnRead ( const KDBManager *self,
-    const KColumn **col, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDBManagerVOpenColumnRead ( self, col, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDBManagerVOpenColumnRead ( const KDBManager *self,
-    const KColumn **col, const char *path, va_list args )
-{
-    if ( col == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcParam, rcNull );
-
-    * col = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcSelf, rcNull );
-
-    return KDBManagerVOpenColumnReadInt
-        ( self, col, self -> wd, true, path, args );
-}
-
-
-LIB_EXPORT rc_t CC KTableOpenColumnRead ( const KTable *self,
-    const KColumn **col, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KTableVOpenColumnRead ( self, col, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableVOpenColumnRead ( const KTable *self,
-    const KColumn **colp, const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    if ( colp == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcParam, rcNull );
-
-    * colp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcSelf, rcNull );
-
-    rc = KDBVMakeSubPath ( self -> dir,
-        path, sizeof path, "col", 3, name, args );
-    if ( rc == 0 )
-    {
-        rc = KDBManagerVOpenColumnReadInt ( self -> mgr,
-                                           colp, self -> dir, false, path, NULL );
-        if ( rc == 0 )
-        {
-            KColumn *col = ( KColumn* ) * colp;
-            col -> tbl = KTableAttach ( self );
-        }
-    }
-    return rc;
-}
-
-
-/* Locked
- *  returns non-zero if locked
- */
-LIB_EXPORT bool CC KColumnLocked ( const KColumn *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return false;
-
-    rc = KDBWritable ( self -> dir, "" );
-    return GetRCState ( rc ) == rcLocked;
-}
-
-/* Version
- *  returns the column format version
- */
-LIB_EXPORT rc_t CC KColumnVersion ( const KColumn *self, uint32_t *version )
-{
-    if ( version == NULL )
-        return RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-
-    if ( self == NULL )
-    {
-        * version = 0;
-        return RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-    }
-     
-    return KColumnIdxVersion ( & self -> idx, version );
-}
-
-/* ByteOrder
- *  indicates whether original byte order is reversed
- *  under current architecture.
- *
- *  the byte order of the column is established by
- *  the host architecture when created.
- *
- *  "reversed" [ OUT ] - if true, the original byte
- *  order is reversed with regard to host native byte order.
- */
-LIB_EXPORT rc_t CC KColumnByteOrder ( const KColumn *self, bool *reversed )
-{
-    if ( reversed == NULL )
-        return RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-
-    if ( self == NULL )
-    {
-        * reversed = false;
-        return RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-    }
-     
-    return KColumnIdxByteOrder ( & self -> idx, reversed );
-}
-
-/* IdRange
- *  returns id range for column
- */
-LIB_EXPORT rc_t CC KColumnIdRange ( const KColumn *self, int64_t *first, uint64_t *count )
-{
-    rc_t rc;
-    int64_t dummy, last;
-
-    if ( first == NULL && count == NULL )
-        return RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-
-    if ( first == NULL )
-        first = & dummy;
-    else if ( count == NULL )
-        count = ( uint64_t * ) & dummy;
-
-    if ( self == NULL )
-    {
-        * first = 0;
-        * count = 0;
-        return RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-    }
-
-    rc = KColumnIdxIdRange ( & self -> idx, first, & last );
-    if ( rc != 0 )
-        * count = 0;
-    else
-        * count = last - * first + 1;
-
-    return rc;
-}
-
-
-/* FindFirstRowId
- *  locates the first valid row-id starting from a given id.
- *  this will be either the start id provided, or
- *  the first row from the next blob, if available.
- *
- *  "found" [ OUT ] - will contain the value of "start" if this is contained within a blob,
- *  or the first row-id of the next blob after "start", if any.
- *
- *  "start" [ IN ] - starting row-id in search, inclusive. if this id is valid,
- *  it will be returned in "found"
- *
- *  returns 0 if id is found, rcNotFound if no more data were available.
- *  may return other codes upon error.
- */
-LIB_EXPORT rc_t CC KColumnFindFirstRowId ( const KColumn * self, int64_t * found, int64_t start )
-{
-    rc_t rc;
-
-    if ( found == NULL )
-        rc = RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KColumnIdxFindFirstRowId ( & self -> idx, found, start );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        * found = 0;
-    }
-
-    return rc;
-}
-
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC KColumnOpenManagerRead ( const KColumn *self, const KDBManager **mgr )
-{
-    rc_t rc;
-
-    if ( mgr == NULL )
-        rc = RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDBManagerAddRef ( self -> mgr );
-            if ( rc == 0 )
-            {
-                * mgr = self -> mgr;
-                return 0;
-            }
-        }
-
-        * mgr = NULL;
-    }
-
-    return rc;
-}
-
-
-
-/* OpenParent
- *  duplicate reference to parent table
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC KColumnOpenParentRead ( const KColumn *self, const KTable **tbl )
-{
-    rc_t rc;
-
-    if ( tbl == NULL )
-        rc = RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KTableAddRef ( self -> tbl );
-            if ( rc == 0 )
-            {
-                * tbl = self -> tbl;
-                return 0;
-            }
-        }
-
-        * tbl = NULL;
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KColumnBlob
- *  one or more rows of column data
- */
-struct KColumnBlob
-{
-    /* holds existing blob loc */
-    KColBlobLoc loc;
-    KColumnPageMap pmorig;
-
-    /* owning column */
-    const KColumn *col;
-
-    /* refcount */
-    atomic32_t refcount;
-
-    /* captured from idx1 for CRC32 validation */
-    bool bswap;
-};
-
-
-/* Whack
- */
-static
-rc_t KColumnBlobWhack ( KColumnBlob *self )
-{
-    const KColumn *col = self -> col;
-    assert ( col != NULL );
-
-    KColumnPageMapWhack ( & self -> pmorig, & col -> df );
-
-    /* cannot recover from errors here,
-       since the page maps needed whacking first,
-       and the column is needed for that. */
-    KColumnSever ( col );
-
-    free ( self );
-    return 0;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KColumnBlobAddRef ( const KColumnBlob *cself )
-{
-    if ( cself != NULL )
-    {
-        atomic32_inc ( & ( ( KColumnBlob* ) cself ) -> refcount );
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KColumnBlobRelease ( const KColumnBlob *cself )
-{
-    KColumnBlob *self = ( KColumnBlob* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-            return KColumnBlobWhack ( self );
-    }
-    return 0;
-}
-
-/* OpenRead
- * OpenUpdate
- */
-static
-rc_t KColumnBlobOpenRead ( KColumnBlob *self, const KColumn *col, int64_t id )
-{
-    /* locate blob */
-    rc_t rc = KColumnIdxLocateBlob ( & col -> idx, & self -> loc, id, id );
-    if ( rc == 0 )
-    {
-        /* open page map to blob */
-        rc = KColumnPageMapOpen ( & self -> pmorig,
-            ( KColumnData* ) & col -> df, self -> loc . pg, self -> loc . u . blob . size );
-        if ( rc == 0 )
-        {
-            /* existing blob must have proper checksum bytes */
-            if ( self -> loc . u . blob .  size >= col -> csbytes )
-            {
-                /* remove them from apparent blob size */
-                self -> loc . u . blob . size -= col -> csbytes;
-                return 0;
-            }
-
-            /* the blob is corrupt */
-            KColumnPageMapWhack ( & self -> pmorig, & col -> df );
-            rc = RC ( rcDB, rcColumn, rcOpening, rcBlob, rcCorrupt );
-        }
-    }
-
-    return rc;
-}
-
-/* Make
- */
-static
-rc_t KColumnBlobMake ( KColumnBlob **blobp, bool bswap )
-{
-    KColumnBlob *blob = malloc ( sizeof * blob );
-    if ( blob == NULL )
-        return RC ( rcDB, rcBlob, rcConstructing, rcMemory, rcExhausted );
-
-    memset ( blob, 0, sizeof * blob );
-    atomic32_set ( & blob -> refcount, 1 );
-    blob -> bswap = bswap;
-
-    * blobp = blob;
-    return 0;
-}
-
-/* OpenBlobRead
- *  opens an existing blob containing row data for id
- */
-LIB_EXPORT rc_t CC KColumnOpenBlobRead ( const KColumn *self, const KColumnBlob **blobp, int64_t id )
-{
-    rc_t rc;
-    KColumnBlob *blob;
-
-    if ( blobp == NULL )
-        return RC ( rcDB, rcColumn, rcOpening, rcParam, rcNull );
-
-    * blobp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcColumn, rcOpening, rcSelf, rcNull );
-
-
-    rc = KColumnBlobMake ( & blob, self -> idx . idx1 . bswap );
-    if ( rc == 0 )
-    {
-        rc = KColumnBlobOpenRead ( blob, self, id );
-        if ( rc == 0 )
-        {
-            blob -> col = KColumnAttach ( self );
-            * blobp = blob;
-            return 0;
-        }
-        
-        free ( blob );
-    }
-
-    return rc;
-}
-
-/* IdRange
- *  returns id range for blob
- *
- *  "first" [ OUT ] - return parameter for first id
- *
- *  "last" [ OUT ] - return parameter for count
- */
-LIB_EXPORT rc_t CC KColumnBlobIdRange ( const KColumnBlob *self, int64_t *first, uint32_t *count )
-{
-    rc_t rc;
-
-    if ( first == NULL || count == NULL )
-        rc = RC ( rcDB, rcBlob, rcAccessing, rcParam, rcNull );
-    else if ( self == NULL )
-        rc = RC ( rcDB, rcBlob, rcAccessing, rcSelf, rcNull );
-    else if ( self -> loc . id_range == 0 )
-        rc = RC ( rcDB, rcBlob, rcAccessing, rcRange, rcEmpty );
-    else
-    {
-        * first = self -> loc . start_id;
-        * count = self -> loc . id_range;
-        return 0;
-    }
-
-    if ( first != NULL )
-        * first = 0;
-    if ( count != NULL )
-        * count = 0;
-
-    return rc;
-}
-
-/* KColumnBlobValidate
- *  runs checksum validation on unmodified blob
- */
-static
-rc_t KColumnBlobValidateCRC32 ( const KColumnBlob *self )
-{
-    rc_t rc;
-    const KColumn *col = self -> col;
-
-    uint8_t buffer [ 8 * 1024 ];
-    size_t to_read, num_read, total, size;
-
-    uint32_t cs, crc32 = 0;
-
-    /* calculate checksum */
-    for ( size = self -> loc . u . blob . size, total = 0; total < size; total += num_read )
-    {
-        to_read = size - total;
-        if ( to_read > sizeof buffer )
-            to_read = sizeof buffer;
-
-        rc = KColumnDataRead ( & col -> df,
-            & self -> pmorig, total, buffer, to_read, & num_read );
-        if ( rc != 0 )
-            return rc;
-        if ( num_read == 0 )
-            return RC ( rcDB, rcBlob, rcValidating, rcTransfer, rcIncomplete );
-
-        crc32 = CRC32 ( crc32, buffer, num_read );
-    }
-
-    /* read stored checksum */
-    rc = KColumnDataRead ( & col -> df,
-        & self -> pmorig, size, & cs, sizeof cs, & num_read );
-    if ( rc != 0 )
-        return rc;
-    if ( num_read != sizeof cs )
-        return RC ( rcDB, rcBlob, rcValidating, rcTransfer, rcIncomplete );
-
-    if ( self -> bswap )
-        cs = bswap_32 ( cs );
-
-    if ( cs != crc32 )
-        return RC ( rcDB, rcBlob, rcValidating, rcBlob, rcCorrupt );
-
-    return 0;
-}
-
-static
-rc_t KColumnBlobValidateMD5 ( const KColumnBlob *self )
-{
-    rc_t rc;
-    const KColumn *col = self -> col;
-
-    uint8_t buffer [ 8 * 1024 ];
-    size_t to_read, num_read, total, size;
-
-    MD5State md5;
-    uint8_t digest [ 16 ];
-
-    MD5StateInit ( & md5 );
-
-    /* calculate checksum */
-    for ( size = self -> loc . u . blob . size, total = 0; total < size; total += num_read )
-    {
-        to_read = size - total;
-        if ( to_read > sizeof buffer )
-            to_read = sizeof buffer;
-
-        rc = KColumnDataRead ( & col -> df,
-            & self -> pmorig, total, buffer, to_read, & num_read );
-        if ( rc != 0 )
-            return rc;
-        if ( num_read == 0 )
-            return RC ( rcDB, rcBlob, rcValidating, rcTransfer, rcIncomplete );
-
-        MD5StateAppend ( & md5, buffer, num_read );
-    }
-
-    /* read stored checksum */
-    rc = KColumnDataRead ( & col -> df,
-        & self -> pmorig, size, buffer, sizeof digest, & num_read );
-    if ( rc != 0 )
-        return rc;
-    if ( num_read != sizeof digest )
-        return RC ( rcDB, rcBlob, rcValidating, rcTransfer, rcIncomplete );
-
-    /* finish MD5 digest */
-    MD5StateFinish ( & md5, digest );
-
-    if ( memcmp ( buffer, digest, sizeof digest ) != 0 )
-        return RC ( rcDB, rcBlob, rcValidating, rcBlob, rcCorrupt );
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KColumnBlobValidate ( const KColumnBlob *self )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcBlob, rcValidating, rcSelf, rcNull );
-
-    if ( self -> loc . u . blob . size != 0 ) switch ( self -> col -> checksum )
-    {
-    case kcsCRC32:
-        return KColumnBlobValidateCRC32 ( self );
-    case kcsMD5:
-        return KColumnBlobValidateMD5 ( self );
-    }
-
-    return 0;
-}
-
-/* ValidateBuffer
- *  run checksum validation on buffer data
- *
- *  "buffer" [ IN ] - returned blob buffer from ReadAll
- *
- *  "cs_data" [ IN ] and "cs_data_size" [ IN ] - returned checksum data from ReadAll
- */
-static
-rc_t KColumnBlobValidateBufferCRC32 ( const void * buffer, size_t size, uint32_t cs )
-{
-    uint32_t crc32 = CRC32 ( 0, buffer, size );
-
-    if ( cs != crc32 )
-        return RC ( rcDB, rcBlob, rcValidating, rcBlob, rcCorrupt );
-
-    return 0;
-}
-
-static
-rc_t KColumnBlobValidateBufferMD5 ( const void * buffer, size_t size, const uint8_t cs [ 16 ] )
-{
-    MD5State md5;
-    uint8_t digest [ 16 ];
-
-    MD5StateInit ( & md5 );
-
-    /* calculate checksum */
-    MD5StateAppend ( & md5, buffer, size );
-
-    /* finish MD5 digest */
-    MD5StateFinish ( & md5, digest );
-
-    if ( memcmp ( cs, digest, sizeof digest ) != 0 )
-        return RC ( rcDB, rcBlob, rcValidating, rcBlob, rcCorrupt );
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KColumnBlobValidateBuffer ( const KColumnBlob * self,
-    const KDataBuffer * buffer, const KColumnBlobCSData * cs_data, size_t cs_data_size )
-{
-    size_t bsize;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcBlob, rcValidating, rcSelf, rcNull );
-    if ( buffer == NULL || cs_data == NULL )
-        return RC ( rcDB, rcBlob, rcValidating, rcParam, rcNull );
-
-    bsize = KDataBufferBytes ( buffer );
-    if ( bsize < self -> loc . u . blob . size )
-        return RC ( rcDB, rcBlob, rcValidating, rcData, rcInsufficient );
-    if ( bsize > self -> loc . u . blob . size )
-        return RC ( rcDB, rcBlob, rcValidating, rcData, rcExcessive );
-
-    if ( bsize != 0 ) switch ( self -> col -> checksum )
-    {
-    case kcsNone:
-        break;
-    case kcsCRC32:
-        return KColumnBlobValidateBufferCRC32 ( buffer -> base, bsize,
-            self -> bswap ? bswap_32 ( cs_data -> crc32 ) : cs_data -> crc32 );
-    case kcsMD5:
-        return KColumnBlobValidateBufferMD5 ( buffer -> base, bsize, cs_data -> md5_digest );
-    }
-
-    return 0;
-}
-
-
-/* KColumnBlobRead
- *  read data from blob
- *
- *  "offset" [ IN ] - starting offset into blob
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - number of bytes actually read
- *
- *  "remaining" [ OUT, NULL OKAY ] - optional return parameter for
- *  the number of bytes remaining to be read. specifically,
- *  "offset" + "num_read" + "remaining" == sizeof blob
- */
-LIB_EXPORT rc_t CC KColumnBlobRead ( const KColumnBlob *self,
-    size_t offset, void *buffer, size_t bsize,
-    size_t *num_read, size_t *remaining )
-{
-    rc_t rc;
-    size_t ignore;
-    if ( remaining == NULL )
-        remaining = & ignore;
-
-    if ( num_read == NULL )
-        rc = RC ( rcDB, rcBlob, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcBlob, rcReading, rcSelf, rcNull );
-        else
-        {
-            size_t size = self -> loc . u . blob . size;
-            const KColumn *col = self -> col;
-
-            if ( offset > size )
-                offset = size;
-
-            if ( bsize == 0 )
-                rc = 0;
-            else if ( buffer == NULL )
-                rc = RC ( rcDB, rcBlob, rcReading, rcBuffer, rcNull );
-            else
-            {
-                size_t to_read = size - offset;
-                if ( to_read > bsize )
-                    to_read = bsize;
-
-                POS_DEBUG(( "KDB: %s,%lu,%lu\n", self->col->path, offset, to_read ));
-
-#ifdef _DEBUGGING
-                if ( KDbgTestModConds ( DBG_KFS, DBG_FLAG( DBG_KFS_POS ) ) ||
-                     KDbgTestModConds ( DBG_KFS, DBG_FLAG( DBG_KFS_PAGE ) ) )
-                {
-                    KDbgSetColName( self->col->path );
-                }
-#endif
-                *num_read = 0;
-                while ( * num_read < to_read )
-                {
-                    size_t nread = 0;
-
-                    rc = KColumnDataRead ( & col -> df, & self -> pmorig, offset - *num_read,
-                        & ( ( char * ) buffer ) [ * num_read ], to_read - * num_read, & nread );
-                    if ( rc != 0 )
-                        break;
-                    if (nread == 0)
-                    {
-                        rc = RC ( rcDB, rcBlob, rcReading, rcFile, rcInsufficient );
-                        break;
-                    }
-
-                    *num_read += nread;
-                }
-#ifdef _DEBUGGING
-                if ( KDbgTestModConds ( DBG_KFS, DBG_FLAG( DBG_KFS_POS ) ) ||
-                     KDbgTestModConds ( DBG_KFS, DBG_FLAG( DBG_KFS_PAGE ) ) )
-                {
-                    KDbgSetColName( NULL );
-                }
-#endif
-
-                if ( rc == 0 )
-                {
-                    * remaining = size - offset - * num_read;
-                    return 0;
-                }
-            }
-
-            * remaining = size - offset;
-            * num_read = 0;
-            return rc;
-        }
-
-        * num_read = 0;
-    }
-
-    * remaining = 0;
-    return rc;
-}
-
-/* ReadAll
- *  read entire blob, plus any auxiliary checksum data
- *
- *  "buffer" [ OUT ] - pointer to a KDataBuffer structure that will be initialized
- *  and resized to contain the entire blob. upon success, will contain the number of bytes
- *  in buffer->elem_count and buffer->elem_bits == 8.
- *
- *  "opt_cs_data [ OUT, NULL OKAY ] - optional output parameter for checksum data
- *  associated with the blob in "buffer", if any exist.
- *
- *  "cs_data_size" [ IN ] - sizeof of * opt_cs_data if not NULL, 0 otherwise
- */
-LIB_EXPORT rc_t CC KColumnBlobReadAll ( const KColumnBlob * self, KDataBuffer * buffer,
-    KColumnBlobCSData * opt_cs_data, size_t cs_data_size )
-{
-    rc_t rc = 0;
-
-    if ( opt_cs_data != NULL )
-        memset ( opt_cs_data, 0, cs_data_size );
-
-    if ( buffer == NULL )
-        rc = RC ( rcDB, rcBlob, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcBlob, rcReading, rcSelf, rcNull );
-        else
-        {
-            /* determine blob size */
-            size_t bsize = self -> loc . u . blob . size;
-
-            /* ignore blobs of size 0 */
-            if ( bsize == 0 )
-                rc = 0;
-            else
-            {
-                /* initialize the buffer */
-                rc = KDataBufferMakeBytes ( buffer, bsize );
-                if ( rc == 0 )
-                {
-                    /* read the blob */
-                    size_t num_read, remaining;
-                    rc = KColumnBlobRead ( self, 0, buffer -> base, bsize, & num_read, & remaining );
-                    if ( rc == 0 )
-                    {
-                        /* test that num_read is everything and we have no remaining */
-                        if ( num_read != bsize || remaining != 0 )
-                            rc = RC ( rcDB, rcBlob, rcReading, rcTransfer, rcIncomplete );
-
-                        else
-                        {
-                            /* set for MD5 - just due to switch ordering */
-                            size_t cs_bytes = 16;
-
-                            /* if not reading checksum data, then we're done */
-                            if ( opt_cs_data == NULL )
-                                return 0;
-
-                            /* see what checksumming is in use */
-                            switch ( self -> col -> checksum )
-                            {
-                            case kcsNone:
-                                return 0;
-
-                            case kcsCRC32:
-                                /* reset for CRC32 */
-                                cs_bytes = 4;
-
-                                /* no break */
-
-                            case kcsMD5:
-                                if ( cs_data_size < cs_bytes )
-                                {
-                                    rc = RC ( rcDB, rcBlob, rcReading, rcParam, rcTooShort );
-                                    break;
-                                }
-
-                                /* read checksum information */
-                                rc = KColumnDataRead ( & self -> col -> df,
-                                    & self -> pmorig, bsize, opt_cs_data, cs_bytes, & num_read );
-                                if ( rc == 0 )
-                                {
-                                    if ( num_read != cs_bytes )
-                                        rc = RC ( rcDB, rcBlob, rcReading, rcTransfer, rcIncomplete );
-                                    else
-                                    {
-                                        /* success - read the blob AND the checksum data */
-                                        return 0;
-                                    }
-                                }
-                                break;
-                            }
-                        }
-                    }
-
-                    KDataBufferWhack ( buffer );
-                }
-            }
-        }
-
-        memset ( buffer, 0, sizeof * buffer );
-    }
-
-    return rc;
-}
-
-
-/* GetDirectory
- */
-LIB_EXPORT rc_t CC KColumnGetDirectoryRead ( const KColumn *self, const KDirectory **dir )
-{
-    rc_t rc;
-
-    if ( dir == NULL )
-        rc = RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * dir = self -> dir;
-            return KDirectoryAddRef ( * dir );
-        }
-
-        * dir = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/kdb/database-cc.c b/libs/kdb/database-cc.c
deleted file mode 100644
index 732bc17..0000000
--- a/libs/kdb/database-cc.c
+++ /dev/null
@@ -1,339 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- *============================================================================
- *
- */
-
-#include <kdb/extern.h>
-
-#define KONST const
-#include "index-priv.h"
-#include "dbmgr-priv.h"
-#include "database-priv.h"
-#include "table-priv.h"
-#include "kdb-priv.h"
-#include "column-priv.h"
-#undef KONST
-
-#include "cc-priv.h"
-
-#include <kdb/index.h>
-
-#include <kfs/file.h>
-#include <kfs/md5.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <klib/namelist.h>
-#include <kdb/namelist.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-
-#undef index
-
-static void KDatabaseGetName(KDatabase const *self, char const **rslt)
-{
-    char *sep;
-    
-    *rslt = self->path;
-    sep = strrchr(self->path, '/');
-    if (sep != NULL)
-        *rslt = sep + 1;
-}
-
-static
-rc_t KDatabaseCheckMD5 (const KDatabase *self, CCReportFunc report, void *ctx)
-{
-    CCReportInfoBlock info;
-    memset (& info, 0, sizeof info);
-
-    info.objType = kptDatabase;
-    KDatabaseGetName(self, &info.objName);
-    
-    return DirectoryCheckMD5 (self -> dir, "md5", & info, report, ctx);
-}
-
-static
-rc_t KDatabaseCheckTables (const KDatabase *self, uint32_t depth, int level, CCReportFunc report, void *ctx)
-{
-    uint32_t n;
-    
-    KNamelist *list;
-    rc_t rc = KDatabaseListTbl (self, & list);
-    if (rc != 0)
-        return rc;
-    
-    rc = KNamelistCount (list, & n);
-    if (rc == 0)
-    {
-        CCReportInfoBlock nfo;
-        memset (& nfo, 0, sizeof nfo);
-        nfo.objType = kptTable;
-        
-        for (nfo.objId = 0; rc == 0 && nfo.objId != (int) n; ++ nfo.objId)
-        {
-            rc = KNamelistGet (list, nfo.objId, &nfo.objName);
-            if (rc == 0)
-            {
-                const KTable *tbl;
-                
-                nfo.type = ccrpt_Visit;
-                nfo.info.visit.depth = depth + 1;
-                rc = report(&nfo, ctx); if (rc) break;
-                
-                rc = KDatabaseOpenTableRead (self, & tbl, "%s", nfo.objName);
-                if (rc == 0)
-                {
-                    rc = KTableConsistencyCheck (tbl, depth + 1, level, report,
-                        ctx, SRA_PLATFORM_UNDEFINED);
-                    KTableRelease (tbl);
-                }
-            }
-        }
-    }
-    
-    KNamelistRelease (list);
-    return rc;
-}
-
-static
-rc_t KDatabaseCheckIndexMD5 (const KDirectory *dir,
-    CCReportInfoBlock *nfo, CCReportFunc report, void *ctx)
-{
-    char md5 [ 4100 ];
-
-    snprintf (md5, sizeof md5, "%s.md5", nfo -> objName);
-    return DirectoryCheckMD5 (dir, md5, nfo, report, ctx);
-}
-
-static
-const KDirectory *KDatabaseFindIndexDir (const KDatabase *self)
-{
-    const KDirectory *idxDir;
-    
-    rc_t rc = KDirectoryOpenDirRead (self -> dir, & idxDir, false, "idx");
-    if (rc == 0)
-        return idxDir;
-
-    return NULL;
-}
-
-static
-rc_t KDatabaseCheckIndices (const KDatabase *self, uint32_t depth, uint32_t level, CCReportFunc report, void *ctx)
-{
-    uint32_t n;
-
-    KNamelist *list;
-    rc_t rc = KDatabaseListIdx (self, & list);
-    if (rc != 0)
-    {
-        if (GetRCState (rc) == rcNotFound)
-            return 0;
-        return rc;
-    }
-
-/* TEST    assert(0); */
-    rc = KNamelistCount (list, & n);
-    if (rc == 0)
-    {
-        const KDirectory *idxDir = KDatabaseFindIndexDir (self);
-        if (idxDir == NULL)
-            rc = RC (rcDB, rcDatabase, rcValidating, rcDirectory, rcNull);
-        else
-        {
-            CCReportInfoBlock nfo;
-            memset (& nfo, 0, sizeof nfo);
-            nfo.objType = kptIndex;
-
-            for (nfo.objId = 0; rc == 0 && nfo.objId != (int) n; ++ nfo.objId)
-            {
-                rc = KNamelistGet(list, nfo.objId, &nfo.objName);
-                if (rc != 0)
-                    break;
-            
-                nfo.type = ccrpt_Visit;
-                nfo.info.visit.depth = depth + 1;
-                rc = report(&nfo, ctx); if (rc) break;
-                
-                rc = KDatabaseCheckIndexMD5 (idxDir, &nfo, report, ctx);
-                if (rc == 0 && level > 0)
-                {
-                    const KIndex *idx;
-                    rc = KDatabaseOpenIndexRead (self, &idx, "%s", nfo.objName);
-                    if (rc != 0)
-                    {
-                        nfo.type = ccrpt_Done;
-                        nfo.info.done.rc = rc;
-                        nfo.info.done.mesg = "could not be opened";
-                    }
-                    else
-                    {
-                        nfo.type = ccrpt_Index;
-                        rc = KIndexConsistencyCheck(idx, level < 3 ? 1 : 3,
-                                                    &nfo.info.index.start_id,
-                                                    &nfo.info.index.id_range,
-                                                    &nfo.info.index.num_keys,
-                                                    &nfo.info.index.num_rows,
-                                                    &nfo.info.index.num_holes);
-                        KIndexRelease(idx);
-                        if (rc != 0)
-                        {
-                            nfo.type = ccrpt_Done;
-                            nfo.info.done.rc = rc;
-                            nfo.info.done.mesg = "could not be validated";
-                        }
-                    }
-
-                    rc = report (& nfo, ctx);
-                }
-            }
-
-            KDirectoryRelease (idxDir);
-        }
-    }
-
-    KNamelistRelease (list);
-    return rc;
-}
-
-static
-rc_t KDatabaseCheckDatabases (const KDatabase *self, uint32_t depth, int level, CCReportFunc report, void *ctx)
-{
-    uint32_t n;
-
-    KNamelist *list;
-    rc_t rc = KDatabaseListDB (self, & list);
-    if (rc != 0)
-    {
-        if (GetRCState (rc) == rcNotFound)
-            return 0;
-        return rc;
-    }
-
-    rc = KNamelistCount (list, & n);
-    if (rc == 0)
-    {
-        CCReportInfoBlock nfo;
-        memset (& nfo, 0, sizeof nfo);
-        nfo.objType = kptDatabase;
-        
-        for (nfo.objId = 0; rc == 0 && nfo.objId != (int) n; ++ nfo.objId)
-        {
-            rc = KNamelistGet (list, nfo.objId, &nfo.objName);
-            if (rc == 0)
-            {
-                const KDatabase *db;
-                
-                nfo.type = ccrpt_Visit;
-                nfo.info.visit.depth = depth + 1;
-                rc = report(&nfo, ctx); if (rc) break;
-                
-                rc = KDatabaseOpenDBRead (self, & db, "%s", nfo.objName);
-                if (rc == 0)
-                {
-                    rc = KDatabaseConsistencyCheck (db, depth + 1, level, report, ctx);
-                    KDatabaseRelease (db);
-                }
-            }
-        }
-    }
-    
-    KNamelistRelease (list);
-    return rc;
-}
-
-LIB_EXPORT
-rc_t CC KDatabaseConsistencyCheck (const KDatabase *self,
-    uint32_t depth, uint32_t level, CCReportFunc report, void *ctx)
-{
-    rc_t rc = 0;
-    uint32_t type;
-
-    uint32_t aLevel = level;
-    bool indexOnly = level & CC_INDEX_ONLY;
-    if (indexOnly) {
-        level &= ~CC_INDEX_ONLY;
-    }
-
-    if (self == NULL)
-        return RC (rcDB, rcDatabase, rcValidating, rcSelf, rcNull);
-    
-    if (depth == 0) {
-        CCReportInfoBlock info;
-        
-        KDatabaseGetName(self, &info.objName);
-        info.objId = 0;
-        info.objType = kptDatabase;
-        info.type = ccrpt_Visit;
-        info.info.visit.depth = 0;
-        
-        rc = report(&info, ctx);
-        if (rc) return rc;
-    }
-    
-    type = KDirectoryPathType(self->dir, "md5");
-    if (type == kptZombieFile) {
-        CCReportInfoBlock info;
-        
-        KDatabaseGetName(self, &info.objName);
-        info.objId = 0;
-        info.objType = kptTable;
-        info.type = ccrpt_Done;
-        info.info.done.mesg = "Database may be truncated";
-        info.info.done.rc = 0;
-        
-        rc = report(&info, ctx);
-    }
-    else if (type != kptNotFound)
-        rc = KDatabaseCheckMD5 (self, report, ctx);
-    else {
-        CCReportInfoBlock info;
-        
-        KDatabaseGetName(self, &info.objName);
-        info.objId = 0;
-        info.objType = kptDatabase;
-        info.type = ccrpt_Done;
-        info.info.done.mesg = "no md5 file";
-        info.info.done.rc = 0;
-        
-        rc = report(&info, ctx);
-    }
-    
-
-    if (rc == 0)
-        rc = KDatabaseCheckTables (self, depth, aLevel, report, ctx);
-
-    if (rc == 0)
-        rc = KDatabaseCheckIndices (self, depth, level, report, ctx);
-
-    if (rc == 0)
-        rc = KDatabaseCheckDatabases (self, depth, level, report, ctx);
-
-    return rc;
-}
diff --git a/libs/kdb/database-cmn.c b/libs/kdb/database-cmn.c
deleted file mode 100644
index 4940fa3..0000000
--- a/libs/kdb/database-cmn.c
+++ /dev/null
@@ -1,496 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define KONST const
-#include "database-priv.h"
-#include "dbmgr-priv.h"
-#include "kdb-priv.h"
-#undef KONST
-
-#include <sysalloc.h>
-#include <klib/namelist.h>
-#include <klib/rc.h>
-#include <kfs/md5.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * KDatabase
- *  connection to a database within file system
- */
-
-/* Whack
- */
-static
-rc_t KDatabaseWhack ( KDatabase *self )
-{
-    rc_t rc = 0;
-
-    /* unused: const KDBManager *mgr; */
-
-    KRefcountWhack ( & self -> refcount, "KDatabase" );
-
-    /* shut down md5 fmt file */
-    if ( self -> md5 != NULL )
-    {
-        rc = KMD5SumFmtRelease ( self -> md5 );
-        if ( rc == 0 )
-            self -> md5 = NULL;
-    }
-    if ( rc == 0 )
-    {
-        /* release dad */
-        if ( self -> dad != NULL )
-        {
-            rc = KDatabaseSever ( self -> dad );
-            if ( rc == 0 )
-                self -> dad = NULL;
-        }
-        /* remove from mgr */
-        if ( rc == 0 )
-        {
-            /* rc = KDBManagerSever ( self -> mgr, & self -> sym ); */
-			rc = KDBManagerSever ( self -> mgr );
-
-            /* complete */
-            if ( rc == 0 )
-            {
-                KDirectoryRelease ( self -> dir );
-                free ( self );
-                return 0;
-            }
-        }
-    }
-
-    KRefcountInit ( & self -> refcount, 1, "KDatabase", "whack", "kdb" );
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-rc_t KDatabaseAddRef ( const KDatabase *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KDatabase" ) )
-        {
-        case krefLimit:
-            return RC ( rcDB, rcDatabase, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-rc_t KDatabaseRelease ( const KDatabase *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KDatabase" ) )
-        {
-        case krefWhack:
-            return KDatabaseWhack ( ( KDatabase* ) self );
-        case krefNegative:
-            return RC ( rcDB, rcDatabase, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Sever
- *  like Release, except called internally
- *  indicates that a child object is letting go...
- */
-KDatabase *KDatabaseAttach ( const KDatabase *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "KDatabase" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( KDatabase* ) self;
-}
-
-rc_t KDatabaseSever ( const KDatabase *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "KDatabase" ) )
-        {
-        case krefWhack:
-            return KDatabaseWhack ( ( KDatabase* ) self );
-        case krefNegative:
-            return RC ( rcDB, rcDatabase, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Make
- *  make an initialized structure
- */
-static
-rc_t KDatabaseMake ( KDatabase **dbp, const KDirectory *dir, const char *path )
-{
-    KDatabase *db;
-
-    assert ( dbp != NULL );
-    assert ( path != NULL );
-
-    db = malloc ( sizeof * db + strlen ( path ) );
-    if ( db == NULL )
-    {
-        * dbp = NULL;
-        return RC ( rcDB, rcDatabase, rcConstructing, rcMemory, rcExhausted );
-    }
-
-    memset ( db, 0, sizeof * db );
-    db -> dir = dir;
-    KRefcountInit ( & db -> refcount, 1, "KDatabase", "make", path );
-    strcpy ( db -> path, path );
-
-    * dbp = db;
-    return 0;
-}
-
-
-/* OpenDBRead
- * VOpenDBRead
- *  open a database for read
- *
- *  "db" [ OUT ] - return parameter for newly opened database
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to database
- */
-static
-rc_t KDBManagerVOpenDBReadInt ( const KDBManager *self,
-    const KDatabase **dbp, const KDirectory *wd,
-    const char *path, va_list args )
-{
-    /* generate absolute path to db */
-    char dbpath [ 4096 ];
-    rc_t rc = KDirectoryVResolvePath ( wd, true,
-        dbpath, sizeof dbpath, path, args );
-    if ( rc == 0 )
-    {
-        KDatabase *db;
-        const KDirectory *dir;
-
-        /* open the directory if its a database */
-        rc = KDBOpenPathTypeRead ( wd, dbpath, &dir, kptDatabase, NULL );
-        if ( rc == 0 )
-        {
-            /* allocate a new guy */
-            rc = KDatabaseMake ( & db, dir, dbpath );
-            if ( rc == 0 )
-            {
-                db -> mgr = KDBManagerAttach ( self );
-                * dbp = db;
-                return 0;
-            }
-
-            KDirectoryRelease ( dir );
-        }
-    }
-    
-    return rc;
-}
-
-rc_t KDBManagerOpenDBRead ( const KDBManager *self,
-    const KDatabase **db, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDBManagerVOpenDBRead ( self, db, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-rc_t KDatabaseOpenDBRead ( const KDatabase *self,
-    const KDatabase **db, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVOpenDBRead ( self, db, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-rc_t KDBManagerVOpenDBRead ( const KDBManager *self,
-    const KDatabase **db, const char *path, va_list args )
-{
-    if ( db == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcParam, rcNull );
-
-    * db = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcSelf, rcNull );
-
-    return KDBManagerVOpenDBReadInt ( self, db, self -> wd, path, args );
-}
-
-rc_t KDatabaseVOpenDBRead ( const KDatabase *self,
-    const KDatabase **dbp, const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    if ( dbp == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcParam, rcNull );
-
-    * dbp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcSelf, rcNull );
-
-    rc = KDBVMakeSubPath ( self -> dir,
-        path, sizeof path, "db", 2, name, args );
-    if ( rc == 0 )
-    {
-        rc = KDBManagerOpenDBReadInt ( self -> mgr, dbp,
-                                       self -> dir, "%s", path );
-        if ( rc == 0 )
-        {
-            KDatabase *db = ( KDatabase* ) * dbp;
-            db -> dad = KDatabaseAttach ( self );
-        }
-    }
-
-    return rc;
-}
-
-
-/* Locked
- *  returns non-zero if locked
- */
-bool KDatabaseLocked ( const KDatabase *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return false;
-
-    rc = KDBWritable ( self -> dir, "." );
-    return GetRCState ( rc ) == rcLocked;
-}
-
-
-/* Exists
- *  returns true if requested object exists
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-bool KDatabaseVExists ( const KDatabase *self, uint32_t type, const char *name, va_list args )
-{
-    /* TBD */
-    return false;
-}
-
-bool KDatabaseExists ( const KDatabase *self, uint32_t type, const char *name, ... )
-{
-    bool exists;
-
-    va_list args;
-    va_start ( args, name );
-
-    exists = KDatabaseVExists ( self, type, name, args );
-
-    va_end ( args );
-
-    return exists;
-}
-
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-rc_t KDatabaseVWritable ( const KDatabase *self, uint32_t type, const char *name, va_list args )
-{
-    /* TBD */
-    return -1;
-}
-
-rc_t KDatabaseWritable ( const KDatabase *self, uint32_t type, const char *name, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, name );
-
-    rc = KDatabaseVWritable ( self, type, name, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-rc_t KDatabaseOpenManagerRead ( const KDatabase *self, const KDBManager **mgr )
-{
-    rc_t rc;
-
-    if ( mgr == NULL )
-        rc = RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDBManagerAddRef ( self -> mgr );
-            if ( rc == 0 )
-            {
-                * mgr = self -> mgr;
-                return 0;
-            }
-        }
-
-        * mgr = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenParent
- *  duplicate reference to parent database
- *  NB - returned reference must be released
- */
-rc_t KDatabaseOpenParentRead ( const KDatabase *self, const KDatabase **par )
-{
-    rc_t rc;
-
-    if ( par == NULL )
-        rc = RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDatabaseAddRef ( self -> dad );
-            if ( rc == 0 )
-            {
-                * par = self -> dad;
-                return 0;
-            }
-        }
-
-        * par = NULL;
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KNameList
- */
-
-/* List
- *  create database listings
- */
-static
-bool KDatabaseListFilter ( const KDirectory *dir, const char *name, void *data )
-{
-    return ( KDBOpenPathTypeRead ( dir, name, NULL, (( long int ) data ), NULL ) == 0 );
-}
-
-rc_t KDatabaseListDB ( const KDatabase *self, KNamelist **names )
-{
-    if ( self != NULL )
-    {
-        return KDirectoryList ( self -> dir,
-            names, KDatabaseListFilter, ( void* ) kptDatabase, "db" );
-    }
-
-    if ( names != NULL )
-        * names = NULL;
-
-    return RC ( rcDB, rcDatabase, rcListing, rcSelf, rcNull );
-}
-
-rc_t KDatabaseListTbl ( struct KDatabase const *self, KNamelist **names )
-{
-    if ( self != NULL )
-    {
-        return KDirectoryList ( self -> dir,
-            names, KDatabaseListFilter, ( void* ) kptTable, "tbl" );
-    }
-
-    if ( names != NULL )
-        * names = NULL;
-
-    return RC ( rcDB, rcDatabase, rcListing, rcSelf, rcNull );
-}
-
-rc_t KDatabaseListIdx ( struct KDatabase const *self, KNamelist **names )
-{
-    if ( self != NULL )
-    {
-        return KDirectoryList ( self -> dir,
-            names, KDatabaseListFilter, ( void* ) kptIndex, "idx" );
-    }
-
-    if ( names != NULL )
-        * names = NULL;
-
-    return RC ( rcDB, rcDatabase, rcListing, rcSelf, rcNull );
-}
-   
diff --git a/libs/kdb/database-priv.h b/libs/kdb/database-priv.h
deleted file mode 100644
index bd15e82..0000000
--- a/libs/kdb/database-priv.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_database_priv_
-#define _h_database_priv_
-
-#ifndef _h_kdb_database_
-#include <kdb/database.h>
-#endif
-
-#include <kdb/column.h>
-
-#ifndef _h_klib_symbol_
-#include <klib/symbol.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifndef KONST
-#define KONST
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDBManager;
-struct KDirectory;
-struct KMD5SumFmt;
-
-
-/*--------------------------------------------------------------------------
- * KDatabase
- *  connection to a database within file system
- */
-struct KDatabase
-{
-    /* manager reference */
-    struct KDBManager KONST *mgr;
-
-    /* if a sub-directory */
-    struct KDatabase KONST *dad;
-
-    /* database directory */
-    struct KDirectory KONST *dir;
-
-    /* MD5 format object */
-    struct KMD5SumFmt *md5;
-
-    /* open references */
-#if 1
-    KRefcount refcount;
-    uint32_t opencount;
-#else
-    KDualRef refcount;
-    uint32_t align;
-#endif
-
-    /* fits into manager symbol table */
-    KSymbol sym;
-
-    /* create and checksum modes for columns */
-    KCreateMode cmode;
-    KChecksum checksum;
-
-    /* true if database was opened read-only */
-    bool read_only;
-
-    /* symbol text space */
-    char path [ 1 ];
-};
-
-/* Attach
- * Sever
- *  like AddRef/Release, except called internally
- *  indicates that a child object is letting go...
- */
-KDatabase *KDatabaseAttach ( const KDatabase *self );
-rc_t KDatabaseSever ( const KDatabase *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_database_priv_ */
diff --git a/libs/kdb/database.c b/libs/kdb/database.c
deleted file mode 100644
index 7278afa..0000000
--- a/libs/kdb/database.c
+++ /dev/null
@@ -1,807 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define KONST const
-#include <kdb/extern.h>
-#include "database-priv.h"
-#include "dbmgr-priv.h"
-#include "kdb-priv.h"
-#undef KONST
-
-#include <klib/namelist.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <klib/printf.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <vfs/path.h>
-#include <vfs/manager.h>
-#include <vfs/manager-priv.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * KDatabase
- *  connection to a database within file system
- */
-
-/* GetPath
- *  return the absolute path to DB
- */
-LIB_EXPORT rc_t CC KDatabaseGetPath ( KDatabase const *self,
-    const char **path )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-    if ( path == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-
-    *path = self->path;
-
-    return 0;
-}
-
-/* Whack
- */
-static
-rc_t KDatabaseWhack ( KDatabase *self )
-{
-    rc_t rc = 0;
-
-    KRefcountWhack ( & self -> refcount, "KDatabase" );
-
-    /* release dad */
-    if ( self -> dad != NULL )
-    {
-        rc = KDatabaseSever ( self -> dad );
-        if ( rc == 0 )
-            self -> dad = NULL;
-    }
-
-    /* remove from mgr */
-    if ( rc == 0 )
-        rc = KDBManagerSever ( self -> mgr );
-
-    /* complete */
-    if ( rc == 0 )
-    {
-        KDirectoryRelease ( self -> dir );
-        free ( self );
-        return 0;
-    }
-
-    KRefcountInit ( & self -> refcount, 1, "KDatabase", "whack", "kdb" );
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KDatabaseAddRef ( const KDatabase *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KDatabase" ) )
-        {
-        case krefLimit:
-            return RC ( rcDB, rcDatabase, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KDatabaseRelease ( const KDatabase *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KDatabase" ) )
-        {
-        case krefWhack:
-            return KDatabaseWhack ( ( KDatabase* ) self );
-        case krefNegative:
-            return RC ( rcDB, rcDatabase, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Sever
- *  like Release, except called internally
- *  indicates that a child object is letting go...
- */
-KDatabase *KDatabaseAttach ( const KDatabase *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "KDatabase" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( KDatabase* ) self;
-}
-
-rc_t KDatabaseSever ( const KDatabase *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "KDatabase" ) )
-        {
-        case krefWhack:
-            return KDatabaseWhack ( ( KDatabase* ) self );
-        case krefNegative:
-            return RC ( rcDB, rcDatabase, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Make
- *  make an initialized structure
- */
-static
-rc_t KDatabaseMake ( KDatabase **dbp, const KDirectory *dir, const char *path )
-{
-    KDatabase *db;
-
-    assert ( dbp != NULL );
-    assert ( path != NULL );
-
-    db = malloc ( sizeof * db + strlen ( path ) );
-    if ( db == NULL )
-    {
-        * dbp = NULL;
-        return RC ( rcDB, rcDatabase, rcConstructing, rcMemory, rcExhausted );
-    }
-
-    db -> mgr = NULL;
-    db -> dad = NULL;
-    db -> dir = dir;
-
-    /* for open mode we don't care about creation mode or checksum, setting defaults */
-    db -> cmode = kcmOpen;
-    db -> checksum = kcsNone;
-
-    KRefcountInit ( & db -> refcount, 1, "KDatabase", "make", path );
-    strcpy ( db -> path, path );
-
-    * dbp = db;
-    return 0;
-}
-
-static
-rc_t KDatabaseMakeVPath ( KDatabase **dbp, const KDirectory *dir, const VPath* path )
-{
-    const String* dbpathStr;
-    rc_t rc = VPathMakeString ( path, &dbpathStr );    /* NUL-terminated */
-    if ( rc == 0 )
-    {
-        rc = KDatabaseMake ( dbp, dir, dbpathStr->addr );
-        StringWhack(dbpathStr);
-    }
-    return rc;
-}
-
-
-/* OpenDBRead
- * VOpenDBRead
- *  open a database for read
- *
- *  "db" [ OUT ] - return parameter for newly opened database
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to database
- */
-static
-rc_t KDBManagerVOpenDBReadInt ( const KDBManager *self, const KDatabase **dbp,
-                                const KDirectory *wd, bool try_srapath,
-                                const char *path, va_list args )
-{
-    rc_t rc;
-
-    /* MUST use vsnprintf because the documented behavior of "path"
-       is that of stdc library's printf, not vdb printf */
-    char dbpath [ 4096 ];
-    int z = ( args == NULL ) ?
-        snprintf ( dbpath, sizeof dbpath, "%s", path ):
-        vsnprintf ( dbpath, sizeof dbpath, path, args );
-    if ( z < 0 || ( size_t ) z >= sizeof dbpath )
-        rc = RC ( rcDB, rcMgr, rcOpening, rcPath, rcExcessive );
-    else
-    {
-        const KDirectory *dir;
-
-        /* open the directory if its a database */
-        rc = KDBOpenPathTypeRead ( self, wd, dbpath, &dir, kptDatabase, NULL, try_srapath );
-        if ( rc == 0 )
-        {
-            KDatabase *db;
-
-            /* allocate a new guy */
-            rc = KDatabaseMake ( & db, dir, dbpath );
-            if ( rc == 0 )
-            {
-                db -> mgr = KDBManagerAttach ( self );
-                * dbp = db;
-                return 0;
-            }
-
-            KDirectoryRelease ( dir );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerOpenDBRead ( const KDBManager *self,
-    const KDatabase **db, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDBManagerVOpenDBRead ( self, db, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseOpenDBRead ( const KDatabase *self,
-    const KDatabase **db, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVOpenDBRead ( self, db, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerVOpenDBRead ( const KDBManager *self,
-    const KDatabase **db, const char *path, va_list args )
-{
-    if ( db == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcParam, rcNull );
-
-    * db = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcSelf, rcNull );
-
-    return KDBManagerVOpenDBReadInt ( self, db, self -> wd, true, path, args );
-}
-
-LIB_EXPORT rc_t CC KDatabaseVOpenDBRead ( const KDatabase *self,
-    const KDatabase **dbp, const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    if ( dbp == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcParam, rcNull );
-
-    * dbp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcSelf, rcNull );
-
-    rc = KDBVMakeSubPath ( self -> dir,
-        path, sizeof path, "db", 2, name, args );
-    if ( rc == 0 )
-    {
-        rc = KDBManagerVOpenDBReadInt ( self -> mgr, dbp,
-                                        self -> dir, false, path, NULL );
-        if ( rc == 0 )
-        {
-            KDatabase *db = ( KDatabase* ) * dbp;
-            db -> dad = KDatabaseAttach ( self );
-        }
-    }
-
-    return rc;
-}
-
-
-/* Locked
- *  returns non-zero if locked
- */
-LIB_EXPORT bool CC KDatabaseLocked ( const KDatabase *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return false;
-
-    rc = KDBWritable ( self -> dir, "." );
-    return GetRCState ( rc ) == rcLocked;
-}
-
-/* Exists
- *  returns true if requested object exists
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT bool CC KDatabaseVExists ( const KDatabase *self, uint32_t type, const char *name, va_list args )
-{
-    if ( self != NULL && name != NULL && name [ 0 ] != 0 )
-    {
-        rc_t rc;
-        uint32_t len;
-        const char *ns;
-        char path [ 256 ];
-
-        switch ( type )
-        {
-        case kptDatabase:
-            ns = "db";
-            len = 2;
-            break;
-
-        case kptTable:
-            ns = "tbl";
-            len = 3;
-            break;
-
-        case kptIndex:
-            ns = "idx";
-            len = 3;
-            break;
-
-        default:
-            return false;
-        }
-
-        rc = KDBVMakeSubPath ( self -> dir, path, sizeof path, ns, len, name, args );
-        if ( rc == 0 )
-        {
-            switch ( KDirectoryPathType ( self -> dir, "%s", path ) )
-            {
-            case kptFile:
-            case kptDir:
-            case kptFile | kptAlias:
-            case kptDir | kptAlias:
-                return true;
-            }
-        }
-    }
-    return false;
-}
-
-LIB_EXPORT bool CC KDatabaseExists ( const KDatabase *self, uint32_t type, const char *name, ... )
-{
-    bool exists;
-
-    va_list args;
-    va_start ( args, name );
-
-    exists = KDatabaseVExists ( self, type, name, args );
-
-    va_end ( args );
-
-    return exists;
-}
-
-
-/* IsAlias
- *  returns true if object name is an alias
- *  returns path to fundamental name if it was aliased
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - optional output buffer
- *  for fundamenta object name if "alias" is not a fundamental name, 
- *
- *  "name" [ IN ] - NUL terminated object name
- */
-LIB_EXPORT bool CC KDatabaseIsAlias ( const KDatabase *self, uint32_t type,
-    char *resolved, size_t rsize, const char *name )
-{
-    if ( self != NULL && name != NULL && name [ 0 ] != 0 )
-    {
-        rc_t rc;
-        uint32_t len;
-        const char *ns;
-        char path [ 256 ];
-
-        switch ( type )
-        {
-        case kptDatabase:
-            ns = "db";
-            len = 2;
-            break;
-
-        case kptTable:
-            ns = "tbl";
-            len = 3;
-            break;
-
-        case kptIndex:
-            ns = "idx";
-            len = 3;
-            break;
-
-        default:
-            return false;
-        }
-
-        rc = KDBMakeSubPath ( self -> dir, path, sizeof path, ns, len, name );
-        if ( rc == 0 )
-        {
-            switch ( KDirectoryPathType ( self -> dir, "%s", path ) )
-            {
-            case kptFile | kptAlias:
-            case kptDir | kptAlias:
-                if ( resolved != NULL && rsize != 0 )
-                {
-                    const KDirectory *sub;
-                    rc = KDirectoryOpenDirRead ( self -> dir, & sub, false, "%s", ns );
-                    * resolved = 0;
-                    if ( rc != 0 )
-                        PLOGERR ( klogWarn, ( klogWarn, rc, "failed to open subdirectory '$(sub)'", "sub=%s", ns ) );
-                    else
-                    {
-                        rc = KDirectoryResolveAlias ( sub, false, resolved, rsize, "%s", name );
-                        KDirectoryRelease ( sub );
-                        if ( rc != 0 )
-                            PLOGERR ( klogWarn, ( klogWarn, rc, "failed to resolve alias '$(alias)'", "alias=%s", name ) );
-                    }
-                }
-                return true;
-            }
-        }
-    }
-
-    if ( resolved != NULL && rsize != 0 )
-        * resolved = 0;
-
-    return false;
-}
-
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC KDatabaseVWritable ( const KDatabase *self, uint32_t type, const char *name, va_list args )
-{
-    /* TBD */
-    return -1;
-}
-
-LIB_EXPORT rc_t CC KDatabaseWritable ( const KDatabase *self, uint32_t type, const char *name, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, name );
-
-    rc = KDatabaseVWritable ( self, type, name, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC KDatabaseOpenManagerRead ( const KDatabase *self, const KDBManager **mgr )
-{
-    rc_t rc;
-
-    if ( mgr == NULL )
-        rc = RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDBManagerAddRef ( self -> mgr );
-            if ( rc == 0 )
-            {
-                * mgr = self -> mgr;
-                return 0;
-            }
-        }
-
-        * mgr = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenParent
- *  duplicate reference to parent database
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC KDatabaseOpenParentRead ( const KDatabase *self, const KDatabase **par )
-{
-    rc_t rc;
-
-    if ( par == NULL )
-        rc = RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDatabaseAddRef ( self -> dad );
-            if ( rc == 0 )
-            {
-                * par = self -> dad;
-                return 0;
-            }
-        }
-
-        * par = NULL;
-    }
-
-    return rc;
-}
-
-
-/* GetDirectory
- *  access the directory in use
- */
-LIB_EXPORT rc_t CC KDatabaseOpenDirectoryRead ( const KDatabase *self, const KDirectory **dir )
-{
-    rc_t rc;
-
-    if ( dir == NULL )
-        rc = RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * dir = self -> dir;
-            return KDirectoryAddRef ( * dir );
-        }
-
-        * dir = NULL;
-    }
-
-    return rc;
-}
-
-
-/* ModDate
- *  get modification date
- */
-LIB_EXPORT rc_t CC KDatabaseModDate ( const KDatabase *self, KTime_t *mtime )
-{
-    rc_t rc;
-
-    if ( mtime == NULL )
-        rc = RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            /* HACK ALERT - there needs to be a proper way to record modification times */
-            const KDirectory *dir = self -> dir;
-
-            /* this only tells the last time the table was locked,
-               which may be close to the last time it was modified */
-            rc = KDirectoryDate ( dir, mtime, "lock" );
-            if ( rc == 0 )
-                return 0;
-
-            /* get directory timestamp */
-            rc = KDirectoryDate ( dir, mtime, "." );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        * mtime = 0;
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KNameList
- */
-
-/* List
- *  create database listings
- */
-struct FilterData
-{
-    const KDBManager * mgr;
-    int type;
-};
-
-static
-bool CC KDatabaseListFilter ( const KDirectory *dir, const char *name, void *data_ )
-{
-    struct FilterData * data = data_;
-    return ( KDBOpenPathTypeRead ( data->mgr, dir, name, NULL, data->type, NULL, false ) == 0 );
-}
-
-LIB_EXPORT rc_t CC KDatabaseListDB ( const KDatabase *self, KNamelist **names )
-{
-    if ( self != NULL )
-    {
-        struct FilterData data;
-        data.mgr = self->mgr;
-        data.type = kptDatabase;
-
-        return KDirectoryList ( self -> dir,
-            names, KDatabaseListFilter, &data, "db" );
-    }
-
-    if ( names != NULL )
-        * names = NULL;
-
-    return RC ( rcDB, rcDatabase, rcListing, rcSelf, rcNull );
-}
-
-LIB_EXPORT rc_t CC KDatabaseListTbl ( struct KDatabase const *self, KNamelist **names )
-{
-    if ( self != NULL )
-    {
-        struct FilterData data;
-        data.mgr = self->mgr;
-        data.type = kptTable;
-
-        return KDirectoryList ( self -> dir,
-            names, KDatabaseListFilter, &data, "tbl" );
-    }
-
-    if ( names != NULL )
-        * names = NULL;
-
-    return RC ( rcDB, rcDatabase, rcListing, rcSelf, rcNull );
-}
-
-LIB_EXPORT rc_t CC KDatabaseListIdx ( struct KDatabase const *self, KNamelist **names )
-{
-    if ( self != NULL )
-    {
-        struct FilterData data;
-        data.mgr = self->mgr;
-        data.type = kptIndex;
-
-        return KDirectoryList ( self -> dir,
-            names, KDatabaseListFilter, &data, "idx" );
-    }
-
-    if ( names != NULL )
-        * names = NULL;
-
-    return RC ( rcDB, rcDatabase, rcListing, rcSelf, rcNull );
-}
-
-LIB_EXPORT rc_t CC KDBManagerVPathOpenLocalDBRead ( struct KDBManager const * self,
-    struct KDatabase const ** p_db, struct VPath const * vpath )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-    if ( p_db == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    if ( vpath == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-        
-    {   
-        /* vpath has already been resolved and is known to be a local path. 
-           open it if it is a database; avoid an additional round of resolution */
-        const KDirectory *dir;
-        rc_t rc = VFSManagerOpenDirectoryReadDirectoryRelativeDecrypt ( self -> vfsmgr, self -> wd, &dir, vpath );
-        if ( rc == 0 )
-        {
-            if ( ( (~kptAlias) & KDBPathType ( dir, NULL, "." ) ) != kptDatabase )
-            {
-                rc = RC ( rcDB, rcMgr, rcOpening, rcDatabase, rcIncorrect );
-            }
-            else
-            {   /* allocate a new guy */
-                KDatabase *db;
-                rc = KDatabaseMakeVPath ( & db, dir, vpath );
-                if ( rc == 0 )
-                {
-                    db -> mgr = KDBManagerAttach ( self ); 
-                    * p_db = db;
-                    return 0;
-                }
-            }
-
-            KDirectoryRelease ( dir );
-        }
-        return rc;
-    }
-} 
-
-LIB_EXPORT rc_t CC KDBManagerVPathOpenRemoteDBRead ( struct KDBManager const * self,
-    struct KDatabase const ** p_db, struct VPath const * remote, struct VPath const * cache )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-    if ( p_db == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    if ( remote == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    /* cache == NULL is OK */    
-    
-    {   
-        /*  vpath has already been resolved and is known to be a remote URL. 
-            Open it if it is a database; use the provided cache; avoid an additional round of resolution */
-        const KDirectory *dir;
-        rc_t rc = VFSManagerOpenDirectoryReadDecryptRemote( self -> vfsmgr, &dir, remote, cache );
-        if ( rc == 0 )
-        {
-            if ( ( (~kptAlias) & KDBPathType ( dir, NULL, "." ) ) != kptDatabase )
-            {
-                rc = RC ( rcDB, rcMgr, rcOpening, rcDatabase, rcIncorrect );
-            }
-            else
-            {   /* allocate a new guy */
-                KDatabase *db;
-                rc = KDatabaseMakeVPath ( & db, dir, remote );
-                if ( rc == 0 )
-                {
-                    db -> mgr = KDBManagerAttach ( self ); 
-                    * p_db = db;
-                    return 0;
-                }
-            }
-
-            KDirectoryRelease ( dir );
-        }
-        return rc;
-    }
-}
\ No newline at end of file
diff --git a/libs/kdb/dbcc-cmn.c b/libs/kdb/dbcc-cmn.c
deleted file mode 100644
index 99f1205..0000000
--- a/libs/kdb/dbcc-cmn.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- *============================================================================
- *
- */
-
-#include <kdb/extern.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/md5.h>
-
-#include "cc-priv.h"
-#include <os-native.h>
-
-#include <stdio.h> /* for sprintf */
-#include <string.h>
-
-static
-rc_t FileCheckMD5(const KDirectory *dir, const char name[], const uint8_t digest[])
-{
-    rc_t rc;
-    const KFile *fp;
-    const KFile *mds;
-    uint64_t pos;
-    size_t nr;
-    char buf[4096];
-    
-    rc = KDirectoryOpenFileRead(dir, &fp, "%s", name);
-    if (rc)
-        return rc;
-    rc = KFileMakeMD5Read(&mds, fp, digest);
-    if (rc) {
-        KFileRelease(fp);
-        return rc;
-    }
-    for (pos = 0; ; ) {
-        rc = KFileRead(mds, pos, buf, sizeof(buf), &nr);
-        if (rc || nr == 0)
-            break;
-        pos += nr;
-    }
-    KFileRelease(mds);
-
-    return rc;
-}
-
-rc_t DirectoryCheckMD5(const KDirectory *dir, const char name[],
-                       CCReportInfoBlock *nfo,
-                       CCReportFunc report, void *ctx)
-{
-    rc_t rc;
-    rc_t rc2 = 0;
-    const KFile *kf;
-    const KMD5SumFmt *sum;
-    uint32_t i;
-    uint32_t n;
-    uint8_t digest[16];
-    char pathbuf[4096];
-    char mesg[1024];
-    
-    mesg[0] = '\0';
-    
-    nfo->type = ccrpt_Done;
-    nfo->info.done.mesg = mesg;
-    
-    rc = KDirectoryOpenFileRead(dir, &kf, "%s", name);
-    if (rc) {
-        snprintf(mesg, sizeof(mesg), "MD5 file '%s' could not be opened", name);
-        nfo->info.done.rc = rc;
-        return report(nfo, ctx);
-    }
-    rc = KMD5SumFmtMakeRead(&sum, kf);
-    if (rc) {
-        KFileRelease(kf);
-        snprintf(mesg, sizeof(mesg), "MD5 file '%s' could not be read", name);
-        nfo->info.done.rc = rc;
-        return report(nfo, ctx);
-    }
-    rc = KMD5SumFmtCount(sum, &n);
-    if (rc)
-        return rc;
-    for (i = 0; i != n; ++i) {
-        char *path = pathbuf;
-        rc = KMD5SumFmtGet(sum, i, pathbuf, sizeof(pathbuf), digest, NULL);
-        if (rc)
-            break;
-
-        /* catch case where skey.md5 contains full path */
-        if ( path [ 0 ] == '/' )
-        {
-            size_t sz = strlen ( path );
-            if ( sz >= 5 && strcmp ( & path [ sz - 5 ], "/skey" ) == 0 )
-                path = "skey";
-        }
-
-        rc = FileCheckMD5(dir, path, digest);
-        if (rc2 == 0)
-            rc2 = rc;
-        nfo->type = ccrpt_MD5;
-        nfo->info.MD5.rc = rc;
-        nfo->info.MD5.file = path;
-        rc = report(nfo, ctx);
-        if ( rc != 0 )
-            break;
-    }
-    KMD5SumFmtRelease(sum);
-    if (rc)
-        return rc;
-    
-    nfo->type = ccrpt_Done;
-    if (rc2) {
-        nfo->info.done.mesg = "failed md5 validation";
-        nfo->info.done.rc = rc2;
-    }
-    else {
-        nfo->info.done.mesg = "md5 ok";
-        nfo->info.done.rc = 0;
-    }
-    return report(nfo, ctx);
-}
diff --git a/libs/kdb/dbmgr-cmn.c b/libs/kdb/dbmgr-cmn.c
deleted file mode 100644
index fd95b66..0000000
--- a/libs/kdb/dbmgr-cmn.c
+++ /dev/null
@@ -1,485 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define TRACK_REFERENCES 0
-
-#include <kdb/extern.h>
-#include "libkdb.vers.h"
-
-#define KONST const
-#include "dbmgr-priv.h"
-#include "kdb-priv.h"
-#undef KONST
-
-#include <vfs/manager.h>
-#include <kfs/directory.h>
-#include <klib/symbol.h>
-#include <klib/checksum.h>
-#include <klib/rc.h>
-#include <kproc/lock.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-
-/*--------------------------------------------------------------------------
- * KDBManager
- *  handle to library
- */
-
-
-/* Whack
- */
-static
-rc_t KDBManagerWhack ( KDBManager *self )
-{
-    rc_t rc;
-
-    KRefcountWhack ( & self -> refcount, "KDBManager" );
-
-    /* everything should be closed */
-    assert ( self -> open_objs . root == NULL );
-
-    rc = KRWLockRelease ( self -> open_objs_lock );
-
-    rc = VFSManagerRelease ( self -> vfsmgr );
-
-    rc = KDirectoryRelease ( self -> wd );
-    if ( rc == 0 )
-    {
-        free ( self );
-        return 0;
-    }
-
-    KRefcountInit ( & self -> refcount, 1, "KDBManager", "whack", "kmgr" );
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KDBManagerAddRef ( const KDBManager *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KDBManager" ) )
-        {
-        case krefLimit:
-            return RC ( rcDB, rcMgr, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KDBManagerRelease ( const KDBManager *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KDBManager" ) )
-        {
-        case krefWhack:
-            return KDBManagerWhack ( ( KDBManager* ) self );
-        case krefNegative:
-            return RC ( rcDB, rcMgr, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Attach
- * Sever
- */
-KDBManager* KDBManagerAttach ( const KDBManager *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "KDBManager" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( KDBManager* ) self;
-}
-
-rc_t KDBManagerSever ( const KDBManager *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "KDBManager" ) )
-        {
-        case krefWhack:
-            return KDBManagerWhack ( ( KDBManager* ) self );
-        case krefNegative:
-            return RC ( rcDB, rcMgr, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Make - PRIVATE
- *
- *  "wd" [ IN, NULL OKAY ] - optional working directory for
- *  accessing the file system. mgr will attach its own reference.
- */
-rc_t KDBManagerMake ( KDBManager **mgrp, const KDirectory *wd, const char *op,
-    VFSManager *vmanager )
-{
-    rc_t rc;
-
-    if ( mgrp == NULL )
-        rc = RC ( rcDB, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KDBManager *mgr = malloc ( sizeof * mgr );
-        if ( mgr == NULL )
-            rc = RC ( rcDB, rcMgr, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            memset ( mgr, 0, sizeof * mgr );
-            mgr -> wd = wd;
-            if ( wd != NULL )
-                rc = KDirectoryAddRef ( wd );
-            else
-                rc = KDirectoryNativeDir ( ( KDirectory** ) & mgr -> wd );
-
-            if ( rc == 0 )
-            {
-                if (vmanager == NULL) {
-                    rc = VFSManagerMake ( & mgr -> vfsmgr );
-                }
-                else {
-                    rc = VFSManagerAddRef ( vmanager );
-                    if (rc == 0) {
-                        mgr -> vfsmgr = vmanager;
-                    }
-                }
-
-                if ( rc == 0 )
-                {
-                    rc = KRWLockMake ( & mgr -> open_objs_lock );
-
-                    if ( rc == 0 )
-                    {
-                        CRC32Init ();
-                        
-                        BSTreeInit ( & mgr -> open_objs );
-                        
-                        KRefcountInit ( & mgr -> refcount, 1, "KDBManager", op, "kmgr" );
-                        
-                        * mgrp = mgr;
-                        return 0;
-                    }
-
-                    VFSManagerRelease ( mgr -> vfsmgr );
-                }
-
-                KDirectoryRelease ( mgr -> wd );
-            }
-
-            free ( mgr );
-        }
-
-        * mgrp = NULL;
-    }
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDBManagerGetVFSManager ( const KDBManager *self,
-    const struct VFSManager **vmanager )
-{
-    if (self == NULL) {
-        return RC ( rcDB, rcMgr, rcAccessing, rcSelf, rcNull );
-    }
-    else if (vmanager == NULL) {
-        return RC ( rcDB, rcMgr, rcAccessing, rcParam, rcNull );
-    }
-    else {
-        rc_t rc = VFSManagerAddRef(self -> vfsmgr);
-        if (rc == 0) {
-            * vmanager = self -> vfsmgr;
-        }
-        else {
-            * vmanager = NULL;
-        }
-        return rc;
-    }
-}
-
-
-/* Version
- *  returns the library version
- */
-LIB_EXPORT rc_t CC KDBManagerVersion ( const KDBManager *self, uint32_t *version )
-{
-    if ( version == NULL )
-        return RC ( rcDB, rcMgr, rcAccessing, rcParam, rcNull );
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcAccessing, rcSelf, rcNull );
-
-    * version = LIBKDB_VERS;
-    return 0;
-}
-
-
-/* Exists
- *  returns true if requested object exists
- *
- *  "requested" [ IN ] - a KDBPathType
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT bool CC KDBManagerVExists ( const KDBManager *self, uint32_t requested, const char *name, va_list args )
-{
-    int type;
-
-    type = KDBManagerVPathType (self, name, args);
-    switch ( type )
-    {
-    case kptDatabase:
-    case kptTable:
-    case kptIndex:
-    case kptColumn:
-    case kptMetadata:
-        break;
-    case kptPrereleaseTbl:
-        type = kptTable;
-        break;
-    default:
-        return false;
-    }
-    return requested == ( uint32_t ) type;
-}
-
-bool KDBManagerExists ( const KDBManager *self, uint32_t type, const char *name, ... )
-{
-    bool exists;
-
-    va_list args;
-    va_start ( args, name );
-
-    exists = KDBManagerVExists ( self, type, name, args );
-
-    va_end ( args );
-
-    return exists;
-}
-
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "path" [ IN ] - NUL terminated path
- */
-
-/* TBD - should be in this file */
-
-/* CheckOpen
- */
-rc_t KDBManagerCheckOpen ( const KDBManager * self, const char *path )
-{
-    /* try to find the open object by path */
-    KSymbol *sym = KDBManagerOpenObjectFind ( self, path );
-
-    /* if not open, return no error */
-    if ( sym == NULL )
-        return 0;
-
-    /* put together an appropriate response */
-    switch ( sym -> type )
-    {
-    case kptDatabase:
-        return RC ( rcDB, rcMgr, rcAccessing, rcDatabase, rcBusy );
-    case kptTable:
-        return RC ( rcDB, rcMgr, rcAccessing, rcTable, rcBusy );
-    case kptColumn:
-        return RC ( rcDB, rcMgr, rcAccessing, rcColumn, rcBusy );
-    case kptIndex:
-        return RC ( rcDB, rcMgr, rcAccessing, rcIndex, rcBusy );
-    case kptMetadata:
-        return RC ( rcDB, rcMgr, rcAccessing, rcMetadata, rcBusy );
-    case kptPrereleaseTbl:
-        return RC ( rcDB, rcMgr, rcAccessing, rcTable, rcBusy );
-    default:
-        break;
-    }
-
-    return RC ( rcDB, rcMgr, rcAccessing, rcUnknown, rcBusy );
-}
-
-
-
-/* OpenObjectFind
- *  return a pointer to the openobject with path
- */
-static
-KSymbol *KDBManagerOpenObjectFindInt ( const KDBManager * self, String *s )
-{
-    KSymbol *sym = NULL;
-    rc_t rc = KRWLockAcquireShared ( self -> open_objs_lock );
-    if ( rc == 0 )
-    {
-        sym = ( KSymbol* ) BSTreeFind ( & self -> open_objs, s, KSymbolCmp );
-        KRWLockUnlock ( self -> open_objs_lock );
-    }
-    return sym;
-}
-
-KSymbol *KDBManagerOpenObjectFind ( const KDBManager * self, const char * path )
-{
-    String s;
-    StringInitCString ( & s, path );
-    return KDBManagerOpenObjectFindInt ( self, & s );
-}
-
-
-/* OpenObjectBusy
- *  Is this path to an object in the OpenObjects list?
- */
-bool KDBManagerOpenObjectBusy ( const KDBManager *self, const char *path )
-{
-    return KDBManagerOpenObjectFind ( self, path ) != NULL;
-}
-
-
-/* OpenObjectAdd
- *  Put an object in to the open objects list
- */
-rc_t KDBManagerOpenObjectAdd ( KDBManager *self, KSymbol *obj )
-{
-    KSymbol *exists;
-    rc_t rc = KRWLockAcquireExcl ( self -> open_objs_lock );
-    if ( rc == 0 )
-    {
-        rc = BSTreeInsertUnique ( & self -> open_objs,
-            & obj -> n, ( BSTNode** ) & exists, KSymbolSort );
-
-        KRWLockUnlock ( self -> open_objs_lock );
-
-        if ( rc != 0 )
-        {
-            switch ( exists -> type )
-            {
-            case kptDatabase:
-                rc = RC ( rcDB, rcMgr, rcInserting, rcDatabase, rcBusy );
-                break;
-            case kptTable:
-            case kptPrereleaseTbl:
-                rc = RC ( rcDB, rcMgr, rcInserting, rcTable, rcBusy );
-                break;
-            case kptColumn:
-                rc = RC ( rcDB, rcMgr, rcInserting, rcColumn, rcBusy );
-                break;
-            case kptIndex:
-                rc = RC ( rcDB, rcMgr, rcInserting, rcIndex, rcBusy );
-                break;
-            case kptMetadata:
-                rc = RC ( rcDB, rcMgr, rcInserting, rcMetadata, rcBusy );
-                break;
-            default:
-                rc = RC ( rcDB, rcMgr, rcInserting, rcUnknown, rcBusy );
-            }
-        }
-    }
-    return rc;
-}
-
-
-/* OpenDelete
- *  Take an object out of the open objects list
- */
-rc_t KDBManagerOpenObjectDelete ( KDBManager *self, KSymbol *obj )
-{
-    rc_t rc = 0;
-    if ( obj != NULL )
-    {
-        rc = KRWLockAcquireExcl ( self -> open_objs_lock );
-        if ( rc == 0 )
-        {
-            /* we can expect that the only valid reason for
-               "obj" not being unlinked is that it was not in
-               the tree. other reasons would be that "obj" was
-               corrupt, but in any event, it's not in the tree */
-            if ( ! BSTreeUnlink ( & self -> open_objs, & obj -> n ) )
-
-                /* to be truly weird, we could tell what kind of node
-                   it was that we didn't find */
-                rc = RC ( rcDB, rcMgr, rcRemoving, rcNode, rcNotFound );
-
-            KRWLockUnlock ( self -> open_objs_lock );
-        }
-    }
-
-    return rc;
-}
-
-
-/* ModDate
- *  return a modification timestamp for table
- */
-LIB_EXPORT rc_t CC KDBManagerVGetTableModDate ( const KDBManager *self,
-    KTime_t *mtime, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( mtime == NULL )
-        rc = RC ( rcDB, rcMgr, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self != NULL )
-            return KDBVGetPathModDate ( self -> wd, mtime, path, args );
-
-        rc = RC ( rcDB, rcMgr, rcAccessing, rcSelf, rcNull );
-        * mtime = 0;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerGetTableModDate ( const KDBManager *self,
-    KTime_t *mtime, const char *path, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, path );
-    rc = KDBManagerVGetTableModDate ( self, mtime, path, args );
-    va_end ( args );
-
-    return rc;
-}
diff --git a/libs/kdb/dbmgr-priv.h b/libs/kdb/dbmgr-priv.h
deleted file mode 100644
index 37c526b..0000000
--- a/libs/kdb/dbmgr-priv.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_dbmgr_priv_
-#define _h_dbmgr_priv_
-
-#ifndef _h_kdb_manager_
-#include <kdb/manager.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifndef KONST
-#define KONST
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KRWLock;
-struct KSymbol;
-struct KDirectory;
-struct VFSManager;
-
-/*--------------------------------------------------------------------------
- * KDBManager
- *  handle to library
- */
-struct KDBManager
-{
-    /* root directory */
-    struct KDirectory KONST *wd;
-
-    /* open objects */
-    struct KRWLock *open_objs_lock;
-    BSTree open_objs;
-
-    /* open references */
-    KRefcount refcount;
-
-    /* other managers needed by the KDB manager */
-    struct VFSManager * vfsmgr;
-};
-
-
-/* Make - PRIVATE
- */
-rc_t KDBManagerMake ( KDBManager **mgrp, struct KDirectory const *wd,
-    const char *op, struct VFSManager *vmanager );
-
-/* Attach
- * Sever
- */
-#if 1
-KDBManager *KDBManagerAttach ( const KDBManager *self );
-rc_t KDBManagerSever ( const KDBManager *self );
-#else
-KDBManager *KDBManagerAttach ( const KDBManager *self, struct KSymbol *sym );
-rc_t KDBManagerSever ( const KDBManager *self, struct KSymbol *sym );
-#endif
-
-/* CheckOpen
- *  tests if object is open and returns an error code
- *  of 0 if not, or <target>, rcBusy if so, where
- *  <target> is generated from object type.
- */
-rc_t KDBManagerCheckOpen ( const KDBManager *self, const char *path );
-
-/* OpenObjectBusy
- *   Does this path reference an object already open?
- */
-bool KDBManagerOpenObjectBusy ( const KDBManager *self, const char *path );
-
-/* OpenObjectFind
- *   return a reference to an object with this "symbol" - path
- */
-struct KSymbol *KDBManagerOpenObjectFind ( const KDBManager *self, const char *path );
-
-/* OpenObjectAdd
- *   Put this symbol in the list of open objects
- */
-rc_t KDBManagerOpenObjectAdd ( KDBManager *self, struct KSymbol *obj );
-
-/* OpenObjectDelete
- *   remove this symbol in the list of open objects
- */
-rc_t KDBManagerOpenObjectDelete ( KDBManager *self, struct KSymbol *obj );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_dbmgr_priv_ */
diff --git a/libs/kdb/dbmgr.c b/libs/kdb/dbmgr.c
deleted file mode 100644
index 2e8b546..0000000
--- a/libs/kdb/dbmgr.c
+++ /dev/null
@@ -1,420 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define TRACK_REFERENCES 0
-
-#include <kdb/extern.h>
-
-#include <kdb/kdb-priv.h> /* KDBManagerMakeReadWithVFSManager */
-
-#include "libkdb.vers.h"
-
-#include <vfs/manager.h>
-#include <vfs/resolver.h>
-#include <vfs/path.h>
-#include <vfs/path-priv.h>
-#include <kfs/directory.h>
-
-#define KONST const
-#include "dbmgr-priv.h"
-#include "kdb-priv.h"
-#include "kdbfmt-priv.h"
-#include <klib/checksum.h>
-#include <klib/rc.h>
-#undef KONST
-
-#include <klib/text.h>
-
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <assert.h>
-
-
-
-/*--------------------------------------------------------------------------
- * KDBManager
- *  handle to library
- */
-
-
-/* MakeRead
- * MakeReadWithVFSManager
- *  create library handle for specific use
- *  NB - only one of the functions will be implemented
- *
- *  "wd" [ IN, NULL OKAY ] - optional working directory for
- *  accessing the file system. mgr will attach its own reference.
- */
-LIB_EXPORT rc_t CC KDBManagerMakeRead ( const KDBManager **mgrp, const KDirectory *wd )
-{
-    return KDBManagerMakeReadWithVFSManager(mgrp, wd, NULL);
-}
-
-LIB_EXPORT rc_t CC KDBManagerMakeReadWithVFSManager ( const KDBManager **mgrp,
-    const KDirectory *wd, struct VFSManager *vmanager )
-{
-    return KDBManagerMake ( ( KDBManager** ) mgrp, wd, "make-read", vmanager );
-}
-
-/*
- * Resolve using manager, possibly against this directory, using or not uri
- * accession resolution of those dangerous formatted path thingies
- *
-
-
-
- * 1. If naked accession or uri accession resolve to local, 
-
-
- * self                         = a kdbmanager
- * disable_accession_resolution = turn off VResolver usage for accessions
- *                                read versus create/upate 
- * resolved+path                = a vpath created based on text path
- * fmt                          = our scary interface that is 'sprintf'ish
- * args                         = goes with the fmt
- *
- * NOTE: as usual a path with a '%' becomes broken at unsuspected times
- */
-rc_t KDBManagerResolveVPathInt (const KDBManager * self, 
-                                bool disable_accession_resolution,
-                                VPath ** resolved_path, 
-                                const VPath * path)
-{
-    uint32_t flags;
-
-    assert (self != NULL);
-    assert (resolved_path != NULL);
-    assert (path != NULL);
-
-    flags = disable_accession_resolution
-        ? vfsmgr_rflag_no_acc
-        : vfsmgr_rflag_kdb_acc;
-
-    return VFSManagerResolvePath (self->vfsmgr, 
-                                  flags,
-                                  path, resolved_path);
-}
-
-
-rc_t KDBManagerVResolveVPath (const KDBManager * self, 
-                                bool disable_accession_resolution,
-                                VPath ** resolved_path, 
-                                const VPath * path)
-{
-    return KDBManagerResolveVPathInt (self, disable_accession_resolution,
-                                      resolved_path, path);
-}
-
-
-rc_t KDBManagerVResolvePath (const KDBManager * self, 
-                             bool disable_accession_resolution,
-                             VPath ** resolved_path, 
-                             const char * fmt, va_list args)
-{
-    VPath * p;
-    rc_t rc;
-
-    if (resolved_path == NULL)
-        return RC (rcDB, rcMgr, rcResolving, rcParam, rcNull);
-
-    *resolved_path = NULL;
-
-    if (self == NULL)
-        return RC (rcDB, rcMgr, rcResolving, rcSelf, rcNull);
-
-    if ((fmt == NULL) || (fmt[0] == '\0'))
-        return RC (rcDB, rcMgr, rcResolving, rcParam, rcNull);
-
-    rc = VFSManagerVMakePath ( self -> vfsmgr, &p, fmt, args);
-    if (rc == 0)
-    {
-        rc = KDBManagerVResolveVPath (self, disable_accession_resolution,
-                                      resolved_path, p);
-        VPathRelease (p);
-    }
-    return rc;
-}
-
-rc_t KDBManagerVResolvePathRelativeDir (const KDBManager * self, const KDirectory * dir,
-                                        bool disable_accession_resolution,
-                                        VPath ** resolved_path, 
-                                        const char * fmt, va_list args)
-{
-    VPath * p;
-    rc_t rc;
-
-    if (resolved_path == NULL)
-        return RC (rcDB, rcMgr, rcResolving, rcParam, rcNull);
-
-    *resolved_path = NULL;
-
-    if (self == NULL)
-        return RC (rcDB, rcMgr, rcResolving, rcSelf, rcNull);
-
-    if ((fmt == NULL) || (fmt[0] == '\0'))
-        return RC (rcDB, rcMgr, rcResolving, rcParam, rcNull);
-
-    rc = VFSManagerVMakePath ( self -> vfsmgr, &p, fmt, args);
-    if (rc == 0)
-    {
-        rc = KDBManagerVResolveVPath (self, disable_accession_resolution,
-                                      resolved_path, p);
-        VPathRelease (p);
-    }
-    return rc;
-}
-
-
-rc_t KDBManagerResolvePathRelativeDir (const KDBManager * self,
-                                       const KDirectory * dir,
-                                       bool disable_accession_resolution,
-                                       VPath ** resolved_path, const char * fmt, ...)
-{
-    va_list args;
-    rc_t rc;
-
-    va_start (args, fmt);
-
-    rc = KDBManagerVResolvePathRelativeDir (self, dir, 
-                                            disable_accession_resolution,
-                                            resolved_path, fmt, args);
-    va_end (args);
-    return rc;
-}
-
-
-
-/* KDBHdrValidate
- *  validates that a header sports a supported byte order
- *  and that the version is within range
- */
-rc_t KDBHdrValidate ( const KDBHdr *hdr, size_t size,
-    uint32_t min_vers, uint32_t max_vers )
-{
-    assert ( hdr != NULL );
-
-    if ( size < sizeof * hdr )
-        return RC ( rcDB, rcHeader, rcValidating, rcData, rcCorrupt );
-
-    if ( hdr -> endian != eByteOrderTag )
-    {
-        if ( hdr -> endian == eByteOrderReverse )
-            return RC ( rcDB, rcHeader, rcValidating, rcByteOrder, rcIncorrect );
-        return RC ( rcDB, rcHeader, rcValidating, rcData, rcCorrupt );
-    }
-
-    if ( hdr -> version < min_vers || hdr -> version > max_vers )
-        return RC ( rcDB, rcHeader, rcValidating, rcHeader, rcBadVersion );
-
-    return 0;
-}
-
-
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC KDBManagerVWritable ( const KDBManager *self, const char * path, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcDB, rcMgr, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        char dbpath [ 4096 ];
-
-        /* get full path to object */
-        rc = KDirectoryVResolvePath ( self -> wd, true, dbpath, sizeof dbpath, path, args );
-        if ( rc == 0 )
-        {
-            int type = KDBPathType ( self -> wd, NULL, path ) & ~ kptAlias;
-            switch ( type )
-            {
-            case kptDatabase:
-            case kptTable:
-            case kptColumn:
-            case kptIndex:
-                rc = KDBWritable ( self -> wd, path );
-                break;
-            case kptNotFound:
-                rc = RC ( rcDB, rcMgr, rcAccessing, rcPath, rcNotFound );
-                break;
-            case kptBadPath:
-                rc = RC ( rcDB, rcMgr, rcAccessing, rcPath, rcInvalid );
-                break;
-            default:
-                rc = RC ( rcDB, rcMgr, rcAccessing, rcPath, rcIncorrect );
-            }
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerWritable ( const KDBManager *self, const char * path, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, path );
-
-    rc = KDBManagerVWritable ( self, path, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* RunPeriodicTasks
- *  executes periodic tasks, such as cache flushing
- */
-LIB_EXPORT rc_t CC KDBManagerRunPeriodicTasks ( const KDBManager *self )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcExecuting, rcSelf, rcNull );
-
-    return 0;
-}
-
-
-/* PathType
- *  check the path type of an object/directory path.
- *  this is an extension of the KDirectoryPathType and will return
- *  the KDirectory values if a path type is not specifically a
- *  kdb object
- */
-LIB_EXPORT int CC KDBManagerPathTypeVP ( const KDBManager * self, const VPath * path )
-{
-    VPath * rpath;
-    int path_type;
-    rc_t rc;
-
-    path_type = kptBadPath;
-    if ((self != NULL) && (path != NULL))
-    {
-        /*
-         * resolve the possible relative path or accession into
-         * a final path we can open directly
-         */
-        rc = KDBManagerResolveVPathInt (self, false, &rpath, path);
-        if (rc == 0)
-        {
-            const KDirectory * dir;
-
-            /*
-             * Most KDBPathType values are based on 'directories'
-             * so try to open the resolved path as a directory
-             */
-            rc = VFSManagerOpenDirectoryReadDecrypt (self->vfsmgr, &dir, rpath);
-            if (rc == 0)
-            {
-                path_type = KDBPathTypeDir (dir, kptDir, NULL, ".");
-                KDirectoryRelease (dir);
-            }
-            /*
-             * If we couldn't open the path as a directory we 'might'
-             * have a KDB idx but we will only try that for a limited
-             * set of uri schemes.
-             */
-            else
-            {
-#if 1
-                if ( VPathIsFSCompatible ( rpath ) )
-                {
-                    char buffer [ 4096 ];
-                    rc = VPathReadPath ( rpath, buffer, sizeof buffer, NULL );
-                    if ( rc == 0 )
-                        path_type = KDBPathType ( self -> wd, false, buffer );
-                }
-#else
-                VPUri_t t;
-
-                rc = VPathGetScheme_t (rpath, &t);
-                if (rc == 0)
-                {
-                    switch (t)
-                    {
-                    default:
-                        break;
-                    case vpuri_ncbi_vfs:
-                    case vpuri_file:
-                    case vpuri_none:
-                    {
-                        char b [4 * 1024];
-                        size_t z;
-                        rc = VPathReadPath (path, b, sizeof b, &z);
-                        if (rc == 0)
-                            path_type = KDBPathType (self->wd, false, b);
-                        break;
-                    }}
-                }
-#endif
-            }
-            VPathRelease (rpath);
-        }
-    }
-    return path_type;
-}
-
-
-LIB_EXPORT int CC KDBManagerVPathType ( const KDBManager * self, const char *path, va_list args )
-{
-    int path_type = kptBadPath;
-
-    if ((self != NULL) && (path != NULL))
-    {
-        VPath * vp;
-        rc_t rc;
-
-        rc = VFSManagerVMakePath ( self -> vfsmgr, &vp, path, args);
-        if (rc == 0)
-        {
-            path_type = KDBManagerPathTypeVP (self, vp);
-            VPathRelease (vp);
-        }
-    }
-    return path_type;
-}
-
-
-LIB_EXPORT int CC KDBManagerPathType ( const KDBManager * self, const char *path, ... )
-{
-    int res;
-    va_list args;
-
-    va_start ( args, path );
-
-    res = KDBManagerVPathType ( self, path, args );
-
-    va_end (args);
-    return res;
-}
diff --git a/libs/kdb/idstats-priv.h b/libs/kdb/idstats-priv.h
deleted file mode 100644
index cae6809..0000000
--- a/libs/kdb/idstats-priv.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_idstats_priv_
-#define _h_idstats_priv_
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KIdStats
- *  maintains statistics about id mappings
- */
-typedef struct KIdStats KIdStats;
-struct KIdStats
-{
-    int64_t i_min_id, x_max_id;
-    uint64_t num_entries;
-    uint64_t num_ids;
-    uint64_t num_holes;
-    BSTree ids;
-};
-
-
-/* Init
- *  initialize the object
- */
-void KIdStatsInit ( KIdStats *s );
-
-/* Whack
- *  tear down the object
- */
-void KIdStatsWhack ( KIdStats *self );
-
-/* Insert
- *  add an entry representing 1 or more consecutive ids
- */
-rc_t KIdStatsInsert ( KIdStats *self, int64_t id, uint64_t count );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_idstats_priv_ */
diff --git a/libs/kdb/idstats.c b/libs/kdb/idstats.c
deleted file mode 100644
index e41b10d..0000000
--- a/libs/kdb/idstats.c
+++ /dev/null
@@ -1,269 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-
-#include "idstats-priv.h"
-
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * KIdStatsNode
- */
-typedef struct KIdStatsNode KIdStatsNode;
-struct KIdStatsNode
-{
-    BSTNode n;
-    int64_t i_left, x_right;
-};
-
-
-/* Init
- */
-static
-void KIdStatsNodeInit ( KIdStatsNode *node, int64_t id, uint64_t count )
-{
-    if ( node != NULL )
-    {
-        node -> i_left = id;
-        node -> x_right = id + count;
-    }
-}
-
-
-/* Make
- */
-static
-KIdStatsNode *KIdStatsNodeMake ( int64_t id, uint64_t count )
-{
-    KIdStatsNode *node = malloc ( sizeof * node );
-    KIdStatsNodeInit ( node, id, count );
-    return node;
-}
-
-/* Whack
- */
-static
-void CC KIdStatsNodeWhack ( BSTNode *n, void *ignore )
-{
-    free ( n );
-}
-
-/* Cmp
- * Sort
- */
-static
-int64_t CC KIdStatsNodeCmp ( const void *item, const BSTNode *n )
-{
-    const KIdStatsNode *a = item;
-    const KIdStatsNode *b = ( const KIdStatsNode* ) n;
-
-    if ( a -> x_right < b -> i_left )
-        return -1;
-    if ( a -> i_left > b -> x_right )
-        return 1;
-    return 0;
-}
-
-static
-int64_t CC KIdStatsNodeSort ( const BSTNode *item, const BSTNode *n )
-{
-    const KIdStatsNode *a = ( const KIdStatsNode* ) item;
-    const KIdStatsNode *b = ( const KIdStatsNode* ) n;
-
-    if ( a -> x_right < b -> i_left )
-        return -1;
-    if ( a -> i_left > b -> x_right )
-        return 1;
-    return 0;
-}
-
-/*--------------------------------------------------------------------------
- * KIdStats
- *  maintains statistics about text index mappings
- */
-
-/* Init
- *  initialize the object
- */
-void KIdStatsInit ( KIdStats *s )
-{
-    if ( s != NULL )
-        memset ( s, 0, sizeof * s );
-}
-
-/* Whack
- *  tear down the object
- */
-void KIdStatsWhack ( KIdStats *self )
-{
-    if ( self != NULL )
-    {
-        BSTreeWhack ( & self -> ids, KIdStatsNodeWhack, NULL );
-        BSTreeInit ( & self -> ids );
-    }
-}
-
-/* Insert
- *  add an entry representing 1 or more consecutive ids
- */
-rc_t KIdStatsInsert ( KIdStats *self, int64_t id, uint64_t count )
-{
-    rc_t rc;
-    KIdStatsNode *node, *existing;
-
-    /* could be an assert - but here we go */
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcValidating, rcParam, rcNull );
-
-    /* if this is not the first entry */
-    if ( self -> num_entries != 0 )
-    {
-        KIdStatsNode item;
-        KIdStatsNodeInit ( & item, id, count );
-        existing = ( KIdStatsNode* ) BSTreeFind ( & self -> ids, & item, KIdStatsNodeCmp );
-        if ( existing != NULL )
-        {
-            /* min/max the range */
-            if ( id < self -> i_min_id )
-                self -> i_min_id = id;
-            if ( ( int64_t ) ( id + count ) > self -> x_max_id )
-                self -> x_max_id = id + count;
-            ++ self -> num_entries;
-
-            /* merge this insert with the returned node */
-            if ( existing -> i_left > item . i_left )
-            {
-                self -> num_ids += existing -> i_left - item . i_left;
-                existing -> i_left = item . i_left;
-
-                /* merge node toward left */
-                for ( node = ( KIdStatsNode* ) BSTNodePrev ( & existing -> n );
-                      node != NULL;
-                      node = ( KIdStatsNode* ) BSTNodePrev ( & existing -> n ) )
-                {
-                    /* exit loop if no intersection */
-                    if ( existing -> i_left > node -> x_right )
-                        break;
-
-                    /* a hole will be closed */
-                    assert ( self -> num_holes > 0 );
-                    -- self -> num_holes;
-
-                    /* remove overlaps from count and extend "existing" */
-                    if ( existing -> i_left <= node -> i_left )
-                        self -> num_ids -= node -> x_right - node -> i_left;
-                    else
-                    {
-                        self -> num_ids -= node -> x_right - existing -> i_left;
-                        existing -> i_left = node -> i_left;
-                    }
-
-                    /* drop old node */
-                    BSTreeUnlink ( & self -> ids, & node -> n );
-                    KIdStatsNodeWhack ( & node -> n, NULL );
-                }
-            }
-
-            /* now merge right edge */
-            if ( item . x_right > existing -> x_right )
-            {
-                self -> num_ids += item . x_right - existing -> x_right;
-                existing -> x_right = item . x_right;
-
-                /* merge node toward right */
-                for ( node = ( KIdStatsNode* ) BSTNodeNext ( & existing -> n );
-                      node != NULL;
-                      node = ( KIdStatsNode* ) BSTNodeNext ( & existing -> n ) )
-                {
-                    /* exit loop if no intersection */
-                    if ( existing -> x_right < node -> i_left )
-                        break;
-
-                    /* a hole will be closed */
-                    assert ( self -> num_holes > 0 );
-                    -- self -> num_holes;
-
-                    /* remove overlaps from count and extend "existing" */
-                    if ( existing -> x_right >= node -> x_right )
-                        self -> num_ids -= node -> x_right - node -> i_left;
-                    else
-                    {
-                        self -> num_ids -= existing -> x_right - node -> i_left;
-                        existing -> x_right = node -> x_right;
-                    }
-
-                    /* drop old node */
-                    BSTreeUnlink ( & self -> ids, & node -> n );
-                    KIdStatsNodeWhack ( & node -> n, NULL );
-                }
-            }
-
-            return 0;
-        }
-    }
-
-    /* create the node */
-    node = KIdStatsNodeMake ( id, count );
-    if ( node == NULL )
-        return RC ( rcDB, rcIndex, rcValidating, rcMemory, rcExhausted );
-
-    /* insert it and be certain there are no collisions */
-    rc = BSTreeInsertUnique ( & self -> ids, & node -> n,
-        ( BSTNode** ) & existing, KIdStatsNodeSort );
-
-    if ( rc != 0 )
-        KIdStatsNodeWhack ( & node -> n, NULL );
-    else if ( self -> num_entries == 0 )
-    {
-        /* initial insert */
-        self -> i_min_id = id;
-        self -> x_max_id = id + count;
-        self -> num_entries = 1;
-        self -> num_ids = count;
-    }
-    else
-    {
-        /* min/max the range */
-        if ( id < self -> i_min_id )
-            self -> i_min_id = id;
-        if ( ( int64_t ) ( id + count ) > self -> x_max_id )
-            self -> x_max_id = id + count;
-        ++ self -> num_entries;
-        self -> num_ids += count;
-
-        /* the insert represents a hole */
-        ++ self -> num_holes;
-    }
-
-    return rc;
-}
diff --git a/libs/kdb/idxblk-priv.h b/libs/kdb/idxblk-priv.h
deleted file mode 100644
index 71fc191..0000000
--- a/libs/kdb/idxblk-priv.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_idxblk_priv_
-#define _h_idxblk_priv_
-
-#ifndef _h_colfmt_priv_
-#include "colfmt-priv.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KColConstBlockMap
- *  maps an index or page section of block index
- */
-typedef struct KColConstBlockMap KColConstBlockMap;
-struct KColConstBlockMap
-{
-    /* types 1-3 have a header section */
-    union
-    {
-        /* for assignment and manipulation */
-        const void *p;
-        const char *c;
-
-        /* type 1 has a constant range/size */
-        const uint32_t *span;
-
-        /* type 2 has a predictable id/pos */
-        const uint64_t *first;
-
-        /* type 3 has a starting page and constant size */
-        const struct
-        {
-            uint64_t pg;
-            uint32_t sz;
-        } *pred;
-
-        /* for rewriting columns */
-        uint32_t *last;
-
-    } h;
-
-    /* types 0 and 1 have explicit id/pos, where id is ordered */
-    const uint64_t *d;
-
-    /* types 0 and 2 have explicit range/size */
-    const uint32_t *s;
-};
-
-
-/*--------------------------------------------------------------------------
- * KColIdxBlock
- *  level 2 index reading block
- *
- *  each index block has two sections
- */
-typedef struct KColIdxBlock KColIdxBlock;
-struct KColIdxBlock
-{
-    /* function for locating index */
-    int ( * find ) ( const KColIdxBlock *self,
-        const KColBlockLoc *bloc, uint32_t count,
-        int64_t id, int64_t *first, uint32_t *span );
-
-    /* function for locating blob */
-    void ( * get ) ( const KColIdxBlock *self,
-        const KColBlockLoc *bloc, uint32_t count,
-        uint32_t idx, uint64_t *pos, uint32_t *sz );
-
-    /* index section map */
-    KColConstBlockMap id;
-
-    /* page locator section map */
-    KColConstBlockMap pg;
-};
-
-/* Init
- */
-rc_t KColIdxBlockInit ( KColIdxBlock *self,
-    const KColBlockLoc *bloc, size_t orig,
-    const void *block, size_t block_size, bool bswap );
-
-/* Find
- *  find zero-based index of entry into block
- *  that satisfies request
- *  returns -1 if not found
- */
-int KColIdxBlockFind ( const KColIdxBlock *self,
-    const KColBlockLoc *bloc, uint32_t count,
-    int64_t id, int64_t *first, uint32_t *span );
-#define KColIdxBlockFind( self, bloc, count, id, first, span ) \
-    ( * ( self ) -> find ) ( self, bloc, count, id, first, span )
-
-/* Get
- *  get blob location information
- */
-void KColIdxBlockGet ( const KColIdxBlock *self,
-    const KColBlockLoc *bloc, uint32_t count,
-    uint32_t idx, uint64_t *pg, uint32_t *sz );
-#define KColIdxBlockGet( self, bloc, count, idx, pg, sz ) \
-    ( * ( self ) -> get ) ( self, bloc, count, idx, pg, sz )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_idxblk_priv_ */
diff --git a/libs/kdb/idxblk.c b/libs/kdb/idxblk.c
deleted file mode 100644
index e5c14cf..0000000
--- a/libs/kdb/idxblk.c
+++ /dev/null
@@ -1,695 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "idxblk-priv.h"
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <byteswap.h>
-
-
-/*--------------------------------------------------------------------------
- * KColConstBlockMap
- *  maps an index or page section of block index
- */
-static
-void KColConstBlockMapSwap ( KColConstBlockMap *self, uint32_t count, int type )
-{
-    uint32_t i;
-
-    switch ( type )
-    {
-    case btypeUniform:
-        ( ( uint32_t* ) self -> h . span ) [ 0 ] = bswap_32 ( self -> h . span [ 0 ] );
-        break;
-    case btypeMagnitude:
-        ( ( uint64_t* ) self -> h . first ) [ 0 ] = bswap_64 ( self -> h . first [ 0 ] );
-        break;
-    case btypePredictable:
-        * ( uint64_t* ) & ( self -> h . pred -> pg ) = bswap_64 ( self -> h . pred -> pg );
-        * ( uint32_t* ) & ( self -> h . pred -> sz ) = bswap_32 ( self -> h . pred -> sz );
-        break;
-    }
-
-    switch ( type )
-    {
-    case btypeRandom:
-    case btypeUniform:
-        for ( i = 0; i < count; ++ i )
-            ( ( uint64_t* ) self -> d ) [ i ] = bswap_64 ( self -> d [ i ] );
-        break;
-    }
-
-    switch ( type )
-    {
-    case btypeRandom:
-    case btypeMagnitude:
-        for ( i = 0; i < count; ++ i )
-            ( ( uint32_t* ) self -> s ) [ i ] = bswap_32 ( self -> s [ i ] );
-        break;
-    }
-}
-
-
-/*--------------------------------------------------------------------------
- * KColIdxBlock
- *  level 2 index reading block
- *
- *  each index block has two sections
- */
-
-/* Find
- */
-static
-int KColIdxBlockFind0 ( const KColIdxBlock *self,
-    const KColBlockLoc *bloc, uint32_t count,
-    int64_t id, int64_t *first, uint32_t *span )
-{
-    unsigned int left = 0;
-    unsigned int right = count;
-
-    do
-    {
-        unsigned int i = ( left + right ) >> 1;
-        int64_t start_id = ( int64_t ) self -> id . d [ i ];
-        if ( start_id == id )
-        {
-            * first = start_id;
-            * span = self -> id . s [ i ];
-            return ( int ) i;
-        }
-        if ( start_id > id )
-            right = i;
-        else
-        {
-            if ( start_id + self -> id . s [ i ] > id )
-            {
-                * span = self -> id . s [ i ];
-                * first = start_id;
-                return ( int ) i;
-            }
-
-            left = i + 1;
-        }
-    }
-    while ( left < right );
-
-    return -1;
-}
-
-static
-int KColIdxBlockFind1 ( const KColIdxBlock *self,
-    const KColBlockLoc *bloc, uint32_t count,
-    int64_t id, int64_t *first, uint32_t *span )
-{
-    unsigned int left = 0;
-    unsigned int right = count;
-    unsigned int range = self -> id . h . span [ 0 ];
-
-    do
-    {
-        unsigned int i = ( left + right ) >> 1;
-        int64_t start_id = ( int64_t ) self -> id . d [ i ];
-        if ( start_id == id )
-        {
-            * first = start_id;
-            * span = range;
-            return ( int ) i;
-        }
-        if ( start_id > id )
-            right = i;
-        else
-        {
-            if ( start_id + range > id )
-            {
-                * first = start_id;
-                * span = range;
-                return ( int ) i;
-            }
-
-            left = i + 1;
-        }
-    }
-    while ( left < right );
-
-    return -1;
-}
-
-static
-int KColIdxBlockFind2 ( const KColIdxBlock *self,
-    const KColBlockLoc *bloc, uint32_t count,
-    int64_t id, int64_t *first, uint32_t *span )
-{
-    /* special case for in-core image
-       the length of an entry is determined
-       by looking at the start of next entry
-       with the last entry having its length
-       stored in header */
-
-    unsigned int left, right;
-
-    /* examine last entry first, since it's the special case */
-    int64_t start_id = ( int64_t ) self -> id . d [ count - 1 ];
-    if ( start_id <= id )
-    {
-        if ( start_id == id ||
-             start_id + self -> id . h . span [ 0 ] > id )
-        {
-            * span = self -> id . h . span [ 0 ];
-            * first = start_id;
-            return ( int ) ( count - 1 );
-        }
-        return -1;
-    }
-
-    /* now perform normal binary search */
-    left = 0;
-    right = count - 1;
-    while ( left < right )
-    {
-        unsigned int i = ( left + right ) >> 1;
-        start_id = ( int64_t ) self -> id . d [ i ];
-        if ( start_id == id )
-        {
-            * first = start_id;
-            * span = ( uint32_t ) ( self -> id . d [ i + 1 ] - ( uint64_t ) start_id );
-            return ( int ) i;
-        }
-        if ( start_id > id )
-            right = i;
-        else
-        {
-            if ( self -> id . d [ i + 1 ] > (uint64_t)id )
-            {
-                * span = ( uint32_t ) ( self -> id . d [ i + 1 ] - ( uint64_t ) start_id );
-                * first = start_id;
-                return ( int ) i;
-            }
-
-            left = i + 1;
-        }
-    }
-
-    return -1;
-}
-
-static
-int KColIdxBlockFind3 ( const KColIdxBlock *self,
-    const KColBlockLoc *bloc, uint32_t count,
-    int64_t id, int64_t *first, uint32_t *span )
-{
-    int i;
-    unsigned int ids_per;
-
-    assert ( id >= bloc -> start_id );
-    assert ( id < bloc -> start_id + bloc -> id_range );
-    assert ( bloc -> id_range != 0 );
-
-    if ( bloc -> id_range == ( uint32_t ) count )
-    {
-        * first = id;
-        * span = 1;
-        return ( int ) ( id - bloc -> start_id );
-    }
-
-    assert ( count != 0 );
-    ids_per = bloc -> id_range / count;
-    assert ( ids_per * count == bloc -> id_range );
-
-    i = ( int ) ( ( id - bloc -> start_id ) / ids_per );
-    * first = bloc -> start_id + ( i * ids_per );
-    * span = ids_per;
-    return i;
-}
-
-static
-void KColIdxBlockGet0 ( const KColIdxBlock *self,
-    const KColBlockLoc *bloc, uint32_t count,
-    unsigned int idx, uint64_t *pg, uint32_t *sz )
-{
-    * pg = self -> pg . d [ idx ];
-    * sz = self -> pg . s [ idx ];
-}
-
-static
-void KColIdxBlockGet1 ( const KColIdxBlock *self,
-    const KColBlockLoc *bloc, uint32_t count,
-    unsigned int idx, uint64_t *pg, uint32_t *sz )
-{
-    * pg = self -> pg . d [ idx ];
-    * sz = self -> pg . h . span [ 0 ];
-}
-
-static
-void KColIdxBlockGet2 ( const KColIdxBlock *self,
-    const KColBlockLoc *bloc, uint32_t count,
-    unsigned int idx, uint64_t *pg, uint32_t *sz )
-{
-    if ( idx + 1 == count )
-    {
-        * pg = self -> pg . d [ idx ];
-        * sz = self -> pg . h . span [ 0 ];
-    }
-    else
-    {
-        * pg = self -> pg . d [ idx ];
-        * sz = ( uint32_t )
-            ( self -> pg . d [ idx + 1 ] - self -> pg . d [ idx ] );
-    }
-}
-
-static
-void KColIdxBlockGet3 ( const KColIdxBlock *self,
-    const KColBlockLoc *bloc, uint32_t count,
-    unsigned int idx, uint64_t *pg, uint32_t *sz )
-{
-    * sz = self -> pg . h . pred [ 0 ] . sz;
-    * pg = self -> pg . h . pred [ 0 ] . pg +
-        ( (uint64_t) self -> pg . h . pred [ 0 ] . sz * idx );
-}
-
-/* RewriteColumns
- *  convert btypeMagnitude columns to id/pg
- *  for best in-core representation
- */
-static
-void KColIdxBlockRewriteColumns ( KColIdxBlock *self, size_t size,
-    char *block, size_t block_size, int count,
-    int id_ssz, int id_adj, int pg_ssz, int pg_adj )
-{
-    int i;
-    uint64_t *d;
-    uint32_t last;
-
-    /* the blob size array is last */
-    if ( pg_adj != 0 )
-    {
-        assert ( pg_ssz != 0 );
-
-        d = ( uint64_t* ) ( block + size - pg_ssz - pg_adj );
-
-        /* save the last entry in size array */
-        last = self -> pg . s [ count - 1 ];
-
-        /* transfer sizes, shifted down by 1 slot */
-        for ( i = count; -- i > 0; )
-            d [ i ] = self -> pg . s [ i - 1 ];
-
-        /* set slot zero to be first pg */
-        d [ 0 ] = self -> pg . h . first [ 0 ];
-
-        /* integrate sizes */
-        for ( i = 1; i < count; ++ i )
-            d [ i ] += d [ i - 1 ];
-
-        /* store last size in header */
-        self -> pg . h . last [ 0 ] = last;
-
-        /* update columns */
-        self -> pg . d = d;
-        self -> pg . s = ( const uint32_t* ) d;
-
-        /* now convert to id/pg values */
-    }
-    else if ( pg_ssz != 0 )
-    {
-        /* pg size array trails column needing expansion */
-        uint32_t *s = ( uint32_t* ) ( block + size - pg_ssz );
-        for ( i = count; -- i >= 0; )
-            s [ i ] = self -> pg . s [ i ];
-        
-        self -> pg . d = ( const uint64_t* ) s;
-        self -> pg . s = s;
-    }
-
-    /* the index range array is either last
-       or next to last before size array
-       which, if there, was already moved */
-    if ( id_adj != 0 )
-    {
-        assert ( id_ssz != 0 );
-
-        d = ( uint64_t* ) ( block + size - pg_ssz - pg_adj - id_ssz - id_adj );
-
-        /* save last as above */
-        last = self -> id . s [ count - 1 ];
-
-        /* transfer shifted */
-        for ( i = count; -- i > 0; )
-            d [ i ] = self -> id . s [ i - 1 ];
-
-        /* set slot zero to first id */
-        d [ 0 ] = self -> id . h . first [ 0 ];
-
-        /* integrate spans */
-        for ( i = 1; i < count; ++ i )
-            d [ i ] += d [ i - 1 ];
-
-        /* store last span in header */
-        self -> id . h . last [ 0 ] = last;
-
-        /* update columns */
-        self -> id . d = d;
-        self -> id . s = ( const uint32_t* ) d;
-    }
-}
-
-/* Init
- */
-rc_t KColIdxBlockInit ( KColIdxBlock *self,
-    const KColBlockLoc *bloc, size_t orig,
-    const void *block, size_t block_size, bool bswap )
-{
-    int id_hsz, id_dsz, id_ssz, id_adj = 0;
-    int pg_hsz, pg_dsz, pg_ssz, pg_adj = 0;
-
-    int count = ( int ) orig;
-
-    switch ( bloc -> u . blk . id_type )
-    {
-    case btypeRandom:
-        self -> find = KColIdxBlockFind0;
-        id_hsz = 0;
-        id_dsz = 8;
-        id_ssz = 4;
-        break;
-    case btypeUniform:
-        self -> find = KColIdxBlockFind1;
-        id_hsz = 4;
-        id_dsz = 8;
-        id_ssz = 0;
-        break;
-    case btypeMagnitude:
-        self -> find = KColIdxBlockFind2;
-        id_hsz = 8;
-        id_dsz = 0;
-        id_ssz = 4;
-        id_adj = 4;
-        break;
-    case btypePredictable:
-    default: /* to quiet unused variable warnings */
-        self -> find = KColIdxBlockFind3;
-        id_hsz = 0;
-        id_dsz = 0;
-        id_ssz = 0;
-        break;
-    }
-
-    switch ( bloc -> u . blk . pg_type )
-    {
-    case btypeRandom:
-        self -> get = KColIdxBlockGet0;
-        pg_hsz = 0;
-        pg_dsz = 8;
-        pg_ssz = 4;
-
-        count -= id_hsz;
-        count /= id_dsz + id_ssz + 12;
-        break;
-
-    case btypeUniform:
-        self -> get = KColIdxBlockGet1;
-        pg_hsz = 4;
-        pg_dsz = 8;
-        pg_ssz = 0;
-
-        count -= id_hsz + 4;
-        count /= id_dsz + id_ssz + 8;
-        break;
-
-    case btypeMagnitude:
-        self -> get = KColIdxBlockGet2;
-        pg_hsz = 8;
-        pg_dsz = 0;
-        pg_ssz = 4;
-        pg_adj = 4;
-
-        count -= id_hsz + 8;
-        count /= id_dsz + id_ssz + 4;
-        break;
-
-    case btypePredictable:
-    default: /* to quiet unused variable warnings */
-        self -> get = KColIdxBlockGet3;
-        pg_hsz = 12;
-
-        if ( bloc -> u . blk . id_type == btypePredictable )
-        {
-            assert ( bloc -> u . blk . compressed == 0 );
-            count = ( int ) bloc -> u . blk . size;
-        }
-        else
-        {
-            assert ( id_dsz + id_ssz != 0 );
-
-            count -= id_hsz + pg_hsz;
-            count /= id_dsz + id_ssz;
-        }
-
-        pg_dsz = 0;
-        pg_ssz = 0;
-        break;
-    }
-
-    id_dsz *= count;
-    id_ssz *= count;
-    id_adj *= count;
-    pg_dsz *= count;
-    pg_ssz *= count;
-    pg_adj *= count;
-
-    /* TBD - check the optimized output on this...
-       some compilers aren't smart enough to recognize
-       that union members are not independent objects */
-    self -> id . h . p = block;
-    self -> pg . h . c = ( const char* ) block + id_hsz;
-/*  self -> pg . h . c = self -> id . h . c + id_hsz; */
-    self -> id . d = ( const uint64_t* )
-        ( self -> pg . h . c + pg_hsz );
-    self -> pg . d = ( const uint64_t* )
-        ( ( const char* ) self -> id . d + id_dsz );
-    self -> id . s = ( const uint32_t * )
-        ( ( const char* ) self -> pg . d + pg_dsz );
-    self -> pg . s = ( const uint32_t * )
-        ( ( const char* ) self -> id . s + id_ssz );
-
-    /* sanity check against block size */
-    if ( ( const char* ) block + orig != ( const char* ) self -> pg . s + pg_ssz )
-        return RC ( rcDB, rcIndex, rcReading, rcData, rcCorrupt );
-
-    /* byte-swap contents if needed */
-    if ( bswap )
-    {
-        KColConstBlockMapSwap ( & self -> id, count, bloc -> u . blk . id_type );
-        if ( self -> pg . h . p != self -> id . h . p )
-            KColConstBlockMapSwap ( & self -> pg, count, bloc -> u . blk . pg_type );
-    }
-
-    /* check for need to rewrite columns */
-    if ( id_adj + pg_adj != 0 )
-    {
-        size_t size = id_hsz + pg_hsz +
-            id_dsz + id_ssz + id_adj +
-            pg_dsz + pg_ssz + pg_adj;
-        
-        if ( size > block_size )
-            return RC ( rcDB, rcIndex, rcReading, rcBuffer, rcInsufficient );
-
-        assert ( id_adj == 0 || id_dsz == 0 );
-        assert ( pg_adj == 0 || pg_dsz == 0 );
-
-        KColIdxBlockRewriteColumns ( self, size,
-            ( char* ) block, block_size, count,
-            id_ssz, id_adj, pg_ssz, pg_adj );
-    }
-
-    return 0;
-}
-
-/* Find
- *  find zero-based index of entry into block
- *  that satisfies request
- *  returns -1 if not found
- */
-#ifndef KColIdxBlockFind
-LIB_EXPORT int CC KColIdxBlockFind ( const KColIdxBlock *self,
-    const KColBlockLoc *bloc, uint32_t count,
-    int64_t id, int64_t *first, uint32_t *span )
-{
-    ( * self -> find ) ( self, bloc, count, id, first, span );
-}
-#endif
-
-/* Get
- *  get blob location information
- */
-#ifndef KColIdxBlockGet
-LIB_EXPORT void CC KColIdxBlockGet ( const KColIdxBlock *self,
-    const KColBlockLoc *bloc, uint32_t count,
-    unsigned int idx, uint64_t *pg, uint32_t *sz )
-{
-    ( * self -> get ) ( self, bloc, count, idx, pg, sz );
-}
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KColBlockLoc
- */
-
-/* EntryCount
- *  returns the number of entries within a block
- *  uses the original size of the uncompressed block
- */
-uint32_t KColBlockLocEntryCount ( const KColBlockLoc *self, size_t *orig )
-{
-    uint32_t count;
-
-    /* when everything is predictable, the
-       block size is 12 while the entry count
-       is contained in self -> size */
-    if ( self -> u . blk . id_type == btypePredictable &&
-         self -> u . blk . pg_type == btypePredictable )
-    {
-        count = self -> u . blk . size;
-        * orig = 12;
-    }
-    else
-    {
-        int id_hsz, id_dsz, id_ssz;
-        int pg_hsz, pg_dsz, pg_ssz;
-
-        count = ( uint32_t ) * orig;
-
-        switch ( self -> u . blk . id_type )
-        {
-        case btypeRandom:
-            id_hsz = 0;
-            id_dsz = 8;
-            id_ssz = 4;
-            break;
-        case btypeUniform:
-            id_hsz = 4;
-            id_dsz = 8;
-            id_ssz = 0;
-            break;
-        case btypeMagnitude:
-            id_hsz = 8;
-            id_dsz = 0;
-            id_ssz = 4;
-            break;
-        case btypePredictable:
-        default: /* to quiet unused variable warnings */
-            id_hsz = 0;
-            id_dsz = 0;
-            id_ssz = 0;
-            break;
-        }
-
-        switch ( self -> u . blk . pg_type )
-        {
-        case btypeRandom:
-            pg_hsz = 0;
-            pg_dsz = 8;
-            pg_ssz = 4;
-            break;
-        case btypeUniform:
-            pg_hsz = 4;
-            pg_dsz = 8;
-            pg_ssz = 0;
-            break;
-        case btypeMagnitude:
-            pg_hsz = 8;
-            pg_dsz = 0;
-            pg_ssz = 4;
-            break;
-        case btypePredictable:
-        default: /* to quiet unused variable warnings */
-            pg_hsz = 12;
-            pg_dsz = 0;
-            pg_ssz = 0;
-            break;
-        }
-
-        assert ( id_dsz + id_ssz + pg_dsz + pg_ssz != 0 );
-
-        /* decompose size into number of entries */
-        count -= id_hsz + pg_hsz;
-        count /= id_dsz + id_ssz + pg_dsz + pg_ssz;
-    }
-
-    return count;
-}
-
-/* AllocSize
- *  returns a size for the block
- *  since a type 3 index ( range/size only ) is nice for storage
- *  but needs to be converted to id/pos for in-memory lookup
- */
-size_t KColBlockLocAllocSize ( const KColBlockLoc *self,
-    size_t orig, uint32_t count )
-{
-    size_t size;
-
-    /* when everything is predictable, the
-       pg information is stored within BlocLoc */
-    if ( self -> u . blk . id_type == btypePredictable &&
-         self -> u . blk . pg_type == btypePredictable )
-        size = 12;
-    else
-    {
-        /* there is something within the idx2 block */
-        size = 0;
-
-        /* if either index or page loc are magnitude only,
-           they'll need to be converted to id/pg when resident */
-        if ( self -> u . blk . id_type == btypeMagnitude )
-            size += 4;
-        if ( self -> u . blk . pg_type == btypeMagnitude )
-            size += 4;
-
-        /* if neither are magnitude only,
-           keep the original size */
-        if ( size == 0 )
-            size = orig;
-        else
-        {
-            /* otherwise, convert the single entry
-               size adjustment to whole block adjustment */
-            size *= count;
-
-            /* add this to the original size */
-            size += orig;
-        }
-    }
-
-    return size;
-}
diff --git a/libs/kdb/index-cmn.h b/libs/kdb/index-cmn.h
deleted file mode 100644
index ff2dc6f..0000000
--- a/libs/kdb/index-cmn.h
+++ /dev/null
@@ -1,286 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_index_cmn_
-#define _h_index_cmn_
-
-#ifndef _h_kdbfmt_priv_
-#include "kdbfmt-priv.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define KDBINDEXVERS 4
-#define V2FIND_RETURNS_SPAN 1
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KMMap;
-struct PTrie;
-struct BSTNode;
-struct PBSTNode;
-struct KIndex;
-
-
-
-/*--------------------------------------------------------------------------
- * KIndexFileHeader
- */
-
-/* v1, v2
- *  just normal simple kdb header
- */
-typedef struct KDBHdr KIndexFileHeader_v1, KIndexFileHeader_v2, KIndexFileHeader_v1_v2;
-
-/* v3, v4
- *  indicates type
- */
-typedef struct KIndexFileHeader_v3 KIndexFileHeader_v3, KIndexFileHeader_v4, KIndexFileHeader_v3_v4;
-struct KIndexFileHeader_v3
-{
-    KIndexFileHeader_v1_v2 h;
-    uint32_t index_type;
-    uint32_t reserved1;
-};
-
-
-/*--------------------------------------------------------------------------
- * V1
- *  version 1 of the trie index was hard-coded to enforce uniqueness of
- *  both the string, and a 32-bit id. furthermore, the id was unfortunately
- *  assumed to occupy a mostly contiguous space, such that the projection
- *  was always implemented as an array of ptrie node ids where the id was
- *  used to index the array.
- *
- *  the introduction of highly sparse ids led to deprecation of this
- *  implementation. see version 2 for further information.
- */
-
-
-/*--------------------------------------------------------------------------
- * KPTrieIndex_v1
- *  persisted keymap
- */
-typedef struct KPTrieIndex_v1 KPTrieIndex_v1;
-struct KPTrieIndex_v1
-{
-    struct KMMap const *mm;
-    struct PTrie *key2id;
-    const uint32_t *id2node;
-    uint32_t first;
-    uint32_t last;
-    bool byteswap;
-};
-
-/* initialize an index from file */
-rc_t KPTrieIndexInit_v1 ( KPTrieIndex_v1 *self, struct KMMap const *mm, bool byteswap );
-
-/* whackitywhack */
-void KPTrieIndexWhack_v1 ( KPTrieIndex_v1 *self );
-
-/* consistency check */
-rc_t KPTrieIndexCheckConsistency_v1 ( const KPTrieIndex_v1 *self,
-    int64_t *start_id, uint64_t *id_range, uint64_t *num_keys,
-    uint64_t *num_rows, uint64_t *num_holes,
-    struct KIndex const *outer, bool key2id, bool id2key );
-
-
-/*--------------------------------------------------------------------------
- * KTrieIndex_v1
- */
-typedef struct KTrieIndex_v1 KTrieIndex_v1;
-
-/* initialize an index from file - can be NULL */
-rc_t KTrieIndexOpen_v1 ( KTrieIndex_v1 *self, struct KMMap const *mm, bool byteswap );
-
-/* whack whack */
-void KTrieIndexWhack_v1 ( KTrieIndex_v1 *self );
-
-/* map key to id ( was Key2Id ) */
-rc_t KTrieIndexFind_v1 ( const KTrieIndex_v1 *self,
-    const char *key, uint32_t *id,
-    int ( CC * custom_cmp ) ( const void *item, struct PBSTNode const *n, void *data ),
-    void *data );
-
-/* projection index id to key-string ( was Id2Key ) */
-rc_t KTrieIndexProject_v1 ( const KTrieIndex_v1 *self,
-    uint32_t id, char *key_buff, size_t buff_size, size_t *actsize );
-
-/* consistency check */
-rc_t KTrieIndexCheckConsistency_v1 ( const KTrieIndex_v1 *self,
-    int64_t *start_id, uint64_t *id_range, uint64_t *num_keys,
-    uint64_t *num_rows, uint64_t *num_holes,
-    struct KIndex const *outer, bool key2id, bool id2key );
-
-
-/*--------------------------------------------------------------------------
- * V2
- *  version 2 of the trie index was introduced to handle sparse ids,
- *  and to recognize that ids may be 64 bits and/or negative.
- *
- *  v2 introduces strategy identifiers to handle various cases.
- *
- *  CONSTRAINTS
- *  - both key and id are unique ( version 1 )
- *  - key is not unique, but must map to a contiguous range of ids,
- *    while ids are unique ( the main use case for SRA )
- *
- *  INSERTION
- *  - ids are observed in increasing order
- *
- *  PROJECTION
- *  - id range is contiguous or nearly so ( can use single array )
- *  - id range is sparse
- *
- *  the implementation may be extended by adding new strategies,
- *  but the moment the implementation supports 1 to many mappings,
- *  inserted with ids in increasing order, and an unique constraint
- *  on the ids themselves.
- *
- *  the general case for v2 is "key -> id range", where "id range -> key"
- *  is via contiguous array if avg ( id range ) <= 2, and via sparse
- *  array otherwise.
- *
- *  for the key -> id mappings, this means that the in-core node
- *  either retains an id range ( when not using a projection index ),
- *  or it retains a start-id only, since its range can be determined
- *  from the projection index.
- *
- *  for id -> key mappings, the id is first converted to an ordinal, and
- *  the ordinal to a node. when ids are contiguous, id -> ordinal is simply
- *  derived by subtracting the initial start id. when sparse, an id -> ord
- *  array is used in a binary search to produce the ordinal.
- *
- *  ids are assumed to be 64 bit, stored as id - start id, and packed to
- *  a minimum number of bits to represent the id. ptrie node ids are still
- *  32-bit entities.
- */
-
-
-/*--------------------------------------------------------------------------
- * KPTrieIndex_v2
- *  persisted keymap
- */
-typedef struct KPTrieIndex_v2 KPTrieIndex_v2;
-struct KPTrieIndex_v2
-{
-    int64_t first, last, maxid;
-    struct KMMap const *mm;
-    struct PTrie *key2id;
-    const uint32_t *ord2node;
-    union
-    {
-        const uint8_t *v8;
-        const uint16_t *v16;
-        const uint32_t *v32;
-        const int64_t *v64;
-    } id2ord;
-    uint32_t count;
-    uint8_t variant;
-    uint8_t id_bits;
-    uint8_t span_bits;
-    uint8_t byteswap;
-};
-
-
-/* initialize an index from file */
-rc_t KPTrieIndexInit_v2 ( KPTrieIndex_v2 *self, struct KMMap const *mm, bool byteswap );
-rc_t KPTrieIndexInit_v3_v4 ( KPTrieIndex_v2 *self, struct KMMap const *mm, bool byteswap, bool ptorig );
-
-/* whackitywhack */
-void KPTrieIndexWhack_v2 ( KPTrieIndex_v2 *self );
-
-/* map a row id to ord */
-uint32_t KPTrieIndexID2Ord_v2 ( const KPTrieIndex_v2 *self, int64_t id );
-
-/* consistency check */
-rc_t KPTrieIndexCheckConsistency_v2 ( const KPTrieIndex_v2 *self,
-    int64_t *start_id, uint64_t *id_range, uint64_t *num_keys,
-    uint64_t *num_rows, uint64_t *num_holes,
-    struct KIndex const *outer, bool key2id, bool id2key, bool all_ids, bool convertFromV1 );
-
-
-/*--------------------------------------------------------------------------
- * KTrieIndex_v2
- */
-typedef struct KTrieIndex_v2 KTrieIndex_v2;
-
-/* initialize an index from file */
-rc_t KTrieIndexOpen_v2 ( KTrieIndex_v2 *self, struct KMMap const *mm, bool byteswap );
-
-/* whack whack */
-void KTrieIndexWhack_v2 ( KTrieIndex_v2 *self );
-
-/* map key to id range */
-rc_t KTrieIndexFind_v2 ( const KTrieIndex_v2 *self,
-    const char *key, int64_t *start_id,
-#if V2FIND_RETURNS_SPAN
-    uint32_t *span,
-#endif
-    int ( CC * custom_cmp ) ( const void *item, struct PBSTNode const *n, void *data ),
-    void * data,
-    bool convertFromV1);
-
-/* projection index id to key-string */
-#if V2FIND_RETURNS_SPAN
-rc_t KTrieIndexProject_v2 ( const KTrieIndex_v2 *self,
-    int64_t id, int64_t *start_id, uint32_t *span,
-    char *key_buff, size_t buff_size, size_t *actsize );
-#else
-rc_t KTrieIndexProject_v2 ( const KTrieIndex_v2 *self,
-    int64_t id, char *key_buff, size_t buff_size, size_t *actsize );
-#endif
-
-/* consistency check */
-rc_t KTrieIndexCheckConsistency_v2 ( const KTrieIndex_v2 *self,
-    int64_t *start_id, uint64_t *id_range, uint64_t *num_keys,
-    uint64_t *num_rows, uint64_t *num_holes,
-    struct KIndex const *outer, bool key2id, bool id2key, bool all_ids, bool convertFromV1 );
-
-
-/*--------------------------------------------------------------------------
- * KU64Index_v3
- */
-typedef struct KU64Index_v3 KU64Index_v3;
-
-rc_t KU64IndexOpen_v3 ( KU64Index_v3 *self, struct KMMap const *mm, bool byteswap );
-rc_t KU64IndexWhack_v3 ( KU64Index_v3 *self );
-
-rc_t KU64IndexFind_v3 ( const KU64Index_v3 *self, uint64_t offset,
-    uint64_t *key, uint64_t *key_size, int64_t *id, uint64_t *id_qty );
-
-rc_t KU64IndexFindAll_v3 ( const KU64Index_v3 *self, uint64_t offset, 
-    rc_t ( CC * f ) ( uint64_t key, uint64_t key_size, int64_t id, uint64_t id_qty, void* data ),
-    void* data );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_index_priv_ */
diff --git a/libs/kdb/index-priv.h b/libs/kdb/index-priv.h
deleted file mode 100644
index 41e2505..0000000
--- a/libs/kdb/index-priv.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_index_priv_
-#define _h_index_priv_
-
-#ifndef _h_index_cmn_
-#include "index-cmn.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KMMap;
-struct PBSTree;
-
-
-/*--------------------------------------------------------------------------
- * V1
- *  version 1 of the trie index was hard-coded to enforce uniqueness of
- *  both the string, and a 32-bit id. furthermore, the id was unfortunately
- *  assumed to occupy a mostly contiguous space, such that the projection
- *  was always implemented as an array of ptrie node ids where the id was
- *  used to index the array.
- *
- *  the introduction of highly sparse ids led to deprecation of this
- *  implementation. see version 2 for further information.
- */
-
-
-/*--------------------------------------------------------------------------
- * KTrieIndex_v1
- */
-struct KTrieIndex_v1
-{
-    KPTrieIndex_v1 pt;
-};
-
-
-/*--------------------------------------------------------------------------
- * V2
- *  version 2 of the trie index was introduced to handle sparse ids,
- *  and to recognize that ids may be 64 bits and/or negative.
- *
- *  v2 introduces strategy identifiers to handle various cases.
- *
- *  CONSTRAINTS
- *  - both key and id are unique ( version 1 )
- *  - key is not unique, but must map to a contiguous range of ids,
- *    while ids are unique ( the main use case for SRA )
- *
- *  INSERTION
- *  - ids are observed in increasing order
- *
- *  PROJECTION
- *  - id range is contiguous or nearly so ( can use single array )
- *  - id range is sparse
- *
- *  the implementation may be extended by adding new strategies,
- *  but the moment the implementation supports 1 to many mappings,
- *  inserted with ids in increasing order, and an unique constraint
- *  on the ids themselves.
- *
- *  the general case for v2 is "key -> id range", where "id range -> key"
- *  is via contiguous array if avg ( id range ) <= 2, and via sparse
- *  array otherwise.
- *
- *  for the key -> id mappings, this means that the in-core node
- *  either retains an id range ( when not using a projection index ),
- *  or it retains a start-id only, since its range can be determined
- *  from the projection index.
- *
- *  for id -> key mappings, the id is first converted to an ordinal, and
- *  the ordinal to a node. when ids are contiguous, id -> ordinal is simply
- *  derived by subtracting the initial start id. when sparse, an id -> ord
- *  array is used in a binary search to produce the ordinal.
- *
- *  ids are assumed to be 64 bit, stored as id - start id, and packed to
- *  a minimum number of bits to represent the id. ptrie node ids are still
- *  32-bit entities.
- */
-
-
-/*--------------------------------------------------------------------------
- * KTrieIndex_v2
- */
-struct KTrieIndex_v2
-{
-    KPTrieIndex_v2 pt;
-};
-
-
-/*--------------------------------------------------------------------------
- * KU64Index_v3
- */
-struct KU64Index_v3
-{
-    struct PBSTree *tree;
-    struct KMMap const *mm;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_index_priv_ */
diff --git a/libs/kdb/index.c b/libs/kdb/index.c
deleted file mode 100644
index 1ceedc0..0000000
--- a/libs/kdb/index.c
+++ /dev/null
@@ -1,1006 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-
-#define KONST const
-#include "index-priv.h"
-#include "dbmgr-priv.h"
-#include "database-priv.h"
-#include "table-priv.h"
-#include "kdb-priv.h"
-#undef KONST
-
-#include <kdb/index.h>
-#include <kfs/file.h>
-#include <kfs/mmap.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <byteswap.h>
-#include <assert.h>
-
-/*--------------------------------------------------------------------------
- * KIndex
- *  an object capable of mapping an object to integer oid
- */
-struct KIndex
-{
-    const KDBManager *mgr;
-    const KDatabase *db;
-    const KTable *tbl;
-    KRefcount refcount;
-    uint32_t vers;
-    union
-    {
-        KTrieIndex_v1 txt1;
-        KTrieIndex_v2 txt234;
-        KU64Index_v3  u64_3;
-    } u;
-    bool converted_from_v1;
-    uint8_t type;
-    char path [ 1 ];
-};
-
-
-/* Whack
- */
-static
-rc_t KIndexWhack ( KIndex *self )
-{
-    rc_t rc = 0;
-
-    KRefcountWhack ( & self -> refcount, "KIndex" );
-
-    /* release owner */
-    if ( self -> db != NULL )
-    {
-        rc = KDatabaseSever ( self -> db );
-        if ( rc == 0 )
-            self -> db = NULL;
-    }
-    else if ( self -> tbl != NULL )
-    {
-        rc = KTableSever ( self -> tbl );
-        if ( rc == 0 )
-            self -> tbl = NULL;
-    }
-
-    /* remove from mgr */
-    if ( rc == 0 )
-        rc = KDBManagerSever ( self -> mgr );
-    if ( rc == 0 )
-    {
-        self -> mgr = NULL;
-
-        /* complete */
-        rc = SILENT_RC ( rcDB, rcIndex, rcDestroying, rcIndex, rcBadVersion );
-
-        switch ( self -> type )
-        {
-        case kitText:
-        case kitText | kitProj:
-            switch ( self -> vers )
-            {
-            case 1:
-                KTrieIndexWhack_v1 ( & self -> u . txt1 );
-                rc = 0;
-                break;
-            case 2:
-            case 3:
-            case 4:
-                KTrieIndexWhack_v2 ( & self -> u . txt234 );
-                rc = 0;
-                break;
-            }
-            break;
-
-        case kitU64:
-            switch ( self -> vers )
-            {
-            case 3:
-            case 4:
-                rc = KU64IndexWhack_v3 ( & self -> u . u64_3 );
-                break;
-            }
-            break;
-
-        }
-
-        if ( rc == 0 )
-        {
-            free ( self );
-            return 0;
-        }
-    }
-
-    KRefcountInit ( & self -> refcount, 1, "KIndex", "whack", "kidx" );
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KIndexAddRef ( const KIndex *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KIndex" ) )
-        {
-        case krefLimit:
-            return RC ( rcDB, rcIndex, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KIndexRelease ( const KIndex *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KIndex" ) )
-        {
-        case krefWhack:
-            return KIndexWhack ( ( KIndex* ) self );
-        case krefNegative:
-            return RC ( rcDB, rcIndex, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Make
- */
-static
-rc_t KIndexMake ( KIndex **idxp, const char *path )
-{
-    rc_t rc;
-
-    if ( idxp == NULL )
-        rc = RC ( rcDB, rcIndex, rcCreating, rcParam, rcNull );
-    else
-    {
-        if ( path == NULL )
-            rc = RC ( rcDB, rcIndex, rcCreating, rcPath, rcNull );
-        else if ( path [ 0 ] == 0 )
-            rc = RC ( rcDB, rcIndex, rcCreating, rcPath, rcEmpty );
-        else
-        {
-            KIndex* idx = malloc ( sizeof *idx + strlen ( path ) );
-            if ( idx == NULL )
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                memset ( idx, 0, sizeof * idx );
-                KRefcountInit ( & idx -> refcount, 1, "KIndex", "make", path );
-                strcpy ( idx -> path, path );
-                * idxp = idx;
-                return 0;
-            }
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t KIndexAttach ( KIndex *self, const KMMap *mm, bool *byteswap )
-{
-    size_t size;
-    rc_t rc = KMMapSize ( mm, & size );
-    if ( rc == 0 )
-    {
-        const void *addr;
-        rc = KMMapAddrRead ( mm, & addr );
-        if ( rc == 0 )
-        {
-            union
-            {
-                KIndexFileHeader_v1 v1;
-                KIndexFileHeader_v2 v2;
-                KIndexFileHeader_v3 v3;
-            } hdrs;
-
-            const KDBHdr *hdr = addr;
-            const KIndexFileHeader_v3 *fh = addr;
-
-            * byteswap = false;
-            rc = KDBHdrValidate ( hdr, size, 1, KDBINDEXVERS );
-            if ( GetRCState ( rc ) == rcIncorrect && GetRCObject ( rc ) == rcByteOrder )
-            {
-                hdrs . v1 . endian = bswap_32 ( hdr -> endian );
-                hdrs . v1 . version = bswap_32 ( hdr -> version );
-                rc = KDBHdrValidate ( & hdrs . v1, size, 1, KDBINDEXVERS );
-                if ( rc == 0 )
-                {
-                    * byteswap = true;
-                    switch ( hdrs . v1 . version )
-                    {
-                    case 1:
-                        hdr = & hdrs . v1;
-                        break;
-                    case 2:
-                        hdr = & hdrs . v2;
-                        break;
-                    case 3:
-                    case 4:
-                        hdrs . v3 . index_type = bswap_32 ( fh -> index_type );
-                        hdrs . v3 . reserved1 = bswap_32 ( fh -> reserved1 );
-                        hdr = & hdrs . v3 . h;
-                        fh = & hdrs . v3;
-                        break;
-                    }
-                }
-            }
-            if ( rc == 0 )
-            {
-                self -> vers = hdr -> version;
-                switch ( hdr -> version )
-                {
-                case 1:
-#if KDBINDEXVERS != 1
-                    self -> converted_from_v1 = true;
-#endif
-                case 2:
-                    self -> type = kitText;
-                    break;
-                case 3:
-                case 4:
-                {
-                    self -> type = fh -> index_type;
-                    switch ( self -> type )
-                    {
-                    case kitText:
-                    case kitU64:
-                        break;
-                    default:
-                        rc = RC(rcDB, rcIndex, rcConstructing, rcIndex, rcUnrecognized);
-                    }
-                    break;
-                }
-                default:
-                    rc = RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcBadVersion );
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-static
-rc_t KIndexMakeRead ( KIndex **idxp,
-    const KDirectory *dir, const char *path )
-{
-    const KFile *f;
-    rc_t rc = KDirectoryOpenFileRead ( dir, & f, "%s", path );
-    if ( rc == 0 )
-    {
-        const KMMap *mm;
-        rc = KMMapMakeRead ( & mm, f );
-        if ( rc == 0 )
-        {
-            rc = KIndexMake ( idxp, path );
-            if ( rc == 0 )
-            {
-                bool byteswap;
-                KIndex *idx = * idxp;
-                rc = KIndexAttach ( idx, mm, & byteswap );
-                if ( rc == 0 )
-                {
-                    rc = RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcBadVersion );
-
-                    switch ( idx -> vers )
-                    {
-                    case 1:
-                        /* open using v1 code only if KDBINDEXVERS is 1
-                           if 2 or later, open as a v2 index */
-#if KDBINDEXVERS == 1
-                        rc = KTrieIndexOpen_v1 ( & idx -> u . txt1, mm );
-                        if ( rc == 0 )
-                        {
-                            if ( idx -> u . txt1 . pt . id2node != NULL )
-                                idx -> type = ( uint8_t ) ( kitText | kitProj );
-                            else
-                                idx -> type = ( uint8_t ) kitText;
-                        }
-                        break;
-#else
-                    case 2:
-                        idx -> vers = 3;
-                    case 3:
-                    case 4:
-                        switch ( idx -> type )
-                        {
-                            case kitText:
-                            case kitText | kitProj:
-                                /* will guess version in open */
-                                rc = KTrieIndexOpen_v2 ( & idx -> u . txt234, mm, byteswap );
-                                if( rc == 0 && idx -> u . txt234 . pt . ord2node != NULL )
-                                    idx -> type |= kitProj;
-                                break;
-
-                            case kitU64:
-                                rc = KU64IndexOpen_v3 ( & idx -> u . u64_3, mm, byteswap );
-                                break;
-                        }
-                        break;
-#endif
-                    }
-                }
-
-                if ( rc != 0 )
-                    KIndexWhack ( idx );
-            }
-
-            KMMapRelease ( mm );
-        }
-
-        KFileRelease ( f );
-    }
-    return rc;
-}
-
-
-/* OpenIndexRead
- * VOpenIndexRead
- *  open an index for read
- *
- *  "idx" [ OUT ] - return parameter for newly opened index
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
- */
-static
-rc_t KDBManagerOpenIndexReadInt ( const KDBManager *self,
-    KIndex **idxp, const KDirectory *wd, const char *path )
-{
-    char idxpath [ 4096 ];
-    rc_t rc = KDirectoryResolvePath ( wd, true,
-                                      idxpath, sizeof idxpath, "%s", path );
-    if ( rc == 0 )
-    {
-        KIndex *idx;
-
-        switch ( KDirectoryPathType ( wd, "%s", idxpath ) )
-        {
-        case kptNotFound:
-            return RC ( rcDB, rcMgr, rcOpening, rcIndex, rcNotFound );
-        case kptBadPath:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcInvalid );
-        case kptFile:
-        case kptFile | kptAlias:
-            break;
-        default:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcIncorrect );
-        }
-
-        rc = KIndexMakeRead ( & idx, wd, idxpath );
-        if ( rc == 0 )
-        {
-            idx -> mgr = KDBManagerAttach ( self );
-            * idxp = idx;
-            return 0;
-        }
-    }
-    
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseOpenIndexRead ( struct KDatabase const *self,
-    const KIndex **idx, const char *name, ... )
-{
-    rc_t rc = 0;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVOpenIndexRead ( self, idx, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseVOpenIndexRead ( const KDatabase *self,
-    const KIndex **idxp, const char *name, va_list args )
-{
-    rc_t rc = 0;
-    char path [ 256 ];
-
-    if ( idxp == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcParam, rcNull );
-
-    * idxp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcSelf, rcNull );
-
-    rc = KDBVMakeSubPath ( self -> dir,
-        path, sizeof path, "idx", 3, name, args );
-    if ( rc == 0 )
-    {
-        KIndex *idx;
-        rc = KDBManagerOpenIndexReadInt ( self -> mgr,
-            & idx, self -> dir, path );
-        if ( rc == 0 )
-        {
-            idx -> db = KDatabaseAttach ( self );
-            * idxp = idx;
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableOpenIndexRead ( struct KTable const *self,
-    const KIndex **idx, const char *name, ... )
-{
-    rc_t rc = 0;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KTableVOpenIndexRead ( self, idx, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableVOpenIndexRead ( const KTable *self,
-    const KIndex **idxp, const char *name, va_list args )
-{
-    rc_t rc = 0;
-    char path [ 256 ];
-
-    if ( idxp == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcParam, rcNull );
-
-    * idxp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcSelf, rcNull );
-
-    if ( self -> prerelease )
-    {
-        int len;
-        if ( args == 0 )
-            len = snprintf ( path, sizeof path, "%s", name );
-        else
-            len = vsnprintf ( path, sizeof path, name, args );
-        if ( len < 0 || ( size_t ) len >= sizeof path )
-            return RC ( rcDB, rcTable, rcOpening, rcPath, rcExcessive );
-        rc = 0;
-    }
-    else
-    {
-        rc = KDBVMakeSubPath ( self -> dir,
-            path, sizeof path, "idx", 3, name, args );
-    }
-
-    if ( rc == 0 )
-    {
-        KIndex *idx;
-        rc = KDBManagerOpenIndexReadInt ( self -> mgr,
-            & idx, self -> dir, path );
-        if ( rc == 0 )
-        {
-            idx -> tbl = KTableAttach ( self );
-            * idxp = idx;
-        }
-    }
-    return rc;
-}
-
-
-/* Locked
- *  returns non-zero if locked
- */
-LIB_EXPORT bool CC KIndexLocked ( const KIndex *self )
-{
-    rc_t rc;
-    const KDirectory *dir;
-
-    if ( self == NULL )
-        return false;
-
-    assert ( self -> db != NULL || self -> tbl != NULL );
-    dir = ( self -> db != NULL ) ?
-        self -> db -> dir : self -> tbl -> dir;
-
-    rc = KDBWritable ( dir, self -> path );
-    return GetRCState ( rc ) == rcLocked;
-}
-
-
-/* Version
- *  returns the format version
- */
-LIB_EXPORT rc_t CC KIndexVersion ( const KIndex *self, uint32_t *version )
-{
-    if ( version == NULL )
-        return RC ( rcDB, rcIndex, rcAccessing, rcParam, rcNull );
-
-    if ( self == NULL )
-    {
-        * version = 0;
-        return RC ( rcDB, rcIndex, rcAccessing, rcSelf, rcNull );
-    }
-    
-    * version = self -> vers;
-    return 0;
-}
-
-
-/* Type
- *  returns the type of index
- */
-LIB_EXPORT rc_t CC KIndexType ( const KIndex *self, KIdxType *type )
-{
-    if ( type == NULL )
-        return RC ( rcDB, rcIndex, rcAccessing, rcParam, rcNull );
-
-    if ( self == NULL )
-    {
-        * type = ( KIdxType ) 0;
-        return RC ( rcDB, rcIndex, rcAccessing, rcSelf, rcNull );
-    }
-
-    * type = ( KIdxType ) self -> type;
-    return 0;
-}
-
-
-/* CheckConsistency
- *  run a consistency check on the open index
- *
- *  "level" [ IN ] - a measure of rigor of the exercise:
- *    0 is the lightest
- *    1 will test all id mappings
- *    2 will perform key->id retrievals
- *    3 will perform id->key retrievals if a projection index exists
- *
- *  "start_id" [ OUT, NULL OKAY ] - returns the first id in index
- *
- *  "id_range" [ OUT, NULL OKAY ] - returns the range of ids from first to last
- *
- *  "num_keys" [ OUT, NULL OKAY ] - returns the number of key entries
- *
- *  "num_rows" [ OUT, NULL OKAY ] - returns the number of key->id mappings
- *
- *  "num_holes" [ OUT, NULL OKAY ] - returns the number of holes in the mapped id range
- */
-LIB_EXPORT rc_t CC KIndexConsistencyCheck ( const KIndex *self, uint32_t level,
-    int64_t *start_id, uint64_t *id_range, uint64_t *num_keys,
-    uint64_t *num_rows, uint64_t *num_holes )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcDB, rcIndex, rcValidating, rcSelf, rcNull );
-    else
-    {
-        bool key2id, id2key, all_ids;
-        switch ( level )
-        {
-        case 0:
-            key2id = id2key = all_ids = false;
-            break;
-        case 1:
-            key2id = id2key = false;
-            all_ids = true;
-            break;
-        case 2:
-            key2id = id2key = true;
-            all_ids = false;
-            break;
-        default:
-            key2id = id2key = all_ids = true;
-        }
-
-        switch ( self -> type )
-        {
-        case kitText:
-            id2key = false;
-        case kitText | kitProj:
-            switch ( self -> vers )
-            {
-            case 1:
-                rc = KTrieIndexCheckConsistency_v1 ( & self -> u . txt1,
-                    start_id, id_range, num_keys, num_rows, num_holes,
-                    self, key2id, id2key );
-                break;
-            case 2:
-            case 3:
-            case 4:
-                rc = KTrieIndexCheckConsistency_v2 ( & self -> u . txt234,
-                    start_id, id_range, num_keys, num_rows, num_holes,
-                    self, key2id, id2key, all_ids, self -> converted_from_v1 );
-                break;
-            default:
-                return RC ( rcDB, rcIndex, rcValidating, rcIndex, rcBadVersion );
-            }
-            break;
-
-        default:
-            rc = RC ( rcDB, rcIndex, rcValidating, rcFunction, rcUnsupported );
-        }
-    }
-
-    return rc;
-}
-
-
-/* Find
- *  finds a single mapping from key
- */
-LIB_EXPORT rc_t CC KIndexFindText ( const KIndex *self, const char *key, int64_t *start_id, uint64_t *id_count,
-    int ( CC * custom_cmp ) ( const void *item, struct PBSTNode const *n, void *data ),
-    void *data )
-{
-    rc_t rc = 0;
-    uint32_t id32, span;
-
-    if ( id_count != NULL )
-        * id_count = 0;
-
-    if ( start_id == NULL )
-        return RC ( rcDB, rcIndex, rcSelecting, rcParam, rcNull );
-
-    * start_id = 0;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcSelecting, rcSelf, rcNull );
-
-    if ( key == NULL )
-        return RC ( rcDB, rcIndex, rcSelecting, rcString, rcNull );
-    if ( key [ 0 ] == 0 )
-        return RC ( rcDB, rcIndex, rcSelecting, rcString, rcEmpty );
-
-    span = 1;
-
-    switch ( self -> type )
-    {
-    case kitText:
-    case kitText | kitProj:
-        switch ( self -> vers )
-        {
-        case 1:
-            rc = KTrieIndexFind_v1 ( & self -> u . txt1, key, & id32, custom_cmp, data );
-            if ( rc == 0 )
-                * start_id = id32;
-            break;
-        case 2:
-        case 3:
-        case 4:
-#if V2FIND_RETURNS_SPAN
-            rc = KTrieIndexFind_v2 ( & self -> u . txt234, key, start_id, & span, custom_cmp, data, self -> converted_from_v1 );
-#else
-            rc = KTrieIndexFind_v2 ( & self -> u . txt234, key, start_id, custom_cmp, data, self -> converted_from_v1 );
-#endif
-            break;
-        default:
-            return RC ( rcDB, rcIndex, rcSelecting, rcIndex, rcBadVersion );
-        }
-        break;
-    default:
-        return RC ( rcDB, rcIndex, rcSelecting, rcNoObj, rcUnknown );
-    }
-
-    if ( id_count != NULL )
-        * id_count = span;
-    
-    return rc;
-}
-
-
-/* FindAll
- *  finds all mappings from key
- */
-LIB_EXPORT rc_t CC KIndexFindAllText ( const KIndex *self, const char *key,
-    rc_t ( CC * f ) ( int64_t id, uint64_t id_count, void *data ), void *data )
-{
-    rc_t rc = 0;
-    int64_t id64;
-    uint32_t id32, span;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcSelecting, rcSelf, rcNull );
-
-    if ( f == NULL )
-        return RC ( rcDB, rcIndex, rcSelecting, rcFunction, rcNull );
-
-    if ( key == NULL )
-        return RC ( rcDB, rcIndex, rcSelecting, rcString, rcNull );
-    if ( key [ 0 ] == 0 )
-        return RC ( rcDB, rcIndex, rcSelecting, rcString, rcEmpty );
-
-    span = 1;
-
-    switch ( self -> type )
-    {
-    case kitText:
-    case kitText | kitProj:
-        switch ( self -> vers )
-        {
-        case 1:
-            rc = KTrieIndexFind_v1 ( & self -> u . txt1, key, & id32, NULL, NULL );
-            if ( rc == 0 )
-                rc = ( * f ) ( id32, 1, data );
-            break;
-        case 2:
-        case 3:
-        case 4:
-#if V2FIND_RETURNS_SPAN
-            rc = KTrieIndexFind_v2 ( & self -> u . txt234, key, & id64, & span, NULL, NULL, self -> converted_from_v1 );
-#else
-            rc = KTrieIndexFind_v2 ( & self -> u . txt234, key, & id64, NULL, NULL, self -> converted_from_v1 );
-#endif
-            if ( rc == 0 )
-                rc = ( * f ) ( id64, span, data );
-            break;
-        default:
-            return RC ( rcDB, rcIndex, rcSelecting, rcIndex, rcBadVersion );
-        }
-        break;
-    default:
-        return RC ( rcDB, rcIndex, rcSelecting, rcNoObj, rcUnknown );
-    }
-    
-    return rc;
-}
-
-
-/* Project
- *  finds key(s) mapping to value/id if supported
- */
-LIB_EXPORT rc_t CC KIndexProjectText ( const KIndex *self,
-    int64_t id, int64_t *start_id, uint64_t *id_count,
-    char *key, size_t kmax, size_t *actsize )
-{
-    rc_t rc = 0;
-    int64_t dummy;
-    uint32_t span;
-
-    if ( start_id == NULL )
-        start_id = & dummy;
-
-    * start_id = 0;
-
-    if ( id_count != NULL )
-        * id_count = 0;
-
-    if ( key == NULL && kmax != 0 )
-        return RC ( rcDB, rcIndex, rcProjecting, rcBuffer, rcNull );
-
-    if ( kmax != 0 )
-        key [ 0 ] = 0;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcProjecting, rcSelf, rcNull );
-
-    if ( ( ( KIdxType ) self -> type & kitProj ) == 0 )
-        return RC ( rcDB, rcIndex, rcProjecting, rcIndex, rcIncorrect );
-
-    if ( key == NULL )
-        return RC ( rcDB, rcIndex, rcProjecting, rcBuffer, rcNull );
-
-    span = 1;
-
-    switch ( self -> type )
-    {
-    case kitText | kitProj:
-        switch ( self -> vers )
-        {
-        case 1:
-            /* there is a limit on ids in v1 */
-            if ( id <= 0 || ( id >> 32 ) != 0 )
-                return RC ( rcDB, rcIndex, rcProjecting, rcId, rcNotFound );
-
-            rc = KTrieIndexProject_v1 ( & self -> u . txt1,
-                ( uint32_t ) id, key, kmax, actsize );
-            if ( rc == 0 )
-                * start_id = id;
-            break;
-        case 2:
-        case 3:
-        case 4:
-#if V2FIND_RETURNS_SPAN
-            rc = KTrieIndexProject_v2 ( & self -> u . txt234, id, start_id, & span, key, kmax, actsize );
-#else
-            rc = KTrieIndexProject_v2 ( & self -> u . txt234, id, key, kmax, actsize );
-            if ( rc == 0 )
-                * start_id = id;
-#endif
-            break;
-        default:
-            return RC ( rcDB, rcIndex, rcProjecting, rcIndex, rcBadVersion );
-        }
-        break;
-    default:
-        return RC ( rcDB, rcIndex, rcProjecting, rcNoObj, rcUnknown );
-    }
-
-    if ( id_count != NULL )
-        * id_count = span;
-    
-    return rc;
-}
-
-
-/* ProjectAll
- *  finds key(s) mapping to value/id if supported
- */
-LIB_EXPORT rc_t CC KIndexProjectAllText ( const KIndex *self, int64_t id,
-    rc_t ( CC * f ) ( int64_t start_id, uint64_t id_count, const char *key, void *data ),
-    void *data )
-{
-    rc_t rc = 0;
-    char key [ 256 ];
-
-    uint32_t span;
-    int64_t start_id;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcProjecting, rcSelf, rcNull );
-
-    if ( ( ( KIdxType ) self -> type & kitProj ) == 0 )
-        return RC ( rcDB, rcIndex, rcProjecting, rcIndex, rcIncorrect );
-
-    if ( f == NULL )
-        return RC ( rcDB, rcIndex, rcProjecting, rcFunction, rcNull );
-
-    span = 1;
-
-    switch ( self -> type )
-    {
-    case kitText | kitProj:
-        switch ( self -> vers )
-        {
-        case 1:
-            /* there is a limit on ids in v1 */
-            if ( id <= 0 || ( id >> 32 ) != 0 )
-                return RC ( rcDB, rcIndex, rcProjecting, rcId, rcNotFound );
-
-            rc = KTrieIndexProject_v1 ( & self -> u . txt1,
-                ( uint32_t ) id, key, sizeof key, NULL );
-            if ( rc == 0 )
-                rc = ( * f ) ( id, 1, key, data );
-            break;
-
-        case 2:
-        case 3:
-        case 4:
-#if V2FIND_RETURNS_SPAN
-            rc = KTrieIndexProject_v2 ( & self -> u . txt234, id, & start_id, & span, key, sizeof key, NULL );
-#else
-            rc = KTrieIndexProject_v2 ( & self -> u . txt234, start_id = id, key, sizeof key );
-#endif
-            if ( rc == 0 )
-                rc = ( * f ) ( start_id, span, key, data );
-            break;
-            
-        default:
-            return RC ( rcDB, rcIndex, rcProjecting, rcIndex, rcBadVersion );
-        }
-        break;
-    default:
-        return RC ( rcDB, rcIndex, rcProjecting, rcNoObj, rcUnknown );
-    }
-    
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KIndexFindU64( const KIndex* self, uint64_t offset, uint64_t* key, uint64_t* key_size, int64_t* id, uint64_t* id_qty )
-{
-    rc_t rc = 0;
-
-    if( key == NULL || key_size == NULL || id == NULL || id_qty == NULL ) {
-        return RC(rcDB, rcIndex, rcSelecting, rcParam, rcNull);
-    }
-    *key = *key_size = *id = *id_qty = 0;
-    if( self == NULL ) {
-        return RC(rcDB, rcIndex, rcSelecting, rcSelf, rcNull);
-    }
-
-    switch( self->type )
-    {
-    case kitU64:
-        switch( self->vers )
-        {
-        case 3:
-        case 4:
-            rc = KU64IndexFind_v3(&self->u.u64_3, offset, key, key_size, id, id_qty);
-            break;
-        default:
-            return RC(rcDB, rcIndex, rcSelecting, rcIndex, rcBadVersion);
-        }
-        break;
-    default:
-        return RC(rcDB, rcIndex, rcSelecting, rcNoObj, rcUnknown);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KIndexFindAllU64( const KIndex* self, uint64_t offset,
-    rc_t ( CC * f )(uint64_t key, uint64_t key_size, int64_t id, uint64_t id_qty, void* data ), void* data)
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        return RC(rcDB, rcIndex, rcSelecting, rcSelf, rcNull);
-    if ( f == NULL )
-        return RC(rcDB, rcIndex, rcSelecting, rcFunction, rcNull);
-
-    switch ( self->type )
-    {
-    case kitU64:
-        switch ( self->vers )
-        {
-        case 3:
-        case 4:
-            rc = KU64IndexFindAll_v3(&self->u.u64_3, offset, f, data);
-            break;
-        default:
-            return RC(rcDB, rcIndex, rcSelecting, rcIndex, rcBadVersion);
-        }
-        break;
-    default:
-        return RC(rcDB, rcIndex, rcSelecting, rcNoObj, rcUnknown);
-    }
-
-    return rc;
-}
-
-
-/* SetMaxId
- *  certain legacy versions of skey were built to know only the starting id
- *  of the NAME_FMT column, but were never given a maximum id. allow them
- *  to be corrected here.
- */
-LIB_EXPORT void CC KIndexSetMaxRowId ( const KIndex *cself, int64_t max_row_id )
-{
-    if ( cself != NULL ) switch ( cself -> type )
-    {
-    case kitText:
-    case kitText | kitProj:
-        switch ( cself -> vers )
-        {
-        case 2:
-        case 3:
-        case 4:
-            /* here we can repair the max row id */
-            if ( cself -> u . txt234 . pt . maxid < max_row_id )
-                ( ( KIndex* ) cself ) -> u . txt234 . pt . maxid = max_row_id;
-            break;
-        }
-        break;
-    }
-}
diff --git a/libs/kdb/kdb-priv.h b/libs/kdb/kdb-priv.h
deleted file mode 100644
index f9440f1..0000000
--- a/libs/kdb/kdb-priv.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kdb_priv_
-#define _h_kdb_priv_
-
-#ifndef _h_kdb_manager_
-#include <kdb/manager.h>
-#endif
-
-#ifndef _h_kdb_manager_
-#include <kdb/manager.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KDirectory;
-struct KDBManager;
-
-/*
- * This symbol is inserted where the KDB is being tweaked to allow
- * VFS URI syntax in opening KDB database objects initially to support
- * krypto passwords more fully.  By specifying the password source
- * individually for opens two KDB objects with different passwords can be opened.
- */
-#define SUPPORT_VFS_URI 1
-
-/*--------------------------------------------------------------------------
- * KDB utility
- */
-
-
-/* PathType
- *  checks type of path
- */
-int KDBPathTypeDir ( const struct KDirectory *dir, int type,bool *zombies, const char *path );
-int KDBPathType ( const struct KDirectory *dir, bool *zombies, const char *path );
-
-/* OpenPathType
- * Opens a path if it is of the specified type.  Even if it is an archive file
- * instead of a directory.
- *
- * if dpdir is NULL it will not return with an open Directory but it will have
- * checked that the type requested is the type present even if in an archive.
- *
- * if realpathtype is not NULL the found type will be returned regardless
- * of a match to request path type.
- *
- * the return will be zero only if the path does point to a directory or
- * archive that is of the requested type.  An archive will have been opened
- * but reshut if dpdir is NULL.
- */ 
-rc_t KDBOpenPathTypeRead ( const struct KDBManager * mgr, const struct KDirectory * dir, const char * path, 
-    const struct KDirectory ** dpdir, int pathtype, int * realpathtype, bool try_srapath );
-
-/* Writable
- *  examines a directory structure for any "lock" files
- *  examines a file for ( any ) write permission
- */
-rc_t KDBWritable ( const struct KDirectory *dir, const char *path );
-
-/* GetObjModDate
- *  extract mod date from a path
- */
-rc_t KDBGetObjModDate ( const struct KDirectory *dir, KTime_t *mtime );
-
-/* GetPathModDate
- *  extract mod date from a path
- */
-rc_t KDBVGetPathModDate ( const struct KDirectory *dir,
-    KTime_t *mtime, const char *path, va_list args );
-
-/* KDBMakeSubPath
- *  adds a namespace to path spec
- */
-rc_t KDBMakeSubPath ( struct KDirectory const *dir,
-    char *subpath, size_t subpath_max, const char *ns,
-    uint32_t ns_size, const char *path, ... );
-/* VMakeSubPath
- *  adds a namespace to path spec
- */
-rc_t KDBVMakeSubPath ( const struct KDirectory *dir,
-    char *subpath, size_t subpath_max, const char *ns,
-    uint32_t ns_size, const char *path, va_list args );
-
-
-/* KDBIsPathUri
- * A hack to get some of VFS into KDB that is too tightly bound to KFS
- */
-bool KDBIsPathUri (const char * path);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kdb_priv_ */
diff --git a/libs/kdb/kdb.c b/libs/kdb/kdb.c
deleted file mode 100644
index eed61db..0000000
--- a/libs/kdb/kdb.c
+++ /dev/null
@@ -1,951 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-
-#include "kdb-priv.h"
-#include "kdbfmt-priv.h"
-#include "dbmgr-priv.h"
-
-#include <krypto/key.h>
-#include <krypto/encfile.h>
-#include <krypto/wgaencrypt.h>
-
-#include <vfs/manager.h>
-#include <vfs/path.h>
-#include <vfs/resolver.h>
-#include <vfs/manager-priv.h>
-#include <sra/srapath.h>
-
-#include <kfs/kfs-priv.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/arc.h>
-#include <kfs/tar.h>
-#include <kfs/sra.h>
-#include <kfs/kfs-priv.h>
-#include <klib/container.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <va_copy.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-#include <errno.h>
-
-#ifndef SUPPORT_VFS_URI
-#define SUPPORT_VFS_URI 0
-#endif
-
-#ifndef SUPPORT_KDB_TAR
-#define SUPPORT_KDB_TAR 0
-#endif
-
-/*--------------------------------------------------------------------------
- * KDB utility
- */
-
-/* KDBHdrValidate
- *  validates that a header sports a supported byte order
- *  and that the version is within range
- */
-/* this is included to make kdb.c vs. wkdb.c file comparisons easier in [x]emacs.*/
-#if NOT_USED_IN_READ_ONLY_SIDE
-rc_t KDBHdrValidate ( const KDBHdr *hdr, size_t size,
-    uint32_t min_vers, uint32_t max_vers )
-{
-    assert ( hdr != NULL );
-
-    if ( size < sizeof * hdr )
-        return RC ( rcDB, rcHeader, rcValidating, rcData, rcCorrupt );
-
-    if ( hdr -> endian != eByteOrderTag )
-    {
-        if ( hdr -> endian == eByteOrderReverse )
-            return RC ( rcDB, rcHeader, rcValidating, rcByteOrder, rcIncorrect );
-        return RC ( rcDB, rcHeader, rcValidating, rcData, rcCorrupt );
-    }
-
-    if ( hdr -> version < min_vers || hdr -> version > max_vers )
-        return RC ( rcDB, rcHeader, rcValidating, rcHeader, rcBadVersion );
-
-    return 0;
-}
-#endif
-
-/* KDBPathType
- *  checks type of path
- */
-enum ScanBits
-{
-    scan_db     = ( 1 <<  0 ),
-    scan_tbl    = ( 1 <<  1 ),
-    scan_idx    = ( 1 <<  2 ),
-    scan_col    = ( 1 <<  3 ),
-    scan_idxN   = ( 1 <<  4 ),
-    scan_data   = ( 1 <<  5 ),
-    scan_dataN  = ( 1 <<  6 ),
-    scan_md     = ( 1 <<  7 ),
-    scan_cur    = ( 1 <<  8 ),
-    scan_rNNN   = ( 1 <<  9 ),
-    scan_lock   = ( 1 << 10 ),
-    scan_odir   = ( 1 << 11 ),
-    scan_ofile  = ( 1 << 12 ),
-    scan_meta   = ( 1 << 13 ),
-    scan_skey   = ( 1 << 14 ),
-    scan_sealed = ( 1 << 15 ),
-    scan_zombie = ( 1 << 16 )
-};
-
-static
-rc_t CC scan_dbdir ( const KDirectory *dir, uint32_t type, const char *name, void *data )
-{
-    uint32_t *bits = data;
-
-    type &= kptAlias - 1;
-
-    if ( type == kptDir )
-    {
-        switch ( name [ 0 ] )
-        {
-        case 'c':
-            if ( strcmp ( name, "col" ) == 0 )
-            { * bits |= scan_col; return 0; }
-            break;
-        case 'm':
-            if ( strcmp ( name, "md" ) == 0 )
-            { * bits |= scan_md; return 0; }
-            break;
-        case 't':
-            if ( strcmp ( name, "tbl" ) == 0 )
-            { * bits |= scan_tbl; return 0; }
-            break;
-        case 'i':
-            if ( strcmp ( name, "idx" ) == 0 )
-            { * bits |= scan_idx; return 0; }
-            break;
-        case 'd':
-            if ( strcmp ( name, "db" ) == 0 )
-            { * bits |= scan_db; return 0; }
-            break;
-        }
-
-        * bits |= scan_odir;
-    }
-    else if ( type == kptFile )
-    {
-        switch ( name [ 0 ] )
-        {
-        case 'l':
-            if ( strcmp ( name, "lock" ) == 0 )
-            { * bits |= scan_lock; return 0; }
-            break;
-        case 'i':
-            if ( memcmp ( name, "idx", 3 ) == 0 )
-            {
-                if ( isdigit ( name [ 3 ] ) )
-                { * bits |= scan_idxN; return 0; }
-            }
-            break;
-        case 'd':
-            if ( memcmp ( name, "data", 4 ) == 0 )
-            {
-                if ( name [ 4 ] == 0 )
-                { * bits |= scan_data; return 0; }
-                if ( isdigit ( name [ 4 ] ) )
-                { * bits |= scan_dataN; return 0; }
-            }
-        case 'c':
-            if ( strcmp ( name, "cur" ) == 0 )
-            { * bits |= scan_cur; return 0; }
-            break;
-        case 'r':
-            if ( isdigit ( name [ 1 ] ) && isdigit ( name [ 2 ] ) &&
-                 isdigit ( name [ 3 ] ) && name [ 4 ] == 0 )
-            { * bits |= scan_rNNN; return 0; }
-            break;
-        case 'm':
-            if ( strcmp ( name, "meta" ) == 0 )
-            { * bits |= scan_meta; return 0; }
-            break;
-        case 's':
-            if ( strcmp ( name, "skey" ) == 0 )
-            { * bits |= scan_skey; return 0; }
-            if ( strcmp ( name, "sealed" ) == 0 )
-            { * bits |= scan_sealed; return 0; }
-            break;
-        }
-
-        * bits |= scan_ofile;
-    }
-    else if (type == kptZombieFile )
-    {
-        * bits |= scan_zombie;
-    }
-    
-    return 0;
-}
-
-
-int KDBPathTypeDir (const KDirectory * dir, int type, bool * pHasZombies, const char * path)
-{
-    const char * leaf, * parent;
-    uint32_t bits;
-    rc_t rc;
-
-    bits = 0;
-
-    assert ((type == kptDir) || (type == (kptDir|kptAlias)));
-
-    rc = KDirectoryVisit ( dir, false, scan_dbdir, & bits, "%s", path );
-    if ( rc == 0 ) do
-    {
-        if ( ( bits & scan_zombie ) != 0 ) {
-            bits &= ~scan_zombie;
-            if (pHasZombies)
-                *pHasZombies = true;
-        }
-        /* look for a column */
-        if ( ( bits & scan_idxN ) != 0 &&
-             ( bits & ( scan_data | scan_dataN ) ) != 0 )
-        {
-            if ( ( bits & ( scan_db | scan_tbl | scan_idx | scan_col ) ) == 0 )
-                type += kptColumn - kptDir;
-            break;
-        }
-
-        /* look for a table */
-        if ( ( bits & scan_col ) != 0 )
-        {
-            /* can't have sub-tables or a db */
-            if ( ( bits & ( scan_db | scan_tbl ) ) == 0 )
-            {
-                /* look for an old-structure table */
-                if ( ( bits & ( scan_meta | scan_md ) ) == scan_meta ||
-                     ( bits & ( scan_skey | scan_idx ) ) == scan_skey )
-                    type += kptPrereleaseTbl - kptDir;
-                else
-                    type += kptTable - kptDir;
-            }
-            break;
-        }
-
-        /* look for metadata */
-        if ( ( bits & ( scan_cur | scan_rNNN ) ) != 0 )
-        {
-            if ( ( bits & ( scan_db | scan_tbl | scan_idx | scan_col ) ) == 0 )
-                type += kptMetadata - kptDir;
-            break;
-        }
-
-        /* look for a database */
-        if ( ( bits & scan_tbl ) != 0 )
-        {
-            if ( ( bits & scan_col ) == 0 )
-                type += kptDatabase - kptDir;
-            break;
-        }
-
-        /* look for a structured column */
-        if ( ( bits & scan_odir ) != 0 )
-        {
-            leaf = strrchr ( path, '/' );
-            if ( leaf != NULL )
-            {
-                parent = string_rchr ( path, leaf - path, '/' );
-                if ( parent ++ == NULL )
-                    parent = path;
-                if ( memcmp ( parent, "col/", 4 ) != 0 )
-                    break;
-
-                bits = 0;
-                if ( KDirectoryVisit ( dir, 1, scan_dbdir, & bits, "%s", path ) == 0 )
-                {
-                    if ( ( bits & scan_idxN ) != 0 &&
-                         ( bits & ( scan_data | scan_dataN ) ) != 0 )
-                    {
-                        if ( ( bits & ( scan_db | scan_tbl | scan_idx | scan_col ) ) == 0 )
-                            type += kptColumn - kptDir;
-                        break;
-                    }
-                }
-            }
-        }
-    } while (0);
-
-    return type;
-}
-
-
-int KDBPathType ( const KDirectory *dir, bool *pHasZombies, const char *path )
-{
-    const char *leaf, *parent;
-
-
-    rc_t rc;
-    int type = KDirectoryPathType ( dir, "%s", path );
-    
-    if (pHasZombies)
-        *pHasZombies = false;
-
-    switch ( type )
-    {
-    case kptDir:
-    case kptDir | kptAlias:
-        type = KDBPathTypeDir (dir, type, pHasZombies, path);
-        break;
-
-    case kptFile:
-    case kptFile | kptAlias:
-    {
-        /* if we hit a file first try it as an archive */
-        const KDirectory * ldir;
-
-        rc = KDirectoryOpenSraArchiveRead_silent ( dir, &ldir, false, "%s", path );
-#if SUPPORT_KDB_TAR
-        if ( rc != 0 )
-            rc = KDirectoryOpenTarArchiveRead_silent ( dir, &ldir, false, "%s", path );
-#endif
-        /* it was an archive so recur */
-        if ( rc == 0 )
-        {
-            /* recheck this newly opened directory for KDB/KFS type */
-            int type2;
-
-            type2 = KDBPathType ( ldir, NULL, "." );
-            if ((type2 != kptDir) || (type != (kptDir|kptAlias)))
-                type = type2;
-
-            KDirectoryRelease (ldir);
-        }
-        /* it was not an archive so see if it it's an idx file */
-        else
-        {
-            leaf = strrchr ( path, '/' );
-            if ( leaf != NULL )
-            {
-                parent = string_rchr ( path, leaf - path, '/' );
-                if ( parent ++ == NULL )
-                    parent = path;
-                if ( memcmp ( parent, "idx/", 4 ) == 0 )
-                    type += kptIndex - kptFile;
-            }
-        }
-        break;
-    }
-    }
-    return type;
-}
-
-
-
-#if SUPPORT_VFS_URI
-#else
-/* return configured password as ASCIZ
- * opertates on vfs/kfs/kfg objects, not kdb objects */
-static
-rc_t KDBOpenFileGetPassword (char * pw, size_t pwz)
-{
-    VFSManager * mgr;
-    rc_t rc;
-
-    assert (pw);
-    assert (pwz);
-
-    pw[0] = '\0';
-
-    rc = VFSManagerMake (&mgr);
-    if (rc)
-        ;                      /* failure to make VFS manager: pass along rc */
-    else
-    {
-        size_t pwfz;
-        char pwf [4096 + 1];
-
-        rc = VFSManagerGetConfigPWFile (mgr, pwf, sizeof (pwf) - 1, &pwfz);
-        if (rc)
-            /* failure to get password file path: tweak rc */
-            rc = RC (rcDB, rcMgr, rcOpening, rcEncryptionKey, rcNotFound);
-
-        else
-        {
-            VPath * pwp;
-
-            pwf [pwfz] = '\0'; /* force to ASCIZ */
-
-#if 0
-            rc = VPathMakeSysPath (&pwp, pwf);
-#else
-            rc = VFSManagerMakePath (mgr, &pwp, "%s", pwf);
-#endif
-
-            if (rc)
-                ;       /* failure to construct a path from the string */
-            
-            else
-            {
-                const KFile * pwf;
-          
-                rc = VFSManagerOpenFileRead (mgr, &pwf, pwp);
-                if (rc)
-                    /* failure to open password file */
-                    rc = RC (rcDB, rcMgr, rcOpening, rcEncryptionKey, rcNotOpen);
-
-                else
-                {
-                    size_t z;
-                    char pwb [4098]; /* arbitrarily using 4096 as maximum
-                                        allowed length */
-
-                    /* at this point we are only getting the password from a 
-                     * file but in the future if we can get it from a pipe of
-                     * some sort we can't count on the ReadAll to really know
-                     * if we hit end of file and not just a pause in the
-                     * streaming.  VFS/KFS 2 will have to fix this somehow
-                     */
-
-                    rc = KFileReadAll (pwf, 0, pwb, sizeof pwb, &z);
-                    if (rc)
-                        ;       /* failure to read password file: pass along rc */
-                    else
-                    {
-                        /* trim off EOL if present */
-                        char * pc;
-
-                        pwb[z] = '\0';   /* force ASCIZ */
-
-                        pc = string_chr (pwb, z, '\r');
-                        if (pc)
-                        {
-                            *pc = '\0';
-                            z = 1 + pc - pwb;
-                        }
-                        pc = string_chr (pwb, z, '\n');
-                        if (pc)
-                        {
-                            *pc = '\0';
-                            z = 1 + pc - pwb;
-                        }
-                        if (z == 0)
-                            rc = RC (rcDB, rcMgr, rcOpening, rcEncryptionKey, rcTooShort);
-
-                        else if (pwz < z) /* pwz came in as 4096 */
-                            rc = RC (rcDB, rcMgr, rcOpening, rcEncryptionKey, rcTooLong);
-
-                        else
-                        {
-                            memmove (pw, pwb, z+1);
-                        }
-                    }
-                    KFileRelease (pwf);
-                }
-                VPathRelease (pwp);
-            }
-        }
-        VFSManagerRelease (mgr);
-    }
-    return rc;
-}
-
-
-/* not KDB specific - just uses vfs/krypto/kfs objects */
-static
-rc_t KDBOpenFileAsDirectory (const KDirectory * dir,
-                             const char * path, 
-                             const KDirectory ** pdir,
-                             uint32_t rcobj)
-{
-    const KFile * file;
-    const KFile * f;
-    const KDirectory * ldir;
-    bool encrypted = false;
-
-    rc_t rc;
-
-    *pdir = NULL;
-
-    rc = KDirectoryOpenFileRead (dir, &file, "%s", path);
-    if (rc == 0)
-    {
-        rc = KFileRandomAccess(file);
-        if (rc)
-            rc = RC (rcDB, rcMgr, rcOpening, rcobj, rcUnsupported);
-        else
-        {
-            size_t tz;
-            char tbuff [4096];
-            char pbuff [4096 + 1];
-
-            rc = KFileReadAll (file, 0, tbuff, sizeof tbuff, &tz);
-            if (rc == 0)
-            {
-                if (KFileIsEnc (tbuff, tz) == 0)
-                {
-                    encrypted = true;
-
-                    rc = KDBOpenFileGetPassword (pbuff, sizeof (pbuff) - 1);
-                    if (rc == 0)
-                    {
-                        KKey key;
-
-                        rc = KKeyInitRead (&key, kkeyAES128, pbuff, string_size (pbuff));
-                        if (rc == 0)
-                        {
-                            rc = KEncFileMakeRead (&f, file, &key);
-                            if (rc == 0)
-                            {
-                                /* KEncFileMakeRead adds a reference */
-                                KFileRelease (file);
-                                file = f;
-                                rc = KFileReadAll (file, 0, tbuff, sizeof tbuff, &tz);
-                            }
-                        }
-                    }
-                }
-                else if (KFileIsWGAEnc (tbuff, tz) == 0)
-                {
-                    encrypted = true;
-
-                    rc = KDBOpenFileGetPassword (pbuff, sizeof (pbuff) - 1);
-                    if (rc == 0)
-                    {
-                        rc = KFileMakeWGAEncRead (&f, file, pbuff, string_size (pbuff));
-                        if (rc == 0)
-                        {
-                            /* KFileMakeWGAEncRead adds a reference */
-                            KFileRelease (file);
-                            file = f;
-                            rc = KFileReadAll (file, 0, tbuff, sizeof tbuff, &tz);
-                        }
-                    }
-                }
-                /* else not a handled encryption or unencrypted: we can't distinguish too much */
-
-                if (rc == 0)
-                {
-                    if (KFileIsSRA (tbuff, tz) == 0)
-                    {
-                        rc = KDirectoryOpenSraArchiveReadUnbounded_silent_preopened (dir,
-                                                                                     &ldir,
-                                                                                     false,
-                                                                                     file,
-                                                                                     "%s",
-                                                                                     path);
-                    }
-                    else
-                    {
-#if SUPPORT_KDB_TAR
-                        rc = KDirectoryOpenTarArchiveRead_silent_preopened (dir, &ldir, false,
-                                                                            file, "%s", path);
-#else
-                        /* will be reset immediately below */
-                        rc = -1;
-#endif
-                    }
-
-                    /* not an archive type we handle or a bad archive */
-                    if ( rc != 0 )
-                    {
-                        if (encrypted)
-                            rc = RC ( rcDB, rcMgr, rcOpening, rcEncryptionKey, rcIncorrect );
-                        else
-                            rc = RC ( rcDB, rcMgr, rcOpening, rcPath, rcIncorrect );
-                    }
-                    else
-                    {
-                        /*
-                         * release our ownership of the KFile that but archive will 
-                         * keep theirs
-                         */
-                        KFileRelease (file);
-                        *pdir = ldir;
-                        return 0;
-                    }
-                }
-            }
-        }
-        KFileRelease (file);
-    }
-    return rc;
-}
-#endif
-
-
-static rc_t KDBOpenPathTypeReadInt ( const KDBManager * mgr, const KDirectory * dir, const char * path,
-                                     const KDirectory ** pdir, int * type,
-                                     int pathtype, uint32_t rcobj, bool try_srapath )
-{
-    VFSManager * vmgr = mgr->vfsmgr;
-    const KDirectory * ldir = NULL;
-    rc_t rc = 0;
-
-    /* object relative opens can be done using KFS - we hacked in VFS after all */
-    if (! try_srapath)
-    {
-        rc = KDirectoryOpenDirUpdate ((KDirectory*)dir, (KDirectory**)pdir, false, "%s", path);
-        if ((rc) && (GetRCState(rc) != rcNotFound))
-            rc = KDirectoryOpenDirRead (dir, pdir, false, "%s", path);
-    }
-    else
-    {
-        VPath * vpath;
-
-        /*
-         * We've got to decide if the path coming in is a full or relative
-         * path and if relative make it relative to dir or possibly its a srapath
-         * accession
-         *
-         */
-        rc = VPathMakeDirectoryRelative ( &vpath, dir, path );
-        if ( rc == 0 )
-        {
-            rc = VFSManagerOpenDirectoryReadDirectoryRelativeDecrypt ( vmgr, dir, &ldir, vpath );
-
-            if ( rc == 0 )
-            {
-                *type = (~kptAlias) & KDBPathType ( ldir, NULL, "." );
-
-                /* just a directory, not a kdb type */
-                if ( *type == kptDir )
-                    rc = RC (rcDB, rcMgr, rcOpening, rcPath, rcIncorrect);
-
-                else if ( *type != pathtype )
-                {
-                    KDirectoryRelease( ldir );
-                    rc = RC ( rcDB, rcMgr, rcOpening, rcobj, rcIncorrect );
-                }
-                else
-                {
-                    if ( pdir != NULL )
-                        *pdir = ldir;
-                    else
-                        KDirectoryRelease( ldir );
-                }
-            }
-            VPathRelease ( vpath );
-        }
-    }
-    return rc;
-}
-
-rc_t KDBOpenPathTypeRead ( const KDBManager * mgr, const KDirectory * dir, const char * path, 
-    const KDirectory ** pdir, int pathtype, int * ppathtype, bool try_srapath )
-{
-    const KDirectory *ldir;
-    rc_t rc = 0;
-    uint32_t rcobj;
-    int type = kptNotFound; /* bogus? */
-
-/*     KOutMsg ("%s: %s\n", __func__, path); */
-
-    if ( pdir != NULL )
-        *pdir = NULL;
-    if ( ppathtype != NULL )
-        *ppathtype = type;
-
-    switch (pathtype & ~ kptAlias) /* tune the error message based on path type */
-    {
-        /* we'll hit this if we don't track defines in kdb/manager.h */
-    default:
-        rc = RC (rcDB, rcMgr, rcOpening, rcType, rcInvalid);
-        return rc;
-
-    case kptTable:
-    case kptPrereleaseTbl:
-        rcobj = rcTable;
-        break;
-
-    case kptColumn:
-        rcobj = rcColumn;
-        break;
-
-    case kptDatabase:
-    case kptDatabase | kptAlias:
-        rcobj = rcDatabase;
-        break;
-    }
-
-    rc = KDBOpenPathTypeReadInt( mgr, dir, path, &ldir, &type, pathtype, rcobj, try_srapath );
-
-    if (rc == 0)
-    {
-        if ( ppathtype != NULL )
-            *ppathtype = type;
-
-        if (pdir != NULL)
-            *pdir = ldir;
-        else
-            KDirectoryRelease (ldir);
-    }
-
-    return rc;
-}
-
-
-/* Writable
- *  examines a directory structure for any "lock" files
- */
-rc_t KDBWritable ( const KDirectory *dir, const char *path )
-{
-    uint32_t access;
-    rc_t rc;
-
-    /* protect us from bad parameters */
-    if (dir == NULL)
-        return RC (rcDB, rcPath, rcAccessing, rcDirectory, rcNull);
-    if (path == NULL)
-        return RC (rcDB, rcPath, rcAccessing, rcPath, rcNull);
-
-    /* we have to be able to check the access if it is to be writable */
-    rc = KDirectoryAccess ( dir, & access, "%s", path );
-    if ( rc == 0 )
-    {
-        /* if there is a lock (or deprecated sealed) file in this directory */
-        switch ( KDirectoryPathType ( dir, "%s/lock", path ) )
-        {
-        case kptFile:
-        case kptFile | kptAlias:
-            rc = RC ( rcDB, rcPath, rcAccessing, rcLock, rcLocked );
-            break;
-        case kptNotFound:
-            /* much simpler handling for the sealed file */
-            switch ( KDirectoryPathType ( dir, "%s/sealed", path ) )
-            {
-            case kptFile:
-            case kptFile | kptAlias:
-                rc = RC ( rcDB, rcPath, rcAccessing, rcLock, rcLocked );
-                break;
-            case kptNotFound:
-                /* check if there are no write permissions */
-                if ( ( access & 0222 ) == 0 )
-                    rc = RC ( rcDB, rcPath, rcAccessing, rcPath, rcReadonly );
-                /* else rc is still 0 from VAccess */
-            }
-            break;
-        case kptBadPath:
-            /* likely to be a non-driectory or something */
-            rc = RC ( rcDB, rcPath, rcAccessing, rcPath, rcInvalid);
-            break;
-        default:
-            /* an illegal type of object named "lock" is in this directory
-             * which will block the ability to lock it
-             */
-            rc = RC ( rcDB, rcPath, rcAccessing, rcPath, rcIncorrect );
-        }
-    }
-    return rc;
-}
-
-
-bool KDBIsLocked ( const KDirectory *dir, const char *path )
-{
-    return ( KDBWritable (dir, path) != 0 );
-}
-
-
-/* GetObjModDate
- *  extract mod date from a path
- */
-rc_t KDBGetObjModDate ( const KDirectory *dir, KTime_t *mtime )
-{
-    /* HACK ALERT - there needs to be a proper way to record modification times */
-    
-    /* this only tells the last time the table was locked,
-       which may be close to the last time it was modified */
-    rc_t rc = KDirectoryDate ( dir, mtime, "lock" );
-    if ( rc == 0 )
-        return 0;
-
-    if ( GetRCState ( rc ) == rcNotFound )
-    {
-        rc = KDirectoryDate ( dir, mtime, "sealed" );
-        if ( rc == 0 )
-            return 0;
-    }
-
-    /* get directory timestamp */
-    rc = KDirectoryDate ( dir, mtime, "." );
-    if ( rc == 0 )
-        return 0;
-
-    * mtime = 0;
-    return rc;
-}
-
-/* GetPathModDate
- *  extract mod date from a path
- */
-rc_t KDBVGetPathModDate ( const KDirectory *dir,
-    KTime_t *mtime, const char *path, va_list args )
-{
-    rc_t rc;
-    uint32_t ptype;
-    const KDirectory *obj_dir;
-
-    va_list cpy;
-    va_copy ( cpy, args );
-    ptype = KDirectoryVPathType ( dir, path, cpy );
-    va_end ( cpy );
-
-    switch ( ptype )
-    {
-    case kptDir:
-    case kptDir | kptAlias:
-        break;
-
-    default:
-        return KDirectoryVDate ( dir, mtime, path, args );
-    }
-
-    * mtime = 0;
-    rc = KDirectoryVOpenDirRead ( dir, & obj_dir, true, path, args );
-    if ( rc == 0 )
-    {
-        rc = KDBGetObjModDate ( obj_dir, mtime );
-        KDirectoryRelease ( obj_dir );
-    }
-
-    return rc;
-}
-
-
-/* KDBVMakeSubPath
- *  adds a namespace to path spec
- */
-rc_t KDBVMakeSubPath ( struct KDirectory const *dir,
-    char *subpath, size_t subpath_max, const char *ns,
-    uint32_t ns_size, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( ns_size > 0 )
-    {
-        subpath += ns_size + 1;
-        subpath_max -= ns_size + 1;
-    }
-
-#if CRUFTY_USE_OF_RESOLVE_PATH
-    /* because this call only builds a path instead of resolving anything
-     * is is okay that we are using the wrong directory */
-    rc = KDirectoryVResolvePath ( dir, false,
-        subpath, subpath_max, path, args );
-#else
-    {
-        int sz = vsnprintf ( subpath, subpath_max, path, args );
-        if ( sz < 0 || ( size_t ) sz >= subpath_max )
-            rc = RC ( rcDB, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-        else if ( sz == 0 )
-            rc = RC ( rcDB, rcDirectory, rcResolving, rcPath, rcEmpty );
-        else
-        {
-            rc = 0;
-        }
-    }
-#endif
-    switch ( GetRCState ( rc ) )
-    {
-    case 0:
-        assert ( subpath [ 0 ] != 0 );
-        if ( subpath [ 0 ] == '.' || subpath [ 1 ] == '/' )
-            return RC ( rcDB, rcDirectory, rcResolving, rcPath, rcInvalid );
-        break;
-    case rcInsufficient:
-        return RC ( rcDB, rcDirectory, rcResolving, rcPath, rcExcessive );
-    default:
-        return rc;
-    }
-
-    if ( ns_size != 0 )
-    {
-        subpath -= ns_size + 1;
-        memcpy ( subpath, ns, ns_size );
-        subpath [ ns_size ] = '/';
-    }
-    return rc;
-}
-
-/* KDBMakeSubPath
- *  adds a namespace to path spec
- */
-rc_t KDBMakeSubPath ( struct KDirectory const *dir,
-    char *subpath, size_t subpath_max, const char *ns,
-    uint32_t ns_size, const char *path, ... )
-{
-    rc_t rc = 0;
-    va_list args;
-    va_start(args, path);
-    rc = KDBVMakeSubPath(dir, subpath, subpath_max, ns, ns_size, path, args);
-    va_end(args);
-    return rc;
-}
-
-/* this is included to make kdb.c vs. wkdb.c file comparisons easier in [x]emacs.*/
-#if NOT_USED_IN_READ_ONLY_SIDE
-/* VDrop
- */
-static
-rc_t KDBDropInt ( KDirectory * dir, const KDBManager * mgr,
-                  const char * path )
-{
-}
-
-rc_t KDBMgrVDrop ( KDirectory * dir, const KDBManager * mgr, uint32_t obj_type,
-                   const char * path, va_list args )
-{
-}
-#endif
-
-/* KDBIsPathUri
- * A hack to get some of VFS into KDB that is too tightly bound to KFS
- */
-
-bool KDBIsPathUri (const char * path)
-{
-    const char * pc;
-    size_t z;
-
-    z = string_size (path);
-
-    if (NULL != (pc = string_chr (path, z, ':')))
-        return true;
-
-    if (NULL != (pc = string_chr (path, z, '?')))
-        return true;
-
-    if (NULL != (pc = string_chr (path, z, '#')))
-        return true;
-
-    return false;
-}
diff --git a/libs/kdb/kdbfmt-priv.h b/libs/kdb/kdbfmt-priv.h
deleted file mode 100644
index 1ffc30f..0000000
--- a/libs/kdb/kdbfmt-priv.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kdbfmt_priv_
-#define _h_kdbfmt_priv_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KDBHdr
- *  the various file types used:
- *
- *  a) metadata
- *  b) key => id
- *  c) id => key
- *
- * will begin with a standard header to tag format
- */
-#define eByteOrderTag 0x05031988
-#define eByteOrderReverse 0x88190305
-
-typedef struct KDBHdr KDBHdr;
-struct KDBHdr
-{
-    uint32_t endian;
-    uint32_t version;
-};
-
-/* KDBHdrInit
- *  simple initialization
- */
-#define KDBHdrInit( hdr, vers ) \
-    ( void ) ( ( hdr ) -> endian = eByteOrderTag, ( hdr ) -> version = vers )
-
-/* KDBHdrValidate
- *  validates that a header sports a supported byte order
- *  and that the version is within range
- */
-rc_t KDBHdrValidate ( const KDBHdr *hdr, size_t size,
-    uint32_t min_vers, uint32_t max_vers );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kdbfmt_priv_ */
diff --git a/libs/kdb/libkdb.vers.h b/libs/kdb/libkdb.vers.h
deleted file mode 100644
index 43643a6..0000000
--- a/libs/kdb/libkdb.vers.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define LIBKDB_VERS 0x02070014
diff --git a/libs/kdb/meta.c b/libs/kdb/meta.c
deleted file mode 100644
index 3c38650..0000000
--- a/libs/kdb/meta.c
+++ /dev/null
@@ -1,2141 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define TRACK_REFERENCES 0
-
-#include <kdb/extern.h>
-
-struct KMDataNodeNamelist;
-#define KNAMELIST_IMPL struct KMDataNodeNamelist
-
-#define KONST const
-#include "kdb-priv.h"
-#include "dbmgr-priv.h"
-#include "database-priv.h"
-#include "table-priv.h"
-#include "column-priv.h"
-#include "kdbfmt-priv.h"
-#undef KONST
-
-#include <kdb/meta.h>
-#include <kdb/namelist.h>
-#include <klib/container.h>
-#include <klib/pbstree.h>
-#include <klib/namelist.h>
-#include <klib/impl.h>
-#include <kfs/file.h>
-#include <kfs/mmap.h>
-#include <klib/refcount.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <strtol.h>
-#include <os-native.h>
-#include <sysalloc.h>
-#include <strtol.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <byteswap.h>
-#include <assert.h>
-
-#define KMETADATAVERS 2
-#define NODE_SIZE_LIMIT ( 25 * 1024 * 1024 )
-#define NODE_CHILD_LIMIT ( 100 * 1024 )
-
-
-typedef struct KMDataNodeInflateData KMDataNodeInflateData;
-struct KMDataNodeInflateData
-{
-    const KMetadata *meta;
-    const KMDataNode *par;
-    BSTree *bst;
-    size_t node_size_limit;
-    uint32_t node_child_limit;
-    rc_t rc;
-    bool byteswap;
-};
-
-/*--------------------------------------------------------------------------
- * KMetadata
- *  a versioned, hierarchical structure
- */
-struct KMetadata
-{
-    const KDirectory *dir;
-    const KDBManager *mgr;
-
-    /* owner */
-    const KDatabase *db;
-    const KTable *tbl;
-    const KColumn *col;
-
-    /* root node */
-    KMDataNode *root;
-
-    KRefcount refcount;
-    uint32_t vers;
-    uint32_t rev;
-    bool byteswap;
-    char path [ 1 ];
-};
-
-static
-KMetadata *KMetadataAttach ( const KMetadata *self );
-
-static
-rc_t KMetadataSever ( const KMetadata *self );
-
-
-/*--------------------------------------------------------------------------
- * KMAttrNode
- */
-typedef struct KMAttrNode KMAttrNode;
-struct KMAttrNode
-{
-    BSTNode n;
-    void *value;
-    size_t vsize;
-    char name [ 1 ];
-};
-
-static
-int64_t CC KMAttrNodeCmp ( const void *item, const BSTNode *n )
-{
-#define a ( ( const char* ) item )
-#define b ( ( const KMAttrNode* ) n )
-
-    return strcmp ( a, b -> name );
-
-#undef a
-#undef b
-}
-
-static
-int64_t CC KMAttrNodeSort ( const BSTNode *item, const BSTNode *n )
-{
-#define a ( ( const KMAttrNode* ) item )
-#define b ( ( const KMAttrNode* ) n )
-
-    return strcmp ( a -> name, b -> name );
-
-#undef a
-#undef b
-}
-
-static
-void CC KMAttrNodeWhack ( BSTNode *n, void *data )
-{
-    free ( n );
-}
-
-static
-bool CC KMAttrNodeInflate ( PBSTNode *n, void *data )
-{
-    KMAttrNode *b;
-    KMDataNodeInflateData *pb = data;
-
-    const char *name = n -> data . addr;
-    size_t size = strlen ( name );
-    if ( size >= n -> data . size )
-    {
-        pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcData, rcCorrupt );
-        return true;
-    }
-
-    /* v2 attributes are more easily allocated
-       as a single (name,value) block because
-       there are no other associated structures */
-    b = malloc ( sizeof * b + n -> data . size );
-    if ( b == NULL )
-    {
-        pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcMemory, rcExhausted );
-        return true;
-    }
-
-    b -> value = & b -> name [ 1 + size ];
-    b -> vsize = n -> data . size - size - 1;
-    memcpy ( b -> name, name, n -> data . size );
-    BSTreeInsert ( pb -> bst, & b -> n, KMAttrNodeSort );
-    return false;
-}
-
-
-/*--------------------------------------------------------------------------
- * KMDataNode
- *  a node with an optional value,
- *  optional attributes, and optional children
- *
- *  nodes are identified by path, relative to a starting node,
- *  where "/" serves as a path separator.
- */
-struct KMDataNode
-{
-    BSTNode n;
-    const KMDataNode *par;
-    const KMetadata *meta;
-    void *value;
-    size_t vsize;
-    BSTree attr;
-    BSTree child;
-    KRefcount refcount;
-    char name [ 1 ];
-};
-
-static
-int64_t CC KMDataNodeCmp ( const void *item, const BSTNode *n )
-{
-#define a ( ( const char* ) item )
-#define b ( ( const KMDataNode* ) n )
-
-    return strcmp ( a, b -> name );
-
-#undef a
-#undef b
-}
-
-static
-int64_t CC KMDataNodeSort ( const BSTNode *item, const BSTNode *n )
-{
-#define a ( ( const KMDataNode* ) item )
-#define b ( ( const KMDataNode* ) n )
-
-    return strcmp ( a -> name, b -> name );
-
-#undef a
-#undef b
-}
-
-static
-void CC KMDataNodeWhack ( BSTNode *n, void *data )
-{
-    KMDataNode *self = ( KMDataNode* ) n;
-
-    REFMSG ( "KMDataNode", "flush", & self -> refcount );
-
-    self -> meta = NULL;
-    atomic32_inc ( & self -> refcount );
-    KMDataNodeRelease ( self );
-}
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KMDataNodeAddRef ( const KMDataNode *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KMDataNode" ) )
-        {
-        case krefLimit:
-            return RC ( rcDB, rcMetadata, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeRelease ( const KMDataNode *cself )
-{
-    KMDataNode *self = ( KMDataNode* ) cself;
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KMDataNode" ) )
-        {
-        case krefOkay:
-            return KMetadataSever ( self -> meta );
-        case krefWhack:
-
-            if ( self -> meta != NULL )
-                return KMetadataSever ( self -> meta );
-
-            KRefcountWhack ( & self -> refcount, "KMDataNode" );
-
-            BSTreeWhack ( & self -> attr, KMAttrNodeWhack, NULL );
-            BSTreeWhack ( & self -> child, KMDataNodeWhack, NULL );
-            free ( self -> value );
-            free ( self );
-            break;
-
-        case krefNegative:
-            return RC ( rcDB, rcMetadata, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Inflate
- */
-static
-bool CC KMDataNodeInflate_v1 ( PBSTNode *n, void *data )
-{
-    void *value;
-    KMDataNode *b;
-    KMDataNodeInflateData *pb = data;
-
-    /* v1 metadata are flat, with the name
-       stored as a NUL terminated string
-       followed by value payload */
-    const char *name = n -> data . addr;
-    size_t size = strlen ( name );
-    if ( size >= n -> data . size )
-    {
-        pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcData, rcCorrupt );
-        return true;
-    }
-
-    b = malloc ( sizeof * b + size );
-    if ( b == NULL )
-    {
-        pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcMemory, rcExhausted );
-        return true;
-    }
-
-    b -> par = pb -> par;
-    b -> meta = pb -> meta;
-    b -> value = ( void* ) ( name + size + 1 );
-    b -> vsize = n -> data . size - size - 1;
-    BSTreeInit ( & b -> attr );
-    BSTreeInit ( & b -> child );
-    KRefcountInit ( & b -> refcount, 0, "KMDataNode", "inflate", name );
-    strcpy ( b -> name, name );
-     
-    /* a name with no associated value */
-    if ( b -> vsize == 0 )
-    {
-        b -> value = NULL;
-        BSTreeInsert ( pb -> bst, & b -> n, KMDataNodeSort );
-        return false;
-    }
-
-    /* allocate value because v2+ code expects this */
-    value = malloc ( b -> vsize );
-    if ( value != NULL )
-    {
-        memcpy ( value, b -> value, b -> vsize );
-        b -> value = value;
-        BSTreeInsert ( pb -> bst, & b -> n, KMDataNodeSort );
-        return false;
-    }
-
-    pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcMemory, rcExhausted );
-    free ( b );
-    return true;
-}
-
-static
-rc_t KMDataNodeInflateAttr ( KMDataNode *n, bool byteswap )
-{
-    PBSTree *bst;
-    rc_t rc = PBSTreeMake ( & bst, n -> value, n -> vsize, byteswap );
-    if ( rc != 0 )
-        rc = RC ( rcDB, rcMetadata, rcConstructing, rcData, rcCorrupt );
-    else
-    {
-        KMDataNodeInflateData pb;
-        size_t bst_size = PBSTreeSize ( bst );
-        
-        pb . meta = n -> meta;
-        pb . par = n;
-        pb . bst = & n -> attr;
-        pb . node_size_limit = NODE_SIZE_LIMIT;
-        pb . node_child_limit = NODE_CHILD_LIMIT;
-        pb . rc = 0;
-        pb . byteswap = byteswap;
-        PBSTreeDoUntil ( bst, 0, KMAttrNodeInflate, & pb );
-        rc = pb . rc;
-        
-        PBSTreeWhack ( bst );
-        
-        n -> value = ( char* ) n -> value + bst_size;
-        n -> vsize -= bst_size;
-    }
-    return rc;
-}
-
-static
-bool CC KMDataNodeInflate ( PBSTNode *n, void *data );
-
-static
-rc_t KMDataNodeInflateChild ( KMDataNode *n,
-    size_t node_size_limit, uint32_t node_child_limit, bool byteswap )
-{
-    PBSTree *bst;
-    rc_t rc = PBSTreeMake ( & bst, n -> value, n -> vsize, byteswap );
-    if ( rc != 0 )
-        rc = RC ( rcDB, rcMetadata, rcConstructing, rcData, rcCorrupt );
-    else
-    {
-        uint32_t bst_count = PBSTreeCount ( bst );
-        size_t bst_size = PBSTreeSize ( bst );
-        if ( bst_count > node_child_limit )
-        {
-            PLOGMSG ( klogWarn, ( klogWarn,
-                                  "refusing to inflate metadata node '$(node)' within file '$(path)': "
-                                  "number of children ($(num_children)) exceeds limit ($(limit))."
-                                  , "node=%s,path=%s,num_children=%u,limit=%u"
-                                  , n -> name
-                                  , n -> meta -> path
-                                  , bst_count
-                                  , node_child_limit )
-                );
-        }
-        else if ( bst_size > node_size_limit )
-        {
-            PLOGMSG ( klogWarn, ( klogWarn,
-                                  "refusing to inflate metadata node '$(node)' within file '$(path)': "
-                                 "node size ($(node_size)) exceeds limit ($(limit))."
-                                 , "node=%s,path=%s,node_size=%zu,limit=%zu"
-                                 , n -> name
-                                 , n -> meta -> path
-                                 , bst_size
-                                 , node_size_limit )
-                );
-        }
-        else
-        {
-            KMDataNodeInflateData pb;
-            pb . meta = n -> meta;
-            pb . par = n;        
-            pb . bst = & n -> child;
-            pb . node_size_limit = node_size_limit;
-            pb . node_child_limit = node_child_limit;
-            pb . rc = 0;
-            pb . byteswap = byteswap;
-            PBSTreeDoUntil ( bst, 0, KMDataNodeInflate, & pb );
-            rc = pb . rc;
-        }
-        
-        PBSTreeWhack ( bst );
-        
-        n -> value = ( char* ) n -> value + bst_size;
-        n -> vsize -= bst_size;
-    }
-    return rc;
-}
-
-static
-bool CC KMDataNodeInflate ( PBSTNode *n, void *data )
-{
-    KMDataNode *b;
-    KMDataNodeInflateData *pb = data;
-
-    /* v2 names are preceded by a decremented length byte
-       that has its upper two bits dedicated to
-       signaling existence of attributes & children */
-    const char *name = n -> data . addr;
-    int bits = * ( ( const uint8_t* ) name ++ );
-    size_t size = ( bits >> 2 ) + 1;
-    if ( size >= n -> data . size )
-    {
-        pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcData, rcCorrupt );
-        return true;
-    }
-
-    b = malloc ( sizeof * b + size );
-    if ( b == NULL )
-    {
-        pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcMemory, rcExhausted );
-        return true;
-    }
-
-    b -> par = pb -> par;
-    b -> meta = pb -> meta;
-    b -> value = ( void* ) ( name + size );
-    b -> vsize = n -> data . size - size - 1;
-    BSTreeInit ( & b -> attr );
-    BSTreeInit ( & b -> child );
-    KRefcountInit ( & b -> refcount, 0, "KMDataNode", "inflate", b -> name );
-    memcpy ( b -> name, name, size );
-    b -> name [ size ] = 0;
-
-    pb -> rc = ( bits & 1 ) != 0 ? KMDataNodeInflateAttr ( b, pb -> byteswap ) : 0;
-    if ( pb -> rc == 0 )
-    {
-        pb -> rc = ( bits & 2 ) != 0 ?
-            KMDataNodeInflateChild ( b, pb -> node_size_limit, pb -> node_child_limit, pb -> byteswap ) : 0;
-        if ( pb -> rc == 0 )
-        {
-            void *value;
-
-            if ( b -> vsize == 0 )
-            {
-                b -> value = NULL;
-                BSTreeInsert ( pb -> bst, & b -> n, KMDataNodeSort );
-                return false;
-            }
-
-            value = malloc ( b -> vsize );
-            if ( value != NULL )
-            {
-                memcpy ( value, b -> value, b -> vsize );
-                b -> value = value;
-                BSTreeInsert ( pb -> bst, & b -> n, KMDataNodeSort );
-                return false;
-            }
-            pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcMemory, rcExhausted );
-
-            BSTreeWhack ( & b -> child, KMDataNodeWhack, NULL );
-        }
-
-        BSTreeWhack ( & b -> attr, KMAttrNodeWhack, NULL );
-    }
-
-    free ( b );
-    return true;
-}
-
-
-/* Find
- */
-static
-rc_t KMDataNodeFind ( const KMDataNode *self, const KMDataNode **np, char **path )
-{
-    const KMDataNode *found;
-
-    char *end, *name = * path;
-
-    /* interpret leading '/' */
-    if ( name [ 0 ] == '/' )
-    {
-        while ( self -> par != NULL )
-            self = self -> par;
-        ++ name;
-    }
-
-    /* find node */
-    for ( found = self; name != NULL; self = found, name = end )
-    {
-        /* segment path */
-        end = strchr ( name, '/' );
-        if ( end != NULL )
-            * end ++ = 0;
-
-        /* interpret special paths */
-        switch ( name [ 0 ] )
-        {
-        case 0:
-            continue;
-        case '.':
-            switch ( name [ 1 ] )
-            {
-            case 0:
-                continue;
-            case '.':
-                if ( name [ 2 ] == 0 )
-                {
-                    /* this is a backup */
-                    if ( ( self = self -> par ) == NULL )
-                        return RC ( rcDB, rcMetadata, rcSelecting, rcPath, rcInvalid );
-                    continue;
-                }
-                break;
-            }
-            break;
-        }
-
-        /* find actual path */
-        found = ( const KMDataNode* )
-            BSTreeFind ( & self -> child, name, KMDataNodeCmp );
-        if ( found == NULL )
-        {
-            /* not found also gets partially found state */
-            if ( end != NULL )
-                end [ -1 ] = '/';
-            * path = name;
-            * np = self;
-            return SILENT_RC ( rcDB, rcMetadata, rcSelecting, rcPath, rcNotFound );
-        }
-    }
-
-    /* the current self is our guy */
-    * np = self;
-    return 0;
-}
-
-
-/* OpenNodeRead
- * VOpenNodeRead
- *  opens a metadata node
- *
- *  "node" [ OUT ] - return parameter for indicated metadata node
- *
- *  "path" [ IN, NULL OKAY ] - optional path for specifying named
- *  node within metadata hierarchy. when NULL, empty, ".", or "/",
- *  return root node in "node". path separator is "/".
- */
-LIB_EXPORT rc_t CC KMDataNodeVOpenNodeRead ( const KMDataNode *self,
-    const KMDataNode **node, const char *path, va_list args )
-{
-    rc_t rc;
-    KMDataNode *found;
-    char full [ 4096 ], *p = full;
-
-    if ( node == NULL )
-        return RC ( rcDB, rcNode, rcOpening, rcParam, rcNull );
-
-    * node = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcNode, rcOpening, rcSelf, rcNull );
-
-    /* handle special NULL path */
-    if ( path == NULL )
-        full [ 0 ] = 0;
-    else
-    {
-        int len;
-
-        /* generate full path */
-        if ( args == NULL )
-            len = snprintf ( full, sizeof full, "%s", path );
-        else
-            len = vsnprintf ( full, sizeof full, path, args );
-        if ( len < 0 || len >= sizeof full )
-            return RC ( rcDB, rcNode, rcOpening, rcPath, rcExcessive );
-    }
-
-    rc = KMDataNodeFind ( self, ( const KMDataNode** ) & found, & p );
-    if ( rc == 0 )
-    {
-        KMetadataAttach ( found -> meta );
-        KMDataNodeAddRef ( found );
-        * node = found;
-    }
-
-    DBGMSG(DBG_KDB, DBG_FLAG(DBG_KDB_KDB),
-                ("KMDataNodeVOpenNodeRead(%s) = %d\n", full, rc));
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeOpenNodeRead ( const KMDataNode *self,
-    const KMDataNode **node, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KMDataNodeVOpenNodeRead ( self, node, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMetadataVOpenNodeRead ( const KMetadata *self,
-    const KMDataNode **node, const char *path, va_list args )
-{
-    rc_t rc = 0;
-
-    if ( node == NULL )
-        rc = RC ( rcDB, rcMetadata, rcOpening, rcParam, rcNull );
-    else if ( self == NULL )
-    {
-        * node = NULL;
-        rc = RC ( rcDB, rcMetadata, rcOpening, rcSelf, rcNull );
-    }
-    else
-        rc = KMDataNodeVOpenNodeRead ( self -> root, node, path, args );
-
-    DBGMSG(DBG_KDB, DBG_FLAG(DBG_KDB_KDB),
-                ("KMetadataVOpenNodeRead(%s) = %d\n", path, rc));
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMetadataOpenNodeRead ( const KMetadata *self,
-    const KMDataNode **node, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KMetadataVOpenNodeRead ( self, node, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* ByteOrder
- *  indicates whether original byte order is reversed
- *  under current architecture.
- *
- *  the byte order of the column is established by
- *  the host architecture when created.
- *
- *  "reversed" [ OUT ] - if true, the original byte
- *  order is reversed with regard to host native byte order.
- */
-LIB_EXPORT rc_t CC KMDataNodeByteOrder ( const KMDataNode *self, bool *reversed )
-{
-    if ( self != NULL )
-        return KMetadataByteOrder ( self -> meta, reversed );
-
-    if ( reversed == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcParam, rcNull );
-
-    * reversed = false;
-    return RC ( rcDB, rcMetadata, rcAccessing, rcSelf, rcNull );
-}
-
-
-/* Read
- *  read a node value or attribute
- *
- *  "offset" [ IN ] - initial offset into metadata
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - number of bytes actually read
- *
- *  "remaining" [ OUT, NULL OKAY ] - optional return parameter for
- *  the number of bytes remaining to be read.
- *  specifically, "offset" + "num_read" + "remaining" == sizeof node data
- */
-LIB_EXPORT rc_t CC KMDataNodeRead ( const KMDataNode *self,
-    size_t offset, void *buffer, size_t bsize,
-    size_t *num_read, size_t *remaining )
-{
-    rc_t rc;
-
-    size_t dummy;
-    if ( remaining == NULL )
-        remaining = & dummy;
-
-    if ( num_read == NULL )
-        rc = RC ( rcDB, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcNode, rcReading, rcSelf, rcNull );
-        else if ( buffer == NULL && bsize != 0 )
-            rc = RC ( rcDB, rcNode, rcReading, rcBuffer, rcNull );
-        else
-        {
-            size_t to_read, avail = self -> vsize;
-            if ( offset > avail )
-                offset = avail;
-
-            to_read = avail -= offset;
-            if ( to_read > bsize )
-                to_read = bsize;
-
-            if ( to_read > 0 )
-                memcpy ( buffer, ( const char* ) self -> value + offset, to_read );
-
-            * num_read = to_read;
-            * remaining = avail - to_read;
-
-            return 0;
-        }
-
-        * num_read = 0;
-    }
-
-    * remaining = 0;
-    return rc;
-}
-
-
-/* Addr - PRIVATE
- *  reach into node and get address
- *  returns raw pointer and node size
- */
-LIB_EXPORT rc_t CC KMDataNodeAddr ( const KMDataNode *self,
-    const void **addr, size_t *size )
-{
-    rc_t rc;
-
-    size_t dummy;
-    if ( size == NULL )
-        size = & dummy;
-
-    if ( addr == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcMetadata, rcReading, rcSelf, rcNull );
-        else
-        {
-            * addr = self -> value;
-            * size = self -> vsize;
-
-            return 0;
-        }
-
-        * addr = NULL;
-    }
-
-    * size = 0;
-    return rc;
-}
-
-
-/* Read ( formatted )
- *  reads as integer or float value in native byte order
- *
- *  "bXX" [ OUT ] - return parameter for numeric value
- */
-LIB_EXPORT rc_t CC KMDataNodeReadB8 ( const KMDataNode *self, void *b8 )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, b8, 1,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-        if ( num_read < 1 )
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadB16 ( const KMDataNode *self, void *b16 )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, b16, 2,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-        if ( num_read < 2 )
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-
-        if ( self -> meta -> byteswap )
-            * ( uint16_t* ) b16 = bswap_16 ( * ( const uint16_t* ) b16 );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadB32 ( const KMDataNode *self, void *b32 )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, b32, 4,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-        if ( num_read < 4 )
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-
-        if ( self -> meta -> byteswap )
-            * ( uint32_t* ) b32 = bswap_32 ( * ( const uint32_t* ) b32 );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadB64 ( const KMDataNode *self, void *b64 )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, b64, 8,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-        if ( num_read < 8 )
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-
-        if ( self -> meta -> byteswap )
-            * ( uint64_t* ) b64 = bswap_64 ( * ( const uint64_t* ) b64 );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadB128 ( const KMDataNode *self, void *b128 )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, b128, 16,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-        if ( num_read < 16 )
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-
-        if ( self -> meta -> byteswap )
-        {
-            uint64_t *b64 = b128;
-            uint64_t tmp = bswap_64 ( b64 [ 0 ] );
-            b64 [ 0 ] = bswap_64 ( b64 [ 1 ] );
-            b64 [ 1 ] = tmp;
-        }
-    }
-    return rc;
-}
-
-
-/* ReadAs ( formatted )
- *  reads as integer or float value in native byte order
- *  casts smaller-sized values to desired size, e.g.
- *    uint32_t to uint64_t
- *
- *  "i" [ OUT ] - return parameter for signed integer
- *  "u" [ OUT ] - return parameter for unsigned integer
- *  "f" [ OUT ] - return parameter for double float
- */
-LIB_EXPORT rc_t CC KMDataNodeReadAsI16 ( const KMDataNode *self, int16_t *i )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, i, sizeof * i,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-
-        switch ( num_read )
-        {
-        case 1:
-            * i = ( ( const int8_t* ) i ) [ 0 ];
-            break;
-        case 2:
-            if ( self -> meta -> byteswap )
-                * i = bswap_16 ( * i );
-            break;
-        default:
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAsU16 ( const KMDataNode *self, uint16_t *u )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, u, sizeof * u,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-
-        switch ( num_read )
-        {
-        case 1:
-            * u = ( ( const uint8_t* ) u ) [ 0 ];
-            break;
-        case 2:
-            if ( self -> meta -> byteswap )
-                * u = bswap_16 ( * u );
-            break;
-        default:
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAsI32 ( const KMDataNode *self, int32_t *i )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, i, sizeof * i,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-
-        switch ( num_read )
-        {
-        case 1:
-            * i = ( ( const int8_t* ) i ) [ 0 ];
-            break;
-        case 2:
-            if ( self -> meta -> byteswap )
-                * i = bswap_16 ( ( ( const int16_t* ) i ) [ 0 ] );
-            else
-                * i = ( ( const int16_t* ) i ) [ 0 ];
-            break;
-        case 4:
-            if ( self -> meta -> byteswap )
-                * i = bswap_32 ( * i );
-            break;
-        default:
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAsU32 ( const KMDataNode *self, uint32_t *u )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, u, sizeof * u,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-
-        switch ( num_read )
-        {
-        case 1:
-            * u = ( ( const uint8_t* ) u ) [ 0 ];
-            break;
-        case 2:
-            if ( self -> meta -> byteswap )
-                * u = bswap_16 ( ( ( const uint16_t* ) u ) [ 0 ] );
-            else
-                * u = ( ( const uint16_t* ) u ) [ 0 ];
-            break;
-        case 4:
-            if ( self -> meta -> byteswap )
-                * u = bswap_32 ( * u );
-            break;
-        default:
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAsI64 ( const KMDataNode *self, int64_t *i )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, i, sizeof * i,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-
-        switch ( num_read )
-        {
-        case 1:
-            * i = ( ( const int8_t* ) i ) [ 0 ];
-            break;
-        case 2:
-            if ( self -> meta -> byteswap )
-                * i = bswap_16 ( ( ( const int16_t* ) i ) [ 0 ] );
-            else
-                * i = ( ( const int16_t* ) i ) [ 0 ];
-            break;
-        case 4:
-            if ( self -> meta -> byteswap )
-                * i = bswap_32 ( ( ( const int32_t* ) i ) [ 0 ] );
-            else
-                * i = ( ( const int32_t* ) i ) [ 0 ];
-            break;
-        case 8:
-            if ( self -> meta -> byteswap )
-                * i = bswap_64 ( * i );
-            break;
-        default:
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAsU64 ( const KMDataNode *self, uint64_t *u )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, u, sizeof * u,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-
-        switch ( num_read )
-        {
-        case 1:
-            * u = ( ( const uint8_t* ) u ) [ 0 ];
-            break;
-        case 2:
-            if ( self -> meta -> byteswap )
-                * u = bswap_16 ( ( ( const uint16_t* ) u ) [ 0 ] );
-            else
-                * u = ( ( const uint16_t* ) u ) [ 0 ];
-            break;
-        case 4:
-            if ( self -> meta -> byteswap )
-                * u = bswap_32 ( ( ( const uint32_t* ) u ) [ 0 ] );
-            else
-                * u = ( ( const uint32_t* ) u ) [ 0 ];
-            break;
-        case 8:
-            if ( self -> meta -> byteswap )
-                * u = bswap_64 ( * u );
-            break;
-        default:
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAsF64 ( const KMDataNode *self, double *f )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, f, sizeof * f,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-
-        switch ( num_read )
-        {
-        case 4:
-            if ( self -> meta -> byteswap )
-                * ( uint32_t* ) f = bswap_32 ( * ( const uint32_t* ) f );
-            * f = ( ( const float* ) f ) [ 0 ];
-            break;
-        case 8:
-            if ( self -> meta -> byteswap )
-                * ( uint64_t* ) f = bswap_64 ( * ( const uint64_t* ) f );
-            break;
-        default:
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-        }
-    }
-    return rc;
-}
-
-
-/* Read ( formatted )
- *  reads as C-string
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - output buffer for
- *  NUL terminated string.
- *
- *  "size" [ OUT ] - return parameter giving size of string
- *  not including NUL byte. the size is set both upon success
- *  and insufficient buffer space error.
- */
-LIB_EXPORT rc_t CC KMDataNodeReadCString ( const KMDataNode *self,
-    char *buffer, size_t bsize, size_t *size )
-{
-    size_t remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, buffer, bsize - 1, size, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-        {
-            * size += remaining;
-            return RC ( rcDB, rcMetadata, rcReading, rcBuffer, rcInsufficient );
-        }
-
-        buffer [ * size ] = 0;
-    }
-    return rc;
-}
-
-
-/* ReadAttr
- *  reads as NUL-terminated string
- *
- *  "name" [ IN ] - NUL terminated attribute name
- *
- *  "buffer" [ OUT ] and "bsize" - return parameter for attribute value
- *
- *  "size" [ OUT ] - return parameter giving size of string
- *  not including NUL byte. the size is set both upon success
- *  and insufficient buffer space error.
- */
-LIB_EXPORT rc_t CC KMDataNodeReadAttr ( const KMDataNode *self, const char *name,
-    char *buffer, size_t bsize, size_t *size )
-{
-    rc_t rc;
-
-    if ( size == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcMetadata, rcReading, rcSelf, rcNull );
-        else if ( name == NULL )
-            rc = RC ( rcDB, rcMetadata, rcReading, rcString, rcNull );
-        else if ( name [ 0 ] == 0 )
-            rc = RC ( rcDB, rcMetadata, rcReading, rcString, rcEmpty );
-        else if ( buffer == NULL && bsize != 0 )
-            rc = RC ( rcDB, rcMetadata, rcReading, rcBuffer, rcNull );
-        else
-        {
-            const KMAttrNode *n = ( const KMAttrNode* )
-                BSTreeFind ( & self -> attr, name, KMAttrNodeCmp );
-            if ( n == NULL )
-            {
-                * size = 0;
-                if ( bsize != 0 )
-                    buffer [ 0 ] = 0;
-                rc = SILENT_RC ( rcDB, rcMetadata, rcReading, rcAttr, rcNotFound );
-            }
-            else
-            {
-                * size = n -> vsize;
-                if ( n -> vsize < bsize )
-                {
-                    memcpy ( buffer, n -> value, n -> vsize );
-                    buffer [ n -> vsize ] = 0;
-                    return 0;
-                }
-
-                return RC ( rcDB, rcMetadata, rcReading, rcBuffer, rcInsufficient );
-            }
-        }
-
-        * size = 0;
-    }
-
-    return rc;
-}
-
-
-/* ReadAttrAs ( formatted )
- *  reads as integer or float value in native byte order
- *  casts smaller-sized values to desired size, e.g.
- *    uint32_t to uint64_t
- *
- *  "i" [ OUT ] - return parameter for signed integer
- *  "u" [ OUT ] - return parameter for unsigned integer
- *  "f" [ OUT ] - return parameter for double float
- */
-LIB_EXPORT rc_t CC KMDataNodeReadAttrAsI16 ( const KMDataNode *self, const char *attr, int16_t *i )
-{
-    rc_t rc;
-    if ( i == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t size;
-        char buffer [ 256 ];
-        rc = KMDataNodeReadAttr ( self, attr, buffer, sizeof buffer, & size );
-        if ( rc == 0 )
-        {
-            char *end;
-            int64_t val = strtoi64 ( buffer, & end, 0 );
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-            else if ( val < SHRT_MIN || val > SHRT_MAX )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcRange, rcExcessive );
-            else
-            {
-                * i = ( int16_t ) val;
-                return 0;
-            }
-        }
-
-        * i = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAttrAsU16 ( const KMDataNode *self, const char *attr, uint16_t *u )
-{
-    rc_t rc;
-    if ( u == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t size;
-        char buffer [ 256 ];
-        rc = KMDataNodeReadAttr ( self, attr, buffer, sizeof buffer, & size );
-        if ( rc == 0 )
-        {
-            char *end;
-            uint64_t val = strtou64 ( buffer, & end, 0 );
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-            else if ( val > USHRT_MAX )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcRange, rcExcessive );
-            else
-            {
-                * u = ( uint16_t ) val;
-                return 0;
-            }
-        }
-
-        * u = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAttrAsI32 ( const KMDataNode *self, const char *attr, int32_t *i )
-{
-    rc_t rc;
-    if ( i == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t size;
-        char buffer [ 256 ];
-        rc = KMDataNodeReadAttr ( self, attr, buffer, sizeof buffer, & size );
-        if ( rc == 0 )
-        {
-            char *end;
-            int64_t val = strtoi64 ( buffer, & end, 0 );
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-            else if ( val < INT_MIN || val > INT_MAX )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcRange, rcExcessive );
-            else
-            {
-                * i = ( int32_t ) val;
-                return 0;
-            }
-        }
-
-        * i = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAttrAsU32 ( const KMDataNode *self, const char *attr, uint32_t *u )
-{
-    rc_t rc;
-    if ( u == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t size;
-        char buffer [ 256 ];
-        rc = KMDataNodeReadAttr ( self, attr, buffer, sizeof buffer, & size );
-        if ( rc == 0 )
-        {
-            char *end;
-            uint64_t val = strtou64 ( buffer, & end, 0 );
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-            else if ( val > UINT_MAX )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcRange, rcExcessive );
-            else
-            {
-                * u = ( uint32_t ) val;
-                return 0;
-            }
-        }
-
-        * u = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAttrAsI64 ( const KMDataNode *self, const char *attr, int64_t *i )
-{
-    rc_t rc;
-    if ( i == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t size;
-        char buffer [ 256 ];
-        rc = KMDataNodeReadAttr ( self, attr, buffer, sizeof buffer, & size );
-        if ( rc == 0 )
-        {
-            char *end;
-            int64_t val =  strtoi64 ( buffer, & end, 0 );
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-            else
-            {
-                * i = val;
-                return 0;
-            }
-        }
-
-        * i = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAttrAsU64 ( const KMDataNode *self, const char *attr, uint64_t *u )
-{
-    rc_t rc;
-    if ( u == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t size;
-        char buffer [ 256 ];
-        rc = KMDataNodeReadAttr ( self, attr, buffer, sizeof buffer, & size );
-        if ( rc == 0 )
-        {
-            char *end;
-            uint64_t val =  strtou64 ( buffer, & end, 0 );
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-            else
-            {
-                * u = val;
-                return 0;
-            }
-        }
-
-        * u = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAttrAsF64 ( const KMDataNode *self, const char *attr, double *f )
-{
-    rc_t rc;
-    if ( f == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t size;
-        char buffer [ 256 ];
-        rc = KMDataNodeReadAttr ( self, attr, buffer, sizeof buffer, & size );
-        if ( rc == 0 )
-        {
-            char *end;
-            double val = strtod ( buffer, & end );
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-            else
-            {
-                * f = val;
-                return 0;
-            }
-        }
-
-        * f = 0.0;
-    }
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KMetadata
- *  a versioned, hierarchical structure
- */
-
-/* Whack
- */
-static
-rc_t KMetadataWhack ( KMetadata *self )
-{
-    rc_t rc = 0;
-
-    KRefcountWhack ( & self -> refcount, "KMetadata" );
-
-    if ( self -> db != NULL )
-    {
-        rc = KDatabaseSever ( self -> db );
-        if ( rc == 0 )
-            self -> db = NULL;
-    }
-    else if ( self -> tbl != NULL )
-    {
-        rc = KTableSever ( self -> tbl );
-        if ( rc == 0 )
-            self -> tbl = NULL;
-    }
-    else if ( self -> col != NULL )
-    {
-        rc = KColumnSever ( self -> col );
-        if ( rc == 0 )
-            self -> col = NULL;
-    }
-
-    if ( rc == 0 )
-        rc = KDBManagerSever ( self -> mgr );
-
-    if ( rc == 0 )
-    {
-        KDirectoryRelease ( self -> dir );
-        KMDataNodeWhack ( ( BSTNode* ) & self -> root -> n, NULL );
-        free ( self );
-        return 0;
-    }
-
-    KRefcountInit ( & self -> refcount, 1, "KMetadata", "whack", "kmeta" );
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KMetadataAddRef ( const KMetadata *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KMetadata" ) )
-        {
-        case krefLimit:
-            return RC ( rcDB, rcMetadata, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KMetadataRelease ( const KMetadata *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KMetadata" ) )
-        {
-        case krefWhack:
-            return KMetadataWhack ( ( KMetadata* ) self );
-        case krefNegative:
-            return RC ( rcDB, rcMetadata, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-static
-KMetadata *KMetadataAttach ( const KMetadata *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "KMetadata" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( KMetadata* ) self;
-}
-
-static
-rc_t KMetadataSever ( const KMetadata *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "KMetadata" ) )
-        {
-        case krefWhack:
-            return KMetadataWhack ( ( KMetadata* ) self );
-        case krefNegative:
-            return RC ( rcDB, rcMetadata, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Make
- */
-
-static
-rc_t KMetadataPopulate ( KMetadata *self, const KDirectory *dir, const char *path )
-{
-    const KFile *f;
-    rc_t rc = KDirectoryOpenFileRead ( dir, & f, "%s", path );
-    if ( rc == 0 )
-    {
-        const KMMap *mm;
-        rc = KMMapMakeRead ( & mm, f );
-        if ( rc == 0 )
-        {
-            size_t size;
-            const void *addr;
-            rc = KMMapSize ( mm, & size );
-            if ( rc == 0 )
-                rc = KMMapAddrRead ( mm, & addr );
-
-            if ( rc == 0 )
-            {
-                union
-                {
-                    KDBHdr v1;
-                    KDBHdr v2;
-                } hdrs;
-
-                const KDBHdr *hdr = ( const KDBHdr* ) addr;
-                const void *pbstree_src = hdr + 1;
-
-                rc = KDBHdrValidate ( hdr, size, 1, KMETADATAVERS );
-                if ( GetRCState ( rc ) == rcIncorrect && GetRCObject ( rc ) == rcByteOrder )
-                {
-                    hdrs . v1 . endian = bswap_32 ( hdr -> endian );
-                    hdrs . v1 . version = bswap_32 ( hdr -> version );
-                    rc = KDBHdrValidate ( & hdrs . v1, size, 1, KMETADATAVERS );
-                    if ( rc == 0 )
-                    {
-                        self -> byteswap = true;
-                        switch ( hdrs . v1 . version )
-                        {
-                        case 1:
-                            hdr = & hdrs . v1;
-                            break;
-                        case 2:
-                            hdr = & hdrs . v2;
-                            break;
-                        }
-                    }
-                }
-                if ( rc == 0 )
-                {
-                    PBSTree *bst;
-                    rc = PBSTreeMake ( & bst, pbstree_src, size - sizeof * hdr, self -> byteswap );
-                    if ( rc != 0 )
-                        rc = RC ( rcDB, rcMetadata, rcConstructing, rcData, rcCorrupt );
-                    else
-                    {
-                        KMDataNodeInflateData pb;
-
-                        pb . meta = self;
-                        pb . par = self -> root;
-                        pb . bst = & self -> root -> child;
-                        pb . node_size_limit = NODE_SIZE_LIMIT;
-                        pb . node_child_limit = NODE_CHILD_LIMIT;
-                        pb . rc = 0;
-                        pb . byteswap = self -> byteswap;
-
-                        if ( hdr -> version == 1 )
-                            PBSTreeDoUntil ( bst, 0, KMDataNodeInflate_v1, & pb );
-                        else
-                            PBSTreeDoUntil ( bst, 0, KMDataNodeInflate, & pb );
-                        rc = pb . rc;
-
-                        self -> vers = hdr -> version;
-
-                        PBSTreeWhack ( bst );
-                    }
-                }
-            }
-
-            KMMapRelease ( mm );
-        }
-
-        KFileRelease ( f );
-    }
-    return rc;
-}
-
-static
-rc_t KMetadataMakeRead ( KMetadata **metap,
-    const KDirectory *dir, const char *path, uint32_t rev )
-{
-    rc_t rc;
-    KMetadata *meta = malloc ( sizeof * meta + strlen ( path ) );
-    if ( meta == NULL )
-        rc = RC ( rcDB, rcMetadata, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        memset ( meta, 0, sizeof * meta );
-        meta -> root = calloc ( 1, sizeof * meta -> root );
-        if ( meta -> root == NULL )
-            rc = RC ( rcDB, rcMetadata, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            meta -> root -> meta = meta;
-            meta -> dir = dir;
-            KRefcountInit ( & meta -> refcount, 1, "KMetadata", "make-read", path );
-            meta -> rev = rev;
-            meta -> byteswap = false;
-            strcpy ( meta -> path, path );
-
-            KRefcountInit ( & meta -> root -> refcount, 0, "KMDataNode", "make-read", "/" );
-
-            rc = KMetadataPopulate ( meta, dir, path );
-            if ( rc == 0 )
-            {
-                KDirectoryAddRef ( dir );
-                * metap = meta;
-                return 0;
-            }
-
-            free ( meta -> root );
-        }
-
-        free ( meta );
-    }
-    * metap = NULL;
-    return rc;
-}
-
-
-/* OpenMetadataRead
- *  opens metadata for read
- *
- *  "meta" [ OUT ] - return parameter for metadata
- */
-static
-rc_t KDBManagerOpenMetadataReadInt ( const KDBManager *self,
-    KMetadata **metap, const KDirectory *wd, uint32_t rev, bool prerelease )
-{
-    char metapath [ 4096 ];
-    rc_t rc = ( prerelease == 1 ) ?
-        KDirectoryVResolvePath ( wd, true, metapath, sizeof metapath, "meta", NULL ):
-        ( ( rev == 0 ) ?
-          KDirectoryVResolvePath ( wd, true, metapath, sizeof metapath, "md/cur", NULL ):
-          KDirectoryResolvePath ( wd, true, metapath, sizeof metapath, "md/r%.3u", rev ) );
-    if ( rc == 0 )
-    {
-        KMetadata *meta;
-
-        switch ( KDirectoryPathType ( wd, "%s", metapath ) )
-        {
-        case kptNotFound:
-            return RC ( rcDB, rcMgr, rcOpening, rcMetadata, rcNotFound );
-        case kptBadPath:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcInvalid );
-        case kptFile:
-        case kptFile | kptAlias:
-            break;
-        default:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcIncorrect );
-        }
-
-        rc = KMetadataMakeRead ( & meta, wd, metapath, rev );
-        if ( rc == 0 )
-        {
-            meta -> mgr = KDBManagerAttach ( self );
-            * metap = meta;
-            return 0;
-        }
-    }
-    
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseOpenMetadataRead ( const KDatabase *self, const KMetadata **metap )
-{
-    rc_t rc;
-    KMetadata *meta;
-
-    if ( metap == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcParam, rcNull );
-
-    * metap = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcSelf, rcNull );
-
-    rc = KDBManagerOpenMetadataReadInt ( self -> mgr, & meta, self -> dir, 0, false );
-    if ( rc == 0 )
-    {
-        meta -> db = KDatabaseAttach ( self );
-        * metap = meta;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableOpenMetadataRead ( const KTable *self, const KMetadata **metap )
-{
-    rc_t rc;
-    KMetadata *meta;
-
-    if ( metap == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcParam, rcNull );
-
-    * metap = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcSelf, rcNull );
-
-    rc = KDBManagerOpenMetadataReadInt ( self -> mgr, & meta,
-        self -> dir, 0, self -> prerelease );
-    if ( rc == 0 )
-    {
-        meta -> tbl = KTableAttach ( self );
-        * metap = meta;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KColumnOpenMetadataRead ( const KColumn *self, const KMetadata **metap )
-{
-    rc_t rc;
-    KMetadata *meta;
-
-    if ( metap == NULL )
-        return RC ( rcDB, rcColumn, rcOpening, rcParam, rcNull );
-
-    * metap = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcColumn, rcOpening, rcSelf, rcNull );
-
-    rc = KDBManagerOpenMetadataReadInt ( self -> mgr, & meta, self -> dir, 0, false );
-    if ( rc == 0 )
-    {
-        meta -> col = KColumnAttach ( self );
-        * metap = meta;
-    }
-
-    return rc;
-}
-
-
-/* Version
- *  returns the metadata format version
- */
-LIB_EXPORT rc_t CC KMetadataVersion ( const KMetadata *self, uint32_t *version )
-{
-    if ( version == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcParam, rcNull );
-
-    if ( self == NULL )
-    {
-        * version = 0;
-        return RC ( rcDB, rcMetadata, rcAccessing, rcSelf, rcNull );
-    }
-
-    * version = self -> vers;
-    return 0;
-}
-
-
-/* ByteOrder
- *  indicates whether original byte order is reversed
- *  under current architecture.
- *
- *  the byte order of the column is established by
- *  the host architecture when created.
- *
- *  "reversed" [ OUT ] - if true, the original byte
- *  order is reversed with regard to host native byte order.
- */
-LIB_EXPORT rc_t CC KMetadataByteOrder ( const KMetadata *self, bool *reversed )
-{
-    if ( reversed == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcParam, rcNull );
-
-    if ( self == NULL )
-    {
-        * reversed = false;
-        return RC ( rcDB, rcMetadata, rcAccessing, rcSelf, rcNull );
-    }
-
-    * reversed = self -> byteswap;
-    return 0;
-}
-
-
-/* Revision
- *  returns current revision number
- *  where 0 ( zero ) means tip
- */
-LIB_EXPORT rc_t CC KMetadataRevision ( const KMetadata *self, uint32_t *revision )
-{
-    if ( revision == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcParam, rcNull );
-
-    if ( self == NULL )
-    {
-        * revision = 0;
-        return RC ( rcDB, rcMetadata, rcAccessing, rcSelf, rcNull );
-    }
-
-    * revision = self -> rev;
-    return 0;
-}
-
-
-/* MaxRevision
- *  returns the maximum revision available
- */
-LIB_EXPORT rc_t CC KMetadataMaxRevision ( const KMetadata *self, uint32_t *revision )
-{
-    if ( revision == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcParam, rcNull );
-
-    * revision = 0;
-
-    if ( self != NULL )
-    {
-        KNamelist *listing;
-        rc_t rc = KDirectoryList ( self -> dir,
-            & listing, NULL, NULL, "md" );
-        if ( rc == 0 )
-        {
-            uint32_t rev_max, count;
-            rc = KNamelistCount ( listing, & count );
-            if ( rc == 0 )
-            {
-                uint32_t idx;
-                for ( rev_max = idx = 0; idx < count; ++ idx )
-                {
-                    const char *name;
-                    
-                    rc = KNamelistGet ( listing, idx, & name );
-                    if ( rc != 0 )
-                        break;
-                    
-                    if ( name [ 0 ] == 'r' )
-                    {
-                        char *end;
-                        uint32_t rev = strtou32 ( name + 1, & end, 10 );
-                        if ( end [ 0 ] == 0 && rev > rev_max )
-                            rev_max = rev;
-                    }
-                }
-
-                * revision = rev_max;
-            }
-                
-            KNamelistRelease ( listing );
-        }
-        else if ( GetRCState ( rc ) == rcNotFound )
-        {
-            rc = 0;
-        }
-
-        return rc;
-    }
-
-    return RC ( rcDB, rcMetadata, rcAccessing, rcSelf, rcNull );
-}
-
-
-/* OpenRevision
- *  opens a read-only indexed revision of metadata
- */
-LIB_EXPORT rc_t CC KMetadataOpenRevision ( const KMetadata *self,
-    const KMetadata **metap, uint32_t revision )
-{
-    rc_t rc;
-    KMetadata *meta;
-
-    if ( metap == NULL )
-        return RC ( rcDB, rcMetadata, rcOpening, rcParam, rcNull );
-
-    * metap = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMetadata, rcOpening, rcSelf, rcNull );
-
-    rc = KDBManagerOpenMetadataReadInt ( self -> mgr,
-        & meta, self -> dir, revision, false );
-    if ( rc == 0 )
-    {
-        if ( self -> db != NULL )
-            meta -> db = KDatabaseAttach ( self -> db );
-        else if ( self -> tbl != NULL )
-            meta -> tbl = KTableAttach ( self -> tbl );
-        else if ( self -> col != NULL )
-            meta -> col = KColumnAttach ( self -> col );
-
-        * metap = meta;
-    }
-
-    return rc;
-}
-
-
-/* GetSequence
- *  access a named sequence
- *
- *  "seq" [ IN ] - NUL terminated sequence name
- *
- *  "val" [ OUT ] - return parameter for sequence value
- */
-LIB_EXPORT rc_t CC KMetadataGetSequence ( const KMetadata *self,
-    const char *seq, int64_t *val )
-{
-    rc_t rc;
-    const KMDataNode *found;
-
-    if ( val == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcParam, rcNull );
-
-    * val = 0;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcSelf, rcNull );
-
-    if ( seq == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcString, rcNull );
-    if ( seq [ 0 ] == 0 )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcString, rcInvalid );
-
-    rc = KMDataNodeOpenNodeRead
-        ( self -> root, & found, ".seq/%s", seq );
-    if ( rc == 0 )
-    {
-        size_t num_read, remaining;
-        rc = KMDataNodeRead ( found, 0, val, sizeof * val, & num_read, & remaining );
-        assert ( rc != 0 || ( num_read == sizeof * val && remaining == 0 ) );
-        KMDataNodeRelease ( found );
-    }
-
-    return rc;
-}
-
-
-
-/*--------------------------------------------------------------------------
- * KNamelist
- */
-typedef struct KMDataNodeNamelist KMDataNodeNamelist;
-struct KMDataNodeNamelist
-{
-    KNamelist dad;
-    const KMDataNode *node;
-    size_t count;
-    const char *namelist [ 1 ];
-};
-
-/* Whack
- */
-static
-rc_t CC KMDataNodeNamelistWhack ( KMDataNodeNamelist *self )
-{
-    rc_t rc = KMDataNodeRelease ( self -> node );
-    if ( rc == 0 )
-        free ( self );
-    return rc;
-}
-
-/* Count
- */
-static
-rc_t CC KMDataNodeNamelistCount ( const KMDataNodeNamelist *self, uint32_t *count )
-{
-    * count = ( uint32_t ) self -> count;
-    return 0;
-}
-
-/* Get
- */
-static
-rc_t CC KMDataNodeNamelistGet ( const KMDataNodeNamelist *self,
-    uint32_t idx, const char **name )
-{
-    if ( ( size_t ) idx >= self -> count )
-        return RC ( rcDB, rcNamelist, rcAccessing, rcParam, rcInvalid );
-    * name = self -> namelist [ idx ];
-    return 0;
-}
-
-/* Make
- */
-static KNamelist_vt_v1 vtKMDataNodeNamelist =
-{
-    /* version 1.0 */
-    1, 0,
-
-    /* start minor version 0 methods */
-    KMDataNodeNamelistWhack,
-    KMDataNodeNamelistCount,
-    KMDataNodeNamelistGet
-    /* end minor version 0 methods */
-};
-
-static
-rc_t KMDataNodeNamelistMake ( KNamelist **names, uint32_t count )
-{
-    rc_t rc;
-    KMDataNodeNamelist *self = calloc ( 1, sizeof * self -
-        sizeof self -> namelist + count * sizeof self -> namelist [ 0 ] );
-    if ( self == NULL )
-        rc = RC ( rcDB, rcMetadata, rcListing, rcMemory, rcExhausted );
-    else
-    {
-        rc = KNamelistInit ( & self -> dad,
-            ( const KNamelist_vt* ) & vtKMDataNodeNamelist );
-        if ( rc == 0 )
-        {
-            * names = & self -> dad;
-            return 0;
-        }
-        
-        free ( self );
-    }
-
-    return rc;
-}
-
-/* List
- *  create metadata node listings
- */
-static
-void CC KMDataNodeListCount ( BSTNode *n, void *data )
-{
-    * ( uint32_t* ) data += 1;
-}
-
-static
-void CC KMDataNodeGrabAttr ( BSTNode *n, void *data )
-{
-    KMDataNodeNamelist *list = data;
-    list -> namelist [ list -> count ++ ] = ( ( const KMAttrNode* ) n ) -> name;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeListAttr ( const KMDataNode *self, KNamelist **names )
-{
-    if ( names == NULL )
-        return RC ( rcDB, rcMetadata, rcListing, rcParam, rcNull );
-
-    * names = NULL;
-
-    if ( self != NULL )
-    {
-        rc_t rc;
-
-        uint32_t count = 0;
-        BSTreeForEach ( & self -> attr, 0, KMDataNodeListCount, & count );
-
-        rc = KMDataNodeNamelistMake ( names, count );
-        if ( rc == 0 )
-            BSTreeForEach ( & self -> attr, 0, KMDataNodeGrabAttr, * names );
-
-        return rc;
-    }
-
-    return RC ( rcDB, rcMetadata, rcListing, rcSelf, rcNull );
-}
-
-static
-void CC KMDataNodeGrabName ( BSTNode *n, void *data )
-{
-    KMDataNodeNamelist *list = data;
-    list -> namelist [ list -> count ++ ] = ( ( const KMDataNode* ) n ) -> name;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeListChildren ( const KMDataNode *self, KNamelist **names )
-{
-    if ( names == NULL )
-        return RC ( rcDB, rcMetadata, rcListing, rcParam, rcNull );
-
-    * names = NULL;
-
-    if ( self != NULL )
-    {
-        rc_t rc;
-
-        uint32_t count = 0;
-        BSTreeForEach ( & self -> child, 0, KMDataNodeListCount, & count );
-
-        rc = KMDataNodeNamelistMake ( names, count );
-        if ( rc == 0 )
-            BSTreeForEach ( & self -> child, 0, KMDataNodeGrabName, * names );
-
-        return rc;
-    }
-
-    return RC ( rcDB, rcMetadata, rcListing, rcSelf, rcNull );
-}
diff --git a/libs/kdb/ptrieval-v1.c b/libs/kdb/ptrieval-v1.c
deleted file mode 100644
index 6324288..0000000
--- a/libs/kdb/ptrieval-v1.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-
-#include "index-priv.h"
-#include "idstats-priv.h"
-
-#include <kdb/index.h>
-#include <klib/ptrie.h>
-#include <klib/text.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <limits.h>
-#include <stdio.h>
-#include <string.h>
-#include <endian.h>
-#include <byteswap.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * KPTrieIndexCCParms
- *  consistency check parameter block
- */
-typedef struct KPTrieIndexCCParms_v1 KPTrieIndexCCParms_v1;
-struct KPTrieIndexCCParms_v1
-{
-    KIdStats stats;
-    rc_t rc;
-    const KPTrieIndex_v1 *self;
-    const KIndex *outer;
-    bool key2id;
-    bool id2key;
-    bool failed;
-};
-
-/* Init
- */
-static
-void KPTrieIndexCCParmsInit_v1 ( KPTrieIndexCCParms_v1 *pb,
-    const KPTrieIndex_v1 *self, const KIndex *outer, bool key2id, bool id2key )
-{
-    KIdStatsInit ( & pb -> stats );
-    pb -> rc = 0;
-    pb -> self = self;
-    pb -> outer = outer;
-    pb -> key2id = key2id;
-    pb -> id2key = self -> id2node ? id2key : false;
-    pb -> failed = false;
-}
-
-/* Whack
- */
-static
-void KPTrieIndexCCParmsWhack_v1 ( KPTrieIndexCCParms_v1 *pb )
-{
-    KIdStatsWhack ( & pb -> stats );
-}
-
-/*--------------------------------------------------------------------------
- * KPTrieIndex_v1
- *  persisted keymap
- */
-
-/* CheckConsistency
- *  runs a consistency check as efficiently as possible
- *
- *  in all cases, we make use of "PTrieForEach" to visit each node
- *  using the natural storage order. each node returned is counted,
- *  read and inserted into a BSTree whose nodes merge adjacent and
- *  overlapping ids into existing nodes.
- *
- *  if running a deep "key->id" test, then the key is first regenerated
- *  from the node, and then used to retrieve the id via the KIndex.
- *
- *  if the projection index exists, the id is tested against the node
- *  to ensure that projection works. if "id->key" is true, then use
- *  the KIndex to produce a key and compare it against the node.
- */
-static
-bool CC KPTrieIndexCCVisit_v1 ( PTNode *n, void *data )
-{
-    KPTrieIndexCCParms_v1 *pb = data;
-    const KPTrieIndex_v1 *self = pb -> self;
-
-    /* payload of v1 PTNode is a 32-bit spot id */
-    uint32_t id;
-    assert ( n -> data . size == sizeof id );
-    memcpy ( & id, n -> data . addr, sizeof id );
-    if ( self -> byteswap )
-        id = bswap_32 ( id );
-
-    /* record the node, row id, and range of 1 */
-    pb -> rc = KIdStatsInsert ( & pb -> stats, id, 1 );
-    if ( pb -> rc != 0 )
-    {
-        PLOGERR ( klogSys, ( klogSys, pb -> rc, "failed when examining node id $(nid) with row id $(rid)",
-                              "nid=0x%08x,rid=%u", n -> id, id ));
-        return true;
-    }
-
-    /* if we have a projection index, test it */
-    if ( self -> id2node != NULL )
-    {
-        if ( id < self -> first || id > self -> last )
-        {
-            PLOGMSG ( klogWarn, ( klogWarn, "node id $(nid) with row id $(rid) is not within projection range of $(min_rid)..$(max_rid)",
-                                 "nid=0x%08x,rid=%u,min_rid=%u,max_rid=%u", n -> id, id, self -> first, self -> last ));
-            pb -> failed = true;
-            return false;
-        }
-        if ( self -> id2node [ id - self -> first ] != n -> id )
-        {
-            PLOGMSG ( klogWarn, ( klogWarn, "node id $(nid) with row id $(rid) does not match projection node id of $(pnid)",
-                                 "nid=0x%08x,rid=%u,pnid=0x%08x", n -> id, id, self -> id2node [ id - self -> first ] ));
-            pb -> failed = true;
-            return false;
-        }
-    }
-
-    /* if performing deeper tests */
-    if ( pb -> key2id || pb -> id2key )
-    {
-        rc_t rc;
-        int64_t start_id;
-        uint64_t id_count;
-
-        /* need to recover key from given node */
-        const String *orig;
-        pb -> rc = PTNodeMakeKey ( n, & orig );
-        if ( pb -> rc != 0 )
-        {
-            PLOGERR ( klogSys, ( klogSys, pb -> rc, "failed when retrieving text for node id $(nid) with row id $(rid)",
-                                 "nid=0x%08x,rid=%u", n -> id, id ));
-            return true;
-        }
-
-        /* key->id test */
-        if ( pb -> key2id )
-        {
-            rc = KIndexFindText ( pb -> outer, orig -> addr, & start_id, & id_count, NULL, NULL );
-            if ( rc != 0 )
-            {
-                PLOGERR ( klogWarn, ( klogWarn, rc, "failed to retrieve start id and count for key '$(key)', row id $(rid)",
-                                      "key=%S,rid=%u", orig, id ) );
-                pb -> failed = true;
-            }
-            else if ( start_id != ( int64_t ) id || id_count != 1 )
-            {
-                PLOGERR ( klogWarn, ( klogWarn, rc, "key '$(key)' maps to start id $(start_id), count $(id_count): expected id $(rid), count 1.",
-                                      "key=%S,rid=%u,start_id=%ld,id_count=%lu", orig, id, start_id, id_count ) );
-                pb -> failed = true;
-            }
-        }
-
-        /* id->key test */
-        if ( pb -> id2key )
-        {
-            char buffer [ 256 ], *key = buffer;
-            size_t key_size, bsize = sizeof buffer;
-            if ( sizeof buffer <= orig -> size )
-            {
-                key = malloc ( bsize = orig -> size + 1 );
-                if ( key == 0 )
-                {
-                    pb -> rc = RC ( rcDB, rcIndex, rcValidating, rcMemory, rcExhausted );
-                    StringWhack ( ( String* ) orig );
-                    return true;
-                }
-            }
-
-            rc = KIndexProjectText ( pb -> outer, id, & start_id, & id_count, key, bsize, & key_size );
-            if ( rc != 0 )
-            {
-                PLOGERR ( klogWarn, ( klogWarn, rc, "failed to retrieve key, start id and count for row id $(rid)",
-                                      "rid=%u", id ) );
-                pb -> failed = true;
-            }
-            else
-            {
-                if ( orig -> size != key_size || memcmp ( orig -> addr, key, key_size ) != 0 )
-                {
-                    PLOGERR ( klogWarn, ( klogWarn, rc, "row $(rid) maps to key '$(key)': expected key '$(orig)'.",
-                                          "rid=%u,key=%.*s,orig=%S", id, ( int ) key_size, key, orig ) );
-                    pb -> failed = true;
-                }
-                if ( start_id != ( int64_t ) id || id_count != 1 )
-                {
-                    PLOGERR ( klogWarn, ( klogWarn, rc, "single row $(rid) maps to start id $(start_id), count $(id_count).",
-                                          "rid=%u,id_count=%u,start_id=%ld", id, id_count, start_id ) );
-                    pb -> failed = true;
-                }
-            }
-
-            if ( key != buffer )
-                free ( key );
-        }
-
-        StringWhack ( ( String* ) orig );
-    }
-
-    return false;
-}
-
-rc_t KPTrieIndexCheckConsistency_v1 ( const KPTrieIndex_v1 *self,
-    int64_t *start_id, uint64_t *id_range, uint64_t *num_keys,
-    uint64_t *num_rows, uint64_t *num_holes,
-    const KIndex *outer, bool key2id, bool id2key )
-{
-    rc_t rc = 0;
-    KPTrieIndexCCParms_v1 pb;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcValidating, rcParam, rcNull );
-
-    if ( ( key2id || id2key ) && outer == NULL )
-        return RC ( rcDB, rcIndex, rcValidating, rcSelf, rcNull );
-
-    KPTrieIndexCCParmsInit_v1 ( & pb, self, outer, key2id, id2key );
-    if ( PTrieDoUntil ( self -> key2id, KPTrieIndexCCVisit_v1, & pb ) )
-        rc = pb . rc;
-    else if ( pb . failed )
-        rc = RC ( rcDB, rcIndex, rcValidating, rcSelf, rcCorrupt );
-
-    if ( start_id != NULL )
-        * start_id = pb . stats . i_min_id;
-    if ( id_range != NULL )
-        * id_range = ( uint32_t ) ( pb . stats . x_max_id - pb . stats . i_min_id );
-    if ( num_keys != NULL )
-        * num_keys = pb . stats . num_entries;
-    if ( num_rows != NULL )
-        * num_rows = pb . stats . num_ids;
-    if ( num_holes != NULL )
-        * num_holes = pb . stats . num_holes;
-
-    KPTrieIndexCCParmsWhack_v1 ( & pb );
-    return rc;
-}
diff --git a/libs/kdb/ptrieval-v2.c b/libs/kdb/ptrieval-v2.c
deleted file mode 100644
index 7a8b939..0000000
--- a/libs/kdb/ptrieval-v2.c
+++ /dev/null
@@ -1,396 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-
-#include "index-priv.h"
-#include "idstats-priv.h"
-
-#include <kdb/index.h>
-#include <klib/ptrie.h>
-#include <klib/pack.h>
-#include <klib/text.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <limits.h>
-#include <stdio.h>
-#include <string.h>
-#include <endian.h>
-#include <byteswap.h>
-#include <assert.h>
-
-
-
-/*--------------------------------------------------------------------------
- * KPTrieIndexCCParms
- *  consistency check parameter block
- */
-typedef struct KPTrieIndexCCParms_v2 KPTrieIndexCCParms_v2;
-struct KPTrieIndexCCParms_v2
-{
-    KIdStats stats;
-    rc_t rc;
-    const KPTrieIndex_v2 *self;
-    const KIndex *outer;
-    bool key2id;
-    bool id2key;
-    bool all_ids;
-    bool convertFromV1;
-    bool failed;
-};
-
-/* Init
- */
-static
-void KPTrieIndexCCParmsInit_v2 ( KPTrieIndexCCParms_v2 *pb,
-    const KPTrieIndex_v2 *self, const KIndex *outer, bool key2id, bool id2key, bool all_ids, bool convertFromV1 )
-{
-    KIdStatsInit ( & pb -> stats );
-    pb -> rc = 0;
-    pb -> self = self;
-    pb -> outer = outer;
-    pb -> key2id = key2id;
-    pb -> id2key = self -> ord2node ? id2key : false;
-    pb -> all_ids = all_ids;
-    pb -> convertFromV1 = convertFromV1;
-    pb -> failed = false;
-}
-
-/* Whack
- */
-static
-void KPTrieIndexCCParmsWhack_v2 ( KPTrieIndexCCParms_v2 *pb )
-{
-    KIdStatsWhack ( & pb -> stats );
-}
-
-/*--------------------------------------------------------------------------
- * KPTrieIndex_v2
- *  persisted keymap
- */
-
-/* CheckConsistency
- *  runs a consistency check as efficiently as possible
- *
- *  in all cases, we make use of "PTrieForEach" to visit each node
- *  using the natural storage order. each node returned is counted,
- *  read and inserted into a BSTree whose nodes merge adjacent and
- *  overlapping ids into existing nodes.
- *
- *  if running a deep "key->id" test, then the key is first regenerated
- *  from the node, and then used to retrieve the id via the KIndex.
- *
- *  if the projection index exists, the id is tested against the node
- *  to ensure that projection works. if "id->key" is true, then use
- *  the KIndex to produce a key and compare it against the node.
- */
-static
-bool CC KPTrieIndexCCVisit_v2 ( PTNode *n, void *data )
-{
-    KPTrieIndexCCParms_v2 *pb = (KPTrieIndexCCParms_v2 *)data;
-    const KPTrieIndex_v2 *self = pb -> self;
-
-    rc_t rc;
-    int64_t id;
-    size_t usize;
-    uint64_t span;
-    uint32_t i, ord;
-
-    /* detect conversion from v1 */
-    if ( pb -> convertFromV1 && self -> id_bits == 0 )
-    {
-        uint32_t id32;
-
-        /* payload of v1 PTNode is a 32-bit spot id */
-        assert ( n -> data . size == sizeof id32 );
-        memcpy ( & id32, n -> data . addr, sizeof id32 );
-        id = self -> byteswap ? bswap_32 ( id32 ) : id32;
-    }
-    else
-    {
-        /* native v2 */
-        /* TBD - should this pass n -> data . size * 8 ??? */
-        if ( self -> id_bits != 0 )
-        {
-            rc = Unpack ( self -> id_bits, sizeof id * 8,
-                n -> data . addr, 0, self -> id_bits, NULL,
-                & id, sizeof id, & usize );
-            if ( rc != 0 )
-            {
-                PLOGMSG ( klogWarn, ( klogWarn, "could not determine row id of v2 node $(nid)",
-                                 "nid=0x%08x", n -> id ));
-                pb -> failed = true;
-                return false;
-            }
-        }
-        else
-        {
-            id = 0;
-        }
-
-        id += self -> first;
-    }
-
-    /* convert from row-id to 1-based ordinal index */
-    ord = KPTrieIndexID2Ord_v2 ( self, id );
-    if ( ord == 0 )
-    {
-        /* 0 means not found */
-        PLOGMSG ( klogWarn, ( klogWarn, "v2 node $(nid): row id $(rid) not found in trie",
-                              "nid=0x%08x,rid=%ld", n -> id, id ));
-        pb -> failed = true;
-        return false;
-    }
-
-    if ( self -> ord2node != NULL )
-    {
-        /* to calculate span of last entry, where
-           1-based "ord" == the number of nodes,
-           just find the distance between the last row-id
-           in index ( self->maxid ) and the current row-id */
-        if ( ord == self -> count )
-            span = self -> maxid - id + 1;
-        else
-        {
-            /* from here on, we will use "ord" to be the
-               ZERO-BASED index of the slot FOLLOWING the
-               one corresponding to id. we want to find the
-               row-id AFTER the current one and calculate distance */
-            switch ( self -> variant )
-            {
-            /* linear array */
-            case 0:
-                /* starting with the FOLLOWING slot,
-                   count duplicate entries */
-                for ( i = ord; i < self -> count; ++ i )
-                {
-                    if ( n -> id != self -> ord2node [ i ] )
-                        break;
-                }
-                span = self -> first + i - id;
-                break;
-
-            /* packed ordered array of sparse row-ids from here on
-               we already have "id" for this node, so the span will
-               be the distance from NEXT id - 1-based ord is 0-based next */
-            case 1:
-                span = self -> first + self -> id2ord . v8 [ ord ] - id;
-                break;
-            case 2:
-                span = self -> first + self -> id2ord . v16 [ ord ] - id;
-                break;
-            case 3:
-                span = self -> first + self -> id2ord . v32 [ ord ] - id;
-                break;
-            case 4:
-                span = self -> first + self -> id2ord . v64 [ ord ] - id;
-                break;
-            default:
-                PLOGMSG ( klogErr, ( klogErr, "PTrie v2 index has bad variant code: $(variant)",
-                                     "variant=%u", self -> variant ));
-                pb -> rc = RC ( rcDB, rcIndex, rcValidating, rcIndex, rcCorrupt );
-                return true;
-            }
-        }
-    }
-    else if ( self -> span_bits == 0 )
-        span = 1;
-    else
-    {
-        /* TBD - this case is never used in practice.
-           it would be an skey without a projection index */
-        rc = Unpack ( self -> span_bits, sizeof span * 8,
-                      n -> data . addr, 0, self -> id_bits, NULL,
-                      & span, sizeof span, & usize );
-        if ( rc != 0 )
-        {
-            PLOGMSG ( klogWarn, ( klogWarn, "could not determine span of v2 node $(nid), row id $(rid)",
-                                  "nid=0x%08x,rid=%ld", n -> id, id ));
-            pb -> failed = true;
-            return false;
-        }
-    }
-
-    /* record the node, row id, span */
-    pb -> rc = KIdStatsInsert ( & pb -> stats, id, span );
-    if ( pb -> rc != 0 )
-    {
-        PLOGERR ( klogSys, ( klogSys, pb -> rc, "failed when examining node id $(nid) with row id $(rid), span $(span)",
-                             "nid=0x%08x,span=%u,rid=%ld", n -> id, span, id ));
-        return true;
-    }
-
-    /* if we have a projection index, test it */
-    if ( self -> ord2node != NULL )
-    {
-        if ( id < self -> first || id > self -> last )
-        {
-            PLOGMSG ( klogWarn, ( klogWarn, "node id $(nid) with row id $(rid) is not within projection range of $(min_rid)..$(max_rid)",
-                                 "nid=0x%08x,rid=%ld,min_rid=%ld,max_rid=%ld",
-                                  n -> id, id, self -> first, self -> last ));
-            pb -> failed = true;
-            return false;
-        }
-        for ( i = 0; i < span; ++ i )
-        {
-            if ( self -> ord2node [ i + ord - 1 ] != n -> id )
-            {
-                PLOGMSG ( klogWarn, ( klogWarn, "node id $(nid) with row id $(rid) does not match projection node id of $(pnid)",
-                                      "nid=0x%08x,rid=%ld,pnid=0x%08x", n -> id, id + 1, self -> ord2node [ i + ord - 1 ] ));
-                pb -> failed = true;
-                return false;
-            }
-            if ( ! pb -> all_ids || self -> variant != 0 )
-                break;
-        }
-    }
-
-    /* if performing deeper tests */
-    if ( pb -> key2id || pb -> id2key )
-    {
-        int64_t start_id;
-        uint64_t id_count;
-
-        /* need to recover key from given node */
-        const String *orig;
-        pb -> rc = PTNodeMakeKey ( n, & orig );
-        if ( pb -> rc != 0 )
-        {
-            PLOGERR ( klogSys, ( klogSys, pb -> rc, "failed when retrieving text for node id $(nid) with row id $(rid)",
-                                 "nid=0x%08x,rid=%u", n -> id, id ));
-            return true;
-        }
-
-        /* key->id test */
-        if ( pb -> key2id )
-        {
-            rc = KIndexFindText ( pb -> outer, orig -> addr, & start_id, & id_count, NULL, NULL );
-            if ( rc != 0 )
-            {
-                PLOGERR ( klogWarn, ( klogWarn, rc, "failed to retrieve start id and count for key '$(key)', row id $(rid)",
-                                      "key=%S,rid=%u", orig, id ) );
-                pb -> failed = true;
-            }
-            else if ( start_id != ( int64_t ) id || id_count != span )
-            {
-                PLOGERR ( klogWarn, ( klogWarn, rc, "key '$(key)' maps to start id $(start_id), count $(id_count): expected id $(rid), count 1.",
-                                      "key=%S,rid=%u,start_id=%ld,id_count=%lu", orig, id, start_id, id_count ) );
-                pb -> failed = true;
-            }
-        }
-
-        /* id->key test */
-        if ( pb -> id2key )
-        {
-            char buffer [ 256 ], *key = buffer;
-            size_t key_size, bsize = sizeof buffer;
-            if ( sizeof buffer <= orig -> size )
-            {
-                key = (char *)malloc ( bsize = orig -> size + 1 );
-                if ( key == 0 )
-                {
-                    pb -> rc = RC ( rcDB, rcIndex, rcValidating, rcMemory, rcExhausted );
-                    StringWhack ( ( String* ) orig );
-                    return true;
-                }
-            }
-
-            for ( i = 0; i < span; ++ i )
-            {
-                rc = KIndexProjectText ( pb -> outer, id + i, & start_id, & id_count, key, bsize, & key_size );
-                if ( rc != 0 )
-                {
-                    PLOGERR ( klogWarn, ( klogWarn, rc, "failed to retrieve key, start id and count for row id $(rid)",
-                                          "rid=%u", id + i ) );
-                    pb -> failed = true;
-                    break;
-                }
-
-                if ( orig -> size != key_size || memcmp ( orig -> addr, key, key_size ) != 0 )
-                {
-                    PLOGERR ( klogWarn, ( klogWarn, rc, "row $(rid) maps to key '$(key)': expected key '$(orig)'.",
-                                          "rid=%u,key=%.*s,orig=%S", id + i, ( int ) key_size, key, orig ) );
-                    pb -> failed = true;
-                }
-                if ( start_id != id || id_count != ( uint64_t ) span )
-                {
-                    PLOGERR ( klogWarn, ( klogWarn, rc, "row $(rid) maps to start id $(start_id), count $(id_count): expected $(row_start), $(span).",
-                                          "rid=%u,id_count=%lu,start_id=%ld,row_start=%ld,span=%u",
-                                          id, id_count, start_id, id, span ) );
-                    pb -> failed = true;
-                }
-
-                if ( ! pb -> all_ids || pb -> failed )
-                    break;
-            }
-
-            if ( key != buffer )
-                free ( key );
-        }
-
-        StringWhack ( ( String* ) orig );
-    }
-
-    return false;
-}
-
-rc_t KPTrieIndexCheckConsistency_v2 ( const KPTrieIndex_v2 *self,
-    int64_t *start_id, uint64_t *id_range, uint64_t *num_keys,
-    uint64_t *num_rows, uint64_t *num_holes,
-    const KIndex *outer, bool key2id, bool id2key, bool all_ids, bool convertFromV1 )
-{
-    rc_t rc = 0;
-    KPTrieIndexCCParms_v2 pb;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcValidating, rcParam, rcNull );
-
-    if ( ( key2id || id2key ) && outer == NULL )
-        return RC ( rcDB, rcIndex, rcValidating, rcSelf, rcNull );
-
-    KPTrieIndexCCParmsInit_v2 ( & pb, self, outer, key2id, id2key, all_ids, convertFromV1 );
-    if ( PTrieDoUntil ( self -> key2id, KPTrieIndexCCVisit_v2, & pb ) )
-        rc = pb . rc;
-    else if ( pb . failed )
-        rc = RC ( rcDB, rcIndex, rcValidating, rcSelf, rcCorrupt );
-
-    if ( start_id != NULL )
-        * start_id = pb . stats . i_min_id;
-    if ( id_range != NULL )
-        * id_range = pb . stats . x_max_id - pb . stats . i_min_id;
-    if ( num_keys != NULL )
-        * num_keys = pb . stats . num_entries;
-    if ( num_rows != NULL )
-        * num_rows = pb . stats . num_ids;
-    if ( num_holes != NULL )
-        * num_holes = pb . stats . num_holes;
-
-    KPTrieIndexCCParmsWhack_v2 ( & pb );
-    return rc;
-}
diff --git a/libs/kdb/table-cc.c b/libs/kdb/table-cc.c
deleted file mode 100644
index 13d6f77..0000000
--- a/libs/kdb/table-cc.c
+++ /dev/null
@@ -1,378 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- *============================================================================
- *
- */
-
-#include <kdb/extern.h>
-
-#define KONST const
-#include "index-priv.h"
-#include "dbmgr-priv.h"
-#include "database-priv.h"
-#include "table-priv.h"
-#include "kdb-priv.h"
-#include "column-priv.h"
-#undef KONST
-
-#include "cc-priv.h"
-
-#include <kdb/index.h>
-#include <kdb/meta.h>
-#include <kdb/kdb-priv.h>
-
-#include <kfs/file.h>
-#include <kfs/md5.h>
-#include <klib/refcount.h>
-#include <klib/log.h> /* PLOGMSG */
-#include <klib/rc.h>
-#include <klib/namelist.h>
-#include <kdb/namelist.h>
-
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-
-#undef index
-
-static void KTableGetName(KTable const *self, char const **rslt)
-{
-    char *sep;
-    
-    *rslt = self->path;
-    sep = strrchr(self->path, '/');
-    if (sep != NULL)
-        *rslt = sep + 1;
-}
-
-static
-rc_t KTableCheckMD5 ( const KTable *self, CCReportFunc report, void *ctx )
-{
-    CCReportInfoBlock info;
-    memset ( & info, 0, sizeof info );
-
-    info.objType = kptTable;
-    KTableGetName(self, &info.objName);
-    
-    return DirectoryCheckMD5 ( self->dir, "md5", & info, report, ctx );
-}
-
-#if 0
-static bool KTableCheckColumnsFilter(const KDirectory *dir, const char *name, void *data)
-{
-    return (KDirectoryPathType(dir, "%s", name) & ~kptAlias) == kptDir;
-}
-#endif
-
-typedef struct KTableCheckColumn_pb_s {
-    KTable const *self;
-    CCReportFunc report;
-    void *rpt_ctx;
-    unsigned n;
-    int level;
-    uint32_t depth;
-    INSDC_SRA_platform_id platform;
-} KTableCheckColumn_pb_t;
-
-static rc_t CC KTableCheckColumn(const KDirectory *dir, uint32_t type, const char *name, void *data)
-{
-    KTableCheckColumn_pb_t *pb = (KTableCheckColumn_pb_t *)data;
-    CCReportInfoBlock info;
-    
-    memset(&info, 0, sizeof(info));
-    
-    if ((type & ~kptAlias) != kptDir) {
-        char mesg[4096];
-        
-        snprintf(mesg, sizeof(mesg), "unexpected object '%s'", name);
-        KTableGetName(pb->self, &info.objName);
-        info.objId = 0;
-        info.objType = kptTable;
-        info.type = ccrpt_Done;
-        info.info.done.mesg = mesg;
-        info.info.done.rc = 0;
-        return pb->report(&info, pb->rpt_ctx);
-    }
-    else {
-        bool hasZombies;
-        INSDC_SRA_platform_id platform = pb->platform;
-        uint32_t ktype = KDBPathType(dir, &hasZombies, name);
-        rc_t rc;
-        
-        info.objType = kptColumn;
-        info.objId = pb->n++;
-        info.objName = name;
-        info.type = ccrpt_Visit;
-        info.info.visit.depth = pb->depth + 1;
-        rc = pb->report(&info, pb->rpt_ctx);
-        if (rc) return rc;
-        
-        info.type = ccrpt_Done;
-        
-        if (hasZombies) {
-#if 0
-            info.info.done.rc = RC(rcDB, rcTable, rcValidating, rcFile, rcTooShort);
-#else
-            info.info.done.rc = 0;
-#endif
-            info.info.done.mesg = "Column may be truncated";
-            rc = pb->report(&info, pb->rpt_ctx);
-            if (rc) return rc;
-        }
-        info.info.done.rc = RC(rcDB, rcTable, rcValidating, rcType, rcIncorrect);
-        if ((ktype & ~kptAlias) == kptColumn) {
-            const KColumn *col;
-            
-            info.info.done.rc = KTableOpenColumnRead(pb->self, &col, "%s", name);
-            if (info.info.done.rc == 0) {
-                info.info.done.rc = KColumnConsistencyCheck(col, pb->level, &info, pb->report, pb->rpt_ctx);
-                KColumnRelease(col);
-                return info.info.done.rc;
-            }
-        }
-        if (platform != SRA_PLATFORM_UNDEFINED && platform != SRA_PLATFORM_454
-            && name != NULL && name[0] != '\0' && strcmp(name, "SIGNAL") == 0)
-        {
-            (void)PLOGMSG(klogWarn, (klogWarn, "COLUMN '$(name)' IS INCOMPLETE",
-                "name=%s", name));
-            return 0;
-        }
-        info.info.done.mesg = "Failed to open column";
-        return pb->report(&info, pb->rpt_ctx);
-    }
-}
-
-static
-rc_t KTableCheckColumns ( const KTable *self, uint32_t depth, int level,
-    CCReportFunc report, void *ctx, INSDC_SRA_platform_id platform )
-{
-    KTableCheckColumn_pb_t pb;
-    
-    pb.self = self;
-    pb.report = report;
-    pb.rpt_ctx = ctx;
-    pb.n = 0;
-    pb.level = level;
-    pb.depth = depth;
-    pb.platform = platform;
-    return KDirectoryVVisit(self->dir, false, KTableCheckColumn, &pb, "col", NULL);
-}
-
-static
-rc_t KTableCheckIndexMD5(const KDirectory *dir,
-                         CCReportInfoBlock *nfo,
-                         CCReportFunc report, void *ctx)
-{
-    char md5[4096];
-
-    snprintf(md5, sizeof(md5), "%s.md5", nfo->objName);
-    if (KDirectoryPathType(dir, "%s", md5) != kptNotFound)
-        return DirectoryCheckMD5(dir, md5, nfo, report, ctx);
-    return 0;
-}
-
-static const KDirectory *KTableFindIndexDir(const KTable *self)
-{
-    const KDirectory *idxDir;
-    
-    rc_t rc = KDirectoryOpenDirRead ( self -> dir, & idxDir, false, "idx" );
-    if ( rc == 0 )
-        return idxDir;
-
-    /* some old tables have a single index at table level */
-    KDirectoryAddRef ( self -> dir );
-    return self -> dir;
-}
-
-static
-rc_t KTableCheckIndices(const KTable *self, uint32_t depth, int level, CCReportFunc report, void *ctx)
-{
-    uint32_t n;
-    const KMetadata *meta;
-    int64_t max_row_id = 0;
-
-    KNamelist *list;
-    rc_t rc = KTableListIdx(self, &list);
-    if ( rc != 0 )
-    {
-        if ( GetRCState ( rc ) == rcNotFound )
-            return 0;
-        return rc;
-    }
-
-    rc = KTableOpenMetadataRead ( self, & meta );
-    if ( rc == 0 )
-    {
-        const KMDataNode *seq;
-        rc = KMetadataOpenNodeRead ( meta, & seq, "/.seq/spot" );
-        if ( rc == 0 )
-        {
-            rc = KMDataNodeReadAsI64 ( seq, & max_row_id );
-            if ( rc != 0 )
-                max_row_id = 0;
-            KMDataNodeRelease ( seq );
-        }
-
-        KMetadataRelease ( meta );
-    }
-
-    rc = KNamelistCount(list, &n);
-    if ( rc == 0 )
-    {
-        const KDirectory *idxDir = KTableFindIndexDir ( self );
-        if ( idxDir == NULL )
-            rc = RC ( rcDB, rcTable, rcValidating, rcDirectory, rcNull );
-        else
-        {
-            CCReportInfoBlock nfo;
-            memset(&nfo, 0, sizeof(nfo));
-            nfo.objType = kptIndex;
-
-            for ( nfo . objId = 0; rc == 0 && nfo . objId != (int) n; ++ nfo . objId)
-            {
-                rc = KNamelistGet(list, nfo.objId, &nfo.objName);
-                if ( rc != 0 )
-                    break;
-                
-                nfo.type = ccrpt_Visit;
-                nfo.info.visit.depth = depth + 1;
-                rc = report(&nfo, ctx); if (rc) break;
-                
-                rc = KTableCheckIndexMD5(idxDir, &nfo, report, ctx);
-                if (rc == 0 && level > 0)
-                {
-                    const KIndex *idx;
-                    rc = KTableOpenIndexRead(self, &idx, "%s", nfo.objName);
-
-                    if ( rc != 0 )
-                    {
-                        nfo.type = ccrpt_Done;
-                        nfo.info.done.rc = rc;
-                        nfo.info.done.mesg = "could not be opened";
-                    }
-                    else
-                    {
-                        KIndexSetMaxRowId ( idx, max_row_id );
-
-                        nfo.type = ccrpt_Index;
-                        rc = KIndexConsistencyCheck(idx, level < 3 ? 1 : 3,
-                                                    &nfo.info.index.start_id,
-                                                    &nfo.info.index.id_range,
-                                                    &nfo.info.index.num_keys,
-                                                    &nfo.info.index.num_rows,
-                                                    &nfo.info.index.num_holes);
-                        KIndexRelease ( idx );
-                        if ( rc != 0 )
-                        {
-                            nfo.type = ccrpt_Done;
-                            nfo.info.done.rc = rc;
-                            nfo.info.done.mesg = "could not be validated";
-                        }
-                    }
-
-                    rc = report(&nfo, ctx);
-                }
-            }
-
-            KDirectoryRelease(idxDir);
-        }
-    }
-
-    KNamelistRelease(list);
-
-    return rc;
-}
-
-LIB_EXPORT
-rc_t CC KTableConsistencyCheck(const KTable *self, uint32_t depth, uint32_t level,
-    CCReportFunc report, void *ctx, INSDC_SRA_platform_id platform)
-{
-    rc_t rc = 0;
-    uint32_t type;
-    
-    bool indexOnly = level & CC_INDEX_ONLY;
-    if (indexOnly) {
-        level &= ~CC_INDEX_ONLY;
-    }
-
-    if (self == NULL)
-        return RC(rcDB, rcTable, rcValidating, rcSelf, rcNull);
-    
-    if (depth == 0) {
-        CCReportInfoBlock info;
-        
-        KTableGetName(self, &info.objName);
-        info.objId = 0;
-        info.objType = kptTable;
-        info.type = ccrpt_Visit;
-        info.info.visit.depth = 0;
-        
-        rc = report(&info, ctx);
-        if (rc) return rc;
-    }
-    
-    type = KDirectoryPathType(self->dir, "md5");
-    if (type == kptZombieFile) {
-        CCReportInfoBlock info;
-        
-        KTableGetName(self, &info.objName);
-        info.objId = 0;
-        info.objType = kptTable;
-        info.type = ccrpt_Done;
-        info.info.done.mesg = "Table may be truncated";
-        info.info.done.rc = 0;
-        
-        rc = report(&info, ctx);
-    }
-    else if (type != kptNotFound) {
-        if (!indexOnly) {
-            rc = KTableCheckMD5(self, report, ctx);
-        }
-    }
-    else {
-        CCReportInfoBlock info;
-        
-        KTableGetName(self, &info.objName);
-        info.objId = 0;
-        info.objType = kptTable;
-        info.type = ccrpt_Done;
-        info.info.done.mesg = "missing md5 file";
-        info.info.done.rc = 0;
-        
-        rc = report(&info, ctx);
-    }
-
-    if ( rc == 0 && ! indexOnly )
-        rc = KTableCheckColumns(self, depth, level, report, ctx, platform);
-
-    if ( rc == 0 )    
-        rc = KTableCheckIndices(self, depth, level, report, ctx);
-        
-    return rc;
-}
diff --git a/libs/kdb/table-priv.h b/libs/kdb/table-priv.h
deleted file mode 100644
index 7b26462..0000000
--- a/libs/kdb/table-priv.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_table_priv_
-#define _h_table_priv_
-
-#ifndef _h_kdb_table_
-#include <kdb/table.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDatabase;
-struct KDBManager;
-struct KDirectory;
-
-
-/*--------------------------------------------------------------------------
- * KTable
- *  represents a table
- *  normally implemented as a directory
- *  but may be a single archive file
- *  in either executable or streamable format
- */
-struct KTable
-{
-    struct KDirectory const *dir;
-    struct KDBManager const *mgr;
-    struct KDatabase const *db;
-    KRefcount refcount;
-    uint8_t prerelease;
-    char path [ 1 ];
-};
-
-/* Attach
- * Sever
- *  like KTableRelease, except called internally
- *  indicates that a child object is letting go...
- */
-KTable *KTableAttach ( const KTable *self );
-rc_t KTableSever ( const KTable *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_table_priv_ */
diff --git a/libs/kdb/table.c b/libs/kdb/table.c
deleted file mode 100644
index fe86a74..0000000
--- a/libs/kdb/table.c
+++ /dev/null
@@ -1,718 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define TRACK_REFERENCES 0
-
-#define KONST const
-#include "table-priv.h"
-#include "dbmgr-priv.h"
-#include "database-priv.h"
-#include "kdb-priv.h"
-#undef KONST
-
-#include <kdb/extern.h>
-#include <klib/namelist.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <klib/printf.h>
-#include <kfs/arc.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * KTable
- *  a collection of columns indexed by row id, metadata, indices
- */
-
-/* GetPath
- *  return the absolute path to table
- */
-LIB_EXPORT rc_t CC KTableGetPath ( const KTable *self,
-    const char **path )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcTable, rcAccessing, rcSelf, rcNull );
-    if ( path == NULL )
-        return RC ( rcDB, rcTable, rcAccessing, rcParam, rcNull );
-
-    *path = self->path;
-
-    return 0;
-}
-
-/* Whack
- */
-static
-rc_t KTableWhack ( KTable *self )
-{
-    rc_t rc = 0;
-
-    KRefcountWhack ( & self -> refcount, "KTable" );
-
-    if ( self -> db != NULL )
-    {
-        rc = KDatabaseSever ( self -> db );
-        if ( rc == 0 )
-            self -> db = NULL;
-    }
-
-    if ( rc == 0 )
-        rc = KDBManagerSever ( self -> mgr );
-
-    if ( rc == 0 )
-    {
-        KDirectoryRelease ( self -> dir );
-        free ( self );
-        return 0;
-    }
-
-    KRefcountInit ( & self -> refcount, 1, "KTable", "whack", "ktbl" );
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KTableAddRef ( const KTable *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KTable" ) )
-        {
-        case krefLimit:
-            return RC ( rcDB, rcTable, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KTableRelease ( const KTable *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KTable" ) )
-        {
-        case krefWhack:
-            return KTableWhack ( ( KTable* ) self );
-        case krefNegative:
-            return RC ( rcDB, rcTable, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Attach
- * Sever
- */
-KTable *KTableAttach ( const KTable *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "KTable" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( KTable* ) self;
-}
-
-/* Sever
- *  like KTableRelease, except called internally
- *  indicates that a child object is letting go...
- */
-rc_t KTableSever ( const KTable *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "KTable" ) )
-        {
-        case krefWhack:
-            return KTableWhack ( ( KTable* ) self );
-        case krefNegative:
-            return RC ( rcDB, rcTable, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Make
- *  make an initialized structure
- *  NB - does NOT attach reference to dir, but steals it
- */
-static
-rc_t KTableMake ( KTable **tblp, const KDirectory *dir, const char *path )
-{
-    KTable *tbl;
-
-    assert ( tblp != NULL );
-    assert ( path != NULL );
-
-    tbl = malloc ( sizeof * tbl + strlen ( path ) );
-    if ( tbl == NULL )
-    {
-        * tblp = NULL;
-        return RC ( rcDB, rcTable, rcConstructing, rcMemory, rcExhausted );
-    }
-
-    memset ( tbl, 0, sizeof * tbl );
-    tbl -> dir = dir;
-    KRefcountInit ( & tbl -> refcount, 1, "KTable", "make", path );
-    strcpy ( tbl -> path, path );
-
-    * tblp = tbl;
-    return 0;
-}
-
-
-/* OpenTableRead
- * VOpenTableRead
- *  open a table for read
- *
- *  "tbl" [ OUT ] - return parameter for newly opened table
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to table
- */
-static
-rc_t KDBManagerVOpenTableReadInt ( const KDBManager *self,
-    const KTable **tblp, const KDirectory *wd, bool try_srapath,
-    const char *path, va_list args )
-{
-    rc_t rc;
-
-    char tblpath [ 4096 ];
-    int z = ( args == NULL ) ?
-        snprintf ( tblpath, sizeof tblpath, "%s", path ):
-        vsnprintf ( tblpath, sizeof tblpath, path, args );
-    if ( z < 0 || ( size_t ) z >= sizeof tblpath )
-        rc = RC ( rcDB, rcMgr, rcOpening, rcPath, rcExcessive );
-    else
-    {
-        KTable *tbl;
-        const KDirectory *dir;
-        bool prerelease = false;
-
-        rc = KDBOpenPathTypeRead ( self, wd, tblpath, &dir, kptTable, NULL, try_srapath );
-        if ( rc != 0 )
-        {
-            prerelease = true;
-            rc = KDBOpenPathTypeRead ( self, wd, tblpath, &dir, kptPrereleaseTbl, NULL, try_srapath );
-        }
-
-        if ( rc == 0 )
-        {
-            rc = KTableMake ( & tbl, dir, tblpath );
-            if ( rc == 0 )
-            {
-                tbl -> mgr = KDBManagerAttach ( self );
-                tbl -> prerelease = prerelease;
-                * tblp = tbl;
-                return 0;
-            }
-            KDirectoryRelease ( dir );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDBManagerOpenTableRead ( const KDBManager *self,
-    const KTable **tbl, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDBManagerVOpenTableRead ( self, tbl, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDBManagerVOpenTableRead ( const KDBManager *self,
-    const KTable **tbl, const char *path, va_list args )
-{
-    if ( tbl == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcParam, rcNull );
-
-    * tbl = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcSelf, rcNull );
-
-    return KDBManagerVOpenTableReadInt ( self, tbl, self -> wd, true, path, args);
-}
-
-LIB_EXPORT rc_t CC KDatabaseOpenTableRead ( const KDatabase *self,
-    const KTable **tbl, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVOpenTableRead ( self, tbl, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseVOpenTableRead ( const KDatabase *self,
-    const KTable **tblp, const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    if ( tblp == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcParam, rcNull );
-
-    * tblp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcSelf, rcNull );
-
-    rc = KDBVMakeSubPath ( self -> dir,
-        path, sizeof path, "tbl", 3, name, args );
-    if ( rc == 0 )
-    {
-        rc = KDBManagerVOpenTableReadInt ( self -> mgr, tblp,
-                                          self -> dir, false, path, NULL );
-        if ( rc == 0 )
-        {
-            KTable *tbl = ( KTable* ) * tblp;
-            tbl -> db = KDatabaseAttach ( self );
-        }
-    }
-
-    return rc;
-}
-
-
-/* Locked
- *  returns non-zero if locked
- */
-LIB_EXPORT bool CC KTableLocked ( const KTable *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return false;
-
-    rc = KDBWritable ( self -> dir, "." );
-    return GetRCState ( rc ) == rcLocked;
-}
-
-
-/* Exists
- *  returns true if requested object exists
- *
- *  "type" [ IN ] - a KDBPathType
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT bool CC KTableVExists ( const KTable *self, uint32_t type, const char *name, va_list args )
-{
-    if ( self != NULL && name != NULL && name [ 0 ] != 0 )
-    {
-        rc_t rc;
-        const char *ns;
-        char path [ 256 ];
-
-        switch ( type )
-        {
-        case kptIndex:
-            ns = "idx";
-            break;
-
-        case kptColumn:
-            ns = "col";
-            break;
-
-        default:
-            return false;
-        }
-
-        rc = KDBVMakeSubPath ( self -> dir, path, sizeof path, ns, 3, name, args );
-        if ( rc == 0 )
-        {
-            switch ( KDirectoryPathType ( self -> dir, "%s", path ) )
-            {
-            case kptFile:
-            case kptDir:
-            case kptFile | kptAlias:
-            case kptDir | kptAlias:
-                return true;
-            }
-        }
-    }
-    return false;
-}
-
-LIB_EXPORT bool CC KTableExists ( const KTable *self, uint32_t type, const char *name, ... )
-{
-    bool exists;
-
-    va_list args;
-    va_start ( args, name );
-
-    exists = KTableVExists ( self, type, name, args );
-
-    va_end ( args );
-
-    return exists;
-}
-
-
-/* IsAlias
- *  returns true if object name is an alias
- *  returns path to fundamental name if it was aliased
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - optional output buffer
- *  for fundamenta object name if "alias" is not a fundamental name, 
- *
- *  "name" [ IN ] - NUL terminated object name
- */
-LIB_EXPORT bool CC KTableIsAlias ( const KTable *self, uint32_t type,
-    char *resolved, size_t rsize, const char *name )
-{
-    if ( self != NULL && name != NULL && name [ 0 ] != 0 )
-    {
-        rc_t rc;
-        const char *ns;
-        char path [ 256 ];
-
-        switch ( type )
-        {
-        case kptIndex:
-            ns = "idx";
-            break;
-
-        case kptColumn:
-            ns = "col";
-            break;
-
-        default:
-            return false;
-        }
-
-        rc = KDBMakeSubPath ( self -> dir, path, sizeof path, ns, 3, name );
-        if ( rc == 0 )
-        {
-            switch ( KDirectoryPathType ( self -> dir, "%s", path ) )
-            {
-            case kptFile | kptAlias:
-            case kptDir | kptAlias:
-                if ( resolved != NULL && rsize != 0 )
-                {
-                    const KDirectory *sub;
-                    rc = KDirectoryOpenDirRead ( self -> dir, & sub, false, "%s", ns );
-                    * resolved = 0;
-                    if ( rc != 0 )
-                        PLOGERR ( klogWarn, ( klogWarn, rc, "failed to open subdirectory '$(sub)'", "sub=%s", ns ) );
-                    else
-                    {
-                        rc = KDirectoryResolveAlias ( sub, false, resolved, rsize, "%s", name );
-                        KDirectoryRelease ( sub );
-                        if ( rc != 0 )
-                            PLOGERR ( klogWarn, ( klogWarn, rc, "failed to resolve alias '$(alias)'", "alias=%s", name ) );
-                    }
-                }
-                return true;
-            }
-        }
-    }
-
-    if ( resolved != NULL && rsize != 0 )
-        * resolved = 0;
-
-    return false;
-}
-
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC KTableVWritable ( const KTable *self, uint32_t type, const char *name, va_list args )
-{
-    /* TBD */
-    return -1;
-}
-
-LIB_EXPORT rc_t CC KTableWritable ( const KTable *self, uint32_t type, const char *name, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, name );
-
-    rc = KTableVWritable ( self, type, name, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC KTableOpenManagerRead ( const KTable *self, const KDBManager **mgr )
-{
-    rc_t rc;
-
-    if ( mgr == NULL )
-        rc = RC ( rcDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDBManagerAddRef ( self -> mgr );
-            if ( rc == 0 )
-            {
-                * mgr = self -> mgr;
-                return 0;
-            }
-        }
-
-        * mgr = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenParent
- *  duplicate reference to parent database
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC KTableOpenParentRead ( const KTable *self, const KDatabase **db )
-{
-    rc_t rc;
-
-    if ( db == NULL )
-        rc = RC ( rcDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDatabaseAddRef ( self -> db );
-            if ( rc == 0 )
-            {
-                * db = self -> db;
-                return 0;
-            }
-        }
-
-        * db = NULL;
-    }
-
-    return rc;
-}
-
-
-/* GetDirectory
- *  access the directory in use
- */
-LIB_EXPORT rc_t CC KTableOpenDirectoryRead ( const KTable *self, const KDirectory **dir )
-{
-    rc_t rc;
-
-    if ( dir == NULL )
-        rc = RC ( rcDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * dir = self -> dir;
-            return KDirectoryAddRef ( * dir );
-        }
-
-        * dir = NULL;
-    }
-
-    return rc;
-}
-
-
-/* ModDate
- *  get modification date
- */
-LIB_EXPORT rc_t CC KTableModDate ( const KTable *self, KTime_t *mtime )
-{
-    rc_t rc;
-
-    if ( mtime == NULL )
-        rc = RC ( rcDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            /* HACK ALERT - there needs to be a proper way to record modification times */
-            const KDirectory *dir = self -> dir;
-
-            /* this only tells the last time the table was locked,
-               which may be close to the last time it was modified */
-            rc = KDirectoryDate ( dir, mtime, "lock" );
-            if ( rc == 0 )
-                return 0;
-
-            if ( GetRCState ( rc ) == rcNotFound )
-            {
-                rc = KDirectoryDate ( dir, mtime, "sealed" );
-                if ( rc == 0 )
-                    return 0;
-            }
-
-            /* get directory timestamp */
-            rc = KDirectoryDate ( dir, mtime, "." );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        * mtime = 0;
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KNamelist
- */
-
-/* List
- *  create table listings
- */
-struct FilterData
-{
-    const KDBManager * mgr;
-    int type;
-};
-
-static
-bool CC KDatabaseListFilter ( const KDirectory *dir, const char *name, void *data_ )
-{
-    struct FilterData * data = data_;
-    return ( KDBOpenPathTypeRead ( data->mgr, dir, name, NULL, data->type, NULL, false ) == 0 );
-}
-
-LIB_EXPORT rc_t CC KTableListCol ( const KTable *self, KNamelist **names )
-{
-    if ( self != NULL )
-    {
-        struct FilterData data;
-
-        data.mgr = self->mgr;
-        data.type = kptColumn;
-
-        return KDirectoryList ( self -> dir,
-            names, KDatabaseListFilter, &data, "col" );
-    }
-
-    if ( names != NULL )
-        * names = NULL;
-
-    return RC ( rcDB, rcTable, rcListing, rcSelf, rcNull );
-}
-
-static
-bool CC KTableListIdxFilter ( const KDirectory *dir, const char *name, void *data )
-{
-    const size_t sz = strlen(name);
-    
-    if (sz > 4 && strcmp(&name[sz - 4], ".md5") == 0)
-        return false;
-    return true;
-}
-
-static
-bool CC KTableListSkeyFilter ( const KDirectory *dir, const char *name, void *data )
-{
-    if ( strcmp ( name, "skey" ) == 0 )
-        return true;
-    return false;
-}
-
-LIB_EXPORT rc_t CC KTableListIdx ( const KTable *self, KNamelist **names )
-{
-    if ( self != NULL )
-    {
-        if ( ! self -> prerelease )
-        {
-            return KDirectoryList ( self -> dir,
-                names, KTableListIdxFilter, NULL, "idx" );
-        }
-
-        return KDirectoryList ( self -> dir,
-            names, KTableListSkeyFilter, NULL, "." );
-    }
-
-    if ( names != NULL )
-        * names = NULL;
-
-    return RC ( rcDB, rcTable, rcListing, rcSelf, rcNull );
-}
-
-/* HasRemoteData
- *  indicates whether some/all table data comes from network resource
- *  such as HttpFile or CacheteeFile
- */
-KDB_EXTERN bool CC KTableHasRemoteData ( const KTable *self )
-{
-    bool result = self != NULL && KDirectoryIsKArcDir ( self -> dir ) &&
-            KArcDirIsFromRemote ( (const KArcDir * ) self -> dir );
-    return result;
-}
diff --git a/libs/kdb/trieidx-priv.h b/libs/kdb/trieidx-priv.h
deleted file mode 100644
index a4174ff..0000000
--- a/libs/kdb/trieidx-priv.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_trieidx_priv_
-#define _h_trieidx_priv_
-
-#include "index-priv.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * KPTrieIndexHdr_v1
- */
-typedef KIndexFileHeader_v1_v2 KPTrieIndexHdr_v1;
-
-/*--------------------------------------------------------------------------
- * KPTrieIndexHdr_v2
- */
-typedef struct KPTrieIndexHdr_v2 KPTrieIndexHdr_v2;
-struct KPTrieIndexHdr_v2
-{
-    KIndexFileHeader_v1_v2 dad;
-    int64_t first;
-    int64_t last;
-    uint16_t id_bits;
-    uint16_t span_bits;
-    uint16_t align [ 2 ];
-};
-
-/*--------------------------------------------------------------------------
- * KPTrieIndexHdr_v3
- */
-typedef struct KPTrieIndexHdr_v3 KPTrieIndexHdr_v3;
-struct KPTrieIndexHdr_v3
-{
-    struct KIndexFileHeader_v3 dad;
-    int64_t first;
-    int64_t last;
-    uint16_t id_bits;
-    uint16_t span_bits;
-    uint16_t align [ 2 ];
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _h_trieidx_priv_ */
diff --git a/libs/kdb/trieidx-v1.c b/libs/kdb/trieidx-v1.c
deleted file mode 100644
index 18e7e26..0000000
--- a/libs/kdb/trieidx-v1.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "index-priv.h"
-#include "kdbfmt-priv.h"
-#include <klib/ptrie.h>
-#include <klib/text.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/mmap.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <limits.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <byteswap.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * KPTrieIndex_v1
- *  persisted keymap
- */
-
-/* KPTrieIndexInit
- *  opens and initializes persisted keymap structure
- */
-rc_t KPTrieIndexInit_v1 ( KPTrieIndex_v1 *self, const KMMap *mm, bool byteswap )
-{
-    size_t size;
-    rc_t rc = KMMapSize ( mm, & size );
-    if ( rc == 0 )
-    {
-        const KDBHdr *hdr;
-        rc = KMMapAddrRead ( mm, ( const void** ) & hdr );
-        if ( rc == 0 )
-        {
-            /* try to create the pttree */
-            rc = PTrieMakeOrig ( & self -> key2id,
-                hdr + 1, size -= sizeof * hdr, byteswap );
-            if ( rc == 0 )
-            {
-                size_t ptsize = PTrieSize ( self -> key2id );
-                if ( ptsize <= size )
-                {
-                    /* just in case */
-                    self -> mm = NULL;
-
-                    /* record for projection */
-                    self -> byteswap = byteswap;
-
-                    /* it could be stored without projection */
-                    if ( ptsize == size )
-                    {
-                        self -> id2node = NULL;
-                        self -> first = self -> last = 0;
-                        return 0;
-                    }
-                            
-                    /* assume this is projection index */
-                    self -> id2node = ( void* )
-                        ( ( char* ) ( hdr + 1 ) + ptsize );
-                    size -= ptsize;
-                            
-                    /* it must have at least 4 bytes
-                       and be 4 byte aligned */
-                    if ( size >= sizeof ( uint32_t ) && ( size & 3 ) == 0 )
-                    {
-                        /* first entry is starting key
-                           remaining entries are node ids */
-                        self -> first = * self -> id2node ++;
-                        size -= sizeof self -> id2node [ 0 ];
-                        if ( size == 0 )
-                        {
-                            /* forget if empty */
-                            self -> id2node = NULL;
-                            self -> first = self -> last = 0;
-                            return 0;
-                        }
-                        /* remaining entries */
-                        self -> last = self -> first + ( size >> 2 ) - 1;
-                        return 0;
-                    }
-                }
-
-                PTrieWhack ( self -> key2id );
-                self -> key2id = NULL;
-
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcTrie, rcCorrupt );
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* KPTrieIndexWhack_v1
- *  closes down keymap
- */
-void KPTrieIndexWhack_v1 ( KPTrieIndex_v1 *self )
-{
-    PTrieWhack ( self -> key2id );
-    KMMapRelease ( self -> mm );
-    memset ( self, 0, sizeof * self );
-}
-
-
-/*--------------------------------------------------------------------------
- * KTrieIndex_v1
- */
-
-/* whack whack */
-void KTrieIndexWhack_v1 ( KTrieIndex_v1 *self )
-{
-    KPTrieIndexWhack_v1 ( & self -> pt );
-}
-
-/* initialize an index from file */
-rc_t KTrieIndexOpen_v1 ( KTrieIndex_v1 *self, const KMMap *mm, bool byteswap )
-{
-    rc_t rc;
-
-    memset ( self, 0, sizeof * self );
-
-    rc = KPTrieIndexInit_v1 ( & self -> pt, mm, byteswap );
-    if ( rc == 0 )
-    {
-        rc = KMMapAddRef ( mm );
-        if ( rc == 0 )
-        {
-            self -> pt . mm = mm;
-            return 0;
-        }
-    }
-
-    KTrieIndexWhack_v1 ( self );
-    return rc;
-}
-
-/* map key to id ( was Key2Id ) */
-rc_t KTrieIndexFind_v1 ( const KTrieIndex_v1 *self, const char *str, uint32_t *id,
-    int ( CC * custom_cmp ) ( const void *item, const PBSTNode *n, void *data ), void * data )
-{
-    if ( self -> pt . key2id != NULL )
-    {
-        PTNode n;
-        String key;
-        unsigned int nid;
-
-        StringInitCString ( & key, str );
-        nid = PTrieFind ( self -> pt . key2id, & key, & n, custom_cmp, data );
-        if ( nid != 0 )
-        {
-            assert ( n . data . size == sizeof * id );
-            memcpy ( id, n . data . addr, sizeof * id );
-            return 0;
-        }
-    }
-
-    return RC ( rcDB, rcIndex, rcSelecting, rcString, rcNotFound );
-}
-
-/* projection index id to key-string ( was Id2Key ) */
-rc_t KTrieIndexProject_v1 ( const KTrieIndex_v1 *self,
-    uint32_t id, char *key_buff, size_t buff_size, size_t *actsize)
-{
-    if ( self -> pt . id2node != NULL &&
-         id >= self -> pt . first &&
-         id <= self -> pt . last )
-    {
-        PTNode n;
-        uint32_t node = self -> pt . id2node [ id - self -> pt . first ];
-        rc_t rc = PTrieGetNode ( self -> pt . key2id,
-            & n, self -> pt . byteswap ? bswap_32 ( node ) : node );
-        if ( rc == 0 )
-        {
-            const String *key;
-            rc = PTNodeMakeKey ( & n, & key );
-            if ( rc == 0 )
-            {
-                if ( actsize != NULL )
-                    * actsize = key -> size;
-                if ( key -> size >= buff_size )
-                    rc = RC ( rcDB, rcIndex, rcProjecting, rcBuffer, rcInsufficient );
-                else
-                    string_copy ( key_buff, buff_size, key -> addr, key -> size );
-
-                StringWhack ( ( String* ) key );
-            }
-            return rc;
-        }
-    }
-
-    return RC ( rcDB, rcIndex, rcProjecting, rcId, rcNotFound );
-}
diff --git a/libs/kdb/trieidx-v2.c b/libs/kdb/trieidx-v2.c
deleted file mode 100644
index 1a2811e..0000000
--- a/libs/kdb/trieidx-v2.c
+++ /dev/null
@@ -1,1047 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "index-priv.h"
-#include "trieidx-priv.h"
-#include <klib/ptrie.h>
-#include <klib/text.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/mmap.h>
-#include <klib/pack.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <limits.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <byteswap.h>
-#include <assert.h>
-
-#define KTRIE_ZEROS_KPTRIE 1
-
-/*--------------------------------------------------------------------------
- * KPTrieIndex_v2
- *  persisted keymap
- */
-
-
-/* Init
- *  opens and initializes persisted keymap structure
- */
-static
-rc_t KPTrieIndexInitID2Ord ( KPTrieIndex_v2 *self, size_t in_size,
-    int variant, int span_bits, int elem_bits )
-{
-    rc_t rc;
-    union
-    {
-        uint8_t *v8;
-        uint16_t *v16;
-        uint32_t *v32;
-        uint64_t *v64;
-    } dst;
-    size_t elem_bytes = elem_bits >> 3;
-    uint32_t scount = self -> count - 1;
-
-    assert ( self -> count != 0 );
-
-    if ( span_bits * scount > in_size * 8 )
-        return RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcCorrupt );
-
-    dst . v8 = malloc ( self -> count * elem_bytes );
-    if ( dst . v8 == NULL )
-        rc = RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        size_t usize;
-        rc = Unpack ( span_bits, elem_bits,
-            & self -> ord2node [ self -> count ], 0,
-            span_bits * scount, NULL, & dst . v8 [ elem_bytes ],
-            scount * elem_bytes, & usize );
-        if ( rc == 0 )
-        {
-            uint32_t i;
-
-            self -> id2ord . v8 = dst . v8;
-            self -> variant = variant;
-
-            /* integrate to simple translation */
-            switch ( variant )
-            {
-            case 1:
-                dst . v8 [ 0 ] = 0;
-                for ( i = 0; i < scount; ++ i )
-                    dst . v8 [ i + 1 ] += dst . v8 [ i ];
-                break;
-            case 2:
-                dst . v16 [ 0 ] = 0;
-                for ( i = 0; i < scount; ++ i )
-                    dst . v16 [ i + 1 ] += dst . v16 [ i ];
-                break;
-            case 3:
-                dst . v32 [ 0 ] = 0;
-                for ( i = 0; i < scount; ++ i )
-                    dst . v32 [ i + 1 ] += dst . v32 [ i ];
-                break;
-            case 4:
-                dst . v64 [ 0 ] = 0;
-                for ( i = 0; i < scount; ++ i )
-                    dst . v64 [ i + 1 ] += dst . v64 [ i ];
-                break;
-            }
-
-            return 0;
-        }
-
-        free ( dst . v8 );
-    }
-
-    return rc;
-}
-
-static
-void CC KPTrieIndexExtractV1Range_v2 ( PTNode *n, void *data )
-{
-    KPTrieIndex_v2 *self = data;
-
-    /* capture node id */
-    uint32_t id;
-    assert ( n -> data . size == sizeof id );
-    memcpy ( & id, n -> data . addr, sizeof id );
-
-    /* perform min/max */
-    if ( self -> count == 0 )
-        self -> first = self -> last = id;
-    else if ( id < self -> first )
-        self -> first = id;
-    else if ( id > self -> last )
-        self -> last = id;
-
-    ++ self -> count;
-}
-
-static
-rc_t KPTrieIndexInitFromV1_v2 ( KPTrieIndex_v2 *self, const KMMap *mm, bool byteswap )
-{
-    KPTrieIndex_v1 v1;
-    rc_t rc = KPTrieIndexInit_v1 ( & v1, mm, byteswap );
-    if ( rc == 0 )
-    {
-        uint32_t *ord2node;
-        uint32_t total_id, test_id;
-        uint32_t i, id, id_bits, num_ids;
-
-        /* assume preservation of persisted projection index */
-        self -> byteswap = byteswap;
-
-        /* hopefully we got a projection index */
-        if ( v1 . id2node == NULL )
-        {
-#if ! KTRIE_ZEROS_KPTRIE
-            self -> count = 0;
-#endif
-            /* need to derive first and last from trie */
-            PTrieForEach ( v1 . key2id, KPTrieIndexExtractV1Range_v2, self );
-            if ( self -> count == 0 )
-                KPTrieIndexWhack_v1 ( & v1 );
-            else
-            {
-                /* take trie as-is */
-                self -> key2id = v1 . key2id;
-                self -> maxid = self -> last;
-            }
-
-            /* note that this assumes a span of 1 for
-               each id. there are no known uses of v1 without
-               a projection index, so this is unlikely to be important */
-
-            return 0;
-        }
-
-        /* take id range */
-        self -> first = v1 . first;
-        self -> last = self -> maxid = v1 . last;
-
-        /* count comes from trie as always */
-        self -> count = PTrieCount ( v1 . key2id );
-
-        /* detect empty trie */
-        if ( self -> count == 0 || self -> first > self -> last )
-        {
-            self -> first = self -> last = self -> maxid = 0;
-            return 0;
-        }
-
-        /* take trie as-is */
-        self -> key2id = v1 . key2id;
-
-        /* now decide whether to use 1-1 or sparse projection
-           if the number of slots is less than twice the number of nodes,
-           it is more efficient to store the nodes as a linear array,
-           and represent missing ids as nulls.
-         */
-        if ( ( self -> last - self -> first ) < ( ( int64_t ) self -> count << 1 ) )
-        {
-            /* take the old projection array as-is,
-               treating NULL node ids as holes */
-            self -> ord2node = v1 . id2node;
-            return 0;
-        }
-
-        /* need to create a new projection index */
-        self -> byteswap = false;
-
-        /* convert to sparse
-           calculate id bits - notice that
-           test_id gets left shifted so that
-           the loop is guaranteed to exit */
-        num_ids = ( uint32_t ) ( self -> last - self -> first + 1 );
-        for ( total_id = num_ids >> 1, id_bits = 1, test_id = 1;
-            test_id <= total_id;
-            ++ id_bits, test_id <<= 1 )
-            ( void ) 0;
-
-        /* determine variant */
-        if ( id_bits <= 8 )
-        {
-            /* allocate 4 bytes for new ord2node and 1 for id2ord */
-            uint8_t *id2ord = malloc ( self -> count * 5 );
-            if ( id2ord == NULL )
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                ord2node = ( uint32_t* ) & id2ord [ self -> count ];
-                self -> ord2node = ord2node;
-                self -> id2ord . v8 = id2ord;
-                self -> variant = 1;
-
-                /* walk across v1 table, looking at each id */
-                for ( i = id = 0; id < num_ids; ++ id )
-                {
-                    /* detect non NULL node ids
-                       and pretend they represent a contiguous
-                       span with no holes in id space */
-                    if ( v1 . id2node [ id ] != 0 )
-                    {
-                        /* prevent overwriting */
-                        if ( i == self -> count )
-                        {
-                            rc = RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcCorrupt );
-                            break;
-                        }
-
-                        /* record id and node for slot */
-                        id2ord [ i ] = ( uint8_t ) id;
-                        ord2node [ i ] = byteswap ? bswap_32 ( v1 . id2node [ id ] ) : v1 . id2node [ id ];
-                        ++ i;
-                    }
-                }
-            }
-        }
-        else if ( id_bits <= 16 )
-        {
-            uint16_t *id2ord = malloc ( self -> count * 6 );
-            if ( id2ord == NULL )
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                ord2node = ( uint32_t* ) & id2ord [ self -> count ];
-                self -> ord2node = ord2node;
-                self -> id2ord . v16 = id2ord;
-                self -> variant = 2;
-
-                for ( i = id = 0; id < num_ids; ++ id )
-                {
-                    if ( v1 . id2node [ id ] != 0 )
-                    {
-                        if ( i == self -> count )
-                        {
-                            rc = RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcCorrupt );
-                            break;
-                        }
-
-                        id2ord [ i ] = ( uint16_t ) id;
-                        ord2node [ i ] = byteswap ? bswap_32 ( v1 . id2node [ id ] ) : v1 . id2node [ id ];
-                        ++ i;
-                    }
-                }
-            }
-        }
-        else
-        {
-            uint32_t *id2ord = malloc ( self -> count * 8 );
-            if ( id2ord == NULL )
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                ord2node = & id2ord [ self -> count ];
-                self -> ord2node = ord2node;
-                self -> id2ord . v32 = id2ord;
-                self -> variant = 3;
-
-                for ( i = id = 0; id < num_ids; ++ id )
-                {
-                    if ( v1 . id2node [ id ] != 0 )
-                    {
-                        if ( i == self -> count )
-                        {
-                            rc = RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcCorrupt );
-                            break;
-                        }
-
-                        id2ord [ i ] = id;
-                        ord2node [ i ] = byteswap ? bswap_32 ( v1 . id2node [ id ] ) : v1 . id2node [ id ];
-                        ++ i;
-                    }
-                }
-            }
-        }
-        
-        if ( rc == 0 )
-        {
-            if ( i == self -> count )
-                return 0;
-
-            rc = RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcCorrupt );
-        }
-
-        KPTrieIndexWhack_v1 ( & v1 );
-    }
-
-    return rc;
-}
-
-rc_t KPTrieIndexInit_v2 ( KPTrieIndex_v2 *self, const KMMap *mm, bool byteswap )
-{
-    /* get size of map, assumed to be size of file */
-    size_t size;
-    rc_t rc = KMMapSize ( mm, & size );
-    if ( rc == 0 )
-    {
-        const KPTrieIndexHdr_v2 *hdr;
-
-#if ! KTRIE_ZEROS_KPTRIE
-        self -> mm = NULL;
-        self -> ord2node = NULL;
-        self -> id2ord . v32 = NULL;
-        self -> variant = 0;
-#endif
-
-        /* ignore empty file */
-        if ( size == 0 )
-        {
-#if ! KTRIE_ZEROS_KPTRIE
-            self -> first = self -> last = self -> maxid = 0;
-            self -> key2id = NULL;
-            self -> count = 0;
-#endif
-            return 0;
-        }
-
-        /* have to have at least the base header */
-        if ( size < sizeof hdr -> dad )
-            return RC ( rcDB, rcIndex, rcConstructing, rcTrie, rcCorrupt );
-
-        rc = KMMapAddrRead ( mm, ( const void** ) & hdr );
-        if ( rc == 0 )
-        {
-            uint16_t id_bits, span_bits;
-            /* recheck header size */
-            if ( size < sizeof * hdr )
-                return RC ( rcDB, rcIndex, rcConstructing, rcTrie, rcCorrupt );
-
-            if ( self -> byteswap )
-            {
-                self -> first = bswap_64(hdr -> first);
-                self -> last = self -> maxid = bswap_64(hdr -> last);
-                id_bits = bswap_16(hdr -> id_bits);
-                span_bits = bswap_16(hdr -> span_bits);
-            }
-            else
-            {
-                self -> first = hdr -> first;
-                self -> last = self -> maxid = hdr -> last;
-                id_bits = hdr -> id_bits;
-                span_bits = hdr -> span_bits;
-            }
-            self -> id_bits = ( uint8_t ) id_bits;
-            self -> span_bits = ( uint8_t ) span_bits;
-            self -> byteswap = byteswap;
-
-            /* try to create the pttree */
-            rc = PTrieMakeOrig ( & self -> key2id,
-                hdr + 1, size -= sizeof * hdr, byteswap );
-            if ( rc == 0 )
-            {
-                size_t ptsize = PTrieSize ( self -> key2id );
-                if ( ptsize <= size )
-                {
-                    /* the count covers at least the number of trie nodes */
-                    self -> count = PTrieCount ( self -> key2id );
-
-                    /* it could be stored without projection */
-                    if ( ptsize == size )
-                        return 0;
-
-                    /* calculate remaining bytes */                     
-                    size -= ptsize;
-
-                    /* there must be enough for an array of 4-byte node ids */
-                    if ( size >= ( ( size_t ) self -> count << 2 ) )
-                    {
-                        /* take the persisted array as-is */
-                        self -> ord2node = ( const uint32_t* )
-                            ( ( const char* ) ( hdr + 1 ) + ptsize );
-
-                        /* read the count */
-                        if ( size >= 4 )
-                        {
-                            self -> count = * ( self -> ord2node ) ++;
-                            size -= 4;
-                            if ( byteswap )
-                                self -> count = bswap_32 ( self -> count );
-                        }
-
-                        /* determine strategy from id span and count */
-                        if ( ( self -> last - self -> first ) < ( ( int64_t ) self -> count << 1 ) )
-                        {
-                            /* must be contiguous */
-                            self -> count = ( uint32_t ) ( self -> last - self -> first + 1 );
-
-                            /* size should be exactly this number of slots */
-                            if ( size == ( ( size_t ) self -> count << 2 ) )
-                                return 0;
-
-                            /* fall through to error return */
-                        }
-                        else if ( ( size == 4 && self -> count == 1 ) || size > ( ( size_t ) self -> count << 2 ) )
-                        {
-                            /* sparse */
-                            size -= ( size_t ) self -> count << 2;
-
-                            /* unpack id map */
-                            if ( id_bits <= 8 )
-                                rc = KPTrieIndexInitID2Ord ( self, size, 1, span_bits, 8 );
-                            else if ( id_bits <= 16 )
-                                rc = KPTrieIndexInitID2Ord ( self, size, 2, span_bits, 16 );
-                            else if ( id_bits <= 32 )
-                                rc = KPTrieIndexInitID2Ord ( self, size, 3, span_bits, 32 );
-                            else
-                                rc = KPTrieIndexInitID2Ord ( self, size, 4, span_bits, 64 );
-
-                            /* done */
-                            if ( rc == 0 )
-                                return 0;
-
-                            PTrieWhack ( self -> key2id ), self -> key2id = NULL;
-                            return rc;
-                        }
-                    }
-                }
-
-                PTrieWhack ( self -> key2id ), self -> key2id = NULL;
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcTrie, rcCorrupt );
-            }
-        }
-    }
-
-    return rc;
-}
-
-rc_t KPTrieIndexInit_v3_v4 ( KPTrieIndex_v2 *self, const KMMap *mm, bool byteswap, bool ptorig )
-{
-    /* get size of map, assumed to be size of file */
-    size_t size;
-    rc_t rc = KMMapSize ( mm, & size );
-    if ( rc == 0 )
-    {
-        const KPTrieIndexHdr_v3 *hdr;
-
-#if ! KTRIE_ZEROS_KPTRIE
-        self -> mm = NULL;
-        self -> ord2node = NULL;
-        self -> id2ord . v32 = NULL;
-        self -> variant = 0;
-#endif
-
-        /* ignore empty file */
-        if ( size == 0 )
-        {
-#if ! KTRIE_ZEROS_KPTRIE
-            self -> first = self -> last = self -> maxid = 0;
-            self -> key2id = NULL;
-            self -> count = 0;
-#endif
-            return 0;
-        }
-
-        /* have to have at least the base header */
-        if ( size < sizeof hdr -> dad )
-            return RC ( rcDB, rcIndex, rcConstructing, rcTrie, rcCorrupt );
-
-        rc = KMMapAddrRead ( mm, ( const void** ) & hdr );
-        if ( rc == 0 )
-        {
-            uint16_t id_bits, span_bits;
-            /* recheck header size */
-            if ( size < sizeof * hdr )
-                return RC ( rcDB, rcIndex, rcConstructing, rcTrie, rcCorrupt );
-
-            if ( self -> byteswap )
-            {
-                self -> first = bswap_64(hdr -> first);
-                self -> last = self -> maxid = bswap_64(hdr -> last);
-                id_bits = bswap_16(hdr -> id_bits);
-                span_bits = bswap_16(hdr -> span_bits);
-            }
-            else
-            {
-                self -> first = hdr -> first;
-                self -> last = self -> maxid = hdr -> last;
-                id_bits = hdr -> id_bits;
-                span_bits = hdr -> span_bits;
-            }
-            self -> id_bits = ( uint8_t ) id_bits;
-            self -> span_bits = ( uint8_t ) span_bits;
-            self -> byteswap = byteswap;
-
-            /* try to create the pttree */
-            rc = ( ptorig ? PTrieMakeOrig : PTrieMake )
-                ( & self -> key2id, hdr + 1, size -= sizeof * hdr, byteswap );
-            if ( rc == 0 )
-            {
-                size_t ptsize = PTrieSize ( self -> key2id );
-                if ( ptsize <= size )
-                {
-                    /* the count covers at least the number of trie nodes */
-                    self -> count = PTrieCount ( self -> key2id );
-
-                    /* it could be stored without projection */
-                    if ( ptsize == size )
-                        return 0;
-
-                    /* calculate remaining bytes */                     
-                    size -= ptsize;
-
-                    /* there must be enough for an array of 4-byte node ids */
-                    if ( size >= ( ( size_t ) self -> count << 2 ) )
-                    {
-                        /* take the persisted array as-is */
-                        self -> ord2node = ( const uint32_t* )
-                            ( ( const char* ) ( hdr + 1 ) + ptsize );
-
-                        /* read the count */
-                        if ( size >= 4 )
-                        {
-                            self -> count = * ( self -> ord2node ) ++;
-                            size -= 4;
-                            if ( byteswap )
-                                self -> count = bswap_32 ( self -> count );
-                        }
-
-                        /* determine strategy from id span and count */
-                        if ( ( self -> last - self -> first ) < ( ( int64_t ) self -> count << 1 ) )
-                        {
-                            /* must be contiguous */
-                            self -> count = ( uint32_t ) ( self -> last - self -> first + 1 );
-
-                            /* size should be exactly this number of slots */
-                            if ( size == ( ( size_t ) self -> count << 2 ) )
-                                return 0;
-
-                            /* fall through to error return */
-                        }
-                        else if ( ( size == 4 && self -> count == 1 ) || size > ( ( size_t ) self -> count << 2 ) )
-                        {
-                            /* sparse */
-                            size -= ( size_t ) self -> count << 2;
-
-                            /* unpack id map */
-                            if ( id_bits <= 8 )
-                                rc = KPTrieIndexInitID2Ord ( self, size, 1, span_bits, 8 );
-                            else if ( id_bits <= 16 )
-                                rc = KPTrieIndexInitID2Ord ( self, size, 2, span_bits, 16 );
-                            else if ( id_bits <= 32 )
-                                rc = KPTrieIndexInitID2Ord ( self, size, 3, span_bits, 32 );
-                            else
-                                rc = KPTrieIndexInitID2Ord ( self, size, 4, span_bits, 64 );
-
-                            /* done */
-                            if ( rc == 0 )
-                                return 0;
-
-                            PTrieWhack ( self -> key2id ), self -> key2id = NULL;
-                            return rc;
-                        }
-                    }
-                }
-
-                PTrieWhack ( self -> key2id ), self -> key2id = NULL;
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcTrie, rcCorrupt );
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* Whack
- *  closes down keymap
- */
-void KPTrieIndexWhack_v2 ( KPTrieIndex_v2 *self )
-{
-    free ( ( void* ) self -> id2ord . v8 );
-    PTrieWhack ( self -> key2id );
-    KMMapRelease ( self -> mm );
-    memset ( self, 0, sizeof * self );
-}
-
-uint32_t KPTrieIndexID2Ord_v2 ( const KPTrieIndex_v2 *self, int64_t id )
-{
-    if ( id >= self -> first && id <= self -> maxid )
-    {
-        int64_t nid;
-        uint32_t left, right, ord, count = self -> count;
-
-        /* convert id either to a zero-based ord,
-           or else the translated id in id2ord */
-        id -= self -> first;
-
-        /* handle type of projection */
-        switch ( self -> variant )
-        {
-        case 0:
-            /* return one-based ord */
-            return ( uint32_t ) ( id + 1 );
-
-        case 1:
-            for ( left = 1, right = count; left <= right; )
-            {
-                ord = ( left + right ) >> 1;
-                nid = self -> id2ord . v8 [ ord - 1 ];
-                if ( id == nid )
-                    return ord;
-
-                if ( id < nid )
-                {
-                    right = ord - 1;
-                    continue;
-                }
-                if ( ord == count )
-                    return ord;
-
-                nid = self -> id2ord . v8 [ ord ];
-                if ( id < nid )
-                    return ord;
-
-                left = ord + 1;
-            }
-            break;
-
-        case 2:
-            for ( left = 1, right = count; left <= right; )
-            {
-                ord = ( left + right ) >> 1;
-                nid = self -> id2ord . v16 [ ord - 1 ];
-                if ( id == nid )
-                    return ord;
-
-                if ( id < nid )
-                {
-                    right = ord - 1;
-                    continue;
-                }
-                if ( ord == count )
-                    return ord;
-
-                nid = self -> id2ord . v16 [ ord ];
-                if ( id < nid )
-                    return ord;
-
-                left = ord + 1;
-            }
-            break;
-
-        case 3:
-            for ( left = 1, right = count; left <= right; )
-            {
-                ord = ( left + right ) >> 1;
-                nid = self -> id2ord . v32 [ ord - 1 ];
-                if ( id == nid )
-                    return ord;
-
-                if ( id < nid )
-                {
-                    right = ord - 1;
-                    continue;
-                }
-                if ( ord == count )
-                    return ord;
-
-                nid = self -> id2ord . v32 [ ord ];
-                if ( id < nid )
-                    return ord;
-
-                left = ord + 1;
-            }
-            break;
-
-        case 4:
-            for ( left = 1, right = count; left <= right; )
-            {
-                ord = ( left + right ) >> 1;
-                nid = self -> id2ord . v64 [ ord - 1 ];
-                if ( id == nid )
-                    return ord;
-
-                if ( id < nid )
-                {
-                    right = ord - 1;
-                    continue;
-                }
-                if ( ord == count )
-                    return ord;
-
-                nid = self -> id2ord . v64 [ ord ];
-                if ( id < nid )
-                    return ord;
-
-                left = ord + 1;
-            }
-            break;
-        }
-    }
-    return 0;
-}
-
-static
-rc_t KPTrieIndexProject_v2 ( const KPTrieIndex_v2 *self,
-    int64_t id,
-#if V2FIND_RETURNS_SPAN
-    int64_t *start_id, uint32_t *span,
-#endif
-    char *key_buff, size_t buff_size, size_t *actsize )
-{
-    uint32_t nid, ord = KPTrieIndexID2Ord_v2 ( self, id );
-    if ( ord != 0 )
-    {
-        assert ( start_id != NULL );
-        assert ( span != NULL );
-
-        nid = self -> ord2node [ ord - 1 ];
-
-        switch ( self -> variant )
-        {
-        case 0:
-            * start_id = id;
-            for ( ; ord < self -> count; ++ ord )
-            {
-                if ( nid != self -> ord2node [ ord ] )
-                    break;
-            }
-            * span = ( uint32_t ) ( self -> first + ord - * start_id );
-            break;
-        case 1:
-            * start_id = self -> id2ord . v8 [ ord - 1 ];
-            * span = ( uint32_t ) ( ( ( ord == self -> count ) ?
-                ( self -> maxid - self -> first + 1 ) : self -> id2ord . v8 [ ord ] ) - * start_id );
-            *start_id += self -> first;
-            break;
-        case 2:
-            * start_id = self -> id2ord . v16 [ ord - 1 ];
-            * span = ( uint32_t ) ( ( ( ord == self -> count ) ?
-                ( self -> maxid - self -> first + 1 ) : self -> id2ord . v16 [ ord ] ) - * start_id );
-            *start_id += self -> first; 
-            break;
-        case 3:
-            * start_id = self -> id2ord . v32 [ ord - 1 ];
-            * span = ( uint32_t ) ( ( ( ord == self -> count ) ?
-                ( self -> maxid - self -> first + 1 ) : self -> id2ord . v32 [ ord ] ) - * start_id );
-            *start_id += self -> first; 
-            break;
-        case 4:
-            * start_id = self -> id2ord . v64 [ ord - 1 ];
-            * span = ( uint32_t ) ( ( ( ord == self -> count ) ?
-                ( self -> maxid - self -> first + 1 ) : self -> id2ord . v64 [ ord ] ) - * start_id );
-            *start_id += self -> first; 
-            break;
-        }
-
-        if ( nid != 0 )
-        {
-            rc_t rc;
-            PTNode node;
-
-            if ( self -> byteswap )
-                nid = bswap_32 ( nid );
-
-            rc = PTrieGetNode ( self -> key2id, & node, nid );
-            if ( rc == 0 )
-            {
-                const String *key;
-                rc = PTNodeMakeKey ( & node, & key );
-                if ( rc == 0 )
-                {
-                    if ( actsize != NULL )
-                        * actsize = key -> size;
-                    if ( key -> size >= buff_size )
-                        rc = RC ( rcDB, rcIndex, rcProjecting, rcBuffer, rcInsufficient );
-                    else
-                        string_copy ( key_buff, buff_size, key -> addr, key -> size );
-
-                    StringWhack ( ( String* ) key );
-                }
-            }
-            return rc;
-        }
-    }
-
-    return RC ( rcDB, rcIndex, rcProjecting, rcId, rcNotFound );
-}
-
-/* Find
- */
-static
-rc_t KPTrieIndexFind_v2 ( const KPTrieIndex_v2 *self,
-    const char *str, int64_t *start_id,
-#if V2FIND_RETURNS_SPAN
-    uint32_t *span,
-#endif
-    int ( CC * custom_cmp ) ( const void *item, const PBSTNode *n, void *data ), void *data, bool convertFromV1 )
-{
-    rc_t rc;
-
-    /* search within in-core index */
-    if ( self -> count == 0 )
-        rc = RC ( rcDB, rcIndex, rcSelecting, rcString, rcNotFound );
-    else
-    {
-        uint32_t nid;
-        PTNode pnode;
-
-        String key;
-        StringInitCString ( & key, str );
-
-        nid = PTrieFind ( self -> key2id, & key, & pnode, custom_cmp, data );
-        if ( nid == 0 )
-            rc = RC ( rcDB, rcIndex, rcSelecting, rcString, rcNotFound );
-        else
-        {
-            size_t usize;
-
-            /* detect conversion from v1 */
-            if ( convertFromV1 && self -> id_bits == 0 )
-            {
-                /* v1 stored tree will have just a 32-bit spot id as data */
-                uint32_t id;
-                assert ( pnode . data . size == sizeof id );
-                memcpy ( & id, pnode . data . addr, sizeof id );
-                * start_id = id;
-                rc = 0;
-            }
-            else
-            {
-                /* should be native v2 */
-                if ( self -> id_bits > 0 )
-                {
-                    rc = Unpack ( self -> id_bits, sizeof * start_id * 8,
-                        pnode . data . addr, 0, self -> id_bits, NULL,
-                        start_id, sizeof * start_id, & usize );
-                }
-                else
-                {
-                    rc = 0;
-                }
-                * start_id += self -> first;
-            }
-
-            if ( rc == 0 )
-            {
-#if V2FIND_RETURNS_SPAN
-                if ( self -> ord2node != NULL )
-                {
-                    uint32_t ord = KPTrieIndexID2Ord_v2 ( self, * start_id );
-                    if ( ord == 0 )
-                        rc = RC ( rcDB, rcIndex, rcSelecting, rcId, rcNotFound );
-                    else if ( ord == self -> count )
-                        * span = ( uint32_t ) ( self -> maxid - * start_id + 1 );
-                    else switch ( self -> variant )
-                    {
-                    case 0:
-                        for ( ; ord < self -> count; ++ ord )
-                        {
-                            if ( nid != self -> ord2node [ ord ] )
-                                break;
-                        }
-                        * span = ( uint32_t ) ( self -> first + ord - * start_id );
-                        break;
-                    case 1:
-                        * span = ( uint32_t ) ( self -> first + self -> id2ord . v8 [ ord ] - * start_id );
-                        break;
-                    case 2:
-                        * span = ( uint32_t ) ( self -> first + self -> id2ord . v16 [ ord ] - * start_id );
-                        break;
-                    case 3:
-                        * span = ( uint32_t ) ( self -> first + self -> id2ord . v32 [ ord ] - * start_id );
-                        break;
-                    case 4:
-                        * span = ( uint32_t ) ( self -> first + self -> id2ord . v64 [ ord ] - * start_id );
-                        break;
-                    }
-                }
-                else if ( self -> span_bits == 0 )
-                    * span = 1;
-                else
-                {
-                    rc = Unpack ( self -> span_bits, sizeof * span * 8,
-                        pnode . data . addr, 0, self -> id_bits, NULL,
-                        span, sizeof * span, & usize );
-                }
-#endif
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KTrieIndex_v2
- */
-
-
-/* whack whack */
-void KTrieIndexWhack_v2 ( KTrieIndex_v2 *self )
-{
-    KPTrieIndexWhack_v2 ( & self -> pt );
-}
-
-/* initialize an index from file */
-rc_t KTrieIndexOpen_v2 ( KTrieIndex_v2 *self, const KMMap *mm, bool byteswap )
-{
-    rc_t rc;
-    uint32_t version;
-    bool ptorig = false;
-    const KDBHdr *hdr = NULL;
-
-#if ! KTRIE_ZEROS_KPTRIE
-#error "KTrie is supposed to zero KPTrie"
-#endif
-    memset ( self, 0, sizeof * self );
-
-    /* open the prior index in persisted mode, but
-       don't load it into the core-based Trie */
-    rc = KMMapAddrRead ( mm, ( const void** ) & hdr );
-    if ( rc != 0 )
-        return rc;
-
-    self -> pt . byteswap = byteswap;
-    version = byteswap ? bswap_32 ( hdr -> version ) : hdr -> version;
-
-    switch ( version )
-    {
-    case 1:
-        rc = KPTrieIndexInitFromV1_v2 ( & self -> pt, mm, byteswap );
-        break;
-    case 2:
-        rc = KPTrieIndexInit_v2 ( & self -> pt, mm, byteswap );
-        break;
-    case 3:
-        ptorig = true;
-    case 4:
-        rc = KPTrieIndexInit_v3_v4 ( & self -> pt, mm, byteswap, ptorig );
-        break;
-    default:
-        rc = RC(rcDB, rcIndex, rcConstructing, rcIndex, rcBadVersion);
-        break;
-    }
-    if ( rc == 0 )
-    {
-        /* the file existed but was empty */
-        if ( self -> pt . key2id == NULL )
-        {
-            self -> pt . mm = NULL;
-            return 0;
-        }
-
-        /* retain a reference to memory map */
-        rc = KMMapAddRef ( mm );
-        if ( rc == 0 )
-        {
-            self -> pt . mm = mm;
-            return 0;
-        }
-
-        /* self -> pt gets whacked below */
-    }
-
-    KTrieIndexWhack_v2 ( self );
-    return rc;
-}
-
-
-/* map key to id range */
-rc_t KTrieIndexFind_v2 ( const KTrieIndex_v2 *self,
-    const char *str, int64_t *start_id,
-#if V2FIND_RETURNS_SPAN
-    uint32_t *span,
-#endif
-    int ( CC * custom_cmp ) ( const void *item, const PBSTNode *n, void *data ), void *data, bool convertFromV1  )
-{
-    /* search within persisted index */
-    if ( self -> pt . key2id != NULL )
-    {
-        return KPTrieIndexFind_v2 ( & self -> pt, str, start_id,
-#if V2FIND_RETURNS_SPAN
-                                    span,
-#endif
-                                    custom_cmp, data, convertFromV1 );
-    }
-
-    return RC ( rcDB, rcIndex, rcSelecting, rcString, rcNotFound );
-}
-
-rc_t KTrieIndexProject_v2 ( const KTrieIndex_v2 *self,
-    int64_t id,
-#if V2FIND_RETURNS_SPAN
-     int64_t *start_id, uint32_t *span,
-#endif
-    char *key_buff, size_t buff_size, size_t *actsize )
-{
-    if ( self -> pt . ord2node == NULL )
-        return RC ( rcDB, rcIndex, rcProjecting, rcId, rcNotFound );
-
-    return KPTrieIndexProject_v2 ( & self -> pt, id,
-#if V2FIND_RETURNS_SPAN
-       start_id, span,
-#endif
-        key_buff, buff_size, actsize );
-}
diff --git a/libs/kdb/trieval-v1.c b/libs/kdb/trieval-v1.c
deleted file mode 100644
index fff6cff..0000000
--- a/libs/kdb/trieval-v1.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-
-#include "index-priv.h"
-
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-
-
-rc_t KTrieIndexCheckConsistency_v1 ( const KTrieIndex_v1 *self,
-    int64_t *start_id, uint64_t *id_range, uint64_t *num_keys,
-    uint64_t *num_rows, uint64_t *num_holes,
-    struct KIndex const *outer, bool key2id, bool id2key )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcValidating, rcParam, rcNull );
-
-    return KPTrieIndexCheckConsistency_v1 ( & self -> pt,
-        start_id, id_range, num_keys, num_rows, num_holes,
-        outer, key2id, id2key );
-}
diff --git a/libs/kdb/trieval-v2.c b/libs/kdb/trieval-v2.c
deleted file mode 100644
index e3e095b..0000000
--- a/libs/kdb/trieval-v2.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-
-#include "index-priv.h"
-
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-
-
-rc_t KTrieIndexCheckConsistency_v2 ( const KTrieIndex_v2 *self,
-    int64_t *start_id, uint64_t *id_range, uint64_t *num_keys,
-    uint64_t *num_rows, uint64_t *num_holes,
-    struct KIndex const *outer, bool key2id, bool id2key, bool all_ids, bool convertFromV1  )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcValidating, rcParam, rcNull );
-
-    return KPTrieIndexCheckConsistency_v2 ( & self -> pt,
-        start_id, id_range, num_keys, num_rows, num_holes,
-        outer, key2id, id2key, all_ids, convertFromV1 );
-}
diff --git a/libs/kdb/u64idx-v3.c b/libs/kdb/u64idx-v3.c
deleted file mode 100644
index ce5c13f..0000000
--- a/libs/kdb/u64idx-v3.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-
-#include "index-priv.h"
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/md5.h>
-#include <kfs/mmap.h>
-#include <klib/pbstree.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <string.h>
-
-typedef struct KU64Index_PNode KU64Index_PNode;
-struct KU64Index_PNode
-{
-    uint64_t key;
-    uint64_t key_size;
-    int64_t id;
-    uint64_t id_qty;
-};
-
-rc_t KU64IndexOpen_v3( KU64Index_v3* self, const KMMap *mm, bool byteswap )
-{
-    rc_t rc;
-    const KIndexFileHeader_v3 *hdr;
-
-    /* when opened for create, there will be no existing index */
-    if( mm == NULL )
-        return 0;
-
-    /* open the prior index in persisted mode */
-    rc = KMMapAddrRead ( mm, ( const void** ) & hdr );
-    if( rc == 0 )
-    {
-        size_t msize;
-        rc = KMMapSize ( mm, & msize );
-        if ( rc == 0 )
-        {
-            if ( msize == 0 )
-                return 0;
-            if ( msize < sizeof * hdr )
-                return RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcCorrupt );
-            rc = PBSTreeMake ( & self -> tree, hdr + 1, msize - sizeof * hdr, byteswap);
-            if( rc == 0 )
-            {
-                rc = KMMapAddRef(mm);
-                if ( rc == 0 )
-                {
-                    self -> mm = mm;
-                    return 0;
-                }
-            }
-        }
-    }
-
-    KU64IndexWhack_v3(self);
-    return rc;
-}
-
-rc_t KU64IndexWhack_v3(KU64Index_v3* self)
-{
-    PBSTreeWhack(self->tree);
-    KMMapRelease(self->mm);
-    self->tree = NULL;
-    return 0;
-}
-
-typedef struct KU64Index_GrepData_struct {
-    rc_t rc;
-    rc_t (CC*func)(uint64_t key, uint64_t key_size, int64_t id, uint64_t id_qty, void* data);
-    void* data;
-    KU64Index_PNode search;
-    uint64_t* key;
-    uint64_t* key_size;
-    int64_t* id;
-    uint64_t* id_qty;
-} KU64Index_GrepData;
-
-/*
- * return true: if found or break DoUntil for FindAll
- */
-static
-bool CC KU64Index_Grep(PBSTNode *node, void *data)
-{
-    const KU64Index_PNode* n = node->data.addr;
-    KU64Index_GrepData* d = data;
-
-    if( d->search.key >= n->key && (d->search.key - n->key) < n->key_size ) {
-        if( d->func ) {
-            d->rc = (*d->func)(n->key, n->key_size, n->id, n->id_qty, d->data);
-            if( d->rc != 0 ) {
-                return true;
-            }
-        } else {
-            *d->key = n->key;
-            *d->key_size = n->key_size;
-            *d->id = n->id;
-            *d->id_qty = n->id_qty;
-            return true;
-        }
-    }
-    return false;
-}
-
-rc_t KU64IndexFind_v3( const KU64Index_v3* self, uint64_t offset, uint64_t* key, 
-    uint64_t* key_size, int64_t* id, uint64_t* id_qty )
-{
-    KU64Index_GrepData d;
-
-    memset(&d, 0, sizeof(KU64Index_GrepData));
-    d.search.key = offset;
-    d.key = key;
-    d.key_size = key_size;
-    d.id = id;
-    d.id_qty = id_qty;
-    if( !PBSTreeDoUntil(self->tree, false, KU64Index_Grep, &d) ) {
-        d.rc = RC(rcDB, rcIndex, rcSelecting, rcId, rcNotFound);
-    }
-    return d.rc;
-}
-
-
-rc_t KU64IndexFindAll_v3( const KU64Index_v3* self, uint64_t offset, 
-    rc_t (CC*f)(uint64_t key, uint64_t key_size, int64_t id, uint64_t id_qty, void* data), void* data)
-{
-    KU64Index_GrepData d;
-
-    memset(&d, 0, sizeof(KU64Index_GrepData));
-    d.func = f;
-    d.data = data;
-    d.search.key = offset;
-    PBSTreeDoUntil(self->tree, false, KU64Index_Grep, &d);
-    return d.rc;
-}
diff --git a/libs/kdb/wcoldata-priv.h b/libs/kdb/wcoldata-priv.h
deleted file mode 100644
index 9d27d09..0000000
--- a/libs/kdb/wcoldata-priv.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_coldata_priv_
-#define _h_coldata_priv_
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifndef _h_klib_checksum_
-#include <klib/checksum.h>
-#endif
-
-#include <kfs/file.h>
-#include <kfs/md5.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KMD5SumFmt;
-typedef union KColumnPageMap KColumnPageMap;
-
-
-/*--------------------------------------------------------------------------
- * KColumnData
- *  data fork
- *
- *  only handling append-mode today
- *
- *  kept 64-bit aligned
- */
-typedef struct KColumnData KColumnData;
-struct KColumnData
-{
-    /* cached end of data fork */
-    uint64_t eof;
-
-    /* data fork itself */
-    KFile *f;
-    KMD5File *fmd5;
-
-    /* page size */
-    size_t pgsize;
-
-};
-
-/* DefaultPageSize
- *  static method
- */
-#define KColumnDataDefaultPageSize( reuse_pages ) \
-    ( ( reuse_pages ) ? 4096 : 1 )
-
-/* Create
- */
-rc_t KColumnDataCreate ( KColumnData *self, KDirectory *dir,
-    KMD5SumFmt *md5, KCreateMode mode, uint64_t eof, size_t pgsize );
-
-/* Open
- */
-rc_t KColumnDataOpenRead ( KColumnData *self,
-    const KDirectory *dir, uint64_t eof, size_t pgsize );
-rc_t KColumnDataOpenUpdate ( KColumnData *self, KDirectory *dir,
-    KMD5SumFmt *md5, uint64_t eof, size_t pgsize );
-
-/* Whack
- */
-rc_t KColumnDataWhack ( KColumnData *self );
-
-/* Read
- *  reads from the data fork using a blob map
- */
-rc_t KColumnDataRead ( const KColumnData *self, const KColumnPageMap *pm,
-    size_t offset, void *buffer, size_t bsize, size_t *num_read );
-
-/* Write
- *  writes to the data fork using a blob map
- */
-rc_t  KColumnDataWrite ( KColumnData *self, KColumnPageMap *pm,
-    size_t offset, const void *buffer, size_t bytes, size_t *num_writ );
-
-/* Commit
- *  keeps changes indicated by page map and blob size
- */
-rc_t KColumnDataCommit ( KColumnData *self,
-    const KColumnPageMap *pm, size_t bytes );
-
-/* CommitDone
- *  finalizes a commit
- */
-rc_t KColumnDataCommitDone ( KColumnData * self );
-
-/* Free
- *  frees pages from a map
- */
-rc_t KColumnDataFree ( KColumnData *self,
-    const KColumnPageMap *pm, size_t bytes );
-
-
-/*--------------------------------------------------------------------------
- * KColumnPageMap
- *  map of pages involved in column blob
- */
-union KColumnPageMap
-{
-    /* for non-paged data forks, a single page id
-       describes the start of the blob, where the
-       remainder is sequential */
-    uint64_t pg;
-};
-
-/* Create
- *  creates a new page map using the first available page id
- *  obtains first free data fork page
- */
-rc_t KColumnPageMapCreate (  KColumnPageMap *self, KColumnData *cd );
-
-/* Open
- *  opens an blob by raw page id and size
- *
- *  "pm" [ OUT ] - modifiable parameter for blob page map
- *
- *  "pg" [ IN ] and "sz" [ IN ] - identifies pages of data fork included
- *  within the blob.
- */
-rc_t KColumnPageMapOpen ( KColumnPageMap *pm,
-    KColumnData *cd, uint64_t pg, size_t sz );
-
-/* Whack
- *  disposes of memory in the case of a page array
- */
-void KColumnPageMapWhack ( KColumnPageMap *self, const KColumnData *cd );
-
-/* Id
- *  captures id of initial page
- */
-rc_t KColumnPageMapId ( const KColumnPageMap *self,
-    const KColumnData *cd, uint64_t *pg );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_coldata_priv_ */
diff --git a/libs/kdb/wcoldata.c b/libs/kdb/wcoldata.c
deleted file mode 100644
index f4647e0..0000000
--- a/libs/kdb/wcoldata.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "wcoldata-priv.h"
-#include "wcolumn-priv.h"
-#include <kfs/file.h>
-#include <kfs/buffile.h>
-#include <kfs/md5.h>
-#include <kfs/impl.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-
-
-#define DATA_READ_FILE_BUFFER 256 * 1024
-
-
-/*--------------------------------------------------------------------------
- * KColumnData
- */
-
-
-/* Init
- */
-static
-rc_t KColumnDataInit ( KColumnData *self, uint64_t pos, size_t pgsize )
-{
-    rc_t rc = KFileSize ( self -> f, & self -> eof );
-    if ( rc == 0 )
-    {
-        if ( self -> eof < pos || pgsize == 0 || ( pos % pgsize ) != 0 )
-            rc = RC ( rcDB, rcColumn, rcConstructing, rcData, rcCorrupt );
-        else
-        {
-            self -> eof = pos;
-            self -> pgsize = pgsize;
-            return 0;
-        }
-    }
-
-    KFileRelease ( self -> f );
-    self -> f = NULL;
-    return rc;
-}
-
-/* Create
- */
-rc_t KColumnDataCreate ( KColumnData *self, KDirectory *dir,
-    KMD5SumFmt *md5, KCreateMode mode, uint64_t eof, size_t pgsize )
-{
-    rc_t rc = KColumnFileCreate ( & self -> f, & self -> fmd5, dir, md5, mode, true, "data" );
-    if ( rc == 0 )
-        rc = KColumnDataInit ( self, eof, pgsize );
-    return rc;
-}
-
-/* Open
- */
-rc_t KColumnDataOpenRead ( KColumnData *self,
-    const KDirectory *dir, uint64_t eof, size_t pgsize )
-{
-    rc_t rc = KDirectoryOpenFileRead ( dir,
-        ( const KFile** ) & self -> f, "data" );
-#if DATA_READ_FILE_BUFFER
-    if ( rc == 0 )
-    {
-        KFile * orig = self -> f;
-        rc = KBufFileMakeRead ( ( const KFile** ) & self -> f, self -> f, DATA_READ_FILE_BUFFER );
-        if ( rc == 0 )
-	{
-	    KFileRelease ( orig );
-	}
-	else
-        {
-            self -> f = orig;
-            rc = 0;
-        }
-    }
-#endif
-    if ( rc == 0 )
-        rc = KColumnDataInit ( self, eof, pgsize );
-    return rc;
-}
-
-rc_t KColumnDataOpenUpdate ( KColumnData *self, KDirectory *dir,
-    KMD5SumFmt *md5, uint64_t eof, size_t pgsize )
-{
-    rc_t rc = KColumnFileOpenUpdate ( & self -> f, & self -> fmd5, dir, md5, true, "data" );
-    if ( rc == 0 )
-        rc = KColumnDataInit ( self, eof, pgsize );
-    return rc;
-}
-
-/* Whack
- */
-rc_t KColumnDataWhack ( KColumnData *self )
-{
-    rc_t rc = KFileRelease ( self -> f );
-    if ( rc == 0 )
-    {
-        self -> f = NULL;
-        self -> fmd5 = NULL;
-    }
-    return rc;
-}
-
-/* Read
- *  reads from the data fork using a blob map
- */
-rc_t KColumnDataRead ( const KColumnData *self, const KColumnPageMap *pm,
-    size_t offset, void *buffer, size_t bsize, size_t *num_read )
-{
-    uint64_t pos;
-
-    assert ( self != NULL );
-    assert ( pm != NULL );
-
-    if ( bsize == 0 )
-    {
-        assert ( num_read != NULL );
-        * num_read = 0;
-        return 0;
-    }
-
-    pos = pm -> pg * self -> pgsize;
-    return KFileRead ( self -> f, pos + offset, buffer, bsize, num_read );
-}
-
-/* Write
- *  writes to the data fork using a blob map
- */
-rc_t KColumnDataWrite ( KColumnData *self, KColumnPageMap *pm,
-    size_t offset, const void *buffer, size_t bytes, size_t *num_writ )
-{
-    uint64_t pos;
-
-    assert ( self != NULL );
-    assert ( pm != NULL );
-
-    if ( bytes == 0 )
-    {
-        assert ( num_writ != NULL );
-        * num_writ = 0;
-        return 0;
-    }
-
-    pos = pm -> pg * self -> pgsize;
-    return KFileWrite ( self -> f, pos + offset, buffer, bytes, num_writ );
-}
-
-/* Commit
- *  keeps changes indicated by page map and blob size
- */
-rc_t KColumnDataCommit ( KColumnData *self,
-    const KColumnPageMap *pm, size_t bytes )
-{
-    uint64_t pos;
-    size_t remainder;
-
-    assert ( self != NULL );
-    assert ( pm != NULL );
-
-    if ( self -> pgsize == 1 )
-    {
-        /* can only commit if extending page */
-        if ( pm -> pg != self -> eof )
-            return RC ( rcDB, rcBlob, rcCommitting, rcPagemap, rcInvalid );
-
-        self -> eof += bytes;
-        return 0;
-    }
-
-    assert ( ( self -> eof % self -> pgsize ) == 0 );
-    pos = self -> eof / self -> pgsize;
-
-    /* can only commit if extending page */
-    if ( pm -> pg != pos )
-        return RC ( rcDB, rcBlob, rcCommitting, rcPagemap, rcInvalid );
-
-    /* advance eof */
-    if ( bytes == 0 )
-        return 0;
-
-    pos = self -> eof + bytes;
-
-    /* maintain page boundary */
-    remainder = bytes % self -> pgsize;
-    if ( remainder != 0 )
-    {
-        pos += self -> pgsize - remainder;
-        assert ( ( pos % self -> pgsize ) == 0 );
-    }
-
-    self -> eof = pos;
-    return 0;
-}
-
-rc_t KColumnDataCommitDone ( KColumnData * self )
-{
-    rc_t rc = 0;
-
-    assert ( self != NULL );
-    if ( self -> fmd5 != NULL )
-    {
-	assert ( self -> f == KMD5FileToKFile ( self -> fmd5 ) );
-
-	rc = KMD5FileCommit ( self -> fmd5 );
-    }
-    return rc ;
-}
-
-/* Free
- *  frees pages from a map
- */
-rc_t KColumnDataFree ( KColumnData *self,
-    const KColumnPageMap *pm, size_t bytes )
-{
-    uint64_t pos;
-    size_t remainder;
-
-    if ( self -> pgsize == 1 )
-    {
-        if ( pm -> pg + bytes != self -> eof )
-            return RC ( rcDB, rcBlob, rcReleasing, rcPagemap, rcInvalid );
-
-        self -> eof = pm -> pg;
-        return 0;
-    }
-
-    assert ( ( self -> eof % self -> pgsize ) == 0 );
-    pos = pm -> pg * self -> pgsize;
-
-    remainder = bytes % self -> pgsize;
-    if ( pos + bytes + remainder != self -> eof )
-        return RC ( rcDB, rcBlob, rcReleasing, rcPagemap, rcInvalid );
-
-    self -> eof = pos;
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * KColumnPageMap
- *  map of pages involved in column blob
- */
-
-/* Create
- *  creates a new page map using the first available page id
- *  obtains first free data fork page
- */
-rc_t KColumnPageMapCreate (  KColumnPageMap *self, KColumnData *cd )
-{
-    assert ( cd != NULL );
-    if ( ! cd -> f -> write_enabled )
-        return RC ( rcDB, rcPagemap, rcConstructing, rcColumn, rcReadonly );
-
-    assert ( self != NULL );
-    assert ( ( cd -> eof % cd -> pgsize ) == 0 );
-    self -> pg = cd -> eof / cd -> pgsize;
-
-    return 0;
-}
-
-/* Open
- *  opens an blob by raw page id and size
- *
- *  "pm" [ OUT ] - modifiable parameter for blob page map
- *
- *  "pg" [ IN ] and "sz" [ IN ] - identifies pages of data fork included
- *  within the blob.
- */
-rc_t KColumnPageMapOpen ( KColumnPageMap *self,
-    KColumnData *cd, uint64_t pg, size_t sz )
-{
-    uint64_t pos;
-
-    assert ( cd != NULL );
-    pos = pg * cd -> pgsize;
-    if ( pos + sz > cd -> eof )
-    {
-        if ( pos >= cd -> eof )
-            return RC ( rcDB, rcColumn, rcOpening, rcParam, rcExcessive );
-        return RC ( rcDB, rcColumn, rcOpening, rcRange, rcExcessive );
-    }
-
-    assert ( self != NULL );
-    self -> pg = pg;
-
-    return 0;
-}
-
-/* Whack
- *  disposes of memory in the case of a page array
- */
-void KColumnPageMapWhack ( KColumnPageMap *self, const KColumnData *cd )
-{
-    assert ( self != NULL );
-    assert ( cd != NULL );
-}
-
-/* Id
- *  captures id of initial page
- */
-rc_t KColumnPageMapId ( const KColumnPageMap *self,
-    const KColumnData *cd, uint64_t *pg )
-{
-    assert ( self != NULL );
-    assert ( cd != NULL );
-    assert ( pg != NULL );
-
-    * pg = self -> pg;
-    return 0;
-}
diff --git a/libs/kdb/wcolidx-priv.h b/libs/kdb/wcolidx-priv.h
deleted file mode 100644
index e57fe2c..0000000
--- a/libs/kdb/wcolidx-priv.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_colidx_priv_
-#define _h_colidx_priv_
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#include <kfs/md5.h>
-
-#ifndef _h_colfmt_priv_
-#include "colfmt-priv.h"
-#endif
-
-#ifndef _h_colidx0_priv_
-#include "wcolidx0-priv.h"
-#endif
-
-#ifndef _h_colidx1_priv_
-#include "wcolidx1-priv.h"
-#endif
-
-#ifndef _h_colidx2_priv_
-#include "wcolidx2-priv.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KMD5SumFmt;
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx
- *  the index fork
- */
-typedef struct KColumnIdx KColumnIdx;
-struct KColumnIdx
-{
-    /* first active id within db
-       and first id on upper limit
-       i.e. outside of db such that
-       id_upper - id_first == num_ids */
-    int64_t id_first;
-    int64_t id_upper;
-
-/*     struct KFile * f; */
-    uint32_t vers;
-
-    /* level 0 index */
-    KColumnIdx0 idx0;
-
-    /* level 1 index */
-    KColumnIdx1 idx1;
-
-    /* level 2 index */
-    KColumnIdx2 idx2;
-
-    /* commit counter */
-    uint32_t commit_count;
-};
-
-/* Create
- */
-rc_t KColumnIdxCreate ( KColumnIdx *self,
-    KDirectory *dir, struct KMD5SumFmt *md5, KCreateMode mode,
-    uint64_t *data_eof, size_t pgsize, int32_t checksum );
-
-/* Open
- */
-rc_t KColumnIdxOpenRead ( KColumnIdx *self, const KDirectory *dir,
-			  uint64_t *data_eof, size_t *pgsize, 
-			  int32_t *checksum );
-rc_t KColumnIdxOpenUpdate ( KColumnIdx *self, KDirectory *dir,
-    KMD5SumFmt *md5, uint64_t *data_eof, size_t *pgsize,
-    int32_t *checksum );
-
-/* Whack
- */
-rc_t KColumnIdxWhack ( KColumnIdx *self, 
-    uint64_t data_eof, size_t pgsize, int32_t checksum );
-
-/* Version
- */
-rc_t KColumnIdxVersion ( const KColumnIdx *self, uint32_t *version );
-#define KColumnIdxVersion( self, version ) \
-    KColumnIdx1Version ( & ( self ) -> idx1, version )
-
-/* ByteOrder
- */
-rc_t KColumnIdxByteOrder ( const KColumnIdx *self, bool *reversed );
-#define KColumnIdxByteOrder( self, reversed ) \
-    KColumnIdx1ByteOrder ( & ( self ) -> idx1, reversed )
-
-/* IdRange
- *  returns range of ids contained within
- */
-rc_t KColumnIdxIdRange ( const KColumnIdx *self,
-    int64_t *first, int64_t *last );
-
-/* FindFirstRowId
- */
-rc_t KColumnIdxFindFirstRowId ( const KColumnIdx * self,
-    int64_t * found, int64_t start );
-
-/* LocateBlob
- *  locate an existing blob
- */
-rc_t KColumnIdxLocateBlob ( const KColumnIdx *self,
-    KColBlobLoc *loc, int64_t first, int64_t last );
-
-/* Commit
- *  writes a new blob location to idx0
- *  updates idx1 with header information
- *  this should be the final step in committing a write operation
- */
-rc_t KColumnIdxCommit ( KColumnIdx *self, struct KMD5SumFmt *md5,
-    const KColBlobLoc *loc, uint32_t commit_freq,
-    uint64_t data_eof, size_t pgsize, int32_t checksum );
-
-/* CommitDone
- *  finalizes a commit
- */
-rc_t KColumnIdxCommitDone ( KColumnIdx * self );
-
-/* Reindex
- */
-rc_t KColumnIdxReindex ( KColumnIdx *self, struct KMD5SumFmt *md5,
-    uint32_t commit_freq, uint64_t data_eof, size_t pgsize, int32_t checksum );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_colidx_priv_ */
diff --git a/libs/kdb/wcolidx.c b/libs/kdb/wcolidx.c
deleted file mode 100644
index 7411f67..0000000
--- a/libs/kdb/wcolidx.c
+++ /dev/null
@@ -1,694 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "wcolidx-priv.h"
-#include "widxblk-priv.h"
-#include "werror-priv.h"
-#include <kfs/file.h>
-#include <kfs/md5.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx
- *  the index fork
- */
-
-
-/* EstablishIdRange
- */
-static
-void KColumnIdxEstablishIdRange ( KColumnIdx *self )
-{
-    int64_t first, upper;
-
-    if ( ! KColumnIdx0IdRange ( & self -> idx0, & self -> id_first, & self -> id_upper ) )
-    {
-        if ( ! KColumnIdx1IdRange ( & self -> idx1, & self -> id_first, & self -> id_upper ) )
-            self -> id_first = self -> id_upper = 1;
-    }
-    else if ( KColumnIdx1IdRange ( & self -> idx1, & first, & upper ) )
-    {
-        if ( self -> id_first > first )
-            self -> id_first = first;
-        if ( self -> id_upper < upper )
-            self -> id_upper = upper;
-    }
-}
-
-
-/* Create
- */
-rc_t KColumnIdxCreate ( KColumnIdx *self, KDirectory *dir,
-    KMD5SumFmt *md5, KCreateMode mode, uint64_t *data_eof,
-    size_t pgsize, int32_t checksum )
-{
-    rc_t rc = 0;
-    uint64_t idx2_eof;
-    uint32_t idx0_count;
-
-    assert ( self != NULL );
-
-    rc = KColumnIdx1Create ( & self -> idx1, dir, md5, mode,
-        data_eof, & idx0_count, & idx2_eof, pgsize, checksum );
-    if ( rc == 0 )
-    {
-        rc = ( self -> idx1 . vers < 3 ) ?
-            KColumnIdx0Create_v1 ( & self -> idx0, dir, md5, mode, self -> idx1 . bswap ):
-            KColumnIdx0Create ( & self -> idx0, dir, idx0_count, md5, mode, self -> idx1 . bswap );
-        if ( rc == 0 )
-        {
-            rc = KColumnIdx2Create ( & self -> idx2, dir, md5, mode, idx2_eof );
-            if ( rc == 0 )
-            {
-                KColumnIdxEstablishIdRange ( self );
-
-                /* successful return */
-                return 0;
-            }
-
-            KColumnIdx0Whack ( & self -> idx0 );
-        }
-
-        KColumnIdx1Whack ( & self -> idx1 );
-    }
-
-    /* failure return */
-    return rc;
-}
-
-/* Open
- */
-rc_t KColumnIdxOpenRead ( KColumnIdx *self, const KDirectory *dir,
-    uint64_t *data_eof, size_t *pgsize, int32_t *checksum )
-{
-    rc_t rc;
-    uint64_t idx2_eof;
-    uint32_t idx0_count;
-
-    assert ( self != NULL );
-
-    rc = KColumnIdx1OpenRead ( & self -> idx1,
-        dir, data_eof, & idx0_count, & idx2_eof, pgsize, checksum );
-    if ( rc == 0 )
-    {
-        rc = ( self -> idx1 . vers < 3 ) ?
-            KColumnIdx0OpenRead_v1 ( & self -> idx0, dir, self -> idx1 . bswap ):
-            KColumnIdx0OpenRead ( & self -> idx0, dir, idx0_count, self -> idx1 . bswap );
-        if ( rc == 0 )
-        {
-            rc = KColumnIdx2OpenRead ( & self -> idx2, dir, idx2_eof );
-            if ( rc == 0 || GetRCState ( rc ) == rcNotFound )
-            {
-                KColumnIdxEstablishIdRange ( self );
-                return 0;
-            }
-
-            KColumnIdx0Whack ( & self -> idx0 );
-        }
-
-        KColumnIdx1Whack ( & self -> idx1 );
-    }
-
-    return rc;
-}
-
-rc_t KColumnIdxOpenUpdate ( KColumnIdx *self, KDirectory *dir,
-    KMD5SumFmt *md5, uint64_t *data_eof, size_t *pgsize, int32_t *checksum )
-{
-    rc_t rc;
-    uint64_t idx2_eof;
-    uint32_t idx0_count;
-
-    assert ( self != NULL );
-
-    rc = KColumnIdx1OpenUpdate ( & self -> idx1, dir,
-        md5, data_eof, & idx0_count, & idx2_eof, pgsize, checksum );
-    if ( rc == 0 )
-    {
-        rc = ( self -> idx1 . vers < 3 ) ?
-            KColumnIdx0Create_v1 ( & self -> idx0, dir, md5, kcmOpen, self -> idx1 . bswap ):
-            KColumnIdx0Create ( & self -> idx0, dir, idx0_count, md5, kcmOpen, self -> idx1 . bswap );
-        if ( rc == 0 )
-        {
-            rc = KColumnIdx2Create ( & self -> idx2, dir, md5, kcmOpen, idx2_eof );
-            if ( rc == 0 )
-            {
-                KColumnIdxEstablishIdRange ( self );
-                return 0;
-            }
-
-            KColumnIdx0Whack ( & self -> idx0 );
-        }
-        KColumnIdx1Whack ( & self -> idx1 );
-    }
-
-    return rc;
-}
-
-/* Whack
- */
-rc_t KColumnIdxWhack ( KColumnIdx *self,
-    uint64_t data_eof, size_t pgsize, int32_t checksum )
-{
-    rc_t rc;
-
-    assert ( self != NULL );
-
-    if ( self -> commit_count != 0 )
-    {
-        rc = KColumnIdx1WriteHeader ( & self -> idx1,
-            data_eof, self -> idx0 . count, self -> idx2 . eof,
-            pgsize, checksum );
-        if ( rc != 0 )
-            return rc;
-
-        self -> commit_count = 0;
-    }
-
-    rc = KColumnIdx1Whack ( & self -> idx1 );
-    if ( rc == 0 )
-    {
-        KColumnIdx0Whack ( & self -> idx0 );
-        KColumnIdx2Whack ( & self -> idx2 );
-    }
-
-    return rc;
-}
-
-/* Version
- */
-#ifndef KColumnIdxVersion
-rc_t KColumnIdxVersion ( const KColumnIdx *self, uint32_t *version )
-{
-    return KColumnIdx1Version ( & self -> idx1, version );
-}
-#endif
-
-/* IdRange
- *  returns range of ids contained within
- */
-rc_t KColumnIdxIdRange ( const KColumnIdx *self,
-    int64_t *first, int64_t *last )
-{
-    assert ( self != NULL );
-    assert ( first != NULL );
-    assert ( last != NULL );
-
-    * first = self -> id_first;
-    * last = self -> id_upper - 1;
-
-    if ( self -> id_first == self -> id_upper )
-        return RC ( rcDB, rcColumn, rcAccessing, rcRange, rcInvalid );
-    return 0;
-}
-
-/* FindFirstRowId
- */
-rc_t KColumnIdxFindFirstRowId ( const KColumnIdx * self,
-    int64_t * found, int64_t start )
-{
-    rc_t rc0, rc1;
-    KColBlockLoc bloc;
-    int64_t best0, best1;
-
-    assert ( self != NULL );
-    assert ( found != NULL );
-
-    /* global reject */
-    if ( start < self -> id_first || start >= self -> id_upper )
-        return RC ( rcDB, rcColumn, rcSelecting, rcRow, rcNotFound );
-
-    /* look in idx0 */
-    rc0 = KColumnIdx0FindFirstRowId ( & self -> idx0, found, start );
-    if ( rc0 == 0 )
-    {
-        if ( * found == start )
-            return 0;
-
-        best0 = * found;
-        assert ( best0 > start );
-    }
-
-    /* look in main index */
-    /* KColumnIdx1LocateFirstRowIdBlob returns the blob containing 'start', if such blob exists, otherwise the next blob (or RC if there's no next) */
-    rc1 = KColumnIdx1LocateFirstRowIdBlob ( & self -> idx1, & bloc, start );
-    if ( rc1 != 0 )
-    {
-        return rc0;
-    }
-    if ( start >= bloc . start_id )
-    {   /* found inside a blob */
-        best1 = start;
-    }
-    else
-    {   /* not found; pick the start of the next blob */
-        best1 = bloc . start_id;
-    }
-
-    if ( rc0 != 0 )
-    {
-        * found = best1;
-        return 0;
-    }
-
-    /* found in both - return lesser */
-
-    /* "found" already contains 'best0" */
-    assert ( * found == best0 );
-    if ( best1 < best0 )
-        * found = best1;
-
-    return 0;
-}
-
-
-/* LocateBlob
- *  locate an existing blob
- */
-rc_t KColumnIdxLocateBlob ( const KColumnIdx *self,
-    KColBlobLoc *loc, int64_t first, int64_t upper )
-{
-    rc_t rc;
-
-    assert ( self != NULL );
-
-    /* convert "last" to "upper" */
-    if ( first >= ++ upper )
-        return RC ( rcDB, rcColumn, rcSelecting, rcRange, rcInvalid );
-
-    /* global reject */
-    if ( first < self -> id_first || upper > self -> id_upper )
-        return RC ( rcDB, rcColumn, rcSelecting, rcBlob, rcNotFound );
-
-    /* look in idx0 */
-    rc = KColumnIdx0LocateBlob ( & self -> idx0, loc, first, upper );
-    if ( GetRCState ( rc ) == rcNotFound )
-    {
-        KColBlockLoc bloc;
-
-        /* find block containing range */
-        rc = KColumnIdx1LocateBlock ( & self -> idx1, & bloc, first, upper );
-        if ( rc == 0 )
-        {
-            /* find location in idx2 */
-            rc = KColumnIdx2LocateBlob ( & self -> idx2,
-                loc, & bloc, first, upper, self -> idx1 . bswap );
-        }
-    }
-
-    return rc;
-}
-
-/* KColumnIdxCommit
- *  writes a new blob location to idx0
- *  updates idx1 with header information
- *  this should be the final step in committing a write operation
- */
-rc_t KColumnIdxCommit ( KColumnIdx *self, KMD5SumFmt *md5,
-    const KColBlobLoc *loc, uint32_t commit_freq,
-    uint64_t data_eof, size_t pgsize, int32_t checksum )
-{
-    rc_t idx0rc, rc;
-    KColBlobLoc prior;
-
-    assert ( self != NULL );
-    assert ( loc != NULL );
-
-    /* check index range for wraparound */
-    if ( ( loc -> start_id + loc -> id_range ) <= loc -> start_id )
-        return RC ( rcDB, rcColumn, rcCommitting, rcRange, rcInvalid );
-
-    /* journal to idx0 */
-    rc = idx0rc =
-        KColumnIdx0Commit ( & self -> idx0, loc, & prior, self -> idx1 . bswap );
-    if ( rc == 0 || rc == kdbReindex )
-    {
-        rc = 0;
-
-        if ( ++ self -> commit_count >= commit_freq )
-        {
-            rc = KColumnIdx1WriteHeader ( & self -> idx1,
-                data_eof, self -> idx0 . count, self -> idx2 . eof,
-                pgsize, checksum );
-            if ( rc == 0 )
-                self -> commit_count = 0;
-        }
-
-        if ( rc == 0 )
-        {
-            int64_t upper = loc -> start_id + loc -> id_range;
-
-            /* incorporate index into range */
-            if ( self -> id_first == self -> id_upper )
-            {
-                self -> id_first = loc -> start_id;
-                self -> id_upper = upper;
-            }
-            else
-            {
-                if ( self -> id_first > loc -> start_id )
-                    self -> id_first = loc -> start_id;
-                if ( self -> id_upper < upper )
-                    self -> id_upper = upper;
-            }
-
-            assert ( self -> id_first < self -> id_upper );
-
-            return idx0rc;
-        }
-
-        /* revert idx0 commit */
-        KColumnIdx0Revert ( & self -> idx0, loc, & prior );
-    }
-
-    return rc;
-}
-
-rc_t KColumnIdxCommitDone ( KColumnIdx * self )
-{
-    rc_t rc = 0;
-
-    assert ( self != NULL );
-    rc = KColumnIdx1CommitDone ( & self -> idx1 );
-    if ( rc == 0 )
-	rc = KColumnIdx0CommitDone ( & self -> idx0 );
-    if ( rc == 0 )
-	rc = KColumnIdx2CommitDone ( & self -> idx2 );
-    return rc;
-}
-
-/* KColumnIdxRecordIdx0Edges
- *  creates tentative idx1 blocks from idx0 entries
- *  at the block type edges as identified by KColumnIdx0
- */
-typedef struct Idx0EdgeNode Idx0EdgeNode;
-struct Idx0EdgeNode
-{
-    DLNode n;
-    KColBlockLocInfo loc;
-};
-
-static
-void CC Idx0EdgeNodeWhack ( DLNode *n, void *ignore )
-{
-    free ( n );
-}
-
-static
-rc_t KColumnIdxRecordIdx0Edges ( const KColBlockLocInfo *info, void *edges )
-{
-    Idx0EdgeNode *node;
-
-    assert ( edges != NULL );
-    assert ( info != NULL );
-
-    assert ( info -> start_id < info -> end_id );
-    assert ( info -> start_pg < info -> end_pg );
-    assert ( info -> size != 0 );
-    assert ( info -> count != 0 );
-    assert ( info -> id_type < 4 );
-    assert ( info -> pg_type < 4 );
-
-    assert ( ( ( info -> end_id - info -> start_id ) >> 32 ) == 0 );
-
-    node = malloc ( sizeof * node );
-    if ( node == NULL )
-        return RC ( rcDB, rcColumn, rcReindexing, rcMemory, rcExhausted );
-
-    node -> loc = * info;
-
-    DLListPushTail ( edges, & node -> n );
-
-    return 0;
-}
-
-/* KColumnIdxCollapseBlocks
- *  scans over blocks, looking for opportunities to
- *  combine them and collapse their number
- */
-static
-rc_t KColumnIdxCollapseBlocks ( KColumnIdx *self, DLList *edges )
-{
-    uint32_t count;
-
-    do
-    {
-        Idx0EdgeNode *prior;
-
-        /* merge count */
-        count = 0;
-
-        /* apply collapse */
-        prior = ( Idx0EdgeNode* ) DLListHead ( edges );
-        if ( prior != NULL )
-        {
-            Idx0EdgeNode *next, *cur;
-            for ( cur = ( Idx0EdgeNode* ) DLNodeNext( & prior -> n );
-                  cur != NULL; cur = next )
-            {
-                int64_t cost_left, cost_right;
-                KColBlockLocInfo buffer [ 2 ], *info;
-
-                /* grab next guy right away
-                   now we have prior, current, and next */
-                next = ( Idx0EdgeNode* ) DLNodeNext ( & cur -> n );
-
-                /* calculate a cost of merging prior and current */
-                buffer [ 0 ] = prior -> loc;
-                cost_left = KColBlockLocInfoMerge ( info = & buffer [ 0 ], & cur -> loc );
-
-                /* if there would be some advantage to the merge */
-                if ( cost_left <= 0 )
-                {
-                    /* calculate cost of merging current with next if there */
-                    if ( next != NULL )
-                    {
-                        buffer [ 1 ] = cur -> loc;
-                        cost_right = KColBlockLocInfoMerge
-                            ( info = & buffer [ 1 ], & next -> loc );
-
-                        /* if prev merge beats next,
-                           set info to previous block value */
-                        if ( cost_left <= cost_right )
-                            info = & buffer [ 0 ];
-                        else
-                        {
-                            /* otherwise shift our window
-                               and keep next block value */
-                            prior = cur;
-                            cur = next;
-                            next = ( Idx0EdgeNode* ) DLNodeNext ( & next -> n );
-                        }
-                    }
-
-                    /* merge prior with cur */
-                    prior -> loc = * info;
-                    DLListUnlink ( edges, & cur -> n );
-                    Idx0EdgeNodeWhack ( & cur -> n, NULL );
-                    ++ count;
-                    continue;
-                }
-
-                /* leave block alone */
-                prior = cur;
-            }
-        }
-    }
-    while ( count != 0 );
-
-    return 0;
-}
-
-
-/* KColumnIdxWriteNewBlock
- *  writes each block into idx1 and idx2
- */
-typedef struct WriteNewBlockData WriteNewBlockData;
-struct WriteNewBlockData
-{
-    uint64_t data_eof;
-    KColumnIdx *idx;
-    size_t pgsize;
-    uint32_t commit_freq;
-    int32_t checksum;
-    rc_t rc;
-    bool bswap;
-};
-
-static
-bool CC KColumnIdxWriteNewBlock ( DLNode *n, void *data )
-{
-    WriteNewBlockData *pb = data;
-    const Idx0EdgeNode *node = ( const Idx0EdgeNode* ) n;
-    KColumnIdx *self = pb -> idx;
-
-    KColBlockLoc bloc;
-    KColWIdxBlock iblk;
-
-    /* create and map a block of memory */
-    pb -> rc = KColWIdxBlockInit ( & iblk, & node -> loc );
-    if ( pb -> rc == 0 )
-    {
-        size_t to_write;
-
-        /* tell idx0 to fill in block */
-        KColumnIdx0TranscribeBlocks ( & self -> idx0,
-            node -> loc . start_id, node -> loc . end_id, & iblk );
-        if ( iblk . idx != node -> loc . count )
-            pb -> rc = RC ( rcDB, rcColumn, rcCommitting, rcNoObj, rcUnknown );
-        else
-        {
-            /* compress block */
-            pb -> rc = KColWIdxBlockCompress ( & iblk,
-                pb -> bswap, & node -> loc, & bloc, & to_write );
-            if ( pb -> rc == 0 )
-            {
-                /* write block appropriately */
-                pb -> rc = KColumnIdx2Write ( & self -> idx2,
-                    & bloc . pg, KColWIdxBlockPersistPtr ( & iblk, & bloc ), to_write );
-            }
-        }
-
-        KColWIdxBlockWhack ( & iblk );
-
-        if ( pb -> rc == 0 )
-        {
-            /* write idx1 block location information */
-            pb -> rc = KColumnIdx1Commit ( & self -> idx1, & bloc );
-            if ( pb -> rc == 0 )
-            {
-                /* update the header */
-                if ( ++ self -> commit_count >= pb -> commit_freq )
-                {
-                    pb -> rc = KColumnIdx1WriteHeader ( & self -> idx1,
-                        pb -> data_eof, self -> idx0 . count,
-                        self -> idx2 . eof + bloc . u . blk . size,
-                        pb -> pgsize, pb -> checksum );
-
-                    if ( pb -> rc == 0 )
-                        self -> commit_count = 0;
-                }
-                if ( pb -> rc == 0 )
-                {
-                    /* done writing block */
-                    KColumnIdx2Commit ( & self -> idx2, to_write );
-                    return false;
-                }
-
-                /* revert idx1 */
-                KColumnIdx1Revert ( & self -> idx1, bloc . start_id, bloc . id_range );
-            }
-        }
-    }
-
-    return true;
-}
-
-/* KColumnIdxFixIdx1
- */
-static
-bool CC KColumnIdxFixIdx1 ( DLNode *n, void *data )
-{
-    const Idx0EdgeNode *node = ( const Idx0EdgeNode* ) n;
-    return KColumnIdx1Revert ( data, node -> loc . start_id,
-        ( uint32_t ) ( node -> loc . end_id  - node -> loc . start_id ) );
-}
-
-/* KColumnIdxReindex
- */
-rc_t KColumnIdxReindex ( KColumnIdx *self, KMD5SumFmt *md5,
-    uint32_t commit_freq, uint64_t data_eof, size_t pgsize, int32_t checksum )
-{
-    rc_t rc;
-    DLList edges;
-
-    assert ( self != NULL );
-    assert ( pgsize > 0 );
-
-    DLListInit ( & edges );
-
-    /* map the new entries */
-    rc = KColumnIdx0DefineBlocks ( & self -> idx0,
-        KColumnIdxRecordIdx0Edges, & edges, pgsize );
-    if ( rc == 0 )
-    {
-        rc = KColumnIdxCollapseBlocks ( self, & edges );
-        if ( rc == 0 )
-        {
-            /* preserve for restoration */
-            uint64_t idx2_eof = self -> idx2 . eof;
-            size_t count = self -> idx1 . count;
-
-            WriteNewBlockData pb;
-            pb . data_eof = data_eof;
-            pb . idx = self;
-            pb . pgsize = pgsize;
-            pb . commit_freq = commit_freq;
-            pb . checksum = checksum;
-            pb . rc = 0;
-            pb . bswap = self -> idx1 . bswap;
-
-            /* write new blocks */
-            DLListDoUntil ( & edges, false, KColumnIdxWriteNewBlock, & pb );
-            if ( ( rc = pb . rc ) == 0 )
-            {
-                /* idx2 is correct,
-                   idx1 has proper count and bst,
-                   idx0 needs to whack bst and file,
-                   idx1 needs to update header */
-                rc = KColumnIdx1WriteHeader ( & self -> idx1,
-                    data_eof, 0, self -> idx2 . eof,
-                    pgsize, checksum );
-                if ( rc == 0 )
-                {
-                    self -> commit_count = 0;
-                    KColumnIdx0Truncate ( & self -> idx0 );
-                    DLListWhack ( & edges, Idx0EdgeNodeWhack, NULL );
-                    return 0;
-                }
-            }
-
-            /* restore idx2 eof */
-            self -> idx2 . eof = idx2_eof;
-
-            /* restore idx1 count and fix bst */
-            DLListDoUntil ( & edges, false, KColumnIdxFixIdx1, & self -> idx1 );
-            self -> idx1 . count = count;
-        }
-    }
-
-    DLListWhack ( & edges, Idx0EdgeNodeWhack, NULL );
-
-    return rc;
-}
diff --git a/libs/kdb/wcolidx0-priv.h b/libs/kdb/wcolidx0-priv.h
deleted file mode 100644
index 570628a..0000000
--- a/libs/kdb/wcolidx0-priv.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_colidx0_priv_
-#define _h_colidx0_priv_
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-#ifndef _h_kfs_file_
-#include <kfs/file.h>
-#endif
-#ifndef _h_kfs_md5_
-#include <kfs/md5.h>
-#endif
-
-#ifndef _h_colfmt_priv_
-#include "colfmt-priv.h"
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KColWIdxBlock;
-struct KColBlockLocInfo;
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx0
- *  level 0 index - event journaling
- */
-typedef struct KColumnIdx0 KColumnIdx0;
-struct KColumnIdx0
-{
-    /* always append */
-    uint64_t eof;
-
-    /* the in-core indices */
-    BSTree bst;
-    size_t count;
-
-    /* the on-disk indices */
-    KFile *f;
-    KMD5File *fmd5;
-};
-
-
-/* Create
- */
-rc_t KColumnIdx0Create_v1 ( KColumnIdx0 *self, KDirectory *dir,
-    struct KMD5SumFmt *md5, KCreateMode mode, bool bswap );
-rc_t KColumnIdx0Create ( KColumnIdx0 *self, KDirectory *dir,
-    uint32_t count, struct KMD5SumFmt *md5, KCreateMode mode, bool bswap );
-
-/* Open
- */
-rc_t KColumnIdx0OpenRead_v1 ( KColumnIdx0 *self,
-    const KDirectory *dir, bool bswap );
-rc_t KColumnIdx0OpenRead ( KColumnIdx0 *self,
-    const KDirectory *dir, uint32_t count, bool bswap );
-
-/* Whack
- */
-void KColumnIdx0Whack ( KColumnIdx0 *self );
-
-/* IdRange
- *  returns range of ids contained within
- */
-bool KColumnIdx0IdRange ( const KColumnIdx0 *self,
-    int64_t *first, int64_t *upper );
-
-/* FindFirstRowId
- */
-rc_t KColumnIdx0FindFirstRowId ( const KColumnIdx0 * self,
-    int64_t * found, int64_t start );
-
-/* LocateBlob
- *  locate an existing blob
- */
-rc_t KColumnIdx0LocateBlob ( const KColumnIdx0 *self,
-    KColBlobLoc *loc, int64_t first, int64_t upper );
-
-/* Commit
- *  records an index location for addition or removal
- *  returns any prior value for rollback
- */
-rc_t KColumnIdx0Commit ( KColumnIdx0 *self,
-    const KColBlobLoc *loc, KColBlobLoc *prior, bool bswap );
-rc_t KColumnIdx0CommitDone ( KColumnIdx0 *self );
-
-/* Revert
- *  reverses effect of commit
- */
-void KColumnIdx0Revert ( KColumnIdx0 *self,
-    const KColBlobLoc *loc, const KColBlobLoc *prior );
-
-/* DefineBlocks
- *  scans existing blob locators
- *  invokes handler with ranges of ids from similar blob entries
- */
-rc_t KColumnIdx0DefineBlocks ( const KColumnIdx0 *self,
-    rc_t ( * handle_range ) ( struct KColBlockLocInfo const *info, void *data ),
-    void *data, size_t pgsize );
-
-/* TranscribeBlocks
- *  writes all blocks within a range
- */
-void KColumnIdx0TranscribeBlocks ( const KColumnIdx0 *self,
-    int64_t first, int64_t upper, struct KColWIdxBlock *iblk );
-
-/* Truncate
- *  whacks bt contents and truncates file
- */
-void KColumnIdx0Truncate ( KColumnIdx0 *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_colidx0_priv_ */
diff --git a/libs/kdb/wcolidx0.c b/libs/kdb/wcolidx0.c
deleted file mode 100644
index 9d79b7d..0000000
--- a/libs/kdb/wcolidx0.c
+++ /dev/null
@@ -1,831 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "wcolumn-priv.h"
-#include "wcolidx0-priv.h"
-#include "widxblk-priv.h"
-#include "werror-priv.h"
-#include <kfs/file.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <byteswap.h>
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx0Node
- *  a b-tree node
- */
-typedef struct KColumnIdx0Node KColumnIdx0Node;
-struct KColumnIdx0Node
-{
-    BSTNode n;
-    KColBlobLoc loc;
-};
-
-/* Match
- */
-static
-int64_t CC KColumnIdx0NodeMatch ( const void *item, const BSTNode *n )
-{
-#define a ( ( const KColBlobLoc* ) item )
-#define b ( ( const KColumnIdx0Node* ) n )
-
-    if ( a -> start_id < b -> loc . start_id )
-        return -1;
-    else if ( a -> start_id > b -> loc . start_id )
-        return 1;
-    else
-        return (int64_t) a -> id_range - (int64_t) b -> loc . id_range;
-
-#undef a
-#undef b
-}
-
-/* Find
- */
-static
-int64_t CC KColumnIdx0NodeFind ( const void *item, const BSTNode *n )
-{
-#define a ( * ( const int64_t* ) item )
-#define b ( ( const KColumnIdx0Node* ) n )
-
-    if ( a < b -> loc . start_id )
-        return -1;
-    return a >= ( b -> loc . start_id + b -> loc . id_range );
-
-#undef a
-#undef b
-}
-
-/* Sort
- */
-static
-int64_t CC KColumnIdx0NodeSort ( const BSTNode *item, const BSTNode *n )
-{
-#define a ( ( const KColumnIdx0Node* ) item )
-#define b ( ( const KColumnIdx0Node* ) n )
-
-    if ( ( a -> loc . start_id + a -> loc . id_range ) <= b -> loc . start_id )
-        return -1;
-    return a -> loc . start_id >= ( b -> loc . start_id + b -> loc . id_range );
-
-#undef a
-#undef b
-}
-
-/* Whack
- */
-static
-void CC KColumnIdx0NodeWhack ( BSTNode *n, void *ignore )
-{
-    free ( n );
-}
-
-/* Next
- */
-#define KColumnIdx0NodeNext( node ) \
-    ( const KColumnIdx0Node* ) BSTNodeNext ( & ( node ) -> n )
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx0
- *  level 0 index - event journaling
- */
-
-/* Init
- */
-static
-rc_t KColumnIdx0Inflate ( KColumnIdx0 *self,
-     const KColBlobLoc *buffer, uint32_t count )
-{
-    uint32_t i;
-    KColumnIdx0Node *n;
-
-    for ( n = NULL, i = 0; i < count; ++ i )
-    {
-        KColumnIdx0Node *exist;
-
-        if ( n == NULL )
-        {
-            n = malloc ( sizeof * n );
-            if ( n == NULL )
-                return RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-        }
-
-        n -> loc = buffer [ i ];
-        if ( BSTreeInsertUnique ( & self -> bst,
-             & n -> n, ( BSTNode** ) & exist, KColumnIdx0NodeSort ) )
-        {
-            assert ( n -> loc . start_id == exist -> loc . start_id );
-            assert ( n -> loc . id_range == exist -> loc . id_range );
-
-            assert ( ! n -> loc . u . blob . remove );
-            exist -> loc . pg = n -> loc . pg;
-            exist -> loc . u . blob . size = n -> loc . u . blob . size;
-        }
-        else
-        {
-            ++ self -> count;
-            n = NULL;
-        }
-    }
-
-    free ( n );
-
-    return 0;
-}
-
-static
-void KColumnIdx0Swap ( KColBlobLoc *buffer, uint32_t count )
-{
-    uint32_t i;
-    for ( i = 0; i < count; ++ i )
-    {
-        buffer [ i ] . pg = bswap_64 ( buffer [ i ] . pg );
-        buffer [ i ] . u . gen = bswap_32 ( buffer [ i ] . u . gen );
-        buffer [ i ] . id_range = bswap_32 ( buffer [ i ] . id_range );
-        buffer [ i ] . start_id = bswap_64 ( buffer [ i ] . start_id );
-    }
-}
-
-static
-rc_t KColumnIdx0Init_v1 ( KColumnIdx0 *self, bool bswap )
-{
-    rc_t rc;
-    KColBlobLoc *buffer = malloc ( 2048 * sizeof * buffer );
-    if ( buffer == NULL )
-        rc = RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        size_t num_read;
-
-        BSTreeInit ( & self -> bst );
-        self -> count = 0;
-
-        for ( self -> eof = 0;; self -> eof += num_read )
-        {
-            uint32_t count;
-
-            rc = KFileReadAll ( self -> f, self -> eof,
-                buffer, 2048 * sizeof * buffer, & num_read );
-            if ( rc != 0 )
-                break;
-            if ( num_read == 0 )
-                break;
-            if ( ( num_read % sizeof * buffer ) != 0 )
-            {
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcData, rcCorrupt );
-                break;
-            }
-
-            count = num_read / sizeof * buffer;
-
-            if ( bswap )
-                KColumnIdx0Swap ( buffer, count );
-
-            rc = KColumnIdx0Inflate ( self, buffer, count );
-            if ( rc != 0 )
-                break;
-        }
-
-        free ( buffer );
-    }
-    return rc;
-}
-
-static
-rc_t KColumnIdx0Init ( KColumnIdx0 *self, uint32_t total, bool bswap )
-{
-    rc_t rc;
-    KColBlobLoc *buffer = malloc ( 2048 * sizeof * buffer );
-    if ( buffer == NULL )
-        rc = RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        size_t num_read;
-        uint32_t i, count;
-
-        BSTreeInit ( & self -> bst );
-        self -> count = 0;
-        self -> eof = 0;
-
-        for ( rc = 0, i = 0; i < total; self -> eof += num_read, i += count )
-        {
-            count = total - i;
-            if ( count > 2048 )
-                count = 2048;
-
-            rc = KFileReadAll ( self -> f, i * sizeof * buffer,
-                buffer, count * sizeof * buffer, & num_read );
-            if ( rc != 0 )
-                break;
-
-            /* detect EOF */
-            if ( num_read == 0 )
-            {
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcData, rcCorrupt );
-                break;
-            }
-
-            /* detect short read -
-               see comment in idx1. */
-            if ( ( num_read % sizeof * buffer ) != 0 )
-            {
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcTransfer, rcIncomplete );
-                break;
-            }
-
-            count = num_read / sizeof * buffer;
-
-            if ( bswap )
-                KColumnIdx0Swap ( buffer, count );
-
-            rc = KColumnIdx0Inflate ( self, buffer, count );
-            if ( rc != 0 )
-                break;
-        }
-
-        free ( buffer );
-    }
-    return rc;
-}
-
-/* Create
- */
-rc_t KColumnIdx0Create_v1 ( KColumnIdx0 *self, KDirectory *dir,
-    struct KMD5SumFmt *md5, KCreateMode mode, bool bswap )
-{
-    rc_t rc = KColumnFileCreate ( & self -> f, & self -> fmd5,
-        dir, md5, mode, true, "idx0" );
-
-    if ( rc == 0 )
-        rc = KColumnIdx0Init_v1 ( self, bswap );
-
-    return rc;
-}
-
-rc_t KColumnIdx0Create ( KColumnIdx0 *self, KDirectory *dir,
-    uint32_t count, struct KMD5SumFmt *md5, KCreateMode mode, bool bswap )
-{
-    rc_t rc = KColumnFileCreate ( & self -> f, & self -> fmd5,
-        dir, md5, mode, true, "idx0" );
-
-    if ( rc == 0 )
-        rc = KColumnIdx0Init ( self, count, bswap );
-
-    return rc;
-}
-
-/* Open
- */
-rc_t KColumnIdx0OpenRead_v1 ( KColumnIdx0 *self, const KDirectory *dir, bool bswap )
-{
-    rc_t rc;
-    uint64_t eof;
-
-    BSTreeInit ( & self -> bst );
-    self -> count = 0;
-
-    rc = KDirectoryVFileSize ( dir, & eof, "idx0", NULL );
-    if ( rc == 0 )
-    {
-        if ( eof != 0 )
-        {
-            rc = KDirectoryOpenFileRead ( dir,
-                ( const KFile** ) & self -> f, "idx0" );
-
-            if ( rc == 0 )
-                rc = KColumnIdx0Init_v1 ( self, bswap );
-        }
-    }
-    else if ( GetRCState ( rc ) == rcNotFound )
-    {
-        rc = 0;
-    }
-
-    return rc;
-}
-
-rc_t KColumnIdx0OpenRead ( KColumnIdx0 *self,
-    const KDirectory *dir, uint32_t count, bool bswap )
-{
-    BSTreeInit ( & self -> bst );
-    self -> count = 0;
-
-    if ( count != 0 )
-    {
-        rc_t rc = KDirectoryOpenFileRead ( dir,
-            ( const KFile** ) & self -> f, "idx0" );
-
-        if ( rc == 0 )
-            rc = KColumnIdx0Init ( self, count, bswap );
-
-        return rc;
-    }
-
-    return 0;
-}
-
-/* Whack
- */
-void KColumnIdx0Whack ( KColumnIdx0 *self )
-{
-    KFileRelease ( self -> f );
-    self -> f = NULL;
-    self -> fmd5 = NULL;
-    BSTreeWhack ( & self -> bst, KColumnIdx0NodeWhack, NULL );
-    BSTreeInit ( & self -> bst );
-}
-
-/* IdRange
- *  returns range of ids contained within
- */
-bool KColumnIdx0IdRange ( const KColumnIdx0 *self,
-    int64_t *first, int64_t *upper )
-{
-    const KColumnIdx0Node *a, *z;
-
-    assert ( self != NULL );
-    assert ( first != NULL );
-    assert ( upper != NULL );
-
-    a = ( const KColumnIdx0Node* ) BSTreeFirst ( & self -> bst );
-    if ( a == NULL )
-        return false;
-
-    z = ( const KColumnIdx0Node* ) BSTreeLast ( & self -> bst );
-    assert ( z != NULL );
-
-    * first = a -> loc . start_id;
-    * upper = z -> loc . start_id + z -> loc . id_range;
-    assert ( * first < * upper );
-
-    return true;
-}
-
-
-/* FindFirstRowId
- */
-typedef struct FindFirstRowIdData FindFirstRowIdData;
-struct FindFirstRowIdData
-{
-    int64_t start;
-    const KColumnIdx0Node * next;
-};
-
-static
-int64_t CC KColumnIdx0NodeFindFirstRowId ( const void * item, const BSTNode * n )
-{
-    FindFirstRowIdData * pb = ( FindFirstRowIdData * ) item;
-
-#define a ( pb -> start )
-#define b ( ( const KColumnIdx0Node * ) n )
-
-    if ( a < b -> loc . start_id )
-    {
-        if ( pb -> next == NULL )
-            pb -> next = b;
-        else if ( b -> loc . start_id < pb -> next -> loc . start_id )
-            pb -> next = b;
-        return -1;
-    }
-
-    return a >= ( b -> loc . start_id + b -> loc . id_range );
-
-#undef a
-#undef b
-}
-
-rc_t KColumnIdx0FindFirstRowId ( const KColumnIdx0 * self,
-    int64_t * found, int64_t start )
-{
-    FindFirstRowIdData pb;
-    const KColumnIdx0Node * n;
-
-    assert ( self != NULL );
-    assert ( found != NULL );
-
-    pb . start = start;
-    pb . next = NULL;
-
-    n = ( const KColumnIdx0Node* )
-        BSTreeFind ( & self -> bst, & pb, KColumnIdx0NodeFindFirstRowId );
-
-    if ( n != NULL )
-    {
-        assert ( start >= n -> loc . start_id && start < n -> loc . start_id + n -> loc . id_range );
-        * found = start;
-        return 0;
-    }
-
-    if ( pb . next != 0 )
-    {
-        assert ( pb . next -> loc . start_id > start );
-        * found = pb . next -> loc . start_id;
-        return 0;
-    }
-
-    return SILENT_RC ( rcDB, rcColumn, rcSelecting, rcRow, rcNotFound );
-}
-
-/* LocateBlob
- *  locate an existing blob
- */
-rc_t KColumnIdx0LocateBlob ( const KColumnIdx0 *self,
-    KColBlobLoc *loc, int64_t first, int64_t upper )
-{
-    const KColumnIdx0Node *n;
-
-    assert ( self != NULL );
-    assert ( loc != NULL );
-    assert ( first < upper );
-
-    n = ( const KColumnIdx0Node* )
-        BSTreeFind ( & self -> bst, & first, KColumnIdx0NodeFind );
-
-    if ( n == NULL )
-        return RC ( rcDB, rcIndex, rcSelecting, rcBlob, rcNotFound );
-
-    assert ( first >= n -> loc . start_id );
-    assert ( first < ( n -> loc . start_id + n -> loc . id_range ) );
-
-    if ( upper > ( n -> loc . start_id + n -> loc . id_range ) )
-        return RC ( rcDB, rcIndex, rcSelecting, rcRange, rcInvalid );
-
-    * loc = n -> loc;
-    assert ( ! loc -> u . blob . remove );
-    return 0;
-}
-
-/* Commit
- *  records an index location for addition or removal
- *  returns any prior value for rollback
- */
-rc_t KColumnIdx0Commit ( KColumnIdx0 *self,
-    const KColBlobLoc *loc, KColBlobLoc *prior, bool bswap )
-{
-    rc_t rc = 0;
-    size_t num_writ;
-    KColumnIdx0Node *n;
-
-    assert ( self != NULL );
-    assert ( loc != NULL );
-    assert ( prior != NULL );
-
-    /* this assert tests two things:
-       1) that loc -> id_range != 0
-       2) that loc -> start_id + loc -> id_range does not wrap around */
-    assert ( ( loc -> start_id + loc -> id_range ) > loc -> start_id );
-
-    /* if the index already exists, it's being overwritten */
-    n = ( KColumnIdx0Node* )
-        BSTreeFind ( & self -> bst, loc, KColumnIdx0NodeMatch );
-    if ( n != NULL )
-    {
-        /* just hold onto the prior value */
-        * prior = n -> loc;
-        assert ( n -> loc . u . blob . size != 0 );
-        assert ( ! n -> loc . u . blob . remove );
-        assert ( n -> loc . start_id == loc -> start_id );
-        assert ( n -> loc . id_range == loc -> id_range );
-    }
-    else
-    {
-        /* no prior value */
-        memset ( prior, 0, sizeof * prior );
-
-        /* record an insert/overwrite */
-        if ( ! loc -> u . blob . remove )
-        {
-            n = malloc ( sizeof * n );
-            if ( n == NULL )
-                return RC ( rcDB, rcBlob, rcCommitting, rcMemory, rcExhausted );
-
-            n -> loc . u . blob . remove = 0;
-            n -> loc . start_id = loc -> start_id;
-            n -> loc . id_range = loc -> id_range;
-        }
-    }
-
-    /* journal index to idx0 */
-    if ( ! bswap )
-        rc = KFileWrite ( self -> f, self -> eof, loc, sizeof * loc, & num_writ );
-    else
-    {
-        KColBlobLoc loc_copy;
-        loc_copy . pg = bswap_64 ( loc -> pg );
-        loc_copy . u . gen = bswap_32 ( loc -> u . gen );
-        loc_copy . id_range = bswap_32 ( loc -> id_range );
-        loc_copy . start_id = bswap_64 ( loc -> start_id );
-
-        rc = KFileWrite ( self -> f, self -> eof,
-            & loc_copy, sizeof loc_copy, & num_writ );
-    }
-    if ( rc == 0 )
-    {
-        /* detect complete write */
-        if ( num_writ == sizeof * loc )
-        {
-            self -> eof += sizeof * loc;
-
-            /* detect insert/overwrite */
-            if ( n != NULL )
-            {
-                /* if deleting, "n" is prior value */
-                if ( loc -> u . blob . remove )
-                {
-                    /* perform a delete */
-                    assert ( self -> count > 0 );
-                    BSTreeUnlink ( & self -> bst, & n -> n );
-                    -- self -> count;
-                    free ( n );
-                }
-                else
-                {
-                    /* insert new or overwrite old */
-                    n -> loc . pg = loc -> pg;
-                    n -> loc . u . blob . size = loc -> u . blob . size;
-                    if ( prior -> u . blob . size == 0 )
-                    {
-                        /* complete insertion */
-                        BSTreeInsert ( & self -> bst, & n -> n, KColumnIdx0NodeSort );
-                        if ( ++ self -> count >= 64 * 1024 )
-                            return kdbReindex;
-                    }
-                }
-            }
-
-            /* done */
-            return 0;
-        }
-
-        /* got here due to incomplete write to idx0 */
-        rc = RC ( rcDB, rcBlob, rcCommitting, rcTransfer, rcIncomplete );
-    }
-
-    /* free allocated insertion block */
-    if ( prior -> u . blob . size == 0 )
-        free ( n );
-
-    return rc;
-}
-
-rc_t KColumnIdx0CommitDone ( KColumnIdx0 *self )
-{
-    assert ( self != NULL );
-
-    if ( self -> fmd5 == NULL )
-        return 0;
-
-    assert ( self -> f == KMD5FileToKFile ( self -> fmd5 ) );
-    return KMD5FileCommit ( self -> fmd5 );
-}
-
-/* Revert
- *  reverses effect of commit
- */
-void KColumnIdx0Revert ( KColumnIdx0 *self,
-    const KColBlobLoc *loc, const KColBlobLoc *prior )
-{
-    rc_t rc = 0;
-    KColumnIdx0Node *n;
-
-    assert ( self != NULL );
-    assert ( loc != NULL );
-    assert ( prior != NULL );
-
-    /* exit MD5 transaction */
-    if ( self -> fmd5 != NULL )
-        KMD5FileRevert ( self -> fmd5 );
-
-    /* remove the blip from idx0 */
-    assert ( self -> eof >= sizeof * loc );
-    rc = KFileSetSize ( self -> f, self -> eof - sizeof * loc );
-    if ( rc != 0 )
-        exit ( 99 );
-    self -> eof -= sizeof * loc;
-
-    /* next, repair the binary search tree */
-    if ( prior -> u . blob . size != 0 )
-    {
-        if ( ! loc -> u . blob . remove )
-        {
-            /* revert an update */
-            n = ( KColumnIdx0Node* )
-                BSTreeFind ( & self -> bst, prior, KColumnIdx0NodeMatch );
-            if ( n == NULL )
-                rc = RC ( rcDB, rcIndex, rcReverting, rcNoObj, rcUnknown );
-        }
-        else
-        {
-            /* revert a delete */
-            n = malloc ( sizeof * n );
-            if ( n == NULL )
-                rc = RC ( rcDB, rcIndex, rcReverting, rcMemory, rcExhausted );
-            else
-            {
-                n -> loc . u . blob . remove = 0;
-                n -> loc . start_id = prior -> start_id;
-                n -> loc . id_range = prior -> id_range;
-                BSTreeInsert ( & self -> bst, & n -> n, KColumnIdx0NodeSort );
-                ++ self -> count;
-            }
-        }
-
-        if ( n == NULL )
-            exit ( 98 );
-
-        /* put back location information */
-        n -> loc . pg = prior -> pg;
-        n -> loc . u . blob . size = prior -> u . blob . size;
-    }
-    else if ( ! loc -> u . blob . remove )
-    {
-        /* revert an insert */
-        n = ( KColumnIdx0Node* )
-            BSTreeFind ( & self -> bst, loc, KColumnIdx0NodeMatch );
-        if ( n == NULL )
-            exit ( 97 );
-
-        assert ( self -> count > 0 );
-        BSTreeUnlink ( & self -> bst, & n -> n );
-        -- self -> count;
-        free ( n );
-    }
-}
-
-/* DefineBlocks
- *  scans existing blob locators
- *  invokes handler with ranges of ids from similar blob entries
- */
-rc_t KColumnIdx0DefineBlocks ( const KColumnIdx0 *self,
-    rc_t ( * define_block ) ( struct KColBlockLocInfo const *info, void *data ),
-    void *data, size_t pgsize )
-{
-    rc_t rc;
-    const KColumnIdx0Node *start;
-
-    assert ( self != NULL );
-    assert ( pgsize > 0 );
-    assert ( define_block != NULL );
-
-    start = ( const KColumnIdx0Node* ) BSTreeFirst ( & self -> bst );
-    for ( rc = 0; start != NULL; )
-    {
-        KColBlockLocInfo info;
-
-        uint32_t count;
-        uint32_t id_type, pg_type;
-        const KColumnIdx0Node *next, *end;
-
-        id_type = pg_type = btypePredictable;
-
-        /* build a block from start to prior */
-        for ( next = KColumnIdx0NodeNext ( end = start ), count = 1;
-              next != NULL; next = KColumnIdx0NodeNext ( end = next ), ++ count )
-        {
-            size_t pgbytes;
-            int64_t end_id;
-            int id_next, pg_next;
-
-            size_t hdr_size_div4;
-            size_t entry_size_div4;
-
-            /* look at transition from end to next */
-            id_next = pg_next = btypePredictable;
-
-            if ( end -> loc . id_range != next -> loc . id_range )
-                id_next = btypeMagnitude;
-            if ( end -> loc . u . blob . size != next -> loc . u . blob . size )
-                pg_next = btypeMagnitude;
-
-            pgbytes = ( ( end -> loc . u . blob . size + pgsize - 1 ) / pgsize ) * pgsize;
-            if ( end -> loc . start_id + end -> loc . id_range != next -> loc . start_id )
-                id_next -= btypeMagnitude;
-            if ( end -> loc . pg + pgbytes != next -> loc . pg )
-                pg_next -= btypeMagnitude;
-
-            /* check for combine-ability */
-            if ( count != 1 && ( id_type != id_next || pg_type != pg_next ) )
-                break;
-
-            /* can be stopped by excessive id range */
-            end_id = next -> loc . start_id + next -> loc . id_range;
-            if ( ( ( end_id - start -> loc . start_id ) >> 32 ) != 0 )
-                break;
-
-            /* only produces change when count == 1
-               in which case we're confident that
-               block size will not be an issue */
-            id_type &= id_next;
-            pg_type &= pg_next;
-
-            /* calculate block header size based upon types:
-               id = { 0:0, 1:4, 2:8, 3:0  }
-               pg = { 0:0, 1:4, 2:8, 3:12 } */
-            hdr_size_div4 = pg_type;
-            if ( id_type != btypePredictable )
-                hdr_size_div4 += id_type;
-
-            /* calculate block entry size as inverse of types:
-               { 0:12, 1:8, 2:4, 3:0 } */
-            entry_size_div4 = ( id_type ^ 3 ) + ( pg_type ^ 3 );
-
-            /* block size ( div 4 ) cannot exceed 64 ( div 4 ) */
-            if ( ( hdr_size_div4 + entry_size_div4 * ( count + 1 ) ) > ( 0x10000 / 4 ) )
-                break;
-        }
-
-        /* we're at the end of a block */
-        info . start_id = start -> loc . start_id;
-        info . start_pg = start -> loc . pg;
-        info . end_id = end -> loc . start_id + end -> loc . id_range;
-        info . end_pg = end -> loc . pg + end -> loc . u . blob . size;
-        info . size = end -> loc . u . blob . size;
-        info . count = count;
-        info . id_type = ( uint16_t ) id_type;
-        info . pg_type = ( uint16_t ) pg_type;
-
-        /* keep page end on even page boundary */
-        if ( pgsize != 1 )
-            info . end_pg = ( ( info . end_pg + pgsize - 1 ) / pgsize ) * pgsize;
-
-        /* define a block */
-        rc = ( * define_block ) ( & info, data );
-        if ( rc != 0 )
-            break;
-
-        /* the next block becomes our start */
-        start = next;
-    }
-    
-    return rc;
-}
-
-/* TranscribeBlocks
- *  writes all blocks within a range
- */
-void KColumnIdx0TranscribeBlocks ( const KColumnIdx0 *self,
-    int64_t first, int64_t upper, struct KColWIdxBlock *iblk )
-{
-    const KColumnIdx0Node *n;
-
-    assert ( self != NULL );
-    assert ( first < upper );
-    assert ( iblk != NULL );
-
-    n = ( const KColumnIdx0Node* )
-        BSTreeFind ( & self -> bst, & first, KColumnIdx0NodeFind );
-    assert ( n != NULL );
-    assert ( n -> loc . start_id == first );
-
-    while ( n != NULL && n -> loc . start_id < upper )
-    {
-        assert ( ( n -> loc . start_id + n -> loc . id_range ) <= upper );
-
-        KColWIdxBlockSetEntry ( iblk,
-            n -> loc . start_id, n -> loc . id_range,
-            n -> loc . pg, n -> loc . u . blob . size );
-
-        n = KColumnIdx0NodeNext ( n );
-    }
-}
-
-/* Truncate
- *  whacks bst contents and truncates file
- */
-void KColumnIdx0Truncate ( KColumnIdx0 *self )
-{
-    assert ( self != NULL );
-    KFileSetSize ( self -> f, self -> eof = 0 );
-    BSTreeWhack ( & self -> bst, KColumnIdx0NodeWhack, NULL );
-    self -> count = 0;
-}
diff --git a/libs/kdb/wcolidx1-priv.h b/libs/kdb/wcolidx1-priv.h
deleted file mode 100644
index c90509f..0000000
--- a/libs/kdb/wcolidx1-priv.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_colidx1_priv_
-#define _h_colidx1_priv_
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#include <kfs/md5.h>
-
-#ifndef _h_colfmt_priv_
-#include "colfmt-priv.h"
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KColIdxBlock;
-struct KColBlockLocInfo;
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx1
- *  level 1 index
- */
-typedef struct KColumnIdx1 KColumnIdx1;
-struct KColumnIdx1
-{
-    /* tree of level-2 block locators */
-    BSTree bst;
-    struct KFile *f;
-    struct KFile *fidx;
-    struct KMD5File *fmd5;
-    struct KMD5File *fidxmd5;
-
-    uint32_t count;
-    uint32_t vers;
-    /* might have to switch to bit flags if more needed */
-    bool bswap;
-    bool use_md5;
-#define CONVERT_ON_SAVE_NONE	0
-#define CONVERT_ON_SAVE_V1	1
-    uint8_t convert;
-    uint8_t align [ sizeof ( size_t ) - 3 ];
-};
-
-/* Create
- */
-rc_t KColumnIdx1Create ( KColumnIdx1 *self,
-    KDirectory *dir, KMD5SumFmt *md5, KCreateMode mode,
-    uint64_t *data_eof, uint32_t *idx0_count, uint64_t *idx2_eof,
-    size_t pgsize, int32_t checksum );
-
-/* Open
- */
-rc_t KColumnIdx1OpenRead ( KColumnIdx1 *self, const KDirectory *dir,
-    uint64_t *data_eof, uint32_t *idx0_count, uint64_t *idx2_eof,
-    size_t *pgsize, int32_t *checksum );
-rc_t KColumnIdx1OpenUpdate ( KColumnIdx1 *self, KDirectory *dir,
-    KMD5SumFmt *md5, uint64_t *data_eof, uint32_t *idx0_count,
-    uint64_t *idx2_eof, size_t *pgsize, int32_t *checksum );
-
-/* Whack
- */
-rc_t KColumnIdx1Whack ( KColumnIdx1 *self );
-
-/* Version
- */
-rc_t KColumnIdx1Version ( const KColumnIdx1 *self, uint32_t *version );
-#define KColumnIdx1Version( self, version ) \
-    ( * ( version ) = ( uint32_t ) ( self ) -> vers, 0 )
-
-/* ByteOrder
- */
-rc_t KColumnIdx1ByteOrder ( const KColumnIdx1 *self, bool *reversed );
-#define KColumnIdx1ByteOrder( self, reversed ) \
-    ( * ( reversed ) = ( self ) -> bswap, 0 )
-
-/* IdRange
- *  returns range of ids contained within
- */
-bool KColumnIdx1IdRange ( const KColumnIdx1 *self,
-    int64_t *first, int64_t *upper );
-
-/* LocateFirstRowIdBlob
- */
-rc_t KColumnIdx1LocateFirstRowIdBlob ( const KColumnIdx1 * self,
-    KColBlockLoc * bloc, int64_t start );
-
-/* LocateBlock
- *  locates an idx2 block by range
- */
-rc_t KColumnIdx1LocateBlock ( const KColumnIdx1 *self,
-    KColBlockLoc *bloc, int64_t first, int64_t upper );
-
-/* WriteHeader
- */
-rc_t KColumnIdx1WriteHeader ( KColumnIdx1 *self,
-    uint64_t data_eof, uint32_t idx0_count, uint64_t idx2_eof,
-    size_t pgsize, int32_t checksum );
-
-/* Commit
- *  records a block location
- */
-rc_t KColumnIdx1Commit ( KColumnIdx1 *self, const KColBlockLoc *bloc );
-rc_t KColumnIdx1CommitDone ( KColumnIdx1 *self );
-
-/* Revert
- *  reverses effect of commit
- */
-bool KColumnIdx1Revert ( KColumnIdx1 *self, int64_t start_id, uint32_t id_range );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_colidx1_priv_ */
diff --git a/libs/kdb/wcolidx1.c b/libs/kdb/wcolidx1.c
deleted file mode 100644
index 5431249..0000000
--- a/libs/kdb/wcolidx1.c
+++ /dev/null
@@ -1,921 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "wcolumn-priv.h"
-#include "wcolidx1-priv.h"
-#include "werror-priv.h"
-#include <kfs/file.h>
-#include <kfs/md5.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <byteswap.h>
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx1Node
- *  a binary search tree node
- */
-typedef struct KColumnIdx1Node KColumnIdx1Node;
-struct KColumnIdx1Node
-{
-    BSTNode n;
-    KColBlockLoc loc;
-};
-
-/* KColumnIdx1NodeFind
- */
-static
-int64_t CC KColumnIdx1NodeFind ( const void *item, const BSTNode *n )
-{
-#define a ( * ( const int64_t* ) item )
-#define b ( ( const KColumnIdx1Node* ) n )
-
-    if ( a < b -> loc . start_id )
-        return -1;
-    return a >= ( b -> loc . start_id + b -> loc . id_range );
-
-#undef a
-#undef b
-}
-
-/* KColumnIdx1NodeSort
- */
-static
-int64_t CC KColumnIdx1NodeSort ( const BSTNode *item, const BSTNode *n )
-{
-#define a ( ( const KColumnIdx1Node* ) item )
-#define b ( ( const KColumnIdx1Node* ) n )
-
-    if ( ( a -> loc . start_id + a -> loc . id_range ) <= b -> loc . start_id )
-        return -1;
-    return a -> loc . start_id >= ( b -> loc . start_id + b -> loc . id_range );
-
-#undef a
-#undef b
-}
-
-/* KColumnIdx1NodeWhack
- */
-static
-void CC KColumnIdx1NodeWhack ( BSTNode *n, void *ignore )
-{
-    free ( n );
-}
-
-/*--------------------------------------------------------------------------
- * KColumnIdx1
- *  level 1 index
- */
-
-/* Init
- */
-static
-rc_t KColumnIdx1Inflate ( KColumnIdx1 *self,
-    const KColBlockLoc *buffer, uint32_t count )
-{
-    uint32_t i;
-    for ( i = 0; i < count; ++ i )
-    {
-        KColumnIdx1Node *exist, *n = malloc ( sizeof * n );
-        if ( n == NULL )
-            return RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-
-        n -> loc = buffer [ i ];
-        if ( BSTreeInsertUnique ( & self -> bst,
-             & n -> n, ( BSTNode** ) & exist, KColumnIdx1NodeSort ) )
-        {
-            free ( n );
-            return RC ( rcDB, rcIndex, rcConstructing, rcData, rcCorrupt );
-        }
-
-        ++ self -> count;
-    }
-
-    return 0;
-}
-
-static
-void KColumnIdx1Swap ( KColBlockLoc *buffer, uint32_t count )
-{
-    uint32_t i;
-    for ( i = 0; i < count; ++ i )
-    {
-        buffer [ i ] . pg = bswap_64 ( buffer [ i ] . pg );
-        buffer [ i ] . u . gen = bswap_32 ( buffer [ i ] . u . gen );
-        buffer [ i ] . id_range = bswap_32 ( buffer [ i ] . id_range );
-        buffer [ i ] . start_id = bswap_64 ( buffer [ i ] . start_id );
-    }
-}
-
-static
-rc_t KColumnIdx1Init ( KColumnIdx1 *self, uint32_t off, uint32_t count )
-{
-    rc_t rc;
-    KColBlockLoc *buffer = malloc ( 2048 * sizeof * buffer );
-    if ( buffer == NULL )
-        rc = RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        size_t num_read;
-        uint32_t i, cnt;
-        for ( rc = 0, i = 0; i < count; off += num_read, i += cnt )
-        {
-            /* maximum number of blocks available
-               that will fit into buffer */
-            cnt = count - i;
-            if ( cnt > 2048 )
-                cnt = 2048;
-
-            /* read into buffer an even number of blocks */
-            rc = KFileReadAll ( self -> f, off,
-                buffer, cnt * sizeof * buffer, & num_read );
-            if ( rc != 0 )
-                break;
-
-            /* detect EOF */
-            if ( num_read == 0 )
-                break;
-
-            /* detect corrupt short read
-               it's not clear how this is intended to work...
-               we either get ALL count blocks, or the file
-               is corrupt. a short read is possible, but
-               is not an error until we hit EOF... */
-            if ( ( num_read % sizeof * buffer ) != 0 )
-            {
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcData, rcCorrupt );
-                break;
-            }
-
-            /* byte-swap entire buffer */
-            if ( self -> bswap )
-                KColumnIdx1Swap ( buffer, cnt );
-
-            /* create master index blocks */
-            rc = KColumnIdx1Inflate ( self, buffer, cnt );
-            if ( rc != 0 )
-                break;
-        }
-
-        free ( buffer );
-    }
-    return rc;
-}
-
-/* Create
- */
-rc_t KColumnIdx1Create ( KColumnIdx1 *self, KDirectory *dir,
-    struct KMD5SumFmt *md5, KCreateMode mode,
-	uint64_t *data_eof, uint32_t *idx0_count, uint64_t *idx2_eof,
-	size_t pgsize, int32_t checksum )
-{
-    rc_t rc;
-
-    if ( ( mode & kcmValueMask ) == kcmOpen )
-    {
-        size_t f_pgsize;
-        int32_t f_checksum;
-	
-        /* try to open update first */
-        rc = KColumnIdx1OpenUpdate ( self, dir, md5, data_eof, 
-            idx0_count, idx2_eof, &f_pgsize, &f_checksum);
-
-        if ( rc == 0 )
-        {
-            if ( pgsize != f_pgsize || checksum != f_checksum )
-            {
-                KFileRelease ( self -> f );
-                KFileRelease ( self -> fidx );
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcParam, rcIncorrect );
-            }
-            return rc;
-        }
-        if ( GetRCState ( rc ) != rcNotFound )
-            return rc;
-
-        /* if it failed on not found try to create */
-    }
-
-    BSTreeInit ( & self -> bst );
-    self -> count = 0;
-    self -> vers = 0;
-    self -> bswap = false;
-
-    rc = KColumnFileCreate ( & self -> f, & self -> fmd5, dir, md5, mode, true, "idx1" );
-    if ( rc == 0 )
-    {
-#if KCOL_CURRENT_VERSION != 1
-        rc = KColumnFileCreate ( & self -> fidx, & self -> fidxmd5, dir, md5, mode, false, "idx" );
-        if ( rc == 0 )
-        {
-#endif
-            KColumnHdr hdr;
-            size_t num_bytes;
-
-            memset ( & hdr, 0, sizeof hdr );
-            hdr . dad . endian = eByteOrderTag;
-            hdr . dad . version = KCOL_CURRENT_VERSION;
-#if KCOL_CURRENT_VERSION == 1
-            hdr . u . v1 . page_size = ( uint32_t ) pgsize;
-            hdr . u . v1 . checksum = ( uint8_t ) checksum;
-#elif KCOL_CURRENT_VERSION == 2
-            hdr . u . v2 . page_size = ( uint32_t ) pgsize;
-            hdr . u . v2 . checksum = ( uint8_t ) checksum;
-#elif KCOL_CURRENT_VERSION == 3
-            hdr . u . v3 . page_size = ( uint32_t ) pgsize;
-            hdr . u . v3 . checksum = ( uint8_t ) checksum;
-#else
-#error "lack code for current version"
-#endif
-            * data_eof = 0;
-            * idx0_count = 0;
-            * idx2_eof = 0;
-#if KCOL_CURRENT_VERSION == 1
-            rc = KFileWrite ( self -> f, 0, & hdr,
-              KColumnHdrOffset ( hdr, vCUR ),  & num_bytes );
-#else
-            rc = KFileWrite ( self -> f, 0, & hdr, sizeof hdr . dad, & num_bytes );
-            if ( rc == 0 )
-            {
-                if ( num_bytes != sizeof hdr . dad )
-                    rc = RC ( rcDB, rcIndex, rcConstructing, rcTransfer, rcIncomplete );
-                else
-                {
-                    rc = KFileWrite ( self -> fidx, 0, & hdr,
-                        KColumnHdrOffset ( hdr, vCUR ),  & num_bytes );
-#endif
-                    if ( rc == 0 )
-                    {
-                        if ( num_bytes == KColumnHdrOffset ( hdr, vCUR ) )
-                        {
-                            self -> vers = KCOL_CURRENT_VERSION;
-                            /* Here is the exit with two new files */
-                            return 0;
-                        }
-                    }
-#if KCOL_CURRENT_VERSION != 1
-                }
-
-                KFileRelease ( self -> fidx );
-            }
-#endif
-
-            KFileRelease ( self -> f );
-        }
-    }
-
-    return rc;
-}
-
-/* Open
- */
-rc_t KColumnIdx1OpenRead ( KColumnIdx1 *self, const KDirectory *dir,
-    uint64_t *data_eof, uint32_t *idx0_count, uint64_t *idx2_eof,
-    size_t *pgsize, int32_t *checksum )
-{
-    rc_t rc;
-
-    BSTreeInit ( & self -> bst );
-    self -> count = 0;
-    self -> vers = 0;
-    self -> bswap = false;
-
-    rc = KDirectoryOpenFileRead ( dir,
-        ( const KFile** ) & self -> f, "idx1" );
-    if ( rc == 0 )
-    {
-        KColumnHdr hdr;
-        size_t num_bytes;
-        rc = KFileReadAll ( self -> f, 0, & hdr, sizeof hdr, & num_bytes );
-        if ( rc == 0 )
-        {
-            if ( num_bytes == 0 )
-                rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcEmpty );
-            else if ( num_bytes < KColumnHdrMinSize ( hdr ) )
-                rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcCorrupt );
-            else
-            {
-                rc = KDBHdrValidate ( & hdr . dad,
-                    num_bytes, 1, KCOL_CURRENT_VERSION );
-                if ( GetRCState ( rc ) == rcIncorrect && GetRCObject ( rc ) == rcByteOrder )
-                {
-                    self -> bswap = true;
-                    hdr . dad . endian = bswap_32 ( hdr . dad . endian );
-                    hdr . dad . version = bswap_32 ( hdr . dad . version );
-                    rc = KDBHdrValidate ( & hdr . dad, num_bytes, 1, KCOL_CURRENT_VERSION );
-                }
-                if ( rc == 0 )
-                {
-                    uint32_t off, count;
-
-                    switch ( hdr . dad . version )
-                    {
-                    case 1:
-                        if ( num_bytes < KColumnHdrOffset ( hdr, v1 ) )
-                            rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcCorrupt );
-                        else
-                        {
-                            if ( self -> bswap )
-                            {
-                                hdr . u . v1 . data_eof = bswap_64 ( hdr . u . v1 . data_eof );
-                                hdr . u . v1 . idx2_eof = bswap_64 ( hdr . u . v1 . idx2_eof );
-                                hdr . u . v1 . num_blocks = bswap_32 ( hdr . u . v1 . num_blocks );
-                                hdr . u . v1 . page_size = bswap_32 ( hdr . u . v1 . page_size );
-                            }
-
-                            * data_eof = hdr . u . v1 . data_eof;
-                            * idx2_eof = hdr . u . v1 . idx2_eof;
-                            * pgsize = hdr . u . v1 . page_size;
-                            * checksum = hdr . u . v1 . checksum;
-                            count = hdr . u . v1 . num_blocks;
-                            off = KColumnHdrOffset ( hdr, v1 );
-
-                            * idx0_count = 0;
-                        }
-                        break;
-
-                    default:
-                        rc = KDirectoryOpenFileRead ( dir, ( const KFile** ) & self -> fidx, "idx" );
-                        if ( rc == 0 )
-                        {
-                            off = sizeof hdr . dad;
-                            rc = KFileReadAll ( self -> fidx, 0, & hdr, sizeof hdr, & num_bytes );
-                            if ( rc == 0 )
-                            {
-                                if ( num_bytes < KColumnHdrOffset ( hdr, v2 ) )
-                                    rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcCorrupt );
-                                else
-                                {
-                                    rc = KDBHdrValidate ( & hdr . dad,
-                                        num_bytes, 2, KCOL_CURRENT_VERSION );
-                                    if ( GetRCState ( rc ) == rcIncorrect && GetRCObject ( rc ) == rcByteOrder )
-                                    {
-                                        if ( ! self->bswap ) /* catch mis-matched endianess */
-                                            rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcCorrupt );
-                                        else
-                                        {
-                                            hdr . dad . endian = bswap_32 ( hdr . dad . endian );
-                                            hdr . dad . version = bswap_32 ( hdr . dad . version );
-                                            rc = KDBHdrValidate ( & hdr . dad, num_bytes, 1, KCOL_CURRENT_VERSION );
-                                        }
-                                    }
-                                    else if ( self -> bswap ) /* catch mis-matched endianess */
-                                        rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcCorrupt );
-
-                                    if ( rc == 0 ) switch ( hdr . dad . version )
-                                    {
-                                    case 2:
-                                        if ( self -> bswap )
-                                        {
-                                            hdr. u . v2 . data_eof = bswap_64 ( hdr. u . v2 . data_eof );
-                                            hdr. u . v2 . idx2_eof = bswap_64 ( hdr. u . v2 . idx2_eof );
-                                            hdr. u . v2 . num_blocks = bswap_32 ( hdr. u . v2 . num_blocks );
-                                            hdr. u . v2 . page_size = bswap_32 ( hdr. u . v2 . page_size );
-                                        }
-
-                                        * data_eof = hdr . u . v2 . data_eof;
-                                        * idx2_eof = hdr . u . v2 . idx2_eof;
-                                        * pgsize = hdr . u . v2 . page_size;
-                                        * checksum = hdr . u . v2 . checksum;
-                                        count = hdr . u . v2 . num_blocks;
-                                        * idx0_count = 0;
-                                        break;
-
-                                    case 3:
-                                        if ( self -> bswap )
-                                        {
-                                            hdr. u . v3 . data_eof = bswap_64 ( hdr. u . v3 . data_eof );
-                                            hdr. u . v3 . idx2_eof = bswap_64 ( hdr. u . v3 . idx2_eof );
-                                            hdr. u . v3 . idx0_count = bswap_32 ( hdr. u . v3 . idx0_count );
-                                            hdr. u . v3 . num_blocks = bswap_32 ( hdr. u . v3 . num_blocks );
-                                            hdr. u . v3 . page_size = bswap_32 ( hdr. u . v3 . page_size );
-                                        }
-
-                                        * data_eof = hdr . u . v3 . data_eof;
-                                        * idx2_eof = hdr . u . v3 . idx2_eof;
-                                        * idx0_count = hdr . u . v3 . idx0_count;
-                                        * pgsize = hdr . u . v3 . page_size;
-                                        * checksum = hdr . u . v3 . checksum;
-                                        count = hdr . u . v3 . num_blocks;
-                                        break;
-
-                                    default:
-                                        rc = RC ( rcDB, rcColumn, rcOpening, rcColumn, rcBadVersion );
-                                    }
-                                }
-                            }
-                        }
-                    }
-
-                    if ( rc == 0 )
-                    {
-                        self -> vers = hdr . dad . version;
-                        rc = KColumnIdx1Init ( self, off, count );
-                        if ( rc == 0 )
-                            return rc;
-                    }
-
-                    KFileRelease ( self -> fidx );
-                    self -> fidx = NULL;
-                }
-            }
-        }
-
-        KFileRelease ( self -> f );
-        self -> f = NULL;
-    }
-
-    return rc;
-}
-
-rc_t KColumnIdx1OpenUpdate ( KColumnIdx1 *self, KDirectory *dir,
-    struct KMD5SumFmt *md5, uint64_t *data_eof, uint32_t *idx0_count,
-    uint64_t *idx2_eof, size_t *pgsize, int32_t *checksum )
-{
-    rc_t rc;
-
-    BSTreeInit ( & self -> bst );
-    self -> count = 0;
-    self -> vers = 0;
-    self -> bswap = false;
-
-    rc = KColumnFileOpenUpdate ( & self -> f, & self -> fmd5, dir, md5, true, "idx1" );
-#if 0
-    /* why open a transaction? */
-    if ( rc == 0 && md5 != NULL )
-        rc = KMD5FileBeginTransaction ( self -> fmd5 );
-#endif
-    if ( rc == 0 )
-    {
-        KColumnHdr hdr;
-        size_t num_bytes;
-        rc = KFileReadAll ( self -> f, 0, & hdr, sizeof hdr, & num_bytes );
-        if ( rc == 0 )
-        {
-            /* if file was there, open will pass but if empty should be
-               treated as if it were not there at all */
-            if ( num_bytes == 0 )
-                rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcNotFound );
-            else if ( num_bytes < KColumnHdrMinSize ( hdr ) )
-                rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcCorrupt );
-            else
-            {
-                /* allow open for update only on compatible architecture and version */
-                rc = KDBHdrValidate ( & hdr . dad,
-                    num_bytes, 1, KCOL_CURRENT_VERSION );
-                if ( rc == 0 )
-                {
-                    uint32_t off, count;
-
-                    switch ( hdr . dad . version )
-                    {
-                    case 1:
-                        /* ensure hdr is minimally v1 size */
-                        if ( num_bytes < KColumnHdrOffset ( hdr, v1 ) )
-                            rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcCorrupt );
-                        else
-                        {
-#if KCOL_CURRENT_VERSION != 1
-                            /* convert to current version */
-                            rc = KColumnFileCreate ( & self -> fidx, & self -> fidxmd5,
-                                dir, md5, kcmOpen, false, "idx" );
-                            if ( rc == 0 )
-                            {
-#endif
-                                * idx0_count = 0;
-                                * data_eof = hdr . u . v1 . data_eof;
-                                * idx2_eof = hdr . u . v1 . idx2_eof;
-                                * pgsize = hdr . u . v1 . page_size;
-                                * checksum = hdr . u . v1 . checksum;
-                                count = hdr . u . v1 . num_blocks;
-                                off = KColumnHdrOffset ( hdr, v1 );
-#if KCOL_CURRENT_VERSION == 1
-                                self -> convert = CONVERT_ON_SAVE_NONE;
-#else
-                                self -> convert = CONVERT_ON_SAVE_V1;
-                            }
-#endif
-                        }
-                        break;
-
-                    default:
-                        /* hdr should be incomplete - instead open "idx" */
-                        rc = KColumnFileOpenUpdate ( & self -> fidx, & self -> fidxmd5, dir, md5, false, "idx" );
-                        if ( rc == 0 )
-                        {
-                            self -> convert = CONVERT_ON_SAVE_NONE;
-                            off = sizeof hdr . dad; /* where to read in idx1 */
-                            rc = KFileReadAll ( self -> fidx, 0, & hdr, sizeof hdr, & num_bytes );
-                            if ( rc == 0 )
-                            {
-                                if ( num_bytes < KColumnHdrOffset ( hdr, v2 ) )
-                                    rc = RC ( rcDB, rcColumn, rcOpening, rcIndex, rcCorrupt );
-                                else
-                                {
-                                    rc = KDBHdrValidate ( & hdr . dad,
-                                        num_bytes, 2, KCOL_CURRENT_VERSION );
-                                    if ( rc == 0 ) switch ( hdr . dad . version )
-                                    {
-                                    case 2:
-                                        * data_eof = hdr . u . v2 . data_eof;
-                                        * idx2_eof = hdr . u . v2 . idx2_eof;
-                                        * pgsize = hdr . u . v2 . page_size;
-                                        * checksum = hdr . u . v2 . checksum;
-                                        count = hdr . u . v2 . num_blocks;
-                                        * idx0_count = 0;
-                                        break; /* skip to initialize and return */
-
-                                    case 3:
-                                        * data_eof = hdr . u . v3 . data_eof;
-                                        * idx2_eof = hdr . u . v3 . idx2_eof;
-                                        * idx0_count = hdr . u . v3 . idx0_count;
-                                        * pgsize = hdr . u . v3 . page_size;
-                                        * checksum = hdr . u . v3 . checksum;
-                                        count = hdr . u . v3 . num_blocks;
-                                        break; /* skip to initialize and return */
-
-                                    default:
-                                        rc = RC ( rcDB, rcColumn, rcOpening, rcColumn, rcBadVersion );
-                                    }
-                                }
-                            }
-                        }
-                    }
-
-                    if ( rc == 0 ) /* initialize and return */
-                    {
-                        self -> vers = hdr . dad . version;
-                        rc = KColumnIdx1Init ( self, off, count );
-                        if ( rc == 0 )
-                            return rc;
-                    }
-
-                    KFileRelease ( self -> fidx );
-                    self -> fidx = NULL;
-                }
-            }
-        }
-        
-        KFileRelease ( self -> f );
-        self -> f = NULL;
-    }
-
-    return rc;
-}
-
-
-/* Whack
- */
-rc_t KColumnIdx1Whack ( KColumnIdx1 *self )
-{
-    rc_t rc = KFileRelease ( self -> fidx );
-    if ( rc == 0 )
-    {
-        self -> fidx = NULL;
-        self -> fidxmd5 = NULL;
-        rc = KFileRelease ( self -> f );
-        if ( rc == 0 )
-        {
-            self -> f = NULL;
-            self -> fmd5 = NULL;
-            BSTreeWhack ( & self -> bst, KColumnIdx1NodeWhack, NULL );
-            BSTreeInit ( & self -> bst );
-        }
-    }
-    return rc;
-}
-
-/* Version
- */
-#ifndef KColumnIdx1Version
-rc_t KColumnIdx1Version ( const KColumnIdx1 *self, uint32_t *version )
-{
-    * version = ( uint32_t ) self -> vers;
-    return 0;
-}
-#endif
-
-/* IdRange
- *  returns range of ids contained within
- */
-bool KColumnIdx1IdRange ( const KColumnIdx1 *self,
-    int64_t *first, int64_t *upper )
-{
-    const KColumnIdx1Node *a, *z;
-
-    assert ( self != NULL );
-    assert ( first != NULL );
-    assert ( upper != NULL );
-
-    a = ( const KColumnIdx1Node* ) BSTreeFirst ( & self -> bst );
-    if ( a == NULL )
-        return false;
-
-    z = ( const KColumnIdx1Node* ) BSTreeLast ( & self -> bst );
-    assert ( z != NULL );
-
-    * first = a -> loc . start_id;
-    * upper = z -> loc . start_id + z -> loc . id_range;
-    assert ( * first < * upper );
-
-    return true;
-}
-
-/* LocateFirstRowIdBlob
- */
-typedef struct FindFirstRowIdData FindFirstRowIdData;
-struct FindFirstRowIdData
-{
-    int64_t start;
-    const KColumnIdx1Node * next;
-};
-
-static
-int64_t CC KColumnIdx1NodeFindFirstRowId ( const void * item, const BSTNode * n )
-{
-    FindFirstRowIdData * pb = ( FindFirstRowIdData * ) item;
-
-#define a ( pb -> start )
-#define b ( ( const KColumnIdx1Node * ) n )
-
-    if ( a < b -> loc . start_id )
-    {
-        if ( pb -> next == NULL )
-            pb -> next = b;
-        else if ( b -> loc . start_id < pb -> next -> loc . start_id )
-            pb -> next = b;
-        return -1;
-    }
-
-    return a >= ( b -> loc . start_id + b -> loc . id_range );
-
-#undef a
-#undef b
-}
-
-rc_t KColumnIdx1LocateFirstRowIdBlob ( const KColumnIdx1 * self,
-    KColBlockLoc * bloc, int64_t start )
-{
-    FindFirstRowIdData pb;
-    const KColumnIdx1Node * n;
-
-    assert ( self != NULL );
-    assert ( bloc != NULL );
-
-    pb . start = start;
-    pb . next = NULL;
-
-    n = ( const KColumnIdx1Node* )
-        BSTreeFind ( & self -> bst, & pb, KColumnIdx1NodeFindFirstRowId );
-
-    if ( n != NULL )
-    {
-        assert ( start >= n -> loc . start_id && start < n -> loc . start_id + n -> loc . id_range );
-        * bloc = n -> loc;
-        return 0;
-    }
-
-    if ( pb . next != NULL )
-    {
-        assert ( start < pb . next -> loc . start_id );
-        * bloc = pb . next -> loc;
-        return 0;
-    }
-        
-    return SILENT_RC ( rcDB, rcColumn, rcSelecting, rcBlob, rcNotFound );
-}
-
-/* LocateBlock
- *  locates an idx2 block by range
- *  return values:
- */
-rc_t KColumnIdx1LocateBlock ( const KColumnIdx1 *self,
-    KColBlockLoc *bloc, int64_t first, int64_t upper )
-{
-    const KColumnIdx1Node *n;
-
-    assert ( self != NULL );
-    assert ( bloc != NULL );
-    assert ( first < upper );
-
-    n = ( const KColumnIdx1Node* )
-        BSTreeFind ( & self -> bst, & first, KColumnIdx1NodeFind );
-
-    if ( n == NULL )
-        return RC ( rcDB, rcIndex, rcSelecting, rcRange, rcNotFound );
-
-    assert ( first >= n -> loc . start_id );
-    assert ( first < ( n -> loc . start_id + n -> loc . id_range ) );
-
-    if ( upper > ( n -> loc . start_id + n -> loc . id_range ) )
-        return RC ( rcDB, rcIndex, rcSelecting, rcRange, rcInvalid );
-
-    * bloc = n -> loc;
-    return 0;
-}
-
-/* WriteHeader
- */
-rc_t KColumnIdx1WriteHeader ( KColumnIdx1 *self,
-    uint64_t data_eof, uint32_t idx0_count, uint64_t idx2_eof,
-    size_t pgsize, int32_t checksum )
-{
-    rc_t rc = 0;
-    KColumnHdr hdr;
-    bool write_idx1 = false;
-    size_t off, off1, num_writ, num_writ1;
-
-    off1 = sizeof hdr . dad;
-
-    hdr . dad . endian = eByteOrderTag;
-    hdr . dad . version = ( uint32_t ) self -> vers;
-
-    switch ( self -> vers )
-    {
-    case 1:
-        hdr . u . v1 . data_eof = data_eof;
-        hdr . u . v1 . idx2_eof = idx2_eof;
-        hdr . u . v1 . num_blocks = ( uint32_t ) self -> count;
-        hdr . u . v1 . page_size = ( uint32_t ) pgsize;
-        hdr . u . v1 . checksum = ( uint8_t ) checksum;
-        memset ( hdr . u . v1 . align1, 0, sizeof hdr . u . v1 . align1 );
-        off = off1 = KColumnHdrOffset ( hdr, v1 );
-        write_idx1 = true;
-        break;
-    case 2:
-        hdr . u . v2 . data_eof = data_eof;
-        hdr . u . v2 . idx2_eof = idx2_eof;
-        hdr . u . v2 . ignore = 0;
-        hdr . u . v2 . num_blocks = ( uint32_t ) self -> count;
-        hdr . u . v2 . page_size = ( uint32_t ) pgsize;
-        hdr . u . v2 . checksum = ( uint8_t ) checksum;
-        memset ( hdr . u . v2 . align1, 0, sizeof hdr . u . v2 . align1 );
-        off = KColumnHdrOffset ( hdr, v2 );
-        break;
-    case 3:
-        hdr . u . v3 . data_eof = data_eof;
-        hdr . u . v3 . idx2_eof = idx2_eof;
-        hdr . u . v3 . idx0_count = idx0_count;
-        hdr . u . v3 . num_blocks = ( uint32_t ) self -> count;
-        hdr . u . v3 . page_size = ( uint32_t ) pgsize;
-        hdr . u . v3 . checksum = ( uint8_t ) checksum;
-        memset ( hdr . u . v3 . align1, 0, sizeof hdr . u . v2 . align1 );
-        off = KColumnHdrOffset ( hdr, v3 );
-        break;
-    default:
-        return RC ( rcDB, rcIndex, rcWriting, rcColumn, rcBadVersion );
-    }
-
-#if KCOL_CURRENT_VERSION != 1
-    if ( self -> fidxmd5 != NULL )
-        rc = KMD5FileReset ( self -> fidxmd5 );
-    if ( rc == 0 )
-    {
-        rc = KFileWrite ( self -> fidx, 0, & hdr, off, & num_writ );
-        if ( rc == 0 )
-        {
-            /* don't have a failsafe recover here - no undoing write to idx figured out */
-            if ( write_idx1 )
-            {
-#endif
-                if ( self -> fmd5 != NULL )
-                    rc = KMD5FileReset ( self -> fmd5 );
-                if ( rc == 0 )
-                    rc = KFileWrite ( self -> f, 0, & hdr, off1, & num_writ1 );
-#if KCOL_CURRENT_VERSION != 1
-            }
-        }
-    }
-#endif
-    if ( rc == 0 )
-    {
-#if KCOL_CURRENT_VERSION != 1
-        if ( num_writ != off )
-            rc = RC ( rcDB, rcIndex, rcWriting, rcTransfer, rcIncomplete );
-        else
-#endif
-        if ( write_idx1 && num_writ1 != off1 )
-            rc = RC ( rcDB, rcIndex, rcWriting, rcTransfer, rcIncomplete );
-    }
-
-    return rc;
-}
-
-/* Commit
- *  records a block location
- */
-rc_t KColumnIdx1Commit ( KColumnIdx1 *self, const KColBlockLoc *bloc )
-{
-    rc_t rc;
-    uint64_t pos;
-    size_t num_writ;
-
-    switch ( self -> vers )
-    {
-    case 1:
-        pos = KColumnHdrOffset ( NULL_HDR, v1 );
-        break;
-    default:
-        pos = KColumnHdrMinSize ( NULL_HDR );
-    }
-
-    pos += self -> count * sizeof * bloc;
-    rc = KFileWrite ( self -> f, pos, bloc, sizeof * bloc, & num_writ );
-    if ( rc == 0 )
-    {
-        if ( num_writ != sizeof * bloc )
-            rc = RC ( rcDB, rcIndex, rcCommitting, rcTransfer, rcIncomplete );
-        else
-        {
-            KColumnIdx1Node *n, *exist;
-            n = malloc ( sizeof * n );
-            if ( n == NULL )
-                rc = RC ( rcDB, rcIndex, rcCommitting, rcMemory, rcExhausted );
-            else
-            {
-                n -> loc = * bloc;
-                if ( BSTreeInsertUnique ( & self -> bst,
-                     & n -> n, ( BSTNode** ) & exist, KColumnIdx1NodeSort ) )
-                {
-                    free ( n );
-                    rc = RC ( rcDB, rcIndex, rcCommitting, rcRange, rcExists );
-                }
-                else
-                {
-                    ++ self -> count;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-rc_t KColumnIdx1CommitDone ( KColumnIdx1 *self )
-{
-    rc_t rc = 0;
-    if ( self -> fmd5 != NULL )
-    {
-        rc = KMD5FileCommit ( self -> fmd5 );
-        if ( rc == 0 )
-            rc = KMD5FileCommit ( self -> fidxmd5 );
-    }
-    return rc;
-}
-
-/* Revert
- *  reverses effect of commit
- *  return value is used to trigger DLListDoUntil exit
- */
-bool KColumnIdx1Revert ( KColumnIdx1 *self, int64_t start_id, uint32_t id_range )
-{
-    KColumnIdx1Node *n = ( KColumnIdx1Node* )
-        BSTreeFind ( & self -> bst, & start_id, KColumnIdx1NodeFind );
-    if ( n == NULL )
-        return true;
-
-    assert ( n -> loc . start_id == start_id );
-    assert ( n -> loc . id_range == id_range );
-
-    BSTreeUnlink ( & self -> bst, & n -> n );
-    free ( n );
-    -- self -> count;
-
-    if ( self -> fmd5 != NULL )
-    {
-        assert ( self -> f == (KFile*) self -> fmd5 );
-        assert ( self -> fidx == (KFile*) self -> fidxmd5 );
-
-        KMD5FileRevert ( self -> fmd5 );
-    }
-    
-    return false;
-}
diff --git a/libs/kdb/wcolidx2-priv.h b/libs/kdb/wcolidx2-priv.h
deleted file mode 100644
index ee45610..0000000
--- a/libs/kdb/wcolidx2-priv.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_colidx2_priv_
-#define _h_colidx2_priv_
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifndef _h_colfmt_priv_
-#include "colfmt-priv.h"
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#include <kfs/md5.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KColIdxBlock;
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx2
- *  level 2 index
- */
-typedef struct KColumnIdx2 KColumnIdx2;
-struct KColumnIdx2
-{
-    /* for adding new blocks */
-    uint64_t eof;
-
-    /* idx2 itself */
-    struct KFile *f;
-    struct KMD5File *fmd5;
-};
-
-/* Create
- */
-rc_t KColumnIdx2Create ( KColumnIdx2 *self,
-    KDirectory *dir, struct KMD5SumFmt *md5, KCreateMode mode, uint64_t eof );
-
-/* Open
- */
-rc_t KColumnIdx2OpenRead ( KColumnIdx2 *self,
-    const KDirectory *dir, uint64_t eof );
-
-/* Whack
- */
-rc_t KColumnIdx2Whack ( KColumnIdx2 *self );
-
-/* LocateBlob
- *  locate an existing blob
- */
-rc_t KColumnIdx2LocateBlob ( const KColumnIdx2 *self,
-    KColBlobLoc *loc, const KColBlockLoc *bloc,
-    int64_t first, int64_t upper, bool bswap );
-
-/* Write
- *  writes block to idx2 at end of file
- *
- *  "pos" [ OUT ] - location at which block was written
- *
- *  "buffer" [ IN ] and "bytes" [ IN ] - describes data buffer
- *
- *  return values:
- */
-rc_t KColumnIdx2Write ( KColumnIdx2 *self,
-    uint64_t *pos, const void *buffer, size_t bytes );
-
-/* Commit
- *  keeps changes indicated by block size
- */
-rc_t KColumnIdx2Commit ( KColumnIdx2 *self, size_t bytes );
-rc_t KColumnIdx2CommitDone ( KColumnIdx2 *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_colidx2_priv_ */
diff --git a/libs/kdb/wcolidx2.c b/libs/kdb/wcolidx2.c
deleted file mode 100644
index 8e15974..0000000
--- a/libs/kdb/wcolidx2.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "wcolumn-priv.h"
-#include "wcolidx2-priv.h"
-#include "idxblk-priv.h"
-#include "werror-priv.h"
-#include <kfs/file.h>
-#include <kfs/buffile.h>
-#include <kfs/md5.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#define IDX2_READ_FILE_BUFFER 1024 * 1024
-
-
-/*--------------------------------------------------------------------------
- * KColumnIdx2
- *  level 2 index
- */
-
-/* Init
- */
-static
-rc_t KColumnIdx2Init ( KColumnIdx2 *self, uint64_t idx2_eof )
-{
-    rc_t rc = KFileSize ( self -> f, & self -> eof );
-    if ( rc == 0 )
-    {
-        if ( self -> eof < idx2_eof )
-            rc = RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcCorrupt );
-        else
-        {
-            self -> eof = idx2_eof;
-            return 0;
-        }
-    }
-
-    KFileRelease ( self -> f );
-    self -> f = NULL;
-    return rc;
-}
-
-/* Create
- */
-rc_t KColumnIdx2Create ( KColumnIdx2 *self,
-    KDirectory *dir, KMD5SumFmt *md5, KCreateMode mode, uint64_t eof )
-{
-    rc_t rc = KColumnFileCreate (&self->f, &self->fmd5, dir, md5, mode, true, "idx2");
-    if ( rc == 0 )
-        rc = KColumnIdx2Init ( self, eof );
-    return rc;
-}
-
-/* Open
- */
-rc_t KColumnIdx2OpenRead ( KColumnIdx2 *self,
-    const KDirectory *dir, uint64_t eof )
-{
-    rc_t rc = KDirectoryOpenFileRead ( dir,
-        ( const KFile** ) & self -> f, "idx2" );
-#if IDX2_READ_FILE_BUFFER
-    if ( rc == 0 )
-    {
-        KFile * orig = self -> f;
-        rc = KBufFileMakeRead ( ( const KFile** ) & self -> f, self -> f, eof + 1 );
-	if ( rc == 0 )
-        {
-            KFileRelease ( orig );
-        }
-        else
-        {
-            self -> f = orig;
-            rc = 0;
-        }
-    }
-#endif
-    if ( rc == 0 )
-        rc = KColumnIdx2Init ( self, eof );
-    return rc;
-}
-
-/* Whack
- */
-rc_t KColumnIdx2Whack ( KColumnIdx2 *self )
-{
-    rc_t rc = KFileRelease ( self -> f );
-    if ( rc == 0 )
-    {
-        self -> f = NULL;
-        self -> fmd5 = NULL;
-    }
-    return rc;
-}
-
-/* LocateBlob
- *  locate an existing blob
- */
-rc_t KColumnIdx2LocateBlob ( const KColumnIdx2 *self,
-    KColBlobLoc *loc, const KColBlockLoc *bloc,
-    int64_t first, int64_t upper, bool bswap )
-{
-    rc_t rc;
-
-    /* compression not supported */
-    if ( bloc -> u . blk . compressed )
-        rc = RC ( rcDB, rcIndex, rcSelecting, rcNoObj, rcUnsupported );
-    else
-    {
-        uint64_t buffer [ 1024 / 8 ]; /* make sure is uint64_t aligned */
-        void *block = buffer;
-
-        /* determine the number of entries in block */
-        size_t orig = bloc -> u . blk . size;
-        uint32_t count = KColBlockLocEntryCount ( bloc, & orig );
-
-        /* determine the size to allocate */
-        size_t block_size = KColBlockLocAllocSize ( bloc, orig, count );
-
-        /* allocate a block */
-        if ( block_size > sizeof buffer )
-            block = malloc ( block_size );
-        if ( block == NULL )
-            rc = RC ( rcDB, rcIndex, rcSelecting, rcMemory, rcExhausted );
-        else
-        {
-            size_t num_read;
-            rc = KFileReadAll ( self -> f, bloc -> pg, block, orig, & num_read );
-            if ( rc == 0 )
-            {
-                if ( num_read != orig )
-                    rc = RC ( rcDB, rcIndex, rcSelecting, rcTransfer, rcIncomplete );
-                else
-                {
-                    KColIdxBlock iblk;
-                    rc = KColIdxBlockInit ( & iblk, bloc, orig, block, block_size, bswap );
-                    if ( rc == 0 )
-                    {
-                        uint32_t span;
-                        int64_t start_id;
-                        int slot = KColIdxBlockFind ( & iblk,
-                            bloc, count, first, & start_id, & span );
-                        if ( slot < 0 )
-                            rc = RC ( rcDB, rcIndex, rcSelecting, rcRange, rcNotFound );
-                        else if ( upper > ( start_id + span ) )
-                            rc = RC ( rcDB, rcIndex, rcSelecting, rcRange, rcInvalid );
-                        else
-                        {
-                            loc -> start_id = start_id;
-                            loc -> id_range = span;
-
-                            KColIdxBlockGet ( & iblk,
-                                bloc, count, slot, & loc -> pg, & span );
-                            loc -> u . blob . size = span;
-                        }
-                    }
-                }
-            }
-
-            if ( block != buffer )
-                free ( block );
-        }
-    }
-
-    return rc;
-}
-
-/* Write
- *  writes block to idx2 at end of file
- *
- *  "pos" [ OUT ] - location at which block was written
- *
- *  "buffer" [ IN ] and "bytes" [ IN ] - describes data buffer
- *
- *  return values:
- */
-rc_t KColumnIdx2Write ( KColumnIdx2 *self,
-    uint64_t *pos, const void *buffer, size_t bytes )
-{
-    rc_t rc;
-    size_t num_writ;
-
-    * pos = self -> eof;
-
-    rc = KFileWrite ( self -> f,
-        self -> eof, buffer, bytes, & num_writ );
-    if ( rc == 0 )
-    {
-        if ( num_writ != bytes )
-            rc = RC ( rcDB, rcIndex, rcWriting, rcTransfer, rcIncomplete );
-    }
-
-    return rc;
-}
-
-/* Commit
- *  keeps changes indicated by block size
- */
-rc_t KColumnIdx2Commit ( KColumnIdx2 *self, size_t bytes )
-{
-    self -> eof += bytes;
-    return 0;
-}
-
-rc_t KColumnIdx2CommitDone ( KColumnIdx2 *self )
-{
-    assert ( self != NULL );
-
-    if ( self -> fmd5 != NULL )
-        return KMD5FileCommit ( self -> fmd5 );
-
-    return 0;
-}
diff --git a/libs/kdb/wcolumn-priv.h b/libs/kdb/wcolumn-priv.h
deleted file mode 100644
index 3360b78..0000000
--- a/libs/kdb/wcolumn-priv.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_column_priv_
-#define _h_column_priv_
-
-#ifndef _h_kdb_column_
-#include <kdb/column.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifndef _h_coldata_priv_
-#include "wcoldata-priv.h"
-#endif
-
-#ifndef _h_colidx_priv_
-#include "wcolidx-priv.h"
-#endif
-
-#include <klib/symbol.h>
-#include <kfs/file.h>
-#include <kfs/md5.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KTable;
-struct KDBManager;
-struct KDirectory;
-struct KMD5SumFmt;
-
-
-/*--------------------------------------------------------------------------
- * KColumn
- */
-struct KColumn
-{
-    struct KTable *tbl;
-    struct KDBManager *mgr;
-    struct KDirectory *dir;
-
-    KMD5SumFmt *md5;
-
-    KColumnIdx idx;
-    KColumnData df;
-
-    KRefcount refcount;
-    uint32_t opencount;
-    uint32_t commit_freq;
-    uint32_t csbytes;
-    int32_t checksum;
-    bool read_only;
-
-    KSymbol sym;
-
-    char path [ 1 ];
-};
-
-/* Attach
- * Sever
- *  like Release, except called internally
- *  indicates that a child object is letting go...
- */
-KColumn *KColumnAttach ( const KColumn *self );
-rc_t KColumnSever ( const KColumn *self );
-
-/* Cmp
- * Sort
- */
-int KColumnCmp ( const void *item, struct BSTNode const *n );
-int KColumnSort ( struct BSTNode const *item, struct BSTNode const *n );
-
-
-rc_t KColumnFileCreate ( KFile ** ppf, KMD5File ** ppfmd5, KDirectory * dir, 
-			 KMD5SumFmt * md5, KCreateMode mode,
-			 bool append, const char * name);
-rc_t KColumnFileOpenUpdate ( KFile ** ppf, KMD5File ** ppfmd5, KDirectory * dir, 
-			     KMD5SumFmt * md5, bool append,
-			     const char * name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_column_priv_ */
diff --git a/libs/kdb/wcolumn.c b/libs/kdb/wcolumn.c
deleted file mode 100644
index 082e6e1..0000000
--- a/libs/kdb/wcolumn.c
+++ /dev/null
@@ -1,2681 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "wcolumn-priv.h"
-#include "dbmgr-priv.h"
-#include "wtable-priv.h"
-#include "wkdb-priv.h"
-#include "werror-priv.h"
-#include <kdb/kdb-priv.h>
-#include <klib/symbol.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/md5.h>
-#include <kfs/impl.h>
-#include <klib/checksum.h>
-#include <klib/data-buffer.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-#include <byteswap.h>
-
-#include <os-native.h>
-
-
-/*--------------------------------------------------------------------------
- * KColumn
- *  a collection of blobs indexed by oid
- */
-
-/* Whack
- */
-static
-rc_t KColumnWhack ( KColumn *self )
-{
-    rc_t rc;
-    KDBManager *mgr = self -> mgr;
-    KSymbol * symb;
-    assert ( mgr != NULL );
-
-    KRefcountWhack ( & self -> refcount, "KColumn" );
-
-    /* shut down and checkpoint index */
-    rc = KColumnIdxWhack ( & self -> idx, 
-        self -> df . eof, self -> df . pgsize, self -> checksum );
-    if ( rc )
-        return rc;
-
-    /* shut down data fork */
-    KColumnDataWhack ( & self -> df );
-
-    /* shut down md5 sum file if it is open */
-    KMD5SumFmtRelease ( self -> md5 ), self -> md5 = NULL;
-
-    /* release owning table
-       should never fail, and our recovery is flawed */
-    if ( self -> tbl != NULL )
-    {
-        rc = KTableSever ( self -> tbl );
-        if ( rc != 0 )
-            return rc;
-        self -> tbl = NULL;
-    }
-
-    symb = KDBManagerOpenObjectFind (mgr, self->path);
-    if (symb != NULL)
-    {
-        rc = KDBManagerOpenObjectDelete (mgr, symb);
-        if (rc == 0)
-        {
-            /* release manager
-               should never fail */
-            rc = KDBManagerSever ( mgr );
-            if ( rc != 0 )
-                rc = KDBManagerOpenObjectAdd (mgr, symb);
-            else
-            {
-                /* complete */
-                KDirectoryRelease ( self -> dir );
-                free ( self );
-                return 0;
-            }
-        }
-    }
-
-    KRefcountInit ( & self -> refcount, 1, "KColumn", "whack", "kcol" );
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KColumnAddRef ( const KColumn *cself )
-{
-    KColumn *self = ( KColumn* ) cself;
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KColumn" ) )
-        {
-        case krefLimit:
-            return RC ( rcDB, rcColumn, rcAttaching, rcRange, rcExcessive );
-        }
-        ++ self -> opencount;
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KColumnRelease ( const KColumn *cself )
-{
-    KColumn *self = ( KColumn* ) cself;
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KColumn" ) )
-        {
-        case krefWhack:
-            return KColumnWhack ( ( KColumn* ) self );
-        case krefLimit:
-            return RC ( rcDB, rcColumn, rcReleasing, rcRange, rcExcessive );
-        }
-        -- self -> opencount;
-    }
-    return 0;
-}
-
-
-/* Attach
- */
-KColumn *KColumnAttach ( const KColumn *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "KColumn" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( KColumn* ) self;
-}
-
-/* Sever
- *  like Release, except called internally
- *  indicates that a child object is letting go...
- */
-rc_t KColumnSever ( const KColumn *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "KColumn" ) )
-        {
-        case krefWhack:
-            return KColumnWhack ( ( KColumn* ) self );
-        case krefLimit:
-            return RC ( rcDB, rcColumn, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Make
- *  make an initialized structure
- *  NB - does NOT attach reference to dir, but steals it
- */
-static
-rc_t KColumnMake ( KColumn **colp, const KDirectory *dir, const char *path,
-		   KMD5SumFmt * md5, bool read_only )
-{
-    rc_t rc;
-    KColumn *col = malloc ( sizeof * col + strlen ( path ) );
-    if ( col == NULL )
-    {
-	* colp = NULL;
-        return RC ( rcDB, rcColumn, rcConstructing, rcMemory, rcExhausted );
-    }
-
-    memset ( col, 0, sizeof * col );
-    col -> dir = ( KDirectory* ) dir;
-    col -> md5 = md5;
-    rc = KMD5SumFmtAddRef ( md5 );
-    KRefcountInit ( & col -> refcount, 1, "KColumn", "make", path );
-    col -> opencount = 1;
-    col -> commit_freq = 1;
-    col -> read_only = read_only;
-
-    strcpy ( col -> path, path );
-
-    col->sym.u.obj = col;
-    StringInitCString (&col->sym.name, col->path);
-    col->sym.type = kptColumn;
-
-    * colp = col;
-    return rc;
-}
-
-
-static
-rc_t KDBManagerInsertColumn ( KDBManager * self, KColumn * col )
-{
-    rc_t rc;
-    rc = KDBManagerOpenObjectAdd (self, &col->sym);
-    if ( rc == 0 )
-        col -> mgr = KDBManagerAttach ( self );
-    return rc;
-}
-
-
-static
-rc_t KColumnMakeRead ( KColumn **colp, const KDirectory *dir, const char *path,
-		       KMD5SumFmt * md5 )
-{
-    rc_t rc = KColumnMake ( colp, dir, path, md5, true );
-    if ( rc == 0 )
-    {
-        size_t pgsize;
-        uint64_t data_eof;
-        KColumn *self = * colp;
-
-        rc = KColumnIdxOpenRead ( & self -> idx,
-            dir, & data_eof, & pgsize, & self -> checksum );
-        if ( rc == 0 )
-        {
-            rc = KColumnDataOpenRead ( & self -> df,
-				       dir, data_eof, pgsize );
-            if ( rc == 0 )
-            {
-                switch ( self -> checksum )
-                {
-                case kcsNone:
-                    break;
-                case kcsCRC32:
-                    self -> csbytes = 4;
-                    break;
-                case kcsMD5:
-                    self -> csbytes = 16;
-                    break;
-                }
-
-                self -> commit_freq = 0;
-                return 0;
-            }
-
-            KColumnIdxWhack ( & self -> idx,
-                data_eof, pgsize, self -> checksum );
-        }
-
-        free ( self );
-    }
-
-    * colp = NULL;
-    return rc;
-}
-
-static
-rc_t KColumnMakeUpdate ( KColumn **colp,
-    KDirectory *dir, const char *path, KMD5SumFmt *md5 )
-{
-    rc_t rc = KColumnMake ( colp, dir, path, md5, false );
-    if ( rc == 0 )
-    {
-        size_t pgsize;
-        uint64_t data_eof;
-        KColumn *self = * colp;
-
-        rc = KColumnIdxOpenUpdate ( & self -> idx, dir,
-            md5, & data_eof, & pgsize, & self -> checksum );
-        if ( rc == 0 )
-        {
-            rc = KColumnDataOpenUpdate ( & self -> df, dir,
-                md5, data_eof, pgsize );
-            if ( rc == 0 )
-            {
-                switch ( self -> checksum )
-                {
-                case kcsNone:
-                    break;
-                case kcsCRC32:
-                    self -> csbytes = 4;
-                    break;
-                case kcsMD5:
-                    self -> csbytes = 16;
-                    break;
-                }
-
-                return 0;
-            }
-
-            /* why is this here? */
-            KColumnDataWhack ( & self -> df );
-
-            KColumnIdxWhack ( & self -> idx,
-                data_eof, pgsize, self -> checksum );
-        }
-
-        free ( self );
-    }
-
-    * colp = NULL;
-    return rc;
-}
-
-
-/* Create
- * VCreate
- *  create a new or open an existing column
- *
- *  "colp" [ OUT ] - return parameter for newly opened database
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to database
- */
-static
-rc_t KColumnCreate ( KColumn **colp, KDirectory *dir,
-    KCreateMode cmode, KChecksum checksum,
-	size_t pgsize, const char *path, KMD5SumFmt *md5 )
-{
-    rc_t rc;
-
-    /* only supporting pgsize of 1 */
-    if ( pgsize == 0 )
-        pgsize = 1;
-    else if ( pgsize != 1 )
-        return RC ( rcDB, rcColumn, rcConstructing, rcParam, rcInvalid );
-
-    rc = KColumnMake ( colp, dir, path, md5, false );
-
-    if ( rc == 0 )
-    {
-        uint64_t data_eof;
-        KColumn *self = * colp;
-
-        self -> checksum = ( int32_t ) checksum;
-
-        rc = KColumnIdxCreate ( & self -> idx,
-            dir, md5, cmode, & data_eof, pgsize, ( int32_t ) checksum );
-        if ( rc == 0 )
-        {
-            rc = KColumnDataCreate ( & self -> df,
-                dir, md5, cmode, data_eof, pgsize );
-            if ( rc == 0 )
-            {
-                switch ( self -> checksum )
-                {
-                case kcsNone:
-                    break;
-                case kcsCRC32:
-                    self -> csbytes = 4;
-                    break;
-                case kcsMD5:
-                    self -> csbytes = 16;
-                    break;
-                }
-
-                /* successful exit */
-                return 0;
-            }
-
-            /* close data ? redundant? my thoughts exactly */
-            KColumnDataWhack ( & self -> df );
-
-            KColumnIdxWhack ( & self -> idx,
-                data_eof, pgsize, self -> checksum );
-        }
-
-        free ( self );
-    }
-
-    * colp = NULL;
-    return rc;
-}
-
-rc_t KColumnFileCreate ( KFile **ppf,
-    KMD5File **ppfmd5, KDirectory *dir, KMD5SumFmt *md5,
-    KCreateMode mode, bool append, const char *name )
-{
-#if 1
-    rc_t rc;
-
-    KFile *pf = NULL;
-    * ppfmd5 = NULL;
-
-    rc = KDirectoryCreateFile ( dir, & pf, true, 0664, mode, "%s", name );
-    if ( rc == 0 && md5 != NULL )
-    {
-        /* if the file was opened in "open" mode, leave its entry alone
-           if the file was opened in "init" mode, delete any existing entry
-           if the file was opened in "create" mode, it will fail if there
-           was an existing file, but still delete any digest entry */
-        if ( ( mode & kcmValueMask ) != kcmOpen )
-            rc = KMD5SumFmtDelete ( md5, name );
-        if ( rc == 0 || GetRCState ( rc ) == rcNotFound )
-        {
-            KMD5File *md5file;
-            rc = ( append ? KMD5FileMakeAppend : KMD5FileMakeWrite ) ( & md5file, pf, md5, name );
-            if ( rc == 0 )
-            {
-                * ppfmd5 = md5file;
-                pf = KMD5FileToKFile ( md5file );
-            }
-        }
-
-        if ( rc != 0 )
-        {
-            KFileRelease ( pf );
-            pf = NULL;
-        }
-    }
-
-    * ppf = pf;
-
-    return rc;
-#else
-
-    /* this looks like it needs some rethinking */
-    rc_t rc = 0;
-    KFile * pf;
-
-    *ppfmd5 = NULL;
-    *ppf = NULL;
-    /* -----
-     * This is used even when opening for update on some files
-     * so we have extra work
-     *
-     * If mode is kcmOpen try to open with normal open functions
-     * so the MD5 part gets handled correctly
-     */
-    rc = KColumnFileOpenUpdate (ppf, ppfmd5, dir, md5, append, name);
-    if (rc == 0)
-        return 0;
-
-    else if (GetRCState (rc) == rcNotFound)
-        rc = 0; /* this is not a true failure here so go on to create it */
-    if (rc == 0)
-    {
-        rc = KDirectoryVCreateFile (dir, &pf, true, 0664, mode, "%s", name);
-        if ((rc == 0) && (md5 != NULL))
-        {
-            rc = KMD5SumFmtDelete (md5, name);
-            if ((rc == 0) || (GetRCState (rc) == rcNotFound))
-            {
-                KMD5File * md5file;
-
-                rc = (append ? KMD5FileMakeAppend : KMD5FileMakeWrite)
-                    (&md5file, pf, md5, name);
-                if (rc == 0)
-                {
-                    *ppfmd5 = md5file;
-                    pf = KMD5FileToKFile (md5file);
-                }
-                else
-                {
-                    KFileRelease (pf);
-                    pf = NULL;
-                }
-            }
-        }
-    }
-    *ppf = pf;
-    return rc;
-#endif
-}
-
-rc_t KColumnFileOpenUpdate ( KFile **ppf, KMD5File **ppfmd5,
-    KDirectory *dir, KMD5SumFmt *md5, bool append, const char *name )
-{
-    rc_t rc;
-
-    KFile *pf = NULL;
-    * ppfmd5 = NULL;
-
-    rc = KDirectoryOpenFileWrite ( dir, & pf, true, "%s", name );
-    if ( rc == 0 && md5 != NULL )
-    {
-        KMD5File *md5file;
-        rc = ( append ? KMD5FileMakeAppend : KMD5FileMakeWrite ) ( & md5file, pf, md5, name );
-        if ( rc != 0 )
-        {
-            KFileRelease ( pf );
-            pf = NULL;
-        }
-        else
-        {
-            * ppfmd5 = md5file;
-            pf = KMD5FileToKFile ( md5file );
-        }
-    }
-
-    * ppf = pf;
-
-    return rc;
-}
-
-
-/* CreateColumn
- * VCreateColumn
- *  create a new or open an existing column
- *
- *  "col" [ OUT ] - return parameter for newly opened column
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "checksum" [ IN ] - checksum mode
- *
- *  "pgsize" [ IN ] - size of internal column pages
- *
- *  "path" [ IN ] - NUL terminated string in UTF-8 giving path to col
- *  where "." acts as a structure name separator, i.e. struct.member
- */
-static
-rc_t KDBManagerVCreateColumnInt ( KDBManager *self,
-    KColumn **colp, KDirectory *wd, KCreateMode cmode,
-    KChecksum checksum, size_t pgsize, const char *path, va_list args )
-{
-    char colpath [ 4096 ];
-    rc_t rc = KDirectoryVResolvePath ( wd, true,
-        colpath, sizeof colpath, path, args );
-    if ( rc == 0 )
-    {
-        KDirectory *dir;
-
-        switch ( KDBPathType ( /*NULL,*/ wd, NULL, colpath ) )
-        {
-        case kptNotFound:
-            /* first good path */
-            break;
-
-        case kptBadPath:
-            return RC ( rcDB, rcMgr, rcCreating, rcPath, rcInvalid );
-        case kptColumn:
-        case kptColumn | kptAlias:
-            /* found so is not good if we want to create new and not
-             * clear/init or open old
-             */
-            if ( ( cmode & kcmValueMask ) == kcmCreate )
-                return RC ( rcDB, rcMgr, rcCreating, rcColumn, rcExists );
-            if (KDBManagerOpenObjectBusy (self, colpath))
-                return RC ( rcDB, rcMgr, rcCreating, rcColumn, rcBusy );
-            /* test now for locked directory */
-            rc = KDBWritable (wd, colpath);
-            if (rc)
-            {
-                switch (GetRCState(rc))
-                {
-                default:
-                    return rc;
-                case rcLocked:
-                    return RC ( rcDB, rcMgr, rcCreating, rcColumn, rcLocked );
-                case rcReadonly:
-                    return RC ( rcDB, rcMgr, rcCreating, rcColumn, rcReadonly );
-                case rcNotFound:
-                    /* not found is good but probably unreachable */
-                    break;
-                case 0:
-                    rc = 0;
-                    break;
-                }
-            }
-            /* second good path */
-            break;
-
-        case kptDatabase:
-        case kptDatabase | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcDatabase, rcExists);
-
-        case kptTable:
-        case kptTable | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcTable, rcExists);
-
-        case kptIndex:
-        case kptIndex | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcIndex, rcExists);
-
-        case kptMetadata:
-        case kptMetadata | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcMetadata, rcExists);
-
-	case kptFile:
-	case kptFile | kptAlias:
-	    /* if we find a file, vary the failure if it is an archive that is a column
-	     * or a non related file */
-	    if ( KDBOpenPathTypeRead ( self, wd, colpath, NULL, kptColumn, NULL, false ) == 0 )
-		return RC ( rcDB, rcMgr, rcCreating, rcDirectory, rcUnauthorized );
-	    /* fall through */
-        default:
-            return RC ( rcDB, rcMgr, rcCreating, rcPath, rcIncorrect );
-        }
-
-        /* [re]create directory */
-        rc = KDirectoryCreateDir ( wd, 0775, cmode, "%s", colpath );
-        if ( rc != 0 )
-            return rc;
-
-        /* create column as a directory */
-        rc = KDirectoryOpenDirUpdate ( wd, & dir, false, "%s", colpath );
-        if ( rc == 0 )
-        {
-            KColumn *col = NULL;
-            KMD5SumFmt *md5 = NULL;
-
-            /* create an MD5 digest file for column */
-            if ( KCOL_CURRENT_VERSION >= 3 && ( cmode & kcmMD5 ) != 0 )
-            {
-                KFile * f;
-                
-                /* create or open the md5 digest file */
-                rc = KDirectoryCreateFile ( wd, &f, true, 0664, kcmOpen, "%s/md5", colpath );
-                if ( rc == 0 )
-                {
-                    /* create a formatter around file
-                       formatter will own "f" afterward */
-                    rc = KMD5SumFmtMakeUpdate ( & md5, f );
-
-                    /* if failed to create formatter, release "f" */
-                    if ( rc != 0 )
-                        KFileRelease ( f );
-                }
-
-            }
-            
-            /* create column - will attach several references to "md5" */
-            if ( rc == 0 )
-                rc = KColumnCreate ( & col, dir, cmode, checksum, pgsize, colpath, md5 );
-
-            /* release our reference to "md5" if NULL then no problem */
-            if (md5)
-                KMD5SumFmtRelease ( md5 );
-
-            if ( rc == 0 )
-            {
-                rc = KDBManagerInsertColumn ( self, col );
-                if (rc == 0 )
-                {
-                    * colp = col;
-                    return 0;
-                }
-                
-                KColumnRelease ( col );                
-            }
-            KDirectoryRelease ( dir );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDBManagerVCreateColumn ( KDBManager *self, KColumn **col,
-    KCreateMode cmode, KChecksum checksum, size_t pgsize,
-    const char *path, va_list args )
-{
-    if ( col == NULL )
-        return RC ( rcDB, rcMgr, rcCreating, rcParam, rcNull );
-
-    * col = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcCreating, rcSelf, rcNull );
-
-    return KDBManagerVCreateColumnInt
-        ( self, col, self -> wd, cmode, checksum, pgsize, path, args );
-}
-
-LIB_EXPORT rc_t CC KDBManagerCreateColumn ( KDBManager *self, KColumn **col,
-    KCreateMode cmode, KChecksum checksum, size_t pgsize, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDBManagerVCreateColumn ( self, col, cmode, checksum, pgsize, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTableCreateColumn ( KTable *self, KColumn **col,
-    KCreateMode cmode, KChecksum checksum, size_t pgsize, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KTableVCreateColumn ( self, col, cmode, checksum, pgsize, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableVCreateColumn ( KTable *self, KColumn **colp,
-    KCreateMode cmode, KChecksum checksum, size_t pgsize,
-    const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    if ( colp == NULL )
-        return RC ( rcDB, rcTable, rcCreating, rcParam, rcNull );
-
-    * colp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcTable, rcCreating, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcTable, rcCreating, rcColumn, rcReadonly );
-
-    rc = KDBVMakeSubPath ( self -> dir,
-        path, sizeof path, "col", 3, name, args );
-    if ( rc == 0 )
-    {
-        /* set MD5 mode according to table */
-        if ( self -> use_md5 )
-            cmode |= kcmMD5;
-        else
-            cmode &= ~ kcmMD5;
-
-        rc = KDBManagerVCreateColumnInt ( self -> mgr, colp,
-                                          self -> dir, cmode | kcmParents, checksum, pgsize, path, NULL );
-        if ( rc == 0 )
-        {
-            KColumn *col = * colp;
-            col -> tbl = KTableAttach ( self );
-        }
-    }
-    return rc;
-}
-
-
-/* OpenColumnRead
- * VOpenColumnRead
- *  open a column for read
- *
- *  "col" [ OUT ] - return parameter for newly opened column
- *
- *  "path_fmt" + "args" (formatted string with varargs)  [ IN ] - NUL terminated
- *  string in UTF-8 giving path to col
- *  where "." acts as a structure name separator, i.e. struct.member
- */
-static
-rc_t KDBManagerVOpenColumnReadInt ( const KDBManager *cself,
-    const KColumn **colp, const KDirectory *wd,
-    const char *path_fmt, va_list args, bool *cached, bool try_srapath )
-{
-    char colpath [ 4096 ];
-    rc_t rc = KDirectoryVResolvePath ( wd, true,
-        colpath, sizeof colpath, path_fmt, args );
-    if ( rc == 0 )
-    {
-        KSymbol *sym;
-
-        /* if already open */
-        sym = KDBManagerOpenObjectFind (cself, colpath);
-        if (sym != NULL)
-        {
-            const KColumn *ccol;
-            rc_t obj;
-
-            if(cached != NULL ) *cached = true;
-
-            switch (sym->type)
-            {
-            case kptColumn:
-                ccol = (const KColumn*)sym->u.obj;
-                /* if open for update, refuse */
-                if ( ccol -> read_only )
-                {
-                    /* attach a new reference and we're gone */
-                    rc = KColumnAddRef ( ccol );
-                    if ( rc == 0 )
-                        * colp = ccol;
-                    return rc;
-                }
-                obj = rcColumn;
-                break;
-            default:
-                obj = rcPath;
-                break;
-            case kptTable:
-                obj = rcTable;
-                break;
-            case kptDatabase:
-                obj = rcDatabase;
-                break;
-            case kptIndex:
-                obj = rcIndex;
-                break;
-            case kptMetadata:
-                obj = rcMetadata;
-                break;
-            }
-            rc = RC (rcDB, rcMgr, rcOpening, obj, rcBusy);
-        }
-        else
-        {
-            const KDirectory *dir;
-            char path[4096];
-            int size;
-
-            if ( cached != NULL )
-                *cached = false;
-
-            /* TODO: check if colpath is what we want to pass to KDBOpenPathTypeRead
-             * in this case we don't need to vprintf to 'path'
-            */
-            size = (args == NULL) ?
-                snprintf  ( path, sizeof path, "%s", path_fmt) :
-                vsnprintf ( path, sizeof path, path_fmt, args );
-            if (size < 0 || size >= (int) sizeof path)
-                rc = RC ( rcDB, rcMgr, rcOpening, rcPath, rcExcessive );
-
-            if (rc == 0)
-                rc = KDBOpenPathTypeRead ( cself, wd, path, &dir, kptColumn, NULL, try_srapath );
-
-            if ( rc == 0 )
-            { 
-                KColumn *col;
-
-                rc = KColumnMakeRead ( & col, dir, colpath, NULL );
-
-                if ( rc == 0 )
-                {
-                    rc = KDBManagerInsertColumn ( (KDBManager*)cself, col );
-                    if ( rc == 0 )
-                    {
-                        * colp = col;
-                        return 0;
-                    }
-
-                    KColumnRelease ( col );
-                }
-
-                KDirectoryRelease ( dir );
-            }
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerOpenColumnRead ( const KDBManager *self,
-    const KColumn **col, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDBManagerVOpenColumnRead ( self, col, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerVOpenColumnRead ( const KDBManager *self,
-    const KColumn **col, const char *path, va_list args )
-{
-    if ( col == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcParam, rcNull );
-
-    * col = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcSelf, rcNull );
-
-    return KDBManagerVOpenColumnReadInt ( self, col, self -> wd, path, args , NULL, true);
-}
-
-LIB_EXPORT rc_t CC KTableOpenColumnRead ( const KTable *self,
-    const KColumn **col, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KTableVOpenColumnRead ( self, col, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableVOpenColumnRead ( const KTable *self,
-    const KColumn **colp, const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    if ( colp == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcParam, rcNull );
-
-    * colp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcSelf, rcNull );
-
-    rc = KDBVMakeSubPath ( self -> dir,
-        path, sizeof path, "col", 3, name, args );
-    if ( rc == 0 )
-    {
-	bool col_is_cached;
-        rc = KDBManagerVOpenColumnReadInt ( self -> mgr,
-                                            colp, self -> dir, path, NULL, &col_is_cached, false );
-        if ( rc == 0 )
-        {
-            KColumn *col = ( KColumn* ) * colp;
-            if(!col_is_cached) col -> tbl = KTableAttach ( self );
-        }
-    }
-    return rc;
-}
-
-
-/* OpenColumnUpdate
- * VOpenColumnUpdate
- *  open a column for read/write
- *
- *  "col" [ OUT ] - return parameter for newly opened column
- *
- *  "path_fmt" formatted with "args" [ IN ] - NUL terminated string in UTF-8 giving path to col
- *  where "." acts as a structure name separator, i.e. struct.member
- */
-static
-rc_t KDBManagerVOpenColumnUpdateInt ( KDBManager *self,
-    KColumn **colp, KDirectory *wd, bool try_srapath,
-    const char *path_fmt, va_list args )
-{
-    char colpath [ 4096 ];
-    rc_t rc = 0;
-    int z;
-
-/*    rc = KDirectoryVResolvePath ( wd, 1,
-        colpath, sizeof colpath, path_fmt, args ); */
-    z = (args == NULL) ?
-        snprintf  ( colpath, sizeof colpath, "%s", path_fmt) :
-        vsnprintf ( colpath, sizeof colpath, path_fmt, args );
-    if (z < 0 || z >= (int) sizeof colpath)
-        rc = RC ( rcDB, rcMgr, rcOpening, rcPath, rcExcessive );
-    if ( rc == 0 )
-    {
-        KSymbol * sym;
-/*         KFile *f; */
-/*         KMD5SumFmt * md5 = NULL; */
-        KDirectory *dir;
-
-        /* if already open, refuse */
-        sym = KDBManagerOpenObjectFind (self, colpath);
-        if (sym != NULL)
-        {
-            rc_t obj;
-            switch (sym->type)
-            {
-            default:
-                obj = rcPath;
-                break;
-            case kptDatabase:
-                obj = rcDatabase;
-                break;
-            case kptTable:
-                obj = rcTable;
-                break;
-            case kptColumn:
-                obj = rcColumn;
-                break;
-            case kptIndex:
-                obj = rcIndex;
-                break;
-            case kptMetadata:
-                obj = rcMetadata;
-                break;
-            }
-            return RC ( rcDB, rcMgr, rcOpening, obj, rcBusy );
-        }
-        /* only open existing dbs */
-        switch (KDBPathType ( /*NULL,*/ wd, NULL, colpath ) )
-        {
-        case kptNotFound:
-            return RC ( rcDB, rcMgr, rcOpening, rcColumn, rcNotFound );
-        case kptBadPath:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcInvalid );
-	case kptFile:
-	case kptFile | kptAlias:
-	    /* if we find a file, vary the failure if it is an archive that is a table
-	     * or a non related file
-	     * this should be changed to a readonly as it is not possible not 
-	     * disallowed.  rcReadonly not rcUnauthorized
-	     */
-	    if ( KDBOpenPathTypeRead ( self, wd, colpath, NULL, kptColumn, NULL, try_srapath ) == 0 )
-		return RC ( rcDB, rcMgr, rcOpening, rcDirectory, rcUnauthorized );
-	    /* fall through */
-        default:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcIncorrect );
-        case kptColumn:
-        case kptColumn | kptAlias:
-            break;
-        }
-
-        /* test now for locked directory */
-        rc = KDBWritable (wd, colpath);
-        switch (GetRCState(rc))
-        {
-        default:
-            return RC ( rcDB, rcMgr, rcOpening, rcColumn, rcUnexpected );
-        case rcLocked:
-            return RC ( rcDB, rcMgr, rcOpening, rcColumn, rcLocked );
-        case rcReadonly:
-            return RC ( rcDB, rcMgr, rcOpening, rcColumn, rcReadonly );
-        case 0:
-            rc = 0;
-            break;
-        }
-
-
-        rc = KDirectoryOpenDirUpdate ( wd, & dir, 0, "%s", colpath );
-        if ( rc == 0 )
-        {
-            KColumn *col;
-            KMD5SumFmt *md5 = NULL;
-            /* open existing md5 digest file */
-            KFile * f;
-            rc = KDirectoryVOpenFileWrite ( dir, & f, true, "md5", NULL );
-            if ( rc == 0 )
-            {
-                rc = KMD5SumFmtMakeUpdate ( &md5, f );
-                if ( rc != 0 )
-                    KFileRelease ( f );
-            }
-            else if ( GetRCState ( rc ) == rcNotFound )
-                rc = 0;
-
-            /* make column - will attach several references to "md5" */
-            if ( rc == 0 )
-                rc = KColumnMakeUpdate ( & col, dir, colpath, md5 );
-
-            /* release our reference to "md5" */
-            KMD5SumFmtRelease ( md5 );
-
-            if ( rc == 0 )
-            {
-                rc = KDBManagerInsertColumn ( self, col );
-                if ( rc == 0 )
-                {
-                    * colp = col;
-                    return 0;
-                }
-                
-                KColumnRelease ( col );                
-            }
-            KDirectoryRelease ( dir );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerOpenColumnUpdate ( KDBManager *self,
-    KColumn **col, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDBManagerVOpenColumnUpdate ( self, col, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerVOpenColumnUpdate ( KDBManager *self,
-    KColumn **col, const char *path, va_list args )
-{
-    if ( col == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcParam, rcNull );
-
-    * col = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcSelf, rcNull );
-
-    return KDBManagerVOpenColumnUpdateInt
-        ( self, col, self -> wd, true, path, args );
-}
-
-LIB_EXPORT rc_t CC KTableOpenColumnUpdate ( KTable *self,
-    KColumn **col, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KTableVOpenColumnUpdate ( self, col, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableVOpenColumnUpdate ( KTable *self,
-    KColumn **colp, const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    if ( colp == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcParam, rcNull );
-
-    * colp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcTable, rcOpening, rcColumn, rcReadonly );
-
-    rc = KDBVMakeSubPath ( self -> dir,
-        path, sizeof path, "col", 3, name, args );
-    if ( rc == 0 )
-    {
-        rc = KDBManagerVOpenColumnUpdateInt ( self -> mgr,
-                                              colp, self -> dir, false, path, NULL );
-        if ( rc == 0 )
-        {
-            KColumn *col = * colp;
-            col -> tbl = KTableAttach ( self );
-        }
-    }
-    return rc;
-}
-
-bool KTableColumnNeedsReindex ( KTable *self, const char *colname )
-{
-    if ( self != NULL )
-    {
-        char path [ 256 ];
-        rc_t rc = KDBMakeSubPath ( self -> dir,
-            path, sizeof path, "col", 3, colname );
-        if ( rc == 0 )
-        {
-            uint64_t idx0_size;
-            rc = KDirectoryFileSize ( self -> dir, & idx0_size, "%s/idx0", path );
-            if ( rc == 0 && idx0_size > 0 )
-                return true;
-        }
-    }
-
-    return false;
-}
-
-
-/* Locked
- *  returns non-zero if locked
- */
-LIB_EXPORT bool CC KColumnLocked ( const KColumn *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return false;
-
-    rc = KDBWritable ( self -> dir, "." );
-    return GetRCState ( rc ) == rcLocked;
-}
-
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptMetadata and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-static
-rc_t KColumnLockInt (const KColumn  * self, char * path, size_t path_size,
-                        int type, const char * name, va_list args )
-{
-    rc_t rc;
-
-    if (self == NULL)
-        rc = RC ( rcDB, rcMgr, rcAccessing, rcSelf, rcNull );
-
-    else if (name == NULL)
-        rc =  RC (rcDB, rcMgr, rcAccessing, rcPath, rcNull);
-
-    else
-    {
-        const char * ns;
-        char path [ 256 ];
-
-        ns = KDBGetNamespaceString (type);
-
-        switch (type)
-        {
-        default:
-            rc = RC (rcDB, rcMgr, rcAccessing, rcParam, rcInvalid);
-            break;
-        case kptIndex:
-        case kptMetadata:
-/*         case kptIndex: */
-            rc = KDBVMakeSubPath (self->dir, path, sizeof path, ns, strlen (ns),
-                                  name, args);
-            break;
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KColumnVWritable ( const KColumn *self, uint32_t type, const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    rc = KColumnLockInt (self, path, sizeof path, type, name, args);
-    if (rc == 0)
-        rc = KDBWritable (self->dir, path);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KColumnWritable ( const KColumn *self, uint32_t type, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KColumnVWritable ( self, type, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* Lock
- *  apply lock
- *
- *  if object is already locked, the operation is idempotent
- *  and returns an rc state of rcLocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptMetadata and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC KColumnVLock ( KColumn *self, uint32_t type, const char *name, va_list args )
-{
-    rc_t rc = 0;
-    char path [ 256 ];
-
-    rc = KColumnLockInt (self, path, sizeof path, type, name, args);
-    if (rc == 0)
-        rc = KDBLockDir (self->dir, path);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KColumnLock ( KColumn *self, uint32_t type, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KColumnVLock (self, type, name, args);
-    va_end (args);
-    return rc;
-}
-
-
-/* Unlock
- *  remove lock
- *
- *  if object is already unlocked, the operation is idempotent
- *  and returns an rc state of rcUnlocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptMetadata and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC KColumnVUnlock ( KColumn *self, uint32_t type, const char *name, va_list args )
-{
-    rc_t rc = 0;
-    char path [ 256 ];
-
-    rc = KColumnLockInt (self, path, sizeof path, type, name, args);
-    if (rc == 0)
-        rc = KDBUnlockDir (self->dir, path);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KColumnUnlock ( KColumn *self, uint32_t type, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-    va_start ( args, name );
-    rc = KColumnVUnlock (self, type, name, args);
-    va_end (args);
-    return rc;
-}
-
-
-/* Version
- *  returns the column format version
- */
-LIB_EXPORT rc_t CC KColumnVersion ( const KColumn *self, uint32_t *version )
-{
-    if ( version == NULL )
-        return RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-    if ( self == NULL )
-        return RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-    return KColumnIdxVersion ( & self -> idx, version );
-}
-
-/* ByteOrder
- *  indicates whether original byte order is reversed
- *  under current architecture.
- *
- *  the byte order of the column is established by
- *  the host architecture when created.
- *
- *  "reversed" [ OUT ] - if true, the original byte
- *  order is reversed with regard to host native byte order.
- */
-LIB_EXPORT rc_t CC KColumnByteOrder ( const KColumn *self, bool *reversed )
-{
-    if ( reversed == NULL )
-        return RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-
-    if ( self == NULL )
-    {
-        * reversed = false;
-        return RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-    }
-     
-    return KColumnIdxByteOrder ( & self -> idx, reversed );
-}
-
-/* IdRange
- *  returns id range for column
- */
-LIB_EXPORT rc_t CC KColumnIdRange ( const KColumn *self, int64_t *first, uint64_t *count )
-{
-    rc_t rc;
-    int64_t dummy, last;
-
-    if ( first == NULL && count == NULL )
-        return RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-
-    if ( first == NULL )
-        first = & dummy;
-    else if ( count == NULL )
-        count = ( uint64_t * ) & dummy;
-
-    if ( self == NULL )
-    {
-        * first = 0;
-        * count = 0;
-        return RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-    }
-
-    rc = KColumnIdxIdRange ( & self -> idx, first, & last );
-    if ( rc != 0 )
-        * count = 0;
-    else
-        * count = last - * first + 1;
-
-    return rc;
-}
-
-
-/* FindFirstRowId
- *  locates the first valid row-id starting from a given id.
- *  this will be either the start id provided, or
- *  the first row from the next blob, if available.
- *
- *  "found" [ OUT ] - will contain the value of "start" if this is contained within a blob,
- *  or the first row-id of the next blob after "start", if any.
- *
- *  "start" [ IN ] - starting row-id in search, inclusive. if this id is valid,
- *  it will be returned in "found"
- *
- *  returns 0 if id is found, rcNotFound if no more data were available.
- *  may return other codes upon error.
- */
-LIB_EXPORT rc_t CC KColumnFindFirstRowId ( const KColumn * self, int64_t * found, int64_t start )
-{
-    rc_t rc;
-
-    if ( found == NULL )
-        rc = RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KColumnIdxFindFirstRowId ( & self -> idx, found, start );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        * found = 0;
-    }
-
-    return rc;
-}
-
-
-/* Reindex
- *  optimize indices
- */
-LIB_EXPORT rc_t CC KColumnReindex ( KColumn *self )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcColumn, rcReindexing, rcSelf, rcNull );
-    if ( self -> read_only )
-        return RC ( rcDB, rcColumn, rcReindexing, rcColumn, rcReadonly );
-    return KColumnIdxReindex ( & self -> idx, self -> md5, self -> commit_freq,
-        self -> df . eof, self -> df . pgsize, self -> checksum );
-}
-
-
-/* CommitFreq
- * SetCommitFreq
- *  manage frequency of commits
- */
-LIB_EXPORT rc_t CC KColumnCommitFreq ( KColumn *self, uint32_t *freq )
-{
-    if ( freq == NULL )
-        return RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-
-    if ( self == NULL )
-    {
-        * freq = 0;
-        return RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-    }
-
-    * freq = self -> commit_freq;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KColumnSetCommitFreq ( KColumn *self, uint32_t freq )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcColumn, rcUpdating, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcColumn, rcUpdating, rcColumn, rcReadonly );
-
-    self -> commit_freq = freq;
-    return 0;
-}
-
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC KColumnOpenManagerRead ( const KColumn *self, const KDBManager **mgr )
-{
-    rc_t rc;
-
-    if ( mgr == NULL )
-        rc = RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDBManagerAddRef ( self -> mgr );
-            if ( rc == 0 )
-            {
-                * mgr = self -> mgr;
-                return 0;
-            }
-        }
-
-        * mgr = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KColumnOpenManagerUpdate ( KColumn *self, KDBManager **mgr )
-{
-    rc_t rc;
-
-    if ( mgr == NULL )
-        rc = RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDBManagerAddRef ( self -> mgr );
-            if ( rc == 0 )
-            {
-                * mgr = self -> mgr;
-                return 0;
-            }
-        }
-
-        * mgr = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenParent
- *  duplicate reference to parent table
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC KColumnOpenParentRead ( const KColumn *self, const KTable **tbl )
-{
-    rc_t rc;
-
-    if ( tbl == NULL )
-        rc = RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KTableAddRef ( self -> tbl );
-            if ( rc == 0 )
-            {
-                * tbl = self -> tbl;
-                return 0;
-            }
-        }
-
-        * tbl = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KColumnOpenParentUpdate ( KColumn *self, KTable **tbl )
-{
-    rc_t rc;
-
-    if ( tbl == NULL )
-        rc = RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-        else if ( self -> tbl != NULL && self -> tbl -> read_only )
-            rc = RC ( rcDB, rcColumn, rcAccessing, rcTable, rcReadonly );
-        else
-        {
-            rc = KTableAddRef ( self -> tbl );
-            if ( rc == 0 )
-            {
-                * tbl = self -> tbl;
-                return 0;
-            }
-        }
-
-        * tbl = NULL;
-    }
-
-    return rc;
-}
-
-/* OpenDirectory
- *  duplicate reference to the directory in use
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC KColumnOpenDirectoryRead ( const KColumn *self, const KDirectory **dir )
-{
-    rc_t rc;
-
-    if ( dir == NULL )
-        rc = RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDirectoryAddRef ( self -> dir );
-            if ( rc == 0 )
-            {
-                * dir = self -> dir;
-                return 0;
-            }
-        }
-
-        * dir = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KColumnOpenDirectoryUpdate ( KColumn *self, KDirectory **dir )
-{
-    rc_t rc;
-
-    if ( dir == NULL )
-        rc = RC ( rcDB, rcColumn, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcColumn, rcAccessing, rcSelf, rcNull );
-        else if ( self -> dir != NULL && self -> dir -> read_only )
-            rc = RC ( rcDB, rcColumn, rcAccessing, rcDirectory, rcReadonly );
-        else
-        {
-            rc = KDirectoryAddRef ( self -> dir );
-            if ( rc == 0 )
-            {
-                * dir = self -> dir;
-                return 0;
-            }
-        }
-
-        * dir = NULL;
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KColumnBlob
- *  one or more rows of column data
- */
-struct KColumnBlob
-{
-    /* holds either an existing blob loc
-       or new blob index range */
-    KColBlobLoc loc;
-
-    /* holds old and new page maps */
-    KColumnPageMap pmorig;
-    KColumnPageMap pmnew;
-
-    /* owning column */
-    KColumn *col;
-
-    /* refcount */
-    atomic32_t refcount;
-
-    /* number of bytes written to blob */
-    uint32_t num_writ;
-
-    /* checksums */
-    uint32_t crc32;
-    MD5State md5;
-
-    /* open mode */
-    uint8_t read_only;
-
-    /* for validation */
-    bool bswap;
-};
-
-
-/* Whack
- */
-static
-rc_t KColumnBlobWhack ( KColumnBlob *self )
-{
-    KColumn *col = self -> col;
-    assert ( col != NULL );
-
-    KColumnPageMapWhack ( & self -> pmorig, & col -> df );
-    if ( ! self -> read_only )
-        KColumnPageMapWhack ( & self -> pmnew, & col -> df );
-
-    /* cannot recover from errors here,
-       since the page maps needed whacking first,
-       and the column is needed for that. */
-    KColumnSever ( col );
-
-    free ( self );
-    return 0;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KColumnBlobAddRef ( const KColumnBlob *cself )
-{
-    if ( cself != NULL )
-    {
-        atomic32_inc ( & ( ( KColumnBlob* ) cself ) -> refcount );
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KColumnBlobRelease ( const KColumnBlob *cself )
-{
-    KColumnBlob *self = ( KColumnBlob* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-            return KColumnBlobWhack ( self );
-    }
-    return 0;
-}
-
-/* OpenRead
- * OpenUpdate
- */
-static
-rc_t KColumnBlobOpenRead ( KColumnBlob *self, const KColumn *col, int64_t id )
-{
-    /* locate blob */
-    rc_t rc = KColumnIdxLocateBlob ( & col -> idx, & self -> loc, id, id );
-    if ( rc == 0 )
-    {
-        /* indicates not written */
-        /*assert ( self -> num_writ == 0 );*/
-
-        /* open page map to blob */
-        rc = KColumnPageMapOpen ( & self -> pmorig,
-            ( KColumnData* ) & col -> df, self -> loc . pg, self -> loc . u . blob . size );
-        if ( rc == 0 )
-        {
-            /* existing blob must have proper checksum bytes */
-            if ( self -> loc . u . blob . size >= col -> csbytes )
-            {
-                /* remove them from apparent blob size */
-                self -> loc . u . blob . size -= col -> csbytes;
-                return 0;
-            }
-
-            /* the blob is corrupt */
-            KColumnPageMapWhack ( & self -> pmorig, & col -> df );
-            rc = RC ( rcDB, rcBlob, rcOpening, rcBlob, rcCorrupt );
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t KColumnBlobOpenUpdate ( KColumnBlob *self, KColumn *col, int64_t id )
-{
-    /* open existing blob */
-    rc_t rc = KColumnBlobOpenRead ( self, col, id );
-    if ( rc == 0 )
-    {
-        /* create a new page map for replacement */
-        rc = KColumnPageMapCreate ( & self -> pmnew, & col -> df );
-        if ( rc == 0 )
-        {
-            /* initialize for writing checksums */
-            switch ( col -> checksum )
-            {
-            case kcsCRC32:
-                self -> crc32 = 0;
-                break;
-            case kcsMD5:
-                MD5StateInit ( & self -> md5 );
-                break;
-            }
-        }
-
-        /* tear down results of opening for read */
-        KColumnPageMapWhack ( & self -> pmorig, & col -> df );
-    }
-
-    return rc;
-}
-
-/* Create
- */
-static
-rc_t KColumnBlobCreate ( KColumnBlob *self, KColumn *col )
-{
-    rc_t rc;
-
-    if ( col -> md5 != NULL )
-    {
-	/* this perhaps should be split into wcoldat.c and wcolidx.c */
-	rc = KMD5FileBeginTransaction ( col -> df . fmd5 );
-	if ( rc == 0 )
-	{
-	    rc = KMD5FileBeginTransaction ( col -> idx . idx2 . fmd5 );
-	    if ( rc == 0 )
-	    {
-		rc = KMD5FileBeginTransaction ( col -> idx . idx0 . fmd5 );
-		if ( rc == 0 )
-		{
-		    rc = KMD5FileBeginTransaction ( col -> idx . idx1 . fmd5 );
-		    if ( rc == 0 )
-		    {
-			rc = KMD5FileBeginTransaction ( col -> idx . idx1 . fidxmd5 );
-			if ( rc != 0 )
-			    KMD5FileCommit ( col -> idx . idx1 .  fmd5 );
-		    }
-		    if ( rc != 0 )
-			KMD5FileCommit ( col -> idx . idx0 .  fmd5 );
-		}
-		if ( rc != 0 )
-		    KMD5FileCommit ( col -> idx . idx2 .  fmd5 );
-	    }
-	    if ( rc != 0 )
-		KMD5FileCommit ( col -> df . fmd5 );
-	}
-	if ( rc != 0 )
-	    return rc;
-    }
-
-    /* no location yet */
-    memset ( & self -> loc, 0, sizeof self -> loc );
-
-    /* invalid existing page map */
-    memset ( & self -> pmorig, 0, sizeof self -> pmorig );
-
-    /* create a new page map */
-    rc = KColumnPageMapCreate ( & self -> pmnew, & col -> df );
-    if ( rc == 0 )
-    {
-        /* initialize for writing checksums */
-        switch ( col -> checksum )
-        {
-        case kcsCRC32:
-            self -> crc32 = 0;
-            break;
-        case kcsMD5:
-            MD5StateInit ( & self -> md5 );
-            break;
-        }
-    }
-
-    return rc;
-}
-
-/* Make
- */
-static
-rc_t KColumnBlobMake ( KColumnBlob **blobp, bool bswap )
-{
-    KColumnBlob *blob = malloc ( sizeof * blob );
-    if ( blob == NULL )
-        return RC ( rcDB, rcBlob, rcConstructing, rcMemory, rcExhausted );
-
-    memset ( blob, 0, sizeof * blob );
-    atomic32_set ( & blob -> refcount, 1 );
-    blob -> bswap = bswap;
-
-    * blobp = blob;
-    return 0;
-}
-
-/* OpenBlobRead
- * OpenBlobUpdate
- *  opens an existing blob containing row data for id
- */
-LIB_EXPORT rc_t CC KColumnOpenBlobRead ( const KColumn *self, const KColumnBlob **blobp, int64_t id )
-{
-    rc_t rc;
-    KColumnBlob *blob;
-
-    if ( blobp == NULL )
-        return RC ( rcDB, rcColumn, rcOpening, rcParam, rcNull );
-    * blobp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcColumn, rcOpening, rcSelf, rcNull );
-
-    rc = KColumnBlobMake ( & blob, self -> idx . idx1 . bswap );
-    if ( rc == 0 )
-    {
-        rc = KColumnBlobOpenRead ( blob, self, id );
-        if ( rc == 0 )
-        {
-            blob -> col = KColumnAttach ( self );
-            blob -> read_only = true;
-            * blobp = blob;
-            return 0;
-        }
-        
-        free ( blob );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KColumnOpenBlobUpdate ( KColumn *self, KColumnBlob **blobp, int64_t id )
-{
-    rc_t rc;
-
-    if ( blobp == NULL )
-        return RC ( rcDB, rcColumn, rcOpening, rcParam, rcNull );
-    * blobp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcColumn, rcOpening, rcSelf, rcNull );
-    if ( self -> read_only )
-        return RC ( rcDB, rcColumn, rcOpening, rcColumn, rcReadonly );
-
-    rc = KColumnBlobMake ( blobp, self -> idx . idx1 . bswap );
-    if ( rc == 0 )
-    {
-        KColumnBlob *blob = * blobp;
-        rc = KColumnBlobOpenUpdate ( blob, self, id );
-        if ( rc == 0 )
-        {
-            blob -> col = KColumnAttach ( self );
-            * blobp = blob;
-            return 0;
-        }
-                    
-        free ( blob );
-    }
-
-    return rc;
-}
-
-/* CreateBlob
- *  creates a new, unassigned blob
- */
-LIB_EXPORT rc_t CC KColumnCreateBlob ( KColumn *self, KColumnBlob **blobp )
-{
-    rc_t rc;
-
-    if ( blobp == NULL )
-        return RC ( rcDB, rcColumn, rcOpening, rcParam, rcNull );
-    * blobp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcColumn, rcOpening, rcSelf, rcNull );
-    if ( self -> read_only )
-        return RC ( rcDB, rcColumn, rcOpening, rcColumn, rcReadonly );
-
-    rc = KColumnBlobMake ( blobp, self -> idx . idx1 . bswap );
-    if ( rc == 0 )
-    {
-        KColumnBlob *blob = * blobp;
-        rc = KColumnBlobCreate ( blob, self );
-        if ( rc == 0 )
-        {
-            blob -> col = KColumnAttach ( self );
-            * blobp = blob;
-            return 0;
-        }
-                    
-        free ( blob );
-    }
-
-    return rc;
-}
-
-/* IdRange
- *  returns id range for blob
- *
- *  "first" [ OUT, NULL OKAY ] - optional return parameter for first id
- *
- *  "last" [ OUT, NULL OKAY ] - optional return parameter for last id
- */
-LIB_EXPORT rc_t CC KColumnBlobIdRange ( const KColumnBlob *self, int64_t *first, uint32_t *count )
-{
-    rc_t rc;
-
-    if ( first == NULL || count == NULL )
-        rc = RC ( rcDB, rcBlob, rcAccessing, rcParam, rcNull );
-    else if ( self == NULL )
-        rc = RC ( rcDB, rcBlob, rcAccessing, rcSelf, rcNull );
-    else if ( self -> loc . id_range == 0 )
-        rc = RC ( rcDB, rcBlob, rcAccessing, rcRange, rcEmpty );
-    else
-    {
-        * first = self -> loc . start_id;
-        * count = self -> loc . id_range;
-        return 0;
-    }
-
-    if ( first != NULL )
-        * first = 0;
-    if ( count != NULL )
-        * count = 0;
-
-    return rc;
-}
-
-/* KColumnBlobValidate
- *  runs checksum validation on unmodified blob
- */
-static
-rc_t KColumnBlobValidateCRC32 ( const KColumnBlob *self )
-{
-    rc_t rc;
-    const KColumn *col = self -> col;
-
-    uint8_t buffer [ 8 * 1024 ];
-    size_t to_read, num_read, total, size;
-
-    uint32_t cs, crc32 = 0;
-
-    /* calculate checksum */
-    for ( size = self -> loc . u . blob. size, total = 0; total < size; total += num_read )
-    {
-        to_read = size - total;
-        if ( to_read > sizeof buffer )
-            to_read = sizeof buffer;
-
-        rc = KColumnDataRead ( & col -> df,
-            & self -> pmorig, total, buffer, to_read, & num_read );
-        if ( rc != 0 )
-            return rc;
-        if ( num_read == 0 )
-            return RC ( rcDB, rcBlob, rcValidating, rcTransfer, rcIncomplete );
-
-        crc32 = CRC32 ( crc32, buffer, num_read );
-    }
-
-    /* read stored checksum */
-    rc = KColumnDataRead ( & col -> df,
-        & self -> pmorig, size, & cs, sizeof cs, & num_read );
-    if ( rc != 0 )
-        return rc;
-    if ( num_read != sizeof cs )
-        return RC ( rcDB, rcBlob, rcValidating, rcTransfer, rcIncomplete );
-
-    if ( self -> bswap )
-        cs = bswap_32 ( cs );
-
-    if ( cs != crc32 )
-        return RC ( rcDB, rcBlob, rcValidating, rcBlob, rcCorrupt );
-
-    return 0;
-}
-
-static
-rc_t KColumnBlobValidateMD5 ( const KColumnBlob *self )
-{
-    rc_t rc;
-    const KColumn *col = self -> col;
-
-    uint8_t buffer [ 8 * 1024 ];
-    size_t to_read, num_read, total, size;
-
-    MD5State md5;
-    uint8_t digest [ 16 ];
-
-    MD5StateInit ( & md5 );
-
-    /* calculate checksum */
-    for ( size = self -> loc . u . blob . size, total = 0; total < size; total += num_read )
-    {
-        to_read = size - total;
-        if ( to_read > sizeof buffer )
-            to_read = sizeof buffer;
-
-        rc = KColumnDataRead ( & col -> df,
-            & self -> pmorig, total, buffer, to_read, & num_read );
-        if ( rc != 0 )
-            return rc;
-        if ( num_read == 0 )
-            return RC ( rcDB, rcBlob, rcValidating, rcTransfer, rcIncomplete );
-
-        MD5StateAppend ( & md5, buffer, num_read );
-    }
-
-    /* read stored checksum */
-    rc = KColumnDataRead ( & col -> df,
-        & self -> pmorig, size, buffer, sizeof digest, & num_read );
-    if ( rc != 0 )
-        return rc;
-    if ( num_read != sizeof digest )
-        return RC ( rcDB, rcBlob, rcValidating, rcTransfer, rcIncomplete );
-
-    /* finish MD5 digest */
-    MD5StateFinish ( & md5, digest );
-
-    if ( memcmp ( buffer, digest, sizeof digest ) != 0 )
-        return RC ( rcDB, rcBlob, rcValidating, rcBlob, rcCorrupt );
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KColumnBlobValidate ( const KColumnBlob *self )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcBlob, rcValidating, rcSelf, rcNull );
-
-    if ( self -> num_writ != 0 )
-        return RC ( rcDB, rcBlob, rcValidating, rcBlob, rcBusy );
-
-    if ( self -> loc . u . blob . size != 0 ) switch ( self -> col -> checksum )
-    {
-    case kcsCRC32:
-        return KColumnBlobValidateCRC32 ( self );
-    case kcsMD5:
-        return KColumnBlobValidateMD5 ( self );
-    }
-
-    return 0;
-}
-
-/* ValidateBuffer
- *  run checksum validation on buffer data
- *
- *  "buffer" [ IN ] - returned blob buffer from ReadAll
- *
- *  "cs_data" [ IN ] and "cs_data_size" [ IN ] - returned checksum data from ReadAll
- */
-static
-rc_t KColumnBlobValidateBufferCRC32 ( const void * buffer, size_t size, uint32_t cs )
-{
-    uint32_t crc32 = CRC32 ( 0, buffer, size );
-
-    if ( cs != crc32 )
-        return RC ( rcDB, rcBlob, rcValidating, rcBlob, rcCorrupt );
-
-    return 0;
-}
-
-static
-rc_t KColumnBlobValidateBufferMD5 ( const void * buffer, size_t size, const uint8_t cs [ 16 ] )
-{
-    MD5State md5;
-    uint8_t digest [ 16 ];
-
-    MD5StateInit ( & md5 );
-
-    /* calculate checksum */
-    MD5StateAppend ( & md5, buffer, size );
-
-    /* finish MD5 digest */
-    MD5StateFinish ( & md5, digest );
-
-    if ( memcmp ( cs, digest, sizeof digest ) != 0 )
-        return RC ( rcDB, rcBlob, rcValidating, rcBlob, rcCorrupt );
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KColumnBlobValidateBuffer ( const KColumnBlob * self,
-    const KDataBuffer * buffer, const KColumnBlobCSData * cs_data, size_t cs_data_size )
-{
-    size_t bsize;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcBlob, rcValidating, rcSelf, rcNull );
-    if ( buffer == NULL || cs_data == NULL )
-        return RC ( rcDB, rcBlob, rcValidating, rcParam, rcNull );
-
-    bsize = KDataBufferBytes ( buffer );
-    if ( bsize < self -> loc . u . blob . size )
-        return RC ( rcDB, rcBlob, rcValidating, rcData, rcInsufficient );
-    if ( bsize > self -> loc . u . blob . size )
-        return RC ( rcDB, rcBlob, rcValidating, rcData, rcExcessive );
-
-    if ( bsize != 0 ) switch ( self -> col -> checksum )
-    {
-    case kcsNone:
-        break;
-    case kcsCRC32:
-        return KColumnBlobValidateBufferCRC32 ( buffer -> base, bsize,
-            self -> bswap ? bswap_32 ( cs_data -> crc32 ) : cs_data -> crc32 );
-    case kcsMD5:
-        return KColumnBlobValidateBufferMD5 ( buffer -> base, bsize, cs_data -> md5_digest );
-    }
-
-    return 0;
-}
-
-/* KColumnBlobRead
- *  read data from blob
- *
- *  "offset" [ IN ] - starting offset into blob
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - number of bytes actually read
- *
- *  "remaining" [ OUT, NULL OKAY ] - optional return parameter for
- *  the number of bytes remaining to be read. specifically,
- *  "offset" + "num_read" + "remaining" == sizeof blob
- */
-LIB_EXPORT rc_t CC KColumnBlobRead ( const KColumnBlob *self,
-    size_t offset, void *buffer, size_t bsize,
-    size_t *num_read, size_t *remaining )
-{
-    rc_t rc;
-    const KColumnPageMap *pm;
-
-    size_t ignore;
-    if ( remaining == NULL )
-        remaining = & ignore;
-
-    if ( num_read == NULL )
-        rc = RC ( rcDB, rcBlob, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcBlob, rcReading, rcSelf, rcNull );
-        else
-        {
-            size_t size = self -> num_writ;
-            const KColumn *col = self -> col;
-
-            if ( size != 0 )
-                pm = & self -> pmnew;
-            else
-            {
-                pm = & self -> pmorig;
-                size = self -> loc . u . blob . size;
-            }
-
-            if ( offset > size )
-                offset = size;
-
-            if ( bsize == 0 )
-                rc = 0;
-            else if ( buffer == NULL )
-                rc = RC ( rcDB, rcBlob, rcReading, rcBuffer, rcNull );
-            else
-            {
-                size_t to_read = size - offset;
-                if ( to_read > bsize )
-                    to_read = bsize;
-
-                *num_read = 0;
-                while (*num_read < to_read) {
-                    size_t nread = 0;
-
-                    rc = KColumnDataRead ( & col -> df, pm, offset - *num_read, (void *)((char *)buffer + *num_read), to_read - *num_read, &nread );
-                    if (rc) break;
-                    if (nread == 0) {
-                        rc = RC ( rcDB, rcBlob, rcReading, rcFile, rcInsufficient );
-                        break;
-                    }
-                    *num_read += nread;
-                }
-
-                if ( rc == 0 )
-                {
-                    * remaining = size - offset - * num_read;
-                    return 0;
-                }
-            }
-
-            * remaining = size - offset;
-            * num_read = 0;
-            return rc;
-        }
-
-        * num_read = 0;
-    }
-
-    * remaining = 0;
-    return rc;
-}
-
-/* ReadAll
- *  read entire blob, plus any auxiliary checksum data
- *
- *  "buffer" [ OUT ] - pointer to a KDataBuffer structure that will be initialized
- *  and resized to contain the entire blob. upon success, will contain the number of bytes
- *  in buffer->elem_count and buffer->elem_bits == 8.
- *
- *  "opt_cs_data [ OUT, NULL OKAY ] - optional output parameter for checksum data
- *  associated with the blob in "buffer", if any exist.
- *
- *  "cs_data_size" [ IN ] - sizeof of * opt_cs_data if not NULL, 0 otherwise
- */
-LIB_EXPORT rc_t CC KColumnBlobReadAll ( const KColumnBlob * self, KDataBuffer * buffer,
-    KColumnBlobCSData * opt_cs_data, size_t cs_data_size )
-{
-    rc_t rc = 0;
-
-    if ( opt_cs_data != NULL )
-        memset ( opt_cs_data, 0, cs_data_size );
-
-    if ( buffer == NULL )
-        rc = RC ( rcDB, rcBlob, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcBlob, rcReading, rcSelf, rcNull );
-        else
-        {
-            /* determine blob size */
-            size_t bsize = self -> loc . u . blob . size;
-
-            /* ignore blobs of size 0 */
-            if ( bsize == 0 )
-                rc = 0;
-            else
-            {
-                /* initialize the buffer */
-                rc = KDataBufferMakeBytes ( buffer, bsize );
-                if ( rc == 0 )
-                {
-                    /* read the blob */
-                    size_t num_read, remaining;
-                    rc = KColumnBlobRead ( self, 0, buffer -> base, bsize, & num_read, & remaining );
-                    if ( rc == 0 )
-                    {
-                        /* test that num_read is everything and we have no remaining */
-                        if ( num_read != bsize || remaining != 0 )
-                            rc = RC ( rcDB, rcBlob, rcReading, rcTransfer, rcIncomplete );
-
-                        else
-                        {
-                            /* set for MD5 - just due to switch ordering */
-                            size_t cs_bytes = 16;
-
-                            /* if not reading checksum data, then we're done */
-                            if ( opt_cs_data == NULL )
-                                return 0;
-
-                            /* see what checksumming is in use */
-                            switch ( self -> col -> checksum )
-                            {
-                            case kcsNone:
-                                return 0;
-
-                            case kcsCRC32:
-                                /* reset for CRC32 */
-                                cs_bytes = 4;
-
-                                /* no break */
-
-                            case kcsMD5:
-                                if ( cs_data_size < cs_bytes )
-                                {
-                                    rc = RC ( rcDB, rcBlob, rcReading, rcParam, rcTooShort );
-                                    break;
-                                }
-
-                                /* read checksum information */
-                                rc = KColumnDataRead ( & self -> col -> df,
-                                    & self -> pmorig, bsize, opt_cs_data, cs_bytes, & num_read );
-                                if ( rc == 0 )
-                                {
-                                    if ( num_read != cs_bytes )
-                                        rc = RC ( rcDB, rcBlob, rcReading, rcTransfer, rcIncomplete );
-                                    else
-                                    {
-                                        /* success - read the blob AND the checksum data */
-                                        return 0;
-                                    }
-                                }
-                                break;
-                            }
-                        }
-                    }
-
-                    KDataBufferWhack ( buffer );
-                }
-            }
-        }
-
-        memset ( buffer, 0, sizeof * buffer );
-    }
-
-    return rc;
-}
-
-/* KColumnBlobAppend
- *  append data to open blob
- *
- *  "buffer" [ IN ] and "size" [ IN ] - blob data
- */
-LIB_EXPORT rc_t CC KColumnBlobAppend ( KColumnBlob *self, const void *buffer, size_t size )
-{
-    KColumn *col;
-    size_t total, num_writ;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcBlob, rcWriting, rcSelf, rcNull );
-
-    /* data fork will refuse write anyway, but... */
-    if ( self -> read_only )
-        return RC ( rcDB, rcBlob, rcWriting, rcBlob, rcReadonly );
-
-    col = self -> col;
-
-    for ( total = 0; total < size; total += num_writ )
-    {
-        rc_t rc = KColumnDataWrite ( & col -> df,
-            & self -> pmnew, self -> num_writ + total,
-            ( const char* ) buffer + total, size - total, & num_writ );
-        if ( rc != 0 )
-            return rc;
-        if ( num_writ == 0 )
-            return RC ( rcDB, rcBlob, rcWriting, rcTransfer, rcIncomplete );
-    }
-
-    self -> num_writ += size;
-
-    switch ( col -> checksum )
-    {
-    case kcsCRC32:
-        self -> crc32 = CRC32 ( self -> crc32, buffer, size );
-        break;
-    case kcsMD5:
-        MD5StateAppend ( & self -> md5, buffer, size );
-        break;
-    }
-    
-    return 0;
-}
-
-/* KColumnBlobAssignRange
- *  assign a total id range to blob at any time before commit
- *
- *  "first" [ IN ] and "count" [ IN ] - range parameters for assign
- */
-LIB_EXPORT rc_t CC KColumnBlobAssignRange ( KColumnBlob *self, int64_t first, uint32_t count )
-{
-    rc_t rc;
-    const KColumn *col;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcBlob, rcUpdating, rcSelf, rcNull );
-
-    if ( count == 0 )
-        return RC ( rcDB, rcBlob, rcUpdating, rcRange, rcEmpty );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcBlob, rcUpdating, rcBlob, rcReadonly );
-
-    if ( self -> loc . id_range != 0 )
-    {
-        /* allow benign reassignment */
-        if ( self -> loc . start_id == first &&
-             self -> loc . id_range == count )
-            return 0;
-
-        /* can't be reset */
-        return RC ( rcDB, rcBlob, rcUpdating, rcBlob, rcBusy );
-    }
-
-    col = self -> col;
-
-    /* try to open read map */
-    rc = KColumnBlobOpenRead ( self, col, first );
-    if ( rc == 0 )
-    {
-        /* blob already exists
-           again, allow benign reassignment */                    
-        if ( self -> loc . start_id == first &&
-             self -> loc . id_range == count )
-            return 0;
-
-        /* conflicting assignment */
-        KColumnPageMapWhack ( & self -> pmorig, & col -> df );
-        memset ( & self -> loc, 0, sizeof self -> loc );
-        memset ( & self -> pmorig, 0, sizeof self -> pmorig );
-        return RC ( rcDB, rcBlob, rcUpdating, rcRange, rcIncorrect );
-    }
-
-    /* expect status of not found */
-    if ( GetRCState ( rc ) != rcNotFound )
-        return rc;
-
-    /* assign the range */
-    self -> loc . pg = 0;
-    self -> loc . u . blob . remove = 0;
-    self -> loc . start_id = first;
-    self -> loc . id_range = count;
-    return 0;
-}
-
-/* KColumnBlobCommit
- *  commit changes to blob
- *  close to further updates
- */
-static
-char zero [ 4096 ];
-
-static
-rc_t KColumnBlobZeroPad ( KColumnBlob *self )
-{
-    KColumn *col = self -> col;
-    size_t pad_bytes = self -> num_writ % col -> df . pgsize;
-    if ( pad_bytes != 0 )
-    {
-        size_t total, num_writ;
-
-        pad_bytes = col -> df . pgsize - pad_bytes;
-        for ( total = 0; total < pad_bytes; total += num_writ )
-        {
-            rc_t rc;
-
-            size_t to_write = pad_bytes - total;
-            if ( to_write > sizeof zero )
-                to_write = sizeof zero;
-
-            rc = KColumnDataWrite ( & col -> df,
-                & self -> pmnew, self -> num_writ + total,
-                zero, to_write, & num_writ );
-            if ( rc != 0 )
-                return rc;
-            if ( num_writ == 0 )
-                return RC ( rcDB, rcBlob, rcCommitting, rcTransfer, rcIncomplete );
-        }
-    }
-    return 0;
-}
-
-static
-rc_t KColumnBlobDoCommit ( KColumnBlob *self )
-{
-    rc_t rc;
-    KColBlobLoc loc;
-    KColumn *col = self -> col;
-
-    /* finish checksum */
-    if ( col -> csbytes != 0 )
-    {
-        MD5State md5;
-        uint32_t crc32;
-        uint8_t digest [ 16 ];
-
-        void *cs;
-        size_t num_writ;
-
-        switch ( col -> checksum )
-        {
-        case kcsCRC32:
-            crc32 = self -> crc32;
-            if ( self -> bswap )
-                crc32 = bswap_32 ( crc32 );
-            cs = & crc32;
-            break;
-        case kcsMD5:
-        default: /* to quiet compiler warnings */
-            /* work on copy in case of failure */
-            md5 = self -> md5;
-            MD5StateFinish ( & md5, digest );
-            cs = digest;
-            break;
-        }
-
-        rc = KColumnDataWrite ( & col -> df,
-            & self -> pmnew, self -> num_writ,
-            cs, col -> csbytes, & num_writ );
-        if ( rc != 0 )
-            return rc;
-        if ( num_writ != col -> csbytes )
-            return RC ( rcDB, rcBlob, rcCommitting, rcTransfer, rcIncomplete );
-
-        self -> num_writ += num_writ;
-    }
-
-    /* extract index information */
-    rc = KColumnPageMapId ( & self -> pmnew, & col -> df, & loc . pg );
-    if ( rc == 0 )
-    {
-        loc . u . blob . size = ( uint32_t ) self -> num_writ;
-        loc . u . blob . remove = 0;
-        loc . start_id = self -> loc . start_id;
-        loc . id_range = self -> loc . id_range;
-
-        /* pad out rest of page */
-        if ( col -> df . pgsize > 1 )
-            rc = KColumnBlobZeroPad ( self );
-        if ( rc == 0 )
-        {
-            /* commit data fork */
-            rc = KColumnDataCommit ( & col -> df,
-                & self -> pmnew, self -> num_writ );
-            if ( rc == 0 )
-            {
-                /* commit index fork */
-                rc = KColumnIdxCommit ( & col -> idx, col -> md5,
-                    & loc, col -> commit_freq, col -> df . eof,
-                    col -> df . pgsize, col -> checksum );
-                if ( rc == 0 || rc == kdbReindex )
-                {
-                    rc_t status = rc;
-
-                    /* release old pages */
-                    if ( self -> loc . u . blob . size == 0 )
-                        rc = 0;
-                    else
-                    {
-                        rc = KColumnDataFree ( & col -> df,
-                            & self -> pmorig, self -> loc . u . blob . size + col -> csbytes );
-                        if ( GetRCState ( rc ) == rcInvalid )
-                            rc = 0;
-                    }
-
-                    if ( rc == 0 )
-                    {
-                        /* transfer new map */
-                        self -> pmorig = self -> pmnew;
-                        memset ( & self -> pmnew, 0, sizeof self -> pmnew );
-
-                        /* fill out location */
-                        loc . u . blob . size -= col -> csbytes;
-                        self -> loc = loc;
-
-                        /* HACK - should open new pm on demand
-                           but since the code does not yet support it,
-                           disallow further writes */
-                        self -> read_only = true;
-                        
-                        /* mark blob as clean */
-                        self -> num_writ = 0;
-
-			/* these must not be a point of failure 
-			   The only failure from the KMD5FileCommit
-			   behind these is on NULL parameter */
-			rc = KColumnDataCommitDone ( & col -> df );
-			if ( rc == 0 )
-			    rc = KColumnIdxCommitDone ( & col -> idx );
-
-                        return status;
-                    }
-                }
-
-                /* revert data fork */
-                KColumnDataFree ( & col -> df,
-                    & self -> pmnew, self -> num_writ );
-		KMD5FileRevert ( self -> col -> df . fmd5 );
-            }
-        }
-    }
-
-    /* remove checksum bytes */
-    self -> num_writ -= col -> csbytes;
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KColumnBlobCommit ( KColumnBlob *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcBlob, rcCommitting, rcSelf, rcNull );
-
-    if ( self -> loc . id_range == 0 )
-        return RC ( rcDB, rcBlob, rcCommitting, rcRange, rcInvalid );
-
-    if ( self -> num_writ == 0 && self -> loc . u . blob . size != 0 )
-        return 0;
-
-    assert ( self -> read_only == false );
-
-    rc = KColumnBlobDoCommit ( self );
-
-    if ( rc == kdbReindex )
-        rc = KColumnReindex ( self -> col );
-
-    return rc;
-}
diff --git a/libs/kdb/wdatabase-priv.h b/libs/kdb/wdatabase-priv.h
deleted file mode 100644
index 958089e..0000000
--- a/libs/kdb/wdatabase-priv.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_database_priv_
-#define _h_database_priv_
-
-#ifndef _h_kdb_manager_
-#include <kdb/manager.h>
-#endif
-
-#ifndef _h_kdb_database_
-#include <kdb/database.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#include <klib/symbol.h>
-#include <kfs/md5.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KDatabase
- *  connection to a database within file system
- */
-struct KDatabase
-{
-    /* manager reference */
-    KDBManager *mgr;
-
-    /* if a sub-directory */
-    KDatabase *dad;
-
-    /* database directory */
-    KDirectory *dir;
-
-    KMD5SumFmt *md5;
-
-    /* open references */
-    KRefcount refcount;
-    uint32_t opencount;
-    bool use_md5;
-    bool read_only;
-
-    KSymbol sym;
-
-    char path [1];
-};
-
-/* Attach
- * Sever
- *  like AddRef/Release, except called internally
- *  indicates that a child object is letting go...
- */
-KDatabase *KDatabaseAttach ( const KDatabase *self );
-rc_t KDatabaseSever ( const KDatabase *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_database_priv_ */
diff --git a/libs/kdb/wdatabase.c b/libs/kdb/wdatabase.c
deleted file mode 100644
index e35b41b..0000000
--- a/libs/kdb/wdatabase.c
+++ /dev/null
@@ -1,1642 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "database-priv.h"
-#include "dbmgr-priv.h"
-#include "wtable-priv.h"
-#include "windex-priv.h"
-#include "wkdb-priv.h"
-#include <klib/namelist.h>
-#include <klib/symbol.h>
-#include <klib/log.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/impl.h>
-#include <kfs/md5.h>
-#include <vfs/manager.h>
-#include <vfs/manager-priv.h>
-#include <vfs/path.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * KDatabase
- *  connection to a database within file system
- */
-
-/* GetPath
- *  return the absolute path to DB
- */
-LIB_EXPORT rc_t CC KDatabaseGetPath ( struct KDatabase const *self,
-    const char **path )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-    if ( path == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    *path = self->path;
-    return 0;
-}
-
-/* Whack
- */
-static
-rc_t KDatabaseWhack ( KDatabase *self )
-{
-    rc_t rc = 0;
-    KDBManager *mgr = self -> mgr;
-    KSymbol * symb;
-    assert ( mgr != NULL );
-
-    KRefcountWhack ( & self -> refcount, "KDatabase" );
-
-    /* release dad */
-    if ( self -> dad != NULL )
-    {
-        rc = KDatabaseSever ( self -> dad );
-        if ( rc != 0 )
-            return rc;
-        self -> dad = NULL;
-    }
-
-    /* shut down md5 sum file if it is open */
-    KMD5SumFmtRelease ( self -> md5 ), self -> md5 = NULL;
-
-    /* remove from mgr */
-    symb = KDBManagerOpenObjectFind (mgr, self->path);
-    if (symb != NULL)
-    {
-        rc = KDBManagerOpenObjectDelete (mgr, symb);
-        if (rc == 0)
-        {
-            /* release manager
-               should never fail */
-            rc = KDBManagerSever ( mgr );
-            if ( rc != 0 )
-                rc = KDBManagerOpenObjectAdd (mgr, symb);
-            else
-            {
-                /* complete */
-                KDirectoryRelease ( self -> dir );
-                free ( self );
-                return 0;
-            }
-        }
-    }
-
-    KRefcountInit ( & self -> refcount, 1, "KDatabase", "whack", "kdb" );
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KDatabaseAddRef ( const KDatabase *cself )
-{
-    KDatabase *self = ( KDatabase* ) cself;
-    if ( cself != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KDatabase" ) )
-        {
-        case krefLimit:
-            return RC ( rcDB, rcDatabase, rcAttaching, rcRange, rcExcessive );
-        }
-        ++ self -> opencount;
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KDatabaseRelease ( const KDatabase *cself )
-{
-    KDatabase *self = ( KDatabase* ) cself;
-    if ( cself != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KDatabase" ) )
-        {
-        case krefWhack:
-            return KDatabaseWhack ( ( KDatabase* ) self );
-        case krefLimit:
-            return RC ( rcDB, rcDatabase, rcReleasing, rcRange, rcExcessive );
-        }
-        -- self -> opencount;
-    }
-    return 0;
-}
-
-
-/* Attach
- */
-KDatabase *KDatabaseAttach ( const KDatabase *cself )
-{
-    KDatabase *self = ( KDatabase* ) cself;
-    if ( cself != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "KDatabase" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return self;
-}
-
-/* Sever
- *  like Release, except called internally
- *  indicates that a child object is letting go...
- */
-rc_t KDatabaseSever ( const KDatabase *cself )
-{
-    KDatabase *self = ( KDatabase* ) cself;
-    if ( cself != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "KDatabase" ) )
-        {
-        case krefWhack:
-            return KDatabaseWhack ( ( KDatabase* ) self );
-        case krefLimit:
-            return RC ( rcDB, rcDatabase, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Make
- *  make an initialized structure
- *  NB - does NOT attach reference to dir, but steals it
- */
-static
-rc_t KDatabaseMake ( KDatabase **dbp, const KDirectory *dir,
-    const char *path, KMD5SumFmt *md5, bool read_only )
-{
-    KDatabase *db;
-    rc_t rc = 0;
-
-    assert ( dbp != NULL );
-    assert ( path != NULL );
-
-    db = malloc ( sizeof * db + strlen ( path ) );
-    if ( db == NULL )
-    {
-        * dbp = NULL;
-        return RC ( rcDB, rcDatabase, rcConstructing, rcMemory, rcExhausted );
-    }
-
-    memset ( db, 0, sizeof * db );
-    db -> dir = ( KDirectory* ) dir;
-    db -> md5 = md5;
-    rc = KMD5SumFmtAddRef ( md5 );
-    db -> cmode = kcmOpen; /* to be set later by the caller */
-    db -> checksum = kcsNone; /* to be set later in VTableColumnCreateParams */
-
-    if ( md5 != NULL )
-        db -> cmode |= kcmMD5;
-
-    KRefcountInit ( & db -> refcount, 1, "KDatabase", "make", path );
-    db -> opencount = 1;
-    db -> read_only = read_only;
-
-    strcpy ( db -> path, path );
-
-    db->sym.u.obj = db;
-    StringInitCString (&db->sym.name, db->path);
-    db->sym.type = kptDatabase;
-
-    * dbp = db;
-    return rc;
-}
-
-static
-rc_t KDatabaseMakeVPath ( KDatabase **dbp, const KDirectory *dir,
-    const VPath *path, KMD5SumFmt *md5, bool read_only )
-{
-    const String* dbpathStr;
-    rc_t rc = VPathMakeString ( path, &dbpathStr );    /* NUL-terminated */
-    if ( rc == 0 )
-    {
-        rc = KDatabaseMake ( dbp, dir, dbpathStr->addr, md5, read_only );
-        StringWhack(dbpathStr);
-    }
-    return rc;
-}
-
-static
-rc_t KDBManagerInsertDatabase ( KDBManager * self, KDatabase * db )
-{
-    rc_t rc;
-    rc = KDBManagerOpenObjectAdd (self, &db->sym);
-    if ( rc == 0 )
-        db -> mgr = KDBManagerAttach ( self );
-    return rc;
-}
-
-
-static
-rc_t KDBManagerMakeDBUpdate ( KDBManager *self,
-    KDatabase **dbp, KDirectory *wd, const char *path, KMD5SumFmt *md5 )
-{
-    rc_t rc;
-    KDirectory *dir;
-
-    rc = KDirectoryOpenDirUpdate ( wd, & dir, false, "%s", path );
-    if ( rc == 0 )
-    {
-        KDatabase *db;
-	    
-        /* Make the base object */
-        rc = KDatabaseMake ( & db, dir, path, md5, false );
-        if ( rc == 0 )
-        {
-            rc = KDBManagerInsertDatabase ( self, db );
-
-            if ( rc == 0 )
-            {
-                * dbp = db;
-                return 0;   /* successful exit */
-            }
-
-            rc = RC ( rcDB, rcMgr, rcOpening, rcDatabase, rcBusy );
-                
-            free ( db );
-        }
-        KDirectoryRelease ( dir );
-    }
-    return rc;
-}
-
-
-/* CreateDB
- * VCreateDB
- *  create a new or open an existing database
- *
- *  "db" [ OUT ] - return parameter for newly opened database
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to database
- */
-static
-rc_t KDBManagerVCreateDBInt ( KDBManager *self,
-    KDatabase **db, KDirectory *wd, KCreateMode cmode,
-    const char *path, va_list args )
-{
-    char dbpath [ 4096 ];
-    rc_t rc = KDirectoryVResolvePath ( wd, true,
-        dbpath, sizeof dbpath, path, args );
-    if ( rc == 0 )
-    {
-        /* we won't try accession resolution here */
-        int type = KDBPathType ( /*NULL,*/ wd, NULL, dbpath );
-        switch ( type )
-        {
-        case kptNotFound:
-            /* first good path */
-            break;
-
-        case kptBadPath:
-            return RC ( rcDB, rcMgr, rcCreating, rcPath, rcInvalid );
-
-        case kptDatabase:
-        case kptDatabase | kptAlias:
-            /* found so is not good if we want to create new and not
-             * clear/init or open old
-             */
-            if ((cmode & kcmValueMask) == kcmCreate)
-                return RC ( rcDB, rcMgr, rcCreating, rcDatabase, rcExists );
-            if (KDBManagerOpenObjectBusy (self, dbpath))
-                return RC ( rcDB, rcMgr, rcCreating, rcDatabase, rcBusy );
-            /* test now for locked directory */
-            rc = KDBWritable ( wd, dbpath );
-            if (rc)
-            {
-                switch (GetRCState(rc))
-                {
-                default:
-                    return rc;
-                case rcLocked:
-                    return RC ( rcDB, rcMgr, rcCreating, rcDatabase, rcLocked );
-                case rcReadonly:
-                    return RC ( rcDB, rcMgr, rcCreating, rcDatabase, rcReadonly );
-                case rcNotFound:
-                    /* not found is good but probably unreachable */
-                    break;
-                case 0:
-                    rc = 0;
-                    break;
-                }
-            }
-            /* second good path */
-            break;
-
-        case kptTable:
-        case kptTable | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcTable, rcExists);
-
-        case kptColumn:
-        case kptColumn | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcColumn, rcExists);
-
-        case kptIndex:
-        case kptIndex | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcIndex, rcExists);
-
-        case kptMetadata:
-        case kptMetadata | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcMetadata, rcExists);
-
-	case kptFile:
-	case kptFile | kptAlias:
-	    /* if we find a file, vary the failure if it is an archive that is a database
-	     * or a non related file */
-	    if ( KDBOpenPathTypeRead ( self, wd, dbpath, NULL, kptDatabase, NULL, false ) == 0 )
-		return RC ( rcDB, rcMgr, rcCreating, rcDirectory, rcUnauthorized );
-	    /* fall through */
-        default:
-            return RC ( rcDB, rcMgr, rcCreating, rcPath, rcIncorrect );
-        }
-
-        /* [re]create directory */
-        rc = KDirectoryCreateDir ( wd, 0775, cmode, "%s", dbpath );
-        if (rc == 0)
-            /* create tbl subdirectory as required for db */
-            rc = KDirectoryCreateDir ( wd, 0775, kcmOpen, "%s/tbl", dbpath );
-
-        if ( rc == 0 )
-        {
-            KMD5SumFmt *md5 = NULL;
-
-            if ( ( cmode & kcmMD5 ) != 0 )
-            {
-                KFile * f;
-
-                /* if needed create the md5 digest file */
-                rc = KDirectoryCreateFile ( wd, &f, true, 0664, kcmOpen, "%s/md5", dbpath );
-                if ( rc == 0 )
-                {
-                    /* create a formatter around file
-                       formatter will own "f" afterward */
-                    rc = KMD5SumFmtMakeUpdate ( & md5, f );
-
-                    /* if failed to create formatter, release "f" */
-                    if ( rc != 0 )
-                        KFileRelease ( f );
-                }
-            }
-
-            if ( rc == 0 )
-                rc = KDBManagerMakeDBUpdate ( self, db, wd, dbpath, md5 );
-            /* TODO: for now set cmode here, externally to KDatabaseMake
-                maybe it's needed to refactor the whole chain from exported
-                Open/Create DB functions to the KDatabaseMake
-            */
-            if ( rc == 0 )
-                KDatabaseSetCmode ( *db, cmode );
-
-            KMD5SumFmtRelease ( md5 );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerVCreateDB ( KDBManager *self,
-    KDatabase **db, KCreateMode cmode, const char *path, va_list args )
-{
-    if ( db == NULL )
-        return RC ( rcDB, rcMgr, rcCreating, rcParam, rcNull );
-
-    * db = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcCreating, rcSelf, rcNull );
-
-    return KDBManagerVCreateDBInt ( self, db, self -> wd, cmode, path, args );
-}
-
-
-LIB_EXPORT rc_t CC KDBManagerCreateDB ( KDBManager *self,
-    KDatabase **db, KCreateMode cmode, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDBManagerVCreateDB ( self, db, cmode, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* =====
- * create a KDatabase as a sub of another KDatabase
- */
-LIB_EXPORT rc_t CC KDatabaseCreateDB ( KDatabase *self,
-    KDatabase **db, KCreateMode cmode, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVCreateDB ( self, db, cmode, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseVCreateDB ( KDatabase *self,
-    KDatabase **dbp, KCreateMode cmode, const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    if ( dbp == NULL )
-        return RC ( rcDB, rcDatabase, rcCreating, rcParam, rcNull );
-
-    * dbp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcCreating, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcDatabase, rcCreating, rcDatabase, rcReadonly );
-
-    rc = KDBVMakeSubPath ( self -> dir,
-        path, sizeof path, "db", 2, name, args );
-    if ( rc == 0 )
-    {
-        /* ensure that the "db" namespace directory is there */
-        rc = KDirectoryCreateDir ( self -> dir,
-            0775, kcmOpen, "db" );
-        if ( rc == 0 )
-        {
-            rc = KDBManagerVCreateDBInt ( self -> mgr, dbp,
-                                          self -> dir, cmode, path, NULL );
-            if ( rc == 0 )
-            {
-                KDatabase *db = ( KDatabase* ) * dbp;
-                db -> dad = self;
-                atomic32_inc ( & self -> refcount );
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/* OpenDBRead
- * VOpenDBRead
- *  open a database for read
- *
- *  "db" [ OUT ] - return parameter for newly opened database
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to database
- */
-static
-rc_t KDBManagerVOpenDBReadInt ( const KDBManager *cself,
-    const KDatabase **dbp, KDirectory *wd,
-    const char *path, va_list args, bool *cached, bool try_srapath )
-{
-    char key_path[ 4096 ];
-	char short_path[ 4096 ];
-	size_t z;
-	rc_t rc = string_vprintf( short_path, sizeof short_path, &z, path, args );
-	if ( rc == 0 )
-		rc = KDirectoryResolvePath ( wd, true, key_path, sizeof key_path, short_path );
-    if ( rc == 0 )
-    {
-        KSymbol *sym;
-
-        /* if already open */
-        sym = KDBManagerOpenObjectFind( cself, key_path );
-        if ( sym != NULL )
-        {
-            const KDatabase *cdb;
-            rc_t obj;
-
-            if ( cached != NULL )
-                * cached = true;
-
-            switch (sym->type)
-            {
-            case kptDatabase:
-                cdb = (KDatabase*)sym->u.obj;
-                /* if open for update, refuse */
-                if ( cdb -> read_only )
-                {
-                    /* attach a new reference and we're gone */
-                    rc = KDatabaseAddRef ( cdb );
-                    if ( rc == 0 )
-                        * dbp = cdb;
-                    return rc;
-                }
-                obj = rcDatabase;
-                break;
-
-            default:
-                obj = rcPath;
-                break;
-            case kptTable:
-                obj = rcTable;
-                break;
-            case kptColumn:
-                obj = rcColumn;
-                break;
-            case kptIndex:
-                obj = rcIndex;
-                break;
-            case kptMetadata:
-                obj = rcMetadata;
-                break;
-            }
-            rc = RC (rcDB, rcMgr, rcOpening, obj, rcBusy);
-        }
-        else
-        {
-			const KDirectory *dir;
-
-			if ( cached != NULL )
-				* cached = false;
-
-			/* open the directory if its a database */
-			rc = KDBOpenPathTypeRead ( cself, wd, short_path, &dir, kptDatabase, NULL, try_srapath );
-			if ( rc == 0 )
-			{
-				KDatabase *db;
-
-				rc = KDatabaseMake ( &db, dir, key_path, NULL, true );
-				if ( rc == 0 )
-				{
-					KDBManager *self = ( KDBManager* ) cself;
-
-					rc = KDBManagerInsertDatabase ( self, db );
-					if ( rc == 0 )
-					{
-						* dbp = db;
-						return 0;
-					}
-					free (db);
-				}
-				KDirectoryRelease (dir);
-			}
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDBManagerOpenDBRead ( const KDBManager *self,
-    const KDatabase **db, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDBManagerVOpenDBRead ( self, db, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerVOpenDBRead ( const KDBManager *self,
-    const KDatabase **db, const char *path, va_list args )
-{
-    if ( db == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcParam, rcNull );
-
-    * db = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcSelf, rcNull );
-
-    return KDBManagerVOpenDBReadInt ( self, db, self -> wd, path, args, NULL, true );
-}
-
-LIB_EXPORT rc_t CC KDatabaseOpenDBRead ( const KDatabase *self,
-    const KDatabase **db, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVOpenDBRead ( self, db, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseVOpenDBRead ( const KDatabase *self,
-    const KDatabase **dbp, const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    if ( dbp == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcParam, rcNull );
-
-    * dbp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcSelf, rcNull );
-
-    rc = KDBVMakeSubPath ( self -> dir,
-        path, sizeof path, "db", 2, name, args );
-    if ( rc == 0 )
-    {
-        bool is_cached;
-        rc = KDBManagerVOpenDBReadInt ( self -> mgr, dbp,
-                                        self -> dir, path, NULL, & is_cached, false );
-        if ( rc == 0 && ! is_cached )
-        {
-            KDatabase *db = ( KDatabase* ) * dbp;
-            db -> dad = KDatabaseAttach ( self );
-        }
-    }
-
-    return rc;
-}
-
-
-/* OpenDBUpdate
- * VOpenDBUpdate
- *  open a database for read/write
- *
- *  "db" [ OUT ] - return parameter for newly opened database
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to database
- */
-static
-rc_t KDBManagerVOpenDBUpdateInt ( KDBManager *self,
-    KDatabase **db, KDirectory *wd, const char *path, va_list args )
-{
-    char dbpath [ 4096 ];
-    rc_t rc = KDirectoryVResolvePath ( wd, true,
-        dbpath, sizeof dbpath, path, args );
-    if ( rc == 0 )
-    {
-        KSymbol * sym;
-        KFile *f;
-        KMD5SumFmt * md5 = NULL;
-
-        /* if already open, refuse */
-        sym = KDBManagerOpenObjectFind (self, dbpath);
-        if (sym != NULL)
-        {
-            rc_t obj;
-            switch (sym->type)
-            {
-            default:
-                obj = rcPath;
-                break;
-            case kptDatabase:
-                obj = rcDatabase;
-                break;
-            case kptTable:
-                obj = rcTable;
-                break;
-            case kptColumn:
-                obj = rcColumn;
-                break;
-            case kptIndex:
-                obj = rcIndex;
-                break;
-            case kptMetadata:
-                obj = rcMetadata;
-                break;
-            }
-            return RC ( rcDB, rcMgr, rcOpening, obj, rcBusy );
-        }
-        /* only open existing dbs */
-        switch (KDBPathType ( /*self,*/ wd, NULL, dbpath ) )
-        {
-        case kptNotFound:
-            return RC ( rcDB, rcMgr, rcOpening, rcDatabase, rcNotFound );
-        case kptBadPath:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcInvalid );
-	case kptFile:
-	case kptFile | kptAlias:
-	    /* if we find a file, vary the failure if it is an archive that is a database
-	     * or a non related file */
-	    if ( KDBOpenPathTypeRead ( self, wd, dbpath, NULL, kptDatabase, NULL, false ) == 0 )
-		return RC ( rcDB, rcMgr, rcOpening, rcDirectory, rcUnauthorized );
-	    /* fall through */
-        default:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcIncorrect );
-        case kptDatabase:
-        case kptDatabase | kptAlias:
-            break;
-        }
-
-        /* test now for locked directory */
-        rc = KDBWritable (wd, dbpath);
-        switch (GetRCState (rc))
-        {
-        default:
-#if 0
-            return RC ( rcDB, rcMgr, rcOpening, rcDatabase, rcNoPerm ); /* TBD: better state? */
-#endif
-
-        case rcLocked:
-            return RC ( rcDB, rcMgr, rcOpening, rcDatabase, rcLocked );
-
-        case rcReadonly:
-            return RC ( rcDB, rcMgr, rcOpening, rcDatabase, rcReadonly );
-
-
-        case 0:
-            rc = 0;
-            break;
-        }
-
-        rc = KDirectoryOpenFileWrite ( wd, &f, true, "%s/md5", dbpath );
-        if ( rc == 0 )
-        {
-            rc = KMD5SumFmtMakeUpdate ( & md5, f );
-            if ( rc != 0 )
-                KFileRelease ( f );
-        }
-        else if ( GetRCState ( rc ) == rcNotFound )
-            rc = 0;
-
-        if ( rc == 0 )
-            rc = KDBManagerMakeDBUpdate ( self, db, wd, dbpath, md5 );
-
-        KMD5SumFmtRelease ( md5 );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerOpenDBUpdate ( KDBManager *self,
-    KDatabase **db, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDBManagerVOpenDBUpdate ( self, db, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerVOpenDBUpdate ( KDBManager *self,
-    KDatabase **db, const char *path, va_list args )
-{
-    if ( db == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcParam, rcNull );
-
-    * db = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcSelf, rcNull );
-
-    return KDBManagerVOpenDBUpdateInt ( self, db, self -> wd, path, args );
-}
-
-LIB_EXPORT rc_t CC KDatabaseOpenDBUpdate ( KDatabase *self,
-    KDatabase **db, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVOpenDBUpdate ( self, db, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseVOpenDBUpdate ( KDatabase *self,
-    KDatabase **dbp, const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    if ( dbp == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcParam, rcNull );
-
-    * dbp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcDatabase, rcOpening, rcDatabase, rcReadonly );
-
-    rc = KDBVMakeSubPath ( self -> dir,
-        path, sizeof path, "db", 2, name, args );
-    if ( rc == 0 )
-    {
-        rc = KDBManagerVOpenDBUpdateInt ( self -> mgr, dbp,
-                                         self -> dir, path, NULL );
-        if ( rc == 0 )
-        {
-            KDatabase *db = ( KDatabase* ) * dbp;
-            db -> dad = self;
-            atomic32_inc ( & self -> refcount );
-        }
-    }
-
-    return rc;
-}
-
-
-/* Locked
- *  returns non-zero if locked
- */
-LIB_EXPORT bool CC KDatabaseLocked ( const KDatabase *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return false;
-
-    rc = KDBWritable ( self -> dir, "." );
-    return GetRCState ( rc ) == rcLocked;
-}
-
-/* Exists
- *  returns true if requested object exists
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptTable
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT bool CC KDatabaseVExists ( const KDatabase *self, uint32_t type, const char *name, va_list args )
-{
-    if ( self != NULL && name != NULL && name [ 0 ] != 0 )
-    {
-        rc_t rc;
-        size_t len;
-        const char *ns;
-        char path [ 256 ];
-
-        switch ( type )
-        {
-        case kptDatabase:
-            ns = "db";
-            len = 2;
-            break;
-
-        case kptTable:
-            ns = "tbl";
-            len = 3;
-            break;
-
-        case kptIndex:
-            ns = "idx";
-            len = 3;
-            break;
-
-        default:
-            return false;
-        }
-
-        rc = KDBVMakeSubPath ( self -> dir, path, sizeof path, ns, len, name, args );
-        if ( rc == 0 )
-        {
-            switch ( KDirectoryPathType ( self -> dir, "%s", path ) )
-            {
-            case kptFile:
-            case kptDir:
-            case kptFile | kptAlias:
-            case kptDir | kptAlias:
-                return true;
-            }
-        }
-    }
-    return false;
-}
-
-LIB_EXPORT bool CC KDatabaseExists ( const KDatabase *self, uint32_t type, const char *name, ... )
-{
-    bool exists;
-
-    va_list args;
-    va_start ( args, name );
-
-    exists = KDatabaseVExists ( self, type, name, args );
-
-    va_end ( args );
-
-    return exists;
-}
-
-
-/* IsAlias
- *  returns true if object name is an alias
- *  returns path to fundamental name if it was aliased
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - optional output buffer
- *  for fundamenta object name if "alias" is not a fundamental name, 
- *
- *  "name" [ IN ] - NUL terminated object name
- */
-LIB_EXPORT bool CC KDatabaseIsAlias ( const KDatabase *self, uint32_t type,
-    char *resolved, size_t rsize, const char *name )
-{
-    if ( self != NULL && name != NULL && name [ 0 ] != 0 )
-    {
-        rc_t rc;
-        size_t len;
-        const char *ns;
-        char path [ 256 ];
-
-        switch ( type )
-        {
-        case kptDatabase:
-            ns = "db";
-            len = 2;
-            break;
-
-        case kptTable:
-            ns = "tbl";
-            len = 3;
-            break;
-
-        case kptIndex:
-            ns = "idx";
-            len = 3;
-            break;
-
-        default:
-            return false;
-        }
-
-        rc = KDBMakeSubPath ( self -> dir, path, sizeof path, ns, len, name );
-        if ( rc == 0 )
-        {
-            switch ( KDirectoryPathType ( self -> dir, "%s", path ) )
-            {
-            case kptFile | kptAlias:
-            case kptDir | kptAlias:
-                if ( resolved != NULL && rsize != 0 )
-                {
-                    const KDirectory *sub;
-                    rc = KDirectoryOpenDirRead ( self -> dir, & sub, false, "%s", ns );
-                    * resolved = 0;
-                    if ( rc != 0 )
-                        PLOGERR ( klogWarn, ( klogWarn, rc, "failed to open subdirectory '$(sub)'", "sub=%s", ns ) );
-                    else
-                    {
-                        rc = KDirectoryResolveAlias ( sub, false, resolved, rsize, "%s", name );
-                        KDirectoryRelease ( sub );
-                        if ( rc != 0 )
-                            PLOGERR ( klogWarn, ( klogWarn, rc, "failed to resolve alias '$(alias)'", "alias=%s", name ) );
-                    }
-                }
-                return true;
-            }
-        }
-    }
-
-    if ( resolved != NULL && rsize != 0 )
-        * resolved = 0;
-
-    return false;
-}
-
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-static
-rc_t KDatabaseLockInt (const KDatabase  * self, char * path, size_t path_size,
-                        int type, const char * name, va_list args )
-{
-    rc_t rc;
-
-    if (self == NULL)
-        rc = RC ( rcDB, rcMgr, rcAccessing, rcSelf, rcNull );
-
-    else if (name == NULL)
-        rc =  RC (rcDB, rcMgr, rcAccessing, rcPath, rcNull);
-
-    else
-    {
-        const char * ns;
-        char path [ 256 ];
-
-        ns = KDBGetNamespaceString (type);
-
-        switch (type)
-        {
-        default:
-            rc = RC (rcDB, rcMgr, rcAccessing, rcParam, rcInvalid);
-            break;
-        case kptDatabase:
-        case kptTable:
-/*         case kptIndex: */
-            rc = KDBVMakeSubPath (self->dir, path, sizeof path, ns, strlen (ns),
-                                  name, args);
-            break;
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseVWritable ( const KDatabase *self, uint32_t type, const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    rc = KDatabaseLockInt (self, path, sizeof path, type, name, args);
-    if (rc == 0)
-        rc = KDBWritable (self->dir, path);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseWritable ( const KDatabase *self, uint32_t type, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVWritable ( self, type, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* Lock
- *  apply lock
- *
- *  if object is already locked, the operation is idempotent
- *  and returns an rc state of rcLocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC KDatabaseVLock ( KDatabase *self, uint32_t type, const char *name, va_list args )
-{
-    rc_t rc = 0;
-    char path [ 256 ];
-
-    rc = KDatabaseLockInt (self, path, sizeof path, type, name, args);
-    if (rc == 0)
-        rc = KDBLockDir (self->dir, path);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseLock ( KDatabase *self, uint32_t type, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVLock (self, type, name, args);
-    va_end (args);
-    return rc;
-}
-
-
-/* Unlock
- *  remove lock
- *
- *  if object is already unlocked, the operation is idempotent
- *  and returns an rc state of rcUnlocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC KDatabaseVUnlock ( KDatabase *self, uint32_t type, const char *name, va_list args )
-{
-    rc_t rc = 0;
-    char path [ 256 ];
-
-    rc = KDatabaseLockInt (self, path, sizeof path, type, name, args);
-    if (rc == 0)
-        rc = KDBUnlockDir (self->dir, path);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseUnlock ( KDatabase *self, uint32_t type, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-    va_start ( args, name );
-    rc = KDatabaseVUnlock (self, type, name, args);
-    va_end (args);
-    return rc;
-}
-
-
-/* Rename
- */
-LIB_EXPORT rc_t CC KDatabaseRenameDB ( KDatabase *self, bool force, const char *from, const char *to )
-{
-    return KDBRename ( self -> dir, self -> mgr, kptDatabase, force, from, to );
-}
-
-LIB_EXPORT rc_t CC KDatabaseRenameTable ( KDatabase *self, bool force, const char *from, const char *to )
-{
-    return KDBRename ( self -> dir, self -> mgr, kptTable, force, from, to );
-}
-
-#if 1
-LIB_EXPORT rc_t CC KDatabaseRenameIndex ( KDatabase *self, bool force, const char *from, const char *to )
-{
-    return KDBRename ( self -> dir, self -> mgr, kptIndex, force, from, to );
-}
-#endif
-
-/* Alias
- */
-LIB_EXPORT rc_t CC KDatabaseAliasDB ( KDatabase *self, const char *db, const char *alias )
-{
-    return KDBAlias ( self -> dir, kptDatabase, db, alias );
-}
-
-LIB_EXPORT rc_t CC KDatabaseAliasTable ( KDatabase *self, const char *tbl, const char *alias )
-{
-    return KDBAlias ( self -> dir, kptTable, tbl, alias );
-}
-
-LIB_EXPORT rc_t CC KDatabaseAliasIndex ( KDatabase *self, const char *idx, const char *alias )
-{
-    return KDBAlias ( self -> dir, kptIndex, idx, alias );
-}
-
-/* Drop
- */
-
-LIB_EXPORT rc_t CC KDatabaseDropDB ( KDatabase *self, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVDropDB ( self, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseVDropDB ( KDatabase *self, const char *name, va_list args )
-{
-    return KDBVDrop ( self -> dir, self -> mgr, kptDatabase, name, args );
-}
-
-LIB_EXPORT rc_t CC KDatabaseDropTable ( KDatabase *self, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVDropTable ( self, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseVDropTable ( KDatabase *self, const char *name, va_list args )
-{
-    return KDBVDrop ( self -> dir, self -> mgr, kptTable, name, args );
-}
-
-#if 1
-LIB_EXPORT rc_t CC KDatabaseDropIndex ( KDatabase *self, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVDropIndex ( self, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseVDropIndex ( KDatabase *self, const char *name, va_list args )
-{
-    return KDBVDrop ( self -> dir, self -> mgr, kptIndex, name, args );
-}
-#endif
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC KDatabaseOpenManagerRead ( const KDatabase *self, const KDBManager **mgr )
-{
-    rc_t rc;
-
-    if ( mgr == NULL )
-        rc = RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDBManagerAddRef ( self -> mgr );
-            if ( rc == 0 )
-            {
-                * mgr = self -> mgr;
-                return 0;
-            }
-        }
-
-        * mgr = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseOpenManagerUpdate ( KDatabase *self, KDBManager **mgr )
-{
-    rc_t rc;
-
-    if ( mgr == NULL )
-        rc = RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDBManagerAddRef ( self -> mgr );
-            if ( rc == 0 )
-            {
-                * mgr = self -> mgr;
-                return 0;
-            }
-        }
-
-        * mgr = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenParent
- *  duplicate reference to parent database
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC KDatabaseOpenParentRead ( const KDatabase *self, const KDatabase **par )
-{
-    rc_t rc;
-
-    if ( par == NULL )
-        rc = RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDatabaseAddRef ( self -> dad );
-            if ( rc == 0 )
-            {
-                * par = self -> dad;
-                return 0;
-            }
-        }
-
-        * par = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseOpenParentUpdate ( KDatabase *self, KDatabase **par )
-{
-    rc_t rc;
-
-    if ( par == NULL )
-        rc = RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else if ( self -> dad != NULL && self -> dad -> read_only )
-            rc = RC ( rcDB, rcDatabase, rcAccessing, rcDatabase, rcReadonly );
-        else
-        {
-            rc = KDatabaseAddRef ( self -> dad );
-            if ( rc == 0 )
-            {
-                * par = self -> dad;
-                return 0;
-            }
-        }
-
-        * par = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenDirectory
- *  access the directory in use
- */
-LIB_EXPORT rc_t CC KDatabaseOpenDirectoryRead ( const KDatabase *self, const KDirectory **dir )
-{
-    rc_t rc;
-
-    if ( dir == NULL )
-        rc = RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * dir = self -> dir;
-            return KDirectoryAddRef ( * dir );
-        }
-
-        * dir = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseOpenDirectoryUpdate ( KDatabase *self, KDirectory **dir )
-{
-    rc_t rc;
-
-    if ( dir == NULL )
-        rc = RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-         else if ( self -> dir != NULL && self -> dir -> read_only )
-             rc = RC ( rcDB, rcDatabase, rcAccessing, rcDirectory, rcReadonly );
-        else
-        {
-            * dir = self -> dir;
-            return KDirectoryAddRef ( * dir );
-        }
-
-        * dir = NULL;
-    }
-
-    return rc;
-}
-
-
-/* ModDate
- *  get modification date
- */
-LIB_EXPORT rc_t CC KDatabaseModDate ( const KDatabase *self, KTime_t *mtime )
-{
-    rc_t rc;
-
-    if ( mtime == NULL )
-        rc = RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self != NULL )
-            return KDBGetObjModDate ( self -> dir, mtime );
-
-        rc = RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        * mtime = 0;
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KNamelist
- */
-
-/* List
- *  create database listings
- */
-struct FilterData
-{
-    const KDBManager * mgr;
-    int type;
-};
-
-static
-bool CC KDatabaseListFilter ( const KDirectory *dir, const char *name, void *data_ )
-{
-    struct FilterData * data = data_;
-    return ( KDBOpenPathTypeRead ( data->mgr, dir, name, NULL, data->type, NULL, false ) == 0 );
-}
-
-LIB_EXPORT rc_t CC KDatabaseListDB ( const KDatabase *self, KNamelist **names )
-{
-    if ( self != NULL )
-    {
-        struct FilterData data;
-        data.mgr = self->mgr;
-        data.type = kptDatabase;
-
-        return KDirectoryList ( self -> dir,
-            names, KDatabaseListFilter, &data, "db" );
-    }
-
-    if ( names != NULL )
-        * names = NULL;
-
-    return RC ( rcDB, rcDatabase, rcListing, rcSelf, rcNull );
-}
-
-LIB_EXPORT rc_t CC KDatabaseListTbl ( struct KDatabase const *self, KNamelist **names )
-{
-    if ( self != NULL )
-    {
-        struct FilterData data;
-        data.mgr = self->mgr;
-        data.type = kptTable;
-
-        return KDirectoryList ( self -> dir,
-            names, KDatabaseListFilter, &data, "tbl" );
-    }
-
-    if ( names != NULL )
-        * names = NULL;
-
-    return RC ( rcDB, rcDatabase, rcListing, rcSelf, rcNull );
-}
-
-LIB_EXPORT rc_t CC KDatabaseListIdx ( struct KDatabase const *self, KNamelist **names )
-{
-    if ( self != NULL )
-    {
-        struct FilterData data;
-        data.mgr = self->mgr;
-        data.type = kptIndex;
-
-        return KDirectoryList ( self -> dir,
-            names, KDatabaseListFilter, &data, "idx" );
-    }
-
-    if ( names != NULL )
-        * names = NULL;
-
-    return RC ( rcDB, rcDatabase, rcListing, rcSelf, rcNull );
-}
-
-LIB_EXPORT rc_t CC KDBManagerVPathOpenLocalDBRead ( struct KDBManager const * self,
-    struct KDatabase const ** p_db, struct VPath const * vpath )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-    if ( p_db == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    if ( vpath == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-        
-    {   
-        /* vpath has already been resolved and is known to be a local path. 
-           open it if it is a database; avoid an additional round of resolution */
-        const KDirectory *dir;
-        rc_t rc = VFSManagerOpenDirectoryReadDirectoryRelativeDecrypt ( self -> vfsmgr, self -> wd, &dir, vpath );
-        if ( rc == 0 )
-        {
-            if ( ( (~kptAlias) & KDBPathType ( dir, NULL, "." ) ) != kptDatabase )
-            {
-                rc = RC ( rcDB, rcMgr, rcOpening, rcDatabase, rcIncorrect );
-            }
-            else
-            {
-                KDatabase *db;
-
-                rc = KDatabaseMakeVPath ( & db, dir, vpath, NULL, true );
-                if ( rc == 0 )
-                {
-                    rc = KDBManagerInsertDatabase ( ( KDBManager* ) self, db );
-                    if ( rc == 0 )
-                    {
-                        * p_db = db;
-                        return 0;
-                    }
-                    free (db);
-                }
-            }
-
-            KDirectoryRelease ( dir );
-        }
-        return rc;
-    }
-} 
-
-LIB_EXPORT rc_t CC KDBManagerVPathOpenRemoteDBRead ( struct KDBManager const * self,
-    struct KDatabase const ** p_db, struct VPath const * remote, struct VPath const * cache )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-    if ( p_db == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    if ( remote == NULL )
-        return RC ( rcDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    /* cache == NULL is OK */    
-    
-    {   
-        /*  vpath has already been resolved and is known to be a remote URL. 
-            Open it if it is a database; use the provided cache; avoid an additional round of resolution */
-        const KDirectory *dir;
-        rc_t rc = VFSManagerOpenDirectoryReadDecryptRemote( self -> vfsmgr, &dir, remote, cache );
-        if ( rc == 0 )
-        {
-            if ( ( (~kptAlias) & KDBPathType ( dir, NULL, "." ) ) != kptDatabase )
-            {
-                rc = RC ( rcDB, rcMgr, rcOpening, rcDatabase, rcIncorrect );
-            }
-            else
-            {
-                KDatabase *db;
-
-                /* allocate a new guy */
-                rc = KDatabaseMakeVPath ( & db, dir, remote, NULL, true );
-                if ( rc == 0 )
-                {
-                    rc = KDBManagerInsertDatabase ( ( KDBManager* ) self, db );
-                    if ( rc == 0 )
-                    {
-                        * p_db = db;
-                        return 0;
-                    }
-                    free (db);
-                }
-            }
-
-            KDirectoryRelease ( dir );
-        }
-        return rc;
-    }
-}
-
-KCreateMode KDatabaseGetCmode ( const KDatabase *self)
-{
-    return self -> cmode;
-}
-KCreateMode KDatabaseSetCmode ( KDatabase *self, KCreateMode new_val)
-{
-    KCreateMode old_val = self -> cmode;
-    self -> cmode = new_val;
-    return old_val;
-}
-
-KChecksum KDatabaseGetChecksum ( const KDatabase *self)
-{
-    return self -> checksum;
-}
-KChecksum KDatabaseSetChecksum ( KDatabase *self, KChecksum new_val)
-{
-    KCreateMode old_val = self -> checksum;
-    self -> checksum = new_val;
-    return old_val;
-}
diff --git a/libs/kdb/wdbmgr.c b/libs/kdb/wdbmgr.c
deleted file mode 100644
index 045dab8..0000000
--- a/libs/kdb/wdbmgr.c
+++ /dev/null
@@ -1,421 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define TRACK_REFERENCES 0
-
-#include <kdb/extern.h>
-#include "libkdb.vers.h"
-#include "dbmgr-priv.h"
-#include "wkdb-priv.h"
-#include <kfs/impl.h>
-
-#include <vfs/manager.h>
-#include <vfs/resolver.h>
-#include <vfs/path.h>
-#include <vfs/path-priv.h>
-
-#include <klib/symbol.h>
-#include <klib/checksum.h>
-#include <klib/rc.h>
-
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <string.h>
-#include <stdlib.h>
-#include <assert.h>
-
-
-
-/*--------------------------------------------------------------------------
- * KDBManager
- *  handle to library
- */
-
-
-/* MakeUpdate
- *  create library handle
- */
-LIB_EXPORT rc_t CC KDBManagerMakeUpdate ( KDBManager **mgrp, KDirectory *wd )
-{
-    if ( wd == NULL || ! wd -> read_only )
-        return KDBManagerMake ( mgrp, wd, "make-update", NULL );
-
-    if ( mgrp != NULL )
-        * mgrp = NULL;
-
-    return RC ( rcDB, rcMgr, rcConstructing, rcDirectory, rcReadonly );
-}
-
-LIB_EXPORT rc_t CC KDBManagerMakeUpdateWithVFSManager (
-    KDBManager ** mgrp, KDirectory * wd, struct VFSManager * vfs )
-{
-    if ( wd == NULL || ! wd -> read_only )
-        return KDBManagerMake ( mgrp, wd, "make-update", vfs );
-
-    if ( mgrp != NULL )
-        * mgrp = NULL;
-
-    return RC ( rcDB, rcMgr, rcConstructing, rcDirectory, rcReadonly );
-}
-
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "path" [ IN ] - NUL terminated path
- *
- * TBD: Better reasons for non local paths
- */
-static
-rc_t KDBManagerWritableInt ( const KDirectory * dir, const char * path )
-{
-    rc_t rc;
-
-    int type = KDBPathType ( /*NULL,*/ dir, NULL, path ) & ~ kptAlias;
-    switch ( type )
-    {
-    case kptDatabase:
-    case kptTable:
-    case kptPrereleaseTbl:
-    case kptColumn:
-        rc = KDBWritable ( dir, path );
-        break;
-
-    case kptIndex:
-    case kptMetadata:
-        /* a wrong database type */
-        rc = RC ( rcDB, rcMgr, rcAccessing, rcPath, rcIncorrect );
-        break;
-#if 0
-        /*TBD - eventually we need to check for an archive here */
-    case kptFile: 
-        /* check if this is an archive .tar or .sra and return rcReadonly if it is */
-#endif
-    case kptNotFound:
-        rc = RC ( rcDB, rcMgr, rcAccessing, rcPath, rcNotFound );
-        break;
-    case kptBadPath:
-        rc = RC ( rcDB, rcMgr, rcAccessing, rcPath, rcInvalid );
-        break;
-    default:
-        rc = RC ( rcDB, rcMgr, rcAccessing, rcPath, rcIncorrect );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerVWritable ( const KDBManager *self, const char * path, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcDB, rcMgr, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        char dbpath [ 4096 ];
-
-        /* get full path to object */
-        rc = KDirectoryVResolvePath ( self -> wd, true, dbpath, sizeof dbpath, path, args );
-        if ( rc == 0 )
-            rc = KDBManagerWritableInt ( self -> wd, dbpath );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerWritable ( const KDBManager *self, const char * path, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, path );
-
-    rc = KDBManagerVWritable ( self, path, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-/* Lock
- *  apply lock
- *
- *  if object is already locked, the operation is idempotent
- *  and returns an rc state of rcLocked
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC KDBManagerVLock ( KDBManager *self, const char *path, va_list args )
-{
-    rc_t rc;
-    char full [ 4096 ];
-
-    if ( self == NULL )
-        rc =  RC ( rcDB, rcMgr, rcLocking, rcSelf, rcNull );
-    else
-    {
-        /* TBD:
-           Add code to validate that this path is not in a container
-           object's control.  That is the last facet in the path
-           is the name of the object.  To be valid the facet before
-           must not be "col", "tbl", or "db" as in those cases
-           the KDBManager should not be called for this object but 
-           its containing object
-        */
-
-        /* get full path to object */
-        rc = KDirectoryVResolvePath ( self -> wd, true,
-            full, sizeof full, path, args );
-        if ( rc == 0 )
-        {
-            /* if the path is not writable because it is already locked
-             * the return from this will contain "rcLocked" and the 
-             * caller will be forced to check for zero or RCState(rcLocked)
-             *
-             * a side effect is that if the call does not return 0 it will
-             * be a wrong type to lock with the DBManager
-             */
-            rc = KDBManagerWritableInt ( self -> wd, full );
-            if ( rc == 0 )
-            {
-                rc = KDBManagerCheckOpen ( self, full );
-                if ( rc == 0 )
-                    rc = KDBLockDir ( self -> wd, full );
-            }
-        }
-
-        /* return dbmgr context */
-        if ( rc != 0 )
-            rc = ResetRCContext ( rc, rcDB, rcMgr, rcLocking );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerLock ( KDBManager *self, const char *path, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, path );
-
-    rc = KDBManagerVLock ( self, path, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-/* Unlock
- *  remove lock
- *
- *  if object is already unlocked, the operation is idempotent
- *  and returns an rc state of rcUnlocked
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC KDBManagerVUnlock ( KDBManager *self, const char *path, va_list args )
-{
-    rc_t rc;
-    char full [ 4096 ];
-
-    if ( self == NULL )
-        rc =  RC ( rcDB, rcMgr, rcUnlocking, rcSelf, rcNull );
-    else
-    {
-        /* get full path to object */
-        rc = KDirectoryVResolvePath ( self -> wd, true,
-            full, sizeof full, path, args );
-        if ( rc == 0 )
-        {
-            /* TBD:
-               Add code to validate that this path is not in a container
-               object's control.  That is the last facet in the path
-               is the name of the object.  To be valid the facet before
-               must not be "col", "tbl", or "db" as in those cases
-               the KDBManager should not be called for this object but 
-               its containing object
-            */
-
-            /* if the path is not writable because it is already locked
-             * we attempt to unlock it.
-             *
-             * if the return is 0 from Writable than it was already 
-             * unlocked so we say so and thus again the
-             * the return from this will contain "rcLocked" and the 
-             * caller will be forced to check for zero or RCState(rcUnlocked)
-             *
-             * a side effect is that if the call does not return 0 it will
-             * be a wrong type to lock with the DBManager
-             */
-            rc = KDBManagerWritableInt ( self -> wd, full );
-            if ( rc == 0 )
-                rc = RC ( rcDB, rcMgr, rcUnlocking, rcLock, rcUnlocked );
-            else if ( GetRCState ( rc ) == rcLocked )
-            {
-                rc = KDBManagerCheckOpen ( self, full );
-                if ( rc == 0 )
-                    rc = KDBUnlockDir ( self -> wd, full );
-            }
-        }
-
-        if ( rc != 0 )
-            rc = ResetRCContext ( rc, rcDB, rcMgr, rcUnlocking );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerUnlock ( KDBManager *self, const char *path, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, path );
-
-    rc = KDBManagerVUnlock ( self, path, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerVDrop ( KDBManager *self, uint32_t obj_type, const char *path, va_list args )
-{
-    return KDBMgrVDrop ( self -> wd, self, obj_type, path, args );
-}
-
-LIB_EXPORT rc_t CC KDBManagerDrop ( KDBManager *self, uint32_t obj_type, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDBManagerVDrop ( self, obj_type, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-
-/* RunPeriodicTasks
- *  executes periodic tasks, such as cache flushing
- */
-LIB_EXPORT rc_t CC KDBManagerRunPeriodicTasks ( const KDBManager *self )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcExecuting, rcSelf, rcNull );
-
-    return 0;
-}
-
-/* PathType
- * check the path type of an object/directory path.
- * this is an extension of the KDirectoryPathType and will return
- * the KDirectory values if a path type is not specifically a
- * kdb object
- */
-LIB_EXPORT int CC KDBManagerPathTypeVP( const KDBManager * self, const VPath * path )
-{
-    int path_type = kptBadPath;
-    if ( self != NULL && path != NULL )
-    {
-        /*
-         * resolve the possible relative path or accession into
-         * a final path we can open directly
-         */
-		VPath * rpath;
-		rc_t rc = VFSManagerResolvePath( self->vfsmgr, vfsmgr_rflag_kdb_acc, path, &rpath );
-        if ( rc == 0 )
-        {
-            const KDirectory * dir;
-
-            /*
-             * Most KDBPathType values are based on 'directories'
-             * so try to open the resolved path as a directory
-             */
-            rc = VFSManagerOpenDirectoryReadDecrypt( self->vfsmgr, &dir, rpath );
-            if ( rc == 0 )
-            {
-                path_type = KDBPathTypeDir( dir, kptDir, NULL, "." );
-                KDirectoryRelease( dir );
-            }
-            /*
-             * If we couldn't open the path as a directory we 'might'
-             * have a KDB idx but we will only try that for a limited
-             * set of uri schemes.
-             */
-            else
-            {
-                if ( VPathIsFSCompatible( rpath ) )
-                {
-                    char buffer [ 4096 ];
-                    rc = VPathReadPath( rpath, buffer, sizeof buffer, NULL );
-                    if ( rc == 0 )
-                        path_type = KDBPathType( self -> wd, false, buffer );
-                }
-            }
-            VPathRelease( rpath );
-        }
-    }
-    return path_type;
-}
-
-
-LIB_EXPORT int CC KDBManagerVPathType ( const KDBManager * self, const char *path, va_list args )
-{
-    int path_type = kptBadPath;
-
-    if ( self != NULL && path != NULL )
-    {
-        VPath * vp;
-        rc_t rc;
-
-        rc = VFSManagerVMakePath( self -> vfsmgr, &vp, path, args );
-        if ( rc == 0 )
-        {
-            path_type = KDBManagerPathTypeVP( self, vp );
-            VPathRelease( vp );
-        }
-    }
-    return path_type;
-}
-
-
-LIB_EXPORT int CC KDBManagerPathType ( const KDBManager * self, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-
-    rc = KDBManagerVPathType ( self, path, args );
-
-    va_end (args);
-    return rc;
-}
-
diff --git a/libs/kdb/werror-priv.h b/libs/kdb/werror-priv.h
deleted file mode 100644
index a9ae5b0..0000000
--- a/libs/kdb/werror-priv.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_werror_priv_
-#define _h_werror_priv_
-
-#ifndef _h_klib_rc_
-#include <klib/rc.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * RC
- */
-
-/*
-AK: TODO check the fix is correct
-#define kdbReindex RC ( rcDB, rcNoObj, rcCommitting, rcIndex, rcExcessive )
-*/
-
-#define kdbReindex RC ( rcDB, rcNoTarg, rcCommitting, rcIndex, rcExcessive )
-
-#if 0
-    kdbBadBlockSize,
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_werror_priv_ */
diff --git a/libs/kdb/widxblk-priv.h b/libs/kdb/widxblk-priv.h
deleted file mode 100644
index 2187210..0000000
--- a/libs/kdb/widxblk-priv.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_widxblk_priv_
-#define _h_widxblk_priv_
-
-#ifndef _h_kfs_directory_
-#include <kfs/directory.h>
-#endif
-
-#ifndef _h_colfmt_priv_
-#include "colfmt-priv.h"
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KColIdxBlock;
-
-
-/*--------------------------------------------------------------------------
- * KColBlockMap
- *  maps an index or page section of block index
- */
-typedef struct KColBlockMap KColBlockMap;
-struct KColBlockMap
-{
-    void ( * trans ) ( KColBlockMap *self, uint32_t idx,
-        uint64_t first, uint32_t span );
-
-    union
-    {
-        /* for assignment and manipulation */
-        void *p;
-        char *c;
-
-        /* type 1 has a constant range/size */
-        uint32_t *span;
-
-        /* type 2 has a predictable id/pos */
-        uint64_t *first;
-
-        /* type 3 has a predictable id/pos and constant range/size */
-        struct
-        {
-            uint64_t pg;
-            uint32_t sz;
-        } *pred;
-
-    } h;
-
-    /* types 0 and 1 have explicit id/pos, where id is ordered */
-    uint64_t *d;
-
-    /* type 2 has explicit range/size */
-    uint32_t *s;
-};
-
-/* SetEntry
- *  sets an entry
- */
-void KColBlockMapSetEntry ( KColBlockMap *self,
-    uint32_t slot, uint64_t first, uint32_t span );
-#define KColBlockMapSetEntry( self, slot, first, span ) \
-    ( * ( self ) -> trans ) ( self, slot, first, span )
-
-
-/*--------------------------------------------------------------------------
- * KColBlockLocInfo
- *  extensions for defining prospective idx2 blocks
- */
-typedef struct KColBlockLocInfo KColBlockLocInfo;
-struct KColBlockLocInfo
-{
-    /* the range of ids in a block */
-    int64_t start_id;
-    int64_t end_id;
-
-    /* the range of data pages */
-    uint64_t start_pg;
-    uint64_t end_pg;
-
-    /* the size of the last blob in block
-       which is the size of them all in the
-       case of pg_type == 2 or 3 */
-    uint32_t size;
-
-    /* the number of entries in block */
-    uint32_t count;
-
-    /* the types */
-    uint16_t id_type;
-    uint16_t pg_type;
-};
-
-/* Merge
- *  calculates the cost of merging two blocks
- *  returns the cost in bytes where a benefit is negative
- *  merges right into left
- */
-int64_t KColBlockLocInfoMerge ( KColBlockLocInfo *left,
-    const KColBlockLocInfo *right );
-
-
-/*--------------------------------------------------------------------------
- * KColWIdxBlock
- *  level 2 index building block
- *
- *  each index block has two sections
- */
-typedef struct KColWIdxBlock KColWIdxBlock;
-struct KColWIdxBlock
-{
-    KColBlockMap id;
-    KColBlockMap pg;
-
-    uint32_t count;
-    uint32_t size;
-
-    /* for assigning */
-    uint32_t idx;
-};
-
-/* Init
- */
-rc_t KColWIdxBlockInit ( KColWIdxBlock *iblk, const KColBlockLocInfo *info );
-
-/* Whack
- */
-void KColWIdxBlockWhack ( KColWIdxBlock *self );
-
-/* SetEntry
- *  sets index and page location information
- */
-void KColWIdxBlockSetEntry ( KColWIdxBlock *self,
-    int64_t start_id, uint32_t span,
-    uint64_t pg, uint32_t sz );
-#if 0
-#define KColWIdxBlockSetEntry( self, start_id, span, pos, sz ) \
-    ( KColBlockMapSetEntry ( & ( self ) -> id, ( self ) -> idx, start_id, span ), \
-      KColBlockMapSetEntry ( & ( self ) -> pg, ( self ) -> idx, pos, sz ), \
-      ( void ) ++ ( self ) -> idx )
-#endif
-
-/* Compress
- *  compress the block
- *  update the BlockLoc
- */
-rc_t KColWIdxBlockCompress ( KColWIdxBlock *self, bool bswap,
-    const KColBlockLocInfo *info, KColBlockLoc *bloc, size_t *to_write );
-
-/* PersistPtr
- *  access the pointer for persisting to disk
- */
-const void *KColWIdxBlockPersistPtr ( const KColWIdxBlock *self,
-    const KColBlockLoc *bloc );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_colidx2_priv_ */
diff --git a/libs/kdb/widxblk.c b/libs/kdb/widxblk.c
deleted file mode 100644
index edac6de..0000000
--- a/libs/kdb/widxblk.c
+++ /dev/null
@@ -1,546 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "widxblk-priv.h"
-#include "werror-priv.h"
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <byteswap.h>
-
-
-/*--------------------------------------------------------------------------
- * KColBlockMap
- *  maps an index or page section of block index
- */
-
-/* KColBlockMapSetEntry
- *  sets an entry
- */
-#ifndef KColBlockMapSetEntry
-LIB_EXPORT void CC KColBlockMapSetEntry ( KColBlockMap *self,
-    uint32_t slot, uint64_t first, uint32_t span )
-{
-    ( * self -> trans ) ( self, slot, first, span );
-}
-#endif
-
-static
-void KColBlockMapTrans0 ( KColBlockMap *self, uint32_t idx,
-    uint64_t first, uint32_t span )
-{
-    self -> d [ idx ] = first;
-    self -> s [ idx ] = span;
-}
-
-static
-void KColBlockMapTrans1 ( KColBlockMap *self, uint32_t idx,
-    uint64_t first, uint32_t span )
-{
-    self -> d [ idx ] = first;
-    assert ( idx == 0 || self -> h . span [ 0 ] == span );
-    if ( idx == 0 )
-        self -> h . span [ 0 ] = span;
-}
-
-static
-void KColBlockMapTrans2 ( KColBlockMap *self, uint32_t idx,
-    uint64_t first, uint32_t span )
-{
-    self -> s [ idx ] = span;
-    if ( idx == 0 )
-        self -> h . first [ 0 ] = first;
-}
-
-static
-void KColBlockMapTrans3 ( KColBlockMap *self, uint32_t idx,
-    uint64_t first, uint32_t span )
-{
-    assert ( idx == 0 || self -> h . pred -> sz == span );
-    if ( idx == 0 )
-    {
-        self -> h . pred -> pg = first;
-        self -> h . pred -> sz = span;
-    }
-}
-
-static
-void KColBlockMapTransNull ( KColBlockMap *self, uint32_t idx,
-    uint64_t first, uint32_t span )
-{
-}
-
-static
-void KColBlockMapSwap ( KColBlockMap *self, uint32_t count, int type )
-{
-    uint32_t i;
-
-    switch ( type )
-    {
-    case btypeUniform:
-        self -> h . span [ 0 ] = bswap_32 ( self -> h . span [ 0 ] );
-        break;
-    case btypeMagnitude:
-        self -> h . first [ 0 ] = bswap_64 ( self -> h . first [ 0 ] );
-        break;
-    case btypePredictable:
-        self -> h . pred -> pg = bswap_64 ( self -> h . pred -> pg );
-        self -> h . pred -> sz = bswap_32 ( self -> h . pred -> sz );
-        break;
-    }
-
-    switch ( type )
-    {
-    case btypeRandom:
-    case btypeUniform:
-        for ( i = 0; i < count; ++ i )
-            self -> d [ i ] = bswap_64 ( self -> d [ i ] );
-        break;
-    }
-
-    switch ( type )
-    {
-    case btypeRandom:
-    case btypeMagnitude:
-        for ( i = 0; i < count; ++ i )
-            self -> s [ i ] = bswap_32 ( self -> s [ i ] );
-        break;
-    }
-}
-
-
-/*--------------------------------------------------------------------------
- * KColBlockLocInfo
- *  extensions for defining prospective idx2 blocks
- */
-
-/* MergeIDTest
- *  tests viability of merging two blocks with same id type
- *  returns the required type for merge
- */
-static
-uint32_t KColBlockLocInfoMergeIDTest ( uint32_t id_type,
-    const KColBlockLocInfo *left, const KColBlockLocInfo *right )
-{
-    switch ( id_type )
-    {
-    case btypeRandom:
-        break;
-
-    case btypeUniform:
-        assert ( left -> count != 0 );
-        assert ( right -> count != 0 );
-        if ( ( left -> end_id - left -> start_id ) / left -> count ==
-             ( right -> end_id - right -> start_id ) / right -> count )
-            return btypeUniform;
-        break;
-
-    case btypeMagnitude:
-        if ( left -> end_id == right -> start_id )
-            return btypeMagnitude;
-        break;
-
-    case btypePredictable:
-        assert ( left -> count != 0 );
-        assert ( right -> count != 0 );
-
-        if ( ( left -> end_id - left -> start_id ) / left -> count ==
-             ( right -> end_id - right -> start_id ) / right -> count )
-        {
-            if ( left -> end_id == right -> start_id )
-                return btypePredictable;
-            return btypeUniform;
-        }
-
-        if ( left -> end_id == right -> start_id )
-            return btypeMagnitude;
-        break;
-    }
-
-    return btypeRandom;
-}
-
-/* MergePGTest
- *  tests viability of merging two blocks with same id type
- */
-static
-uint32_t KColBlockLocInfoMergePGTest ( uint32_t pg_type,
-    const KColBlockLocInfo *left, const KColBlockLocInfo *right )
-{
-    switch ( pg_type )
-    {
-    case btypeRandom:
-        break;
-
-    case btypeUniform:
-        if ( left -> size == right -> size )
-            return btypeUniform;
-        break;
-
-    case btypeMagnitude:
-        if ( left -> end_pg == right -> start_pg )
-            return btypeMagnitude;
-        break;
-
-    case btypePredictable:
-        if ( left -> size == right -> size )
-        {
-            if ( left -> end_pg == right -> start_pg )
-                return btypePredictable;
-            return btypeUniform;
-        }
-        if ( left -> end_pg == right -> start_pg )
-            return btypeMagnitude;
-        break;
-    }
-
-    return btypeRandom;
-}
-
-/* ConvertIDCost
- *  measures cost of converting an id type
- */
-static
-int64_t KColBlockLocInfoConvertIDCost ( const KColBlockLocInfo *bloc, uint32_t id_type )
-{
-    size_t cost;
-
-    if ( bloc -> id_type == ( uint16_t ) id_type )
-        return 0;
-
-    switch ( ( id_type << 2 ) | bloc -> id_type )
-    {
-        /* conversions to most expensive type */
-    case ( ( btypeRandom << 2 ) | btypeUniform ):
-        cost = ( ( size_t ) bloc -> count << 2 ) - 4;
-        break;
-    case ( ( btypeRandom << 2 ) | btypeMagnitude ):
-        cost = ( ( size_t ) bloc -> count << 3 ) - 8;
-        break;
-    case ( ( btypeRandom << 2 ) | btypePredictable ):
-        cost = ( size_t ) bloc -> count * 12;
-        break;
-
-        /* other supported conversions */
-    case ( ( btypeUniform << 2 ) | btypePredictable ):
-        cost = ( size_t ) bloc -> count << 3;
-        break;
-    case ( ( btypeMagnitude << 2 ) | btypePredictable ):
-        cost = ( size_t ) bloc -> count << 2;
-        break;
-
-        /* no other conversions are supported */
-    default:
-        return 0xFFFFFFFF;
-    }
-
-    /* consider the conversion done */
-    return cost;
-}
-
-/* ConvertPGCost
- *  measures cost of converting a pg type
- */
-static
-int64_t KColBlockLocInfoConvertPGCost ( const KColBlockLocInfo *bloc, uint32_t pg_type )
-{
-    int64_t cost;
-
-    if ( bloc -> pg_type == ( uint16_t ) pg_type )
-        return 0;
-
-    switch ( ( pg_type << 2 ) | bloc -> pg_type )
-    {
-        /* conversion to most expensive type */
-    case ( ( btypeRandom << 2 ) | btypeUniform ):
-        cost = ( ( uint32_t ) bloc -> count << 2 ) - 4;
-        break;
-    case ( ( btypeRandom << 2 ) | btypeMagnitude ):
-        cost = ( ( uint32_t ) bloc -> count << 3 ) - 8;
-        break;
-    case ( ( btypeRandom << 2 ) | btypePredictable ):
-        cost = ( uint32_t ) ( bloc -> count - 1 ) * 12;
-        break;
-
-        /* other supported conversions */
-    case ( ( btypeUniform << 2 ) | btypePredictable ):
-        cost = ( ( int64_t ) bloc -> count << 3 ) - 12;
-        break;
-    case ( ( btypeMagnitude << 2 ) | btypePredictable ):
-        cost = ( ( int64_t ) bloc -> count << 2 ) - 12;
-        break;
-
-        /* no other conversions are supported */
-    default:
-        return 0xFFFFFFFF;
-    }
-
-    /* consider the conversion done */
-    return cost;
-}
-
-/* Merge
- *  calculates the cost of merging two blocks
- *  returns the cost in bytes where a benefit is negative
- *  merges right into left
- */
-int64_t KColBlockLocInfoMerge ( KColBlockLocInfo *a, const KColBlockLocInfo *b )
-{
-    int64_t cost;
-    uint32_t id_type, pg_type;
-
-    /* calculate optimistic lowest-common types */
-    id_type = ( uint32_t ) a -> id_type & ( uint32_t ) b -> id_type;
-    pg_type = ( uint32_t ) a -> pg_type & ( uint32_t ) b -> pg_type;
-
-    /* test merge of b into a */
-    id_type = KColBlockLocInfoMergeIDTest ( id_type, a, b );
-    pg_type = KColBlockLocInfoMergePGTest ( pg_type, a, b );
-
-    /* calculate cost of type conversion */
-    cost = KColBlockLocInfoConvertIDCost ( a, id_type );
-    cost += KColBlockLocInfoConvertPGCost ( a, pg_type );
-    cost += KColBlockLocInfoConvertIDCost ( b, id_type );
-    cost += KColBlockLocInfoConvertPGCost ( b, pg_type );
-
-    /* perform the merge */
-    a -> end_id = b -> end_id;
-    a -> end_pg = b -> end_pg;
-    a -> count += b -> count;
-    a -> id_type = id_type;
-    a -> pg_type = pg_type;
-
-    /* the resultant block cannot be too large */
-    if ( ( ( a -> end_id - a -> start_id ) >> 32 ) == 0 )
-    {
-        size_t hdr_size_div4 = pg_type;
-        size_t entry_size_div4 = ( id_type ^ 3 ) + ( pg_type ^ 3 );
-        if ( id_type != 3 )
-            hdr_size_div4 += id_type;
-
-        if ( ( hdr_size_div4 + entry_size_div4 * a -> count ) <= ( 0x10000 / 4 ) )
-            return cost - sizeof ( KColBlockLoc );
-    }
-
-    /* too big */
-    return 0xFFFFFFFF;
-}
-
-
-/*--------------------------------------------------------------------------
- * KColWIdxBlock
- *  level 2 index building block
- *
- *  each index block has two sections
- */
-
-/* Init
- */
-rc_t KColWIdxBlockInit ( KColWIdxBlock *iblk, const KColBlockLocInfo *info )
-{
-    /* start out with entry count */
-    int block_size = ( int ) info -> count;
-
-    /* determine block size and write funcs */
-    int id_hsz, id_dsz, id_ssz;
-    int pg_hsz, pg_dsz, pg_ssz;
-    switch ( info -> id_type )
-    {
-    case btypeRandom:
-        iblk -> id . trans = KColBlockMapTrans0;
-        id_hsz = 0;
-        id_dsz = 8;
-        id_ssz = 4;
-        break;
-    case btypeUniform:
-        iblk -> id . trans = KColBlockMapTrans1;
-        id_hsz = 4;
-        id_dsz = 8;
-        id_ssz = 0;
-        break;
-    case btypeMagnitude:
-        iblk -> id . trans = KColBlockMapTrans2;
-        id_hsz = 8;
-        id_dsz = 0;
-        id_ssz = 4;
-        break;
-    case btypePredictable:
-    default: /* to quiet compiler warnings */
-        iblk -> id . trans = KColBlockMapTransNull;
-        id_hsz = 0;
-        id_dsz = 0;
-        id_ssz = 0;
-        break;
-    }
-
-    switch ( info -> pg_type )
-    {
-    case btypeRandom:
-        iblk -> pg . trans = KColBlockMapTrans0;
-        pg_hsz = 0;
-        pg_dsz = 8;
-        pg_ssz = 4;
-        break;
-    case btypeUniform:
-        iblk -> pg . trans = KColBlockMapTrans1;
-        pg_hsz = 4;
-        pg_dsz = 8;
-        pg_ssz = 0;
-        break;
-    case btypeMagnitude:
-        iblk -> pg . trans = KColBlockMapTrans2;
-        pg_hsz = 8;
-        pg_dsz = 0;
-        pg_ssz = 4;
-        break;
-    case btypePredictable:
-    default: /* to quiet compiler warnings */
-        iblk -> pg . trans = KColBlockMapTrans3;
-        pg_hsz = 12;
-        pg_dsz = 0;
-        pg_ssz = 0;
-        break;
-    }
-
-    /* record count */
-    iblk -> count = block_size;
-
-    /* account for the number of entries */
-    id_dsz *= block_size;
-    id_ssz *= block_size;
-    pg_dsz *= block_size;
-    pg_ssz *= block_size;
-
-    /* allocate a block with compression buffer */
-    block_size = id_hsz + id_dsz + id_ssz +
-        pg_hsz + pg_dsz + pg_ssz;
-    iblk -> id . h . p = malloc ( block_size + block_size );
-    if ( iblk -> id . h . p == NULL )
-        return RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-
-    /* record uncompressed block size */
-    iblk -> size = block_size;
-
-    /* map the block */
-    iblk -> pg . h . c = iblk -> id . h . c + id_hsz;
-    iblk -> id . d = ( uint64_t* ) ( iblk -> pg . h . c + pg_hsz );
-    iblk -> pg . d = ( uint64_t* ) ( ( char* ) iblk -> id . d + id_dsz );
-    iblk -> id . s = ( uint32_t * ) ( ( char* ) iblk -> pg . d + pg_dsz );
-    iblk -> pg . s = ( uint32_t * ) ( ( char* ) iblk -> id . s + id_ssz );
-
-    /* prepare index */
-    iblk -> idx = 0;
-
-    return 0;
-}
-
-/* Whack
- */
-void KColWIdxBlockWhack ( KColWIdxBlock *self )
-{
-    if ( self != NULL )
-        free ( self -> id . h . p );
-}
-
-/* SetEntry
- *  sets index and page location information
- */
-#ifndef KColWIdxBlockSetEntry
-void KColWIdxBlockSetEntry ( KColWIdxBlock *self,
-    int64_t start_id, uint32_t span,
-    uint64_t pg, uint32_t sz )
-{
-    KColBlockMapSetEntry ( & self -> id, self -> idx, start_id, span );
-    KColBlockMapSetEntry ( & self -> pg, self -> idx, pg, sz );
-    ++ self -> idx;
-}
-#endif
-
-/* Compress
- *  compress the block
- *  update the KColBlockLoc
- */
-rc_t KColWIdxBlockCompress ( KColWIdxBlock *self, bool bswap,
-    const KColBlockLocInfo *info, KColBlockLoc *bloc, size_t *to_write )
-{
-    assert ( info -> id_type < 4 );
-    bloc -> u . blk . id_type = ( uint32_t ) info -> id_type;
-
-    assert ( info -> pg_type < 4 );
-    bloc -> u . blk . pg_type = ( uint32_t ) info -> pg_type;
-
-    assert ( ( ( info -> end_id - info -> start_id ) >> 32 ) == 0 );
-    bloc -> id_range = ( uint32_t ) ( info -> end_id - info -> start_id );
-
-    bloc -> start_id = info -> start_id;
-
-    bloc -> pg = 0;
-
-    if ( info -> id_type == btypePredictable &&
-         info -> pg_type == btypePredictable )
-    {
-        assert ( ( self -> count >> 27 ) == 0 );
-        bloc -> u . blk . size = self -> count;
-        bloc -> u . blk . compressed = 0;
-        * to_write = 12;
-
-        if ( bswap )
-        {
-            KColBlockMapSwap ( & self -> id, self -> count, info -> id_type );
-            KColBlockMapSwap ( & self -> pg, self -> count, info -> pg_type );
-        }
-
-        return 0;
-    }
-
-    assert ( ( self -> size >> 27 ) == 0 );
-    bloc -> u . blk . size = self -> size;
-    * to_write = self -> size;
-
-    if ( bswap )
-    {
-        KColBlockMapSwap ( & self -> id, self -> count, info -> id_type );
-        KColBlockMapSwap ( & self -> pg, self -> count, info -> pg_type );
-    }
-
-    /* not compressing today */
-    bloc -> u . blk . compressed = 0;
-    return 0;
-}
-
-/* PersistPtr
- *  access the pointer for persisting to disk
- */
-const void *KColWIdxBlockPersistPtr ( const KColWIdxBlock *self,
-    const KColBlockLoc *bloc )
-{
-    assert ( bloc -> u . blk . compressed == 0 );
-    return self -> id . h . p;
-}
diff --git a/libs/kdb/windex-priv.h b/libs/kdb/windex-priv.h
deleted file mode 100644
index 5b9847d..0000000
--- a/libs/kdb/windex-priv.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_index_priv_
-#define _h_index_priv_
-
-#ifndef _h_index_cmn_
-#include "index-cmn.h"
-#endif
-
-#ifndef _h_klib_trie_
-#include <klib/trie.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct BSTNode;
-struct KDirectory;
-
-
-/*--------------------------------------------------------------------------
- * V1
- *  version 1 of the trie index was hard-coded to enforce uniqueness of
- *  both the string, and a 32-bit id. furthermore, the id was unfortunately
- *  assumed to occupy a mostly contiguous space, such that the projection
- *  was always implemented as an array of ptrie node ids where the id was
- *  used to index the array.
- *
- *  the introduction of highly sparse ids led to deprecation of this
- *  implementation. see version 2 for further information.
- */
-
-
-/*--------------------------------------------------------------------------
- * KTrieIdxNode_v1
- */
-typedef struct KTrieIdxNode_v1 KTrieIdxNode_v1;
-struct KTrieIdxNode_v1
-{
-    TNode n;
-    uint32_t id;
-    char key [ 1 ];
-};
-
-/*--------------------------------------------------------------------------
- * KTrieIndex_v1
- */
-struct KTrieIndex_v1
-{
-    KPTrieIndex_v1 pt;
-    Trie key2id;
-    KTrieIdxNode_v1 **id2node;
-    uint32_t first;
-    uint32_t last;
-    uint32_t len;
-};
-
-/* insert string into trie, mapping to 32 bit id */
-rc_t KTrieIndexInsert_v1 ( KTrieIndex_v1 *self,
-    bool proj, const char *key, uint32_t id );
-
-/* drop string from trie and all mappings */
-rc_t KTrieIndexDelete_v1 ( KTrieIndex_v1 *self,
-    bool proj, const char *key );
-
-/* persist index to file */
-rc_t KTrieIndexPersist_v1 ( const KTrieIndex_v1 *self,
-    bool proj, struct KDirectory *dir, const char *path, bool use_md5 );
-
-
-/*--------------------------------------------------------------------------
- * V2
- *  version 2 of the trie index was introduced to handle sparse ids,
- *  and to recognize that ids may be 64 bits and/or negative.
- *
- *  v2 introduces strategy identifiers to handle various cases.
- *
- *  CONSTRAINTS
- *  - both key and id are unique ( version 1 )
- *  - key is not unique, but must map to a contiguous range of ids,
- *    while ids are unique ( the main use case for SRA )
- *
- *  INSERTION
- *  - ids are observed in increasing order
- *
- *  PROJECTION
- *  - id range is contiguous or nearly so ( can use single array )
- *  - id range is sparse
- *
- *  the implementation may be extended by adding new strategies,
- *  but the moment the implementation supports 1 to many mappings,
- *  inserted with ids in increasing order, and an unique constraint
- *  on the ids themselves.
- *
- *  the general case for v2 is "key -> id range", where "id range -> key"
- *  is via contiguous array if avg ( id range ) <= 2, and via sparse
- *  array otherwise.
- *
- *  for the key -> id mappings, this means that the in-core node
- *  either retains an id range ( when not using a projection index ),
- *  or it retains a start-id only, since its range can be determined
- *  from the projection index.
- *
- *  for id -> key mappings, the id is first converted to an ordinal, and
- *  the ordinal to a node. when ids are contiguous, id -> ordinal is simply
- *  derived by subtracting the initial start id. when sparse, an id -> ord
- *  array is used in a binary search to produce the ordinal.
- *
- *  ids are assumed to be 64 bit, stored as id - start id, and packed to
- *  a minimum number of bits to represent the id. ptrie node ids are still
- *  32-bit entities.
- */
-
-
-/*--------------------------------------------------------------------------
- * KTrieIdxNode_v2_s1
- *  strategy 1 - store only start id, derive range from proj index
- */
-typedef struct KTrieIdxNode_v2_s1 KTrieIdxNode_v2_s1;
-struct KTrieIdxNode_v2_s1
-{
-    TNode n;
-    int64_t start_id;
-    char key [ 1 ];
-};
-
-/*--------------------------------------------------------------------------
- * KTrieIdxNode_v2_s2
- *  strategy 2 - store complete range when not using proj index
- */
-typedef struct KTrieIdxNode_v2_s2 KTrieIdxNode_v2_s2;
-struct KTrieIdxNode_v2_s2
-{
-    TNode n;
-    int64_t start_id;
-    uint32_t span;
-    char key [ 1 ];
-};
-
-/*--------------------------------------------------------------------------
- * KTrieIndex_v2
- */
-struct KTrieIndex_v2
-{
-    int64_t first, last;
-    KPTrieIndex_v2 pt;
-    Trie key2id;
-    KTrieIdxNode_v2_s1 **ord2node;
-    uint32_t count;
-    uint32_t max_span;
-};
-
-/* cause persisted tree to be loaded into trie */
-rc_t KTrieIndexAttach_v2 ( KTrieIndex_v2 *self, bool proj );
-
-/* insert string into trie, mapping to 64 bit id */
-rc_t KTrieIndexInsert_v2 ( KTrieIndex_v2 *self,
-    bool proj, const char *key, int64_t id );
-
-/* drop string from trie and all mappings */
-rc_t KTrieIndexDelete_v2 ( KTrieIndex_v2 *self,
-    bool proj, const char *key );
-
-/* persist index to file */
-rc_t KTrieIndexPersist_v2 ( const KTrieIndex_v2 *self,
-    bool proj, struct KDirectory *dir, const char *path, bool use_md5 );
-
-
-/*--------------------------------------------------------------------------
- * KU64Index_v3
- */
-struct KU64Index_v3
-{
-    BSTree tree;
-    rc_t rc;
-};
-
-rc_t KU64IndexInsert_v3(KU64Index_v3* self, bool unique, uint64_t key, uint64_t key_size, int64_t id, uint64_t id_qty);
-rc_t KU64IndexDelete_v3(KU64Index_v3* self, uint64_t key);
-
-rc_t KU64IndexPersist_v3(KU64Index_v3* self, bool proj, struct KDirectory *dir, const char *path, bool use_md5);
-
-
-
-/*--------------------------------------------------------------------------
- * KIndex
- *  represents an index
- */
-
-/* Cmp
- * Sort
- */
-int KIndexCmp ( const void *item, struct BSTNode const *n );
-int KIndexSort ( struct BSTNode const *item, struct BSTNode const *n );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_index_priv_ */
diff --git a/libs/kdb/windex.c b/libs/kdb/windex.c
deleted file mode 100644
index efdfb8c..0000000
--- a/libs/kdb/windex.c
+++ /dev/null
@@ -1,1889 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-
-#include "windex-priv.h"
-#include "dbmgr-priv.h"
-#include "database-priv.h"
-#include "wtable-priv.h"
-#include "wkdb-priv.h"
-#include "kdbfmt-priv.h"
-
-#include <kdb/kdb-priv.h>
-#include <kdb/index.h>
-#include <klib/symbol.h>
-#include <kfs/file.h>
-#include <kfs/mmap.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <byteswap.h>
-#include <assert.h>
-
-/*--------------------------------------------------------------------------
- * KIndex
- *  an object capable of mapping an object to integer oid
- */
-
-struct KIndex
-{
-    BSTNode n;
-
-    KDBManager *mgr;
-    KDatabase *db;
-    KTable *tbl;
-    KDirectory *dir;
-
-    KRefcount refcount;
-    uint32_t opencount;
-    uint32_t vers;
-    union
-    {
-        KTrieIndex_v1 txt1;
-        KTrieIndex_v2 txt2;
-        KU64Index_v3  u64_3;
-    } u;
-    bool converted_from_v1;
-    uint8_t type;
-    uint8_t read_only;
-    uint8_t dirty;
-    bool use_md5;
-
-    KSymbol sym;
-
-    char path [ 1 ];
-};
-
-
-/* Whack
- */
-static
-rc_t KIndexWhack ( KIndex *self )
-{
-    rc_t rc;
-    KDBManager *mgr = self -> mgr;
-    KSymbol * symb;
-
-    KRefcountWhack ( & self -> refcount, "KIndex" );
-
-    rc = KIndexCommit( self );
-    if ( rc == 0 )
-    {
-        /* release owner */
-        if ( self -> db != NULL )
-        {
-            rc = KDatabaseSever ( self -> db );
-            if ( rc != 0 )
-                return rc;
-            self -> db = NULL;
-        }
-        else if ( self -> tbl != NULL )
-        {
-            rc = KTableSever ( self -> tbl );
-            if ( rc != 0 )
-                return rc;
-            self -> tbl = NULL;
-        }
-    }
-
-    /* remove from mgr */
-    symb = KDBManagerOpenObjectFind (mgr, self->path);
-    if (symb != NULL)
-    {
-        rc = KDBManagerOpenObjectDelete (mgr, symb);
-        if (rc == 0)
-        {
-            /* release manager
-               should never fail */
-            rc = KDBManagerSever ( mgr );
-            if ( rc != 0 )
-                rc = KDBManagerOpenObjectAdd (mgr, symb);
-            else
-            {
-                self -> mgr = NULL;
-
-                rc = SILENT_RC ( rcDB, rcIndex, rcDestroying, rcIndex, rcBadVersion );
-
-                /* complete */
-                switch ( self -> type )
-                {
-                case kitText:
-                case kitText | kitProj:
-                    switch ( self -> vers )
-                    {
-                    case 1:
-                        KTrieIndexWhack_v1 ( & self -> u . txt1 );
-                        rc = 0;
-                        break;
-                    case 2:
-                    case 3:
-                    case 4:
-                        KTrieIndexWhack_v2 ( & self -> u . txt2 );
-                        rc = 0;
-                        break;
-                    }
-                    break;
-
-                case kitU64:
-                    switch ( self -> vers )
-                    {
-                    case 3:
-                    case 4:
-                        rc = KU64IndexWhack_v3 ( & self -> u . u64_3 );
-                        break;
-                    }
-                    break;
-                }
-            }
-        }
-    }
-    if ( rc == 0 )
-    {
-        KDirectoryRelease ( self -> dir );
-        free ( self );
-    }
-    else
-        KRefcountInit ( & self -> refcount, 1, "KIndex", "whack", "kidx" );
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KIndexAddRef ( const KIndex *cself )
-{
-    KIndex *self = ( KIndex* ) cself;
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KIndex" ) )
-        {
-        case krefLimit:
-            return RC ( rcDB, rcIndex, rcAttaching, rcRange, rcExcessive );
-        }
-        ++ self -> opencount;
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KIndexRelease ( const KIndex *cself )
-{
-    KIndex *self = ( KIndex* ) cself;
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KIndex" ) )
-        {
-        case krefWhack:
-            return KIndexWhack ( ( KIndex* ) self );
-        case krefLimit:
-            return RC ( rcDB, rcIndex, rcReleasing, rcRange, rcExcessive );
-        }
-        -- self -> opencount;
-    }
-    return 0;
-}
-
-
-/* Attach
- */
-static
-rc_t KIndexAttach ( KIndex *self, const KMMap *mm, bool *byteswap )
-{
-    size_t size;
-    rc_t rc = KMMapSize ( mm, & size );
-    if ( rc == 0 )
-    {
-        const void *addr;
-        rc = KMMapAddrRead ( mm, & addr );
-        if ( rc == 0 )
-        {
-            union
-            {
-                KIndexFileHeader_v1 v1;
-                KIndexFileHeader_v2 v2;
-                KIndexFileHeader_v3 v3;
-            } hdrs;
-
-            const KDBHdr *hdr = addr;
-            const KIndexFileHeader_v3 *fh = addr;
-
-            * byteswap = false;
-            rc = KDBHdrValidate ( hdr, size, 1, KDBINDEXVERS );
-            if ( GetRCState ( rc ) == rcIncorrect && GetRCObject ( rc ) == rcByteOrder )
-            {
-                hdrs . v1 . endian = bswap_32 ( hdr -> endian );
-                hdrs . v1 . version = bswap_32 ( hdr -> version );
-                rc = KDBHdrValidate ( & hdrs . v1, size, 1, KDBINDEXVERS );
-                if ( rc == 0 )
-                {
-                    * byteswap = true;
-                    switch ( hdrs . v1 . version )
-                    {
-                    case 1:
-                        hdr = & hdrs . v1;
-                        break;
-                    case 2:
-                        hdr = & hdrs . v2;
-                        break;
-                    case 3:
-                    case 4:
-                        hdrs . v3 . index_type = bswap_32 ( fh -> index_type );
-                        hdrs . v3 . reserved1 = bswap_32 ( fh -> reserved1 );
-                        hdr = & hdrs . v3 . h;
-                        fh = & hdrs . v3;
-                        break;
-                    }
-                }
-            }
-            if ( rc == 0 )
-            {
-                self -> vers = hdr -> version;
-                switch ( hdr -> version )
-                {
-                case 1:
-#if KDBINDEXVERS != 1
-                    self -> converted_from_v1 = true;
-#endif
-                case 2:
-                    self -> type = kitText;
-                    break;
-                case 3:
-                case 4:
-                {
-                    self -> type = fh -> index_type;
-                    switch( self->type )
-                    {
-                    case kitText:
-                    case kitU64:
-                        break;
-                    default:
-                        rc = RC(rcDB, rcIndex, rcConstructing, rcIndex, rcUnrecognized);
-                    }
-                    break;
-                }
-                default:
-                    rc = RC(rcDB, rcIndex, rcConstructing, rcIndex, rcBadVersion);
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-/* Sever
- * there is no KIndexSever()
- */
-
-/* Make
- *  make an initialized structure
- *  NB - does NOT attach reference to dir, but steals it
- */
-static
-rc_t KIndexMake ( KIndex **idxp, KDirectory *dir, const char *path )
-{
-    rc_t rc;
-    char fullpath[4096];
-
-    if ( idxp == NULL )
-        rc = RC ( rcDB, rcIndex, rcCreating, rcParam, rcNull );
-    else
-    {
-        if ( dir == NULL )
-            rc = RC ( rcDB, rcIndex, rcCreating, rcDirectory, rcNull );
-        else if ( path == NULL )
-            rc = RC ( rcDB, rcIndex, rcCreating, rcPath, rcNull );
-        else if ( path [ 0 ] == 0 )
-            rc = RC ( rcDB, rcIndex, rcCreating, rcPath, rcEmpty );
-        else
-        {
-            rc = KDirectoryResolvePath(dir, true, fullpath, sizeof(fullpath), "%s", path);
-            if (rc == 0)
-            {
-                KIndex* idx = malloc ( sizeof *idx + strlen ( fullpath ) );
-                if ( idx == NULL )
-                    rc = RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-                else
-                {
-                    memset ( idx, 0, sizeof * idx );
-                    rc = KDirectoryAddRef ( dir );
-                    if ( rc == 0 )
-                    {
-                        idx -> dir = dir;
-                        KRefcountInit ( & idx -> refcount, 1, "KIndex", "make", fullpath );
-                        idx -> opencount = 1;
-
-                        strcpy ( idx -> path, fullpath );
-
-                        idx->sym.u.obj = idx;
-                        idx->sym.dad = NULL;   /* not strictly needed */
-                        StringInitCString (&idx->sym.name, idx->path);
-                        idx->sym.type = kptIndex;
-
-                        * idxp = idx;
-                        return 0;
-                    }
-
-                    free ( idx );
-                }
-            }
-        }
-
-        * idxp = NULL;
-    }
-
-    return rc;
-}
-
-static
-rc_t KDBManagerInsertIndex ( KDBManager * self, KIndex * idx)
-{
-    rc_t rc;
-    rc = KDBManagerOpenObjectAdd (self, &idx->sym);
-    if (rc == 0)
-        idx->mgr = KDBManagerAttach (self);
-    return rc;
-}
-
-static
-rc_t KIndexMakeRead ( KIndex **idxp, const KDirectory *dir, const char *path )
-{
-    const KFile *f;
-    rc_t rc = KDirectoryOpenFileRead ( dir, & f, "%s", path );
-    if ( rc == 0 )
-    {
-        const KMMap *mm;
-        rc = KMMapMakeRead ( & mm, f );
-        if ( rc == 0 )
-        {
-            rc = KIndexMake ( idxp, ( KDirectory* ) dir, path );
-            if ( rc == 0 )
-            {
-                bool byteswap;
-                KIndex *idx = * idxp;
-                rc = KIndexAttach ( idx, mm, & byteswap );
-                if ( rc == 0 )
-                {
-                    rc = RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcBadVersion );
-                    idx -> read_only = true;
-                    switch ( idx -> vers )
-                    {
-                    case 1:
-                        /* open using v1 code only if KDBINDEXVERS is 1
-                           if 2 or later, open as a v2 index */
-#if KDBINDEXVERS == 1
-                        rc = KTrieIndexOpen_v1 ( & idx -> u . txt1, mm );
-                        if ( rc == 0 )
-                        {
-                            if ( idx -> u . txt1 . pt . id2node != NULL )
-                                idx -> type = ( uint8_t ) ( kitText | kitProj );
-                            else
-                                idx -> type = ( uint8_t ) kitText;
-                        }
-                        break;
-#else
-                    case 2:
-                    case 3:
-                    case 4:
-                        switch(idx->type) {
-                            case kitText:
-                            case kitText | kitProj:
-                                /* will guess version in open */
-                                rc = KTrieIndexOpen_v2 ( & idx -> u . txt2, mm, byteswap );
-                                if( rc == 0 && idx -> u.txt2.pt.ord2node != NULL ) {
-                                    idx -> type |= kitProj;
-                                }
-                                idx -> vers = 3;
-                                break;
-
-                            case kitU64:
-                                rc = KU64IndexOpen_v3(&idx->u.u64_3, mm, byteswap);
-                                break;
-                        }
-                        break;
-#endif
-                    }
-                }
-
-                if ( rc != 0 )
-                    KIndexWhack ( idx );
-            }
-
-            KMMapRelease ( mm );
-        }
-
-        KFileRelease ( f );
-    }
-    return rc;
-}
-
-static
-rc_t KIndexMakeUpdate ( KIndex **idxp, KDirectory *dir, const char *path )
-{
-    const KFile *f;
-    rc_t rc = KDirectoryOpenFileRead ( dir, & f, "%s", path );
-
-    if ( rc == 0 )
-    {
-        const KMMap *mm;
-        rc = KMMapMakeRead ( & mm, f );
-        if ( rc == 0 )
-        {
-            rc = KIndexMake ( idxp, dir, path );
-            if ( rc == 0 )
-            {
-                bool byteswap;
-                KIndex *idx = * idxp;
-                rc = KIndexAttach ( idx, mm, & byteswap );
-                if ( rc == 0 )
-                {
-                    switch ( idx -> vers )
-                    {
-                    case 1:
-                        /* open using v1 code only if KDBINDEXVERS is 1
-                           if 2 or later, open as a v2 index */
-#if KDBINDEXVERS == 1
-                        rc = KTrieIndexOpen_v1 ( & idx -> u . txt1, mm, byteswap );
-                        if ( rc == 0 )
-                        {
-                            if ( idx -> u . txt1 . pt . id2node != NULL )
-                                idx -> type = ( uint8_t ) ( kitText | kitProj );
-                            else
-                                idx -> type = ( uint8_t ) kitText;
-                        }
-                        break;
-#else
-                    case 2:
-                    case 3:
-                    case 4:
-                        switch(idx->type) {
-                            case kitText:
-                            case kitText | kitProj:
-                                /* will guess version in open */
-                                rc = KTrieIndexOpen_v2 ( & idx -> u . txt2, mm, byteswap );
-                                if ( rc == 0 )
-                                {
-                                    if( idx -> u . txt2 . pt . ord2node != NULL ) {
-                                        idx -> type |= kitProj;
-                                    }
-                                    /* v3 takes over v1 and v2 */
-                                    if( idx->vers < 3 ) {
-                                        idx -> vers = 3;
-                                        /* check for a sparse id space */
-                                        if( idx -> u . txt2 . pt . variant != 0 ) {
-                                            /* try to load existing guy */
-                                            rc = KTrieIndexAttach_v2 ( & idx -> u . txt2,
-                                                          idx -> type != ( uint8_t ) kitText );
-                                            if ( rc == 0 )
-                                                idx -> dirty = true;
-                                        }
-                                    }
-                                }
-                                break;
-
-                            case kitU64:
-                                rc = KU64IndexOpen_v3(&idx->u.u64_3, mm, byteswap);
-                                break;
-                        }
-                        break;
-#endif
-                    default:
-                        rc = RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcBadVersion );
-                    }
-                }
-
-                if ( rc != 0 )
-                    KIndexWhack ( idx );
-            }
-
-            KMMapRelease ( mm );
-        }
-
-        KFileRelease ( f );
-    }
-    return rc;
-}
-
-/* MarkModified
- *  make the index think it has been modified, such that it may be committed
- *  useful when forcing conversion from an older version
- */
-#if KDBINDEXVERS > 1
-LIB_EXPORT rc_t CC KIndexMarkModified ( KIndex *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcDB, rcIndex, rcUpdating, rcSelf, rcNull );
-    else if ( self -> read_only )
-        rc = RC ( rcDB, rcIndex, rcUpdating, rcIndex, rcReadonly );
-    else if ( self -> dirty )
-        rc = 0;
-    else switch ( self -> type )
-    {
-    case kitText:
-    case kitText | kitProj:
-        switch ( self -> vers )
-        {
-        default:
-            rc = RC ( rcDB, rcIndex, rcUpdating, rcIndex, rcBadVersion );
-            break;
-        case 1:
-        case 2:
-        case 3:
-        case 4:
-            rc = KTrieIndexAttach_v2 ( & self -> u . txt2,
-                self -> type != ( uint8_t ) kitText );
-            if ( rc == 0 )
-                self -> dirty = true;
-        }
-        break;
-    default:
-        rc = RC ( rcDB, rcIndex, rcUpdating, rcIndex, rcInvalid );
-    }
-
-    return rc;
-}
-#endif
-
-static
-rc_t KIndexCreate ( KIndex **idxp, KDirectory *dir,
-    KIdxType type, KCreateMode cmode, const char *path, int ptype )
-{
-    rc_t rc = 0;
-    KIndex *idx;
-
-    if ( ptype != kptNotFound )
-    {
-        switch ( cmode & kcmValueMask )
-        {
-        case kcmOpen:
-            rc = KIndexMakeUpdate ( idxp, dir, path );
-            if ( rc == 0 )
-            {
-                idx = * idxp;
-                if ( ( KIdxType ) idx -> type != type )
-                {
-                    * idxp = NULL;
-                    KIndexWhack ( idx );
-                    rc = RC ( rcDB, rcIndex, rcConstructing, rcType, rcIncorrect );
-                }
-            }
-            return rc;
-
-        case kcmInit:
-            break;
-
-        case kcmCreate:
-            return RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcExists );
-        }
-    }
-#if KDBINDEXVERS == 1 || KDBIDXVERS == 2
-    else if ( type != kitText && type != ( kitText | kitProj ) )
-    {
-        * idxp = NULL;
-        return RC ( rcDB, rcIndex, rcConstructing, rcType, rcUnsupported );
-    }
-#endif
-
-    rc = KIndexMake ( idxp, dir, path );
-    if ( rc == 0 )
-    {
-        idx = * idxp;
-
-        switch ( type )
-        {
-        case kitText:
-        case kitText | kitProj:
-#if KDBINDEXVERS == 1
-            rc = KTrieIndexOpen_v1 ( & idx -> u . txt1, NULL, false );
-#else
-            rc = KTrieIndexOpen_v2 ( & idx -> u . txt2, NULL, false );
-#endif
-            break;
-
-        case kitU64:
-            rc = KU64IndexOpen_v3 ( & idx->u.u64_3, NULL, false );
-            break;
-
-        default:
-            rc = RC ( rcDB, rcIndex, rcConstructing, rcType, rcUnsupported );
-        }
-
-        if ( rc != 0 )
-        {
-            * idxp = NULL;
-            KIndexWhack ( idx );
-        }
-        else
-        {
-            idx -> vers = KDBINDEXVERS;
-            idx -> type = ( uint8_t ) type;
-        }
-    }
-
-    return rc;
-}
-
-/* CreateIndex
- * VCreateIndex
- *  create a new or open an existing index
- *
- *  "idx" [ OUT ] - return parameter for newly opened index
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
- */
-static
-rc_t KDBManagerCreateIndexInt ( KDBManager *self, KIndex **idxp,
-    KDirectory *wd, KIdxType type, KCreateMode cmode, const char *path, bool use_md5 )
-{
-    rc_t rc;
-    int ptype;
-    char idxpath [ 4096 ];
-
-    rc = KDirectoryResolvePath ( wd, true,
-                                  idxpath, sizeof idxpath, "%s", path );
-    if ( rc == 0 )
-    {
-        KIndex *idx;
-        switch ( ptype = KDBPathType ( wd, NULL, idxpath ) )
-        {
-        case kptNotFound:
-            /* first good path */
-            break;
-
-        case kptBadPath:
-            return RC ( rcDB, rcMgr, rcCreating, rcPath, rcInvalid );
-
-        case kptIndex:
-        case kptIndex | kptAlias:
-            /* found so is not good if we want to create new and not
-             * clear/init or open old
-             */
-            if ((cmode & kcmValueMask) == kcmCreate)
-                return RC ( rcDB, rcMgr, rcCreating, rcIndex, rcExists );
-            if (KDBManagerOpenObjectBusy (self, idxpath))
-                return RC ( rcDB, rcMgr, rcCreating, rcIndex, rcBusy );
-
-            /* test now for locked file */
-            rc = KDBWritable ( wd, idxpath );
-            if (rc)
-            {
-                switch (GetRCState(rc))
-                {
-                default:
-                    return rc;
-                case rcLocked:
-                    return RC ( rcDB, rcMgr, rcCreating, rcDatabase, rcLocked );
-                case rcReadonly:
-                    return RC ( rcDB, rcMgr, rcCreating, rcDatabase, rcReadonly );
-                case rcNotFound:
-                    /* not found is good but probably unreachable */
-                    break;
-                case 0:
-                    rc = 0;
-                    break;
-                }
-            }
-            /* second good path */
-            break;
-
-        case kptTable:
-        case kptTable | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcTable, rcExists);
-
-        case kptColumn:
-        case kptColumn | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcColumn, rcExists);
-
-        case kptDatabase:
-        case kptDatabase | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcDatabase, rcExists);
-
-        case kptMetadata:
-        case kptMetadata | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcMetadata, rcExists);
-
-        default:
-            return RC ( rcDB, rcMgr, rcCreating, rcPath, rcIncorrect );
-        }
-
-        rc = KIndexCreate ( & idx, wd, type, cmode, path, ptype );
-        if ( rc == 0 )
-        {
-            rc = KDBManagerInsertIndex (self, idx);
-            if ( rc == 0 )
-            {
-                idx -> use_md5 = use_md5;
-                * idxp = idx;
-                return 0;
-            }
-            
-            KIndexRelease ( idx );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseCreateIndex ( struct KDatabase *self, KIndex **idx,
-    KIdxType type, KCreateMode cmode, const char *name, ... )
-{
-    rc_t rc = 0;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVCreateIndex ( self, idx, type, cmode, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseVCreateIndex ( KDatabase *self, KIndex **idxp,
-    KIdxType type, KCreateMode cmode, const char *name, va_list args )
-{
-    rc_t rc = 0;
-    KDirectory *dir;
-
-    if ( idxp == NULL )
-        return RC ( rcDB, rcDatabase, rcCreating, rcParam, rcNull );
-
-    * idxp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcCreating, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcDatabase, rcCreating, rcDatabase, rcReadonly );
-
-    rc = KDirectoryVCreateDir ( self -> dir, 0777, kcmOpen, "idx", NULL );
-    if ( rc == 0 )
-        rc = KDirectoryVOpenDirUpdate ( self -> dir, & dir, false, "idx", NULL );
-    if ( rc == 0 )
-    {
-        char path [ 256 ];
-        rc = KDirectoryVResolvePath ( dir, false, path, sizeof path, name, args );
-        if ( rc == 0 )
-        {
-            rc = KDBManagerCreateIndexInt ( self -> mgr, idxp, dir,
-                type, cmode | kcmParents, path, (self -> cmode & kcmMD5) != 0 );
-            if ( rc == 0 )
-            {
-                KIndex *idx = * idxp;
-                idx -> db = KDatabaseAttach ( self );
-            }
-        }
-
-        KDirectoryRelease ( dir );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableCreateIndex ( struct KTable *self, KIndex **idx,
-    KIdxType type, KCreateMode cmode, const char *name, ... )
-{
-    rc_t rc = 0;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KTableVCreateIndex ( self, idx, type, cmode, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableVCreateIndex ( KTable *self, KIndex **idxp,
-    KIdxType type, KCreateMode cmode, const char *name, va_list args )
-{
-    rc_t rc = 0;
-    KDirectory *dir;
-
-    if ( idxp == NULL )
-        return RC ( rcDB, rcTable, rcCreating, rcParam, rcNull );
-
-    * idxp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcTable, rcCreating, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcTable, rcCreating, rcTable, rcReadonly );
-
-    rc = KDirectoryVCreateDir ( self -> dir, 0777, kcmOpen, "idx", NULL );
-    if ( rc == 0 )
-        rc = KDirectoryVOpenDirUpdate ( self -> dir, & dir, false, "idx", NULL );
-    if ( rc == 0 )
-    {
-        char path [ 256 ];
-        rc = KDirectoryVResolvePath ( dir, false, path, sizeof path, name, args );
-        if ( rc == 0 )
-        {
-            rc = KDBManagerCreateIndexInt ( self -> mgr, idxp, dir,
-                type, cmode | kcmParents, path, self -> use_md5 );
-            if ( rc == 0 )
-            {
-                KIndex *idx = * idxp;
-                idx -> tbl = KTableAttach ( self );
-            }
-        }
-
-        KDirectoryRelease ( dir );
-    }
-
-    return rc;
-}
-
-
-/* OpenIndexRead
- * VOpenIndexRead
- *  open an index for read
- *
- *  "idx" [ OUT ] - return parameter for newly opened index
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
- */
-static
-rc_t KDBManagerOpenIndexReadInt ( KDBManager *self,
-    const KIndex **idxp, const KDirectory *wd, const char *path )
-{
-    char idxpath [ 4096 ];
-    rc_t rc = KDirectoryResolvePath ( wd, true,
-                                      idxpath, sizeof idxpath, "%s", path );
-    if ( rc == 0 )
-    {
-        KIndex *idx;
-        KSymbol * sym;
-
-        /* if already open */
-        sym = KDBManagerOpenObjectFind (self, idxpath);
-        if (sym != NULL)
-        {
-            const KIndex * cidx;
-            rc_t obj;
-            
-            switch (sym->type)
-            {
-            case kptIndex:
-                cidx = (const KIndex *)sym->u.obj;
-#if 0
-                /* if open for update, refuse */
-                if ( cidx -> read_only )
-#endif
-#if 0
-                if (cidx is coherent)
-#endif
-                {
-                    /* attach a new reference and we're gone */
-                    rc = KIndexAddRef ( cidx );
-                    if ( rc == 0 )
-                        * idxp = cidx;
-                    return rc;
-                }
-                obj = rcDatabase;
-                break;
-                
-            default:
-                obj = rcPath;
-                break;
-            case kptTable:
-                obj = rcTable;
-                break;
-            case kptColumn:
-                obj = rcColumn;
-                break;
-            case kptDatabase:
-                obj = rcDatabase;
-                break;
-            case kptMetadata:
-                obj = rcMetadata;
-                break;
-            }
-            return  RC (rcDB, rcMgr, rcOpening, obj, rcBusy);
-        }
-        
-        switch ( KDirectoryPathType ( wd, "%s", idxpath ) )
-        {
-        case kptNotFound:
-            return RC ( rcDB, rcMgr, rcOpening, rcIndex, rcNotFound );
-        case kptBadPath:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcInvalid );
-        case kptFile:
-        case kptFile | kptAlias:
-            break;
-        default:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcIncorrect );
-        }
-
-        rc = KIndexMakeRead ( & idx, wd, idxpath );
-        if ( rc == 0 )
-        {
-            idx -> read_only = true;
-            rc = KDBManagerInsertIndex (self, idx);
-            if ( rc == 0 )
-            {
-                * idxp = idx;
-                return 0;
-            }
-
-            KIndexRelease ( idx );
-        }
-    }
-    
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseOpenIndexRead ( struct KDatabase const *self,
-    const KIndex **idx, const char *name, ... )
-{
-    rc_t rc = 0;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVOpenIndexRead ( self, idx, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseVOpenIndexRead ( const KDatabase *cself,
-    const KIndex **idxp, const char *name, va_list args )
-{
-    rc_t rc = 0;
-    char path [ 256 ];
-
-    if ( idxp == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcParam, rcNull );
-
-    * idxp = NULL;
-
-    if ( cself == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcSelf, rcNull );
-
-    rc = KDBVMakeSubPath ( cself -> dir,
-        path, sizeof path, "idx", 3, name, args );
-    if ( rc == 0 )
-    {
-        KIndex *idx;
-        rc = KDBManagerOpenIndexReadInt ( cself -> mgr, (const KIndex **)& idx,
-                                          cself -> dir, path );
-        if ( rc == 0 )
-        {
-            KDatabase *self = ( KDatabase* ) cself;
-            idx -> db = KDatabaseAttach ( self );
-            * idxp = idx;
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableOpenIndexRead ( struct KTable const *self,
-    const KIndex **idx, const char *name, ... )
-{
-    rc_t rc = 0;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KTableVOpenIndexRead ( self, idx, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableVOpenIndexRead ( const KTable *self,
-    const KIndex **idxp, const char *name, va_list args )
-{
-    rc_t rc = 0;
-    char path [ 256 ];
-
-    const char *ns = "idx";
-    uint32_t ns_size = 3;
-
-    if ( idxp == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcParam, rcNull );
-
-    * idxp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcSelf, rcNull );
-
-    if ( self -> prerelease )
-    {
-        ns = "";
-        ns_size = 0;
-    }
-
-    rc = KDBVMakeSubPath ( self -> dir,
-        path, sizeof path, ns, ns_size, name, args );
-    if ( rc == 0 )
-    {
-        KIndex *idx;
-        rc = KDBManagerOpenIndexReadInt ( self -> mgr, (const KIndex**)& idx,
-                                          self -> dir, path );
-        if ( rc == 0 )
-        {
-            if (idx->tbl != self)
-                idx -> tbl = KTableAttach ( self );
-            * idxp = idx;
-        }
-    }
-    return rc;
-}
-
-
-/* OpenIndexUpdate
- * VOpenIndexUpdate
- *  open an index for read/write
- *
- *  "idx" [ OUT ] - return parameter for newly opened index
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
- */
-static
-rc_t KDBManagerOpenIndexUpdate ( KDBManager *self,
-    KIndex **idxp, KDirectory *wd, const char *path )
-{
-    char idxpath [ 4096 ];
-    rc_t rc = KDirectoryResolvePath ( wd, true,
-                                      idxpath, sizeof idxpath, "%s", path );
-    if ( rc == 0 )
-    {
-        KSymbol * sym;
-        KIndex *idx;
-
-        sym =  KDBManagerOpenObjectFind (self, idxpath);
-        if (sym != NULL)
-        {
-            rc_t obj;
-            switch (sym->type)
-            {
-            default:
-                obj = rcPath;
-                break;
-            case kptDatabase:
-                obj = rcDatabase;
-                break;
-            case kptTable:
-                obj = rcTable;
-                break;
-            case kptColumn:
-                obj = rcColumn;
-                break;
-            case kptIndex:
-                obj = rcIndex;
-                break;
-            case kptMetadata:
-                obj = rcMetadata;
-                break;
-            }
-            return RC ( rcDB, rcMgr, rcOpening, obj, rcBusy );
-        }
-        /* only open existing indices
-         * this seems wrong but its because the KDBPathType seems wrong
-         */
-        switch ( KDirectoryPathType ( wd, "%s", idxpath ) )
-        {
-        case kptNotFound:
-            return RC ( rcDB, rcMgr, rcOpening, rcIndex, rcNotFound );
-        case kptBadPath:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcInvalid );
-        case kptFile:
-        case kptFile | kptAlias:
-            break;
-        default:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcIncorrect );
-        }
-
-        rc = KIndexMakeUpdate ( & idx, wd, path );
-        if ( rc == 0 )
-        {
-            rc = KDBManagerInsertIndex (self, idx);
-            if ( rc == 0 )
-            {
-                * idxp = idx;
-                return 0;
-            }
-            
-            KIndexRelease ( idx );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseOpenIndexUpdate ( struct KDatabase *self,
-    KIndex **idx, const char *name, ... )
-{
-    rc_t rc = 0;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVOpenIndexUpdate ( self, idx, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseVOpenIndexUpdate ( KDatabase *self,
-    KIndex **idxp, const char *name, va_list args )
-{
-    rc_t rc = 0;
-    KDirectory *dir;
-
-    if ( idxp == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcParam, rcNull );
-
-    * idxp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcDatabase, rcOpening, rcDatabase, rcReadonly );
-
-    rc = KDirectoryVOpenDirUpdate ( self -> dir, & dir, false, "idx", NULL );
-    if ( rc == 0 )
-    {
-        char path [ 256 ];
-        rc = KDirectoryVResolvePath ( dir, false, path, sizeof path, name, args );
-        if ( rc == 0 )
-        {
-            rc = KDBManagerOpenIndexUpdate ( self -> mgr, idxp, dir, path );
-            if ( rc == 0 )
-            {
-                KIndex *idx = * idxp;
-                idx -> db = KDatabaseAttach ( self );
-            }
-        }
-
-        KDirectoryRelease ( dir );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableOpenIndexUpdate ( struct KTable *self,
-    KIndex **idx, const char *name, ... )
-{
-    rc_t rc = 0;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KTableVOpenIndexUpdate ( self, idx, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableVOpenIndexUpdate ( KTable *self,
-    KIndex **idxp, const char *name, va_list args )
-{
-    rc_t rc = 0;
-    KDirectory *dir;
-
-    if ( idxp == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcParam, rcNull );
-
-    * idxp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcTable, rcOpening, rcTable, rcReadonly );
-
-    rc = KDirectoryVOpenDirUpdate ( self -> dir, & dir, false, "idx", NULL );
-    if ( rc == 0 )
-    {
-        char path [ 256 ];
-        rc = KDirectoryVResolvePath ( dir, false, path, sizeof path, name, args );
-        if ( rc == 0 )
-        {
-            rc = KDBManagerOpenIndexUpdate ( self -> mgr, idxp, dir, path );
-            if ( rc == 0 )
-            {
-                KIndex *idx = * idxp;
-                idx -> tbl = KTableAttach ( self );
-            }
-        }
-
-        KDirectoryRelease ( dir );
-    }
-    return rc;
-}
-
-
-/* Locked
- *  returns non-zero if locked
- */
-LIB_EXPORT bool CC KIndexLocked ( const KIndex *self )
-{
-    if ( self != NULL )
-    {
-        rc_t rc = KDBWritable ( self -> dir, "" );
-        if (GetRCState ( rc ) == rcLocked)
-            return true;
-    }
-    return false;
-}
-
-
-/* Version
- *  returns the format version
- */
-LIB_EXPORT rc_t CC KIndexVersion ( const KIndex *self, uint32_t *version )
-{
-    if ( version == NULL )
-        return RC ( rcDB, rcIndex, rcAccessing, rcParam, rcNull );
-
-    if ( self == NULL )
-    {
-        * version = 0;
-        return RC ( rcDB, rcIndex, rcAccessing, rcSelf, rcNull );
-    }
-
-    * version = self -> vers;
-    return 0;
-}
-
-
-/* Type
- *  returns the type of index
- */
-LIB_EXPORT rc_t CC KIndexType ( const KIndex *self, KIdxType *type )
-{
-    if ( type == NULL )
-        return RC ( rcDB, rcIndex, rcAccessing, rcParam, rcNull );
-
-    if ( self == NULL )
-    {
-        * type = ( KIdxType ) 0;
-        return RC ( rcDB, rcIndex, rcAccessing, rcSelf, rcNull );
-    }
-
-    * type = ( KIdxType ) self -> type;
-    return 0;
-}
-
-/* Commit
- *  ensure any changes are committed to disk
- */
-LIB_EXPORT rc_t CC KIndexCommit ( KIndex *self )
-{
-    rc_t rc = 0;
-    bool proj;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcCommitting, rcSelf, rcNull );
-
-    if ( ! self -> dirty )
-        return 0;
-
-    rc = RC ( rcDB, rcIndex, rcCommitting, rcType, rcUnsupported );
-
-    proj = ( self -> type & kitProj ) != 0;
-
-    switch ( self -> type )
-    {
-        case kitText:
-        case kitText | kitProj:
-            switch ( self -> vers )
-            {
-            case 1:
-                rc = KTrieIndexPersist_v1 ( & self -> u . txt1,
-                    proj, self -> dir, self -> path, self -> use_md5 );
-                break;
-            case 2:
-            case 3:
-            case 4:
-                rc = KTrieIndexPersist_v2 ( & self -> u . txt2,
-                    proj, self -> dir, self -> path, self -> use_md5 );
-                break;
-            }
-            break;
-
-        case kitU64:
-            switch(self -> vers) {
-            case 3:
-            case 4:
-                rc = KU64IndexPersist_v3(&self->u.u64_3, proj, self->dir,
-                                         self->path, self->use_md5);
-                break;
-            }
-            break;
-    }
-
-    if ( rc == 0 )
-        self -> dirty = false;
-
-    return rc;
-}
-
-/* Insert
- *  creates a mapping from key to id
- *  and potentially from id to key if supported
- *
- *  "unique" [ IN ] - if non zero, key must be unique
- *
- *  "key" [ IN ] - NUL terminated string for text
- *
- *  "id" [ IN ] - id
- */
-LIB_EXPORT rc_t CC KIndexInsertText ( KIndex *self, bool unique,
-    const char *key, int64_t id )
-{
-    rc_t rc = 0;
-    bool proj;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcInserting, rcSelf, rcNull );
-    if ( key == NULL )
-        return RC ( rcDB, rcIndex, rcInserting, rcString, rcNull );
-    if ( key [ 0 ] == 0 )
-        return RC ( rcDB, rcIndex, rcInserting, rcString, rcInvalid );
-    if ( self -> read_only )
-        return RC ( rcDB, rcIndex, rcInserting, rcIndex, rcReadonly );
-
-    proj = false;
-    switch ( self -> type )
-    {
-    case kitText | kitProj:
-        proj = true;
-    case kitText:
-        switch ( self -> vers )
-        {
-        case 1:
-            /* there is a limit on ids in v1 */
-            if ( id <= 0 || ( id >> 32 ) != 0 )
-                return RC ( rcDB, rcIndex, rcInserting, rcId, rcExcessive );
-
-            rc = KTrieIndexInsert_v1 ( & self -> u . txt1,
-                proj, key, ( uint32_t ) id );
-            break;
-        case 2:
-        case 3:
-        case 4:
-            rc = KTrieIndexInsert_v2 ( & self -> u . txt2,
-                proj, key, id );
-            break;
-        default:
-            return RC ( rcDB, rcIndex, rcInserting, rcIndex, rcBadVersion );
-        }
-        break;
-    default:
-        return RC ( rcDB, rcIndex, rcInserting, rcType, rcUnsupported );
-    }
-
-    switch ( GetRCState ( rc ) )
-    {
-    case 0:
-        self -> dirty = true;
-        break;
-    case rcExists:
-        if ( ! unique )
-            rc = RC ( rcDB, rcIndex, rcInserting, rcConstraint, rcViolated );
-    default:
-        break;
-    }
-
-    return rc;
-}
-
-
-/* Delete
- *  deletes all mappings from key
- */
-LIB_EXPORT rc_t CC KIndexDeleteText ( KIndex *self, const char *key )
-{
-    rc_t rc;
-    bool proj;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcRemoving, rcSelf, rcNull );
-    if ( key == NULL )
-        return RC ( rcDB, rcIndex, rcRemoving, rcString, rcNull );
-    if ( key [ 0 ] == 0 )
-        return RC ( rcDB, rcIndex, rcRemoving, rcString, rcInvalid );
-    if ( self -> read_only )
-        return RC ( rcDB, rcIndex, rcRemoving, rcIndex, rcReadonly );
-
-    proj = false;
-    switch ( self -> type )
-    {
-    case kitText | kitProj:
-        proj = true;
-    case kitText:
-        switch ( self -> vers )
-        {
-        case 1:
-            rc = KTrieIndexDelete_v1 ( & self -> u . txt1, proj, key );
-            break;
-        case 2:
-        case 3:
-        case 4:
-            rc = KTrieIndexDelete_v2 ( & self -> u . txt2, proj, key );
-            break;
-        default:
-            return RC ( rcDB, rcIndex, rcRemoving, rcIndex, rcBadVersion );
-        }
-        break;
-    default:
-        return RC ( rcDB, rcIndex, rcRemoving, rcType, rcUnsupported );
-    }
-
-    if ( rc == 0 )
-        self -> dirty = true;
-
-    return rc;
-}
-
-
-/* Find
- *  finds a single mapping from key
- */
-LIB_EXPORT rc_t CC KIndexFindText ( const KIndex *self, const char *key, int64_t *start_id, uint64_t *id_count,
-    int ( CC * custom_cmp ) ( const void *item, struct PBSTNode const *n, void *data ),
-    void *data )
-{
-    rc_t rc = 0;
-    uint32_t id32, span;
-
-    if ( id_count != NULL )
-        * id_count = 0;
-
-    if ( start_id == NULL )
-        return RC ( rcDB, rcIndex, rcSelecting, rcParam, rcNull );
-
-    * start_id = 0;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcSelecting, rcSelf, rcNull );
-    if ( key == NULL )
-        return RC ( rcDB, rcIndex, rcSelecting, rcString, rcNull );
-    if ( key[ 0 ] == 0 )
-        return RC ( rcDB, rcIndex, rcSelecting, rcString, rcInvalid );
-
-    span = 1;
-
-    switch ( self -> type )
-    {
-    case kitText:
-    case kitText | kitProj:
-        switch ( self -> vers )
-        {
-        case 1:
-            rc = KTrieIndexFind_v1 ( & self -> u . txt1, key, & id32, custom_cmp, data );
-            if ( rc == 0 )
-                * start_id = id32;
-            break;
-        case 2:
-        case 3:
-        case 4:
-#if V2FIND_RETURNS_SPAN
-            rc = KTrieIndexFind_v2 ( & self -> u . txt2, key, start_id, & span, custom_cmp, data, self -> converted_from_v1 );
-#else
-            ( void ) ( span = 0 );
-            rc = KTrieIndexFind_v2 ( & self -> u . txt2, key, start_id, custom_cmp, data, self -> converted_from_v1  );
-#endif
-            break;
-        default:
-            return RC ( rcDB, rcIndex, rcSelecting, rcIndex, rcBadVersion );
-        }
-        break;
-    default:
-        return RC ( rcDB, rcIndex, rcSelecting, rcType, rcUnsupported );
-    }
-
-    if ( id_count != NULL )
-        * id_count = span;
-    
-    return rc;
-}
-
-
-/* FindAll
- *  finds all mappings from key
- */
-LIB_EXPORT rc_t CC KIndexFindAllText ( const KIndex *self, const char *key,
-    rc_t ( CC * f ) ( int64_t id, uint64_t id_count, void *data ), void *data )
-{
-    rc_t rc = 0;
-    int64_t id64;
-    uint32_t id32, span;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcSelecting, rcSelf, rcNull );
-    if ( f == NULL )
-        return RC ( rcDB, rcIndex, rcSelecting, rcFunction, rcNull );
-    if ( key == NULL )
-        return RC ( rcDB, rcIndex, rcSelecting, rcString, rcNull );
-    if ( key[ 0 ] == 0 )
-        return RC ( rcDB, rcIndex, rcSelecting, rcString, rcInvalid );
-
-    span = 1;
-
-    switch ( self -> type )
-    {
-    case kitText:
-    case kitText | kitProj:
-        switch ( self -> vers )
-        {
-        case 1:
-            rc = KTrieIndexFind_v1 ( & self -> u . txt1, key, & id32, NULL, NULL );
-            if ( rc == 0 )
-                rc = ( * f ) ( id32, 1, data );
-            break;
-        case 2:
-        case 3:
-        case 4:
-#if V2FIND_RETURNS_SPAN
-            rc = KTrieIndexFind_v2 ( & self -> u . txt2, key, & id64, & span, NULL, NULL, self -> converted_from_v1 );
-#else
-            rc = KTrieIndexFind_v2 ( & self -> u . txt2, key, & id64, NULL, NULL, self -> converted_from_v1 );
-#endif
-            if ( rc == 0 )
-                rc = ( * f ) ( id64, span, data );
-            break;
-        default:
-            return RC ( rcDB, rcIndex, rcSelecting, rcIndex, rcBadVersion );
-        }
-        break;
-    default:
-        return RC ( rcDB, rcIndex, rcSelecting, rcType, rcUnsupported );
-    }
-    
-    return rc;
-}
-
-
-/* Project
- *  finds key(s) mapping to value/id if supported
- */
-LIB_EXPORT rc_t CC KIndexProjectText ( const KIndex *self,
-    int64_t id, int64_t *start_id, uint64_t *id_count,
-    char *key, size_t kmax, size_t *actsize )
-{
-    rc_t rc = 0;
-    int64_t dummy;
-    uint32_t span;
-
-    if ( start_id == NULL )
-        start_id = & dummy;
-
-    * start_id = 0;
-
-    if ( id_count != NULL )
-        * id_count = 0;
-
-    if ( key == NULL && kmax != 0 )
-        return RC ( rcDB, rcIndex, rcProjecting, rcBuffer, rcNull );
-
-    if ( kmax != 0 )
-        key [ 0 ] = 0;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcProjecting, rcSelf, rcNull );
-        
-    if ( ( ( KIdxType ) self -> type & kitProj ) == 0 )
-        return RC ( rcDB, rcIndex, rcProjecting, rcFunction, rcInvalid );
-
-    span = 1;
-
-    switch ( self -> type )
-    {
-    case kitText:
-    case kitText | kitProj:
-        switch ( self -> vers )
-        {
-        case 1:
-            /* there is a limit on ids in v1 */
-            if ( id <= 0 || ( id >> 32 ) != 0 )
-                return RC ( rcDB, rcIndex, rcProjecting, rcId, rcNotFound );
-
-            rc = KTrieIndexProject_v1 ( & self -> u . txt1,
-                    ( uint32_t ) id, key, kmax, actsize );
-            if ( rc == 0 )
-                * start_id = id;
-            break;
-        case 2:
-        case 3:
-        case 4:
-#if V2FIND_RETURNS_SPAN
-            rc = KTrieIndexProject_v2 ( & self -> u . txt2, id, start_id, & span, key, kmax, actsize );
-#else
-            rc = KTrieIndexProject_v2 ( & self -> u . txt2, id, key, kmax, actsize );
-            if ( rc == 0 )
-                * start_id = id;
-#endif
-            break;
-        default:
-            return RC ( rcDB, rcIndex, rcProjecting, rcIndex, rcBadVersion );
-        }
-        break;
-    default:
-        return RC ( rcDB, rcIndex, rcProjecting, rcType, rcUnsupported );
-    }
-
-    if ( id_count != NULL )
-        * id_count = span;
-        
-    return rc;
-}
-
-
-/* ProjectAll
- *  finds key(s) mapping to value/id if supported
- */
-LIB_EXPORT rc_t CC KIndexProjectAllText ( const KIndex *self, int64_t id,
-    rc_t ( CC * f ) ( int64_t start_id, uint64_t id_count, const char *key, void *data ),
-    void *data )
-{
-    rc_t rc = 0;
-    char key [ 256 ];
-
-    uint32_t span;
-    int64_t start_id;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcIndex, rcProjecting, rcSelf, rcNull );
-    if ( f == NULL )
-        return RC ( rcDB, rcIndex, rcProjecting, rcFunction, rcNull );
-    if ( ( ( KIdxType ) self -> type & kitProj ) == 0 )
-        return RC ( rcDB, rcIndex, rcProjecting, rcFunction, rcInvalid );
-        
-    span = 1;
-
-    switch ( self -> type )
-    {
-    case kitText:
-    case kitText | kitProj:
-        switch ( self -> vers )
-        {
-        case 1:
-            /* there is a limit on ids in v1 */
-            if ( id <= 0 || ( id >> 32 ) != 0 )
-                return RC ( rcDB, rcIndex, rcProjecting, rcId, rcNotFound );
-
-            rc = KTrieIndexProject_v1 ( & self -> u . txt1,
-                ( uint32_t ) id, key, sizeof key, NULL );
-            if ( rc == 0 )
-                rc = ( * f ) ( id, 1, key, data );
-            break;
-            
-        case 2:
-        case 3:
-        case 4:
-#if V2FIND_RETURNS_SPAN
-            rc = KTrieIndexProject_v2 ( & self -> u . txt2, id, & start_id, & span, key, sizeof key, NULL );
-#else
-            rc = KTrieIndexProject_v2 ( & self -> u . txt2, id, key, sizeof key, NULL );
-#endif
-            if ( rc == 0 )
-                rc = ( * f ) ( start_id, span, key, data );
-            break;
-            
-        default:
-            return RC ( rcDB, rcIndex, rcProjecting, rcIndex, rcBadVersion );
-        }
-        break;
-    default:
-        return RC ( rcDB, rcIndex, rcProjecting, rcType, rcUnsupported );
-    }
-        
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KIndexInsertU64( KIndex *self, bool unique, uint64_t key, 
-    uint64_t key_size, int64_t id, uint64_t id_qty )
-{
-    rc_t rc = 0;
-
-    if( self == NULL ) {
-        return RC(rcDB, rcIndex, rcInserting, rcSelf, rcNull);
-    }
-    if( self->read_only ) {
-        return RC(rcDB, rcIndex, rcInserting, rcIndex, rcReadonly);
-    }
-
-    switch( self->type )
-    {
-    case kitU64:
-        switch( self->vers )
-        {
-        case 3:
-        case 4:
-            rc = KU64IndexInsert_v3(&self->u.u64_3, unique, key, key_size, id, id_qty );
-            break;
-        default:
-            return RC(rcDB, rcIndex, rcInserting, rcIndex, rcBadVersion);
-        }
-        break;
-        
-    default:
-        return RC(rcDB, rcIndex, rcInserting, rcType, rcUnsupported);
-    }
-
-    switch( GetRCState(rc) ) {
-        case 0:
-            self->dirty = true;
-            break;
-        case rcExists:
-            if( !unique ) {
-                rc = RC(rcDB, rcIndex, rcInserting, rcConstraint, rcViolated);
-            }
-        default:
-            break;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KIndexDeleteU64( KIndex *self, uint64_t key )
-{
-    rc_t rc = 0;
-
-    if( self == NULL ) {
-        return RC(rcDB, rcIndex, rcRemoving, rcSelf, rcNull);
-    }
-    if( self->read_only ) {
-        return RC(rcDB, rcIndex, rcRemoving, rcIndex, rcReadonly);
-    }
-
-    switch( self->type )
-    {
-    case kitU64:
-        switch( self->vers )
-        {
-        case 3:
-        case 4:
-            rc = KU64IndexDelete_v3(&self->u.u64_3, key);
-            break;
-        default:
-            return RC(rcDB, rcIndex, rcRemoving, rcIndex, rcBadVersion);
-        }
-        break;
-    default:
-        return RC(rcDB, rcIndex, rcRemoving, rcType, rcUnsupported);
-    }
-
-    if( rc == 0 ) {
-        self -> dirty = true;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KIndexFindU64( const KIndex* self, uint64_t offset, uint64_t* key, 
-    uint64_t* key_size, int64_t* id, uint64_t* id_qty )
-{
-    rc_t rc = 0;
-
-    if( key == NULL || key_size == NULL || id == NULL || id_qty == NULL ) {
-        return RC(rcDB, rcIndex, rcSelecting, rcParam, rcNull);
-    }
-    *key = *key_size = *id = *id_qty = 0;
-    if( self == NULL ) {
-        return RC(rcDB, rcIndex, rcSelecting, rcSelf, rcNull);
-    }
-
-    switch( self->type )
-    {
-    case kitU64:
-        switch( self->vers )
-        {
-        case 3:
-        case 4:
-            rc = KU64IndexFind_v3(&self->u.u64_3, offset, key, key_size, id, id_qty);
-            break;
-        default:
-            return RC(rcDB, rcIndex, rcSelecting, rcIndex, rcBadVersion);
-        }
-        break;
-    default:
-        return RC(rcDB, rcIndex, rcSelecting, rcType, rcUnsupported);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KIndexFindAllU64( const KIndex* self, uint64_t offset,
-    rc_t ( CC * f )(uint64_t key, uint64_t key_size, int64_t id, uint64_t id_qty, void* data ), void* data)
-{
-    rc_t rc = 0;
-
-    if( self == NULL ) {
-        return RC(rcDB, rcIndex, rcSelecting, rcSelf, rcNull);
-    }
-    if( f == NULL ) {
-        return RC(rcDB, rcIndex, rcSelecting, rcFunction, rcNull);
-    }
-
-    switch( self->type )
-    {
-    case kitU64:
-        switch( self->vers )
-        {
-        case 3:
-        case 4:
-            rc = KU64IndexFindAll_v3(&self->u.u64_3, offset, f, data);
-            break;
-        default:
-            return RC(rcDB, rcIndex, rcSelecting, rcIndex, rcBadVersion);
-        }
-        break;
-    default:
-        return RC(rcDB, rcIndex, rcSelecting, rcType, rcUnsupported);
-    }
-    return rc;
-}
-
-
-/* SetMaxId
- *  certain legacy versions of skey were built to know only the starting id
- *  of the NAME_FMT column, but were never given a maximum id. allow them
- *  to be corrected here.
- */
-LIB_EXPORT void CC KIndexSetMaxRowId ( const KIndex *cself, int64_t max_row_id )
-{
-    if ( cself != NULL ) switch ( cself -> type )
-    {
-    case kitText:
-    case kitText | kitProj:
-        switch ( cself -> vers )
-        {
-        case 2:
-        case 3:
-        case 4:
-            /* here we can repair the max row id */
-            if ( cself -> u . txt2 . pt . maxid < max_row_id )
-                ( ( KIndex* ) cself ) -> u . txt2 . pt . maxid = max_row_id;
-            break;
-        }
-        break;
-    }
-}
diff --git a/libs/kdb/wkdb-priv.h b/libs/kdb/wkdb-priv.h
deleted file mode 100644
index 5f18aba..0000000
--- a/libs/kdb/wkdb-priv.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kdb_priv_
-#define _h_kdb_priv_
-
-#ifndef _h_kdb_manager_
-#include <kdb/manager.h>
-#endif
-
-#ifndef _h_kdb_manager_
-#include <kdb/manager.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This symbol is inserted where the KDB is being tweaked to allow
- * VFS URI syntax in opening KDB database objects initially to support
- * krypto passwords more fully.  By specifying the password source
- * individually for opens two KDB objects with different passwords can be opened.
- */
-#define SUPPORT_VFS_URI 1
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct BSTree;
-struct BSTNode;
-struct KDirectory;
-struct KDBManager;
-
-/*--------------------------------------------------------------------------
- * KDB utility
- */
-
-
-/* PathType
- *  checks type of path
- *
- * if mgr != NULL we will try accession and uri resolution on path
- */
-int KDBPathTypeDir ( const struct KDirectory *dir, int type,bool *zombies, const char *path );
-int KDBPathType ( const struct KDirectory *dir, bool *zombies, const char *path );
-
-/* OpenPathType
- * Opens a path if it is of the specified type.  Even if it is an archive file
- * instead of a directory.
- *
- * if dpdir is NULL it will not return with an open Directory but it will have
- * checked that the type requested is the type present even if in an archive.
- *
- * if realpathtype is not NULL the found type will be returned regardless
- * of a match to request path type.
- *
- * the return will be zero only if the path does point to a directory or
- * archive that is of the requested type.  An archive will have been opened
- * but reshut if dpdir is NULL.
- */ 
-rc_t KDBOpenPathTypeRead ( const struct KDBManager * mgr, const struct KDirectory * dir, const char * path, 
-    const struct KDirectory ** dpdir, int pathtype, int * realpathtype, bool try_srapath );
-
-/* Writable
- *  examines a directory structure for any "lock" files
- *  examines a file for ( any ) write permission
- */
-bool KDBIsLocked ( const struct KDirectory *dir, const char *path );
-rc_t KDBWritable ( const struct KDirectory *dir, const char *path );
-
-/* Lock
- *  performs directory locking
- */
-rc_t KDBLockDir ( struct KDirectory *dir, const char *path );
-rc_t KDBLockFile ( struct KDirectory *dir, const char *path );
-
-/* Unlock
- *  performs directory unlocking
- */
-rc_t KDBUnlockDir ( struct KDirectory *dir, const char *path );
-rc_t KDBUnlockFile ( struct KDirectory *dir, const char *path );
-
-/* GetObjModDate
- *  extract mod date from a path
- */
-rc_t KDBGetObjModDate ( const struct KDirectory *dir, KTime_t *mtime );
-
-/* GetPathModDate
- *  extract mod date from a path
- */
-rc_t KDBVGetPathModDate ( const struct KDirectory *dir,
-    KTime_t *mtime, const char *path, va_list args );
-
-/* GetNamespaceString
- *  return a static const reference to a string representing 
- *  a namespace for the given kpt<database> type in namespace
- */
-const char * KDBGetNamespaceString ( int namespace );
-
-/* KDBMakeSubPath
- *  adds a namespace to path spec
- */
-rc_t KDBMakeSubPath ( struct KDirectory const *dir,
-    char *subpath, size_t subpath_max, const char *ns,
-    uint32_t ns_size, const char *path, ... );
-/* VMakeSubPath
- *  adds a namespace to path spec
- */
-rc_t KDBVMakeSubPath ( const struct KDirectory *dir,
-    char *subpath, size_t subpath_max, const char *ns,
-    uint32_t ns_size, const char *path, va_list args );
-
-/* VDrop
- */
-rc_t KDBMgrVDrop ( struct KDirectory * dir, const struct KDBManager * mgr, uint32_t obj_type,
-                   const char * path, va_list args );
-rc_t KDBVDrop ( struct KDirectory *dir, const struct KDBManager * mgr,
-    uint32_t type, const char *name, va_list args );
-
-/* Rename
- */
-rc_t KDBRename ( struct KDirectory *dir, struct KDBManager *mgr,
-                 uint32_t type, bool force, const char *from, const char *to );
-
-/* Alias
- */
-rc_t KDBAlias ( struct KDirectory *dir, uint32_t type,
-    const char *targ, const char *alias );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kdb_priv_ */
diff --git a/libs/kdb/wkdb.c b/libs/kdb/wkdb.c
deleted file mode 100644
index 783688e..0000000
--- a/libs/kdb/wkdb.c
+++ /dev/null
@@ -1,1430 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-
-#include "wkdb-priv.h"
-#include "kdbfmt-priv.h"
-#include "dbmgr-priv.h"
-
-#include <krypto/key.h>
-#include <krypto/encfile.h>
-#include <krypto/wgaencrypt.h>
-
-#include <vfs/manager.h>
-#include <vfs/path.h>
-#include <vfs/resolver.h>
-#include <vfs/manager-priv.h>
-#include <sra/srapath.h>
-
-#include <kfs/kfs-priv.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/arc.h>
-#include <kfs/tar.h>
-#include <kfs/sra.h>
-#include <kfs/kfs-priv.h>
-#include <klib/container.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <va_copy.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-#include <errno.h>
-
-#ifndef SUPPORT_VFS_URI
-#define SUPPORT_VFS_URI 0
-#endif
-
-#ifndef SUPPORT_WKDB_TAR
-#define SUPPORT_WKDB_TAR 0
-#endif
-
-/*--------------------------------------------------------------------------
- * (W)KDB utility
- */
-
-/* KDBHdrValidate
- *  validates that a header sports a supported byte order
- *  and that the version is within range
- */
-rc_t KDBHdrValidate ( const KDBHdr *hdr, size_t size,
-    uint32_t min_vers, uint32_t max_vers )
-{
-    assert ( hdr != NULL );
-
-    if ( size < sizeof * hdr )
-        return RC ( rcDB, rcHeader, rcValidating, rcData, rcCorrupt );
-
-    if ( hdr -> endian != eByteOrderTag )
-    {
-        if ( hdr -> endian == eByteOrderReverse )
-            return RC ( rcDB, rcHeader, rcValidating, rcByteOrder, rcIncorrect );
-        return RC ( rcDB, rcHeader, rcValidating, rcData, rcCorrupt );
-    }
-
-    if ( hdr -> version < min_vers || hdr -> version > max_vers )
-        return RC ( rcDB, rcHeader, rcValidating, rcHeader, rcBadVersion );
-
-    return 0;
-}
-
-/* KDBPathType
- *  checks type of path
- */
-enum ScanBits
-{
-    scan_db     = ( 1 <<  0 ),
-    scan_tbl    = ( 1 <<  1 ),
-    scan_idx    = ( 1 <<  2 ),
-    scan_col    = ( 1 <<  3 ),
-    scan_idxN   = ( 1 <<  4 ),
-    scan_data   = ( 1 <<  5 ),
-    scan_dataN  = ( 1 <<  6 ),
-    scan_md     = ( 1 <<  7 ),
-    scan_cur    = ( 1 <<  8 ),
-    scan_rNNN   = ( 1 <<  9 ),
-    scan_lock   = ( 1 << 10 ),
-    scan_odir   = ( 1 << 11 ),
-    scan_ofile  = ( 1 << 12 ),
-    scan_meta   = ( 1 << 13 ),
-    scan_skey   = ( 1 << 14 ),
-    scan_sealed = ( 1 << 15 ),
-    scan_zombie = ( 1 << 16 )
-};
-
-static
-rc_t CC scan_dbdir ( const KDirectory *dir, uint32_t type, const char *name, void *data )
-{
-    uint32_t *bits = data;
-
-    type &= kptAlias - 1;
-
-    if ( type == kptDir )
-    {
-        switch ( name [ 0 ] )
-        {
-        case 'c':
-            if ( strcmp ( name, "col" ) == 0 )
-            { * bits |= scan_col; return 0; }
-            break;
-        case 'm':
-            if ( strcmp ( name, "md" ) == 0 )
-            { * bits |= scan_md; return 0; }
-            break;
-        case 't':
-            if ( strcmp ( name, "tbl" ) == 0 )
-            { * bits |= scan_tbl; return 0; }
-            break;
-        case 'i':
-            if ( strcmp ( name, "idx" ) == 0 )
-            { * bits |= scan_idx; return 0; }
-            break;
-        case 'd':
-            if ( strcmp ( name, "db" ) == 0 )
-            { * bits |= scan_db; return 0; }
-            break;
-        }
-
-        * bits |= scan_odir;
-    }
-    else if ( type == kptFile )
-    {
-        switch ( name [ 0 ] )
-        {
-        case 'l':
-            if ( strcmp ( name, "lock" ) == 0 )
-            { * bits |= scan_lock; return 0; }
-            break;
-        case 'i':
-            if ( memcmp ( name, "idx", 3 ) == 0 )
-            {
-                if ( isdigit ( name [ 3 ] ) )
-                { * bits |= scan_idxN; return 0; }
-            }
-            break;
-        case 'd':
-            if ( memcmp ( name, "data", 4 ) == 0 )
-            {
-                if ( name [ 4 ] == 0 )
-                { * bits |= scan_data; return 0; }
-                if ( isdigit ( name [ 4 ] ) )
-                { * bits |= scan_dataN; return 0; }
-            }
-        case 'c':
-            if ( strcmp ( name, "cur" ) == 0 )
-            { * bits |= scan_cur; return 0; }
-            break;
-        case 'r':
-            if ( isdigit ( name [ 1 ] ) && isdigit ( name [ 2 ] ) &&
-                 isdigit ( name [ 3 ] ) && name [ 4 ] == 0 )
-            { * bits |= scan_rNNN; return 0; }
-            break;
-        case 'm':
-            if ( strcmp ( name, "meta" ) == 0 )
-            { * bits |= scan_meta; return 0; }
-            break;
-        case 's':
-            if ( strcmp ( name, "skey" ) == 0 )
-            { * bits |= scan_skey; return 0; }
-            if ( strcmp ( name, "sealed" ) == 0 )
-            { * bits |= scan_sealed; return 0; }
-            break;
-        }
-
-        * bits |= scan_ofile;
-    }
-    else if (type == kptZombieFile )
-    {
-        * bits |= scan_zombie;
-    }
-    
-    return 0;
-}
-
-const char *KDBGetNamespaceString ( int namespace )
-{
-    static const char * ns_array [] = { NULL, "db", "tbl", "col", "idx", "md" };
-
-    switch (namespace)
-    {
-    default:
-        return ns_array [0];
-    case kptDatabase:
-        return ns_array [1];
-    case kptTable:
-        return ns_array [2];
-    case kptColumn:
-        return ns_array [3];
-    case kptIndex:
-        return ns_array [4];
-    case kptMetadata:
-        return ns_array [5];
-    }
-}
-
-
-int KDBPathTypeDir (const KDirectory * dir, int type, bool * pHasZombies, const char * path)
-{
-    const char * leaf, * parent;
-    uint32_t bits;
-    rc_t rc;
-
-    bits = 0;
-
-    assert ((type == kptDir) || (type == (kptDir|kptAlias)));
-
-    rc = KDirectoryVisit ( dir, false, scan_dbdir, & bits, "%s", path );
-    if ( rc == 0 ) do
-    {
-        if ( ( bits & scan_zombie ) != 0 ) {
-            bits &= ~scan_zombie;
-            if (pHasZombies)
-                *pHasZombies = true;
-        }
-        /* look for a column */
-        if ( ( bits & scan_idxN ) != 0 &&
-             ( bits & ( scan_data | scan_dataN ) ) != 0 )
-        {
-            if ( ( bits & ( scan_db | scan_tbl | scan_idx | scan_col ) ) == 0 )
-                type += kptColumn - kptDir;
-            break;
-        }
-
-        /* look for a table */
-        if ( ( bits & scan_col ) != 0 )
-        {
-            /* can't have sub-tables or a db */
-            if ( ( bits & ( scan_db | scan_tbl ) ) == 0 )
-            {
-                /* look for an old-structure table */
-                if ( ( bits & ( scan_meta | scan_md ) ) == scan_meta ||
-                     ( bits & ( scan_skey | scan_idx ) ) == scan_skey )
-                    type += kptPrereleaseTbl - kptDir;
-                else
-                    type += kptTable - kptDir;
-            }
-            break;
-        }
-
-        /* look for metadata */
-        if ( ( bits & ( scan_cur | scan_rNNN ) ) != 0 )
-        {
-            if ( ( bits & ( scan_db | scan_tbl | scan_idx | scan_col ) ) == 0 )
-                type += kptMetadata - kptDir;
-            break;
-        }
-
-        /* look for a database */
-        if ( ( bits & scan_tbl ) != 0 )
-        {
-            if ( ( bits & scan_col ) == 0 )
-                type += kptDatabase - kptDir;
-            break;
-        }
-
-        /* look for a structured column */
-        if ( ( bits & scan_odir ) != 0 )
-        {
-            leaf = strrchr ( path, '/' );
-            if ( leaf != NULL )
-            {
-                parent = string_rchr ( path, leaf - path, '/' );
-                if ( parent ++ == NULL )
-                    parent = path;
-                if ( memcmp ( parent, "col/", 4 ) != 0 )
-                    break;
-
-                bits = 0;
-                if ( KDirectoryVisit ( dir, 1, scan_dbdir, & bits, "%s", path ) == 0 )
-                {
-                    if ( ( bits & scan_idxN ) != 0 &&
-                         ( bits & ( scan_data | scan_dataN ) ) != 0 )
-                    {
-                        if ( ( bits & ( scan_db | scan_tbl | scan_idx | scan_col ) ) == 0 )
-                            type += kptColumn - kptDir;
-                        break;
-                    }
-                }
-            }
-        }
-    } while (0);
-
-    return type;
-}
-
-
-int KDBPathType ( const KDirectory *dir, bool *pHasZombies, const char *path )
-{
-    const char *leaf, *parent;
-
-
-    rc_t rc;
-    int type = KDirectoryPathType ( dir, "%s", path );
-    
-    if (pHasZombies)
-        *pHasZombies = false;
-
-    switch ( type )
-    {
-    case kptDir:
-    case kptDir | kptAlias:
-        type = KDBPathTypeDir (dir, type, pHasZombies, path);
-        break;
-
-    case kptFile:
-    case kptFile | kptAlias:
-    {
-        /* if we hit a file first try it as an archive */
-        const KDirectory * ldir;
-
-        rc = KDirectoryOpenSraArchiveRead_silent ( dir, &ldir, false, "%s", path );
-#if SUPPORT_WKDB_TAR
-        if ( rc != 0 )
-            rc = KDirectoryOpenTarArchiveRead_silent ( dir, &ldir, false, "%s", path );
-#endif
-        /* it was an archive so recur */
-        if ( rc == 0 )
-        {
-            /* recheck this newly opened directory for KDB/KFS type */
-            int type2;
-
-            type2 = KDBPathType ( ldir, NULL, "." );
-            if ((type2 != kptDir) || (type != (kptDir|kptAlias)))
-                type = type2;
-
-            KDirectoryRelease (ldir);
-        }
-        /* it was not an archive so see if it it's an idx file */
-        else
-        {
-            leaf = strrchr ( path, '/' );
-            if ( leaf != NULL )
-            {
-                parent = string_rchr ( path, leaf - path, '/' );
-                if ( parent ++ == NULL )
-                    parent = path;
-                if ( memcmp ( parent, "idx/", 4 ) == 0 )
-                    type += kptIndex - kptFile;
-            }
-        }
-        break;
-    }
-    }
-    return type;
-}
-
-
-
-#if SUPPORT_VFS_URI
-#else
-/* return configured password as ASCIZ
- * opertates on vfs/kfs/kfg objects, not kdb objects */
-static
-rc_t KDBOpenFileGetPassword (char * pw, size_t pwz)
-{
-    VFSManager * mgr;
-    rc_t rc;
-
-    assert (pw);
-    assert (pwz);
-
-    pw[0] = '\0';
-
-    rc = VFSManagerMake (&mgr);
-    if (rc)
-        ;                      /* failure to make VFS manager: pass along rc */
-    else
-    {
-        size_t pwfz;
-        char pwf [4096 + 1];
-
-        rc = VFSManagerGetConfigPWFile (mgr, pwf, sizeof (pwf) - 1, &pwfz);
-        if (rc)
-            /* failure to get password file path: tweak rc */
-            rc = RC (rcDB, rcMgr, rcOpening, rcEncryptionKey, rcNotFound);
-
-        else
-        {
-            VPath * pwp;
-
-            pwf [pwfz] = '\0'; /* force to ASCIZ */
-
-#if 0
-            rc = VPathMakeSysPath (&pwp, pwf);
-#else
-            rc = VFSManagerMakePath (mgr, &pwp, "%s", pwf);
-#endif
-
-            if (rc)
-                ;       /* failure to construct a path from the string */
-            
-            else
-            {
-                const KFile * pwf;
-          
-                rc = VFSManagerOpenFileRead (mgr, &pwf, pwp);
-                if (rc)
-                    /* failure to open password file */
-                    rc = RC (rcDB, rcMgr, rcOpening, rcEncryptionKey, rcNotOpen);
-
-                else
-                {
-                    size_t z;
-                    char pwb [4098]; /* arbitrarily using 4096 as maximum
-                                        allowed length */
-
-                    /* at this point we are only getting the password from a 
-                     * file but in the future if we can get it from a pipe of
-                     * some sort we can't count on the ReadAll to really know
-                     * if we hit end of file and not just a pause in the
-                     * streaming.  VFS/KFS 2 will have to fix this somehow
-                     */
-
-                    rc = KFileReadAll (pwf, 0, pwb, sizeof pwb, &z);
-                    if (rc)
-                        ;       /* failure to read password file: pass along rc */
-                    else
-                    {
-                        /* trim off EOL if present */
-                        char * pc;
-
-                        pwb[z] = '\0';   /* force ASCIZ */
-
-                        pc = string_chr (pwb, z, '\r');
-                        if (pc)
-                        {
-                            *pc = '\0';
-                            z = 1 + pc - pwb;
-                        }
-                        pc = string_chr (pwb, z, '\n');
-                        if (pc)
-                        {
-                            *pc = '\0';
-                            z = 1 + pc - pwb;
-                        }
-                        if (z == 0)
-                            rc = RC (rcDB, rcMgr, rcOpening, rcEncryptionKey, rcTooShort);
-
-                        else if (pwz < z) /* pwz came in as 4096 */
-                            rc = RC (rcDB, rcMgr, rcOpening, rcEncryptionKey, rcTooLong);
-
-                        else
-                        {
-                            memmove (pw, pwb, z+1);
-                        }
-                    }
-                    KFileRelease (pwf);
-                }
-                VPathRelease (pwp);
-            }
-        }
-        VFSManagerRelease (mgr);
-    }
-    return rc;
-}
-
-
-/* not KDB specific - just uses vfs/krypto/kfs objects */
-static
-rc_t KDBOpenFileAsDirectory (const KDirectory * dir,
-                             const char * path, 
-                             const KDirectory ** pdir,
-                             uint32_t rcobj)
-{
-    const KFile * file;
-    const KFile * f;
-    const KDirectory * ldir;
-    bool encrypted = false;
-
-    rc_t rc;
-
-    *pdir = NULL;
-
-    rc = KDirectoryOpenFileRead (dir, &file, "%s", path);
-    if (rc == 0)
-    {
-        rc = KFileRandomAccess(file);
-        if (rc)
-            rc = RC (rcDB, rcMgr, rcOpening, rcobj, rcUnsupported);
-        else
-        {
-            size_t tz;
-            char tbuff [4096];
-            char pbuff [4096 + 1];
-
-            rc = KFileReadAll (file, 0, tbuff, sizeof tbuff, &tz);
-            if (rc == 0)
-            {
-                if (KFileIsEnc (tbuff, tz) == 0)
-                {
-                    encrypted = true;
-
-                    rc = KDBOpenFileGetPassword (pbuff, sizeof (pbuff) - 1);
-                    if (rc == 0)
-                    {
-                        KKey key;
-
-                        rc = KKeyInitRead (&key, kkeyAES128, pbuff, string_size (pbuff));
-                        if (rc == 0)
-                        {
-                            rc = KEncFileMakeRead (&f, file, &key);
-                            if (rc == 0)
-                            {
-                                /* KEncFileMakeRead adds a reference */
-                                KFileRelease (file);
-                                file = f;
-                                rc = KFileReadAll (file, 0, tbuff, sizeof tbuff, &tz);
-                            }
-                        }
-                    }
-                }
-                else if (KFileIsWGAEnc (tbuff, tz) == 0)
-                {
-                    encrypted = true;
-
-                    rc = KDBOpenFileGetPassword (pbuff, sizeof (pbuff) - 1);
-                    if (rc == 0)
-                    {
-                        rc = KFileMakeWGAEncRead (&f, file, pbuff, string_size (pbuff));
-                        if (rc == 0)
-                        {
-                            /* KFileMakeWGAEncRead adds a reference */
-                            KFileRelease (file);
-                            file = f;
-                            rc = KFileReadAll (file, 0, tbuff, sizeof tbuff, &tz);
-                        }
-                    }
-                }
-                /* else not a handled encryption or unencrypted: we can't distinguish too much */
-
-                if (rc == 0)
-                {
-                    if (KFileIsSRA (tbuff, tz) == 0)
-                    {
-                        rc = KDirectoryOpenSraArchiveReadUnbounded_silent_preopened (dir,
-                                                                                     &ldir,
-                                                                                     false,
-                                                                                     file,
-                                                                                     "%s", 
-                                                                                     path);
-                    }
-                    else
-                    {
-#if SUPPORT_WKDB_TAR
-                        rc = KDirectoryOpenTarArchiveRead_silent_preopened (dir, &ldir, false,
-                                                                            file, "%s", path);
-                        if (rc == 0)
-                            KFileRelease (file);
-#else
-                        /* will be reset immediately below */
-                        rc = -1;
-#endif
-                    }
-
-                    /* not an archive type we handle or a bad archive */
-                    if (rc)
-                    {
-                        if (encrypted)
-                            rc = RC ( rcDB, rcMgr, rcOpening, rcEncryptionKey, rcIncorrect );
-                        else
-                            rc = RC ( rcDB, rcMgr, rcOpening, rcPath, rcIncorrect );
-                    }
-                    else
-                    {
-                        /*
-                         * release our ownership of the KFile that but archive will 
-                         * keep theirs
-                         */
-                        KFileRelease (file);
-                        *pdir = ldir;
-                        return 0;
-                    }
-                }
-            }
-        }
-        KFileRelease (file);
-    }
-    return rc;
-}
-#endif
-
-
-static rc_t KDBOpenPathTypeReadInt ( const KDBManager * mgr, const KDirectory * dir, const char * path,
-                                     const KDirectory ** pdir, int * type,
-                                     int pathtype, uint32_t rcobj, bool try_srapath )
-{
-    VFSManager * vmgr = mgr->vfsmgr;
-    const KDirectory * ldir = NULL;
-    rc_t rc = 0;
-
-    /* object relative opens can be done using KFS - we hacked in VFS after all */
-    if (! try_srapath)
-    {
-        rc = KDirectoryOpenDirUpdate ((KDirectory*)dir, (KDirectory**)pdir, false, "%s", path);
-        if ((rc) && (GetRCState(rc) != rcNotFound))
-            rc = KDirectoryOpenDirRead (dir, pdir, false, "%s", path);
-    }
-    else
-    {
-        VPath * vpath;
-
-        /*
-         * We've got to decide if the path coming in is a full or relative
-         * path and if relative make it relative to dir or possibly its a srapath
-         * accession
-         *
-         */
-        rc = VPathMakeDirectoryRelative ( &vpath, dir, path );
-        if ( rc == 0 )
-        {
-            rc = VFSManagerOpenDirectoryReadDirectoryRelativeDecrypt ( vmgr, dir, &ldir, vpath );
-
-            if ( rc == 0 )
-            {
-                *type = (~kptAlias) & KDBPathType ( ldir, NULL, "." );
-
-                /* just a directory, not a kdb type */
-                if ( *type == kptDir )
-                    rc = RC (rcDB, rcMgr, rcOpening, rcPath, rcIncorrect);
-
-                else if ( *type != pathtype )
-                {
-                    KDirectoryRelease( ldir );
-                    rc = RC ( rcDB, rcMgr, rcOpening, rcobj, rcIncorrect );
-                }
-                else
-                {
-                    if ( pdir != NULL )
-                        *pdir = ldir;
-                    else
-                        KDirectoryRelease( ldir );
-                }
-            }
-            VPathRelease ( vpath );
-        }
-    }
-    return rc;
-}
-
-rc_t KDBOpenPathTypeRead ( const KDBManager * mgr, const KDirectory * dir, const char * path, 
-    const KDirectory ** pdir, int pathtype, int * ppathtype, bool try_srapath )
-{
-    const KDirectory *ldir;
-    rc_t rc = 0;
-    uint32_t rcobj;
-    int type = kptNotFound; /* bogus? */
-
-/*     KOutMsg ("%s: %s\n", __func__, path); */
-
-    if ( pdir != NULL )
-        *pdir = NULL;
-    if ( ppathtype != NULL )
-        *ppathtype = type;
-
-    switch (pathtype & ~ kptAlias) /* tune the error message based on path type */
-    {
-        /* we'll hit this if we don't track defines in kdb/manager.h */
-    default:
-        rc = RC (rcDB, rcMgr, rcOpening, rcType, rcInvalid);
-        return rc;
-
-    case kptTable:
-    case kptPrereleaseTbl:
-        rcobj = rcTable;
-        break;
-
-    case kptColumn:
-        rcobj = rcColumn;
-        break;
-
-    case kptDatabase:
-    case kptDatabase | kptAlias:
-        rcobj = rcDatabase;
-        break;
-    }
-
-    rc = KDBOpenPathTypeReadInt( mgr, dir, path, &ldir, &type, pathtype, rcobj, try_srapath );
-
-    if (rc == 0)
-    {
-        if ( ppathtype != NULL )
-            *ppathtype = type;
-
-        if (pdir != NULL)
-            *pdir = ldir;
-        else
-            KDirectoryRelease (ldir);
-    }
-
-    return rc;
-}
-
-
-/* Writable
- *  examines a directory structure for any reason it can't be opened for update
- *  NOTE: will not currently check for archive
- */
-rc_t KDBWritable ( const KDirectory *dir, const char *path )
-{
-    uint32_t access;
-    rc_t rc;
-
-    /* protect us from bad parameters */
-    if (dir == NULL)
-        return RC (rcDB, rcPath, rcAccessing, rcDirectory, rcNull);
-    if (path == NULL)
-        return RC (rcDB, rcPath, rcAccessing, rcPath, rcNull);
-
-    /* we have to be able to check the access if it is to be writable */
-    rc = KDirectoryAccess ( dir, & access, "%s", path );
-    if ( rc == 0 )
-    {
-        int kpt;
-
-        /* we could use KDBPathType with some modifications */
-        kpt = KDirectoryPathType (dir, "%s", path) & ~kptAlias;
-        switch (kpt)
-        {
-        case kptDir:
-            /* if there is a lock (or deprecated sealed) file in this directory */
-            switch ( KDirectoryPathType ( dir, "%s/lock", path ) )
-            {
-            case kptFile:
-            case kptFile | kptAlias:
-                rc = RC (rcDB, rcPath, rcAccessing, rcLock, rcLocked );
-                break;
-            case kptNotFound:
-                /* much simpler handling for the sealed file */
-                switch ( KDirectoryPathType ( dir, "%s/sealed", path ) )
-                {
-                case kptFile:
-                case kptFile | kptAlias:
-                    rc = RC (rcDB, rcPath, rcAccessing, rcLock, rcLocked );
-                    break;
-                case kptNotFound:
-                    if ( ( access & 0222 ) == 0 )
-                        rc = RC (rcDB, rcPath, rcAccessing, rcPath, rcReadonly );
-                    /* else rc is still 0 from VAccess */
-                }
-                break;
-            case kptBadPath:
-                /* likely to be a non-directory or something */
-                rc = RC (rcDB, rcPath, rcAccessing, rcPath, rcInvalid);
-                break;
-            default:
-                /* an illegal type of object named "lock" is in this directory
-                 * which will block the ability to lock it
-                 */
-                rc = RC (rcDB, rcPath, rcAccessing, rcPath, rcUnexpected);
-            }
-            break;
-        case kptFile:
-            /* if there is a lock (or deprecated sealed) file in this directory */
-            switch ( KDirectoryPathType ( dir, "%s.lock", path ) )
-            {
-            case kptFile:
-            case kptFile | kptAlias:
-                rc = RC ( rcDB, rcPath, rcAccessing, rcLock, rcLocked );
-                break;
-            case kptNotFound:
-                break;
-            case kptBadPath:
-                /* unlikely */
-                rc = RC (rcDB, rcPath, rcAccessing, rcPath, rcInvalid);
-                break;
-            default:
-                /* an illegal type of object named "lock" is in this directory
-                 * which will block the ability to lock it
-                 */
-                rc = RC (rcDB, rcPath, rcAccessing, rcPath, rcUnexpected);
-            }
-            break;
-        case kptBadPath:
-            /* likely to be a non-driectory or something */
-            rc = RC ( rcDB, rcPath, rcAccessing, rcPath, rcInvalid);
-            break;
-        default:
-            /* an illegal type of object named "lock" is in this directory
-             * which will block the ability to lock it
-             */
-            rc = RC (rcDB, rcPath, rcAccessing, rcPath, rcUnexpected);
-        }
-    }
-    return rc;
-}
-
-
-bool KDBIsLocked ( const KDirectory *dir, const char *path )
-{
-
-    rc_t rc = KDBWritable (dir, path);
-    if (GetRCState (rc) == rcLocked)
-        return true;
-    return false;
-}
-
-
-/* Lock
- *  performs directory locking
- */
-rc_t KDBLockDir ( KDirectory *dir, const char *path )
-{
-    KFile *f;
-    rc_t rc;
-
-    if (dir == NULL)
-        return RC (rcDB, rcLock, rcLocking, rcDirectory, rcNull);
-    if (path == NULL)
-        return RC (rcDB, rcLock, rcLocking, rcPath, rcNull);
-
-    rc = KDirectoryCreateFile ( dir, & f, 0, 0444, kcmOpen, "%s/lock", path );
-    if ( rc == 0 )
-    {
-        KFileRelease ( f );
-        rc = KDirectorySetAccess ( dir, 1, 0, 0222, "%s", path );
-    }
-    return rc;
-}
-
-rc_t KDBLockFile ( KDirectory *dir, const char *path )
-{
-    KFile *f;
-    rc_t rc;
-
-    if (dir == NULL)
-        return RC (rcDB, rcLock, rcLocking, rcDirectory, rcNull);
-    if (path == NULL)
-        return RC (rcDB, rcLock, rcLocking, rcPath, rcNull);
-
-    rc = KDirectoryCreateFile ( dir, & f, false, 0444, kcmOpen, "%s.lock", path );
-    if ( rc == 0 )
-    {
-        KFileRelease ( f );
-        rc = KDirectorySetAccess ( dir, 0, 0, 0222, "%s", path );
-    }
-    return rc;
-}
-
-/* Unlock
- *  performs directory unlocking
- */
-static
-rc_t CC KDBUnlockVisitor ( KDirectory *dir, uint32_t type, const char *name, void *data )
-{
-    switch ( type )
-    {
-    case kptFile:
-    case kptFile | kptAlias:
-
-        /* don't ever unlock frozen metadata revisions */
-        if ( name [ 0 ] == 'r' )
-        {
-            char *end;
-            strtoul ( name + 1, & end, 10 );
-            if ( end [ 0 ] == 0 )
-                return 0;
-        }
-
-        return KDirectorySetAccess ( dir, false, 0220, 0222, "%s", name );
-
-    case kptDir:
-    case kptDir | kptAlias:
-        if ( KDirectoryPathType ( dir, "%s/lock", name ) == kptNotFound )
-        {
-            rc_t rc = KDirectorySetAccess ( dir, 0, 0220, 0222, "%s", name );
-            if ( rc == 0 )
-            {
-                rc = KDirectoryVisitUpdate ( dir, false,
-                                              KDBUnlockVisitor, NULL, "%s", name );
-            }
-            return rc;
-        }
-        break;
-    }
-
-    return 0;
-}
-
-rc_t KDBUnlockDir ( KDirectory *dir, const char *path )
-{
-    /* change directory access bits */
-    rc_t rc;
-
-    if (dir == NULL)
-        return RC (rcDB, rcLock, rcLocking, rcDirectory, rcNull);
-    if (path == NULL)
-        return RC (rcDB, rcLock, rcLocking, rcPath, rcNull);
-
-    rc = KDirectorySetAccess ( dir, false, 0220, 0222, "%s", path );
-    if ( rc == 0 )
-    {
-        /* remove lock file */
-        rc = KDirectoryRemove ( dir, false, "%s/lock", path );
-        if ( rc == 0 || GetRCState ( rc ) == rcNotFound )
-            rc = KDirectoryRemove ( dir, false, "%s/sealed", path );
-
-        /* recursively unlock everything underneath
-           that is not itself explicitly locked */
-        if ( rc == 0 || GetRCState ( rc ) == rcNotFound )
-            rc = KDirectoryVisitUpdate ( dir, false, KDBUnlockVisitor, NULL, "%s", path );
-    }
-    return rc;
-
-}
-
-rc_t KDBUnlockFile ( KDirectory *dir, const char *path )
-{
-    rc_t rc;
-
-    if (dir == NULL)
-        return RC (rcDB, rcLock, rcLocking, rcDirectory, rcNull);
-    if (path == NULL)
-        return RC (rcDB, rcLock, rcLocking, rcPath, rcNull);
-
-    rc = KDirectoryRemove ( dir, true, "%s.lock", path );
-    if ( rc == 0 )
-    {
-        rc = KDirectorySetAccess ( dir, false, 0220, 0222, "%s", path );
-    }
-    return rc;
-}
-
-
-/* GetObjModDate
- *  extract mod date from a path
- */
-rc_t KDBGetObjModDate ( const KDirectory *dir, KTime_t *mtime )
-{
-    /* HACK ALERT - there needs to be a proper way to record modification times */
-    
-    /* this only tells the last time the table was locked,
-       which may be close to the last time it was modified */
-    rc_t rc = KDirectoryDate ( dir, mtime, "lock" );
-    if ( rc == 0 )
-        return 0;
-
-    if ( GetRCState ( rc ) == rcNotFound )
-    {
-        rc = KDirectoryDate ( dir, mtime, "sealed" );
-        if ( rc == 0 )
-            return 0;
-    }
-
-    /* get directory timestamp */
-    rc = KDirectoryDate ( dir, mtime, "." );
-    if ( rc == 0 )
-        return 0;
-
-    * mtime = 0;
-    return rc;
-}
-
-/* GetPathModDate
- *  extract mod date from a path
- */
-rc_t KDBVGetPathModDate ( const KDirectory *dir,
-    KTime_t *mtime, const char *path, va_list args )
-{
-    rc_t rc;
-    uint32_t ptype;
-    const KDirectory *obj_dir;
-
-    va_list cpy;
-    va_copy ( cpy, args );
-    ptype = KDirectoryVPathType ( dir, path, cpy );
-    va_end ( cpy );
-
-    switch ( ptype )
-    {
-    case kptDir:
-    case kptDir | kptAlias:
-        break;
-
-    default:
-        return KDirectoryVDate ( dir, mtime, path, args );
-    }
-
-    * mtime = 0;
-    rc = KDirectoryVOpenDirRead ( dir, & obj_dir, true, path, args );
-    if ( rc == 0 )
-    {
-        rc = KDBGetObjModDate ( obj_dir, mtime );
-        KDirectoryRelease ( obj_dir );
-    }
-
-    return rc;
-}
-
-
-/* KDBVMakeSubPath
- *  adds a namespace to path spec
- */
-rc_t KDBVMakeSubPath ( struct KDirectory const *dir,
-    char *subpath, size_t subpath_max, const char *ns,
-    uint32_t ns_size, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( ns_size > 0 )
-    {
-        subpath += ns_size + 1;
-        subpath_max -= ns_size + 1;
-    }
-
-#if CRUFTY_USE_OF_RESOLVE_PATH
-    /* because this call only builds a path instead of resolving anything
-     * is is okay that we are using the wrong directory */
-    rc = KDirectoryVResolvePath ( dir, false,
-        subpath, subpath_max, path, args );
-#else
-    {
-        int sz = vsnprintf ( subpath, subpath_max, path, args );
-        if ( sz < 0 || ( size_t ) sz >= subpath_max )
-            rc = RC ( rcDB, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-        else if ( sz == 0 )
-            rc = RC ( rcDB, rcDirectory, rcResolving, rcPath, rcEmpty );
-        else
-        {
-            rc = 0;
-        }
-    }
-#endif
-    switch ( GetRCState ( rc ) )
-    {
-    case 0:
-        assert ( subpath [ 0 ] != 0 );
-        if ( subpath [ 0 ] == '.' || subpath [ 1 ] == '/' )
-            return RC ( rcDB, rcDirectory, rcResolving, rcPath, rcInvalid );
-        break;
-    case rcInsufficient:
-        return RC ( rcDB, rcDirectory, rcResolving, rcPath, rcExcessive );
-    default:
-        return rc;
-    }
-
-    if ( ns_size != 0 )
-    {
-        subpath -= ns_size + 1;
-        memcpy ( subpath, ns, ns_size );
-        subpath [ ns_size ] = '/';
-    }
-    return 0;
-}
-
-/* KDBMakeSubPath
- *  adds a namespace to path spec
- */
-rc_t KDBMakeSubPath ( struct KDirectory const *dir,
-    char *subpath, size_t subpath_max, const char *ns,
-    uint32_t ns_size, const char *path, ... )
-{
-    rc_t rc = 0;
-    va_list args;
-    va_start(args, path);
-    rc = KDBVMakeSubPath(dir, subpath, subpath_max, ns, ns_size, path, args);
-    va_end(args);
-    return rc;
-}
-
-/* VDrop
- */
-static
-rc_t KDBDropInt ( KDirectory * dir, const KDBManager * mgr,
-                  const char * path )
-{
-    if (KDBManagerOpenObjectBusy (mgr, path))
-        return RC ( rcDB, rcDirectory, rcRemoving, rcPath, rcBusy );
-
-    return KDirectoryRemove ( dir, 1, "%s", path );
-}
-
-rc_t KDBMgrVDrop ( KDirectory * dir, const KDBManager * mgr, uint32_t obj_type,
-                   const char * path, va_list args )
-{
-    rc_t rc;
-    char full_path [ 4096 ];
-
-    rc = KDirectoryVResolvePath ( dir, true, full_path, sizeof (full_path),
-                                  path, args );
-    if (rc == 0)
-    {
-        int pt = KDBPathType ( /*mgr,*/ dir, NULL, full_path );
-        switch ( pt )
-        {
-        case kptNotFound:
-            return RC ( rcDB, rcDirectory, rcRemoving, rcPath, rcNotFound );
-        case kptBadPath:
-            return RC ( rcDB, rcDirectory, rcRemoving, rcPath, rcInvalid );
-
-        case kptDatabase | kptAlias:
-        case kptTable | kptAlias:
-        case kptIndex | kptAlias:
-        case kptColumn | kptAlias:
-        case kptDatabase:
-        case kptTable:
-        case kptIndex:
-        case kptColumn:
-            /* this really needs a new rcWrongType or similar RCState */
-            if ((obj_type != kptAny) && (obj_type != (pt & ~kptAlias)))
-                return RC ( rcDB, rcDirectory, rcRemoving, rcPath, rcIncorrect );
-            break;
-
-        case kptFile | kptAlias:
-        case kptFile:
-	    /* can we get here?  Will we have needed to open for update to get here? */
-/* 	    rc = KDBOpenPathTypeRead ( dir, path, NULL, type, NULL ); */
-/* 	    if ( rc == 0 ) */
-/*                 return RC ( rcDB, rcDirectory, rcRemoving, rcPath, rcReadonly ); */
-            /* fall through */
-        default:
-            return RC ( rcDB, rcDirectory, rcRemoving, rcPath, rcIncorrect );
-        }
-        if (rc == 0)
-        {
-            rc = KDBDropInt ( dir, mgr, full_path );
-        }
-    }
-    return rc;
-}
-
-
-rc_t KDBVDrop ( KDirectory *dir, const KDBManager * mgr,
-    uint32_t type, const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 4096 ];
-
-    int ns_size;
-    const char *ns;
-
-    switch ( type )
-    {
-    case kptDatabase:
-        ns = "db"; ns_size = 2; break;
-    case kptTable:
-        ns = "tbl"; ns_size = 3; break;
-    case kptIndex:
-        ns = "idx"; ns_size = 3; break;
-    case kptColumn:
-        ns = "col"; ns_size = 3; break;
-    default:
-        return RC ( rcDB, rcDirectory, rcRemoving, rcType, rcIncorrect );
-    }
-
-    rc = KDBVMakeSubPath ( dir,
-        path, sizeof path, ns, ns_size, name, args );
-    if ( rc == 0 )
-    {
-        int pt = KDBPathType ( /*mgr,*/ dir, NULL, path );
-        switch ( pt )
-        {
-        case kptNotFound:
-            return RC ( rcDB, rcDirectory, rcRemoving, rcPath, rcNotFound );
-        case kptBadPath:
-            return RC ( rcDB, rcDirectory, rcRemoving, rcPath, rcInvalid );
-
-        case kptDatabase | kptAlias:
-        case kptTable | kptAlias:
-        case kptIndex | kptAlias:
-        case kptColumn | kptAlias:
-            pt -= kptAlias;
-
-        case kptDatabase:
-        case kptTable:
-        case kptIndex:
-        case kptColumn:
-            if ( pt == type )
-                break;
-
-        case kptFile | kptAlias:
-        case kptFile:
-	    /* can we get here?  Will we have needed to open for update to get here? */
-	    rc = KDBOpenPathTypeRead ( mgr, dir, path, NULL, type, NULL, false );
-	    if ( rc == 0 )
-                return RC ( rcDB, rcDirectory, rcRemoving, rcPath, rcReadonly );
-            /* fall through */
-        default:
-            return RC ( rcDB, rcDirectory, rcRemoving, rcPath, rcIncorrect );
-        }
-
-        rc = KDirectoryResolvePath ( dir, true, path, sizeof path, "%s", path );
-        if ( rc == 0 )
-        {
-            rc = KDBWritable ( dir, "." );
-            switch (GetRCState(rc))
-            {
-            default:
-                rc = RC ( rcDB, rcDirectory, rcRemoving, rcTable, rcUnexpected );
-                break;
-            case rcLocked:
-                rc = RC ( rcDB, rcDirectory, rcRemoving, rcTable, rcLocked );
-                break;
-            case rcReadonly:
-                rc = RC ( rcDB, rcDirectory, rcRemoving, rcTable, rcReadonly );
-                break;
-            case 0:
-                rc = KDBDropInt ( dir, mgr, path );                
-                break;
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* Rename
- */
-rc_t KDBRename ( KDirectory *dir, KDBManager *mgr, uint32_t type, bool force,
-    const char *from, const char *to )
-{
-    rc_t rc;
-    char src [ 4096 ];
-
-    int ns_size;
-    const char *ns;
-
-    switch ( type )
-    {
-    case kptDatabase:
-        ns = "db"; ns_size = 2; break;
-    case kptTable:
-        ns = "tbl"; ns_size = 3; break;
-    case kptIndex:
-        ns = "idx"; ns_size = 3; break;
-    case kptColumn:
-        ns = "col"; ns_size = 3; break;
-    default:
-        return RC ( rcDB, rcDirectory, rcRenaming, rcType, rcIncorrect );
-    }
-
-    rc = KDBMakeSubPath ( dir,
-        src, sizeof src, ns, ns_size, from);
-    if ( rc == 0 )
-    {
-        char dst [ 256 ];
-        int pt = KDBPathType ( /*mgr,*/ dir, NULL, src );
-        switch ( pt )
-        {
-        case kptNotFound:
-            return RC ( rcDB, rcDirectory, rcRenaming, rcPath, rcNotFound );
-        case kptBadPath:
-            return RC ( rcDB, rcDirectory, rcRenaming, rcPath, rcInvalid );
-
-        case kptDatabase | kptAlias:
-        case kptTable | kptAlias:
-        case kptIndex | kptAlias:
-        case kptColumn | kptAlias:
-            pt -= kptAlias;
-
-        case kptDatabase:
-        case kptTable:
-        case kptIndex:
-        case kptColumn:
-            if ( pt == type )
-                break;
-
-        default:
-            return RC ( rcDB, rcDirectory, rcRenaming, rcPath, rcIncorrect );
-        }
-
-        rc = KDBMakeSubPath ( dir,
-            dst, sizeof dst, ns, ns_size, to );
-        if ( rc == 0 )
-        {
-            if ( KDirectoryPathType ( dir, "%s", dst ) != kptNotFound )
-                return RC ( rcDB, rcDirectory, rcRenaming, rcPath, rcIncorrect );
-
-            rc = KDirectoryResolvePath ( dir, 1, src, sizeof src, "%s", src );
-            if ( rc == 0 )
-            {
-                if (KDBManagerOpenObjectBusy (mgr, src))
-                    return RC ( rcDB, rcDirectory, rcRenaming, rcPath, rcBusy );
-                if (KDBManagerOpenObjectBusy (mgr, dst))
-                    return RC ( rcDB, rcDirectory, rcRenaming, rcPath, rcBusy );
-
-                rc = KDBWritable ( dir, "." );
-                switch (GetRCState(rc))
-                {
-                default:
-                    rc = RC ( rcDB, rcDirectory, rcRenaming, rcTable, rcUnexpected );
-                    break;
-                case rcLocked:
-                    rc = RC ( rcDB, rcDirectory, rcRenaming, rcTable, rcLocked );
-                    break;
-                case rcReadonly:
-                    rc = RC ( rcDB, rcDirectory, rcRenaming, rcTable, rcReadonly );
-                    break;
-                case 0:
-                    rc = KDirectoryRename ( dir, force, src, dst );
-                    break;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* Alias
- */
-rc_t KDBAlias ( KDirectory *dir, uint32_t type,
-    const char *targ, const char *alias )
-{
-    rc_t rc;
-    char src [ 256 ];
-
-    int ns_size;
-    const char *ns;
-
-    switch ( type )
-    {
-    case kptDatabase:
-        ns = "db"; ns_size = 2; break;
-    case kptTable:
-        ns = "tbl"; ns_size = 3; break;
-    case kptIndex:
-        ns = "idx"; ns_size = 3; break;
-    case kptColumn:
-        ns = "col"; ns_size = 3; break;
-    default:
-        return RC ( rcDB, rcDirectory, rcAliasing, rcType, rcIncorrect );
-    }
-
-    rc = KDBMakeSubPath ( dir,
-        src, sizeof src, ns, ns_size, targ );
-    if ( rc == 0 )
-    {
-        char dst [ 256 ];
-        int pt = KDBPathType ( /*NULL,*/ dir, NULL, src );
-        switch ( pt )
-        {
-        case kptNotFound:
-            return RC ( rcDB, rcDirectory, rcAliasing, rcPath, rcNotFound );
-        case kptBadPath:
-            return RC ( rcDB, rcDirectory, rcAliasing, rcPath, rcInvalid );
-
-        case kptDatabase | kptAlias:
-        case kptTable | kptAlias:
-        case kptIndex | kptAlias:
-        case kptColumn | kptAlias:
-            pt &= ~ kptAlias;
-
-        case kptDatabase:
-        case kptTable:
-        case kptIndex:
-        case kptColumn:
-            if ( pt == type )
-                break;
-
-        default:
-            return RC ( rcDB, rcDirectory, rcAliasing, rcPath, rcIncorrect );
-        }
-
-        rc = KDBMakeSubPath ( dir,
-            dst, sizeof dst, ns, ns_size, alias );
-        if ( rc == 0 )
-        {
-            rc = KDirectoryCreateAlias ( dir,
-                0775, kcmCreate, src, dst );
-        }
-    }
-
-    return rc;
-}
-
-
-/* KDBIsPathUri
- * A hack to get some of VFS into KDB that is too tightly bound to KFS
- */
-
-bool KDBIsPathUri (const char * path)
-{
-    const char * pc;
-    size_t z;
-
-    z = string_size (path);
-
-    if (NULL != (pc = string_chr (path, z, ':')))
-        return true;
-
-    if (NULL != (pc = string_chr (path, z, '?')))
-        return true;
-
-    if (NULL != (pc = string_chr (path, z, '#')))
-        return true;
-
-    return false;
-}
diff --git a/libs/kdb/wmeta.c b/libs/kdb/wmeta.c
deleted file mode 100644
index 9f0e0d4..0000000
--- a/libs/kdb/wmeta.c
+++ /dev/null
@@ -1,3526 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define TRACK_REFERENCES 0
-
-struct KMDataNodeNamelist;
-#define KNAMELIST_IMPL struct KMDataNodeNamelist
-
-#include <kdb/extern.h>
-#include "wkdb-priv.h"
-#include "dbmgr-priv.h"
-#include "database-priv.h"
-#include "wtable-priv.h"
-#include "wcolumn-priv.h"
-#include "kdbfmt-priv.h"
-
-#include <kdb/meta.h>
-#include <kdb/namelist.h>
-#include <klib/container.h>
-#include <klib/pbstree.h>
-#include <klib/namelist.h>
-#include <klib/impl.h>
-#include <kfs/file.h>
-#include <kfs/mmap.h>
-#include <kfs/md5.h>
-#include <klib/symbol.h>
-#include <klib/refcount.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <atomic.h>
-#include <os-native.h>
-#include <sysalloc.h>
-#include <strtol.h>
-
-#ifndef TRACK_REFERENCES
-#define TRACK_REFERENCES 0
-#endif
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <byteswap.h>
-#include <assert.h>
-
-#define KMETADATAVERS 2
-#define NODE_SIZE_LIMIT ( 25 * 1024 * 1024 )
-#define NODE_CHILD_LIMIT ( 100 * 1024 )
-
-
-typedef struct KMDataNodeInflateData KMDataNodeInflateData;
-struct KMDataNodeInflateData
-{
-    KMetadata *meta;
-    KMDataNode *par;
-    BSTree *bst;
-    size_t node_size_limit;
-    uint32_t node_child_limit;
-    rc_t rc;
-    bool byteswap;
-};
-
-/*--------------------------------------------------------------------------
- * KMetadata
- *  a versioned, hierarchical structure
- */
-struct KMetadata
-{
-    BSTNode n;
-
-    KDirectory *dir;
-    KDBManager *mgr;
-
-    /* owner */
-    KDatabase *db;
-    KTable *tbl;
-    KColumn *col;
-
-    KMD5SumFmt * md5;
-
-    /* root node */
-    KMDataNode *root;
-
-    KSymbol sym;
-
-    KRefcount refcount;
-    uint32_t opencount;
-    uint32_t vers;
-    uint32_t rev;
-    uint8_t read_only;
-    uint8_t dirty;
-    bool byteswap;
-
-    char path [ 1 ];
-};
-
-static
-KMetadata *KMetadataAttach ( const KMetadata *self );
-
-static
-rc_t KMetadataSever ( const KMetadata *self );
-
-
-/*--------------------------------------------------------------------------
- * KMAttrNode
- */
-typedef struct KMAttrNode KMAttrNode;
-struct KMAttrNode
-{
-    BSTNode n;
-    void *value;
-    size_t vsize;
-    char name [ 1 ];
-};
-
-static
-int64_t CC KMAttrNodeCmp ( const void *item, const BSTNode *n )
-{
-#define a ( ( const char* ) item )
-#define b ( ( const KMAttrNode* ) n )
-
-    return strcmp ( a, b -> name );
-
-#undef a
-#undef b
-}
-
-static
-int64_t CC KMAttrNodeSort ( const BSTNode *item, const BSTNode *n )
-{
-#define a ( ( const KMAttrNode* ) item )
-#define b ( ( const KMAttrNode* ) n )
-
-    return strcmp ( a -> name, b -> name );
-
-#undef a
-#undef b
-}
-
-static
-void CC KMAttrNodeWhack ( BSTNode *n, void *data )
-{
-    free ( n );
-}
-
-static
-bool CC KMAttrNodeInflate ( PBSTNode *n, void *data )
-{
-    KMAttrNode *b;
-    KMDataNodeInflateData *pb = data;
-
-    const char *name = n -> data . addr;
-    size_t size = strlen ( name );
-    if ( size >= n -> data . size )
-    {
-        pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcData, rcCorrupt );
-        return true;
-    }
-
-    /* v2 attributes are more easily allocated
-       as a single (name,value) block because
-       there are no other associated structures */
-    b = malloc ( sizeof * b + n -> data . size );
-    if ( b == NULL )
-    {
-        pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcMemory, rcExhausted );
-        return true;
-    }
-
-    b -> value = & b -> name [ 1 + size ];
-    b -> vsize = n -> data . size - size - 1;
-    memcpy ( b -> name, name, n -> data . size );
-    BSTreeInsert ( pb -> bst, & b -> n, KMAttrNodeSort );
-    return false;
-}
-
-static
-rc_t KMAttrNodeRename ( const KMAttrNode *self,
-    KMAttrNode **renamed, const char *name )
-{
-    size_t size = strlen ( name );
-    KMAttrNode *b = malloc ( sizeof * b + self -> vsize + size );
-    if ( b == NULL )
-        return RC ( rcDB, rcNode, rcRenaming, rcMemory, rcExhausted );
-
-    b -> value = & b -> name [ 1 + size ];
-    b -> vsize = self -> vsize;
-    strcpy ( b -> name, name );
-    memcpy ( b -> value, self -> value, self -> vsize );
-    * renamed = b;
-    return 0;
-}
-
-static
-rc_t KMAttrNodeMake ( KMAttrNode **np,
-    const char *name, const void *value, size_t vsize )
-{
-    size_t size = strlen ( name );
-    KMAttrNode *n = malloc ( sizeof * n + vsize + size );
-    if ( n == NULL )
-        return RC ( rcDB, rcNode, rcConstructing, rcMemory, rcExhausted );
-
-    n -> value = & n -> name [ 1 + size ];
-    n -> vsize = vsize;
-    strcpy ( n -> name, name );
-    if ( vsize != 0 )
-        memcpy ( n -> value, value, vsize );
-    * np = n;
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * KMDataNode
- *  a node with an optional value,
- *  optional attributes, and optional children
- *
- *  nodes are identified by path, relative to a starting node,
- *  where "/" serves as a path separator.
- */
-struct KMDataNode
-{
-    BSTNode n;
-    KMDataNode *par;
-    KMetadata *meta;
-    void *value;
-    size_t vsize;
-    BSTree attr;
-    BSTree child;
-    KRefcount refcount;
-    uint8_t read_only;
-    char name [ 1 ];
-};
-
-static
-int64_t CC KMDataNodeCmp ( const void *item, const BSTNode *n )
-{
-#define a ( ( const char* ) item )
-#define b ( ( const KMDataNode* ) n )
-
-    return strcmp ( a, b -> name );
-
-#undef a
-#undef b
-}
-
-static
-int64_t CC KMDataNodeSort ( const BSTNode *item, const BSTNode *n )
-{
-#define a ( ( const KMDataNode* ) item )
-#define b ( ( const KMDataNode* ) n )
-
-    return strcmp ( a -> name, b -> name );
-
-#undef a
-#undef b
-}
-
-static
-void CC KMDataNodeWhack ( BSTNode *n, void *data )
-{
-    KMDataNode *self = ( KMDataNode* ) n;
-
-    REFMSG ( "KMDataNode", "flush", & self -> refcount );
-
-    self -> meta = NULL;
-    atomic32_inc ( & self -> refcount );
-    KMDataNodeRelease ( self );
-}
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KMDataNodeAddRef ( const KMDataNode *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KMDataNode" ) )
-        {
-        case krefLimit:
-            return RC ( rcDB, rcMetadata, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeRelease ( const KMDataNode *cself )
-{
-    KMDataNode *self = ( KMDataNode* ) cself;
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KMDataNode" ) )
-        {
-        case krefOkay:
-            return KMetadataSever ( self -> meta );
-        case krefWhack:
-
-            if ( self -> meta != NULL )
-            {
-                self -> read_only = 0;
-                return KMetadataSever ( self -> meta );
-            }
-
-            KRefcountWhack ( & self -> refcount, "KMDataNode" );
-
-            BSTreeWhack ( & self -> attr, KMAttrNodeWhack, NULL );
-            BSTreeWhack ( & self -> child, KMDataNodeWhack, NULL );
-            free ( self -> value );
-            free ( self );
-            break;
-
-        case krefLimit:
-            return RC ( rcDB, rcMetadata, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Inflate
- */
-static
-bool CC KMDataNodeInflate_v1 ( PBSTNode *n, void *data )
-{
-    void *value;
-    KMDataNode *b;
-    KMDataNodeInflateData *pb = data;
-
-    /* v1 metadata are flat, with the name
-       stored as a NUL terminated string
-       followed by value payload */
-    const char *name = n -> data . addr;
-    size_t size = strlen ( name );
-    if ( size >= n -> data . size )
-    {
-        pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcData, rcCorrupt );
-        return true;
-    }
-
-    b = malloc ( sizeof * b + size );
-    if ( b == NULL )
-    {
-        pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcMemory, rcExhausted );
-        return true;
-    }
-     
-    b -> par = pb -> par;
-    b -> meta = pb -> meta;
-    b -> value = ( void* ) ( name + size + 1 );
-    b -> vsize = n -> data . size - size - 1;
-    BSTreeInit ( & b -> attr );
-    BSTreeInit ( & b -> child );
-    KRefcountInit ( & b -> refcount, 0, "KMDataNode", "inflate", name );
-    b -> read_only = 0;
-    strcpy ( b -> name, name );
-     
-    /* a name with no associated value */
-    if ( b -> vsize == 0 )
-    {
-        b -> value = NULL;
-        BSTreeInsert ( pb -> bst, & b -> n, KMDataNodeSort );
-        return false;
-    }
-
-    /* allocate value because v2+ code expects this */
-    value = malloc ( b -> vsize );
-    if ( value != NULL )
-    {
-        memcpy ( value, b -> value, b -> vsize );
-        b -> value = value;
-        BSTreeInsert ( pb -> bst, & b -> n, KMDataNodeSort );
-        return false;
-    }
-
-    pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcMemory, rcExhausted );
-    free ( b );
-    return true;
-}
-
-static
-rc_t KMDataNodeInflateAttr ( KMDataNode *n, bool byteswap )
-{
-    PBSTree *bst;
-    rc_t rc = PBSTreeMake ( & bst, n -> value, n -> vsize, byteswap );
-    if ( rc != 0 )
-        rc = RC ( rcDB, rcMetadata, rcConstructing, rcData, rcCorrupt );
-    else
-    {
-        KMDataNodeInflateData pb;
-        size_t bst_size = PBSTreeSize ( bst );
-        
-        pb . meta = n -> meta;
-        pb . par = n;
-        pb . bst = & n -> attr;
-        pb . node_size_limit = 0;
-        pb . node_child_limit = 0;
-        pb . rc = 0;
-        pb . byteswap = byteswap;
-        PBSTreeDoUntil ( bst, 0, KMAttrNodeInflate, & pb );
-        rc = pb . rc;
-        
-        PBSTreeWhack ( bst );
-        
-        n -> value = ( char* ) n -> value + bst_size;
-        n -> vsize -= bst_size;
-    }
-    return rc;
-}
-
-static
-bool CC KMDataNodeInflate ( PBSTNode *n, void *data );
-
-static
-rc_t KMDataNodeInflateChild ( KMDataNode *n,
-    size_t node_size_limit, uint32_t node_child_limit, bool byteswap )
-{
-    PBSTree *bst;
-    rc_t rc = PBSTreeMake ( & bst, n -> value, n -> vsize, byteswap );
-    if ( rc != 0 )
-        rc = RC ( rcDB, rcMetadata, rcConstructing, rcData, rcCorrupt );
-    else
-    {
-        uint32_t bst_count = PBSTreeCount ( bst );
-        size_t bst_size = PBSTreeSize ( bst );
-        bool inflate = node_child_limit == 0;
-        if ( ! inflate ) {
-            if ( bst_count > node_child_limit )
-            {
-                PLOGMSG ( klogWarn, ( klogWarn,
-                                      "refusing to inflate metadata node '$(node)' "
-                                      "within file '$(path)': "
-                                      "number of children ($(num_children)) "
-                                      "exceeds limit ($(limit))."
-                                      , "node=%s,path=%s,num_children=%u,limit=%u"
-                                      , n -> name
-                                      , n -> meta -> path
-                                      , bst_count
-                                      , node_child_limit )
-                    );
-            }
-            else if ( bst_size > node_size_limit )
-            {
-                PLOGMSG ( klogWarn, ( klogWarn,
-                                      "refusing to inflate metadata node '$(node)' "
-                                      "within file '$(path)': "
-                                      "node size ($(node_size)) exceeds limit ($(limit))."
-                                     , "node=%s,path=%s,node_size=%zu,limit=%zu"
-                                     , n -> name
-                                     , n -> meta -> path
-                                     , bst_size
-                                     , node_size_limit )
-                    );
-            }
-            else {
-                inflate = true;
-            }
-        }
-
-        if ( inflate ) {
-            KMDataNodeInflateData pb;
-
-            pb . meta = n -> meta;
-            pb . par = n;        
-            pb . bst = & n -> child;
-            pb . node_size_limit = node_size_limit;
-            pb . node_child_limit = node_child_limit;
-            pb . rc = 0;
-            pb . byteswap = byteswap;
-            PBSTreeDoUntil ( bst, 0, KMDataNodeInflate, & pb );
-            rc = pb . rc;
-        }
-        
-        PBSTreeWhack ( bst );
-        
-        n -> value = ( char* ) n -> value + bst_size;
-        n -> vsize -= bst_size;
-    }
-    return rc;
-}
-
-static
-bool CC KMDataNodeInflate ( PBSTNode *n, void *data )
-{
-    KMDataNode *b;
-    KMDataNodeInflateData *pb = data;
-
-    /* v2 names are preceded by a decremented length byte
-       that has its upper two bits dedicated to
-       signaling existence of attributes & children */
-    const char *name = n -> data . addr;
-    int bits = * ( ( const uint8_t* ) name ++ );
-    size_t size = ( bits >> 2 ) + 1;
-    if ( size >= n -> data . size )
-    {
-        pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcData, rcCorrupt );
-        return true;
-    }
-
-    b = malloc ( sizeof * b + size );
-    if ( b == NULL )
-    {
-        pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcMemory, rcExhausted );
-        return true;
-    }
-
-    b -> par = pb -> par;
-    b -> meta = pb -> meta;
-    b -> value = ( void* ) ( name + size );
-    b -> vsize = n -> data . size - size - 1;
-    BSTreeInit ( & b -> attr );
-    BSTreeInit ( & b -> child );
-    memcpy ( b -> name, name, size );
-    b -> name [ size ] = 0;
-    KRefcountInit ( & b -> refcount, 0, "KMDataNode", "inflate", b -> name );
-    b -> read_only = 0;
-
-    pb -> rc = ( bits & 1 ) != 0 ? KMDataNodeInflateAttr ( b, pb -> byteswap ) : 0;
-    if ( pb -> rc == 0 )
-    {
-        pb -> rc = ( bits & 2 ) != 0 ?
-            KMDataNodeInflateChild ( b, pb -> node_size_limit, pb -> node_child_limit, pb -> byteswap ) : 0;
-        if ( pb -> rc == 0 )
-        {
-            void *value;
-
-            if ( b -> vsize == 0 )
-            {
-                b -> value = NULL;
-                BSTreeInsert ( pb -> bst, & b -> n, KMDataNodeSort );
-                return false;
-            }
-
-            value = malloc ( b -> vsize );
-            if ( value != NULL )
-            {
-                memcpy ( value, b -> value, b -> vsize );
-                b -> value = value;
-                BSTreeInsert ( pb -> bst, & b -> n, KMDataNodeSort );
-                return false;
-            }
-            pb -> rc = RC ( rcDB, rcMetadata, rcConstructing, rcMemory, rcExhausted );
-
-            BSTreeWhack ( & b -> child, KMDataNodeWhack, NULL );
-        }
-
-        BSTreeWhack ( & b -> attr, KMAttrNodeWhack, NULL );
-    }
-
-    free ( b );
-    return true;
-}
-
-
-/* Find
- */
-static
-rc_t KMDataNodeFind ( const KMDataNode *cself, KMDataNode **np, char **path )
-{
-    KMDataNode *found, *self= ( KMDataNode* ) cself;
-
-    char *end, *name = * path;
-
-    /* interpret leading '/' */
-    if ( name [ 0 ] == '/' )
-    {
-        while ( self -> par != NULL )
-            self = self -> par;
-        ++ name;
-    }
-
-    /* find node */
-    for ( found = self; name != NULL; self = found, name = end )
-    {
-        /* segment path */
-        end = strchr ( name, '/' );
-        if ( end != NULL )
-            * end ++ = 0;
-
-        /* interpret special paths */
-        switch ( name [ 0 ] )
-        {
-        case 0:
-            continue;
-        case '.':
-            switch ( name [ 1 ] )
-            {
-            case 0:
-                continue;
-            case '.':
-                if ( name [ 2 ] == 0 )
-                {
-                    /* this is a backup */
-                    if ( ( self = self -> par ) == NULL )
-                    {
-                        * np = NULL;
-                        return RC ( rcDB, rcMetadata, rcSelecting, rcPath, rcInvalid );
-                    }
-                    continue;
-                }
-                break;
-            }
-            break;
-        }
-
-        /* find actual path */
-        found = ( KMDataNode* ) BSTreeFind ( & self -> child, name, KMDataNodeCmp );
-        if ( found == NULL )
-        {
-            /* not found also gets partially found state */
-            if ( end != NULL )
-                end [ -1 ] = '/';
-            * path = name;
-            * np = self;
-            return SILENT_RC ( rcDB, rcMetadata, rcSelecting, rcPath, rcNotFound );
-        }
-    }
-
-    /* the current self is our guy */
-    * np = self;
-    return 0;
-}
-
-/* Make
- */
-static
-rc_t KMDataNodeMake ( KMDataNode *self, KMDataNode **np, char *name )
-{
-    rc_t rc;
-    char *end;
-
-    /* create nodes */
-    for ( ; name != NULL; name = end )
-    {
-        BSTNode *x;
-        size_t size;
-        KMDataNode *n;
-
-        /* segment path */
-        end = strchr ( name, '/' );
-        if ( end != NULL )
-            * end ++ = 0;
-
-        /* interpret special paths */
-        switch ( name [ 0 ] )
-        {
-        case 0:
-            continue;
-        case '.':
-            switch ( name [ 1 ] )
-            {
-            case 0:
-                continue;
-            case '.':
-                if ( name [ 2 ] == 0 )
-                {
-                    /* this is a backup */
-                    if ( ( self = self -> par ) == NULL )
-                        return RC ( rcDB, rcMetadata, rcInserting, rcPath, rcInvalid );
-                    continue;
-                }
-                break;
-            }
-            break;
-        case '*':
-            if ( name [ 1 ] == 0 )
-                return RC ( rcDB, rcMetadata, rcInserting, rcPath, rcInvalid );
-        }
-
-        /* we use 2 bits of a size byte to indicate
-           whether a node has attributes and/or children,
-           so limit the node leaf name size to 6 bits.
-           since empty names are not allowed, subtract
-           one from length to give range 0..64 => 1..64 */
-        size = strlen ( name );
-        if ( size > ( 0x3F + 1 ) )
-            return RC ( rcDB, rcMetadata, rcInserting, rcPath, rcExcessive );
-
-        n = malloc ( sizeof * n + size );
-        if ( n == NULL )
-            return RC ( rcDB, rcMetadata, rcInserting, rcMemory, rcExhausted );
-        n -> par = self;
-        n -> meta = self -> meta;
-        n -> value = NULL;
-        n -> vsize = 0;
-        BSTreeInit ( & n -> attr );
-        BSTreeInit ( & n -> child );
-        strcpy ( n -> name, name );
-        KRefcountInit ( & n -> refcount, 0, "KMDataNode", "make", n -> name );
-        n -> read_only = 0;
-
-        /* insert */
-        rc = BSTreeInsertUnique ( & self -> child,
-            & n -> n, & x, KMDataNodeSort );
-        if ( rc != 0 )
-        {
-            free ( n );
-            n = ( KMDataNode* ) x;
-        }
-
-        /* transition */
-        self = n;
-    }
-
-    /* the current self is our guy */
-    * np = self;
-    return 0;
-}
-
-
-/* OpenNodeRead
- * VOpenNodeRead
- *  opens a metadata node
- *
- *  "node" [ OUT ] - return parameter for indicated metadata node
- *
- *  "path" [ IN, NULL OKAY ] - optional path for specifying named
- *  node within metadata hierarchy. when NULL, empty, ".", or "/",
- *  return root node in "node". path separator is "/".
- */
-LIB_EXPORT rc_t CC KMetadataOpenNodeRead ( const KMetadata *self,
-    const KMDataNode **node, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KMetadataVOpenNodeRead ( self, node, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMetadataVOpenNodeRead ( const KMetadata *self,
-    const KMDataNode **node, const char *path, va_list args )
-{
-    rc_t rc = 0;
-
-    if ( node == NULL )
-        rc = RC ( rcDB, rcMetadata, rcOpening, rcParam, rcNull );
-    else if ( self == NULL )
-    {
-        * node = NULL;
-        rc = RC ( rcDB, rcMetadata, rcOpening, rcSelf, rcNull );
-    }
-    else
-        rc = KMDataNodeVOpenNodeRead ( self -> root, node, path, args );
-
-    DBGMSG(DBG_KDB, DBG_FLAG(DBG_KDB_KDB),
-            ("KMetadataVOpenNodeRead(%s) = %d\n", path, rc));
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeOpenNodeRead ( const KMDataNode *self,
-    const KMDataNode **node, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KMDataNodeVOpenNodeRead ( self, node, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeVOpenNodeRead ( const KMDataNode *self,
-    const KMDataNode **node, const char *path, va_list args )
-{
-    rc_t rc;
-    KMDataNode *found;
-    char full [ 4096 ], *p = full;
-
-    if ( node == NULL )
-        return RC ( rcDB, rcNode, rcOpening, rcParam, rcNull );
-
-    * node = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcNode, rcOpening, rcSelf, rcNull );
-
-    /* handle special NULL path */
-    if ( path == NULL )
-        full [ 0 ] = 0;
-    else
-    {
-        int len;
-
-        /* generate full path */
-        if ( args == NULL )
-            len = snprintf ( full, sizeof full, "%s", path );
-        else
-            len = vsnprintf ( full, sizeof full, path, args );
-        if ( len < 0 || len >= sizeof full )
-            return RC ( rcDB, rcNode, rcOpening, rcPath, rcExcessive );
-    }
-    
-    rc = KMDataNodeFind ( self, & found, & p );
-    if ( rc == 0 )
-    {
-        /* check if the node is not open */
-        if ( atomic32_read ( & found -> refcount ) == 0 )
-        {
-            /* mark as read-only, since we're the first to open */
-            found -> read_only = 1;
-        }
-        /* disallow open if already open for write */
-        else if ( ! found -> read_only )
-        {
-            return RC ( rcDB, rcNode, rcOpening, rcNode, rcBusy );
-        }
-
-        KMetadataAttach ( found -> meta );
-        KMDataNodeAddRef ( found );
-        * node = found;
-    }
-
-    DBGMSG(DBG_KDB, DBG_FLAG(DBG_KDB_KDB),
-            ("KMDataNodeVOpenNodeRead(%s) = %d\n", full, rc));
-
-    return rc;
-}
-
-
-/* OpenNodeUpdate
- * VOpenNodeUpdate
- *  opens a metadata node
- *
- *  "node" [ OUT ] - return parameter for indicated metadata node
- *
- *  "path" [ IN, NULL OKAY ] - optional path for specifying named
- *  node within metadata hierarchy. when NULL, empty, ".", or "/",
- *  return root node in "node". path separator is "/".
- */
-LIB_EXPORT rc_t CC KMetadataOpenNodeUpdate ( KMetadata *self,
-    KMDataNode **node, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KMetadataVOpenNodeUpdate ( self, node, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMetadataVOpenNodeUpdate ( KMetadata *self,
-    KMDataNode **node, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( node == NULL )
-        rc = RC ( rcDB, rcMetadata, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcMetadata, rcOpening, rcSelf, rcNull );
-        else if ( self -> read_only )
-            rc = RC ( rcDB, rcMetadata, rcOpening, rcNode, rcReadonly );
-        else {
-            rc = KMDataNodeVOpenNodeUpdate ( self -> root, node, path, args );
-            DBGMSG(DBG_KDB, DBG_FLAG(DBG_KDB_KDB),
-                        ("KMetadataVOpenNodeUpdate(%s) = %d\n", path, rc));
-            return rc;
-        }
-
-        * node = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeOpenNodeUpdate ( KMDataNode *self,
-    KMDataNode **node, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KMDataNodeVOpenNodeUpdate ( self, node, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeVOpenNodeUpdate ( KMDataNode *self,
-    KMDataNode **node, const char *path, va_list args )
-{
-    rc_t rc = 0;
-    KMDataNode *found;
-    char full [ 4096 ], *p = full;
-
-    if ( node == NULL )
-        return RC ( rcDB, rcNode, rcOpening, rcParam, rcNull );
-
-    * node = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcNode, rcOpening, rcSelf, rcNull );
-
-    /* handle special NULL path */
-    if ( path == NULL )
-        full [ 0 ] = 0;
-    else
-    {
-        int len;
-
-        /* generate full path */
-        if ( args == NULL )
-            len = snprintf ( full, sizeof full, "%s", path );
-        else
-            len = vsnprintf ( full, sizeof full, path, args );
-        if ( len < 0 || len >= sizeof full )
-            return RC ( rcDB, rcNode, rcOpening, rcPath, rcExcessive );
-    }
-
-    /* don't allow update when open for read */
-    if ( self -> read_only ) {
-        rc = RC ( rcDB, rcNode, rcOpening, rcNode, rcReadonly );
-        DBGMSG(DBG_KDB, DBG_FLAG(DBG_KDB_KDB),
-                    ("KMDataNodeVOpenNodeUpdate(%s) = %d\n", full, rc));
-        return rc;
-    }
-
-    /* find an existing one */
-    rc = KMDataNodeFind ( self, & found, & p );
-    if ( rc == 0 )
-    {
-        if ( atomic32_read ( & found -> refcount ) != 0 )
-            return RC ( rcDB, rcNode, rcOpening, rcNode, rcBusy );
-    }
-    else if ( GetRCState ( rc ) == rcNotFound )
-    {
-        rc = KMDataNodeMake ( found, & found, p );
-        if ( rc != 0 )
-            return rc;
-    }
-    else
-    {
-        return rc;
-    }
-
-    KMetadataAttach ( found -> meta );
-    KMDataNodeAddRef ( found );
-    found -> read_only = false;
-    * node = found;
-
-    DBGMSG(DBG_KDB, DBG_FLAG(DBG_KDB_KDB),
-                ("KMDataNodeVOpenNodeUpdate(%s) = %d\n", full, rc));
-
-    return rc;
-}
-
-
-/* ByteOrder
- *  indicates whether original byte order is reversed
- *  under current architecture.
- *
- *  the byte order of the column is established by
- *  the host architecture when created.
- *
- *  "reversed" [ OUT ] - if true, the original byte
- *  order is reversed with regard to host native byte order.
- */
-LIB_EXPORT rc_t CC KMDataNodeByteOrder ( const KMDataNode *self, bool *reversed )
-{
-    if ( self != NULL )
-        return KMetadataByteOrder ( self -> meta, reversed );
-
-    if ( reversed == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcParam, rcNull );
-
-    * reversed = false;
-    return RC ( rcDB, rcMetadata, rcAccessing, rcSelf, rcNull );
-}
-
-
-/* Read
- *  read a node value or attribute
- *
- *  "offset" [ IN ] - initial offset into metadata
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - number of bytes actually read
- *
- *  "remaining" [ OUT, NULL OKAY ] - optional return parameter for
- *  the number of bytes remaining to be read.
- *  specifically, "offset" + "num_read" + "remaining" == sizeof node data
- */
-LIB_EXPORT rc_t CC KMDataNodeRead ( const KMDataNode *self,
-    size_t offset, void *buffer, size_t bsize,
-    size_t *num_read, size_t *remaining )
-{
-    rc_t rc;
-
-    size_t dummy;
-    if ( remaining == NULL )
-        remaining = & dummy;
-
-    if ( num_read == NULL )
-        rc = RC ( rcDB, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcNode, rcReading, rcSelf, rcNull );
-        else if ( buffer == NULL && bsize != 0 )
-            rc = RC ( rcDB, rcNode, rcReading, rcBuffer, rcNull );
-        else
-        {
-            size_t to_read, avail = self -> vsize;
-            if ( offset > avail )
-                offset = avail;
-
-            to_read = avail -= offset;
-            if ( to_read > bsize )
-                to_read = bsize;
-
-            if ( to_read > 0 )
-                memcpy ( buffer, ( const char* ) self -> value + offset, to_read );
-
-            * num_read = to_read;
-            * remaining = avail - to_read;
-
-            return 0;
-        }
-
-        * num_read = 0;
-    }
-
-    * remaining = 0;
-    return rc;
-}
-
-
-/* Addr - PRIVATE
- *  reach into node and get address
- *  returns raw pointer and node size
- */
-LIB_EXPORT rc_t CC KMDataNodeAddr ( const KMDataNode *self,
-    const void **addr, size_t *size )
-{
-    rc_t rc;
-
-    size_t dummy;
-    if ( size == NULL )
-        size = & dummy;
-
-    if ( addr == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcMetadata, rcReading, rcSelf, rcNull );
-        else
-        {
-            * addr = self -> value;
-            * size = self -> vsize;
-
-            return 0;
-        }
-
-        * addr = NULL;
-    }
-
-    * size = 0;
-    return rc;
-}
-
-
-/* Write
- *  write a node value or attribute
- *  overwrites anything already there
- *
- *  "buffer" [ IN ] and "size" [ IN ] - new value data
- */
-LIB_EXPORT rc_t CC KMDataNodeWrite ( KMDataNode *self, const void *buffer, size_t size )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcNode, rcWriting, rcSelf, rcNull );
-    if ( self -> meta == NULL )
-        return RC ( rcDB, rcNode, rcWriting, rcMetadata, rcNull );
-    if ( buffer == NULL && size != 0 )
-        return RC ( rcDB, rcNode, rcWriting, rcBuffer, rcNull );
-
-    /* don't allow update when open for read or root node */
-    if ( self -> read_only || self -> par == NULL )
-        return RC ( rcDB, rcNode, rcWriting, rcNode, rcReadonly );
-
-    if ( size == self -> vsize )
-    {
-        if ( size == 0 )
-            return 0;
-
-        memcpy ( self -> value, buffer, size );
-    }
-    else
-    {
-        void *value;
-
-        if ( buffer == NULL || size == 0 )
-        {
-            value = NULL;
-            size = 0;
-        }
-        else
-        {
-            value = malloc ( size );
-            if ( value == NULL )
-                return RC ( rcDB, rcNode, rcWriting, rcMemory, rcExhausted );
-            memcpy ( value, buffer, size );
-        }
-            
-        if ( self -> value != NULL )
-            free ( self -> value );
-
-        self -> value = value;
-        self -> vsize = size;
-    }
-    
-    self -> meta -> dirty = true;
-
-    return 0;
-}
-
-
-/* Append
- *  append data to value
- *
- *  "buffer" [ IN ] and "size" [ IN ] - value data to be appended
- */
-LIB_EXPORT rc_t CC KMDataNodeAppend ( KMDataNode *self, const void *buffer, size_t size )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcNode, rcWriting, rcSelf, rcNull );
-    if ( self -> meta == NULL )
-        return RC ( rcDB, rcNode, rcWriting, rcMetadata, rcNull );
-    if ( buffer == NULL && size != 0 )
-        return RC ( rcDB, rcNode, rcWriting, rcBuffer, rcNull );
-
-    /* don't allow update when open for read or root node */
-    if ( self -> read_only || self -> par == NULL )
-        return RC ( rcDB, rcNode, rcWriting, rcNode, rcReadonly );
-
-    if ( size != 0 )
-    {
-        void *value = realloc ( self -> value, self -> vsize + size );
-        if ( value == NULL )
-            return RC ( rcDB, rcNode, rcWriting, rcMemory, rcExhausted );
-        memcpy ( ( char* ) value + self -> vsize, buffer, size );
-        self -> value = value;
-        self -> vsize += size;
-        self -> meta -> dirty = true;
-    }
-    return 0;
-}
-
-
-/* Read ( formatted )
- *  reads as integer or float value in native byte order
- *
- *  "bXX" [ OUT ] - return parameter for numeric value
- */
-LIB_EXPORT rc_t CC KMDataNodeReadB8 ( const KMDataNode *self, void *b8 )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, b8, 1,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-        if ( num_read < 1 )
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadB16 ( const KMDataNode *self, void *b16 )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, b16, 2,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-        if ( num_read < 2 )
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-
-        if ( self -> meta -> byteswap )
-            * ( uint16_t* ) b16 = bswap_16 ( * ( const uint16_t* ) b16 );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadB32 ( const KMDataNode *self, void *b32 )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, b32, 4,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-        if ( num_read < 4 )
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-
-        if ( self -> meta -> byteswap )
-            * ( uint32_t* ) b32 = bswap_32 ( * ( const uint32_t* ) b32 );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadB64 ( const KMDataNode *self, void *b64 )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, b64, 8,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-        if ( num_read < 8 )
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-
-        if ( self -> meta -> byteswap )
-            * ( uint64_t* ) b64 = bswap_64 ( * ( const uint64_t* ) b64 );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadB128 ( const KMDataNode *self, void *b128 )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, b128, 16,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-        if ( num_read < 16 )
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-
-        if ( self -> meta -> byteswap )
-        {
-            uint64_t *b64 = b128;
-            uint64_t tmp = bswap_64 ( b64 [ 0 ] );
-            b64 [ 0 ] = bswap_64 ( b64 [ 1 ] );
-            b64 [ 1 ] = tmp;
-        }
-    }
-    return rc;
-}
-
-
-/* ReadAs ( formatted )
- *  reads as integer or float value in native byte order
- *  casts smaller-sized values to desired size, e.g.
- *    uint32_t to uint64_t
- *
- *  "i" [ OUT ] - return parameter for signed integer
- *  "u" [ OUT ] - return parameter for unsigned integer
- *  "f" [ OUT ] - return parameter for double float
- */
-LIB_EXPORT rc_t CC KMDataNodeReadAsI16 ( const KMDataNode *self, int16_t *i )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, i, sizeof * i,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-
-        switch ( num_read )
-        {
-        case 1:
-            * i = ( ( const int8_t* ) i ) [ 0 ];
-            break;
-        case 2:
-            if ( self -> meta -> byteswap )
-                * i = bswap_16 ( * i );
-            break;
-        default:
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAsU16 ( const KMDataNode *self, uint16_t *u )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, u, sizeof * u,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-
-        switch ( num_read )
-        {
-        case 1:
-            * u = ( ( const uint8_t* ) u ) [ 0 ];
-            break;
-        case 2:
-            if ( self -> meta -> byteswap )
-                * u = bswap_16 ( * u );
-            break;
-        default:
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAsI32 ( const KMDataNode *self, int32_t *i )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, i, sizeof * i,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-
-        switch ( num_read )
-        {
-        case 1:
-            * i = ( ( const int8_t* ) i ) [ 0 ];
-            break;
-        case 2:
-            if ( self -> meta -> byteswap )
-                * i = bswap_16 ( ( ( const int16_t* ) i ) [ 0 ] );
-            else
-                * i = ( ( const int16_t* ) i ) [ 0 ];
-            break;
-        case 4:
-            if ( self -> meta -> byteswap )
-                * i = bswap_32 ( * i );
-            break;
-        default:
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAsU32 ( const KMDataNode *self, uint32_t *u )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, u, sizeof * u,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-
-        switch ( num_read )
-        {
-        case 1:
-            * u = ( ( const uint8_t* ) u ) [ 0 ];
-            break;
-        case 2:
-            if ( self -> meta -> byteswap )
-                * u = bswap_16 ( ( ( const uint16_t* ) u ) [ 0 ] );
-            else
-                * u = ( ( const uint16_t* ) u ) [ 0 ];
-            break;
-        case 4:
-            if ( self -> meta -> byteswap )
-                * u = bswap_32 ( * u );
-            break;
-        default:
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAsI64 ( const KMDataNode *self, int64_t *i )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, i, sizeof * i,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-
-        switch ( num_read )
-        {
-        case 1:
-            * i = ( ( const int8_t* ) i ) [ 0 ];
-            break;
-        case 2:
-            if ( self -> meta -> byteswap )
-                * i = bswap_16 ( ( ( const int16_t* ) i ) [ 0 ] );
-            else
-                * i = ( ( const int16_t* ) i ) [ 0 ];
-            break;
-        case 4:
-            if ( self -> meta -> byteswap )
-                * i = bswap_32 ( ( ( const int32_t* ) i ) [ 0 ] );
-            else
-                * i = ( ( const int32_t* ) i ) [ 0 ];
-            break;
-        case 8:
-            if ( self -> meta -> byteswap )
-                * i = bswap_64 ( * i );
-            break;
-        default:
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAsU64 ( const KMDataNode *self, uint64_t *u )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, u, sizeof * u,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-
-        switch ( num_read )
-        {
-        case 1:
-            * u = ( ( const uint8_t* ) u ) [ 0 ];
-            break;
-        case 2:
-            if ( self -> meta -> byteswap )
-                * u = bswap_16 ( ( ( const uint16_t* ) u ) [ 0 ] );
-            else
-                * u = ( ( const uint16_t* ) u ) [ 0 ];
-            break;
-        case 4:
-            if ( self -> meta -> byteswap )
-                * u = bswap_32 ( ( ( const uint32_t* ) u ) [ 0 ] );
-            else
-                * u = ( ( const uint32_t* ) u ) [ 0 ];
-            break;
-        case 8:
-            if ( self -> meta -> byteswap )
-                * u = bswap_64 ( * u );
-            break;
-        default:
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAsF64 ( const KMDataNode *self, double *f )
-{
-    size_t num_read, remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, f, sizeof * f,
-        & num_read, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-            return RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-
-        switch ( num_read )
-        {
-        case 4:
-            if ( self -> meta -> byteswap )
-                * ( uint32_t* ) f = bswap_32 ( * ( const uint32_t* ) f );
-            * f = ( ( const float* ) f ) [ 0 ];
-            break;
-        case 8:
-            if ( self -> meta -> byteswap )
-                * ( uint64_t* ) f = bswap_64 ( * ( const uint64_t* ) f );
-            break;
-        default:
-            return RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete );
-        }
-    }
-    return rc;
-}
-
-
-/* Read ( formatted )
- *  reads as C-string
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - output buffer for
- *  NUL terminated string.
- *
- *  "size" [ OUT ] - return parameter giving size of string
- *  not including NUL byte. the size is set both upon success
- *  and insufficient buffer space error.
- */
-LIB_EXPORT rc_t CC KMDataNodeReadCString ( const KMDataNode *self,
-    char *buffer, size_t bsize, size_t *size )
-{
-    size_t remaining;
-    rc_t rc = KMDataNodeRead ( self, 0, buffer, bsize - 1, size, & remaining );
-    if ( rc == 0 )
-    {
-        if ( remaining != 0 )
-        {
-            * size += remaining;
-            return RC ( rcDB, rcMetadata, rcReading, rcBuffer, rcInsufficient );
-        }
-
-        buffer [ * size ] = 0;
-    }
-    return rc;
-}
-
-
-/* Write ( formatted )
- *  writes integer or float value in metadata byte order
- *
- *  "bXX" [ IN ] - numeric value
- *
- * NB - we do not currently ( and maybe never ) support
- *  writing in non-native byte-order.
- */
-LIB_EXPORT rc_t CC KMDataNodeWriteB8 ( KMDataNode *self, const void *b8 )
-{
-    return KMDataNodeWrite ( self, b8, 1 );
-}
-
-LIB_EXPORT rc_t CC KMDataNodeWriteB16 ( KMDataNode *self, const void *b16 )
-{
-    return KMDataNodeWrite ( self, b16, 2 );
-}
-
-LIB_EXPORT rc_t CC KMDataNodeWriteB32 ( KMDataNode *self, const void *b32 )
-{
-    return KMDataNodeWrite ( self, b32, 4 );
-}
-
-LIB_EXPORT rc_t CC KMDataNodeWriteB64 ( KMDataNode *self, const void *b64 )
-{
-    return KMDataNodeWrite ( self, b64, 8 );
-}
-
-LIB_EXPORT rc_t CC KMDataNodeWriteB128 ( KMDataNode *self, const void *b128 )
-{
-    return KMDataNodeWrite ( self, b128, 16 );
-}
-
-
-/* Write ( formatted )
- *  writes C-string
- *
- *  "str" [ IN ] - NUL terminated string.
- */
-LIB_EXPORT rc_t CC KMDataNodeWriteCString ( KMDataNode *self, const char *str )
-{
-    if ( str != NULL )
-        return KMDataNodeWrite ( self, str, strlen ( str ) );
-
-    if ( self == NULL )
-        return RC ( rcDB, rcNode, rcWriting, rcSelf, rcNull );
-
-    return RC ( rcDB, rcNode, rcWriting, rcString, rcNull );
-}
-
-
-/* ReadAttr
- *  reads as NUL-terminated string
- *
- *  "name" [ IN ] - NUL terminated attribute name
- *
- *  "buffer" [ OUT ] and "bsize" - return parameter for attribute value
- *
- *  "size" [ OUT ] - return parameter giving size of string
- *  not including NUL byte. the size is set both upon success
- *  and insufficient buffer space error.
- */
-LIB_EXPORT rc_t CC KMDataNodeReadAttr ( const KMDataNode *self, const char *name,
-    char *buffer, size_t bsize, size_t *size )
-{
-    rc_t rc;
-
-    if ( size == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcMetadata, rcReading, rcSelf, rcNull );
-        else if ( name == NULL )
-            rc = RC ( rcDB, rcMetadata, rcReading, rcString, rcNull );
-        else if ( name [ 0 ] == 0 )
-            rc = RC ( rcDB, rcMetadata, rcReading, rcString, rcEmpty );
-        else if ( buffer == NULL && bsize != 0 )
-            rc = RC ( rcDB, rcMetadata, rcReading, rcBuffer, rcNull );
-        else
-        {
-            const KMAttrNode *n = ( const KMAttrNode* )
-                BSTreeFind ( & self -> attr, name, KMAttrNodeCmp );
-            if ( n == NULL )
-            {
-                * size = 0;
-                if ( bsize != 0 )
-                    buffer [ 0 ] = 0;
-                rc = RC ( rcDB, rcMetadata, rcReading, rcAttr, rcNotFound );
-            }
-            else
-            {
-                * size = n -> vsize;
-                if ( n -> vsize < bsize )
-                {
-                    memcpy ( buffer, n -> value, n -> vsize );
-                    buffer [ n -> vsize ] = 0;
-                    return 0;
-                }
-
-                return RC ( rcDB, rcMetadata, rcReading, rcBuffer, rcInsufficient );
-            }
-        }
-
-        * size = 0;
-    }
-
-    return rc;
-}
-
-
-/* WriteAttr
- *  writes NUL-terminated string
- *
- *  "name" [ IN ] - NUL terminated attribute name
- *
- *  "value" [ IN ] - NUL terminated attribute value
- */
-LIB_EXPORT rc_t CC KMDataNodeWriteAttr ( KMDataNode *self,
-    const char *name, const char *value )
-{
-    rc_t rc;
-    size_t size;
-    KMAttrNode *n;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcNode, rcWriting, rcSelf, rcNull );
-    if ( self -> meta == NULL )
-        return RC ( rcDB, rcNode, rcWriting, rcMetadata, rcNull );
-    if ( name == NULL )
-        return RC ( rcDB, rcNode, rcWriting, rcPath, rcNull );
-    if ( name [ 0 ] == 0 )
-        return RC ( rcDB, rcNode, rcWriting, rcPath, rcInvalid );
-
-    /* don't allow update when open for read or root node */
-    if ( self -> read_only || self -> par == NULL )
-        return RC ( rcDB, rcNode, rcWriting, rcNode, rcReadonly );
-
-    size = ( value == NULL ) ? 0 : strlen ( value );
-    rc = KMAttrNodeMake ( & n, name, value, size );
-    if ( rc == 0 )
-    {
-        BSTNode *x;
-        if ( BSTreeInsertUnique ( & self -> attr,
-             & n -> n, & x, KMAttrNodeSort ) != 0 )
-        {
-            BSTreeUnlink ( & self -> attr, x );
-            KMAttrNodeWhack ( x, NULL );
-            BSTreeInsert ( & self -> attr, & n -> n, KMAttrNodeSort );
-        }
-
-        self -> meta -> dirty = true;
-    }
-    return rc;
-}
-
-
-/* ReadAttrAs ( formatted )
- *  reads as integer or float value in native byte order
- *  casts smaller-sized values to desired size, e.g.
- *    uint32_t to uint64_t
- *
- *  "i" [ OUT ] - return parameter for signed integer
- *  "u" [ OUT ] - return parameter for unsigned integer
- *  "f" [ OUT ] - return parameter for double float
- */
-LIB_EXPORT rc_t CC KMDataNodeReadAttrAsI16 ( const KMDataNode *self, const char *attr, int16_t *i )
-{
-    rc_t rc;
-    if ( i == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t size;
-        char buffer [ 256 ];
-        rc = KMDataNodeReadAttr ( self, attr, buffer, sizeof buffer, & size );
-        if ( rc == 0 )
-        {
-            char *end;
-            long val = strtol ( buffer, & end, 0 );
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-            else if ( val < -32768 || val > 32767 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcRange, rcExcessive );
-            else
-            {
-                * i = ( int16_t ) val;
-                return 0;
-            }
-        }
-
-        * i = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAttrAsU16 ( const KMDataNode *self, const char *attr, uint16_t *u )
-{
-    rc_t rc;
-    if ( u == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t size;
-        char buffer [ 256 ];
-        rc = KMDataNodeReadAttr ( self, attr, buffer, sizeof buffer, & size );
-        if ( rc == 0 )
-        {
-            char *end;
-            unsigned long val = strtoul ( buffer, & end, 0 );
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-            else if ( val > 0xFFFF )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcRange, rcExcessive );
-            else
-            {
-                * u = ( uint16_t ) val;
-                return 0;
-            }
-        }
-
-        * u = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAttrAsI32 ( const KMDataNode *self, const char *attr, int32_t *i )
-{
-    rc_t rc;
-    if ( i == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t size;
-        char buffer [ 256 ];
-        rc = KMDataNodeReadAttr ( self, attr, buffer, sizeof buffer, & size );
-        if ( rc == 0 )
-        {
-            char *end;
-            long val = strtol ( buffer, & end, 0 );
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-            else if ( val < (-2147483647 - 1) || val > 2147483647 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcRange, rcExcessive );
-            else
-            {
-                * i = ( int32_t ) val;
-                return 0;
-            }
-        }
-
-        * i = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAttrAsU32 ( const KMDataNode *self, const char *attr, uint32_t *u )
-{
-    rc_t rc;
-    if ( u == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t size;
-        char buffer [ 256 ];
-        rc = KMDataNodeReadAttr ( self, attr, buffer, sizeof buffer, & size );
-        if ( rc == 0 )
-        {
-            char *end;
-            unsigned long val = strtoul ( buffer, & end, 0 );
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-            else if ( val > 0xFFFFFFFF )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcRange, rcExcessive );
-            else
-            {
-                * u = ( uint32_t ) val;
-                return 0;
-            }
-        }
-
-        * u = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAttrAsI64 ( const KMDataNode *self, const char *attr, int64_t *i )
-{
-    rc_t rc;
-    if ( i == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t size;
-        char buffer [ 256 ];
-        rc = KMDataNodeReadAttr ( self, attr, buffer, sizeof buffer, & size );
-        if ( rc == 0 )
-        {
-            char *end;
-            int64_t val =  strtoi64 ( buffer, & end, 0 );
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-            else
-            {
-                * i = val;
-                return 0;
-            }
-        }
-
-        * i = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAttrAsU64 ( const KMDataNode *self, const char *attr, uint64_t *u )
-{
-    rc_t rc;
-    if ( u == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t size;
-        char buffer [ 256 ];
-        rc = KMDataNodeReadAttr ( self, attr, buffer, sizeof buffer, & size );
-        if ( rc == 0 )
-        {
-            char *end;
-            uint64_t val =  strtou64 ( buffer, & end, 0 );
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-            else
-            {
-                * u = val;
-                return 0;
-            }
-        }
-
-        * u = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeReadAttrAsF64 ( const KMDataNode *self, const char *attr, double *f )
-{
-    rc_t rc;
-    if ( f == NULL )
-        rc = RC ( rcDB, rcMetadata, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t size;
-        char buffer [ 256 ];
-        rc = KMDataNodeReadAttr ( self, attr, buffer, sizeof buffer, & size );
-        if ( rc == 0 )
-        {
-            char *end;
-            double val = strtod ( buffer, & end );
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcDB, rcMetadata, rcReading, rcNode, rcIncorrect );
-            else
-            {
-                * f = val;
-                return 0;
-            }
-        }
-
-        * f = 0.0;
-    }
-    return rc;
-}
-
-
-/* Drop
- * VDrop
- *  drop some or all node content
- */
-LIB_EXPORT rc_t CC KMDataNodeDropAll ( KMDataNode *self )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcNode, rcClearing, rcSelf, rcNull );
-    if ( self -> meta == NULL )
-        return RC ( rcDB, rcNode, rcClearing, rcMetadata, rcNull );
-    if ( self -> read_only )
-        return RC ( rcDB, rcNode, rcClearing, rcNode, rcReadonly );
-
-    BSTreeWhack ( & self -> attr, KMAttrNodeWhack, NULL );
-    BSTreeInit ( & self -> attr );
-
-    BSTreeWhack ( & self -> child, KMDataNodeWhack, NULL );
-    BSTreeInit ( & self -> child );
-
-    free ( self -> value );
-    self -> value = NULL;
-    self -> vsize = 0;
-    self -> meta -> dirty = true;
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeDropAttr ( KMDataNode *self, const char *attr )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcNode, rcUpdating, rcSelf, rcNull );
-    if ( self -> meta == NULL )
-        return RC ( rcDB, rcNode, rcUpdating, rcMetadata, rcNull );
-    if ( attr == NULL )
-        return RC ( rcDB, rcNode, rcUpdating, rcPath, rcNull );
-    if ( attr [ 0 ] == 0 )
-        return RC ( rcDB, rcNode, rcUpdating, rcPath, rcInvalid );
-    if ( self -> read_only )
-        return RC ( rcDB, rcNode, rcUpdating, rcNode, rcReadonly );
-
-    /* recognize wildcard */
-    if ( attr [ 0 ] == '*' && attr [ 1 ] == 0 )
-    {
-        BSTreeWhack ( & self -> attr, KMAttrNodeWhack, NULL );
-        BSTreeInit ( & self -> attr );
-    }
-    else
-    {
-        KMAttrNode *found = ( KMAttrNode* )
-            BSTreeFind ( & self -> attr, attr, KMAttrNodeCmp );
-        if ( found == NULL )
-            return RC ( rcDB, rcNode, rcUpdating, rcAttr, rcNotFound );
-
-        BSTreeUnlink ( & self -> attr, & found -> n );
-        KMAttrNodeWhack ( & found -> n, NULL );
-    }
-
-    self -> meta -> dirty = true;
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeDropChild ( KMDataNode *self, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KMDataNodeVDropChild ( self, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeVDropChild ( KMDataNode *self, const char *path, va_list args )
-{
-    int len;
-    rc_t rc;
-    KMDataNode *found;
-    char full [ 4096 ], *p = full;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcNode, rcUpdating, rcSelf, rcNull );
-    if ( self -> meta == NULL )
-        return RC ( rcDB, rcNode, rcUpdating, rcMetadata, rcNull );
-    if ( path == NULL )
-        return RC ( rcDB, rcNode, rcUpdating, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcDB, rcNode, rcUpdating, rcPath, rcInvalid );
-
-    /* generate full path */
-    if ( args == NULL )
-        len = snprintf ( full, sizeof full, "%s", path );
-    else
-        len = vsnprintf ( full, sizeof full, path, args );
-    if ( len < 0 || len >= sizeof full )
-        return RC ( rcDB, rcNode, rcUpdating, rcPath, rcExcessive );
-
-    /* don't allow update when open for read */
-    if ( self -> read_only )
-        return RC ( rcDB, rcNode, rcUpdating, rcNode, rcReadonly );
-
-    rc = KMDataNodeFind ( self, & found, & p );
-    if ( GetRCState ( rc ) == rcNotFound )
-    {
-        if ( p [ 0 ] != '*' || p [ 1 ] != 0 )
-            return rc;
-
-        BSTreeWhack ( & found -> child, KMDataNodeWhack, NULL );
-        BSTreeInit ( & found -> child );
-    }
-    else
-    {
-        BSTreeUnlink ( & self -> child, & found -> n );
-        KMDataNodeWhack ( & found -> n, NULL );
-    }
-
-    self -> meta -> dirty = true;
-
-    return 0;
-}
-
-
-/* Rename
- *  renames a contained object
- *
- *  "from" [ IN ] - NUL terminated string in UTF-8
- *  giving simple name of existing attr
- *
- *  "to" [ IN ] - NUL terminated string in UTF-8
- *  giving new simple attr name
- */
-LIB_EXPORT rc_t CC KMDataNodeRenameAttr ( KMDataNode *self, const char *from, const char *to )
-{
-    rc_t rc;
-    KMAttrNode *found, *renamed;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcNode, rcRenaming, rcSelf, rcNull );
-    if ( self -> meta == NULL )
-        return RC ( rcDB, rcNode, rcRenaming, rcMetadata, rcNull );
-    if ( from == NULL || to == NULL )
-        return RC ( rcDB, rcNode, rcRenaming, rcPath, rcNull );
-    if ( from [ 0 ] == 0 || to [ 0 ] == 0 )
-        return RC ( rcDB, rcNode, rcRenaming, rcPath, rcInvalid );
-    if ( self -> read_only )
-        return RC ( rcDB, rcNode, rcRenaming, rcNode, rcReadonly );
-
-    found = ( KMAttrNode* )
-        BSTreeFind ( & self -> attr, from, KMAttrNodeCmp );
-    if ( found == NULL )
-        return RC ( rcDB, rcNode, rcRenaming, rcAttr, rcNotFound );
-
-    rc = KMAttrNodeRename ( found, & renamed, to );
-    if ( rc == 0 )
-    {
-        BSTNode *x;
-        rc = BSTreeInsertUnique ( & self -> attr,
-            & renamed -> n, & x, KMAttrNodeSort );
-        if ( rc != 0 )
-        {
-            KMAttrNodeWhack ( & renamed -> n, NULL );
-            if ( x == & found -> n )
-                return 0;
-            return RC ( rcDB, rcNode, rcRenaming, rcAttr, rcExists );
-        }
-
-        BSTreeUnlink ( & self -> attr, & found -> n );
-        KMAttrNodeWhack ( & found -> n, NULL );
-        self -> meta -> dirty = true;
-    }
-
-    return rc;
-}
-
-static
-void CC KMDataNodeRelinkParent ( BSTNode *n, void *data )
-{
-    ( ( KMDataNode* ) n ) -> par = data;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeRenameChild ( KMDataNode *self, const char *from, const char *to )
-{
-    int len;
-    rc_t rc;
-    KMDataNode *found;
-    char full [ 4096 ], *p = full;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcNode, rcRenaming, rcSelf, rcNull );
-    if ( self -> meta == NULL )
-        return RC ( rcDB, rcNode, rcRenaming, rcMetadata, rcNull );
-    if ( from == NULL || to == NULL )
-        return RC ( rcDB, rcNode, rcRenaming, rcPath, rcNull );
-    if ( from [ 0 ] == 0 || to [ 0 ] == 0 )
-        return RC ( rcDB, rcNode, rcRenaming, rcPath, rcInvalid );
-    if ( self -> read_only )
-        return RC ( rcDB, rcNode, rcRenaming, rcNode, rcReadonly );
-
-    /* generate full path */
-    len = snprintf ( full, sizeof full, "%s", from );
-    if ( len < 0 || len >= sizeof full )
-        return RC ( rcDB, rcNode, rcRenaming, rcPath, rcExcessive );
-
-    rc = KMDataNodeFind ( self, & found, & p );
-    if ( rc == 0 )
-    {
-        KMDataNode *renamed;
-
-        if ( atomic32_read ( & found -> refcount ) != 0 )
-            return RC ( rcDB, rcNode, rcRenaming, rcNode, rcBusy );
-
-        len = snprintf ( p = full, sizeof full, "%s", to );
-        if ( len < 0 || len >= sizeof full )
-            return RC ( rcDB, rcNode, rcRenaming, rcPath, rcExcessive );
-
-        rc = KMDataNodeFind ( self, & renamed, & p );
-        if ( GetRCState ( rc ) == rcNotFound )
-        {
-            rc = KMDataNodeMake ( renamed, & renamed, p );
-            if ( rc == 0 )
-            {
-                BSTreeUnlink ( & found -> par -> child, & found -> n );
-
-                renamed -> attr = found -> attr;
-                BSTreeInit ( & found -> attr );
-
-                renamed -> child = found -> child;
-                BSTreeInit ( & found -> child );
-                BSTreeForEach ( & renamed -> child,
-                    false, KMDataNodeRelinkParent, renamed );
-
-                renamed -> value = found -> value;
-                renamed -> vsize = found -> vsize;
-                found -> value = NULL;
-                found -> vsize = 0;
-
-                KMDataNodeWhack ( & found -> n, NULL );
-                self -> meta -> dirty = true;
-            }
-        }
-        else if ( rc == 0 )
-            rc = RC ( rcDB, rcNode, rcRenaming, rcNode, rcExists );
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KMetadata
- *  a versioned, hierarchical structure
- */
-
-/* Flush
- */
-typedef struct KMDFlushData KMDFlushData;
-struct KMDFlushData
-{
-    uint64_t pos;
-    KFile *f;
-    KMD5File *fmd5;
-    uint8_t *buffer;
-    size_t bsize;
-    size_t marker;
-    rc_t rc;
-};
-
-static
-rc_t CC KMDWriteFunc ( void *param, const void *buffer, size_t size, size_t *num_writ )
-{
-    KMDFlushData *pb = param;
-    size_t total, to_write;
-
-    for ( total = 0; total < size; total += to_write )
-    {
-        to_write = size - total;
-        if ( pb -> marker + to_write > pb -> bsize )
-            to_write = pb -> bsize - pb -> marker;
-
-        if ( to_write > 0 )
-        {
-            memcpy ( pb -> buffer + pb -> marker,
-                ( const uint8_t* ) buffer + total, to_write );
-            pb -> marker += to_write;
-        }
-
-        if ( pb -> marker == pb -> bsize )
-        {
-            size_t num_flushed;
-            pb -> rc = KFileWrite ( pb -> f, pb -> pos,
-                pb -> buffer, pb -> bsize, & num_flushed );
-            if ( pb -> rc != 0 )
-            {
-                * num_writ = 0;
-                return pb -> rc;
-            }
-
-            if ( num_flushed == 0 )
-            {
-                * num_writ = total + to_write;
-                return pb -> rc = RC ( rcDB, rcMetadata, rcPersisting, rcTransfer, rcIncomplete );
-            }
-
-            pb -> marker -= num_flushed;
-            pb -> pos += num_flushed;
-
-            if ( pb -> marker != 0 )
-                memcpy ( pb -> buffer, pb -> buffer + num_flushed, pb -> marker );
-        }
-    }
-
-    * num_writ = total;
-    return 0;
-}
-
-static
-rc_t CC KMAttrNodeAuxFunc ( void *param, const void *node, size_t *num_writ,
-    PTWriteFunc write, void *write_param )
-{
-    const KMAttrNode *n = node;
-    size_t nsize = strlen ( n -> name );
-
-    if ( write != NULL )
-        return ( * write ) ( write_param, n -> name, nsize + n -> vsize + 1, num_writ );
-
-    * num_writ = nsize + n -> vsize + 1;
-    return 0;
-}
-
-static
-rc_t CC KMDataNodeAuxFunc ( void *param, const void *node, size_t *num_writ,
-    PTWriteFunc write, void *write_param )
-{
-    rc_t rc;
-    const KMDataNode *n = node;
-    size_t nsize = strlen ( n -> name );
-    size_t auxsize = 0;
-
-    /* first write node name */
-    if ( write != NULL )
-    {
-        uint8_t bits = ( uint8_t ) ( nsize - 1 ) << 2;
-        if ( n -> attr . root != NULL )
-            bits |= 1;
-        if ( n -> child . root != NULL )
-            bits |= 2;
-        rc = ( * write ) ( write_param, & bits, 1, num_writ );
-        if ( rc == 0 )
-            rc = ( * write ) ( write_param, n -> name, nsize, num_writ );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* if there are any attributes */
-    if ( n -> attr . root != NULL )
-    {
-        rc = BSTreePersist ( & n -> attr, num_writ,
-            write, write_param, KMAttrNodeAuxFunc, NULL );
-        if ( rc != 0 )
-            return rc;
-        auxsize += * num_writ;
-    }
-
-    /* if there are any children */
-    if ( n -> child . root != NULL )
-    {
-        rc = BSTreePersist ( & n -> child, num_writ,
-            write, write_param, KMDataNodeAuxFunc, NULL );
-        if ( rc != 0 )
-            return rc;
-        auxsize += * num_writ;
-    }
-
-    /* finally write value */
-    if ( write == NULL )
-    {
-        * num_writ = nsize + 1 + auxsize + n -> vsize;
-        return 0;
-    }
-
-    rc = ( * write ) ( write_param, n -> value, n -> vsize, num_writ );
-    * num_writ += nsize + 1 + auxsize;
-    return rc;
-}
-
-static
-rc_t KMetadataFlush ( KMetadata *self )
-{
-    rc_t rc;
-    KMDFlushData pb;
-    memset ( & pb, 0, sizeof pb );
-
-    /* allocate buffer */
-    pb . buffer = malloc ( pb . bsize = 32 * 1024 );
-    if ( pb . buffer == NULL )
-        rc = RC ( rcDB, rcMetadata, rcPersisting, rcMemory, rcExhausted );
-    else
-    {
-        /* open output file */
-        rc = KColumnFileCreate ( & pb . f, & pb . fmd5, self -> dir, self -> md5,
-                                 kcmInit | kcmParents, false, "md/cur.tmp" );
-        /* ZZZZ do we need a "KMD5FileReset ( pb -> fmd5 )" ? I don't think so */
-        if ( rc == 0 )
-        {
-            /* write header */
-            KDBHdr *hdr = ( KDBHdr* ) pb . buffer;
-            hdr -> endian = eByteOrderTag;
-            hdr -> version = KMETADATAVERS;
-            pb . marker = sizeof * hdr;
-
-            /* persist root node */
-            rc = BSTreePersist ( & self -> root -> child, NULL,
-                KMDWriteFunc, & pb, KMDataNodeAuxFunc, NULL );
-            if ( rc == 0 && pb . marker != 0 )
-            {
-                size_t num_flushed;
-                rc = KFileWrite ( pb . f, pb . pos,
-                                  pb . buffer, pb . marker, & num_flushed );
-                if ( rc == 0 && num_flushed != pb . marker )
-                    rc = RC ( rcDB, rcMetadata, rcPersisting, rcTransfer, rcIncomplete );
-            }
-            pb . rc = KFileRelease ( pb . f );
-            if ( pb . rc  ==  0 )
-                pb . fmd5 = NULL;
-            if ( rc == 0 && ( rc = pb . rc ) == 0 )
-            {
-                /* rename file */
-                rc = KDirectoryRename ( self -> dir, true, "md/cur.tmp", "md/cur" );
-
-                if ( self->md5 != NULL && rc == 0 )
-                    rc = KMD5SumFmtRename ( self -> md5, "md/cur.tmp", "md/cur" );
-
-                if ( rc == 0 )
-                    self -> dirty = false;
-            }
-        }
-
-        free ( pb . buffer );
-    }
-    return rc;
-}
-
-/* Whack
- */
-static
-rc_t KMetadataWhack ( KMetadata *self )
-{
-    rc_t rc = 0;
-    KSymbol * symb;
-    KDBManager *mgr = self -> mgr;
-    assert ( mgr != NULL );
-
-    KRefcountWhack ( & self -> refcount, "KMetadata" );
-
-    if ( self -> dirty )
-    {
-        /* if this was a version 1 file,
-           first freeze it */
-        if ( self -> vers == 1 )
-        {
-            rc = KMetadataFreeze ( self );
-            if ( rc != 0 )
-                return rc;
-        }
-
-        /* flush it */
-        rc = KMetadataFlush ( self );
-        if ( rc != 0 )
-            return rc;
-        self -> dirty = false;
-    }
-
-    if ( self -> db != NULL )
-    {
-        rc = KDatabaseSever ( self -> db );
-        if ( rc != 0 )
-            return rc;
-        self -> db = NULL;
-    }
-    else if ( self -> tbl != NULL )
-    {
-        rc = KTableSever ( self -> tbl );
-        if ( rc != 0 )
-            return rc;
-        self -> tbl = NULL;
-    }
-    else if ( self -> col != NULL )
-    {
-        rc = KColumnSever ( self -> col );
-        if ( rc != 0 )
-            return rc;
-        self -> col = NULL;
-    }
-
-    if ( self -> md5 != NULL )
-    {
-	rc = KMD5SumFmtRelease ( self -> md5 );
-	if ( rc != 0 )
-	    return rc;
-	self -> md5 = NULL;
-    }
-
-    /* remove from mgr */
-    symb = KDBManagerOpenObjectFind (mgr, self->path);
-    if (symb != NULL)
-    {
-        rc = KDBManagerOpenObjectDelete (mgr, symb);
-        if (rc == 0)
-        {
-            /* release manager
-               should never fail */
-            rc = KDBManagerSever ( mgr );
-            if ( rc != 0 )
-                KDBManagerOpenObjectAdd (mgr, symb);
-            else
-            {
-                /* complete */
-                KDirectoryRelease ( self -> dir );
-                atomic32_set ( & self -> refcount, 0 );
-                KMDataNodeWhack ( & self -> root -> n, NULL );
-                free ( self );
-                return 0;
-            }
-        }
-    }
-
-    KRefcountInit ( & self -> refcount, 1, "KMetadata", "whack", "kmeta" );
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KMetadataAddRef ( const KMetadata *cself )
-{
-    KMetadata *self = ( KMetadata* ) cself;
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KMetadata" ) )
-        {
-        case krefLimit:
-            return RC ( rcDB, rcMetadata, rcAttaching, rcRange, rcExcessive );
-        }
-        ++ self -> opencount;
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KMetadataRelease ( const KMetadata *cself )
-{
-    KMetadata *self = ( KMetadata* ) cself;
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KMetadata" ) )
-        {
-        case krefWhack:
-            return KMetadataWhack ( ( KMetadata* ) self );
-        case krefLimit:
-            return RC ( rcDB, rcMetadata, rcReleasing, rcRange, rcExcessive );
-        }
-        -- self -> opencount;
-    }
-    return 0;
-}
-
-static
-KMetadata *KMetadataAttach ( const KMetadata *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "KMetadata" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( KMetadata* ) self;
-}
-
-static
-rc_t KMetadataSever ( const KMetadata *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "KMetadata" ) )
-        {
-        case krefWhack:
-            return KMetadataWhack ( ( KMetadata* ) self );
-        case krefLimit:
-            return RC ( rcDB, rcMetadata, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Make
- */
-
-static
-rc_t KMetadataPopulate ( KMetadata *self, const KDirectory *dir, const char *path, bool read_only )
-{
-    const KFile *f;
-    rc_t rc = KDirectoryOpenFileRead ( dir, & f, "%s", path );
-    if ( rc == 0 )
-    {
-        const KMMap *mm;
-        rc = KMMapMakeRead ( & mm, f );
-        if ( rc == 0 )
-        {
-            size_t size;
-            const void *addr;
-            rc = KMMapSize ( mm, & size );
-            if ( rc == 0 )
-                rc = KMMapAddrRead ( mm, & addr );
-
-            if ( rc == 0 )
-            {
-                union
-                {
-                    KDBHdr v1;
-                    KDBHdr v2;
-                } hdrs;
-
-                const KDBHdr *hdr = ( const KDBHdr* ) addr;
-                const void *pbstree_src = hdr + 1;
-
-                rc = KDBHdrValidate ( hdr, size, 1, KMETADATAVERS );
-                if ( self -> read_only && GetRCState ( rc ) == rcIncorrect && GetRCObject ( rc ) == rcByteOrder )
-                {
-                    hdrs . v1 . endian = bswap_32 ( hdr -> endian );
-                    hdrs . v1 . version = bswap_32 ( hdr -> version );
-                    rc = KDBHdrValidate ( & hdrs . v1, size, 1, KMETADATAVERS );
-                    if ( rc == 0 )
-                    {
-                        self -> byteswap = true;
-                        switch ( hdrs . v1 . version )
-                        {
-                        case 1:
-                            hdr = & hdrs . v1;
-                            break;
-                        case 2:
-                            hdr = & hdrs . v2;
-                            break;
-                        }
-                    }
-                }
-                if ( rc == 0 )
-                {
-                    PBSTree *bst;
-                    rc = PBSTreeMake ( & bst, pbstree_src, size - sizeof * hdr, self -> byteswap );
-                    if ( rc != 0 )
-                        rc = RC ( rcDB, rcMetadata, rcConstructing, rcData, rcCorrupt );
-                    else
-                    {
-                        KMDataNodeInflateData pb;
-
-                        pb . meta = self;
-                        pb . par = self -> root;
-                        pb . bst = & self -> root -> child;
-                        pb . node_size_limit = read_only ? NODE_SIZE_LIMIT : 0;
-                        pb . node_child_limit = read_only ? NODE_CHILD_LIMIT : 0;
-                        pb . rc = 0;
-                        pb . byteswap = self -> byteswap;
-
-                        if ( hdr -> version == 1 )
-                            PBSTreeDoUntil ( bst, false, KMDataNodeInflate_v1, & pb );
-                        else
-                            PBSTreeDoUntil ( bst, false, KMDataNodeInflate, & pb );
-                        rc = pb . rc;
-
-                        self -> vers = hdr -> version;
-
-                        PBSTreeWhack ( bst );
-                    }
-                }
-            }
-
-            KMMapRelease ( mm );
-        }
-
-        KFileRelease ( f );
-    }
-    return rc;
-}
-
-
-static
-rc_t KDBManagerInsertMetadata ( KDBManager * self, KMetadata * meta )
-{
-    rc_t rc;
-    rc = KDBManagerOpenObjectAdd (self, &meta->sym);
-    if ( rc == 0 )
-        meta -> mgr = KDBManagerAttach ( self );
-    return rc;
-}
-
-
-static
-rc_t KMetadataMake ( KMetadata **metap,
-    KDirectory *dir, const char *path, uint32_t rev,
-    bool populate, bool read_only )
-{
-    rc_t rc;
-    KMetadata *meta = malloc ( sizeof * meta + strlen ( path ) );
-    if ( meta == NULL )
-        rc = RC ( rcDB, rcMetadata, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        memset ( meta, 0, sizeof * meta );
-        meta -> root = calloc ( 1, sizeof * meta -> root );
-        if ( meta -> root == NULL )
-            rc = RC ( rcDB, rcMetadata, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            meta -> root -> meta = meta;
-            meta -> dir = dir;
-            KRefcountInit ( & meta -> refcount, 1, "KMetadata", "make-update", path );
-            meta -> opencount = 1;
-            meta -> rev = rev;
-            meta -> read_only = read_only;
-
-            strcpy ( meta -> path, path );
-
-            meta->sym.u.obj = meta;
-            StringInitCString (&meta->sym.name, meta->path);
-            meta->sym.type = kptMetadata;
-
-            KRefcountInit ( & meta -> root -> refcount, 0, "KMDataNode", "make-read", "/" );
-
-            if ( ! populate )
-            {
-                meta -> vers = KMETADATAVERS;
-                KDirectoryAddRef ( dir );
-                * metap = meta;
-                return 0;
-            }
-            
-            rc = KMetadataPopulate ( meta, dir, path, read_only );
-            if ( rc == 0 )
-            {
-                KDirectoryAddRef ( dir );
-                * metap = meta;
-                return 0;
-            }
-
-            free ( meta -> root );
-        }
-
-        free ( meta );
-    }
-    * metap = NULL;
-    return rc;
-}
-
-#if 0
-static
-rc_t KMetadataMakeRead ( KMetadata **meta,
-    const KDirectory *dir, const char *path, uint32_t rev )
-{
-    rc_t rc = KMetadataMakeUpdate ( meta,
-        ( KDirectory* ) dir, path, rev, true );
-    if ( rc == 0 )
-        ( * meta ) -> read_only = true;
-    return rc;
-}
-#endif
-
-
-/* OpenMetadataRead
- *  opens metadata for read
- *
- *  "meta" [ OUT ] - return parameter for metadata
- */
-static
-rc_t KDBManagerOpenMetadataReadInt ( KDBManager *self,
-    const KMetadata **metap, const KDirectory *wd, uint32_t rev, bool prerelease,bool *cached )
-{
-    char metapath [ 4096 ];
-    rc_t rc = ( prerelease == 1 ) ?
-        KDirectoryVResolvePath ( wd, true, metapath, sizeof metapath, "meta", NULL ):
-        ( ( rev == 0 ) ?
-          KDirectoryVResolvePath ( wd, true, metapath, sizeof metapath, "md/cur", NULL ):
-          KDirectoryResolvePath ( wd, true, metapath, sizeof metapath, "md/r%.3u", rev ) );
-    if(cached != NULL ) *cached = false;
-    if ( rc == 0 )
-    {
-        KMetadata * meta;
-        KSymbol * sym;
-
-        /* if already open */
-        sym = KDBManagerOpenObjectFind (self, metapath);
-        if (sym != NULL)
-        {
-            const KMetadata * cmeta;
-            rc_t obj;
-
-	    if(cached != NULL ) *cached = true;
-            switch (sym->type)
-            {
-            case kptMetadata:
-                cmeta = (KMetadata*)sym->u.obj;
-                /* if open for update, refuse */
-                if ( cmeta -> read_only )
-                {
-                    /* attach a new reference and we're gone */
-                    rc = KMetadataAddRef ( cmeta );
-                    if ( rc == 0 )
-                        * metap = cmeta;
-                    return rc;
-                }
-                obj = rcMetadata;
-                break;
-
-            default:
-                obj = rcPath;
-                break;
-            case kptTable:
-                obj = rcTable;
-                break;
-            case kptColumn:
-                obj = rcColumn;
-                break;
-            case kptIndex:
-                obj = rcIndex;
-                break;
-            case kptDatabase:
-                obj = rcDatabase;
-                break;
-            }
-            return  RC (rcDB, rcMgr, rcOpening, obj, rcBusy);
-	}
-
-
-        switch ( KDirectoryPathType ( wd, "%s", metapath ) )
-        {
-        case kptNotFound:
-            rc = RC ( rcDB, rcMgr, rcOpening, rcMetadata, rcNotFound );
-            break;
-        case kptBadPath:
-            rc = RC ( rcDB, rcMgr, rcOpening, rcPath, rcInvalid );
-            break;
-        case kptFile:
-        case kptFile | kptAlias:
-            break;
-        default:
-            rc = RC ( rcDB, rcMgr, rcOpening, rcPath, rcIncorrect );
-            break;
-        }
-
-        if ( rc == 0 )
-        {
-            rc = KMetadataMake ( & meta, ( KDirectory* ) wd, metapath, rev, true, true );
-            
-            if ( rc == 0 )
-            {
-                rc = KDBManagerInsertMetadata (self, meta );
-                if ( rc == 0 )
-                {
-                    * metap = meta;
-                    return 0;
-                }
-
-                KMetadataRelease ( meta );
-            }
-
-/*             rc = RC ( rcDB, rcMgr, rcOpening, rcMetadata, rcExists ); */
-        }
-    }
-    
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseOpenMetadataRead ( const KDatabase *self, const KMetadata **metap )
-{
-    rc_t rc;
-    const KMetadata *meta;
-    bool  meta_is_cached;
-
-    if ( metap == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcParam, rcNull );
-
-    * metap = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcSelf, rcNull );
-
-    rc = KDBManagerOpenMetadataReadInt ( self -> mgr, & meta, self -> dir, 0, false, &meta_is_cached );
-    if ( rc == 0 )
-    {
-        if(!meta_is_cached) ((KMetadata*)meta) -> db = KDatabaseAttach ( self );
-        * metap = meta;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableOpenMetadataRead ( const KTable *self, const KMetadata **metap )
-{
-    rc_t rc;
-    const KMetadata *meta;
-    bool  meta_is_cached;
-
-    if ( metap == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcParam, rcNull );
-
-    * metap = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcSelf, rcNull );
-
-    rc = KDBManagerOpenMetadataReadInt ( self -> mgr, & meta, self -> dir, 0, self -> prerelease, &meta_is_cached );
-    if ( rc == 0 )
-    {
-        if(!meta_is_cached) ((KMetadata*)meta) -> tbl = KTableAttach ( self );
-        * metap = meta;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KColumnOpenMetadataRead ( const KColumn *self, const KMetadata **metap )
-{
-    rc_t rc;
-    const KMetadata *meta;
-    bool  meta_is_cached;
-
-    if ( metap == NULL )
-        return RC ( rcDB, rcColumn, rcOpening, rcParam, rcNull );
-
-    * metap = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcColumn, rcOpening, rcSelf, rcNull );
-
-    rc = KDBManagerOpenMetadataReadInt ( self -> mgr, & meta, self -> dir, 0, false, &meta_is_cached );
-    if ( rc == 0 )
-    {
-        if(!meta_is_cached) ((KMetadata*)meta) -> col = KColumnAttach ( self );
-        * metap = meta;
-    }
-
-    return rc;
-}
-
-/* OpenMetadataUpdate
- *  open metadata for read/write
- *
- *  "meta" [ OUT ] - return parameter for metadata
- */
-static
-rc_t KDBManagerOpenMetadataUpdateInt ( KDBManager *self,
-    KMetadata **metap, KDirectory *wd, KMD5SumFmt * md5 )
-{
-/* WAK
- * NEEDS MD5 UPDATE???
- */
-    char metapath [ 4096 ];
-    rc_t rc = KDirectoryResolvePath ( wd, true,
-        metapath, sizeof metapath, "md/cur" );
-    if ( rc == 0 )
-    {
-        KSymbol * sym;
-        KMetadata *meta;
-        bool populate = true;
-
-        switch ( KDirectoryPathType ( wd, "%s", metapath ) )
-        {
-        case kptNotFound:
-            populate = false;
-            break;
-        case kptBadPath:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcInvalid );
-        case kptFile:
-        case kptFile | kptAlias:
-            break;
-        default:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcIncorrect );
-        }
-
-        /* if already open */
-        sym = KDBManagerOpenObjectFind (self, metapath);
-        if (sym != NULL)
-        {
-            rc_t obj;
-            switch (sym->type)
-            {
-            default:
-                obj = rcPath;
-                break;
-            case kptDatabase:
-                obj = rcDatabase;
-                break;
-            case kptTable:
-                obj = rcTable;
-                break;
-            case kptColumn:
-                obj = rcColumn;
-                break;
-            case kptIndex:
-                obj = rcIndex;
-                break;
-            case kptMetadata:
-                obj = rcMetadata;
-                break;
-            }
-            return RC ( rcDB, rcMgr, rcOpening, obj, rcBusy );
-        }
-
-        rc = KMetadataMake ( & meta, wd, metapath, 0, populate, false );
-        if ( rc == 0 )
-        {
-            rc = KDBManagerInsertMetadata (self, meta);
-            if (rc == 0)
-            {
-                if ( md5 != NULL )
-                {
-                    meta -> md5 = md5;
-                    rc = KMD5SumFmtAddRef ( md5 );
-                }
-
-                if ( rc == 0 )
-                {
-                    * metap = meta;
-                    return 0;
-                }
-            }
-
-            KMetadataRelease ( meta );
-        }
-    }
-    
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseOpenMetadataUpdate ( KDatabase *self, KMetadata **metap )
-{
-    rc_t rc;
-    KMetadata *meta;
-
-    if ( metap == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcParam, rcNull );
-
-    * metap = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcDatabase, rcOpening, rcDatabase, rcReadonly );
-
-    rc = KDBManagerOpenMetadataUpdateInt ( self -> mgr, & meta, self -> dir, self -> md5 );
-    if ( rc == 0 )
-    {
-        meta -> db = KDatabaseAttach ( self );
-        * metap = meta;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableOpenMetadataUpdate ( KTable *self, KMetadata **metap )
-{
-    rc_t rc;
-    KMetadata *meta;
-
-    if ( metap == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcParam, rcNull );
-
-    * metap = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcTable, rcOpening, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcTable, rcOpening, rcTable, rcReadonly );
-
-    rc = KDBManagerOpenMetadataUpdateInt ( self -> mgr, & meta, self -> dir, self -> md5 );
-    if ( rc == 0 )
-    {
-        meta -> tbl = KTableAttach ( self );
-        * metap = meta;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KColumnOpenMetadataUpdate ( KColumn *self, KMetadata **metap )
-{
-    rc_t rc;
-    KMetadata *meta;
-
-    if ( metap == NULL )
-        return RC ( rcDB, rcColumn, rcOpening, rcParam, rcNull );
-
-    * metap = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcColumn, rcOpening, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcColumn, rcOpening, rcColumn, rcReadonly );
-
-    rc = KDBManagerOpenMetadataUpdateInt ( self -> mgr, & meta, self -> dir, self -> md5 );
-    if ( rc == 0 )
-    {
-        meta -> col = KColumnAttach ( self );
-        * metap = meta;
-    }
-
-    return rc;
-}
-
-
-/* Version
- *  returns the metadata format version
- */
-LIB_EXPORT rc_t CC KMetadataVersion ( const KMetadata *self, uint32_t *version )
-{
-    if ( version == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcParam, rcNull );
-
-    if ( self == NULL )
-    {
-        * version = 0;
-        return RC ( rcDB, rcMetadata, rcAccessing, rcSelf, rcNull );
-    }
-
-    * version = self -> vers;
-    return 0;
-}
-
-
-/* ByteOrder
- *  indicates whether original byte order is reversed
- *  under current architecture.
- *
- *  the byte order of the column is established by
- *  the host architecture when created.
- *
- *  "reversed" [ OUT ] - if true, the original byte
- *  order is reversed with regard to host native byte order.
- */
-LIB_EXPORT rc_t CC KMetadataByteOrder ( const KMetadata *self, bool *reversed )
-{
-    if ( reversed == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcParam, rcNull );
-
-    if ( self == NULL )
-    {
-        * reversed = false;
-        return RC ( rcDB, rcMetadata, rcAccessing, rcSelf, rcNull );
-    }
-
-    * reversed = self -> byteswap;
-    return 0;
-}
-
-
-/* Revision
- *  returns current revision number
- *  where 0 ( zero ) means tip
- */
-LIB_EXPORT rc_t CC KMetadataRevision ( const KMetadata *self, uint32_t *revision )
-{
-    if ( revision == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcParam, rcNull );
-
-    if ( self == NULL )
-    {
-        * revision = 0;
-        return RC ( rcDB, rcMetadata, rcAccessing, rcSelf, rcNull );
-    }
-
-    * revision = self -> rev;
-    return 0;
-}
-
-
-/* MaxRevision
- *  returns the maximum revision available
- */
-LIB_EXPORT rc_t CC KMetadataMaxRevision ( const KMetadata *self, uint32_t *revision )
-{
-    rc_t rc;
-    KNamelist *listing;
-
-    if ( revision == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcParam, rcNull );
-
-    * revision = 0;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcSelf, rcNull );
-
-    rc = KDirectoryList ( self -> dir,
-        & listing, NULL, NULL, "md" );
-    if ( rc == 0 )
-    {
-        uint32_t rev_max, count;
-        rc = KNamelistCount ( listing, & count );
-        if ( rc == 0 )
-        {
-            uint32_t idx;
-            for ( rev_max = idx = 0; idx < count; ++ idx )
-            {
-                const char *name;
-                    
-                rc = KNamelistGet ( listing, idx, & name );
-                if ( rc != 0 )
-                    break;
-                    
-                if ( name [ 0 ] == 'r' )
-                {
-                    char *end;
-                    uint32_t rev = strtou32 ( name + 1, & end, 10 );
-                    if ( end [ 0 ] == 0 && rev > rev_max )
-                        rev_max = rev;
-                }
-            }
-
-            * revision = rev_max;
-        }
-                
-        KNamelistRelease ( listing );
-    }
-    else if ( GetRCState ( rc ) == rcNotFound )
-    {
-        rc = 0;
-    }
-
-    return rc;
-}
-
-
-/* Commit
- *  ensure any changes are committed to disk
- */
-LIB_EXPORT rc_t CC KMetadataCommit ( KMetadata *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMetadata, rcCommitting, rcSelf, rcNull );
-
-    /* only flush if dirty */
-    if ( ! self -> dirty )
-        return 0;
-
-    /* if this was a version 1 file,
-       first freeze it */
-    if ( self -> vers == 1 )
-    {
-        rc = KMetadataFreeze ( self );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* flush it */
-    rc = KMetadataFlush ( self );
-    if ( rc == 0 )
-        self -> dirty = false;
-
-    return rc;
-}
-
-
-/* Freeze
- *  freezes current metadata revision
- *  further modification will begin on a copy
- */
-LIB_EXPORT rc_t CC KMetadataFreeze ( KMetadata *self )
-{
-    rc_t rc;
-    uint32_t rev_max;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMetadata, rcFreezing, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcMetadata, rcFreezing, rcMetadata, rcReadonly );
-
-    switch ( KDirectoryVPathType ( self -> dir, "md/cur", NULL ) )
-    {
-    case kptFile:
-        break;
-    case kptFile | kptAlias:
-        return 0;
-    default:
-        return RC ( rcDB, rcMetadata, rcFreezing, rcPath, rcInvalid );
-    }
-
-    /* find max revision */
-    rc = KMetadataMaxRevision ( self, & rev_max );
-    if ( rc == 0 )
-    {
-        int len;
-        char revision [ 16 ];	/* nice even stack (could have been 8) */
-
-        /* rename tip to new version */
-        len = snprintf ( revision, sizeof revision, "md/r%.3u", rev_max + 1 );
-        if ( len < 0 || len >= sizeof revision )
-            return RC ( rcDB, rcMetadata, rcFreezing, rcPath, rcInvalid );
-
-        rc = KDirectoryRename ( self -> dir, false, "md/cur", revision );
-        if ( rc == 0 )
-        {
-            /* now create link to this guy */
-            rc = KDirectoryCreateAlias ( self -> dir,
-                0777, kcmCreate, revision, "md/cur" );
-
-            if ( rc == 0 )
-            {
-                if ( self -> md5 != NULL )
-                {
-                    rc = KMD5SumFmtRename ( self -> md5, "md/cur", revision );
-                    if ( rc != 0 )	/* attempt to recover */
-                        KDirectoryRemove ( self -> dir, false, "md/cur" );
-                }
-            }
-            if ( rc != 0 )                /* attempt to recover */
-                KDirectoryRename ( self -> dir, false, revision, "md/cur" );
-        }
-    }
-        
-    return rc;
-}
-
-
-/* OpenRevision
- *  opens a read-only indexed revision of metadata
- */
-LIB_EXPORT rc_t CC KMetadataOpenRevision ( const KMetadata *self,
-    const KMetadata **metap, uint32_t revision )
-{
-    rc_t rc;
-    const KMetadata *meta;
-    bool  meta_is_cached;
-
-    if ( metap == NULL )
-        return RC ( rcDB, rcMetadata, rcOpening, rcParam, rcNull );
-
-    * metap = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMetadata, rcOpening, rcSelf, rcNull );
-
-    rc = KDBManagerOpenMetadataReadInt ( self -> mgr,
-        & meta, self -> dir, revision, false, &meta_is_cached  );
-    if ( rc == 0 )
-    {
-        if(!meta_is_cached)
-	{
-	    if ( self -> db != NULL )
-                ((KMetadata*)meta) -> db = KDatabaseAttach ( self -> db );
-            else if ( self -> tbl != NULL )
-                ((KMetadata*)meta) -> tbl = KTableAttach ( self -> tbl );
-            else if ( self -> col != NULL )
-                ((KMetadata*)meta) -> col = KColumnAttach ( self -> col );
-	}
-
-        * metap = meta;
-    }
-
-    return rc;
-}
-
-
-/* GetSequence
- * SetSequence
- * NextSequence
- *  access a named sequence
- *
- *  "seq" [ IN ] - NUL terminated sequence name
- *
- *  "val" [ OUT ] - return parameter for sequence value
- *  "val" [ IN ] - new sequence value
- */
-LIB_EXPORT rc_t CC KMetadataGetSequence ( const KMetadata *self,
-    const char *seq, int64_t *val )
-{
-    rc_t rc;
-    const KMDataNode *found;
-
-    if ( val == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcParam, rcNull );
-    * val = 0;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcSelf, rcNull );
-    if ( seq == NULL )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcPath, rcNull );
-    if ( seq [ 0 ] == 0 )
-        return RC ( rcDB, rcMetadata, rcAccessing, rcPath, rcInvalid );
-
-    rc = KMDataNodeOpenNodeRead ( self -> root, & found, ".seq/%s", seq );
-    if ( rc == 0 )
-    {
-        rc = KMDataNodeReadB64 ( found, val );
-        KMDataNodeRelease ( found );
-    }
-    
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMetadataSetSequence ( KMetadata *self,
-    const char *seq, int64_t val )
-{
-    rc_t rc;
-    KMDataNode *found;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMetadata, rcUpdating, rcSelf, rcNull );
-    if ( seq == NULL )
-        return RC ( rcDB, rcMetadata, rcUpdating, rcPath, rcNull );
-    if ( seq [ 0 ] == 0 )
-        return RC ( rcDB, rcMetadata, rcUpdating, rcPath, rcInvalid );
-
-    rc = KMDataNodeOpenNodeUpdate ( self -> root, & found, ".seq/%s", seq );
-    if ( rc == 0 )
-    {
-        rc = KMDataNodeWriteB64 ( found, & val );
-        KMDataNodeRelease ( found );
-    }
-        
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMetadataNextSequence ( KMetadata *self,
-    const char *seq, int64_t *val )
-{
-    rc_t rc;
-    KMDataNode *found;
-
-    if ( val == NULL )
-        return RC ( rcDB, rcMetadata, rcUpdating, rcParam, rcNull );
-    * val = 0;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMetadata, rcUpdating, rcSelf, rcNull );
-    if ( seq == NULL )
-        return RC ( rcDB, rcMetadata, rcUpdating, rcPath, rcNull );
-    if ( seq [ 0 ] == 0 )
-        return RC ( rcDB, rcMetadata, rcUpdating, rcPath, rcInvalid );
-
-    rc = KMDataNodeOpenNodeUpdate ( self -> root, & found, ".seq/%s", seq );
-    if ( rc == 0 )
-    {
-        rc = KMDataNodeReadB64 ( found, val );
-        if ( rc == 0 || GetRCState ( rc ) == rcIncomplete )
-        {
-            * val += 1;
-            rc = KMDataNodeWriteB64 ( found, val );
-        }
-
-        KMDataNodeRelease ( found );
-    }
-
-    return rc;
-}
-
-
-
-/*--------------------------------------------------------------------------
- * KNamelist
- */
-typedef struct KMDataNodeNamelist KMDataNodeNamelist;
-struct KMDataNodeNamelist
-{
-    KNamelist dad;
-    const KMDataNode *node;
-    size_t count;
-    const char *namelist [ 1 ];
-};
-
-/* Whack
- */
-static
-rc_t CC KMDataNodeNamelistWhack ( KMDataNodeNamelist *self )
-{
-    rc_t rc = KMDataNodeRelease ( self -> node );
-    if ( rc == 0 )
-        free ( self );
-    return rc;
-}
-
-/* Count
- */
-static
-rc_t CC KMDataNodeNamelistCount ( const KMDataNodeNamelist *self, uint32_t *count )
-{
-    * count = ( uint32_t ) self -> count;
-    return 0;
-}
-
-/* Get
- */
-static
-rc_t CC KMDataNodeNamelistGet ( const KMDataNodeNamelist *self,
-    uint32_t idx, const char **name )
-{
-    if ( ( size_t ) idx >= self -> count )
-        return RC ( rcDB, rcNamelist, rcAccessing, rcParam, rcExcessive );
-    * name = self -> namelist [ idx ];
-    return 0;
-}
-
-/* Make
- */
-static KNamelist_vt_v1 vtKMDataNodeNamelist =
-{
-    /* version 1.0 */
-    1, 0,
-
-    /* start minor version 0 methods */
-    KMDataNodeNamelistWhack,
-    KMDataNodeNamelistCount,
-    KMDataNodeNamelistGet
-    /* end minor version 0 methods */
-};
-
-static
-rc_t KMDataNodeNamelistMake ( KNamelist **names, unsigned int count )
-{
-    rc_t rc;
-    KMDataNodeNamelist *self = calloc ( 1, sizeof * self -
-        sizeof self -> namelist + count * sizeof self -> namelist [ 0 ] );
-    if ( self == NULL )
-        rc = RC ( rcDB, rcNamelist, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        rc = KNamelistInit ( & self -> dad,
-            ( const KNamelist_vt* ) & vtKMDataNodeNamelist );
-        if ( rc == 0 )
-        {
-            * names = & self -> dad;
-            return 0;
-        }
-        
-        free ( self );
-    }
-
-    return rc;
-}
-
-/* List
- *  create metadata node listings
- */
-static
-void CC KMDataNodeListCount ( BSTNode *n, void *data )
-{
-    * ( unsigned int* ) data += 1;
-}
-
-static
-void CC KMDataNodeGrabAttr ( BSTNode *n, void *data )
-{
-    KMDataNodeNamelist *list = data;
-    list -> namelist [ list -> count ++ ] = ( ( const KMAttrNode* ) n ) -> name;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeListAttr ( const KMDataNode *self, KNamelist **names )
-{
-    rc_t rc;
-    unsigned int count;
-
-    if ( names == NULL )
-        return RC ( rcDB, rcNode, rcListing, rcParam, rcNull );
-    * names = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcNode, rcListing, rcSelf, rcNull );
-
-    count = 0;
-    BSTreeForEach ( & self -> attr, 0, KMDataNodeListCount, & count );
-
-    rc = KMDataNodeNamelistMake ( names, count );
-    if ( rc == 0 )
-        BSTreeForEach ( & self -> attr, false, KMDataNodeGrabAttr, * names );
-
-    return rc;
-}
-
-static
-void CC KMDataNodeGrabName ( BSTNode *n, void *data )
-{
-    KMDataNodeNamelist *list = data;
-    list -> namelist [ list -> count ++ ] = ( ( const KMDataNode* ) n ) -> name;
-}
-
-LIB_EXPORT rc_t CC KMDataNodeListChildren ( const KMDataNode *self, KNamelist **names )
-{
-    rc_t rc;
-    unsigned int count;
-
-    if ( names == NULL )
-        return RC ( rcDB, rcNode, rcListing, rcParam, rcNull );
-    * names = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcNode, rcListing, rcSelf, rcNull );
-
-    count = 0;
-    BSTreeForEach ( & self -> child, 0, KMDataNodeListCount, & count );
-
-    rc = KMDataNodeNamelistMake ( names, count );
-    if ( rc == 0 )
-        BSTreeForEach ( & self -> child, false, KMDataNodeGrabName, * names );
-
-    return rc;
-}
diff --git a/libs/kdb/wtable-priv.h b/libs/kdb/wtable-priv.h
deleted file mode 100644
index cda3fa5..0000000
--- a/libs/kdb/wtable-priv.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_table_priv_
-#define _h_table_priv_
-
-#ifndef _h_kdb_table_
-#include <kdb/table.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#include <klib/symbol.h>
-#include <kfs/md5.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDatabase;
-struct KDBManager;
-struct KDirectory;
-
-
-/*--------------------------------------------------------------------------
- * KTable
- *  represents a table
- *  normally implemented as a directory
- *  but may be a single archive file
- *  in either executable or streamable format
- */
-struct KTable
-{
-    struct KDirectory *dir;
-    struct KDBManager *mgr;
-    struct KDatabase *db;
-    struct KMD5SumFmt *md5;
-
-    KRefcount refcount;
-    uint32_t opencount;
-    bool use_md5;
-    bool read_only;
-    bool prerelease;
-    uint8_t align [ 5 ];
-
-    KSymbol sym;
-
-    char path [ 1 ];
-};
-
-/* Attach
- * Sever
- *  like KTableRelease, except called internally
- *  indicates that a child object is letting go...
- */
-KTable *KTableAttach ( const KTable *self );
-rc_t KTableSever ( const KTable *self );
-
-/* Cmp
- * Sort
- */
-int KTableCmp ( const void *item, const BSTNode *n );
-int KTableSort ( const BSTNode *item, const BSTNode *n );
-
-/* check a disk-resident column for needing re-indexing */
-bool KTableColumnNeedsReindex ( KTable *self, const char *colname );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_table_priv_ */
diff --git a/libs/kdb/wtable.c b/libs/kdb/wtable.c
deleted file mode 100644
index 0632043..0000000
--- a/libs/kdb/wtable.c
+++ /dev/null
@@ -1,1638 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define TRACK_REFERENCES 0
-
-#include <kdb/extern.h>
-#include "wtable-priv.h"
-#include "dbmgr-priv.h"
-#include "database-priv.h"
-#include "wcolumn-priv.h"
-#include "windex-priv.h"
-#include "wkdb-priv.h"
-
-#include <klib/namelist.h>
-#include <klib/symbol.h>
-#include <kdb/namelist.h>
-#include <klib/log.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/md5.h>
-#include <kfs/impl.h>
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/* keep file system structure compatible with v0 code */
-#define V0_BACKWARD_COMPAT 0
-
-/*--------------------------------------------------------------------------
- * KTable
- *  a collection of columns indexed by row id, metadata, indices
- */
-
-/* GetPath
- *  return the absolute path to table
- */
-LIB_EXPORT rc_t CC KTableGetPath ( const KTable *self,
-    const char **path )
-{
-    if ( self == NULL )
-        return RC ( rcDB, rcTable, rcAccessing, rcSelf, rcNull );
-    if ( path == NULL )
-        return RC ( rcDB, rcTable, rcAccessing, rcParam, rcNull );
-
-    *path = self->path;
-
-    return 0;
-}
-
-/* Whack
- */
-static
-rc_t KTableWhack ( KTable *self )
-{
-    rc_t rc = 0;
-    KDBManager *mgr = self -> mgr;
-    KSymbol * symb;
-    assert ( mgr != NULL );
-
-    KRefcountWhack ( & self -> refcount, "KTable" );
-
-    if ( self -> db != NULL )
-    {
-        rc = KDatabaseSever ( self -> db );
-        if ( rc != 0 )
-            return rc;
-        self -> db = NULL;
-    }
-
-    /* shut down md5 sum file if it is open */
-    KMD5SumFmtRelease ( self -> md5 ), self -> md5 = NULL;
-
-    /* remove from mgr */
-    symb = KDBManagerOpenObjectFind (mgr, self->path);
-    if (symb != NULL)
-    {
-        rc = KDBManagerOpenObjectDelete (mgr, symb);
-        if (rc == 0)
-        {
-            rc = KDBManagerSever ( mgr );
-            if ( rc != 0 )
-                rc = KDBManagerOpenObjectAdd (mgr, symb);
-            else
-            {
-                /* complete */
-                KDirectoryRelease ( self -> dir );
-                free ( self );
-                return 0;
-            }
-        }
-    }
-
-    KRefcountInit ( & self -> refcount, 1, "KTable", "whack", "ktbl" );
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KTableAddRef ( const KTable *cself )
-{
-    KTable *self = ( KTable* ) cself;
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KTable" ) )
-        {
-        case krefLimit:
-            return RC ( rcDB, rcTable, rcAttaching, rcRange, rcExcessive );
-        }
-        ++ self -> opencount;
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KTableRelease ( const KTable *cself )
-{
-    KTable *self = ( KTable* ) cself;
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KTable" ) )
-        {
-        case krefWhack:
-            return KTableWhack ( ( KTable* ) self );
-        case krefLimit:
-            return RC ( rcDB, rcTable, rcReleasing, rcRange, rcExcessive );
-        }
-        -- self -> opencount;
-    }
-    return 0;
-}
-
-
-/* Attach
- * Sever
- */
-KTable *KTableAttach ( const KTable *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "KTable" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( KTable* ) self;
-}
-
-/* Sever
- *  like KTableRelease, except called internally
- *  indicates that a child object is letting go...
- */
-rc_t KTableSever ( const KTable *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "KTable" ) )
-        {
-        case krefWhack:
-            assert ( self -> opencount == 0 );
-            return KTableWhack ( ( KTable* ) self );
-        case krefLimit:
-            return RC ( rcDB, rcTable, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Make
- *  make an initialized structure
- *  NB - does NOT attach reference to dir, but steals it
- */
-static
-rc_t KTableMake ( KTable **tblp, const KDirectory *dir, const char *path,
-		  KMD5SumFmt * md5, bool read_only )
-{
-    KTable *tbl;
-
-    assert ( tblp != NULL );
-    assert ( path != NULL );
-
-    tbl = malloc ( sizeof * tbl + strlen ( path ) );
-    if ( tbl == NULL )
-    {
-        * tblp = NULL;
-        return RC ( rcDB, rcTable, rcConstructing, rcMemory, rcExhausted );
-    }
-
-    memset ( tbl, 0, sizeof * tbl );
-    tbl -> dir = ( KDirectory* ) dir;
-    KRefcountInit ( & tbl -> refcount, 1, "KTable", "make", path );
-    tbl -> opencount = 1;
-    tbl -> md5 = md5;
-    KMD5SumFmtAddRef ( md5 );
-    tbl -> use_md5 = ( md5 == NULL ) ? false : true;
-    tbl -> read_only = read_only;
-    strcpy ( tbl -> path, path );
-
-    tbl->sym.u.obj = tbl;
-    StringInitCString (&tbl->sym.name, tbl->path);
-    tbl->sym.type = kptTable;
-
-    * tblp = tbl;
-    return 0;
-}
-
-static
-rc_t KDBManagerInsertTable ( KDBManager * self, KTable * tbl )
-{
-    rc_t rc;
-    rc = KDBManagerOpenObjectAdd (self, &tbl->sym);
-    if ( rc == 0 )
-        tbl -> mgr = KDBManagerAttach ( self );
-    return rc;
-}
-
-
-static
-rc_t KDBManagerMakeTableUpdate ( KDBManager *self,
-    KTable **tblp, KDirectory *wd, const char *path, bool convert, KMD5SumFmt * md5 )
-{
-    rc_t rc;
-    KDirectory *dir;
-
-    rc = KDirectoryOpenDirUpdate ( wd, & dir, false, "%s", path );
-    if ( rc == 0 )
-    {
-        KTable * tbl;
-
-        if ( convert )
-        {
-            /* the old table layout:
-               <tbl>/
-               col/...
-               meta
-               sealed
-               skey
-            */
-            rc = KDirectoryVSetAccess ( dir, true, 0220, 0222, ".", NULL );
-            if ( rc == 0 )
-                rc = KDirectoryVCreateDir ( dir, 0775, kcmCreate, "md", NULL );
-            if ( rc == 0 )
-            {
-                rc = KDirectoryRename ( dir, false, "meta", "md/r001" );
-                if ( GetRCState ( rc ) == rcNotFound )
-                    rc = 0;
-                else if ( rc == 0 )
-                {
-                    rc = KDirectoryCreateAlias ( dir, 0777, kcmCreate, "md/r001", "md/cur" );
-#if V0_BACKWARD_COMPAT
-                    if ( rc == 0 )
-                        rc = KDirectoryCreateAlias ( dir, 0777, kcmCreate, "md/r001", "meta" );
-#endif
-                    if( rc == 0 ) {
-                        KFile* md5_file = NULL;
-                        if( (rc = KDirectoryOpenFileWrite(dir, &md5_file, true, "md5")) == 0 ) {
-                            KMD5SumFmt* fmd5 = NULL;
-                            if( (rc = KMD5SumFmtMakeUpdate(&fmd5, md5_file)) == 0 ) {
-                                if( (rc = KMD5SumFmtRename(fmd5, "meta", "md/r001")) == 0 ) {
-                                    rc = KMD5SumFmtFlush(fmd5);
-                                }
-                                KMD5SumFmtRelease(fmd5);
-                            } else {
-                                KFileRelease(md5_file);
-                            }
-                        }
-                    }
-                }
-            }
-            if ( rc == 0 )
-                rc = KDirectoryVCreateDir ( dir, 0775, kcmCreate, "idx", NULL );
-            if ( rc == 0 )
-            {
-                rc = KDirectoryRename ( dir, false, "skey", "idx/skey" );
-                if ( GetRCState ( rc ) == rcNotFound )
-                    rc = 0;
-                else if ( rc == 0 )
-                {
-                    KDirectoryRename ( dir, false, "skey.md5", "idx/skey.md5" );
-#if V0_BACKWARD_COMPAT
-                    rc = KDirectoryCreateAlias ( dir, 0777, kcmCreate, "idx/skey", "skey" );
-#endif
-                }
-            }
-            if ( rc == 0 )
-            {
-                if ( KDirectoryVPathType ( dir, "sealed", NULL ) == kptFile )
-                {
-                    rc = KDBLockDir ( dir, "." );
-#if ! V0_BACKWARD_COMPAT
-                    if ( rc == 0 )
-                        KDirectoryVRemove ( dir, true, "sealed", NULL );
-#endif
-                }
-            }
-            
-            if ( rc != 0 )
-                return rc;
-        }
-
-        /* Make the base object */
-        rc = KTableMake ( & tbl, dir, path, md5, false );
-        if ( rc == 0 )
-        {
-            rc = KDBManagerInsertTable ( self, tbl );
-
-            if ( rc == 0 )
-            {
-                * tblp = tbl;
-                return 0;
-            }
-
-            rc = RC ( rcDB, rcMgr, rcOpening, rcTable, rcBusy );
-                
-            free ( tbl );
-        }
-            
-        KDirectoryRelease ( dir );
-    }
-
-    return rc;
-}
-
-
-/* CreateTable
- * VCreateTable
- *  create a new or open an existing table
- *
- *  "tbl" [ OUT ] - return parameter for newly opened table
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to table
- */
-static
-rc_t KDBManagerVCreateTableInt ( KDBManager *self,
-    KTable **tbl, KDirectory *wd, KCreateMode cmode, const char *path, va_list args )
-{
-    char tblpath [ 4096 ];
-    rc_t rc = KDirectoryVResolvePath ( wd, true,
-        tblpath, sizeof tblpath, path, args );
-    if ( rc == 0 )
-    {
-        bool convert = false;
-        bool not_found = false;
-
-        switch ( KDBPathType ( /*NULL,*/ wd, NULL, tblpath ) )
-        {
-        case kptNotFound:
-            not_found = true;
-            /* first good path */
-            break;
-
-        case kptBadPath:
-            return RC ( rcDB, rcMgr, rcCreating, rcPath, rcInvalid );
-
-        case kptTable:
-        case kptTable | kptAlias:
-            break;
-
-        case kptPrereleaseTbl:
-        case kptPrereleaseTbl | kptAlias:
-            convert = true;
-            break;
-
-        case kptDatabase:
-        case kptDatabase | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcDatabase, rcExists);
-
-        case kptColumn:
-        case kptColumn | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcColumn, rcExists);
-
-        case kptIndex:
-        case kptIndex | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcIndex, rcExists);
-
-        case kptMetadata:
-        case kptMetadata | kptAlias:
-            return RC (rcDB, rcMgr, rcCreating, rcMetadata, rcExists);
-
-        case kptFile:
-        case kptFile | kptAlias:
-            /* if we find a file, vary the failure if it is an archive that is a table
-             * or a non related file */
-            if (( KDBOpenPathTypeRead ( self, wd, tblpath, NULL, kptTable, NULL, false ) == 0 ) ||
-                ( KDBOpenPathTypeRead ( self, wd, tblpath, NULL, kptPrereleaseTbl, NULL, false ) == 0 ) )
-                return RC ( rcDB, rcMgr, rcCreating, rcTable, rcReadonly );
-            /* fall through */
-        default:
-            return RC ( rcDB, rcMgr, rcCreating, rcPath, rcIncorrect );
-        }
-
-        if (not_found == false)
-        {
-            /* found so is not good if we want to create new and not
-             * clear/init or open old
-             */
-            if ((cmode & kcmValueMask) == kcmCreate)
-                return RC ( rcDB, rcMgr, rcCreating, rcTable, rcExists );
-            if (KDBManagerOpenObjectBusy (self, tblpath))
-                return RC ( rcDB, rcMgr, rcCreating, rcTable, rcBusy );
-            /* test now for locked directory */
-            rc = KDBWritable ( wd, tblpath );
-            switch (GetRCState(rc))
-            {
-            default:
-                return rc;
-            case rcLocked:
-                return RC ( rcDB, rcMgr, rcCreating, rcTable, rcLocked );
-            case rcReadonly:
-                return RC ( rcDB, rcMgr, rcCreating, rcTable, rcReadonly );
-            case rcNotFound:
-                /* not found is good but probably unreachable */
-                break;
-            case 0:
-                break;
-            }
-        }
-
-        /* [re]create directory */
-        rc = KDirectoryCreateDir ( wd, 0775, cmode, "%s", tblpath );
-        if ( rc == 0 )
-        {
-            KMD5SumFmt *md5 = NULL;
-
-            /* create column sub-directory */
-            rc = KDirectoryCreateDir ( wd, 0775, kcmOpen, "%s/col", tblpath );
-            if ( rc == 0 && ( cmode & kcmMD5 ) != 0 )
-            {
-                KFile * f;
-
-                /* create the md5 digest file */
-                rc = KDirectoryCreateFile ( wd, &f, true, 0664, kcmOpen, "%s/md5", tblpath );
-                if ( rc == 0 )
-                {
-                    rc = KMD5SumFmtMakeUpdate ( & md5, f );
-                    if ( rc != 0 )
-                        KFileRelease ( f );
-                }
-            }
-            
-            if ( rc == 0 )
-                rc = KDBManagerMakeTableUpdate ( self, tbl, wd, tblpath, convert, md5 );
-
-            KMD5SumFmtRelease ( md5 );
-        }
-    }
-    return rc;
-}
-
-/* Default function is added only to make tools/kqsh build possible since
-   it requires 1 to 1 mapping between K- and V-functions
-*/
-
-LIB_EXPORT rc_t CC KDatabaseCreateTableDefault ( struct KDatabase *self,
-    KTable **tbl, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVCreateTableByMask ( self, tbl, 0, 0, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerCreateTable ( KDBManager *self,
-    KTable **tbl, KCreateMode cmode, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDBManagerVCreateTable ( self, tbl, cmode, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerVCreateTable ( KDBManager *self,
-    KTable **tbl, KCreateMode cmode, const char *path, va_list args )
-{
-    if ( tbl == NULL )
-        return RC ( rcDB, rcMgr, rcCreating, rcParam, rcNull );
-
-    * tbl = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcCreating, rcSelf, rcNull );
-
-    return KDBManagerVCreateTableInt ( self, tbl, self -> wd, cmode, path, args );
-}
-
-LIB_EXPORT rc_t CC KDatabaseCreateTable ( KDatabase *self,
-    KTable **tbl, KCreateMode cmode, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVCreateTable ( self, tbl, cmode, name, args );
-    va_end ( args );
-
-    return rc;
-}
-LIB_EXPORT rc_t CC KDatabaseVCreateTable ( KDatabase *self,
-    KTable **tblp, KCreateMode cmode, const char *name, va_list args )
-{
-    return KDatabaseVCreateTableByMask ( self, tblp, cmode, -1, name, args );
-}
-
-LIB_EXPORT rc_t CC KDatabaseCreateTableByMask ( KDatabase *self,
-    KTable **tbl, KCreateMode cmode, KCreateMode cmode_mask, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVCreateTableByMask ( self, tbl, cmode, cmode_mask, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseVCreateTableByMask ( KDatabase *self,
-    KTable **tblp, KCreateMode cmode, KCreateMode cmode_mask,
-    const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    if ( tblp == NULL )
-        return RC ( rcDB, rcDatabase, rcCreating, rcParam, rcNull );
-
-    * tblp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcCreating, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcDatabase, rcCreating, rcDatabase, rcReadonly );
-
-    rc = KDBVMakeSubPath ( self -> dir,
-        path, sizeof path, "tbl", 3, name, args );
-    if ( rc == 0 )
-    {
-        /* ensure that the "tbl" namespace directory is there */
-        rc = KDirectoryCreateDir ( self -> dir,
-            0775, kcmOpen, "tbl" );
-        if ( rc == 0 )
-        {
-            KCreateMode table_cmode;
-            /* fix mask */
-            if ( (cmode_mask & kcmValueMask) != 0 )
-                cmode_mask |= kcmValueMask;
-            table_cmode = (self->cmode & ~cmode_mask) | (cmode & cmode_mask);
-            rc = KDBManagerVCreateTableInt ( self -> mgr, tblp,
-                                             self -> dir, table_cmode, path, NULL );
-            if ( rc == 0 )
-            {
-                KTable *tbl = ( KTable* ) * tblp;
-                tbl -> db = KDatabaseAttach ( self );
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/* OpenTableRead
- * VOpenTableRead
- *  open a table for read
- *
- *  "tbl" [ OUT ] - return parameter for newly opened table
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to table
- */
-static
-rc_t KDBManagerVOpenTableReadInt ( const KDBManager *cself,
-    const KTable **tblp, const KDirectory *wd, bool try_srapath,
-    const char *path, va_list args )
-{
-    char key_path[ 4096 ];
-    char short_path[ 4096 ];
-	size_t z;
-	rc_t rc = string_vprintf( short_path, sizeof short_path, &z, path, args );
-	if ( rc == 0 )
-		rc = KDirectoryResolvePath ( wd, true, key_path, sizeof key_path, short_path );
-    if ( rc == 0 )
-    {
-        KSymbol *sym;
-        
-        /* if already open */
-        sym = KDBManagerOpenObjectFind( cself, key_path );
-        if (sym != NULL)
-        {
-            const KTable * ctbl;
-            rc_t obj;
-
-            switch (sym->type)
-            {
-            case kptTable:
-                ctbl = (KTable*)sym->u.obj;
-                /* if open for update, refuse */
-                if ( ctbl -> read_only )
-                {
-                    /* attach a new reference and we're gone */
-                    rc = KTableAddRef ( ctbl );
-                    if ( rc == 0 )
-                        * tblp = ctbl;
-                    return rc;
-                }
-                obj = rcTable;
-                break;
-                
-            default:
-                obj = rcPath;
-                break;
-            case kptDatabase:
-                obj = rcDatabase;
-                break;
-            case kptColumn:
-                obj = rcColumn;
-                break;
-            case kptIndex:
-                obj = rcIndex;
-                break;
-            case kptMetadata:
-                obj = rcMetadata;
-                break;
-            }
-            rc = RC (rcDB, rcMgr, rcOpening, obj, rcBusy);
-        }
-        else
-        {
-			KTable * tbl;
-			const KDirectory *dir;
-			bool prerelease = false;
-
-			rc = KDBOpenPathTypeRead ( cself, wd, short_path, &dir, kptTable, NULL, try_srapath );
-			if ( rc != 0 )
-			{
-				prerelease = true;
-				rc = KDBOpenPathTypeRead ( cself, wd, short_path, &dir, kptPrereleaseTbl, NULL, try_srapath );
-			}        
-			if ( rc == 0 )
-			{
-				rc = KTableMake ( & tbl, dir, key_path, NULL, true );
-				if ( rc == 0 )
-				{
-					KDBManager * self = (KDBManager *)cself;
-
-					rc = KDBManagerInsertTable( self, tbl );
-
-					if (rc == 0)
-					{
-						tbl -> prerelease = prerelease;
-						* tblp = tbl;
-						return 0;
-					}
-					free ( tbl );
-				}
-				KDirectoryRelease ( dir );
-			}
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerOpenTableRead ( const KDBManager *self,
-    const KTable **tbl, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDBManagerVOpenTableRead ( self, tbl, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerVOpenTableRead ( const KDBManager *self,
-    const KTable **tbl, const char *path, va_list args )
-{
-    if ( tbl == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcParam, rcNull );
-
-    * tbl = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcSelf, rcNull );
-
-    return KDBManagerVOpenTableReadInt ( self, tbl, self -> wd, true, path, args );
-}
-
-LIB_EXPORT rc_t CC KDatabaseOpenTableRead ( const KDatabase *self,
-    const KTable **tbl, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVOpenTableRead ( self, tbl, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseVOpenTableRead ( const KDatabase *self,
-    const KTable **tblp, const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    if ( tblp == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcParam, rcNull );
-
-    * tblp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcSelf, rcNull );
-
-    rc = KDBVMakeSubPath ( self -> dir,
-        path, sizeof path, "tbl", 3, name, args );
-    if ( rc == 0 )
-    {
-        rc = KDBManagerVOpenTableReadInt ( self -> mgr, tblp,
-                                           self -> dir, false, path, NULL );
-        if ( rc == 0 )
-        {
-            KTable *tbl = ( KTable* ) * tblp;
-            tbl -> db = KDatabaseAttach ( self );
-        }
-    }
-
-    return rc;
-}
-
-
-/* OpenTableUpdate
- * VOpenTableUpdate
- *  open a table for read/write
- *
- *  "tbl" [ OUT ] - return parameter for newly opened table
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving name of table
- */
-static
-rc_t KDBManagerVOpenTableUpdateInt ( KDBManager *self,
-    KTable **tbl, KDirectory *wd, const char *path, va_list args )
-{
-    char tblpath [ 4096 ];
-    rc_t rc = KDirectoryVResolvePath ( wd, true,
-        tblpath, sizeof tblpath, path, args );
-    if ( rc == 0 )
-    {
-        KSymbol * sym;
-        KFile *f;
-        KMD5SumFmt * md5 = NULL;
-        bool convert = false;
-
-        /* if already open, refuse */
-        sym = KDBManagerOpenObjectFind (self, tblpath);
-        if (sym != NULL)
-        {
-            rc_t obj;
-            switch (sym->type)
-            {
-            default:
-                obj = rcPath;
-                break;
-            case kptDatabase:
-                obj = rcDatabase;
-                break;
-            case kptTable:
-                obj = rcTable;
-                break;
-            case kptColumn:
-                obj = rcColumn;
-                break;
-            case kptIndex:
-                obj = rcIndex;
-                break;
-            case kptMetadata:
-                obj = rcMetadata;
-                break;
-            }
-            return RC ( rcDB, rcMgr, rcOpening, obj, rcBusy );
-        }
-        /* only open existing tbls */
-        switch ( KDBPathType ( /*NULL,*/ wd, NULL, tblpath ) )
-        {
-        case kptNotFound:
-            return RC ( rcDB, rcMgr, rcOpening, rcTable, rcNotFound );
-
-        case kptBadPath:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcInvalid );
-
-        case kptFile:
-        case kptFile | kptAlias:
-            /* if we find a file, vary the failure if it is an archive that is a table
-             * or a non related file */
-            if (( KDBOpenPathTypeRead ( self, wd, tblpath, NULL, kptTable, NULL, false ) == 0 ) ||
-                ( KDBOpenPathTypeRead ( self, wd, tblpath, NULL, kptPrereleaseTbl, NULL, false ) == 0 ) )
-                return RC ( rcDB, rcMgr, rcCreating, rcTable, rcUnauthorized );
-            /* fall through */
-        default:
-            return RC ( rcDB, rcMgr, rcOpening, rcPath, rcIncorrect );
-        case kptTable:
-        case kptTable | kptAlias:
-            break;
-
-        case kptPrereleaseTbl:
-        case kptPrereleaseTbl | kptAlias:
-            convert = true;
-            break;
-        }
-
-        /* test now for locked directory */
-        rc = KDBWritable ( wd, tblpath );
-        switch (GetRCState(rc))
-        {
-        default:
-            return RC ( rcDB, rcMgr, rcOpening, rcTable, rcNoPerm );
-
-        case rcLocked:
-            return RC ( rcDB, rcMgr, rcOpening, rcTable, rcLocked );
-
-        case rcReadonly:
-            return RC ( rcDB, rcMgr, rcOpening, rcTable, rcReadonly );
-
-        case 0:
-            rc = 0;
-            break;
-        }
-
-        rc = KDirectoryOpenFileWrite ( wd, &f, true, "%s/md5", tblpath );
-        if ( rc == 0 )
-        {
-            rc = KMD5SumFmtMakeUpdate ( & md5, f );
-            if ( rc != 0 )
-                KFileRelease ( f );
-        }
-        else if ( GetRCState ( rc ) == rcNotFound )
-            rc = 0;
-#if 0
-        else if ( GetRCState ( rc ) == rcUnauthorized )
-            return RC ( rcDB, rcMgr, rcCreating, rcTable, rUnauthorized );
-#endif
-
-        if ( rc == 0 )
-            rc = KDBManagerMakeTableUpdate ( self, tbl, wd, tblpath, convert, md5 );
-
-        KMD5SumFmtRelease ( md5 );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerOpenTableUpdate ( KDBManager *self,
-    KTable **tbl, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDBManagerVOpenTableUpdate ( self, tbl, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDBManagerVOpenTableUpdate ( KDBManager *self,
-    KTable **tbl, const char *path, va_list args )
-{
-    if ( tbl == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcParam, rcNull );
-
-    * tbl = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcMgr, rcOpening, rcSelf, rcNull );
-
-    return KDBManagerVOpenTableUpdateInt ( self, tbl, self -> wd, path, args );
-}
-
-LIB_EXPORT rc_t CC KDatabaseOpenTableUpdate ( KDatabase *self,
-    KTable **tbl, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KDatabaseVOpenTableUpdate ( self, tbl, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDatabaseVOpenTableUpdate ( KDatabase *self,
-    KTable **tblp, const char *name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    if ( tblp == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcParam, rcNull );
-
-    * tblp = NULL;
-
-    if ( self == NULL )
-        return RC ( rcDB, rcDatabase, rcOpening, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcDB, rcDatabase, rcOpening, rcDatabase, rcReadonly );
-
-    rc = KDBVMakeSubPath ( self -> dir,
-        path, sizeof path, "tbl", 3, name, args );
-    if ( rc == 0 )
-    {
-        rc = KDBManagerVOpenTableUpdateInt ( self -> mgr, tblp,
-                                             self -> dir, path, NULL );
-        if ( rc == 0 )
-        {
-            KTable *tbl = ( KTable* ) * tblp;
-            tbl -> db = KDatabaseAttach ( self );
-        }
-    }
-
-    return rc;
-}
-
-
-/* Locked
- *  returns non-zero if locked
- */
-LIB_EXPORT bool CC KTableLocked ( const KTable *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return false;
-
-    rc = KDBWritable ( self -> dir, "." );
-    return GetRCState ( rc ) == rcLocked;
-}
-
-
-/* Exists
- *  returns true if requested object exists
- *
- *  "type" [ IN ] - a KDBPathType
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT bool CC KTableVExists ( const KTable *self, uint32_t type, const char *name, va_list args )
-{
-    if ( self != NULL && name != NULL && name [ 0 ] != 0 )
-    {
-        rc_t rc;
-        const char *ns;
-        char path [ 256 ];
-
-        switch ( type )
-        {
-        case kptIndex:
-            ns = "idx";
-            break;
-
-        case kptColumn:
-            ns = "col";
-            break;
-
-        default:
-            return false;
-        }
-
-        rc = KDBVMakeSubPath ( self -> dir, path, sizeof path, ns, 3, name, args );
-        if ( rc == 0 )
-        {
-            switch ( KDirectoryPathType ( self -> dir, "%s", path ) )
-            {
-            case kptFile:
-            case kptDir:
-            case kptFile | kptAlias:
-            case kptDir | kptAlias:
-                return true;
-            }
-        }
-    }
-    return false;
-}
-
-LIB_EXPORT bool CC KTableExists ( const KTable *self, uint32_t type, const char *name, ... )
-{
-    bool exists;
-
-    va_list args;
-    va_start ( args, name );
-
-    exists = KTableVExists ( self, type, name, args );
-
-    va_end ( args );
-
-    return exists;
-}
-
-
-/* IsAlias
- *  returns true if object name is an alias
- *  returns path to fundamental name if it was aliased
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - optional output buffer
- *  for fundamenta object name if "alias" is not a fundamental name, 
- *
- *  "name" [ IN ] - NUL terminated object name
- */
-LIB_EXPORT bool CC KTableIsAlias ( const KTable *self, uint32_t type,
-    char *resolved, size_t rsize, const char *name )
-{
-    if ( self != NULL && name != NULL && name [ 0 ] != 0 )
-    {
-        rc_t rc;
-        const char *ns;
-        char path [ 256 ];
-
-        switch ( type )
-        {
-        case kptIndex:
-            ns = "idx";
-            break;
-
-        case kptColumn:
-            ns = "col";
-            break;
-
-        default:
-            return false;
-        }
-
-        rc = KDBMakeSubPath ( self -> dir, path, sizeof path, ns, 3, name );
-        if ( rc == 0 )
-        {
-            switch ( KDirectoryPathType ( self -> dir, "%s", path ) )
-            {
-            case kptFile | kptAlias:
-            case kptDir | kptAlias:
-                if ( resolved != NULL && rsize != 0 )
-                {
-                    const KDirectory *sub;
-                    rc = KDirectoryOpenDirRead ( self -> dir, & sub, false, "%s", ns );
-                    * resolved = 0;
-                    if ( rc != 0 )
-                        PLOGERR ( klogWarn, ( klogWarn, rc, "failed to open subdirectory '$(sub)'", "sub=%s", ns ) );
-                    else
-                    {
-                        rc = KDirectoryResolveAlias ( sub, false, resolved, rsize, "%s", name );
-                        KDirectoryRelease ( sub );
-                        if ( rc != 0 )
-                            PLOGERR ( klogWarn, ( klogWarn, rc, "failed to resolve alias '$(alias)'", "alias=%s", name ) );
-                    }
-                }
-                return true;
-            }
-        }
-    }
-
-    if ( resolved != NULL && rsize != 0 )
-        * resolved = 0;
-
-    return false;
-}
-
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-static
-rc_t KTableLockInt (const KTable  * self, char * path, size_t path_size,
-                        int type, const char * name, va_list args )
-{
-    rc_t rc;
-
-    if (self == NULL)
-        rc = RC ( rcDB, rcMgr, rcAccessing, rcSelf, rcNull );
-
-    else if (name == NULL)
-        rc =  RC (rcDB, rcMgr, rcAccessing, rcPath, rcNull);
-
-    else
-    {
-        const char * ns;
-
-        ns = KDBGetNamespaceString (type);
-
-        switch (type)
-        {
-        default:
-            rc = RC (rcDB, rcMgr, rcAccessing, rcParam, rcInvalid);
-            break;
-        case kptColumn:
-        case kptIndex:
-            rc = KDBVMakeSubPath (self->dir, path, path_size, ns, strlen (ns),
-                                  name, args);
-            break;
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableVWritable (const KTable *self, uint32_t type, const char * name, va_list args )
-{
-    rc_t rc;
-    char path [ 256 ];
-
-    rc = KTableLockInt (self, path, sizeof path, type, name, args);
-    if (rc == 0)
-        rc = KDBWritable (self->dir, path);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableWritable ( const KTable *self, uint32_t type, const char * name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KTableVWritable ( self, type, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* Lock
- *  apply lock
- *
- *  if object is already locked, the operation is idempotent
- *  and returns an rc state of rcLocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC KTableVLock ( KTable *self, uint32_t type, const char * name, va_list args )
-{
-    rc_t rc = 0;
-    char path [ 256 ];
-
-    rc = KTableLockInt (self, path, sizeof path, type, name, args);
-    if (rc == 0)
-        rc = KDBLockDir (self->dir, path);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableLock ( KTable *self, uint32_t type, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KTableVLock (self, type, name, args);
-    va_end (args);
-    return rc;
-}
-
-
-/* Unlock
- *  remove lock
- *
- *  if object is already unlocked, the operation is idempotent
- *  and returns an rc state of rcUnlocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC KTableVUnlock ( KTable *self, uint32_t type, const char * name, va_list args )
-{
-    rc_t rc = 0;
-    char path [ 256 ];
-
-    rc = KTableLockInt (self, path, sizeof path, type, name, args);
-    if (rc == 0)
-        rc = KDBUnlockDir (self->dir, path);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableUnlock ( KTable *self, uint32_t type, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-    va_start ( args, name );
-    rc = KTableVUnlock ( self, type, name, args );
-    va_end ( args );
-    return rc;
-}
-
-
-/* Rename
- */
-LIB_EXPORT rc_t CC KTableRenameColumn ( KTable *self, bool force, const char *from, const char *to )
-{
-    return KDBRename ( self -> dir, self -> mgr, kptColumn, force, from, to );
-}
-
-LIB_EXPORT rc_t CC KTableRenameIndex ( KTable *self, bool force, const char *from, const char *to )
-{
-    return KDBRename ( self -> dir, self -> mgr, kptIndex, force, from, to );
-}
-
-/* Alias
- */
-LIB_EXPORT rc_t CC KTableAliasColumn ( KTable *self, const char *col, const char *alias )
-{
-    return KDBAlias ( self -> dir, kptColumn, col, alias );
-}
-
-LIB_EXPORT rc_t CC KTableAliasIndex ( KTable *self, const char *idx, const char *alias )
-{
-    return KDBAlias ( self -> dir, kptIndex, idx, alias );
-}
-
-/* Drop
- */
-LIB_EXPORT rc_t CC KTableDropColumn ( KTable *self, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KTableVDropColumn ( self, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableVDropColumn ( KTable *self, const char *name, va_list args )
-{
-    return KDBVDrop ( self -> dir, self -> mgr, kptColumn, name, args );
-}
-
-LIB_EXPORT rc_t CC KTableDropIndex ( KTable *self, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = KTableVDropIndex ( self, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableVDropIndex ( KTable *self, const char *name, va_list args )
-{
-    return KDBVDrop ( self -> dir, self -> mgr, kptIndex, name, args );
-}
-
-
-/* Reindex
- *  optimize column indices
- */
-LIB_EXPORT rc_t CC KTableReindex ( KTable *self )
-{
-    if ( self != NULL )
-    {
-        KNamelist *names;
-        rc_t rc = KTableListCol ( self, & names );
-        if ( rc == 0 )
-        {
-            uint32_t count;
-            rc = KNamelistCount ( names, & count );
-            if ( rc == 0 )
-            {
-                uint32_t i;
-                for ( i = 0; i < count; ++ i )
-                {
-                    KColumn *col;
-
-                    const char *name;
-                    rc = KNamelistGet ( names, i, & name );
-                    if ( rc != 0 )
-                        break;
-
-                    /* check it the column has idx0 data
-                       TBD - this whole operation goes away when
-                       idx0 is used for cursor sessions */
-                    if ( KTableColumnNeedsReindex ( self, name ) )
-                    {
-                        rc = KTableOpenColumnUpdate ( self, & col, "%s", name );
-                        if ( rc != 0 )
-                        {
-                            if ( GetRCState ( rc ) == rcBusy )
-                                continue;
-                            break;
-                        }
-
-                        rc = KColumnReindex ( col );
-                        KColumnRelease ( col );
-                        if ( rc != 0 )
-                            break;
-                    }
-                }
-            }
-
-            KNamelistRelease ( names );
-        }
-        return rc;
-    }
-    return RC ( rcDB, rcTable, rcReindexing, rcSelf, rcNull );
-}
-
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC KTableOpenManagerRead ( const KTable *self, const KDBManager **mgr )
-{
-    rc_t rc;
-
-    if ( mgr == NULL )
-        rc = RC ( rcDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDBManagerAddRef ( self -> mgr );
-            if ( rc == 0 )
-            {
-                * mgr = self -> mgr;
-                return 0;
-            }
-        }
-
-        * mgr = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableOpenManagerUpdate ( KTable *self, KDBManager **mgr )
-{
-    rc_t rc;
-
-    if ( mgr == NULL )
-        rc = RC ( rcDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDBManagerAddRef ( self -> mgr );
-            if ( rc == 0 )
-            {
-                * mgr = self -> mgr;
-                return 0;
-            }
-        }
-
-        * mgr = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenParent
- *  duplicate reference to parent database
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC KTableOpenParentRead ( const KTable *self, const KDatabase **db )
-{
-    rc_t rc;
-
-    if ( db == NULL )
-        rc = RC ( rcDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDatabaseAddRef ( self -> db );
-            if ( rc == 0 )
-            {
-                * db = self -> db;
-                return 0;
-            }
-        }
-
-        * db = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableOpenParentUpdate ( KTable *self, KDatabase **db )
-{
-    rc_t rc;
-
-    if ( db == NULL )
-        rc = RC ( rcDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else if ( self -> db != NULL && self -> db -> read_only )
-            rc = RC ( rcVDB, rcTable, rcAccessing, rcDatabase, rcReadonly );
-        else
-        {
-            rc = KDatabaseAddRef ( self -> db );
-            if ( rc == 0 )
-            {
-                * db = self -> db;
-                return 0;
-            }
-        }
-
-        * db = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenDirectory
- *  access the directory in use
- */
-LIB_EXPORT rc_t CC KTableOpenDirectoryRead ( const KTable *self, const KDirectory **dir )
-{
-    rc_t rc;
-
-    if ( dir == NULL )
-        rc = RC ( rcDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * dir = self -> dir;
-            return KDirectoryAddRef ( * dir );
-        }
-
-        * dir = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTableOpenDirectoryUpdate ( KTable *self, KDirectory **dir )
-{
-    rc_t rc;
-
-    if ( dir == NULL )
-        rc = RC ( rcDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcDB, rcTable, rcAccessing, rcSelf, rcNull );
-         else if ( self -> dir != NULL && self -> dir -> read_only )
-             rc = RC ( rcDB, rcTable, rcAccessing, rcDirectory, rcReadonly );
-        else
-        {
-            * dir = self -> dir;
-            return KDirectoryAddRef ( * dir );
-        }
-
-        * dir = NULL;
-    }
-
-    return rc;
-}
-
-
-/* ModDate
- *  get modification date
- */
-LIB_EXPORT rc_t CC KTableModDate ( const KTable *self, KTime_t *mtime )
-{
-    rc_t rc;
-
-    if ( mtime == NULL )
-        rc = RC ( rcDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self != NULL )
-            return KDBGetObjModDate ( self -> dir, mtime );
-
-        rc = RC ( rcDB, rcTable, rcAccessing, rcSelf, rcNull );
-        * mtime = 0;
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KNamelist
- */
-
-/* List
- *  create table listings
- */
-struct FilterData
-{
-    const KDBManager * mgr;
-    int type;
-};
-
-static
-bool CC KDatabaseListFilter ( const KDirectory *dir, const char *name, void *data_ )
-{
-    struct FilterData * data = data_;
-
-    return KDBOpenPathTypeRead(data->mgr, dir, name, NULL, data->type, NULL, false) == 0;
-}
-
-LIB_EXPORT rc_t CC KTableListCol ( const KTable *self, KNamelist **names )
-{
-    if ( self != NULL )
-    {
-        struct FilterData data;
-        data.mgr = self->mgr;
-        data.type = kptColumn;
-
-        return KDirectoryList ( self -> dir,
-            names, KDatabaseListFilter, &data, "col" );
-    }
-    
-    if ( names != NULL )
-        * names = NULL;
-    
-    return RC ( rcDB, rcTable, rcListing, rcSelf, rcNull );
-}
-
-static
-bool CC KTableListIdxFilter ( const KDirectory *dir, const char *name, void *data )
-{
-    const size_t sz = strlen(name);
-    
-    if (sz > 4 && strcmp(&name[sz - 4], ".md5") == 0)
-        return false;
-    return true;
-}
-
-static
-bool CC KTableListSkeyFilter ( const KDirectory *dir, const char *name, void *data )
-{
-    if ( strcmp ( name, "skey" ) == 0 )
-        return true;
-    return false;
-}
-
-LIB_EXPORT rc_t CC KTableListIdx ( const KTable *self, KNamelist **names )
-{
-    if ( self != NULL )
-    {
-        if ( ! self -> prerelease )
-        {
-            return KDirectoryList ( self -> dir,
-                                    names, KTableListIdxFilter, NULL, "idx" );
-        }
-        
-        return KDirectoryList ( self -> dir,
-                                names, KTableListSkeyFilter, NULL, "." );
-    }
-    
-    if ( names != NULL )
-        * names = NULL;
-    
-    return RC ( rcDB, rcTable, rcListing, rcSelf, rcNull );
-}
-
-/* HasRemoteData
- *  indicates whether some/all table data comes from network resource
- *  such as HttpFile or CacheteeFile
- */
-KDB_EXTERN bool CC KTableHasRemoteData ( const KTable *self )
-{
-    return true;
-}
diff --git a/libs/kdb/wtrieidx-v1.c b/libs/kdb/wtrieidx-v1.c
deleted file mode 100644
index 4cea5d2..0000000
--- a/libs/kdb/wtrieidx-v1.c
+++ /dev/null
@@ -1,1100 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-#include "windex-priv.h"
-#include "kdbfmt-priv.h"
-#include <klib/ptrie.h>
-#include <klib/text.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/md5.h>
-#include <kfs/mmap.h>
-#include <klib/rc.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <limits.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <byteswap.h>
-#include <assert.h>
-
-#define DISABLE_PROJ 0
-#define LIMIT_INSERTS 0
-
-#if LIMIT_INSERTS
-#define INSERT_LIMIT 100000000
-#endif
-
-/*--------------------------------------------------------------------------
- * KPTrieIndex_v1
- *  persisted keymap
- */
-
-/* KPTrieIndexInit
- *  opens and initializes persisted keymap structure
- */
-rc_t KPTrieIndexInit_v1 ( KPTrieIndex_v1 *self, const KMMap *mm, bool byteswap )
-{
-    size_t size;
-    rc_t rc = KMMapSize ( mm, & size );
-    if ( rc == 0 )
-    {
-        const KDBHdr *hdr;
-        rc = KMMapAddrRead ( mm, ( const void** ) & hdr );
-        if ( rc == 0 )
-        {
-            /* try to create the pttree */
-            rc = PTrieMakeOrig ( & self -> key2id,
-                hdr + 1, size -= sizeof * hdr, byteswap );
-            if ( rc == 0 )
-            {
-                size_t ptsize = PTrieSize ( self -> key2id );
-                if ( ptsize <= size )
-                {
-                    /* just in case */
-                    self -> mm = NULL;
-
-                    /* record for projection */
-                    self -> byteswap = byteswap;
-
-                    /* it could be stored without projection */
-                    if ( ptsize == size )
-                    {
-                        self -> id2node = NULL;
-                        self -> first = self -> last = 0;
-                        return 0;
-                    }
-                            
-                    /* assume this is projection index */
-                    self -> id2node = ( void* )
-                        ( ( char* ) ( hdr + 1 ) + ptsize );
-                    size -= ptsize;
-                            
-                    /* it must have at least 4 bytes
-                       and be 4 byte aligned */
-                    if ( size >= sizeof ( uint32_t ) && ( size & 3 ) == 0 )
-                    {
-                        /* first entry is starting key
-                           remaining entries are node ids */
-                        self -> first = * self -> id2node ++;
-                        size -= sizeof self -> id2node [ 0 ];
-                        if ( size == 0 )
-                        {
-                            /* forget if empty */
-                            self -> id2node = NULL;
-                            self -> first = self -> last = 0;
-                            return 0;
-                        }
-                        /* remaining entries */
-                        self -> last = self -> first + ( size >> 2 ) - 1;
-                        return 0;
-                    }
-                }
-
-                PTrieWhack ( self -> key2id );
-                self -> key2id = NULL;
-
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcTrie, rcCorrupt );
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* KPTrieIndexWhack_v1
- *  closes down keymap
- */
-void KPTrieIndexWhack_v1 ( KPTrieIndex_v1 *self )
-{
-    PTrieWhack ( self -> key2id );
-    KMMapRelease ( self -> mm );
-    memset ( self, 0, sizeof * self );
-}
-
-
-/*--------------------------------------------------------------------------
- * KTrieIdxNode_v1
- */
-
-static
-void CC KTrieIdxNodeWhack_v1 ( TNode *n, void *data )
-{
-    TNodeWhack ( n );
-}
-
-static
-void CC KTrieIdxNodeUnlink_v1 ( TNode *n, void *data )
-{
-    if ( TrieUnlink ( data, n ) )
-        TNodeWhack ( n );
-}
-
-static
-void CC KTrieIdxNodeCaptureID_v1 ( TNode *n, void *data )
-{
-    KTrieIndex_v1 *self = data;
-    KTrieIdxNode_v1 *node = ( KTrieIdxNode_v1* ) n;
-    self -> id2node [ node -> id - self -> first ] = node;
-}
-
-
-/*--------------------------------------------------------------------------
- * KTrieIndex_v1
- */
-
-/* KTrieIndexWrite_v1
- */
-typedef struct PersistTrieData PersistTrieData;
-struct PersistTrieData
-{
-    uint64_t pos;
-    KFile *f;
-    uint8_t *buffer;
-    size_t bsize;
-    size_t marker;
-
-    size_t ptt_size;
-    uint32_t first;
-    uint32_t last;
-    rc_t rc;
-};
-
-static
-rc_t CC KTrieIndexWrite_v1 ( void *param,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    PersistTrieData *pb = param;
-    size_t total, to_write;
-
-    for ( total = 0; total < size; total += to_write )
-    {
-        to_write = size - total;
-        if ( pb -> marker + to_write > pb -> bsize )
-            to_write = pb -> bsize - pb -> marker;
-
-        if ( to_write > 0 )
-        {
-            memcpy ( pb -> buffer + pb -> marker,
-                ( const uint8_t* ) buffer + total, to_write );
-            pb -> marker += to_write;
-        }
-
-        if ( pb -> marker == pb -> bsize )
-        {
-            size_t num_flushed;
-            pb -> rc = KFileWrite ( pb -> f, pb -> pos,
-                pb -> buffer, pb -> bsize, & num_flushed );
-            if ( pb -> rc != 0 )
-            {
-                * num_writ = 0;
-                return pb -> rc;
-            }
-
-            if ( num_flushed == 0 )
-            {
-                * num_writ = total + to_write;
-                return pb -> rc = RC ( rcDB, rcIndex, rcPersisting, rcTransfer, rcIncomplete );
-            }
-
-            pb -> marker -= num_flushed;
-            pb -> pos += num_flushed;
-
-            if ( pb -> marker != 0 )
-                memcpy ( pb -> buffer, pb -> buffer + num_flushed, pb -> marker );
-        }
-    }
-
-    * num_writ = total;
-    return 0;
-}
-
-/* KTrieIndexAux_v1
- */
-static
-rc_t CC KTrieIndexAux_v1 ( void *param, const void *node, size_t *num_writ,
-    PTWriteFunc write, void *write_param )
-{
-    const KTrieIdxNode_v1 *n = node;
-
-    if ( write != NULL )
-    {
-        PersistTrieData *pb = param;
-        if ( n -> id < pb -> first )
-            pb -> first = n -> id;
-        if ( n -> id > pb -> last )
-            pb -> last = n -> id;
-
-        return ( * write ) ( write_param, & n -> id, sizeof n -> id, num_writ );
-    }
-
-    * num_writ = sizeof n -> id;
-    return 0;
-}
-
-/* KTrieIndexPersist_v1
- *  write keymap to indicated location
- */
-static
-rc_t KTrieIndexPersistTrie_v1 ( const KTrieIndex_v1 *self, PersistTrieData *pb )
-{
-    rc_t rc;
-    KDBHdr *hdr;
-
-    pb -> pos = 0;
-
-    hdr = ( KDBHdr* ) pb -> buffer;
-    KDBHdrInit ( hdr, 1 );
-    pb -> marker = sizeof * hdr;
-
-    /* persist the trie to file,
-       using tree-internal key storage,
-       capture the image size in pb */
-    rc = TriePersist ( & self -> key2id, & pb -> ptt_size,
-        false, KTrieIndexWrite_v1, pb, KTrieIndexAux_v1, pb );
-    if ( rc == 0 && pb -> marker != 0 )
-    {
-        size_t num_writ;
-        rc = KFileWrite ( pb -> f, pb -> pos,
-            pb -> buffer, pb -> marker, & num_writ );
-        if ( rc == 0 && num_writ != pb -> marker )
-            rc = RC ( rcDB, rcIndex, rcPersisting, rcTransfer, rcIncomplete );
-    }
-
-    return rc;
-}
-
-
-typedef struct PersistReverseData PersistReverseData;
-struct PersistReverseData
-{
-    PTrie *tt;
-    uint32_t *a;
-    uint32_t first;
-    uint32_t count;
-    uint32_t notfound;
-};
-
-static
-void CC KTrieIndexRecordNodeId_v1 ( TNode *node, void *data )
-{
-    PTNode pn;
-    PersistReverseData *pb = data;
-    const KTrieIdxNode_v1 *n = ( const KTrieIdxNode_v1* ) node;
-
-    /* lookup up the persisted node within image */
-    uint32_t id = PTrieFind ( pb -> tt, & n -> n . key, & pn, NULL, NULL );
-
-    /* write it into array */
-    pb -> a [ n -> id - pb -> first ] = ( uint32_t ) id;
-
-    if ( id == 0 )
-        ++ pb -> notfound;
-    else
-        ++ pb -> count;
-}
-
-static
-rc_t KTrieIndexPersistProj_v1 ( const KTrieIndex_v1 *self, PersistTrieData *pb )
-{
-#if 0
-    rc_t rc;
-    KMMap *mmr;
-    size_t map_size;
-
-    /* there must be something to do */
-    if ( pb -> first > pb -> last )
-        return 0;
-
-
-    /* open a read-write map onto file
-       start at offset 0, which is the header,
-       followed by pb -> ptt_size bytes which is the tree,
-       and add on a slot for first id,
-       followed by last - first + 1 slots for id to node id map */
-    map_size = pb -> ptt_size + ( ( pb -> last - pb -> first + 2 ) << 2 );
-
-    rc = KMMapMakeRgnUpdate ( & mmr, pb -> f, sizeof ( KDBHdr ), map_size );
-    if ( rc == 0 )
-    {
-        void *addr;
-        PersistReverseData pb2;
-
-        rc = KMMapAddrUpdate ( mmr, & addr );
-        if ( rc == 0 )
-        {
-            rc = PTrieMakeOrig ( & pb2 . tt, addr, pb -> ptt_size );
-            if ( rc == 0 )
-            {
-                assert ( pb -> ptt_size == PTrieSize ( pb2 . tt ) );
-                pb2 . a = ( void* ) ( ( char* ) addr + pb -> ptt_size );
-                assert ( ( ( size_t ) pb2 . a & 3 ) == 0 );
-
-                /* record first id */
-                * pb2 . a ++ = pb -> first;
-                pb2 . first = pb -> first;
-                pb2 . count = pb2 . notfound = 0;
-
-                /* record all id to node mappings */
-                TrieForEach ( & self -> key2id, KTrieIndexRecordNodeId_v1, & pb2 );
-
-                /* check for having written ids */
-                assert ( pb2 . count == PTrieCount ( pb2 . tt ) );
-
-                /* done with pttree */
-                PTrieWhack ( pb2 . tt );
-
-                /* if there were nodes not found,
-                   the initial persist was bad */
-                if ( pb2 . notfound != 0 )
-                    rc = RC ( rcDB, rcIndex, rcPersisting, rcTransfer, rcIncomplete );
-            }
-        }
-
-        /* done with map - commits changes to disk */
-        KMMapRelease ( mmr );
-
-        /* truncate file to desired size */
-        KFileSetSize ( pb -> f, map_size + sizeof ( KDBHdr ) );
-    }
-
-    return rc;
-#else
-    rc_t rc;
-    void * addr;
-    uint64_t file_size;
-    size_t num_to_read;
-    size_t map_size;
-
-    /* there must be something to do */
-    if ( pb -> first > pb -> last )
-        return 0;
-
-    /* open a read-write map onto file
-       start at offset 0, which is the header,
-       followed by pb -> ptt_size bytes which is the tree,
-       and add on a slot for first id,
-       followed by last - first + 1 slots for id to node id map */
-    map_size = pb -> ptt_size + ( ( pb -> last - pb -> first + 2 ) << 2 );
-
-    rc = KFileSize ( pb -> f, & file_size );
-    if ( rc == 0 )
-    {
-        addr = malloc ( map_size );
-        if ( addr == NULL )
-            rc = RC ( rcDB, rcIndex, rcPersisting, rcMemory, rcExhausted );
-        else
-        {
-            size_t num_read;
-            num_to_read = file_size - sizeof ( KDBHdr );
-            rc = KFileReadAll ( pb -> f, sizeof ( KDBHdr ),
-                addr, num_to_read, & num_read );
-            if ( rc != 0 )
-                free ( addr );
-            else if ( num_read != num_to_read )
-            {
-                free ( addr );
-                rc = RC ( rcDB, rcIndex, rcPersisting, rcHeader, rcInsufficient );
-            }
-        }
-    }
-
-    if ( rc == 0 )
-    {
-        size_t num_writ;
-        PersistReverseData pb2;
-
-        rc = PTrieMakeOrig ( & pb2 . tt, addr, pb -> ptt_size, false );
-        if ( rc == 0 )
-        {
-            assert ( pb -> ptt_size == PTrieSize ( pb2 . tt ) );
-            pb2 . a = ( void* ) ( ( char* ) addr + pb -> ptt_size );
-            assert ( ( ( size_t ) pb2 . a & 3 ) == 0 );
-
-            /* record first id */
-            * pb2 . a ++ = pb -> first;
-            pb2 . first = pb -> first;
-            pb2 . count = pb2 . notfound = 0;
-
-            /* record all id to node mappings */
-            TrieForEach ( & self -> key2id, KTrieIndexRecordNodeId_v1, & pb2 );
-
-            /* check for having written ids */
-            assert ( pb2 . count == PTrieCount ( pb2 . tt ) );
-
-            /* done with pttree */
-            PTrieWhack ( pb2 . tt );
-
-            /* if there were nodes not found,
-               the initial persist was bad */
-            if ( pb2 . notfound != 0 )
-                rc = RC ( rcDB, rcIndex, rcPersisting, rcTransfer, rcIncomplete );
-            else
-            {
-                rc = KFileWrite ( pb -> f, file_size, ( uint8_t* ) addr + num_to_read,
-                    map_size - num_to_read, & num_writ );
-                if ( rc == 0  && num_writ != map_size - num_to_read )
-                    rc = RC ( rcDB, rcIndex, rcPersisting, rcHeader, rcInsufficient );
-            }
-        }
-
-        /* done with map - commits changes to disk */
-        free ( addr );
-
-        /* truncate file to desired size */
-        KFileSetSize ( pb -> f, map_size + sizeof ( KDBHdr ) );
-    }
-
-    return rc;
-#endif
-}
-
-rc_t KTrieIndexPersist_v1 ( const KTrieIndex_v1 *self,
-    bool proj, KDirectory *dir, const char *path, bool use_md5 )
-{
-    rc_t rc;
-    PersistTrieData pb;
-
-    assert ( self != NULL );
-
-    pb . buffer = malloc ( pb . bsize = 32 * 1024 );
-    if ( pb . buffer == NULL )
-        rc = RC ( rcDB, rcIndex, rcPersisting, rcMemory, rcExhausted );
-    else
-    {
-        char tmpname [ 256 ];
-        char tmpmd5name [ 256 ];
-        char md5path [ 256 ];
-        rc = KDirectoryResolvePath ( dir, false,
-            tmpname, sizeof tmpname, "%s.tmp", path );
-        if ( rc == 0 )
-        {
-            rc = KDirectoryCreateFile ( dir, & pb . f,
-                                         true, 0664, kcmInit, "%s", tmpname );
-
-	    if (use_md5 && rc == 0 )
-	    {
-		size_t tmplen = snprintf ( tmpmd5name, sizeof tmpmd5name, "%s.md5", tmpname );
-		KFile * kf;
-		KMD5SumFmt *km;
-		if ( tmplen >= sizeof ( tmpmd5name ) ) /* can't be == or no NUL */
-		{
-		    rc = RC ( rcDB, rcIndex, rcPersisting, rcName, rcExcessive );
-		}
-		else
-		{
-		    tmplen = snprintf ( md5path, sizeof md5path, "%s.md5", path );
-		    
-		    if ( tmplen >= sizeof ( md5path ) ) /* can't be == or no NUL */
-		    {
-			rc = RC ( rcDB, rcIndex, rcPersisting, rcName, rcExcessive );
-		    }
-		    else
-		    {
-			rc = KDirectoryCreateFile ( dir, &kf, true, 0664, 
-                                         kcmInit, "%s", tmpmd5name );
-			if ( rc == 0 )
-			{
-			    rc = KMD5SumFmtMakeUpdate ( &km, kf );
-			    if ( rc == 0 )
-			    {
-				KMD5File * k5f;
-				kf = NULL;
-				rc = KMD5FileMakeWrite ( &k5f, pb . f, km, path );
-				if ( rc == 0 )
-				{
-				    pb . f = KMD5FileToKFile ( k5f );
-				}
-				/* release pass or fail */
-				KMD5SumFmtRelease ( km );
-			    }
-			    else
-				KFileRelease ( kf );
-			}
-			else
-			    KFileRelease ( kf );
-		    }
-		}
-		if ( rc != 0 )
-		    KFileRelease ( pb . f );
-	    }
-
-            if ( rc == 0 )
-            {
-                pb . ptt_size = 0;
-                pb . first = ~ 0;
-                pb . last = 0;
-
-                rc = KTrieIndexPersistTrie_v1 ( self, & pb );
-                if ( rc == 0 )
-                {
-                    if ( proj )
-                        rc = KTrieIndexPersistProj_v1 ( self, & pb );
-                }
-                
-                KFileRelease ( pb . f );
-                pb . f = NULL;
-            }
-        }
-        
-        free ( pb . buffer );
-        pb . buffer = NULL;
-        
-        if ( rc == 0 )
-        {
-            rc = KDirectoryRename ( dir, false, tmpname, path );                        
-            if ( rc == 0 )
-            {
-		if ( use_md5 )
-		    rc = KDirectoryRename ( dir, false, tmpmd5name, md5path );                        
-		if ( rc == 0 )
-		{
-		    /* done */
-		    return 0;
-		}
-            }
-        }
-        
-        /* whack temporary file */
-        KDirectoryRemove ( dir, false, "%s", tmpname );
-	if ( use_md5 )
-	    KDirectoryRemove ( dir, false, "%s", tmpmd5name );
-    }
-    
-    return rc;
-}
-
-
-/* whack whack */
-void KTrieIndexWhack_v1 ( KTrieIndex_v1 *self )
-{
-    KPTrieIndexWhack_v1 ( & self -> pt );
-    TrieWhack ( & self -> key2id, KTrieIdxNodeWhack_v1, NULL );
-}
-
-/* initialize an index from file - can be NULL */
-rc_t KTrieIndexOpen_v1 ( KTrieIndex_v1 *self, const KMMap *mm, bool byteswap )
-{
-    rc_t rc;
-
-    memset ( self, 0, sizeof * self );
-    rc = TrieInit ( & self -> key2id, "0-9", 512, true );
-    if ( rc != 0 )
-        return rc;
-
-    self -> first = ~ 0;
-
-    if ( mm == NULL )
-        return 0;
-
-    rc = KPTrieIndexInit_v1 ( & self -> pt, mm, byteswap );
-    if ( rc == 0 )
-    {
-        rc = KMMapAddRef ( mm );
-        if ( rc == 0 )
-        {
-            self -> pt . mm = mm;
-            return 0;
-        }
-    }
-
-    KTrieIndexWhack_v1 ( self );
-    return rc;
-}
-
-/* KTrieIndexPopulate_v1
- */
-typedef struct KTrieIndexPopulateData_v1 KTrieIndexPopulateData_v1;
-struct KTrieIndexPopulateData_v1
-{
-    KTrieIndex_v1 *idx;
-    uint32_t id;
-    rc_t rc;
-};
-
-static
-bool CC KTrieIndexPopulate_v1 ( PTNode *n, void *data )
-{
-    const String *key;
-    KTrieIndexPopulateData_v1 *pb = data;
-
-    /* capture node id */
-    uint32_t id;
-    assert ( n -> data . size == sizeof id );
-    memcpy ( & id, n -> data . addr, sizeof id );
-
-    /* reject already mapped */
-    if ( id == pb -> id )
-    {
-        pb -> rc = RC ( rcDB, rcIndex, rcConstructing, rcNode, rcExists );
-        return true;
-    }
-
-    pb -> rc = PTNodeMakeKey ( n, & key );
-    if ( pb -> rc == 0 )
-    {
-        KTrieIdxNode_v1 *node;
-        pb -> rc = TNodeMake ( ( TNode** ) & node,
-            sizeof * node + key -> size );
-        if ( pb -> rc == 0 )
-        {
-            KTrieIndex_v1 *self = pb -> idx;
-
-            StringInit ( & node -> n . key, node -> key, key -> size, key -> len );
-            node -> id = id;
-            string_copy ( node -> key, key -> size + 1,
-                key -> addr, key -> size );
-
-            pb -> rc = TrieInsert ( & self -> key2id, & node -> n );
-            if ( pb -> rc == 0 )
-            {
-                free ( ( void* ) key );
-    
-                /* if copying projection index */
-                if ( self -> id2node != NULL )
-                {
-                    if ( self -> pt . id2node != NULL )
-                        self -> id2node [ node -> id - self -> pt . first ] = node;
-                    else
-                    {
-                        if ( node -> id < self -> first )
-                            self -> first = node -> id;
-                        if ( node -> id > self -> last )
-                            self -> last = node -> id;
-                    }
-                }
-                return 0;
-            }
-
-            TNodeWhack ( & node -> n );
-        }
-
-        StringWhack ( ( String* ) key );
-    }
-
-    return true;
-}
-
-/* KTrieIndexAttach_v1
- *  attach a keymap to an existing table
- *
- *  "pkm" [ IN ] - a persisted keymap
- */
-static
-rc_t KTrieIndexAttach_v1 ( KTrieIndex_v1 *self, bool proj, uint32_t id )
-{
-    uint32_t proj_len;
-    KTrieIndexPopulateData_v1 pb;
-
-#if LIMIT_INSERTS
-    proj_len = self -> pt . last - self -> pt . first + 1;
-#endif
-
-    /* see if we can use existing projection index */
-    if ( proj && self -> pt . id2node != NULL )
-    {
-        /* reject if already mapped */
-        if ( id != 0 &&
-             id >= self -> pt . first &&
-             id <= self -> pt . last &&
-             self -> pt . id2node [ id - self -> pt . first ] != 0 )
-        {
-            return RC ( rcDB, rcIndex, rcUpdating, rcId, rcExists );
-        }
-
-        /* allocate index array */
-#if LIMIT_INSERTS
-        if ( proj_len > INSERT_LIMIT )
-            return RC ( rcDB, rcIndex, rcUpdating, rcRange, rcExcessive );
-#else
-        proj_len = self -> pt . last - self -> pt . first + 1;
-#endif
-        proj_len = ( proj_len + 4095 ) & - 4096;
-        self -> id2node = calloc ( proj_len, sizeof self -> id2node [ 0 ] );
-        if ( self -> id2node == NULL )
-            return RC ( rcDB, rcIndex, rcUpdating, rcMemory, rcExhausted );
-
-        /* record known dimensions */
-        self -> first = self -> pt . first;
-        self -> last = self -> pt . last;
-        self -> len = proj_len;
-    }
-
-#if LIMIT_INSERTS
-    else if ( proj_len > INSERT_LIMIT )
-        return RC ( rcDB, rcIndex, rcUpdating, rcRange, rcExcessive );
-#endif
-
-    /* inflate persisted trie */
-    pb . idx = self;
-    pb . id = id;
-    pb . rc = 0;
-    PTrieDoUntil ( self -> pt . key2id, KTrieIndexPopulate_v1, & pb );
-
-    /* if successful but needing to add projection index */
-    if ( pb . rc == 0 && proj && self -> id2node == NULL )
-    {
-        proj_len = self -> last - self -> first + 1;
-        proj_len = ( proj_len + 4095 ) & - 4096;
-        self -> id2node = calloc ( proj_len, sizeof self -> id2node [ 0 ] );
-        if ( self -> id2node == NULL )
-            pb . rc = RC ( rcDB, rcIndex, rcUpdating, rcMemory, rcExhausted );
-        else
-        {
-            self -> len = proj_len;
-            TrieForEach ( & self -> key2id, KTrieIdxNodeCaptureID_v1, self );
-        }
-    }
-
-    if ( pb . rc == 0 )
-        KPTrieIndexWhack_v1 ( & self -> pt );
-    else if ( self -> id2node != NULL )
-    {
-        TrieForEach ( & self -> key2id,
-            KTrieIdxNodeUnlink_v1, & self -> key2id );
-        free ( self -> id2node );
-        self -> id2node = NULL;
-        self -> first = ~0;
-        self -> last = 0;
-        self -> len = 0;
-    }
-    return pb . rc;
-}
-
-/* insert string into trie, mapping to 32 bit id */
-static
-rc_t KTrieIndexExpandId2Node_v1 ( KTrieIndex_v1 *self, uint32_t range )
-{
-    KTrieIdxNode_v1 **id2node;
-    range = ( range + 4095 ) & - 4096;
-    id2node = realloc ( self -> id2node, range * sizeof id2node [ 0 ] );
-    if ( id2node == NULL )
-        return RC ( rcDB, rcIndex, rcInserting, rcMemory, rcExhausted );
-
-    self -> id2node = id2node;
-
-#if ZERO_ID2NODE
-    /* why zero this when it is known to be invalid? */
-    memset ( id2node + self -> len, 0,
-        ( range - self -> len ) * sizeof id2node [ 0 ] );
-#endif
-
-    self -> len = range;
-
-    return 0;
-}
-
-rc_t KTrieIndexInsert_v1 ( KTrieIndex_v1 *self,
-    bool proj, const char *str, uint32_t id )
-{
-    rc_t rc;
-
-    String key;
-    KTrieIdxNode_v1 *node;
-
-#if DISABLE_PROJ
-    proj = false;
-#endif
-
-    /* detect first modification */
-    if ( self -> last < self -> first )
-    {
-        /* detect persisted data */
-        if ( self -> pt . key2id != NULL )
-        {
-            rc = KTrieIndexAttach_v1 ( self, proj, id );
-            if ( rc != 0 )
-                return rc;
-        }
-
-        /* create empty projection array */
-        else if ( proj )
-        {
-            self -> id2node = malloc ( 4096 * sizeof self -> id2node [ 0 ] );
-            if ( self -> id2node == NULL )
-                return RC ( rcDB, rcIndex, rcInserting, rcMemory, rcExhausted );
-            self -> first = self -> last = id;
-            self -> len = 4096;
-        }
-    }
-
-    /* reject if already mapped */
-    else if ( self -> id2node != NULL &&
-              id >= self -> first &&
-              id <= self -> last &&
-              self -> id2node [ id - self -> first ] != NULL )
-    {
-        return RC ( rcDB, rcIndex, rcInserting, rcId, rcExists );
-    }
-#if LIMIT_INSERTS && INSERT_LIMIT > 0
-    else if ( ( self -> last - self -> first ) >= ( INSERT_LIMIT - 1 ) )
-    {
-        return RC ( rcDB, rcIndex, rcUpdating, rcRange, rcExcessive );
-    }
-#endif
-
-    StringInitCString ( & key, str );
-    rc = TNodeMake ( ( TNode** ) & node, sizeof * node + key . size );
-    if ( rc != 0 )
-        rc = RC ( rcDB, rcIndex, rcInserting, rcMemory, rcExhausted );
-    else
-    {
-        StringInit ( & node -> n . key, node -> key, key . size, key . len );
-        node -> id = id;
-        strcpy ( node -> key, str );
-
-        rc = TrieInsertUnique ( & self -> key2id, & node -> n, NULL );
-        if ( rc != 0 )
-            TNodeWhack ( & node -> n );
-        else if ( proj )
-        {
-            uint32_t range, offset;
-
-            if ( id < self -> first )
-            {
-                range = self -> last - id + 1;
-                if ( range > self -> len )
-                {
-                    rc = KTrieIndexExpandId2Node_v1 ( self, range );
-                    if ( rc != 0 )
-                    {
-                        TrieUnlink ( & self -> key2id, & node -> n );
-                        KTrieIdxNodeWhack_v1 ( & node -> n, NULL );
-                        return rc;
-                    }
-                }
-
-                offset = self -> first - id;
-                memmove ( & self -> id2node [ offset ], self -> id2node,
-                    ( self -> last - self -> first + 1 ) * sizeof self -> id2node [ 0 ] );
-                memset ( & self -> id2node [ 1 ], 0,
-                    ( offset - 1 ) * sizeof self -> id2node [ 0 ] );
-
-                self -> first = id;
-            }
-            else if ( id > self -> last )
-            {
-                range = id - self -> first + 1;
-                if ( range > self -> len )
-                {
-                    rc = KTrieIndexExpandId2Node_v1 ( self, range );
-                    if ( rc != 0 )
-                    {
-                        TrieUnlink ( & self -> key2id, & node -> n );
-                        KTrieIdxNodeWhack_v1 ( & node -> n, NULL );
-                        return rc;
-                    }
-                }
-
-                offset = id - 1 - self -> last;
-                if ( offset > 0 )
-                {
-                    memset ( & self -> id2node [ self -> last - self -> first + 1 ],
-                        0, offset * sizeof self -> id2node [ 0 ] );
-                }
-
-                self -> last = id;
-            }
-
-            assert ( self -> id2node != NULL );
-            self -> id2node [ id - self -> first ] = node;
-        }
-    }
-
-    return rc;
-}
-
-/* drop string from trie and all mappings */
-rc_t KTrieIndexDelete_v1 ( KTrieIndex_v1 *self, bool proj, const char *str )
-{
-    rc_t rc;
-
-    String key;
-    KTrieIdxNode_v1 *node;
-
-#if DISABLE_PROJ
-    proj = 0;
-#endif
-
-    /* detect first modification */
-    if ( self -> last < self -> first )
-    {
-        /* detect persisted data */
-        if ( self -> pt . key2id != NULL )
-        {
-            rc = KTrieIndexAttach_v1 ( self, proj, 0 );
-            if ( rc != 0 )
-                return rc;
-        }
-
-        /* create empty projection array */
-        else if ( proj )
-        {
-            self -> id2node = malloc ( 4096 * sizeof self -> id2node [ 0 ] );
-            if ( self -> id2node == NULL )
-                return RC ( rcDB, rcIndex, rcRemoving, rcMemory, rcExhausted );
-            self -> first = self -> last = 0;
-            self -> len = 4096;
-        }
-    }
-
-    /* interface states that all objects are dropped.
-       however, this implementation only allows unique
-       mappings, so a simple find is sufficient */
-    StringInitCString ( & key, str );
-    node = ( KTrieIdxNode_v1* ) TrieFind ( & self -> key2id, & key );
-    if ( node == NULL )
-        return RC ( rcDB, rcIndex, rcRemoving, rcString, rcNotFound );
-
-    /* drop from projection index */
-    if ( self -> id2node != NULL &&
-         node -> id >= self -> first &&
-         node -> id <= self -> last )
-    {
-        assert ( self -> id2node [ node -> id - self -> first ] == node );
-        if ( node -> id == self -> last )
-        {
-            if ( -- self -> last < self -> first )
-            {
-                free ( self -> id2node );
-                self -> id2node = NULL;
-                self -> len = 0;
-            }
-        }
-        else if ( node -> id == self -> first )
-        {
-            memcpy ( self -> id2node, self -> id2node + 1,
-                ( self -> last - self -> first ) * sizeof self -> id2node [ 0 ] );
-            ++ self -> first;
-        }
-        else
-        {
-            self -> id2node [ node -> id - self -> first ] = NULL;
-        }
-    }
-
-    TrieUnlink ( & self -> key2id, & node -> n );
-    KTrieIdxNodeWhack_v1 ( & node -> n, NULL );
-
-    return 0;
-}
-
-/* map key to id ( was Key2Id ) */
-rc_t KTrieIndexFind_v1 ( const KTrieIndex_v1 *self, const char *str, uint32_t *id,
-    int ( CC * custom_cmp ) ( const void *item, const PBSTNode *n, void *data ), void * data )
-{
-    String key;
-
-    if ( self -> last < self -> first )
-    {
-        if ( self -> pt . key2id != NULL )
-        {
-            PTNode n;
-            uint32_t nid;
-            StringInitCString ( & key, str );
-            nid = PTrieFind ( self -> pt . key2id, & key, & n, custom_cmp ,data);
-            if ( nid != 0 )
-            {
-                assert ( n . data . size == sizeof * id );
-                memcpy ( id, n . data . addr, sizeof * id );
-                return 0;
-            }
-        }
-    }
-    else
-    {
-        const KTrieIdxNode_v1 *n;
-
-        StringInitCString ( & key, str );
-        n = ( const KTrieIdxNode_v1* ) TrieFind ( & self -> key2id, & key );
-        if ( n != NULL )
-        {
-            * id = n -> id;
-            return 0;
-        }
-    }
-
-    return RC ( rcDB, rcIndex, rcSelecting, rcString, rcNotFound );
-}
-
-/* projection index id to key-string ( was Id2Key ) */
-rc_t KTrieIndexProject_v1 ( const KTrieIndex_v1 *self,
-    uint32_t id, char *key_buff, size_t buff_size, size_t *actsize )
-{
-    if ( self -> last < self -> first )
-    {
-        if ( self -> pt . id2node != NULL &&
-             id >= self -> pt . first &&
-             id <= self -> pt . last )
-        {
-            PTNode n;
-            uint32_t node = self -> pt . id2node [ id - self -> pt . first ];
-            rc_t rc = PTrieGetNode ( self -> pt . key2id,
-                & n, self -> pt . byteswap ? bswap_32 ( node ) : node );
-            if ( rc == 0 )
-            {
-                const String *key;
-                rc = PTNodeMakeKey ( & n, & key );
-                if ( rc == 0 )
-                {
-                    if (actsize)
-                        *actsize = key -> size;
-                    
-                    if ( key -> size >= buff_size )
-                        rc = RC ( rcDB, rcIndex, rcProjecting, rcBuffer, rcInsufficient );
-                    else
-                        string_copy ( key_buff, buff_size, key -> addr, key -> size );
-
-                    StringWhack ( ( String* ) key );
-                    return rc;
-                }
-            }
-        }
-    }
-    else
-    {
-        if ( self -> id2node != NULL &&
-             id >= self -> first &&
-             id <= self -> last )
-        {
-            const KTrieIdxNode_v1 *n = self -> id2node [ id - self -> first ];
-            if ( n != NULL )
-            {
-                if ( n -> n . key . size >= buff_size )
-                    return RC ( rcDB, rcIndex, rcProjecting, rcBuffer, rcInsufficient );
-                string_copy ( key_buff, buff_size,
-                    n -> n . key . addr, n -> n . key . size );
-                return 0;
-            }
-        }
-    }
-
-    return RC ( rcDB, rcIndex, rcProjecting, rcId, rcNotFound );
-}
diff --git a/libs/kdb/wtrieidx-v2.c b/libs/kdb/wtrieidx-v2.c
deleted file mode 100644
index 0eac32d..0000000
--- a/libs/kdb/wtrieidx-v2.c
+++ /dev/null
@@ -1,2560 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-
-#include "windex-priv.h"
-#include "trieidx-priv.h"
-
-#include <kdb/index.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/md5.h>
-#include <kfs/mmap.h>
-#include <klib/ptrie.h>
-#include <klib/text.h>
-#include <klib/pack.h>
-#include <klib/rc.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <byteswap.h>
-
-#include <stdlib.h>
-#include <limits.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-
-#define KTRIE_ZEROS_KPTRIE 1
-
-/*--------------------------------------------------------------------------
- * KPTrieIndex_v2
- *  persisted keymap
- */
-
-
-/* Init
- *  opens and initializes persisted keymap structure
- */
-static
-rc_t KPTrieIndexInitID2Ord ( KPTrieIndex_v2 *self, size_t in_size,
-    int variant, int span_bits, int elem_bits )
-{
-    rc_t rc;
-    union
-    {
-        uint8_t *v8;
-        uint16_t *v16;
-        uint32_t *v32;
-        uint64_t *v64;
-    } dst;
-    size_t elem_bytes = elem_bits >> 3;
-    uint32_t scount = self -> count - 1;
-
-    assert ( self -> count != 0 );
-
-    if ( span_bits * scount > in_size * 8 )
-        return RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcCorrupt );
-
-    dst . v8 = malloc ( self -> count * elem_bytes );
-    if ( dst . v8 == NULL )
-        rc = RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        size_t usize;
-        rc = Unpack ( span_bits, elem_bits,
-            & self -> ord2node [ self -> count ], 0,
-            span_bits * scount, NULL, & dst . v8 [ elem_bytes ],
-            scount * elem_bytes, & usize );
-        if ( rc == 0 )
-        {
-            uint32_t i;
-
-            self -> id2ord . v8 = dst . v8;
-            self -> variant = variant;
-
-            /* integrate to simple translation */
-            switch ( variant )
-            {
-            case 1:
-                dst . v8 [ 0 ] = 0;
-                for ( i = 0; i < scount; ++ i )
-                    dst . v8 [ i + 1 ] += dst . v8 [ i ];
-                break;
-            case 2:
-                dst . v16 [ 0 ] = 0;
-                for ( i = 0; i < scount; ++ i )
-                    dst . v16 [ i + 1 ] += dst . v16 [ i ];
-                break;
-            case 3:
-                dst . v32 [ 0 ] = 0;
-                for ( i = 0; i < scount; ++ i )
-                    dst . v32 [ i + 1 ] += dst . v32 [ i ];
-                break;
-            case 4:
-                dst . v64 [ 0 ] = 0;
-                for ( i = 0; i < scount; ++ i )
-                    dst . v64 [ i + 1 ] += dst . v64 [ i ];
-                break;
-            }
-
-            return 0;
-        }
-
-        free ( dst . v8 );
-    }
-
-    return rc;
-}
-
-static
-void CC KPTrieIndexExtractV1Range_v2 ( PTNode *n, void *data )
-{
-    KPTrieIndex_v2 *self = data;
-
-    /* capture node id */
-    uint32_t id;
-    assert ( n -> data . size == sizeof id );
-    memcpy ( & id, n -> data . addr, sizeof id );
-
-    /* perform min/max */
-    if ( self -> count == 0 )
-        self -> first = self -> last = id;
-    else if ( id < self -> first )
-        self -> first = id;
-    else if ( id > self -> last )
-        self -> last = id;
-
-    ++ self -> count;
-}
-
-static
-rc_t KPTrieIndexInitFromV1_v2 ( KPTrieIndex_v2 *self, const KMMap *mm, bool byteswap )
-{
-    KPTrieIndex_v1 v1;
-    rc_t rc = KPTrieIndexInit_v1 ( & v1, mm, byteswap );
-    if ( rc == 0 )
-    {
-        uint32_t *ord2node;
-        uint32_t total_id, test_id;
-        uint32_t i, id, id_bits, num_ids;
-
-        /* hopefully we got a projection index */
-        if ( v1 . id2node == NULL )
-        {
-#if ! KTRIE_ZEROS_KPTRIE
-            self -> count = 0;
-#endif
-            /* need to derive first and last from trie */
-            PTrieForEach ( v1 . key2id, KPTrieIndexExtractV1Range_v2, self );
-            if ( self -> count == 0 )
-                KPTrieIndexWhack_v1 ( & v1 );
-            else
-            {
-                /* take trie as-is */
-                self -> key2id = v1 . key2id;
-                self -> maxid = self -> last;
-            }
-
-            /* note that this assumes a span of 1 for
-               each id. there are no known uses of v1 without
-               a projection index, so this is unlikely to be important */
-
-            return 0;
-        }
-
-        /* take id range */
-        self -> first = v1 . first;
-        self -> last = self -> maxid = v1 . last;
-
-        /* count comes from trie as always */
-        self -> count = PTrieCount ( v1 . key2id );
-
-        /* detect empty trie */
-        if ( self -> count == 0 || self -> first > self -> last )
-        {
-            self -> first = self -> last = self -> maxid = 0;
-            return 0;
-        }
-
-        /* take trie as-is */
-        self -> key2id = v1 . key2id;
-
-        /* now decide whether to use 1-1 or sparse projection */
-        if ( ( self -> last - self -> first ) < ( ( int64_t ) self -> count << 1 ) )
-        {
-            /* take the old projection array as-is,
-               treating NULL node ids as holes */
-            self -> ord2node = v1 . id2node;
-            return 0;
-        }
-
-        /* convert to sparse
-           calculate id bits - notice that
-           total_id gets right shifted so that
-           the loop is guaranteed to exit */
-        num_ids = ( uint32_t ) ( self -> last - self -> first + 1 );
-        for ( total_id = num_ids >> 1, id_bits = 1, test_id = 1;
-            test_id <= total_id;
-            ++ id_bits, test_id <<= 1 )
-            ( void ) 0;
-
-        /* determine variant */
-        if ( id_bits <= 8 )
-        {
-            /* allocate 4 bytes for new ord2node and 1 for id2ord */
-            uint8_t *id2ord = malloc ( self -> count * 5 );
-            if ( id2ord == NULL )
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                ord2node = ( uint32_t* ) & id2ord [ self -> count ];
-                self -> ord2node = ord2node;
-                self -> id2ord . v8 = id2ord;
-                self -> variant = 1;
-
-                /* walk across v1 table, looking at each id */
-                for ( i = id = 0; id < num_ids; ++ id )
-                {
-                    /* detect non NULL node ids
-                       and pretend they represent a contiguous
-                       span with no holes in id space */
-                    if ( v1 . id2node [ id ] != 0 )
-                    {
-                        /* prevent overwriting */
-                        if ( i == self -> count )
-                        {
-                            rc = RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcCorrupt );
-                            break;
-                        }
-
-                        /* record id and node for slot */
-                        id2ord [ i ] = ( uint8_t ) id;
-                        ord2node [ i ] = v1 . id2node [ id ];
-                        ++ i;
-                    }
-                }
-            }
-        }
-        else if ( id_bits <= 16 )
-        {
-            uint16_t *id2ord = malloc ( self -> count * 6 );
-            if ( id2ord == NULL )
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                ord2node = ( uint32_t* ) & id2ord [ self -> count ];
-                self -> ord2node = ord2node;
-                self -> id2ord . v16 = id2ord;
-                self -> variant = 2;
-
-                for ( i = id = 0; id < num_ids; ++ id )
-                {
-                    if ( v1 . id2node [ id ] != 0 )
-                    {
-                        if ( i == self -> count )
-                        {
-                            rc = RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcCorrupt );
-                            break;
-                        }
-
-                        id2ord [ i ] = ( uint16_t ) id;
-                        ord2node [ i ] = v1 . id2node [ id ];
-                        ++ i;
-                    }
-                }
-            }
-        }
-        else
-        {
-            uint32_t *id2ord = malloc ( self -> count * 8 );
-            if ( id2ord == NULL )
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                ord2node = & id2ord [ self -> count ];
-                self -> ord2node = ord2node;
-                self -> id2ord . v32 = id2ord;
-                self -> variant = 3;
-
-                for ( i = id = 0; id < num_ids; ++ id )
-                {
-                    if ( v1 . id2node [ id ] != 0 )
-                    {
-                        if ( i == self -> count )
-                        {
-                            rc = RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcCorrupt );
-                            break;
-                        }
-
-                        id2ord [ i ] = id;
-                        ord2node [ i ] = v1 . id2node [ id ];
-                        ++ i;
-                    }
-                }
-            }
-        }
-
-        if ( rc == 0 )
-        {        
-            if ( i == self -> count )
-                return 0;
-            rc = RC ( rcDB, rcIndex, rcConstructing, rcIndex, rcCorrupt );
-        }
-
-        KPTrieIndexWhack_v1 ( & v1 );
-    }
-
-    return rc;
-}
-
-rc_t KPTrieIndexInit_v2 ( KPTrieIndex_v2 *self, const KMMap *mm, bool byteswap )
-{
-    /* get size of map, assumed to be size of file */
-    size_t size;
-    rc_t rc = KMMapSize ( mm, & size );
-    if ( rc == 0 )
-    {
-        const KPTrieIndexHdr_v2 *hdr;
-
-#if ! KTRIE_ZEROS_KPTRIE
-        self -> mm = NULL;
-        self -> ord2node = NULL;
-        self -> id2ord . v32 = NULL;
-        self -> variant = 0;
-#endif
-
-        /* ignore empty file */
-        if ( size == 0 )
-        {
-#if ! KTRIE_ZEROS_KPTRIE
-            self -> first = self -> last = self -> maxid = 0;
-            self -> key2id = NULL;
-            self -> count = 0;
-#endif
-            return 0;
-        }
-
-        /* have to have at least the base header */
-        if ( size < sizeof hdr -> dad )
-            return RC ( rcDB, rcIndex, rcConstructing, rcTrie, rcCorrupt );
-
-        rc = KMMapAddrRead ( mm, ( const void** ) & hdr );
-        if ( rc == 0 )
-        {
-            /* recheck header size */
-            if ( size < sizeof * hdr )
-                return RC ( rcDB, rcIndex, rcConstructing, rcTrie, rcCorrupt );
-
-            self -> first = hdr -> first;
-            self -> last = self -> maxid = hdr -> last;
-            self -> id_bits = ( uint8_t ) hdr -> id_bits;
-            self -> span_bits = ( uint8_t ) hdr -> span_bits;
-            self -> byteswap = byteswap;
-
-            /* try to create the pttree */
-            rc = PTrieMakeOrig ( & self -> key2id,
-                hdr + 1, size -= sizeof * hdr, byteswap );
-            if ( rc == 0 )
-            {
-                size_t ptsize = PTrieSize ( self -> key2id );
-                if ( ptsize <= size )
-                {
-                    /* the count covers at least the number of trie nodes */
-                    self -> count = PTrieCount ( self -> key2id );
-
-                    /* it could be stored without projection */
-                    if ( ptsize == size )
-                        return 0;
-
-                    /* calculate remaining bytes */                     
-                    size -= ptsize;
-
-                    /* there must be enough for an array of 4-byte node ids */
-                    if ( size >= ( ( size_t ) self -> count << 2 ) )
-                    {
-                        /* take the persisted array as-is */
-                        self -> ord2node = ( const uint32_t* )
-                            ( ( const char* ) ( hdr + 1 ) + ptsize );
-
-                        /* read the count */
-                        if ( size >= 4 )
-                        {
-                            self -> count = * ( self -> ord2node ) ++;
-                            size -= 4;
-                        }
-
-                        /* determine strategy from id span and count */
-                        if ( ( self -> last - self -> first ) < ( ( int64_t ) self -> count << 1 ) )
-                        {
-                            /* must be contiguous */
-                            self -> count = ( uint32_t ) ( self -> last - self -> first + 1 );
-
-                            /* size should be exactly this number of slots */
-                            if ( size == ( ( size_t ) self -> count << 2 ) )
-                                return 0;
-
-                            /* fall through to error return */
-                        }
-                        else if ( ( size == 4 && self -> count == 1 ) || size > ( ( size_t ) self -> count << 2 ) )
-                        {
-                            /* sparse */
-                            size -= ( size_t ) self -> count << 2;
-
-                            /* unpack id map */
-                            if ( hdr -> id_bits <= 8 )
-                                rc = KPTrieIndexInitID2Ord ( self, size, 1, hdr -> span_bits, 8 );
-                            else if ( hdr -> id_bits <= 16 )
-                                rc = KPTrieIndexInitID2Ord ( self, size, 2, hdr -> span_bits, 16 );
-                            else if ( hdr -> id_bits <= 32 )
-                                rc = KPTrieIndexInitID2Ord ( self, size, 3, hdr -> span_bits, 32 );
-                            else
-                                rc = KPTrieIndexInitID2Ord ( self, size, 4, hdr -> span_bits, 64 );
-
-                            /* done */
-                            if ( rc == 0 )
-                                return 0;
-
-                            PTrieWhack ( self -> key2id ), self -> key2id = NULL;
-                            return rc;
-                        }
-                    }
-                }
-
-                PTrieWhack ( self -> key2id ), self -> key2id = NULL;
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcTrie, rcCorrupt );
-            }
-        }
-    }
-
-    return rc;
-}
-
-rc_t KPTrieIndexInit_v3_v4 ( KPTrieIndex_v2 *self, const KMMap *mm, bool byteswap, bool ptorig )
-{
-    /* get size of map, assumed to be size of file */
-    size_t size;
-    rc_t rc = KMMapSize ( mm, & size );
-    if ( rc == 0 )
-    {
-        const KPTrieIndexHdr_v3 *hdr;
-
-#if ! KTRIE_ZEROS_KPTRIE
-        self -> mm = NULL;
-        self -> ord2node = NULL;
-        self -> id2ord . v32 = NULL;
-        self -> variant = 0;
-#endif
-
-        /* ignore empty file */
-        if ( size == 0 )
-        {
-#if ! KTRIE_ZEROS_KPTRIE
-            self -> first = self -> last = self -> maxid = 0;
-            self -> key2id = NULL;
-            self -> count = 0;
-#endif
-            return 0;
-        }
-
-        /* have to have at least the base header */
-        if ( size < sizeof hdr -> dad )
-            return RC ( rcDB, rcIndex, rcConstructing, rcTrie, rcCorrupt );
-
-        rc = KMMapAddrRead ( mm, ( const void** ) & hdr );
-        if ( rc == 0 )
-        {
-            /* recheck header size */
-            if ( size < sizeof * hdr )
-                return RC ( rcDB, rcIndex, rcConstructing, rcTrie, rcCorrupt );
-
-            self -> first = hdr -> first;
-            self -> last = self -> maxid = hdr -> last;
-            self -> id_bits = ( uint8_t ) hdr -> id_bits;
-            self -> span_bits = ( uint8_t ) hdr -> span_bits;
-            self -> byteswap = byteswap;
-
-            /* try to create the pttree */
-            rc = ( ptorig ? PTrieMakeOrig : PTrieMake )
-                ( & self -> key2id, hdr + 1, size -= sizeof * hdr, byteswap );
-            if ( rc == 0 )
-            {
-                size_t ptsize = PTrieSize ( self -> key2id );
-                if ( ptsize <= size )
-                {
-                    /* the count covers at least the number of trie nodes */
-                    self -> count = PTrieCount ( self -> key2id );
-
-                    /* it could be stored without projection */
-                    if ( ptsize == size )
-                        return 0;
-
-                    /* calculate remaining bytes */                     
-                    size -= ptsize;
-
-                    /* there must be enough for an array of 4-byte node ids */
-                    if ( size >= ( ( size_t ) self -> count << 2 ) )
-                    {
-                        /* take the persisted array as-is */
-                        self -> ord2node = ( const uint32_t* )
-                            ( ( const char* ) ( hdr + 1 ) + ptsize );
-
-                        /* read the count */
-                        if ( size >= 4 )
-                        {
-                            self -> count = * ( self -> ord2node ) ++;
-                            size -= 4;
-                        }
-
-                        /* determine strategy from id span and count */
-                        if ( ( self -> last - self -> first ) < ( ( int64_t ) self -> count << 1 ) )
-                        {
-                            /* must be contiguous */
-                            self -> count = ( uint32_t ) ( self -> last - self -> first + 1 );
-
-                            /* size should be exactly this number of slots */
-                            if ( size == ( ( size_t ) self -> count << 2 ) )
-                                return 0;
-
-                            /* fall through to error return */
-                        }
-                        else if ( ( size == 4 && self -> count == 1 ) || size > ( ( size_t ) self -> count << 2 ) )
-                        {
-                            /* sparse */
-                            size -= ( size_t ) self -> count << 2;
-
-                            /* unpack id map */
-                            if ( hdr -> id_bits <= 8 )
-                                rc = KPTrieIndexInitID2Ord ( self, size, 1, hdr -> span_bits, 8 );
-                            else if ( hdr -> id_bits <= 16 )
-                                rc = KPTrieIndexInitID2Ord ( self, size, 2, hdr -> span_bits, 16 );
-                            else if ( hdr -> id_bits <= 32 )
-                                rc = KPTrieIndexInitID2Ord ( self, size, 3, hdr -> span_bits, 32 );
-                            else
-                                rc = KPTrieIndexInitID2Ord ( self, size, 4, hdr -> span_bits, 64 );
-
-                            /* done */
-                            if ( rc == 0 )
-                                return 0;
-
-                            PTrieWhack ( self -> key2id ), self -> key2id = NULL;
-                            return rc;
-                        }
-                    }
-                }
-
-                PTrieWhack ( self -> key2id ), self -> key2id = NULL;
-                rc = RC ( rcDB, rcIndex, rcConstructing, rcTrie, rcCorrupt );
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* Whack
- *  closes down keymap
- */
-void KPTrieIndexWhack_v2 ( KPTrieIndex_v2 *self )
-{
-    free ( ( void* ) self -> id2ord . v8 );
-    PTrieWhack ( self -> key2id );
-    KMMapRelease ( self -> mm );
-    memset ( self, 0, sizeof * self );
-}
-
-uint32_t KPTrieIndexID2Ord_v2 ( const KPTrieIndex_v2 *self, int64_t id )
-{
-    if ( id >= self -> first && id <= self -> maxid )
-    {
-        int64_t nid;
-        uint32_t left, right, ord, count = self -> count;
-
-        /* convert id either to a zero-based ord,
-           or else the translated id in id2ord */
-        id -= self -> first;
-
-        /* handle type of projection */
-        switch ( self -> variant )
-        {
-        case 0:
-            /* return one-based ord */
-            return ( uint32_t ) ( id + 1 );
-
-        case 1:
-            for ( left = 1, right = count; left <= right; )
-            {
-                ord = ( left + right ) >> 1;
-                nid = self -> id2ord . v8 [ ord - 1 ];
-                if ( id == nid )
-                    return ord;
-
-                if ( id < nid )
-                {
-                    right = ord - 1;
-                    continue;
-                }
-                if ( ord == count )
-                    return ord;
-
-                nid = self -> id2ord . v8 [ ord ];
-                if ( id < nid )
-                    return ord;
-
-                left = ord + 1;
-            }
-            break;
-
-        case 2:
-            for ( left = 1, right = count; left <= right; )
-            {
-                ord = ( left + right ) >> 1;
-                nid = self -> id2ord . v16 [ ord - 1 ];
-                if ( id == nid )
-                    return ord;
-
-                if ( id < nid )
-                {
-                    right = ord - 1;
-                    continue;
-                }
-                if ( ord == count )
-                    return ord;
-
-                nid = self -> id2ord . v16 [ ord ];
-                if ( id < nid )
-                    return ord;
-
-                left = ord + 1;
-            }
-            break;
-
-        case 3:
-            for ( left = 1, right = count; left <= right; )
-            {
-                ord = ( left + right ) >> 1;
-                nid = self -> id2ord . v32 [ ord - 1 ];
-                if ( id == nid )
-                    return ord;
-
-                if ( id < nid )
-                {
-                    right = ord - 1;
-                    continue;
-                }
-                if ( ord == count )
-                    return ord;
-
-                nid = self -> id2ord . v32 [ ord ];
-                if ( id < nid )
-                    return ord;
-
-                left = ord + 1;
-            }
-            break;
-
-        case 4:
-            for ( left = 1, right = count; left <= right; )
-            {
-                ord = ( left + right ) >> 1;
-                nid = self -> id2ord . v64 [ ord - 1 ];
-                if ( id == nid )
-                    return ord;
-
-                if ( id < nid )
-                {
-                    right = ord - 1;
-                    continue;
-                }
-                if ( ord == count )
-                    return ord;
-
-                nid = self -> id2ord . v64 [ ord ];
-                if ( id < nid )
-                    return ord;
-
-                left = ord + 1;
-            }
-            break;
-        }
-    }
-    return 0;
-}
-
-static
-rc_t KPTrieIndexProject_v2 ( const KPTrieIndex_v2 *self,
-    int64_t id,
-#if V2FIND_RETURNS_SPAN
-    int64_t *start_id, uint32_t *span,
-#endif
-    char *key_buff, size_t buff_size, size_t *actsize )
-{
-    uint32_t nid, ord = KPTrieIndexID2Ord_v2 ( self, id );
-    if ( ord != 0 )
-    {
-        assert ( start_id != NULL );
-        assert ( span != NULL );
-
-        nid = self -> ord2node [ ord - 1 ];
-
-        switch ( self -> variant )
-        {
-        case 0:
-            * start_id = id;
-            for ( ; ord < self -> count; ++ ord )
-            {
-                if ( nid != self -> ord2node [ ord ] )
-                    break;
-            }
-            * span = self -> first + ord - * start_id;
-            break;
-        case 1:
-            * start_id = self -> id2ord . v8 [ ord - 1 ];
-            * span = ( uint32_t ) ( ( ( ord == self -> count ) ?
-                ( self -> maxid  - self -> first + 1 ) : self -> id2ord . v8 [ ord ] ) - * start_id );
-            *start_id += self->first; 
-            break;
-        case 2:
-            * start_id = self -> id2ord . v16 [ ord - 1 ];
-            * span = ( uint32_t ) ( ( ( ord == self -> count ) ?
-                ( self -> maxid  - self -> first + 1 ) : self -> id2ord . v16 [ ord ] ) - * start_id );
-            *start_id += self->first; 
-            break;
-        case 3:
-            * start_id = self -> id2ord . v32 [ ord - 1 ];
-            * span = ( uint32_t ) ( ( ( ord == self -> count ) ?
-                ( self -> maxid  - self -> first + 1 ) : self -> id2ord . v32 [ ord ] ) - * start_id );
-            *start_id += self->first; 
-            break;
-        case 4:
-            * start_id = self -> id2ord . v64 [ ord - 1 ];
-            * span = ( uint32_t ) ( ( ( ord == self -> count ) ?
-                ( self -> maxid  - self -> first + 1 ) : self -> id2ord . v64 [ ord ] ) - * start_id );
-            *start_id += self->first; 
-            break;
-        }
-
-        if ( nid != 0 )
-        {
-            rc_t rc;
-            PTNode node;
-
-            if ( self -> byteswap )
-                nid = bswap_32 ( nid );
-
-            rc = PTrieGetNode ( self -> key2id, & node, nid );
-            if ( rc == 0 )
-            {
-                const String *key;
-                rc = PTNodeMakeKey ( & node, & key );
-                if ( rc == 0 )
-                {
-                    if (actsize)
-                        *actsize = key -> size;
-                    if ( key -> size >= buff_size )
-                        rc = RC ( rcDB, rcIndex, rcProjecting, rcBuffer, rcInsufficient );
-                    else
-                        string_copy ( key_buff, buff_size, key -> addr, key -> size );
-
-                    StringWhack ( ( String* ) key );
-                }
-            }
-            return rc;
-        }
-    }
-
-    return RC ( rcDB, rcIndex, rcProjecting, rcId, rcNotFound );
-}
-
-/* Find
- */
-static
-rc_t KPTrieIndexFind_v2 ( const KPTrieIndex_v2 *self,
-    const char *str, int64_t *start_id,
-#if V2FIND_RETURNS_SPAN
-    uint32_t *span,
-#endif
-    int ( CC * custom_cmp ) ( const void *item, const PBSTNode *n, void *data ), void *data, bool convertFromV1 )
-{
-    rc_t rc;
-
-    /* detect empty index */
-    if ( self -> count == 0 )
-        rc = RC ( rcDB, rcIndex, rcSelecting, rcString, rcNotFound );
-    else
-    {
-        uint32_t nid;
-        PTNode pnode;
-
-        String key;
-        StringInitCString ( & key, str );
-
-        /* try to find string */
-        nid = PTrieFind ( self -> key2id, & key, & pnode, custom_cmp, data );
-        if ( nid == 0 )
-            rc = RC ( rcDB, rcIndex, rcSelecting, rcString, rcNotFound );
-        else
-        {
-            size_t usize;
-
-            /* detect conversion from v1 */
-            if ( convertFromV1 && self -> id_bits == 0 )
-            {
-                /* v1 stored tree will have just a 32-bit spot id as data */
-                uint32_t id;
-                assert ( pnode . data . size == sizeof id );
-                memcpy ( & id, pnode . data . addr, sizeof id );
-                * start_id = id;
-                rc = 0;
-            }
-            else
-            {
-                /* should be native v2 */
-                rc = Unpack ( self -> id_bits, sizeof * start_id * 8,
-                    pnode . data . addr, 0, self -> id_bits, NULL,
-                    start_id, sizeof * start_id, & usize );
-                * start_id += self -> first;
-            }
-
-            if ( rc == 0 )
-            {
-#if V2FIND_RETURNS_SPAN
-                if ( self -> ord2node != NULL )
-                {
-                    uint32_t ord = KPTrieIndexID2Ord_v2 ( self, * start_id );
-                    if ( ord == 0 )
-                        rc = RC ( rcDB, rcIndex, rcSelecting, rcId, rcNotFound );
-                    else if ( ord == self -> count )
-                        * span = self -> maxid - * start_id + 1;
-                    else switch ( self -> variant )
-                    {
-                    case 0:
-                        for ( ; ord < self -> count; ++ ord )
-                        {
-                            if ( nid != self -> ord2node [ ord ] )
-                                break;
-                        }
-                        * span = self -> first + ord - * start_id;
-                        break;
-                    case 1:
-                        * span = self -> first + self -> id2ord . v8 [ ord ] - * start_id;
-                        break;
-                    case 2:
-                        * span = self -> first + self -> id2ord . v16 [ ord ] - * start_id;
-                        break;
-                    case 3:
-                        * span = self -> first + self -> id2ord . v32 [ ord ] - * start_id;
-                        break;
-                    case 4:
-                        * span = self -> first + self -> id2ord . v64 [ ord ] - * start_id;
-                        break;
-                    }
-                }
-                else if ( self -> span_bits == 0 )
-                    * span = 1;
-                else
-                {
-                    rc = Unpack ( self -> span_bits, sizeof * span * 8,
-                        pnode . data . addr, 0, self -> id_bits, NULL,
-                        span, sizeof * span, & usize );
-                }
-#endif
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KTrieIdxNode_v2
- */
-
-static
-rc_t KTrieIdxNodeMake_v2_s1 ( KTrieIdxNode_v2_s1 **n, const String *key, int64_t id )
-{
-    rc_t rc = TNodeMake ( ( TNode** ) n, sizeof ** n + key -> size );
-    if ( rc != 0 )
-        rc = ResetRCContext ( rc, rcDB, rcIndex, rcInserting );
-    else
-    {
-        KTrieIdxNode_v2_s1 *node = * n;
-        string_copy ( node -> key, key -> size + 1, key -> addr, key -> size);
-        StringInit ( & node -> n . key, node -> key, key -> size, key -> len );
-        node -> start_id = id;
-    }
-
-    return rc;
-}
-
-static
-rc_t KTrieIdxNodeMakeHole_v2_s1 ( KTrieIdxNode_v2_s1 **n, int64_t id )
-{
-    rc_t rc = TNodeMake ( ( TNode** ) n, sizeof ** n );
-    if ( rc != 0 )
-        rc = ResetRCContext ( rc, rcDB, rcIndex, rcInserting );
-    else
-    {
-        KTrieIdxNode_v2_s1 *node = * n;
-        node -> key [ 0 ] = 0;
-        StringInit ( & node -> n . key, node -> key, 0, 0 );
-        node -> start_id = id;
-    }
-
-    return rc;
-}
-
-static
-rc_t KTrieIdxNodeMake_v2_s2 ( KTrieIdxNode_v2_s2 **n, const String *key, int64_t id )
-{
-    rc_t rc = TNodeMake ( ( TNode** ) n, sizeof ** n + key -> size );
-    if ( rc != 0 )
-        rc = ResetRCContext ( rc, rcDB, rcIndex, rcInserting );
-    else
-    {
-        KTrieIdxNode_v2_s2 *node = * n;
-        string_copy ( node -> key, key -> size + 1, key -> addr, key -> size);
-        StringInit ( & node -> n . key, node -> key, key -> size, key -> len );
-        node -> start_id = id;
-        node -> span = 1;
-    }
-    return rc;
-}
-
-static
-void CC KTrieIdxNodeWhack_v2 ( TNode *n, void *data )
-{
-    TNodeWhack ( n );
-}
-
-#if 0
-static
-void CC KTrieIdxNodeUnlink_v2 ( TNode *n, void *data )
-{
-    if ( TrieUnlink ( data, n ) )
-        TNodeWhack ( n );
-}
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KTrieIndex_v2
- */
-
-static
-uint32_t KTrieIndexID2Ord_v2 ( const KTrieIndex_v2 *self, int64_t id )
-{
-    if ( id >= self -> first && id <= self -> last )
-    {
-        uint32_t left, right, count = self -> count;
-        for ( left = 1, right = count; left <= right; )
-        {
-            uint32_t ord = ( left + right ) >> 1;
-            const KTrieIdxNode_v2_s1 *node = self -> ord2node [ ord - 1 ];
-            if ( id == node -> start_id )
-                return ord;
-
-            if ( id < node -> start_id )
-            {
-                right = ord - 1;
-                continue;
-            }
-
-            if ( ord == count )
-                return ord;
-
-            node = self -> ord2node [ ord ];
-            if ( id < node -> start_id )
-                return ord;
-
-            left = ord + 1;
-        }
-    }
-    return 0;
-}
-
-static
-uint32_t KTrieIndexNode2Ord_v2 ( const KTrieIndex_v2 *self, const KTrieIdxNode_v2_s1 *node )
-{
-    if ( self -> ord2node != NULL )
-        return KTrieIndexID2Ord_v2 ( self, node -> start_id );
-    return 0;
-}
-
-/* KTrieIndexWrite_v2
- */
-typedef struct PersistTrieData PersistTrieData;
-struct PersistTrieData
-{
-    uint64_t pos;
-    KFile *f;
-    KMD5File *fmd5;
-    uint8_t *buffer;
-    size_t bsize;
-    size_t marker;
-
-    int64_t first;
-    size_t ptt_size;
-    size_t node_data_size;
-    uint16_t id_bits;
-    uint16_t span_bits;
-    rc_t rc;
-};
-
-static
-rc_t CC KTrieIndexWrite_v2 ( void *param,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    PersistTrieData *pb = param;
-    size_t total, to_write;
-
-    for ( total = 0; total < size; total += to_write )
-    {
-        to_write = size - total;
-        if ( pb -> marker + to_write > pb -> bsize )
-            to_write = pb -> bsize - pb -> marker;
-
-        if ( to_write > 0 )
-        {
-            memcpy ( pb -> buffer + pb -> marker,
-                ( const uint8_t* ) buffer + total, to_write );
-            pb -> marker += to_write;
-        }
-
-        if ( pb -> marker == pb -> bsize )
-        {
-            size_t num_flushed;
-            pb -> rc = KFileWrite ( pb -> f, pb -> pos,
-                pb -> buffer, pb -> bsize, & num_flushed );
-            if ( pb -> rc != 0 )
-            {
-                * num_writ = 0;
-                return pb -> rc;
-            }
-
-            if ( num_flushed == 0 )
-            {
-                * num_writ = total + to_write;
-                return pb -> rc = RC ( rcDB, rcIndex, rcPersisting, rcTransfer, rcIncomplete );
-            }
-
-            pb -> marker -= num_flushed;
-            pb -> pos += num_flushed;
-
-            if ( pb -> marker != 0 )
-                memcpy ( pb -> buffer, pb -> buffer + num_flushed, pb -> marker );
-        }
-    }
-
-    * num_writ = total;
-    return 0;
-}
-
-/* KTrieIndexAux_v2
- */
-static
-rc_t CC KTrieIndexAux_v2_s1 ( void *param, const void *node, size_t *num_writ,
-    PTWriteFunc write, void *write_param )
-{
-    PersistTrieData *pb = param;
-
-    if ( write != NULL && pb -> node_data_size != 0 )
-    {
-        char buffer [ 8 ];
-        const KTrieIdxNode_v2_s1 *n = node;
-
-        /* pack from 64 possible bits down to total id span */
-        if ( pb -> id_bits != 0 )
-        {
-            /* store name->id mapping as a simple translation
-               from first, because we don't have easy access to
-               neighboring nodes for storage as 1st derivative. */
-            uint64_t idd = n -> start_id - pb -> first;
-
-            bitsz_t psize;
-            rc_t rc = Pack ( 64, pb -> id_bits, & idd,
-                sizeof idd, NULL, buffer, 0, sizeof buffer * 8, & psize );
-            if ( rc != 0 )
-                return rc;
-
-            /* the packing should produce a single unit */
-            if ( psize != pb -> id_bits )
-                return RC ( rcDB, rcIndex, rcPacking, rcData, rcCorrupt );
-        }
-
-        /* write out the node */
-        return ( * write ) ( write_param, buffer, pb -> node_data_size, num_writ );
-    }
-
-    /* will always store an integral number of bytes */
-    * num_writ = pb -> node_data_size;
-    return 0;
-}
-
-static
-rc_t CC KTrieIndexAux_v2_s2 ( void *param, const void *node, size_t *num_writ,
-    PTWriteFunc write, void *write_param )
-{
-    PersistTrieData *pb = param;
-
-    if ( write != NULL && pb -> node_data_size != 0 )
-    {
-        const KTrieIdxNode_v2_s2 *n = node;
-
-        rc_t rc;
-        char buffer [ 12 ];
-        bitsz_t psize, offset;
-
-        if ( pb -> id_bits == 0 )
-            offset = 0;
-        else
-        {
-            /* again store name->id mapping as a simple translation
-               from first, but pack bits tightly */
-            uint64_t idd = n -> start_id - pb -> first;
-            rc = Pack ( 64, pb -> id_bits, & idd,
-                sizeof idd, NULL, buffer, 0, sizeof buffer * 8, & offset );
-            if ( rc != 0 )
-                return rc;
-            if ( offset != pb -> id_bits )
-                return RC ( rcDB, rcIndex, rcPacking, rcData, rcCorrupt );
-        }
-
-        /* now pack id span down to a minimal number of bits
-           6/8/09 - this is known to fail because Pack hasn't been
-           updated to start on a non-0 bit offset */
-        if ( pb -> span_bits != 0 )
-        {
-            rc = Pack ( 32, pb -> span_bits, & n -> span, sizeof n -> span,
-                NULL, buffer, offset, sizeof buffer * 8 - offset, & psize );
-            if ( rc != 0 )
-                return rc;
-            if ( psize != pb -> span_bits )
-                return RC ( rcDB, rcIndex, rcPacking, rcData, rcCorrupt );
-        }
-
-        /* write out packed combination */
-        return ( * write ) ( write_param, buffer, pb -> node_data_size, num_writ );
-    }
-
-    * num_writ = pb -> node_data_size;
-    return 0;
-}
-
-/* KTrieIndexPersist_v*
- *  write keymap to indicated location
- */
-#if KDBINDEXVERS == 2
-
-static
-void KTrieIndexPersistHdr_v2 ( KTrieIndex_v2 *self, PersistTrieData *pb )
-{
-    KPTrieIndexHdr_v2 *hdr;
-
-    uint64_t total_id, test_id;
-    uint32_t total_span, test_span;
-
-    pb -> pos = 0;
-
-    hdr = ( KPTrieIndexHdr_v2* ) pb -> buffer;
-    pb -> marker = sizeof * hdr;
-
-    /* stamp version header */
-    KDBHdrInit(&hdr->dad, 2);
-
-    /* store first and last ids */
-    pb -> first = self -> first;
-    hdr -> first = self -> first;
-    hdr -> last = self -> last;
-
-    /* calculate id bits - notice that
-       total_id gets right shifted so that
-       the loop is guaranteed to exit */
-    total_id = self -> last - self -> first;
-    if ( total_id == 0 )
-        pb -> id_bits = 0;
-    else for ( total_id >>= 1, pb -> id_bits = 1, test_id = 1;
-          test_id <= total_id;
-          ++ pb -> id_bits, test_id <<= 1 )
-        ( void ) 0;
-
-    /* if we have maintained a projection index,
-       calculate max span now */
-    if ( self -> ord2node != NULL )
-    {
-        uint32_t i, span, max_span;
-        int64_t cur, prev = self -> first;
-        for ( i = max_span = 1; i < self -> count; prev = cur, ++ i )
-        {
-            cur = self -> ord2node [ i ] -> start_id;
-            span = ( uint32_t ) ( cur - prev );
-            if ( span > max_span )
-                max_span = span;
-        }
-        
-        span = ( uint32_t ) ( self -> last - prev );
-        if ( span > max_span )
-            max_span = span;
-
-        self -> max_span = max_span;
-    }
-
-    /* calculate span bits */
-    total_span = self -> max_span;
-    if ( total_span == 0 )
-        pb -> span_bits = 0;
-    else for ( total_span >>= 1, pb -> span_bits = 1, test_span = 1;
-          test_span <= total_span;
-          ++ pb -> span_bits, test_span <<= 1 )
-        ( void ) 0;
-
-    /* record these as header data */
-    hdr -> id_bits = pb -> id_bits;
-    hdr -> span_bits = pb -> span_bits;
-
-    /* zero trailing junk */
-    hdr -> align [ 0 ] = hdr -> align [ 1 ] = 0;
-}
-
-#else
-
-static
-void KTrieIndexPersistHdr_v3_v4 ( KTrieIndex_v2 *self, PersistTrieData *pb )
-{
-    KPTrieIndexHdr_v3 *hdr;
-
-    uint64_t total_id, test_id;
-    uint32_t total_span, test_span;
-
-    pb -> pos = 0;
-
-    hdr = ( KPTrieIndexHdr_v3* ) pb -> buffer;
-    pb -> marker = sizeof * hdr;
-
-    /* stamp version header */
-    KDBHdrInit(&hdr->dad.h, KDBINDEXVERS);
-    hdr->dad.index_type = kitText;
-
-    /* store first and last ids */
-    pb -> first = self -> first;
-    hdr -> first = self -> first;
-    hdr -> last = self -> last;
-
-    /* calculate id bits - notice that
-       total_id gets right shifted so that
-       the loop is guaranteed to exit */
-    total_id = self -> last - self -> first;
-    if ( total_id == 0 )
-        pb -> id_bits = 0;
-    else for ( total_id >>= 1, pb -> id_bits = 1, test_id = 1;
-          test_id <= total_id;
-          ++ pb -> id_bits, test_id <<= 1 )
-        ( void ) 0;
-
-    /* if we have maintained a projection index,
-       calculate max span now */
-    if ( self -> ord2node != NULL )
-    {
-        uint32_t i, span, max_span;
-        int64_t cur, prev = self -> first;
-        for ( i = max_span = 1; i < self -> count; prev = cur, ++ i )
-        {
-            cur = self -> ord2node [ i ] -> start_id;
-            span = ( uint32_t ) ( cur - prev );
-            if ( span > max_span )
-                max_span = span;
-        }
-        
-        span = ( uint32_t ) ( self -> last - prev );
-        if ( span > max_span )
-            max_span = span;
-
-        self -> max_span = max_span;
-    }
-
-    /* calculate span bits */
-    total_span = self -> max_span;
-    if ( total_span == 0 )
-        pb -> span_bits = 0;
-    else for ( total_span >>= 1, pb -> span_bits = 1, test_span = 1;
-          test_span <= total_span;
-          ++ pb -> span_bits, test_span <<= 1 )
-        ( void ) 0;
-
-    /* record these as header data */
-    hdr -> id_bits = pb -> id_bits;
-    hdr -> span_bits = pb -> span_bits;
-
-    /* zero trailing junk */
-    hdr -> align [ 0 ] = hdr -> align [ 1 ] = 0;
-}
-
-#endif 
-
-static
-rc_t KTrieIndexPersistTrie_v2 ( const KTrieIndex_v2 *self, PersistTrieData *pb )
-{
-    rc_t rc;
-
-    /* persist the trie to file,
-       using tree-internal key storage,
-       capture the image size in pb */
-    if ( self -> ord2node != NULL )
-    {
-        pb -> node_data_size = ( pb -> id_bits + 7 ) >> 3;
-        rc = TriePersist ( & self -> key2id, & pb -> ptt_size,
-            false, KTrieIndexWrite_v2, pb, KTrieIndexAux_v2_s1, pb );
-    }
-    else
-    {
-        pb -> node_data_size = ( pb -> id_bits + pb -> span_bits + 7 ) >> 3;
-        rc = TriePersist ( & self -> key2id, & pb -> ptt_size,
-            false, KTrieIndexWrite_v2, pb, KTrieIndexAux_v2_s2, pb );
-    }
-
-    if ( rc == 0 && pb -> marker != 0 )
-    {
-        size_t num_writ;
-        rc = KFileWrite ( pb -> f, pb -> pos,
-            pb -> buffer, pb -> marker, & num_writ );
-        if ( rc == 0 && num_writ != pb -> marker )
-            rc = RC ( rcDB, rcIndex, rcPersisting, rcTransfer, rcIncomplete );
-    }
-
-    return rc;
-}
-
-
-static
-rc_t KTrieIndexPersistProjContig_v2 ( const KTrieIndex_v2 *self,
-    PersistTrieData *pb, PTrie *tt, uint32_t *ord2node )
-{
-    uint32_t i, j, nid;
-    int64_t id = self -> first;
-    for ( i = j = nid = 0; i < self -> count; ++ id, ++ j, ++ i )
-    {
-        const KTrieIdxNode_v2_s1 *node = self -> ord2node [ i ];
-
-        /* back fill repeats */
-        for ( ; id < node -> start_id; ++ id )
-            ord2node [ j ++ ] = nid;
-
-        /* check for a hole in id space */
-        if ( node -> n . key . size == 0 )
-            nid = 0;
-        else
-        {
-            PTNode pn;
-            nid = PTrieFind ( tt, & node -> n . key, & pn, NULL, NULL );
-            if ( nid == 0 )
-                return RC ( rcDB, rcIndex, rcPersisting, rcTransfer, rcIncomplete );
-        }
-
-        /* record nid for i at j */
-        ord2node [ j ] = nid;
-    }
-
-    /* finish off trailing span */
-    for ( ; id <= self -> last; ++ id )
-        ord2node [ j ++ ] = nid;
-
-    return 0;
-}
-
-static
-rc_t KTrieIndexPersistProjSparse_v2 ( const KTrieIndex_v2 *self,
-    PersistTrieData *pb, PTrie *tt, uint32_t *ord2node, bitsz_t *psize )
-{
-    uint32_t i, nid;
-    int64_t *id2ord = ( void* ) & ord2node [ self -> count ];
-    for ( i = 0; i < self -> count; ++ i )
-    {
-        const KTrieIdxNode_v2_s1 *node = self -> ord2node [ i ];
-
-        /* record negated id for i - see 1st derivative below */
-        id2ord [ i ] = - node -> start_id;
-
-        /* check for a hole in id space */
-        if ( node -> n . key . size == 0 )
-            nid = 0;
-        else
-        {
-            PTNode pn;
-            nid = PTrieFind ( tt, & node -> n . key, & pn, NULL, NULL );
-            if ( nid == 0 )
-                return RC ( rcDB, rcIndex, rcPersisting, rcTransfer, rcIncomplete );
-        }
-
-        /* record nid for i */
-        ord2node [ i ] = nid;
-    }
-
-    /* produce first derivative of ids
-       for any given pair, the 1st derivative is generally
-       right - left, which is usually stored right, such that
-       we start at the end and move left toward the start, i.e.
-
-       right -= left and move left
-
-       in this case, we want to eliminate the leading 0
-       and shift everything down, so we produce the result
-       to the left side and move right toward end, but this
-       requires more complicated arithmetic in order to preserve
-       right - left, i.e.
-
-       left = right - left and move right
-
-       to avoid this arithmetic, the ids were stored negated above
-       which converts the operation into
-
-       left -= right and move right
-    */
-    for ( i = 1; i < self -> count; ++ i )
-        id2ord [ i - 1 ] -= id2ord [ i ];
-
-    /* pack from 64 to span-bits */
-    return Pack ( 64, pb -> span_bits, id2ord, ( size_t ) ( self -> count - 1 ) << 3,
-                NULL, id2ord, 0, ( bitsz_t ) self -> count << 6, psize );
-}
-
-#if KDBINDEXVERS == 2
-
-static
-rc_t KTrieIndexPersistProj_v2 ( const KTrieIndex_v2 *self, PersistTrieData *pb )
-{
-    rc_t rc = 0;
-    void * addr;
-    size_t map_size;
-    uint64_t file_size;
-    size_t num_to_read;
-    uint64_t num_ids;
-    bool is_sparse;
-
-    /* there must be something to do */
-    if ( self -> count == 0 || self -> ord2node == NULL )
-        return 0;
-
-    /* calculate what kind of projection strategy to use:
-       when avg ( id span ) <= 2.0, just use a straight array.
-       otherwise, use two arrays: first for node ids and last
-       being 1st derivative of positional start_ids.
-
-       the calculation of the ratio would be
-         num_ids = self -> last - self -> first + 1;
-         ratio = num_ids / self -> count;
-         if ( ratio <= 2.0 )
-             use 1-1
-         else
-             use sparse
-
-       by reorganizing the comparison, we get
-         if ( num_ids <= 2 * self -> count )...
-    */
-    num_ids = self -> last - self -> first + 1;
-    if ( num_ids <= ( ( uint64_t ) self -> count << 1 ) )
-    {
-        /* store 1-1 projection index */
-        is_sparse = false;
-
-        /* map size is 4 bytes per id */
-        map_size = pb -> ptt_size + ( ( size_t ) num_ids << 2 );
-    }
-    else
-    {
-        /* store sparse projection index */
-        is_sparse = true;
-
-        /* map size for node ids is 4 bytes per slot */
-        map_size = pb -> ptt_size + ( ( size_t ) self -> count << 2 );
-
-        /* map size for 1st derivative ids is initially 8 bytes per slot
-           used initially to store full ids and then reduced 1st deriv. */
-        map_size += ( size_t ) self -> count << 3;
-    }
-
-    /* add in 4 bytes for count */
-    map_size += 4;
-
-    /* create an updatable region spanning from end of header,
-       starting from PTrie and extending to end of projection index */
-    addr = malloc ( map_size );
-    if ( addr == NULL )
-        rc = RC ( rcDB, rcIndex, rcPersisting, rcMemory, rcExhausted );
-    else
-    {
-        size_t num_read;
-
-        rc = KFileSize ( pb -> f, & file_size );
-        num_to_read = file_size - sizeof ( KPTrieIndexHdr_v2 );
-        if ( rc == 0 )
-        {
-            rc = KFileReadAll ( pb -> f, sizeof ( KPTrieIndexHdr_v2 ), addr,
-			     num_to_read, & num_read );
-            if ( rc == 0 )
-            {
-                if ( num_read != num_to_read )
-                {
-                    rc = RC ( rcDB, rcIndex, rcPersisting, rcHeader, rcInsufficient );
-                }
-            }
-        }
-        if ( rc != 0 )
-            free ( addr );
-    }
-
-    if ( rc == 0 )
-    {
-        size_t num_writ;
-        /* inflate the PTrie */
-        PTrie *tt;
-        rc = PTrieMakeOrig ( & tt, addr, pb -> ptt_size );
-        if ( rc == 0 )
-        {
-            uint32_t *ord2node;
-            assert ( pb -> ptt_size == PTrieSize ( tt ) );
-            assert ( self -> count >= PTrieCount ( tt ) );
-            ord2node = ( void* ) ( ( char* ) addr + pb -> ptt_size );
-            assert ( ( ( size_t ) ord2node & 3 ) == 0 );
-            
-            /* set count */
-            * ord2node ++ = self -> count;
-
-            if ( ! is_sparse )
-                rc = KTrieIndexPersistProjContig_v2 ( self, pb, tt, ord2node );
-            else
-            {
-                bitsz_t psize;
-                rc = KTrieIndexPersistProjSparse_v2 ( self, pb, tt, ord2node, & psize );
-                if ( rc == 0 )
-                {
-                    map_size -= ( size_t ) self -> count << 3;
-                    map_size += ( psize + 7 ) >> 3;
-                }
-            }
-
-            /* done with pttree */
-            PTrieWhack ( tt );
-        }
-        rc = KFileWrite ( pb -> f, file_size, 
-			  (uint8_t*)addr + num_to_read,  map_size - num_to_read, & num_writ );
-        if ( rc == 0  &&  num_writ != map_size - num_to_read )
-            rc = RC ( rcDB, rcIndex, rcPersisting, rcHeader, rcInsufficient );
-        free ( addr );
-    }
-
-    return rc;
-}
-
-#else
-
-static
-rc_t KTrieIndexPersistProj_v3 ( const KTrieIndex_v2 *self, PersistTrieData *pb )
-{
-    rc_t rc = 0;
-    void * addr;
-    size_t map_size;
-    uint64_t file_size;
-    size_t num_to_read;
-    uint64_t num_ids;
-    bool is_sparse;
-
-    /* there must be something to do */
-    if ( self -> count == 0 || self -> ord2node == NULL )
-        return 0;
-
-    /* calculate what kind of projection strategy to use:
-       when avg ( id span ) <= 2.0, just use a straight array.
-       otherwise, use two arrays: first for node ids and last
-       being 1st derivative of positional start_ids.
-
-       the calculation of the ratio would be
-         num_ids = self -> last - self -> first + 1;
-         ratio = num_ids / self -> count;
-         if ( ratio <= 2.0 )
-             use 1-1
-         else
-             use sparse
-
-       by reorganizing the comparison, we get
-         if ( num_ids <= 2 * self -> count )...
-    */
-    num_ids = self -> last - self -> first + 1;
-    if ( num_ids <= ( ( uint64_t ) self -> count << 1 ) )
-    {
-        /* store 1-1 projection index */
-        is_sparse = false;
-
-        /* map size is 4 bytes per id */
-        map_size = pb -> ptt_size + ( ( size_t ) num_ids << 2 );
-    }
-    else
-    {
-        /* store sparse projection index */
-        is_sparse = true;
-
-        /* map size for node ids is 4 bytes per slot */
-        map_size = pb -> ptt_size + ( ( size_t ) self -> count << 2 );
-
-        /* map size for 1st derivative ids is initially 8 bytes per slot
-           used initially to store full ids and then reduced 1st deriv. */
-        map_size += ( size_t ) self -> count << 3;
-    }
-
-    /* add in 4 bytes for count */
-    map_size += 4;
-
-    rc = KFileSize ( pb -> f, & file_size );
-    if ( rc == 0 )
-    {
-        /* create an updatable region spanning from end of header,
-           starting from PTrie and extending to end of projection index */
-        addr = malloc ( map_size );
-        if ( addr == NULL )
-            rc = RC ( rcDB, rcIndex, rcPersisting, rcMemory, rcExhausted );
-        else
-        {
-            size_t num_read;
-            num_to_read = file_size - sizeof ( KPTrieIndexHdr_v3 );
-            rc = KFileReadAll ( pb -> f, sizeof ( KPTrieIndexHdr_v3 ),
-                addr, num_to_read, & num_read );
-            if ( rc != 0 )
-                free ( addr );
-            else if ( num_read != num_to_read )
-            {
-                free ( addr );
-                rc = RC ( rcDB, rcIndex, rcPersisting, rcHeader, rcInsufficient );
-            }
-        }
-    }
-
-    if ( rc == 0 )
-    {
-        size_t num_writ;
-        /* inflate the PTrie */
-        PTrie *tt;
-#if KDBINDEXVERS > 3
-        rc = PTrieMake ( & tt, addr, pb -> ptt_size, self -> pt . byteswap );
-#else
-        rc = PTrieMakeOrig ( & tt, addr, pb -> ptt_size, self -> pt . byteswap );
-#endif
-        if ( rc == 0 )
-        {
-            uint32_t *ord2node;
-            assert ( pb -> ptt_size == PTrieSize ( tt ) );
-            assert ( self -> count >= PTrieCount ( tt ) );
-            ord2node = ( void* ) ( ( char* ) addr + pb -> ptt_size );
-            assert ( ( ( size_t ) ord2node & 3 ) == 0 );
-            
-            /* set count */
-            * ord2node ++ = self -> count;
-
-            if ( ! is_sparse )
-                rc = KTrieIndexPersistProjContig_v2 ( self, pb, tt, ord2node );
-            else
-            {
-                bitsz_t psize;
-                rc = KTrieIndexPersistProjSparse_v2 ( self, pb, tt, ord2node, & psize );
-                if ( rc == 0 )
-                {
-                    map_size -= ( size_t ) self -> count << 3;
-                    map_size += ( psize + 7 ) >> 3;
-                }
-            }
-
-            /* done with pttree */
-            PTrieWhack ( tt );
-
-            if ( rc == 0 )
-            {
-                rc = KFileWrite ( pb -> f, file_size, 
-                     ( uint8_t* ) addr + num_to_read,  map_size - num_to_read, & num_writ );
-
-                if ( rc == 0  &&  num_writ != map_size - num_to_read )
-                    rc = RC ( rcDB, rcIndex, rcPersisting, rcHeader, rcInsufficient );
-            }
-        }
-
-        free ( addr );
-    }
-
-    return rc;
-}
-
-#endif
-
-static
-rc_t KTrieIndexCreateMD5Wrapper ( KDirectory *dir, KFile ** fp, KMD5File ** wrapper,
-    char relpath [ 256 ], const char md5_relpath [ 260 ] )
-{
-    /* create the md5 file for read/write */
-    KFile *f;
-    rc_t rc = KDirectoryCreateFile ( dir, & f, true,
-                                      0664, kcmInit, "%s", md5_relpath );
-    if ( rc == 0 )
-    {
-        /* create an md5sum formatter */
-        KMD5SumFmt *fmt;
-        rc = KMD5SumFmtMakeUpdate ( & fmt, f );
-        if ( rc == 0 )
-        {
-            int dot_pos;
-
-            /* convert relative path to a leaf */
-            char *leaf = strrchr ( relpath, '/' );
-            if ( leaf ++ == NULL )
-                leaf = relpath;
-
-            /* trim off ".tmp" from "leaf"
-               so that the format string reflects final name
-               without the need to rename later */
-            dot_pos = strlen ( leaf ) - 4;
-            assert ( dot_pos > 0 );
-            assert ( strcmp ( & leaf [ dot_pos ], ".tmp" ) == 0 );
-            leaf [ dot_pos ] = 0;
-
-            /* "fmt" now owns "f" */
-            f = NULL;
-
-            /* create a file wrapper that calculates and prints md5 */
-            rc = KMD5FileMakeWrite ( wrapper, * fp, fmt, leaf );
-
-            /* "wrapper" attaches a reference to "fmt", so we have to
-               dump our reference regardless of "rc" */
-            KMD5SumFmtRelease ( fmt );
-
-            /* restore dot */
-            leaf [ dot_pos ] = '.';
-
-            /* if we succeeded, swap the "wrapper" for input file */
-            if ( rc == 0 )
-            {
-                * fp = KMD5FileToKFile ( * wrapper );
-                return 0;
-            }
-        }
-
-        /* failed */
-        KFileRelease ( f );
-    }
-
-    return rc;
-}
-
-rc_t KTrieIndexPersist_v2 ( const KTrieIndex_v2 *self,
-    bool proj, KDirectory *dir, const char *path, bool use_md5 )
-{
-    rc_t rc;
-    PersistTrieData pb;
-
-    assert ( self != NULL );
-    if ( self -> count == 0 )
-        return 0;
-
-    pb . fmd5 = NULL;
-
-    /** Trie may have holes in serialization due to memory alignments ***/
-    pb . buffer = calloc ( pb . bsize = 32 * 1024, 1 );
-    if ( pb . buffer == NULL )
-        rc = RC ( rcDB, rcIndex, rcPersisting, rcMemory, rcExhausted );
-    else
-    {
-        /* determine the name of the file:
-           it is created under a temporary name
-           relative to the directory provided */
-        char tmpname [ 256 ];
-        rc = KDirectoryResolvePath ( dir, false,
-            tmpname, sizeof tmpname, "%s.tmp", path );
-        if ( rc == 0 )
-        {
-            /* create the name of temporary md5 file */
-            char tmpmd5name [ 260 ];
-            sprintf ( tmpmd5name, "%s.md5", tmpname );
-
-            /* create the output file under temporary name
-               ? why does it need read/write capabilities? */
-            rc = KDirectoryCreateFile ( dir, & pb . f,
-                                         true, 0664, kcmInit, "%s", tmpname );
-            if ( rc == 0 )
-            {
-                /* if using md5, wrap output file */
-                if ( use_md5 )
-                    rc = KTrieIndexCreateMD5Wrapper ( dir, & pb . f, & pb . fmd5, tmpname, tmpmd5name );
-                if ( rc == 0 )
-                {
-                    /* initial size */
-                    pb . ptt_size = 0;
-#if KDBINDEXVERS == 2
-                    KTrieIndexPersistHdr_v2 ( ( KTrieIndex_v2* ) self, & pb );
-#else
-                    KTrieIndexPersistHdr_v3_v4 ( ( KTrieIndex_v2* ) self, & pb );
-#endif
-
-                    /* persist tree */
-                    rc = KTrieIndexPersistTrie_v2 ( self, & pb );
-                    if ( rc == 0 )
-                    {
-                        /* persist projection table */
-                        if ( proj )
-                        {
-#if KDBINDEXVERS == 2
-                            rc = KTrieIndexPersistProj_v2 ( self, & pb );
-#else
-                            rc = KTrieIndexPersistProj_v3 ( self, & pb );
-#endif
-                        }
-                    }
-                }
-                    
-                /* close down the file now, success or not */
-                KFileRelease ( pb . f );
-                pb . f = NULL;
-
-                /* douse buffer and mark NULL in case of later attempt */
-                free ( pb . buffer );
-                pb . buffer = NULL;
-
-                /* rename the files on success */
-                if ( rc == 0 )
-                {
-                    /* works even if "path" is absolute */
-                    rc = KDirectoryRename ( dir, false, tmpname, path );                        
-                    if ( rc == 0 )
-                    {
-                        int tmplen;
-
-                        /* done if this was the only file to rename */
-                        if ( ! use_md5 )
-                            return 0;
-
-                        /* use "tmpname" as a real "md5" name */
-                        tmplen = strlen ( tmpname );
-                        assert ( strcmp ( & tmpname [ tmplen - 4 ], ".tmp" ) == 0 );
-                        strcpy ( & tmpname [ tmplen - 3 ], "md5" );
-
-                        /* rename md5 file and be done on success */
-                        rc = KDirectoryRename ( dir, false, tmpmd5name, tmpname );
-                        if ( rc == 0 )
-                            return 0;
-
-                        /* failure here means we have a good index file,
-                           but a bad md5 file, so convert "tmpname" to the
-                           actual name of the index file */
-                        tmpname [ tmplen - 4 ] = 0;
-                    }
-                }
-
-                /* failed, remove the output files here */
-                KDirectoryRemove ( dir, false, "%s", tmpname );
-                if ( use_md5 )
-                    KDirectoryRemove ( dir, false, "%s", tmpmd5name );
-            }
-        }
-
-        /* douse buffer */
-        free ( pb . buffer );
-    }
-    
-    return rc;
-}
-
-
-/* whack whack */
-void KTrieIndexWhack_v2 ( KTrieIndex_v2 *self )
-{
-    KPTrieIndexWhack_v2 ( & self -> pt );
-    TrieWhack ( & self -> key2id, KTrieIdxNodeWhack_v2, NULL );
-    free ( self -> ord2node );
-}
-
-/* initialize an index from file - can be NULL */
-rc_t KTrieIndexOpen_v2 ( KTrieIndex_v2 *self, const KMMap *mm, bool byteswap )
-{
-    rc_t rc;
-    bool ptorig = false;
-    const KDBHdr *hdr = NULL;
-
-#if ! KTRIE_ZEROS_KPTRIE
-#error "KTrie is supposed to zero KPTrie"
-#endif
-    memset ( self, 0, sizeof * self );
-    self -> pt . byteswap = byteswap;
-
-    /* create an empty Trie index,
-       with numeric but auto-expand character set,
-       and a bucket size of 512, beyond which the
-       tree will branch.
-    */
-    rc = TrieInit ( & self -> key2id, "0-9", 512, true );
-    if ( rc != 0 )
-        return rc;
-
-    /* when opened for create, there will be no existing index */
-    if ( mm == NULL )
-        return 0;
-
-    rc = KMMapAddrRead ( mm, (const void**) & hdr );
-    if ( rc != 0 )
-        return rc;
-
-    switch ( hdr -> version )
-    {
-    case 1:
-        rc = KPTrieIndexInitFromV1_v2 ( & self -> pt, mm, byteswap );
-        break;
-    case 2:
-        rc = KPTrieIndexInit_v2 ( & self -> pt, mm, byteswap );
-        break;
-    case 3:
-        ptorig = true;
-    case 4:
-        rc = KPTrieIndexInit_v3_v4 ( & self -> pt, mm, byteswap, ptorig );
-        break;
-    default:
-        rc = RC(rcDB, rcIndex, rcConstructing, rcIndex, rcBadVersion);
-    }
-    /* open the prior index in persisted mode, but
-       don't load it into the core-based Trie */
-    if ( rc == 0 )
-    {
-        /* the file existed but was empty */
-        if ( self -> pt . key2id == NULL )
-        {
-            self -> pt . mm = NULL;
-            return 0;
-        }
-
-        /* retain a reference to memory map */
-        rc = KMMapAddRef ( mm );
-        if ( rc == 0 )
-        {
-            self -> pt . mm = mm;
-            return 0;
-        }
-
-        /* self -> pt gets whacked below */
-    }
-
-    KTrieIndexWhack_v2 ( self );
-    return rc;
-}
-
-/* KTrieIndexPopulate_v2
- */
-typedef struct KTrieIndexPopulateData_v2_s2 KTrieIndexPopulateData_v2_s2;
-struct KTrieIndexPopulateData_v2_s2
-{
-    int64_t first;
-
-    KTrieIndex_v2 *self;
-    uint32_t count;
-    rc_t rc;
-
-    uint8_t id_bits;
-    uint8_t span_bits;
-};
-
-static
-bool CC KTrieIndexPopulate_v2_s2 ( PTNode *n, void *data )
-{
-    const String *key;
-    KTrieIndexPopulateData_v2_s2 *pb = data;
-
-    int64_t id;
-    size_t usize;
-    uint32_t span;
-
-    /* capture node data */
-    assert ( n -> data . size == sizeof id );
-    pb -> rc = Unpack ( pb -> id_bits, sizeof id * 8,
-        n -> data . addr, 0, pb -> id_bits, NULL, & id, sizeof id, & usize );
-    if ( pb -> rc == 0 )
-    {
-        pb -> rc = Unpack ( pb -> span_bits, sizeof span * 8,
-            n -> data . addr, pb -> id_bits, pb -> span_bits, NULL, & span, sizeof span, & usize );
-    }
-    if ( pb -> rc != 0 )
-        return true;
-
-    pb -> rc = PTNodeMakeKey ( n, & key );
-    if ( pb -> rc == 0 )
-    {
-        KTrieIdxNode_v2_s2 *node;
-        pb -> rc = KTrieIdxNodeMake_v2_s2 ( & node, key, id + pb -> first );
-        StringWhack ( ( String* ) key );
-        if ( pb -> rc == 0 )
-        {
-            node -> span = span;
-
-            pb -> rc = TrieInsert ( & pb -> self -> key2id, & node -> n );
-            if ( pb -> rc == 0 )
-            {
-                ++ pb -> count;
-                return false;
-            }
-
-            KTrieIdxNodeWhack_v2 ( & node -> n, NULL );
-        }
-    }
-
-    return true;
-}
-
-/* KTrieIndexAttach_v2
- *  attach a keymap to an existing table
- */
-static
-rc_t KTrieIndexPopulate_v2_s1 ( KTrieIndex_v2 *self, uint32_t i, int64_t idd )
-{
-    rc_t rc;
-    uint32_t nid = self -> pt . ord2node [ i ];
-
-    if ( i != 0 && self -> pt . ord2node [ i - 1 ] == nid )
-        return 0;
-
-    i = self -> count;
-
-    if ( nid == 0 )
-    {
-        rc = KTrieIdxNodeMakeHole_v2_s1 ( & self -> ord2node [ i ], self -> pt . first + idd );
-        if ( rc == 0 )
-            self -> count = i + 1;
-    }
-    else
-    {
-        PTNode pnode;
-        rc = PTrieGetNode ( self -> pt . key2id, & pnode, nid );
-        if ( rc == 0 )
-        {
-            const String *key;
-            rc = PTNodeMakeKey ( & pnode, & key );
-            if ( rc == 0 )
-            {
-                rc = KTrieIdxNodeMake_v2_s1 ( & self -> ord2node [ i ],
-                    key, self -> pt . first + idd );
-                StringWhack ( ( String* ) key );
-                if ( rc == 0 )
-                {
-                    rc = TrieInsert ( & self -> key2id, & self -> ord2node [ i ] -> n );
-                    if ( rc != 0 )
-                        KTrieIdxNodeWhack_v2 ( & self -> ord2node [ i ] -> n, NULL );
-                    else
-                        self -> count = i + 1;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-rc_t KTrieIndexAttach_v2 ( KTrieIndex_v2 *self, bool proj )
-{
-    rc_t rc = 0;
-
-    /* if persisted index is empty, bail */
-    if ( self -> count != 0 || self -> pt . count == 0 )
-        return 0;
-
-    /* see if we can use existing projection index */
-    if ( proj && self -> pt . ord2node != NULL )
-    {
-        uint32_t i;
-
-        self -> ord2node =
-            malloc ( ( ( self -> pt . count + 4095 ) & ~ 4095 ) * sizeof self -> ord2node [ 0 ] );
-        if ( self -> ord2node == NULL )
-            return RC ( rcDB, rcIndex, rcUpdating, rcMemory, rcExhausted );
-
-        /* we were called because our count is 0 */
-        assert ( self -> count == 0 );
-
-        /* handle variant */
-        assert ( self -> pt . variant == 0 || self -> pt . id2ord . v8 != NULL );
-        switch ( self -> pt . variant )
-        {
-        case 0:  /* 1-1 id to name */
-            for ( rc = 0, i = 0; i < self -> pt . count && rc == 0; ++ i )
-                rc = KTrieIndexPopulate_v2_s1 ( self, i, i );
-            break;
-        case 1:  /* sparse 8-bit   */
-            for ( rc = 0, i = 0; i < self -> pt . count && rc == 0; ++ i )
-                rc = KTrieIndexPopulate_v2_s1 ( self, i, self -> pt . id2ord . v8 [ i ] );
-            break;
-        case 2:  /* sparse 16-bit  */
-            for ( rc = 0, i = 0; i < self -> pt . count && rc == 0; ++ i )
-                rc = KTrieIndexPopulate_v2_s1 ( self, i, self -> pt . id2ord . v16 [ i ] );
-            break;
-        case 3:  /* sparse 32-bit  */
-            for ( rc = 0, i = 0; i < self -> pt . count && rc == 0; ++ i )
-                rc = KTrieIndexPopulate_v2_s1 ( self, i, self -> pt . id2ord . v32 [ i ] );
-            break;
-        case 4:  /* sparse 64-bit  */
-            for ( rc = 0, i = 0; i < self -> pt . count && rc == 0; ++ i )
-                rc = KTrieIndexPopulate_v2_s1 ( self, i, self -> pt . id2ord . v64 [ i ] );
-            break;
-        }
-
-        if ( rc != 0 )
-        {
-            for ( i = self -> count; i > 0; )
-                KTrieIdxNodeWhack_v2 ( & self -> ord2node [ -- i ] -> n, NULL );
-            free ( self -> ord2node ), self -> ord2node = NULL;
-            return rc;
-        }
-    }
-    else
-    {
-        KTrieIndexPopulateData_v2_s2 pb;
-        pb . first = self -> pt . first;
-        pb . self = self;
-        pb . count = 0;
-        pb . rc = 0;
-        PTrieDoUntil ( self -> pt . key2id, KTrieIndexPopulate_v2_s2, & pb );
-        if ( pb . rc == 0 && pb . count != self -> pt . count )
-            return RC ( rcDB, rcIndex, rcUpdating, rcIndex, rcCorrupt );
-        self -> count = pb . count;
-    }
-
-    /* record known dimensions */
-    self -> first = self -> pt . first;
-    self -> last = self -> pt . last;
-
-    /* should be able to drop persisted copy now */
-    KPTrieIndexWhack_v2 ( & self -> pt );
-
-    return 0;
-}
-
-rc_t KTrieIndexInsert_v2 ( KTrieIndex_v2 *self,
-    bool proj, const char *str, int64_t id )
-{
-    rc_t rc;
-    String key;
-    void *ord2node;
-    uint32_t count;
-
-#if DISABLE_PROJ
-    proj = false;
-#endif
-
-    /* get the number of nodes in proj index or Trie.
-       the persisted tree is only loaded into the in-core
-       tree for edits ( insert/delete ), so the counts
-       may differ. also, when in projection mode, the
-       count refers to the number of array slots, which
-       can be > the number of Trie nodes if there are
-       holes in the id space. when not projecting, count
-       is exactly the number of nodes in the Trie.
-    */
-    count = self -> count;
-
-    /* detect first modification */
-    if ( self -> count == 0 )
-    {
-        /* detect persisted data */
-        if ( self -> pt . key2id != NULL )
-        {
-            /* load persisted data into core */
-            rc = KTrieIndexAttach_v2 ( self, proj );
-            if ( rc != 0 )
-                return rc;
-
-            /* should have loaded everything */
-            assert ( self -> count != 0 );
-            count = self -> count;
-        }
-    }
-
-    /* v2 only allows increasing ids
-       they don't have to be contiguous,
-       but they cannot repeat and cannot decrease */
-    else if ( id <= self -> last )
-        return RC ( rcDB, rcIndex, rcInserting, rcConstraint, rcViolated );
-
-    /* convert key to String */
-    StringInitCString ( & key, str );
-
-    /* insertion strategy depends upon projection index */
-    if ( proj )
-    {
-        KTrieIdxNode_v2_s1 *node;
-
-        /* check for extension of last node */
-        if ( count != 0 )
-        {
-            /* a non-zero count implies nodes in projection array */
-            assert ( self -> ord2node != NULL );
-
-            /* get last node */
-            node = self -> ord2node [ count - 1 ];
-            assert ( node != NULL );
-
-            /* if the keys match, this is an update to the node */
-            if ( StringEqual ( & key, & node -> n . key ) )
-            {
-                /* this must be an extension of range */
-                if ( id != self -> last + 1 )
-                    return RC ( rcDB, rcIndex, rcInserting, rcConstraint, rcViolated );
-
-                /* extend and done */
-                self -> last = id;
-                return 0;
-            }
-
-            /* not last node - create a hole if needed */
-            if ( id != self -> last + 1 )
-            {
-                /* extend array if needed
-                   should never have to handle initial insert,
-                   but would be happy to do so if asked */
-                if ( ( count & 4095 ) == 0 )
-                {
-                    ord2node = realloc ( self -> ord2node,
-                        ( count + 4096 ) * sizeof self -> ord2node [ 0 ] );
-                    if ( ord2node == NULL )
-                        return RC ( rcDB, rcIndex, rcInserting, rcMemory, rcExhausted );
-                    self -> ord2node = ord2node;
-                }
-
-                /* create NULL mapping */
-                rc = KTrieIdxNodeMakeHole_v2_s1 ( & node, self -> last + 1 );
-                if ( rc != 0 )
-                    return rc;
-
-                /* NB - this will cause count to be > num_nodes in Trie */
-                self -> ord2node [ count ++ ] = node;
-            }
-        }
-
-        /* make a new mapping starting with id */
-        rc = KTrieIdxNodeMake_v2_s1 ( & node, & key, id );
-        if ( rc == 0 )
-        {
-            /* attempt insertion */
-            rc = TrieInsertUnique ( & self -> key2id, & node -> n, NULL );
-            if ( rc == 0 )
-            {
-                /* create or extend projection array */
-                if ( ( count & 4095 ) == 0 )
-                {
-                    ord2node = realloc ( self -> ord2node,
-                        ( count + 4096 ) * sizeof self -> ord2node [ 0 ] );
-                    if ( ord2node == NULL )
-                        rc = RC ( rcDB, rcIndex, rcInserting, rcMemory, rcExhausted );
-                    else
-                        self -> ord2node = ord2node;
-                }
-
-                if ( rc == 0 )
-                {
-                    /* set/extend range, detecting first insertion */
-                    self -> last = id;
-                    if ( count == 0 )
-                        self -> first = id;
-
-                    /* project */
-                    self -> ord2node [ count ] = node;
-                    self -> count = count + 1;
-
-                    /* insertion complete */
-                    return 0;
-                }
-
-                /* remove failed insertion */
-                TrieUnlink ( & self -> key2id, & node -> n );
-            }
-
-            /* clean up new node */
-            KTrieIdxNodeWhack_v2 ( & node -> n, NULL );
-        }
-
-        /* clean up insertion of hole */
-        if ( count != self -> count )
-        {
-            assert ( count - 1 == self -> count );
-            KTrieIdxNodeWhack_v2 ( & self -> ord2node [ count - 1 ] -> n, NULL );
-        }
-    }
-    else
-    {
-        KTrieIdxNode_v2_s2 *node;
-
-        /* make a new mapping starting with id and a span of 1 */
-        rc = KTrieIdxNodeMake_v2_s2 ( & node, & key, id );
-        if ( rc == 0 )
-        {
-            /* attempt insertion */
-            KTrieIdxNode_v2_s2 *exist;
-            rc = TrieInsertUnique ( & self -> key2id, & node -> n, ( TNode** ) & exist );
-            if ( rc == 0 )
-            {
-                /* set/extend range, detecting first insertion */
-                if ( count == 0 )
-                {
-                    self -> max_span = 1;
-                    self -> first = id;
-                }
-                self -> last = id;
-
-                /* insertion complete */
-                self -> count = count + 1;
-                return 0;
-            }
-
-            /* clean up new node */
-            KTrieIdxNodeWhack_v2 ( & node -> n, NULL );
-
-            /* check existing for proper extension */
-            if ( exist != NULL )
-            {
-                if ( id == exist -> start_id + exist -> span )
-                {
-                    assert ( count != 0 );
-
-                    /* we already know id > last
-                       and that it boarders the range of "exist"
-                       so it must be last + 1 */
-                    assert ( id - 1 == self -> last );
-                    self -> last = id;
-
-                    /* extend the span of "exist" */
-                    ++ exist -> span;
-                    if ( exist -> span > self -> max_span )
-                        self -> max_span = exist -> span;
-
-                    return 0;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* drop string from trie and all mappings */
-rc_t KTrieIndexDelete_v2 ( KTrieIndex_v2 *self, bool proj, const char *str )
-{
-    rc_t rc;
-    String key;
-    TNode *tnode;
-    /* uint32_t count; */
-
-#if DISABLE_PROJ
-    proj = false;
-#endif
-
-    /* detect first modification */
-    /* count = self -> count; */
-    if ( self -> count != 0 )
-    {
-        /* detect persisted data */
-        if ( self -> pt . key2id != NULL )
-        {
-            rc = KTrieIndexAttach_v2 ( self, proj );
-            if ( rc != 0 )
-                return rc;
-        }
-    }
-
-    StringInitCString ( & key, str );
-
-    /* interface states that all objects are dropped.
-       however, this implementation only allows unique
-       mappings to a contig range, so a simple find is sufficient */
-    tnode = TrieFind ( & self -> key2id, & key );
-    if ( tnode == NULL )
-        return RC ( rcDB, rcIndex, rcRemoving, rcString, rcNotFound );
-
-    /* remove from trie */
-    TrieUnlink ( & self -> key2id, tnode );
-
-    /* neutralize node in projection index */
-    if ( proj )
-    {
-        KTrieIdxNode_v2_s1 *node = ( KTrieIdxNode_v2_s1* ) tnode;
-        uint32_t ord = KTrieIndexNode2Ord_v2 ( self, node );
-        if ( ord != 0 )
-        {
-            self -> ord2node [ ord - 1 ] -> n . key . size = 0;
-            self -> ord2node [ ord - 1 ] -> n . key . len = 0;
-            self -> ord2node [ ord - 1 ] -> key [ 0 ] = 0;
-            return 0;
-        }
-    }
-
-    /* whack node */
-    KTrieIdxNodeWhack_v2 ( tnode, NULL );
-
-    return 0;
-}
-
-/* map key to id range */
-rc_t KTrieIndexFind_v2 ( const KTrieIndex_v2 *self,
-    const char *str, int64_t *start_id,
-#if V2FIND_RETURNS_SPAN
-    uint32_t *span,
-#endif
-    int ( CC * custom_cmp ) ( const void *item, const PBSTNode *n, void *data ), void *data, bool convertFromV1 )
-{
-    /* search within in-core index */
-    if ( self -> count != 0 )
-    {
-        const TNode *tnode;
-
-        String key;
-        StringInitCString ( & key, str );
-
-        tnode = TrieFind ( & self -> key2id, & key );
-        if ( tnode != NULL )
-        {
-            if ( self -> ord2node != NULL )
-            {
-                const KTrieIdxNode_v2_s1 *node = ( const KTrieIdxNode_v2_s1* ) tnode;
-                uint32_t ord = KTrieIndexNode2Ord_v2 ( self, node );
-                if ( ord == 0 )
-                    return RC ( rcDB, rcIndex, rcSelecting, rcIndex, rcCorrupt );
-
-                * start_id = node -> start_id;
-#if V2FIND_RETURNS_SPAN
-                if ( ord == self -> count )
-                    * span = ( uint32_t ) ( self -> last - node -> start_id + 1 );
-                else
-                    * span = ( uint32_t ) ( self -> ord2node [ ord ] -> start_id - node -> start_id );
-#endif
-            }
-            else
-            {
-                const KTrieIdxNode_v2_s2 *node = ( const KTrieIdxNode_v2_s2* ) tnode;
-                * start_id = node -> start_id;
-#if V2FIND_RETURNS_SPAN
-                * span = node -> span;
-#endif
-            }
-
-            return 0;
-        }
-    }
-
-    /* search within persisted index */
-    else if ( self -> pt . key2id != NULL )
-    {
-        return KPTrieIndexFind_v2 ( & self -> pt, str, start_id,
-#if V2FIND_RETURNS_SPAN
-                                    span,
-#endif
-                                    custom_cmp, data, convertFromV1 );
-    }
-
-    return RC ( rcDB, rcIndex, rcSelecting, rcString, rcNotFound );
-}
-
-/* projection index id to key-string */
-typedef struct KTrieIndexProjectData_v2 KTrieIndexProjectData_v2;
-struct KTrieIndexProjectData_v2
-{
-    int64_t id;
-    const KTrieIdxNode_v2_s2 *node;
-};
-
-static
-bool CC KTrieIndexProjectScan_v2 ( TNode *n, void *data )
-{
-    KTrieIndexProjectData_v2 *pb = (KTrieIndexProjectData_v2 *)data;
-    const KTrieIdxNode_v2_s2 *node = ( const KTrieIdxNode_v2_s2* ) n;
-
-    if ( pb -> id >= node -> start_id &&
-         pb -> id < node -> start_id + node -> span )
-    {
-        pb -> node = node;
-        return true;
-    }
-
-    return false;
-}
-
-rc_t KTrieIndexProject_v2 ( const KTrieIndex_v2 *self,
-    int64_t id,
-#if V2FIND_RETURNS_SPAN
-     int64_t *start_id, uint32_t *span,
-#endif
-    char *key_buff, size_t buff_size, size_t *actsize )
-{
-    if ( self -> count != 0 )
-    {
-        if ( self -> ord2node != NULL )
-        {
-            uint32_t ord = KTrieIndexID2Ord_v2 ( self, id );
-            if ( ord != 0 )
-            {
-                const KTrieIdxNode_v2_s1 *node = self -> ord2node [ ord - 1 ];
-                
-                if (actsize)
-                    *actsize = node -> n . key . size;
-                if ( node -> n . key . size >= buff_size )
-                    return RC ( rcDB, rcIndex, rcProjecting, rcBuffer, rcInsufficient );
-                string_copy ( key_buff, buff_size,
-                    node -> n . key . addr, node -> n . key . size );
-                * start_id = node -> start_id;
-                * span = ( ( ord == self -> count ) ?
-                    ( self -> last + 1 ) : ( self -> ord2node [ ord ] -> start_id ) ) - node -> start_id;
-                return 0;
-            }
-        }
-        else
-        {
-            KTrieIndexProjectData_v2 pb;
-            pb . id = id;
-            if ( TrieDoUntil ( & self -> key2id, KTrieIndexProjectScan_v2, & pb ) )
-            {
-                const KTrieIdxNode_v2_s2 *node = pb . node;
-                
-                if (actsize)
-                    *actsize = node -> n . key . size;
-                if ( node -> n . key . size >= buff_size )
-                    return RC ( rcDB, rcIndex, rcProjecting, rcBuffer, rcInsufficient );
-                string_copy ( key_buff, buff_size,
-                    node -> n . key . addr, node -> n . key . size );
-                * start_id = node -> start_id;
-                * span = node -> span;
-                return 0;
-            }
-        }
-    }
-
-    else if ( self -> pt . ord2node != NULL )
-    {
-        return KPTrieIndexProject_v2 ( & self -> pt, id,
-#if V2FIND_RETURNS_SPAN
-            start_id, span,
-#endif
-            key_buff, buff_size, actsize );
-    }
-
-    return RC ( rcDB, rcIndex, rcProjecting, rcId, rcNotFound );
-}
diff --git a/libs/kdb/wu64idx-v3.c b/libs/kdb/wu64idx-v3.c
deleted file mode 100644
index e218600..0000000
--- a/libs/kdb/wu64idx-v3.c
+++ /dev/null
@@ -1,416 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kdb/extern.h>
-
-#include "windex-priv.h"
-
-#include <kdb/index.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/md5.h>
-#include <kfs/mmap.h>
-#include <klib/pbstree.h>
-#include <klib/rc.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-typedef struct KU64Index_PNode_struct {
-    uint64_t key;
-    uint64_t key_size;
-    int64_t id;
-    uint64_t id_qty;
-} KU64Index_PNode;
-
-typedef struct KU64Index_Node_struct {
-    BSTNode node;
-    uint64_t key;
-    uint64_t key_size;
-    int64_t id;
-    uint64_t id_qty;
-} KU64Index_Node;
-
-static
-int64_t CC KU64Index_NodeSort( const BSTNode *item, const BSTNode *node )
-{
-    const KU64Index_Node* i = (const KU64Index_Node*)item;
-    const KU64Index_Node* n = (const KU64Index_Node*)node;
-
-    if( i->key < n->key ) {
-        return -1;
-    } else if( i->key > n->key ) {
-        return 1;
-    }
-    return 0;
-}
-
-static
-int64_t CC KU64Index_NodeSortUnique( const BSTNode *item, const BSTNode *node )
-{
-    const KU64Index_Node* i = (const KU64Index_Node*)item;
-    const KU64Index_Node* n = (const KU64Index_Node*)node;
-
-    if( (i->key + i->key_size - 1) < n->key ) {
-        return -1;
-    } else if( i->key > (n->key + n->key_size - 1) ) {
-        return 1;
-    }
-    return 0;
-}
-
-static
-bool CC KU64Index_UnrollPersisted( PBSTNode *n, void *data )
-{
-    KU64Index_v3* self = data;
-    const KU64Index_PNode* pn = n->data.addr;
-
-    KU64Index_Node* node = calloc(1, sizeof(KU64Index_Node));
-    if( node == NULL ) {
-        self->rc = RC(rcExe, rcNode, rcConstructing, rcMemory, rcInsufficient);
-    } else {
-        node->key = pn->key;
-        node->key_size = pn->key_size;
-        node->id = pn->id;
-        node->id_qty = pn->id_qty;
-        self->rc = BSTreeInsert(&self->tree, &node->node, KU64Index_NodeSort);
-    }
-    if( self->rc != 0 ) {
-        free(node);
-    }
-    return self->rc == 0 ? false : true;
-}
-
-rc_t KU64IndexOpen_v3(KU64Index_v3* self, struct KMMap const *mm, bool byteswap)
-{
-    rc_t rc = 0;
-    const char* maddr;
-    size_t msize;
-    PBSTree* ptree = NULL;
-
-    self->rc = 0;
-    BSTreeInit(&self->tree);
-
-    /* when opened for create, there will be no existing index */
-    if( mm == NULL ) {
-        return 0;
-    }
-
-    /* open the prior index in persisted mode */
-    rc = KMMapAddrRead(mm, (const void**)&maddr);
-    if( rc != 0 ) {
-        return rc;
-    }
-    rc = KMMapSize(mm, &msize);
-    if( rc != 0 ) {
-        return rc;
-    }
-    if( msize <= sizeof(struct KIndexFileHeader_v3) ) {
-        return 0;
-    }
-
-    rc = PBSTreeMake(&ptree, (const void**)(maddr + sizeof(struct KIndexFileHeader_v3)),
-                     msize - sizeof(struct KIndexFileHeader_v3), byteswap);
-    if( rc != 0 ) {
-        return rc;
-    }
-
-    PBSTreeDoUntil(ptree, false, KU64Index_UnrollPersisted, self);
-    rc = self->rc;
-
-    PBSTreeWhack(ptree);
-
-    if( rc != 0 ) {
-        KU64IndexWhack_v3(self);
-    }
-    return rc;
-}
-
-static
-void CC KU64Index_WhackBSTree( BSTNode *n, void *data )
-{
-    free((KU64Index_Node*)n);
-}
-
-rc_t KU64IndexWhack_v3(KU64Index_v3* self)
-{
-    self->rc = 0;
-    BSTreeWhack(&self->tree, KU64Index_WhackBSTree, NULL);
-    return 0;
-}
-
-rc_t KU64IndexInsert_v3(KU64Index_v3* self, bool unique, uint64_t key, uint64_t key_size, int64_t id, uint64_t id_qty)
-{
-    KU64Index_Node* node = calloc(1, sizeof(KU64Index_Node));
-    self->rc = 0;
-
-    if( node == NULL ) {
-        self->rc = RC(rcExe, rcNode, rcConstructing, rcMemory, rcInsufficient);
-    } else {
-        node->key = key;
-        node->key_size = key_size;
-        node->id = id;
-        node->id_qty = id_qty;
-        if( unique ) {
-            self->rc = BSTreeInsertUnique(&self->tree, &node->node, NULL, KU64Index_NodeSortUnique);
-        } else {
-            self->rc = BSTreeInsert(&self->tree, &node->node, KU64Index_NodeSort);
-        }
-    }
-    if( self->rc != 0 ) {
-        free(node);
-    }
-    return self->rc;
-}
-
-static
-int64_t CC KU64Index_Cmp4Delete( const void *item, const BSTNode *node )
-{
-    const KU64Index_Node* i = (const KU64Index_Node*)item;
-    const KU64Index_Node* n = (const KU64Index_Node*)node;
-
-    if( i->key < n->key ) {
-        return -1;
-    } else if( i->key > n->key ) {
-        return 1;
-    }
-    return 0;
-}
-
-rc_t KU64IndexDelete_v3(KU64Index_v3* self, uint64_t key)
-{
-    KU64Index_Node node;
-    BSTNode* n = NULL;
-
-    self->rc = 0;
-    node.key = key;
-    n = BSTreeFind(&self->tree, &node, KU64Index_Cmp4Delete);
-    if( n != NULL ) {
-        if( !BSTreeUnlink(&self->tree, n) ) {
-            self->rc = RC(rcDB, rcIndex, rcDestroying, rcId, rcCorrupt);
-        }
-    } else {
-        self->rc = RC(rcDB, rcIndex, rcDestroying, rcId, rcNotFound);
-    }
-    return self->rc;
-}
-
-typedef struct KU64Index_PersistData_struct
-{
-    uint64_t pos;
-    KFile *file;
-    KMD5File *file_md5;
-} KU64Index_PersistData;
-
-static
-rc_t CC KU64Index_WriteFunc( void *param, const void *buffer, size_t size, size_t *num_writ )
-{
-    KU64Index_PersistData* pd = param;
-    rc_t rc = KFileWrite(pd->file, pd->pos, buffer, size, num_writ);
-    pd->pos += *num_writ;
-    return rc;
-}
-
-static
-rc_t CC KU64Index_AuxFunc(void *param, const void *node, size_t *num_writ, PTWriteFunc write, void *write_param )
-{
-    rc_t rc = 0;
-    const KU64Index_Node* n = (const KU64Index_Node*)node;
-    int sz = sizeof(KU64Index_Node) - sizeof(BSTNode);
-
-    if( write != NULL ) {
-        rc = (*write)(write_param, &n->key, sz, num_writ);
-    } else {
-        *num_writ = sz;
-    }
-    return rc;
-}
-
-rc_t KU64IndexPersist_v3(KU64Index_v3* self, bool proj, KDirectory *dir, const char *path, bool use_md5)
-{
-    KU64Index_PersistData pd;
-    char tmpname[256];
-    char tmpmd5name[256];
-    char md5path[256];
-
-    self->rc = 0;
-    memset(&pd, 0, sizeof(KU64Index_PersistData));
-
-    self->rc = KDirectoryResolvePath(dir, false, tmpname, sizeof(tmpname), "%s.tmp", path);
-
-    if( self->rc == 0 ) {
-        self->rc = KDirectoryCreateFile(dir, &pd.file, true, 0664, kcmInit, "%s", tmpname);
-
-        if(use_md5 && self->rc == 0 ) {
-
-            KMD5SumFmt *km = NULL;
-            size_t tmplen = snprintf(tmpmd5name, sizeof(tmpmd5name), "%s.md5", tmpname);
-            KFile* kf = NULL;
-
-            if( tmplen >= sizeof(tmpmd5name) ) {
-                self->rc = RC(rcDB, rcIndex, rcPersisting, rcName, rcExcessive);
-            } else {
-
-                tmplen = snprintf(md5path, sizeof(md5path), "%s.md5", path);
-                if( tmplen >= sizeof(md5path) ) {
-                    self->rc = RC(rcDB, rcIndex, rcPersisting, rcName, rcExcessive);
-                } else {
-
-                    self->rc = KDirectoryCreateFile(dir, &kf, true, 0664, kcmInit, "%s", tmpmd5name);
-                    if( self->rc == 0 ) {
-                        self->rc = KMD5SumFmtMakeUpdate(&km, kf);
-                        if( self->rc == 0 ) {
-                            KMD5File * k5f;
-                            kf = NULL;
-                            self->rc = KMD5FileMakeWrite(&k5f, pd.file, km, path);
-                            if( self->rc == 0 ) {
-                                pd.file_md5 = k5f;
-                                pd.file = KMD5FileToKFile(k5f);
-                            }
-                            /* release pass or fail */
-                            KMD5SumFmtRelease(km);
-                        } else {
-                            KFileRelease ( kf );
-                        }
-                    } else {
-                        KFileRelease ( kf );
-                    }
-                }
-            }
-            if( self->rc != 0 ) {
-                KFileRelease(pd.file);
-            }
-        }
-
-        if( self->rc == 0 ) {
-            struct KIndexFileHeader_v3 head;
-            size_t writ = 0;
-
-            KDBHdrInit(&head.h, 3);
-            head.index_type = kitU64;
-            self->rc = KFileWrite(pd.file, pd.pos, &head, sizeof(struct KIndexFileHeader_v3), &writ);
-            if( self->rc == 0 ) {
-                pd.pos += writ;
-                if( use_md5 ) {
-                    KMD5FileBeginTransaction(pd.file_md5);
-                }
-                self->rc = BSTreePersist(&self->tree, NULL, KU64Index_WriteFunc, &pd, KU64Index_AuxFunc, &pd);
-            }
-            KFileRelease(pd.file);
-            pd.file = NULL;
-        }
-    }
-
-    if( self->rc == 0 ) {
-        self->rc = KDirectoryRename(dir, false, tmpname, path);
-        if( self->rc == 0 ) {
-            if ( use_md5 ) {
-                self->rc = KDirectoryRename(dir, false, tmpmd5name, md5path);
-            }
-            if( self->rc == 0 ) {
-                /* done */
-                return 0;
-            }
-        }
-    }
-
-    /* whack temporary file */
-    KDirectoryRemove(dir, false, "%s", tmpname);
-    if( use_md5 ) {
-        KDirectoryRemove(dir, false, "%s", tmpmd5name);
-    }
-    return self->rc;
-}
-
-typedef struct KU64Index_GrepData_struct {
-    rc_t rc;
-    rc_t (CC*func)(uint64_t key, uint64_t key_size, int64_t id, uint64_t id_qty, void* data);
-    void* data;
-    KU64Index_Node search;
-    uint64_t* key;
-    uint64_t* key_size;
-    int64_t* id;
-    uint64_t* id_qty;
-} KU64Index_GrepData;
-
-/*
- * return true: if found or break DoUntil for FindAll
- */
-static
-bool CC KU64Index_Grep(BSTNode *node, void *data)
-{
-    KU64Index_Node* n = (KU64Index_Node*)node;
-    KU64Index_GrepData* d = data;
-
-    if( d->search.key >= n->key && (d->search.key - n->key) < n->key_size ) {
-        if( d->func ) {
-            d->rc = (*d->func)(n->key, n->key_size, n->id, n->id_qty, d->data);
-            if( d->rc != 0 ) {
-                return true;
-            }
-        } else {
-            *d->key = n->key;
-            *d->key_size = n->key_size;
-            *d->id = n->id;
-            *d->id_qty = n->id_qty;
-            return true;
-        }
-    }
-    return false;
-}
-
-rc_t KU64IndexFind_v3( const KU64Index_v3* self, uint64_t offset, uint64_t* key, uint64_t* key_size, int64_t* id, uint64_t* id_qty )
-{
-    KU64Index_GrepData d;
-
-    memset(&d, 0, sizeof(KU64Index_GrepData));
-    d.search.key = offset;
-    d.key = key;
-    d.key_size = key_size;
-    d.id = id;
-    d.id_qty = id_qty;
-    if( !BSTreeDoUntil(&self->tree, false, KU64Index_Grep, &d) ) {
-        d.rc = RC(rcDB, rcIndex, rcSelecting, rcId, rcNotFound);
-    }
-    return d.rc;
-}
-
-
-rc_t KU64IndexFindAll_v3( const KU64Index_v3* self, uint64_t offset, 
-    rc_t (CC*f)(uint64_t key, uint64_t key_size, int64_t id, uint64_t id_qty, void* data), void* data)
-{
-    KU64Index_GrepData d;
-
-    memset(&d, 0, sizeof(KU64Index_GrepData));
-    d.func = f;
-    d.data = data;
-    d.search.key = offset;
-    BSTreeDoUntil(&self->tree, false, KU64Index_Grep, &d);
-    return d.rc;
-}
diff --git a/libs/kfc/Makefile b/libs/kfc/Makefile
deleted file mode 100644
index 29ef8ec..0000000
--- a/libs/kfc/Makefile
+++ /dev/null
@@ -1,97 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: all
-
-TOP ?= $(abspath ../..)
-MODULE = libs/kfc
-
-INT_LIBS = \
-	libkfc
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES = \
-	$(KFC_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/all
-
-std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/all
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# all, std
-#
-$(TARGDIR)/all: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/all $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# kfc
-#
-$(ILIBDIR)/libkfc: $(addprefix $(ILIBDIR)/libkfc.,$(ILIBEXT))
-
-KFC_SRC = \
-	refcount \
-	tstate \
-	sysrsrc \
-	rsrc \
-	vtbl \
-	sysctx \
-	except \
-	xc \
-
-KFC_OBJ = \
-	$(addsuffix .$(LOBX),$(KFC_SRC))
-
-KFC_LIB = \
-
-$(ILIBDIR)/libkfc.$(LIBX): $(KFC_OBJ)
-	$(LD) --slib -o $@ $^ $(KFC_LIB)
-
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/kfc/except.c b/libs/kfc/except.c
deleted file mode 100644
index 0fa9ce4..0000000
--- a/libs/kfc/except.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define SRC_LOC_DEFINED 1
-
-#include <kfc/extern.h>
-#include <kfc/rsrc.h>
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/rc.h>
-#include <kfc/xcdefs.h>
-#include <kfc/xc.h>
-#include <kfc/tstate.h>
-
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <kproc/thread.h>
-
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-
-#include <sysalloc.h>
-
-
-/* event
- *  create a thread event
- *
- *  "lineno" [ IN ] - the source line where event was created
- *  "severity" [ IN ] - severity of the event
- *  "origin" [ IN ] - origin of the event
- *  "xc" [ IN ] - type of the event
- *  "msg" [ IN, VARARG ] - instance data to be recorded on the event
- */
-void ctx_event ( ctx_t ctx, uint32_t lineno,
-    xc_sev_t severity, xc_org_t origin,
-    xc_t xc, const char *msg, ... )
-{
-    va_list args;
-    va_start ( args, msg );
-
-    if ( ctx != NULL )
-        KThreadStateEvent ( ctx -> rsrc -> thread, ctx, lineno, severity, origin, xc, msg, args );
-
-    va_end ( args );
-}
-
-void ctx_vevent ( ctx_t ctx, uint32_t lineno,
-    xc_sev_t severity, xc_org_t origin,
-    xc_t xc, const char *msg, va_list args )
-{
-    if ( ctx != NULL )
-        KThreadStateEvent ( ctx -> rsrc -> thread, ctx, lineno, severity, origin, xc, msg, args );
-}
-
-
-/* CATCH
- *  attempts to catch rc on certain types
- */
-bool ctx_xc_isa ( ctx_t ctx, xc_t xc )
-{
-    if ( ctx != NULL && ctx -> evt != NULL )
-        return KThreadStateIsXCErr ( ctx -> rsrc -> thread, ctx, xc );
-    return false;
-}
-
-bool ctx_xobj_isa ( ctx_t ctx, xobj_t xo )
-{
-    if ( ctx != NULL && ctx -> evt != NULL )
-        return KThreadStateIsXCObj ( ctx -> rsrc -> thread, ctx, xo );
-    return false;
-}
-
-bool ctx_xstate_isa ( ctx_t ctx, xstate_t xs )
-{
-    if ( ctx != NULL && ctx -> evt != NULL )
-        return KThreadStateIsXCState ( ctx -> rsrc -> thread, ctx, xs );
-    return false;
-}
-
-
-/* clear
- *  clears annotation and error
- *  used from within CATCH handler
- */
-void ctx_clear ( ctx_t ctx )
-{
-    if ( ctx != NULL && ctx -> evt != NULL )
-        KThreadStateClearEvents ( ctx -> rsrc -> thread, ctx );
-}
-
-
-/* what
- *  retrieves current message
- *  if no annotation exists, returns empty string
- */
-const char * ctx_what ( ctx_t ctx )
-{
-    if ( ctx != NULL && ctx -> evt != NULL )
-        return KThreadStateGetMessage ( ctx -> rsrc -> thread, ctx );
-
-    return "";
-}
diff --git a/libs/kfc/refcount.c b/libs/kfc/refcount.c
deleted file mode 100644
index 107ac35..0000000
--- a/libs/kfc/refcount.c
+++ /dev/null
@@ -1,180 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/extern.h>
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <kfc/rc.h>
-
-#include <kfc/refcount-impl.h>
-
-#include <string.h>
-#include <sysalloc.h>
-
-
-/*--------------------------------------------------------------------------
- * KRefcount
- */
-
-KITFTOK_DEF ( KRefcount_v1 );
-
-/* Duplicate
- *  create a duplicate reference
- *
- *  "rm" [ IN ] - capabilities to remove ( default 0 )
- */
-LIB_EXPORT void * CC KRefcountDuplicate_v1 ( KRefcount_v1 * self, ctx_t ctx, caps_t rm )
-{
-    FUNC_ENTRY ( ctx, rcRuntime, rcRefcount, rcCopying );
-
-    int add_result;
-    const KRefcount_v1_vt * vt;
-
-    if ( self == NULL )
-        return NULL;
-
-    vt = KVTABLE_CAST ( self -> vt, ctx, KRefcount_v1 );
-    if ( vt == NULL )
-        INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KRefcount_v1 interface" );
-    else
-    {
-        if ( vt -> dup != NULL )
-            return ( * vt -> dup ) ( self, ctx, rm );
-
-        if ( rm != 0 )
-            INTERNAL_ERROR ( xcParamInvalid, "this reference does not support removal of capabilities ( %b )", rm );
-        else
-        {
-            add_result = KRefcountAdd ( & self -> refcount, self -> vt -> name );
-            switch ( add_result )
-            {
-            case krefOkay:
-                return self;
-            case krefZero:
-                INTERNAL_ERROR ( xcSelfZombie, "zero refcount" );
-                break;
-            case krefLimit:
-                INTERNAL_ERROR ( xcRefcountOutOfBounds, "maximum references reached" );
-                break;
-            case krefNegative:
-                INTERNAL_ERROR ( xcSelfZombie, "negative refcount" );
-                break;
-            default:
-                INTERNAL_ERROR ( xcUnexpected, "unknown result from KRefcountAdd: ( %d )", add_result );
-            }
-        }
-    }
-
-    return NULL;
-}
-
-/* Release
- *  release a reference
- */
-LIB_EXPORT void CC KRefcountRelease_v1 ( KRefcount_v1 * self, ctx_t ctx )
-{
-    if ( self != NULL )
-    {
-        FUNC_ENTRY ( ctx, rcRuntime, rcRefcount, rcReleasing );
-
-        const KRefcount_v1_vt * vt = KVTABLE_CAST ( self -> vt, ctx, KRefcount_v1 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KRefcount_v1 interface" );
-        else
-        {
-            int drop_result = KRefcountDrop ( & self -> refcount, self -> vt -> name );
-            switch ( drop_result )
-            {
-            case krefOkay:
-                return;
-            case krefWhack:
-                if ( vt -> destroy != NULL )
-                    ( * vt -> destroy ) ( self, ctx );
-                free ( self );
-                return;
-            case krefZero:
-                INTERNAL_WARNING ( xcSelfZombie, "zero refcount" );
-                break;
-            case krefNegative:
-                INTERNAL_WARNING ( xcSelfZombie, "negative refcount" );
-                break;
-            default:
-                INTERNAL_WARNING ( xcUnexpected, "unknown result from KRefcountDrop: ( %d )", drop_result );
-            }
-        }
-    }
-}
-
-
-/* Init
- *  initialize the refcount to 1
- *  may perform logging
- */
-LIB_EXPORT void CC KRefcountInit_v1 ( KRefcount_v1 *self, ctx_t ctx,
-    const KVTable * kvt, const char * instance_name )
-{
-    FUNC_ENTRY ( ctx, rcRuntime, rcData, rcConstructing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to construct object" );
-    else if ( kvt == NULL )
-        INTERNAL_ERROR ( xcInterfaceNull, "null vtable" );
-    else
-    {
-        const KRefcount_v1_vt *vt = KVTABLE_CAST ( kvt, ctx, KRefcount_v1 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "vtable does not appear to implement KRefcount_v1" );
-        else
-        {
-            switch ( vt -> dad . min )
-            {
-            case 0:
-                break;
-            default:
-                INTERNAL_ERROR ( xcInterfaceInvalid, "vtable has an invalid minor version" );
-                return;
-            }
-
-            KRefcountInit ( & self -> refcount, 1, kvt -> name, "init", instance_name ? instance_name : "" );
-#if _DEBUGGING && _ARCH_BITS > 32
-            memset ( & self -> align, 0, sizeof self -> align );
-#endif
-        }
-    }
-}
-
-/* Destroy
- *  has nothing to destroy
- *  may perform logging
- */
-LIB_EXPORT void CC KRefcountDestroy_v1 ( KRefcount_v1 *self, ctx_t ctx )
-{
-#if _DEBUGGING
-    if ( self != NULL )
-        KRefcountWhack ( & self -> refcount, self -> vt -> name );
-#endif
-}
diff --git a/libs/kfc/rsrc-priv.h b/libs/kfc/rsrc-priv.h
deleted file mode 100644
index e7c8f5f..0000000
--- a/libs/kfc/rsrc-priv.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfc_rsrc_priv_
-#define _h_kfc_rsrc_priv_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-struct KRsrc;
-
-/* rsrc_init
- *  initialize a resource block with common managers
- *  lazy generation from thread entry
- *  not called when used under KMain
- */
-void rsrc_init ( struct KRsrc * rsrc, ctx_t ctx, bool full );
-
-
-#endif /* _h_kfc_rsrc_priv_ */
diff --git a/libs/kfc/rsrc.c b/libs/kfc/rsrc.c
deleted file mode 100644
index 4db8974..0000000
--- a/libs/kfc/rsrc.c
+++ /dev/null
@@ -1,180 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/extern.h>
-#include <kfc/rsrc.h>
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/rc.h>
-#include <kfc/xc.h>
-
-#include <kfc/tstate.h>
-#include <kproc/procmgr.h>
-#include <kproc/thread.h>
-#include <kfg/config.h>
-#include <kns/manager.h>
-#include <vfs/manager.h>
-#include <vfs/manager-priv.h>
-#include <kdb/manager.h>
-#include <vdb/manager.h>
-#include <vdb/vdb-priv.h>
-
-#include "rsrc-priv.h"
-
-#include <string.h>
-#include <assert.h>
-
-
-/* Init
- *  initialize a local block from another
- */
-LIB_EXPORT void CC KRsrcInit ( KRsrc * rsrc, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcRuntime, rcMgr, rcAttaching );
-
-    if ( rsrc == NULL )
-        INTERNAL_ERROR ( xcParamNull, "bad KRsrc block" );
-    else
-    {
-        rc_t rc;
-        const KRsrc * src = ctx -> rsrc;
-        memset ( rsrc, 0, sizeof * rsrc );
-
-        /* attach new reference to each manager */
-        rc = KProcMgrAddRef ( rsrc -> proc = src -> proc );
-        if ( rc == 0 )
-            rsrc -> thread = KProcMgrMakeThreadState ( rsrc -> proc );
-#if 0
-        if ( rc == 0 )
-        {
-            rsrc -> mem = KMemMgrDuplicate ( src -> mem, ctx );
-            rc = ctx -> rc;
-        }
-#endif
-        if ( rc == 0 )
-            rc = KConfigAddRef ( rsrc -> cfg = src -> cfg );
-        if ( rc == 0 )
-            rc = KNSManagerAddRef ( rsrc -> kns = src -> kns );
-        if ( rc == 0 )
-            rc = VFSManagerAddRef ( rsrc -> vfs = src -> vfs );
-        if ( rc == 0 )
-            rc = KDBManagerAddRef ( rsrc -> kdb = src -> kdb );
-        if ( rc == 0 )
-            rc = VDBManagerAddRef ( rsrc -> vdb = src -> vdb );
-
-        if ( rc != 0 )
-        {
-            INTERNAL_ERROR ( xcRefcountOutOfBounds, "exceeded references to a KRsrc manager" );
-            KRsrcWhack ( rsrc, ctx );
-        }
-    }
-}
-
-
-/* Whack
- *  release references
- */
-LIB_EXPORT void CC KRsrcWhack ( KRsrc * self, ctx_t ctx )
-{
-    if ( self != NULL )
-    {
-        VDBManagerRelease ( self -> vdb );
-        KDBManagerRelease ( self -> kdb );
-        VFSManagerRelease ( self -> vfs );
-        KNSManagerRelease ( self -> kns );
-        KConfigRelease ( self -> cfg );
-#if 0
-        /* remember to deal with case of ctx == NULL,
-           which is allowed for VDB.2 in this context */
-        KMemMgrRelease ( self -> mem, ctx );
-#endif
-        KThreadStateWhack ( self -> thread );
-        KProcMgrRelease ( self -> proc );
-
-        memset ( self, 0, sizeof * self );
-    }
-}
-
-
-/* rsrc_init
- *  initialize a resource block with common managers
- *  lazy generation from thread entry
- *  not called when used under KMain
- */
-void rsrc_init ( KRsrc * rsrc, ctx_t ctx, bool full )
-{
-    if ( rsrc == NULL )
-        INTERNAL_ERROR ( xcParamNull, "Bad KRsrc block" );
-    else
-    {
-        rc_t rc;
-#if 0
-        memset ( rsrc, 0, sizeof * rsrc );
-#endif
-
-        /* initialize the proc mgr */
-        rc = KProcMgrInit ();
-        if ( rc == 0 && rsrc -> proc == NULL )
-            rc = KProcMgrMakeSingleton ( & rsrc -> proc );
-
-        /* create KMemMgr */
-
-        if ( full )
-        {
-            /* create current thread */
-            if ( rc == 0 )
-                rsrc -> thread = KProcMgrMakeThreadState ( rsrc -> proc );
-
-            /* read in KConfig */
-            if ( rc == 0 )
-                rc = KConfigMake ( & rsrc -> cfg, NULL );
-#if 0
-            /* not making the KNS manager, because the
-               VFS manager makes it, and we can get his */
-            if ( rc == 0 )
-                rc = KNSManagerMake ( & rsrc -> kns );
-#endif
-            /* create VFS manager, linked to our KConfig */
-            if ( rc == 0 )
-                rc = VFSManagerMakeFromKfg ( & rsrc -> vfs, rsrc -> cfg );
-#if 1
-            /* extract the VFS manager's KNS manager */
-            if ( rc == 0 )
-                rc = VFSManagerGetKNSMgr ( rsrc -> vfs, & rsrc -> kns );
-#endif
-            /* create a VDB manager, which creates a KDB manager
-               call special library agnostic function, link to vfs */
-            if ( rc == 0 )
-                rc = VDBManagerMakeRsrc ( & rsrc -> vdb, rsrc -> vfs );
-            /* obtain the read version of KDB manager */
-            if ( rc == 0 )
-                rc = VDBManagerOpenKDBManagerRead ( rsrc -> vdb, ( const KDBManager** ) & rsrc -> kdb );
-        }
-
-        if ( rc != 0 )
-            INTERNAL_ERROR ( xcUnexpected, "failed to create a KRsrc manager ( rc = %R )", rc );
-    }
-}
diff --git a/libs/kfc/sysctx-priv.h b/libs/kfc/sysctx-priv.h
deleted file mode 100644
index a9e8a72..0000000
--- a/libs/kfc/sysctx-priv.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfc_sysctx_priv_
-#define _h_kfc_sysctx_priv_
-
-/* Clear new_ctx and initialize special members.
-   Make sure Unix and Windows version do the same. */
-#define RESET_CTX(new_ctx, ctx, func_loc) \
-    do { \
-        memset ( ( void* ) & new_ctx -> rc, 0, sizeof * new_ctx \
-                    - sizeof new_ctx -> rsrc \
-                    - sizeof new_ctx -> loc \
-                    - sizeof new_ctx -> caller  \
-                    - sizeof new_ctx -> zdepth ); \
-        new_ctx -> rsrc = ctx -> rsrc; \
-        new_ctx -> loc = func_loc; \
-        new_ctx -> caller = ctx; \
-        new_ctx -> zdepth = ctx -> zdepth + 1; \
-    } while (false)
-
-#endif /* _h_kfc_sysctx_priv_ */
diff --git a/libs/kfc/tstate.c b/libs/kfc/tstate.c
deleted file mode 100644
index 0489262..0000000
--- a/libs/kfc/tstate.c
+++ /dev/null
@@ -1,1041 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define SRC_LOC_DEFINED 1
-
-#include <kfc/extern.h>
-#include <kfc/tstate.h>
-#include <kfc/rsrc.h>
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/rc.h>
-#include <kfc/xc.h>
-#include <kfc/xcdefs.h>
-
-#include <klib/time.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-typedef struct KThreadEvent KThreadEvent;
-typedef struct KThreadEvtNode KThreadEvtNode;
-
-
-/*--------------------------------------------------------------------------
- * ts_alloc
- */
-static
-void * ts_alloc ( size_t bytes, bool clear )
-{
-    void * mem = clear ? calloc ( 1, bytes ) : malloc ( bytes );
-    if ( mem == NULL )
-        exit ( -1 );
-    return mem;
-}
-
-
-/*--------------------------------------------------------------------------
- * xc to rc
- */
-static
-rc_t extract_rc_xobj ( const XCObj * xobj )
-{
-    while ( xobj -> dad != NULL )
-        xobj = xobj -> dad;
-    return SILENT_RC ( 0, 0, 0, xobj -> rc_obj, 0 );
-}
-
-
-static
-rc_t extract_rc_xstate ( const XCState * xstate )
-{
-    while ( xstate -> dad != NULL )
-        xstate = xstate -> dad;
-    return SILENT_RC ( 0, 0, 0, 0, xstate -> rc_state );
-}
-
-static
-rc_t extract_rc_xerr ( const XCErr * xc )
-{
-    rc_t rc_obj, rc_state;
-
-    /* get to root xc */
-    while ( xc -> dad != NULL )
-        xc = xc -> dad;
-
-    /* retrieve components */
-    rc_obj = extract_rc_xobj ( xc -> obj );
-    rc_state = extract_rc_xstate ( xc -> state );
-
-    return rc_obj | rc_state;
-}
-
-static
-rc_t extract_rc ( const KFuncLoc * loc, const void * xc )
-{
-    rc_t rc_err = extract_rc_xerr ( xc );
-    return loc -> rc_context | rc_err;
-}
-
-
-/*--------------------------------------------------------------------------
- * xc to string
- */
-static
-const char * extract_desc_xobj ( const XCErr * xc )
-{
-    const XCObj * xobj;
-
-    while ( xc -> dad != NULL )
-        xc = xc -> dad;
-
-    xobj = xc -> obj;
-    while ( xobj -> desc == NULL && xobj -> dad != NULL )
-        xobj = xobj -> dad;
-
-    return xobj -> desc;
-}
-
-
-static
-const char * extract_desc_xstate ( const XCErr * xc )
-{
-    const XCState * xstate;
-
-    while ( xc -> dad != NULL )
-        xc = xc -> dad;
-
-    xstate = xc -> state;
-    while ( xstate -> desc == NULL && xstate -> dad != NULL )
-        xstate = xstate -> dad;
-
-    return xstate -> desc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KThreadEvtNode
- *  exection state belonging to the current thread
- */
-struct KThreadEvtNode
-{
-    KThreadEvtNode * parent;
-    KThreadEvtNode * next;
-    KThreadEvtNode * child;
-
-    const KFuncLoc * loc;
-    KThreadEvent * evt;
-    uint32_t zdepth;              /* root node has zdepth == 0 */
-};
-
-
-/*--------------------------------------------------------------------------
- * KThreadEvent
- *  describes a particular event
- */
-struct KThreadEvent
-{
-    KThreadEvtNode * node;
-    KThreadEvent * next;
-
-    const XCErr * xc;
-    KTime_t timestamp;
-    String message;
-    xc_sev_t severity;
-    xc_org_t origin;
-    uint32_t lineno;
-};
-
-/* Dump
- */
-static
-void KThreadEventDump ( ctx_t ctx, KTime_t timestamp, const KFuncLoc * loc,
-    uint32_t lineno, xc_sev_t severity, xc_org_t origin, const void * xc_param,
-    const char * msg, const KThreadEvtNode * node )
-{
-    const XCErr * xc = xc_param;
-
-    size_t pre_size, sz;
-    char pre [ 4096 ];
-
-#if _DEBUGGING
-    const char *fname;
-#endif
-
-    static const char * err_strings [ 3 ] [ 4 ] =
-    {
-        { "NOTE", "WARNING", "SYSTEM ERROR", "FATAL SYSTEM ERROR" },
-        { "NOTE", "WARNING", "INTERNAL ERROR", "FATAL INTERNAL ERROR" },
-        { "NOTE", "WARNING", "USER ERROR", "FATAL USER ERROR" }
-    };
-
-    KTime tm;
-    KTimeLocal ( & tm, timestamp );
-    string_printf ( pre, sizeof pre, & pre_size
-                    , "%04u-%02u-%02uT%02u:%02u:%02u "
-                    , tm . year
-                    , tm . month + 1
-                    , tm . day
-                    , tm . hour
-                    , tm . minute
-                    , tm . second
-        );
-
-#if _DEBUGGING
-    string_printf ( & pre [ pre_size ], sizeof pre - pre_size, & sz
-                    , "%.*s/%s/%s.%s:%u:"
-                    , sizeof __FILE__ -
-                      sizeof __mod__  -
-                      sizeof __file__ -
-                      sizeof __fext__ -
-                      1
-                    , __FILE__
-                    , loc -> src -> mod
-                    , loc -> src -> file
-                    , loc -> src -> ext
-                    , lineno
-                    , loc -> func
-        );
-    pre_size += sz;
-
-    /* function name */
-    fname = loc -> func;
-
-    /* remove leading "Java_" from jni names */
-    if ( memcmp ( loc -> func, "Java_", sizeof "Java_" - 1 ) == 0 )
-        fname += sizeof "Java_" - 1;
-
-    /* print it into buffer */
-    string_printf ( & pre [ pre_size ], sizeof pre - pre_size, & sz
-                    , "%s - "
-                    , fname
-        );
-
-    /* convert jni names into Java fqn */
-    if ( fname != loc -> func )
-    {
-        size_t i;
-        for ( i = 0; i < sz; ++ i )
-        {
-            if ( pre [ pre_size + i ] == '_' )
-                pre [ pre_size + i ] = '.';
-        }
-    }
-    pre_size += sz;
-#endif
-
-    string_printf ( & pre [ pre_size ], sizeof pre - pre_size, & sz
-                    , "%s: "
-                    , err_strings [ origin ] [ severity ]
-        );
-    pre_size += sz;
-
-#if _DEBUGGING
-    string_printf ( & pre [ pre_size ], sizeof pre - pre_size, & sz
-                    , "( %s ) "
-                    , xc -> name
-        );
-    pre_size += sz;
-#endif
-
-    string_printf ( & pre [ pre_size ], sizeof pre - pre_size, & sz
-                    , "%s %s"
-                    , extract_desc_xobj ( xc )
-                    , extract_desc_xstate ( xc )
-        );
-    pre_size += sz;
-
-    if ( msg == NULL || msg [ 0 ] == 0 )
-        fprintf ( stderr, "%s.\n", pre );
-    else
-        fprintf ( stderr, "%s - %s.\n", pre, msg );
-
-#if _DEBUGGING
-    if ( node != NULL )
-    {
-        fprintf ( stderr, "Stack Trace:\n" );
-        do
-        {
-            fprintf ( stderr
-                      , "    %s/%s.%s:%s\n"
-                      , node -> loc -> src -> mod
-                      , node -> loc -> src -> file
-                      , node -> loc -> src -> ext
-                      , node -> loc -> func
-                );
-            node = node -> parent;
-        }
-        while ( node != NULL );
-    }
-    else if ( ctx != NULL )
-    {
-        fprintf ( stderr, "Stack Trace:\n" );
-        do
-        {
-            fprintf ( stderr
-                      , "    %s/%s.%s:%s\n"
-                      , ctx -> loc -> src -> mod
-                      , ctx -> loc -> src -> file
-                      , ctx -> loc -> src -> ext
-                      , ctx -> loc -> func
-                );
-            ctx = ctx -> caller;
-        }
-        while ( ctx != NULL );
-    }
-#endif
-}
-
-/* Whack
- */
-static
-KThreadEvent * KThreadEventWhack ( KThreadEvent * self )
-{
-    KThreadEvent * next = self -> next;
-
-    /* dump event to log */
-    KThreadEventDump ( NULL, self -> timestamp, self -> node -> loc,
-       self -> lineno, self -> severity, self -> origin,
-       self -> xc, self -> message . addr, self -> node );
-
-    free ( self );
-    return next;
-}
-
-static
-void KThreadEventWhackAll ( KThreadEvent * self )
-{
-    do
-        self = KThreadEventWhack ( self );
-    while ( self != NULL );
-}
-
-/* Clear
- */
-static
-void KThreadEventClear ( KThreadEvent * self )
-{
-    if ( self -> next != NULL )
-        KThreadEventClear ( self -> next );
-    free ( self );
-}
-
-/* Make
- */
-static
-KThreadEvent * KThreadEventMake ( ctx_t ctx,
-    uint32_t lineno, xc_sev_t severity, xc_org_t origin,
-    xc_t xc, const char * msg, va_list args )
-{
-    KThreadEvent * evt;
-    KTime_t ts = KTimeStamp ();
-
-    char * c;
-    size_t num_writ;
-    char msg_buffer [ 4096 ];
-    rc_t rc = string_vprintf ( msg_buffer, sizeof msg_buffer, & num_writ, msg, args );
-    if ( rc != 0 || num_writ >= sizeof msg_buffer )
-        string_printf ( msg_buffer, sizeof msg_buffer, & num_writ, "** BAD MESSAGE STRING **" );
-
-    if ( num_writ > 0 && msg_buffer [ num_writ - 1 ] == '.' )
-        msg_buffer [ -- num_writ ] = 0;
-
-    evt = malloc ( sizeof * evt + num_writ + 1 );
-    if ( evt == NULL )
-    {
-        /* ATTEMPT TO DUMP TO LOG */
-        KThreadEventDump ( ctx, ts, ctx -> loc, lineno, severity, origin, xc, msg_buffer, NULL );
-        exit ( -1 );
-    }
-
-    evt -> node = NULL;
-    evt -> next = NULL;
-
-    evt -> xc = ( const XCErr * ) xc;
-    evt -> timestamp = ts;
-    evt -> severity = severity;
-    evt -> origin = origin;
-    evt -> lineno = lineno;
-
-    c = ( char* ) ( evt + 1 );
-    memcpy ( c, msg_buffer, num_writ + 1 );
-    StringInit ( & evt -> message, c, num_writ, string_len ( c, num_writ ) );
-
-    return evt;
-}
-
-
-/*--------------------------------------------------------------------------
- * KThreadEvtNode
- *  exection state belonging to the current thread
- */
-
-
-/* Whack
- */
-static
-void KThreadEvtNodeWhackAll ( KThreadEvtNode * self )
-{
-    if ( self -> evt )
-        KThreadEventWhackAll ( self -> evt );
-
-    if ( self -> child )
-        KThreadEvtNodeWhackAll ( self -> child );
-
-    if ( self -> next )
-        KThreadEvtNodeWhackAll ( self -> next );
-
-    free ( self );
-}
-
-
-/* Clear
- */
-static
-void KThreadEvtNodeClear ( KThreadEvtNode * self )
-{
-    if ( self -> evt )
-        KThreadEventClear ( self -> evt );
-
-    if ( self -> child )
-        KThreadEvtNodeClear ( self -> child );
-
-    if ( self -> next )
-        KThreadEvtNodeClear ( self -> next );
-
-    free ( self );
-}
-
-/* Make
- */
-static
-KThreadEvtNode * KThreadEvtNodeMake ( ctx_t ctx )
-{
-    KThreadEvtNode * node = ts_alloc ( sizeof * node, true );
-    node -> loc = ctx -> loc;
-    node -> zdepth = ctx -> zdepth;
-    return node;
-}
-
-
-/* AddChild
- */
-static
-KThreadEvtNode * KThreadEvtNodeAddChild ( KThreadEvtNode * self, KThreadEvtNode * child )
-{
-    KThreadEvtNode * existing = self -> child;
-    if ( existing == NULL )
-        self -> child = child;
-    else
-    {
-        while ( existing -> next != NULL )
-            existing = existing -> next;
-        existing -> next = child;
-    }
-    child -> parent = self;
-    return self;
-}
-
-
-/* AddEvent
- */
-static
-void KThreadEvtNodeAddEvent ( KThreadEvtNode * self, KThreadEvent * evt )
-{
-    KThreadEvent * existing = self -> evt;
-    if ( existing == NULL )
-        self -> evt = evt;
-    else
-    {
-        while ( existing -> next != NULL )
-            existing = existing -> next;
-        existing -> next = evt;
-    }
-    evt -> node = self;
-}
-
-
-/* Unlink
- */
-static
-void KThreadEvtNodeUnlink ( KThreadEvtNode * self )
-{
-    KThreadEvtNode * par, * sib;
-
-    par = self -> parent;
-    assert ( par != NULL );
-    sib = par -> child;
-
-    if ( sib == self )
-        par -> child = self -> next;
-    else
-    {
-        while ( sib -> next != self )
-        {
-            assert ( sib -> next != NULL );
-            sib = sib -> next;
-        }
-        sib -> next = self -> next;
-    }
-
-    self -> parent = NULL;
-    self -> next = NULL;
-}
-
-
-/* Locate
- */
-static
-KThreadEvtNode * KThreadEvtNodeLocate ( KThreadEvtNode * self, uint32_t zdepth )
-{
-    assert ( zdepth <= self -> zdepth );
-    while ( zdepth < self -> zdepth )
-    {
-        assert ( self -> parent != NULL );
-        self = self -> parent;
-    }
-    return self;
-}
-
-
-/* FindDominant
- */
-static
-KThreadEvent * KThreadEvtNodeFindDominant ( const KThreadEvtNode * self, const KThreadEvtNode * prune, KThreadEvent * dom )
-{
-    /* scan events within this node */
-    KThreadEvent * evt = self -> evt;
-    while ( evt != NULL )
-    {
-        if ( dom == NULL )
-            dom = evt;
-        else if ( evt -> severity > dom -> severity )
-            dom = evt;
-        evt = evt -> next;
-    }
-
-    /* scan child events */
-    self = self -> child;
-    while ( self != NULL )
-    {
-        if ( self != prune )
-            dom = KThreadEvtNodeFindDominant ( self, NULL, dom );
-        self = self -> next;
-    }
-
-    return dom;
-}
-
-
-/*--------------------------------------------------------------------------
- * KThreadState
- *  exection state belonging to the current thread
- */
-struct KThreadState
-{
-    KThreadEvtNode * eroot;
-};
-
-
-/* Whack
- */
-void KThreadStateWhack ( KThreadState * self )
-{
-    if ( self != NULL )
-    {
-        if ( self -> eroot != NULL )
-            KThreadEvtNodeWhackAll ( self -> eroot );
-        free ( self );
-    }
-}
-
-
-/* MakeThreadState
- *  creates state for a newly created thread
- *  called from the new thread
- */
-KThreadState * KProcMgrMakeThreadState ( struct KProcMgr const * self )
-{
-    if ( self != NULL )
-    {
-        KThreadState * tstate = ts_alloc ( sizeof * tstate, true );
-        return tstate;
-    }
-
-    return NULL;
-}
-
-
-/* CaptureEvent
- *  records an event from the exception mechanism
- */
-void KThreadStateEvent ( KThreadState * self, ctx_t ctx,
-    uint32_t lineno, xc_sev_t severity, xc_org_t origin,
-    xc_t xc, const char * msg, va_list args )
-{
-    KThreadEvtNode * node, * par;
-    KThreadEvent * evt = KThreadEventMake ( ctx, lineno, severity, origin, xc, msg, args );
-
-    /* prepare an RC for this event */
-    rc_t rc = 0;
-    if ( severity > xc_sev_warn )
-    {
-        rc = extract_rc ( ctx -> loc, xc );
-        assert ( rc != 0 );
-    }
-
-    /* handle early errors before managers */
-    if ( self == NULL )
-    {
-        KThreadEventDump ( ctx, evt -> timestamp, ctx -> loc,
-            lineno, severity, origin, xc, evt -> message . addr, NULL );
-        free ( evt );
-        return;
-    }
-
-    /* CASES:
-
-       1. the thread has no existing event state
-          - create new node for call stack
-          - add event to the node
-          - propagate the event and rc up the ctx stack
-          - capture stack trace as node chain
-          - record root node
-
-       2. the current stack frame already has an event
-          - find the corresponding node in stack trace
-          - add event to this node
-          - propagate up call chain while severity > caller.severity
-
-       3. the current stack frame is clear, but some caller has state
-          - create new node for call stack
-          - add event to the node
-          - propagate the event and rc up the ctx stack until frame has event
-          - capture stack trace as node chain
-          - find the corresponding node in stack trace
-          - add node from child frame to common parent node
-          - continue to propagate up call chain while severity > caller.severity
-
-    */
-
-
-    /* case 1 - just propagate up the stack */
-    if ( self -> eroot == NULL )
-    {
-        assert ( ctx -> evt == NULL );
-        assert ( ctx -> rc == 0 );
-
-        /* create a new event node */
-        node = KThreadEvtNodeMake ( ctx );
-
-        /* add the event */
-        KThreadEvtNodeAddEvent ( node, evt );
-        ( ( KCtx * ) ctx ) -> evt = evt;
-        ( ( KCtx * ) ctx ) -> rc = rc;
-
-        /* propagate up the stack */
-        while ( ctx -> caller != NULL )
-        {
-            /* bump up */
-            ctx = ctx -> caller;
-            par = KThreadEvtNodeMake ( ctx );
-
-            /* link */
-            node = KThreadEvtNodeAddChild ( par, node );
-
-            /* record the event */
-            ( ( KCtx * ) ctx ) -> evt = evt;
-            ( ( KCtx * ) ctx ) -> rc = rc;
-        }
-
-        /* record root node */
-        self -> eroot = node;
-    }
-
-    /* cases 2 & 3 - will need to merge */
-    else
-    {
-        KThreadEvent * existing = ctx -> evt;
-
-        /* case 2 - current frame has an event */
-        if ( ctx -> evt != NULL )
-        {
-            /* NB - this may not be so simple, if
-               a canonical ordering is to be achieved.
-               this code falls through to normal propagation,
-               that only favors the new event over existing
-               if it is more severe in nature.
-
-               canonical ordering would be:
-               a) events originating in a frame always
-                  order before child events
-               b) dominant event should be selected
-                  first by severity and second by order
-
-               as it stands, the code allows a previous child
-               event of the same severity to remain dominant.
-
-            */
-
-            node = KThreadEvtNodeLocate ( existing -> node, ctx -> zdepth );
-            KThreadEvtNodeAddEvent ( node, evt );
-        }
-
-        /* case 3 - current frame is clear */
-        else
-        {
-            assert ( ctx -> rc == 0 );
-
-            /* create a new event node */
-            node = KThreadEvtNodeMake ( ctx );
-
-            /* add the event */
-            KThreadEvtNodeAddEvent ( node, evt );
-            ( ( KCtx * ) ctx ) -> evt = evt;
-            ( ( KCtx * ) ctx ) -> rc = rc;
-
-            /* bump up */
-            assert ( ctx -> caller != NULL );
-            ctx = ctx -> caller;
-
-            /* propagate up the stack */
-            while ( ctx -> evt == NULL )
-            {
-                /* make node for this frame */
-                par = KThreadEvtNodeMake ( ctx );
-
-                /* link */
-                node = KThreadEvtNodeAddChild ( par, node );
-
-                /* record the event */
-                ( ( KCtx * ) ctx ) -> evt = evt;
-                ( ( KCtx * ) ctx ) -> rc = rc;
-
-                /* bump up */
-                assert ( ctx -> caller != NULL );
-                ctx = ctx -> caller;
-            }
-
-            /* found nearest existing event */
-            existing = ctx -> evt;
-
-            /* locate common parent node */
-            par = KThreadEvtNodeLocate ( existing -> node, ctx -> zdepth );
-            node = KThreadEvtNodeAddChild ( par, node );
-        }
-
-        /* cases 2 & 3 - propagate event while severity > existing */
-        while ( severity > existing -> severity )
-        {
-            do
-            {
-                /* overwrite prior */
-                ( ( KCtx * ) ctx ) -> evt = evt;
-                ( ( KCtx * ) ctx ) -> rc = rc;
-
-                /* bump up */
-                ctx = ctx -> caller;
-                if ( ctx == NULL )
-                    return;
-            }
-            while ( ctx -> evt == ( void * ) existing );
-
-            assert ( ctx -> evt != NULL );
-            existing = ctx -> evt;
-        }
-    }
-
-    if ( severity == xc_sev_fatal )
-        exit ( -1 );
-}
-
-
-/* ClearEvents
- *  clears events from a particular point in the callchain
- *  down toward lower points.
- */
-void KThreadStateClearEvents ( KThreadState * self, ctx_t ctx )
-{
-    if ( self != NULL )
-    {
-        assert ( ctx != NULL );
-        if ( ctx -> evt != NULL )
-        {
-            /* the recorded event */
-            KThreadEvent * evt = ctx -> evt;
-
-            /* locate the node for this frame */
-            KThreadEvtNode * node = KThreadEvtNodeLocate ( evt -> node, ctx -> zdepth );
-
-            /* douse it and everything below it */
-            if ( node == self -> eroot )
-            {
-                self -> eroot = NULL;
-                KThreadEvtNodeClear ( node );
-
-                do
-                {
-                    ( ( KCtx * ) ctx ) -> evt = NULL;
-                    ( ( KCtx * ) ctx ) -> rc = 0;
-
-                    ctx = ctx -> caller;
-                }
-                while ( ctx != NULL );
-            }
-            else
-            {
-                KThreadEvtNode * par = node -> parent;
-
-                KThreadEvtNodeUnlink ( node );
-                KThreadEvtNodeClear ( node );
-
-                /* WARNING - "evt" and "node" are now dangling! */
-
-                ( ( KCtx * ) ctx ) -> evt = NULL;
-                ( ( KCtx * ) ctx ) -> rc = 0;
-
-                assert ( ctx -> caller != NULL );
-                ctx = ctx -> caller;
-
-                /* look for nodes with no more events */
-                for ( node = par; node != NULL; node = par )
-                {
-                    if ( node -> child != NULL || node -> evt != NULL )
-                        break;
-
-                    par = node -> parent;
-                    if ( par == NULL )
-                        self -> eroot = NULL;
-                    else
-                        KThreadEvtNodeUnlink ( node );
-                    KThreadEvtNodeClear ( node );
-
-                    assert ( ctx != NULL );
-                    assert ( ctx -> evt == ( void * ) evt );
-                    ( ( KCtx * ) ctx ) -> evt = NULL;
-                    ( ( KCtx * ) ctx ) -> rc = 0;
-
-                    ctx = ctx -> caller;
-                }
-
-                assert ( node == NULL || ctx != NULL );
-
-                /* see if it was cleared all the way to root */
-                if ( node == NULL )
-                    self -> eroot = NULL;
-
-                /* see if the dominant evt from the cleared node
-                   had propagated higher up and needs to be reset */
-                else if ( ctx -> evt == ( void* ) evt )
-                {
-                    rc_t rc = 0;
-                    KThreadEvent * dom;
-                    KThreadEvtNode * par;
-
-                    assert ( ctx != NULL );
-
-                    /* AT THIS POINT:
-
-                       the current "node", a parent of the node
-                       originally being cleared, either has its
-                       own event(s) or has children that do.
-
-                       the dominant event of the node we just
-                       cleared ( dangling pointer in "evt" ) had
-                       been propagated as the dominant event of
-                       this ( and possibly further ) parents.
-
-                       we need to establish a new dominant event.
-                       this will be accomplished by visiting the
-                       current node and all of its children to find
-                       the node with the highest severity as first
-                       key, and first in order as second key.
-
-                       NB - we may need to review the code to ensure
-                       there is a canonical ordering in all cases.
-
-                     */
-
-                    dom = KThreadEvtNodeFindDominant ( node, NULL, NULL );
-                    assert ( dom != NULL );
-                    if ( dom -> severity > xc_sev_warn )
-                        rc = extract_rc ( node -> loc, dom -> xc );
-
-                    ( ( KCtx * ) ctx ) -> evt = dom;
-                    ( ( KCtx * ) ctx ) -> rc = rc;
-
-                    par = node -> parent;
-                    ctx = ctx -> caller;
-
-                    while ( par != NULL )
-                    {
-                        KThreadEvent * dom2;
-
-                        /* early exit optimization */
-                        if ( ctx -> evt != ( void * ) evt )
-                            break;
-
-                        /* compete for dominance */
-                        dom2 = KThreadEvtNodeFindDominant ( par, node, dom );
-                        if ( dom2 != dom )
-                        {
-                            rc = 0;
-                            if ( dom2 -> severity > xc_sev_warn )
-                                rc = extract_rc ( node -> loc, dom2 -> xc );
-                            dom = dom2;
-                        }
-
-                        /* update context */
-                        ( ( KCtx * ) ctx ) -> evt = dom;
-                        ( ( KCtx * ) ctx ) -> rc = rc;
-
-                        /* bump up */
-                        par = node -> parent;
-                        ctx = ctx -> caller;
-                    }
-                }
-            }
-        }
-    }
-}
-
-
-/* GetMessage
- *  retrieve current event message
- */
-const char * KThreadStateGetMessage ( const KThreadState * self, ctx_t ctx )
-{
-    if ( self != NULL )
-    {
-        assert ( ctx != NULL );
-        if ( ctx -> evt != NULL )
-        {
-            KThreadEvent * evt = ctx -> evt;
-            return evt -> message . addr;
-        }
-    }
-
-    return "";
-}
-
-
-/* IsXCErr
- */
-bool KThreadStateIsXCErr ( const KThreadState * self, ctx_t ctx, xc_t xc )
-{
-    if ( self != NULL )
-    {
-        assert ( ctx != NULL );
-        if ( ctx -> evt != NULL )
-        {
-            KThreadEvent * evt = ctx -> evt;
-            const XCErr * err = evt -> xc;
-            do
-            {
-                if ( err == ( const XCErr * ) xc )
-                    return true;
-
-                err = err -> dad;
-            }
-            while ( err != NULL );
-        }
-    }
-
-    return false;
-}
-
-/* IsXCObj
- */
-bool KThreadStateIsXCObj ( const KThreadState * self, ctx_t ctx, xobj_t xo )
-{
-    if ( self != NULL )
-    {
-        assert ( ctx != NULL );
-        if ( ctx -> evt != NULL )
-        {
-            KThreadEvent * evt = ctx -> evt;
-            const XCErr * err = evt -> xc;
-            const XCObj * obj;
-
-            while ( err -> dad != NULL )
-                err = err -> dad;
-
-            obj = err -> obj;
-
-            do
-            {
-                if ( obj == ( const XCObj * ) xo )
-                    return true;
-
-                obj = obj -> dad;
-            }
-            while ( obj != NULL );
-        }
-    }
-
-    return false;
-}
-
-/* IsXCState
- */
-bool KThreadStateIsXCState ( const KThreadState * self, ctx_t ctx, xstate_t xs )
-{
-    if ( self != NULL )
-    {
-        assert ( ctx != NULL );
-        if ( ctx -> evt != NULL )
-        {
-            KThreadEvent * evt = ctx -> evt;
-            const XCErr * err = evt -> xc;
-            const XCState * state;
-
-            while ( err -> dad != NULL )
-                err = err -> dad;
-
-            state = err -> state;
-
-            do
-            {
-                if ( state == ( const XCState * ) xs )
-                    return true;
-
-                state = state -> dad;
-            }
-            while ( state != NULL );
-        }
-    }
-
-    return false;
-}
diff --git a/libs/kfc/unix/sysctx.c b/libs/kfc/unix/sysctx.c
deleted file mode 100644
index 97b8c78..0000000
--- a/libs/kfc/unix/sysctx.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/rsrc-global.h>
-#include <kfc/except.h>
-#include <kfc/rc.h>
-#include <kfc/xc.h>
-#include <kproc/procmgr.h>
-
-#include <atomic32.h>
-
-#include "rsrc-priv.h"
-#include "sysctx-priv.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <pthread.h>
-#include <errno.h>
-#include <assert.h>
-
-/* thread-local storage */
-typedef struct TLS TLS;
-struct TLS
-{
-    KRsrc rsrc;
-    KCtx ctx;
-};
-
-static pthread_key_t key;
-static pthread_once_t key_once = PTHREAD_ONCE_INIT;
-
-
-/* whack
- *  whack thread-local storage
- */
-static
-void whack_tls ( void * data )
-{
-    /* the thread-local storage */
-    TLS * tls = data;
-
-    /* the "parent" ctx */
-    ctx_t ctx = & tls -> ctx;
-    FUNC_ENTRY ( ctx, rcRuntime, rcThread, rcDestroying );
-
-    /* whack the resource managers */
-    KRsrcWhack ( & tls -> rsrc, ctx );
-
-    /* free the memory */
-    free ( tls );
-}
-
-
-/* make_tls
- *  create thread-local storage
- */
-static
-TLS * make_tls ( const KFuncLoc * func_loc )
-{
-    ctx_t ctx;
-
-    /* create the storage */
-    TLS * tls = calloc ( 1, sizeof * tls );
-    if ( tls == NULL )
-        exit ( ENOMEM );
-
-    /* grab its context */
-    ctx = & tls -> ctx;
-
-    /* recover process-global resources */
-    TRY ( KRsrcGlobalInit ( & tls -> ctx, func_loc, true ) )
-    {
-        /* attach references */
-        TRY ( KRsrcInit ( & tls -> rsrc, ctx ) )
-        {
-            /* reset context */
-            tls -> ctx . rsrc = & tls -> rsrc;
-
-            /* set on thread */
-            pthread_setspecific ( key, tls );
-            assert ( ! FAILED () );
-        }
-    }
-
-    if ( FAILED () )
-    {
-        free ( tls );
-        exit ( -1 );
-    }
-
-    return tls;
-}
-
-
-/* make_key
- *  initialize the thread-local storage key
- */
-static
-void make_key ( void )
-{
-    pthread_key_create ( & key, whack_tls );
-}
-
-
-/* get_tls_ctx
- *  reads thread-local storage
- */
-static
-const KCtx * get_tls_ctx ( const KFuncLoc * func_loc )
-{
-    TLS * tls;
-
-    if ( KProcMgrOnMainThread () )
-    {
-        static KCtx s_ctx;
-        static bool been_here;
-        ctx_t ctx = & s_ctx;
-
-        if ( been_here )
-            return & s_ctx;
-
-        TRY ( KRsrcGlobalInit ( & s_ctx, func_loc, true ) )
-        {
-            /* done */
-            been_here = true;
-            return & s_ctx;
-        }
-
-        /* terrible failure */
-        exit ( -1 );
-    }
-
-    /* ensure the key is there */
-    pthread_once ( & key_once, make_key );
-
-    /* retrieve the existing tls */
-    tls = pthread_getspecific ( key );
-
-    /* create a new one if missing */
-    if ( tls == NULL )
-    {
-        tls = make_tls ( func_loc );
-        assert ( tls != NULL );
-    }
-
-    return & tls -> ctx;
-}
-
-
-/* ctx_recover
- *  queries thread for previously stored KRsrc block
- *  creates a new one if necessary
- */
-ctx_t ctx_recover ( KCtx * new_ctx, const KFuncLoc * func_loc )
-{
-    DECLARE_FUNC_LOC ( rcRuntime, rcMgr, rcOpening );
-
-    if ( new_ctx != NULL )
-    {
-        const KCtx * ctx = get_tls_ctx ( & s_func_loc );
-
-        /* clear new_ctx and initialize special members */
-        RESET_CTX(new_ctx, ctx, func_loc);
-    }
-
-    return new_ctx;
-}
diff --git a/libs/kfc/unix/sysrsrc.c b/libs/kfc/unix/sysrsrc.c
deleted file mode 100644
index 967d396..0000000
--- a/libs/kfc/unix/sysrsrc.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/extern.h>
-#include <kfc/rsrc.h>
-#include <kfc/rsrc-global.h>
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/rc.h>
-#include <kfc/xc.h>
-#include <kproc/procmgr.h>
-#include <atomic32.h>
-
-#include "rsrc-priv.h"
-
-#include <pthread.h>
-#include <string.h>
-#include <assert.h>
-
-
-static KRsrc s_rsrc;
-static atomic32_t s_initialized;
-static pthread_mutex_t crit = PTHREAD_MUTEX_INITIALIZER;
-
-static
-void atexit_task ( void )
-{
-    if ( atomic32_read ( & s_initialized ) == 2 )
-    {
-        KCtx local_ctx;
-        DECLARE_FUNC_LOC ( rcRuntime, rcMgr, rcDestroying );
-        memset ( & local_ctx, 0, sizeof local_ctx );
-        local_ctx . rsrc = & s_rsrc;
-        local_ctx . loc = & s_func_loc;
-
-        KRsrcGlobalWhack ( & local_ctx );
-    }
-}
-
-/* Global
- *  retrieve process-global singleton KRsrc block
- *  creates and initializes block on initial request
- *  caches pointer for subsequent requests
- */
-void KRsrcGlobalInit ( KCtx * ctx, const KFuncLoc * loc, bool full )
-{
-    int initialized;
-
-    assert ( ctx != NULL );
-    assert ( loc != NULL );
-
-    /* initialize caller's top-level ctx */
-    memset ( ctx, 0, sizeof * ctx );
-    ctx -> rsrc = & s_rsrc;
-    ctx -> loc = loc;
-
-    /* singleton initialization */
-    initialized = atomic32_read ( & s_initialized );
-    if ( 0 <= initialized && initialized < 2 )
-    {
-        /* acquire lock */
-        int status = pthread_mutex_lock ( & crit );
-        if ( status != 0 )
-            exit ( status );
-
-        initialized = atomic32_read ( & s_initialized );
-        if ( 0 <= initialized && initialized < 2 )
-        {
-            KCtx local_ctx;
-            DECLARE_FUNC_LOC ( rcRuntime, rcMgr, rcConstructing );
-
-            /* link a new local context */
-            ctx_init ( & local_ctx, ( ctx_t* ) & ctx, & s_func_loc );
-
-            /* common initializer-errors are
-               propagated to and handled by caller */
-            rsrc_init ( & s_rsrc, ctx, full );
-
-            /* mark the level of initialization */
-            atomic32_set ( & s_initialized, full ? 2 : 1 );
-
-            if ( full )
-            {
-                /* register global cleanup */
-                status = atexit ( atexit_task );
-                if ( status != 0 )
-                    SYSTEM_ERROR ( xcUnexpected, "atexit failed: %!", status );
-            }
-        }
-
-        /* release lock */
-        pthread_mutex_unlock ( & crit );
-    }
-}
-
-
-/* Whack
- *  the global KRsrc may be referenced by local KRsrc
- */
-void KRsrcGlobalWhack ( ctx_t ctx )
-{
-    if ( atomic32_read ( & s_initialized ) > 0 )
-    {
-        /* acquire lock, but ignore status */
-        int status = pthread_mutex_lock ( & crit );
-        if ( status != 0 || atomic32_read ( & s_initialized ) > 0 )
-        {
-            /* early whack of KProcMgr */
-            KProcMgrRelease ( s_rsrc . proc );
-            s_rsrc . proc = NULL;
-
-            /* run destructor tasks while we still have other mgrs */
-            /*KProcMgrWhack ();*/
-
-            /* tear it down */
-            KRsrcWhack ( & s_rsrc, ctx );
-
-            /* mark as torn down */
-            atomic32_set ( & s_initialized, -1 );
-        }
-
-        /* release lock */
-        pthread_mutex_unlock ( & crit );
-    }
-}
diff --git a/libs/kfc/vtbl.c b/libs/kfc/vtbl.c
deleted file mode 100644
index 4daeacc..0000000
--- a/libs/kfc/vtbl.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-typedef struct KVTableCacheCleanup KVTableCacheCleanup;
-#define KTASK_IMPL KVTableCacheCleanup
-
-#include <sysalloc.h>
-
-#include <kfc/extern.h>
-#include <kfc/vtbl-impl.h>
-#include <kfc/except.h>
-#include <kfc/ctx.h>
-#include <kfc/xc.h>
-
-#include <kproc/impl.h>
-#include <atomic.h>
-
-
-/* KVTableCacheCleanup
- */
-struct KVTableCacheCleanup
-{
-    /* THIS WILL BREAK WHEN TASK GETS CONVERTED
-       SHOULD BE EXPLICITLY KTask_v1
-       NB - don't use KTask_v2, because that will
-       have a vtable being cleaned up */
-    KTask dad;
-
-    /* all vtable caches are stored in a singly-linked list */
-    atomic_ptr_t list;
-};
-
-/* Whack
- *  
- */
-static
-rc_t CC KVTableCacheCleanupWhack ( KVTableCacheCleanup * self )
-{
-    KTaskDestroy ( & self -> dad, "KVTableCacheCleanup" );
-    free ( self );
-    return 0;
-}
-
-/* Execute
- *  perform deferred operation
- */
-static
-rc_t CC KVTableCacheCleanupExecute ( KVTableCacheCleanup * self )
-{
-    KHierCache * test, * read = self -> list . ptr;
-    if ( read != NULL ) do
-        read = atomic_test_and_set_ptr ( & self -> list, NULL, test = read );
-    while ( read != test );
-
-    while ( read != NULL )
-    {
-        test = ( void* ) read -> next;
-        /* may insert a debug statement here */
-        free ( read );
-        read = test;
-    }
-
-    return 0;
-}
-
-static
-KTask_vt_v1 KVTableCacheCleanup_vt =
-{
-    1, 0,
-    KVTableCacheCleanupWhack,
-    KVTableCacheCleanupExecute
-};
-
-static
-void KVTableAddHierCacheToCleanupTask ( KHierCache * cache, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcRuntime, rcQueue, rcInserting );
-
-    KHierCache * test, * read;
-    KVTableCacheCleanup * local_task;
-
-    static atomic_ptr_t cleanup_task;
-    if ( cleanup_task . ptr == NULL )
-    {
-        rc_t rc;
-        local_task = malloc ( sizeof * local_task );
-        if ( local_task == NULL )
-        {
-            SYSTEM_ERROR ( xcNoMemory, "allocating %zu bytes", sizeof * local_task );
-            return;
-        }
-
-        rc = KTaskInit ( & local_task -> dad,
-            ( const KTask_vt* ) & KVTableCacheCleanup_vt, "KVTableCacheCleanup", "" );
-        if ( rc != 0 )
-        {
-            INTERNAL_ERROR ( xcUnexpected, "%R", rc );
-            ( ( KCtx* ) ctx ) -> rc = rc;
-            free ( local_task );
-            return;
-        }
-
-        cache -> next = NULL;
-        local_task -> list . ptr = cache;
-        if ( atomic_test_and_set_ptr ( & cleanup_task, local_task, NULL ) == NULL )
-            return;
-
-        KVTableCacheCleanupWhack ( local_task );
-    }
-
-    local_task = cleanup_task . ptr;
-    read = local_task -> list . ptr;
-    do
-    {
-        cache -> next = test = read;
-        read = atomic_test_and_set_ptr ( & local_task -> list, cache, test );
-    }
-    while ( read != test );
-}
-
-
-/* Depth
- */
-static
-uint32_t KVTableDepth ( KVTable * self /*, ctx_t ctx */ )
-{
-    uint32_t idx;
-
-    assert ( self -> itf != NULL );
-    idx = self -> itf -> idx;
-
-    if ( idx == 0 && self -> parent != NULL )
-    {
-        KItfTok * itf = ( KItfTok * ) self -> itf;
-        idx = KVTableDepth ( ( KVTable* ) self -> parent /*, ctx */ ) + 1;
-        itf -> idx = idx;
-    }
-
-    return idx;
-}
-
-
-/* Resolve
- *  walks a vtable's hierarchy
- *  builds a linear array cache of casting pointers
- *  dynamically configures KItfTok objects to cache their runtime offset
- */
-void KVTableResolve ( const KVTable * cself, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcRuntime, rcTable, rcResolving );
-
-    KVTable * self = ( KVTable* ) cself;
-    if ( self != NULL && self -> cache == NULL )
-    {
-        uint32_t idx = KVTableDepth ( self /*, ctx */ );
-
-        KHierCache * cache;
-        size_t bytes = sizeof * cache - sizeof cache -> parent + idx + sizeof cache -> parent [ 0 ];
-
-        cache = malloc ( bytes );
-        if ( cache == NULL )
-            SYSTEM_ERROR ( xcNoMemory, "allocating %zu bytes", bytes );
-        else
-        {
-            cache -> next = NULL;
-            cache -> length = idx;
-
-            TRY ( KVTableAddHierCacheToCleanupTask ( cache, ctx ) )
-            {
-                self -> cache = cache;
-
-                do
-                {
-                    assert ( idx != 0 );
-                    cache -> parent [ -- idx ] = self;
-                    self = ( KVTable* ) self -> parent;
-                }
-                while ( self != NULL );
-            }
-        }
-    }
-}
diff --git a/libs/kfc/win/sysctx.c b/libs/kfc/win/sysctx.c
deleted file mode 100644
index 4c3a299..0000000
--- a/libs/kfc/win/sysctx.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/rsrc-global.h>
-#include <kfc/except.h>
-#include <kfc/rc.h>
-#include <kfc/xc.h>
-#include <kproc/procmgr.h>
-#include <kproc/task.h>
-#include <kproc/impl.h>
-#include <klib/container.h>
-
-#include <sysalloc.h>
-
-#include <atomic32.h>
-
-#include "rsrc-priv.h"
-#include "sysctx-priv.h"
-
-#include <WINDOWS.H>
-#include <string.h>
-#include <assert.h>
-
-/* thread-local storage */
-typedef struct TLS TLS;
-struct TLS
-{
-    DLNode n;
-    KRsrc rsrc;
-    KCtx ctx;
-    DWORD threadId;
-};
-
-static DWORD key;
-static DLList s_tls;
-static uint32_t s_tls_count;
-static CRITICAL_SECTION crit;
-static atomic32_t key_once, crit_once;
-
-
-/* whack
- *  whack thread-local storage
- */
-static
-void CC whack_tls ( DLNode * n, void * ignore )
-{
-    TLS * tls = ( TLS * ) n;
-
-    /* the "parent" ctx */
-    ctx_t ctx = & tls -> ctx;
-    FUNC_ENTRY ( ctx, rcRuntime, rcThread, rcDestroying );
-
-    /* whack the resource managers */
-    KRsrcWhack ( & tls -> rsrc, ctx );
-
-    /* free the memory */
-    free ( tls );
-
-    /* reduce the count */
-    -- s_tls_count;
-}
-
-static
-void win_thread_once ( atomic32_t * once, void ( * trigger ) ( void ) )
-{
-    switch ( atomic32_test_and_set ( once, 1, 0 ) )
-    {
-    case 0:
-        ( * trigger ) ();
-        atomic32_set ( once, 2 );
-        break;
-    case 1:
-        while ( atomic32_read ( once ) == 1 )
-            Sleep ( 1 );
-        break;
-    case 2:
-        break;
-    }
-}
-
-static
-void init_crit ( void )
-{
-    InitializeCriticalSection ( & crit );
-}
-
-static
-void enter_critical_section ( void )
-{
-    /* Windows didn't come up with the concept of
-       multi-thread-safe critical sections until Vista */
-    win_thread_once ( & crit_once, init_crit );
-
-    EnterCriticalSection ( & crit );
-}
-
-static
-void leave_critical_section ( void )
-{
-    LeaveCriticalSection ( & crit );
-}
-
-static
-TLS * win_thread_getspecific ( DWORD tlsKey )
-{
-    return TlsGetValue ( tlsKey );
-}
-
-static
-bool CC eliminate_dups ( DLNode * n, void * data )
-{
-    const TLS * tls = ( const void * ) data;
-    if ( ( ( const TLS * ) n ) -> threadId != tls -> threadId )
-        return false;
-
-    DLListUnlink ( & s_tls, n );
-    whack_tls ( n, NULL );
-    return true;
-}
-
-static
-void CC garbage_collect_tls ( DLNode * n, void * ignore )
-{
-    TLS * tls = ( TLS* ) n;
-    HANDLE t = OpenThread ( THREAD_QUERY_INFORMATION, FALSE, tls -> threadId );
-    if ( t != NULL )
-        CloseHandle ( t );
-    else
-    {
-        DLListUnlink ( & s_tls, & tls -> n );
-        whack_tls ( & tls -> n, NULL );
-    }
-}
-
-static
-void win_thread_setspecific ( DWORD tlsKey, TLS * tls )
-{
-    /* record the thread id */
-    tls -> threadId = GetCurrentThreadId ();
-
-    /* need to record these for cleanup function */
-    enter_critical_section ();
-
-    /* quickly scan for reused thread id */
-    DLListDoUntil ( & s_tls, false, eliminate_dups, tls );
-
-    /* push the entry */
-    DLListPushTail ( & s_tls, & tls -> n );
-
-    /* try to garbage collect for threads
-       that have already exited */
-    if ( ++ s_tls_count >= 64 )
-        DLListForEach ( & s_tls, false, garbage_collect_tls, NULL );
-
-    /* done with the list */
-    leave_critical_section ();
-
-    /* store it on the thread */
-    TlsSetValue ( tlsKey, tls );
-}
-
-
-/* make_tls
- *  create thread-local storage
- */
-static
-TLS * make_tls ( const KFuncLoc * func_loc )
-{
-    ctx_t ctx;
-
-    /* create the storage */
-    TLS * tls = calloc ( 1, sizeof * tls );
-    if ( tls == NULL )
-        exit ( -1 );
-
-    /* grab its context */
-    ctx = & tls -> ctx;
-
-    /* recover process-global resources */
-    TRY ( KRsrcGlobalInit ( & tls -> ctx, func_loc, true ) )
-    {
-        /* attach references */
-        TRY ( KRsrcInit ( & tls -> rsrc, ctx ) )
-        {
-            /* reset context */
-            tls -> ctx . rsrc = & tls -> rsrc;
-
-            /* set on thread */
-            win_thread_setspecific ( key, tls );
-            assert ( ! FAILED () );
-        }
-    }
-
-    if ( FAILED () )
-    {
-        free ( tls );
-        exit ( -1 );
-    }
-
-    return tls;
-}
-
-static
-rc_t CC TLSCleanupTaskWhack ( KTask * self )
-{
-    KTaskDestroy ( self, "TLSCleanupTask" );
-    free ( self );
-    return 0;
-}
-
-static
-rc_t CC TLSCleanupTaskExecute ( KTask * self )
-{
-    DLListWhack ( & s_tls, whack_tls, NULL );
-    return 0;
-}
-
-static KTask_vt_v1 TLSCleanupTask_vt =
-{
-    1, 0,
-    TLSCleanupTaskWhack,
-    TLSCleanupTaskExecute
-};
-
-static
-void install_cleanup_task ( void )
-{
-    rc_t rc = KProcMgrInit ();
-    if ( rc == 0 )
-    {
-        KProcMgr * mgr;
-        rc = KProcMgrMakeSingleton ( & mgr );
-        if ( rc == 0 )
-        {
-            /* create task to install into procmgr */
-            KTask * task = malloc ( sizeof * task );
-            if ( task != NULL )
-            {
-                rc = KTaskInit ( task,
-                    ( const KTask_vt * ) & TLSCleanupTask_vt,
-                    "TLSCleanupTask", "" );
-                if ( rc != 0 )
-                    free ( task );
-                else
-                {
-                    KTaskTicket ticket;
-                    rc = KProcMgrAddCleanupTask ( mgr, & ticket, task );
-                    if ( rc != 0 )
-                        KTaskRelease ( task );
-                }
-            }
-
-            KProcMgrRelease ( mgr );
-        }
-    }
-}
-
-/* make_key
- *  initialize the thread-local storage key
- */
-static
-void make_key ( void )
-{
-    /* install cleanup task -
-       Windows doesn't appear to support
-       libraries that create TLS but
-       don't own the thread main */
-    install_cleanup_task ();
-                        
-    /* create key into thread-local storage */
-    key = TlsAlloc ();
-}
-
-
-/* get_tls_ctx
- *  reads thread-local storage
- */
-static
-const KCtx * get_tls_ctx ( const KFuncLoc * func_loc )
-{
-    TLS * tls;
-
-    /* ensure the key is there */
-    win_thread_once ( & key_once, make_key );
-
-    /* retrieve the existing tls */
-    tls = win_thread_getspecific ( key );
-
-    /* create a new one if missing */
-    if ( tls == NULL )
-    {
-        tls = make_tls ( func_loc );
-        assert ( tls != NULL );
-    }
-
-    return & tls -> ctx;
-}
-
-
-/* ctx_recover
- *  queries thread for previously stored KRsrc block
- *  creates a new one if necessary
- */
-ctx_t ctx_recover ( KCtx * new_ctx, const KFuncLoc * func_loc )
-{
-    DECLARE_FUNC_LOC ( rcRuntime, rcMgr, rcOpening );
-
-    if ( new_ctx != NULL )
-    {
-        const KCtx * ctx = get_tls_ctx ( & s_func_loc );
-
-        /* clear new_ctx and initialize special members */
-        RESET_CTX(new_ctx, ctx, func_loc);
-    }
-
-    return new_ctx;
-}
diff --git a/libs/kfc/win/sysrsrc.c b/libs/kfc/win/sysrsrc.c
deleted file mode 100644
index 01a287d..0000000
--- a/libs/kfc/win/sysrsrc.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/extern.h>
-#include <kfc/rsrc.h>
-#include <kfc/rsrc-global.h>
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/rc.h>
-#include <kfc/xc.h>
-#include <kproc/procmgr.h>
-#include <atomic32.h>
-
-#include "rsrc-priv.h"
-
-#include <WINDOWS.H>
-#include <string.h>
-#include <assert.h>
-
-
-static KRsrc s_rsrc;
-static CRITICAL_SECTION crit;
-static atomic32_t s_initialized, crit_once;
-
-static
-void win_thread_once ( atomic32_t * once, void ( * trigger ) ( void ) )
-{
-    switch ( atomic32_test_and_set ( once, 1, 0 ) )
-    {
-    case 0:
-        ( * trigger ) ();
-        atomic32_set ( once, 2 );
-        break;
-    case 1:
-        while ( atomic32_read ( once ) == 1 )
-            Sleep ( 1 );
-        break;
-    case 2:
-        break;
-    }
-}
-
-static
-void init_crit ( void )
-{
-    InitializeCriticalSection ( & crit );
-}
-
-static
-void enter_critical_section ( void )
-{
-    /* Windows didn't come up with the concept of
-       multi-thread-safe critical sections until Vista */
-    win_thread_once ( & crit_once, init_crit );
-
-    EnterCriticalSection ( & crit );
-}
-
-static
-void leave_critical_section ( void )
-{
-    LeaveCriticalSection ( & crit );
-}
-
-static
-void atexit_task ( void )
-{
-    if ( atomic32_read ( & s_initialized ) == 2 )
-    {
-        KCtx local_ctx;
-        DECLARE_FUNC_LOC ( rcRuntime, rcMgr, rcDestroying );
-        memset ( & local_ctx, 0, sizeof local_ctx );
-        local_ctx . rsrc = & s_rsrc;
-        local_ctx . loc = & s_func_loc;
-
-        KRsrcGlobalWhack ( & local_ctx );
-    }
-}
-
-/* Global
- *  retrieve process-global singleton KRsrc block
- *  creates and initializes block on initial request
- *  caches pointer for subsequent requests
- */
-void KRsrcGlobalInit ( KCtx * ctx, const KFuncLoc * loc, bool full )
-{
-    int initialized;
-
-    assert ( ctx != NULL );
-    assert ( loc != NULL );
-
-    /* initialize caller's top-level ctx */
-    memset ( ctx, 0, sizeof * ctx );
-    ctx -> rsrc = & s_rsrc;
-    ctx -> loc = loc;
-
-    /* singleton initialization */
-    initialized = atomic32_read ( & s_initialized );
-    if ( 0 <= initialized && initialized < 2 )
-    {
-        /* acquire lock */
-        enter_critical_section ();
-    
-        initialized = atomic32_read ( & s_initialized );
-        if ( 0 <= initialized && initialized < 2 )
-        {
-            KCtx local_ctx;
-            DECLARE_FUNC_LOC ( rcRuntime, rcMgr, rcConstructing );
-
-            /* link a new local context */
-            ctx_init ( & local_ctx, ( ctx_t* ) & ctx, & s_func_loc );
-
-            /* common initializer- errors are
-               propagated to and handled by caller */
-            rsrc_init ( & s_rsrc, ctx, full );
-
-            /* mark the level of initialization */
-            atomic32_set ( & s_initialized, full ? 2 : 1 );
-
-            if ( full )
-            {
-                /* register global cleanup */
-                int status = atexit ( atexit_task );
-                if ( status != 0 )
-                    SYSTEM_ERROR ( xcUnexpected, "atexit failed: %!", status );
-            }
-        }
-
-        /* release lock */
-        leave_critical_section ();
-    }
-}
-
-
-/* Whack
- *  the global KRsrc may be referenced by local KRsrc
- */
-void KRsrcGlobalWhack ( ctx_t ctx )
-{
-    if ( atomic32_read ( & s_initialized ) > 0 )
-    {
-        /* acquire lock, but ignore status */
-        enter_critical_section ();
-        if ( atomic32_read ( & s_initialized ) > 0 )
-        {
-            /* early whack of KProcMgr */
-            KProcMgrRelease ( s_rsrc . proc );
-            s_rsrc . proc = NULL;
-
-            /* run destructor tasks while we still have other mgrs */
-            KProcMgrWhack ();
-
-            /* tear it down */
-            KRsrcWhack ( & s_rsrc, ctx );
-
-            /* mark as torn down */
-            atomic32_set ( & s_initialized, -1 );
-        }
-
-        /* release lock */
-        leave_critical_section ();
-    }
-}
diff --git a/libs/kfc/xc.c b/libs/kfc/xc.c
deleted file mode 100644
index c1f800d..0000000
--- a/libs/kfc/xc.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/extern.h>
-
-/* generate forward declarations for everything */
-#include <kfc/xcext.h>
-#include <kfc/xc.h>
-
-/* generate static definitions */
-#undef _h_kfc_xc_
-#include <kfc/xcgen.h>
-#include <kfc/xc.h>
diff --git a/libs/kfg/.gitignore b/libs/kfg/.gitignore
deleted file mode 100644
index d7efc7e..0000000
--- a/libs/kfg/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.def
-*.output
diff --git a/libs/kfg/Makefile b/libs/kfg/Makefile
deleted file mode 100644
index 264ffdb..0000000
--- a/libs/kfg/Makefile
+++ /dev/null
@@ -1,126 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: all
-
-TOP ?= $(abspath ../..)
-MODULE = libs/kfg
-
-INT_LIBS = \
-	libkfg
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES = \
-	$(KFG_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-#INTERM_SRC = \
-	$(SRCDIR)/config-lex.c \
-	$(SRCDIR)/config-grammar.c \
-	$(SRCDIR)/config-tokens.h 
-
-clean: stdclean
-	@ rm -f $(addsuffix /default.kfg,$(NCBIDIR)) $(TEST_BINDIR)/ncbi/default.kfg
-
-.PHONY: clean
-
-#.SECONDARY: $(INTERM_SRC)
-
-#-------------------------------------------------------------------------------
-# kfg
-#
-$(ILIBDIR)/libkfg: $(TARGDIR)/default.kfg $(addprefix $(ILIBDIR)/libkfg.,$(ILIBEXT))
-
-$(TARGDIR)/default.kfg: $(addsuffix /default.kfg,$(NCBIDIR)) $(TEST_BINDIR)/ncbi/default.kfg
-
-$(addsuffix /default.kfg,$(NCBIDIR)): $(SRCDIR)/default.kfg
-	cp $^ $@
-
-ifneq ($(NCBIDIR),$(TEST_BINDIR)/ncbi)
-$(TEST_BINDIR)/ncbi/default.kfg: $(SRCDIR)/default.kfg
-	mkdir -p $(TEST_BINDIR)/ncbi
-	cp $^ $@
-endif
-
-KFG_SRC = \
-	config-lex \
-	config-grammar \
-	config \
-	config-aws \
-	kart \
-	repository \
-	properties \
-	ngc \
-	report-kfg \
-    keystore 
-
-# flex/bison should only be invoked manually in an environment ensures the correct versions:
-# bison 2.5, flex 2.5.35
-bison:
-	bison -o $(SRCDIR)/config-grammar.c --defines=$(SRCDIR)/config-tokens.h -v --no-lines $(SRCDIR)/config-grammar.y    
-
-flex:    
-	flex -t $(SRCDIR)/config-lex.l | grep -v '^#line' > $(SRCDIR)/config-lex.c
-
-#$(SRCDIR)/config-grammar.c $(SRCDIR)/config-tokens.h: $(SRCDIR)/config-grammar.y
-#	$(YACC) -o $(SRCDIR)/config-grammar.c --defines=$(SRCDIR)/config-tokens.h $^
-
-KFG_OBJ = \
-	$(addsuffix .$(LOBX),$(KFG_SRC))
-
-KFG_LIB = \
-	-dkfs \
-	-dklib
-
-$(ILIBDIR)/libkfg.$(LIBX): $(KFG_OBJ)
-	$(LD) --slib -o $@ $^ $(KFG_LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/kfg/config-aws.c b/libs/kfg/config-aws.c
deleted file mode 100644
index 4271d15..0000000
--- a/libs/kfg/config-aws.c
+++ /dev/null
@@ -1,315 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <klib/printf.h>
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-
-#include <ctype.h>
-#include <os-native.h>
-#include <stdlib.h>
-
-#include <kfg/kfg-priv.h>
-
-static
-rc_t aws_KConfigNodeUpdateChild ( KConfigNode *self, String *name, String *value )
-{
-    KConfigNode * child;
-    rc_t rc = KConfigNodeOpenNodeUpdate ( self, & child, "%S", name );
-    if ( rc == 0 )
-    {
-        rc = KConfigNodeWrite ( child, value -> addr, value -> size );
-        KConfigNodeRelease ( child );
-    }
-
-    return rc;
-}
-    
-static
-void StringTrim ( String *trim, const String *source )
-{
-    uint32_t str_len = source -> len;
-    const char *start = source -> addr;
-    const char *end = start + source -> size;
-
-    while ( start < end )
-    {
-        if ( ! isspace ( * start ) )
-            break;
-
-        ++ start;
-        -- str_len;
-    } 
-
-    while ( end > start )
-    {
-        if ( ! isspace ( end [ - 1 ] ) )
-            break;
-
-        -- end;
-        -- str_len;
-    } 
-
-    StringInit ( trim, start, end - start, str_len );
-}
-
-static
-rc_t aws_extract_key_value_pair ( const String *source, String *key, String *val )
-{
-    String k, v;
-    const char *start = source -> addr;
-    const char *end = start + source -> size;
-
-    char *eql = string_chr ( start, source -> size, '=' );
-    if ( eql == NULL )
-        return RC ( rcKFG, rcChar, rcSearching, rcFormat, rcInvalid );
-
-    /* key */
-    StringInit ( &k, start, eql - start, string_len ( start, eql - start ) );
-    StringTrim ( key, &k );
-
-    start = eql + 1;
-
-    /* value */
-    StringInit ( &v, start, end - start,  string_len ( start, end - start ) ); 
-    StringTrim ( val, &v );
-    return 0;
-}
-
-static
-void aws_parse_file ( const KFile *self, KConfigNode *aws_node, 
-                      char *buffer, size_t buf_size, bool isCredentialsFile )
-{
-    char *sep;
-    const char *start = buffer;
-    const char *end = start + buf_size;
-
-    for ( ; start < end; start = sep + 1 )
-    {
-        rc_t rc;
-        String string, trim;
-        String key, value;
-        
-        sep = string_chr ( start, end - start, '\n' );
-        if ( sep == NULL )
-            sep = ( char * ) end;
-
-        StringInit ( &string, start, sep - start, string_len ( start, sep - start ) );
-        
-        StringTrim ( &trim, &string );
-
-        /* check for comment line and skip */
-        if ( StringLength ( & trim ) != 0 && trim . addr [ 0 ] == '#' )
-            continue;
-
-        /* check for [default] line */
-        if ( StringLength ( & trim ) != 0 && trim . addr [ 0 ] == '[' )
-            continue;
-
-        /* check for key/value pairs and skip if none found */
-        rc = aws_extract_key_value_pair ( &trim, &key, &value );
-        if ( rc != 0 )
-            continue;
-
-        /* now check keys we are looking for and populate the node*/
-        if ( isCredentialsFile )
-        {
-            String access_key_id, secret_access_key;
-            CONST_STRING ( &access_key_id, "aws_access_key_id" );
-            CONST_STRING ( &secret_access_key, "aws_secret_access_key" );
-
-            if ( StringCaseEqual ( &key, &access_key_id ) )
-            {
-                rc = aws_KConfigNodeUpdateChild ( aws_node, &key, &value );
-                if ( rc != 0 )
-                    return;
-            }
-            if ( StringCaseEqual ( &key, &secret_access_key  ) )
-            {
-                rc = aws_KConfigNodeUpdateChild ( aws_node, &key, &value );
-                if ( rc != 0 )
-                    return;
-            }
-        }
-        else
-        {
-            String region, output;
-            CONST_STRING ( &region, "region" );
-            CONST_STRING ( &output, "output" );
-
-            if ( StringCaseEqual ( &key, &region ) )
-            {
-                rc = aws_KConfigNodeUpdateChild ( aws_node, &key, &value );
-                if ( rc != 0 )
-                    return;
-            }
-            if ( StringCaseEqual ( &key, &output  ) )
-            {
-                rc = aws_KConfigNodeUpdateChild ( aws_node, &key, &value );
-                if ( rc != 0 )
-                    return;
-            }
-        }
-    }
-}
-
-static
-rc_t aws_find_nodes ( KConfigNode *aws_node, const char *aws_path )
-{
-    KDirectory *wd;
-
-    rc_t rc = KDirectoryNativeDir ( &wd );
-    if ( rc == 0 )
-    {
-        char *buffer;
-        size_t num_read;
-        uint64_t buf_size;
-
-        const KFile *credentials, *config;
-
-        rc = KDirectoryOpenFileRead ( wd, &credentials, "%s%s", aws_path, "/credentials" );
-        if ( rc == 0 )
-        {
-            rc = KFileSize ( credentials, &buf_size );
-            if ( rc == 0 )
-            {
-                buffer = malloc ( buf_size );
-                if ( buffer != NULL )
-                {
-                    rc = KFileReadAll ( credentials, 0, buffer, ( size_t ) buf_size, &num_read );
-
-                    if ( rc == 0 )
-                        aws_parse_file ( credentials, aws_node, buffer, num_read, true );
-
-                    free ( buffer );
-                }
-
-            }
-
-            KFileRelease ( credentials );
-        }
-
-        rc = KDirectoryOpenFileRead ( wd, &config, "%s%s", aws_path, "/config" );
-        if ( rc == 0 )
-        {
-            rc = KFileSize ( config, &buf_size );
-            if ( rc == 0 )
-            {
-                buffer = malloc ( buf_size );
-                if ( buffer != NULL )
-                {
-                    rc = KFileReadAll ( config, 0, buffer, ( size_t ) buf_size, &num_read );
-                    
-                    if ( rc == 0 )
-                        aws_parse_file ( config, aws_node, buffer, num_read, false );
-
-                    free ( buffer );
-                }
-            }
-
-            KFileRelease ( config );
-        }
-
-        KDirectoryRelease ( wd );
-    }            
-           
-    return rc;
-}
-
-
-static
-void check_env ( const KConfig *self, char *path, size_t path_size )
-{
-    size_t num_read;
-    const char *home;
-    
-    const KConfigNode *home_node;
-    
-    /* Check to see if home node exists */
-    rc_t rc = KConfigOpenNodeRead ( self, &home_node, "HOME" );
-    if ( home_node == NULL )
-    {
-        /* just grab the HOME env variable */
-        home = getenv ( "HOME" );
-        if ( home != NULL )
-        {
-            num_read = string_copy_measure ( path, path_size, home );
-            if ( num_read >= path_size )
-                path [ 0 ] = 0;
-        }
-    }
-    else
-    {
-        /* if it exists check for a path */
-        rc = KConfigNodeRead ( home_node, 0, path, path_size, &num_read, NULL );
-        if ( rc != 0 )
-        {
-            home = getenv ( "HOME" );
-            if ( home != NULL )
-            {
-                num_read = string_copy_measure ( path, path_size, home );
-                if ( num_read >= path_size )
-                    path [ 0 ] = 0;
-            }
-
-        }
-        
-        rc = KConfigNodeRelease ( home_node );
-    }
-}
-
-extern
-void add_aws_nodes ( KConfig *self )
-{
-    char home [ 4096 ] = "";
-
-    size_t num_writ;
-    char path [ 4096 ];
-    rc_t rc;
-
-    check_env ( self, home, sizeof home );
-    /* if home environtment is found, create AWS root node */
-
-    if ( home [ 0 ] != 0 )
-    {
-        rc = string_printf ( path, sizeof path, &num_writ, "%s/.aws", home );
-        if ( rc == 0 && num_writ != 0 )
-        {
-            KConfigNode *aws_node;
-            
-            /* create aws node */
-            rc = KConfigOpenNodeUpdate ( self, &aws_node, "AWS", NULL );
-            if ( rc == 0 )
-                rc = aws_find_nodes ( aws_node, path );
-            
-            rc = KConfigNodeRelease ( aws_node );
-        }
-    }
-}
diff --git a/libs/kfg/config-grammar.c b/libs/kfg/config-grammar.c
deleted file mode 100644
index 99bd538..0000000
--- a/libs/kfg/config-grammar.c
+++ /dev/null
@@ -1,1726 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.5.  */
-
-/* Bison implementation for Yacc-like parsers in C
-   
-      Copyright (C) 1984, 1989-1990, 2000-2011 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 3 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, see <http://www.gnu.org/licenses/>.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-   
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
-   simplifying the original so-called "semantic" parser.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
-
-/* Identify Bison output.  */
-#define YYBISON 1
-
-/* Bison version.  */
-#define YYBISON_VERSION "2.5"
-
-/* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers.  */
-#define YYPURE 1
-
-/* Push parsers.  */
-#define YYPUSH 0
-
-/* Pull parsers.  */
-#define YYPULL 1
-
-/* Using locations.  */
-#define YYLSP_NEEDED 0
-
-/* Substitute the variable and function names.  */
-#define yyparse         KFG_parse
-#define yylex           KFG_lex
-#define yyerror         KFG_error
-#define yylval          KFG_lval
-#define yychar          KFG_char
-#define yydebug         KFG_debug
-#define yynerrs         KFG_nerrs
-
-
-/* Copy the first part of user declarations.  */
-
-  
-    #include "kfg-parse.h"
-    #include <sysalloc.h>
-    #include <klib/rc.h>
-    #include <klib/namelist.h>
-    
-    #define YYSTYPE KFGSymbol
-    #include "config-tokens.h"
-        
-    #define KFG_lex KFGScan_yylex
-    
-    /* required parameter to VNamelistMake */
-    #define NAMELIST_ALLOC_BLKSIZE 10
-    
-    static void ReportRc(KFGParseBlock* pb, KFGScanBlock* sb, rc_t rc);
-    static void AppendName(KFGScanBlock* sb, VNamelist*, const KFGToken*);
-    static void KFG_error(KFGParseBlock* pb, KFGScanBlock* sb, const char* msg);
-
-
-
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     kfgEND_INPUT = 0,
-     kfgEND_LINE = 258,
-     kfgUNTERM_STRING = 259,
-     kfgUNTERM_ESCAPED_STRING = 260,
-     kfgUNRECOGNIZED = 261,
-     kfgVAR_REF = 262,
-     kfgUNTERM_VAR_REF = 263,
-     kfgASSIGN = 264,
-     kfgSTRING = 265,
-     kfgESCAPED_STRING = 266,
-     kfgABS_PATH = 267,
-     kfgREL_PATH = 268
-   };
-#endif
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-
-
-    KFGToken                pb;
-    const struct VNamelist* namelist;
-
-
-
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-
-/* Copy the second part of user declarations.  */
-
-
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
-#else
-typedef short int yytype_int8;
-#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
-
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-#  define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-#  define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# else
-#  define YYSIZE_T unsigned int
-# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
-#  if ENABLE_NLS
-#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-#   define YY_(msgid) dgettext ("bison-runtime", msgid)
-#  endif
-# endif
-# ifndef YY_
-#  define YY_(msgid) msgid
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E.  */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
-#else
-# define YYUSE(e) /* empty */
-#endif
-
-/* Identity function, used to suppress warnings about constant conditions.  */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
-#else
-static int
-YYID (yyi)
-    int yyi;
-#endif
-{
-  return yyi;
-}
-#endif
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols.  */
-
-# ifdef YYSTACK_USE_ALLOCA
-#  if YYSTACK_USE_ALLOCA
-#   ifdef __GNUC__
-#    define YYSTACK_ALLOC __builtin_alloca
-#   elif defined __BUILTIN_VA_ARG_INCR
-#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-#   elif defined _AIX
-#    define YYSTACK_ALLOC __alloca
-#   elif defined _MSC_VER
-#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-#    define alloca _alloca
-#   else
-#    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef EXIT_SUCCESS
-#      define EXIT_SUCCESS 0
-#     endif
-#    endif
-#   endif
-#  endif
-# endif
-
-# ifdef YYSTACK_ALLOC
-   /* Pacify GCC's `empty if-body' warning.  */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-    /* The OS might guarantee only one guard page at the bottom of the stack,
-       and a page size can be as small as 4096 bytes.  So we cannot safely
-       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
-       to allow for a few compiler-allocated temporary stack slots.  */
-#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-#  endif
-# else
-#  define YYSTACK_ALLOC YYMALLOC
-#  define YYSTACK_FREE YYFREE
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-#  endif
-#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
-       && ! ((defined YYMALLOC || defined malloc) \
-	     && (defined YYFREE || defined free)))
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef EXIT_SUCCESS
-#    define EXIT_SUCCESS 0
-#   endif
-#  endif
-#  ifndef YYMALLOC
-#   define YYMALLOC malloc
-#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-#  ifndef YYFREE
-#   define YYFREE free
-#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
-
-#if (! defined yyoverflow \
-     && (! defined __cplusplus \
-	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member.  */
-union yyalloc
-{
-  yytype_int16 yyss_alloc;
-  YYSTYPE yyvs_alloc;
-};
-
-/* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
-   N elements.  */
-# define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
-      + YYSTACK_GAP_MAXIMUM)
-
-# define YYCOPY_NEEDED 1
-
-/* Relocate STACK from its old location to the new one.  The
-   local variables YYSIZE and YYSTACKSIZE give the old and new number of
-   elements in the stack, and YYPTR gives the new location of the
-   stack.  Advance YYPTR to a properly aligned location for the next
-   stack.  */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
-    do									\
-      {									\
-	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
-	Stack = &yyptr->Stack_alloc;					\
-	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-	yyptr += yynewbytes / sizeof (*yyptr);				\
-      }									\
-    while (YYID (0))
-
-#endif
-
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  YYSIZE_T yyi;				\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (YYID (0))
-#  endif
-# endif
-#endif /* !YYCOPY_NEEDED */
-
-/* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  13
-/* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   21
-
-/* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  14
-/* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  8
-/* YYNRULES -- Number of rules.  */
-#define YYNRULES  17
-/* YYNRULES -- Number of states.  */
-#define YYNSTATES  23
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
-#define YYUNDEFTOK  2
-#define YYMAXUTOK   268
-
-#define YYTRANSLATE(YYX)						\
-  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
-static const yytype_uint8 yytranslate[] =
-{
-       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
-       5,     6,     7,     8,     9,    10,    11,    12,    13
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
-   YYRHS.  */
-static const yytype_uint8 yyprhs[] =
-{
-       0,     0,     3,     5,     7,     9,    12,    17,    19,    22,
-      24,    26,    28,    30,    32,    35,    38,    40
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
-static const yytype_int8 yyrhs[] =
-{
-      15,     0,    -1,    16,    -1,     0,    -1,    17,    -1,    16,
-      17,    -1,    18,    19,    20,    21,    -1,     3,    -1,     1,
-      21,    -1,    12,    -1,    13,    -1,     9,    -1,    10,    -1,
-      11,    -1,    20,    10,    -1,    20,    11,    -1,     3,    -1,
-       0,    -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
-static const yytype_uint8 yyrline[] =
-{
-       0,    84,    84,    85,    89,    90,    94,   103,   104,   108,
-     109,   113,   117,   118,   119,   120,   124,   125
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
-   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
-static const char *const yytname[] =
-{
-  "kfgEND_INPUT", "error", "$undefined", "kfgEND_LINE",
-  "kfgUNTERM_STRING", "kfgUNTERM_ESCAPED_STRING", "kfgUNRECOGNIZED",
-  "kfgVAR_REF", "kfgUNTERM_VAR_REF", "kfgASSIGN", "kfgSTRING",
-  "kfgESCAPED_STRING", "kfgABS_PATH", "kfgREL_PATH", "$accept", "config",
-  "name_value_pairs", "name_value_pair", "pathname", "assign_op", "value",
-  "line_end", 0
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
-   token YYLEX-NUM.  */
-static const yytype_uint16 yytoknum[] =
-{
-       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
-     265,   266,   267,   268
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const yytype_uint8 yyr1[] =
-{
-       0,    14,    15,    15,    16,    16,    17,    17,    17,    18,
-      18,    19,    20,    20,    20,    20,    21,    21
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
-static const yytype_uint8 yyr2[] =
-{
-       0,     2,     1,     1,     1,     2,     4,     1,     2,     1,
-       1,     1,     1,     1,     2,     2,     1,     1
-};
-
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
-   Performed when YYTABLE doesn't specify something else to do.  Zero
-   means the default is an error.  */
-static const yytype_uint8 yydefact[] =
-{
-       0,     3,     0,     7,     9,    10,     0,     0,     4,     0,
-      17,    16,     8,     1,     5,    11,     0,    12,    13,     0,
-      14,    15,     6
-};
-
-/* YYDEFGOTO[NTERM-NUM].  */
-static const yytype_int8 yydefgoto[] =
-{
-      -1,     6,     7,     8,     9,    16,    19,    12
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-   STATE-NUM.  */
-#define YYPACT_NINF -5
-static const yytype_int8 yypact[] =
-{
-       0,    -5,     6,    -5,    -5,    -5,     2,     4,    -5,     1,
-      -5,    -5,    -5,    -5,    -5,    -5,    10,    -5,    -5,     8,
-      -5,    -5,    -5
-};
-
-/* YYPGOTO[NTERM-NUM].  */
-static const yytype_int8 yypgoto[] =
-{
-      -5,    -5,    -5,     7,    -5,    -5,    -5,    -4
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
-   positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -3
-static const yytype_int8 yytable[] =
-{
-       1,     2,    13,     3,    -2,     2,    10,     3,    10,    11,
-      15,    11,     4,     5,    14,    22,     4,     5,    20,    21,
-      17,    18
-};
-
-#define yypact_value_is_default(yystate) \
-  ((yystate) == (-5))
-
-#define yytable_value_is_error(yytable_value) \
-  YYID (0)
-
-static const yytype_uint8 yycheck[] =
-{
-       0,     1,     0,     3,     0,     1,     0,     3,     0,     3,
-       9,     3,    12,    13,     7,    19,    12,    13,    10,    11,
-      10,    11
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-   symbol of state STATE-NUM.  */
-static const yytype_uint8 yystos[] =
-{
-       0,     0,     1,     3,    12,    13,    15,    16,    17,    18,
-       0,     3,    21,     0,    17,     9,    19,    10,    11,    20,
-      10,    11,    21
-};
-
-#define yyerrok		(yyerrstatus = 0)
-#define yyclearin	(yychar = YYEMPTY)
-#define YYEMPTY		(-2)
-#define YYEOF		0
-
-#define YYACCEPT	goto yyacceptlab
-#define YYABORT		goto yyabortlab
-#define YYERROR		goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror.  This remains here temporarily
-   to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  However,
-   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
-   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
-   discussed.  */
-
-#define YYFAIL		goto yyerrlab
-#if defined YYFAIL
-  /* This is here to suppress warnings from the GCC cpp's
-     -Wunused-macros.  Normally we don't worry about that warning, but
-     some users do, and we want to make it easy for users to remove
-     YYFAIL uses, which will produce warnings from Bison 2.5.  */
-#endif
-
-#define YYRECOVERING()  (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value)					\
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    {								\
-      yychar = (Token);						\
-      yylval = (Value);						\
-      YYPOPSTACK (1);						\
-      goto yybackup;						\
-    }								\
-  else								\
-    {								\
-      yyerror (pb, sb, YY_("syntax error: cannot back up")); \
-      YYERROR;							\
-    }								\
-while (YYID (0))
-
-
-#define YYTERROR	1
-#define YYERRCODE	256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
-   If N is 0, then set CURRENT to the empty location which ends
-   the previous symbol: RHS[0] (always defined).  */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)				\
-    do									\
-      if (YYID (N))                                                    \
-	{								\
-	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
-	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
-	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
-	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
-	}								\
-      else								\
-	{								\
-	  (Current).first_line   = (Current).last_line   =		\
-	    YYRHSLOC (Rhs, 0).last_line;				\
-	  (Current).first_column = (Current).last_column =		\
-	    YYRHSLOC (Rhs, 0).last_column;				\
-	}								\
-    while (YYID (0))
-#endif
-
-
-/* This macro is provided for backward compatibility. */
-
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments.  */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (&yylval, YYLEX_PARAM)
-#else
-# define YYLEX yylex (&yylval, sb)
-#endif
-
-/* Enable debugging if requested.  */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args)			\
-do {						\
-  if (yydebug)					\
-    YYFPRINTF Args;				\
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
-do {									  \
-  if (yydebug)								  \
-    {									  \
-      YYFPRINTF (stderr, "%s ", Title);					  \
-      yy_symbol_print (stderr,						  \
-		  Type, Value, pb, sb); \
-      YYFPRINTF (stderr, "\n");						  \
-    }									  \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, KFGParseBlock* pb, KFGScanBlock* sb)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep, pb, sb)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-    KFGParseBlock* pb;
-    KFGScanBlock* sb;
-#endif
-{
-  if (!yyvaluep)
-    return;
-  YYUSE (pb);
-  YYUSE (sb);
-# ifdef YYPRINT
-  if (yytype < YYNTOKENS)
-    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
-  YYUSE (yyoutput);
-# endif
-  switch (yytype)
-    {
-      default:
-	break;
-    }
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, KFGParseBlock* pb, KFGScanBlock* sb)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep, pb, sb)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-    KFGParseBlock* pb;
-    KFGScanBlock* sb;
-#endif
-{
-  if (yytype < YYNTOKENS)
-    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-  else
-    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
-  yy_symbol_value_print (yyoutput, yytype, yyvaluep, pb, sb);
-  YYFPRINTF (yyoutput, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included).                                                   |
-`------------------------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
-    yytype_int16 *yybottom;
-    yytype_int16 *yytop;
-#endif
-{
-  YYFPRINTF (stderr, "Stack now");
-  for (; yybottom <= yytop; yybottom++)
-    {
-      int yybot = *yybottom;
-      YYFPRINTF (stderr, " %d", yybot);
-    }
-  YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top)				\
-do {								\
-  if (yydebug)							\
-    yy_stack_print ((Bottom), (Top));				\
-} while (YYID (0))
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced.  |
-`------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule, KFGParseBlock* pb, KFGScanBlock* sb)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule, pb, sb)
-    YYSTYPE *yyvsp;
-    int yyrule;
-    KFGParseBlock* pb;
-    KFGScanBlock* sb;
-#endif
-{
-  int yynrhs = yyr2[yyrule];
-  int yyi;
-  unsigned long int yylno = yyrline[yyrule];
-  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
-	     yyrule - 1, yylno);
-  /* The symbols being reduced.  */
-  for (yyi = 0; yyi < yynrhs; yyi++)
-    {
-      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
-      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
-		       &(yyvsp[(yyi + 1) - (yynrhs)])
-		       		       , pb, sb);
-      YYFPRINTF (stderr, "\n");
-    }
-}
-
-# define YY_REDUCE_PRINT(Rule)		\
-do {					\
-  if (yydebug)				\
-    yy_reduce_print (yyvsp, Rule, pb, sb); \
-} while (YYID (0))
-
-/* Nonzero means print parse trace.  It is left uninitialized so that
-   multiple parsers can coexist.  */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef	YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
-   if the built-in stack extension method is used).
-
-   Do not make this value too large; the results are undefined if
-   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
-   evaluated with infinite-precision integer arithmetic.  */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-#  if defined __GLIBC__ && defined _STRING_H
-#   define yystrlen strlen
-#  else
-/* Return the length of YYSTR.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
-    const char *yystr;
-#endif
-{
-  YYSIZE_T yylen;
-  for (yylen = 0; yystr[yylen]; yylen++)
-    continue;
-  return yylen;
-}
-#  endif
-# endif
-
-# ifndef yystpcpy
-#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-#   define yystpcpy stpcpy
-#  else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-   YYDEST.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
-    char *yydest;
-    const char *yysrc;
-#endif
-{
-  char *yyd = yydest;
-  const char *yys = yysrc;
-
-  while ((*yyd++ = *yys++) != '\0')
-    continue;
-
-  return yyd - 1;
-}
-#  endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
-   quotes and backslashes, so that it's suitable for yyerror.  The
-   heuristic is that double-quoting is unnecessary unless the string
-   contains an apostrophe, a comma, or backslash (other than
-   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
-   null, do not copy; instead, return the length of what the result
-   would have been.  */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
-  if (*yystr == '"')
-    {
-      YYSIZE_T yyn = 0;
-      char const *yyp = yystr;
-
-      for (;;)
-	switch (*++yyp)
-	  {
-	  case '\'':
-	  case ',':
-	    goto do_not_strip_quotes;
-
-	  case '\\':
-	    if (*++yyp != '\\')
-	      goto do_not_strip_quotes;
-	    /* Fall through.  */
-	  default:
-	    if (yyres)
-	      yyres[yyn] = *yyp;
-	    yyn++;
-	    break;
-
-	  case '"':
-	    if (yyres)
-	      yyres[yyn] = '\0';
-	    return yyn;
-	  }
-    do_not_strip_quotes: ;
-    }
-
-  if (! yyres)
-    return yystrlen (yystr);
-
-  return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
-   about the unexpected token YYTOKEN for the state stack whose top is
-   YYSSP.
-
-   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
-   not large enough to hold the message.  In that case, also set
-   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
-   required number of bytes is too large to store.  */
-static int
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
-                yytype_int16 *yyssp, int yytoken)
-{
-  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
-  YYSIZE_T yysize = yysize0;
-  YYSIZE_T yysize1;
-  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-  /* Internationalized format string. */
-  const char *yyformat = 0;
-  /* Arguments of yyformat. */
-  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-  /* Number of reported tokens (one for the "unexpected", one per
-     "expected"). */
-  int yycount = 0;
-
-  /* There are many possibilities here to consider:
-     - Assume YYFAIL is not used.  It's too flawed to consider.  See
-       <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
-       for details.  YYERROR is fine as it does not invoke this
-       function.
-     - If this state is a consistent state with a default action, then
-       the only way this function was invoked is if the default action
-       is an error action.  In that case, don't check for expected
-       tokens because there are none.
-     - The only way there can be no lookahead present (in yychar) is if
-       this state is a consistent state with a default action.  Thus,
-       detecting the absence of a lookahead is sufficient to determine
-       that there is no unexpected or expected token to report.  In that
-       case, just report a simple "syntax error".
-     - Don't assume there isn't a lookahead just because this state is a
-       consistent state with a default action.  There might have been a
-       previous inconsistent state, consistent state with a non-default
-       action, or user semantic action that manipulated yychar.
-     - Of course, the expected token list depends on states to have
-       correct lookahead information, and it depends on the parser not
-       to perform extra reductions after fetching a lookahead from the
-       scanner and before detecting a syntax error.  Thus, state merging
-       (from LALR or IELR) and default reductions corrupt the expected
-       token list.  However, the list is correct for canonical LR with
-       one exception: it will still contain any token that will not be
-       accepted due to an error action in a later state.
-  */
-  if (yytoken != YYEMPTY)
-    {
-      int yyn = yypact[*yyssp];
-      yyarg[yycount++] = yytname[yytoken];
-      if (!yypact_value_is_default (yyn))
-        {
-          /* Start YYX at -YYN if negative to avoid negative indexes in
-             YYCHECK.  In other words, skip the first -YYN actions for
-             this state because they are default actions.  */
-          int yyxbegin = yyn < 0 ? -yyn : 0;
-          /* Stay within bounds of both yycheck and yytname.  */
-          int yychecklim = YYLAST - yyn + 1;
-          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-          int yyx;
-
-          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
-                && !yytable_value_is_error (yytable[yyx + yyn]))
-              {
-                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-                  {
-                    yycount = 1;
-                    yysize = yysize0;
-                    break;
-                  }
-                yyarg[yycount++] = yytname[yyx];
-                yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-                if (! (yysize <= yysize1
-                       && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
-                  return 2;
-                yysize = yysize1;
-              }
-        }
-    }
-
-  switch (yycount)
-    {
-# define YYCASE_(N, S)                      \
-      case N:                               \
-        yyformat = S;                       \
-      break
-      YYCASE_(0, YY_("syntax error"));
-      YYCASE_(1, YY_("syntax error, unexpected %s"));
-      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
-      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
-      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
-      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-# undef YYCASE_
-    }
-
-  yysize1 = yysize + yystrlen (yyformat);
-  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
-    return 2;
-  yysize = yysize1;
-
-  if (*yymsg_alloc < yysize)
-    {
-      *yymsg_alloc = 2 * yysize;
-      if (! (yysize <= *yymsg_alloc
-             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
-        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
-      return 1;
-    }
-
-  /* Avoid sprintf, as that infringes on the user's name space.
-     Don't have undefined behavior even if the translation
-     produced a string with the wrong number of "%s"s.  */
-  {
-    char *yyp = *yymsg;
-    int yyi = 0;
-    while ((*yyp = *yyformat) != '\0')
-      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
-        {
-          yyp += yytnamerr (yyp, yyarg[yyi++]);
-          yyformat += 2;
-        }
-      else
-        {
-          yyp++;
-          yyformat++;
-        }
-  }
-  return 0;
-}
-#endif /* YYERROR_VERBOSE */
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol.  |
-`-----------------------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, KFGParseBlock* pb, KFGScanBlock* sb)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep, pb, sb)
-    const char *yymsg;
-    int yytype;
-    YYSTYPE *yyvaluep;
-    KFGParseBlock* pb;
-    KFGScanBlock* sb;
-#endif
-{
-  YYUSE (yyvaluep);
-  YYUSE (pb);
-  YYUSE (sb);
-
-  if (!yymsg)
-    yymsg = "Deleting";
-  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
-  switch (yytype)
-    {
-      case 20: /* "value" */
-
-	{
-    VNamelistRelease((yyvaluep->namelist));
-};
-
-	break;
-
-      default:
-	break;
-    }
-}
-
-
-/* Prevent warnings from -Wmissing-prototypes.  */
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (KFGParseBlock* pb, KFGScanBlock* sb);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-/*----------.
-| yyparse.  |
-`----------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
-    void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (KFGParseBlock* pb, KFGScanBlock* sb)
-#else
-int
-yyparse (pb, sb)
-    KFGParseBlock* pb;
-    KFGScanBlock* sb;
-#endif
-#endif
-{
-/* The lookahead symbol.  */
-int yychar;
-
-/* The semantic value of the lookahead symbol.  */
-YYSTYPE yylval;
-
-    /* Number of syntax errors so far.  */
-    int yynerrs;
-
-    int yystate;
-    /* Number of tokens to shift before error messages enabled.  */
-    int yyerrstatus;
-
-    /* The stacks and their tools:
-       `yyss': related to states.
-       `yyvs': related to semantic values.
-
-       Refer to the stacks thru separate pointers, to allow yyoverflow
-       to reallocate them elsewhere.  */
-
-    /* The state stack.  */
-    yytype_int16 yyssa[YYINITDEPTH];
-    yytype_int16 *yyss;
-    yytype_int16 *yyssp;
-
-    /* The semantic value stack.  */
-    YYSTYPE yyvsa[YYINITDEPTH];
-    YYSTYPE *yyvs;
-    YYSTYPE *yyvsp;
-
-    YYSIZE_T yystacksize;
-
-  int yyn;
-  int yyresult;
-  /* Lookahead token as an internal (translated) token number.  */
-  int yytoken;
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-
-#if YYERROR_VERBOSE
-  /* Buffer for error messages, and its allocated size.  */
-  char yymsgbuf[128];
-  char *yymsg = yymsgbuf;
-  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
-
-  /* The number of symbols on the RHS of the reduced rule.
-     Keep to zero when no symbol should be popped.  */
-  int yylen = 0;
-
-  yytoken = 0;
-  yyss = yyssa;
-  yyvs = yyvsa;
-  yystacksize = YYINITDEPTH;
-
-  YYDPRINTF ((stderr, "Starting parse\n"));
-
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
-  yychar = YYEMPTY; /* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-  yyssp = yyss;
-  yyvsp = yyvs;
-
-  goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate.  |
-`------------------------------------------------------------*/
- yynewstate:
-  /* In all cases, when you get here, the value and location stacks
-     have just been pushed.  So pushing a state here evens the stacks.  */
-  yyssp++;
-
- yysetstate:
-  *yyssp = yystate;
-
-  if (yyss + yystacksize - 1 <= yyssp)
-    {
-      /* Get the current used size of the three stacks, in elements.  */
-      YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
-      {
-	/* Give user a chance to reallocate the stack.  Use copies of
-	   these so that the &'s don't force the real ones into
-	   memory.  */
-	YYSTYPE *yyvs1 = yyvs;
-	yytype_int16 *yyss1 = yyss;
-
-	/* Each stack pointer address is followed by the size of the
-	   data in use in that stack, in bytes.  This used to be a
-	   conditional around just the two extra args, but that might
-	   be undefined if yyoverflow is a macro.  */
-	yyoverflow (YY_("memory exhausted"),
-		    &yyss1, yysize * sizeof (*yyssp),
-		    &yyvs1, yysize * sizeof (*yyvsp),
-		    &yystacksize);
-
-	yyss = yyss1;
-	yyvs = yyvs1;
-      }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
-      goto yyexhaustedlab;
-# else
-      /* Extend the stack our own way.  */
-      if (YYMAXDEPTH <= yystacksize)
-	goto yyexhaustedlab;
-      yystacksize *= 2;
-      if (YYMAXDEPTH < yystacksize)
-	yystacksize = YYMAXDEPTH;
-
-      {
-	yytype_int16 *yyss1 = yyss;
-	union yyalloc *yyptr =
-	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-	if (! yyptr)
-	  goto yyexhaustedlab;
-	YYSTACK_RELOCATE (yyss_alloc, yyss);
-	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-#  undef YYSTACK_RELOCATE
-	if (yyss1 != yyssa)
-	  YYSTACK_FREE (yyss1);
-      }
-# endif
-#endif /* no yyoverflow */
-
-      yyssp = yyss + yysize - 1;
-      yyvsp = yyvs + yysize - 1;
-
-      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-		  (unsigned long int) yystacksize));
-
-      if (yyss + yystacksize - 1 <= yyssp)
-	YYABORT;
-    }
-
-  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
-  if (yystate == YYFINAL)
-    YYACCEPT;
-
-  goto yybackup;
-
-/*-----------.
-| yybackup.  |
-`-----------*/
-yybackup:
-
-  /* Do appropriate processing given the current state.  Read a
-     lookahead token if we need one and don't already have one.  */
-
-  /* First try to decide what to do without reference to lookahead token.  */
-  yyn = yypact[yystate];
-  if (yypact_value_is_default (yyn))
-    goto yydefault;
-
-  /* Not known => get a lookahead token if don't already have one.  */
-
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
-  if (yychar == YYEMPTY)
-    {
-      YYDPRINTF ((stderr, "Reading a token: "));
-      yychar = YYLEX;
-    }
-
-  if (yychar <= YYEOF)
-    {
-      yychar = yytoken = YYEOF;
-      YYDPRINTF ((stderr, "Now at end of input.\n"));
-    }
-  else
-    {
-      yytoken = YYTRANSLATE (yychar);
-      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
-    }
-
-  /* If the proper action on seeing token YYTOKEN is to reduce or to
-     detect an error, take that action.  */
-  yyn += yytoken;
-  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
-    goto yydefault;
-  yyn = yytable[yyn];
-  if (yyn <= 0)
-    {
-      if (yytable_value_is_error (yyn))
-        goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-
-  /* Count tokens shifted since error; after three, turn off error
-     status.  */
-  if (yyerrstatus)
-    yyerrstatus--;
-
-  /* Shift the lookahead token.  */
-  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
-  /* Discard the shifted token.  */
-  yychar = YYEMPTY;
-
-  yystate = yyn;
-  *++yyvsp = yylval;
-
-  goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state.  |
-`-----------------------------------------------------------*/
-yydefault:
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-  goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction.  |
-`-----------------------------*/
-yyreduce:
-  /* yyn is the number of a rule to reduce with.  */
-  yylen = yyr2[yyn];
-
-  /* If YYLEN is nonzero, implement the default value of the action:
-     `$$ = $1'.
-
-     Otherwise, the following line sets YYVAL to garbage.
-     This behavior is undocumented and Bison
-     users should not rely upon it.  Assigning to YYVAL
-     unconditionally makes the parser a bit smaller, and it avoids a
-     GCC warning that YYVAL may be used uninitialized.  */
-  yyval = yyvsp[1-yylen];
-
-
-  YY_REDUCE_PRINT (yyn);
-  switch (yyn)
-    {
-        case 6:
-
-    { 
-            rc_t rc=pb->write_nvp(sb->self, (yyvsp[(1) - (4)].pb).tokenText, (yyvsp[(1) - (4)].pb).tokenLength, (yyvsp[(3) - (4)].namelist));
-            if (rc != 0)
-            {
-                ReportRc(pb, sb, rc);
-            }
-            VNamelistRelease((yyvsp[(3) - (4)].namelist));
-        }
-    break;
-
-  case 12:
-
-    { VNamelistMake(&(yyval.namelist), NAMELIST_ALLOC_BLKSIZE); AppendName(sb, (yyval.namelist), &(yyvsp[(1) - (1)].pb)); }
-    break;
-
-  case 13:
-
-    { VNamelistMake(&(yyval.namelist), NAMELIST_ALLOC_BLKSIZE); AppendName(sb, (yyval.namelist), &(yyvsp[(1) - (1)].pb)); }
-    break;
-
-  case 14:
-
-    { AppendName(sb, (yyvsp[(1) - (2)].namelist), &(yyvsp[(2) - (2)].pb)); (yyval.namelist)=(yyvsp[(1) - (2)].namelist); }
-    break;
-
-  case 15:
-
-    { AppendName(sb, (yyvsp[(1) - (2)].namelist), &(yyvsp[(2) - (2)].pb)); (yyval.namelist)=(yyvsp[(1) - (2)].namelist); }
-    break;
-
-
-
-      default: break;
-    }
-  /* User semantic actions sometimes alter yychar, and that requires
-     that yytoken be updated with the new translation.  We take the
-     approach of translating immediately before every use of yytoken.
-     One alternative is translating here after every semantic action,
-     but that translation would be missed if the semantic action invokes
-     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
-     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
-     incorrect destructor might then be invoked immediately.  In the
-     case of YYERROR or YYBACKUP, subsequent parser actions might lead
-     to an incorrect destructor call or verbose syntax error message
-     before the lookahead is translated.  */
-  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-
-  *++yyvsp = yyval;
-
-  /* Now `shift' the result of the reduction.  Determine what state
-     that goes to, based on the state we popped back to and the rule
-     number reduced by.  */
-
-  yyn = yyr1[yyn];
-
-  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
-  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTOKENS];
-
-  goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
-  /* Make sure we have latest lookahead translation.  See comments at
-     user semantic actions for why this is necessary.  */
-  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
-  /* If not already recovering from an error, report this error.  */
-  if (!yyerrstatus)
-    {
-      ++yynerrs;
-#if ! YYERROR_VERBOSE
-      yyerror (pb, sb, YY_("syntax error"));
-#else
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
-                                        yyssp, yytoken)
-      {
-        char const *yymsgp = YY_("syntax error");
-        int yysyntax_error_status;
-        yysyntax_error_status = YYSYNTAX_ERROR;
-        if (yysyntax_error_status == 0)
-          yymsgp = yymsg;
-        else if (yysyntax_error_status == 1)
-          {
-            if (yymsg != yymsgbuf)
-              YYSTACK_FREE (yymsg);
-            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
-            if (!yymsg)
-              {
-                yymsg = yymsgbuf;
-                yymsg_alloc = sizeof yymsgbuf;
-                yysyntax_error_status = 2;
-              }
-            else
-              {
-                yysyntax_error_status = YYSYNTAX_ERROR;
-                yymsgp = yymsg;
-              }
-          }
-        yyerror (pb, sb, yymsgp);
-        if (yysyntax_error_status == 2)
-          goto yyexhaustedlab;
-      }
-# undef YYSYNTAX_ERROR
-#endif
-    }
-
-
-
-  if (yyerrstatus == 3)
-    {
-      /* If just tried and failed to reuse lookahead token after an
-	 error, discard it.  */
-
-      if (yychar <= YYEOF)
-	{
-	  /* Return failure if at end of input.  */
-	  if (yychar == YYEOF)
-	    YYABORT;
-	}
-      else
-	{
-	  yydestruct ("Error: discarding",
-		      yytoken, &yylval, pb, sb);
-	  yychar = YYEMPTY;
-	}
-    }
-
-  /* Else will try to reuse lookahead token after shifting the error
-     token.  */
-  goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR.  |
-`---------------------------------------------------*/
-yyerrorlab:
-
-  /* Pacify compilers like GCC when the user code never invokes
-     YYERROR and the label yyerrorlab therefore never appears in user
-     code.  */
-  if (/*CONSTCOND*/ 0)
-     goto yyerrorlab;
-
-  /* Do not reclaim the symbols of the rule which action triggered
-     this YYERROR.  */
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-  yystate = *yyssp;
-  goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR.  |
-`-------------------------------------------------------------*/
-yyerrlab1:
-  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
-
-  for (;;)
-    {
-      yyn = yypact[yystate];
-      if (!yypact_value_is_default (yyn))
-	{
-	  yyn += YYTERROR;
-	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
-	    {
-	      yyn = yytable[yyn];
-	      if (0 < yyn)
-		break;
-	    }
-	}
-
-      /* Pop the current state because it cannot handle the error token.  */
-      if (yyssp == yyss)
-	YYABORT;
-
-
-      yydestruct ("Error: popping",
-		  yystos[yystate], yyvsp, pb, sb);
-      YYPOPSTACK (1);
-      yystate = *yyssp;
-      YY_STACK_PRINT (yyss, yyssp);
-    }
-
-  *++yyvsp = yylval;
-
-
-  /* Shift the error token.  */
-  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here.  |
-`-------------------------------------*/
-yyacceptlab:
-  yyresult = 0;
-  goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here.  |
-`-----------------------------------*/
-yyabortlab:
-  yyresult = 1;
-  goto yyreturn;
-
-#if !defined(yyoverflow) || YYERROR_VERBOSE
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here.  |
-`-------------------------------------------------*/
-yyexhaustedlab:
-  yyerror (pb, sb, YY_("memory exhausted"));
-  yyresult = 2;
-  /* Fall through.  */
-#endif
-
-yyreturn:
-  if (yychar != YYEMPTY)
-    {
-      /* Make sure we have latest lookahead translation.  See comments at
-         user semantic actions for why this is necessary.  */
-      yytoken = YYTRANSLATE (yychar);
-      yydestruct ("Cleanup: discarding lookahead",
-                  yytoken, &yylval, pb, sb);
-    }
-  /* Do not reclaim the symbols of the rule which action triggered
-     this YYABORT or YYACCEPT.  */
-  YYPOPSTACK (yylen);
-  YY_STACK_PRINT (yyss, yyssp);
-  while (yyssp != yyss)
-    {
-      yydestruct ("Cleanup: popping",
-		  yystos[*yyssp], yyvsp, pb, sb);
-      YYPOPSTACK (1);
-    }
-#ifndef yyoverflow
-  if (yyss != yyssa)
-    YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
-  if (yymsg != yymsgbuf)
-    YYSTACK_FREE (yymsg);
-#endif
-  /* Make sure YYID is used.  */
-  return YYID (yyresult);
-}
-
-
-
-
-
-#include <assert.h>
-#include <klib/token.h>
-#include <klib/writer.h>
-
-void KFG_error(KFGParseBlock* pb, KFGScanBlock* sb, const char* msg)
-{
-    sb->report_error(sb, msg);
-}
-
-void ReportRc(KFGParseBlock* pb, KFGScanBlock* sb, rc_t rc)
-{
-    char buf[1025];
-    size_t num_writ;
-    RCExplain(rc, buf, 1024, &num_writ);
-    buf[1024]=0;
-    yyerror(0, sb, buf);
-}
-
-void AppendName(KFGScanBlock* sb, VNamelist* nl, const KFGToken* pb)
-{   /* pb represents either a kfgSTRING or a kfgESCAPED_STRING with opening and closed quotes clipped */
-    rc_t rc;
-    KToken t;
-    size_t value_size;
-    char* buf;
-
-    if (pb->tokenLength == 0)
-    {
-        return;
-    }
-            
-    t.id= pb->tokenId == kfgESCAPED_STRING ? eEscapedString : eString;
-    StringInit(&t.str, pb->tokenText-1, pb->tokenLength+2, (uint32_t) (pb->tokenLength + 2) ); /* compensate for clipped quotes in order to use KTokenToString */
-    buf=(char*)malloc(t.str.size);
-
-    /* KTokenToString removes opening and closing quotes and handles escapes if present */
-    rc = KTokenToString (&t, buf, t.str.size, &value_size);
-    if (rc != 0)
-    {
-        ReportRc(0, sb, rc);
-    }
-    else
-    {   
-        assert(value_size < t.str.size);
-        buf[value_size]=0;
-        rc = VNamelistAppend(nl, buf);
-        if (rc != 0)
-        {
-            ReportRc(0, sb, rc);
-        }
-    }       
-    free(buf);
-}
-
-
-    
-
diff --git a/libs/kfg/config-grammar.y b/libs/kfg/config-grammar.y
deleted file mode 100644
index ec507b5..0000000
--- a/libs/kfg/config-grammar.y
+++ /dev/null
@@ -1,185 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
- 
-%{  
-    #include "kfg-parse.h"
-    #include <sysalloc.h>
-    #include <klib/rc.h>
-    #include <klib/namelist.h>
-
-    #define YYSTYPE_IS_DECLARED
-    #define YYSTYPE KFGSymbol
-    #include "config-tokens.h"
-        
-    #define KFG_lex KFGScan_yylex
-    
-    /* required parameter to VNamelistMake */
-    #define NAMELIST_ALLOC_BLKSIZE 10
-    
-    static void ReportRc(KFGParseBlock* pb, KFGScanBlock* sb, rc_t rc);
-    static void AppendName(KFGScanBlock* sb, VNamelist*, const KFGToken*);
-    static void KFG_error(KFGParseBlock* pb, KFGScanBlock* sb, const char* msg);
-%}
-
-%pure-parser
-%parse-param {KFGParseBlock* pb }
-%lex-param {KFGToken* sb}
-%parse-param {KFGScanBlock* sb }
-
-%name-prefix="KFG_"
-
- /* tokens without textual representation or internal for the scanner */
-%token kfgEND_INPUT 0 
-%token kfgEND_LINE
-%token kfgUNTERM_STRING
-%token kfgUNTERM_ESCAPED_STRING
-%token kfgUNRECOGNIZED
-%token kfgVAR_REF
-%token kfgUNTERM_VAR_REF
-%token kfgASSIGN
-
- /* tokens with a textual representation in pb */
-%token <pb> kfgSTRING
-%token <pb> kfgESCAPED_STRING
-%token <pb> kfgABS_PATH
-%token <pb> kfgREL_PATH
-
-%union {
-    KFGToken                pb;
-    const struct VNamelist* namelist;
-}
-%type <pb>          pathname  
-%type <namelist>    value
-
-%destructor
-{
-    VNamelistRelease($$);
-} <namelist>
-
-%%
- 
-config
-    : name_value_pairs 
-    | kfgEND_INPUT      
-    ;
-    
-name_value_pairs
-    : name_value_pair
-    | name_value_pairs name_value_pair 
-    ;
-    
-name_value_pair
-    : pathname assign_op value line_end
-        { 
-            rc_t rc=pb->write_nvp(sb->self, $1.tokenText, $1.tokenLength, $3);
-            if (rc != 0)
-            {
-                ReportRc(pb, sb, rc);
-            }
-            VNamelistRelease($3);
-        } 
-    | kfgEND_LINE       
-    | error line_end    
-    ;
-    
-pathname
-    : kfgABS_PATH 
-    | kfgREL_PATH
-    ;
-    
-assign_op
-    : kfgASSIGN
-    ;   
-
-value
-    : kfgSTRING                 { VNamelistMake(&$$, NAMELIST_ALLOC_BLKSIZE); AppendName(sb, $$, &$1); }
-    | kfgESCAPED_STRING         { VNamelistMake(&$$, NAMELIST_ALLOC_BLKSIZE); AppendName(sb, $$, &$1); }
-    | value kfgSTRING           { AppendName(sb, $1, &$2); $$=$1; }
-    | value kfgESCAPED_STRING   { AppendName(sb, $1, &$2); $$=$1; }
-    ;
-    
-line_end
-    : kfgEND_LINE
-    | kfgEND_INPUT
-    ;
-
-%%
-
-#include <assert.h>
-#include <klib/token.h>
-#include <klib/writer.h>
-
-void KFG_error(KFGParseBlock* pb, KFGScanBlock* sb, const char* msg)
-{
-    sb->report_error(sb, msg);
-}
-
-void ReportRc(KFGParseBlock* pb, KFGScanBlock* sb, rc_t rc)
-{
-    char buf[1025];
-    size_t num_writ;
-    RCExplain(rc, buf, 1024, &num_writ);
-    buf[1024]=0;
-    yyerror(0, sb, buf);
-}
-
-void AppendName(KFGScanBlock* sb, VNamelist* nl, const KFGToken* pb)
-{   /* pb represents either a kfgSTRING or a kfgESCAPED_STRING with opening and closed quotes clipped */
-    rc_t rc;
-    KToken t;
-    size_t value_size;
-    char* buf;
-
-    if (pb->tokenLength == 0)
-    {
-        return;
-    }
-            
-    t.id= pb->tokenId == kfgESCAPED_STRING ? eEscapedString : eString;
-    StringInit(&t.str, pb->tokenText-1, pb->tokenLength+2, (uint32_t) (pb->tokenLength + 2) ); /* compensate for clipped quotes in order to use KTokenToString */
-    buf=(char*)malloc(t.str.size);
-
-    /* KTokenToString removes opening and closing quotes and handles escapes if present */
-    rc = KTokenToString (&t, buf, t.str.size, &value_size);
-    if (rc != 0)
-    {
-        ReportRc(0, sb, rc);
-    }
-    else
-    {   
-        assert(value_size < t.str.size);
-        buf[value_size]=0;
-        rc = VNamelistAppend(nl, buf);
-        if (rc != 0)
-        {
-            ReportRc(0, sb, rc);
-        }
-    }       
-    free(buf);
-}
-
-
-    
diff --git a/libs/kfg/config-lex.c b/libs/kfg/config-lex.c
deleted file mode 100644
index a45986d..0000000
--- a/libs/kfg/config-lex.c
+++ /dev/null
@@ -1,2517 +0,0 @@
-
-
-#define  YY_INT_ALIGNED short int
-
-/* A lexical scanner generated by flex */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-
-/* First, we deal with  platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/* end standard C headers. */
-
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types. 
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
-
-#include <inttypes.h>
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t; 
-typedef unsigned short int flex_uint16_t;
-typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
-
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN               (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN              (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN              (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX               (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX              (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX              (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX              (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX             (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX             (4294967295U)
-#endif
-
-#endif /* ! FLEXINT_H */
-
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else	/* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif	/* defined (__STDC__) */
-#endif	/* ! __cplusplus */
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* An opaque pointer. */
-#ifndef YY_TYPEDEF_YY_SCANNER_T
-#define YY_TYPEDEF_YY_SCANNER_T
-typedef void* yyscan_t;
-#endif
-
-/* For convenience, these vars (plus the bison vars far below)
-   are macros in the reentrant scanner. */
-#define yyin yyg->yyin_r
-#define yyout yyg->yyout_r
-#define yyextra yyg->yyextra_r
-#define yyleng yyg->yyleng_r
-#define yytext yyg->yytext_r
-#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
-#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
-#define yy_flex_debug yyg->yy_flex_debug_r
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yyg->yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yyg->yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE vdb_kfg_yyrestart(yyin ,yyscanner )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#define YY_BUF_SIZE 16384
-#endif
-
-/* The state buf must be large enough to hold one state per character in the main buffer.
- */
-#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-    /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
-     *       access to the local variable yy_act. Since yyless() is a macro, it would break
-     *       existing scanners that call yyless() from OUTSIDE vdb_kfg_yylex. 
-     *       One obvious solution it to make yy_act a global. I tried that, and saw
-     *       a 5% performance hit in a non-yylineno scanner, because yy_act is
-     *       normally declared as a register variable-- so it is not worth it.
-     */
-    #define  YY_LESS_LINENO(n) \
-            do { \
-                int yyl;\
-                for ( yyl = n; yyl < yyleng; ++yyl )\
-                    if ( yytext[yyl] == '\n' )\
-                        --yylineno;\
-            }while(0)
-    
-/* Return all but the first "n" matched characters back to the input stream. */
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		*yy_cp = yyg->yy_hold_char; \
-		YY_RESTORE_YY_MORE_OFFSET \
-		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
-		} \
-	while ( 0 )
-
-#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
-struct yy_buffer_state
-	{
-	FILE *yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	yy_size_t yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-    int yy_bs_lineno; /**< The line count. */
-    int yy_bs_column; /**< The column count. */
-    
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
-
-	int yy_buffer_status;
-
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-	/* When an EOF's been seen but there's still some text to process
-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-	 * shouldn't try reading from the input source any more.  We might
-	 * still have a bunch of tokens to match, though, because of
-	 * possible backing-up.
-	 *
-	 * When we actually see the EOF, we change the status to "new"
-	 * (via vdb_kfg_yyrestart()), so that the user can continue scanning by
-	 * just pointing yyin at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-
-	};
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- *
- * Returns the top of the stack, or NULL.
- */
-#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
-                          ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
-                          : NULL)
-
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
-
-void vdb_kfg_yyrestart (FILE *input_file ,yyscan_t yyscanner );
-void vdb_kfg_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-YY_BUFFER_STATE vdb_kfg_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
-void vdb_kfg_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void vdb_kfg_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void vdb_kfg_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-void vdb_kfg_yypop_buffer_state (yyscan_t yyscanner );
-
-static void vdb_kfg_yyensure_buffer_stack (yyscan_t yyscanner );
-static void vdb_kfg_yy_load_buffer_state (yyscan_t yyscanner );
-static void vdb_kfg_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
-
-#define YY_FLUSH_BUFFER vdb_kfg_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
-
-YY_BUFFER_STATE vdb_kfg_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
-YY_BUFFER_STATE vdb_kfg_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE vdb_kfg_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
-
-void *vdb_kfg_yyalloc (yy_size_t ,yyscan_t yyscanner );
-void *vdb_kfg_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
-void vdb_kfg_yyfree (void * ,yyscan_t yyscanner );
-
-#define yy_new_buffer vdb_kfg_yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! YY_CURRENT_BUFFER ){ \
-        vdb_kfg_yyensure_buffer_stack (yyscanner); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            vdb_kfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
-	}
-
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! YY_CURRENT_BUFFER ){\
-        vdb_kfg_yyensure_buffer_stack (yyscanner); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            vdb_kfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
-	}
-
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-
-/* Begin user sect3 */
-
-#define vdb_kfg_yywrap(n) 1
-#define YY_SKIP_YYWRAP
-
-typedef unsigned char YY_CHAR;
-
-typedef int yy_state_type;
-
-#define yytext_ptr yytext_r
-
-static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
-static int yy_get_next_buffer (yyscan_t yyscanner );
-static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
-	yyg->yytext_ptr = yy_bp; \
-	yyleng = (size_t) (yy_cp - yy_bp); \
-	yyg->yy_hold_char = *yy_cp; \
-	*yy_cp = '\0'; \
-	yyg->yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 35
-#define YY_END_OF_BUFFER 36
-/* This struct is not used in this scanner,
-   but its presence is necessary. */
-struct yy_trans_info
-	{
-	flex_int32_t yy_verify;
-	flex_int32_t yy_nxt;
-	};
-static yyconst flex_int16_t yy_accept[135] =
-    {   0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-       13,   13,   36,   34,    8,    9,   24,    7,   34,   15,
-       34,   11,   32,    2,    4,   35,   35,   35,   35,   31,
-       35,   35,   35,   22,   13,   13,   24,   23,    0,    0,
-        7,    0,   15,    0,   14,    0,    1,   10,   11,    0,
-        2,    3,    4,    0,    5,    0,    6,    0,   31,    0,
-       29,    0,    0,   22,   20,   13,   13,   23,    0,   27,
-       26,   26,    0,    0,   14,   18,   17,   17,   10,    0,
-       11,   30,   21,   13,   27,   26,   25,   26,    0,   26,
-        0,   33,    0,    0,   18,   17,   17,   16,    0,   17,
-
-        0,   10,   11,   12,   13,   13,    0,   26,   25,   26,
-       26,   26,   28,    0,    0,   17,   17,   16,   17,   17,
-       19,   10,   13,   26,   25,   26,   26,    0,   17,   17,
-       16,   17,   13,    0
-    } ;
-
-static yyconst flex_int32_t yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
-        2,    4,    4,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    1,    5,    6,    7,    1,    1,    8,    9,
-       10,   11,    1,    1,   12,   12,   13,   14,   14,   14,
-       14,   14,   14,   14,   14,   14,   14,    1,    1,    1,
-       15,    1,    1,    1,   14,   14,   14,   14,   14,   14,
-       14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
-       14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
-        1,   16,    1,    1,   14,    1,   14,   14,   14,   14,
-
-       14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
-       14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
-       14,   14,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1
-    } ;
-
-static yyconst flex_int32_t yy_meta[17] =
-    {   0,
-        1,    1,    2,    3,    1,    1,    1,    1,    1,    4,
-        5,    6,    6,    6,    1,    7
-    } ;
-
-static yyconst flex_int16_t yy_base[163] =
-    {   0,
-        0,    0,   14,   15,   16,   17,   26,   40,   54,   68,
-       82,   90,   86,  670,  670,  670,   96,    0,   74,  106,
-       10,   69,  670,    0,  670,  120,  131,   27,  670,  670,
-      142,   15,  149,  670,    0,   72,  154,  670,  168,    0,
-        0,   66,  178,  192,  670,    0,  670,   66,   65,   63,
-        0,  206,  670,  217,  670,  228,  670,   30,  670,   65,
-      670,   31,   64,  670,  670,    0,   55,  670,   59,  670,
-      237,  249,  256,   58,  670,  670,  264,  274,   53,   51,
-       51,  670,  670,  281,  670,  291,  670,  305,    0,  317,
-      331,  670,    0,   49,  670,  341,  355,  670,    0,  365,
-
-      379,   47,   46,  670,    0,   41,  393,    0,    0,  407,
-      420,    0,  670,   34,  434,    0,  448,    0,  461,    0,
-      670,   41,   37,    0,    0,    0,  474,    0,    0,    0,
-        0,  487,   38,  670,  503,  510,  517,  524,  531,  538,
-      545,   47,  552,  559,  566,  572,  578,  585,  592,   35,
-      599,  606,  613,  620,   34,  627,  634,  641,  648,   30,
-      655,  662
-    } ;
-
-static yyconst flex_int16_t yy_def[163] =
-    {   0,
-      134,    1,  135,  135,  135,  135,  136,  136,  137,  137,
-      138,  138,  134,  134,  134,  134,  139,  140,  134,  141,
-      134,  142,  134,  143,  134,  144,  144,  145,  134,  134,
-      145,  146,  146,  134,  147,  147,  139,  134,  139,  148,
-      140,  134,  141,  141,  134,  149,  134,  150,  142,  134,
-      143,  144,  134,  144,  134,  144,  134,  145,  134,   31,
-      134,  146,   33,  134,  134,  147,  147,  134,   39,  134,
-      151,  152,  134,   44,  134,  134,  153,  154,  150,  134,
-      155,  134,  134,  147,  134,  151,  134,  156,  157,  152,
-      152,  134,   73,  134,  134,  153,  158,  134,  159,  154,
-
-      154,  160,  155,  134,   84,  147,  151,   86,   86,  156,
-      161,   86,  134,   73,  153,   96,  158,   96,  162,   96,
-      134,  160,   84,   86,   86,  110,  161,  114,   96,  117,
-       96,  162,   84,    0,  134,  134,  134,  134,  134,  134,
-      134,  134,  134,  134,  134,  134,  134,  134,  134,  134,
-      134,  134,  134,  134,  134,  134,  134,  134,  134,  134,
-      134,  134
-    } ;
-
-static yyconst flex_int16_t yy_nxt[687] =
-    {   0,
-       14,   15,   16,   15,   17,   18,   19,   20,   14,   14,
-       14,   14,   21,   22,   23,   14,   25,   25,   25,   25,
-       47,   63,   64,   48,   26,   26,   27,   27,   29,   29,
-       30,   59,   31,   60,   59,  122,   60,   63,   64,  103,
-       79,   29,   29,   29,   30,  128,   31,  128,  133,  133,
-      133,  133,   49,   80,  123,   29,   29,   29,   50,   80,
-       33,   34,  114,   50,  102,   80,   95,   85,   84,   29,
-       29,   29,   83,   82,   33,   34,   81,   50,   80,   73,
-       67,   50,   42,   29,   29,  134,  134,  134,   36,  134,
-      134,   29,   29,  134,  134,  134,   36,  134,  134,   29,
-
-       38,  134,   39,  134,  134,  134,  134,  134,  134,  134,
-      134,   40,   44,   45,  134,  134,  134,  134,  134,  134,
-      134,   46,   53,  134,  134,  134,  134,  134,  134,  134,
-       54,  134,   55,   53,  134,  134,  134,  134,  134,  134,
-      134,   56,  134,   57,   58,   58,  134,  134,  134,  134,
-       61,   62,   62,  134,  134,  134,  134,   65,   68,  134,
-       69,  134,  134,  134,  134,  134,  134,  134,  134,   40,
-       37,   37,  134,  134,  134,  134,   70,  134,  134,  134,
-      134,  134,  134,   71,   74,   75,  134,  134,  134,  134,
-      134,  134,  134,   46,   43,   43,  134,  134,  134,  134,
-
-       76,  134,  134,  134,  134,  134,  134,   77,  134,  134,
-      134,  134,  134,  134,  134,  134,  134,  134,  134,   53,
-      134,  134,  134,  134,  134,  134,  134,   54,  134,   55,
-       53,  134,  134,  134,  134,  134,  134,  134,   56,  134,
-       57,   87,  134,   88,  134,  134,  134,  134,  134,  134,
-      134,  134,   89,   87,  134,   91,  134,  134,  134,  134,
-      134,  134,  134,  134,   40,   92,  134,   93,   94,   93,
-       97,   98,  134,  134,  134,  134,  134,  134,  134,   99,
-      101,   98,  134,  134,  134,  134,  134,  134,  134,   46,
-      104,  134,  105,  106,  105,   87,  134,  107,  134,  134,
-
-      134,  134,  134,  134,  134,  134,   89,   86,   86,  109,
-      134,  110,  134,   86,  134,  134,  134,  134,  134,  134,
-      111,   87,  134,   91,  134,  134,  134,  134,  134,  134,
-      134,  134,   40,   90,   90,  134,  134,  134,  134,  113,
-      134,  134,  134,  134,  134,  134,   71,  115,   98,  134,
-      134,  134,  134,  134,  134,  134,   99,   96,   96,  134,
-      134,  117,  118,   96,  134,  134,  134,  134,  134,  134,
-      119,  101,   98,  134,  134,  134,  134,  134,  134,  134,
-       46,  100,  100,  134,  134,  134,  134,  121,  134,  134,
-      134,  134,  134,  134,   77,   86,   86,  134,  134,  134,
-
-      134,  134,  134,  134,  134,  134,  134,  134,   71,   86,
-       86,  109,  134,  110,  134,   86,  134,  134,  134,  134,
-      134,  134,  111,  112,  125,  134,  126,  134,  134,  134,
-      134,  134,  134,  134,  134,  127,   96,   96,  134,  134,
-      134,  134,  134,  134,  134,  134,  134,  134,  134,   77,
-       96,   96,  134,  134,  117,  118,   96,  134,  134,  134,
-      134,  134,  134,  119,  120,  134,  134,  130,  131,  134,
-      134,  134,  134,  134,  134,  134,  132,  112,  125,  134,
-       88,  134,  134,  134,  134,  134,  134,  134,  134,  127,
-      120,  134,  134,   97,  131,  134,  134,  134,  134,  134,
-
-      134,  134,  132,   24,   24,   24,   24,   24,   24,   24,
-       28,   28,   28,   28,   28,   28,   28,   32,   32,   32,
-       32,   32,   32,   32,   35,   35,   35,   35,   35,   35,
-       35,   37,  134,  134,   37,   37,   37,   37,   41,  134,
-       41,   41,   41,   41,   41,   43,  134,  134,   43,   43,
-       43,   43,   51,  134,   51,   51,  134,   51,   51,   52,
-       52,   52,   52,   52,   52,   52,   58,  134,  134,   58,
-       58,   58,   62,  134,  134,   62,   62,   62,   66,  134,
-       66,  134,   66,   66,   66,   72,  134,   72,   72,   72,
-       72,   72,   78,  134,   78,   78,   78,   78,   78,   86,
-
-      134,  134,   86,   86,   86,   86,   90,  134,  134,   90,
-       90,   90,   90,   96,  134,  134,   96,   96,   96,   96,
-      100,  134,  134,  100,  100,  100,  100,  108,  108,  108,
-      108,  108,  108,  108,  112,  134,  112,  112,  112,  112,
-      112,  116,  116,  116,  116,  116,  116,  116,  120,  134,
-      120,  120,  120,  120,  120,  124,  134,  124,  124,  124,
-      124,  124,  129,  134,  129,  129,  129,  129,  129,   13,
-      134,  134,  134,  134,  134,  134,  134,  134,  134,  134,
-      134,  134,  134,  134,  134,  134
-    } ;
-
-static yyconst flex_int16_t yy_chk[687] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    3,    4,    5,    6,
-       21,   32,   32,   21,    3,    4,    5,    6,    7,    7,
-        7,   28,    7,   28,   58,  160,   58,   62,   62,  155,
-      150,    7,    8,    8,    8,  114,    8,  114,  123,  133,
-      123,  133,  142,  122,  106,    8,    9,    9,  103,  102,
-        9,    9,   94,   81,   80,   79,   74,   69,   67,    9,
-       10,   10,   63,   60,   10,   10,   50,   49,   48,   42,
-       36,   22,   19,   10,   11,   13,    0,    0,   11,    0,
-        0,   11,   12,    0,    0,    0,   12,    0,    0,   12,
-
-       17,    0,   17,    0,    0,    0,    0,    0,    0,    0,
-        0,   17,   20,   20,    0,    0,    0,    0,    0,    0,
-        0,   20,   26,    0,    0,    0,    0,    0,    0,    0,
-       26,    0,   26,   27,    0,    0,    0,    0,    0,    0,
-        0,   27,    0,   27,   31,   31,    0,    0,    0,    0,
-       31,   33,   33,    0,    0,    0,    0,   33,   37,    0,
-       37,    0,    0,    0,    0,    0,    0,    0,    0,   37,
-       39,   39,    0,    0,    0,    0,   39,    0,    0,    0,
-        0,    0,    0,   39,   43,   43,    0,    0,    0,    0,
-        0,    0,    0,   43,   44,   44,    0,    0,    0,    0,
-
-       44,    0,    0,    0,    0,    0,    0,   44,   52,    0,
-        0,    0,    0,    0,    0,    0,   52,    0,   52,   54,
-        0,    0,    0,    0,    0,    0,    0,   54,    0,   54,
-       56,    0,    0,    0,    0,    0,    0,    0,   56,    0,
-       56,   71,    0,   71,    0,    0,    0,    0,    0,    0,
-        0,    0,   71,   72,    0,   72,    0,    0,    0,    0,
-        0,    0,    0,    0,   72,   73,    0,   73,   73,   73,
-       77,   77,    0,    0,    0,    0,    0,    0,    0,   77,
-       78,   78,    0,    0,    0,    0,    0,    0,    0,   78,
-       84,    0,   84,   84,   84,   86,    0,   86,    0,    0,
-
-        0,    0,    0,    0,    0,    0,   86,   88,   88,   88,
-        0,   88,    0,   88,    0,    0,    0,    0,    0,    0,
-       88,   90,    0,   90,    0,    0,    0,    0,    0,    0,
-        0,    0,   90,   91,   91,    0,    0,    0,    0,   91,
-        0,    0,    0,    0,    0,    0,   91,   96,   96,    0,
-        0,    0,    0,    0,    0,    0,   96,   97,   97,    0,
-        0,   97,   97,   97,    0,    0,    0,    0,    0,    0,
-       97,  100,  100,    0,    0,    0,    0,    0,    0,    0,
-      100,  101,  101,    0,    0,    0,    0,  101,    0,    0,
-        0,    0,    0,    0,  101,  107,  107,    0,    0,    0,
-
-        0,  107,    0,    0,    0,    0,    0,    0,  107,  110,
-      110,  110,    0,  110,    0,  110,    0,    0,    0,    0,
-        0,    0,  110,  111,  111,    0,  111,    0,    0,    0,
-        0,    0,    0,    0,    0,  111,  115,  115,    0,    0,
-        0,    0,  115,    0,    0,    0,    0,    0,    0,  115,
-      117,  117,    0,    0,  117,  117,  117,    0,    0,    0,
-        0,    0,    0,  117,  119,    0,    0,  119,  119,    0,
-        0,    0,    0,    0,    0,    0,  119,  127,  127,    0,
-      127,    0,    0,    0,    0,    0,    0,    0,    0,  127,
-      132,    0,    0,  132,  132,    0,    0,    0,    0,    0,
-
-        0,    0,  132,  135,  135,  135,  135,  135,  135,  135,
-      136,  136,  136,  136,  136,  136,  136,  137,  137,  137,
-      137,  137,  137,  137,  138,  138,  138,  138,  138,  138,
-      138,  139,    0,    0,  139,  139,  139,  139,  140,    0,
-      140,  140,  140,  140,  140,  141,    0,    0,  141,  141,
-      141,  141,  143,    0,  143,  143,    0,  143,  143,  144,
-      144,  144,  144,  144,  144,  144,  145,    0,    0,  145,
-      145,  145,  146,    0,    0,  146,  146,  146,  147,    0,
-      147,    0,  147,  147,  147,  148,    0,  148,  148,  148,
-      148,  148,  149,    0,  149,  149,  149,  149,  149,  151,
-
-        0,    0,  151,  151,  151,  151,  152,    0,    0,  152,
-      152,  152,  152,  153,    0,    0,  153,  153,  153,  153,
-      154,    0,    0,  154,  154,  154,  154,  156,  156,  156,
-      156,  156,  156,  156,  157,    0,  157,  157,  157,  157,
-      157,  158,  158,  158,  158,  158,  158,  158,  159,    0,
-      159,  159,  159,  159,  159,  161,    0,  161,  161,  161,
-      161,  161,  162,    0,  162,  162,  162,  162,  162,  134,
-      134,  134,  134,  134,  134,  134,  134,  134,  134,  134,
-      134,  134,  134,  134,  134,  134
-    } ;
-
-/* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[36] =
-    {   0,
-0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 
-    0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0,     };
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-    #include "kfg-lex.h"
-    #include <sysalloc.h>
-    #include "config-tokens.h"    
-    
-    #define YYSTYPE KFGToken
-    
-    /* code to populate token with internal values */
-    #define YY_USER_ACTION              \
-        yylval -> tokenText     = yytext;   \
-        yylval -> tokenLength   = yyleng;   \
-        yylval -> line_no       = yylineno; \
-        yylval -> column_no     = yycolumn; \
-        yycolumn += yyleng; 
-        
-    #define REM_LQUOTE \
-        ++ yylval -> tokenText; \
-        -- yylval -> tokenLength; \
-        ++ yylval -> column_no;
-        
-    #define REM_RQUOTE \
-        -- yylval -> tokenLength; 
-#define YY_NO_UNISTD_H 1
-/* re-entrant scanner */
-/* bison options */
-/* maintain state stack */
-/* let parser handle EOF */
-/* start-state for slash-star comments */
-
-
-/* states for strings */
-
-
-/* in-string variable reference */
-
-/* node/name in a path */
-
-#define INITIAL 0
-#define CMT_SLASH_STAR 1
-#define CMT_MULTI_LINE 2
-#define IN_DBL_STRING 3
-#define IN_SNG_STRING 4
-#define IN_VAR_REF 5
-
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-#include <unistd.h>
-#endif
-
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
-
-/* Holds the entire state of the reentrant scanner. */
-struct yyguts_t
-    {
-
-    /* User-defined. Not touched by flex. */
-    YY_EXTRA_TYPE yyextra_r;
-
-    /* The rest are the same as the globals declared in the non-reentrant scanner. */
-    FILE *yyin_r, *yyout_r;
-    size_t yy_buffer_stack_top; /**< index of top of stack. */
-    size_t yy_buffer_stack_max; /**< capacity of stack. */
-    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
-    char yy_hold_char;
-    int yy_n_chars;
-    int yyleng_r;
-    char *yy_c_buf_p;
-    int yy_init;
-    int yy_start;
-    int yy_did_buffer_switch_on_eof;
-    int yy_start_stack_ptr;
-    int yy_start_stack_depth;
-    int *yy_start_stack;
-    yy_state_type yy_last_accepting_state;
-    char* yy_last_accepting_cpos;
-
-    int yylineno_r;
-    int yy_flex_debug_r;
-
-    char *yytext_r;
-    int yy_more_flag;
-    int yy_more_len;
-
-    YYSTYPE * yylval_r;
-
-    }; /* end struct yyguts_t */
-
-static int yy_init_globals (yyscan_t yyscanner );
-
-    /* This must go here because YYSTYPE and YYLTYPE are included
-     * from bison output in section 1.*/
-    #    define yylval yyg->yylval_r
-    
-int vdb_kfg_yylex_init (yyscan_t* scanner);
-
-int vdb_kfg_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
-
-/* Accessor methods to globals.
-   These are made visible to non-reentrant scanners for convenience. */
-
-int vdb_kfg_yylex_destroy (yyscan_t yyscanner );
-
-int vdb_kfg_yyget_debug (yyscan_t yyscanner );
-
-void vdb_kfg_yyset_debug (int debug_flag ,yyscan_t yyscanner );
-
-YY_EXTRA_TYPE vdb_kfg_yyget_extra (yyscan_t yyscanner );
-
-void vdb_kfg_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
-
-FILE *vdb_kfg_yyget_in (yyscan_t yyscanner );
-
-void vdb_kfg_yyset_in  (FILE * in_str ,yyscan_t yyscanner );
-
-FILE *vdb_kfg_yyget_out (yyscan_t yyscanner );
-
-void vdb_kfg_yyset_out  (FILE * out_str ,yyscan_t yyscanner );
-
-int vdb_kfg_yyget_leng (yyscan_t yyscanner );
-
-char *vdb_kfg_yyget_text (yyscan_t yyscanner );
-
-int vdb_kfg_yyget_lineno (yyscan_t yyscanner );
-
-void vdb_kfg_yyset_lineno (int line_number ,yyscan_t yyscanner );
-
-YYSTYPE * vdb_kfg_yyget_lval (yyscan_t yyscanner );
-
-void vdb_kfg_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int vdb_kfg_yywrap (yyscan_t yyscanner );
-#else
-extern int vdb_kfg_yywrap (yyscan_t yyscanner );
-#endif
-#endif
-
-    static void yyunput (int c,char *buf_ptr  ,yyscan_t yyscanner);
-    
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
-#endif
-
-#ifndef YY_NO_INPUT
-
-#ifdef __cplusplus
-static int yyinput (yyscan_t yyscanner );
-#else
-static int input (yyscan_t yyscanner );
-#endif
-
-#endif
-
-    static void yy_push_state (int new_state ,yyscan_t yyscanner);
-    
-    static void yy_pop_state (yyscan_t yyscanner );
-    
-    static int yy_top_state (yyscan_t yyscanner );
-    
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
-		{ \
-		int c = '*'; \
-		int n; \
-		for ( n = 0; n < max_size && \
-			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
-			buf[n] = (char) c; \
-		if ( c == '\n' ) \
-			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( yyin ) ) \
-			YY_FATAL_ERROR( "input in flex scanner failed" ); \
-		result = n; \
-		} \
-	else \
-		{ \
-		errno=0; \
-		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
-			{ \
-			if( errno != EINTR) \
-				{ \
-				YY_FATAL_ERROR( "input in flex scanner failed" ); \
-				break; \
-				} \
-			errno=0; \
-			clearerr(yyin); \
-			} \
-		}\
-\
-
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
-#endif
-
-/* end tables serialization structures and prototypes */
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-
-extern int vdb_kfg_yylex \
-               (YYSTYPE * yylval_param ,yyscan_t yyscanner);
-
-#define YY_DECL int vdb_kfg_yylex \
-               (YYSTYPE * yylval_param , yyscan_t yyscanner)
-#endif /* !YY_DECL */
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
-	YY_USER_ACTION
-
-/** The main scanner function which does all the work.
- */
-YY_DECL
-{
-	register yy_state_type yy_current_state;
-	register char *yy_cp, *yy_bp;
-	register int yy_act;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-
- /* multi-line comments */
-
-    yylval = yylval_param;
-
-	if ( !yyg->yy_init )
-		{
-		yyg->yy_init = 1;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! yyg->yy_start )
-			yyg->yy_start = 1;	/* first start state */
-
-		if ( ! yyin )
-			yyin = stdin;
-
-		if ( ! yyout )
-			yyout = stdout;
-
-		if ( ! YY_CURRENT_BUFFER ) {
-			vdb_kfg_yyensure_buffer_stack (yyscanner);
-			YY_CURRENT_BUFFER_LVALUE =
-				vdb_kfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
-		}
-
-		vdb_kfg_yy_load_buffer_state(yyscanner );
-		}
-
-	while ( 1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = yyg->yy_c_buf_p;
-
-		/* Support of yytext. */
-		*yy_cp = yyg->yy_hold_char;
-
-		/* yy_bp points to the position in yy_ch_buf of the start of
-		 * the current run.
-		 */
-		yy_bp = yy_cp;
-
-		yy_current_state = yyg->yy_start;
-yy_match:
-		do
-			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			if ( yy_accept[yy_current_state] )
-				{
-				yyg->yy_last_accepting_state = yy_current_state;
-				yyg->yy_last_accepting_cpos = yy_cp;
-				}
-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-				{
-				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 135 )
-					yy_c = yy_meta[(unsigned int) yy_c];
-				}
-			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-			++yy_cp;
-			}
-		while ( yy_current_state != 134 );
-		yy_cp = yyg->yy_last_accepting_cpos;
-		yy_current_state = yyg->yy_last_accepting_state;
-
-yy_find_action:
-		yy_act = yy_accept[yy_current_state];
-
-		YY_DO_BEFORE_ACTION;
-
-		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
-			{
-			int yyl;
-			for ( yyl = 0; yyl < yyleng; ++yyl )
-				if ( yytext[yyl] == '\n' )
-					   
-    do{ yylineno++;
-        yycolumn=0;
-    }while(0)
-;
-			}
-
-do_action:	/* This label is used only to access EOF actions. */
-
-		switch ( yy_act )
-	{ /* beginning of action switch */
-			case 0: /* must back up */
-			/* undo the effects of YY_DO_BEFORE_ACTION */
-			*yy_cp = yyg->yy_hold_char;
-			yy_cp = yyg->yy_last_accepting_cpos;
-			yy_current_state = yyg->yy_last_accepting_state;
-			goto yy_find_action;
-
-case 1:
-YY_RULE_SETUP
-{ yy_push_state ( CMT_SLASH_STAR, yyscanner ); }
-	YY_BREAK
-case 2:
-YY_RULE_SETUP
-/* ignore */
-	YY_BREAK
-case 3:
-YY_RULE_SETUP
-/* ignore */
-	YY_BREAK
-case 4:
-/* rule 4 can match eol */
-YY_RULE_SETUP
-{ BEGIN CMT_MULTI_LINE; }
-	YY_BREAK
-case 5:
-YY_RULE_SETUP
-{ yy_pop_state ( yyscanner ); }
-	YY_BREAK
-case 6:
-YY_RULE_SETUP
-{ yy_pop_state ( yyscanner ); return kfgEND_LINE; }
-	YY_BREAK
-/* line comments */
-case 7:
-YY_RULE_SETUP
-/* ignore */
-	YY_BREAK
-/* ignored tokens */
-case 8:
-YY_RULE_SETUP
-/* ignore */
-	YY_BREAK
-/* end of line is significant */
-case 9:
-/* rule 9 can match eol */
-YY_RULE_SETUP
-{ return kfgEND_LINE; }
-	YY_BREAK
-/* normal, POSIX-style paths */
-case 10:
-YY_RULE_SETUP
-{ return kfgABS_PATH; }
-	YY_BREAK
-case 11:
-YY_RULE_SETUP
-{ return kfgREL_PATH; }
-	YY_BREAK
-/* variable references inside strings */
-case 12:
-YY_RULE_SETUP
-{ yy_pop_state ( yyscanner ); return kfgVAR_REF; }
-	YY_BREAK
-case 13:
-YY_RULE_SETUP
-{ yy_pop_state ( yyscanner ); return kfgUNTERM_VAR_REF; }
-	YY_BREAK
-case YY_STATE_EOF(IN_VAR_REF):
-{ yy_pop_state ( yyscanner ); return kfgUNTERM_VAR_REF; } 
-	YY_BREAK
-/* single quoted strings */
-case 14:
-/* rule 14 can match eol */
-YY_RULE_SETUP
-{ REM_LQUOTE; REM_RQUOTE; return kfgSTRING; }
-	YY_BREAK
-case 15:
-/* rule 15 can match eol */
-YY_RULE_SETUP
-{ REM_LQUOTE; return kfgUNTERM_STRING; }
-	YY_BREAK
-case 16:
-/* rule 16 can match eol */
-YY_RULE_SETUP
-{ REM_LQUOTE; REM_RQUOTE; return kfgESCAPED_STRING; }
-	YY_BREAK
-case 17:
-/* rule 17 can match eol */
-YY_RULE_SETUP
-{ REM_LQUOTE; return kfgUNTERM_ESCAPED_STRING; }
-	YY_BREAK
-/* single quoted strings with variable references*/
-case 18:
-/* rule 18 can match eol */
-*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
-yyg->yy_c_buf_p = yy_cp -= 2;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-{ REM_LQUOTE; yy_push_state ( IN_SNG_STRING, yyscanner ); yy_push_state ( IN_VAR_REF, yyscanner ); return kfgSTRING; }
-	YY_BREAK
-case 19:
-/* rule 19 can match eol */
-*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
-yyg->yy_c_buf_p = yy_cp -= 2;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-{ REM_LQUOTE; yy_push_state ( IN_SNG_STRING, yyscanner ); yy_push_state ( IN_VAR_REF, yyscanner ); return kfgESCAPED_STRING; }
-	YY_BREAK
-case 20:
-YY_RULE_SETUP
-{ yy_push_state ( IN_VAR_REF, yyscanner ); yyless(0); }
-	YY_BREAK
-case 21:
-/* rule 21 can match eol */
-*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
-yyg->yy_c_buf_p = yy_cp -= 2;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-{ yy_push_state ( IN_VAR_REF, yyscanner ); return kfgSTRING; }
-	YY_BREAK
-case 22:
-/* rule 22 can match eol */
-YY_RULE_SETUP
-{ REM_RQUOTE; yy_pop_state ( yyscanner ); return kfgSTRING; } 
-	YY_BREAK
-/* double quoted strings */
-case 23:
-/* rule 23 can match eol */
-YY_RULE_SETUP
-{ REM_LQUOTE; REM_RQUOTE; return kfgSTRING; }
-	YY_BREAK
-case 24:
-/* rule 24 can match eol */
-YY_RULE_SETUP
-{ REM_LQUOTE; return kfgUNTERM_STRING; }
-	YY_BREAK
-case 25:
-/* rule 25 can match eol */
-YY_RULE_SETUP
-{ REM_LQUOTE; REM_RQUOTE; return kfgESCAPED_STRING; }
-	YY_BREAK
-case 26:
-/* rule 26 can match eol */
-YY_RULE_SETUP
-{ REM_LQUOTE; return kfgUNTERM_ESCAPED_STRING; }
-	YY_BREAK
-/* double quoted strings with variable references*/
-case 27:
-/* rule 27 can match eol */
-*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
-yyg->yy_c_buf_p = yy_cp -= 2;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-{ REM_LQUOTE; yy_push_state ( IN_DBL_STRING, yyscanner ); yy_push_state ( IN_VAR_REF, yyscanner ); return kfgSTRING; }
-	YY_BREAK
-case 28:
-/* rule 28 can match eol */
-*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
-yyg->yy_c_buf_p = yy_cp -= 2;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-{ REM_LQUOTE; yy_push_state ( IN_DBL_STRING, yyscanner ); yy_push_state ( IN_VAR_REF, yyscanner ); return kfgESCAPED_STRING; }
-	YY_BREAK
-case 29:
-YY_RULE_SETUP
-{ yy_push_state ( IN_VAR_REF, yyscanner ); yyless(0); }
-	YY_BREAK
-case 30:
-/* rule 30 can match eol */
-*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
-yyg->yy_c_buf_p = yy_cp -= 2;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-{ yy_push_state ( IN_VAR_REF, yyscanner ); return kfgSTRING; }
-	YY_BREAK
-case 31:
-/* rule 31 can match eol */
-YY_RULE_SETUP
-{ REM_RQUOTE; yy_pop_state ( yyscanner ); return kfgSTRING; } 
-	YY_BREAK
-/* literals */
-case 32:
-YY_RULE_SETUP
-{ return kfgASSIGN; }
-	YY_BREAK
-case 33:
-YY_RULE_SETUP
-{ return kfgVAR_REF; }
-	YY_BREAK
-/* unrecognized input */
-case 34:
-YY_RULE_SETUP
-{ return kfgUNRECOGNIZED; }
-	YY_BREAK
-case 35:
-YY_RULE_SETUP
-ECHO;
-	YY_BREAK
-case YY_STATE_EOF(INITIAL):
-case YY_STATE_EOF(CMT_SLASH_STAR):
-case YY_STATE_EOF(CMT_MULTI_LINE):
-case YY_STATE_EOF(IN_DBL_STRING):
-case YY_STATE_EOF(IN_SNG_STRING):
-	yyterminate();
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = yyg->yy_hold_char;
-		YY_RESTORE_YY_MORE_OFFSET
-
-		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
-			{
-			/* We're scanning a new file or input source.  It's
-			 * possible that this happened because the user
-			 * just pointed yyin at a new source and called
-			 * vdb_kfg_yylex().  If so, then we have to assure
-			 * consistency between YY_CURRENT_BUFFER and our
-			 * globals.  Here is the right place to do so, because
-			 * this is the first action (other than possibly a
-			 * back-up) that will match for the new input source.
-			 */
-			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
-			}
-
-		/* Note that here we test for yy_c_buf_p "<=" to the position
-		 * of the first EOB in the buffer, since yy_c_buf_p will
-		 * already have been incremented past the NUL character
-		 * (since all states make transitions on EOB to the
-		 * end-of-buffer state).  Contrast this with the test
-		 * in input().
-		 */
-		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state( yyscanner );
-
-			/* Okay, we're now positioned to make the NUL
-			 * transition.  We couldn't have
-			 * yy_get_previous_state() go ahead and do it
-			 * for us because it doesn't know how to deal
-			 * with the possibility of jamming (and we don't
-			 * want to build jamming into it because then it
-			 * will run more slowly).
-			 */
-
-			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
-
-			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++yyg->yy_c_buf_p;
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = yyg->yy_last_accepting_cpos;
-				yy_current_state = yyg->yy_last_accepting_state;
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer( yyscanner ) )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				yyg->yy_did_buffer_switch_on_eof = 0;
-
-				if ( vdb_kfg_yywrap(yyscanner ) )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * yytext, we can now set up
-					 * yy_c_buf_p so that if some total
-					 * hoser (like flex itself) wants to
-					 * call the scanner after we return the
-					 * YY_NULL, it'll still work - another
-					 * YY_NULL will get returned.
-					 */
-					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! yyg->yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				yyg->yy_c_buf_p =
-					yyg->yytext_ptr + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state( yyscanner );
-
-				yy_cp = yyg->yy_c_buf_p;
-				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				yyg->yy_c_buf_p =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
-
-				yy_current_state = yy_get_previous_state( yyscanner );
-
-				yy_cp = yyg->yy_c_buf_p;
-				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
-				goto yy_find_action;
-			}
-		break;
-		}
-
-	default:
-		YY_FATAL_ERROR(
-			"fatal flex scanner internal error--no action found" );
-	} /* end of action switch */
-		} /* end of scanning one token */
-} /* end of vdb_kfg_yylex */
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *	EOB_ACT_LAST_MATCH -
- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *	EOB_ACT_END_OF_FILE - end of file
- */
-static int yy_get_next_buffer (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-	register char *source = yyg->yytext_ptr;
-	register int number_to_move, i;
-	int ret_val;
-
-	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
-		YY_FATAL_ERROR(
-		"fatal flex scanner internal error--end of buffer missed" );
-
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
-		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
-			{
-			/* We matched a single character, the EOB, so
-			 * treat this as a final EOF.
-			 */
-			return EOB_ACT_END_OF_FILE;
-			}
-
-		else
-			{
-			/* We matched some text prior to the EOB, first
-			 * process it.
-			 */
-			return EOB_ACT_LAST_MATCH;
-			}
-		}
-
-	/* Try to read more data. */
-
-	/* First move last chars to start of buffer. */
-	number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
-
-	for ( i = 0; i < number_to_move; ++i )
-		*(dest++) = *(source++);
-
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-		/* don't do the read, it's not guaranteed to return an EOF,
-		 * just force an EOF
-		 */
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
-
-	else
-		{
-			int num_to_read =
-			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
-
-		while ( num_to_read <= 0 )
-			{ /* Not enough room in the buffer - grow it. */
-
-			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
-
-			int yy_c_buf_p_offset =
-				(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
-
-			if ( b->yy_is_our_buffer )
-				{
-				int new_size = b->yy_buf_size * 2;
-
-				if ( new_size <= 0 )
-					b->yy_buf_size += b->yy_buf_size / 8;
-				else
-					b->yy_buf_size *= 2;
-
-				b->yy_ch_buf = (char *)
-					/* Include room in for 2 EOB chars. */
-					vdb_kfg_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
-				}
-			else
-				/* Can't grow it, we don't own it. */
-				b->yy_ch_buf = 0;
-
-			if ( ! b->yy_ch_buf )
-				YY_FATAL_ERROR(
-				"fatal error - scanner input buffer overflow" );
-
-			yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
-			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
-						number_to_move - 1;
-
-			}
-
-		if ( num_to_read > YY_READ_BUF_SIZE )
-			num_to_read = YY_READ_BUF_SIZE;
-
-		/* Read in more data. */
-		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-			yyg->yy_n_chars, (size_t) num_to_read );
-
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
-		}
-
-	if ( yyg->yy_n_chars == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			vdb_kfg_yyrestart(yyin  ,yyscanner);
-			}
-
-		else
-			{
-			ret_val = EOB_ACT_LAST_MATCH;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
-				YY_BUFFER_EOF_PENDING;
-			}
-		}
-
-	else
-		ret_val = EOB_ACT_CONTINUE_SCAN;
-
-	if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
-		/* Extend the array by 50%, plus the number we really need. */
-		yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
-		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) vdb_kfg_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
-		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
-			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
-	}
-
-	yyg->yy_n_chars += number_to_move;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
-	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
-
-	return ret_val;
-}
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-    static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
-{
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	yy_current_state = yyg->yy_start;
-
-	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
-		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-		if ( yy_accept[yy_current_state] )
-			{
-			yyg->yy_last_accepting_state = yy_current_state;
-			yyg->yy_last_accepting_cpos = yy_cp;
-			}
-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-			{
-			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 135 )
-				yy_c = yy_meta[(unsigned int) yy_c];
-			}
-		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-		}
-
-	return yy_current_state;
-}
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *	next_state = yy_try_NUL_trans( current_state );
- */
-    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
-{
-	register int yy_is_jam;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
-	register char *yy_cp = yyg->yy_c_buf_p;
-
-	register YY_CHAR yy_c = 1;
-	if ( yy_accept[yy_current_state] )
-		{
-		yyg->yy_last_accepting_state = yy_current_state;
-		yyg->yy_last_accepting_cpos = yy_cp;
-		}
-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-		{
-		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 135 )
-			yy_c = yy_meta[(unsigned int) yy_c];
-		}
-	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 134);
-
-	return yy_is_jam ? 0 : yy_current_state;
-}
-
-    static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
-{
-	register char *yy_cp;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-    yy_cp = yyg->yy_c_buf_p;
-
-	/* undo effects of setting up yytext */
-	*yy_cp = yyg->yy_hold_char;
-
-	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
-		{ /* need to shift things up to make room */
-		/* +2 for EOB chars. */
-		register int number_to_move = yyg->yy_n_chars + 2;
-		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
-					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
-		register char *source =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
-
-		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
-			*--dest = *--source;
-
-		yy_cp += (int) (dest - source);
-		yy_bp += (int) (dest - source);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
-			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
-
-		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
-			YY_FATAL_ERROR( "flex scanner push-back overflow" );
-		}
-
-	*--yy_cp = (char) c;
-
-    if ( c == '\n' ){
-        --yylineno;
-    }
-
-	yyg->yytext_ptr = yy_bp;
-	yyg->yy_hold_char = *yy_cp;
-	yyg->yy_c_buf_p = yy_cp;
-}
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-    static int yyinput (yyscan_t yyscanner)
-#else
-    static int input  (yyscan_t yyscanner)
-#endif
-
-{
-	int c;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	*yyg->yy_c_buf_p = yyg->yy_hold_char;
-
-	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
-		{
-		/* yy_c_buf_p now points to the character we want to return.
-		 * If this occurs *before* the EOB characters, then it's a
-		 * valid NUL; if not, then we've hit the end of the buffer.
-		 */
-		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
-			/* This was really a NUL. */
-			*yyg->yy_c_buf_p = '\0';
-
-		else
-			{ /* need more input */
-			int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
-			++yyg->yy_c_buf_p;
-
-			switch ( yy_get_next_buffer( yyscanner ) )
-				{
-				case EOB_ACT_LAST_MATCH:
-					/* This happens because yy_g_n_b()
-					 * sees that we've accumulated a
-					 * token and flags that we need to
-					 * try matching the token before
-					 * proceeding.  But for input(),
-					 * there's no matching to consider.
-					 * So convert the EOB_ACT_LAST_MATCH
-					 * to EOB_ACT_END_OF_FILE.
-					 */
-
-					/* Reset buffer status. */
-					vdb_kfg_yyrestart(yyin ,yyscanner);
-
-					/*FALLTHROUGH*/
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( vdb_kfg_yywrap(yyscanner ) )
-						return EOF;
-
-					if ( ! yyg->yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput(yyscanner);
-#else
-					return input(yyscanner);
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
-	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
-	yyg->yy_hold_char = *++yyg->yy_c_buf_p;
-
-	if ( c == '\n' )
-		   
-    do{ yylineno++;
-        yycolumn=0;
-    }while(0)
-;
-
-	return c;
-}
-#endif	/* ifndef YY_NO_INPUT */
-
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- * @param yyscanner The scanner object.
- * @note This function does not reset the start condition to @c INITIAL .
- */
-    void vdb_kfg_yyrestart  (FILE * input_file , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	if ( ! YY_CURRENT_BUFFER ){
-        vdb_kfg_yyensure_buffer_stack (yyscanner);
-		YY_CURRENT_BUFFER_LVALUE =
-            vdb_kfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
-	}
-
-	vdb_kfg_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
-	vdb_kfg_yy_load_buffer_state(yyscanner );
-}
-
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- * @param yyscanner The scanner object.
- */
-    void vdb_kfg_yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	/* TODO. We should be able to replace this entire function body
-	 * with
-	 *		vdb_kfg_yypop_buffer_state();
-	 *		vdb_kfg_yypush_buffer_state(new_buffer);
-     */
-	vdb_kfg_yyensure_buffer_stack (yyscanner);
-	if ( YY_CURRENT_BUFFER == new_buffer )
-		return;
-
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*yyg->yy_c_buf_p = yyg->yy_hold_char;
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
-		}
-
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-	vdb_kfg_yy_load_buffer_state(yyscanner );
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (vdb_kfg_yywrap()) processing, but the only time this flag
-	 * is looked at is after vdb_kfg_yywrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	yyg->yy_did_buffer_switch_on_eof = 1;
-}
-
-static void vdb_kfg_yy_load_buffer_state  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
-	yyg->yy_hold_char = *yyg->yy_c_buf_p;
-}
-
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- * @param yyscanner The scanner object.
- * @return the allocated buffer state.
- */
-    YY_BUFFER_STATE vdb_kfg_yy_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
-{
-	YY_BUFFER_STATE b;
-    
-	b = (YY_BUFFER_STATE) vdb_kfg_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in vdb_kfg_yy_create_buffer()" );
-
-	b->yy_buf_size = size;
-
-	/* yy_ch_buf has to be 2 characters longer than the size given because
-	 * we need to put in 2 end-of-buffer characters.
-	 */
-	b->yy_ch_buf = (char *) vdb_kfg_yyalloc(b->yy_buf_size + 2 ,yyscanner );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in vdb_kfg_yy_create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	vdb_kfg_yy_init_buffer(b,file ,yyscanner);
-
-	return b;
-}
-
-/** Destroy the buffer.
- * @param b a buffer created with vdb_kfg_yy_create_buffer()
- * @param yyscanner The scanner object.
- */
-    void vdb_kfg_yy_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	if ( ! b )
-		return;
-
-	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
-		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
-
-	if ( b->yy_is_our_buffer )
-		vdb_kfg_yyfree((void *) b->yy_ch_buf ,yyscanner );
-
-	vdb_kfg_yyfree((void *) b ,yyscanner );
-}
-
-/* Initializes or reinitializes a buffer.
- * This function is sometimes called more than once on the same buffer,
- * such as during a vdb_kfg_yyrestart() or at EOF.
- */
-    static void vdb_kfg_yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
-
-{
-	int oerrno = errno;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	vdb_kfg_yy_flush_buffer(b ,yyscanner);
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-    /* If b is the current buffer, then vdb_kfg_yy_init_buffer was _probably_
-     * called from vdb_kfg_yyrestart() or through yy_get_next_buffer.
-     * In that case, we don't want to reset the lineno or column.
-     */
-    if (b != YY_CURRENT_BUFFER){
-        b->yy_bs_lineno = 1;
-        b->yy_bs_column = 0;
-    }
-
-        b->yy_is_interactive = 0;
-    
-	errno = oerrno;
-}
-
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- * @param yyscanner The scanner object.
- */
-    void vdb_kfg_yy_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	if ( ! b )
-		return;
-
-	b->yy_n_chars = 0;
-
-	/* We always need two end-of-buffer characters.  The first causes
-	 * a transition to the end-of-buffer state.  The second causes
-	 * a jam in that state.
-	 */
-	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-	b->yy_buf_pos = &b->yy_ch_buf[0];
-
-	b->yy_at_bol = 1;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	if ( b == YY_CURRENT_BUFFER )
-		vdb_kfg_yy_load_buffer_state(yyscanner );
-}
-
-/** Pushes the new state onto the stack. The new state becomes
- *  the current state. This function will allocate the stack
- *  if necessary.
- *  @param new_buffer The new state.
- *  @param yyscanner The scanner object.
- */
-void vdb_kfg_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	if (new_buffer == NULL)
-		return;
-
-	vdb_kfg_yyensure_buffer_stack(yyscanner);
-
-	/* This block is copied from vdb_kfg_yy_switch_to_buffer. */
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*yyg->yy_c_buf_p = yyg->yy_hold_char;
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
-		}
-
-	/* Only push if top exists. Otherwise, replace top. */
-	if (YY_CURRENT_BUFFER)
-		yyg->yy_buffer_stack_top++;
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
-	/* copied from vdb_kfg_yy_switch_to_buffer. */
-	vdb_kfg_yy_load_buffer_state(yyscanner );
-	yyg->yy_did_buffer_switch_on_eof = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- *  The next element becomes the new top.
- *  @param yyscanner The scanner object.
- */
-void vdb_kfg_yypop_buffer_state (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	if (!YY_CURRENT_BUFFER)
-		return;
-
-	vdb_kfg_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
-	YY_CURRENT_BUFFER_LVALUE = NULL;
-	if (yyg->yy_buffer_stack_top > 0)
-		--yyg->yy_buffer_stack_top;
-
-	if (YY_CURRENT_BUFFER) {
-		vdb_kfg_yy_load_buffer_state(yyscanner );
-		yyg->yy_did_buffer_switch_on_eof = 1;
-	}
-}
-
-/* Allocates the stack if it does not exist.
- *  Guarantees space for at least one push.
- */
-static void vdb_kfg_yyensure_buffer_stack (yyscan_t yyscanner)
-{
-	int num_to_alloc;
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-	if (!yyg->yy_buffer_stack) {
-
-		/* First allocation is just for 2 elements, since we don't know if this
-		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
-		 * immediate realloc on the next call.
-         */
-		num_to_alloc = 1;
-		yyg->yy_buffer_stack = (struct yy_buffer_state**)vdb_kfg_yyalloc
-								(num_to_alloc * sizeof(struct yy_buffer_state*)
-								, yyscanner);
-		if ( ! yyg->yy_buffer_stack )
-			YY_FATAL_ERROR( "out of dynamic memory in vdb_kfg_yyensure_buffer_stack()" );
-								  
-		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-				
-		yyg->yy_buffer_stack_max = num_to_alloc;
-		yyg->yy_buffer_stack_top = 0;
-		return;
-	}
-
-	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
-
-		/* Increase the buffer to prepare for a possible push. */
-		int grow_size = 8 /* arbitrary grow size */;
-
-		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
-		yyg->yy_buffer_stack = (struct yy_buffer_state**)vdb_kfg_yyrealloc
-								(yyg->yy_buffer_stack,
-								num_to_alloc * sizeof(struct yy_buffer_state*)
-								, yyscanner);
-		if ( ! yyg->yy_buffer_stack )
-			YY_FATAL_ERROR( "out of dynamic memory in vdb_kfg_yyensure_buffer_stack()" );
-
-		/* zero only the new slots.*/
-		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
-		yyg->yy_buffer_stack_max = num_to_alloc;
-	}
-}
-
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- * @param yyscanner The scanner object.
- * @return the newly allocated buffer state object. 
- */
-YY_BUFFER_STATE vdb_kfg_yy_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
-{
-	YY_BUFFER_STATE b;
-    
-	if ( size < 2 ||
-	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
-	     base[size-1] != YY_END_OF_BUFFER_CHAR )
-		/* They forgot to leave room for the EOB's. */
-		return 0;
-
-	b = (YY_BUFFER_STATE) vdb_kfg_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in vdb_kfg_yy_scan_buffer()" );
-
-	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
-	b->yy_buf_pos = b->yy_ch_buf = base;
-	b->yy_is_our_buffer = 0;
-	b->yy_input_file = 0;
-	b->yy_n_chars = b->yy_buf_size;
-	b->yy_is_interactive = 0;
-	b->yy_at_bol = 1;
-	b->yy_fill_buffer = 0;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	vdb_kfg_yy_switch_to_buffer(b ,yyscanner );
-
-	return b;
-}
-
-/** Setup the input buffer state to scan a string. The next call to vdb_kfg_yylex() will
- * scan from a @e copy of @a str.
- * @param yystr a NUL-terminated string to scan
- * @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- *       vdb_kfg_yy_scan_bytes() instead.
- */
-YY_BUFFER_STATE vdb_kfg_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
-{
-    
-	return vdb_kfg_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
-}
-
-/** Setup the input buffer state to scan the given bytes. The next call to vdb_kfg_yylex() will
- * scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
- * @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE vdb_kfg_yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
-{
-	YY_BUFFER_STATE b;
-	char *buf;
-	yy_size_t n;
-	int i;
-    
-	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = _yybytes_len + 2;
-	buf = (char *) vdb_kfg_yyalloc(n ,yyscanner );
-	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in vdb_kfg_yy_scan_bytes()" );
-
-	for ( i = 0; i < _yybytes_len; ++i )
-		buf[i] = yybytes[i];
-
-	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
-
-	b = vdb_kfg_yy_scan_buffer(buf,n ,yyscanner);
-	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in vdb_kfg_yy_scan_bytes()" );
-
-	/* It's okay to grow etc. this buffer, and we should throw it
-	 * away when we're done.
-	 */
-	b->yy_is_our_buffer = 1;
-
-	return b;
-}
-
-    static void yy_push_state (int  new_state , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth )
-		{
-		yy_size_t new_size;
-
-		yyg->yy_start_stack_depth += YY_START_STACK_INCR;
-		new_size = yyg->yy_start_stack_depth * sizeof( int );
-
-		if ( ! yyg->yy_start_stack )
-			yyg->yy_start_stack = (int *) vdb_kfg_yyalloc(new_size ,yyscanner );
-
-		else
-			yyg->yy_start_stack = (int *) vdb_kfg_yyrealloc((void *) yyg->yy_start_stack,new_size ,yyscanner );
-
-		if ( ! yyg->yy_start_stack )
-			YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
-		}
-
-	yyg->yy_start_stack[yyg->yy_start_stack_ptr++] = YY_START;
-
-	BEGIN(new_state);
-}
-
-    static void yy_pop_state  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	if ( --yyg->yy_start_stack_ptr < 0 )
-		YY_FATAL_ERROR( "start-condition stack underflow" );
-
-	BEGIN(yyg->yy_start_stack[yyg->yy_start_stack_ptr]);
-}
-
-    static int yy_top_state  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-	return yyg->yy_start_stack[yyg->yy_start_stack_ptr - 1];
-}
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
-{
-    	(void) fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-}
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		yytext[yyleng] = yyg->yy_hold_char; \
-		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
-		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
-		*yyg->yy_c_buf_p = '\0'; \
-		yyleng = yyless_macro_arg; \
-		} \
-	while ( 0 )
-
-/* Accessor  methods (get/set functions) to struct members. */
-
-/** Get the user-defined data for this scanner.
- * @param yyscanner The scanner object.
- */
-YY_EXTRA_TYPE vdb_kfg_yyget_extra  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yyextra;
-}
-
-/** Get the current line number.
- * @param yyscanner The scanner object.
- */
-int vdb_kfg_yyget_lineno  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    
-        if (! YY_CURRENT_BUFFER)
-            return 0;
-    
-    return yylineno;
-}
-
-/** Get the current column number.
- * @param yyscanner The scanner object.
- */
-int vdb_kfg_yyget_column  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    
-        if (! YY_CURRENT_BUFFER)
-            return 0;
-    
-    return yycolumn;
-}
-
-/** Get the input stream.
- * @param yyscanner The scanner object.
- */
-FILE *vdb_kfg_yyget_in  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yyin;
-}
-
-/** Get the output stream.
- * @param yyscanner The scanner object.
- */
-FILE *vdb_kfg_yyget_out  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yyout;
-}
-
-/** Get the length of the current token.
- * @param yyscanner The scanner object.
- */
-int vdb_kfg_yyget_leng  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yyleng;
-}
-
-/** Get the current token.
- * @param yyscanner The scanner object.
- */
-
-char *vdb_kfg_yyget_text  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yytext;
-}
-
-/** Set the user-defined data. This data is never touched by the scanner.
- * @param user_defined The data to be associated with this scanner.
- * @param yyscanner The scanner object.
- */
-void vdb_kfg_yyset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yyextra = user_defined ;
-}
-
-/** Set the current line number.
- * @param line_number
- * @param yyscanner The scanner object.
- */
-void vdb_kfg_yyset_lineno (int  line_number , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-        /* lineno is only valid if an input buffer exists. */
-        if (! YY_CURRENT_BUFFER )
-           yy_fatal_error( "vdb_kfg_yyset_lineno called with no buffer" , yyscanner); 
-    
-    yylineno = line_number;
-}
-
-/** Set the current column.
- * @param line_number
- * @param yyscanner The scanner object.
- */
-void vdb_kfg_yyset_column (int  column_no , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-        /* column is only valid if an input buffer exists. */
-        if (! YY_CURRENT_BUFFER )
-           yy_fatal_error( "vdb_kfg_yyset_column called with no buffer" , yyscanner); 
-    
-    yycolumn = column_no;
-}
-
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param in_str A readable stream.
- * @param yyscanner The scanner object.
- * @see vdb_kfg_yy_switch_to_buffer
- */
-void vdb_kfg_yyset_in (FILE *  in_str , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yyin = in_str ;
-}
-
-void vdb_kfg_yyset_out (FILE *  out_str , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yyout = out_str ;
-}
-
-int vdb_kfg_yyget_debug  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yy_flex_debug;
-}
-
-void vdb_kfg_yyset_debug (int  bdebug , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yy_flex_debug = bdebug ;
-}
-
-/* Accessor methods for yylval and yylloc */
-
-YYSTYPE * vdb_kfg_yyget_lval  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    return yylval;
-}
-
-void vdb_kfg_yyset_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    yylval = yylval_param;
-}
-
-/* User-visible API */
-
-/* vdb_kfg_yylex_init is special because it creates the scanner itself, so it is
- * the ONLY reentrant function that doesn't take the scanner as the last argument.
- * That's why we explicitly handle the declaration, instead of using our macros.
- */
-
-int vdb_kfg_yylex_init(yyscan_t* ptr_yy_globals)
-
-{
-    if (ptr_yy_globals == NULL){
-        errno = EINVAL;
-        return 1;
-    }
-
-    *ptr_yy_globals = (yyscan_t) vdb_kfg_yyalloc ( sizeof( struct yyguts_t ), NULL );
-
-    if (*ptr_yy_globals == NULL){
-        errno = ENOMEM;
-        return 1;
-    }
-
-    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
-    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-
-    return yy_init_globals ( *ptr_yy_globals );
-}
-
-/* vdb_kfg_yylex_init_extra has the same functionality as vdb_kfg_yylex_init, but follows the
- * convention of taking the scanner as the last argument. Note however, that
- * this is a *pointer* to a scanner, as it will be allocated by this call (and
- * is the reason, too, why this function also must handle its own declaration).
- * The user defined value in the first argument will be available to vdb_kfg_yyalloc in
- * the yyextra field.
- */
-
-int vdb_kfg_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
-
-{
-    struct yyguts_t dummy_yyguts;
-
-    vdb_kfg_yyset_extra (yy_user_defined, &dummy_yyguts);
-
-    if (ptr_yy_globals == NULL){
-        errno = EINVAL;
-        return 1;
-    }
-	
-    *ptr_yy_globals = (yyscan_t) vdb_kfg_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
-	
-    if (*ptr_yy_globals == NULL){
-        errno = ENOMEM;
-        return 1;
-    }
-    
-    /* By setting to 0xAA, we expose bugs in
-    yy_init_globals. Leave at 0x00 for releases. */
-    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-    
-    vdb_kfg_yyset_extra (yy_user_defined, *ptr_yy_globals);
-    
-    return yy_init_globals ( *ptr_yy_globals );
-}
-
-static int yy_init_globals (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    /* Initialization is the same as for the non-reentrant scanner.
-     * This function is called from vdb_kfg_yylex_destroy(), so don't allocate here.
-     */
-
-    yyg->yy_buffer_stack = 0;
-    yyg->yy_buffer_stack_top = 0;
-    yyg->yy_buffer_stack_max = 0;
-    yyg->yy_c_buf_p = (char *) 0;
-    yyg->yy_init = 0;
-    yyg->yy_start = 0;
-
-    yyg->yy_start_stack_ptr = 0;
-    yyg->yy_start_stack_depth = 0;
-    yyg->yy_start_stack =  NULL;
-
-/* Defined in main.c */
-#ifdef YY_STDINIT
-    yyin = stdin;
-    yyout = stdout;
-#else
-    yyin = (FILE *) 0;
-    yyout = (FILE *) 0;
-#endif
-
-    /* For future reference: Set errno on error, since we are called by
-     * vdb_kfg_yylex_init()
-     */
-    return 0;
-}
-
-/* vdb_kfg_yylex_destroy is for both reentrant and non-reentrant scanners. */
-int vdb_kfg_yylex_destroy  (yyscan_t yyscanner)
-{
-    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-    /* Pop the buffer stack, destroying each element. */
-	while(YY_CURRENT_BUFFER){
-		vdb_kfg_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
-		YY_CURRENT_BUFFER_LVALUE = NULL;
-		vdb_kfg_yypop_buffer_state(yyscanner);
-	}
-
-	/* Destroy the stack itself. */
-	vdb_kfg_yyfree(yyg->yy_buffer_stack ,yyscanner);
-	yyg->yy_buffer_stack = NULL;
-
-    /* Destroy the start condition stack. */
-        vdb_kfg_yyfree(yyg->yy_start_stack ,yyscanner );
-        yyg->yy_start_stack = NULL;
-
-    /* Reset the globals. This is important in a non-reentrant scanner so the next time
-     * vdb_kfg_yylex() is called, initialization will occur. */
-    yy_init_globals( yyscanner);
-
-    /* Destroy the main struct (reentrant only). */
-    vdb_kfg_yyfree ( yyscanner , yyscanner );
-    yyscanner = NULL;
-    return 0;
-}
-
-/*
- * Internal utility routines.
- */
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
-{
-	register int i;
-	for ( i = 0; i < n; ++i )
-		s1[i] = s2[i];
-}
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
-{
-	register int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-}
-#endif
-
-void *vdb_kfg_yyalloc (yy_size_t  size , yyscan_t yyscanner)
-{
-	return (void *) malloc( size );
-}
-
-void *vdb_kfg_yyrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
-{
-	/* The cast to (char *) in the following accommodates both
-	 * implementations that use char* generic pointers, and those
-	 * that use void* generic pointers.  It works with the latter
-	 * because both ANSI C and C++ allow castless assignment from
-	 * any pointer type to void*, and deal with argument conversions
-	 * as though doing an assignment.
-	 */
-	return (void *) realloc( (char *) ptr, size );
-}
-
-void vdb_kfg_yyfree (void * ptr , yyscan_t yyscanner)
-{
-	free( (char *) ptr );	/* see vdb_kfg_yyrealloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
-
-
-
-
-bool KFGScan_yylex_init(KFGScanBlock* sb, const char *str)
-{
-    if (vdb_kfg_yylex_init(&sb->scanner) != 0)
-    {   
-        return false; /*RC ( rcKFG, rcMgr, rcParsing, rcMemory, rcExhausted );*/
-    }       
-    sb->buffer=vdb_kfg_yy_scan_string((yyconst char*)str,sb->scanner); 
-    
-    {   /* initialize line/col counters */
-        /* yylineno and yycolumn are macros using variable yyg, so we have to prepare it for them */
-        struct yyguts_t * yyg = (struct yyguts_t*)sb->scanner;
-        yylineno=1;
-        yycolumn=1;
-    }
-    
-    return true;
-}
-
-void KFGScan_yylex_destroy(KFGScanBlock* sb)
-{
-    vdb_kfg_yy_delete_buffer(sb->buffer,sb->scanner); 
-    if (sb->scanner)
-    {
-        vdb_kfg_yylex_destroy(sb->scanner);
-    }       
-    sb->scanner=0;
-    sb->buffer=0;
-}
-
-void KFGScan_set_debug(bool on, KFGScanBlock* sb)
-{
-    vdb_kfg_yyset_debug(on ? 1 : 0,sb->scanner);
-}
-
-int KFGScan_yylex(KFGSymbol* sym, KFGScanBlock* sb) 
-{ 
-    sym->pb.tokenId=vdb_kfg_yylex(&sym->pb,sb->scanner); 
-    sb->lastToken= &sym->pb;
-    
-    switch (sym->pb.tokenId)
-    {
-    case kfgVAR_REF:
-        if (!sb->look_up_var(sb->self, &sym->pb)) 
-        {
-            /* undefined variable reference is handled silently, to behave like a shell script */
-            /* sb->report_error(sb, "variable not found");*/
-            sym->pb.tokenLength = 0; 
-        }
-        sym->pb.tokenId = kfgSTRING;
-        break;
-    case kfgUNTERM_VAR_REF: /* convert bad var ref into a string */ 
-        sb->report_error(sb, "unterminated variable reference inside a string (use '\\$(' to avoid this message)");
-        sym->pb.tokenId = kfgSTRING; 
-        break;
-    case kfgUNTERM_STRING:
-    case kfgUNTERM_ESCAPED_STRING:
-        sb->report_error(sb, "unterminated string");
-        break;
-    default:
-        break;
-    }
-    
-    return sym->pb.tokenId; 
-}
-
-
diff --git a/libs/kfg/config-lex.l b/libs/kfg/config-lex.l
deleted file mode 100644
index d16dfaf..0000000
--- a/libs/kfg/config-lex.l
+++ /dev/null
@@ -1,221 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
- 
-%{ 
-    #include "kfg-lex.h"
-    #include <sysalloc.h>
-    #include "config-tokens.h"    
-    
-    #define YYSTYPE KFGToken
-    
-    /* code to populate token with internal values */
-    #define YY_USER_ACTION              \
-        yylval -> tokenText     = yytext;   \
-        yylval -> tokenLength   = yyleng;   \
-        yylval -> line_no       = yylineno; \
-        yylval -> column_no     = yycolumn; \
-        yycolumn += yyleng; 
-        
-    #define REM_LQUOTE \
-        ++ yylval -> tokenText; \
-        -- yylval -> tokenLength; \
-        ++ yylval -> column_no;
-        
-    #define REM_RQUOTE \
-        -- yylval -> tokenLength; 
-%}
-
-%option never-interactive nounistd yylineno
-
-%option prefix="vdb_kfg_yy"
-
-/* re-entrant scanner */
-%option reentrant
-
-/* bison options */
-%option bison-bridge
-
- /* maintain state stack */
-%option stack
-
- /* let parser handle EOF */
-%option noyywrap
-
- /* start-state for slash-star comments */
-%x CMT_SLASH_STAR
-%x CMT_MULTI_LINE
-
- /* states for strings */
-%x IN_DBL_STRING
-%x IN_SNG_STRING
-
- /* in-string variable reference */
-%x IN_VAR_REF
- 
- /* node/name in a path */
-path_node                       [A-Za-z_0-9][-.A-Za-z_0-9]*
-
-pathname    {path_node}(\/{path_node})*
-
-abs_key     \/{pathname}
-rel_key     {pathname}
-
-ref_start   \$\(
-var_ref     {ref_start}{pathname}\)
-
-sstr_char   ([^\\'\f\r\n$]|$[^(\\])
-dstr_char   ([^\\"\f\r\n$]|$[^(\\])
-
-%%
- /* multi-line comments */
-\/\*                                            { yy_push_state ( CMT_SLASH_STAR, yyscanner ); }
-<CMT_SLASH_STAR,CMT_MULTI_LINE>[^*\n]+          /* ignore */
-<CMT_SLASH_STAR,CMT_MULTI_LINE>\*+[^*/\n]+      /* ignore */
-<CMT_SLASH_STAR,CMT_MULTI_LINE>\**\n            { BEGIN CMT_MULTI_LINE; }
-<CMT_SLASH_STAR>\*+\/                           { yy_pop_state ( yyscanner ); }
-<CMT_MULTI_LINE>\*+\/                           { yy_pop_state ( yyscanner ); return kfgEND_LINE; }
-
- /* line comments */
-#.*                                     /* ignore */
-
- /* ignored tokens */
-[ \t\f\v\r]                             /* ignore */
-
- /* end of line is significant */
-\n                                      { return kfgEND_LINE; }
-
- /* normal, POSIX-style paths */
-\/{pathname}                            { return kfgABS_PATH; }
-{pathname}                              { return kfgREL_PATH; }
-
- /* variable references inside strings */
-<IN_VAR_REF>{var_ref}                   { yy_pop_state ( yyscanner ); return kfgVAR_REF; }
-<IN_VAR_REF>[^)\n]*                     { yy_pop_state ( yyscanner ); return kfgUNTERM_VAR_REF; }
-<IN_VAR_REF><<EOF>>                     { yy_pop_state ( yyscanner ); return kfgUNTERM_VAR_REF; } 
-
- /* single quoted strings */
-'{sstr_char}*'                          { REM_LQUOTE; REM_RQUOTE; return kfgSTRING; }
-'{sstr_char}*                           { REM_LQUOTE; return kfgUNTERM_STRING; }
-'(\\.|$\\|$\\$|{sstr_char})+'           { REM_LQUOTE; REM_RQUOTE; return kfgESCAPED_STRING; }
-'(\\.|$\\|$\\$|{sstr_char})+            { REM_LQUOTE; return kfgUNTERM_ESCAPED_STRING; }
-
- /* single quoted strings with variable references*/
-'{sstr_char}*/{ref_start}               { REM_LQUOTE; yy_push_state ( IN_SNG_STRING, yyscanner ); yy_push_state ( IN_VAR_REF, yyscanner ); return kfgSTRING; }
-'(\\.|{sstr_char})+/{ref_start}         { REM_LQUOTE; yy_push_state ( IN_SNG_STRING, yyscanner ); yy_push_state ( IN_VAR_REF, yyscanner ); return kfgESCAPED_STRING; }
-
-<IN_SNG_STRING>{ref_start}              { yy_push_state ( IN_VAR_REF, yyscanner ); yyless(0); }
-<IN_SNG_STRING>{sstr_char}+/{ref_start} { yy_push_state ( IN_VAR_REF, yyscanner ); return kfgSTRING; }
-<IN_SNG_STRING>{sstr_char}*'            { REM_RQUOTE; yy_pop_state ( yyscanner ); return kfgSTRING; } 
-
- /* double quoted strings */
-\"{dstr_char}*\"                        { REM_LQUOTE; REM_RQUOTE; return kfgSTRING; }
-\"{dstr_char}*                          { REM_LQUOTE; return kfgUNTERM_STRING; }
-\"(\\.|$\\|$\\$|{dstr_char})+\"         { REM_LQUOTE; REM_RQUOTE; return kfgESCAPED_STRING; }
-\"(\\.|$\\|$\\$|{dstr_char})+           { REM_LQUOTE; return kfgUNTERM_ESCAPED_STRING; }
-
- /* double quoted strings with variable references*/
-\"{dstr_char}*/{ref_start}              { REM_LQUOTE; yy_push_state ( IN_DBL_STRING, yyscanner ); yy_push_state ( IN_VAR_REF, yyscanner ); return kfgSTRING; }
-\"(\\.|{dstr_char})+/{ref_start}        { REM_LQUOTE; yy_push_state ( IN_DBL_STRING, yyscanner ); yy_push_state ( IN_VAR_REF, yyscanner ); return kfgESCAPED_STRING; }
-
-<IN_DBL_STRING>{ref_start}              { yy_push_state ( IN_VAR_REF, yyscanner ); yyless(0); }
-<IN_DBL_STRING>{dstr_char}+/{ref_start} { yy_push_state ( IN_VAR_REF, yyscanner ); return kfgSTRING; }
-<IN_DBL_STRING>{dstr_char}*\"           { REM_RQUOTE; yy_pop_state ( yyscanner ); return kfgSTRING; } 
-
- /* literals */
-=                                       { return kfgASSIGN; }
-
-{var_ref}                               { return kfgVAR_REF; }
-
- /* unrecognized input */
-.                                       { return kfgUNRECOGNIZED; }
-
-%%
-
-bool KFGScan_yylex_init(KFGScanBlock* sb, const char *str)
-{
-    if (yylex_init(&sb->scanner) != 0)
-    {   
-        return false; /*RC ( rcKFG, rcMgr, rcParsing, rcMemory, rcExhausted );*/
-    }       
-    sb->buffer=yy_scan_string((yyconst char*)str, sb->scanner); 
-    
-    {   /* initialize line/col counters */
-        /* yylineno and yycolumn are macros using variable yyg, so we have to prepare it for them */
-        struct yyguts_t * yyg = (struct yyguts_t*)sb->scanner;
-        yylineno=1;
-        yycolumn=1;
-    }
-    
-    return true;
-}
-
-void KFGScan_yylex_destroy(KFGScanBlock* sb)
-{
-    yy_delete_buffer(sb->buffer, sb->scanner); 
-    if (sb->scanner)
-    {
-        yylex_destroy(sb->scanner);
-    }       
-    sb->scanner=0;
-    sb->buffer=0;
-}
-
-void KFGScan_set_debug(bool on, KFGScanBlock* sb)
-{
-    yyset_debug(on ? 1 : 0, sb->scanner);
-}
-
-int KFGScan_yylex(KFGSymbol* sym, KFGScanBlock* sb) 
-{ 
-    sym->pb.tokenId=yylex(&sym->pb, sb->scanner); 
-    sb->lastToken= &sym->pb;
-    
-    switch (sym->pb.tokenId)
-    {
-    case kfgVAR_REF:
-        if (!sb->look_up_var(sb->self, &sym->pb)) 
-        {
-            /* undefined variable reference is handled silently, to behave like a shell script */
-            /* sb->report_error(sb, "variable not found");*/
-            sym->pb.tokenLength = 0; 
-        }
-        sym->pb.tokenId = kfgSTRING;
-        break;
-    case kfgUNTERM_VAR_REF: /* convert bad var ref into a string */ 
-        sb->report_error(sb, "unterminated variable reference inside a string (use '\\$(' to avoid this message)");
-        sym->pb.tokenId = kfgSTRING; 
-        break;
-    case kfgUNTERM_STRING:
-    case kfgUNTERM_ESCAPED_STRING:
-        sb->report_error(sb, "unterminated string");
-        break;
-    default:
-        break;
-    }
-    
-    return sym->pb.tokenId; 
-}
-
diff --git a/libs/kfg/config-tokens.h b/libs/kfg/config-tokens.h
deleted file mode 100644
index dd1af53..0000000
--- a/libs/kfg/config-tokens.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.5.  */
-
-/* Bison interface for Yacc-like parsers in C
-   
-      Copyright (C) 1984, 1989-1990, 2000-2011 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 3 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, see <http://www.gnu.org/licenses/>.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-   
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     kfgEND_INPUT = 0,
-     kfgEND_LINE = 258,
-     kfgUNTERM_STRING = 259,
-     kfgUNTERM_ESCAPED_STRING = 260,
-     kfgUNRECOGNIZED = 261,
-     kfgVAR_REF = 262,
-     kfgUNTERM_VAR_REF = 263,
-     kfgASSIGN = 264,
-     kfgSTRING = 265,
-     kfgESCAPED_STRING = 266,
-     kfgABS_PATH = 267,
-     kfgREL_PATH = 268
-   };
-#endif
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-
-
-    KFGToken                pb;
-    const struct VNamelist* namelist;
-
-
-
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-
-
-
diff --git a/libs/kfg/config.c b/libs/kfg/config.c
deleted file mode 100644
index ed9d239..0000000
--- a/libs/kfg/config.c
+++ /dev/null
@@ -1,4368 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <kfg/kfg-priv.h>
-#include "kfg-priv.h"
-
-struct KfgConfigNamelist;
-#define KNAMELIST_IMPL struct KfgConfigNamelist
-#include <klib/namelist.h>
-#include <klib/impl.h>
-
-#include <klib/token.h>
-#include <klib/container.h>
-#include <klib/data-buffer.h> /* KDataBuffer */
-#include <klib/refcount.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <klib/debug.h>
-#include <klib/log.h> 
-#include <klib/out.h> /* OUTMSG */
-#include <klib/klib-priv.h>
-#include <kfs/directory.h>
-#include <kfs/gzip.h> /* KFileMakeGzipForRead */
-#include <kfs/subfile.h> /* KFileMakeSubRead */
-#include <kfs/file.h>
-#include <kfs/dyload.h>
-#include <kfs/mmap.h>
-#include <vfs/path.h>
-#include <strtol.h>
-#include <sysalloc.h>
-
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <va_copy.h>
-
-#if !WINDOWS
-    #include <sys/utsname.h>
-#endif
-
-#include "kfg-parse.h"
-#include "config-tokens.h"
-
-#ifndef PATH_MAX
-#define PATH_MAX 4096
-#endif
-
-/* the leaf name of the user's modifiable settings,
-   must reside in the user's $HOME/.ncbi directory */
-#define MAGIC_LEAF_NAME "user-settings.mkfg"
-
-static bool s_disable_user_settings = false;
-
-
-/*----------------------------------------------------------------------------*/
-static const char default_kfg[] = {
-"/config/default = \"true\"\n"
-"/repository/user/main/public/apps/file/volumes/flat = \"files\"\n"
-"/repository/user/main/public/apps/nakmer/volumes/nakmerFlat = \"nannot\"\n"
-"/repository/user/main/public/apps/nannot/volumes/nannotFlat = \"nannot\"\n"
-"/repository/user/main/public/apps/refseq/volumes/refseq = \"refseq\"\n"
-"/repository/user/main/public/apps/sra/volumes/sraFlat = \"sra\"\n"
-"/repository/user/main/public/apps/wgs/volumes/wgsFlat = \"wgs\"\n"
-"/repository/user/main/public/root = \"$(HOME)/ncbi/public\"\n"
-"/repository/remote/main/CGI/resolver-cgi = "
-                      "\"http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi\"\n"
-"/repository/remote/aux/NCBI/apps/nakmer/volumes/fuseNAKMER = \"sadb\"\n"
-"/repository/remote/aux/NCBI/apps/nannot/volumes/fuseNANNOT = \"sadb\"\n"
-"/repository/remote/aux/NCBI/apps/refseq/volumes/refseq = \"refseq\"\n"
-"/repository/remote/aux/NCBI/apps/sra/volumes/fuse1000 = "
-                      "\"sra-instant/reads/ByRun/sra\"\n"
-"/repository/remote/aux/NCBI/apps/wgs/volumes/fuseWGS = \"wgs\"\n"
-"/repository/remote/aux/NCBI/root = \"http://ftp-trace.ncbi.nlm.nih.gov/sra\"\n"
-"/repository/remote/protected/CGI/resolver-cgi = "
-                      "\"http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi\"\n"
-"/tools/ascp/max_rate = \"1000m\"\n"
-};
-/*----------------------------------------------------------------------------*/
-
-/*--------------------------------------------------------------------------
- * KConfig
- */
-static
-rc_t KConfigSever ( const KConfig *self );
-
-
-/*--------------------------------------------------------------------------
- * KConfigIncluded
- *  node within configuration tree
- */
-
-typedef struct KConfigIncluded KConfigIncluded;
-struct KConfigIncluded
-{
-    BSTNode n;
-    bool is_magic_file;
-    char path [ 1 ];
-};
-
-
-static
-void CC KConfigIncludedWhack ( BSTNode *n, void *ignore )
-{
-    free ( n );
-}
-
-static
-int64_t CC KConfigIncludedSort ( const BSTNode *item, const BSTNode *n )
-{
-    const KConfigIncluded *a = ( const KConfigIncluded* ) item;
-    const KConfigIncluded *b = ( const KConfigIncluded* ) n;
-    return strcmp ( a -> path, b -> path );
-}
-
-enum {
-    eInternalFalse = false, /* internal = false: non internal nodes */
-    eInternalTrue  = true,  /* internal = true ; internal nodes: read-only */
-    eInternalTrueUpdatable
-                       /* internal = true ; internal nodes, but can be updated :
-                                            "kfg/dir", "kfg/name" */
-} EInternal;
-typedef uint32_t TInternal;
-
-/*--------------------------------------------------------------------------
- * KConfigNode
- *  node within configuration tree
- */
-struct KConfigNode
-{
-    BSTNode n;
-
-    /* needs to hold a dependency reference to mgr */
-    KConfig *mgr;
-
-    /* uncounted reference to parent node */
-    KConfigNode *dad;
-
-    /* File node came from; null if created during runtime*/
-    KConfigIncluded *came_from;
-
-    /* named children - always unique */
-    BSTree children;
-
-    /* named attributes */
-    BSTree attr;
-
-    /* node value */
-    char * val_buffer;
-    String value;
-
-    /* node name */
-    String name;
-
-    KRefcount refcount;
-
-    TInternal internal; /* EInternal */
-    bool read_only;
-    bool dirty;
-};
-
-/* replace this once we introduce attributes */
-#define KConfigAttrWhack NULL
-
-
-/* Whack
- */
-static
-void CC KConfigNodeWhack ( BSTNode *n, void * data )
-{
-    KConfigNode *self = ( KConfigNode* ) n;
-    KConfig *mgr = data;
-
-    if ( mgr == NULL )
-    {
-        /* just releasing reference */
-        KConfigSever ( self -> mgr );
-        self -> mgr = NULL;
-        self -> read_only = false;
-    }
-    else
-    {
-        /* tearing down structure */
-        BSTreeWhack ( & self -> children, KConfigNodeWhack, mgr );
-        BSTreeWhack ( & self -> attr, KConfigAttrWhack, mgr );
-        free ( self -> val_buffer );
-        free ( self );
-    }
-}
-
-/* Init
- */
-static
-void KConfigNodeInit ( KConfigNode *self, const String *name )
-{
-    /* clear out here, ignoring the string space */
-    memset ( self, 0, sizeof * self );
-
-    /* initialize name early for the sake of KRefcountInit */
-    string_copy ( ( char* ) ( self + 1 ), name -> size + 1, name -> addr, name -> size );
-    StringInit ( & self -> name, ( char* ) ( self + 1 ), name -> size, name -> len );
-    StringInit ( & self -> value, "", 0, 0 );
-    KRefcountInit ( & self -> refcount, 0, "KConfigNode", "init", self -> name . addr );
-}
-
-/* Make
- */
-static
-rc_t KConfigNodeMake ( KConfigNode **n, const String *name )
-{
-    /* don't use calloc, because of string space */
-    KConfigNode *cn = malloc ( sizeof * cn + name -> size + 1 );
-    if ( cn == NULL )
-    {
-        rc_t rc = RC ( rcKFG, rcNode, rcCreating, rcMemory, rcExhausted );
-        PLOGERR (klogErr, (klogErr, rc, "Unable to create a config item for $(i)", "i=%S", name));
-        return rc;
-    }
-    KConfigNodeInit ( cn, name );
-    * n = cn;
-
-    return 0;
-}
-
-
-/* Cmp
- * Sort
- */
-static
-int64_t CC KConfigNodeCmp ( const void *item, const BSTNode *n )
-{
-    const String *a = ( const String* ) item;
-    const KConfigNode *b = ( const KConfigNode* ) n;
-    return StringCompare ( a, & b -> name );
-}
-
-static
-int64_t CC KConfigNodeSort ( const BSTNode *item, const BSTNode *n )
-{
-    const KConfigNode *a = ( const KConfigNode* ) item;
-    const KConfigNode *b = ( const KConfigNode* ) n;
-    return StringCompare ( & a -> name, & b -> name );
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KConfigNodeAddRef ( const KConfigNode *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KConfigNode" ) )
-        {
-        case krefLimit:
-            return RC ( rcKFG, rcNode, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KConfigNodeRelease ( const KConfigNode *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KConfigNode" ) )
-        {
-        case krefWhack:
-            KConfigNodeWhack ( & ( ( KConfigNode* ) self ) -> n, NULL );
-        break;
-        case krefNegative:
-            return RC ( rcKFG, rcNode, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * KConfig
- *  configuration parameter manager
- */
-struct KConfig
-{
-    BSTree tree;
-    BSTree included;
-    KDualRef refcount;
-    KConfigIncluded *current_file;
-
-    char * load_path;
-    size_t load_path_sz_tmp;
-
-    const char *magic_file_path;
-    size_t magic_file_path_size;
-
-    bool dirty;
-    bool initialized;
-};
-
-static atomic_ptr_t G_kfg;
-
-rc_t KConfigAppendToLoadPath(KConfig *self, const char* chunk)
-{
-    rc_t rc = 0;
-    size_t new_sz = 0;
-
-    assert(self);
-
-    if (chunk == NULL || chunk[0] == '\0') {
-        return rc;
-    }
-
-    if (self->load_path == NULL) {
-        self->load_path_sz_tmp = PATH_MAX;
-        self->load_path = malloc(self->load_path_sz_tmp);
-        if (self->load_path == NULL) {
-            return RC ( rcKFG, rcMgr, rcCreating, rcMemory, rcExhausted );
-        }
-        self->load_path[0] = '\0';
-    }
-
-    new_sz = string_size(self->load_path) + 1 + string_size(chunk) + 1;
-    if (self->load_path_sz_tmp < new_sz) {
-        self->load_path_sz_tmp = 2 * new_sz;
-        self->load_path = realloc(self->load_path, self->load_path_sz_tmp);
-        if (self->load_path == NULL) {
-            return RC ( rcKFG, rcMgr, rcCreating, rcMemory, rcExhausted );
-        }
-    }
-
-    if (self->load_path[0] != '\0') {
-        strcat(self->load_path, ":");
-    }
-    strcat(self->load_path, chunk);
-
-    return rc;
-}
-
-
-/* Whack
- */
-static
-rc_t KConfigEmpty ( KConfig * self)
-{
-    if (self)
-    {
-        BSTreeWhack ( & self -> tree, KConfigNodeWhack, self );
-        BSTreeWhack ( & self -> included, KConfigIncludedWhack, NULL );
-
-        self -> magic_file_path_size = 0;
-        free ( ( void* ) self -> magic_file_path );
-        self -> magic_file_path = NULL;
-
-        self->load_path_sz_tmp = 0;
-        free ( self->load_path );
-        self->load_path = NULL;
-    }
-    return 0;
-}
-
-static
-rc_t find_home_directory ( KDyld *dyld,
-    const KDirectory **dir, bool release_cached_dir )
-{
-    static const KDirectory * cached_dir = NULL;
-    static rc_t cached_rc = 0;
-    rc_t rc;
-
-    if (release_cached_dir) {
-        rc = KDirectoryRelease(cached_dir);
-        cached_dir = NULL;
-        cached_rc = 0;
-        return rc;
-    }
-    else if ( cached_dir != NULL )
-    {
-        rc = KDirectoryAddRef ( cached_dir );
-        if ( rc == 0 ) {
-            * dir = cached_dir;
-        }
-        return rc;
-    }
-    else if ( cached_rc != 0 )
-    {
-        return cached_rc;
-    }
-
-    rc = KDyldHomeDirectory ( dyld, dir, ( fptr_t ) KConfigMake );
-
-    if ( rc != 0
-        ||  (KDirectoryPathType ( * dir, "ncbi" ) & ~kptAlias) != kptDir )
-    {
-        KDylib * lib;
-        if ( rc == 0 )
-        {
-            /* Nominally succeeded, but got a useless directory
-             * (for a statically linked executable?); try again. */
-            KDirectoryRelease ( * dir );
-        }
-        rc = KDyldLoadLib ( dyld, & lib, LPFX "kfg-beacon" SHLX );
-        if ( rc == 0 )
-        {
-            KSymAddr * sym;
-            if ( ( rc = KDylibSymbol ( lib, & sym, "KConfigBeacon" ) ) == 0 )
-            {
-                fptr_t fp;
-                KSymAddrAsFunc ( sym, & fp );
-                rc = KDyldHomeDirectory ( dyld, dir, fp );
-                KSymAddrRelease ( sym );
-            }
-            KDylibRelease ( lib );
-        }
-    }
-
-    if ( rc == 0  &&  KDirectoryAddRef ( * dir ) == 0 )
-    {
-        cached_dir = * dir;
-    }
-    else
-    {
-        cached_rc = rc;
-    }
-
-    return rc;
-}
-
-static
-rc_t KConfigWhack ( KConfig *self )
-{
-    bool release_cached_dir = true;
-    find_home_directory(NULL, NULL, release_cached_dir);
-
-    if ( self == G_kfg.ptr )
-        atomic_test_and_set_ptr ( & G_kfg, NULL, self );
-
-    KConfigEmpty (self);
-
-    free ( self );
-
-    return 0;
-}
-
-/* Init
- */
-static
-void KConfigInit ( KConfig *self, KConfigNode * root )
-{
-    KDualRefInit ( & self -> refcount, 1, 0, "KConfig", "init", "kfg" );
-    BSTreeInit ( & self -> tree );
-    self -> dirty = false;
-    self -> initialized = false;
-    BSTreeInit ( & self -> included );
-    BSTreeInsert ( & self -> tree, & root -> n, KConfigNodeSort );
-    self -> magic_file_path = NULL;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KConfigAddRef ( const KConfig *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KDualRefAdd ( & self -> refcount, "KConfig" ) )
-        {
-        case krefLimit:
-            return RC ( rcKFG, rcMgr, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KConfigRelease ( const KConfig *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KDualRefDrop ( & self -> refcount, "KConfig" ) )
-        {
-        case krefWhack:
-            return KConfigWhack ( ( KConfig* ) self );
-        case krefLimit:
-            return RC ( rcKFG, rcMgr, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-static
-KConfig *KConfigAttach ( const KConfig *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KDualRefAddDep ( & self -> refcount, "KConfig" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( KConfig* ) self;
-}
-
-static
-rc_t KConfigSever ( const KConfig *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KDualRefDropDep ( & self -> refcount, "KConfig" ) )
-        {
-        case krefWhack:
-            return KConfigWhack ( ( KConfig* ) self );
-        case krefLimit:
-            return RC ( rcKFG, rcMgr, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* init_token_source
- */
-static
-rc_t init_token_source ( KTokenText *tt, KTokenSource *src,
-                         char *full, size_t fsize, const char *srcpath, const char *path, va_list args )
-{
-    size_t num_writ;
-    rc_t rc = 0;
-
-    if (args == NULL)
-        num_writ = string_copy ( full, fsize, path, string_size ( path ));
-    else
-        rc = string_vprintf ( full, fsize, & num_writ, path, args );
-    if ( rc == 0 )
-    {
-        String text, fpath;
-        StringInit ( & text, full, num_writ, string_len ( full, num_writ ) );
-        StringInitCString ( & fpath, srcpath );
-        KTokenTextInit ( tt, & text, & fpath );
-        KTokenSourceInit ( src, tt );
-    }
-    return rc;
-}
-
-/* Find
- */
-static
-KToken *KConfigNodeFind ( const KConfigNode *self, const KConfigNode **n, KTokenSource *src, KToken *t )
-{
-    * n = NULL;
-
-    while ( t -> id != eEndOfInput )
-    {
-        switch ( t -> id )
-        {
-        case ePeriod:
-            break;
-        case eDblPeriod:
-            if ( self -> dad == NULL )
-                return NULL;
-            self = self -> dad;
-            break;
-        case eDecimal:
-        case eHex:
-        case eOctal:
-        case eIdent:
-        case eName:
-            self = ( const KConfigNode* ) BSTreeFind
-                ( & self -> children, &t -> str, KConfigNodeCmp );
-            if ( self == NULL )
-                return t;
-            break;
-        default:
-            * n = self;
-            return t;
-        }
-
-        if ( KTokenizerNext ( kPOSIXPathTokenizer, src, t ) -> id != eFwdSlash )
-            break;
-
-        KTokenizerNext ( kPOSIXPathTokenizer, src, t );
-    }
-
-    * n = self;
-    return t;
-}
-
-/* Create
- */
-static
-KToken *KConfigNodeCreate ( KConfigNode *self, KConfigNode **n, KTokenSource *src, KToken *t, 
-                            KConfigIncluded *current_file )
-{
-    bool created = false;
-    KConfigNode * nself;
-    * n = NULL;
-
-    while ( t -> id != eEndOfInput )
-    {
-        switch ( t -> id )
-        {
-        case ePeriod:
-            break;
-        case eDblPeriod:
-            if ( self -> dad == NULL )
-                return NULL;
-            self = self -> dad;
-            break;
-        case eDecimal:
-        case eHex:
-        case eOctal:
-        case eName:
-        case eIdent:
-            nself = ( KConfigNode* ) BSTreeFind
-                ( & self -> children, & t -> str, KConfigNodeCmp );
-            if ( nself == NULL )
-            {
-                KConfigNode *child;
-                rc_t rc = KConfigNodeMake ( & child, & t -> str );
-                if ( rc != 0 )
-                    return t;
-                BSTreeInsert ( & self -> children, & child -> n, KConfigNodeSort );  
-                child -> dad = self;
-                self = child;
-                created = true;
-            }
-            else
-            {
-                self = nself;
-            }
-            break;
-        default:
-            * n = self;
-            return t;
-        }
-
-        if ( KTokenizerNext ( kPOSIXPathTokenizer, src, t ) -> id != eFwdSlash )
-            break;
-
-        KTokenizerNext ( kPOSIXPathTokenizer, src, t );
-    }
-
-    if ( created )
-        self -> came_from = current_file;
-
-    * n = self;
-    return t;
-}
-
-
-/* OpenNodeRead
- * VOpenNodeRead
- *  opens a configuration node
- *
- *  "node" [ OUT ] - return parameter for indicated configuration node
- *
- *  "path" [ IN, NULL OKAY ] - optional path for specifying named
- *  node within configuration hierarchy. paths will be interpreted as
- *  if they were file system paths, using '/' as separator. the
- *  special values NULL and "" are interpreted as "."
- */
-static
-rc_t KConfigNodeVOpenNodeReadInt ( const KConfigNode *self, const KConfig *mgr,
-                                   const KConfigNode **node, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( node == NULL )
-    {
-        rc = RC ( rcKFG, rcNode, rcOpening, rcParam, rcNull );
-        PLOGERR (klogErr, (klogErr, rc, "faile to provide node to open $(n)", "n=%s", path));
-    }
-    else
-    {
-        if ( self == NULL )
-        {
-            rc = RC ( rcKFG, rcNode, rcOpening, rcSelf, rcNull );
-            PLOGERR (klogErr, (klogErr, rc, "failed to provide node reference for opening $(n)", "n=%s", path));
-        }
-        else
-        {
-            if ( path == NULL || path [ 0 ] == 0 )
-            {
-                * node = self;
-                rc = 0;
-            }
-            else
-            {
-                KTokenText tt;
-                KTokenSource src;
-                char full [ 4096 ];
-        
-                rc = init_token_source ( & tt, & src, full, sizeof full, "", path, args );
-                if ( rc == 0 )
-                {
-                    /* look ahead */
-                    KToken t;
-
-                    /* skip over fwd slashes */
-                    do
-                        KTokenizerNext ( kPOSIXPathTokenizer, & src, & t );
-                    while ( t.id == eFwdSlash );
-
-                    /* follow path */
-                    if ( KConfigNodeFind ( self, node, & src, & t ) == NULL )
-                    {
-                        rc = RC ( rcKFG, rcNode, rcOpening, rcPath, rcInvalid );
-                        PLOGERR (klogErr, (klogErr, rc, "bad path $(p)", "p=%s", path));
-                    }
-                    if ( ( self = * node ) == NULL )
-                    {
-                        rc = SILENT_RC ( rcKFG, rcNode, rcOpening, rcPath, rcNotFound );
-                        /* don't complain about this
-                           PLOGERR (klogErr, (klogErr, rc, "can't find symbol $(p)", "p=%s", path));
-                        */
-                    }
-                    else if ( t . id != eEndOfInput )
-                    {
-                        rc = RC ( rcKFG, rcNode, rcOpening, rcPath, rcInvalid );
-                        PLOGERR (klogErr, (klogErr, rc, "bad path $(p)", "p=%s", path));
-                    }
-                }
-            }
-
-            if ( rc == 0 )
-            {
-                /* open node for read */
-                if ( self -> read_only )
-                {
-                    assert ( self -> mgr == mgr );
-                    return KConfigNodeAddRef ( self );
-                }
-
-                /* check to see if already open */
-                if ( atomic32_read ( & self -> refcount ) == 0 )
-                {
-                    ( ( KConfigNode* ) self ) -> mgr = KConfigAttach ( mgr );
-                    ( ( KConfigNode* ) self ) -> read_only = true;
-                    return KConfigNodeAddRef ( self );
-                }
-
-                rc = RC ( rcKFG, rcNode, rcOpening, rcNode, rcBusy );
-            }
-        }
-
-        * node = NULL;
-    }
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KConfigNodeGetMgr( const KConfigNode * self, KConfig ** mgr )
-{
-    if ( self == NULL )
-        return RC ( rcKFG, rcNode, rcOpening, rcSelf, rcNull );
-    if ( mgr == NULL )
-        return RC ( rcKFG, rcNode, rcOpening, rcParam, rcNull );
-    *mgr = self->mgr;
-    return KConfigAddRef ( *mgr );
-}
-
-
-LIB_EXPORT rc_t CC KConfigNodeVOpenNodeRead ( const KConfigNode *self,
-                                              const KConfigNode **node, const char *path, va_list args )
-{
-    if ( self != NULL )
-        return KConfigNodeVOpenNodeReadInt ( self, self -> mgr, node, path, args );
-
-    if ( node == NULL )
-        return RC ( rcKFG, rcNode, rcOpening, rcParam, rcNull );
-
-    * node = NULL;
-    return RC ( rcKFG, rcNode, rcOpening, rcSelf, rcNull );
-}
-
-LIB_EXPORT rc_t CC KConfigNodeOpenNodeRead ( const KConfigNode *self,
-                                             const KConfigNode **node, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KConfigNodeVOpenNodeRead ( self, node, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KConfigVOpenNodeRead ( const KConfig *self,
-                                          const KConfigNode **node, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( node == NULL )
-        rc = RC ( rcKFG, rcMgr, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcMgr, rcOpening, rcSelf, rcNull );
-        else if (self->tree.root == NULL)
-            rc = RC ( rcKFG, rcMgr, rcOpening, rcPath, rcNotFound );
-        else
-        {
-            return KConfigNodeVOpenNodeReadInt
-                ( (const KConfigNode *) self -> tree . root, self, node, path, args );
-        }
-
-        * node = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KConfigOpenNodeRead ( const KConfig *self,
-                                         const KConfigNode **node, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KConfigVOpenNodeRead ( self, node, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* OpenNodeUpdate
- * VOpenNodeUpdate
- *  opens a configuration node
- *
- *  "node" [ OUT ] - return parameter for indicated configuration node
- *
- *  "path" [ IN, NULL OKAY ] - optional path for specifying named
- *  node within configuration hierarchy. paths will be interpreted as
- *  if they were file system paths, using '/' as separator. the
- *  special values NULL and "" are interpreted as "."
- */
-static
-rc_t KConfigNodeVOpenNodeUpdateInt ( KConfigNode *self, KConfig *mgr,
-                                     KConfigNode **node, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( node == NULL )
-        rc = RC ( rcKFG, rcNode, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcNode, rcOpening, rcSelf, rcNull );
-        else
-        {
-            if ( path == NULL || path [ 0 ] == 0 )
-            {
-                * node = self;
-                rc = 0;
-            }
-            else
-            {
-                KTokenText tt;
-                KTokenSource src;
-                char full [ 4096 ];
-        
-                rc = init_token_source ( & tt, & src, full, sizeof full, "", path, args );
-                if ( rc == 0 )
-                {
-                    /* look ahead */
-                    KToken t;
-
-                    do
-                        KTokenizerNext ( kPOSIXPathTokenizer, & src, & t );
-                    while ( t.id == eFwdSlash);
-
-                    /* follow path */
-                    assert ( mgr != NULL );
-                    if ( KConfigNodeCreate ( self, node, & src, & t, mgr -> current_file ) == NULL )
-                        return RC ( rcKFG, rcNode, rcOpening, rcPath, rcInvalid );
-                    if ( ( self = * node ) == NULL )
-                        rc = RC ( rcKFG, rcNode, rcOpening, rcMemory, rcExhausted );
-                    else if ( t . id != eEndOfInput )
-                        rc = RC ( rcKFG, rcNode, rcOpening, rcPath, rcInvalid );
-                }
-            }
-
-            if ( rc == 0 )
-            {
-                /* check to see if internal */
-                if ( self -> internal == eInternalTrue )
-                    rc = RC ( rcKFG, rcNode, rcOpening, rcNode, rcReadonly );
-                else
-                {
-                    /* check to see if open */
-                    if ( atomic32_read ( & self -> refcount ) == 0 )
-                    {
-                        self -> mgr = KConfigAttach ( mgr );
-                        assert ( ! self -> read_only );
-                        return KConfigNodeAddRef ( self );
-                    }
-
-                    rc = RC ( rcKFG, rcNode, rcOpening, rcNode, rcBusy );
-                }
-            }
-        }
-
-        * node = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KConfigNodeVOpenNodeUpdate ( KConfigNode *self,
-                                                KConfigNode **node, const char *path, va_list args )
-{
-    if ( self != NULL )
-        return KConfigNodeVOpenNodeUpdateInt ( self, self -> mgr, node, path, args );
-
-    if ( node == NULL )
-        return RC ( rcKFG, rcNode, rcOpening, rcParam, rcNull );
-
-    * node = NULL;
-    return RC ( rcKFG, rcNode, rcOpening, rcSelf, rcNull );
-}
-
-LIB_EXPORT rc_t CC KConfigNodeOpenNodeUpdate ( KConfigNode *self,
-                                               KConfigNode **node, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KConfigNodeVOpenNodeUpdate ( self, node, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KConfigVOpenNodeUpdate ( KConfig *self,
-                                            KConfigNode **node, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( node == NULL )
-        rc = RC ( rcKFG, rcMgr, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcMgr, rcOpening, rcSelf, rcNull );
-        else if (self->tree.root == NULL)
-            rc = RC ( rcKFG, rcMgr, rcOpening, rcSelf, rcCorrupt );
-        else
-        {
-            return KConfigNodeVOpenNodeUpdateInt
-                ( ( KConfigNode* ) self -> tree . root, self, node, path, args );
-        }
-
-        * node = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KConfigOpenNodeUpdate ( KConfig *self,
-                                           KConfigNode **node, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KConfigVOpenNodeUpdate ( self, node, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* Read
- *  read a node value
- *
- *  "offset" [ IN ] - initial offset into configuration
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - number of bytes actually read
- *
- *  "remaining" [ OUT, NULL OKAY ] - optional return parameter for
- *  the number of bytes remaining to be read.
- *  specifically, "offset" + "num_read" + "remaining" == sizeof node data
- */
-LIB_EXPORT rc_t CC KConfigNodeRead ( const KConfigNode *self,
-                                     size_t offset, char *buffer, size_t bsize,
-                                     size_t *num_read, size_t *remaining )
-{
-    rc_t rc;
-    size_t dummy;
-
-    if ( remaining == NULL )
-        remaining = & dummy;
-
-    if ( num_read == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-        else if ( buffer == NULL && bsize != 0 )
-            rc = RC ( rcKFG, rcNode, rcReading, rcBuffer, rcNull );
-        else if ( offset >= self -> value . size )
-            rc = 0;
-        else
-        {
-            size_t avail = * remaining = self -> value . size - offset;
-            if ( avail > bsize )
-                avail = bsize;
-            if ( avail > 0 )
-                memcpy ( buffer, & self -> value . addr [ offset ], avail );
-            * num_read = avail;
-            * remaining -= avail;
-            return 0;
-        }
-
-        * num_read = 0;
-    }
-
-    * remaining = 0;
-
-    return rc;
-}
-
-static
-void KConfigNodeSetDirty ( KConfigNode *self )
-{
-    KConfig *mgr = self -> mgr;
-
-    if ( mgr == NULL )
-        self -> dirty = true;
-    else if ( mgr -> initialized )
-        self -> dirty = mgr -> dirty = true;
-}
-
-/* Write
- *  write a node value or attribute
- *  replaces anything already there
- *
- *  "buffer" [ IN ] and "size" [ IN ] - new value data
- */
-LIB_EXPORT rc_t CC KConfigNodeWrite ( KConfigNode *self, const char *buffer, size_t size )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcWriting, rcSelf, rcNull );
-    else if ( self -> read_only || self -> internal == eInternalTrue )
-        rc = RC ( rcKFG, rcNode, rcWriting, rcSelf, rcReadonly );
-    else if ( size == 0 )
-    {
-        free ( self -> val_buffer ), self -> val_buffer = NULL;
-        StringInit ( & self -> value, "", 0, 0 );
-        rc = 0;
-    }
-    else if ( buffer == NULL )
-        rc = RC ( rcKFG, rcNode, rcWriting, rcBuffer, rcNull );
-    else
-    {
-        if ( size != self -> value . size )
-        {
-            void *new_buffer = realloc ( self -> val_buffer, size + 1 );
-            if ( new_buffer == NULL )
-                return RC ( rcKFG, rcNode, rcWriting, rcMemory, rcExhausted );
-            self -> val_buffer = new_buffer;
-            self -> value . size = size;
-            self -> value . addr = new_buffer;
-        }
-
-        assert ( self -> val_buffer != NULL );
-        string_copy ( self -> val_buffer, self -> value . size + 1, buffer, size );
-        self -> value . len = string_len ( self -> val_buffer, size );
-        
-        KConfigNodeSetDirty ( self );
-        
-        rc = 0;
-    }
-
-    return rc;
-}
-
-
-/* Write Boolean
- *  write a boolean value ( literally the text "true" or "false:
- *  overwrites anything already there
- *
- *  "state" [ IN ] - new value
- */
-KFG_EXTERN rc_t CC KConfigNodeWriteBool ( KConfigNode *self, bool state )
-{
-    rc_t rc;
-    size_t written;
-    char value[ 8 ];
-
-    if ( state )
-        rc = string_printf( value, sizeof value, &written, "true" );
-    else
-        rc = string_printf( value, sizeof value, &written, "false" );
-
-    if ( rc == 0 )
-        rc = KConfigNodeWrite ( self, value, written );
-    return rc;
-}
-
-
-/* Append
- *  append data to value
- *
- *  "buffer" [ IN ] and "size" [ IN ] - value data to be appended
- */
-LIB_EXPORT rc_t CC KConfigNodeAppend ( KConfigNode *self, const char *buffer, size_t size )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcWriting, rcSelf, rcNull );
-    else if ( self -> read_only || self -> internal )
-        rc = RC ( rcKFG, rcNode, rcWriting, rcSelf, rcReadonly );
-    else if ( size == 0 )
-        rc = 0;
-    else if ( buffer == NULL )
-        rc = RC ( rcKFG, rcNode, rcWriting, rcBuffer, rcNull );
-    else
-    {
-        void *new_buffer = realloc ( self -> val_buffer, self -> value . size + size + 1 );
-        if ( new_buffer == NULL )
-            return RC ( rcKFG, rcNode, rcWriting, rcMemory, rcExhausted );
-        self -> val_buffer = new_buffer;
-        string_copy ( & self -> val_buffer [ self -> value . size ], self -> value . size + size + 1, buffer, size );
-        self -> value . size += size;
-        self -> value . len = string_len ( self -> val_buffer, self -> value . size );
-        
-        KConfigNodeSetDirty ( self );
-
-        rc = 0;
-    }
-
-    return rc;
-}
-
-
-/* ReadAttr
- *  reads as NUL-terminated string
- *
- *  "name" [ IN ] - NUL terminated attribute name
- *
- *  "buffer" [ OUT ] and "bsize" - return parameter for attribute value
- *
- *  "size" [ OUT ] - return parameter giving size of string
- *  not including NUL byte. the size is set both upon success
- *  and insufficient buffer space error.
- */
-LIB_EXPORT rc_t CC KConfigNodeReadAttr ( const KConfigNode *self, const char *name,
-                                         char *buffer, size_t bsize, size_t *size )
-{
-    PLOGMSG (klogFatal, (klogFatal, "$(F) unimplemented", "F=%s", __func__));
-    return -1;
-}
-
-
-/* WriteAttr
- *  writes NUL-terminated string
- *
- *  "name" [ IN ] - NUL terminated attribute name
- *
- *  "value" [ IN ] - NUL terminated attribute value
- */
-LIB_EXPORT rc_t CC KConfigNodeWriteAttr ( KConfigNode *self,
-                                          const char *name, const char *value )
-{
-    PLOGMSG (klogFatal, (klogFatal, "$(F) unimplemented", "F=%s", __func__));
-    return -1;
-}
-
-
-/* Drop
- * VDrop
- *  drop some or all node content
- */
-LIB_EXPORT rc_t CC KConfigNodeDropAll ( KConfigNode *self )
-{
-    if ( self == NULL )
-        return RC ( rcKFG, rcNode, rcClearing, rcSelf, rcNull );
-    BSTreeWhack ( & self->children, KConfigNodeWhack, self->mgr); 
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KConfigNodeDropAttr ( KConfigNode *self, const char *attr )
-{
-    PLOGMSG (klogFatal, (klogFatal, "$(F) unimplemented", "F=%s", __func__));
-    return -1;
-}
-
-LIB_EXPORT rc_t CC KConfigNodeVDropChild ( KConfigNode *self, const char *path, va_list args )
-{
-    PLOGMSG (klogFatal, (klogFatal, "$(F) unimplemented", "F=%s", __func__));
-    return -1;
-}
-
-LIB_EXPORT rc_t CC KConfigNodeDropChild ( KConfigNode *self, const char *path, ... )
-{
-    PLOGMSG (klogFatal, (klogFatal, "$(F) unimplemented", "F=%s", __func__));
-    return -1;
-}
-
-
-/* Rename
- *  renames a contained object
- *
- *  "from" [ IN ] - NUL terminated string in UTF-8
- *  giving simple name of existing attr
- *
- *  "to" [ IN ] - NUL terminated string in UTF-8
- *  giving new simple attr name
- */
-LIB_EXPORT rc_t CC KConfigNodeRenameAttr ( KConfigNode *self, const char *from, const char *to )
-{
-    PLOGMSG (klogFatal, (klogFatal, "$(F) unimplemented", "F=%s", __func__));
-    return -1;
-}
-
-LIB_EXPORT rc_t CC KConfigNodeRenameChild ( KConfigNode *self, const char *from, const char *to )
-{
-    PLOGMSG (klogFatal, (klogFatal, "$(F) unimplemented", "F=%s", __func__));
-    return -1;
-}
-
-
-/*--------------------------------------------------------------------------
- * KConfig
- */
-
-static
-rc_t
-update_node ( KConfig* self, const char* key, const char* value,
-    TInternal internal )
-{
-    KConfigNode * node;
-    rc_t rc = KConfigOpenNodeUpdate ( self, &node, "%s", key);
-    if (rc == 0)
-    {
-/*        pLogMsg(klogInfo, "updating config key $(KEY) with '$(VALUE)'", 
-                          "KEY=%s,VALUE=%s", 
-                          key, value);*/
-        rc = KConfigNodeWrite (node, value, string_size(value));
-        node -> internal = internal;
-        if (self->current_file != NULL && self->current_file->is_magic_file) {
-            if (node->came_from == NULL || !node->came_from->is_magic_file) {
-                node->came_from = self->current_file;
-            }
-        }
-        KConfigNodeRelease ( node );
-    }
-    return rc;
-}
-
-static
-rc_t write_nvp(void* pself, const char* name, size_t nameLen, VNamelist* values)
-{   /* concatenate all values from the namelist and put the result into config under the given name */
-    uint32_t count;
-    size_t size=0;
-    size_t concatTo=0;
-    uint32_t i;
-
-    char* buf;
-    KConfig *self = (KConfig *)pself;
-    rc_t rc=VNameListCount(values, &count);
-    if (rc != 0)
-    {
-        return rc;
-    }
-    for (i=0; i < count; ++i)
-    {
-        const char* val;
-        rc=VNameListGet(values, i, &val);
-        if (rc != 0)
-        {
-            return rc;
-        }
-        size+=string_size(val);
-    }
-
-    buf=(char*)malloc(size+1);
-    if (buf == 0)
-    {
-        return RC ( rcKFG, rcMgr, rcLoading, rcMemory, rcExhausted );
-    }
-
-    concatTo=0;
-    for (i=0; i < count; ++i)
-    {
-        const char* val;
-        rc=VNameListGet(values, i, &val);
-        if (rc != 0)
-        {
-            free(buf);
-            return rc;
-        }
-        string_copy(buf+concatTo, size+1-concatTo, val, string_size(val));
-        concatTo+=string_size(val);
-    }
-    buf[size]=0;
-
-    {   /* create the node */
-        String* nameStr;
-    
-        /* some old config files may have "dbGaP" in their repository keys misspelled as "dbGap" - fix if seen */
-        const char* oldGaPprefix = "/repository/user/protected/dbGap-";
-        size_t size = sizeof("/repository/user/protected/dbGap-") - 1;
-        bool needsFix = string_cmp(name, string_measure(name, NULL), oldGaPprefix, size, (uint32_t)size) == 0;
-
-        String tmp;
-        StringInit(&tmp, name, nameLen, (uint32_t)nameLen);
-        StringCopy((const String**)&nameStr, &tmp);
-        if (needsFix)
-            ((char*)(nameStr->addr)) [ size - 2 ] = 'P';
-    
-        rc = update_node(self, nameStr->addr, buf, false);
-        if (needsFix)
-        {
-            KConfigNode * node;
-            rc = KConfigOpenNodeUpdate ( self, &node, "%s", nameStr->addr );
-            if (rc == 0)
-            {   /* we are likely to be initializing, so have to set the dirty flags directly, not through KConfigNodeSetDirty() */
-                self -> dirty = true;
-                node -> dirty = true;
-                KConfigNodeRelease ( node );
-            }
-        }
-        StringWhack(nameStr);
-    }
-    
-    free(buf);
-    return rc;
-}
-
-static
-bool look_up_var(void * self, struct KFGToken* pb)
-{
-    const KConfigNode* node;
-    rc_t rc = KConfigOpenNodeRead((KConfig*)self, &node, "%.*s", pb->tokenLength-3, pb->tokenText+2);
-    if (rc == 0)
-    {
-        pb->tokenText   = node->value.addr; 
-        pb->tokenLength = node->value.len;
-        pb->tokenId     = kfgVAR_REF;
-    }
-    KConfigNodeRelease(node);
-    return rc == 0;
-}
-
-static
-void CC report_error(KFGScanBlock* sb, const char* msg)
-{
-    pLogMsg(klogErr, "$(file):$(line):$(column): error: token='$(token)', msg='$(msg)'", 
-                     "file=%s,line=%d,column=%d,token=%.*s,msg=%s", 
-                     sb->file, 
-                     sb->lastToken->line_no, 
-                     sb->lastToken->column_no, 
-                     sb->lastToken->tokenLength, 
-                     sb->lastToken->tokenText, 
-                     msg);
-}
-
-#define DISP_RC2(rc, name, msg) (void)((rc == 0) ? 0 : \
-    PLOGERR(klogInt, (klogInt, rc, \
-        "$(name): $(msg)", "name=%s,msg=%s", name, msg)))
-
-typedef struct
-{
-    KFile *f; /* NULL for OUTMSG */
-
-    /* total bytes flushed to the file*/
-    size_t flushed;
-
-    /* total bytes in buffer */
-    size_t buffered;
-    
-    rc_t rc;
-    
-    /* buffer */
-    char buffer [ 32 * 1024 ];
-    
-} PrintBuff;
-
-/* Init
- *  initialize your structure    
- */
-static
-void PrintBuffInit ( PrintBuff *pb, KFile *f )
-{
-    assert ( pb != NULL );
-    pb -> f = f; /* NULL for OUTMSG */
-    pb -> flushed = 0;
-    pb -> buffered = 0;
-    pb -> rc = 0;
-}
-
-/* Flush
- * Write buffer out to file
- */
-static rc_t PrintBuffFlush ( PrintBuff *self )
-{
-    rc_t rc = 0;
-
-    assert ( self != NULL );
-    if ( self -> buffered != 0 )
-    {
-        size_t num_writ = 0;
-
-        if (self -> f == NULL) {
-            OUTMSG(("%.*s", self -> buffered - self -> flushed,
-                self -> buffer + self -> flushed));
-            num_writ = self -> buffered;
-        }
-        else {
-            rc = KFileWriteAll ( self -> f, self -> flushed,
-                self -> buffer, self -> buffered, & num_writ );
-        }
-        
-        if ( rc == 0 )
-        {
-            if ( num_writ != self -> buffered )
-                rc = RC ( rcKFG, rcBuffer, rcFlushing,
-                    rcTransfer, rcIncomplete );
-            else
-            {
-                self -> flushed += num_writ;
-                self -> buffered = 0;
-            }
-        }
-    }
-
-    return self -> rc = rc;
-}
-
-/* Print
- *  printf style writing to the buffer
- */
-static
-rc_t PrintBuffPrint ( PrintBuff *self, const char *fmt, ... )
-{
-    rc_t rc;
-    size_t num_writ;
-    va_list args1, args2;
-
-    assert ( self != NULL );
-    assert ( fmt != NULL );
-    assert ( fmt [ 0 ] != 0 );
-
-    va_start ( args1, fmt );
-    va_copy ( args2, args1 );
-
-    rc = string_vprintf ( & self -> buffer [ self -> buffered ], 
-            sizeof self -> buffer - self -> buffered, & num_writ, fmt, args1 );
-    if ( rc == 0 )
-        self -> buffered += num_writ;
-    else if ( GetRCObject ( rc ) == (enum RCObject)rcBuffer
-        && GetRCState ( rc ) == rcInsufficient )
-    {
-        rc = PrintBuffFlush ( self );
-        if ( rc == 0 )
-        {
-            rc = string_vprintf ( & self -> buffer [ self -> buffered ],
-             sizeof self -> buffer - self -> buffered, & num_writ, fmt, args2 );
-            if ( rc == 0 )
-                self -> buffered += num_writ;
-        }
-    }
-
-    va_end ( args2 );
-    va_end ( args1 );
-
-    return self -> rc = rc;
-}
-
-static rc_t printIndent(int indent, PrintBuff *pb) {
-    rc_t rc = 0;
-
-    int i = 0;
-    for (i = 0; i < indent * 2; ++i) {
-        rc_t rc2 = PrintBuffPrint(pb, " ");
-        if (rc == 0 && rc2 != 0) {
-            rc = rc2;
-        }
-    }
-
-    return rc;
-}
-
-static rc_t KConfigNodeReadData(const KConfigNode* self,
-    char* buf, size_t blen, size_t* num_read)
-{
-    rc_t rc = 0;
-    size_t remaining = 0;
-
-    assert(buf && blen && num_read);
-
-    rc = KConfigNodeRead(self, 0, buf, blen, num_read, &remaining);
-
-    assert(remaining == 0); /* TODO overflow check */
-    assert(*num_read <= blen);
-
-    return rc;
-}
-
-char ToHex(uint32_t i)
-{
-    if (i <= 9)
-        return '0' + i;
-    return 'A' + (i - 10);
-}
-
-static
-rc_t CC PrintBuffPrintQuoted ( PrintBuff *self, const String* data )
-{
-    rc_t rc = PrintBuffPrint(self, "\"");
-    const char* str = (const char*)(data->addr);
-    uint32_t i;
-    for ( i = 0; i < StringLength(data); ++i )
-    {
-        if (rc != 0)
-            break;
-        if (str[i] < ' ')
-        {
-            rc = PrintBuffPrint(self, "\\x%c%c",
-                ToHex(str[i]/16), ToHex(str[i]%16) );
-        }
-        else
-        {
-            switch (str[i])
-            {
-            case '"':
-                rc = PrintBuffPrint(self, "\\\"");
-                break;
-            default:
-                rc = PrintBuffPrint(self, "%c", str[i]);
-            }
-        }
-    }
-    if (rc == 0)
-        rc = PrintBuffPrint(self, "\"");
-    return rc;
-}
-
-static rc_t _printNodeData(const char *name, const char *data, uint32_t dlen,
-    bool native, const char *fullpath, bool hide, PrintBuff *pb)
-{
-    bool secret = false;
-    {
-        const char d1[] = "download-ticket";
-        size_t l1 = sizeof d1 - 1;
-
-        const char d2[] = "aws_access_key_id";
-        size_t l2 = sizeof d2 - 1;
-
-        const char d3[] = "aws_secret_access_key";
-        size_t l3 = sizeof d3 - 1;
-
-        if ((string_cmp(name,
-                string_measure(name, NULL), d1, l1, (uint32_t)l1) == 0) || 
-            (string_cmp(name,
-                string_measure(name, NULL), d2, l2, (uint32_t)l2) == 0) || 
-            (string_cmp(name,
-                string_measure(name, NULL), d3, l3, (uint32_t)l3) == 0))
-        {
-            secret = true;
-        }
-    }
-    if (hide && !native && secret) {
-        const char *ellipsis = "";
-        const char replace[] =
-"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
-        if (dlen > 70) {
-            dlen = 70;
-            ellipsis = "...";
-        }
-        return PrintBuffPrint(pb, "%.*s%s", dlen, replace, ellipsis);
-    }
-    else if (!native) {
-        String s;
-        StringInit(&s, data, dlen, dlen);
-        return PrintBuffPrintQuoted(pb, &s);
-    }
-    else {
-        rc_t rc = PrintBuffPrint(pb, "%s = ", fullpath);
-        if (rc == 0) {
-            String s;
-            StringInit(&s, data, dlen, dlen);
-            rc = PrintBuffPrintQuoted(pb, &s);
-        }
-        if (rc == 0) {
-            rc = PrintBuffPrint(pb, "\n");
-        }
-        return rc;
-    }
-}
-
-static rc_t KConfigNodePrint(const KConfigNode *self, int indent,
-    const char* root, bool debug, bool native, const char* aFullpath,
-    PrintBuff *pb, uint32_t skipCount, va_list args)
-{
-    rc_t rc = 0;
-    KNamelist* names = NULL;
-    uint32_t count = 0;
-    uint32_t i = 0;
-    char data[4097] = "";
-    size_t num_data = 0;
-
-    assert(self);
-
-    if (!native) {
-        rc = printIndent(indent, pb);
-        if (rc == 0) {
-            bool found = false;
-            uint32_t i = 0;
-            va_list args_copy;
-            if (skipCount > 0) {
-                va_copy(args_copy, args);
-            }
-            for (i = 0; i < skipCount; ++i) {
-                const char *skip = va_arg(args_copy, const char*);
-                if (string_cmp(skip, string_measure(skip, NULL), root,
-                        string_measure(root, NULL), string_measure(root, NULL))
-                    == 0)
-                {
-                    rc = PrintBuffPrint
-                        (pb, "<%s><!-- skipped --></%s>\n", root, root);
-                    found = true;
-                    break;
-                }
-            }
-            if (skipCount > 0) {
-                va_end(args_copy);
-            }
-            if (found) {
-                return rc;
-            }
-            rc = PrintBuffPrint(pb, "<%s>", root);
-        }
-    }
-
-    if (rc == 0) {
-        rc_t rc = KConfigNodeReadData(self, data, sizeof data, &num_data);
-        DISP_RC2(rc, "KConfigNodeReadData()", root);
-        if (rc == 0 && num_data > 0) {
-            _printNodeData(root, data, num_data,
-                native, aFullpath, !native, pb);
-        }
-        if (debug && self->came_from) {
-            OUTMSG(("<came_from is_magic_file=\"%s\"/>",
-                self->came_from->is_magic_file ? "true" : "false"));
-        }
-    }
-
-    if (rc == 0) {
-        rc = KConfigNodeListChild(self, &names);
-        DISP_RC2(rc, "KConfigNodeListChild()", root);
-    }
-    if (rc == 0) {
-        rc = KNamelistCount(names, &count);
-        DISP_RC2(rc, "KNamelistCount()", root);
-    }
-
-    if (rc == 0) {
-        if (count > 0 && !native) {
-            rc = PrintBuffPrint(pb, "\n");
-        }
-        for (i = 0; i < count; ++i) {
-            char *fullpath = NULL;
-            const char* name = NULL;
-            const KConfigNode* node = NULL;
-            if (rc == 0) {
-                rc = KNamelistGet(names, i, &name);
-                DISP_RC2(rc, "KNamelistGet()", root);
-            }
-            if (rc == 0) {
-                rc = KConfigNodeOpenNodeRead(self, &node, "%s", name);
-                DISP_RC2(rc, "KConfigNodeOpenNodeRead()", name);
-            }
-            if (rc == 0) {
-                size_t bsize = strlen(aFullpath) + 1 + strlen(name) + 1;
-                fullpath = malloc(bsize + 1);
-                if (fullpath == NULL) {
-                    rc = RC(rcKFG, rcStorage, rcAllocating,
-                        rcMemory, rcExhausted);
-                }
-                else {
-                    string_printf(fullpath, bsize, NULL,
-                        "%s/%s", aFullpath, name);
-                }
-            }
-            if (rc == 0) {
-                if (! isdigit(name[0])) {
-                    KConfigNodePrint(node, indent + 1, name,
-                        debug, native, fullpath, pb, skipCount, args);
-                }
-                else {
-                    /* XML node names cannot start with a number */
-                    size_t dsize = strlen(name) + 2;
-                    char *dname =  malloc(dsize);
-                    if (dname == NULL) {
-                        rc = RC(rcKFG, rcStorage, rcAllocating,
-                            rcMemory, rcExhausted);
-                    }
-                    else {
-                        string_printf(dname, dsize, NULL, "_%s", name);
-                        KConfigNodePrint(node, indent + 1, dname,
-                            debug, native, fullpath, pb, skipCount, args);
-                        free(dname);
-                    }
-                }
-            }
-            KConfigNodeRelease(node);
-            free(fullpath);
-        }
-    }
-
-    if (count > 0 && !native) {
-        printIndent(indent, pb);
-    }
-
-    if (rc == 0 && !native) {
-        rc = PrintBuffPrint(pb, "</%s>\n", root);
-    }
-
-    KNamelistRelease(names);
-
-    return rc;
-}
-
-static rc_t CC KConfigPrintImpl(const KConfig* self,
-    int indent, const char *root, bool debug, bool native, 
-    PrintBuff *pb, uint32_t skipCount, va_list args)
-{
-    rc_t rc = 0;
-
-    if (root == NULL) {
-        root = "Config";
-    }
-
-    if (self == NULL) {
-        OUTMSG(("<%s>", root));
-        OUTMSG(("KConfigPrint(const KConfig* self = NULL)\n"));
-        OUTMSG(("</%s>\n", root));
-    }
-    else {
-        const KConfigNode* node = NULL;
-        if (rc == 0) {
-            rc = KConfigOpenNodeRead(self, &node, "/");
-            DISP_RC2(rc, "KConfigOpenNodeRead()", "/");
-        }
-        if (rc == 0) {
-            KConfigNodePrint
-                (node, indent, root, debug, native, "", pb, skipCount, args);
-        }
-        KConfigNodeRelease(node);
-    }
-
-    return rc;
-}
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
-
-LIB_EXPORT rc_t CC KConfigPrintDebug(const KConfig* self, const char *path) {
-    rc_t rc = 0;
-
-    PrintBuff pb;
-
-    if (rc == 0) {
-        PrintBuffInit(&pb, NULL);
-    }
-
-    if (rc == 0) {
-        rc = KConfigPrintImpl(self, 0, path, true, false, &pb, 0, NULL);
-    }
-
-    if (rc == 0) {
-        rc = PrintBuffFlush(&pb);
-    }
-
-    return rc;
-}
-
-/*
- * Set up the parameter block and start parsing lines
- */
-static
-rc_t parse_file ( KConfig * self, const char* path, const char * src )
-{
-    KFGParseBlock pb;
-    KFGScanBlock sb;
-
-    pb.write_nvp    = write_nvp;
-
-    sb.self         = self;
-    sb.file         = path;
-    sb.look_up_var  = look_up_var;
-    sb.report_error = report_error;
-
-    if  ( ! KFGScan_yylex_init(&sb, src) )
-    {   /* out of memory is the only reason we can get false here */
-        return RC ( rcKFG, rcMgr, rcParsing, rcMemory, rcExhausted );
-    }
-    
-    KFG_parse(&pb, &sb); /* may have reported parse errors into log, but we should have been able to extract enough data to proceed regardless */
-    KFGScan_yylex_destroy(&sb);
-    
-    return 0;
-}
-
-/* LoadFile
- * loads a configuration file
- */
-LIB_EXPORT rc_t CC KConfigLoadFile ( KConfig * self, const char * path, const KFile * file )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcMgr, rcLoading, rcSelf, rcNull );
-    else if ( file == NULL )
-        rc = RC ( rcKFG, rcMgr, rcLoading, rcFile, rcNull );
-    else
-    {
-        const KMMap * mm;
-        bool entry_initialized = self -> initialized;
-        self -> initialized = false;
-
-        /* populate file-specific predefined nodes */
-#define UPDATE_NODES(dir, file)                             \
-        rc = update_node(self, "kfg/dir", dir, eInternalTrueUpdatable );     \
-        if (rc == 0)                                        \
-            rc = update_node(self, "kfg/name", file, eInternalTrueUpdatable )
-
-        if ( path == NULL || path [ 0 ] == 0)
-        {
-            path = "UNSPECIFIED";
-            UPDATE_NODES ( "", "" );
-        }
-        else
-        {
-            KDirectory* dir;
-            rc = KDirectoryNativeDir(&dir);
-            if (rc == 0 )
-            {
-                char buff [ 4096 ];
-                rc = KDirectoryResolvePath ( dir, true, buff, sizeof buff,
-                    "%.*s", string_size(path), path );
-                if ( rc == 0 )
-                {
-                    char* name = strrchr (buff, '/');
-                    DBGMSG ( DBG_KFG, DBG_FLAG ( DBG_KFG ),
-                        ( "KFG: loading file '%s'\n", buff ) );
-                    if (name == NULL)
-                    {   /* no dir name */
-                        UPDATE_NODES("", buff);
-                    }
-                    else
-                    {
-                        *name=0; /* nul-terminate dir name; file name follows the 0 */
-                        UPDATE_NODES(buff, name+1);
-                    }
-                }
-                KDirectoryRelease ( dir );
-            }
-            else
-            {
-                update_node(self, "kfg/dir", "", eInternalTrueUpdatable);
-                update_node(self, "kfg/name", "", eInternalTrueUpdatable);
-            }
-        }
-#undef UPDATE_NODES
-
-
-        rc = KMMapMakeRead ( & mm, file );
-        if ( rc == 0 )
-        {
-            size_t size;
-            const void * ptr;
-            rc = KMMapAddrRead ( mm, & ptr );
-            if ( rc == 0 )
-                rc = KMMapSize ( mm, & size );
-            if ( rc == 0 )
-            {
-                /* make a 0-terminated copy for parsing */
-                char* buf=malloc(size+1);
-                if (buf == 0)
-                {
-                    rc = RC ( rcKFG, rcMgr, rcLoading, rcMemory, rcExhausted );
-                }
-                else
-                {
-                    string_copy(buf, size+1, ptr, size);
-                    buf[size]=0;
-
-                    /* Parse the path to populate: */
-                 /* update_node(self, "kfg/dir", dir, eInternalTrueUpdatable);*/
-               /* update_node(self, "kfg/name", name, eInternalTrueUpdatable);*/
-
-                    /* parse config file */
-                    rc = parse_file ( self, path, buf );
-                    free(buf);
-                }
-            }
-
-            KMMapRelease ( mm );
-        }
-        self -> initialized = entry_initialized;
-    }
-
-    return rc;
-}
-
-static
-bool KConfigNodePrintPath ( KConfigNode *self, PrintBuff *pb )
-{
-    if ( self -> dad == NULL )
-        PrintBuffPrint ( pb, "%S", & self -> name );
-    else
-    {
-        if ( KConfigNodePrintPath ( self -> dad, pb ) )
-            return true;
-
-        PrintBuffPrint ( pb, "/%S", & self -> name );
-    }
-    return pb -> rc != 0;
-}
-
-/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv KfgSettings vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
-typedef struct {
-    const char *envrNcbiHome;
-    char        envrNcbiSettings[ PATH_MAX ];
-    char        dfltNcbiHome    [ PATH_MAX ];
-    char        dfltNcbiSettings[ PATH_MAX ];
-} KfgSettings;
-static
-void _KConfigIniKfgSettings ( const KConfig * self, KfgSettings * ks ) {
-    size_t bytes = 0;
-
-    assert(ks);
-    memset(ks, 0, sizeof *ks);
-
-    /* load environment */
-    ks -> envrNcbiHome = getenv ( "NCBI_HOME" );
-    {
-        const char *value = getenv ( "NCBI_SETTINGS" );
-        if ( value != NULL ) {
-            string_copy_measure (
-                ks -> envrNcbiSettings, sizeof ks -> envrNcbiSettings, value );
-        }
-        else if ( ks -> envrNcbiHome != NULL ) {
-            string_printf ( ks->envrNcbiSettings,
-                sizeof ks -> envrNcbiSettings,
-                & bytes, "%s/%s", ks -> envrNcbiHome, MAGIC_LEAF_NAME);
-        }
-    }
-
-    /* default values */
-    {
-        char home [ PATH_MAX ] = "";
-        size_t num_read = 0;
-        size_t remaining = 0;
-        rc_t rc = KConfigRead
-            ( self, "HOME", 0, home, sizeof home, & num_read, & remaining);
-        if ( rc != 0 || remaining != 0 ) {
-            return;
-        }
-        string_printf ( ks -> dfltNcbiHome  , sizeof ks -> dfltNcbiHome,
-            & bytes, "%.*s/.ncbi", num_read, home );
-        string_printf ( ks->dfltNcbiSettings, sizeof ks -> dfltNcbiSettings,
-            & bytes, "%.*s/.ncbi/%s", num_read, home, MAGIC_LEAF_NAME );
-    }
-}
-
-static
-bool MayICommitTo(const KConfig *self, const char *path, size_t size)
-{
-    if ( ! s_disable_user_settings ) {
-        return true;
-    }
-    else {
-        size_t bytes = 0;
-        char home             [ PATH_MAX ] = "";
-        char dfltNcbiSettings [ PATH_MAX ] = "";
-        size_t num_read = 0;
-        size_t remaining = 0;
-        rc_t rc = KConfigRead
-            ( self, "HOME", 0, home, sizeof home, & num_read, & remaining);
-        if ( rc != 0 || remaining != 0 ) {
-            return false;
-        }
-        string_printf ( dfltNcbiSettings, sizeof dfltNcbiSettings,
-            & bytes, "%.*s/.ncbi/%s", num_read, home, MAGIC_LEAF_NAME );
-        return string_cmp
-            (dfltNcbiSettings, bytes, path, size, sizeof dfltNcbiSettings) != 0;
-    }
-}
-
-static
-rc_t _KConfigGetNcbiHome ( const KConfig * self, const KfgSettings * ks,
-    char * buf, size_t size)
-{
-    size_t num_read = 0;
-    size_t remaining = 0;
-
-    if (KConfigRead ( self, "NCBI_HOME", 0, buf, size, & num_read, & remaining)
-        != 0)
-    {
-        assert ( ks );
-        if ( ks -> envrNcbiHome != 0 ) {
-            string_copy_measure ( buf, size, ks -> envrNcbiHome );
-        }
-        else {
-            string_copy_measure ( buf, size, ks -> dfltNcbiHome );
-        }
-    }
-    else if ( remaining > 0 || num_read >= size ) {
-        return RC ( rcKFG, rcNode, rcReading, rcBuffer, rcInsufficient );
-    }
-    else {
-        buf [ num_read ] = '\0';
-    }
-
-    return 0;
-}
-
-static
-rc_t _KConfigGetNcbiSettings ( const KConfig * self, const KfgSettings * ks,
-    char * buf, size_t size, const char * root)
-{
-    size_t num_read = 0;
-    size_t remaining = 0;
-
-    rc_t rc = 0;
-
-    assert(ks && buf && size);
-
-    buf[0] = '\0';
-
-    rc = KConfigRead
-        ( self, "NCBI_SETTINGS", 0, buf, size, & num_read, & remaining );
-    if ( rc != 0 ) {
-        if ( ks -> envrNcbiSettings [ 0 ] != '\0' ) {
-            string_copy_measure ( buf, size, ks -> envrNcbiSettings );
-            rc = 0;
-        }
-        else if ( root != NULL && root[0] != '\0' ) {
-            rc = string_printf
-                ( buf, size, & num_read, "%s/%s", root, MAGIC_LEAF_NAME );
-        }
-        if ( rc != 0 ) {
-            string_copy_measure ( buf, size, ks -> dfltNcbiSettings );
-            rc = 0;
-        }
-    }
-    else if ( remaining > 0 || num_read >= size ) {
-        return RC ( rcKFG, rcNode, rcReading, rcBuffer, rcInsufficient );
-    }
-    else {
-        buf [ num_read ] = '\0';
-    }
-
-    return rc;
-}
-
-static
-void _KConfigSetNcbiHome ( KConfig * self, const KfgSettings * ks,
-    const char * ncbi_home)
-{
-    size_t num_read = 0;
-    size_t remaining = 0;
-    char buf [ PATH_MAX ] = "";
-
-    if ( KConfigRead ( self, "NCBI_HOME", 0,
-            buf, sizeof buf, & num_read, & remaining) == 0 )
-    {
-        DBGMSG( DBG_KFG, DBG_FLAG ( DBG_KFG ),
-            ( "KFG: NCBI_HOME='%.*s'\n", num_read, buf ) );
-    }
-    else {
-        if ( ncbi_home == NULL ) {
-            if ( ks -> envrNcbiHome != NULL ) {
-                ncbi_home = ks -> envrNcbiHome;
-            }
-            else {
-                ncbi_home = ks -> dfltNcbiHome;
-            }
-        }
-
-        update_node ( self, "NCBI_HOME", ncbi_home, false );
-
-        DBGMSG ( DBG_KFG, DBG_FLAG ( DBG_KFG ),
-            ( "KFG: NCBI_HOME     was set to '%s'\n", ncbi_home ) );
-    }
-}
-
-static
-void _KConfigSetNcbiSettings ( KConfig * self, const KfgSettings * ks,
-    const char * ncbi_settings )
-{
-    size_t num_read = 0;
-    size_t remaining = 0;
-    char buf [ PATH_MAX ] = "";
-
-    if ( KConfigRead ( self, "NCBI_SETTINGS", 0,
-            buf, sizeof buf, & num_read, & remaining) == 0 )
-    {
-        DBGMSG( DBG_KFG, DBG_FLAG ( DBG_KFG ),
-            ( "KFG: NCBI_SETTINGS='%.*s'\n", num_read, buf ) );
-    }
-    else {
-        if ( ncbi_settings == NULL ) {
-            if ( ks -> envrNcbiSettings [ 0 ] != '\0' ) {
-                ncbi_settings = ks -> envrNcbiSettings;
-            }
-            else {
-                ncbi_settings = ks -> dfltNcbiSettings;
-            }
-        }
-
-        update_node ( self, "NCBI_SETTINGS", ncbi_settings, false );
-        DBGMSG ( DBG_KFG, DBG_FLAG ( DBG_KFG ),
-            ( "KFG: NCBI_SETTINGS was set to '%s'\n", ncbi_settings ) );
-    }
-}
-/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ KfgSettings ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
-
-static
-bool CC WriteDirtyNode ( BSTNode *n, void *data )
-{
-    KConfigNode *self = ( KConfigNode * ) n;
-    PrintBuff *pb = data;
-
-    if ( self -> dirty
-        || ( self -> came_from != NULL && self -> came_from -> is_magic_file 
-             && ! self -> internal ) )
-    {
-        if ( KConfigNodePrintPath ( self, pb ) )
-            return true;
-
-        if ( PrintBuffPrint ( pb, " = " ) != 0 )
-            return true;
-            
-        if ( PrintBuffPrintQuoted ( pb, &self->value ) != 0 )
-            return true;
-            
-        if ( PrintBuffPrint ( pb, "\n" ) != 0 )
-            return true;
-    }
-
-    return BSTreeDoUntil ( & self -> children, false, WriteDirtyNode, pb );
-}
-
-static
-void CC UnsetDirtyNode ( BSTNode *n, void *data )
-{
-    KConfigNode *self = ( KConfigNode * ) n;
-
-    if ( self -> dirty )
-        self -> dirty = false;
-
-    BSTreeForEach ( & self -> children, false, UnsetDirtyNode, data );
-}
-
-static
-rc_t path_to_magic_file ( const KConfig *self, char *path, size_t buffer_size, size_t *path_size )
-{
-    const KConfigNode *node;
-    rc_t rc = KConfigOpenNodeRead ( self, & node, "NCBI_SETTINGS" );
-
-    if ( rc == 0 )
-    {
-        size_t num_read, remaining;
-        rc = KConfigNodeRead ( node, 0, path, buffer_size - 1, & num_read, & remaining );
-
-        if ( rc == 0 && remaining != 0 )
-           rc = RC ( rcKFG, rcNode, rcReading, rcBuffer, rcInsufficient );
-
-        path[num_read] = '\0';
-        
-        KConfigNodeRelease ( node );
-    }
-    return rc;
-}
-
-/* Commit
- *  commits changes to user's private configuration file
- */
-LIB_EXPORT rc_t CC KConfigCommit ( KConfig *self )
-{
-    rc_t rc;
-    size_t path_size;
-    char magic_file_path [ 4096 ];
-
-    if ( self == NULL )
-        return RC ( rcKFG, rcData, rcCommitting, rcSelf, rcNull );
-
-    /* Must only commit dirty nodes*/
-    if ( ! self -> dirty )
-        return 0;
-
-    rc = path_to_magic_file ( self, magic_file_path, sizeof magic_file_path, & path_size );
-    if ( rc == 0 )
-    {
-        char tmp_file_path [ 4096 ];
-
-        if ( ! MayICommitTo ( self, magic_file_path, path_size ) ) {
-            DBGMSG ( DBG_KFG, DBG_FLAG ( DBG_KFG ), (
-                "KFG: User Settings Are Disables: Skipped KConfigCommit\n" ) );
-            return RC ( rcKFG, rcData, rcCommitting, rcSelf, rcReadonly );
-        }
-
-        DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG),
-            ( "KFG: Committing to '%s'\n", magic_file_path ) );
-        rc = string_printf ( tmp_file_path, sizeof tmp_file_path, NULL, "%s.tmp", magic_file_path );
-        if ( rc == 0 )
-        {
-            KDirectory *dir;        
-            
-            /* get current directory */
-            rc = KDirectoryNativeDir ( & dir );
-            if ( rc == 0 )
-            {
-                KFile *tmp;
-
-                /* create temp magic file */
-                rc = KDirectoryCreateFile ( dir, & tmp, false, 0600, kcmInit | kcmParents, "%s", tmp_file_path );
-
-                if ( rc == 0 )
-                {
-                    PrintBuff pb;
-                    PrintBuffInit ( & pb, tmp );
-
-                    /* issue warning */
-                    rc = PrintBuffPrint ( & pb, "## auto-generated configuration file - DO NOT EDIT ##\n\n" );
-                    if ( rc == 0 )
-                    {
-                        /* flush nodes to file */
-                        if ( BSTreeDoUntil ( & self -> tree, false, WriteDirtyNode, & pb ) )
-                            /* failure */
-                            rc = pb . rc;
-                        else 
-                            rc = PrintBuffFlush ( & pb );
-                    }
-                        
-                    KFileRelease ( tmp );
-                        
-                    if ( rc == 0 )
-                    {
-                        /* Rename file */
-                        rc = KDirectoryRename ( dir, true, tmp_file_path, magic_file_path  );
-                        if ( rc == 0 )
-                        {
-                            /* clear dirty flags */
-                            BSTreeForEach (  & self -> tree, false, UnsetDirtyNode, & pb);
-                                
-                            self -> dirty = false;
-                        }
-                    }
-                        
-                    if ( rc != 0 )
-                        KDirectoryRemove ( dir, true, "%s", tmp_file_path );
-                }
-            
-                /* release dir */
-                KDirectoryRelease ( dir );
-            }
-        }
-    }
-    return rc;
-}
-
-static
-rc_t record_magic_path ( KConfig *self, const KDirectory *dir, const char *path, size_t sz )
-{
-    char buff [ 4096 ];
-    rc_t rc = KDirectoryResolvePath ( dir, true, buff, sizeof buff, "%.*s", ( int ) sz, path );
-    if ( rc == 0 )
-    {
-        char *magic_file_path;
-        sz = string_size ( buff );
-        magic_file_path = malloc ( sz + 1 );
-        if ( magic_file_path == NULL )
-            rc = RC ( rcKFG, rcMgr, rcLoading, rcMemory, rcExhausted );
-        else
-        {
-            free ( (void*) self -> magic_file_path );
-            self -> magic_file_path = magic_file_path;
-            self -> magic_file_path_size = sz;
-            memcpy ( magic_file_path, buff, sz + 1 );
-        }
-    }
-
-    return rc;
-}
-
-
-static
-rc_t make_include_path ( KConfigIncluded **p, const KDirectory *dir, const char *path, size_t sz, bool is_magic )
-{
-    char buff [ 4096 ];
-    rc_t rc = KDirectoryResolvePath ( dir, true, buff, sizeof buff, "%.*s", ( int ) sz, path );
-    if ( rc == 0 )
-    {
-        KConfigIncluded *include;
-        sz = string_size ( buff );
-        include = malloc ( sizeof * include + sz );
-        if ( include == NULL )
-            rc = RC ( rcKFG, rcMgr, rcLoading, rcMemory, rcExhausted );
-        else
-        {
-            include -> is_magic_file = is_magic;
-            string_copy ( include -> path, sz + sizeof include -> path, buff, sz );
-            * p = include;
-            return 0;
-        }
-    }
-    * p = NULL;
-    return rc;
-}
-
-
-static
-bool load_from_file_path ( KConfig *self, const KDirectory *dir, const char *path, size_t sz, bool is_magic )
-{
-    rc_t rc;
-    const KFile *cfg_file;
-
-    /* record magic file path, regardless of whether it exists as a file */
-    if ( is_magic )
-        record_magic_path ( self, dir, path, sz );
-    
-    DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG), ( "KFG: try to load from file '%.*s'\n", (int)sz, path ) );
-    rc = KDirectoryOpenFileRead ( dir, & cfg_file, "%.*s", ( int ) sz, path );
-    if ( rc == 0 )
-    {
-        KConfigIncluded *include;
-        rc = make_include_path ( & include, dir, path, sz, is_magic );
-        if ( rc == 0 )
-        {
-            BSTNode *existing;
-            if ( BSTreeInsertUnique ( & self -> included, & include -> n, & existing, KConfigIncludedSort ) != 0 )
-                free ( include );
-            else
-            {
-                self -> current_file = include;
-                rc = KConfigLoadFile ( self, include -> path, cfg_file );
-                self -> current_file = NULL;
-                if ( rc != 0 )
-                {
-                    BSTreeUnlink ( & self -> included, & include -> n );
-                    free ( include );
-                }
-            }
-        }
-
-        KFileRelease ( cfg_file );
-    }
-    return ( rc == 0 ) ? true : false;
-}
-
-typedef struct scan_config_path_data scan_config_path_data;
-struct scan_config_path_data
-{
-    KConfig *self;
-    bool loaded;
-};
-
-static
-rc_t CC scan_config_path ( const KDirectory *dir, uint32_t type, const char *name, void *data )
-{
-    scan_config_path_data * pb = data;
-    switch ( type )
-    {
-    case kptFile:
-    case kptFile | kptAlias:
-    {
-        size_t sz = string_size ( name );
-        if ( sz >= 5 && strcase_cmp ( & name [ sz - 4 ], 4, ".kfg", 4, 4 ) == 0 )
-            pb -> loaded |= load_from_file_path ( pb -> self, dir, name, sz, false );
-
-        break;
-    }}
-
-    return 0;
-}
-
-static
-bool scan_config_dir ( KConfig *self, const KDirectory *dir )
-{
-    scan_config_path_data pb;
-
-    pb . self = self;
-    pb . loaded = false;
-
-    KDirectoryVVisit ( dir, false, scan_config_path, & pb, ".", NULL );
-
-    return pb . loaded;
-}
-
-static
-bool load_from_dir_path ( KConfig *self, const KDirectory *dir, const char *path, size_t sz )
-{
-    bool loaded = false;
-    const KDirectory *cfg_dir;
-    rc_t rc = KDirectoryOpenDirRead ( dir, & cfg_dir, false, "%.*s", ( uint32_t ) sz, path );
-    if ( rc == 0 )
-    {
-        DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG), ( "KFG: try to load from directory '%.*s'\n", (int)sz, path ) );
-        loaded = scan_config_dir ( self, cfg_dir );
-        KDirectoryRelease ( cfg_dir );
-    }
-    return loaded;
-}
-
-static
-bool load_from_path ( KConfig *self, const KDirectory * dir, const char *path, size_t sz )
-{
-    bool loaded = false;
-    const char *naughty = string_chr ( path, sz, '%' );
-    if ( naughty == NULL && sz != 0 )
-    {
-        DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG), ( "KFG: try to load from path '%.*s'\n", (int)sz, path ) );
-        switch ( KDirectoryPathType ( dir, "%.*s", ( int ) sz, path ) & ~ kptAlias )
-        {
-        case kptFile:
-            loaded = load_from_file_path ( self, dir, path, sz, false );
-            break;
-        case kptDir:
-            loaded = load_from_dir_path ( self, dir, path, sz );
-            break;
-        }
-    }
-    return loaded;
-}
-
-static
-bool load_from_path_list ( KConfig *self, const KDirectory *dir, const char *path )
-{
-    bool loaded = false;
-    const char *end = path + string_size ( path );
-    while ( path < end )
-    {
-        const char *sep = string_chr ( path, end - path, ':' );
-        if ( sep == NULL )
-            sep = end;
-        if ( load_from_path ( self, dir, path, sep - path ) )
-            loaded = true;
-        path = sep + 1;
-    }
-    return loaded;
-}
-
-static
-bool load_from_env_variable ( KConfig *self, const KDirectory *dir )
-{
-    const char * env_list [] =
-    {
-        "KLIB_CONFIG",
-        "VDB_CONFIG",
-        "VDBCONFIG"
-    };
-    
-    int i;
-    bool loaded = false;
-    for ( i = 0; ! loaded && i < sizeof env_list / sizeof env_list [ 0 ]; ++ i )
-    {
-        const char *eval = getenv ( env_list [ i ] );
-        DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG), ( "KFG: try to load from env. var '%s'\n", env_list[ i ] ) );
-        if ( eval != NULL && eval [ 0 ] != 0 )
-        {
-            /* rc_t rc = 0; */
-            DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG), ( "KFG: try to load from env. var '%s'\n", eval ) );
-            /* rc = */ KConfigAppendToLoadPath(self, eval);
-            loaded = load_from_path_list ( self, dir, eval );
-            if ( loaded )
-                DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG), ( "KFG: found from env. var '%s'\n", eval ) );
-        }
-    }
-
-    return loaded;
-}
-
-static
-rc_t load_env_variable_rc ( KConfig *self, const KDirectory *dir, bool *loaded )
-{
-    const char * env_list [] =
-    {
-        "NCBI_VDB_CONFIG"
-    };
-    
-    int i;
-    rc_t rc;
-
-    * loaded = false;
-
-    for ( i = 0; ! * loaded && i < sizeof env_list / sizeof env_list [ 0 ]; ++ i )
-    {
-        const char *eval = getenv ( env_list [ i ] );
-        DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG), ( "KFG: try to load from env. var '%s'\n", env_list[ i ] ) );
-        if ( eval == NULL || eval [ 0 ] == 0 )
-            return 0;
-        
-        DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG), ( "KFG: try to load from env. var '%s'\n", eval ) );
-        rc = KConfigAppendToLoadPath(self, eval);
-        if ( rc != 0 )
-            return rc;
-        
-        * loaded = load_from_path_list ( self, dir, eval );
-        if ( * loaded )
-            DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG), ( "KFG: found from env. var '%s'\n", eval ) );
-        else
-            return RC ( rcKFG, rcFile, rcListing, rcEnvironment, rcEmpty );
-
-    }
-
-    return 0;
-}
-
-static
-bool load_from_std_location ( KConfig *self, const KDirectory *dir )
-{
-    const char * std_locs [] =
-    {
-#if ! WINDOWS
-        "/etc/ncbi",
-#else
-        "/c/ncbi",
-#endif
-    };
-
-    /* rc_t rc = 0; */
-
-    int i;
-    bool loaded = false;
-    for ( i = 0; ! loaded && i < sizeof std_locs / sizeof std_locs [ 0 ]; ++ i )
-    {
-        DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG), ( "KFG: try to load from std. location '%s'\n", std_locs[ i ] ) );
-        /* rc = */ KConfigAppendToLoadPath(self, std_locs [ i ]);
-        loaded = load_from_path ( self, dir,
-            std_locs [ i ], string_size ( std_locs [ i ] ));
-    }
-    if ( loaded )
-        DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG), ( "KFG: found from std. location\n" ) );
-    return loaded;
-}
-
-static
-bool load_from_fs_location ( KConfig *self )
-{
-    bool loaded = false;
-    KDyld *dyld;
-    rc_t rc = KDyldMake ( & dyld );
-    if ( rc == 0 )
-    {
-        const KDirectory *dir;
-        rc = find_home_directory ( dyld, & dir, false );
-        if ( rc == 0 )
-        {
-            char resolved[PATH_MAX + 1];
-            DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG), ( "KFG: try to load from dyn. loader\n" ) );
-
-/* N.B. Duplication of ResolvePath here and in load_from_dir_path ? */
-            if (KDirectoryResolvePath
-                    (dir, true, resolved, sizeof resolved, "ncbi") == 0)
-            {
-                rc = KConfigAppendToLoadPath(self, resolved);
-            }
-            if ((loaded = load_from_dir_path(self, dir, "ncbi", 4)))
-                DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG), ( "KFG: found from dyn. loader\n" ) );
-            KDirectoryRelease ( dir );
-        }
-        KDyldRelease ( dyld );
-    }
-    return loaded;
-}
-
-static bool load_from_default_string(KConfig *self) {
-    DBGMSG(DBG_KFG, DBG_FLAG(DBG_KFG), ("KFG: loading from default string\n"));
-    return parse_file(self,
-        "enbedded default configuration string", default_kfg) == 0;
-}
-
-LIB_EXPORT rc_t CC KConfigGetLoadPath ( const KConfig *self,
-    const char **path )
-{
-    if (self == NULL) {
-        return RC ( rcKFG, rcPath, rcListing, rcSelf, rcNull );
-    }
-
-    if (path == NULL) {
-        return RC ( rcKFG, rcPath, rcListing, rcParam, rcNull );
-    }
-
-    *path = self->load_path;
-    return 0;
-}
-
-static
-bool load_user_settings
-    ( KConfig * self, const KDirectory * dir, const char * path )
-{
-    return load_from_file_path
-        (self, dir, path, string_measure ( path, NULL ), true );
-}
-
-static
-bool load_from_home ( KConfig * self, const KDirectory * dir,
-    const KfgSettings * ks, char * ncbi_settings, size_t ncbi_settings_size)
-{
-    char ncbi_home [ PATH_MAX ] = "";
-
-    DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG), ( "KFG: checking NCBI_HOME\n" ) );
-
-    if ( _KConfigGetNcbiHome ( self, ks, ncbi_home, sizeof ncbi_home ) != 0 )
-    {
-        DBGMSG(DBG_KFG, DBG_FLAG(DBG_KFG),
-            ("KFG: cannot read NCBI_HOME from configuration\n"));
-        return false;
-    }
-    else {
-        bool loaded =
-            load_from_path ( self, dir, ncbi_home, string_size ( ncbi_home ) );
-
-        if ( loaded )
-        {
-            DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG),
-                ( "KFG: found from '%s'\n", ncbi_home ) );
-        }
-
-        _KConfigGetNcbiSettings
-            ( self, ks, ncbi_settings, ncbi_settings_size, NULL );
-
-        if ( load_user_settings ( self, dir, ncbi_settings ))
-            loaded = true;
-
-        _KConfigSetNcbiHome    ( self, ks, ncbi_home );
-        _KConfigSetNcbiSettings( self, ks, ncbi_settings );
-
-        return loaded;
-    }
-}
-
-static
-rc_t load_config_files ( KConfig * self,
-    const KDirectory * dir, const KfgSettings * ks, bool * loaded_from_dir )
-{
-    rc_t rc;
-    bool loaded;
-    KDirectory * wd;
-
-    char ncbi_settings [ PATH_MAX ] = "";
-
-    assert ( loaded_from_dir );
-    * loaded_from_dir = false;
-
-    /* if user supplied a starting point, try that */
-    if ( dir != NULL )
-    {
-        char path [ PATH_MAX ] = "";
-        rc = KDirectoryResolvePath ( dir, true, path, sizeof path, "." );
-        DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG),
-            ( "KFG: try load from supplied directory '%s'\n", path ) );
-
-        loaded = scan_config_dir ( self, dir );
-        if ( loaded )
-            DBGMSG( DBG_KFG, DBG_FLAG(DBG_KFG), ( "KFG: found from supplied directory\n" ) );
-
-        rc = _KConfigGetNcbiSettings
-            ( self, ks, ncbi_settings, sizeof ncbi_settings, path );
-        if (rc == 0) {
-            if ( load_user_settings ( self, dir, ncbi_settings ))
-                loaded = true;
-        }
-
-        if ( loaded ) {
-            _KConfigSetNcbiHome    ( self, ks, path );
-            _KConfigSetNcbiSettings( self, ks, ncbi_settings );
-            * loaded_from_dir = true;
-            return rc;
-        }
-    }
-
-    /* open up the native directory */
-    rc = KDirectoryNativeDir ( & wd );
-    if ( rc != 0 )
-        return rc;
-
-    /* try to load from environment variable */
-    rc = load_env_variable_rc ( self, wd, & loaded );
-    if ( rc != 0 )
-        return rc;
-    if ( loaded )
-        return 0;
-
-    /* load from the other environment variables */
-    loaded = load_from_env_variable ( self, wd );
-
-    /* try to load from standard locations */
-    if ( ! loaded )
-        loaded = load_from_std_location ( self, wd );
-
-    /* check for config as the result of a user install
-       i.e. not an admin installation */
-    if ( ! loaded )
-        loaded = load_from_fs_location ( self );
-
-    if ( ! loaded )
-        loaded = load_from_default_string ( self );
-
-    if ( ! s_disable_user_settings )
-        loaded |= load_from_home
-            ( self, wd, ks, ncbi_settings, sizeof ncbi_settings );
-    else {
-        DBGMSG ( DBG_KFG, DBG_FLAG ( DBG_KFG ), (
-            "KFG: User Settings Are Disables: Skipped Load KFG From Home\n" ) );
-        _KConfigSetNcbiHome    ( self, ks, NULL );
-        _KConfigSetNcbiSettings( self, ks, NULL );
-    }
-
-    KDirectoryRelease ( wd );
-
-    if (self->load_path) {
-        char* tmp = NULL;
-        self->load_path_sz_tmp = string_size(self->load_path) + 1;
-        tmp = realloc(self->load_path, self->load_path_sz_tmp);
-        if (tmp) {
-            self->load_path = tmp;
-        }
-    }
-
-    return 0;
-}
-
-static
-void add_predefined_nodes ( KConfig * self, const char * appname )
-{
-    size_t bytes;
-    char buf [ 4096 ];
-    const char *value;
-
-    KDirectory *cwd;
-    const KDirectory *dir;
-
-#if ! WINDOWS
-    struct utsname name;
-#endif
-
-    /* Path to libkfg.so */
-    KDyld *dyld;
-    rc_t rc = KDyldMake ( & dyld );
-    if ( rc == 0 )
-    {
-        rc = find_home_directory ( dyld, & dir, false );
-        if ( rc == 0 )
-        {
-            KDirectoryResolvePath ( dir, true, buf, sizeof buf, "." );
-            KDirectoryRelease ( dir );
-        }
-        KDyldRelease ( dyld );
-    }
-    update_node ( self, "vdb/lib/paths/kfg", rc == 0 ? buf : "", true );
-
-    /* Architecture */ 
-#if ! WINDOWS
-    if (uname(&name) >= 0)
-        update_node(self, "kfg/arch/name", name.nodename, true);
-    else
-#endif
-        update_node ( self, "kfg/arch/name", "", true);
-
-    string_printf(buf, sizeof(buf), &bytes, "%u", _ARCH_BITS);
-    update_node ( self, "kfg/arch/bits", buf, true );
-
-    /* *OS */
-#if LINUX
-    #define OS "linux"
-#elif MAC 
-    #define OS "mac"
-#elif WINDOWS
-    #define OS "win"
-#elif SUN
-    #define OS "sun"
-#else
-    #error unrecognized OS
-#endif
-    update_node ( self, "OS", OS, true );
-#undef OS
-
-#if 0
-    /* BUILD_LINKAGE */
-#if _STATIC
-    #define BUILD_LINKAGE "STATIC"
-#else
-    #define BUILD_LINKAGE "DYNAMIC"
-#endif
-    update_node ( self, "BUILD_LINKAGE", BUILD_LINKAGE, true );
-#undef BUILD_LINKAGE
-#endif
-
-    /* BUILD */
-#if _PROFILING
-    #define BUILD "PROFILE"
-#elif _DEBUGGING
-    #define BUILD "DEBUG"
-#else 
-    #define BUILD "RELEASE"
-#endif
-    update_node(self, "BUILD", BUILD, true );
-#undef BUILD
-
-    cwd = NULL;
-
-    /* PWD */
-    rc = KDirectoryNativeDir ( & cwd );
-    if ( rc == 0 )
-        rc = KDirectoryResolvePath ( cwd, true, buf, sizeof buf, "." );
-    update_node(self, "PWD", rc == 0 ? buf : "", true );
-
-    /* APPPATH */
-    if ( appname != NULL && rc == 0 )
-    {
-        bytes = string_size ( appname );
-        value = string_rchr ( appname, bytes, '/' );
-        if ( value == NULL )
-            value = string_rchr ( appname, bytes, '\\' );
-        if ( value != NULL )
-            bytes = appname + bytes - value;
-        rc = KDirectoryResolvePath ( cwd, true, buf, sizeof buf, "%s", appname);
-        if ( rc == 0 && bytes != 0 )
-            buf [ string_size(buf) - bytes ] = 0;    
-        update_node(self, "APPPATH", rc == 0 ? buf : "", true );
-    }
-
-    /* APPNAME */
-    rc = LogAppName(buf, sizeof(buf), &bytes);
-    if ( rc == 0 )
-        buf [ bytes ] = 0;
-    update_node(self, "APPNAME", rc == 0 ? buf : "", true );
-
-    /* Environment variables */
-    /* some of the variables may be undefined, create nodes with empty values for them */
-#define DEFINE_ENV(name)                                         \
-    value=getenv(name);                                          \
-    update_node(self, name, value == NULL ? "" : value, true )
-
-    DEFINE_ENV("HOST");
-    DEFINE_ENV("USER");
-
-    value = NULL;
-#if WINDOWS
-    value = getenv ( "USERPROFILE" );
-#endif
-    if ( value == NULL ) {
-        value = getenv ( "HOME" );
-    }
-
-    if (value == NULL)
-    {
-        update_node(self, "HOME", "", true );
-    }
-    else
-    {
-        rc = KDirectoryResolvePath(cwd, true, buf, sizeof(buf), "%s", value);
-        if (rc == 0)
-        {
-            update_node(self, "HOME", buf, true );
-        }
-        else
-            LOGERR (klogErr, rc, "Unable to create a config item for $HOME");
-    }
-
-    DEFINE_ENV("VDB_ROOT");
-    DEFINE_ENV("VDB_CONFIG");
-#undef DEFINE_ENV
-
-    KDirectoryRelease ( cwd );
-}
-
-#if WINDOWS
-
-static isexistingdir(const char *path, const KDirectory *dir) {
-    return (KDirectoryPathType(dir, path) & ~kptAlias) == kptDir;
-}
-
-static bool isletter(char c) {
-    return ((c >= 'A' && c <= 'Z') ||
-            (c >= 'a' && c <= 'z'));
-}
-
-static bool sls(const char *b, size_t sz) {
-    if (b == NULL || sz < 3) {
-        return false;
-    }
-
-    return (b[0] == '/' && isletter(b[1]) && b[2] == '/');
-}
-
-static bool _DetectRepeatedDrives(const char *buffer,
-    size_t bsize, size_t *fixed, const KDirectory *dir)
-{
-    assert(fixed);
-
-    if (!sls(buffer, bsize)) {
-        return false;
-    }
-
-    if (!sls(buffer + 2, bsize - 2)) {
-        return false;
-    }
-
-    if (isexistingdir(buffer, dir)) {
-        return false;
-    }
-
-    *fixed = 2;
-
-    while (bsize > *fixed + 2) {
-        if (isexistingdir(buffer + *fixed, dir)) {
-            break;
-        }
-
-        if (!sls(buffer + *fixed + 2, bsize - *fixed - 2)) {
-            break;
-        }
-
-        *fixed += 2;
-    }
-
-    return true;
-}
-
-static rc_t _KConfigNodeFixRepeatedDrives(KConfigNode *self,
-    bool *updated, const KDirectory *dir)
-{
-    rc_t rc = 0;
-
-    char buffer[PATH_MAX];
-    size_t num_read = 0;
-    size_t remaining = 0;
-
-    assert(updated);
-
-    rc = KConfigNodeRead(self, 0, buffer, sizeof buffer, &num_read, &remaining);
-    if (rc == 0) {
-        size_t fixed = 0;
-        if (num_read < sizeof buffer) {
-            buffer[num_read] = '\0';
-        }
-        if (_DetectRepeatedDrives(buffer, num_read, &fixed, dir)
-            && fixed != 0 && fixed < num_read)
-        {
-            rc = KConfigNodeWrite(self, buffer + fixed, num_read - fixed);
-            if (rc == 0) {
-                *updated = true;
-            }
-        }
-    }
-
-    return rc;
-}
-
-static rc_t _KConfigNodeFixChildRepeatedDrives(KConfigNode *self,
-    const KDirectory *dir, bool *updated, const char *name, ...)
-{
-    rc_t rc = 0;
-    KConfigNode *node = NULL;
-
-    va_list args;
-    va_start(args, name);
-
-    rc = KConfigNodeVOpenNodeUpdate(self, &node, name, args);
-    if (rc == 0) {
-        rc_t rc = _KConfigNodeFixRepeatedDrives(node, updated, dir);
-        KConfigNodeRelease(node);
-    }
-
-    va_end(args);
-
-    return rc;
-}
-
-static rc_t _KConfigFixRepeatedDrives(KConfig *self,
-    const KDirectory *pdir, bool *updated)
-{
-    rc_t rc = 0;
-    const KDirectory *dir = pdir;
-    KConfigNode *user = NULL;
-    if (dir == NULL) {
-        rc = KDirectoryNativeDir(&dir);
-    }
-    rc = KConfigOpenNodeUpdate(self, &user, "/repository/user");
-    if (rc == 0) {
-        _KConfigNodeFixChildRepeatedDrives(user, dir, updated, "default-path");
-    }
-    if (rc == 0) {
-        uint32_t i = 0;
-        uint32_t count = 0;
-        KNamelist *categories = NULL;
-        rc_t rc = KConfigNodeListChildren(user, &categories);
-        if (rc == 0) {     /* main protected ... */
-            rc = KNamelistCount(categories, &count);
-        }
-        for (i = 0; rc == 0 && i < count; ++i) {
-            const char *nCategory = NULL;
-            rc_t rc = KNamelistGet(categories, i, &nCategory);
-            if (rc == 0) { /* main protected ... */
-                KConfigNode *category = NULL;
-                rc_t rc = KConfigNodeOpenNodeUpdate(user, &category, nCategory);
-                if (rc == 0) {
-                    uint32_t i = 0;
-                    uint32_t count = 0;
-                    KNamelist *subcategories = NULL;
-                    rc_t rc = KConfigNodeListChildren(category, &subcategories);
-                    if (rc == 0) {     /* main protected ... */
-                        rc = KNamelistCount(subcategories, &count);
-                    }
-                    for (i = 0; rc == 0 && i < count; ++i) {
-                        const char *name = NULL;
-                        rc_t rc = KNamelistGet(subcategories, i, &name);
-                        if (rc == 0) {
-                            _KConfigNodeFixChildRepeatedDrives(category,
-                                dir, updated, "%s/%s", name, "root");
-                        }
-                    }
-                    RELEASE(KNamelist, subcategories);
-                    RELEASE(KConfigNode, category);
-                }
-            }
-        }
-        RELEASE(KNamelist, categories);
-    }
-    RELEASE(KConfigNode, user);
-    if (pdir == NULL) {
-        RELEASE(KDirectory, dir);
-    }
-    return rc;
-}
-
-#endif
-
-static
-rc_t KConfigFill ( KConfig * self, const KDirectory * cfgdir,
-    const char * appname, bool local )
-{
-    KConfigNode * root;
-    String empty;
-    rc_t rc;
-
-    CONST_STRING ( & empty, "" );
-
-    rc = KConfigNodeMake ( & root, & empty );
-    if (rc == 0)
-    {
-        bool loaded_from_dir = false;
-
-        KfgSettings ks;
-
-        KConfigInit ( self, root );
-
-        add_predefined_nodes ( self, appname );
-
-        _KConfigIniKfgSettings ( self, &ks );
-
-        add_aws_nodes ( self );
-
-        rc = load_config_files ( self, cfgdir, & ks, & loaded_from_dir );
-
-        if ( rc == 0 ) {
-         /* commit changes made to magic file nodes
-            during parsing (e.g. fixed spelling of dbGaP names) */
-            KConfigCommit ( self );
-        }
-    }
-
-    return rc;
-}
-
-
-extern rc_t ReportKfg ( const ReportFuncs *f, uint32_t indent,
-    uint32_t configNodesSkipCount, va_list args );
-
-/* "cfg" [ OUT ] - return parameter for mgr
-   if ( "local" == true or cfgdir != NULL ) do not initialize G_kfg */
-static
-rc_t KConfigMakeImpl(KConfig ** cfg, const KDirectory * cfgdir, bool local)
-{
-    rc_t rc;
-    static const char * appname = NULL;
-
-    static bool latch;
-    if ( ! latch )
-    {
-        appname = ReportInitConfig ( ReportKfg );
-        latch = true;
-    }
-
-    if ( cfg == NULL )
-        rc = RC ( rcKFG, rcMgr, rcCreating, rcParam, rcNull );
-    else
-    {
-        KConfig * mgr = NULL;
-
-        if ( cfgdir != NULL ) {
-            local = true;
-        }
-
-        if ( ! local ) {
-            if ( G_kfg . ptr ) { /* if already made, just attach */
-                rc = KConfigAddRef ( G_kfg.ptr );
-                if (rc == 0) {
-                    * cfg = G_kfg . ptr;
-                }
-                return rc;
-            }
-        }
-
-        mgr = calloc ( 1, sizeof * mgr );
-        if ( mgr == NULL )
-            rc = RC ( rcKFG, rcMgr, rcCreating, rcMemory, rcExhausted );
-        else
-        {
-            rc = KConfigFill (mgr, cfgdir, appname, local);
-
-            mgr -> initialized = true;
-
-
-#if WINDOWS /* VDB-1554: fix incorrect posix paths in configuration nodes */
-            if ( rc == 0 ) {
-                bool updated = false;
-                rc_t rc = _KConfigFixRepeatedDrives ( mgr, cfgdir, & updated );
-                if ( rc == 0 && updated ) {
-                    rc = KConfigCommit ( mgr );
-                }
-            }
-#endif
-
-            DBGMSG ( DBG_KFG, DBG_FLAG ( DBG_KFG ), ( "\n" ) );
-
-            if ( rc == 0 )
-            {
-                if ( ! local ) {
-                    atomic_test_and_set_ptr ( & G_kfg, mgr, NULL );
-                }
-                * cfg = mgr;
-                return 0;
-            }
-
-            KConfigWhack ( mgr );
-        }
-
-        * cfg = NULL;
-    }
-
-    return rc;
-}
-
-/* call KConfigMake; do not initialize G_kfg */
-LIB_EXPORT
-rc_t CC KConfigMakeLocal(KConfig **cfg, const KDirectory *cfgdir)
-{
-    return KConfigMake(cfg, cfgdir);
-/*  return KConfigMakeImpl(cfg, cfgdir, true); */
-}
-
-/* Make
- *  create a process-global configuration manager
- *
- *  "cfg" [ OUT ] - return parameter for mgr
- */
-LIB_EXPORT rc_t CC KConfigMake(KConfig **cfg, const KDirectory *cfgdir)
-{
-    return KConfigMakeImpl(cfg, cfgdir, false);
-}
-
-/*--------------------------------------------------------------------------
- * KNamelist
- */
-typedef struct KfgConfigNamelist KfgConfigNamelist;
-struct KfgConfigNamelist
-{
-    KNamelist dad;
-    size_t count;
-    const char *namelist [ 1 ];
-};
- 
-/* Whack
- */
-static
-rc_t CC KfgConfigNamelistWhack ( KfgConfigNamelist *self )
-{
-    free ( self );
-    return 0;
-}
- 
-/* Count
- */
-static
-rc_t CC KfgConfigNamelistCount ( const KfgConfigNamelist *self,
-uint32_t *count )
-{
-    * count = ( uint32_t ) self -> count;
-    return 0;
-}
- 
-/* Get
- */
-static
-rc_t CC KfgConfigNamelistGet ( const KfgConfigNamelist *self,
-    uint32_t idx, const char **name )
-{
-    if ( ( size_t ) idx >= self -> count )
-        return RC ( rcDB, rcNamelist, rcAccessing, rcParam, rcInvalid );
-    * name = self -> namelist [ idx ];
-    return 0;
-}
- 
-/* Make
- */
-static KNamelist_vt_v1 vtKfgConfigNamelist =
-{
-    /* version 1.0 */
-    1, 0,
-
-    /* start minor version 0 methods */
-    KfgConfigNamelistWhack,
-    KfgConfigNamelistCount,
-    KfgConfigNamelistGet
-    /* end minor version 0 methods */
-};
- 
- static
- rc_t KfgConfigNamelistMake ( KNamelist **names, uint32_t count )
- {
-     rc_t rc;
-     KfgConfigNamelist *self = malloc ( sizeof * self -
-         sizeof self -> namelist + count * sizeof self -> namelist [ 0 ] );
-     if ( self == NULL )
-         rc = RC ( rcKFG, rcMetadata, rcListing, rcMemory, rcExhausted );
-     else
-     {
-         self -> count = 0;
-         
-         rc = KNamelistInit ( & self -> dad,
-             ( const KNamelist_vt* ) & vtKfgConfigNamelist );
-         if ( rc == 0 )
-         {
-             * names = & self -> dad;
-             return 0;
-         }
-         
-         free ( self );
-     }
- 
-     return rc;
- }
- 
-/* List
- *  create metadata node listings
- */
-static
-void CC BSTNodeCount ( BSTNode *n, void *data )
-{
-    * ( uint32_t* ) data += 1;
-}
-
-static
-void CC KConfigNodeGrabName ( BSTNode *n, void *data )
-{
-    KfgConfigNamelist *list = data;
-    list -> namelist [ list -> count ++ ]
-        = ( ( const KConfigNode* ) n ) -> name . addr;
-}
-
-/* ListChildren
- *  list all named children
- */
-LIB_EXPORT rc_t CC KConfigNodeListChildren ( const KConfigNode *self,
-    KNamelist **names )
-{
-    if ( names == NULL )
-        return RC ( rcKFG, rcNode, rcListing, rcParam, rcNull );
-
-    * names = NULL;
-
-    if ( self != NULL )
-    {
-        rc_t rc;
-
-        uint32_t count = 0;
-        BSTreeForEach ( & self -> children, 0, BSTNodeCount, & count );
-
-        rc = KfgConfigNamelistMake ( names, count );
-        if ( rc == 0 )
-            BSTreeForEach
-                ( & self -> children, 0, KConfigNodeGrabName, * names );
-
-        return rc;
-    }
-
-    return RC ( rcKFG, rcNode, rcListing, rcSelf, rcNull );
-}
-
-static
-void CC KConfigGrabName ( BSTNode *n, void *data )
-{
-    KfgConfigNamelist *list = data;
-    list -> namelist [ list -> count ++ ]
-        = ( ( const KConfigIncluded* ) n ) -> path;
-}
-
-/* ListIncluded
- *  list all included files
- */
-LIB_EXPORT rc_t CC KConfigListIncluded ( const KConfig *self,
-    KNamelist **names )
-{
-    if ( names == NULL )
-        return RC ( rcKFG, rcMgr, rcListing, rcParam, rcNull );
-
-    * names = NULL;
-
-    if ( self != NULL )
-    {
-        rc_t rc;
-
-        uint32_t count = 0;
-        BSTreeForEach ( & self -> included, 0, BSTNodeCount, & count );
-
-        rc = KfgConfigNamelistMake ( names, count );
-        if ( rc == 0 )
-            BSTreeForEach
-                ( & self -> included, 0, KConfigGrabName, * names );
-
-        return rc;
-    }
-
-    return RC ( rcKFG, rcMgr, rcListing, rcSelf, rcNull );
-}
-
-/************** Internal node-reading helpers *************/
-
-/* ReadNodeValueFixed
- * copy the node's value into the caller's fixed size buffer and 0-terminate
- */
-static rc_t ReadNodeValueFixed ( const KConfigNode* self, char *buf, size_t bsize )
-{
-    size_t num_read, remaining;
-    rc_t rc = KConfigNodeRead ( self, 0, buf, bsize - 1, &num_read, &remaining);
-    if (rc == 0)
-    {
-        if (remaining != 0)
-            rc = RC ( rcKFG, rcNode, rcReading, rcBuffer, rcInsufficient );
-        else
-            buf[num_read] = '\0';
-    }        
-    return rc;
-}
-
-/**********************************************************/
- 
-/* ReadBool
- *  read a boolean node value
- *
- * self [ IN ] - KConfigNode object
- * result [ OUT ] - return value (true if "TRUE", false if "FALSE"; rc != 0 if neither)
- *
- */
-LIB_EXPORT rc_t CC KConfigNodeReadBool ( const KConfigNode *self, bool *result )
-{
-    rc_t rc;
-
-    if ( result == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        * result = false;
-
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-        else
-        {
-            char buf [ 6 ];
-            rc = ReadNodeValueFixed ( self, buf, sizeof buf );
-            if ( rc == 0 )
-            {
-                switch ( tolower ( buf [ 0 ] ) )
-                {
-                case 'f':
-                    if ( buf [ 1 ] == 0 )
-                        return 0;
-                    if ( strncasecmp ( buf, "false", sizeof buf ) == 0 )
-                        return 0;
-                    break;
-
-                case 'n':
-                    if ( buf [ 1 ] == 0 )
-                        return 0;
-                    if ( strncasecmp ( buf, "no", sizeof buf ) == 0 )
-                        return 0;
-                    break;
-
-                case 't':
-                    * result = true;
-                    if ( buf [ 1 ] == 0 )
-                        return 0;
-                    if ( strncasecmp ( buf, "true", sizeof buf ) == 0 )
-                        return 0;
-                    break;
-
-                case 'y':
-                    * result = true;
-                    if ( buf [ 1 ] == 0 )
-                        return 0;
-                    if ( strncasecmp ( buf, "yes", sizeof buf ) == 0 )
-                        return 0;
-                    break;
-                }
-
-                * result = false;
-                rc = RC ( rcKFG, rcNode, rcReading, rcFormat, rcIncorrect );
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* ReadI64
- *  read an integer node value
- *
- * self [ IN ] - KConfigNode object
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-LIB_EXPORT rc_t CC KConfigNodeReadI64 ( const KConfigNode *self, int64_t *result )
-{
-    rc_t rc;
-
-    if ( result == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        * result = 0;
-
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-        else
-        {
-            /* allow for leading zeros */
-            char buf [ 256 ];
-    
-            rc = ReadNodeValueFixed(self, buf, sizeof(buf));
-            if (rc == 0)
-            {
-                char* endptr;
-                int64_t res = strtoi64(buf, &endptr, 0);
-                if ( *endptr == '\0' )
-                    *result = res;
-                else
-                    rc = RC(rcKFG, rcNode, rcReading, rcFormat, rcIncorrect);
-            }
-        }
-    }
-    return rc;
-}
-
-/* ReadU64
- *  read an unsiged node value
- *
- * self [ IN ] - KConfigNode object
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-LIB_EXPORT rc_t CC KConfigNodeReadU64 ( const KConfigNode *self, uint64_t* result )
-{
-    rc_t rc;
-
-    if ( result == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        * result = 0;
-
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-        else
-        {
-            /* allow for leading zeros */
-            char buf [ 256 ];
-    
-            rc = ReadNodeValueFixed(self, buf, sizeof(buf));
-            if (rc == 0)
-            {
-                char* endptr;
-                int64_t res = strtou64(buf, &endptr, 0);
-                if ( *endptr == '\0' )
-                    *result = res;
-                else
-                    rc = RC(rcKFG, rcNode, rcReading, rcFormat, rcIncorrect);
-            }
-        }
-    }
-    return rc;
-}
-
-/* ReadF64
- *  read a floating point node value
- *
- * self [ IN ] - KConfigNode object
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-LIB_EXPORT rc_t CC KConfigNodeReadF64( const KConfigNode *self, double* result )
-{
-    rc_t rc;
-
-    if ( result == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        * result = 0.0;
-
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-        else
-        {
-            /* allow for leading zeros, trailing digits */
-            char buf [ 256 ];
-
-            rc = ReadNodeValueFixed(self, buf, sizeof(buf));
-            if (rc == 0)
-            {
-                char* endptr;
-                double res = strtod(buf, &endptr);
-                if ( *endptr == '\0' )
-                    *result = res;
-                else
-                    rc = RC(rcKFG, rcNode, rcReading, rcFormat, rcIncorrect);
-            }
-        }
-    }
-    return rc;
-}
-
-#if 0
-/*** NB - code needs to be located in VFS ***/
-/* ReadNodeValueFixed
- * Allocate a character buffer of sufficient size, copy the node's value into it, 0-terminate. Caller deallocates.
- */
-static rc_t ReadNodeValueVariable( const KConfigNode* self, char** buf )
-{
-    size_t num_read, to_read;
-    /* first we ask about the size to be read */
-    rc_t rc = KConfigNodeRead ( self, 0, NULL, 0, &num_read, &to_read );
-    if ( rc == 0 )
-    {
-        char* value = malloc( to_read + 1 );
-        if ( value )
-        {
-            rc = ReadNodeValueFixed( self, value, to_read + 1 );
-            if ( rc == 0 )
-                *buf = value;
-            else
-                free (value);
-        }
-        else
-            rc = RC( rcKFG, rcNode, rcReading, rcMemory, rcExhausted );
-    }   
-    return rc;
-}
-
-/* ReadFloat
- *  read a VPath node value
- *
- * self [ IN ] - KConfigNode object
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-LIB_EXPORT rc_t CC KConfigNodeReadVPath ( const KConfigNode *self, struct VPath** result )
-{
-    rc_t rc;
-
-    if ( result == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        * result = NULL;
-
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-        else
-        {
-            char* buf;
-            rc = ReadNodeValueVariable ( self, &buf );
-            if ( rc == 0)
-            {
-                rc = VPathMake(result, buf);
-                free(buf);
-            }
-        }
-    }
-    return rc;
-}
-#endif
-
-/* ReadString
- *  read a String node value
- *
- * self [ IN ] - KConfigNode object
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-LIB_EXPORT rc_t CC KConfigNodeReadString ( const KConfigNode *self, String** result )
-{
-    rc_t rc;
-
-    if ( result == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        * result = NULL;
-
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-        else
-        {
-            size_t num_read, to_read;
-
-            /* first we ask about the size to be read */
-            rc = KConfigNodeRead ( self, 0, NULL, 0, &num_read, &to_read );
-            if ( rc == 0 )
-            {
-                String *value = malloc ( sizeof * value + to_read + 1 );
-                if ( value == NULL )
-                    rc = RC( rcKFG, rcNode, rcReading, rcMemory, rcExhausted );
-                else
-                {
-                    /* initialize in absence of data - assume ASCII */
-                    StringInit ( value, (char*)( value + 1 ), to_read, (uint32_t)to_read );
-
-                    /* read the actual data */
-                    rc = ReadNodeValueFixed(self, (char*)value->addr, to_read + 1);
-                    if ( rc == 0 )
-                    {
-                        /* measure length of data to handle non-ASCII */
-                        value -> len = string_len ( value -> addr, value -> size );
-                        *result = value;
-                    }
-                    else
-                    {
-                        rc = RC(rcKFG, rcNode, rcReading, rcFormat, rcIncorrect);
-                        free ( value );
-                    }
-                }
-            }
-        }
-    }    
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KConfigRead ( const KConfig * self, const char * path,
-    size_t offset, char * buffer, size_t bsize,
-    size_t * num_read, size_t * remaining )
-{
-    const KConfigNode * node = NULL;
-
-    rc_t rc = KConfigOpenNodeRead ( self, & node, "%s", path );
-    if ( rc == 0) {
-        rc_t rc2 = 0;
-
-        rc = KConfigNodeRead
-            ( node, offset, buffer, bsize, num_read, remaining );
-
-        rc2 = KConfigNodeRelease ( node );
-        if ( rc == 0 ) {
-            rc = rc2;
-        }
-    }
-
-    return rc;
-}    
-
-/* this macro wraps a call to KConfigNodeGetXXX in a node-accessing
-   code to implement the corresponding KConfigGetXXX function */
-#define NODE_TO_CONFIG_ACCESSOR(fn) \
-    const KConfigNode* node;                                \
-    rc_t rc = KConfigOpenNodeRead ( self, &node, "%s", path );   \
-    if ( rc == 0)                                           \
-    {                                                       \
-        rc_t rc2;                                           \
-        rc = fn(node, result);                              \
-        rc2 = KConfigNodeRelease(node);                     \
-        if (rc == 0)                                        \
-            rc = rc2;                                       \
-    }                                                       \
-    return rc;                                              
-    
-/* THESE FUNCTIONS ARE PROTECTED AGAINST BAD "self" AND "path"
-   BY KConfigOpenNodeRead, BUT THE CONVERSION FUNCTIONS ARE NOT */
-LIB_EXPORT rc_t CC KConfigReadBool ( const KConfig* self, const char* path, bool* result )
-{
-    NODE_TO_CONFIG_ACCESSOR(KConfigNodeReadBool);
-}    
-LIB_EXPORT rc_t CC KConfigReadI64 ( const KConfig* self, const char* path, int64_t* result )
-{
-    NODE_TO_CONFIG_ACCESSOR(KConfigNodeReadI64);
-}
-LIB_EXPORT rc_t CC KConfigReadU64 ( const KConfig* self, const char* path, uint64_t* result )
-{
-    NODE_TO_CONFIG_ACCESSOR(KConfigNodeReadU64);
-}
-
-LIB_EXPORT rc_t CC KConfigReadF64 ( const KConfig* self, const char* path, double* result )
-{
-    NODE_TO_CONFIG_ACCESSOR(KConfigNodeReadF64);
-}
-
-LIB_EXPORT rc_t CC KConfigReadString ( const KConfig* self, const char* path, struct String** result )
-{
-    NODE_TO_CONFIG_ACCESSOR(KConfigNodeReadString);
-}
-
-#define DISP_RC(rc, msg) (void)((rc == 0) ? 0 : LOGERR(klogInt, rc, msg))
-
-LIB_EXPORT rc_t CC KConfigPrintPartial
-    (const KConfig *self, int indent, uint32_t skipCount, va_list args)
-{
-    rc_t rc = 0;
-
-    PrintBuff pb;
-
-    if (rc == 0) {
-        PrintBuffInit(&pb, NULL);
-    }
-
-    if (rc == 0) {
-        rc = KConfigPrintImpl
-            (self, indent, NULL, false, false, &pb, skipCount, args);
-    }
-
-    if (rc == 0) {
-        rc = PrintBuffFlush(&pb);
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KConfigPrint(const KConfig* self, int indent) {
-    return KConfigPrintPartial(self, indent, 0, NULL);
-}
-
-LIB_EXPORT rc_t CC KConfigToFile(const KConfig* self, KFile *file) {
-    rc_t rc = 0;
-    PrintBuff pb;
-    PrintBuffInit(&pb, file);
-    if (rc == 0) {
-        rc = KConfigPrintImpl(self, 0, NULL, false, true, &pb, 0, NULL);
-    }
-    if (rc == 0) {
-        rc = PrintBuffFlush(&pb);
-    }
-    return rc;
-}
-
-LIB_EXPORT void CC KConfigDisableUserSettings ( void )
-{
-    s_disable_user_settings = true;
-}
-
-static
-rc_t open_file ( const KFile **f, const char *path )
-{
-    /* get current directory */
-    KDirectory *wd;
-    rc_t rc = KDirectoryNativeDir ( & wd );
-    if ( rc == 0 )
-    {
-        rc = KDirectoryOpenFileRead ( wd, f, "%s", path );
-        KDirectoryRelease ( wd );
-    }
-
-    return rc;
-}
-
-/* KFS_EXTERN rc_t CC KFileMakeGzip2ForRead ( struct KFile const **gz, struct KFile const *src );
-#include <stdio.h> aprintf */
-#define aprintf( a, b ) ( ( void ) 0 )
-static
-rc_t decode_ncbi_gap ( KDataBuffer *mem, const KFile *orig )
-{
-    char hdr [ 8 ];
-    size_t num_read;
-    rc_t rc = KFileReadAll ( orig, 0, hdr, sizeof hdr, & num_read );
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-    if ( rc == 0 && num_read == sizeof hdr )
-    {
-        if (memcmp(hdr, "ncbi_gap", sizeof hdr) != 0) {
-            rc = RC(rcKFG, rcFile, rcReading, rcFile, rcWrongType);
-        }
-        else {
-            uint64_t eof;
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-            rc = KFileSize ( orig, & eof );
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-            if ( rc == 0 )
-            {
-                const KFile *sub;
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-                rc = KFileMakeSubRead ( & sub, orig, sizeof hdr,
-                    eof - sizeof hdr );
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-                if ( rc == 0 )
-                {
-                    const KFile *gzip;
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-
-/* aprintf          rc = KFileMakeGzip2ForRead ( & gzip, sub ); */
-                    rc = KFileMakeGzipForRead ( & gzip, sub );
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-                    if ( rc == 0 )
-                    {
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-                        rc = KDataBufferMakeBytes ( mem, 0 );
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-                        if ( rc == 0 )
-                        {
-                            size_t total, to_read;
-
-                            /* after all of that, we're ready to decompress */
-                            for ( total = 0; ; )
-                            {
-                                char *buff;
-
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-                                rc = KDataBufferResize ( mem,
-                                    total + 32 * 1024 );
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-                                if ( rc != 0 )
-                                    break;
-
-                                buff = mem -> base;
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-                                to_read = ( size_t ) mem -> elem_count - total;
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-
-                                rc = KFileReadAll ( gzip, total,
-                                    & buff [ total ], to_read, & num_read );
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-                                if ( rc != 0 )
-                                    break;
-
-                                total += num_read;
-                                
-                                if ( num_read < to_read )
-                                {
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-                                    buff [ total ] = 0;
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-                                    mem -> elem_count = total;
-                                    break;
-                                }
-                            }
-                        }
-
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-                        KFileRelease ( gzip );
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-                    }
-
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-                    KFileRelease ( sub );
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-                }
-            }
-        }
-    }
-
-aprintf("decode_ncbi_gap %d\n", __LINE__);
-    return rc;
-}
-
-typedef struct {
-    const char *projectId;
-    const char *encryptionKey;
-    const char *downloadTicket;
-    const char *description;
-} KGapConfig;
-
-static
-rc_t _KConfigNncToKGapConfig(const KConfig *self, char *text, KGapConfig *kgc)
-{
-    size_t len = 0;
-    int i = 0;
-
-    assert(self && text && kgc);
-
-    memset(kgc, 0, sizeof *kgc);
-    len = string_size(text);
-
-    {
-        const char version[] = "version ";
-        size_t l = sizeof version - 1;
-        if (string_cmp(version, l, text, len, (uint32_t)l) != 0) {
-            return RC(rcKFG, rcMgr, rcUpdating, rcFormat, rcUnrecognized);
-        }
-        text += l;
-        len -= l;
-    }
-
-    {
-        const char version[] = "1.0";
-        size_t l = sizeof version - 1;
-        if (string_cmp(version, l, text, l, (uint32_t)l) != 0) {
-            return RC(rcKFG, rcMgr, rcUpdating, rcFormat, rcUnsupported);
-        }
-        text += l;
-        len -= l;
-    }
-
-    while (len > 0 && (text[0] == '\r' || text[0] == '\n')) {
-        ++text;
-        --len;
-    }
-
-    for (i = 0; ; ++i) {
-        const char *p = NULL;
-        if (i == 0) {
-            p = strtok(text, "|");
-        }
-        else {
-            p = strtok (NULL, "|");
-        }
-        if (p == NULL) {
-            break;
-        }
-        switch (i) {
-            case 0:
-                kgc->projectId = p;
-                break;
-            case 1:
-                kgc->encryptionKey = p;
-                break;
-            case 2:
-                kgc->downloadTicket = p;
-                break;
-            case 3:
-                kgc->description = p;
-                break;
-        }
-    }
-
-    if (!kgc->projectId || !kgc->encryptionKey || !kgc->downloadTicket ||
-        !kgc->description)
-    {
-        return RC(rcKFG, rcMgr, rcUpdating, rcFile, rcInvalid);
-    }
-
-    return 0;
-}
-
-static rc_t _KConfigFixResolverCgiNode(KConfig *self) {
-    rc_t rc = 0;
-
-    KConfigNode *node = NULL;
-    struct String *result = NULL;
-
-    assert(self);
-
-    if (rc == 0) {
-        rc = KConfigOpenNodeUpdate(self, &node,
-            "/repository/remote/protected/CGI/resolver-cgi");
-    }
-
-    if (rc == 0) {
-        rc = KConfigNodeReadString(node, &result);
-    }
-
-    if (rc == 0) {
-        assert(result);
-        if (result->size == 0) {
-            const char buffer[]
-                = "http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi";
-            rc = KConfigNodeWrite(node, buffer, sizeof buffer);
-        }
-    }
-
-    free(result);
-
-    KConfigNodeRelease(node);
-
-    return rc;
-}
-
-static rc_t _KConfigNodeUpdateChild(KConfigNode *self,
-    const char *name, const char *val)
-{
-    rc_t rc = 0;
-
-    KConfigNode *node = NULL;
-
-    assert(self && name && val);
-
-    if (rc == 0) {
-        rc = KConfigNodeOpenNodeUpdate(self, &node, "%s", name);
-    }
-
-    if (rc == 0) {
-        rc = KConfigNodeWrite(node, val, string_size(val));
-    }
-
-    {
-        rc_t rc2 = KConfigNodeRelease(node);
-        if (rc2 != 0 && rc == 0) {
-            rc = rc2;
-        }
-    }
-
-    return rc;
-}
-
-static rc_t _KConfigMkPwdFileAndNode(KConfig *self,
-    KConfigNode *rep, const KGapConfig *kgc)
-{
-    rc_t rc = 0;
-    const KConfigNode *ncbiHome = NULL;
-    KConfigNode *node = NULL;
-    struct String *result = NULL;
-    char encryptionKeyPath[PATH_MAX];
-    KDirectory *dir = NULL;
-    KFile *encryptionKeyFile = NULL;
-    size_t num_writ = 0;
-
-    assert(self && kgc && rep);
-
-    if (rc == 0) {
-        rc = KConfigOpenNodeRead(self, &ncbiHome, "NCBI_HOME");
-    }
-    if (rc == 0) {
-        rc = KConfigNodeReadString(ncbiHome, &result);
-    }
-    KConfigNodeRelease(ncbiHome);
-    ncbiHome = NULL;
-
-    if (rc == 0) {
-        size_t num_writ = 0;
-        assert(result && result->addr);
-        rc = string_printf(encryptionKeyPath, sizeof encryptionKeyPath,
-            &num_writ, "%s/dbGaP-%s.enc_key", result->addr, kgc->projectId);
-        if (rc == 0) {
-            assert(num_writ < sizeof encryptionKeyPath);
-        }
-    }
-    free(result);
-    result = NULL;
-
-    if (rc == 0) {
-        rc = KDirectoryNativeDir(&dir);
-    }
-
-    if (rc == 0) {
-        rc = KDirectoryCreateFile(dir, &encryptionKeyFile,
-                                  false, 0600, kcmInit | kcmParents, "%s", encryptionKeyPath);
-    }
-
-    KDirectoryRelease(dir);
-
-    if (rc == 0) {
-        assert(kgc->encryptionKey);
-        rc = KFileWrite(encryptionKeyFile, 0,
-            kgc->encryptionKey, string_size(kgc->encryptionKey), &num_writ);
-        if (rc == 0) {
-            assert(num_writ == string_size(kgc->encryptionKey));
-        }
-    }
-
-    if (rc == 0) {
-        rc = KFileWrite(encryptionKeyFile, string_size(kgc->encryptionKey),
-            "\n", 1, &num_writ);
-        if (rc == 0) {
-            assert(num_writ == 1);
-        }
-    }
-
-    {
-        rc_t rc2 = KFileRelease(encryptionKeyFile);
-        if (rc2 != 0 && rc == 0) {
-            rc = rc2;
-        }
-    }
-
-    if (rc == 0) {
-        rc = _KConfigNodeUpdateChild(rep,
-            "encryption-key-path", encryptionKeyPath);
-    }
-
-    KConfigNodeRelease(node);
-
-    return rc;
-}
-
-static rc_t _mkNotFoundDir(const char *repoParentPath) {
-    rc_t rc = 0;
-
-    KPathType type = kptNotFound;
-
-    KDirectory *wd = NULL;
-    rc = KDirectoryNativeDir(&wd);
-
-    if (rc == 0) {
-        type = KDirectoryPathType(wd, "%s", repoParentPath);
-        if (type == kptNotFound) {
-            rc = KDirectoryCreateDir(wd, 0777, kcmCreate|kcmParents, "%s", repoParentPath);
-        }
-    }
-
-    KDirectoryRelease(wd);
-
-    return rc;
-}
-
-static rc_t _KConfigDBGapRepositoryNodes(KConfig *self,
-    KConfigNode *rep, const KGapConfig *kgc, const char *repoParentPath,
-    const char **newRepoParentPath)
-{
-    rc_t rc = 0;
-
-    assert(self && rep && kgc);
-
-    if (rc == 0) {
-        rc = _KConfigMkPwdFileAndNode(self, rep, kgc);
-    }
-
-    if (rc == 0) {
-        assert(kgc->downloadTicket);
-        rc = _KConfigNodeUpdateChild(rep,
-            "download-ticket", kgc->downloadTicket);
-    }
-
-    if (rc == 0) {
-        rc = _KConfigNodeUpdateChild(rep, "description", kgc->description);
-    }
-
-    if (rc == 0) {
-        rc = _KConfigNodeUpdateChild(rep, "apps/file/volumes/flat", "files");
-    }
-    if (rc == 0) {
-        rc = _KConfigNodeUpdateChild(rep, "apps/sra/volumes/sraFlat", "sra");
-    }
-
-    if (rc == 0) {
-        rc = _KConfigNodeUpdateChild(rep, "cache-enabled", "true");
-    }
-
-    if (rc == 0) {
-        static char rootPath[PATH_MAX] = "";
-        if (repoParentPath == NULL) {
-            size_t num_writ = 0;
-            const KConfigNode *home = NULL;
-            String *result = NULL;
-
-            if (rc == 0) {
-                rc = KConfigOpenNodeRead(self, &home, "HOME");
-            }
-
-            if (rc == 0) {
-                rc = KConfigNodeReadString(home, &result);
-            }
-
-            if (rc == 0) {
-                assert(result && result->addr);
-                rc = string_printf(rootPath, sizeof rootPath, &num_writ,
-                    "%s/ncbi/dbGaP-%s", result->addr, kgc->projectId);
-            }
-
-            if (rc == 0) {
-                repoParentPath = rootPath;
-            }
-
-            free(result);
-            KConfigNodeRelease(home);
-        }
-
-        if (rc == 0) {
-            rc = _KConfigNodeUpdateChild(rep, "root", repoParentPath);
-        }
-        if (rc == 0) {
-            rc = _mkNotFoundDir(repoParentPath);
-        }
-        if (rc == 0 && newRepoParentPath != NULL) {
-            *newRepoParentPath = repoParentPath;
-        }
-    }
-
-    return rc;
-}
-
-static rc_t _KConfigAddDBGapRepository(KConfig *self,
-    const KGapConfig *kgc, const char *repoParentPath,
-    const char **newRepoParentPath)
-{
-    rc_t rc = 0;
-
-    KConfigNode *rep = NULL;
-
-    char repNodeName[512] = "";
-
-    assert(self && kgc);
-
-    if (rc == 0) {
-        size_t num_writ = 0;
-        rc = string_printf(repNodeName, sizeof repNodeName, &num_writ,
-            "/repository/user/protected/dbGaP-%s", kgc->projectId);
-        if (rc == 0) {
-            assert(num_writ < sizeof repNodeName);
-        }
-    }
-
-    if (rc == 0) {
-        rc = KConfigOpenNodeUpdate(self, &rep, "%s", repNodeName);
-    }
-
-    if (rc == 0) {
-        rc = _KConfigDBGapRepositoryNodes(self, rep, kgc, repoParentPath,
-            newRepoParentPath);
-    }
-
-    KConfigNodeRelease(rep);
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KConfigImportNgc(KConfig *self,
-    const char *ngcPath, const char *repoParentPath,
-    const char **newRepoParentPath)
-{
-    if (self == NULL) {
-        return RC(rcKFG, rcMgr, rcUpdating, rcSelf, rcNull);
-    }
-
-    if (ngcPath == NULL) {
-        return RC(rcKFG, rcMgr, rcUpdating, rcParam, rcNull);
-    }
-    else {
-        const KFile *orig = NULL;
-        rc_t rc = open_file ( & orig, ngcPath );
-/*    DBGMSG(DBG_KFG, DBG_FLAG(DBG_KFG), ("KConfigImportNgc %d\n", __LINE__));*/
-        if (rc != 0) {
-            return rc;
-        }
-        else {
-            KGapConfig kgc;
-
-            KDataBuffer mem;
-            memset ( & mem, 0, sizeof mem );
-
-/*DBGMSG(DBG_KFG, DBG_FLAG(DBG_KFG), ("KConfigImportNgc %d\n", __LINE__));
-aprintf("KConfigImportNgc %d\n", __LINE__); */
-            rc = decode_ncbi_gap ( & mem, orig );
-/*DBGMSG(DBG_KFG, DBG_FLAG(DBG_KFG), ("KConfigImportNgc %d\n", __LINE__));
-aprintf("KConfigImportNgc %d\n", __LINE__);*/
-            KFileRelease ( orig );
-            orig = NULL;
-
-            if (rc == 0) {
-/*DBGMSG(DBG_KFG, DBG_FLAG(DBG_KFG), ("KConfigImportNgc %d\n", __LINE__));
-aprintf("KConfigImportNgc %d\n", __LINE__);*/
-                rc = _KConfigNncToKGapConfig(self, mem.base, &kgc);
-/*DBGMSG(DBG_KFG, DBG_FLAG(DBG_KFG), ("KConfigImportNgc %d\n", __LINE__));
-aprintf("KConfigImportNgc %d\n", __LINE__);*/
-            }
-
-            if (rc == 0) {
-/*DBGMSG(DBG_KFG, DBG_FLAG(DBG_KFG), ("KConfigImportNgc %d\n", __LINE__));
-aprintf("KConfigImportNgc %d\n", __LINE__);*/
-                rc = _KConfigFixResolverCgiNode(self);
-/*DBGMSG(DBG_KFG, DBG_FLAG(DBG_KFG), ("KConfigImportNgc %d\n", __LINE__));
-aprintf("KConfigImportNgc %d\n", __LINE__);*/
-            }
-
-            if (rc == 0) {
-/*DBGMSG(DBG_KFG, DBG_FLAG(DBG_KFG), ("KConfigImportNgc %d\n", __LINE__));
-aprintf("KConfigImportNgc %d\n", __LINE__);*/
-                rc = _KConfigAddDBGapRepository(self, &kgc, repoParentPath,
-                    newRepoParentPath);
-/*DBGMSG(DBG_KFG, DBG_FLAG(DBG_KFG), ("KConfigImportNgc %d\n", __LINE__));
-aprintf("KConfigImportNgc %d\n", __LINE__);*/
-            }
-
-/*DBGMSG(DBG_KFG, DBG_FLAG(DBG_KFG), ("KConfigImportNgc %d\n", __LINE__));
-aprintf("KConfigImportNgc %d\n", __LINE__);*/
-            KDataBufferWhack ( & mem );
-        }
-
-        return rc;
-    }
-}
-
-
-LIB_EXPORT rc_t CC KConfigWriteBool( KConfig *self, const char * path, bool value )
-{
-    KConfigNode * node;
-    rc_t rc = KConfigOpenNodeUpdate ( self, &node, "%s", path );
-    if ( rc == 0 )
-    {
-        rc = KConfigNodeWriteBool ( node, value );
-        KConfigNodeRelease ( node );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KConfigWriteString( KConfig *self, const char * path, const char * value )
-{
-    KConfigNode * node;
-    rc_t rc = KConfigOpenNodeUpdate ( self, &node, "%s", path );
-    if ( rc == 0 )
-    {
-        rc = KConfigNodeWrite ( node, value, string_size( value ) );
-        KConfigNodeRelease ( node );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KConfigWriteSString( KConfig *self, const char * path, struct String const * value )
-{
-    KConfigNode * node;
-    rc_t rc = KConfigOpenNodeUpdate ( self, &node, "%s", path );
-    if ( rc == 0 )
-    {
-        rc = KConfigNodeWrite ( node, value->addr, value->size );
-        KConfigNodeRelease ( node );
-    }
-    return rc;
-}
diff --git a/libs/kfg/default.kfg b/libs/kfg/default.kfg
deleted file mode 100644
index c22b53b..0000000
--- a/libs/kfg/default.kfg
+++ /dev/null
@@ -1,53 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-## DEFAULT CONFIGURATION FOR SRA-TOOLKIT
-# 
-#  These settings are intended to allow the tools to work under conditions
-#  when the user has not yet performed any configuration.
-/config/default = "true"
-
-# The user's default public repository
-/repository/user/main/public/apps/file/volumes/flat = "files"
-/repository/user/main/public/apps/nakmer/volumes/nakmerFlat = "nannot"
-/repository/user/main/public/apps/nannot/volumes/nannotFlat = "nannot"
-/repository/user/main/public/apps/refseq/volumes/refseq = "refseq"
-/repository/user/main/public/apps/sra/volumes/sraFlat = "sra"
-/repository/user/main/public/apps/wgs/volumes/wgsFlat = "wgs"
-/repository/user/main/public/root = "$(HOME)/ncbi/public"
-
-# Remote access to NCBI's public repository
-/repository/remote/main/CGI/resolver-cgi = "http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi"
-/repository/remote/aux/NCBI/apps/nakmer/volumes/fuseNAKMER = "sadb"
-/repository/remote/aux/NCBI/apps/nannot/volumes/fuseNANNOT = "sadb"
-/repository/remote/aux/NCBI/apps/refseq/volumes/refseq = "refseq"
-/repository/remote/aux/NCBI/apps/sra/volumes/flat = "srapub"
-/repository/remote/aux/NCBI/apps/wgs/volumes/fuseWGS = "wgs"
-/repository/remote/aux/NCBI/root = "http://sra-download.ncbi.nlm.nih.gov"
-
-# Remote access to NCBI's protected repository
-/repository/remote/protected/CGI/resolver-cgi = "http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi"
-
-# Aspera configuration
-/tools/ascp/max_rate = "1000m"
diff --git a/libs/kfg/kart.c b/libs/kfg/kart.c
deleted file mode 100644
index 22b14c3..0000000
--- a/libs/kfg/kart.c
+++ /dev/null
@@ -1,720 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <kfg/kart.h>
-
-#include <kfs/directory.h> /* KDirectoryOpenFileRead */
-#include <kfs/file.h> /* KFile */
-#include <kfs/gzip.h> /* KFileMakeGzipForRead */
-#include <kfs/subfile.h> /* KFileMakeSubRead */
-
-#include <klib/data-buffer.h> /* KDataBuffer */
-#include <klib/rc.h>
-#include <klib/refcount.h> /* KRefcount */
-#include <klib/out.h> /* OUTMSG */
-
-#include <strtol.h> /* strtou64 */
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdlib.h> /* free */
-#include <string.h> /* memcmp */
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 != 0 && rc == 0) { rc = rc2; } obj = NULL; } while (false)
-
-struct KartItem {
-    KRefcount refcount;
-
-    const Kart *dad;
-
-/*  String typeId; */
-    String projId;
-    String itemId;
-    String accession;
-    String name;
-    String itemDesc;
-};
-
-static void KartItemWhack(KartItem *self) {
-    assert(self);
-
-    KartRelease(self->dad);
-
-    memset(self, 0, sizeof *self);
-
-    free(self);
-}
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KartItemAddRef(const KartItem *self) {
-    if (self != NULL) {
-        switch (KRefcountAdd(&self->refcount, "KartItem")) {
-            case krefLimit:
-                return RC(rcKFG, rcFile, rcAttaching, rcRange, rcExcessive);
-        }
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KartItemRelease(const KartItem *self) {
-    if (self != NULL) {
-        switch (KRefcountDrop(&self -> refcount, "KartItem")) {
-            case krefWhack:
-                KartItemWhack((KartItem*)self);
-                break;
-            case krefLimit:
-                return RC(rcKFG, rcFile, rcReleasing, rcRange, rcExcessive);
-        }
-    }
-
-    return 0;
-}
-
-static rc_t StringAsUint64(const String *self, uint64_t *pid) {
-    uint64_t id = 0;
-
-    char buffer[21] = "";
-    size_t bytes = 0;
-    char *end = NULL;
-
-    assert(self);
-
-    if (pid == NULL) {
-        return RC(rcKFG, rcFile, rcAccessing, rcParam, rcNull);
-    }
-
-    *pid = 0;
-
-    if (sizeof buffer - 1 < self->len) {
-        return RC(rcKFG, rcFile, rcAccessing, rcBuffer, rcInsufficient);
-    }
-
-    if (self->len == 0 || self->size == 0) {
-        return RC(rcKFG, rcFile, rcAccessing, rcItem, rcEmpty);
-    }
-
-    bytes = string_copy(buffer, sizeof buffer, self->addr, self->len);
-    if (bytes != self->len) {
-        return RC(rcKFG, rcFile, rcAccessing, rcBuffer, rcInsufficient);
-    }
-
-    id = strtou64(buffer, &end, 0);
-    if (end[0] != 0) {
-        return RC(rcKFG, rcFile, rcAccessing, rcParam, rcInvalid);
-    }
-
-    *pid = id;
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KartItemProjIdNumber(const KartItem *self, uint64_t *pid) {
-    if (self == NULL) {
-        return RC(rcKFG, rcFile, rcAccessing, rcSelf, rcNull);
-    }
-    return StringAsUint64(&self->projId, pid);
-}
-
-LIB_EXPORT rc_t CC KartItemItemIdNumber(const KartItem *self, uint64_t *pid) {
-    if (self == NULL) {
-        return RC(rcKFG, rcFile, rcAccessing, rcSelf, rcNull);
-    }
-    return StringAsUint64(&self->itemId, pid);
-}
-
-static rc_t KartItemCheck(const KartItem *self, const String **elem) {
-    if (elem == NULL) {
-        return RC(rcKFG, rcFile, rcAccessing, rcParam, rcNull);
-    }
-
-    *elem = NULL;
-
-    if (self == NULL) {
-        return RC(rcKFG, rcFile, rcAccessing, rcSelf, rcNull);
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KartItemProjId(const KartItem *self, const String **elem)
-{
-    rc_t rc = KartItemCheck(self, elem);
-    if (rc == 0) {
-        *elem = &self->projId;
-    }
-    return rc;
-}
-LIB_EXPORT rc_t CC KartItemItemId(const KartItem *self, const String **elem)
-{
-    rc_t rc = KartItemCheck(self, elem);
-    if (rc == 0) {
-        *elem = &self->itemId;
-    }
-    return rc;
-}
-LIB_EXPORT rc_t CC KartItemAccession(const KartItem *self, const String **elem)
-{
-    rc_t rc = KartItemCheck(self, elem);
-    if (rc == 0) {
-        *elem = &self->accession;
-    }
-    return rc;
-}
-LIB_EXPORT rc_t CC KartItemName(const KartItem *self, const String **elem)
-{
-    rc_t rc = KartItemCheck(self, elem);
-    if (rc == 0) {
-        *elem = &self->name;
-    }
-    return rc;
-}
-LIB_EXPORT rc_t CC KartItemItemDesc(const KartItem *self, const String **elem)
-{
-    rc_t rc = KartItemCheck(self, elem);
-    if (rc == 0) {
-        *elem = &self->itemDesc;
-    }
-    return rc;
-}
-/*LIB_EXPORT rc_t CC KartItemTypeId(const KartItem *self, const String **elem)
-{
-    rc_t rc = KartItemCheck(self, elem);
-    if (rc == 0) {
-        *elem = &self->typeId;
-    }
-    return rc;
-}*/
-
-/** Print KartItem using OUTMSG; if (self == NULL) then print the header */
-LIB_EXPORT rc_t CC KartItemPrint(const KartItem *self) { /* AA-833 */
-    if (self != NULL) {
-        return OUTMSG(("'%S'\t'%S'\t'%S'\t'%S'\t'%S'\n", &self->projId,
-            &self->itemId, &self->accession, &self->name, &self->itemDesc));
-    }
-    return 0;
-}
-
-struct Kart {
-    KRefcount refcount;
-
-    KDataBuffer mem;
-
-    const char *text;
-    uint64_t len;
-
-    uint16_t itemsProcessed;
-};
-
-static void KartWhack(Kart *self) {
-    assert(self);
-
-    KDataBufferWhack(&self->mem);
-
-    memset(self, 0, sizeof *self);
-
-    free(self);
-}
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC KartAddRef(const Kart *self) {
-    if (self != NULL) {
-        switch (KRefcountAdd(&self->refcount, "Kart")) {
-            case krefLimit:
-                return RC(rcKFG, rcFile, rcAttaching, rcRange, rcExcessive);
-        }
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KartRelease(const Kart *self) {
-    if (self != NULL) {
-        switch (KRefcountDrop(&self -> refcount, "Kart")) {
-            case krefWhack:
-                KartWhack((Kart*)self);
-                break;
-            case krefLimit:
-                return RC(rcKFG, rcFile, rcReleasing, rcRange, rcExcessive);
-        }
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KartItemsProcessed(const Kart *self, uint16_t *number) {
-    if (number == NULL) {
-        return RC(rcKFG, rcFile, rcLoading, rcParam, rcNull);
-    }
-
-    *number = 0;
-
-    if (self == NULL) {
-        return RC(rcKFG, rcFile, rcLoading, rcSelf, rcNull);
-    }
-
-    *number = self->itemsProcessed;
-
-    return 0;
-}
-
-static rc_t KartItemInitFromKartRow(const Kart *self, const KartItem **item,
-    const char *line, size_t len)
-{
-    rc_t rc = 0;
-    int i = 0;
-    KartItem *obj = NULL;
-    assert(self && item && line && len);
-    obj = calloc(1, sizeof *obj);
-    if (obj == NULL) {
-        return RC(rcKFG, rcData, rcAllocating, rcMemory, rcExhausted);
-    }
-    for (i = 0; ; ++i) {
-        size_t l = 0;
-        String *next = NULL;
-        const char *p = string_chr(line, len, '|');
-        if (p == NULL) {
-            if (i != 4) {
-                rc = RC(rcKFG, rcFile, rcParsing, rcFile, rcInsufficient);
-                break;
-            }
-            l = len;
-        }
-        else {
-            l = p - line;
-        }
-        switch (i) { /* AA-833 */
-            case 0:
-                next = &obj->projId;
-                break;
-            case 1:
-                next = &obj->itemId;
-                break;
-            case 2:
-                next = &obj->accession;
-                break;
-            case 3:
-                next = &obj->name;
-                break;
-            case 4:
-                next = &obj->itemDesc;
-                break;
-            default:
-                rc = RC(rcKFG, rcFile, rcParsing, rcFile, rcExcessive);
-                break;
-        }
-        assert(next);
-        StringInit(next, line, l, (uint32_t)l);
-        if (l > len) {
-            rc = RC(rcKFG, rcFile, rcParsing, rcFile, rcInvalid);
-        }
-        if (len == l) {
-            break;
-        }
-        ++l;
-        line += l;
-        len -= l;
-    }
-    if (rc == 0) {
-        rc = KartAddRef(self);
-    }
-    if (rc == 0) {
-        KRefcountInit(&obj->refcount, 1, "KartItem", "KartItemInitFromKartRow", "kartitem");
-        ++((Kart*)self)->itemsProcessed;
-        obj->dad = self;
-        *item = obj;
-    }
-    else {
-        free(obj);
-        obj = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KartPrint(const Kart *self) {
-    uint32_t len = 0;
-
-    if (self == NULL) {
-        return RC(rcKFG, rcFile, rcLoading, rcSelf, rcNull);
-    }
-
-    len = (uint32_t)self->mem.elem_count;;
-    return OUTMSG(("%.*s", len, self->mem.base));
-}
-
-LIB_EXPORT rc_t CC KartPrintNumbered(const Kart *self) {
-    rc_t rc = 0;
-    rc_t rc2 = 0;
-    const char *start = NULL;
-    int32_t remaining = 0;
-    int32_t len = 0;
-    uint32_t i = 0;
-    const char *next = NULL;
-    bool done = false;
-
-    if (self == NULL) {
-        return RC(rcKFG, rcFile, rcLoading, rcSelf, rcNull);
-    }
-
-    remaining = (uint32_t)self->mem.elem_count;
-    start = self->mem.base;
-
-    {
-        const char version[] = "version ";
-        size_t l = sizeof version - 1;
-        if (string_cmp(version, l, start, remaining, (uint32_t)l) != 0) {
-            return RC(rcKFG, rcMgr, rcAccessing, rcFormat, rcUnrecognized);
-        }
-    }
-
-    next = string_chr(start, remaining, '\n');
-    if (next == NULL) {
-        len = remaining;
-    }
-    else {
-        ++next;
-        len = next - start;
-    }
-    remaining -= len;
-    rc2 = OUTMSG(("%.*s", len, start));
-    if (rc2 != 0 && rc == 0) {
-        rc = rc2;
-    }
-    start = next;
-
-    rc2 = OUTMSG(("row\tproj-id|item-id|accession|name|item-desc\n"));
-    if (rc2 != 0 && rc == 0) {
-        rc = rc2;
-    }
-
-    for (i = 1; remaining > 0; ++i) {
-        if (*start == '$') {
-            const char end[] = "$end";
-            size_t l = sizeof end - 1;
-            if (string_cmp(end, l, start, remaining, (uint32_t)l) != 0) {
-                return RC(rcKFG, rcMgr, rcAccessing, rcFormat, rcUnrecognized);
-            }
-            else {
-                done = true;
-            }
-        }
-        next = string_chr(start, remaining, '\n');
-        if (next == NULL) {
-            len = remaining;
-        }
-        else {
-            ++next;
-            len = next - start;
-        }
-        remaining -= len;
-        if (done) {
-            rc2 = OUTMSG(("%.*s", len, start));
-        }
-        else {
-            rc2 = OUTMSG(("%d\t%.*s", i, len, start));
-        }
-        if (rc2 != 0 && rc == 0) {
-            rc = rc2;
-        }
-        start = next;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KartMakeNextItem(Kart *self, const KartItem **item) {
-    size_t len = 0;
-    const char *line = NULL;
-    const char *next = NULL;
-
-    if (item == NULL) {
-        return RC(rcKFG, rcFile, rcLoading, rcParam, rcNull);
-    }
-    *item = NULL;
-    if (self == NULL) {
-        return RC(rcKFG, rcFile, rcLoading, rcSelf, rcNull);
-    }
-
-    while (self->len > 0
-        && (self->text[0] == '\r' || self->text[0] == '\n'))
-    {
-        ++self->text;
-        --self->len;
-    }
-
-    line = self->text;
-    next = string_chr(self->text, self->len, '\n');
-    if (next == NULL) {
-        return RC(rcKFG, rcFile, rcLoading, rcFile, rcInsufficient);
-    }
-
-    len = next - self->text;
-    if (*(next - 1) == '\r') {
-        --len;
-    }
-
-    if (self->len >= (uint64_t) (next - self->text + 1) ){
-        self->len -= next - self->text + 1;
-    }
-    else {
-        OUTMSG(("WARNING: STRING OVERFLOW DURING KART ROW PARSING"));
-        self->len = 0;
-    }
-
-    self->text = next + 1;
-
-    {
-        const char end[] = "$end";
-        if (string_cmp(line, len, end, sizeof end - 1, sizeof end - 1) == 0) {
-            return 0;
-        }
-    }
-
-    return KartItemInitFromKartRow(self, item, line, len);
-}
-
-static rc_t decode_kart(KDataBuffer *mem, const KFile *orig, size_t hdr_sz) {
-    rc_t rc = 0;
-    size_t num_read;
-    uint64_t eof;
-    assert(mem && orig && hdr_sz);
-    rc = KFileSize ( orig, & eof );
-    if ( rc == 0 )
-    {
-        const KFile *sub;
-        rc = KFileMakeSubRead(&sub, orig, hdr_sz, eof - hdr_sz);
-        if ( rc == 0 )
-        {
-            const KFile *gzip;
-            rc = KFileMakeGzipForRead ( & gzip, sub );
-            if ( rc == 0 )
-            {
-                rc = KDataBufferMakeBytes ( mem, 0 );
-                if ( rc == 0 )
-                {
-                    size_t total, to_read;
-
-                    /* after all of that, we're ready to decompress */
-                    for ( total = 0; ; )
-                    {
-                        char *buff;
-
-                        rc = KDataBufferResize ( mem,
-                            total + 32 * 1024 );
-                        if ( rc != 0 )
-                            break;
-
-                        buff = mem -> base;
-                        to_read = ( size_t ) mem -> elem_count - total;
-
-                        rc = KFileReadAll ( gzip, total,
-                            & buff [ total ], to_read, & num_read );
-                        if ( rc != 0 )
-                            break;
-
-                        total += num_read;
-                        
-                        if ( num_read < to_read )
-                        {
-                            buff [ total ] = 0;
-                            mem -> elem_count = total;
-                            break;
-                        }
-                    }
-                }
-
-                KFileRelease ( gzip );
-            }
-
-            KFileRelease ( sub );
-        }
-    }
-
-    return rc;
-}
-
-static rc_t KartProcessHeader(Kart *self) {
-    assert(self);
-
-    self->text = self->mem.base;
-    self->len = self->mem.elem_count;
-
-    {
-        const char version[] = "version ";
-        size_t l = sizeof version - 1;
-        if (string_cmp(version, l, self->text, self->len, (uint32_t)l) != 0) {
-            return RC(rcKFG, rcMgr, rcUpdating, rcFormat, rcUnrecognized);
-        }
-
-        self->text += l;
-        self->len -= l;
-    }
-
-    {
-        const char version[] = "1.0";
-        size_t l = sizeof version - 1;
-        if (string_cmp(version, l, self->text, l, (uint32_t)l) != 0) {
-            return RC(rcKFG, rcMgr, rcUpdating, rcFormat, rcUnsupported);
-        }
-
-        self->text += l;
-        self->len -= l;
-    }
-
-    while (self->len > 0 && (self->text[0] == '\r' || self->text[0] == '\n')) {
-        ++self->text;
-        --self->len;
-    }
-
-    return 0;
-}
-
-#ifdef _DEBUGGING
-static rc_t read_textkart(KDataBuffer *mem, const KFile *orig) {
-    rc_t rc = 0;
-    size_t num_read;
-    uint64_t eof;
-    assert(mem && orig);
-    rc = KFileSize ( orig, & eof );
-    if ( rc == 0 )
-    {
-        rc = KDataBufferMakeBytes ( mem, 0 );
-        if ( rc == 0 ) {
-            /* after all of that, we're ready to read */
-            rc = KDataBufferResize(mem, eof);
-            if ( rc != 0 )
-                return rc;
-            rc = KFileReadAll ( orig, 0, mem -> base, eof, & num_read );
-            if ( rc != 0 )
-                return rc;
-        }
-    }
-    return rc;
-}
-KFG_EXTERN rc_t CC KartMakeText(const struct KDirectory *dir, const char *path,
-    Kart **kart, bool *isKart)
-{
-    rc_t rc = 0;
-    const KFile *f = NULL;
-
-    if (dir == NULL || path == NULL || kart == NULL || isKart == NULL) {
-        return RC(rcKFG, rcFile, rcReading, rcParam, rcNull);
-    }
-
-    *isKart = false;
-    *kart = NULL;
-
-    rc = KDirectoryOpenFileRead(dir, &f, "%s", path);
-    if (rc != 0) {
-        return rc;
-    }
-
-    {
-        Kart *obj = NULL;
-
-        *isKart = true;
-
-        obj = calloc(1, sizeof *obj);
-        if (obj == NULL) {
-            return RC(rcKFG, rcData, rcAllocating, rcMemory, rcExhausted);
-        }
-
-        rc = read_textkart(&obj->mem, f);
-        if (rc == 0) {
-            rc = KartProcessHeader(obj);
-        }
-        if (rc == 0) {
-            KRefcountInit(&obj->refcount, 1, "Kart", "MakeText", "kart");
-            *kart = obj;
-        }
-        else {
-            KartWhack(obj);
-        }
-    }
-
-    RELEASE(KFile, f);
-    return rc;
-}
-#endif
-
-LIB_EXPORT rc_t KartMake(const KDirectory *dir, const char *path,
-    Kart **kart, bool *isKart)
-{
-    rc_t rc = 0;
-    const KFile *f = NULL;
-    char hdr[8] = "";
-    size_t num_read = 0;
-
-    if (dir == NULL || path == NULL || kart == NULL || isKart == NULL) {
-        return RC(rcKFG, rcFile, rcReading, rcParam, rcNull);
-    }
-
-    *isKart = false;
-    *kart = NULL;
-
-    rc = KDirectoryOpenFileRead(dir, &f, "%s", path);
-    if (rc != 0) {
-        return rc;
-    }
-
-    rc = KFileReadAll(f, 0, hdr, sizeof hdr, &num_read);
-    if (rc == 0 && num_read == sizeof hdr &&
-        memcmp(hdr, "ncbikart", sizeof hdr) == 0)
-    {
-        Kart *obj = NULL;
-
-        *isKart = true;
-
-        obj = calloc(1, sizeof *obj);
-        if (obj == NULL) {
-            return RC(rcKFG, rcData, rcAllocating, rcMemory, rcExhausted);
-        }
-
-        rc = decode_kart(&obj->mem, f, sizeof hdr);
-        if (rc == 0) {
-            rc = KartProcessHeader(obj);
-        }
-        if (rc == 0) {
-            KRefcountInit(&obj->refcount, 1, "Kart", "Make", "kart");
-            *kart = obj;
-        }
-        else {
-            KartWhack(obj);
-        }
-    }
-
-    RELEASE(KFile, f);
-    return rc;
-}
diff --git a/libs/kfg/keystore.c b/libs/kfg/keystore.c
deleted file mode 100644
index 7e3b98a..0000000
--- a/libs/kfg/keystore.c
+++ /dev/null
@@ -1,858 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfg/extern.h>
-
-#include <kfg/keystore-priv.h>
-
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-
-#include <kfg/config.h>
-#include <kfg/repository.h>
-#include <kfg/kfg-priv.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/lockfile.h>
-#include <kfs/nullfile.h>
-
-#include <strtol.h>
-
-#include <sysalloc.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define PASSWORD_MAX_SIZE 4096
-#define MAX_PATH_SIZE 4096
-
-static char defaultBindingsFile[MAX_PATH_SIZE];
-
-static rc_t KEncryptionKeyMakeFromFile(const char* path, KEncryptionKey** self);
-
-/* 
- * Non-keyring implementation, using a combination of location-based and global keys
- */
-
-struct KKeyStore
-{
-    KKeyStore_vt vt;
-    KRefcount refcount;
-    
-    KEncryptionKey* temp_key; /* temp key provided by the client code*/
-    
-    const KConfig* kfg;
-    char* bindingsFile;
-};
-
-static rc_t KKeyStoreWhack(KKeyStore* self);
-
-static KKeyStore_vt_v1 v1 = {
-    1, 0,
-    KKeyStoreWhack,
-    KKeyStoreGetKey
-};
-
-rc_t KKeyStoreWhack(KKeyStore* self)
-{
-    rc_t rc = KConfigRelease(self->kfg);
-    rc_t rc2 = KEncryptionKeyRelease(self->temp_key);
-    if (rc == 0)
-        rc = rc2;
-    if (self->bindingsFile != defaultBindingsFile)
-        free(self->bindingsFile);
-    free(self);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KKeyStoreMake(KKeyStore** self, KConfig* kfg)
-{
-    rc_t rc = 0;
-    KKeyStore* ret;
-    
-    if ( self == NULL )
-        return RC ( rcKFG, rcStorage, rcCreating, rcSelf, rcNull );
-
-    *self = NULL;
-    
-    ret = malloc(sizeof(*ret));
-    if (ret == NULL)
-        return RC ( rcKFG, rcStorage, rcCreating, rcMemory, rcExhausted );
-    
-    ret -> vt . v1 =  &v1;
-    
-    KRefcountInit ( & ret -> refcount, 1, "KKeyStore", "init", "" );
-    
-    ret->temp_key = NULL;
-    ret->bindingsFile = NULL;
-    ret->kfg = kfg;
-    if (kfg != NULL)
-    {
-        rc = KConfigAddRef(kfg);
-        if (rc == 0)
-            ret->kfg = kfg;
-    }
-    else
-        ret->kfg = NULL;
-    
-    if (rc == 0)
-        *self = ret;
-    else
-        KKeyStoreWhack(ret);
-    
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KKeyStoreAddRef ( const KKeyStore *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KKeyStore" ) )
-        {
-        case krefLimit:
-            return RC ( rcKFG, rcStorage, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KKeyStoreRelease ( const KKeyStore *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KKeyStore" ) )
-        {
-        case krefWhack:
-            self -> vt . v1 -> destroy ( ( KKeyStore* ) self );
-        break;
-        case krefLimit:
-            return RC ( rcKFG, rcStorage, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/*
- * the result is always 0-terminated
- */
-static
-rc_t ReadEncKey(const KFile* file, char* buf, size_t bufsize)
-{
-    /* at this point we are only getting the password from a 
-     * file but in the future if we can get it from a pipe of
-     * some sort we can't count on the ReadAll to really know
-     * if we hit end of file and not just a pause in the
-     * streaming.  VDB 3 / VFS/KFS 2 will have to fix this somehow
-     */
-    size_t readNum;
-    rc_t rc = KFileReadAll (file, 0, buf, bufsize - 1, &readNum);
-
-    if (rc == 0)
-    {
-        /* -----
-         * trim back the contents of the file to
-         * a single ASCII/UTF-8 text line
-         * We actually only check for the two normal
-         * end of line characters so it could have other
-         * control characters...
-         */
-        char* pc = string_chr (buf, readNum, '\r');
-        if (pc == NULL)
-            pc = string_chr (buf, readNum, '\n');
-
-        if (pc != NULL)
-            *pc = 0;
-        else
-            buf[readNum]=0;
-            
-        if (string_measure(buf, NULL) == 0)
-            rc = RC (rcKFG, rcEncryptionKey, rcRetrieving, rcSize, rcTooShort);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KKeyStoreSetTemporaryKeyFromFile(KKeyStore* self, const struct KFile* file)
-{
-    rc_t rc;
-    char key[PASSWORD_MAX_SIZE + 1];
-    
-    if ( self == NULL )
-        return RC ( rcKFG, rcEncryptionKey, rcRetrieving, rcSelf, rcNull );
-        
-    if ( file == NULL )
-    {
-        rc = KEncryptionKeyRelease(self->temp_key);
-        self->temp_key = NULL;
-    }
-    else
-    {    
-        rc = ReadEncKey(file, key, PASSWORD_MAX_SIZE);
-        if (rc == 0)
-        {
-            rc = KEncryptionKeyRelease(self->temp_key);
-            if ( rc == 0)
-                rc = KEncryptionKeyMake(key, &self->temp_key);
-            memset(key, 0, PASSWORD_MAX_SIZE); /* is this enough security? */
-        }
-    }
-    
-    return rc;
-}
-
-
-static rc_t CC KKeyStoreGetKeyInt(const KKeyStore* self, const char* obj_key,
-    KEncryptionKey** enc_key, bool by_project_id, uint32_t projectId)
-{
-    rc_t rc = 0;
-    
-    if ( self == NULL )
-        return RC ( rcKFG, rcEncryptionKey, rcRetrieving, rcSelf, rcNull );
-    if ( enc_key == NULL )
-        return RC ( rcKFG, rcEncryptionKey, rcRetrieving, rcParam, rcNull );
-    
-    if (self->temp_key != NULL)
-    {
-        rc = KEncryptionKeyAddRef(self->temp_key);
-        if (rc == 0)
-            *enc_key = self->temp_key;
-    }
-    else
-    {
-        const char * env = getenv (ENV_KRYPTO_PWFILE);
-        if (env != NULL)
-            rc = KEncryptionKeyMakeFromFile(env, enc_key);
-        else 
-        {   /* try protected repository */
-            if ( self -> kfg == NULL )
-                rc = KConfigMake( (KConfig**) &(self -> kfg), NULL );
-            if ( rc == 0 )
-            {
-                rc_t rc2;
-                const KRepositoryMgr *rmgr;
-                rc = KConfigMakeRepositoryMgrRead ( self -> kfg, & rmgr );
-                if ( rc == 0 )
-                {
-                    const KRepository *protected;
-                    if (by_project_id) {
-                        rc = KRepositoryMgrGetProtectedRepository
-                            ( rmgr, projectId, & protected );
-                    }
-                    else {
-                        rc = KRepositoryMgrCurrentProtectedRepository
-                            ( rmgr, & protected );
-                    }
-                    if ( rc == 0 )
-                    {   /* in a protected area */
-                        char path [ MAX_PATH_SIZE ];
-                        rc = KRepositoryEncryptionKeyFile ( protected, path, sizeof(path), NULL );
-                        if ( rc == 0 && path [ 0 ] != 0 )
-                            rc = KEncryptionKeyMakeFromFile(path, enc_key);
-                            
-                        rc2 = KRepositoryRelease ( protected );
-                        if (rc == 0)
-                            rc = rc2;
-                    }
-                    else /* use global password file */
-                    {
-                        String* path;
-                        rc = KConfigReadString ( self -> kfg, KFG_KRYPTO_PWFILE, &path );        
-                        if (rc == 0)
-                        {
-                            rc = KEncryptionKeyMakeFromFile(path->addr, enc_key);
-                            StringWhack(path);
-                        }
-                        else 
-                            rc = RC(rcKFG, rcEncryptionKey, rcRetrieving, rcItem, rcNotFound); 
-                    }
-                    rc2 = KRepositoryMgrRelease ( rmgr );
-                    if (rc == 0)
-                        rc = rc2;
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KKeyStoreGetKey(const KKeyStore* self,
-    const char* obj_key, KEncryptionKey** enc_key)
-{
-    return KKeyStoreGetKeyInt(self, obj_key, enc_key, false, 0);
-}
-
-LIB_EXPORT rc_t CC KKeyStoreGetKeyByProjectId(const KKeyStore* self,
-    const char* obj_key, KEncryptionKey** enc_key, uint32_t projectId)
-{
-    return KKeyStoreGetKeyInt(self, obj_key, enc_key, true, projectId);
-}
-
-
-LIB_EXPORT rc_t CC KKeyStoreSetConfig(struct KKeyStore* self, const struct KConfig* kfg)
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        return RC ( rcKFG, rcEncryptionKey, rcRetrieving, rcSelf, rcNull );
-        
-    if ( kfg != NULL )
-        rc = KConfigAddRef(kfg);
-        
-    if ( rc == 0 )
-    {
-        if ( self->kfg != NULL )
-            KConfigRelease(self->kfg);
-        self->kfg = kfg;
-    }
-        
-    return rc;
-}
-
-/* 
- * KEncryptionKey
- */
-
-LIB_EXPORT rc_t CC KEncryptionKeyAddRef ( KEncryptionKey *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KEncryptionKey" ) )
-        {
-        case krefLimit:
-            return RC ( rcKFG, rcEncryptionKey, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KEncryptionKeyRelease ( KEncryptionKey *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KEncryptionKey" ) )
-        {
-        case krefWhack:
-            free((char*)self->value.addr); /*TODO: unlock memory? */
-            free(self);
-            break;
-        case krefLimit:
-            return RC ( rcKFG, rcEncryptionKey, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-static rc_t KEncryptionKeyMakeInt(const char* value, KEncryptionKey** self)
-{
-    KEncryptionKey* ret;
-    
-    *self = NULL;
-    
-    ret = malloc(sizeof(KEncryptionKey));
-    if (ret == NULL)
-        return RC ( rcKFG, rcEncryptionKey, rcCreating, rcMemory, rcExhausted );
-    else
-    {
-        size_t size = string_measure(value, NULL);
-        char* data = malloc(size+1);/*TODO: place in protected memory*/
-        if (data == NULL)
-        {
-            free(ret);
-            return RC ( rcKFG, rcEncryptionKey, rcCreating, rcMemory, rcExhausted );
-        }
-
-        string_copy(data, size + 1, value, size);    
-        StringInit( & ret -> value, data, size, (uint32_t)size ); /* do not include the 0-terminator */
-        
-        KRefcountInit ( & ret -> refcount, 1, "KEncryptionKey", "init", "" );
-        
-        *self = ret;
-        return 0;
-    }
-}
-
-LIB_EXPORT rc_t CC KEncryptionKeyMake(const char* value, KEncryptionKey** self)
-{
-    if ( value == NULL )
-        return RC ( rcKFG, rcEncryptionKey, rcCreating, rcParam, rcNull );
-    if ( self == NULL )
-        return RC ( rcKFG, rcEncryptionKey, rcCreating, rcSelf, rcNull );
-
-    return KEncryptionKeyMakeInt(value, self);
-}
-
-static rc_t KEncryptionKeyMakeFromFile(const char* path, KEncryptionKey** self)
-{
-    rc_t rc;
-    KDirectory* wd;
-    
-    if ( path == NULL )
-        return RC ( rcKFG, rcEncryptionKey, rcCreating, rcParam, rcNull );
-    if ( self == NULL )
-        return RC ( rcKFG, rcEncryptionKey, rcCreating, rcSelf, rcNull );
-    
-    rc = KDirectoryNativeDir(&wd);
-    if (rc == 0)
-    {
-        rc_t rc2;
-        const KFile* file;
-        const char dev_stdin [] = "/dev/stdin";
-        const char dev_null [] = "/dev/null";        
-        
-        if (strcmp (dev_stdin, path) == 0)
-            rc = KFileMakeStdIn (&file);
-        else if (strcmp (dev_null, path) == 0)
-            rc = KFileMakeNullRead (&file);
-        else 
-            rc = KDirectoryOpenFileRead(wd, &file, "%s", path);
-        if (rc == 0)
-        {
-            char key[PASSWORD_MAX_SIZE + 1];
-            rc = ReadEncKey(file, key, PASSWORD_MAX_SIZE);
-            if (rc == 0)
-                rc = KEncryptionKeyMakeInt(key, self);
-                
-            rc2 = KFileRelease(file);
-            if (rc == 0)
-                rc = rc2;
-        }
-        rc2 = KDirectoryRelease(wd);
-        if (rc == 0)
-            rc = rc2;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KKeyStoreSetBindingsFile(struct KKeyStore* self, const char* path)
-{
-    if ( self == NULL )
-        return RC ( rcKFG, rcStorage, rcInitializing, rcSelf, rcNull );
-        
-    if (self->bindingsFile != defaultBindingsFile)
-        free(self->bindingsFile);
-    if (path == NULL)
-        self->bindingsFile = NULL;
-    else
-    {
-        self->bindingsFile = string_dup(path, string_size(path));
-        if (self->bindingsFile == NULL)
-            return RC ( rcKFG, rcStorage, rcInitializing, rcMemory, rcExhausted );
-    }
-    return 0;
-}
-
-LIB_EXPORT const char* KKeyStoreGetBindingsFile(const struct KKeyStore* self)
-{
-    if ( self == NULL )
-        return NULL;
-        
-    return self->bindingsFile;
-}
-
-
-#define MAX_OBJID_SIZE 20
-#define MAX_NAME_SIZE 4096
-
-static rc_t LocateObjectId(const KFile* file, const char* key, char* value, size_t value_size, size_t* value_read)
-{
-    char buf[MAX_OBJID_SIZE + 1 + MAX_NAME_SIZE + 1];
-    size_t num_read;
-    uint64_t pos = 0;
-    size_t key_size = string_size(key);
-    bool eof = false;
-    do
-    {
-        rc_t rc = KFileReadAll(file, pos, buf, sizeof(buf), &num_read);
-        if (rc != 0)
-            return rc;
-        else
-        {
-            size_t start;
-            if (num_read == sizeof(buf))
-            {   /* locate the last incomplete line and ignore it; will be considered after the next read() */
-                while (num_read > 0)
-                {
-                    --num_read;
-                    if (buf[num_read] == '\r' || buf[num_read] == '\n')
-                        break;
-                }
-                if (num_read == 0)
-                    return RC ( rcVFS, rcMgr, rcReading, rcRow, rcTooLong);
-            }
-            else
-                eof = true;
-            
-            start = 0;
-            while (start + key_size < num_read)
-            {   
-                /* find the beginning of a line */
-                while (buf[start] == '\r' || buf[start] == '\n') 
-                {
-                    ++start;
-                    if (start >= num_read)
-                        break;
-                }
-                /* check the key */
-                if (string_cmp(key, key_size, buf + start, key_size, (uint32_t) ( num_read - start )) == 0)
-                {
-                    if (buf [ start + key_size ] == '=')
-                    {
-                        size_t i = 0;
-                        size_t sourceIdx = start + key_size + 1; /* 1st character after '=' */
-                        while (sourceIdx < num_read)
-                        {
-                            if (i >= value_size)
-                                return RC ( rcVFS, rcMgr, rcReading, rcName, rcTooLong);
-                                
-                            if (buf[sourceIdx] == '\r' || buf[sourceIdx] == '\n') 
-                                break;
-                                
-                            value[i] = buf[sourceIdx];
-                            
-                            ++i;
-                            ++sourceIdx;
-                        }
-                        *value_read = i;
-                        return 0;
-                    }
-                }
-                
-                /* skip until the next end of line */
-                while (buf[start] != '\r' && buf[start] != '\n') 
-                {
-                    ++start;
-                    if (start >= num_read)
-                        break;
-                }
-            }
-            
-            pos += num_read;
-        }
-    }
-    while (!eof);
-    
-    return RC ( rcVFS, rcMgr, rcReading, rcId, rcNotFound );
-}
-
-/*
- * Reverse lookup
- */
-static rc_t LocateObject(const KFile* file, const char* value, const size_t value_size, char* key, size_t key_size, size_t* key_read)
-{
-    char buf[MAX_OBJID_SIZE + 1 + MAX_NAME_SIZE + 1];
-    size_t num_read;
-    uint64_t pos = 0;
-    bool eof = false;
-    do
-    {
-        rc_t rc = KFileReadAll(file, pos, buf, sizeof(buf), &num_read);
-        if (rc != 0)
-            return rc;
-        else
-        {
-            size_t start;
-            if (num_read == sizeof(buf))
-            {   /* locate the last incomplete line and ignore it; will be considered after the next read() */
-                while (num_read > 0)
-                {
-                    --num_read;
-                    if (buf[num_read] == '\r' || buf[num_read] == '\n')
-                        break;
-                }
-                if (num_read == 0)
-                    return RC ( rcVFS, rcMgr, rcReading, rcRow, rcTooLong);
-            }
-            else
-                eof = true;
-            
-            start = 0; 
-            while (start + value_size < num_read)
-            {   
-                size_t key_start, key_end;
-                size_t value_start;
-                
-                /* find the beginning of a line */
-                while (buf[start] == '\r' || buf[start] == '\n') 
-                {
-                    ++start;
-                    if (start >= num_read)
-                        break;
-                }
-                if (start >= num_read)
-                    continue;
-                    
-                key_start = start;
-                
-                /* find the separator */
-                while (buf[start] != '=') 
-                {
-                    if (buf[start] == '\r' || buf[start] == '\n') /* separator not found, ignore the line*/
-                        break;
-                        
-                    ++start;
-                    if (start >= num_read)
-                        break;
-                }
-                if (start >= num_read || buf[start] != '=')
-                    continue;
-                
-                key_end = start;
-                
-                ++start; /* skip the separator */
-
-                value_start = start;
-                /* find the next end of line */
-                while (buf[start] != '\r' && buf[start] != '\n') 
-                {
-                    ++start;
-                    if (start >= num_read)
-                        break;
-                }
-
-                /* compare the value */
-                if (string_cmp(value, value_size, buf + value_start, start - value_start, (uint32_t) ( start - value_start )) == 0)
-                {
-                    *key_read = key_end - key_start;
-                    if (string_copy(key, key_size, buf + key_start, *key_read) != *key_read)
-                        return RC ( rcVFS, rcMgr, rcReading, rcId, rcTooLong);
-                    return 0;
-                }
-            }
-            
-            pos += num_read;
-        }
-    }
-    while (!eof);
-    
-    return RC ( rcVFS, rcMgr, rcReading, rcId, rcNotFound );
-}
-
-static rc_t AppendObject(KFile* file, const char* name, const String* value)
-{
-    uint64_t size;
-    rc_t rc = KFileSize ( file, &size );
-    if (rc == 0)
-    {
-        char buf[MAX_OBJID_SIZE + 1 + MAX_NAME_SIZE + 1];
-        size_t num_writ;
-        rc = string_printf(buf, sizeof(buf), &num_writ, "%s=%S\n", name, value);
-        if (rc == 0)
-            rc = KFileWrite ( file, size, buf, num_writ, &num_writ );
-    }
-    return rc;
-}
-
-static rc_t OpenBindingsFile(KKeyStore* self, const KFile** ret)
-{
-    rc_t rc = 0;
-    if (self->bindingsFile == NULL)
-    {
-        String* home;
-        if ( self->kfg == NULL )
-            rc = KConfigMake( (KConfig**) &(self -> kfg), NULL );
-        if (rc == 0)
-        {
-            if (KConfigReadString(self->kfg, "NCBI_HOME", &home) == 0 ||
-                KConfigReadString(self->kfg, "HOME", &home) == 0 ||
-                KConfigReadString(self->kfg, "USERPROFILE", &home) == 0 )
-            {
-                size_t num_writ;
-                rc = string_printf(defaultBindingsFile, sizeof(defaultBindingsFile), &num_writ, "%S/objid.mapping", home);
-                if (rc == 0)
-                    self->bindingsFile = defaultBindingsFile;
-                StringWhack(home);
-            }
-            else
-                rc = RC ( rcVFS, rcMgr, rcOpening, rcEnvironment, rcNull );
-        }
-    }
-    
-    if (rc == 0)
-    {
-        rc_t rc2;
-        KDirectory* wd;
-        rc = KDirectoryNativeDir (&wd);
-        if (rc == 0)
-            rc = KDirectoryOpenFileRead(wd, ret, "%s", self->bindingsFile);
-        else
-            *ret = NULL;
-            
-        rc2 = KDirectoryRelease(wd);
-        if (rc == 0)
-            rc = rc2;
-    }
-    return rc;
-}
- 
-LIB_EXPORT rc_t CC KKeyStoreRegisterObject(struct KKeyStore* self, uint32_t oid, const struct String* newName)
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        return RC ( rcKFG, rcStorage, rcInitializing, rcSelf, rcNull );
-    else if ( newName == NULL )
-        rc = RC ( rcKFG, rcStorage, rcInitializing, rcParam, rcNull );
-    else
-    {
-        char oidString[MAX_OBJID_SIZE];
-        size_t num_writ;
-        rc = string_printf(oidString, sizeof(oidString), &num_writ, "%d", oid);
-        if (rc == 0)
-        {
-            rc_t rc2;
-            const KFile* file;
-            char oldName[MAX_NAME_SIZE];
-            size_t num_read;
-            
-            rc = OpenBindingsFile(self, &file);
-            if (rc == 0)
-            {   /* see if already registered */
-                if (LocateObjectId(file, oidString, oldName, sizeof(oldName), &num_read) == 0 &&
-                    string_cmp(oldName, num_read, newName->addr, newName->size, (uint32_t)newName->size) != 0)
-                    rc = RC ( rcVFS, rcMgr, rcRegistering, rcId, rcExists );
-                rc2 = KFileRelease(file);
-                if (rc == 0)
-                    rc = rc2;
-            }
-            else /* no bindings file; will create */
-                rc = 0;
-            
-            if (rc == 0)
-            {   /* not registered; lock the bindings file and append the binding */
-                KDirectory* wd;
-                rc = KDirectoryNativeDir (&wd);
-                if (rc == 0)
-                {
-                    KFile* lockedFile;
-                    /*TODO: loop until locking succeeds or times out */
-                    rc = KDirectoryCreateExclusiveAccessFile(wd, &lockedFile, true, 0600, kcmOpen, "%s", self->bindingsFile);
-                    if (rc == 0)
-                    {
-                        if (LocateObjectId(lockedFile, oidString, oldName, sizeof(oldName), &num_read) == 0)
-                        {   /* somebody inserted the binding before we locked - make sure their binding was the same */
-                            if (string_cmp(oldName, num_read, newName->addr, newName->size, (uint32_t)newName->size) != 0)
-                                rc = RC ( rcVFS, rcMgr, rcRegistering, rcId, rcExists );
-                        }
-                        else
-                            rc = AppendObject(lockedFile, oidString, newName);
-                            
-                        rc2 = KFileRelease(lockedFile);
-                        if (rc == 0)
-                            rc = rc2;
-                    }
-                    rc2 = KDirectoryRelease(wd);
-                    if (rc == 0)
-                        rc = rc2;
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VKKeyStoreGetObjectId(const struct KKeyStore* self, const struct String* name, uint32_t* oid)
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        return RC ( rcKFG, rcStorage, rcRetrieving, rcSelf, rcNull );
-    else if ( oid == NULL )
-        rc = RC ( rcKFG, rcStorage, rcRetrieving, rcParam, rcNull );
-    else
-    {
-        const KFile* file;
-        rc = OpenBindingsFile((KKeyStore*)self, &file);
-        if (rc == 0)
-        {
-            rc_t rc2;
-            char id_buf[MAX_OBJID_SIZE+1];
-            size_t id_read;
-            if (LocateObject(file, name->addr, name->size, id_buf, MAX_OBJID_SIZE, &id_read) == 0)
-            {
-                char* endptr;
-                unsigned long int res;
-                id_buf[id_read] = 0;
-                res = strtou32(id_buf, &endptr, 10);
-                if (*endptr != 0)
-                    rc = RC ( rcKFG, rcStorage, rcRetrieving, rcId, rcCorrupt);
-                else
-                    *oid = (uint32_t)res;
-            }
-            else
-                rc = RC ( rcKFG, rcStorage, rcRetrieving, rcName, rcNotFound);
-            
-            rc2 = KFileRelease(file);
-            if (rc == 0)
-                rc = rc2;
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KKeyStoreGetObjectName(const struct KKeyStore* self, uint32_t oid, const struct String** result)
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        return RC ( rcKFG, rcStorage, rcRetrieving, rcSelf, rcNull );
-    else if ( result == NULL )
-        rc = RC ( rcKFG, rcStorage, rcRetrieving, rcParam, rcNull );
-    else
-    {
-        char oidString[MAX_OBJID_SIZE];
-        size_t num_writ;
-        rc = string_printf(oidString, sizeof(oidString), &num_writ, "%d", oid);
-        if (rc == 0)
-        {
-            const KFile* file;
-            
-            rc = OpenBindingsFile((KKeyStore*)self, &file);
-            if (rc == 0)
-            {   
-                rc_t rc2;
-                char name[MAX_NAME_SIZE];
-                size_t num_read;
-                if (LocateObjectId(file, oidString, name, sizeof(name), &num_read) == 0)
-                {
-                    String* res = (String*)malloc(sizeof(String) + num_read);
-                    if (res != NULL)
-                    {
-                        string_copy((char*)res + sizeof(String), num_read, name, num_read);
-                        StringInit(res, (char*)res + sizeof(String), num_read, (uint32_t)num_read);
-                        *result = res;
-                    }
-                    else
-                        rc = RC ( rcKFG, rcStorage, rcRetrieving, rcMemory, rcExhausted );
-                }
-                else
-                    rc = RC ( rcKFG, rcStorage, rcRetrieving, rcId, rcNotFound);
-                    
-                rc2 = KFileRelease(file);
-                if (rc == 0)
-                    rc = rc2;
-            }
-        }
-    }
-    return rc;
-}
-
diff --git a/libs/kfg/kfg-lex.h b/libs/kfg/kfg-lex.h
deleted file mode 100644
index 0aee8e0..0000000
--- a/libs/kfg/kfg-lex.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_kfg_lex_
-#define _h_kfg_lex_
-
-#include <string.h>
-#include <stdbool.h>
-
-typedef struct KFGToken
-{
-    const char* tokenText;
-    size_t tokenLength;
-    int tokenId;
-    size_t line_no;
-    size_t column_no;
-} KFGToken;
-
-typedef struct KFGScanBlock
-{
-    void* scanner;
-    void* buffer;
-    void* self; 
-    const char* file;
-    KFGToken* lastToken; /* used for error reporting */
-    bool (*look_up_var)(void * self, struct KFGToken*);
-    void (*report_error)(struct KFGScanBlock* sb, const char* msg);
-} KFGScanBlock;
-
-struct VNamelist;
-typedef union 
-{
-	KFGToken            pb;
-	struct VNamelist*   namelist;
-} KFGSymbol;
-
-extern bool KFGScan_yylex_init(KFGScanBlock* sb, const char *str); /* false = out of memory */
-extern void KFGScan_yylex_destroy(KFGScanBlock* sb);
-
-extern void KFGScan_set_debug(bool on, KFGScanBlock* scannerContext);
-
-extern int KFGScan_yylex(KFGSymbol* pb, KFGScanBlock* scannerContext);
-
-#endif /* _h_kfg_lex_ */
diff --git a/libs/kfg/kfg-parse.h b/libs/kfg/kfg-parse.h
deleted file mode 100644
index 2ea69ff..0000000
--- a/libs/kfg/kfg-parse.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_kfg_parse_
-#define _h_kfg_parse_
-
-#include "kfg-lex.h"
-
-#include <klib/rc.h>
-
-typedef struct KFGParseBlock
-{
-    rc_t (*write_nvp)(void * self, const char* name, size_t nameLen, struct VNamelist*);
-} KFGParseBlock;
-
-extern int KFG_parse(KFGParseBlock* pb, KFGScanBlock* scannerContext);
-
-#endif /* _h_kfg_parse_ */
diff --git a/libs/kfg/kfg-priv.h b/libs/kfg/kfg-priv.h
deleted file mode 100644
index 27e5556..0000000
--- a/libs/kfg/kfg-priv.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfg_priv_
-#define _h_kfg_priv_
-
-extern void add_aws_nodes ( KConfig *self );
-
-#endif /* _h_kfg_priv_ */
diff --git a/libs/kfg/ngc-priv.h b/libs/kfg/ngc-priv.h
deleted file mode 100644
index 8a6a6fa..0000000
--- a/libs/kfg/ngc-priv.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfg_ngc_priv_
-#define _h_kfg_ngc_priv_
-
-#ifndef _h_klib_data_buffer
-#include <klib/data-buffer.h>
-#endif
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KNgcObj
-{
-    KRefcount refcount;
-    KDataBuffer buffer;
-    String version, encryptionKey, downloadTicket, description;
-    uint32_t projectId;
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfg_ngc_priv_ */
diff --git a/libs/kfg/ngc.c b/libs/kfg/ngc.c
deleted file mode 100644
index 87d34aa..0000000
--- a/libs/kfg/ngc.c
+++ /dev/null
@@ -1,484 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <kfg/extern.h>
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/data-buffer.h>
-#include <klib/refcount.h>
-
-#include <kfg/ngc.h>
-#include <kfs/file.h>
-#include <kfs/subfile.h>
-#include <kfs/gzip.h>
-
-#include <strtol.h>
-
-#include "ngc-priv.h"
-
-#include <string.h>
-#include <sysalloc.h>
-
-
-#define MIN_ENC_KEY_LEN 1
-#define MAX_ENC_KEY_LEN 256
-#define MIN_DNLD_TICKET_LEN 1
-#define MAX_DNLD_TICKET_LEN 256
-#define MIN_DESCRIPTION_LEN 1
-#define MAX_DESCRIPTION_LEN 256
-
-static rc_t KNgcObjWhack ( KNgcObj * self )
-{
-    KDataBufferWhack ( & self-> buffer );
-    free( self );
-    return 0;
-}
-
-
-static rc_t KNgcObjParseIdKeyTicketDesc ( KNgcObj * self, uint32_t offset )
-{
-    rc_t rc = 0;
-    uint64_t i;
-    uint64_t l = ( self -> buffer . elem_count ) - offset;
-    uint8_t state;
-    const char * ptr = ( const char * ) self -> buffer . base;
-    String projectId;
-    String * dst = & projectId;
-
-    memset ( & projectId, 0, sizeof projectId );
-
-    ptr += offset;
-    dst -> addr = ptr;
-    for ( i = 0, state = 0; i < l && state < 4; i++ )
-    {
-        if ( ptr[ i ] == '|' )
-        {
-            dst -> size = dst -> len;
-            switch( state )
-            {
-                case 0 : dst = & self -> encryptionKey; break;
-                case 1 : dst = & self -> downloadTicket; break;
-                case 2 : dst = & self -> description; break;
-            }
-            state ++;
-            if ( state < 4 )
-            {
-                if ( i < ( l - 1 ) )
-                    dst -> addr = &( ptr[ i + 1 ] );
-            }
-        }
-        else
-        {
-            ( dst -> len )++;
-        }
-    }
-    if ( projectId . addr == NULL ||
-         self -> encryptionKey . addr == NULL ||
-         self -> downloadTicket . addr == NULL ||
-         self -> description . addr == NULL )
-    {
-        rc = RC ( rcKFG, rcFile, rcParsing, rcParam, rcInvalid );
-    }
-    else if ( projectId . len < 1 ||
-               self -> encryptionKey . len < 1 ||
-               self -> downloadTicket . len < 1 ||
-               self -> description . len < 1 )
-    {
-        rc = RC ( rcKFG, rcFile, rcParsing, rcParam, rcInvalid );
-    }
-
-    /* the following tests may be version depended */
-
-    /* test to verify that the project ID is a valid Integer */
-    if ( rc == 0 )
-    {
-        char * end;
-        self -> projectId = strtou32 ( projectId . addr, & end, 10 );
-        if ( ( end - ( char* ) projectId . addr ) != projectId . size )
-            rc = RC ( rcKFG, rcFile, rcParsing, rcParam, rcInvalid );
-    }
-
-    /* test that the download ticket and the encKey do have a minimum and maximum length */
-    if ( rc == 0 )
-    {
-        if ( ( self -> downloadTicket . len < MIN_DNLD_TICKET_LEN ) ||
-             ( self -> downloadTicket . len > MAX_DNLD_TICKET_LEN ) )
-            rc = RC ( rcKFG, rcFile, rcParsing, rcParam, rcInvalid );
-    }
-
-    if ( rc == 0 )
-    {
-        if ( ( self -> encryptionKey . len < MIN_ENC_KEY_LEN ) ||
-             ( self -> encryptionKey . len > MAX_ENC_KEY_LEN ) )
-            rc = RC ( rcKFG, rcFile, rcParsing, rcParam, rcInvalid );
-    }
-
-    if ( rc == 0 )
-    {
-        if ( ( self -> description . len < MIN_DESCRIPTION_LEN ) ||
-             ( self -> description . len > MAX_DESCRIPTION_LEN ) )
-            rc = RC ( rcKFG, rcFile, rcParsing, rcParam, rcInvalid );
-    }
-
-    return rc;
-}
-
-
-static bool KNgcParseUntilfound ( const char * src, uint32_t l, const char * term, uint32_t term_count, String * dst )
-{
-    bool res = false;
-    uint32_t i;
-
-    dst -> addr = src;
-    for ( i = 0; i < l && !res; ++i )
-    {
-        char * found = string_chr ( term, term_count, src[ i ] );
-        res = ( found != NULL );
-        if ( !res )
-            ( dst -> len )++;
-    }
-    if ( res )
-        dst -> size = dst -> len;
-    else
-        dst -> size = dst -> len = 0;
-    return res;
-}
-
-
-static rc_t KNgcObjParseBuffer ( KNgcObj * self )
-{
-    rc_t rc = 0;
-    uint32_t l = ( uint32_t ) self -> buffer . elem_count;
-    const char * ptr = ( const char * ) self -> buffer . base;
-
-    const char s_version[] = "version ";
-    const char s_v1_0[] = "1.0";
-
-    if ( ( size_t ) l != self -> buffer . elem_count )
-        l = INT32_MAX;
-
-    if ( string_cmp( s_version, sizeof s_version - 1, ptr, l, sizeof s_version - 1 ) != 0 )
-        rc = RC( rcKFG, rcFile, rcParsing, rcFormat, rcUnrecognized );
-    else if ( !KNgcParseUntilfound ( &( ptr[ 8 ] ), l - 8, "\n\r", 2, & self -> version ) )
-        rc = RC( rcKFG, rcFile, rcParsing, rcFormat, rcUnrecognized );
-
-    if ( rc == 0 )
-    {
-        if ( self -> version . len != 3 )
-            rc = RC( rcKFG, rcFile, rcParsing, rcFormat, rcUnrecognized );
-        else if ( string_cmp( s_v1_0, sizeof s_v1_0 - 1, self -> version . addr,  sizeof s_v1_0 - 1, sizeof s_v1_0 - 1 ) != 0 )
-            rc = RC( rcKFG, rcFile, rcParsing, rcFormat, rcUnrecognized );
-    }
-
-    if ( rc == 0 )
-    {
-        uint32_t offset = sizeof s_version - 1 + ( self -> version . len ) + 1;
-        rc = KNgcObjParseIdKeyTicketDesc ( self, offset );
-    }
-    return rc;
-}
-
-
-static rc_t KNgcObjInitFromString ( KNgcObj * self, const char * line )
-{
-    rc_t rc = 0;
-    uint32_t len = string_measure( line, NULL );
-    rc = KDataBufferResize ( &self -> buffer, len + 20 );
-    if ( rc == 0 )
-    {
-        size_t written;
-        rc = string_printf( self -> buffer . base, len + 20, &written, "version 1.0\n%s", line );
-        if ( rc == 0 )
-        {
-            self -> buffer . elem_count = written;
-            rc = KNgcObjParseBuffer ( self );
-        }
-    }
-    return rc;
-}
-
-
-static rc_t KNgcObjInitFromFile ( KNgcObj * self, const struct KFile * src )
-{
-    char hdr [ 8 ];
-    size_t num_read;
-    rc_t rc = KFileReadAll ( src, 0, hdr, sizeof hdr, & num_read );
-    if ( rc == 0 )
-    {
-        if ( num_read != sizeof hdr )
-            rc = RC( rcKFG, rcFile, rcReading, rcFile, rcWrongType );
-        else if ( memcmp( hdr, "ncbi_gap", sizeof hdr ) != 0 )
-            rc = RC( rcKFG, rcFile, rcReading, rcFile, rcWrongType );
-        else
-        {
-            uint64_t src_size;
-            rc = KFileSize ( src, & src_size );
-            if ( rc == 0 )
-            {
-                const struct KFile * sub;
-                rc = KFileMakeSubRead ( &sub, src, sizeof hdr, src_size - sizeof hdr );
-                if ( rc == 0 )
-                {
-                    const struct KFile * gzip;
-                    rc = KFileMakeGzipForRead ( & gzip, sub );
-                    if ( rc == 0 )
-                    {
-                        size_t to_read = ( src_size * 10 );
-                        /* guessing that the unzip version will not be bigger that 10 x the zipped one */
-                        rc = KDataBufferResize ( & self -> buffer, to_read );
-                        if ( rc == 0 )
-                        {
-                            size_t num_read;
-                            rc = KFileReadAll ( gzip, 0,  self -> buffer . base, to_read, & num_read );
-                            if ( rc == 0 )
-                            {
-                                self -> buffer . elem_count = num_read;
-                                rc = KNgcObjParseBuffer ( self );
-                            }
-                        }
-                        KFileRelease ( gzip );
-                    }
-                    KFileRelease ( sub );
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KNgcObjMakeFromString ( const KNgcObj **ngc, const char * line )
-{
-    rc_t rc;
-    if ( ngc == NULL || line == NULL )
-        rc = RC ( rcKFG, rcMgr, rcAllocating, rcParam, rcNull );
-    else
-    {
-        struct KNgcObj * f = calloc ( 1, sizeof * f );
-        if ( f == NULL )
-            rc = RC ( rcKFG, rcMgr, rcAllocating, rcMemory, rcExhausted );
-        else
-        {
-            KRefcountInit ( & f -> refcount, 1, "KNgcObj", "init", "kfg" );
-            memset ( & f -> buffer, 0, sizeof f -> buffer ); 
-            rc = KDataBufferMakeBytes ( & f -> buffer, 0 );
-            if ( rc == 0 )
-            {
-                rc = KNgcObjInitFromString( f, line );
-                if ( rc == 0 )
-                {
-                    * ngc = f;
-                    return rc;
-                }
-            }
-            KNgcObjWhack ( f );
-        }
-        * ngc = NULL;
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KNgcObjMakeFromFile ( const KNgcObj **ngc, const struct KFile * src )
-{
-    rc_t rc;
-    if ( ngc == NULL || src == NULL )
-        rc = RC ( rcKFG, rcFile, rcAllocating, rcParam, rcNull );
-    else
-    {
-        struct KNgcObj * f = calloc ( 1, sizeof * f );
-        if ( f == NULL )
-            rc = RC ( rcKFG, rcFile, rcAllocating, rcMemory, rcExhausted );
-        else
-        {
-            KRefcountInit ( & f -> refcount, 1, "KNgcObj", "init", "kfg" );
-            memset ( & f -> buffer, 0, sizeof f -> buffer ); 
-            rc = KDataBufferMakeBytes ( & f -> buffer, 0 );
-            if ( rc == 0 )
-            {
-                rc = KNgcObjInitFromFile( f, src );
-                if ( rc == 0 )
-                {
-                    * ngc = f;
-                    return rc;
-                }
-            }
-            KNgcObjWhack ( f );
-        }
-        * ngc = NULL;
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KNgcObjAddRef ( const KNgcObj *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd( &self->refcount, "KNgcObj" ) )
-        {
-        case krefLimit:
-            return RC ( rcKFG, rcFile, rcAttaching, rcRefcount, rcExcessive );
-        case krefNegative:
-            return RC ( rcKFG, rcFile, rcAttaching, rcRefcount, rcInvalid );
-        }
-    }
-    return 0;
-}
-
-
-LIB_EXPORT rc_t CC KNgcObjRelease ( const KNgcObj *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KNgcObj" ) )
-        {
-        case krefWhack:
-            return KNgcObjWhack ( ( KNgcObj * ) self );
-        case krefNegative:
-            return RC ( rcKFG, rcFile, rcReleasing, rcRefcount, rcInvalid );
-        }
-    }
-    return 0;
-}
-
-
-LIB_EXPORT rc_t CC KNgcObjPrint ( const KNgcObj *self, char * buffer, size_t buffer_size, size_t * written )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcFile, rcFormatting, rcSelf, rcNull );
-    else if ( buffer == NULL )
-        rc = RC ( rcKFG, rcFile, rcFormatting, rcParam, rcNull );
-    else
-        rc = string_printf( buffer, buffer_size, written,
-                            "Vers: '%S', ID:'%u', Key:'%S', Ticket:'%S', Desc:'%S'",
-                            &self -> version, self -> projectId, &self -> encryptionKey,
-                            &self -> downloadTicket, &self -> description );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KNgcObjWriteToFile ( const KNgcObj *self, struct KFile * dst )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcFile, rcWriting, rcSelf, rcNull );
-    else if ( dst == NULL )
-        rc = RC ( rcKFG, rcFile, rcWriting, rcParam, rcNull );
-    else
-    {
-        size_t written_to_hdr;
-        char hdr [ 10 ];
-        rc = string_printf( hdr, sizeof hdr, &written_to_hdr, "ncbi_gap" );
-        if ( rc == 0 )
-        {
-            size_t written_to_file;
-            rc = KFileWriteAll ( dst, 0, hdr, written_to_hdr, &written_to_file );
-            if ( rc == 0 && written_to_hdr == written_to_file )
-            {
-                struct KFile * sub;
-                rc = KFileMakeSubUpdate ( &sub, dst, written_to_file, 4096 );
-                if ( rc == 0 )
-                {
-                    struct KFile * gzip;
-                    rc = KFileMakeGzipForWrite ( &gzip, sub );
-                    if ( rc == 0 )
-                    {
-                        size_t written_to_buffer;
-                        char buffer[ 1024 ];
-                        rc = string_printf( buffer, sizeof buffer, &written_to_buffer,
-                                            "version %S\n%u|%S|%S|%S",
-                                            &self -> version, self -> projectId, &self -> encryptionKey,
-                                            &self -> downloadTicket, &self -> description );
-                        if ( rc == 0 )
-                        {
-                            size_t written_to_gzip;
-                            rc = KFileWriteAll ( gzip, 0, buffer, written_to_buffer, &written_to_gzip );
-                        }
-                        KFileRelease ( gzip );
-                    }
-                    KFileRelease ( sub );
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KNgcObjWriteKeyToFile ( const KNgcObj *self, struct KFile * dst )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcFile, rcWriting, rcSelf, rcNull );
-    else if ( dst == NULL )
-        rc = RC ( rcKFG, rcFile, rcWriting, rcParam, rcNull );
-    else if ( self -> encryptionKey . addr == NULL || self -> encryptionKey . len < 1 )
-        rc = RC ( rcKFG, rcFile, rcWriting, rcParam, rcInvalid );
-    else
-    {
-        size_t written_to_file;
-        rc = KFileWriteAll ( dst, 0, self -> encryptionKey . addr, self -> encryptionKey . len, &written_to_file );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KNgcObjGetProjectId ( const KNgcObj *self, uint32_t * id )
-{
-    rc_t rc;
-    if ( id == NULL )
-        rc = RC ( rcKFG, rcFile, rcFormatting, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcFile, rcFormatting, rcSelf, rcNull );
-        else
-        {
-            * id = self -> projectId;
-            return 0;
-        }
-
-        * id = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KNgcObjGetProjectName ( const KNgcObj *self, char * buffer, size_t buffer_size, size_t * written )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcFile, rcFormatting, rcSelf, rcNull );
-    else if ( buffer == NULL )
-        rc = RC ( rcKFG, rcFile, rcFormatting, rcParam, rcNull );
-    else
-        rc = string_printf( buffer, buffer_size, written, "dbGaP-%u", self -> projectId );
-    return rc;
-}
-
diff --git a/libs/kfg/properties.c b/libs/kfg/properties.c
deleted file mode 100644
index 5c19f60..0000000
--- a/libs/kfg/properties.c
+++ /dev/null
@@ -1,721 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/vector.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/namelist.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-
-#include <kfg/config.h>
-#include <kfg/repository.h>
-#include <kfg/ngc.h>
-#include "ngc-priv.h"
-
-#include <va_copy.h>
-
-/* ---------------------------------------------------------------------------------------------------- */
-
-static rc_t KConfig_Get_Repository_State( const KConfig *self,
-    bool * state, bool negate, bool dflt, const char * path, ... )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-    else if ( state == NULL || path == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else {
-        va_list args;
-        char tmp[ 4096 ];
-        size_t num_writ;
-
-        *state = dflt;
-        va_start ( args, path );
-        rc = string_vprintf ( tmp, sizeof tmp, & num_writ, path, args );
-        va_end ( args );
-
-        if ( rc == 0 )
-        {
-            bool rd_state;
-            rc = KConfigReadBool ( self, tmp, &rd_state );
-            if ( rc == 0 )
-            {
-                if ( negate )
-                    *state = !rd_state;
-                else
-                    *state = rd_state;
-            }
-            else
-                rc = 0;     /* it is OK to not find the node, return the default then... */
-        }
-    }
-    return rc;
-}
-
-
-static rc_t KConfig_Set_Repository_State( KConfig *self,
-    bool state, bool negate, const char * path, ... )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcWriting, rcSelf, rcNull );
-    else if ( path == NULL )
-        rc = RC ( rcKFG, rcNode, rcWriting, rcParam, rcNull );
-    else
-    {
-        va_list args;
-        char tmp[ 4096 ];
-        size_t num_writ;
-
-        va_start ( args, path );
-        rc = string_vprintf ( tmp, sizeof tmp, & num_writ, path, args );
-        va_end ( args );
-
-        if ( rc == 0 )
-        {
-            if ( negate )
-                rc = KConfigWriteBool( self, tmp, !state );
-            else
-                rc = KConfigWriteBool( self, tmp, state );
-        }
-    }
-    return rc;
-}
-
-
-/* ---------------------------------------------------------------------------------------------------- */
-
-static rc_t KConfig_Get_Repository_String( const KConfig *self,
-    char * buffer, size_t buffer_size, size_t * written, const char * path, ... )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-    else if ( buffer == NULL || path == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    {
-        va_list args;
-        char tmp[ 4096 ];
-        size_t num_writ;
-
-        va_start ( args, path );
-        rc = string_vprintf ( tmp, sizeof tmp, & num_writ, path, args );
-        va_end ( args );
-
-        if ( rc == 0 )
-        {
-            struct String * res;
-            rc = KConfigReadString ( self, tmp, &res );
-            if ( rc == 0 )
-            {
-                rc = string_printf( buffer, buffer_size, written, "%S", res );
-                StringWhack ( res );
-            }
-        }
-    }
-    return rc;
-}
-
-
-static rc_t KConfig_Set_Repository_String( KConfig *self,
-    const char * value, const char * path, ... )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcWriting, rcSelf, rcNull );
-    else if ( path == NULL )
-        rc = RC ( rcKFG, rcNode, rcWriting, rcParam, rcNull );
-    else
-    {
-        va_list args;
-        char tmp[ 4096 ];
-        size_t num_writ;
-
-        va_start ( args, path );
-        rc = string_vprintf ( tmp, sizeof tmp, & num_writ, path, args );
-        va_end ( args );
-
-        if ( rc == 0 )
-            rc = KConfigWriteString( self, tmp, value );
-    }
-    return rc;
-}
-
-/* -------------------------------------------------------------------------- */
-
-/* get/set HTTP proxy path */
-LIB_EXPORT rc_t CC KConfig_Get_Http_Proxy_Path( const KConfig *self,
-    char *buffer, size_t buffer_size, size_t *written )
-{
-    return KConfig_Get_Repository_String
-        (self, buffer, buffer_size, written, "http/proxy/path");
-}
-
-LIB_EXPORT rc_t CC KConfig_Set_Http_Proxy_Path
-    ( KConfig *self, const char *value )
-{
-    return KConfig_Set_Repository_String(self, value, "http/proxy/path");
-}
-
-/* get/set enabled-state for HTTP proxy */
-LIB_EXPORT rc_t CC KConfig_Get_Http_Proxy_Enabled
-    ( const KConfig *self, bool *enabled, bool dflt )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL ) {
-        rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-    }
-    else if ( enabled == NULL ) {
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    }
-    else {
-        *enabled = dflt;
-        KConfigReadBool ( self, "http/proxy/enabled", enabled );
-        /* errors are ignored - then default value is returned */
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KConfig_Set_Http_Proxy_Enabled
-    ( KConfig *self, bool enabled )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL ) {
-        rc = RC ( rcKFG, rcNode, rcWriting, rcSelf, rcNull );
-    }
-    else {
-        rc = KConfigWriteBool( self, "http/proxy/enabled", enabled );
-    }
-
-    return rc;
-}
-
-/* -------------------------------------------------------------------------- */
-
-LIB_EXPORT rc_t CC KConfig_Get_Home( const KConfig *self, char * buffer, size_t buffer_size, size_t * written )
-{   return KConfig_Get_Repository_String( self, buffer, buffer_size, written, "HOME" ); }
-
-#define USER_DEFAULT_PATH "/repository/user/default-path"
-LIB_EXPORT rc_t CC KConfig_Get_Default_User_Path( const KConfig *self, char * buffer, size_t buffer_size, size_t * written )
-{   return KConfig_Get_Repository_String( self, buffer, buffer_size, written, USER_DEFAULT_PATH ); }
-LIB_EXPORT rc_t CC KConfig_Set_Default_User_Path( KConfig *self, const char * value )
-{   return KConfig_Set_Repository_String( self, value, USER_DEFAULT_PATH ); }
-
-/* -------------------------------------------------------------------------- */
-
-#define PATH_REPOSITORY_REMOTE_DISABLED "/repository/remote/disabled"
-LIB_EXPORT rc_t CC KConfig_Get_Remote_Access_Enabled
-    ( const KConfig *self, bool * enabled )
-{
-    return KConfig_Get_Repository_State( self, enabled,
-        true, true, PATH_REPOSITORY_REMOTE_DISABLED );
-}
-LIB_EXPORT rc_t CC KConfig_Set_Remote_Access_Enabled
-    ( KConfig *self, bool enabled )
-{
-    return KConfig_Set_Repository_State( self, enabled,
-        true, PATH_REPOSITORY_REMOTE_DISABLED );
-}
-
-#define PATH_REPOSITORY_REMOTE_MAIN_CGI_DISABLED \
-    "/repository/remote/main/CGI/disabled"
-LIB_EXPORT rc_t CC KConfig_Get_Remote_Main_Cgi_Access_Enabled
-    ( const KConfig *self, bool * enabled )
-{
-    return KConfig_Get_Repository_State( self, enabled,
-        true, true, PATH_REPOSITORY_REMOTE_MAIN_CGI_DISABLED );
-}
-
-#define PATH_REPOSITORY_REMOTE_AUX_NCBI_DISABLED \
-    "/repository/remote/aux/NCBI/disabled"
-LIB_EXPORT rc_t CC KConfig_Get_Remote_Aux_Ncbi_Access_Enabled
-    ( const KConfig *self, bool * enabled )
-{
-    return KConfig_Get_Repository_State( self, enabled,
-        true, true, PATH_REPOSITORY_REMOTE_DISABLED );
-}
-
-#define PATH_REPOSITORY_SITE_DISABLED "/repository/site/disabled"
-#define PATH_REPOSITORY_USER_DISABLED "/repository/user/disabled"
-LIB_EXPORT rc_t CC KConfig_Get_Site_Access_Enabled( const KConfig *self, bool * enabled )
-{   return KConfig_Get_Repository_State( self, enabled, true, true, PATH_REPOSITORY_SITE_DISABLED ); }
-LIB_EXPORT rc_t CC KConfig_Set_Site_Access_Enabled( KConfig *self, bool enabled )
-{   return KConfig_Set_Repository_State( self, enabled, true, PATH_REPOSITORY_SITE_DISABLED ); }
-
-LIB_EXPORT rc_t CC KConfig_Get_User_Access_Enabled( const KConfig *self, bool * enabled )
-{   return KConfig_Get_Repository_State( self, enabled, true, true, PATH_REPOSITORY_USER_DISABLED ); }
-LIB_EXPORT rc_t CC KConfig_Set_User_Access_Enabled( KConfig *self, bool enabled )
-{   return KConfig_Set_Repository_State( self, enabled, true, PATH_REPOSITORY_USER_DISABLED ); }
-
-
-#define PATH_REPOSITORY_USER_PUBLIC_DISABLED "/repository/user/main/public/disabled"
-LIB_EXPORT rc_t CC KConfig_Get_User_Public_Enabled( const KConfig *self, bool * enabled )
-{   return KConfig_Get_Repository_State( self, enabled, true, true, PATH_REPOSITORY_USER_PUBLIC_DISABLED ); }
-LIB_EXPORT rc_t CC KConfig_Set_User_Public_Enabled( KConfig *self, bool enabled )
-{   return KConfig_Set_Repository_State( self, enabled, true, PATH_REPOSITORY_USER_PUBLIC_DISABLED ); }
-
-#define PATH_REPOSITORY_USER_PUBLIC_CACHE_ENABLED "/repository/user/main/public/cache-enabled"
-LIB_EXPORT rc_t CC KConfig_Get_User_Public_Cached( const KConfig *self, bool * enabled )
-{   return KConfig_Get_Repository_State( self, enabled, false, false, PATH_REPOSITORY_USER_PUBLIC_CACHE_ENABLED ); }
-LIB_EXPORT rc_t CC KConfig_Set_User_Public_Cached( KConfig *self, bool enabled )
-{   return KConfig_Set_Repository_State( self, enabled, false, PATH_REPOSITORY_USER_PUBLIC_CACHE_ENABLED ); }
-
-#define PATH_REPOSITORY_USER_PROTECTED_CACHE_ENABLED "/repository/user/protected/%s/cache-enabled"
-LIB_EXPORT rc_t CC KConfig_Get_User_Protected_Cached( const KConfig *self, bool * enabled, const char * name )
-{   return KConfig_Get_Repository_State( self, enabled, false, false, PATH_REPOSITORY_USER_PROTECTED_CACHE_ENABLED, name ); }
-LIB_EXPORT rc_t CC KConfig_Set_User_Protected_Cached( KConfig *self, bool enabled, const char * name )
-{   return KConfig_Set_Repository_State( self, enabled, false, PATH_REPOSITORY_USER_PROTECTED_CACHE_ENABLED, name ); }
-
-#define PATH_REPOSITORY_USER_PUBLIC_CACHE_LOCATION "/repository/user/main/public/root"
-LIB_EXPORT rc_t CC KConfig_Get_User_Public_Cache_Location( const KConfig *self,
-    char * value, size_t value_size, size_t * written )
-{   return KConfig_Get_Repository_String( self, value, value_size, written, PATH_REPOSITORY_USER_PUBLIC_CACHE_LOCATION ); }
-LIB_EXPORT rc_t CC KConfig_Set_User_Public_Cache_Location( KConfig *self, const char * value )
-{   return KConfig_Set_Repository_String( self, value, PATH_REPOSITORY_USER_PUBLIC_CACHE_LOCATION ); }
-
-/* ---------------------------------------------------------------------------------------------------- */
-
-LIB_EXPORT rc_t CC KConfigGetProtectedRepositoryCount( const KConfig *self, uint32_t * count )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-    else if ( count == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        const struct KConfigNode * node;
-        rc = KConfigOpenNodeRead ( self, &node, "/repository/user/protected" );
-        if ( rc == 0 )
-        {
-            struct KNamelist * names;
-            rc = KConfigNodeListChildren ( node, &names );
-            if ( rc == 0 )
-            {
-                rc = KNamelistCount ( names, count );
-                KNamelistRelease ( names );
-            }
-            KConfigNodeRelease ( node );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KConfigGetProtectedRepositoryName( const KConfig *self,
-    uint32_t id, char * buffer, size_t buffer_size, size_t * written )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-    else if ( buffer == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        const struct KConfigNode * node;
-        rc = KConfigOpenNodeRead ( self, &node, "/repository/user/protected" );
-        if ( rc == 0 )
-        {
-            struct KNamelist * names;
-            rc = KConfigNodeListChildren ( node, &names );
-            if ( rc == 0 )
-            {
-                const char * name;
-                rc = KNamelistGet ( names, id, &name );
-                if ( rc == 0 )
-                    rc = string_printf( buffer, buffer_size, written, "%s", name );
-                KNamelistRelease ( names );
-            }
-            KConfigNodeRelease ( node );
-        }
-    }
-    return rc;
-}
-
-
-static rc_t get_root_dir_of_repository( const struct KConfigNode * node,
-    const char * name, char * buffer, size_t buffer_size, size_t * written )
-{
-    const struct KConfigNode * sub_node;
-    rc_t rc = KConfigNodeOpenNodeRead ( node, &sub_node, "%s/root", name );
-    if ( rc == 0 )
-    {
-        struct String * S;
-        rc = KConfigNodeReadString ( sub_node, &S );
-        if ( rc == 0 )
-        {
-            rc = string_printf( buffer, buffer_size, written, "%S", S );
-            StringWhack ( S );
-        }
-        KConfigNodeRelease ( sub_node );
-    }
-    return rc;
-}
-
-
-static rc_t get_description_of_repository( const struct KConfigNode * node,
-    const char * name, char * buffer, size_t buffer_size, size_t * written )
-{
-    const struct KConfigNode * sub_node;
-    rc_t rc = KConfigNodeOpenNodeRead (node, &sub_node, "%s/description", name);
-    if ( rc == 0 )
-    {
-        struct String * S;
-        rc = KConfigNodeReadString ( sub_node, &S );
-        if ( rc == 0 )
-        {
-            rc = string_printf( buffer, buffer_size, written, "%S", S );
-            StringWhack ( S );
-        }
-        KConfigNodeRelease ( sub_node );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KConfigGetProtectedRepositoryPathById( const KConfig *self,
-    uint32_t id, char * buffer, size_t buffer_size, size_t * written )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-    else if ( buffer == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        const struct KConfigNode * node;
-        rc = KConfigOpenNodeRead ( self, &node, "/repository/user/protected" );
-        if ( rc == 0 )
-        {
-            struct KNamelist * names;
-            rc = KConfigNodeListChildren ( node, &names );
-            if ( rc == 0 )
-            {
-                const char * name;
-                rc = KNamelistGet ( names, id, &name );
-                if ( rc == 0 )
-                    rc = get_root_dir_of_repository( node, name, buffer, buffer_size, written );
-                KNamelistRelease ( names );
-            }
-            KConfigNodeRelease ( node );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KConfigSetProtectedRepositoryPathById( KConfig *self, uint32_t id, const char * value )
-{
-    char repo_name[ 1024 ];
-    size_t written;
-    rc_t rc = KConfigGetProtectedRepositoryName( self, id, repo_name, sizeof repo_name, &written );
-    if ( rc == 0 )
-        rc = KConfig_Set_Repository_String( self, value, "/repository/user/protected/%s/root", repo_name );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KConfigGetProtectedRepositoryIdByName
-    (const KConfig *self, const char *name, uint32_t *id)
-{
-    if (self == NULL)
-        return RC(rcKFG, rcNode, rcReading, rcSelf, rcNull);
-    else if (name == NULL || id == NULL)
-        return RC(rcKFG, rcNode, rcReading, rcParam, rcNull);
-    else {
-        const struct KConfigNode *node = NULL;
-        rc_t rc
-            = KConfigOpenNodeRead(self, &node, "/repository/user/protected");
-        if (rc == 0) {
-            struct KNamelist *names = NULL;
-            rc = KConfigNodeListChildren(node, &names);
-            if (rc == 0) {
-                uint32_t count = 0;
-                rc = KNamelistCount(names, &count);
-                if (rc == 0) {
-                    if (count == 0)
-                        rc = RC(rcKFG, rcNode, rcReading, rcName, rcNotFound);
-                    else {        /* loop through the names to find the one */
-                        uint32_t i = 0; /* which matches the name parameter */
-                        bool found = false;
-                        size_t name_size = string_size(name);
-                        for (i = 0; i < count && rc == 0; ++i) {
-                            const char *s = NULL;
-                            rc = KNamelistGet(names, i, &s);
-                            if ( rc == 0 && s != NULL ) {
-                                size_t s_size = string_size(s);
-                                if (name_size == s_size) {
-                                    int cmp = string_cmp(name, name_size,
-                                        s, s_size, (uint32_t)s_size);
-                                    found = (cmp == 0);
-                                    if (found) {
-                                        *id = i;
-                                        break;
-                                    }
-                                }
-                            }
-                        }
-                        if (rc == 0 && !found) {
-                            rc = RC
-                                (rcKFG, rcNode, rcReading, rcName, rcNotFound);
-                        }
-                    }
-                }
-                KNamelistRelease(names);
-            }
-            KConfigNodeRelease(node);
-        }
-        return rc;
-    }
-}
-
-LIB_EXPORT rc_t CC KConfigGetProtectedRepositoryPathByName( const KConfig *self,
-    const char * name, char * buffer, size_t buffer_size, size_t * written )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-    else if ( buffer == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        const struct KConfigNode * node;
-        rc = KConfigOpenNodeRead ( self, &node, "/repository/user/protected" );
-        if ( rc == 0 )
-        {
-            struct KNamelist * names;
-            rc = KConfigNodeListChildren ( node, &names );
-            if ( rc == 0 )
-            {
-                uint32_t count;
-                rc = KNamelistCount ( names, &count );
-                if ( rc == 0 )
-                {
-                    if ( count == 0 )
-                        rc = RC ( rcKFG, rcNode, rcReading, rcName, rcNotFound );
-                    else
-                    {
-                        /* loop through the names to find the one which matches the name parameter */
-                        uint32_t i;
-                        bool found = false;
-                        size_t name_size = string_size( name );
-                        for ( i = 0; !found && i < count && rc == 0; ++i )
-                        {
-                            const char * s = NULL;
-                            rc = KNamelistGet ( names, i, &s );
-                            if ( rc == 0 && s != NULL )
-                            {
-                                size_t s_size = string_size( s );
-                                if ( name_size == s_size )
-                                {
-                                    int cmp = string_cmp ( name, name_size,
-                                        s, s_size, (uint32_t)s_size);
-                                    found = ( cmp == 0 );
-                                    if ( found )
-                                        rc = get_root_dir_of_repository( node, s, buffer, buffer_size, written );
-                                }
-                            }
-                        }
-                        if ( rc == 0 && !found )
-                            rc = RC ( rcKFG, rcNode, rcReading, rcName, rcNotFound );
-                    }
-                }
-                KNamelistRelease ( names );
-            }
-            KConfigNodeRelease ( node );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KConfigGetProtectedRepositoryDescriptionByName(
-    const KConfig *self,
-    const char * name, char * buffer, size_t buffer_size, size_t * written )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-    else if ( buffer == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        const struct KConfigNode * node;
-        rc = KConfigOpenNodeRead ( self, &node, "/repository/user/protected" );
-        if ( rc == 0 )
-        {
-            struct KNamelist * names;
-            rc = KConfigNodeListChildren ( node, &names );
-            if ( rc == 0 )
-            {
-                uint32_t count;
-                rc = KNamelistCount ( names, &count );
-                if ( rc == 0 )
-                {
-                    if ( count == 0 )
-                        rc = RC( rcKFG, rcNode, rcReading, rcName, rcNotFound );
-                    else
-                    {
-   /* loop through the names to find the one which matches the name parameter */
-                        uint32_t i;
-                        bool found = false;
-                        size_t name_size = string_size( name );
-                        for ( i = 0; !found && i < count && rc == 0; ++i )
-                        {
-                            const char * s = NULL;
-                            rc = KNamelistGet ( names, i, &s );
-                            if ( rc == 0 && s != NULL )
-                            {
-                                size_t s_size = string_size( s );
-                                if ( name_size == s_size )
-                                {
-                                    int cmp = string_cmp ( name, name_size,
-                                        s, s_size, (uint32_t)s_size);
-                                    found = ( cmp == 0 );
-                                    if ( found )
-                                        rc = get_description_of_repository(node,
-                                            s, buffer, buffer_size, written );
-                                }
-                            }
-                        }
-                        if ( rc == 0 && !found )
-                            rc = RC
-                                (rcKFG, rcNode, rcReading, rcName, rcNotFound);
-                    }
-                }
-                KNamelistRelease ( names );
-            }
-            KConfigNodeRelease ( node );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KConfigDoesProtectedRepositoryExist( const KConfig *self, const char * name, bool * res )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcSelf, rcNull );
-    else if ( res == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        const struct KConfigNode * node;
-        *res = false;
-        rc = KConfigOpenNodeRead ( self, &node, "/repository/user/protected" );
-        if ( rc == 0 )
-        {
-            struct KNamelist * names;
-            rc = KConfigNodeListChildren ( node, &names );
-            if ( rc == 0 )
-            {
-                uint32_t count;
-                rc = KNamelistCount ( names, &count );
-                if ( rc == 0 )
-                {
-                    if ( count == 0 )
-                        rc = RC ( rcKFG, rcNode, rcReading, rcName, rcNotFound );
-                    else
-                    {
-                        /* loop through the names to find the one which matches the name parameter */
-                        uint32_t i;
-                        bool found = false;
-                        size_t name_size = string_size( name );
-                        for ( i = 0; !found && i < count && rc == 0; ++i )
-                        {
-                            const char * s = NULL;
-                            rc = KNamelistGet ( names, i, &s );
-                            if ( rc == 0 && s != NULL )
-                            {
-                                size_t s_size = string_size( s );
-                                if ( name_size == s_size )
-                                {
-                                    int cmp = string_cmp ( name, name_size,
-                                        s, s_size, (uint32_t)s_size);
-                                    found = ( cmp == 0 );
-                                }
-                            }
-                        }
-                        if ( rc == 0 && found )
-                            *res = true;
-                    }
-                }
-                KNamelistRelease ( names );
-            }
-            KConfigNodeRelease ( node );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KConfigGetProtectedRepositoryEnabledById( const KConfig *self, uint32_t id, bool * enabled )
-{
-    char repo_name[ 1024 ];
-    size_t written;
-    rc_t rc = KConfigGetProtectedRepositoryName( self, id, repo_name, sizeof repo_name, &written );
-    if ( rc == 0 )
-        rc = KConfig_Get_Repository_State( self, enabled, true, true, "/repository/user/protected/%s/disabled", repo_name );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KConfigSetProtectedRepositoryEnabledById( KConfig *self, uint32_t id, bool enabled )
-{
-    char repo_name[ 1024 ];
-    size_t written;
-    rc_t rc = KConfigGetProtectedRepositoryName( self, id, repo_name, sizeof repo_name, &written );
-    if ( rc == 0 )
-        rc = KConfig_Set_Repository_State( self, enabled, true, "/repository/user/protected/%s/disabled", repo_name );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KConfigGetProtectedRepositoryCachedById( const KConfig *self, uint32_t id, bool * enabled )
-{
-    char repo_name[ 1024 ];
-    size_t written;
-    rc_t rc = KConfigGetProtectedRepositoryName( self, id, repo_name, sizeof repo_name, &written );
-    if ( rc == 0 )
-        rc = KConfig_Get_Repository_State( self, enabled, false, false, "/repository/user/protected/%s/cache-enabled", repo_name );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KConfigSetProtectedRepositoryCachedById( KConfig *self, uint32_t id, bool enabled )
-{
-    char repo_name[ 1024 ];
-    size_t written;
-    rc_t rc = KConfigGetProtectedRepositoryName( self, id, repo_name, sizeof repo_name, &written );
-    if ( rc == 0 )
-        rc = KConfig_Set_Repository_State( self, enabled, false, "/repository/user/protected/%s/cache-enabled", repo_name );
-    return rc;
-}
diff --git a/libs/kfg/report-kfg.c b/libs/kfg/report-kfg.c
deleted file mode 100644
index 8512179..0000000
--- a/libs/kfg/report-kfg.c
+++ /dev/null
@@ -1,532 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfg/extern.h>
-
-#include <kfg/config.h>
-#include <kfg/repository.h> /* KRepositoryMgr */
-#include <kfg/kfg-priv.h>
-
-#include <klib/namelist.h> /* KNamelistRelease */
-#include <klib/out.h> /* OUTMSG */
-#include <klib/klib-priv.h>
-#include <klib/rc.h>
-
-#include <kfs/directory.h>
-#include <kfs/dyload.h> /* KDyld */
-#include <kfs/file.h> /* KFileRead */
-#include <kfs/nullfile.h> /* KFileMakeNullUpdate */
-#include <kfs/md5.h> /* KMD5SumFmt */
-
-#include <sysalloc.h>
-
-#include <stdarg.h> /* va_start */
-#include <stdio.h> /* sprintf */
-#include <stdlib.h> /* malloc */
-#include <string.h> /* memset */
-#include <limits.h> /* PATH_MAX */
-#include <assert.h>
-
-#ifndef PATH_MAX
-#define PATH_MAX 4096
-#endif
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
-
-/*
- * An unrecoverable error happened.
- * We can help to solve it
- * by reporting information about known application execution environment.
- */
-
-#define report ( * f -> report )
-#define reportData ( * f -> reportData )
-#define reportData1 ( * f -> reportData1 )
-#define reportOpen ( * f -> reportOpen )
-#define reportOpen1 ( * f -> reportOpen1 )
-#define reportClose ( * f -> reportClose )
-#define reportClose1 ( * f -> reportClose1 )
-#define reportError ( * f -> reportError )
-#define reportErrorStr ( * f -> reportErrorStr )
-#define reportErrorStrImpl ( * f -> reportErrorStrImpl )
-#define reportErrorStrInt ( * f -> reportErrorStrInt )
-#define reportError3Str ( * f -> reportError3Str )
-
-static rc_t ReportKfgFiles(const ReportFuncs *f,
-    int indent, const KConfig* cfg)
-{
-    rc_t rc = 0;
-
-    uint32_t count = 0;
-    KNamelist* names = NULL;
-
-    rc = KConfigListIncluded(cfg, &names);
-
-    if (rc != 0) {
-        reportOpen(indent, "Files", 0);
-        reportError(indent + 1, rc, "KConfigListIncluded");
-    }
-    else {
-        rc = KNamelistCount(names, &count);
-        if (rc != 0) {
-            reportOpen(indent, "Files", 0);
-            reportErrorStr(indent + 1,
-                rc, "KNamelistCount", "origin", "KConfigListIncluded");
-        }
-        else {
-            uint32_t i = 0;
-            reportOpen(indent, "Files", 1, "count", 'd', count);
-            for (i = 0; i < count && rc == 0; ++i) {
-                const char* name = NULL;
-                rc = KNamelistGet(names, i, &name);
-                if (rc != 0) {
-                    reportErrorStrInt(indent + 1, rc, "KNamelistGet",
-                        "origin", "KConfigListIncluded", "idx", i);
-                }
-                else
-                {   report(indent + 1, "File", 1, "name", 's', name); }
-            }
-        }
-    }
-    reportClose(indent, "Files");
-
-    RELEASE(KNamelist, names);
-
-    return rc;
-}
-
-static
-rc_t sKConfigNode_Read(const KConfigNode* node, char* buffer, size_t buf_sz,
-    char** overflow_buf, bool* cant_allocate)
-{
-    rc_t rc = 0;
-    size_t num_read = 0;
-    size_t remaining = 0;
-    assert(overflow_buf && cant_allocate);
-    *cant_allocate = false;
-    *overflow_buf = NULL;
-    rc = KConfigNodeRead(node, 0, buffer, buf_sz, &num_read, &remaining);
-    if (rc != 0)
-    {   return rc; }
-    if (num_read < buf_sz)
-    {   buffer[num_read] = '\0'; }
-    else {
-        size_t new_buf_sz = num_read + remaining + 1;
-        char* overflow = malloc(new_buf_sz);
-        if (overflow == NULL) {
-            int i = 0;
-            for (i = 2; i < 5 && buf_sz - i > 0; ++i)
-            {   buffer[buf_sz - i] = '.'; }
-            buffer[buf_sz - 1] = '\0';
-            *cant_allocate = true;
-        }
-        else {
-            buffer = *overflow_buf = overflow;
-            buf_sz = 
-            rc = KConfigNodeRead
-                (node, 0, buffer, new_buf_sz, &num_read, &remaining);
-            if (rc != 0)
-            {   return rc; }
-            assert(num_read < new_buf_sz && remaining == 0);
-            buffer[num_read] = '\0';
-        }
-    }
-    return rc;
-}
-
-static rc_t ReportChildNode(const ReportFuncs *f, int indent,
-    const KNamelist* names, const KConfigNode* node, const char* root, uint32_t idx);
-
-static
-rc_t ReportConfigNodeChildren(const ReportFuncs *f, int indent,
-    const KConfigNode* node, const char* nodeName)
-{
-    KNamelist* names = NULL;
-    rc_t rc = KConfigNodeListChild(node, &names);
-    if (rc != 0) {
-        reportErrorStrImpl(indent,
-            rc, "KConfigNodeListChild", "node", nodeName, false);
-    }
-    else {
-        uint32_t count = 0;
-        rc = KNamelistCount(names, &count);
-        if (rc != 0) {
-            reportErrorStrImpl
-                (indent, rc, "KNamelistCount", "node", nodeName, false);
-        }
-        else {
-            if (count) {
-                uint32_t i = 0;
-                int j;
-                OUTMSG(("\n"));
-                for (i = 0; i < count && rc == 0; ++i) {
-                    rc = ReportChildNode
-                        (f, indent + 1, names, node, nodeName, i);
-                }
-                for (j = 0; j < indent; ++j)
-                {   OUTMSG((" ")); }
-            }
-        }
-    }
-    RELEASE(KNamelist, names);
-    return rc;
-}
-
-static rc_t ReportConfigNode(const ReportFuncs *f, int indent, const char* root,
-    const char* name, const KConfigNode* node, const char* node_name)
-{
-    rc_t rc = 0;
-
-    char local[PATH_MAX + 1] = "";
-    const char* nodeName = node_name ? node_name : name;
-    char* overflow = NULL;
-    bool cantallocate = false;
-
-    reportOpen1(indent, nodeName);
-    rc = sKConfigNode_Read(node, local, sizeof local, &overflow, &cantallocate);
-    if (rc == 0) {
-        char* buf = overflow ? overflow : local;
-        rc = reportData1(buf);
-        free(overflow);
-        overflow = NULL;
-        if (rc == 0)
-        {   rc = ReportConfigNodeChildren(f, indent, node, nodeName); }
-    }
-    else {
-        reportError3Str
-            (indent + 1, rc, "KConfigNodeRead", "node", root, "/", name, false);
-    }
-    reportClose1(nodeName);
-
-    return rc;
-}
-
-static rc_t ReportConfigNode_File(const ReportFuncs *f, int indent,
-    const char* root,
-    const char* name, const KConfigNode* node, const char* node_name)
-{
-    rc_t rc = 0;
-    char local[PATH_MAX + 1] = "";
-    const char* nodeName = node_name ? node_name : name;
-    char* overflow = NULL;
-    bool cantallocate = false;
-    rc = sKConfigNode_Read(node, local, sizeof local, &overflow, &cantallocate);
-    if (rc) {
-        reportError3Str
-            (indent, rc, "KConfigNodeRead", "node", root, "/", name, false);
-    }
-    else {
-        const char* buf = overflow ? overflow : local;
-        KPathType file_type = kptNotFound;
-        const char* type = NULL;
-        if (!cantallocate) {
-            KDirectory* dir = NULL;
-            rc = KDirectoryNativeDir(&dir);
-            if (rc == 0) {
-                file_type = KDirectoryPathType(dir, "%s", buf);
-                file_type &= ~kptAlias;
-                type = file_type == kptFile ? "exists" :
-                          file_type == kptNotFound ? "not found" : "unexpected";
-            }
-            RELEASE(KDirectory, dir);
-        }
-        else
-        {   type = "noo long"; }
-        if (rc == 0)
-        {   reportData(indent, nodeName, buf, 1, "file", 's', type); }
-    }
-    free(overflow);
-    overflow = NULL;
-    return rc;
-}
-
-static rc_t ReportChildNode(const ReportFuncs *f, int indent,
-    const KNamelist* names,
-    const KConfigNode* node, const char* root, uint32_t idx)
-{
-    rc_t rc = 0;
-
-    const char* name = NULL;
-    rc = KNamelistGet(names, idx, &name);
-    if (rc != 0) {
-        reportErrorStrInt
-            (indent + 1, rc, "KNamelistGet", "node", root, "idx", idx);
-    }
-    else {
-        const KConfigNode* child = NULL;
-
-        rc = KConfigNodeOpenNodeRead(node, &child, "%s", name);
-        if (rc != 0) {
-            reportOpen(indent, name, 0);
-            reportError3Str(indent + 1, rc, "KConfigNodeOpenNodeRead",
-                "node", root, "/", name, true);
-            reportClose(indent, name);
-        }
-        else {
-            rc = ReportConfigNode(f, indent, root, name, child, NULL);
-        }
-
-        RELEASE(KConfigNode, child);
-    }
-
-    return rc;
-}
-
-static
-rc_t ReportRefseq(const ReportFuncs *f, int indent, const KConfig* cfg)
-{
-    rc_t rc = 0;
-
-    const char root[] = "refseq";
-
-    const KConfigNode* node = NULL;
-    rc = KConfigOpenNodeRead(cfg, &node, "%s", root);
-    if (rc != 0) {
-        if (GetRCState(rc) == rcNotFound) {
-            report(indent, root, 1, "state", 's', "not found");
-            rc = 0;
-        }
-        else
-        {   reportErrorStr(indent, rc, "KConfigOpenNodeRead", "node", root); }
-    }
-    else {
-        KNamelist* names = NULL;
-        rc = KConfigNodeListChild(node, &names);
-        if (rc != 0)
-        {   reportErrorStr(indent, rc, "KConfigNodeListChild", "node", root); }
-        else {
-            uint32_t count = 0;
-            rc = KNamelistCount(names, &count);
-            if (rc != 0)
-            {   reportErrorStr(indent, rc, "KNamelistCount", "node", root); }
-            else {
-                uint32_t i = 0;
-                reportOpen(indent, root, 0);
-                for (i = 0; i < count && rc == 0; ++i)
-                {   rc = ReportChildNode(f, indent + 1, names, node, root, i); }
-                reportClose(indent, root);
-            }
-        }
-        RELEASE(KNamelist, names);
-    }
-
-    RELEASE(KConfigNode, node);
-
-    return rc;
-}
-
-static
-rc_t ReportSra(const ReportFuncs *f, int indent, const KConfig* cfg)
-{
-    rc_t rc = 0;
-    const char root[] = "sra";
-    const KConfigNode* node = NULL;
-    assert(cfg);
-    rc = KConfigOpenNodeRead(cfg, &node, "%s", root);
-    if (rc != 0) {
-        if (GetRCState(rc) == rcNotFound) {
-            report(indent, root, 1, "state", 's', "not found");
-            rc = 0;
-        }
-        else
-        {   reportErrorStr(indent, rc, "KConfigOpenNodeRead", "node", root); }
-    }
-    else {
-        KNamelist* names = NULL;
-        rc = KConfigNodeListChild(node, &names);
-        if (rc != 0)
-        {   reportErrorStr(indent, rc, "KConfigNodeListChild", "node", root); }
-        else {
-            uint32_t count = 0;
-            rc = KNamelistCount(names, &count);
-            if (rc != 0)
-            {   reportErrorStr(indent, rc, "KNamelistCount", "node", root); }
-            else {
-                uint32_t i = 0;
-                reportOpen(indent, root, 0);
-                for (i = 0; i < count && rc == 0; ++i)
-                {   rc = ReportChildNode(f, indent + 1, names, node, root, i); }
-                reportClose(indent, root);
-            }
-        }
-        RELEASE(KNamelist, names);
-    }
-    RELEASE(KConfigNode, node);
-    return rc;
-}
-
-static
-rc_t ReportKrypto(const ReportFuncs *f, int indent, const KConfig* cfg)
-{
-    rc_t rc = 0;
-
-    const char root[] = KFG_KRYPTO_PWFILE;
-    const char name[] = "krypto";
-
-    const KConfigNode* node = NULL;
-    rc = KConfigOpenNodeRead(cfg, &node, "%s", root);
-    if (rc != 0) {
-        if (GetRCState(rc) == rcNotFound) {
-            report(indent, name, 1, "state", 's', "pwfile: not found");
-            rc = 0;
-        }
-        else
-        {   reportErrorStr(indent, rc, "KConfigOpenNodeRead", "node", root); }
-    }
-    else {
-        rc = ReportConfigNode_File(f, indent, "krypto", "pwfile", node, "krypto");
-    }
-
-    RELEASE(KConfigNode, node);
-
-    return rc;
-}
-
-static rc_t ReportRemoteAccess(const ReportFuncs *f,
-    int indent, const KRepositoryMgr *mgr)
-{
-    const char root[] = "RemoteAccess";
-
-    bool available = KRepositoryMgrHasRemoteAccess(mgr);
-    report(indent, root, 1, "available", 's', available ? "true" : "false");
-
-    return 0;
-}
-
-static rc_t ReportCrntRepository(const ReportFuncs *f,
-    int indent, const KRepositoryMgr *mgr)
-{
-    rc_t rc = 0;
-
-    const KRepository *protectd = NULL;
-
-    const char root[] = "CurrentProtectedRepository";
-    bool open = false;
-
-    if (rc == 0) {
-        rc = KRepositoryMgrCurrentProtectedRepository(mgr, &protectd);
-        if (rc != 0) {
-            if (rc == SILENT_RC(
-                rcKFG, rcMgr, rcAccessing, rcNode, rcNotFound))
-            {
-                report(indent, root, 1, "found", 's', "false");
-            }
-            else {
-                reportOpen(indent, root, 0);
-                open = true;
-                reportErrorStr(indent + 1, rc,
-                    "KRepositoryMgrCurrentProtectedRepository", NULL, NULL);
-            }
-        }
-    }
-    if (rc == 0) {
-        char buffer[256];
-        size_t name_size = 0;
-        reportOpen(indent, root, 1, "found", 's', "true");
-        open = true;
-        rc = KRepositoryName(protectd, buffer, sizeof buffer, &name_size);
-        if (rc != 0) {
-            reportErrorStr(indent + 1, rc, "KRepositoryName",
-                "origin", "KRepositoryMgrCurrentProtectedRepository");
-        }
-        else {
-            reportData(indent + 1, "name", buffer, 0);
-        }
-    }
-    if (open) {
-        reportClose(indent, root);
-    }
-
-    RELEASE(KRepository, protectd);
-
-    return rc;
-}
-
-rc_t ReportKfg
-    ( const ReportFuncs *f, uint32_t indent, uint32_t skipCount, va_list args )
-{
-    rc_t rc = 0;
-
-    KConfig *cfg = NULL;
-    const KRepositoryMgr *mgr = NULL;
-
-    const char tag[] = "Configuration";
-
-    reportOpen(indent, tag, 0);
-
-    rc = KConfigMake(&cfg, NULL);
-    if (rc != 0) {
-        reportError(indent + 1, rc, "KConfigMake");
-    }
-    else if ((rc = KConfigMakeRepositoryMgrRead(cfg, &mgr)) != 0) {
-        reportError(indent + 1, rc, "KConfigMakeRepositoryMgrRead");
-    }
-    else {
-        {
-            rc_t rc2 = ReportKfgFiles(f, indent + 1, cfg);
-            if (rc == 0 && rc2 != 0)
-            {   rc = rc2; }
-        }
-        {
-            rc_t rc2 = ReportRefseq(f, indent + 1, cfg);
-            if (rc == 0 && rc2 != 0)
-            {   rc = rc2; }
-        }
-        {
-            rc_t rc2 = ReportKrypto(f, indent + 1, cfg);
-            if (rc == 0 && rc2 != 0)
-            {   rc = rc2; }
-        }
-        {
-            rc_t rc2 = ReportSra(f, indent + 1, cfg);
-            if (rc == 0 && rc2 != 0)
-            {   rc = rc2; }
-        }
-        {
-            rc_t rc2 = KConfigPrintPartial(cfg, indent, skipCount, args);
-            if (rc == 0 && rc2 != 0)
-            {   rc = rc2; }
-        }
-        {
-            rc_t rc2 = ReportRemoteAccess(f, indent + 1, mgr);
-            if (rc == 0 && rc2 != 0)
-            {   rc = rc2; }
-        }
-        {
-            rc_t rc2 = ReportCrntRepository(f, indent + 1, mgr);
-            if (rc == 0 && rc2 != 0)
-            {   rc = rc2; }
-        }
-    }
-
-    reportClose(indent, tag);
-
-    RELEASE(KRepositoryMgr, mgr);
-    RELEASE(KConfig, cfg);
-
-    return rc;
-}
diff --git a/libs/kfg/repository.c b/libs/kfg/repository.c
deleted file mode 100644
index 3f7ade6..0000000
--- a/libs/kfg/repository.c
+++ /dev/null
@@ -1,1972 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <kfg/extern.h>
-
-#include <kfg/repository.h>
-#include <kfg/config.h>
-#include <kfg/ngc.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-#include <kfs/impl.h>
-#include <klib/refcount.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/vector.h>
-#include <klib/namelist.h>
-#include <klib/rc.h>
-
-#include "ngc-priv.h"
-
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <ctype.h> /* isdigit */
-#include <os-native.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <limits.h> /* PATH_MAX */
-#ifndef PATH_MAX
-#define PATH_MAX 4096
-#endif
-
-/*--------------------------------------------------------------------------
- * KRepository
- *  presents structured access to a storage repository
- *  as modeled in KConfig.
- *
- *  all objects are obtained via KRepositoryMgr ( see below )
- */
-struct KRepository
-{
-    const KConfigNode *node;
-    String name;
-    KRefcount refcount;
-    KRepCategory category;
-    KRepSubCategory subcategory;
-};
-
-
-/* Whack
- */
-static
-rc_t KRepositoryWhack ( KRepository *self )
-{
-    KConfigNodeRelease ( self -> node );
-    free ( self );
-    return 0;
-}
-
-/* Sort
- */
-static
-int64_t CC KRepositorySort ( const void **a, const void **b, void *ignore )
-{
-    const KRepository *left = * a;
-    const KRepository *right = * b;
-
-    if ( left -> category != right -> category )
-        return (int64_t)left -> category - (int64_t)right -> category;
-
-    if ( left -> subcategory != right -> subcategory )
-        return (int64_t)left -> subcategory - (int64_t)right -> subcategory;
-
-    return StringCompare ( & left -> name, & right -> name );
-}
-
-/* Make
- */
-static
-rc_t KRepositoryMake ( KRepository **rp, const KConfigNode *node,
-    const char *name, KRepCategory category, KRepSubCategory subcategory )
-{
-    rc_t rc;
-    KRepository *r;
-    String name_str;
-
-    /* measure string */
-    StringInitCString ( & name_str, name );
-
-    /* create object */
-    r = malloc ( sizeof * r + name_str . size + 1 );
-    if ( r == NULL )
-        return RC ( rcKFG, rcNode, rcConstructing, rcMemory, rcExhausted );
-
-    rc = KConfigNodeAddRef ( node );
-    if ( rc != 0 )
-    {
-        free ( r );
-        return rc;
-    }
-
-    r -> node = node;
-    r -> name = name_str;
-    r -> name . addr = ( char* ) ( r + 1 );
-    KRefcountInit ( & r -> refcount, 1, "KRepository", "make", name );
-    r -> category = category;
-    r -> subcategory = subcategory;
-    memcpy ( r + 1, name, name_str . size );
-    ( ( char* ) ( r + 1 ) ) [ name_str . size ] = 0;
-
-    * rp = r;
-
-    return 0;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KRepositoryAddRef ( const KRepository *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KRepository" ) )
-        {
-        case krefLimit:
-            return RC ( rcKFG, rcNode, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KRepositoryRelease ( const KRepository *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KRepository" ) )
-        {
-        case krefWhack:
-            return KRepositoryWhack ( ( KRepository* ) self );
-        case krefNegative:
-            return RC ( rcKFG, rcNode, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* WhackEntry
- *  for cleaning up these vectors
- */
-static
-void CC KRepositoryWhackEntry ( void *item, void *ignore )
-{
-    KRepository *self = item;
-    KRepositoryRelease ( self );
-}
-
-
-/* Category
- * SubCategory
- *  tells what the repository category or sub-category are
- *  or returns "bad" if the repository object is not usable.
- */
-LIB_EXPORT KRepCategory CC KRepositoryCategory ( const KRepository *self )
-{
-    if ( self != NULL )
-        return self -> category;
-    return krepBadCategory;
-}
-
-LIB_EXPORT KRepSubCategory CC KRepositorySubCategory ( const KRepository *self )
-{
-    if ( self != NULL )
-        return self -> subcategory;
-    return krepBadSubCategory;
-}
-
-
-/* Name
- *  get the repository name
- *  attempts to copy NUL-terminated name into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - name output parameter
- *
- *  "name_size" [ OUT, NULL OKAY ] - returns the name size in
- *  bytes, excluding any NUL termination.
- */
-LIB_EXPORT rc_t CC KRepositoryName ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *name_size )
-{
-    if ( self == NULL )
-        return RC ( rcKFG, rcNode, rcAccessing, rcSelf, rcNull );
-
-    if ( name_size != NULL )
-        * name_size = self -> name . size;
-
-    if ( bsize < self -> name . size )
-        return RC ( rcKFG, rcNode, rcAccessing, rcBuffer, rcInsufficient );
-
-    if ( buffer == NULL )
-        return RC ( rcKFG, rcNode, rcAccessing, rcBuffer, rcNull );
-
-    memcpy ( buffer, self -> name . addr, self -> name . size );
-
-    if ( bsize > self -> name . size )
-        buffer [ self -> name . size ] = 0;
-
-    return 0;
-}
-
-
-/* DisplayName
- *  get the repository display name,
- *  if different from its actual name
- *
- *  attempts to copy NUL-terminated name into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - name output parameter
- *
- *  "name_size" [ OUT, NULL OKAY ] - returns the name size in
- *  bytes, excluding any NUL termination.
- */
-LIB_EXPORT rc_t CC KRepositoryDisplayName ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *name_size )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        const KConfigNode *node;
-
-        if ( name_size != NULL )
-            * name_size = 0;
-
-        rc = KConfigNodeOpenNodeRead ( self -> node, & node, "display-name" );
-        if ( rc != 0 )
-            rc = KRepositoryName ( self, buffer, bsize, name_size );
-        else
-        {
-            size_t num_read, remaining;
-            rc = KConfigNodeRead ( node, 0, buffer, bsize, & num_read, & remaining );
-            KConfigNodeRelease ( node );
-
-            if ( rc == 0 )
-            {
-                if ( name_size != NULL )
-                    * name_size = num_read + remaining;
-
-                if ( remaining != 0 )
-                    rc = RC ( rcKFG, rcNode, rcAccessing, rcBuffer, rcInsufficient );
-                else if ( num_read < bsize )
-                    buffer [ num_read ] = 0;
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/* Root
- *  read the root path as a POSIX path or URL
- *
- *  attempts to copy NUL-terminated path into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - path output parameter
- *
- *  "root_size" [ OUT, NULL OKAY ] - returns the path size in
- *  bytes, excluding any NUL termination.
- */
-LIB_EXPORT rc_t CC KRepositoryRoot ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *root_size )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        const KConfigNode *node;
-
-        if ( root_size != NULL )
-            * root_size = 0;
-
-        rc = KConfigNodeOpenNodeRead ( self -> node, & node, "root" );
-        if ( rc == 0 )
-        {
-            size_t num_read, remaining;
-            rc = KConfigNodeRead ( node, 0, buffer, bsize, & num_read, & remaining );
-            KConfigNodeRelease ( node );
-
-            if ( rc == 0 )
-            {
-                if ( root_size != NULL )
-                    * root_size = num_read + remaining;
-
-                if ( remaining != 0 )
-                    rc = RC ( rcKFG, rcNode, rcAccessing, rcBuffer, rcInsufficient );
-                else if ( num_read < bsize )
-                    buffer [ num_read ] = 0;
-            }
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KRepositorySetRoot(KRepository *self,
-    const char *root, size_t root_size)
-{
-    rc_t rc = 0;
-
-    if (self == NULL) {
-        return RC(rcKFG, rcNode, rcUpdating, rcSelf, rcNull);
-    }
-    else if (root == NULL) {
-        return RC(rcKFG, rcNode, rcUpdating, rcParam, rcNull);
-    }
-    else {
-        KConfigNode *self_node = (KConfigNode*)self->node;
-        KConfigNode *node = NULL;
-
-        rc = KConfigNodeOpenNodeUpdate(self_node, &node, "root");
-        if (rc == 0) {
-            rc = KConfigNodeWrite(node, root, root_size);
-            KConfigNodeRelease(node);
-        }
-    }
-
-    return rc;
-}
-
-
-const char root_history_key[] = "root/history";
-
-/* RootHistory
- *  read the root-history as a semicolon separated list of POSIX paths
- *
- *  attempts to copy NUL-terminated path into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - path output parameter
- *
- *  "roothistory_size" [ OUT, NULL OKAY ] - returns the root-history
- *  size in bytes, excluding any NUL termination.
- */
-LIB_EXPORT rc_t CC KRepositoryRootHistory ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *roothistory_size )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        const KConfigNode *node;
-
-        if ( roothistory_size != NULL )
-            * roothistory_size = 0;
-
-        rc = KConfigNodeOpenNodeRead ( self -> node, & node, root_history_key );
-        if ( rc == 0 )
-        {
-            size_t num_read, remaining;
-            rc = KConfigNodeRead ( node, 0, buffer, bsize, & num_read, & remaining );
-            KConfigNodeRelease ( node );
-
-            if ( rc == 0 )
-            {
-                if ( roothistory_size != NULL )
-                    * roothistory_size = num_read + remaining;
-
-                if ( remaining != 0 )
-                    rc = RC ( rcKFG, rcNode, rcAccessing, rcBuffer, rcInsufficient );
-                else if ( num_read < bsize )
-                    buffer [ num_read ] = 0;
-            }
-        }
-    }
-
-    return rc;
-
-}
-
-
-/* SetRootHistory
- *  set the root-history list of paths
- *
- *  "roothistory" [ IN ] and "roothistory_size" [ IN ] - path input parameter
- */
-LIB_EXPORT rc_t CC KRepositorySetRootHistory( KRepository *self,
-    const char *roothistory, size_t roothistory_size )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        return RC(rcKFG, rcNode, rcUpdating, rcSelf, rcNull);
-    else if ( roothistory == NULL )
-        return RC(rcKFG, rcNode, rcUpdating, rcParam, rcNull);
-    else
-    {
-        KConfigNode *self_node = ( KConfigNode* )self->node;
-        KConfigNode *node = NULL;
-
-        rc = KConfigNodeOpenNodeUpdate( self_node, &node, root_history_key );
-        if ( rc == 0 )
-        {
-            rc = KConfigNodeWrite( node, roothistory, roothistory_size );
-            KConfigNodeRelease( node );
-        }
-    }
-    return rc;
-}
-
-
-static rc_t append_to_root_history( KRepository *self, const char *item )
-{
-    size_t required;
-    rc_t rc = KRepositoryRootHistory( self, NULL, 0, &required );
-    if ( GetRCState( rc ) == rcNotFound && GetRCObject( rc ) == ( enum RCObject ) rcPath )
-    {
-        /* we do not have a root-history yet */
-        rc = KRepositorySetRootHistory( self, item, string_size( item ) );
-    }
-    else if ( GetRCState( rc ) == rcInsufficient && GetRCObject( rc ) == ( enum RCObject ) rcBuffer )
-    {
-        /* we expect the buffer to be insufficient, because we tested for size by giving a NULL as buffer */
-        char * temp = malloc( required + 1 );
-        if ( temp == NULL )
-            rc = RC( rcKFG, rcNode, rcUpdating, rcMemory, rcExhausted );
-        else
-        {
-            rc = KRepositoryRootHistory( self, temp, required, NULL );
-            if ( rc == 0 )
-            {
-                VNamelist * list;
-                temp[ required ] = 0;
-                rc = VNamelistFromStr ( &list, temp, ':' );
-                if ( rc == 0 )
-                {
-                    int32_t idx;
-                    rc = VNamelistContainsStr( list, item, &idx );
-                    if ( rc == 0 && idx < 0 )
-                    {
-                        rc = VNamelistAppend ( list, item );
-                        if ( rc == 0 )
-                        {
-                            const String * new_value;
-                            rc = VNamelistJoin( list, ':', &new_value );
-                            if ( rc == 0 )
-                            {
-                                rc = KRepositorySetRootHistory( self, new_value -> addr, new_value -> size );
-                                StringWhack( new_value );
-                            }
-                        }
-                    }
-                    VNamelistRelease ( list );
-                }
-            }
-            free( temp );
-        }
-    }
-    return rc;
-}
-
-
-/* AppendToRootHistory
- *  append to the root-history
- *
- *  "roothistory" [ IN ] and "roothistory_size" [ IN ] - path input parameter
- *  if item == NULL, add the current root to the root-history 
- */
-LIB_EXPORT rc_t CC KRepositoryAppendToRootHistory( KRepository *self, const char *item )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        return RC( rcKFG, rcNode, rcUpdating, rcSelf, rcNull );
-    else if ( item == NULL )
-    {
-        size_t curr_root_size;
-        rc = KRepositoryRoot( self, NULL, 0, &curr_root_size );
-        if ( GetRCState( rc ) == rcInsufficient && GetRCObject( rc ) == ( enum RCObject ) rcBuffer )
-        {
-            char * root = malloc( curr_root_size + 1 );
-            if ( root == NULL )
-                rc = RC( rcKFG, rcNode, rcUpdating, rcMemory, rcExhausted );
-            else
-            {
-                rc = KRepositoryRoot( self, root, curr_root_size, NULL );
-                if ( rc == 0 )
-                {
-                    root[ curr_root_size ] = 0;
-                    rc = append_to_root_history( self, root );
-                }
-                free( root );
-            }
-        }
-    }
-    else
-        rc = append_to_root_history( self, item );
-    return rc;
-}
-
-    
-/* Resolver
- *  read the url of the CGI-resolver
- *
- *  attempts to copy NUL-terminated path into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - path output parameter
- *
- *  "written" [ OUT, NULL OKAY ] - returns the url size in
- *  bytes, excluding any NUL termination.
- */
-LIB_EXPORT rc_t CC KRepositoryResolver ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *written )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        const KConfigNode *node;
-
-        if ( written != NULL )
-            * written = 0;
-
-        rc = KConfigNodeOpenNodeRead ( self -> node, & node, "resolver-cgi" );
-        if ( rc == 0 )
-        {
-            size_t num_read, remaining;
-            rc = KConfigNodeRead ( node, 0, buffer, bsize, & num_read, & remaining );
-            KConfigNodeRelease ( node );
-
-            if ( rc == 0 )
-            {
-                if ( written != NULL )
-                    * written = num_read + remaining;
-
-                if ( remaining != 0 )
-                    rc = RC ( rcKFG, rcNode, rcAccessing, rcBuffer, rcInsufficient );
-                else if ( num_read < bsize )
-                    buffer [ num_read ] = 0;
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/* Disabled
- *  discover whether the repository is enabled
- */
-LIB_EXPORT bool CC KRepositoryDisabled ( const KRepository *self )
-{
-    if ( self != NULL )
-    {
-        const KConfigNode *node;
-        rc_t rc = KConfigNodeOpenNodeRead ( self -> node, & node, "disabled" );
-        if ( rc == 0 )
-        {
-            bool disabled = false;
-            rc = KConfigNodeReadBool ( node, & disabled );
-            KConfigNodeRelease ( node );
-            if ( rc == 0 )
-                return disabled;
-        }
-    }
-
-    return false;
-}
-
-
-static const char * STR_TRUE  = "true";
-static const char * STR_FALSE = "false";
-
-LIB_EXPORT rc_t CC KRepositorySetDisabled ( const KRepository *self, bool disabled )
-{
-    rc_t rc = RC ( rcKFG, rcNode, rcAccessing, rcSelf, rcNull );
-    if ( self != NULL )
-    {
-        KConfigNode * self_node = ( KConfigNode * )self->node;  /* casting away const-ness */
-        KConfigNode * node;
-        rc = KConfigNodeOpenNodeUpdate ( self_node, &node, "disabled" );
-        if ( rc == 0 )
-        {
-            const char * value = disabled ? STR_TRUE : STR_FALSE;
-            rc = KConfigNodeWrite ( node, value, string_size( value ) );
-            if ( rc == 0 )
-            {
-                KConfig * cfg;
-                rc = KConfigNodeGetMgr( self->node, &cfg );
-                if ( rc == 0 )
-                {
-                    rc = KConfigCommit ( cfg );
-                    KConfigRelease ( cfg );
-                }
-            }
-            KConfigNodeRelease ( node );
-        }
-    }
-    return rc;
-}
-
-
-/* CacheEnabled
- *  discover whether the repository supports caching
- */
-LIB_EXPORT bool CC KRepositoryCacheEnabled ( const KRepository *self )
-{
-    if ( self != NULL )
-    {
-        const KConfigNode *node;
-        rc_t rc = KConfigNodeOpenNodeRead ( self -> node, & node, "cache-enabled" );
-        if ( rc == 0 )
-        {
-            bool enabled = false;
-            rc = KConfigNodeReadBool ( node, & enabled );
-            KConfigNodeRelease ( node );
-            if ( rc == 0 )
-                return enabled;
-        }
-    }
-
-    return false;
-}
-
-
-/* DownloadTicket
- *  return any associated download ticket
- *
- *  attempts to copy NUL-terminated ticket into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - ticket output parameter
- *
- *  "ticket_size" [ OUT, NULL OKAY ] - returns the ticket size in
- *  bytes, excluding any NUL termination.
- */
-LIB_EXPORT rc_t CC KRepositoryDownloadTicket ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *ticket_size )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        const KConfigNode *node;
-
-        if ( ticket_size != NULL )
-            * ticket_size = 0;
-
-        rc = KConfigNodeOpenNodeRead ( self -> node, & node, "download-ticket" );
-        if ( rc == 0 )
-        {
-            size_t num_read, remaining;
-            rc = KConfigNodeRead ( node, 0, buffer, bsize, & num_read, & remaining );
-            KConfigNodeRelease ( node );
-
-            if ( rc == 0 )
-            {
-                if ( ticket_size != NULL )
-                    * ticket_size = num_read + remaining;
-
-                if ( remaining != 0 )
-                    rc = RC ( rcKFG, rcNode, rcAccessing, rcBuffer, rcInsufficient );
-                else if ( num_read < bsize )
-                    buffer [ num_read ] = 0;
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/* EncryptionKey
- *  return any associated encryption key
- *
- *  attempts to copy NUL-terminated key into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - encryption key output parameter
- *
- *  "key_size" [ OUT, NULL OKAY ] - returns the key size in
- *  bytes, excluding any NUL termination.
- */
-LIB_EXPORT rc_t CC KRepositoryEncryptionKey ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *key_size )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        const KConfigNode *node;
-
-        if ( key_size != NULL )
-            * key_size = 0;
-
-        rc = KConfigNodeOpenNodeRead ( self -> node, & node, "encryption-key" );
-        if ( rc == 0 )
-        {
-            size_t num_read, remaining;
-            rc = KConfigNodeRead ( node, 0, buffer, bsize, & num_read, & remaining );
-            KConfigNodeRelease ( node );
-
-            if ( rc == 0 )
-            {
-                if ( key_size != NULL )
-                    * key_size = num_read + remaining;
-
-                if ( remaining != 0 )
-                    rc = RC ( rcKFG, rcNode, rcAccessing, rcBuffer, rcInsufficient );
-                else if ( num_read < bsize )
-                    memset ( & buffer [ num_read ], 0, bsize - num_read );
-            }
-        }
-        else if ( GetRCState ( rc ) == rcNotFound )
-        {
-            char path [ 4096 ];
-            rc_t rc2 = KRepositoryEncryptionKeyFile ( self, path, sizeof path, NULL );
-            if ( rc2 == 0 )
-            {
-                KDirectory *wd;
-                rc2 = KDirectoryNativeDir ( & wd );
-                if ( rc2 == 0 )
-                {
-                    const KFile *keyFile;
-                    rc2 = KDirectoryOpenFileRead ( wd, & keyFile, "%s", path );
-                    KDirectoryRelease ( wd );
-                    if ( rc2 == 0 )
-                    {
-                        size_t num_read;
-                        rc = KFileReadAll ( keyFile, 0, buffer, bsize, & num_read );
-                        if ( rc == 0 )
-                        {
-                            if ( num_read == bsize )
-                            {
-                                uint64_t eof;
-                                rc = KFileSize ( keyFile, & eof );
-                                if ( rc == 0 )
-                                    num_read = ( size_t ) eof;
-                                else
-                                    num_read = 0;
-
-                                rc = RC ( rcKFG, rcFile, rcReading, rcBuffer, rcInsufficient );
-                                memset ( buffer, 0, bsize );
-                            }
-                            else if ( num_read == 0 )
-                            {
-                                rc = RC ( rcKFG, rcFile, rcReading, rcFile, rcEmpty );
-                                memset ( buffer, 0, bsize );
-                            }
-                            else
-                            {
-                                char *eoln = string_chr ( buffer, num_read, '\n' );
-                                if ( eoln != NULL )
-                                {
-                                    if ( eoln == buffer )
-                                        num_read = 0;
-                                    else if ( eoln [ -1 ] == '\r' )
-                                        num_read = eoln - buffer - 1;
-                                    else
-                                        num_read = eoln - buffer;
-                                }
-
-                                if ( key_size != NULL )
-                                    * key_size = num_read;
-
-                                memset ( & buffer [ num_read ], 0, bsize - num_read );
-                            }
-                        }
-
-                        KFileRelease ( keyFile );
-                    }
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/* EncryptionKeyFile
- *  return path to any associated encryption key file
- *
- *  attempts to copy NUL-terminated path into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - key file path output parameter
- *
- *  "path_size" [ OUT, NULL OKAY ] - returns the path size in
- *  bytes, excluding any NUL termination.
- */
-LIB_EXPORT rc_t CC KRepositoryEncryptionKeyFile ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *path_size )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        const KConfigNode *node;
-
-        if ( path_size != NULL )
-            * path_size = 0;
-
-        rc = KConfigNodeOpenNodeRead ( self -> node, & node, "encryption-key-path" );
-        if ( rc == 0 )
-        {
-            size_t num_read, remaining;
-            rc = KConfigNodeRead ( node, 0, buffer, bsize, & num_read, & remaining );
-            KConfigNodeRelease ( node );
-
-            if ( rc == 0 )
-            {
-                if ( path_size != NULL )
-                    * path_size = num_read + remaining;
-
-                if ( remaining != 0 )
-                    rc = RC ( rcKFG, rcNode, rcAccessing, rcBuffer, rcInsufficient );
-                else if ( num_read < bsize )
-                    buffer [ num_read ] = 0;
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/* Description
- *  return any associated descriptive text
- *
- *  attempts to copy NUL-terminated description into provided buffer
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - description text output parameter
- *
- *  "desc_size" [ OUT, NULL OKAY ] - returns the text size in
- *  bytes, excluding any NUL termination.
- */
-LIB_EXPORT rc_t CC KRepositoryDescription ( const KRepository *self,
-    char *buffer, size_t bsize, size_t *desc_size )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcNode, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        const KConfigNode *node;
-
-        if ( desc_size != NULL )
-            * desc_size = 0;
-
-        rc = KConfigNodeOpenNodeRead ( self -> node, & node, "description" );
-        if ( rc == 0 )
-        {
-            size_t num_read, remaining;
-            rc = KConfigNodeRead ( node, 0, buffer, bsize, & num_read, & remaining );
-            KConfigNodeRelease ( node );
-
-            if ( rc == 0 )
-            {
-                if ( desc_size != NULL )
-                    * desc_size = num_read + remaining;
-
-                if ( remaining != 0 )
-                    rc = RC ( rcKFG, rcNode, rcAccessing, rcBuffer, rcInsufficient );
-                else if ( num_read < bsize )
-                    buffer [ num_read ] = 0;
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/* ProjectId
- *  return project id for protected user repository
- *  return RC when repository is not user protected
- *
- *  "projectId" [ OUT ] - returns the project id
- */
-LIB_EXPORT rc_t CC KRepositoryProjectId
-    ( const KRepository * self, uint32_t * projectId )
-{
-    rc_t rc = 0;
-
-    if ( projectId == NULL )
-        rc = RC ( rcKFG, rcMgr, rcAccessing, rcParam, rcNull );
-    else if ( self == NULL )
-        rc = SILENT_RC ( rcKFG, rcMgr, rcAccessing, rcSelf, rcNull );
-    else if ( self -> category != krepUserCategory
-           || self -> subcategory != krepProtectedSubCategory )
-        rc = RC ( rcKFG, rcMgr, rcAccessing, rcSelf, rcWrongType );
-    else {
-        uint32_t id = 0;
-        const char prefix [] = "dbGaP-";
-        char localName [512] = "";
-        size_t localNumWrit = 0;
-
-        * projectId = 0;
-
-        KRepositoryName (self, localName, sizeof ( localName ), & localNumWrit);
-        assert ( localNumWrit < sizeof localName );
-
-        if ( strcase_cmp ( localName, localNumWrit,
-            prefix, sizeof prefix - 1, sizeof prefix - 1) == 0)
-        {
-            int i = sizeof prefix - 1;
-            for ( i = sizeof prefix - 1; i < localNumWrit; ++ i ) {
-                if ( ! isdigit ( localName [ i ] ) ) {
-                    rc = RC (rcKFG, rcMgr, rcAccessing, rcSelf, rcUnrecognized);
-                    break;
-                }
-                id = id * 10 + localName [ i ] - '0';
-            }
-
-            if ( rc == 0 ) {
-                * projectId = id;
-                return 0;
-            }
-        }
-
-        rc = RC (rcKFG, rcMgr, rcAccessing, rcSelf, rcUnrecognized);
-    }
-        
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KRepositoryVector
- *  uses Vector API
- *  holds zero or more KRepository objects
- */
-
-
-/* Whack
- *  destroy your vector
- */
-LIB_EXPORT rc_t CC KRepositoryVectorWhack ( KRepositoryVector *self )
-{
-    if ( self == NULL )
-        return RC ( rcKFG, rcVector, rcDestroying, rcSelf, rcNull );
-
-    VectorWhack ( self, KRepositoryWhackEntry, NULL );
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * KRepositoryMgr
- *  manages structured access to repositories
- */
-struct KRepositoryMgr
-{
-    const KConfig *ro_cfg;
-    KConfig *rw_cfg;
-    KRefcount refcount;
-};
-
-
-/* Whack
- */
-static
-rc_t KRepositoryMgrWhack ( KRepositoryMgr *self )
-{
-    if ( self -> ro_cfg )
-        KConfigRelease ( self -> ro_cfg );
-    if ( self -> rw_cfg )
-        KConfigRelease ( self -> rw_cfg );
-    free ( self );
-    return 0;
-}
-
-
-/* Make
- *  create a repository manager
- *  uses values from "self"
- */
-LIB_EXPORT rc_t CC KConfigMakeRepositoryMgrRead ( const KConfig *self, const KRepositoryMgr **mgrp )
-{
-    rc_t rc;
-
-    if ( mgrp == NULL )
-        rc = RC ( rcKFG, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcMgr, rcConstructing, rcSelf, rcNull );
-        else
-        {
-            KRepositoryMgr *mgr = calloc ( 1, sizeof * mgr );
-            if ( mgr == NULL )
-                rc = RC ( rcKFG, rcMgr, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KConfigAddRef ( self );
-                if ( rc == 0 )
-                {
-                    mgr -> ro_cfg = self;
-                    KRefcountInit ( & mgr -> refcount, 1, "KRepositoryMgr", "make-read", "mgr" );
-                    * mgrp = mgr;
-                    return 0;
-                }
-
-                free ( mgr );
-            }
-        }
-
-        * mgrp = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KConfigMakeRepositoryMgrUpdate ( KConfig *self, KRepositoryMgr **mgrp )
-{
-    rc_t rc;
-
-    if ( mgrp == NULL )
-        rc = RC ( rcKFG, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcMgr, rcConstructing, rcSelf, rcNull );
-        else
-        {
-            KRepositoryMgr *mgr = calloc ( 1, sizeof * mgr );
-            if ( mgr == NULL )
-                rc = RC ( rcKFG, rcMgr, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KConfigAddRef ( self );
-                if ( rc == 0 )
-                {
-                    mgr -> rw_cfg = self;
-                    KRefcountInit ( & mgr -> refcount, 1, "KRepositoryMgr", "make-update", "mgr" );
-                    * mgrp = mgr;
-                    return 0;
-                }
-
-                free ( mgr );
-            }
-        }
-
-        * mgrp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KRepositoryMgrAddRef ( const KRepositoryMgr *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KRepositoryMgr" ) )
-        {
-        case krefLimit:
-            return RC ( rcKFG, rcMgr, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KRepositoryMgrRelease ( const KRepositoryMgr *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KRepositoryMgr" ) )
-        {
-        case krefWhack:
-            return KRepositoryMgrWhack ( ( KRepositoryMgr* ) self );
-        case krefNegative:
-            return RC ( rcKFG, rcMgr, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-static
-const KConfig *KRepositoryMgrGetROKConfig ( const KRepositoryMgr *self )
-{
-    return self -> ro_cfg ? self -> ro_cfg : self -> rw_cfg;
-}
-
-static
-rc_t KRepositoryMgrSubCategoryRepositories ( const KConfigNode *sub,
-    KRepCategory category, KRepSubCategory subcategory, KRepositoryVector *repositories )
-{
-    KNamelist *repo_names;
-    rc_t rc = KConfigNodeListChildren ( sub, & repo_names );
-    if ( rc == 0 )
-    {
-        uint32_t i, count;
-        rc = KNamelistCount ( repo_names, & count );
-        for ( i = 0; i < count && rc == 0; ++ i )
-        {
-            const char *repo_name;
-            rc = KNamelistGet ( repo_names, i, & repo_name );
-            if ( rc == 0 )
-            {
-                const KConfigNode *node;
-                rc = KConfigNodeOpenNodeRead ( sub, & node, "%s", repo_name );
-                if ( rc == 0 )
-                {
-                    KRepository *repo;
-                    rc = KRepositoryMake ( & repo, node, repo_name, category, subcategory );
-                    if ( rc == 0 )
-                    {
-                        rc = VectorAppend ( repositories, NULL, repo );
-                        if ( rc != 0 )
-                            KRepositoryWhack ( repo );
-                    }
-
-                    KConfigNodeRelease ( node );
-                }
-            }
-        }
-
-        KNamelistRelease ( repo_names );
-    }
-
-    return rc;
-}
-
-static
-rc_t KRepositoryMgrCategoryRepositories ( const KConfigNode *cat,
-    KRepCategory category, KRepositoryVector *repositories )
-{
-    KNamelist *sub_names;
-    rc_t rc = KConfigNodeListChildren ( cat, & sub_names );
-    if ( rc == 0 )
-    {
-        uint32_t i, count;
-        rc = KNamelistCount ( sub_names, & count );
-        for ( i = 0; i < count && rc == 0; ++ i )
-        {
-            const char *sub_name;
-            rc = KNamelistGet ( sub_names, i, & sub_name );
-            if ( rc == 0 )
-            {
-                KRepSubCategory subcategory = krepBadSubCategory;
-                if ( strcmp ( "main", sub_name ) == 0 )
-                    subcategory = krepMainSubCategory;
-                else if ( strcmp ( "aux", sub_name ) == 0 )
-                    subcategory = krepAuxSubCategory;
-                else if ( strcmp ( "protected", sub_name ) == 0 )
-                    subcategory = krepProtectedSubCategory;
-
-                if ( subcategory != krepBadSubCategory )
-                {
-                    const KConfigNode *sub;
-                    rc = KConfigNodeOpenNodeRead ( cat, & sub, "%s", sub_name );
-                    if ( rc == 0 )
-                    {
-                        rc = KRepositoryMgrSubCategoryRepositories ( sub, category, subcategory, repositories );
-                        KConfigNodeRelease ( sub );
-                    }
-                }
-            }
-        }
-
-        KNamelistRelease ( sub_names );
-    }
-
-    return rc;
-}
-
-
-/* UserRepositories
- *  retrieve all user repositories in a Vector
- */
-LIB_EXPORT rc_t CC KRepositoryMgrGetRepositories ( const KRepositoryMgr * self, KRepCategory category,
-    KRepositoryVector * repositories )
-{
-    rc_t rc;
-
-    if ( repositories == NULL )
-        rc = RC ( rcKFG, rcMgr, rcAccessing, rcParam, rcNull );
-    else
-    {
-        VectorInit ( repositories, 0, 8 );
-
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcMgr, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            const KConfig * kfg = KRepositoryMgrGetROKConfig ( self );
-
-            const KConfigNode * node;
-            switch( category )
-            {
-                case krepUserCategory   : rc = KConfigOpenNodeRead ( kfg, & node, "/repository/user" ); break;
-                case krepSiteCategory   : rc = KConfigOpenNodeRead ( kfg, & node, "/repository/site" ); break;
-                case krepRemoteCategory : rc = KConfigOpenNodeRead ( kfg, & node, "/repository/remote" ); break;
-                default : rc = RC ( rcKFG, rcMgr, rcAccessing, rcParam, rcInvalid );
-            }
-            if ( rc == 0 )
-            {
-                rc = KRepositoryMgrCategoryRepositories ( node, category, repositories );
-                KConfigNodeRelease ( node );
-                if ( rc == 0 )
-                    VectorReorder ( repositories, KRepositorySort, NULL );
-            }
-
-            if ( rc != 0 )
-                KRepositoryVectorWhack ( repositories );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT bool CC KRepositoryMgrCategoryDisabled ( const KRepositoryMgr *self, KRepCategory category )
-{
-    bool res = false;
-
-    if ( self != NULL )
-    {
-        const KConfig * kfg = KRepositoryMgrGetROKConfig ( self );
-        if ( kfg != NULL )
-        {
-            switch( category )
-            {
-                case krepUserCategory   : KConfigReadBool ( kfg, "/repository/user/disabled", &res ); break;
-                case krepSiteCategory   : KConfigReadBool ( kfg, "/repository/site/disabled", &res ); break;
-                case krepRemoteCategory : KConfigReadBool ( kfg, "/repository/remote/disabled", &res ); break;
-            }
-        }
-    }
-    return res;
-}
-
-
-LIB_EXPORT rc_t CC KRepositoryMgrCategorySetDisabled ( const KRepositoryMgr *self, KRepCategory category, bool disabled )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcMgr, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        KConfig * kfg = ( KConfig * ) KRepositoryMgrGetROKConfig ( self );
-        if ( kfg == NULL )
-            rc = RC ( rcKFG, rcMgr, rcAccessing, rcParam, rcNull );
-        else
-        {
-            switch( category )
-            {
-                case krepUserCategory   : rc = KConfigWriteBool ( kfg, "/repository/user/disabled", disabled ); break;
-                case krepSiteCategory   : rc = KConfigWriteBool ( kfg, "/repository/site/disabled", disabled ); break;
-                case krepRemoteCategory : rc = KConfigWriteBool ( kfg, "/repository/remote/disabled", disabled ); break;
-                default : rc = RC ( rcKFG, rcMgr, rcAccessing, rcParam, rcInvalid );
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KRepositoryMgrUserRepositories ( const KRepositoryMgr * self,
-    KRepositoryVector * user_repositories )
-{
-    return KRepositoryMgrGetRepositories ( self, krepUserCategory, user_repositories );
-}
-
-
-/* SiteRepositories
- *  retrieve all site repositories in a Vector
- */
-LIB_EXPORT rc_t CC KRepositoryMgrSiteRepositories ( const KRepositoryMgr *self,
-    KRepositoryVector *site_repositories )
-{
-    return KRepositoryMgrGetRepositories ( self, krepSiteCategory, site_repositories );
-}
-
-
-/* RemoteRepositories
- *  retrieve all remote repositories in a Vector
- */
-LIB_EXPORT rc_t CC KRepositoryMgrRemoteRepositories ( const KRepositoryMgr *self,
-    KRepositoryVector *remote_repositories )
-{
-    return KRepositoryMgrGetRepositories ( self, krepRemoteCategory, remote_repositories );
-}
-
-
-/* CurrentProtectedRepository
- *  returns the currently active user protected repository
- */
-LIB_EXPORT rc_t CC KRepositoryMgrCurrentProtectedRepository ( const KRepositoryMgr *self, const KRepository **protected )
-{
-    rc_t rc;
-
-    if ( protected == NULL )
-        rc = RC ( rcKFG, rcMgr, rcAccessing, rcParam, rcNull );
-    else
-    {
-        * protected = NULL;
-
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcMgr, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            KRepositoryVector v;
-            rc = KRepositoryMgrUserRepositories ( self, & v );
-            if ( rc == 0 )
-            {
-                KDirectory *wd;
-                rc = KDirectoryNativeDir ( & wd );
-                if ( rc == 0 )
-                {
-                    /* we need services of system directory */
-                    struct KSysDir *sysDir = KDirectoryGetSysDir ( wd );
-
-                    /* allocate buffer space for 3 paths */
-                    const size_t path_size = 4096;
-                    char *wd_path = malloc ( path_size * 3 );
-                    if ( wd_path == NULL )
-                        rc = RC ( rcKFG, rcMgr, rcAccessing, rcMemory, rcExhausted );
-                    else
-                    {
-                        /* the working directory already has a canonical path */
-                        rc = KDirectoryResolvePath ( wd, true, wd_path, path_size, "." );
-                        if ( rc == 0 )
-                        {
-                            size_t wd_size = string_size ( wd_path );
-
-                            /* look for all protected user repositories */
-                            uint32_t i, count = VectorLength ( & v );
-                            for ( i = 0; i < count; ++ i )
-                            {
-                                const KRepository *r = ( const void* ) VectorGet ( & v, i );
-                                if ( r -> subcategory == krepProtectedSubCategory )
-                                {
-                                    rc_t rc2 = 0;
-                                    size_t resolved_size;
-                                    char *resolved = wd_path + path_size;
-
-                                    /* get stated root path to repository */
-                                    char *root = resolved + path_size;
-                                    rc2 = KRepositoryRoot ( r,
-                                        root, path_size, NULL );
-                                    if ( rc2 != 0 ) {
-                                        /* VDB-1096:
-                                        We cannot get repository root:
-                                        is it a bad repository configuration?
-                                        Then ignore this repository node
-                                        and try another repository */
-                                        continue;
-                                    }
-
-                                    /* get its canonical path */
-                                    rc2 = KSysDirRealPath ( sysDir,
-                                                            resolved, path_size, "%s", root );
-                                    if ( rc2 != 0 ) {
-                                        /* VDB-1096:
-                      Invalid cannot get repository root? Ignore and continue */
-                                        continue;
-                                    }
-
-                                    /* we know the current directory's canonical path size
-                                       and we know the repository's canonical path size.
-                                       to be "within" the repository, the current directory's
-                                       size must be >= repository path size, and must match
-                                       exactly the repository path itself over those bytes. */
-                                    resolved_size = string_size ( resolved );
-                                    if ( resolved_size <= wd_size && memcmp ( wd_path, resolved, resolved_size ) == 0 )
-                                    {
-                                        /* still have a little more to check */
-                                        if ( resolved_size == wd_size ||
-                                             wd_path [ resolved_size ] == '/' )
-                                        {
-                                            /* we are in the repository */
-                                            rc = KRepositoryAddRef ( r );
-                                            if ( rc == 0 )
-                                                * protected = r;
-                                            break;
-                                        }
-                                    }
-                                }
-                            }
-                        }
-
-                        free ( wd_path );
-                    }
-
-                    KDirectoryRelease ( wd );
-                }
-
-                KRepositoryVectorWhack ( & v );
-            }
-            else if (rc ==
-                SILENT_RC(rcKFG, rcNode, rcOpening, rcPath, rcNotFound))
-            {
-                return SILENT_RC ( rcKFG, rcMgr, rcAccessing, rcNode, rcNotFound );
-            }
-
-            if ( rc == 0 && * protected == NULL )
-                return SILENT_RC ( rcKFG, rcMgr, rcAccessing, rcNode, rcNotFound );
-        }
-    }
-
-    return rc;
-}
-
-
-/* GetProtectedRepository
- *  retrieves a user protected repository by its associated project-id
- */
-LIB_EXPORT rc_t CC KRepositoryMgrGetProtectedRepository ( const KRepositoryMgr *self, 
-    uint32_t projectId, 
-    const KRepository **protected )
-{
-    rc_t rc;
-
-    if ( protected == NULL )
-        rc = RC ( rcKFG, rcMgr, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcKFG, rcMgr, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            char repNodeName[512] = "";
-            size_t numWrit = 0;
-            KRepositoryVector v;
-            rc = string_printf(repNodeName, sizeof repNodeName, &numWrit, "dbgap-%u", projectId); /* go case-insensitive */
-            assert(numWrit < sizeof(repNodeName));
-            
-            rc = KRepositoryMgrUserRepositories ( self, & v );
-            if ( rc == 0 )
-            {  /* look for all protected user repositories */
-                uint32_t i, count = VectorLength ( & v );
-                for ( i = 0; i < count; ++ i )
-                {
-                    const KRepository *r = ( const void* ) VectorGet ( & v, i );
-                    if ( r -> subcategory == krepProtectedSubCategory )
-                    {
-                        char localName[512] = "";
-                        size_t localNumWrit = 0;
-                        KRepositoryName(r, localName, sizeof(localName), &localNumWrit);
-                        assert(localNumWrit < sizeof(localName));
-                        if (strcase_cmp(repNodeName, numWrit, localName, localNumWrit, sizeof(localName)) == 0)
-                        {
-                            rc = KRepositoryAddRef ( r );
-                            if ( rc == 0 )
-                            {
-                                * protected = r;
-                                KRepositoryVectorWhack(&v);
-                                return 0;
-                            }
-                        }
-                    }
-                }
-                KRepositoryVectorWhack(&v);
-                rc = RC ( rcKFG, rcMgr, rcAccessing, rcNode, rcNotFound );
-            }
-        }
-    }
-
-    return rc;
-}    
-
-
-static rc_t find_repository_in_vector( KRepositoryVector * v, KRepository **repository, const char * name, uint32_t name_len )
-{
-    rc_t rc = 0;
-    KRepository * found = NULL;
-    uint32_t count = VectorLength ( v );
-    uint32_t i;
-    for ( i = 0; i < count && found == NULL; ++ i )
-    {
-        char r_name[ 512 ];
-        size_t written = 0;
-        KRepository * r = ( KRepository * ) VectorGet ( v, i );
-        rc = KRepositoryName( r, r_name, sizeof r_name , &written );
-        if ( strcase_cmp( name, name_len, r_name, written, sizeof r_name ) == 0 )
-        {
-            found = r;
-        }
-    }
-    if ( found == NULL )
-        rc = RC ( rcKFG, rcMgr, rcSearching, rcName, rcNotFound );
-    else
-        *repository = found;
-    return rc;
-}
-
-
-static rc_t create_child_node( const KConfigNode * self, const char * child_name, const char * child_val, uint32_t len )
-{
-    KConfigNode * child_node;
-    rc_t rc = KConfigNodeOpenNodeUpdate( ( KConfigNode * )self, &child_node, "%s", child_name );
-    if ( rc == 0 )
-    {
-        rc_t rc_2;
-        rc = KConfigNodeWrite( child_node, child_val, len );
-        rc_2 = KConfigNodeRelease( child_node );
-        if ( rc == 0 ) rc = rc_2;
-    }
-    return rc;
-}
-
-
-static rc_t make_writable_file( struct KFile ** dst, const char * path )
-{
-    KDirectory * dir;
-    rc_t rc = KDirectoryNativeDir( &dir );
-    if ( rc == 0 )
-    {
-        rc = KDirectoryCreateFile ( dir, dst, false, 0600, ( kcmInit | kcmParents ), "%s", path );
-        KDirectoryRelease( dir );
-    }
-    return rc;
-}
-
-
-static rc_t make_key_file( KRepositoryMgr * self, const struct KNgcObj * ngc, char * buffer, size_t buffer_size, size_t * written )
-{
-    struct String * home;
-    rc_t rc = KConfigReadString ( self->rw_cfg, "HOME", &home );
-    if ( rc == 0 )
-    {
-        rc = string_printf( buffer, buffer_size, written, "%S", home );
-        if ( rc == 0 )
-        {
-            size_t written2;
-            rc = string_printf( &buffer[ *written ], buffer_size - *written, &written2, "/.ncbi/dbGap-%u.enc_key", ngc->projectId );
-            if ( rc == 0 )
-                *written += written2;
-        }
-        StringWhack ( home );
-    }
-    if ( rc == 0 )
-    {
-        struct KFile * key_file;
-        rc = make_writable_file( &key_file, buffer );
-        if ( rc == 0 )
-        {
-            rc = KNgcObjWriteKeyToFile ( ngc, key_file );
-            KFileRelease( key_file );
-        }
-    }
-    return rc;
-}
-
-/******************************************************************************/
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
-
-static rc_t _KRepositoryAppsNodeFix(KConfigNode *self,
-    const char *path, const char *val, size_t len, uint32_t *modifications)
-{
-    rc_t rc = 0;
-
-    KConfigNode *node = NULL;
-
-    assert(self && modifications);
-
-    rc = KConfigNodeOpenNodeUpdate(self, &node, path);
-    if (rc == 0) {
-        bool update = false;
-        char buffer[8] = "";
-        size_t num_read = 0;
-        size_t remaining = 0;
-        rc_t rc = KConfigNodeRead(node, 0,
-            buffer, sizeof buffer, &num_read, &remaining);
-        if ((rc != 0) || (string_cmp(buffer, num_read, val, len, len) != 0)) {
-            update = true;
-        }
-
-        if (update) {
-            rc = KConfigNodeWrite(node, val, len);
-            if (rc == 0) {
-                *modifications = INP_UPDATE_APPS;
-            }
-        }
-    }
-
-    RELEASE(KConfigNode, node);
-
-    return rc;
-}
-
-static rc_t _KRepositoryFixApps(KRepository *self, uint32_t *modifications) {
-    rc_t rf = 0;
-    rc_t rs = 0;
-
-    KConfigNode *self_node = NULL;
-
-    assert(self);
-
-    self_node = (KConfigNode*)self->node;
-
-    rf = _KRepositoryAppsNodeFix(self_node, "apps/file/volumes/flat",
-        "files", 5, modifications);
-
-    rs = _KRepositoryAppsNodeFix(self_node, "apps/sra/volumes/sraFlat",
-        "sra"  , 3, modifications);
-
-    return rf != 0 ? rf : rs;
-}
-
-/* we have not found a repository named repo_name, let us create a new one... */
-static rc_t create_new_protected_repository( KRepositoryMgr * self,
-    const struct KNgcObj * ngc, const char * location, uint32_t location_len, const char * repo_name, uint32_t name_len )
-{
-    KConfigNode * new_repository;
-    rc_t rc = KConfigOpenNodeUpdate( self->rw_cfg, &new_repository, "/repository/user/protected/dbGaP-%u", ngc->projectId );
-    if ( rc == 0 )
-    {
-        rc = create_child_node( new_repository, "download-ticket", ngc->downloadTicket.addr, ngc->downloadTicket.len );
-
-        if ( rc == 0 )
-            rc = create_child_node( new_repository, "description", ngc->description.addr, ngc->description.len );
-
-        if ( rc == 0 )
-            rc = create_child_node( new_repository, "apps/file/volumes/flat", "files", 5 );
-
-        if ( rc == 0 )
-            rc = create_child_node( new_repository, "apps/sra/volumes/sraFlat", "sra", 3 );
-
-        if ( rc == 0 )
-            rc = create_child_node( new_repository, "cache-enabled", "true", 4 );
-
-        if ( rc == 0 )
-            rc = create_child_node( new_repository, "root", location, location_len );
-
-        if ( rc == 0 )
-        {
-            size_t written;
-            char key_file_path[ 4096 ];
-            rc = make_key_file( self, ngc, key_file_path, sizeof key_file_path, &written );
-            if ( rc == 0 )
-                rc = create_child_node(new_repository,
-                    "encryption-key-path", key_file_path, (uint32_t)written);
-        }
-        KConfigNodeRelease( new_repository );
-    }
-    return rc;
-}
-
-
-static rc_t check_for_modifications(
-    const KRepository *repository, const KNgcObj *ngc,
-    uint32_t *modifications, uint32_t *notFoundNodes)
-{
-    rc_t rc = 0;
-    size_t written;
-    char buffer[ 1024 ];
-    assert(modifications && notFoundNodes);
-
-    if (rc == 0) {
-        rc = KRepositoryDownloadTicket(repository,
-            buffer, sizeof buffer, &written);
-        if (rc == 0) {
-            if (strcase_cmp(buffer, written, ngc->downloadTicket.addr,
-                ngc->downloadTicket.len, sizeof buffer) != 0)
-            {
-                *modifications |= INP_UPDATE_DNLD_TICKET;
-            }
-        }
-        else if (rc == SILENT_RC(rcKFG, rcNode, rcOpening, rcPath, rcNotFound)) 
-        {
-            rc = 0;
-            *notFoundNodes |= INP_UPDATE_DNLD_TICKET;
-        }
-    }
-
-    if (rc == 0) {
-        rc = KRepositoryEncryptionKey ( repository, buffer, sizeof buffer, &written );
-        if (rc == 0) {
-            if (strcase_cmp(buffer, written, ngc->encryptionKey.addr,
-                ngc->encryptionKey.len, sizeof buffer) != 0)
-            {
-                *modifications |= INP_UPDATE_ENC_KEY;
-            }
-        }
-        else if (rc == SILENT_RC(rcKFG, rcNode, rcOpening, rcPath, rcNotFound))
-        {
-            rc = 0;
-            *notFoundNodes |= INP_UPDATE_ENC_KEY;
-        }
-    }
-
-    if (rc == 0) {
-        rc = KRepositoryDescription ( repository, buffer, sizeof buffer, &written );
-        if (rc == 0) {
-            if (strcase_cmp(buffer, written, ngc->description.addr,
-                ngc->description.len, sizeof buffer) != 0)
-            {
-                *modifications |= INP_UPDATE_DESC;
-            }
-        }
-        else if (rc == SILENT_RC(rcKFG, rcNode,
-            rcOpening, rcPath, rcNotFound))
-        {
-            rc = 0;
-            *notFoundNodes |= INP_UPDATE_DESC;
-        }
-    }
-
-    return rc;
-}
-
-
-static rc_t check_for_root_modification(const KRepository *repository,
-    const char *root, uint32_t *modifications)
-{
-    rc_t rc = 0;
-    size_t root_size = 0;
-    char buffer[PATH_MAX] = "";
-    size_t bsize = 0;
-
-    if (root == NULL || modifications == NULL) {
-        return RC(rcKFG, rcMgr, rcAccessing, rcSelf, rcNull);
-    }
-
-    rc = KRepositoryRoot(repository, buffer, sizeof buffer, &root_size);
-    if (rc != 0) {
-        return rc;
-    }
-
-    bsize = string_measure(root, NULL);
-    if (strcase_cmp(buffer, root_size, root, bsize, sizeof buffer) != 0) {
-        *modifications |= INP_UPDATE_ROOT;
-    }
-
-    return rc;
-}
-
-/* we have an existing repository that corresponds with the given ngc-object, see if we have to / or can update its values */
-static rc_t update_existing_protected_repository( KRepositoryMgr * self,
-    KRepository * repository, const struct KNgcObj * ngc, uint32_t modifications )
-{
-    rc_t rc = 0;
-    /* make the changes... */
-    if ( modifications & INP_UPDATE_DNLD_TICKET )
-    {
-        rc = create_child_node( repository->node, "download-ticket", ngc->downloadTicket.addr, ngc->downloadTicket.len );
-    }
-
-    if ( rc == 0 && ( modifications & INP_UPDATE_ENC_KEY ) )
-    {
-        size_t written;
-        char key_file_path[ 4096 ];
-        rc = make_key_file( self, ngc, key_file_path, sizeof key_file_path, &written );
-        if ( rc == 0 )
-            rc = create_child_node(repository->node,
-                "encryption-key-path", key_file_path, (uint32_t)written);
-    }
-
-    if ( rc == 0 && ( modifications & INP_UPDATE_DESC ) )
-    {
-        rc = create_child_node( repository->node, "description", ngc->description.addr, ngc->description.len );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KRepositoryMgrImportNgcObj( KRepositoryMgr * self,
-    const struct KNgcObj * ngc, const char * location, uint32_t permissions, uint32_t * result_flags )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcKFG, rcMgr, rcUpdating, rcSelf, rcNull );
-    if ( ngc == NULL || location == NULL || result_flags == NULL )
-        rc = RC ( rcKFG, rcMgr, rcUpdating, rcParam, rcNull );
-    else
-    {
-        KRepositoryVector user_repositories;
-        size_t written;
-        char ngc_repo_name[ 512 ];
-        *result_flags = 0;
-        memset(&user_repositories, 0, sizeof user_repositories);
-        rc = string_printf( ngc_repo_name, sizeof ngc_repo_name, &written, "dbGaP-%u", ngc->projectId );
-        if ( rc == 0 )
-        {
-            KRepository *repository = NULL;
-            bool exists = false;
-
-            rc = KRepositoryMgrUserRepositories ( self, &user_repositories );
-            if ( rc == 0 )
-            {
-                rc = find_repository_in_vector(&user_repositories,
-                    &repository, ngc_repo_name, (uint32_t)written);
-                if ( rc == 0 )
-                {
-                    uint32_t modifications = 0;
-                    uint32_t notFoundNodes = 0;
-
-                    exists = true;
-
-                    /* test for any changes:
-                       1. download ticket
-                       2. enc. key
-                       3. description
-
-                       mark each bit that differs
-                    */
-                    rc = check_for_modifications(repository,
-                        ngc, &modifications, &notFoundNodes);
-                    if ( rc == 0 )
-                    {
-                        if (notFoundNodes != 0) {
-                            permissions |= notFoundNodes;
-                            modifications |= notFoundNodes;
-                        }
-
-                        /* reject if any modification was not authorized */
-                        if ( ( modifications & ( modifications ^ permissions ) ) != 0 )
-                        {
-                            /* tell what was wrong, set rc */
-                            * result_flags = modifications & ( modifications ^ permissions );
-                            rc = RC(rcKFG, rcMgr, rcUpdating,
-                                rcConstraint, rcViolated);
-                        }
-                        else if ( modifications != 0 )
-                        {
-                            /* apply changes - all are authorized */
-
-                            rc = update_existing_protected_repository( self, repository, ngc, modifications );
-                            if ( rc == 0 )
-                                *result_flags |= modifications;
-                        }
-                    }
-                }
-            }
-
-            if (! exists) {
-                if (permissions & INP_CREATE_REPOSITORY) {
-                    uint32_t location_len = string_measure (location, NULL);
-                    rc = create_new_protected_repository(
-                        self, ngc, location, location_len,
-                        ngc_repo_name, (uint32_t)written);
-                    if (rc == 0) {
-                        *result_flags |= INP_CREATE_REPOSITORY;
-                    }
-                }
-                else {
-                    *result_flags |= INP_CREATE_REPOSITORY;
-                    rc = RC(rcKFG, rcMgr, rcUpdating, rcConstraint, rcViolated);
-                }
-            }
-            else {
-                if (rc == 0 && permissions & INP_UPDATE_ROOT) {
-                    uint32_t modifications = 0;
-                    rc = check_for_root_modification(
-                        repository, location, &modifications);
-                    if (rc == 0) {
-                        if (modifications & INP_UPDATE_ROOT) {
-                            uint32_t location_len
-                                = string_measure(location, NULL);
-                            rc = KRepositorySetRoot(repository,
-                                location, location_len);
-                            if (rc == 0) {
-                                *result_flags |= INP_UPDATE_ROOT;
-                            }
-                        }
-                        else if (modifications != 0) {
-                            *result_flags |= INP_UPDATE_ROOT;
-                            rc = RC(rcKFG, rcMgr, rcCreating,
-                                rcConstraint, rcViolated);
-                        }
-                    }
-                }
-                if (rc == 0) {
-                    uint32_t modifications = 0;
-                    rc = _KRepositoryFixApps(repository, &modifications);
-                    if (rc == 0 && modifications != 0) {
-                        *result_flags |= INP_UPDATE_APPS;
-                    }
-                }
-            }
-        }
-
-        KRepositoryVectorWhack ( &user_repositories );
-    }
-
-    return rc;
-}
-
-
-LIB_EXPORT
-bool CC KRepositoryMgrHasRemoteAccess(const KRepositoryMgr *self)
-{
-    bool has = false;
-
-    rc_t rc = 0, r2 = 0;
-
-    uint32_t len = 0;
-
-    KRepositoryVector remote_repositories;
-    memset(&remote_repositories, 0, sizeof remote_repositories);
-
-    rc = KRepositoryMgrRemoteRepositories(self, &remote_repositories);
-
-    if (rc == 0) {
-        len = VectorLength(&remote_repositories);
-    }
-
-    if (rc == 0 && len > 0) {
-        uint32_t i = 0;
-        if (! KRepositoryMgrCategoryDisabled(self, krepRemoteCategory)) {
-            for (i = 0; i < len; ++ i) {
-                const KRepository *r = VectorGet(&remote_repositories, i);
-                if (r != NULL) {
-                    if (KRepositoryDisabled(r)) {
-                        continue;
-                    }
-
-                    if (KRepositorySubCategory(r)
-                        != krepProtectedSubCategory)
-                    {
-                        has = true;
-                    }
-                }
-            }
-        }
-    }
-
-    r2 = KRepositoryVectorWhack(&remote_repositories);
-    if (r2 != 0 && rc == 0) {
-        rc = r2;
-    }
-
-    if (rc != 0) {
-        return false;
-    }
-
-    return has;
-}
diff --git a/libs/kfs/.gitignore b/libs/kfs/.gitignore
deleted file mode 100644
index c253038..0000000
--- a/libs/kfs/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.def
diff --git a/libs/kfs/Makefile b/libs/kfs/Makefile
deleted file mode 100644
index eaed481..0000000
--- a/libs/kfs/Makefile
+++ /dev/null
@@ -1,221 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: all
-
-TOP ?= $(abspath ../..)
-MODULE = libs/kfs
-
-INT_LIBS = \
-	libkfs \
-	libkfs-nommap \
-	libkff \
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES =           \
-	$(KFS_OBJ)       \
-	$(KFS_NOMMAP_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# mmap.c
-#  special rule to generate a disabled mmap
-#
-%.nommap.$(LOBX): %.c
-	$(CC) -o $@ -fPIC $(OPT) -DFORCE_MALLOC_MMAP -D_LIBRARY $<
-
-
-#-------------------------------------------------------------------------------
-# kfs
-#
-$(ILIBDIR)/libkfs: $(addprefix $(ILIBDIR)/libkfs.,$(ILIBEXT))
-
-$(ILIBDIR)/libkfs-nommap: $(addprefix $(ILIBDIR)/libkfs-nommap.,$(LIBX))
-
-KFS_CMN = \
-	directory \
-	arrayfile \
-	file \
-	sysdir \
-	sysfile \
-	sysmmap \
-	syslockfile \
-	sysdll \
-	gzip \
-	bzip \
-	md5 \
-	crc32 \
-	arc \
-	toc \
-	tocentry \
-	tocdir \
-	tocfile \
-	sra \
-	tar \
-	teefile \
-	buffile \
-	buffile-read \
-	buffile-write \
-	subfile \
-	nullfile \
-	countfile \
-	dir_test \
-	pagefile \
-	pmem \
-	readheadfile \
-	ramfile \
-	extendable-ramfile \
-	quickmount \
-	report \
-	lockfile \
-	syslockfile \
-	cacheteefile \
-	from_to_namelist
-
-KFS_SRC = \
-	mmap \
-	$(KFS_CMN)
-
-ifeq (win,$(OS))
-	KFS_SRC += directory-path
-endif
-
-KFS_NOMMAP_SRC = \
-	mmap.nommap \
-	$(KFS_CMN)
-
-KFS_OBJ = \
-	$(addsuffix .$(LOBX),$(KFS_SRC))
-
-KFS_NOMMAP_OBJ = \
-	$(addsuffix .$(LOBX),$(KFS_NOMMAP_SRC))
-
-KFS_LIB = \
-	-dkproc \
-	-dklib \
-	-ddl \
-	-dz \
-	-dbz2
-
-#	-dsz \
-
-$(ILIBDIR)/libkfs.$(LIBX): $(KFS_OBJ)
-	$(LD) --slib -o $@ $^ $(KFS_LIB)
-
-$(ILIBDIR)/libkfs-nommap.$(LIBX): $(KFS_NOMMAP_OBJ)
-	$(LD) --slib -o $@ $^ $(KFS_LIB)
-
-
-
-#-------------------------------------------------------------------------------
-# kfs.2
-#
-$(ILIBDIR)/libkfs.2: $(addprefix $(ILIBDIR)/libkfs.2.,$(ILIBEXT))
-
-KFS2_SRC = \
-	$(KFS_SRC) \
-	file-v2 \
-	directory-v2 \
-	sysfile-v2 
-#	sysdir-v2
-
-KFS2_OBJ = \
-	$(addsuffix .$(LOBX),$(KFS2_SRC))
-
-KFS2_LIB = \
-	$(KFS_LIB)
-
-$(ILIBDIR)/libkfs.2.$(LIBX): $(KFS2_OBJ)
-	$(LD) --slib -o $@ $^ $(KFS2_LIB)
-
-
-#-------------------------------------------------------------------------------
-# kff
-#
-ifeq (1,$(HAVE_MAGIC))
-
-$(ILIBDIR)/libkff: $(addprefix $(ILIBDIR)/libkff.,$(ILIBEXT))
-
-OBJFILES += $(KFF_OBJ)
-
-KFF_SRC = \
-	fileformat \
-	ffext \
-	ffkey \
-	ffmagic
-
-KFF_OBJ = \
-	$(addsuffix .$(LOBX),$(KFF_SRC))
-
-KFF_LIB = \
-	-dkfg \
-	-dklib
-
-ifneq (win,$(OS))
-	KFF_LIB += -lmagic
-endif
-
-$(ILIBDIR)/libkff.$(LIBX): $(KFF_OBJ)
-	$(LD) --slib -o $@ $^ $(KFF_LIB)
-
-else
-
-$(ILIBDIR)/libkff:
-	@ echo "NOTE - internal library $(@F) cannot be built:"         \
-	       "It requires 'libmagic' and its development headers."
-
-endif
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/kfs/arc.c b/libs/kfs/arc.c
deleted file mode 100644
index 7a9b46d..0000000
--- a/libs/kfs/arc.c
+++ /dev/null
@@ -1,4089 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <kfs/extern.h>
-#include "karc-priv.h"
-#include "toc-priv.h"
-
-#include <kfs/arc.h>
-
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/status.h>
-#include <klib/out.h>
-#include <klib/rc.h>
-#include <klib/container.h>
-#include <klib/vector.h>
-#include <klib/pbstree.h>
-#include <klib/text.h>
-#include <klib/sort.h>
-#include <klib/printf.h>
-#include <klib/klib-priv.h> /* ReportRecordZombieFile */
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/toc.h>
-#include <kfs/sra.h>
-#include <kfs/cacheteefile.h>
-
-#include <kns/http.h>
-
-#include <sysalloc.h>
-
-#include <atomic32.h>
-#include <os-native.h>
-
-#include <assert.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <va_copy.h>
-
-/* SHOULD NOT INCLUDE THESE DIRECTLY */
-#include <fcntl.h>
-#include <sys/stat.h>
-
-const char * get_mode_string (KCreateMode mode);
-/* defined in dir_test.c */
-
-extern const char *gRCModule_str[];
-extern const char *gRCTarget_str[];
-extern const char *gRCContext_str[];
-extern const char *gRCObject_str[];
-extern const char *gRCState_str[];
-#define _LOG_RC(level,rc)	PLOGMSG(( level,			\
-					  "Return Code:: $(M):$(T):$(C):$(O):$(S)", \
-					  PLOG_5(PLOG_U32(M),PLOG_U32(T),PLOG_U32(C),PLOG_U32(O),PLOG_U32(S)), \
-					  GetRCModule(rc),		\
-					  GetRCTarget(rc),		\
-					  GetRCContext(rc),		\
-					  GetRCObject(rc),		\
-					  GetRCState(rc)))
-#define LOG_RC(level,rc)	PLOGMSG(( level,			\
-					  "Return Code:: $(M):$(T):$(C):$(O):$(S)", \
-					  PLOG_5(PLOG_S(M),PLOG_S(T),PLOG_S(C),PLOG_S(O),PLOG_S(S)), \
-					  gRCModule_str[GetRCModule(rc)], \
-					  gRCTarget_str[GetRCTarget(rc)], \
-					  gRCContext_str[GetRCContext(rc)], \
-					  (GetRCObject(rc)<rcLastTarget_v1_0)? \
-					  gRCTarget_str[GetRCObject(rc)]: \
-					  gRCObject_str[1+GetRCObject(rc)-rcLastTarget_v1_0], \
-					  gRCState_str[GetRCState(rc)]))
-/* #define LOG_RC(level,rc)	\ */
-/*     PLOGMSG(( level, "m $(R)",PLOG_S(R),gRCModule_str[GetRCModule(rc)])),	\ */
-/* 	PLOGMSG(( level, "t $(R)",PLOG_S(R),gRCTarget_str[GetRCTarget(rc)])), \ */
-/* 	PLOGMSG(( level, "c $(R)",PLOG_S(R),gRCContext_str[GetRCContext(rc)])), \ */
-/* 	PLOGMSG(( level, "o $(R)",PLOG_S(R),(GetRCObject(rc)<rcLastTarget_v1_0)? \ */
-/* 		  gRCTarget_str[GetRCObject(rc)]:			\ */
-/* 		  gRCObject_str[1+GetRCObject(rc)-rcLastTarget_v1_0])), \ */
-/* 	PLOGMSG(( level, "s $(R)",PLOG_S(R),gRCState_str[GetRCState(rc)])) */
-
-
-#ifdef _DEBUGGING
-#define FUNC_ENTRY() DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_ARCENTRY), ("Enter: %s\n", __func__))
-#define KFF_DEBUG(msg) DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_ARC), msg)
-#else
-#define FUNC_ENTRY()
-#define KFF_DEBUG(msg)
-#endif
-
-
-/* ----------------------------------------------------------------------
- * 
- */
-
-/* -----
- * define the specific types to be used in the templatish/inheritancish
- * definition of vtables and their elements
- */
-#define KDIR_IMPL struct KArcDir
-#define KFILE_IMPL struct KArcFile
-#include <kfs/impl.h>
-
-static rc_t KArcDirResolvePathNode (const KArcDir *self,
-                                    enum RCContext ctx,
-                                    const char *path,
-                                    bool follow_sym_link,
-                                    const KTocEntry ** pnode,
-                                    KTocEntryType * ptype);
-
-
-
-/* ======================================================================
- * Defines relevant to the whole compilation unit.
- */
-/* arbitrary number that was originially set much much higher than expected needs. */
-#define	KARC_LINK_RESOLVE_LOOPMAX		(16)
-
-/* -----
- * We use MAX_PATH if it is available but not religiously.  We handle most
- * buffer over-runs with in the module only truncating paths at the border
- * of the module where KDirectory doesn't handle path's longer than MAX_PATH
- */
-#ifdef MAX_PATH
-#define	KARC_DEFAULT_PATH_ALLOC			(MAX_PATH)
-#else
-#define	KARC_DEFAULT_PATH_ALLOC			(4096)
-#endif
-
-
-
-
-
-/* ======================================================================
- * KArcDirIterator
- *
- * This very simple iterator steps in order through the nodes of the binary
- * search tree that is a "directory" in a KToc and thus steps through the
- * list of elements in a directory.  Only the name is made available at each
- * step.  That worked better for sysdir than arcdir from where this was 
- * borrowed (it was called SysDirEnum there)
- *
- * It is primarily used to build a directory listing.
- *
- * This iterator is a once through iterator.  Whack must be called after Init
- * or a dangling reference is left open.  Init can be called again but only if 
- * Whack was indeed called.
- *
- * NOTE:
- * This class unlike most in the KFS system is built in place and is not
- * constructed by default allocating memory in the constructor.
- * This means it can not be truly opaque as the structure of the base struct
- * has to be exposed so it can be created.
- */
-
-
-/*--------------------------------------------------------------------------
- * KArcDirIterator
- *
- * a ArcDir directory enumerator/iterator getting the names of elements in
- * the TOC.
- *
- * const KToc *	  toc		a keep alive so the BSTree won't go
- *					away in the middle
- * union                  u		A union to allow pointers to base and
- *					derivative class
- *					without casting
- *   const BSTNode * 	  bnp		point to a node as a BSTNode
- *   const KTocEntry *  tnp		point to a node as a KTocEntry
- * bool                   isFirst;	upon creation this flag is set to true;
- *					set to false the first next call
- */
-typedef struct KArcDirIterator 	
-{
-    const KToc * toc;	        /* a keep alive so the BSTree won't go away in the middle */
-    union
-    {
-        const BSTNode * bnp;	/* point to a node as a BSTNode */
-        const KTocEntry * tnp;	/* point to a node as a KTocEntry */
-    }			u;
-    bool isFirst;	            /* upon creation this flag is set to true
-                                   set to false the first next call */
-} KArcDirIterator;
-
-
-/* ----------------------------------------------------------------------
- * KArcDirIteratorWhack
- * 	The Object destructor
- * [INOUT] KArcDirIterator *self	Iterator self reference: object oriented in C
- */
-static
-void KArcDirIteratorWhack (KArcDirIterator *self)
-{
-    KTocRelease ( self -> toc );
-}
-
-
-/* ----------------------------------------------------------------------
- * KArcDirIteratorInit
- * 
- * The object constructor
- *
- * [OUT] KArcDirIterator *	self		Iterator self reference: object oriented in C
- * [IN]  const KArcDir * 	arcdir		A directory that contains beneath it (or as it)
- *						the directory to be iterated.
- * [IN]	 const char * 		path		The directory to be iterated as referenced from
- *						arcdir.
- *
- * To iterate arcdir use a path of ".".
- */
-static
-rc_t KArcDirIteratorInit (KArcDirIterator *self, const KArcDir * arcdir, 
-                          const char * path)
-{
-    const BSTree * 	tree;
-    const KTocEntry * node;
-    const KToc *	toc;
-    KTocEntryType	type;
-    rc_t		rc;
-
-    /* is self parameter possibly bad? */
-    if (self == NULL)
-        return RC (rcFS, rcDirectory, rcConstructing, rcSelf, rcNull);
-
-    self->toc = NULL;
-    self->isFirst = true;	/* warning squelcher ? that breaks type opacity */
-    self->u.bnp = NULL;
-
-    /* is another parameter possibly bad? */
-    if ((path == NULL)||(arcdir == NULL))
-        return RC (rcFS, rcDirectory, rcConstructing, rcParam, rcNull);
-
-    if (KArcDirGetTOC(arcdir,&toc) != 0)
-        return RC (rcFS, rcDirectory, rcConstructing, rcParam, rcNotFound);
-
-    self->toc = toc;
-    KTocAddRef(toc);
-
-    /* get the KTocEntry from which all things are possible */
-    rc = KArcDirResolvePathNode (arcdir, rcConstructing, path, true, &node, &type);
-    if ( rc == 0 )
-    {
-        if ((type == ktocentrytype_dir) || (type == ktocentrytype_hardlink))
-        {
-            rc = KTocEntryGetBSTree (node, &tree);
-            if (rc == 0)
-            {
-                /* success */
-                self->u.bnp = BSTreeFirst(tree);
-                return 0;
-            }
-        }
-        else
-        {
-            rc = RC (rcFS, rcDirectory, rcConstructing, rcParam, rcInvalid);
-        }
-    }
-
-    /* failure */
-    KTocRelease (self->toc);
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KArcDirIteratorNext
- *
- * Go to the next node (or the first node if the iterator has not been used.
- *
- * [RET]   const char * 			The return is the name of the next element
- * [INOUT] KArcDirIterator *	self		Iterator self reference: object oriented in C
- */
-static const char * KArcDirIteratorNext (KArcDirIterator *self)
-{
-    const char * name;
-
-    assert (self != NULL);
-
-    /* -----
-     * The initialization put the first node's address into the pointer
-     * so do do nothing about the pointer before using it except say we
-     * need to update it next time.
-     */
-    if (self->isFirst)
-    {
-        self->isFirst = false;
-    }
-    /* -----
-     * After the first time we need to bump the pointer until it can't be bumped.
-     */
-    else	
-    {
-        /* -----
-         * It's not specified in klib/container.h but BSTNodeNext
-         * returns NULL at end of tree
-         * [ WHAT ELSE WOULD IT RETURN? ]
-         */
-        self->u.bnp = BSTNodeNext (self->u.bnp);
-    }
-
-    /* -----
-     * The first test isn't necesary so letting KTocEntryGetName return NULL
-     * could be used instead of the extra check.
-     * Checking against NULL adds a little to each call while not checking
-     * adds more but only to the last call.
-     * Pick your poison.
-     */
-    if ((self->u.bnp == NULL) || (KTocEntryGetName (self->u.tnp, &name) != 0))
-    {
-        return NULL;
-    }
-    return name;
-}
-
-
-/* ======================================================================
- */
-typedef struct KArcListing KArcListing;
-
-#define KNAMELIST_IMPL struct KArcListing
-#include <klib/impl.h>
-
-/*--------------------------------------------------------------------------
- * KArcListing
- *  a directory listing
- *
- * NOTE:
- * This is nearly identical to KSysDirListing but both are currently private to
- * their compilation units.
- */
-struct KArcListing
-{
-    KNamelist     dad;      /* base class */
-    const char ** namelist; /* pointer to a malloced array of pointers to names */
-    int           cnt;      /* specific size chosen by compiler for efficiency */
-};
-
-
-/* ----------------------------------------------------------------------
- * KArcListingWhack
- *
- * Class destructor
- *
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [INOUT] const KArcListing* self		Listing self reference: object oriented in C
- */
-static
-rc_t CC KArcListingWhack (const KArcListing *self)
-{
-    int ix;
-    for ( ix = 0; ix < self->cnt; ++ix )
-    {
-        free ( (void*)self->namelist[ix] );
-    }
-    free ( (void*)self->namelist );
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * KArcListingDestroy
- * Class destructor
- *
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [INOUT] KArcListing *	self		Listing self reference: object oriented in C
- */
-static
-rc_t CC KArcListingDestroy (KArcListing *self)
-{
-    rc_t rc = KArcListingWhack (self);
-    if (rc == 0)
-        free (self);
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KArcListingCount
- *
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN]  const KArcListing *	self		Listing self reference: object oriented in C
- * [OUT] uint32_t *		count		Where to put the count of names
- */
-static rc_t CC KArcListingCount (const KArcListing *self, uint32_t *count)
-{
-    *count = self->cnt;
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * KArcListingGet
- *
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN]  const KArcListing *	self		Listing self reference: object oriented in C
- * [IN]  uint32_t		idx		?
- * [OUT] const char **		name		Where to put the name
- */
-static rc_t CC KArcListingGet (const KArcListing *self, uint32_t idx, const char **name)
-{
-    if (idx >= (uint32_t)self->cnt)
-        return RC (rcFS, rcNamelist, rcAccessing, rcParam, rcExcessive);
-    * name = self -> namelist [ idx ];
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * KArcListingSort
- *
- * This function has the signature needed to use with the NameList base class for
- * KArcListings to determine the order of two names.  Matches the signature of
- * strcmp() and other functions suitable for use by qsort() and others
- *
- * [RET] int					0:  if a == b 
- *						<0: if a < b
- *						>0: if a > b
- * [IN] const void *		a
- * [IN] const void *		b
- *
- * Elements are typed as const void * to match the signature needed for 
- * a call to qsort() but they should be pointers to namelist elements
- */
-static int64_t CC KArcListingSort (const void *a, const void *b, void * ignored)
-{
-    return strcmp (*(const char**)a, *(const char**)b);
-}
-
-static KNamelist_vt_v1 vtKArcListing =
-{
-    /* version 1.0 */
-    1, 0,
-
-    /* start minor version 0 methods */
-    KArcListingDestroy,
-    KArcListingCount,
-    KArcListingGet
-    /* end minor version 0 methods */
-};
-
-
-/* ----------------------------------------------------------------------
- * KArcListingInit
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [INOUT] KArcListing *	self		Listing self reference: object oriented in C
- * [IN]    const char *		path		?
- * [IN]    const KDirectory *	dir		?
- * [IN]    bool (* 		f	)(const KDirectory*, const char*, void*),
- *						This is a filter function - any listing element
- *						passed to this function will generate a true ot
- *						a false.  If flase that listing element is dropped.
- *						If this parameter is NULL all elements are kept.
- * [IN]	   void *		data		Ignored.  May use NULL if permitted
- *						by 'f'.
- */
-static rc_t KArcListingInit (KArcListing *self,
-                             const char *path,
-                             const KDirectory *dir,
-                             bool (CC* f) (const KDirectory*, const char*, void*),
-                             void *data)
-{
-    rc_t rc;
-
-    /* is self parameter possibly NULL? */
-    if (self == NULL)
-    {
-        return  RC (rcFS, rcDirectory, rcConstructing, rcSelf, rcNull);
-    }
-
-    /* start with an empty name list */
-    self->namelist = NULL;
-    self->cnt = 0;
-
-    /* initialize the Namelist base class */
-    if ((rc = KNamelistInit (& self -> dad,
-			     (const KNamelist_vt*)&vtKArcListing)) == 0)
-    {
-        /* -----
-         * so we'll build a list iterator
-         */
-        KArcDirIterator listitr;
-
-        if ((rc = KArcDirIteratorInit (& listitr, (const KArcDir*)dir, path)) == 0)
-        {
-
-#define	LEN_INCREMENT	(512)
-
-            uint32_t len = LEN_INCREMENT;
-
-            /* allocate heap for the default start size of a namelist */
-
-            self->namelist = malloc (len * sizeof (self->namelist[0]));
-            if (self->namelist == NULL)
-            {
-                rc = RC (rcFS, rcDirectory, rcListing, rcMemory, rcExhausted);
-            }
-            else
-            {
-                void *r;
-                const char *name;
-
-                /* -----
-                 * loop through the directory (the BSTree for a Archive TOC)
-                 */
-                while ((name = KArcDirIteratorNext (&listitr)) != NULL)
-                {
-                    /* if there is a filter function, run it */
-                    if (f != NULL)
-                    {
-                        /* skip if the filter doesn't say use it */
-                        if (! (*f) (dir, name, data))
-                            continue;
-                    }
-		    
-                    /* if the buffer is full, reallocate it larger */
-                    if (self->cnt == len)
-                    {
-                        len += LEN_INCREMENT;
-                        if ( NULL == ( r = realloc ( (void*)self -> namelist,
-                                                     len * sizeof self -> namelist [ 0 ] ) ) )
-                        {
-                            /* -----
-                             * malloc failure so we fail too  - break not return so we can 
-                             * free allocated memory
-                             */
-                            rc = RC (rcFS, rcDirectory, rcListing, rcMemory, rcExhausted);
-                            break;
-                        }
-                        self->namelist = r;
-                    }
-                    
-                    /* get ourselves memory for the name */
-                    self->namelist[self->cnt] = malloc (strlen (name) + 1);
-                    if (self->namelist[self->cnt] == NULL)
-                    {
-                        /* oops a failure so we fail */
-                        rc = RC (rcFS, rcDirectory, rcListing, rcMemory, rcExhausted);
-                        break;
-                    }
-                    strcpy ((char*)self->namelist[self->cnt], name);
-                    ++self->cnt;
-                }
-		
-                if (rc == 0)
-                {
-                    /* -----
-                     * now that we have our list and know how big it should have been we'll shrink it
-                     * if the count was zero this a effectively just a free()
-                     */
-                    r = realloc ( ( void* )self->namelist,
-                                  self->cnt * sizeof ( self->namelist[0] ) );
-                    /* -----
-                     * if we have a new non-NULL pointer we know we have a list of non-zero length
-                     * store the pointer and sort the list
-                     */
-                    if (r != NULL)
-                    {
-                        self -> namelist = r;
-                        ksort ((void*)r, self -> cnt, sizeof self -> namelist [ 0 ], KArcListingSort, NULL);
-                    }
-                    /* -----
-                     * If we have a NULL pointer but have a non-zero count, we have a malloc() heap
-                     * space failure
-                     */
-                    else if (self -> cnt != 0)
-                    {
-                        rc = RC (rcFS, rcDirectory, rcListing, rcMemory, rcExhausted);
-                    }
-                    /* -----
-                     * Or we have a NULL pointer and a count of zero so stow the NULL so its not
-                     * a dangling bad pointer
-                     */
-                    else
-                    {
-                        self->namelist = r;
-                    }
-                }
-                /* if we got here because of a problem, kill the listing */
-                if (rc != 0)
-                {
-                    KArcListingWhack (self);
-                    self->namelist = NULL;
-                    self->cnt = 0;
-                }
-            }
-            /* we're done with the iterator so kill it */
-            KArcDirIteratorWhack (&listitr);
-        }
-    }
-    return rc;
-}
-
-
-/* ======================================================================
- */
-
-/*--------------------------------------------------------------------------
- * KArcDir
- *  a directory inside an archive (tar or SRA for example)
- *
- * This type is being engineered to mimic KSysDir.
- */
-struct KArcDir
-{
-    KDirectory		dad;					/* parent class as in inheritance */
-
-    const KDirectory *  parent;					/* parent object */
-    const KToc *	toc;					/* table of contents class */
-    const KTocEntry *	node;					/* table of contents entry NULL for top level */
-    KArcFSType	arctype;
-    union
-    {
-	const void *		v;
-	const KFile *		f;
-	const KDirectory * 	d;
-    } archive;
-
-    uint32_t	  	root;					/* offset of / in path to treat as root */
-    uint32_t 	  	size;					/* length of path */		
-    char 	  	path	 [KARC_DEFAULT_PATH_ALLOC];	/* name of archive = mount point */
-   
-/* actual allocation is based on actual string length */
-};
-
-static rc_t KArcDirMake (KArcDir ** self,
-                         enum RCContext ctx,
-                         const KDirectory * parent,
-                         const KToc * toc,
-                         const KTocEntry * node,
-                         const void * archive,
-                         KArcFSType baseType,
-                         uint32_t dad_root,
-                         const char *path,
-                         uint32_t path_size,
-                         bool update, /* ignored */
-                         bool chroot);
-
-
-/* ----------------------------------------------------------------------
- * KArcDirDestroy
- */
-static rc_t CC KArcDirDestroy (KArcDir *self)
-{
-    if (self->toc != NULL)
-        KTocRelease (self->toc);
-
-    if (self->archive.v != NULL) switch (self->arctype)
-	{
-	default:
-	    free ((void*)self->archive.v);
-	    break;
-	case tocKFile:
-	    KFileRelease (self->archive.f);
-	    break;
-	case tocKDirectory:
-	    KDirectoryRelease (self->archive.d);
-	    break;
-	}
-    free (self);
-
-    return 0;
-}
-
-
-
-/* ----------------------------------------------------------------------
- * KArcDirCanonPath
- *
- * In this context CanonPath means to make the path a pure /x/y/z with no back tracking 
- * by using ~/../~ or redundant ~/./~ or ~//~ here notations.  Not exactly the usage of 
- * canonical in describing a path in other places but consistent within KFS.  It matches
- * the common meaning of canonical path as the one true path except that processing out
- * of sym links isn't done here but would normally have been.  Not processing the 
- * links means potentially more than one canonical path can reach the same target 
- * violating the usual meaning of canonical path as the one true shortest path to any
- * element.
- *
- * const KArcDir *		self		Object oriented C; KArcDir object for this method
- * enum RCContext 		ctx
- * char * 			path
- * size_t			psize
- */
-static
-rc_t		KArcDirCanonPath	(const KArcDir *self,
-					 enum RCContext ctx,
-					 char *path,
-					 size_t psize)
-{
-    char *	low;	/* a pointer to the root location in path; not changed after initialization */
-    char *	dst;	/* a target reference for compressing a path to remove . and .. references */
-    char *	last;	/* the end of the last processed facet of the path */
-    char *	end;	/* absolute end of the incoming path */
-    char * 	src;	/* the start of the current facet to be processed */
-
-    /* end is the character after the end of the incoming path */
-    end = path + psize;
-
-    /* point all other temp pointers at the root point in the incoming path */
-    last = path + self->root;
-
-    /* handle windows / / network path starter */
-    if ((last == path) && (last[0] == '/') && (last[1] == '/'))
-      last ++;
-
-    low = dst = last;
-
-    for (;;)
-    {
-
-        /* point at the first / after the most recent processed facet */
-        src = strchr (last + 1, '/');
-        if (src == NULL)	/* if no '/' point to the end */
-            src = end;
-
-        /* detect special sequences */
-        switch (src - last)
-        {
-        case 1: /* / / (with nothing between) is a superflouous / hurting us to parse later;
-                 * /. is a here reference to the same directory as the previous */
-            if ((last[1] == '/')||(last[1] == '.'))
-            {
-                /* skip over */
-                last = src;
-                if (src != end)
-                    continue;
-            }
-            break;
-        case 2: /* /./ is a "here" reference point and is omitted by not copying it over */
-            if (last[1] == '.')
-            {
-                /* skip over */
-                last = src;
-                if (src != end)
-                    continue;
-            }
-            break;
-
-        case 3: /* /../ is a up one directory and is processed by deleting the last facet copied */
-            if (last [1] == '.' && last [2] == '.')
-            {
-                /* remove previous leaf in path */
-                dst [ 0 ] = 0;
-                dst = strrchr (path, '/');
-                /* can't up a directory past the root */
-                if (dst == NULL || dst < low)
-                {
-                    return RC (rcFS, rcDirectory, ctx, rcPath, rcInvalid);
-                }
-
-                last = src;
-                if (src != end)
-                    continue;
-            }
-            break;
-        }
-
-        /* if rewriting, copy leaf */
-        if (dst != last)
-        {
-            memmove (dst, last, src - last);
-        }
-
-        /* move destination ahead */
-        dst += src - last;
-        
-        /* if we're done, go */
-        if (src == end)
-            break;
-
-        /* find next separator */
-        last = src;
-    }
-
-    /* NUL terminate if modified */
-    if (dst != end)
-        * dst = 0;
-
-    /* say we did did it with no problems */
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * KArcDirMakePath
- *
- *  creates a full path from partial
- *
- * [IN]  const KArcDir *	self	object oriented self
- * [IN]  enum RCContext		ctx	a hint for context in building
- *					an error return rc_t
- * [IN]  bool			canon	Should the output be made 
- *					canonical per KDirectory's
- *					definition of canonical
- * [OUT] char **		pbuffer The output path
- * [IN]  const char *		path	The input path
- * [IN]  va_list		args	Possible additions to path
- */
-static
-rc_t KArcDirMakePath (const KArcDir *self,
-		      enum RCContext ctx,
-		      bool canon,
-		      char ** pbuffer,
-		      const char *path,
-		      va_list args)
-{
-    int    psize;	/* 'printed' size - output from vsnprintf */
-    size_t asize;	/* allocated buffer size */
-    size_t bsize;	/* base size */
-    char * buffer;
-
-    /* -----
-     * Validate parameters and fail if unusable
-     */
-    assert (path != NULL);
-    assert (pbuffer != NULL);
-
-    if (path == NULL)
-    {
-	return RC (rcFS, rcDirectory, ctx, rcPath, rcNull);
-    }
-    if (path[0] == 0)
-    {
-	return RC (rcFS, rcDirectory, ctx, rcPath, rcInvalid);
-    }
-
-    buffer = NULL;
-    asize = KARC_DEFAULT_PATH_ALLOC;
-    for (;;)
-    {
-	/* -----
-	 * allocate a buffer of the default size or a better size determined below
-	 */
-	buffer = realloc (buffer, asize);
-	*pbuffer = buffer;
-	if (buffer == NULL)
-	{
-	    return RC (rcFS, rcDirectory, rcAllocating, rcPath, rcExhausted);
-	}
-	/* -----
-	 * inherited from linux/sysdir.c
-	 *
-	 * if path starts with % we build something out of va_list?
-	 *
-	 * use vsnprintf (printf to string with size limit and argument list
-	 *	pointer instead of a list of arguments:
-	 * build path to buffer using a path that is a printf format string
-	 * with a requirement that the first thing in the format be a format inducing %
-	 */
-	if ((args != NULL) && (path[0] == '%'))
-	{
-	    psize = vsnprintf (buffer, asize, path, args);
-
-	    /* -----
-	     * decoding of path failed due a failure of printf
-	     * <0 is an unspecified failure unspecified (check errno?)
-	     */
-	    if (psize < 0)
-            return RC (rcFS, rcDirectory, ctx, rcPath, rcUnknown);
-
-	    /* -----
-	     * decoding of path failed due to length truncation
-	     * try to realloc using a larger size
-	     */
-	    if ( (size_t)psize >= asize )
-	    {
-            asize = psize;
-            continue;
-	    }
-
-	    /* -----
-	     * maybe the decoded path is a relative partial path
-	     */
-	    if (buffer[0] != '/')
-	    {
-            /* -----
-             * if our KArcDir self has a mount point self->path of length more than 0
-             * but that length isn't too long to prepend it to the derived path than
-             * move the derived path over making room for the KArcDir base path and 
-             * then insert that base at the beginning
-             */
-            bsize = self->size;
-            if (bsize + psize >= asize)
-            {
-                asize = bsize + psize;
-                continue;
-            }
-            /* make room */
-            memmove (buffer + self->size, buffer, psize+1);
-            /* fail if the kDirectory path doesn't end in /? (inherited) */
-            assert (self->path[bsize-1] == '/');
-            /* prepend self's path */
-            memcpy (buffer, self->path, bsize);
-	    }
-
-	    /* -----
-	     * or maybe we have a path base for the KArcDir
-	     */
-	    else if ((bsize = self->root) != 0)
-	    {
-            /* -----
-             * if we got a full path from the decoding do the same thing but only the
-             * amount of the self's path that is up to an effective "chroot" point
-             */
-            if (bsize + psize >= asize)
-            {
-                asize = bsize + psize;
-                continue;
-            }
-            memmove (buffer + self->size, buffer, psize+1);
-            assert (self->path [bsize-1] != '/');
-            memcpy (buffer, self -> path, bsize);
-	    }
-	    /* -----
-	     * or maybe the new path is cool as is.  unlikely?
-	     */
-	}
-	else
-	{
-	    /* -----
-	     * copy a partial/relative  path parameter into the buffer leaving room for the
-	     * self's base path
-	     */
-	    if (path[0] != '/')
-	    {
-            assert (self->path[self->size - 1] == '/');
-            memcpy (buffer, self->path, bsize = self->size);
-	    }
-	    /* -----
-	     * copy the pre-root portion of the self's path into the buffer
-	     */
-	    else if ((bsize = self->root) != 0)
-	    {
-            assert (self->path[bsize-1] != '/');
-            memcpy (buffer, self->path, bsize);
-	    }
-
-	    /* -----
-	     * okay use snprintf to append the incoming path into the buffer after the
-	     * self's base or root either using a simple string format or again assuming
-	     * that the path has printf format symbols if there are arguments in the
-	     * va_list
-	     */
-	    if (args == NULL)
-            psize = snprintf (buffer+bsize, asize-bsize, "%s", path);
-	    else
-            psize = vsnprintf (buffer+bsize, asize-bsize, path, args);
-
-	    /* -----
-	     * decoding of path failed due a failure of printf
-	     * <0 is an unspecified failure unspecified (check errno?)
-	     */
-	    if (psize < 0)
-            return RC (rcFS, rcDirectory, ctx, rcPath, rcUnknown);
-
-	    /* -----
-	     * decoding of path failed due to length truncation
-	     * try to realloc using a larger size
-	     */
-	    if (bsize+psize >= asize)
-	    {
-            asize = bsize+psize;
-            continue;
-	    }
-	}
-	break;
-    }
-    /* -----
-     * if the last character is a '/' get rid of it?
-     */
-    if (buffer[bsize+psize] == '/')
-        buffer[bsize+(--psize)] = 0;
-
-    /* -----
-     * if the incoming path turns out to be a single character (I think) AND
-     * we either have the canon flag set or if the the KArcDir root is not empty
-     * "canonize" it.
-     */
-    if (canon || (self->root != 0))
-    {
-        return KArcDirCanonPath (self, ctx, *pbuffer, bsize+psize);
-    }
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * KArcDirList
- *  create a directory listing
- *
- *  "list" [ OUT ] - return parameter for list object
- *
- *  "path" [ IN, NULL OKAY ] - optional parameter for target
- *  directory. if NULL, interpreted to mean "."
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN]	 const KArcDir *	self		Object oriented C; KArcDir object for this method
- * [OUT] KNamelist **		listp,
- * [IN]  bool (* 		f	)(const KDirectory*,const char *, void *)
- * [IN]  void *			data
- * [IN]  const char *		path
- * [IN]  va_list		args
- */
-static
-rc_t CC KArcDirList (const KArcDir *self,
-                     KNamelist **listp,
-                     bool (CC* f) (const KDirectory *dir, const char *name, void *data),
-                     void *data,
-                     const char *path,
-                     va_list args)
-{
-    char * full_path;
-    rc_t rc;
-
-    rc = KArcDirMakePath (self, rcListing, true,
-			  &full_path, path, args);
-    if (rc == 0)
-    {
-	const KTocEntry * pnode;
-	KTocEntryType	type;
-	KArcDir * full_dir;
-
-	rc = KArcDirResolvePathNode(self, rcListing, full_path, true, &pnode, &type);
-	if (rc == 0)
-	{
-	    rc = KArcDirMake (&full_dir,
-			      rcListing,
-			      self->parent,
-			      self->toc,
-			      pnode,
-			      self->archive.v,
-			      self->arctype,
-			      self->root,
-			      full_path,
-			      (uint32_t)strlen(full_path),
-			      false, 
-			      0);
-	    if (rc == 0)
-	    {
-		KArcListing *list = malloc (sizeof *list);
-
-		if (list == NULL)
-		{
-		    rc = RC (rcFS, rcDirectory, rcListing, rcMemory, rcExhausted);
-		}
-		else
-		{
-		    rc = KArcListingInit (list,
-					  full_dir->path,
-					  &full_dir->dad,
-					  f,
-					  data);
-
-		    if (rc != 0)
-		    {
-			free (list);
-		    }
-		    else
-		    {
-			*listp = &list->dad;
-		    }
-		}
-		KArcDirDestroy (full_dir);
-	    }
-	}
-	free (full_path);
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KArcDirFullPathType
- *
- * Get the KDirectory defined KPathType for whatever is referred to 
- * by path that is accessible through the KArcDir self.  The path's
- * root is based on self's root (?) and a relative path is relative to 
- * self.
- *
- * [RET] uint32_t			actually this is enum KPathType
- * [IN]  const KArcDir *	self	base KDirectory for the call to
- *					find the type of path
- * [IN]  const char * 		path	what path of which to type the
- *					last facet
- */
-static
-uint32_t KArcDirFullPathType (const KArcDir *self, const char * path)
-{
-    const KTocEntry * node;
-    const char *	local_path = path;
-    KTocEntryType	type;
-    uint32_t		tt = 0;
-    int			loopcount;
-    rc_t		rc;
-
-    assert (self != NULL);
-    assert (path != NULL);
-
-    for (loopcount = 0; loopcount < KARC_LINK_RESOLVE_LOOPMAX; ++loopcount)
-    {
-        rc = KArcDirResolvePathNode (self,
-            rcConstructing, local_path, false, &node, &type); 
-        if (rc != 0)
-        {
-            /* TODO: filter rc into kptBadPath or kptNotFound... */
-            return (tt | kptNotFound);
-        }
-        switch (type)
-        {
-        default:
-            return kptBadPath;
-
-        case ktocentrytype_unknown:
-            return kptBadPath;
-
-        case ktocentrytype_hardlink:
-            return kptDir;
-
-        case ktocentrytype_dir:
-            return tt | kptDir;
-
-        case ktocentrytype_file:
-        case ktocentrytype_emptyfile:
-            return tt | kptFile;
-
-        case ktocentrytype_chunked:
-            return tt | kptFile;
-
-        case ktocentrytype_softlink:
-            tt = kptAlias;
-            if (KTocEntryGetSoftTarget(node,&local_path) != 0)
-                return kptAlias|kptNotFound;
-            break;
-
-        case ktocentrytype_zombiefile:
-            PLOGMSG (klogWarn, (klogWarn,
-                "zombie file detected: '$(P)'", "P=%s", path));
-            ReportRecordZombieFile();
-            return tt | kptZombieFile;
-
-        }
-    }
-    return kptBadPath;
-}
-
-
-/* ----------------------------------------------------------------------
- * KArcDirPathType
- *  returns a KPathType
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- *
- * [RET] uint32_t
- * [IN]  const KArcDir *	self		Object oriented C; KArcDir object for this method
- * [IN]  const char *		path
- * [IN]  va_list		args
- */
-static uint32_t CC KArcDirPathType (const KArcDir *self, const char *path, va_list args)
-{
-    rc_t	rc;
-    uint32_t 	type;
-    char * 	full;
-
-    rc = KArcDirMakePath (self, rcAccessing, false, &full, path, args);
-
-    if (rc == 0)
-    {
-        type = KArcDirFullPathType (self, full);
-        free (full);
-    }
-    else
-    {
-        type = kptBadPath;
-    }
-    return type;
-}
-
-
-/* ----------------------------------------------------------------------
- * KArcDirVisitDir
- *
- * [IN] KArcDirVisitData *	pb
- */
-typedef struct KArcDirVisitData		
-{
-    rc_t   (CC* f )(const KDirectory*, uint32_t, const char*, void*);
-    void *      data;
-    KArcDir *   dir;
-    bool        recurse;
-} KArcDirVisitData;
-
-
-static
-rc_t KArcDirVisitDir(KArcDirVisitData *pb)
-{
-    /* get a directory listing */
-    KArcDirIterator 	listing;
-    rc_t		rc; 
-
-    assert (pb != NULL);
-
-    rc = KArcDirIteratorInit (&listing, pb->dir, pb->dir->path);
-    if (rc == 0)
-    {
-        const char * base;
-        const char * name;
-        char * full_name = NULL;
-        uint32_t 	size;
-
-        size = pb->dir->size;
-        base = pb->dir->path;
-
-        for(pb->dir->size = size, name = KArcDirIteratorNext (&listing);
-            name != NULL; name = KArcDirIteratorNext (&listing))
-        {
-            uint32_t len = (uint32_t)strlen (name);
-            free(full_name);
-            full_name = malloc(size + len + 1);
-
-            if(full_name == NULL) {
-                rc = RC (rcFS, rcDirectory, rcVisiting, rcMemory, rcExhausted);
-                break;
-            } else {
-                const KTocEntry *	pnode;
-                KTocEntryType		type;
-                /* -----
-                * build up the path from the base and the name
-                */
-                memcpy(full_name, base, size);
-                memcpy(full_name+size, name, len);
-                full_name[size+len] = 0;
-
-                rc = KArcDirResolvePathNode(pb->dir, rcVisiting, full_name,
-                                            true, &pnode, &type);
-                if(rc != 0) {
-                    break;
-                }
-                /* -----
-                * call the function per visit
-                */
-                /* type is wrong "type"  needs to be a kpt not karctoctype */
-                {
-                    uint32_t kptype;
-                    kptype = KArcDirFullPathType(pb->dir, full_name);
-                    rc = pb->f(&pb->dir->dad, kptype, name, pb->data);
-                }
-                if(rc != 0) {
-                    break;
-                }
-                if(pb->recurse && ((type == ktocentrytype_dir)||(type == ktocentrytype_hardlink))) {
-                    KArcDir * rdir;
-                    KArcDirVisitData rpb;
-
-                    rc = KArcDirMake(&rdir, rcVisiting, pb->dir->parent, pb->dir->toc,
-                                     pnode, pb->dir->archive.v, pb->dir->arctype, pb->dir->root,
-                                     full_name, (uint32_t)strlen ( full_name ), false, false);
-                    if(rc != 0) {
-                        break;
-                    }
-                    rpb.f = pb->f;
-                    rpb.data = pb->data;
-                    rpb.dir = rdir;
-                    rpb.recurse = pb->recurse;
-                    rc = KArcDirVisitDir(&rpb);
-                    KArcDirDestroy(rdir);
-                    if(rc != 0) {
-                        break;
-                    }
-                }
-            }
-        }
-        free(full_name);
-        KArcDirIteratorWhack (& listing);
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KArcDirRelativePath
- *
- * KArcDirRelativePath
- *  makes "path" relative to "root"
- *  both "root" and "path" MUST be absolute
- *  both "root" and "path" MUST be canonical, i.e. have no "//", "/./" or "/../" sequences
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN] const KArcDir *		self		Object oriented C; KArcDir object for this method
- * [IN] enum RCContext 		ctx
- * [IN] const char *		root
- * [IN, OUT] char *			path
- * [IN] size_t			path_max
- */
-static
-rc_t KArcDirRelativePath (const KArcDir *self, enum RCContext ctx,
-			  const char *root, char *path, size_t path_max)
-{
-    int backup;
-    size_t bsize, psize;
-
-    const char *r = root + self -> root;
-    const char *p = path + self -> root;
-
-    assert (r != NULL && r [ 0 ] == '/');
-    assert (p != NULL && p [ 0 ] == '/');
-
-    for (; * r == * p; ++ r, ++ p)
-    {
-        /* disallow identical paths */
-        if (* r == 0)
-            return RC (rcFS, rcDirectory, ctx, rcPath, rcInvalid);
-    }
-
-    /* paths are identical up to "r","p"
-       if "r" is within a leaf name, then no backup is needed
-       by counting every '/' from "r" to end, obtain backup count */
-    for (backup = 0; * r != 0; ++ r)
-    {
-        if (* r == '/')
-            ++ backup;
-    }
-
-    /* the number of bytes to be inserted */
-    bsize = backup * 3;
-
-    /* align "p" to last directory separator */
-    while (p [ -1 ] != '/') -- p;
-
-    /* the size of the remaining relative path */
-    psize = strlen (p);
-
-    /* open up space if needed */
-    if ( (size_t)(p - path) < bsize )
-    {
-        /* prevent overflow */
-        if (bsize + psize >= path_max)
-            return RC (rcFS, rcDirectory, ctx, rcPath, rcExcessive);
-        
-        memmove (path + bsize, p, psize);
-    }
-
-    /* insert backup sequences */
-    for (bsize = 0; backup > 0; bsize += 3, -- backup)
-        memcpy (& path [ bsize ], "../", 3);
-
-    /* close gap */
-    if ( (size_t)( p - path ) > bsize )
-	{
-		memmove (path + bsize, p, psize + 1);
-	}
-
-	return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * KArcDirResolvePathNode
- *
- * Resolve a path to a KToc Node with a triple return type of
- * success/failure, KTocEntry to use to access the leaf of the path,
- * and the type of the node that could have been easily obtained from 
- * that node
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN]  const KArcDir *      self	OOP in C self/this pointer
- * [IN]  const char *         path	the path to resolve
- * [IN]  bool		      follow	Follow any links
- * [OUT] const KTocEntry ** pnode	a pointer that will point to the 
- *					ArcTOCNode for the path
- * [OUT] KTocEntryType *    ptype	Archive specific type for the
- *					entry matching path
- * TODO: Make this prettier for human readabilty by breaking out into sub-functions?
- */
-static
-rc_t	KArcDirResolvePathNode	(const KArcDir *	self,
-				 enum RCContext 	ctx,
-				 const char *		path,
-				 bool			follow,
-				 const KTocEntry ** 	pnode,
-				 KTocEntryType * ptype)
-{
-    rc_t		rc = 0;
-
-    assert (self != NULL);
-    assert (path != NULL);
-    assert (pnode != NULL);
-    assert (ptype != NULL);
-
-    *pnode = NULL;
-    *ptype = ktocentrytype_unknown;
-
-    if (path[0] == 0)
-    {
-        rc = RC (rcFS, rcDirectory, ctx, rcPath, rcInvalid);
-    }
-    else
-    {
-	/* -----
-	 * This loop is to replace recursive approaches to resolving sym links in 
-	 * the path.before the last facet.
-	 *
-	 * we used temp_path as an alias for path because we can "recur" by 
-	 * going through the loop iteratively instead of recursively changing
-	 * temp_path each time where we would have called this function again
-	 */
-	const char *	temp_path = path;	/* no alloc */
-	const KToc *	toc = self->toc;	/* no alloc */
-	char *		allocated_path = NULL;	/* alloc; must free{} */
-	char * 		abpath = NULL;		/* alloc; must free{} */
-
-	while(rc == 0) /* loop as long as no failures or until break */
-	{
-	    /* -----
-	     * clean up the path to its KFS canonical form
-	     */
-	    if (abpath != NULL)
-            free (abpath);
-	    rc = KArcDirMakePath (self, ctx, /* canon*/true, &abpath,
-                              temp_path, NULL);
-	    if (rc != 0)
-	    {
-            /* -----
-             * If we couldn't "make the path" we'll just fail passing along
-             * the fail reason from MakePath.
-             */
-            break;	/* TODO fix rc context? Object? */
-	    }
-	    else
-	    {
-            const String * pathstring;
-
-            rc = KTocGetPath (toc, &pathstring);
-            /* -----
-             * validate that this canonical path is in the TOC
-             */
-            if (strncmp(abpath, pathstring->addr, pathstring->size) != 0)
-            {
-                /* -----
-                 * This is a key return as it could be used to trigger a call to 
-                 * a containing "parent" KDirectory to try again outside of this KArcDir
-                 * be it another KArcDir, KSysDir, or other KDirectory interface 
-                 * implementation.
-                 */
-                rc = RC (rcFS, rcDirectory, ctx, rcPath, rcOutOfKDirectory);
-                break;
-            }
-            else
-            {
-                const KTocEntry *	node;		/* no alloc */
-                const String *	toc_path_string;	/* no alloc */
-                const char *	toc_path;		/* no alloc */
-                const char *	left;		/* no alloc */
-                KTocEntryType	type  = ktocentrytype_unknown;
-                /* -----
-                 * now get the path that is just that which is inside the TOC by pointing
-                 * past the path of the TOC and get the relevant TOC.  Since the incoming path
-                 * and the "makepath" path have all been ASCIZ so is this abbreviated path.
-                 */
-
-
-                rc = KTocGetPath (toc, &toc_path_string);
-                toc_path = abpath + toc_path_string->size; /* point past toc's path to either NUL or '/' */
-                if (toc_path[0] == '/')		/* if '/' move forward one char */
-                    toc_path++;
-                else if (toc_path[0] != 0x00)	/* if not NUL we are not in this TOC */
-                {
-                    rc = RC (rcFS, rcDirectory, ctx, rcPath, rcOutOfKDirectory);
-                    break;
-                }
-
-                /* if the called resolve failed then this resolve fails too */
-                rc = KTocResolvePathTocEntry (toc, &node, toc_path, strlen(toc_path), &type, &left);
-                if (rc != 0)
-                {
-                    /* nothing? or fix ret? */
-                }
-                else if (type != ktocentrytype_softlink)
-                {
-                    /* -----
-                     * This is the non soft link successful result
-                     */
-                    *ptype = type;
-                    *pnode = node;
-                    /* rc is 0 at this point */
-                    break; /* out of for (;;) */
-                }
-                else
-                {
-                    size_t	lsize;
-			
-                    /* -----
-                     * successful so far but there might still be some path left if we hit a soft link
-                     */
-                    lsize = strlen(left);	/* points to NUL for empty string if we got to the end */
-
-                    if ((lsize == 0) && (! follow))
-                    {
-                        /* -----
-                         * This is a soft link successful result
-                         */
-                        *ptype = type;
-                        *pnode = node;
-                        /* rc is 0 at this point */
-                        break; /* out of for (;;) */
-                    }
-                    /* -----
-                     * If we did hit a soft link with path remaining we have work to do resolving the
-                     * facets in the path before the end.
-                     *
-                     * the remaining path could be as little as a single "/".
-                     */
-                    else
-                    {
-                        const char *	symlink_path;		/* no alloc */
-                        rc = KTocEntryGetSoftTarget(node, &symlink_path);
-                        if (rc != 0)
-                        {
-                            /* fix rc_t? */
-                            break;
-                        }
-                        else
-                        {
-                            /* -----
-                             * If the symbolic link's path starts with '/' it is an absolute path
-                             */
-                            if (symlink_path[0] == '/')
-                            {
-                                temp_path = symlink_path;
-                                continue; /* back to for(;;) */
-                            }
-                            else
-                            {
-                                /* -----
-                                 * if the first character isn't '/' it is relative to the current
-                                 * directory within the TOC
-                                 */
-                                size_t		asize;		/* allocated size */
-                                size_t		fsize;		/* first - before symlink - size */
-                                size_t  	ssize;		/* symlink value size */
-                                const char * 	backtrack;
-                                /* -----
-                                 * Backtrack across the last facet - which was the link name
-                                 */
-                                for (backtrack = left - 1; *backtrack != '/'; --backtrack)
-                                    ;
-                                backtrack++; /* get back the '/' */
-
-                                /* -----
-                                 * we need enough space for the 
-                                 */
-                                fsize = backtrack - abpath;	/* current path through start of link */
-                                ssize = strlen(symlink_path);/* length of the link's replacement value */
-                                asize = fsize+ssize+lsize+1;/* total of the three pieces and NUL */
-                                allocated_path		/* get a temp buffer to build this new path */
-                                    = realloc (allocated_path, asize);
-                                if (allocated_path == NULL)
-                                {
-                                    rc = RC (rcFS, rcDirectory, ctx, rcMemory, rcExhausted);
-                                    break; /* end for(;;) */
-                                }
-                                else
-                                {
-                                    char * pc;
-                                    /* -----
-                                     * TODO verify that there is or is not a problem
-                                     * with  "~//~" showing up from these memcopies
-                                     * and that a final NUL is added add extra buffer
-                                     * space as needed to asize
-                                     */
-                                    memcpy (allocated_path, abpath, fsize);
-                                    pc = allocated_path + fsize;
-                                    memcpy (pc, symlink_path, ssize);
-                                    pc += ssize;
-                                    if (*(pc-1) == '/')
-                                        --pc;
-                                    memcpy (pc, left, lsize+1);
-                                    temp_path = allocated_path;
-                                    continue;
-
-                                } /* if (allocated_path == NULL) {} else { */
-                            } /* if (symlink_path[0] == '/') {} else { */
-                        } /* if (rc != 0) {} else { */
-                    } /* if ((lsize == 0) && (! follow)) {} else { */
-                } /* if (rc != 0) {} else if (type != ktocentrytype_softlink) {} else { */
-            } /* if (strncmp(abpath, self->path, self->size) != 0) {} else { */
-	    } /* if (rc != 0) {} else { */
-	} /* while(rc == 0) */
-	if (abpath != NULL)
-	    free (abpath);
-	if (allocated_path != NULL)
-	    free (allocated_path);
-    } /* if (path[0] == 0) {} else { */
-    return rc;
-}
-
-
-/* ======================================================================
- * KArcFile
- *  a file inside an archive
- */
-
-/*-----------------------------------------------------------------------
- * KArcFile
- *  an archive file including tar and sra
- */
-struct KArcFile
-{
-    KFile		dad;
-    const KToc *	toc;	/* not accessed directly but it owns the node so need a ref to it */
-    const KTocEntry *	node;
-    const KFile *	archive;
-};
-
-/*-----------------------------------------------------------------------
- * KArcFileDestroy
- *
- * Destructor for objects of class KArcFile.  Usually not called directly but instead called
- * when the reference count for the object drops to 0.
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN] KArcFile *		self		OOP self pointer - the object to be destroyed
- */
-static
-rc_t CC KArcFileDestroy (KArcFile *self)
-{
-    rc_t ret1, ret2;
-
-    assert (self != NULL);
-
-    ret1 = KFileRelease (self->archive);
-    ret2 = KTocRelease (self->toc);
-    free (self);
-
-    /* -----
-     * this seems a tad silly but pass along one or the other failure
-     * We chose to call the second release even of the first failed
-     * erring on the side of releasing as much as possible
-     */
-    return (ret1 != 0) ? ret1 : ret2;
-}
-
-
-/*-----------------------------------------------------------------------
- * KArcFileGetSysFile
- *
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- * Returns the KSysFile/KFile associated with a KArcFile.  NULL if not appropriate.
- *
- * [RET] struct KSysFile *
- * [IN]  const KArcFile *	self		Object oriented C; KArcFile object for this method
- * [OUT] uint64_t *		offset		An offset into the KSysfile where the KArcFile's
- *						data starts.
- */
-static
-struct KSysFile *CC KArcFileGetSysFile (const KArcFile *self, uint64_t *offset)
-{
-    rc_t rc;
-    KTocEntryType type;
-    struct KSysFile * fp;
-    uint64_t fo;
-    uint64_t ao;
-
-    /* parameters must be non-NULL */
-    assert (self != NULL);
-    assert (offset != NULL);
-
-    /* check the type which must be a contiguous file */
-    rc = KTocEntryGetType (self->node, &type);
-    if (rc == 0)
-    {
-	if (type == ktocentrytype_file)
-	{
-	    /* recur into the KFile to see if it allows this */
-	    fp = KFileGetSysFile (self->archive, &ao);
-
-	    /* -----
-	     * if all this is true get the offset from the TOC entry and
-	     * return it
-	     */
-	    if (fp != NULL)
-	    {
-		if (KTocEntryGetFileOffset (self->node, &fo) == 0)
-		{
-		    *offset = ao + fo;
-		    return fp;
-		}
-	    }
-	}
-    }
-    /* any failure alng the way leads to returning NULL */
-    *offset = 0;
-    return NULL;
-}
-
-
-/*-----------------------------------------------------------------------
- * KArcFileRandomAccess
- *
- * Returns zero if Random access is allowed for this KFile
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details		
- * [IN] const KArcFile *	self		Object oriented C; KArcFile object for this method
- */
-static
-rc_t CC KArcFileRandomAccess (const KArcFile *self)
-{
-    assert (self != NULL);
-    return 0;
-}
-
-
-/*-----------------------------------------------------------------------
- * KArcFileType
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KArcFileType ( const KArcFile *self )
-{
-    return KFileType ( self -> archive );
-}
-
-
-/*-----------------------------------------------------------------------
- * KArcFileSize
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN]  const KArcFile *	self		Object oriented C; KArcFile object for this method
- * [OUT] uint64_t *		size		Where to put the virtual size of the file
- */
-static
-rc_t CC KArcFileSize (const KArcFile *self, uint64_t *size)
-{
-    rc_t	rc;
-    uint64_t	fsize;
-
-    assert (self != NULL);
-    assert (size != NULL);
-
-    rc = KTocEntryGetFileSize(self->node, &fsize);
-    if (rc == 0)
-    {
-	/* success */
-	*size = fsize;
-    }
-    /* pass along RC value */
-    return rc;
-}
-
-
-/*-----------------------------------------------------------------------
- * KArcFileSetSize
- *
- * Change the size of the KFile.  Not supported for files inside archives.
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN] KArcFile *		self		Object oriented C; KArcFile object for this method
- * [IN] uint64_t		size
- */
-static
-rc_t CC KArcFileSetSize (KArcFile *self, uint64_t size)
-{
-    return RC (rcFS, rcFile, rcUpdating, rcArc, rcUnsupported);
-}
-
-
-
-/*-----------------------------------------------------------------------
- * KArcFileRead
- *
- * Read bytes from a file represented by this KArcFile
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN]  const KArcFile *	self		Object oriented C; KArcFile object for this method
- * [IN]  uint64_t		pos		Offset with in the file from where to start reading
- * [OUT] void *			buffer		buffer to which to write the read bytes 
- * [IN]  size_t			bsize		how many bytes to read
- * [OUT] size_t *		num_read	how many bytes actually read. Will get written even
- *						in failure
- */
-/* ----------------------------------------------------------------------
- * KArcFileReadContiguous
- *
- * Read data from a contiguously stored file at a specified position
- *
- * The parameters are the same as KArcFileRead.  This private function could be
- * inlined.  It is broken out for human readabilty.
- *
- * We just fix the offset by adding the offset to the file within the archive
- * (we fixed the number to read before we got here) and pass the read to the
- * archive.
- */
-static
-rc_t KArcFileReadContiguous (const KArcFile *self, uint64_t pos,
-			     void *buffer, size_t bsize, size_t *num_read)
-{
-    rc_t	rc;
-    uint64_t	offset;
-
-    assert (self != NULL);
-    assert (buffer != NULL);
-    assert (num_read != NULL);
-    assert (bsize != 0);
-
-    rc = KTocEntryGetFileOffset (self->node, &offset);
-    if (rc == 0)
-    {
-	rc = KFileRead (self->archive, pos + offset, buffer, bsize, num_read);
-    }
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * KArcFileReadEmpty
- *
- * Read data from a file with no content.
- *
- * The parameters are the same as KArcFileRead.  This private function could be
- * inlined.  It is broken out for human readabilty.
- *
- * We just fix the offset by adding the offset to the file within the archive
- * (we fixed the number to read before we got here) and pass the read to the
- * archive.
- */
-static
-rc_t KArcFileReadEmpty (const KArcFile *self, uint64_t pos,
-                        void *buffer, size_t bsize, size_t *num_read)
-{
-    assert (self != NULL);
-    assert (buffer != NULL);
-    assert (num_read != NULL);
-    assert (bsize != 0);
-
-    *num_read = 0;
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * KArcFileReadChunked
- *
- * Read data from a  chunked file at a specified position
- *
- * The parameters are the same as KArcFileRead.  This private function could be
- * inlined.  It is broken out for human readabilty.
- */
-static
-rc_t KArcFileReadChunked (const KArcFile *self,
-			  uint64_t pos,
-			  void *buffer,
-			  size_t bsize,
-			  size_t *num_read)
-{
-    const KTocChunk *	pchunk;		/* pointer to the chunk table */
-    size_t		count;		/* how many to read/write in an action */
-    uint32_t		num_chunks;	/* how many chunks in the array */
-    rc_t		rc;		/* general purpose return from calls and pass along */
-
-    assert (self != NULL);
-    assert (buffer != NULL);
-    assert (num_read != NULL);
-    assert (bsize != 0);
-
-    /* -----
-     * assume no read/write will happen or rather start with having read none;
-     * this write could be superfluous but we need to prepare *num_read for += operations
-     */
-    *num_read = 0;
-
-    /* -----
-     * Get the count of chunks and a pointer to the array of chunks for this file
-     */
-    rc = KTocEntryGetChunks (self->node, &num_chunks, &pchunk);
-    if (rc == 0)
-    {
-	uint8_t *	pbuff;		/* access the buffer as an array of bytes */
-	uint64_t	end;		/* this will be set to the end offset */
-
-	pbuff = buffer;
-	end = pos + bsize;	
-
-	/* -----
-	 * step through the chunks
-	 */
-	for (; (num_chunks) && (pos < end); --num_chunks, ++pchunk)
-	{
-	    uint64_t 	cend;		/* end offset of this chunk */
-
-	    /* -----
-	     * determine the end of this chunk
-	     */
-	    cend = pchunk->logical_position + pchunk->size;
-
-	    /* -----
-	     * if this chunk is entirely before the current position
-	     * we are looking for
-	     * skip to the next (if any) chunk
-	     */
-	    if (pos > cend)
-		continue;
-
-	    /* -----
-	     * handle any needed zero fill section before the next chunk
-	     */
-	    if (pos < pchunk->logical_position)
-	    {
-		/* -----
-		 * try to fake-read as many bytes of zero as possible
-		 * so start assuming you need enough zeros to reach the next chunk
-		 * but cut it back to the remaining requested if that was too many
-		 */
-		count = (size_t)( pchunk->logical_position - pos );
-		if (count > bsize)
-		    count = bsize;
-
-		/* fake read the zeros */
-		memset (pbuff, 0, count);
-
-		/* update tracking variables */
-		pbuff += count;
-		pos += count;
-		*num_read += count;
-	    }
-
-	    /* -----
-	     * handle a chunk section
-	     *
-	     * if we are here, then we still have bytes to get and
-	     * pos >= pchunk_logical_position
-	     *
-	     * Get the most we can from this chunk.
-	     * If there are enough bytes in this chunk to finish the read: do so.
-	     * Else read through the end of the chunk
-	     */
-	    count = (size_t)( (end <= cend) ? end - pos : cend - pos );
-
-	    /* -----
-	     * a little tricky is we call by value the wanted count and the function
-	     * called will over write that with the actual read count
-	     */
-	    rc = KFileRead (self->archive, 
-			    pchunk->source_position + (pchunk->logical_position - pos), 
-			    pbuff, count, &count);
-
-	    *num_read += count;
-	    if (rc != 0)
-	    {
-		/* failure so abort */
-		break;
-	    }
-	    pbuff += count;
-	    pos += count;
-	    *num_read += count;
-	}
-	/* -----
-	 * If eveything so far is okay but we have more bytes to read
-	 * yet no more chunks; then fill to the end with zeroes
-	 */
-	if ((rc == 0) && (pos < end))
-	{
-	    count = (size_t)( end - pos );
-	    memset (pbuff, 0, count);
-	    *num_read += count;
-	}
-    }
-    return rc;
-}
-/* ----------------------------------------------------------------------
- * Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-rc_t CC KArcFileRead	(const KArcFile *self,
-			 uint64_t pos,
-			 void *buffer,
-			 size_t bsize,
-			 size_t *num_read)
-{
-    KTocEntryType	type;
-    rc_t		rc;
-
-    /* -----
-     * self and buffer were validated as not NULL before calling here
-     *
-     * So get the KTocEntry type: chunked files and contiguous files 
-     * are read differently.
-     */
-    assert (self != NULL);
-    assert (buffer != NULL);
-    assert (num_read != NULL);
-    assert (bsize != 0);
-
-    rc = KTocEntryGetType(self->node, &type);
-
-    assert ((type == ktocentrytype_file) || 
-            (type == ktocentrytype_chunked) ||
-            (type == ktocentrytype_emptyfile));
-
-    if (rc == 0)
-    {
-	uint64_t	size;
-
-	/* -----
-	 * We have to validate the size to be read and will modify the number
-	 * down if necessary
-	 */
-	rc = KTocEntryGetFileSize (self->node, &size);
-	if (rc == 0)
-	{
-	    /* ----- 
-	     * if we are seeking beyond the end match sysfile.c's use of pread
-	     * and return number read as 0 to mark EOF
-	     */
-	    if (pos >= size)
-	    {
-		*num_read = 0;
-	    }
-	    else
-	    {
-		uint64_t	limit;
-
-		limit = 
-		    (pos + bsize > size)	/* if attempt to read beyond end of file */
-		    ? size - pos		/* then force smaller read */
-		    : bsize;			/* else allow full read */
-
-		switch (type)
-		{
-		default:
-		case ktocentrytype_unknown:
-		case ktocentrytype_dir:
-		case ktocentrytype_softlink:
-		case ktocentrytype_hardlink:
-		    /* -----
-		     * We should not have been able to open these as a KArcFile
-		     * so this is probably superfluous
-		     */
-		    rc = RC (rcFS, rcFile, rcReading, rcArc, rcUnexpected);
-		    break;
-		case ktocentrytype_file:
-		    rc = KArcFileReadContiguous (self, pos, buffer, (size_t)limit, num_read);
-		    break;
-		case ktocentrytype_chunked:
-		    rc = KArcFileReadChunked (self, pos, buffer, (size_t)limit, num_read);
-		    break;
-		case ktocentrytype_emptyfile:
-		    rc = KArcFileReadEmpty (self, pos, buffer, (size_t)limit, num_read);
-		    break;
-		}
-	    }
-	}
-    }
-    return rc;
-}
-
-
-
-/*-----------------------------------------------------------------------
- * KArcFileWrite
- *
- * Write bytes to a file represented by this KArcFile.
- * Fails as unsupported for files inside archives.
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN]  KArcFile *		self		Object oriented C; KArcFile object for this method
- * [IN]  uint64_t 		pos		Offset within file to start writing (ignored)
- * [IN]  const void *		buffer		pointer to data to write (ignored)
- * [IN]  size_t 		size		how many bytes to write (ignored)
- * [OUT] size_t *		num_writ	how many bytes written - always set to 0
- */
-static
-rc_t CC KArcFileWrite (KArcFile *self, uint64_t pos,
-		       const void *buffer, size_t size,
-		       size_t *num_writ)
-{
-    assert (num_writ != NULL);
-
-    /* duplicates write in KFileWrite() so this can be deleted */
-    *num_writ = 0;
-
-    return RC (rcFS, rcArc, rcWriting, rcSelf, rcUnsupported);
-}
-
-
-
-static	KFile_vt_v1	vtKArcFile =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KArcFileDestroy,
-    KArcFileGetSysFile,
-    KArcFileRandomAccess,
-    KArcFileSize,
-    KArcFileSetSize,
-    KArcFileRead,
-    KArcFileWrite,
-
-    /* 1.1 */
-    KArcFileType
-};
-
-/*-----------------------------------------------------------------------
- * KArcFileMake
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [OUT] KArcFile ** 		self		were to put a reference to the newly allocated
- *						KArcFile structure
- * [IN]  const KFile *		archive		The KFile for the archive containing this archive
- * [IN]  const KArcToc *	toc		The controlling TOC for the Archive File
- * [IN]  const KTocEntry *	node		The specific node somewhere in that TOC for this file
- */
-static
-rc_t KArcFileMake (KArcFile ** self,
-		   const KFile * archive,
-		   const KToc * toc,
-		   const KTocEntry * node)
-{
-    rc_t	rc;
-    KArcFile *	pF;
-    uint64_t    size;
-
-    /* -----
-     * we can not accept any of the four parameters as NULL
-     */
-    assert (self != NULL);
-    assert (archive != NULL);
-    assert (toc != NULL);
-    assert (node != NULL);
-
-    /* -----
-     * Proceed with non-NULL parameters
-     */
-    rc = KFileSize (archive, &size);
-    if (GetRCState(rc) == rcUnsupported)
-    {
-        size = ~(uint64_t)0;
-        rc = 0;
-    }
-
-    if (rc == 0)
-    {
-        /* we need to check chunked files here as well */
-        if (((node->type == ktocentrytype_file) &&
-             (node->u.contiguous_file.file_size > 0) &&
-             (size < (node->u.contiguous_file.file_size +
-                      node->u.contiguous_file.archive_offset))) ||
-            ((node->type == ktocentrytype_chunked) &&
-             (node->u.chunked_file.file_size > 0) &&
-             (size < (node->u.chunked_file.chunks[node->u.chunked_file.num_chunks-1].source_position +
-                      node->u.chunked_file.chunks[node->u.chunked_file.num_chunks-1].size))))
-            rc = RC (rcFS, rcFile, rcConstructing, rcArc, rcIncomplete);
-        else
-        {
-            /* get space for the object */
-            pF = malloc (sizeof * pF);
-            if (pF == NULL)	/* allocation failed */
-            {
-                /* fail */
-                rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-            }
-            else
-            {
-                rc = KFileInit (&pF->dad,				/* initialize base class */
-                                (const KFile_vt*)&vtKArcFile,	/* VTable for KArcFile */
-                                "KArcFile", "no-name",
-                                true,				/* read allowed */
-                                false);				/* write disallowed */
-                if (rc == 0)
-                {
-                    /* succeed */
-                    pF->toc = toc;					/* shared TOC */
-                    KTocAddRef(toc);				/* keep alive reference */
-                    pF->node = node;				/* file specific TOC entry */
-                    pF->archive = archive;				/* shared archive file */
-                    KFileAddRef(archive);				/* keep alive reference */
-                    *self = pF;					/* and to the output */
-                }
-                if (rc != 0)
-                    /* fail */
-                    free (pF);
-            }
-	}
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KArcDirVisit
- *  visit each path under designated directory,
- *  recursively if so indicated
- *
- *  "recurse" [ IN ] - if non-zero, recursively visit sub-directories
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - function to execute
- *  on each path. receives a base directory and relative path
- *  for each entry, where each path is also given the leaf name
- *  for convenience. if "f" returns non-zero, the iteration will
- *  terminate and that value will be returned. NB - "dir" will not
- *  be the same as "self".
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- */
-static 
-rc_t CC KArcDirVisit (const KArcDir *self, 
-                      bool recurse,
-                      rc_t (CC* f) (const KDirectory *, uint32_t, const char *, void *), 
-                      void *data,
-                      const char *path,
-                      va_list args)
-{
-    char * full_path;
-    rc_t   rc;
-
-
-    /* -----
-     * First fix the path to make it useable
-     */
-    rc = KArcDirMakePath (self, rcVisiting, true, &full_path, path, args);
-    if (rc != 0)
-    {
-	LOGERR (klogInt, rc, "failed to make path in Visit");
-    }
-    else
-    {
-	const KTocEntry * pnode;
-	KTocEntryType	type;
-
-	/* -----
-	 * Now find that path as a node and validate it is a directory
-	 */
-	rc = KArcDirResolvePathNode(self, rcListing, full_path, true, &pnode, &type);
-	if (rc != 0)
-	{
-	    PLOGERR (klogInt, (klogInt, rc, "failed to resolve path $(P) in Visit", "P=%s", full_path));
-	}
-	else
-	{
-	    if ((type == ktocentrytype_dir) || (type == ktocentrytype_hardlink))
-	    {
-		KArcDir * full_dir;
-		uint32_t path_size;
-
-		/* -----
-		 * make a locally accessible private KDirectory/KArcDir
-		 */
-		for ( path_size = (uint32_t)strlen ( full_path );
-		      ( path_size > self->root ) && ( full_path[ path_size - 1 ] == '/' );
-		      -- path_size )
-		{}
-		rc = KArcDirMake (&full_dir, 
-				  rcVisiting,
-				  self->parent,
-				  self->toc,
-				  pnode,
-				  self->archive.v,
-				  self->arctype,
-				  self->root,
-				  full_path,
-				  path_size, 
-				  true,
-				  false);
-		if (rc == 0)
-		{
-		    KArcDirVisitData pb;
-
-		    pb.f = f;
-		    pb.data = data;
-		    pb.dir = full_dir;
-		    pb.recurse = recurse;
-/*		    pb.dir.path[--pb.dir.size] = 0; */
-
-		    rc = KArcDirVisitDir (&pb);
-
-		    KArcDirDestroy (full_dir);
-		}
-	    }
-	    else
-	    {
-		rc = RC (rcFS, rcDirectory, rcVisiting, rcPath, rcIncorrect);
-		LOGERR (klogInt, rc, "Type is not a directory");
-	    }
-	}
-	free (full_path);
-    }
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirVisitUpdate
- */
-static rc_t CC KArcDirVisitUpdate (KArcDir *self,
-                                   bool recurse,
-                                   rc_t (CC*f) (KDirectory *,uint32_t,const char *,void *),
-                                   void *data,
-                                   const char *path,
-                                   va_list args)
-{
-    return RC (rcFS, rcDirectory, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirResolvePath
- *
- *  resolves path to an absolute or directory-relative path
- *
- * [IN]  const KArcDir *self		Objected oriented self
- * [IN]	 bool 		absolute	if non-zero, always give a path starting
- *  					with '/'. NB - if the directory is 
- *					chroot'd, the absolute path
- *					will still be relative to directory root.
- * [OUT] char *		resolved	buffer for NUL terminated result path in 
- *					directory-native character set
- * [IN]	 size_t		rsize		limiting size of resolved buffer
- * [IN]  const char *	path		NUL terminated string in directory-native
- *					character set denoting target path. 
- *					NB - need not exist.
- *
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static rc_t CC KArcDirResolvePath (const KArcDir *self,
-                                   bool absolute,
-                                   char *resolved,
-                                   size_t rsize,
-                                   const char *path,
-                                   va_list args)
-{
-    char * full;
-    rc_t   rc; 
-
-    assert (self != NULL);
-    assert (resolved != NULL);
-    assert (path != NULL);
-
-    rc = KArcDirMakePath (self, rcResolving, true, &full, path, args);
-
-    if (rc == 0)
-    {
-        uint32_t path_size = (uint32_t)strlen ( full );
-
-        if (absolute)
-        {
-            /* test buffer capacity -  this is a limitation of KDirectory not in KArcDir */
-            if ((path_size - self->root) >= rsize)
-            {
-                rc =  RC (rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient);
-            }
-            else
-            {
-                /* ready to go */
-                strcpy (resolved, & full[self->root]);
-                assert (resolved[0] == '/');
-            }
-        }
-        else
-        {
-            rc = KArcDirRelativePath (self, rcResolving, self->path, full, path_size);
-            if (rc == 0)
-            {
-                path_size = (uint32_t)strlen ( full );
-                /* test buffer capacity -  this is a limitation of KDirectory not in KArcDir */
-                if (path_size >= rsize)
-                {
-                    rc = RC (rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient);
-                }
-                else
-                {
-                    strcpy (resolved, full);
-                }
-            }
-        }
-    }
-    if (full != NULL)
-        free (full);
-
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirResolveAlias
- *  resolves an alias path to its immediate target
- *  NB - the resolved path may be yet another alias
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting an object presumed to be an alias.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character set
- *
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static rc_t CC KArcDirResolveAlias (const KArcDir * self, 
-				 bool absolute,
-				 char * resolved,
-				 size_t rsize,
-				 const char *alias_fmt,
-				 va_list args)
-{
-    char *		full_path;
-    const char *	link_path;
-    const KTocEntry * pnode;
-    KTocEntryType	type;
-    rc_t		rc;
-    size_t		ssize;
-
-    assert (self != NULL);
-    assert (resolved != NULL);
-    assert (alias_fmt != NULL);
-
-    rc = KArcDirMakePath (self, rcResolving, true,
-			  &full_path, alias_fmt, args);
-
-    if (rc != 0)
-    {
-    	/* can't "fix" path */
-	    /*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-    }
-    else
-    {
-    	/* first find the node and it has to be an alias */ 
-        char alias[4096];
-        int size = ( args == NULL ) ?
-            snprintf  ( alias, sizeof alias, "%s", alias_fmt ) : 
-            vsnprintf ( alias, sizeof alias, alias_fmt, args );
-
-        if ( size < 0 || size >= ( int ) sizeof alias )
-            rc = RC ( rcFS, rcDirectory, rcResolving, rcPath, rcExcessive );
-        else
-        	rc = KArcDirResolvePathNode (self, rcResolving, alias, false, &pnode, &type);
-    
-    	if (rc != 0)
-    	{
-    	    /*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-    	}
-    	else if (type != ktocentrytype_softlink)
-    	{
-    	    rc = RC (rcFS, rcDirectory, rcResolving, rcLink, rcInvalid);
-    	}
-    	else
-    	{
-    	    rc = KTocEntryGetSoftTarget(pnode, &link_path);
-    	    if (rc != 0)
-    	    {
-        		/* can't "fix" path */
-        		/*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-    	    }
-    	    else
-    	    {
-    	    	ssize = strlen(link_path);
-        		if (ssize > rsize)
-        		{
-    	    	    rc = RC (rcFS, rcDirectory,rcResolving, rcParam, rcInsufficient);
-    		    }
-        		else
-        		{
-    	    	    strcpy (resolved, link_path);
-    		    }
-    	    }
-    	}
-    }
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirRename
- *  rename an object accessible from directory, replacing
- *  any existing target object of the same type
- *
- *  "from" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- *
- *  "to" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- */
-static
-rc_t CC KArcDirRename (KArcDir *self, bool force, const char *from, const char *to)
-{
-    assert (self != NULL);
-    assert (from != NULL);
-    assert (to != NULL);
-
-    return RC (rcFS, rcArc, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirRemove
- *  remove an accessible object from its directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "force" [ IN ] - if non-zero and target is a directory,
- *  remove recursively
- */
-static
-rc_t CC KArcDirRemove (KArcDir *self, bool force, const char *path, va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirClearDir
- *  remove all directory contents
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "force" [ IN ] - if non-zero and directory entry is a
- *  sub-directory, remove recursively
- */
-static
-rc_t CC KArcDirClearDir (KArcDir *self, bool force, const char *path, va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirAccess
- *  get access to object
- *
- *  "access" [ OUT ] - return parameter for Unix access mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static rc_t CC KArcDirVAccess (const KArcDir *self,
-			    uint32_t *access,
-			    const char *path_fmt,
-			    va_list args)
-{
-    rc_t rc;
-    uint32_t acc;
-    KTocEntryType type;
-    char * full;
-    const KTocEntry * entry;
-
-    va_list args_copy;
-
-    assert (self != NULL);
-    assert (access != NULL);
-    assert (path_fmt != NULL);
-
-    /* MUST copy "args" if the intention is to use it twice */
-    if ( args != NULL )
-        va_copy ( args_copy, args );
-
-    /* -----
-     * by C standard the nested ifs (if A { if B { if C ... could have been if A && B && C
-     */
-    if ((rc = KArcDirMakePath (self, rcAccessing, false, &full, path_fmt, args)) == 0)
-    {
-        char path [ 4096 ];
-        int size = ( args == NULL ) ?
-            snprintf  ( path, sizeof path, "%s", path_fmt ) :
-            vsnprintf ( path, sizeof path, path_fmt, args_copy );
-
-        if ( size < 0 || size >= ( int ) sizeof path )
-            rc = RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcExcessive );
-        else
-        {
-        	if ((rc = KArcDirResolvePathNode (self, rcAccessing, path, true, &entry, &type)) == 0)
-        	{
-        	    if ((rc = KTocEntryGetAccess (entry, &acc)) == 0)
-        	    {
-                    /*
-                     * We want to filter the access because within an Archive
-                     * a file is unwritable
-                     */
-            		*access = acc & ~(S_IWRITE|S_IWGRP|S_IWOTH);
-            		rc = 0;
-        	    }
-        	}
-        }
-    }
-
-    if ( args != NULL )
-        va_end ( args_copy );
-
-    if (full != NULL)
-        free (full);
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirSetAccess
- *  set access to object a la Unix "chmod"
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "access" [ IN ] and "mask" [ IN ] - definition of change
- *  where "access" contains new bit values and "mask defines
- *  which bits should be changed.
- *
- *  "recurse" [ IN ] - if non zero and "path" is a directory,
- *  apply changes recursively.
- */
-static rc_t CC KArcDirSetAccess (KArcDir *self,
-			      bool recurse,
-			      uint32_t access,
-			      uint32_t mask,
-			      const char *path,
-			      va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcUpdating, rcSelf, rcUnsupported);
-}
-
-
-static	rc_t CC KArcDirVDate		(const KArcDir *self,
-					 KTime_t *date,
-					 const char *path_fmt,
-					 va_list args)
-{
-/*     const KToc *	toc; */
-    rc_t 		rc;
-    KTime_t		ldate;
-    KTocEntryType	type;
-    char * 		full;
-    const KTocEntry * node;
-
-    va_list args_copy;
-
-    assert (self != NULL);
-    assert (date != NULL);
-    assert (path_fmt != NULL);
-
-    /* MUST copy "args" if the intention is to use it twice */
-    if ( args != NULL )
-        va_copy ( args_copy, args );
-
-    /* -----
-     * by C standard the nested ifs (if A { if B { if C ... could have been if A && B && C
-     */
-    if ((rc = KArcDirMakePath (self, rcAccessing, false, &full, path_fmt, args)) == 0)
-    {
-#if 0
-        if ((rc = KArcDirGetTOC (self, &toc)) == 0)
-#endif
-        {
-            /* THIS IS INCORRECT - IT SHOULD NOT RESOLVE ALIASES */
-            char path [ 4096 ];
-            int size = vsnprintf ( path, sizeof path, path_fmt, args_copy );
-
-            if ( size < 0 || size >= ( int ) sizeof path )
-                rc = RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcExcessive );
-            else
-            {
-                if ((rc = KArcDirResolvePathNode (self, rcAccessing, path, true, &node, &type)) == 0)
-                {
-                    if ((rc = KTocEntryGetTime (node, &ldate)) == 0)
-                    {
-                        *date =  ldate;
-                        rc = 0;
-                    }
-                }
-            }
-        }
-    }
-
-    if ( args != NULL )
-        va_end ( args_copy );
-
-    if (full != NULL)
-        free (full);
-    return rc;
-}
-
-static	rc_t CC KArcDirSetDate		(KArcDir *self,
-					 bool recurse,
-					 KTime_t date,
-					 const char *path,
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcUpdating, rcSelf, rcUnsupported);
-}
-
-static
-struct KSysDir *CC KArcDirGetSysDir ( const KArcDir *self )
-{
-    return NULL;
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirCreateAlias
- *  creates a path alias according to create mode
- *
- *  "targ" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target alias
- *
- *  "access" [ IN ] - standard Unix directory access mode
- *  used when "mode" has kcmParents set and alias path does
- *  not exist.
- *
- *  "mode" [ IN ] - a creation mode (see explanation above).
- */
-static
-rc_t CC KArcDirCreateAlias (KArcDir *self,
-			 uint32_t access,
-			 KCreateMode mode,
-			 const char *targ,
-			 const char *alias)
-{
-    assert (self != NULL);
-    assert (targ != NULL);
-    assert (alias != NULL);
-
-    return RC (rcFS, rcArc, rcCreating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirOpenFileRead
- *  opens an existing file with read-only access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t CC KArcDirOpenFileRead	(const KArcDir *self,
-					 const KFile **f,
-					 const char *path,
-					 va_list args)
-{
-    char *	full_path = NULL;
-    rc_t	rc;
-
-    assert (self != NULL);
-    assert (f != NULL);
-    assert (path != NULL);
-
-    rc = KArcDirMakePath (self, rcOpening, true, &full_path, path, args);
-
-    if (rc == 0)
-    {
-	const KTocEntry * pnode;
-	KTocEntryType     type;
-
-	rc = KArcDirResolvePathNode (self, rcOpening, full_path, true, &pnode, &type);
-
-	if (rc == 0)
-	{
-
-	    switch (type)
-	    {
-	    case ktocentrytype_unknown:
-	    case ktocentrytype_dir:
-	    case ktocentrytype_softlink:
-	    case ktocentrytype_hardlink:
-	    default:
-		rc = RC (rcFS, rcDirectory, rcOpening, rcFile, rcInvalid);
-		break;
-	    case ktocentrytype_emptyfile:
-	    case ktocentrytype_file:
-	    case ktocentrytype_chunked:
-		rc = KArcFileMake ((KArcFile**)f, self->archive.v, self->toc, pnode);
-		break;
-	    }
-	}
-	free (full_path);
-    }    
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirOpenFileWrite
- *  opens an existing file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- */
-static
-rc_t CC KArcDirOpenFileWrite	(KArcDir *self,
-					 KFile **f,
-					 bool update,
-					 const char *path,
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (f != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcCreating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirCreateFile
- *  opens a file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "mode" [ IN ] - a creation mode (see explanation above).
- */
-static
-rc_t CC KArcDirCreateFile	(KArcDir *self,
-					 KFile **f,
-					 bool update,
-					 uint32_t access,
-					 KCreateMode cmode,
-					 const char *path,
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (f != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcCreating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirFileLocator
- *  returns locator in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "locator" [ OUT ] - return parameter for file locator
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t CC KArcDirFileLocator		(const KArcDir *self,
-					 uint64_t *locator,
-					 const char *path,
-					 va_list args)
-{
-    char *		full_path;
-    rc_t		rc;
-
-    assert (self != NULL);
-    assert (locator != NULL);
-    assert (path != NULL);
-
-    rc = KArcDirMakePath (self, rcResolving, true,
-			  &full_path, path, args);
-
-    if (rc != 0)
-    {
-	/* can't "fix" path */
-	/*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-    }
-    else
-    {
-	const KTocEntry * pnode;
-	KTocEntryType     type;
-
-	rc = KArcDirResolvePathNode (self, rcResolving, full_path, /*follow links*/true, &pnode, &type);
-
-	if (rc != 0)
-	{
-	    /* can't resolve path */
-	    /*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-	}
-	else
-	{
-	    uint64_t	flocator;
-
-	    rc = KTocEntryGetFileLocator(pnode, &flocator);
-	    if (rc != 0)
-	    {
-		/* can't "fix" path */
-		/*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-	    }
-	    else
-	    {
-		*locator = flocator;
-	    }
-	}
-	free (full_path);
-    }
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirFileSize
- *  returns size in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "size" [ OUT ] - return parameter for file size
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t CC KArcDirFileSize		(const KArcDir *self,
-					 uint64_t *size,
-					 const char *path,
-					 va_list args)
-{
-    char *		full_path;
-    rc_t		rc;
-
-    assert (self != NULL);
-    assert (size != NULL);
-    assert (path != NULL);
-
-    rc = KArcDirMakePath (self, rcResolving, true,
-			  &full_path, path, args);
-
-    if (rc != 0)
-    {
-	/* can't "fix" path */
-	/*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-    }
-    else
-    {
-	const KTocEntry * pnode;
-	KTocEntryType     type;
-
-	rc = KArcDirResolvePathNode (self, rcResolving, full_path, /*follow links*/true, &pnode, &type);
-
-	if (rc != 0)
-	{
-	    /* can't resolve path */
-	    /*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-	}
-	else
-	{
-	    uint64_t	fsize;
-
-	    rc = KTocEntryGetFileSize(pnode, &fsize);
-	    if (rc != 0)
-	    {
-		/* can't "fix" path */
-		/*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-	    }
-	    else
-	    {
-		*size = fsize;
-	    }
-	}
-	free (full_path);
-    }
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirFileSize
- *  returns size in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "size" [ OUT ] - return parameter for file size
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t CC KArcDirFilePhysicalSize		(const KArcDir *self,
-					 uint64_t *size,
-					 const char *path,
-					 va_list args)
-{
-    char *		full_path;
-    rc_t		rc;
-
-    assert (self != NULL);
-    assert (size != NULL);
-    assert (path != NULL);
-
-    rc = KArcDirMakePath (self, rcResolving, true,
-			  &full_path, path, args);
-
-    if (rc != 0)
-    {
-	/* can't "fix" path */
-	/*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-    }
-    else
-    {
-	const KTocEntry * pnode;
-	KTocEntryType     type;
-
-	rc = KArcDirResolvePathNode (self, rcResolving, full_path, /*follow links*/true, &pnode, &type);
-
-	if (rc != 0)
-	{
-	    /* can't resolve path */
-	    /*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-	}
-	else
-	{
-	    uint64_t	fsize;
-
-	    rc = KTocEntryGetFilePhysicalSize(pnode, &fsize);
-	    if (rc != 0)
-	    {
-		/* can't "fix" path */
-		/*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-	    }
-	    else
-	    {
-		*size = fsize;
-	    }
-	}
-	free (full_path);
-    }
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirSetFileSize
- *  sets size in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KArcDirSetFileSize	(KArcDir *self,
-					 uint64_t size,
-					 const char *path,
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcWriting, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirOpenDirRead
- *
- *  opens a sub-directory
- *
- * [IN]  const KArcDir *	self	Object Oriented C KArcDir self
- * [OUT] const KDirectory **	subp	Where to put the new KDirectory/KArcDir
- * [IN]  bool			chroot	Create a chroot cage for this new subdirectory
- * [IN]  const char *		path	Path to the directory to open
- * [IN]  va_list		args	So far the only use of args is possible additions to path
- */
-static 
-rc_t CC KArcDirOpenDirRead	(const KArcDir *self,
-					 const KDirectory **subp,
-					 bool chroot,
-					 const char *path,
-					 va_list args)
-{
-    char * full;
-    rc_t rc;
-
-    assert (self != NULL);
-    assert (subp != NULL);
-    assert (path != NULL);
-
-    rc = KArcDirMakePath (self, rcOpening, true, &full, path, args);
-    if (rc == 0)
-    {
-	const KTocEntry *	pnode;
-	KTocEntryType		type;
-	size_t path_size = strlen (full);
-
-	/* -----
-	 * get rid of any extra '/' characters at the end of path
-	 */
-	while (path_size > 0 && full [ path_size - 1 ] == '/')
-	    full [ -- path_size ] = 0;
-
-	/* -----
-	 * get the node for this path 
-	 */
-	rc = KArcDirResolvePathNode (self, rcOpening, full, true, &pnode, &type);
-	if (rc == 0)
-	{
-            switch (type)
-            {
-            default:
-		/* fail */
-		rc = RC (rcFS, rcDirectory, rcOpening, rcPath, rcIncorrect);
-                break;
-            case ktocentrytype_dir:
-            case ktocentrytype_hardlink:
-	    {
-		KArcDir *	sub;
-
-		rc = KArcDirMake (&sub,
-				  rcOpening,
-				  self->parent,
-				  self->toc,
-				  pnode,
-				  self->archive.v,
-				  self->arctype,
-				  self->root,
-				  full,
-				  (uint32_t)path_size,
-				  false,
-				  chroot);
-		if (rc == 0)
-		{
-		    /* succeed */
-		    *subp = &sub->dad;
-		}
-	    }
-            }
-	}
-	free (full);
-    }
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirOpenDirUpdate
- *  opens a sub-directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "chroot" [ IN ] - if non-zero, the new directory becomes
- *  chroot'd and will interpret paths beginning with '/'
- *  relative to itself.
- */
-static
-rc_t CC KArcDirOpenDirUpdate	(KArcDir *self,
-					 KDirectory ** subp, 
-					 bool chroot, 
-					 const char *path, 
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (subp != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirCreateDir
- *  create a sub-directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "access" [ IN ] - standard Unix directory permissions
- *
- *  "mode" [ IN ] - a creation mode (see explanation above).
- */
-static
-rc_t CC KArcDirCreateDir	(KArcDir *self,
-					 uint32_t access,
-					 KCreateMode mode,
-					 const char *path,
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcCreating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirDestroyFile
- */
-static
-rc_t CC KArcDirDestroyFile	(KArcDir *self,
-					 KFile * f)
-{
-    assert (self != NULL);
-    assert (f != NULL);
-
-    return RC (rcFS, rcArc, rcDestroying, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KArcDirFileContiguous
- *  
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "contiguous" [ OUT ] - return parameter for file status
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t CC KArcDirFileContiguous		(const KArcDir *self,
-                                         bool * contiguous,
-					 const char *path,
-					 va_list args)
-{
-    char *		full_path;
-    rc_t		rc;
-
-    assert (self != NULL);
-    assert (contiguous != NULL);
-    assert (path != NULL);
-
-    rc = KArcDirMakePath (self, rcResolving, true,
-			  &full_path, path, args);
-
-    if (rc != 0)
-    {
-	/* can't "fix" path */
-	/*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-    }
-    else
-    {
-	const KTocEntry * pnode;
-	KTocEntryType     type;
-
-	rc = KArcDirResolvePathNode (self, rcResolving, full_path, /*follow links*/true, &pnode, &type);
-
-	if (rc != 0)
-	{
-	    /* can't resolve path */
-	    /*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-	}
-	else
-	{
-	    switch (type)
-	    {
-	    default:
-                *contiguous = false;
-		break;
-	    case ktocentrytype_emptyfile:
-	    case ktocentrytype_file:
-                *contiguous = true;
-		break;
-	    }
-	}
-	free (full_path);
-    }
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- *
- */
-static KDirectory_vt_v1 vtKArcDir =
-{
-    /* version 1.0 */
-    1, 3,
-
-    /* start minor version 0 methods*/
-    KArcDirDestroy,
-    KArcDirList,
-    KArcDirVisit,
-    KArcDirVisitUpdate,
-    KArcDirPathType,
-    KArcDirResolvePath,
-    KArcDirResolveAlias,
-    KArcDirRename,
-    KArcDirRemove,
-    KArcDirClearDir,
-    KArcDirVAccess,
-    KArcDirSetAccess,
-    KArcDirCreateAlias,
-    KArcDirOpenFileRead,
-    KArcDirOpenFileWrite,
-    KArcDirCreateFile,
-    KArcDirFileSize,
-    KArcDirSetFileSize,
-    KArcDirOpenDirRead,
-    KArcDirOpenDirUpdate,
-    KArcDirCreateDir,
-    KArcDirDestroyFile,
-    /* end minor version 0 methods*/
-
-    /* start minor version 1 methods*/
-    KArcDirVDate,
-    KArcDirSetDate,
-    KArcDirGetSysDir,
-    /* end minor version 1 methods*/
-
-    /* start minor version 2 methods*/
-    KArcDirFileLocator,
-    /* end minor version 2 methods*/
-
-    /* start minor version 3 methods*/
-    KArcDirFilePhysicalSize,
-    KArcDirFileContiguous
-    /* end minor version 3 methods*/
-};
-
-/* ----------------------------------------------------------------------
- * KArcDirMake
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN] KArcDir **		self		objected oriented c "self"
- * [IN] enum RCContext 		ctx		context to use when passing along rc_t
- * [IN] const KDirectory * 	parent		KDirectory type for path before the archive
- * [IN] const KToc * 	toc		table of contents for the archive
- * [IN] const KTocEntry * 	node		this directory's node within the TOC
- * [IN] const KFile * 		archive		open archive file as KFile
- * [IN] uint32_t 		dad_root	offset of end of "root" within the path
- * [IN] const char *		path		path all the way back to file system root not
- *						effective but real root
- * [IN] uint32_t		path_size	length of path
- * [IN] bool			update		!read_only -- ignored for now and forced read_only
- * [IN] bool			chroot		make this a chroot to dad root?
- */
-static
-rc_t	KArcDirMake	(KArcDir ** self,
-                         enum RCContext ctx,
-                         const KDirectory * parent,
-                         const KToc * toc,
-                         const KTocEntry * node,
-                         const void * archive,
-                         KArcFSType baseType,
-                         uint32_t dad_root,
-                         const char *path,
-                         uint32_t path_size,
-                         bool update, /* ignored */
-                         bool chroot)
-{
-    KArcDir * dir;
-    rc_t rc;
-
-    assert (self != NULL);
-    assert (parent != NULL);
-    assert (toc != NULL);
-    /* node will be NULL at base archive file */
-    assert (archive != NULL);
-    assert (path != NULL);
-
-    dir = malloc ((sizeof(KArcDir) - sizeof dir->path) + path_size + 2);
-
-    if (dir == NULL)
-    {
-        *self = NULL;
-        return RC (rcFS, rcArc, rcCreating, rcMemory, rcExhausted);
-    }
-
-    dir->toc = NULL;
-    dir->archive.v = NULL;
-
-    rc = KDirectoryInit (&dir->dad, (const KDirectory_vt*) &vtKArcDir,
-                         "KArcDir", path,
-			 /* update*/ false); /* force KDirectory to read_only here */
-    if (rc != 0)
-    {
-        free (dir);
-        return ResetRCContext (rc, rcFS, rcDirectory, ctx);
-    }
-
-    dir->parent = parent;
-    dir->toc = toc;
-    KTocAddRef(toc);
-    dir->node = node;
-    dir->arctype = baseType;
-    dir->archive.v = archive;
-
-    switch (baseType)
-    {
-    default:
-        free (dir);
-        return RC (rcFS, rcArc, rcConstructing, rcParam, rcInvalid);
-    case tocKFile:
-        KFileAddRef (archive);
-        break;
-    case tocKDirectory:
-        KDirectoryAddRef (archive);
-        break;
-    }
-    memcpy (dir->path, path, path_size);
-    dir->root = chroot ? path_size : dad_root;
-    dir->size = path_size+1; /* make space for the next two operations */
-    dir->path [path_size] = '/';
-    dir->path [path_size+1] = 0;
-    *self = dir;
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * KArcDirGetTOC
- *
- * [IN]  const KArcDir * 	self	Object oriented C
- * [OUT] const KToc ** 	toc	Where to put a pointer to the TOC for the KArcDir
- *
- * Set a pointer to point the TOC for this KArcDir(KDirectory)
- */
-rc_t KArcDirGetTOC (const KArcDir * self,
-                    const struct KToc ** toc)
-{
-    assert (self != NULL);
-    assert (toc != NULL);
-
-    *toc = self->toc;
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * KDirectoryToKArcDir
- *
- * [IN]  const KDirectory * 	self	Object oriented C
- * [OUT] const KArcDir * 	cast	Object oriented C
- *
- *
- * Get a reference to a KArcDir from a KDirectory as a cast.  It is a new reference.
- */
-
-LIB_EXPORT rc_t CC KDirectoryToKArcDir (const KDirectory * self, const KArcDir ** cast)
-{
-    rc_t rc;
-    if ( cast == NULL )
-        rc = RC ( rcFS, rcArc, rcCasting, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcArc, rcCasting, rcSelf, rcNull );
-        else
-        {
-            if (self->vt != (const KDirectory_vt*)&vtKArcDir)
-                rc = RC ( rcFS, rcArc, rcCasting, rcSelf, rcIncorrect );
-            else
-            {
-                rc = KDirectoryAddRef ( self );
-                if ( rc == 0 )
-                {
-                    * cast = (const KArcDir*)self;
-                    return 0;
-                }
-            }
-        }
-
-        * cast = NULL;
-    }
-
-    return rc;
-}
-
-
-static
-rc_t KDirectoryOpenArcDirRead_intern( const KDirectory * self,
-                                      const KDirectory ** pdir,
-                                      bool chroot,
-                                      bool silent,
-                                      const char * path,
-                                      KArcFSType baseType,
-                                      void * _archive,
-                                      rc_t ( CC * parse )( KToc *, const void *,
-                                                           bool( CC* )( const KDirectory*,
-                                                                        const char *, void*),
-                                                           void * ),
-                                      bool( CC* filter )( const KDirectory*, const char *, void * ),
-                                      void * filterparam )
-{
-    union
-    {
-        const void * v;
-        const KFile * f;
-        const KDirectory * d;
-    } archive;
-    KArcDir * arcdir = NULL;
-    KToc   * toc = NULL;
-    String   spath;
-    size_t   pathlen;
-    rc_t     rc = 0;
-    rc_t     rcaux = 0;
-    char     cpath [ 4096 ];
-    uint32_t type;
-
-    archive.v = _archive;
-    /* -----
-     * sanity check parameters  The first bunch is from the base class KDirectory.
-     */
-    if ( pdir == NULL )
-    {
-        if ( !silent )
-            PLOGMSG ( klogErr, ( klogErr,
-                      "NULL parameter for the root KArcDir for $(file)",
-                       PLOG_S ( file ),
-                       path ) );
-        return RC ( rcFS, rcDirectory, rcOpening, rcDirectory, rcNull );
-    }
-    *pdir = NULL;
-
-    if ( self == NULL )
-    {
-        if ( !silent )
-            PLOGMSG ( klogErr, ( klogErr,
-                      "NULL parameter for self for $(file)",
-                      PLOG_S ( file ),
-                      path ) );
-        return RC ( rcFS, rcDirectory, rcOpening, rcSelf, rcNull );
-    }
-
-    if ( path == NULL )
-    {
-        if ( !silent )
-            PLOGMSG ( klogErr,( klogErr,
-                      "NULL parameter for the root KArcDir for $(file)",
-                      PLOG_S ( file ),
-                      path ) );
-        return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcNull );
-    }
-
-    if ( path[0] == 0x00 )
-    {
-        if ( !silent )
-            PLOGMSG ( klogErr,( klogErr,
-                      "NULL string for the root KArcDir for $(file)",
-                      PLOG_S ( file ),
-                      path ) );
-        return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcInvalid );
-    }
-
-    if (_archive == NULL)
-    {
-        /* -----
-         * we got a local String type mixed in along with ASCIZ cstrings
-         */
-        rc = KDirectoryResolvePath ( self, true, cpath, sizeof (cpath), "%s", path );
-        if ( rc == 0 )
-        {
-            size_t ln;
-            ln = strlen (cpath);
-            if ((cpath[ln-1] == '.')&&(cpath[ln-2] == '/'))
-                cpath[ln-2] = '\0';
-        }
-        else
-            return rc;
-    }
-    else
-    {
-        size_t ln;
-
-        rc = string_printf (cpath, sizeof cpath, &ln, "%s", path);
-        if ((rc == 0) && (ln > sizeof cpath))
-            rc = RC (rcFS, rcArc, rcOpening, rcBuffer, rcInsufficient);
-    }
-
-    StringInitCString ( &spath, cpath );
-    pathlen = strlen ( cpath );
-
-    if (_archive != NULL)
-    {
-        switch (baseType)
-        {
-        case tocKFile:
-            rc = KFileAddRef (_archive);
-            break;
-        case tocKDirectory:
-            rc = KDirectoryAddRef (_archive);
-            break;
-        default:
-            /* i dunno */
-            break;
-        }
-        if (rc)
-            return rc;
-    }
-    else
-    {
-        type = KDirectoryPathType ( self, "%s", cpath );
-        switch ( type & ~kptAlias )
-        {
-        default:
-            rc = RC ( rcFS, rcArc, rcOpening, rcFile, rcUnexpected );
-            if ( !silent )
-                LOGERR (klogErr, rc, "Unusable file type" );
-            break;
-        case kptNotFound:
-        case kptBadPath:
-            rc = RC ( rcFS, rcArc, rcOpening, rcFile, rcNotFound );
-            break;
-
-        case kptFile:
-            /* -----
-             * Open the archive file as a KFILE for internal use
-             *
-             * Fail / quit if we couldn't
-             */
-            if ( baseType != tocKFile )
-            {
-                rc = RC ( rcFS, rcArc, rcOpening, rcFile, rcIncorrect );
-                if ( !silent )
-                    LOGERR ( klogErr, rc, "Mismatch of file type and expected type" );
-                return rc;
-            }
-
-            rc = KDirectoryOpenFileRead ( self, &archive.f, "%s", cpath );
-            if ( rc != 0 && !silent )
-            {
-                PLOGERR ( klogErr, ( klogErr, rc,
-                                     "Failed to open archive file $(file)",
-                                     PLOG_S (file),
-                                     path ) );
-            }
-        
-            break;
-
-        case kptDir:
-            if ( baseType != tocKDirectory )
-            {
-                rc = RC ( rcFS, rcArc, rcOpening, rcFile, rcInconsistent );
-                if ( !silent )
-                    LOGERR ( klogErr, rc, "Mismatch of file type and expected type" );
-                return rc;
-            }
-
-            rc = KDirectoryOpenDirRead ( self, &archive.d, false, "%s", cpath );
-            if ( rc != 0 && !silent )
-            {
-                PLOGMSG ( klogErr,
-                          ( klogErr, "Failed to open archive directory $(file)",
-                            PLOG_S ( file ), path ) );
-            }
-            break;
-        } /* switch ( type & ~kptAlias ) */
-    }
-    if ( rc == 0 )
-    {
-        /* -----
-         * Build the TOC necessary to get to all internal files and subdirectories
-         * Any sub KArcDir or KFile created will also need to reference the same TOC
-         */
-        rc = KTocInit ( &toc, &spath, baseType, archive.v, sraAlign4Byte );
-        if ( rc != 0 )
-        {
-            if ( !silent )
-                PLOGERR ( klogErr, 
-                     ( klogErr, rc, "Failed to initialize Table of Contents for $(path)", 
-                     PLOG_S ( path ), cpath ) );
-        }
-        else
-        {
-            const KTocEntry * node;
-
-            node = KTocGetRoot( toc );
-
-            rc = KArcDirMake (&arcdir,      /* where to build the KArcDir */
-                              rcAccessing,  /* funky RC replacement thingie */
-                              self,         /* parent KDirectory - for previous path */
-                              toc,          /* table of contents structure for this archive */
-                              node,         /* archive "root" has no node */
-                              archive.v,    /* KFile for the archive */
-                              baseType,     /* base type o archive */
-                              0,            /* dad_root */
-                              cpath,        /* path to archive will be the path of the directory */
-                              (uint32_t)pathlen, /* length of path (the Init will append "/") */
-                              true,         /* readonly */
-                              false);       /* not chroot */
-            if ( rc != 0 )
-            {
-                if ( !silent )
-                PLOGERR ( klogErr, 
-                          ( klogErr, rc, "Failed to allocate for the root KArcDir for $(file)",
-                          PLOG_S ( file ), path ) );
-            }
-            else
-            {
-                rc = parse( toc,archive.v, filter, filterparam );
-                if ( rc == SILENT_RC ( rcFS, rcArc, rcParsing, rcToc, rcIncomplete ) )
-                {
-                    rcaux = rc;
-                    rc = 0;
-                }
-                if ( rc != 0 )
-                {
-                    if ( !silent )
-                        PLOGERR ( klogErr, 
-                             ( klogErr, rc, "Failed to parse $(file)",
-                             PLOG_S ( file ), cpath ) );
-                }
-                else
-                {
-                    *pdir = &arcdir->dad;
-                }
-            }
-        }
-    }
-    /* -----
-     * if rc is non-zero we failed somewhere above.
-     * Release allocated memory and exit with that error code.
-     */
-    if ( archive.v != NULL )
-    {
-        switch ( baseType )
-        {
-        default:
-            free ( (void*)archive.v );
-            break;
-        case tocKFile:
-            KFileRelease ( archive.f );
-            break;
-        case tocKDirectory:
-            KDirectoryRelease ( archive.d );
-            break;
-        }
-    }
-
-    rc = rc | rcaux;
-
-    if ( rc != 0 )
-    {
-        if ( arcdir != NULL )
-            KDirectoryRelease ( &arcdir->dad );
-        *pdir = NULL;
-    }
-
-    if ( toc != NULL )
-        KTocRelease ( toc );
-
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KDirectoryOpenArcDirRead
- *  Open an archive file as a KDirectory derived type: made to match 
- *  KDirectoryOpenDirRead() where parse could be the first element of arg
- *
- * Much of the code in this function is copied directly from KDirectoryVOpenDirRead
- *
- * [IN]  dir   A KDirectory (of any derived type) to reach the archive file
- * [OUT] pdir  The KDirectory (of type KArcDir)
- * [IN]  chroot if non-zero, the new directory becomes chroot'd and interprets paths
- *       stating with '/'
- * [IN]  path   The path to the archive - this will decome the directory path
- * [IN]  parse  A pointer to the function needed to build a TOC by parsing the file
- *
- * This function is made difficult because a path is not a global type.  Where we
- * would like to be able to take path and args and have them parsed nicely as they
- * are for KSysDir or KArcDir with nearly identical functions those functions are
- * not available here as self is a KDirectory but we do not know and should not know
- * whether it is a KSysDir or KArcDir.  Unfortunately KSysDir was made overly opaque.
- * [this is a result of providing full encapsulation, i.e. KDirectory is ONLY an
- *  interface and there is no implementation provided.][well very little]
- * If we could take path and args (path and ...) and pass them to a function
- * equivalent to KSysDirMakePath we would be able to do this right.  Or if we could
- * ask the self what it's path was and what it considered size and root we could do
- * the path build here and tidy up properly what we got.  .As is, we have  to be more
- * limited.
- *
- * We will have to wait and fix this right in directory.c where we can instead have
- * an attempt to open using KDirectory[V]OpenDirRead() check if when it tries to
- * open a directory but instead finds it has been given a path it will try to parse 
- * the file using a known set of parse functions to see if the file can be treated
- * as a directory. Then this function can be called from KDirectoryOpenDirRead.
- */
-LIB_EXPORT rc_t CC KDirectoryOpenArcDirRead( const KDirectory * self,
-    const KDirectory ** pdir,
-    bool chroot,
-    const char * path,
-    KArcFSType baseType,
-    rc_t ( CC * parse )( KToc *, const void *,
-        bool( CC * )( const KDirectory *, const char *, void * ), void * ),
-    bool ( CC * filter )( const KDirectory*, const char *, void *),
-    void * filterparam )
-{
-    return KDirectoryOpenArcDirRead_intern( self,
-        pdir,
-        chroot, 
-        false,
-        path,
-        baseType,
-        NULL,
-        parse,
-        filter,
-        filterparam );
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryOpenArcDirRead_silent( const KDirectory * self,
-    const KDirectory ** pdir,
-    bool chroot,
-    const char * path,
-    KArcFSType baseType,
-    rc_t ( CC * parse )( KToc *, const void *,
-        bool( CC * )( const KDirectory *, const char *, void * ), void * ),
-    bool ( CC * filter )( const KDirectory*, const char *, void *),
-    void * filterparam )
-{
-    return KDirectoryOpenArcDirRead_intern( self,
-        pdir,
-        chroot, 
-        true,
-        path, 
-        baseType,
-        NULL,
-        parse,
-        filter,
-        filterparam );
-}
-LIB_EXPORT rc_t CC KDirectoryOpenArcDirRead_silent_preopened( const KDirectory * self,
-    const KDirectory ** pdir,
-    bool chroot,
-    const char * path,
-    KArcFSType baseType,
-    void * archive,
-    rc_t ( CC * parse )( KToc *, const void *,
-        bool( CC * )( const KDirectory *, const char *, void * ), void * ),
-    bool ( CC * filter )( const KDirectory*, const char *, void *),
-    void * filterparam )
-{
-    return KDirectoryOpenArcDirRead_intern( self,
-        pdir,
-        chroot, 
-        true,
-        path, 
-        baseType,
-        archive,
-        parse,
-        filter,
-        filterparam );
-}
-
-
-/* ======================================================================
- * 
- */
-typedef struct KArcDirPersistVisitFuncData
-{
-    Vector * vector;
-    KArcDir * dir;
-    char path[4096];
-} KArcDirPersistVisitFuncData;
-
-
-static
-rc_t CC KArcDirPersistVisitFunc (const KDirectory * dir, uint32_t unused_type, const char * name, void * data)
-{
-    KPathType type;
-    KArcDirPersistVisitFuncData * vdata;
-    char * path;
-    size_t len = 0;
-    rc_t rc;
-
-    rc = 0;
-    vdata = data;
-
-    type = (KPathType)KDirectoryPathType (dir, "%s", name);
-    switch (type)
-    {
-    default:
-	return 0;
-    case kptDir:
-	len = strlen (vdata->path);
-	if (len > 0)
-	{
-	    vdata->path[len] = '/';
-	    strcpy (vdata->path+len+1, name);
-	}
-	else
-	    strcpy (vdata->path, name);
-
-
-/* this needs cleaning up - dir moved along but path did not.  path handling is weak through out */
-/* 	rc = KArcDirVisit ((const KArcDir*)dir, false, KArcDirPersistVisitFunc, data, vdata->path, NULL); */
-	rc = KArcDirVisit ((const KArcDir*)dir, false, KArcDirPersistVisitFunc, data, name, NULL);
-	if (rc != 0)
-	{
-	    LOGERR (klogInt, rc, "KArcDirPersist Visit failed");
-	}
-	vdata->path[len] = '\0';
-	return rc;
-    case kptFile:
-    case kptFile|kptAlias:
-	len = strlen (vdata->path);
-	if (len > 0)
-	{
-	    vdata->path[len] = '/';
-	    strcpy (vdata->path+len+1, name);
-	}
-	else
-	    strcpy (vdata->path, name);
-	path = malloc (strlen(vdata->path)+1);
-	if (path == NULL)
-	{
-	    rc = RC (rcFS, rcArc, rcReindexing, rcMemory, rcExhausted);
-	}
-	else
-	{
-	    strcpy (path, vdata->path);
-	    rc = VectorAppend (vdata->vector, NULL, path);
-	}
-	vdata->path[len] = '\0';
-
-	return rc;
-    }
-}
-
-static
-void CC whack ( void *item, void *data )
-{
-    free (item);
-}
-
-/* ========================================
- * Build a Persisted version of a TOC in a buffer
- * return the allocated buffer
- */
-#ifdef _DEBUGGING
-static
-void CC write_entry( void * item, void *data)
-{
-    const char * path = item;
-    uint32_t * count = data;
-
-    TOC_SORT(("%3u: %s\n", *count, path));
-
-    (*count)++;
-}
-#endif
-rc_t KArcDirPersistHeader (const KArcDir * self,
-                           void ** buffer,
-                           size_t * buffer_size,
-                           uint64_t * file_size,
-                           KSRAFileAlignment align,
-                           rc_t (CC*usort)(const KDirectory*, Vector*))
-{
-    rc_t         rc;
-    const KToc * toc;
-
-    FUNC_ENTRY();
-
-    if (self == NULL)
-    {
-	rc = RC (rcFS, rcDirectory, rcPersisting, rcSelf, rcNull);
-	LOGERR (klogInt, rc, "KArcDirPersist Self is NULL");
-	return rc;
-    }
-    if (buffer == NULL)
-    {
-	rc = RC (rcFS, rcDirectory, rcPersisting, rcParam, rcNull);
-	LOGERR (klogInt, rc, "KArcDirPersist buffer is NULL");
-	return rc;
-    }
-    rc = KArcDirGetTOC (self, &toc);
-    if (rc != 0)
-        LOGERR (klogInt, rc, "KArcDirPersist TOC retrieval failed");
-    else
-    {
-        /* mutable field as it only applies to this specific operation */
-        rc = KTocAlignmentSet ((KToc*)toc, align);
-        if (rc != 0)
-            LOGERR (klogInt, rc, "KArcDirPersist TOC alignment failed");
-        else
-        {
-            Vector filevector;
-            KArcDirPersistVisitFuncData	data;
-
-            VectorInit (&filevector, 0, 0);
-
-            data.path[0] = '\0'; /* looks like "" */
-            data.vector = &filevector;
-
-
-            rc = KArcDirVisit (self, false, KArcDirPersistVisitFunc, &data, ".", NULL);
-            if (rc != 0)
-            {
-                LOGERR (klogInt, rc, "KArcDirPersist Visit failed");
-            }
-            else
-            {
-
-#ifdef _DEBUGGING
-/* this loop and the next just can be used in a debug build to verify the sorting function used */
-                {
-                    uint32_t ix;
-                    TOC_SORT (("Pre-sort order:\n"));
-
-                    ix = 1;
-                    VectorForEach ( &filevector, false, write_entry, &ix);
-                }
-#endif
-
-                if (usort)
-                    rc = usort(&self->dad, &filevector);
-
-#ifdef _DEBUGGING
-                {
-                    uint32_t ix;
-                    TOC_SORT (("Post-sort order:\n"));
-
-                    ix = 1;
-                    VectorForEach ( &filevector, false, write_entry, &ix);
-                }
-#endif
-
-
-                if (rc != 0)
-                {
-                    LOGERR (klogInt, rc, "KArcDirPersist user sort failed failed");
-                }
-                else
-                {
-                    rc = KTocPersist (toc, buffer, buffer_size, file_size, &filevector);
-                    if (rc != 0)
-                        LOGERR (klogInt, rc, "KArcDirPersist TOC retrieval failed");
-                }
-            }
-/*     free (data.path); */
-            VectorWhack (&filevector, whack, NULL);
-	}
-    }
- 
-    return rc;
-}
-
-KFS_EXTERN bool CC KDirectoryIsKArcDir ( const KDirectory * self )
-{
-    return self != NULL && &self -> vt -> v1 == &vtKArcDir;
-}
-
-KFS_EXTERN bool CC KArcDirIsFromRemote ( const KArcDir * self )
-{
-    return self != NULL && self -> arctype == tocKFile &&
-            ( KFileIsKCacheTeeFile ( self -> archive . f ) || KFileIsKHttpFile ( self -> archive . f ) );
-}
-
-
-/* end of file arc.c */
-
diff --git a/libs/kfs/arrayfile.c b/libs/kfs/arrayfile.c
deleted file mode 100644
index 0f19006..0000000
--- a/libs/kfs/arrayfile.c
+++ /dev/null
@@ -1,423 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-#include <kfs/impl.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-
-/*--------------------------------------------------------------------------
- * KArrayFile
- */
-
-
-/* Destroy
- *  destroy array-file
- */
-LIB_EXPORT rc_t CC KArrayFileDestroy ( KArrayFile *self )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcDestroying, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . destroy ) ( self );
-    }
-
-    return RC ( rcFS, rcFile, rcDestroying, rcInterface, rcBadVersion );
-}
-
-
-/* AddRef
- *  creates a new reference
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KArrayFileAddRef ( const KArrayFile *self )
-{
-    if ( self != NULL )
-        atomic32_inc ( & ( ( KArrayFile* ) self ) -> refcount );
-    return 0;
-}
-
-/* Release
- *  discard reference to file
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KArrayFileRelease ( const KArrayFile *cself )
-{
-    KArrayFile *self = ( KArrayFile* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            rc_t rc = KArrayFileDestroy ( self );
-            if ( rc != 0 )
-                atomic32_set ( & self -> refcount, 1 );
-            return rc;
-        }
-    }
-    return 0;
-}
-
-/* Dimensionality
- *  returns the number of dimensions in the ArrayFile
- *
- *  "dim" [ OUT ] - return parameter for number of dimensions
- */
-LIB_EXPORT rc_t CC KArrayFileDimensionality ( const KArrayFile *self, uint8_t *dim )
-{
-    if ( dim == NULL )
-        return RC ( rcFS, rcFile, rcAccessing, rcParam, rcNull );
-
-    * dim = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcAccessing, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . dimensionality ) ( self, dim );
-    }
-
-    return RC ( rcFS, rcFile, rcAccessing, rcInterface, rcBadVersion );
-}
-
-
-/* SetDimensionality
- *  sets the number of dimensions in the ArrayFile
- *
- *  "dim" [ IN ] - new number of dimensions; must be > 0
- */
-LIB_EXPORT rc_t CC KArrayFileSetDimensionality ( KArrayFile *self, uint8_t dim )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcResizing, rcSelf, rcNull );
-
-    if ( dim == 0 )
-        return RC ( rcFS, rcFile, rcAccessing, rcParam, rcNull );
-
-    if ( ! self -> write_enabled )
-        return RC ( rcFS, rcFile, rcResizing, rcFile, rcNoPerm );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . set_dimensionality ) ( self, dim );
-    }
-
-    return RC ( rcFS, rcFile, rcResizing, rcInterface, rcBadVersion );
-}
-
-
-/* DimExtents
- *  returns the extent of every dimension
- *
- *  "dim" [ IN ] - the dimensionality of "extents"
- *
- *  "extents" [ OUT ] - returns the extent for every dimension
- */
-LIB_EXPORT rc_t CC KArrayFileDimExtents ( const KArrayFile *self, uint8_t dim, uint64_t *extents )
-{
-    uint8_t i;
-    if ( extents == NULL || dim == 0 )
-        return RC ( rcFS, rcFile, rcAccessing, rcParam, rcNull );
-
-    for ( i = 0; i < dim; ++i )
-        extents[ i ] = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcAccessing, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . dim_extents ) ( self, dim, extents );
-    }
-
-    return RC ( rcFS, rcFile, rcAccessing, rcInterface, rcBadVersion );
-}
-
-
-/* SetDimExtents
- *  sets the new extents for every dimension
- *
- *  "dim" [ IN ] - the dimensionality of "extents"
- *
- *  "extents" [ IN ] - new extents for every dimension
- */
-LIB_EXPORT rc_t CC KArrayFileSetDimExtents ( KArrayFile *self, uint8_t dim, uint64_t *extents )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcResizing, rcSelf, rcNull );
-
-    if ( ! self -> write_enabled )
-        return RC ( rcFS, rcFile, rcResizing, rcFile, rcNoPerm );
-
-    if ( extents == NULL || dim == 0 )
-        return RC ( rcFS, rcFile, rcResizing, rcParam, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . set_dim_extents ) ( self, dim, extents );
-    }
-
-    return RC ( rcFS, rcFile, rcResizing, rcInterface, rcBadVersion );
-}
-
-
-/* ElementSize
- *  returns the element size in bits
- *
- *  "elem_bits" [ OUT ] - size of each element in bits
- */
-LIB_EXPORT rc_t CC KArrayFileElementSize ( const KArrayFile *self, uint64_t *elem_bits )
-{
-    if ( elem_bits == NULL )
-        return RC ( rcFS, rcFile, rcAccessing, rcParam, rcNull );
-
-    *elem_bits = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcAccessing, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . element_size ) ( self, elem_bits );
-    }
-
-    return RC ( rcFS, rcFile, rcAccessing, rcInterface, rcBadVersion );
-}
-
-
-/* Read
- *  read from n-dimensional position
- *
- *  "dim" [ IN ] - the dimensionality of all vectors
- *
- *  "pos"  [ IN ] - n-dimensional starting position in elements
- *
- *  "buffer" [ OUT ] and "elem_count" [ IN ] - return buffer for read
- *  where "elem_count" is n-dimensional in elements
- *
- *  "num_read" [ OUT ] - n-dimensional return parameter giving back
- *      the number of read elements in every dimension
- */
-LIB_EXPORT rc_t CC KArrayFileRead ( const KArrayFile *self, uint8_t dim,
-    const uint64_t *pos, void *buffer, const uint64_t *elem_count,
-    uint64_t *num_read )
-{
-    uint8_t i;
-    if ( num_read == NULL || pos == NULL || elem_count == NULL || dim == 0 )
-        return RC ( rcFS, rcFile, rcReading, rcParam, rcNull );
-
-    for ( i = 0; i < dim; ++i )
-        num_read[ i ] = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcSelf, rcNull );
-
-    if ( ! self -> read_enabled )
-        return RC ( rcFS, rcFile, rcReading, rcFile, rcNoPerm );
-
-    if ( buffer == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcBuffer, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . read ) ( self, dim, pos, buffer, elem_count, num_read );
-    }
-
-    return RC ( rcFS, rcFile, rcReading, rcInterface, rcBadVersion );
-}
-
-
-/* Read_v
- *  read one element of variable length from n-dimensional position
- *
- *  "dim" [ IN ] - the dimensionality of all vectors
- *
- *  "pos"  [ IN ] - n-dimensional starting position in elements
- *
- *  "buffer" [ OUT ] and "elem_count" [ IN ] - return buffer for read
- *  where "elem_count" is length of buffer in elements
- *
- *  "num_read" [ OUT ] - return parameter giving back
- *      the number of read elements in every dimension
- */
-LIB_EXPORT rc_t CC KArrayFileRead_v ( const KArrayFile *self, uint8_t dim,
-    const uint64_t *pos, void *buffer, const uint64_t elem_count,
-    uint64_t *num_read )
-{
-    if ( num_read == NULL || pos == NULL || elem_count == 0 || dim == 0 )
-        return RC ( rcFS, rcFile, rcReading, rcParam, rcNull );
-
-    *num_read = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcSelf, rcNull );
-
-    if ( ! self -> read_enabled )
-        return RC ( rcFS, rcFile, rcReading, rcFile, rcNoPerm );
-
-    if ( buffer == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcBuffer, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . read_v ) ( self, dim, pos, buffer, elem_count, num_read );
-    }
-
-    return RC ( rcFS, rcFile, rcReading, rcInterface, rcBadVersion );
-}
-
-
-/* Write
- *  write into n-dimensional position
- *
- *  "dim" [ IN ] - the dimensionality of all vectors
- *
- *  "pos"  [ IN ] - n-dimensional offset where to write to
- *                   in elements
- *
- *  "buffer" [ IN ] and "elem_count" [ IN ] - data to be written
- *  where "elem_count" is n-dimensional in elements
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of elements actually written per dimension
- */
-LIB_EXPORT rc_t CC KArrayFileWrite ( KArrayFile *self, uint8_t dim,
-    const uint64_t *pos, const void *buffer, const uint64_t *elem_count,
-    uint64_t *num_writ )
-{
-    uint8_t i;
-    if ( num_writ == NULL || pos == NULL || elem_count == NULL || dim == 0 )
-        return RC ( rcFS, rcFile, rcWriting, rcParam, rcNull );
-
-    for ( i = 0; i < dim; ++i )
-        num_writ[ i ] = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcWriting, rcSelf, rcNull );
-
-    if ( ! self -> write_enabled )
-        return RC ( rcFS, rcFile, rcWriting, rcFile, rcNoPerm );
-
-    if ( buffer == NULL )
-        return RC ( rcFS, rcFile, rcWriting, rcBuffer, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . write ) ( self, dim, pos, buffer, elem_count, num_writ );
-    }
-
-    return RC ( rcFS, rcFile, rcWriting, rcInterface, rcBadVersion );
-}
-
-
-/* GetMeta
- *  extracts metadata into a string-vector
- *
- *  "key"   [ IN ]  - the key which part of the metadata to retrieve
- *
- *  "list"  [ OUT ] - pointer to a KNamelist-pointer
- *
- */
-LIB_EXPORT rc_t CC KArrayFileGetMeta ( struct KArrayFile const *self, const char *key,
-    const struct KNamelist **list )
-{
-    if ( key == NULL || list == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcParam, rcNull );
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcSelf, rcNull );
-
-    *list = NULL;
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . get_meta ) ( self, key, list );
-    }
-
-    return RC ( rcFS, rcFile, rcWriting, rcInterface, rcBadVersion );
-}
-
-
-/* Init
- *  initialize a newly allocated file object
- */
-LIB_EXPORT rc_t CC KArrayFileInit ( KArrayFile *self, const KArrayFile_vt *vt,
-    bool read_enabled, bool write_enabled )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcSelf, rcNull );
-    if ( vt == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcNull );
-    switch ( vt -> v1 . maj )
-    {
-    case 0:
-        return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcInvalid );
-
-    case 1:
-        switch ( vt -> v1 . min )
-        {
-            /* ADD NEW MINOR VERSION CASES HERE */
-        case 0:
-#if _DEBUGGING
-        if ( vt -> v1 . write == NULL              ||
-             vt -> v1 . read == NULL               ||
-             vt -> v1 . element_size == NULL       ||
-             vt -> v1 . set_dim_extents == NULL    ||
-             vt -> v1 . dim_extents == NULL        ||
-             vt -> v1 . set_dimensionality == NULL ||
-             vt -> v1 . dimensionality == NULL     ||
-             vt -> v1 . get_meta == NULL           ||
-             vt -> v1 . destroy == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcNull );
-#endif
-            break;
-        default:
-            return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcBadVersion );
-        }
-        break;
-
-    default:
-        return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcBadVersion );
-    }
-
-    self -> vt = vt;
-    KRefcountInit ( & self -> refcount, 1, "KArrayFile", "Creating", "-" );
-    self -> read_enabled = ( uint8_t ) ( read_enabled != 0 );
-    self -> write_enabled = ( uint8_t ) ( write_enabled != 0 );
-
-    return 0;
-}
diff --git a/libs/kfs/buffile-read.c b/libs/kfs/buffile-read.c
deleted file mode 100644
index 7635568..0000000
--- a/libs/kfs/buffile-read.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-typedef struct KBufReadFile KBufReadFile;
-#define KFILE_IMPL KBufReadFile
-
-#include <kfs/extern.h>
-
-#include <kfs/file.h>
-#include <kfs/impl.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
-
-
-/*-----------------------------------------------------------------------
- * KBufReadFile
- */
-struct KBufReadFile
-{
-    KFile dad;
-
-    uint64_t pos;       /* position of buff within the original file */
-
-    const KFile *f;           /* original file being buffered */
-
-    size_t bsize;       /* size of the buffer */
-    size_t num_valid;   /* how much of the buffer is actually valid */
-
-    uint8_t buff [ 1 ];
-};
-
-static
-rc_t CC KBufReadFileDestroy ( KBufReadFile *self )
-{
-    rc_t rc = KFileRelease ( self -> f );
-    if ( rc == 0 )
-        free ( self );
-    return rc;
-}
-
-static
-struct KSysFile* CC KBufReadFileSysFile ( const KBufReadFile *self, uint64_t *offset )
-{
-    /* does not support SysFile */
-    * offset = 0;
-    return NULL;
-}
-
-static
-rc_t CC KBufReadFileRandomAccess ( const KBufReadFile *self )
-{
-    return KFileRandomAccess ( self -> f );
-}
-
-static
-rc_t CC KBufReadFileSize ( const KBufReadFile *self, uint64_t *size )
-{
-    return KFileSize ( self -> f, size );
-}
-
-static
-rc_t CC KBufReadFileSetSize ( KBufReadFile *self, uint64_t size )
-{
-    return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported );
-}
-
-static
-rc_t CC KBufReadFileRead ( const KBufReadFile *cself, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc = 0;
-
-    assert (cself);
-    assert (buffer);
-    assert (num_read);
-
-    /* start assuming nothing will be read */
-    *num_read = 0;
-
-    if (bsize != 0)
-    {
-        KBufReadFile * self = (KBufReadFile *)cself;
-        uint64_t new_pos; 
-        size_t new_offset;
-
-        /* cast might be a no-op */
-        new_offset = (size_t)(pos % cself->bsize);
-        new_pos = pos - new_offset;
-
-        /* we need to read if we are on the wrong 'sector page'
-         * or the current 'sector page' isn't long enough.
-         *
-         * If on the wrong page just kill the contents
-         */
-        if (new_pos != cself->pos)
-        {
-            self->num_valid = 0;
-            self->pos = new_pos;
-        }
-
-        /* new we agree on the 'sector page' even if we have nothing
-         * valid in it */
-        if ((self->num_valid == 0) || (self->num_valid <= (size_t)new_offset))
-        {
-            size_t new_num_read;
-            rc = KFileReadAll (self->f, self->pos + self->num_valid,
-                               self->buff + self->num_valid, 
-                               self->bsize - self->num_valid,
-                               &new_num_read);
-            if (rc == 0)
-                self->num_valid += new_num_read;
-        }
-
-        /* now we have all we're gonna get this time */
-        if (new_offset < self->num_valid)
-        {
-            size_t to_copy;
-
-            to_copy = self->num_valid - new_offset;
-            if (to_copy > bsize)
-                to_copy = bsize;
-            
-            memmove (buffer, self->buff + new_offset, to_copy);
-            *num_read = to_copy;
-        }
-    }
-    return rc;
-}
-
-static
-rc_t CC KBufReadFileWrite ( KBufReadFile *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    return RC ( rcFS, rcFile, rcWriting, rcFunction, rcUnsupported );
-}
-
-static
-uint32_t CC KBufReadFileType ( const KBufReadFile * self )
-{
-    return KFileType ( self -> f );
-}
-
-static
-rc_t KBufReadFileMake ( KBufReadFile ** bp, const KFile *f, size_t bsize,
-    const KFile_vt *vt, bool read_enabled, bool write_enabled )
-{
-    rc_t rc;
-
-    KBufReadFile *buf = calloc ( sizeof * buf - 1 + bsize, 1 );
-    if ( buf == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        rc = KFileInit ( & buf -> dad, vt, "KBufReadFile", "no-name", read_enabled, write_enabled );
-        if ( rc == 0 )
-        {
-            rc = KFileAddRef ( f );
-            if ( rc == 0 )
-            {
-                buf -> f = ( KFile* ) f;
-                buf -> bsize = bsize;
-                * bp = buf;
-                return 0;
-            }
-        }
-
-        free ( buf );
-    }
-
-    return rc;
-}
-
-/* MakeBufferedWrite
- *  make a writable file buffer
- *
- *  "buf" [ OUT ] - return parameter for new buffered file
- *
- *  "original" [ IN ] - source file to be buffered. must have read access
- *
- *  "bsize" [ IN ] - buffer size
- */
-
-static
-const KFile_vt_v1 vtKBufReadFileRandWR_v1 =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KBufReadFileDestroy,
-    KBufReadFileSysFile,
-    KBufReadFileRandomAccess,
-    KBufReadFileSize,
-    KBufReadFileSetSize,
-    KBufReadFileRead,
-    KBufReadFileWrite,
-
-    /* 1.1 */
-    KBufReadFileType
-};
-
-LIB_EXPORT 
-rc_t CC KBufReadFileMakeRead ( const KFile ** bp, const KFile * original, size_t bsize )
-{
-    rc_t rc;
-
-    if ( bp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( original == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! original -> read_enabled )
-        {
-            if ( original -> write_enabled )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcWriteonly );
-            else
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        }
-        else
-        {
-            KBufReadFile *buf;
-            rc = KBufReadFileMake ( & buf, original, bsize,
-                ( const KFile_vt* ) & vtKBufReadFileRandWR_v1, true, false );
-            if ( rc == 0 )
-            {
-                * bp = & buf -> dad;
-                return 0;
-            }
-        }
-
-        * bp = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/kfs/buffile-write.c b/libs/kfs/buffile-write.c
deleted file mode 100644
index c4e07dc..0000000
--- a/libs/kfs/buffile-write.c
+++ /dev/null
@@ -1,371 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-typedef struct KBufWriteFile KBufWriteFile;
-#define KFILE_IMPL KBufWriteFile
-
-#include <kfs/extern.h>
-
-#include <kfs/file.h>
-#include <kfs/impl.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
-
-
-/*-----------------------------------------------------------------------
- * KBufWriteFile
- */
-struct KBufWriteFile
-{
-    KFile dad;
-
-    uint64_t pos;
-
-    KFile *f;
-
-    size_t bsize;
-    size_t num_valid;
-
-    uint8_t buff [ 1 ];
-};
-
-
-/*
-static
-rc_t CC KBufWriteFileDestroy ( KBufWriteFile *self )
-{
-    rc_t rc = KFileRelease ( self -> f );
-    if ( rc == 0 )
-        free ( self );
-    return rc;
-}
-*/
-
-static
-rc_t KBufWriteFileFlush ( KBufWriteFile *self, uint64_t dpos )
-{
-    rc_t rc;
-    size_t total_writ, partial;
-
-    /* flush buffer */
-    for ( rc = 0, total_writ = 0; total_writ < self -> num_valid; total_writ += partial )
-    {
-        rc = KFileWrite ( self -> f, dpos + total_writ,
-            & self -> buff [ total_writ ],
-            self -> num_valid - total_writ, & partial );
-        if ( rc != 0 )
-            break;
-        if ( partial == 0 )
-        {
-            rc = RC ( rcFS, rcFile, rcWriting, rcTransfer, rcIncomplete );
-            break;
-        }
-    }
-
-    if ( rc == 0 )
-        self -> num_valid = 0;
-
-    return rc;
-}
-
-static
-rc_t CC KBufWriteFileFlushDestroy ( KBufWriteFile *self )
-{
-    rc_t rc = KBufWriteFileFlush ( self, self -> pos );
-    if ( rc == 0 )
-        rc = KFileRelease ( self -> f );
-    if ( rc == 0 )
-        free ( self );
-    return rc;
-}
-
-static
-struct KSysFile* CC KBufWriteFileNoSysFile ( const KBufWriteFile *self, uint64_t *offset )
-{
-    * offset = 0;
-    return NULL;
-}
-
-static
-rc_t CC KBufWriteFileRandomAccess ( const KBufWriteFile *self )
-{
-    return KFileRandomAccess ( self -> f );
-}
-
-static
-rc_t CC KBufWriteFileSize ( const KBufWriteFile *self, uint64_t *size )
-{
-    return KFileSize ( self -> f, size );
-}
-
-static
-rc_t CC KBufWriteFileSetSize ( KBufWriteFile *self, uint64_t size )
-{
-    if ( self -> pos + self -> num_valid > size )
-    {
-        if ( self -> pos < size )
-        {
-            size_t total, num_writ, to_write = ( size_t ) ( size - self -> pos );
-            for ( total = 0; total < to_write; total += num_writ )
-            {
-                rc_t rc = KFileWrite ( self -> f, self -> pos + total,
-                    & self -> buff [ total ], to_write - total, & num_writ );
-                if ( rc != 0 )
-                    return rc;
-                if ( num_writ == 0 )
-                    return RC ( rcFS, rcFile, rcReading, rcTransfer, rcIncomplete );
-            }
-        }
-
-        self -> pos = 0;
-        self -> num_valid = 0;
-    }
-
-    return KFileSetSize ( self -> f, size );
-}
-
-static
-rc_t CC KBufWriteFileNoRead ( const KBufWriteFile *cself, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    return RC ( rcFS, rcFile, rcReading, rcFunction, rcUnsupported );
-}
-
-static
-rc_t CC KBufWriteFileWrite ( KBufWriteFile *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    rc_t rc;
-    size_t total, partial, trailing;
-
-    const uint8_t *bbuff = buffer;
-    uint64_t send = pos + size;
-
-    /* case 1: empty write */
-    if ( size == 0 )
-    {
-        * num_writ = 0;
-        return 0;
-    }
-
-    /* perform write */
-    for ( rc = 0, total = trailing = 0; total < size; total += partial )
-    {
-        size_t boff = total - trailing;
-        uint64_t dpos = self -> pos;
-        uint64_t dend = self -> pos + self -> num_valid;
-        uint64_t dlim = self -> pos + self -> bsize;
-        uint64_t spos = pos + boff;
-
-        /* case 2: left within buffer */
-        if ( dpos <= spos && spos <= dend && spos < dlim )
-        {
-            partial = ( size_t ) ( ( dlim < send ? dlim : send ) - spos );
-            memcpy ( & self -> buff [ spos - dpos ], & bbuff [ boff ], partial );
-            if ( spos + partial > dend )
-            {
-                dend = spos + partial;
-                self -> num_valid = ( size_t ) ( dend - dpos );
-            }
-        }
-
-        /* case 3: right within buffer */
-        else if ( spos < dpos && dpos < send && send <= dlim )
-        {
-            partial = ( size_t ) ( send - dpos );
-            memcpy ( & self -> buff [ spos - dpos ], & bbuff [ boff ], partial );
-            if ( send > dend )
-            {
-                dend = send;
-                self -> num_valid = ( size_t ) ( dend - dpos );
-            }
-
-            /* adjust other components for trailing copy */
-            assert ( trailing == 0 );
-            trailing = partial;
-            send = dpos;
-        }
-
-        /* case 4: no intersection */
-        else if ( send <= dpos || dend <= spos )
-        {
-            /* flush buffer as-is */
-            rc = KBufWriteFileFlush ( self, dpos );
-            if ( rc != 0 )
-                break;
-
-            /* empty buffer centered on this write */
-            self -> pos = spos;
-
-            /* if write is >= buffer size, just write it directy */
-            partial = size - total;
-            if ( partial < self -> bsize )
-            {
-                memcpy ( self -> buff, & bbuff [ boff ], partial );
-                self -> num_valid = partial;
-            }
-            else
-            {
-                rc = KFileWrite ( self -> f, spos, & bbuff [ boff ], partial, & partial );
-                if ( rc != 0 )
-                    break;
-                if ( partial == 0 )
-                {
-                    rc = RC ( rcFS, rcFile, rcWriting, rcTransfer, rcIncomplete );
-                    break;
-                }
-            }
-        }
-
-        /* case 5: completely engulfs */
-        else
-        {
-            assert ( spos < dpos && dlim < send );
-            rc = KFileWrite ( self -> f, spos, & bbuff [ boff ], ( size_t ) ( send - spos ), & partial );
-            if ( rc != 0 )
-                break;
-            if ( partial == 0 )
-            {
-                rc = RC ( rcFS, rcFile, rcWriting, rcTransfer, rcIncomplete );
-                break;
-            }
-
-            /* anything in the buffer is invalid now */
-            self -> num_valid = 0;
-        }
-    }
-
-    * num_writ = total;
-
-    return rc;
-}
-
-static
-uint32_t CC KBufWriteFileType ( const KBufWriteFile * self )
-{
-    return KFileType ( self -> f );
-}
-
-static
-rc_t KBufWriteFileMake ( KBufWriteFile ** bp, const KFile *f, size_t bsize,
-    const KFile_vt *vt, bool read_enabled, bool write_enabled )
-{
-    rc_t rc;
-
-    KBufWriteFile *buf = malloc ( sizeof * buf - 1 + bsize );
-    if ( buf == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        memset ( buf, 0, sizeof * buf );
-        rc = KFileInit ( & buf -> dad, vt, "KBufWriteFile", "no-name", read_enabled, write_enabled );
-        if ( rc == 0 )
-        {
-            rc = KFileAddRef ( f );
-            if ( rc == 0 )
-            {
-                buf -> f = ( KFile* ) f;
-                buf -> bsize = bsize;
-                * bp = buf;
-                return 0;
-            }
-        }
-
-        free ( buf );
-    }
-
-    return rc;
-}
-
-/* MakeBufferedWrite
- *  make a writable file buffer
- *
- *  "buf" [ OUT ] - return parameter for new buffered file
- *
- *  "original" [ IN ] - source file to be buffered. must have read access
- *
- *  "bsize" [ IN ] - buffer size
- */
-
-static
-const KFile_vt_v1 vtKBufWriteFileRandWR_v1 =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KBufWriteFileFlushDestroy,
-    KBufWriteFileNoSysFile,
-    KBufWriteFileRandomAccess,
-    KBufWriteFileSize,
-    KBufWriteFileSetSize,
-    KBufWriteFileNoRead,
-    KBufWriteFileWrite,
-
-    /* 1.1 */
-    KBufWriteFileType
-};
-
-LIB_EXPORT rc_t KBufWriteFileMakeWrite ( KFile ** bp, KFile * original, size_t bsize )
-{
-    rc_t rc;
-
-    if ( bp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( original == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! original -> write_enabled )
-        {
-            if ( original -> read_enabled )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcReadonly );
-            else
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        }
-        else
-        {
-            KBufWriteFile *buf;
-            rc = KBufWriteFileMake ( & buf, original, bsize,
-                ( const KFile_vt* ) & vtKBufWriteFileRandWR_v1, false, true );
-            if ( rc == 0 )
-            {
-                * bp = & buf -> dad;
-                return 0;
-            }
-        }
-
-        * bp = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/kfs/buffile.c b/libs/kfs/buffile.c
deleted file mode 100644
index 6c09d7c..0000000
--- a/libs/kfs/buffile.c
+++ /dev/null
@@ -1,574 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-struct KBufFile;
-#define KFILE_IMPL struct KBufFile
-
-#include <kfs/extern.h>
-#include <kfs/buffile.h>
-
-#include <kfs/file.h>
-#include <kfs/impl.h>
-#include <kfs/pagefile.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
-
-rc_t KBufWriteFileMakeWrite ( KFile ** bp, KFile * original, size_t bsize );
-
-
-/*-----------------------------------------------------------------------
- * KBufFile
- */
-typedef struct KBufFile KBufFile;
-struct KBufFile
-{
-    KFile dad;
-
-    uint64_t max_write;
-
-    KFile *f;
-    KPageFile *pf;
-
-    KPage *pg;
-    size_t pgsize;
-    uint32_t pgid;
-};
-
-
-#define KBufFileSerialAccess( self ) \
-    ( ( const KFile* ) & ( self ) -> dad ) -> align [ 0 ]
-
-#define KBufFileSetSerialAccess( self, val ) \
-    ( self ) -> dad . align [ 0 ] = ( val )
-    
-
-static
-rc_t CC KBufFileDestroy ( KBufFile *self )
-{
-    rc_t rc = KPageRelease ( self -> pg );
-    if ( rc == 0 )
-    {
-        self -> pg = NULL;
-        self -> pgid = 0;
-
-        rc = KPageFileRelease ( self -> pf );
-        if ( rc == 0 )
-        {
-            KFileRelease ( self -> f );
-            free ( self );
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t CC KBufFileDestroyTrunc ( KBufFile *self )
-{
-    /* grab some information */
-    KFile *f = self -> f;
-    rc_t rc = KFileAddRef ( self -> f );
-    uint64_t max_write = self -> max_write;
-
-    if ( rc == 0 )
-    {
-        /* destroy self and write all pages */
-        rc = KBufFileDestroy ( self );
-        if ( rc == 0 )
-            rc = KFileSetSize ( f, max_write );
-
-        KFileRelease ( f );
-    }
-    return rc;
-}
-
-static
-struct KSysFile* CC KBufFileGetSysFile ( const KBufFile *self, uint64_t *offset )
-{
-    * offset = 0;
-    return NULL;
-}
-
-static
-rc_t CC KBufFileRandomAccess ( const KBufFile *self )
-{
-    return KFileRandomAccess ( self -> f );
-}
-
-static
-rc_t CC KBufFileSizeRead ( const KBufFile *self, uint64_t *size )
-{
-    uint64_t lsize, fsize;
-    rc_t rc = KPageFileSize ( self -> pf, & lsize, & fsize, NULL );
-
-    if ( rc != 0 )
-        * size = 0;
-    else
-        * size = fsize;
-
-    return rc;
-}
-
-static
-rc_t CC KBufFileSize ( const KBufFile *self, uint64_t *size )
-{
-    uint64_t lsize, fsize;
-    rc_t rc = KPageFileSize ( self -> pf, & lsize, & fsize, NULL );
-
-    if ( rc != 0 )
-        * size = 0;
-    else if ( lsize < fsize )
-        * size = fsize;
-    else
-        * size = lsize;
-
-    return rc;
-}
-
-static
-rc_t CC KBufFileSetSize ( KBufFile *self, uint64_t size )
-{
-    KPageRelease ( self -> pg );
-    self -> pg = NULL;
-    self -> pgid = 0;
-
-    return KPageFileSetSize ( self -> pf, size );
-}
-
-static
-rc_t CC KBufFileNoSetSize ( KBufFile *self, uint64_t size )
-{
-    return RC ( rcFS, rcFile, rcResizing, rcFunction, rcUnsupported );
-}
-
-static
-rc_t CC KBufFileRead ( const KBufFile *cself, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    KBufFile *self = ( KBufFile* ) cself;
-
-    rc_t rc;
-    uint8_t *dst = buffer;
-    size_t total, partial;
-
-    for ( rc = 0, total = 0; total < bsize; pos += partial, total += partial )
-    {
-        const uint8_t *src;
-        size_t bytes, offset;
-
-        /* bytes remaining to be read */
-        size_t remain = bsize - total;
-
-        /* user wants to access this page */
-        uint32_t pgid = ( uint32_t ) ( pos / self -> pgsize ) + 1;
-
-        /* check against cached page */
-        if ( self -> pgid != pgid )
-        {
-            /* release previous page */
-            KPageRelease ( self -> pg );
-
-            /* get requested page */
-            rc = KPageFilePosGet ( self -> pf, & self -> pg, pos );
-            if ( rc != 0 )
-            {
-                if ( GetRCState ( rc ) == rcNotFound )
-                    rc = 0;
-
-                self -> pg = NULL;
-                self -> pgid = 0;
-                break;
-            }
-            self -> pgid = pgid;
-        }
-
-        /* access page memory */
-        rc = KPageAccessRead ( self -> pg, ( const void** ) & src, & bytes );
-        if ( rc != 0 )
-            break;
-
-        /* going to copy from page at the given offset */
-        offset = ( size_t ) ( pos % bytes );
-        assert ( bytes == self -> pgsize );
-
-        /* limit to end of file if serial access */
-        if ( KBufFileSerialAccess ( self ) )
-        {
-            uint64_t fsize;
-            rc = KPageFileSize ( self -> pf, NULL, & fsize, NULL );
-            if ( rc != 0 )
-                break;
-            if ( pgid * bytes > fsize )
-            {
-                bytes = ( size_t ) ( fsize % bytes ); 
-                if ( bytes <= offset )
-                    break;
-            }
-        }
-        /* limit to eof if read-only */
-        else if ( ! self -> dad . write_enabled )
-        {
-            if ( pgid * bytes > self -> max_write )
-            {
-                bytes = ( size_t ) ( self -> max_write % bytes ); 
-                if ( bytes <= offset )
-                    break;
-            }
-        }
-
-        /* limit bytes to request */
-        partial = bytes - offset;
-        if ( partial > remain )
-            partial = remain;
-
-        /* copy bytes */
-        memcpy ( & dst [ total ], & src [ offset ], partial );
-    }
-
-    if ( total != 0 )
-    {
-        * num_read = total;
-        return 0;
-    }
-
-    * num_read = 0;
-    return rc;
-}
-
-static
-rc_t CC KBufFileWrite ( KBufFile *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    rc_t rc;
-    size_t total, partial;
-    const uint8_t *src = buffer;
-
-    /* record start marker */
-    uint64_t start = pos;
-
-    for ( rc = 0, total = 0; total < size; pos += partial, total += partial )
-    {
-        uint8_t *dst;
-        size_t bytes, offset;
-
-        /* bytes remaining to be writ */
-        size_t remain = size - total;
-
-        /* user wants to access this page */
-        uint32_t pgid = ( uint32_t ) ( pos / self -> pgsize ) + 1;
-
-        /* check against cached page */
-        if ( self -> pgid != pgid )
-        {
-            /* release previous page */
-            KPageRelease ( self -> pg );
-
-            /* get requested page */
-            rc = KPageFilePosGet ( self -> pf, & self -> pg, pos );
-            if ( rc != 0 )
-            {
-                self -> pg = NULL;
-                self -> pgid = 0;
-                break;
-            }
-            self -> pgid = pgid;
-        }
-
-        /* access page memory */
-        rc = KPageAccessUpdate ( self -> pg, ( void** ) & dst, & bytes );
-        if ( rc != 0 )
-            break;
-
-        /* going to copy to page at the given offset */
-        offset = ( size_t ) ( pos % bytes );
-        partial = bytes - offset;
-        assert ( bytes == self -> pgsize );
-
-        /* limit bytes to request */
-        if ( partial > remain )
-            partial = remain;
-
-        /* copy bytes */
-        memcpy ( & dst [ offset ], & src [ total ], partial );
-    }
-
-    if ( total != 0 )
-    {
-        if ( start + total > self -> max_write )
-            self -> max_write = start + total;
-        * num_writ = total;
-        return 0;
-    }
-
-    * num_writ = 0;
-    return rc;
-}
-
-
-static
-rc_t CC KBufFileNoWrite ( KBufFile *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    return RC ( rcFS, rcFile, rcWriting, rcFunction, rcUnsupported );
-}
-
-static
-uint32_t CC KBufFileType ( const KBufFile * self )
-{
-    return KFileType ( self -> f );
-}
-
-static
-const KFile_vt_v1 vtKBufFileRD_v1 =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KBufFileDestroy,
-    KBufFileGetSysFile,
-    KBufFileRandomAccess,
-    KBufFileSizeRead,
-    KBufFileNoSetSize,
-    KBufFileRead,
-    KBufFileNoWrite,
-
-    /* 1.1 */
-    KBufFileType
-};
-
-static
-const KFile_vt_v1 vtKBufFileRW_v1 =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KBufFileDestroyTrunc,
-    KBufFileGetSysFile,
-    KBufFileRandomAccess,
-    KBufFileSize,
-    KBufFileSetSize,
-    KBufFileRead,
-    KBufFileWrite,
-
-    /* 1.1 */
-    KBufFileType
-};
-
-static
-rc_t KBufFileMake ( KBufFile ** bp, const KFile_vt *vt,
-    const KFile *f, uint64_t eof, const KPageFile *pf,
-    bool read_enabled, bool write_enabled, bool serial )
-{
-    rc_t rc;
-
-    KBufFile *buf = malloc ( sizeof * buf );
-    if ( buf == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        rc = KFileInit ( & buf -> dad, vt, "KBufFile", "no-name", read_enabled, write_enabled );
-        if ( rc == 0 )
-        {
-            rc = KFileAddRef ( f );
-            if ( rc == 0 )
-            {
-                buf -> max_write = serial ? 0 : eof;
-
-                buf -> f = ( KFile* ) f;
-                buf -> pf = ( KPageFile* ) pf;
-
-                buf -> pg = NULL;
-                buf -> pgsize = KPageConstSize ();
-                buf -> pgid = 0;
-
-                KBufFileSetSerialAccess ( buf, serial );
-
-                * bp = buf;
-                return 0;
-            }
-        }
-
-        free ( buf );
-    }
-
-    return rc;
-}
-
-/* MakeBufferedRead
- *  make a read-only file buffer
- *
- *  "buf" [ OUT ] - return parameter for new buffered file
- *
- *  "original" [ IN ] - source file to be buffered. must have read access
- *
- *  "bsize" [ IN ] - buffer size
- */
-LIB_EXPORT rc_t CC KBufFileMakeRead ( const KFile ** bp,
-    const KFile * original, size_t bsize )
-{
-    rc_t rc;
-
-    if ( bp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( original == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else
-        {
-            uint64_t eof;
-            bool serial = false;
-            const KPageFile *pf;
-
-            /* round bsize to next higher page */
-            size_t pgmask = KPageConstSize () - 1;
-            assert ( ( pgmask & ( pgmask + 1 ) ) == 0 );
-            bsize = ( bsize + pgmask ) & ~ pgmask;
-
-            /* check for serial access */
-            if ( KFileRandomAccess ( original ) != 0 )
-                serial = true;
-
-            /* try to get end of file */
-            rc = KFileSize ( original, & eof );
-            if ( rc != 0 )
-                serial = true;
-
-            /* create page file for read */
-            rc = KPageFileMakeRead ( & pf, original, bsize );
-            if ( rc == 0 )
-            {
-                /* create buffered file */
-                KBufFile *buf;
-                rc = KBufFileMake ( & buf, ( const KFile_vt* ) & vtKBufFileRD_v1,
-                    original, eof, pf, true, false, serial );
-                if ( rc == 0 )
-                {
-                    * bp = & buf -> dad;
-                    return 0;
-                }
-
-                KPageFileRelease ( pf );
-            }
-        }
-
-        * bp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* MakeBufferedWrite
- *  make a writable file buffer
- *
- *  "buf" [ OUT ] - return parameter for new buffered file
- *
- *  "original" [ IN ] - source file to be buffered. must have read access
- *
- *  "update" [ IN ] - if true, make a read/write buffer
- *
- *  "bsize" [ IN ] - buffer size
- */
-LIB_EXPORT rc_t CC KBufFileMakeWrite ( KFile ** bp,
-    KFile * original, bool update, size_t bsize )
-{
-    rc_t rc;
-
-    if ( bp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( original == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! original -> write_enabled )
-        {
-            if ( original -> read_enabled )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcReadonly );
-            else
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        }
-        else
-        {
-            /* check for serial access */
-            bool serial = false;
-            if ( KFileRandomAccess ( original ) != 0 )
-                serial = true;
-
-            /* if read-write is not required */
-            if ( ! update )
-                return KBufWriteFileMakeWrite ( bp, original, bsize );
-
-            /* can only use page file if backing is r/w */
-            if ( ! original -> read_enabled )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcWriteonly );
-            else
-            {
-                uint64_t eof;
-                KPageFile *pf;
-
-                /* round bsize to next higher page */
-                size_t pgmask = KPageConstSize () - 1;
-                assert ( ( pgmask & ( pgmask + 1 ) ) == 0 );
-                bsize = ( bsize + pgmask ) & ~ pgmask;
-
-                /* try to get end of file */
-                rc = KFileSize ( original, & eof );
-                if ( rc != 0 )
-                    serial = true;
-
-                /* create page file for update */
-                rc = KPageFileMakeUpdate ( & pf, original, bsize, serial );
-                if ( rc == 0 )
-                {
-                    /* create buffered file */
-                    KBufFile *buf;
-                    rc = KBufFileMake ( & buf, ( const KFile_vt* ) & vtKBufFileRW_v1,
-                        original, eof, pf, update, true, serial );
-                    if ( rc == 0 )
-                    {
-                        * bp = & buf -> dad;
-                        return 0;
-                    }
-
-                    KPageFileRelease ( pf );
-                }
-            }
-        }
-
-        * bp = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/kfs/bzip.c b/libs/kfs/bzip.c
deleted file mode 100644
index 95f9708..0000000
--- a/libs/kfs/bzip.c
+++ /dev/null
@@ -1,836 +0,0 @@
-/*=======================================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-struct KBZipFile;
-#define KFILE_IMPL struct KBZipFile
-
-#include <kfs/extern.h>
-#include <kfs/impl.h>
-#include <kfs/bzip.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/log.h>
-#include <sysalloc.h>
-
-#include <bzlib.h>      /* bz_stream */
-#include <assert.h>
-#include <stdlib.h>    /* malloc */
-#include <string.h>
-
-#ifdef _DEBUGGING
-#define BZIP_DEBUG(msg) DBGMSG(DBG_KFS,DBG_FLAG(DBG_KFS_BZIP), msg)
-#else
-#define BZIP_DEBUG(msg)
-#endif
-
-#define BZIP_DBGSTREAM(strm,msg)                                 \
-    BZIP_DEBUG(("%s: bz_stream (%p) %.35s\nnext_in %p "          \
-                "avail_in %6u total_in %10lu next_out %p "       \
-                "avail_out %6u total_out %10lu\n",               \
-                __func__, strm, msg,                             \
-                strm->next_in, strm->avail_in,                   \
-                (uint64_t)strm->total_in_lo32 +                  \
-                (((uint64_t)strm->total_in_hi32)<<32),           \
-                strm->next_out, strm->avail_out,                 \
-                (uint64_t)strm->total_out_lo32 +                 \
-                (((uint64_t)strm->total_out_hi32)<<32)))
-
-
-/***************************************************************************************/
-/* bzip2 File                                                                    */
-/***************************************************************************************/
-
-#define BZ2CHUNK 0x20000    /* 128K */
-
-/* ======================================================================
- * bzip2 KFile structure
- */
-typedef struct KBZipFile KBZipFile;
-struct KBZipFile
-{
-    KFile dad;
-    KFile *file; /* underlying KFile */
-    uint64_t filePosition;
-    uint64_t myPosition;
-    int BZ2_bzDecompressResult;
-    bz_stream strm;
-    char buff[BZ2CHUNK]; /* buffer to cache KFile data */
-    bool completed;
-};
-
-
-/* ======================================================================
- * subroutine functions for KBZipFile methods
- */
-static
-rc_t KBZipFileWriteInt (KBZipFile *self,
-                          int action,
-                          size_t *pnumwrit)
-{
-    bz_stream *strm;
-    unsigned avail_in;
-    rc_t rc = 0;
-
-    assert (self);
-    assert (pnumwrit);
-
-    *pnumwrit = 0;
-
-    strm = &self->strm;
-    avail_in = strm->avail_in;
-
-    /* run deflate() on input until output buffer not full, finish
-       compression if all of source has been read in */
-    do
-    {
-        uint32_t num_comp;
-        size_t written;
-        int zret;
-
-        /* compress one internal buffers worth */
-        strm->next_out = self->buff;
-        strm->avail_out = sizeof (self->buff);
-
-        zret = BZ2_bzCompress (strm, action);    /* no bad return value */
-
-        /* state not clobbered */
-        assert(zret == BZ_OK || zret == BZ_RUN_OK
-               || zret == BZ_FINISH_OK || zret == BZ_STREAM_END);
-
-        /* compression used the sizeof of the outbuffer - the amount
-         * it says it didn't use */
-        num_comp = sizeof(self->buff) - strm->avail_out;
-
-        rc = KFileWrite (self->file, self->filePosition, self->buff, num_comp, &written);
-
-        self->filePosition += written;
-
-        *pnumwrit = avail_in - strm->avail_in;
-
-    } while (strm->avail_out == 0);
-
-    assert (strm->avail_in == 0);     /* all input will be used */
-    return rc;
-}
-
-
-#if 0 /* obsolete */
-static
-int s_read(KBZipFile *self,
-           char *buffer,
-           size_t bsize,
-           size_t *num_read,
-           rc_t *rc)
-{
-    bz_stream* strm;
-    int ret;
-
-    assert(self && buffer && bsize && num_read);
-
-    strm = &self->strm;
-
-    ret = 0;
-    while (!*num_read) {
-        strm->next_out  = buffer;
-        strm->avail_out = bsize;
-        ret = BZ2_bzDecompress(strm);
-        assert(ret == BZ_OK || ret == BZ_STREAM_END);  /* state not clobbered */
-        *num_read = bsize - strm->avail_out;
-        if (strm->avail_out > 0) {
-            size_t src_read;
-            * rc = KFileRead
-                (self->file, self->filePosition, self->buff, sizeof(self->buff), &src_read);
-            if (*rc != 0)
-            {   return -70; }
-            strm->avail_in = src_read;
-            self->filePosition += src_read;
-            strm->next_in = self->buff;
-        }
-        if (!strm->avail_in)
-        {   break; }
-    }
-    return ret;
-}
-
-static rc_t old_KBZipFileReadInt ( KBZipFile * self, void * buffer, size_t bsize, size_t * num_read )
-{
-    rc_t rc = 0;
-    size_t numRead = 0;
-
-    do
-    {
-        int ret;
-        size_t have = 0;
-
-        if (self->BZ2_bzDecompressResult == BZ_STREAM_END)
-            break;
-        ret = s_read(self, (char*)buffer + numRead, bsize - numRead, &have, &rc);
-        if ( ret == -70 ) /* rc hack - known to not collide with bzlib errors */
-            return rc;
-        self->BZ2_bzDecompressResult = ret;
-        if (!have)
-            break;
-        numRead += have;
-    } while (numRead != bsize);
-
-    *num_read = numRead;
-    return rc;
-}
-#endif
-
-static
-rc_t KBZipFileReadInt (KBZipFile * self, void * buffer, size_t bsize, size_t * pnumread)
-{
-    bz_stream temp;     /* store some values here during a reinit after stream end */
-    bz_stream * strm;   /* alias for the object's bzip stream object */
-    /* size_t bleft = bsize; */
-    size_t num_read;
-    size_t tot_read = 0;
-    rc_t rc = 0;
-
-    BZIP_DEBUG (("---------------\n%s: Enter requesting bsize %lu\n", __func__, bsize));
-
-    strm = &self->strm;
-
-    for (tot_read = 0; tot_read < bsize ; )
-    {
-        char * this_out;
-        size_t src_read;
-        int zret;
-        bool bin;
-        bool bout;
-        bool end;
-
-        bin = (strm->avail_in != 0);
-
-        BZIP_DEBUG (("%s: loop start tot_read %zu\n", __func__, tot_read));
-
-        strm->next_out = this_out = (char*)buffer + tot_read;
-        strm->avail_out = (unsigned int) (bsize - tot_read);
-
-        BZIP_DEBUG(("%s: call Decompress\n", __func__));
-
-        BZIP_DBGSTREAM (strm, "before BZ2_bzDecompress");
-
-        zret = BZ2_bzDecompress(strm);
-
-        BZIP_DBGSTREAM (strm, "after BZ2_bzDecompress");
-
-        switch (zret)
-        {
-            /* unexpected error returns from zlib */
-        default:
-            BZIP_DEBUG (("%s: undocumented error return in bzip Decompress\n", __func__));
-            rc = RC (rcFS, rcFile, rcReading, rcFile, rcUnknown);
-            PLOGERR (klogErr,
-                     (klogErr, rc, "unknown error decompressing BZip2 file "
-                      "error code '$(EC)'", "EC=%d", zret));
-            return rc;
-
-            /* known unfixable errors */
-        case BZ_PARAM_ERROR:
-            BZIP_DEBUG (("%s: internal programming error - bad parameters\n", __func__));
-            rc = RC (rcFS, rcFile, rcReading, rcSelf, rcInvalid);
-            if (strm == NULL)
-                BZIP_DEBUG (("%s: strm is NULL\n", __func__));
-            else
-            {
-                if (strm->state == NULL)
-                    BZIP_DEBUG (("%s: strm->state is NULL\n", __func__));
-                if (strm->avail_out < 1)
-                    BZIP_DEBUG (("%s: strm->avail_out < 1\n", __func__));
-            }
-            LOGERR (klogInt, rc, "bzip strm structure bad");
-            return rc;
-
-        case BZ_DATA_ERROR:
-            BZIP_DEBUG (("%s: data integrity error in bzip stream\n", __func__));
-            rc = RC (rcFS, rcFile, rcReading, rcData, rcCorrupt);
-            LOGERR (klogErr, rc, "bzip stream data error");
-            return rc;
-
-        case BZ_DATA_ERROR_MAGIC:
-            BZIP_DEBUG (("%s: data magic bytes error in bzip stream\n", __func__));
-            rc = RC (rcFS, rcFile, rcReading, rcData, rcIncorrect);
-            LOGERR (klogErr, rc, "bzip stream not a bzip stream");
-            return rc;
-
-        case BZ_MEM_ERROR:
-            BZIP_DEBUG (("%s: memory exhausted during BZip decompress\n", __func__));
-            rc = RC (rcFS, rcFile, rcReading, rcMemory, rcExhausted);
-            LOGERR (klogErr, rc, "not enough memory available during bzip decompress");
-            return rc;
-
-        case BZ_STREAM_END:
-            BZIP_DEBUG (("%s: BZ_STREAM_END\n", __func__));
-            end = true;
-            num_read = strm->next_out - this_out;
-            bout = (num_read != 0);
-            BZIP_DEBUG (("%s: num_read %zu\n", __func__, num_read));
-            self->completed = true;
-            BZIP_DBGSTREAM (strm, "before BZ2_bzDecompressEnd");
-            zret = BZ2_bzDecompressEnd(strm);
-            BZIP_DBGSTREAM (strm, "after BZ2_bzDecompressEnd");
-            if (zret == BZ_OK)
-            {
-                temp = *strm;
-                memset (strm, 0, sizeof *strm);
-                zret = BZ2_bzDecompressInit (strm, 1, 0);
-                BZIP_DBGSTREAM (strm, "after BZ2_bzDecompressInit");
-                strm->next_in = temp.next_in;
-                strm->avail_in = temp.avail_in;
-/*                 strm->next_out = temp.next_out; */
-/*                 strm->avail_out = temp.avail_out; */
-                strm->total_in_lo32 = temp.total_in_lo32;
-                strm->total_in_hi32 = temp.total_in_hi32;
-                strm->total_out_lo32 = temp.total_out_lo32;
-                strm->total_out_hi32 = temp.total_out_hi32;
-                BZIP_DBGSTREAM (strm, "after restore");
-            }
-            switch (zret)
-            {
-            case BZ_OK:
-                break;
-            default:
-                return RC (rcFS, rcFile, rcReading, rcFile, rcUnknown);
-            }
-            goto read_more;
-
-        case BZ_OK:
-            BZIP_DEBUG (("%s: BZ_OK\n", __func__));
-            end = false;
-            num_read = strm->next_out - this_out;
-            bout = (num_read != 0);
-            BZIP_DEBUG (("%s: num_read %zu\n", __func__, num_read));
-
-        read_more:
-            /* if we wanted more on this read, read some more compressed */
-            tot_read += num_read;
-            if (strm->avail_in == 0)
-            {
-                rc = KFileRead (self->file, self->filePosition, self->buff, 
-                                sizeof self->buff, &src_read);
-                if (rc)
-                    return rc;
-
-                BZIP_DEBUG (("%s: KFileRead read %u\n", __func__, src_read));
-
-                if (src_read == 0)
-                {
-                    BZIP_DEBUG (("%s: end %u in %u out %u\n", __func__, end, bin, bout));
-                
-                    if (!end && bin && !bout)
-                        rc = RC (rcFS, rcFile, rcReading, rcData, rcInsufficient);
-                    goto done;
-                }
-                strm->avail_in = (unsigned int) src_read;
-                self->filePosition += src_read;
-                strm->next_in = self->buff;
-
-                /* if src_read == 0 but we are not at BZ_STREAM_END
-                 * we have an error
-                if (src_read == 0) bleft = 0;
-                */
-            }
-            break;
-        }
-        if (rc)
-            break;
-        BZIP_DEBUG (("%s: loop end tot_read %zu\n", __func__, tot_read));
-    }
-done:
-    BZIP_DEBUG (("%s: returning tot_read %zu\n\n\n", __func__, tot_read));
-    *pnumread = tot_read;
-    return rc;
-}
-
-
-static rc_t KBZipFileReadSeek (KBZipFile *self, uint64_t pos)
-{
-    rc_t rc = 0;
-    size_t num_read = 0;
-    size_t to_read;
-    uint8_t buff [ 32 * 1024 ];
-
-    for ( to_read = sizeof buff; self -> myPosition < pos; self -> myPosition += num_read )
-    {
-	if (self->myPosition + sizeof buff > pos)
-	    to_read = pos - self->myPosition;
-
-        BZIP_DEBUG(("%s: call KBZipFileReadInt to_read %zu \n",__func__));
-
-	rc = KBZipFileReadInt ( self, buff, to_read, &num_read);
-
-        BZIP_DEBUG(("%s: return KBZipFileReadInt num_read %zu \n",__func__));
-
-	if ( rc )
-	    break;
-
-	if (num_read == 0)
-	    break;
-    }
-    return rc;
-}
-
-
-/* ======================================================================
- * virtual table methods for KBZipFile object
- */
-
-/* Destroy
- *  destroy file
- */
-static rc_t CC KBZipFileDestroy (KBZipFile *self)
-{
-    rc_t rc = 0, orc = 0;
-
-    if (self)
-    {
-        if (self->file != NULL)
-        {
-            int zret = BZ_OK;
-
-            if (self->dad.write_enabled)
-            {
-                /* flush out end of compressed data */
-/*                 if (self->completed == false) */
-/*                 { */
-                    size_t ignored;
-                    bz_stream* strm = &self->strm;
-
-                    strm->avail_in = 0;
-                    strm->next_in = NULL;
-                    rc = KBZipFileWriteInt(self, BZ_FINISH, &ignored);
-/*                     assert (zret == BZ_STREAM_END); */        /* stream will be complete */
-/*                 } */
-
-                zret = BZ2_bzCompressEnd(&self->strm);   /* clean up */
-
-                self->completed = true;
-            }
-            else if (self->dad.read_enabled)
-            {
-                zret = BZ2_bzDecompressEnd (&self->strm);
-            }
-            else
-            {
-                rc = RC (rcFS, rcFile, rcDestroying, rcSelf, rcInvalid);
-                LOGERR (klogInt, orc, "corrupt object "
-                        "closing bzip file object");
-            }
-            if (zret != BZ_OK)
-            {
-                orc = RC (rcFS, rcFile, rcDestroying, rcParam, rcInvalid);
-                LOGERR (klogInt, orc, "bad parameters - coding error on "
-                        "closing bzip file object");
-                if (rc == 0)
-                    rc = orc;
-            }
-
-            orc = KFileRelease (self->file);
-            if (rc == 0)
-                rc = orc;
-        }
-        free (self);
-    }
-    return rc;
-}
-
-
-/* GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- */
-static struct KSysFile *CC KBZipFileGetSysFile (const KBZipFile *self,
-                                                uint64_t *offset)
-{
-    return NULL;
-}
-
-
-/* RandomAccess
- *  ALMOST by definition, the file is random access
- *
- *  certain file types will refuse random access
- *  these include FIFO and socket based files, but also
- *  wrappers that require serial access ( e.g. compression )
- *
- *  returns 0 if random access, error code otherwise
- */
-static
-rc_t CC KBZipFileRandomAccess (const KBZipFile *self)
-{
-    return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported );
-}
-
-
-/* Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KBZipFileSize (const KBZipFile *self, uint64_t *size)
-{
-    return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported );
-}
-
-
-/* SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KBZipFileSetSize(KBZipFile *self,
-                                uint64_t size)
-{
-    return RC ( rcFS, rcFile, rcUpdating, rcFunction, rcUnsupported );
-}
-
-
-/* Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - return parameter giving number of bytes
- *  actually read. when returned value is zero and return code is
- *  also zero, interpreted as end of file.
- */
-static
-rc_t CC KBZipFileRead (const KBZipFile *cself,
-                              uint64_t pos,
-                              void *buffer,
-                              size_t bsize,
-                              size_t *num_read)
-{
-    KBZipFile *self = (KBZipFile*) cself;
-    rc_t rc = 0;
-
-    size_t numRead = 0, ignore;
-
-    if (self->dad.read_enabled == false)
-        return RC (rcFS, rcFile, rcReading, rcFunction, rcUnsupported);
-
-    if (!num_read)
-    {   num_read = &ignore; }
-
-    *num_read = 0;
-
-    if (!cself || !buffer)
-        return RC ( rcFS, rcFile, rcReading, rcParam, rcNull );
-
-    if (!bsize)
-    {   return 0; }
-
-    if (pos < self->myPosition)
-    {
-        return RC ( rcFS, rcFile, rcReading, rcParam, rcInvalid );
-    }
-
-    BZIP_DEBUG(("%s: pos %lu bsize %zu\n", __func__, pos, bsize));
-    BZIP_DEBUG(("%s: myPosition %lu numRead '%zu'\n", __func__, self->myPosition, numRead));
-
-    if (pos > self->myPosition)
-    {
-        rc =  KBZipFileReadSeek (self, pos);
-        if (rc)
-            return rc;
-        if (pos != self->myPosition)
-            return 0;
-    }
-
-    rc = KBZipFileReadInt ( self, buffer, bsize, &numRead );
-    if (rc)
-        return rc;
-
-    *num_read = numRead;
-
-    self->myPosition += numRead;
-
-    BZIP_DEBUG(("%s: myPosition %lu numRead '%zu'\n", __func__, self->myPosition, numRead));
-
-    return 0;
-}
-
-
-/* Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- */
-static
-rc_t CC KBZipFileWrite (struct KBZipFile *self,
-                        uint64_t pos,
-                        const void *buffer,
-                        size_t bsize,
-                        size_t *pnum_writ)
-{
-    rc_t rc = 0;
-
-    if (self->dad.write_enabled == false)
-        rc = RC (rcFS, rcFile, rcWriting, rcFunction, rcUnsupported);
-    else
-    {
-        *pnum_writ = 0;
-
-        if (pos != self->myPosition)
-            rc = RC (rcFS, rcFile, rcWriting, rcParam, rcIncorrect);
-
-        else
-        {
-            bz_stream * strm;
-            size_t num_writ;
-
-            strm = &self->strm;
-            strm->next_in  = (char*) buffer;
-            strm->avail_in = (unsigned int) bsize;
-
-            rc =  KBZipFileWriteInt (self, BZ_RUN, &num_writ);
-            if (rc == 0)
-            {
-                self->myPosition += num_writ;
-                *pnum_writ = num_writ;
-            }
-        }
-    }
-    return rc;
-}
-
-
-/* Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KBZipFileType (const KBZipFile *self)
-{
-    return KFileType (self->file);
-}
-
-
-/* ======================================================================
- * virtual table for KBZipFile object
- */
-static
-KFile_vt_v1 KBZipFile_vt_v1 =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KBZipFileDestroy,
-    KBZipFileGetSysFile,
-    KBZipFileRandomAccess,
-    KBZipFileSize,
-    KBZipFileSetSize,
-    KBZipFileRead,
-    KBZipFileWrite,
-
-    /* 1.1 */
-    KBZipFileType
-};
-
-
-/* ======================================================================
- * Factory functions
- */
-
-LIB_EXPORT rc_t CC KFileMakeBzip2ForRead (const struct KFile **pnew_obj,
-                                          const struct KFile *compfile)
-{
-    rc_t rc;
-
-    if ( pnew_obj == NULL || compfile == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-
-    else
-    {
-        KBZipFile *obj;
-
-        *pnew_obj = NULL;
-
-        obj = (KBZipFile*) calloc(1,sizeof(KBZipFile));
-        if (!obj)
-        {
-            rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-            LOGERR (klogErr, rc, "memory exhausted building bzip2 "
-                    "file object");
-        }
-        else
-        {
-            rc = KFileInit(&obj->dad, (const KFile_vt*) &KBZipFile_vt_v1,
-                           "KBZipFile", "no-name", true, false);
-            if (rc == 0)
-            {
-                bz_stream * strm;
-                int zret;
-
-                strm = &obj->strm;
-                zret = BZ2_bzDecompressInit (strm, 1, /* verbosity */
-                                             0); /* small */
-
-                switch (zret)
-                {
-                case BZ_OK:
-                    obj->completed = true;
-                    rc = KFileAddRef (compfile);
-                    if (rc == 0)
-                    {
-                        obj->file = (KFile *)compfile;
-                        *pnew_obj = &obj->dad;
-                        return 0;
-                    }
-                    break;
-
-                case BZ_CONFIG_ERROR:
-                    rc = RC (rcFS, rcFile, rcConstructing, rcLibrary,
-                             rcCorrupt);
-                    LOGERR (klogFatal, rc, "bzip2 library miscompiled");
-                    break;
-
-                case BZ_PARAM_ERROR:
-                    rc = RC (rcFS, rcFile, rcConstructing, rcParam, rcInvalid);
-                    LOGERR (klogInt, rc, "coding error bzip2 file object");
-                    break;
-
-                case BZ_MEM_ERROR:
-                    rc = RC (rcFS, rcFile, rcConstructing, rcMemory,
-                             rcExhausted);
-                    LOGERR (klogErr, rc, "memory exhausted building bzip2 "
-                            "file object");
-                    break;
-
-                default:
-                    rc = RC (rcFS, rcFile, rcConstructing, rcLibrary,
-                             rcUnexpected);
-                    LOGERR (klogFatal, rc, "bzip2 library return unexpected "
-                            "error");
-                    break;
-
-                }
-            }
-        }
-        KBZipFileDestroy (obj);
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KFileMakeBzip2ForWrite (struct KFile **pnew_obj,
-                                           struct KFile *compfile)
-{
-    rc_t rc;
-
-    if ( pnew_obj == NULL || compfile == NULL )
-        rc= RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-
-    else
-    {
-        KBZipFile *obj;
-
-        *pnew_obj = NULL;
-
-        obj = (KBZipFile*)calloc(1,sizeof(KBZipFile));
-        if (obj == NULL)
-        {
-            rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-            LOGERR (klogErr, rc, "memory exhausted building bzip2 "
-                    "file object");
-        }
-        else
-        {
-            rc = KFileInit(&obj->dad, (const KFile_vt*)&KBZipFile_vt_v1,
-                           "KBZipFile", "no-name", false, true);
-            if (rc == 0)
-            {
-                bz_stream* strm;
-                int zret;
-
-                strm = &obj->strm;
-                zret = BZ2_bzCompressInit(strm, 9, /* blockSize100k */
-                                          1, /* verbosity */
-                                          30); /* workFactor */
-                switch (zret)
-                {
-                case BZ_OK:
-                    obj->completed = true;
-                    rc = KFileAddRef (compfile);
-                    if (rc == 0)
-                    {
-                        obj->file = compfile;
-                        *pnew_obj = &obj->dad;
-                        return 0;
-                    }
-                    break;
-
-                case BZ_CONFIG_ERROR:
-                    rc = RC (rcFS, rcFile, rcConstructing, rcLibrary,
-                             rcCorrupt);
-                    LOGERR (klogFatal, rc, "bzip2 library miscompiled");
-                    break;
-
-                case BZ_PARAM_ERROR:
-                    rc = RC (rcFS, rcFile, rcConstructing, rcParam, rcInvalid);
-                    LOGERR (klogInt, rc, "coding error bzip2 file object");
-                    break;
-
-                case BZ_MEM_ERROR:
-                    rc = RC (rcFS, rcFile, rcConstructing, rcMemory,
-                             rcExhausted);
-                    LOGERR (klogErr, rc, "memory exhausted building bzip2 "
-                            "file object");
-                    break;
-
-                default:
-                    rc = RC (rcFS, rcFile, rcConstructing, rcLibrary,
-                             rcUnexpected);
-                    LOGERR (klogFatal, rc, "bzip2 library return unexpected "
-                            "error");
-                    break;
-
-                }
-            }
-        }
-        KBZipFileDestroy (obj);
-    }
-    return rc;
-}
-
-
-/* EOF */
diff --git a/libs/kfs/cacheteefile.c b/libs/kfs/cacheteefile.c
deleted file mode 100644
index 5196ed1..0000000
--- a/libs/kfs/cacheteefile.c
+++ /dev/null
@@ -1,1833 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <kfs/extern.h>
-#include <stdio.h>
-
-struct KCacheTeeFile;
-#define KFILE_IMPL struct KCacheTeeFile
-#include <kfs/impl.h>
-
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/checksum.h>
-#include <klib/time.h>
-
-#include <kfs/cacheteefile.h>
-#include <kfs/defs.h>
-#include <kproc/queue.h>
-#include <atomic32.h>
-
-#include <sysalloc.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <endian.h>
-
-#include <stdio.h>
-
-#define NO_SCRATCH_BUFFER 1
-#define USE_BUFFER_POOL NO_SCRATCH_BUFFER && 1
-
-/* byte-order is an issue for treating these as words */
-#define USE_32BIT_BITMAP_WORDS 1
-
-
-/*--------------------------------------------------------------------------
- layout of local file:
- 
- CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC MMMMMMMMMMMMMM SS BB
-
- C ... file content in valid/invalid blocks
- M ... bitmap of blocks bytes = ( ( ( content-size / block-size ) + 1 ) / 8 ) + 1 )
- S ... size of content ( uint64_t ) 8 bytes
- B ... used blocksize  ( uint32_t ) 4 bytes
- */
-
-
-/*--------------------------------------------------------------------------
- * KCacheTeeFile
- */
-
-#define CACHE_TEE_DEFAULT_BLOCKSIZE ( 32 * 1024 * 4 )
-
-#define CACHE_STAT 0
-
-#if( CACHE_STAT > 0 )
-typedef struct CacheStatistic
-{
-    uint64_t requests;
-    uint64_t requested_bytes;
-    uint64_t delivered_bytes;    
-    uint64_t requests_below_32k;
-    uint64_t requests_consecutive;
-    uint64_t requests_in_first32k;
-    
-    uint64_t prev_pos;
-    uint64_t requests_same_pos;
-    uint64_t requests_same_pos_and_len;
-    size_t prev_len;
-    size_t min_len;
-    size_t max_len;
-    
-} CacheStatistic;
-
-
-static void init_cache_stat( CacheStatistic * stat )
-{
-    stat -> requests = 0;
-    stat -> requested_bytes = 0;
-    stat -> delivered_bytes = 0;    
-    stat -> requests_below_32k = 0;
-    stat -> requests_consecutive = 0;
-    stat -> requests_in_first32k = 0;
-    stat -> prev_pos = 0xFFFFFFFFFFFFFFFF;
-    stat -> requests_same_pos = 0;
-    stat -> requests_same_pos_and_len = 0;
-    stat -> prev_len = 0;
-    stat -> min_len = -1;    
-    stat -> max_len = 0;
-}
-
-static void write_cache_stat( CacheStatistic * stat, uint64_t pos, size_t requested, size_t delivered )
-{
-    ( stat -> requests )++;
-    ( stat -> requested_bytes )+= requested;
-    ( stat -> delivered_bytes )+= delivered;    
-
-    if ( requested < 0x08000 )
-        ( stat -> requests_below_32k )++;
-
-    if ( delivered < stat -> min_len )
-        stat -> min_len    = delivered;
-
-    if ( delivered > stat -> max_len )
-        stat -> max_len    = delivered;
-
-    if ( pos + requested < 0x08000 )
-        ( stat -> requests_in_first32k )++;
-        
-    if ( stat -> prev_pos != pos )
-    {
-        if ( stat -> prev_pos + stat -> prev_len == pos )
-        {
-            ( stat -> requests_consecutive )++;
-        }
-        
-        stat -> prev_pos = pos;
-        stat -> prev_len = requested;
-    }
-    else
-    {
-        if ( stat -> prev_len != requested )
-        {
-            ( stat -> requests_same_pos_and_len )++;
-            stat -> prev_len = requested;
-        }
-        ( stat -> requests_same_pos )++;
-    }
-}
-
-static void report_cache_stat( CacheStatistic * stat )
-{
-    fprintf( stderr, "\n" );
-    fprintf( stderr, "cache-stat.requests ................... %lu\n", stat -> requests );
-    fprintf( stderr, "cache-stat.requested_bytes ............ %lu\n", stat -> requested_bytes );
-    fprintf( stderr, "cache-stat.delivered_bytes ............ %lu\n", stat -> delivered_bytes );    
-    fprintf( stderr, "cache-stat.requests_below_32k ......... %lu\n", stat -> requests_below_32k );
-    fprintf( stderr, "cache-stat.requests_consecutive........ %lu\n", stat -> requests_consecutive );
-    fprintf( stderr, "cache-stat.requests_in_first32k........ %lu\n", stat -> requests_in_first32k );
-    
-    fprintf( stderr, "cache-stat.requests_same_pos .......... %lu\n", stat -> requests_same_pos );
-    fprintf( stderr, "cache-stat.requests_same_pos_and_len .. %lu\n", stat -> requests_same_pos );
-    fprintf( stderr, "cache-stat.min_len .................... %u\n", stat -> min_len );
-    fprintf( stderr, "cache-stat.max_len .................... %u\n", stat -> max_len );
-    
-    fprintf( stderr, "\n" );
-}
-
-#endif
-
-
-typedef struct KCacheTeeFile
-{
-    KFile dad;
-    const KFile * remote;                    /* the remote file we are wrapping (can be a local one too, we make no assumptions about that) */
-    KFile * local;                            /* the local cache of the remote one */
-    KDirectory * dir;                        /* we have to store a KDirectory because we need it at closing the file, where we test for promoting the cache */
-
-    uint64_t remote_size;                    /* the size of the wrapped file */
-    uint64_t local_size;                    /* the size of the local cache file ( remote_size + bitmap + tail ) */
-    uint64_t block_count;                    /* how many blocks do we need to cache the remote file ( last block may be shorter ) */
-
-#if USE_32BIT_BITMAP_WORDS
-    atomic32_t * bitmap;
-#else
-    uint8_t volatile * bitmap;                /* the bitmap of cached blocks */
-#endif
-    uint64_t bitmap_bytes;                    /* how many bytes do we need to store the bitmap */
-
-#if USE_BUFFER_POOL
-    KQueue * buffer_pool;
-#endif
-#if ! NO_SCRATCH_BUFFER
-    uint8_t * scratch_buffer;
-    uint64_t first_block_in_scratch;        /* what is the block-id of the first block in the scratch-buffer */
-    uint64_t scratch_size;                    /* how many bytes are allocated for the scratch-buffer */
-    uint64_t valid_scratch_bytes;            /* how many bytes store valid data in the scratch-buffer */
-#endif
-
-    uint32_t block_size;                    /* how big is a block ( aka 1 bit in the bitmap )*/
-
-#if( CACHE_STAT > 0 )
-    CacheStatistic stat;                    /* optional cache statistic */
-#endif
-
-    bool local_read_only;
-    char local_path [ 1 ];                    /* stores the path to the local cache, for eventual promoting at close */
-} KCacheTeeFile;
-
-
-#if USE_32BIT_BITMAP_WORDS
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define SWAP_FN(val) (val)
-#else
-#define SWAP_FN(val) \
-    (((val)>>24)&0xff) | /* move byte 3 to byte 0 */ \
-    (((val)<<8)&0xff0000) | /* move byte 1 to byte 2 */ \
-    (((val)>>8)&0xff00) | /* move byte 2 to byte 1 */ \
-    (((val)<<24)&0xff000000) /* byte 0 to byte 3 */
-#endif
-#define GEN_BIT_NR_MASK_ROW(i) SWAP_FN( 1 << ( (i) * 4 ) ), SWAP_FN( 1 << ( (i) * 4 + 1 ) ), SWAP_FN( 1 << ( (i) * 4 + 2 ) ), SWAP_FN( 1 << ( (i) * 4 + 3 ) )
-
-const uint32_t BitNr2Mask[ 32 ] =
-{
-    GEN_BIT_NR_MASK_ROW(0),
-    GEN_BIT_NR_MASK_ROW(1),
-    GEN_BIT_NR_MASK_ROW(2),
-    GEN_BIT_NR_MASK_ROW(3),
-    GEN_BIT_NR_MASK_ROW(4),
-    GEN_BIT_NR_MASK_ROW(5),
-    GEN_BIT_NR_MASK_ROW(6),
-    GEN_BIT_NR_MASK_ROW(7)
-};
-#undef SWAP_FN
-#undef GEN_BIT_NR_MASK_ROW
-
-#define IS_CACHE_BIT( CacheFile, Block_Nr ) \
-    ( ( atomic32_read ( & ( CacheFile )->bitmap[ (Block_Nr) >> 5 ] ) & BitNr2Mask[ (Block_Nr) & 31 ] ) > 0 )
-
-#define IS_BITMAP_BIT( BitMap, Block_Nr ) \
-    ( ( atomic32_read ( & ( BitMap )[ (Block_Nr) >> 5 ] ) & BitNr2Mask[ (Block_Nr) & 31 ] ) > 0 )
-
-#else
-
-const uint8_t BitNr2Mask[ 8 ] =
-{
-         /* 0  1  2  3   4   5   6    7  */
-            1, 2, 4, 8, 16, 32, 64, 128
-};
-
-#define IS_CACHE_BIT( CacheFile, Block_Nr ) ( ( CacheFile->bitmap[ (Block_Nr) >> 3 ] & BitNr2Mask[ (Block_Nr) & 7 ] ) > 0 )
-#define IS_BITMAP_BIT( BitMap, Block_Nr ) ( ( BitMap[ (Block_Nr) >> 3 ] & BitNr2Mask[ (Block_Nr) & 7 ] ) > 0 )
-
-
-#endif
-
-#define BITS_2_BYTES( BitCount ) ( ( ( BitCount ) + 7 ) >> 3 )
-#define SIZE_2_BLOCK_COUNT( Number_Of_Bytes, Block_Size ) ( ( ( Number_Of_Bytes ) + ( Block_Size ) - 1 ) / ( Block_Size ) )
-
-static rc_t calculate_local_size_from_remote_size( KCacheTeeFile *self )
-{
-    rc_t rc = 0;
-    if ( self->block_size > 0 )
-    {
-        self->block_count = SIZE_2_BLOCK_COUNT( self->remote_size, self->block_size );
-        self->bitmap_bytes = BITS_2_BYTES( self->block_count );
-        self->local_size = ( self->remote_size +
-                             self->bitmap_bytes + 
-                             sizeof self->remote_size + 
-                             sizeof self->block_size );
-    }
-    else
-    {
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcInvalid );
-        LOGERR( klogErr, rc, "div by zero attempt in calculating local size" );
-    }
-    return rc;
-}
-
-/*    factored out because it is used in:
-    create_bitmap(), IsCacheFileComplete(), GetCacheCompleteness() and Has_Cache_Zero_Blocks()
-*/
-#if USE_32BIT_BITMAP_WORDS
-static rc_t create_bitmap_buffer( atomic32_t ** bitmap, uint64_t bitmap_bytes )
-{
-    rc_t rc = 0;
-    *bitmap = calloc ( sizeof **bitmap, ( bitmap_bytes + sizeof ** bitmap - 1 ) / sizeof ** bitmap );
-    if ( *bitmap == NULL )
-    {
-        rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-        LOGERR( klogErr, rc, "init local bitmap-area" );
-    }
-    return rc;
-}
-#else
-static rc_t create_bitmap_buffer( uint8_t volatile ** bitmap, uint64_t bitmap_bytes )
-{
-    rc_t rc = 0;
-    *bitmap = calloc ( sizeof **bitmap, bitmap_bytes );
-    if ( *bitmap == NULL )
-    {
-        rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-        LOGERR( klogErr, rc, "init local bitmap-area" );
-    }
-    return rc;
-}
-#endif
-
-/*    factored out because it is used in:
-    init_new_local_file() and verify_existing_local_file()
-*/
-static rc_t create_bitmap( KCacheTeeFile *self )
-{
-    return create_bitmap_buffer( &self->bitmap, self->bitmap_bytes );
-}
-
-
-#if USE_32BIT_BITMAP_WORDS
-static bool is_bitmap_full( const atomic32_t * bitmap, uint64_t bitmap_bytes, uint64_t block_count )
-{
-    uint64_t bitmap_word;
-    const uint64_t bitmap_words_minus_one = ( ( bitmap_bytes + sizeof * bitmap - 1 ) >> 2 ) - 1;
-    for( bitmap_word = 0; bitmap_word < bitmap_words_minus_one; ++ bitmap_word )
-    {
-        if ( ~ atomic32_read ( & bitmap [ bitmap_word ] ) != 0 )
-            return false;
-    }
-
-    {
-        uint64_t block_id = ( bitmap_word << 5 );
-        while ( block_id < block_count )
-        {
-            bool block_cached = IS_BITMAP_BIT( bitmap, block_id );
-            if ( !block_cached )
-                return false;
-            ++block_id;
-        }
-    }
-    return true;
-}
-#else
-static bool is_bitmap_full( const uint8_t volatile * bitmap, uint64_t bitmap_bytes, uint64_t block_count )
-{
-    uint64_t bitmap_byte = 0;
-    while( bitmap_byte < ( bitmap_bytes - 1 ) )
-    {
-        if ( bitmap[ bitmap_byte++ ] != 0xFF )
-            return false;
-    }
-
-    {
-        uint64_t block_id = ( bitmap_byte << 3 );
-        while ( block_id < block_count )
-        {
-            bool block_cached = IS_BITMAP_BIT( bitmap, block_id );
-            if ( !block_cached )
-                return false;
-            ++block_id;
-        }
-    }
-    return true;
-}
-#endif
-
-
-static rc_t init_new_local_file( KCacheTeeFile * cf )
-{
-    rc_t rc = create_bitmap( cf );
-    if ( rc == 0 )
-    {
-        size_t written;
-        uint64_t pos = cf -> remote_size;
-
-        /* write the bitmap ( zero'd out ) into the local file */
-        rc = KFileWriteAll ( cf -> local, pos, 
-            ( const void * ) cf -> bitmap, cf -> bitmap_bytes, &written );
-        if ( rc == 0 && written != cf -> bitmap_bytes )
-        {
-            rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcInvalid );
-            LOGERR( klogErr, rc, "no full initialization of local file bitmap" );
-        }
-
-        /* write the remote-file-size into the local file ( uint64_t = 8 bytes )*/
-        if ( rc == 0 )
-        {
-            pos += cf -> bitmap_bytes;
-            rc = KFileWriteAll ( cf -> local, pos,
-                                 &cf -> remote_size, sizeof( cf -> remote_size ), &written );
-            if ( rc == 0 && written != sizeof( cf -> remote_size ) )
-            {
-                rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcInvalid );
-                LOGERR( klogErr, rc, "cannot write remote-filesize into local file" );
-            }
-        }
-
-        /* write the block-size into the local file ( size_t = 4 bytes )*/
-        if ( rc == 0 )
-        {
-            pos += sizeof( cf -> remote_size );
-            rc = KFileWriteAll ( cf -> local, pos,
-                                 &cf -> block_size, sizeof( cf -> block_size ), &written );
-            if ( rc == 0 && written != sizeof( cf -> block_size ) )
-            {
-                rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcInvalid );
-                LOGERR( klogErr, rc, "cannot write block-size into local file" );
-            }
-        }
-
-    }
-    return rc;
-}
-
-
-static rc_t try_read_uint32_t( const struct KFile * self, uint64_t pos, uint32_t * value )
-{
-    size_t num_read;
-    rc_t rc =  KFileRead( self, pos, value, sizeof *value, &num_read );
-    if ( rc == 0 )
-    {
-        if ( num_read != sizeof *value )
-            rc = SILENT_RC ( rcFS, rcFile, rcValidating, rcParam, rcInvalid );
-    }
-    return rc;
-}
-
-static rc_t try_read_uint64_t( const struct KFile * self, uint64_t pos, uint64_t * value )
-{
-    size_t num_read;
-    rc_t rc =  KFileRead( self, pos, value, sizeof *value, &num_read );
-    if ( rc == 0 )
-    {
-        if ( num_read != sizeof *value )
-            rc = SILENT_RC ( rcFS, rcFile, rcValidating, rcParam, rcInvalid );
-    }
-    return rc;
-}
-
-
-static rc_t read_block_size( const struct KFile * self, uint64_t local_size, uint32_t *block_size )
-{
-    if ( local_size >= sizeof *block_size )
-    {
-        uint64_t pos = local_size - ( sizeof *block_size );
-        int num_try = 3;
-        rc_t rc;
-
-        while ( true )
-        {
-            rc = try_read_uint32_t( self, pos, block_size );
-            
-            if ( rc == 0 && *block_size != 0 )
-                // we are done
-                return 0;
-            
-            if ( --num_try == 0 )
-                break;
-            
-            KSleep( 1 );
-        }
-        
-        if ( rc != 0 )
-            return rc;
-    }
-    
-    return RC ( rcFS, rcFile, rcValidating, rcParam, rcInvalid );
-}
-
-
-static rc_t read_content_size( const struct KFile * self, uint64_t local_size, uint64_t *content_size )
-{
-    if ( local_size >= sizeof( *content_size ) + 4 )
-    {
-        uint64_t pos = ( local_size - 4 ) - sizeof( *content_size );
-        int num_try = 3;
-        rc_t rc;
-
-        while ( true )
-        {
-            rc = try_read_uint64_t( self, pos, content_size );
-            if ( rc == 0 && *content_size != 0 )
-            {
-                if ( *content_size < local_size )
-                    return 0;
-                else
-                    return RC ( rcFS, rcFile, rcValidating, rcParam, rcInvalid );
-            }
-            
-            if ( --num_try == 0 )
-                break;
-            
-            KSleep( 1 );
-        }
-        
-        if ( rc != 0 )
-            return rc;
-    }
-    
-    return RC ( rcFS, rcFile, rcValidating, rcParam, rcInvalid );
-}
-
-
-static rc_t verify_file_structure( const uint64_t local_size, const uint32_t block_size, const uint64_t content_size,
-                                   uint64_t * block_count, /* size_t */ uint64_t * bitmap_bytes )
-{
-    rc_t rc = 0;
-    uint64_t expected_size;
-
-    *block_count = SIZE_2_BLOCK_COUNT( content_size, block_size );
-    *bitmap_bytes = BITS_2_BYTES( *block_count );
-
-    /* check if the values 'content-size' and 'block_size' result in the currect real file size */
-    expected_size = content_size + *bitmap_bytes + sizeof ( local_size ) + sizeof ( block_size );
-    if ( expected_size != local_size )
-        rc = RC ( rcFS, rcFile, rcValidating, rcParam, rcInvalid );
-    return rc;
-}
-
-
-static rc_t read_bitmap( KCacheTeeFile * cf )
-{
-    /* read the bitmap from the local file */
-    size_t num_read;
-    rc_t rc = KFileReadAll ( cf -> local, cf -> remote_size, ( void * ) cf -> bitmap, cf -> bitmap_bytes, &num_read );
-    if ( rc != 0 )
-    {
-        LOGERR( klogErr, rc, "cannot read bitmap from local file" );
-    }
-    else if ( num_read != cf -> bitmap_bytes )
-    {
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcInvalid );
-        PLOGERR( klogErr, ( klogErr, rc, "cannot read $(ls) bitmap-bytes from local file, read $(rs) instead", 
-                       "ls=%lu,rs=%lu", cf -> bitmap_bytes, num_read ));
-    }
-    return rc;
-}
-
-
-static rc_t verify_existing_local_file( KCacheTeeFile * cf, bool * fully_in_cache )
-{
-    uint64_t bitmap_bytes, content_size, block_count;
-    uint32_t block_size;
-    bool cached = false;
-    
-    rc_t rc = read_block_size ( cf -> local, cf -> local_size, &block_size );
-    /* read content-size, compare to the content-size of the remote file */
-    if ( rc == 0 )
-        rc = read_content_size ( cf -> local, cf -> local_size, &content_size );
-
-    if ( rc == 0 && content_size != cf -> remote_size )
-    {
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcInvalid );
-        PLOGERR( klogErr, ( klogErr, rc, "content-size in local file $(ls) does not match size of remote file $(rs)", 
-                           "ls=%lu,rs=%lu", content_size, cf -> remote_size ) );
-    }
-
-    /* check if the local file has the right size ( content + bitmap + content_size + block_size )*/
-    if ( rc == 0 )
-        rc = verify_file_structure ( cf -> local_size, block_size, content_size, &block_count, &bitmap_bytes );
-
-    /* check if the requested block-size equals the stored block-size */
-    if ( rc == 0 )
-    {
-        if ( cf -> block_size == 0 )
-            cf -> block_size = CACHE_TEE_DEFAULT_BLOCKSIZE;
-        if ( cf -> block_size != block_size )
-        {
-            PLOGMSG( klogWarn, ( klogWarn, "block-size in local file $(ls) does not match requested value $(rv)",
-                                "ls=%u,rv=%u", block_size, cf -> block_size ) );
-        }
-        /* use the block-size as stored in the file */
-        cf -> block_size = block_size;
-        cf -> block_count = block_count;
-        cf -> bitmap_bytes = bitmap_bytes;
-        rc = create_bitmap( cf );
-    }
-
-    /* read the bitmap into the memory ... */
-    if ( rc == 0 )
-        rc = read_bitmap( cf );
-
-    if ( rc == 0 )
-        cached = is_bitmap_full( cf -> bitmap, cf -> bitmap_bytes, cf -> block_count ); 
-        
-    if ( rc == 0 && fully_in_cache != NULL )
-        *fully_in_cache = cached;
-        
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC IsCacheFileComplete( const struct KFile * self, bool * is_complete )
-{
-    rc_t rc;
-    if ( self == NULL )
-        rc = RC( rcFS, rcFile, rcValidating, rcSelf, rcNull );
-    else if ( is_complete == NULL )
-        rc = RC( rcFS, rcFile, rcValidating, rcParam, rcNull );
-    else
-    {
-        uint64_t local_size;
-        *is_complete = false;
-        rc = KFileSize( self, &local_size );
-        if ( rc != 0 )
-        {
-            LOGERR( klogErr, rc, "cannot detect filesize when checking if cached file is complete" );
-        }
-        /* TODO: need to do a better constant tha a magic number */
-        else if (local_size < 13)
-        {
-            rc = RC ( rcFS, rcFile, rcValidating, rcSize, rcInsufficient );
-            LOGERR( klogErr, rc, "cannot use filesize of zero when checking if cached file is complete" );
-        }
-        else
-        {
-            uint32_t block_size;
-            rc = read_block_size( self, local_size, &block_size );
-            if ( rc == 0 )
-            {
-                uint64_t content_size;
-
-                rc = read_content_size( self, local_size, &content_size );
-                /* create bitmap buffer */
-                if ( rc == 0 )
-                {
-                    uint64_t block_count;
-                    /* size_t */ uint64_t bitmap_bytes;
-                    rc = verify_file_structure( local_size, block_size, content_size, &block_count, &bitmap_bytes );
-                    if ( rc == 0 )
-                    {
-#if USE_32BIT_BITMAP_WORDS
-                        atomic32_t * bitmap = NULL;
-#else
-                        uint8_t volatile * bitmap = NULL;
-#endif
-                        rc = create_bitmap_buffer( &bitmap, bitmap_bytes );
-                        if ( rc == 0 )
-                        {
-                            size_t num_read;
-                            /* read the bitmap into the memory ... */
-                            rc = KFileReadAll ( self, content_size, ( void * ) bitmap, bitmap_bytes, &num_read );
-                            if ( rc != 0 )
-                            {
-                                LOGERR( klogErr, rc, "cannot read bitmap from local file" );
-                            }
-                            else if ( num_read != bitmap_bytes )
-                            {
-                                rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcInvalid );
-                                PLOGERR( klogErr, ( klogErr, rc, "cannot read $(ls) bitmap-bytes from local file, read $(rs) instead", 
-                                                    "ls=%lu,rs=%lu", bitmap_bytes, num_read ));
-                            }
-                        }
-                        if ( rc == 0 )
-                            *is_complete = is_bitmap_full( bitmap, bitmap_bytes, block_count );
-
-                        if ( bitmap != NULL )
-                            free( ( void * ) bitmap );
-                    }
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC TruncateCacheFile( struct KFile * self )
-{
-    rc_t rc;
-    if ( self == NULL )
-        rc = RC( rcFS, rcFile, rcResizing, rcSelf, rcNull );
-    else
-    {
-        uint64_t local_size;
-        rc = KFileSize( self, &local_size );
-        if ( rc != 0 )
-        {
-            LOGERR( klogErr, rc, "cannot detect filesize when truncating cached file" );
-        }
-        else
-        {
-            uint32_t block_size;
-            rc = read_block_size( self, local_size, &block_size );
-            if ( rc == 0 )
-            {
-                uint64_t content_size;
-                rc = read_content_size( self, local_size, &content_size );
-                if ( rc == 0 )
-                {
-                    uint64_t block_count, bitmap_bytes;
-                    rc = verify_file_structure( local_size, block_size, content_size, &block_count, &bitmap_bytes );
-
-                    /* truncate the file by setting the new (shorter) filesize */
-                    if ( rc == 0 )
-                        rc = KFileSetSize( self, content_size );
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-
-static bool file_exist( KDirectory * dir, const char * filename )
-{
-    uint32_t pt = KDirectoryPathType ( dir, "%s", filename );
-    return ( ( pt & ~kptAlias ) == kptFile );
-}
-
-
-static rc_t promote_cache( KCacheTeeFile * self )
-{
-    char cache_file_name [ 4096 ];
-    char temp_file_name [ 4096 ];
-    size_t num_writ;
-    rc_t rc = string_printf ( cache_file_name, sizeof cache_file_name, &num_writ, "%s.cache", self -> local_path );
-    if ( rc == 0 )
-        rc = string_printf ( temp_file_name, sizeof temp_file_name, &num_writ, "%s.cache.temp", self -> local_path );
-
-    /* (1) releaes open cache file ( windows cannot rename open files ) */
-    if ( rc == 0 )
-        rc = KFileRelease( self -> local );
-
-    /* (2) rename to temporary name */
-    if ( rc == 0 )
-    {
-        self -> local = NULL;
-        rc = KDirectoryRename ( self -> dir, true, cache_file_name, temp_file_name );
-    }
-
-    /* (3) open from temporary name */
-    if ( rc == 0 )
-        rc = KDirectoryOpenFileWrite( self -> dir, &self -> local, true, "%s", temp_file_name );
-
-    /* (4) perform truncation */
-    if ( rc == 0 )
-        rc = TruncateCacheFile( self -> local );
-    
-    /* (5) releaes open temp. cache file ( windows cannot rename open files ) */
-    if ( rc == 0 )
-        rc = KFileRelease( self -> local );
-
-    /* (6) rename to final filename ( windows cannot rename open files ) */
-    if ( rc == 0 )
-    {
-        self -> local = NULL;
-        rc = KDirectoryRename ( self -> dir, true, temp_file_name, self -> local_path );
-    }
-
-    /* (6) open from final filename */
-    if ( rc == 0 )
-        rc = KDirectoryOpenFileWrite( self -> dir, &self -> local, true, "%s", self -> local_path );
-
-    return rc;
-}
-
-
-/* Destroy
- */
-static rc_t CC KCacheTeeFileDestroy( KCacheTeeFile * self )
-{
-#if USE_BUFFER_POOL
-    rc_t rc;
-    void * pool_page;
-#endif
-    bool already_promoted_by_other_instance = file_exist( self -> dir, self -> local_path );
-    
-#if( CACHE_STAT > 0 )
-    report_cache_stat( & self -> stat );
-#endif
-    
-    if ( !self -> local_read_only && !already_promoted_by_other_instance )
-    {
-        bool fully_in_cache;
-        rc_t rc = IsCacheFileComplete ( self -> local, &fully_in_cache );
-        if ( rc == 0 && fully_in_cache )
-        {
-            promote_cache( self );
-        }
-    }
-
-    if ( self->bitmap != NULL )
-        free( ( void * ) self->bitmap );
-#if ! NO_SCRATCH_BUFFER
-    if ( self->scratch_buffer != NULL )
-        free( self->scratch_buffer );
-#endif
-
-#if USE_BUFFER_POOL
-    while ( (rc = KQueuePop( self -> buffer_pool, &pool_page, NULL )) == 0 )
-    {
-        free( pool_page );
-    }
-    KQueueRelease( self -> buffer_pool );
-#endif
-
-    KFileRelease ( self -> remote );
-    KFileRelease ( self -> local );
-
-    if ( already_promoted_by_other_instance )
-        KDirectoryRemove ( self -> dir, true, "%s.cache", self -> local_path );
-        
-    KDirectoryRelease ( self -> dir );
-    
-    free ( self );
-    return 0;
-}
-
-
-static void set_bitmap( const KCacheTeeFile *cself, uint64_t start_block, uint64_t block_count )
-{
-#if USE_32BIT_BITMAP_WORDS
-    uint32_t old, bits;
-    const uint32_t block_bit = BitNr2Mask [ start_block & 31 ];
-
-    /* we should get rid of block count */
-    assert ( block_count == 1 );
-
-    old = atomic32_read ( & cself -> bitmap [ start_block >> 5 ] );
-    do
-    {
-        bits = old;
-        old = atomic32_test_and_set ( & cself -> bitmap [ start_block >> 5 ], ( int ) ( bits | block_bit ), ( int ) bits );
-    }
-    while ( old != bits );
-
-#else
-    uint64_t block_idx, block_nr;
-    for ( block_idx = 0, block_nr = start_block; 
-          block_idx < block_count; 
-          ++block_idx, ++block_nr )
-    {
-        cself->bitmap[ block_nr >> 3 ] |= BitNr2Mask[ block_nr & 0x07 ];
-    }
-#endif
-}
-
-
-static rc_t write_bitmap( const KCacheTeeFile *cself, uint64_t block )
-{
-    rc_t rc;
-    size_t written;
-    uint64_t pos;
-    size_t to_write;
-#if USE_32BIT_BITMAP_WORDS
-    uint32_t block_word = ( uint32_t ) ( block >> 5 );
-    uint64_t bitmap_pos = ( block_word << 2 );
-    pos = cself->remote_size + bitmap_pos;
-    to_write = 4;
-
-    // last word may go outside bitmap ranges in the file, since bitmap has 1-byte alignment in the file, but 4-byte alignment in memory
-    if (bitmap_pos + to_write > cself->bitmap_bytes)
-        to_write = cself->bitmap_bytes - bitmap_pos;
-
-    rc = KFileWriteAll( cself->local, pos, ( const void * ) &cself->bitmap[ block_word ], to_write, &written );
-#else
-    uint32_t block_byte = ( uint32_t ) ( block >> 3 );
-    pos = cself->remote_size + block_byte;
-    to_write = 1;
-    rc = KFileWriteAll( cself->local, pos, ( const void * ) &cself->bitmap[ block_byte ], to_write, &written );
-#endif
-    if ( rc != 0 )
-    {
-        PLOGERR( klogErr, ( klogErr, rc, "cannot write local-file-bitmap block $(block) at $(pos) $(to_write) bytes",
-                           "block=%lu,pos=%lu,to_write=%zu", block, pos, to_write ) );
-    }
-    return rc;
-}
-
-
-#if ! NO_SCRATCH_BUFFER
-static rc_t resize_scratch_buffer( const KCacheTeeFile *cself, uint64_t new_size )
-{
-    rc_t rc = 0;
-    KCacheTeeFile *self = ( KCacheTeeFile * )cself;
-
-    /* create scratch-buffer or resize it if needed */
-    if ( self->scratch_size == 0 )
-    {
-        self->scratch_buffer = malloc( new_size );
-        if ( self->scratch_buffer == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-        else
-            self->scratch_size = new_size;
-    }
-    else if ( self->scratch_size < new_size )
-    {
-        uint8_t * tmp = realloc( self->scratch_buffer, new_size );
-        if ( tmp == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            self->scratch_buffer = tmp;
-            self->scratch_size = new_size;
-        }
-    }
-    return rc;
-}
-#endif
-
-
-size_t check_rd_len( const KCacheTeeFile *cself, uint64_t pos, size_t bsize )
-{
-    size_t res = bsize;
-    uint64_t last_pos = pos;
-    last_pos += bsize;
-    if ( last_pos >= cself->remote_size )
-    {
-        if ( pos >= cself->remote_size )
-            res = 0;
-        else
-            res = ( cself->remote_size - pos );
-    }
-    return res;
-}
-
-static rc_t rd_remote_wr_local( const KCacheTeeFile *cself, uint64_t pos,
-                                void *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc = 0;
-    if ( bsize > 0 )
-    {
-        size_t bytes_read;
-        *num_read = 0;
-        rc = KFileReadAll( cself->remote, pos, buffer, bsize, &bytes_read );
-        if ( rc != 0 || bytes_read == 0) /** try again **/
-        {
-            rc = KFileReadAll( cself->remote, pos, buffer, bsize, &bytes_read );
-            if ( rc == 0 && bytes_read == 0 )
-            { /*old behavior */
-                rc = RC ( rcFS, rcFile, rcReading, rcBuffer, rcEmpty );
-            }
-        }
-        if ( rc == 0 )
-        {
-            if ( cself->local_read_only )
-                *num_read = bytes_read;
-            else
-                rc = KFileWriteAll( cself->local, pos, buffer, bytes_read, num_read );
-        }
-    }
-    return rc;
-}
-
-
-static rc_t KCacheTeeFileRead_simple2( const KCacheTeeFile *cself, uint64_t pos,
-                                       void *buffer, size_t bsize, size_t *num_read )
-{
-    uint64_t block = pos / cself->block_size;
-    size_t   offset = pos % cself->block_size;
-    size_t   to_read_total = bsize;
-    int64_t salvage_block = -1;
-
-#if NO_SCRATCH_BUFFER
-    rc_t rc = 0;
-    uint64_t first_block_in_scratch = -1;
-    uint64_t valid_scratch_bytes = 0;
-    uint8_t * scratch_buffer;
-#if USE_BUFFER_POOL
-    if ( KQueuePop( cself -> buffer_pool, (void **)&scratch_buffer, NULL ) != 0 )
-        scratch_buffer = malloc ( cself -> block_size );
-#else
-    scratch_buffer = malloc ( cself -> block_size );
-#endif
-    if ( scratch_buffer == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcMemory, rcExhausted );
-#else
-    uint64_t first_block_in_scratch = cself -> first_block_in_scratch;
-    uint64_t valid_scratch_bytes = cself -> valid_scratch_bytes;
-    rc_t rc = resize_scratch_buffer( cself, cself->block_size );
-    uint8_t * scratch_buffer = cself -> scratch_buffer;
-#endif
-        
-    *num_read = 0;
-
-    while ( rc == 0 && to_read_total > 0 )
-    {
-        size_t to_read = cself->block_size - offset;
-        
-        if ( to_read > to_read_total )
-            to_read = to_read_total;
-
-        if ( first_block_in_scratch == block )
-        {
-            if ( valid_scratch_bytes <= offset )
-            { /** EOF in remote file and nothing to read **/
-                to_read_total = to_read = 0; 
-            }
-            else
-            { 
-                if ( to_read > valid_scratch_bytes - offset )
-                { /** EOF in remote file something left**/
-                   to_read_total = to_read = valid_scratch_bytes - offset;
-                }
-                memcpy( buffer, scratch_buffer + offset, to_read );
-            }
-
-            /*** move source counters **/
-            offset += to_read;
-            block  += offset / cself->block_size;
-            offset %= cself->block_size;
-
-            /*** move output counters **/       
-            to_read_total -= to_read;
-            *num_read += to_read;
-            buffer = ((char*)buffer) + to_read;
-        }
-        else if ( IS_CACHE_BIT( cself, block ) )
-        {
-            uint64_t fpos = block * cself->block_size;
-            int64_t fbsize = cself -> remote_size - fpos;
-            size_t nread = 0;
-
-            if( fbsize > cself->block_size )
-                fbsize = cself -> block_size;
-
-            rc = KFileReadAll( cself->local, fpos, scratch_buffer, fbsize, &nread );
-            if ( rc == 0 )
-            {
-                int i;
-                uint64_t *b = ( uint64_t* )scratch_buffer;
-                first_block_in_scratch = block;
-                valid_scratch_bytes = nread;
-                
-                if ( block != salvage_block )
-                { /** check for fully space page, but don't do it in infinite loop **/
-                    for ( i = 0; i < ( nread/ sizeof( *b ) ) && b [ i]==0; i++ ) { } 
-                    if ( i == ( nread / sizeof( *b ) ) )
-                    {
-                        rc = rd_remote_wr_local( cself, block*cself->block_size, scratch_buffer, fbsize, &nread );
-                        if ( rc == 0 )
-                            salvage_block = block;
-                    }
-                    else
-                    {
-                        salvage_block = -1;
-                    }
-                }
-            }
-        }
-        else
-        {
-            uint64_t fpos = block * cself->block_size;
-            int64_t  fbsize = cself->remote_size - fpos;
-            size_t   nread = 0;
-
-            if ( fbsize > cself->block_size )
-                fbsize = cself->block_size;
-            rc = rd_remote_wr_local( cself, fpos, scratch_buffer, fbsize, &nread );
-            if ( rc == 0 )
-            {
-                first_block_in_scratch = block;
-                valid_scratch_bytes = nread;
-                if ( !cself->local_read_only )
-                {
-                    set_bitmap( cself, block, 1 );
-                    rc = write_bitmap( cself, block );
-                }
-            }
-        }
-
-    }
-
-#if NO_SCRATCH_BUFFER
-#if USE_BUFFER_POOL
-    if ( KQueuePush( cself -> buffer_pool, scratch_buffer, NULL ) != 0 )
-        free ( scratch_buffer );
-#else
-    free ( scratch_buffer );
-#endif
-#else
-    ( ( KCacheTeeFile * )cself ) -> first_block_in_scratch = first_block_in_scratch;
-    ( ( KCacheTeeFile * )cself ) -> valid_scratch_bytes = valid_scratch_bytes;
-#endif
-
-    return rc;
-}
-
-#if 0
-/**********************************************************************************************
-    try #3
-**********************************************************************************************/
-static rc_t KCacheTeeFileRead_3( const KCacheTeeFile *cself, uint64_t pos,
-                                 void * buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc = 0;
-    uint64_t i_pos = pos;
-    uint8_t * i_buffer = buffer;
-    size_t still_to_read = bsize;
-    size_t total_read = 0;
-    size_t bytes_read;
-
-    /* we have to exclude that we are requesting beyond EOF, we can do that because we know the size
-       of the file, the 'constructor' of the KCacheTeeFile has requested it and rejects construction
-       if it cannot get this size */
-    if ( ( i_pos + still_to_read ) > cself -> remote_size )
-    {
-        still_to_read = ( cself -> remote_size - i_pos );
-    }
-    
-    while ( rc == 0 && still_to_read > 0 )
-    {
-        uint64_t block = ( i_pos / cself->block_size );
-        if ( IS_CACHE_BIT( cself, block ) )
-        {
-            /* i_pos is in a cached block... */
-            size_t to_read = ( ( ( block + 1 ) * cself->block_size ) - i_pos );
-            if ( to_read > still_to_read ) to_read = still_to_read;
-            rc = KFileReadAll( cself->local, i_pos, i_buffer, to_read, &bytes_read );
-            if ( rc == 0 )
-            {
-                /* check what we read from the local file is completely empty */
-                size_t i = 0;
-                while ( i_buffer[ i ] == 0 && i < bytes_read ) { i++; }
-                if ( i == ( bytes_read + 1 ) )
-                {
-                    /* we have to read from remote because this segment is zero!
-                       this is a fix for broken cache-files */
-                    cself->bitmap[ block >> 3 ] &= ~( BitNr2Mask[ block & 0x07 ] );
-                    rc = write_bitmap( cself, block );
-                    /* do not advance the buffer, because in the loop this will be read remotely now */
-                }
-                else
-                {
-                    i_buffer += bytes_read;
-                    total_read += bytes_read;
-                    i_pos += bytes_read;
-                    still_to_read -= bytes_read;
-                }
-            }
-        }
-        else
-        {
-            /* i_pos is not in a cached block... */
-            uint64_t block_pos = ( block * cself->block_size );
-            uint64_t ofs = ( i_pos - block_pos );
-            if ( ofs == 0 && still_to_read >= cself->block_size )
-            {
-                /* read the whole block remotely, this can return less than requested if last block...
-                   and it can return 0 bytes if the http-connection times out... */
-                rc = KFileReadAll( cself->remote, i_pos, i_buffer, cself->block_size, &bytes_read );
-                if ( rc == 0 )
-                {
-                    if ( bytes_read == 0 )
-                    {
-                        still_to_read = 0;    /* terminate the loop, return as much as read so far, return rc ==0 */
-                    }
-                    else
-                    {
-                        /* write it to the local file */
-                        size_t bytes_written;
-                        rc = KFileWriteAll( cself->local, i_pos, i_buffer, bytes_read, &bytes_written );
-                        if ( rc == 0 )
-                        {
-                            if ( bytes_written != bytes_read )
-                            {
-                                rc = RC ( rcFS, rcFile, rcWriting, rcTransfer, rcTooShort );
-                            }
-                            else
-                            {
-                                /* write the bitmap */
-                                set_bitmap( cself, block, 1 );
-                                rc = write_bitmap( cself, block );
-                                if ( rc == 0 )
-                                {
-                                    i_buffer += bytes_read;
-                                    total_read += bytes_read;
-                                    i_pos += bytes_read;
-                                    still_to_read -= bytes_read;
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-            else
-            {
-                /* use the scratch-buffer to read the whole block, copy the smaller part that was requested */
-                if ( cself->scratch_size < cself->block_size )
-                {
-                    rc = resize_scratch_buffer( cself, cself->block_size );
-                }
-                if ( rc == 0 )
-                {
-                    /* read the whole block remotely, this can return less than requested if last block...
-                       and it can return 0 bytes if the http-connection times out... */
-                    rc = KFileReadAll( cself->remote, block_pos, cself->scratch_buffer, cself->block_size, &bytes_read );
-                    if ( rc == 0 )
-                    {
-                        if ( bytes_read == 0 )
-                        {
-                            still_to_read = 0;    /* terminate the loop, return as much as read so far, return rc ==0 */
-                        }
-                        else
-                        {
-                            /* write it to the local file */
-                            size_t bytes_written;
-                            rc = KFileWriteAll( cself->local, block_pos, cself -> scratch_buffer, bytes_read, &bytes_written );
-                            if ( rc == 0 )
-                            {
-                                if ( bytes_written != bytes_read )
-                                {
-                                    rc = RC ( rcFS, rcFile, rcWriting, rcTransfer, rcTooShort );
-                                }
-                                else
-                                {
-                                    /* write the bitmap */
-                                    set_bitmap( cself, block, 1 );
-                                    rc = write_bitmap( cself, block );
-                                    if ( rc == 0 )
-                                    {
-                                        /* here comes the difference: copy the bytes from the offset */
-                                        size_t to_copy = ( cself->block_size - ofs );
-                                        if ( to_copy > still_to_read ) to_copy = still_to_read;
-                                        memmove ( i_buffer, &( cself->scratch_buffer[ ofs ] ), to_copy );
-                                        
-                                        i_buffer += to_copy;
-                                        total_read += to_copy;
-                                        i_pos += to_copy;
-                                        still_to_read -= to_copy;
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    if ( rc == 0 )
-        *num_read = total_read;
-
-    return rc;
-}
-#endif
-
-/**********************************************************************************************
-    START vt-functions
-**********************************************************************************************/
-
-static struct KSysFile* KCacheTeeFileGetSysFile( const KCacheTeeFile *self, uint64_t *offset )
-{
-    * offset = 0;
-    return NULL;
-}
-
-
-static rc_t KCacheTeeFileRandomAccess( const KCacheTeeFile *self )
-{
-    return 0;
-}
-
-
-static rc_t KCacheTeeFileSize( const KCacheTeeFile *self, uint64_t *size )
-{
-    *size = self->remote_size;
-    return 0;
-}
-
-
-static rc_t KCacheTeeFileSetSize( KCacheTeeFile *self, uint64_t size )
-{
-    return RC ( rcFS, rcFile, rcUpdating, rcFile, rcReadonly );
-}
-
-static rc_t KCacheTeeFileRead( const KCacheTeeFile *cself, uint64_t pos,
-                               void *buffer, size_t bsize, size_t *num_read )
-{
-
-    /* rc_t rc = KCacheTeeFileRead_3( cself, pos, buffer, bsize, num_read ); */
-    rc_t rc = KCacheTeeFileRead_simple2( cself, pos, buffer, bsize, num_read );
-
-#if( CACHE_STAT > 0 )
-    write_cache_stat( & ( ( ( KCacheTeeFile * )cself ) -> stat ), pos, bsize, *num_read );
-#endif
-    
-    return rc;
-}
-
-
-static rc_t KCacheTeeFileWrite( KCacheTeeFile *self, uint64_t pos,
-                                const void *buffer, size_t size, size_t *num_writ )
-{
-    return RC ( rcFS, rcFile, rcUpdating, rcInterface, rcUnsupported );
-}
-
-/**********************************************************************************************
-    END vt-functions
-**********************************************************************************************/
-
-
-static KFile_vt_v1 vtKCacheTeeFile =
-{
-    /* version 1.0 */
-    1, 0,
-
-    /* start minor version 0 methods */
-    KCacheTeeFileDestroy,
-    KCacheTeeFileGetSysFile,
-    KCacheTeeFileRandomAccess,
-    KCacheTeeFileSize,
-    KCacheTeeFileSetSize,
-    KCacheTeeFileRead,
-    KCacheTeeFileWrite
-    /* end minor version 0 methods */
-};
-
-
-static rc_t make_cache_tee( struct KDirectory *self, struct KFile const **tee,
-    struct KFile const *remote, struct KFile *local, uint32_t blocksize, bool read_only, const char *path )
-{
-    rc_t rc;
-    size_t path_size = string_size ( path );
-    KCacheTeeFile * cf = malloc ( sizeof * cf + path_size + 1 );
-    if ( cf == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        cf -> dir = self;
-        string_copy( cf -> local_path, path_size + 1, path, path_size );
-        cf -> remote = remote;     /* store the file-objects but no AddRef()'s yet! */
-        cf -> local  = local;
-        cf -> block_size = ( blocksize > 0 ) ? blocksize : CACHE_TEE_DEFAULT_BLOCKSIZE;
-        cf -> bitmap = NULL;
-#if ! NO_SCRATCH_BUFFER
-        cf -> scratch_buffer = NULL;
-        cf -> scratch_size = 0;
-        cf -> first_block_in_scratch = -1;
-        cf -> valid_scratch_bytes = 0;
-#endif
-        cf -> local_read_only = read_only;
-
-#if( CACHE_STAT > 0 )
-        init_cache_stat( & cf -> stat );
-#endif
-        
-        rc = KFileSize( local, &cf -> local_size );
-        if ( rc != 0 )
-        {
-            LOGERR( klogErr, rc, "cannot detect size of local file" );
-        }
-        else
-        {
-            bool fully_in_cache = false;
-            
-            rc = KFileSize( cf -> remote, &cf -> remote_size );
-            if ( rc != 0 )
-            {
-                LOGERR( klogErr, rc, "cannot detect size of remote file" );
-            }
-            else
-            {
-                if ( cf -> local_size == 0 && ! cf -> local_read_only )
-                {
-                    /* the local file was just created... */
-                    if ( cf -> remote_size == 0 )
-                    {
-                        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcInvalid );
-                        LOGERR( klogErr, rc, "size of remote file is zero" );
-                    }
-                    else
-                    {
-                        rc = calculate_local_size_from_remote_size( cf );
-                        if ( rc == 0 )
-                        {
-                            rc = KFileSetSize ( cf -> local, cf -> local_size );
-                            if ( rc == 0 )
-                            {
-                                rc = init_new_local_file( cf );
-                            }
-                            else
-                            {
-                                PLOGERR( klogInt, ( klogInt, rc, "cannot size local file to $(l) bytes", "l=%lu", cf->local_size ) );
-                            }
-                        }
-                    }
-                }
-                else
-                    rc = verify_existing_local_file( cf, &fully_in_cache );
-            }
-
-            if ( rc == 0 && fully_in_cache && ! cf -> local_read_only )
-            {
-                /* here is the up-front-test: the cache is complete and we have write access! */
-                rc = promote_cache( cf );
-                if ( rc == 0 )
-                {
-                    *tee = cf -> local;
-                    free ( cf );
-                    return rc;  /* here we return the truncated, promoted cache as tee-file ! */
-                }
-            }
-
-            if ( rc == 0 )
-            {
-                if ( cf -> remote_size == 0 )
-                {
-                    cf -> remote_size = cf -> local_size;
-                }
-                
-                /* now we have to AddRef() everything we hang on until the final release! */
-                rc = KDirectoryAddRef ( cf -> dir );
-                if ( rc == 0 )
-                {
-                    rc = KFileAddRef( cf -> remote );
-                    if ( rc == 0 )
-                    {
-#if USE_BUFFER_POOL
-                        rc = KQueueMake( &cf -> buffer_pool, 32 );
-#endif
-                        if ( rc == 0 )
-                        {
-                            rc = KFileInit( &cf -> dad, (const union KFile_vt *)&vtKCacheTeeFile, "KCacheTeeFile", path, true, false );
-                            if ( rc == 0 )
-                            {
-                                /* the wrapper is ready to use now! */
-                                *tee = ( const KFile * ) &cf -> dad;
-                                return 0;
-                            }
-                            else
-                            {
-                                LOGERR( klogErr, rc, "cannot initialize KFile-structure" );
-#if USE_BUFFER_POOL
-                                KQueueRelease( cf -> buffer_pool );
-#endif
-                                /* TODO: check if we actually need to release cf->local here, since we never attached to it */
-                                KFileRelease( cf -> local );
-                                KFileRelease( cf -> remote );
-                                KDirectoryRelease ( cf -> dir );
-                            }
-                        }
-                        else
-                        {
-                            KFileRelease( cf -> remote );
-                            KDirectoryRelease ( cf -> dir );
-                        }
-                    }
-                    else
-                        KDirectoryRelease ( cf -> dir );
-                }
-            }
-        }
-        free ( cf );
-    }
-    return rc;
-}
-
-
-static rc_t make_read_only_cache_tee( struct KDirectory *self,
-    struct KFile const **tee, struct KFile const *remote, uint32_t blocksize, const char *path )
-{
-    const struct KFile * local;
-    rc_t rc = KDirectoryOpenFileRead( self, &local, "%s.cache", path );
-    if ( rc == 0 )
-        rc = make_cache_tee( self, tee, remote, ( struct KFile * )local, blocksize, true, path );
-    else
-    {
-        /* we cannot even open the local cache in read-only mode,
-           we give up - and return a reference to the remote file... */
-        rc = KFileAddRef( remote );
-        if ( rc == 0 )
-            *tee = remote;
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryVMakeCacheTee ( struct KDirectory *self,
-    struct KFile const **tee, struct KFile const *remote,
-    uint32_t blocksize, const char *path, va_list args )
-{
-    rc_t rc;
-    if ( tee == NULL || remote == NULL )
-        rc = RC ( rcFS, rcFile, rcAllocating, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcFile, rcAllocating, rcSelf, rcNull );
-        else if ( path == NULL )
-            rc = RC ( rcFS, rcFile, rcAllocating, rcPath, rcNull );
-        else if ( path [ 0 ] == 0 )
-            rc = RC ( rcFS, rcFile, rcAllocating, rcPath, rcEmpty );
-        else
-        {
-            char full [ 4096 ];
-
-            rc = KDirectoryVResolvePath ( self, false, full, sizeof full, path, args );
-            if ( rc != 0 )
-            {
-                PLOGERR( klogErr, ( klogErr, rc, "cannot resolve path of cache file '$(path)'", 
-                        "path=%s", full ) );
-            }
-            else
-            {
-                if ( rc == 0 )
-                {
-                    /* it was possible to aquire the lock on the cache-file */
-                    struct KFile * local;
-                    rc = KDirectoryOpenFileWrite( self, &local, true, "%s.cache", full );
-                    if ( rc == 0 )
-                    {
-                        /* we have the exclusive rd/wr access to the cache file !*/
-                        rc = make_cache_tee( self, tee, remote, local, blocksize, false, full );
-                    }
-                    else if ( GetRCState( rc ) == rcNotFound )
-                    {
-                        rc = KDirectoryCreateFile( self, &local, true,
-                            0664, kcmOpen | kcmParents, "%s.cache", full );
-                        if ( rc == 0 )
-                        {
-                            /* we have the exclusive rd/wr access to the cache file !*/
-                            rc = make_cache_tee( self, tee, remote, local, blocksize, false, full );
-                        }
-                    }
-                    else
-                    {
-                        /* we do not have the exclusive rd/wr access to the cache file !*/
-                        rc = make_read_only_cache_tee( self, tee, remote, blocksize, full );
-                    }
-                }
-                else if ( GetRCState ( rc ) == rcBusy )
-                {
-                    /* it was NOT possible to aquire the lock on the cache-file */
-                    rc = make_read_only_cache_tee( self, tee, remote, blocksize, full );
-                }
-                else
-                {
-                    PLOGERR( klogErr, ( klogErr, rc, "cannot create lock-file '$(path).cache.lock'", 
-                            "path=%s", full ) );
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryMakeCacheTee ( struct KDirectory *self,
-    struct KFile const **tee, struct KFile const *remote,
-    uint32_t blocksize, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-    va_start ( args, path );
-
-    rc = KDirectoryVMakeCacheTee ( self, tee, remote, blocksize, path, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-
-#if USE_32BIT_BITMAP_WORDS
-static uint64_t count_bits_in_bitmap( const uint64_t block_count, const uint64_t bitmap_bytes, const atomic32_t * bitmap )
-{
-    uint64_t res = 0;
-    uint64_t idx;
-    for ( idx = 0; idx < block_count; ++idx )
-    {
-        if ( IS_BITMAP_BIT( bitmap, idx ) )
-            res++;
-    }
-    return res;
-}
-#else
-static uint64_t count_bits_in_bitmap( const uint64_t block_count, const uint64_t bitmap_bytes, const uint8_t volatile * bitmap )
-{
-    uint64_t res = 0;
-    uint64_t idx;
-    for ( idx = 0; idx < block_count; ++idx )
-    {
-        if ( IS_BITMAP_BIT( bitmap, idx ) )
-            res++;
-    }
-    return res;
-}
-#endif
-
-LIB_EXPORT rc_t CC GetCacheCompleteness( const struct KFile * self, float * percent, uint64_t * bytes_in_cache )
-{
-    rc_t rc;
-    if ( self == NULL )
-        rc = RC( rcFS, rcFile, rcValidating, rcSelf, rcNull );
-    else
-    {
-        uint64_t local_size;
-        if ( percent != NULL ) *percent = 0;
-        if ( bytes_in_cache != NULL ) *bytes_in_cache = 0;
-        rc = KFileSize( self, &local_size );
-        if ( rc != 0 )
-        {
-            LOGERR( klogErr, rc, "cannot detect filesize when checking if cached file is complete" );
-        }
-        else
-        {
-            uint32_t block_size;
-            rc = read_block_size( self, local_size, &block_size );
-            if ( rc == 0 )
-            {
-                uint64_t content_size;
-                rc = read_content_size( self, local_size, &content_size );
-                /* create bitmap buffer */
-                if ( rc == 0 )
-                {
-                    uint64_t block_count;
-                    uint64_t bitmap_bytes;
-                    rc = verify_file_structure( local_size, block_size, content_size, &block_count, &bitmap_bytes );
-                    if ( rc == 0 )
-                    {
-#if USE_32BIT_BITMAP_WORDS
-                        atomic32_t * bitmap = NULL;
-#else
-                        uint8_t volatile * bitmap = NULL;
-#endif
-                        rc = create_bitmap_buffer( &bitmap, bitmap_bytes );
-                        if ( rc == 0 )
-                        {
-                            size_t num_read;
-                            /* read the bitmap into the memory ... */
-                            rc = KFileReadAll ( self, content_size, ( void * ) bitmap, bitmap_bytes, &num_read );
-                            if ( rc != 0 )
-                            {
-                                LOGERR( klogErr, rc, "cannot read bitmap from local file" );
-                            }
-                            else if ( num_read != bitmap_bytes )
-                            {
-                                rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcInvalid );
-                                PLOGERR( klogErr, ( klogErr, rc, "cannot read $(ls) bitmap-bytes from local file, read $(rs) instead", 
-                                               "ls=%lu,rs=%lu", bitmap_bytes, num_read ));
-                            }
-                        }
-                        if ( rc == 0 )
-                        {
-                            uint64_t in_cache = count_bits_in_bitmap( block_count, bitmap_bytes, bitmap );
-                            if ( in_cache > 0 && block_count > 0 )
-                            {
-                                float res = ( float ) in_cache;
-                                res *= 100;
-                                res /= block_count;
-                                if ( percent != NULL ) ( *percent ) = res;
-                                if ( bytes_in_cache != NULL ) ( *bytes_in_cache ) = ( in_cache * block_size );
-                            }
-                        }
-                        if ( bitmap != NULL )
-                            free( ( void * ) bitmap );
-                    }
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-
-/* -----
- * examens the file, and reports the size of the original file ( without the cachefile-footer )
- *
- */
-LIB_EXPORT rc_t CC GetCacheTruncatedSize( const struct KFile * self, uint64_t * truncated_size )
-{
-    rc_t rc;
-    if ( self == NULL )
-        rc = RC( rcFS, rcFile, rcValidating, rcSelf, rcNull );
-    else if ( truncated_size == NULL )
-        rc = RC( rcFS, rcFile, rcValidating, rcParam, rcNull );
-    else
-    {
-        uint64_t local_size;
-        *truncated_size = 0;
-        rc = KFileSize( self, &local_size );
-        if ( rc != 0 )
-        {
-            LOGERR( klogErr, rc, "cannot detect filesize when checking if cached file is complete" );
-        }
-        /* TODO: need to do a better constant tha a magic number */
-        else if (local_size < 13)
-        {
-            rc = RC ( rcFS, rcFile, rcValidating, rcSize, rcInsufficient );
-            LOGERR( klogErr, rc, "cannot use filesize of zero when checking if cached file is complete" );
-        }
-        else
-        {
-            uint32_t block_size;
-            rc = read_block_size( self, local_size, &block_size );
-            if ( rc == 0 )
-            {
-                uint64_t content_size;
-                rc = read_content_size( self, local_size, &content_size );
-                if ( rc == 0 )
-                {
-                    uint64_t block_count, bitmap_bytes;
-                    rc = verify_file_structure( local_size, block_size, content_size, &block_count, &bitmap_bytes );
-                    if ( rc == 0 )
-                    {
-                        *truncated_size = content_size;
-                    }
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC Has_Cache_Zero_Blocks( const struct KFile * self, uint64_t * checked_blocks, uint64_t * empty_blocks )
-{
-    rc_t rc;
-    if ( self == NULL )
-        rc = RC( rcFS, rcFile, rcValidating, rcSelf, rcNull );
-    else if ( checked_blocks == NULL || empty_blocks == NULL )
-        rc = RC( rcFS, rcFile, rcValidating, rcParam, rcNull );
-    else
-    {
-        uint64_t local_size;
-        *checked_blocks = 0;
-        *empty_blocks = 0;
-        rc = KFileSize( self, &local_size );
-        if ( rc != 0 )
-        {
-            LOGERR( klogErr, rc, "cannot detect filesize when checking if cached file is complete" );
-        }
-        else
-        {
-            uint32_t block_size;
-            rc = read_block_size( self, local_size, &block_size );
-            if ( rc == 0 )
-            {
-                uint64_t content_size;
-                rc = read_content_size( self, local_size, &content_size );
-                /* create bitmap buffer */
-                if ( rc == 0 )
-                {
-                    uint64_t block_count;
-                    uint64_t bitmap_bytes;
-                    rc = verify_file_structure( local_size, block_size, content_size, &block_count, &bitmap_bytes );
-                    if ( rc == 0 )
-                    {
-#if USE_32BIT_BITMAP_WORDS
-                        atomic32_t * bitmap = NULL;
-#else
-                        uint8_t volatile * bitmap = NULL;
-#endif
-                        rc = create_bitmap_buffer( &bitmap, bitmap_bytes );
-                        if ( rc == 0 )
-                        {
-                            size_t num_read;
-                            /* read the bitmap into the memory ... */
-                            rc = KFileReadAll ( self, content_size, ( void * ) bitmap, bitmap_bytes, &num_read );
-                            if ( rc != 0 )
-                            {
-                                LOGERR( klogErr, rc, "cannot read bitmap from local file" );
-                            }
-                            else if ( num_read != bitmap_bytes )
-                            {
-                                rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcInvalid );
-                                PLOGERR( klogErr, ( klogErr, rc, "cannot read $(ls) bitmap-bytes from local file, read $(rs) instead", 
-                                               "ls=%lu,rs=%lu", bitmap_bytes, num_read ));
-                            }
-                        }
-                        if ( rc == 0 )
-                        {
-                            /* loop through the bitmap for each bit set verify that the corresponding block is not zero */
-                            uint8_t * buffer = malloc( block_size );
-                            if ( buffer != NULL )
-                            {
-                                uint64_t idx;
-                                for ( idx = 0; idx < block_count && rc == 0; ++idx )
-                                {
-                                    if ( IS_BITMAP_BIT( bitmap, idx ) )
-                                    {
-                                        size_t num_read;
-                                        rc = KFileReadAll ( self, idx * block_size, buffer, block_size, &num_read );
-                                        if ( rc == 0 )
-                                        {
-                                            ( *checked_blocks )++;
-                                            if ( num_read > 0 )
-                                            {
-                                                size_t i, n;
-                                                for ( i = 0, n = 0; i < num_read; ++i )
-                                                    if ( buffer[ i ] != 0 ) n++;
-                                                if ( n == num_read ) ( * empty_blocks )++;
-                                            }
-                                        }
-                                    }
-                                }
-                                free( buffer );
-                            }
-                        }
-                        if ( bitmap != NULL )
-                            free( ( void * ) bitmap );
-                    }
-                }
-            }
-        }
-    
-    }
-    return rc;
-}
-
-
-/* -----
- * reports in the boolean if the file is a cachetoofile and it is complete...
- *
- * KFile is the struct returned by KDirectoryMakeCacheTee()..
- */
-LIB_EXPORT rc_t CC IsCacheTeeComplete( const struct KFile * self, bool * complete )
-{
-    rc_t rc = 0;
-    if ( self == NULL || complete == NULL )
-        rc = RC ( rcFS, rcFile, rcValidating, rcParam, rcNull );
-    else
-    {
-        if ( &self->vt->v1 != &vtKCacheTeeFile )
-            rc = RC ( rcFS, rcFile, rcValidating, rcParam, rcInvalid );
-        else
-        {
-            struct KCacheTeeFile * ctf = ( struct KCacheTeeFile * )self;
-            *complete = is_bitmap_full( ctf->bitmap, ctf->bitmap_bytes, ctf->block_count );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT bool CC KFileIsKCacheTeeFile( const struct KFile * self )
-{
-    return self != NULL && &self->vt->v1 == &vtKCacheTeeFile;
-}
diff --git a/libs/kfs/countfile.c b/libs/kfs/countfile.c
deleted file mode 100644
index d34c5e9..0000000
--- a/libs/kfs/countfile.c
+++ /dev/null
@@ -1,652 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <kfs/extern.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <kfs/file.h>
-#include <kfs/countfile.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdlib.h>
-
-/* ======================================================================
- * KCounterFile
- */
-
-/* -----
- * define the specific types to be used in the templatish/inheritancish
- * definition of vtables and their elements
- */
-#define KFILE_IMPL struct KCounterFile
-#include <kfs/impl.h>
-
-/* clear out possible macro definitions of FS and GS,
- * which show up on Solaris/x86 when building with GCC (per sys/ucontext.h)
- */
-#ifdef FS
-#  undef FS
-#endif
-#ifdef GS
-#  undef GS
-#endif
-
-static rc_t CC KCounterFileDestroy (KCounterFile *self);
-static struct KSysFile *CC KCounterFileGetSysFile (const KCounterFile *self,
-					    uint64_t *offset);
-static rc_t CC KCounterFileRandomAccess (const KCounterFile *self);
-static uint32_t CC KCounterFileType (const KCounterFile *self);
-static rc_t CC KCounterFileSize (const KCounterFile *self, uint64_t *size);
-static rc_t CC KCounterFileSetSize (KCounterFile *self, uint64_t size);
-static rc_t CC KCounterFileRead (const KCounterFile *self, uint64_t pos,
-                                 void *buffer, size_t bsize, size_t *num_read);
-static rc_t CC KCounterFileWrite (KCounterFile *self, uint64_t pos, const void *buffer,
-			       size_t size, size_t *num_writ);
-
-
-static const KFile_vt_v1 vtKCounterFile =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KCounterFileDestroy,
-    KCounterFileGetSysFile,
-    KCounterFileRandomAccess,
-    KCounterFileSize,
-    KCounterFileSetSize,
-    KCounterFileRead,
-    KCounterFileWrite,
-
-    /* 1.1 */
-    KCounterFileType
-};
-
-/*-----------------------------------------------------------------------
- * KCounterFile
- */
-typedef uint8_t lstate;
-enum elstate
-{
-    ENOTHING,
-    EASCII,
-    ECR,
-    ELF,
-    ECRLF,
-    ELFCR,
-    EBINARY
-};
-struct KCounterFile
-{
-    KFile	dad;
-    uint64_t	max_position;
-    KFile *	original;
-    uint64_t *	bytecounter; /* we do not trust reads from bytecounter */
-    uint64_t *	linecounter; /* we do not trust reads from linecounter */
-    lstate      line_state;
-    bool	size_allowed;
-    bool	force;
-};
-
-/* ----------------------------------------------------------------------
- * KCounterFileMake
- *  create a new file object
- */
-
-static
-rc_t KCounterFileMake (KCounterFile ** pself,
-		       KFile * original,
-		       uint64_t * bytecounter,
-		       uint64_t * linecounter,
-                       bool force)
-{
-    uint64_t		fsize;
-    rc_t		rc;
-    KCounterFile *	self;
-
-    /* -----
-     * we can not accept any of the three pointer parameters as NULL
-     */
-    assert (pself != NULL);
-    assert (original != NULL);
-    assert (bytecounter != NULL);
-
-    /* -----
-     * get space for the object
-     */
-    self = malloc (sizeof (KCounterFile));
-    if (self == NULL)	/* allocation failed */
-    {
-	/* fail */
-	rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-    }
-    else
-    {
-	rc = KFileInit (&self->dad,			/* initialize base class */
-			(const KFile_vt*)&vtKCounterFile,/* VTable for KCounterFile */
-            "KCounterFile", "no-name",
-			original->read_enabled,
-			original->write_enabled);
-	if (rc == 0)
-	{
-            for (;;)
-            {
-                if (force) /* all sizes come from actual reads */
-                {
-                    fsize = 0;
-                    self->force = true;
-                    self->size_allowed = false;
-                }
-                else
-                {
-                    rc = KFileSize(original,&fsize);
-                    if (GetRCState(rc) == rcUnsupported)
-                    {
-                        force = true;
-                        continue;
-                    }
-                    else if (rc)
-                        break;
-                    self->force = false;
-                    self->size_allowed = true;
-                }
-                self->max_position = fsize;
-                self->original = original;
-                self->bytecounter = bytecounter;
-                self->linecounter = linecounter;
-                if (linecounter)
-                {
-                    self->line_state = ENOTHING;
-                    *linecounter = 0;
-                }
-                else
-                {
-                    self->line_state = EBINARY;
-                }
-                *bytecounter = fsize;
-                *pself = self;
-                return 0;
-            }
-	}
-	/* fail */
-	free (self);
-    }
-    *pself = NULL;
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KFileMakeCounterRead (const KFile ** self, const KFile * original,
-                                         uint64_t * bytecounter, uint64_t * linecounter,
-                                         bool force_reads)
-{
-    return KCounterFileMake ((KCounterFile **)self, (KFile*)original, bytecounter, linecounter, force_reads);
-}
-LIB_EXPORT rc_t CC KFileMakeCounterUpdate (KFile ** self, KFile * original,
-                                           uint64_t * bytecounter, uint64_t * linecounter,
-                                           bool force_reads)
-{
-    return KCounterFileMake ((KCounterFile **)self, original, bytecounter, linecounter, force_reads);
-}
-LIB_EXPORT rc_t CC KFileMakeCounterWrite (KFile ** self, KFile * original,
-                                          uint64_t * bytecounter, uint64_t * linecounter,
-                                          bool force_reads)
-{
-    return KCounterFileMake ((KCounterFile **)self, original, bytecounter, linecounter, force_reads);
-}
-
-enum ecc
-{
-    NUL,
-    SOH,
-    STX,
-    ETX,
-    EOT,
-    ENQ,
-    ACK,
-    BEL,
-    BS,
-    TAB,
-    LF,
-    VT,
-    FF,
-    CR,
-    SO,
-    SI,
-    DLE,
-    DC1,
-    DC2,
-    DC3,
-    DC4,
-    NAK,
-    SYN,
-    ETB,
-    CAN,
-    EM,
-    SUB,
-    ESC,
-    FS,
-    GS,
-    RS,
-    US,
-    DEL = 127
-};
-
-static
-void check_state (KCounterFile * self, void * _buffer, size_t size)
-{
-    uint8_t * buffer = _buffer;
-    size_t idx;
-
-    if (self->linecounter == NULL)
-        return;
-
-    if (self->line_state == EBINARY)
-        return;
-
-    for (idx = 0; idx < size; ++idx)
-    {
-        if (buffer[idx] >= DEL)
-        {
-            self->line_state = EBINARY;
-        }
-        else
-        {
-            switch (buffer[idx])
-            {
-            case NUL:
-            case SOH:
-            case STX:
-            case ETX:
-            case EOT:
-            case ENQ:
-            case ACK:
-            case BEL:
-            case BS:
-            case SO:
-            case SI:
-            case DLE:
-            case DC1:
-            case DC2:
-            case DC3:
-            case DC4:
-            case NAK:
-            case SYN:
-            case ETB:
-            case CAN:
-            case EM:
-            case SUB:
-            case ESC:
-            case FS:
-            case GS:
-            case RS:
-            case US:
-            case DEL:
-                /* leave line count mode */
-                self->line_state = EBINARY;
-                *self->linecounter = 0;
-                return;
-
-            case 128: /* not in use yet - a pseudo-EOL */
-                /* FF might go here? */
-                ++*self->linecounter;
-                self->line_state = EASCII;
-                break;
-                
-
-            case LF:
-                switch (self->line_state)
-                {
-                case ENOTHING:
-                case ELF:
-                case ECRLF:
-                case ELFCR:
-                    ++*self->linecounter;
-                case EASCII:
-                    self->line_state = ELF;
-                    break;
-                case ECR:
-                    self->line_state = ECRLF;
-                    break;
-                }
-                break;
-            case CR:
-                switch (self->line_state)
-                {
-                case ENOTHING:
-                case ECR:
-                case ECRLF:
-                case ELFCR:
-                    ++*self->linecounter;
-                case EASCII:
-                    self->line_state = ECR;
-                    break;
-                case ELF:
-                    self->line_state = ELFCR;
-                    break;
-                }
-                break;
-
-            case TAB:
-            case VT:
-            case FF:
-            default:
-                if (self->line_state != EASCII)
-                {
-                    ++*self->linecounter;
-                }
-                self->line_state = EASCII;
-                break;
-            }
-        }       
-    }
-}
-
-static
-rc_t KCounterFileSeek (KCounterFile * self, uint64_t pos)
-{
-    uint64_t	max_position;
-    rc_t	rc = 0;
-    size_t	num_read = 0;
-    size_t	to_read;
-    uint8_t	ignored[64*1024];
-
-    assert (self->max_position < pos);
-    for (max_position = self->max_position; max_position < pos; max_position += num_read)
-    {
-            to_read = (size_t)( pos - max_position );
-            if (to_read > sizeof ignored)
-                to_read = sizeof ignored;
-            rc = KFileRead (self->original, max_position, ignored, to_read, &num_read);
-            if (rc || (num_read == 0))
-                break;
-            check_state (self, ignored, num_read);
-    }
-    self->max_position = max_position;
-    *self->bytecounter = max_position;
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * Destroy
- *
- */
-static
-rc_t CC KCounterFileDestroy (KCounterFile *self)
-{
-    rc_t rc = 0;
-    uint64_t size;
-
-    assert (self != NULL);
-    assert (self->bytecounter != NULL);
-
-    if (self->force || ! self->size_allowed)
-    {
-        size_t	num_read = 0;
-        uint8_t	ignored[64*1024];
-        
-        size = self->max_position;
-        if (self->dad.read_enabled)
-            do
-            {
-                rc = KFileRead (self->original, size,
-                                ignored, sizeof ignored, &num_read);
-                size += num_read;
-                DBGMSG(DBG_KFS,DBG_FLAG(DBG_KFS_COUNTER),
-                       ("%s: size '%lu' num_read '%lu'\n", __func__, size, num_read));
-                if (rc != 0)
-                    break;
-                check_state (self, ignored, num_read);
-            } while (num_read != 0);
-    }
-    else
-    {
-        rc = KFileSize (self->original, &size);
-        DBGMSG(DBG_KFS,DBG_FLAG(DBG_KFS_COUNTER),
-               ("%s: lazy way size '%lu'\n", __func__, size));
-    }
-    *self->bytecounter = size;
-    if (rc == 0)
-    {
-        rc = KFileRelease (self->original);
-        free (self);
-    }
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- *
- * bytes could not be counted if memory mapped so this is disallowed
- */
-
-static
-struct KSysFile *CC KCounterFileGetSysFile (const KCounterFile *self, uint64_t *offset)
-{
-    /* parameters must be non-NULL */
-    assert (self != NULL);
-    assert (offset != NULL);
-
-    return NULL;
-}
-
-/* ----------------------------------------------------------------------
- * RandomAccess
- *
- *  returns 0 if random access, error code otherwise
- */
-static
-rc_t CC KCounterFileRandomAccess (const KCounterFile *self)
-{
-    assert (self != NULL);
-    assert (self->original != NULL);
-    return KFileRandomAccess (self->original);
-}
-
-/* ----------------------------------------------------------------------
- * Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KCounterFileType (const KCounterFile *self)
-{
-    assert (self != NULL);
-    assert (self->original != NULL);
-
-    return KFileType (self->original);
-}
-
-/* ----------------------------------------------------------------------
- * Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KCounterFileSize (const KCounterFile *self, uint64_t *size)
-{
-    rc_t	rc;
-    uint64_t	fsize;
-
-    assert (self != NULL);
-    assert (self->original != NULL);
-    assert (size != NULL);
-
-    rc = KFileSize (self->original, &fsize);
-
-    if (rc == 0)
-    {
-	/* success: refreshing the value */
-	*size = ((KCounterFile *)self)->max_position = fsize;
-    }
-    /* pass along RC value */
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KCounterFileSetSize (KCounterFile *self, uint64_t size)
-{
-    rc_t rc;
-
-    rc = KFileSetSize (self->original, size);
-    if (rc == 0)
-	self->max_position = size;
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-rc_t CC KCounterFileRead	(const KCounterFile *cself,
-				 uint64_t pos,
-				 void *buffer,
-				 size_t bsize,
-				 size_t *num_read)
-{
-    KCounterFile * 	self;
-    uint64_t	max_position;
-    uint64_t	temp_max_position;
-    rc_t	rc;
-
-
-    /* -----
-     * self and buffer were validated as not NULL before calling here
-     *
-     * So get the KTTOCNode type: chunked files and contiguous files 
-     * are read differently.
-     */
-    assert (cself != NULL);
-    assert (cself->original != NULL);
-    assert (buffer != NULL);
-    assert (num_read != NULL);
-    assert (bsize != 0);
-
-    self = (KCounterFile*)cself;
-    max_position = cself->max_position;
-
-    if ((pos > max_position) && (! self->size_allowed))
-    {
-	rc = KCounterFileSeek (self, pos);
-	if (rc != 0)
-	    return rc;
-        /* if seek failed */
-        if (pos > self->max_position)
-        {
-            *num_read = 0;
-            return 0;
-        }
-    }
-    rc = KFileRead (self->original, pos, buffer, bsize, num_read);
-    temp_max_position = pos + *num_read;
-    if (temp_max_position > max_position)
-    {
-        uint32_t new_bytes = (uint32_t)(temp_max_position - max_position);
-
-        check_state (self, ((char *)buffer) + (*num_read) - new_bytes, new_bytes);
-
-	*self->bytecounter = self->max_position = temp_max_position;
-    }
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- * Unsupported as we now treat archives as READ ONLY
- */
-static
-rc_t CC KCounterFileWrite (KCounterFile *self, uint64_t pos,
-			   const void *buffer, size_t bsize,
-			   size_t *num_writ)
-{
-    uint64_t	max_position;
-    uint64_t	temp_max_position;
-    rc_t	rc;
-
-
-    /* -----
-     * self and buffer were validated as not NULL before calling here
-     *
-     * So get the KTTOCNode type: chunked files and contiguous files 
-     * are read differently.
-     */
-    assert (self != NULL);
-    assert (self->original != NULL);
-    assert (buffer != NULL);
-    assert (num_writ != NULL);
-    assert (bsize != 0);
-
-    max_position = self->max_position;
-
-    if ((self->dad.read_enabled) && (pos > max_position) && (! self->size_allowed))
-    {
-	rc = KCounterFileSeek (self, pos);
-	if (rc != 0)
-	    return rc;
-    }
-
-    rc = KFileWrite (self->original, pos, buffer, bsize, num_writ);
-    temp_max_position = pos + *num_writ;
-
-    if (temp_max_position > max_position)
-    {
-	*self->bytecounter = self->max_position = temp_max_position;
-    }
-    return rc;
-}
-
-
-/* end of file countfile.c */
-
diff --git a/libs/kfs/crc32.c b/libs/kfs/crc32.c
deleted file mode 100644
index a2a38a0..0000000
--- a/libs/kfs/crc32.c
+++ /dev/null
@@ -1,1771 +0,0 @@
-/*=======================================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-
-#define CRC_DBG_REF(msg) DBGMSG(DBG_LEGREF,DBG_FLAG(DBG_LEGREF_CRC), msg)
-
-struct KCRC32File;
-#define KFILE_IMPL struct KCRC32File
-
-#include <kfs/crc.h>
-#include <kfs/impl.h>
-#include <klib/checksum.h>
-#include <klib/container.h>
-#include <klib/text.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <endian.h>
-#include <byteswap.h>
-
-
-/*--------------------------------------------------------------------------
- * KCRC32SumEntry
- *  describes an entry into a CRC32 checksum file
- */
-typedef struct KCRC32SumEntry KCRC32SumEntry;
-struct KCRC32SumEntry
-{
-    SLNode n;
-    uint32_t crc32;
-    bool bin;
-    char path [ 1 ];
-};
-
-static
-void CC KCRC32SumEntryWhack ( SLNode *n, void *ignore )
-{
-    free ( n );
-}
-
-typedef struct KCRC32SumEntryFlushData KCRC32SumEntryFlushData;
-struct KCRC32SumEntryFlushData
-{
-    uint64_t pos;
-    KFile *f;
-    rc_t rc;
-};
-
-static
-bool CC KCRC32SumEntryFlush ( SLNode *n, void *data )
-{
-    KCRC32SumEntryFlushData *pb = data;
-    const KCRC32SumEntry *self = ( const KCRC32SumEntry* ) n;
-
-    int len;
-    size_t num_writ;
-    char line [ 4096 + 16 ];
-
-    len = snprintf ( line, sizeof line, "%08x %c%s\n",
-        self -> crc32, self -> bin ? '*' : ' ', self -> path );
-    if ( len < 0 || len >= sizeof line )
-    {
-        pb -> rc = RC ( rcFS, rcFile, rcFormatting, rcString, rcExcessive );
-        return true;
-    }
-
-    pb -> rc = KFileWrite ( pb -> f, pb -> pos, line, len, & num_writ );
-    if ( pb -> rc != 0 )
-        return true;
-
-    pb -> pos += num_writ;
-
-    if ( num_writ == ( size_t ) len )
-        return false;
-
-    pb -> rc = RC ( rcFS, rcFile, rcFormatting, rcTransfer, rcIncomplete );
-    return true;
-}
-
-static
-rc_t KCRC32SumEntryMake ( KCRC32SumEntry **ep,
-    const char *path, uint32_t crc32, bool bin )
-{
-    KCRC32SumEntry *entry = malloc ( sizeof * entry + strlen ( path ) );
-    if ( entry == NULL )
-        return RC ( rcFS, rcFile, rcUpdating, rcMemory, rcExhausted );
-
-    entry -> crc32 = crc32;
-    entry -> bin = bin;
-    strcpy ( entry -> path, path );
-
-    * ep = entry;
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * KCRC32SumFmt
- *  a formatter for reading or writing an crc32sum-style checksum file
- */
-struct KCRC32SumFmt
-{
-    SLList entries;
-    KFile *f;
-    atomic32_t refcount;
-    uint32_t count;
-    bool read_only;
-    bool dirty;
-};
-
-/* Flush
- */
-LIB_EXPORT rc_t CC KCRC32SumFmtFlush ( KCRC32SumFmt *self )
-{
-    if ( self != NULL && self -> dirty )
-    {
-        KCRC32SumEntryFlushData pb;
-        pb . pos = 0;
-        pb . f = self -> f;
-        pb . rc = 0;
-
-        SLListDoUntil ( & self -> entries, KCRC32SumEntryFlush, & pb );
-
-        if ( pb . rc != 0 )
-            return pb . rc;
-
-        self -> dirty = false;
-    }
-    return 0;
-}
-
-
-/* Whack
- */
-static
-rc_t KCRC32SumFmtWhack ( KCRC32SumFmt *self )
-{
-    rc_t rc;
-
-    atomic32_set ( & self -> refcount, 1 );
-
-    rc = KCRC32SumFmtFlush ( self );
-    if ( rc == 0 )
-        rc = KFileRelease ( self -> f );
-    if ( rc != 0 )
-        return rc;
-
-    SLListWhack ( & self -> entries, KCRC32SumEntryWhack, NULL );
-    free ( self );
-    return 0;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KCRC32SumFmtAddRef ( const KCRC32SumFmt *cself )
-{
-    if ( cself != NULL )
-    {
-        CRC_DBG_REF (("%s self %p prior count %u\n", __func__, cself, atomic32_read ( & cself -> refcount ) ));
-        atomic32_inc ( & ( ( KCRC32SumFmt* ) cself ) -> refcount );
-    }
-    else
-    {
-        CRC_DBG_REF(("%s self %p\n", __func__, cself));
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KCRC32SumFmtRelease ( const KCRC32SumFmt *cself )
-{
-    KCRC32SumFmt *self = ( KCRC32SumFmt* ) cself;
-    if ( cself != NULL )
-    {
-        CRC_DBG_REF (("%s self %p prior count %u\n", __func__, cself, atomic32_read ( & cself -> refcount ) ));
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-            return KCRC32SumFmtWhack ( self );
-    }
-    else
-    {
-        CRC_DBG_REF(("%s self %p\n", __func__, cself));
-    }
-    return 0;
-}
-
-
-/* Extract
- *  extract a single line
- */
-static
-rc_t KCRC32SumFmtExtract ( KCRC32SumFmt *self, const char *line, size_t size )
-{
-    rc_t rc = 0;
-    KCRC32SumEntry *entry;
-
-    /* check for a DOS condition not caught by parse */
-    if ( line [ size - 1 ] == '\r' )
-    {
-        /* drop CR from line */
-        size -= 1;
-    }
-
-    /* quick validity check */
-    if ( size < 11 || line [ 8 ] != ' ' )
-        return RC ( rcFS, rcFile, rcConverting, rcFormat, rcInvalid );
-
-    /* create entry */
-    entry = malloc ( sizeof * entry + size - ( 8 /* cs */ + 2 /* sp + mode */ ) );
-    if ( entry == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        /* read checksum */
-        char *p;
-        entry -> crc32 = strtoul ( line, & p, 16 );
-        if ( ( ( const char* ) p - line ) != 8 )
-            rc = RC ( rcFS, rcFile, rcConverting, rcFormat, rcInvalid );
-
-        /* parse mode */
-        else if ( line [ 9 ] == ' ' )
-            entry -> bin = false;
-        else if ( line [ 9 ] == '*' )
-            entry -> bin = true;
-        else
-            rc = RC ( rcFS, rcFile, rcConverting, rcFormat, rcInvalid );
-
-        /* the rest is path */
-        if ( rc == 0 )
-        {
-            string_copy ( entry -> path, size, & line [ 10 ], size - 10 );
-            SLListPushTail ( & self -> entries, & entry -> n );
-            ++ self -> count;
-            return 0;
-        }
-
-        free ( entry );
-    }
-
-    return rc;
-}
-
-
-/* Parse
- *  parse *.crc32 file
- */
-static
-rc_t KCRC32SumFmtParse ( KCRC32SumFmt *self, const char *start, const char *stop )
-{
-    rc_t rc;
-    const char *end;
-
-    for ( rc = 0; start < stop; start = end + 1 )
-    {
-        end = string_chr ( start, stop - start, '\n' );
-        if ( end == NULL )
-            end = stop;
-
-        /* allow '#' comments and blank lines */
-        if ( ( end - start ) == 0 )
-            continue;
-        if ( start [ 0 ] == '#' )
-            continue;
-
-        /* line must have minimum length */
-        if ( ( end - start ) < ( 8 /* cs */ + 2 /* sp + mode */ + 1 /* path */ ) )
-        {
-            /* check for empty line ending in CR-LF */
-            if ( end [ -1 ] == '\r' && ( end - start ) == 1 )
-                continue;
-
-            /* other stuff is garbage */
-            rc = RC ( rcFS, rcFile, rcParsing, rcData, rcInsufficient );
-            break;
-        }
-
-        /* extract entry */
-        rc = KCRC32SumFmtExtract ( self, start, end - start );
-        if ( rc != 0 )
-            break;
-    }
-
-    return rc;
-}
-
-
-/* Populate
- *  reads all lines of input from *.crc32 file
- */
-static
-rc_t KCRC32SumFmtPopulate ( KCRC32SumFmt *self, const KFile *in )
-{
-    uint64_t eof;
-    rc_t rc = KFileSize ( in, & eof );
-    if ( rc == 0 )
-    {
-        char *buff = malloc ( ( size_t ) eof );
-        if ( buff == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            size_t num_read, total;
-            for ( total = 0; total < ( size_t ) eof; total += num_read )
-            {
-                rc = KFileRead ( in, total,
-                    & buff [ total ], ( size_t ) eof - total, & num_read );
-                if ( rc != 0 )
-                    break;
-                if ( num_read == 0 )
-                {
-                    rc = RC ( rcFS, rcFile, rcReading, rcTransfer, rcIncomplete );
-                    break;
-                }
-            }
-
-            if ( rc == 0 )
-                rc = KCRC32SumFmtParse ( self, buff, buff + total );
-
-            free ( buff );
-        }
-    }
-
-    return rc;
-}
-
-
-/* Make
- *  creates a formatted accessor to textual checksum file
- */
-LIB_EXPORT rc_t CC KCRC32SumFmtMakeRead ( const KCRC32SumFmt **fp, const KFile *in )
-{
-    rc_t rc;
-    if ( fp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( in == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! in -> read_enabled )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        else
-        {
-            KCRC32SumFmt *f = malloc ( sizeof * f );
-            if ( f == NULL )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                SLListInit ( & f -> entries );
-                atomic32_set ( & f -> refcount, 1 );
-                f -> f = NULL;
-                f -> count = 0;
-                f -> read_only = true;
-                f -> dirty = false;
-
-                rc = KCRC32SumFmtPopulate ( f, in );
-                if ( rc == 0 )
-                {
-                    f -> f = ( KFile* ) in;
-                    * fp = f;
-                    return 0;
-                }
-                
-                KCRC32SumFmtWhack ( f );
-            }
-        }
-
-        * fp = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KCRC32SumFmtMakeUpdate ( KCRC32SumFmt **fp, KFile *out )
-{
-    rc_t rc;
-    if ( fp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( out == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! out -> write_enabled )
-        {
-            if ( out -> read_enabled )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcReadonly );
-            else
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        }
-        else
-        {
-            KCRC32SumFmt *f = malloc ( sizeof * f );
-            if ( f == NULL )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                SLListInit ( & f -> entries );
-                atomic32_set ( & f -> refcount, 1 );
-                f -> f = NULL;
-                f -> count = 0;
-                f -> read_only = false;
-                f -> dirty = false;
-
-                rc = 0;
-                if ( out -> read_enabled )
-                    rc = KCRC32SumFmtPopulate ( f, out );
-                if ( rc == 0 )
-                {
-                    f -> f = out;
-                    * fp = f;
-                    return 0;
-                }
-                
-                KCRC32SumFmtWhack ( f );
-            }
-        }
-
-        * fp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* Count
- *  return the number of checksums in file
- */
-LIB_EXPORT rc_t CC KCRC32SumFmtCount ( const KCRC32SumFmt *self, uint32_t *count )
-{
-    rc_t rc;
-    if ( count == NULL )
-        rc = RC ( rcFS, rcFile, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcFile, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * count = self -> count;
-            return 0;
-        }
-
-        * count = 0;
-    }
-    return rc;
-}
-
-
-/* Get
- *  retrieve an indexed checksum line
- *
- *  "idx" [ IN ] - zero-based index of checksum to access
- *
- *  "path" [ OUT ] and "size" [ IN ] - return buffer for file path
- *
- *  "crc32" [ OUT ] - return parameter for the checksum
- *
- *  "bin" [ OUT, NULL OKAY ] - true if fopen mode used to
- *  calculate "digest" was binary, false if text. pertinent if
- *  digest was calculated using DOS text mode.
- */
-LIB_EXPORT rc_t CC KCRC32SumFmtGet ( const KCRC32SumFmt *self, uint32_t idx,
-    char *path, size_t size, uint32_t *crc32, bool *bin )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcFS, rcFile, rcAccessing, rcSelf, rcNull );
-    else if ( idx >= self -> count )
-        rc = RC ( rcFS, rcFile, rcAccessing, rcId, rcNotFound );
-    else
-    {
-        uint32_t i;
-        const KCRC32SumEntry *entry = ( const KCRC32SumEntry* )
-            SLListHead ( & self -> entries );
-        for ( i = 0; entry != NULL && i < idx; ++ i )
-        {
-            entry = ( const KCRC32SumEntry* )
-                SLNodeNext ( & entry -> n );
-        }
-
-        if ( entry == NULL )
-            rc = RC ( rcFS, rcFile, rcAccessing, rcId, rcNotFound );
-        else if ( path == NULL )
-            rc = RC ( rcFS, rcFile, rcAccessing, rcBuffer, rcNull );
-        else if ( crc32 == NULL )
-            rc = RC ( rcFS, rcFile, rcAccessing, rcParam, rcNull );
-        else
-        {
-            /* copy everything out */
-            * crc32 = entry -> crc32;
-            if ( bin != NULL )
-                * bin = entry -> bin;
-
-            /* return success if buffer large enough */
-            if ( string_copy_measure ( path, size, entry -> path ) < size )
-                return 0;
-
-            rc = RC ( rcFS, rcFile, rcAccessing, rcBuffer, rcInsufficient );
-        }
-    }
-
-    if ( path != NULL && size != 0 )
-        path [ 0 ] = 0;
-
-    if ( crc32 != NULL )
-        * crc32 = 0;
-
-    if ( bin != NULL )
-        * bin = false;
-
-    return rc;
-}
-
-
-/* Find
- *  retrieve checksum line by path
- *
- *  "path" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file
- *
- *  "crc32" [ OUT ] - return parameter for the checksum
- *
- *  "bin" [ OUT, NULL OKAY ] - true if fopen mode used to
- *  calculate "digest" was binary, false if text. pertinent if
- *  digest was calculated using DOS text mode.
- */
-LIB_EXPORT rc_t CC KCRC32SumFmtFind ( const KCRC32SumFmt *self,
-    const char *path, uint32_t *crc32, bool *bin )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcFS, rcFile, rcAccessing, rcSelf, rcNull );
-    else if ( path == NULL )
-        rc = RC ( rcFS, rcFile, rcAccessing, rcPath, rcNull );
-    else if ( path [ 0 ] == 0 )
-        rc = RC ( rcFS, rcFile, rcAccessing, rcPath, rcEmpty );
-    else
-    {
-        const KCRC32SumEntry *entry = ( const KCRC32SumEntry* )
-            SLListHead ( & self -> entries );
-        while ( entry != NULL )
-        {
-            if ( strcmp ( path, entry -> path ) == 0 )
-                break;
-
-            entry = ( const KCRC32SumEntry* )
-                SLNodeNext ( & entry -> n );
-        }
-
-        if ( entry == NULL )
-            rc = RC ( rcFS, rcFile, rcAccessing, rcPath, rcNotFound );
-        else if ( crc32 == NULL )
-            rc = RC ( rcFS, rcFile, rcAccessing, rcParam, rcNull );
-        else
-        {
-            /* copy everything out */
-            *crc32 = entry -> crc32;
-            if ( bin != NULL )
-                * bin = entry -> bin;
-
-            return 0;
-        }
-    }
-
-    if ( crc32 != NULL )
-        * crc32 = 0;
-
-    if ( bin != NULL )
-        * bin = false;
-
-    return rc;
-}
-
-
-/* Delete
- *  remove an existing line
- *
- *  "path" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file
- *
- *  returns rcNotFound if not present
- */
-LIB_EXPORT rc_t CC KCRC32SumFmtDelete ( KCRC32SumFmt *self, const char *path )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcFS, rcFile, rcRemoving, rcSelf, rcNull );
-    else if ( path == NULL )
-        rc = RC ( rcFS, rcFile, rcRemoving, rcPath, rcNull );
-    else if ( path [ 0 ] == 0 )
-        rc = RC ( rcFS, rcFile, rcRemoving, rcPath, rcEmpty );
-    else
-    {
-        KCRC32SumEntry *entry = ( KCRC32SumEntry* )
-            SLListHead ( & self -> entries );
-        while ( entry != NULL )
-        {
-            if ( strcmp ( path, entry -> path ) == 0 )
-                break;
-
-            entry = ( KCRC32SumEntry* )
-                SLNodeNext ( & entry -> n );
-        }
-
-        if ( entry == NULL )
-            rc = RC ( rcFS, rcFile, rcRemoving, rcPath, rcNotFound );
-        else
-        {
-            /* pop entry from list */
-            SLListUnlink ( & self -> entries, & entry -> n );
-
-            /* delete entry */
-            KCRC32SumEntryWhack ( & entry -> n, NULL );
-
-            /* mark the modification */
-            self -> dirty = true;
-            assert ( self -> count > 0 );
-            -- self -> count;
-
-            return 0;
-        }
-    }
-
-    return rc;
-}
-
-
-/* Update
- *  add a checksum line to file or update an existing line
- *
- *  "path" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file
- *
- *  "crc32" [ IN ] - calculated checksum
- *
- *  "bin" [ IN ] - true if checksum was calculated on all bytes
- *  in file, false if fopen mode used to read file was text.
- */
-LIB_EXPORT rc_t CC KCRC32SumFmtUpdate ( KCRC32SumFmt *self, const char *path, uint32_t crc32, bool bin )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcSelf, rcNull );
-    else if ( path == NULL )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcString, rcNull );
-    else if ( path [ 0 ] == 0 )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcString, rcEmpty );
-    else
-    {
-        /* create an entry */
-        KCRC32SumEntry *entry;
-        rc = KCRC32SumEntryMake ( & entry, path, crc32, bin );
-        if ( rc == 0 )
-        {
-            /* scan for existing entry */
-            KCRC32SumEntry *exist = ( KCRC32SumEntry* )
-                SLListHead ( & self -> entries );
-            while ( exist != NULL )
-            {
-                if ( strcmp ( exist -> path, entry -> path ) == 0 )
-                    break;
-                exist = ( KCRC32SumEntry* )
-                    SLNodeNext ( & exist -> n );
-            }
-
-            /* if new entry, insert */
-            if ( exist == NULL )
-            {
-                SLListPushTail ( & self -> entries, & entry -> n );
-                self -> dirty = true;
-                ++ self -> count;
-            }
-
-            /* if existing, perform update */
-            else
-            {
-                if ( exist -> crc32 != entry -> crc32 || exist -> bin != entry -> bin )
-                {
-                    exist -> crc32 = entry -> crc32;
-                    exist -> bin = entry -> bin;
-                    self -> dirty = true;
-                }
-                KCRC32SumEntryWhack ( & entry -> n, NULL );
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* Rename
- * Rename the checksum line to reflect a file name change but no content change.
- *
- *  "newpath" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file's new name
- *
- *  "oldpath" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file's old name
- *
- */
-LIB_EXPORT rc_t CC KCRC32SumFmtRename ( KCRC32SumFmt *self, const char *oldpath, const char *newpath )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcSelf, rcNull );
-    else if ( newpath == NULL )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcString, rcNull );
-    else if ( newpath [ 0 ] == 0 )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcString, rcEmpty );
-    else if ( oldpath == NULL )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcString, rcNull );
-    else if ( oldpath [ 0 ] == 0 )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcString, rcEmpty );
-    else
-    {
-        bool bin;
-        uint32_t crc32;
-
-        rc = KCRC32SumFmtFind ( self, oldpath, & crc32, & bin );
-        if ( rc == 0 )
-            rc = KCRC32SumFmtUpdate ( self, newpath, crc32, bin );
-        if ( rc == 0 )
-            rc = KCRC32SumFmtDelete ( self, oldpath );
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * CRC32 KFile extensions
- */
-typedef enum KCRC32FileUnionType
-{
-    KCRC32FileTypeRead,
-    KCRC32FileTypeWrite
-} KCRC32FileUnionType;
-
-struct KCRC32File
-{
-    KFile dad;
-
-    /* this is position of next byte to read or write
-       relative to the CRC not actual read/write */
-    uint64_t position;
-    KFile *file;
-    KCRC32SumFmt *fmt;
-    uint32_t crc32;
-    KCRC32FileUnionType type;
-    union
-    {
-        struct
-        {
-            rc_t rc;
-            uint32_t crc32;
-            bool eof;
-        } rd;
-
-        struct
-        {
-            /* maximum position written to "file" */
-            uint64_t max_position;
-
-            /* saved information for a transaction */
-            uint64_t tposition;
-            uint32_t crc32;
-
-            /* is transaction open */
-            bool topen;
-
-            /* path to file for crc32 fmt */
-            char path [ 1 ];
-        } wr;
-
-    } u;
-};
-
-/* Whack
- */
-static
-rc_t CC KCRC32FileWhackRead ( KCRC32File *self )
-{
-    rc_t rc;
-
-    atomic32_set ( & self -> dad . refcount, 1 );
-
-    rc = KFileRelease ( self -> file );
-    if ( rc == 0 )
-        free ( self );
-
-    return rc;
-}
-
-static
-rc_t CC KCRC32FileWhackWrite ( KCRC32File *self )
-{
-    rc_t rc;
-
-    atomic32_set ( & self -> dad . refcount, 1 );
-
-    /* if destination file has been written farther
-       than our concept of eof, truncate */
-    if ( self -> u . wr . max_position > self -> position )
-    {
-        rc = KFileSetSize ( self -> file, self -> position );
-        if ( rc != 0 )
-            return rc;
-        self -> u . wr . max_position = self -> position;
-    }
-
-    rc = KFileRelease ( self -> file );
-    if ( rc == 0 )
-    {
-        KCRC32SumFmtUpdate ( self -> fmt, self -> u . wr . path, self -> crc32, true );
-        KCRC32SumFmtRelease ( self -> fmt );
-        free ( self );
-    }
-
-    return rc;
-}
-
-static const char CRCTAG [8] = "CRC32CTX";
-static const char ENDIANTAG [4] =
-{ 
-    '0' + (char)((__BYTE_ORDER/1000)%10),
-    '0' + (char)((__BYTE_ORDER/100)%10),
-    '0' + (char)((__BYTE_ORDER/10)%10),
-    '0' + (char)((__BYTE_ORDER/1)%10)
-};
-static const char ENDIANSWAPTAG [4] =
-{ 
-    '0' + (char)((__BYTE_ORDER/1)%10),
-    '0' + (char)((__BYTE_ORDER/10)%10),
-    '0' + (char)((__BYTE_ORDER/100)%10),
-    '0' + (char)((__BYTE_ORDER/1000)%10)
-};
-
-static
-rc_t CC KCRC32FileWrite ( KCRC32File *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ );
-
-static
-rc_t CC KCRC32FileWhackAppend ( KCRC32File *self )
-{
-    rc_t rc;
-
-    /* if the file is empty, just whack it */
-    if ( self -> position == 0 )
-        return KCRC32FileWhackWrite ( self );
-
-    /* begin transaction will save current state */
-    rc = KCRC32FileBeginTransaction ( self );
-    if ( rc == 0 )
-    {
-        size_t num_writ;
-
-        /* create a closing tag with current checksum */
-        uint8_t closer [ sizeof CRCTAG + sizeof ENDIANTAG + sizeof self -> crc32 ];
-        memcpy ( closer, CRCTAG, sizeof CRCTAG );
-        memcpy ( & closer [ sizeof CRCTAG ], ENDIANTAG, sizeof ENDIANTAG );
-        memcpy ( & closer [ sizeof CRCTAG + sizeof ENDIANTAG ], & self -> crc32, sizeof self -> crc32 );
-            
-        /* append this to the file */
-        rc = KCRC32FileWrite ( self, self -> position, closer, sizeof closer, & num_writ );
-        if ( rc == 0 )
-        {
-            /* test transfer */
-            if ( num_writ != sizeof closer )
-                rc = RC ( rcFS, rcFile, rcDestroying, rcTransfer, rcIncomplete );
-            else
-            {
-                /* complete operation */
-                rc = KCRC32FileWhackWrite ( self );
-                if ( rc == 0 )
-                    return rc;
-            }
-        }
-
-        /* restore entry state */
-        KCRC32FileRevert ( self );
-    }
-
-    /* bail on errors */
-    atomic32_set ( & self -> dad . refcount, 1 );
-    return rc;
-}
-
-
-/* GetSysFile
- */
-static
-struct KSysFile *CC KCRC32FileGetSysFile ( const KCRC32File *self, uint64_t *offset )
-{
-    if ( offset != NULL )
-        * offset = 0;
-    return NULL;
-}
-
-
-/* RandomAccess
- */
-static
-rc_t CC KCRC32FileRandomAccessRead ( const KCRC32File *self )
-{
-    return KFileRandomAccess ( self -> file );
-}
-
-static
-rc_t CC KCRC32FileRandomAccessWrite ( const KCRC32File *self )
-{
-    return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported );
-}
-
-
-/* Type
- */
-static
-uint32_t CC KCRC32FileType ( const KCRC32File *self )
-{
-    return KFileType ( self -> file );
-}
-
-
-/* Size
- */
-static
-rc_t CC KCRC32FileSize ( const KCRC32File *self, uint64_t *size )
-{
-    return KFileSize ( self -> file, size );
-}
-
-static
-rc_t CC KCRC32FileSizeAppend ( const KCRC32File *self, uint64_t *size )
-{
-    *size = self -> position;
-    return 0;
-}
-
-
-/* SetSize
- *  the read-only version should never be called, because
- *  the message dispatch checks for write enable
- *
- *  the writable version disallows all but a total reset
- *  and setting size to current size
- */
-static
-rc_t CC KCRC32FileSetSizeRead ( KCRC32File *self, uint64_t size )
-{
-    return RC ( rcFS, rcFile, rcUpdating, rcFunction, rcUnsupported );
-}
-
-static
-rc_t CC KCRC32FileSetSizeWrite ( KCRC32File *self, uint64_t size )
-{
-    rc_t rc;
-
-    /* allow a noop */
-    if ( size == self -> position )
-        return 0;
-
-    /* disallow if not a reset */
-    if ( size != 0 )
-        return RC ( rcFS, rcFile, rcUpdating, rcFunction, rcUnsupported );
-
-    /* ensure we're not in a transaction */
-    if ( self -> u . wr . topen )
-        return RC ( rcFS, rcFile, rcUpdating, rcFile, rcBusy );
-
-    /* go ahead and try to truncate destination */
-    rc = KFileSetSize ( self -> file, 0 );
-    if ( rc == 0 )
-    {
-        /* reset our internal state */
-        self -> position = self -> u . wr . max_position = 0;
-        self -> crc32 = 0;
-    }
-
-    return rc;
-}
-
-
-/* Finish
- *  returns the results of crc comparison
- */
-static
-rc_t KCRC32FileFinish ( KCRC32File *self )
-{
-    if ( ! self -> u . rd . eof )
-    {
-        if ( self -> crc32 != self -> u. rd . crc32 )
-            self -> u . rd . rc = RC ( rcFS, rcFile, rcReading, rcFile, rcCorrupt );
-        self -> u . rd . eof = true;
-    }
-
-    return self -> u . rd . rc;
-}
-
-
-/* Seek
- *  used to scan ahead in a read-only file
- *  "self" is modifiable, but file is read-only
- */
-static
-rc_t KCRC32FileSeek ( KCRC32File *self, uint64_t pos )
-{
-    rc_t rc;
-    size_t num_read;
-    uint8_t buff [ 32 * 1024 ];
-
-    /* should never be called by writable file */
-    assert ( ! self -> dad . write_enabled );
-
-    /* seek to "pos" */
-    for ( rc = 0; self -> position < pos; self -> position += num_read )
-    {
-        /* maximum to read in this buffer */
-        size_t to_read = sizeof buff;
-        if ( self -> position + sizeof buff > pos )
-            to_read = ( size_t ) ( pos - self -> position );
-
-        /* read bytes */
-        rc = KFileRead ( self -> file, self -> position, buff, to_read, & num_read );
-        if ( rc != 0 )
-            break;
-
-        /* detect EOF */
-        if ( num_read == 0 )
-        {
-            switch (self->type)
-            {
-            case KCRC32FileTypeRead:
-                rc = KCRC32FileFinish ( self );
-                break;
-            case KCRC32FileTypeWrite:
-                if ( self -> fmt != NULL)
-                {
-                    KCRC32SumFmtUpdate ( self -> fmt, self -> u . wr . path, self -> crc32, true );
-                    KCRC32SumFmtRelease ( self -> fmt );
-                    self -> fmt = NULL;
-                }
-                break;
-            }
-            break;
-        }
-        
-        /* append bytes */
-        self -> crc32 = CRC32 ( self -> crc32, buff, num_read );
-    }
-    
-    return rc;
-}
-
-/* Read
- *  read-only version allows random access reads
- */
-static
-rc_t CC KCRC32FileRead ( const KCRC32File *cself,
-    uint64_t pos, void *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc;
-    size_t total = 0;
-    uint64_t end = pos + bsize;
-    KCRC32File *self = ( KCRC32File* ) cself;
-
-    * num_read = 0;
-
-    /* no buffer means no bytes */
-    if ( bsize == 0 )
-        return 0;
-
-    /* test for starting a read before the current marker
-       meaning that it does not figure in to the checksum */
-    if ( self -> position > pos )
-    {
-        /* test for entire buffer being before marker */
-        if ( end <= self -> position )
-            return KFileRead ( self -> file, pos, buffer, bsize, num_read );
-
-        /* perform a partial read without affecting checksum */
-        rc = KFileRead ( self -> file, pos, buffer, ( size_t )( self -> position - pos ), num_read );
-        if ( rc != 0 )
-            return rc;
-
-        /* adjust as if a new read request, remembering number read so far */
-        pos += * num_read;
-        total = * num_read;
-        buffer = & ( ( uint8_t* ) buffer ) [ * num_read ];
-
-        /* in case num_read != all bytes up to marker */
-        if ( pos != self -> position )
-            return 0;
-    }
-
-    /* test for hole between current marker and desired start */
-    else if ( self -> position < pos )
-    {
-        /* scan ahead, discarding */
-        rc = KCRC32FileSeek ( self, pos );
-        if ( rc != 0 || self -> position < pos )
-            return rc;
-    }
-
-    /* no hole - and still some space in buffer */
-    assert ( self -> position == pos );
-    assert ( pos < end );
-
-    /* read bytes */
-    rc = KFileRead ( self -> file, pos, buffer, ( size_t ) ( end - pos ), num_read );
-    if ( rc == 0 )
-    {
-        /* detect bytes read */
-        if ( * num_read != 0 )
-        {
-            /* accumulate into checksum */
-            self -> position += * num_read;
-            self -> crc32 = CRC32 ( self -> crc32, buffer, * num_read );
-
-            /* add in any previously read bytes and return success */
-            * num_read += total;
-            return 0;
-        }
-
-        switch (self->type)
-        {
-        case KCRC32FileTypeRead:
-            /* EOF - get results */
-            rc = KCRC32FileFinish ( self );
-            break;
-        case KCRC32FileTypeWrite:
-            if ( self -> fmt != NULL)
-            {
-                KCRC32SumFmtUpdate ( self -> fmt, self -> u . wr . path, self -> crc32, true );
-                KCRC32SumFmtRelease ( self -> fmt );
-                self -> fmt = NULL;
-            }
-            break;
-        }
-
-    }
-
-    /* always return 0 if some bytes were read */
-    if ( total != 0 )
-    {
-        * num_read = total;
-        return 0;
-    }
-    
-    return rc;
-}
-
-/* Read
- *  writeable version isn't keeping track of checksum on read,
- *  so just forward to destination file
- */
-static
-rc_t CC KCRC32FileFwdRead ( const KCRC32File *self,
-    uint64_t pos, void *buffer, size_t bsize, size_t *num_read )
-{
-    return KFileRead ( self -> file, pos, buffer, bsize, num_read );
-}
-
-
-/* Write
- */
-static
-rc_t CC KCRC32FileBadWrite ( KCRC32File *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    * num_writ = 0;
-    if ( size == 0 )
-        return 0;
-    if ( buffer == NULL )
-        return RC ( rcFS, rcFile, rcWriting, rcBuffer, rcNull );
-
-    return RC ( rcFS, rcFile, rcReading, rcFile, rcReadonly );
-}
-
-static
-rc_t CC KCRC32FileWrite ( KCRC32File *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    rc_t rc;
-
-    if ( pos != self -> position )
-        return RC ( rcFS, rcFile, rcWriting, rcParam, rcInvalid );
-
-    rc = KFileWrite ( self -> file, pos, buffer, size, num_writ );
-    if ( rc == 0 && * num_writ != 0 )
-    {
-        self -> position += * num_writ;
-        if ( self -> position > self -> u . wr . max_position )
-            self -> u . wr . max_position = self -> position;
-        self -> crc32 = CRC32 ( self -> crc32, buffer, * num_writ );
-    }
-
-    return rc;
-}
-
-
-/* ToKFile
- *  a CRC file is a subclass of KFile
- *  this is an explicit cast operator
- */
-LIB_EXPORT KFile* CC KCRC32FileToKFile ( KCRC32File *self )
-{
-    if ( self != NULL )
-        return & self -> dad;
-    return NULL;
-}
-
-LIB_EXPORT const KFile* CC KCRC32FileToKFileConst ( const KCRC32File *self )
-{
-    if ( self != NULL )
-        return & self -> dad;
-    return NULL;
-}
-
-
-/* BeginTransaction
- *  preserve current state and file marker
- *  in preparation for rollback
- */
-LIB_EXPORT rc_t CC KCRC32FileBeginTransaction ( KCRC32File *self )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcFreezing, rcSelf, rcNull );
-    if ( ! self -> dad . write_enabled )
-        return RC ( rcFS, rcFile, rcFreezing, rcFile, rcReadonly );
-    if ( self -> u . wr . topen )
-        return RC ( rcFS, rcFile, rcFreezing, rcFile, rcBusy );
-
-    self -> u . wr . topen = true;
-    self -> u . wr . tposition = self -> position;
-    self -> u . wr . crc32 = self -> crc32;
-
-    return 0;
-}
-
-
-/* Commit
- *  accept current state as correct
- */
-LIB_EXPORT rc_t CC KCRC32FileCommit ( KCRC32File *self )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcCommitting, rcSelf, rcNull );
-    if ( ! self -> dad . write_enabled )
-        return RC ( rcFS, rcFile, rcCommitting, rcFile, rcReadonly );
-
-    self -> u . wr . topen = false;
-
-    return 0;
-}
-
-
-/* Revert
- *  revert state to previous transaction boundary conditions
- */
-LIB_EXPORT rc_t CC KCRC32FileRevert ( KCRC32File *self )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcReverting, rcSelf, rcNull );
-    if ( ! self -> dad . write_enabled )
-        return RC ( rcFS, rcFile, rcReverting, rcFile, rcReadonly );
-    if ( ! self -> u . wr . topen )
-        return RC ( rcFS, rcFile, rcReverting, rcFile, rcInconsistent );
-
-    self -> position = self -> u . wr . tposition;
-    self -> crc32 = self -> u . wr . crc32;
-    self -> u . wr . topen = false;
-
-    return 0;
-}
-
-/* Reset
- *  reset state to that of an empty file
- *  aborts any open transaction
- */
-LIB_EXPORT rc_t CC KCRC32FileReset ( KCRC32File *self )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcResetting, rcSelf, rcNull );
-    if ( ! self -> dad . write_enabled )
-        return RC ( rcFS, rcFile, rcResetting, rcFile, rcReadonly );
-#if 1
-    self -> u . wr . topen = false;
-#else
-    if ( self -> u . wr . topen )
-        return RC ( rcFS, rcFile, rcResetting, rcFile, rcBusy );
-#endif
-
-    self -> position = 0;
-    self -> crc32 = 0;
-
-    return 0;
-}
-
-/*--------------------------------------------------------------------------
- * CRC32File factories
- */
-
-
-/* MakeCRC32Read
- *  creates an adapter to check CRC32 checksum for a source file
- *
- *  "f" [ OUT ] - return parameter for file with crc32 check
- *
- *  "src" [ IN ] - source file with read permission
- *
- *  "crc32" [ IN ] - checksum to match
- *
- * NB - creates a read-only file that does NOT support random access
- *  i.e. must be consumed serially starting from offset 0
- */
-static KFile_vt_v1 KCRC32FileRead_vt =
-{
-    1, 1,
-
-    /* 1.0 */
-    KCRC32FileWhackRead,
-    KCRC32FileGetSysFile,
-    KCRC32FileRandomAccessRead,
-    KCRC32FileSize,
-    KCRC32FileSetSizeRead,
-    KCRC32FileRead,
-    KCRC32FileBadWrite,
-
-    /* 1.1 */
-    KCRC32FileType
-};
-
-LIB_EXPORT rc_t CC KFileMakeCRC32Read ( const KFile **fp,
-    const KFile *src, uint32_t crc32 )
-{
-    rc_t rc;
-
-    if ( fp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( src == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! src -> read_enabled )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        else
-        {
-            KCRC32File *f = malloc ( sizeof * f - sizeof f -> u + sizeof f -> u . rd );
-            if ( f == NULL )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KFileInit ( & f -> dad,
-				     ( const KFile_vt* ) & KCRC32FileRead_vt, "KCRC32File", "no-name", true, false );
-                if ( rc == 0 )
-                {
-                    f -> position = 0;
-                    f -> crc32 = 0;
-                    f -> file = ( KFile* ) src;
-                    f -> fmt = NULL;
-                    f -> type = KCRC32FileTypeRead;
-                    f -> u . rd . rc = 0;
-                    f -> u . rd . eof = 0;
-                    f -> u . rd . crc32 = crc32;
-
-                    * fp = & f -> dad;
-                    return 0;
-                }
-            }
-
-            free ( f );
-        }
-
-        * fp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* MakeWrite
- *  creates an adapter to create checksum for a file
- *
- *  "f" [ OUT ] - return parameter for file with crc32 check
- *
- *  "out" [ IN ] - output file with write permission
- *  since this file is being wrapped by "f", ownership of
- *  the provided reference is transferred to "f"
- *
- *  "fmt" [ IN ] - checksum output formatter.
- *  since this may be used for multiple checksums, "f" will
- *  attach its own reference to "fmt".
- *
- *  "path" [ IN ] - checksum output file path, used to
- *  create standard crc32sum file entry.
- *
- * NB - creates a write-only file that does NOT suppport random access
- *  i.e. must be written serially from offset 0
- */
-static KFile_vt_v1 sKCRC32FileWrite_vt =
-{
-    1, 0,
-
-    KCRC32FileWhackWrite,
-    KCRC32FileGetSysFile,
-    KCRC32FileRandomAccessWrite,
-    KCRC32FileSize,
-    KCRC32FileSetSizeWrite,
-    KCRC32FileFwdRead,
-    KCRC32FileWrite
-};
-
-LIB_EXPORT rc_t CC KCRC32FileMakeWrite ( KCRC32File **fp,
-    KFile *out, KCRC32SumFmt *fmt, const char *path )
-{
-    rc_t rc;
-
-    if ( fp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( out == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! out -> write_enabled )
-        {
-            if ( out -> read_enabled )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcReadonly );
-            else
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        }
-        else if ( fmt == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( fmt -> read_only )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcReadonly );
-        else if ( path == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcPath, rcNull );
-        else if ( path [ 0 ] == 0 )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcPath, rcEmpty );
-        else
-        {
-            KCRC32File *f = malloc ( sizeof * f - sizeof f -> u +
-                sizeof f -> u . wr + strlen ( path ) );
-            if ( f == NULL )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KFileInit ( & f -> dad,
-                    ( const KFile_vt* ) & sKCRC32FileWrite_vt, "KCRC32File", path, out -> read_enabled, true );
-                if ( rc == 0 )
-                {
-                    f -> position = 0;
-                    f -> crc32 = 0;
-                    f -> file = out;
-                    f -> fmt = fmt;
-                    f -> type = KCRC32FileTypeWrite;
-
-                    memset ( & f -> u . wr, 0, sizeof f -> u . wr );
-                    strcpy ( f -> u . wr . path, path );
-
-                    rc = KFileSize ( out, & f -> u . wr . max_position );
-                    if (rc)
-                    {
-                        if (GetRCState (rc) == rcUnsupported)
-                        {
-                            f -> u . wr . max_position  = 0;
-                            rc = 0;
-                        }
-                    }    
-                    if ( rc == 0 )
-                        rc = KCRC32SumFmtAddRef ( fmt );
-                    if ( rc == 0 )
-                    {
-                        * fp = f;
-                        return 0;
-                    }
-                }
-
-                free ( f );
-            }
-        }
-
-        * fp = NULL;
-    }
-
-    return rc;
-}
-
-/* MakeAppend
- *  creates an adapter to create CRC32 checksum for a file
- *
- *  "f" [ OUT ] - return parameter for file with crc32 check
- *
- *  "out" [ IN ] - output file with write permission
- *  since this file is being wrapped by "f", ownership of
- *  the provided reference is transferred to "f"
- *
- *  "fmt" [ IN ] - checksum output formatter.
- *  since this may be used for multiple checksums, "f" will
- *  attach its own reference to "fmt".
- *
- *  "path" [ IN ] - checksum output file path, used to
- *  create standard crc32sum file entry.
- *
- * NB - creates a write-only file that does NOT suppport random access
- *  i.e. must be written serially from current EOF (minus the stored crc context)
- */
-static KFile_vt_v1 sKCRC32FileAppend_vt =
-{
-    1, 0,
-
-    KCRC32FileWhackAppend,
-    KCRC32FileGetSysFile,
-    KCRC32FileRandomAccessWrite,
-    KCRC32FileSizeAppend,
-    KCRC32FileSetSizeWrite,
-    KCRC32FileFwdRead,
-    KCRC32FileWrite
-};
-
-LIB_EXPORT rc_t CC KCRC32FileMakeAppend ( KCRC32File **fp, KFile *out, KCRC32SumFmt *fmt, const char *path )
-{
-    rc_t rc;
-    KLogLevel lvl = klogInt;
-    
-    if ( fp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( out == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! out -> write_enabled )
-        {
-            if ( out -> read_enabled )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcReadonly );
-            else
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        }
-        else if ( fmt == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( fmt -> read_only )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcReadonly );
-        else if ( path == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcPath, rcNull );
-        else if ( path [ 0 ] == 0 )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcPath, rcEmpty );
-        else
-        {
-            KCRC32File *f = malloc ( sizeof * f - sizeof f -> u +
-                sizeof f -> u . wr + strlen ( path ) );
-            if ( f == NULL )
-            {
-                rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-                lvl = klogSys;
-            }
-            else
-            {
-                rc = KFileInit ( & f -> dad,
-                    ( const KFile_vt* ) & sKCRC32FileAppend_vt, "KCRC32File", path, out -> read_enabled, true );
-                if ( rc == 0 )
-                {
-                    f -> crc32 = 0;
-                    f -> file = out;
-                    f -> fmt = fmt;
-                    f -> type = KCRC32FileTypeWrite;
-
-                    rc = KCRC32SumFmtAddRef ( fmt );
-                    if ( rc != 0 )
-                    {
-                        free ( f );
-                        * fp = NULL;
-                        return rc;
-                    }
-
-                    memset ( & f -> u . wr, 0, sizeof f -> u . wr );
-                    strcpy ( f -> u . wr . path, path );
-
-                    lvl = klogSys;
-                    rc = KFileSize ( out, & f -> position );
-                    if ( rc == 0 )
-                    {
-                        uint8_t buffer [ sizeof CRCTAG + sizeof ENDIANTAG + sizeof f -> crc32 ];
-
-                        /* an empty file is fine */
-                        if ( f -> position == 0 )
-                        {
-                            * fp = f;
-                            return 0;
-                        }
-
-                        /* set max */
-                        f -> u . wr . max_position = f -> position;
-
-                        /* a file without a trailing crc state is incorrect or corrupt */
-                        if ( f -> position < sizeof buffer )
-                        {
-                            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcIncorrect );
-                            lvl = klogErr;
-                        }
-                        else
-                        {
-                            /* try to read crc state */
-                            size_t num_read;
-                            rc = KFileRead ( out, f -> position - sizeof buffer, buffer, sizeof buffer, & num_read );
-                            if ( rc == 0 )
-                            {
-                                if ( num_read != sizeof buffer )
-                                    rc = RC ( rcFS, rcFile, rcConstructing, rcTransfer, rcIncomplete );
-                                else
-                                {
-                                    /* errors from here are usage errors */
-                                    lvl = klogErr;
-                                    
-                                    if ( memcmp ( buffer, CRCTAG, sizeof CRCTAG ) != 0 )
-                                        rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcIncorrect );
-                                    else
-                                    {
-                                        /* forget about the CRC state */
-                                        f -> position -= sizeof buffer;
-                                        memcpy ( & f -> crc32, & buffer [ sizeof CRCTAG + sizeof ENDIANTAG ], sizeof f -> crc32 );
-                                        
-                                        /* check for proper byte order */
-                                        if ( memcmp ( & buffer [ sizeof CRCTAG ], ENDIANTAG, sizeof ENDIANTAG ) == 0 )
-                                        {
-                                            * fp = f;
-                                            return 0;
-                                        }
-
-                                        /* probably swapped, but confirm */
-                                        if ( memcmp ( & buffer [ sizeof CRCTAG ], ENDIANSWAPTAG, sizeof ENDIANSWAPTAG ) == 0 )
-                                        {
-                                            f -> crc32 = bswap_32 ( f -> crc32 );
-                                            * fp = f;
-                                            return 0;
-                                        }
-                                        
-                                        /* garbage */
-                                        rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcCorrupt );
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    
-                    KCRC32SumFmtRelease ( fmt );
-                }
-                
-                free ( f );
-            }
-        }
-        
-        * fp = NULL;
-    }
-    
-    LOGERR ( lvl, rc, "append-mode CRC32 file" );
-    
-    return rc;
-}
-
-static KFile_vt_v1 sKCRC32FileReadCreate_vt =
-{
-    1, 1,
-
-    KCRC32FileWhackRead,
-    KCRC32FileGetSysFile,
-    KCRC32FileRandomAccessRead,
-    KCRC32FileSize,
-    KCRC32FileSetSizeRead,
-    KCRC32FileRead,
-    KCRC32FileBadWrite,
-
-    /* 1.1 */
-    KCRC32FileType
-};
-
-LIB_EXPORT rc_t CC KFileMakeNewCRC32Read ( const KFile **fp,
-    const KFile *in, KCRC32SumFmt *fmt, const char *path )
-{
-    rc_t rc;
-
-    if ( fp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( in == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! in -> read_enabled )
-	    rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        else if ( fmt == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( fmt -> read_only )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcReadonly );
-        else if ( path == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcPath, rcNull );
-        else if ( path [ 0 ] == 0 )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcPath, rcEmpty );
-        else
-        {
-            KCRC32File *f = malloc ( sizeof * f - sizeof f -> u +
-                sizeof f -> u . wr + strlen ( path ) );
-            if ( f == NULL )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KFileInit ( & f -> dad,
-                    ( const KFile_vt* ) & sKCRC32FileReadCreate_vt, "KCRC32File", path, in -> read_enabled, false );
-                if ( rc == 0 )
-                {
-                    f -> position = 0;
-                    f -> crc32 = 0;
-                    f -> file = ( KFile* ) in;
-                    f -> fmt = fmt;
-                    f -> type = KCRC32FileTypeWrite;
-                    memset ( & f -> u . wr, 0, sizeof f -> u . wr );
-                    strcpy ( f -> u . wr . path, path );
-#if 0
-                    /* KFileSize can't always be used */
-                    rc = KFileSize ( in, & f -> u . wr . max_position );
-#endif
-                    if ( rc == 0 )
-                        rc = KCRC32SumFmtAddRef ( fmt );
-                    if ( rc == 0 )
-                    {
-                        * fp = & f -> dad;
-                        return 0;
-                    }
-                }
-
-                free ( f );
-            }
-        }
-
-        * fp = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/kfs/dir_test.c b/libs/kfs/dir_test.c
deleted file mode 100644
index 9be919e..0000000
--- a/libs/kfs/dir_test.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-#include <kfs/directory.h>
-#include <sysalloc.h>
-
-/* ======================================================================
- */
-const char *get_mode_string ( KCreateMode mode )
-{
-    switch (mode)
-    {
-    default:
-	return "BAD MODE";
-    case kcmOpen:
-	return "kcmOpen";
-    case kcmInit:
-	return "kcmInit";
-    case kcmCreate:
-	return "kcmCreate";
-    case kcmOpen|kcmParents:
-	return "kcmOpen|kcmParents";
-    case kcmInit|kcmParents:
-	return "kcmInit|kcmParents";
-    case kcmCreate|kcmParents:
-	return "kcmCreate|kcmParents";
-    }
-}
-
-/* end of file */
diff --git a/libs/kfs/directory-v2.c b/libs/kfs/directory-v2.c
deleted file mode 100644
index a0544a2..0000000
--- a/libs/kfs/directory-v2.c
+++ /dev/null
@@ -1,1185 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define TRACK_REFERENCES 0
-
-#include <kfs/extern.h>
-
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <kfs/impl.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/path.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-
-/*--------------------------------------------------------------------------
- * KDirectory
- *  a directory
- */
-
-static const char classname[] = "KDirectory";
-
-/* AddRef
- *  creates a new reference
- *  ignores NULL references
- */
-
-// !!! Probably wrong way to implement this function
-LIB_EXPORT KDirectory_v2 * CC KDirectoryDuplicate_v2 ( const KDirectory_v2 *self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcCopying );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to dupliacte directory" );
-
-    else switch ( KRefcountAdd ( & self -> refcount, classname ) )
-         {
-         case krefLimit:
-             INTERNAL_ERROR ( xcRefcountOutOfBounds, "references to directory surpass limit" );
-             break;
-         default:
-             INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has an invalid version" );
-         }
-
-    return NULL;
-}
-
-/* Release
- *  discard reference to directory
- *  ignores NULL references
- */
-LIB_EXPORT void CC KDirectoryRelease_v2 ( const KDirectory_v2 *self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcReleasing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to release directory" );
-
-    else switch ( KRefcountDrop ( & self -> refcount, classname ) )
-         {
-         case krefWhack:
-         {
-             switch ( self -> vt -> v2 . maj )
-             {
-             case 2:
-                 ( * self -> vt -> v2 . destroy ) ( ( KDirectory_v2 * ) self, ctx );
-                 break;
-             default:
-                 INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has an invalid version" );
-             }
-             
-             if ( FAILED () )
-             {
-                 KRefcountInit ( ( KRefcount * ) & self -> refcount, 1, classname, "failed-release", "orphan" );
-                 INTERNAL_ERROR ( xcReleaseFailed, "failed to release reference, - orphan" );
-             }
-         }
-         case krefNegative:
-             INTERNAL_ERROR ( xcRefcountOutOfBounds, "references to directory cannot be negative" );
-         }
-}
-
-/* List
- *  create a directory listing
- *
- *  "list" [ OUT ] - return parameter for list object
- *
- *  "path" [ IN, NULL OKAY ] - optional parameter for target
- *  directory. if NULL, interpreted to mean "." will be
- *  interpreted as format string if arguments follow
- */
-
-LIB_EXPORT KNamelist * CC KDirectoryList_v2 ( const KDirectory_v2 *self, ctx_t ctx,
-    bool ( CC * f ) ( const KDirectory_v2 *dir, const char *name, void *data ),
-    void *data, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcListing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to create directory listing" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        return ( * self -> vt -> v2 . list_dir ) ( self, ctx, f, data, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has an invalid version" );
-    }
-
-    return NULL;
-}
-
-/* Visit
- *  visit each path under designated directory,
- *  recursively if so indicated
- *
- *  "recurse" [ IN ] - if non-zero, recursively visit sub-directories
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - function to execute
- *  on each path. receives a base directory and relative path
- *  for each entry. if "f" returns non-zero, the iteration will
- *  terminate and that value will be returned. NB - "dir" will not
- *  be the same as "self".
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- */
-LIB_EXPORT void CC KDirectoryVisit_v2 ( const KDirectory_v2 *self, ctx_t ctx, bool recurse,
-    bool ( CC * f ) ( const KDirectory_v2 *dir, uint32_t type, const char *name, void *data ),
-    void *data, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcVisiting );
-    
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to visit directory" );
-
-    if ( f == NULL )
-        INTERNAL_ERROR ( xcFunctionNull, "function pointer is null" );
-
-    if ( path == NULL )
-        /* FIX ME  path = "." */ ;
-
-    switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        ( * self -> vt -> v2 . visit ) ( self, ctx, recurse, f, data, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has an invalid version" );
-    }
-}
-
-/* VisitUpdate
- *  
- */
-LIB_EXPORT void CC KDirectoryVisitUpdate_v2 ( KDirectory_v2 *self, ctx_t ctx, bool recurse,
-    bool ( CC * f ) ( KDirectory_v2 *dir, uint32_t type, const char *name, void *data ),
-    void *data, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcVisiting );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to visit directory" );
-    else if ( f == NULL )
-        INTERNAL_ERROR ( xcFunctionNull, "function pointer is null" );
-
-    else if ( self -> read_only )
-        INTERNAL_ERROR ( xcFileReadOnly, "directory does not have write permission" );
-
-    else if ( path == NULL )
-        /* FIX ME path = "." */;
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        ( * self -> vt -> v2 . visit_update )( self, ctx, recurse, f, data, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has an invalid version" );
-    }
-}
-
-/* PathType
- *  returns a KPathType
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- */
-LIB_EXPORT uint32_t CC KDirectoryPathType_v2 ( const KDirectory_v2 *self, ctx_t ctx, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcIdentifying );
-
-    if ( self == NULL ) 
-        INTERNAL_ERROR ( xcSelfNull, "failed to get path type" );
-
-    if ( path == NULL )
-        return kptBadPath;
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        return ( * self -> vt -> v2 . path_type ) ( self, ctx, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has an invalid version" );
-    }
-
-    return kptBadPath;
-}
-
-/* ResolvePath
- *  resolves path to an absolute or directory-relative path
- *
- *  "absolute" [ IN ] - if non-zero, always give a path starting
- *  with '/'. NB - if the directory is chroot'd, the absolute path
- *  will still be relative to directory root.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character set
- *  the resolved path will be directory relative
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target path. NB - need not exist.
- */
-LIB_EXPORT KPath * CC KDirectoryResolvePath_v2 ( const KDirectory_v2 *self, ctx_t ctx, 
-    bool absolute, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcResolving );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to resolve path" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        return ( * self -> vt -> v2 . resolve_path )
-            ( self, ctx, absolute, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has an invalid version" );
-    }
-
-    return NULL;
-}
-
-/* ResolveAlias
- *  resolves an alias path to its immediate target
- *  NB - the resolved path may be yet another alias
- *
- *  "absolute" [ IN ] - if non-zero, always give a path starting
- *  with '/'. NB - if the directory is chroot'd, the absolute path
- *  will still be relative to directory root.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character set
- *  the resolved path will be directory relative
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting an object presumed to be an alias.
- */
-
-LIB_EXPORT KPath * CC KDirectoryResolveAlias_v2 ( const KDirectory_v2 *self, ctx_t ctx, bool absolute,
-    const KPath *alias )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcResolving );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to resolve alias" );
-
-    else if ( alias == NULL )
-        INTERNAL_ERROR ( xcPathNull, "alias is null" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        return ( * self -> vt -> v2 . resolve_alias )
-            ( self, ctx, absolute, alias );
-    }
-
-    return NULL;
-}
-
-/* Rename
- *  rename an object accessible from directory, replacing
- *  any existing target object of the same type
- *
- *  "from" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- *
- *  "to" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- */
-LIB_EXPORT void CC KDirectoryRename_v2 ( KDirectory_v2 *self, ctx_t ctx, bool force, const KPath *from, const KPath *to )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcRenaming );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to rename directory" );
-
-    else if ( from == NULL || to == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else if ( self -> read_only )
-        INTERNAL_ERROR ( xcDirectoryWriteOnly, "directory does not have write permissions" );
-    
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        ( * self -> vt -> v2 . rename ) ( self, ctx, force, from, to );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-
-}
-
-/* Remove
- *  remove an accessible object from its directory
- *
- *  "force" [ IN ] - if non-zero and target is a directory,
- *  remove recursively
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-LIB_EXPORT void CC KDirectoryRemove_v2 ( KDirectory_v2 *self, ctx_t ctx, bool force, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcRemoving );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to remove directory" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else if ( self -> read_only )
-        INTERNAL_ERROR ( xcDirectoryWriteOnly, "directory does not have write permissions" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        ( * self -> vt -> v2 . remove ) ( self, ctx, force, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-}
-
-/* ClearDir
- *  remove all directory contents
- *
- *  "force" [ IN ] - if non-zero and directory entry is a
- *  sub-directory, remove recursively
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- */
-LIB_EXPORT void CC KDirectoryClearDir_v2 ( KDirectory_v2 *self, ctx_t ctx, bool force, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcRemoving );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to clear directory" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else if ( self -> read_only )
-        INTERNAL_ERROR ( xcDirectoryWriteOnly, "directory does not have write permissions" );
-
-    switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        ( * self -> vt -> v2 . clear_dir ) ( self, ctx, force, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-}
-
-/* Access
- *  get access to object
- *
- *  "access" [ OUT ] - return parameter for Unix access mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-LIB_EXPORT uint32_t CC KDirectoryAccess_v2 ( const KDirectory_v2 *self, ctx_t ctx, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcAccessing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to access directory" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        return ( * self -> vt -> v2 . access ) ( self, ctx, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-    
-    return 0;
-}
-
-/* SetAccess
- *  set access to object a la Unix "chmod"
- *
- *  "recurse" [ IN ] - if non zero and "path" is a directory,
- *  apply changes recursively.
- *
- *  "access" [ IN ] and "mask" [ IN ] - definition of change
- *  where "access" contains new bit values and "mask defines
- *  which bits should be changed.
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-LIB_EXPORT void CC KDirectorySetAccess_v2 ( KDirectory_v2 *self, ctx_t ctx, bool recurse,
-    uint32_t access, uint32_t mask, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcAccessing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to set access to directory" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else if ( self -> read_only )
-        INTERNAL_ERROR ( xcDirectoryWriteOnly, "directory does not have write permissions" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        /* TBD - perhaps limit bits to lower 9 */
-        ( * self -> vt -> v2 . set_access )
-            ( self, ctx, recurse, access, mask, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-}
-
-/* Date
- *  get date/time to object
- *
- *  "date" [ OUT ] - return parameter
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-LIB_EXPORT KTime_t CC KDirectoryDate_v2 ( const KDirectory_v2 *self, ctx_t ctx, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcAccessing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get directory date" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        return ( * self -> vt -> v2 . date ) ( self, ctx, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-
-    return 0;
-}
-
-
-/* SetDate
- *  set date to object
- *
- *  "recurse" [ IN ] - if non zero and "path" is a directory,
- *  apply changes recursively.
- *
- *  "date" [ IN ] - new time and date for the object
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-LIB_EXPORT void CC KDirectorySetDate_v2 ( KDirectory_v2 *self, ctx_t ctx, bool recurse,
-    KTime_t date, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcUpdating );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get directory date" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        ( * self -> vt -> v2 . setdate ) ( self, ctx, recurse, date, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-}
-
-
-/* CreateAlias
- *  creates a path alias according to create mode
- *
- *  "access" [ IN ] - standard Unix directory access mode
- *  used when "mode" has kcmParents set and alias path does
- *  not exist.
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "targ" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target alias
- */
-LIB_EXPORT void CC KDirectoryCreateAlias_v2 ( KDirectory_v2 *self, ctx_t ctx,
-    uint32_t access, KCreateMode mode, const KPath *targ, const KPath *alias )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcUpdating );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get directory date" );
-
-    if ( targ == NULL || alias == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    if ( self -> read_only )
-        INTERNAL_ERROR ( xcDirectoryWriteOnly, "directory does not have read permissions" );
-
-    switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        ( * self -> vt -> v2 . create_alias )( self, ctx, access, mode, targ, alias );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-}
-
-/* OpenFileRead
- *  opens an existing file with read-only access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT const KFile_v2 * CC KDirectoryOpenFileRead_v2 ( const KDirectory_v2 *self, ctx_t ctx,
-    const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcOpening );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get directory date" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        return ( * self -> vt -> v2 . open_file_read ) ( self, ctx, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-
-    return NULL;
-}
-
-/* OpenFileWrite
- *  opens an existing file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT KFile_v2 * CC KDirectoryOpenFileWrite_v2 ( KDirectory_v2 *self, ctx_t ctx,
-    bool update, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcOpening );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get directory date" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else if ( self -> read_only )
-        INTERNAL_ERROR ( xcDirectoryWriteOnly, "directory does not have read permissions" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        return ( * self -> vt -> v2 . open_file_write )
-            ( self, ctx, update, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-
-    return NULL;
-}
-
-/* CreateFile
- *  opens a file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT KFile_v2 * CC KDirectoryCreateFile_v2 ( KDirectory_v2 *self, ctx_t ctx,
-    bool update, uint32_t access, KCreateMode mode, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcCreating );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get directory date" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else if ( self -> read_only )
-        INTERNAL_ERROR ( xcDirectoryWriteOnly, "directory does not have read permissions" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        return ( * self -> vt -> v2 . create_file )
-            ( self, ctx, update, access, mode, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-
-    return NULL;
-}
-
-/* FileLocator
- *  returns locator in bytes of target file
- *
- *  "locator" [ OUT ] - return parameter for file locator
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT uint64_t CC KDirectoryFileLocator_v2 ( const KDirectory_v2 *self, ctx_t ctx,
-   const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcAccessing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get directory date" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        return ( * self -> vt -> v2 . file_locator ) ( self, ctx, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-
-    return 0;
-}
-
-/* FileSize
- *  returns size in bytes of target file
- *
- *  "size" [ OUT ] - return parameter for file size
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT uint64_t CC KDirectoryFileSize_v2 ( const KDirectory_v2 *self, ctx_t ctx, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcAccessing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get directory date" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        return ( * self -> vt -> v2 . file_size ) ( self, ctx, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-
-    return 0;
-}
-
-/* FilePhysicalSize
- *  returns size in bytes of target file
- *
- *  "size" [ OUT ] - return parameter for file size
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT uint64_t CC KDirectoryFilePhysicalSize_v2 ( const KDirectory_v2 *self, ctx_t ctx, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcAccessing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get directory date" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        return ( * self -> vt -> v2 . file_phys_size ) ( self, ctx, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-
-    return 0;
-}
-
-/* SetFileSize
- *  sets size in bytes of target file
- *
- *  "size" [ IN ] - new file size
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT void CC KDirectorySetFileSize_v2 ( KDirectory_v2 *self, ctx_t ctx,
-    uint64_t size, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcUpdating );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get directory date" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else if ( self -> read_only )
-        INTERNAL_ERROR ( xcDirectoryWriteOnly, "directory does not have read permissions" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        ( * self -> vt -> v2 . set_size ) ( self, ctx, size, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-}
-
-/* FileContiguous
- *  returns true if the file is "contiguous".  Chunked or sparse files are not
- *  contiguous while most data files are.  Virtual generated files would likely
- *  not be contiguous.  
- *
- *  "contiguous" [ OUT ] - return parameter for file contiguous
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT bool CC KDirectoryFileContiguous_v2 ( const KDirectory_v2 *self, ctx_t ctx, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcAccessing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get directory date" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        return ( * self -> vt -> v2 . file_contiguous ) ( self, ctx, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-
-    return false;
-}
-
-/* OpenDirRead
- * KDirectoryOpenDirUpdate
- *  opens a sub-directory
- *
- *  "chroot" [ IN ] - if non-zero, the new directory becomes
- *  chroot'd and will interpret paths beginning with '/'
- *  relative to itself.
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- */
-LIB_EXPORT const KDirectory_v2 * CC KDirectoryOpenDirRead_v2 ( const KDirectory_v2 *self, ctx_t ctx,
-    bool chroot, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcOpening );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get directory date" );
-
-    if ( path == NULL )
-        /* FIX ME path = "." */;
-
-    switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        return ( * self -> vt -> v2 . open_dir_read )
-            ( self, ctx, chroot, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-    
-    return NULL;
-}
-
-LIB_EXPORT KDirectory_v2 * CC KDirectoryOpenDirUpdate_v2 ( KDirectory_v2 *self, ctx_t ctx,
-    bool chroot, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcOpening );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get directory date" );
-
-    if ( self -> read_only )
-        INTERNAL_ERROR ( xcDirectoryWriteOnly, "directory does not have read permissions" );
-
-    if ( path == NULL )
-        /* FIX ME path = "." */;
-
-    switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        return ( * self -> vt -> v2 . open_dir_update )
-            ( self, ctx, chroot, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-
-    return NULL;
-}
-
-/* CreateDir
- *  create a sub-directory
- *
- *  "access" [ IN ] - standard Unix directory mode, e.g.0775
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- */
-LIB_EXPORT void CC KDirectoryCreateDir_v2 ( KDirectory_v2 *self, ctx_t ctx,
-    uint32_t access, KCreateMode mode, const KPath *path )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcAccessing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get directory date" );
-
-    else if ( path == NULL )
-        INTERNAL_ERROR ( xcPathNull, "path is null" );
-
-    if ( self -> read_only )
-        INTERNAL_ERROR ( xcDirectoryWriteOnly, "directory does not have read permissions" );
-
-    else switch ( self -> vt -> v2 . maj )
-    {
-    case 2:
-        ( * self -> vt -> v2 . create_dir ) ( self, ctx, access, mode, path );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-}
-
-/* Init
- *  initialize a newly allocated directory object
- */
-LIB_EXPORT void CC KDirectoryInit_v2 ( KDirectory_v2 *self, ctx_t ctx, const KDirectory_vt *vt,
-    const char * class_name, const char * path, bool update )
-{
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get initialize directory" );
-
-    else if ( vt == NULL )
-        INTERNAL_ERROR ( xcInterfaceNull, "null vtable" );
-
-    else switch ( vt -> v2 . maj )
-    {
-    case 2:
-#if _DEBUGGING
-        if ( vt -> v2 . file_phys_size == NULL  ||
-             vt -> v2 . file_locator == NULL    ||
-             vt -> v2 . get_sysdir == NULL      ||
-             vt -> v2 . setdate == NULL         ||
-             vt -> v2 . date == NULL            ||
-             vt -> v2 . create_dir == NULL      ||
-             vt -> v2 . open_dir_update == NULL ||
-             vt -> v2 . open_dir_read == NULL   ||
-             vt -> v2 . set_size == NULL        ||
-             vt -> v2 . file_size == NULL       ||
-             vt -> v2 . create_file == NULL     ||
-             vt -> v2 . open_file_write == NULL ||
-             vt -> v2 . open_file_read == NULL  ||
-             vt -> v2 . create_alias == NULL    ||
-             vt -> v2 . set_access == NULL      ||
-             vt -> v2 . access == NULL          ||
-             vt -> v2 . clear_dir == NULL       ||
-             vt -> v2 . remove == NULL          ||
-             vt -> v2 . rename == NULL          ||
-             vt -> v2 . resolve_alias == NULL   ||
-             vt -> v2 . resolve_path == NULL    ||
-             vt -> v2 . path_type == NULL       ||
-             vt -> v2 . visit_update == NULL    ||
-             vt -> v2 . visit == NULL           ||
-             vt -> v2 . list_dir == NULL        ||
-             vt -> v2 . destroy == NULL )
-            
-            INTERNAL_ERROR ( xcInterfaceNull, "null vtable" );
-#endif
-        break;
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-
-    self -> vt = vt;
-    self -> read_only = ( uint8_t ) ( update == 0 );
-
-
-    KRefcountInit ( &self->refcount, 1, class_name, "init", path );
-}
-
-/* DestroyFile
- *  does whatever is necessary with an unreferenced file
- */
-LIB_EXPORT void CC KDirectoryDestroyFile_v2 ( const KDirectory_v2 *self, ctx_t ctx, KFile_v2 *f )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcDirectory, rcDestroying );
-
-    const KDirectory_vt *vt = self -> vt;
-    switch ( vt -> v2 . maj )
-    {
-    case 2:
-        if ( vt -> v2 . destroy_file != NULL )
-            ( * vt -> v2 . destroy_file ) ( ( KDirectory_v2 * ) self, ctx, f );
-        else
-            KFileDestroy_v2 ( f, ctx );
-    default:
-        INTERNAL_ERROR ( xcDirectoryInvalidVersion, "directory has invalid version" );
-    }
-}
-
-#if 0
-
-/* GetSysDir
- *  returns an underlying system file object
- */
-LIB_EXPORT struct KSysDir* CC KDirectoryGetSysDir_v2 ( const KDirectory_v2 *self, ctx_t ctx )
-{
-    if ( self != NULL )
-    {
-        switch ( self -> vt -> v2 . maj )
-        {
-        case 1:
-            if ( self -> vt -> v2 . min > 0 )
-                return ( * self -> vt -> v2 . get_sysdir ) ( self );
-            break;
-        }
-    }
-    return NULL;
-}
-
-
-static rc_t copy_loop( const KFile *src, KFile *dst, size_t bsize )
-{
-    rc_t rc = 0;
-    uint64_t pos = 0;
-    size_t num_read = 1;
-
-    char * buffer = malloc( bsize );
-    if ( buffer == NULL )
-        return RC( rcFS, rcDirectory, rcCopying, rcMemory, rcExhausted );
-
-    while ( rc == 0 && num_read > 0 )
-    {
-        rc = KFileRead ( src, pos, buffer, bsize, &num_read );
-        if ( rc == 0 && num_read > 0 )
-        {
-            size_t num_writ;
-            rc = KFileWrite ( dst, pos, buffer, num_read, &num_writ );
-            pos += num_read;
-        }
-    }
-    free( buffer );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryCopyPath ( const KDirectory_v2 *src_dir,
-    KDirectory_v2 *dst_dir, const char *src_path, const char * dst_path )
-{
-    rc_t rc;
-    struct KFile const *f_src;
-
-    if ( src_dir == NULL || dst_dir == NULL )
-        return RC ( rcFS, rcDirectory, rcCopying, rcSelf, rcNull );
-    if ( src_path == NULL || dst_path == NULL )
-        return RC ( rcFS, rcDirectory, rcCopying, rcParam, rcNull );
-
-    rc = KDirectoryOpenFileRead ( src_dir, &f_src, "%s", src_path );
-    if ( rc == 0 )
-    {
-        uint32_t pt = KDirectoryPathType ( dst_dir, "%s", dst_path );
-        switch( pt )
-        {
-            case kptFile : ; /* intentional fall through! */
-            case kptDir  : rc = KDirectoryRemove ( dst_dir, true, "%s", dst_path ); break;
-        }
-        if ( rc == 0 )
-        {
-            struct KFile *f_dst;
-            uint32_t access = 0664;
-            rc = KDirectoryCreateFile ( dst_dir, &f_dst, false, access, kcmCreate, "%s", dst_path );
-            if ( rc == 0 )
-            {
-                rc = copy_loop( f_src, f_dst, 1024 * 16 );
-            }
-        }
-    }
-    return rc;
-}
-
-
-static rc_t build_obj_path( char **s, const KPath *path, const char * objname )
-{
-    rc_t rc;
-    size_t lp = string_size( path );
-    size_t l = lp + string_size( objname ) + 2;
-    *s = malloc( l );
-    if ( *s == NULL )
-        rc = RC( rcFS, rcDirectory, rcCopying, rcMemory, rcExhausted );
-    else
-    {
-        size_t written;
-        const char * concat = ( ( path[ lp - 1 ] == '/' ) ? "%s%s" : "%s/%s" );
-        rc = string_printf( *s, l, &written, concat, path, objname );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryCopyPaths( const KDirectory_v2 * src_dir,
-    KDirectory_v2 * dst_dir, bool recursive, const char *src, const char *dst )
-{
-    rc_t rc;
-    struct KNamelist *list;
-
-    if ( src_dir == NULL || dst_dir == NULL )
-        return RC ( rcFS, rcDirectory, rcCopying, rcSelf, rcNull );
-    if ( src == NULL || dst == NULL )
-        return RC ( rcFS, rcDirectory, rcCopying, rcParam, rcNull );
-
-    rc = KDirectoryList ( src_dir, &list, NULL, NULL, "%s", src );
-    if ( rc == 0 )
-    {
-        uint32_t pt = KDirectoryPathType ( dst_dir, "%s", dst );
-        /* if the output-directory does not exist: create it! */
-        switch( pt )
-        {
-            case kptFile : rc = KDirectoryRemove ( dst_dir, true, "%s", dst );
-                            /* intentially no break ! */
-
-            case kptNotFound : if ( rc == 0 )
-                                    rc = KDirectoryCreateDir ( dst_dir, 0775, kcmCreate | kcmParents, "%s", dst );
-                               break;
-        }
-        if ( rc == 0 )
-        {
-            uint32_t i, n;
-            rc = KNamelistCount ( list, &n );
-            for ( i = 0; i < n && rc == 0; ++i )
-            {
-                const char *name;
-                rc = KNamelistGet ( list, i, &name );
-                if ( rc == 0 )
-                {
-                    char *src_obj;
-                    rc = build_obj_path( &src_obj, src, name );
-                    if ( rc == 0 )
-                    {
-                        char *dst_obj;
-                        rc = build_obj_path( &dst_obj, dst, name );
-                        if ( rc == 0 )
-                        {
-                            pt = KDirectoryPathType ( src_dir, "%s", src_obj );
-                            switch( pt )
-                            {
-                                case kptFile : rc = KDirectoryCopyPath ( src_dir, dst_dir, src_obj, dst_obj );
-                                               break;
-
-                                case kptDir  : if ( recursive )
-                                                    rc = KDirectoryCopyPaths( src_dir, dst_dir, true, src_obj, dst_obj );
-                                               break;
-                            }
-                            free( dst_obj );
-                        }
-                        free( src_obj );
-                    }
-                }
-            }
-        }
-        KNamelistRelease ( list );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryCopy( const KDirectory_v2 * src_dir,
-    KDirectory_v2 * dst_dir, bool recursive, const char *src, const char *dst )
-{
-    rc_t rc = 0;
-    uint32_t pt;
-
-    if ( src_dir == NULL || dst_dir == NULL )
-        return RC ( rcFS, rcDirectory, rcCopying, rcSelf, rcNull );
-    if ( src == NULL || dst == NULL )
-        return RC ( rcFS, rcDirectory, rcCopying, rcParam, rcNull );
-
-    pt = KDirectoryPathType ( src_dir, "%s", src );
-    switch( pt )
-    {
-        case kptFile : rc = KDirectoryCopyPath ( src_dir, dst_dir, src, dst );
-                        break;
-        case kptDir  : rc = KDirectoryCopyPaths ( src_dir, dst_dir, recursive, src, dst );
-                        break;
-    }
-    return rc;
-}
-#endif
diff --git a/libs/kfs/directory.c b/libs/kfs/directory.c
deleted file mode 100644
index 7536d05..0000000
--- a/libs/kfs/directory.c
+++ /dev/null
@@ -1,1539 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define TRACK_REFERENCES 0
-
-#include <kfs/extern.h>
-#include <kfs/impl.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-
-/*--------------------------------------------------------------------------
- * KDirectory
- *  a directory
- */
-
-static const char classname[] = "KDirectory";
-
-/* AddRef
- *  creates a new reference
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KDirectoryAddRef_v1 ( const KDirectory_v1 *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, classname ) )
-        {
-        case krefLimit:
-            return RC ( rcFS, rcDirectory, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Release
- *  discard reference to directory
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KDirectoryRelease_v1 ( const KDirectory_v1 *cself )
-{
-    KDirectory_v1 *self = ( KDirectory* ) cself;
-    if ( cself != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, classname ) )
-        {
-        case krefWhack:
-        {
-            rc_t rc;
-
-            switch ( self -> vt -> v1 . maj )
-            {
-            case 1:
-                rc = ( * self -> vt -> v1 . destroy ) ( self );
-                break;
-
-            default:
-                rc = RC ( rcFS, rcDirectory, rcReleasing, rcInterface, rcBadVersion );
-            }
-
-            if ( rc != 0 )
-                KRefcountInit ( & self -> refcount, 1, classname, "failed-release", "orphan" );
-            return rc;
-        }
-        case krefNegative:
-            return RC ( rcDB, rcTable, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* List
- *  create a directory listing
- *
- *  "list" [ OUT ] - return parameter for list object
- *
- *  "path" [ IN, NULL OKAY ] - optional parameter for target
- *  directory. if NULL, interpreted to mean "." will be
- *  interpreted as format string if arguments follow
- */
-LIB_EXPORT rc_t CC KDirectoryList_v1 ( const KDirectory_v1 *self, struct KNamelist **list,
-    bool ( CC * f ) ( const KDirectory_v1 *dir, const char *name, void *data ),
-    void *data, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVList ( self, list, f, data, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVList ( const KDirectory_v1 *self, struct KNamelist **list,
-    bool ( CC * f ) ( const KDirectory_v1 *dir, const char *name, void *data ),
-    void *data, const char *path, va_list args )
-{
-    if ( list == NULL )
-        return RC ( rcFS, rcDirectory, rcListing, rcParam, rcNull );
-
-    * list = NULL;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcListing, rcSelf, rcNull );
-
-    if ( path == NULL || path [ 0 ] == 0 )
-        path = ".";
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . list_dir ) ( self, list, f, data, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcListing, rcInterface, rcBadVersion );
-}
-
-/* Visit
- *  visit each path under designated directory,
- *  recursively if so indicated
- *
- *  "recurse" [ IN ] - if non-zero, recursively visit sub-directories
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - function to execute
- *  on each path. receives a base directory and relative path
- *  for each entry. if "f" returns non-zero, the iteration will
- *  terminate and that value will be returned. NB - "dir" will not
- *  be the same as "self".
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- */
-LIB_EXPORT rc_t CC KDirectoryVisit_v1 ( const KDirectory_v1 *self, bool recurse,
-    rc_t ( CC * f ) ( const KDirectory_v1 *dir, uint32_t type, const char *name, void *data ),
-    void *data, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVVisit ( self, recurse, f, data, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVVisit ( const KDirectory_v1 *self, bool recurse,
-    rc_t ( CC * f ) ( const KDirectory_v1 *dir, uint32_t type, const char *name, void *data ),
-    void *data, const char *path, va_list args )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcVisiting, rcSelf, rcNull );
-    if ( f == NULL )
-        return RC ( rcFS, rcDirectory, rcVisiting, rcFunction, rcNull );
-
-    if ( path == NULL || path [ 0 ] == 0 )
-        path = ".";
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . visit ) ( self, recurse, f, data, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcVisiting, rcInterface, rcBadVersion );
-}
-
-/* VisitUpdate
- *  
- */
-LIB_EXPORT rc_t CC KDirectoryVisitUpdate_v1 ( KDirectory_v1 *self, bool recurse,
-    rc_t ( CC * f ) ( KDirectory_v1 *dir, uint32_t type, const char *name, void *data ),
-    void *data, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVVisitUpdate ( self, recurse, f, data, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVVisitUpdate ( KDirectory_v1 *self, bool recurse,
-    rc_t ( CC * f ) ( KDirectory_v1 *dir, uint32_t type, const char *name, void *data ),
-    void *data, const char *path, va_list args )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcVisiting, rcSelf, rcNull );
-    if ( f == NULL )
-        return RC ( rcFS, rcDirectory, rcVisiting, rcFunction, rcNull );
-
-    if ( path == NULL || path [ 0 ] == 0 )
-        path = ".";
-
-    if ( self -> read_only )
-        return RC ( rcFS, rcDirectory, rcVisiting, rcDirectory, rcReadonly );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . visit_update )
-            ( self, recurse, f, data, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcVisiting, rcInterface, rcBadVersion );
-}
-
-/* PathType
- *  returns a KPathType
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- */
-LIB_EXPORT uint32_t CC KDirectoryPathType_v1 ( const KDirectory_v1 *self, const char *path, ... )
-{
-    uint32_t type;
-    va_list args;
-
-    va_start ( args, path );
-    type = KDirectoryVPathType ( self, path, args );
-    va_end ( args );
-
-    return type;
-}
-
-LIB_EXPORT uint32_t CC KDirectoryVPathType ( const KDirectory_v1 *self, const char *path, va_list args )
-{
-    if ( self == NULL || path == NULL || path [ 0 ] == 0 )
-        return kptBadPath;
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . path_type ) ( self, path, args );
-    }
-
-    return kptBadPath;
-}
-
-/* ResolvePath
- *  resolves path to an absolute or directory-relative path
- *
- *  "absolute" [ IN ] - if non-zero, always give a path starting
- *  with '/'. NB - if the directory is chroot'd, the absolute path
- *  will still be relative to directory root.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character set
- *  the resolved path will be directory relative
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target path. NB - need not exist.
- */
-LIB_EXPORT rc_t CC KDirectoryResolvePath_v1 ( const KDirectory_v1 *self, bool absolute,
-    char *resolved, size_t rsize, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVResolvePath ( self, absolute,
-        resolved, rsize, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVResolvePath ( const KDirectory_v1 *self, bool absolute,
-    char *resolved, size_t rsize, const char *path, va_list args )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcResolving, rcSelf, rcNull );
-
-    /* allow NULL buffers of 0 size */
-    if ( resolved == NULL && rsize != 0 )
-        return RC ( rcFS, rcDirectory, rcResolving, rcBuffer, rcNull );
-
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcResolving, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcResolving, rcPath, rcInvalid );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . resolve_path )
-            ( self, absolute, resolved, rsize, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcResolving, rcInterface, rcBadVersion );
-}
-
-/* ResolveAlias
- *  resolves an alias path to its immediate target
- *  NB - the resolved path may be yet another alias
- *
- *  "absolute" [ IN ] - if non-zero, always give a path starting
- *  with '/'. NB - if the directory is chroot'd, the absolute path
- *  will still be relative to directory root.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character set
- *  the resolved path will be directory relative
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting an object presumed to be an alias.
- */
-LIB_EXPORT rc_t CC KDirectoryResolveAlias_v1 ( const KDirectory_v1 *self, bool absolute,
-    char *resolved, size_t rsize, const char *alias, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, alias );
-    rc = KDirectoryVResolveAlias ( self, absolute,
-        resolved, rsize, alias, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVResolveAlias ( const KDirectory_v1 *self, bool absolute,
-    char *resolved, size_t rsize, const char *alias, va_list args )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcResolving, rcSelf, rcNull );
-
-    /* allow NULL buffers of 0 size */
-    if ( resolved == NULL && rsize != 0 )
-        return RC ( rcFS, rcDirectory, rcResolving, rcBuffer, rcNull );
-
-    if ( alias == NULL )
-        return RC ( rcFS, rcDirectory, rcResolving, rcPath, rcNull );
-    if ( alias [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcResolving, rcPath, rcInvalid );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . resolve_alias )
-            ( self, absolute, resolved, rsize, alias, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcResolving, rcInterface, rcBadVersion );
-}
-
-/* Rename
- *  rename an object accessible from directory, replacing
- *  any existing target object of the same type
- *
- *  "from" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- *
- *  "to" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- */
-LIB_EXPORT rc_t CC KDirectoryRename_v1 ( KDirectory_v1 *self, bool force, const char *from, const char *to )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcRenaming, rcSelf, rcNull );
-
-    if ( from == NULL || to == NULL )
-        return RC ( rcFS, rcDirectory, rcRenaming, rcPath, rcNull );
-    if ( from [ 0 ] == 0 || to [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcRenaming, rcPath, rcInvalid );
-
-    if ( self -> read_only )
-        return RC ( rcFS, rcDirectory, rcRenaming, rcDirectory, rcReadonly );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . rename ) ( self, force, from, to );
-    }
-
-    return RC ( rcFS, rcDirectory, rcRenaming, rcInterface, rcBadVersion );
-}
-
-/* Remove
- *  remove an accessible object from its directory
- *
- *  "force" [ IN ] - if non-zero and target is a directory,
- *  remove recursively
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-LIB_EXPORT rc_t CC KDirectoryRemove_v1 ( KDirectory_v1 *self, bool force, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVRemove ( self, force, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVRemove ( KDirectory_v1 *self, bool force, const char *path, va_list args )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcRemoving, rcSelf, rcNull );
-
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcRemoving, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcRemoving, rcPath, rcInvalid );
-
-    if ( self -> read_only )
-        return RC ( rcFS, rcDirectory, rcRemoving, rcDirectory, rcReadonly );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . remove ) ( self, force, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcRemoving, rcInterface, rcBadVersion );
-}
-
-/* ClearDir
- *  remove all directory contents
- *
- *  "force" [ IN ] - if non-zero and directory entry is a
- *  sub-directory, remove recursively
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- */
-LIB_EXPORT rc_t CC KDirectoryClearDir_v1 ( KDirectory_v1 *self, bool force, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVClearDir ( self, force, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVClearDir ( KDirectory_v1 *self, bool force, const char *path, va_list args )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcRemoving, rcSelf, rcNull );
-
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcRemoving, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcRemoving, rcPath, rcInvalid );
-
-    if ( self -> read_only )
-        return RC ( rcFS, rcDirectory, rcRemoving, rcDirectory, rcReadonly );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . clear_dir ) ( self, force, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcRemoving, rcInterface, rcBadVersion );
-}
-
-/* Access
- *  get access to object
- *
- *  "access" [ OUT ] - return parameter for Unix access mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-LIB_EXPORT rc_t CC KDirectoryAccess_v1 ( const KDirectory_v1 *self,
-    uint32_t *access, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVAccess ( self, access, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVAccess ( const KDirectory_v1 *self,
-    uint32_t *access, const char *path, va_list args )
-{
-    if ( access == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcParam, rcNull );
-
-    * access = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcSelf, rcNull );
-
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcInvalid );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . access ) ( self, access, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcBadVersion );
-}
-
-/* SetAccess
- *  set access to object a la Unix "chmod"
- *
- *  "recurse" [ IN ] - if non zero and "path" is a directory,
- *  apply changes recursively.
- *
- *  "access" [ IN ] and "mask" [ IN ] - definition of change
- *  where "access" contains new bit values and "mask defines
- *  which bits should be changed.
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-LIB_EXPORT rc_t CC KDirectorySetAccess_v1 ( KDirectory_v1 *self, bool recurse,
-    uint32_t access, uint32_t mask, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVSetAccess ( self, recurse,
-        access, mask, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVSetAccess ( KDirectory_v1 *self, bool recurse,
-    uint32_t access, uint32_t mask, const char *path, va_list args )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcUpdating, rcSelf, rcNull );
-
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcInvalid );
-
-    if ( self -> read_only )
-        return RC ( rcFS, rcDirectory, rcUpdating, rcDirectory, rcReadonly );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        /* TBD - perhaps limit bits to lower 9 */
-        return ( * self -> vt -> v1 . set_access )
-            ( self, recurse, access, mask, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcUpdating, rcInterface, rcBadVersion );
-}
-
-/* Date
- *  get date/time to object
- *
- *  "date" [ OUT ] - return parameter
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-LIB_EXPORT rc_t CC KDirectoryDate_v1 ( const KDirectory_v1 *self,
-    KTime_t *date, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVDate ( self, date, path, args );
-    va_end ( args );
-
-    return rc;
-}
-LIB_EXPORT rc_t CC KDirectoryVDate ( const KDirectory_v1 *self,
-    KTime_t *date, const char *path, va_list args )
-{
-    if ( date == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcParam, rcNull );
-
-    * date = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcSelf, rcNull );
-
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcInvalid );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        if ( self -> vt -> v1 . min >= 1 )
-            return ( * self -> vt -> v1 . date ) ( self, date, path, args );
-        break;
-    }
-
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcBadVersion );
-}
-
-
-/* SetDate
- *  set date to object
- *
- *  "recurse" [ IN ] - if non zero and "path" is a directory,
- *  apply changes recursively.
- *
- *  "date" [ IN ] - new time and date for the object
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-LIB_EXPORT rc_t CC KDirectorySetDate_v1 ( KDirectory_v1 *self, bool recurse,
-    KTime_t date, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVSetDate ( self, recurse,
-			      date, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVSetDate ( KDirectory_v1 *self, bool recurse,
-    KTime_t date, const char *path, va_list args )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcUpdating, rcSelf, rcNull );
-
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcInvalid );
-
-    if ( self -> read_only )
-        return RC ( rcFS, rcDirectory, rcUpdating, rcDirectory, rcReadonly );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        /* TBD - perhaps limit bits to lower 9 */
-        if ( self -> vt -> v1 . min >= 1 )
-            return ( * self -> vt -> v1 . setdate ) ( self, recurse, date, path, args );
-        break;
-    }
-
-    return RC ( rcFS, rcDirectory, rcUpdating, rcInterface, rcBadVersion );
-}
-
-
-/* CreateAlias
- *  creates a path alias according to create mode
- *
- *  "access" [ IN ] - standard Unix directory access mode
- *  used when "mode" has kcmParents set and alias path does
- *  not exist.
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "targ" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target alias
- */
-LIB_EXPORT rc_t CC KDirectoryCreateAlias_v1 ( KDirectory_v1 *self,
-    uint32_t access, KCreateMode mode,
-    const char *targ, const char *alias )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcUpdating, rcSelf, rcNull );
-
-    if ( targ == NULL || alias == NULL )
-        return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcNull );
-    if ( targ [ 0 ] == 0 || alias [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcInvalid );
-
-    if ( self -> read_only )
-        return RC ( rcFS, rcDirectory, rcUpdating, rcDirectory, rcReadonly );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . create_alias )
-            ( self, access, mode, targ, alias );
-    }
-
-    return RC ( rcFS, rcDirectory, rcUpdating, rcInterface, rcBadVersion );
-}
-
-/* OpenFileRead
- *  opens an existing file with read-only access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT rc_t CC KDirectoryOpenFileRead_v1 ( const KDirectory_v1 *self,
-    struct KFile const **f, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVOpenFileRead ( self, f, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVOpenFileRead ( const KDirectory_v1 *self,
-    struct KFile const **f, const char *path, va_list args )
-{
-    if ( f == NULL )
-        return RC ( rcFS, rcDirectory, rcOpening, rcFile, rcNull );
-
-    * f = NULL;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcOpening, rcSelf, rcNull );
-
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcInvalid );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . open_file_read ) ( self, f, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcOpening, rcInterface, rcBadVersion );
-}
-
-/* OpenFileWrite
- *  opens an existing file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT rc_t CC KDirectoryOpenFileWrite_v1 ( KDirectory_v1 *self,
-    struct KFile **f, bool update, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVOpenFileWrite ( self, f, update, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVOpenFileWrite ( KDirectory_v1 *self,
-    struct KFile **f, bool update, const char *path, va_list args )
-{
-    if ( f == NULL )
-        return RC ( rcFS, rcDirectory, rcOpening, rcFile, rcNull );
-
-    * f = NULL;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcOpening, rcSelf, rcNull );
-
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcInvalid );
-
-
-    if ( self -> read_only )
-        return RC ( rcFS, rcDirectory, rcOpening, rcDirectory, rcReadonly );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . open_file_write )
-            ( self, f, update, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcOpening, rcInterface, rcBadVersion );
-}
-
-/* CreateFile
- *  opens a file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT rc_t CC KDirectoryCreateFile_v1 ( KDirectory_v1 *self, struct KFile **f,
-    bool update, uint32_t access, KCreateMode mode, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVCreateFile ( self, f, update,
-        access, mode, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVCreateFile ( KDirectory_v1 *self, struct KFile **f,
-    bool update, uint32_t access, KCreateMode mode, const char *path, va_list args )
-{
-    if ( f == NULL )
-        return RC ( rcFS, rcDirectory, rcCreating, rcFile, rcNull );
-
-    * f = NULL;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcCreating, rcSelf, rcNull );
-
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcInvalid );
-
-
-    if ( self -> read_only )
-        return RC ( rcFS, rcDirectory, rcCreating, rcDirectory, rcReadonly );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . create_file )
-            ( self, f, update, access, mode, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcCreating, rcInterface, rcBadVersion );
-}
-
-/* FileLocator
- *  returns locator in bytes of target file
- *
- *  "locator" [ OUT ] - return parameter for file locator
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT rc_t CC KDirectoryFileLocator_v1 ( const KDirectory_v1 *self,
-    uint64_t *locator, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVFileLocator ( self, locator, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVFileLocator ( const KDirectory_v1 *self,
-    uint64_t *locator, const char *path, va_list args )
-{
-    if ( locator == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcParam, rcNull );
-
-    * locator = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcSelf, rcNull );
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcInvalid );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        if ( self -> vt -> v1 . min >= 2 )
-            return ( * self -> vt -> v1 . file_locator ) ( self, locator, path, args );
-        break;
-    }
-
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcBadVersion );
-}
-
-/* FileSize
- *  returns size in bytes of target file
- *
- *  "size" [ OUT ] - return parameter for file size
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT rc_t CC KDirectoryFileSize_v1 ( const KDirectory_v1 *self,
-    uint64_t *size, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVFileSize ( self, size, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVFileSize ( const KDirectory_v1 *self,
-    uint64_t *size, const char *path, va_list args )
-{
-    if ( size == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcParam, rcNull );
-
-    * size = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcSelf, rcNull );
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcInvalid );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . file_size ) ( self, size, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcBadVersion );
-}
-
-/* FilePhysicalSize
- *  returns size in bytes of target file
- *
- *  "size" [ OUT ] - return parameter for file size
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT rc_t CC KDirectoryFilePhysicalSize_v1 ( const KDirectory_v1 *self,
-    uint64_t *size, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVFilePhysicalSize ( self, size, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVFilePhysicalSize ( const KDirectory_v1 *self,
-    uint64_t *size, const char *path, va_list args )
-{
-    if ( size == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcParam, rcNull );
-
-    * size = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcSelf, rcNull );
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcInvalid );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        if ( self -> vt -> v1 . min >= 3 )
-            return ( * self -> vt -> v1 . file_phys_size ) ( self, size, path, args );
-        break;
-    }
-
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcBadVersion );
-}
-
-/* SetFileSize
- *  sets size in bytes of target file
- *
- *  "size" [ IN ] - new file size
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT rc_t CC KDirectorySetFileSize_v1 ( KDirectory_v1 *self,
-    uint64_t size, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVSetFileSize ( self, size, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVSetFileSize ( KDirectory_v1 *self,
-    uint64_t size, const char *path, va_list args )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcUpdating, rcSelf, rcNull );
-
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcInvalid );
-
-    if ( self -> read_only )
-        return RC ( rcFS, rcDirectory, rcUpdating, rcDirectory, rcReadonly );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . set_size ) ( self, size, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcBadVersion );
-}
-
-/* FileContiguous
- *  returns true if the file is "contiguous".  Chunked or sparse files are not
- *  contiguous while most data files are.  Virtual generated files would likely
- *  not be contiguous.  
- *
- *  "contiguous" [ OUT ] - return parameter for file contiguous
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT rc_t CC KDirectoryFileContiguous_v1 ( const KDirectory_v1 *self,
-    bool *contiguous, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVFileContiguous ( self, contiguous, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVFileContiguous ( const KDirectory_v1 *self,
-    bool *contiguous, const char *path, va_list args )
-{
-    if ( contiguous == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcParam, rcNull );
-
-    * contiguous = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcSelf, rcNull );
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcInvalid );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        if ( self -> vt -> v1 . min >= 3 )
-            return ( * self -> vt -> v1 . file_contiguous ) ( self, contiguous, path, args );
-        break;
-    }
-
-    return RC ( rcFS, rcDirectory, rcAccessing, rcInterface, rcBadVersion );
-}
-
-/* OpenDirRead
- * KDirectoryOpenDirUpdate
- *  opens a sub-directory
- *
- *  "chroot" [ IN ] - if non-zero, the new directory becomes
- *  chroot'd and will interpret paths beginning with '/'
- *  relative to itself.
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- */
-LIB_EXPORT rc_t CC KDirectoryOpenDirRead_v1 ( const KDirectory_v1 *self,
-    const KDirectory_v1 **sub, bool chroot, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVOpenDirRead ( self, sub, chroot, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVOpenDirRead ( const KDirectory_v1 *self,
-    const KDirectory_v1 **sub, bool chroot, const char *path, va_list args )
-{
-    if ( sub == NULL )
-        return RC ( rcFS, rcDirectory, rcOpening, rcDirectory, rcNull );
-
-    * sub = NULL;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcOpening, rcSelf, rcNull );
-
-    if ( path == NULL || path [ 0 ] == 0 )
-        path = ".";
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . open_dir_read )
-            ( self, sub, chroot, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcOpening, rcInterface, rcBadVersion );
-}
-
-LIB_EXPORT rc_t CC KDirectoryOpenDirUpdate_v1 ( KDirectory_v1 *self,
-    KDirectory_v1 **sub, bool chroot, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVOpenDirUpdate ( self, sub, chroot, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVOpenDirUpdate ( KDirectory_v1 *self,
-    KDirectory_v1 **sub, bool chroot, const char *path, va_list args )
-{
-    if ( sub == NULL )
-        return RC ( rcFS, rcDirectory, rcOpening, rcDirectory, rcNull );
-
-    * sub = NULL;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcOpening, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        /* TODO: Maybe for writing wncbi-vdb we need to return RC */
-        return SILENT_RC ( rcFS, rcDirectory, rcOpening, rcDirectory, rcReadonly );
-
-    if ( path == NULL || path [ 0 ] == 0 )
-        path = ".";
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . open_dir_update )
-            ( self, sub, chroot, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcOpening, rcInterface, rcBadVersion );
-}
-
-/* CreateDir
- *  create a sub-directory
- *
- *  "access" [ IN ] - standard Unix directory mode, e.g.0775
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- */
-LIB_EXPORT rc_t CC KDirectoryCreateDir_v1 ( KDirectory_v1 *self,
-    uint32_t access, KCreateMode mode, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVCreateDir ( self, access, mode, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryVCreateDir ( KDirectory_v1 *self,
-    uint32_t access, KCreateMode mode, const char *path, va_list args )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcCreating, rcSelf, rcNull );
-
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcInvalid );
-
-    if ( self -> read_only )
-        return RC ( rcFS, rcDirectory, rcCreating, rcDirectory, rcReadonly );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . create_dir ) ( self, access, mode, path, args );
-    }
-
-    return RC ( rcFS, rcDirectory, rcCreating, rcInterface, rcBadVersion );
-}
-
-/* Init
- *  initialize a newly allocated directory object
- */
-LIB_EXPORT rc_t CC KDirectoryInit_v1 ( KDirectory_v1 *self, const KDirectory_vt *vt,
-    const char * class_name, const char * path, bool update )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcDirectory, rcConstructing, rcSelf, rcNull );
-    if ( vt == NULL )
-        return RC ( rcFS, rcDirectory, rcConstructing, rcInterface, rcNull );
-    switch ( vt -> v1 . maj )
-    {
-    case 0:
-        return RC ( rcFS, rcDirectory, rcConstructing, rcInterface, rcInvalid );
-    case 1:
-        switch ( vt -> v1 . min )
-        {
-            /* ADD NEW MINOR VERSION CASES HERE */
-        case 3:
-#if _DEBUGGING
-            if ( vt -> v1 . file_phys_size == NULL )
-                return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcNull );
-#endif
-            /* no break */
-        case 2:
-#if _DEBUGGING
-            if ( vt -> v1 . file_locator == NULL )
-                return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcNull );
-#endif
-            /* no break */
-        case 1:
-#if _DEBUGGING
-            if ( vt -> v1 . get_sysdir == NULL      ||
-                 vt -> v1 . setdate == NULL         ||
-                 vt -> v1 . date == NULL )
-                return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcNull );
-#endif
-            /* no break */
-        case 0:
-#if _DEBUGGING
-            /* vt -> v1 . destroy_file CAN be NULL */
-            if ( vt -> v1 . create_dir == NULL      ||
-                 vt -> v1 . open_dir_update == NULL ||
-                 vt -> v1 . open_dir_read == NULL   ||
-                 vt -> v1 . set_size == NULL        ||
-                 vt -> v1 . file_size == NULL       ||
-                 vt -> v1 . create_file == NULL     ||
-                 vt -> v1 . open_file_write == NULL ||
-                 vt -> v1 . open_file_read == NULL  ||
-                 vt -> v1 . create_alias == NULL    ||
-                 vt -> v1 . set_access == NULL      ||
-                 vt -> v1 . access == NULL          ||
-                 vt -> v1 . clear_dir == NULL       ||
-                 vt -> v1 . remove == NULL          ||
-                 vt -> v1 . rename == NULL          ||
-                 vt -> v1 . resolve_alias == NULL   ||
-                 vt -> v1 . resolve_path == NULL    ||
-                 vt -> v1 . path_type == NULL       ||
-                 vt -> v1 . visit_update == NULL    ||
-                 vt -> v1 . visit == NULL           ||
-                 vt -> v1 . list_dir == NULL        ||
-                 vt -> v1 . destroy == NULL )
-                return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcNull );
-#endif
-            break;
-        default:
-            return RC ( rcFS, rcDirectory, rcConstructing, rcInterface, rcBadVersion );
-        }
-        break;
-    default:
-        return RC ( rcFS, rcDirectory, rcConstructing, rcInterface, rcBadVersion );
-    }
-
-    self -> vt = vt;
-    self -> read_only = ( uint8_t ) ( update == 0 );
-
-
-    KRefcountInit ( &self->refcount, 1, class_name, "init", path );
-
-    return 0;
-}
-
-/* DestroyFile
- *  does whatever is necessary with an unreferenced file
- */
-LIB_EXPORT rc_t CC KDirectoryDestroyFile_v1 ( const KDirectory_v1 *self, KFile *f )
-{
-    const KDirectory_vt *vt = self -> vt;
-    switch ( vt -> v1 . maj )
-    {
-    case 1:
-        if ( vt -> v1 . destroy_file != NULL )
-            return ( * vt -> v1 . destroy_file ) ( ( KDirectory_v1* ) self, f );
-        return KFileDestroy_v1 ( f );
-    }
-
-    return RC ( rcFS, rcDirectory, rcDestroying, rcInterface, rcBadVersion );
-}
-
-/* GetSysDir
- *  returns an underlying system file object
- */
-LIB_EXPORT struct KSysDir_v1* CC KDirectoryGetSysDir_v1 ( const KDirectory_v1 *self )
-{
-    if ( self != NULL )
-    {
-        switch ( self -> vt -> v1 . maj )
-        {
-        case 1:
-            if ( self -> vt -> v1 . min > 0 )
-                return ( * self -> vt -> v1 . get_sysdir ) ( self );
-            break;
-        }
-    }
-    return NULL;
-}
-
-
-static rc_t copy_loop( const KFile *src, KFile *dst, size_t bsize )
-{
-    rc_t rc = 0;
-    uint64_t pos = 0;
-    size_t num_read = 1;
-
-    char * buffer = malloc( bsize );
-    if ( buffer == NULL )
-        return RC( rcFS, rcDirectory, rcCopying, rcMemory, rcExhausted );
-
-    while ( rc == 0 && num_read > 0 )
-    {
-        rc = KFileRead ( src, pos, buffer, bsize, &num_read );
-        if ( rc == 0 && num_read > 0 )
-        {
-            size_t num_writ;
-            rc = KFileWrite ( dst, pos, buffer, num_read, &num_writ );
-            pos += num_read;
-        }
-    }
-    free( buffer );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryCopyPath ( const KDirectory_v1 *src_dir,
-    KDirectory_v1 *dst_dir, const char *src_path, const char * dst_path )
-{
-    rc_t rc;
-    struct KFile const *f_src;
-
-    if ( src_dir == NULL || dst_dir == NULL )
-        return RC ( rcFS, rcDirectory, rcCopying, rcSelf, rcNull );
-    if ( src_path == NULL || dst_path == NULL )
-        return RC ( rcFS, rcDirectory, rcCopying, rcParam, rcNull );
-
-    rc = KDirectoryOpenFileRead ( src_dir, &f_src, "%s", src_path );
-    if ( rc == 0 )
-    {
-        uint32_t pt = KDirectoryPathType ( dst_dir, "%s", dst_path );
-        switch( pt )
-        {
-            case kptFile : ; /* intentional fall through! */
-            case kptDir  : rc = KDirectoryRemove ( dst_dir, true, "%s", dst_path ); break;
-        }
-        if ( rc == 0 )
-        {
-            struct KFile *f_dst;
-            uint32_t access = 0664;
-            rc = KDirectoryCreateFile ( dst_dir, &f_dst, false, access, kcmCreate, "%s", dst_path );
-            if ( rc == 0 )
-            {
-                rc = copy_loop( f_src, f_dst, 1024 * 16 );
-            }
-        }
-    }
-    return rc;
-}
-
-
-static rc_t build_obj_path( char **s, const char *path, const char * objname )
-{
-    rc_t rc;
-    size_t lp = string_size( path );
-    size_t l = lp + string_size( objname ) + 2;
-    *s = malloc( l );
-    if ( *s == NULL )
-        rc = RC( rcFS, rcDirectory, rcCopying, rcMemory, rcExhausted );
-    else
-    {
-        size_t written;
-        const char * concat = ( ( path[ lp - 1 ] == '/' ) ? "%s%s" : "%s/%s" );
-        rc = string_printf( *s, l, &written, concat, path, objname );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryCopyPaths( const KDirectory_v1 * src_dir,
-    KDirectory_v1 * dst_dir, bool recursive, const char *src, const char *dst )
-{
-    rc_t rc;
-    struct KNamelist *list;
-
-    if ( src_dir == NULL || dst_dir == NULL )
-        return RC ( rcFS, rcDirectory, rcCopying, rcSelf, rcNull );
-    if ( src == NULL || dst == NULL )
-        return RC ( rcFS, rcDirectory, rcCopying, rcParam, rcNull );
-
-    rc = KDirectoryList ( src_dir, &list, NULL, NULL, "%s", src );
-    if ( rc == 0 )
-    {
-        uint32_t pt = KDirectoryPathType ( dst_dir, "%s", dst );
-        /* if the output-directory does not exist: create it! */
-        switch( pt )
-        {
-            case kptFile : rc = KDirectoryRemove ( dst_dir, true, "%s", dst );
-                            /* intentially no break ! */
-
-            case kptNotFound : if ( rc == 0 )
-                                    rc = KDirectoryCreateDir ( dst_dir, 0775, kcmCreate | kcmParents, "%s", dst );
-                               break;
-        }
-        if ( rc == 0 )
-        {
-            uint32_t i, n;
-            rc = KNamelistCount ( list, &n );
-            for ( i = 0; i < n && rc == 0; ++i )
-            {
-                const char *name;
-                rc = KNamelistGet ( list, i, &name );
-                if ( rc == 0 )
-                {
-                    char *src_obj;
-                    rc = build_obj_path( &src_obj, src, name );
-                    if ( rc == 0 )
-                    {
-                        char *dst_obj;
-                        rc = build_obj_path( &dst_obj, dst, name );
-                        if ( rc == 0 )
-                        {
-                            pt = KDirectoryPathType ( src_dir, "%s", src_obj );
-                            switch( pt )
-                            {
-                                case kptFile : rc = KDirectoryCopyPath ( src_dir, dst_dir, src_obj, dst_obj );
-                                               break;
-
-                                case kptDir  : if ( recursive )
-                                                    rc = KDirectoryCopyPaths( src_dir, dst_dir, true, src_obj, dst_obj );
-                                               break;
-                            }
-                            free( dst_obj );
-                        }
-                        free( src_obj );
-                    }
-                }
-            }
-        }
-        KNamelistRelease ( list );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryCopy( const KDirectory_v1 * src_dir,
-    KDirectory_v1 * dst_dir, bool recursive, const char *src, const char *dst )
-{
-    rc_t rc = 0;
-    uint32_t pt;
-
-    if ( src_dir == NULL || dst_dir == NULL )
-        return RC ( rcFS, rcDirectory, rcCopying, rcSelf, rcNull );
-    if ( src == NULL || dst == NULL )
-        return RC ( rcFS, rcDirectory, rcCopying, rcParam, rcNull );
-
-    pt = KDirectoryPathType ( src_dir, "%s", src );
-    switch( pt )
-    {
-        case kptFile : rc = KDirectoryCopyPath ( src_dir, dst_dir, src, dst );
-                        break;
-        case kptDir  : rc = KDirectoryCopyPaths ( src_dir, dst_dir, recursive, src, dst );
-                        break;
-    }
-    return rc;
-}
diff --git a/libs/kfs/extendable-ramfile.c b/libs/kfs/extendable-ramfile.c
deleted file mode 100644
index ae0e699..0000000
--- a/libs/kfs/extendable-ramfile.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <kfs/extern.h>
-
-#include <kfs/extendable-ramfile.h>
-#include <kfs/file.h>
-
-#include <klib/rc.h>
-
-#include <sysalloc.h>
-
-#include <string.h>
-
-/* ======================================================================
- * KExtendableRamFile
- */
-
-/* -----
- * define the specific types to be used in the templatish/inheritancish
- * definition of vtables and their elements
- */
-typedef struct KExtendableRamFile KExtendableRamFile;
-#define KFILE_IMPL struct KExtendableRamFile
-#include <kfs/impl.h>
-
-/*-----------------------------------------------------------------------
- * KExtendableRamFile
- *  A KFile that puts reads and writes into a buffer.
- *  The buffer can be realloced if necessary.
- */
-struct KExtendableRamFile {
-    KFile	dad;
-
-    uint64_t pos;
-    size_t   bsize;
-    char *   buffer;
-};
-
-/* ----------------------------------------------------------------------
- * Destroy
- *
- */
-static
-rc_t CC KExtendableRamFileDestroy (KExtendableRamFile *self)
-{
-    free(self->buffer);
-    memset(self, 0, sizeof *self);
-    free(self);
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or RAM if
- *  no such file is available.
- *
- * We cant allow memory mapping a tee file as the read?writes ar needed
- * to trigger the writes to the copy KFile
- */
-
-static struct KSysFile *CC KExtendableRamFileGetSysFile(
-    const KExtendableRamFile *self, uint64_t *offset)
-{
-    return NULL;
-}
-
-/* ----------------------------------------------------------------------
- * RandomAccess
- *
- *  returns 0 if random access, error code otherwise
- *
- * Update needs to be able to seek both original and copy while read
- * only needs to be able to seek the original.
- */
-static rc_t CC KExtendableRamFileRandomAccess (const KExtendableRamFile *self) {
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KExtendableRamFileType (const KExtendableRamFile *self)
-{
-    return kfdNull;
-}
-
-
-/* ----------------------------------------------------------------------
- * Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KExtendableRamFileSize (const KExtendableRamFile *self, uint64_t *size)
-{
-    assert (self != NULL);
-    assert (size != NULL);
-
-    *size = self->pos;
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KExtendableRamFileSetSize(KExtendableRamFile *self, uint64_t size)
-{
-    return RC(rcFS, rcFile, rcUpdating, rcFunction, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, RAM OKAY ] - optional return parameter
- *  giving number of bytes actually read
- *
- * NOTE: Can not seek;
- *
- */
-static rc_t CC KExtendableRamFileRead(const KExtendableRamFile *self,
-    uint64_t pos, void *buffer, size_t bsize, size_t *num_read)
-{
-    assert (self);
-    assert (buffer);
-    assert (num_read);
-    /* no restrictions on pos or bsize */
-
-    if (pos >= self->pos)
-    {
-        *num_read = 0;
-        return 0;
-    }
-
-    if (pos + bsize > self->pos)
-        bsize = self->pos - pos;
-
-    memcpy(buffer, self->buffer + pos, bsize);
-
-    *num_read = bsize;
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, RAM OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- * Always accepts writes and can seek.
- */
-static rc_t CC KExtendableRamFileWrite(KExtendableRamFile *self,
-    uint64_t pos, const void *buffer, size_t bsize, size_t *num_writ)
-{
-    assert (self);
-    assert (buffer);
-    assert (num_writ);
-
-    /* if buffer big enough? */
-    if (self->pos + bsize > self->bsize)
-    {
-        char *tmp = NULL;
-        size_t req = self->bsize;
-        while (req < self->pos + bsize) {
-            req += self->bsize;
-        }
-        tmp = realloc(self->buffer, req);
-        if (tmp == NULL) {
-            return RC(rcFS, rcFile, rcWriting, rcMemory, rcExhausted);
-        }
-        self->buffer = tmp;
-        self->bsize = req;
-    }
-
-    memcpy(self->buffer + self->pos, buffer, bsize);
-    self->pos += bsize;
-    *num_writ = bsize;
-
-    return 0;
-}
-
-static const KFile_vt_v1 vtKExtendableRamFile =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KExtendableRamFileDestroy,
-    KExtendableRamFileGetSysFile,
-    KExtendableRamFileRandomAccess,
-    KExtendableRamFileSize,
-    KExtendableRamFileSetSize,
-    KExtendableRamFileRead,
-    KExtendableRamFileWrite,
-
-    /* 1.1 */
-    KExtendableRamFileType
-};
-
-/* ----------------------------------------------------------------------
- * KExtendableRamFileMake
- *  create a new file object
- */
-LIB_EXPORT rc_t CC KExtendableRamFileMake(KFile **pself) {
-    size_t buffer_size = 1; /* TODO: set it to something good */
-    rc_t rc = 0;
-    KExtendableRamFile *self = NULL;
-
-    if (pself == NULL)
-        return RC(rcFS, rcFile, rcConstructing, rcSelf, rcNull);
-
-    if (buffer_size == 0)
-        ++buffer_size;
-
-    /* ----- get space for the object */
-    self = calloc(1, sizeof *self);
-    if (self == NULL) {
-        return RC(rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-    }
-    self->buffer = calloc(1, buffer_size);
-    if (self->buffer == NULL) {
-        free(self);
-        return RC(rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-    }
-    rc = KFileInit(&self->dad,			/* initialize base class */
-        (const KFile_vt*)&vtKExtendableRamFile,/*VTable for KExtendableRamFile*/
-        "KExtendableRamFile", "ExtendableRAM", true, true);
-    if (rc != 0) {
-        free(self->buffer);
-        free(self);
-        return rc;
-    }
-    self->bsize = buffer_size;
-    *pself = &self->dad;
-    return 0;
-}
diff --git a/libs/kfs/ffext.c b/libs/kfs/ffext.c
deleted file mode 100644
index a290ca7..0000000
--- a/libs/kfs/ffext.c
+++ /dev/null
@@ -1,812 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-#include <klib/rc.h>
-#include <kfs/file.h>
-#include <klib/text.h>
-#include <klib/log.h>
-#include <klib/container.h>
-#include <kfs/fileformat.h>
-#include "fileformat-priv.h"
-struct KExtFileFormat;
-#define KFILEFORMAT_IMPL struct KExtFileFormat
-#include "impl.h"
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <stdio.h>
-
-struct KDirectory;
-
-typedef
-struct KExtNode
-{
-    BSTNode		node;
-    atomic32_t 		refcount;
-    KFileFormatType	typeid;
-    size_t		kfflen;
-    size_t		extlen;
-    char *		extdescr;
-    char		kffdescr [1];
-} KExtNode;
-
-static
-rc_t KExtNodeDestroy (const KExtNode * cself)
-{
-    rc_t rc = 0;
-    KExtNode * self = (KExtNode*)cself;
-
-    FUNC_ENTRY();
-
-    if (self == NULL)
-    {
-	rc = RC (rcFF, rcIndex, rcDestroying, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "KExtNodeDestroy: self == NULL");
-    }
-    else
-    {
-
-        /* memory leak?  do we need to release KFFTables? */
-
-
-	free (self);
-    }
-    return rc;
-}
-
-static
-rc_t KExtNodeRelease (const KExtNode * cself)
-{
-    rc_t rc = 0;
-    FUNC_ENTRY();
-
-    if (cself != NULL)
-    {
-        KExtNode *self = (KExtNode*)cself;
-        if (atomic32_dec_and_test (&self->refcount))
-            return  KExtNodeDestroy (cself);
-    }
-    return rc;
-}
-/* not used at this time */
-#if 0
-static
-rc_t KExtNodeAddRef (const KExtNode * self)
-{
-    rc_t rc = 0;
-    FUNC_ENTRY();
-
-    if (self != NULL)
-        atomic32_inc (&((KFileFormat*)self)->refcount);
-    return rc;
-}
-#endif
-static
-rc_t KExtNodeMake (KExtNode ** kmmp, const KFFTables * tables,
-		     const char * extdescr, size_t extlen,
-		     const char * kffdescr, size_t kfflen)
-
-{
-    KExtNode * self;
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-
-    if (extdescr == NULL)
-    {
-	rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcNull);
-	LOGERR (klogErr, rc, "KExtNodeMake: extdescr == NULL");
-    }
-    else if (kffdescr == NULL)
-    {
-	rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcNull);
-	LOGERR (klogErr, rc, "KKffNodeMake: kffdescr == NULL");
-    }
-    else
-    {
-	if (extlen > DESCRLEN_MAX)
-	{
-	    rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcInvalid);
-	    LOGERR (klogErr, rc, "KExtNodeMake: extdescr too long");
-	}
-	else if (extlen == 0)
-	{
-	    rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcEmpty);
-	    LOGERR (klogErr, rc, "KExtNodeMake: extdescr too short");
-	}
-	else if (kfflen > DESCRLEN_MAX)
-	{
-	    rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcInvalid);
-	    LOGERR (klogErr, rc, "KKffNodeMake: kffdescr too long");
-	}
-	else if (kfflen == 0)
-	{
-	    rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcEmpty);
-	    LOGERR (klogErr, rc, "KKffNodeMake: kffdescr too short");
-	}
-	else
-	{
-	    KFileFormatType typeid;
-	    rc = KFFTablesGetTypeId (tables, kffdescr, &typeid, NULL);
-	    if (rc == 0)
-	    {
-		self = malloc (sizeof (*self) + extlen + kfflen + 1);
-		if (self == NULL)
-		{
-		    rc = RC (rcFF,  rcIndex, rcConstructing, rcMemory, rcExhausted);
-		    LOGERR (klogErr, rc, "KExtNodeMake: self could not be allocated");
-		}
-		else
-		{
-		    atomic32_set (&self->refcount,1);
-		    self->typeid = typeid;
-		    self->kfflen = kfflen;
-		    self->extlen = extlen;
-		    self->extdescr = self->kffdescr + kfflen + 1;
-		    memcpy (self->kffdescr, kffdescr, kfflen);
-		    memcpy (self->extdescr, extdescr, extlen);
-		    self->kffdescr[self->kfflen] = '\0';
-		    self->extdescr[self->extlen] = '\0';
-		    *kmmp = self;
-		    return 0;
-		}
-	    }
-	}
-    }
-    return rc;
-}
-
-
-/* -------------------------
- *
- */
-typedef
-struct KExtTable
-{
-    atomic32_t 	refcount;
-    BSTree	tree;
-} KExtTable;
-
-static
-void KExtNodeWhack (BSTNode * n, void * ignored)
-{
-    FUNC_ENTRY();
-
-    (void)KExtNodeRelease((KExtNode*)n);
-}
-static
-rc_t KExtTableDestroy (KExtTable * cself)
-{
-    rc_t rc;
-    KExtTable * self;
-
-    FUNC_ENTRY();
-
-    rc = 0;
-    self = (KExtTable*)cself;
-    if (self == NULL)
-    {
-	rc = RC (rcFF, rcTable, rcDestroying, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "KExtTableDestroy: self == NULL");
-    }
-    else
-    {
-	BSTreeWhack (&self->tree, KExtNodeWhack, NULL);
-	free (self);
-    }
-    return rc;
-}
-static
-rc_t KExtTableRelease (const KExtTable * cself)
-{
-    rc_t rc = 0;
-    FUNC_ENTRY();
-
-    if (cself != NULL)
-    {
-	KExtTable *self = (KExtTable*)cself;
-        if (atomic32_dec_and_test (&self->refcount))
-	    return  KExtTableDestroy (self);
-    }
-    return rc;
-}
-#if 0
-static /* not used at this time */
-rc_t KExtTableAddRef (const KExtTable * self)
-{
-    rc_t rc = 0;
-    FUNC_ENTRY();
-
-    if (self != NULL)
-        atomic32_inc (& ((KFileFormat*) self)->refcount);
-    return rc;
-}
-#endif
-static
-rc_t KExtTableMake (KExtTable ** kmmtp)
-{
-    KExtTable * self;
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    self = malloc (sizeof *self);
-    if (self == NULL)
-    {
-        rc = RC (rcFF, rcTable, rcConstructing, rcParam, rcNull);
-        LOGERR (klogErr, rc, "KExtTableMake: self could not be allocated");
-    }
-    else
-    {
-        atomic32_set (&self->refcount,1);
-        BSTreeInit (&self->tree);
-        *kmmtp = self;
-    }
-    return rc;
-}
-
-static
-int64_t KExtNodeCmp (const void* item, const BSTNode * n)
-{
-    size_t len;
-    KExtNode * mn = (KExtNode *)n;
-    String *s = ( String * ) item;
-
-    FUNC_ENTRY();
-
-    /* -----
-     * we only check this many characters of the comparison item
-     * we need only this part to match and ignore characters after
-     * this in the comparison string
-     */
-    len = mn->extlen;
-    return strcase_cmp ( s -> addr, s -> len , mn->extdescr, len, len );
-}
-
-static
-rc_t KExtTableFind (KExtTable * self, KExtNode ** node, const char * str)
-{
-    rc_t rc = 0;
-    String s;
-
-    FUNC_ENTRY();
-
-    StringInitCString ( &s, str );
-
-    *node = (KExtNode*)BSTreeFind (&self->tree, &s, KExtNodeCmp);
-    if (*node == NULL)
-    {
-/* 	rc = RC (rcFF, rcTable, rcSearching, rcNode, rcNotFound); */
-        KFF_DEBUG (("%s: Could not find %s\n", __func__, str));
-    }
-    return rc;
-}
-/* maxlen includes the terminating NUL */
-#if 0 /* not in use at this time */
-static
-rc_t KExtTableFindKFFDescr (KExtTable * self, const char * str, char * kff, size_t maxlen)
-{
-    rc_t rc;
-    KExtNode * np;
-
-    FUNC_ENTRY();
-
-
-    if (self == NULL)
-    {
-	rc = RC (rcFF, rcFileFormat, rcSearching, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "KExtTableFindKFFDecr:self == NULL");
-	return rc;
-    }
-    if (str == NULL)
-    {
-	rc = RC (rcFF, rcFileFormat, rcSearching, rcParam, rcNull);
-	LOGERR (klogErr, rc, "KExtTableFindKFFDecr: searchstring is NULL");
-	return rc;
-    }
-    if (kff == NULL)
-    {
-	rc = RC (rcFF, rcFileFormat, rcSearching, rcParam, rcNull);
-	LOGERR (klogErr, rc, "KExtTableFindKFFDecr: found storage is NULL");
-	return rc;
-    }
-    rc = KExtTableFind (self, &np, str);
-    if (maxlen <= np->kfflen) /* kfflen does not include NUL */
-    {
-	rc = RC (rcFF, rcFileFormat, rcSearching, rcParam, rcTooLong);
-	LOGERR (klogErr, rc, "KExtTableFindKFFDecr: found storage is NULL");
-	return rc;
-    }
-    memcpy (kff, np->kffdescr, np->kfflen);
-    kff[np->kfflen] = '\0';
-    return rc;
-}
-#endif
-static
-int64_t KExtNodeSort (const BSTNode* item, const BSTNode * n)
-{
-    KExtNode *n1 = ( KExtNode * ) item;
-    KExtNode *n2 = ( KExtNode * ) n;
-
-    FUNC_ENTRY();
-
-    return strcase_cmp ( n1 -> extdescr, n1 -> extlen, 
-                         n2 -> extdescr, n2 -> extlen, n2 -> extlen );
-}
-static
-rc_t KExtTableInsert (KExtTable * self, KExtNode *node)
-{
-
-    FUNC_ENTRY();
-
-    return (BSTreeInsert (&self->tree, &node->node, KExtNodeSort));
-}
-/* not is use at this time */
-#if 0
-static
-rc_t KExtTableBufferRead (KExtTable * self, KFFTables * tables,
-			    const char * buff, size_t bufflen)
-{
-    rc_t rc = 0;
-    const char * kff;
-    const char * ext;
-    const char * nl;
-    size_t kfflen;
-    size_t extlen;
-
-
-    FUNC_ENTRY();
-
-
-    /* -----
-     * until we get all the way through the buffer
-     * which by this coding could actually be all blank
-     */
-    while (bufflen)
-    {
-	ext = buff;
-	/* -----
-	 * allow leading white space including blank lines
-	 */
-	if (isspace (*ext))	
-	{
-	    buff++;
-	    bufflen --;
-	    continue;
-	}
-	/* -----
-	 * not a comment line so find the tab splitting the sections
-	 */
-	kff = memchr (ext, '\t', bufflen);
-	if (kff == NULL)
-	{
-	    /* couldn't find it so blae the document and quit */
-	bad_line:
-	    rc = RC (rcFF, rcBuffer, rcParsing, rcFormat, rcCorrupt);
-	    /* log error */
-	    bufflen = 0;
-	    continue;
-	}
-	/* -----
-	 * the ext portion of the line is from the first non-white space
-	 * through the character before the tab.
-	 */
-	extlen = kff - ext;
-	bufflen -= extlen + 1;
-	kff++; /* point past the tab */
-	while (bufflen) /* skip white space */
-	{
-	    if (*kff == '\n') /* end of line now is a format error */
-	    {
-		goto bad_line;
-	    }
-	    if (!isspace (*kff)) /* break at non shite space character */
-		break;
-	    bufflen --;
-	    kff ++;
-	}
-	if (bufflen == 0) /* no kff descr */
-	    goto bad_line;
-	nl = memchr (kff, '\n', bufflen);
-	if (nl == NULL) /* no EOL but last line in buffer */
-	{
-	    kfflen = bufflen;
-	    bufflen = 0;
-	}
-	else /* not last unfinished line */
-	{
-	    kfflen = nl - ext;
-	    bufflen -= kfflen + 1;
-	    buff = nl + 1;
-	}
-	{
-	    KExtNode * np;
-	    rc = KExtNodeMake (&np, tables, ext, extlen,
-				 kff, kfflen);
-	    if (rc != 0)
-	    {
-		/* LOG ERR */
-		break;
-	    }
-	}
-    }
-    ( break;
-	    }
-	}
-    }
-    return rc;
-}
-#endif
-/* not used at this time */
-#if 0
-LIB_EXPORT rc_t CC KExtTableRead (KExtTable * self, const KFile * file))
-{
-    rc_t rc = 0;
-    /* setup KMMap */
-    /* call KExtTableBufferRead */
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KExtTableWrite (const KExtTable * self, KFile * file)
-{
-    rc_t rc = 0;
-
-    return rc;
-}
-#endif
-/* -----
- * format is
- * whitechar := {' '|'\f'|'\t'|'\v'}
- * whitespace := whitechar*
- * ext-str = !whitespace!{'\t'|'\n'}*
- * kff-str = !whitespace!{'\t'|'\n'}*
- *
- * A line is 
- * [<whitespace>]#<comment line skipped>\n
- * Or 
- * [<whitespace>]<ext-str>\t[<whitespace>]<kff-str>\n
- * Or
- * [<whitespace>]\n
- *
- * NOTE: whitespace at the right end of the two strings is included in the strings
- * NOTE: We do not look for '\v'|'\f' within the strings though we maybe should
- * NOTE: the ext string definitely allows white space and punctuation
- */
-static
-rc_t KExtTableInit (KExtTable * self, const KFFTables * tables, const char * buffer, size_t len)
-{
-    rc_t rc = 0;
-    const char * ext;
-    const char * kff;
-    const char * tab;
-    const char * newline;
-    const char * line;
-    const char * limit;
-    KExtNode * node;
-    
-    FUNC_ENTRY();
-    
-    /* moved this block of code from the bottom of the function
-       to assure that this node is always created */
-	char unknown[] = "Unknown";
-    
-	rc = KExtNodeMake (&node, tables, unknown, sizeof (unknown) - 1, unknown, sizeof (unknown) - 1);
-	if (rc != 0)
-	{
-	    LOGERR (klogFatal, rc, "Failure to make node");
-        return rc;
-	}
-
-    rc = KExtTableInsert(self, node);
-    if (rc != 0)
-    {
-        LOGERR (klogFatal, rc, "Failure to insert node");
-	    return rc;
-	}
-    
-    /* -----
-     * we try to go all the way through the buffer line by line
-     * which by this coding could actually be all blank
-     */
-    limit = buffer + len;
-    for (line = buffer; line < limit; line = newline+1)
-    {
-        for (ext = line; isspace (*ext); ext++, len--)
-        {
-            if (len == 0) /* last of the file was all whitespace so quit */
-                break;
-        }
-        newline = memchr (ext, '\n', len);
-        if (newline == NULL)
-            newline = ext + len;
-        /* -----
-         * If the first character on the line is #
-         * we treat it as a comment (matches sh/bash/libext/etc.
-         */
-        if (*ext == '#')
-        {
-            /* -----
-             * skip this line
-             */
-            len -= newline+1 - ext;
-            continue;
-        }
-        
-        tab = memchr (ext, '\t', len);
-        if (tab == NULL)
-        {
-            rc = RC (rcFF, rcFileFormat, rcConstructing, rcFile, rcInvalid);
-            LOGERR (klogFatal, rc, "No <TAB> between ext and kff");
-            break;
-        }
-        kff = tab + 1;
-        for (len -= kff - ext;
-             isspace (*kff);
-             len--, kff++)
-        {
-            if (len == 0)
-            {
-                rc = RC (rcFF, rcFileFormat, rcConstructing, rcFile, rcInvalid);
-                LOGERR (klogFatal, rc, "No kff after <TAB>");
-                break;
-            }
-        }
-        if (newline == kff)
-        {
-            rc = RC (rcFF, rcFileFormat, rcConstructing, rcFile, rcInvalid);
-            LOGERR (klogFatal, rc, "No kff after whitespace");
-            break;
-        }
-        len -= newline+1 - kff;
-        rc = KExtNodeMake (&node, tables, ext, tab-ext, kff, newline-kff);
-        if (rc != 0)
-        {
-            LOGERR (klogFatal, rc, "Failure to make node");
-            break;
-        }
-        rc = KExtTableInsert(self, node);
-        if (rc != 0)
-        {
-            LOGERR (klogFatal, rc, "Failure to insert node");
-            break;
-        }
-    }
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KExtFileFormat
- *  a file content (format) categorizer
- */
-
-typedef
-struct KExtFileFormat
-{
-    KFileFormat	  dad;
-    KExtTable * table;
-} KExtFileFormat;
-
-static rc_t KExtFileFormatDestroy (KExtFileFormat *self);
-static rc_t KExtFileFormatGetTypeBuff (const KExtFileFormat *self,
-				       const void * buff, size_t buff_len,
-				       KFileFormatType * type,
-				       KFileFormatClass * class,
-				       char * description,
-				       size_t descriptionmax,
-				       size_t * descriptionlength);
-static rc_t KExtFileFormatGetTypePath (const KExtFileFormat *self,
-				       const struct  KDirectory * dir, const char * path,
-				       KFileFormatType * type,
-				       KFileFormatClass * class,
-				       char * description,
-				       size_t descriptionmax,
-				       size_t * descriptionlength);
-static
-KFileFormat_vt_v1 vt_v1 =
-{
-    1, 1, /* maj, min */
-    KExtFileFormatDestroy,
-    KExtFileFormatGetTypeBuff,
-    KExtFileFormatGetTypePath
-};
-
-
-
-/* Destroy
- *  destroy FileFormat
- */
-static
-rc_t KExtFileFormatDestroy (KExtFileFormat *self)
-{
-    FUNC_ENTRY();
-    rc_t rc = KFFTablesRelease (self->dad.tables);
-    {
-        rc_t rc2 = KExtTableRelease (self->table);
-        if (rc == 0)
-            rc = rc2;
-    }
-    free (self);
-    return 0;
-}
-
-/* Type
- *  returns a KExtFileFormatDesc
- *  [OUT] rc_t               return
- *  [IN]  const KExtFileFormat *  self         
- *  [IN]  void **            buffer       buffer to hold returned description
- *  [IN]  size_t             buffer_size  size of the buffer
- *  [OUT] char **            descr        text description of file type
- *  [IN]  size_t             descr_max    maximum size of string descr can hold
- *  [OUT] size_t *           descr_len    length of returned descr (not including NUL
- */
-static
-rc_t CC KExtFileFormatGetTypeBuff (const KExtFileFormat *self, const void * buff, size_t buff_len,
-				KFileFormatType * type, KFileFormatClass * class,
-				char * descr, size_t descr_max, size_t *descr_len)
-{
-
-    FUNC_ENTRY();
-
-    return RC (rcFF, rcFileFormat, rcSearching, rcFormat, rcUnsupported);
-}
-
-
-static
-rc_t CC KExtFileFormatGetTypePath (const KExtFileFormat *self,
-                                const struct KDirectory * dir_ignored, const char * path,
-                                KFileFormatType * type, KFileFormatClass * class,
-                                char * descr, size_t descr_max, size_t *descr_len)
-{
-    rc_t rc = 0;
-    const char * b;
-    const char * s;
-    size_t size;
-
-
-    FUNC_ENTRY();
-
-
-    if (type != NULL)
-	*type = kfftError;
-    if (class != NULL)
-	*class = kffcError;
-
-    s = strrchr (path, '/');
-    if (s == NULL)
-	s = path;
-
-
-    b = strrchr (s, '.');
-    if (b == NULL)
-	b = path + string_measure(path, &size) - 1; /* will be an empty string when calls KExtTableFind */
-    {
-	KExtNode * node;
-	size_t c;
-
-        KFF_DEBUG (("%s: extension is %s\n", __func__, b+1));
-#if 1
- 	rc = KExtTableFind (self->table, &node, ++b);
-	if (rc == 0)
-	{
-	    KFileFormatClass cid;
-	    KFileFormatType tid;
-	    if (node == NULL)
-		rc = KExtTableFind (self->table, &node, "Unknown");
-	    if (rc == 0)
-		rc = KFFTablesGetTypeId (self->dad.tables, node->kffdescr, &tid, &cid);
-	    if (rc == 0)
-	    {
-		c = node->kfflen;
-		if (c > descr_max)
-		    c = descr_max-1;
-		if (descr)
-		    string_copy (descr, descr_max, node->kffdescr, c);
-		descr[c] = '\0';
-		if (descr_len)
-		    *descr_len = c;
-		if (type)
-		    *type = tid;
-		if (class)
-		    *class = cid;
-	    }
-	}
-	if (rc != 0)
-	{
-	    if (descr_len != NULL)
-		*descr_len = 0;
-	    if (type != NULL)
-		*type = kfftNotFound;
-	    if (class != NULL)
-		*class = kffcNotFound;
-	}	
-
-
-#else
-	size_t l = string_measure (b, &size);
-	if (desc != NULL)
-	{
-	    string_copy (desc, desc_max, b, l);
-	    if (desc_max < l)
-		desc[desc_max-1] = 0;
-	}
-	if (descr_len != NULL)
-	    *descr_len = l;
-	if (type != NULL)
-	    *type = kfftUnknown;
-	if (class != NULL)
-	    *class = kffcUnknown;
-#endif
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KExtFileFormatMake (KFileFormat ** pft,
-			 const char* ext, size_t extlen,
-			 const char * typeAndClass, size_t tclen)
-{
-    rc_t rc = 0;
-    KExtFileFormat * self;
-
-
-    FUNC_ENTRY();
-
-    self = malloc (sizeof * self);
-    if (self == NULL)
-    {
-	rc = RC (rcFF, rcFileFormat, rcAllocating, rcMemory, rcExhausted);
-	LOGERR (klogFatal, rc, "Failed to allocate for KExtFileFormat");
-    }
-    else
-    {
-	rc = KFileFormatInit (&self->dad, (const KFileFormat_vt *)&vt_v1, typeAndClass, tclen);
-	if (rc == 0)
-	{
-	    rc = KExtTableMake (&self->table);
-	    if (rc == 0)
-	    {
-		rc = KExtTableInit (self->table, self->dad.tables, ext, extlen);
-		{
-		    if (rc == 0)
-		    {
-			*pft = &self->dad;
-			return 0;
-		    }
-		}
-		KExtTableRelease (self->table);
-	    }
-	}
-	free (self);
-    }
-    return rc;
-}
-
diff --git a/libs/kfs/ffkey.c b/libs/kfs/ffkey.c
deleted file mode 100644
index 1c7912f..0000000
--- a/libs/kfs/ffkey.c
+++ /dev/null
@@ -1,833 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/container.h>
-#include <kfs/fileformat.h>
-#include <sysalloc.h>
-#include "fileformat-priv.h"
-
-#include <atomic.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* ----------------------------------------------------------------------
- * Private type used only with in this compilation unit.
- */
-typedef
-struct KFFClass
-{
-    BSTNode	node;
-    atomic32_t	refcount;
-    KFileFormatClass	class;		/* scalar ID of the class */
-    size_t	len;		/* length of the descriptor */
-    char 	descr	[1];	/* ASCIZ text description of the class */
-} KFFClass;
-
-static
-rc_t KFFClassDestroy (const KFFClass * cself)
-{
-    rc_t rc;
-    KFFClass * self;
-
-    FUNC_ENTRY();
-
-    rc = 0;
-    self = (KFFClass*)cself;
-    if (cself == NULL)
-    {
-	rc = RC (rcFF, rcIndex, rcDestroying, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "KFFClassDestroy: self == NULL");
-    }
-    else
-    {
-	free (self);
-    }
-    return rc;
-}
-
-static
-rc_t KFFClassRelease (const KFFClass * cself)
-{
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    if (cself != NULL)
-    {
-	KFFClass *self = (KFFClass*)cself;
-        if (atomic32_dec_and_test (&self->refcount))
-	    return  KFFClassDestroy (cself);
-    }
-    return rc;
-}
-/* not used at this time */
-#if 0
-static
-rc_t KFFClassAddRef (const KFFClass * self)
-{
-    rc_t rc = 0; 
-
-    FUNC_ENTRY();
-
-    if (self != NULL)
-        atomic32_inc (&((KFFClass*)self)->refcount);
-    return rc;
-}
-#endif
-static
-rc_t KFFClassMake (KFFClass ** kffcp,	/* pointer to new object */
-		   KFileFormatClass class, /* ID of new class */
-		   const char * descr,	/* description of new class */
-		   size_t len)		/* length of description */
-{
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    if (kffcp == NULL)
-    {
-	rc = RC (rcFF, rcIndex, rcConstructing, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "KFFClassMake: kffkmp == NULL");
-    }
-    else if (descr == NULL)
-    {
-	rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcNull);
-	LOGERR (klogErr, rc, "KFFClassMake: descr == NULL");
-    }
-    else
-    {
-	if (len > DESCRLEN_MAX)
-	{
-/* 	    printf("len %u DESCRLEN_MAX %u\n", len, DESCRLEN_MAX); */
-	    rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcInvalid);
-	    LOGERR (klogErr, rc, "KFFClassMake: descr too long");
-	}
-	else if (len == 0)
-	{
-	    rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcEmpty);
-	    LOGERR (klogErr, rc, "KFFClassMake: descr too short");
-	}
-	else
-	{
-	    KFFClass * self = malloc (sizeof (*self) + len);
-	    if (self == NULL)
-	    {
-		rc = RC (rcFF,  rcIndex, rcConstructing, rcMemory, rcExhausted);
-		LOGERR (klogErr, rc, "KFFClassMake: object could not be allocated");
-	    }
-	    else
-	    {
-		/* self->node needs not be initialized  */
-		atomic32_set (&self->refcount,1);
-		self->class = class;
-		self->len = len;
-		memcpy (self->descr, descr, len);
-		self->descr[self->len] = '\0';
-		*kffcp = self;
-		return 0;
-	    }
-	}
-    }
-    *kffcp = NULL;
-    return rc;
-}
-
-/* -----
- * Private type used only with in this compilation unit.
- */
-typedef
-struct KFFType
-{
-    BSTNode	node;
-    atomic32_t 	refcount;	/* how many open references to this object */
-    KFileFormatType	type;		/* scalar ID of the type */
-    KFileFormatClass	class;		/* scalar ID of the class the type belongs in */
-    size_t	len;		/* length of the descriptor */
-    char 	descr	[1];	/* ASCIZ text description of the type */
-} KFFType;
-
-static
-rc_t KFFTypeDestroy (const KFFType * cself)
-{
-    rc_t rc = 0;
-    KFFType * self = (KFFType*)cself;
-
-    FUNC_ENTRY();
-
-    if (self == NULL)
-    {
-	rc = RC (rcFF, rcIndex, rcDestroying, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "KFFTypeDestroy: self == NULL");
-    }
-    else
-    {
-	free (self);
-    }
-    return rc;
-}
-
-static
-rc_t KFFTypeRelease (const KFFType * cself)
-{
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    if (cself != NULL)
-    {
-	KFFType *self = (KFFType*)cself;
-        if (atomic32_dec_and_test (&self->refcount))
-	    return  KFFTypeDestroy (cself);
-    }
-    return rc;
-}
-/* not used at this time */
-#if 0
-static
-rc_t KFFTypeAddRef (const KFFType * self)
-{
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    if (self != NULL)
-        atomic32_inc (&((KFFType*)self)->refcount);
-    return rc;
-}
-#endif
-static
-rc_t KFFTypeMake (KFFType ** kfftp,
-		  KFileFormatType  type,
-		  KFileFormatClass class,
-		  const char * descr,
-		  size_t len)
-{
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    if (kfftp == NULL)
-    {
-	rc = RC (rcFF, rcIndex, rcConstructing, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "KFFTypeMake: kffkmp == NULL");
-    }
-    else if (descr == NULL)
-    {
-	rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcNull);
-	LOGERR (klogErr, rc, "KFFTypeMake: descr == NULL");
-    }
-    else
-    {
-	if (len > DESCRLEN_MAX)
-	{
-	    rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcInvalid);
-	    LOGERR (klogErr, rc, "KFFTypeMake: descr too long");
-	}
-	else if (len == 0)
-	{
-	    rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcEmpty);
-	    LOGERR (klogErr, rc, "KFFTypeMake: descr too short");
-	}
-	else
-	{
-	    KFFType * self = malloc (sizeof (*self) + len);
-	    if (self == NULL)
-	    {
-		rc = RC (rcFF,  rcIndex, rcConstructing, rcMemory, rcExhausted);
-		LOGERR (klogErr, rc, "KFFTypeMake: object could not be allocated");
-	    }
-	    else
-	    {
-		/* self->node needs not be initialized  */
-		atomic32_set (&self->refcount,1);
-		self->len = len;
-		memcpy (self->descr, descr, len);
-		self->descr[self->len] = '\0';
-		self->type = type;
-		self->class = class;
-		*kfftp = self;
-		return 0;
-	    }
-	}
-    }
-    *kfftp = NULL;
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- *
- * A table will have a descr based bstree for type, a descr based bstree
- * for class,
- *
- * A type indexed and class indexed set of indexes into the same stuff.
- *
- * All table are thus the "node" and pointer to a node.  the same nodes
- * are referred to by the descr based bstree and the linear tables.
- *
- * Linear tables are pre allocated arrays that are increased by chunks.
-*/
-
-struct KFFTables
-{
-    atomic32_t 	refcount;
-    BSTree	classtree;
-    BSTree	typetree;
-    KFFClass **	classindex;
-    KFFType **	typeindex;
-    uint32_t	typecount;
-    uint32_t	classcount;
-    uint32_t	typesize;
-    uint32_t	classsize;
-
-};
-
-static
-void KFFTypeNodeWhack (BSTNode * n, void * ignored)
-{
-    FUNC_ENTRY();
-
-    KFFTypeDestroy ((KFFType*)n);
-}
-static
-void KFFClassNodeWhack (BSTNode * n, void * ignored)
-{
-    FUNC_ENTRY();
-    KFFClassDestroy ((KFFClass*)n);
-}
-static 
-rc_t KFFTablesDestroy (const KFFTables * cself)
-{
-    KFFTables * self = (KFFTables*)cself;
-    rc_t rc = 0;
-/*     uint32_t ix; */
-    FUNC_ENTRY();
-
-    BSTreeWhack (&self->typetree, KFFTypeNodeWhack, NULL);
-    BSTreeWhack (&self->classtree, KFFClassNodeWhack, NULL);
-    if (self->classindex != NULL)
-	free (self->classindex);
-    if (self->typeindex != NULL)
-	free (self->typeindex);
-    free (self);
-    return rc;
-}
-
-rc_t CC KFFTablesRelease (const KFFTables * cself)
-{
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    if (cself != NULL)
-    {
-	KFFTables *self = (KFFTables*)cself;
-        if (atomic32_dec_and_test (&self->refcount))
-	    return  KFFTablesDestroy (self);
-    }
-    return rc;
-}
-
-rc_t CC KFFTablesAddRef (const KFFTables * self)
-{
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    if (self != NULL)
-        atomic32_inc (& ((KFFTables*) self)->refcount);
-    return rc;
-}
-
-/* -----
- * if descr is too short, not NUL terminated, and at the edge of legal memory
- * there is a chance the next two functions could have a segmentation fault
- */
-static
-int64_t classcmp (const void * descr, const BSTNode * n)
-{
-    KFFClass * nn = (KFFClass*)n;
-    return strncmp ((const char *)descr, nn->descr, nn->len);
-}
-static
-int64_t typecmp (const void * descr, const BSTNode * n)
-{
-    KFFType * nn = (KFFType *)n;
-
-    return strncmp ((const char *)descr, nn->descr, nn->len);
-}
-static
-int64_t classsort (const BSTNode * i ,const BSTNode * n)
-{
-    KFFClass * ii = (KFFClass *)i;
-    KFFClass * nn = (KFFClass *)n;
-    return strncmp (ii->descr, nn->descr, nn->len);
-}
-static
-int64_t typesort (const BSTNode * i, const BSTNode * n)
-{
-    KFFType * ii = (KFFType *)i;
-    KFFType * nn = (KFFType *)n;
-    return strncmp (ii->descr, nn->descr, nn->len);
-}
-
-static
-KFFClass * KFFTablesFindKFFClass (KFFTables * self,
-				  const char * descr )
-{
-    BSTNode * pbn;
-    if ((self == NULL) || (descr == NULL))
-	return NULL;
-    pbn = BSTreeFind (&self->classtree, descr, classcmp);
-    return (KFFClass*)pbn;
-}
-static
-KFFType * KFFTablesFindKFFType (KFFTables * self,
-				const char * descr )
-{
-    BSTNode * pbn;
-    FUNC_ENTRY ();
-    if ((self == NULL) || (descr == NULL))
-	return NULL;
-    pbn = BSTreeFind (&self->typetree, descr, typecmp);
-    return (KFFType*)pbn;
-}
-/* Not currently used
-static
-KFileFormatClass KFFTablesFindKFileFormatClass (KFFTables * self,
-						const char * descr )
-{
-    BSTNode * pbn;
-    LOGENTRY (10, "(10, "KFFTablesFindKFileFormatClass"));
-    if ((self == NULL) || (descr == NULL))
-	return kffcError;
-    pbn = BSTreeFind (&self->classtree, descr, classcmp);
-    if (pbn == NULL)
-	return kffcUnknown;
-    return ((KFFClass*)pbn)->class;
-}
-*/
-static
-KFileFormatType KFFTablesFindKFileFormatType (const KFFTables * self,
-					      const char * descr )
-{
-    union
-    {
-	BSTNode * bn;
-	KFFType * kt;
-    } node;
-
-    FUNC_ENTRY();
- 
-    if ((self == NULL) || (descr == NULL))
-    {
-	LOGMSG(klogWarn,"Not Found");
-	return kfftError;
-    }
-    node.bn = BSTreeFind (&self->typetree, descr, typecmp);
-    if (node.bn == NULL)
-    {
-        PLOGMSG(klogWarn,(klogWarn,"Unknown $(D)", PLOG_S(D),descr));
-	return kfftUnknown;
-    }
-
-/*     printf("KFFTablesFindKFileFormatType:\n" */
-/* 	   "\trefcount\t%u\n" */
-/* 	   "\ttype\t\t%u\n" */
-/* 	   "\tclass\t\t%u\n" */
-/* 	   "\tlen\t\t%lu\n" */
-/* 	   "\tdescr\t\t%s\n", */
-/* 	   node.kt->refcount,  */
-/* 	   node.kt->type, */
-/* 	   node.kt->class, */
-/* 	   node.kt->len, */
-/* 	   node.kt->descr); */
-
-    return (node.kt->type);
-}
-
-rc_t CC KFFTablesAddClass (KFFTables * self,
-                           KFileFormatClass * pclassid, /* returned ID: NULL okay */
-                           const char * descr,
-                           size_t len)
-{
-    rc_t rc;
-
-    FUNC_ENTRY();
-
-/*     PLOGMSG ((klogDebug10, "Descr is $(L) $(D)", PLOG_2(PLOG_U32(L),PLOG_S(D)), len,descr)); */
-    rc = 0;
-    if (self == NULL)
-    {
-	rc = -1;
-	LOGERR (klogErr, rc, "Error making type: NULL pointer");
-    }
-    else if (descr == NULL)
-    {
-	rc = -1;
-	LOGERR (klogErr, rc, "Error making type: NULL descr");
-    }
-    else
-    {
-	KFFClass * pclass;
-
-	pclass = KFFTablesFindKFFClass (self, descr);
-	if (pclass != NULL)
-	{
-	    rc = -1;
-	    PLOGERR (klogErr, (klogErr, rc, "Class already inserted <$(d)>", PLOG_S(d),  descr));
-	}
-	else
-	{
-	    /* not thread safe if multiple "creators" */
-	    if (self->classcount * sizeof(KFFClass*) == self->classsize)
-	    {
-		void * vp;
-		self->classsize += 32 * sizeof(KFFClass*);
-		/* realloc will not be undone if anything fails */
-		vp = realloc (self->classindex,self->classsize);
-		if (vp == NULL)
-		{
-		    rc = -1;
-		    LOGERR (klogErr, rc, "Error allocating class table");
-		}
-		self->classindex = vp;
-	    }
-	}
-	if (rc == 0)
-	{
-	    KFileFormatClass cid;
-	    KFFClass * kc;
-	    cid = self->classcount++;
-	    rc = KFFClassMake (&kc, cid, descr, len);
-	    if (rc != 0)
-	    {
-		PLOGERR (klogErr, (klogErr, rc, "Error making class: $(c) $(d)",
-			  PLOG_2(PLOG_U32(c),PLOG_S(d)),
-			  cid, descr));
-	    }
-	    else
-	    {
-		rc = BSTreeInsert (&self->classtree, &kc->node,
-				   classsort);
-		if (rc == 0)
-		{
-		    self->classindex[cid] = kc;
-		    if (pclassid)
-			*pclassid = cid;
-		    return 0;
-		}
-		PLOGERR (klogErr, (klogErr, rc, "Error inserting class $(c) $(d)",
-                                   PLOG_2(PLOG_U32(c),PLOG_S(d)),
-                                   cid, descr));
-		KFFClassRelease (kc);
-	    }
-	    self->classcount--;
-	}
-    }
-    if (pclassid)
-	*pclassid = 0;
-    return rc;
-}
-
-rc_t CC KFFTablesAddType (KFFTables * self,
-                          KFileFormatType * ptype, /* returned new ID */
-                          const char * class,
-                          const char * type,
-                          size_t clen,
-                          size_t tlen)
-{
-    rc_t rc;
-    KFFType * ptn;
-    KFFClass * pcn;
-    KFileFormatClass classid;
-    KFileFormatType pid;
-
-    FUNC_ENTRY();
-
-    rc = 0;
-
-    if (self == NULL)
-    {
-	rc = RC (rcFF, rcFileFormat, rcConstructing, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "Error making type: NULL pointer");
-	goto quickout;
-    }
-    if ((class == NULL)||(type == NULL))
-    {
- 	rc = -1;
-	LOGERR (klogErr, rc, "Error making type: NULL parameter");
-	goto quickout;
-    }
-    ptn = KFFTablesFindKFFType (self, type);
-    pcn = KFFTablesFindKFFClass (self, class);
-    if (ptn != NULL)
-    {
-	rc = -1;
-	PLOGERR (klogErr, (klogErr, rc, "Type already inserted <$(d)>", PLOG_S(d), type));
-	goto quickout;
-    }
-
-    if (pcn == NULL)
-    {
-	rc = KFFTablesAddClass (self, &classid, class, clen);
-	if (rc != 0)
-	{
-	    PLOGERR (klogErr, (klogErr, rc, "unable to insert new class <$(d)>", PLOG_S(d), class));
-	    goto quickout;
-	}
-    }
-    else
-    {
-	classid = pcn->class;
-    }
-
-    /* not thread safe if multiple "creators" */
-    if (self->typecount * sizeof(KFFType*) == self->typesize)
-    {
-	void * vp;
-	self->typesize += 32 * sizeof(KFFType*);
-	/* realloc will not be undone of anything fails */
-	vp = realloc (self->typeindex,self->typesize);
-	if (vp == NULL)
-	{
-	    rc = -1;
-	    LOGERR (klogErr, rc, "Error allocating type table");
-	    goto quickout;
-	}
-	self->typeindex = vp;
-
-    }
-    pid = self->typecount++;
-    rc = KFFTypeMake (&ptn, pid, classid, type, tlen);
-    if (rc != 0)
-    {
-	PLOGERR (klogErr, (klogErr, rc, "Error making type: $(c) $(d)",
-                           PLOG_2(PLOG_I32(c),PLOG_S(d)),
-                           pid, type));
-    }
-    else
-    {
-	rc = BSTreeInsert (&self->typetree, &ptn->node, typesort);
-	if (rc == 0)
-	{
-	    self->typeindex[pid] = ptn;
-	    if (ptype)
-		*ptype = pid;
-	    return 0;
-	}
-	KFFTypeRelease (ptn);
-    }
-    self->typecount--;
-
-quickout:
-    if (ptype)
-	*ptype = 0;
-    return rc;
-}
-
-rc_t CC KFFTablesMake (KFFTables ** kmmtp)
-{
-    KFFTables * self;
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    self = calloc (1,sizeof *self); /* we need it zeroed */
-    if (self == NULL)
-    {
-	rc = RC (rcFF, rcTable, rcConstructing, rcParam, rcNull);
-	LOGERR (klogErr, rc, "KFFTablesMake: self could not be allocated");
-    }
-    else
-    {
-/* 	uint32_t unknown; */
-/* calloc does all this
-	self->typecount = self->typesize = self->classcount = 
-	    self->classsize = 0;
-	KFFClass = NULL;
-	KFFType = NULL;
-*/
-/* might not want to count on BSTreeInit to set to zero and nothing else */
-	BSTreeInit (&self->typetree);
-	BSTreeInit (&self->classtree);
-	atomic32_set (&self->refcount,1);
-	/* initialize the tables to have an unknown class and unknown type */
-#if 1
-/* is this wise? */
-	rc = KFFTablesAddType (self, NULL, "Unknown", "Unknown", 7, 7);
-	if (rc == 0)
-	{
-	    *kmmtp = self;
-	    return 0;
-	}
-#else
-	rc = KFFTablesAddClass (self, &unknown,
-				"Unknown", 7);
-	if (rc == 0)
-	{
-	    uint32_t u;
-	    rc = KFFTablesAddType (self, &u, unknown,
-				   "Unknown", 7);
-	    if (rc == 0)
-	    {
-		*kmmtp = self;
-		return 0;
-	    }
-	}
-#endif
-	KFFTablesRelease (self);
-    }
-    return rc;
-}
-
-rc_t CC KFFTablesGetClassDescr (const KFFTables * self,
-                                KFileFormatClass tid,
-                                size_t * len,
-                                char ** pd)
-{
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    *pd = NULL;
-    *len = 0;
-    if (self == NULL)
-    {
-	rc = RC (rcFF, rcTable, rcAccessing, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "KFFTablesGetClassDescr: self is Null");
-    }
-    else
-    {
-	if ( ( tid < 0 )||( (uint32_t)tid > self->classcount ) )
-	{
-	    rc = RC (rcFF, rcTable, rcAccessing, rcParam, rcNotFound);
-	    LOGERR (klogErr, rc, "KFFTablesGetClassDescr: class ID out of range");
-	}
-	else
-	{
-	    *pd = self->classindex[tid]->descr;
-	    *len = self->classindex[tid]->len;
-	}
-    }
-    return rc;
-}
-
-rc_t CC KFFTablesGetTypeDescr (const KFFTables * self,
-                               KFileFormatType tid,
-                               size_t * len,
-                               char ** pd)
-{
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    *pd = NULL;
-    *len = 0;
-    if (self == NULL)
-    {
-	rc = RC (rcFF, rcTable, rcAccessing, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "KFFTablesGetTypeDescr: self is Null");
-    }
-    else
-    {
-	if ( (uint32_t)tid > self->typecount )
-	{
-	    rc = RC (rcFF, rcTable, rcAccessing, rcParam, rcNotFound);
-	    LOGERR (klogErr, rc, "KFFTablesGetTypeDescr: type ID out of range");
-	}
-	else
-	{
-	    *pd = self->typeindex[tid]->descr;
-	    *len = self->typeindex[tid]->len;
-	}
-    }
-    return rc;
-}
-
-/* not currently used and incomplete
-rc_t KFFTablesGetClassId (const KFFTables * self,
-			  const char ** pd,
-			  KFileFormatClass * cid)
-{
-    rc_t rc;
-
-    FUNC_ENTRY();
-
-    rc = 0;
-    *cid = 0;
-    if (self == NULL)
-    {
-	rc = RC (rcFF, rcTable, rcAccessing, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "KFFTablesGetClassId: self is Null");
-    }
-    else
-    {
-    }
-    return rc;
-}
-*/
-rc_t CC KFFTablesGetTypeId (const KFFTables * self,
-                            const char * pd,
-                            KFileFormatType * tid,
-                            KFileFormatClass * cid)
-{
-    rc_t rc;
-
-    FUNC_ENTRY();
-
-    rc = 0;
-    *tid = 0;
-    if (self == NULL)
-    {
-	rc = RC (rcFF, rcTable, rcAccessing, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "KFFTablesGetTypeId: self is Null");
-    }
-    else
-    {
-	KFileFormatType tt;
-	tt = KFFTablesFindKFileFormatType (self, pd);
-	if (tt > 0)
-	{
-	    if (tid)
-		*tid = tt;
-	    if (cid)
-		*cid = self->typeindex[tt]->class;
-	}
-	else
-	{
-	    if (tid)
-		*tid = tt;
-	    if (cid)
-		*cid = tt; /* same fail values */
-	}
-    }
-    return rc;
-}
diff --git a/libs/kfs/ffmagic.c b/libs/kfs/ffmagic.c
deleted file mode 100644
index 9ec34b8..0000000
--- a/libs/kfs/ffmagic.c
+++ /dev/null
@@ -1,969 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-#include <magic.h>
-#include <klib/rc.h>
-#include <kfs/file.h>
-#include <klib/text.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/container.h>
-#include <kfs/directory.h>
-#include <kfs/fileformat.h>
-#include <kfg/config.h>
-#include <sysalloc.h>
-#include "fileformat-priv.h"
-struct KMagicFileFormat;
-#define KFILEFORMAT_IMPL struct KMagicFileFormat
-#include "impl.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <stdio.h>
-
-typedef
-struct KMagicNode
-{
-    BSTNode		node;
-    atomic32_t 		refcount;
-    KFileFormatType	typeid;
-    size_t		kfflen;
-    size_t		magiclen;
-    char *		magicdescr;
-    char		kffdescr [1];
-} KMagicNode;
-
-static
-rc_t KMagicNodeDestroy (const KMagicNode * cself)
-{
-    rc_t rc;
-    KMagicNode * self;
-
-    FUNC_ENTRY();
-
-    rc = 0;
-    self = (KMagicNode*)cself;
-
-    if (self == NULL)
-    {
-	rc = RC (rcFF, rcIndex, rcDestroying, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "KMagicNodeDestroy: self == NULL");
-    }
-    else
-    {
-	free (self);
-    }
-    return rc;
-}
-
-static
-rc_t KMagicNodeRelease (const KMagicNode * cself)
-{
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    if (cself != NULL)
-    {
-        KMagicNode *self = (KMagicNode*)cself;
-        if (atomic32_dec_and_test (&self->refcount))
-            return  KMagicNodeDestroy (cself);
-    }
-    return rc;
-}
-/* not used at this time */
-#if 0
-static
-rc_t KMagicNodeAddRef (const KMagicNode * self)
-{
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    if (self != NULL)
-        atomic32_inc (&((KFileFormat*)self)->refcount);
-    return rc;
-}
-#endif
-static
-rc_t KMagicNodeMake (KMagicNode ** kmmp, const KFFTables * tables,
-		     const char * magicdescr, size_t magiclen,
-		     const char * kffdescr, size_t kfflen)
-
-{
-    KMagicNode * self;
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    if (magicdescr == NULL)
-    {
-	rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcNull);
-	LOGERR (klogErr, rc, "KMagicNodeMake: magicdescr == NULL");
-    }
-    else if (kffdescr == NULL)
-    {
-	rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcNull);
-	LOGERR (klogErr, rc, "KKffNodeMake: kffdescr == NULL");
-    }
-    else
-    {
-	if (magiclen > DESCRLEN_MAX)
-	{
-	    rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcInvalid);
-	    LOGERR (klogErr, rc, "KMagicNodeMake: magicdescr too long");
-	}
-	else if (magiclen == 0)
-	{
-	    rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcEmpty);
-	    LOGERR (klogErr, rc, "KMagicNodeMake: magicdescr too short");
-	}
-	else if (kfflen > DESCRLEN_MAX)
-	{
-	    rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcInvalid);
-	    LOGERR (klogErr, rc, "KKffNodeMake: kffdescr too long");
-	}
-	else if (kfflen == 0)
-	{
-	    rc = RC (rcFF, rcIndex, rcConstructing, rcParam, rcEmpty);
-	    LOGERR (klogErr, rc, "KKffNodeMake: kffdescr too short");
-	}
-	else
-	{
-	    KFileFormatType typeid;
-	    rc = KFFTablesGetTypeId (tables, kffdescr, &typeid, NULL);
-	    if (rc == 0)
-	    {
-		self = malloc (sizeof (*self) + magiclen + kfflen + 1);
-		if (self == NULL)
-		{
-		    rc = RC (rcFF,  rcIndex, rcConstructing, rcMemory, rcExhausted);
-		    LOGERR (klogErr, rc, "KMagicNodeMake: self could not be allocated");
-		}
-		else
-		{
-		    atomic32_set (&self->refcount,1);
-		    self->typeid = typeid;
-		    self->kfflen = kfflen;
-		    self->magiclen = magiclen;
-		    self->magicdescr = self->kffdescr + kfflen + 1;
-		    memcpy (self->kffdescr, kffdescr, kfflen);
-		    memcpy (self->magicdescr, magicdescr, magiclen);
-		    self->kffdescr[self->kfflen] = '\0';
-		    self->magicdescr[self->magiclen] = '\0';
-		    *kmmp = self;
-		    return 0;
-		}
-	    }
-	}
-    }
-    return rc;
-}
-
-
-/* -------------------------
- *
- */
-typedef
-struct KMagicTable
-{
-    atomic32_t 	refcount;
-    BSTree	tree;
-} KMagicTable;
-
-static
-void KMagicNodeWhack (BSTNode * n, void * ignored)
-{
-    FUNC_ENTRY();
-
-    (void)KMagicNodeRelease((KMagicNode*)n);
-}
-static
-rc_t KMagicTableDestroy (KMagicTable * cself)
-{
-    rc_t rc;
-    KMagicTable * self;
-
-    FUNC_ENTRY();
-
-    rc = 0;
-    self = (KMagicTable*)cself;
-    if (self == NULL)
-    {
-	rc = RC (rcFF, rcTable, rcDestroying, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "KMagicTableDestroy: self == NULL");
-    }
-    else
-    {
-	BSTreeWhack (&self->tree, KMagicNodeWhack, NULL);
-	free (self);
-    }
-    return rc;
-}
-static
-rc_t KMagicTableRelease (const KMagicTable * cself)
-{
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    if (cself != NULL)
-    {
-	KMagicTable *self = (KMagicTable*)cself;
-        if (atomic32_dec_and_test (&self->refcount))
-	    return  KMagicTableDestroy (self);
-    }
-    return rc;
-}
-#if 0
-static /* not used at this time */
-rc_t KMagicTableAddRef (const KMagicTable * self)
-{
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    if (self != NULL)
-        atomic32_inc (& ((KFileFormat*) self)->refcount);
-    return rc;
-}
-#endif
-static
-rc_t KMagicTableMake (KMagicTable ** kmmtp)
-{
-    KMagicTable * self;
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    self = malloc (sizeof *self);
-    if (self == NULL)
-    {
-        rc = RC (rcFF, rcTable, rcConstructing, rcParam, rcNull);
-        LOGERR (klogErr, rc, "KMagicTableMake: self could not be allocated");
-    }
-    else
-    {
-        atomic32_set (&self->refcount,1);
-        BSTreeInit (&self->tree);
-        *kmmtp = self;
-    }
-    return rc;
-}
-
-static
-int64_t KMagicNodeCmp (const void* item, const BSTNode * n)
-{
-    size_t len;
-    KMagicNode * mn = (KMagicNode *)n;
-
-    FUNC_ENTRY();
-
-    /* -----
-     * we only check this many characters of the comparison item
-     * we need only this part to match and ignore characters after
-     * this in the comparison string
-     */
-    len = mn->magiclen;
-    return strncmp (item, mn->magicdescr, len);
-}
-
-static
-rc_t KMagicTableFind (KMagicTable * self, KMagicNode ** node, const char * str)
-{
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    *node = (KMagicNode*)BSTreeFind (&self->tree, str, KMagicNodeCmp);
-    if (*node == NULL)
-    {
-/* 	rc = RC (rcFF, rcTable, rcSearching, rcNode, rcNotFound); */
-        KFF_DEBUG (("%s: Could not find %s\n", __func__, str));
-    }
-    return rc;
-}
-/* maxlen includes the terminating NUL */
-#if 0 /* not in use at this time */
-static
-rc_t KMagicTableFindKFFDescr (KMagicTable * self, const char * str, char * kff, size_t maxlen)
-{
-    rc_t rc;
-    KMagicNode * np;
-
-    FUNC_ENTRY();
-
-    if (self == NULL)
-    {
-	rc = RC (rcFF, rcFileFormat, rcSearching, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "KMagicTableFindKFFDecr:self == NULL");
-	return rc;
-    }
-    if (str == NULL)
-    {
-	rc = RC (rcFF, rcFileFormat, rcSearching, rcParam, rcNull);
-	LOGERR (klogErr, rc, "KMagicTableFindKFFDecr: searchstring is NULL");
-	return rc;
-    }
-    if (kff == NULL)
-    {
-	rc = RC (rcFF, rcFileFormat, rcSearching, rcParam, rcNull);
-	LOGERR (klogErr, rc, "KMagicTableFindKFFDecr: found storage is NULL");
-	return rc;
-    }
-    rc = KMagicTableFind (self, &np, str);
-    if (maxlen <= np->kfflen) /* kfflen does not include NUL */
-    {
-	rc = RC (rcFF, rcFileFormat, rcSearching, rcParam, rcTooLong);
-	LOGERR (klogErr, rc, "KMagicTableFindKFFDecr: found storage is NULL");
-	return rc;
-    }
-    memcpy (kff, np->kffdescr, np->kfflen);
-    kff[np->kfflen] = '\0';
-    return rc;
-}
-#endif
-static
-int64_t KMagicNodeSort (const BSTNode* item, const BSTNode * n)
-{
-    const char * str1;
-    const char * str2;
-
-    FUNC_ENTRY();
-
-    str1 = ((KMagicNode *)item)->magicdescr;
-    str2 = ((KMagicNode *)n)->magicdescr;
-    return strcmp (str1, str2);
-}
-static
-rc_t KMagicTableInsert (KMagicTable * self, KMagicNode *node)
-{
-    FUNC_ENTRY();
-
-    return (BSTreeInsert (&self->tree, &node->node, KMagicNodeSort));
-}
-/* not is use at this time */
-#if 0
-
-static
-rc_t KMagicTableBufferRead (KMagicTable * self, KFFTables * tables,
-			    const char * buff, size_t bufflen)
-{
-    rc_t rc = 0;
-    const char * kff;
-    const char * magic;
-    const char * nl;
-    size_t kfflen;
-    size_t magiclen;
-
-    FUNC_ENTRY();
-
-
-    /* -----
-     * until we get all the way through the buffer
-     * which by this coding could actually be all blank
-     */
-    while (bufflen)
-    {
-	magic = buff;
-	/* -----
-	 * allow leading white space including blank lines
-	 */
-	if (isspace (*magic))	
-	{
-	    buff++;
-	    bufflen --;
-	    continue;
-	}
-	/* -----
-	 * not a comment line so find the tab splitting the sections
-	 */
-	kff = memchr (magic, '\t', bufflen);
-	if (kff == NULL)
-	{
-	    /* couldn't find it so blae the document and quit */
-	bad_line:
-	    rc = RC (rcFF, rcBuffer, rcParsing, rcFormat, rcCorrupt);
-	    /* log error */
-	    bufflen = 0;
-	    continue;
-	}
-	/* -----
-	 * the magic portion of the line is from the first non-white space
-	 * through the character before the tab.
-	 */
-	magiclen = kff - magic;
-	bufflen -= magiclen + 1;
-	kff++; /* point past the tab */
-	while (bufflen) /* skip white space */
-	{
-	    if (*kff == '\n') /* end of line now is a format error */
-	    {
-		goto bad_line;
-	    }
-	    if (!isspace (*kff)) /* break at non shite space character */
-		break;
-	    bufflen --;
-	    kff ++;
-	}
-	if (bufflen == 0) /* no kff descr */
-	    goto bad_line;
-	nl = memchr (kff, '\n', bufflen);
-	if (nl == NULL) /* no EOL but last line in buffer */
-	{
-	    kfflen = bufflen;
-	    bufflen = 0;
-	}
-	else /* not last unfinished line */
-	{
-	    kfflen = nl - magic;
-	    bufflen -= kfflen + 1;
-	    buff = nl + 1;
-	}
-	{
-	    KMagicNode * np;
-	    rc = KMagicNodeMake (&np, tables, magic, magiclen,
-				 kff, kfflen);
-	    if (rc != 0)
-	    {
-		/* LOG ERR */
-		break;
-	    }
-	}
-    }
-    ( break;
-	    }
-	}
-    }
-    return rc;
-}
-#endif
-
-/* not used at this time */
-#if 0
-LIB_EXPORT rc_t CC KMagicTableRead (KMagicTable * self, const KFile * file))
-{
-    rc_t rc = 0;
-    /* setup KMMap */
-    /* call KMagicTableBufferRead */
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMagicTableWrite (const KMagicTable * self, KFile * file)
-{
-    rc_t rc = 0;
-
-    return rc;
-}
-#endif
-
-/* -----
- * format is
- * whitechar := {' '|'\f'|'\t'|'\v'}
- * whitespace := whitechar*
- * magic-str = !whitespace!{'\t'|'\n'}*
- * kff-str = !whitespace!{'\t'|'\n'}*
- *
- * A line is 
- * [<whitespace>]#<comment line skipped>\n
- * Or 
- * [<whitespace>]<magic-str>\t[<whitespace>]<kff-str>\n
- * Or
- * [<whitespace>]\n
- *
- * NOTE: whitespace at the right end of the two strings is included in the strings
- * NOTE: We do not look for '\v'|'\f' within the strings though we maybe should
- * NOTE: the magic string definitely allows white space and punctuation
- */
-static
-rc_t KMagicTableInit (KMagicTable * self, const KFFTables * tables, const char * buffer, size_t len)
-{
-    rc_t rc;
-    const char * magic;
-    const char * kff;
-    const char * tab;
-    const char * newline;
-    const char * line;
-    const char * limit;
-    KMagicNode * node;
-
-    FUNC_ENTRY();
-
-    rc = 0;
-
-    /* -----
-     * we try to go all the way through the buffer line by line
-     * which by this coding could actually be all blank
-     */
-    limit = buffer + len;
-    for (line = buffer; line < limit; line = newline+1)
-    {
-	for (magic = line; isspace (*magic); magic++, len--)
-	{
-	    if (len == 0) /* last of the file was all whitespace so quit */
-		break;
-	}
-	newline = memchr (magic, '\n', len);
-	if (newline == NULL)
-	    newline = magic + len;
-	/* -----
-	 * If the first character on the line is #
-	 * we treat it as a comment (matches sh/bash/libmagic/etc.
-	 */
-	if (*magic == '#')
-	{
-	    /* -----
-	     * skip this line
-	     */
-	    len -= newline+1 - magic;
-	    continue;
-	}
-	
-	tab = memchr (magic, '\t', len);
-	if (tab == NULL)
-	{
-	    rc = RC (rcFF, rcFileFormat, rcConstructing, rcFile, rcInvalid);
-	    LOGERR (klogFatal, rc, "No <TAB> between magic and kff");
-	    break;
-	}
-	kff = tab + 1;
-	for (len -= kff - magic;
-	     isspace (*kff);
-	     len--, kff++)
-	{
-	    if (len == 0)
-	    {
-		rc = RC (rcFF, rcFileFormat, rcConstructing, rcFile, rcInvalid);
-		LOGERR (klogFatal, rc, "No kff after <TAB>");
-		break;
-	    }
-	}
-	if (newline == kff)
-	{
-	    rc = RC (rcFF, rcFileFormat, rcConstructing, rcFile, rcInvalid);
-	    LOGERR (klogFatal, rc, "No kff after whitespace");
-	    break;
-	}
-	len -= newline+1 - kff;
- 	rc = KMagicNodeMake (&node, tables, magic, tab-magic, kff, newline-kff);
-	if (rc != 0)
-	{
-	    LOGERR (klogFatal, rc, "Failure to make node");
-	    break;
-	}
-	rc = KMagicTableInsert(self, node);
-	if (rc != 0)
-	{
-	    LOGERR (klogFatal, rc, "Failure to insert node");
-	    break;
-	}
-    }
-    if (rc == 0)
-    {
-	char unknown[] = "Unknown";
-
-	rc = KMagicNodeMake (&node, tables, unknown, sizeof (unknown) - 1, unknown, sizeof (unknown) - 1);
-	if (rc != 0)
-	{
-	    LOGERR (klogFatal, rc, "Failure to make node");
-	}
-	else
-	{
-	    rc = KMagicTableInsert(self, node);
-	    if (rc != 0)
-	    {
-		LOGERR (klogFatal, rc, "Failure to insert node");
-	    }
-	}
-    }
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KMagicFileFormat
- *  a file content (format) categorizer
- */
-
-typedef
-struct KMagicFileFormat
-{
-    KFileFormat	  dad;
-    magic_t 	  cookie;
-    KMagicTable * table;
-} KMagicFileFormat;
-
-static rc_t KMagicFileFormatDestroy (KMagicFileFormat *self);
-static rc_t KMagicFileFormatGetTypeBuff (const KMagicFileFormat *self,
-					 const void * buff, size_t buff_len,
-					 KFileFormatType * type,
-					 KFileFormatClass * class,
-					 char * description,
-					 size_t descriptionmax,
-					 size_t * descriptionlength);
-static rc_t KMagicFileFormatGetTypePath (const KMagicFileFormat *self,
-					 const KDirectory * dir,
-					 const char * path,
-					 KFileFormatType * type,
-					 KFileFormatClass * class,
-					 char * description,
-					 size_t descriptionmax,
-					 size_t * descriptionlength);
-static
-KFileFormat_vt_v1 vt_v1 =
-{
-    1, 1, /* maj, min */
-    KMagicFileFormatDestroy,
-    KMagicFileFormatGetTypeBuff,
-    KMagicFileFormatGetTypePath
-};
-
-
-
-/* Destroy
- *  destroy FileFormat
- */
-static
-rc_t KMagicFileFormatDestroy (KMagicFileFormat *self)
-{
-    FUNC_ENTRY();
-
-    rc_t rc = KMagicTableRelease (self->table);
-    magic_close (self->cookie);
-    {
-        rc_t rc2 = KFFTablesRelease (self->dad.tables);
-        if ( rc == 0 )
-            rc = rc2;
-    }
-    free (self);
-    return rc;
-}
-
-/* Type
- *  returns a KMagicFileFormatDesc
- *  [OUT] rc_t               return
- *  [IN]  const KMagicFileFormat *  self         
- *  [IN]  void **            buffer       buffer to hold returned description
- *  [IN]  size_t             buffer_size  size of the buffer
- *  [OUT] char **            descr        text description of file type
- *  [IN]  size_t             descr_max    maximum size of string descr can hold
- *  [OUT] size_t *           descr_len    length of returned descr (not including NUL
- */
-static
-rc_t KMagicFileFormatGetTypePath (const KMagicFileFormat *self, const KDirectory * dir, const char * path,
-				  KFileFormatType * type, KFileFormatClass * class,
-				  char * descr, size_t descr_max, size_t *descr_len)
-{
-    rc_t rc = 0;
-    uint8_t	buff	[8192];
-    size_t	bytes_read;
-
-    rc = KDirectoryAddRef (dir);
-    if (rc == 0)
-    {
-	const KFile * file;
-	rc = KDirectoryOpenFileRead (dir, &file, "%s", path);
-	if (rc == 0)
-	{
-	    rc = KFileRead (file, 0, buff, sizeof buff, &bytes_read);
-	    {
-		rc = KMagicFileFormatGetTypeBuff (self,buff, bytes_read,
-						  type, class, descr,
-						  descr_max, descr_len);
-	    }
-	    KFileRelease (file);
-	}
-	KDirectoryRelease (dir);
-    }
-    return rc;
-}
-static
-rc_t KMagicFileFormatGetTypeBuff (const KMagicFileFormat *self, const void * buff, size_t buff_len,
-				  KFileFormatType * type, KFileFormatClass * class,
-				  char * descr, size_t descr_max, size_t *descr_len)
-{
-    rc_t rc = 0;
-    const char * b;
-
-    FUNC_ENTRY();
-
-    if (type != NULL)
-	*type = kfftError;
-    if (class != NULL)
-	*class = kffcError;
-    b = magic_buffer (self->cookie, buff, buff_len);
-    if (b == NULL)
-	rc = RC (rcFF, rcFileFormat, rcParsing, rcFormat, rcUnrecognized);
-    else
-    {
-	KMagicNode * node;
-	size_t c;
-
-        KFF_DEBUG (("magic_buffer returned %s\n", b));
-#if 1
- 	rc = KMagicTableFind (self->table, &node, b);
-	if (rc == 0)
-	{
-	    KFileFormatClass cid;
-	    KFileFormatType tid;
-#define TABLES self->dad.tables
-	    if (node == NULL)
-		rc = KMagicTableFind (self->table, &node, "Unknown");
-	    if (rc == 0)
-		rc = KFFTablesGetTypeId (TABLES, node->kffdescr, &tid, &cid);
-	    if (rc == 0)
-	    {
-		c = node->kfflen;
-		if (c > descr_max)
-		    c = descr_max-1;
-		if (descr)
-		    string_copy(descr, descr_max, node->kffdescr, c);
-		descr[c] = '\0';
-		if (descr_len)
-		    *descr_len = c;
-		if (type)
-		    *type = tid;
-		if (class)
-		    *class = cid;
-	    }
-	}
-	if (rc != 0)
-	{
-	    if (descr_len != NULL)
-		*descr_len = 0;
-	    if (type != NULL)
-		*type = kfftNotFound;
-	    if (class != NULL)
-		*class = kffcNotFound;
-	}	
-
-
-#else
-    size_t size;
-	size_t l = string_measure(b, &size);
-	if (descr != NULL)
-	{
-	    string_copy (descr, descr_max, b, l);
-	    if (descr_max < l)
-		descr[descr_max-1] = 0;
-	}
-	if (descr_len != NULL)
-	    *descr_len = strlen (b);
-	if (type != NULL)
-	    *type = kfftUnknown;
-	if (class != NULL)
-	    *class = kffcUnknown;
-#endif
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KMagicFileFormatMake (KFileFormat ** pft, const char * magic_path,
-			   const char* magic, size_t magiclen,
-			   const char * typeAndClass, size_t tclen)
-{
-    rc_t rc = 0;
-    KMagicFileFormat * self;
-
-    FUNC_ENTRY();
-
-    DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_KFF),
-            ("%s: load path as called %s\n", __func__, magic_path));
-
-    self = malloc (sizeof * self);
-    if (self == NULL)
-    {
-        rc = RC (rcFF, rcFileFormat, rcAllocating, rcMemory, rcExhausted);
-        LOGERR (klogFatal, rc, "Failed to allocate for KMagicFileFormat");
-    }
-    else
-    {
-        rc = KFileFormatInit (&self->dad, (const KFileFormat_vt *)&vt_v1, typeAndClass, tclen);
-        if (rc == 0)
-        {
-            rc = KMagicTableMake (&self->table);
-            if (rc == 0)
-            {
-                rc = KMagicTableInit (self->table, self->dad.tables, magic, magiclen);
-                if (rc == 0)
-                {
-                    self->cookie = magic_open (MAGIC_PRESERVE_ATIME);
-        /* 		    self->cookie = magic_open (MAGIC_PRESERVE_ATIME|MAGIC_DEBUG|MAGIC_CHECK); */
-                    if (self->cookie == NULL)
-                    {
-                        rc = RC (rcFF, rcFileFormat, rcConstructing, rcResources, rcNull);
-                        LOGERR (klogFatal, rc, "Unable to obtain libmagic cookie");
-                    }
-                    else
-                    {
-                        KConfig * kfg;
-                        static const char kfg_magic_path[] = "kfs/kff/magic";
-                        char * magic_path_cursor;
-                        char kfg_magic_path_buff [1024];
-                        char magic_path_buff [4096];
-                        size_t z;
-                        int load_code;
-
-                        magic_path_cursor = magic_path_buff;
-
-                        if (magic_path)
-                        {
-                            z = strlen (magic_path);
-                            if (magic_path_cursor != magic_path_buff)
-                                *magic_path_cursor++ = ':';
-                            memcpy (magic_path_cursor, magic_path, z);
-                            magic_path_cursor += z;
-                            *magic_path_cursor = '\0';
-                            DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_KFF),
-                                    ("%s: 1 magic_path_buff %s\n", __func__, magic_path_buff));
-                        }
-
-                        /* see if we have a configured alternate magic path */
-                        rc = KConfigMake (&kfg, NULL);
-                        if (rc == 0)
-                        {
-                            const KConfigNode * node;
-                            rc = KConfigOpenNodeRead (kfg, &node, kfg_magic_path);
-                            if (rc == 0)
-                            {
-                                size_t remaining;
-                                rc = KConfigNodeRead (node, 0, kfg_magic_path_buff,
-                                                      sizeof kfg_magic_path_buff-1,
-                                                      &z, &remaining);
-                                if (rc == 0)
-                                {
-                                    if (remaining != 0)
-                                    {
-                                        rc = RC (rcFF, rcFileFormat, rcLoading, rcString, rcExcessive);
-                                        DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_KFF),
-                                                ("%s: failed KConfigOpenNodeRead remaining %zu %R\n",
-                                                __func__, remaining, rc));
-                                    }
-                                    else if (z)
-                                    {
-                                        kfg_magic_path_buff[z] = '\0';
-                                        if (magic_path_cursor != magic_path_buff)
-                                            *magic_path_cursor++ = ':';
-                                        memcpy (magic_path_cursor,kfg_magic_path_buff, z);
-                                        magic_path_cursor += z;
-                                        *magic_path_cursor = '\0';
-                                        DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_KFF),
-                                                ("%s: 3 magic_path_buff %s\n", __func__, magic_path_buff));
-                                    }
-                                }
-                                else
-                                    DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_KFF),
-                                        ("%s: failed KConfigNodeRead %R\n", __func__, rc));
-                                        
-                                {
-                                    rc_t rc2 = KConfigNodeRelease(node);
-                                    if (rc == 0)
-                                        rc = rc2;
-                                }
-                            }
-                            else
-                            {   /* no magic path konfigured; report but this is not an error */
-                                DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_KFF),
-                                        ("%s: failed KConfigOpenNodeRead %R\n", __func__, rc));
-                                rc = 0;
-                            }
-                                    
-                            {
-                                rc_t rc2 = KConfigRelease(kfg);
-                                if (rc == 0)
-                                    rc = rc2;
-                            }
-                        }
-                        else 
-                            DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_KFF),
-                                    ("%s: failed KConfigMake %R\n", __func__, rc));
-        
-                        if (rc == 0)
-                        {
-/*VDB-2911: remove use of system magic file; do not want to break when magic file format changes */
-#if 0                            
-                            KDirectory * pwd;
-                            rc = KDirectoryNativeDir (&pwd);
-                            if (rc == 0)
-                            {
-                                static const char unix_magic_path[] = "/usr/share/file/magic";
-                                KPathType kpt = KDirectoryPathType (pwd, unix_magic_path);
-                                rc = KDirectoryRelease(pwd);
-                                DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_KFF),
-                                        ("%s: %s %x\n", __func__, unix_magic_path, kpt));
-                                if ((kpt & ~ kptAlias) == kptFile)
-                                {
-                                    z = strlen (unix_magic_path);
-                                    if (magic_path_cursor != magic_path_buff)
-                                        *magic_path_cursor++ = ':';
-                                    memcpy (magic_path_cursor, unix_magic_path, z);
-                                    magic_path_cursor += z;
-                                    *magic_path_cursor = '\0';
-                                    DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_KFF),
-                                            ("%s: 2 magic_path_buff %s\n", __func__, magic_path_buff));
-                                }
-                            }
-                            else
-                                LOGERR (klogErr, rc, "Failed to open NativeDir for Magic");
-#endif
-                            DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_KFF),
-                                    ("%s: loading path %s\n", __func__, magic_path_buff));
-
-                            load_code = magic_load (self->cookie, magic_path_buff);
-                            if (load_code != 0) /* defined as 0 success and -1 as fail */
-                            {
-                                KFF_DEBUG (("%s: magic_load() failed with load code %d(%s)\n", __func__, load_code, magic_error (self->cookie) ));
-                                rc = RC (rcFF, rcFileFormat, rcLoading, rcLibrary, rcUnexpected);
-                            }
-                            else
-                            {
-                                *pft = &self->dad;
-                                KFF_DEBUG (("%s Success\n", __func__));
-                                return 0;
-                            }
-                        }
-                        magic_close (self->cookie);
-                    }
-                }
-                else
-                    LOGERR (klogErr, rc, "Fail from KMagicTableInit");
-                    
-                KMagicTableRelease (self->table);
-            }
-            else
-                LOGERR (klogErr, rc, "Fail from KMagicTableMake");
-        }
-        else
-            LOGERR (klogErr, rc, "Fail from KFileFormatInit");
-        free (self);
-    }
-    return rc;
-}
-
diff --git a/libs/kfs/file-v2.c b/libs/kfs/file-v2.c
deleted file mode 100644
index 3e49010..0000000
--- a/libs/kfs/file-v2.c
+++ /dev/null
@@ -1,724 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-struct KFile_v2;
-#define KFILE_IMPL struct KFile_v2
-#define KFILE_VERS 2
-
-#include <kfs/extern.h>
-
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <kfs/file-impl.h>
-#include <klib/rc.h>
-#include <kproc/timeout.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-
-/*--------------------------------------------------------------------------
- * KFile
- *  a file
- */
-
-KITFTOK_DEF ( KFile_v2 );
-
-/* GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- */
-LIB_EXPORT struct KSysFile_v2 * CC KFileGetSysFile_v2 ( const KFile_v2 *self, ctx_t ctx, uint64_t *offset )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcRetrieving );
-
-    if ( offset == NULL )
-        INTERNAL_ERROR ( xcParamNull, "bad offset parameter" );
-
-    else
-    {
-        * offset = 0;
-
-        if ( self == NULL )
-            INTERNAL_ERROR ( xcSelfNull, "failed to retrieve file" );
-        else
-        {
-            const KFile_v2_vt * vt = KVTABLE_CAST ( TO_REFCOUNT_V1 ( self ) -> vt, ctx, KFile_v2 );
-            if ( vt == NULL )
-                INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KFile_v2 interface" );
-
-            else
-            {
-                return ( * vt -> get_sysfile ) ( self, ctx, offset );
-            }
-        }
-    }
-
-    return NULL;
-}
-
-/* RandomAccess
- *  ALMOST by definition, the file is random access
- *  certain file types ( notably compressors ) will refuse random access
- *
- *  returns 0 if random access, error code otherwise
- */
-LIB_EXPORT bool CC KFileRandomAccess_v2 ( const KFile_v2 *self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcAccessing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to access file" );
-
-    else 
-    {
-        const KFile_v2_vt *vt = KVTABLE_CAST ( TO_REFCOUNT_V1 ( self ) -> vt, ctx, KFile_v2 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KFile_v2 interface" );
-        else
-            return ( *vt -> random_access ) ( self, ctx );
-    }
-
-    return false;
-}
-
-/* Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-LIB_EXPORT uint32_t CC KFileType_v2 ( const KFile_v2 *self, ctx_t ctx )
-{
-    if ( self == NULL )
-        return kfdNull;
-    else
-    {
-        FUNC_ENTRY ( ctx, rcFS, rcFile, rcAccessing );
-        const KFile_v2_vt *vt = KVTABLE_CAST ( TO_REFCOUNT_V1 ( self ) -> vt, ctx, KFile_v2 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KFile_v2 interface" );
-        else
-            return ( *vt -> get_type ) ( self, ctx );
-
-    }
-
-    return kfdInvalid;
-}
-
-/* Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-LIB_EXPORT uint64_t CC KFileSize_v2 ( const KFile_v2 *self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcAccessing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to access file" );
-    else
-    {
-        const KFile_v2_vt *vt = KVTABLE_CAST ( TO_REFCOUNT_V1 ( self ) -> vt, ctx, KFile_v2 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KFile_v2 interface" );
-        else
-            return ( *vt -> get_size ) ( self, ctx );
-
-    }
-
-    return 0;
-}
-
-/* SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-LIB_EXPORT void CC KFileSetSize_v2 ( KFile_v2 *self, ctx_t ctx, uint64_t size )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcResizing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to access file" );
-
-    else if ( ! self -> write_enabled )
-        INTERNAL_ERROR ( xcFileReadOnly, "file has no write permissions" );
-
-    else
-    {
-        const KFile_v2_vt *vt = KVTABLE_CAST ( TO_REFCOUNT_V1 ( self ) -> vt, ctx, KFile_v2 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KFile_v2 interface" );
-        else
-            ( * vt -> set_size ) ( self, ctx, size );
-    }
-}
-
-/* Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - number of bytes actually read
- */
-LIB_EXPORT size_t CC KFileRead_v2 ( const KFile_v2 *self, ctx_t ctx, uint64_t pos,
-    void *buffer, size_t bsize )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcReading );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to access file" );
-
-    else if ( ! self -> read_enabled )
-        INTERNAL_ERROR ( xcFileWriteOnly, "file has no read permissions" );
-
-    else if ( buffer == NULL )
-        INTERNAL_ERROR ( xcParamNull, "buffer is NULL" );
-    else if ( bsize == 0 )
-        INTERNAL_ERROR ( xcBufferInsufficient, "size of buffer is insufficient" );
-
-    else
-    {
-        const KFile_v2_vt *vt = KVTABLE_CAST ( TO_REFCOUNT_V1 ( self ) -> vt, ctx, KFile_v2 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KFile_v2 interface" );
-        else
-            return ( *vt -> read ) ( self, ctx, pos, buffer, bsize );
-    }
-    
-    return 0;
-}
-
-LIB_EXPORT size_t CC KFileTimedRead_v2 ( const KFile_v2 *self, ctx_t ctx, uint64_t pos,
-    void *buffer, size_t bsize, struct timeout_t *tm )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcReading );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to read file" );
-
-    else if ( ! self -> read_enabled )
-        INTERNAL_ERROR ( xcFileWriteOnly, "file has no read permissions" );
-
-    else if ( buffer == NULL )
-        INTERNAL_ERROR ( xcParamNull, "buffer is NULL" );
-    else if ( bsize == 0 )
-        INTERNAL_ERROR ( xcBufferInsufficient, "size of buffer is insufficient" );
-
-    else 
-    {
-        const KFile_v2_vt *vt = KVTABLE_CAST ( TO_REFCOUNT_V1 ( self ) -> vt, ctx, KFile_v2 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KFile_v2 interface" );
-        else
-            return ( *vt -> timed_read ) ( self, ctx, pos, buffer, bsize, tm );
-    }
-
-    return 0;
-}
-
-/* ReadAll
- *  read from file until "bsize" bytes have been retrieved
- *  or until end-of-input
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - return parameter giving number of bytes
- *  actually read. when returned value is zero and return code is
- *  also zero, interpreted as end of file.
- */
-LIB_EXPORT size_t CC KFileReadAll_v2 ( const KFile_v2 *self, ctx_t ctx, uint64_t pos,
-    void *buffer, size_t bsize )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcReading );
-
-    size_t total = 0;
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to read file" );
-
-    else if ( ! self -> read_enabled )
-        INTERNAL_ERROR ( xcFileWriteOnly, "file has no read permissions" );
-
-    else if ( buffer == NULL )
-        INTERNAL_ERROR ( xcParamNull, "buffer is NULL" );
-    else if ( bsize == 0 )
-        INTERNAL_ERROR ( xcBufferInsufficient, "size of buffer is insufficient" );
-
-    else 
-    {
-        const KFile_v2_vt *vt = KVTABLE_CAST ( TO_REFCOUNT_V1 ( self ) -> vt, ctx, KFile_v2 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KFile_v2 interface" );
-        else
-        {
-            TRY ( total = ( *vt -> read ) ( self, ctx, pos, buffer, bsize ) )
-            {
-                if ( total != 0 && total < bsize )
-                {
-                    uint8_t *b;
-                    size_t count;
-
-                    timeout_t no_block;
-                    TimeoutInit ( & no_block, 0 );
-                
-                    for ( b = buffer; total < bsize; total += count )
-                    {
-                        TRY ( count = ( *vt -> timed_read ) ( self, ctx, pos + total, b + total, bsize - total, & no_block ) )
-                        {
-                            if ( count == 0 )
-                                break;
-                        }
-                        CATCH_ALL ()
-                        {
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    return total;
-}
-
-LIB_EXPORT size_t CC KFileTimedReadAll_v2 ( const KFile_v2 *self, ctx_t ctx, uint64_t pos,
-    void *buffer, size_t bsize, struct timeout_t *tm )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcReading );
-
-    size_t total = 0;
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to read file" );
-
-    else if ( ! self -> read_enabled )
-        INTERNAL_ERROR ( xcFileWriteOnly, "file has no read permissions" );
-
-    else if ( buffer == NULL )
-        INTERNAL_ERROR ( xcParamNull, "buffer is NULL" );
-    else if ( bsize == 0 )
-        INTERNAL_ERROR ( xcBufferInsufficient, "size of buffer is insufficient" );
-
-    else
-    {
-        const KFile_v2_vt *vt = KVTABLE_CAST ( TO_REFCOUNT_V1 ( self ) -> vt, ctx, KFile_v2 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KFile_v2 interface" );
-        else
-        {
-            TRY ( total = ( *vt -> timed_read ) ( self, ctx, pos, buffer, bsize, tm ) )
-            {
-                if ( total != 0 && total < bsize )
-                {
-                    uint8_t *b;
-                    size_t count;
-
-                    timeout_t no_block;
-                    TimeoutInit ( & no_block, 0 );
-                    
-                    for ( b = buffer; total < bsize; total += count )
-                    {
-                        TRY ( count = ( *vt -> timed_read ) ( self, ctx, pos + total, b + total, bsize - total, & no_block ) )
-                        {
-                            if ( count == 0 )
-                                break;
-                        }
-                        CATCH_ALL ()
-                        {
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    return total;
-}
-
-/* ReadExactly
- * TimedReadExactly
- *  read from file until "bytes" have been retrieved
- *  or return incomplete transfer error
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bytes" [ IN ] - return buffer for read
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed reads. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-LIB_EXPORT void CC KFileReadExactly_v2 ( const KFile_v2 *self, ctx_t ctx,
-    uint64_t pos, void *buffer, size_t bytes )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcReading );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to read file" );
-
-    else if ( ! self -> read_enabled )
-        INTERNAL_ERROR ( xcFileWriteOnly, "file has no read permissions" );
-
-    else if ( bytes == 0 )
-        return;
-    else if ( buffer == NULL )
-        INTERNAL_ERROR ( xcParamNull, "buffer is NULL" );
-
-    else
-    {
-        const KFile_v2_vt *vt = KVTABLE_CAST ( TO_REFCOUNT_V1 ( self ) -> vt, ctx, KFile_v2 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KFile_v2 interface" );
-        else
-        {
-            size_t total = 0;
-
-            TRY ( total = ( *vt -> read ) ( self, ctx, pos, buffer, bytes ) )
-            {
-                uint8_t *b;
-                size_t count;
-
-                for ( b = buffer ; total < bytes; total += count )
-                {
-                    TRY ( count = ( *vt -> read ) ( self, ctx, pos + total, b + total, bytes - total ) )
-                    {
-                        if ( count == 0 )
-                        {
-                            SYSTEM_ERROR ( xcTransferIncomplete, "failed to read complete file" );
-                            break;
-                        }
-                    }
-#if 0
-                    CATCH ( xcTimeoutExhausted )
-                    {
-                        /* ignore and try again */
-                        CLEAR ();
-                        count = 0;
-                    }
-#endif
-                    CATCH_ALL ()
-                    {
-                        rc_t rc = ctx -> rc;
-                        if ( GetRCObject ( rc ) != ( enum RCObject ) rcTimeout || GetRCState ( rc ) != rcExhausted )
-                            break;
-
-                        CLEAR ();
-                        count = 0;
-                    }
-                }
-            }
-        }
-    }
-}
-
-LIB_EXPORT void CC KFileTimedReadExactly_v2 ( const KFile_v2 *self, ctx_t ctx,
-    uint64_t pos, void *buffer, size_t bytes, struct timeout_t *tm )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcReading );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to read file" );
-
-    else if ( ! self -> read_enabled )
-        INTERNAL_ERROR ( xcFileWriteOnly, "file has no read permissions" );
-
-    else if ( bytes == 0 )
-        return;
-    else if ( buffer == NULL )
-        INTERNAL_ERROR ( xcParamNull, "buffer is NULL" );
-
-    else
-    {
-        const KFile_v2_vt *vt = KVTABLE_CAST ( TO_REFCOUNT_V1 ( self ) -> vt, ctx, KFile_v2 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KFile_v2 interface" );
-        else
-        {
-            size_t total;
-
-            TRY ( total = ( *vt -> timed_read ) ( self, ctx, pos, buffer, bytes, tm ) )
-            {
-                uint8_t *b;
-                size_t count;
-
-                for ( b = buffer, total = 0; total < bytes; total += count )
-                {
-                    TRY ( count = ( *vt -> timed_read ) ( self, ctx, pos + total, b + total, bytes - total, tm ) )
-                    {
-                        if ( count == 0 )
-                        {
-                            INTERNAL_ERROR ( xcTransferIncomplete, "failed to read complete file" );
-                            break;
-                        }
-                    }
-#if 0
-                    CATCH ( xcTimeoutExhausted )
-                    {
-                        /* ignore and try again */
-                        CLEAR ();
-                        count = 0;
-                    }
-#endif
-                    CATCH_ALL ()
-                    {
-                        rc_t rc = ctx -> rc;
-                        if ( GetRCObject ( rc ) != ( enum RCObject ) rcTimeout || GetRCState ( rc ) != rcExhausted )
-                            break;
-
-                        CLEAR ();
-                        count = 0;
-                    }
-                }
-            }
-        }
-    }
-}
-
-/* Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT ] - number of bytes actually written
- */
-LIB_EXPORT size_t CC KFileWrite_2 ( KFile_v2 *self, ctx_t ctx, uint64_t pos,
-    const void *buffer, size_t size )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcWriting );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to read file" );
-
-    if ( ! self -> write_enabled )
-        INTERNAL_ERROR ( xcFileReadOnly, "file has no write permissions" );
-
-    else if ( buffer == NULL )
-        INTERNAL_ERROR ( xcParamNull, "buffer is NULL" );
-
-    else 
-    {
-        const KFile_v2_vt *vt = KVTABLE_CAST ( TO_REFCOUNT_V1 ( self ) -> vt, ctx, KFile_v2 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KFile_v2 interface" );
-        else
-            return ( *vt -> write ) ( self, ctx, pos, buffer, size );
-    }
-    return 0;
-}
-
-LIB_EXPORT size_t CC KFileTimedWrite_v2 ( KFile_v2 *self, ctx_t ctx, uint64_t pos,
-    const void *buffer, size_t size, struct timeout_t *tm )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcWriting );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to read file" );
-
-    if ( ! self -> write_enabled )
-        INTERNAL_ERROR ( xcFileReadOnly, "file has no write permissions" );
-
-    else if ( buffer == NULL )
-        INTERNAL_ERROR ( xcParamNull, "buffer is NULL" );
-
-    else
-    {
-        const KFile_v2_vt *vt = KVTABLE_CAST ( TO_REFCOUNT_V1 ( self ) -> vt, ctx, KFile_v2 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KFile_v2 interface" );
-        else
-            return ( *vt -> timed_write ) ( self, ctx, pos, buffer, size, tm );
-    }
-    return 0;
-}
-
-/* WriteAll
- *  write from file until "size" bytes have been transferred
- *  or until no further progress can be made
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- */
-LIB_EXPORT size_t CC KFileWriteAll_v2 ( KFile_v2 *self, ctx_t ctx, uint64_t pos,
-    const void *buffer, size_t size )
-{
-    size_t total = 0;
-
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcWriting );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to read file" );
-
-    if ( ! self -> write_enabled )
-        INTERNAL_ERROR ( xcFileReadOnly, "file has no write permissions" );
-
-    else if ( buffer == NULL )
-        INTERNAL_ERROR ( xcParamNull, "buffer is NULL" );
-
-    else
-    {
-        const KFile_v2_vt *vt = KVTABLE_CAST ( TO_REFCOUNT_V1 ( self ) -> vt, ctx, KFile_v2 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KFile_v2 interface" );
-        else
-        {
-            size_t count;
-
-            TRY ( total = count = ( *vt -> write ) ( self, ctx, pos, buffer, size ) )
-            {
-                if ( count != 0 && count < size )
-                {
-                    const uint8_t *b;
-                    timeout_t no_block;
-                    TimeoutInit ( & no_block, 0 );
-                
-                    for ( b = buffer; total < size; total += count )
-                    {
-                        TRY ( count = ( *vt -> timed_write ) 
-                              ( self, ctx, pos + total, b + total, size - total, & no_block ) )
-                        {
-                            if ( count == 0 )
-                                break;
-                        }
-                        CATCH_ALL ()
-                        {
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    return total;
-}
-
-LIB_EXPORT size_t CC KFileTimedWriteAll_v2 ( KFile_v2 *self, ctx_t ctx, uint64_t pos,
-    const void *buffer, size_t size, struct timeout_t *tm )
-{
-    size_t total = 0;
-
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcWriting );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to read file" );
-
-    if ( ! self -> write_enabled )
-        INTERNAL_ERROR ( xcFileReadOnly, "file has no write permissions" );
-
-    else if ( buffer == NULL )
-        INTERNAL_ERROR ( xcParamNull, "buffer is NULL" );
-
-    else
-    {
-        const KFile_v2_vt *vt = KVTABLE_CAST ( TO_REFCOUNT_V1 ( self ) -> vt, ctx, KFile_v2 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "this object does not support the KFile_v2 interface" );
-        else
-        {
-            TRY ( total = ( *vt -> timed_write ) ( self, ctx, pos, buffer, size, tm ) )
-            {
-                if ( total != 0 && total < size )
-                {
-                    const uint8_t *b;
-                    size_t count;
-
-                    for ( b = buffer, total = 0; total < size; total += count )
-                    {
-                        TRY ( count = ( *vt -> timed_write )
-                              ( self, ctx, pos + total, b + total, size - total, tm ) )
-                        {
-                            if ( count == 0 )
-                                break;
-                        }
-                        CATCH_ALL ()
-                        {
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-    }
-    return total;
-}
-
-/* Init
- *  initialize a newly allocated file object
- */
-LIB_EXPORT void CC KFileInit_v2 ( KFile_v2 *self, ctx_t ctx, const KVTable *kvt,
-    const char *fname, bool read_enabled, bool write_enabled )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcConstructing );
-
-    TRY ( KRefcountInit_v1 ( & self -> dad, ctx, kvt, fname ) )
-    {
-        const KFile_v2_vt *vt = KVTABLE_CAST ( kvt, ctx, KFile_v2 );
-        if ( vt == NULL )
-            INTERNAL_ERROR ( xcInterfaceIncorrect, "vtable does not appear to implement KFile_v2" );
-        else switch ( vt -> dad . min )
-        {
-        case 0:
-#if _DEBUGGING
-            if ( vt -> write         == NULL ||
-                 vt -> read          == NULL ||
-                 vt -> set_size      == NULL ||
-                 vt -> get_size      == NULL ||
-                 vt -> random_access == NULL ||
-                 vt -> get_sysfile   == NULL ||
-                 vt -> timed_write   == NULL ||
-                 vt -> timed_read    == NULL ||
-                 vt -> get_type      == NULL )
-                
-                INTERNAL_ERROR ( xcInterfaceInvalid, "null method pointer(s)" );
-#endif
-            break;
-        default:
-            INTERNAL_ERROR ( xcInterfaceInvalid, "file has an invalid version" );
-        }
-
-        self -> read_enabled = ( uint8_t ) ( read_enabled != 0 );
-        self -> write_enabled = ( uint8_t ) ( write_enabled != 0 );
-    }
-}
diff --git a/libs/kfs/file.c b/libs/kfs/file.c
deleted file mode 100644
index 3dc88b8..0000000
--- a/libs/kfs/file.c
+++ /dev/null
@@ -1,1002 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-#include <kfs/impl.h>
-#include <klib/rc.h>
-#include <kproc/timeout.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-
-/*--------------------------------------------------------------------------
- * KFile
- *  a file
- */
-
-/* Destroy
- *  destroy file
- */
-LIB_EXPORT rc_t CC KFileDestroy_v1 ( KFile_v1 *self )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcDestroying, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . destroy ) ( self );
-    }
-
-    return RC ( rcFS, rcFile, rcDestroying, rcInterface, rcBadVersion );
-}
-
-/* GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- */
-LIB_EXPORT struct KSysFile_v1 * CC KFileGetSysFile_v1 ( const KFile_v1 *self, uint64_t *offset )
-{
-    if ( offset != NULL )
-    {
-        * offset = 0;
-        if ( self != NULL )
-        {
-            switch ( self -> vt -> v1 . maj )
-            {
-            case 1:
-                return ( * self -> vt -> v1 . get_sysfile ) ( self, offset );
-            }
-        }
-    }
-    return NULL;
-}
-
-/* AddRef
- *  creates a new reference
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KFileAddRef ( const KFile_v1 *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KFile" ) )
-        {
-        case krefLimit:
-            return RC ( rcFS, rcFile, rcAttaching, rcRange, rcExcessive );
-        case krefNegative:
-            return RC ( rcFS, rcFile, rcAttaching, rcSelf, rcInvalid );
-        default:
-            break;
-        }
-    }
-    return 0;
-}
-
-/* Release
- *  discard reference to file
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KFileRelease_v1 ( const KFile_v1 *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KFile" ) )
-        {
-        case krefWhack:
-            if ( self -> dir != NULL )
-                return KDirectoryDestroyFile_v1 ( self -> dir, ( KFile_v1 * ) self );
-            return KFileDestroy_v1 ( ( KFile_v1 * ) self );
-        case krefNegative:
-            return RC ( rcFS, rcFile, rcReleasing, rcRange, rcExcessive );
-        default:
-            break;
-        }
-    }
-
-    return 0;
-}
-
-/* RandomAccess
- *  ALMOST by definition, the file is random access
- *  certain file types ( notably compressors ) will refuse random access
- *
- *  returns 0 if random access, error code otherwise
- */
-LIB_EXPORT rc_t CC KFileRandomAccess_v1 ( const KFile_v1 *self )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcAccessing, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . random_access ) ( self );
-    }
-
-    return RC ( rcFS, rcFile, rcAccessing, rcInterface, rcBadVersion );
-}
-
-/* Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-LIB_EXPORT uint32_t CC KFileType_v1 ( const KFile_v1 *self )
-{
-    if ( self == NULL )
-        return kfdNull;
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        if ( self -> vt -> v1 . min >= 1 )
-            return ( * self -> vt -> v1 . get_type ) ( self );
-        break;
-    }
-
-    return kfdInvalid;
-}
-
-/* Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-LIB_EXPORT rc_t CC KFileSize_v1 ( const KFile_v1 *self, uint64_t *size )
-{
-    if ( size == NULL )
-        return RC ( rcFS, rcFile, rcAccessing, rcParam, rcNull );
-
-    * size = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcAccessing, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . get_size ) ( self, size );
-    }
-
-    return RC ( rcFS, rcFile, rcAccessing, rcInterface, rcBadVersion );
-}
-
-/* SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-LIB_EXPORT rc_t CC KFileSetSize_v1 ( KFile_v1 *self, uint64_t size )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcResizing, rcSelf, rcNull );
-
-    if ( ! self -> write_enabled )
-        return RC ( rcFS, rcFile, rcResizing, rcFile, rcNoPerm );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . set_size ) ( self, size );
-    }
-
-    return RC ( rcFS, rcFile, rcResizing, rcInterface, rcBadVersion );
-}
-
-/* Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - number of bytes actually read
- */
-LIB_EXPORT rc_t CC KFileRead_v1 ( const KFile_v1 *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    if ( num_read == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcParam, rcNull );
-
-    * num_read = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcSelf, rcNull );
-
-    if ( ! self -> read_enabled )
-        return RC ( rcFS, rcFile, rcReading, rcFile, rcNoPerm );
-
-    if ( buffer == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcBuffer, rcNull );
-    if ( bsize == 0 )
-        return RC ( rcFS, rcFile, rcReading, rcBuffer, rcInsufficient );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . read ) ( self, pos, buffer, bsize, num_read );
-    }
-
-    return RC ( rcFS, rcFile, rcReading, rcInterface, rcBadVersion );
-}
-
-LIB_EXPORT rc_t CC KFileTimedRead_v1 ( const KFile_v1 *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read, struct timeout_t *tm )
-{
-    if ( num_read == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcParam, rcNull );
-
-    * num_read = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcSelf, rcNull );
-
-    if ( ! self -> read_enabled )
-        return RC ( rcFS, rcFile, rcReading, rcFile, rcNoPerm );
-
-    if ( buffer == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcBuffer, rcNull );
-    if ( bsize == 0 )
-        return RC ( rcFS, rcFile, rcReading, rcBuffer, rcInsufficient );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        if ( self -> vt -> v1 . min >= 2 )
-            return ( * self -> vt -> v1 . timed_read ) ( self, pos, buffer, bsize, num_read, tm );
-        if ( tm == NULL )
-            return ( * self -> vt -> v1 . read ) ( self, pos, buffer, bsize, num_read );
-        break;
-    }
-
-    return RC ( rcFS, rcFile, rcReading, rcInterface, rcBadVersion );
-}
-
-/* ReadAll
- *  read from file until "bsize" bytes have been retrieved
- *  or until end-of-input
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - return parameter giving number of bytes
- *  actually read. when returned value is zero and return code is
- *  also zero, interpreted as end of file.
- */
-LIB_EXPORT rc_t CC KFileReadAll_v1 ( const KFile_v1 *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc;
-    uint8_t *b;
-    size_t total, count;
-
-    if ( num_read == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcParam, rcNull );
-
-    * num_read = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcSelf, rcNull );
-
-    if ( ! self -> read_enabled )
-        return RC ( rcFS, rcFile, rcReading, rcFile, rcNoPerm );
-
-    if ( buffer == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcBuffer, rcNull );
-    if ( bsize == 0 )
-        return RC ( rcFS, rcFile, rcReading, rcBuffer, rcInsufficient );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        count = 0;
-        rc = ( * self -> vt -> v1 . read ) ( self, pos, buffer, bsize, & count );
-        total = count;
-
-        if ( rc == 0 && count != 0 && count < bsize )
-        {
-            if ( self -> vt -> v1 . min >= 2 )
-            {
-                timeout_t no_block;
-                TimeoutInit ( & no_block, 0 );
-
-                for ( b = buffer; total < bsize; total += count )
-                {
-                    count = 0;
-                    rc = ( * self -> vt -> v1 . timed_read ) ( self, pos + total, b + total, bsize - total, & count, & no_block );
-                    if ( rc != 0 )
-                        break;
-                    if ( count == 0 )
-                        break;
-                }
-            }
-            else
-            {
-                for ( b = buffer; total < bsize; total += count )
-                {
-                    count = 0;
-                    rc = ( * self -> vt -> v1 . read ) ( self, pos + total, b + total, bsize - total, & count );
-                    if ( rc != 0 )
-                        break;
-                    if ( count == 0 )
-                        break;
-                }
-            }
-        }
-        break;
-    default:
-        return RC ( rcFS, rcFile, rcReading, rcInterface, rcBadVersion );
-    }
-
-    if ( total != 0 )
-    {
-        * num_read = total;
-        return 0;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KFileTimedReadAll_v1 ( const KFile_v1 *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read, struct timeout_t *tm )
-{
-    rc_t rc;
-    uint8_t *b;
-    size_t total, count;
-
-    if ( num_read == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcParam, rcNull );
-
-    * num_read = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcSelf, rcNull );
-
-    if ( ! self -> read_enabled )
-        return RC ( rcFS, rcFile, rcReading, rcFile, rcNoPerm );
-
-    if ( buffer == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcBuffer, rcNull );
-    if ( bsize == 0 )
-        return RC ( rcFS, rcFile, rcReading, rcBuffer, rcInsufficient );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        if ( self -> vt -> v1 . min >= 2 )
-        {
-            count = 0;
-            rc = ( * self -> vt -> v1 . timed_read ) ( self, pos, buffer, bsize, & count, tm );
-            total = count;
-
-            if ( rc == 0 && count != 0 && count < bsize )
-            {
-                timeout_t no_block;
-                TimeoutInit ( & no_block, 0 );
-
-                for ( b = buffer; total < bsize; total += count )
-                {
-                    count = 0;
-                    rc = ( * self -> vt -> v1 . timed_read ) ( self, pos + total, b + total, bsize - total, & count, & no_block );
-                    if ( rc != 0 )
-                        break;
-                    if ( count == 0 )
-                        break;
-                }
-            }
-            break;
-        }
-
-        if ( tm == NULL )
-        {
-            for ( rc = 0, b = buffer, total = 0; total < bsize; total += count )
-            {
-                count = 0;
-                rc = ( * self -> vt -> v1 . read ) ( self, pos + total, b + total, bsize - total, & count );
-                if ( rc != 0 )
-                    break;
-                if ( count == 0 )
-                    break;
-            }
-            break;
-        }
-
-        /* no break */
-    default:
-        return RC ( rcFS, rcFile, rcReading, rcInterface, rcBadVersion );
-    }
-
-    if ( total != 0 )
-    {
-        * num_read = total;
-        return 0;
-    }
-
-    return rc;
-}
-
-/* ReadExactly
- * TimedReadExactly
- *  read from file until "bytes" have been retrieved
- *  or return incomplete transfer error
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bytes" [ IN ] - return buffer for read
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed reads. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-LIB_EXPORT rc_t CC KFileReadExactly_v1 ( const KFile_v1 *self,
-    uint64_t pos, void *buffer, size_t bytes )
-{
-    rc_t rc;
-    uint8_t *b;
-    size_t total, count;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcSelf, rcNull );
-
-    if ( ! self -> read_enabled )
-        return RC ( rcFS, rcFile, rcReading, rcFile, rcNoPerm );
-
-    if ( bytes == 0 )
-        return 0;
-    if ( buffer == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcBuffer, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        for ( b = buffer, total = 0; total < bytes; total += count )
-        {
-            count = 0;
-            rc = ( * self -> vt -> v1 . read ) ( self, pos + total, b + total, bytes - total, & count );
-            if ( rc != 0 )
-            {
-                if ( GetRCObject ( rc ) != ( enum RCObject ) rcTimeout || GetRCState ( rc ) != rcExhausted )
-                    break;
-            }
-            else if ( count == 0 )
-            {
-                rc = RC ( rcFS, rcFile, rcReading, rcTransfer, rcIncomplete );
-                break;
-            }
-        }
-        break;
-    default:
-        rc = RC ( rcFS, rcFile, rcReading, rcInterface, rcBadVersion );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KFileTimedReadExactly_v1 ( const KFile_v1 *self,
-    uint64_t pos, void *buffer, size_t bytes, struct timeout_t *tm )
-{
-    rc_t rc;
-    uint8_t *b;
-    size_t total, count;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcSelf, rcNull );
-
-    if ( ! self -> read_enabled )
-        return RC ( rcFS, rcFile, rcReading, rcFile, rcNoPerm );
-
-    if ( bytes == 0 )
-        return 0;
-    if ( buffer == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcBuffer, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        if ( self -> vt -> v1 . min >= 2 )
-        {
-            for ( b = buffer, total = 0; total < bytes; total += count )
-            {
-                count = 0;
-                rc = ( * self -> vt -> v1 . timed_read ) ( self, pos + total, b + total, bytes - total, & count, tm );
-                if ( rc != 0 )
-                {
-                    if ( tm != NULL )
-                        break;
-                    if ( GetRCObject ( rc ) != ( enum RCObject ) rcTimeout || GetRCState ( rc ) != rcExhausted )
-                        break;
-                }
-                else if ( count == 0 )
-                {
-                    rc = RC ( rcFS, rcFile, rcReading, rcTransfer, rcIncomplete );
-                    break;
-                }
-            }
-            break;
-        }
-
-        if ( tm == NULL )
-        {
-            for ( b = buffer, total = 0; total < bytes; total += count )
-            {
-                count = 0;
-                rc = ( * self -> vt -> v1 . read ) ( self, pos + total, b + total, bytes - total, & count );
-                if ( rc != 0 )
-                {
-                    if ( GetRCObject ( rc ) != ( enum RCObject ) rcTimeout || GetRCState ( rc ) != rcExhausted )
-                        break;
-                }
-                else if ( count == 0 )
-                {
-                    rc = RC ( rcFS, rcFile, rcReading, rcTransfer, rcIncomplete );
-                    break;
-                }
-            }
-            break;
-        }
-
-        /* no break */
-    default:
-        return RC ( rcFS, rcFile, rcReading, rcInterface, rcBadVersion );
-    }
-
-    return rc;
-}
-
-/* Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT ] - number of bytes actually written
- */
-LIB_EXPORT rc_t CC KFileWrite_v1 ( KFile_v1 *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    size_t ignore;
-    if ( num_writ == NULL )
-        num_writ = & ignore;
-
-    * num_writ = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcWriting, rcSelf, rcNull );
-
-    if ( ! self -> write_enabled )
-        return RC ( rcFS, rcFile, rcWriting, rcFile, rcNoPerm );
-
-    if ( size == 0 )
-        return 0;
-    if ( buffer == NULL )
-        return RC ( rcFS, rcFile, rcWriting, rcBuffer, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . write ) ( self, pos, buffer, size, num_writ );
-    }
-
-    return RC ( rcFS, rcFile, rcWriting, rcInterface, rcBadVersion );
-}
-
-LIB_EXPORT rc_t CC KFileTimedWrite_v1 ( KFile_v1 *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm )
-{
-    size_t ignore;
-    if ( num_writ == NULL )
-        num_writ = & ignore;
-
-    * num_writ = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcWriting, rcSelf, rcNull );
-
-    if ( ! self -> write_enabled )
-        return RC ( rcFS, rcFile, rcWriting, rcFile, rcNoPerm );
-
-    if ( size == 0 )
-        return 0;
-    if ( buffer == NULL )
-        return RC ( rcFS, rcFile, rcWriting, rcBuffer, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        if ( self -> vt -> v1 . min >= 2 )
-            return ( * self -> vt -> v1 . timed_write ) ( self, pos, buffer, size, num_writ, tm );
-        if ( tm == NULL )
-            return ( * self -> vt -> v1 . write ) ( self, pos, buffer, size, num_writ );
-        break;
-    }
-
-    return RC ( rcFS, rcFile, rcWriting, rcInterface, rcBadVersion );
-}
-
-/* WriteAll
- *  write from file until "size" bytes have been transferred
- *  or until no further progress can be made
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- */
-LIB_EXPORT rc_t CC KFileWriteAll_v1 ( KFile_v1 *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    rc_t rc;
-    const uint8_t *b;
-    size_t total, count;
-
-    size_t ignore;
-    if ( num_writ == NULL )
-        num_writ = & ignore;
-
-    * num_writ = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcWriting, rcSelf, rcNull );
-
-    if ( ! self -> write_enabled )
-        return RC ( rcFS, rcFile, rcWriting, rcFile, rcNoPerm );
-
-    if ( size == 0 )
-        return 0;
-    if ( buffer == NULL )
-        return RC ( rcFS, rcFile, rcWriting, rcBuffer, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        count = 0;
-        rc = ( * self -> vt -> v1 . write ) ( self, pos, buffer, size, & count );
-        total = count;
-
-        if ( rc == 0 && count != 0 && count < size )
-        {
-            if ( self -> vt -> v1 . min >= 2 )
-            {
-                timeout_t no_block;
-                TimeoutInit ( & no_block, 0 );
-
-                for ( b = buffer; total < size; total += count )
-                {
-                    count = 0;
-                    rc = ( * self -> vt -> v1 . timed_write ) ( self, pos + total, b + total, size - total, & count, & no_block );
-                    if ( rc != 0 )
-                        break;
-                    if ( count == 0 )
-                        break;
-                }
-            }
-            else
-            {
-                for ( b = buffer; total < size; total += count )
-                {
-                    count = 0;
-                    rc = ( * self -> vt -> v1 . write ) ( self, pos + total, b + total, size - total, & count );
-                    if ( rc != 0 )
-                        break;
-                    if ( count == 0 )
-                        break;
-                }
-            }
-        }
-        break;
-    default:
-        return RC ( rcFS, rcFile, rcWriting, rcInterface, rcBadVersion );
-    }
-
-    * num_writ = total;
-    if ( total == size )
-        return 0;
-    if ( rc == 0 )
-        return RC ( rcFS, rcFile, rcWriting, rcTransfer, rcIncomplete );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KFileTimedWriteAll_v1 ( KFile_v1 *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm )
-{
-    rc_t rc;
-    const uint8_t *b;
-    size_t total, count;
-
-    size_t ignore;
-    if ( num_writ == NULL )
-        num_writ = & ignore;
-
-    * num_writ = 0;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcWriting, rcSelf, rcNull );
-
-    if ( ! self -> write_enabled )
-        return RC ( rcFS, rcFile, rcWriting, rcFile, rcNoPerm );
-
-    if ( size == 0 )
-        return 0;
-    if ( buffer == NULL )
-        return RC ( rcFS, rcFile, rcWriting, rcBuffer, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        if ( self -> vt -> v1 . min >= 2 )
-        {
-            for ( rc = 0, b = buffer, total = 0; total < size; total += count )
-            {
-                count = 0;
-                rc = ( * self -> vt -> v1 . timed_write ) ( self, pos + total, b + total, size - total, & count, tm );
-                if ( rc != 0 )
-                    break;
-                if ( count == 0 )
-                    break;
-            }
-            break;
-        }
-
-        if ( tm == NULL )
-        {
-            for ( rc = 0, b = buffer, total = 0; total < size; total += count )
-            {
-                count = 0;
-                rc = ( * self -> vt -> v1 . write ) ( self, pos + total, b + total, size - total, & count );
-                if ( rc != 0 )
-                    break;
-                if ( count == 0 )
-                    break;
-            }
-            break;
-        }
-
-        /* no break */
-
-    default:
-        return RC ( rcFS, rcFile, rcWriting, rcInterface, rcBadVersion );
-    }
-
-    * num_writ = total;
-    if ( total == size )
-        return 0;
-    if ( rc == 0 )
-        return RC ( rcFS, rcFile, rcWriting, rcTransfer, rcIncomplete );
-    return rc;
-}
-
-/* Init
- *  initialize a newly allocated file object
- */
-LIB_EXPORT rc_t CC KFileInit ( KFile_v1 *self, const KFile_vt *vt,
-    const char *classname, const char *fname,
-    bool read_enabled, bool write_enabled )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcSelf, rcNull );
-    if ( vt == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcNull );
-    switch ( vt -> v1 . maj )
-    {
-    case 0:
-        return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcInvalid );
-
-    case 1:
-        switch ( vt -> v1 . min )
-        {
-            /* ADD NEW MINOR VERSION CASES HERE */
-        case 2:
-#if _DEBUGGING
-            if ( vt -> v1 . timed_write == NULL ||
-                 vt -> v1 . timed_read == NULL )
-                return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcNull );
-#endif
-        case 1:
-#if _DEBUGGING
-            if ( vt -> v1 . get_type == NULL )
-                return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcNull );
-#endif
-            /* no break */
-        case 0:
-#if _DEBUGGING
-        if ( vt -> v1 . write == NULL         ||
-             vt -> v1 . read == NULL          ||
-             vt -> v1 . set_size == NULL      ||
-             vt -> v1 . get_size == NULL      ||
-             vt -> v1 . random_access == NULL ||
-             vt -> v1 . get_sysfile == NULL   ||
-             vt -> v1 . destroy == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcNull );
-#endif
-            break;
-        default:
-            return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcBadVersion );
-        }
-        break;
-
-    default:
-        return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcBadVersion );
-    }
-
-    self -> vt = vt;
-    self -> dir = NULL;
-    KRefcountInit ( & self -> refcount, 1, classname, "init", fname );
-    self -> read_enabled = ( uint8_t ) ( read_enabled != 0 );
-    self -> write_enabled = ( uint8_t ) ( write_enabled != 0 );
-
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * 
- */
-
-
-#undef KFileRelease
-LIB_EXPORT rc_t CC KFileRelease ( const KFile_v1 *self )
-{
-    return KFileRelease_v1 ( self );
-}
-
-#undef KFileRandomAccess
-LIB_EXPORT rc_t CC KFileRandomAccess ( const KFile_v1 *self )
-{
-    return KFileRandomAccess_v1 ( self );
-}
-
-#undef KFileType
-LIB_EXPORT uint32_t CC KFileType ( const KFile_v1 *self )
-{
-    return KFileType_v1 ( self );
-}
-
-#undef KFileSize
-LIB_EXPORT rc_t CC KFileSize ( const KFile_v1 *self, uint64_t *size )
-{
-    return KFileSize_v1 ( self, size );
-}
-
-#undef KFileSetSize
-LIB_EXPORT rc_t CC KFileSetSize ( KFile_v1 *self, uint64_t size )
-{
-    return KFileSetSize_v1 ( self, size );
-}
-
-#undef KFileRead
-LIB_EXPORT rc_t CC KFileRead ( const KFile_v1 *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    return KFileRead_v1 ( self, pos, buffer, bsize, num_read );
-}
-
-#undef KFileTimedRead
-LIB_EXPORT rc_t CC KFileTimedRead ( const KFile_v1 *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read, struct timeout_t *tm )
-{
-    return KFileTimedRead_v1 ( self, pos, buffer, bsize, num_read, tm );
-}
-
-#undef KFileReadAll
-LIB_EXPORT rc_t CC KFileReadAll ( const KFile_v1 *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    return KFileReadAll_v1 ( self, pos, buffer, bsize, num_read );
-}
-
-#undef KFileTimedReadAll
-LIB_EXPORT rc_t CC KFileTimedReadAll ( const KFile_v1 *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read, struct timeout_t *tm )
-{
-    return KFileTimedReadAll_v1 ( self, pos, buffer, bsize, num_read, tm );
-}
-
-#undef KFileReadExactly
-LIB_EXPORT rc_t CC KFileReadExactly ( const KFile_v1 *self, 
-    uint64_t pos, void *buffer, size_t bytes )
-{
-    return KFileReadExactly_v1 ( self, pos, buffer, bytes );
-}
-
-#undef KFileTimedReadExactly
-LIB_EXPORT rc_t CC KFileTimedReadExactly ( const KFile_v1 *self,
-    uint64_t pos, void *buffer, size_t bytes, struct timeout_t *tm )
-{
-    return KFileTimedReadExactly_v1 ( self, pos, buffer, bytes, tm );
-}
-
-#undef KFileWrite
-LIB_EXPORT rc_t CC KFileWrite ( KFile_v1 *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    return KFileWrite_v1 ( self, pos, buffer, size, num_writ );
-}
-
-#undef KFileTimedWrite
-LIB_EXPORT rc_t CC KFileTimedWrite ( KFile_v1 *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm )
-{
-    return KFileTimedWrite_v1 ( self, pos, buffer, size, num_writ, tm );
-}
-
-#undef KFileWriteAll
-LIB_EXPORT rc_t CC KFileWriteAll ( KFile_v1 *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    return KFileWriteAll_v1 ( self, pos, buffer, size, num_writ );
-}
-
-#undef KFileTimedWriteAll
-LIB_EXPORT rc_t CC KFileTimedWriteAll ( KFile_v1 *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm )
-{
-    return KFileTimedWriteAll_v1 ( self, pos, buffer, size, num_writ, tm );
-}
-
-#if 0
-#undef KFileWriteExactly
-LIB_EXPORT rc_t CC KFileWriteExactly ( KFile_v1 *self, 
-    uint64_t pos, const void *buffer, size_t bytes )
-{
-    return KFileWriteExactly_v1 ( self, pos, buffer, bytes );
-}
-
-#undef KFileTimedWriteExactly
-LIB_EXPORT rc_t CC KFileTimedWriteExactly ( KFile_v1 *self, 
-    uint64_t pos, const void *buffer, size_t bytes, struct timeout_t *tm )
-{
-    return KFileTimedWriteExactly_v1 ( self, pos, buffer, bytes, tm ); 
-}
-#endif
-
-#undef KFileMakeStdIn
-LIB_EXPORT rc_t CC KFileMakeStdIn ( const KFile_v1 **std_in )
-{
-    return KFileMakeStdIn_v1 ( std_in );
-}
-
-#undef KFileMakeStdOut
-LIB_EXPORT rc_t CC KFileMakeStdOut ( KFile_v1 **std_out )
-{
-    return KFileMakeStdOut_v1 ( std_out );
-}
-
-#undef KFileMakeStdErr
-LIB_EXPORT rc_t CC KFileMakeStdErr ( KFile_v1 **std_err )
-{
-    return KFileMakeStdErr_v1 ( std_err );
-}
diff --git a/libs/kfs/fileformat-priv.h b/libs/kfs/fileformat-priv.h
deleted file mode 100644
index 4f19e62..0000000
--- a/libs/kfs/fileformat-priv.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_fileformat_priv_
-#define _h_fileformat_priv_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-}
-#endif
-
-#include <klib/debug.h>
-
-#define	DEBUG_KFF	1
-
-#ifndef	DEBUG_KFF
-#define	DEBUG_KFF	0
-#endif
-
-#ifdef _DEBUGGING
-#define FUNC_ENTRY() /* DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_KFFENTRY), ("Enter: %s\n", __func__)) */
-#define KFF_DEBUG(msg) DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_KFF), msg)
-#else
-#define FUNC_ENTRY()
-#define KFF_DEBUG(msg)
-#endif
-
-#define KFILEFORMAT_LATEST 1
-
-#define DESCRLEN_MAX	(256)
-
-typedef struct KFFTables KFFTables;
-/* -----
- * KFFTablesMake
- *	Build the tables that contain classes and types.
- *
- * This make installs only a default "unknown" description which
- * will end up with class id and file id of 0.  This FileId 0 will
- * be in class with id of 0.
- */
-rc_t KFFTablesMake (KFFTables ** kmmtp);
-
-/* -----
- * KFFTablesAddClass
- *	Add class with description (descr) to the tables
- *	new class id is returned to where pclass points.
- *	if pclass is NULL the new ID is not returned
- */
-rc_t KFFTablesAddClass (KFFTables * self,
-			KFileFormatClass * pclass, /* returned new ID */
-			const char * descr,
-			size_t descrlen);
-
-/* -----
- * KFFTablesAddType
- *	Add type with description (descr) to the tables
- *	new type id is returned to where ptype points.
- *	if ptype is NULL the new ID is not returned
- *	the new type will be in the refered class
- */
-rc_t KFFTablesAddType (KFFTables * self,
-		       KFileFormatType * ptype, /* returned new ID */
-		       const char * class,
-		       const char * type,
-		       size_t clen,
-		       size_t tlen);
-
-rc_t KFFTablesAddRef (const KFFTables * self);
-rc_t KFFTablesRelease (const KFFTables * cself);
-
-rc_t KFFTablesGetClassDescr (const KFFTables * self,
-			     KFileFormatClass tid,
-			     size_t * len,
-			     char ** pd);
-rc_t KFFTablesGetTypeDescr (const KFFTables * self,
-			    KFileFormatType tid,
-			    size_t * len,
-			    char ** pd);
-rc_t KFFTablesGetClassId (const KFFTables * self,
-			  const char ** pd,
-			  KFileFormatClass * cid);
-rc_t KFFTablesGetTypeId (const KFFTables * self,
-			 const char * pd,
-			 KFileFormatType * tid,
-			 KFileFormatClass * cid);
-
-
-
-
-
-
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_fileformat_priv_ */
diff --git a/libs/kfs/fileformat.c b/libs/kfs/fileformat.c
deleted file mode 100644
index 97590cf..0000000
--- a/libs/kfs/fileformat.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-#include <klib/rc.h>
-#include <kfs/fileformat.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <sysalloc.h>
-
-
-/* #include <kfs/directory.h> */
-
-#include "impl.h"
-
-#include <stdio.h> /* remove after debugging */
-#include <ctype.h>
-#include <os-native.h>
-#include <string.h>
-
-struct KDirectory;
-
-
-/*--------------------------------------------------------------------------
- * KFileFormat
- *  
- */
-
-
-/* Destroy
- *  destroy file
- */
-rc_t CC KFileFormatDestroy ( KFileFormat *self )
-{
-    FUNC_ENTRY();
-
-    if (self == NULL)
-        return RC (rcFS, rcFile, rcDestroying, rcSelf, rcNull);
-
-    switch (self->vt->v1 . maj)
-    {
-    case 1:
-        return (* self->vt->v1 . destroy) (self);
-    }
-
-    return RC (rcFS, rcFile, rcDestroying, rcInterface, rcBadVersion);
-}
-
-/* AddRef
- *  creates a new reference
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KFileFormatAddRef ( const KFileFormat *self )
-{
-    FUNC_ENTRY();
-    if (self != NULL)
-        atomic32_inc (& ((KFileFormat*) self)->refcount);
-    return 0;
-}
-
-/* Release
- *  discard reference to file
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KFileFormatRelease ( const KFileFormat *cself )
-{
-    FUNC_ENTRY();
-    if (cself != NULL)
-    {
-	KFileFormat *self = (KFileFormat*)cself;
-        if (atomic32_dec_and_test (&self->refcount))
-	    return  KFileFormatDestroy (self);
-    }
-    return 0;
-}
-
-
-/* Type
- *  returns a KFileFormatDesc
- *  [OUT] rc_t               return
- *  [IN]  const KFileFormat *  self         
- *  [IN]  void **            buffer       buffer to hold returned description
- *  [IN]  size_t             buffer_size  size of the buffer
- *  [OUT] char **            descr        text description of file type
- *  [IN]  size_t             descr_max    maximum size of string descr can hold
- *  [OUT] size_t *           descr_len    length of returned descr (not including NUL
- */
-LIB_EXPORT rc_t CC KFileFormatGetTypePath ( const KFileFormat *self, 
-			     const struct KDirectory * dir, const char * path,
-			     KFileFormatType * type, KFileFormatClass * class,
-			     char * description, size_t descriptionmax,
-			     size_t * descriptionlength )
-{
-    FUNC_ENTRY();
-
-    if (self == NULL)
-        return RC (rcFF, rcFileFormat, rcClassifying, rcSelf, rcNull);
-
-    switch (self->vt->v1.maj)
-    {
-    case 1:
-        if (self->vt->v1.min >= 1)
-	    return (* self->vt->v1 . gettypepath) (self, dir, path, type, class,
-						   description, descriptionmax,
-						   descriptionlength);
-        break;
-    }
-    return RC (rcFF, rcFileFormat, rcClassifying, rcInterface, rcBadVersion);
-}
-
-LIB_EXPORT rc_t CC KFileFormatGetTypeBuff ( const KFileFormat *self, const void * buff, size_t buff_len,
-			     KFileFormatType * type, KFileFormatClass * class,
-			     char * description, size_t descriptionmax,
-			     size_t * descriptionlength )
-{
-    FUNC_ENTRY();
-
-    if (self == NULL)
-        return RC (rcFF, rcFileFormat, rcClassifying, rcSelf, rcNull);
-
-    switch (self->vt->v1.maj)
-    {
-    case 1:
-        if (self->vt->v1.min >= 1)
-	    return (* self->vt->v1 . gettypebuff) (self, buff, buff_len, type, class,
-						   description, descriptionmax,
-						   descriptionlength);
-        break;
-    }
-    return RC (rcFF, rcFileFormat, rcClassifying, rcInterface, rcBadVersion);
-}
-
-LIB_EXPORT rc_t CC KFileFormatGetClassDescr ( const KFileFormat *self, KFileFormatClass c,
-			       char * description, size_t descriptionmax )
-{
-    rc_t rc;
-    size_t max;
-
-#undef ERROR
-#define ERROR "ERROR"
-#undef NOT_FOUND
-#define NOT_FOUND "NOT FOUND"
-
-    FUNC_ENTRY();
-
-    if (c < kffcError)
-    {
-    error:
-	max = (sizeof (ERROR) > descriptionmax-1) ? descriptionmax-1 : sizeof (ERROR)-1;
-	memcpy (description, ERROR, max);
-	description[max] = '\0';
-	return 0;
-    }
-    else if (c == kffcNotFound)
-    {
-	max = (sizeof (NOT_FOUND) > descriptionmax-1) ? descriptionmax-1 : sizeof (NOT_FOUND)-1;
-	memcpy (description, NOT_FOUND, max);
-	description[max] = '\0';
-	return 0;
-    }
-    else
-    {
-	char * cp;
-	size_t z;
-
-	rc = KFFTablesGetClassDescr(self->tables, c, &z, &cp);
-	if (rc)
-	    goto error;
-	max = (z > descriptionmax-1) ? descriptionmax-1 : z;
-	memcpy (description, cp, max);
-	description[max] = '\0';
-	return 0;
-    }
-
-#undef ERROR
-#undef NOT_FOUND
-}
-static
-rc_t KFileFormatInitTypeAndClass (KFileFormat *self, const char * typeAndClass,
-			    size_t len)
-{
-    rc_t rc;
-    const char * type;
-    const char * class;
-    const char * tab;
-    const char * newline;
-    const char * line;
-    const char * limit;
-
-    FUNC_ENTRY();
-
-    rc = 0;
-    limit = typeAndClass + len;
-    for (line = typeAndClass; line < limit; line = newline+1)
-    {
-	for (type = line; isspace (*type) && len; len--, type++)
-	{
-	    if (len == 0)
-		break;
-	}
-	newline = memchr (type, '\n', len);
-	if (newline == NULL)
-	    newline = type + len;
-	if (*type == '#')
-	{
-	    /* -----
-	     * skip this line
-	     */
-	    len -= newline+1 - type;
-	    continue;
-	}
-	tab = memchr (type, '\t', len);
-	if (tab == NULL)
-	{
-	    rc = RC (rcFF, rcFileFormat, rcConstructing, rcFile, rcInvalid);
-	    LOGERR (klogFatal, rc, "No <TAB> between type and class");
-	    break;
-	}
-	class = tab + 1;
-	for ( len -= class - line;
-	      isspace (*class); len--, class++)
-	{
-	    if (len == 0)
-	    {
-		rc = RC (rcFF, rcFileFormat, rcConstructing, rcFile, rcInvalid);
-		LOGERR (klogFatal, rc, "No class after <TAB>");
-		break;
-	    }
-	}
-	if (newline == class)
-	{
-	    rc = RC (rcFF, rcFileFormat, rcConstructing, rcFile, rcInvalid);
-	    LOGERR (klogFatal, rc, "No class after whitespace");
-	    break;
-	}
-	rc = KFFTablesAddType (self->tables, NULL, class, type, newline-class, tab-type);
-	if (rc != 0)
-	    break;
-    }
-
-    return rc;
-}
-
-rc_t CC KFileFormatInit ( KFileFormat *self, const KFileFormat_vt *vt,
-		      const char * typeAndClass, size_t len )
-{
-    rc_t rc = 0;
-
-    FUNC_ENTRY();
-
-    self->vt = vt;
-    atomic32_set (&self->refcount,1);
-
-    rc = KFFTablesMake(&self->tables);
-    if (rc == 0)
-    {
-	rc = KFileFormatInitTypeAndClass (self, typeAndClass, len);
-
-
-        /* memory leak?  If Tables Make succeeds and InitType and Class fails do we leak? */
-
-    }
-    return rc;
-}
-
-
-
-
diff --git a/libs/kfs/from_to_namelist.c b/libs/kfs/from_to_namelist.c
deleted file mode 100644
index b96028d..0000000
--- a/libs/kfs/from_to_namelist.c
+++ /dev/null
@@ -1,454 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <kfs/extern.h>
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/namelist.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-#include <sysalloc.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/* ****************************************************************************************** */
-
-
-#define STATE_ALPHA 0
-#define STATE_LF 1
-#define STATE_NL 2
-
-
-typedef struct buffer_range
-{
-    const char * start;
-    uint32_t processed, count, state;
-} buffer_range;
-
-
-static const char empty_str[ 2 ] = { ' ', 0 };
-
-
-static void LoadFromBuffer( VNamelist * nl, buffer_range * range )
-{
-    uint32_t idx;
-    const char * p = range->start;
-    String S;
-
-    S.addr = p;
-    S.len = S.size = range->processed;
-    for ( idx = range->processed; idx < range->count; ++idx )
-    {
-        switch( p[ idx ] )
-        {
-            case 0x0A : switch( range->state )
-                        {
-                            case STATE_ALPHA : /* ALPHA --> LF */
-                                                VNamelistAppendString ( nl, &S );
-                                                range->state = STATE_LF;
-                                                break;
-
-                            case STATE_LF : /* LF --> LF */
-                                             VNamelistAppend ( nl, empty_str );
-                                             break;
-
-                            case STATE_NL : /* NL --> LF */
-                                             VNamelistAppend ( nl, empty_str );
-                                             range->state = STATE_LF;
-                                             break;
-                        }
-                        break;
-
-            case 0x0D : switch( range->state )
-                        {
-                            case STATE_ALPHA : /* ALPHA --> NL */
-                                                VNamelistAppendString ( nl, &S );
-                                                range->state = STATE_NL;
-                                                break;
-
-                            case STATE_LF : /* LF --> NL */
-                                             range->state = STATE_NL;
-                                             break;
-
-                            case STATE_NL : /* NL --> NL */
-                                             VNamelistAppend ( nl, empty_str );
-                                             break;
-                        }
-                        break;
-
-            default   : switch( range->state )
-                        {
-                            case STATE_ALPHA : /* ALPHA --> ALPHA */
-                                                S.len++; S.size++;
-                                                break;
-
-                            case STATE_LF : /* LF --> ALPHA */
-                                             S.addr = &p[ idx ]; S.len = S.size = 1;
-                                             range->state = STATE_ALPHA;
-                                             break;
-
-                            case STATE_NL : /* NL --> ALPHA */
-                                             S.addr = &p[ idx ]; S.len = S.size = 1;
-                                             range->state = STATE_ALPHA;
-                                             break;
-                        }
-                        break;
-        }
-    }
-    if ( range->state == STATE_ALPHA )
-    {
-        range->start = S.addr;
-        range->count = S.len;
-    }
-    else
-        range->count = 0;
-}
-
-
-static rc_t LoadFromFile( struct KFile const * f, VNamelist * nl )
-{
-    rc_t rc = 0;
-    uint64_t pos = 0;
-    char buffer[ 4096 ];
-    buffer_range range;
-    bool done = false;
-
-    range.start = buffer;
-    range.count = 0;
-    range.processed = 0;
-    range.state = STATE_ALPHA;
-
-    do
-    {
-        size_t num_read;
-        rc = KFileRead ( f, pos, ( char * )( range.start + range.processed ),
-                        ( sizeof buffer ) - range.processed, &num_read );
-        if ( rc == 0 )
-        {
-            done = ( num_read == 0 );
-            if ( !done )
-            {
-                range.start = buffer;
-                range.count = range.processed + num_read;
-
-                LoadFromBuffer( nl, &range );
-                if ( range.count > 0 )
-                {
-                    memmove ( buffer, range.start, range.count );
-                }
-                range.start = buffer;
-                range.processed = range.count;
-
-                pos += num_read;
-            }
-            else if ( range.state == STATE_ALPHA )
-            {
-                String S;
-                S.addr = range.start;
-                S.len = S.size = range.count;
-                VNamelistAppendString ( nl, &S );
-            }
-        }
-    } while ( rc == 0 && !done );
-
-    return rc;
-}
-
-
-
-/* -----
-
- * loads the content of a KFile into a Namelist
- *
- */
-LIB_EXPORT rc_t CC LoadKFileToNameList( struct KFile const * self, VNamelist * namelist )
-{
-    rc_t rc;
-    if ( self == NULL )
-        rc = RC( rcFS, rcFile, rcValidating, rcSelf, rcNull );
-    else if ( namelist == NULL )
-        rc = RC( rcFS, rcFile, rcValidating, rcParam, rcNull );
-    else
-        rc = LoadFromFile( self, namelist );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC LoadFileByNameToNameList( VNamelist * namelist, const char * filename )
-{
-    rc_t rc;
-    if ( namelist == NULL || filename == NULL )
-        rc = RC( rcFS, rcFile, rcValidating, rcParam, rcNull );
-    else
-    {
-        KDirectory * dir;
-        rc = KDirectoryNativeDir ( &dir );
-        if ( rc == 0 )
-        {
-            KFile const * f;
-            rc = KDirectoryOpenFileRead ( dir, &f, "%s", filename );
-            if ( rc == 0 )
-            {
-                if ( rc == 0 )
-                    rc = LoadFromFile( f, namelist );
-                KFileRelease ( f );
-            }
-            KDirectoryRelease ( dir );
-        }
-    }
-    return rc;
-
-}
-
-
-static rc_t SaveToFile( struct KFile * f, const VNamelist * nl, const char * delim )
-{
-    uint32_t count;
-    rc_t rc = VNameListCount ( nl, &count );
-    if ( rc == 0 && count > 0 )
-    {
-        uint32_t idx;
-        uint64_t pos = 0;
-        for ( idx = 0; idx < count && rc == 0; ++idx )
-        {
-            const char * s;
-            rc = VNameListGet ( nl, idx, &s );
-            if ( rc == 0 && s != NULL )
-            {
-                size_t num_writ;
-                rc = KFileWriteAll ( f, pos, s, string_size ( s ), &num_writ );
-                if ( rc == 0 )
-                {
-                    pos += num_writ;
-                    rc = KFileWriteAll ( f, pos, delim, string_size ( delim ), &num_writ );
-                    if ( rc == 0 )
-                        pos += num_writ;
-                }
-            }
-        }
-        if ( rc == 0 )
-            rc = KFileSetSize ( f, pos );
-    }
-    return rc;
-}
-
-
-static rc_t ProcessFromBuffer( buffer_range * range,
-    rc_t ( CC * on_line )( const String * line, void * data ), void * data  )
-{
-    rc_t rc = 0;
-    uint32_t idx;
-    const char * p = range->start;
-    String S;
-
-    S.addr = p;
-    S.len = S.size = range->processed;
-    for ( idx = range->processed; idx < range->count && rc == 0; ++idx )
-    {
-        switch( p[ idx ] )
-        {
-            case 0x0A : switch( range->state )
-                        {
-                            case STATE_ALPHA : /* ALPHA --> LF */
-                                                rc = on_line( &S, data );
-                                                range->state = STATE_LF;
-                                                break;
-
-                            case STATE_LF : /* LF --> LF */
-                                             break;
-
-                            case STATE_NL : /* NL --> LF */
-                                             range->state = STATE_LF;
-                                             break;
-                        }
-                        break;
-
-            case 0x0D : switch( range->state )
-                        {
-                            case STATE_ALPHA : /* ALPHA --> NL */
-                                                rc = on_line( &S, data );
-                                                range->state = STATE_NL;
-                                                break;
-
-                            case STATE_LF : /* LF --> NL */
-                                             range->state = STATE_NL;
-                                             break;
-
-                            case STATE_NL : /* NL --> NL */
-                                             break;
-                        }
-                        break;
-
-            default   : switch( range->state )
-                        {
-                            case STATE_ALPHA : /* ALPHA --> ALPHA */
-                                                S.len++; S.size++;
-                                                break;
-
-                            case STATE_LF : /* LF --> ALPHA */
-                                             S.addr = &p[ idx ]; S.len = S.size = 1;
-                                             range->state = STATE_ALPHA;
-                                             break;
-
-                            case STATE_NL : /* NL --> ALPHA */
-                                             S.addr = &p[ idx ]; S.len = S.size = 1;
-                                             range->state = STATE_ALPHA;
-                                             break;
-                        }
-                        break;
-        }
-    }
-    if ( range->state == STATE_ALPHA )
-    {
-        range->start = S.addr;
-        range->count = S.len;
-    }
-    else
-        range->count = 0;
-    return rc;
-}
-
-
-static rc_t ProcessLineByLine( struct KFile const * f,
-        rc_t ( CC * on_line )( const String * line, void * data ), void * data )
-{
-    rc_t rc = 0;
-    uint64_t pos = 0;
-    char buffer[ 4096 ];
-    buffer_range range;
-    bool done = false;
-
-    range.start = buffer;
-    range.count = 0;
-    range.processed = 0;
-    range.state = STATE_ALPHA;
-
-    do
-    {
-        size_t num_read;
-        rc = KFileRead ( f, pos, ( char * )( range.start + range.processed ),
-                        ( sizeof buffer ) - range.processed, &num_read );
-        if ( rc == 0 )
-        {
-            done = ( num_read == 0 );
-            if ( !done )
-            {
-                range.start = buffer;
-                range.count = range.processed + num_read;
-
-                rc = ProcessFromBuffer( &range, on_line, data );
-                if ( range.count > 0 )
-                {
-                    memmove ( buffer, range.start, range.count );
-                }
-                range.start = buffer;
-                range.processed = range.count;
-
-                pos += num_read;
-            }
-            else if ( range.state == STATE_ALPHA )
-            {
-                String S;
-                S.addr = range.start;
-                S.len = S.size = range.count;
-                rc = on_line( &S, data );
-            }
-        }
-    } while ( rc == 0 && !done );
-
-    return rc;
-}
-
-/* -----
-
- * processes each line in a KFile by the callback
- *
- */
-LIB_EXPORT rc_t CC ProcessFileLineByLine( struct KFile const * self,
-    rc_t ( CC * on_line )( const String * line, void * data ), void * data )
-{
-    rc_t rc;
-    if ( self == NULL )
-        rc = RC( rcFS, rcFile, rcValidating, rcSelf, rcNull );
-    else if ( on_line == NULL )
-        rc = RC( rcFS, rcFile, rcValidating, rcParam, rcNull );
-    else
-        rc = ProcessLineByLine( self, on_line, data );
-    return rc;
-}
-
- 
- 
-/* -----
-
- * writes content of a Namelist into a KFile
- *
- */
-
-LIB_EXPORT rc_t CC WriteNameListToKFile( struct KFile * self, const VNamelist * namelist, 
-                                         const char * delim )
-{
-    rc_t rc;
-    if ( self == NULL )
-        rc = RC( rcFS, rcFile, rcValidating, rcSelf, rcNull );
-    else if ( namelist == NULL )
-        rc = RC( rcFS, rcFile, rcValidating, rcParam, rcNull );
-    else
-        rc = SaveToFile( self, namelist, delim );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC WriteNamelistToFileByName( const VNamelist * namelist, const char * filename,
-                                                 const char * delim )
-{
-    rc_t rc;
-    if ( namelist == NULL || filename == NULL || delim == NULL )
-        rc = RC( rcFS, rcFile, rcValidating, rcParam, rcNull );
-    else
-    {
-        KDirectory * dir;
-        rc = KDirectoryNativeDir ( &dir );
-        if ( rc == 0 )
-        {
-            KFile * f;
-            rc = KDirectoryCreateFile( dir, &f, true, 0664, kcmInit, "%s", filename );
-            if ( rc == 0 )
-            {
-                if ( rc == 0 )
-                    rc = SaveToFile( f, namelist, delim );
-                KFileRelease ( f );
-            }
-            KDirectoryRelease ( dir );
-        }
-    }
-    return rc;
-}
diff --git a/libs/kfs/gzip.c b/libs/kfs/gzip.c
deleted file mode 100644
index beb22fb..0000000
--- a/libs/kfs/gzip.c
+++ /dev/null
@@ -1,646 +0,0 @@
-/*==============================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-struct KGZipFile;
-#define KFILE_IMPL struct KGZipFile
-
-#include <kfs/extern.h>
-#include <kfs/impl.h>  /* KFile_vt_v1 */
-#include <kfs/gzip.h>  /* KFileMakeGzipFor... */
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <sysalloc.h>
-
-#include <zlib.h>      /* z_stream */
-#include <assert.h>
-#include <stdlib.h>    /* malloc */
-#include <string.h> /* memset */
-
-#ifdef _DEBUGGING
-#define GZIP_DEBUG(msg) DBGMSG(DBG_KFS,DBG_FLAG(DBG_KFS_GZIP), msg)
-#else
-#define GZIP_DEBUG(msg)
-#endif
-
-/***************************************************************************************/
-/* Gzip File                                                                     */
-/***************************************************************************************/
-
-#define GZFCHUNK 0x20000    /* 128K */
-/** Gzip KFile structure */
-struct KGZipFile {
-    KFile dad;
-    KFile *file; /* inderlying KFile */
-    uint64_t filePosition;
-    uint64_t myPosition;
-    z_stream strm;
-    unsigned char buff[GZFCHUNK]; /* buffer to cache KFile data */
-    bool completed;
-};
-typedef struct KGZipFile KGZipFile;
-
-/* virtual functions declarations (definitions for unsupported ) ***********************/
-
-static struct KSysFile *CC s_GetSysFile(const KGZipFile *self,
-    uint64_t *offset)
-{ return NULL; }
-
-static rc_t CC s_FileRandomAccess(const KGZipFile *self)
-{ return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported ); }
-
-static uint32_t CC s_FileType ( const KGZipFile *self )
-{ return KFileType ( self -> file ); }
-
-static rc_t CC s_FileSize(const KGZipFile *self, uint64_t *size)
-{ return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported ); }
-
-static rc_t CC s_FileSetSize(KGZipFile *self,
-    uint64_t size)
-{ return RC ( rcFS, rcFile, rcUpdating, rcFunction, rcUnsupported ); }
-
-/* read-only methods *******************************************************************/
-
-static rc_t CC KGZipFile_InDestroy(KGZipFile *self);
-
-static rc_t CC KGZipFile_InRead(const KGZipFile *cself,
-    uint64_t pos,
-    void *buffer,
-    size_t bsize,
-    size_t *num_read);
-
-static rc_t CC KGZipFile_InWrite(KGZipFile *self,
-    uint64_t pos,
-    const void *buffer,
-    size_t size,
-    size_t *num_writ)
-{ return RC ( rcFS, rcFile, rcWriting, rcFunction, rcUnsupported ); }
-
-/** virtual table **********************************************************************/
-static KFile_vt_v1 s_vtKFile_InGz = {
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KGZipFile_InDestroy,
-    s_GetSysFile,
-    s_FileRandomAccess,
-    s_FileSize,
-    s_FileSetSize,
-    KGZipFile_InRead,
-    KGZipFile_InWrite,
-
-    /* 1.1 */
-    s_FileType
-};
-
-#define WINDOW_BITS (15 + 16)
-
-/** Factory method definition **********************************************************/
-
-LIB_EXPORT rc_t CC KFileMakeGzipForRead( const struct KFile **result,
-    const struct KFile *file )
-{
-    rc_t rc;
-    z_stream* strm;
-    KGZipFile *obj;
-
-    if ( result == NULL || file == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-
-    obj = (KGZipFile*) malloc(sizeof(KGZipFile));
-    if (!obj)
-        return RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-
-    rc = KFileInit(&obj->dad, (const KFile_vt*) &s_vtKFile_InGz, "KGZipFile", "no-name", true, false);
-    if (rc != 0) {
-        free(obj);
-        return rc;
-    }
-
-    strm = &obj->strm;
-    strm->zalloc   = Z_NULL;
-    strm->zfree    = Z_NULL;
-    strm->opaque   = Z_NULL;
-    strm->avail_in = 0;
-    strm->next_in  = Z_NULL;
-
-    /* TBD - this should check gzlib error codes */
-    if (inflateInit2(strm, WINDOW_BITS) != Z_OK) {
-        free(obj);
-        return RC ( rcFS, rcFile, rcConstructing, rcNoObj, rcUnknown );
-    }
-
-        obj->myPosition   = 0;
-        obj->filePosition = 0;
-
-    rc = KFileAddRef(file);
-    if ( rc != 0 )
-    {
-        obj->file = NULL;
-        KGZipFile_InDestroy ( obj );
-    }
-    else
-    {
-        obj->file = (KFile*) file;
-        obj->completed = true; /* we could have an empty file and this would be okay */
-        *result = &obj->dad;
-    }
-
-    return rc;
-}
-
-/* private functions declarations ******************************************************/
-
-static rc_t z_read ( KGZipFile * self, void * buffer, size_t bsize, size_t * num_read );
-static rc_t z_skip (KGZipFile *self, uint64_t pos);
-
-/* virtual functions definitions *******************************************************/
-
-static rc_t CC KGZipFile_InDestroy(KGZipFile *self) {
-    rc_t rc = KFileRelease(self->file);
-    if (rc == 0) {
-        inflateEnd(&self->strm);
-        free(self);
-    }
-
-    return rc;
-}
-
-static rc_t CC KGZipFile_InRead(const KGZipFile *cself,
-    uint64_t pos,
-    void *buffer,
-    size_t bsize,
-    size_t *num_read)
-{
-    KGZipFile *self = (KGZipFile*) cself;
-    rc_t rc = 0;
-
-    size_t numRead = 0, ignore;
-    if (!num_read)
-    {   num_read = &ignore; }
-
-    *num_read = 0;
-
-    if (!cself || !buffer)
-        return RC ( rcFS, rcFile, rcReading, rcParam, rcNull );
-
-    if (!bsize)
-    {   return 0; }
-
-    if (pos < self->myPosition)
-    {
-	return RC ( rcFS, rcFile, rcReading, rcParam, rcInvalid );
-    }
-
-    GZIP_DEBUG(("%s: pos %lu bsize %zu\n", __func__, pos, bsize));
-
-    if (pos > self->myPosition)
-    {
-	rc =  z_skip (self, pos);
-	if (rc)
-	    return rc;
-	if (pos != self->myPosition)
-	    return 0;
-    }
-
-    rc = z_read ( self, buffer, bsize, &numRead );
-    if (rc)
-	return rc;
-
-    *num_read = numRead;
-
-    self->myPosition += numRead;
-
-    return 0;
-}
-
-/* private functions definitions *******************************************************/
-
-static rc_t z_read ( KGZipFile * self, void * buffer, size_t bsize, size_t * _num_read )
-{
-    rc_t rc = 0;
-    size_t num_read, bleft ;
-
-    GZIP_DEBUG(("%s: Enter\n",__func__));
-
-
-    for (num_read = 0, bleft=bsize; bleft  > 0; )
-    {
-        z_stream * strm = &self->strm;
-        size_t src_read;
-        int zret;
-        
-        strm->next_out  = (uint8_t*)buffer + num_read;
-        strm->avail_out = (uInt) bleft;
-
-        GZIP_DEBUG(("%s: call inflate\n",__func__));
-
-
-        GZIP_DEBUG(("%s: before inflate next_in %14p avail_in %6u total_in %10lu next_out %14p avail_out %6u total_out %10lu\n",
-                    __func__, strm->next_in, strm->avail_in, strm->total_in,
-                    strm->next_out, strm->avail_out, strm->total_out));
-
-        zret = inflate (strm, Z_NO_FLUSH);
-
-        GZIP_DEBUG(("%s: after inflate  next_in %14p avail_in %6u total_in %10lu next_out %14p avail_out %6u total_out %10lu\n",
-                    __func__, strm->next_in, strm->avail_in, strm->total_in,
-                    strm->next_out, strm->avail_out, strm->total_out));
-
-	bleft = strm->avail_out;
-	num_read = bsize - bleft;
-
-        switch (zret)
-        {
-            /* unexpected error returns from zlib */
-        default:
-        case Z_ERRNO:
-            GZIP_DEBUG(("%s: unknown error %d\n",__func__, zret));
-            return RC (rcFS, rcFile, rcReading, rcFile, rcUnknown);
-
-            /* known unfixable errors */
-        case Z_STREAM_ERROR:
-            GZIP_DEBUG(("%s: stream error %d\n",__func__, zret));
-            return RC (rcFS, rcFile, rcReading, rcSelf, rcCorrupt);
-
-        case Z_DATA_ERROR:
-            GZIP_DEBUG(("%s: data error %d\n",__func__, zret));
-            return RC (rcFS, rcFile, rcReading, rcData, rcCorrupt);
-
-        case Z_STREAM_END:
-            GZIP_DEBUG(("%s: stream end %d\n",__func__, zret));
-            self->completed = true;
-            zret = inflateReset (strm);
-            GZIP_DEBUG (("%s: recall inflateReset zret = %d\n",__func__,zret));
-            switch (zret)
-            {
-            case Z_OK:
-                break;
-            default:
-                rc = RC (rcFS, rcFile, rcReading, rcData, rcInvalid);
-                break;
-            }
-            break;
-
-        case Z_BUF_ERROR:
-            GZIP_DEBUG(("%s: buf error %d\n",__func__, zret));
-            if (strm->avail_out > 0)
-            {
-                rc = KFileRead (self->file, self->filePosition, 
-                                self->buff, sizeof (self->buff), &src_read);
-                if (rc)
-                    break;
-
-                strm->avail_in = (uInt) src_read;
-                self->filePosition += src_read;
-                strm->next_in = self->buff;
-                if (src_read)
-                    self->completed = false;
-                else if (self->completed)
-                    goto done;
-                else if (zret == Z_BUF_ERROR)
-                {                
-                    /* this is either a truncated file or a blocked stream
-                     * code outside of here has to handle it */
-                    GZIP_DEBUG(("%s: truncated input\n",__func__));
-                    rc = RC (rcFS, rcFile, rcReading, rcData, rcInsufficient);
-                    break;
-                }
-            }
-            break;
-        case Z_OK:
-            break;
-        }
-        if (rc)
-            break;
-    }
-done:
-    *_num_read = num_read;
-    return rc;
-}
-
-static rc_t z_skip (KGZipFile *self, uint64_t pos)
-{
-    rc_t rc = 0;
-    size_t num_read = 0; /* superfluous to quiet compiler */
-    size_t to_read;
-    uint8_t buff [ 32 * 1024 ];
-
-    GZIP_DEBUG(("%s: enter pos %lu\n",__func__, pos));
-
-    for ( to_read = sizeof buff; self -> myPosition < pos; self -> myPosition += num_read )
-    {
-	if (self->myPosition + sizeof buff > pos)
-	    to_read = pos - self->myPosition;
-
-        GZIP_DEBUG(("%s: call z_read to_read %zu \n",__func__));
-
-	rc = z_read ( self, buff, to_read, &num_read );
-
-        GZIP_DEBUG(("%s: return z_read num_read %zu \n",__func__));
-
-	if ( rc )
-	    break;
-
-	if (num_read == 0)
-	    break;
-
-    }
-    return rc;
-}
-
-/***************************************************************************************/
-/* Gzip Output File                                                                    */
-/***************************************************************************************/
-
-/* write-only methods ******************************************************************/
-
-static rc_t CC KGZipFile_OutDestroy(KGZipFile *self);
-
-static rc_t CC KGZipFile_OutRead(const KGZipFile *cself,
-    uint64_t pos,
-    void *buffer,
-    size_t bsize,
-    size_t *num_read)
-{ return RC ( rcFS, rcFile, rcReading, rcFunction, rcUnsupported ); }
-
-static rc_t CC KGZipFile_OutWrite(KGZipFile *self,
-    uint64_t pos,
-    const void *buffer,
-    size_t bsize,
-    size_t *num_writ);
-
-/** virtual table **********************************************************************/
-static KFile_vt_v1 s_vtKFile_OutGz = {
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KGZipFile_OutDestroy,
-    s_GetSysFile,
-    s_FileRandomAccess,
-    s_FileSize,
-    s_FileSetSize,
-    KGZipFile_OutRead,
-    KGZipFile_OutWrite,
-
-    /* 1.1 */
-    s_FileType
-};
-
-/** Factory method definition **********************************************************/
-LIB_EXPORT rc_t CC KFileMakeGzipForWrite( struct KFile **result,
-    struct KFile *file )
-{
-    rc_t rc;
-    z_stream* strm;
-    KGZipFile *obj;
-
-    if ( result == NULL || file == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-
-    obj = (KGZipFile*) malloc(sizeof(KGZipFile));
-    if (!obj)
-        return RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-
-    rc = KFileInit(&obj->dad, (const KFile_vt*) &s_vtKFile_OutGz, "KGZipFile", "no-name", false, true);
-    if (rc != 0) {
-        free(obj);
-        return rc;
-    }
-
-    strm = &obj->strm;
-    strm->zalloc   = Z_NULL;
-    strm->zfree    = Z_NULL;
-    strm->opaque   = Z_NULL;
-    strm->avail_in = 0;
-    strm->next_in  = Z_NULL;
-
-    /* TBD - this should check gzlib error codes */
-    if (deflateInit2(strm, Z_DEFAULT_COMPRESSION, Z_DEFLATED, WINDOW_BITS,
-        8, /* The default value for the memLevel parameter is 8 */
-        Z_DEFAULT_STRATEGY) != Z_OK)
-    {
-        free(obj);
-        return RC ( rcFS, rcFile, rcConstructing, rcNoObj, rcUnknown );
-    }
-
-    obj->myPosition   = 0;
-    obj->filePosition = 0;
-    obj->completed    = false;
-
-    rc = KFileAddRef(file);
-    if ( rc != 0 )
-    {
-        obj->file = NULL;
-        KGZipFile_OutDestroy ( obj );
-    }
-    else
-    {
-        obj->file = file;
-        *result = &obj->dad;
-    }
-
-    return rc;
-}
-
-/* private functions declarations ******************************************************/
-
-static int s_GzipAndWrite(KGZipFile *self,
-    int flush,
-    size_t *num_writ,
-    rc_t *rc);
-
-/* virtual functions definitions *******************************************************/
-
-static rc_t CC KGZipFile_OutDestroy( KGZipFile *self)
-{
-    rc_t rc;
-    if ( !self->completed )
-    {
-        int ret;
-        size_t wrtn;
-        z_stream* strm = &self->strm;
-        strm->avail_in = 0;
-        strm->next_in = Z_NULL;
-
-        ret = s_GzipAndWrite( self, Z_FINISH, &wrtn, &rc );
-        if ( rc != 0 )
-            return rc;
-
-        assert( ret == Z_STREAM_END ); /* stream will be complete */
-        
-        deflateEnd( strm ); /* clean up */
-        self->completed = true;
-    }
-
-    rc = KFileRelease( self->file );
-    if ( rc == 0 )
-        free( self );
-
-    return rc;
-}
-
-static rc_t CC KGZipFile_OutWrite( struct KGZipFile *self,
-    uint64_t pos,
-    const void *buffer,
-    size_t bsize,
-    size_t *num_writ )
-{
-    int ret;
-    rc_t rc;
-    z_stream* strm;
-    size_t ignore;
-    if (!num_writ)
-    {   num_writ = &ignore; }
-
-    *num_writ = 0;
-
-    if ( pos != self->myPosition )
-        return RC ( rcFS, rcFile, rcWriting, rcParam, rcInvalid );
-
-    strm = &self->strm;
-    strm->next_in  = (Bytef*) buffer;
-    strm->avail_in = (uInt) bsize;
-
-    rc = 0;
-    ret = s_GzipAndWrite( self, Z_NO_FLUSH, num_writ, &rc );
-    if ( rc != 0 )
-        return rc;
-    assert( ret != Z_STREAM_END );  /* stream will be complete */
-
-    self->myPosition += * num_writ;
-
-    return 0;
-}
-
-/* private functions definitions *******************************************************/
-
-static int s_GzipAndWrite ( KGZipFile *self,
-    int flush,
-    size_t *num_writ,
-    rc_t *rc )
-{
-    z_stream *strm;
-    uInt avail_in;
-    int ret;
-
-    assert( self && num_writ && rc );
-
-    *num_writ = 0;
-    strm = &self->strm;
-    avail_in = strm->avail_in;
-    ret = 0;
-    /* run deflate() on input until output buffer not full, finish
-       compression if all of source has been read in */
-    do {
-        uint32_t have;
-        size_t written;
-        strm->avail_out = sizeof( self->buff );
-        strm->next_out = self->buff;
-        ret = deflate( strm, flush );    /* no bad return value */
-/*
-        OUTMSG (( "deflate: ret=%u | avail-out+%u\n", ret, strm->avail_out ));
-*/
-        assert( ret != Z_STREAM_ERROR );  /* state not clobbered */
-        have = sizeof( self->buff ) - strm->avail_out;
-        written = 0;
-        *rc = KFileWrite( self->file, self->filePosition, self->buff, have, &written );
-        /* this is wrong - Z_ERRNO would tell us to check errno for error
-           but the error is in *rc */
-        if ( *rc != 0 )
-            return Z_ERRNO;
-        self->filePosition += written;
-        *num_writ = avail_in - strm->avail_in;
-    } while ( strm->avail_out == 0 );
-
-    assert( strm->avail_in == 0 );     /* all input will be used */
-    return ret;
-}
-
-/* EOF */
-
-#include <stdio.h> /* printf */
-LIB_EXPORT rc_t CC KFileMakeGzip2ForRead( const struct KFile **result,
-    const struct KFile *file )
-{
-    rc_t rc;
-    z_stream* strm;
-    KGZipFile *obj;
-
-    if ( result == NULL || file == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-
-    obj = (KGZipFile*) malloc(sizeof(KGZipFile));
-    if (!obj)
-        return RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-
-printf("KFileMakeGzip2ForRead %d\n", __LINE__);
-    rc = KFileInit(&obj->dad, (const KFile_vt*) &s_vtKFile_InGz, "KGZipFile", "no-name", true, false);
-printf("KFileMakeGzip2ForRead %d\n", __LINE__);
-    if (rc != 0) {
-        free(obj);
-        return rc;
-    }
-
-    strm = &obj->strm;
-    memset(strm, 0, sizeof *strm);
-    strm->zalloc   = Z_NULL;
-    strm->zfree    = Z_NULL;
-    strm->opaque   = Z_NULL;
-    strm->avail_in = 0;
-    strm->next_in  = Z_NULL;
-
-    /* TBD - this should check gzlib error codes */
-printf("KFileMakeGzip2ForRead %d\n", __LINE__);
-    if (inflateInit2(strm, WINDOW_BITS) != Z_OK) {
-        free(obj);
-        return RC ( rcFS, rcFile, rcConstructing, rcNoObj, rcUnknown );
-    }
-
-printf("KFileMakeGzip2ForRead %d\n", __LINE__);
-        obj->myPosition   = 0;
-        obj->filePosition = 0;
-
-printf("KFileMakeGzip2ForRead %d\n", __LINE__);
-    rc = KFileAddRef(file);
-    if ( rc != 0 )
-    {
-printf("KFileMakeGzip2ForRead %d\n", __LINE__);
-        obj->file = NULL;
-        KGZipFile_InDestroy ( obj );
-    }
-    else
-    {
-printf("KFileMakeGzip2ForRead %d\n", __LINE__);
-        obj->file = (KFile*) file;
-        obj->completed = true; /* we could have an empty file and this would be okay */
-        *result = &obj->dad;
-    }
-
-printf("KFileMakeGzip2ForRead %d\n", __LINE__);
-    return rc;
-}
diff --git a/libs/kfs/impl.h b/libs/kfs/impl.h
deleted file mode 100644
index ae37b37..0000000
--- a/libs/kfs/impl.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_impl_
-#define _h_kfs_impl_
-
-#include <klib/rc.h>
-#include <atomic.h>
-#include <kfs/fileformat.h>
-#include "fileformat-priv.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-}
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDirectory;
-
-typedef union KFileFormat_vt KFileFormat_vt;
-
-
-/*--------------------------------------------------------------------------
- * KFileFormat
- *  a virtual file
- */
-struct KFileFormat
-{
-    const KFileFormat_vt *vt;
-    atomic32_t refcount;
-    KFFTables * tables;
-};
-
-#ifndef KFILEFORMAT_IMPL
-#define KFILEFORMAT_IMPL KFileFormat
-#endif
-
-typedef struct KFileFormat_vt_v1 KFileFormat_vt_v1;
-struct KFileFormat_vt_v1
-{
-    /* version == 1.x */
-    uint32_t maj;
-    uint32_t min;
-
-    /* start minor version == 0 */
-    rc_t (*destroy) (KFILEFORMAT_IMPL * self);
-    rc_t (*gettypebuff) (const KFILEFORMAT_IMPL *self, const void * buff, size_t buff_len,
-			 KFileFormatType * type, KFileFormatClass * class,
-			 char * description, size_t descriptionmax,
-			 size_t * descriptionlength);
-    rc_t (*gettypepath) (const KFILEFORMAT_IMPL *self, const struct KDirectory * dir, const char * path,
-			 KFileFormatType * type, KFileFormatClass * class,
-			 char * description, size_t descriptionmax,
-			 size_t * descriptionlength);
-
-    /* end minor version == 0 */
-    /* start minor version == 1 */
-    /* end minor version == 1 */
-    /* end version == 1.x */
-};
-
-union KFileFormat_vt
-{
-    KFileFormat_vt_v1 v1;
-};
-
-/* Init
- *  initialize a newly allocated file object
- */
-rc_t KFileFormatInit (KFileFormat *self, const KFileFormat_vt *vt,
-		      const char * typeAndClass, size_t len);
-
-/* Destroy
- *  destroy file
- */
-rc_t KFileFormatDestroy ( KFileFormat *self );
-
-/* GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- */
-struct KSysFile *KFileFormatGetSysFile ( const KFileFormat *self, uint64_t *offset );
-
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_impl_ */
diff --git a/libs/kfs/karc-priv.h b/libs/kfs/karc-priv.h
deleted file mode 100644
index bd96614..0000000
--- a/libs/kfs/karc-priv.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_arc_priv_h_
-#define _h_kfs_arc_priv_h_
-
-typedef struct KArcTOCNode KArcTOCNode;
-
-#ifdef _DEBUGGING
-#define FUNC_ENTRY() DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_ARCENTRY), ("Enter: %s\n", __func__))
-#define ARC_DEBUG(msg) DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_ARC), msg)
-#else
-#define FUNC_ENTRY()
-#define ARC_DEBUG(msg)
-#endif
-
-
-
-#endif /* #ifndef _h_kfs_arc_priv_h_ */
-/* end of file */
diff --git a/libs/kfs/kfs-priv.h b/libs/kfs/kfs-priv.h
deleted file mode 100644
index f994f3f..0000000
--- a/libs/kfs/kfs-priv.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_priv_
-#define _h_kfs_priv_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct KFile;
-struct KMD5File;
-
-/* exported private functions
- */
-struct KFile *KMD5FileToKFile ( struct KMD5File *self );
-struct KFile const *KMD5FileToKFileConst ( struct KMD5File const *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kfs_priv_ */
diff --git a/libs/kfs/kfsmagic b/libs/kfs/kfsmagic
deleted file mode 100644
index 60ad337..0000000
--- a/libs/kfs/kfsmagic
+++ /dev/null
@@ -1,20101 +0,0 @@
-# Magic
-# Magic data for file(1) command.
-# Format is described in magic(5).
-#
-# Note: If you have edited this file you may run `file -C'
-#       to make a pre-compiled magic.mgc for faster execution
-#
-
-
-
-#--------------------------------------------------------------------------------
-# Sequence Read Archive format by International Nucleotide Sequence Database Collaboration
-# 
-
-0       string          NCBI            INDSC
->4      string          .sra            Sequence Read Archive
->8      belong          0x05031988      
->12     belong          x               , Version %u
-
-0       string          NCBI            INDSC
->4      string          .sra            Sequence Read Archive
->8      Belong          0x88190305      
->12     belong          x               , Version %u
-
-#--------------------------------------------------------------------------------
-# SFF format by 454 Life Sciences, Whitehead Institute for Biomedical Research and Sanger Institute.
-# 
-
-0	string		.sff		Standard Flowgram Format (SFF)
->4	byte		x		- version %d
->5	byte		x		%d
->6	byte		x		%d
->7	byte		x		%d
->20	belong		x		, %Ld reads
-
-#--------------------------------------------------------------------------------
-# SRF format Generic Format for Sequence Data 
-# 
-
-0	string		SSRF		Generic Format for Sequence Data (SRF)
->9	byte		x		- version %c
->10	byte		x		%c
->11	byte		x		%c
-
-#---------------------------------------------------------------------------------
-# FASTQ format Generic Format for Sequence Data 
-#
-
-0	string		@		FASTQ Generic Format for Sequence Data
-
-#------------------------------------------------------------------------------
-# Localstuff:  file(1) magic for locally observed files
-#
-# $Id: kfsmagic,v 1.2 2010/06/07 15:49:27 killian2 Exp $
-# Add any locally observed files here.  Remember:
-# text if readable, executable if runnable binary, data if unreadable.
-
-# XXX promoted from tex so that *.tfm is not mis-identified as mc68k file.
-# There is no way to detect TeX Font Metric (*.tfm) files without
-# breaking them apart and reading the data.  The following patterns
-# match most *.tfm files generated by METAFONT or afm2tfm.
-2	string		\000\021	TeX font metric data
->33	string		>\0		(%s)
-2	string		\000\022	TeX font metric data
->33	string		>\0		(%s)
-#------------------------------------------------------------------------------
-# acorn:  file(1) magic for files found on Acorn systems
-#
-
-# RISC OS Chunk File Format
-# From RISC OS Programmer's Reference Manual, Appendix D
-# We guess the file type from the type of the first chunk.
-0	lelong		0xc3cbc6c5	RISC OS Chunk data
->12	string		OBJ_		\b, AOF object
->12	string		LIB_		\b, ALF library
-
-# RISC OS AIF, contains "SWI OS_Exit" at offset 16.
-16	lelong		0xef000011	RISC OS AIF executable
-
-# RISC OS Draw files
-# From RISC OS Programmer's Reference Manual, Appendix E
-0	string 		Draw		RISC OS Draw file data
-
-# RISC OS new format font files
-# From RISC OS Programmer's Reference Manual, Appendix E
-0	string		FONT\0		RISC OS outline font data,
->5	byte		x		version %d
-0	string		FONT\1		RISC OS 1bpp font data,
->5	byte		x		version %d
-0	string		FONT\4		RISC OS 4bpp font data
->5	byte		x		version %d
-
-# RISC OS Music files
-# From RISC OS Programmer's Reference Manual, Appendix E
-0	string		Maestro\r	RISC OS music file
->8	byte		x		version %d
-
-
-#------------------------------------------------------------------------------
-# adi: file(1) magic for ADi's objects
-# From Gregory McGarry <g.mcgarry at ieee.org>
-#
-0	leshort		0x521c		COFF DSP21k
->18	lelong		&02		executable,
->18	lelong		^02
->>18	lelong		&01		static object,
->>18	lelong		^01		relocatable object,
->18	lelong		&010		stripped
->18	lelong		^010		not stripped
-
-#------------------------------------------------------------------------------
-# adventure: file(1) magic for Adventure game files
-#
-# from Allen Garvin <earendil at faeryland.tamu-commerce.edu>
-# Edited by Dave Chapeskie <dchapes at ddm.on.ca> Jun 28, 1998
-# Edited by Chris Chittleborough <cchittleborough at yahoo.com.au>, March 2002
-#
-# ALAN
-# I assume there are other, lower versions, but these are the only ones I
-# saw in the archive.
-0	beshort	0x0206	ALAN game data
->2	byte	<10	version 2.6%d
-
-# Conflicts with too much other stuff!
-# Infocom
-# (Note: to avoid false matches Z-machine version 1 and 2 are not
-# recognized since only the oldest Zork I and II used them.  Similarly
-# there are 4 Infocom games that use verion 4 that are not recognized.)
-#0	byte	3	Infocom game data (Z-machine 3,
-#>2	beshort	<0x7fff	Release %3d,
-#>26	beshort >0	Size %d*2
-#>18	string	>\0	Serial %.6s)
-#0	byte	5	Infocom game data (Z-machine 5,
-#>2	beshort	<0x7fff	Release %3d,
-#>26	beshort >0	Size %d*4
-#>18	string	>\0	Serial %.6s)
-#0	byte	6	Infocom game data (Z-machine 6,
-#>2	beshort	<0x7fff	Release %3d,
-#>26	beshort >0	Size %d*8
-#>18	string	>\0	Serial %.6s)
-#0	byte	8	Infocom game data (Z-machine 8,
-#>2	beshort	<0x7fff	Release %3d,
-#>26	beshort >0	Size %d*8
-#>18	string	>\0	Serial %.6s)
-
-# TADS (Text Adventure Development System)
-#  All files are machine-independent (games compile to byte-code) and are tagged
-#  with a version string of the form "V2.<digit>.<digit>\0" (but TADS 3 is
-#  on the way).
-#  Game files start with "TADS2 bin\n\r\032\0" then the compiler version.
-0	string	TADS2\ bin	TADS
->9	belong  !0x0A0D1A00	game data, CORRUPTED
->9	belong	 0x0A0D1A00
->>13	string	>\0		%s game data
-#  Resource files start with "TADS2 rsc\n\r\032\0" then the compiler version.
-0	string	TADS2\ rsc	TADS
->9	belong  !0x0A0D1A00	resource data, CORRUPTED
->9	belong	 0x0A0D1A00
->>13	string	>\0		%s resource data
-#  Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian
-#  2-byte length N, the N-char name of the game file *without* a NUL (darn!),
-# "TADS2 save\n\r\032\0" and the interpreter version. 
-0	string	TADS2\ save/g	TADS
->12	belong	!0x0A0D1A00	saved game data, CORRUPTED
->12	belong	 0x0A0D1A00
->>(16.s+32) string >\0		%s saved game data
-#  Other saved game files start with "TADS2 save\n\r\032\0" and the interpreter
-#  version.
-0	string	TADS2\ save	TADS
->10	belong	!0x0A0D1A00	saved game data, CORRUPTED
->10	belong	 0x0A0D1A00
->>14	string	>\0		%s saved game data
-#------------------------------------------------------------------------------
-# allegro:  file(1) magic for Allegro datafiles
-# Toby Deshane <hac at shoelace.digivill.net>
-#
-0 belong 0x736C6821   Allegro datafile (packed)
-0 belong 0x736C682E   Allegro datafile (not packed/autodetect)
-0 belong 0x736C682B   Allegro datafile (appended exe data)
-
-#------------------------------------------------------------------------------
-# alliant:  file(1) magic for Alliant FX series a.out files
-#
-# If the FX series is the one that had a processor with a 68K-derived
-# instruction set, the "short" should probably become "beshort" and the
-# "long" should probably become "belong".
-# If it's the i860-based one, they should probably become either the
-# big-endian or little-endian versions, depending on the mode they ran
-# the 860 in....
-#
-0	short		0420		0420 Alliant virtual executable
->2	short		&0x0020		common library
->16	long		>0		not stripped
-0	short		0421		0421 Alliant compact executable
->2	short		&0x0020		common library
->16	long		>0		not stripped
-#------------------------------------------------------------------------------
-# alpha architecture description
-#
-
-0	leshort		0603		COFF format alpha
->22	leshort&030000	!020000		executable
->24	leshort		0410		pure
->24	leshort		0413		paged
->22	leshort&020000	!0		dynamically linked
->16	lelong		!0		not stripped
->16	lelong		0		stripped
->22	leshort&030000	020000		shared library
->24	leshort		0407		object
->27	byte		x		- version %d
->26	byte		x		.%d
->28	byte		x		-%d
-
-# Basic recognition of Digital UNIX core dumps - Mike Bremford <mike at opac.bl.uk>
-#
-# The actual magic number is just "Core", followed by a 2-byte version
-# number; however, treating any file that begins with "Core" as a Digital
-# UNIX core dump file may produce too many false hits, so we include one
-# byte of the version number as well; DU 5.0 appears only to be up to
-# version 2.
-#
-0	string		Core\001	Alpha COFF format core dump (Digital UNIX)
->24	string		>\0		\b, from '%s'
-0	string		Core\002	Alpha COFF format core dump (Digital UNIX)
->24	string		>\0		\b, from '%s'
-
-#------------------------------------------------------------------------------
-# amanda:  file(1) magic for amanda file format
-#
-0	string	AMANDA:\ 		AMANDA 
->8	string	TAPESTART\ DATE		tape header file,
->>23	string	X
->>>25	string	>\ 			Unused %s
->>23	string	>\ 			DATE %s
->8	string	FILE\ 			dump file,
->>13	string	>\ 			DATE %s
-#------------------------------------------------------------------------------
-# amigaos:  file(1) magic for AmigaOS binary formats:
-
-#
-# From ignatios at cs.uni-bonn.de (Ignatios Souvatzis)
-# Some formats are still missing: AmigaOS special IFF's, e.g.: FORM....CTLG
-# (the others should be separate, anyway)
-#
-0	belong		0x000003f3	AmigaOS loadseg()ble executable/binary
-0	belong		0x000003e7	AmigaOS object/library data
-#
-0	beshort		0xe310		Amiga Workbench
->2	beshort		1		
->>48	byte		1		disk icon
->>48	byte		2		drawer icon
->>48	byte		3		tool icon
->>48	byte		4		project icon
->>48	byte		5		garbage icon
->>48	byte		6		device icon
->>48	byte		7		kickstart icon
->>48	byte		8		workbench application icon
->2	beshort		>1		icon, vers. %d
-#
-# various sound formats from the Amiga
-# G=F6tz Waschk <waschk at informatik.uni-rostock.de>
-#
-0	string		FC14		Future Composer 1.4 Module sound file
-0	string		SMOD		Future Composer 1.3 Module sound file
-0	string		AON4artofnoise	Art Of Noise Module sound file
-1	string		MUGICIAN/SOFTEYES Mugician Module sound file
-58	string		SIDMON\ II\ -\ THE	Sidmon 2.0 Module sound file
-0	string		Synth4.0	Synthesis Module sound file
-0	string		ARP.		The Holy Noise Module sound file
-0	string		BeEp\0		JamCracker Module sound file
-0	string		COSO\0		Hippel-COSO Module sound file
-# Too simple (short, pure ASCII, deep), MPi
-#26	string		V.3		Brian Postma's Soundmon Module sound file v3
-#26	string		BPSM		Brian Postma's Soundmon Module sound file v3
-#26	string		V.2		Brian Postma's Soundmon Module sound file v2
-
-# The following are from: "Stefan A. Haubenthal" <polluks at web.de>
-0	beshort		0x0f00		AmigaOS bitmap font
-0	beshort		0x0f03		AmigaOS outline font
-0	belong		0x80001001	AmigaOS outline tag
-0	string		##\ version	catalog translation
-
-0	string		FORM		IFF data
->8	string		CTLG		\b, CTLG message catalog
->8	string		PREF		\b, PREF preferences
-
-0	string		Rar!		RAR archive data,
->44	byte		x		v%0x,
->35	byte		0		os: MS-DOS
->35	byte		1		os: OS/2
->35	byte		2		os: Win32
->35	byte		3		os: Unix
-
-0	belong		0x000003fa	AmigaOS shared library
-
-# Amiga disk types
-# 
-0	string		RDSK		Rigid Disk Block
->160	string		x		on %.24s
-0	string		DOS\0		Amiga DOS disk
-0	string		DOS\1		Amiga FFS disk
-0	string		DOS\2		Amiga Inter DOS disk
-0	string		DOS\3		Amiga Inter FFS disk
-0	string		DOS\4		Amiga Fastdir DOS disk
-0	string		DOS\5		Amiga Fastdir FFS disk
-0	string		KICK		Kickstart disk
-
-#------------------------------------------------------------------------------
-# animation:  file(1) magic for animation/movie formats
-#
-# animation formats
-# MPEG, FLI, DL originally from vax at ccwf.cc.utexas.edu (VaX#n8)
-# FLC, SGI, Apple originally from Daniel Quinlan (quinlan at yggdrasil.com)
-
-# MPEG animation format
-0	belong		0x000001b3		MPEG video stream data
-#>4	beshort&0xfff0	x			(%d x
-#>5	beshort&0x0fff  x			%d)
-0	belong		0x000001ba		MPEG system stream data
-
-# MPEG Audio (*.mpx)
-# from dreesen at math.fu-berlin.de
-
-# MPEG 1.0 Layer 3
-0       beshort&0xfffe  =0xfffa         \bMP3
->2      byte&0xf0       =0x10           \b,  32 kBits
->2      byte&0xf0       =0x20           \b,  40 kBits
->2      byte&0xf0       =0x30           \b,  48 kBits
->2      byte&0xf0       =0x40           \b,  56 kBits
->2      byte&0xf0       =0x50           \b,  64 kBits
->2      byte&0xf0       =0x60           \b,  80 kBits
->2      byte&0xf0       =0x70           \b,  96 kBits
->2      byte&0xf0       =0x80           \b, 112 kBits
->2      byte&0xf0       =0x90           \b, 128 kBits
->2      byte&0xf0       =0xA0           \b, 160 kBits
->2      byte&0xf0       =0xB0           \b, 192 kBits
->2      byte&0xf0       =0xC0           \b, 224 kBits
->2      byte&0xf0       =0xD0           \b, 256 kBits
->2      byte&0xf0       =0xE0           \b, 320 kBits
-# freq
->2      byte&0x0C       =0x00           \b, 44.1 kHz
->2      byte&0x0C       =0x04           \b, 48 kHz
->2      byte&0x0C       =0x08           \b, 32 kHz
-# misc
->3      byte&0xC0       =0x00           \b, Stereo
->3      byte&0xC0       =0x40           \b, JStereo
->3      byte&0xC0       =0x80           \b, Dual-Ch
->3      byte&0xC0       =0xC0           \b, Mono
-#>1     byte&0x01       =0x00           \b, Error Protection
-#>2     byte&0x02       =0x02           \b, Padding
-#>2     byte&0x01       =0x01           \b, Private
-#>3     byte&0x08       =0x08           \b, Copyright
-#>3     byte&0x04       =0x04           \b, Original
-#>3     byte&0x03       1               \b, Emphasis 5
-#>3     byte&0x03       3               \b, Emphasis c
-
-# MPEG 1.0 Layer 2
-0       beshort&0xfffe  =0xfffc         \bMP2
->2      byte&0xf0       =0x10           \b,  32 kBits
->2      byte&0xf0       =0x20           \b,  48 kBits
->2      byte&0xf0       =0x30           \b,  56 kBits
->2      byte&0xf0       =0x40           \b,  64 kBits
->2      byte&0xf0       =0x50           \b,  80 kBits
->2      byte&0xf0       =0x60           \b,  96 kBits
->2      byte&0xf0       =0x70           \b, 112 kBits
->2      byte&0xf0       =0x80           \b, 128 kBits
->2      byte&0xf0       =0x90           \b, 160 kBits
->2      byte&0xf0       =0xA0           \b, 192 kBits
->2      byte&0xf0       =0xB0           \b, 224 kBits
->2      byte&0xf0       =0xC0           \b, 256 kBits
->2      byte&0xf0       =0xD0           \b, 320 kBits
->2      byte&0xf0       =0xE0           \b, 384 kBits
-# freq
->2      byte&0x0C       =0x00           \b, 44.1 kHz
->2      byte&0x0C       =0x04           \b, 48 kHz
->2      byte&0x0C       =0x08           \b, 32 kHz
-# misc
->3      byte&0xC0       =0x00           \b, Stereo
->3      byte&0xC0       =0x40           \b, JStereo
->3      byte&0xC0       =0x80           \b, Dual-Ch
->3      byte&0xC0       =0xC0           \b, Mono
-#>1     byte&0x01       =0x00           \b, Error Protection
-#>2     byte&0x02       =0x02           \b, Padding
-#>2     byte&0x01       =0x01           \b, Private
-#>3     byte&0x08       =0x08           \b, Copyright
-#>3     byte&0x04       =0x04           \b, Original
-#>3     byte&0x03       1               \b, Emphasis 5
-#>3     byte&0x03       3               \b, Emphasis c
-
-# MPEG 2.0
-0       beshort&0xfff8  =0xfff0         MP
-# Layer 3
->1      byte            &0x02           \b3
-# Layer 2
->1      byte            &0x04           \b2
->2      byte&0xf0       =0x10           \b,   8 kBits
->2      byte&0xf0       =0x20           \b,  16 kBits
->2      byte&0xf0       =0x30           \b,  24 kBits
->2      byte&0xf0       =0x40           \b,  32 kBits
->2      byte&0xf0       =0x50           \b,  40 kBits
->2      byte&0xf0       =0x60           \b,  48 kBits
->2      byte&0xf0       =0x70           \b,  56 kBits
->2      byte&0xf0       =0x80           \b,  64 kBits
->2      byte&0xf0       =0x90           \b,  80 kBits
->2      byte&0xf0       =0xA0           \b,  96 kBits
->2      byte&0xf0       =0xB0           \b, 112 kBits
->2      byte&0xf0       =0xC0           \b, 128 kBits
->2      byte&0xf0       =0xD0           \b, 144 kBits
->2      byte&0xf0       =0xE0           \b, 160 kBits
-# freq
->2      byte&0x0C       =0x00           \b, 22.05 kHz
->2      byte&0x0C       =0x04           \b, 24 kHz
->2      byte&0x0C       =0x08           \b, 16 kHz
-# misc
->3      byte&0xC0       =0x00           \b, Stereo
->3      byte&0xC0       =0x40           \b, JStereo
->3      byte&0xC0       =0x80           \b, Dual-Ch
->3      byte&0xC0       =0xC0           \b, Mono
-#>1     byte&0x01       =0x00           \b, Error Protection
-#>2     byte&0x02       =0x02           \b, Padding
-#>2     byte&0x01       =0x01           \b, Private
-#>3     byte&0x08       =0x08           \b, Copyright
-#>3     byte&0x04       =0x04           \b, Original
-#>3     byte&0x03       1               \b, Emphasis 5
-#>3     byte&0x03       3               \b, Emphasis c
-
-#From: Johan Gade <jgade at diku.dk>
-
-# MPEG-4 Advanced Audio Coding (AAC) file (perhaps also MPEG-2 ACC?)
-16	string		M4A		MPEG-4 Advanced Audio Coding file (AAC)
-
-
-# FLI animation format
-4	leshort		0xAF11			FLI file
->6	leshort		x			- %d frames,
->8	leshort		x			width=%d pixels,
->10	leshort		x			height=%d pixels,
->12	leshort		x			depth=%d,
->16	leshort		x			ticks/frame=%d
-# FLC animation format
-4	leshort		0xAF12			FLC file
->6	leshort		x			- %d frames
->8	leshort		x			width=%d pixels,
->10	leshort		x			height=%d pixels,
->12	leshort		x			depth=%d,
->16	leshort		x			ticks/frame=%d
-
-# DL animation format
-# XXX - collision with most `mips' magic
-#
-# I couldn't find a real magic number for these, however, this
-# -appears- to work.  Note that it might catch other files, too, so be
-# careful!
-#
-# Note that title and author appear in the two 20-byte chunks
-# at decimal offsets 2 and 22, respectively, but they are XOR'ed with
-# 255 (hex FF)!  The DL format is really bad.
-#
-#0	byte	1	DL version 1, medium format (160x100, 4 images/screen)
-#>42	byte	x	- %d screens,
-#>43	byte	x	%d commands
-#0	byte	2	DL version 2
-#>1	byte	1	- large format (320x200,1 image/screen),
-#>1	byte	2	- medium format (160x100,4 images/screen),
-#>1	byte	>2	- unknown format,
-#>42	byte	x	%d screens,
-#>43	byte	x	%d commands
-# Based on empirical evidence, DL version 3 have several nulls following the
-# \003.  Most of them start with non-null values at hex offset 0x34 or so.
-#0	string	\3\0\0\0\0\0\0\0\0\0\0\0	DL version 3
-
-# SGI formats
-0	string		MOVI		Silicon Graphics movie file
-
-# Apple Quicktime: Scan for all known top-level QT atom markers
-4	string		moov		Apple QuickTime movie file (moov)
-4	string		mdat		Apple QuickTime movie file (mdat)
-4	string		ftyp		Apple QuickTime movie file (ftyp)
-4	string		free		Apple QuickTime movie file (free)
-4	string		junk		Apple QuickTime movie file (junk)
-4	string		pnot		Apple QuickTime movie file (pnot)
-4	string		skip		Apple QuickTime movie file (skip)
-4	string		wide		Apple QuickTime movie file (wide)
-4	string		pict		Apple QuickTime movie file (pict)
-
-# iso 13818 transport stream
-#
-# from Oskar Schirmer <schirmer at scara.com> Feb 3, 2001 (ISO 13818.1)
-# (the following is a little bit restrictive and works fine for a stream
-#  that starts with PAT properly. it won't work for stream data, that is
-#  cut from an input device data right in the middle, but this shouldn't
-#  disturb)
-# syncbyte      8 bit	0x47
-# error_ind     1 bit	-
-# payload_start 1 bit	1
-# priority      1 bit	-
-# PID          13 bit	0x0000
-# scrambling    2 bit	-
-# adaptfld_ctrl 2 bit	1 or 3
-# conti_count   4 bit	0
-0	belong&0xFF5FFF1F	0x47400010	MPEG transport stream data
->188	byte			!0x47		CORRUPTED
-
-# DIF digital video file format <mpruett at sgi.com>
-0	belong&0xffffff00	0x1f070000      DIF
->4	byte			&0x01		(DVCPRO) movie file
->4	byte			^0x01		(DV) movie file
->3	byte			&0x80		(PAL)
->3	byte			^0x80		(NTSC)
-
-# Microsoft Advanced Streaming Format (ASF) <mpruett at sgi.com>
-0	belong			0x3026b275	Microsoft ASF
-
-# MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
-0	string			\x8aMNG		MNG video data,
->4	belong			!0x0d0a1a0a	CORRUPTED,
->4	belong			0x0d0a1a0a
->>16    belong	x				%ld x
->>20    belong	x				%ld
-
-# JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
-0	string			\x8bJNG		JNG video data,
->4	belong			!0x0d0a1a0a	CORRUPTED,
->4	belong			0x0d0a1a0a
->>16    belong	x				%ld x
->>20    belong	x				%ld
-
-# Vivo video (Wolfram Kleff)
-3	string		\x0D\x0AVersion:Vivo	Vivo video data
-
-# VRML (Virtual Reality Modelling Language)
-0       string/b        #VRML\ V1.0\ ascii	VRML 1 file
-0	string/b	#VRML\ V2.0\ utf8	ISO/IEC 14772 VRML 97 file
-
-#---------------------------------------------------------------------------
-# HVQM4: compressed movie format designed by Hudson for Nintendo GameCube
-# From Mark Sheppard <msheppard at climax.co.uk>, 2002-10-03
-#
-0	string		HVQM4		%s
->6	string		>\0		v%s
->0	byte		x		GameCube movie,
->0x34	ubeshort	x		%d x
->0x36	ubeshort	x		%d,
->0x26	ubeshort	x		%dµs,
->0x42	ubeshort	0		no audio
->0x42	ubeshort	>0		%dHz audio
-
-#------------------------------------------------------------------------------
-# apl:  file(1) magic for APL (see also "pdp" and "vax" for other APL
-#       workspaces)
-#
-0	long		0100554		APL workspace (Ken's original?)
-
-#------------------------------------------------------------------------------
-# applix:  file(1) magic for Applixware
-# From: Peter Soos <sp at osb.hu>
-#
-0	string		*BEGIN		Applixware
->7	string		WORDS			Words Document
->7	string		GRAPHICS		Graphic
->7	string		RASTER			Bitmap
->7	string		SPREADSHEETS		Spreadsheet
->7	string		MACRO			Macro
->7	string		BUILDER			Builder Object
-
-#------------------------------------------------------------------------------
-# archive:  file(1) magic for archive formats (see also "msdos" for self-
-#           extracting compressed archives)
-#
-# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc.
-# pre-POSIX "tar" archives are handled in the C code.
-
-# POSIX tar archives
-257	string		ustar\0		POSIX tar archive
-257	string		ustar\040\040\0	GNU tar archive
-
-# cpio archives
-#
-# Yes, the top two "cpio archive" formats *are* supposed to just be "short".
-# The idea is to indicate archives produced on machines with the same
-# byte order as the machine running "file" with "cpio archive", and
-# to indicate archives produced on machines with the opposite byte order
-# from the machine running "file" with "byte-swapped cpio archive".
-#
-# The SVR4 "cpio(4)" hints that there are additional formats, but they
-# are defined as "short"s; I think all the new formats are
-# character-header formats and thus are strings, not numbers.
-0	short		070707		cpio archive
-0	short		0143561		byte-swapped cpio archive
-0	string		070707		ASCII cpio archive (pre-SVR4 or odc)
-0	string		070701		ASCII cpio archive (SVR4 with no CRC)
-0	string		070702		ASCII cpio archive (SVR4 with CRC)
-
-# Debian package (needs to go before regular portable archives)
-#
-0	string		!<arch>\ndebian
->8	string		debian-split	part of multipart Debian package
->8	string		debian-binary	Debian binary package
->68	string		>\0		(format %s)
->81	string		bz2		\b, uses bzip2 compression
->84	string		gz		\b, uses gzip compression
-#>136	ledate		x		created: %s
-
-# other archives
-0	long		0177555		very old archive
-0	short		0177555		very old PDP-11 archive
-0	long		0177545		old archive
-0	short		0177545		old PDP-11 archive
-0	long		0100554		apl workspace
-0	string		=<ar>		archive
-
-# MIPS archive (needs to go before regular portable archives)
-#
-0	string	!<arch>\n__________E	MIPS archive
->20	string	U			with MIPS Ucode members
->21	string	L			with MIPSEL members
->21	string	B			with MIPSEB members
->19	string	L			and an EL hash table
->19	string	B			and an EB hash table
->22	string	X			-- out of date
-
-0	string		-h-		Software Tools format archive text
-
-#
-# XXX - why are there multiple <ar> thingies?  Note that 0x213c6172 is
-# "!<ar", so, for new-style (4.xBSD/SVR2andup) archives, we have:
-#
-# 0	string		!<arch>		current ar archive
-# 0	long		0x213c6172	archive file
-#
-# and for SVR1 archives, we have:
-#
-# 0	string		\<ar>		System V Release 1 ar archive
-# 0	string		=<ar>		archive
-#
-# XXX - did Aegis really store shared libraries, breakpointed modules,
-# and absolute code program modules in the same format as new-style
-# "ar" archives?
-#
-0	string		!<arch>		current ar archive
->8	string		__.SYMDEF	random library
->0	belong		=65538		- pre SR9.5
->0	belong		=65539		- post SR9.5
->0	beshort		2		- object archive
->0	beshort		3		- shared library module
->0	beshort		4		- debug break-pointed module
->0	beshort		5		- absolute code program module
-0	string		\<ar>		System V Release 1 ar archive
-0	string		=<ar>		archive
-#
-# XXX - from "vax", which appears to collect a bunch of byte-swapped
-# thingies, to help you recognize VAX files on big-endian machines;
-# with "leshort", "lelong", and "string", that's no longer necessary....
-#
-0	belong		0x65ff0000	VAX 3.0 archive
-0	belong		0x3c61723e	VAX 5.0 archive
-#
-0	long		0x213c6172	archive file
-0	lelong		0177555		very old VAX archive
-0	leshort		0177555		very old PDP-11 archive
-#
-# XXX - "pdp" claims that 0177545 can have an __.SYMDEF member and thus
-# be a random library (it said 0xff65 rather than 0177545).
-#
-0	lelong		0177545		old VAX archive
->8	string		__.SYMDEF	random library
-0	leshort		0177545		old PDP-11 archive
->8	string		__.SYMDEF	random library
-#
-# From "pdp" (but why a 4-byte quantity?)
-#
-0	lelong		0x39bed		PDP-11 old archive
-0	lelong		0x39bee		PDP-11 4.0 archive
-
-# ARC archiver, from Daniel Quinlan (quinlan at yggdrasil.com)
-#
-# The first byte is the magic (0x1a), byte 2 is the compression type for
-# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS
-# filename of the first file (null terminated).  Since some types collide
-# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%),
-# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%).  0x01 collides with terminfo.
-0	lelong&0x8080ffff	0x0000081a	ARC archive data, dynamic LZW
-0	lelong&0x8080ffff	0x0000091a	ARC archive data, squashed
-0	lelong&0x8080ffff	0x0000021a	ARC archive data, uncompressed
-0	lelong&0x8080ffff	0x0000031a	ARC archive data, packed
-0	lelong&0x8080ffff	0x0000041a	ARC archive data, squeezed
-0	lelong&0x8080ffff	0x0000061a	ARC archive data, crunched
-
-# Acorn archive formats (Disaster prone simpleton, m91dps at ecs.ox.ac.uk)
-# I can't create either SPARK or ArcFS archives so I have not tested this stuff
-# [GRR:  the original entries collide with ARC, above; replaced with combined
-#  version (not tested)]
-#0	byte		0x1a		RISC OS archive
-#>1	string		archive		(ArcFS format)
-0	string		\032archive	RISC OS archive (ArcFS format)
-
-# ARJ archiver (jason at jarthur.Claremont.EDU)
-0	leshort		0xea60		ARJ archive data
->5	byte		x		\b, v%d,
->8	byte		&0x04		multi-volume,
->8	byte		&0x10		slash-switched,
->8	byte		&0x20		backup,
->34	string		x		original name: %s,
->7	byte		0		os: MS-DOS
->7	byte		1		os: PRIMOS
->7	byte		2		os: Unix
->7	byte		3		os: Amiga
->7	byte		4		os: Macintosh
->7	byte		5		os: OS/2
->7	byte		6		os: Apple ][ GS
->7	byte		7		os: Atari ST
->7	byte		8		os: NeXT
->7	byte		9		os: VAX/VMS
->3	byte		>0		%d]
-
-# HA archiver (Greg Roelofs, newt at uchicago.edu)
-# This is a really bad format. A file containing HAWAII will match this...
-#0	string		HA		HA archive data,
-#>2	leshort		=1		1 file,
-#>2	leshort		>1		%u files,
-#>4	byte&0x0f	=0		first is type CPY
-#>4	byte&0x0f	=1		first is type ASC
-#>4	byte&0x0f	=2		first is type HSC
-#>4	byte&0x0f	=0x0e		first is type DIR
-#>4	byte&0x0f	=0x0f		first is type SPECIAL
-
-# HPACK archiver (Peter Gutmann, pgut1 at cs.aukuni.ac.nz)
-0	string		HPAK		HPACK archive data
-
-# JAM Archive volume format, by Dmitry.Kohmanyuk at UA.net
-0	string		\351,\001JAM\		JAM archive,
->7	string		>\0			version %.4s
->0x26	byte		=0x27			-
->>0x2b	string          >\0			label %.11s,
->>0x27	lelong		x			serial %08x,
->>0x36	string		>\0			fstype %.8s
-
-# LHARC/LHA archiver (Greg Roelofs, newt at uchicago.edu)
-2	string		-lh0-		LHarc 1.x archive data [lh0]
-2	string		-lh1-		LHarc 1.x archive data [lh1]
-2	string		-lz4-		LHarc 1.x archive data [lz4]
-2	string		-lz5-		LHarc 1.x archive data [lz5]
-#	[never seen any but the last; -lh4- reported in comp.compression:]
-2	string		-lzs-		LHa 2.x? archive data [lzs]
-2	string		-lh\40-		LHa 2.x? archive data [lh ]
-2	string		-lhd-		LHa 2.x? archive data [lhd]
-2	string		-lh2-		LHa 2.x? archive data [lh2]
-2	string		-lh3-		LHa 2.x? archive data [lh3]
-2	string		-lh4-		LHa (2.x) archive data [lh4]
-2	string		-lh5-		LHa (2.x) archive data [lh5]
-2	string		-lh6-		LHa (2.x) archive data [lh6]
-2	string		-lh7-		LHa (2.x) archive data [lh7]
->20	byte		x		- header level %d
-
-# RAR archiver (Greg Roelofs, newt at uchicago.edu)
-0	string		Rar!		RAR archive data
-
-# SQUISH archiver (Greg Roelofs, newt at uchicago.edu)
-0	string		SQSH		squished archive data (Acorn RISCOS)
-
-# UC2 archiver (Greg Roelofs, newt at uchicago.edu)
-# I can't figure out the self-extracting form of these buggers...
-0	string		UC2\x1a		UC2 archive data
-
-# ZIP archives (Greg Roelofs, c/o zip-bugs at wkuvx1.wku.edu)
-0	string		PK\003\004	Zip archive data
->4	byte		0x09		\b, at least v0.9 to extract
->4	byte		0x0a		\b, at least v1.0 to extract
->4	byte		0x0b		\b, at least v1.1 to extract
->4	byte		0x14		\b, at least v2.0 to extract
-
-# Zoo archiver
-20	lelong		0xfdc4a7dc	Zoo archive data
->4	byte		>48		\b, v%c.
->>6	byte		>47		\b%c
->>>7	byte		>47		\b%c
->32	byte		>0		\b, modify: v%d
->>33	byte		x		\b.%d+
->42	lelong		0xfdc4a7dc	\b,
->>70	byte		>0		extract: v%d
->>>71	byte		x		\b.%d+
-
-# Shell archives
-10	string		#\ This\ is\ a\ shell\ archive	shell archive text
-
-#
-# LBR. NB: May conflict with the questionable 
-#          "binary Computer Graphics Metafile" format.
-#
-0       string  \0\ \ \ \ \ \ \ \ \ \ \ \0\0    LBR archive data
-#
-# PMA (CP/M derivative of LHA)
-#
-2       string          -pm0-           PMarc archive data [pm0]
-2       string          -pm1-           PMarc archive data [pm1]
-2       string          -pm2-           PMarc archive data [pm2]
-2       string          -pms-           PMarc SFX archive (CP/M, DOS)
-5       string          -pc1-           PopCom compressed executable (CP/M)
-
-# From Rafael Laboissiere <rafael at laboissiere.net>
-# The Project Revision Control System (see
-# http://prcs.sourceforge.net) generates a packaged project
-# file which is recognized by the following entry: 
-0	leshort		0xeb81	PRCS packaged project
-
-# Microsoft cabinets 
-# by David Necas (Yeti) <yeti at physics.muni.cz>
-#0	string	MSCF\0\0\0\0	Microsoft cabinet file data,
-#>25	byte	x		v%d
-#>24	byte	x		\b.%d
-# MPi: All CABs have version 1.3, so this is pointless.
-# Better magic in debian-additions.
-
-# GTKtalog catalogs 
-# by David Necas (Yeti) <yeti at physics.muni.cz>
-4	string	gtktalog\ 	GTKtalog catalog data,
->13	string	3		version 3
->>14	beshort	0x677a		(gzipped)
->>14	beshort	!0x677a		(not gzipped)
->13	string	>3		version %s
-
-############################################################################
-# Parity archive reconstruction file, the 'par' file format now used on Usenet.
-0       string          PAR\0	PARity archive data
->48	leshort		=0	- Index file
->48	leshort		>0	- file number %d
-
-# Felix von Leitner <felix-file at fefe.de>
-0	string	d8:announce	BitTorrent file
-
-# Atari MSA archive - Teemu Hukkanen <tjhukkan at iki.fi>
-0       beshort 0x0e0f          Atari MSA archive data
->2      beshort x       	\b, %d sectors per track
->4      beshort 0       	\b, 1 sided
->4      beshort 1       	\b, 2 sided
->6      beshort x       	\b, starting track: %d
->8      beshort x       	\b, ending track: %d
-
-# Alternate ZIP string (amc at arwen.cs.berkeley.edu)
-0	string	PK00PK\003\004	Zip archive data
-
-# ACE archive (from http://www.wotsit.org/download.asp?f=ace)
-# by Stefan `Sec` Zehl <sec at 42.org>
-7	string		**ACE**		ACE compressed archive
->15	byte	>0		version %d
->16	byte	=0x00		\b, from MS-DOS
->16	byte	=0x01		\b, from OS/2
->16	byte	=0x02		\b, from Win/32
->16	byte	=0x03		\b, from Unix
->16	byte	=0x04		\b, from MacOS
->16	byte	=0x05		\b, from WinNT
->16	byte	=0x06		\b, from Primos
->16	byte	=0x07		\b, from AppleGS
->16	byte	=0x08		\b, from Atari
->16	byte	=0x09		\b, from Vax/VMS
->16	byte	=0x0A		\b, from Amiga
->16	byte	=0x0B		\b, from Next
->14	byte	x		\b, version %d to extract
->5	leshort &0x0080		\b, multiple volumes,
->>17	byte	x		\b (part %d),
->5	leshort &0x0002		\b, contains comment
->5	leshort	&0x0200		\b, sfx
->5	leshort	&0x0400		\b, small dictionary
->5	leshort	&0x0800		\b, multi-volume
->5	leshort	&0x1000		\b, contains AV-String
->>30	string\x16*UNREGISTERED\x20VERSION*	(unregistered)
->5	leshort &0x2000		\b, with recovery record
->5	leshort &0x4000		\b, locked
->5	leshort &0x8000		\b, solid
-# Date in MS-DOS format (whatever that is)
-#>18	lelong	x		Created on
-
-#------------------------------------------------------------------------------
-# asterix:  file(1) magic for Aster*x; SunOS 5.5.1 gave the 4-character
-# strings as "long" - we assume they're just strings:
-# From: guy at netapp.com (Guy Harris)
-#
-0	string		*STA		Aster*x
->7	string		WORD			Words Document
->7	string		GRAP			Graphic
->7	string		SPRE			Spreadsheet
->7	string		MACR			Macro
-0	string		2278		Aster*x Version 2
->29	byte		0x36			Words Document
->29	byte		0x35			Graphic
->29	byte		0x32			Spreadsheet
->29	byte		0x38			Macro
-
-
-#------------------------------------------------------------------------------
-# att3b:  file(1) magic for AT&T 3B machines
-#
-# The `versions' should be un-commented if they work for you.
-# (Was the problem just one of endianness?)
-#
-# 3B20
-#
-# The 3B20 conflicts with SCCS.
-#0	beshort		0550		3b20 COFF executable
-#>12	belong		>0		not stripped
-#>22	beshort		>0		- version %ld
-#0	beshort		0551		3b20 COFF executable (TV)
-#>12	belong		>0		not stripped
-#>22	beshort		>0		- version %ld
-#
-# WE32K
-#
-0	beshort		0560		WE32000 COFF
->18	beshort		^00000020	object
->18	beshort		&00000020	executable
->12	belong		>0		not stripped
->18	beshort		^00010000	N/A on 3b2/300 w/paging
->18	beshort		&00020000	32100 required
->18	beshort		&00040000	and MAU hardware required
->20	beshort		0407		(impure)
->20	beshort		0410		(pure)
->20	beshort		0413		(demand paged)
->20	beshort		0443		(target shared library)
->22	beshort		>0		- version %ld
-0	beshort		0561		WE32000 COFF executable (TV)
->12	belong		>0		not stripped
-#>18	beshort		&00020000	- 32100 required
-#>18	beshort		&00040000	and MAU hardware required
-#>22	beshort		>0		- version %ld
-#
-# core file for 3b2 
-0	string		\000\004\036\212\200	3b2 core file
->364	string		>\0		of '%s'
-
-#------------------------------------------------------------------------------
-# audio:  file(1) magic for sound formats (see also "iff")
-#
-# Jan Nicolai Langfeldt (janl at ifi.uio.no), Dan Quinlan (quinlan at yggdrasil.com),
-# and others
-#
-
-# Sun/NeXT audio data
-0	string		.snd		Sun/NeXT audio data:
->12	belong		1		8-bit ISDN mu-law,
->12	belong		2		8-bit linear PCM [REF-PCM],
->12	belong		3		16-bit linear PCM,
->12	belong		4		24-bit linear PCM,
->12	belong		5		32-bit linear PCM,
->12	belong		6		32-bit IEEE floating point,
->12	belong		7		64-bit IEEE floating point,
->12	belong		23		8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data encoding),
->12	belong		24		compressed (8-bit G.722 ADPCM)
->12	belong		25		compressed (3-bit G.723 ADPCM),
->12	belong		26		compressed (5-bit G.723 ADPCM),
->12	belong		27		8-bit A-law,
->20	belong		1		mono,
->20	belong		2		stereo,
->20	belong		4		quad,
->16	belong		>0		%d Hz
-
-# DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
-# that uses little-endian encoding and has a different magic number
-0	lelong		0x0064732E	DEC audio data:
->12	lelong		1		8-bit ISDN mu-law,
->12	lelong		2		8-bit linear PCM [REF-PCM],
->12	lelong		3		16-bit linear PCM,
->12	lelong		4		24-bit linear PCM,
->12	lelong		5		32-bit linear PCM,
->12	lelong		6		32-bit IEEE floating point,
->12	lelong		7		64-bit IEEE floating point,
->12	lelong		23		8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data encoding),
->20	lelong		1		mono,
->20	lelong		2		stereo,
->20	lelong		4		quad,
->16	lelong		>0		%d Hz
-
-# Creative Labs AUDIO stuff
-0	string	MThd			Standard MIDI data
->8 	beshort	x			(format %d)
->10	beshort	x			using %d track
->10	beshort		>1		\bs
->12	beshort&0x7fff	x		at 1/%d
->12	beshort&0x8000	>0		SMPTE
-
-0	string	CTMF			Creative Music (CMF) data
-0	string	SBI			SoundBlaster instrument data
-0	string	Creative\ Voice\ File	Creative Labs voice data
-# is this next line right?  it came this way...
->19	byte	0x1A
->23	byte	>0			- version %d
->22	byte	>0			\b.%d
-
-# first entry is also the string "NTRK"
-0	belong		0x4e54524b	MultiTrack sound data
->4	belong		x		- version %ld
-
-# Extended MOD format (*.emd) (Greg Roelofs, newt at uchicago.edu); NOT TESTED
-# [based on posting 940824 by "Dirk/Elastik", husberg at lehtori.cc.tut.fi]
-0	string		EMOD		Extended MOD sound data,
->4	byte&0xf0	x		version %d
->4	byte&0x0f	x		\b.%d,
->45	byte		x		%d instruments
->83	byte		0		(module)
->83	byte		1		(song)
-
-# Real Audio (Magic .ra\0375)
-0	belong		0x2e7261fd	RealAudio sound file
-0	string		.RMF\0\0\0	RealMedia file
-
-# MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert at dialin.ind.net]
-# Oct 31, 1995
-# fixed by <doj at cubic.org> 2003-06-24
-# Too short...
-#0	string		MTM		MultiTracker Module sound data
-#0	string		if		Composer 669 Module sound data
-#0	string		JN		Composer 669 Module sound data (extended format)
-0	string		MAS_U		ULT(imate) Module sound data
-
-#0	string		FAR		Module sound data
-#>4	string		>\15		Title: "%s"
-
-0x2c	string		SCRM		ScreamTracker III Module sound data
->0	string		>\0		Title: "%s"
-
-# Gravis UltraSound patches
-# From <ache at nagual.ru>
-
-0	string		GF1PATCH110\0ID#000002\0	GUS patch
-0	string		GF1PATCH100\0ID#000002\0	Old GUS	patch
-
-#
-# Taken from loader code from mikmod version 2.14
-# by Steve McIntyre (stevem at chiark.greenend.org.uk)
-# <doj at cubic.org> added title printing on 2003-06-24
-0	string	MAS_UTrack_V00
->14	string	>/0		ultratracker V1.%.1s module sound data
-
-0	string	UN05		MikMod UNI format module sound data
-
-0	string	Extended\ Module: Fasttracker II module sound data
->17	string	>\0		Title: "%s"
-
-21	string/c	!SCREAM!	Screamtracker 2 module sound data
-21	string	BMOD2STM	Screamtracker 2 module sound data
-1080	string	M.K.		4-channel Protracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	M!K!		4-channel Protracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	FLT4		4-channel Startracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	FLT8		8-channel Startracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	4CHN		4-channel Fasttracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	6CHN		6-channel Fasttracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	8CHN		8-channel Fasttracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	CD81		8-channel Octalyser module sound data
->0	string	>\0		Title: "%s"
-1080	string	OKTA		8-channel Oktalyzer module sound data
->0	string	>\0		Title: "%s"
-# Not good enough.
-#1082	string	CH
-#>1080	string	>/0		%.2s-channel Fasttracker "oktalyzer" module sound data
-1080	string	16CN		16-channel Taketracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	32CN		32-channel Taketracker module sound data
->0	string	>\0		Title: "%s"
-
-# TOC sound files -Trevor Johnson <trevor at jpj.net>
-#
-0       string          TOC             TOC sound file
-
-# sidfiles <pooka at iki.fi>
-# added name,author,(c) and new RSID type by <doj at cubic.org> 2003-06-24
-0	string		SIDPLAY\ INFOFILE	Sidplay info file
-
-0	string		PSID			PlaySID v2.2+ (AMIGA) sidtune
->4	beshort		>0			w/ header v%d,
->14	beshort		=1			single song,
->14	beshort		>1			%d songs,
->16	beshort		>0			default song: %d
->0x16	string		>\0			name: "%s"
->0x36	string		>\0			author: "%s"
->0x56	string		>\0			copyright: "%s"
-
-0	string		RSID			RSID sidtune PlaySID compatible
->4	beshort		>0			w/ header v%d,
->14	beshort		=1			single song,
->14	beshort		>1			%d songs,
->16	beshort		>0			default song: %d
->0x16	string		>\0			name: "%s"
->0x36	string		>\0			author: "%s"
->0x56	string		>\0			copyright: "%s"
-
-# IRCAM <mpruett at sgi.com>
-# VAX and MIPS files are little-endian; Sun and NeXT are big-endian
-0	belong		0x64a30100		IRCAM file (VAX)
-0	belong		0x64a30200		IRCAM file (Sun)
-0	belong		0x64a30300		IRCAM file (MIPS little-endian)
-0	belong		0x64a30400		IRCAM file (NeXT)
-
-# NIST SPHERE <mpruett at sgi.com>
-0	string		NIST_1A\n\ \ \ 1024\n	NIST SPHERE file
-
-# Sample Vision <mpruett at sgi.com>
-0	string		SOUND\ SAMPLE\ DATA\ 	Sample Vision file
-
-# Audio Visual Research <tonigonenstein at users.sourceforge.net>
-0	string		2BIT			Audio Visual Research file,
->12	beshort		=0			mono,
->12	beshort		=-1			stereo,
->14	beshort		x			%d bits
->16	beshort		=0			unsigned,
->16	beshort		=-1			signed,
->22	belong&0x00ffffff	x		%d Hz,
->18	beshort		=0			no loop,
->18	beshort		=-1			loop,
->21	ubyte		<=127			note %d,
->22	byte		=0			replay 5.485 KHz
->22	byte		=1			replay 8.084 KHz
->22	byte		=2			replay 10.971 Khz
->22	byte		=3			replay 16.168 Khz
->22	byte		=4			replay 21.942 KHz
->22	byte		=5			replay 32.336 KHz
->22	byte		=6			replay 43.885 KHz
->22	byte		=7			replay 47.261 KHz
-
-# SGI SoundTrack <mpruett at sgi.com>
-0	string		_SGI_SoundTrack		SGI SoundTrack project file
-# ID3 version 2 tags <waschk at informatik.uni-rostock.de>
-0	string		ID3	MP3 file with ID3 version 2.
->3	ubyte	<0xff	\b%d.
->4	ubyte	<0xff	\b%d tag
-
-# NSF (NES sound file) magic
-0	string		NESM\x1a	NES Sound File
->14	string		>\0		("%s" by
->46	string		>\0		%s, copyright
->78	string		>\0		%s),
->5	byte		x		version %d,
->6	byte		x		%d tracks,
->122	byte&0x2	=1		dual PAL/NTSC
->122	byte&0x1	=1		PAL
->122	byte&0x1	=0		NTSC
-
-# Impuse tracker module (audio/x-it)
-0	string		IMPM		Impulse Tracker module sound data -
->4	string		>\0		"%s"
->40	leshort		!0		compatible w/ITv%x
->42	leshort		!0		created w/ITv%x
-
-# Imago Orpheus module (audio/x-imf)
-60	string		IM10		Imago Orpheus module sound data -
->0	string		>\0		"%s"
-
-# From <collver1 at attbi.com>
-# These are the /etc/magic entries to decode modules, instruments, and
-# samples in Impulse Tracker's native format.
-
-0	string		IMPS		Impulse Tracker Sample
->18	byte		&2		16 bit
->18	byte		^2		8 bit
->18	byte		&4		stereo
->18	byte		^4		mono
-0	string		IMPI		Impulse Tracker Instrument
->28	leshort		!0		ITv%x
->30	byte		!0		%d samples
-
-# Yamaha TX Wave:  file(1) magic for Yamaha TX Wave audio files
-# From <collver1 at attbi.com>
-0	string		LM8953		Yamaha TX Wave
->22	byte		0x49		looped
->22	byte		0xC9		non-looped
->23	byte		1		33kHz
->23	byte		2		50kHz
->23	byte		3		16kHz
-
-# scream tracker:  file(1) magic for Scream Tracker sample files
-#
-# From <collver1 at attbi.com>
-76	string		SCRS		Scream Tracker Sample
->0	byte		1		sample
->0	byte		2		adlib melody
->0	byte		>2		adlib drum
->31	byte		&2		stereo
->31	byte		^2		mono
->31	byte		&4		16bit little endian
->31	byte		^4		8bit
->30	byte		0		unpacked
->30	byte		1		packed
-
-# audio
-# From: Cory Dikkers <cdikkers at swbell.net>
-0	string		MMD0		MED music file, version 0
-0	string		MMD1		OctaMED Pro music file, version 1
-0	string		MMD3		OctaMED Soundstudio music file, version 3
-0	string		OctaMEDCmpr	OctaMED Soundstudio compressed file
-0	string		MED		MED_Song
-0	string		SymM		Symphonie SymMOD music file
-#
-0	string		THX		AHX version
->3	byte		=0		1 module data
->3	byte		=1		2 module data
-#
-0	string		OKTASONG	Oktalyzer module data
-#
-0	string		DIGI\ Booster\ module\0	%s
->20	byte		>0		%c
->>21	byte		>0		\b%c
->>>22	byte		>0		\b%c
->>>>23	byte		>0		\b%c
->610	string		>\0		\b, "%s"
-#
-0	string		DBM0	   	DIGI Booster Pro Module
->4	byte		>0		V%X.
->>5	byte		x		\b%02X
->16	string		>\0		\b, "%s"
-#
-0	string		FTMN		FaceTheMusic module
->16	string		>\0d		\b, "%s"
-
-# From: <doj at cubic.org> 2003-06-24
-0	string		AMShdr\32	Velvet Studio AMS Module v2.2
-0	string		Extreme		Extreme Tracker AMS Module v1.3
-0	string		DDMF		Xtracker DMF Module
->4	byte		x		v%i
->0xD	string		>\0		Title: "%s"
->0x2B	string		>\0		Composer: "%s"
-0	string		DSM\32		Dynamic Studio Module DSM
-0	string		SONG		DigiTrekker DTM Module
-0	string		DMDL		DigiTrakker MDL Module
-0	string		PSM\32		Protracker Studio PSM Module
-44	string		PTMF		Poly Tracker PTM Module
->0	string		>\32		Title: "%s"
-0	string		MT20		MadTracker 2.0 Module MT2
-0	string		RAD\40by\40REALiTY!! RAD Adlib Tracker Module RAD
-0	string		RTMM		RTM Module
-0x426	string		MaDoKaN96	XMS Adlib Module
->0	string		>\0		Composer: "%s"
-0	string		AMF		AMF Module
->4	string		>\0		Title: "%s"
-0	string		MODINFO1	Open Cubic Player Module Inforation MDZ
-0	string		Extended\40Instrument: Fast Tracker II Instrument
-
-# From: Takeshi Hamasaki <hma at syd.odn.ne.jp>
-# NOA Nancy Codec file
-0	string		\210NOA\015\012\032	NOA Nancy Codec Movie file
-# Yamaha SMAF format
-0	string		MMMD		Yamaha SMAF file
-# Sharp Jisaku Melody format for PDC
-0	string		\001Sharp\040JisakuMelody	SHARP Cell-Phone ringing Melody
->20	string		Ver01.00	Ver. 1.00
->>32	byte		x		, %d tracks
-
-# Free lossless audio codec <http://flac.sourceforge.net>
-# From: Przemyslaw Augustyniak <silvathraec at rpg.pl>
-0	string			fLaC		FLAC audio bitstream data
->4	byte&0x7f		>0		\b, unknown version
->4	byte&0x7f		0		\b
-# some common bits/sample values
->>20	beshort&0x1f0		0x030		\b, 4 bit
->>20	beshort&0x1f0		0x050		\b, 6 bit
->>20	beshort&0x1f0		0x070		\b, 8 bit
->>20	beshort&0x1f0		0x0b0		\b, 12 bit
->>20	beshort&0x1f0		0x0f0		\b, 16 bit
->>20	beshort&0x1f0		0x170		\b, 24 bit
->>20	byte&0xe		0x0		\b, mono
->>20	byte&0xe		0x2		\b, stereo
->>20	byte&0xe		0x4		\b, 3 channels
->>20	byte&0xe		0x6		\b, 4 channels
->>20	byte&0xe		0x8		\b, 5 channels
->>20	byte&0xe		0xa		\b, 6 channels
->>20	byte&0xe		0xc		\b, 7 channels
->>20	byte&0xe		0xe		\b, 8 channels
-# some common sample rates
->>17	belong&0xfffff0		0x0ac440	\b, 44.1 kHz
->>17	belong&0xfffff0		0x0bb800	\b, 48 kHz
->>17	belong&0xfffff0		0x07d000	\b, 32 kHz
->>17	belong&0xfffff0		0x056220	\b, 22.05 kHz
->>17	belong&0xfffff0		0x05dc00	\b, 24 kHz
->>17	belong&0xfffff0		0x03e800	\b, 16 kHz
->>17	belong&0xfffff0		0x02b110	\b, 11.025 kHz
->>17	belong&0xfffff0		0x02ee00	\b, 12 kHz
->>17	belong&0xfffff0		0x01f400	\b, 8 kHz
->>17	belong&0xfffff0		0x177000	\b, 96 kHz
->>17	belong&0xfffff0		0x0fa000	\b, 64 kHz
->>21	byte&0xf		>0		\b, >4G samples
->>21	byte&0xf		0		\b
->>>22	belong			>0		\b, %u samples
->>>22	belong			0		\b, length unknown
-
-# (ISDN) VBOX voice message file (Wolfram Kleff)
-0       string          VBOX            VBOX voice message data
-
-# ReBorn Song Files (.rbs)
-# David J. Singer <doc at deadvirgins.org.uk>
-8       string          RB40             RBS Song file
->29     string          ReBorn           created by ReBorn
->37     string          Propellerhead    created by ReBirth
-
-# Synthesizer Generator and Kimwitu share their file format
-0	string		A#S#C#S#S#L#V#3	    Synthesizer Generator or Kimwitu data
-# Kimwitu++ uses a slightly different magic
-0	string		A#S#C#S#S#L#HUB	    Kimwitu++ data
-
-# From "Simon Hosie
-0       string  TFMX-SONG       TFMX module sound data
-#------------------------------------------------------------------------------
-# bFLT: file(1) magic for BFLT uclinux binary files
-#
-# From Philippe De Muyter <phdm at macqel.be>
-#
-0	string		bFLT		BFLT executable
->4	belong		x		- version %ld
->4	belong		4
->>36	belong&0x1	0x1		ram
->>36	belong&0x2	0x2		gotpic
->>36	belong&0x4	0x4		gzip
->>36	belong&0x8	0x8		gzdata
-#------------------------------------------------------------------------------
-# blender: file(1) magic for Blender 3D data files
-#
-# Coded by Guillermo S. Romero <gsromero at alumnos.euitt.upm.es> using the
-# data from Ton Roosendaal <ton at blender.nl>. Ton or his company do not
-# support the rule, so mail GSR if problems with it. Rule version: 1.1.
-# You can get latest version with comments and details about the format
-# at http://acd.asoc.euitt.upm.es/~gsromero/3d/blender/magic.blender
-
-0	string	=BLENDER	Blender3D,
->7	string	=_		saved as 32-bits
->7      string	=-		saved as 64-bits
->8	string	=v		little endian
->8	string	=V		big endian
->9	byte	x		with version %c.
->10	byte	x		\b%c
->11	byte	x		\b%c
-
-#------------------------------------------------------------------------------
-# blit:  file(1) magic for 68K Blit stuff as seen from 680x0 machine
-#
-# Note that this 0407 conflicts with several other a.out formats...
-#
-# XXX - should this be redone with "be" and "le", so that it works on
-# little-endian machines as well?  If so, what's the deal with
-# "VAX-order" and "VAX-order2"?
-#
-#0	long		0407		68K Blit (standalone) executable
-#0	short		0407		VAX-order2 68K Blit (standalone) executable
-0	short		03401		VAX-order 68K Blit (standalone) executable
-0	long		0406		68k Blit mpx/mux executable
-0	short		0406		VAX-order2 68k Blit mpx/mux executable
-0	short		03001		VAX-order 68k Blit mpx/mux executable
-# Need more values for WE32 DMD executables.
-# Note that 0520 is the same as COFF
-#0	short		0520		tty630 layers executable
-#
-# i80960 b.out objects and archives
-#
-0	long		0x10d		i960 b.out relocatable object
->16	long		>0		not stripped
-#
-# b.out archive (hp-rt on i960)
-0	string		!<bout>		b.out archive
->8	string		__.SYMDEF	random library
-#------------------------------------------------------------------------------
-# bsdi:  file(1) magic for BSD/OS (from BSDI) objects
-#
-
-0	lelong		0314		386 compact demand paged pure executable
->16	lelong		>0		not stripped
->32	byte		0x6a		(uses shared libs)
-
-0	lelong		0407		386 executable
->16	lelong		>0		not stripped
->32	byte		0x6a		(uses shared libs)
-
-0	lelong		0410		386 pure executable
->16	lelong		>0		not stripped
->32	byte		0x6a		(uses shared libs)
-
-0	lelong		0413		386 demand paged pure executable
->16	lelong		>0		not stripped
->32	byte		0x6a		(uses shared libs)
-
-# same as in SunOS 4.x, except for static shared libraries
-0	belong&077777777	0600413		SPARC demand paged
->0	byte		&0x80
->>20	belong		<4096		shared library
->>20	belong		=4096		dynamically linked executable
->>20	belong		>4096		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
->36	belong		0xb4100001	(uses shared libs)
-
-0	belong&077777777	0600410		SPARC pure
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
->36	belong		0xb4100001	(uses shared libs)
-
-0	belong&077777777	0600407		SPARC
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
->36	belong		0xb4100001	(uses shared libs)
-
-#------------------------------------------------------------------------------
-# autocad:  file(1) magic for cad files
-#
-
-# AutoCAD DWG versions R13/R14 (www.autodesk.com)
-# Written December 01, 2003 by Lester Hightower
-# Based on the DWG File Format Specifications at http://www.opendwg.org/
-0	string	       \101\103\061\060\061		   AutoCAD
->5	string	       \062\000\000\000\000		   DWG ver. R13
->5	string	       \064\000\000\000\000		   DWG ver. R14
-
-# Microstation DGN/CIT Files (www.bentley.com)
-# Written October 30, 2003 by Lester Hightower
-# DGN is the default file extension of Microstation/Intergraph CAD files.
-# CIT is the proprietary raster format (similar to TIFF) used to attach
-# raster underlays to Microstation DGN (vector) drawings.
-# 
-# http://www.wotsit.org/search.asp
-# http://filext.com/detaillist.php?extdetail=DGN
-# http://filext.com/detaillist.php?extdetail=CIT
-#
-# http://www.bentley.com/products/default.cfm?objectid=97F351F5-9C35-4E5E-89C2
-# 3F86C928&method=display&p_objectid=97F351F5-9C35-4E5E-89C280A93F86C928
-# http://www.bentley.com/products/default.cfm?objectid=A5C2FD43-3AC9-4C71-B682
-# 721C479F&method=display&p_objectid=A5C2FD43-3AC9-4C71-B682C7BE721C479F
-0	string	       \010\011\376			   Microstation
->3	string	       \002
->>30	string	       \372\104				   DGN File
->>30	string	       \172\104				   DGN File
->>30	string	       \026\105				   DGN File
->4	string	       \030\000\000			   CIT File
-
-# AutoCad, from Nahuel Greco
-0	string AC1012	AutoCad (release 12)
-0	string AC1014	AutoCad (release 14)
-
-#------------------------------------------------------------------------------
-# c-lang:  file(1) magic for C programs (or REXX)
-#
-
-# XPM icons (Greg Roelofs, newt at uchicago.edu)
-# if you uncomment "/*" for C/REXX below, also uncomment this entry
-#0	string		/*\ XPM\ */	X pixmap image data
-
-# this first will upset you if you're a PL/1 shop...
-# in which case rm it; ascmagic will catch real C programs
-#0	string		/*		C or REXX program text
-#0	string		//		C++ program text
-
-# From: Mikhail Teterin <mi at aldan.algebra.com> 
-0	string		cscope		cscope reference data
->7	string		x		version %.2s
-# We skip the path here, because it is often long (so file will
-# truncate it) and mostly redundant.
-# The inverted index functionality was added some time betwen
-# versions 11 and 15, so look for -q if version is above 14:
->7	string		>14
->>10	regex		.+\ -q\		with inverted index
->10	regex		.+\ -c\		text (non-compressed)
-
-#------------------------------------------------------------------------------
-# c64:  file(1) magic for various commodore 64 related files
-#
-# From <doj at cubic.org>
-
-0x16500	belong		0x12014100	D64 Image
-0x16500	belong		0x12014180	D71 Image
-0x61800 belong		0x28034400	D81 Image
-0	string		C64\40CARTRIDGE	CCS C64 Emultar Cartridge Image
-0	belong		0x43154164	X64 Image
-
-0	string		GCR-1541	GCR Image
->8	byte		x		version: $i
->9	byte		x		tracks: %i
-
-9	string		PSUR		ARC archive (c64)
-2	string		-LH1-		LHA archive (c64)
-
-0	string		C64File		PC64 Emulator file
->8	string		>\0		"%s"
-0	string		C64Image	PC64 Freezer Image
-
-0	beshort		0x38CD		C64 PCLink Image
-0	string		CBM\144\0\0	Power 64 C64 Emulator Snapshot
-
-0	belong		0xFF424CFF	WRAptor packer (c64)
-
-#------------------------------------------------------------------------------
-# CDDB: file(1) magic for CDDB(tm) format CD text data files
-#
-# From <steve at gracenote.com>
-#
-# This is the /etc/magic entry to decode datafiles as used by
-# CDDB-enabled CD player applications.
-#
-
-0       string/b        #\040xmcd               CDDB(tm) format CD text data
-
-#------------------------------------------------------------------------------
-# chi:  file(1) magic for ChiWriter files
-#
-0       string          \\1cw\          ChiWriter file
->5      string          >\0             version %s
-0       string          \\1cw           ChiWriter file
-
-#------------------------------------------------------------------------------
-# chord: file(1) magic for Chord music sheet typesetting utility input files
-#
-# From Philippe De Muyter <phdm at macqel.be>
-# File format is actually free, but many distributed files begin with `{title'
-#
-0	string		{title		Chord text file
-
-#------------------------------------------------------------------------------
-# cisco:  file(1) magic for cisco Systems routers
-#
-# Most cisco file-formats are covered by the generic elf code
-#
-# Microcode files are non-ELF, 0x8501 conflicts with NetBSD/alpha.
-0	belong&0xffffff00	0x85011400  cisco IOS microcode
->7	string		>\0		    for '%s'
-0	belong&0xffffff00	0x8501cb00  cisco IOS experimental microcode
->7	string		>\0		    for '%s'
-#------------------------------------------------------------------------------
-# citrus locale declaration
-#
-
-0	string		RuneCT		Citrus locale declaration for LC_CTYPE
-
-
-#------------------------------------------------------------------------------
-# claris:  file(1) magic for claris
-# "H. Nanosecond" <aldomel at ix.netcom.com>
-# Claris Works a word processor, etc.
-# Version 3.0
-
-# .pct claris works clip art files
-#0000000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
-#*
-#0001000 #010 250 377 377 377 377 000 213 000 230 000 021 002 377 014 000
-#null to byte 1000 octal
-514	string	\377\377\377\377\000	Claris clip art?
->0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0	yes.
-514	string	\377\377\377\377\001	Claris clip art?
->0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0	yes.
-
-# Claris works files
-# .cwk
-0	string	\002\000\210\003\102\117\102\117\000\001\206 Claris works document
-# .plt
-0	string	\020\341\000\000\010\010	Claris Works pallete files .plt
-
-# .msp a dictionary file I am not sure about this I have only one .msp file
-0	string	\002\271\262\000\040\002\000\164	Claris works dictionary
-
-# .usp are user dictionary bits
-# I am not sure about a magic header:
-#0000000 001 123 160 146 070 125 104 040 136 123 015 012 160 157 144 151
-#        soh   S   p   f   8   U   D  sp   ^   S  cr  nl   p   o   d   i
-#0000020 141 164 162 151 163 164 040 136 123 015 012 144 151 166 040 043
-#          a   t   r   i   s   t  sp   ^   S  cr  nl   d   i   v  sp   #
-
-# .mth Thesaurus
-# statrts with \0 but no magic header
-
-# .chy Hyphenation file
-# I am not sure: 000 210 034 000 000
-
-# other claris files
-#./windows/claris/useng.ndx: data
-#./windows/claris/xtndtran.l32: data
-#./windows/claris/xtndtran.lst: data
-#./windows/claris/clworks.lbl: data
-#./windows/claris/clworks.prf: data
-#./windows/claris/userd.spl: data
-
-#------------------------------------------------------------------------------
-# clipper:  file(1) magic for Intergraph (formerly Fairchild) Clipper.
-#
-# XXX - what byte order does the Clipper use?
-#
-# XXX - what's the "!" stuff:
-#
-# >18	short		!074000,000000	C1 R1 
-# >18	short		!074000,004000	C2 R1
-# >18	short		!074000,010000	C3 R1
-# >18	short		!074000,074000	TEST
-#
-# I shall assume it's ANDing the field with the first value and
-# comparing it with the second, and rewrite it as:
-#
-# >18	short&074000	000000		C1 R1 
-# >18	short&074000	004000		C2 R1
-# >18	short&074000	010000		C3 R1
-# >18	short&074000	074000		TEST
-#
-# as SVR3.1's "file" doesn't support anything of the "!074000,000000"
-# sort, nor does SunOS 4.x, so either it's something Intergraph added
-# in CLIX, or something AT&T added in SVR3.2 or later, or something
-# somebody else thought was a good idea; it's not documented in the
-# man page for this version of "magic", nor does it appear to be
-# implemented (at least not after I blew off the bogus code to turn
-# old-style "&"s into new-style "&"s, which just didn't work at all).
-#
-0	short		0575		CLIPPER COFF executable (VAX #)
->20	short		0407		(impure)
->20	short		0410		(5.2 compatible)
->20	short		0411		(pure)
->20	short		0413		(demand paged)
->20	short		0443		(target shared library)
->12	long		>0		not stripped
->22	short		>0		- version %ld
-0	short		0577		CLIPPER COFF executable
->18	short&074000	000000		C1 R1 
->18	short&074000	004000		C2 R1
->18	short&074000	010000		C3 R1
->18	short&074000	074000		TEST
->20	short		0407		(impure)
->20	short		0410		(pure)
->20	short		0411		(separate I&D)
->20	short		0413		(paged)
->20	short		0443		(target shared library)
->12	long		>0		not stripped
->22	short		>0		- version %ld
->48	long&01		01		alignment trap enabled
->52	byte		1		-Ctnc
->52	byte		2		-Ctsw
->52	byte		3		-Ctpw
->52	byte		4		-Ctcb
->53	byte		1		-Cdnc
->53	byte		2		-Cdsw
->53	byte		3		-Cdpw
->53	byte		4		-Cdcb
->54	byte		1		-Csnc
->54	byte		2		-Cssw
->54	byte		3		-Cspw
->54	byte		4		-Cscb
-4	string		pipe		CLIPPER instruction trace
-4	string		prof		CLIPPER instruction profile
-
-#------------------------------------------------------------------------------
-# commands:  file(1) magic for various shells and interpreters
-#
-0	string		:			shell archive or script for antique kernel text
-0	string/b	#!\ /bin/sh		Bourne shell script text
-0	string/b	#!\ /bin/csh		C shell script text
-# korn shell magic, sent by George Wu, gwu at clyde.att.com
-0	string/b	#!\ /bin/ksh		Korn shell script text
-0	string/b 	#!\ /bin/tcsh		Tenex C shell script text
-0	string/b 	#!\ /usr/bin/tcsh	Tenex C shell script text
-0	string/b 	#!\ /usr/local/tcsh	Tenex C shell script text
-0	string/b	#!\ /usr/local/bin/tcsh	Tenex C shell script text
-
-#
-# zsh/ash/ae/nawk/gawk magic from cameron at cs.unsw.oz.au (Cameron Simpson)
-0	string/b	#!\ /bin/zsh		Paul Falstad's zsh script text
-0	string/b	#!\ /usr/bin/zsh	Paul Falstad's zsh script text
-0	string/b	#!\ /usr/local/bin/zsh	Paul Falstad's zsh script text
-0	string/b	#!\ /usr/local/bin/ash	Neil Brown's ash script text
-0	string/b	#!\ /usr/local/bin/ae	Neil Brown's ae script text
-0	string/b	#!\ /bin/nawk		new awk script text
-0	string/b	#!\ /usr/bin/nawk	new awk script text
-0	string/b	#!\ /usr/local/bin/nawk	new awk script text
-0	string/b	#!\ /bin/gawk		GNU awk script text
-0	string/b	#!\ /usr/bin/gawk	GNU awk script text
-0	string/b	#!\ /usr/local/bin/gawk	GNU awk script text
-#
-0	string/b	#!\ /bin/awk		awk script text
-0	string/b	#!\ /usr/bin/awk	awk script text
-0	string		BEGIN			awk script text
-
-# AT&T Bell Labs' Plan 9 shell
-0	string/b	#!\ /bin/rc	Plan 9 rc shell script text
-
-# bash shell magic, from Peter Tobias (tobias at server.et-inf.fho-emden.de)
-0	string/b	#!\ /bin/bash		Bourne-Again shell script text
-0	string/b	#!\ /usr/bin/bash	Bourne-Again shell script text
-0	string/b	#!\ /usr/local/bash	Bourne-Again shell script text
-0	string/b	#!\ /usr/local/bin/bash	Bourne-Again shell script text
-
-# using env
-0	string		#!/usr/bin/env		a
->15	string		>\0			%s script text
-0	string		#!\ /usr/bin/env	a
->16	string		>\0			%s script text
-
-# PHP scripts
-# Ulf Harnhammar <ulfh at update.uu.se>
-0	string/c	=<?php			PHP script text
-0	string		=<?\n			PHP script text
-0	string		=<?\r			PHP script text
-0	string/b	#!\ /usr/local/bin/php	PHP script text
-0	string/b	#!\ /usr/bin/php	PHP script text
-
-0	string		Zend\x00		PHP script Zend Optimizer data
-
-#----------------------------------------------------------------------------
-# communcation
-
-# TTCN is the Tree and Tabular Combined Notation described in ISO 9646-3.
-# It is used for conformance testing of communication protocols.
-# Added by W. Borgert <debacle at debian.org>.
-0	string		$Suite			TTCN Abstract Test Suite
->&1	string		$SuiteId
->>&1	string		>\n			%s
->&2	string		$SuiteId
->>&1	string		>\n			%s
->&3	string		$SuiteId
->>&1	string		>\n			%s
-
-# MSC (message sequence charts) are a formal description technique,
-# described in ITU-T Z.120, mainly used for communication protocols.
-# Added by W. Borgert <debacle at debian.org>.
-0	string		mscdocument	Message Sequence Chart (document)
-0	string		msc		Message Sequence Chart (chart)
-0	string		submsc		Message Sequence Chart (subchart)
-
-#------------------------------------------------------------------------------
-# compress:  file(1) magic for pure-compression formats (no archives)
-#
-# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
-#
-# Formats for various forms of compressed data
-# Formats for "compress" proper have been moved into "compress.c",
-# because it tries to uncompress it to figure out what's inside.
-
-# standard unix compress
-0	string		\037\235	compress'd data
->2	byte&0x80	>0		block compressed
->2	byte&0x1f	x		%d bits
-
-# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver)
-#   Edited by Chris Chittleborough <cchittleborough at yahoo.com.au>, March 2002
-#	* Original filename is only at offset 10 if "extra field" absent
-#	* Produce shorter output - notably, only report compression methods
-#	  other than 8 ("deflate", the only method defined in RFC 1952).
-0       string          \037\213        gzip compressed data
->2	byte		<8		\b, reserved method
->2	byte		>8		\b, unknown method
->3	byte		&0x01		\b, ASCII
->3	byte		&0x02		\b, continuation
->3	byte		&0x04		\b, extra field
->3	byte&0xC	=0x08
->>10	string		x		\b, was "%s"
->9	byte		=0x00		\b, from MS-DOS
->9	byte		=0x01		\b, from Amiga
->9	byte		=0x02		\b, from VMS
->9	byte		=0x03		\b, from Unix
->9	byte		=0x05		\b, from Atari
->9	byte		=0x06		\b, from OS/2
->9	byte		=0x07		\b, from MacOS
->9	byte		=0x0A		\b, from Tops/20
->9	byte		=0x0B		\b, from Win/32
->3	byte		&0x10		\b, comment
->3	byte		&0x20		\b, encrypted
-### >4	ledate		x		last modified: %s,
->8	byte		2		\b, max compression
->8	byte		4		\b, max speed
-
-# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis
-0	string		\037\036	packed data
->2	belong		>1		\b, %d characters originally
->2	belong		=1		\b, %d character originally
-#
-# This magic number is byte-order-independent.
-0	short		0x1f1f		old packed data
-
-# XXX - why *two* entries for "compacted data", one of which is
-# byte-order independent, and one of which is byte-order dependent?
-#
-0	short		0x1fff		compacted data
-# This string is valid for SunOS (BE) and a matching "short" is listed
-# in the Ultrix (LE) magic file.
-0	string		\377\037	compacted data
-0	short		0145405		huf output
-
-# bzip2
-0	string		BZh		bzip2 compressed data
->3	byte		>47		\b, block size = %c00k
-
-# squeeze and crunch
-# Michael Haardt <michael at cantor.informatik.rwth-aachen.de>
-0	beshort		0x76FF		squeezed data,
->4	string		x		original name %s
-0	beshort		0x76FE		crunched data,
->2	string		x		original name %s
-0	beshort		0x76FD		LZH compressed data,
->2	string		x		original name %s
-
-# Freeze
-0	string		\037\237	frozen file 2.1
-0	string		\037\236	frozen file 1.0 (or gzip 0.5)
-
-# SCO compress -H (LZH)
-0	string		\037\240	SCO compress -H (LZH) data
-
-# European GSM 06.10 is a provisional standard for full-rate speech
-# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse
-# excitation/long term prediction) coding at 13 kbit/s.
-#
-# There's only a magic nibble (4 bits); that nibble repeats every 33
-# bytes.  This isn't suited for use, but maybe we can use it someday.
-#
-# This will cause very short GSM files to be declared as data and
-# mismatches to be declared as data too!
-#0	byte&0xF0	0xd0		data
-#>33	byte&0xF0	0xd0
-#>66	byte&0xF0	0xd0
-#>99	byte&0xF0	0xd0
-#>132	byte&0xF0	0xd0		GSM 06.10 compressed audio
-
-# bzip	a block-sorting file compressor
-#	by Julian Seward <sewardj at cs.man.ac.uk> and others
-#
-0	string		BZ		bzip compressed data
->2	byte		x		\b, version: %c
->3	string		=1		\b, compression block size 100k
->3	string		=2		\b, compression block size 200k
->3	string		=3		\b, compression block size 300k
->3	string		=4		\b, compression block size 400k
->3	string		=5		\b, compression block size 500k
->3	string		=6		\b, compression block size 600k
->3	string		=7		\b, compression block size 700k
->3	string		=8		\b, compression block size 800k
->3	string		=9		\b, compression block size 900k
-
-# lzop from <markus.oberhumer at jk.uni-linz.ac.at>
-0	string		\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a	lzop compressed data
->9	beshort		<0x0940
->>9	byte&0xf0	=0x00		- version 0.
->>9	beshort&0x0fff	x		\b%03x,
->>13	byte		1		LZO1X-1,
->>13	byte		2		LZO1X-1(15),
->>13	byte		3		LZO1X-999,
-## >>22	bedate		>0		last modified: %s,
->>14	byte		=0x00		os: MS-DOS
->>14	byte		=0x01		os: Amiga
->>14	byte		=0x02		os: VMS
->>14	byte		=0x03		os: Unix
->>14	byte		=0x05		os: Atari
->>14	byte		=0x06		os: OS/2
->>14	byte		=0x07		os: MacOS
->>14	byte		=0x0A		os: Tops/20
->>14	byte		=0x0B		os: WinNT
->>14	byte		=0x0E		os: Win32
->9	beshort		>0x0939
->>9	byte&0xf0	=0x00		- version 0.
->>9	byte&0xf0	=0x10		- version 1.
->>9	byte&0xf0	=0x20		- version 2.
->>9	beshort&0x0fff	x		\b%03x,
->>15	byte		1		LZO1X-1,
->>15	byte		2		LZO1X-1(15),
->>15	byte		3		LZO1X-999,
-## >>25	bedate		>0		last modified: %s,
->>17	byte		=0x00		os: MS-DOS
->>17	byte		=0x01		os: Amiga
->>17	byte		=0x02		os: VMS
->>17	byte		=0x03		os: Unix
->>17	byte		=0x05		os: Atari
->>17	byte		=0x06		os: OS/2
->>17	byte		=0x07		os: MacOS
->>17	byte		=0x0A		os: Tops/20
->>17	byte		=0x0B		os: WinNT
->>17	byte		=0x0E		os: Win32
-
-# 4.3BSD-Quasijarus Strong Compression
-# http://minnie.tuhs.org/Quasijarus/compress.html
-0	string		\037\241	Quasijarus strong compressed data
-
-# From: Cory Dikkers <cdikkers at swbell.net>
-0	string		XPKF		Amiga xpkf.library compressed data
-0	string		PP11		Power Packer 1.1 compressed data
-0	string		PP20		Power Packer 2.0 compressed data,
->4	belong		0x09090909	fast compression
->4	belong		0x090A0A0A	mediocre compression
->4	belong		0x090A0B0B	good compression
->4	belong		0x090A0C0C	very good compression
->4	belong		0x090A0C0D	best compression
-
-# 7z archiver, from Thomas Klausner (wiz at danbala.tuwien.ac.at)
-# http://www.7-zip.org or DOC/7zFormat.txt 
-#
-0	string		7z\274\257\047\034	7z archive data,
->6	byte		x			version %d
->7	byte		x			\b.%d
-
-# AFX compressed files (Wolfram Kleff)
-2	string		-afx-		AFX compressed file data
-#------------------------------------------------------------------------------
-# Console game magic
-# Toby Deshane <hac at shoelace.digivill.net>
-#    ines:  file(1) magic for Marat's iNES Nintendo Entertainment System
-#           ROM dump format
-
-0 string NES\032 iNES ROM dump,
->4 byte  x     %dx16k PRG
->5 byte  x     \b, %dx8k CHR
->6 byte&0x01  =0x1  \b, [Vert.]
->6 byte&0x01  =0x0  \b, [Horiz.]
->6 byte&0x02  =0x2  \b, [SRAM]
->6 byte&0x04  =0x4  \b, [Trainer]
->6 byte&0x04  =0x8  \b, [4-Scr]
-
-#------------------------------------------------------------------------------
-# gameboy:  file(1) magic for the Nintendo (Color) Gameboy raw ROM format
-#
-0x104 belong 0xCEED6666 Gameboy ROM:
->0x134 string >\0 "%.16s"
->0x146 byte 0x03  \b,[SGB]
->0x147 byte 0x00  \b, [ROM ONLY]
->0x147 byte 0x01  \b, [ROM+MBC1]
->0x147 byte 0x02  \b, [ROM+MBC1+RAM]
->0x147 byte 0x03  \b, [ROM+MBC1+RAM+BATT]
->0x147 byte 0x05  \b, [ROM+MBC2]
->0x147 byte 0x06  \b, [ROM+MBC2+BATTERY]
->0x147 byte 0x08  \b, [ROM+RAM]
->0x147 byte 0x09  \b, [ROM+RAM+BATTERY]
->0x147 byte 0x0B  \b, [ROM+MMM01]
->0x147 byte 0x0C  \b, [ROM+MMM01+SRAM]
->0x147 byte 0x0D  \b, [ROM+MMM01+SRAM+BATT]
->0x147 byte 0x0F  \b, [ROM+MBC3+TIMER+BATT]
->0x147 byte 0x10  \b, [ROM+MBC3+TIMER+RAM+BATT]
->0x147 byte 0x11  \b, [ROM+MBC3]
->0x147 byte 0x12  \b, [ROM+MBC3+RAM]
->0x147 byte 0x13  \b, [ROM+MBC3+RAM+BATT]
->0x147 byte 0x19  \b, [ROM+MBC5]
->0x147 byte 0x1A  \b, [ROM+MBC5+RAM]
->0x147 byte 0x1B  \b, [ROM+MBC5+RAM+BATT]
->0x147 byte 0x1C  \b, [ROM+MBC5+RUMBLE]
->0x147 byte 0x1D  \b, [ROM+MBC5+RUMBLE+SRAM]
->0x147 byte 0x1E  \b, [ROM+MBC5+RUMBLE+SRAM+BATT]
->0x147 byte 0x1F  \b, [Pocket Camera]
->0x147 byte 0xFD  \b, [Bandai TAMA5]
->0x147 byte 0xFE  \b, [Hudson HuC-3]
->0x147 byte 0xFF  \b, [Hudson HuC-1]
-
->0x148 byte 0     \b, ROM: 256Kbit
->0x148 byte 1     \b, ROM: 512Kbit
->0x148 byte 2     \b, ROM: 1Mbit
->0x148 byte 3     \b, ROM: 2Mbit
->0x148 byte 4     \b, ROM: 4Mbit
->0x148 byte 5     \b, ROM: 8Mbit
->0x148 byte 6     \b, ROM: 16Mbit
->0x148 byte 0x52  \b, ROM: 9Mbit
->0x148 byte 0x53  \b, ROM: 10Mbit
->0x148 byte 0x54  \b, ROM: 12Mbit
-
->0x149 byte 1     \b, RAM: 16Kbit
->0x149 byte 2     \b, RAM: 64Kbit
->0x149 byte 3     \b, RAM: 128Kbit
->0x149 byte 4     \b, RAM: 1Mbit
-
-#>0x14e long  x     \b, CRC: %x
-
-#------------------------------------------------------------------------------
-# genesis:  file(1) magic for the Sega MegaDrive/Genesis raw ROM format
-#
-0x100 string SEGA  Sega MegaDrive/Genesis raw ROM dump
->0x120 string >\0 Name: "%.16s"
->0x110 string >\0 %.16s
->0x1B0 string RA with SRAM
-
-#------------------------------------------------------------------------------
-# genesis:  file(1) magic for the Super MegaDrive ROM dump format
-#
-0x280 string EAGN  Super MagicDrive ROM dump
->0 byte x %dx16k blocks
->2 byte 0 \b, last in series or standalone
->2 byte >0 \b, split ROM
->8 byte 0xAA
->9 byte 0xBB
-
-#------------------------------------------------------------------------------
-# genesis:  file(1) alternate magic for the Super MegaDrive ROM dump format
-#
-0x280 string EAMG  Super MagicDrive ROM dump
->0 byte x %dx16k blocks
->2 byte x \b, last in series or standalone
->8 byte 0xAA
->9 byte 0xBB
-
-#------------------------------------------------------------------------------
-# smsgg:  file(1) magic for Sega Master System and Game Gear ROM dumps
-#
-# Does not detect all images.  Very preliminary guesswork.  Need more data
-# on format.
-#
-# FIXME: need a little more info...;P
-#
-#0 byte 0xF3
-#>1 byte 0xED  Sega Master System/Game Gear ROM dump
-#>1 byte 0x31  Sega Master System/Game Gear ROM dump
-#>1 byte 0xDB  Sega Master System/Game Gear ROM dump
-#>1 byte 0xAF  Sega Master System/Game Gear ROM dump
-#>1 byte 0xC3  Sega Master System/Game Gear ROM dump
-
-#------------------------------------------------------------------------------
-# dreamcast:  file(1) uncertain magic for the Sega Dreamcast VMU image format
-#
-0 belong 0x21068028   Sega Dreamcast VMU game image
-0 string LCDi         Dream Animator file
-
-#------------------------------------------------------------------------------
-# v64: file(1) uncertain magic for the V64 format N64 ROM dumps
-#
-0 belong 0x37804012    V64 Nintendo 64 ROM dump
-
-#------------------------------------------------------------------------------
-# msx: file(1) magic for MSX game cartridge dumps
-# Too simple - MPi
-#0 beshort 0x4142 MSX game cartridge dump 
-
-#------------------------------------------------------------------------------
-# Sony Playstation executables (Adam Sjoegren <asjo at diku.dk>) :
-0	string	PS-X\ EXE	Sony Playstation executable
-#  Area:
->113	string	x		(%s)
-
-#------------------------------------------------------------------------------
-# Microsoft Xbox executables .xbe (Esa Hyytiä <ehyytia at cc.hut.fi>)
-0       string          XBEH            XBE, Microsoft Xbox executable
-# probabilistic checks whether signed or not
->0x0004 ulelong =0x0
->>&2    ulelong =0x0
->>>&2   ulelong =0x0  \b, not signed
->0x0004 ulelong >0
->>&2    ulelong >0
->>>&2   ulelong >0    \b, signed
-# expect base address of 0x10000
->0x0104               ulelong =0x10000
->>(0x0118-0x0FF60)    ulelong&0x80000007  0x80000007 \b, all regions
->>(0x0118-0x0FF60)    ulelong&0x80000007  !0x80000007
->>>(0x0118-0x0FF60)   ulelong >0           (regions:
->>>>(0x0118-0x0FF60)  ulelong &0x00000001  NA
->>>>(0x0118-0x0FF60)  ulelong &0x00000002  Japan
->>>>(0x0118-0x0FF60)  ulelong &0x00000004  Rest_of_World
->>>>(0x0118-0x0FF60)  ulelong &0x80000000  Manufacturer
->>>(0x0118-0x0FF60)   ulelong >0           \b)
-
-# --------------------------------
-# Microsoft Xbox data file formats
-0       string          XIP0            XIP, Microsoft Xbox data
-0       string          XTF0            XTF, Microsoft Xbox data
-#------------------------------------------------------------------------------
-# convex:  file(1) magic for Convex boxes
-#
-# Convexes are big-endian.
-#
-# /*\
-#  * Below are the magic numbers and tests added for Convex.
-#  * Added at beginning, because they are expected to be used most.
-# \*/
-0	belong	0507	Convex old-style object
->16	belong	>0	not stripped
-0	belong	0513	Convex old-style demand paged executable
->16	belong	>0	not stripped
-0	belong	0515	Convex old-style pre-paged executable
->16	belong	>0	not stripped
-0	belong	0517	Convex old-style pre-paged, non-swapped executable
->16	belong	>0	not stripped
-0	belong	0x011257	Core file
-#
-# The following are a series of dump format magic numbers.  Each one
-# corresponds to a drastically different dump format.  The first on is
-# the original dump format on a 4.1 BSD or earlier file system.  The
-# second marks the change between the 4.1 file system and the 4.2 file
-# system.  The Third marks the changing of the block size from 1K
-# to 2K to be compatible with an IDC file system.  The fourth indicates
-# a dump that is dependent on Convex Storage Manager, because data in
-# secondary storage is not physically contained within the dump.
-# The restore program uses these number to determine how the data is
-# to be extracted.
-#
-24	belong	=60011	dump format, 4.1 BSD or earlier
-24	belong	=60012	dump format, 4.2 or 4.3 BSD without IDC
-24	belong	=60013	dump format, 4.2 or 4.3 BSD (IDC compatible)
-24	belong	=60014	dump format, Convex Storage Manager by-reference dump
-#
-# what follows is a bunch of bit-mask checks on the flags field of the opthdr.
-# If there is no `=' sign, assume just checking for whether the bit is set?
-#
-0	belong	0601		Convex SOFF
->88	belong&0x000f0000	=0x00000000	c1
->88	belong			&0x00010000	c2
->88	belong			&0x00020000	c2mp
->88	belong			&0x00040000	parallel
->88	belong			&0x00080000	intrinsic
->88	belong			&0x00000001	demand paged
->88	belong			&0x00000002	pre-paged
->88	belong			&0x00000004	non-swapped
->88	belong			&0x00000008	POSIX
-#
->84	belong			&0x80000000	executable
->84	belong			&0x40000000	object
->84	belong&0x20000000	=0		not stripped
->84	belong&0x18000000	=0x00000000	native fpmode
->84	belong&0x18000000	=0x10000000	ieee fpmode
->84	belong&0x18000000	=0x18000000	undefined fpmode
-#
-0	belong			0605		Convex SOFF core
-#
-0	belong			0607		Convex SOFF checkpoint
->88	belong&0x000f0000	=0x00000000	c1
->88	belong			&0x00010000	c2
->88	belong			&0x00020000	c2mp
->88	belong			&0x00040000	parallel
->88	belong			&0x00080000	intrinsic
->88	belong			&0x00000008	POSIX
-#
->84	belong&0x18000000	=0x00000000	native fpmode
->84	belong&0x18000000	=0x10000000	ieee fpmode
->84	belong&0x18000000	=0x18000000	undefined fpmode
-
-# ----------------------------------------------------------------------------
-# ctags:  file (1) magic for Exuberant Ctags files
-# From: Alexander Mai <mai at migdal.ikp.physik.tu-darmstadt.de>
-0       string  !_TAG   Exuberant Ctags tag file text
-
-#------------------------------------------------------------------------------
-# dact:  file(1) magic for DACT compressed files
-#
-0	long		0x444354C3	DACT compressed data
->4	byte		>-1		(version %i.
->5	byte		>-1		$BS%i.
->6	byte		>-1		$BS%i)
->7	long		>0		$BS, original size: %i bytes
->15	long		>30		$BS, block size: %i bytes
-
-#------------------------------------------------------------------------------
-# database:  file(1) magic for various databases
-#
-# extracted from header/code files by Graeme Wilford (eep2gw at ee.surrey.ac.uk)
-#
-#
-# GDBM magic numbers
-#  Will be maintained as part of the GDBM distribution in the future.
-#  <downsj at teeny.org>
-0	belong	0x13579ace	GNU dbm 1.x or ndbm database, big endian
-0	lelong	0x13579ace	GNU dbm 1.x or ndbm database, little endian
-0	string	GDBM		GNU dbm 2.x database
-#
-# Berkeley DB
-#
-# Ian Darwin's file /etc/magic files: big/little-endian version.
-#
-# Hash 1.85/1.86 databases store metadata in network byte order.
-# Btree 1.85/1.86 databases store the metadata in host byte order.
-# Hash and Btree 2.X and later databases store the metadata in host byte order.
-
-0	long	0x00061561	Berkeley DB
->8	belong	4321
->>4	belong	>2		1.86
->>4	belong	<3		1.85
->>4	belong	>0		(Hash, version %d, native byte-order)
->8	belong	1234
->>4	belong	>2		1.86
->>4	belong	<3		1.85
->>4	belong	>0		(Hash, version %d, little-endian)
-
-0	belong	0x00061561	Berkeley DB
->8	belong	4321
->>4	belong	>2		1.86
->>4	belong	<3		1.85
->>4	belong	>0		(Hash, version %d, big-endian)
->8	belong	1234
->>4	belong	>2		1.86
->>4	belong	<3		1.85
->>4	belong	>0		(Hash, version %d, native byte-order)
-
-0	long	0x00053162	Berkeley DB 1.85/1.86
->4	long	>0		(Btree, version %d, native byte-order)
-0	belong	0x00053162	Berkeley DB 1.85/1.86
->4	belong	>0		(Btree, version %d, big-endian)
-0	lelong	0x00053162	Berkeley DB 1.85/1.86
->4	lelong	>0		(Btree, version %d, little-endian)
-
-12	long	0x00061561	Berkeley DB
->16	long	>0		(Hash, version %d, native byte-order)
-12	belong	0x00061561	Berkeley DB
->16	belong	>0		(Hash, version %d, big-endian)
-12	lelong	0x00061561	Berkeley DB
->16	lelong	>0		(Hash, version %d, little-endian)
-
-12	long	0x00053162	Berkeley DB
->16	long	>0		(Btree, version %d, native byte-order)
-12	belong	0x00053162	Berkeley DB
->16	belong	>0		(Btree, version %d, big-endian)
-12	lelong	0x00053162	Berkeley DB
->16	lelong	>0		(Btree, version %d, little-endian)
-
-12	long	0x00042253	Berkeley DB
->16	long	>0		(Queue, version %d, native byte-order)
-12	belong	0x00042253	Berkeley DB
->16	belong	>0		(Queue, version %d, big-endian)
-12	lelong	0x00042253	Berkeley DB
->16	lelong	>0		(Queue, version %d, little-endian)
-#
-#
-# Round Robin Database Tool by Tobias Oetiker <oetiker at ee.ethz.ch>
-0	string	RRD		RRDTool DB
->4	string	x		version %s
-#----------------------------------------------------------------------
-# ROOT: file(1) magic for ROOT databases
-#
-0       string  root\0  ROOT file
->4      belong  x       Version %d
->33     belong  x       (Compression: %d)
-
-# XXX: Weak magic.
-# Alex Ott <ott at jet.msk.su>
-## Paradox file formats
-#2	  leshort	0x0800	Paradox 
-#>0x39	  byte		3	v. 3.0 
-#>0x39	  byte		4	v. 3.5 
-#>0x39	  byte		9	v. 4.x 
-#>0x39	  byte		10	v. 5.x 
-#>0x39	  byte		11	v. 5.x 
-#>0x39	  byte		12	v. 7.x 
-#>>0x04	  byte		0	indexed .DB data file 
-#>>0x04	  byte		1	primary index .PX file 
-#>>0x04	  byte		2	non-indexed .DB data file 
-#>>0x04	  byte		3	non-incrementing secondary index .Xnn file 
-#>>0x04	  byte		4	secondary index .Ynn file 
-#>>0x04	  byte		5	incrementing secondary index .Xnn file 
-#>>0x04	  byte		6	non-incrementing secondary index .XGn file 
-#>>0x04	  byte		7	secondary index .YGn file 
-#>>>0x04	  byte		8	incrementing secondary index .XGn file 
-## XBase database files
-#0      byte       0x02	
-#>8     leshort	  >0
-#>>12   leshort    0	FoxBase 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x03	
-#>8     leshort	  >0
-#>>12   leshort    0	FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x04	
-#>8     leshort	  >0
-#>>12   leshort    0	dBASE IV no memo file 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x05	
-#>8     leshort	  >0
-#>>12   leshort    0	dBASE V no memo file 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x30
-#>8     leshort	  >0
-#>>12   leshort    0	Visual FoxPro 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x43
-#>8     leshort	  >0
-#>>12   leshort    0	FlagShip with memo var size 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x7b
-#>8     leshort	  >0
-#>>12   leshort    0	dBASEIV with memo 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x83	
-#>8     leshort	  >0
-#>>12   leshort    0	FoxBase+, dBaseIII+ with memo 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x8b
-#>8     leshort	  >0
-#>>12   leshort    0	dBaseIV with memo 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x8e	
-#>8     leshort	  >0
-#>>12   leshort    0	dBaseIV with SQL Table 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0xb3
-#>8     leshort	  >0
-#>>12   leshort    0	FlagShip with .dbt memo 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0xf5
-#>8     leshort	  >0
-#>>12   leshort    0	FoxPro with memo 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0	leshort		0x0006		DBase 3 index file
-
-# MS Access database
-4	  string	Standard\ Jet\ DB	Microsoft Access Database
-
-# TDB database from Samba et al - Martin Pool <mbp at samba.org>
-0	string	TDB\ file		TDB database
->32	lelong	0x2601196D		version 6, little-endian
->>36	lelong	x			hash size %d bytes
-
-# SE Linux policy database
-0       lelong  0xf97cff8c      SE Linux policy
->16     lelong  x               v%d
->20     lelong  1      MLS
->24     lelong  x       %d symbols
->28     lelong  x       %d ocons
-
-# ICE authority file data (Wolfram Kleff)
-2	string		ICE		ICE authority data
-
-# X11 Xauthority file (Wolfram Kleff)
-10	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-11	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-12	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-13	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-14	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-15	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-16	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-17	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-18	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-
-#------------------------------------------------------------------------------
-# diamond:  file(1) magic for Diamond system
-#
-# ... diamond is a multi-media mail and electronic conferencing system....
-#
-# XXX - I think it was either renamed Slate, or replaced by Slate....
-#
-#	The full deal is too long...
-#0	string	<list>\n<protocol\ bbn-multimedia-format>	Diamond Multimedia Document
-0	string	=<list>\n<protocol\ bbn-m	Diamond Multimedia Document
-
-#------------------------------------------------------------------------------
-# diff:  file(1) magic for diff(1) output
-#
-0	string		diff\ 	'diff' output text
-0	string		***\ 		'diff' output text
-0	string		Only\ in\ 	'diff' output text
-0	string		Common\ subdirectories:\ 	'diff' output text
-
-# xdelta is like diff(1) for binary files (works for text, too).
-# Available from: ftp://ftp.xcf.berkeley.edu/pub/xdelta/
-0       string          %XDZ            xdelta diff file
->4      string          >%              version %.3s
-#  Digital UNIX - Info
-#
-0	string	!<arch>\n________64E	Alpha archive
->22	string	X			-- out of date
-#
-# Alpha COFF Based Executables
-# The stripped stuff really needs to be an 8 byte (64 bit) compare,
-# but this works
-0	leshort		0x183		COFF format alpha
->22	leshort&020000	&010000		sharable library,
->22	leshort&020000	^010000		dynamically linked,
->24	leshort		0410		pure
->24	leshort		0413		demand paged
->8	lelong		>0		executable or object module, not stripped
->8	lelong		0
->>12	lelong		0		executable or object module, stripped
->>12	lelong		>0		executable or object module, not stripped
->27     byte            >0              - version %d.
->26     byte            >0              %d-
->28     leshort         >0              %d
-#
-# The next is incomplete, we could tell more about this format,
-# but its not worth it.
-0	leshort		0x188	Alpha compressed COFF
-0	leshort		0x18f	Alpha u-code object
-#
-#
-# Some other interesting Digital formats,
-0	string	\377\377\177		ddis/ddif
-0	string	\377\377\174		ddis/dots archive
-0	string	\377\377\176		ddis/dtif table data
-0	string	\033c\033		LN03 output
-0	long	04553207		X image
-#
-0	string	!<PDF>!\n		profiling data file
-#
-# Locale data tables (MIPS and Alpha).
-#
-0	short		0x0501		locale data table
->6	short		0x24		for MIPS
->6	short		0x40		for Alpha
-# ATSC A/53 aka AC-3 aka Dolby Digital <ashitaka at gmx.at>
-# from http://www.atsc.org/standards/a_52a.pdf
-# corrections, additions, etc. are always welcome!
-#
-# syncword
-0       beshort         0x0b77  ATSC A/52 aka AC-3 aka Dolby Digital stream,
-# fscod
->4      byte&0xc0       0x00    48 kHz,
->4      byte&0xc0       0x40    44.1 kHz,
->4      byte&0xc0       0x80    32 kHz,
-# is this one used for 96 kHz?
->4      byte&0xc0       0xc0    reserved frequency,
-#
->5	byte&7 = 0		\b, complete main (CM)
->5	byte&7 = 1		\b, music and effects (ME)
->5	byte&7 = 2		\b, visually impaired (VI)
->5	byte&7 = 3		\b, hearing impaired (HI)
->5	byte&7 = 4		\b, dialogue (D)
->5	byte&7 = 5		\b, commentary (C)
->5	byte&7 = 6		\b, emergency (E)
-# acmod
->6      byte&0xe0       0x00    1+1 front,
->6      byte&0xe0       0x20    1 front/0 rear,
->6      byte&0xe0       0x40    2 front/0 rear,
->6      byte&0xe0       0x60    3 front/0 rear,
->6      byte&0xe0       0x80    2 front/1 rear,
->6      byte&0xe0       0xa0    3 front/1 rear,
->6      byte&0xe0       0xc0    2 front/2 rear,
->6      byte&0xe0       0xe0    3 front/2 rear,
-# lfeon (these may be incorrect)
->7      byte&0x40       0x00    LFE off,
->7      byte&0x40       0x40    LFE on,
-#
->4	byte&0x3e = 0x00	\b, 32 kbit/s
->4	byte&0x3e = 0x02        \b, 40 kbit/s
->4	byte&0x3e = 0x04        \b, 48 kbit/s
->4	byte&0x3e = 0x06        \b, 56 kbit/s
->4	byte&0x3e = 0x08        \b, 64 kbit/s
->4	byte&0x3e = 0x0a        \b, 80 kbit/s
->4	byte&0x3e = 0x0c        \b, 96 kbit/s
->4	byte&0x3e = 0x0e        \b, 112 kbit/s
->4	byte&0x3e = 0x10        \b, 128 kbit/s
->4	byte&0x3e = 0x12        \b, 160 kbit/s
->4	byte&0x3e = 0x14        \b, 192 kbit/s
->4	byte&0x3e = 0x16        \b, 224 kbit/s
->4	byte&0x3e = 0x18        \b, 256 kbit/s
->4	byte&0x3e = 0x1a        \b, 320 kbit/s
->4	byte&0x3e = 0x1c        \b, 384 kbit/s
->4	byte&0x3e = 0x1e        \b, 448 kbit/s
->4	byte&0x3e = 0x20        \b, 512 kbit/s
->4	byte&0x3e = 0x22        \b, 576 kbit/s
->4	byte&0x3e = 0x24        \b, 640 kbit/s
-# dsurmod (these may be incorrect)
->6      beshort&0x0180  0x0000  Dolby Surround not indicated
->6      beshort&0x0180  0x0080  not Dolby Surround encoded
->6      beshort&0x0180  0x0100  Dolby Surround encoded
->6      beshort&0x0180  0x0180  reserved Dolby Surround mode
-
-#------------------------------------------------------------------------------
-# dump:  file(1) magic for dump file format--for new and old dump filesystems
-#
-# We specify both byte orders in order to recognize byte-swapped dumps.
-#
-24	belong	60012		new-fs dump file (big endian),
->4	bedate	x		Previous dump %s,
->8	bedate	x		This dump %s,
->12	belong	>0		Volume %ld,
->692	belong	0		Level zero, type:
->692	belong	>0		Level %d, type:
->0	belong	1		tape header,
->0	belong	2		beginning of file record,
->0	belong	3		map of inodes on tape,
->0	belong	4		continuation of file record,
->0	belong	5		end of volume,
->0	belong	6		map of inodes deleted,
->0	belong	7		end of medium (for floppy),
->676	string	>\0		Label %s,
->696	string	>\0		Filesystem %s,
->760	string	>\0		Device %s,
->824	string	>\0		Host %s,
->888	belong	>0		Flags %x
-
-24	belong	60011		old-fs dump file (big endian),
-#>4	bedate	x		Previous dump %s,
-#>8	bedate	x		This dump %s,
->12	belong	>0		Volume %ld,
->692	belong	0		Level zero, type:
->692	belong	>0		Level %d, type:
->0	belong	1		tape header,
->0	belong	2		beginning of file record,
->0	belong	3		map of inodes on tape,
->0	belong	4		continuation of file record,
->0	belong	5		end of volume,
->0	belong	6		map of inodes deleted,
->0	belong	7		end of medium (for floppy),
->676	string	>\0		Label %s,
->696	string	>\0		Filesystem %s,
->760	string	>\0		Device %s,
->824	string	>\0		Host %s,
->888	belong	>0		Flags %x
-
-24	lelong	60012		new-fs dump file (little endian),
->4	ledate	x		This dump %s,
->8	ledate	x		Previous dump %s,
->12	lelong	>0		Volume %ld,
->692	lelong	0		Level zero, type:
->692	lelong	>0		Level %d, type:
->0	lelong	1		tape header,
->0	lelong	2		beginning of file record,
->0	lelong	3		map of inodes on tape,
->0	lelong	4		continuation of file record,
->0	lelong	5		end of volume,
->0	lelong	6		map of inodes deleted,
->0	lelong	7		end of medium (for floppy),
->676	string	>\0		Label %s,
->696	string	>\0		Filesystem %s,
->760	string	>\0		Device %s,
->824	string	>\0		Host %s,
->888	lelong	>0		Flags %x
-
-24	lelong	60011		old-fs dump file (little endian),
-#>4	ledate	x		Previous dump %s,
-#>8	ledate	x		This dump %s,
->12	lelong	>0		Volume %ld,
->692	lelong	0		Level zero, type:
->692	lelong	>0		Level %d, type:
->0	lelong	1		tape header,
->0	lelong	2		beginning of file record,
->0	lelong	3		map of inodes on tape,
->0	lelong	4		continuation of file record,
->0	lelong	5		end of volume,
->0	lelong	6		map of inodes deleted,
->0	lelong	7		end of medium (for floppy),
->676	string	>\0		Label %s,
->696	string	>\0		Filesystem %s,
->760	string	>\0		Device %s,
->824	string	>\0		Host %s,
->888	lelong	>0		Flags %x
-
-#------------------------------------------------------------------------------
-# Dyadic: file(1) magic for Dyalog APL.
-#
-0 	byte	0xaa
->1	byte	<4		Dyalog APL
->>1	byte	0x00		incomplete workspace
->>1	byte	0x01		component file
->>1	byte	0x02		external variable
->>1	byte	0x03		workspace
->>2	byte	x		version %d
->>3	byte	x		.%d
-
-#------------------------------------------------------------------------------
-# T602 editor documents 
-# by David Necas <yeti at physics.muni.cz>
-0	string	@CT\ 	T602 document data,
->4	string	0	Kamenicky
->4	string	1	CP 852
->4	string	2	KOI8-CS
->4	string	>2	unknown encoding
-
-# Vi IMproved Encrypted file 
-# by David Necas <yeti at physics.muni.cz>
-0	string	VimCrypt~	Vim encrypted file data
-
-#------------------------------------------------------------------------------
-# elf:  file(1) magic for ELF executables
-#
-# We have to check the byte order flag to see what byte order all the
-# other stuff in the header is in.
-#
-# What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
-#
-# updated by Daniel Quinlan (quinlan at yggdrasil.com)
-0	string		\177ELF		ELF
->4	byte		0		invalid class
->4	byte		1		32-bit
-# only for MIPS - in the future, the ABI field of e_flags should be used.
->>18	leshort		8
->>>36	lelong		&0x20		N32
->>18	leshort		10
->>>36	lelong		&0x20		N32
->>18	beshort		8
->>>36	belong		&0x20		N32
->>18	beshort		10
->>>36	belong		&0x20		N32
->4	byte		2		64-bit
->5	byte		0		invalid byte order
->5	byte		1		LSB
-# The official e_machine number for MIPS is now #8, regardless of endianness.
-# The second number (#10) will be deprecated later. For now, we still
-# say something if #10 is encountered, but only gory details for #8.
->>18    leshort		8
-# only for 32-bit
->>>4	byte		1
->>>>36  lelong&0xf0000000	0x00000000	MIPS-I
->>>>36  lelong&0xf0000000	0x10000000	MIPS-II
->>>>36  lelong&0xf0000000	0x20000000	MIPS-III
->>>>36  lelong&0xf0000000	0x30000000	MIPS-IV
->>>>36  lelong&0xf0000000	0x40000000	MIPS-V
->>>>36  lelong&0xf0000000	0x60000000	MIPS32
->>>>36  lelong&0xf0000000	0x70000000	MIPS64
->>>>36  lelong&0xf0000000	0x80000000	MIPS32 rel2
->>>>36  lelong&0xf0000000	0x90000000	MIPS64 rel2
-# only for 64-bit
->>>4	byte		2
->>>>48  lelong&0xf0000000	0x00000000	MIPS-I
->>>>48  lelong&0xf0000000	0x10000000	MIPS-II
->>>>48  lelong&0xf0000000	0x20000000	MIPS-III
->>>>48  lelong&0xf0000000	0x30000000	MIPS-IV
->>>>48  lelong&0xf0000000	0x40000000	MIPS-V
->>>>48  lelong&0xf0000000	0x60000000	MIPS32
->>>>48  lelong&0xf0000000	0x70000000	MIPS64 
->>>>48  lelong&0xf0000000	0x80000000	MIPS32 rel2
->>>>48  lelong&0xf0000000	0x90000000	MIPS64 rel2
->>16	leshort		0		no file type,
->>16	leshort		1		relocatable,
->>16	leshort		2		executable,
->>16	leshort		3		shared object,
-# Core handling from Peter Tobias <tobias at server.et-inf.fho-emden.de>
-# corrections by Christian 'Dr. Disk' Hechelmann <drdisk at ds9.au.s.shuttle.de>
->>16	leshort		4		core file
-# Core file detection is not reliable.
-#>>>(0x38+0xcc) string	>\0		of '%s'
-#>>>(0x38+0x10) lelong	>0		(signal %d),
->>16	leshort		&0xff00		processor-specific,
->>18	leshort		0		no machine,
->>18	leshort		1		AT&T WE32100 - invalid byte order,
->>18	leshort		2		SPARC - invalid byte order,
->>18	leshort		3		Intel 80386,
->>18	leshort		4		Motorola
->>>36	lelong		&0x01000000	68000 - invalid byte order,
->>>36	lelong		&0x00810000	CPU32 - invalid byte order,
->>>36	lelong		0		68020 - invalid byte order,
->>18	leshort		5		Motorola 88000 - invalid byte order,
->>18	leshort		6		Intel 80486,
->>18	leshort		7		Intel 80860,
->>18	leshort		8		MIPS,
->>18	leshort		9		Amdahl - invalid byte order,
->>18	leshort		10		MIPS (deprecated),
->>18	leshort		11		RS6000 - invalid byte order,
->>18	leshort		15		PA-RISC - invalid byte order,
->>>50	leshort		0x0214		2.0
->>>48	leshort		&0x0008		(LP64),
->>18	leshort		16		nCUBE,
->>18	leshort		17		Fujitsu VPP500,
->>18	leshort		18		SPARC32PLUS,
->>18	leshort		20		PowerPC,
->>18	leshort		22		IBM S/390,
->>18	leshort		36		NEC V800,
->>18	leshort		37		Fujitsu FR20,
->>18	leshort		38		TRW RH-32,
->>18	leshort		39		Motorola RCE,
->>18	leshort		40		ARM,
->>18	leshort		41		Alpha,
->>18	leshort		0xa390		IBM S/390 (obsolete),
->>18	leshort		42		Hitachi SH,
->>18	leshort		43		SPARC V9 - invalid byte order,
->>18	leshort		44		Siemens Tricore Embedded Processor,
->>18	leshort		45		Argonaut RISC Core, Argonaut Technologies Inc.,
->>18	leshort		46		Hitachi H8/300,
->>18	leshort		47		Hitachi H8/300H,
->>18	leshort		48		Hitachi H8S,
->>18	leshort		49		Hitachi H8/500,
->>18	leshort		50		IA-64 (Intel 64 bit architecture),
->>18	leshort		51		Stanford MIPS-X,
->>18	leshort		52		Motorola Coldfire,
->>18	leshort		53		Motorola M68HC12,
->>18	leshort		62		AMD x86-64,
->>18	leshort		75		Digital VAX,
->>18	leshort		97		NatSemi 32k,
->>18	leshort		0x9026		Alpha (unofficial),
->>20	lelong		0		invalid version
->>20	lelong		1		version 1
->>36	lelong		1		MathCoPro/FPU/MAU Required
->5	byte		2		MSB
-# only for MIPS - see comment in little-endian section above.
->>18    beshort		8
-# only for 32-bit
->>>4	byte		1
->>>>36  belong&0xf0000000	0x00000000	MIPS-I
->>>>36  belong&0xf0000000	0x10000000	MIPS-II
->>>>36  belong&0xf0000000	0x20000000	MIPS-III
->>>>36  belong&0xf0000000	0x30000000	MIPS-IV
->>>>36  belong&0xf0000000	0x40000000	MIPS-V
->>>>36  belong&0xf0000000	0x60000000	MIPS32
->>>>36  belong&0xf0000000	0x70000000	MIPS64
->>>>36  belong&0xf0000000	0x80000000	MIPS32 rel2
->>>>36  belong&0xf0000000	0x90000000	MIPS64 rel2
-# only for 64-bit
->>>4	byte		2
->>>>48	belong&0xf0000000	0x00000000	MIPS-I
->>>>48	belong&0xf0000000	0x10000000	MIPS-II
->>>>48	belong&0xf0000000	0x20000000	MIPS-III
->>>>48	belong&0xf0000000	0x30000000	MIPS-IV
->>>>48	belong&0xf0000000	0x40000000	MIPS-V
->>>>48	belong&0xf0000000	0x60000000	MIPS32
->>>>48	belong&0xf0000000	0x70000000	MIPS64 
->>>>48	belong&0xf0000000	0x80000000	MIPS32 rel2
->>>>48	belong&0xf0000000	0x90000000	MIPS64 rel2
->>16	beshort		0		no file type,
->>16	beshort		1		relocatable,
->>16	beshort		2		executable,
->>16	beshort		3		shared object,
->>16	beshort		4		core file,
-#>>>(0x38+0xcc) string	>\0		of '%s'
-#>>>(0x38+0x10) belong	>0		(signal %d),
->>16	beshort		&0xff00		processor-specific,
->>18	beshort		0		no machine,
->>18	beshort		1		AT&T WE32100,
->>18	beshort		2		SPARC,
->>18	beshort		3		Intel 80386 - invalid byte order,
->>18	beshort		4		Motorola
->>>36	belong		&0x01000000	68000,
->>>36	belong		&0x00810000	CPU32,
->>>36	belong		0		68020,
->>18	beshort		5		Motorola 88000,
->>18	beshort		6		Intel 80486 - invalid byte order,
->>18	beshort		7		Intel 80860,
->>18	beshort		8		MIPS,
->>18	beshort		9		Amdahl,
->>18	beshort		10		MIPS (deprecated),
->>18	beshort		11		RS6000,
->>18	beshort		15		PA-RISC
->>>50	beshort		0x0214		2.0
->>>48	beshort		&0x0008		(LP64)
->>18	beshort		16		nCUBE,
->>18	beshort		17		Fujitsu VPP500,
->>18	beshort		18		SPARC32PLUS,
->>>36	belong&0xffff00	&0x000100	V8+ Required,
->>>36	belong&0xffff00	&0x000200	Sun UltraSPARC1 Extensions Required,
->>>36	belong&0xffff00	&0x000400	HaL R1 Extensions Required,
->>>36	belong&0xffff00	&0x000800	Sun UltraSPARC3 Extensions Required,
->>18	beshort		20		PowerPC or cisco 4500,
->>18	beshort		21		cisco 7500,
->>18	beshort		22		IBM S/390,
->>18	beshort		24		cisco SVIP,
->>18	beshort		25		cisco 7200,
->>18	beshort		36		NEC V800 or cisco 12000,
->>18	beshort		37		Fujitsu FR20,
->>18	beshort		38		TRW RH-32,
->>18	beshort		39		Motorola RCE,
->>18	beshort		40		ARM,
->>18	beshort		41		Alpha,
->>18	beshort		42		Hitachi SH,
->>18	beshort		43		SPARC V9,
->>18	beshort		44		Siemens Tricore Embedded Processor,
->>18	beshort		45		Argonaut RISC Core, Argonaut Technologies Inc.,
->>18	beshort		46		Hitachi H8/300,
->>18	beshort		47		Hitachi H8/300H,
->>18	beshort		48		Hitachi H8S,
->>18	beshort		49		Hitachi H8/500,
->>18	beshort		50		IA-64 (Intel 64 bit architecture),
->>18	beshort		51		Stanford MIPS-X,
->>18	beshort		52		Motorola Coldfire,
->>18	beshort		53		Motorola M68HC12,
->>18	beshort		73		Cray NV1,
->>18	beshort		75		Digital VAX,
->>18	beshort		97		NatSemi 32k,
->>18	beshort		0x9026		Alpha (unofficial),
->>18	beshort		0xa390		IBM S/390 (obsolete),
->>20	belong		0		invalid version
->>20	belong		1		version 1
->>36	belong		1		MathCoPro/FPU/MAU Required
-# Up to now only 0, 1 and 2 are defined; I've seen a file with 0x83, it seemed
-# like proper ELF, but extracting the string had bad results.
->4      byte            <0x80
->>8	string		>\0		(%s)
->8	string		\0
->>7	byte		0		(SYSV)
->>7	byte		1		(HP-UX)
->>7	byte		2		(NetBSD)
->>7	byte		3		(GNU/Linux)
->>7	byte		4		(GNU/Hurd)
->>7	byte		5		(86Open)
->>7	byte		6		(Solaris)
->>7	byte		7		(Monterey)
->>7	byte		8		(IRIX)
->>7	byte		9		(FreeBSD)
->>7	byte		10		(Tru64)
->>7	byte		11		(Novell Modesto)
->>7	byte		12		(OpenBSD)
->>7	byte		97		(ARM)
->>7	byte		255		(embedded)
-
-#------------------------------------------------------------------------------
-# encore:  file(1) magic for Encore machines
-#
-# XXX - needs to have the byte order specified (NS32K was little-endian,
-# dunno whether they run the 88K in little-endian mode or not).
-#
-0	short		0x154		Encore
->20	short		0x107		executable
->20	short		0x108		pure executable
->20	short		0x10b		demand-paged executable
->20	short		0x10f		unsupported executable
->12	long		>0		not stripped
->22	short		>0		- version %ld
->22	short		0		-
-#>4	date		x		stamp %s
-0	short		0x155		Encore unsupported executable
->12	long		>0		not stripped
->22	short		>0		- version %ld
->22	short		0		-
-#>4	date		x		stamp %s
-
-#------------------------------------------------------------------------------
-# Epoc 32 : file(1) magic for Epoc Documents [psion/osaris
-# Stefan Praszalowicz (hpicollo at worldnet.fr)
-#0	lelong		0x10000037	Epoc32
->4	lelong		0x1000006D
->>8	lelong		0x1000007F	Word
->>8	lelong		0x10000088	Sheet
->>8	lelong		0x1000007D	Sketch
->>8	lelong		0x10000085	TextEd
-
-#------------------------------------------------------------------------------
-# fcs: file(1) magic for FCS (Flow Cytometry Standard) data files
-# From Roger Leigh <roger at whinlatter.uklinux.net>
-0       string          FCS1.0          Flow Cytometry Standard (FCS) data, version 1.0
-0       string          FCS2.0          Flow Cytometry Standard (FCS) data, version 2.0
-0       string          FCS3.0          Flow Cytometry Standard (FCS) data, version 3.0
-
-#------------------------------------------------------------------------------
-# lxkernel: file(1) magic for Linux/i386 Kernel
-# compiled Linux-kernel submitted by Hans Lermen lermen at elserv.ffm.fgan.de
-0x202			string		HdrS		Linux
->0x1fe			leshort		0xAA55		\b/x86 Kernel
->0x1fe			leshort		<0xAA55		Kernel
->0x1fe			leshort		>0xAA55		Kernel
->0x206			leshort		0x0105		\b, Setup Version 0x105, zImage
->0x206			leshort		>0x0105		\b, Setup Version %#hx
->>0x211			byte		0		\b, zImage
->>0x211			byte		1		\b, bzImage
->>>(0x20e.s+0x205)	byte		32
->>>>(0x20e.s+0x200)	string		>\0		\b, Version %5.5s
->>>(0x20e.s+0x206)	byte		32
->>>>(0x20e.s+0x200)	string		>\0		\b, Version %6.6s
->>>(0x20e.s+0x207)	byte		32
->>>>(0x20e.s+0x200)	string		>\0		\b, Version %7.7s
->>>(0x20e.s+0x205)	byte		45
->>>>(0x20e.s+0x200)	string		>\0		\b, Version %s
->>>(0x20e.s+0x206)	byte		45
->>>>(0x20e.s+0x200)	string		>\0		\b, Version %s
->>>(0x20e.s+0x207)	byte		45
->>>>(0x20e.s+0x200)	string		>\0		\b, Version %s
->>0x1f2			leshort		1		\b, RO-rootFS
->>0x1f2			leshort		0		\b, RW-rootFS
->>0x1fc			leshort		>0		\b, root_dev 0x%X
->>0x1f6			leshort		>0		\b, swap_dev 0x%X
->>0x1f8			leshort		>0		\b, RAMdisksize %u KB
->>0x1fa			leshort		0xFFFF		\b, Normal VGA
->>0x1fa			leshort		0xFFFE		\b, Extended VGA
->>0x1fa			leshort		0xFFFD		\b, Prompt for Videomode
->>0x1fa			leshort		>0		\b, Video mode %d
-
-0x1e3			string		Loading		Linux/i386 Kernel zImage
-
-#------------------------------------------------------------------------------
-# filesystems:  file(1) magic for different filesystems
-#
-0	string	\366\366\366\366	PC formatted floppy with no filesystem
-# Sun disk labels
-# From /usr/include/sun/dklabel.h:
-0774	beshort		0xdabe		Sun disk label
->0	string		x		'%s
->>31  	string		>\0		\b%s
->>>63  	string		>\0		\b%s
->>>>95 	string		>\0		\b%s
->0	string		x		\b'
->0734	short		>0		%d rpm,
->0736	short		>0		%d phys cys,
->0740	short		>0		%d alts/cyl,
->0746	short		>0		%d interleave,
->0750	short		>0		%d data cyls,
->0752	short		>0		%d alt cyls,
->0754	short		>0		%d heads/partition,
->0756	short		>0		%d sectors/track,
->0764	long		>0		start cyl %ld,
->0770	long		x		%ld blocks
-# Is there a boot block written 1 sector in?
->512    belong&077777777	0600407	\b, boot block present
-0x1FE	leshort	0xAA55			x86 boot sector
->2	string	OSBS			\b, OS/BS MBR
-# J\xf6rg Jenderek <joerg.jenderek at gmx.net>
->0x8C	string	Invalid\ partition\ table	\b, MS-DOS MBR
->0x9D	string	Invalid\ partition\ table	\b, DR-DOS MBR, version 7.01 to 7.03
->0x10F	string	Ung\201ltige\ Partitionstabelle	\b, MS-DOS MBR, german version 4.10.1998, 4.10.2222
->0x8B	string	Ung\201ltige\ Partitionstabelle	\b, MS-DOS MBR, german version 5.00 to 4.00.950
->0x145	string	Default:\ F			\b, FREE-DOS MBR
->0	string	\0\0\0\0		\b, extended partition table
-# JuMP short     bootcodeoffset NOP assembler instructions will usually be EB xx 90
-# older drives may use E9 xx xx
->0		lelong&0x009000EB	0x009000EB 
->0		lelong&0x000000E9	0x000000E9 
->>1		ubyte			>37	\b, code offset 0x%x
-# mtools-3.9.8/msdos.h
-# usual values are marked with comments to get only informations of strange FAT systems
-# valid sectorsize are from 32 to 2048
->>>11		uleshort	<2049	
->>>>11		uleshort	>31	
->>>>>3		string		>\0		\b, OEM-ID "%8.8s"
->>>>>11		uleshort	>512		\b, Bytes/sector %u
-#>>>>>11	uleshort	=512		\b, Bytes/sector %u=512 (usual)
->>>>>11		uleshort	<512		\b, Bytes/sector %u
->>>>>13		ubyte		>1		\b, sectors/cluster %u
-#>>>>>13	ubyte		=1		\b, sectors/cluster %u (usual on Floppies)
->>>>>14		uleshort	>32		\b, reserved sectors %u
-#>>>>>14	uleshort	=32		\b, reserved sectors %u (usual Fat32)
-#>>>>>14	uleshort	>1		\b, reserved sectors %u
-#>>>>>14	uleshort	=1		\b, reserved sectors %u (usual FAT12,FAT16)
->>>>>14		uleshort	<1		\b, reserved sectors %u
->>>>>16		ubyte		>2		\b, FATs %u
-#>>>>>16	ubyte		=2		\b, FATs %u (usual)
->>>>>16		ubyte		=1		\b, FAT  %u
->>>>>16		ubyte		>0
->>>>>17		uleshort	>0		\b, root entries %u
-#>>>>>17	uleshort	=0		\b, root entries %u=0 (usual Fat32)
->>>>>19		uleshort	>0		\b, sectors %u (volumes <=32 MB) 
-#>>>>>19	uleshort	=0		\b, sectors %u=0 (usual Fat32)
->>>>>21		ubyte		>0xF0		\b, Media descriptor 0x%x
-#>>>>>21	ubyte		=0xF0		\b, Media descriptor 0x%x (usual floppy)
->>>>>21		ubyte		<0xF0		\b, Media descriptor 0x%x
->>>>>22		uleshort	>0		\b, sectors/FAT %u
-#>>>>>22	uleshort	=0		\b, sectors/FAT %u=0 (usual Fat32)
->>>>>26		ubyte		>2		\b, heads %u
-#>>>>>26	ubyte		=2		\b, heads %u (usual floppy)
->>>>>26		ubyte		=1		\b, heads %u
->>>>>28		ulelong		>0		\b, hidden sectors %u
-#>>>>>28	ulelong		=0		\b, hidden sectors %u (usual floppy)
->>>>>32		ulelong		>0		\b, sectors %u (volumes > 32 MB) 
-#>>>>>32	ulelong		=0		\b, sectors %u (volumes > 32 MB) 
-# FAT<32 specific 
-# NOT le FAT3=NOT 3TAF=0xCCABBEB9
->>>>>82		ulelong&0xCCABBEB9	>0
->>>>>>36	ubyte		>0x80		\b, physical drive 0x%x
-#>>>>>>36	ubyte		=0x80		\b, physical drive 0x%x=0x80 (usual harddisk)
->>>>>>36	ubyte&0x7F	>0		\b, physical drive 0x%x
-#>>>>>>36	ubyte		=0		\b, physical drive 0x%x=0 (usual floppy)
->>>>>>37	ubyte		>0		\b, reserved 0x%x
-#>>>>>>37	ubyte		=0		\b, reserved 0x%x
->>>>>>38	ubyte		>0x29		\b, dos < 4.0 BootSector (0x%x)
->>>>>>38	ubyte		<0x29		\b, dos < 4.0 BootSector (0x%x)
->>>>>>38	ubyte		=0x29
->>>>>>>39	ulelong		x		\b, serial number 0x%x
->>>>>>>43	string		<NO\ NAME	\b, label: "%11.11s"
->>>>>>>43	string		>NO\ NAME	\b, label: "%11.11s"
->>>>>>>43	string		=NO\ NAME	\b, unlabeled
->>>>>>54	string		FAT1		\b, FAT
->>>>>>>54	string		FAT12		\b (12 bit)
->>>>>>>54	string		FAT16		\b (16 bit)
-# FAT32 specific
->>>>>82		string		FAT32		\b, FAT (32 bit)
->>>>>>36	ulelong		x		\b, sectors/FAT %u
->>>>>>40	uleshort	>0		\b, extension flags %u
-#>>>>>>40	uleshort	=0		\b, extension flags %u
->>>>>>42	uleshort	>0		\b, fsVersion %u
-#>>>>>>42	uleshort	=0		\b, fsVersion %u (usual)
->>>>>>44	ulelong		>2		\b, rootdir cluster %u
-#>>>>>>44	ulelong		=2		\b, rootdir cluster %u
-#>>>>>>44	ulelong		=1		\b, rootdir cluster %u
->>>>>>48	uleshort	>1		\b, infoSector %u
-#>>>>>>48	uleshort	=1		\b, infoSector %u (usual)
->>>>>>48	uleshort	<1		\b, infoSector %u
->>>>>>50	uleshort	>6		\b, Backup boot sector %u
-#>>>>>>50	uleshort	=6		\b, Backup boot sector %u (usual) 
->>>>>>50	uleshort	<6		\b, Backup boot sector %u
->>>>>>54	ulelong		>0		\b, reserved1 0x%x
->>>>>>58	ulelong		>0		\b, reserved2 0x%x
->>>>>>62	ulelong		>0		\b, reserved3 0x%x
-# same structure as FAT1X 
->>>>>>64	ubyte		>0x80		\b, physical drive 0x%x
-#>>>>>>64	ubyte		=0x80		\b, physical drive 0x%x=80 (usual harddisk)
->>>>>>64	ubyte&0x7F	>0		\b, physical drive 0x%x
-#>>>>>>64	ubyte		=0		\b, physical drive 0x%x=0 (usual floppy)
->>>>>>65	ubyte		>0		\b, reserved 0x%x
->>>>>>66	ubyte		>0x29		\b, dos < 4.0 BootSector (0x%x)
->>>>>>66	ubyte		<0x29		\b, dos < 4.0 BootSector (0x%x)
->>>>>>66	ubyte		=0x29
->>>>>>>67	ulelong		x		\b, serial number 0x%x
->>>>>>>71	string		<NO\ NAME	\b, label: "%11.11s"
->>>>>>71	string		>NO\ NAME	\b, label: "%11.11s"
->>>>>>71	string		=NO\ NAME	\b, unlabeled
-### FATs end
->0x200	lelong	0x82564557		\b, BSD disklabel
-
-# Minix filesystems - Juan Cespedes <cespedes at debian.org>
-0x410	leshort		0x137f		Minix filesystem
-0x410	beshort		0x137f		Minix filesystem (big endian),
->0x402	beshort		!0		\b, %d zones
->0x1e	string		minix		\b, bootable
-0x410	leshort		0x138f		Minix filesystem, 30 char names
-0x410	leshort		0x2468		Minix filesystem, version 2
-0x410	leshort		0x2478		Minix filesystem, version 2, 30 char names
-
-# romfs filesystems - Juan Cespedes <cespedes at debian.org>
-0	string		-rom1fs-\0	romfs filesystem, version 1
->8	belong	x			%d bytes,
->16	string	x			named %s.
-
-# netboot image - Juan Cespedes <cespedes at debian.org>
-0	lelong		0x1b031336L	Netboot image,
->4	lelong&0xFFFFFF00	0
->>4	lelong&0x100	0x000		mode 2
->>4	lelong&0x100	0x100		mode 3
->4	lelong&0xFFFFFF00	!0	unknown mode
-
-0x18b	string	OS/2	OS/2 Boot Manager
-
-9564	lelong		0x00011954	Unix Fast File system (little-endian),
->8404	string		x		last mounted on %s,
-#>9504	ledate		x		last checked at %s,
->8224	ledate		x		last written at %s,
->8401	byte		x		clean flag %d,
->8228	lelong		x		number of blocks %d,
->8232	lelong		x		number of data blocks %d,
->8236	lelong		x		number of cylinder groups %d,
->8240	lelong		x		block size %d,
->8244	lelong		x		fragment size %d,
->8252	lelong		x		minimum percentage of free blocks %d,
->8256	lelong		x		rotational delay %dms,
->8260	lelong		x		disk rotational speed %drps,
->8320	lelong		0		TIME optimization
->8320	lelong		1		SPACE optimization
-
-9564	belong		0x00011954	Unix Fast File system (big-endian),
->7168   long		0x4c41424c	Apple UFS Volume
->>7186  string		x		named %s,
->>7176  belong		x		volume label version %d,
->>7180  bedate		x		created on %s,
->8404	string		x		last mounted on %s,
-#>9504	bedate		x		last checked at %s,
->8224	bedate		x		last written at %s,
->8401	byte		x		clean flag %d,
->8228	belong		x		number of blocks %d,
->8232	belong		x		number of data blocks %d,
->8236	belong		x		number of cylinder groups %d,
->8240	belong		x		block size %d,
->8244	belong		x		fragment size %d,
->8252	belong		x		minimum percentage of free blocks %d,
->8256	belong		x		rotational delay %dms,
->8260	belong		x		disk rotational speed %drps,
->8320	belong		0		TIME optimization
->8320	belong		1		SPACE optimization
-
-# ext2/ext3 filesystems - Andreas Dilger <adilger at turbolabs.com>
-0x438	leshort		0xEF53		Linux
->0x44c	lelong		x		rev %d
->0x43e	leshort		x		\b.%d
->0x45c	lelong		^0x0000004	ext2 filesystem data
->>0x43a	leshort		^0x0000001	(mounted or unclean)
->0x45c	lelong		&0x0000004	ext3 filesystem data
->>0x460	lelong		&0x0000004	(needs journal recovery)
->0x43a	leshort		&0x0000002	(errors)
->0x460	lelong		&0x0000001	(compressed)
-#>0x460	lelong		&0x0000002	(filetype)
-#>0x464	lelong		&0x0000001	(sparse_super)
->0x464	lelong		&0x0000002	(large files)
-
-# SGI disk labels - Nathan Scott <nathans at debian.org>
-0	belong		0x0BE5A941	SGI disk label (volume header)
-
-# SGI XFS filesystem - Nathan Scott <nathans at debian.org>
-0	belong		0x58465342	SGI XFS filesystem data
->0x4	belong		x		(blksz %d,
->0x68	beshort		x		inosz %d,
->0x64	beshort		^0x2004		v1 dirs)
->0x64	beshort		&0x2004		v2 dirs)
-
-############################################################################
-# Minix-ST kernel floppy
-0x800	belong		0x46fc2700	Atari-ST Minix kernel image
->19	string		\240\5\371\5\0\011\0\2\0	\b, 720k floppy
->19	string		\320\2\370\5\0\011\0\1\0	\b, 360k floppy
-
-############################################################################
-# Hmmm, is this a better way of detecting _standard_ floppy images ?
-19	string		\320\2\360\3\0\011\0\1\0	DOS floppy 360k
->0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
-19	string		\240\5\371\3\0\011\0\2\0	DOS floppy 720k
->0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
-19	string		\100\013\360\011\0\022\0\2\0	DOS floppy 1440k
->0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
-
-19	string		\240\5\371\5\0\011\0\2\0	DOS floppy 720k, IBM
->0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
-19	string		\100\013\371\5\0\011\0\2\0	DOS floppy 1440k, mkdosfs
->0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
-
-19	string		\320\2\370\5\0\011\0\1\0	Atari-ST floppy 360k
-19	string		\240\5\371\5\0\011\0\2\0	Atari-ST floppy 720k
-
-#  Valid media descriptor bytes for MS-DOS:
-#
-#     Byte   Capacity   Media Size and Type
-#     -------------------------------------------------
-#
-#     F0     2.88 MB    3.5-inch, 2-sided, 36-sector
-#     F0     1.44 MB    3.5-inch, 2-sided, 18-sector
-#     F9     720K       3.5-inch, 2-sided, 9-sector
-#     F9     1.2 MB     5.25-inch, 2-sided, 15-sector
-#     FD     360K       5.25-inch, 2-sided, 9-sector
-#     FF     320K       5.25-inch, 2-sided, 8-sector
-#     FC     180K       5.25-inch, 1-sided, 9-sector
-#     FE     160K       5.25-inch, 1-sided, 8-sector
-#     FE     250K       8-inch, 1-sided, single-density
-#     FD     500K       8-inch, 2-sided, single-density
-#     FE     1.2 MB     8-inch, 2-sided, double-density
-#     F8     -----      Fixed disk 
-#
-#     FC     xxxK       Apricot 70x1x9 boot disk.
-#
-# Originally a bitmap:
-#  xxxxxxx0	Not two sided
-#  xxxxxxx1	Double sided
-#  xxxxxx0x	Not 8 SPT
-#  xxxxxx1x	8 SPT
-#  xxxxx0xx	Not Removable drive
-#  xxxxx1xx	Removable drive
-#  11111xxx	Must be one.
-#
-# But now it's rather random:
-#  111111xx	Low density disk
-#        00	SS, Not 8 SPT
-#        01	DS, Not 8 SPT
-#        10	SS, 8 SPT
-#        11	DS, 8 SPT
-#
-#  11111001	Double density 3� floppy disk, high density 5�
-#  11110000	High density 3� floppy disk
-#  11111000	Hard disk any format
-#
-
-# CDROM Filesystems
-32769    string    CD001     ISO 9660 CD-ROM filesystem data
-# "application id" which appears to be used as a volume label
->32808	 string    >\0       '%s'
->34816	 string    \000CD001\001EL\ TORITO\ SPECIFICATION    (bootable)
-37633    string    CD001     ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
-32776    string    CDROM     High Sierra CD-ROM filesystem data
-
-# cramfs filesystem - russell at coker.com.au
-0       lelong    0x28cd3d45      Linux Compressed ROM File System data, little endian
->4      lelong  x size %d
->8      lelong  &1 version #2
->8      lelong  &2 sorted_dirs
->8      lelong  &4 hole_support
->32     lelong  x CRC 0x%x,
->36     lelong  x edition %d,
->40     lelong  x %d blocks,
->44     lelong  x %d files
-
-0       belong    0x28cd3d45      Linux Compressed ROM File System data, big endian
->4      belong  x size %d
->8      belong  &1 version #2
->8      belong  &2 sorted_dirs
->8      belong  &4 hole_support
->32     belong  x CRC 0x%x,
->36     belong  x edition %d,
->40     belong  x %d blocks,
->44     belong  x %d files
-
-# reiserfs - russell at coker.com.au
-0x10034		string	ReIsErFs	ReiserFS V3.5
-0x10034		string	ReIsEr2Fs	ReiserFS V3.6
->0x1002c 	leshort	x		block size %d
->0x10032	leshort	&2		(mounted or unclean)
->0x10000	lelong	x		num blocks %d
->0x10040	lelong	1		tea hash
->0x10040	lelong	2		yura hash
->0x10040	lelong	3		r5 hash
-
-# JFFS - russell at coker.com.au
-0	lelong	0x34383931	Linux Journalled Flash File system, little endian
-0	belong	0x34383931	Linux Journalled Flash File system, big endian
-
-# EST flat binary format (which isn't, but anyway)
-# From: Mark Brown <broonie at sirena.org.uk>
-0	string	ESTFBINR	EST flat binary
-
-# Aculab VoIP firmware
-# From: Mark Brown <broonie at sirena.org.uk>
-0	string	VoIP\ Startup\ and	Aculab VoIP firmware
->35	string	x	format %s
-
-# PPCBoot image file
-# From: Mark Brown <broonie at sirena.org.uk>
-0	belong	0x27051956	PPCBoot image
->4	string  PPCBoot
->>12	string  x		version %s
-
-# JFFS2 file system
-0       leshort         0x1984                  Linux old jffs2 filesystem data little endian
-0       lelong          0xe0011985              Linux jffs2 filesystem data little endian
-
-#------------------------------------------------------------------------------
-# flash:	file(1) magic for Macromedia Flash file format
-#
-# See
-#
-#	http://www.macromedia.com/software/flash/open/
-#
-0	string		FWS		Macromedia Flash data,
->3	byte		x		version %d
-0	string		CWS		Macromedia Flash data (compressed),
->3	byte		x		version %d
-#
-# From Dave Wilson
-0	string AGD4\xbe\xb8\xbb\xcb\x00	Macromedia Freehand 9 Document
-
-#------------------------------------------------------------------------------
-# fonts:  file(1) magic for font data
-#
-0	string		FONT		ASCII vfont text
-0	short		0436		Berkeley vfont data
-0	short		017001		byte-swapped Berkeley vfont data
-
-# PostScript fonts (must precede "printer" entries), quinlan at yggdrasil.com
-0	string		%!PS-AdobeFont-1.	PostScript Type 1 font text
->20	string		>\0			(%s)
-6	string		%!PS-AdobeFont-1.	PostScript Type 1 font program data
-
-# X11 font files in SNF (Server Natural Format) format
-0	belong		00000004		X11 SNF font data, MSB first
-0	lelong		00000004		X11 SNF font data, LSB first
-
-# X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan at yggdrasil.com)
-0	string		STARTFONT\040		X11 BDF font text
-
-# X11 fonts, from Daniel Quinlan (quinlan at yggdrasil.com)
-# PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides)
-0	string		\001fcp			X11 Portable Compiled Font data
->12	byte		0x02			\b, LSB first
->12	byte		0x0a			\b, MSB first
-0	string		D1.0\015		X11 Speedo font data
-
-#------------------------------------------------------------------------------
-# FIGlet fonts and controlfiles
-# From figmagic supplied with Figlet version 2.2
-# "David E. O'Brien" <obrien at FreeBSD.ORG>
-0	string		flf		FIGlet font
->3	string		>2a		version %-2.2s
-0	string		flc		FIGlet controlfile
->3	string		>2a		version %-2.2s
-
-# libGrx graphics lib fonts, from Albert Cahalan (acahalan at cs.uml.edu)
-# Used with djgpp (DOS Gnu C++), sometimes Linux or Turbo C++
-0	belong		0x14025919	libGrx font data,
->8	leshort		x		%dx
->10	leshort		x		\b%d
->40	string		x		%s
-# Misc. DOS VGA fonts, from Albert Cahalan (acahalan at cs.uml.edu)
-0	belong		0xff464f4e	DOS code page font data collection
-7	belong		0x00454741	DOS code page font data
-7	belong		0x00564944	DOS code page font data (from Linux?)
-4098	string		DOSFONT		DOSFONT2 encrypted font data
-
-# downloadable fonts for browser (prints type) anthon at mnt.org
-0	string		PFR1		PFR1 font
->102	string		>0		\b: %s
-
-# True Type fonts
-0	string	\000\001\000\000\000	TrueType font data
-
-0	string		\007\001\001\000Copyright\ (c)\ 199	Adobe Multiple Master font
-0	string		\012\001\001\000Copyright\ (c)\ 199	Adobe Multiple Master font
-
-# Opentype font data from Avi Bercovich
-0	string		OTTO		OpenType font data 
-
-
-#------------------------------------------------------------------------------
-# frame:  file(1) magic for FrameMaker files
-#
-# This stuff came on a FrameMaker demo tape, most of which is
-# copyright, but this file is "published" as witness the following:
-#
-0	string		\<MakerFile	FrameMaker document
->11	string		5.5		 (5.5
->11	string		5.0		 (5.0
->11	string		4.0		 (4.0
->11	string		3.0		 (3.0
->11	string		2.0		 (2.0
->11	string		1.0		 (1.0
->14	byte		x		  %c)
-0	string		\<MIFFile	FrameMaker MIF (ASCII) file
->9	string		4.0		 (4.0)
->9	string		3.0		 (3.0)
->9	string		2.0		 (2.0)
->9	string		1.0		 (1.x)
-0	string		\<MakerDictionary	FrameMaker Dictionary text
->17	string		3.0		 (3.0)
->17	string		2.0		 (2.0)
->17	string		1.0		 (1.x)
-0	string		\<MakerScreenFont	FrameMaker Font file
->17	string		1.01		 (%s)
-0	string		\<MML		FrameMaker MML file
-0	string		\<BookFile	FrameMaker Book file
->10	string		3.0		 (3.0
->10	string		2.0		 (2.0
->10	string		1.0		 (1.0
->13	byte		x		  %c)
-# XXX - this book entry should be verified, if you find one, uncomment this
-#0	string		\<Book\ 	FrameMaker Book (ASCII) file
-#>6	string		3.0		 (3.0)
-#>6	string		2.0		 (2.0)
-#>6	string		1.0		 (1.0)
-0	string		\<Maker	Intermediate Print File	FrameMaker IPL file
-
-#------------------------------------------------------------------------------
-# freebsd:  file(1) magic for FreeBSD objects
-#
-# All new-style FreeBSD magic numbers are in host byte order (i.e.,
-# little-endian on x86).
-#
-# XXX - this comes from the file "freebsd" in a recent FreeBSD version of
-# "file"; it, and the NetBSD stuff in "netbsd", appear to use different
-# schemes for distinguishing between executable images, shared libraries,
-# and object files.
-#
-# FreeBSD says:
-#
-#    Regardless of whether it's pure, demand-paged, or none of the
-#    above:
-#
-#	if the entry point is < 4096, then it's a shared library if
-#	the "has run-time loader information" bit is set, and is
-#	position-independent if the "is position-independent" bit
-#	is set;
-#
-#	if the entry point is >= 4096 (or >4095, same thing), then it's
-#	an executable, and is dynamically-linked if the "has run-time
-#	loader information" bit is set.
-#
-# On x86, NetBSD says:
-#
-#    If it's neither pure nor demand-paged:
-#
-#	if it has the "has run-time loader information" bit set, it's
-#	a dynamically-linked executable;
-#
-#	if it doesn't have that bit set, then:
-#
-#	    if it has the "is position-independent" bit set, it's
-#	    position-independent;
-#
-#	    if the entry point is non-zero, it's an executable, otherwise
-#	    it's an object file.
-#
-#    If it's pure:
-#
-#	if it has the "has run-time loader information" bit set, it's
-#	a dynamically-linked executable, otherwise it's just an
-#	executable.
-#
-#    If it's demand-paged:
-#
-#	if it has the "has run-time loader information" bit set,
-#	then:
-#
-#	    if the entry point is < 4096, it's a shared library;
-#
-#	    if the entry point is = 4096 or > 4096 (i.e., >= 4096),
-#	    it's a dynamically-linked executable);
-#
-#	if it doesn't have the "has run-time loader information" bit
-#	set, then it's just an executable.
-#
-# (On non-x86, NetBSD does much the same thing, except that it uses
-# 8192 on 68K - except for "68k4k", which is presumably "68K with 4K
-# pages - SPARC, and MIPS, presumably because Sun-3's and Sun-4's
-# had 8K pages; dunno about MIPS.)
-#
-# I suspect the two will differ only in perverse and uninteresting cases
-# ("shared" libraries that aren't demand-paged and whose pages probably
-# won't actually be shared, executables with entry points <4096).
-#
-# I leave it to those more familiar with FreeBSD and NetBSD to figure out
-# what the right answer is (although using ">4095", FreeBSD-style, is
-# probably better than separately checking for "=4096" and ">4096",
-# NetBSD-style).  (The old "netbsd" file analyzed FreeBSD demand paged
-# executables using the NetBSD technique.)
-#
-0	lelong&0377777777	041400407	FreeBSD/i386
->20	lelong			<4096
->>3	byte&0xC0		&0x80		shared library
->>3	byte&0xC0		0x40		PIC object
->>3	byte&0xC0		0x00		object
->20	lelong			>4095
->>3	byte&0x80		0x80		dynamically linked executable
->>3	byte&0x80		0x00		executable
->16	lelong			>0		not stripped
-
-0	lelong&0377777777	041400410	FreeBSD/i386 pure
->20	lelong			<4096
->>3	byte&0xC0		&0x80		shared library
->>3	byte&0xC0		0x40		PIC object
->>3	byte&0xC0		0x00		object
->20	lelong			>4095
->>3	byte&0x80		0x80		dynamically linked executable
->>3	byte&0x80		0x00		executable
->16	lelong			>0		not stripped
-
-0	lelong&0377777777	041400413	FreeBSD/i386 demand paged
->20	lelong			<4096
->>3	byte&0xC0		&0x80		shared library
->>3	byte&0xC0		0x40		PIC object
->>3	byte&0xC0		0x00		object
->20	lelong			>4095
->>3	byte&0x80		0x80		dynamically linked executable
->>3	byte&0x80		0x00		executable
->16	lelong			>0		not stripped
-
-0	lelong&0377777777	041400314	FreeBSD/i386 compact demand paged
->20	lelong			<4096
->>3	byte&0xC0		&0x80		shared library
->>3	byte&0xC0		0x40		PIC object
->>3	byte&0xC0		0x00		object
->20	lelong			>4095
->>3	byte&0x80		0x80		dynamically linked executable
->>3	byte&0x80		0x00		executable
->16	lelong			>0		not stripped
-
-# XXX gross hack to identify core files
-# cores start with a struct tss; we take advantage of the following:
-# byte 7:     highest byte of the kernel stack pointer, always 0xfe
-#      8/9:   kernel (ring 0) ss value, always 0x0010
-#      10 - 27: ring 1 and 2 ss/esp, unused, thus always 0
-#      28:    low order byte of the current PTD entry, always 0 since the
-#             PTD is page-aligned
-#
-7	string	\357\020\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0	FreeBSD/i386 a.out core file
->1039	string	>\0	from '%s'
-
-# /var/run/ld.so.hints
-# What are you laughing about?
-0	lelong			011421044151	ld.so hints file (Little Endian
->4	lelong			>0		\b, version %d)
->4	belong			<=0		\b)
-0	belong			011421044151	ld.so hints file (Big Endian
->4	belong			>0		\b, version %d)
->4	belong			<=0		\b)
-
-#
-# Files generated by FreeBSD scrshot(1)/vidcontrol(1) utilities
-#
-0	string	SCRSHOT_	scrshot(1) screenshot,
->8	byte	x		version %d,
->9	byte	2		%d bytes in header,
->>10	byte	x		%d chars wide by
->>11	byte	x		%d chars high
-
-#------------------------------------------------------------------------------
-# fsav:  file(1) magic for datafellows fsav virus definition files
-# Anthon van der Neut (anthon at mnt.org)
-0	beshort		0x1575		fsav (linux) macro virus
->8	leshort		>0		(%d-
->11	byte		>0		\b%02d-
->10	byte		>0		\b%02d)
-
-# comment this out for now because it regognizes every file where
-# the eighth character is \n
-#8	byte		0x0a
-#>12	byte		0x07
-#>11	leshort		>0		fsav (linux) virus (%d-
-#>10	byte		0		\b01-
-#>10	byte		1		\b02-
-#>10	byte		2		\b03-
-#>10	byte		3		\b04-
-#>10	byte		4		\b05-
-#>10	byte		5		\b06-
-#>10	byte		6		\b07-
-#>10	byte		7		\b08-
-#>10	byte		8		\b08-
-#>10	byte		9		\b10-
-#>10	byte		10		\b11-
-#>10	byte		11		\b12-
-#>9	byte		>0		\b%02d)
-#------------------------------------------------------------------------------
-# games:  file(1) for games
-
-# Thomas M. Ott (ThMO)
-1	string	=WAD		DOOM data,
->0	string	=I		main wad
->0	string	=P		patch wad
->0	byte	x		unknown junk
-
-# Fabio Bonelli <fabiobonelli at libero.it>
-# Quake II - III data files
-0       string  IDP2        	Quake II 3D Model file,
->20     long    x               %lu skin(s),
->8      long    x               (%lu x
->12     long    x 		%lu),
->40     long    x               %lu frame(s),
->16     long    x               Frame size %lu bytes,
->24     long  	x               %lu vertices/frame,
->28     long    x            	%lu texture coordinates,
->32     long    x               %lu triangles/frame
-
-0       string  IBSP            Quake
->4      long    0x26            II Map file (BSP)
->4      long    0x2E      	III Map file (BSP)
-
-0       string  IDS2            Quake II SP2 sprite file
-
-#---------------------------------------------------------------------------
-# Doom and Quake
-# submitted by Nicolas Patrois
-
-# DOOM
-
-0       string  IWAD    DOOM or DOOM ][ world
-0       string  PWAD    DOOM or DOOM ][ extension world
-
-0       string  \xcb\x1dBoom\xe6\xff\x03\x01    Boom or linuxdoom demo
-# some doom lmp files don't match, I've got one beginning with \x6d\x02\x01\x01
-
-24      string  LxD\ 203        Linuxdoom save
->0      string  x       , name=%s
->44     string  x       , world=%s
-
-# Quake
-
-0       string  PACK    Quake I or II world or extension
-
-#0       string  -1\x0a  Quake I demo
-#>30     string  x        version %.4s
-#>61     string  x        level %s       
-
-#0       string  5\x0a   Quake I save
-
-# The levels
-
-# Quake 1
-
-0	string	5\x0aIntroduction             Quake I save: start Introduction
-0	string	5\x0athe_Slipgate_Complex     Quake I save: e1m1 The slipgate complex
-0	string	5\x0aCastle_of_the_Damned     Quake I save: e1m2 Castle of the damned
-0	string	5\x0athe_Necropolis           Quake I save: e1m3 The necropolis
-0	string	5\x0athe_Grisly_Grotto        Quake I save: e1m4 The grisly grotto
-0	string	5\x0aZiggurat_Vertigo         Quake I save: e1m8 Ziggurat vertigo (secret)
-0	string	5\x0aGloom_Keep               Quake I save: e1m5 Gloom keep
-0	string	5\x0aThe_Door_To_Chthon       Quake I save: e1m6 The door to Chthon
-0	string	5\x0aThe_House_of_Chthon      Quake I save: e1m7 The house of Chthon
-0	string	5\x0athe_Installation         Quake I save: e2m1 The installation
-0	string	5\x0athe_Ogre_Citadel         Quake I save: e2m2 The ogre citadel
-0	string	5\x0athe_Crypt_of_Decay       Quake I save: e2m3 The crypt of decay (dopefish lives!)
-0	string	5\x0aUnderearth               Quake I save: e2m7 Underearth (secret)
-0	string	5\x0athe_Ebon_Fortress        Quake I save: e2m4 The ebon fortress
-0	string	5\x0athe_Wizard's_Manse       Quake I save: e2m5 The wizard's manse
-0	string	5\x0athe_Dismal_Oubliette     Quake I save: e2m6 The dismal oubliette
-0	string	5\x0aTermination_Central      Quake I save: e3m1 Termination central
-0	string	5\x0aVaults_of_Zin            Quake I save: e3m2 Vaults of Zin
-0	string	5\x0athe_Tomb_of_Terror       Quake I save: e3m3 The tomb of terror
-0	string	5\x0aSatan's_Dark_Delight     Quake I save: e3m4 Satan's dark delight
-0	string	5\x0athe_Haunted_Halls        Quake I save: e3m7 The haunted halls (secret)
-0	string	5\x0aWind_Tunnels             Quake I save: e3m5 Wind tunnels
-0	string	5\x0aChambers_of_Torment      Quake I save: e3m6 Chambers of torment
-0	string	5\x0athe_Sewage_System        Quake I save: e4m1 The sewage system
-0	string	5\x0aThe_Tower_of_Despair     Quake I save: e4m2 The tower of despair
-0	string	5\x0aThe_Elder_God_Shrine     Quake I save: e4m3 The elder god shrine
-0	string	5\x0athe_Palace_of_Hate       Quake I save: e4m4 The palace of hate
-0	string	5\x0aHell's_Atrium            Quake I save: e4m5 Hell's atrium
-0	string	5\x0athe_Nameless_City        Quake I save: e4m8 The nameless city (secret)
-0	string	5\x0aThe_Pain_Maze            Quake I save: e4m6 The pain maze
-0	string	5\x0aAzure_Agony              Quake I save: e4m7 Azure agony
-0	string	5\x0aShub-Niggurath's_Pit     Quake I save: end Shub-Niggurath's pit
-
-# Quake DeathMatch levels
-
-0	string	5\x0aPlace_of_Two_Deaths	 Quake I save: dm1 Place of two deaths
-0	string	5\x0aClaustrophobopolis		 Quake I save: dm2 Claustrophobopolis
-0	string	5\x0aThe_Abandoned_Base		 Quake I save: dm3 The abandoned base
-0	string	5\x0aThe_Bad_Place		 Quake I save: dm4 The bad place
-0	string	5\x0aThe_Cistern		 Quake I save: dm5 The cistern
-0	string	5\x0aThe_Dark_Zone		 Quake I save: dm6 The dark zone
-
-# Scourge of Armagon
-
-0	string	5\x0aCommand_HQ               Quake I save: start Command HQ
-0	string	5\x0aThe_Pumping_Station      Quake I save: hip1m1 The pumping station
-0	string	5\x0aStorage_Facility         Quake I save: hip1m2 Storage facility
-0	string	5\x0aMilitary_Complex         Quake I save: hip1m5 Military complex (secret)
-0	string	5\x0athe_Lost_Mine            Quake I save: hip1m3 The lost mine
-0	string	5\x0aResearch_Facility        Quake I save: hip1m4 Research facility
-0	string	5\x0aAncient_Realms           Quake I save: hip2m1 Ancient realms
-0	string	5\x0aThe_Gremlin's_Domain     Quake I save: hip2m6 The gremlin's domain (secret)
-0	string	5\x0aThe_Black_Cathedral      Quake I save: hip2m2 The black cathedral
-0	string	5\x0aThe_Catacombs            Quake I save: hip2m3 The catacombs
-0	string	5\x0athe_Crypt__              Quake I save: hip2m4 The crypt
-0	string	5\x0aMortum's_Keep            Quake I save: hip2m5 Mortum's keep
-0	string	5\x0aTur_Torment              Quake I save: hip3m1 Tur torment
-0	string	5\x0aPandemonium              Quake I save: hip3m2 Pandemonium
-0	string	5\x0aLimbo                    Quake I save: hip3m3 Limbo
-0	string	5\x0athe_Edge_of_Oblivion     Quake I save: hipdm1 The edge of oblivion (secret)
-0	string	5\x0aThe_Gauntlet             Quake I save: hip3m4 The gauntlet
-0	string	5\x0aArmagon's_Lair           Quake I save: hipend Armagon's lair
-
-# Malice
-
-0	string	5\x0aThe_Academy      Quake I save: start The academy
-0	string	5\x0aThe_Lab          Quake I save: d1 The lab
-0	string	5\x0aArea_33          Quake I save: d1b Area 33
-0	string	5\x0aSECRET_MISSIONS  Quake I save: d3b Secret missions
-0	string	5\x0aThe_Hospital     Quake I save: d10 The hospital (secret)
-0	string	5\x0aThe_Genetics_Lab Quake I save: d11 The genetics lab (secret)
-0	string	5\x0aBACK_2_MALICE    Quake I save: d4b Back to Malice
-0	string	5\x0aArea44           Quake I save: d1c Area 44
-0	string	5\x0aTakahiro_Towers  Quake I save: d2 Takahiro towers
-0	string	5\x0aA_Rat's_Life     Quake I save: d3 A rat's life
-0	string	5\x0aInto_The_Flood   Quake I save: d4 Into the flood
-0	string	5\x0aThe_Flood        Quake I save: d5 The flood
-0	string	5\x0aNuclear_Plant    Quake I save: d6 Nuclear plant
-0	string	5\x0aThe_Incinerator_Plant    Quake I save: d7 The incinerator plant
-0	string	5\x0aThe_Foundry              Quake I save: d7b The foundry
-0	string	5\x0aThe_Underwater_Base      Quake I save: d8 The underwater base
-0	string	5\x0aTakahiro_Base            Quake I save: d9 Takahiro base
-0	string	5\x0aTakahiro_Laboratories    Quake I save: d12 Takahiro laboratories
-0	string	5\x0aStayin'_Alive    Quake I save: d13 Stayin' alive
-0	string	5\x0aB.O.S.S._HQ      Quake I save: d14 B.O.S.S. HQ
-0	string	5\x0aSHOWDOWN!        Quake I save: d15 Showdown!
-
-# Malice DeathMatch levels
-
-0	string	5\x0aThe_Seventh_Precinct	 Quake I save: ddm1 The seventh precinct
-0	string	5\x0aSub_Station		 Quake I save: ddm2 Sub station
-0	string	5\x0aCrazy_Eights!		 Quake I save: ddm3 Crazy eights!
-0	string	5\x0aEast_Side_Invertationa	 Quake I save: ddm4 East side invertationa
-0	string	5\x0aSlaughterhouse		 Quake I save: ddm5 Slaughterhouse
-0	string	5\x0aDOMINO			 Quake I save: ddm6 Domino
-0	string	5\x0aSANDRA'S_LADDER		 Quake I save: ddm7 Sandra's ladder
-
-
-0	string	MComprHD	MAME CHD compressed hard disk image,
->12	belong	x		version %lu
-
-#------------------------------------------------------------------------------
-# GEOS files (Vidar Madsen, vidar at gimp.org)
-# semi-commonly used in embedded and handheld systems.
-0	belong	0xc745c153	GEOS
->40	byte	1	executable
->40	byte	2	VMFile
->40	byte	3	binary
->40	byte	4	directory label
->40	byte	<1	unknown
->40	byte	>4	unknown
->4	string	>\0	\b, name "%s"
-#>44	short	x	\b, version %d
-#>46	short	x	\b.%d
-#>48	short	x	\b, rev %d
-#>50	short	x	\b.%d
-#>52	short	x	\b, proto %d
-#>54	short	x	\br%d
-#>168	string	>\0	\b, copyright "%s"
-
-#------------------------------------------------------------------------------
-# gcc:  file(1) magic for GCC special files
-#
-0	string		gpch		GCC precompiled header
-
-# The version field is annoying.  It's 3 characters, not zero-terminated.
->5	byte		x			(version %c
->6	byte		x			\b%c
->7	byte		x			\b%c)
-
-# 67 = 'C', 111 = 'o', 43 = '+', 79 = 'O'
->4	byte		67			for C
->4	byte		111			for Objective C
->4	byte		43			for C++
->4	byte		79			for Objective C++
-#------------------------------------------------------------------------------
-# GIMP Gradient: file(1) magic for the GIMP's gradient data files
-# by Federico Mena <federico at nuclecu.unam.mx>
-
-0       string          GIMP\ Gradient  GIMP gradient data
-
-#------------------------------------------------------------------------------
-# XCF:  file(1) magic for the XCF image format used in the GIMP developed
-#       by Spencer Kimball and Peter Mattis
-#       ('Bucky' LaDieu, nega at vt.edu)
-
-0	string		gimp\ xcf	GIMP XCF image data,
->9	string		file		version 0,
->9	string		v		version
->>10	string		>\0		%s,
->14	belong		x		%lu x
->18	belong		x		%lu,
->22     belong          0               RGB Color
->22     belong          1               Greyscale
->22     belong          2               Indexed Color
->22	belong		>2		Unknown Image Type.
-
-#------------------------------------------------------------------------------
-# XCF:  file(1) magic for the patterns used in the GIMP, developed
-#       by Spencer Kimball and Peter Mattis
-#       ('Bucky' LaDieu, nega at vt.edu)
-
-20      string          GPAT            GIMP pattern data,
->24     string          x               %s
-
-#------------------------------------------------------------------------------
-# XCF:  file(1) magic for the brushes used in the GIMP, developed
-#       by Spencer Kimball and Peter Mattis
-#       ('Bucky' LaDieu, nega at vt.edu)
-
-20      string          GIMP            GIMP brush data
-#
-# GNU nlsutils message catalog file format
-#
-0	string		\336\22\4\225	GNU message catalog (little endian),
->4	lelong		x		revision %d,
->8	lelong		x		%d messages
-0	string		\225\4\22\336	GNU message catalog (big endian),
->4	belong		x		revision %d,
->8	belong		x		%d messages
-# message catalogs, from Mitchum DSouza <m.dsouza at mrc-apu.cam.ac.uk>
-0	string		*nazgul*	Nazgul style compiled message catalog
->8	lelong		>0		\b, version %ld
-# GnuPG
-# The format is very similar to pgp
-0	string          \001gpg                 GPG key trust database
->4	byte            x                       version %d
-0       beshort         0x9901                  GPG key public ring
-# This magic is not particularly good, as the keyrings don't have true
-# magic. Nevertheless, it covers many keyrings.
-
-# Gnumeric spreadsheet
-# This entry is only semi-helpful, as Gnumeric compresses its files, so
-# they will ordinarily reported as "compressed", but at least -z helps
-39      string          =<gmr:Workbook           Gnumeric spreadsheet
-
-#------------------------------------------------------------------------------
-# gcc:  file(1) magic for GCC special files
-#
-0       string          gpch            GCC precompiled header
-
-# The version field is annoying.  It's 3 characters, not zero-terminated.
->5      byte            x                       (version %c
->6      byte            x                       \b%c
->7      byte            x                       \b%c)
-
-# 67 = 'C', 111 = 'o', 43 = '+', 79 = 'O'
->4      byte            67                      for C
->4      byte            111                     for Objective C
->4      byte            43                      for C++
->4      byte            79                      for Objective C++
-
-
-
-#------------------------------------------------------------------------------
-# ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
-#
-# ACE/gr binary
-0	string	\000\000\0001\000\000\0000\000\000\0000\000\000\0002\000\000\0000\000\000\0000\000\000\0003		old ACE/gr binary file
->39	byte	>0			- version %c
-# ACE/gr ascii
-0	string	#\ xvgr\ parameter\ file	ACE/gr ascii file
-0	string	#\ xmgr\ parameter\ file	ACE/gr ascii file
-0	string	#\ ACE/gr\ parameter\ file	ACE/gr ascii file
-# Grace projects
-0	string	#\ Grace\ project\ file		Grace project file
->23	string	@version\  			(version
->>32	byte	>0 				%c
->>33	string	>\0 				\b.%.2s
->>35	string	>\0 				\b.%.2s)
-# ACE/gr fit description files
-0	string	#\ ACE/gr\ fit\ description\ 	ACE/gr fit description file
-# end of ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
-
-#------------------------------------------------------------------------------
-# gringotts:  file(1) magic for Gringotts
-# http://devel.pluto.linux.it/projects/Gringotts/
-# author: Germano Rizzo <mano at pluto.linux.it>
-#GRG3????Y
-0	string	GRG		Gringotts data file
-#file format 1
->3	string		1		v.1, MCRYPT S2K, SERPENT crypt, SHA-256 hash, ZLib lvl.9
-#file format 2
->3	string		2		v.2, MCRYPT S2K, 
->>8	byte&0x70	0x00		RIJNDAEL-128 crypt,
->>8	byte&0x70	0x10		SERPENT crypt,
->>8	byte&0x70	0x20		TWOFISH crypt, 
->>8	byte&0x70	0x30		CAST-256 crypt,
->>8	byte&0x70	0x40		SAFER+ crypt,
->>8	byte&0x70	0x50		LOKI97 crypt,
->>8	byte&0x70	0x60		3DES crypt,
->>8	byte&0x70	0x70		RIJNDAEL-256 crypt,
->>8	byte&0x08	0x00		SHA1 hash,
->>8	byte&0x08	0x08		RIPEMD-160 hash,
->>8	byte&0x04	0x00		ZLib
->>8	byte&0x04	0x04		BZip2
->>8	byte&0x03	0x00		lvl.0
->>8	byte&0x03	0x01		lvl.3
->>8	byte&0x03	0x02		lvl.6
->>8	byte&0x03	0x03		lvl.9
-#file format 3
->3	string		3		v.3, OpenPGP S2K, 
->>8	byte&0x70	0x00		RIJNDAEL-128 crypt,
->>8	byte&0x70	0x10		SERPENT crypt,
->>8	byte&0x70	0x20		TWOFISH crypt, 
->>8	byte&0x70	0x30		CAST-256 crypt,
->>8	byte&0x70	0x40		SAFER+ crypt,
->>8	byte&0x70	0x50		LOKI97 crypt,
->>8	byte&0x70	0x60		3DES crypt,
->>8	byte&0x70	0x70		RIJNDAEL-256 crypt,
->>8	byte&0x08	0x00		SHA1 hash,
->>8	byte&0x08	0x08		RIPEMD-160 hash,
->>8	byte&0x04	0x00		ZLib
->>8	byte&0x04	0x04		BZip2
->>8	byte&0x03	0x00		lvl.0
->>8	byte&0x03	0x01		lvl.3
->>8	byte&0x03	0x02		lvl.6
->>8	byte&0x03	0x03		lvl.9
-#file format >3
->3	string		>3		v.%.1s (unknown details)
-
-#------------------------------------------------------------------------------
-# Hierarchical Data Format, used to facilitate scientific data exchange
-# specifications at http://hdf.ncsa.uiuc.edu/
-
-0	belong		0x0e031301	Hierarchical Data Format (version 4) data
-0	string		\211HDF\r\n\032	Hierarchical Data Format (version 5) data
-
-#------------------------------------------------------------------------------
-# hitach-sh: file(1) magic for Hitachi Super-H
-#
-# Super-H COFF
-#
-0	beshort		0x0500		Hitachi SH big-endian COFF
->18	beshort&0x0002	=0x0000		object
->18	beshort&0x0002	=0x0002		executable
->18	beshort&0x0008	=0x0008		\b, stripped
->18	beshort&0x0008	=0x0000		\b, not stripped
-#
-0	leshort		0x0550		Hitachi SH little-endian COFF
->18	leshort&0x0002	=0x0000		object
->18	leshort&0x0002	=0x0002		executable
->18	leshort&0x0008	=0x0008		\b, stripped
->18	leshort&0x0008	=0x0000		\b, not stripped
-
-
-#------------------------------------------------------------------------------
-# hp:  file(1) magic for Hewlett Packard machines (see also "printer")
-#
-# XXX - somebody should figure out whether any byte order needs to be
-# applied to the "TML" stuff; I'm assuming the Apollo stuff is
-# big-endian as it was mostly 68K-based.
-#
-# I think the 500 series was the old stack-based machines, running a
-# UNIX environment atop the "SUN kernel"; dunno whether it was
-# big-endian or little-endian.
-#
-# Daniel Quinlan (quinlan at yggdrasil.com): hp200 machines are 68010 based;
-# hp300 are 68020+68881 based; hp400 are also 68k.  The following basic
-# HP magic is useful for reference, but using "long" magic is a better
-# practice in order to avoid collisions.
-#
-# Guy Harris (guy at netapp.com): some additions to this list came from
-# HP-UX 10.0's "/usr/include/sys/unistd.h" (68030, 68040, PA-RISC 1.1,
-# 1.2, and 2.0).  The 1.2 and 2.0 stuff isn't in the HP-UX 10.0
-# "/etc/magic", though, except for the "archive file relocatable library"
-# stuff, and the 68030 and 68040 stuff isn't there at all - are they not
-# used in executables, or have they just not yet updated "/etc/magic"
-# completely?
-#
-# 0	beshort		200		hp200 (68010) BSD binary
-# 0	beshort		300		hp300 (68020+68881) BSD binary
-# 0	beshort		0x20c		hp200/300 HP-UX binary
-# 0	beshort		0x20d		hp400 (68030) HP-UX binary
-# 0	beshort		0x20e		hp400 (68040?) HP-UX binary
-# 0	beshort		0x20b		PA-RISC1.0 HP-UX binary
-# 0	beshort		0x210		PA-RISC1.1 HP-UX binary
-# 0	beshort		0x211		PA-RISC1.2 HP-UX binary
-# 0	beshort		0x214		PA-RISC2.0 HP-UX binary
-
-#
-# The "misc" stuff needs a byte order; the archives look suspiciously
-# like the old 177545 archives (0xff65 = 0177545).
-#
-#### Old Apollo stuff
-0	beshort		0627		Apollo m68k COFF executable
->18	beshort		^040000		not stripped
->22	beshort		>0		- version %ld
-0	beshort		0624		apollo a88k COFF executable
->18	beshort		^040000		not stripped
->22	beshort		>0		- version %ld
-0       long            01203604016     TML 0123 byte-order format
-0       long            01702407010     TML 1032 byte-order format
-0       long            01003405017     TML 2301 byte-order format
-0       long            01602007412     TML 3210 byte-order format
-#### PA-RISC 1.1
-0	belong 		0x02100106	PA-RISC1.1 relocatable object
-0	belong 		0x02100107	PA-RISC1.1 executable
->168	belong		&0x00000004	dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0	belong 		0x02100108	PA-RISC1.1 shared executable
->168	belong&0x4	0x4		dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0	belong 		0x0210010b	PA-RISC1.1 demand-load executable
->168	belong&0x4	0x4		dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0	belong 		0x0210010e	PA-RISC1.1 shared library
->96	belong		>0		- not stripped
-
-0	belong 		0x0210010d	PA-RISC1.1 dynamic load library
->96	belong		>0		- not stripped
-
-#### PA-RISC 2.0
-0	belong		0x02140106	PA-RISC2.0 relocatable object
-
-0       belong		0x02140107	PA-RISC2.0 executable
->168	belong		&0x00000004	dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0       belong		0x02140108	PA-RISC2.0 shared executable
->168	belong		&0x00000004	dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0       belong		0x0214010b	PA-RISC2.0 demand-load executable
->168	belong		&0x00000004	dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0       belong		0x0214010e	PA-RISC2.0 shared library
->96	belong		>0		- not stripped
-
-0       belong		0x0214010d	PA-RISC2.0 dynamic load library
->96	belong		>0		- not stripped
-
-#### 800
-0	belong 		0x020b0106	PA-RISC1.0 relocatable object
-
-0	belong 		0x020b0107	PA-RISC1.0 executable
->168	belong&0x4	0x4		dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0	belong 		0x020b0108	PA-RISC1.0 shared executable
->168	belong&0x4	0x4		dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0	belong 		0x020b010b	PA-RISC1.0 demand-load executable
->168	belong&0x4	0x4		dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0	belong 		0x020b010e	PA-RISC1.0 shared library
->96	belong		>0		- not stripped
-
-0	belong 		0x020b010d	PA-RISC1.0 dynamic load library
->96	belong		>0		- not stripped
-
-0	belong		0x213c6172	archive file
->68	belong 		0x020b0619	- PA-RISC1.0 relocatable library
->68	belong	 	0x02100619	- PA-RISC1.1 relocatable library
->68	belong 		0x02110619	- PA-RISC1.2 relocatable library
->68	belong 		0x02140619	- PA-RISC2.0 relocatable library
-
-#### 500
-0	long		0x02080106	HP s500 relocatable executable
->16	long		>0		- version %ld
-
-0	long		0x02080107	HP s500 executable
->16	long		>0		- version %ld
-
-0	long		0x02080108	HP s500 pure executable
->16	long		>0		- version %ld
-
-#### 200
-0	belong 		0x020c0108	HP s200 pure executable
->4	beshort		>0		- version %ld
->8	belong		&0x80000000	save fp regs
->8	belong		&0x40000000	dynamically linked
->8	belong		&0x20000000	debuggable
->36	belong		>0		not stripped
-
-0	belong		0x020c0107	HP s200 executable
->4	beshort		>0		- version %ld
->8	belong		&0x80000000	save fp regs
->8	belong		&0x40000000	dynamically linked
->8	belong		&0x20000000	debuggable
->36	belong		>0		not stripped
-
-0	belong		0x020c010b	HP s200 demand-load executable
->4	beshort		>0		- version %ld
->8	belong		&0x80000000	save fp regs
->8	belong		&0x40000000	dynamically linked
->8	belong		&0x20000000	debuggable
->36	belong		>0		not stripped
-
-0	belong		0x020c0106	HP s200 relocatable executable
->4	beshort		>0		- version %ld
->6	beshort		>0		- highwater %d
->8	belong		&0x80000000	save fp regs
->8	belong		&0x20000000	debuggable
->8	belong		&0x10000000	PIC
-
-0	belong 		0x020a0108	HP s200 (2.x release) pure executable
->4	beshort		>0		- version %ld
->36	belong		>0		not stripped
-
-0	belong		0x020a0107	HP s200 (2.x release) executable
->4	beshort		>0		- version %ld
->36	belong		>0		not stripped
-
-0	belong		0x020c010e	HP s200 shared library
->4	beshort		>0		- version %ld
->6	beshort		>0		- highwater %d
->36	belong		>0		not stripped
-
-0	belong		0x020c010d	HP s200 dynamic load library
->4	beshort		>0		- version %ld
->6	beshort		>0		- highwater %d
->36	belong		>0		not stripped
-
-#### MISC
-0	long		0x0000ff65	HP old archive
-0	long		0x020aff65	HP s200 old archive
-0	long		0x020cff65	HP s200 old archive
-0	long		0x0208ff65	HP s500 old archive
-
-0	long		0x015821a6	HP core file
-
-0	long		0x4da7eee8	HP-WINDOWS font
->8	byte		>0		- version %ld
-0	string		Bitmapfile	HP Bitmapfile
-
-0	string		IMGfile	CIS 	compimg HP Bitmapfile
-# XXX - see "lif"
-#0	short		0x8000		lif file
-0	long		0x020c010c	compiled Lisp
-
-0	string		msgcat01	HP NLS message catalog,
->8	long		>0		%d messages
-
-# addendum to /etc/magic with HP-48sx file-types by phk at data.fls.dk 1jan92
-0	string		HPHP48-		HP48 binary
->7	byte		>0		- Rev %c
->8	beshort		0x1129		(ADR)
->8	beshort		0x3329		(REAL)
->8	beshort		0x5529		(LREAL)
->8	beshort		0x7729		(COMPLX)
->8	beshort		0x9d29		(LCOMPLX)
->8	beshort		0xbf29		(CHAR)
->8	beshort		0xe829		(ARRAY)
->8	beshort		0x0a2a		(LNKARRAY)
->8	beshort		0x2c2a		(STRING)
->8	beshort		0x4e2a		(HXS)
->8	beshort		0x742a		(LIST)
->8	beshort		0x962a		(DIR)
->8	beshort		0xb82a		(ALG)
->8	beshort		0xda2a		(UNIT)
->8	beshort		0xfc2a		(TAGGED)
->8	beshort		0x1e2b		(GROB)
->8	beshort		0x402b		(LIB)
->8	beshort		0x622b		(BACKUP)
->8	beshort		0x882b		(LIBDATA)
->8	beshort		0x9d2d		(PROG)
->8	beshort		0xcc2d		(CODE)
->8	beshort		0x482e		(GNAME)
->8	beshort		0x6d2e		(LNAME)
->8	beshort		0x922e		(XLIB)
-0	string		%%HP:		HP48 text
->6	string		T(0)		- T(0)
->6	string		T(1)		- T(1)
->6	string		T(2)		- T(2)
->6	string		T(3)		- T(3)
->10	string		A(D)		A(D)
->10	string		A(R)		A(R)
->10	string		A(G)		A(G)
->14	string		F(.)		F(.);
->14	string		F(,)		F(,);
-
-# hpBSD magic numbers
-0	beshort		200		hp200 (68010) BSD
->2	beshort		0407		impure binary
->2	beshort		0410		read-only binary
->2	beshort		0413		demand paged binary
-0	beshort		300		hp300 (68020+68881) BSD
->2	beshort		0407		impure binary
->2	beshort		0410		read-only binary
->2	beshort		0413		demand paged binary
-#
-# From David Gero <dgero at nortelnetworks.com>
-# HP-UX 10.20 core file format from /usr/include/sys/core.h
-# Unfortunately, HP-UX uses corehead blocks without specifying the order
-# There are four we care about:
-#     CORE_KERNEL, which starts with the string "HP-UX"
-#     CORE_EXEC, which contains the name of the command
-#     CORE_PROC, which contains the signal number that caused the core dump
-#     CORE_FORMAT, which contains the version of the core file format (== 1)
-# The only observed order in real core files is KERNEL, EXEC, FORMAT, PROC
-# but we include all 6 variations of the order of the first 3, and
-# assume that PROC will always be last
-# Order 1: KERNEL, EXEC, FORMAT, PROC
-0x10		string	HP-UX
->0		belong	2
->>0xC		belong	0x3C
->>>0x4C		belong	0x100
->>>>0x58	belong	0x44
->>>>>0xA0	belong	1
->>>>>>0xAC	belong	4
->>>>>>>0xB0	belong	1
->>>>>>>>0xB4	belong	4		core file
->>>>>>>>>0x90	string	>\0		from '%s'
->>>>>>>>>0xC4	belong	3		- received SIGQUIT
->>>>>>>>>0xC4	belong	4		- received SIGILL
->>>>>>>>>0xC4	belong	5		- received SIGTRAP
->>>>>>>>>0xC4	belong	6		- received SIGABRT
->>>>>>>>>0xC4	belong	7		- received SIGEMT
->>>>>>>>>0xC4	belong	8		- received SIGFPE
->>>>>>>>>0xC4	belong	10		- received SIGBUS
->>>>>>>>>0xC4	belong	11		- received SIGSEGV
->>>>>>>>>0xC4	belong	12		- received SIGSYS
->>>>>>>>>0xC4	belong	33		- received SIGXCPU
->>>>>>>>>0xC4	belong	34		- received SIGXFSZ
-# Order 2: KERNEL, FORMAT, EXEC, PROC
->>>0x4C		belong	1
->>>>0x58	belong	4
->>>>>0x5C	belong	1
->>>>>>0x60	belong	0x100
->>>>>>>0x6C	belong	0x44
->>>>>>>>0xB4	belong	4		core file
->>>>>>>>>0xA4	string	>\0		from '%s'
->>>>>>>>>0xC4	belong	3		- received SIGQUIT
->>>>>>>>>0xC4	belong	4		- received SIGILL
->>>>>>>>>0xC4	belong	5		- received SIGTRAP
->>>>>>>>>0xC4	belong	6		- received SIGABRT
->>>>>>>>>0xC4	belong	7		- received SIGEMT
->>>>>>>>>0xC4	belong	8		- received SIGFPE
->>>>>>>>>0xC4	belong	10		- received SIGBUS
->>>>>>>>>0xC4	belong	11		- received SIGSEGV
->>>>>>>>>0xC4	belong	12		- received SIGSYS
->>>>>>>>>0xC4	belong	33		- received SIGXCPU
->>>>>>>>>0xC4	belong	34		- received SIGXFSZ
-# Order 3: FORMAT, KERNEL, EXEC, PROC
-0x24		string	HP-UX
->0		belong	1
->>0xC		belong	4
->>>0x10		belong	1
->>>>0x14	belong	2
->>>>>0x20	belong	0x3C
->>>>>>0x60	belong	0x100
->>>>>>>0x6C	belong	0x44
->>>>>>>>0xB4	belong	4		core file
->>>>>>>>>0xA4	string	>\0		from '%s'
->>>>>>>>>0xC4	belong	3		- received SIGQUIT
->>>>>>>>>0xC4	belong	4		- received SIGILL
->>>>>>>>>0xC4	belong	5		- received SIGTRAP
->>>>>>>>>0xC4	belong	6		- received SIGABRT
->>>>>>>>>0xC4	belong	7		- received SIGEMT
->>>>>>>>>0xC4	belong	8		- received SIGFPE
->>>>>>>>>0xC4	belong	10		- received SIGBUS
->>>>>>>>>0xC4	belong	11		- received SIGSEGV
->>>>>>>>>0xC4	belong	12		- received SIGSYS
->>>>>>>>>0xC4	belong	33		- received SIGXCPU
->>>>>>>>>0xC4	belong	34		- received SIGXFSZ
-# Order 4: EXEC, KERNEL, FORMAT, PROC
-0x64		string	HP-UX
->0		belong	0x100
->>0xC		belong	0x44
->>>0x54		belong	2
->>>>0x60	belong	0x3C
->>>>>0xA0	belong	1
->>>>>>0xAC	belong	4
->>>>>>>0xB0	belong	1
->>>>>>>>0xB4	belong	4		core file
->>>>>>>>>0x44	string	>\0		from '%s'
->>>>>>>>>0xC4	belong	3		- received SIGQUIT
->>>>>>>>>0xC4	belong	4		- received SIGILL
->>>>>>>>>0xC4	belong	5		- received SIGTRAP
->>>>>>>>>0xC4	belong	6		- received SIGABRT
->>>>>>>>>0xC4	belong	7		- received SIGEMT
->>>>>>>>>0xC4	belong	8		- received SIGFPE
->>>>>>>>>0xC4	belong	10		- received SIGBUS
->>>>>>>>>0xC4	belong	11		- received SIGSEGV
->>>>>>>>>0xC4	belong	12		- received SIGSYS
->>>>>>>>>0xC4	belong	33		- received SIGXCPU
->>>>>>>>>0xC4	belong	34		- received SIGXFSZ
-# Order 5: FORMAT, EXEC, KERNEL, PROC
-0x78		string	HP-UX
->0		belong	1
->>0xC		belong	4
->>>0x10		belong	1
->>>>0x14	belong	0x100
->>>>>0x20	belong	0x44
->>>>>>0x68	belong	2
->>>>>>>0x74	belong	0x3C
->>>>>>>>0xB4	belong	4		core file
->>>>>>>>>0x58	string	>\0		from '%s'
->>>>>>>>>0xC4	belong	3		- received SIGQUIT
->>>>>>>>>0xC4	belong	4		- received SIGILL
->>>>>>>>>0xC4	belong	5		- received SIGTRAP
->>>>>>>>>0xC4	belong	6		- received SIGABRT
->>>>>>>>>0xC4	belong	7		- received SIGEMT
->>>>>>>>>0xC4	belong	8		- received SIGFPE
->>>>>>>>>0xC4	belong	10		- received SIGBUS
->>>>>>>>>0xC4	belong	11		- received SIGSEGV
->>>>>>>>>0xC4	belong	12		- received SIGSYS
->>>>>>>>>0xC4	belong	33		- received SIGXCPU
->>>>>>>>>0xC4	belong	34		- received SIGXFSZ
-# Order 6: EXEC, FORMAT, KERNEL, PROC
->0		belong	0x100
->>0xC		belong	0x44
->>>0x54		belong	1
->>>>0x60	belong	4
->>>>>0x64	belong	1
->>>>>>0x68	belong	2
->>>>>>>0x74	belong	0x2C
->>>>>>>>0xB4	belong	4		core file
->>>>>>>>>0x44	string	>\0		from '%s'
->>>>>>>>>0xC4	belong	3		- received SIGQUIT
->>>>>>>>>0xC4	belong	4		- received SIGILL
->>>>>>>>>0xC4	belong	5		- received SIGTRAP
->>>>>>>>>0xC4	belong	6		- received SIGABRT
->>>>>>>>>0xC4	belong	7		- received SIGEMT
->>>>>>>>>0xC4	belong	8		- received SIGFPE
->>>>>>>>>0xC4	belong	10		- received SIGBUS
->>>>>>>>>0xC4	belong	11		- received SIGSEGV
->>>>>>>>>0xC4	belong	12		- received SIGSYS
->>>>>>>>>0xC4	belong	33		- received SIGXCPU
->>>>>>>>>0xC4	belong	34		- received SIGXFSZ
-
-# From: AMAKAWA Shuhei <sa264 at cam.ac.uk>
-0	string	HPHP49-			HP49 binary
-
-
-#------------------------------------------------------------------------------
-# human68k:  file(1) magic for Human68k (X680x0 DOS) binary formats
-# Magic too short!
-#0		string	HU		Human68k
-#>68		string	LZX		LZX compressed
-#>>72		string	>\0		(version %s)
-#>(8.L+74)	string	LZX		LZX compressed
-#>>(8.L+78)	string	>\0		(version %s)
-#>60		belong	>0		binded
-#>(8.L+66)	string	#HUPAIR		hupair
-#>0		string	HU		X executable
-#>(8.L+74)	string	#LIBCV1		- linked PD LIBC ver 1
-#>4		belong	>0		- base address 0x%x
-#>28		belong	>0		not stripped
-#>32		belong	>0		with debug information
-#0		beshort	0x601a		Human68k Z executable
-#0		beshort	0x6000		Human68k object file
-#0		belong	0xd1000000	Human68k ar binary archive
-#0		belong	0xd1010000	Human68k ar ascii archive
-#0		beshort	0x0068		Human68k lib archive
-#4		string	LZX		Human68k LZX compressed
-#>8		string	>\0		(version %s)
-#>4		string	LZX		R executable
-#2		string	#HUPAIR		Human68k hupair R executable
-
-#------------------------------------------------------------------------------
-# ibm370:  file(1) magic for IBM 370 and compatibles.
-#
-# "ibm370" said that 0x15d == 0535 was "ibm 370 pure executable".
-# What the heck *is* "USS/370"?
-# AIX 4.1's "/etc/magic" has
-#
-#	0	short		0535		370 sysV executable 
-#	>12	long		>0		not stripped
-#	>22	short		>0		- version %d
-#	>30	long		>0		- 5.2 format
-#	0	short		0530		370 sysV pure executable 
-#	>12	long		>0		not stripped
-#	>22	short		>0		- version %d
-#	>30	long		>0		- 5.2 format
-#
-# instead of the "USS/370" versions of the same magic numbers.
-#
-0	beshort		0537		370 XA sysV executable 
->12	belong		>0		not stripped
->22	beshort		>0		- version %d
->30	belong		>0		- 5.2 format
-0	beshort		0532		370 XA sysV pure executable 
->12	belong		>0		not stripped
->22	beshort		>0		- version %d
->30	belong		>0		- 5.2 format
-0	beshort		054001		370 sysV pure executable
->12	belong		>0		not stripped
-0	beshort		055001		370 XA sysV pure executable
->12	belong		>0		not stripped
-0	beshort		056401		370 sysV executable
->12	belong		>0		not stripped
-0	beshort		057401		370 XA sysV executable
->12	belong		>0		not stripped
-0       beshort		0531		SVR2 executable (Amdahl-UTS)
->12	belong		>0		not stripped
->24     belong		>0		- version %ld
-0	beshort		0534		SVR2 pure executable (Amdahl-UTS)
->12	belong		>0		not stripped
->24	belong		>0		- version %ld
-0	beshort		0530		SVR2 pure executable (USS/370)
->12	belong		>0		not stripped
->24	belong		>0		- version %ld
-0	beshort		0535		SVR2 executable (USS/370)
->12	belong		>0		not stripped
->24	belong		>0		- version %ld
-
-#------------------------------------------------------------------------------
-# ibm6000:  file(1) magic for RS/6000 and the RT PC.
-#
-0	beshort		0x01df		executable (RISC System/6000 V3.1) or obj module
->12	belong		>0		not stripped
-# Breaks sun4 statically linked execs.
-#0      beshort		0x0103		executable (RT Version 2) or obj module
-#>2	byte		0x50		pure
-#>28	belong		>0		not stripped
-#>6	beshort		>0		- version %ld
-0	beshort		0x0104		shared library
-0	beshort		0x0105		ctab data
-0	beshort		0xfe04		structured file
-0	string		0xabcdef	AIX message catalog
-0	belong		0x000001f9	AIX compiled message catalog
-0	string		\<aiaff>	archive
-0	string		\<bigaf>	archive (big format)
-
-
-#------------------------------------------------------------------------------
-# iff:	file(1) magic for Interchange File Format (see also "audio" & "images")
-#
-# Daniel Quinlan (quinlan at yggdrasil.com) -- IFF was designed by Electronic
-# Arts for file interchange.  It has also been used by Apple, SGI, and
-# especially Commodore-Amiga.
-#
-# IFF files begin with an 8 byte FORM header, followed by a 4 character
-# FORM type, which is followed by the first chunk in the FORM.
-
-0	string		FORM		IFF data
-#>4	belong		x		\b, FORM is %d bytes long
-# audio formats
->8	string		AIFF		\b, AIFF audio
->8	string		AIFC		\b, AIFF-C compressed audio
->8	string		8SVX		\b, 8SVX 8-bit sampled sound voice
->8	string		SAMP		\b, SAMP sampled audio
->8	string		DTYP		\b, DTYP datatype description
->8	string		PTCH		\b, PTCH binary patch
-# image formats
->8	string		ILBMBMHD	\b, ILBM interleaved image
->>20	beshort		x		\b, %d x
->>22	beshort		x		%d
->8	string		RGBN		\b, RGBN 12-bit RGB image
->8	string		RGB8		\b, RGB8 24-bit RGB image
->8	string		DR2D		\b, DR2D 2-D object
->8	string		TDDD		\b, TDDD 3-D rendering
-# other formats
->8	string		FTXT		\b, FTXT formatted text
-
-#------------------------------------------------------------------------------
-# images:  file(1) magic for image formats (see also "iff")
-#
-# originally from jef at helios.ee.lbl.gov (Jef Poskanzer),
-# additions by janl at ifi.uio.no as well as others. Jan also suggested
-# merging several one- and two-line files into here.
-#
-# little magic: PCX (first byte is 0x0a)
-
-# Targa - matches `povray', `ppmtotga' and `xv' outputs
-# by Philippe De Muyter <phdm at macqel.be>
-# at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11
-# at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise
-# at 3, leshort Index is 0 for povray, ppmtotga and xv outputs
-# `xv' recognizes only a subset of the following (RGB with pixelsize = 24)
-# `tgatoppm' recognizes a superset (Index may be anything)
-1	belong&0xfff7ffff	0x01010000	Targa image data - Map
->2	byte&8			8		- RLE
->12	leshort			>0		%hd x
->14	leshort			>0		%hd
-1	belong&0xfff7ffff	0x00020000	Targa image data - RGB
->2	byte&8			8		- RLE
->12	leshort			>0		%hd x
->14	leshort			>0		%hd
-1	belong&0xfff7ffff	0x00030000	Targa image data - Mono
->2	byte&8			8		- RLE
->12	leshort			>0		%hd x
->14	leshort			>0		%hd
-
-# PBMPLUS images
-# The next byte following the magic is always whitespace.
-0	string		P1		Netpbm PBM image text
-0	string		P2		Netpbm PGM image text
-0	string		P3		Netpbm PPM image text
-0	string		P4		Netpbm PBM "rawbits" image data
-0	string		P5		Netpbm PGM "rawbits" image data
-0	string		P6		Netpbm PPM "rawbits" image data
-0	string		P7		Netpbm PAM image file
-
-# From: bryanh at giraffe-data.com (Bryan Henderson)
-0	string		\117\072	Solitaire Image Recorder format
->4	string		\013		MGI Type 11
->4	string		\021		MGI Type 17
-0	string		.MDA		MicroDesign data
->21	byte		48		version 2
->21	byte		51		version 3
-0	string		.MDP		MicroDesign page data
->21	byte		48		version 2
->21	byte		51		version 3
-
-# NIFF (Navy Interchange File Format, a modification of TIFF) images
-0	string		IIN1		NIFF image data
-
-# Tag Image File Format, from Daniel Quinlan (quinlan at yggdrasil.com)
-# The second word of TIFF files is the TIFF version number, 42, which has
-# never changed.  The TIFF specification recommends testing for it.
-0	string		MM\x00\x2a	TIFF image data, big-endian
-0	string		II\x2a\x00	TIFF image data, little-endian
-
-# PNG [Portable Network Graphics, or "PNG's Not GIF"] images
-# (Greg Roelofs, newt at uchicago.edu)
-# (Albert Cahalan, acahalan at cs.uml.edu)
-#
-# 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ...
-#
-0	string		\x89PNG		PNG image data,
->4	belong		!0x0d0a1a0a	CORRUPTED,
->4	belong		0x0d0a1a0a
->>16	belong		x		%ld x
->>20	belong		x		%ld,
->>24	byte		x		%d-bit
->>25	byte		0		grayscale,
->>25	byte		2		\b/color RGB,
->>25	byte		3		colormap,
->>25	byte		4		gray+alpha,
->>25	byte		6		\b/color RGBA,
-#>>26	byte		0		deflate/32K,
->>28	byte		0		non-interlaced
->>28	byte		1		interlaced
-1	string		PNG		PNG image data, CORRUPTED
-
-# GIF
-0	string		GIF8		GIF image data
->4	string		7a		\b, version 8%s,
->4	string		9a		\b, version 8%s,
->6	leshort		>0		%hd x
->8	leshort		>0		%hd
-#>10	byte		&0x80		color mapped,
-#>10	byte&0x07	=0x00		2 colors
-#>10	byte&0x07	=0x01		4 colors
-#>10	byte&0x07	=0x02		8 colors
-#>10	byte&0x07	=0x03		16 colors
-#>10	byte&0x07	=0x04		32 colors
-#>10	byte&0x07	=0x05		64 colors
-#>10	byte&0x07	=0x06		128 colors
-#>10	byte&0x07	=0x07		256 colors
-
-# ITC (CMU WM) raster files.  It is essentially a byte-reversed Sun raster,
-# 1 plane, no encoding.
-0	string		\361\0\100\273	CMU window manager raster image data
->4	lelong		>0		%d x
->8	lelong		>0		%d,
->12	lelong		>0		%d-bit
-
-# Magick Image File Format
-0	string		id=ImageMagick	MIFF image data
-
-# Artisan
-0	long		1123028772	Artisan image data
->4	long		1		\b, rectangular 24-bit
->4	long		2		\b, rectangular 8-bit with colormap
->4	long		3		\b, rectangular 32-bit (24-bit with matte)
-
-# FIG (Facility for Interactive Generation of figures), an object-based format
-0	string		#FIG		FIG image text
->5	string		x		\b, version %.3s
-
-# PHIGS
-0	string		ARF_BEGARF		PHIGS clear text archive
-0	string		@(#)SunPHIGS		SunPHIGS
-# version number follows, in the form m.n
->40	string		SunBin			binary
->32	string		archive			archive
-
-# GKS (Graphics Kernel System)
-0	string		GKSM		GKS Metafile
->24	string		SunGKS		\b, SunGKS
-
-# CGM image files
-0	string		BEGMF		clear text Computer Graphics Metafile
-# XXX - questionable magic
-0	beshort&0xffe0	0x0020		binary Computer Graphics Metafile
-0	beshort		0x3020		character Computer Graphics Metafile
-
-# MGR bitmaps  (Michael Haardt, u31b3hs at pool.informatik.rwth-aachen.de)
-0	string	yz	MGR bitmap, modern format, 8-bit aligned
-0	string	zz	MGR bitmap, old format, 1-bit deep, 16-bit aligned
-0	string	xz	MGR bitmap, old format, 1-bit deep, 32-bit aligned
-0	string	yx	MGR bitmap, modern format, squeezed
-
-# Fuzzy Bitmap (FBM) images
-0	string		%bitmap\0	FBM image data
->30	long		0x31		\b, mono
->30	long		0x33		\b, color
-
-# facsimile data
-1	string		PC\ Research,\ Inc	group 3 fax data
->29	byte		0		\b, normal resolution (204x98 DPI)
->29	byte		1		\b, fine resolution (204x196 DPI)
-# From: Herbert Rosmanith <herp at wildsau.idv.uni.linz.at>
-0	string		Sfff		structured fax file
-
-
-# PC bitmaps (OS/2, Windoze BMP files)  (Greg Roelofs, newt at uchicago.edu)
-0	string		BM		PC bitmap data
->14	leshort		12		\b, OS/2 1.x format
->>18	leshort		x		\b, %d x
->>20	leshort		x		%d
->14	leshort		64		\b, OS/2 2.x format
->>18	leshort		x		\b, %d x
->>20	leshort		x		%d
->14	leshort		40		\b, Windows 3.x format
->>18	lelong		x		\b, %d x
->>22	lelong		x		%d x
->>28	leshort		x		%d
-# Too simple - MPi
-#0	string		IC		PC icon data
-#0	string		PI		PC pointer image data
-#0	string		CI		PC color icon data
-#0	string		CP		PC color pointer image data
-# Conflicts with other entries [BABYL]
-#0	string		BA		PC bitmap array data
-
-# XPM icons (Greg Roelofs, newt at uchicago.edu)
-# note possible collision with C/REXX entry in c-lang; currently commented out
-0	string		/*\ XPM\ */	X pixmap image text
-
-# Utah Raster Toolkit RLE images (janl at ifi.uio.no)
-0	leshort		0xcc52		RLE image data,
->6	leshort		x		%d x
->8	leshort		x		%d
->2	leshort		>0		\b, lower left corner: %d
->4	leshort		>0		\b, lower right corner: %d
->10	byte&0x1	=0x1		\b, clear first
->10	byte&0x2	=0x2		\b, no background
->10	byte&0x4	=0x4		\b, alpha channel
->10	byte&0x8	=0x8		\b, comment
->11	byte		>0		\b, %d color channels
->12	byte		>0		\b, %d bits per pixel
->13	byte		>0		\b, %d color map channels
-
-# image file format (Robert Potter, potter at cs.rochester.edu)
-0	string		Imagefile\ version-	iff image data
-# this adds the whole header (inc. version number), informative but longish
->10	string		>\0		%s
-
-# Sun raster images, from Daniel Quinlan (quinlan at yggdrasil.com)
-0	belong		0x59a66a95	Sun raster image data
->4	belong		>0		\b, %d x
->8	belong		>0		%d,
->12	belong		>0		%d-bit,
-#>16	belong		>0		%d bytes long,
->20	belong		0		old format,
-#>20	belong		1		standard,
->20	belong		2		compressed,
->20	belong		3		RGB,
->20	belong		4		TIFF,
->20	belong		5		IFF,
->20	belong		0xffff		reserved for testing,
->24	belong		0		no colormap
->24	belong		1		RGB colormap
->24	belong		2		raw colormap
-#>28	belong		>0		colormap is %d bytes long
-
-# SGI image file format, from Daniel Quinlan (quinlan at yggdrasil.com)
-#
-# See
-#	http://reality.sgi.com/grafica/sgiimage.html
-#
-0	beshort		474		SGI image data
-#>2	byte		0		\b, verbatim
->2	byte		1		\b, RLE
-#>3	byte		1		\b, normal precision
->3	byte		2		\b, high precision
->4	beshort		x		\b, %d-D
->6	beshort		x		\b, %d x
->8	beshort		x		%d
->10	beshort		x		\b, %d channel
->10	beshort		!1		\bs
->80	string		>0		\b, "%s"
-
-0	string		IT01		FIT image data
->4	belong		x		\b, %d x
->8	belong		x		%d x
->12	belong		x		%d
-#
-0	string		IT02		FIT image data
->4	belong		x		\b, %d x
->8	belong		x		%d x
->12	belong		x		%d
-#
-2048	string		PCD_IPI		Kodak Photo CD image pack file
->0xe02	byte&0x03	0x00		, landscape mode
->0xe02	byte&0x03	0x01		, portrait mode
->0xe02	byte&0x03	0x02		, landscape mode
->0xe02	byte&0x03	0x03		, portrait mode
-0	string		PCD_OPA		Kodak Photo CD overview pack file
-
-# FITS format.  Jeff Uphoff <juphoff at tarsier.cv.nrao.edu>
-# FITS is the Flexible Image Transport System, the de facto standard for
-# data and image transfer, storage, etc., for the astronomical community.
-# (FITS floating point formats are big-endian.)
-0	string	SIMPLE\ \ =	FITS image data
->109	string	8		\b, 8-bit, character or unsigned binary integer
->108	string	16		\b, 16-bit, two's complement binary integer
->107	string	\ 32		\b, 32-bit, two's complement binary integer
->107	string	-32		\b, 32-bit, floating point, single precision
->107	string	-64		\b, 64-bit, floating point, double precision
-
-# other images
-0	string	This\ is\ a\ BitMap\ file	Lisp Machine bit-array-file
-0	string		!!		Bennet Yee's "face" format
-
-# From SunOS 5.5.1 "/etc/magic" - appeared right before Sun raster image
-# stuff.
-#
-0	beshort		0x1010		PEX Binary Archive
-
-# Visio drawings
-03000	string	Visio\ (TM)\ Drawing	%s
-
-# Tgif files
-0	string	\%TGIF\ x 		Tgif file version %s
-
-# DICOM medical imaging data
-128	string	DICM			DICOM medical imaging data
-
-# XWD - X Window Dump file.
-#   As described in /usr/X11R6/include/X11/XWDFile.h
-#   used by the xwd program.
-#   Bradford Castalia, idaeim, 1/01
-4	belong	7			XWD X Window Dump image data
->100	string	>\0			\b, "%s"
->16	belong	x			\b, %dx
->20	belong	x			\b%dx
->12	belong	x			\b%d
-
-# PDS - Planetary Data System
-#   These files use Parameter Value Language in the header section.
-#   Unfortunately, there is no certain magic, but the following
-#   strings have been found to be most likely.
-0	string	NJPL1I00		PDS (JPL) image data
-2	string	NJPL1I			PDS (JPL) image data
-0	string	CCSD3ZF			PDS (CCSD) image data
-2	string	CCSD3Z			PDS (CCSD) image data
-0	string	PDS_			PDS image data
-0	string	LBLSIZE=		PDS (VICAR) image data
-
-# pM8x: ATARI STAD compressed bitmap format
-#
-# from Oskar Schirmer <schirmer at scara.com> Feb 2, 2001
-# p M 8 5/6 xx yy zz data...
-# Atari ST STAD bitmap is always 640x400, bytewise runlength compressed.
-# bytes either run horizontally (pM85) or vertically (pM86). yy is the
-# most frequent byte, xx and zz are runlength escape codes, where xx is
-# used for runs of yy.
-#
-0	string	pM85		Atari ST STAD bitmap image data (hor)
->5	byte	0x00		(white background)
->5	byte	0xFF		(black background)
-0	string	pM86		Atari ST STAD bitmap image data (vert)
->5	byte	0x00		(white background)
->5	byte	0xFF		(black background)
-
-# XXX:
-# This is bad magic 0x5249 == 'RI' conflicts with RIFF and other
-# magic.
-# SGI RICE image file <mpruett at sgi.com>
-#0	beshort	0x5249		RICE image
-#>2	beshort	x		v%d
-#>4	beshort	x		(%d x
-#>6	beshort	x		%d)
-#>8	beshort	0		8 bit
-#>8	beshort	1		10 bit
-#>8	beshort	2		12 bit
-#>8	beshort	3		13 bit
-#>10	beshort	0		4:2:2
-#>10	beshort	1		4:2:2:4
-#>10	beshort	2		4:4:4
-#>10	beshort	3		4:4:4:4
-#>12	beshort	1		RGB
-#>12	beshort	2		CCIR601
-#>12	beshort	3		RP175
-#>12	beshort	4		YUV
-
-#------------------------------------------------------------------------------
-#
-# Marco Schmidt (marcoschmidt at users.sourceforge.net) -- an image  file format
-# for the EPOC operating system, which is used with PDAs like those from Psion
-#
-# see http://huizen.dds.nl/~frodol/psiconv/html/Index.html for a description
-# of various EPOC file formats
-
-0	string \x37\x00\x00\x10\x42\x00\x00\x10\x00\x00\x00\x00\x39\x64\x39\x47 EPOC MBM image file
-
-# PCX image files
-# From: Dan Fandrich <dan at coneharvesters.com>
-0	beshort		0x0a00	PCX ver. 2.5 image data
-0	beshort		0x0a02	PCX ver. 2.8 image data, with palette
-0	beshort		0x0a03	PCX ver. 2.8 image data, without palette
-0	beshort		0x0a04	PCX for Windows image data
-0	beshort		0x0a05	PCX ver. 3.0 image data
->4	leshort		x      bounding box [%hd,
->6	leshort		x      %hd] -
->8	leshort		x      [%hd,
->10	leshort		x      %hd],
->65	byte		>1	%d planes each of
->3	byte		x	%hhd-bit
->68	byte		0	image,
->68	byte		1	colour,
->68	byte		2	grayscale,
->68	byte		>2	image,
->68	byte		<0	image,
->12	leshort		>0	%hd x
->>14	leshort		x      %hd dpi,
->2	byte		0	uncompressed
->2	byte		1	RLE compressed
-
-# Adobe Photoshop
-0	string		8BPS Adobe Photoshop Image
-
-# XV thumbnail indicator (ThMO)
-0	string		P7\ 332		XV thumbnail image data
-
-# NITF is defined by United States MIL-STD-2500A
-0	string	NITF	National Imagery Transmission Format
->25	string	>\0	dated %.14s
-
-# GEM Image: Version 1, Headerlen 8 (Wolfram Kleff)
-0	belong		0x00010008	GEM Image data
->12	beshort		x		%d x
->14	beshort		x		%d,
->4	beshort		x		%d planes,
->8	beshort		x		%d x
->10	beshort		x		%d pixelsize
-
-# GEM Metafile (Wolfram Kleff)
-0	lelong		0x0018FFFF	GEM Metafile data
->4	leshort		x		version %d
-
-#
-# SMJPEG. A custom Motion JPEG format used by Loki Entertainment
-# Software Torbjorn Andersson <d91tan at Update.UU.SE>.
-#
-0	string	\0\nSMJPEG	SMJPEG
->8	belong	x		%d.x data
-# According to the specification you could find any number of _TXT
-# headers here, but I can't think of any way of handling that. None of
-# the SMJPEG files I tried it on used this feature. Even if such a
-# file is encountered the output should still be reasonable.
->16	string	_SND		\b,
->>24	beshort	>0		%d Hz
->>26	byte	8		8-bit
->>26	byte	16		16-bit
->>28	string	NONE		uncompressed
-# >>28	string	APCM		ADPCM compressed
->>27	byte	1		mono
->>28	byte	2		stereo
-# Help! Isn't there any way to avoid writing this part twice?
->>32	string	_VID		\b,
-# >>>48	string	JFIF		JPEG
->>>40	belong	>0		%d frames
->>>44	beshort	>0		(%d x
->>>46	beshort	>0		%d)
->16	string	_VID		\b,
-# >>32	string	JFIF		JPEG
->>24	belong	>0		%d frames
->>28	beshort	>0		(%d x
->>30	beshort	>0		%d)
-
-0	string	Paint\ Shop\ Pro\ Image\ File	Paint Shop Pro Image File
-
-# "thumbnail file" (icon)
-# descended from "xv", but in use by other applications as well (Wolfram Kleff)
-0       string          P7\ 332         XV "thumbnail file" (icon) data
-
-# taken from fkiss: (<yav at mte.biglobe.ne.jp> ?)
-0       string          KiSS            KISS/GS
->4      byte            16              color
->>5     byte            x               %d bit
->>8     leshort         x               %d colors
->>10    leshort         x               %d groups
->4      byte            32              cell
->>5     byte            x               %d bit
->>8     leshort         x               %d x
->>10    leshort         x               %d
->>12    leshort         x               +%d
->>14    leshort         x               +%d
-
-# Webshots (www.webshots.com), by John Harrison
-0       string          C\253\221g\230\0\0\0 Webshots Desktop .wbz file
-
-# Hercules DASD image files
-# From Jan Jaeger <jj at septa.nl>
-0       string  CKD_P370        Hercules CKD DASD image file
->8      long    x               \b, %d heads per cylinder
->12     long    x               \b, track size %d bytes
->16     byte    x               \b, device type 33%2.2X
-
-0       string  CKD_C370        Hercules compressed CKD DASD image file
->8      long    x               \b, %d heads per cylinder
->12     long    x               \b, track size %d bytes
->16     byte    x               \b, device type 33%2.2X
-
-0       string  CKD_S370        Hercules CKD DASD shadow file
->8      long    x               \b, %d heads per cylinder
->12     long    x               \b, track size %d bytes
->16     byte    x               \b, device type 33%2.2X
-
-# Squeak images and - etoffi at softhome.net
-0 string \146\031\0\0  Squeak image data
-0 string 'From\040Squeak  Squeak program text
-
-# partimage: file(1) magic for PartImage files (experimental, incomplete)
-# Author: Hans-Joachim Baader <hjb at pro-linux.de>
-0		string	PaRtImAgE-VoLuMe	PartImage
->0x0020		string	0.6.1		file version %s
->>0x0060	lelong	>-1		volume %ld
-#>>0x0064 8 byte identifier
-#>>0x007c reserved
->>0x0200	string	>\0		type %s
->>0x1400	string	>\0		device %s,
->>0x1600	string	>\0		original filename %s,
-# Some fields omitted
->>0x2744	lelong	0		not compressed
->>0x2744	lelong	1		gzip compressed
->>0x2744	lelong	2		bzip2 compressed
->>0x2744	lelong	>2		compressed with unknown algorithm
->0x0020		string	>0.6.1		file version %s
->0x0020		string	<0.6.1		file version %s
-
-# DCX is multi-page PCX, using a simple header of up to 1024
-# offsets for the respective PCX components.
-# From: Joerg Wunsch <joerg_wunsch at uriah.heep.sax.de>
-0	lelong	987654321	DCX multi-page PCX image data
-
-# Simon Walton <simonw at matteworld.com>
-# Kodak Cineon format for scanned negatives
-# http://www.kodak.com/US/en/motion/support/dlad/
-0	lelong  0xd75f2a80	Cineon image data
->200	belong  >0		\b, %ld x
->204	belong  >0		%ld
-
-# From Jan "Yenya" Kasprzak <kas at fi.muni.cz>
-# The description of *.mrw format can be found at
-# http://www.dalibor.cz/minolta/raw_file_format.htm
-0	string	\000MRM			Minolta Dimage camera raw image data
-
-# From: stephane.loeuillet at tiscali.f
-# http://www.djvuzone.org/
-0	string	AT&TFORM		DjVu Image file
-
-# From: Jason Bacon <bacon at smithers.neuro.mcw.edu>
-0	beshort	0x3020			character Computer Graphics Metafile
-
-
-#------------------------------------------------------------------------------
-# intel:  file(1) magic for x86 Unix
-#
-# Various flavors of x86 UNIX executable/object (other than Xenix, which
-# is in "microsoft").  DOS is in "msdos"; the ambitious soul can do
-# Windows as well.
-#
-# Windows NT belongs elsewhere, as you need x86 and MIPS and Alpha and
-# whatever comes next (HP-PA Hummingbird?).  OS/2 may also go elsewhere
-# as well, if, as, and when IBM makes it portable.
-#
-# The `versions' should be un-commented if they work for you.
-# (Was the problem just one of endianness?)
-#
-0	leshort		0502		basic-16 executable
->12	lelong		>0		not stripped
-#>22	leshort		>0		- version %ld
-0	leshort		0503		basic-16 executable (TV)
->12	lelong		>0		not stripped
-#>22	leshort		>0		- version %ld
-0	leshort		0510		x86 executable
->12	lelong		>0		not stripped
-0	leshort		0511		x86 executable (TV)
->12	lelong		>0		not stripped
-0	leshort		=0512		iAPX 286 executable small model (COFF)
->12	lelong		>0		not stripped
-#>22	leshort		>0		- version %ld
-0	leshort		=0522		iAPX 286 executable large model (COFF)
->12	lelong		>0		not stripped
-#>22	leshort		>0		- version %ld
-# SGI labeled the next entry as "iAPX 386 executable" --Dan Quinlan
-0	leshort		=0514		80386 COFF executable
->12	lelong		>0		not stripped
->22	leshort		>0		- version %ld
-
-# rom: file(1) magic for BIOS ROM Extensions found in intel machines
-#      mapped into memory between 0xC0000 and 0xFFFFF
-# From Gürkan Sengün <gurkan at linuks.mine.nu>, www.linuks.mine.nu
-0        beshort         0x55AA       BIOS (ia32) ROM Ext.
->5       string          USB          USB
->7       string          LDR          UNDI image
->30      string          IBM          IBM comp. Video
->26      string          Adaptec      Adaptec
->28      string          Adaptec      Adaptec
->42      string          PROMISE      Promise
->2       byte            x            (%d*512)
-
-#------------------------------------------------------------------------------
-# interleaf:  file(1) magic for InterLeaf TPS:
-#
-0	string		=\210OPS	Interleaf saved data
-0	string		=<!OPS		Interleaf document text
->5	string		,\ Version\ =	\b, version
->>17	string		>\0		%.3s
-
-#------------------------------------------------------------------------------
-# island:  file(1) magic for IslandWite/IslandDraw, from SunOS 5.5.1
-# "/etc/magic":
-# From: guy at netapp.com (Guy Harris)
-#
-4	string		pgscriptver	IslandWrite document
-13	string		DrawFile	IslandDraw document
-
-
-#------------------------------------------------------------------------------
-# ispell:  file(1) magic for ispell
-#
-# Ispell 3.0 has a magic of 0x9601 and ispell 3.1 has 0x9602.  This magic
-# will match 0x9600 through 0x9603 in *both* little endian and big endian.
-# (No other current magic entries collide.)
-#
-# Updated by Daniel Quinlan (quinlan at yggdrasil.com)
-#
-0	leshort&0xFFFC	0x9600		little endian ispell
->0	byte		0		hash file (?),
->0	byte		1		3.0 hash file,
->0	byte		2		3.1 hash file,
->0	byte		3		hash file (?),
->2	leshort		0x00		8-bit, no capitalization, 26 flags
->2	leshort		0x01		7-bit, no capitalization, 26 flags
->2	leshort		0x02		8-bit, capitalization, 26 flags
->2	leshort		0x03		7-bit, capitalization, 26 flags
->2	leshort		0x04		8-bit, no capitalization, 52 flags
->2	leshort		0x05		7-bit, no capitalization, 52 flags
->2	leshort		0x06		8-bit, capitalization, 52 flags
->2	leshort		0x07		7-bit, capitalization, 52 flags
->2	leshort		0x08		8-bit, no capitalization, 128 flags
->2	leshort		0x09		7-bit, no capitalization, 128 flags
->2	leshort		0x0A		8-bit, capitalization, 128 flags
->2	leshort		0x0B		7-bit, capitalization, 128 flags
->2	leshort		0x0C		8-bit, no capitalization, 256 flags
->2	leshort		0x0D		7-bit, no capitalization, 256 flags
->2	leshort		0x0E		8-bit, capitalization, 256 flags
->2	leshort		0x0F		7-bit, capitalization, 256 flags
->4	leshort		>0		and %d string characters
-0	beshort&0xFFFC	0x9600		big endian ispell
->1	byte		0		hash file (?),
->1	byte		1		3.0 hash file,
->1	byte		2		3.1 hash file,
->1	byte		3		hash file (?),
->2	beshort		0x00		8-bit, no capitalization, 26 flags
->2	beshort		0x01		7-bit, no capitalization, 26 flags
->2	beshort		0x02		8-bit, capitalization, 26 flags
->2	beshort		0x03		7-bit, capitalization, 26 flags
->2	beshort		0x04		8-bit, no capitalization, 52 flags
->2	beshort		0x05		7-bit, no capitalization, 52 flags
->2	beshort		0x06		8-bit, capitalization, 52 flags
->2	beshort		0x07		7-bit, capitalization, 52 flags
->2	beshort		0x08		8-bit, no capitalization, 128 flags
->2	beshort		0x09		7-bit, no capitalization, 128 flags
->2	beshort		0x0A		8-bit, capitalization, 128 flags
->2	beshort		0x0B		7-bit, capitalization, 128 flags
->2	beshort		0x0C		8-bit, no capitalization, 256 flags
->2	beshort		0x0D		7-bit, no capitalization, 256 flags
->2	beshort		0x0E		8-bit, capitalization, 256 flags
->2	beshort		0x0F		7-bit, capitalization, 256 flags
->4	beshort		>0		and %d string characters
-# ispell 4.0 hash files  kromJx <kromJx at crosswinds.net>
-# Ispell 4.0
-0       string          ISPL            ispell
->4      long            x               hash file version %d,
->8      long            x               lexletters %d,
->12     long            x               lexsize %d,
->16     long            x               hashsize %d,
->20     long            x               stblsize %d
-#------------------------------------------------------------
-# Java ByteCode
-# From Larry Schwimmer (schwim at cs.stanford.edu)
-0	belong		0xcafebabe	compiled Java class data,
->6	beshort x	version %d.
->4	beshort x	\b%d
-#------------------------------------------------------------
-# Java serialization
-# From Martin Pool (m.pool at pharos.com.au)
-0	beshort		0xaced		Java serialization data
->2	beshort		>0x0004		\b, version %d
-
-#------------------------------------------------------------------------------
-# JPEG images
-# SunOS 5.5.1 had
-#
-#	0	string		\377\330\377\340	JPEG file
-#	0	string		\377\330\377\356	JPG file
-#
-# both of which turn into "JPEG image data" here.
-#
-0	beshort		0xffd8		JPEG image data
->6	string		JFIF		\b, JFIF standard
->6	string		Exif		\b, EXIF standard
-# The following added by Erik Rossen <rossen at freesurf.ch> 1999-09-06
-# in a vain attempt to add image size reporting for JFIF.  Note that these
-# tests are not fool-proof since some perfectly valid JPEGs are currently
-# impossible to specify in magic(4) format.
-# First, a little JFIF version info:
->11	byte		x		\b %d.
->12	byte		x		\b%02d
-# Next, the resolution or aspect ratio of the image:
-#>13	byte		0		\b, aspect ratio
-#>13	byte		1		\b, resolution (DPI)
-#>13	byte		2		\b, resolution (DPCM)
-#>4	beshort		x		\b, segment length %d
-# Next, show thumbnail info, if it exists:
->18	byte		!0		\b, thumbnail %dx
->>19	byte		x		\b%d
-# Here things get sticky.  We can do ONE MORE marker segment with
-# indirect addressing, and that's all.  It would be great if we could
-# do pointer arithemetic like in an assembler language.  Christos?
-# And if there was some sort of looping construct to do searches, plus a few
-# named accumulators, it would be even more effective...
-# At least we can show a comment if no other segments got inserted before:
->(4.S+5)	byte		0xFE
->>(4.S+8)	string		>\0		\b, "%s"
-#>(4.S+5)	byte		0xFE		\b, comment
-#>>(4.S+6)	beshort		x		\b length=%d
-#>>(4.S+8)	string		>\0		\b, "%s"
-# Or, we can show the encoding type (I've included only the three most common)
-# and image dimensions if we are lucky and the SOFn (image segment) is here:
->(4.S+5)	byte		0xC0		\b, baseline
->>(4.S+6)	byte		x		\b, precision %d
->>(4.S+7)	beshort		x		\b, %dx
->>(4.S+9)	beshort		x		\b%d
->(4.S+5)	byte		0xC1		\b, extended sequential
->>(4.S+6)	byte		x		\b, precision %d
->>(4.S+7)	beshort		x		\b, %dx
->>(4.S+9)	beshort		x		\b%d
->(4.S+5)	byte		0xC2		\b, progressive
->>(4.S+6)	byte		x		\b, precision %d
->>(4.S+7)	beshort		x		\b, %dx
->>(4.S+9)	beshort		x		\b%d
-# I've commented-out quantisation table reporting.  I doubt anyone cares yet.
-#>(4.S+5)	byte		0xDB		\b, quantisation table
-#>>(4.S+6)	beshort		x		\b length=%d
-#>14	beshort		x		\b, %d x
-#>16	beshort		x		\b %d
-
-# HSI is Handmade Software's proprietary JPEG encoding scheme
-0	string		hsi1		JPEG image data, HSI proprietary
-
-# From: David Santinoli <david at santinoli.com>
-0	string		\x00\x00\x00\x0C\x6A\x50\x20\x20\x0D\x0A\x87\x0A	JPEG 2000 image data
-
-#------------------------------------------------------------------------------
-# karma:  file(1) magic for Karma data files
-#
-# From <rgooch at atnf.csiro.au>
-
-0	string		KarmaRHD Version	Karma Data Structure Version
->16	belong		x		%lu
-#------------------------------------------------------------------------------
-# DEC SRC Virtual Paper: Lectern files
-# Karl M. Hegbloom <karlheg at inetarena.com>
-0	string	lect	DEC SRC Virtual Paper Lectern file
-
-#------------------------------------------------------------------------------
-# lex:  file(1) magic for lex
-#
-#	derived empirically, your offsets may vary!
-53	string		yyprevious	C program text (from lex)
->3	string		>\0		 for %s
-# C program text from GNU flex, from Daniel Quinlan <quinlan at yggdrasil.com>
-21	string		generated\ by\ flex	C program text (from flex)
-# lex description file, from Daniel Quinlan <quinlan at yggdrasil.com>
-0	string		%{		lex description text
-
-#------------------------------------------------------------------------------
-# lif:  file(1) magic for lif
-#
-# (Daniel Quinlan <quinlan at yggdrasil.com>)
-#
-0	beshort		0x8000		lif file
-
-#------------------------------------------------------------------------------
-# linux:  file(1) magic for Linux files
-#
-# Values for Linux/i386 binaries, from Daniel Quinlan <quinlan at yggdrasil.com>
-# The following basic Linux magic is useful for reference, but using
-# "long" magic is a better practice in order to avoid collisions.
-#
-# 2	leshort		100		Linux/i386
-# >0	leshort		0407		impure executable (OMAGIC)
-# >0	leshort		0410		pure executable (NMAGIC)
-# >0	leshort		0413		demand-paged executable (ZMAGIC)
-# >0	leshort		0314		demand-paged executable (QMAGIC)
-#
-0	lelong		0x00640107	Linux/i386 impure executable (OMAGIC)
->16	lelong		0		\b, stripped
-0	lelong		0x00640108	Linux/i386 pure executable (NMAGIC)
->16	lelong		0		\b, stripped
-0	lelong		0x0064010b	Linux/i386 demand-paged executable (ZMAGIC)
->16	lelong		0		\b, stripped
-0	lelong		0x006400cc	Linux/i386 demand-paged executable (QMAGIC)
->16	lelong		0		\b, stripped
-#
-0	string		\007\001\000	Linux/i386 object file
->20	lelong		>0x1020		\b, DLL library
-# Linux-8086 stuff:
-0	string		\01\03\020\04	Linux-8086 impure executable
->28	long		!0		not stripped
-0	string		\01\03\040\04	Linux-8086 executable
->28	long		!0		not stripped
-#
-0	string		\243\206\001\0	Linux-8086 object file
-#
-0	string		\01\03\020\20	Minix-386 impure executable
->28	long		!0		not stripped
-0	string		\01\03\040\20	Minix-386 executable
->28	long		!0		not stripped
-# core dump file, from Bill Reynolds <bill at goshawk.lanl.gov>
-216	lelong		0421		Linux/i386 core file
->220	string		>\0		of '%s'
->200	lelong		>0		(signal %d)
-#
-# LILO boot/chain loaders, from Daniel Quinlan <quinlan at yggdrasil.com>
-# this can be overridden by the DOS executable (COM) entry
-2	string		LILO		Linux/i386 LILO boot/chain loader
-#
-# PSF fonts, from H. Peter Anvin <hpa at yggdrasil.com>
-0	leshort		0x0436		Linux/i386 PC Screen Font data,
->2	byte		0		256 characters, no directory,
->2	byte		1		512 characters, no directory,
->2	byte		2		256 characters, Unicode directory,
->2	byte		3		512 characters, Unicode directory,
->3	byte		>0		8x%d
-# Linux swap file, from Daniel Quinlan <quinlan at yggdrasil.com>
-4086	string		SWAP-SPACE	Linux/i386 swap file
-# according to man page of mkswap (8) March 1999
-4086	string		SWAPSPACE2	Linux/i386 swap file (new style)
->0x400	long		x		%d (4K pages)
->0x404	long		x		size %d pages
-# ECOFF magic for OSF/1 and Linux (only tested under Linux though)
-#
-#	from Erik Troan (ewt at redhat.com) examining od dumps, so this
-#		could be wrong
-#      updated by David Mosberger (davidm at azstarnet.com) based on
-#      GNU BFD and MIPS info found below.
-#
-0	leshort		0x0183		ECOFF alpha
->24	leshort		0407		executable
->24	leshort		0410		pure
->24	leshort		0413		demand paged
->8	long		>0		not stripped
->8	long		0		stripped
->23	leshort		>0		- version %ld.
-#
-# Linux kernel boot images, from Albert Cahalan <acahalan at cs.uml.edu>
-# and others such as Axel Kohlmeyer <akohlmey at rincewind.chemie.uni-ulm.de>
-# and Nicol�s Lichtmaier <nick at debian.org>
-# All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
-# Linux kernel boot images (i386 arch) (Wolfram Kleff)
-#514	string		HdrS		Linux kernel
-#>510	leshort		0xAA55		x86 boot executable
-#>>518	leshort		>=3D0x200
-#>>529	byte		0		zImage,
-#>>>529	byte		1		bzImage,
-#>>>(526.s+0x200) string	>\0		version %s,
-#>>498	leshort		1		RO-rootFS,
-#>>498	leshort		0		RW-rootFS,
-#>>508	leshort		>0		root_dev 0x%X,
-#>>502	leshort		>0		swap_dev 0x%X,
-#>>504	leshort		>0		RAMdisksize %u KB,
-#>>506	leshort		0xFFFF		Normal VGA
-#>>506	leshort		0xFFFE		Extended VGA
-#>>506	leshort		0xFFFD		Prompt for Videomode
-#>>506	leshort		>0		Video mode %d
-# This also matches new kernels, which were caught above by "HdrS".
-#0		belong	0xb8c0078e	Linux kernel
-#>0x1e3		string	Loading		version 1.3.79 or older
-#>0x1e9		string	Loading		from prehistoric times
-
-# System.map files - Nicol�s Lichtmaier <nick at debian.org>
-8	string	\ A\ _text	Linux kernel symbol map text
-
-# LSM entries - Nicol�s Lichtmaier <nick at debian.org>
-0	string	Begin3	Linux Software Map entry text
-0	string	Begin4	Linux Software Map entry text (new format)
-
-# From Matt Zimmerman
-0       belong  0x4f4f4f4d      User-mode Linux COW file
->4      belong  x               \b, version %d
->8      string  >\0             \b, backing file %s
-
-############################################################################
-# Linux kernel versions
-
-0		string		\xb8\xc0\x07\x8e\xd8\xb8\x00\x90	Linux
->497		leshort		0		x86 boot sector
->>514		belong		0x8e	of a kernel from the dawn of time!
->>514		belong		0x908ed8b4	version 0.99-1.1.42
->>514		belong		0x908ed8b8	for memtest86
-
->497		leshort		!0		x86 kernel
->>504		leshort		>0		RAMdisksize=%u KB
->>502		leshort		>0		swap=0x%X
->>508		leshort		>0		root=0x%X
->>>498		leshort		1		\b-ro
->>>498		leshort		0		\b-rw
->>506		leshort		0xFFFF		vga=normal
->>506		leshort		0xFFFE		vga=extended
->>506		leshort		0xFFFD		vga=ask
->>506		leshort		>0		vga=%d
->>514		belong		0x908ed881	version 1.1.43-1.1.45
->>514		belong		0x15b281cd
->>>0xa8e	belong		0x55AA5a5a	version 1.1.46-1.2.13,1.3.0
->>>0xa99	belong		0x55AA5a5a	version 1.3.1,2
->>>0xaa3	belong		0x55AA5a5a	version 1.3.3-1.3.30
->>>0xaa6	belong		0x55AA5a5a	version 1.3.31-1.3.41
->>>0xb2b	belong		0x55AA5a5a	version 1.3.42-1.3.45
->>>0xaf7	belong		0x55AA5a5a	version 1.3.46-1.3.72
->>514		string		HdrS
->>>518		leshort		>0x1FF
->>>>529		byte		0		\b, zImage
->>>>529		byte		1		\b, bzImage
->>>>(526.s+0x200) string 	>\0		\b, version %s
-
-# Linux boot sector thefts.
-0		belong		0xb8c0078e	Linux
->0x1e6		belong		0x454c4b53	ELKS Kernel
->0x1e6		belong		!0x454c4b53	style boot sector
-
-############################################################################
-# Linux 8086 executable
-0	lelong&0xFF0000FF 0xC30000E9	Linux-Dev86 executable, headerless
->5	string		.		
->>4	string		>\0		\b, libc version %s
-
-0	lelong&0xFF00FFFF 0x4000301	Linux-8086 executable
->2	byte&0x01	!0		\b, unmapped zero page
->2	byte&0x20	0		\b, impure
->2	byte&0x20	!0
->>2	byte&0x10	!0		\b, A_EXEC
->2	byte&0x02	!0		\b, A_PAL
->2	byte&0x04	!0		\b, A_NSYM
->2	byte&0x08	!0		\b, A_STAND
->2	byte&0x40	!0		\b, A_PURE
->2	byte&0x80	!0		\b, A_TOVLY
->28     long            !0              \b, not stripped
->37	string		.		
->>36	string		>\0		\b, libc version %s
-
-# 0	lelong&0xFF00FFFF 0x10000301	ld86 I80386 executable
-# 0	lelong&0xFF00FFFF 0xB000301	ld86 M68K executable
-# 0	lelong&0xFF00FFFF 0xC000301	ld86 NS16K executable
-# 0	lelong&0xFF00FFFF 0x17000301	ld86 SPARC executable
-
-
-#------------------------------------------------------------------------------
-# lisp:  file(1) magic for lisp programs
-#
-# various lisp types, from Daniel Quinlan (quinlan at yggdrasil.com)
-
-# This is a guess, but a good one.
-0	string	;;			Lisp/Scheme program text
-
-# Emacs 18 - this is always correct, but not very magical.
-0	string	\012(			Emacs v18 byte-compiled Lisp data
-# Emacs 19+ - ver. recognition added by Ian Springer
-# Also applies to XEmacs 19+ .elc files; could tell them apart if we had regexp
-# support or similar - Chris Chittleborough <cchittleborough at yahoo.com.au>
-0	string	;ELC			
->4	byte	>19			
->4	byte    <32			Emacs/XEmacs v%d byte-compiled Lisp data
-
-# Files produced by CLISP Common Lisp From: Bruno Haible <haible at ilog.fr>
-0	string	(SYSTEM::VERSION\040'	CLISP byte-compiled Lisp program text
-0	long	0x70768BD2		CLISP memory image data
-0	long	0xD28B7670		CLISP memory image data, other endian
-
-# Files produced by GNU gettext
-0	long	0xDE120495		GNU-format message catalog data
-0	long	0x950412DE		GNU-format message catalog data
-
-#.com and .bin for MIT scheme 
-0	string	\372\372\372\372	MIT scheme (library?)
-
-# From: David Allouche <david at allouche.net>
-0	string	\<TeXmacs|	TeXmacs document text
-#------------------------------------------------------------------------------
-# mach file description
-#
-0	belong		0xcafebabe	Mach-O fat file
->4	belong		1		with 1 architecture
->4	belong		>1
->>4	belong		x		with %ld architectures		
-#
-0	belong		0xfeedface	Mach-O
->12	belong		1		object
->12	belong		2		executable
->12	belong		3		shared library
->12	belong		4		core
->12	belong		5		preload executable
->12	belong		6               dynamically linked shared library
->12	belong		7               dynamic linker
->12	belong		8		bundle
->12	belong		>8
->>12	belong		x		filetype=%ld
->4	belong		<0
->>4	belong		x		architecture=%ld
->4	belong		1		vax
->4	belong		2		romp
->4	belong		3		architecture=3
->4	belong		4		ns32032
->4	belong		5		ns32332
->4	belong		6		for m68k architecture
-# from NeXTstep 3.0 <mach/machine.h>
-# i.e. mc680x0_all, ignore
-# >>8	belong		1		(mc68030)
->>8	belong		2		(mc68040)
->>8	belong		3		(mc68030 only)
->4	belong		7		i386
->4	belong		8		mips
->4	belong		9		ns32532
->4	belong		10		architecture=10
->4	belong		11		hp pa-risc
->4	belong		12		acorn
->4	belong		13		m88k
->4	belong		14		SPARC
->4	belong		15		i860-big
->4	belong		16		i860
->4	belong		17		rs6000
->4	belong		18		ppc
->4	belong		>18
->>4	belong		x		architecture=%ld
-
-#------------------------------------------------------------------------------
-# magic:  file(1) magic for magic files
-#
-0	string		#\ Magic	magic text file for file(1) cmd
-0	lelong		0xF11E041C	magic binary file for file(1) cmd
->4	lelong		x		(version %d) (little endian)
-0	belong		0xF11E041C	magic binary file for file(1) cmd
->4	belong		x		(version %d) (big endian)
-
-#------------------------------------------------------------------------------
-# mail.news:  file(1) magic for mail and news
-#
-# Unfortunately, saved netnews also has From line added in some news software.
-#0	string		From 		mail text
-# There are tests to ascmagic.c to cope with mail and news.
-0	string		Relay-Version: 	old news text
-0	string		#!\ rnews	batched news text
-0	string		N#!\ rnews	mailed, batched news text
-0	string		Forward\ to 	mail forwarding text
-0	string		Pipe\ to 	mail piping text
-0	string		Return-Path:	smtp mail text
-0	string		Path:		news text
-0	string		Xref:		news text
-0	string		From:		news or mail text
-0	string		Article 	saved news text
-0	string		BABYL		Emacs RMAIL text
-0	string		Received:	RFC 822 mail text
-0	string		MIME-Version:	MIME entity text
-#0	string		Content-	MIME entity text
-
-# TNEF files...
-0	lelong		0x223E9F78	Transport Neutral Encapsulation Format
-
-# From: Kevin Sullivan <ksulliva at psc.edu>
-0	string		*mbx*		MBX mail folder
-
-# From: Simon Matter <simon.matter at invoca.ch>
-0	string		\241\002\213\015skiplist\ file\0\0\0	Cyrus skiplist DB
-
-# JAM(mbp) Fidonet message area databases
-# JHR file
-0	string	JAM\0			JAM message area header file
->12	leshort >0			(%d messages)
-
-# Squish Fidonet message area databases
-# SQD file (requires at least one message in the area)
-256	leshort	0xAFAE4453		Squish message area data file
->4	leshort	>0			(%d messages)
-
-#------------------------------------------------------------------------------
-# maple:  file(1) magic for maple files
-# "H. Nanosecond" <aldomel at ix.netcom.com>
-# Maple V release 4, a multi-purpose math program
-#
-
-# maple library .lib
-0	string	\000MVR4\nI	MapleVr4 library
-
-# .ind
-# no magic for these :-(
-# they are compiled indexes for maple files
-
-# .hdb 
-0	string	\000\004\000\000	Maple help database
-
-# .mhp
-# this has the form <PACKAGE=name>
-0	string	\<PACKAGE=	Maple help file
-0	string	\<HELP\ NAME=	Maple help file
-0	string	\n\<HELP\ NAME=	Maple help file with extra carriage return at start (yuck)
-#0	string	#\ Newton	Maple help file, old style
-0	string	#\ daub	Maple help file, old style
-#0	string	#===========	Maple help file, old style
-
-# .mws
-0	string	\000\000\001\044\000\221	Maple worksheet
-#this is anomalous
-0	string	WriteNow\000\002\000\001\000\000\000\000\100\000\000\000\000\000	Maple worksheet, but weird
-# this has the form {VERSION 2 3 "IBM INTEL NT" "2.3" }\n
-# that is {VERSION major_version miunor_version computer_type version_string}
-0	string	{VERSION\ 	Maple worksheet
->9	string	>\0	version %.1s.
->>10	string
->>>11	string	>\0	%.1s
-
-# .mps
-0	string	\0\0\001$	Maple something
-# from byte 4 it is either 'nul E' or 'soh R'
-# I think 'nul E' means a file that was saved as  a different name
-# a sort of revision marking
-# 'soh R' means new 
->4	string	\000\105	An old revision
->4	string	\001\122	The latest save
-
-# .mpl
-# some of these are the same as .mps above
-#0000000 000 000 001 044 000 105 same as .mps
-#0000000 000 000 001 044 001 122 same as .mps
-
-0	string	#\n##\ <SHAREFILE=	Maple something
-0	string	\n#\n##\ <SHAREFILE=	Maple something
-0	string	##\ <SHAREFILE=	Maple something
-0	string	#\r##\ <SHAREFILE=	Maple something
-0	string	\r#\r##\ <SHAREFILE=	Maple something
-0	string	#\ \r##\ <DESCRIBE>	Maple something anomalous.
-
-#------------------------------------------------------------------------------
-# mathematica:  file(1) magic for mathematica files
-# "H. Nanosecond" <aldomel at ix.netcom.com>
-# Mathematica a multi-purpose math program
-# versions 2.2 and 3.0
-
-#mathematica .mb
-0	string	\064\024\012\000\035\000\000\000	Mathematica version 2 notebook
-0	string	\064\024\011\000\035\000\000\000	Mathematica version 2 notebook
-
-# .ma
-# multiple possibilites:
-
-0	string	(*^\n\n::[\011frontEndVersion\ =\ 	Mathematica notebook
-#>41	string	>\0	%s
-
-#0	string	(*^\n\n::[\011palette	Mathematica notebook version 2.x
-
-#0	string	(*^\n\n::[\011Information	Mathematica notebook version 2.x
-#>675	string	>\0	%s #doesn't work well
-
-# there may be 'cr' instread of 'nl' in some does this matter?
-
-# generic:
-0	string	(*^\r\r::[\011	Mathematica notebook version 2.x
-0	string	\(\*\^\r\n\r\n\:\:\[\011	Mathematica notebook version 2.x
-0	string	(*^\015			Mathematica notebook version 2.x
-0	string	(*^\n\r\n\r::[\011	Mathematica notebook version 2.x
-0	string	(*^\r::[\011	Mathematica notebook version 2.x
-0	string	(*^\r\n::[\011	Mathematica notebook version 2.x
-0	string	(*^\n\n::[\011	Mathematica notebook version 2.x
-0	string	(*^\n::[\011	Mathematica notebook version 2.x
-
-
-# Mathematica .mx files
-
-#0	string	(*This\ is\ a\ Mathematica\ binary\ dump\ file.\ It\ can\ be\ loaded\ with\ Get.*)	Mathematica binary file
-0	string	(*This\ is\ a\ Mathematica\ binary\ 	Mathematica binary file
-#>71	string \000\010\010\010\010\000\000\000\000\000\000\010\100\010\000\000\000	
-# >71... is optional
->88	string	>\0	from %s
-
-
-# Mathematica files PBF:
-# 115 115 101 120 102 106 000 001 000 000 000 203 000 001 000
-0	string	MMAPBF\000\001\000\000\000\203\000\001\000	Mathematica PBF (fonts I think)
-
-# .ml files  These are menu resources I think
-# these start with "[0-9][0-9][0-9]\ A~[0-9][0-9][0-9]\ 
-# how to put that into a magic rule?
-4	string	\ A~	MAthematica .ml file
-
-# .nb files
-#too long 0	string	(***********************************************************************\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Mathematica-Compatible Notebook	Mathematica 3.0 notebook
-0	string	(***********************	Mathematica 3.0 notebook
-
-# other (* matches it is a comment start in these langs
-0	string	(*	Mathematica, or Pascal,  Modula-2 or 3 code text
-
-#########################
-# MatLab v5
-0       string  MATLAB  Matlab v5 mat-file
->126    short   0x494d  (big endian)
->>124   beshort x       version 0x%04x
->126    short   0x4d49  (little endian)
->>124   leshort x       version 0x%04x
-
-#------------------------------------------------------------------------------
-# Mavroyanopoulos Nikos <nmav at hellug.gr>
-# mcrypt:   file(1) magic for mcrypt 2.2.x;
-0	string		\0m\3		mcrypt 2.5 encrypted data,
->4	string		>\0		algorithm: %s,
->>&1	leshort		>0		keysize: %d bytes,
->>>&0	string		>\0		mode: %s,
-
-0	string		\0m\2		mcrypt 2.2 encrypted data,
->3	byte		0		algorithm: blowfish-448,
->3	byte		1		algorithm: DES,
->3	byte		2		algorithm: 3DES,
->3	byte		3		algorithm: 3-WAY,
->3	byte		4		algorithm: GOST,
->3	byte		6		algorithm: SAFER-SK64,
->3	byte		7		algorithm: SAFER-SK128,
->3	byte		8		algorithm: CAST-128,
->3	byte		9		algorithm: xTEA,
->3	byte		10		algorithm: TWOFISH-128,
->3	byte		11		algorithm: RC2,
->3	byte		12		algorithm: TWOFISH-192,
->3	byte		13		algorithm: TWOFISH-256,
->3	byte		14		algorithm: blowfish-128,
->3	byte		15		algorithm: blowfish-192,
->3	byte		16		algorithm: blowfish-256,
->3	byte		100		algorithm: RC6,
->3	byte		101		algorithm: IDEA,
->4	byte		0		mode: CBC,
->4	byte		1		mode: ECB,
->4	byte		2		mode: CFB,
->4	byte		3		mode: OFB,
->4	byte		4		mode: nOFB,
->5	byte		0		keymode: 8bit
->5	byte		1		keymode: 4bit
->5	byte		2		keymode: SHA-1 hash
->5	byte		3		keymode: MD5 hash
-#------------------------------------------------------------------------------
-# mime:  file(1) magic for MIME encoded files
-#
-0	string		Content-Type:\
->14	string		>\0		%s
-0	string		Content-Type:
->13	string		>\0		%s
-
-#------------------------------------------------------------------------------
-# mips:  file(1) magic for Silicon Graphics (MIPS, IRIS, IRIX, etc.)
-#                         Dec Ultrix (MIPS)
-# all of SGI's *current* machines and OSes run in big-endian mode on the
-# MIPS machines, as far as I know.
-#
-# XXX - what is the blank "-" line?
-#
-# kbd file definitions
-0	string	kbd!map		kbd map file
->8	byte	>0		Ver %d:
->10	short	>0		with %d table(s)
-0	belong	0407		old SGI 68020 executable
-0	belong	0410		old SGI 68020 pure executable
-0	beshort	0x8765		disk quotas file
-0	beshort	0x0506		IRIS Showcase file
->2	byte	0x49		-
->3	byte	x		- version %ld
-0	beshort	0x0226		IRIS Showcase template
->2	byte	0x63		-
->3	byte	x		- version %ld
-0	belong	0x5343464d	IRIS Showcase file
->4	byte	x		- version %ld
-0	belong	0x5443464d	IRIS Showcase template
->4	byte	x		- version %ld
-0	belong	0xdeadbabe	IRIX Parallel Arena
->8	belong	>0		- version %ld
-#
-0	beshort	0x0160		MIPSEB ECOFF executable
->20	beshort	0407		(impure)
->20	beshort	0410		(swapped)
->20	beshort	0413		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->22	byte	x		- version %ld
->23	byte	x		.%ld
-#
-0	beshort	0x0162		MIPSEL-BE ECOFF executable
->20	beshort	0407		(impure)
->20	beshort	0410		(swapped)
->20	beshort	0413		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->23	byte	x		- version %d
->22	byte	x		.%ld
-#
-0	beshort	0x6001		MIPSEB-LE ECOFF executable
->20	beshort	03401		(impure)
->20	beshort	04001		(swapped)
->20	beshort	05401		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->23	byte	x		- version %d
->22	byte	x		.%ld
-#
-0	beshort	0x6201		MIPSEL ECOFF executable
->20	beshort	03401		(impure)
->20	beshort	04001		(swapped)
->20	beshort	05401		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->23	byte	x		- version %ld
->22	byte	x		.%ld
-#
-# MIPS 2 additions
-#
-0	beshort	0x0163		MIPSEB MIPS-II ECOFF executable
->20	beshort	0407		(impure)
->20	beshort	0410		(swapped)
->20	beshort	0413		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->22	byte	x		- version %ld
->23	byte	x		.%ld
-#
-0	beshort	0x0166		MIPSEL-BE MIPS-II ECOFF executable
->20	beshort	0407		(impure)
->20	beshort	0410		(swapped)
->20	beshort	0413		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->22	byte	x		- version %ld
->23	byte	x		.%ld
-#
-0	beshort	0x6301		MIPSEB-LE MIPS-II ECOFF executable
->20	beshort	03401		(impure)
->20	beshort	04001		(swapped)
->20	beshort	05401		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->23	byte	x		- version %ld
->22	byte	x		.%ld
-#
-0	beshort	0x6601		MIPSEL MIPS-II ECOFF executable
->20	beshort	03401		(impure)
->20	beshort	04001		(swapped)
->20	beshort	05401		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->23	byte	x		- version %ld
->22	byte	x		.%ld
-#
-# MIPS 3 additions
-#
-0	beshort	0x0140		MIPSEB MIPS-III ECOFF executable
->20	beshort	0407		(impure)
->20	beshort	0410		(swapped)
->20	beshort	0413		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->22	byte	x		- version %ld
->23	byte	x		.%ld
-#
-0	beshort	0x0142		MIPSEL-BE MIPS-III ECOFF executable
->20	beshort	0407		(impure)
->20	beshort	0410		(swapped)
->20	beshort	0413		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->22	byte	x		- version %ld
->23	byte	x		.%ld
-#
-0	beshort	0x4001		MIPSEB-LE MIPS-III ECOFF executable
->20	beshort	03401		(impure)
->20	beshort	04001		(swapped)
->20	beshort	05401		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->23	byte	x		- version %ld
->22	byte	x		.%ld
-#
-0	beshort	0x4201		MIPSEL MIPS-III ECOFF executable
->20	beshort	03401		(impure)
->20	beshort	04001		(swapped)
->20	beshort	05401		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->23	byte	x		- version %ld
->22	byte	x		.%ld
-#
-0	beshort	0x180		MIPSEB Ucode
-0	beshort	0x182		MIPSEL-BE Ucode
-# 32bit core file
-0	belong	0xdeadadb0	IRIX core dump
->4	belong	1		of
->16	string	>\0		'%s'
-# 64bit core file
-0	belong	0xdeadad40	IRIX 64-bit core dump
->4	belong	1		of
->16	string	>\0		'%s'
-# N32bit core file
-0       belong	0xbabec0bb	IRIX N32 core dump
->4      belong	1               of
->16     string	>\0             '%s'
-# New style crash dump file
-0	string	\x43\x72\x73\x68\x44\x75\x6d\x70	IRIX vmcore dump of
->36	string	>\0					'%s'
-# Trusted IRIX info
-0	string	SGIAUDIT	SGI Audit file
->8	byte	x		- version %d
->9	byte	x		.%ld
-#
-0	string	WNGZWZSC	Wingz compiled script
-0	string	WNGZWZSS	Wingz spreadsheet
-0	string	WNGZWZHP	Wingz help file
-#
-0	string	\#Inventor V	IRIS Inventor 1.0 file
-0	string	\#Inventor V2	Open Inventor 2.0 file
-# GLF is OpenGL stream encoding
-0	string	glfHeadMagic();		GLF_TEXT
-4	belong	0x7d000000		GLF_BINARY_LSB_FIRST
-4	belong	0x0000007d		GLF_BINARY_MSB_FIRST
-# GLS is OpenGL stream encoding; GLS is the successor of GLF
-0	string	glsBeginGLS(		GLS_TEXT
-4	belong	0x10000000		GLS_BINARY_LSB_FIRST
-4	belong	0x00000010		GLS_BINARY_MSB_FIRST
-
-#------------------------------------------------------------------------------
-# mirage:  file(1) magic for Mirage executables
-#
-# XXX - byte order?
-#
-0	long	31415		Mirage Assembler m.out executable
-#-----------------------------------------------------------------------------
-# misctools:  file(1) magic for miscelanous UNIX tools.
-#
-0	string		%%!!		X-Post-It-Note text
-0	string          BEGIN:VCALENDAR         vCalendar calendar file
-
-#------------------------------------------------------------------------------
-# mkid:  file(1) magic for mkid(1) databases
-#
-# ID is the binary tags database produced by mkid(1).
-#
-# XXX - byte order?
-#
-0	string		\311\304	ID tags data
->2	short		>0		version %d
-
-#------------------------------------------------------------------------------
-# mlssa: file(1) magic for MLSSA datafiles
-#
-0		lelong		0xffffabcd	MLSSA datafile,
->4		leshort		x		algorithm %d,
->10		lelong		x		%d samples
-
-#------------------------------------------------------------------------------
-# mmdf:  file(1) magic for MMDF mail files
-#
-0	string	\001\001\001\001	MMDF mailbox
-#------------------------------------------------------------------------------
-# msad:  file(1) magic for msad
-# Microsoft visual C
-# This must precede the heuristic for raw G3 data
-4	string	Standard\ Jet\ DB	Microsoft Access Database
-
-#------------------------------------------------------------------------------
-# motorola:  file(1) magic for Motorola 68K and 88K binaries
-#
-# 68K
-#
-0	beshort		0520		mc68k COFF
->18	beshort		^00000020	object
->18	beshort		&00000020	executable
->12	belong		>0		not stripped
->168	string		.lowmem		Apple toolbox
->20	beshort		0407		(impure)
->20	beshort		0410		(pure)
->20	beshort		0413		(demand paged)
->20	beshort		0421		(standalone)
-0	beshort		0521		mc68k executable (shared)
->12	belong		>0		not stripped
-0	beshort		0522		mc68k executable (shared demand paged)
->12	belong		>0		not stripped
-#
-# Motorola/UniSoft 68K Binary Compatibility Standard (BCS)
-#
-0	beshort		0554		68K BCS executable
-#
-# 88K
-#
-# Motorola/88Open BCS
-#
-0	beshort		0555		88K BCS executable
-#
-# Motorola S-Records, from Gerd Truschinski <gt at freebsd.first.gmd.de>
-0   string      S0          Motorola S-Record; binary data in text format
-
-# ATARI ST relocatable PRG
-#
-# from Oskar Schirmer <schirmer at scara.com> Feb 3, 2001
-# (according to Roland Waldi, Oct 21, 1987)
-# besides the magic 0x601a, the text segment size is checked to be
-# not larger than 1 MB (which is a lot on ST).
-# The additional 0x601b distinction I took from Doug Lee's magic.
-0	belong&0xFFFFFFF0	0x601A0000	Atari ST M68K contiguous executable
->2	belong			x		(txt=%ld,
->6	belong			x		dat=%ld,
->10	belong			x		bss=%ld,
->14	belong			x		sym=%ld)
-0	belong&0xFFFFFFF0	0x601B0000	Atari ST M68K non-contig executable
->2	belong			x		(txt=%ld,
->6	belong			x		dat=%ld,
->10	belong			x		bss=%ld,
->14	belong			x		sym=%ld)
-
-# Atari ST/TT... program format (sent by Wolfram Kleff <kleff at cs.uni-bonn.de>)
-0       beshort         0x601A          Atari 68xxx executable,
->2      belong          x               text len %lu,
->6      belong          x               data len %lu,
->10     belong          x               BSS len %lu,
->14     belong          x               symboltab len %lu,
->18     belong          0
->22     belong          &0x01           fastload flag,
->22     belong          &0x02           may be loaded to alternate RAM,
->22     belong          &0x04           malloc may be from alternate RAM,
->22     belong          x               flags: 0x%lX,
->26     beshort         0               no relocation tab
->26     beshort         !0              + relocation tab
->30     string          SFX             [Self-Extracting LZH SFX archive]
->38     string          SFX             [Self-Extracting LZH SFX archive]
->44     string          ZIP!            [Self-Extracting ZIP SFX archive]
-
-0       beshort         0x0064          Atari 68xxx CPX file
->8      beshort         x               (version %04lx)
-
-#------------------------------------------------------------------------------
-# msdos:  file(1) magic for MS-DOS files
-#
-
-# .BAT files (Daniel Quinlan, quinlan at yggdrasil.com)
-0	string/c	@echo\ off	MS-DOS batch file text
-
-# XXX - according to Microsoft's spec, at an offset of 0x3c in a
-# PE-format executable is the offset in the file of the PE header;
-# unfortunately, that's a little-endian offset, and there's no way
-# to specify an indirect offset with a specified byte order.
-# So, for now, we assume the standard MS-DOS stub, which puts the
-# PE header at 0x80 = 128.
-#
-# Required OS version and subsystem version were 4.0 on some NT 3.51
-# executables built with Visual C++ 4.0, so it's not clear that
-# they're interesting.  The user version was 0.0, but there's
-# probably some linker directive to set it.  The linker version was
-# 3.0, except for one ".exe" which had it as 4.20 (same damn linker!).
-#
-128	string		PE\0\0	MS Windows PE
->150	leshort&0x0100	>0	32-bit
->132	leshort		0x0	unknown processor
->132	leshort		0x14c	Intel 80386
->132	leshort		0x166	MIPS R4000
->132	leshort		0x184	Alpha
->132	leshort		0x268	Motorola 68000
->132	leshort		0x1f0	PowerPC
->132	leshort		0x290	PA-RISC
->148	leshort		>27
->>220	leshort		0	unknown subsystem
->>220	leshort		1	native
->>220	leshort		2	GUI
->>220	leshort		3	console
->>220	leshort		7	POSIX
->150	leshort&0x2000	=0	executable
-#>>136	ledate		x	stamp %s,
->>150	leshort&0x0001	>0	not relocatable
-#>>150	leshort&0x0004	=0	with line numbers,
-#>>150	leshort&0x0008	=0	with local symbols,
-#>>150	leshort&0x0200	=0	with debug symbols,
->>150	leshort&0x1000	>0	system file
-#>>148	leshort		>0
-#>>>154	byte		x	linker %d
-#>>>155	byte		x	\b.%d,
-#>>148	leshort		>27
-#>>>192	leshort		x	requires OS %d
-#>>>194	leshort		x	\b.%d,
-#>>>196	leshort		x	user version %d
-#>>>198	leshort		x	\b.%d,
-#>>>200	leshort		x	subsystem version %d
-#>>>202	leshort		x	\b.%d,
->150	leshort&0x2000	>0	DLL
-#>>136	ledate		x	stamp %s,
->>150	leshort&0x0001	>0	not relocatable
-#>>150	leshort&0x0004	=0	with line numbers,
-#>>150	leshort&0x0008	=0	with local symbols,
-#>>150	leshort&0x0200	=0	with debug symbols,
->>150	leshort&0x1000	>0	system file
-#>>148	leshort		>0
-#>>>154	byte		x	linker %d
-#>>>155	byte		x	\b.%d,
-#>>148	leshort		>27
-#>>>192	leshort		x	requires OS %d
-#>>>194	leshort		x	\b.%d,
-#>>>196	leshort		x	user version %d
-#>>>198	leshort		x	\b.%d,
-#>>>200	leshort		x	subsystem version %d
-#>>>202	leshort		x	\b.%d,
-0	leshort		0x14c	MS Windows COFF Intel 80386 object file
-#>4	ledate		x	stamp %s
-0	leshort		0x166	MS Windows COFF MIPS R4000 object file
-#>4	ledate		x	stamp %s
-0	leshort		0x184	MS Windows COFF Alpha object file
-#>4	ledate		x	stamp %s
-0	leshort		0x268	MS Windows COFF Motorola 68000 object file
-#>4	ledate		x	stamp %s
-0	leshort		0x1f0	MS Windows COFF PowerPC object file
-#>4	ledate		x	stamp %s
-0	leshort		0x290	MS Windows COFF PA-RISC object file
-#>4	ledate		x	stamp %s
-
-# .EXE formats (Greg Roelofs, newt at uchicago.edu)
-#
-0	string	MZ		MS-DOS executable (EXE)
->24	string	@		\b, OS/2 or MS Windows
->>0xe7	string	LH/2\ Self-Extract	\b, %s
->>0xe9	string	PKSFX2		\b, %s
->>0x7a	string	Windows\ self-extracting\ ZIP	\b, %s
->0x1c	string	RJSX\xff\xff	\b, ARJ SFX
->0x1c	string	diet\xf9\x9c	\b, diet compressed
->0x1c	string	LZ09		\b, LZEXE v0.90 compressed
->0x1c	string	LZ91		\b, LZEXE v0.91 compressed
->0x1e	string	Copyright\ 1989-1990\ PKWARE\ Inc.	\b, PKSFX
-# JM: 0x1e "PKLITE Copr. 1990-92 PKWARE Inc. All Rights Reserved\7\0\0\0"
->0x1e	string	PKLITE\ Copr.	\b, %.6s compressed
->0x24	string	LHa's\ SFX	\b, %.15s
->0x24	string	LHA's\ SFX	\b, %.15s
->1638	string	-lh5-		\b, LHa SFX archive v2.13S
->7195	string	Rar!		\b, RAR self-extracting archive
-#
-# [GRR 950118:  file 3.15 has a buffer-size limitation; offsets bigger than
-#   8161 bytes are ignored.  To make the following entries work, increase
-#   HOWMANY in file.h to 32K at least, and maybe to 70K or more for OS/2,
-#   NT/Win32 and VMS.]
-# [GRR:  some company sells a self-extractor/displayer for image data(!)]
-#
->11696	string	PK\003\004	\b, PKZIP SFX archive v1.1
->13297	string	PK\003\004	\b, PKZIP SFX archive v1.93a
->15588	string	PK\003\004	\b, PKZIP2 SFX archive v1.09
->15770	string	PK\003\004	\b, PKZIP SFX archive v2.04g
->28374	string	PK\003\004	\b, PKZIP2 SFX archive v1.02
-#
-# Info-ZIP self-extractors
-#    these are the DOS versions:
->25115	string	PK\003\004	\b, Info-ZIP SFX archive v5.12
->26331	string	PK\003\004	\b, Info-ZIP SFX archive v5.12 w/decryption
-#    these are the OS/2 versions (OS/2 is flagged above):
->47031	string	PK\003\004	\b, Info-ZIP SFX archive v5.12
->49845	string	PK\003\004	\b, Info-ZIP SFX archive v5.12 w/decryption
-#    this is the NT/Win32 version:
->69120	string	PK\003\004	\b, Info-ZIP NT SFX archive v5.12 w/decryption
-#
-# TELVOX Teleinformatica CODEC self-extractor for OS/2:
->49801	string	\x79\xff\x80\xff\x76\xff	\b, CODEC archive v3.21
->>49824	leshort		=1			\b, 1 file
->>49824	leshort		>1			\b, %u files
-
-# .COM formats (Daniel Quinlan, quinlan at yggdrasil.com)
-# Uncommenting only the first two lines will cover about 2/3 of COM files,
-# but it isn't feasible to match all COM files since there must be at least
-# two dozen different one-byte "magics".
-#0	byte		0xe9		MS-DOS executable (COM)
-#>6	string	SFX\ of\ LHarc	(%s)
-#0	byte		0x8c		MS-DOS executable (COM)
-# 0xeb conflicts with "sequent" magic
-#0	byte		0xeb		MS-DOS executable (COM)
-#0	byte		0xb8		MS-DOS executable (COM)
-
-# miscellaneous formats
-0	string		LZ		MS-DOS executable (built-in)
-#0	byte		0xf0		MS-DOS program library data
-#
-
-#
-# Windows Registry files.
-#
-0	string		regf		Windows NT registry file
-0	string		CREG		Windows 95 registry file
-
-# Popular applications
-2080	string	Microsoft\ Word\ 6.0\ Document	%s
-2080	string	Documento\ Microsoft\ Word\ 6 Spanish Microsoft Word 6 document data
-# Pawel Wiecek <coven at i17linuxb.ists.pwr.wroc.pl> (for polish Word)
-2112	string	MSWordDoc			Microsoft Word document data
-#
-0	belong	0x31be0000			Microsoft Word Document
-#
-0       string  PO^Q`				Microsoft Word 6.0 Document
-#
-0	string	\376\067\0\043			Microsoft Office Document
-0	string	\320\317\021\340\241\261\032\341	Microsoft Office Document
-0	string	\333\245-\0\0\0			Microsoft Office Document
-#
-2080	string	Microsoft\ Excel\ 5.0\ Worksheet	%s
-#
-# Pawel Wiecek <coven at i17linuxb.ists.pwr.wroc.pl> (for polish Excel)
-2114	string	Biff5		Microsoft Excel 5.0 Worksheet
-#
-0	belong	0x00001a00	Lotus 1-2-3
->4	belong	0x00100400	wk3 document data
->4	belong	0x02100400	wk4 document data
->4	belong	0x07800100	fm3 or fmb document data
->4	belong	0x07800000	fm3 or fmb document data
-#
-0	belong	0x00000200 	Lotus 1-2-3
->4	belong	0x06040600	wk1 document data
->4	belong	0x06800200	fmt document data
-
-# Help files
-0	string	?_\3\0		MS Windows Help Data
-
-#  DeIsL1.isu what this is I don't know
-0	string	\161\250\000\000\001\002	DeIsL1.isu whatever that is
-
-# Winamp .avs
-#0	string	Nullsoft\ AVS\ Preset\ \060\056\061\032	A plug in for Winamp ms-windows Freeware media player
-0	string	Nullsoft\ AVS\ Preset\ 	Winamp plug in
-
-# Hyper terminal:
-0	string	HyperTerminal\ 	hyperterm
->15	string	1.0\ --\ HyperTerminal\ data\ file	MS-windows Hyperterminal
-
-# Windows Metafont .WMF
-0	string	\327\315\306\232\000\000\000\000\000\000	ms-windows metafont .wmf
-
-#tz3 files whatever that is (MS Works files)
-0	string	\003\001\001\004\070\001\000\000	tz3 ms-works file
-0	string	\003\002\001\004\070\001\000\000	tz3 ms-works file
-0	string	\003\003\001\004\070\001\000\000	tz3 ms-works file
-
-# PGP sig files .sig
-#0 string \211\000\077\003\005\000\063\237\127 065 to  \027\266\151\064\005\045\101\233\021\002 PGP sig
-0 string \211\000\077\003\005\000\063\237\127\065\027\266\151\064\005\045\101\233\021\002 PGP sig
-0 string \211\000\077\003\005\000\063\237\127\066\027\266\151\064\005\045\101\233\021\002 PGP sig
-0 string \211\000\077\003\005\000\063\237\127\067\027\266\151\064\005\045\101\233\021\002 PGP sig
-0 string \211\000\077\003\005\000\063\237\127\070\027\266\151\064\005\045\101\233\021\002 PGP sig
-0 string \211\000\077\003\005\000\063\237\127\071\027\266\151\064\005\045\101\233\021\002 PGP sig
-0 string \211\000\225\003\005\000\062\122\207\304\100\345\042 PGP sig
-
-# windows zips files .dmf
-0	string	MDIF\032\000\010\000\000\000\372\046\100\175\001\000\001\036\001\000 Ms-windows special zipped file
-
-
-# Windows help file FTG FTS
-0	string	\164\146\115\122\012\000\000\000\001\000\000\000	ms-windows help cache
-
-# grp old windows 3.1 group files
-0 string  \120\115\103\103	Ms-windows 3.1 group files
-
-
-# lnk files windows symlinks
-0	string	\114\000\000\000\001\024\002\000\000\000\000\000\300\000\000\000\000\000\000\106	ms-Windows shortcut
-
-#ico files
-0	string	\102\101\050\000\000\000\056\000\000\000\000\000\000\000	Icon for ms-windows
-
-# Windows icons (Ian Springer <ips at fpk.hp.com>)
-0	string	\000\000\001\000	ms-windows icon resource
->4	byte	1			- 1 icon
->4	byte	>1			- %d icons
->>6	byte	>0			\b, %dx
->>>7	byte	>0			\b%d
->>8	byte	0			\b, 256-colors
->>8	byte	>0			\b, %d-colors
-
-
-# .chr files
-0	string	PK\010\010BGI	Borland font 
->4	string	>\0	%s
-# then there is a copyright notice
-
-
-# .bgi files
-0	string	pk\010\010BGI	Borland device 
->4	string	>\0	%s
-# then there is a copyright notice
-
-
-# recycled/info the windows trash bin index
-9	string	\000\000\000\030\001\000\000\000 ms-windows recycled bin info
-
-
-##### put in Either Magic/font or Magic/news
-# Acroread or something  files wrongly identified as G3  .pfm
-# these have the form \000 \001 any? \002 \000 \000
-# or \000 \001 any? \022 \000 \000
-0	belong&0xffff00ff	0x00010012	PFM data
->4	string			\000\000
->6	string			>\060		- %s
-
-0	belong&0xffff00ff	0x00010002	PFM data
->4	string			\000\000
->6	string			>\060		- %s
-#0	string  \000\001 pfm?
-#>3	string  \022\000\000Copyright\  yes
-#>3	string  \002\000\000Copyright\  yes
-#>3	string  >\0     oops, not a font file. Cancel that.
-#it clashes with ttf files so put it lower down.
-
-# From Doug Lee via a FreeBSD pr
-9	string		GERBILDOC	First Choice document
-9	string		GERBILDB	First Choice database
-9	string		GERBILCLIP	First Choice database
-0	string		GERBIL		First Choice device file
-9	string		RABBITGRAPH	RabbitGraph file
-0	string		DCU1		Borland Delphi .DCU file
-0	string		!<spell>	MKS Spell hash list (old format)
-0	string		!<spell2>	MKS Spell hash list
-# Too simple - MPi
-#0	string		AH		Halo(TM) bitmapped font file
-0	lelong		0x08086b70	TurboC BGI file
-0	lelong		0x08084b50	TurboC Font file
-
-# WARNING: below line conflicts with Infocom game data Z-machine 3
-0	byte		0x03		DBase 3 data file
->0x04	lelong		0		(no records)
->0x04	lelong		>0		(%ld records)
-0	byte		0x83		DBase 3 data file with memo(s)
->0x04	lelong		0		(no records)
->0x04	lelong		>0		(%ld records)
-0	leshort		0x0006		DBase 3 index file
-0	string		PMCC		Windows 3.x .GRP file
-1	string		RDC-meg		MegaDots 
->8	byte		>0x2F		version %c
->9	byte		>0x2F		\b.%c file
-0	lelong		0x4C
->4	lelong		0x00021401	Windows shortcut file
-
-# DOS EPS Binary File Header
-# From: Ed Sznyter <ews at Black.Market.NET>
-0	belong		0xC5D0D3C6	DOS EPS Binary File
->4	long		>0		Postscript starts at byte %d
->>8	long		>0		length %d
->>>12	long		>0		Metafile starts at byte %d
->>>>16	long		>0		length %d
->>>20	long		>0		TIFF starts at byte %d
->>>>24	long		>0		length %d
-
-# TNEF magic From "Joomy" <joomy at se-ed.net> 
-0	leshort		0x223e9f78	TNEF
-
-# HtmlHelp files (.chm)
-0	string  ITSF\003\000\000\000\x60\000\000\000\001\000\000\000	MS Windows HtmlHelp Data
-
-# GFA-BASIC (Wolfram Kleff)
-2	string		GFA-BASIC3	GFA-BASIC 3 data
-
-# DJGPP compiled files
-# v >2, uses DPMI & small(2k) stub (Robert vd Boon, rjvdboon at europe.com)
-0x200	string		go32stub	DOS-executable compiled w/DJGPP
->0x20c	string		>0		(stub v%.4s)
->>0x8b2	string		djp		[compressed w/%s
->>>&1	string		>\0		%.4s]
->>0x8ad	string		UPX		[compressed w/%s
->>>&1	string		>\0		%.4s]
->>0x1c	string		pmodedj		stubbed with %s
-
-# QDOS
-4	belong		0x4AFB		QDOS executable
->9	pstring		x		'%s'
-0	beshort		0xFB01		QDOS object
->2	pstring		x		'%s'
-
-#------------------------------------------------------------------------------
-# From Stuart Caie <kyzer at 4u.net> (developer of cabextract)
-# Microsoft Cabinet files
-0	string		MSCF\0\0\0\0	Microsoft Cabinet file
->8	lelong		x		\b, %u bytes
->28	leshort		1		\b, 1 file
->28	leshort		>1		\b, %u files
-
-# InstallShield Cabinet files
-0	string		ISc(		InstallShield Cabinet file
->5	byte&0xf0	=0x60 		version 6,
->5	byte&0xf0	!0x60 		version 4/5,
->(12.l+40)	lelong	x		%u files
-
-# Windows CE package files
-0	string		MSCE\0\0\0\0	Microsoft WinCE install header
->20	lelong		0		\b, architecture-independent
->20	lelong		103		\b, Hitachi SH3
->20	lelong		104		\b, Hitachi SH4
->20	lelong		0xA11		\b, StrongARM
->20	lelong		4000		\b, MIPS R4000
->20	lelong		10003		\b, Hitachi SH3
->20	lelong		10004		\b, Hitachi SH3E
->20	lelong		10005		\b, Hitachi SH4
->20	lelong		70001		\b, ARM 7TDMI
->52	leshort		1 		\b, 1 file
->52	leshort		>1 		\b, %u files
->56	leshort		1 		\b, 1 registry entry
->56	leshort		>1 		\b, %u registry entries
-
-# Outlook Personal Folders
-0	lelong	0x4E444221	Microsoft Outlook binary email folder
-
-# From: Dirk Jagdmann <doj at cubic.org>
-0	lelong	0x00035f3f	Windows 3.x help file
-
-#------------------------------------------------------------------------------
-# modem:  file(1) magic for modem programs
-#
-# From: Florian La Roche <florian at knorke.saar.de>
-1	string		PC\ Research,\ Inc	Digifax-G3-File
->29	byte		1		\b, fine resolution
->29	byte		0		\b, normal resolution
-
-0	short		0x0100		raw G3 data, byte-padded
-0	short		0x1400		raw G3 data
-#
-# Magic data for vgetty voice formats
-# (Martin Seine & Marc Eberhard)
-
-#
-# raw modem data version 1
-#
-0    string    RMD1      raw modem data
->4   string    >\0       (%s /
->20  short     >0        compression type 0x%04x)
-
-#
-# portable voice format 1
-#
-0    string    PVF1\n         portable voice format
->5   string    >\0       (binary %s)
-
-#
-# portable voice format 2
-#
-0    string    PVF2\n         portable voice format
->5   string >\0          (ascii %s)
-
-
-#------------------------------------------------------------------------------
-# msvc:  file(1) magic for msvc
-# "H. Nanosecond" <aldomel at ix.netcom.com>
-# Microsoft visual C
-# 
-# I have version 1.0
-
-# .aps
-0	string	HWB\000\377\001\000\000\000	Microsoft Visual C .APS file
-
-# .ide
-#too long 0	string	\102\157\162\154\141\156\144\040\103\053\053\040\120\162\157\152\145\143\164\040\106\151\154\145\012\000\032\000\002\000\262\000\272\276\372\316	MSVC .ide
-0	string	\102\157\162\154\141\156\144\040\103\053\053\040\120\162\157	MSVC .ide
-
-# .res
-0	string	\000\000\000\000\040\000\000\000\377	MSVC .res
-0	string	\377\003\000\377\001\000\020\020\350	MSVC .res
-0	string	\377\003\000\377\001\000\060\020\350	MSVC .res
-
-#.lib
-0	string	\360\015\000\000	Microsoft Visual C library
-0	string	\360\075\000\000	Microsoft Visual C library
-0	string	\360\175\000\000	Microsoft Visual C library
-
-#.pch
-0	string	DTJPCH0\000\022\103\006\200	Microsoft Visual C .pch
-
-# .pdb
-# too long 0	string	Microsoft\ C/C++\ program\ database\ 
-0	string	Microsoft\ C/C++\ 	MSVC program database
->18	string	program\ database\ 	
->33	string	>\0	ver %s
-
-#.sbr
-0	string	\000\002\000\007\000	MSVC .sbr
->5	string 	>\0	%s
-
-#.bsc
-0	string	\002\000\002\001	MSVC .bsc
-
-#.wsp
-0	string	1.00\ .0000.0000\000\003	MSVC .wsp version 1.0000.0000
-# these seem to start with the version and contain menus
-
-#-----------------------------------------------------------------------------
-# natinst:  file(1) magic for National Instruments Code Files
-
-#
-# From <egamez at fcfm.buap.mx> Enrique G�mez-Flores
-# version 1
-# Many formats still missing, we use, for the moment LabVIEW
-# We guess VXI format file. VISA, LabWindowsCVI, BridgeVIEW, etc, are missing
-#
-0       string          RSRC            National Instruments,
-# Check if it's a LabVIEW File
->8      string          LV              LabVIEW File,
-# Check wich kind of file is
->>10    string          SB              Code Resource File, data
->>10    string          IN              Virtual Instrument Program, data
->>10    string          AR              VI Library, data
-# This is for Menu Libraries
->8      string          LMNULBVW        Portable File Names, data
-# This is for General Resources
->8      string          rsc             Resources File, data
-# This is for VXI Package
-0       string          VMAP            National Instruments, VXI File, data
-
-#------------------------------------------------------------------------------
-# ncr:  file(1) magic for NCR Tower objects
-#
-# contributed by
-# Michael R. Wayne  ***  TMC & Associates  ***  INTERNET: wayne at ford-vax.arpa
-# uucp: {philabs | pyramid} !fmsrl7!wayne   OR   wayne at fmsrl7.UUCP
-#
-0	beshort		000610	Tower/XP rel 2 object
->12	   belong		>0	not stripped
->20	   beshort		0407	executable
->20	   beshort		0410	pure executable
->22	   beshort		>0	- version %ld
-0	beshort		000615	Tower/XP rel 2 object
->12	   belong		>0	not stripped
->20	   beshort		0407	executable
->20	   beshort		0410	pure executable
->22	   beshort		>0	- version %ld
-0	beshort		000620	Tower/XP rel 3 object
->12	   belong		>0	not stripped
->20	   beshort		0407	executable
->20	   beshort		0410	pure executable
->22	   beshort		>0	- version %ld
-0	beshort		000625	Tower/XP rel 3 object
->12	   belong		>0	not stripped
->20	   beshort		0407	executable
->20	   beshort		0410	pure executable
->22	   beshort		>0	- version %ld
-0	beshort		000630	Tower32/600/400 68020 object
->12	   belong		>0	not stripped
->20	   beshort		0407	executable
->20	   beshort		0410	pure executable
->22	   beshort		>0	- version %ld
-0	beshort		000640	Tower32/800 68020
->18	   beshort		&020000	w/68881 object
->18	   beshort		&040000	compatible object
->18	   beshort		&~060000	object
->20	   beshort		0407	executable
->20	   beshort		0413	pure executable
->12	   belong		>0	not stripped
->22	   beshort		>0	- version %ld
-0	beshort		000645	Tower32/800 68010
->18	   beshort		&040000	compatible object
->18	   beshort		&~060000 object
->20	   beshort		0407	executable
->20	   beshort		0413	pure executable
->12	   belong		>0	not stripped
->22	   beshort		>0	- version %ld
-
-#------------------------------------------------------------------------------
-# netbsd:  file(1) magic for NetBSD objects
-#
-# All new-style magic numbers are in network byte order.
-#
-
-0	lelong			000000407	a.out NetBSD little-endian object file
->16	lelong			>0		not stripped
-0	belong			000000407	a.out NetBSD big-endian object file
->16	belong			>0		not stripped
-
-0	belong&0377777777	041400413	a.out NetBSD/i386 demand paged
->0	byte			&0x80		
->>20	lelong			<4096		shared library
->>20	lelong			=4096		dynamically linked executable
->>20	lelong			>4096		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	041400410	a.out NetBSD/i386 pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	041400407	a.out NetBSD/i386
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	lelong			!0		executable
->>20	lelong			=0		object file
->16	lelong			>0		not stripped
-0	belong&0377777777	041400507	a.out NetBSD/i386 core
->12	string			>\0		from '%s'
->32	lelong			!0		(signal %d)
-
-0	belong&0377777777	041600413	a.out NetBSD/m68k demand paged
->0	byte			&0x80		
->>20	belong			<8192		shared library
->>20	belong			=8192		dynamically linked executable
->>20	belong			>8192		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	041600410	a.out NetBSD/m68k pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	041600407	a.out NetBSD/m68k
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	belong			!0		executable
->>20	belong			=0		object file
->16	belong			>0		not stripped
-0	belong&0377777777	041600507	a.out NetBSD/m68k core
->12	string			>\0		from '%s'
->32	belong			!0		(signal %d)
-
-0	belong&0377777777	042000413	a.out NetBSD/m68k4k demand paged
->0	byte			&0x80		
->>20	belong			<4096		shared library
->>20	belong			=4096		dynamically linked executable
->>20	belong			>4096		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	042000410	a.out NetBSD/m68k4k pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	042000407	a.out NetBSD/m68k4k
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	belong			!0		executable
->>20	belong			=0		object file
->16	belong			>0		not stripped
-0	belong&0377777777	042000507	a.out NetBSD/m68k4k core
->12	string			>\0		from '%s'
->32	belong			!0		(signal %d)
-
-0	belong&0377777777	042200413	a.out NetBSD/ns32532 demand paged
->0	byte			&0x80		
->>20	lelong			<4096		shared library
->>20	lelong			=4096		dynamically linked executable
->>20	lelong			>4096		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	042200410	a.out NetBSD/ns32532 pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	042200407	a.out NetBSD/ns32532
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	lelong			!0		executable
->>20	lelong			=0		object file
->16	lelong			>0		not stripped
-0	belong&0377777777	042200507	a.out NetBSD/ns32532 core
->12	string			>\0		from '%s'
->32	lelong			!0		(signal %d)
-
-0	belong&0377777777	045200507	a.out NetBSD/powerpc core
->12	string			>\0		from '%s'
-
-0	belong&0377777777	042400413	a.out NetBSD/SPARC demand paged
->0	byte			&0x80		
->>20	belong			<8192		shared library
->>20	belong			=8192		dynamically linked executable
->>20	belong			>8192		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	042400410	a.out NetBSD/SPARC pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	042400407	a.out NetBSD/SPARC
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	belong			!0		executable
->>20	belong			=0		object file
->16	belong			>0		not stripped
-0	belong&0377777777	042400507	a.out NetBSD/SPARC core
->12	string			>\0		from '%s'
->32	belong			!0		(signal %d)
-
-0	belong&0377777777	042600413	a.out NetBSD/pmax demand paged
->0	byte			&0x80		
->>20	lelong			<4096		shared library
->>20	lelong			=4096		dynamically linked executable
->>20	lelong			>4096		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	042600410	a.out NetBSD/pmax pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	042600407	a.out NetBSD/pmax
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	lelong			!0		executable
->>20	lelong			=0		object file
->16	lelong			>0		not stripped
-0	belong&0377777777	042600507	a.out NetBSD/pmax core
->12	string			>\0		from '%s'
->32	lelong			!0		(signal %d)
-
-0	belong&0377777777	043000413	a.out NetBSD/vax 1k demand paged
->0	byte			&0x80		
->>20	lelong			<4096		shared library
->>20	lelong			=4096		dynamically linked executable
->>20	lelong			>4096		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	043000410	a.out NetBSD/vax 1k pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	043000407	a.out NetBSD/vax 1k
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	lelong			!0		executable
->>20	lelong			=0		object file
->16	lelong			>0		not stripped
-0	belong&0377777777	043000507	a.out NetBSD/vax 1k core
->12	string			>\0		from '%s'
->32	lelong			!0		(signal %d)
-
-0	belong&0377777777	045400413	a.out NetBSD/vax 4k demand paged
->0	byte			&0x80		
->>20	lelong			<4096		shared library
->>20	lelong			=4096		dynamically linked executable
->>20	lelong			>4096		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	045400410	a.out NetBSD/vax 4k pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	045400407	a.out NetBSD/vax 4k
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	lelong			!0		executable
->>20	lelong			=0		object file
->16	lelong			>0		not stripped
-0	belong&0377777777	045400507	a.out NetBSD/vax 4k core
->12	string			>\0		from '%s'
->32	lelong			!0		(signal %d)
-
-# NetBSD/alpha does not support (and has never supported) a.out objects,
-# so no rules are provided for them.  NetBSD/alpha ELF objects are 
-# dealt with in "elf".
-0	lelong		0x00070185		ECOFF NetBSD/alpha binary
->10	leshort		0x0001			not stripped
->10	leshort		0x0000			stripped
-0	belong&0377777777	043200507	a.out NetBSD/alpha core
->12	string			>\0		from '%s'
->32	lelong			!0		(signal %d)
-
-0	belong&0377777777	043400413	a.out NetBSD/mips demand paged
->0	byte			&0x80		
->>20	belong			<8192		shared library
->>20	belong			=8192		dynamically linked executable
->>20	belong			>8192		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	043400410	a.out NetBSD/mips pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	043400407	a.out NetBSD/mips
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	belong			!0		executable
->>20	belong			=0		object file
->16	belong			>0		not stripped
-0	belong&0377777777	043400507	a.out NetBSD/mips core
->12	string			>\0		from '%s'
->32	belong			!0		(signal %d)
-
-0	belong&0377777777	043600413	a.out NetBSD/arm32 demand paged
->0	byte			&0x80
->>20	lelong			<4096		shared library
->>20	lelong			=4096		dynamically linked executable
->>20	lelong			>4096		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	043600410	a.out NetBSD/arm32 pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	043600407	a.out NetBSD/arm32
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	lelong			!0		executable
->>20	lelong			=0		object file
->16	lelong			>0		not stripped
-# NetBSD/arm26 has always used ELF objects, but it shares a core file
-# format with NetBSD/arm32.
-0	belong&0377777777	043600507	a.out NetBSD/arm core
->12	string			>\0		from '%s'
->32	lelong			!0		(signal %d)
-
-#------------------------------------------------------------------------------
-# netscape:  file(1) magic for Netscape files
-# "H. Nanosecond" <aldomel at ix.netcom.com>
-# version 3 and 4 I think
-#
-
-# Netscape Address book  .nab
-0	string \000\017\102\104\000\000\000\000\000\000\001\000\000\000\000\002\000\000\000\002\000\000\004\000 Netscape Address book
-
-# Netscape Communicator address book
-0   string   \000\017\102\111 Netscape Communicator address book
-
-# .snm Caches
-0	string		#\ Netscape\ folder\ cache	Netscape folder cache
-0	string	\000\036\204\220\000	Netscape folder cache
-# .n2p 
-# Net 2 Phone 
-#0	string	123\130\071\066\061\071\071\071\060\070\061\060\061\063\060
-0	string	SX961999	Net2phone
-
-#
-#This is files ending in .art, FIXME add more rules
-0       string          JG\004\016\0\0\0\0      ART
-
-#------------------------------------------------------------------------------
-# news:  file(1) magic for SunOS NeWS fonts (not "news" as in "netnews")
-#
-0	string		StartFontMetrics	ASCII font metrics
-0	string		StartFont	ASCII font bits
-0	belong		0x137A2944	NeWS bitmap font
-0	belong		0x137A2947	NeWS font family
-0	belong		0x137A2950	scalable OpenFont binary
-0	belong		0x137A2951	encrypted scalable OpenFont binary
-8	belong		0x137A2B45	X11/NeWS bitmap font
-8	belong		0x137A2B48	X11/NeWS font family
-#------------------------------------------------------------------------------
-# nitpicker:  file(1) magic for Flowfiles.
-# From: Christian Jachmann <C.Jachmann at gmx.net> http://www.nitpicker.de
-0	string	NPFF	NItpicker Flow File 
->4	byte	x	V%d.
->5	byte	x	%d
->6	bedate	x	started: %s
->10	bedate	x	stopped: %s
->14	belong	x	Bytes: %u
->18	belong	x	Bytes1: %u
->22	belong	x	Flows: %u
->26	belong	x	Pkts: %u
-
-#------------------------------------------------------------------------------
-# ocaml: file(1) magic for Objective Caml files.
-0	string	Caml1999	Objective caml
->8	string	X		exec file
->8	string	I		interface file (.cmi)
->8	string	O		object file (.cmo)
->8	string	A		library file (.cma)
->8	string	Y		native object file (.cmx)
->8	string	Z		native library file (.cmxa)
->8	string	M		abstract syntax tree implementation file
->8	string	N		abstract syntax tree interface file
->9	string	>\0		(Version %3.3s).
-#------------------------------------------------------------------------------
-# octave binary data file(1) magic, from Dirk Eddelbuettel <edd at debian.org>
-0	string		Octave-1-L	Octave binary data (little endian)
-0	string		Octave-1-B	Octave binary data (big endian)
-
-#------------------------------------------------------------------------------
-# olf:  file(1) magic for OLF executables
-#
-# We have to check the byte order flag to see what byte order all the
-# other stuff in the header is in.
-#
-# MIPS R3000 may also be for MIPS R2000.
-# What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
-#
-# Created by Erik Theisen <etheisen at openbsd.org>
-# Based on elf from Daniel Quinlan <quinlan at yggdrasil.com>
-0	string		\177OLF		OLF
->4	byte		0		invalid class
->4	byte		1		32-bit
->4	byte		2		64-bit
->7	byte		0		invalid os
->7	byte		1		OpenBSD
->7	byte		2		NetBSD
->7	byte		3		FreeBSD
->7	byte		4		4.4BSD
->7	byte		5		Linux
->7	byte		6		SVR4
->7	byte		7		esix
->7	byte		8		Solaris
->7	byte		9		Irix
->7	byte		10		SCO
->7	byte		11		Dell
->7	byte		12		NCR
->5	byte		0		invalid byte order
->5	byte		1		LSB
->>16	leshort		0		no file type,
->>16	leshort		1		relocatable,
->>16	leshort		2		executable,
->>16	leshort		3		shared object,
-# Core handling from Peter Tobias <tobias at server.et-inf.fho-emden.de>
-# corrections by Christian 'Dr. Disk' Hechelmann <drdisk at ds9.au.s.shuttle.de>
->>16	leshort		4		core file
->>>(0x38+0xcc) string	>\0		of '%s'
->>>(0x38+0x10) lelong	>0		(signal %d),
->>16	leshort		&0xff00		processor-specific,
->>18	leshort		0		no machine,
->>18	leshort		1		AT&T WE32100 - invalid byte order,
->>18	leshort		2		SPARC - invalid byte order,
->>18	leshort		3		Intel 80386,
->>18	leshort		4		Motorola 68000 - invalid byte order,
->>18	leshort		5		Motorola 88000 - invalid byte order,
->>18	leshort		6		Intel 80486,
->>18	leshort		7		Intel 80860,
->>18	leshort		8		MIPS R3000_BE - invalid byte order,
->>18	leshort		9		Amdahl - invalid byte order,
->>18	leshort		10		MIPS R3000_LE,
->>18	leshort		11		RS6000 - invalid byte order,
->>18	leshort		15		PA-RISC - invalid byte order,
->>18	leshort		16		nCUBE,
->>18	leshort		17		VPP500,
->>18	leshort		18		SPARC32PLUS,
->>18	leshort		20		PowerPC,
->>18	leshort		0x9026		Alpha,
->>20	lelong		0		invalid version
->>20	lelong		1		version 1
->>36	lelong		1		MathCoPro/FPU/MAU Required
->8	string		>\0		(%s)
->5	byte		2		MSB
->>16	beshort		0		no file type,
->>16	beshort		1		relocatable,
->>16	beshort		2		executable,
->>16	beshort		3		shared object,
->>16	beshort		4		core file,
->>>(0x38+0xcc) string	>\0		of '%s'
->>>(0x38+0x10) belong	>0		(signal %d),
->>16	beshort		&0xff00		processor-specific,
->>18	beshort		0		no machine,
->>18	beshort		1		AT&T WE32100,
->>18	beshort		2		SPARC,
->>18	beshort		3		Intel 80386 - invalid byte order,
->>18	beshort		4		Motorola 68000,
->>18	beshort		5		Motorola 88000,
->>18	beshort		6		Intel 80486 - invalid byte order,
->>18	beshort		7		Intel 80860,
->>18	beshort		8		MIPS R3000_BE,
->>18	beshort		9		Amdahl,
->>18	beshort		10		MIPS R3000_LE - invalid byte order,
->>18	beshort		11		RS6000,
->>18	beshort		15		PA-RISC,
->>18	beshort		16		nCUBE,
->>18	beshort		17		VPP500,
->>18	beshort		18		SPARC32PLUS,
->>18	beshort		20		PowerPC or cisco 4500,
->>18	beshort		21		cisco 7500,
->>18	beshort		24		cisco SVIP,
->>18	beshort		25		cisco 7200,
->>18	beshort		36		cisco 12000,
->>18	beshort		0x9026		Alpha,
->>20	belong		0		invalid version
->>20	belong		1		version 1
->>36	belong		1		MathCoPro/FPU/MAU Required
-
-#------------------------------------------------------------------------------
-# os2:  file(1) magic for OS/2 files
-#
-
-# Provided 1998/08/22 by
-# David Mediavilla <davidme.news at REMOVEIFNOTSPAMusa.net>
-1	string	InternetShortcut	MS Windows 95 Internet shortcut text
->24	string	>\			(URL=<%s>)
-
-# OS/2 URL objects
-# Provided 1998/08/22 by
-# David Mediavilla <davidme.news at REMOVEIFNOTSPAMusa.net>
-#0	string	http:			OS/2 URL object text
-#>5	string	>\			(WWW) <http:%s>
-#0	string	mailto:			OS/2 URL object text
-#>7	string	>\			(email) <%s>
-#0	string	news:			OS/2 URL object text
-#>5	string	>\			(Usenet) <%s>
-#0	string	ftp:			OS/2 URL object text
-#>4	string	>\			(FTP) <ftp:%s>
-#0	string	file:			OS/2 URL object text
-#>5	string	>\			(Local file) <%s>
-
-# >>>>> OS/2 INF/HLP <<<<<  (source: Daniel Dissett ddissett at netcom.com)
-# Carl Hauser (chauser.parc at xerox.com) and 
-# Marcus Groeber (marcusg at ph-cip.uni-koeln.de)
-# list the following header format in inf02a.doc:
-#
-#  int16 ID;           // ID magic word (5348h = "HS")
-#  int8  unknown1;     // unknown purpose, could be third letter of ID
-#  int8  flags;        // probably a flag word...
-#                      //  bit 0: set if INF style file
-#                      //  bit 4: set if HLP style file
-#                      // patching this byte allows reading HLP files
-#                      // using the VIEW command, while help files 
-#                      // seem to work with INF settings here as well.
-#  int16 hdrsize;      // total size of header
-#  int16 unknown2;     // unknown purpose
-# 
-0   string  HSP\x01\x9b\x00 OS/2 INF
->107 string >0                      (%s)
-0   string  HSP\x10\x9b\x00     OS/2 HLP
->107 string >0                      (%s)
-
-# OS/2 INI (this is a guess)
-0  string   \xff\xff\xff\xff\x14\0\0\0  OS/2 INI
-#
-# Copyright (c) 1996 Ignatios Souvatzis. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#      This product includes software developed by Ignatios Souvatzis for
-#      the NetBSD project.
-# 4. The name of the author may not be used to endorse or promote products
-#    derived from this software without specific prior written permission.
-#
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#
-#
-# OS9/6809 module descriptions:
-#
-0	beshort		0x87CD	OS9/6809 module:
-#
->6	byte&0x0f	0x00	non-executable
->6	byte&0x0f	0x01	machine language
->6	byte&0x0f	0x02	BASIC I-code
->6	byte&0x0f	0x03	P-code
->6	byte&0x0f	0x04	C I-code
->6	byte&0x0f	0x05	COBOL I-code
->6	byte&0x0f	0x06	FORTRAN I-code
-#
->6	byte&0xf0	0x10	program executable
->6	byte&0xf0	0x20	subroutine
->6	byte&0xf0	0x30	multi-module
->6	byte&0xf0	0x40	data module
-#
->6	byte&0xf0	0xC0	system module
->6	byte&0xf0	0xD0	file manager
->6	byte&0xf0	0xE0	device driver
->6	byte&0xf0	0xF0	device descriptor
-#
-# OS9/m68k stuff (to be continued)
-#
-0	beshort		0x4AFC	OS9/68K module:
-#
-# attr
->14	byte&0x80	0x80	re-entrant
->14	byte&0x40	0x40	ghost
->14	byte&0x20	0x20	system-state
-#
-# lang:
-#
->13	byte		1	machine language
->13	byte		2	BASIC I-code
->13	byte		3	P-code
->13	byte		4	C I-code
->13	byte		5	COBOL I-code
->13	byte		6	Fortran I-code
-#
-#
-# type:
-#
->12	byte		1	program executable
->12	byte		2	subroutine
->12	byte		3	multi-module
->12	byte		4	data module
->12	byte		11	trap library
->12	byte		12	system module
->12	byte		13	file manager
->12	byte		14	device driver
->12	byte		15	device descriptor
-#
-# Mach magic number info
-#
-0	long		0xefbe	OSF/Rose object
-# I386 magic number info
-#
-0	short		0565	i386 COFF object
-
-#------------------------------------------------------------------------------
-# palm:  file(1) magic for PalmOS {.prc,.pdb}: applications, docfiles, and hacks
-#
-# Brian Lalor <blalor at hcirisc.cs.binghamton.edu>
-
-# appl
-60      belong                  0x6170706c      PalmOS application
->0      string                  >\0             "%s"
-# TEXt
-60      belong                  0x54455874      AportisDoc file
->0      string                  >\0             "%s"
-# HACK
-60      belong                  0x4841434b      HackMaster hack
->0      string                  >\0             "%s"
-
-# Variety of PalmOS document types
-# Michael-John Turner <mj at debian.org>
-# Thanks to Hasan Umit Ezerce <humit at tr-net.net.tr> for his DocType
-60	string	                BVokBDIC	BDicty PalmOS document
->0	string                  >\0             "%s"
-60	string	                DB99DBOS	DB PalmOS document
->0	string                  >\0             "%s"
-60	string	                vIMGView	FireViewer/ImageViewer PalmOS document
->0	string                  >\0             "%s"
-60	string	                PmDBPmDB	HanDBase PalmOS document
->0	string                  >\0             "%s"
-60	string	                InfoINDB	InfoView PalmOS document
->0	string                  >\0             "%s"
-60	string	                ToGoToGo	iSilo PalmOS document
->0	string                  >\0             "%s"
-60	string	                JfDbJBas	JFile PalmOS document
->0	string                  >\0             "%s"
-60	string	                JfDbJFil	JFile Pro PalmOS document
->0	string                  >\0             "%s"
-60	string	                DATALSdb	List PalmOS document
->0	string                  >\0             "%s"
-60	string	                Mdb1Mdb1	MobileDB PalmOS document
->0	string                  >\0             "%s"
-60	string	                PNRdPPrs	PeanutPress PalmOS document
->0	string                  >\0             "%s"
-60	string	                DataPlkr	Plucker PalmOS document
->0	string                  >\0             "%s"
-60	string	                DataSprd	QuickSheet PalmOS document
->0	string                  >\0             "%s"
-60	string	                SM01SMem	SuperMemo PalmOS document
->0	string                  >\0             "%s"
-60	string	                DataTlPt	TealDoc PalmOS document
->0	string                  >\0             "%s"
-60	string	                InfoTlIf	TealInfo PalmOS document
->0	string                  >\0             "%s"
-60	string	                DataTlMl	TealMeal PalmOS document
->0	string                  >\0             "%s"
-60	string	                DataTlPt	TealPaint PalmOS document
->0	string                  >\0             "%s"
-60	string	                dataTDBP	ThinkDB PalmOS document
->0	string                  >\0             "%s"
-60	string	                TdatTide	Tides PalmOS document
->0	string                  >\0             "%s"
-60	string	                ToRaTRPW	TomeRaider PalmOS document
->0	string                  >\0             "%s"
-
-# A GutenPalm zTXT etext for use on Palm Pilots (http://gutenpalm.sf.net)
-# For version 1.xx zTXTs, outputs version and numbers of bookmarks and
-#   annotations.
-# For other versions, just outputs version.
-#
-60		string		zTXT		A GutenPalm zTXT e-book
->0		string		>\0		"%s"
->(0x4E.L)	byte		0
->>(0x4E.L+1)	byte		x		(v0.%02d)
->(0x4E.L)	byte		1
->>(0x4E.L+1)	byte		x		(v1.%02d)
->>>(0x4E.L+10)	beshort		>0
->>>>(0x4E.L+10) beshort		<2		- 1 bookmark
->>>>(0x4E.L+10) beshort		>1		- %d bookmarks
->>>(0x4E.L+14)	beshort		>0
->>>>(0x4E.L+14) beshort		<2		- 1 annotation
->>>>(0x4E.L+14) beshort		>1		- %d annotations
->(0x4E.L)	byte		>1		(v%d.
->>(0x4E.L+1)	byte		x		%02d)
-
-# Palm OS .prc file types
-60		string		libr		Palm OS dynamic library data
->0		string		>\0		"%s"
-60		string		ptch		Palm OS operating system patch data
->0		string		>\0		"%s"
-
-# Mobipocket (www.mobipocket.com), donated by Carl Witty
-60	string	                BOOKMOBI	Mobipocket E-book
->0	string                  >\0             "%s"
-
-#------------------------------------------------------------------------------
-#
-# Parix COFF executables
-# From: Ignatios Souvatzis <ignatios at cs.uni-bonn.de>
-#
-0	beshort&0xfff	0xACE	PARIX
->0	byte&0xf0	0x80	T800
->0	byte&0xf0	0x90	T9000
->19	byte&0x02	0x02	executable
->19	byte&0x02	0x00	object
->19	byte&0x0c	0x00	not stripped
-
-#------------------------------------------------------------------------------
-# pbm:  file(1) magic for Portable Bitmap files
-#
-# XXX - byte order?
-#
-0	short	0x2a17	"compact bitmap" format (Poskanzer)
-#------------------------------------------------------------------------------
-# pdf:  file(1) magic for Portable Document Format
-#
-
-0	string		%PDF-		PDF document
->5	byte		x		\b, version %c
->7	byte		x		\b.%c
-
-#------------------------------------------------------------------------------
-# pdp:  file(1) magic for PDP-11 executable/object and APL workspace
-#
-0	lelong		0101555		PDP-11 single precision APL workspace
-0	lelong		0101554		PDP-11 double precision APL workspace
-#
-# PDP-11 a.out
-#
-0	leshort		0407		PDP-11 executable
->8	leshort		>0		not stripped
->15	byte		>0		- version %ld
-
-0	leshort		0401		PDP-11 UNIX/RT ldp
-0	leshort		0405		PDP-11 old overlay
-
-0	leshort		0410		PDP-11 pure executable
->8	leshort		>0		not stripped
->15	byte		>0		- version %ld
-
-0	leshort		0411		PDP-11 separate I&D executable
->8	leshort		>0		not stripped
->15	byte		>0		- version %ld
-
-0	leshort		0437		PDP-11 kernel overlay
-
-# These last three are derived from 2.11BSD file(1)
-0	leshort		0413		PDP-11 demand-paged pure executable
->8	leshort		>0		not stripped
-
-0	leshort		0430		PDP-11 overlaid pure executable
->8	leshort		>0		not stripped
-
-0	leshort		0431		PDP-11 overlaid separate executable
->8	leshort		>0		not stripped
-
-#------------------------------------------------------------------------------
-# perl:  file(1) magic for Larry Wall's perl language.
-#
-# The ``eval'' line recognizes an outrageously clever hack for USG systems.
-# Keith Waclena <keith at cerberus.uchicago.edu>
-# Send additions to <perl5-porters at perl.org>
-0	string/b	#!\ /bin/perl			perl script text
-0	string		eval\ "exec\ /bin/perl		perl script text
-0	string/b	#!\ /usr/bin/perl		perl script text
-0	string		eval\ "exec\ /usr/bin/perl	perl script text
-0	string/b	#!\ /usr/local/bin/perl		perl script text
-0	string		eval\ "exec\ /usr/local/bin/perl	perl script text
-0	string		eval\ '(exit\ $?0)'\ &&\ eval\ 'exec	perl script text
-
-# a couple more, by me
-# XXX: christos matches
-#0	regex		package		Perl5 module source text (via regex)
-0	string		package		Perl5 module source text
-
-#------------------------------------------------------------------------------
-# pgp:  file(1) magic for Pretty Good Privacy
-#
-0       beshort         0x9900                  PGP key public ring
-0       beshort         0x9501                  PGP key security ring
-0       beshort         0x9500                  PGP key security ring
-0	beshort		0xa600			PGP encrypted data
-0       string          -----BEGIN\040PGP       PGP armored data
->15     string          PUBLIC\040KEY\040BLOCK- public key block
->15     string          MESSAGE-                message
->15     string          SIGNED\040MESSAGE-      signed message
->15     string          PGP\040SIGNATURE-       signature
-
-#------------------------------------------------------------------------------
-# pkgadd:  file(1) magic for SysV R4 PKG Datastreams
-#
-0       string          #\ PaCkAgE\ DaTaStReAm  pkg Datastream (SVR4)
-#------------------------------------------------------------------------------
-# plan9:  file(1) magic for AT&T Bell Labs' Plan 9 executables
-#
-0	belong		0x000001EB	Plan 9 executable
-
-#------------------------------------------------------------------------------
-# plus5:  file(1) magic for Plus Five's UNIX MUMPS
-#
-# XXX - byte order?  Paging Hokey....
-#
-0	short		0x259		mumps avl global
->2	byte		>0		(V%d)
->6	byte		>0		with %d byte name
->7	byte		>0		and %d byte data cells
-0	short		0x25a		mumps blt global
->2	byte		>0		(V%d)
->8	short		>0		- %d byte blocks
->15	byte		0x00		- P/D format
->15	byte		0x01		- P/K/D format
->15	byte		0x02		- K/D format
->15	byte		>0x02		- Bad Flags
-# SE Linux policy database
-0       lelong  0xf97cff8c      SE Linux policy
->16     lelong  x               v%d
->20     lelong  1 		MLS
->24     lelong  x       	%d symbols
->28     lelong  x       	%d ocons
-
-#------------------------------------------------------------------------------
-# printer:  file(1) magic for printer-formatted files
-#
-
-# PostScript, updated by Daniel Quinlan (quinlan at yggdrasil.com)
-0	string		%!		PostScript document text
->2	string		PS-Adobe-	conforming
->>11	string		>\0		at level %.3s
->>>15	string		EPS		- type %s
->>>15	string		Query		- type %s
->>>15	string		ExitServer	- type %s
-# Some PCs have the annoying habit of adding a ^D as a document separator
-0	string		\004%!		PostScript document text
->3	string		PS-Adobe-	conforming
->>12	string		>\0		at level %.3s
->>>16	string		EPS		- type %s
->>>16	string		Query		- type %s
->>>16	string		ExitServer	- type %s
-0	string		\033%-12345X%!PS	PostScript document
-
-
-# DOS EPS Binary File Header
-# From: Ed Sznyter <ews at Black.Market.NET>
-0       belong          0xC5D0D3C6      DOS EPS Binary File
->4      long            >0              Postscript starts at byte %d
->>8     long            >0              length %d
->>>12   long            >0              Metafile starts at byte %d
->>>>16  long            >0              length %d
->>>20   long            >0              TIFF starts at byte %d
->>>>24  long            >0              length %d
-
-# Adobe's PostScript Printer Description (PPD) files
-#       Yves Arrouye <arrouye at marin.fdn.fr>
-#
-0      string          *PPD-Adobe:    PPD file
->13    string          x              \b, ve
-
-# HP Printer Job Language
-0	string		\033%-12345X at PJL	HP Printer Job Language data
-# HP Printer Job Language
-# The header found on Win95 HP plot files is the "Silliest Thing possible" 
-# (TM)
-# Every driver puts the language at some random position, with random case
-# (LANGUAGE and Language)
-# For example the LaserJet 5L driver puts the "PJL ENTER LANGUAGE" in line 10
-# From: Uwe Bonnes <bon at elektron.ikp.physik.th-darmstadt.de>
-# 
-0	string		\033%-12345X at PJL	HP Printer Job Language data
->&0	string		>\0			%s			
->>&0	string		>\0			%s			
->>>&0	string		>\0			%s		
->>>>&0	string		>\0			%s		
-#>15	string		\ ENTER\ LANGUAGE\ =
-#>31	string		PostScript		PostScript
-
-# HP Printer Control Language, Daniel Quinlan (quinlan at yggdrasil.com)
-0	string		\033E\033	HP PCL printer data
->3	string		\&l0A		- default page size
->3	string		\&l1A		- US executive page size
->3	string		\&l2A		- US letter page size
->3	string		\&l3A		- US legal page size
->3	string		\&l26A		- A4 page size
->3	string		\&l80A		- Monarch envelope size
->3	string		\&l81A		- No. 10 envelope size
->3	string		\&l90A		- Intl. DL envelope size
->3	string		\&l91A		- Intl. C5 envelope size
->3	string		\&l100A		- Intl. B5 envelope size
->3	string		\&l-81A		- No. 10 envelope size (landscape)
->3	string		\&l-90A		- Intl. DL envelope size (landscape)
-
-# IMAGEN printer-ready files:
-0	string	@document(		Imagen printer
-# this only works if "language xxx" is first item in Imagen header.
->10	string	language\ impress	(imPRESS data)
->10	string	language\ daisy		(daisywheel text)
->10	string	language\ diablo	(daisywheel text)
->10	string	language\ printer	(line printer emulation)
->10	string	language\ tektronix	(Tektronix 4014 emulation)
-# Add any other languages that your Imagen uses - remember
-# to keep the word `text' if the file is human-readable.
-# [GRR 950115:  missing "postscript" or "ultrascript" (whatever it was called)]
-#
-# Now magic for IMAGEN font files...
-0	string		Rast		RST-format raster font data
->45	string		>0		face %
-# From Jukka Ukkonen
-0	string		\033[K\002\0\0\017\033(a\001\0\001\033(g	Canon Bubble Jet BJC formatted data
-
-# From <mike at flyn.org>
-# These are the /etc/magic entries to decode data sent to an Epson printer.
-0       string          \x1B\x40\x1B\x28\x52\x08\x00\x00REMOTE1P        Epson Stylus Color 460 data
-
-
-#------------------------------------------------------------------------------
-# zenographics:  file(1) magic for Zenographics ZjStream printer data
-# Rick Richardson  rickr at mn.rr.com
-0	string		JZJZ
->0x12	string		ZZ		Zenographics ZjStream printer data (big-endian)
-0	string		ZJZJ
->0x12	string		ZZ		Zenographics ZjStream printer data (little-endian)
-
-
-#------------------------------------------------------------------------------
-# Oak Technologies printer stream
-# Rick Richardson <rickr at mn.rr.com>
-0       string          OAK
->0x07	byte		0
->0x0b	byte		0	Oak Technologies printer stream
-
-# This would otherwise be recognized as PostScript - nick at debian.org
-0	string		%!VMF 		SunClock's Vector Map Format data
-
-#------------------------------------------------------------------------------
-# HP LaserJet 1000 series downloadable firmware file
-0	string	\xbe\xefABCDEFGH	HP LaserJet 1000 series downloadable firmware   
-
-#------------------------------------------------------------------------------
-# project:  file(1) magic for Project management
-# 
-# Magic strings for ftnchek project files. Alexander Mai
-0	string	FTNCHEK_\ P	project file for ftnchek
->10	string	1		version 2.7
->10	string	2		version 2.8 to 2.10
->10	string	3		version 2.11 or later
-
-#------------------------------------------------------------------------------
-# psdbms:  file(1) magic for psdatabase
-#
-0	belong&0xff00ffff	0x56000000	ps database
->1	string	>\0	version %s
->4	string	>\0	from kernel %s
-
-#------------------------------------------------------------------------------
-# psion:  file(1) magic for Psion handhelds data
-# from: Peter Breitenlohner <peb at mppmu.mpg.de>
-#
-0	lelong		0x10000037	Psion Series 5
->4	lelong		0x10000039	font file
->4	lelong		0x1000003A	printer driver
->4	lelong		0x1000003B	clipboard
->4	lelong		0x10000042	multi-bitmap image
->4	lelong		0x1000006A	application infomation file
->4	lelong		0x1000006D
->>8	lelong		0x1000007D	sketch image
->>8	lelong		0x1000007E	voice note
->>8	lelong		0x1000007F	word file
->>8	lelong		0x10000085	OPL program
->>8	lelong		0x10000088	sheet file
->>8	lelong		0x100001C4	EasyFax initialisation file
->4	lelong		0x10000073	OPO module
->4	lelong		0x10000074	OPL application
->4	lelong		0x1000008A	exported multi-bitmap image
-
-0	lelong		0x10000041	Psion Series 5 ROM multi-bitmap image
-
-0	lelong		0x10000050	Psion Series 5
->4	lelong		0x1000006D	database
->4	lelong		0x100000E4	ini file
-
-0	lelong		0x10000079	Psion Series 5 binary:
->4	lelong		0x00000000	DLL
->4	lelong		0x10000049	comms hardware library
->4	lelong		0x1000004A	comms protocol library
->4	lelong		0x1000005D	OPX
->4	lelong		0x1000006C	application
->4	lelong		0x1000008D	DLL
->4	lelong		0x100000AC	logical device driver
->4	lelong		0x100000AD	physical device driver
->4	lelong		0x100000E5	file transfer protocol
->4	lelong		0x100000E5	file transfer protocol
->4	lelong		0x10000140	printer defintion
->4	lelong		0x10000141	printer defintion
-
-0	lelong		0x1000007A	Psion Series 5 executable
-
-#------------------------------------------------------------------------------
-# pulsar:  file(1) magic for Pulsar POP3 daemon binary files
-#
-# http://pulsar.sourceforge.net
-# mailto:rok.papez at lugos.si
-#
-
-0	belong	0x1ee7f11e	Pulsar POP3 daemon mailbox cache file.
->4	ubelong	x		Version: %d.
->8	ubelong	x		\b%d
-
-
-#------------------------------------------------------------------------------
-# pyramid:  file(1) magic for Pyramids
-#
-# XXX - byte order?
-#
-0	long		0x50900107	Pyramid 90x family executable
-0	long		0x50900108	Pyramid 90x family pure executable
->16	long		>0		not stripped
-0	long		0x5090010b	Pyramid 90x family demand paged pure executable
->16	long		>0		not stripped
-
-#------------------------------------------------------------------------------
-# python:  file(1) magic for python
-#
-# From: David Necas <yeti at physics.muni.cz>
-# often the module starts with a multiline string
-0	string		"""	a python script text
-# MAGIC as specified in Python/import.c (1.5 to 2.3.0a)
-# 20121  ( YEAR - 1995 ) + MONTH  + DAY (little endian followed by "\r\n"
-0	belong		0x994e0d0a	python 1.5/1.6 byte-compiled
-0	belong		0x87c60d0a	python 2.0 byte-compiled
-0	belong		0x2aeb0d0a	python 2.1 byte-compiled
-0	belong		0x2ded0d0a	python 2.2 byte-compiled
-0	belong		0x3bf20d0a	python 2.3 byte-compiled
-
-#------------------------------------------------------------------------------
-# file(1) magic for revision control files
-# From Hendrik Scholz <hendrik at scholz.net>
-0   string /1\ :pserver:    cvs password text file
-
-#------------------------------------------------------------------------------
-# riff:  file(1) magic for RIFF format
-# See
-#
-#	http://www.seanet.com/users/matts/riffmci/riffmci.htm
-#
-# AVI section extended by Patrik R�dman <patrik+file-magic at iki.fi>
-#
-0	string		RIFF		RIFF (little-endian) data
-# RIFF Palette format
->8	string		PAL		\b, palette
->>16	leshort		x		\b, version %d
->>18	leshort		x		\b, %d entries
-# RIFF Device Independent Bitmap format
->8	string		RDIB		\b, device-independent bitmap
->>16	string		BM		
->>>30	leshort		12		\b, OS/2 1.x format
->>>>34	leshort		x		\b, %d x
->>>>36	leshort		x		%d
->>>30	leshort		64		\b, OS/2 2.x format
->>>>34	leshort		x		\b, %d x
->>>>36	leshort		x		%d
->>>30	leshort		40		\b, Windows 3.x format
->>>>34	lelong		x		\b, %d x
->>>>38	lelong		x		%d x
->>>>44	leshort		x		%d
-# RIFF MIDI format
->8	string		RMID		\b, MIDI
-# RIFF Multimedia Movie File format
->8	string		RMMP		\b, multimedia movie
-# Microsoft WAVE format (*.wav)
->8	string		WAVE		\b, WAVE audio
->>20	leshort		1		\b, Microsoft PCM
->>>34	leshort		>0		\b, %d bit
->>20	leshort		2		\b, Microsoft ADPCM
->>20	leshort		6		\b, ITU G.711 A-law
->>20	leshort		7		\b, ITU G.711 mu-law
->>20	leshort		17		\b, IMA ADPCM
->>20	leshort		20		\b, ITU G.723 ADPCM (Yamaha)
->>20	leshort		49		\b, GSM 6.10
->>20	leshort		64		\b, ITU G.721 ADPCM
->>20	leshort		80		\b, MPEG
->>20	leshort		85		\b, MPEG Layer 3
->>22	leshort		=1		\b, mono
->>22	leshort		=2		\b, stereo
->>22	leshort		>2		\b, %d channels
->>24	lelong		>0		%d Hz
-# Corel Draw Picture
->8	string		CDRA		\b, Corel Draw Picture
-# AVI == Audio Video Interleave
->8	string		AVI\040		\b, AVI
->>12    string          LIST
->>>20   string          hdrlavih
->>>>&36 lelong          x               \b, %lu x
->>>>&40 lelong          x               %lu,
->>>>&4  lelong          >1000000        <1 fps,
->>>>&4  lelong          1000000         1.00 fps,
->>>>&4  lelong          500000          2.00 fps,
->>>>&4  lelong          333333          3.00 fps,
->>>>&4  lelong          250000          4.00 fps,
->>>>&4  lelong          200000          5.00 fps,
->>>>&4  lelong          166667          6.00 fps,
->>>>&4  lelong          142857          7.00 fps,
->>>>&4  lelong          125000          8.00 fps,
->>>>&4  lelong          111111          9.00 fps,
->>>>&4  lelong          100000          10.00 fps,
-# ]9.9,10.1[
->>>>&4  lelong          <101010
->>>>>&-4        lelong  >99010
->>>>>>&-4       lelong  !100000         ~10 fps,
->>>>&4  lelong          83333           12.00 fps,
-# ]11.9,12.1[
->>>>&4  lelong          <84034
->>>>>&-4        lelong  >82645
->>>>>>&-4       lelong  !83333          ~12 fps,
->>>>&4  lelong          66667           15.00 fps,
-# ]14.9,15.1[
->>>>&4  lelong          <67114
->>>>>&-4        lelong  >66225
->>>>>>&-4       lelong  !66667          ~15 fps,
->>>>&4  lelong          50000           20.00 fps,
->>>>&4  lelong          41708           23.98 fps,
->>>>&4  lelong          41667           24.00 fps,
-# ]23.9,24.1[
->>>>&4  lelong          <41841
->>>>>&-4        lelong  >41494
->>>>>>&-4       lelong  !41708
->>>>>>>&-4      lelong  !41667          ~24 fps,
->>>>&4  lelong          40000           25.00 fps,
-# ]24.9,25.1[
->>>>&4  lelong          <40161
->>>>>&-4        lelong  >39841
->>>>>>&-4       lelong  !40000          ~25 fps,
->>>>&4  lelong          33367           29.97 fps,
->>>>&4  lelong          33333           30.00 fps,
-# ]29.9,30.1[
->>>>&4  lelong          <33445
->>>>>&-4        lelong  >33223
->>>>>>&-4       lelong  !33367
->>>>>>>&-4      lelong  !33333          ~30 fps,
->>>>&4  lelong          <32224          >30 fps,
-##>>>>&4  lelong          x               (%lu)
-##>>>>&20 lelong          x               %lu frames,
-# Note: The tests below assume that the AVI has 1 or 2 streams,
-#       "vids" optionally followed by "auds".
-#       (Should cover 99.9% of all AVIs.)
-# assuming avih length = 56
->>>88   string  LIST
->>>>96  string  strlstrh
->>>>>108        string  vids    video:
->>>>>>&0        lelong  0               uncompressed
-# skip past vids strh
->>>>>>(104.l+108)       string  strf
->>>>>>>(104.l+132)      lelong          1       RLE 8bpp
->>>>>>>(104.l+132)      string/c        cvid    Cinepak
->>>>>>>(104.l+132)      string/c        i263    Intel I.263
->>>>>>>(104.l+132)      string/c        iv32    Indeo 3.2
->>>>>>>(104.l+132)      string/c        iv41    Indeo 4.1
->>>>>>>(104.l+132)      string/c        iv50    Indeo 5.0
->>>>>>>(104.l+132)      string/c        mp42    Microsoft MPEG-4 v2
->>>>>>>(104.l+132)      string/c        mp43    Microsoft MPEG-4 v3
->>>>>>>(104.l+132)      string/c        mjpg    Motion JPEG
->>>>>>>(104.l+132)      string/c        div3    DivX 3
->>>>>>>>112             string/c        div3    Low-Motion
->>>>>>>>112             string/c        div4    Fast-Motion
->>>>>>>(104.l+132)      string/c        divx    DivX 4
->>>>>>>(104.l+132)      string/c        dx50    DivX 5
->>>>>>>(104.l+132)      string/c        xvid    XviD
->>>>>>>(104.l+132)      lelong  0
-##>>>>>>>(104.l+132)      string  x       (%.4s)
-# skip past first (video) LIST
->>>>(92.l+96)   string  LIST
->>>>>(92.l+104) string  strlstrh
->>>>>>(92.l+116)        string          auds    \b, audio:
-# auds strh length = 56:
->>>>>>>(92.l+172)       string          strf
->>>>>>>>(92.l+180)      leshort 0x0001  uncompressed PCM
->>>>>>>>(92.l+180)      leshort 0x0002  ADPCM
->>>>>>>>(92.l+180)      leshort 0x0055  MPEG-1 Layer 3
->>>>>>>>(92.l+180)      leshort 0x2000  Dolby AC3
->>>>>>>>(92.l+180)      leshort 0x0161  DivX
-##>>>>>>>>(92.l+180)      leshort x       (0x%.4x)
->>>>>>>>(92.l+182)      leshort 1       (mono,
->>>>>>>>(92.l+182)      leshort 2       (stereo,
->>>>>>>>(92.l+182)      leshort >2      (%d channels,
->>>>>>>>(92.l+184)      lelong  x       %d Hz)
-# auds strh length = 64:
->>>>>>>(92.l+180)       string          strf
->>>>>>>>(92.l+188)      leshort 0x0001  uncompressed PCM
->>>>>>>>(92.l+188)      leshort 0x0002  ADPCM
->>>>>>>>(92.l+188)      leshort 0x0055  MPEG-1 Layer 3
->>>>>>>>(92.l+188)      leshort 0x2000  Dolby AC3
->>>>>>>>(92.l+188)      leshort 0x0161  DivX
-##>>>>>>>>(92.l+188)      leshort x       (0x%.4x)
->>>>>>>>(92.l+190)      leshort 1       (mono,
->>>>>>>>(92.l+190)      leshort 2       (stereo,
->>>>>>>>(92.l+190)      leshort >2      (%d channels,
->>>>>>>>(92.l+192)      lelong  x       %d Hz)
-# Animated Cursor format
->8	string		ACON		\b, animated cursor
-# SoundFont 2 <mpruett at sgi.com>
->8	string		sfbk		SoundFont/Bank
-# MPEG-1 wrapped in a RIFF, apparently
->8      string          CDXA            \b, wrapped MPEG-1 (CDXA)
->8	string		4XMV		\b, 4X Movie file 
-
-#
-# XXX - some of the below may only appear in little-endian form.
-#
-# Also "MV93" appears to be for one form of Macromedia Director
-# files, and "GDMF" appears to be another multimedia format.
-#
-0	string		RIFX		RIFF (big-endian) data
-# RIFF Palette format
->8	string		PAL		\b, palette
->>16	beshort		x		\b, version %d
->>18	beshort		x		\b, %d entries
-# RIFF Device Independent Bitmap format
->8	string		RDIB		\b, device-independent bitmap
->>16	string		BM		
->>>30	beshort		12		\b, OS/2 1.x format
->>>>34	beshort		x		\b, %d x
->>>>36	beshort		x		%d
->>>30	beshort		64		\b, OS/2 2.x format
->>>>34	beshort		x		\b, %d x
->>>>36	beshort		x		%d
->>>30	beshort		40		\b, Windows 3.x format
->>>>34	belong		x		\b, %d x
->>>>38	belong		x		%d x
->>>>44	beshort		x		%d
-# RIFF MIDI format
->8	string		RMID		\b, MIDI
-# RIFF Multimedia Movie File format
->8	string		RMMP		\b, multimedia movie
-# Microsoft WAVE format (*.wav)
->8	string		WAVE		\b, WAVE audio
->>20	leshort		1		\b, Microsoft PCM
->>>34	leshort		>0		\b, %d bit
->>22	beshort		=1		\b, mono
->>22	beshort		=2		\b, stereo
->>22	beshort		>2		\b, %d channels
->>24	belong		>0		%d Hz
-# Corel Draw Picture
->8	string		CDRA		\b, Corel Draw Picture
-# AVI == Audio Video Interleave
->8	string		AVI\040		\b, AVI
-# Animated Cursor format
->8	string		ACON		\b, animated cursor
-# Notation Interchange File Format (big-endian only)
->8	string		NIFF		\b, Notation Interchange File Format
-# SoundFont 2 <mpruett at sgi.com>
->8	string		sfbk		SoundFont/Bank
-
-#------------------------------------------------------------------------------
-# apple:  file(1) magic for Apple file formats
-#
-0	string		FiLeStArTfIlEsTaRt	binscii (apple ][) text
-0	string		\x0aGL			Binary II (apple ][) data
-0	string		\x76\xff		Squeezed (apple ][) data
-0	string		NuFile			NuFile archive (apple ][) data
-0	string		N\xf5F\xe9l\xe5		NuFile archive (apple ][) data
-0	belong		0x00051600		AppleSingle encoded Macintosh file
-0	belong		0x00051607		AppleDouble encoded Macintosh file
-
-# magic for Newton PDA package formats
-# from Ruda Moura <ruda at helllabs.org>
-0	string	package0	Newton package, NOS 1.x,
->12	belong	&0x80000000	AutoRemove,
->12	belong	&0x40000000	CopyProtect,
->12	belong	&0x10000000	NoCompression,
->12	belong	&0x04000000	Relocation,
->12	belong	&0x02000000	UseFasterCompression,
->16	belong	x		version %d
-
-0	string	package1	Newton package, NOS 2.x,
->12	belong	&0x80000000	AutoRemove,
->12	belong	&0x40000000	CopyProtect,
->12	belong	&0x10000000	NoCompression,
->12	belong	&0x04000000	Relocation,
->12	belong	&0x02000000	UseFasterCompression,
->16	belong	x		version %d
-
-0	string	package4	Newton package,
->8	byte	8		NOS 1.x,
->8	byte	9		NOS 2.x,
->12	belong	&0x80000000	AutoRemove,
->12	belong	&0x40000000	CopyProtect,
->12	belong	&0x10000000	NoCompression,
-
-# The following entries for the Apple II are for files that have
-# been transferred as raw binary data from an Apple, without having
-# been encapsulated by any of the above archivers.
-#
-# In general, Apple II formats are hard to identify because Apple DOS
-# and especially Apple ProDOS have strong typing in the file system and
-# therefore programmers never felt much need to include type information
-# in the files themselves.
-#
-# Eric Fischer <enf at pobox.com>
-
-# AppleWorks word processor:
-#
-# This matches the standard tab stops for an AppleWorks file, but if
-# a file has a tab stop set in the first four columns this will fail.
-#
-# The "O" is really the magic number, but that's so common that it's
-# necessary to check the tab stops that follow it to avoid false positives.
-
-4       string          O====   AppleWorks word processor data
->85     byte&0x01       >0      \b, zoomed
->90     byte&0x01       >0      \b, paginated
->92     byte&0x01       >0      \b, with mail merge
-#>91    byte            x       \b, left margin %d
-
-# AppleWorks database:
-#
-# This isn't really a magic number, but it's the closest thing to one
-# that I could find.  The 1 and 2 really mean "order in which you defined
-# categories" and "left to right, top to bottom," respectively; the D and R
-# mean that the cursor should move either down or right when you press Return.
-
-#30	string		\x01D	AppleWorks database data
-#30	string		\x02D	AppleWorks database data
-#30	string		\x01R	AppleWorks database data
-#30	string		\x02R	AppleWorks database data
-
-# AppleWorks spreadsheet:
-#
-# Likewise, this isn't really meant as a magic number.  The R or C means
-# row- or column-order recalculation; the A or M means automatic or manual
-# recalculation.
-
-#131	string		RA	AppleWorks spreadsheet data
-#131	string		RM	AppleWorks spreadsheet data
-#131	string		CA	AppleWorks spreadsheet data
-#131	string		CM	AppleWorks spreadsheet data
-
-# Applesoft BASIC:
-#
-# This is incredibly sloppy, but will be true if the program was
-# written at its usual memory location of 2048 and its first line
-# number is less than 256.  Yuck.
-
-0       belong&0xff00ff 0x80000 Applesoft BASIC program data
-#>2     leshort         x       \b, first line number %d
-
-# ORCA/EZ assembler:
-# 
-# This will not identify ORCA/M source files, since those have
-# some sort of date code instead of the two zero bytes at 6 and 7
-# XXX Conflicts with ELF
-#4       belong&0xff00ffff       0x01000000      ORCA/EZ assembler source data
-#>5      byte                    x               \b, build number %d
-
-# Broderbund Fantavision
-#
-# I don't know what these values really mean, but they seem to recur.
-# Will they cause too many conflicts?
-
-# Probably :-)
-#2	belong&0xFF00FF		0x040008	Fantavision movie data
-
-# Some attempts at images.
-#
-# These are actually just bit-for-bit dumps of the frame buffer, so
-# there's really no reasonably way to distinguish them except for their
-# address (if preserved) -- 8192 or 16384 -- and their length -- 8192
-# or, occasionally, 8184.
-#
-# Nevertheless this will manage to catch a lot of images that happen
-# to have a solid-colored line at the bottom of the screen.
-
-8144	string	\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F	Apple II image with white background
-8144	string	\x55\x2A\x55\x2A\x55\x2A\x55\x2A	Apple II image with purple background
-8144	string	\x2A\x55\x2A\x55\x2A\x55\x2A\x55	Apple II image with green background
-8144	string	\xD5\xAA\xD5\xAA\xD5\xAA\xD5\xAA	Apple II image with blue background
-8144	string	\xAA\xD5\xAA\xD5\xAA\xD5\xAA\xD5	Apple II image with orange background
-
-# Beagle Bros. Apple Mechanic fonts
-
-0	belong&0xFF00FFFF	0x6400D000	Apple Mechanic font
-
-#------------------------------------------------------------------------------
-# macintosh description
-#
-# BinHex is the Macintosh ASCII-encoded file format (see also "apple")
-# Daniel Quinlan, quinlan at yggdrasil.com
-11	string	must\ be\ converted\ with\ BinHex	BinHex binary text
->41	string	x					\b, version %.3s
-
-# Stuffit archives are the de facto standard of compression for Macintosh
-# files obtained from most archives. (franklsm at tuns.ca)
-0	string		SIT!			StuffIt Archive (data)
->2	string		x			: %s
-0	string		SITD			StuffIt Deluxe (data)
->2	string		x			: %s
-0	string		Seg			StuffIt Deluxe Segment (data)
->2	string		x			: %s
-
-# Newer StuffIt archives (grant at netbsd.org)
-0	string		StuffIt			StuffIt Archive
->162	string		>0			: %s
-
-# Macintosh Applications and Installation binaries (franklsm at tuns.ca)
-0	string		APPL			Macintosh Application (data)
->2	string		x			\b: %s
-
-# Macintosh System files (franklsm at tuns.ca)
-0	string		zsys			Macintosh System File (data)
-0	string		FNDR			Macintosh Finder (data)
-0	string		libr			Macintosh Library (data)
->2	string		x			: %s
-0	string		shlb			Macintosh Shared Library (data)
->2	string		x			: %s
-0	string		cdev			Macintosh Control Panel (data)
->2	string		x			: %s
-0	string		INIT			Macintosh Extension (data)
->2	string		x			: %s
-0	string		FFIL			Macintosh Truetype Font (data)
->2	string		x			: %s
-0	string		LWFN			Macintosh Postscript Font (data)
->2	string		x			: %s
-
-# Additional Macintosh Files (franklsm at tuns.ca)
-0	string		PACT			Macintosh Compact Pro Archive (data)
->2	string		x			: %s
-0	string		ttro			Macintosh TeachText File (data)
->2	string		x			: %s
-0	string		TEXT			Macintosh TeachText File (data)
->2	string		x			: %s
-0	string		PDF			Macintosh PDF File (data)
->2	string		x			: %s
-
-# MacBinary format (Eric Fischer, enf at pobox.com)
-#
-# Unfortunately MacBinary doesn't really have a magic number prior
-# to the MacBinary III format.  The checksum is really the way to
-# do it, but the magic file format isn't up to the challenge.
-#
-# 0	byte		0
-# 1	byte				# filename length
-# 2	string				# filename
-# 65    string				# file type
-# 69	string				# file creator
-# 73	byte				# Finder flags
-# 74	byte		0
-# 75	beshort				# vertical posn in window
-# 77	beshort				# horiz posn in window
-# 79	beshort				# window or folder ID
-# 81    byte				# protected?
-# 82	byte		0
-# 83	belong				# length of data segment
-# 87	belong				# length of resource segment
-# 91	belong				# file creation date
-# 95	belong				# file modification date
-# 99	beshort				# length of comment after resource
-# 101	byte				# new Finder flags
-# 102	string		mBIN		# (only in MacBinary III)
-# 106	byte				# char. code of file name
-# 107	byte				# still more Finder flags
-# 116	belong				# total file length
-# 120	beshort				# length of add'l header
-# 122	byte		129		# for MacBinary II
-# 122	byte		130		# for MacBinary III
-# 123	byte		129		# minimum version that can read fmt
-# 124	beshort				# checksum
-#
-# This attempts to use the version numbers as a magic number, requiring
-# that the first one be 0x80, 0x81, 0x82, or 0x83, and that the second
-# be 0x81.  This works for the files I have, but maybe not for everyone's.
-
-# Unfortunately, this magic is quite weak - MPi
-#122	beshort&0xFCFF	0x8081		Macintosh MacBinary data
-
-# MacBinary I doesn't have the version number field at all, but MacBinary II
-# has been in use since 1987 so I hope there aren't many really old files
-# floating around that this will miss.  The original spec calls for using
-# the nulls in 0, 74, and 82 as the magic number.
-#
-# Another possibility, that would also work for MacBinary I, is to use
-# the assumption that 65-72 will all be ASCII (0x20-0x7F), that 73 will
-# have bits 1 (changed), 2 (busy), 3 (bozo), and 6 (invisible) unset,
-# and that 74 will be 0.  So something like
-# 
-# 71 	belong&0x80804EFF 0x00000000 	Macintosh MacBinary data
-# 
-# >73	byte&0x01	0x01		\b, inited
-# >73	byte&0x02	0x02		\b, changed
-# >73	byte&0x04	0x04		\b, busy
-# >73	byte&0x08	0x08		\b, bozo
-# >73	byte&0x10	0x10		\b, system
-# >73	byte&0x10	0x20		\b, bundle
-# >73	byte&0x10	0x40		\b, invisible
-# >73	byte&0x10	0x80		\b, locked
-
-#>65	string		x		\b, type "%4.4s"
-
-#>65	string		8BIM		(PhotoShop)
-#>65	string		ALB3		(PageMaker 3)
-#>65	string		ALB4		(PageMaker 4)
-#>65	string		ALT3		(PageMaker 3)
-#>65	string		APPL		(application)
-#>65	string		AWWP		(AppleWorks word processor)
-#>65	string		CIRC		(simulated circuit)
-#>65	string		DRWG		(MacDraw)
-#>65	string		EPSF		(Encapsulated PostScript)
-#>65	string		FFIL		(font suitcase)
-#>65	string		FKEY		(function key)
-#>65	string		FNDR		(Macintosh Finder)
-#>65	string		GIFf		(GIF image)
-#>65	string		Gzip		(GNU gzip)
-#>65	string		INIT		(system extension)
-#>65	string		LIB\ 		(library)
-#>65	string		LWFN		(PostScript font)
-#>65	string		MSBC		(Microsoft BASIC)
-#>65	string		PACT		(Compact Pro archive)
-#>65	string		PDF\ 		(Portable Document Format)
-#>65	string		PICT		(picture)
-#>65	string		PNTG		(MacPaint picture)
-#>65	string		PREF		(preferences)
-#>65	string		PROJ		(Think C project)
-#>65	string		QPRJ		(Think Pascal project)
-#>65	string		SCFL		(Defender scores)
-#>65	string		SCRN		(startup screen)
-#>65	string		SITD		(StuffIt Deluxe)
-#>65	string		SPn3		(SuperPaint)
-#>65	string		STAK		(HyperCard stack)
-#>65	string		Seg\ 		(StuffIt segment)
-#>65	string		TARF		(Unix tar archive)
-#>65	string		TEXT		(ASCII)
-#>65	string		TIFF		(TIFF image)
-#>65	string		TOVF		(Eudora table of contents)
-#>65	string		WDBN		(Microsoft Word word processor)
-#>65	string		WORD		(MacWrite word processor)
-#>65	string		XLS\ 		(Microsoft Excel)
-#>65	string		ZIVM		(compress (.Z))
-#>65	string		ZSYS		(Pre-System 7 system file)
-#>65	string		acf3		(Aldus FreeHand)
-#>65	string		cdev		(control panel)
-#>65	string		dfil		(Desk Acessory suitcase)
-#>65	string		libr		(library)
-#>65	string		nX^d		(WriteNow word processor)
-#>65	string		nX^w		(WriteNow dictionary)
-#>65	string		rsrc		(resource)
-#>65	string		scbk		(Scrapbook)
-#>65	string		shlb		(shared library)
-#>65	string		ttro		(SimpleText read-only)
-#>65	string		zsys		(system file)
-
-#>69	string		x		\b, creator "%4.4s"
-
-# Somewhere, Apple has a repository of registered Creator IDs.  These are
-# just the ones that I happened to have files from and was able to identify.
-
-#>69	string		8BIM		(Adobe Photoshop)
-#>69	string		ALD3		(PageMaker 3)
-#>69	string		ALD4		(PageMaker 4)
-#>69	string		ALFA		(Alpha editor)
-#>69	string		APLS		(Apple Scanner)
-#>69	string		APSC		(Apple Scanner)
-#>69	string		BRKL		(Brickles)
-#>69	string		BTFT		(BitFont)
-#>69	string		CCL2 		(Common Lisp 2)
-#>69	string		CCL\ 		(Common Lisp)
-#>69	string		CDmo		(The Talking Moose)
-#>69	string		CPCT		(Compact Pro)
-#>69	string		CSOm		(Eudora)
-#>69	string		DMOV		(Font/DA Mover)
-#>69	string		DSIM		(DigSim)
-#>69	string		EDIT		(Macintosh Edit)
-#>69	string		ERIK		(Macintosh Finder)
-#>69	string		EXTR		(self-extracting archive)
-#>69	string		Gzip		(GNU gzip)
-#>69	string		KAHL		(Think C)
-#>69	string		LWFU		(LaserWriter Utility)
-#>69	string		LZIV		(compress)
-#>69	string		MACA		(MacWrite)
-#>69	string		MACS		(Macintosh operating system)
-#>69	string		MAcK		(MacKnowledge terminal emulator)
-#>69	string		MLND		(Defender)
-#>69	string		MPNT		(MacPaint)
-#>69	string		MSBB		(Microsoft BASIC (binary))
-#>69	string		MSWD		(Microsoft Word)
-#>69	string		NCSA		(NCSA Telnet)
-#>69	string		PJMM		(Think Pascal)
-#>69	string		PSAL		(Hunt the Wumpus)
-#>69	string		PSI2		(Apple File Exchange)
-#>69	string		R*ch		(BBEdit)
-#>69	string		RMKR		(Resource Maker)
-#>69	string		RSED		(Resource Editor)
-#>69	string		Rich		(BBEdit)
-#>69	string		SIT!		(StuffIt)
-#>69	string		SPNT		(SuperPaint)
-#>69	string		Unix		(NeXT Mac filesystem)
-#>69	string		VIM!		(Vim editor)
-#>69	string		WILD		(HyperCard)
-#>69	string		XCEL		(Microsoft Excel)
-#>69	string		aCa2		(Fontographer)
-#>69	string		aca3		(Aldus FreeHand)
-#>69	string		dosa		(Macintosh MS-DOS file system)
-#>69	string		movr		(Font/DA Mover)
-#>69	string		nX^n		(WriteNow)
-#>69	string		pdos		(Apple ProDOS file system)
-#>69	string		scbk		(Scrapbook)
-#>69	string		ttxt		(SimpleText)
-#>69	string		ufox		(Foreign File Access)
-
-# Just in case...
-
-102	string		mBIN		MacBinary III data with surprising version number
-
-# sas magic from Bruce Foster (bef at nwu.edu)
-#
-#0	string		SAS		SAS
-#>8	string		x		%s
-0	string		SAS		SAS
->24	string		DATA		data file
->24	string		CATALOG		catalog
->24	string		INDEX		data file index
->24	string		VIEW		data view
-# sas 7+ magic from Reinhold Koch (reinhold.koch at roche.com)
-#
-0x54    string          SAS             SAS 7+
->0x9C   string          DATA            data file
->0x9C   string          CATALOG         catalog
->0x9C   string          INDEX           data file index
->0x9C   string          VIEW            data view
-
-# spss magic for SPSS system and portable files, 
-#	 from Bruce Foster (bef at nwu.edu).
-
-0	long		0xc1e2c3c9	SPSS Portable File
->40	string 		x		%s
-
-0	string		$FL2		SPSS System File
->24	string		x		%s
-
-# Macintosh filesystem data
-# From "Tom N Harris" <telliamed at mac.com>
-# Fixed HFS+ and Partition map magic: Ethan Benson <erbenson at alaska.net>
-# The MacOS epoch begins on 1 Jan 1904 instead of 1 Jan 1970, so these
-# entries depend on the data arithmetic added after v.35
-# There's also some Pascal strings in here, ditto...
-
-# The boot block signature, according to IM:Files, is 
-# "for HFS volumes, this field always contains the value 0x4C4B."
-# But if this is true for MFS or HFS+ volumes, I don't know.
-# Alternatively, the boot block is supposed to be zeroed if it's
-# unused, so a simply >0 should suffice.
-
-0x400	beshort			0xD2D7		Macintosh MFS data
->0	beshort			0x4C4B		(bootable)
->0x40a	beshort			&0x8000		(locked)
->0x402	beldate-0x7C25B080	x		created: %s,
->0x406	beldate-0x7C25B080	>0		last backup: %s,
->0x414	belong			x		block size: %d,
->0x412	beshort			x		number of blocks: %d,
->0x424	pstring			x		volume name: %s
-
-# "BD" is has many false positives
-#0x400	beshort			0x4244		Macintosh HFS data
-#>0	beshort			0x4C4B		(bootable)
-#>0x40a	beshort			&0x8000		(locked)
-#>0x40a	beshort			^0x0100		(mounted)
-#>0x40a	beshort			&0x0200		(spared blocks)
-#>0x40a	beshort			&0x0800		(unclean)
-#>0x47C	beshort			0x482B		(Embedded HFS+ Volume)
-#>0x402	beldate-0x7C25B080	x		created: %s,
-#>0x406	beldate-0x7C25B080	x		last modified: %s,
-#>0x440	beldate-0x7C25B080	>0		last backup: %s,
-#>0x414	belong			x		block size: %d,
-#>0x412	beshort			x		number of blocks: %d,
-#>0x424	pstring			x		volume name: %s
-
-0x400	beshort			0x482B		Macintosh HFS Extended
->&0	beshort			x		version %d data
->0	beshort			0x4C4B		(bootable)
->0x404	belong			^0x00000100	(mounted)
->&2	belong			&0x00000200	(spared blocks)
->&2	belong			&0x00000800	(unclean)
->&2	belong			&0x00008000	(locked)
->&6	string			x		last mounted by: '%.4s',
-# really, that should be treated as a belong and we print a string
-# based on the value. TN1150 only mentions '8.10' for "MacOS 8.1"
->&14	beldate-0x7C25B080	x		created: %s,
-# only the creation date is local time, all other timestamps in HFS+ are UTC.
->&18	bedate-0x7C25B080	x		last modified: %s,
->&22	bedate-0x7C25B080	>0		last backup: %s,
->&26	bedate-0x7C25B080	>0		last checked: %s,
->&38	belong			x		block size: %d,
->&42	belong			x		number of blocks: %d,
->&46	belong			x		free blocks: %d
-
-# I don't think this is really necessary since it doesn't do much and 
-# anything with a valid driver descriptor will also have a valid
-# partition map
-#0		beshort		0x4552		Apple Device Driver data
-#>&24		beshort		=1		\b, MacOS
-
-# Is that the partition type a cstring or a pstring? Well, IM says "strings 
-# shorter than 32 bytes must be terminated with NULL" so I'll treat it as a 
-# cstring. Of course, partitions can contain more than four entries, but 
-# what're you gonna do?
-0x200		beshort		0x504D		Apple Partition data
->0x2		beshort		x		block size: %d,
->0x230		string		x		first type: %s,
->0x210		string		x		name: %s,
->0x254		belong		x		number of blocks: %d,
->0x400		beshort		0x504D		
->>0x430		string		x		second type: %s,
->>0x410		string		x		name: %s,
->>0x454		belong		x		number of blocks: %d,
->>0x800		beshort		0x504D		
->>>0x830	string		x		third type: %s,
->>>0x810	string		x		name: %s,
->>>0x854	belong		x		number of blocks: %d,
->>>0xa00	beshort		0x504D		
->>>>0xa30	string		x		fourth type: %s,
->>>>0xa10	string		x		name: %s,
->>>>0xa54	belong		x		number of blocks: %d
-# AFAIK, only the signature is different
-0x200		beshort		0x5453		Apple Old Partition data
->0x2		beshort		x		block size: %d,
->0x230		string		x		first type: %s,
->0x210		string		x		name: %s,
->0x254		belong		x		number of blocks: %d,
->0x400		beshort		0x504D		
->>0x430		string		x		second type: %s,
->>0x410		string		x		name: %s,
->>0x454		belong		x		number of blocks: %d,
->>0x800		beshort		0x504D		
->>>0x830	string		x		third type: %s,
->>>0x810	string		x		name: %s,
->>>0x854	belong		x		number of blocks: %d,
->>>0xa00	beshort		0x504D		
->>>>0xa30	string		x		fourth type: %s,
->>>>0xa10	string		x		name: %s,
->>>>0xa54	belong		x		number of blocks: %d
-
-# From: Remi Mommsen <mommsen at slac.stanford.edu>
-0		string		BOMStore	Mac OS X bill of materials (BOM) fil
-#------------------------------------------------------------------------------
-#
-# RPM: file(1) magic for Red Hat Packages   Erik Troan (ewt at redhat.com)
-#
-0	beshort		0xedab
->2	beshort		0xeedb		RPM
->>4	byte		x		v%d
->>6	beshort		0		bin
->>6	beshort		1		src
->>8	beshort		1		i386
->>8	beshort		2		Alpha
->>8	beshort		3		Sparc
->>8	beshort		4		MIPS
->>8	beshort		5		PowerPC
->>8	beshort		6		68000
->>8	beshort		7	SGI
->>8	beshort		8		RS6000
->>8	beshort		9		IA64
->>8	beshort		10		Sparc64
->>8	beshort		11		MIPSel
->>8	beshort		12		ARM
->>10	string		x		%s
-
-#------------------------------------------------------------------------------
-# rtf:	file(1) magic for Rich Text Format (RTF)
-#
-# Duncan P. Simpson, D.P.Simpson at dcs.warwick.ac.uk
-#
-0	string		{\\rtf		Rich Text Format data,
->5	byte		x		version %c,
->6	string		\\ansi		ANSI
->6	string		\\mac		Apple Macintosh
->6	string		\\pc		IBM PC, code page 437
->6	string		\\pca		IBM PS/2, code page 850
-
-#------------------------------------------------------------------------------
-# sc:  file(1) magic for "sc" spreadsheet
-#
-38	string		Spreadsheet	sc spreadsheet file
-
-#------------------------------------------------------------------------------
-# sccs:  file(1) magic for SCCS archives
-#
-# SCCS archive structure:
-# \001h01207
-# \001s 00276/00000/00000
-# \001d D 1.1 87/09/23 08:09:20 ian 1 0
-# \001c date and time created 87/09/23 08:09:20 by ian
-# \001e
-# \001u
-# \001U
-# ... etc.
-# Now '\001h' happens to be the same as the 3B20's a.out magic number (0550).
-# *Sigh*. And these both came from various parts of the USG.
-# Maybe we should just switch everybody from SCCS to RCS!
-# Further, you can't just say '\001h0', because the five-digit number
-# is a checksum that could (presumably) have any leading digit,
-# and we don't have regular expression matching yet. 
-# Hence the following official kludge:
-8	string		\001s\ 			SCCS archive data
-
-#------------------------------------------------------------------------------
-# sendmail:  file(1) magic for sendmail config files
-#
-# XXX - byte order?
-#
-0	byte	046	  Sendmail frozen configuration 
->16	string	>\0	  - version %s
-0	short	0x271c	  Sendmail frozen configuration
->16	string	>\0	  - version %s
-
-#------------------------------------------------------------------------------
-# sendmail:  file(1) magic for sendmail m4(1) files
-#
-# From Hendrik Scholz <hendrik at scholz.net>
-# i.e. files in /usr/share/sendmail/cf/
-#
-0   string  divert(-1)\n    sendmail m4 text file
-
-
-#------------------------------------------------------------------------------
-# sequent:  file(1) magic for Sequent machines
-#
-# Sequent information updated by Don Dwiggins <atsun!dwiggins>.
-# For Sequent's multiprocessor systems (incomplete).
-0	lelong	0x00ea        	BALANCE NS32000 .o
->16	lelong	>0		not stripped
->124	lelong	>0		version %ld
-0	lelong	0x10ea        	BALANCE NS32000 executable (0 @ 0)
->16	lelong  >0            	not stripped
->124	lelong	>0		version %ld
-0	lelong	0x20ea        	BALANCE NS32000 executable (invalid @ 0)
->16	lelong  >0            	not stripped
->124	lelong	>0		version %ld
-0	lelong	0x30ea        	BALANCE NS32000 standalone executable
->16	lelong  >0          	not stripped
->124	lelong	>0		version %ld
-#
-# Symmetry information added by Jason Merrill <jason at jarthur.claremont.edu>.
-# Symmetry magic nums will not be reached if DOS COM comes before them;
-# byte 0xeb is matched before these get a chance.
-0	leshort	0x12eb		SYMMETRY i386 .o
->16	lelong	>0		not stripped
->124	lelong	>0		version %ld
-0	leshort	0x22eb		SYMMETRY i386 executable (0 @ 0)
->16	lelong	>0		not stripped
->124	lelong	>0		version %ld
-0	leshort	0x32eb		SYMMETRY i386 executable (invalid @ 0)
->16	lelong	>0		not stripped
->124	lelong	>0		version %ld
-0	leshort	0x42eb		SYMMETRY i386 standalone executable
->16	lelong	>0		not stripped
->124	lelong	>0		version %ld
-
-#------------------------------------------------------------------------------
-# sgi:  file(1) magic for Silicon Graphics applications
-
-#
-#
-# Performance Co-Pilot file types
-0	string	PmNs				PCP compiled namespace (V.0)
-0	string	PmN				PCP compiled namespace
->3	string	>\0				(V.%1.1s)
-3	belong	0x84500526			PCP archive
->7	byte	x				(V.%d)
->20	belong	-2				temporal index
->20	belong	-1				metadata
->20	belong	0				log volume #0
->20	belong	>0				log volume #%ld
->24	string	>\0				host: %s
-0	string	PCPFolio			PCP 
->9	string	Version:			Archive Folio
->18	string	>\0				(V.%s)
-0	string	#pmchart			PCP pmchart view
->9	string	Version
->17	string	>\0				(V%-3.3s)
-0	string	pmview				PCP pmview config
->7	string	Version
->15	string	>\0				(V%-3.3s)
-0	string	#pmlogger			PCP pmlogger config
->10	string	Version
->18	string	>\0				(V%1.1s)
-0	string	#pmdahotproc			PCP pmdahotproc config
->13	string	Version
->21	string	>\0				(V%-3.3s)
-0	string	PcPh				PCP Help 
->4	string	1				Index
->4	string	2				Text
->5	string	>\0				(V.%1.1s)
-0	string	#pmieconf-rules			PCP pmieconf rules
->16	string	>\0				(V.%1.1s)
-3	string	pmieconf-pmie			PCP pmie config
->17	string	>\0				(V.%1.1s)
-
-# SpeedShop data files
-0	lelong	0x13130303			SpeedShop data file
-
-# mdbm files
-0	lelong	0x01023962			mdbm file, version 0 (obsolete)
-0	string	mdbm				mdbm file,
->5	byte	x				version %d,
->6	byte	x				2^%d pages,
->7	byte	x				pagesize 2^%d,
->17	byte	x				hash %d,
->11	byte	x				dataformat %d
-
-# Alias|Wavefront Maya files
-0	string	//Maya ASCII	Alias|Wavefront Maya Ascii File,
->13	lelong	x	version %s
-8	string	MAYAFOR4	Alias|Wavefront Maya Binary File,
->32	lelong	x	version %s scene
-8	string	MayaFOR4	Alias|Wavefront Maya Binary File,
->32	lelong	x	version %s scene
-8	string	CIMG		Alias|Wavefront Maya Image File
-8	string	DEEP		Alias|Wavefront Maya Image File
-
-#------------------------------------------------------------------------------
-# sgml:  file(1) magic for Standard Generalized Markup Language
-# HyperText Markup Language (HTML) is an SGML document type,
-# from Daniel Quinlan (quinlan at yggdrasil.com)
-# adapted to string extenstions by Anthon van der Neut <anthon at mnt.org)
-0   string/cB	\<!DOCTYPE\ html	HTML document text
-0   string/cb	\<head			HTML document text
-0   string/cb	\<title			HTML document text
-0   string/cb	\<html			HTML document text
-
-# Extensible markup language (XML), a subset of SGML
-# from Marc Prud'hommeaux (marc at apocalypse.org)
-0	string/cb	\<?xml			XML document text
-0	string		\<?xml\ version "	XML
-0	string		\<?xml\ version="	XML
->15	string		>\0			%.3s document text
->>23	string		\<xsl:stylesheet	(XSL stylesheet)
->>24	string		\<xsl:stylesheet	(XSL stylesheet)
-0	string/b	\<?xml			XML document text
-0	string/cb	\<?xml			broken XML document text
-
-
-# SGML, mostly from rph at sq
-0   string/cb	\<!doctype		exported SGML document text
-0   string/cb	\<!subdoc		exported SGML subdocument text
-0   string/cb	\<!--			exported SGML document text
-
-# Web browser cookie files
-# (Mozilla, Galeon, Netscape 4, Konqueror..)
-# Ulf Harnhammar <ulfh at update.uu.se>
-0	string	#\ HTTP\ Cookie\ File	Web browser cookie text
-0	string	#\ Netscape\ HTTP\ Cookie\ File	Netscape cookie text
-0	string	#\ KDE\ Cookie\ File	Konqueror cookie text
-
-#------------------------------------------------------------------------
-# file(1) magic for sharc files
-#
-# SHARC DSP, MIDI SysEx and RiscOS filetype definitions added by 
-# FutureGroove Music (dsp at futuregroove.de)
-
-#------------------------------------------------------------------------
-0	string			Draw		RiscOS Drawfile
-0	string			PACK		RiscOS PackdDir archive
-
-#------------------------------------------------------------------------
-# SHARC DSP stuff (based on the FGM SHARC DSP SDK)
-
-0	string			!		Assembler source
-0	string			Analog		ADi asm listing file
-0	string			.SYSTEM		SHARC architecture file
-0	string			.system		SHARC architecture file
-
-0	leshort			0x521C		SHARC COFF binary
->2	leshort			>1		, %hd sections
->>12	lelong			>0		, not stripped
-
-#------------------------------------------------------------------------------
-# sinclair:  file(1) sinclair QL
-
-# additions to /etc/magic by Thomas M. Ott (ThMO)
-
-# Sinclair QL floppy disk formats (ThMO)
-0	string	=QL5		QL disk dump data,
->3	string	=A		720 KB,
->3	string	=B		1.44 MB,
->3	string	=C		3.2 MB,
->4	string	>\0		label:%.10s
-
-# Sinclair QL OS dump (ThMO)
-# (NOTE: if `file' would be able to use indirect references in a endian format
-#	 differing from the natural host format, this could be written more
-#	 reliably and faster...)
-#
-# we *can't* lookup QL OS code dumps, because `file' is UNABLE to read more
-# than the first 8K of a file... #-(
-#
-#0		belong	=0x30000
-#>49124		belong	<47104
-#>>49128		belong	<47104
-#>>>49132	belong	<47104
-#>>>>49136	belong	<47104	QL OS dump data,
-#>>>>>49148	string	>\0	type %.3s,
-#>>>>>49142	string	>\0	version %.4s
-
-# Sinclair QL firmware executables (ThMO)
-0	string	NqNqNq`\004	QL firmware executable (BCPL)
-
-# Sinclair QL libraries (ThMO)
-0	beshort	=0xFB01		QL library archive data
-
-# Sinclair QL executbables (ThMO)
-6	beshort	=0x4AFB		QL executable,
->10	string	=\0		un-named
->8	beshort	=1
->>10	string	>\0		named: %.1s
->8	beshort	=2
->>10	string	>\0		named: %.2s
->8	beshort	=3
->>10	string	>\0		named: %.3s
->8	beshort	=4
->>10	string	>\0		named: %.4s
->8	beshort	=5
->>10	string	>\0		named: %.5s
->8	beshort	=6
->>10	string	>\0		named: %.6s
->8	beshort	=7
->>10	string	>\0		named: %.7s
->8	beshort	=8
->>10	string	>\0		named: %.8s
->8	beshort	=9
->>10	string	>\0		named: %.9s
->8	beshort	=10
->>10	string	>\0		named: %.10s
->8	beshort	=11
->>10	string	>\0		named: %.11s
->8	beshort	=12
->>10	string	>\0		named: %.12s
->8	beshort	=13
->>10	string	>\0		named: %.13s
->8	beshort	=14
->>10	string	>\0		named: %.14s
->8	beshort	=15
->>10	string	>\0		named: %.15s
->8	beshort	=16
->>10	string	>\0		named: %.16s
->8	beshort	=17
->>10	string	>\0		named: %.17s
->8	beshort	=18
->>10	string	>\0		named: %.18s
->8	beshort	=19
->>10	string	>\0		named: %.19s
->8	beshort	=20
->>10	string	>\0		named: %.20s
->8	beshort	>20
->>10	string	>\0		(truncated) named: %.20s
-
-# Sinclair QL rom (ThMO)
-0	belong	=0x4AFB0001	QL plugin-ROM data,
->10	string	=\0		un-named
->8	beshort	=1
->>10	string	>\0		named: %.1s
->8	beshort	=2
->>10	string	>\0		named: %.2s
->8	beshort	=3
->>10	string	>\0		named: %.3s
->8	beshort	=4
->>10	string	>\0		named: %.4s
->8	beshort	=5
->>10	string	>\0		named: %.5s
->8	beshort	=6
->>10	string	>\0		named: %.6s
->8	beshort	=7
->>10	string	>\0		named: %.7s
->8	beshort	=8
->>10	string	>\0		named: %.8s
->8	beshort	=9
->>10	string	>\0		named: %.9s
->8	beshort	=10
->>10	string	>\0		named: %.10s
->8	beshort	=11
->>10	string	>\0		named: %.11s
->8	beshort	=12
->>10	string	>\0		named: %.12s
->8	beshort	=13
->>10	string	>\0		named: %.13s
->8	beshort	=14
->>10	string	>\0		named: %.14s
->8	beshort	=15
->>10	string	>\0		named: %.15s
->8	beshort	=16
->>10	string	>\0		named: %.16s
->8	beshort	=17
->>10	string	>\0		named: %.17s
->8	beshort	=18
->>10	string	>\0		named: %.18s
->8	beshort	=19
->>10	string	>\0		named: %.19s
->8	beshort	=20
->>10	string	>\0		named: %.20s
->8	beshort	>20
->>10	string	>\0		(truncated) named: %.20s
-
-#------------------------------------------------------------------------------
-# Sketch Drawings: http://sketch.sourceforge.net/ 
-# From: Edwin Mons <e at ik.nu>
-0	string	##Sketch	Sketch document text
-
-#-----------------------------------------------
-# GNU Smalltalk image, starting at version 1.6.2
-# From: catull_us at yahoo.com
-#
-0	string	GSTIm\0\0	GNU SmallTalk
-# little-endian
->7	byte&1	=0		LE image version
->>10	byte	x		%d.
->>9	byte	x		\b%d.
->>8	byte	x		\b%d
-#>>12	lelong	x		, data: %ld
-#>>16	lelong	x		, table: %ld
-#>>20	lelong	x		, memory: %ld
-# big-endian
->7	byte&1	=1		BE image version
->>8	byte	x		%d.
->>9	byte	x		\b%d.
->>10	byte	x		\b%d
-#>>12	belong	x		, data: %ld
-#>>16	belong	x		, table: %ld
-#>>20	belong	x		, memory: %ld
-
-
-
-#------------------------------------------------------------------------------
-# sniffer:  file(1) magic for packet capture files
-#
-# From: guy at alum.mit.edu (Guy Harris)
-#
-
-#
-# Microsoft Network Monitor 1.x capture files.
-#
-0	string		RTSS		NetMon capture file
->5	byte		x		- version %d
->4	byte		x		\b.%d
->6	leshort		0		(Unknown)
->6	leshort		1		(Ethernet)
->6	leshort		2		(Token Ring)
->6	leshort		3		(FDDI)
->6	leshort		4		(ATM)
-
-#
-# Microsoft Network Monitor 2.x capture files.
-#
-0	string		GMBU		NetMon capture file
->5	byte		x		- version %d
->4	byte		x		\b.%d
->6	leshort		0		(Unknown)
->6	leshort		1		(Ethernet)
->6	leshort		2		(Token Ring)
->6	leshort		3		(FDDI)
->6	leshort		4		(ATM)
-
-#
-# Network General Sniffer capture files.
-# Sorry, make that "Network Associates Sniffer capture files."
-#
-0	string		TRSNIFF\ data\ \ \ \ \032	Sniffer capture file
->33	byte		2		(compressed)
->23	leshort		x		- version %d
->25	leshort		x		\b.%d
->32	byte		0		(Token Ring)
->32	byte		1		(Ethernet)
->32	byte		2		(ARCNET)
->32	byte		3		(StarLAN)
->32	byte		4		(PC Network broadband)
->32	byte		5		(LocalTalk)
->32	byte		6		(Znet)
->32	byte		7		(Internetwork Analyzer)
->32	byte		9		(FDDI)
->32	byte		10		(ATM)
-
-#
-# Cinco Networks NetXRay capture files.
-# Sorry, make that "Network General Sniffer Basic capture files."
-# Sorry, make that "Network Associates Sniffer Basic capture files."
-# Sorry, make that "Network Associates Sniffer Basic, and Windows
-# Sniffer Pro", capture files."
-#
-0	string		XCP\0		NetXRay capture file
->4	string		>\0		- version %s
->44	leshort		0		(Ethernet)
->44	leshort		1		(Token Ring)
->44	leshort		2		(FDDI)
->44	leshort		3		(WAN)
->44	leshort		8		(ATM)
->44	leshort		9		(802.11)
-
-#
-# "libpcap" capture files.
-# (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
-# the main program that uses that format, but there are other programs
-# that use "libpcap", or that use the same capture file format.)
-#
-0	ubelong		0xa1b2c3d4	tcpdump capture file (big-endian)
->4	beshort		x		- version %d
->6	beshort		x		\b.%d
->20	belong		0		(No link-layer encapsulation
->20	belong		1		(Ethernet
->20	belong		2		(3Mb Ethernet
->20	belong		3		(AX.25
->20	belong		4		(ProNET
->20	belong		5		(CHAOS
->20	belong		6		(Token Ring
->20	belong		7		(BSD ARCNET
->20	belong		8		(SLIP
->20	belong		9		(PPP
->20	belong		10		(FDDI
->20	belong		11		(RFC 1483 ATM
->20	belong		12		(raw IP
->20	belong		13		(BSD/OS SLIP
->20	belong		14		(BSD/OS PPP
->20	belong		50		(PPP or Cisco HDLC
->20	belong		51		(PPP-over-Ethernet
->20	belong		100		(RFC 1483 ATM
->20	belong		101		(raw IP
->20	belong		102		(BSD/OS SLIP
->20	belong		103		(BSD/OS PPP
->20	belong		104		(BSD/OS Cisco HDLC
->20	belong		105		(802.11
->20	belong		106		(Linux Classical IP over ATM
->20	belong		107		(Frame Relay
->20	belong		108		(OpenBSD loopback
->20	belong		109		(OpenBSD IPsec encrypted
->20	belong		112		(Cisco HDLC
->20	belong		113		(Linux "cooked"
->20	belong		114		(LocalTalk
->20	belong		117		(OpenBSD PFLOG
->20	belong		119		(802.11 with Prism header
->20	belong		123		(SunATM
->20	belong		127		(802.11 with radiotap header
->20	belong		129		(Linux ARCNET
->20	belong		140		(MTP2
->20	belong		141		(MTP3
->20	belong		143		(DOCSIS
->20	belong		144		(IrDA
->16	belong		x		\b, capture length %d)
-0	ulelong		0xa1b2c3d4	tcpdump capture file (little-endian)
->4	leshort		x		- version %d
->6	leshort		x		\b.%d
->20	lelong		0		(No link-layer encapsulation
->20	lelong		1		(Ethernet
->20	lelong		2		(3Mb Ethernet
->20	lelong		3		(AX.25
->20	lelong		4		(ProNET
->20	lelong		5		(CHAOS
->20	lelong		6		(Token Ring
->20	lelong		7		(ARCNET
->20	lelong		8		(SLIP
->20	lelong		9		(PPP
->20	lelong		10		(FDDI
->20	lelong		11		(RFC 1483 ATM
->20	lelong		12		(raw IP
->20	lelong		13		(BSD/OS SLIP
->20	lelong		14		(BSD/OS PPP
->20	lelong		50		(PPP or Cisco HDLC
->20	lelong		51		(PPP-over-Ethernet
->20	lelong		100		(RFC 1483 ATM
->20	lelong		101		(raw IP
->20	lelong		102		(BSD/OS SLIP
->20	lelong		103		(BSD/OS PPP
->20	lelong		104		(BSD/OS Cisco HDLC
->20	lelong		105		(802.11
->20	lelong		106		(Linux Classical IP over ATM
->20	lelong		107		(Frame Relay
->20	lelong		108		(OpenBSD loopback
->20	lelong		109		(OpenBSD IPSEC encrypted
->20	lelong		112		(Cisco HDLC
->20	lelong		113		(Linux "cooked"
->20	lelong		114		(LocalTalk
->20	lelong		117		(OpenBSD PFLOG
->20	lelong		119		(802.11 with Prism header
->20	lelong		123		(SunATM
->20	lelong		127		(802.11 with radiotap header
->20	lelong		129		(Linux ARCNET
->20	lelong		140		(MTP2
->20	lelong		141		(MTP3
->20	lelong		143		(DOCSIS
->20	lelong		144		(IrDA
->16	lelong		x		\b, capture length %d)
-
-#
-# "libpcap"-with-Alexey-Kuznetsov's-patches capture files.
-# (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
-# the main program that uses that format, but there are other programs
-# that use "libpcap", or that use the same capture file format.)
-#
-0	ubelong		0xa1b2cd34	extended tcpdump capture file (big-endian)
->4	beshort		x		- version %d
->6	beshort		x		\b.%d
->20	belong		0		(No link-layer encapsulation
->20	belong		1		(Ethernet
->20	belong		2		(3Mb Ethernet
->20	belong		3		(AX.25
->20	belong		4		(ProNET
->20	belong		5		(CHAOS
->20	belong		6		(Token Ring
->20	belong		7		(ARCNET
->20	belong		8		(SLIP
->20	belong		9		(PPP
->20	belong		10		(FDDI
->20	belong		11		(RFC 1483 ATM
->20	belong		12		(raw IP
->20	belong		13		(BSD/OS SLIP
->20	belong		14		(BSD/OS PPP
->16	belong		x		\b, capture length %d)
-0	ulelong		0xa1b2cd34	extended tcpdump capture file (little-endian)
->4	leshort		x		- version %d
->6	leshort		x		\b.%d
->20	lelong		0		(No link-layer encapsulation
->20	lelong		1		(Ethernet
->20	lelong		2		(3Mb Ethernet
->20	lelong		3		(AX.25
->20	lelong		4		(ProNET
->20	lelong		5		(CHAOS
->20	lelong		6		(Token Ring
->20	lelong		7		(ARCNET
->20	lelong		8		(SLIP
->20	lelong		9		(PPP
->20	lelong		10		(FDDI
->20	lelong		11		(RFC 1483 ATM
->20	lelong		12		(raw IP
->20	lelong		13		(BSD/OS SLIP
->20	lelong		14		(BSD/OS PPP
->16	lelong		x		\b, capture length %d)
-
-#
-# AIX "iptrace" capture files.
-#
-0	string		iptrace\ 1.0	"iptrace" capture file
-0	string		iptrace\ 2.0	"iptrace" capture file
-
-#
-# Novell LANalyzer capture files.
-#
-0	leshort		0x1001		LANalyzer capture file
-0	leshort		0x1007		LANalyzer capture file
-
-#
-# HP-UX "nettl" capture files.
-#
-0	string		\x54\x52\x00\x64\x00	"nettl" capture file
-
-#
-# RADCOM WAN/LAN Analyzer capture files.
-#
-0	string		\x42\xd2\x00\x34\x12\x66\x22\x88	RADCOM WAN/LAN Analyzer capture file
-
-#
-# NetStumbler log files.  Not really packets, per se, but about as
-# close as you can get.  These are log files from NetStumbler, a
-# Windows program, that scans for 802.11b networks.
-#
-0	string		NetS		NetStumbler log file
->8	lelong		x		\b, %d stations found
-
-#------------------------------------------------------------------------------
-# softquad:  file(1) magic for SoftQuad Publishing Software
-#
-# Author/Editor and RulesBuilder
-#
-# XXX - byte order?
-#
-0	string		\<!SQ\ DTD>	Compiled SGML rules file
->9	string		>\0		 Type %s
-0	string		\<!SQ\ A/E>	A/E SGML Document binary
->9	string		>\0		 Type %s
-0	string		\<!SQ\ STS>	A/E SGML binary styles file
->9	string		>\0		 Type %s
-0	short		0xc0de		Compiled PSI (v1) data
-0	short		0xc0da		Compiled PSI (v2) data
->3	string		>\0		(%s)
-# Binary sqtroff font/desc files...
-0	short		0125252		SoftQuad DESC or font file binary
->2	short		>0		- version %d
-# Bitmaps...
-0	string		SQ\ BITMAP1	SoftQuad Raster Format text
-#0	string		SQ\ BITMAP2	SoftQuad Raster Format data
-# sqtroff intermediate language (replacement for ditroff int. lang.)
-0	string		X\ 		SoftQuad troff Context intermediate
->2	string		495		for AT&T 495 laser printer
->2	string		hp		for Hewlett-Packard LaserJet
->2	string		impr		for IMAGEN imPRESS
->2	string		ps		for PostScript
-
-#------------------------------------------------------------------------------
-# spectrum:  file(1) magic for Spectrum emulator files.
-#
-# John Elliott <jce at seasip.demon.co.uk>
-
-#
-# Spectrum +3DOS header
-#
-0       string          PLUS3DOS\032    Spectrum +3 data
->15     byte            0               - BASIC program
->15     byte            1               - number array
->15     byte            2               - character array
->15     byte            3               - memory block
->>16    belong          0x001B0040      (screen)
->15     byte            4               - Tasword document
->15     string          TAPEFILE        - ZXT tapefile
-#
-# Tape file. This assumes the .TAP starts with a Spectrum-format header,
-# which nearly all will.
-#
-0       string          \023\000\000    Spectrum .TAP data
->4      string          x               "%-10.10s"
->3      byte            0               - BASIC program
->3      byte            1               - number array
->3      byte            2               - character array
->3      byte            3               - memory block
->>14    belong          0x001B0040      (screen)
-
-# The following three blocks are from pak21-spectrum at srcf.ucam.org
-# TZX tape images
-0      string          ZXTape!\x1a     Spectrum .TZX data
->8     byte            x               version %d
->9     byte            x               .%d
-
-# RZX input recording files
-0      string          RZX!            Spectrum .RZX data
->4     byte            x               version %d
->5     byte            x               .%d
-
-# And three sorts of disk image
-0      string          MV\ -\ CPCEMU\ Disk-Fil Amstrad/Spectrum .DSK data
-0      string          MV\ -\ CPC\ format\ Dis Amstrad/Spectrum DU54 .DSK data
-0      string          EXTENDED\ CPC\ DSK\ Fil Amstrad/Spectrum Extended .DSK data
-
-#------------------------------------------------------------------------------
-# sql:  file(1) magic for SQL files
-#
-# From: "Marty Leisner" <mleisner at eng.mc.xerox.com>
-# Recognize some MySQL files.
-#
-0	beshort			0xfe01		MySQL table definition file
->2	byte			x		Version %d
-0	belong&0xffffff00	0xfefe0300	MySQL MISAM index file
->3	byte			x		Version %d
-0	belong&0xffffff00	0xfefe0700	MySQL MISAM compressed data file
->3	byte			x		Version %d
-0	belong&0xffffff00	0xfefe0500	MySQL ISAM index file
->3	byte			x		Version %d
-0	belong&0xffffff00	0xfefe0600	MySQL ISAM compressed data file
->3	byte			x		Version %d
-0	string		 	\376bin		MySQL replication log
-
-#------------------------------------------------------------------------------
-# sun:  file(1) magic for Sun machines
-#
-# Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x
-# releases.  (5.x uses ELF.)
-#
-0	belong&077777777	0600413		SPARC demand paged
->0	byte		&0x80
->>20	belong		<4096		shared library
->>20	belong		=4096		dynamically linked executable
->>20	belong		>4096		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
-0	belong&077777777	0600410		SPARC pure
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
-0	belong&077777777	0600407		SPARC
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
-
-0	belong&077777777	0400413		mc68020 demand paged
->0	byte		&0x80
->>20	belong		<4096		shared library
->>20	belong		=4096		dynamically linked executable
->>20	belong		>4096		dynamically linked executable
->16	belong		>0		not stripped
-0	belong&077777777	0400410		mc68020 pure
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
-0	belong&077777777	0400407		mc68020
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
-
-0	belong&077777777	0200413		mc68010 demand paged
->0	byte		&0x80
->>20	belong		<4096		shared library
->>20	belong		=4096		dynamically linked executable
->>20	belong		>4096		dynamically linked executable
->16	belong		>0		not stripped
-0	belong&077777777	0200410		mc68010 pure
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
-0	belong&077777777	0200407		mc68010
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
-
-# reworked these to avoid anything beginning with zero becoming "old sun-2"
-0	belong		0407		old sun-2 executable
->16	belong		>0		not stripped
-0	belong		0410		old sun-2 pure executable
->16	belong		>0		not stripped
-0	belong		0413		old sun-2 demand paged executable
->16	belong		>0		not stripped
-
-#
-# Core files.  "SPARC 4.x BCP" means "core file from a SunOS 4.x SPARC
-# binary executed in compatibility mode under SunOS 5.x".
-#
-0	belong		0x080456	SunOS core file
->4	belong		432		(SPARC)
->>132	string		>\0		from '%s'
->>116	belong		=3		(quit)
->>116	belong		=4		(illegal instruction)
->>116	belong		=5		(trace trap)
->>116	belong		=6		(abort)
->>116	belong		=7		(emulator trap)
->>116	belong		=8		(arithmetic exception)
->>116	belong		=9		(kill)
->>116	belong		=10		(bus error)
->>116	belong		=11		(segmentation violation)
->>116	belong		=12		(bad argument to system call)
->>116	belong		=29		(resource lost)
->>120	belong		x		(T=%dK,
->>124	belong		x		D=%dK,
->>128	belong		x		S=%dK)
->4	belong		826		(68K)
->>128	string		>\0		from '%s'
->4	belong		456		(SPARC 4.x BCP)
->>152	string		>\0		from '%s'
-# Sun SunPC
-0	long		0xfa33c08e	SunPC 4.0 Hard Disk
-0	string		#SUNPC_CONFIG	SunPC 4.0 Properties Values
-# Sun snoop (see RFC 1761, which describes the capture file format).
-#
-0	string		snoop		Snoop capture file
->8	belong		>0		- version %ld
->12	belong		0		(IEEE 802.3)
->12	belong		1		(IEEE 802.4)
->12	belong		2		(IEEE 802.5)
->12	belong		3		(IEEE 802.6)
->12	belong		4		(Ethernet)
->12	belong		5		(HDLC)
->12	belong		6		(Character synchronous)
->12	belong		7		(IBM channel-to-channel adapter)
->12	belong		8		(FDDI)
->12	belong		9		(Unknown)
-
-# Microsoft ICM color profile
-36	string		acspMSFT	Microsoft ICM Color Profile
-# Sun KCMS
-36	string		acsp		Kodak Color Management System, ICC Profile
-
-#---------------------------------------------------------------------------
-# The following entries have been tested by Duncan Laurie <duncan at sun.com> (a
-# lead Sun/Cobalt developer) who agrees that they are good and worthy of
-# inclusion.
-
-# Boot ROM images for Sun/Cobalt Linux server appliances
-0       string  Cobalt\ Networks\ Inc.\nFirmware\ v     Paged COBALT boot rom
->38     string x        V%.4s
-
-# New format for Sun/Cobalt boot ROMs is annoying, it stores the version code
-# at the very end where file(1) can't get it.
-0       string CRfs     COBALT boot rom data (Flat boot rom or file system)
-
-
-#------------------------------------------------------------------------
-# sysex: file(1) magic for MIDI sysex files
-#
-# 
-0	byte			0xF0		SysEx File -
-
-# North American Group
->1	byte			0x01		Sequential
->1	byte			0x02		IDP
->1	byte			0x03		OctavePlateau
->1	byte			0x04		Moog
->1	byte			0x05		Passport
->1	byte			0x06		Lexicon
->1	byte			0x07		Kurzweil
->1	byte			0x08		Fender
->1	byte			0x09		Gulbransen
->1	byte			0x0a		AKG
->1	byte			0x0b		Voyce
->1	byte			0x0c		Waveframe
->1	byte			0x0d		ADA
->1	byte			0x0e		Garfield
->1	byte			0x0f		Ensoniq
->1	byte			0x10		Oberheim
->1	byte			0x11		Apple
->1	byte			0x12		GreyMatter
->1	byte			0x14		PalmTree
->1	byte			0x15		JLCooper
->1	byte			0x16		Lowrey
->1	byte			0x17		AdamsSmith
->1	byte			0x18		E-mu
->1	byte			0x19		Harmony
->1	byte			0x1a		ART
->1	byte			0x1b		Baldwin
->1	byte			0x1c		Eventide
->1	byte			0x1d		Inventronics
->1	byte			0x1f		Clarity
-
-# European Group
->1	byte			0x21		SIEL
->1	byte			0x22		Synthaxe
->1	byte			0x24		Hohner
->1	byte			0x25		Twister
->1	byte			0x26		Solton
->1	byte			0x27		Jellinghaus
->1	byte			0x28		Southworth
->1	byte			0x29		PPG
->1	byte			0x2a		JEN
->1	byte			0x2b		SSL
->1	byte			0x2c		AudioVertrieb
-
->1	byte			0x2f		ELKA
->>3	byte			0x09		EK-44
-
->1	byte			0x30		Dynacord
->1	byte			0x33		Clavia
->1	byte			0x39		Soundcraft
-
->1	byte			0x3e		Waldorf
->>3	byte			0x7f		Microwave I
-
-# Japanese Group
->1	byte			0x40		Kawai
->>3	byte			0x20		K1
->>3	byte			0x22		K4
-
->1	byte			0x41		Roland
->>3	byte			0x14		D-50
->>3	byte			0x2b		U-220
->>3	byte			0x02		TR-707
-
->1	byte			0x42		Korg
->>3	byte			0x19		M1
-
->1	byte			0x43		Yamaha
->1	byte			0x44		Casio
->1	byte			0x46		Kamiya
->1	byte			0x47		Akai
->1	byte			0x48		Victor
->1	byte			0x49		Mesosha
->1	byte			0x4b		Fujitsu
->1	byte			0x4c		Sony
->1	byte			0x4e		Teac
->1	byte			0x50		Matsushita
->1	byte			0x51		Fostex
->1	byte			0x52		Zoom
->1	byte			0x54		Matsushita
->1	byte			0x57		Acoustic tech. lab.
-
->1	belong&0xffffff00	0x00007400	Ta Horng
->1	belong&0xffffff00	0x00007500	e-Tek
->1	belong&0xffffff00	0x00007600	E-Voice
->1	belong&0xffffff00	0x00007700	Midisoft
->1	belong&0xffffff00	0x00007800	Q-Sound
->1	belong&0xffffff00	0x00007900	Westrex
->1	belong&0xffffff00	0x00007a00	Nvidia*
->1	belong&0xffffff00	0x00007b00	ESS
->1	belong&0xffffff00	0x00007c00	Mediatrix
->1	belong&0xffffff00	0x00007d00	Brooktree
->1	belong&0xffffff00	0x00007e00	Otari
->1	belong&0xffffff00	0x00007f00	Key Electronics
->1	belong&0xffffff00	0x00010000	Shure
->1	belong&0xffffff00	0x00010100	AuraSound
->1	belong&0xffffff00	0x00010200	Crystal
->1	belong&0xffffff00	0x00010300	Rockwell
->1	belong&0xffffff00	0x00010400	Silicon Graphics
->1	belong&0xffffff00	0x00010500	Midiman
->1	belong&0xffffff00	0x00010600	PreSonus
->1	belong&0xffffff00	0x00010800	Topaz
->1	belong&0xffffff00	0x00010900	Cast Lightning
->1	belong&0xffffff00	0x00010a00	Microsoft
->1	belong&0xffffff00	0x00010b00	Sonic Foundry
->1	belong&0xffffff00	0x00010c00	Line 6
->1	belong&0xffffff00	0x00010d00	Beatnik Inc.
->1	belong&0xffffff00	0x00010e00	Van Koerving
->1	belong&0xffffff00	0x00010f00	Altech Systems
->1	belong&0xffffff00	0x00011000	S & S Research
->1	belong&0xffffff00	0x00011100	VLSI Technology
->1	belong&0xffffff00	0x00011200	Chromatic
->1	belong&0xffffff00	0x00011300	Sapphire
->1	belong&0xffffff00	0x00011400	IDRC
->1	belong&0xffffff00	0x00011500	Justonic Tuning
->1	belong&0xffffff00	0x00011600	TorComp
->1	belong&0xffffff00	0x00011700	Newtek Inc.
->1	belong&0xffffff00	0x00011800	Sound Sculpture
->1	belong&0xffffff00	0x00011900	Walker Technical
->1	belong&0xffffff00	0x00011a00	Digital Harmony
->1	belong&0xffffff00	0x00011b00	InVision
->1	belong&0xffffff00	0x00011c00	T-Square
->1	belong&0xffffff00	0x00011d00	Nemesys
->1	belong&0xffffff00	0x00011e00	DBX
->1	belong&0xffffff00	0x00011f00	Syndyne
->1	belong&0xffffff00	0x00012000	Bitheadz	
->1	belong&0xffffff00	0x00012100	Cakewalk
->1	belong&0xffffff00	0x00012200	Staccato
->1	belong&0xffffff00	0x00012300	National Semicon.
->1	belong&0xffffff00	0x00012400	Boom Theory
->1	belong&0xffffff00	0x00012500	Virtual DSP Corp
->1	belong&0xffffff00	0x00012600	Antares
->1	belong&0xffffff00	0x00012700	Angel Software
->1	belong&0xffffff00	0x00012800	St Louis Music
->1	belong&0xffffff00	0x00012900	Lyrrus dba G-VOX
->1	belong&0xffffff00	0x00012a00	Ashley Audio
->1	belong&0xffffff00	0x00012b00	Vari-Lite
->1	belong&0xffffff00	0x00012c00	Summit Audio
->1	belong&0xffffff00	0x00012d00	Aureal Semicon.
->1	belong&0xffffff00	0x00012e00	SeaSound
->1	belong&0xffffff00	0x00012f00	U.S. Robotics
->1	belong&0xffffff00	0x00013000	Aurisis
->1	belong&0xffffff00	0x00013100	Nearfield Multimedia
->1	belong&0xffffff00	0x00013200	FM7 Inc.
->1	belong&0xffffff00	0x00013300	Swivel Systems
->1	belong&0xffffff00	0x00013400	Hyperactive
->1	belong&0xffffff00	0x00013500	MidiLite
->1	belong&0xffffff00	0x00013600	Radical
->1	belong&0xffffff00	0x00013700	Roger Linn
->1	belong&0xffffff00	0x00013800	Helicon
->1	belong&0xffffff00	0x00013900	Event
->1	belong&0xffffff00	0x00013a00	Sonic Network
->1	belong&0xffffff00	0x00013b00	Realtime Music
->1	belong&0xffffff00	0x00013c00	Apogee Digital
-
->1	belong&0xffffff00	0x00202b00	Medeli Electronics
->1	belong&0xffffff00	0x00202c00	Charlie Lab
->1	belong&0xffffff00	0x00202d00	Blue Chip Music
->1	belong&0xffffff00	0x00202e00	BEE OH Corp
->1	belong&0xffffff00	0x00202f00	LG Semicon America
->1	belong&0xffffff00	0x00203000	TESI
->1	belong&0xffffff00	0x00203100	EMAGIC
->1	belong&0xffffff00	0x00203200	Behringer
->1	belong&0xffffff00	0x00203300	Access Music
->1	belong&0xffffff00	0x00203400	Synoptic
->1	belong&0xffffff00	0x00203500	Hanmesoft Corp
->1	belong&0xffffff00	0x00203600	Terratec
->1	belong&0xffffff00	0x00203700	Proel SpA
->1	belong&0xffffff00	0x00203800	IBK MIDI
->1	belong&0xffffff00	0x00203900	IRCAM
->1	belong&0xffffff00	0x00203a00	Propellerhead Software
->1	belong&0xffffff00	0x00203b00	Red Sound Systems
->1	belong&0xffffff00	0x00203c00	Electron ESI AB
->1	belong&0xffffff00	0x00203d00	Sintefex Audio
->1	belong&0xffffff00	0x00203e00	Music and More
->1	belong&0xffffff00	0x00203f00	Amsaro
->1	belong&0xffffff00	0x00204000	CDS Advanced Technology
->1	belong&0xffffff00	0x00204100	Touched by Sound
->1	belong&0xffffff00	0x00204200	DSP Arts
->1	belong&0xffffff00	0x00204300	Phil Rees Music
->1	belong&0xffffff00	0x00204400	Stamer Musikanlagen GmbH
->1	belong&0xffffff00	0x00204500	Soundart
->1	belong&0xffffff00	0x00204600	C-Mexx Software
->1	belong&0xffffff00	0x00204700	Klavis Tech.
->1	belong&0xffffff00	0x00204800	Noteheads AB
-
-0	string			T707		Roland TR-707 Data
-#------------------------------------------------------------------------------
-# teapot:  file(1) magic for "teapot" spreadsheet
-#
-0       string          #!teapot\012xdr      teapot work sheet (XDR format)
-
-#------------------------------------------------------------------------------
-# terminfo:  file(1) magic for terminfo
-#
-# XXX - byte order for screen images?
-#
-0	string		\032\001	Compiled terminfo entry
-0	short		0433		Curses screen image
-0	short		0434		Curses screen image
-
-#------------------------------------------------------------------------------
-# tex:  file(1) magic for TeX files
-#
-# From <conklin at talisman.kaleida.com>
-
-# Although we may know the offset of certain text fields in TeX DVI
-# and font files, we can't use them reliably because they are not
-# zero terminated. [but we do anyway, christos]
-0	string		\367\002	TeX DVI file
->16	string		>\0		(%s)
-0	string		\367\203	TeX generic font data
-0	string		\367\131	TeX packed font data
->3	string		>\0		(%s)
-0	string		\367\312	TeX virtual font data
-0	string		This\ is\ TeX,	TeX transcript text
-0	string		This\ is\ METAFONT,	METAFONT transcript text
-
-# There is no way to detect TeX Font Metric (*.tfm) files without
-# breaking them apart and reading the data.  The following patterns
-# match most *.tfm files generated by METAFONT or afm2tfm.
-2	string		\000\021	TeX font metric data
->33	string		>\0		(%s)
-2	string		\000\022	TeX font metric data
->33	string		>\0		(%s)
-
-# Texinfo and GNU Info, from Daniel Quinlan (quinlan at yggdrasil.com)
-0	string		\\input\ texinfo	Texinfo source text
-0	string		This\ is\ Info\ file	GNU Info text
-
-# TeX documents, from Daniel Quinlan (quinlan at yggdrasil.com)
-0	string		\\input		TeX document text
-0	string		\\section	LaTeX document text
-0	string		\\setlength	LaTeX document text
-0	string		\\documentstyle	LaTeX document text
-0	string		\\chapter	LaTeX document text
-0	string		\\documentclass	LaTeX 2e document text
-0	string		\\relax		LaTeX auxiliary file
-0	string		\\contentsline	LaTeX  table of contents
-0	string		%\ -*-latex-*-	LaTeX document text
-
-# Tex document, from Hendrik Scholz <hendrik at scholz.net>
-0   string      \\ifx       TeX document text
-
-# Index and glossary files
-0	string		\\indexentry	LaTeX raw index file
-0	string		\\begin{theindex}	LaTeX sorted index
-0	string		\\glossaryentry	LaTeX raw glossary
-0	string		\\begin{theglossary}	LaTeX sorted glossary
-0	string		This\ is\ makeindex	Makeindex log file
-
-# End of TeX
-
-#------------------------------------------------------------------------------
-# file(1) magic for BibTex text files
-# From Hendrik Scholz <hendrik at scholz.net>
-
-0   string @article{          BibTex text file
-0   string @book{             BibTex text file
-0   string @inbook{           BibTex text file
-0   string @incollection{     BibTex text file
-0   string @inproceedings{    BibTex text file
-0   string @manual{           BibTex text file
-0   string @misc{             BibTex text file
-0   string @preamble{         BibTex text file
-0   string @phdthesis{        BibTex text file
-0   string @techreport{       BibTex text file
-0   string @unpublished{      BibTex text file
-
-0   string @Article{          BibTex text file
-0   string @Book{             BibTex text file
-0   string @Inbook{           BibTex text file
-0   string @Incollection{     BibTex text file
-0   string @Inproceedings{    BibTex text file
-0   string @Manual{           BibTex text file
-0   string @Misc{             BibTex text file
-0   string @Preamble{         BibTex text file
-0   string @Phdthesis{        BibTex text file
-0   string @Techreport{       BibTex text file
-0   string @Unpublished{      BibTex text file
-
-0   string @ARTICLE{          BibTex text file
-0   string @BOOK{             BibTex text file
-0   string @INBOOK{           BibTex text file
-0   string @INCOLLECTION{     BibTex text file
-0   string @INPROCEEDINGS{    BibTex text file
-0   string @MANUAL{           BibTex text file
-0   string @MISC{             BibTex text file
-0   string @PREAMBLE{         BibTex text file
-0   string @PHDTHESIS{        BibTex text file
-0   string @TECHREPORT{       BibTex text file
-0   string @UNPUBLISHED{      BibTex text file
-
-73  string %%%\ \ BibTeX-file{ BibTex text file (with full header)
-
-73  string %%%\ \ @BibTeX-style-file{   BibTeX style text file (with full header)
-
-0   string %\ BibTeX\ standard\ bibliography\      BibTeX standard bibliography style text file
-
-0   string %\ BibTeX\ `     BibTeX custom bibliography style text file
-
-0   string  @c\ @mapfile{   TeX font aliases text file
-
-#------------------------------------------------------------------------------
-# file(1) magic for tgif(1) files
-# From Hendrik Scholz <hendrik at scholz.net>
-
-0   string  %TGIF\ 4   tgif version 4 object file
-
-# ------------------------------------------------------------------------
-# ti-8x: file(1) magic for the TI-8x and TI-9x Graphing Calculators.
-#
-# From: Ryan McGuire (rmcguire at freenet.columbus.oh.us).
-#
-# Update: Romain Lievin (roms at lpg.ticalc.org).
-#
-# NOTE: This list is not complete.
-# Files for the TI-80 and TI-81 are pretty rare. I'm not going to put the
-# program/group magic numbers in here because I cannot find any.
-0		string		**TI80**	TI-80 Graphing Calculator File.
-0		string		**TI81**	TI-81 Graphing Calculator File.
-#
-# Magic Numbers for the TI-73
-#
-0		string		**TI73**	TI-73 Graphing Calculator
->0x00003B	byte		0x00		(real number)
->0x00003B	byte		0x01		(list)
->0x00003B	byte		0x02		(matrix)
->0x00003B	byte		0x03		(equation)
->0x00003B	byte		0x04		(string)
->0x00003B	byte		0x05		(program)
->0x00003B	byte		0x06		(assembly program)
->0x00003B	byte		0x07		(picture)
->0x00003B	byte		0x08		(gdb)
->0x00003B	byte		0x0C		(complex number)
->0x00003B	byte		0x0F		(window settings)
->0x00003B	byte		0x10		(zoom)
->0x00003B	byte		0x11		(table setup)
->0x00003B	byte		0x13		(backup)
-
-# Magic Numbers for the TI-82
-#
-0		string		**TI82**	TI-82 Graphing Calculator
->0x00003B	byte		0x00		(real)
->0x00003B	byte		0x01		(list)
->0x00003B	byte		0x02		(matrix)
->0x00003B	byte		0x03		(Y-variable)
->0x00003B	byte		0x05		(program)
->0x00003B	byte		0x06		(protected prgm)
->0x00003B	byte		0x07		(picture)
->0x00003B	byte		0x08		(gdb)
->0x00003B	byte		0x0B		(window settings)
->0x00003B	byte		0x0C		(window settings)
->0x00003B	byte		0x0D		(table setup)
->0x00003B	byte		0x0E		(screenshot)
->0x00003B	byte		0x0F		(backup)
-#
-# Magic Numbers for the TI-83
-#
-0		string		**TI83**	TI-83 Graphing Calculator
->0x00003B	byte		0x00		(real)
->0x00003B	byte		0x01		(list)
->0x00003B	byte		0x02		(matrix)
->0x00003B	byte		0x03		(Y-variable)
->0x00003B	byte		0x04		(string)
->0x00003B	byte		0x05		(program)
->0x00003B	byte		0x06		(protected prgm)
->0x00003B	byte		0x07		(picture)
->0x00003B	byte		0x08		(gdb)
->0x00003B	byte		0x0B		(window settings)
->0x00003B	byte		0x0C		(window settings)
->0x00003B	byte		0x0D		(table setup)
->0x00003B	byte		0x0E		(screenshot)
->0x00003B	byte		0x13		(backup)
-#
-# Magic Numbers for the TI-83+
-#
-0		string		**TI83F*	TI-83+ Graphing Calculator
->0x00003B	byte		0x00		(real number)
->0x00003B	byte		0x01		(list)
->0x00003B	byte		0x02		(matrix)
->0x00003B	byte		0x03		(equation)
->0x00003B	byte		0x04		(string)
->0x00003B	byte		0x05		(program)
->0x00003B	byte		0x06		(assembly program)
->0x00003B	byte		0x07		(picture)
->0x00003B	byte		0x08		(gdb)
->0x00003B	byte		0x0C		(complex number)
->0x00003B	byte		0x0F		(window settings)
->0x00003B	byte		0x10		(zoom)
->0x00003B	byte		0x11		(table setup)
->0x00003B	byte		0x13		(backup)
->0x00003B	byte		0x15		(application variable)
->0x00003B	byte		0x17		(group of variable)
-
-#
-# Magic Numbers for the TI-85
-#
-0		string		**TI85**	TI-85 Graphing Calculator
->0x00003B	byte		0x00		(real number)
->0x00003B	byte		0x01		(complex number)
->0x00003B	byte		0x02		(real vector)
->0x00003B	byte		0x03		(complex vector)
->0x00003B	byte		0x04		(real list)
->0x00003B	byte		0x05		(complex list)
->0x00003B	byte		0x06		(real matrix)
->0x00003B	byte		0x07		(complex matrix)
->0x00003B	byte		0x08		(real constant)
->0x00003B	byte		0x09		(complex constant)
->0x00003B	byte		0x0A		(equation)
->0x00003B	byte		0x0C		(string)
->0x00003B	byte		0x0D		(function GDB)
->0x00003B	byte		0x0E		(polar GDB)
->0x00003B	byte		0x0F		(parametric GDB)
->0x00003B	byte		0x10		(diffeq GDB)
->0x00003B	byte		0x11		(picture)
->0x00003B	byte		0x12		(program)
->0x00003B	byte		0x13		(range)
->0x00003B	byte		0x17		(window settings)
->0x00003B	byte		0x18		(window settings)
->0x00003B	byte		0x19		(window settings)
->0x00003B	byte		0x1A		(window settings)
->0x00003B	byte		0x1B		(zoom)
->0x00003B	byte		0x1D		(backup)
->0x00003B	byte		0x1E		(unknown)
->0x00003B	byte		0x2A		(equation)
->0x000032	string		ZS4		- ZShell Version 4 File.
->0x000032	string		ZS3		- ZShell Version 3 File.
-#
-# Magic Numbers for the TI-86
-#
-0		string		**TI86**	TI-86 Graphing Calculator
->0x00003B	byte		0x00		(real number)
->0x00003B	byte		0x01		(complex number)
->0x00003B	byte		0x02		(real vector)
->0x00003B	byte		0x03		(complex vector)
->0x00003B	byte		0x04		(real list)
->0x00003B	byte		0x05		(complex list)
->0x00003B	byte		0x06		(real matrix)
->0x00003B	byte		0x07		(complex matrix)
->0x00003B	byte		0x08		(real constant)
->0x00003B	byte		0x09		(complex constant)
->0x00003B	byte		0x0A		(equation)
->0x00003B	byte		0x0C		(string)
->0x00003B	byte		0x0D		(function GDB)
->0x00003B	byte		0x0E		(polar GDB)
->0x00003B	byte		0x0F		(parametric GDB)
->0x00003B	byte		0x10		(diffeq GDB)
->0x00003B	byte		0x11		(picture)
->0x00003B	byte		0x12		(program)
->0x00003B	byte		0x13		(range)
->0x00003B	byte		0x17		(window settings)
->0x00003B	byte		0x18		(window settings)
->0x00003B	byte		0x19		(window settings)
->0x00003B	byte		0x1A		(window settings)
->0x00003B	byte		0x1B		(zoom)
->0x00003B	byte		0x1D		(backup)
->0x00003B	byte		0x1E		(unknown)
->0x00003B	byte		0x2A		(equation)
-#
-# Magic Numbers for the TI-89
-#
-0		string		**TI89**	TI-89 Graphing Calculator
->0x000048	byte		0x00		(expression)
->0x000048	byte		0x04		(list)
->0x000048	byte		0x06		(matrix)
->0x000048	byte		0x0A		(data)
->0x000048	byte		0x0B		(text)
->0x000048	byte		0x0C		(string)
->0x000048	byte		0x0D		(graphic data base)
->0x000048	byte		0x0E		(figure)
->0x000048	byte		0x10		(picture)
->0x000048	byte		0x12		(program)
->0x000048	byte		0x13		(function)
->0x000048	byte		0x14		(macro)
->0x000048	byte		0x1C		(zipped)
->0x000048	byte		0x21		(assembler)
-#
-# Magic Numbers for the TI-92
-#
-0		string		**TI92**	TI-92 Graphing Calculator
->0x000048	byte		0x00		(expression)
->0x000048	byte		0x04		(list)
->0x000048	byte		0x06		(matrix)
->0x000048	byte		0x0A		(data)
->0x000048	byte		0x0B		(text)
->0x000048	byte		0x0C		(string)
->0x000048	byte		0x0D		(graphic data base)
->0x000048	byte		0x0E		(figure)
->0x000048	byte		0x10		(picture)
->0x000048	byte		0x12		(program)
->0x000048	byte		0x13		(function)
->0x000048	byte		0x14		(macro)
->0x000048	byte		0x1D		(backup)
-#
-# Magic Numbers for the TI-92+/V200
-#
-0		string		**TI92P*	TI-92+/V200 Graphing Calculator
->0x000048	byte		0x00		(expression)
->0x000048	byte		0x04		(list)
->0x000048	byte		0x06		(matrix)
->0x000048	byte		0x0A		(data)
->0x000048	byte		0x0B		(text)
->0x000048	byte		0x0C		(string)
->0x000048	byte		0x0D		(graphic data base)
->0x000048	byte		0x0E		(figure)
->0x000048	byte		0x10		(picture)
->0x000048	byte		0x12		(program)
->0x000048	byte		0x13		(function)
->0x000048	byte		0x14		(macro)
->0x000048	byte		0x1C		(zipped)
->0x000048	byte		0x21		(assembler)
-#
-# Magic Numbers for the TI-73/83+/89/92+/V200 FLASH upgrades
-#
-0x0000016	string		Advanced	TI-XX Graphing Calculator (FLASH)
-0		string		**TIFL**	TI-XX Graphing Calculator (FLASH)
->8		byte		>0		- Revision %d
->>9 		byte		x		\b.%d,
->12		byte		>0		Revision date %02x
->>13		byte		x		\b/%02x
->>14		beshort		x		\b/%04x,
->17		string		>/0		name: '%s',
->48		byte		0x74		device: TI-73,
->48		byte		0x73		device: TI-83+,
->48		byte		0x98		device: TI-89,
->48		byte		0x88		device: TI-92+,
->49		byte		0x23		type: OS upgrade,
->49		byte		0x24		type: application,
->49		byte		0x25		type: certificate,
->49		byte		0x3e		type: license,
->74		lelong		>0		size: %ld bytes
-
-# VTi & TiEmu skins (TI Graphing Calculators).
-# From: Romain Lievin (roms at lpg.ticalc.org).
-# Magic Numbers for the VTi skins
-0               string          VTI		Virtual TI skin
->3		string		v		- Version
->>4		byte		>0		\b %c
->>6		byte		x		\b.%c
-# Magic Numbers for the TiEmu skins
-0		string		TiEmu		TiEmu skin
->6              string          v               - Version
->>7             byte            >0              \b %c
->>9             byte            x               \b.%c
->>10		byte		x		\b%c
-
-#------------------------------------------------------------------------------
-# timezone:  file(1) magic for timezone data
-#
-# from Daniel Quinlan (quinlan at yggdrasil.com)
-# this should work on Linux, SunOS, and maybe others
-# Added new official magic number for recent versions of the Olson code
-0	string	TZif	timezone data
-0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0	old timezone data
-0	string	\0\0\0\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	old timezone data
-0	string  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0	old timezone data
-0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0	old timezone data
-0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0	old timezone data
-0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0	old timezone data
-
-#------------------------------------------------------------------------------
-# troff:  file(1) magic for *roff
-#
-# updated by Daniel Quinlan (quinlan at yggdrasil.com)
-
-# troff input
-0	string		.\\"		troff or preprocessor input text
-0	string		'\\"		troff or preprocessor input text
-0	string		'.\\"		troff or preprocessor input text
-0	string		\\"		troff or preprocessor input text
-0	string		'''		troff or preprocessor input text
-
-# ditroff intermediate output text
-0	string		x\ T		ditroff output text
->4	string		cat		for the C/A/T phototypesetter
->4	string		ps		for PostScript
->4	string		dvi		for DVI
->4	string		ascii		for ASCII
->4	string		lj4		for LaserJet 4
->4	string		latin1		for ISO 8859-1 (Latin 1)
->4	string		X75		for xditview at 75dpi
->>7	string		-12		(12pt)
->4	string		X100		for xditview at 100dpi
->>8	string		-12		(12pt)
-
-# output data formats
-0	string		\100\357	very old (C/A/T) troff output data
-#
-#------------------------------------------------------------------------------
-# tuxedo:	file(1) magic for BEA TUXEDO data files
-#
-# from Ian Springer <ispringer at hotmail.com>
-#
-0	string		\0\0\1\236\0\0\0\0\0\0\0\0\0\0\0\0	BEA TUXEDO DES mask data
-
-#------------------------------------------------------------------------------
-# typeset:  file(1) magic for other typesetting
-#
-0	string		Interpress/Xerox	Xerox InterPress data
->16	string		/			(version
->>17	string		>\0			%s)
-
-#------------------------------------------------------------------------------
-# unknown:  file(1) magic for unknown machines
-#
-# XXX - this probably should be pruned, as it'll match PDP-11 and
-# VAX image formats.
-#
-# 0x107 is 0407; 0x108 is 0410; both are PDP-11 (executable and pure,
-# respectively).
-#
-# 0x109 is 0411; that's PDP-11 split I&D, but the PDP-11 version doesn't
-# have the "version %ld", which may be a bogus COFFism (I don't think
-# there ever was COFF for the PDP-11).
-#
-# 0x10B is 0413; that's VAX demand-paged, but this is a short, not a
-# long, as it would be on a VAX.
-#
-# 0x10C is 0414 and 0x10E is 416; those *are* unknown.
-#
-0	short		0x107		unknown machine executable
->8	short		>0		not stripped
->15	byte		>0		- version %ld
-0	short		0x108		unknown pure executable
->8	short		>0		not stripped
->15	byte		>0		- version %ld
-0	short		0x109		PDP-11 separate I&D
->8	short		>0		not stripped
->15	byte		>0		- version %ld
-0	short		0x10b		unknown pure executable
->8	short		>0		not stripped
->15	byte		>0		- version %ld
-0	long		0x10c		unknown demand paged pure executable
->16	long		>0		not stripped
-0	long		0x10e		unknown readable demand paged pure executable
-
-#------------------------------------------------------------------------------
-# uuencode:  file(1) magic for ASCII-encoded files
-#
-
-# GRR:  the first line of xxencoded files is identical to that in uuencoded
-# files, but the first character in most subsequent lines is 'h' instead of
-# 'M'.  (xxencoding uses lowercase letters in place of most of uuencode's
-# punctuation and survives BITNET gateways better.)  If regular expressions
-# were supported, this entry could possibly be split into two with
-# "begin\040\.\*\012M" or "begin\040\.\*\012h" (where \. and \* are REs).
-0	string		begin\040	uuencoded or xxencoded text
-
-# btoa(1) is an alternative to uuencode that requires less space.
-0	string		xbtoa\ Begin	btoa'd text
-
-# ship(1) is another, much cooler alternative to uuencode.
-# Greg Roelofs, newt at uchicago.edu
-0	string		$\012ship	ship'd binary text
-
-# bencode(8) is used to encode compressed news batches (Bnews/Cnews only?)
-# Greg Roelofs, newt at uchicago.edu
-0	string	Decode\ the\ following\ with\ bdeco	bencoded News text
-
-# BinHex is the Macintosh ASCII-encoded file format (see also "apple")
-# Daniel Quinlan, quinlan at yggdrasil.com
-11	string	must\ be\ converted\ with\ BinHex	BinHex binary text
->41	string	x					\b, version %.3s
-
-# GRR:  is MIME BASE64 encoding handled somewhere?
-
-#------------------------------------------------------------------------------
-# varied.out:  file(1) magic for various USG systems
-#
-#	Herewith many of the object file formats used by USG systems.
-#	Most have been moved to files for a particular processor,
-#	and deleted if they duplicate other entries.
-#
-0	short		0610		Perkin-Elmer executable
-# AMD 29K
-0	beshort		0572		amd 29k coff noprebar executable
-0	beshort		01572		amd 29k coff prebar executable
-0	beshort		0160007		amd 29k coff archive
-# Cray
-6	beshort		0407		unicos (cray) executable
-# Ultrix 4.3
-596	string		\130\337\377\377	Ultrix core file
->600	string		>\0		from '%s'
-# BeOS and MAcOS PEF executables
-# From: hplus at zilker.net (Jon Watte)
-0	string		Joy!peffpwpc	header for PowerPC PEF executable
-#
-# ava assembler/linker Uros Platise <uros.platise at ijs.si>
-0       string          avaobj  AVR assembler object code
->7      string          >\0     version '%s'
-# gnu gmon magic From: Eugen Dedu <dedu at ese-metz.fr>
-0	string		gmon		GNU prof performance data
->4	long		x		- version %ld
-# From: Dave Pearson <davep at davep.org>
-# Harbour <URL:http://www.harbour-project.org/> HRB files.
-0	string		\xc0HRB		Harbour HRB file
->4	short		x		version %d
-
-# From: "Stefan A. Haubenthal" <polluks at web.de>
-0	belong		0x000001EB	Plan 9 executable
-#------------------------------------------------------------------------------
-# varied.script:  file(1) magic for various interpreter scripts
-
-0	string		#!\ /			a
->3	string		>\0			%s script text
-0	string		#!\	/		a
->3	string		>\0			%s script text
-0	string		#!/			a
->2	string		>\0			%s script text
-0	string		#!\ 			script text
->3	string		>\0			for %s
-
-
-#------------------------------------------------------------------------------
-# vax:  file(1) magic for VAX executable/object and APL workspace
-#
-0	lelong		0101557		VAX single precision APL workspace
-0	lelong		0101556		VAX double precision APL workspace
-
-#
-# VAX a.out (32V, BSD)
-#
-0	lelong		0407		VAX executable
->16	lelong		>0		not stripped
-
-0	lelong		0410		VAX pure executable
->16	lelong		>0		not stripped
-
-0	lelong		0413		VAX demand paged pure executable
->16	lelong		>0		not stripped
-
-0	lelong		0420		VAX demand paged (first page unmapped) pure executable
->16	lelong		>0		not stripped
-
-#
-# VAX COFF
-#
-# The `versions' should be un-commented if they work for you.
-# (Was the problem just one of endianness?)
-#
-0	leshort		0570		VAX COFF executable
->12	lelong		>0		not stripped
->22	leshort		>0		- version %ld
-0	leshort		0575		VAX COFF pure executable
->12	lelong		>0		not stripped
->22	leshort		>0		- version %ld
-
-#------------------------------------------------------------------------------
-# vicar:  file(1) magic for VICAR files.
-#
-# From: Ossama Othman <othman at astrosun.tn.cornell.edu
-# VICAR is JPL's in-house spacecraft image processing program
-# VICAR image
-0	string	LBLSIZE=	VICAR image data
->32	string	BYTE		\b, 8 bits  = VAX byte
->32	string	HALF		\b, 16 bits = VAX word     = Fortran INTEGER*2
->32	string	FULL		\b, 32 bits = VAX longword = Fortran INTEGER*4
->32	string	REAL		\b, 32 bits = VAX longword = Fortran REAL*4
->32	string	DOUB		\b, 64 bits = VAX quadword = Fortran REAL*8
->32	string	COMPLEX		\b, 64 bits = VAX quadword = Fortran COMPLEX*8
-# VICAR label file
-43	string	SFDU_LABEL	VICAR label file
-
-#------------------------------------------------------------------------------
-# visx:  file(1) magic for Visx format files
-#
-0	short		0x5555		VISX image file
->2	byte		0		(zero)
->2	byte		1		(unsigned char)
->2	byte		2		(short integer)
->2	byte		3		(float 32)
->2	byte		4		(float 64)
->2	byte		5		(signed char)
->2	byte		6		(bit-plane)
->2	byte		7		(classes)
->2	byte		8		(statistics)
->2	byte		10		(ascii text)
->2	byte		15		(image segments)
->2	byte		100		(image set)
->2	byte		101		(unsigned char vector)
->2	byte		102		(short integer vector)
->2	byte		103		(float 32 vector)
->2	byte		104		(float 64 vector)
->2	byte		105		(signed char vector)
->2	byte		106		(bit plane vector)
->2	byte		121		(feature vector)
->2	byte		122		(feature vector library)
->2	byte		124		(chain code)
->2	byte		126		(bit vector)
->2	byte		130		(graph)
->2	byte		131		(adjacency graph)
->2	byte		132		(adjacency graph library)
->2	string		.VISIX		(ascii text)
-
-#------------------------------------------------------------------------------
-# vms:  file(1) magic for VMS executables (experimental)
-#
-# VMS .exe formats, both VAX and AXP (Greg Roelofs, newt at uchicago.edu)
-
-# GRR 950122:  I'm just guessing on these, based on inspection of the headers
-# of three executables each for Alpha and VAX architectures.  The VAX files
-# all had headers similar to this:
-#
-#   00000  b0 00 30 00 44 00 60 00  00 00 00 00 30 32 30 35  ..0.D.`.....0205
-#   00010  01 01 00 00 ff ff ff ff  ff ff ff ff 00 00 00 00  ................
-#
-0	string	\xb0\0\x30\0	VMS VAX executable
->44032	string	PK\003\004	\b, Info-ZIP SFX archive v5.12 w/decryption
-#
-# The AXP files all looked like this, except that the byte at offset 0x22
-# was 06 in some of them and 07 in others:
-#
-#   00000  03 00 00 00 00 00 00 00  ec 02 00 00 10 01 00 00  ................
-#   00010  68 00 00 00 98 00 00 00  b8 00 00 00 00 00 00 00  h...............
-#   00020  00 00 07 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
-#   00030  00 00 00 00 01 00 00 00  00 00 00 00 00 00 00 00  ................
-#   00040  00 00 00 00 ff ff ff ff  ff ff ff ff 02 00 00 00  ................
-#
-0	belong	0x03000000	VMS Alpha executable
->75264	string	PK\003\004	\b, Info-ZIP SFX archive v5.12 w/decryption
-
-# -----------------------------------------------------------
-# VMware specific files (deducted from version 1.1 and log file entries)
-# Anthon van der Neut (anthon at mnt.org)
-0	belong	0x4d52564e	VMware nvram 
-0	belong	0x434f5744	VMware
->4	byte	3	 	virtual disk 
->>32	lelong	x		(%d/
->>36	lelong	x		\b%d/
->>40	lelong	x		\b%d)
->4	byte	2	 	undoable disk
->>32	string  >\0		(%s)
-
-#------------------------------------------------------------------------------
-# vorbis:  file(1) magic for Ogg/Vorbis files
-#
-# From Felix von Leitner <leitner at fefe.de>
-# Extended by Beni Cherniavsky <cben at crosswinds.net>
-# Further extended by Greg Wooledge <greg at wooledge.org>
-#
-# Most (everything but the number of channels and bitrate) is commented
-# out with `##' as it's not interesting to the average user.  The most
-# probable things advanced users would want to uncomment are probably
-# the number of comments and the encoder version.
-#
-# --- Ogg Framing ---
-0		string		OggS		Ogg data
->4		byte		!0		UNKNOWN REVISION %u
-##>4		byte		0		revision 0
->4		byte		0
-##>>14		lelong		x		(Serial %lX)
-# non-Vorbis content: FLAC (Free Loss-lessy Audio Codec,
-# http://flac.sourceforge.net)
->>28		string		fLaC		\b, FLAC audio
-# --- First vorbis packet - general header ---
->>28		string		\x01vorbis	\b, Vorbis audio,
->>>35		lelong		!0		UNKNOWN VERSION %lu,
-##>>>35		lelong		0		version 0,
->>>35		lelong		0
->>>>39		ubyte		1		mono,
->>>>39		ubyte		2		stereo,
->>>>39		ubyte		>2		%u channels,
->>>>40		lelong		x		%lu Hz
-# Minimal, nominal and maximal bitrates specified when encoding
->>>>48		string		<\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff	\b,
-# The above tests if at least one of these is specified:
->>>>>52		lelong		!-1
-# Vorbis RC2 has a bug which puts -1000 in the min/max bitrate fields
-# instead of -1.
-# Vorbis 1.0 uses 0 instead of -1.
->>>>>>52	lelong		!0
->>>>>>>52	lelong		!-1000
->>>>>>>>52	lelong		x		<%lu
->>>>>48		lelong		!-1
->>>>>>48	lelong		x		~%lu
->>>>>44		lelong		!-1
->>>>>>44	lelong		!-1000
->>>>>>>44	lelong		!0
->>>>>>>>44	lelong		x		>%lu
->>>>>48		string		<\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff	bps
-# -- Second vorbis header packet - the comments
-# A kludge to read the vendor string.  It's a counted string, not a
-# zero-terminated one, so file(1) can't read it in a generic way.
-# libVorbis is the only one existing currently, so I detect specifically
-# it.  The interesting value is the cvs date (8 digits decimal).
-# Post-RC1 Ogg files have the second header packet (and thus the version)
-# in a different place, so we must use an indirect offset.
->>>(84.b+85)		string		\x03vorbis
->>>>(84.b+96)		string/c	Xiphophorus\ libVorbis\ I	\b, created by: Xiphophorus libVorbis I
->>>>>(84.b+120)		string		>00000000	
-# Map to beta version numbers:
->>>>>>(84.b+120)	string		<20000508	(<beta1 - prepublic)
->>>>>>(84.b+120)	string		20000508	(beta1/2)
->>>>>>(84.b+120)	string		>20000508
->>>>>>>(84.b+120)	string		<20001031	(beta2-3)
->>>>>>(84.b+120)	string		20001031	(beta3)
->>>>>>(84.b+120)	string		>20001031
->>>>>>>(84.b+120)	string		<20010225	(beta3-4)
->>>>>>(84.b+120)	string		20010225	(beta4)
->>>>>>(84.b+120)	string		>20010225
->>>>>>>(84.b+120)	string		<20010615	(beta4-RC1)
->>>>>>(84.b+120)	string		20010615	(RC1)
->>>>>>(84.b+120)	string		20010813	(RC2)
->>>>>>(84.b+120)	string		20010816	(RC2 - Garf tuned v1)
->>>>>>(84.b+120)	string		20011014	(RC2 - Garf tuned v2)
->>>>>>(84.b+120)	string		20011217	(pre-RC3 CVS)
->>>>>>(84.b+120)	string		20011231	(RC3)
-# Some pre-1.0 CVS snapshots still had "Xiphphorus"...
->>>>>>(84.b+120)	string		>20011231	(pre-1.0 CVS)
-# For the 1.0 release, Xiphophorus is replaced by Xiph.Org
->>>>(84.b+96)		string/c	Xiph.Org\ libVorbis\ I	\b, created by: Xiph.Org libVorbis I
->>>>>(84.b+117)		string		>00000000	
->>>>>>(84.b+117)	string		<20020717	(pre-1.0 CVS)
->>>>>>(84.b+117)	string		20020717	(1.0)
->>>>>>(84.b+117)	string		>20020717	(post-1.0 CVS)
-
-#------------------------------------------------------------------------------
-# VXL: file(1) magic for VXL binary IO data files
-#
-# from Ian Scott <scottim at sf.net>
-#
-# VXL is a collection of C++ libraries for Computer Vision.
-# See the vsl chapter in the VXL Book for more info
-# http://www.isbe.man.ac.uk/public_vxl_doc/books/vxl/book.html
-# http:/vxl.sf.net
-
-2	lelong	0x472b2c4e	VXL data file,
->0	leshort	>0		schema version no %d
-
-#------------------------------------------------------------------------------
-# wordprocessors:  file(1) magic fo word processors.
-#
-####### PWP file format used on Smith Corona Personal Word Processors:
-2	string	\040\040\040\040\040\040\040\040\040\040\040ML4D\040\'92	Smith Corona PWP
->24	byte	2	\b, single spaced
->24	byte	3	\b, 1.5 spaced
->24	byte	4	\b, double spaced
->25	byte	0x42	\b, letter
->25	byte	0x54	\b, legal
->26	byte	0x46	\b, A4
-
-#WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
-0	string	\377WPC\020\000\000\000\022\012\001\001\000\000\000\000	(WP) loadable text
->15	byte	0	Optimized for Intel
->15	byte	1	Optimized for Non-Intel
-1	string	WPC	(Corel/WP)
->8	short	257	WordPerfect macro
->8	short	258	WordPerfect help file
->8	short	259	WordPerfect keyboard file
->8	short	266	WordPerfect document
->8	short	267	WordPerfect dictionary
->8	short	268	WordPerfect thesaurus
->8	short	269	WordPerfect block
->8	short	270	WordPerfect rectangular block
->8	short	271	WordPerfect column block
->8	short	272	WordPerfect printer data
->8	short	275	WordPerfect printer data
->8	short	276	WordPerfect driver resource data
->8	short	279	WordPerfect hyphenation code
->8	short	280	WordPerfect hyphenation data
->8	short	281	WordPerfect macro resource data
->8	short	283	WordPerfect hyphenation lex
->8	short	285	WordPerfect wordlist
->8	short	286	WordPerfect equation resource data
->8	short	289	WordPerfect spell rules
->8	short	290	WordPerfect dictionary rules
->8	short	295	WordPerfect spell rules (Microlytics)
->8	short	299	WordPerfect settings file
->8	short	301	WordPerfect 4.2 document
->8	short	325	WordPerfect dialog file
->8	short	332	WordPerfect button bar
->8	short	513	Shell macro
->8	short	522	Shell definition
->8	short	769	Notebook macro
->8	short	770	Notebook help file
->8	short	771	Notebook keyboard file
->8	short	778	Notebook definition
->8	short	1026	Calculator help file
->8	short 	1538	Calendar help file
->8	short 	1546	Calendar data file
->8	short	1793	Editor macro
->8	short	1794	Editor help file
->8	short	1795	Editor keyboard file
->8	short	1817	Editor macro resource file
->8	short 	2049	Macro editor macro
->8	short 	2050	Macro editor help file
->8	short	2051	Macro editor keyboard file
->8	short	2305	PlanPerfect macro
->8	short	2306	PlanPerfect help file
->8	short	2307	PlanPerfect keyboard file
->8	short	2314	PlanPerfect worksheet
->8	short	2319	PlanPerfect printer definition
->8	short	2322	PlanPerfect graphic definition
->8	short	2323	PlanPerfect data
->8	short	2324	PlanPerfect temporary printer
->8	short	2329	PlanPerfect macro resource data
->8	byte	11	Mail
->8	short	2818	help file
->8	short	2821	distribution list
->8	short	2826	out box
->8	short	2827	in box
->8	short	2836	users archived mailbox
->8	short	2837	archived message database
->8	short	2838	archived attachments
->8	short	3083	Printer temporary file
->8	short	3330	Scheduler help file
->8	short	3338	Scheduler in file
->8	short	3339	Scheduler out file
->8	short	3594	GroupWise settings file
->8	short	3601	GroupWise directory services
->8	short	3627	GroupWise settings file
->8	short	4362	Terminal resource data
->8	short	4363	Terminal resource data
->8	short	4395	Terminal resource data
->8	short	4619	GUI loadable text
->8	short	4620	graphics resource data
->8	short	4621	printer settings file
->8	short	4622	port definition file
->8	short	4623	print queue parameters
->8	short	4624	compressed file
->8	short	5130	Network service msg file
->8	short	5131	Network service msg file
->8	short	5132	Async gateway login msg
->8	short	5134	GroupWise message file
->8	short	7956	GroupWise admin domain database
->8	short	7957	GroupWise admin host database
->8	short	7959	GroupWise admin remote host database
->8	short	7960	GroupWise admin ADS deferment data file
->8	short	8458	IntelliTAG (SGML) compiled DTD
->8	long	18219264	WordPerfect graphic image (1.0)
->8	long	18219520	WordPerfect graphic image (2.0)
-#end of WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
-
-# Hangul (Korean) Word Processor File
-0	string	HWP\ Document\ File	Hangul (Korean) Word Processor File
-
-# CosmicBook, from Benoît Rouits
-0       string  CSBK    Ted Neslson's CosmicBook hypertext file
-
-
-#------------------------------------------------------------------------------
-# file(1) magic(5) data for xdelta  Josh MacDonald <jmacd at CS.Berkeley.EDU>
-#
-0	string	%XDELTA%	XDelta binary patch file 0.14
-0	string	%XDZ000%	XDelta binary patch file 0.18
-0	string	%XDZ001%	XDelta binary patch file 0.20
-0	string	%XDZ002%	XDelta binary patch file 1.0
-0	string	%XDZ003%	XDelta binary patch file 1.0.4
-0	string	%XDZ004%	XDelta binary patch file 1.1
-
-#------------------------------------------------------------------------------
-# xenix:  file(1) magic for Microsoft Xenix
-#
-# "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small
-# model" lifted from "magic.xenix", with comment "derived empirically;
-# treat as folklore until proven"
-#
-# "small model", "large model", "huge model" stuff lifted from XXX
-#
-# XXX - "x.out" collides with PDP-11 archives
-#
-0	string		core		core file (Xenix)
-0	byte		0x80		8086 relocatable (Microsoft)
-0	leshort		0xff65		x.out
->2	string		__.SYMDEF	 randomized
->0	byte		x		archive
-0	leshort		0x206		Microsoft a.out
->8	leshort		1		Middle model
->0x1e	leshort		&0x10		overlay
->0x1e	leshort		&0x2		separate
->0x1e	leshort		&0x4		pure
->0x1e	leshort		&0x800		segmented
->0x1e	leshort		&0x400		standalone
->0x1e	leshort		&0x8		fixed-stack
->0x1c	byte		&0x80		byte-swapped
->0x1c	byte		&0x40		word-swapped
->0x10	lelong		>0		not-stripped
->0x1e	leshort		^0xc000		pre-SysV
->0x1e	leshort		&0x4000		V2.3
->0x1e	leshort		&0x8000		V3.0
->0x1c	byte		&0x4		86
->0x1c	byte		&0xb		186
->0x1c	byte		&0x9		286
->0x1c	byte		&0xa		386
->0x1f	byte		<0x040		small model
->0x1f	byte		=0x048		large model	
->0x1f	byte		=0x049		huge model 
->0x1e	leshort		&0x1		executable
->0x1e	leshort		^0x1		object file
->0x1e	leshort		&0x40		Large Text
->0x1e	leshort		&0x20		Large Data
->0x1e	leshort		&0x120		Huge Objects Enabled
->0x10	lelong		>0		not stripped
-
-0	leshort		0x140		old Microsoft 8086 x.out
->0x3	byte		&0x4		separate
->0x3	byte		&0x2		pure
->0	byte		&0x1		executable
->0	byte		^0x1		relocatable
->0x14	lelong		>0		not stripped
-
-0	lelong		0x206		b.out
->0x1e	leshort		&0x10		overlay
->0x1e	leshort		&0x2		separate
->0x1e	leshort		&0x4		pure
->0x1e	leshort		&0x800		segmented
->0x1e	leshort		&0x400		standalone
->0x1e	leshort		&0x1		executable
->0x1e	leshort		^0x1		object file
->0x1e	leshort		&0x4000		V2.3
->0x1e	leshort		&0x8000		V3.0
->0x1c	byte		&0x4		86
->0x1c	byte		&0xb		186
->0x1c	byte		&0x9		286
->0x1c	byte		&0x29		286
->0x1c	byte		&0xa		386
->0x1e	leshort		&0x4		Large Text
->0x1e	leshort		&0x2		Large Data
->0x1e	leshort		&0x102		Huge Objects Enabled
-
-0	leshort		0x580		XENIX 8086 relocatable or 80286 small model
-
-#------------------------------------------------------------------------------
-# xwindows:  file(1) magic for various X/Window system file formats.
-
-# Compiled X Keymap 
-# XKM (compiled X keymap) files (including version and byte ordering)
-1	string	mkx				Compiled XKB Keymap: lsb,
->0	byte	>0				version %d
->0	byte	=0				obsolete
-0	string	xkm				Compiled XKB Keymap: msb,
->3	byte	>0				version %d
->0	byte	=0				obsolete
-
-# xfsdump archive
-0	string	xFSdump0			xfsdump archive
->8	long	x	(version %d)
-
-# Jaleo XFS files
-0	long	395726				Jaleo XFS file
->4	long	x				- version %ld
->8	long	x				- [%ld -
->20	long	x				%ldx
->24	long	x				%ldx
->28	long	1008				YUV422]
->28	long	1000				RGB24]
-
-#------------------------------------------------------------------------------
-# zilog:  file(1) magic for Zilog Z8000.
-#
-# Was it big-endian or little-endian?  My Product Specification doesn't
-# say.
-#
-0	long		0xe807		object file (z8000 a.out)
-0	long		0xe808		pure object file (z8000 a.out)
-0	long		0xe809		separate object file (z8000 a.out)
-0	long		0xe805		overlay object file (z8000 a.out)
-
-#------------------------------------------------------------------------------
-# zyxel:  file(1) magic for ZyXEL modems
-#
-# From <rob at pe1chl.ampr.org>
-# These are the /etc/magic entries to decode datafiles as used for the
-# ZyXEL U-1496E DATA/FAX/VOICE modems.  (This header conforms to a
-# ZyXEL-defined standard)
-
-0	string		ZyXEL\002	ZyXEL voice data
->10	byte		0		- CELP encoding
->10	byte&0x0B	1		- ADPCM2 encoding
->10	byte&0x0B	2		- ADPCM3 encoding
->10	byte&0x0B	3		- ADPCM4 encoding
->10	byte&0x0B	8		- New ADPCM3 encoding
->10	byte&0x04	4		with resync
-# Magic
-# Magic data for file(1) command.
-# Format is described in magic(5).
-#
-# Note: If you have edited this file you may run `file -C'
-#       to make a pre-compiled magic.mgc for faster execution
-#
-
-
-#--------------------------------------------------------------------------------
-# SFF format by 454 Life Sciences, Whitehead Institute for Biomedical Research and Sanger Institute.
-# 
-
-0	string		.sff		Standard Flowgram Format (SFF)
->4	byte		x		- version %d
->5	byte		x		%d
->6	byte		x		%d
->7	byte		x		%d
->20	belong		x		, %Ld reads
-
-#--------------------------------------------------------------------------------
-# SRF format Generic Format for Sequence Data 
-# 
-
-0	string		SSRF		Generic Format for Sequence Data (SRF)
->9	byte		x		- version %c
->10	byte		x		%c
->11	byte		x		%c
-
-#---------------------------------------------------------------------------------
-# FASTQ format Generic Format for Sequence Data 
-#
-
-0	string		@		FASTQ Generic Format for Sequence Data
-
-#------------------------------------------------------------------------------
-# Localstuff:  file(1) magic for locally observed files
-#
-# $Id: kfsmagic,v 1.2 2010/06/07 15:49:27 killian2 Exp $
-# Add any locally observed files here.  Remember:
-# text if readable, executable if runnable binary, data if unreadable.
-
-# XXX promoted from tex so that *.tfm is not mis-identified as mc68k file.
-# There is no way to detect TeX Font Metric (*.tfm) files without
-# breaking them apart and reading the data.  The following patterns
-# match most *.tfm files generated by METAFONT or afm2tfm.
-2	string		\000\021	TeX font metric data
->33	string		>\0		(%s)
-2	string		\000\022	TeX font metric data
->33	string		>\0		(%s)
-#------------------------------------------------------------------------------
-# acorn:  file(1) magic for files found on Acorn systems
-#
-
-# RISC OS Chunk File Format
-# From RISC OS Programmer's Reference Manual, Appendix D
-# We guess the file type from the type of the first chunk.
-0	lelong		0xc3cbc6c5	RISC OS Chunk data
->12	string		OBJ_		\b, AOF object
->12	string		LIB_		\b, ALF library
-
-# RISC OS AIF, contains "SWI OS_Exit" at offset 16.
-16	lelong		0xef000011	RISC OS AIF executable
-
-# RISC OS Draw files
-# From RISC OS Programmer's Reference Manual, Appendix E
-0	string 		Draw		RISC OS Draw file data
-
-# RISC OS new format font files
-# From RISC OS Programmer's Reference Manual, Appendix E
-0	string		FONT\0		RISC OS outline font data,
->5	byte		x		version %d
-0	string		FONT\1		RISC OS 1bpp font data,
->5	byte		x		version %d
-0	string		FONT\4		RISC OS 4bpp font data
->5	byte		x		version %d
-
-# RISC OS Music files
-# From RISC OS Programmer's Reference Manual, Appendix E
-0	string		Maestro\r	RISC OS music file
->8	byte		x		version %d
-
-
-#------------------------------------------------------------------------------
-# adi: file(1) magic for ADi's objects
-# From Gregory McGarry <g.mcgarry at ieee.org>
-#
-0	leshort		0x521c		COFF DSP21k
->18	lelong		&02		executable,
->18	lelong		^02
->>18	lelong		&01		static object,
->>18	lelong		^01		relocatable object,
->18	lelong		&010		stripped
->18	lelong		^010		not stripped
-
-#------------------------------------------------------------------------------
-# adventure: file(1) magic for Adventure game files
-#
-# from Allen Garvin <earendil at faeryland.tamu-commerce.edu>
-# Edited by Dave Chapeskie <dchapes at ddm.on.ca> Jun 28, 1998
-# Edited by Chris Chittleborough <cchittleborough at yahoo.com.au>, March 2002
-#
-# ALAN
-# I assume there are other, lower versions, but these are the only ones I
-# saw in the archive.
-0	beshort	0x0206	ALAN game data
->2	byte	<10	version 2.6%d
-
-# Conflicts with too much other stuff!
-# Infocom
-# (Note: to avoid false matches Z-machine version 1 and 2 are not
-# recognized since only the oldest Zork I and II used them.  Similarly
-# there are 4 Infocom games that use verion 4 that are not recognized.)
-#0	byte	3	Infocom game data (Z-machine 3,
-#>2	beshort	<0x7fff	Release %3d,
-#>26	beshort >0	Size %d*2
-#>18	string	>\0	Serial %.6s)
-#0	byte	5	Infocom game data (Z-machine 5,
-#>2	beshort	<0x7fff	Release %3d,
-#>26	beshort >0	Size %d*4
-#>18	string	>\0	Serial %.6s)
-#0	byte	6	Infocom game data (Z-machine 6,
-#>2	beshort	<0x7fff	Release %3d,
-#>26	beshort >0	Size %d*8
-#>18	string	>\0	Serial %.6s)
-#0	byte	8	Infocom game data (Z-machine 8,
-#>2	beshort	<0x7fff	Release %3d,
-#>26	beshort >0	Size %d*8
-#>18	string	>\0	Serial %.6s)
-
-# TADS (Text Adventure Development System)
-#  All files are machine-independent (games compile to byte-code) and are tagged
-#  with a version string of the form "V2.<digit>.<digit>\0" (but TADS 3 is
-#  on the way).
-#  Game files start with "TADS2 bin\n\r\032\0" then the compiler version.
-0	string	TADS2\ bin	TADS
->9	belong  !0x0A0D1A00	game data, CORRUPTED
->9	belong	 0x0A0D1A00
->>13	string	>\0		%s game data
-#  Resource files start with "TADS2 rsc\n\r\032\0" then the compiler version.
-0	string	TADS2\ rsc	TADS
->9	belong  !0x0A0D1A00	resource data, CORRUPTED
->9	belong	 0x0A0D1A00
->>13	string	>\0		%s resource data
-#  Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian
-#  2-byte length N, the N-char name of the game file *without* a NUL (darn!),
-# "TADS2 save\n\r\032\0" and the interpreter version. 
-0	string	TADS2\ save/g	TADS
->12	belong	!0x0A0D1A00	saved game data, CORRUPTED
->12	belong	 0x0A0D1A00
->>(16.s+32) string >\0		%s saved game data
-#  Other saved game files start with "TADS2 save\n\r\032\0" and the interpreter
-#  version.
-0	string	TADS2\ save	TADS
->10	belong	!0x0A0D1A00	saved game data, CORRUPTED
->10	belong	 0x0A0D1A00
->>14	string	>\0		%s saved game data
-#------------------------------------------------------------------------------
-# allegro:  file(1) magic for Allegro datafiles
-# Toby Deshane <hac at shoelace.digivill.net>
-#
-0 belong 0x736C6821   Allegro datafile (packed)
-0 belong 0x736C682E   Allegro datafile (not packed/autodetect)
-0 belong 0x736C682B   Allegro datafile (appended exe data)
-
-#------------------------------------------------------------------------------
-# alliant:  file(1) magic for Alliant FX series a.out files
-#
-# If the FX series is the one that had a processor with a 68K-derived
-# instruction set, the "short" should probably become "beshort" and the
-# "long" should probably become "belong".
-# If it's the i860-based one, they should probably become either the
-# big-endian or little-endian versions, depending on the mode they ran
-# the 860 in....
-#
-0	short		0420		0420 Alliant virtual executable
->2	short		&0x0020		common library
->16	long		>0		not stripped
-0	short		0421		0421 Alliant compact executable
->2	short		&0x0020		common library
->16	long		>0		not stripped
-#------------------------------------------------------------------------------
-# alpha architecture description
-#
-
-0	leshort		0603		COFF format alpha
->22	leshort&030000	!020000		executable
->24	leshort		0410		pure
->24	leshort		0413		paged
->22	leshort&020000	!0		dynamically linked
->16	lelong		!0		not stripped
->16	lelong		0		stripped
->22	leshort&030000	020000		shared library
->24	leshort		0407		object
->27	byte		x		- version %d
->26	byte		x		.%d
->28	byte		x		-%d
-
-# Basic recognition of Digital UNIX core dumps - Mike Bremford <mike at opac.bl.uk>
-#
-# The actual magic number is just "Core", followed by a 2-byte version
-# number; however, treating any file that begins with "Core" as a Digital
-# UNIX core dump file may produce too many false hits, so we include one
-# byte of the version number as well; DU 5.0 appears only to be up to
-# version 2.
-#
-0	string		Core\001	Alpha COFF format core dump (Digital UNIX)
->24	string		>\0		\b, from '%s'
-0	string		Core\002	Alpha COFF format core dump (Digital UNIX)
->24	string		>\0		\b, from '%s'
-
-#------------------------------------------------------------------------------
-# amanda:  file(1) magic for amanda file format
-#
-0	string	AMANDA:\ 		AMANDA 
->8	string	TAPESTART\ DATE		tape header file,
->>23	string	X
->>>25	string	>\ 			Unused %s
->>23	string	>\ 			DATE %s
->8	string	FILE\ 			dump file,
->>13	string	>\ 			DATE %s
-#------------------------------------------------------------------------------
-# amigaos:  file(1) magic for AmigaOS binary formats:
-
-#
-# From ignatios at cs.uni-bonn.de (Ignatios Souvatzis)
-# Some formats are still missing: AmigaOS special IFF's, e.g.: FORM....CTLG
-# (the others should be separate, anyway)
-#
-0	belong		0x000003f3	AmigaOS loadseg()ble executable/binary
-0	belong		0x000003e7	AmigaOS object/library data
-#
-0	beshort		0xe310		Amiga Workbench
->2	beshort		1		
->>48	byte		1		disk icon
->>48	byte		2		drawer icon
->>48	byte		3		tool icon
->>48	byte		4		project icon
->>48	byte		5		garbage icon
->>48	byte		6		device icon
->>48	byte		7		kickstart icon
->>48	byte		8		workbench application icon
->2	beshort		>1		icon, vers. %d
-#
-# various sound formats from the Amiga
-# G=F6tz Waschk <waschk at informatik.uni-rostock.de>
-#
-0	string		FC14		Future Composer 1.4 Module sound file
-0	string		SMOD		Future Composer 1.3 Module sound file
-0	string		AON4artofnoise	Art Of Noise Module sound file
-1	string		MUGICIAN/SOFTEYES Mugician Module sound file
-58	string		SIDMON\ II\ -\ THE	Sidmon 2.0 Module sound file
-0	string		Synth4.0	Synthesis Module sound file
-0	string		ARP.		The Holy Noise Module sound file
-0	string		BeEp\0		JamCracker Module sound file
-0	string		COSO\0		Hippel-COSO Module sound file
-# Too simple (short, pure ASCII, deep), MPi
-#26	string		V.3		Brian Postma's Soundmon Module sound file v3
-#26	string		BPSM		Brian Postma's Soundmon Module sound file v3
-#26	string		V.2		Brian Postma's Soundmon Module sound file v2
-
-# The following are from: "Stefan A. Haubenthal" <polluks at web.de>
-0	beshort		0x0f00		AmigaOS bitmap font
-0	beshort		0x0f03		AmigaOS outline font
-0	belong		0x80001001	AmigaOS outline tag
-0	string		##\ version	catalog translation
-
-0	string		FORM		IFF data
->8	string		CTLG		\b, CTLG message catalog
->8	string		PREF		\b, PREF preferences
-
-0	string		Rar!		RAR archive data,
->44	byte		x		v%0x,
->35	byte		0		os: MS-DOS
->35	byte		1		os: OS/2
->35	byte		2		os: Win32
->35	byte		3		os: Unix
-
-0	belong		0x000003fa	AmigaOS shared library
-
-# Amiga disk types
-# 
-0	string		RDSK		Rigid Disk Block
->160	string		x		on %.24s
-0	string		DOS\0		Amiga DOS disk
-0	string		DOS\1		Amiga FFS disk
-0	string		DOS\2		Amiga Inter DOS disk
-0	string		DOS\3		Amiga Inter FFS disk
-0	string		DOS\4		Amiga Fastdir DOS disk
-0	string		DOS\5		Amiga Fastdir FFS disk
-0	string		KICK		Kickstart disk
-
-#------------------------------------------------------------------------------
-# animation:  file(1) magic for animation/movie formats
-#
-# animation formats
-# MPEG, FLI, DL originally from vax at ccwf.cc.utexas.edu (VaX#n8)
-# FLC, SGI, Apple originally from Daniel Quinlan (quinlan at yggdrasil.com)
-
-# MPEG animation format
-0	belong		0x000001b3		MPEG video stream data
-#>4	beshort&0xfff0	x			(%d x
-#>5	beshort&0x0fff  x			%d)
-0	belong		0x000001ba		MPEG system stream data
-
-# MPEG Audio (*.mpx)
-# from dreesen at math.fu-berlin.de
-
-# MPEG 1.0 Layer 3
-0       beshort&0xfffe  =0xfffa         \bMP3
->2      byte&0xf0       =0x10           \b,  32 kBits
->2      byte&0xf0       =0x20           \b,  40 kBits
->2      byte&0xf0       =0x30           \b,  48 kBits
->2      byte&0xf0       =0x40           \b,  56 kBits
->2      byte&0xf0       =0x50           \b,  64 kBits
->2      byte&0xf0       =0x60           \b,  80 kBits
->2      byte&0xf0       =0x70           \b,  96 kBits
->2      byte&0xf0       =0x80           \b, 112 kBits
->2      byte&0xf0       =0x90           \b, 128 kBits
->2      byte&0xf0       =0xA0           \b, 160 kBits
->2      byte&0xf0       =0xB0           \b, 192 kBits
->2      byte&0xf0       =0xC0           \b, 224 kBits
->2      byte&0xf0       =0xD0           \b, 256 kBits
->2      byte&0xf0       =0xE0           \b, 320 kBits
-# freq
->2      byte&0x0C       =0x00           \b, 44.1 kHz
->2      byte&0x0C       =0x04           \b, 48 kHz
->2      byte&0x0C       =0x08           \b, 32 kHz
-# misc
->3      byte&0xC0       =0x00           \b, Stereo
->3      byte&0xC0       =0x40           \b, JStereo
->3      byte&0xC0       =0x80           \b, Dual-Ch
->3      byte&0xC0       =0xC0           \b, Mono
-#>1     byte&0x01       =0x00           \b, Error Protection
-#>2     byte&0x02       =0x02           \b, Padding
-#>2     byte&0x01       =0x01           \b, Private
-#>3     byte&0x08       =0x08           \b, Copyright
-#>3     byte&0x04       =0x04           \b, Original
-#>3     byte&0x03       1               \b, Emphasis 5
-#>3     byte&0x03       3               \b, Emphasis c
-
-# MPEG 1.0 Layer 2
-0       beshort&0xfffe  =0xfffc         \bMP2
->2      byte&0xf0       =0x10           \b,  32 kBits
->2      byte&0xf0       =0x20           \b,  48 kBits
->2      byte&0xf0       =0x30           \b,  56 kBits
->2      byte&0xf0       =0x40           \b,  64 kBits
->2      byte&0xf0       =0x50           \b,  80 kBits
->2      byte&0xf0       =0x60           \b,  96 kBits
->2      byte&0xf0       =0x70           \b, 112 kBits
->2      byte&0xf0       =0x80           \b, 128 kBits
->2      byte&0xf0       =0x90           \b, 160 kBits
->2      byte&0xf0       =0xA0           \b, 192 kBits
->2      byte&0xf0       =0xB0           \b, 224 kBits
->2      byte&0xf0       =0xC0           \b, 256 kBits
->2      byte&0xf0       =0xD0           \b, 320 kBits
->2      byte&0xf0       =0xE0           \b, 384 kBits
-# freq
->2      byte&0x0C       =0x00           \b, 44.1 kHz
->2      byte&0x0C       =0x04           \b, 48 kHz
->2      byte&0x0C       =0x08           \b, 32 kHz
-# misc
->3      byte&0xC0       =0x00           \b, Stereo
->3      byte&0xC0       =0x40           \b, JStereo
->3      byte&0xC0       =0x80           \b, Dual-Ch
->3      byte&0xC0       =0xC0           \b, Mono
-#>1     byte&0x01       =0x00           \b, Error Protection
-#>2     byte&0x02       =0x02           \b, Padding
-#>2     byte&0x01       =0x01           \b, Private
-#>3     byte&0x08       =0x08           \b, Copyright
-#>3     byte&0x04       =0x04           \b, Original
-#>3     byte&0x03       1               \b, Emphasis 5
-#>3     byte&0x03       3               \b, Emphasis c
-
-# MPEG 2.0
-0       beshort&0xfff8  =0xfff0         MP
-# Layer 3
->1      byte            &0x02           \b3
-# Layer 2
->1      byte            &0x04           \b2
->2      byte&0xf0       =0x10           \b,   8 kBits
->2      byte&0xf0       =0x20           \b,  16 kBits
->2      byte&0xf0       =0x30           \b,  24 kBits
->2      byte&0xf0       =0x40           \b,  32 kBits
->2      byte&0xf0       =0x50           \b,  40 kBits
->2      byte&0xf0       =0x60           \b,  48 kBits
->2      byte&0xf0       =0x70           \b,  56 kBits
->2      byte&0xf0       =0x80           \b,  64 kBits
->2      byte&0xf0       =0x90           \b,  80 kBits
->2      byte&0xf0       =0xA0           \b,  96 kBits
->2      byte&0xf0       =0xB0           \b, 112 kBits
->2      byte&0xf0       =0xC0           \b, 128 kBits
->2      byte&0xf0       =0xD0           \b, 144 kBits
->2      byte&0xf0       =0xE0           \b, 160 kBits
-# freq
->2      byte&0x0C       =0x00           \b, 22.05 kHz
->2      byte&0x0C       =0x04           \b, 24 kHz
->2      byte&0x0C       =0x08           \b, 16 kHz
-# misc
->3      byte&0xC0       =0x00           \b, Stereo
->3      byte&0xC0       =0x40           \b, JStereo
->3      byte&0xC0       =0x80           \b, Dual-Ch
->3      byte&0xC0       =0xC0           \b, Mono
-#>1     byte&0x01       =0x00           \b, Error Protection
-#>2     byte&0x02       =0x02           \b, Padding
-#>2     byte&0x01       =0x01           \b, Private
-#>3     byte&0x08       =0x08           \b, Copyright
-#>3     byte&0x04       =0x04           \b, Original
-#>3     byte&0x03       1               \b, Emphasis 5
-#>3     byte&0x03       3               \b, Emphasis c
-
-#From: Johan Gade <jgade at diku.dk>
-
-# MPEG-4 Advanced Audio Coding (AAC) file (perhaps also MPEG-2 ACC?)
-16	string		M4A		MPEG-4 Advanced Audio Coding file (AAC)
-
-
-# FLI animation format
-4	leshort		0xAF11			FLI file
->6	leshort		x			- %d frames,
->8	leshort		x			width=%d pixels,
->10	leshort		x			height=%d pixels,
->12	leshort		x			depth=%d,
->16	leshort		x			ticks/frame=%d
-# FLC animation format
-4	leshort		0xAF12			FLC file
->6	leshort		x			- %d frames
->8	leshort		x			width=%d pixels,
->10	leshort		x			height=%d pixels,
->12	leshort		x			depth=%d,
->16	leshort		x			ticks/frame=%d
-
-# DL animation format
-# XXX - collision with most `mips' magic
-#
-# I couldn't find a real magic number for these, however, this
-# -appears- to work.  Note that it might catch other files, too, so be
-# careful!
-#
-# Note that title and author appear in the two 20-byte chunks
-# at decimal offsets 2 and 22, respectively, but they are XOR'ed with
-# 255 (hex FF)!  The DL format is really bad.
-#
-#0	byte	1	DL version 1, medium format (160x100, 4 images/screen)
-#>42	byte	x	- %d screens,
-#>43	byte	x	%d commands
-#0	byte	2	DL version 2
-#>1	byte	1	- large format (320x200,1 image/screen),
-#>1	byte	2	- medium format (160x100,4 images/screen),
-#>1	byte	>2	- unknown format,
-#>42	byte	x	%d screens,
-#>43	byte	x	%d commands
-# Based on empirical evidence, DL version 3 have several nulls following the
-# \003.  Most of them start with non-null values at hex offset 0x34 or so.
-#0	string	\3\0\0\0\0\0\0\0\0\0\0\0	DL version 3
-
-# SGI formats
-0	string		MOVI		Silicon Graphics movie file
-
-# Apple Quicktime: Scan for all known top-level QT atom markers
-4	string		moov		Apple QuickTime movie file (moov)
-4	string		mdat		Apple QuickTime movie file (mdat)
-4	string		ftyp		Apple QuickTime movie file (ftyp)
-4	string		free		Apple QuickTime movie file (free)
-4	string		junk		Apple QuickTime movie file (junk)
-4	string		pnot		Apple QuickTime movie file (pnot)
-4	string		skip		Apple QuickTime movie file (skip)
-4	string		wide		Apple QuickTime movie file (wide)
-4	string		pict		Apple QuickTime movie file (pict)
-
-# iso 13818 transport stream
-#
-# from Oskar Schirmer <schirmer at scara.com> Feb 3, 2001 (ISO 13818.1)
-# (the following is a little bit restrictive and works fine for a stream
-#  that starts with PAT properly. it won't work for stream data, that is
-#  cut from an input device data right in the middle, but this shouldn't
-#  disturb)
-# syncbyte      8 bit	0x47
-# error_ind     1 bit	-
-# payload_start 1 bit	1
-# priority      1 bit	-
-# PID          13 bit	0x0000
-# scrambling    2 bit	-
-# adaptfld_ctrl 2 bit	1 or 3
-# conti_count   4 bit	0
-0	belong&0xFF5FFF1F	0x47400010	MPEG transport stream data
->188	byte			!0x47		CORRUPTED
-
-# DIF digital video file format <mpruett at sgi.com>
-0	belong&0xffffff00	0x1f070000      DIF
->4	byte			&0x01		(DVCPRO) movie file
->4	byte			^0x01		(DV) movie file
->3	byte			&0x80		(PAL)
->3	byte			^0x80		(NTSC)
-
-# Microsoft Advanced Streaming Format (ASF) <mpruett at sgi.com>
-0	belong			0x3026b275	Microsoft ASF
-
-# MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
-0	string			\x8aMNG		MNG video data,
->4	belong			!0x0d0a1a0a	CORRUPTED,
->4	belong			0x0d0a1a0a
->>16    belong	x				%ld x
->>20    belong	x				%ld
-
-# JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
-0	string			\x8bJNG		JNG video data,
->4	belong			!0x0d0a1a0a	CORRUPTED,
->4	belong			0x0d0a1a0a
->>16    belong	x				%ld x
->>20    belong	x				%ld
-
-# Vivo video (Wolfram Kleff)
-3	string		\x0D\x0AVersion:Vivo	Vivo video data
-
-# VRML (Virtual Reality Modelling Language)
-0       string/b        #VRML\ V1.0\ ascii	VRML 1 file
-0	string/b	#VRML\ V2.0\ utf8	ISO/IEC 14772 VRML 97 file
-
-#---------------------------------------------------------------------------
-# HVQM4: compressed movie format designed by Hudson for Nintendo GameCube
-# From Mark Sheppard <msheppard at climax.co.uk>, 2002-10-03
-#
-0	string		HVQM4		%s
->6	string		>\0		v%s
->0	byte		x		GameCube movie,
->0x34	ubeshort	x		%d x
->0x36	ubeshort	x		%d,
->0x26	ubeshort	x		%dµs,
->0x42	ubeshort	0		no audio
->0x42	ubeshort	>0		%dHz audio
-
-#------------------------------------------------------------------------------
-# apl:  file(1) magic for APL (see also "pdp" and "vax" for other APL
-#       workspaces)
-#
-0	long		0100554		APL workspace (Ken's original?)
-
-#------------------------------------------------------------------------------
-# applix:  file(1) magic for Applixware
-# From: Peter Soos <sp at osb.hu>
-#
-0	string		*BEGIN		Applixware
->7	string		WORDS			Words Document
->7	string		GRAPHICS		Graphic
->7	string		RASTER			Bitmap
->7	string		SPREADSHEETS		Spreadsheet
->7	string		MACRO			Macro
->7	string		BUILDER			Builder Object
-
-#------------------------------------------------------------------------------
-# archive:  file(1) magic for archive formats (see also "msdos" for self-
-#           extracting compressed archives)
-#
-# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc.
-# pre-POSIX "tar" archives are handled in the C code.
-
-# POSIX tar archives
-257	string		ustar\0		POSIX tar archive
-257	string		ustar\040\040\0	GNU tar archive
-
-# cpio archives
-#
-# Yes, the top two "cpio archive" formats *are* supposed to just be "short".
-# The idea is to indicate archives produced on machines with the same
-# byte order as the machine running "file" with "cpio archive", and
-# to indicate archives produced on machines with the opposite byte order
-# from the machine running "file" with "byte-swapped cpio archive".
-#
-# The SVR4 "cpio(4)" hints that there are additional formats, but they
-# are defined as "short"s; I think all the new formats are
-# character-header formats and thus are strings, not numbers.
-0	short		070707		cpio archive
-0	short		0143561		byte-swapped cpio archive
-0	string		070707		ASCII cpio archive (pre-SVR4 or odc)
-0	string		070701		ASCII cpio archive (SVR4 with no CRC)
-0	string		070702		ASCII cpio archive (SVR4 with CRC)
-
-# Debian package (needs to go before regular portable archives)
-#
-0	string		!<arch>\ndebian
->8	string		debian-split	part of multipart Debian package
->8	string		debian-binary	Debian binary package
->68	string		>\0		(format %s)
->81	string		bz2		\b, uses bzip2 compression
->84	string		gz		\b, uses gzip compression
-#>136	ledate		x		created: %s
-
-# other archives
-0	long		0177555		very old archive
-0	short		0177555		very old PDP-11 archive
-0	long		0177545		old archive
-0	short		0177545		old PDP-11 archive
-0	long		0100554		apl workspace
-0	string		=<ar>		archive
-
-# MIPS archive (needs to go before regular portable archives)
-#
-0	string	!<arch>\n__________E	MIPS archive
->20	string	U			with MIPS Ucode members
->21	string	L			with MIPSEL members
->21	string	B			with MIPSEB members
->19	string	L			and an EL hash table
->19	string	B			and an EB hash table
->22	string	X			-- out of date
-
-0	string		-h-		Software Tools format archive text
-
-#
-# XXX - why are there multiple <ar> thingies?  Note that 0x213c6172 is
-# "!<ar", so, for new-style (4.xBSD/SVR2andup) archives, we have:
-#
-# 0	string		!<arch>		current ar archive
-# 0	long		0x213c6172	archive file
-#
-# and for SVR1 archives, we have:
-#
-# 0	string		\<ar>		System V Release 1 ar archive
-# 0	string		=<ar>		archive
-#
-# XXX - did Aegis really store shared libraries, breakpointed modules,
-# and absolute code program modules in the same format as new-style
-# "ar" archives?
-#
-0	string		!<arch>		current ar archive
->8	string		__.SYMDEF	random library
->0	belong		=65538		- pre SR9.5
->0	belong		=65539		- post SR9.5
->0	beshort		2		- object archive
->0	beshort		3		- shared library module
->0	beshort		4		- debug break-pointed module
->0	beshort		5		- absolute code program module
-0	string		\<ar>		System V Release 1 ar archive
-0	string		=<ar>		archive
-#
-# XXX - from "vax", which appears to collect a bunch of byte-swapped
-# thingies, to help you recognize VAX files on big-endian machines;
-# with "leshort", "lelong", and "string", that's no longer necessary....
-#
-0	belong		0x65ff0000	VAX 3.0 archive
-0	belong		0x3c61723e	VAX 5.0 archive
-#
-0	long		0x213c6172	archive file
-0	lelong		0177555		very old VAX archive
-0	leshort		0177555		very old PDP-11 archive
-#
-# XXX - "pdp" claims that 0177545 can have an __.SYMDEF member and thus
-# be a random library (it said 0xff65 rather than 0177545).
-#
-0	lelong		0177545		old VAX archive
->8	string		__.SYMDEF	random library
-0	leshort		0177545		old PDP-11 archive
->8	string		__.SYMDEF	random library
-#
-# From "pdp" (but why a 4-byte quantity?)
-#
-0	lelong		0x39bed		PDP-11 old archive
-0	lelong		0x39bee		PDP-11 4.0 archive
-
-# ARC archiver, from Daniel Quinlan (quinlan at yggdrasil.com)
-#
-# The first byte is the magic (0x1a), byte 2 is the compression type for
-# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS
-# filename of the first file (null terminated).  Since some types collide
-# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%),
-# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%).  0x01 collides with terminfo.
-0	lelong&0x8080ffff	0x0000081a	ARC archive data, dynamic LZW
-0	lelong&0x8080ffff	0x0000091a	ARC archive data, squashed
-0	lelong&0x8080ffff	0x0000021a	ARC archive data, uncompressed
-0	lelong&0x8080ffff	0x0000031a	ARC archive data, packed
-0	lelong&0x8080ffff	0x0000041a	ARC archive data, squeezed
-0	lelong&0x8080ffff	0x0000061a	ARC archive data, crunched
-
-# Acorn archive formats (Disaster prone simpleton, m91dps at ecs.ox.ac.uk)
-# I can't create either SPARK or ArcFS archives so I have not tested this stuff
-# [GRR:  the original entries collide with ARC, above; replaced with combined
-#  version (not tested)]
-#0	byte		0x1a		RISC OS archive
-#>1	string		archive		(ArcFS format)
-0	string		\032archive	RISC OS archive (ArcFS format)
-
-# ARJ archiver (jason at jarthur.Claremont.EDU)
-0	leshort		0xea60		ARJ archive data
->5	byte		x		\b, v%d,
->8	byte		&0x04		multi-volume,
->8	byte		&0x10		slash-switched,
->8	byte		&0x20		backup,
->34	string		x		original name: %s,
->7	byte		0		os: MS-DOS
->7	byte		1		os: PRIMOS
->7	byte		2		os: Unix
->7	byte		3		os: Amiga
->7	byte		4		os: Macintosh
->7	byte		5		os: OS/2
->7	byte		6		os: Apple ][ GS
->7	byte		7		os: Atari ST
->7	byte		8		os: NeXT
->7	byte		9		os: VAX/VMS
->3	byte		>0		%d]
-
-# HA archiver (Greg Roelofs, newt at uchicago.edu)
-# This is a really bad format. A file containing HAWAII will match this...
-#0	string		HA		HA archive data,
-#>2	leshort		=1		1 file,
-#>2	leshort		>1		%u files,
-#>4	byte&0x0f	=0		first is type CPY
-#>4	byte&0x0f	=1		first is type ASC
-#>4	byte&0x0f	=2		first is type HSC
-#>4	byte&0x0f	=0x0e		first is type DIR
-#>4	byte&0x0f	=0x0f		first is type SPECIAL
-
-# HPACK archiver (Peter Gutmann, pgut1 at cs.aukuni.ac.nz)
-0	string		HPAK		HPACK archive data
-
-# JAM Archive volume format, by Dmitry.Kohmanyuk at UA.net
-0	string		\351,\001JAM\		JAM archive,
->7	string		>\0			version %.4s
->0x26	byte		=0x27			-
->>0x2b	string          >\0			label %.11s,
->>0x27	lelong		x			serial %08x,
->>0x36	string		>\0			fstype %.8s
-
-# LHARC/LHA archiver (Greg Roelofs, newt at uchicago.edu)
-2	string		-lh0-		LHarc 1.x archive data [lh0]
-2	string		-lh1-		LHarc 1.x archive data [lh1]
-2	string		-lz4-		LHarc 1.x archive data [lz4]
-2	string		-lz5-		LHarc 1.x archive data [lz5]
-#	[never seen any but the last; -lh4- reported in comp.compression:]
-2	string		-lzs-		LHa 2.x? archive data [lzs]
-2	string		-lh\40-		LHa 2.x? archive data [lh ]
-2	string		-lhd-		LHa 2.x? archive data [lhd]
-2	string		-lh2-		LHa 2.x? archive data [lh2]
-2	string		-lh3-		LHa 2.x? archive data [lh3]
-2	string		-lh4-		LHa (2.x) archive data [lh4]
-2	string		-lh5-		LHa (2.x) archive data [lh5]
-2	string		-lh6-		LHa (2.x) archive data [lh6]
-2	string		-lh7-		LHa (2.x) archive data [lh7]
->20	byte		x		- header level %d
-
-# RAR archiver (Greg Roelofs, newt at uchicago.edu)
-0	string		Rar!		RAR archive data
-
-# SQUISH archiver (Greg Roelofs, newt at uchicago.edu)
-0	string		SQSH		squished archive data (Acorn RISCOS)
-
-# UC2 archiver (Greg Roelofs, newt at uchicago.edu)
-# I can't figure out the self-extracting form of these buggers...
-0	string		UC2\x1a		UC2 archive data
-
-# ZIP archives (Greg Roelofs, c/o zip-bugs at wkuvx1.wku.edu)
-0	string		PK\003\004	Zip archive data
->4	byte		0x09		\b, at least v0.9 to extract
->4	byte		0x0a		\b, at least v1.0 to extract
->4	byte		0x0b		\b, at least v1.1 to extract
->4	byte		0x14		\b, at least v2.0 to extract
-
-# Zoo archiver
-20	lelong		0xfdc4a7dc	Zoo archive data
->4	byte		>48		\b, v%c.
->>6	byte		>47		\b%c
->>>7	byte		>47		\b%c
->32	byte		>0		\b, modify: v%d
->>33	byte		x		\b.%d+
->42	lelong		0xfdc4a7dc	\b,
->>70	byte		>0		extract: v%d
->>>71	byte		x		\b.%d+
-
-# Shell archives
-10	string		#\ This\ is\ a\ shell\ archive	shell archive text
-
-#
-# LBR. NB: May conflict with the questionable 
-#          "binary Computer Graphics Metafile" format.
-#
-0       string  \0\ \ \ \ \ \ \ \ \ \ \ \0\0    LBR archive data
-#
-# PMA (CP/M derivative of LHA)
-#
-2       string          -pm0-           PMarc archive data [pm0]
-2       string          -pm1-           PMarc archive data [pm1]
-2       string          -pm2-           PMarc archive data [pm2]
-2       string          -pms-           PMarc SFX archive (CP/M, DOS)
-5       string          -pc1-           PopCom compressed executable (CP/M)
-
-# From Rafael Laboissiere <rafael at laboissiere.net>
-# The Project Revision Control System (see
-# http://prcs.sourceforge.net) generates a packaged project
-# file which is recognized by the following entry: 
-0	leshort		0xeb81	PRCS packaged project
-
-# Microsoft cabinets 
-# by David Necas (Yeti) <yeti at physics.muni.cz>
-#0	string	MSCF\0\0\0\0	Microsoft cabinet file data,
-#>25	byte	x		v%d
-#>24	byte	x		\b.%d
-# MPi: All CABs have version 1.3, so this is pointless.
-# Better magic in debian-additions.
-
-# GTKtalog catalogs 
-# by David Necas (Yeti) <yeti at physics.muni.cz>
-4	string	gtktalog\ 	GTKtalog catalog data,
->13	string	3		version 3
->>14	beshort	0x677a		(gzipped)
->>14	beshort	!0x677a		(not gzipped)
->13	string	>3		version %s
-
-############################################################################
-# Parity archive reconstruction file, the 'par' file format now used on Usenet.
-0       string          PAR\0	PARity archive data
->48	leshort		=0	- Index file
->48	leshort		>0	- file number %d
-
-# Felix von Leitner <felix-file at fefe.de>
-0	string	d8:announce	BitTorrent file
-
-# Atari MSA archive - Teemu Hukkanen <tjhukkan at iki.fi>
-0       beshort 0x0e0f          Atari MSA archive data
->2      beshort x       	\b, %d sectors per track
->4      beshort 0       	\b, 1 sided
->4      beshort 1       	\b, 2 sided
->6      beshort x       	\b, starting track: %d
->8      beshort x       	\b, ending track: %d
-
-# Alternate ZIP string (amc at arwen.cs.berkeley.edu)
-0	string	PK00PK\003\004	Zip archive data
-
-# ACE archive (from http://www.wotsit.org/download.asp?f=ace)
-# by Stefan `Sec` Zehl <sec at 42.org>
-7	string		**ACE**		ACE compressed archive
->15	byte	>0		version %d
->16	byte	=0x00		\b, from MS-DOS
->16	byte	=0x01		\b, from OS/2
->16	byte	=0x02		\b, from Win/32
->16	byte	=0x03		\b, from Unix
->16	byte	=0x04		\b, from MacOS
->16	byte	=0x05		\b, from WinNT
->16	byte	=0x06		\b, from Primos
->16	byte	=0x07		\b, from AppleGS
->16	byte	=0x08		\b, from Atari
->16	byte	=0x09		\b, from Vax/VMS
->16	byte	=0x0A		\b, from Amiga
->16	byte	=0x0B		\b, from Next
->14	byte	x		\b, version %d to extract
->5	leshort &0x0080		\b, multiple volumes,
->>17	byte	x		\b (part %d),
->5	leshort &0x0002		\b, contains comment
->5	leshort	&0x0200		\b, sfx
->5	leshort	&0x0400		\b, small dictionary
->5	leshort	&0x0800		\b, multi-volume
->5	leshort	&0x1000		\b, contains AV-String
->>30	string\x16*UNREGISTERED\x20VERSION*	(unregistered)
->5	leshort &0x2000		\b, with recovery record
->5	leshort &0x4000		\b, locked
->5	leshort &0x8000		\b, solid
-# Date in MS-DOS format (whatever that is)
-#>18	lelong	x		Created on
-
-#------------------------------------------------------------------------------
-# asterix:  file(1) magic for Aster*x; SunOS 5.5.1 gave the 4-character
-# strings as "long" - we assume they're just strings:
-# From: guy at netapp.com (Guy Harris)
-#
-0	string		*STA		Aster*x
->7	string		WORD			Words Document
->7	string		GRAP			Graphic
->7	string		SPRE			Spreadsheet
->7	string		MACR			Macro
-0	string		2278		Aster*x Version 2
->29	byte		0x36			Words Document
->29	byte		0x35			Graphic
->29	byte		0x32			Spreadsheet
->29	byte		0x38			Macro
-
-
-#------------------------------------------------------------------------------
-# att3b:  file(1) magic for AT&T 3B machines
-#
-# The `versions' should be un-commented if they work for you.
-# (Was the problem just one of endianness?)
-#
-# 3B20
-#
-# The 3B20 conflicts with SCCS.
-#0	beshort		0550		3b20 COFF executable
-#>12	belong		>0		not stripped
-#>22	beshort		>0		- version %ld
-#0	beshort		0551		3b20 COFF executable (TV)
-#>12	belong		>0		not stripped
-#>22	beshort		>0		- version %ld
-#
-# WE32K
-#
-0	beshort		0560		WE32000 COFF
->18	beshort		^00000020	object
->18	beshort		&00000020	executable
->12	belong		>0		not stripped
->18	beshort		^00010000	N/A on 3b2/300 w/paging
->18	beshort		&00020000	32100 required
->18	beshort		&00040000	and MAU hardware required
->20	beshort		0407		(impure)
->20	beshort		0410		(pure)
->20	beshort		0413		(demand paged)
->20	beshort		0443		(target shared library)
->22	beshort		>0		- version %ld
-0	beshort		0561		WE32000 COFF executable (TV)
->12	belong		>0		not stripped
-#>18	beshort		&00020000	- 32100 required
-#>18	beshort		&00040000	and MAU hardware required
-#>22	beshort		>0		- version %ld
-#
-# core file for 3b2 
-0	string		\000\004\036\212\200	3b2 core file
->364	string		>\0		of '%s'
-
-#------------------------------------------------------------------------------
-# audio:  file(1) magic for sound formats (see also "iff")
-#
-# Jan Nicolai Langfeldt (janl at ifi.uio.no), Dan Quinlan (quinlan at yggdrasil.com),
-# and others
-#
-
-# Sun/NeXT audio data
-0	string		.snd		Sun/NeXT audio data:
->12	belong		1		8-bit ISDN mu-law,
->12	belong		2		8-bit linear PCM [REF-PCM],
->12	belong		3		16-bit linear PCM,
->12	belong		4		24-bit linear PCM,
->12	belong		5		32-bit linear PCM,
->12	belong		6		32-bit IEEE floating point,
->12	belong		7		64-bit IEEE floating point,
->12	belong		23		8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data encoding),
->12	belong		24		compressed (8-bit G.722 ADPCM)
->12	belong		25		compressed (3-bit G.723 ADPCM),
->12	belong		26		compressed (5-bit G.723 ADPCM),
->12	belong		27		8-bit A-law,
->20	belong		1		mono,
->20	belong		2		stereo,
->20	belong		4		quad,
->16	belong		>0		%d Hz
-
-# DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
-# that uses little-endian encoding and has a different magic number
-0	lelong		0x0064732E	DEC audio data:
->12	lelong		1		8-bit ISDN mu-law,
->12	lelong		2		8-bit linear PCM [REF-PCM],
->12	lelong		3		16-bit linear PCM,
->12	lelong		4		24-bit linear PCM,
->12	lelong		5		32-bit linear PCM,
->12	lelong		6		32-bit IEEE floating point,
->12	lelong		7		64-bit IEEE floating point,
->12	lelong		23		8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data encoding),
->20	lelong		1		mono,
->20	lelong		2		stereo,
->20	lelong		4		quad,
->16	lelong		>0		%d Hz
-
-# Creative Labs AUDIO stuff
-0	string	MThd			Standard MIDI data
->8 	beshort	x			(format %d)
->10	beshort	x			using %d track
->10	beshort		>1		\bs
->12	beshort&0x7fff	x		at 1/%d
->12	beshort&0x8000	>0		SMPTE
-
-0	string	CTMF			Creative Music (CMF) data
-0	string	SBI			SoundBlaster instrument data
-0	string	Creative\ Voice\ File	Creative Labs voice data
-# is this next line right?  it came this way...
->19	byte	0x1A
->23	byte	>0			- version %d
->22	byte	>0			\b.%d
-
-# first entry is also the string "NTRK"
-0	belong		0x4e54524b	MultiTrack sound data
->4	belong		x		- version %ld
-
-# Extended MOD format (*.emd) (Greg Roelofs, newt at uchicago.edu); NOT TESTED
-# [based on posting 940824 by "Dirk/Elastik", husberg at lehtori.cc.tut.fi]
-0	string		EMOD		Extended MOD sound data,
->4	byte&0xf0	x		version %d
->4	byte&0x0f	x		\b.%d,
->45	byte		x		%d instruments
->83	byte		0		(module)
->83	byte		1		(song)
-
-# Real Audio (Magic .ra\0375)
-0	belong		0x2e7261fd	RealAudio sound file
-0	string		.RMF\0\0\0	RealMedia file
-
-# MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert at dialin.ind.net]
-# Oct 31, 1995
-# fixed by <doj at cubic.org> 2003-06-24
-# Too short...
-#0	string		MTM		MultiTracker Module sound data
-#0	string		if		Composer 669 Module sound data
-#0	string		JN		Composer 669 Module sound data (extended format)
-0	string		MAS_U		ULT(imate) Module sound data
-
-#0	string		FAR		Module sound data
-#>4	string		>\15		Title: "%s"
-
-0x2c	string		SCRM		ScreamTracker III Module sound data
->0	string		>\0		Title: "%s"
-
-# Gravis UltraSound patches
-# From <ache at nagual.ru>
-
-0	string		GF1PATCH110\0ID#000002\0	GUS patch
-0	string		GF1PATCH100\0ID#000002\0	Old GUS	patch
-
-#
-# Taken from loader code from mikmod version 2.14
-# by Steve McIntyre (stevem at chiark.greenend.org.uk)
-# <doj at cubic.org> added title printing on 2003-06-24
-0	string	MAS_UTrack_V00
->14	string	>/0		ultratracker V1.%.1s module sound data
-
-0	string	UN05		MikMod UNI format module sound data
-
-0	string	Extended\ Module: Fasttracker II module sound data
->17	string	>\0		Title: "%s"
-
-21	string/c	!SCREAM!	Screamtracker 2 module sound data
-21	string	BMOD2STM	Screamtracker 2 module sound data
-1080	string	M.K.		4-channel Protracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	M!K!		4-channel Protracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	FLT4		4-channel Startracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	FLT8		8-channel Startracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	4CHN		4-channel Fasttracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	6CHN		6-channel Fasttracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	8CHN		8-channel Fasttracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	CD81		8-channel Octalyser module sound data
->0	string	>\0		Title: "%s"
-1080	string	OKTA		8-channel Oktalyzer module sound data
->0	string	>\0		Title: "%s"
-# Not good enough.
-#1082	string	CH
-#>1080	string	>/0		%.2s-channel Fasttracker "oktalyzer" module sound data
-1080	string	16CN		16-channel Taketracker module sound data
->0	string	>\0		Title: "%s"
-1080	string	32CN		32-channel Taketracker module sound data
->0	string	>\0		Title: "%s"
-
-# TOC sound files -Trevor Johnson <trevor at jpj.net>
-#
-0       string          TOC             TOC sound file
-
-# sidfiles <pooka at iki.fi>
-# added name,author,(c) and new RSID type by <doj at cubic.org> 2003-06-24
-0	string		SIDPLAY\ INFOFILE	Sidplay info file
-
-0	string		PSID			PlaySID v2.2+ (AMIGA) sidtune
->4	beshort		>0			w/ header v%d,
->14	beshort		=1			single song,
->14	beshort		>1			%d songs,
->16	beshort		>0			default song: %d
->0x16	string		>\0			name: "%s"
->0x36	string		>\0			author: "%s"
->0x56	string		>\0			copyright: "%s"
-
-0	string		RSID			RSID sidtune PlaySID compatible
->4	beshort		>0			w/ header v%d,
->14	beshort		=1			single song,
->14	beshort		>1			%d songs,
->16	beshort		>0			default song: %d
->0x16	string		>\0			name: "%s"
->0x36	string		>\0			author: "%s"
->0x56	string		>\0			copyright: "%s"
-
-# IRCAM <mpruett at sgi.com>
-# VAX and MIPS files are little-endian; Sun and NeXT are big-endian
-0	belong		0x64a30100		IRCAM file (VAX)
-0	belong		0x64a30200		IRCAM file (Sun)
-0	belong		0x64a30300		IRCAM file (MIPS little-endian)
-0	belong		0x64a30400		IRCAM file (NeXT)
-
-# NIST SPHERE <mpruett at sgi.com>
-0	string		NIST_1A\n\ \ \ 1024\n	NIST SPHERE file
-
-# Sample Vision <mpruett at sgi.com>
-0	string		SOUND\ SAMPLE\ DATA\ 	Sample Vision file
-
-# Audio Visual Research <tonigonenstein at users.sourceforge.net>
-0	string		2BIT			Audio Visual Research file,
->12	beshort		=0			mono,
->12	beshort		=-1			stereo,
->14	beshort		x			%d bits
->16	beshort		=0			unsigned,
->16	beshort		=-1			signed,
->22	belong&0x00ffffff	x		%d Hz,
->18	beshort		=0			no loop,
->18	beshort		=-1			loop,
->21	ubyte		<=127			note %d,
->22	byte		=0			replay 5.485 KHz
->22	byte		=1			replay 8.084 KHz
->22	byte		=2			replay 10.971 Khz
->22	byte		=3			replay 16.168 Khz
->22	byte		=4			replay 21.942 KHz
->22	byte		=5			replay 32.336 KHz
->22	byte		=6			replay 43.885 KHz
->22	byte		=7			replay 47.261 KHz
-
-# SGI SoundTrack <mpruett at sgi.com>
-0	string		_SGI_SoundTrack		SGI SoundTrack project file
-# ID3 version 2 tags <waschk at informatik.uni-rostock.de>
-0	string		ID3	MP3 file with ID3 version 2.
->3	ubyte	<0xff	\b%d.
->4	ubyte	<0xff	\b%d tag
-
-# NSF (NES sound file) magic
-0	string		NESM\x1a	NES Sound File
->14	string		>\0		("%s" by
->46	string		>\0		%s, copyright
->78	string		>\0		%s),
->5	byte		x		version %d,
->6	byte		x		%d tracks,
->122	byte&0x2	=1		dual PAL/NTSC
->122	byte&0x1	=1		PAL
->122	byte&0x1	=0		NTSC
-
-# Impuse tracker module (audio/x-it)
-0	string		IMPM		Impulse Tracker module sound data -
->4	string		>\0		"%s"
->40	leshort		!0		compatible w/ITv%x
->42	leshort		!0		created w/ITv%x
-
-# Imago Orpheus module (audio/x-imf)
-60	string		IM10		Imago Orpheus module sound data -
->0	string		>\0		"%s"
-
-# From <collver1 at attbi.com>
-# These are the /etc/magic entries to decode modules, instruments, and
-# samples in Impulse Tracker's native format.
-
-0	string		IMPS		Impulse Tracker Sample
->18	byte		&2		16 bit
->18	byte		^2		8 bit
->18	byte		&4		stereo
->18	byte		^4		mono
-0	string		IMPI		Impulse Tracker Instrument
->28	leshort		!0		ITv%x
->30	byte		!0		%d samples
-
-# Yamaha TX Wave:  file(1) magic for Yamaha TX Wave audio files
-# From <collver1 at attbi.com>
-0	string		LM8953		Yamaha TX Wave
->22	byte		0x49		looped
->22	byte		0xC9		non-looped
->23	byte		1		33kHz
->23	byte		2		50kHz
->23	byte		3		16kHz
-
-# scream tracker:  file(1) magic for Scream Tracker sample files
-#
-# From <collver1 at attbi.com>
-76	string		SCRS		Scream Tracker Sample
->0	byte		1		sample
->0	byte		2		adlib melody
->0	byte		>2		adlib drum
->31	byte		&2		stereo
->31	byte		^2		mono
->31	byte		&4		16bit little endian
->31	byte		^4		8bit
->30	byte		0		unpacked
->30	byte		1		packed
-
-# audio
-# From: Cory Dikkers <cdikkers at swbell.net>
-0	string		MMD0		MED music file, version 0
-0	string		MMD1		OctaMED Pro music file, version 1
-0	string		MMD3		OctaMED Soundstudio music file, version 3
-0	string		OctaMEDCmpr	OctaMED Soundstudio compressed file
-0	string		MED		MED_Song
-0	string		SymM		Symphonie SymMOD music file
-#
-0	string		THX		AHX version
->3	byte		=0		1 module data
->3	byte		=1		2 module data
-#
-0	string		OKTASONG	Oktalyzer module data
-#
-0	string		DIGI\ Booster\ module\0	%s
->20	byte		>0		%c
->>21	byte		>0		\b%c
->>>22	byte		>0		\b%c
->>>>23	byte		>0		\b%c
->610	string		>\0		\b, "%s"
-#
-0	string		DBM0	   	DIGI Booster Pro Module
->4	byte		>0		V%X.
->>5	byte		x		\b%02X
->16	string		>\0		\b, "%s"
-#
-0	string		FTMN		FaceTheMusic module
->16	string		>\0d		\b, "%s"
-
-# From: <doj at cubic.org> 2003-06-24
-0	string		AMShdr\32	Velvet Studio AMS Module v2.2
-0	string		Extreme		Extreme Tracker AMS Module v1.3
-0	string		DDMF		Xtracker DMF Module
->4	byte		x		v%i
->0xD	string		>\0		Title: "%s"
->0x2B	string		>\0		Composer: "%s"
-0	string		DSM\32		Dynamic Studio Module DSM
-0	string		SONG		DigiTrekker DTM Module
-0	string		DMDL		DigiTrakker MDL Module
-0	string		PSM\32		Protracker Studio PSM Module
-44	string		PTMF		Poly Tracker PTM Module
->0	string		>\32		Title: "%s"
-0	string		MT20		MadTracker 2.0 Module MT2
-0	string		RAD\40by\40REALiTY!! RAD Adlib Tracker Module RAD
-0	string		RTMM		RTM Module
-0x426	string		MaDoKaN96	XMS Adlib Module
->0	string		>\0		Composer: "%s"
-0	string		AMF		AMF Module
->4	string		>\0		Title: "%s"
-0	string		MODINFO1	Open Cubic Player Module Inforation MDZ
-0	string		Extended\40Instrument: Fast Tracker II Instrument
-
-# From: Takeshi Hamasaki <hma at syd.odn.ne.jp>
-# NOA Nancy Codec file
-0	string		\210NOA\015\012\032	NOA Nancy Codec Movie file
-# Yamaha SMAF format
-0	string		MMMD		Yamaha SMAF file
-# Sharp Jisaku Melody format for PDC
-0	string		\001Sharp\040JisakuMelody	SHARP Cell-Phone ringing Melody
->20	string		Ver01.00	Ver. 1.00
->>32	byte		x		, %d tracks
-
-# Free lossless audio codec <http://flac.sourceforge.net>
-# From: Przemyslaw Augustyniak <silvathraec at rpg.pl>
-0	string			fLaC		FLAC audio bitstream data
->4	byte&0x7f		>0		\b, unknown version
->4	byte&0x7f		0		\b
-# some common bits/sample values
->>20	beshort&0x1f0		0x030		\b, 4 bit
->>20	beshort&0x1f0		0x050		\b, 6 bit
->>20	beshort&0x1f0		0x070		\b, 8 bit
->>20	beshort&0x1f0		0x0b0		\b, 12 bit
->>20	beshort&0x1f0		0x0f0		\b, 16 bit
->>20	beshort&0x1f0		0x170		\b, 24 bit
->>20	byte&0xe		0x0		\b, mono
->>20	byte&0xe		0x2		\b, stereo
->>20	byte&0xe		0x4		\b, 3 channels
->>20	byte&0xe		0x6		\b, 4 channels
->>20	byte&0xe		0x8		\b, 5 channels
->>20	byte&0xe		0xa		\b, 6 channels
->>20	byte&0xe		0xc		\b, 7 channels
->>20	byte&0xe		0xe		\b, 8 channels
-# some common sample rates
->>17	belong&0xfffff0		0x0ac440	\b, 44.1 kHz
->>17	belong&0xfffff0		0x0bb800	\b, 48 kHz
->>17	belong&0xfffff0		0x07d000	\b, 32 kHz
->>17	belong&0xfffff0		0x056220	\b, 22.05 kHz
->>17	belong&0xfffff0		0x05dc00	\b, 24 kHz
->>17	belong&0xfffff0		0x03e800	\b, 16 kHz
->>17	belong&0xfffff0		0x02b110	\b, 11.025 kHz
->>17	belong&0xfffff0		0x02ee00	\b, 12 kHz
->>17	belong&0xfffff0		0x01f400	\b, 8 kHz
->>17	belong&0xfffff0		0x177000	\b, 96 kHz
->>17	belong&0xfffff0		0x0fa000	\b, 64 kHz
->>21	byte&0xf		>0		\b, >4G samples
->>21	byte&0xf		0		\b
->>>22	belong			>0		\b, %u samples
->>>22	belong			0		\b, length unknown
-
-# (ISDN) VBOX voice message file (Wolfram Kleff)
-0       string          VBOX            VBOX voice message data
-
-# ReBorn Song Files (.rbs)
-# David J. Singer <doc at deadvirgins.org.uk>
-8       string          RB40             RBS Song file
->29     string          ReBorn           created by ReBorn
->37     string          Propellerhead    created by ReBirth
-
-# Synthesizer Generator and Kimwitu share their file format
-0	string		A#S#C#S#S#L#V#3	    Synthesizer Generator or Kimwitu data
-# Kimwitu++ uses a slightly different magic
-0	string		A#S#C#S#S#L#HUB	    Kimwitu++ data
-
-# From "Simon Hosie
-0       string  TFMX-SONG       TFMX module sound data
-#------------------------------------------------------------------------------
-# bFLT: file(1) magic for BFLT uclinux binary files
-#
-# From Philippe De Muyter <phdm at macqel.be>
-#
-0	string		bFLT		BFLT executable
->4	belong		x		- version %ld
->4	belong		4
->>36	belong&0x1	0x1		ram
->>36	belong&0x2	0x2		gotpic
->>36	belong&0x4	0x4		gzip
->>36	belong&0x8	0x8		gzdata
-#------------------------------------------------------------------------------
-# blender: file(1) magic for Blender 3D data files
-#
-# Coded by Guillermo S. Romero <gsromero at alumnos.euitt.upm.es> using the
-# data from Ton Roosendaal <ton at blender.nl>. Ton or his company do not
-# support the rule, so mail GSR if problems with it. Rule version: 1.1.
-# You can get latest version with comments and details about the format
-# at http://acd.asoc.euitt.upm.es/~gsromero/3d/blender/magic.blender
-
-0	string	=BLENDER	Blender3D,
->7	string	=_		saved as 32-bits
->7      string	=-		saved as 64-bits
->8	string	=v		little endian
->8	string	=V		big endian
->9	byte	x		with version %c.
->10	byte	x		\b%c
->11	byte	x		\b%c
-
-#------------------------------------------------------------------------------
-# blit:  file(1) magic for 68K Blit stuff as seen from 680x0 machine
-#
-# Note that this 0407 conflicts with several other a.out formats...
-#
-# XXX - should this be redone with "be" and "le", so that it works on
-# little-endian machines as well?  If so, what's the deal with
-# "VAX-order" and "VAX-order2"?
-#
-#0	long		0407		68K Blit (standalone) executable
-#0	short		0407		VAX-order2 68K Blit (standalone) executable
-0	short		03401		VAX-order 68K Blit (standalone) executable
-0	long		0406		68k Blit mpx/mux executable
-0	short		0406		VAX-order2 68k Blit mpx/mux executable
-0	short		03001		VAX-order 68k Blit mpx/mux executable
-# Need more values for WE32 DMD executables.
-# Note that 0520 is the same as COFF
-#0	short		0520		tty630 layers executable
-#
-# i80960 b.out objects and archives
-#
-0	long		0x10d		i960 b.out relocatable object
->16	long		>0		not stripped
-#
-# b.out archive (hp-rt on i960)
-0	string		!<bout>		b.out archive
->8	string		__.SYMDEF	random library
-#------------------------------------------------------------------------------
-# bsdi:  file(1) magic for BSD/OS (from BSDI) objects
-#
-
-0	lelong		0314		386 compact demand paged pure executable
->16	lelong		>0		not stripped
->32	byte		0x6a		(uses shared libs)
-
-0	lelong		0407		386 executable
->16	lelong		>0		not stripped
->32	byte		0x6a		(uses shared libs)
-
-0	lelong		0410		386 pure executable
->16	lelong		>0		not stripped
->32	byte		0x6a		(uses shared libs)
-
-0	lelong		0413		386 demand paged pure executable
->16	lelong		>0		not stripped
->32	byte		0x6a		(uses shared libs)
-
-# same as in SunOS 4.x, except for static shared libraries
-0	belong&077777777	0600413		SPARC demand paged
->0	byte		&0x80
->>20	belong		<4096		shared library
->>20	belong		=4096		dynamically linked executable
->>20	belong		>4096		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
->36	belong		0xb4100001	(uses shared libs)
-
-0	belong&077777777	0600410		SPARC pure
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
->36	belong		0xb4100001	(uses shared libs)
-
-0	belong&077777777	0600407		SPARC
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
->36	belong		0xb4100001	(uses shared libs)
-
-#------------------------------------------------------------------------------
-# autocad:  file(1) magic for cad files
-#
-
-# AutoCAD DWG versions R13/R14 (www.autodesk.com)
-# Written December 01, 2003 by Lester Hightower
-# Based on the DWG File Format Specifications at http://www.opendwg.org/
-0	string	       \101\103\061\060\061		   AutoCAD
->5	string	       \062\000\000\000\000		   DWG ver. R13
->5	string	       \064\000\000\000\000		   DWG ver. R14
-
-# Microstation DGN/CIT Files (www.bentley.com)
-# Written October 30, 2003 by Lester Hightower
-# DGN is the default file extension of Microstation/Intergraph CAD files.
-# CIT is the proprietary raster format (similar to TIFF) used to attach
-# raster underlays to Microstation DGN (vector) drawings.
-# 
-# http://www.wotsit.org/search.asp
-# http://filext.com/detaillist.php?extdetail=DGN
-# http://filext.com/detaillist.php?extdetail=CIT
-#
-# http://www.bentley.com/products/default.cfm?objectid=97F351F5-9C35-4E5E-89C2
-# 3F86C928&method=display&p_objectid=97F351F5-9C35-4E5E-89C280A93F86C928
-# http://www.bentley.com/products/default.cfm?objectid=A5C2FD43-3AC9-4C71-B682
-# 721C479F&method=display&p_objectid=A5C2FD43-3AC9-4C71-B682C7BE721C479F
-0	string	       \010\011\376			   Microstation
->3	string	       \002
->>30	string	       \372\104				   DGN File
->>30	string	       \172\104				   DGN File
->>30	string	       \026\105				   DGN File
->4	string	       \030\000\000			   CIT File
-
-# AutoCad, from Nahuel Greco
-0	string AC1012	AutoCad (release 12)
-0	string AC1014	AutoCad (release 14)
-
-#------------------------------------------------------------------------------
-# c-lang:  file(1) magic for C programs (or REXX)
-#
-
-# XPM icons (Greg Roelofs, newt at uchicago.edu)
-# if you uncomment "/*" for C/REXX below, also uncomment this entry
-#0	string		/*\ XPM\ */	X pixmap image data
-
-# this first will upset you if you're a PL/1 shop...
-# in which case rm it; ascmagic will catch real C programs
-#0	string		/*		C or REXX program text
-#0	string		//		C++ program text
-
-# From: Mikhail Teterin <mi at aldan.algebra.com> 
-0	string		cscope		cscope reference data
->7	string		x		version %.2s
-# We skip the path here, because it is often long (so file will
-# truncate it) and mostly redundant.
-# The inverted index functionality was added some time betwen
-# versions 11 and 15, so look for -q if version is above 14:
->7	string		>14
->>10	regex		.+\ -q\		with inverted index
->10	regex		.+\ -c\		text (non-compressed)
-
-#------------------------------------------------------------------------------
-# c64:  file(1) magic for various commodore 64 related files
-#
-# From <doj at cubic.org>
-
-0x16500	belong		0x12014100	D64 Image
-0x16500	belong		0x12014180	D71 Image
-0x61800 belong		0x28034400	D81 Image
-0	string		C64\40CARTRIDGE	CCS C64 Emultar Cartridge Image
-0	belong		0x43154164	X64 Image
-
-0	string		GCR-1541	GCR Image
->8	byte		x		version: $i
->9	byte		x		tracks: %i
-
-9	string		PSUR		ARC archive (c64)
-2	string		-LH1-		LHA archive (c64)
-
-0	string		C64File		PC64 Emulator file
->8	string		>\0		"%s"
-0	string		C64Image	PC64 Freezer Image
-
-0	beshort		0x38CD		C64 PCLink Image
-0	string		CBM\144\0\0	Power 64 C64 Emulator Snapshot
-
-0	belong		0xFF424CFF	WRAptor packer (c64)
-
-#------------------------------------------------------------------------------
-# CDDB: file(1) magic for CDDB(tm) format CD text data files
-#
-# From <steve at gracenote.com>
-#
-# This is the /etc/magic entry to decode datafiles as used by
-# CDDB-enabled CD player applications.
-#
-
-0       string/b        #\040xmcd               CDDB(tm) format CD text data
-
-#------------------------------------------------------------------------------
-# chi:  file(1) magic for ChiWriter files
-#
-0       string          \\1cw\          ChiWriter file
->5      string          >\0             version %s
-0       string          \\1cw           ChiWriter file
-
-#------------------------------------------------------------------------------
-# chord: file(1) magic for Chord music sheet typesetting utility input files
-#
-# From Philippe De Muyter <phdm at macqel.be>
-# File format is actually free, but many distributed files begin with `{title'
-#
-0	string		{title		Chord text file
-
-#------------------------------------------------------------------------------
-# cisco:  file(1) magic for cisco Systems routers
-#
-# Most cisco file-formats are covered by the generic elf code
-#
-# Microcode files are non-ELF, 0x8501 conflicts with NetBSD/alpha.
-0	belong&0xffffff00	0x85011400  cisco IOS microcode
->7	string		>\0		    for '%s'
-0	belong&0xffffff00	0x8501cb00  cisco IOS experimental microcode
->7	string		>\0		    for '%s'
-#------------------------------------------------------------------------------
-# citrus locale declaration
-#
-
-0	string		RuneCT		Citrus locale declaration for LC_CTYPE
-
-
-#------------------------------------------------------------------------------
-# claris:  file(1) magic for claris
-# "H. Nanosecond" <aldomel at ix.netcom.com>
-# Claris Works a word processor, etc.
-# Version 3.0
-
-# .pct claris works clip art files
-#0000000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
-#*
-#0001000 #010 250 377 377 377 377 000 213 000 230 000 021 002 377 014 000
-#null to byte 1000 octal
-514	string	\377\377\377\377\000	Claris clip art?
->0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0	yes.
-514	string	\377\377\377\377\001	Claris clip art?
->0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0	yes.
-
-# Claris works files
-# .cwk
-0	string	\002\000\210\003\102\117\102\117\000\001\206 Claris works document
-# .plt
-0	string	\020\341\000\000\010\010	Claris Works pallete files .plt
-
-# .msp a dictionary file I am not sure about this I have only one .msp file
-0	string	\002\271\262\000\040\002\000\164	Claris works dictionary
-
-# .usp are user dictionary bits
-# I am not sure about a magic header:
-#0000000 001 123 160 146 070 125 104 040 136 123 015 012 160 157 144 151
-#        soh   S   p   f   8   U   D  sp   ^   S  cr  nl   p   o   d   i
-#0000020 141 164 162 151 163 164 040 136 123 015 012 144 151 166 040 043
-#          a   t   r   i   s   t  sp   ^   S  cr  nl   d   i   v  sp   #
-
-# .mth Thesaurus
-# statrts with \0 but no magic header
-
-# .chy Hyphenation file
-# I am not sure: 000 210 034 000 000
-
-# other claris files
-#./windows/claris/useng.ndx: data
-#./windows/claris/xtndtran.l32: data
-#./windows/claris/xtndtran.lst: data
-#./windows/claris/clworks.lbl: data
-#./windows/claris/clworks.prf: data
-#./windows/claris/userd.spl: data
-
-#------------------------------------------------------------------------------
-# clipper:  file(1) magic for Intergraph (formerly Fairchild) Clipper.
-#
-# XXX - what byte order does the Clipper use?
-#
-# XXX - what's the "!" stuff:
-#
-# >18	short		!074000,000000	C1 R1 
-# >18	short		!074000,004000	C2 R1
-# >18	short		!074000,010000	C3 R1
-# >18	short		!074000,074000	TEST
-#
-# I shall assume it's ANDing the field with the first value and
-# comparing it with the second, and rewrite it as:
-#
-# >18	short&074000	000000		C1 R1 
-# >18	short&074000	004000		C2 R1
-# >18	short&074000	010000		C3 R1
-# >18	short&074000	074000		TEST
-#
-# as SVR3.1's "file" doesn't support anything of the "!074000,000000"
-# sort, nor does SunOS 4.x, so either it's something Intergraph added
-# in CLIX, or something AT&T added in SVR3.2 or later, or something
-# somebody else thought was a good idea; it's not documented in the
-# man page for this version of "magic", nor does it appear to be
-# implemented (at least not after I blew off the bogus code to turn
-# old-style "&"s into new-style "&"s, which just didn't work at all).
-#
-0	short		0575		CLIPPER COFF executable (VAX #)
->20	short		0407		(impure)
->20	short		0410		(5.2 compatible)
->20	short		0411		(pure)
->20	short		0413		(demand paged)
->20	short		0443		(target shared library)
->12	long		>0		not stripped
->22	short		>0		- version %ld
-0	short		0577		CLIPPER COFF executable
->18	short&074000	000000		C1 R1 
->18	short&074000	004000		C2 R1
->18	short&074000	010000		C3 R1
->18	short&074000	074000		TEST
->20	short		0407		(impure)
->20	short		0410		(pure)
->20	short		0411		(separate I&D)
->20	short		0413		(paged)
->20	short		0443		(target shared library)
->12	long		>0		not stripped
->22	short		>0		- version %ld
->48	long&01		01		alignment trap enabled
->52	byte		1		-Ctnc
->52	byte		2		-Ctsw
->52	byte		3		-Ctpw
->52	byte		4		-Ctcb
->53	byte		1		-Cdnc
->53	byte		2		-Cdsw
->53	byte		3		-Cdpw
->53	byte		4		-Cdcb
->54	byte		1		-Csnc
->54	byte		2		-Cssw
->54	byte		3		-Cspw
->54	byte		4		-Cscb
-4	string		pipe		CLIPPER instruction trace
-4	string		prof		CLIPPER instruction profile
-
-#------------------------------------------------------------------------------
-# commands:  file(1) magic for various shells and interpreters
-#
-0	string		:			shell archive or script for antique kernel text
-0	string/b	#!\ /bin/sh		Bourne shell script text
-0	string/b	#!\ /bin/csh		C shell script text
-# korn shell magic, sent by George Wu, gwu at clyde.att.com
-0	string/b	#!\ /bin/ksh		Korn shell script text
-0	string/b 	#!\ /bin/tcsh		Tenex C shell script text
-0	string/b 	#!\ /usr/bin/tcsh	Tenex C shell script text
-0	string/b 	#!\ /usr/local/tcsh	Tenex C shell script text
-0	string/b	#!\ /usr/local/bin/tcsh	Tenex C shell script text
-
-#
-# zsh/ash/ae/nawk/gawk magic from cameron at cs.unsw.oz.au (Cameron Simpson)
-0	string/b	#!\ /bin/zsh		Paul Falstad's zsh script text
-0	string/b	#!\ /usr/bin/zsh	Paul Falstad's zsh script text
-0	string/b	#!\ /usr/local/bin/zsh	Paul Falstad's zsh script text
-0	string/b	#!\ /usr/local/bin/ash	Neil Brown's ash script text
-0	string/b	#!\ /usr/local/bin/ae	Neil Brown's ae script text
-0	string/b	#!\ /bin/nawk		new awk script text
-0	string/b	#!\ /usr/bin/nawk	new awk script text
-0	string/b	#!\ /usr/local/bin/nawk	new awk script text
-0	string/b	#!\ /bin/gawk		GNU awk script text
-0	string/b	#!\ /usr/bin/gawk	GNU awk script text
-0	string/b	#!\ /usr/local/bin/gawk	GNU awk script text
-#
-0	string/b	#!\ /bin/awk		awk script text
-0	string/b	#!\ /usr/bin/awk	awk script text
-0	string		BEGIN			awk script text
-
-# AT&T Bell Labs' Plan 9 shell
-0	string/b	#!\ /bin/rc	Plan 9 rc shell script text
-
-# bash shell magic, from Peter Tobias (tobias at server.et-inf.fho-emden.de)
-0	string/b	#!\ /bin/bash		Bourne-Again shell script text
-0	string/b	#!\ /usr/bin/bash	Bourne-Again shell script text
-0	string/b	#!\ /usr/local/bash	Bourne-Again shell script text
-0	string/b	#!\ /usr/local/bin/bash	Bourne-Again shell script text
-
-# using env
-0	string		#!/usr/bin/env		a
->15	string		>\0			%s script text
-0	string		#!\ /usr/bin/env	a
->16	string		>\0			%s script text
-
-# PHP scripts
-# Ulf Harnhammar <ulfh at update.uu.se>
-0	string/c	=<?php			PHP script text
-0	string		=<?\n			PHP script text
-0	string		=<?\r			PHP script text
-0	string/b	#!\ /usr/local/bin/php	PHP script text
-0	string/b	#!\ /usr/bin/php	PHP script text
-
-0	string		Zend\x00		PHP script Zend Optimizer data
-
-#----------------------------------------------------------------------------
-# communcation
-
-# TTCN is the Tree and Tabular Combined Notation described in ISO 9646-3.
-# It is used for conformance testing of communication protocols.
-# Added by W. Borgert <debacle at debian.org>.
-0	string		$Suite			TTCN Abstract Test Suite
->&1	string		$SuiteId
->>&1	string		>\n			%s
->&2	string		$SuiteId
->>&1	string		>\n			%s
->&3	string		$SuiteId
->>&1	string		>\n			%s
-
-# MSC (message sequence charts) are a formal description technique,
-# described in ITU-T Z.120, mainly used for communication protocols.
-# Added by W. Borgert <debacle at debian.org>.
-0	string		mscdocument	Message Sequence Chart (document)
-0	string		msc		Message Sequence Chart (chart)
-0	string		submsc		Message Sequence Chart (subchart)
-
-#------------------------------------------------------------------------------
-# compress:  file(1) magic for pure-compression formats (no archives)
-#
-# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
-#
-# Formats for various forms of compressed data
-# Formats for "compress" proper have been moved into "compress.c",
-# because it tries to uncompress it to figure out what's inside.
-
-# standard unix compress
-0	string		\037\235	compress'd data
->2	byte&0x80	>0		block compressed
->2	byte&0x1f	x		%d bits
-
-# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver)
-#   Edited by Chris Chittleborough <cchittleborough at yahoo.com.au>, March 2002
-#	* Original filename is only at offset 10 if "extra field" absent
-#	* Produce shorter output - notably, only report compression methods
-#	  other than 8 ("deflate", the only method defined in RFC 1952).
-0       string          \037\213        gzip compressed data
->2	byte		<8		\b, reserved method
->2	byte		>8		\b, unknown method
->3	byte		&0x01		\b, ASCII
->3	byte		&0x02		\b, continuation
->3	byte		&0x04		\b, extra field
->3	byte&0xC	=0x08
->>10	string		x		\b, was "%s"
->9	byte		=0x00		\b, from MS-DOS
->9	byte		=0x01		\b, from Amiga
->9	byte		=0x02		\b, from VMS
->9	byte		=0x03		\b, from Unix
->9	byte		=0x05		\b, from Atari
->9	byte		=0x06		\b, from OS/2
->9	byte		=0x07		\b, from MacOS
->9	byte		=0x0A		\b, from Tops/20
->9	byte		=0x0B		\b, from Win/32
->3	byte		&0x10		\b, comment
->3	byte		&0x20		\b, encrypted
-### >4	ledate		x		last modified: %s,
->8	byte		2		\b, max compression
->8	byte		4		\b, max speed
-
-# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis
-0	string		\037\036	packed data
->2	belong		>1		\b, %d characters originally
->2	belong		=1		\b, %d character originally
-#
-# This magic number is byte-order-independent.
-0	short		0x1f1f		old packed data
-
-# XXX - why *two* entries for "compacted data", one of which is
-# byte-order independent, and one of which is byte-order dependent?
-#
-0	short		0x1fff		compacted data
-# This string is valid for SunOS (BE) and a matching "short" is listed
-# in the Ultrix (LE) magic file.
-0	string		\377\037	compacted data
-0	short		0145405		huf output
-
-# bzip2
-0	string		BZh		bzip2 compressed data
->3	byte		>47		\b, block size = %c00k
-
-# squeeze and crunch
-# Michael Haardt <michael at cantor.informatik.rwth-aachen.de>
-0	beshort		0x76FF		squeezed data,
->4	string		x		original name %s
-0	beshort		0x76FE		crunched data,
->2	string		x		original name %s
-0	beshort		0x76FD		LZH compressed data,
->2	string		x		original name %s
-
-# Freeze
-0	string		\037\237	frozen file 2.1
-0	string		\037\236	frozen file 1.0 (or gzip 0.5)
-
-# SCO compress -H (LZH)
-0	string		\037\240	SCO compress -H (LZH) data
-
-# European GSM 06.10 is a provisional standard for full-rate speech
-# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse
-# excitation/long term prediction) coding at 13 kbit/s.
-#
-# There's only a magic nibble (4 bits); that nibble repeats every 33
-# bytes.  This isn't suited for use, but maybe we can use it someday.
-#
-# This will cause very short GSM files to be declared as data and
-# mismatches to be declared as data too!
-#0	byte&0xF0	0xd0		data
-#>33	byte&0xF0	0xd0
-#>66	byte&0xF0	0xd0
-#>99	byte&0xF0	0xd0
-#>132	byte&0xF0	0xd0		GSM 06.10 compressed audio
-
-# bzip	a block-sorting file compressor
-#	by Julian Seward <sewardj at cs.man.ac.uk> and others
-#
-0	string		BZ		bzip compressed data
->2	byte		x		\b, version: %c
->3	string		=1		\b, compression block size 100k
->3	string		=2		\b, compression block size 200k
->3	string		=3		\b, compression block size 300k
->3	string		=4		\b, compression block size 400k
->3	string		=5		\b, compression block size 500k
->3	string		=6		\b, compression block size 600k
->3	string		=7		\b, compression block size 700k
->3	string		=8		\b, compression block size 800k
->3	string		=9		\b, compression block size 900k
-
-# lzop from <markus.oberhumer at jk.uni-linz.ac.at>
-0	string		\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a	lzop compressed data
->9	beshort		<0x0940
->>9	byte&0xf0	=0x00		- version 0.
->>9	beshort&0x0fff	x		\b%03x,
->>13	byte		1		LZO1X-1,
->>13	byte		2		LZO1X-1(15),
->>13	byte		3		LZO1X-999,
-## >>22	bedate		>0		last modified: %s,
->>14	byte		=0x00		os: MS-DOS
->>14	byte		=0x01		os: Amiga
->>14	byte		=0x02		os: VMS
->>14	byte		=0x03		os: Unix
->>14	byte		=0x05		os: Atari
->>14	byte		=0x06		os: OS/2
->>14	byte		=0x07		os: MacOS
->>14	byte		=0x0A		os: Tops/20
->>14	byte		=0x0B		os: WinNT
->>14	byte		=0x0E		os: Win32
->9	beshort		>0x0939
->>9	byte&0xf0	=0x00		- version 0.
->>9	byte&0xf0	=0x10		- version 1.
->>9	byte&0xf0	=0x20		- version 2.
->>9	beshort&0x0fff	x		\b%03x,
->>15	byte		1		LZO1X-1,
->>15	byte		2		LZO1X-1(15),
->>15	byte		3		LZO1X-999,
-## >>25	bedate		>0		last modified: %s,
->>17	byte		=0x00		os: MS-DOS
->>17	byte		=0x01		os: Amiga
->>17	byte		=0x02		os: VMS
->>17	byte		=0x03		os: Unix
->>17	byte		=0x05		os: Atari
->>17	byte		=0x06		os: OS/2
->>17	byte		=0x07		os: MacOS
->>17	byte		=0x0A		os: Tops/20
->>17	byte		=0x0B		os: WinNT
->>17	byte		=0x0E		os: Win32
-
-# 4.3BSD-Quasijarus Strong Compression
-# http://minnie.tuhs.org/Quasijarus/compress.html
-0	string		\037\241	Quasijarus strong compressed data
-
-# From: Cory Dikkers <cdikkers at swbell.net>
-0	string		XPKF		Amiga xpkf.library compressed data
-0	string		PP11		Power Packer 1.1 compressed data
-0	string		PP20		Power Packer 2.0 compressed data,
->4	belong		0x09090909	fast compression
->4	belong		0x090A0A0A	mediocre compression
->4	belong		0x090A0B0B	good compression
->4	belong		0x090A0C0C	very good compression
->4	belong		0x090A0C0D	best compression
-
-# 7z archiver, from Thomas Klausner (wiz at danbala.tuwien.ac.at)
-# http://www.7-zip.org or DOC/7zFormat.txt 
-#
-0	string		7z\274\257\047\034	7z archive data,
->6	byte		x			version %d
->7	byte		x			\b.%d
-
-# AFX compressed files (Wolfram Kleff)
-2	string		-afx-		AFX compressed file data
-#------------------------------------------------------------------------------
-# Console game magic
-# Toby Deshane <hac at shoelace.digivill.net>
-#    ines:  file(1) magic for Marat's iNES Nintendo Entertainment System
-#           ROM dump format
-
-0 string NES\032 iNES ROM dump,
->4 byte  x     %dx16k PRG
->5 byte  x     \b, %dx8k CHR
->6 byte&0x01  =0x1  \b, [Vert.]
->6 byte&0x01  =0x0  \b, [Horiz.]
->6 byte&0x02  =0x2  \b, [SRAM]
->6 byte&0x04  =0x4  \b, [Trainer]
->6 byte&0x04  =0x8  \b, [4-Scr]
-
-#------------------------------------------------------------------------------
-# gameboy:  file(1) magic for the Nintendo (Color) Gameboy raw ROM format
-#
-0x104 belong 0xCEED6666 Gameboy ROM:
->0x134 string >\0 "%.16s"
->0x146 byte 0x03  \b,[SGB]
->0x147 byte 0x00  \b, [ROM ONLY]
->0x147 byte 0x01  \b, [ROM+MBC1]
->0x147 byte 0x02  \b, [ROM+MBC1+RAM]
->0x147 byte 0x03  \b, [ROM+MBC1+RAM+BATT]
->0x147 byte 0x05  \b, [ROM+MBC2]
->0x147 byte 0x06  \b, [ROM+MBC2+BATTERY]
->0x147 byte 0x08  \b, [ROM+RAM]
->0x147 byte 0x09  \b, [ROM+RAM+BATTERY]
->0x147 byte 0x0B  \b, [ROM+MMM01]
->0x147 byte 0x0C  \b, [ROM+MMM01+SRAM]
->0x147 byte 0x0D  \b, [ROM+MMM01+SRAM+BATT]
->0x147 byte 0x0F  \b, [ROM+MBC3+TIMER+BATT]
->0x147 byte 0x10  \b, [ROM+MBC3+TIMER+RAM+BATT]
->0x147 byte 0x11  \b, [ROM+MBC3]
->0x147 byte 0x12  \b, [ROM+MBC3+RAM]
->0x147 byte 0x13  \b, [ROM+MBC3+RAM+BATT]
->0x147 byte 0x19  \b, [ROM+MBC5]
->0x147 byte 0x1A  \b, [ROM+MBC5+RAM]
->0x147 byte 0x1B  \b, [ROM+MBC5+RAM+BATT]
->0x147 byte 0x1C  \b, [ROM+MBC5+RUMBLE]
->0x147 byte 0x1D  \b, [ROM+MBC5+RUMBLE+SRAM]
->0x147 byte 0x1E  \b, [ROM+MBC5+RUMBLE+SRAM+BATT]
->0x147 byte 0x1F  \b, [Pocket Camera]
->0x147 byte 0xFD  \b, [Bandai TAMA5]
->0x147 byte 0xFE  \b, [Hudson HuC-3]
->0x147 byte 0xFF  \b, [Hudson HuC-1]
-
->0x148 byte 0     \b, ROM: 256Kbit
->0x148 byte 1     \b, ROM: 512Kbit
->0x148 byte 2     \b, ROM: 1Mbit
->0x148 byte 3     \b, ROM: 2Mbit
->0x148 byte 4     \b, ROM: 4Mbit
->0x148 byte 5     \b, ROM: 8Mbit
->0x148 byte 6     \b, ROM: 16Mbit
->0x148 byte 0x52  \b, ROM: 9Mbit
->0x148 byte 0x53  \b, ROM: 10Mbit
->0x148 byte 0x54  \b, ROM: 12Mbit
-
->0x149 byte 1     \b, RAM: 16Kbit
->0x149 byte 2     \b, RAM: 64Kbit
->0x149 byte 3     \b, RAM: 128Kbit
->0x149 byte 4     \b, RAM: 1Mbit
-
-#>0x14e long  x     \b, CRC: %x
-
-#------------------------------------------------------------------------------
-# genesis:  file(1) magic for the Sega MegaDrive/Genesis raw ROM format
-#
-0x100 string SEGA  Sega MegaDrive/Genesis raw ROM dump
->0x120 string >\0 Name: "%.16s"
->0x110 string >\0 %.16s
->0x1B0 string RA with SRAM
-
-#------------------------------------------------------------------------------
-# genesis:  file(1) magic for the Super MegaDrive ROM dump format
-#
-0x280 string EAGN  Super MagicDrive ROM dump
->0 byte x %dx16k blocks
->2 byte 0 \b, last in series or standalone
->2 byte >0 \b, split ROM
->8 byte 0xAA
->9 byte 0xBB
-
-#------------------------------------------------------------------------------
-# genesis:  file(1) alternate magic for the Super MegaDrive ROM dump format
-#
-0x280 string EAMG  Super MagicDrive ROM dump
->0 byte x %dx16k blocks
->2 byte x \b, last in series or standalone
->8 byte 0xAA
->9 byte 0xBB
-
-#------------------------------------------------------------------------------
-# smsgg:  file(1) magic for Sega Master System and Game Gear ROM dumps
-#
-# Does not detect all images.  Very preliminary guesswork.  Need more data
-# on format.
-#
-# FIXME: need a little more info...;P
-#
-#0 byte 0xF3
-#>1 byte 0xED  Sega Master System/Game Gear ROM dump
-#>1 byte 0x31  Sega Master System/Game Gear ROM dump
-#>1 byte 0xDB  Sega Master System/Game Gear ROM dump
-#>1 byte 0xAF  Sega Master System/Game Gear ROM dump
-#>1 byte 0xC3  Sega Master System/Game Gear ROM dump
-
-#------------------------------------------------------------------------------
-# dreamcast:  file(1) uncertain magic for the Sega Dreamcast VMU image format
-#
-0 belong 0x21068028   Sega Dreamcast VMU game image
-0 string LCDi         Dream Animator file
-
-#------------------------------------------------------------------------------
-# v64: file(1) uncertain magic for the V64 format N64 ROM dumps
-#
-0 belong 0x37804012    V64 Nintendo 64 ROM dump
-
-#------------------------------------------------------------------------------
-# msx: file(1) magic for MSX game cartridge dumps
-# Too simple - MPi
-#0 beshort 0x4142 MSX game cartridge dump 
-
-#------------------------------------------------------------------------------
-# Sony Playstation executables (Adam Sjoegren <asjo at diku.dk>) :
-0	string	PS-X\ EXE	Sony Playstation executable
-#  Area:
->113	string	x		(%s)
-
-#------------------------------------------------------------------------------
-# Microsoft Xbox executables .xbe (Esa Hyytiä <ehyytia at cc.hut.fi>)
-0       string          XBEH            XBE, Microsoft Xbox executable
-# probabilistic checks whether signed or not
->0x0004 ulelong =0x0
->>&2    ulelong =0x0
->>>&2   ulelong =0x0  \b, not signed
->0x0004 ulelong >0
->>&2    ulelong >0
->>>&2   ulelong >0    \b, signed
-# expect base address of 0x10000
->0x0104               ulelong =0x10000
->>(0x0118-0x0FF60)    ulelong&0x80000007  0x80000007 \b, all regions
->>(0x0118-0x0FF60)    ulelong&0x80000007  !0x80000007
->>>(0x0118-0x0FF60)   ulelong >0           (regions:
->>>>(0x0118-0x0FF60)  ulelong &0x00000001  NA
->>>>(0x0118-0x0FF60)  ulelong &0x00000002  Japan
->>>>(0x0118-0x0FF60)  ulelong &0x00000004  Rest_of_World
->>>>(0x0118-0x0FF60)  ulelong &0x80000000  Manufacturer
->>>(0x0118-0x0FF60)   ulelong >0           \b)
-
-# --------------------------------
-# Microsoft Xbox data file formats
-0       string          XIP0            XIP, Microsoft Xbox data
-0       string          XTF0            XTF, Microsoft Xbox data
-#------------------------------------------------------------------------------
-# convex:  file(1) magic for Convex boxes
-#
-# Convexes are big-endian.
-#
-# /*\
-#  * Below are the magic numbers and tests added for Convex.
-#  * Added at beginning, because they are expected to be used most.
-# \*/
-0	belong	0507	Convex old-style object
->16	belong	>0	not stripped
-0	belong	0513	Convex old-style demand paged executable
->16	belong	>0	not stripped
-0	belong	0515	Convex old-style pre-paged executable
->16	belong	>0	not stripped
-0	belong	0517	Convex old-style pre-paged, non-swapped executable
->16	belong	>0	not stripped
-0	belong	0x011257	Core file
-#
-# The following are a series of dump format magic numbers.  Each one
-# corresponds to a drastically different dump format.  The first on is
-# the original dump format on a 4.1 BSD or earlier file system.  The
-# second marks the change between the 4.1 file system and the 4.2 file
-# system.  The Third marks the changing of the block size from 1K
-# to 2K to be compatible with an IDC file system.  The fourth indicates
-# a dump that is dependent on Convex Storage Manager, because data in
-# secondary storage is not physically contained within the dump.
-# The restore program uses these number to determine how the data is
-# to be extracted.
-#
-24	belong	=60011	dump format, 4.1 BSD or earlier
-24	belong	=60012	dump format, 4.2 or 4.3 BSD without IDC
-24	belong	=60013	dump format, 4.2 or 4.3 BSD (IDC compatible)
-24	belong	=60014	dump format, Convex Storage Manager by-reference dump
-#
-# what follows is a bunch of bit-mask checks on the flags field of the opthdr.
-# If there is no `=' sign, assume just checking for whether the bit is set?
-#
-0	belong	0601		Convex SOFF
->88	belong&0x000f0000	=0x00000000	c1
->88	belong			&0x00010000	c2
->88	belong			&0x00020000	c2mp
->88	belong			&0x00040000	parallel
->88	belong			&0x00080000	intrinsic
->88	belong			&0x00000001	demand paged
->88	belong			&0x00000002	pre-paged
->88	belong			&0x00000004	non-swapped
->88	belong			&0x00000008	POSIX
-#
->84	belong			&0x80000000	executable
->84	belong			&0x40000000	object
->84	belong&0x20000000	=0		not stripped
->84	belong&0x18000000	=0x00000000	native fpmode
->84	belong&0x18000000	=0x10000000	ieee fpmode
->84	belong&0x18000000	=0x18000000	undefined fpmode
-#
-0	belong			0605		Convex SOFF core
-#
-0	belong			0607		Convex SOFF checkpoint
->88	belong&0x000f0000	=0x00000000	c1
->88	belong			&0x00010000	c2
->88	belong			&0x00020000	c2mp
->88	belong			&0x00040000	parallel
->88	belong			&0x00080000	intrinsic
->88	belong			&0x00000008	POSIX
-#
->84	belong&0x18000000	=0x00000000	native fpmode
->84	belong&0x18000000	=0x10000000	ieee fpmode
->84	belong&0x18000000	=0x18000000	undefined fpmode
-
-# ----------------------------------------------------------------------------
-# ctags:  file (1) magic for Exuberant Ctags files
-# From: Alexander Mai <mai at migdal.ikp.physik.tu-darmstadt.de>
-0       string  !_TAG   Exuberant Ctags tag file text
-
-#------------------------------------------------------------------------------
-# dact:  file(1) magic for DACT compressed files
-#
-0	long		0x444354C3	DACT compressed data
->4	byte		>-1		(version %i.
->5	byte		>-1		$BS%i.
->6	byte		>-1		$BS%i)
->7	long		>0		$BS, original size: %i bytes
->15	long		>30		$BS, block size: %i bytes
-
-#------------------------------------------------------------------------------
-# database:  file(1) magic for various databases
-#
-# extracted from header/code files by Graeme Wilford (eep2gw at ee.surrey.ac.uk)
-#
-#
-# GDBM magic numbers
-#  Will be maintained as part of the GDBM distribution in the future.
-#  <downsj at teeny.org>
-0	belong	0x13579ace	GNU dbm 1.x or ndbm database, big endian
-0	lelong	0x13579ace	GNU dbm 1.x or ndbm database, little endian
-0	string	GDBM		GNU dbm 2.x database
-#
-# Berkeley DB
-#
-# Ian Darwin's file /etc/magic files: big/little-endian version.
-#
-# Hash 1.85/1.86 databases store metadata in network byte order.
-# Btree 1.85/1.86 databases store the metadata in host byte order.
-# Hash and Btree 2.X and later databases store the metadata in host byte order.
-
-0	long	0x00061561	Berkeley DB
->8	belong	4321
->>4	belong	>2		1.86
->>4	belong	<3		1.85
->>4	belong	>0		(Hash, version %d, native byte-order)
->8	belong	1234
->>4	belong	>2		1.86
->>4	belong	<3		1.85
->>4	belong	>0		(Hash, version %d, little-endian)
-
-0	belong	0x00061561	Berkeley DB
->8	belong	4321
->>4	belong	>2		1.86
->>4	belong	<3		1.85
->>4	belong	>0		(Hash, version %d, big-endian)
->8	belong	1234
->>4	belong	>2		1.86
->>4	belong	<3		1.85
->>4	belong	>0		(Hash, version %d, native byte-order)
-
-0	long	0x00053162	Berkeley DB 1.85/1.86
->4	long	>0		(Btree, version %d, native byte-order)
-0	belong	0x00053162	Berkeley DB 1.85/1.86
->4	belong	>0		(Btree, version %d, big-endian)
-0	lelong	0x00053162	Berkeley DB 1.85/1.86
->4	lelong	>0		(Btree, version %d, little-endian)
-
-12	long	0x00061561	Berkeley DB
->16	long	>0		(Hash, version %d, native byte-order)
-12	belong	0x00061561	Berkeley DB
->16	belong	>0		(Hash, version %d, big-endian)
-12	lelong	0x00061561	Berkeley DB
->16	lelong	>0		(Hash, version %d, little-endian)
-
-12	long	0x00053162	Berkeley DB
->16	long	>0		(Btree, version %d, native byte-order)
-12	belong	0x00053162	Berkeley DB
->16	belong	>0		(Btree, version %d, big-endian)
-12	lelong	0x00053162	Berkeley DB
->16	lelong	>0		(Btree, version %d, little-endian)
-
-12	long	0x00042253	Berkeley DB
->16	long	>0		(Queue, version %d, native byte-order)
-12	belong	0x00042253	Berkeley DB
->16	belong	>0		(Queue, version %d, big-endian)
-12	lelong	0x00042253	Berkeley DB
->16	lelong	>0		(Queue, version %d, little-endian)
-#
-#
-# Round Robin Database Tool by Tobias Oetiker <oetiker at ee.ethz.ch>
-0	string	RRD		RRDTool DB
->4	string	x		version %s
-#----------------------------------------------------------------------
-# ROOT: file(1) magic for ROOT databases
-#
-0       string  root\0  ROOT file
->4      belong  x       Version %d
->33     belong  x       (Compression: %d)
-
-# XXX: Weak magic.
-# Alex Ott <ott at jet.msk.su>
-## Paradox file formats
-#2	  leshort	0x0800	Paradox 
-#>0x39	  byte		3	v. 3.0 
-#>0x39	  byte		4	v. 3.5 
-#>0x39	  byte		9	v. 4.x 
-#>0x39	  byte		10	v. 5.x 
-#>0x39	  byte		11	v. 5.x 
-#>0x39	  byte		12	v. 7.x 
-#>>0x04	  byte		0	indexed .DB data file 
-#>>0x04	  byte		1	primary index .PX file 
-#>>0x04	  byte		2	non-indexed .DB data file 
-#>>0x04	  byte		3	non-incrementing secondary index .Xnn file 
-#>>0x04	  byte		4	secondary index .Ynn file 
-#>>0x04	  byte		5	incrementing secondary index .Xnn file 
-#>>0x04	  byte		6	non-incrementing secondary index .XGn file 
-#>>0x04	  byte		7	secondary index .YGn file 
-#>>>0x04	  byte		8	incrementing secondary index .XGn file 
-## XBase database files
-#0      byte       0x02	
-#>8     leshort	  >0
-#>>12   leshort    0	FoxBase 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x03	
-#>8     leshort	  >0
-#>>12   leshort    0	FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x04	
-#>8     leshort	  >0
-#>>12   leshort    0	dBASE IV no memo file 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x05	
-#>8     leshort	  >0
-#>>12   leshort    0	dBASE V no memo file 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x30
-#>8     leshort	  >0
-#>>12   leshort    0	Visual FoxPro 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x43
-#>8     leshort	  >0
-#>>12   leshort    0	FlagShip with memo var size 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x7b
-#>8     leshort	  >0
-#>>12   leshort    0	dBASEIV with memo 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x83	
-#>8     leshort	  >0
-#>>12   leshort    0	FoxBase+, dBaseIII+ with memo 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x8b
-#>8     leshort	  >0
-#>>12   leshort    0	dBaseIV with memo 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0x8e	
-#>8     leshort	  >0
-#>>12   leshort    0	dBaseIV with SQL Table 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0xb3
-#>8     leshort	  >0
-#>>12   leshort    0	FlagShip with .dbt memo 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0      byte       0xf5
-#>8     leshort	  >0
-#>>12   leshort    0	FoxPro with memo 
-#>>>0x04	lelong		0		(no records)
-#>>>0x04	lelong		>0		(%ld records)
-#
-#0	leshort		0x0006		DBase 3 index file
-
-# MS Access database
-4	  string	Standard\ Jet\ DB	Microsoft Access Database
-
-# TDB database from Samba et al - Martin Pool <mbp at samba.org>
-0	string	TDB\ file		TDB database
->32	lelong	0x2601196D		version 6, little-endian
->>36	lelong	x			hash size %d bytes
-
-# SE Linux policy database
-0       lelong  0xf97cff8c      SE Linux policy
->16     lelong  x               v%d
->20     lelong  1      MLS
->24     lelong  x       %d symbols
->28     lelong  x       %d ocons
-
-# ICE authority file data (Wolfram Kleff)
-2	string		ICE		ICE authority data
-
-# X11 Xauthority file (Wolfram Kleff)
-10	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-11	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-12	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-13	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-14	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-15	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-16	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-17	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-18	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
-
-#------------------------------------------------------------------------------
-# diamond:  file(1) magic for Diamond system
-#
-# ... diamond is a multi-media mail and electronic conferencing system....
-#
-# XXX - I think it was either renamed Slate, or replaced by Slate....
-#
-#	The full deal is too long...
-#0	string	<list>\n<protocol\ bbn-multimedia-format>	Diamond Multimedia Document
-0	string	=<list>\n<protocol\ bbn-m	Diamond Multimedia Document
-
-#------------------------------------------------------------------------------
-# diff:  file(1) magic for diff(1) output
-#
-0	string		diff\ 	'diff' output text
-0	string		***\ 		'diff' output text
-0	string		Only\ in\ 	'diff' output text
-0	string		Common\ subdirectories:\ 	'diff' output text
-
-# xdelta is like diff(1) for binary files (works for text, too).
-# Available from: ftp://ftp.xcf.berkeley.edu/pub/xdelta/
-0       string          %XDZ            xdelta diff file
->4      string          >%              version %.3s
-#  Digital UNIX - Info
-#
-0	string	!<arch>\n________64E	Alpha archive
->22	string	X			-- out of date
-#
-# Alpha COFF Based Executables
-# The stripped stuff really needs to be an 8 byte (64 bit) compare,
-# but this works
-0	leshort		0x183		COFF format alpha
->22	leshort&020000	&010000		sharable library,
->22	leshort&020000	^010000		dynamically linked,
->24	leshort		0410		pure
->24	leshort		0413		demand paged
->8	lelong		>0		executable or object module, not stripped
->8	lelong		0
->>12	lelong		0		executable or object module, stripped
->>12	lelong		>0		executable or object module, not stripped
->27     byte            >0              - version %d.
->26     byte            >0              %d-
->28     leshort         >0              %d
-#
-# The next is incomplete, we could tell more about this format,
-# but its not worth it.
-0	leshort		0x188	Alpha compressed COFF
-0	leshort		0x18f	Alpha u-code object
-#
-#
-# Some other interesting Digital formats,
-0	string	\377\377\177		ddis/ddif
-0	string	\377\377\174		ddis/dots archive
-0	string	\377\377\176		ddis/dtif table data
-0	string	\033c\033		LN03 output
-0	long	04553207		X image
-#
-0	string	!<PDF>!\n		profiling data file
-#
-# Locale data tables (MIPS and Alpha).
-#
-0	short		0x0501		locale data table
->6	short		0x24		for MIPS
->6	short		0x40		for Alpha
-# ATSC A/53 aka AC-3 aka Dolby Digital <ashitaka at gmx.at>
-# from http://www.atsc.org/standards/a_52a.pdf
-# corrections, additions, etc. are always welcome!
-#
-# syncword
-0       beshort         0x0b77  ATSC A/52 aka AC-3 aka Dolby Digital stream,
-# fscod
->4      byte&0xc0       0x00    48 kHz,
->4      byte&0xc0       0x40    44.1 kHz,
->4      byte&0xc0       0x80    32 kHz,
-# is this one used for 96 kHz?
->4      byte&0xc0       0xc0    reserved frequency,
-#
->5	byte&7 = 0		\b, complete main (CM)
->5	byte&7 = 1		\b, music and effects (ME)
->5	byte&7 = 2		\b, visually impaired (VI)
->5	byte&7 = 3		\b, hearing impaired (HI)
->5	byte&7 = 4		\b, dialogue (D)
->5	byte&7 = 5		\b, commentary (C)
->5	byte&7 = 6		\b, emergency (E)
-# acmod
->6      byte&0xe0       0x00    1+1 front,
->6      byte&0xe0       0x20    1 front/0 rear,
->6      byte&0xe0       0x40    2 front/0 rear,
->6      byte&0xe0       0x60    3 front/0 rear,
->6      byte&0xe0       0x80    2 front/1 rear,
->6      byte&0xe0       0xa0    3 front/1 rear,
->6      byte&0xe0       0xc0    2 front/2 rear,
->6      byte&0xe0       0xe0    3 front/2 rear,
-# lfeon (these may be incorrect)
->7      byte&0x40       0x00    LFE off,
->7      byte&0x40       0x40    LFE on,
-#
->4	byte&0x3e = 0x00	\b, 32 kbit/s
->4	byte&0x3e = 0x02        \b, 40 kbit/s
->4	byte&0x3e = 0x04        \b, 48 kbit/s
->4	byte&0x3e = 0x06        \b, 56 kbit/s
->4	byte&0x3e = 0x08        \b, 64 kbit/s
->4	byte&0x3e = 0x0a        \b, 80 kbit/s
->4	byte&0x3e = 0x0c        \b, 96 kbit/s
->4	byte&0x3e = 0x0e        \b, 112 kbit/s
->4	byte&0x3e = 0x10        \b, 128 kbit/s
->4	byte&0x3e = 0x12        \b, 160 kbit/s
->4	byte&0x3e = 0x14        \b, 192 kbit/s
->4	byte&0x3e = 0x16        \b, 224 kbit/s
->4	byte&0x3e = 0x18        \b, 256 kbit/s
->4	byte&0x3e = 0x1a        \b, 320 kbit/s
->4	byte&0x3e = 0x1c        \b, 384 kbit/s
->4	byte&0x3e = 0x1e        \b, 448 kbit/s
->4	byte&0x3e = 0x20        \b, 512 kbit/s
->4	byte&0x3e = 0x22        \b, 576 kbit/s
->4	byte&0x3e = 0x24        \b, 640 kbit/s
-# dsurmod (these may be incorrect)
->6      beshort&0x0180  0x0000  Dolby Surround not indicated
->6      beshort&0x0180  0x0080  not Dolby Surround encoded
->6      beshort&0x0180  0x0100  Dolby Surround encoded
->6      beshort&0x0180  0x0180  reserved Dolby Surround mode
-
-#------------------------------------------------------------------------------
-# dump:  file(1) magic for dump file format--for new and old dump filesystems
-#
-# We specify both byte orders in order to recognize byte-swapped dumps.
-#
-24	belong	60012		new-fs dump file (big endian),
->4	bedate	x		Previous dump %s,
->8	bedate	x		This dump %s,
->12	belong	>0		Volume %ld,
->692	belong	0		Level zero, type:
->692	belong	>0		Level %d, type:
->0	belong	1		tape header,
->0	belong	2		beginning of file record,
->0	belong	3		map of inodes on tape,
->0	belong	4		continuation of file record,
->0	belong	5		end of volume,
->0	belong	6		map of inodes deleted,
->0	belong	7		end of medium (for floppy),
->676	string	>\0		Label %s,
->696	string	>\0		Filesystem %s,
->760	string	>\0		Device %s,
->824	string	>\0		Host %s,
->888	belong	>0		Flags %x
-
-24	belong	60011		old-fs dump file (big endian),
-#>4	bedate	x		Previous dump %s,
-#>8	bedate	x		This dump %s,
->12	belong	>0		Volume %ld,
->692	belong	0		Level zero, type:
->692	belong	>0		Level %d, type:
->0	belong	1		tape header,
->0	belong	2		beginning of file record,
->0	belong	3		map of inodes on tape,
->0	belong	4		continuation of file record,
->0	belong	5		end of volume,
->0	belong	6		map of inodes deleted,
->0	belong	7		end of medium (for floppy),
->676	string	>\0		Label %s,
->696	string	>\0		Filesystem %s,
->760	string	>\0		Device %s,
->824	string	>\0		Host %s,
->888	belong	>0		Flags %x
-
-24	lelong	60012		new-fs dump file (little endian),
->4	ledate	x		This dump %s,
->8	ledate	x		Previous dump %s,
->12	lelong	>0		Volume %ld,
->692	lelong	0		Level zero, type:
->692	lelong	>0		Level %d, type:
->0	lelong	1		tape header,
->0	lelong	2		beginning of file record,
->0	lelong	3		map of inodes on tape,
->0	lelong	4		continuation of file record,
->0	lelong	5		end of volume,
->0	lelong	6		map of inodes deleted,
->0	lelong	7		end of medium (for floppy),
->676	string	>\0		Label %s,
->696	string	>\0		Filesystem %s,
->760	string	>\0		Device %s,
->824	string	>\0		Host %s,
->888	lelong	>0		Flags %x
-
-24	lelong	60011		old-fs dump file (little endian),
-#>4	ledate	x		Previous dump %s,
-#>8	ledate	x		This dump %s,
->12	lelong	>0		Volume %ld,
->692	lelong	0		Level zero, type:
->692	lelong	>0		Level %d, type:
->0	lelong	1		tape header,
->0	lelong	2		beginning of file record,
->0	lelong	3		map of inodes on tape,
->0	lelong	4		continuation of file record,
->0	lelong	5		end of volume,
->0	lelong	6		map of inodes deleted,
->0	lelong	7		end of medium (for floppy),
->676	string	>\0		Label %s,
->696	string	>\0		Filesystem %s,
->760	string	>\0		Device %s,
->824	string	>\0		Host %s,
->888	lelong	>0		Flags %x
-
-#------------------------------------------------------------------------------
-# Dyadic: file(1) magic for Dyalog APL.
-#
-0 	byte	0xaa
->1	byte	<4		Dyalog APL
->>1	byte	0x00		incomplete workspace
->>1	byte	0x01		component file
->>1	byte	0x02		external variable
->>1	byte	0x03		workspace
->>2	byte	x		version %d
->>3	byte	x		.%d
-
-#------------------------------------------------------------------------------
-# T602 editor documents 
-# by David Necas <yeti at physics.muni.cz>
-0	string	@CT\ 	T602 document data,
->4	string	0	Kamenicky
->4	string	1	CP 852
->4	string	2	KOI8-CS
->4	string	>2	unknown encoding
-
-# Vi IMproved Encrypted file 
-# by David Necas <yeti at physics.muni.cz>
-0	string	VimCrypt~	Vim encrypted file data
-
-#------------------------------------------------------------------------------
-# elf:  file(1) magic for ELF executables
-#
-# We have to check the byte order flag to see what byte order all the
-# other stuff in the header is in.
-#
-# What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
-#
-# updated by Daniel Quinlan (quinlan at yggdrasil.com)
-0	string		\177ELF		ELF
->4	byte		0		invalid class
->4	byte		1		32-bit
-# only for MIPS - in the future, the ABI field of e_flags should be used.
->>18	leshort		8
->>>36	lelong		&0x20		N32
->>18	leshort		10
->>>36	lelong		&0x20		N32
->>18	beshort		8
->>>36	belong		&0x20		N32
->>18	beshort		10
->>>36	belong		&0x20		N32
->4	byte		2		64-bit
->5	byte		0		invalid byte order
->5	byte		1		LSB
-# The official e_machine number for MIPS is now #8, regardless of endianness.
-# The second number (#10) will be deprecated later. For now, we still
-# say something if #10 is encountered, but only gory details for #8.
->>18    leshort		8
-# only for 32-bit
->>>4	byte		1
->>>>36  lelong&0xf0000000	0x00000000	MIPS-I
->>>>36  lelong&0xf0000000	0x10000000	MIPS-II
->>>>36  lelong&0xf0000000	0x20000000	MIPS-III
->>>>36  lelong&0xf0000000	0x30000000	MIPS-IV
->>>>36  lelong&0xf0000000	0x40000000	MIPS-V
->>>>36  lelong&0xf0000000	0x60000000	MIPS32
->>>>36  lelong&0xf0000000	0x70000000	MIPS64
->>>>36  lelong&0xf0000000	0x80000000	MIPS32 rel2
->>>>36  lelong&0xf0000000	0x90000000	MIPS64 rel2
-# only for 64-bit
->>>4	byte		2
->>>>48  lelong&0xf0000000	0x00000000	MIPS-I
->>>>48  lelong&0xf0000000	0x10000000	MIPS-II
->>>>48  lelong&0xf0000000	0x20000000	MIPS-III
->>>>48  lelong&0xf0000000	0x30000000	MIPS-IV
->>>>48  lelong&0xf0000000	0x40000000	MIPS-V
->>>>48  lelong&0xf0000000	0x60000000	MIPS32
->>>>48  lelong&0xf0000000	0x70000000	MIPS64 
->>>>48  lelong&0xf0000000	0x80000000	MIPS32 rel2
->>>>48  lelong&0xf0000000	0x90000000	MIPS64 rel2
->>16	leshort		0		no file type,
->>16	leshort		1		relocatable,
->>16	leshort		2		executable,
->>16	leshort		3		shared object,
-# Core handling from Peter Tobias <tobias at server.et-inf.fho-emden.de>
-# corrections by Christian 'Dr. Disk' Hechelmann <drdisk at ds9.au.s.shuttle.de>
->>16	leshort		4		core file
-# Core file detection is not reliable.
-#>>>(0x38+0xcc) string	>\0		of '%s'
-#>>>(0x38+0x10) lelong	>0		(signal %d),
->>16	leshort		&0xff00		processor-specific,
->>18	leshort		0		no machine,
->>18	leshort		1		AT&T WE32100 - invalid byte order,
->>18	leshort		2		SPARC - invalid byte order,
->>18	leshort		3		Intel 80386,
->>18	leshort		4		Motorola
->>>36	lelong		&0x01000000	68000 - invalid byte order,
->>>36	lelong		&0x00810000	CPU32 - invalid byte order,
->>>36	lelong		0		68020 - invalid byte order,
->>18	leshort		5		Motorola 88000 - invalid byte order,
->>18	leshort		6		Intel 80486,
->>18	leshort		7		Intel 80860,
->>18	leshort		8		MIPS,
->>18	leshort		9		Amdahl - invalid byte order,
->>18	leshort		10		MIPS (deprecated),
->>18	leshort		11		RS6000 - invalid byte order,
->>18	leshort		15		PA-RISC - invalid byte order,
->>>50	leshort		0x0214		2.0
->>>48	leshort		&0x0008		(LP64),
->>18	leshort		16		nCUBE,
->>18	leshort		17		Fujitsu VPP500,
->>18	leshort		18		SPARC32PLUS,
->>18	leshort		20		PowerPC,
->>18	leshort		22		IBM S/390,
->>18	leshort		36		NEC V800,
->>18	leshort		37		Fujitsu FR20,
->>18	leshort		38		TRW RH-32,
->>18	leshort		39		Motorola RCE,
->>18	leshort		40		ARM,
->>18	leshort		41		Alpha,
->>18	leshort		0xa390		IBM S/390 (obsolete),
->>18	leshort		42		Hitachi SH,
->>18	leshort		43		SPARC V9 - invalid byte order,
->>18	leshort		44		Siemens Tricore Embedded Processor,
->>18	leshort		45		Argonaut RISC Core, Argonaut Technologies Inc.,
->>18	leshort		46		Hitachi H8/300,
->>18	leshort		47		Hitachi H8/300H,
->>18	leshort		48		Hitachi H8S,
->>18	leshort		49		Hitachi H8/500,
->>18	leshort		50		IA-64 (Intel 64 bit architecture),
->>18	leshort		51		Stanford MIPS-X,
->>18	leshort		52		Motorola Coldfire,
->>18	leshort		53		Motorola M68HC12,
->>18	leshort		62		AMD x86-64,
->>18	leshort		75		Digital VAX,
->>18	leshort		97		NatSemi 32k,
->>18	leshort		0x9026		Alpha (unofficial),
->>20	lelong		0		invalid version
->>20	lelong		1		version 1
->>36	lelong		1		MathCoPro/FPU/MAU Required
->5	byte		2		MSB
-# only for MIPS - see comment in little-endian section above.
->>18    beshort		8
-# only for 32-bit
->>>4	byte		1
->>>>36  belong&0xf0000000	0x00000000	MIPS-I
->>>>36  belong&0xf0000000	0x10000000	MIPS-II
->>>>36  belong&0xf0000000	0x20000000	MIPS-III
->>>>36  belong&0xf0000000	0x30000000	MIPS-IV
->>>>36  belong&0xf0000000	0x40000000	MIPS-V
->>>>36  belong&0xf0000000	0x60000000	MIPS32
->>>>36  belong&0xf0000000	0x70000000	MIPS64
->>>>36  belong&0xf0000000	0x80000000	MIPS32 rel2
->>>>36  belong&0xf0000000	0x90000000	MIPS64 rel2
-# only for 64-bit
->>>4	byte		2
->>>>48	belong&0xf0000000	0x00000000	MIPS-I
->>>>48	belong&0xf0000000	0x10000000	MIPS-II
->>>>48	belong&0xf0000000	0x20000000	MIPS-III
->>>>48	belong&0xf0000000	0x30000000	MIPS-IV
->>>>48	belong&0xf0000000	0x40000000	MIPS-V
->>>>48	belong&0xf0000000	0x60000000	MIPS32
->>>>48	belong&0xf0000000	0x70000000	MIPS64 
->>>>48	belong&0xf0000000	0x80000000	MIPS32 rel2
->>>>48	belong&0xf0000000	0x90000000	MIPS64 rel2
->>16	beshort		0		no file type,
->>16	beshort		1		relocatable,
->>16	beshort		2		executable,
->>16	beshort		3		shared object,
->>16	beshort		4		core file,
-#>>>(0x38+0xcc) string	>\0		of '%s'
-#>>>(0x38+0x10) belong	>0		(signal %d),
->>16	beshort		&0xff00		processor-specific,
->>18	beshort		0		no machine,
->>18	beshort		1		AT&T WE32100,
->>18	beshort		2		SPARC,
->>18	beshort		3		Intel 80386 - invalid byte order,
->>18	beshort		4		Motorola
->>>36	belong		&0x01000000	68000,
->>>36	belong		&0x00810000	CPU32,
->>>36	belong		0		68020,
->>18	beshort		5		Motorola 88000,
->>18	beshort		6		Intel 80486 - invalid byte order,
->>18	beshort		7		Intel 80860,
->>18	beshort		8		MIPS,
->>18	beshort		9		Amdahl,
->>18	beshort		10		MIPS (deprecated),
->>18	beshort		11		RS6000,
->>18	beshort		15		PA-RISC
->>>50	beshort		0x0214		2.0
->>>48	beshort		&0x0008		(LP64)
->>18	beshort		16		nCUBE,
->>18	beshort		17		Fujitsu VPP500,
->>18	beshort		18		SPARC32PLUS,
->>>36	belong&0xffff00	&0x000100	V8+ Required,
->>>36	belong&0xffff00	&0x000200	Sun UltraSPARC1 Extensions Required,
->>>36	belong&0xffff00	&0x000400	HaL R1 Extensions Required,
->>>36	belong&0xffff00	&0x000800	Sun UltraSPARC3 Extensions Required,
->>18	beshort		20		PowerPC or cisco 4500,
->>18	beshort		21		cisco 7500,
->>18	beshort		22		IBM S/390,
->>18	beshort		24		cisco SVIP,
->>18	beshort		25		cisco 7200,
->>18	beshort		36		NEC V800 or cisco 12000,
->>18	beshort		37		Fujitsu FR20,
->>18	beshort		38		TRW RH-32,
->>18	beshort		39		Motorola RCE,
->>18	beshort		40		ARM,
->>18	beshort		41		Alpha,
->>18	beshort		42		Hitachi SH,
->>18	beshort		43		SPARC V9,
->>18	beshort		44		Siemens Tricore Embedded Processor,
->>18	beshort		45		Argonaut RISC Core, Argonaut Technologies Inc.,
->>18	beshort		46		Hitachi H8/300,
->>18	beshort		47		Hitachi H8/300H,
->>18	beshort		48		Hitachi H8S,
->>18	beshort		49		Hitachi H8/500,
->>18	beshort		50		IA-64 (Intel 64 bit architecture),
->>18	beshort		51		Stanford MIPS-X,
->>18	beshort		52		Motorola Coldfire,
->>18	beshort		53		Motorola M68HC12,
->>18	beshort		73		Cray NV1,
->>18	beshort		75		Digital VAX,
->>18	beshort		97		NatSemi 32k,
->>18	beshort		0x9026		Alpha (unofficial),
->>18	beshort		0xa390		IBM S/390 (obsolete),
->>20	belong		0		invalid version
->>20	belong		1		version 1
->>36	belong		1		MathCoPro/FPU/MAU Required
-# Up to now only 0, 1 and 2 are defined; I've seen a file with 0x83, it seemed
-# like proper ELF, but extracting the string had bad results.
->4      byte            <0x80
->>8	string		>\0		(%s)
->8	string		\0
->>7	byte		0		(SYSV)
->>7	byte		1		(HP-UX)
->>7	byte		2		(NetBSD)
->>7	byte		3		(GNU/Linux)
->>7	byte		4		(GNU/Hurd)
->>7	byte		5		(86Open)
->>7	byte		6		(Solaris)
->>7	byte		7		(Monterey)
->>7	byte		8		(IRIX)
->>7	byte		9		(FreeBSD)
->>7	byte		10		(Tru64)
->>7	byte		11		(Novell Modesto)
->>7	byte		12		(OpenBSD)
->>7	byte		97		(ARM)
->>7	byte		255		(embedded)
-
-#------------------------------------------------------------------------------
-# encore:  file(1) magic for Encore machines
-#
-# XXX - needs to have the byte order specified (NS32K was little-endian,
-# dunno whether they run the 88K in little-endian mode or not).
-#
-0	short		0x154		Encore
->20	short		0x107		executable
->20	short		0x108		pure executable
->20	short		0x10b		demand-paged executable
->20	short		0x10f		unsupported executable
->12	long		>0		not stripped
->22	short		>0		- version %ld
->22	short		0		-
-#>4	date		x		stamp %s
-0	short		0x155		Encore unsupported executable
->12	long		>0		not stripped
->22	short		>0		- version %ld
->22	short		0		-
-#>4	date		x		stamp %s
-
-#------------------------------------------------------------------------------
-# Epoc 32 : file(1) magic for Epoc Documents [psion/osaris
-# Stefan Praszalowicz (hpicollo at worldnet.fr)
-#0	lelong		0x10000037	Epoc32
->4	lelong		0x1000006D
->>8	lelong		0x1000007F	Word
->>8	lelong		0x10000088	Sheet
->>8	lelong		0x1000007D	Sketch
->>8	lelong		0x10000085	TextEd
-
-#------------------------------------------------------------------------------
-# fcs: file(1) magic for FCS (Flow Cytometry Standard) data files
-# From Roger Leigh <roger at whinlatter.uklinux.net>
-0       string          FCS1.0          Flow Cytometry Standard (FCS) data, version 1.0
-0       string          FCS2.0          Flow Cytometry Standard (FCS) data, version 2.0
-0       string          FCS3.0          Flow Cytometry Standard (FCS) data, version 3.0
-
-#------------------------------------------------------------------------------
-# lxkernel: file(1) magic for Linux/i386 Kernel
-# compiled Linux-kernel submitted by Hans Lermen lermen at elserv.ffm.fgan.de
-0x202			string		HdrS		Linux
->0x1fe			leshort		0xAA55		\b/x86 Kernel
->0x1fe			leshort		<0xAA55		Kernel
->0x1fe			leshort		>0xAA55		Kernel
->0x206			leshort		0x0105		\b, Setup Version 0x105, zImage
->0x206			leshort		>0x0105		\b, Setup Version %#hx
->>0x211			byte		0		\b, zImage
->>0x211			byte		1		\b, bzImage
->>>(0x20e.s+0x205)	byte		32
->>>>(0x20e.s+0x200)	string		>\0		\b, Version %5.5s
->>>(0x20e.s+0x206)	byte		32
->>>>(0x20e.s+0x200)	string		>\0		\b, Version %6.6s
->>>(0x20e.s+0x207)	byte		32
->>>>(0x20e.s+0x200)	string		>\0		\b, Version %7.7s
->>>(0x20e.s+0x205)	byte		45
->>>>(0x20e.s+0x200)	string		>\0		\b, Version %s
->>>(0x20e.s+0x206)	byte		45
->>>>(0x20e.s+0x200)	string		>\0		\b, Version %s
->>>(0x20e.s+0x207)	byte		45
->>>>(0x20e.s+0x200)	string		>\0		\b, Version %s
->>0x1f2			leshort		1		\b, RO-rootFS
->>0x1f2			leshort		0		\b, RW-rootFS
->>0x1fc			leshort		>0		\b, root_dev 0x%X
->>0x1f6			leshort		>0		\b, swap_dev 0x%X
->>0x1f8			leshort		>0		\b, RAMdisksize %u KB
->>0x1fa			leshort		0xFFFF		\b, Normal VGA
->>0x1fa			leshort		0xFFFE		\b, Extended VGA
->>0x1fa			leshort		0xFFFD		\b, Prompt for Videomode
->>0x1fa			leshort		>0		\b, Video mode %d
-
-0x1e3			string		Loading		Linux/i386 Kernel zImage
-
-#------------------------------------------------------------------------------
-# filesystems:  file(1) magic for different filesystems
-#
-0	string	\366\366\366\366	PC formatted floppy with no filesystem
-# Sun disk labels
-# From /usr/include/sun/dklabel.h:
-0774	beshort		0xdabe		Sun disk label
->0	string		x		'%s
->>31  	string		>\0		\b%s
->>>63  	string		>\0		\b%s
->>>>95 	string		>\0		\b%s
->0	string		x		\b'
->0734	short		>0		%d rpm,
->0736	short		>0		%d phys cys,
->0740	short		>0		%d alts/cyl,
->0746	short		>0		%d interleave,
->0750	short		>0		%d data cyls,
->0752	short		>0		%d alt cyls,
->0754	short		>0		%d heads/partition,
->0756	short		>0		%d sectors/track,
->0764	long		>0		start cyl %ld,
->0770	long		x		%ld blocks
-# Is there a boot block written 1 sector in?
->512    belong&077777777	0600407	\b, boot block present
-0x1FE	leshort	0xAA55			x86 boot sector
->2	string	OSBS			\b, OS/BS MBR
-# J\xf6rg Jenderek <joerg.jenderek at gmx.net>
->0x8C	string	Invalid\ partition\ table	\b, MS-DOS MBR
->0x9D	string	Invalid\ partition\ table	\b, DR-DOS MBR, version 7.01 to 7.03
->0x10F	string	Ung\201ltige\ Partitionstabelle	\b, MS-DOS MBR, german version 4.10.1998, 4.10.2222
->0x8B	string	Ung\201ltige\ Partitionstabelle	\b, MS-DOS MBR, german version 5.00 to 4.00.950
->0x145	string	Default:\ F			\b, FREE-DOS MBR
->0	string	\0\0\0\0		\b, extended partition table
-# JuMP short     bootcodeoffset NOP assembler instructions will usually be EB xx 90
-# older drives may use E9 xx xx
->0		lelong&0x009000EB	0x009000EB 
->0		lelong&0x000000E9	0x000000E9 
->>1		ubyte			>37	\b, code offset 0x%x
-# mtools-3.9.8/msdos.h
-# usual values are marked with comments to get only informations of strange FAT systems
-# valid sectorsize are from 32 to 2048
->>>11		uleshort	<2049	
->>>>11		uleshort	>31	
->>>>>3		string		>\0		\b, OEM-ID "%8.8s"
->>>>>11		uleshort	>512		\b, Bytes/sector %u
-#>>>>>11	uleshort	=512		\b, Bytes/sector %u=512 (usual)
->>>>>11		uleshort	<512		\b, Bytes/sector %u
->>>>>13		ubyte		>1		\b, sectors/cluster %u
-#>>>>>13	ubyte		=1		\b, sectors/cluster %u (usual on Floppies)
->>>>>14		uleshort	>32		\b, reserved sectors %u
-#>>>>>14	uleshort	=32		\b, reserved sectors %u (usual Fat32)
-#>>>>>14	uleshort	>1		\b, reserved sectors %u
-#>>>>>14	uleshort	=1		\b, reserved sectors %u (usual FAT12,FAT16)
->>>>>14		uleshort	<1		\b, reserved sectors %u
->>>>>16		ubyte		>2		\b, FATs %u
-#>>>>>16	ubyte		=2		\b, FATs %u (usual)
->>>>>16		ubyte		=1		\b, FAT  %u
->>>>>16		ubyte		>0
->>>>>17		uleshort	>0		\b, root entries %u
-#>>>>>17	uleshort	=0		\b, root entries %u=0 (usual Fat32)
->>>>>19		uleshort	>0		\b, sectors %u (volumes <=32 MB) 
-#>>>>>19	uleshort	=0		\b, sectors %u=0 (usual Fat32)
->>>>>21		ubyte		>0xF0		\b, Media descriptor 0x%x
-#>>>>>21	ubyte		=0xF0		\b, Media descriptor 0x%x (usual floppy)
->>>>>21		ubyte		<0xF0		\b, Media descriptor 0x%x
->>>>>22		uleshort	>0		\b, sectors/FAT %u
-#>>>>>22	uleshort	=0		\b, sectors/FAT %u=0 (usual Fat32)
->>>>>26		ubyte		>2		\b, heads %u
-#>>>>>26	ubyte		=2		\b, heads %u (usual floppy)
->>>>>26		ubyte		=1		\b, heads %u
->>>>>28		ulelong		>0		\b, hidden sectors %u
-#>>>>>28	ulelong		=0		\b, hidden sectors %u (usual floppy)
->>>>>32		ulelong		>0		\b, sectors %u (volumes > 32 MB) 
-#>>>>>32	ulelong		=0		\b, sectors %u (volumes > 32 MB) 
-# FAT<32 specific 
-# NOT le FAT3=NOT 3TAF=0xCCABBEB9
->>>>>82		ulelong&0xCCABBEB9	>0
->>>>>>36	ubyte		>0x80		\b, physical drive 0x%x
-#>>>>>>36	ubyte		=0x80		\b, physical drive 0x%x=0x80 (usual harddisk)
->>>>>>36	ubyte&0x7F	>0		\b, physical drive 0x%x
-#>>>>>>36	ubyte		=0		\b, physical drive 0x%x=0 (usual floppy)
->>>>>>37	ubyte		>0		\b, reserved 0x%x
-#>>>>>>37	ubyte		=0		\b, reserved 0x%x
->>>>>>38	ubyte		>0x29		\b, dos < 4.0 BootSector (0x%x)
->>>>>>38	ubyte		<0x29		\b, dos < 4.0 BootSector (0x%x)
->>>>>>38	ubyte		=0x29
->>>>>>>39	ulelong		x		\b, serial number 0x%x
->>>>>>>43	string		<NO\ NAME	\b, label: "%11.11s"
->>>>>>>43	string		>NO\ NAME	\b, label: "%11.11s"
->>>>>>>43	string		=NO\ NAME	\b, unlabeled
->>>>>>54	string		FAT1		\b, FAT
->>>>>>>54	string		FAT12		\b (12 bit)
->>>>>>>54	string		FAT16		\b (16 bit)
-# FAT32 specific
->>>>>82		string		FAT32		\b, FAT (32 bit)
->>>>>>36	ulelong		x		\b, sectors/FAT %u
->>>>>>40	uleshort	>0		\b, extension flags %u
-#>>>>>>40	uleshort	=0		\b, extension flags %u
->>>>>>42	uleshort	>0		\b, fsVersion %u
-#>>>>>>42	uleshort	=0		\b, fsVersion %u (usual)
->>>>>>44	ulelong		>2		\b, rootdir cluster %u
-#>>>>>>44	ulelong		=2		\b, rootdir cluster %u
-#>>>>>>44	ulelong		=1		\b, rootdir cluster %u
->>>>>>48	uleshort	>1		\b, infoSector %u
-#>>>>>>48	uleshort	=1		\b, infoSector %u (usual)
->>>>>>48	uleshort	<1		\b, infoSector %u
->>>>>>50	uleshort	>6		\b, Backup boot sector %u
-#>>>>>>50	uleshort	=6		\b, Backup boot sector %u (usual) 
->>>>>>50	uleshort	<6		\b, Backup boot sector %u
->>>>>>54	ulelong		>0		\b, reserved1 0x%x
->>>>>>58	ulelong		>0		\b, reserved2 0x%x
->>>>>>62	ulelong		>0		\b, reserved3 0x%x
-# same structure as FAT1X 
->>>>>>64	ubyte		>0x80		\b, physical drive 0x%x
-#>>>>>>64	ubyte		=0x80		\b, physical drive 0x%x=80 (usual harddisk)
->>>>>>64	ubyte&0x7F	>0		\b, physical drive 0x%x
-#>>>>>>64	ubyte		=0		\b, physical drive 0x%x=0 (usual floppy)
->>>>>>65	ubyte		>0		\b, reserved 0x%x
->>>>>>66	ubyte		>0x29		\b, dos < 4.0 BootSector (0x%x)
->>>>>>66	ubyte		<0x29		\b, dos < 4.0 BootSector (0x%x)
->>>>>>66	ubyte		=0x29
->>>>>>>67	ulelong		x		\b, serial number 0x%x
->>>>>>>71	string		<NO\ NAME	\b, label: "%11.11s"
->>>>>>71	string		>NO\ NAME	\b, label: "%11.11s"
->>>>>>71	string		=NO\ NAME	\b, unlabeled
-### FATs end
->0x200	lelong	0x82564557		\b, BSD disklabel
-
-# Minix filesystems - Juan Cespedes <cespedes at debian.org>
-0x410	leshort		0x137f		Minix filesystem
-0x410	beshort		0x137f		Minix filesystem (big endian),
->0x402	beshort		!0		\b, %d zones
->0x1e	string		minix		\b, bootable
-0x410	leshort		0x138f		Minix filesystem, 30 char names
-0x410	leshort		0x2468		Minix filesystem, version 2
-0x410	leshort		0x2478		Minix filesystem, version 2, 30 char names
-
-# romfs filesystems - Juan Cespedes <cespedes at debian.org>
-0	string		-rom1fs-\0	romfs filesystem, version 1
->8	belong	x			%d bytes,
->16	string	x			named %s.
-
-# netboot image - Juan Cespedes <cespedes at debian.org>
-0	lelong		0x1b031336L	Netboot image,
->4	lelong&0xFFFFFF00	0
->>4	lelong&0x100	0x000		mode 2
->>4	lelong&0x100	0x100		mode 3
->4	lelong&0xFFFFFF00	!0	unknown mode
-
-0x18b	string	OS/2	OS/2 Boot Manager
-
-9564	lelong		0x00011954	Unix Fast File system (little-endian),
->8404	string		x		last mounted on %s,
-#>9504	ledate		x		last checked at %s,
->8224	ledate		x		last written at %s,
->8401	byte		x		clean flag %d,
->8228	lelong		x		number of blocks %d,
->8232	lelong		x		number of data blocks %d,
->8236	lelong		x		number of cylinder groups %d,
->8240	lelong		x		block size %d,
->8244	lelong		x		fragment size %d,
->8252	lelong		x		minimum percentage of free blocks %d,
->8256	lelong		x		rotational delay %dms,
->8260	lelong		x		disk rotational speed %drps,
->8320	lelong		0		TIME optimization
->8320	lelong		1		SPACE optimization
-
-9564	belong		0x00011954	Unix Fast File system (big-endian),
->7168   long		0x4c41424c	Apple UFS Volume
->>7186  string		x		named %s,
->>7176  belong		x		volume label version %d,
->>7180  bedate		x		created on %s,
->8404	string		x		last mounted on %s,
-#>9504	bedate		x		last checked at %s,
->8224	bedate		x		last written at %s,
->8401	byte		x		clean flag %d,
->8228	belong		x		number of blocks %d,
->8232	belong		x		number of data blocks %d,
->8236	belong		x		number of cylinder groups %d,
->8240	belong		x		block size %d,
->8244	belong		x		fragment size %d,
->8252	belong		x		minimum percentage of free blocks %d,
->8256	belong		x		rotational delay %dms,
->8260	belong		x		disk rotational speed %drps,
->8320	belong		0		TIME optimization
->8320	belong		1		SPACE optimization
-
-# ext2/ext3 filesystems - Andreas Dilger <adilger at turbolabs.com>
-0x438	leshort		0xEF53		Linux
->0x44c	lelong		x		rev %d
->0x43e	leshort		x		\b.%d
->0x45c	lelong		^0x0000004	ext2 filesystem data
->>0x43a	leshort		^0x0000001	(mounted or unclean)
->0x45c	lelong		&0x0000004	ext3 filesystem data
->>0x460	lelong		&0x0000004	(needs journal recovery)
->0x43a	leshort		&0x0000002	(errors)
->0x460	lelong		&0x0000001	(compressed)
-#>0x460	lelong		&0x0000002	(filetype)
-#>0x464	lelong		&0x0000001	(sparse_super)
->0x464	lelong		&0x0000002	(large files)
-
-# SGI disk labels - Nathan Scott <nathans at debian.org>
-0	belong		0x0BE5A941	SGI disk label (volume header)
-
-# SGI XFS filesystem - Nathan Scott <nathans at debian.org>
-0	belong		0x58465342	SGI XFS filesystem data
->0x4	belong		x		(blksz %d,
->0x68	beshort		x		inosz %d,
->0x64	beshort		^0x2004		v1 dirs)
->0x64	beshort		&0x2004		v2 dirs)
-
-############################################################################
-# Minix-ST kernel floppy
-0x800	belong		0x46fc2700	Atari-ST Minix kernel image
->19	string		\240\5\371\5\0\011\0\2\0	\b, 720k floppy
->19	string		\320\2\370\5\0\011\0\1\0	\b, 360k floppy
-
-############################################################################
-# Hmmm, is this a better way of detecting _standard_ floppy images ?
-19	string		\320\2\360\3\0\011\0\1\0	DOS floppy 360k
->0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
-19	string		\240\5\371\3\0\011\0\2\0	DOS floppy 720k
->0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
-19	string		\100\013\360\011\0\022\0\2\0	DOS floppy 1440k
->0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
-
-19	string		\240\5\371\5\0\011\0\2\0	DOS floppy 720k, IBM
->0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
-19	string		\100\013\371\5\0\011\0\2\0	DOS floppy 1440k, mkdosfs
->0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
-
-19	string		\320\2\370\5\0\011\0\1\0	Atari-ST floppy 360k
-19	string		\240\5\371\5\0\011\0\2\0	Atari-ST floppy 720k
-
-#  Valid media descriptor bytes for MS-DOS:
-#
-#     Byte   Capacity   Media Size and Type
-#     -------------------------------------------------
-#
-#     F0     2.88 MB    3.5-inch, 2-sided, 36-sector
-#     F0     1.44 MB    3.5-inch, 2-sided, 18-sector
-#     F9     720K       3.5-inch, 2-sided, 9-sector
-#     F9     1.2 MB     5.25-inch, 2-sided, 15-sector
-#     FD     360K       5.25-inch, 2-sided, 9-sector
-#     FF     320K       5.25-inch, 2-sided, 8-sector
-#     FC     180K       5.25-inch, 1-sided, 9-sector
-#     FE     160K       5.25-inch, 1-sided, 8-sector
-#     FE     250K       8-inch, 1-sided, single-density
-#     FD     500K       8-inch, 2-sided, single-density
-#     FE     1.2 MB     8-inch, 2-sided, double-density
-#     F8     -----      Fixed disk 
-#
-#     FC     xxxK       Apricot 70x1x9 boot disk.
-#
-# Originally a bitmap:
-#  xxxxxxx0	Not two sided
-#  xxxxxxx1	Double sided
-#  xxxxxx0x	Not 8 SPT
-#  xxxxxx1x	8 SPT
-#  xxxxx0xx	Not Removable drive
-#  xxxxx1xx	Removable drive
-#  11111xxx	Must be one.
-#
-# But now it's rather random:
-#  111111xx	Low density disk
-#        00	SS, Not 8 SPT
-#        01	DS, Not 8 SPT
-#        10	SS, 8 SPT
-#        11	DS, 8 SPT
-#
-#  11111001	Double density 3� floppy disk, high density 5�
-#  11110000	High density 3� floppy disk
-#  11111000	Hard disk any format
-#
-
-# CDROM Filesystems
-32769    string    CD001     ISO 9660 CD-ROM filesystem data
-# "application id" which appears to be used as a volume label
->32808	 string    >\0       '%s'
->34816	 string    \000CD001\001EL\ TORITO\ SPECIFICATION    (bootable)
-37633    string    CD001     ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
-32776    string    CDROM     High Sierra CD-ROM filesystem data
-
-# cramfs filesystem - russell at coker.com.au
-0       lelong    0x28cd3d45      Linux Compressed ROM File System data, little endian
->4      lelong  x size %d
->8      lelong  &1 version #2
->8      lelong  &2 sorted_dirs
->8      lelong  &4 hole_support
->32     lelong  x CRC 0x%x,
->36     lelong  x edition %d,
->40     lelong  x %d blocks,
->44     lelong  x %d files
-
-0       belong    0x28cd3d45      Linux Compressed ROM File System data, big endian
->4      belong  x size %d
->8      belong  &1 version #2
->8      belong  &2 sorted_dirs
->8      belong  &4 hole_support
->32     belong  x CRC 0x%x,
->36     belong  x edition %d,
->40     belong  x %d blocks,
->44     belong  x %d files
-
-# reiserfs - russell at coker.com.au
-0x10034		string	ReIsErFs	ReiserFS V3.5
-0x10034		string	ReIsEr2Fs	ReiserFS V3.6
->0x1002c 	leshort	x		block size %d
->0x10032	leshort	&2		(mounted or unclean)
->0x10000	lelong	x		num blocks %d
->0x10040	lelong	1		tea hash
->0x10040	lelong	2		yura hash
->0x10040	lelong	3		r5 hash
-
-# JFFS - russell at coker.com.au
-0	lelong	0x34383931	Linux Journalled Flash File system, little endian
-0	belong	0x34383931	Linux Journalled Flash File system, big endian
-
-# EST flat binary format (which isn't, but anyway)
-# From: Mark Brown <broonie at sirena.org.uk>
-0	string	ESTFBINR	EST flat binary
-
-# Aculab VoIP firmware
-# From: Mark Brown <broonie at sirena.org.uk>
-0	string	VoIP\ Startup\ and	Aculab VoIP firmware
->35	string	x	format %s
-
-# PPCBoot image file
-# From: Mark Brown <broonie at sirena.org.uk>
-0	belong	0x27051956	PPCBoot image
->4	string  PPCBoot
->>12	string  x		version %s
-
-# JFFS2 file system
-0       leshort         0x1984                  Linux old jffs2 filesystem data little endian
-0       lelong          0xe0011985              Linux jffs2 filesystem data little endian
-
-#------------------------------------------------------------------------------
-# flash:	file(1) magic for Macromedia Flash file format
-#
-# See
-#
-#	http://www.macromedia.com/software/flash/open/
-#
-0	string		FWS		Macromedia Flash data,
->3	byte		x		version %d
-0	string		CWS		Macromedia Flash data (compressed),
->3	byte		x		version %d
-#
-# From Dave Wilson
-0	string AGD4\xbe\xb8\xbb\xcb\x00	Macromedia Freehand 9 Document
-
-#------------------------------------------------------------------------------
-# fonts:  file(1) magic for font data
-#
-0	string		FONT		ASCII vfont text
-0	short		0436		Berkeley vfont data
-0	short		017001		byte-swapped Berkeley vfont data
-
-# PostScript fonts (must precede "printer" entries), quinlan at yggdrasil.com
-0	string		%!PS-AdobeFont-1.	PostScript Type 1 font text
->20	string		>\0			(%s)
-6	string		%!PS-AdobeFont-1.	PostScript Type 1 font program data
-
-# X11 font files in SNF (Server Natural Format) format
-0	belong		00000004		X11 SNF font data, MSB first
-0	lelong		00000004		X11 SNF font data, LSB first
-
-# X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan at yggdrasil.com)
-0	string		STARTFONT\040		X11 BDF font text
-
-# X11 fonts, from Daniel Quinlan (quinlan at yggdrasil.com)
-# PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides)
-0	string		\001fcp			X11 Portable Compiled Font data
->12	byte		0x02			\b, LSB first
->12	byte		0x0a			\b, MSB first
-0	string		D1.0\015		X11 Speedo font data
-
-#------------------------------------------------------------------------------
-# FIGlet fonts and controlfiles
-# From figmagic supplied with Figlet version 2.2
-# "David E. O'Brien" <obrien at FreeBSD.ORG>
-0	string		flf		FIGlet font
->3	string		>2a		version %-2.2s
-0	string		flc		FIGlet controlfile
->3	string		>2a		version %-2.2s
-
-# libGrx graphics lib fonts, from Albert Cahalan (acahalan at cs.uml.edu)
-# Used with djgpp (DOS Gnu C++), sometimes Linux or Turbo C++
-0	belong		0x14025919	libGrx font data,
->8	leshort		x		%dx
->10	leshort		x		\b%d
->40	string		x		%s
-# Misc. DOS VGA fonts, from Albert Cahalan (acahalan at cs.uml.edu)
-0	belong		0xff464f4e	DOS code page font data collection
-7	belong		0x00454741	DOS code page font data
-7	belong		0x00564944	DOS code page font data (from Linux?)
-4098	string		DOSFONT		DOSFONT2 encrypted font data
-
-# downloadable fonts for browser (prints type) anthon at mnt.org
-0	string		PFR1		PFR1 font
->102	string		>0		\b: %s
-
-# True Type fonts
-0	string	\000\001\000\000\000	TrueType font data
-
-0	string		\007\001\001\000Copyright\ (c)\ 199	Adobe Multiple Master font
-0	string		\012\001\001\000Copyright\ (c)\ 199	Adobe Multiple Master font
-
-# Opentype font data from Avi Bercovich
-0	string		OTTO		OpenType font data 
-
-
-#------------------------------------------------------------------------------
-# frame:  file(1) magic for FrameMaker files
-#
-# This stuff came on a FrameMaker demo tape, most of which is
-# copyright, but this file is "published" as witness the following:
-#
-0	string		\<MakerFile	FrameMaker document
->11	string		5.5		 (5.5
->11	string		5.0		 (5.0
->11	string		4.0		 (4.0
->11	string		3.0		 (3.0
->11	string		2.0		 (2.0
->11	string		1.0		 (1.0
->14	byte		x		  %c)
-0	string		\<MIFFile	FrameMaker MIF (ASCII) file
->9	string		4.0		 (4.0)
->9	string		3.0		 (3.0)
->9	string		2.0		 (2.0)
->9	string		1.0		 (1.x)
-0	string		\<MakerDictionary	FrameMaker Dictionary text
->17	string		3.0		 (3.0)
->17	string		2.0		 (2.0)
->17	string		1.0		 (1.x)
-0	string		\<MakerScreenFont	FrameMaker Font file
->17	string		1.01		 (%s)
-0	string		\<MML		FrameMaker MML file
-0	string		\<BookFile	FrameMaker Book file
->10	string		3.0		 (3.0
->10	string		2.0		 (2.0
->10	string		1.0		 (1.0
->13	byte		x		  %c)
-# XXX - this book entry should be verified, if you find one, uncomment this
-#0	string		\<Book\ 	FrameMaker Book (ASCII) file
-#>6	string		3.0		 (3.0)
-#>6	string		2.0		 (2.0)
-#>6	string		1.0		 (1.0)
-0	string		\<Maker	Intermediate Print File	FrameMaker IPL file
-
-#------------------------------------------------------------------------------
-# freebsd:  file(1) magic for FreeBSD objects
-#
-# All new-style FreeBSD magic numbers are in host byte order (i.e.,
-# little-endian on x86).
-#
-# XXX - this comes from the file "freebsd" in a recent FreeBSD version of
-# "file"; it, and the NetBSD stuff in "netbsd", appear to use different
-# schemes for distinguishing between executable images, shared libraries,
-# and object files.
-#
-# FreeBSD says:
-#
-#    Regardless of whether it's pure, demand-paged, or none of the
-#    above:
-#
-#	if the entry point is < 4096, then it's a shared library if
-#	the "has run-time loader information" bit is set, and is
-#	position-independent if the "is position-independent" bit
-#	is set;
-#
-#	if the entry point is >= 4096 (or >4095, same thing), then it's
-#	an executable, and is dynamically-linked if the "has run-time
-#	loader information" bit is set.
-#
-# On x86, NetBSD says:
-#
-#    If it's neither pure nor demand-paged:
-#
-#	if it has the "has run-time loader information" bit set, it's
-#	a dynamically-linked executable;
-#
-#	if it doesn't have that bit set, then:
-#
-#	    if it has the "is position-independent" bit set, it's
-#	    position-independent;
-#
-#	    if the entry point is non-zero, it's an executable, otherwise
-#	    it's an object file.
-#
-#    If it's pure:
-#
-#	if it has the "has run-time loader information" bit set, it's
-#	a dynamically-linked executable, otherwise it's just an
-#	executable.
-#
-#    If it's demand-paged:
-#
-#	if it has the "has run-time loader information" bit set,
-#	then:
-#
-#	    if the entry point is < 4096, it's a shared library;
-#
-#	    if the entry point is = 4096 or > 4096 (i.e., >= 4096),
-#	    it's a dynamically-linked executable);
-#
-#	if it doesn't have the "has run-time loader information" bit
-#	set, then it's just an executable.
-#
-# (On non-x86, NetBSD does much the same thing, except that it uses
-# 8192 on 68K - except for "68k4k", which is presumably "68K with 4K
-# pages - SPARC, and MIPS, presumably because Sun-3's and Sun-4's
-# had 8K pages; dunno about MIPS.)
-#
-# I suspect the two will differ only in perverse and uninteresting cases
-# ("shared" libraries that aren't demand-paged and whose pages probably
-# won't actually be shared, executables with entry points <4096).
-#
-# I leave it to those more familiar with FreeBSD and NetBSD to figure out
-# what the right answer is (although using ">4095", FreeBSD-style, is
-# probably better than separately checking for "=4096" and ">4096",
-# NetBSD-style).  (The old "netbsd" file analyzed FreeBSD demand paged
-# executables using the NetBSD technique.)
-#
-0	lelong&0377777777	041400407	FreeBSD/i386
->20	lelong			<4096
->>3	byte&0xC0		&0x80		shared library
->>3	byte&0xC0		0x40		PIC object
->>3	byte&0xC0		0x00		object
->20	lelong			>4095
->>3	byte&0x80		0x80		dynamically linked executable
->>3	byte&0x80		0x00		executable
->16	lelong			>0		not stripped
-
-0	lelong&0377777777	041400410	FreeBSD/i386 pure
->20	lelong			<4096
->>3	byte&0xC0		&0x80		shared library
->>3	byte&0xC0		0x40		PIC object
->>3	byte&0xC0		0x00		object
->20	lelong			>4095
->>3	byte&0x80		0x80		dynamically linked executable
->>3	byte&0x80		0x00		executable
->16	lelong			>0		not stripped
-
-0	lelong&0377777777	041400413	FreeBSD/i386 demand paged
->20	lelong			<4096
->>3	byte&0xC0		&0x80		shared library
->>3	byte&0xC0		0x40		PIC object
->>3	byte&0xC0		0x00		object
->20	lelong			>4095
->>3	byte&0x80		0x80		dynamically linked executable
->>3	byte&0x80		0x00		executable
->16	lelong			>0		not stripped
-
-0	lelong&0377777777	041400314	FreeBSD/i386 compact demand paged
->20	lelong			<4096
->>3	byte&0xC0		&0x80		shared library
->>3	byte&0xC0		0x40		PIC object
->>3	byte&0xC0		0x00		object
->20	lelong			>4095
->>3	byte&0x80		0x80		dynamically linked executable
->>3	byte&0x80		0x00		executable
->16	lelong			>0		not stripped
-
-# XXX gross hack to identify core files
-# cores start with a struct tss; we take advantage of the following:
-# byte 7:     highest byte of the kernel stack pointer, always 0xfe
-#      8/9:   kernel (ring 0) ss value, always 0x0010
-#      10 - 27: ring 1 and 2 ss/esp, unused, thus always 0
-#      28:    low order byte of the current PTD entry, always 0 since the
-#             PTD is page-aligned
-#
-7	string	\357\020\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0	FreeBSD/i386 a.out core file
->1039	string	>\0	from '%s'
-
-# /var/run/ld.so.hints
-# What are you laughing about?
-0	lelong			011421044151	ld.so hints file (Little Endian
->4	lelong			>0		\b, version %d)
->4	belong			<=0		\b)
-0	belong			011421044151	ld.so hints file (Big Endian
->4	belong			>0		\b, version %d)
->4	belong			<=0		\b)
-
-#
-# Files generated by FreeBSD scrshot(1)/vidcontrol(1) utilities
-#
-0	string	SCRSHOT_	scrshot(1) screenshot,
->8	byte	x		version %d,
->9	byte	2		%d bytes in header,
->>10	byte	x		%d chars wide by
->>11	byte	x		%d chars high
-
-#------------------------------------------------------------------------------
-# fsav:  file(1) magic for datafellows fsav virus definition files
-# Anthon van der Neut (anthon at mnt.org)
-0	beshort		0x1575		fsav (linux) macro virus
->8	leshort		>0		(%d-
->11	byte		>0		\b%02d-
->10	byte		>0		\b%02d)
-
-# comment this out for now because it regognizes every file where
-# the eighth character is \n
-#8	byte		0x0a
-#>12	byte		0x07
-#>11	leshort		>0		fsav (linux) virus (%d-
-#>10	byte		0		\b01-
-#>10	byte		1		\b02-
-#>10	byte		2		\b03-
-#>10	byte		3		\b04-
-#>10	byte		4		\b05-
-#>10	byte		5		\b06-
-#>10	byte		6		\b07-
-#>10	byte		7		\b08-
-#>10	byte		8		\b08-
-#>10	byte		9		\b10-
-#>10	byte		10		\b11-
-#>10	byte		11		\b12-
-#>9	byte		>0		\b%02d)
-#------------------------------------------------------------------------------
-# games:  file(1) for games
-
-# Thomas M. Ott (ThMO)
-1	string	=WAD		DOOM data,
->0	string	=I		main wad
->0	string	=P		patch wad
->0	byte	x		unknown junk
-
-# Fabio Bonelli <fabiobonelli at libero.it>
-# Quake II - III data files
-0       string  IDP2        	Quake II 3D Model file,
->20     long    x               %lu skin(s),
->8      long    x               (%lu x
->12     long    x 		%lu),
->40     long    x               %lu frame(s),
->16     long    x               Frame size %lu bytes,
->24     long  	x               %lu vertices/frame,
->28     long    x            	%lu texture coordinates,
->32     long    x               %lu triangles/frame
-
-0       string  IBSP            Quake
->4      long    0x26            II Map file (BSP)
->4      long    0x2E      	III Map file (BSP)
-
-0       string  IDS2            Quake II SP2 sprite file
-
-#---------------------------------------------------------------------------
-# Doom and Quake
-# submitted by Nicolas Patrois
-
-# DOOM
-
-0       string  IWAD    DOOM or DOOM ][ world
-0       string  PWAD    DOOM or DOOM ][ extension world
-
-0       string  \xcb\x1dBoom\xe6\xff\x03\x01    Boom or linuxdoom demo
-# some doom lmp files don't match, I've got one beginning with \x6d\x02\x01\x01
-
-24      string  LxD\ 203        Linuxdoom save
->0      string  x       , name=%s
->44     string  x       , world=%s
-
-# Quake
-
-0       string  PACK    Quake I or II world or extension
-
-#0       string  -1\x0a  Quake I demo
-#>30     string  x        version %.4s
-#>61     string  x        level %s       
-
-#0       string  5\x0a   Quake I save
-
-# The levels
-
-# Quake 1
-
-0	string	5\x0aIntroduction             Quake I save: start Introduction
-0	string	5\x0athe_Slipgate_Complex     Quake I save: e1m1 The slipgate complex
-0	string	5\x0aCastle_of_the_Damned     Quake I save: e1m2 Castle of the damned
-0	string	5\x0athe_Necropolis           Quake I save: e1m3 The necropolis
-0	string	5\x0athe_Grisly_Grotto        Quake I save: e1m4 The grisly grotto
-0	string	5\x0aZiggurat_Vertigo         Quake I save: e1m8 Ziggurat vertigo (secret)
-0	string	5\x0aGloom_Keep               Quake I save: e1m5 Gloom keep
-0	string	5\x0aThe_Door_To_Chthon       Quake I save: e1m6 The door to Chthon
-0	string	5\x0aThe_House_of_Chthon      Quake I save: e1m7 The house of Chthon
-0	string	5\x0athe_Installation         Quake I save: e2m1 The installation
-0	string	5\x0athe_Ogre_Citadel         Quake I save: e2m2 The ogre citadel
-0	string	5\x0athe_Crypt_of_Decay       Quake I save: e2m3 The crypt of decay (dopefish lives!)
-0	string	5\x0aUnderearth               Quake I save: e2m7 Underearth (secret)
-0	string	5\x0athe_Ebon_Fortress        Quake I save: e2m4 The ebon fortress
-0	string	5\x0athe_Wizard's_Manse       Quake I save: e2m5 The wizard's manse
-0	string	5\x0athe_Dismal_Oubliette     Quake I save: e2m6 The dismal oubliette
-0	string	5\x0aTermination_Central      Quake I save: e3m1 Termination central
-0	string	5\x0aVaults_of_Zin            Quake I save: e3m2 Vaults of Zin
-0	string	5\x0athe_Tomb_of_Terror       Quake I save: e3m3 The tomb of terror
-0	string	5\x0aSatan's_Dark_Delight     Quake I save: e3m4 Satan's dark delight
-0	string	5\x0athe_Haunted_Halls        Quake I save: e3m7 The haunted halls (secret)
-0	string	5\x0aWind_Tunnels             Quake I save: e3m5 Wind tunnels
-0	string	5\x0aChambers_of_Torment      Quake I save: e3m6 Chambers of torment
-0	string	5\x0athe_Sewage_System        Quake I save: e4m1 The sewage system
-0	string	5\x0aThe_Tower_of_Despair     Quake I save: e4m2 The tower of despair
-0	string	5\x0aThe_Elder_God_Shrine     Quake I save: e4m3 The elder god shrine
-0	string	5\x0athe_Palace_of_Hate       Quake I save: e4m4 The palace of hate
-0	string	5\x0aHell's_Atrium            Quake I save: e4m5 Hell's atrium
-0	string	5\x0athe_Nameless_City        Quake I save: e4m8 The nameless city (secret)
-0	string	5\x0aThe_Pain_Maze            Quake I save: e4m6 The pain maze
-0	string	5\x0aAzure_Agony              Quake I save: e4m7 Azure agony
-0	string	5\x0aShub-Niggurath's_Pit     Quake I save: end Shub-Niggurath's pit
-
-# Quake DeathMatch levels
-
-0	string	5\x0aPlace_of_Two_Deaths	 Quake I save: dm1 Place of two deaths
-0	string	5\x0aClaustrophobopolis		 Quake I save: dm2 Claustrophobopolis
-0	string	5\x0aThe_Abandoned_Base		 Quake I save: dm3 The abandoned base
-0	string	5\x0aThe_Bad_Place		 Quake I save: dm4 The bad place
-0	string	5\x0aThe_Cistern		 Quake I save: dm5 The cistern
-0	string	5\x0aThe_Dark_Zone		 Quake I save: dm6 The dark zone
-
-# Scourge of Armagon
-
-0	string	5\x0aCommand_HQ               Quake I save: start Command HQ
-0	string	5\x0aThe_Pumping_Station      Quake I save: hip1m1 The pumping station
-0	string	5\x0aStorage_Facility         Quake I save: hip1m2 Storage facility
-0	string	5\x0aMilitary_Complex         Quake I save: hip1m5 Military complex (secret)
-0	string	5\x0athe_Lost_Mine            Quake I save: hip1m3 The lost mine
-0	string	5\x0aResearch_Facility        Quake I save: hip1m4 Research facility
-0	string	5\x0aAncient_Realms           Quake I save: hip2m1 Ancient realms
-0	string	5\x0aThe_Gremlin's_Domain     Quake I save: hip2m6 The gremlin's domain (secret)
-0	string	5\x0aThe_Black_Cathedral      Quake I save: hip2m2 The black cathedral
-0	string	5\x0aThe_Catacombs            Quake I save: hip2m3 The catacombs
-0	string	5\x0athe_Crypt__              Quake I save: hip2m4 The crypt
-0	string	5\x0aMortum's_Keep            Quake I save: hip2m5 Mortum's keep
-0	string	5\x0aTur_Torment              Quake I save: hip3m1 Tur torment
-0	string	5\x0aPandemonium              Quake I save: hip3m2 Pandemonium
-0	string	5\x0aLimbo                    Quake I save: hip3m3 Limbo
-0	string	5\x0athe_Edge_of_Oblivion     Quake I save: hipdm1 The edge of oblivion (secret)
-0	string	5\x0aThe_Gauntlet             Quake I save: hip3m4 The gauntlet
-0	string	5\x0aArmagon's_Lair           Quake I save: hipend Armagon's lair
-
-# Malice
-
-0	string	5\x0aThe_Academy      Quake I save: start The academy
-0	string	5\x0aThe_Lab          Quake I save: d1 The lab
-0	string	5\x0aArea_33          Quake I save: d1b Area 33
-0	string	5\x0aSECRET_MISSIONS  Quake I save: d3b Secret missions
-0	string	5\x0aThe_Hospital     Quake I save: d10 The hospital (secret)
-0	string	5\x0aThe_Genetics_Lab Quake I save: d11 The genetics lab (secret)
-0	string	5\x0aBACK_2_MALICE    Quake I save: d4b Back to Malice
-0	string	5\x0aArea44           Quake I save: d1c Area 44
-0	string	5\x0aTakahiro_Towers  Quake I save: d2 Takahiro towers
-0	string	5\x0aA_Rat's_Life     Quake I save: d3 A rat's life
-0	string	5\x0aInto_The_Flood   Quake I save: d4 Into the flood
-0	string	5\x0aThe_Flood        Quake I save: d5 The flood
-0	string	5\x0aNuclear_Plant    Quake I save: d6 Nuclear plant
-0	string	5\x0aThe_Incinerator_Plant    Quake I save: d7 The incinerator plant
-0	string	5\x0aThe_Foundry              Quake I save: d7b The foundry
-0	string	5\x0aThe_Underwater_Base      Quake I save: d8 The underwater base
-0	string	5\x0aTakahiro_Base            Quake I save: d9 Takahiro base
-0	string	5\x0aTakahiro_Laboratories    Quake I save: d12 Takahiro laboratories
-0	string	5\x0aStayin'_Alive    Quake I save: d13 Stayin' alive
-0	string	5\x0aB.O.S.S._HQ      Quake I save: d14 B.O.S.S. HQ
-0	string	5\x0aSHOWDOWN!        Quake I save: d15 Showdown!
-
-# Malice DeathMatch levels
-
-0	string	5\x0aThe_Seventh_Precinct	 Quake I save: ddm1 The seventh precinct
-0	string	5\x0aSub_Station		 Quake I save: ddm2 Sub station
-0	string	5\x0aCrazy_Eights!		 Quake I save: ddm3 Crazy eights!
-0	string	5\x0aEast_Side_Invertationa	 Quake I save: ddm4 East side invertationa
-0	string	5\x0aSlaughterhouse		 Quake I save: ddm5 Slaughterhouse
-0	string	5\x0aDOMINO			 Quake I save: ddm6 Domino
-0	string	5\x0aSANDRA'S_LADDER		 Quake I save: ddm7 Sandra's ladder
-
-
-0	string	MComprHD	MAME CHD compressed hard disk image,
->12	belong	x		version %lu
-
-#------------------------------------------------------------------------------
-# GEOS files (Vidar Madsen, vidar at gimp.org)
-# semi-commonly used in embedded and handheld systems.
-0	belong	0xc745c153	GEOS
->40	byte	1	executable
->40	byte	2	VMFile
->40	byte	3	binary
->40	byte	4	directory label
->40	byte	<1	unknown
->40	byte	>4	unknown
->4	string	>\0	\b, name "%s"
-#>44	short	x	\b, version %d
-#>46	short	x	\b.%d
-#>48	short	x	\b, rev %d
-#>50	short	x	\b.%d
-#>52	short	x	\b, proto %d
-#>54	short	x	\br%d
-#>168	string	>\0	\b, copyright "%s"
-
-#------------------------------------------------------------------------------
-# gcc:  file(1) magic for GCC special files
-#
-0	string		gpch		GCC precompiled header
-
-# The version field is annoying.  It's 3 characters, not zero-terminated.
->5	byte		x			(version %c
->6	byte		x			\b%c
->7	byte		x			\b%c)
-
-# 67 = 'C', 111 = 'o', 43 = '+', 79 = 'O'
->4	byte		67			for C
->4	byte		111			for Objective C
->4	byte		43			for C++
->4	byte		79			for Objective C++
-#------------------------------------------------------------------------------
-# GIMP Gradient: file(1) magic for the GIMP's gradient data files
-# by Federico Mena <federico at nuclecu.unam.mx>
-
-0       string          GIMP\ Gradient  GIMP gradient data
-
-#------------------------------------------------------------------------------
-# XCF:  file(1) magic for the XCF image format used in the GIMP developed
-#       by Spencer Kimball and Peter Mattis
-#       ('Bucky' LaDieu, nega at vt.edu)
-
-0	string		gimp\ xcf	GIMP XCF image data,
->9	string		file		version 0,
->9	string		v		version
->>10	string		>\0		%s,
->14	belong		x		%lu x
->18	belong		x		%lu,
->22     belong          0               RGB Color
->22     belong          1               Greyscale
->22     belong          2               Indexed Color
->22	belong		>2		Unknown Image Type.
-
-#------------------------------------------------------------------------------
-# XCF:  file(1) magic for the patterns used in the GIMP, developed
-#       by Spencer Kimball and Peter Mattis
-#       ('Bucky' LaDieu, nega at vt.edu)
-
-20      string          GPAT            GIMP pattern data,
->24     string          x               %s
-
-#------------------------------------------------------------------------------
-# XCF:  file(1) magic for the brushes used in the GIMP, developed
-#       by Spencer Kimball and Peter Mattis
-#       ('Bucky' LaDieu, nega at vt.edu)
-
-20      string          GIMP            GIMP brush data
-#
-# GNU nlsutils message catalog file format
-#
-0	string		\336\22\4\225	GNU message catalog (little endian),
->4	lelong		x		revision %d,
->8	lelong		x		%d messages
-0	string		\225\4\22\336	GNU message catalog (big endian),
->4	belong		x		revision %d,
->8	belong		x		%d messages
-# message catalogs, from Mitchum DSouza <m.dsouza at mrc-apu.cam.ac.uk>
-0	string		*nazgul*	Nazgul style compiled message catalog
->8	lelong		>0		\b, version %ld
-# GnuPG
-# The format is very similar to pgp
-0	string          \001gpg                 GPG key trust database
->4	byte            x                       version %d
-0       beshort         0x9901                  GPG key public ring
-# This magic is not particularly good, as the keyrings don't have true
-# magic. Nevertheless, it covers many keyrings.
-
-# Gnumeric spreadsheet
-# This entry is only semi-helpful, as Gnumeric compresses its files, so
-# they will ordinarily reported as "compressed", but at least -z helps
-39      string          =<gmr:Workbook           Gnumeric spreadsheet
-
-#------------------------------------------------------------------------------
-# gcc:  file(1) magic for GCC special files
-#
-0       string          gpch            GCC precompiled header
-
-# The version field is annoying.  It's 3 characters, not zero-terminated.
->5      byte            x                       (version %c
->6      byte            x                       \b%c
->7      byte            x                       \b%c)
-
-# 67 = 'C', 111 = 'o', 43 = '+', 79 = 'O'
->4      byte            67                      for C
->4      byte            111                     for Objective C
->4      byte            43                      for C++
->4      byte            79                      for Objective C++
-
-
-
-#------------------------------------------------------------------------------
-# ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
-#
-# ACE/gr binary
-0	string	\000\000\0001\000\000\0000\000\000\0000\000\000\0002\000\000\0000\000\000\0000\000\000\0003		old ACE/gr binary file
->39	byte	>0			- version %c
-# ACE/gr ascii
-0	string	#\ xvgr\ parameter\ file	ACE/gr ascii file
-0	string	#\ xmgr\ parameter\ file	ACE/gr ascii file
-0	string	#\ ACE/gr\ parameter\ file	ACE/gr ascii file
-# Grace projects
-0	string	#\ Grace\ project\ file		Grace project file
->23	string	@version\  			(version
->>32	byte	>0 				%c
->>33	string	>\0 				\b.%.2s
->>35	string	>\0 				\b.%.2s)
-# ACE/gr fit description files
-0	string	#\ ACE/gr\ fit\ description\ 	ACE/gr fit description file
-# end of ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
-
-#------------------------------------------------------------------------------
-# gringotts:  file(1) magic for Gringotts
-# http://devel.pluto.linux.it/projects/Gringotts/
-# author: Germano Rizzo <mano at pluto.linux.it>
-#GRG3????Y
-0	string	GRG		Gringotts data file
-#file format 1
->3	string		1		v.1, MCRYPT S2K, SERPENT crypt, SHA-256 hash, ZLib lvl.9
-#file format 2
->3	string		2		v.2, MCRYPT S2K, 
->>8	byte&0x70	0x00		RIJNDAEL-128 crypt,
->>8	byte&0x70	0x10		SERPENT crypt,
->>8	byte&0x70	0x20		TWOFISH crypt, 
->>8	byte&0x70	0x30		CAST-256 crypt,
->>8	byte&0x70	0x40		SAFER+ crypt,
->>8	byte&0x70	0x50		LOKI97 crypt,
->>8	byte&0x70	0x60		3DES crypt,
->>8	byte&0x70	0x70		RIJNDAEL-256 crypt,
->>8	byte&0x08	0x00		SHA1 hash,
->>8	byte&0x08	0x08		RIPEMD-160 hash,
->>8	byte&0x04	0x00		ZLib
->>8	byte&0x04	0x04		BZip2
->>8	byte&0x03	0x00		lvl.0
->>8	byte&0x03	0x01		lvl.3
->>8	byte&0x03	0x02		lvl.6
->>8	byte&0x03	0x03		lvl.9
-#file format 3
->3	string		3		v.3, OpenPGP S2K, 
->>8	byte&0x70	0x00		RIJNDAEL-128 crypt,
->>8	byte&0x70	0x10		SERPENT crypt,
->>8	byte&0x70	0x20		TWOFISH crypt, 
->>8	byte&0x70	0x30		CAST-256 crypt,
->>8	byte&0x70	0x40		SAFER+ crypt,
->>8	byte&0x70	0x50		LOKI97 crypt,
->>8	byte&0x70	0x60		3DES crypt,
->>8	byte&0x70	0x70		RIJNDAEL-256 crypt,
->>8	byte&0x08	0x00		SHA1 hash,
->>8	byte&0x08	0x08		RIPEMD-160 hash,
->>8	byte&0x04	0x00		ZLib
->>8	byte&0x04	0x04		BZip2
->>8	byte&0x03	0x00		lvl.0
->>8	byte&0x03	0x01		lvl.3
->>8	byte&0x03	0x02		lvl.6
->>8	byte&0x03	0x03		lvl.9
-#file format >3
->3	string		>3		v.%.1s (unknown details)
-
-#------------------------------------------------------------------------------
-# Hierarchical Data Format, used to facilitate scientific data exchange
-# specifications at http://hdf.ncsa.uiuc.edu/
-
-0	belong		0x0e031301	Hierarchical Data Format (version 4) data
-0	string		\211HDF\r\n\032	Hierarchical Data Format (version 5) data
-
-#------------------------------------------------------------------------------
-# hitach-sh: file(1) magic for Hitachi Super-H
-#
-# Super-H COFF
-#
-0	beshort		0x0500		Hitachi SH big-endian COFF
->18	beshort&0x0002	=0x0000		object
->18	beshort&0x0002	=0x0002		executable
->18	beshort&0x0008	=0x0008		\b, stripped
->18	beshort&0x0008	=0x0000		\b, not stripped
-#
-0	leshort		0x0550		Hitachi SH little-endian COFF
->18	leshort&0x0002	=0x0000		object
->18	leshort&0x0002	=0x0002		executable
->18	leshort&0x0008	=0x0008		\b, stripped
->18	leshort&0x0008	=0x0000		\b, not stripped
-
-
-#------------------------------------------------------------------------------
-# hp:  file(1) magic for Hewlett Packard machines (see also "printer")
-#
-# XXX - somebody should figure out whether any byte order needs to be
-# applied to the "TML" stuff; I'm assuming the Apollo stuff is
-# big-endian as it was mostly 68K-based.
-#
-# I think the 500 series was the old stack-based machines, running a
-# UNIX environment atop the "SUN kernel"; dunno whether it was
-# big-endian or little-endian.
-#
-# Daniel Quinlan (quinlan at yggdrasil.com): hp200 machines are 68010 based;
-# hp300 are 68020+68881 based; hp400 are also 68k.  The following basic
-# HP magic is useful for reference, but using "long" magic is a better
-# practice in order to avoid collisions.
-#
-# Guy Harris (guy at netapp.com): some additions to this list came from
-# HP-UX 10.0's "/usr/include/sys/unistd.h" (68030, 68040, PA-RISC 1.1,
-# 1.2, and 2.0).  The 1.2 and 2.0 stuff isn't in the HP-UX 10.0
-# "/etc/magic", though, except for the "archive file relocatable library"
-# stuff, and the 68030 and 68040 stuff isn't there at all - are they not
-# used in executables, or have they just not yet updated "/etc/magic"
-# completely?
-#
-# 0	beshort		200		hp200 (68010) BSD binary
-# 0	beshort		300		hp300 (68020+68881) BSD binary
-# 0	beshort		0x20c		hp200/300 HP-UX binary
-# 0	beshort		0x20d		hp400 (68030) HP-UX binary
-# 0	beshort		0x20e		hp400 (68040?) HP-UX binary
-# 0	beshort		0x20b		PA-RISC1.0 HP-UX binary
-# 0	beshort		0x210		PA-RISC1.1 HP-UX binary
-# 0	beshort		0x211		PA-RISC1.2 HP-UX binary
-# 0	beshort		0x214		PA-RISC2.0 HP-UX binary
-
-#
-# The "misc" stuff needs a byte order; the archives look suspiciously
-# like the old 177545 archives (0xff65 = 0177545).
-#
-#### Old Apollo stuff
-0	beshort		0627		Apollo m68k COFF executable
->18	beshort		^040000		not stripped
->22	beshort		>0		- version %ld
-0	beshort		0624		apollo a88k COFF executable
->18	beshort		^040000		not stripped
->22	beshort		>0		- version %ld
-0       long            01203604016     TML 0123 byte-order format
-0       long            01702407010     TML 1032 byte-order format
-0       long            01003405017     TML 2301 byte-order format
-0       long            01602007412     TML 3210 byte-order format
-#### PA-RISC 1.1
-0	belong 		0x02100106	PA-RISC1.1 relocatable object
-0	belong 		0x02100107	PA-RISC1.1 executable
->168	belong		&0x00000004	dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0	belong 		0x02100108	PA-RISC1.1 shared executable
->168	belong&0x4	0x4		dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0	belong 		0x0210010b	PA-RISC1.1 demand-load executable
->168	belong&0x4	0x4		dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0	belong 		0x0210010e	PA-RISC1.1 shared library
->96	belong		>0		- not stripped
-
-0	belong 		0x0210010d	PA-RISC1.1 dynamic load library
->96	belong		>0		- not stripped
-
-#### PA-RISC 2.0
-0	belong		0x02140106	PA-RISC2.0 relocatable object
-
-0       belong		0x02140107	PA-RISC2.0 executable
->168	belong		&0x00000004	dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0       belong		0x02140108	PA-RISC2.0 shared executable
->168	belong		&0x00000004	dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0       belong		0x0214010b	PA-RISC2.0 demand-load executable
->168	belong		&0x00000004	dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0       belong		0x0214010e	PA-RISC2.0 shared library
->96	belong		>0		- not stripped
-
-0       belong		0x0214010d	PA-RISC2.0 dynamic load library
->96	belong		>0		- not stripped
-
-#### 800
-0	belong 		0x020b0106	PA-RISC1.0 relocatable object
-
-0	belong 		0x020b0107	PA-RISC1.0 executable
->168	belong&0x4	0x4		dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0	belong 		0x020b0108	PA-RISC1.0 shared executable
->168	belong&0x4	0x4		dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0	belong 		0x020b010b	PA-RISC1.0 demand-load executable
->168	belong&0x4	0x4		dynamically linked
->(144)	belong		0x054ef630	dynamically linked
->96	belong		>0		- not stripped
-
-0	belong 		0x020b010e	PA-RISC1.0 shared library
->96	belong		>0		- not stripped
-
-0	belong 		0x020b010d	PA-RISC1.0 dynamic load library
->96	belong		>0		- not stripped
-
-0	belong		0x213c6172	archive file
->68	belong 		0x020b0619	- PA-RISC1.0 relocatable library
->68	belong	 	0x02100619	- PA-RISC1.1 relocatable library
->68	belong 		0x02110619	- PA-RISC1.2 relocatable library
->68	belong 		0x02140619	- PA-RISC2.0 relocatable library
-
-#### 500
-0	long		0x02080106	HP s500 relocatable executable
->16	long		>0		- version %ld
-
-0	long		0x02080107	HP s500 executable
->16	long		>0		- version %ld
-
-0	long		0x02080108	HP s500 pure executable
->16	long		>0		- version %ld
-
-#### 200
-0	belong 		0x020c0108	HP s200 pure executable
->4	beshort		>0		- version %ld
->8	belong		&0x80000000	save fp regs
->8	belong		&0x40000000	dynamically linked
->8	belong		&0x20000000	debuggable
->36	belong		>0		not stripped
-
-0	belong		0x020c0107	HP s200 executable
->4	beshort		>0		- version %ld
->8	belong		&0x80000000	save fp regs
->8	belong		&0x40000000	dynamically linked
->8	belong		&0x20000000	debuggable
->36	belong		>0		not stripped
-
-0	belong		0x020c010b	HP s200 demand-load executable
->4	beshort		>0		- version %ld
->8	belong		&0x80000000	save fp regs
->8	belong		&0x40000000	dynamically linked
->8	belong		&0x20000000	debuggable
->36	belong		>0		not stripped
-
-0	belong		0x020c0106	HP s200 relocatable executable
->4	beshort		>0		- version %ld
->6	beshort		>0		- highwater %d
->8	belong		&0x80000000	save fp regs
->8	belong		&0x20000000	debuggable
->8	belong		&0x10000000	PIC
-
-0	belong 		0x020a0108	HP s200 (2.x release) pure executable
->4	beshort		>0		- version %ld
->36	belong		>0		not stripped
-
-0	belong		0x020a0107	HP s200 (2.x release) executable
->4	beshort		>0		- version %ld
->36	belong		>0		not stripped
-
-0	belong		0x020c010e	HP s200 shared library
->4	beshort		>0		- version %ld
->6	beshort		>0		- highwater %d
->36	belong		>0		not stripped
-
-0	belong		0x020c010d	HP s200 dynamic load library
->4	beshort		>0		- version %ld
->6	beshort		>0		- highwater %d
->36	belong		>0		not stripped
-
-#### MISC
-0	long		0x0000ff65	HP old archive
-0	long		0x020aff65	HP s200 old archive
-0	long		0x020cff65	HP s200 old archive
-0	long		0x0208ff65	HP s500 old archive
-
-0	long		0x015821a6	HP core file
-
-0	long		0x4da7eee8	HP-WINDOWS font
->8	byte		>0		- version %ld
-0	string		Bitmapfile	HP Bitmapfile
-
-0	string		IMGfile	CIS 	compimg HP Bitmapfile
-# XXX - see "lif"
-#0	short		0x8000		lif file
-0	long		0x020c010c	compiled Lisp
-
-0	string		msgcat01	HP NLS message catalog,
->8	long		>0		%d messages
-
-# addendum to /etc/magic with HP-48sx file-types by phk at data.fls.dk 1jan92
-0	string		HPHP48-		HP48 binary
->7	byte		>0		- Rev %c
->8	beshort		0x1129		(ADR)
->8	beshort		0x3329		(REAL)
->8	beshort		0x5529		(LREAL)
->8	beshort		0x7729		(COMPLX)
->8	beshort		0x9d29		(LCOMPLX)
->8	beshort		0xbf29		(CHAR)
->8	beshort		0xe829		(ARRAY)
->8	beshort		0x0a2a		(LNKARRAY)
->8	beshort		0x2c2a		(STRING)
->8	beshort		0x4e2a		(HXS)
->8	beshort		0x742a		(LIST)
->8	beshort		0x962a		(DIR)
->8	beshort		0xb82a		(ALG)
->8	beshort		0xda2a		(UNIT)
->8	beshort		0xfc2a		(TAGGED)
->8	beshort		0x1e2b		(GROB)
->8	beshort		0x402b		(LIB)
->8	beshort		0x622b		(BACKUP)
->8	beshort		0x882b		(LIBDATA)
->8	beshort		0x9d2d		(PROG)
->8	beshort		0xcc2d		(CODE)
->8	beshort		0x482e		(GNAME)
->8	beshort		0x6d2e		(LNAME)
->8	beshort		0x922e		(XLIB)
-0	string		%%HP:		HP48 text
->6	string		T(0)		- T(0)
->6	string		T(1)		- T(1)
->6	string		T(2)		- T(2)
->6	string		T(3)		- T(3)
->10	string		A(D)		A(D)
->10	string		A(R)		A(R)
->10	string		A(G)		A(G)
->14	string		F(.)		F(.);
->14	string		F(,)		F(,);
-
-# hpBSD magic numbers
-0	beshort		200		hp200 (68010) BSD
->2	beshort		0407		impure binary
->2	beshort		0410		read-only binary
->2	beshort		0413		demand paged binary
-0	beshort		300		hp300 (68020+68881) BSD
->2	beshort		0407		impure binary
->2	beshort		0410		read-only binary
->2	beshort		0413		demand paged binary
-#
-# From David Gero <dgero at nortelnetworks.com>
-# HP-UX 10.20 core file format from /usr/include/sys/core.h
-# Unfortunately, HP-UX uses corehead blocks without specifying the order
-# There are four we care about:
-#     CORE_KERNEL, which starts with the string "HP-UX"
-#     CORE_EXEC, which contains the name of the command
-#     CORE_PROC, which contains the signal number that caused the core dump
-#     CORE_FORMAT, which contains the version of the core file format (== 1)
-# The only observed order in real core files is KERNEL, EXEC, FORMAT, PROC
-# but we include all 6 variations of the order of the first 3, and
-# assume that PROC will always be last
-# Order 1: KERNEL, EXEC, FORMAT, PROC
-0x10		string	HP-UX
->0		belong	2
->>0xC		belong	0x3C
->>>0x4C		belong	0x100
->>>>0x58	belong	0x44
->>>>>0xA0	belong	1
->>>>>>0xAC	belong	4
->>>>>>>0xB0	belong	1
->>>>>>>>0xB4	belong	4		core file
->>>>>>>>>0x90	string	>\0		from '%s'
->>>>>>>>>0xC4	belong	3		- received SIGQUIT
->>>>>>>>>0xC4	belong	4		- received SIGILL
->>>>>>>>>0xC4	belong	5		- received SIGTRAP
->>>>>>>>>0xC4	belong	6		- received SIGABRT
->>>>>>>>>0xC4	belong	7		- received SIGEMT
->>>>>>>>>0xC4	belong	8		- received SIGFPE
->>>>>>>>>0xC4	belong	10		- received SIGBUS
->>>>>>>>>0xC4	belong	11		- received SIGSEGV
->>>>>>>>>0xC4	belong	12		- received SIGSYS
->>>>>>>>>0xC4	belong	33		- received SIGXCPU
->>>>>>>>>0xC4	belong	34		- received SIGXFSZ
-# Order 2: KERNEL, FORMAT, EXEC, PROC
->>>0x4C		belong	1
->>>>0x58	belong	4
->>>>>0x5C	belong	1
->>>>>>0x60	belong	0x100
->>>>>>>0x6C	belong	0x44
->>>>>>>>0xB4	belong	4		core file
->>>>>>>>>0xA4	string	>\0		from '%s'
->>>>>>>>>0xC4	belong	3		- received SIGQUIT
->>>>>>>>>0xC4	belong	4		- received SIGILL
->>>>>>>>>0xC4	belong	5		- received SIGTRAP
->>>>>>>>>0xC4	belong	6		- received SIGABRT
->>>>>>>>>0xC4	belong	7		- received SIGEMT
->>>>>>>>>0xC4	belong	8		- received SIGFPE
->>>>>>>>>0xC4	belong	10		- received SIGBUS
->>>>>>>>>0xC4	belong	11		- received SIGSEGV
->>>>>>>>>0xC4	belong	12		- received SIGSYS
->>>>>>>>>0xC4	belong	33		- received SIGXCPU
->>>>>>>>>0xC4	belong	34		- received SIGXFSZ
-# Order 3: FORMAT, KERNEL, EXEC, PROC
-0x24		string	HP-UX
->0		belong	1
->>0xC		belong	4
->>>0x10		belong	1
->>>>0x14	belong	2
->>>>>0x20	belong	0x3C
->>>>>>0x60	belong	0x100
->>>>>>>0x6C	belong	0x44
->>>>>>>>0xB4	belong	4		core file
->>>>>>>>>0xA4	string	>\0		from '%s'
->>>>>>>>>0xC4	belong	3		- received SIGQUIT
->>>>>>>>>0xC4	belong	4		- received SIGILL
->>>>>>>>>0xC4	belong	5		- received SIGTRAP
->>>>>>>>>0xC4	belong	6		- received SIGABRT
->>>>>>>>>0xC4	belong	7		- received SIGEMT
->>>>>>>>>0xC4	belong	8		- received SIGFPE
->>>>>>>>>0xC4	belong	10		- received SIGBUS
->>>>>>>>>0xC4	belong	11		- received SIGSEGV
->>>>>>>>>0xC4	belong	12		- received SIGSYS
->>>>>>>>>0xC4	belong	33		- received SIGXCPU
->>>>>>>>>0xC4	belong	34		- received SIGXFSZ
-# Order 4: EXEC, KERNEL, FORMAT, PROC
-0x64		string	HP-UX
->0		belong	0x100
->>0xC		belong	0x44
->>>0x54		belong	2
->>>>0x60	belong	0x3C
->>>>>0xA0	belong	1
->>>>>>0xAC	belong	4
->>>>>>>0xB0	belong	1
->>>>>>>>0xB4	belong	4		core file
->>>>>>>>>0x44	string	>\0		from '%s'
->>>>>>>>>0xC4	belong	3		- received SIGQUIT
->>>>>>>>>0xC4	belong	4		- received SIGILL
->>>>>>>>>0xC4	belong	5		- received SIGTRAP
->>>>>>>>>0xC4	belong	6		- received SIGABRT
->>>>>>>>>0xC4	belong	7		- received SIGEMT
->>>>>>>>>0xC4	belong	8		- received SIGFPE
->>>>>>>>>0xC4	belong	10		- received SIGBUS
->>>>>>>>>0xC4	belong	11		- received SIGSEGV
->>>>>>>>>0xC4	belong	12		- received SIGSYS
->>>>>>>>>0xC4	belong	33		- received SIGXCPU
->>>>>>>>>0xC4	belong	34		- received SIGXFSZ
-# Order 5: FORMAT, EXEC, KERNEL, PROC
-0x78		string	HP-UX
->0		belong	1
->>0xC		belong	4
->>>0x10		belong	1
->>>>0x14	belong	0x100
->>>>>0x20	belong	0x44
->>>>>>0x68	belong	2
->>>>>>>0x74	belong	0x3C
->>>>>>>>0xB4	belong	4		core file
->>>>>>>>>0x58	string	>\0		from '%s'
->>>>>>>>>0xC4	belong	3		- received SIGQUIT
->>>>>>>>>0xC4	belong	4		- received SIGILL
->>>>>>>>>0xC4	belong	5		- received SIGTRAP
->>>>>>>>>0xC4	belong	6		- received SIGABRT
->>>>>>>>>0xC4	belong	7		- received SIGEMT
->>>>>>>>>0xC4	belong	8		- received SIGFPE
->>>>>>>>>0xC4	belong	10		- received SIGBUS
->>>>>>>>>0xC4	belong	11		- received SIGSEGV
->>>>>>>>>0xC4	belong	12		- received SIGSYS
->>>>>>>>>0xC4	belong	33		- received SIGXCPU
->>>>>>>>>0xC4	belong	34		- received SIGXFSZ
-# Order 6: EXEC, FORMAT, KERNEL, PROC
->0		belong	0x100
->>0xC		belong	0x44
->>>0x54		belong	1
->>>>0x60	belong	4
->>>>>0x64	belong	1
->>>>>>0x68	belong	2
->>>>>>>0x74	belong	0x2C
->>>>>>>>0xB4	belong	4		core file
->>>>>>>>>0x44	string	>\0		from '%s'
->>>>>>>>>0xC4	belong	3		- received SIGQUIT
->>>>>>>>>0xC4	belong	4		- received SIGILL
->>>>>>>>>0xC4	belong	5		- received SIGTRAP
->>>>>>>>>0xC4	belong	6		- received SIGABRT
->>>>>>>>>0xC4	belong	7		- received SIGEMT
->>>>>>>>>0xC4	belong	8		- received SIGFPE
->>>>>>>>>0xC4	belong	10		- received SIGBUS
->>>>>>>>>0xC4	belong	11		- received SIGSEGV
->>>>>>>>>0xC4	belong	12		- received SIGSYS
->>>>>>>>>0xC4	belong	33		- received SIGXCPU
->>>>>>>>>0xC4	belong	34		- received SIGXFSZ
-
-# From: AMAKAWA Shuhei <sa264 at cam.ac.uk>
-0	string	HPHP49-			HP49 binary
-
-
-#------------------------------------------------------------------------------
-# human68k:  file(1) magic for Human68k (X680x0 DOS) binary formats
-# Magic too short!
-#0		string	HU		Human68k
-#>68		string	LZX		LZX compressed
-#>>72		string	>\0		(version %s)
-#>(8.L+74)	string	LZX		LZX compressed
-#>>(8.L+78)	string	>\0		(version %s)
-#>60		belong	>0		binded
-#>(8.L+66)	string	#HUPAIR		hupair
-#>0		string	HU		X executable
-#>(8.L+74)	string	#LIBCV1		- linked PD LIBC ver 1
-#>4		belong	>0		- base address 0x%x
-#>28		belong	>0		not stripped
-#>32		belong	>0		with debug information
-#0		beshort	0x601a		Human68k Z executable
-#0		beshort	0x6000		Human68k object file
-#0		belong	0xd1000000	Human68k ar binary archive
-#0		belong	0xd1010000	Human68k ar ascii archive
-#0		beshort	0x0068		Human68k lib archive
-#4		string	LZX		Human68k LZX compressed
-#>8		string	>\0		(version %s)
-#>4		string	LZX		R executable
-#2		string	#HUPAIR		Human68k hupair R executable
-
-#------------------------------------------------------------------------------
-# ibm370:  file(1) magic for IBM 370 and compatibles.
-#
-# "ibm370" said that 0x15d == 0535 was "ibm 370 pure executable".
-# What the heck *is* "USS/370"?
-# AIX 4.1's "/etc/magic" has
-#
-#	0	short		0535		370 sysV executable 
-#	>12	long		>0		not stripped
-#	>22	short		>0		- version %d
-#	>30	long		>0		- 5.2 format
-#	0	short		0530		370 sysV pure executable 
-#	>12	long		>0		not stripped
-#	>22	short		>0		- version %d
-#	>30	long		>0		- 5.2 format
-#
-# instead of the "USS/370" versions of the same magic numbers.
-#
-0	beshort		0537		370 XA sysV executable 
->12	belong		>0		not stripped
->22	beshort		>0		- version %d
->30	belong		>0		- 5.2 format
-0	beshort		0532		370 XA sysV pure executable 
->12	belong		>0		not stripped
->22	beshort		>0		- version %d
->30	belong		>0		- 5.2 format
-0	beshort		054001		370 sysV pure executable
->12	belong		>0		not stripped
-0	beshort		055001		370 XA sysV pure executable
->12	belong		>0		not stripped
-0	beshort		056401		370 sysV executable
->12	belong		>0		not stripped
-0	beshort		057401		370 XA sysV executable
->12	belong		>0		not stripped
-0       beshort		0531		SVR2 executable (Amdahl-UTS)
->12	belong		>0		not stripped
->24     belong		>0		- version %ld
-0	beshort		0534		SVR2 pure executable (Amdahl-UTS)
->12	belong		>0		not stripped
->24	belong		>0		- version %ld
-0	beshort		0530		SVR2 pure executable (USS/370)
->12	belong		>0		not stripped
->24	belong		>0		- version %ld
-0	beshort		0535		SVR2 executable (USS/370)
->12	belong		>0		not stripped
->24	belong		>0		- version %ld
-
-#------------------------------------------------------------------------------
-# ibm6000:  file(1) magic for RS/6000 and the RT PC.
-#
-0	beshort		0x01df		executable (RISC System/6000 V3.1) or obj module
->12	belong		>0		not stripped
-# Breaks sun4 statically linked execs.
-#0      beshort		0x0103		executable (RT Version 2) or obj module
-#>2	byte		0x50		pure
-#>28	belong		>0		not stripped
-#>6	beshort		>0		- version %ld
-0	beshort		0x0104		shared library
-0	beshort		0x0105		ctab data
-0	beshort		0xfe04		structured file
-0	string		0xabcdef	AIX message catalog
-0	belong		0x000001f9	AIX compiled message catalog
-0	string		\<aiaff>	archive
-0	string		\<bigaf>	archive (big format)
-
-
-#------------------------------------------------------------------------------
-# iff:	file(1) magic for Interchange File Format (see also "audio" & "images")
-#
-# Daniel Quinlan (quinlan at yggdrasil.com) -- IFF was designed by Electronic
-# Arts for file interchange.  It has also been used by Apple, SGI, and
-# especially Commodore-Amiga.
-#
-# IFF files begin with an 8 byte FORM header, followed by a 4 character
-# FORM type, which is followed by the first chunk in the FORM.
-
-0	string		FORM		IFF data
-#>4	belong		x		\b, FORM is %d bytes long
-# audio formats
->8	string		AIFF		\b, AIFF audio
->8	string		AIFC		\b, AIFF-C compressed audio
->8	string		8SVX		\b, 8SVX 8-bit sampled sound voice
->8	string		SAMP		\b, SAMP sampled audio
->8	string		DTYP		\b, DTYP datatype description
->8	string		PTCH		\b, PTCH binary patch
-# image formats
->8	string		ILBMBMHD	\b, ILBM interleaved image
->>20	beshort		x		\b, %d x
->>22	beshort		x		%d
->8	string		RGBN		\b, RGBN 12-bit RGB image
->8	string		RGB8		\b, RGB8 24-bit RGB image
->8	string		DR2D		\b, DR2D 2-D object
->8	string		TDDD		\b, TDDD 3-D rendering
-# other formats
->8	string		FTXT		\b, FTXT formatted text
-
-#------------------------------------------------------------------------------
-# images:  file(1) magic for image formats (see also "iff")
-#
-# originally from jef at helios.ee.lbl.gov (Jef Poskanzer),
-# additions by janl at ifi.uio.no as well as others. Jan also suggested
-# merging several one- and two-line files into here.
-#
-# little magic: PCX (first byte is 0x0a)
-
-# Targa - matches `povray', `ppmtotga' and `xv' outputs
-# by Philippe De Muyter <phdm at macqel.be>
-# at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11
-# at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise
-# at 3, leshort Index is 0 for povray, ppmtotga and xv outputs
-# `xv' recognizes only a subset of the following (RGB with pixelsize = 24)
-# `tgatoppm' recognizes a superset (Index may be anything)
-1	belong&0xfff7ffff	0x01010000	Targa image data - Map
->2	byte&8			8		- RLE
->12	leshort			>0		%hd x
->14	leshort			>0		%hd
-1	belong&0xfff7ffff	0x00020000	Targa image data - RGB
->2	byte&8			8		- RLE
->12	leshort			>0		%hd x
->14	leshort			>0		%hd
-1	belong&0xfff7ffff	0x00030000	Targa image data - Mono
->2	byte&8			8		- RLE
->12	leshort			>0		%hd x
->14	leshort			>0		%hd
-
-# PBMPLUS images
-# The next byte following the magic is always whitespace.
-0	string		P1		Netpbm PBM image text
-0	string		P2		Netpbm PGM image text
-0	string		P3		Netpbm PPM image text
-0	string		P4		Netpbm PBM "rawbits" image data
-0	string		P5		Netpbm PGM "rawbits" image data
-0	string		P6		Netpbm PPM "rawbits" image data
-0	string		P7		Netpbm PAM image file
-
-# From: bryanh at giraffe-data.com (Bryan Henderson)
-0	string		\117\072	Solitaire Image Recorder format
->4	string		\013		MGI Type 11
->4	string		\021		MGI Type 17
-0	string		.MDA		MicroDesign data
->21	byte		48		version 2
->21	byte		51		version 3
-0	string		.MDP		MicroDesign page data
->21	byte		48		version 2
->21	byte		51		version 3
-
-# NIFF (Navy Interchange File Format, a modification of TIFF) images
-0	string		IIN1		NIFF image data
-
-# Tag Image File Format, from Daniel Quinlan (quinlan at yggdrasil.com)
-# The second word of TIFF files is the TIFF version number, 42, which has
-# never changed.  The TIFF specification recommends testing for it.
-0	string		MM\x00\x2a	TIFF image data, big-endian
-0	string		II\x2a\x00	TIFF image data, little-endian
-
-# PNG [Portable Network Graphics, or "PNG's Not GIF"] images
-# (Greg Roelofs, newt at uchicago.edu)
-# (Albert Cahalan, acahalan at cs.uml.edu)
-#
-# 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ...
-#
-0	string		\x89PNG		PNG image data,
->4	belong		!0x0d0a1a0a	CORRUPTED,
->4	belong		0x0d0a1a0a
->>16	belong		x		%ld x
->>20	belong		x		%ld,
->>24	byte		x		%d-bit
->>25	byte		0		grayscale,
->>25	byte		2		\b/color RGB,
->>25	byte		3		colormap,
->>25	byte		4		gray+alpha,
->>25	byte		6		\b/color RGBA,
-#>>26	byte		0		deflate/32K,
->>28	byte		0		non-interlaced
->>28	byte		1		interlaced
-1	string		PNG		PNG image data, CORRUPTED
-
-# GIF
-0	string		GIF8		GIF image data
->4	string		7a		\b, version 8%s,
->4	string		9a		\b, version 8%s,
->6	leshort		>0		%hd x
->8	leshort		>0		%hd
-#>10	byte		&0x80		color mapped,
-#>10	byte&0x07	=0x00		2 colors
-#>10	byte&0x07	=0x01		4 colors
-#>10	byte&0x07	=0x02		8 colors
-#>10	byte&0x07	=0x03		16 colors
-#>10	byte&0x07	=0x04		32 colors
-#>10	byte&0x07	=0x05		64 colors
-#>10	byte&0x07	=0x06		128 colors
-#>10	byte&0x07	=0x07		256 colors
-
-# ITC (CMU WM) raster files.  It is essentially a byte-reversed Sun raster,
-# 1 plane, no encoding.
-0	string		\361\0\100\273	CMU window manager raster image data
->4	lelong		>0		%d x
->8	lelong		>0		%d,
->12	lelong		>0		%d-bit
-
-# Magick Image File Format
-0	string		id=ImageMagick	MIFF image data
-
-# Artisan
-0	long		1123028772	Artisan image data
->4	long		1		\b, rectangular 24-bit
->4	long		2		\b, rectangular 8-bit with colormap
->4	long		3		\b, rectangular 32-bit (24-bit with matte)
-
-# FIG (Facility for Interactive Generation of figures), an object-based format
-0	string		#FIG		FIG image text
->5	string		x		\b, version %.3s
-
-# PHIGS
-0	string		ARF_BEGARF		PHIGS clear text archive
-0	string		@(#)SunPHIGS		SunPHIGS
-# version number follows, in the form m.n
->40	string		SunBin			binary
->32	string		archive			archive
-
-# GKS (Graphics Kernel System)
-0	string		GKSM		GKS Metafile
->24	string		SunGKS		\b, SunGKS
-
-# CGM image files
-0	string		BEGMF		clear text Computer Graphics Metafile
-# XXX - questionable magic
-0	beshort&0xffe0	0x0020		binary Computer Graphics Metafile
-0	beshort		0x3020		character Computer Graphics Metafile
-
-# MGR bitmaps  (Michael Haardt, u31b3hs at pool.informatik.rwth-aachen.de)
-0	string	yz	MGR bitmap, modern format, 8-bit aligned
-0	string	zz	MGR bitmap, old format, 1-bit deep, 16-bit aligned
-0	string	xz	MGR bitmap, old format, 1-bit deep, 32-bit aligned
-0	string	yx	MGR bitmap, modern format, squeezed
-
-# Fuzzy Bitmap (FBM) images
-0	string		%bitmap\0	FBM image data
->30	long		0x31		\b, mono
->30	long		0x33		\b, color
-
-# facsimile data
-1	string		PC\ Research,\ Inc	group 3 fax data
->29	byte		0		\b, normal resolution (204x98 DPI)
->29	byte		1		\b, fine resolution (204x196 DPI)
-# From: Herbert Rosmanith <herp at wildsau.idv.uni.linz.at>
-0	string		Sfff		structured fax file
-
-
-# PC bitmaps (OS/2, Windoze BMP files)  (Greg Roelofs, newt at uchicago.edu)
-0	string		BM		PC bitmap data
->14	leshort		12		\b, OS/2 1.x format
->>18	leshort		x		\b, %d x
->>20	leshort		x		%d
->14	leshort		64		\b, OS/2 2.x format
->>18	leshort		x		\b, %d x
->>20	leshort		x		%d
->14	leshort		40		\b, Windows 3.x format
->>18	lelong		x		\b, %d x
->>22	lelong		x		%d x
->>28	leshort		x		%d
-# Too simple - MPi
-#0	string		IC		PC icon data
-#0	string		PI		PC pointer image data
-#0	string		CI		PC color icon data
-#0	string		CP		PC color pointer image data
-# Conflicts with other entries [BABYL]
-#0	string		BA		PC bitmap array data
-
-# XPM icons (Greg Roelofs, newt at uchicago.edu)
-# note possible collision with C/REXX entry in c-lang; currently commented out
-0	string		/*\ XPM\ */	X pixmap image text
-
-# Utah Raster Toolkit RLE images (janl at ifi.uio.no)
-0	leshort		0xcc52		RLE image data,
->6	leshort		x		%d x
->8	leshort		x		%d
->2	leshort		>0		\b, lower left corner: %d
->4	leshort		>0		\b, lower right corner: %d
->10	byte&0x1	=0x1		\b, clear first
->10	byte&0x2	=0x2		\b, no background
->10	byte&0x4	=0x4		\b, alpha channel
->10	byte&0x8	=0x8		\b, comment
->11	byte		>0		\b, %d color channels
->12	byte		>0		\b, %d bits per pixel
->13	byte		>0		\b, %d color map channels
-
-# image file format (Robert Potter, potter at cs.rochester.edu)
-0	string		Imagefile\ version-	iff image data
-# this adds the whole header (inc. version number), informative but longish
->10	string		>\0		%s
-
-# Sun raster images, from Daniel Quinlan (quinlan at yggdrasil.com)
-0	belong		0x59a66a95	Sun raster image data
->4	belong		>0		\b, %d x
->8	belong		>0		%d,
->12	belong		>0		%d-bit,
-#>16	belong		>0		%d bytes long,
->20	belong		0		old format,
-#>20	belong		1		standard,
->20	belong		2		compressed,
->20	belong		3		RGB,
->20	belong		4		TIFF,
->20	belong		5		IFF,
->20	belong		0xffff		reserved for testing,
->24	belong		0		no colormap
->24	belong		1		RGB colormap
->24	belong		2		raw colormap
-#>28	belong		>0		colormap is %d bytes long
-
-# SGI image file format, from Daniel Quinlan (quinlan at yggdrasil.com)
-#
-# See
-#	http://reality.sgi.com/grafica/sgiimage.html
-#
-0	beshort		474		SGI image data
-#>2	byte		0		\b, verbatim
->2	byte		1		\b, RLE
-#>3	byte		1		\b, normal precision
->3	byte		2		\b, high precision
->4	beshort		x		\b, %d-D
->6	beshort		x		\b, %d x
->8	beshort		x		%d
->10	beshort		x		\b, %d channel
->10	beshort		!1		\bs
->80	string		>0		\b, "%s"
-
-0	string		IT01		FIT image data
->4	belong		x		\b, %d x
->8	belong		x		%d x
->12	belong		x		%d
-#
-0	string		IT02		FIT image data
->4	belong		x		\b, %d x
->8	belong		x		%d x
->12	belong		x		%d
-#
-2048	string		PCD_IPI		Kodak Photo CD image pack file
->0xe02	byte&0x03	0x00		, landscape mode
->0xe02	byte&0x03	0x01		, portrait mode
->0xe02	byte&0x03	0x02		, landscape mode
->0xe02	byte&0x03	0x03		, portrait mode
-0	string		PCD_OPA		Kodak Photo CD overview pack file
-
-# FITS format.  Jeff Uphoff <juphoff at tarsier.cv.nrao.edu>
-# FITS is the Flexible Image Transport System, the de facto standard for
-# data and image transfer, storage, etc., for the astronomical community.
-# (FITS floating point formats are big-endian.)
-0	string	SIMPLE\ \ =	FITS image data
->109	string	8		\b, 8-bit, character or unsigned binary integer
->108	string	16		\b, 16-bit, two's complement binary integer
->107	string	\ 32		\b, 32-bit, two's complement binary integer
->107	string	-32		\b, 32-bit, floating point, single precision
->107	string	-64		\b, 64-bit, floating point, double precision
-
-# other images
-0	string	This\ is\ a\ BitMap\ file	Lisp Machine bit-array-file
-0	string		!!		Bennet Yee's "face" format
-
-# From SunOS 5.5.1 "/etc/magic" - appeared right before Sun raster image
-# stuff.
-#
-0	beshort		0x1010		PEX Binary Archive
-
-# Visio drawings
-03000	string	Visio\ (TM)\ Drawing	%s
-
-# Tgif files
-0	string	\%TGIF\ x 		Tgif file version %s
-
-# DICOM medical imaging data
-128	string	DICM			DICOM medical imaging data
-
-# XWD - X Window Dump file.
-#   As described in /usr/X11R6/include/X11/XWDFile.h
-#   used by the xwd program.
-#   Bradford Castalia, idaeim, 1/01
-4	belong	7			XWD X Window Dump image data
->100	string	>\0			\b, "%s"
->16	belong	x			\b, %dx
->20	belong	x			\b%dx
->12	belong	x			\b%d
-
-# PDS - Planetary Data System
-#   These files use Parameter Value Language in the header section.
-#   Unfortunately, there is no certain magic, but the following
-#   strings have been found to be most likely.
-0	string	NJPL1I00		PDS (JPL) image data
-2	string	NJPL1I			PDS (JPL) image data
-0	string	CCSD3ZF			PDS (CCSD) image data
-2	string	CCSD3Z			PDS (CCSD) image data
-0	string	PDS_			PDS image data
-0	string	LBLSIZE=		PDS (VICAR) image data
-
-# pM8x: ATARI STAD compressed bitmap format
-#
-# from Oskar Schirmer <schirmer at scara.com> Feb 2, 2001
-# p M 8 5/6 xx yy zz data...
-# Atari ST STAD bitmap is always 640x400, bytewise runlength compressed.
-# bytes either run horizontally (pM85) or vertically (pM86). yy is the
-# most frequent byte, xx and zz are runlength escape codes, where xx is
-# used for runs of yy.
-#
-0	string	pM85		Atari ST STAD bitmap image data (hor)
->5	byte	0x00		(white background)
->5	byte	0xFF		(black background)
-0	string	pM86		Atari ST STAD bitmap image data (vert)
->5	byte	0x00		(white background)
->5	byte	0xFF		(black background)
-
-# XXX:
-# This is bad magic 0x5249 == 'RI' conflicts with RIFF and other
-# magic.
-# SGI RICE image file <mpruett at sgi.com>
-#0	beshort	0x5249		RICE image
-#>2	beshort	x		v%d
-#>4	beshort	x		(%d x
-#>6	beshort	x		%d)
-#>8	beshort	0		8 bit
-#>8	beshort	1		10 bit
-#>8	beshort	2		12 bit
-#>8	beshort	3		13 bit
-#>10	beshort	0		4:2:2
-#>10	beshort	1		4:2:2:4
-#>10	beshort	2		4:4:4
-#>10	beshort	3		4:4:4:4
-#>12	beshort	1		RGB
-#>12	beshort	2		CCIR601
-#>12	beshort	3		RP175
-#>12	beshort	4		YUV
-
-#------------------------------------------------------------------------------
-#
-# Marco Schmidt (marcoschmidt at users.sourceforge.net) -- an image  file format
-# for the EPOC operating system, which is used with PDAs like those from Psion
-#
-# see http://huizen.dds.nl/~frodol/psiconv/html/Index.html for a description
-# of various EPOC file formats
-
-0	string \x37\x00\x00\x10\x42\x00\x00\x10\x00\x00\x00\x00\x39\x64\x39\x47 EPOC MBM image file
-
-# PCX image files
-# From: Dan Fandrich <dan at coneharvesters.com>
-0	beshort		0x0a00	PCX ver. 2.5 image data
-0	beshort		0x0a02	PCX ver. 2.8 image data, with palette
-0	beshort		0x0a03	PCX ver. 2.8 image data, without palette
-0	beshort		0x0a04	PCX for Windows image data
-0	beshort		0x0a05	PCX ver. 3.0 image data
->4	leshort		x      bounding box [%hd,
->6	leshort		x      %hd] -
->8	leshort		x      [%hd,
->10	leshort		x      %hd],
->65	byte		>1	%d planes each of
->3	byte		x	%hhd-bit
->68	byte		0	image,
->68	byte		1	colour,
->68	byte		2	grayscale,
->68	byte		>2	image,
->68	byte		<0	image,
->12	leshort		>0	%hd x
->>14	leshort		x      %hd dpi,
->2	byte		0	uncompressed
->2	byte		1	RLE compressed
-
-# Adobe Photoshop
-0	string		8BPS Adobe Photoshop Image
-
-# XV thumbnail indicator (ThMO)
-0	string		P7\ 332		XV thumbnail image data
-
-# NITF is defined by United States MIL-STD-2500A
-0	string	NITF	National Imagery Transmission Format
->25	string	>\0	dated %.14s
-
-# GEM Image: Version 1, Headerlen 8 (Wolfram Kleff)
-0	belong		0x00010008	GEM Image data
->12	beshort		x		%d x
->14	beshort		x		%d,
->4	beshort		x		%d planes,
->8	beshort		x		%d x
->10	beshort		x		%d pixelsize
-
-# GEM Metafile (Wolfram Kleff)
-0	lelong		0x0018FFFF	GEM Metafile data
->4	leshort		x		version %d
-
-#
-# SMJPEG. A custom Motion JPEG format used by Loki Entertainment
-# Software Torbjorn Andersson <d91tan at Update.UU.SE>.
-#
-0	string	\0\nSMJPEG	SMJPEG
->8	belong	x		%d.x data
-# According to the specification you could find any number of _TXT
-# headers here, but I can't think of any way of handling that. None of
-# the SMJPEG files I tried it on used this feature. Even if such a
-# file is encountered the output should still be reasonable.
->16	string	_SND		\b,
->>24	beshort	>0		%d Hz
->>26	byte	8		8-bit
->>26	byte	16		16-bit
->>28	string	NONE		uncompressed
-# >>28	string	APCM		ADPCM compressed
->>27	byte	1		mono
->>28	byte	2		stereo
-# Help! Isn't there any way to avoid writing this part twice?
->>32	string	_VID		\b,
-# >>>48	string	JFIF		JPEG
->>>40	belong	>0		%d frames
->>>44	beshort	>0		(%d x
->>>46	beshort	>0		%d)
->16	string	_VID		\b,
-# >>32	string	JFIF		JPEG
->>24	belong	>0		%d frames
->>28	beshort	>0		(%d x
->>30	beshort	>0		%d)
-
-0	string	Paint\ Shop\ Pro\ Image\ File	Paint Shop Pro Image File
-
-# "thumbnail file" (icon)
-# descended from "xv", but in use by other applications as well (Wolfram Kleff)
-0       string          P7\ 332         XV "thumbnail file" (icon) data
-
-# taken from fkiss: (<yav at mte.biglobe.ne.jp> ?)
-0       string          KiSS            KISS/GS
->4      byte            16              color
->>5     byte            x               %d bit
->>8     leshort         x               %d colors
->>10    leshort         x               %d groups
->4      byte            32              cell
->>5     byte            x               %d bit
->>8     leshort         x               %d x
->>10    leshort         x               %d
->>12    leshort         x               +%d
->>14    leshort         x               +%d
-
-# Webshots (www.webshots.com), by John Harrison
-0       string          C\253\221g\230\0\0\0 Webshots Desktop .wbz file
-
-# Hercules DASD image files
-# From Jan Jaeger <jj at septa.nl>
-0       string  CKD_P370        Hercules CKD DASD image file
->8      long    x               \b, %d heads per cylinder
->12     long    x               \b, track size %d bytes
->16     byte    x               \b, device type 33%2.2X
-
-0       string  CKD_C370        Hercules compressed CKD DASD image file
->8      long    x               \b, %d heads per cylinder
->12     long    x               \b, track size %d bytes
->16     byte    x               \b, device type 33%2.2X
-
-0       string  CKD_S370        Hercules CKD DASD shadow file
->8      long    x               \b, %d heads per cylinder
->12     long    x               \b, track size %d bytes
->16     byte    x               \b, device type 33%2.2X
-
-# Squeak images and - etoffi at softhome.net
-0 string \146\031\0\0  Squeak image data
-0 string 'From\040Squeak  Squeak program text
-
-# partimage: file(1) magic for PartImage files (experimental, incomplete)
-# Author: Hans-Joachim Baader <hjb at pro-linux.de>
-0		string	PaRtImAgE-VoLuMe	PartImage
->0x0020		string	0.6.1		file version %s
->>0x0060	lelong	>-1		volume %ld
-#>>0x0064 8 byte identifier
-#>>0x007c reserved
->>0x0200	string	>\0		type %s
->>0x1400	string	>\0		device %s,
->>0x1600	string	>\0		original filename %s,
-# Some fields omitted
->>0x2744	lelong	0		not compressed
->>0x2744	lelong	1		gzip compressed
->>0x2744	lelong	2		bzip2 compressed
->>0x2744	lelong	>2		compressed with unknown algorithm
->0x0020		string	>0.6.1		file version %s
->0x0020		string	<0.6.1		file version %s
-
-# DCX is multi-page PCX, using a simple header of up to 1024
-# offsets for the respective PCX components.
-# From: Joerg Wunsch <joerg_wunsch at uriah.heep.sax.de>
-0	lelong	987654321	DCX multi-page PCX image data
-
-# Simon Walton <simonw at matteworld.com>
-# Kodak Cineon format for scanned negatives
-# http://www.kodak.com/US/en/motion/support/dlad/
-0	lelong  0xd75f2a80	Cineon image data
->200	belong  >0		\b, %ld x
->204	belong  >0		%ld
-
-# From Jan "Yenya" Kasprzak <kas at fi.muni.cz>
-# The description of *.mrw format can be found at
-# http://www.dalibor.cz/minolta/raw_file_format.htm
-0	string	\000MRM			Minolta Dimage camera raw image data
-
-# From: stephane.loeuillet at tiscali.f
-# http://www.djvuzone.org/
-0	string	AT&TFORM		DjVu Image file
-
-# From: Jason Bacon <bacon at smithers.neuro.mcw.edu>
-0	beshort	0x3020			character Computer Graphics Metafile
-
-
-#------------------------------------------------------------------------------
-# intel:  file(1) magic for x86 Unix
-#
-# Various flavors of x86 UNIX executable/object (other than Xenix, which
-# is in "microsoft").  DOS is in "msdos"; the ambitious soul can do
-# Windows as well.
-#
-# Windows NT belongs elsewhere, as you need x86 and MIPS and Alpha and
-# whatever comes next (HP-PA Hummingbird?).  OS/2 may also go elsewhere
-# as well, if, as, and when IBM makes it portable.
-#
-# The `versions' should be un-commented if they work for you.
-# (Was the problem just one of endianness?)
-#
-0	leshort		0502		basic-16 executable
->12	lelong		>0		not stripped
-#>22	leshort		>0		- version %ld
-0	leshort		0503		basic-16 executable (TV)
->12	lelong		>0		not stripped
-#>22	leshort		>0		- version %ld
-0	leshort		0510		x86 executable
->12	lelong		>0		not stripped
-0	leshort		0511		x86 executable (TV)
->12	lelong		>0		not stripped
-0	leshort		=0512		iAPX 286 executable small model (COFF)
->12	lelong		>0		not stripped
-#>22	leshort		>0		- version %ld
-0	leshort		=0522		iAPX 286 executable large model (COFF)
->12	lelong		>0		not stripped
-#>22	leshort		>0		- version %ld
-# SGI labeled the next entry as "iAPX 386 executable" --Dan Quinlan
-0	leshort		=0514		80386 COFF executable
->12	lelong		>0		not stripped
->22	leshort		>0		- version %ld
-
-# rom: file(1) magic for BIOS ROM Extensions found in intel machines
-#      mapped into memory between 0xC0000 and 0xFFFFF
-# From Gürkan Sengün <gurkan at linuks.mine.nu>, www.linuks.mine.nu
-0        beshort         0x55AA       BIOS (ia32) ROM Ext.
->5       string          USB          USB
->7       string          LDR          UNDI image
->30      string          IBM          IBM comp. Video
->26      string          Adaptec      Adaptec
->28      string          Adaptec      Adaptec
->42      string          PROMISE      Promise
->2       byte            x            (%d*512)
-
-#------------------------------------------------------------------------------
-# interleaf:  file(1) magic for InterLeaf TPS:
-#
-0	string		=\210OPS	Interleaf saved data
-0	string		=<!OPS		Interleaf document text
->5	string		,\ Version\ =	\b, version
->>17	string		>\0		%.3s
-
-#------------------------------------------------------------------------------
-# island:  file(1) magic for IslandWite/IslandDraw, from SunOS 5.5.1
-# "/etc/magic":
-# From: guy at netapp.com (Guy Harris)
-#
-4	string		pgscriptver	IslandWrite document
-13	string		DrawFile	IslandDraw document
-
-
-#------------------------------------------------------------------------------
-# ispell:  file(1) magic for ispell
-#
-# Ispell 3.0 has a magic of 0x9601 and ispell 3.1 has 0x9602.  This magic
-# will match 0x9600 through 0x9603 in *both* little endian and big endian.
-# (No other current magic entries collide.)
-#
-# Updated by Daniel Quinlan (quinlan at yggdrasil.com)
-#
-0	leshort&0xFFFC	0x9600		little endian ispell
->0	byte		0		hash file (?),
->0	byte		1		3.0 hash file,
->0	byte		2		3.1 hash file,
->0	byte		3		hash file (?),
->2	leshort		0x00		8-bit, no capitalization, 26 flags
->2	leshort		0x01		7-bit, no capitalization, 26 flags
->2	leshort		0x02		8-bit, capitalization, 26 flags
->2	leshort		0x03		7-bit, capitalization, 26 flags
->2	leshort		0x04		8-bit, no capitalization, 52 flags
->2	leshort		0x05		7-bit, no capitalization, 52 flags
->2	leshort		0x06		8-bit, capitalization, 52 flags
->2	leshort		0x07		7-bit, capitalization, 52 flags
->2	leshort		0x08		8-bit, no capitalization, 128 flags
->2	leshort		0x09		7-bit, no capitalization, 128 flags
->2	leshort		0x0A		8-bit, capitalization, 128 flags
->2	leshort		0x0B		7-bit, capitalization, 128 flags
->2	leshort		0x0C		8-bit, no capitalization, 256 flags
->2	leshort		0x0D		7-bit, no capitalization, 256 flags
->2	leshort		0x0E		8-bit, capitalization, 256 flags
->2	leshort		0x0F		7-bit, capitalization, 256 flags
->4	leshort		>0		and %d string characters
-0	beshort&0xFFFC	0x9600		big endian ispell
->1	byte		0		hash file (?),
->1	byte		1		3.0 hash file,
->1	byte		2		3.1 hash file,
->1	byte		3		hash file (?),
->2	beshort		0x00		8-bit, no capitalization, 26 flags
->2	beshort		0x01		7-bit, no capitalization, 26 flags
->2	beshort		0x02		8-bit, capitalization, 26 flags
->2	beshort		0x03		7-bit, capitalization, 26 flags
->2	beshort		0x04		8-bit, no capitalization, 52 flags
->2	beshort		0x05		7-bit, no capitalization, 52 flags
->2	beshort		0x06		8-bit, capitalization, 52 flags
->2	beshort		0x07		7-bit, capitalization, 52 flags
->2	beshort		0x08		8-bit, no capitalization, 128 flags
->2	beshort		0x09		7-bit, no capitalization, 128 flags
->2	beshort		0x0A		8-bit, capitalization, 128 flags
->2	beshort		0x0B		7-bit, capitalization, 128 flags
->2	beshort		0x0C		8-bit, no capitalization, 256 flags
->2	beshort		0x0D		7-bit, no capitalization, 256 flags
->2	beshort		0x0E		8-bit, capitalization, 256 flags
->2	beshort		0x0F		7-bit, capitalization, 256 flags
->4	beshort		>0		and %d string characters
-# ispell 4.0 hash files  kromJx <kromJx at crosswinds.net>
-# Ispell 4.0
-0       string          ISPL            ispell
->4      long            x               hash file version %d,
->8      long            x               lexletters %d,
->12     long            x               lexsize %d,
->16     long            x               hashsize %d,
->20     long            x               stblsize %d
-#------------------------------------------------------------
-# Java ByteCode
-# From Larry Schwimmer (schwim at cs.stanford.edu)
-0	belong		0xcafebabe	compiled Java class data,
->6	beshort x	version %d.
->4	beshort x	\b%d
-#------------------------------------------------------------
-# Java serialization
-# From Martin Pool (m.pool at pharos.com.au)
-0	beshort		0xaced		Java serialization data
->2	beshort		>0x0004		\b, version %d
-
-#------------------------------------------------------------------------------
-# JPEG images
-# SunOS 5.5.1 had
-#
-#	0	string		\377\330\377\340	JPEG file
-#	0	string		\377\330\377\356	JPG file
-#
-# both of which turn into "JPEG image data" here.
-#
-0	beshort		0xffd8		JPEG image data
->6	string		JFIF		\b, JFIF standard
->6	string		Exif		\b, EXIF standard
-# The following added by Erik Rossen <rossen at freesurf.ch> 1999-09-06
-# in a vain attempt to add image size reporting for JFIF.  Note that these
-# tests are not fool-proof since some perfectly valid JPEGs are currently
-# impossible to specify in magic(4) format.
-# First, a little JFIF version info:
->11	byte		x		\b %d.
->12	byte		x		\b%02d
-# Next, the resolution or aspect ratio of the image:
-#>13	byte		0		\b, aspect ratio
-#>13	byte		1		\b, resolution (DPI)
-#>13	byte		2		\b, resolution (DPCM)
-#>4	beshort		x		\b, segment length %d
-# Next, show thumbnail info, if it exists:
->18	byte		!0		\b, thumbnail %dx
->>19	byte		x		\b%d
-# Here things get sticky.  We can do ONE MORE marker segment with
-# indirect addressing, and that's all.  It would be great if we could
-# do pointer arithemetic like in an assembler language.  Christos?
-# And if there was some sort of looping construct to do searches, plus a few
-# named accumulators, it would be even more effective...
-# At least we can show a comment if no other segments got inserted before:
->(4.S+5)	byte		0xFE
->>(4.S+8)	string		>\0		\b, "%s"
-#>(4.S+5)	byte		0xFE		\b, comment
-#>>(4.S+6)	beshort		x		\b length=%d
-#>>(4.S+8)	string		>\0		\b, "%s"
-# Or, we can show the encoding type (I've included only the three most common)
-# and image dimensions if we are lucky and the SOFn (image segment) is here:
->(4.S+5)	byte		0xC0		\b, baseline
->>(4.S+6)	byte		x		\b, precision %d
->>(4.S+7)	beshort		x		\b, %dx
->>(4.S+9)	beshort		x		\b%d
->(4.S+5)	byte		0xC1		\b, extended sequential
->>(4.S+6)	byte		x		\b, precision %d
->>(4.S+7)	beshort		x		\b, %dx
->>(4.S+9)	beshort		x		\b%d
->(4.S+5)	byte		0xC2		\b, progressive
->>(4.S+6)	byte		x		\b, precision %d
->>(4.S+7)	beshort		x		\b, %dx
->>(4.S+9)	beshort		x		\b%d
-# I've commented-out quantisation table reporting.  I doubt anyone cares yet.
-#>(4.S+5)	byte		0xDB		\b, quantisation table
-#>>(4.S+6)	beshort		x		\b length=%d
-#>14	beshort		x		\b, %d x
-#>16	beshort		x		\b %d
-
-# HSI is Handmade Software's proprietary JPEG encoding scheme
-0	string		hsi1		JPEG image data, HSI proprietary
-
-# From: David Santinoli <david at santinoli.com>
-0	string		\x00\x00\x00\x0C\x6A\x50\x20\x20\x0D\x0A\x87\x0A	JPEG 2000 image data
-
-#------------------------------------------------------------------------------
-# karma:  file(1) magic for Karma data files
-#
-# From <rgooch at atnf.csiro.au>
-
-0	string		KarmaRHD Version	Karma Data Structure Version
->16	belong		x		%lu
-#------------------------------------------------------------------------------
-# DEC SRC Virtual Paper: Lectern files
-# Karl M. Hegbloom <karlheg at inetarena.com>
-0	string	lect	DEC SRC Virtual Paper Lectern file
-
-#------------------------------------------------------------------------------
-# lex:  file(1) magic for lex
-#
-#	derived empirically, your offsets may vary!
-53	string		yyprevious	C program text (from lex)
->3	string		>\0		 for %s
-# C program text from GNU flex, from Daniel Quinlan <quinlan at yggdrasil.com>
-21	string		generated\ by\ flex	C program text (from flex)
-# lex description file, from Daniel Quinlan <quinlan at yggdrasil.com>
-0	string		%{		lex description text
-
-#------------------------------------------------------------------------------
-# lif:  file(1) magic for lif
-#
-# (Daniel Quinlan <quinlan at yggdrasil.com>)
-#
-0	beshort		0x8000		lif file
-
-#------------------------------------------------------------------------------
-# linux:  file(1) magic for Linux files
-#
-# Values for Linux/i386 binaries, from Daniel Quinlan <quinlan at yggdrasil.com>
-# The following basic Linux magic is useful for reference, but using
-# "long" magic is a better practice in order to avoid collisions.
-#
-# 2	leshort		100		Linux/i386
-# >0	leshort		0407		impure executable (OMAGIC)
-# >0	leshort		0410		pure executable (NMAGIC)
-# >0	leshort		0413		demand-paged executable (ZMAGIC)
-# >0	leshort		0314		demand-paged executable (QMAGIC)
-#
-0	lelong		0x00640107	Linux/i386 impure executable (OMAGIC)
->16	lelong		0		\b, stripped
-0	lelong		0x00640108	Linux/i386 pure executable (NMAGIC)
->16	lelong		0		\b, stripped
-0	lelong		0x0064010b	Linux/i386 demand-paged executable (ZMAGIC)
->16	lelong		0		\b, stripped
-0	lelong		0x006400cc	Linux/i386 demand-paged executable (QMAGIC)
->16	lelong		0		\b, stripped
-#
-0	string		\007\001\000	Linux/i386 object file
->20	lelong		>0x1020		\b, DLL library
-# Linux-8086 stuff:
-0	string		\01\03\020\04	Linux-8086 impure executable
->28	long		!0		not stripped
-0	string		\01\03\040\04	Linux-8086 executable
->28	long		!0		not stripped
-#
-0	string		\243\206\001\0	Linux-8086 object file
-#
-0	string		\01\03\020\20	Minix-386 impure executable
->28	long		!0		not stripped
-0	string		\01\03\040\20	Minix-386 executable
->28	long		!0		not stripped
-# core dump file, from Bill Reynolds <bill at goshawk.lanl.gov>
-216	lelong		0421		Linux/i386 core file
->220	string		>\0		of '%s'
->200	lelong		>0		(signal %d)
-#
-# LILO boot/chain loaders, from Daniel Quinlan <quinlan at yggdrasil.com>
-# this can be overridden by the DOS executable (COM) entry
-2	string		LILO		Linux/i386 LILO boot/chain loader
-#
-# PSF fonts, from H. Peter Anvin <hpa at yggdrasil.com>
-0	leshort		0x0436		Linux/i386 PC Screen Font data,
->2	byte		0		256 characters, no directory,
->2	byte		1		512 characters, no directory,
->2	byte		2		256 characters, Unicode directory,
->2	byte		3		512 characters, Unicode directory,
->3	byte		>0		8x%d
-# Linux swap file, from Daniel Quinlan <quinlan at yggdrasil.com>
-4086	string		SWAP-SPACE	Linux/i386 swap file
-# according to man page of mkswap (8) March 1999
-4086	string		SWAPSPACE2	Linux/i386 swap file (new style)
->0x400	long		x		%d (4K pages)
->0x404	long		x		size %d pages
-# ECOFF magic for OSF/1 and Linux (only tested under Linux though)
-#
-#	from Erik Troan (ewt at redhat.com) examining od dumps, so this
-#		could be wrong
-#      updated by David Mosberger (davidm at azstarnet.com) based on
-#      GNU BFD and MIPS info found below.
-#
-0	leshort		0x0183		ECOFF alpha
->24	leshort		0407		executable
->24	leshort		0410		pure
->24	leshort		0413		demand paged
->8	long		>0		not stripped
->8	long		0		stripped
->23	leshort		>0		- version %ld.
-#
-# Linux kernel boot images, from Albert Cahalan <acahalan at cs.uml.edu>
-# and others such as Axel Kohlmeyer <akohlmey at rincewind.chemie.uni-ulm.de>
-# and Nicol�s Lichtmaier <nick at debian.org>
-# All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
-# Linux kernel boot images (i386 arch) (Wolfram Kleff)
-#514	string		HdrS		Linux kernel
-#>510	leshort		0xAA55		x86 boot executable
-#>>518	leshort		>=3D0x200
-#>>529	byte		0		zImage,
-#>>>529	byte		1		bzImage,
-#>>>(526.s+0x200) string	>\0		version %s,
-#>>498	leshort		1		RO-rootFS,
-#>>498	leshort		0		RW-rootFS,
-#>>508	leshort		>0		root_dev 0x%X,
-#>>502	leshort		>0		swap_dev 0x%X,
-#>>504	leshort		>0		RAMdisksize %u KB,
-#>>506	leshort		0xFFFF		Normal VGA
-#>>506	leshort		0xFFFE		Extended VGA
-#>>506	leshort		0xFFFD		Prompt for Videomode
-#>>506	leshort		>0		Video mode %d
-# This also matches new kernels, which were caught above by "HdrS".
-#0		belong	0xb8c0078e	Linux kernel
-#>0x1e3		string	Loading		version 1.3.79 or older
-#>0x1e9		string	Loading		from prehistoric times
-
-# System.map files - Nicol�s Lichtmaier <nick at debian.org>
-8	string	\ A\ _text	Linux kernel symbol map text
-
-# LSM entries - Nicol�s Lichtmaier <nick at debian.org>
-0	string	Begin3	Linux Software Map entry text
-0	string	Begin4	Linux Software Map entry text (new format)
-
-# From Matt Zimmerman
-0       belong  0x4f4f4f4d      User-mode Linux COW file
->4      belong  x               \b, version %d
->8      string  >\0             \b, backing file %s
-
-############################################################################
-# Linux kernel versions
-
-0		string		\xb8\xc0\x07\x8e\xd8\xb8\x00\x90	Linux
->497		leshort		0		x86 boot sector
->>514		belong		0x8e	of a kernel from the dawn of time!
->>514		belong		0x908ed8b4	version 0.99-1.1.42
->>514		belong		0x908ed8b8	for memtest86
-
->497		leshort		!0		x86 kernel
->>504		leshort		>0		RAMdisksize=%u KB
->>502		leshort		>0		swap=0x%X
->>508		leshort		>0		root=0x%X
->>>498		leshort		1		\b-ro
->>>498		leshort		0		\b-rw
->>506		leshort		0xFFFF		vga=normal
->>506		leshort		0xFFFE		vga=extended
->>506		leshort		0xFFFD		vga=ask
->>506		leshort		>0		vga=%d
->>514		belong		0x908ed881	version 1.1.43-1.1.45
->>514		belong		0x15b281cd
->>>0xa8e	belong		0x55AA5a5a	version 1.1.46-1.2.13,1.3.0
->>>0xa99	belong		0x55AA5a5a	version 1.3.1,2
->>>0xaa3	belong		0x55AA5a5a	version 1.3.3-1.3.30
->>>0xaa6	belong		0x55AA5a5a	version 1.3.31-1.3.41
->>>0xb2b	belong		0x55AA5a5a	version 1.3.42-1.3.45
->>>0xaf7	belong		0x55AA5a5a	version 1.3.46-1.3.72
->>514		string		HdrS
->>>518		leshort		>0x1FF
->>>>529		byte		0		\b, zImage
->>>>529		byte		1		\b, bzImage
->>>>(526.s+0x200) string 	>\0		\b, version %s
-
-# Linux boot sector thefts.
-0		belong		0xb8c0078e	Linux
->0x1e6		belong		0x454c4b53	ELKS Kernel
->0x1e6		belong		!0x454c4b53	style boot sector
-
-############################################################################
-# Linux 8086 executable
-0	lelong&0xFF0000FF 0xC30000E9	Linux-Dev86 executable, headerless
->5	string		.		
->>4	string		>\0		\b, libc version %s
-
-0	lelong&0xFF00FFFF 0x4000301	Linux-8086 executable
->2	byte&0x01	!0		\b, unmapped zero page
->2	byte&0x20	0		\b, impure
->2	byte&0x20	!0
->>2	byte&0x10	!0		\b, A_EXEC
->2	byte&0x02	!0		\b, A_PAL
->2	byte&0x04	!0		\b, A_NSYM
->2	byte&0x08	!0		\b, A_STAND
->2	byte&0x40	!0		\b, A_PURE
->2	byte&0x80	!0		\b, A_TOVLY
->28     long            !0              \b, not stripped
->37	string		.		
->>36	string		>\0		\b, libc version %s
-
-# 0	lelong&0xFF00FFFF 0x10000301	ld86 I80386 executable
-# 0	lelong&0xFF00FFFF 0xB000301	ld86 M68K executable
-# 0	lelong&0xFF00FFFF 0xC000301	ld86 NS16K executable
-# 0	lelong&0xFF00FFFF 0x17000301	ld86 SPARC executable
-
-
-#------------------------------------------------------------------------------
-# lisp:  file(1) magic for lisp programs
-#
-# various lisp types, from Daniel Quinlan (quinlan at yggdrasil.com)
-
-# This is a guess, but a good one.
-0	string	;;			Lisp/Scheme program text
-
-# Emacs 18 - this is always correct, but not very magical.
-0	string	\012(			Emacs v18 byte-compiled Lisp data
-# Emacs 19+ - ver. recognition added by Ian Springer
-# Also applies to XEmacs 19+ .elc files; could tell them apart if we had regexp
-# support or similar - Chris Chittleborough <cchittleborough at yahoo.com.au>
-0	string	;ELC			
->4	byte	>19			
->4	byte    <32			Emacs/XEmacs v%d byte-compiled Lisp data
-
-# Files produced by CLISP Common Lisp From: Bruno Haible <haible at ilog.fr>
-0	string	(SYSTEM::VERSION\040'	CLISP byte-compiled Lisp program text
-0	long	0x70768BD2		CLISP memory image data
-0	long	0xD28B7670		CLISP memory image data, other endian
-
-# Files produced by GNU gettext
-0	long	0xDE120495		GNU-format message catalog data
-0	long	0x950412DE		GNU-format message catalog data
-
-#.com and .bin for MIT scheme 
-0	string	\372\372\372\372	MIT scheme (library?)
-
-# From: David Allouche <david at allouche.net>
-0	string	\<TeXmacs|	TeXmacs document text
-#------------------------------------------------------------------------------
-# mach file description
-#
-0	belong		0xcafebabe	Mach-O fat file
->4	belong		1		with 1 architecture
->4	belong		>1
->>4	belong		x		with %ld architectures		
-#
-0	belong		0xfeedface	Mach-O
->12	belong		1		object
->12	belong		2		executable
->12	belong		3		shared library
->12	belong		4		core
->12	belong		5		preload executable
->12	belong		6               dynamically linked shared library
->12	belong		7               dynamic linker
->12	belong		8		bundle
->12	belong		>8
->>12	belong		x		filetype=%ld
->4	belong		<0
->>4	belong		x		architecture=%ld
->4	belong		1		vax
->4	belong		2		romp
->4	belong		3		architecture=3
->4	belong		4		ns32032
->4	belong		5		ns32332
->4	belong		6		for m68k architecture
-# from NeXTstep 3.0 <mach/machine.h>
-# i.e. mc680x0_all, ignore
-# >>8	belong		1		(mc68030)
->>8	belong		2		(mc68040)
->>8	belong		3		(mc68030 only)
->4	belong		7		i386
->4	belong		8		mips
->4	belong		9		ns32532
->4	belong		10		architecture=10
->4	belong		11		hp pa-risc
->4	belong		12		acorn
->4	belong		13		m88k
->4	belong		14		SPARC
->4	belong		15		i860-big
->4	belong		16		i860
->4	belong		17		rs6000
->4	belong		18		ppc
->4	belong		>18
->>4	belong		x		architecture=%ld
-
-#------------------------------------------------------------------------------
-# magic:  file(1) magic for magic files
-#
-0	string		#\ Magic	magic text file for file(1) cmd
-0	lelong		0xF11E041C	magic binary file for file(1) cmd
->4	lelong		x		(version %d) (little endian)
-0	belong		0xF11E041C	magic binary file for file(1) cmd
->4	belong		x		(version %d) (big endian)
-
-#------------------------------------------------------------------------------
-# mail.news:  file(1) magic for mail and news
-#
-# Unfortunately, saved netnews also has From line added in some news software.
-#0	string		From 		mail text
-# There are tests to ascmagic.c to cope with mail and news.
-0	string		Relay-Version: 	old news text
-0	string		#!\ rnews	batched news text
-0	string		N#!\ rnews	mailed, batched news text
-0	string		Forward\ to 	mail forwarding text
-0	string		Pipe\ to 	mail piping text
-0	string		Return-Path:	smtp mail text
-0	string		Path:		news text
-0	string		Xref:		news text
-0	string		From:		news or mail text
-0	string		Article 	saved news text
-0	string		BABYL		Emacs RMAIL text
-0	string		Received:	RFC 822 mail text
-0	string		MIME-Version:	MIME entity text
-#0	string		Content-	MIME entity text
-
-# TNEF files...
-0	lelong		0x223E9F78	Transport Neutral Encapsulation Format
-
-# From: Kevin Sullivan <ksulliva at psc.edu>
-0	string		*mbx*		MBX mail folder
-
-# From: Simon Matter <simon.matter at invoca.ch>
-0	string		\241\002\213\015skiplist\ file\0\0\0	Cyrus skiplist DB
-
-# JAM(mbp) Fidonet message area databases
-# JHR file
-0	string	JAM\0			JAM message area header file
->12	leshort >0			(%d messages)
-
-# Squish Fidonet message area databases
-# SQD file (requires at least one message in the area)
-256	leshort	0xAFAE4453		Squish message area data file
->4	leshort	>0			(%d messages)
-
-#------------------------------------------------------------------------------
-# maple:  file(1) magic for maple files
-# "H. Nanosecond" <aldomel at ix.netcom.com>
-# Maple V release 4, a multi-purpose math program
-#
-
-# maple library .lib
-0	string	\000MVR4\nI	MapleVr4 library
-
-# .ind
-# no magic for these :-(
-# they are compiled indexes for maple files
-
-# .hdb 
-0	string	\000\004\000\000	Maple help database
-
-# .mhp
-# this has the form <PACKAGE=name>
-0	string	\<PACKAGE=	Maple help file
-0	string	\<HELP\ NAME=	Maple help file
-0	string	\n\<HELP\ NAME=	Maple help file with extra carriage return at start (yuck)
-#0	string	#\ Newton	Maple help file, old style
-0	string	#\ daub	Maple help file, old style
-#0	string	#===========	Maple help file, old style
-
-# .mws
-0	string	\000\000\001\044\000\221	Maple worksheet
-#this is anomalous
-0	string	WriteNow\000\002\000\001\000\000\000\000\100\000\000\000\000\000	Maple worksheet, but weird
-# this has the form {VERSION 2 3 "IBM INTEL NT" "2.3" }\n
-# that is {VERSION major_version miunor_version computer_type version_string}
-0	string	{VERSION\ 	Maple worksheet
->9	string	>\0	version %.1s.
->>10	string
->>>11	string	>\0	%.1s
-
-# .mps
-0	string	\0\0\001$	Maple something
-# from byte 4 it is either 'nul E' or 'soh R'
-# I think 'nul E' means a file that was saved as  a different name
-# a sort of revision marking
-# 'soh R' means new 
->4	string	\000\105	An old revision
->4	string	\001\122	The latest save
-
-# .mpl
-# some of these are the same as .mps above
-#0000000 000 000 001 044 000 105 same as .mps
-#0000000 000 000 001 044 001 122 same as .mps
-
-0	string	#\n##\ <SHAREFILE=	Maple something
-0	string	\n#\n##\ <SHAREFILE=	Maple something
-0	string	##\ <SHAREFILE=	Maple something
-0	string	#\r##\ <SHAREFILE=	Maple something
-0	string	\r#\r##\ <SHAREFILE=	Maple something
-0	string	#\ \r##\ <DESCRIBE>	Maple something anomalous.
-
-#------------------------------------------------------------------------------
-# mathematica:  file(1) magic for mathematica files
-# "H. Nanosecond" <aldomel at ix.netcom.com>
-# Mathematica a multi-purpose math program
-# versions 2.2 and 3.0
-
-#mathematica .mb
-0	string	\064\024\012\000\035\000\000\000	Mathematica version 2 notebook
-0	string	\064\024\011\000\035\000\000\000	Mathematica version 2 notebook
-
-# .ma
-# multiple possibilites:
-
-0	string	(*^\n\n::[\011frontEndVersion\ =\ 	Mathematica notebook
-#>41	string	>\0	%s
-
-#0	string	(*^\n\n::[\011palette	Mathematica notebook version 2.x
-
-#0	string	(*^\n\n::[\011Information	Mathematica notebook version 2.x
-#>675	string	>\0	%s #doesn't work well
-
-# there may be 'cr' instread of 'nl' in some does this matter?
-
-# generic:
-0	string	(*^\r\r::[\011	Mathematica notebook version 2.x
-0	string	\(\*\^\r\n\r\n\:\:\[\011	Mathematica notebook version 2.x
-0	string	(*^\015			Mathematica notebook version 2.x
-0	string	(*^\n\r\n\r::[\011	Mathematica notebook version 2.x
-0	string	(*^\r::[\011	Mathematica notebook version 2.x
-0	string	(*^\r\n::[\011	Mathematica notebook version 2.x
-0	string	(*^\n\n::[\011	Mathematica notebook version 2.x
-0	string	(*^\n::[\011	Mathematica notebook version 2.x
-
-
-# Mathematica .mx files
-
-#0	string	(*This\ is\ a\ Mathematica\ binary\ dump\ file.\ It\ can\ be\ loaded\ with\ Get.*)	Mathematica binary file
-0	string	(*This\ is\ a\ Mathematica\ binary\ 	Mathematica binary file
-#>71	string \000\010\010\010\010\000\000\000\000\000\000\010\100\010\000\000\000	
-# >71... is optional
->88	string	>\0	from %s
-
-
-# Mathematica files PBF:
-# 115 115 101 120 102 106 000 001 000 000 000 203 000 001 000
-0	string	MMAPBF\000\001\000\000\000\203\000\001\000	Mathematica PBF (fonts I think)
-
-# .ml files  These are menu resources I think
-# these start with "[0-9][0-9][0-9]\ A~[0-9][0-9][0-9]\ 
-# how to put that into a magic rule?
-4	string	\ A~	MAthematica .ml file
-
-# .nb files
-#too long 0	string	(***********************************************************************\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Mathematica-Compatible Notebook	Mathematica 3.0 notebook
-0	string	(***********************	Mathematica 3.0 notebook
-
-# other (* matches it is a comment start in these langs
-0	string	(*	Mathematica, or Pascal,  Modula-2 or 3 code text
-
-#########################
-# MatLab v5
-0       string  MATLAB  Matlab v5 mat-file
->126    short   0x494d  (big endian)
->>124   beshort x       version 0x%04x
->126    short   0x4d49  (little endian)
->>124   leshort x       version 0x%04x
-
-#------------------------------------------------------------------------------
-# Mavroyanopoulos Nikos <nmav at hellug.gr>
-# mcrypt:   file(1) magic for mcrypt 2.2.x;
-0	string		\0m\3		mcrypt 2.5 encrypted data,
->4	string		>\0		algorithm: %s,
->>&1	leshort		>0		keysize: %d bytes,
->>>&0	string		>\0		mode: %s,
-
-0	string		\0m\2		mcrypt 2.2 encrypted data,
->3	byte		0		algorithm: blowfish-448,
->3	byte		1		algorithm: DES,
->3	byte		2		algorithm: 3DES,
->3	byte		3		algorithm: 3-WAY,
->3	byte		4		algorithm: GOST,
->3	byte		6		algorithm: SAFER-SK64,
->3	byte		7		algorithm: SAFER-SK128,
->3	byte		8		algorithm: CAST-128,
->3	byte		9		algorithm: xTEA,
->3	byte		10		algorithm: TWOFISH-128,
->3	byte		11		algorithm: RC2,
->3	byte		12		algorithm: TWOFISH-192,
->3	byte		13		algorithm: TWOFISH-256,
->3	byte		14		algorithm: blowfish-128,
->3	byte		15		algorithm: blowfish-192,
->3	byte		16		algorithm: blowfish-256,
->3	byte		100		algorithm: RC6,
->3	byte		101		algorithm: IDEA,
->4	byte		0		mode: CBC,
->4	byte		1		mode: ECB,
->4	byte		2		mode: CFB,
->4	byte		3		mode: OFB,
->4	byte		4		mode: nOFB,
->5	byte		0		keymode: 8bit
->5	byte		1		keymode: 4bit
->5	byte		2		keymode: SHA-1 hash
->5	byte		3		keymode: MD5 hash
-#------------------------------------------------------------------------------
-# mime:  file(1) magic for MIME encoded files
-#
-0	string		Content-Type:\
->14	string		>\0		%s
-0	string		Content-Type:
->13	string		>\0		%s
-
-#------------------------------------------------------------------------------
-# mips:  file(1) magic for Silicon Graphics (MIPS, IRIS, IRIX, etc.)
-#                         Dec Ultrix (MIPS)
-# all of SGI's *current* machines and OSes run in big-endian mode on the
-# MIPS machines, as far as I know.
-#
-# XXX - what is the blank "-" line?
-#
-# kbd file definitions
-0	string	kbd!map		kbd map file
->8	byte	>0		Ver %d:
->10	short	>0		with %d table(s)
-0	belong	0407		old SGI 68020 executable
-0	belong	0410		old SGI 68020 pure executable
-0	beshort	0x8765		disk quotas file
-0	beshort	0x0506		IRIS Showcase file
->2	byte	0x49		-
->3	byte	x		- version %ld
-0	beshort	0x0226		IRIS Showcase template
->2	byte	0x63		-
->3	byte	x		- version %ld
-0	belong	0x5343464d	IRIS Showcase file
->4	byte	x		- version %ld
-0	belong	0x5443464d	IRIS Showcase template
->4	byte	x		- version %ld
-0	belong	0xdeadbabe	IRIX Parallel Arena
->8	belong	>0		- version %ld
-#
-0	beshort	0x0160		MIPSEB ECOFF executable
->20	beshort	0407		(impure)
->20	beshort	0410		(swapped)
->20	beshort	0413		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->22	byte	x		- version %ld
->23	byte	x		.%ld
-#
-0	beshort	0x0162		MIPSEL-BE ECOFF executable
->20	beshort	0407		(impure)
->20	beshort	0410		(swapped)
->20	beshort	0413		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->23	byte	x		- version %d
->22	byte	x		.%ld
-#
-0	beshort	0x6001		MIPSEB-LE ECOFF executable
->20	beshort	03401		(impure)
->20	beshort	04001		(swapped)
->20	beshort	05401		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->23	byte	x		- version %d
->22	byte	x		.%ld
-#
-0	beshort	0x6201		MIPSEL ECOFF executable
->20	beshort	03401		(impure)
->20	beshort	04001		(swapped)
->20	beshort	05401		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->23	byte	x		- version %ld
->22	byte	x		.%ld
-#
-# MIPS 2 additions
-#
-0	beshort	0x0163		MIPSEB MIPS-II ECOFF executable
->20	beshort	0407		(impure)
->20	beshort	0410		(swapped)
->20	beshort	0413		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->22	byte	x		- version %ld
->23	byte	x		.%ld
-#
-0	beshort	0x0166		MIPSEL-BE MIPS-II ECOFF executable
->20	beshort	0407		(impure)
->20	beshort	0410		(swapped)
->20	beshort	0413		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->22	byte	x		- version %ld
->23	byte	x		.%ld
-#
-0	beshort	0x6301		MIPSEB-LE MIPS-II ECOFF executable
->20	beshort	03401		(impure)
->20	beshort	04001		(swapped)
->20	beshort	05401		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->23	byte	x		- version %ld
->22	byte	x		.%ld
-#
-0	beshort	0x6601		MIPSEL MIPS-II ECOFF executable
->20	beshort	03401		(impure)
->20	beshort	04001		(swapped)
->20	beshort	05401		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->23	byte	x		- version %ld
->22	byte	x		.%ld
-#
-# MIPS 3 additions
-#
-0	beshort	0x0140		MIPSEB MIPS-III ECOFF executable
->20	beshort	0407		(impure)
->20	beshort	0410		(swapped)
->20	beshort	0413		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->22	byte	x		- version %ld
->23	byte	x		.%ld
-#
-0	beshort	0x0142		MIPSEL-BE MIPS-III ECOFF executable
->20	beshort	0407		(impure)
->20	beshort	0410		(swapped)
->20	beshort	0413		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->22	byte	x		- version %ld
->23	byte	x		.%ld
-#
-0	beshort	0x4001		MIPSEB-LE MIPS-III ECOFF executable
->20	beshort	03401		(impure)
->20	beshort	04001		(swapped)
->20	beshort	05401		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->23	byte	x		- version %ld
->22	byte	x		.%ld
-#
-0	beshort	0x4201		MIPSEL MIPS-III ECOFF executable
->20	beshort	03401		(impure)
->20	beshort	04001		(swapped)
->20	beshort	05401		(paged)
->8	belong	>0		not stripped
->8	belong	0		stripped
->23	byte	x		- version %ld
->22	byte	x		.%ld
-#
-0	beshort	0x180		MIPSEB Ucode
-0	beshort	0x182		MIPSEL-BE Ucode
-# 32bit core file
-0	belong	0xdeadadb0	IRIX core dump
->4	belong	1		of
->16	string	>\0		'%s'
-# 64bit core file
-0	belong	0xdeadad40	IRIX 64-bit core dump
->4	belong	1		of
->16	string	>\0		'%s'
-# N32bit core file
-0       belong	0xbabec0bb	IRIX N32 core dump
->4      belong	1               of
->16     string	>\0             '%s'
-# New style crash dump file
-0	string	\x43\x72\x73\x68\x44\x75\x6d\x70	IRIX vmcore dump of
->36	string	>\0					'%s'
-# Trusted IRIX info
-0	string	SGIAUDIT	SGI Audit file
->8	byte	x		- version %d
->9	byte	x		.%ld
-#
-0	string	WNGZWZSC	Wingz compiled script
-0	string	WNGZWZSS	Wingz spreadsheet
-0	string	WNGZWZHP	Wingz help file
-#
-0	string	\#Inventor V	IRIS Inventor 1.0 file
-0	string	\#Inventor V2	Open Inventor 2.0 file
-# GLF is OpenGL stream encoding
-0	string	glfHeadMagic();		GLF_TEXT
-4	belong	0x7d000000		GLF_BINARY_LSB_FIRST
-4	belong	0x0000007d		GLF_BINARY_MSB_FIRST
-# GLS is OpenGL stream encoding; GLS is the successor of GLF
-0	string	glsBeginGLS(		GLS_TEXT
-4	belong	0x10000000		GLS_BINARY_LSB_FIRST
-4	belong	0x00000010		GLS_BINARY_MSB_FIRST
-
-#------------------------------------------------------------------------------
-# mirage:  file(1) magic for Mirage executables
-#
-# XXX - byte order?
-#
-0	long	31415		Mirage Assembler m.out executable
-#-----------------------------------------------------------------------------
-# misctools:  file(1) magic for miscelanous UNIX tools.
-#
-0	string		%%!!		X-Post-It-Note text
-0	string          BEGIN:VCALENDAR         vCalendar calendar file
-
-#------------------------------------------------------------------------------
-# mkid:  file(1) magic for mkid(1) databases
-#
-# ID is the binary tags database produced by mkid(1).
-#
-# XXX - byte order?
-#
-0	string		\311\304	ID tags data
->2	short		>0		version %d
-
-#------------------------------------------------------------------------------
-# mlssa: file(1) magic for MLSSA datafiles
-#
-0		lelong		0xffffabcd	MLSSA datafile,
->4		leshort		x		algorithm %d,
->10		lelong		x		%d samples
-
-#------------------------------------------------------------------------------
-# mmdf:  file(1) magic for MMDF mail files
-#
-0	string	\001\001\001\001	MMDF mailbox
-#------------------------------------------------------------------------------
-# msad:  file(1) magic for msad
-# Microsoft visual C
-# This must precede the heuristic for raw G3 data
-4	string	Standard\ Jet\ DB	Microsoft Access Database
-
-#------------------------------------------------------------------------------
-# motorola:  file(1) magic for Motorola 68K and 88K binaries
-#
-# 68K
-#
-0	beshort		0520		mc68k COFF
->18	beshort		^00000020	object
->18	beshort		&00000020	executable
->12	belong		>0		not stripped
->168	string		.lowmem		Apple toolbox
->20	beshort		0407		(impure)
->20	beshort		0410		(pure)
->20	beshort		0413		(demand paged)
->20	beshort		0421		(standalone)
-0	beshort		0521		mc68k executable (shared)
->12	belong		>0		not stripped
-0	beshort		0522		mc68k executable (shared demand paged)
->12	belong		>0		not stripped
-#
-# Motorola/UniSoft 68K Binary Compatibility Standard (BCS)
-#
-0	beshort		0554		68K BCS executable
-#
-# 88K
-#
-# Motorola/88Open BCS
-#
-0	beshort		0555		88K BCS executable
-#
-# Motorola S-Records, from Gerd Truschinski <gt at freebsd.first.gmd.de>
-0   string      S0          Motorola S-Record; binary data in text format
-
-# ATARI ST relocatable PRG
-#
-# from Oskar Schirmer <schirmer at scara.com> Feb 3, 2001
-# (according to Roland Waldi, Oct 21, 1987)
-# besides the magic 0x601a, the text segment size is checked to be
-# not larger than 1 MB (which is a lot on ST).
-# The additional 0x601b distinction I took from Doug Lee's magic.
-0	belong&0xFFFFFFF0	0x601A0000	Atari ST M68K contiguous executable
->2	belong			x		(txt=%ld,
->6	belong			x		dat=%ld,
->10	belong			x		bss=%ld,
->14	belong			x		sym=%ld)
-0	belong&0xFFFFFFF0	0x601B0000	Atari ST M68K non-contig executable
->2	belong			x		(txt=%ld,
->6	belong			x		dat=%ld,
->10	belong			x		bss=%ld,
->14	belong			x		sym=%ld)
-
-# Atari ST/TT... program format (sent by Wolfram Kleff <kleff at cs.uni-bonn.de>)
-0       beshort         0x601A          Atari 68xxx executable,
->2      belong          x               text len %lu,
->6      belong          x               data len %lu,
->10     belong          x               BSS len %lu,
->14     belong          x               symboltab len %lu,
->18     belong          0
->22     belong          &0x01           fastload flag,
->22     belong          &0x02           may be loaded to alternate RAM,
->22     belong          &0x04           malloc may be from alternate RAM,
->22     belong          x               flags: 0x%lX,
->26     beshort         0               no relocation tab
->26     beshort         !0              + relocation tab
->30     string          SFX             [Self-Extracting LZH SFX archive]
->38     string          SFX             [Self-Extracting LZH SFX archive]
->44     string          ZIP!            [Self-Extracting ZIP SFX archive]
-
-0       beshort         0x0064          Atari 68xxx CPX file
->8      beshort         x               (version %04lx)
-
-#------------------------------------------------------------------------------
-# msdos:  file(1) magic for MS-DOS files
-#
-
-# .BAT files (Daniel Quinlan, quinlan at yggdrasil.com)
-0	string/c	@echo\ off	MS-DOS batch file text
-
-# XXX - according to Microsoft's spec, at an offset of 0x3c in a
-# PE-format executable is the offset in the file of the PE header;
-# unfortunately, that's a little-endian offset, and there's no way
-# to specify an indirect offset with a specified byte order.
-# So, for now, we assume the standard MS-DOS stub, which puts the
-# PE header at 0x80 = 128.
-#
-# Required OS version and subsystem version were 4.0 on some NT 3.51
-# executables built with Visual C++ 4.0, so it's not clear that
-# they're interesting.  The user version was 0.0, but there's
-# probably some linker directive to set it.  The linker version was
-# 3.0, except for one ".exe" which had it as 4.20 (same damn linker!).
-#
-128	string		PE\0\0	MS Windows PE
->150	leshort&0x0100	>0	32-bit
->132	leshort		0x0	unknown processor
->132	leshort		0x14c	Intel 80386
->132	leshort		0x166	MIPS R4000
->132	leshort		0x184	Alpha
->132	leshort		0x268	Motorola 68000
->132	leshort		0x1f0	PowerPC
->132	leshort		0x290	PA-RISC
->148	leshort		>27
->>220	leshort		0	unknown subsystem
->>220	leshort		1	native
->>220	leshort		2	GUI
->>220	leshort		3	console
->>220	leshort		7	POSIX
->150	leshort&0x2000	=0	executable
-#>>136	ledate		x	stamp %s,
->>150	leshort&0x0001	>0	not relocatable
-#>>150	leshort&0x0004	=0	with line numbers,
-#>>150	leshort&0x0008	=0	with local symbols,
-#>>150	leshort&0x0200	=0	with debug symbols,
->>150	leshort&0x1000	>0	system file
-#>>148	leshort		>0
-#>>>154	byte		x	linker %d
-#>>>155	byte		x	\b.%d,
-#>>148	leshort		>27
-#>>>192	leshort		x	requires OS %d
-#>>>194	leshort		x	\b.%d,
-#>>>196	leshort		x	user version %d
-#>>>198	leshort		x	\b.%d,
-#>>>200	leshort		x	subsystem version %d
-#>>>202	leshort		x	\b.%d,
->150	leshort&0x2000	>0	DLL
-#>>136	ledate		x	stamp %s,
->>150	leshort&0x0001	>0	not relocatable
-#>>150	leshort&0x0004	=0	with line numbers,
-#>>150	leshort&0x0008	=0	with local symbols,
-#>>150	leshort&0x0200	=0	with debug symbols,
->>150	leshort&0x1000	>0	system file
-#>>148	leshort		>0
-#>>>154	byte		x	linker %d
-#>>>155	byte		x	\b.%d,
-#>>148	leshort		>27
-#>>>192	leshort		x	requires OS %d
-#>>>194	leshort		x	\b.%d,
-#>>>196	leshort		x	user version %d
-#>>>198	leshort		x	\b.%d,
-#>>>200	leshort		x	subsystem version %d
-#>>>202	leshort		x	\b.%d,
-0	leshort		0x14c	MS Windows COFF Intel 80386 object file
-#>4	ledate		x	stamp %s
-0	leshort		0x166	MS Windows COFF MIPS R4000 object file
-#>4	ledate		x	stamp %s
-0	leshort		0x184	MS Windows COFF Alpha object file
-#>4	ledate		x	stamp %s
-0	leshort		0x268	MS Windows COFF Motorola 68000 object file
-#>4	ledate		x	stamp %s
-0	leshort		0x1f0	MS Windows COFF PowerPC object file
-#>4	ledate		x	stamp %s
-0	leshort		0x290	MS Windows COFF PA-RISC object file
-#>4	ledate		x	stamp %s
-
-# .EXE formats (Greg Roelofs, newt at uchicago.edu)
-#
-0	string	MZ		MS-DOS executable (EXE)
->24	string	@		\b, OS/2 or MS Windows
->>0xe7	string	LH/2\ Self-Extract	\b, %s
->>0xe9	string	PKSFX2		\b, %s
->>0x7a	string	Windows\ self-extracting\ ZIP	\b, %s
->0x1c	string	RJSX\xff\xff	\b, ARJ SFX
->0x1c	string	diet\xf9\x9c	\b, diet compressed
->0x1c	string	LZ09		\b, LZEXE v0.90 compressed
->0x1c	string	LZ91		\b, LZEXE v0.91 compressed
->0x1e	string	Copyright\ 1989-1990\ PKWARE\ Inc.	\b, PKSFX
-# JM: 0x1e "PKLITE Copr. 1990-92 PKWARE Inc. All Rights Reserved\7\0\0\0"
->0x1e	string	PKLITE\ Copr.	\b, %.6s compressed
->0x24	string	LHa's\ SFX	\b, %.15s
->0x24	string	LHA's\ SFX	\b, %.15s
->1638	string	-lh5-		\b, LHa SFX archive v2.13S
->7195	string	Rar!		\b, RAR self-extracting archive
-#
-# [GRR 950118:  file 3.15 has a buffer-size limitation; offsets bigger than
-#   8161 bytes are ignored.  To make the following entries work, increase
-#   HOWMANY in file.h to 32K at least, and maybe to 70K or more for OS/2,
-#   NT/Win32 and VMS.]
-# [GRR:  some company sells a self-extractor/displayer for image data(!)]
-#
->11696	string	PK\003\004	\b, PKZIP SFX archive v1.1
->13297	string	PK\003\004	\b, PKZIP SFX archive v1.93a
->15588	string	PK\003\004	\b, PKZIP2 SFX archive v1.09
->15770	string	PK\003\004	\b, PKZIP SFX archive v2.04g
->28374	string	PK\003\004	\b, PKZIP2 SFX archive v1.02
-#
-# Info-ZIP self-extractors
-#    these are the DOS versions:
->25115	string	PK\003\004	\b, Info-ZIP SFX archive v5.12
->26331	string	PK\003\004	\b, Info-ZIP SFX archive v5.12 w/decryption
-#    these are the OS/2 versions (OS/2 is flagged above):
->47031	string	PK\003\004	\b, Info-ZIP SFX archive v5.12
->49845	string	PK\003\004	\b, Info-ZIP SFX archive v5.12 w/decryption
-#    this is the NT/Win32 version:
->69120	string	PK\003\004	\b, Info-ZIP NT SFX archive v5.12 w/decryption
-#
-# TELVOX Teleinformatica CODEC self-extractor for OS/2:
->49801	string	\x79\xff\x80\xff\x76\xff	\b, CODEC archive v3.21
->>49824	leshort		=1			\b, 1 file
->>49824	leshort		>1			\b, %u files
-
-# .COM formats (Daniel Quinlan, quinlan at yggdrasil.com)
-# Uncommenting only the first two lines will cover about 2/3 of COM files,
-# but it isn't feasible to match all COM files since there must be at least
-# two dozen different one-byte "magics".
-#0	byte		0xe9		MS-DOS executable (COM)
-#>6	string	SFX\ of\ LHarc	(%s)
-#0	byte		0x8c		MS-DOS executable (COM)
-# 0xeb conflicts with "sequent" magic
-#0	byte		0xeb		MS-DOS executable (COM)
-#0	byte		0xb8		MS-DOS executable (COM)
-
-# miscellaneous formats
-0	string		LZ		MS-DOS executable (built-in)
-#0	byte		0xf0		MS-DOS program library data
-#
-
-#
-# Windows Registry files.
-#
-0	string		regf		Windows NT registry file
-0	string		CREG		Windows 95 registry file
-
-# Popular applications
-2080	string	Microsoft\ Word\ 6.0\ Document	%s
-2080	string	Documento\ Microsoft\ Word\ 6 Spanish Microsoft Word 6 document data
-# Pawel Wiecek <coven at i17linuxb.ists.pwr.wroc.pl> (for polish Word)
-2112	string	MSWordDoc			Microsoft Word document data
-#
-0	belong	0x31be0000			Microsoft Word Document
-#
-0       string  PO^Q`				Microsoft Word 6.0 Document
-#
-0	string	\376\067\0\043			Microsoft Office Document
-0	string	\320\317\021\340\241\261\032\341	Microsoft Office Document
-0	string	\333\245-\0\0\0			Microsoft Office Document
-#
-2080	string	Microsoft\ Excel\ 5.0\ Worksheet	%s
-#
-# Pawel Wiecek <coven at i17linuxb.ists.pwr.wroc.pl> (for polish Excel)
-2114	string	Biff5		Microsoft Excel 5.0 Worksheet
-#
-0	belong	0x00001a00	Lotus 1-2-3
->4	belong	0x00100400	wk3 document data
->4	belong	0x02100400	wk4 document data
->4	belong	0x07800100	fm3 or fmb document data
->4	belong	0x07800000	fm3 or fmb document data
-#
-0	belong	0x00000200 	Lotus 1-2-3
->4	belong	0x06040600	wk1 document data
->4	belong	0x06800200	fmt document data
-
-# Help files
-0	string	?_\3\0		MS Windows Help Data
-
-#  DeIsL1.isu what this is I don't know
-0	string	\161\250\000\000\001\002	DeIsL1.isu whatever that is
-
-# Winamp .avs
-#0	string	Nullsoft\ AVS\ Preset\ \060\056\061\032	A plug in for Winamp ms-windows Freeware media player
-0	string	Nullsoft\ AVS\ Preset\ 	Winamp plug in
-
-# Hyper terminal:
-0	string	HyperTerminal\ 	hyperterm
->15	string	1.0\ --\ HyperTerminal\ data\ file	MS-windows Hyperterminal
-
-# Windows Metafont .WMF
-0	string	\327\315\306\232\000\000\000\000\000\000	ms-windows metafont .wmf
-
-#tz3 files whatever that is (MS Works files)
-0	string	\003\001\001\004\070\001\000\000	tz3 ms-works file
-0	string	\003\002\001\004\070\001\000\000	tz3 ms-works file
-0	string	\003\003\001\004\070\001\000\000	tz3 ms-works file
-
-# PGP sig files .sig
-#0 string \211\000\077\003\005\000\063\237\127 065 to  \027\266\151\064\005\045\101\233\021\002 PGP sig
-0 string \211\000\077\003\005\000\063\237\127\065\027\266\151\064\005\045\101\233\021\002 PGP sig
-0 string \211\000\077\003\005\000\063\237\127\066\027\266\151\064\005\045\101\233\021\002 PGP sig
-0 string \211\000\077\003\005\000\063\237\127\067\027\266\151\064\005\045\101\233\021\002 PGP sig
-0 string \211\000\077\003\005\000\063\237\127\070\027\266\151\064\005\045\101\233\021\002 PGP sig
-0 string \211\000\077\003\005\000\063\237\127\071\027\266\151\064\005\045\101\233\021\002 PGP sig
-0 string \211\000\225\003\005\000\062\122\207\304\100\345\042 PGP sig
-
-# windows zips files .dmf
-0	string	MDIF\032\000\010\000\000\000\372\046\100\175\001\000\001\036\001\000 Ms-windows special zipped file
-
-
-# Windows help file FTG FTS
-0	string	\164\146\115\122\012\000\000\000\001\000\000\000	ms-windows help cache
-
-# grp old windows 3.1 group files
-0 string  \120\115\103\103	Ms-windows 3.1 group files
-
-
-# lnk files windows symlinks
-0	string	\114\000\000\000\001\024\002\000\000\000\000\000\300\000\000\000\000\000\000\106	ms-Windows shortcut
-
-#ico files
-0	string	\102\101\050\000\000\000\056\000\000\000\000\000\000\000	Icon for ms-windows
-
-# Windows icons (Ian Springer <ips at fpk.hp.com>)
-0	string	\000\000\001\000	ms-windows icon resource
->4	byte	1			- 1 icon
->4	byte	>1			- %d icons
->>6	byte	>0			\b, %dx
->>>7	byte	>0			\b%d
->>8	byte	0			\b, 256-colors
->>8	byte	>0			\b, %d-colors
-
-
-# .chr files
-0	string	PK\010\010BGI	Borland font 
->4	string	>\0	%s
-# then there is a copyright notice
-
-
-# .bgi files
-0	string	pk\010\010BGI	Borland device 
->4	string	>\0	%s
-# then there is a copyright notice
-
-
-# recycled/info the windows trash bin index
-9	string	\000\000\000\030\001\000\000\000 ms-windows recycled bin info
-
-
-##### put in Either Magic/font or Magic/news
-# Acroread or something  files wrongly identified as G3  .pfm
-# these have the form \000 \001 any? \002 \000 \000
-# or \000 \001 any? \022 \000 \000
-0	belong&0xffff00ff	0x00010012	PFM data
->4	string			\000\000
->6	string			>\060		- %s
-
-0	belong&0xffff00ff	0x00010002	PFM data
->4	string			\000\000
->6	string			>\060		- %s
-#0	string  \000\001 pfm?
-#>3	string  \022\000\000Copyright\  yes
-#>3	string  \002\000\000Copyright\  yes
-#>3	string  >\0     oops, not a font file. Cancel that.
-#it clashes with ttf files so put it lower down.
-
-# From Doug Lee via a FreeBSD pr
-9	string		GERBILDOC	First Choice document
-9	string		GERBILDB	First Choice database
-9	string		GERBILCLIP	First Choice database
-0	string		GERBIL		First Choice device file
-9	string		RABBITGRAPH	RabbitGraph file
-0	string		DCU1		Borland Delphi .DCU file
-0	string		!<spell>	MKS Spell hash list (old format)
-0	string		!<spell2>	MKS Spell hash list
-# Too simple - MPi
-#0	string		AH		Halo(TM) bitmapped font file
-0	lelong		0x08086b70	TurboC BGI file
-0	lelong		0x08084b50	TurboC Font file
-
-# WARNING: below line conflicts with Infocom game data Z-machine 3
-0	byte		0x03		DBase 3 data file
->0x04	lelong		0		(no records)
->0x04	lelong		>0		(%ld records)
-0	byte		0x83		DBase 3 data file with memo(s)
->0x04	lelong		0		(no records)
->0x04	lelong		>0		(%ld records)
-0	leshort		0x0006		DBase 3 index file
-0	string		PMCC		Windows 3.x .GRP file
-1	string		RDC-meg		MegaDots 
->8	byte		>0x2F		version %c
->9	byte		>0x2F		\b.%c file
-0	lelong		0x4C
->4	lelong		0x00021401	Windows shortcut file
-
-# DOS EPS Binary File Header
-# From: Ed Sznyter <ews at Black.Market.NET>
-0	belong		0xC5D0D3C6	DOS EPS Binary File
->4	long		>0		Postscript starts at byte %d
->>8	long		>0		length %d
->>>12	long		>0		Metafile starts at byte %d
->>>>16	long		>0		length %d
->>>20	long		>0		TIFF starts at byte %d
->>>>24	long		>0		length %d
-
-# TNEF magic From "Joomy" <joomy at se-ed.net> 
-0	leshort		0x223e9f78	TNEF
-
-# HtmlHelp files (.chm)
-0	string  ITSF\003\000\000\000\x60\000\000\000\001\000\000\000	MS Windows HtmlHelp Data
-
-# GFA-BASIC (Wolfram Kleff)
-2	string		GFA-BASIC3	GFA-BASIC 3 data
-
-# DJGPP compiled files
-# v >2, uses DPMI & small(2k) stub (Robert vd Boon, rjvdboon at europe.com)
-0x200	string		go32stub	DOS-executable compiled w/DJGPP
->0x20c	string		>0		(stub v%.4s)
->>0x8b2	string		djp		[compressed w/%s
->>>&1	string		>\0		%.4s]
->>0x8ad	string		UPX		[compressed w/%s
->>>&1	string		>\0		%.4s]
->>0x1c	string		pmodedj		stubbed with %s
-
-# QDOS
-4	belong		0x4AFB		QDOS executable
->9	pstring		x		'%s'
-0	beshort		0xFB01		QDOS object
->2	pstring		x		'%s'
-
-#------------------------------------------------------------------------------
-# From Stuart Caie <kyzer at 4u.net> (developer of cabextract)
-# Microsoft Cabinet files
-0	string		MSCF\0\0\0\0	Microsoft Cabinet file
->8	lelong		x		\b, %u bytes
->28	leshort		1		\b, 1 file
->28	leshort		>1		\b, %u files
-
-# InstallShield Cabinet files
-0	string		ISc(		InstallShield Cabinet file
->5	byte&0xf0	=0x60 		version 6,
->5	byte&0xf0	!0x60 		version 4/5,
->(12.l+40)	lelong	x		%u files
-
-# Windows CE package files
-0	string		MSCE\0\0\0\0	Microsoft WinCE install header
->20	lelong		0		\b, architecture-independent
->20	lelong		103		\b, Hitachi SH3
->20	lelong		104		\b, Hitachi SH4
->20	lelong		0xA11		\b, StrongARM
->20	lelong		4000		\b, MIPS R4000
->20	lelong		10003		\b, Hitachi SH3
->20	lelong		10004		\b, Hitachi SH3E
->20	lelong		10005		\b, Hitachi SH4
->20	lelong		70001		\b, ARM 7TDMI
->52	leshort		1 		\b, 1 file
->52	leshort		>1 		\b, %u files
->56	leshort		1 		\b, 1 registry entry
->56	leshort		>1 		\b, %u registry entries
-
-# Outlook Personal Folders
-0	lelong	0x4E444221	Microsoft Outlook binary email folder
-
-# From: Dirk Jagdmann <doj at cubic.org>
-0	lelong	0x00035f3f	Windows 3.x help file
-
-#------------------------------------------------------------------------------
-# modem:  file(1) magic for modem programs
-#
-# From: Florian La Roche <florian at knorke.saar.de>
-1	string		PC\ Research,\ Inc	Digifax-G3-File
->29	byte		1		\b, fine resolution
->29	byte		0		\b, normal resolution
-
-0	short		0x0100		raw G3 data, byte-padded
-0	short		0x1400		raw G3 data
-#
-# Magic data for vgetty voice formats
-# (Martin Seine & Marc Eberhard)
-
-#
-# raw modem data version 1
-#
-0    string    RMD1      raw modem data
->4   string    >\0       (%s /
->20  short     >0        compression type 0x%04x)
-
-#
-# portable voice format 1
-#
-0    string    PVF1\n         portable voice format
->5   string    >\0       (binary %s)
-
-#
-# portable voice format 2
-#
-0    string    PVF2\n         portable voice format
->5   string >\0          (ascii %s)
-
-
-#------------------------------------------------------------------------------
-# msvc:  file(1) magic for msvc
-# "H. Nanosecond" <aldomel at ix.netcom.com>
-# Microsoft visual C
-# 
-# I have version 1.0
-
-# .aps
-0	string	HWB\000\377\001\000\000\000	Microsoft Visual C .APS file
-
-# .ide
-#too long 0	string	\102\157\162\154\141\156\144\040\103\053\053\040\120\162\157\152\145\143\164\040\106\151\154\145\012\000\032\000\002\000\262\000\272\276\372\316	MSVC .ide
-0	string	\102\157\162\154\141\156\144\040\103\053\053\040\120\162\157	MSVC .ide
-
-# .res
-0	string	\000\000\000\000\040\000\000\000\377	MSVC .res
-0	string	\377\003\000\377\001\000\020\020\350	MSVC .res
-0	string	\377\003\000\377\001\000\060\020\350	MSVC .res
-
-#.lib
-0	string	\360\015\000\000	Microsoft Visual C library
-0	string	\360\075\000\000	Microsoft Visual C library
-0	string	\360\175\000\000	Microsoft Visual C library
-
-#.pch
-0	string	DTJPCH0\000\022\103\006\200	Microsoft Visual C .pch
-
-# .pdb
-# too long 0	string	Microsoft\ C/C++\ program\ database\ 
-0	string	Microsoft\ C/C++\ 	MSVC program database
->18	string	program\ database\ 	
->33	string	>\0	ver %s
-
-#.sbr
-0	string	\000\002\000\007\000	MSVC .sbr
->5	string 	>\0	%s
-
-#.bsc
-0	string	\002\000\002\001	MSVC .bsc
-
-#.wsp
-0	string	1.00\ .0000.0000\000\003	MSVC .wsp version 1.0000.0000
-# these seem to start with the version and contain menus
-
-#-----------------------------------------------------------------------------
-# natinst:  file(1) magic for National Instruments Code Files
-
-#
-# From <egamez at fcfm.buap.mx> Enrique G�mez-Flores
-# version 1
-# Many formats still missing, we use, for the moment LabVIEW
-# We guess VXI format file. VISA, LabWindowsCVI, BridgeVIEW, etc, are missing
-#
-0       string          RSRC            National Instruments,
-# Check if it's a LabVIEW File
->8      string          LV              LabVIEW File,
-# Check wich kind of file is
->>10    string          SB              Code Resource File, data
->>10    string          IN              Virtual Instrument Program, data
->>10    string          AR              VI Library, data
-# This is for Menu Libraries
->8      string          LMNULBVW        Portable File Names, data
-# This is for General Resources
->8      string          rsc             Resources File, data
-# This is for VXI Package
-0       string          VMAP            National Instruments, VXI File, data
-
-#------------------------------------------------------------------------------
-# ncr:  file(1) magic for NCR Tower objects
-#
-# contributed by
-# Michael R. Wayne  ***  TMC & Associates  ***  INTERNET: wayne at ford-vax.arpa
-# uucp: {philabs | pyramid} !fmsrl7!wayne   OR   wayne at fmsrl7.UUCP
-#
-0	beshort		000610	Tower/XP rel 2 object
->12	   belong		>0	not stripped
->20	   beshort		0407	executable
->20	   beshort		0410	pure executable
->22	   beshort		>0	- version %ld
-0	beshort		000615	Tower/XP rel 2 object
->12	   belong		>0	not stripped
->20	   beshort		0407	executable
->20	   beshort		0410	pure executable
->22	   beshort		>0	- version %ld
-0	beshort		000620	Tower/XP rel 3 object
->12	   belong		>0	not stripped
->20	   beshort		0407	executable
->20	   beshort		0410	pure executable
->22	   beshort		>0	- version %ld
-0	beshort		000625	Tower/XP rel 3 object
->12	   belong		>0	not stripped
->20	   beshort		0407	executable
->20	   beshort		0410	pure executable
->22	   beshort		>0	- version %ld
-0	beshort		000630	Tower32/600/400 68020 object
->12	   belong		>0	not stripped
->20	   beshort		0407	executable
->20	   beshort		0410	pure executable
->22	   beshort		>0	- version %ld
-0	beshort		000640	Tower32/800 68020
->18	   beshort		&020000	w/68881 object
->18	   beshort		&040000	compatible object
->18	   beshort		&~060000	object
->20	   beshort		0407	executable
->20	   beshort		0413	pure executable
->12	   belong		>0	not stripped
->22	   beshort		>0	- version %ld
-0	beshort		000645	Tower32/800 68010
->18	   beshort		&040000	compatible object
->18	   beshort		&~060000 object
->20	   beshort		0407	executable
->20	   beshort		0413	pure executable
->12	   belong		>0	not stripped
->22	   beshort		>0	- version %ld
-
-#------------------------------------------------------------------------------
-# netbsd:  file(1) magic for NetBSD objects
-#
-# All new-style magic numbers are in network byte order.
-#
-
-0	lelong			000000407	a.out NetBSD little-endian object file
->16	lelong			>0		not stripped
-0	belong			000000407	a.out NetBSD big-endian object file
->16	belong			>0		not stripped
-
-0	belong&0377777777	041400413	a.out NetBSD/i386 demand paged
->0	byte			&0x80		
->>20	lelong			<4096		shared library
->>20	lelong			=4096		dynamically linked executable
->>20	lelong			>4096		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	041400410	a.out NetBSD/i386 pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	041400407	a.out NetBSD/i386
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	lelong			!0		executable
->>20	lelong			=0		object file
->16	lelong			>0		not stripped
-0	belong&0377777777	041400507	a.out NetBSD/i386 core
->12	string			>\0		from '%s'
->32	lelong			!0		(signal %d)
-
-0	belong&0377777777	041600413	a.out NetBSD/m68k demand paged
->0	byte			&0x80		
->>20	belong			<8192		shared library
->>20	belong			=8192		dynamically linked executable
->>20	belong			>8192		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	041600410	a.out NetBSD/m68k pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	041600407	a.out NetBSD/m68k
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	belong			!0		executable
->>20	belong			=0		object file
->16	belong			>0		not stripped
-0	belong&0377777777	041600507	a.out NetBSD/m68k core
->12	string			>\0		from '%s'
->32	belong			!0		(signal %d)
-
-0	belong&0377777777	042000413	a.out NetBSD/m68k4k demand paged
->0	byte			&0x80		
->>20	belong			<4096		shared library
->>20	belong			=4096		dynamically linked executable
->>20	belong			>4096		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	042000410	a.out NetBSD/m68k4k pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	042000407	a.out NetBSD/m68k4k
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	belong			!0		executable
->>20	belong			=0		object file
->16	belong			>0		not stripped
-0	belong&0377777777	042000507	a.out NetBSD/m68k4k core
->12	string			>\0		from '%s'
->32	belong			!0		(signal %d)
-
-0	belong&0377777777	042200413	a.out NetBSD/ns32532 demand paged
->0	byte			&0x80		
->>20	lelong			<4096		shared library
->>20	lelong			=4096		dynamically linked executable
->>20	lelong			>4096		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	042200410	a.out NetBSD/ns32532 pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	042200407	a.out NetBSD/ns32532
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	lelong			!0		executable
->>20	lelong			=0		object file
->16	lelong			>0		not stripped
-0	belong&0377777777	042200507	a.out NetBSD/ns32532 core
->12	string			>\0		from '%s'
->32	lelong			!0		(signal %d)
-
-0	belong&0377777777	045200507	a.out NetBSD/powerpc core
->12	string			>\0		from '%s'
-
-0	belong&0377777777	042400413	a.out NetBSD/SPARC demand paged
->0	byte			&0x80		
->>20	belong			<8192		shared library
->>20	belong			=8192		dynamically linked executable
->>20	belong			>8192		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	042400410	a.out NetBSD/SPARC pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	042400407	a.out NetBSD/SPARC
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	belong			!0		executable
->>20	belong			=0		object file
->16	belong			>0		not stripped
-0	belong&0377777777	042400507	a.out NetBSD/SPARC core
->12	string			>\0		from '%s'
->32	belong			!0		(signal %d)
-
-0	belong&0377777777	042600413	a.out NetBSD/pmax demand paged
->0	byte			&0x80		
->>20	lelong			<4096		shared library
->>20	lelong			=4096		dynamically linked executable
->>20	lelong			>4096		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	042600410	a.out NetBSD/pmax pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	042600407	a.out NetBSD/pmax
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	lelong			!0		executable
->>20	lelong			=0		object file
->16	lelong			>0		not stripped
-0	belong&0377777777	042600507	a.out NetBSD/pmax core
->12	string			>\0		from '%s'
->32	lelong			!0		(signal %d)
-
-0	belong&0377777777	043000413	a.out NetBSD/vax 1k demand paged
->0	byte			&0x80		
->>20	lelong			<4096		shared library
->>20	lelong			=4096		dynamically linked executable
->>20	lelong			>4096		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	043000410	a.out NetBSD/vax 1k pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	043000407	a.out NetBSD/vax 1k
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	lelong			!0		executable
->>20	lelong			=0		object file
->16	lelong			>0		not stripped
-0	belong&0377777777	043000507	a.out NetBSD/vax 1k core
->12	string			>\0		from '%s'
->32	lelong			!0		(signal %d)
-
-0	belong&0377777777	045400413	a.out NetBSD/vax 4k demand paged
->0	byte			&0x80		
->>20	lelong			<4096		shared library
->>20	lelong			=4096		dynamically linked executable
->>20	lelong			>4096		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	045400410	a.out NetBSD/vax 4k pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	045400407	a.out NetBSD/vax 4k
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	lelong			!0		executable
->>20	lelong			=0		object file
->16	lelong			>0		not stripped
-0	belong&0377777777	045400507	a.out NetBSD/vax 4k core
->12	string			>\0		from '%s'
->32	lelong			!0		(signal %d)
-
-# NetBSD/alpha does not support (and has never supported) a.out objects,
-# so no rules are provided for them.  NetBSD/alpha ELF objects are 
-# dealt with in "elf".
-0	lelong		0x00070185		ECOFF NetBSD/alpha binary
->10	leshort		0x0001			not stripped
->10	leshort		0x0000			stripped
-0	belong&0377777777	043200507	a.out NetBSD/alpha core
->12	string			>\0		from '%s'
->32	lelong			!0		(signal %d)
-
-0	belong&0377777777	043400413	a.out NetBSD/mips demand paged
->0	byte			&0x80		
->>20	belong			<8192		shared library
->>20	belong			=8192		dynamically linked executable
->>20	belong			>8192		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	043400410	a.out NetBSD/mips pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	belong			>0		not stripped
-0	belong&0377777777	043400407	a.out NetBSD/mips
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	belong			!0		executable
->>20	belong			=0		object file
->16	belong			>0		not stripped
-0	belong&0377777777	043400507	a.out NetBSD/mips core
->12	string			>\0		from '%s'
->32	belong			!0		(signal %d)
-
-0	belong&0377777777	043600413	a.out NetBSD/arm32 demand paged
->0	byte			&0x80
->>20	lelong			<4096		shared library
->>20	lelong			=4096		dynamically linked executable
->>20	lelong			>4096		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	043600410	a.out NetBSD/arm32 pure
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80		executable
->16	lelong			>0		not stripped
-0	belong&0377777777	043600407	a.out NetBSD/arm32
->0	byte			&0x80		dynamically linked executable
->0	byte			^0x80
->>0	byte			&0x40		position independent
->>20	lelong			!0		executable
->>20	lelong			=0		object file
->16	lelong			>0		not stripped
-# NetBSD/arm26 has always used ELF objects, but it shares a core file
-# format with NetBSD/arm32.
-0	belong&0377777777	043600507	a.out NetBSD/arm core
->12	string			>\0		from '%s'
->32	lelong			!0		(signal %d)
-
-#------------------------------------------------------------------------------
-# netscape:  file(1) magic for Netscape files
-# "H. Nanosecond" <aldomel at ix.netcom.com>
-# version 3 and 4 I think
-#
-
-# Netscape Address book  .nab
-0	string \000\017\102\104\000\000\000\000\000\000\001\000\000\000\000\002\000\000\000\002\000\000\004\000 Netscape Address book
-
-# Netscape Communicator address book
-0   string   \000\017\102\111 Netscape Communicator address book
-
-# .snm Caches
-0	string		#\ Netscape\ folder\ cache	Netscape folder cache
-0	string	\000\036\204\220\000	Netscape folder cache
-# .n2p 
-# Net 2 Phone 
-#0	string	123\130\071\066\061\071\071\071\060\070\061\060\061\063\060
-0	string	SX961999	Net2phone
-
-#
-#This is files ending in .art, FIXME add more rules
-0       string          JG\004\016\0\0\0\0      ART
-
-#------------------------------------------------------------------------------
-# news:  file(1) magic for SunOS NeWS fonts (not "news" as in "netnews")
-#
-0	string		StartFontMetrics	ASCII font metrics
-0	string		StartFont	ASCII font bits
-0	belong		0x137A2944	NeWS bitmap font
-0	belong		0x137A2947	NeWS font family
-0	belong		0x137A2950	scalable OpenFont binary
-0	belong		0x137A2951	encrypted scalable OpenFont binary
-8	belong		0x137A2B45	X11/NeWS bitmap font
-8	belong		0x137A2B48	X11/NeWS font family
-#------------------------------------------------------------------------------
-# nitpicker:  file(1) magic for Flowfiles.
-# From: Christian Jachmann <C.Jachmann at gmx.net> http://www.nitpicker.de
-0	string	NPFF	NItpicker Flow File 
->4	byte	x	V%d.
->5	byte	x	%d
->6	bedate	x	started: %s
->10	bedate	x	stopped: %s
->14	belong	x	Bytes: %u
->18	belong	x	Bytes1: %u
->22	belong	x	Flows: %u
->26	belong	x	Pkts: %u
-
-#------------------------------------------------------------------------------
-# ocaml: file(1) magic for Objective Caml files.
-0	string	Caml1999	Objective caml
->8	string	X		exec file
->8	string	I		interface file (.cmi)
->8	string	O		object file (.cmo)
->8	string	A		library file (.cma)
->8	string	Y		native object file (.cmx)
->8	string	Z		native library file (.cmxa)
->8	string	M		abstract syntax tree implementation file
->8	string	N		abstract syntax tree interface file
->9	string	>\0		(Version %3.3s).
-#------------------------------------------------------------------------------
-# octave binary data file(1) magic, from Dirk Eddelbuettel <edd at debian.org>
-0	string		Octave-1-L	Octave binary data (little endian)
-0	string		Octave-1-B	Octave binary data (big endian)
-
-#------------------------------------------------------------------------------
-# olf:  file(1) magic for OLF executables
-#
-# We have to check the byte order flag to see what byte order all the
-# other stuff in the header is in.
-#
-# MIPS R3000 may also be for MIPS R2000.
-# What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
-#
-# Created by Erik Theisen <etheisen at openbsd.org>
-# Based on elf from Daniel Quinlan <quinlan at yggdrasil.com>
-0	string		\177OLF		OLF
->4	byte		0		invalid class
->4	byte		1		32-bit
->4	byte		2		64-bit
->7	byte		0		invalid os
->7	byte		1		OpenBSD
->7	byte		2		NetBSD
->7	byte		3		FreeBSD
->7	byte		4		4.4BSD
->7	byte		5		Linux
->7	byte		6		SVR4
->7	byte		7		esix
->7	byte		8		Solaris
->7	byte		9		Irix
->7	byte		10		SCO
->7	byte		11		Dell
->7	byte		12		NCR
->5	byte		0		invalid byte order
->5	byte		1		LSB
->>16	leshort		0		no file type,
->>16	leshort		1		relocatable,
->>16	leshort		2		executable,
->>16	leshort		3		shared object,
-# Core handling from Peter Tobias <tobias at server.et-inf.fho-emden.de>
-# corrections by Christian 'Dr. Disk' Hechelmann <drdisk at ds9.au.s.shuttle.de>
->>16	leshort		4		core file
->>>(0x38+0xcc) string	>\0		of '%s'
->>>(0x38+0x10) lelong	>0		(signal %d),
->>16	leshort		&0xff00		processor-specific,
->>18	leshort		0		no machine,
->>18	leshort		1		AT&T WE32100 - invalid byte order,
->>18	leshort		2		SPARC - invalid byte order,
->>18	leshort		3		Intel 80386,
->>18	leshort		4		Motorola 68000 - invalid byte order,
->>18	leshort		5		Motorola 88000 - invalid byte order,
->>18	leshort		6		Intel 80486,
->>18	leshort		7		Intel 80860,
->>18	leshort		8		MIPS R3000_BE - invalid byte order,
->>18	leshort		9		Amdahl - invalid byte order,
->>18	leshort		10		MIPS R3000_LE,
->>18	leshort		11		RS6000 - invalid byte order,
->>18	leshort		15		PA-RISC - invalid byte order,
->>18	leshort		16		nCUBE,
->>18	leshort		17		VPP500,
->>18	leshort		18		SPARC32PLUS,
->>18	leshort		20		PowerPC,
->>18	leshort		0x9026		Alpha,
->>20	lelong		0		invalid version
->>20	lelong		1		version 1
->>36	lelong		1		MathCoPro/FPU/MAU Required
->8	string		>\0		(%s)
->5	byte		2		MSB
->>16	beshort		0		no file type,
->>16	beshort		1		relocatable,
->>16	beshort		2		executable,
->>16	beshort		3		shared object,
->>16	beshort		4		core file,
->>>(0x38+0xcc) string	>\0		of '%s'
->>>(0x38+0x10) belong	>0		(signal %d),
->>16	beshort		&0xff00		processor-specific,
->>18	beshort		0		no machine,
->>18	beshort		1		AT&T WE32100,
->>18	beshort		2		SPARC,
->>18	beshort		3		Intel 80386 - invalid byte order,
->>18	beshort		4		Motorola 68000,
->>18	beshort		5		Motorola 88000,
->>18	beshort		6		Intel 80486 - invalid byte order,
->>18	beshort		7		Intel 80860,
->>18	beshort		8		MIPS R3000_BE,
->>18	beshort		9		Amdahl,
->>18	beshort		10		MIPS R3000_LE - invalid byte order,
->>18	beshort		11		RS6000,
->>18	beshort		15		PA-RISC,
->>18	beshort		16		nCUBE,
->>18	beshort		17		VPP500,
->>18	beshort		18		SPARC32PLUS,
->>18	beshort		20		PowerPC or cisco 4500,
->>18	beshort		21		cisco 7500,
->>18	beshort		24		cisco SVIP,
->>18	beshort		25		cisco 7200,
->>18	beshort		36		cisco 12000,
->>18	beshort		0x9026		Alpha,
->>20	belong		0		invalid version
->>20	belong		1		version 1
->>36	belong		1		MathCoPro/FPU/MAU Required
-
-#------------------------------------------------------------------------------
-# os2:  file(1) magic for OS/2 files
-#
-
-# Provided 1998/08/22 by
-# David Mediavilla <davidme.news at REMOVEIFNOTSPAMusa.net>
-1	string	InternetShortcut	MS Windows 95 Internet shortcut text
->24	string	>\			(URL=<%s>)
-
-# OS/2 URL objects
-# Provided 1998/08/22 by
-# David Mediavilla <davidme.news at REMOVEIFNOTSPAMusa.net>
-#0	string	http:			OS/2 URL object text
-#>5	string	>\			(WWW) <http:%s>
-#0	string	mailto:			OS/2 URL object text
-#>7	string	>\			(email) <%s>
-#0	string	news:			OS/2 URL object text
-#>5	string	>\			(Usenet) <%s>
-#0	string	ftp:			OS/2 URL object text
-#>4	string	>\			(FTP) <ftp:%s>
-#0	string	file:			OS/2 URL object text
-#>5	string	>\			(Local file) <%s>
-
-# >>>>> OS/2 INF/HLP <<<<<  (source: Daniel Dissett ddissett at netcom.com)
-# Carl Hauser (chauser.parc at xerox.com) and 
-# Marcus Groeber (marcusg at ph-cip.uni-koeln.de)
-# list the following header format in inf02a.doc:
-#
-#  int16 ID;           // ID magic word (5348h = "HS")
-#  int8  unknown1;     // unknown purpose, could be third letter of ID
-#  int8  flags;        // probably a flag word...
-#                      //  bit 0: set if INF style file
-#                      //  bit 4: set if HLP style file
-#                      // patching this byte allows reading HLP files
-#                      // using the VIEW command, while help files 
-#                      // seem to work with INF settings here as well.
-#  int16 hdrsize;      // total size of header
-#  int16 unknown2;     // unknown purpose
-# 
-0   string  HSP\x01\x9b\x00 OS/2 INF
->107 string >0                      (%s)
-0   string  HSP\x10\x9b\x00     OS/2 HLP
->107 string >0                      (%s)
-
-# OS/2 INI (this is a guess)
-0  string   \xff\xff\xff\xff\x14\0\0\0  OS/2 INI
-#
-# Copyright (c) 1996 Ignatios Souvatzis. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-#    must display the following acknowledgement:
-#      This product includes software developed by Ignatios Souvatzis for
-#      the NetBSD project.
-# 4. The name of the author may not be used to endorse or promote products
-#    derived from this software without specific prior written permission.
-#
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#
-#
-# OS9/6809 module descriptions:
-#
-0	beshort		0x87CD	OS9/6809 module:
-#
->6	byte&0x0f	0x00	non-executable
->6	byte&0x0f	0x01	machine language
->6	byte&0x0f	0x02	BASIC I-code
->6	byte&0x0f	0x03	P-code
->6	byte&0x0f	0x04	C I-code
->6	byte&0x0f	0x05	COBOL I-code
->6	byte&0x0f	0x06	FORTRAN I-code
-#
->6	byte&0xf0	0x10	program executable
->6	byte&0xf0	0x20	subroutine
->6	byte&0xf0	0x30	multi-module
->6	byte&0xf0	0x40	data module
-#
->6	byte&0xf0	0xC0	system module
->6	byte&0xf0	0xD0	file manager
->6	byte&0xf0	0xE0	device driver
->6	byte&0xf0	0xF0	device descriptor
-#
-# OS9/m68k stuff (to be continued)
-#
-0	beshort		0x4AFC	OS9/68K module:
-#
-# attr
->14	byte&0x80	0x80	re-entrant
->14	byte&0x40	0x40	ghost
->14	byte&0x20	0x20	system-state
-#
-# lang:
-#
->13	byte		1	machine language
->13	byte		2	BASIC I-code
->13	byte		3	P-code
->13	byte		4	C I-code
->13	byte		5	COBOL I-code
->13	byte		6	Fortran I-code
-#
-#
-# type:
-#
->12	byte		1	program executable
->12	byte		2	subroutine
->12	byte		3	multi-module
->12	byte		4	data module
->12	byte		11	trap library
->12	byte		12	system module
->12	byte		13	file manager
->12	byte		14	device driver
->12	byte		15	device descriptor
-#
-# Mach magic number info
-#
-0	long		0xefbe	OSF/Rose object
-# I386 magic number info
-#
-0	short		0565	i386 COFF object
-
-#------------------------------------------------------------------------------
-# palm:  file(1) magic for PalmOS {.prc,.pdb}: applications, docfiles, and hacks
-#
-# Brian Lalor <blalor at hcirisc.cs.binghamton.edu>
-
-# appl
-60      belong                  0x6170706c      PalmOS application
->0      string                  >\0             "%s"
-# TEXt
-60      belong                  0x54455874      AportisDoc file
->0      string                  >\0             "%s"
-# HACK
-60      belong                  0x4841434b      HackMaster hack
->0      string                  >\0             "%s"
-
-# Variety of PalmOS document types
-# Michael-John Turner <mj at debian.org>
-# Thanks to Hasan Umit Ezerce <humit at tr-net.net.tr> for his DocType
-60	string	                BVokBDIC	BDicty PalmOS document
->0	string                  >\0             "%s"
-60	string	                DB99DBOS	DB PalmOS document
->0	string                  >\0             "%s"
-60	string	                vIMGView	FireViewer/ImageViewer PalmOS document
->0	string                  >\0             "%s"
-60	string	                PmDBPmDB	HanDBase PalmOS document
->0	string                  >\0             "%s"
-60	string	                InfoINDB	InfoView PalmOS document
->0	string                  >\0             "%s"
-60	string	                ToGoToGo	iSilo PalmOS document
->0	string                  >\0             "%s"
-60	string	                JfDbJBas	JFile PalmOS document
->0	string                  >\0             "%s"
-60	string	                JfDbJFil	JFile Pro PalmOS document
->0	string                  >\0             "%s"
-60	string	                DATALSdb	List PalmOS document
->0	string                  >\0             "%s"
-60	string	                Mdb1Mdb1	MobileDB PalmOS document
->0	string                  >\0             "%s"
-60	string	                PNRdPPrs	PeanutPress PalmOS document
->0	string                  >\0             "%s"
-60	string	                DataPlkr	Plucker PalmOS document
->0	string                  >\0             "%s"
-60	string	                DataSprd	QuickSheet PalmOS document
->0	string                  >\0             "%s"
-60	string	                SM01SMem	SuperMemo PalmOS document
->0	string                  >\0             "%s"
-60	string	                DataTlPt	TealDoc PalmOS document
->0	string                  >\0             "%s"
-60	string	                InfoTlIf	TealInfo PalmOS document
->0	string                  >\0             "%s"
-60	string	                DataTlMl	TealMeal PalmOS document
->0	string                  >\0             "%s"
-60	string	                DataTlPt	TealPaint PalmOS document
->0	string                  >\0             "%s"
-60	string	                dataTDBP	ThinkDB PalmOS document
->0	string                  >\0             "%s"
-60	string	                TdatTide	Tides PalmOS document
->0	string                  >\0             "%s"
-60	string	                ToRaTRPW	TomeRaider PalmOS document
->0	string                  >\0             "%s"
-
-# A GutenPalm zTXT etext for use on Palm Pilots (http://gutenpalm.sf.net)
-# For version 1.xx zTXTs, outputs version and numbers of bookmarks and
-#   annotations.
-# For other versions, just outputs version.
-#
-60		string		zTXT		A GutenPalm zTXT e-book
->0		string		>\0		"%s"
->(0x4E.L)	byte		0
->>(0x4E.L+1)	byte		x		(v0.%02d)
->(0x4E.L)	byte		1
->>(0x4E.L+1)	byte		x		(v1.%02d)
->>>(0x4E.L+10)	beshort		>0
->>>>(0x4E.L+10) beshort		<2		- 1 bookmark
->>>>(0x4E.L+10) beshort		>1		- %d bookmarks
->>>(0x4E.L+14)	beshort		>0
->>>>(0x4E.L+14) beshort		<2		- 1 annotation
->>>>(0x4E.L+14) beshort		>1		- %d annotations
->(0x4E.L)	byte		>1		(v%d.
->>(0x4E.L+1)	byte		x		%02d)
-
-# Palm OS .prc file types
-60		string		libr		Palm OS dynamic library data
->0		string		>\0		"%s"
-60		string		ptch		Palm OS operating system patch data
->0		string		>\0		"%s"
-
-# Mobipocket (www.mobipocket.com), donated by Carl Witty
-60	string	                BOOKMOBI	Mobipocket E-book
->0	string                  >\0             "%s"
-
-#------------------------------------------------------------------------------
-#
-# Parix COFF executables
-# From: Ignatios Souvatzis <ignatios at cs.uni-bonn.de>
-#
-0	beshort&0xfff	0xACE	PARIX
->0	byte&0xf0	0x80	T800
->0	byte&0xf0	0x90	T9000
->19	byte&0x02	0x02	executable
->19	byte&0x02	0x00	object
->19	byte&0x0c	0x00	not stripped
-
-#------------------------------------------------------------------------------
-# pbm:  file(1) magic for Portable Bitmap files
-#
-# XXX - byte order?
-#
-0	short	0x2a17	"compact bitmap" format (Poskanzer)
-#------------------------------------------------------------------------------
-# pdf:  file(1) magic for Portable Document Format
-#
-
-0	string		%PDF-		PDF document
->5	byte		x		\b, version %c
->7	byte		x		\b.%c
-
-#------------------------------------------------------------------------------
-# pdp:  file(1) magic for PDP-11 executable/object and APL workspace
-#
-0	lelong		0101555		PDP-11 single precision APL workspace
-0	lelong		0101554		PDP-11 double precision APL workspace
-#
-# PDP-11 a.out
-#
-0	leshort		0407		PDP-11 executable
->8	leshort		>0		not stripped
->15	byte		>0		- version %ld
-
-0	leshort		0401		PDP-11 UNIX/RT ldp
-0	leshort		0405		PDP-11 old overlay
-
-0	leshort		0410		PDP-11 pure executable
->8	leshort		>0		not stripped
->15	byte		>0		- version %ld
-
-0	leshort		0411		PDP-11 separate I&D executable
->8	leshort		>0		not stripped
->15	byte		>0		- version %ld
-
-0	leshort		0437		PDP-11 kernel overlay
-
-# These last three are derived from 2.11BSD file(1)
-0	leshort		0413		PDP-11 demand-paged pure executable
->8	leshort		>0		not stripped
-
-0	leshort		0430		PDP-11 overlaid pure executable
->8	leshort		>0		not stripped
-
-0	leshort		0431		PDP-11 overlaid separate executable
->8	leshort		>0		not stripped
-
-#------------------------------------------------------------------------------
-# perl:  file(1) magic for Larry Wall's perl language.
-#
-# The ``eval'' line recognizes an outrageously clever hack for USG systems.
-# Keith Waclena <keith at cerberus.uchicago.edu>
-# Send additions to <perl5-porters at perl.org>
-0	string/b	#!\ /bin/perl			perl script text
-0	string		eval\ "exec\ /bin/perl		perl script text
-0	string/b	#!\ /usr/bin/perl		perl script text
-0	string		eval\ "exec\ /usr/bin/perl	perl script text
-0	string/b	#!\ /usr/local/bin/perl		perl script text
-0	string		eval\ "exec\ /usr/local/bin/perl	perl script text
-0	string		eval\ '(exit\ $?0)'\ &&\ eval\ 'exec	perl script text
-
-# a couple more, by me
-# XXX: christos matches
-#0	regex		package		Perl5 module source text (via regex)
-0	string		package		Perl5 module source text
-
-#------------------------------------------------------------------------------
-# pgp:  file(1) magic for Pretty Good Privacy
-#
-0       beshort         0x9900                  PGP key public ring
-0       beshort         0x9501                  PGP key security ring
-0       beshort         0x9500                  PGP key security ring
-0	beshort		0xa600			PGP encrypted data
-0       string          -----BEGIN\040PGP       PGP armored data
->15     string          PUBLIC\040KEY\040BLOCK- public key block
->15     string          MESSAGE-                message
->15     string          SIGNED\040MESSAGE-      signed message
->15     string          PGP\040SIGNATURE-       signature
-
-#------------------------------------------------------------------------------
-# pkgadd:  file(1) magic for SysV R4 PKG Datastreams
-#
-0       string          #\ PaCkAgE\ DaTaStReAm  pkg Datastream (SVR4)
-#------------------------------------------------------------------------------
-# plan9:  file(1) magic for AT&T Bell Labs' Plan 9 executables
-#
-0	belong		0x000001EB	Plan 9 executable
-
-#------------------------------------------------------------------------------
-# plus5:  file(1) magic for Plus Five's UNIX MUMPS
-#
-# XXX - byte order?  Paging Hokey....
-#
-0	short		0x259		mumps avl global
->2	byte		>0		(V%d)
->6	byte		>0		with %d byte name
->7	byte		>0		and %d byte data cells
-0	short		0x25a		mumps blt global
->2	byte		>0		(V%d)
->8	short		>0		- %d byte blocks
->15	byte		0x00		- P/D format
->15	byte		0x01		- P/K/D format
->15	byte		0x02		- K/D format
->15	byte		>0x02		- Bad Flags
-# SE Linux policy database
-0       lelong  0xf97cff8c      SE Linux policy
->16     lelong  x               v%d
->20     lelong  1 		MLS
->24     lelong  x       	%d symbols
->28     lelong  x       	%d ocons
-
-#------------------------------------------------------------------------------
-# printer:  file(1) magic for printer-formatted files
-#
-
-# PostScript, updated by Daniel Quinlan (quinlan at yggdrasil.com)
-0	string		%!		PostScript document text
->2	string		PS-Adobe-	conforming
->>11	string		>\0		at level %.3s
->>>15	string		EPS		- type %s
->>>15	string		Query		- type %s
->>>15	string		ExitServer	- type %s
-# Some PCs have the annoying habit of adding a ^D as a document separator
-0	string		\004%!		PostScript document text
->3	string		PS-Adobe-	conforming
->>12	string		>\0		at level %.3s
->>>16	string		EPS		- type %s
->>>16	string		Query		- type %s
->>>16	string		ExitServer	- type %s
-0	string		\033%-12345X%!PS	PostScript document
-
-
-# DOS EPS Binary File Header
-# From: Ed Sznyter <ews at Black.Market.NET>
-0       belong          0xC5D0D3C6      DOS EPS Binary File
->4      long            >0              Postscript starts at byte %d
->>8     long            >0              length %d
->>>12   long            >0              Metafile starts at byte %d
->>>>16  long            >0              length %d
->>>20   long            >0              TIFF starts at byte %d
->>>>24  long            >0              length %d
-
-# Adobe's PostScript Printer Description (PPD) files
-#       Yves Arrouye <arrouye at marin.fdn.fr>
-#
-0      string          *PPD-Adobe:    PPD file
->13    string          x              \b, ve
-
-# HP Printer Job Language
-0	string		\033%-12345X at PJL	HP Printer Job Language data
-# HP Printer Job Language
-# The header found on Win95 HP plot files is the "Silliest Thing possible" 
-# (TM)
-# Every driver puts the language at some random position, with random case
-# (LANGUAGE and Language)
-# For example the LaserJet 5L driver puts the "PJL ENTER LANGUAGE" in line 10
-# From: Uwe Bonnes <bon at elektron.ikp.physik.th-darmstadt.de>
-# 
-0	string		\033%-12345X at PJL	HP Printer Job Language data
->&0	string		>\0			%s			
->>&0	string		>\0			%s			
->>>&0	string		>\0			%s		
->>>>&0	string		>\0			%s		
-#>15	string		\ ENTER\ LANGUAGE\ =
-#>31	string		PostScript		PostScript
-
-# HP Printer Control Language, Daniel Quinlan (quinlan at yggdrasil.com)
-0	string		\033E\033	HP PCL printer data
->3	string		\&l0A		- default page size
->3	string		\&l1A		- US executive page size
->3	string		\&l2A		- US letter page size
->3	string		\&l3A		- US legal page size
->3	string		\&l26A		- A4 page size
->3	string		\&l80A		- Monarch envelope size
->3	string		\&l81A		- No. 10 envelope size
->3	string		\&l90A		- Intl. DL envelope size
->3	string		\&l91A		- Intl. C5 envelope size
->3	string		\&l100A		- Intl. B5 envelope size
->3	string		\&l-81A		- No. 10 envelope size (landscape)
->3	string		\&l-90A		- Intl. DL envelope size (landscape)
-
-# IMAGEN printer-ready files:
-0	string	@document(		Imagen printer
-# this only works if "language xxx" is first item in Imagen header.
->10	string	language\ impress	(imPRESS data)
->10	string	language\ daisy		(daisywheel text)
->10	string	language\ diablo	(daisywheel text)
->10	string	language\ printer	(line printer emulation)
->10	string	language\ tektronix	(Tektronix 4014 emulation)
-# Add any other languages that your Imagen uses - remember
-# to keep the word `text' if the file is human-readable.
-# [GRR 950115:  missing "postscript" or "ultrascript" (whatever it was called)]
-#
-# Now magic for IMAGEN font files...
-0	string		Rast		RST-format raster font data
->45	string		>0		face %
-# From Jukka Ukkonen
-0	string		\033[K\002\0\0\017\033(a\001\0\001\033(g	Canon Bubble Jet BJC formatted data
-
-# From <mike at flyn.org>
-# These are the /etc/magic entries to decode data sent to an Epson printer.
-0       string          \x1B\x40\x1B\x28\x52\x08\x00\x00REMOTE1P        Epson Stylus Color 460 data
-
-
-#------------------------------------------------------------------------------
-# zenographics:  file(1) magic for Zenographics ZjStream printer data
-# Rick Richardson  rickr at mn.rr.com
-0	string		JZJZ
->0x12	string		ZZ		Zenographics ZjStream printer data (big-endian)
-0	string		ZJZJ
->0x12	string		ZZ		Zenographics ZjStream printer data (little-endian)
-
-
-#------------------------------------------------------------------------------
-# Oak Technologies printer stream
-# Rick Richardson <rickr at mn.rr.com>
-0       string          OAK
->0x07	byte		0
->0x0b	byte		0	Oak Technologies printer stream
-
-# This would otherwise be recognized as PostScript - nick at debian.org
-0	string		%!VMF 		SunClock's Vector Map Format data
-
-#------------------------------------------------------------------------------
-# HP LaserJet 1000 series downloadable firmware file
-0	string	\xbe\xefABCDEFGH	HP LaserJet 1000 series downloadable firmware   
-
-#------------------------------------------------------------------------------
-# project:  file(1) magic for Project management
-# 
-# Magic strings for ftnchek project files. Alexander Mai
-0	string	FTNCHEK_\ P	project file for ftnchek
->10	string	1		version 2.7
->10	string	2		version 2.8 to 2.10
->10	string	3		version 2.11 or later
-
-#------------------------------------------------------------------------------
-# psdbms:  file(1) magic for psdatabase
-#
-0	belong&0xff00ffff	0x56000000	ps database
->1	string	>\0	version %s
->4	string	>\0	from kernel %s
-
-#------------------------------------------------------------------------------
-# psion:  file(1) magic for Psion handhelds data
-# from: Peter Breitenlohner <peb at mppmu.mpg.de>
-#
-0	lelong		0x10000037	Psion Series 5
->4	lelong		0x10000039	font file
->4	lelong		0x1000003A	printer driver
->4	lelong		0x1000003B	clipboard
->4	lelong		0x10000042	multi-bitmap image
->4	lelong		0x1000006A	application infomation file
->4	lelong		0x1000006D
->>8	lelong		0x1000007D	sketch image
->>8	lelong		0x1000007E	voice note
->>8	lelong		0x1000007F	word file
->>8	lelong		0x10000085	OPL program
->>8	lelong		0x10000088	sheet file
->>8	lelong		0x100001C4	EasyFax initialisation file
->4	lelong		0x10000073	OPO module
->4	lelong		0x10000074	OPL application
->4	lelong		0x1000008A	exported multi-bitmap image
-
-0	lelong		0x10000041	Psion Series 5 ROM multi-bitmap image
-
-0	lelong		0x10000050	Psion Series 5
->4	lelong		0x1000006D	database
->4	lelong		0x100000E4	ini file
-
-0	lelong		0x10000079	Psion Series 5 binary:
->4	lelong		0x00000000	DLL
->4	lelong		0x10000049	comms hardware library
->4	lelong		0x1000004A	comms protocol library
->4	lelong		0x1000005D	OPX
->4	lelong		0x1000006C	application
->4	lelong		0x1000008D	DLL
->4	lelong		0x100000AC	logical device driver
->4	lelong		0x100000AD	physical device driver
->4	lelong		0x100000E5	file transfer protocol
->4	lelong		0x100000E5	file transfer protocol
->4	lelong		0x10000140	printer defintion
->4	lelong		0x10000141	printer defintion
-
-0	lelong		0x1000007A	Psion Series 5 executable
-
-#------------------------------------------------------------------------------
-# pulsar:  file(1) magic for Pulsar POP3 daemon binary files
-#
-# http://pulsar.sourceforge.net
-# mailto:rok.papez at lugos.si
-#
-
-0	belong	0x1ee7f11e	Pulsar POP3 daemon mailbox cache file.
->4	ubelong	x		Version: %d.
->8	ubelong	x		\b%d
-
-
-#------------------------------------------------------------------------------
-# pyramid:  file(1) magic for Pyramids
-#
-# XXX - byte order?
-#
-0	long		0x50900107	Pyramid 90x family executable
-0	long		0x50900108	Pyramid 90x family pure executable
->16	long		>0		not stripped
-0	long		0x5090010b	Pyramid 90x family demand paged pure executable
->16	long		>0		not stripped
-
-#------------------------------------------------------------------------------
-# python:  file(1) magic for python
-#
-# From: David Necas <yeti at physics.muni.cz>
-# often the module starts with a multiline string
-0	string		"""	a python script text
-# MAGIC as specified in Python/import.c (1.5 to 2.3.0a)
-# 20121  ( YEAR - 1995 ) + MONTH  + DAY (little endian followed by "\r\n"
-0	belong		0x994e0d0a	python 1.5/1.6 byte-compiled
-0	belong		0x87c60d0a	python 2.0 byte-compiled
-0	belong		0x2aeb0d0a	python 2.1 byte-compiled
-0	belong		0x2ded0d0a	python 2.2 byte-compiled
-0	belong		0x3bf20d0a	python 2.3 byte-compiled
-
-#------------------------------------------------------------------------------
-# file(1) magic for revision control files
-# From Hendrik Scholz <hendrik at scholz.net>
-0   string /1\ :pserver:    cvs password text file
-
-#------------------------------------------------------------------------------
-# riff:  file(1) magic for RIFF format
-# See
-#
-#	http://www.seanet.com/users/matts/riffmci/riffmci.htm
-#
-# AVI section extended by Patrik R�dman <patrik+file-magic at iki.fi>
-#
-0	string		RIFF		RIFF (little-endian) data
-# RIFF Palette format
->8	string		PAL		\b, palette
->>16	leshort		x		\b, version %d
->>18	leshort		x		\b, %d entries
-# RIFF Device Independent Bitmap format
->8	string		RDIB		\b, device-independent bitmap
->>16	string		BM		
->>>30	leshort		12		\b, OS/2 1.x format
->>>>34	leshort		x		\b, %d x
->>>>36	leshort		x		%d
->>>30	leshort		64		\b, OS/2 2.x format
->>>>34	leshort		x		\b, %d x
->>>>36	leshort		x		%d
->>>30	leshort		40		\b, Windows 3.x format
->>>>34	lelong		x		\b, %d x
->>>>38	lelong		x		%d x
->>>>44	leshort		x		%d
-# RIFF MIDI format
->8	string		RMID		\b, MIDI
-# RIFF Multimedia Movie File format
->8	string		RMMP		\b, multimedia movie
-# Microsoft WAVE format (*.wav)
->8	string		WAVE		\b, WAVE audio
->>20	leshort		1		\b, Microsoft PCM
->>>34	leshort		>0		\b, %d bit
->>20	leshort		2		\b, Microsoft ADPCM
->>20	leshort		6		\b, ITU G.711 A-law
->>20	leshort		7		\b, ITU G.711 mu-law
->>20	leshort		17		\b, IMA ADPCM
->>20	leshort		20		\b, ITU G.723 ADPCM (Yamaha)
->>20	leshort		49		\b, GSM 6.10
->>20	leshort		64		\b, ITU G.721 ADPCM
->>20	leshort		80		\b, MPEG
->>20	leshort		85		\b, MPEG Layer 3
->>22	leshort		=1		\b, mono
->>22	leshort		=2		\b, stereo
->>22	leshort		>2		\b, %d channels
->>24	lelong		>0		%d Hz
-# Corel Draw Picture
->8	string		CDRA		\b, Corel Draw Picture
-# AVI == Audio Video Interleave
->8	string		AVI\040		\b, AVI
->>12    string          LIST
->>>20   string          hdrlavih
->>>>&36 lelong          x               \b, %lu x
->>>>&40 lelong          x               %lu,
->>>>&4  lelong          >1000000        <1 fps,
->>>>&4  lelong          1000000         1.00 fps,
->>>>&4  lelong          500000          2.00 fps,
->>>>&4  lelong          333333          3.00 fps,
->>>>&4  lelong          250000          4.00 fps,
->>>>&4  lelong          200000          5.00 fps,
->>>>&4  lelong          166667          6.00 fps,
->>>>&4  lelong          142857          7.00 fps,
->>>>&4  lelong          125000          8.00 fps,
->>>>&4  lelong          111111          9.00 fps,
->>>>&4  lelong          100000          10.00 fps,
-# ]9.9,10.1[
->>>>&4  lelong          <101010
->>>>>&-4        lelong  >99010
->>>>>>&-4       lelong  !100000         ~10 fps,
->>>>&4  lelong          83333           12.00 fps,
-# ]11.9,12.1[
->>>>&4  lelong          <84034
->>>>>&-4        lelong  >82645
->>>>>>&-4       lelong  !83333          ~12 fps,
->>>>&4  lelong          66667           15.00 fps,
-# ]14.9,15.1[
->>>>&4  lelong          <67114
->>>>>&-4        lelong  >66225
->>>>>>&-4       lelong  !66667          ~15 fps,
->>>>&4  lelong          50000           20.00 fps,
->>>>&4  lelong          41708           23.98 fps,
->>>>&4  lelong          41667           24.00 fps,
-# ]23.9,24.1[
->>>>&4  lelong          <41841
->>>>>&-4        lelong  >41494
->>>>>>&-4       lelong  !41708
->>>>>>>&-4      lelong  !41667          ~24 fps,
->>>>&4  lelong          40000           25.00 fps,
-# ]24.9,25.1[
->>>>&4  lelong          <40161
->>>>>&-4        lelong  >39841
->>>>>>&-4       lelong  !40000          ~25 fps,
->>>>&4  lelong          33367           29.97 fps,
->>>>&4  lelong          33333           30.00 fps,
-# ]29.9,30.1[
->>>>&4  lelong          <33445
->>>>>&-4        lelong  >33223
->>>>>>&-4       lelong  !33367
->>>>>>>&-4      lelong  !33333          ~30 fps,
->>>>&4  lelong          <32224          >30 fps,
-##>>>>&4  lelong          x               (%lu)
-##>>>>&20 lelong          x               %lu frames,
-# Note: The tests below assume that the AVI has 1 or 2 streams,
-#       "vids" optionally followed by "auds".
-#       (Should cover 99.9% of all AVIs.)
-# assuming avih length = 56
->>>88   string  LIST
->>>>96  string  strlstrh
->>>>>108        string  vids    video:
->>>>>>&0        lelong  0               uncompressed
-# skip past vids strh
->>>>>>(104.l+108)       string  strf
->>>>>>>(104.l+132)      lelong          1       RLE 8bpp
->>>>>>>(104.l+132)      string/c        cvid    Cinepak
->>>>>>>(104.l+132)      string/c        i263    Intel I.263
->>>>>>>(104.l+132)      string/c        iv32    Indeo 3.2
->>>>>>>(104.l+132)      string/c        iv41    Indeo 4.1
->>>>>>>(104.l+132)      string/c        iv50    Indeo 5.0
->>>>>>>(104.l+132)      string/c        mp42    Microsoft MPEG-4 v2
->>>>>>>(104.l+132)      string/c        mp43    Microsoft MPEG-4 v3
->>>>>>>(104.l+132)      string/c        mjpg    Motion JPEG
->>>>>>>(104.l+132)      string/c        div3    DivX 3
->>>>>>>>112             string/c        div3    Low-Motion
->>>>>>>>112             string/c        div4    Fast-Motion
->>>>>>>(104.l+132)      string/c        divx    DivX 4
->>>>>>>(104.l+132)      string/c        dx50    DivX 5
->>>>>>>(104.l+132)      string/c        xvid    XviD
->>>>>>>(104.l+132)      lelong  0
-##>>>>>>>(104.l+132)      string  x       (%.4s)
-# skip past first (video) LIST
->>>>(92.l+96)   string  LIST
->>>>>(92.l+104) string  strlstrh
->>>>>>(92.l+116)        string          auds    \b, audio:
-# auds strh length = 56:
->>>>>>>(92.l+172)       string          strf
->>>>>>>>(92.l+180)      leshort 0x0001  uncompressed PCM
->>>>>>>>(92.l+180)      leshort 0x0002  ADPCM
->>>>>>>>(92.l+180)      leshort 0x0055  MPEG-1 Layer 3
->>>>>>>>(92.l+180)      leshort 0x2000  Dolby AC3
->>>>>>>>(92.l+180)      leshort 0x0161  DivX
-##>>>>>>>>(92.l+180)      leshort x       (0x%.4x)
->>>>>>>>(92.l+182)      leshort 1       (mono,
->>>>>>>>(92.l+182)      leshort 2       (stereo,
->>>>>>>>(92.l+182)      leshort >2      (%d channels,
->>>>>>>>(92.l+184)      lelong  x       %d Hz)
-# auds strh length = 64:
->>>>>>>(92.l+180)       string          strf
->>>>>>>>(92.l+188)      leshort 0x0001  uncompressed PCM
->>>>>>>>(92.l+188)      leshort 0x0002  ADPCM
->>>>>>>>(92.l+188)      leshort 0x0055  MPEG-1 Layer 3
->>>>>>>>(92.l+188)      leshort 0x2000  Dolby AC3
->>>>>>>>(92.l+188)      leshort 0x0161  DivX
-##>>>>>>>>(92.l+188)      leshort x       (0x%.4x)
->>>>>>>>(92.l+190)      leshort 1       (mono,
->>>>>>>>(92.l+190)      leshort 2       (stereo,
->>>>>>>>(92.l+190)      leshort >2      (%d channels,
->>>>>>>>(92.l+192)      lelong  x       %d Hz)
-# Animated Cursor format
->8	string		ACON		\b, animated cursor
-# SoundFont 2 <mpruett at sgi.com>
->8	string		sfbk		SoundFont/Bank
-# MPEG-1 wrapped in a RIFF, apparently
->8      string          CDXA            \b, wrapped MPEG-1 (CDXA)
->8	string		4XMV		\b, 4X Movie file 
-
-#
-# XXX - some of the below may only appear in little-endian form.
-#
-# Also "MV93" appears to be for one form of Macromedia Director
-# files, and "GDMF" appears to be another multimedia format.
-#
-0	string		RIFX		RIFF (big-endian) data
-# RIFF Palette format
->8	string		PAL		\b, palette
->>16	beshort		x		\b, version %d
->>18	beshort		x		\b, %d entries
-# RIFF Device Independent Bitmap format
->8	string		RDIB		\b, device-independent bitmap
->>16	string		BM		
->>>30	beshort		12		\b, OS/2 1.x format
->>>>34	beshort		x		\b, %d x
->>>>36	beshort		x		%d
->>>30	beshort		64		\b, OS/2 2.x format
->>>>34	beshort		x		\b, %d x
->>>>36	beshort		x		%d
->>>30	beshort		40		\b, Windows 3.x format
->>>>34	belong		x		\b, %d x
->>>>38	belong		x		%d x
->>>>44	beshort		x		%d
-# RIFF MIDI format
->8	string		RMID		\b, MIDI
-# RIFF Multimedia Movie File format
->8	string		RMMP		\b, multimedia movie
-# Microsoft WAVE format (*.wav)
->8	string		WAVE		\b, WAVE audio
->>20	leshort		1		\b, Microsoft PCM
->>>34	leshort		>0		\b, %d bit
->>22	beshort		=1		\b, mono
->>22	beshort		=2		\b, stereo
->>22	beshort		>2		\b, %d channels
->>24	belong		>0		%d Hz
-# Corel Draw Picture
->8	string		CDRA		\b, Corel Draw Picture
-# AVI == Audio Video Interleave
->8	string		AVI\040		\b, AVI
-# Animated Cursor format
->8	string		ACON		\b, animated cursor
-# Notation Interchange File Format (big-endian only)
->8	string		NIFF		\b, Notation Interchange File Format
-# SoundFont 2 <mpruett at sgi.com>
->8	string		sfbk		SoundFont/Bank
-
-#------------------------------------------------------------------------------
-# apple:  file(1) magic for Apple file formats
-#
-0	string		FiLeStArTfIlEsTaRt	binscii (apple ][) text
-0	string		\x0aGL			Binary II (apple ][) data
-0	string		\x76\xff		Squeezed (apple ][) data
-0	string		NuFile			NuFile archive (apple ][) data
-0	string		N\xf5F\xe9l\xe5		NuFile archive (apple ][) data
-0	belong		0x00051600		AppleSingle encoded Macintosh file
-0	belong		0x00051607		AppleDouble encoded Macintosh file
-
-# magic for Newton PDA package formats
-# from Ruda Moura <ruda at helllabs.org>
-0	string	package0	Newton package, NOS 1.x,
->12	belong	&0x80000000	AutoRemove,
->12	belong	&0x40000000	CopyProtect,
->12	belong	&0x10000000	NoCompression,
->12	belong	&0x04000000	Relocation,
->12	belong	&0x02000000	UseFasterCompression,
->16	belong	x		version %d
-
-0	string	package1	Newton package, NOS 2.x,
->12	belong	&0x80000000	AutoRemove,
->12	belong	&0x40000000	CopyProtect,
->12	belong	&0x10000000	NoCompression,
->12	belong	&0x04000000	Relocation,
->12	belong	&0x02000000	UseFasterCompression,
->16	belong	x		version %d
-
-0	string	package4	Newton package,
->8	byte	8		NOS 1.x,
->8	byte	9		NOS 2.x,
->12	belong	&0x80000000	AutoRemove,
->12	belong	&0x40000000	CopyProtect,
->12	belong	&0x10000000	NoCompression,
-
-# The following entries for the Apple II are for files that have
-# been transferred as raw binary data from an Apple, without having
-# been encapsulated by any of the above archivers.
-#
-# In general, Apple II formats are hard to identify because Apple DOS
-# and especially Apple ProDOS have strong typing in the file system and
-# therefore programmers never felt much need to include type information
-# in the files themselves.
-#
-# Eric Fischer <enf at pobox.com>
-
-# AppleWorks word processor:
-#
-# This matches the standard tab stops for an AppleWorks file, but if
-# a file has a tab stop set in the first four columns this will fail.
-#
-# The "O" is really the magic number, but that's so common that it's
-# necessary to check the tab stops that follow it to avoid false positives.
-
-4       string          O====   AppleWorks word processor data
->85     byte&0x01       >0      \b, zoomed
->90     byte&0x01       >0      \b, paginated
->92     byte&0x01       >0      \b, with mail merge
-#>91    byte            x       \b, left margin %d
-
-# AppleWorks database:
-#
-# This isn't really a magic number, but it's the closest thing to one
-# that I could find.  The 1 and 2 really mean "order in which you defined
-# categories" and "left to right, top to bottom," respectively; the D and R
-# mean that the cursor should move either down or right when you press Return.
-
-#30	string		\x01D	AppleWorks database data
-#30	string		\x02D	AppleWorks database data
-#30	string		\x01R	AppleWorks database data
-#30	string		\x02R	AppleWorks database data
-
-# AppleWorks spreadsheet:
-#
-# Likewise, this isn't really meant as a magic number.  The R or C means
-# row- or column-order recalculation; the A or M means automatic or manual
-# recalculation.
-
-#131	string		RA	AppleWorks spreadsheet data
-#131	string		RM	AppleWorks spreadsheet data
-#131	string		CA	AppleWorks spreadsheet data
-#131	string		CM	AppleWorks spreadsheet data
-
-# Applesoft BASIC:
-#
-# This is incredibly sloppy, but will be true if the program was
-# written at its usual memory location of 2048 and its first line
-# number is less than 256.  Yuck.
-
-0       belong&0xff00ff 0x80000 Applesoft BASIC program data
-#>2     leshort         x       \b, first line number %d
-
-# ORCA/EZ assembler:
-# 
-# This will not identify ORCA/M source files, since those have
-# some sort of date code instead of the two zero bytes at 6 and 7
-# XXX Conflicts with ELF
-#4       belong&0xff00ffff       0x01000000      ORCA/EZ assembler source data
-#>5      byte                    x               \b, build number %d
-
-# Broderbund Fantavision
-#
-# I don't know what these values really mean, but they seem to recur.
-# Will they cause too many conflicts?
-
-# Probably :-)
-#2	belong&0xFF00FF		0x040008	Fantavision movie data
-
-# Some attempts at images.
-#
-# These are actually just bit-for-bit dumps of the frame buffer, so
-# there's really no reasonably way to distinguish them except for their
-# address (if preserved) -- 8192 or 16384 -- and their length -- 8192
-# or, occasionally, 8184.
-#
-# Nevertheless this will manage to catch a lot of images that happen
-# to have a solid-colored line at the bottom of the screen.
-
-8144	string	\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F	Apple II image with white background
-8144	string	\x55\x2A\x55\x2A\x55\x2A\x55\x2A	Apple II image with purple background
-8144	string	\x2A\x55\x2A\x55\x2A\x55\x2A\x55	Apple II image with green background
-8144	string	\xD5\xAA\xD5\xAA\xD5\xAA\xD5\xAA	Apple II image with blue background
-8144	string	\xAA\xD5\xAA\xD5\xAA\xD5\xAA\xD5	Apple II image with orange background
-
-# Beagle Bros. Apple Mechanic fonts
-
-0	belong&0xFF00FFFF	0x6400D000	Apple Mechanic font
-
-#------------------------------------------------------------------------------
-# macintosh description
-#
-# BinHex is the Macintosh ASCII-encoded file format (see also "apple")
-# Daniel Quinlan, quinlan at yggdrasil.com
-11	string	must\ be\ converted\ with\ BinHex	BinHex binary text
->41	string	x					\b, version %.3s
-
-# Stuffit archives are the de facto standard of compression for Macintosh
-# files obtained from most archives. (franklsm at tuns.ca)
-0	string		SIT!			StuffIt Archive (data)
->2	string		x			: %s
-0	string		SITD			StuffIt Deluxe (data)
->2	string		x			: %s
-0	string		Seg			StuffIt Deluxe Segment (data)
->2	string		x			: %s
-
-# Newer StuffIt archives (grant at netbsd.org)
-0	string		StuffIt			StuffIt Archive
->162	string		>0			: %s
-
-# Macintosh Applications and Installation binaries (franklsm at tuns.ca)
-0	string		APPL			Macintosh Application (data)
->2	string		x			\b: %s
-
-# Macintosh System files (franklsm at tuns.ca)
-0	string		zsys			Macintosh System File (data)
-0	string		FNDR			Macintosh Finder (data)
-0	string		libr			Macintosh Library (data)
->2	string		x			: %s
-0	string		shlb			Macintosh Shared Library (data)
->2	string		x			: %s
-0	string		cdev			Macintosh Control Panel (data)
->2	string		x			: %s
-0	string		INIT			Macintosh Extension (data)
->2	string		x			: %s
-0	string		FFIL			Macintosh Truetype Font (data)
->2	string		x			: %s
-0	string		LWFN			Macintosh Postscript Font (data)
->2	string		x			: %s
-
-# Additional Macintosh Files (franklsm at tuns.ca)
-0	string		PACT			Macintosh Compact Pro Archive (data)
->2	string		x			: %s
-0	string		ttro			Macintosh TeachText File (data)
->2	string		x			: %s
-0	string		TEXT			Macintosh TeachText File (data)
->2	string		x			: %s
-0	string		PDF			Macintosh PDF File (data)
->2	string		x			: %s
-
-# MacBinary format (Eric Fischer, enf at pobox.com)
-#
-# Unfortunately MacBinary doesn't really have a magic number prior
-# to the MacBinary III format.  The checksum is really the way to
-# do it, but the magic file format isn't up to the challenge.
-#
-# 0	byte		0
-# 1	byte				# filename length
-# 2	string				# filename
-# 65    string				# file type
-# 69	string				# file creator
-# 73	byte				# Finder flags
-# 74	byte		0
-# 75	beshort				# vertical posn in window
-# 77	beshort				# horiz posn in window
-# 79	beshort				# window or folder ID
-# 81    byte				# protected?
-# 82	byte		0
-# 83	belong				# length of data segment
-# 87	belong				# length of resource segment
-# 91	belong				# file creation date
-# 95	belong				# file modification date
-# 99	beshort				# length of comment after resource
-# 101	byte				# new Finder flags
-# 102	string		mBIN		# (only in MacBinary III)
-# 106	byte				# char. code of file name
-# 107	byte				# still more Finder flags
-# 116	belong				# total file length
-# 120	beshort				# length of add'l header
-# 122	byte		129		# for MacBinary II
-# 122	byte		130		# for MacBinary III
-# 123	byte		129		# minimum version that can read fmt
-# 124	beshort				# checksum
-#
-# This attempts to use the version numbers as a magic number, requiring
-# that the first one be 0x80, 0x81, 0x82, or 0x83, and that the second
-# be 0x81.  This works for the files I have, but maybe not for everyone's.
-
-# Unfortunately, this magic is quite weak - MPi
-#122	beshort&0xFCFF	0x8081		Macintosh MacBinary data
-
-# MacBinary I doesn't have the version number field at all, but MacBinary II
-# has been in use since 1987 so I hope there aren't many really old files
-# floating around that this will miss.  The original spec calls for using
-# the nulls in 0, 74, and 82 as the magic number.
-#
-# Another possibility, that would also work for MacBinary I, is to use
-# the assumption that 65-72 will all be ASCII (0x20-0x7F), that 73 will
-# have bits 1 (changed), 2 (busy), 3 (bozo), and 6 (invisible) unset,
-# and that 74 will be 0.  So something like
-# 
-# 71 	belong&0x80804EFF 0x00000000 	Macintosh MacBinary data
-# 
-# >73	byte&0x01	0x01		\b, inited
-# >73	byte&0x02	0x02		\b, changed
-# >73	byte&0x04	0x04		\b, busy
-# >73	byte&0x08	0x08		\b, bozo
-# >73	byte&0x10	0x10		\b, system
-# >73	byte&0x10	0x20		\b, bundle
-# >73	byte&0x10	0x40		\b, invisible
-# >73	byte&0x10	0x80		\b, locked
-
-#>65	string		x		\b, type "%4.4s"
-
-#>65	string		8BIM		(PhotoShop)
-#>65	string		ALB3		(PageMaker 3)
-#>65	string		ALB4		(PageMaker 4)
-#>65	string		ALT3		(PageMaker 3)
-#>65	string		APPL		(application)
-#>65	string		AWWP		(AppleWorks word processor)
-#>65	string		CIRC		(simulated circuit)
-#>65	string		DRWG		(MacDraw)
-#>65	string		EPSF		(Encapsulated PostScript)
-#>65	string		FFIL		(font suitcase)
-#>65	string		FKEY		(function key)
-#>65	string		FNDR		(Macintosh Finder)
-#>65	string		GIFf		(GIF image)
-#>65	string		Gzip		(GNU gzip)
-#>65	string		INIT		(system extension)
-#>65	string		LIB\ 		(library)
-#>65	string		LWFN		(PostScript font)
-#>65	string		MSBC		(Microsoft BASIC)
-#>65	string		PACT		(Compact Pro archive)
-#>65	string		PDF\ 		(Portable Document Format)
-#>65	string		PICT		(picture)
-#>65	string		PNTG		(MacPaint picture)
-#>65	string		PREF		(preferences)
-#>65	string		PROJ		(Think C project)
-#>65	string		QPRJ		(Think Pascal project)
-#>65	string		SCFL		(Defender scores)
-#>65	string		SCRN		(startup screen)
-#>65	string		SITD		(StuffIt Deluxe)
-#>65	string		SPn3		(SuperPaint)
-#>65	string		STAK		(HyperCard stack)
-#>65	string		Seg\ 		(StuffIt segment)
-#>65	string		TARF		(Unix tar archive)
-#>65	string		TEXT		(ASCII)
-#>65	string		TIFF		(TIFF image)
-#>65	string		TOVF		(Eudora table of contents)
-#>65	string		WDBN		(Microsoft Word word processor)
-#>65	string		WORD		(MacWrite word processor)
-#>65	string		XLS\ 		(Microsoft Excel)
-#>65	string		ZIVM		(compress (.Z))
-#>65	string		ZSYS		(Pre-System 7 system file)
-#>65	string		acf3		(Aldus FreeHand)
-#>65	string		cdev		(control panel)
-#>65	string		dfil		(Desk Acessory suitcase)
-#>65	string		libr		(library)
-#>65	string		nX^d		(WriteNow word processor)
-#>65	string		nX^w		(WriteNow dictionary)
-#>65	string		rsrc		(resource)
-#>65	string		scbk		(Scrapbook)
-#>65	string		shlb		(shared library)
-#>65	string		ttro		(SimpleText read-only)
-#>65	string		zsys		(system file)
-
-#>69	string		x		\b, creator "%4.4s"
-
-# Somewhere, Apple has a repository of registered Creator IDs.  These are
-# just the ones that I happened to have files from and was able to identify.
-
-#>69	string		8BIM		(Adobe Photoshop)
-#>69	string		ALD3		(PageMaker 3)
-#>69	string		ALD4		(PageMaker 4)
-#>69	string		ALFA		(Alpha editor)
-#>69	string		APLS		(Apple Scanner)
-#>69	string		APSC		(Apple Scanner)
-#>69	string		BRKL		(Brickles)
-#>69	string		BTFT		(BitFont)
-#>69	string		CCL2 		(Common Lisp 2)
-#>69	string		CCL\ 		(Common Lisp)
-#>69	string		CDmo		(The Talking Moose)
-#>69	string		CPCT		(Compact Pro)
-#>69	string		CSOm		(Eudora)
-#>69	string		DMOV		(Font/DA Mover)
-#>69	string		DSIM		(DigSim)
-#>69	string		EDIT		(Macintosh Edit)
-#>69	string		ERIK		(Macintosh Finder)
-#>69	string		EXTR		(self-extracting archive)
-#>69	string		Gzip		(GNU gzip)
-#>69	string		KAHL		(Think C)
-#>69	string		LWFU		(LaserWriter Utility)
-#>69	string		LZIV		(compress)
-#>69	string		MACA		(MacWrite)
-#>69	string		MACS		(Macintosh operating system)
-#>69	string		MAcK		(MacKnowledge terminal emulator)
-#>69	string		MLND		(Defender)
-#>69	string		MPNT		(MacPaint)
-#>69	string		MSBB		(Microsoft BASIC (binary))
-#>69	string		MSWD		(Microsoft Word)
-#>69	string		NCSA		(NCSA Telnet)
-#>69	string		PJMM		(Think Pascal)
-#>69	string		PSAL		(Hunt the Wumpus)
-#>69	string		PSI2		(Apple File Exchange)
-#>69	string		R*ch		(BBEdit)
-#>69	string		RMKR		(Resource Maker)
-#>69	string		RSED		(Resource Editor)
-#>69	string		Rich		(BBEdit)
-#>69	string		SIT!		(StuffIt)
-#>69	string		SPNT		(SuperPaint)
-#>69	string		Unix		(NeXT Mac filesystem)
-#>69	string		VIM!		(Vim editor)
-#>69	string		WILD		(HyperCard)
-#>69	string		XCEL		(Microsoft Excel)
-#>69	string		aCa2		(Fontographer)
-#>69	string		aca3		(Aldus FreeHand)
-#>69	string		dosa		(Macintosh MS-DOS file system)
-#>69	string		movr		(Font/DA Mover)
-#>69	string		nX^n		(WriteNow)
-#>69	string		pdos		(Apple ProDOS file system)
-#>69	string		scbk		(Scrapbook)
-#>69	string		ttxt		(SimpleText)
-#>69	string		ufox		(Foreign File Access)
-
-# Just in case...
-
-102	string		mBIN		MacBinary III data with surprising version number
-
-# sas magic from Bruce Foster (bef at nwu.edu)
-#
-#0	string		SAS		SAS
-#>8	string		x		%s
-0	string		SAS		SAS
->24	string		DATA		data file
->24	string		CATALOG		catalog
->24	string		INDEX		data file index
->24	string		VIEW		data view
-# sas 7+ magic from Reinhold Koch (reinhold.koch at roche.com)
-#
-0x54    string          SAS             SAS 7+
->0x9C   string          DATA            data file
->0x9C   string          CATALOG         catalog
->0x9C   string          INDEX           data file index
->0x9C   string          VIEW            data view
-
-# spss magic for SPSS system and portable files, 
-#	 from Bruce Foster (bef at nwu.edu).
-
-0	long		0xc1e2c3c9	SPSS Portable File
->40	string 		x		%s
-
-0	string		$FL2		SPSS System File
->24	string		x		%s
-
-# Macintosh filesystem data
-# From "Tom N Harris" <telliamed at mac.com>
-# Fixed HFS+ and Partition map magic: Ethan Benson <erbenson at alaska.net>
-# The MacOS epoch begins on 1 Jan 1904 instead of 1 Jan 1970, so these
-# entries depend on the data arithmetic added after v.35
-# There's also some Pascal strings in here, ditto...
-
-# The boot block signature, according to IM:Files, is 
-# "for HFS volumes, this field always contains the value 0x4C4B."
-# But if this is true for MFS or HFS+ volumes, I don't know.
-# Alternatively, the boot block is supposed to be zeroed if it's
-# unused, so a simply >0 should suffice.
-
-0x400	beshort			0xD2D7		Macintosh MFS data
->0	beshort			0x4C4B		(bootable)
->0x40a	beshort			&0x8000		(locked)
->0x402	beldate-0x7C25B080	x		created: %s,
->0x406	beldate-0x7C25B080	>0		last backup: %s,
->0x414	belong			x		block size: %d,
->0x412	beshort			x		number of blocks: %d,
->0x424	pstring			x		volume name: %s
-
-# "BD" is has many false positives
-#0x400	beshort			0x4244		Macintosh HFS data
-#>0	beshort			0x4C4B		(bootable)
-#>0x40a	beshort			&0x8000		(locked)
-#>0x40a	beshort			^0x0100		(mounted)
-#>0x40a	beshort			&0x0200		(spared blocks)
-#>0x40a	beshort			&0x0800		(unclean)
-#>0x47C	beshort			0x482B		(Embedded HFS+ Volume)
-#>0x402	beldate-0x7C25B080	x		created: %s,
-#>0x406	beldate-0x7C25B080	x		last modified: %s,
-#>0x440	beldate-0x7C25B080	>0		last backup: %s,
-#>0x414	belong			x		block size: %d,
-#>0x412	beshort			x		number of blocks: %d,
-#>0x424	pstring			x		volume name: %s
-
-0x400	beshort			0x482B		Macintosh HFS Extended
->&0	beshort			x		version %d data
->0	beshort			0x4C4B		(bootable)
->0x404	belong			^0x00000100	(mounted)
->&2	belong			&0x00000200	(spared blocks)
->&2	belong			&0x00000800	(unclean)
->&2	belong			&0x00008000	(locked)
->&6	string			x		last mounted by: '%.4s',
-# really, that should be treated as a belong and we print a string
-# based on the value. TN1150 only mentions '8.10' for "MacOS 8.1"
->&14	beldate-0x7C25B080	x		created: %s,
-# only the creation date is local time, all other timestamps in HFS+ are UTC.
->&18	bedate-0x7C25B080	x		last modified: %s,
->&22	bedate-0x7C25B080	>0		last backup: %s,
->&26	bedate-0x7C25B080	>0		last checked: %s,
->&38	belong			x		block size: %d,
->&42	belong			x		number of blocks: %d,
->&46	belong			x		free blocks: %d
-
-# I don't think this is really necessary since it doesn't do much and 
-# anything with a valid driver descriptor will also have a valid
-# partition map
-#0		beshort		0x4552		Apple Device Driver data
-#>&24		beshort		=1		\b, MacOS
-
-# Is that the partition type a cstring or a pstring? Well, IM says "strings 
-# shorter than 32 bytes must be terminated with NULL" so I'll treat it as a 
-# cstring. Of course, partitions can contain more than four entries, but 
-# what're you gonna do?
-0x200		beshort		0x504D		Apple Partition data
->0x2		beshort		x		block size: %d,
->0x230		string		x		first type: %s,
->0x210		string		x		name: %s,
->0x254		belong		x		number of blocks: %d,
->0x400		beshort		0x504D		
->>0x430		string		x		second type: %s,
->>0x410		string		x		name: %s,
->>0x454		belong		x		number of blocks: %d,
->>0x800		beshort		0x504D		
->>>0x830	string		x		third type: %s,
->>>0x810	string		x		name: %s,
->>>0x854	belong		x		number of blocks: %d,
->>>0xa00	beshort		0x504D		
->>>>0xa30	string		x		fourth type: %s,
->>>>0xa10	string		x		name: %s,
->>>>0xa54	belong		x		number of blocks: %d
-# AFAIK, only the signature is different
-0x200		beshort		0x5453		Apple Old Partition data
->0x2		beshort		x		block size: %d,
->0x230		string		x		first type: %s,
->0x210		string		x		name: %s,
->0x254		belong		x		number of blocks: %d,
->0x400		beshort		0x504D		
->>0x430		string		x		second type: %s,
->>0x410		string		x		name: %s,
->>0x454		belong		x		number of blocks: %d,
->>0x800		beshort		0x504D		
->>>0x830	string		x		third type: %s,
->>>0x810	string		x		name: %s,
->>>0x854	belong		x		number of blocks: %d,
->>>0xa00	beshort		0x504D		
->>>>0xa30	string		x		fourth type: %s,
->>>>0xa10	string		x		name: %s,
->>>>0xa54	belong		x		number of blocks: %d
-
-# From: Remi Mommsen <mommsen at slac.stanford.edu>
-0		string		BOMStore	Mac OS X bill of materials (BOM) fil
-#------------------------------------------------------------------------------
-#
-# RPM: file(1) magic for Red Hat Packages   Erik Troan (ewt at redhat.com)
-#
-0	beshort		0xedab
->2	beshort		0xeedb		RPM
->>4	byte		x		v%d
->>6	beshort		0		bin
->>6	beshort		1		src
->>8	beshort		1		i386
->>8	beshort		2		Alpha
->>8	beshort		3		Sparc
->>8	beshort		4		MIPS
->>8	beshort		5		PowerPC
->>8	beshort		6		68000
->>8	beshort		7	SGI
->>8	beshort		8		RS6000
->>8	beshort		9		IA64
->>8	beshort		10		Sparc64
->>8	beshort		11		MIPSel
->>8	beshort		12		ARM
->>10	string		x		%s
-
-#------------------------------------------------------------------------------
-# rtf:	file(1) magic for Rich Text Format (RTF)
-#
-# Duncan P. Simpson, D.P.Simpson at dcs.warwick.ac.uk
-#
-0	string		{\\rtf		Rich Text Format data,
->5	byte		x		version %c,
->6	string		\\ansi		ANSI
->6	string		\\mac		Apple Macintosh
->6	string		\\pc		IBM PC, code page 437
->6	string		\\pca		IBM PS/2, code page 850
-
-#------------------------------------------------------------------------------
-# sc:  file(1) magic for "sc" spreadsheet
-#
-38	string		Spreadsheet	sc spreadsheet file
-
-#------------------------------------------------------------------------------
-# sccs:  file(1) magic for SCCS archives
-#
-# SCCS archive structure:
-# \001h01207
-# \001s 00276/00000/00000
-# \001d D 1.1 87/09/23 08:09:20 ian 1 0
-# \001c date and time created 87/09/23 08:09:20 by ian
-# \001e
-# \001u
-# \001U
-# ... etc.
-# Now '\001h' happens to be the same as the 3B20's a.out magic number (0550).
-# *Sigh*. And these both came from various parts of the USG.
-# Maybe we should just switch everybody from SCCS to RCS!
-# Further, you can't just say '\001h0', because the five-digit number
-# is a checksum that could (presumably) have any leading digit,
-# and we don't have regular expression matching yet. 
-# Hence the following official kludge:
-8	string		\001s\ 			SCCS archive data
-
-#------------------------------------------------------------------------------
-# sendmail:  file(1) magic for sendmail config files
-#
-# XXX - byte order?
-#
-0	byte	046	  Sendmail frozen configuration 
->16	string	>\0	  - version %s
-0	short	0x271c	  Sendmail frozen configuration
->16	string	>\0	  - version %s
-
-#------------------------------------------------------------------------------
-# sendmail:  file(1) magic for sendmail m4(1) files
-#
-# From Hendrik Scholz <hendrik at scholz.net>
-# i.e. files in /usr/share/sendmail/cf/
-#
-0   string  divert(-1)\n    sendmail m4 text file
-
-
-#------------------------------------------------------------------------------
-# sequent:  file(1) magic for Sequent machines
-#
-# Sequent information updated by Don Dwiggins <atsun!dwiggins>.
-# For Sequent's multiprocessor systems (incomplete).
-0	lelong	0x00ea        	BALANCE NS32000 .o
->16	lelong	>0		not stripped
->124	lelong	>0		version %ld
-0	lelong	0x10ea        	BALANCE NS32000 executable (0 @ 0)
->16	lelong  >0            	not stripped
->124	lelong	>0		version %ld
-0	lelong	0x20ea        	BALANCE NS32000 executable (invalid @ 0)
->16	lelong  >0            	not stripped
->124	lelong	>0		version %ld
-0	lelong	0x30ea        	BALANCE NS32000 standalone executable
->16	lelong  >0          	not stripped
->124	lelong	>0		version %ld
-#
-# Symmetry information added by Jason Merrill <jason at jarthur.claremont.edu>.
-# Symmetry magic nums will not be reached if DOS COM comes before them;
-# byte 0xeb is matched before these get a chance.
-0	leshort	0x12eb		SYMMETRY i386 .o
->16	lelong	>0		not stripped
->124	lelong	>0		version %ld
-0	leshort	0x22eb		SYMMETRY i386 executable (0 @ 0)
->16	lelong	>0		not stripped
->124	lelong	>0		version %ld
-0	leshort	0x32eb		SYMMETRY i386 executable (invalid @ 0)
->16	lelong	>0		not stripped
->124	lelong	>0		version %ld
-0	leshort	0x42eb		SYMMETRY i386 standalone executable
->16	lelong	>0		not stripped
->124	lelong	>0		version %ld
-
-#------------------------------------------------------------------------------
-# sgi:  file(1) magic for Silicon Graphics applications
-
-#
-#
-# Performance Co-Pilot file types
-0	string	PmNs				PCP compiled namespace (V.0)
-0	string	PmN				PCP compiled namespace
->3	string	>\0				(V.%1.1s)
-3	belong	0x84500526			PCP archive
->7	byte	x				(V.%d)
->20	belong	-2				temporal index
->20	belong	-1				metadata
->20	belong	0				log volume #0
->20	belong	>0				log volume #%ld
->24	string	>\0				host: %s
-0	string	PCPFolio			PCP 
->9	string	Version:			Archive Folio
->18	string	>\0				(V.%s)
-0	string	#pmchart			PCP pmchart view
->9	string	Version
->17	string	>\0				(V%-3.3s)
-0	string	pmview				PCP pmview config
->7	string	Version
->15	string	>\0				(V%-3.3s)
-0	string	#pmlogger			PCP pmlogger config
->10	string	Version
->18	string	>\0				(V%1.1s)
-0	string	#pmdahotproc			PCP pmdahotproc config
->13	string	Version
->21	string	>\0				(V%-3.3s)
-0	string	PcPh				PCP Help 
->4	string	1				Index
->4	string	2				Text
->5	string	>\0				(V.%1.1s)
-0	string	#pmieconf-rules			PCP pmieconf rules
->16	string	>\0				(V.%1.1s)
-3	string	pmieconf-pmie			PCP pmie config
->17	string	>\0				(V.%1.1s)
-
-# SpeedShop data files
-0	lelong	0x13130303			SpeedShop data file
-
-# mdbm files
-0	lelong	0x01023962			mdbm file, version 0 (obsolete)
-0	string	mdbm				mdbm file,
->5	byte	x				version %d,
->6	byte	x				2^%d pages,
->7	byte	x				pagesize 2^%d,
->17	byte	x				hash %d,
->11	byte	x				dataformat %d
-
-# Alias|Wavefront Maya files
-0	string	//Maya ASCII	Alias|Wavefront Maya Ascii File,
->13	lelong	x	version %s
-8	string	MAYAFOR4	Alias|Wavefront Maya Binary File,
->32	lelong	x	version %s scene
-8	string	MayaFOR4	Alias|Wavefront Maya Binary File,
->32	lelong	x	version %s scene
-8	string	CIMG		Alias|Wavefront Maya Image File
-8	string	DEEP		Alias|Wavefront Maya Image File
-
-#------------------------------------------------------------------------------
-# sgml:  file(1) magic for Standard Generalized Markup Language
-# HyperText Markup Language (HTML) is an SGML document type,
-# from Daniel Quinlan (quinlan at yggdrasil.com)
-# adapted to string extenstions by Anthon van der Neut <anthon at mnt.org)
-0   string/cB	\<!DOCTYPE\ html	HTML document text
-0   string/cb	\<head			HTML document text
-0   string/cb	\<title			HTML document text
-0   string/cb	\<html			HTML document text
-
-# Extensible markup language (XML), a subset of SGML
-# from Marc Prud'hommeaux (marc at apocalypse.org)
-0	string/cb	\<?xml			XML document text
-0	string		\<?xml\ version "	XML
-0	string		\<?xml\ version="	XML
->15	string		>\0			%.3s document text
->>23	string		\<xsl:stylesheet	(XSL stylesheet)
->>24	string		\<xsl:stylesheet	(XSL stylesheet)
-0	string/b	\<?xml			XML document text
-0	string/cb	\<?xml			broken XML document text
-
-
-# SGML, mostly from rph at sq
-0   string/cb	\<!doctype		exported SGML document text
-0   string/cb	\<!subdoc		exported SGML subdocument text
-0   string/cb	\<!--			exported SGML document text
-
-# Web browser cookie files
-# (Mozilla, Galeon, Netscape 4, Konqueror..)
-# Ulf Harnhammar <ulfh at update.uu.se>
-0	string	#\ HTTP\ Cookie\ File	Web browser cookie text
-0	string	#\ Netscape\ HTTP\ Cookie\ File	Netscape cookie text
-0	string	#\ KDE\ Cookie\ File	Konqueror cookie text
-
-#------------------------------------------------------------------------
-# file(1) magic for sharc files
-#
-# SHARC DSP, MIDI SysEx and RiscOS filetype definitions added by 
-# FutureGroove Music (dsp at futuregroove.de)
-
-#------------------------------------------------------------------------
-0	string			Draw		RiscOS Drawfile
-0	string			PACK		RiscOS PackdDir archive
-
-#------------------------------------------------------------------------
-# SHARC DSP stuff (based on the FGM SHARC DSP SDK)
-
-0	string			!		Assembler source
-0	string			Analog		ADi asm listing file
-0	string			.SYSTEM		SHARC architecture file
-0	string			.system		SHARC architecture file
-
-0	leshort			0x521C		SHARC COFF binary
->2	leshort			>1		, %hd sections
->>12	lelong			>0		, not stripped
-
-#------------------------------------------------------------------------------
-# sinclair:  file(1) sinclair QL
-
-# additions to /etc/magic by Thomas M. Ott (ThMO)
-
-# Sinclair QL floppy disk formats (ThMO)
-0	string	=QL5		QL disk dump data,
->3	string	=A		720 KB,
->3	string	=B		1.44 MB,
->3	string	=C		3.2 MB,
->4	string	>\0		label:%.10s
-
-# Sinclair QL OS dump (ThMO)
-# (NOTE: if `file' would be able to use indirect references in a endian format
-#	 differing from the natural host format, this could be written more
-#	 reliably and faster...)
-#
-# we *can't* lookup QL OS code dumps, because `file' is UNABLE to read more
-# than the first 8K of a file... #-(
-#
-#0		belong	=0x30000
-#>49124		belong	<47104
-#>>49128		belong	<47104
-#>>>49132	belong	<47104
-#>>>>49136	belong	<47104	QL OS dump data,
-#>>>>>49148	string	>\0	type %.3s,
-#>>>>>49142	string	>\0	version %.4s
-
-# Sinclair QL firmware executables (ThMO)
-0	string	NqNqNq`\004	QL firmware executable (BCPL)
-
-# Sinclair QL libraries (ThMO)
-0	beshort	=0xFB01		QL library archive data
-
-# Sinclair QL executbables (ThMO)
-6	beshort	=0x4AFB		QL executable,
->10	string	=\0		un-named
->8	beshort	=1
->>10	string	>\0		named: %.1s
->8	beshort	=2
->>10	string	>\0		named: %.2s
->8	beshort	=3
->>10	string	>\0		named: %.3s
->8	beshort	=4
->>10	string	>\0		named: %.4s
->8	beshort	=5
->>10	string	>\0		named: %.5s
->8	beshort	=6
->>10	string	>\0		named: %.6s
->8	beshort	=7
->>10	string	>\0		named: %.7s
->8	beshort	=8
->>10	string	>\0		named: %.8s
->8	beshort	=9
->>10	string	>\0		named: %.9s
->8	beshort	=10
->>10	string	>\0		named: %.10s
->8	beshort	=11
->>10	string	>\0		named: %.11s
->8	beshort	=12
->>10	string	>\0		named: %.12s
->8	beshort	=13
->>10	string	>\0		named: %.13s
->8	beshort	=14
->>10	string	>\0		named: %.14s
->8	beshort	=15
->>10	string	>\0		named: %.15s
->8	beshort	=16
->>10	string	>\0		named: %.16s
->8	beshort	=17
->>10	string	>\0		named: %.17s
->8	beshort	=18
->>10	string	>\0		named: %.18s
->8	beshort	=19
->>10	string	>\0		named: %.19s
->8	beshort	=20
->>10	string	>\0		named: %.20s
->8	beshort	>20
->>10	string	>\0		(truncated) named: %.20s
-
-# Sinclair QL rom (ThMO)
-0	belong	=0x4AFB0001	QL plugin-ROM data,
->10	string	=\0		un-named
->8	beshort	=1
->>10	string	>\0		named: %.1s
->8	beshort	=2
->>10	string	>\0		named: %.2s
->8	beshort	=3
->>10	string	>\0		named: %.3s
->8	beshort	=4
->>10	string	>\0		named: %.4s
->8	beshort	=5
->>10	string	>\0		named: %.5s
->8	beshort	=6
->>10	string	>\0		named: %.6s
->8	beshort	=7
->>10	string	>\0		named: %.7s
->8	beshort	=8
->>10	string	>\0		named: %.8s
->8	beshort	=9
->>10	string	>\0		named: %.9s
->8	beshort	=10
->>10	string	>\0		named: %.10s
->8	beshort	=11
->>10	string	>\0		named: %.11s
->8	beshort	=12
->>10	string	>\0		named: %.12s
->8	beshort	=13
->>10	string	>\0		named: %.13s
->8	beshort	=14
->>10	string	>\0		named: %.14s
->8	beshort	=15
->>10	string	>\0		named: %.15s
->8	beshort	=16
->>10	string	>\0		named: %.16s
->8	beshort	=17
->>10	string	>\0		named: %.17s
->8	beshort	=18
->>10	string	>\0		named: %.18s
->8	beshort	=19
->>10	string	>\0		named: %.19s
->8	beshort	=20
->>10	string	>\0		named: %.20s
->8	beshort	>20
->>10	string	>\0		(truncated) named: %.20s
-
-#------------------------------------------------------------------------------
-# Sketch Drawings: http://sketch.sourceforge.net/ 
-# From: Edwin Mons <e at ik.nu>
-0	string	##Sketch	Sketch document text
-
-#-----------------------------------------------
-# GNU Smalltalk image, starting at version 1.6.2
-# From: catull_us at yahoo.com
-#
-0	string	GSTIm\0\0	GNU SmallTalk
-# little-endian
->7	byte&1	=0		LE image version
->>10	byte	x		%d.
->>9	byte	x		\b%d.
->>8	byte	x		\b%d
-#>>12	lelong	x		, data: %ld
-#>>16	lelong	x		, table: %ld
-#>>20	lelong	x		, memory: %ld
-# big-endian
->7	byte&1	=1		BE image version
->>8	byte	x		%d.
->>9	byte	x		\b%d.
->>10	byte	x		\b%d
-#>>12	belong	x		, data: %ld
-#>>16	belong	x		, table: %ld
-#>>20	belong	x		, memory: %ld
-
-
-
-#------------------------------------------------------------------------------
-# sniffer:  file(1) magic for packet capture files
-#
-# From: guy at alum.mit.edu (Guy Harris)
-#
-
-#
-# Microsoft Network Monitor 1.x capture files.
-#
-0	string		RTSS		NetMon capture file
->5	byte		x		- version %d
->4	byte		x		\b.%d
->6	leshort		0		(Unknown)
->6	leshort		1		(Ethernet)
->6	leshort		2		(Token Ring)
->6	leshort		3		(FDDI)
->6	leshort		4		(ATM)
-
-#
-# Microsoft Network Monitor 2.x capture files.
-#
-0	string		GMBU		NetMon capture file
->5	byte		x		- version %d
->4	byte		x		\b.%d
->6	leshort		0		(Unknown)
->6	leshort		1		(Ethernet)
->6	leshort		2		(Token Ring)
->6	leshort		3		(FDDI)
->6	leshort		4		(ATM)
-
-#
-# Network General Sniffer capture files.
-# Sorry, make that "Network Associates Sniffer capture files."
-#
-0	string		TRSNIFF\ data\ \ \ \ \032	Sniffer capture file
->33	byte		2		(compressed)
->23	leshort		x		- version %d
->25	leshort		x		\b.%d
->32	byte		0		(Token Ring)
->32	byte		1		(Ethernet)
->32	byte		2		(ARCNET)
->32	byte		3		(StarLAN)
->32	byte		4		(PC Network broadband)
->32	byte		5		(LocalTalk)
->32	byte		6		(Znet)
->32	byte		7		(Internetwork Analyzer)
->32	byte		9		(FDDI)
->32	byte		10		(ATM)
-
-#
-# Cinco Networks NetXRay capture files.
-# Sorry, make that "Network General Sniffer Basic capture files."
-# Sorry, make that "Network Associates Sniffer Basic capture files."
-# Sorry, make that "Network Associates Sniffer Basic, and Windows
-# Sniffer Pro", capture files."
-#
-0	string		XCP\0		NetXRay capture file
->4	string		>\0		- version %s
->44	leshort		0		(Ethernet)
->44	leshort		1		(Token Ring)
->44	leshort		2		(FDDI)
->44	leshort		3		(WAN)
->44	leshort		8		(ATM)
->44	leshort		9		(802.11)
-
-#
-# "libpcap" capture files.
-# (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
-# the main program that uses that format, but there are other programs
-# that use "libpcap", or that use the same capture file format.)
-#
-0	ubelong		0xa1b2c3d4	tcpdump capture file (big-endian)
->4	beshort		x		- version %d
->6	beshort		x		\b.%d
->20	belong		0		(No link-layer encapsulation
->20	belong		1		(Ethernet
->20	belong		2		(3Mb Ethernet
->20	belong		3		(AX.25
->20	belong		4		(ProNET
->20	belong		5		(CHAOS
->20	belong		6		(Token Ring
->20	belong		7		(BSD ARCNET
->20	belong		8		(SLIP
->20	belong		9		(PPP
->20	belong		10		(FDDI
->20	belong		11		(RFC 1483 ATM
->20	belong		12		(raw IP
->20	belong		13		(BSD/OS SLIP
->20	belong		14		(BSD/OS PPP
->20	belong		50		(PPP or Cisco HDLC
->20	belong		51		(PPP-over-Ethernet
->20	belong		100		(RFC 1483 ATM
->20	belong		101		(raw IP
->20	belong		102		(BSD/OS SLIP
->20	belong		103		(BSD/OS PPP
->20	belong		104		(BSD/OS Cisco HDLC
->20	belong		105		(802.11
->20	belong		106		(Linux Classical IP over ATM
->20	belong		107		(Frame Relay
->20	belong		108		(OpenBSD loopback
->20	belong		109		(OpenBSD IPsec encrypted
->20	belong		112		(Cisco HDLC
->20	belong		113		(Linux "cooked"
->20	belong		114		(LocalTalk
->20	belong		117		(OpenBSD PFLOG
->20	belong		119		(802.11 with Prism header
->20	belong		123		(SunATM
->20	belong		127		(802.11 with radiotap header
->20	belong		129		(Linux ARCNET
->20	belong		140		(MTP2
->20	belong		141		(MTP3
->20	belong		143		(DOCSIS
->20	belong		144		(IrDA
->16	belong		x		\b, capture length %d)
-0	ulelong		0xa1b2c3d4	tcpdump capture file (little-endian)
->4	leshort		x		- version %d
->6	leshort		x		\b.%d
->20	lelong		0		(No link-layer encapsulation
->20	lelong		1		(Ethernet
->20	lelong		2		(3Mb Ethernet
->20	lelong		3		(AX.25
->20	lelong		4		(ProNET
->20	lelong		5		(CHAOS
->20	lelong		6		(Token Ring
->20	lelong		7		(ARCNET
->20	lelong		8		(SLIP
->20	lelong		9		(PPP
->20	lelong		10		(FDDI
->20	lelong		11		(RFC 1483 ATM
->20	lelong		12		(raw IP
->20	lelong		13		(BSD/OS SLIP
->20	lelong		14		(BSD/OS PPP
->20	lelong		50		(PPP or Cisco HDLC
->20	lelong		51		(PPP-over-Ethernet
->20	lelong		100		(RFC 1483 ATM
->20	lelong		101		(raw IP
->20	lelong		102		(BSD/OS SLIP
->20	lelong		103		(BSD/OS PPP
->20	lelong		104		(BSD/OS Cisco HDLC
->20	lelong		105		(802.11
->20	lelong		106		(Linux Classical IP over ATM
->20	lelong		107		(Frame Relay
->20	lelong		108		(OpenBSD loopback
->20	lelong		109		(OpenBSD IPSEC encrypted
->20	lelong		112		(Cisco HDLC
->20	lelong		113		(Linux "cooked"
->20	lelong		114		(LocalTalk
->20	lelong		117		(OpenBSD PFLOG
->20	lelong		119		(802.11 with Prism header
->20	lelong		123		(SunATM
->20	lelong		127		(802.11 with radiotap header
->20	lelong		129		(Linux ARCNET
->20	lelong		140		(MTP2
->20	lelong		141		(MTP3
->20	lelong		143		(DOCSIS
->20	lelong		144		(IrDA
->16	lelong		x		\b, capture length %d)
-
-#
-# "libpcap"-with-Alexey-Kuznetsov's-patches capture files.
-# (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
-# the main program that uses that format, but there are other programs
-# that use "libpcap", or that use the same capture file format.)
-#
-0	ubelong		0xa1b2cd34	extended tcpdump capture file (big-endian)
->4	beshort		x		- version %d
->6	beshort		x		\b.%d
->20	belong		0		(No link-layer encapsulation
->20	belong		1		(Ethernet
->20	belong		2		(3Mb Ethernet
->20	belong		3		(AX.25
->20	belong		4		(ProNET
->20	belong		5		(CHAOS
->20	belong		6		(Token Ring
->20	belong		7		(ARCNET
->20	belong		8		(SLIP
->20	belong		9		(PPP
->20	belong		10		(FDDI
->20	belong		11		(RFC 1483 ATM
->20	belong		12		(raw IP
->20	belong		13		(BSD/OS SLIP
->20	belong		14		(BSD/OS PPP
->16	belong		x		\b, capture length %d)
-0	ulelong		0xa1b2cd34	extended tcpdump capture file (little-endian)
->4	leshort		x		- version %d
->6	leshort		x		\b.%d
->20	lelong		0		(No link-layer encapsulation
->20	lelong		1		(Ethernet
->20	lelong		2		(3Mb Ethernet
->20	lelong		3		(AX.25
->20	lelong		4		(ProNET
->20	lelong		5		(CHAOS
->20	lelong		6		(Token Ring
->20	lelong		7		(ARCNET
->20	lelong		8		(SLIP
->20	lelong		9		(PPP
->20	lelong		10		(FDDI
->20	lelong		11		(RFC 1483 ATM
->20	lelong		12		(raw IP
->20	lelong		13		(BSD/OS SLIP
->20	lelong		14		(BSD/OS PPP
->16	lelong		x		\b, capture length %d)
-
-#
-# AIX "iptrace" capture files.
-#
-0	string		iptrace\ 1.0	"iptrace" capture file
-0	string		iptrace\ 2.0	"iptrace" capture file
-
-#
-# Novell LANalyzer capture files.
-#
-0	leshort		0x1001		LANalyzer capture file
-0	leshort		0x1007		LANalyzer capture file
-
-#
-# HP-UX "nettl" capture files.
-#
-0	string		\x54\x52\x00\x64\x00	"nettl" capture file
-
-#
-# RADCOM WAN/LAN Analyzer capture files.
-#
-0	string		\x42\xd2\x00\x34\x12\x66\x22\x88	RADCOM WAN/LAN Analyzer capture file
-
-#
-# NetStumbler log files.  Not really packets, per se, but about as
-# close as you can get.  These are log files from NetStumbler, a
-# Windows program, that scans for 802.11b networks.
-#
-0	string		NetS		NetStumbler log file
->8	lelong		x		\b, %d stations found
-
-#------------------------------------------------------------------------------
-# softquad:  file(1) magic for SoftQuad Publishing Software
-#
-# Author/Editor and RulesBuilder
-#
-# XXX - byte order?
-#
-0	string		\<!SQ\ DTD>	Compiled SGML rules file
->9	string		>\0		 Type %s
-0	string		\<!SQ\ A/E>	A/E SGML Document binary
->9	string		>\0		 Type %s
-0	string		\<!SQ\ STS>	A/E SGML binary styles file
->9	string		>\0		 Type %s
-0	short		0xc0de		Compiled PSI (v1) data
-0	short		0xc0da		Compiled PSI (v2) data
->3	string		>\0		(%s)
-# Binary sqtroff font/desc files...
-0	short		0125252		SoftQuad DESC or font file binary
->2	short		>0		- version %d
-# Bitmaps...
-0	string		SQ\ BITMAP1	SoftQuad Raster Format text
-#0	string		SQ\ BITMAP2	SoftQuad Raster Format data
-# sqtroff intermediate language (replacement for ditroff int. lang.)
-0	string		X\ 		SoftQuad troff Context intermediate
->2	string		495		for AT&T 495 laser printer
->2	string		hp		for Hewlett-Packard LaserJet
->2	string		impr		for IMAGEN imPRESS
->2	string		ps		for PostScript
-
-#------------------------------------------------------------------------------
-# spectrum:  file(1) magic for Spectrum emulator files.
-#
-# John Elliott <jce at seasip.demon.co.uk>
-
-#
-# Spectrum +3DOS header
-#
-0       string          PLUS3DOS\032    Spectrum +3 data
->15     byte            0               - BASIC program
->15     byte            1               - number array
->15     byte            2               - character array
->15     byte            3               - memory block
->>16    belong          0x001B0040      (screen)
->15     byte            4               - Tasword document
->15     string          TAPEFILE        - ZXT tapefile
-#
-# Tape file. This assumes the .TAP starts with a Spectrum-format header,
-# which nearly all will.
-#
-0       string          \023\000\000    Spectrum .TAP data
->4      string          x               "%-10.10s"
->3      byte            0               - BASIC program
->3      byte            1               - number array
->3      byte            2               - character array
->3      byte            3               - memory block
->>14    belong          0x001B0040      (screen)
-
-# The following three blocks are from pak21-spectrum at srcf.ucam.org
-# TZX tape images
-0      string          ZXTape!\x1a     Spectrum .TZX data
->8     byte            x               version %d
->9     byte            x               .%d
-
-# RZX input recording files
-0      string          RZX!            Spectrum .RZX data
->4     byte            x               version %d
->5     byte            x               .%d
-
-# And three sorts of disk image
-0      string          MV\ -\ CPCEMU\ Disk-Fil Amstrad/Spectrum .DSK data
-0      string          MV\ -\ CPC\ format\ Dis Amstrad/Spectrum DU54 .DSK data
-0      string          EXTENDED\ CPC\ DSK\ Fil Amstrad/Spectrum Extended .DSK data
-
-#------------------------------------------------------------------------------
-# sql:  file(1) magic for SQL files
-#
-# From: "Marty Leisner" <mleisner at eng.mc.xerox.com>
-# Recognize some MySQL files.
-#
-0	beshort			0xfe01		MySQL table definition file
->2	byte			x		Version %d
-0	belong&0xffffff00	0xfefe0300	MySQL MISAM index file
->3	byte			x		Version %d
-0	belong&0xffffff00	0xfefe0700	MySQL MISAM compressed data file
->3	byte			x		Version %d
-0	belong&0xffffff00	0xfefe0500	MySQL ISAM index file
->3	byte			x		Version %d
-0	belong&0xffffff00	0xfefe0600	MySQL ISAM compressed data file
->3	byte			x		Version %d
-0	string		 	\376bin		MySQL replication log
-
-#------------------------------------------------------------------------------
-# sun:  file(1) magic for Sun machines
-#
-# Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x
-# releases.  (5.x uses ELF.)
-#
-0	belong&077777777	0600413		SPARC demand paged
->0	byte		&0x80
->>20	belong		<4096		shared library
->>20	belong		=4096		dynamically linked executable
->>20	belong		>4096		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
-0	belong&077777777	0600410		SPARC pure
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
-0	belong&077777777	0600407		SPARC
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
-
-0	belong&077777777	0400413		mc68020 demand paged
->0	byte		&0x80
->>20	belong		<4096		shared library
->>20	belong		=4096		dynamically linked executable
->>20	belong		>4096		dynamically linked executable
->16	belong		>0		not stripped
-0	belong&077777777	0400410		mc68020 pure
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
-0	belong&077777777	0400407		mc68020
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
-
-0	belong&077777777	0200413		mc68010 demand paged
->0	byte		&0x80
->>20	belong		<4096		shared library
->>20	belong		=4096		dynamically linked executable
->>20	belong		>4096		dynamically linked executable
->16	belong		>0		not stripped
-0	belong&077777777	0200410		mc68010 pure
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
-0	belong&077777777	0200407		mc68010
->0	byte		&0x80		dynamically linked executable
->0	byte		^0x80		executable
->16	belong		>0		not stripped
-
-# reworked these to avoid anything beginning with zero becoming "old sun-2"
-0	belong		0407		old sun-2 executable
->16	belong		>0		not stripped
-0	belong		0410		old sun-2 pure executable
->16	belong		>0		not stripped
-0	belong		0413		old sun-2 demand paged executable
->16	belong		>0		not stripped
-
-#
-# Core files.  "SPARC 4.x BCP" means "core file from a SunOS 4.x SPARC
-# binary executed in compatibility mode under SunOS 5.x".
-#
-0	belong		0x080456	SunOS core file
->4	belong		432		(SPARC)
->>132	string		>\0		from '%s'
->>116	belong		=3		(quit)
->>116	belong		=4		(illegal instruction)
->>116	belong		=5		(trace trap)
->>116	belong		=6		(abort)
->>116	belong		=7		(emulator trap)
->>116	belong		=8		(arithmetic exception)
->>116	belong		=9		(kill)
->>116	belong		=10		(bus error)
->>116	belong		=11		(segmentation violation)
->>116	belong		=12		(bad argument to system call)
->>116	belong		=29		(resource lost)
->>120	belong		x		(T=%dK,
->>124	belong		x		D=%dK,
->>128	belong		x		S=%dK)
->4	belong		826		(68K)
->>128	string		>\0		from '%s'
->4	belong		456		(SPARC 4.x BCP)
->>152	string		>\0		from '%s'
-# Sun SunPC
-0	long		0xfa33c08e	SunPC 4.0 Hard Disk
-0	string		#SUNPC_CONFIG	SunPC 4.0 Properties Values
-# Sun snoop (see RFC 1761, which describes the capture file format).
-#
-0	string		snoop		Snoop capture file
->8	belong		>0		- version %ld
->12	belong		0		(IEEE 802.3)
->12	belong		1		(IEEE 802.4)
->12	belong		2		(IEEE 802.5)
->12	belong		3		(IEEE 802.6)
->12	belong		4		(Ethernet)
->12	belong		5		(HDLC)
->12	belong		6		(Character synchronous)
->12	belong		7		(IBM channel-to-channel adapter)
->12	belong		8		(FDDI)
->12	belong		9		(Unknown)
-
-# Microsoft ICM color profile
-36	string		acspMSFT	Microsoft ICM Color Profile
-# Sun KCMS
-36	string		acsp		Kodak Color Management System, ICC Profile
-
-#---------------------------------------------------------------------------
-# The following entries have been tested by Duncan Laurie <duncan at sun.com> (a
-# lead Sun/Cobalt developer) who agrees that they are good and worthy of
-# inclusion.
-
-# Boot ROM images for Sun/Cobalt Linux server appliances
-0       string  Cobalt\ Networks\ Inc.\nFirmware\ v     Paged COBALT boot rom
->38     string x        V%.4s
-
-# New format for Sun/Cobalt boot ROMs is annoying, it stores the version code
-# at the very end where file(1) can't get it.
-0       string CRfs     COBALT boot rom data (Flat boot rom or file system)
-
-
-#------------------------------------------------------------------------
-# sysex: file(1) magic for MIDI sysex files
-#
-# 
-0	byte			0xF0		SysEx File -
-
-# North American Group
->1	byte			0x01		Sequential
->1	byte			0x02		IDP
->1	byte			0x03		OctavePlateau
->1	byte			0x04		Moog
->1	byte			0x05		Passport
->1	byte			0x06		Lexicon
->1	byte			0x07		Kurzweil
->1	byte			0x08		Fender
->1	byte			0x09		Gulbransen
->1	byte			0x0a		AKG
->1	byte			0x0b		Voyce
->1	byte			0x0c		Waveframe
->1	byte			0x0d		ADA
->1	byte			0x0e		Garfield
->1	byte			0x0f		Ensoniq
->1	byte			0x10		Oberheim
->1	byte			0x11		Apple
->1	byte			0x12		GreyMatter
->1	byte			0x14		PalmTree
->1	byte			0x15		JLCooper
->1	byte			0x16		Lowrey
->1	byte			0x17		AdamsSmith
->1	byte			0x18		E-mu
->1	byte			0x19		Harmony
->1	byte			0x1a		ART
->1	byte			0x1b		Baldwin
->1	byte			0x1c		Eventide
->1	byte			0x1d		Inventronics
->1	byte			0x1f		Clarity
-
-# European Group
->1	byte			0x21		SIEL
->1	byte			0x22		Synthaxe
->1	byte			0x24		Hohner
->1	byte			0x25		Twister
->1	byte			0x26		Solton
->1	byte			0x27		Jellinghaus
->1	byte			0x28		Southworth
->1	byte			0x29		PPG
->1	byte			0x2a		JEN
->1	byte			0x2b		SSL
->1	byte			0x2c		AudioVertrieb
-
->1	byte			0x2f		ELKA
->>3	byte			0x09		EK-44
-
->1	byte			0x30		Dynacord
->1	byte			0x33		Clavia
->1	byte			0x39		Soundcraft
-
->1	byte			0x3e		Waldorf
->>3	byte			0x7f		Microwave I
-
-# Japanese Group
->1	byte			0x40		Kawai
->>3	byte			0x20		K1
->>3	byte			0x22		K4
-
->1	byte			0x41		Roland
->>3	byte			0x14		D-50
->>3	byte			0x2b		U-220
->>3	byte			0x02		TR-707
-
->1	byte			0x42		Korg
->>3	byte			0x19		M1
-
->1	byte			0x43		Yamaha
->1	byte			0x44		Casio
->1	byte			0x46		Kamiya
->1	byte			0x47		Akai
->1	byte			0x48		Victor
->1	byte			0x49		Mesosha
->1	byte			0x4b		Fujitsu
->1	byte			0x4c		Sony
->1	byte			0x4e		Teac
->1	byte			0x50		Matsushita
->1	byte			0x51		Fostex
->1	byte			0x52		Zoom
->1	byte			0x54		Matsushita
->1	byte			0x57		Acoustic tech. lab.
-
->1	belong&0xffffff00	0x00007400	Ta Horng
->1	belong&0xffffff00	0x00007500	e-Tek
->1	belong&0xffffff00	0x00007600	E-Voice
->1	belong&0xffffff00	0x00007700	Midisoft
->1	belong&0xffffff00	0x00007800	Q-Sound
->1	belong&0xffffff00	0x00007900	Westrex
->1	belong&0xffffff00	0x00007a00	Nvidia*
->1	belong&0xffffff00	0x00007b00	ESS
->1	belong&0xffffff00	0x00007c00	Mediatrix
->1	belong&0xffffff00	0x00007d00	Brooktree
->1	belong&0xffffff00	0x00007e00	Otari
->1	belong&0xffffff00	0x00007f00	Key Electronics
->1	belong&0xffffff00	0x00010000	Shure
->1	belong&0xffffff00	0x00010100	AuraSound
->1	belong&0xffffff00	0x00010200	Crystal
->1	belong&0xffffff00	0x00010300	Rockwell
->1	belong&0xffffff00	0x00010400	Silicon Graphics
->1	belong&0xffffff00	0x00010500	Midiman
->1	belong&0xffffff00	0x00010600	PreSonus
->1	belong&0xffffff00	0x00010800	Topaz
->1	belong&0xffffff00	0x00010900	Cast Lightning
->1	belong&0xffffff00	0x00010a00	Microsoft
->1	belong&0xffffff00	0x00010b00	Sonic Foundry
->1	belong&0xffffff00	0x00010c00	Line 6
->1	belong&0xffffff00	0x00010d00	Beatnik Inc.
->1	belong&0xffffff00	0x00010e00	Van Koerving
->1	belong&0xffffff00	0x00010f00	Altech Systems
->1	belong&0xffffff00	0x00011000	S & S Research
->1	belong&0xffffff00	0x00011100	VLSI Technology
->1	belong&0xffffff00	0x00011200	Chromatic
->1	belong&0xffffff00	0x00011300	Sapphire
->1	belong&0xffffff00	0x00011400	IDRC
->1	belong&0xffffff00	0x00011500	Justonic Tuning
->1	belong&0xffffff00	0x00011600	TorComp
->1	belong&0xffffff00	0x00011700	Newtek Inc.
->1	belong&0xffffff00	0x00011800	Sound Sculpture
->1	belong&0xffffff00	0x00011900	Walker Technical
->1	belong&0xffffff00	0x00011a00	Digital Harmony
->1	belong&0xffffff00	0x00011b00	InVision
->1	belong&0xffffff00	0x00011c00	T-Square
->1	belong&0xffffff00	0x00011d00	Nemesys
->1	belong&0xffffff00	0x00011e00	DBX
->1	belong&0xffffff00	0x00011f00	Syndyne
->1	belong&0xffffff00	0x00012000	Bitheadz	
->1	belong&0xffffff00	0x00012100	Cakewalk
->1	belong&0xffffff00	0x00012200	Staccato
->1	belong&0xffffff00	0x00012300	National Semicon.
->1	belong&0xffffff00	0x00012400	Boom Theory
->1	belong&0xffffff00	0x00012500	Virtual DSP Corp
->1	belong&0xffffff00	0x00012600	Antares
->1	belong&0xffffff00	0x00012700	Angel Software
->1	belong&0xffffff00	0x00012800	St Louis Music
->1	belong&0xffffff00	0x00012900	Lyrrus dba G-VOX
->1	belong&0xffffff00	0x00012a00	Ashley Audio
->1	belong&0xffffff00	0x00012b00	Vari-Lite
->1	belong&0xffffff00	0x00012c00	Summit Audio
->1	belong&0xffffff00	0x00012d00	Aureal Semicon.
->1	belong&0xffffff00	0x00012e00	SeaSound
->1	belong&0xffffff00	0x00012f00	U.S. Robotics
->1	belong&0xffffff00	0x00013000	Aurisis
->1	belong&0xffffff00	0x00013100	Nearfield Multimedia
->1	belong&0xffffff00	0x00013200	FM7 Inc.
->1	belong&0xffffff00	0x00013300	Swivel Systems
->1	belong&0xffffff00	0x00013400	Hyperactive
->1	belong&0xffffff00	0x00013500	MidiLite
->1	belong&0xffffff00	0x00013600	Radical
->1	belong&0xffffff00	0x00013700	Roger Linn
->1	belong&0xffffff00	0x00013800	Helicon
->1	belong&0xffffff00	0x00013900	Event
->1	belong&0xffffff00	0x00013a00	Sonic Network
->1	belong&0xffffff00	0x00013b00	Realtime Music
->1	belong&0xffffff00	0x00013c00	Apogee Digital
-
->1	belong&0xffffff00	0x00202b00	Medeli Electronics
->1	belong&0xffffff00	0x00202c00	Charlie Lab
->1	belong&0xffffff00	0x00202d00	Blue Chip Music
->1	belong&0xffffff00	0x00202e00	BEE OH Corp
->1	belong&0xffffff00	0x00202f00	LG Semicon America
->1	belong&0xffffff00	0x00203000	TESI
->1	belong&0xffffff00	0x00203100	EMAGIC
->1	belong&0xffffff00	0x00203200	Behringer
->1	belong&0xffffff00	0x00203300	Access Music
->1	belong&0xffffff00	0x00203400	Synoptic
->1	belong&0xffffff00	0x00203500	Hanmesoft Corp
->1	belong&0xffffff00	0x00203600	Terratec
->1	belong&0xffffff00	0x00203700	Proel SpA
->1	belong&0xffffff00	0x00203800	IBK MIDI
->1	belong&0xffffff00	0x00203900	IRCAM
->1	belong&0xffffff00	0x00203a00	Propellerhead Software
->1	belong&0xffffff00	0x00203b00	Red Sound Systems
->1	belong&0xffffff00	0x00203c00	Electron ESI AB
->1	belong&0xffffff00	0x00203d00	Sintefex Audio
->1	belong&0xffffff00	0x00203e00	Music and More
->1	belong&0xffffff00	0x00203f00	Amsaro
->1	belong&0xffffff00	0x00204000	CDS Advanced Technology
->1	belong&0xffffff00	0x00204100	Touched by Sound
->1	belong&0xffffff00	0x00204200	DSP Arts
->1	belong&0xffffff00	0x00204300	Phil Rees Music
->1	belong&0xffffff00	0x00204400	Stamer Musikanlagen GmbH
->1	belong&0xffffff00	0x00204500	Soundart
->1	belong&0xffffff00	0x00204600	C-Mexx Software
->1	belong&0xffffff00	0x00204700	Klavis Tech.
->1	belong&0xffffff00	0x00204800	Noteheads AB
-
-0	string			T707		Roland TR-707 Data
-#------------------------------------------------------------------------------
-# teapot:  file(1) magic for "teapot" spreadsheet
-#
-0       string          #!teapot\012xdr      teapot work sheet (XDR format)
-
-#------------------------------------------------------------------------------
-# terminfo:  file(1) magic for terminfo
-#
-# XXX - byte order for screen images?
-#
-0	string		\032\001	Compiled terminfo entry
-0	short		0433		Curses screen image
-0	short		0434		Curses screen image
-
-#------------------------------------------------------------------------------
-# tex:  file(1) magic for TeX files
-#
-# From <conklin at talisman.kaleida.com>
-
-# Although we may know the offset of certain text fields in TeX DVI
-# and font files, we can't use them reliably because they are not
-# zero terminated. [but we do anyway, christos]
-0	string		\367\002	TeX DVI file
->16	string		>\0		(%s)
-0	string		\367\203	TeX generic font data
-0	string		\367\131	TeX packed font data
->3	string		>\0		(%s)
-0	string		\367\312	TeX virtual font data
-0	string		This\ is\ TeX,	TeX transcript text
-0	string		This\ is\ METAFONT,	METAFONT transcript text
-
-# There is no way to detect TeX Font Metric (*.tfm) files without
-# breaking them apart and reading the data.  The following patterns
-# match most *.tfm files generated by METAFONT or afm2tfm.
-2	string		\000\021	TeX font metric data
->33	string		>\0		(%s)
-2	string		\000\022	TeX font metric data
->33	string		>\0		(%s)
-
-# Texinfo and GNU Info, from Daniel Quinlan (quinlan at yggdrasil.com)
-0	string		\\input\ texinfo	Texinfo source text
-0	string		This\ is\ Info\ file	GNU Info text
-
-# TeX documents, from Daniel Quinlan (quinlan at yggdrasil.com)
-0	string		\\input		TeX document text
-0	string		\\section	LaTeX document text
-0	string		\\setlength	LaTeX document text
-0	string		\\documentstyle	LaTeX document text
-0	string		\\chapter	LaTeX document text
-0	string		\\documentclass	LaTeX 2e document text
-0	string		\\relax		LaTeX auxiliary file
-0	string		\\contentsline	LaTeX  table of contents
-0	string		%\ -*-latex-*-	LaTeX document text
-
-# Tex document, from Hendrik Scholz <hendrik at scholz.net>
-0   string      \\ifx       TeX document text
-
-# Index and glossary files
-0	string		\\indexentry	LaTeX raw index file
-0	string		\\begin{theindex}	LaTeX sorted index
-0	string		\\glossaryentry	LaTeX raw glossary
-0	string		\\begin{theglossary}	LaTeX sorted glossary
-0	string		This\ is\ makeindex	Makeindex log file
-
-# End of TeX
-
-#------------------------------------------------------------------------------
-# file(1) magic for BibTex text files
-# From Hendrik Scholz <hendrik at scholz.net>
-
-0   string @article{          BibTex text file
-0   string @book{             BibTex text file
-0   string @inbook{           BibTex text file
-0   string @incollection{     BibTex text file
-0   string @inproceedings{    BibTex text file
-0   string @manual{           BibTex text file
-0   string @misc{             BibTex text file
-0   string @preamble{         BibTex text file
-0   string @phdthesis{        BibTex text file
-0   string @techreport{       BibTex text file
-0   string @unpublished{      BibTex text file
-
-0   string @Article{          BibTex text file
-0   string @Book{             BibTex text file
-0   string @Inbook{           BibTex text file
-0   string @Incollection{     BibTex text file
-0   string @Inproceedings{    BibTex text file
-0   string @Manual{           BibTex text file
-0   string @Misc{             BibTex text file
-0   string @Preamble{         BibTex text file
-0   string @Phdthesis{        BibTex text file
-0   string @Techreport{       BibTex text file
-0   string @Unpublished{      BibTex text file
-
-0   string @ARTICLE{          BibTex text file
-0   string @BOOK{             BibTex text file
-0   string @INBOOK{           BibTex text file
-0   string @INCOLLECTION{     BibTex text file
-0   string @INPROCEEDINGS{    BibTex text file
-0   string @MANUAL{           BibTex text file
-0   string @MISC{             BibTex text file
-0   string @PREAMBLE{         BibTex text file
-0   string @PHDTHESIS{        BibTex text file
-0   string @TECHREPORT{       BibTex text file
-0   string @UNPUBLISHED{      BibTex text file
-
-73  string %%%\ \ BibTeX-file{ BibTex text file (with full header)
-
-73  string %%%\ \ @BibTeX-style-file{   BibTeX style text file (with full header)
-
-0   string %\ BibTeX\ standard\ bibliography\      BibTeX standard bibliography style text file
-
-0   string %\ BibTeX\ `     BibTeX custom bibliography style text file
-
-0   string  @c\ @mapfile{   TeX font aliases text file
-
-#------------------------------------------------------------------------------
-# file(1) magic for tgif(1) files
-# From Hendrik Scholz <hendrik at scholz.net>
-
-0   string  %TGIF\ 4   tgif version 4 object file
-
-# ------------------------------------------------------------------------
-# ti-8x: file(1) magic for the TI-8x and TI-9x Graphing Calculators.
-#
-# From: Ryan McGuire (rmcguire at freenet.columbus.oh.us).
-#
-# Update: Romain Lievin (roms at lpg.ticalc.org).
-#
-# NOTE: This list is not complete.
-# Files for the TI-80 and TI-81 are pretty rare. I'm not going to put the
-# program/group magic numbers in here because I cannot find any.
-0		string		**TI80**	TI-80 Graphing Calculator File.
-0		string		**TI81**	TI-81 Graphing Calculator File.
-#
-# Magic Numbers for the TI-73
-#
-0		string		**TI73**	TI-73 Graphing Calculator
->0x00003B	byte		0x00		(real number)
->0x00003B	byte		0x01		(list)
->0x00003B	byte		0x02		(matrix)
->0x00003B	byte		0x03		(equation)
->0x00003B	byte		0x04		(string)
->0x00003B	byte		0x05		(program)
->0x00003B	byte		0x06		(assembly program)
->0x00003B	byte		0x07		(picture)
->0x00003B	byte		0x08		(gdb)
->0x00003B	byte		0x0C		(complex number)
->0x00003B	byte		0x0F		(window settings)
->0x00003B	byte		0x10		(zoom)
->0x00003B	byte		0x11		(table setup)
->0x00003B	byte		0x13		(backup)
-
-# Magic Numbers for the TI-82
-#
-0		string		**TI82**	TI-82 Graphing Calculator
->0x00003B	byte		0x00		(real)
->0x00003B	byte		0x01		(list)
->0x00003B	byte		0x02		(matrix)
->0x00003B	byte		0x03		(Y-variable)
->0x00003B	byte		0x05		(program)
->0x00003B	byte		0x06		(protected prgm)
->0x00003B	byte		0x07		(picture)
->0x00003B	byte		0x08		(gdb)
->0x00003B	byte		0x0B		(window settings)
->0x00003B	byte		0x0C		(window settings)
->0x00003B	byte		0x0D		(table setup)
->0x00003B	byte		0x0E		(screenshot)
->0x00003B	byte		0x0F		(backup)
-#
-# Magic Numbers for the TI-83
-#
-0		string		**TI83**	TI-83 Graphing Calculator
->0x00003B	byte		0x00		(real)
->0x00003B	byte		0x01		(list)
->0x00003B	byte		0x02		(matrix)
->0x00003B	byte		0x03		(Y-variable)
->0x00003B	byte		0x04		(string)
->0x00003B	byte		0x05		(program)
->0x00003B	byte		0x06		(protected prgm)
->0x00003B	byte		0x07		(picture)
->0x00003B	byte		0x08		(gdb)
->0x00003B	byte		0x0B		(window settings)
->0x00003B	byte		0x0C		(window settings)
->0x00003B	byte		0x0D		(table setup)
->0x00003B	byte		0x0E		(screenshot)
->0x00003B	byte		0x13		(backup)
-#
-# Magic Numbers for the TI-83+
-#
-0		string		**TI83F*	TI-83+ Graphing Calculator
->0x00003B	byte		0x00		(real number)
->0x00003B	byte		0x01		(list)
->0x00003B	byte		0x02		(matrix)
->0x00003B	byte		0x03		(equation)
->0x00003B	byte		0x04		(string)
->0x00003B	byte		0x05		(program)
->0x00003B	byte		0x06		(assembly program)
->0x00003B	byte		0x07		(picture)
->0x00003B	byte		0x08		(gdb)
->0x00003B	byte		0x0C		(complex number)
->0x00003B	byte		0x0F		(window settings)
->0x00003B	byte		0x10		(zoom)
->0x00003B	byte		0x11		(table setup)
->0x00003B	byte		0x13		(backup)
->0x00003B	byte		0x15		(application variable)
->0x00003B	byte		0x17		(group of variable)
-
-#
-# Magic Numbers for the TI-85
-#
-0		string		**TI85**	TI-85 Graphing Calculator
->0x00003B	byte		0x00		(real number)
->0x00003B	byte		0x01		(complex number)
->0x00003B	byte		0x02		(real vector)
->0x00003B	byte		0x03		(complex vector)
->0x00003B	byte		0x04		(real list)
->0x00003B	byte		0x05		(complex list)
->0x00003B	byte		0x06		(real matrix)
->0x00003B	byte		0x07		(complex matrix)
->0x00003B	byte		0x08		(real constant)
->0x00003B	byte		0x09		(complex constant)
->0x00003B	byte		0x0A		(equation)
->0x00003B	byte		0x0C		(string)
->0x00003B	byte		0x0D		(function GDB)
->0x00003B	byte		0x0E		(polar GDB)
->0x00003B	byte		0x0F		(parametric GDB)
->0x00003B	byte		0x10		(diffeq GDB)
->0x00003B	byte		0x11		(picture)
->0x00003B	byte		0x12		(program)
->0x00003B	byte		0x13		(range)
->0x00003B	byte		0x17		(window settings)
->0x00003B	byte		0x18		(window settings)
->0x00003B	byte		0x19		(window settings)
->0x00003B	byte		0x1A		(window settings)
->0x00003B	byte		0x1B		(zoom)
->0x00003B	byte		0x1D		(backup)
->0x00003B	byte		0x1E		(unknown)
->0x00003B	byte		0x2A		(equation)
->0x000032	string		ZS4		- ZShell Version 4 File.
->0x000032	string		ZS3		- ZShell Version 3 File.
-#
-# Magic Numbers for the TI-86
-#
-0		string		**TI86**	TI-86 Graphing Calculator
->0x00003B	byte		0x00		(real number)
->0x00003B	byte		0x01		(complex number)
->0x00003B	byte		0x02		(real vector)
->0x00003B	byte		0x03		(complex vector)
->0x00003B	byte		0x04		(real list)
->0x00003B	byte		0x05		(complex list)
->0x00003B	byte		0x06		(real matrix)
->0x00003B	byte		0x07		(complex matrix)
->0x00003B	byte		0x08		(real constant)
->0x00003B	byte		0x09		(complex constant)
->0x00003B	byte		0x0A		(equation)
->0x00003B	byte		0x0C		(string)
->0x00003B	byte		0x0D		(function GDB)
->0x00003B	byte		0x0E		(polar GDB)
->0x00003B	byte		0x0F		(parametric GDB)
->0x00003B	byte		0x10		(diffeq GDB)
->0x00003B	byte		0x11		(picture)
->0x00003B	byte		0x12		(program)
->0x00003B	byte		0x13		(range)
->0x00003B	byte		0x17		(window settings)
->0x00003B	byte		0x18		(window settings)
->0x00003B	byte		0x19		(window settings)
->0x00003B	byte		0x1A		(window settings)
->0x00003B	byte		0x1B		(zoom)
->0x00003B	byte		0x1D		(backup)
->0x00003B	byte		0x1E		(unknown)
->0x00003B	byte		0x2A		(equation)
-#
-# Magic Numbers for the TI-89
-#
-0		string		**TI89**	TI-89 Graphing Calculator
->0x000048	byte		0x00		(expression)
->0x000048	byte		0x04		(list)
->0x000048	byte		0x06		(matrix)
->0x000048	byte		0x0A		(data)
->0x000048	byte		0x0B		(text)
->0x000048	byte		0x0C		(string)
->0x000048	byte		0x0D		(graphic data base)
->0x000048	byte		0x0E		(figure)
->0x000048	byte		0x10		(picture)
->0x000048	byte		0x12		(program)
->0x000048	byte		0x13		(function)
->0x000048	byte		0x14		(macro)
->0x000048	byte		0x1C		(zipped)
->0x000048	byte		0x21		(assembler)
-#
-# Magic Numbers for the TI-92
-#
-0		string		**TI92**	TI-92 Graphing Calculator
->0x000048	byte		0x00		(expression)
->0x000048	byte		0x04		(list)
->0x000048	byte		0x06		(matrix)
->0x000048	byte		0x0A		(data)
->0x000048	byte		0x0B		(text)
->0x000048	byte		0x0C		(string)
->0x000048	byte		0x0D		(graphic data base)
->0x000048	byte		0x0E		(figure)
->0x000048	byte		0x10		(picture)
->0x000048	byte		0x12		(program)
->0x000048	byte		0x13		(function)
->0x000048	byte		0x14		(macro)
->0x000048	byte		0x1D		(backup)
-#
-# Magic Numbers for the TI-92+/V200
-#
-0		string		**TI92P*	TI-92+/V200 Graphing Calculator
->0x000048	byte		0x00		(expression)
->0x000048	byte		0x04		(list)
->0x000048	byte		0x06		(matrix)
->0x000048	byte		0x0A		(data)
->0x000048	byte		0x0B		(text)
->0x000048	byte		0x0C		(string)
->0x000048	byte		0x0D		(graphic data base)
->0x000048	byte		0x0E		(figure)
->0x000048	byte		0x10		(picture)
->0x000048	byte		0x12		(program)
->0x000048	byte		0x13		(function)
->0x000048	byte		0x14		(macro)
->0x000048	byte		0x1C		(zipped)
->0x000048	byte		0x21		(assembler)
-#
-# Magic Numbers for the TI-73/83+/89/92+/V200 FLASH upgrades
-#
-0x0000016	string		Advanced	TI-XX Graphing Calculator (FLASH)
-0		string		**TIFL**	TI-XX Graphing Calculator (FLASH)
->8		byte		>0		- Revision %d
->>9 		byte		x		\b.%d,
->12		byte		>0		Revision date %02x
->>13		byte		x		\b/%02x
->>14		beshort		x		\b/%04x,
->17		string		>/0		name: '%s',
->48		byte		0x74		device: TI-73,
->48		byte		0x73		device: TI-83+,
->48		byte		0x98		device: TI-89,
->48		byte		0x88		device: TI-92+,
->49		byte		0x23		type: OS upgrade,
->49		byte		0x24		type: application,
->49		byte		0x25		type: certificate,
->49		byte		0x3e		type: license,
->74		lelong		>0		size: %ld bytes
-
-# VTi & TiEmu skins (TI Graphing Calculators).
-# From: Romain Lievin (roms at lpg.ticalc.org).
-# Magic Numbers for the VTi skins
-0               string          VTI		Virtual TI skin
->3		string		v		- Version
->>4		byte		>0		\b %c
->>6		byte		x		\b.%c
-# Magic Numbers for the TiEmu skins
-0		string		TiEmu		TiEmu skin
->6              string          v               - Version
->>7             byte            >0              \b %c
->>9             byte            x               \b.%c
->>10		byte		x		\b%c
-
-#------------------------------------------------------------------------------
-# timezone:  file(1) magic for timezone data
-#
-# from Daniel Quinlan (quinlan at yggdrasil.com)
-# this should work on Linux, SunOS, and maybe others
-# Added new official magic number for recent versions of the Olson code
-0	string	TZif	timezone data
-0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0	old timezone data
-0	string	\0\0\0\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	old timezone data
-0	string  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0	old timezone data
-0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0	old timezone data
-0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0	old timezone data
-0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0	old timezone data
-
-#------------------------------------------------------------------------------
-# troff:  file(1) magic for *roff
-#
-# updated by Daniel Quinlan (quinlan at yggdrasil.com)
-
-# troff input
-0	string		.\\"		troff or preprocessor input text
-0	string		'\\"		troff or preprocessor input text
-0	string		'.\\"		troff or preprocessor input text
-0	string		\\"		troff or preprocessor input text
-0	string		'''		troff or preprocessor input text
-
-# ditroff intermediate output text
-0	string		x\ T		ditroff output text
->4	string		cat		for the C/A/T phototypesetter
->4	string		ps		for PostScript
->4	string		dvi		for DVI
->4	string		ascii		for ASCII
->4	string		lj4		for LaserJet 4
->4	string		latin1		for ISO 8859-1 (Latin 1)
->4	string		X75		for xditview at 75dpi
->>7	string		-12		(12pt)
->4	string		X100		for xditview at 100dpi
->>8	string		-12		(12pt)
-
-# output data formats
-0	string		\100\357	very old (C/A/T) troff output data
-#
-#------------------------------------------------------------------------------
-# tuxedo:	file(1) magic for BEA TUXEDO data files
-#
-# from Ian Springer <ispringer at hotmail.com>
-#
-0	string		\0\0\1\236\0\0\0\0\0\0\0\0\0\0\0\0	BEA TUXEDO DES mask data
-
-#------------------------------------------------------------------------------
-# typeset:  file(1) magic for other typesetting
-#
-0	string		Interpress/Xerox	Xerox InterPress data
->16	string		/			(version
->>17	string		>\0			%s)
-
-#------------------------------------------------------------------------------
-# unknown:  file(1) magic for unknown machines
-#
-# XXX - this probably should be pruned, as it'll match PDP-11 and
-# VAX image formats.
-#
-# 0x107 is 0407; 0x108 is 0410; both are PDP-11 (executable and pure,
-# respectively).
-#
-# 0x109 is 0411; that's PDP-11 split I&D, but the PDP-11 version doesn't
-# have the "version %ld", which may be a bogus COFFism (I don't think
-# there ever was COFF for the PDP-11).
-#
-# 0x10B is 0413; that's VAX demand-paged, but this is a short, not a
-# long, as it would be on a VAX.
-#
-# 0x10C is 0414 and 0x10E is 416; those *are* unknown.
-#
-0	short		0x107		unknown machine executable
->8	short		>0		not stripped
->15	byte		>0		- version %ld
-0	short		0x108		unknown pure executable
->8	short		>0		not stripped
->15	byte		>0		- version %ld
-0	short		0x109		PDP-11 separate I&D
->8	short		>0		not stripped
->15	byte		>0		- version %ld
-0	short		0x10b		unknown pure executable
->8	short		>0		not stripped
->15	byte		>0		- version %ld
-0	long		0x10c		unknown demand paged pure executable
->16	long		>0		not stripped
-0	long		0x10e		unknown readable demand paged pure executable
-
-#------------------------------------------------------------------------------
-# uuencode:  file(1) magic for ASCII-encoded files
-#
-
-# GRR:  the first line of xxencoded files is identical to that in uuencoded
-# files, but the first character in most subsequent lines is 'h' instead of
-# 'M'.  (xxencoding uses lowercase letters in place of most of uuencode's
-# punctuation and survives BITNET gateways better.)  If regular expressions
-# were supported, this entry could possibly be split into two with
-# "begin\040\.\*\012M" or "begin\040\.\*\012h" (where \. and \* are REs).
-0	string		begin\040	uuencoded or xxencoded text
-
-# btoa(1) is an alternative to uuencode that requires less space.
-0	string		xbtoa\ Begin	btoa'd text
-
-# ship(1) is another, much cooler alternative to uuencode.
-# Greg Roelofs, newt at uchicago.edu
-0	string		$\012ship	ship'd binary text
-
-# bencode(8) is used to encode compressed news batches (Bnews/Cnews only?)
-# Greg Roelofs, newt at uchicago.edu
-0	string	Decode\ the\ following\ with\ bdeco	bencoded News text
-
-# BinHex is the Macintosh ASCII-encoded file format (see also "apple")
-# Daniel Quinlan, quinlan at yggdrasil.com
-11	string	must\ be\ converted\ with\ BinHex	BinHex binary text
->41	string	x					\b, version %.3s
-
-# GRR:  is MIME BASE64 encoding handled somewhere?
-
-#------------------------------------------------------------------------------
-# varied.out:  file(1) magic for various USG systems
-#
-#	Herewith many of the object file formats used by USG systems.
-#	Most have been moved to files for a particular processor,
-#	and deleted if they duplicate other entries.
-#
-0	short		0610		Perkin-Elmer executable
-# AMD 29K
-0	beshort		0572		amd 29k coff noprebar executable
-0	beshort		01572		amd 29k coff prebar executable
-0	beshort		0160007		amd 29k coff archive
-# Cray
-6	beshort		0407		unicos (cray) executable
-# Ultrix 4.3
-596	string		\130\337\377\377	Ultrix core file
->600	string		>\0		from '%s'
-# BeOS and MAcOS PEF executables
-# From: hplus at zilker.net (Jon Watte)
-0	string		Joy!peffpwpc	header for PowerPC PEF executable
-#
-# ava assembler/linker Uros Platise <uros.platise at ijs.si>
-0       string          avaobj  AVR assembler object code
->7      string          >\0     version '%s'
-# gnu gmon magic From: Eugen Dedu <dedu at ese-metz.fr>
-0	string		gmon		GNU prof performance data
->4	long		x		- version %ld
-# From: Dave Pearson <davep at davep.org>
-# Harbour <URL:http://www.harbour-project.org/> HRB files.
-0	string		\xc0HRB		Harbour HRB file
->4	short		x		version %d
-
-# From: "Stefan A. Haubenthal" <polluks at web.de>
-0	belong		0x000001EB	Plan 9 executable
-#------------------------------------------------------------------------------
-# varied.script:  file(1) magic for various interpreter scripts
-
-0	string		#!\ /			a
->3	string		>\0			%s script text
-0	string		#!\	/		a
->3	string		>\0			%s script text
-0	string		#!/			a
->2	string		>\0			%s script text
-0	string		#!\ 			script text
->3	string		>\0			for %s
-
-
-#------------------------------------------------------------------------------
-# vax:  file(1) magic for VAX executable/object and APL workspace
-#
-0	lelong		0101557		VAX single precision APL workspace
-0	lelong		0101556		VAX double precision APL workspace
-
-#
-# VAX a.out (32V, BSD)
-#
-0	lelong		0407		VAX executable
->16	lelong		>0		not stripped
-
-0	lelong		0410		VAX pure executable
->16	lelong		>0		not stripped
-
-0	lelong		0413		VAX demand paged pure executable
->16	lelong		>0		not stripped
-
-0	lelong		0420		VAX demand paged (first page unmapped) pure executable
->16	lelong		>0		not stripped
-
-#
-# VAX COFF
-#
-# The `versions' should be un-commented if they work for you.
-# (Was the problem just one of endianness?)
-#
-0	leshort		0570		VAX COFF executable
->12	lelong		>0		not stripped
->22	leshort		>0		- version %ld
-0	leshort		0575		VAX COFF pure executable
->12	lelong		>0		not stripped
->22	leshort		>0		- version %ld
-
-#------------------------------------------------------------------------------
-# vicar:  file(1) magic for VICAR files.
-#
-# From: Ossama Othman <othman at astrosun.tn.cornell.edu
-# VICAR is JPL's in-house spacecraft image processing program
-# VICAR image
-0	string	LBLSIZE=	VICAR image data
->32	string	BYTE		\b, 8 bits  = VAX byte
->32	string	HALF		\b, 16 bits = VAX word     = Fortran INTEGER*2
->32	string	FULL		\b, 32 bits = VAX longword = Fortran INTEGER*4
->32	string	REAL		\b, 32 bits = VAX longword = Fortran REAL*4
->32	string	DOUB		\b, 64 bits = VAX quadword = Fortran REAL*8
->32	string	COMPLEX		\b, 64 bits = VAX quadword = Fortran COMPLEX*8
-# VICAR label file
-43	string	SFDU_LABEL	VICAR label file
-
-#------------------------------------------------------------------------------
-# visx:  file(1) magic for Visx format files
-#
-0	short		0x5555		VISX image file
->2	byte		0		(zero)
->2	byte		1		(unsigned char)
->2	byte		2		(short integer)
->2	byte		3		(float 32)
->2	byte		4		(float 64)
->2	byte		5		(signed char)
->2	byte		6		(bit-plane)
->2	byte		7		(classes)
->2	byte		8		(statistics)
->2	byte		10		(ascii text)
->2	byte		15		(image segments)
->2	byte		100		(image set)
->2	byte		101		(unsigned char vector)
->2	byte		102		(short integer vector)
->2	byte		103		(float 32 vector)
->2	byte		104		(float 64 vector)
->2	byte		105		(signed char vector)
->2	byte		106		(bit plane vector)
->2	byte		121		(feature vector)
->2	byte		122		(feature vector library)
->2	byte		124		(chain code)
->2	byte		126		(bit vector)
->2	byte		130		(graph)
->2	byte		131		(adjacency graph)
->2	byte		132		(adjacency graph library)
->2	string		.VISIX		(ascii text)
-
-#------------------------------------------------------------------------------
-# vms:  file(1) magic for VMS executables (experimental)
-#
-# VMS .exe formats, both VAX and AXP (Greg Roelofs, newt at uchicago.edu)
-
-# GRR 950122:  I'm just guessing on these, based on inspection of the headers
-# of three executables each for Alpha and VAX architectures.  The VAX files
-# all had headers similar to this:
-#
-#   00000  b0 00 30 00 44 00 60 00  00 00 00 00 30 32 30 35  ..0.D.`.....0205
-#   00010  01 01 00 00 ff ff ff ff  ff ff ff ff 00 00 00 00  ................
-#
-0	string	\xb0\0\x30\0	VMS VAX executable
->44032	string	PK\003\004	\b, Info-ZIP SFX archive v5.12 w/decryption
-#
-# The AXP files all looked like this, except that the byte at offset 0x22
-# was 06 in some of them and 07 in others:
-#
-#   00000  03 00 00 00 00 00 00 00  ec 02 00 00 10 01 00 00  ................
-#   00010  68 00 00 00 98 00 00 00  b8 00 00 00 00 00 00 00  h...............
-#   00020  00 00 07 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
-#   00030  00 00 00 00 01 00 00 00  00 00 00 00 00 00 00 00  ................
-#   00040  00 00 00 00 ff ff ff ff  ff ff ff ff 02 00 00 00  ................
-#
-0	belong	0x03000000	VMS Alpha executable
->75264	string	PK\003\004	\b, Info-ZIP SFX archive v5.12 w/decryption
-
-# -----------------------------------------------------------
-# VMware specific files (deducted from version 1.1 and log file entries)
-# Anthon van der Neut (anthon at mnt.org)
-0	belong	0x4d52564e	VMware nvram 
-0	belong	0x434f5744	VMware
->4	byte	3	 	virtual disk 
->>32	lelong	x		(%d/
->>36	lelong	x		\b%d/
->>40	lelong	x		\b%d)
->4	byte	2	 	undoable disk
->>32	string  >\0		(%s)
-
-#------------------------------------------------------------------------------
-# vorbis:  file(1) magic for Ogg/Vorbis files
-#
-# From Felix von Leitner <leitner at fefe.de>
-# Extended by Beni Cherniavsky <cben at crosswinds.net>
-# Further extended by Greg Wooledge <greg at wooledge.org>
-#
-# Most (everything but the number of channels and bitrate) is commented
-# out with `##' as it's not interesting to the average user.  The most
-# probable things advanced users would want to uncomment are probably
-# the number of comments and the encoder version.
-#
-# --- Ogg Framing ---
-0		string		OggS		Ogg data
->4		byte		!0		UNKNOWN REVISION %u
-##>4		byte		0		revision 0
->4		byte		0
-##>>14		lelong		x		(Serial %lX)
-# non-Vorbis content: FLAC (Free Loss-lessy Audio Codec,
-# http://flac.sourceforge.net)
->>28		string		fLaC		\b, FLAC audio
-# --- First vorbis packet - general header ---
->>28		string		\x01vorbis	\b, Vorbis audio,
->>>35		lelong		!0		UNKNOWN VERSION %lu,
-##>>>35		lelong		0		version 0,
->>>35		lelong		0
->>>>39		ubyte		1		mono,
->>>>39		ubyte		2		stereo,
->>>>39		ubyte		>2		%u channels,
->>>>40		lelong		x		%lu Hz
-# Minimal, nominal and maximal bitrates specified when encoding
->>>>48		string		<\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff	\b,
-# The above tests if at least one of these is specified:
->>>>>52		lelong		!-1
-# Vorbis RC2 has a bug which puts -1000 in the min/max bitrate fields
-# instead of -1.
-# Vorbis 1.0 uses 0 instead of -1.
->>>>>>52	lelong		!0
->>>>>>>52	lelong		!-1000
->>>>>>>>52	lelong		x		<%lu
->>>>>48		lelong		!-1
->>>>>>48	lelong		x		~%lu
->>>>>44		lelong		!-1
->>>>>>44	lelong		!-1000
->>>>>>>44	lelong		!0
->>>>>>>>44	lelong		x		>%lu
->>>>>48		string		<\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff	bps
-# -- Second vorbis header packet - the comments
-# A kludge to read the vendor string.  It's a counted string, not a
-# zero-terminated one, so file(1) can't read it in a generic way.
-# libVorbis is the only one existing currently, so I detect specifically
-# it.  The interesting value is the cvs date (8 digits decimal).
-# Post-RC1 Ogg files have the second header packet (and thus the version)
-# in a different place, so we must use an indirect offset.
->>>(84.b+85)		string		\x03vorbis
->>>>(84.b+96)		string/c	Xiphophorus\ libVorbis\ I	\b, created by: Xiphophorus libVorbis I
->>>>>(84.b+120)		string		>00000000	
-# Map to beta version numbers:
->>>>>>(84.b+120)	string		<20000508	(<beta1 - prepublic)
->>>>>>(84.b+120)	string		20000508	(beta1/2)
->>>>>>(84.b+120)	string		>20000508
->>>>>>>(84.b+120)	string		<20001031	(beta2-3)
->>>>>>(84.b+120)	string		20001031	(beta3)
->>>>>>(84.b+120)	string		>20001031
->>>>>>>(84.b+120)	string		<20010225	(beta3-4)
->>>>>>(84.b+120)	string		20010225	(beta4)
->>>>>>(84.b+120)	string		>20010225
->>>>>>>(84.b+120)	string		<20010615	(beta4-RC1)
->>>>>>(84.b+120)	string		20010615	(RC1)
->>>>>>(84.b+120)	string		20010813	(RC2)
->>>>>>(84.b+120)	string		20010816	(RC2 - Garf tuned v1)
->>>>>>(84.b+120)	string		20011014	(RC2 - Garf tuned v2)
->>>>>>(84.b+120)	string		20011217	(pre-RC3 CVS)
->>>>>>(84.b+120)	string		20011231	(RC3)
-# Some pre-1.0 CVS snapshots still had "Xiphphorus"...
->>>>>>(84.b+120)	string		>20011231	(pre-1.0 CVS)
-# For the 1.0 release, Xiphophorus is replaced by Xiph.Org
->>>>(84.b+96)		string/c	Xiph.Org\ libVorbis\ I	\b, created by: Xiph.Org libVorbis I
->>>>>(84.b+117)		string		>00000000	
->>>>>>(84.b+117)	string		<20020717	(pre-1.0 CVS)
->>>>>>(84.b+117)	string		20020717	(1.0)
->>>>>>(84.b+117)	string		>20020717	(post-1.0 CVS)
-
-#------------------------------------------------------------------------------
-# VXL: file(1) magic for VXL binary IO data files
-#
-# from Ian Scott <scottim at sf.net>
-#
-# VXL is a collection of C++ libraries for Computer Vision.
-# See the vsl chapter in the VXL Book for more info
-# http://www.isbe.man.ac.uk/public_vxl_doc/books/vxl/book.html
-# http:/vxl.sf.net
-
-2	lelong	0x472b2c4e	VXL data file,
->0	leshort	>0		schema version no %d
-
-#------------------------------------------------------------------------------
-# wordprocessors:  file(1) magic fo word processors.
-#
-####### PWP file format used on Smith Corona Personal Word Processors:
-2	string	\040\040\040\040\040\040\040\040\040\040\040ML4D\040\'92	Smith Corona PWP
->24	byte	2	\b, single spaced
->24	byte	3	\b, 1.5 spaced
->24	byte	4	\b, double spaced
->25	byte	0x42	\b, letter
->25	byte	0x54	\b, legal
->26	byte	0x46	\b, A4
-
-#WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
-0	string	\377WPC\020\000\000\000\022\012\001\001\000\000\000\000	(WP) loadable text
->15	byte	0	Optimized for Intel
->15	byte	1	Optimized for Non-Intel
-1	string	WPC	(Corel/WP)
->8	short	257	WordPerfect macro
->8	short	258	WordPerfect help file
->8	short	259	WordPerfect keyboard file
->8	short	266	WordPerfect document
->8	short	267	WordPerfect dictionary
->8	short	268	WordPerfect thesaurus
->8	short	269	WordPerfect block
->8	short	270	WordPerfect rectangular block
->8	short	271	WordPerfect column block
->8	short	272	WordPerfect printer data
->8	short	275	WordPerfect printer data
->8	short	276	WordPerfect driver resource data
->8	short	279	WordPerfect hyphenation code
->8	short	280	WordPerfect hyphenation data
->8	short	281	WordPerfect macro resource data
->8	short	283	WordPerfect hyphenation lex
->8	short	285	WordPerfect wordlist
->8	short	286	WordPerfect equation resource data
->8	short	289	WordPerfect spell rules
->8	short	290	WordPerfect dictionary rules
->8	short	295	WordPerfect spell rules (Microlytics)
->8	short	299	WordPerfect settings file
->8	short	301	WordPerfect 4.2 document
->8	short	325	WordPerfect dialog file
->8	short	332	WordPerfect button bar
->8	short	513	Shell macro
->8	short	522	Shell definition
->8	short	769	Notebook macro
->8	short	770	Notebook help file
->8	short	771	Notebook keyboard file
->8	short	778	Notebook definition
->8	short	1026	Calculator help file
->8	short 	1538	Calendar help file
->8	short 	1546	Calendar data file
->8	short	1793	Editor macro
->8	short	1794	Editor help file
->8	short	1795	Editor keyboard file
->8	short	1817	Editor macro resource file
->8	short 	2049	Macro editor macro
->8	short 	2050	Macro editor help file
->8	short	2051	Macro editor keyboard file
->8	short	2305	PlanPerfect macro
->8	short	2306	PlanPerfect help file
->8	short	2307	PlanPerfect keyboard file
->8	short	2314	PlanPerfect worksheet
->8	short	2319	PlanPerfect printer definition
->8	short	2322	PlanPerfect graphic definition
->8	short	2323	PlanPerfect data
->8	short	2324	PlanPerfect temporary printer
->8	short	2329	PlanPerfect macro resource data
->8	byte	11	Mail
->8	short	2818	help file
->8	short	2821	distribution list
->8	short	2826	out box
->8	short	2827	in box
->8	short	2836	users archived mailbox
->8	short	2837	archived message database
->8	short	2838	archived attachments
->8	short	3083	Printer temporary file
->8	short	3330	Scheduler help file
->8	short	3338	Scheduler in file
->8	short	3339	Scheduler out file
->8	short	3594	GroupWise settings file
->8	short	3601	GroupWise directory services
->8	short	3627	GroupWise settings file
->8	short	4362	Terminal resource data
->8	short	4363	Terminal resource data
->8	short	4395	Terminal resource data
->8	short	4619	GUI loadable text
->8	short	4620	graphics resource data
->8	short	4621	printer settings file
->8	short	4622	port definition file
->8	short	4623	print queue parameters
->8	short	4624	compressed file
->8	short	5130	Network service msg file
->8	short	5131	Network service msg file
->8	short	5132	Async gateway login msg
->8	short	5134	GroupWise message file
->8	short	7956	GroupWise admin domain database
->8	short	7957	GroupWise admin host database
->8	short	7959	GroupWise admin remote host database
->8	short	7960	GroupWise admin ADS deferment data file
->8	short	8458	IntelliTAG (SGML) compiled DTD
->8	long	18219264	WordPerfect graphic image (1.0)
->8	long	18219520	WordPerfect graphic image (2.0)
-#end of WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
-
-# Hangul (Korean) Word Processor File
-0	string	HWP\ Document\ File	Hangul (Korean) Word Processor File
-
-# CosmicBook, from Benoît Rouits
-0       string  CSBK    Ted Neslson's CosmicBook hypertext file
-
-
-#------------------------------------------------------------------------------
-# file(1) magic(5) data for xdelta  Josh MacDonald <jmacd at CS.Berkeley.EDU>
-#
-0	string	%XDELTA%	XDelta binary patch file 0.14
-0	string	%XDZ000%	XDelta binary patch file 0.18
-0	string	%XDZ001%	XDelta binary patch file 0.20
-0	string	%XDZ002%	XDelta binary patch file 1.0
-0	string	%XDZ003%	XDelta binary patch file 1.0.4
-0	string	%XDZ004%	XDelta binary patch file 1.1
-
-#------------------------------------------------------------------------------
-# xenix:  file(1) magic for Microsoft Xenix
-#
-# "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small
-# model" lifted from "magic.xenix", with comment "derived empirically;
-# treat as folklore until proven"
-#
-# "small model", "large model", "huge model" stuff lifted from XXX
-#
-# XXX - "x.out" collides with PDP-11 archives
-#
-0	string		core		core file (Xenix)
-0	byte		0x80		8086 relocatable (Microsoft)
-0	leshort		0xff65		x.out
->2	string		__.SYMDEF	 randomized
->0	byte		x		archive
-0	leshort		0x206		Microsoft a.out
->8	leshort		1		Middle model
->0x1e	leshort		&0x10		overlay
->0x1e	leshort		&0x2		separate
->0x1e	leshort		&0x4		pure
->0x1e	leshort		&0x800		segmented
->0x1e	leshort		&0x400		standalone
->0x1e	leshort		&0x8		fixed-stack
->0x1c	byte		&0x80		byte-swapped
->0x1c	byte		&0x40		word-swapped
->0x10	lelong		>0		not-stripped
->0x1e	leshort		^0xc000		pre-SysV
->0x1e	leshort		&0x4000		V2.3
->0x1e	leshort		&0x8000		V3.0
->0x1c	byte		&0x4		86
->0x1c	byte		&0xb		186
->0x1c	byte		&0x9		286
->0x1c	byte		&0xa		386
->0x1f	byte		<0x040		small model
->0x1f	byte		=0x048		large model	
->0x1f	byte		=0x049		huge model 
->0x1e	leshort		&0x1		executable
->0x1e	leshort		^0x1		object file
->0x1e	leshort		&0x40		Large Text
->0x1e	leshort		&0x20		Large Data
->0x1e	leshort		&0x120		Huge Objects Enabled
->0x10	lelong		>0		not stripped
-
-0	leshort		0x140		old Microsoft 8086 x.out
->0x3	byte		&0x4		separate
->0x3	byte		&0x2		pure
->0	byte		&0x1		executable
->0	byte		^0x1		relocatable
->0x14	lelong		>0		not stripped
-
-0	lelong		0x206		b.out
->0x1e	leshort		&0x10		overlay
->0x1e	leshort		&0x2		separate
->0x1e	leshort		&0x4		pure
->0x1e	leshort		&0x800		segmented
->0x1e	leshort		&0x400		standalone
->0x1e	leshort		&0x1		executable
->0x1e	leshort		^0x1		object file
->0x1e	leshort		&0x4000		V2.3
->0x1e	leshort		&0x8000		V3.0
->0x1c	byte		&0x4		86
->0x1c	byte		&0xb		186
->0x1c	byte		&0x9		286
->0x1c	byte		&0x29		286
->0x1c	byte		&0xa		386
->0x1e	leshort		&0x4		Large Text
->0x1e	leshort		&0x2		Large Data
->0x1e	leshort		&0x102		Huge Objects Enabled
-
-0	leshort		0x580		XENIX 8086 relocatable or 80286 small model
-
-#------------------------------------------------------------------------------
-# xwindows:  file(1) magic for various X/Window system file formats.
-
-# Compiled X Keymap 
-# XKM (compiled X keymap) files (including version and byte ordering)
-1	string	mkx				Compiled XKB Keymap: lsb,
->0	byte	>0				version %d
->0	byte	=0				obsolete
-0	string	xkm				Compiled XKB Keymap: msb,
->3	byte	>0				version %d
->0	byte	=0				obsolete
-
-# xfsdump archive
-0	string	xFSdump0			xfsdump archive
->8	long	x	(version %d)
-
-# Jaleo XFS files
-0	long	395726				Jaleo XFS file
->4	long	x				- version %ld
->8	long	x				- [%ld -
->20	long	x				%ldx
->24	long	x				%ldx
->28	long	1008				YUV422]
->28	long	1000				RGB24]
-
-#------------------------------------------------------------------------------
-# zilog:  file(1) magic for Zilog Z8000.
-#
-# Was it big-endian or little-endian?  My Product Specification doesn't
-# say.
-#
-0	long		0xe807		object file (z8000 a.out)
-0	long		0xe808		pure object file (z8000 a.out)
-0	long		0xe809		separate object file (z8000 a.out)
-0	long		0xe805		overlay object file (z8000 a.out)
-
-#------------------------------------------------------------------------------
-# zyxel:  file(1) magic for ZyXEL modems
-#
-# From <rob at pe1chl.ampr.org>
-# These are the /etc/magic entries to decode datafiles as used for the
-# ZyXEL U-1496E DATA/FAX/VOICE modems.  (This header conforms to a
-# ZyXEL-defined standard)
-
-0	string		ZyXEL\002	ZyXEL voice data
->10	byte		0		- CELP encoding
->10	byte&0x0B	1		- ADPCM2 encoding
->10	byte&0x0B	2		- ADPCM3 encoding
->10	byte&0x0B	3		- ADPCM4 encoding
->10	byte&0x0B	8		- New ADPCM3 encoding
->10	byte&0x04	4		with resync
diff --git a/libs/kfs/lockfile.c b/libs/kfs/lockfile.c
deleted file mode 100644
index 86ac2e0..0000000
--- a/libs/kfs/lockfile.c
+++ /dev/null
@@ -1,350 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-struct KRemoveLockFileTask;
-#define KTASK_IMPL struct KRemoveLockFileTask
-
-#include <kfs/extern.h>
-#include <kfs/lockfile.h>
-#include <kfs/impl.h>
-#include <kfs/file.h>
-#include <kfs/directory.h>
-#include <kproc/task.h>
-#include <kproc/impl.h>
-#include <kproc/procmgr.h>
-#include <klib/text.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#if _DEBUGGING
-#define CRIPPLE_CLEANUP 0
-#define DISABLE_CLEANUP 0
-#endif
-
-/*--------------------------------------------------------------------------
- * KRemoveLockFileTask
- */
-typedef struct KRemoveLockFileTask KRemoveLockFileTask;
-struct KRemoveLockFileTask
-{
-    KTask dad;
-    KDirectory *dir;
-    char path [ 1 ];
-};
-
-static
-rc_t CC KRemoveLockFileTaskWhack ( KRemoveLockFileTask *self )
-{
-    rc_t rc = KDirectoryRelease ( self -> dir );
-    KTaskDestroy ( & self -> dad, "KRemoveLockFileTask" );
-    free ( self );
-    return rc;
-}
-
-static
-rc_t CC KRemoveLockFileTaskExecute ( KRemoveLockFileTask *self )
-{
-    return KDirectoryRemove ( self -> dir, true, "%s", self -> path );
-}
-
-static
-KTask_vt_v1 KRemoveLockFileTask_vt =
-{
-    1, 0,
-    KRemoveLockFileTaskWhack,
-    KRemoveLockFileTaskExecute
-};
-
-static
-rc_t KRemoveLockFileTaskMake ( KTask **task, KDirectory *dir, const char *path )
-{
-    rc_t rc;
-    size_t path_size = string_size ( path );
-    KRemoveLockFileTask *t = malloc ( sizeof * t + path_size );
-    if ( t == NULL )
-        rc = RC ( rcFS, rcLock, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        rc = KTaskInit ( & t -> dad, ( const KTask_vt* ) & KRemoveLockFileTask_vt, "KRemoveLockFileTask", path );
-        if ( rc == 0 )
-        {
-            rc = KDirectoryAddRef ( t -> dir = dir );
-            if ( rc == 0 )
-            {
-                strcpy ( t -> path, path );
-                * task = & t -> dad;
-                return 0;
-            }
-        }
-
-        free ( t );
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KLockFile
- *  a mutual exclusion lock on a file
- *  the lock is acquired upon creation
- *  and released upon destruction
- *
- * NB - only guaranteed to work when used from a single host
- */
-struct KLockFile
-{
-    KProcMgr *pmgr;
-    KTask *cleanup;
-    KTaskTicket ticket;
-    KRefcount refcount;
-};
-
-static
-rc_t KLockFileWhack ( KLockFile *self )
-{
-    rc_t rc = 0;
-
-    /* remove task from cleanup queue */
-    if ( self -> pmgr != NULL )
-    {
-        rc = KProcMgrRemoveCleanupTask ( self -> pmgr, & self -> ticket );
-        KProcMgrRelease ( self -> pmgr );
-    }
-
-#if ! CRIPPLE_CLEANUP && ! DISABLE_CLEANUP
-    /* remove the lock file from file system */
-    rc = KTaskExecute ( self -> cleanup );
-#endif
-    KTaskRelease ( self -> cleanup );
-
-    free ( self );
-    return rc;
-}
-
-
-/* AddRef
- */
-LIB_EXPORT rc_t CC KLockFileAddRef ( const KLockFile *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KLockFile" ) )
-        {
-        case krefLimit:
-            return RC ( rcFS, rcLock, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Release
- */
-LIB_EXPORT rc_t CC KLockFileRelease ( const KLockFile *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KLockFile" ) )
-        {
-        case krefWhack:
-            return KLockFileWhack ( ( KLockFile* ) self );
-        case krefNegative:
-            return RC ( rcFS, rcLock, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Make
- */
-static
-rc_t KLockFileMake ( KLockFile **lock, KDirectory *dir, const char *path )
-{
-    rc_t rc;
-    KLockFile *f = malloc ( sizeof * f );
-    if ( f == NULL )
-        rc = RC ( rcFS, rcLock, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        rc = KRemoveLockFileTaskMake ( & f -> cleanup, dir, path );
-        if ( rc == 0 )
-        {
-#if ! DISABLE_CLEANUP
-            /* register cleanup task with proc mgr */
-            rc = KProcMgrMakeSingleton ( & f -> pmgr );
-            if ( rc == 0 )
-                rc = KProcMgrAddCleanupTask ( f -> pmgr, & f -> ticket, f -> cleanup );
-            else
-#else
-            f -> pmgr = NULL;
-#endif
-            {
-                /* this is allowed to fail if mgr has not been initialized */
-                memset ( & f -> ticket, 0, sizeof f -> ticket );
-                rc = 0;
-            }
-
-            if ( rc == 0 )
-            {
-                KRefcountInit ( & f -> refcount, 1, "KLockFile", "make", path );
-                * lock = f;
-                return 0;
-            }
-
-            if ( f -> pmgr != NULL )
-                KProcMgrRelease ( f -> pmgr );
-        }
-
-        free ( f );
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KDirectory
- *  interface extensions
- */
-
-
-/* CreateLockFile
- *  attempts to create a KLockFile
- *
- *  "lock" [ OUT ] - return parameter for newly created lock file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting lock file
- */
-LIB_EXPORT rc_t CC KDirectoryVCreateLockFile ( KDirectory *self,
-    KLockFile **lock, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( lock == NULL )
-        rc = RC ( rcFS, rcFile, rcLocking, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcFile, rcLocking, rcSelf, rcNull );
-        else if ( path == NULL )
-            rc = RC ( rcFS, rcFile, rcLocking, rcPath, rcNull );
-        else if ( path [ 0 ] == 0 )
-            rc = RC ( rcFS, rcFile, rcLocking, rcPath, rcEmpty );
-        else
-        {
-            char full [ 4096 ];
-            rc = KDirectoryVResolvePath ( self, false, full, sizeof full, path, args );
-            if ( rc == 0 )
-            {
-                KFile *lock_file;
-                rc = KDirectoryCreateFile ( self, & lock_file, false, 0600, kcmCreate | kcmParents, "%s", full );
-                if ( rc == 0 )
-                {
-                    rc_t rc2;
-
-                    /* no longer need the file - not going to write to it anyway */
-                    KFileRelease ( lock_file );
-
-                    /* we have the lock */
-                    rc = KLockFileMake ( lock, self, full );
-                    if ( rc == 0 )
-                        return 0;
-
-                    /* must unlink lockfile */
-                    rc2 = KDirectoryRemove ( self, true, "%s", full );
-                    if ( rc2 != 0 )
-                        /* issue a report */;
-                }
-                else if ( GetRCState ( rc ) == rcExists )
-                {
-                    /* map the rc to kproc type values */
-                    rc = RC ( rcFS, rcFile, rcLocking, rcLocking, rcBusy );
-                }
-                else
-                {
-                    rc = ResetRCContext ( rc, rcFS, rcFile, rcLocking );
-                }
-            }
-        }
-
-        * lock = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryCreateLockFile ( KDirectory *self,
-    KLockFile **lock, const char *path, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, path );
-
-    rc = KDirectoryVCreateLockFile ( self, lock, path, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* CreateExclusiveAccessFile
- *  opens a file with exclusive write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if true, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-
-LIB_EXPORT rc_t CC KDirectoryCreateExclusiveAccessFile ( KDirectory *self, KFile **f,
-    bool update, uint32_t access, KCreateMode mode, const char *path, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, path );
-
-    rc = KDirectoryVCreateExclusiveAccessFile ( self, f, update, access, mode, path, args );
-
-    va_end ( args );
-
-    return rc;
-}
diff --git a/libs/kfs/manager.c b/libs/kfs/manager.c
deleted file mode 100644
index 1983ff2..0000000
--- a/libs/kfs/manager.c
+++ /dev/null
@@ -1,641 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-
-#include <kfs/manager.h>
-#include <kfs/path.h>
-#include "path-priv.h"
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/kfs-priv.h>
-
-#include <klib/refcount.h>
-#include <klib/rc.h>
-
-#include <krypto/key.h>
-#include <krypto/encfile.h>
-
-
-#include <sysalloc.h>
-#include <stdlib.h>
-
-
-#ifdef _DEBUGGING
-#define MGR_DEBUG(msg) DBGMSG(DBG_KFS,DBG_FLAG(DBG_KFS_MGR), msg)
-#else
-#define MGR_DEBUG(msg)
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KFSManager
- */
-/* currently expected to be a singleton and not use a vtable but
- * be fully fleashed out here */
-struct KFSManager
-{
-    KRefcount refcount;
-
-    /* the current directory in the eyes of the O/S when created */
-    KDirectory * cwd;
-
-    /* the underlying perating systems view of the path of the 
-     * current working directory */
-    KPath * cpath;
-    
-};
-static const char kfsmanager_classname [] = "KFSManager";
-
-static 
-KFSManager * singleton = NULL;
-
-
-/* Destroy
- *  destroy file
- */
-LIB_EXPORT rc_t CC KFSManagerDestroy ( KFSManager *self )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcDestroying, rcSelf, rcNull );
-
-    KRefcountWhack (&self->refcount, kfsmanager_classname);
-
-    KDirectoryRelease (self->cwd);
-
-    KPathRelease (self->cpath);
-
-    free (self);
-    singleton = NULL;
-    return 0;
-}
-
-/* AddRef
- *  creates a new reference
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KFSManagerAddRef ( const KFSManager *self )
-{
-    if (self != NULL)
-    {
-        switch (KRefcountAdd (&self->refcount, kfsmanager_classname))
-        {
-        case krefOkay:
-            break;
-        case krefZero:
-            return RC (rcFS, rcMgr, rcAttaching, rcRefcount, rcIncorrect);
-        case krefLimit:
-            return RC (rcFS, rcMgr, rcAttaching, rcRefcount, rcExhausted);
-        case krefNegative:
-            return RC (rcFS, rcMgr, rcAttaching, rcRefcount, rcInvalid);
-        default:
-            return RC (rcFS, rcMgr, rcAttaching, rcRefcount, rcUnknown);
-        }
-    }
-    return 0;
-}
-
-/* Release
- *  discard reference to file
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KFSManagerRelease ( const KFSManager *self )
-{
-    rc_t rc = 0;
-    if (self != NULL)
-    {
-        switch (KRefcountDrop (&self->refcount, kfsmanager_classname))
-        {
-        case krefOkay:
-        case krefZero:
-            break;
-        case krefWhack:
-            rc = KFSManagerDestroy ((KFSManager*)self);
-            break;
-        case krefNegative:
-            return RC (rcFS, rcMgr, rcAttaching, rcRefcount, rcInvalid);
-        default:
-            rc = RC (rcFS, rcMgr, rcAttaching, rcRefcount, rcUnknown);
-            break;            
-        }
-    }
-    return rc;
-}
-
-/* OpenFileRead
- *  opens an existing file with read-only access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT rc_t CC KFSManagerOpenFileRead (const KFSManager *self,
-                                           KFile const **f,
-                                           const KPath * path)
-{
-    /* -----
-     * this is a first pass that only opens files directory referenced from 
-     * the ced or have a sysdir root; that is it uses KSysDir and KSysFile
-     * only.
-     */
-    KDirectory *cwd;
-    const KFile * file;
-    size_t num_read;
-    char pbuff [4096];
-    rc_t rc;
-
-    if ((f == NULL) || (path == NULL))
-        return RC (rcFS, rcMgr, rcOpening, rcParam, rcNull);
-
-    *f = NULL;
-
-    if (self == NULL)
-        return RC (rcFS, rcMgr, rcOpening, rcSelf, rcNull);
-
-    rc = KPathReadPath (path, pbuff, sizeof pbuff, &num_read);
-    if (rc == 0)
-    {
-        char rbuff [4096];
-
-        cwd = self->cwd;
-    
-        rc = KDirectoryResolvePath (cwd, true, rbuff, sizeof rbuff, "%s", pbuff);
-        if (rc == 0)
-        {
-            uint32_t type;
-
-            type = KDirectoryPathType (cwd, "%s", rbuff);
-            switch (type & ~kptAlias)
-            {
-            case kptNotFound:
-                rc = RC (rcFS, rcMgr, rcOpening, rcFile, rcNotFound);
-                break;
-
-            case kptFile:
-                rc = KDirectoryOpenFileRead (cwd, f, "%s", rbuff);
-                break;
-
-            case kptBadPath:
-                rc = RC (rcFS, rcMgr, rcOpening, rcFile, rcInvalid);
-                break;
-            case kptDir:
-            case kptCharDev:
-            case kptBlockDev:
-            case kptFIFO:
-            case kptZombieFile:
-                rc = RC (rcFS, rcMgr, rcOpening, rcFile, rcIncorrect);
-                break;
-
-            default:
-                rc = RC (rcFS, rcMgr, rcOpening, rcFile, rcUnknown);
-                break;
-            }
-        }
-    }
-    if (rc == 0)
-    {
-        size_t z;
-        char obuff [4096];
-
-        if (KPathOption (path, kpopt_encrypted, obuff, sizeof obuff, &z) == 0)
-        {
-            const KFile * pwfile;
-
-            if (KPathOption (path, kpopt_pwpath, obuff, sizeof obuff, &z) == 0)
-                rc = KDirectoryOpenFileRead (cwd, &pwfile, "%s", obuff);
-
-            else if (KPathOption (path, kpopt_pwfd, obuff, sizeof obuff, &z) == 0)
-                rc = KFileMakeFDFileRead (&pwfile, atoi (obuff));
-            else
-                rc = RC (rcFS, rcPath, rcConstructing, rcParam, rcUnsupported);
-
-            if (rc == 0)
-            {
-                rc = KFileRead (pwfile, 0, obuff, sizeof obuff, &z);
-                
-                KFileRelease (pwfile);
-
-                if (rc == 0)
-                {
-                    KKey key;
-                    const KFile * encfile;
-
-                    rc = KKeyInit (&key, kkeyAES128, obuff, z);
-
-                    obuff[z] = '\0';
-
-                    rc = KEncFileMakeRead (&encfile, file, &key);
-                    if (rc == 0)
-                    {
-                        *f = encfile;
-                        return 0;
-                    }
-                }
-            }
-            if (rc)
-                KFileRelease (file);
-        }
-        else
-        {
-            *f = file;
-            return 0;
-        }
-    }
-    return rc;
-}
-
-
-/* OpenFileWrite
- *  opens an existing file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if true, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT rc_t CC KFSManagerOpenFileWrite (const KFSManager *self,
-                                            KFile **f, bool update,
-                                            const KPath * path )
-{
-    /* -----
-     * this is a first pass that only opens files directory referenced from 
-     * the ced or have a sysdir root; that is it uses KSysDir and KSysFile
-     * only.
-     */
-    KDirectory * cwd;
-    KFile * file;
-    size_t num_read;
-    char pbuff [4096];
-    rc_t rc;
-
-    if ((f == NULL) || (path == NULL))
-        return RC (rcFS, rcMgr, rcOpening, rcParam, rcNull);
-
-    *f = NULL;
-
-    if (self == NULL)
-        return RC (rcFS, rcMgr, rcOpening, rcSelf, rcNull);
-
-    rc = KPathReadPath (path, pbuff, sizeof pbuff, &num_read);
-    if (rc == 0)
-    {
-        KDirectory *cwd;
-        char rbuff [4096];
-
-        cwd = self->cwd;
-    
-        rc = KDirectoryResolvePath (cwd, true, rbuff, sizeof rbuff, "%s", pbuff);
-        if (rc == 0)
-        {
-            uint32_t type;
-
-            type = KDirectoryPathType (cwd, "%s", rbuff);
-            switch (type & ~kptAlias)
-            {
-            case kptNotFound:
-                rc = RC (rcFS, rcMgr, rcOpening, rcFile, rcNotFound);
-                break;
-
-            case kptFile:
-                rc = KDirectoryOpenFileWrite (cwd, f, update, "%s", rbuff);
-                break;
-
-            case kptBadPath:
-                rc = RC (rcFS, rcMgr, rcOpening, rcFile, rcInvalid);
-                break;
-            case kptDir:
-            case kptCharDev:
-            case kptBlockDev:
-            case kptFIFO:
-            case kptZombieFile:
-                rc = RC (rcFS, rcMgr, rcOpening, rcFile, rcIncorrect);
-                break;
-
-            default:
-                rc = RC (rcFS, rcMgr, rcOpening, rcFile, rcUnknown);
-                break;
-            }
-        }
-    }
-    if (rc == 0)
-    {
-        size_t z;
-        char obuff [4096];
-
-        if (KPathOption (path, kpopt_encrypted, obuff, sizeof obuff, &z) == 0)
-        {
-            const KFile * pwfile;
-
-            if (KPathOption (path, kpopt_pwpath, obuff, sizeof obuff, &z) == 0)
-                rc = KDirectoryOpenFileRead (cwd, &pwfile, "%s", obuff);
-
-            else if (KPathOption (path, kpopt_pwfd, obuff, sizeof obuff, &z) == 0)
-                rc = KFileMakeFDFileRead (&pwfile, atoi (obuff));
-            else
-                rc = RC (rcFS, rcPath, rcConstructing, rcParam, rcUnsupported);
-
-            if (rc == 0)
-            {
-                rc = KFileRead (pwfile, 0, obuff, sizeof obuff, &z);
-                
-                KFileRelease (pwfile);
-
-                if (rc == 0)
-                {
-                    KKey key;
-                    KFile * encfile;
-
-                    rc = KKeyInit (&key, kkeyAES128, obuff, z);
-
-                    obuff[z] = '\0';
-
-                    rc = KEncFileMakeWrite (&encfile, file, &key);
-                    if (rc == 0)
-                    {
-                        *f = encfile;
-                        return 0;
-                    }
-                }
-            }
-            if (rc)
-                KFileRelease (file);
-        }
-        else
-        {
-            *f = file;
-            return 0;
-        }
-    }
-    return rc;
-}
-
-
-/* CreateFile
- *  opens a file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if true, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] KPath representing the path, URL or URN of the desired file
- */
-LIB_EXPORT rc_t CC KFSManagerCreateFile ( const KFSManager *self, KFile **f,
-    bool update, uint32_t access, KCreateMode mode, const KPath * path )
-{
-    /* -----
-     * this is a first pass that only opens files directory referenced from 
-     * the ced or have a sysdir root; that is it uses KSysDir and KSysFile
-     * only.
-     */
-    KDirectory *cwd;
-    KFile * file;
-    size_t num_read;
-    char pbuff [4096];
-    rc_t rc;
-
-    if ((f == NULL) || (path == NULL))
-        return RC (rcFS, rcMgr, rcOpening, rcParam, rcNull);
-
-    *f = NULL;
-
-    if (self == NULL)
-        return RC (rcFS, rcMgr, rcOpening, rcSelf, rcNull);
-
-    rc = KPathReadPath (path, pbuff, sizeof pbuff, &num_read);
-    if (rc == 0)
-    {
-        char rbuff [4096];
-
-        cwd = self->cwd;
-    
-        rc = KDirectoryResolvePath (cwd, true, rbuff, sizeof rbuff, "%s", pbuff);
-        if (rc == 0)
-        {
-            uint32_t type;
-
-            type = KDirectoryPathType (cwd, "%s", rbuff);
-            switch (type & ~kptAlias)
-            {
-            case kptNotFound:
-            case kptFile:
-                rc = KDirectoryCreateFile (cwd, &file, update, access, mode,
-                                           "%s", rbuff);
-                break;
-
-            case kptBadPath:
-                rc = RC (rcFS, rcMgr, rcOpening, rcFile, rcInvalid);
-                break;
-            case kptDir:
-            case kptCharDev:
-            case kptBlockDev:
-            case kptFIFO:
-            case kptZombieFile:
-                rc = RC (rcFS, rcMgr, rcOpening, rcFile, rcIncorrect);
-                break;
-
-            default:
-                rc = RC (rcFS, rcMgr, rcOpening, rcFile, rcUnknown);
-                break;
-            }
-        }
-    }
-    if (rc == 0)
-    {
-        size_t z;
-        char obuff [4096];
-
-        if (KPathOption (path, kpopt_encrypted, obuff, sizeof obuff, &z) == 0)
-        {
-            const KFile * pwfile;
-
-            if (KPathOption (path, kpopt_pwpath, obuff, sizeof obuff, &z) == 0)
-                rc = KDirectoryOpenFileRead (cwd, &pwfile, "%s", obuff);
-
-            else if (KPathOption (path, kpopt_pwfd, obuff, sizeof obuff, &z) == 0)
-                rc = KFileMakeFDFileRead (&pwfile, atoi (obuff));
-            else
-                rc = RC (rcFS, rcPath, rcConstructing, rcParam, rcUnsupported);
-
-            if (rc == 0)
-            {
-                rc = KFileRead (pwfile, 0, obuff, sizeof obuff, &z);
-                
-                KFileRelease (pwfile);
-
-                if (rc == 0)
-                {
-                    KKey key;
-                    KFile * encfile;
-
-                    rc = KKeyInit (&key, kkeyAES128, obuff, z);
-
-                    obuff[z] = '\0';
-
-                    rc = KEncFileMakeWrite (&encfile, file, &key);
-                    if (rc == 0)
-                    {
-                        *f = encfile;
-                        return 0;
-                    }
-                }
-            }
-            if (rc)
-                KFileRelease (file);
-        }
-        else
-        {
-            *f = file;
-            return 0;
-        }
-    }
-    return rc;
-}
-
-
-/* Remove
- *  remove an accessible object from its directory
- *
- *  "force" [ IN ] - if true and target is a directory,
- *  remove recursively
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-LIB_EXPORT rc_t CC KFSManagerRemove ( const KFSManager *self, bool force,
-                                      const KPath * path )
-{
-    /* -----
-     * this is a first pass that only opens files directory referenced from 
-     * the ced or have a sysdir root; that is it uses KSysDir and KSysFile
-     * only.
-     */
-    size_t num_read;
-    char pbuff [4096];
-    rc_t rc;
-
-    if (path == NULL)
-        return RC (rcFS, rcMgr, rcOpening, rcParam, rcNull);
-
-    if (self == NULL)
-        return RC (rcFS, rcMgr, rcOpening, rcSelf, rcNull);
-
-    rc = KPathReadPath (path, pbuff, sizeof pbuff, &num_read);
-    if (rc == 0)
-    {
-        KDirectory *cwd;
-        char rbuff [4096];
-
-        cwd = self->cwd;
-    
-        rc = KDirectoryResolvePath (cwd, true, rbuff, sizeof rbuff, "%s", pbuff);
-        if (rc == 0)
-        {
-            uint32_t type;
-
-            type = KDirectoryPathType (cwd, "%s", rbuff);
-            switch (type & ~kptAlias)
-            {
-            case kptNotFound:
-                break;
-
-            case kptFile:
-            case kptDir:
-            case kptCharDev:
-            case kptBlockDev:
-            case kptFIFO:
-            case kptZombieFile:
-                rc = KDirectoryRemove (cwd, force, "%s", rbuff);
-                break;
-
-            case kptBadPath:
-                rc = RC (rcFS, rcMgr, rcOpening, rcFile, rcInvalid);
-                break;
-/*                 rc = RC (rcFS, rcMgr, rcOpening, rcFile, rcIncorrect); */
-/*                 break; */
-
-            default:
-                rc = RC (rcFS, rcMgr, rcOpening, rcFile, rcUnknown);
-                break;
-            }
-        }
-    }
-    return rc;
-}
-
-
-/* Make
- */
-LIB_EXPORT rc_t CC KFSManagerMake ( KFSManager ** pmanager )
-{
-    if (pmanager == NULL)
-        return RC (rcFS, rcMgr, rcConstructing, rcParam, rcNull);
-
-    if (singleton)
-    {
-        *pmanager = singleton;
-    }
-    else
-    {
-        KFSManager * obj;
-        rc_t rc;
-
-        obj = calloc (1, sizeof (*obj));
-        if (obj == NULL)
-            return RC (rcFS, rcMgr, rcConstructing, rcMemory, rcExhausted);
-
-        KRefcountInit (&obj->refcount, 1, kfsmanager_classname, "init", 
-                       kfsmanager_classname);
-
-        rc = KDirectoryNativeDir (&obj->cwd);
-        if (rc)
-        {
-            obj->cwd = NULL;
-            KFSManagerDestroy (obj);
-            return rc;
-        }
-
-        rc = KPathMakeCurrentPath (&obj->cpath);
-        if (rc)
-        {
-            obj->cpath = NULL;
-            KFSManagerDestroy (obj);
-            return rc;
-        }
-
-        *pmanager = singleton = obj;
-
-    }
-    return 0;
-}
diff --git a/libs/kfs/md5.c b/libs/kfs/md5.c
deleted file mode 100644
index 5d23371..0000000
--- a/libs/kfs/md5.c
+++ /dev/null
@@ -1,1910 +0,0 @@
-/*=======================================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-struct KMD5File;
-#define KFILE_IMPL struct KMD5File
-
-#include <kfs/extern.h>
-#include <kfs/md5.h>
-#include <kfs/impl.h>
-#include <klib/checksum.h>
-#include <klib/container.h>
-#include <klib/text.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <endian.h>
-#include <byteswap.h>
-
-#define MD5_DBG_REF(msg) DBGMSG(DBG_LEGREF,DBG_FLAG(DBG_LEGREF_MD5), msg)
-
-
-/*--------------------------------------------------------------------------
- * KMD5SumEntry
- *  describes an entry into an MD5 checksum file
- */
-typedef struct KMD5SumEntry KMD5SumEntry;
-struct KMD5SumEntry
-{
-    SLNode n;
-    uint8_t digest [ 16 ];
-    bool bin;
-    char path [ 1 ];
-};
-
-static
-void CC KMD5SumEntryWhack ( SLNode *n, void *ignore )
-{
-    free ( n );
-}
-
-typedef struct KMD5SumEntryFlushData KMD5SumEntryFlushData;
-struct KMD5SumEntryFlushData
-{
-    uint64_t pos;
-    KFile *f;
-    rc_t rc;
-};
-
-static
-bool CC KMD5SumEntryFlush ( SLNode *n, void *data )
-{
-    KMD5SumEntryFlushData *pb = data;
-    const KMD5SumEntry *self = ( const KMD5SumEntry* ) n;
-    int i, len;
-    size_t num_writ, total;
-    char line [ 4096 + 40 ];
-
-    for ( total = 0, i = 0; i < 16; ++ i )
-    {
-        len = snprintf ( & line [ total ], sizeof line - total,
-            "%02x", self -> digest [ i ] );
-        assert ( len == 2 );
-        total += len;
-    }
-
-    len = snprintf ( & line [ total ], sizeof line - total,
-        " %c%s\n", self -> bin ? '*' : ' ', self -> path );
-
-    if ( len < 0 )
-    {
-        pb -> rc = RC ( rcFS, rcFile, rcFormatting, rcString, rcExcessive );
-        return true;
-    }
-
-    total += len;
-    if ( total >= sizeof line )
-    {
-        pb -> rc = RC ( rcFS, rcFile, rcFormatting, rcString, rcExcessive );
-        return true;
-    }
-
-    pb -> rc = KFileWrite ( pb -> f, pb -> pos, line, total, & num_writ );
-    if ( pb -> rc != 0 )
-        return true;
-
-    pb -> pos += num_writ;
-
-    if ( num_writ == total )
-        return false;
-
-    pb -> rc = RC ( rcFS, rcFile, rcFormatting, rcTransfer, rcIncomplete );
-    return true;
-}
-
-static
-rc_t KMD5SumEntryMake ( KMD5SumEntry **ep,
-    const char *path, const uint8_t digest [ 16 ], bool bin )
-{
-    KMD5SumEntry *entry = malloc ( sizeof * entry + strlen ( path ) );
-    if ( entry == NULL )
-        return RC ( rcFS, rcFile, rcUpdating, rcMemory, rcExhausted );
-
-    memcpy ( entry -> digest, digest, sizeof entry -> digest );
-    entry -> bin = bin;
-    strcpy ( entry -> path, path );
-
-    * ep = entry;
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * KMD5SumFmt
- *  a formatter for reading or writing an md5sum-style checksum file
- */
-struct KMD5SumFmt
-{
-    SLList entries;
-    KFile *f;
-    atomic32_t refcount;
-    uint32_t count;
-    bool read_only;
-    bool dirty;
-};
-
-/* Flush
- */
-LIB_EXPORT rc_t CC KMD5SumFmtFlush ( KMD5SumFmt *self )
-{
-    if ( self != NULL && self -> dirty )
-    {
-        KMD5SumEntryFlushData pb;
-        pb . pos = 0;
-        pb . f = self -> f;
-        pb . rc = 0;
-
-        SLListDoUntil ( & self -> entries, KMD5SumEntryFlush, & pb );
-
-        if ( pb . rc != 0 )
-            return pb . rc;
-
-        self -> dirty = false;
-    }
-    return 0;
-}
-
-
-/* Whack
- */
-static
-rc_t KMD5SumFmtWhack ( KMD5SumFmt *self )
-{
-    rc_t rc;
-
-    atomic32_set ( & self -> refcount, 1 );
-
-    rc = KMD5SumFmtFlush ( self );
-    if ( rc == 0 )
-        rc = KFileRelease ( self -> f );
-    if ( rc != 0 )
-        return rc;
-
-    SLListWhack ( & self -> entries, KMD5SumEntryWhack, NULL );
-    free ( self );
-    return 0;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KMD5SumFmtAddRef ( const KMD5SumFmt *cself )
-{
-    if ( cself != NULL )
-    {
-        MD5_DBG_REF (("%s self %p prior count %u\n", __func__, cself, atomic32_read ( & cself -> refcount ) ));
-        atomic32_inc ( & ( ( KMD5SumFmt* ) cself ) -> refcount );
-    }
-    else
-    {
-        MD5_DBG_REF(("%s self %p\n", __func__, cself));
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KMD5SumFmtRelease ( const KMD5SumFmt *cself )
-{
-    KMD5SumFmt *self = ( KMD5SumFmt* ) cself;
-    if ( cself != NULL )
-    {
-        MD5_DBG_REF (("%s self %p prior count %u\n", __func__, cself, atomic32_read ( & cself -> refcount ) ));
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-            return KMD5SumFmtWhack ( self );
-    }
-    else
-    {
-        MD5_DBG_REF(("%s self %p\n", __func__, cself));
-    }
-    return 0;
-}
-
-
-/* Extract
- *  extract a single line
- */
-static
-int hex_to_int ( char hex )
-{
-    int i = hex - '0';
-    if ( hex > '9' )
-    {
-        if ( hex < 'a' )
-            i = hex - 'A' + 10;
-        else
-            i = hex - 'a' + 10;
-
-        if ( i > 15 )
-            return -1;
-    }
-    return i;
-}
-
-static
-rc_t KMD5SumFmtExtract ( KMD5SumFmt *self, const char *line, size_t size )
-{
-    rc_t rc;
-    KMD5SumEntry *entry;
-
-    /* check for a DOS condition not caught by parse */
-    if ( line [ size - 1 ] == '\r' )
-    {
-        /* drop CR from line */
-        size -= 1;
-    }
-
-    /* create entry */
-    entry = malloc ( sizeof * entry + size - ( 32 /* cs */ + 2 /* sp + mode */ ) );
-    if ( entry == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        int i;
-
-        /* parse checksum */
-        for ( rc = 0, i = 0; i < 16; ++ i )
-        {
-            int l, u = hex_to_int ( line [ i + i + 0 ] );
-            l = hex_to_int ( line [ i + i + 1 ] );
-            if ( u < 0 || l < 0 )
-            {
-                rc = RC ( rcFS, rcFile, rcConverting, rcFormat, rcInvalid );
-                break;
-            }
-
-            entry -> digest [ i ] = ( uint8_t ) ( ( u << 4 ) | l );
-        }
-
-        /* parse mode */
-        if ( rc == 0 )
-        {
-            if ( line [ 32 ] != ' ' )
-                rc = RC ( rcFS, rcFile, rcConverting, rcFormat, rcInvalid );
-            else if ( line [ 33 ] == ' ' )
-                entry -> bin = false;
-            else if ( line [ 33 ] == '*' )
-                entry -> bin = true;
-            else
-                rc = RC ( rcFS, rcFile, rcConverting, rcFormat, rcInvalid );
-        }
-
-        /* the rest is path */
-        if ( rc == 0 )
-        {
-            string_copy ( entry -> path, size, & line [ 32 + 2 ], size - ( 32 + 2 ) );
-            SLListPushTail ( & self -> entries, & entry -> n );
-            ++ self -> count;
-            return 0;
-        }
-
-        free ( entry );
-    }
-
-    return rc;
-}
-
-
-/* Parse
- *  parse *.md5 file
- */
-static
-rc_t KMD5SumFmtParse ( KMD5SumFmt *self, const char *start, const char *stop )
-{
-    rc_t rc;
-    const char *end;
-
-    for ( rc = 0; start < stop; start = end + 1 )
-    {
-        end = string_chr ( start, stop - start, '\n' );
-        if ( end == NULL )
-            end = stop;
-
-        /* allow '#' comments and blank lines */
-        if ( ( end - start ) == 0 )
-            continue;
-        if ( start [ 0 ] == '#' )
-            continue;
-
-        /* line must have minimum length */
-        if ( ( end - start ) < ( 32 /* cs */ + 2 /* sp + mode */ + 1 /* path */ ) )
-        {
-            /* check for empty line ending in CR-LF */
-            if ( end [ -1 ] == '\r' && ( end - start ) == 1 )
-                continue;
-
-            /* other stuff is garbage */
-            rc = RC ( rcFS, rcFile, rcParsing, rcData, rcInsufficient );
-            break;
-        }
-
-        /* extract entry */
-        rc = KMD5SumFmtExtract ( self, start, end - start );
-        if ( rc != 0 )
-            break;
-    }
-
-    return rc;
-}
-
-
-/* Populate
- *  reads all lines of input from *.md5 file
- */
-static
-rc_t KMD5SumFmtPopulate ( KMD5SumFmt *self, const KFile *in )
-{
-    uint64_t eof;
-    rc_t rc = KFileSize ( in, & eof );
-    if ( rc == 0 )
-    {
-        char *buff = malloc ( ( size_t ) eof );
-        if ( buff == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            size_t num_read, total;
-            for ( total = 0; total < ( size_t ) eof; total += num_read )
-            {
-                rc = KFileRead ( in, total,
-                    & buff [ total ], ( size_t ) eof - total, & num_read );
-                if ( rc != 0 )
-                    break;
-                if ( num_read == 0 )
-                {
-                    rc = RC ( rcFS, rcFile, rcReading, rcTransfer, rcIncomplete );
-                    break;
-                }
-            }
-
-            if ( rc == 0 )
-                rc = KMD5SumFmtParse ( self, buff, buff + total );
-
-            free ( buff );
-        }
-    }
-
-    return rc;
-}
-
-
-/* Make
- *  creates a formatted accessor to textual checksum file
- *  takes over ownership of "in"/"out" file reference
- */
-LIB_EXPORT rc_t CC KMD5SumFmtMakeRead ( const KMD5SumFmt **fp, const KFile *in )
-{
-    rc_t rc;
-    if ( fp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( in == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! in -> read_enabled )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        else
-        {
-            KMD5SumFmt *f = malloc ( sizeof * f );
-            if ( f == NULL )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                SLListInit ( & f -> entries );
-                atomic32_set ( & f -> refcount, 1 );
-                f -> f = NULL;
-                f -> count = 0;
-                f -> read_only = true;
-                f -> dirty = false;
-
-                rc = KMD5SumFmtPopulate ( f, in );
-                if ( rc == 0 )
-                {
-                    f -> f = ( KFile* ) in;
-                    * fp = f;
-                    return 0;
-                }
-                
-                KMD5SumFmtWhack ( f );
-            }
-        }
-
-        * fp = NULL;
-    }
-
-    return rc;
-}
-
-/* Make
- *  creates a formatted accessor to textual checksum file
- *  takes over ownership of "in"/"out" file reference
- */
-LIB_EXPORT rc_t CC KMD5SumFmtMakeUpdate ( KMD5SumFmt **fp, KFile *out )
-{
-    rc_t rc;
-    if ( fp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( out == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! out -> write_enabled )
-        {
-            if ( out -> read_enabled )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcReadonly );
-            else
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        }
-        else
-        {
-            KMD5SumFmt *f = malloc ( sizeof * f );
-            if ( f == NULL )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                SLListInit ( & f -> entries );
-                atomic32_set ( & f -> refcount, 1 );
-                f -> f = NULL;
-                f -> count = 0;
-                f -> read_only = false;
-                f -> dirty = false;
-
-                rc = 0;
-                if ( out -> read_enabled )
-                    rc = KMD5SumFmtPopulate ( f, out );
-                if ( rc == 0 )
-                {
-                    f -> f = out;
-                    * fp = f;
-                    return 0;
-                }
-                
-                KMD5SumFmtWhack ( f );
-            }
-        }
-
-        * fp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* Count
- *  return the number of checksums in file
- */
-LIB_EXPORT rc_t CC KMD5SumFmtCount ( const KMD5SumFmt *self, uint32_t *count )
-{
-    rc_t rc;
-    if ( count == NULL )
-        rc = RC ( rcFS, rcFile, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcFile, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * count = self -> count;
-            return 0;
-        }
-
-        * count = 0;
-    }
-    return rc;
-}
-
-
-/* Get
- *  retrieve an indexed checksum line
- *
- *  "idx" [ IN ] - zero-based index of checksum to access
- *
- *  "path" [ OUT ] and "size" [ IN ] - return buffer for file path
- *
- *  "digest" [ OUT ] - return parameter for the MD5 checksum
- *
- *  "bin" [ OUT, NULL OKAY ] - true if fopen mode used to
- *  calculate "digest" was binary, false if text. pertinent if
- *  digest was calculated using DOS text mode.
- */
-LIB_EXPORT rc_t CC KMD5SumFmtGet ( const KMD5SumFmt *self, uint32_t idx,
-    char *path, size_t size, uint8_t digest [ 16 ], bool *bin )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcFS, rcFile, rcAccessing, rcSelf, rcNull );
-    else if ( idx >= self -> count )
-        rc = RC ( rcFS, rcFile, rcAccessing, rcId, rcNotFound );
-    else
-    {
-        uint32_t i;
-        const KMD5SumEntry *entry = ( const KMD5SumEntry* )
-            SLListHead ( & self -> entries );
-        for ( i = 0; entry != NULL && i < idx; ++ i )
-        {
-            entry = ( const KMD5SumEntry* )
-                SLNodeNext ( & entry -> n );
-        }
-
-        if ( entry == NULL )
-            rc = RC ( rcFS, rcFile, rcAccessing, rcId, rcNotFound );
-        else if ( path == NULL )
-            rc = RC ( rcFS, rcFile, rcAccessing, rcBuffer, rcNull );
-        else if ( digest == NULL )
-            rc = RC ( rcFS, rcFile, rcAccessing, rcParam, rcNull );
-        else
-        {
-            /* copy everything out */
-            memcpy ( digest, entry -> digest, sizeof entry -> digest );
-            if ( bin != NULL )
-                * bin = entry -> bin;
-
-            /* return success if buffer large enough */
-            if ( string_copy_measure ( path, size, entry -> path ) < size )
-                return 0;
-
-            rc = RC ( rcFS, rcFile, rcAccessing, rcBuffer, rcInsufficient );
-        }
-    }
-
-    if ( path != NULL && size != 0 )
-        path [ 0 ] = 0;
-
-    if ( bin != NULL )
-        * bin = false;
-
-    return rc;
-}
-
-
-/* Find
- *  retrieve checksum line by path
- *
- *  "path" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file
- *
- *  "digest" [ OUT ] - return parameter for the MD5 checksum
- *
- *  "bin" [ OUT, NULL OKAY ] - true if fopen mode used to
- *  calculate "digest" was binary, false if text. pertinent if
- *  digest was calculated using DOS text mode.
- */
-LIB_EXPORT rc_t CC KMD5SumFmtFind ( const KMD5SumFmt *self,
-    const char *path, uint8_t digest [ 16 ], bool *bin )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcFS, rcFile, rcAccessing, rcSelf, rcNull );
-    else if ( path == NULL )
-        rc = RC ( rcFS, rcFile, rcAccessing, rcPath, rcNull );
-    else if ( path [ 0 ] == 0 )
-        rc = RC ( rcFS, rcFile, rcAccessing, rcPath, rcEmpty );
-    else
-    {
-        const KMD5SumEntry *entry = ( const KMD5SumEntry* )
-            SLListHead ( & self -> entries );
-        while ( entry != NULL )
-        {
-            if ( strcmp ( path, entry -> path ) == 0 )
-                break;
-
-            entry = ( const KMD5SumEntry* )
-                SLNodeNext ( & entry -> n );
-        }
-
-        if ( entry == NULL )
-            rc = RC ( rcFS, rcFile, rcAccessing, rcPath, rcNotFound );
-        else if ( digest == NULL )
-            rc = RC ( rcFS, rcFile, rcAccessing, rcParam, rcNull );
-        else
-        {
-            /* copy everything out */
-            memcpy ( digest, entry -> digest, sizeof entry -> digest );
-            if ( bin != NULL )
-                * bin = entry -> bin;
-
-            return 0;
-        }
-    }
-
-    if ( bin != NULL )
-        * bin = false;
-
-    return rc;
-}
-
-
-/* Delete
- *  remove an existing line
- *
- *  "path" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file
- *
- *  returns rcNotFound if not present
- */
-LIB_EXPORT rc_t CC KMD5SumFmtDelete ( KMD5SumFmt *self, const char *path )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcFS, rcFile, rcRemoving, rcSelf, rcNull );
-    else if ( path == NULL )
-        rc = RC ( rcFS, rcFile, rcRemoving, rcPath, rcNull );
-    else if ( path [ 0 ] == 0 )
-        rc = RC ( rcFS, rcFile, rcRemoving, rcPath, rcEmpty );
-    else
-    {
-        KMD5SumEntry *entry = ( KMD5SumEntry* )
-            SLListHead ( & self -> entries );
-        while ( entry != NULL )
-        {
-            if ( strcmp ( path, entry -> path ) == 0 )
-                break;
-
-            entry = ( KMD5SumEntry* )
-                SLNodeNext ( & entry -> n );
-        }
-
-        if ( entry == NULL )
-            rc = SILENT_RC ( rcFS, rcFile, rcRemoving, rcPath, rcNotFound );
-        else
-        {
-            /* pop entry from list */
-            SLListUnlink ( & self -> entries, & entry -> n );
-
-            /* delete entry */
-            KMD5SumEntryWhack ( & entry -> n, NULL );
-
-            /* mark the modification */
-            self -> dirty = true;
-            assert ( self -> count > 0 );
-            -- self -> count;
-
-            return 0;
-        }
-    }
-
-    return rc;
-}
-
-
-/* Update
- *  add a checksum line to file or update an existing line
- *
- *  "path" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file
- *
- *  "digest" [ IN ] - calculated MD5 checksum
- *
- *  "bin" [ IN ] - true if checksum was calculated on all bytes
- *  in file, false if fopen mode used to read file was text.
- *
- * NB - the md5sum tool operates with the assumption that files
- *  are opened using "fopen". it records the mode used by prepending
- *  '*' to indicate binary and ' ' to indicate text mode within the
- *  checksum line.
- *
- *  unfortunately, this creates a situation where text-mode files
- *  checksummed on DOS cannot be properly checked on any other
- *  platform without the aid of some filter to drop out '\r' from
- *  a '\r\n' sequence.
- *
- *  fortunately, most users are unaware of the binary/text mode
- *  switches available with md5sum and use the default mode, which
- *  is binary on DOS and text on Unix, which happens to be equivalent
- *  to binary ( making one wonder why binary is not instead the
- *  universal default ).
- *
- *  the end result is that we need to indicate whether CR stripping
- *  was performed while at the same time behaving like md5sum.
- */
-LIB_EXPORT rc_t CC KMD5SumFmtUpdate ( KMD5SumFmt *self, const char *path,
-    const uint8_t digest [ 16 ], bool bin )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcSelf, rcNull );
-    else if ( path == NULL )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcString, rcNull );
-    else if ( path [ 0 ] == 0 )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcString, rcEmpty );
-    else if ( digest == NULL )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcParam, rcNull );
-    else
-    {
-        /* create an entry */
-        KMD5SumEntry *entry;
-        rc = KMD5SumEntryMake ( & entry, path, digest, bin );
-        if ( rc == 0 )
-        {
-            /* scan for existing entry */
-            KMD5SumEntry *exist = ( KMD5SumEntry* )
-                SLListHead ( & self -> entries );
-            while ( exist != NULL )
-            {
-                if ( strcmp ( exist -> path, entry -> path ) == 0 )
-                    break;
-                exist = ( KMD5SumEntry* )
-                    SLNodeNext ( & exist -> n );
-            }
-
-            /* if new entry, insert */
-            if ( exist == NULL )
-            {
-                SLListPushTail ( & self -> entries, & entry -> n );
-                self -> dirty = true;
-                ++ self -> count;
-            }
-            else
-            {
-                /* if existing, perform update */
-                if ( memcmp ( exist -> digest, entry -> digest, sizeof exist -> digest ) != 0 ||
-                     exist -> bin != entry -> bin )
-                {
-                    memcpy ( exist -> digest, entry -> digest, sizeof exist -> digest );
-                    exist -> bin = entry -> bin;
-                    self -> dirty = true;
-                }
-                KMD5SumEntryWhack ( & entry -> n, NULL );
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* Rename
- * Rename the checksum line to reflect a file name change but no content change.
- *
- *  "newpath" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file's new name
- *
- *  "oldpath" [ IN ] - NUL terminated string in OS-native char set
- *  denoting path to file's old name
- *
- */
-LIB_EXPORT rc_t CC KMD5SumFmtRename ( KMD5SumFmt *self, const char *oldpath, const char *newpath )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcSelf, rcNull );
-    else if ( newpath == NULL )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcString, rcNull );
-    else if ( newpath [ 0 ] == 0 )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcString, rcEmpty );
-    else if ( oldpath == NULL )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcString, rcNull );
-    else if ( oldpath [ 0 ] == 0 )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcString, rcEmpty );
-    else
-    {
-	uint8_t	digest [16];
-	bool    bin;
-
-	rc = KMD5SumFmtFind (self, oldpath, digest, &bin);
-
-	if (rc == 0)
-	    rc = KMD5SumFmtUpdate (self, newpath, digest, bin);
-
-	if (rc == 0)
-	    rc = KMD5SumFmtDelete (self, oldpath);
-;
-    }
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * MD5 KFile extensions
- */
-typedef enum KMD5FileUnionType
-{
-    KMD5FileTypeRead,
-    KMD5FileTypeWrite
-} KMD5FileUnionType;
-struct KMD5File
-{
-    KFile dad;
-
-    /* this is position of next byte to read or write
-       relative to the MD5 not actual read/write */
-    uint64_t position;
-    MD5State md5;
-
-    KFile *file;
-    KMD5SumFmt *fmt;
-    KMD5FileUnionType type;
-    union
-    {
-        struct
-        {
-            rc_t rc;
-            uint8_t digest [ 16 ];
-            bool eof;
-        } rd;
-
-        struct
-        {
-            /* maximum position written to "file" */
-            uint64_t max_position;
-
-            /* saved information for a transaction */
-            uint64_t tposition;
-            MD5State tmd5;
-
-            /* is transaction open */
-            bool topen;
-            
-            /* was file changed */
-            bool changed;
-
-            /* path to file for md5 fmt */
-            char path [ 1 ];
-        } wr;
-
-    } u;
-};
-
-/* Whack
- */
-static
-rc_t CC KMD5FileWhackRead ( KMD5File *self )
-{
-    rc_t rc;
-
-    atomic32_set ( & self -> dad . refcount, 1 );
-
-    rc = KFileRelease ( self -> file );
-    if ( rc == 0 )
-        free ( self );
-
-    return rc;
-}
-static
-rc_t CC KMD5FileWhackCreate ( KMD5File *self )
-{
-    uint64_t	position;
-    size_t	num_read;
-    rc_t	rc;
-    uint8_t	ignored [64 * 1024];
-
-    atomic32_set ( & self -> dad . refcount, 1 );
-
-    position = self->position;
-    for (;;)
-    {
-	rc = KFileRead (&self->dad, position, ignored, sizeof ignored, &num_read);
-	if (rc != 0)
-	    break;
-
-	if (num_read == 0)
-	    break;
-
-	position += num_read;
-    }
-    if (rc == 0)
-    {
-	rc = KFileRelease ( self -> file );
-	if ( rc == 0 )
-	    free ( self );
-    }
-    return rc;
-}
-
-static
-rc_t CC KMD5FileWhackWrite ( KMD5File *self )
-{
-    rc_t rc;
-    uint8_t digest [ 16 ];
-
-    atomic32_set ( & self -> dad . refcount, 1 );
-
-    /* if destination file has been written farther
-       than our concept of eof, truncate */
-    if ( self-> u . wr . changed && self -> u . wr . max_position > self -> position )
-    {
-        rc = KFileSetSize ( self -> file, self -> position );
-        if ( rc != 0 )
-            return rc;
-        self -> u . wr . max_position = self -> position;
-    }
-
-    rc = KFileRelease ( self -> file );
-    if ( rc == 0 )
-    {
-        MD5StateFinish ( & self -> md5, digest );
-        KMD5SumFmtUpdate ( self -> fmt, self -> u . wr . path, digest, true );
-        KMD5SumFmtRelease ( self -> fmt );
-        free ( self );
-    }
-
-    return rc;
-}
-
-static const char MD5TAG [8] = "MD5CNTXT";
-static const char ENDIANTAG [4] =
-{ 
-    '0' + (char)((__BYTE_ORDER/1000)%10),
-    '0' + (char)((__BYTE_ORDER/100)%10),
-    '0' + (char)((__BYTE_ORDER/10)%10),
-    '0' + (char)((__BYTE_ORDER/1)%10)
-};
-static const char ENDIANSWAPTAG [4] =
-{ 
-    '0' + (char)((__BYTE_ORDER/1)%10),
-    '0' + (char)((__BYTE_ORDER/10)%10),
-    '0' + (char)((__BYTE_ORDER/100)%10),
-    '0' + (char)((__BYTE_ORDER/1000)%10)
-};
-
-static
-rc_t CC KMD5FileWrite ( KMD5File *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ );
-
-static
-rc_t CC KMD5FileWhackAppend ( KMD5File *self )
-{
-    rc_t rc;
-
-    /* if the file is empty, just whack it */
-    if ( self -> position == 0 )
-        return KMD5FileWhackWrite ( self );
-
-    /* begin transaction will save current state */
-    rc = KMD5FileBeginTransaction ( self );
-    if ( rc == 0 )
-    {
-        size_t num_writ;
-
-        /* create a closing tag with current MD5State */
-        uint8_t closer [ sizeof MD5TAG + sizeof ENDIANTAG + sizeof self -> md5 ];
-        memcpy ( closer, MD5TAG, sizeof MD5TAG );
-        memcpy ( & closer [ sizeof MD5TAG ], ENDIANTAG, sizeof ENDIANTAG );
-        memcpy ( & closer [ sizeof MD5TAG + sizeof ENDIANTAG ], & self -> md5, sizeof self -> md5 );
-            
-        /* append this to the file */
-        rc = KMD5FileWrite ( self, self -> position, closer, sizeof closer, & num_writ );
-        if ( rc == 0 )
-        {
-            /* test transfer */
-            if ( num_writ != sizeof closer )
-                rc = RC ( rcFS, rcFile, rcDestroying, rcTransfer, rcIncomplete );
-            else
-            {
-                /* complete operation */
-                rc = KMD5FileWhackWrite ( self );
-                if ( rc == 0 )
-                    return rc;
-            }
-        }
-
-        /* restore entry state */
-        KMD5FileRevert ( self );
-    }
-
-    /* bail on errors */
-    atomic32_set ( & self -> dad . refcount, 1 );
-    return rc;
-}
-
-
-/* GetSysFile
- */
-static
-struct KSysFile *CC KMD5FileGetSysFile ( const KMD5File *self, uint64_t *offset )
-{
-    if ( offset != NULL )
-        * offset = 0;
-    return NULL;
-}
-
-
-/* RandomAccess
- */
-static
-rc_t CC KMD5FileRandomAccessRead ( const KMD5File *self )
-{
-    return KFileRandomAccess ( self -> file );
-}
-
-static
-rc_t CC KMD5FileRandomAccessWrite ( const KMD5File *self )
-{
-    return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported );
-}
-
-
-/* Type
- */
-static
-uint32_t CC KMD5FileType ( const KMD5File *self )
-{
-    return KFileType ( self -> file );
-}
-
-
-/* Size
- */
-static
-rc_t CC KMD5FileSize ( const KMD5File *self, uint64_t *size )
-{
-    return KFileSize ( self -> file, size );
-}
-
-static
-rc_t CC KMD5FileSizeAppend ( const KMD5File *self, uint64_t *size )
-{
-    assert (self);
-    assert (size);
-    *size = self->position;
-    return 0;
-}
-
-
-/* SetSize
- *  the read-only version should never be called, because
- *  the message dispatch checks for write enable
- *
- *  the writable version disallows all but a total reset
- *  and setting size to current size
- */
-static
-rc_t CC KMD5FileSetSizeRead ( KMD5File *self, uint64_t size )
-{
-    return RC ( rcFS, rcFile, rcUpdating, rcFunction, rcUnsupported );
-}
-
-static
-rc_t CC KMD5FileSetSizeWrite ( KMD5File *self, uint64_t size )
-{
-    rc_t rc;
-
-    /* allow a noop */
-    if ( size == self -> position )
-        return 0;
-
-    /* disallow if not a reset */
-    if ( size != 0 )
-        return RC ( rcFS, rcFile, rcUpdating, rcFunction, rcUnsupported );
-
-    /* ensure we're not in a transaction */
-    if ( self -> u . wr . topen )
-        return RC ( rcFS, rcFile, rcUpdating, rcFile, rcBusy );
-
-    /* go ahead and try to truncate destination */
-    rc = KFileSetSize ( self -> file, 0 );
-    if ( rc == 0 )
-    {
-        self -> u . wr . changed = true;
-        /* reset our internal state */
-        self -> position = self -> u . wr . max_position = 0;
-        MD5StateInit ( & self -> md5 );
-    }
-
-    return rc;
-}
-
-
-/* Finish
- *  finishes an MD5State if necessary
- *  returns the results of digest comparison
- */
-static
-rc_t KMD5FileFinish ( KMD5File *self )
-{
-    /* finish MD5State on first time */
-    if ( ! self -> u . rd . eof )
-    {
-        uint8_t digest [ 16 ];
-        MD5StateFinish ( & self -> md5, digest );
-
-        if ( memcmp ( digest, self -> u . rd . digest, sizeof digest ) != 0 )
-            self -> u . rd . rc = RC ( rcFS, rcFile, rcReading, rcFile, rcCorrupt );
-
-        self -> u . rd . eof = true;
-    }
-
-    return self -> u . rd . rc;
-}
-
-
-/* Seek
- *  used to scan ahead in a read-only file
- *  "self" is modifiable, but file is read-only
- */
-static
-rc_t KMD5FileSeek ( KMD5File *self, uint64_t pos )
-{
-    rc_t rc;
-    size_t num_read;
-    uint8_t buff [ 32 * 1024 ];
-
-    /* should never be called by writable file */
-    assert ( ! self -> dad . write_enabled );
-
-    /* seek to "pos" */
-    for ( rc = 0; self -> position < pos; self -> position += num_read )
-    {
-        /* maximum to read in this buffer */
-        size_t to_read = sizeof buff;
-        if ( self -> position + sizeof buff > pos )
-            to_read = ( size_t ) ( pos - self -> position );
-
-        /* read bytes */
-        rc = KFileRead ( self -> file, self -> position, buff, to_read, & num_read );
-        if ( rc != 0 )
-            break;
-
-        /* detect EOF */
-        if ( num_read == 0 )
-        {
-	    switch (self->type)
-	    {
-	    case KMD5FileTypeRead:
-		rc = KMD5FileFinish ( self );
-		break;
-	    case KMD5FileTypeWrite:
-		if ( self -> fmt != NULL)
-		{
-		    uint8_t digest [ 16 ];
-
-		    MD5StateFinish ( & self -> md5, digest );
-		    KMD5SumFmtUpdate ( self -> fmt, self -> u . wr . path, digest, true );
-		    KMD5SumFmtRelease ( self -> fmt );
-		    self -> fmt = NULL;
-		}
-		break;
-	    }
-	    break;
-        }
-
-        /* append bytes */
-        MD5StateAppend ( & self -> md5, buff, num_read );
-    }
-
-    return rc;
-}
-
-/* Read
- *  read-only version allows random access reads
- */
-static
-rc_t CC KMD5FileRead ( const KMD5File *cself,
-    uint64_t pos, void *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc;
-    size_t total = 0;
-    uint64_t end = pos + bsize;
-    KMD5File *self = ( KMD5File* ) cself;
-
-    * num_read = 0;
-
-    /* no buffer means no bytes */
-    if ( bsize == 0 )
-        return 0;
-
-    /* test for starting a read before the current marker
-       meaning that it does not figure in to the md5sum */
-    if ( self -> position  > pos )
-    {
-        /* test for entire buffer being before marker */
-        if ( end <= self -> position )
-            return KFileRead ( self -> file, pos, buffer, bsize, num_read );
-
-        /* perform a partial read without affecting md5 */
-        rc = KFileRead ( self -> file, pos, buffer, ( size_t ) ( self -> position - pos ), num_read );
-        if ( rc != 0 )
-            return rc;
-
-        /* adjust as if a new read request, remembering number read so far */
-        pos += * num_read;
-        total = * num_read;
-        buffer = & ( ( uint8_t* ) buffer ) [ * num_read ];
-
-        /* in case num_read != all bytes up to marker */
-        if ( pos != self -> position )
-            return 0;
-    }
-
-    /* test for hole between current marker and desired start */
-    else if ( self -> position < pos )
-    {
-        /* scan ahead, discarding */
-        rc = KMD5FileSeek ( self, pos );
-        if ( rc != 0 || self -> position < pos )
-            return rc;
-    }
-
-    /* no hole - and still some space in buffer */
-    assert ( self -> position == pos );
-    assert ( pos < end );
-
-    /* read bytes */
-    rc = KFileRead ( self -> file, pos, buffer, ( size_t ) ( end - pos ), num_read );
-    if ( rc == 0 )
-    {
-        /* detect bytes read */
-        if ( * num_read != 0 )
-        {
-            /* accumulate into MD5 */
-            self -> position += * num_read;
-            MD5StateAppend ( & self -> md5, buffer, * num_read );
-
-            /* add in any previously read bytes and return success */
-            * num_read += total;
-            return 0;
-        }
-        switch (self->type)
-        {
-        case KMD5FileTypeRead:
-            /* EOF - get MD5 digest results */
-            rc = KMD5FileFinish ( self );
-            break;
-        case KMD5FileTypeWrite:
-            if ( self -> fmt != NULL)
-            {
-            uint8_t digest [ 16 ];
-
-            MD5StateFinish ( & self -> md5, digest );
-            KMD5SumFmtUpdate ( self -> fmt, self -> u . wr . path, digest, true );
-            KMD5SumFmtRelease ( self -> fmt );
-            self -> fmt = NULL;
-            }
-            break;
-        }
-    }
-
-    /* always return 0 if some bytes were read */
-    if ( total != 0 )
-    {
-        * num_read = total;
-        return 0;
-    }
-
-    return rc;
-}
-
-/* Read
- *  writeable version isn't keeping track of MD5 on read,
- *  so just forward to destination file
- */
-static
-rc_t CC KMD5FileFwdRead ( const KMD5File *self,
-    uint64_t pos, void *buffer, size_t bsize, size_t *num_read )
-{
-    return KFileRead ( self -> file, pos, buffer, bsize, num_read );
-}
-
-
-/* Write
- */
-static
-rc_t CC KMD5FileBadWrite ( KMD5File *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    * num_writ = 0;
-    if ( size == 0 )
-        return 0;
-    if ( buffer == NULL )
-        return RC ( rcFS, rcFile, rcWriting, rcBuffer, rcNull );
-
-    return RC ( rcFS, rcFile, rcReading, rcFile, rcReadonly );
-}
-
-static
-rc_t CC KMD5FileWrite ( KMD5File *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    rc_t rc;
-
-    if ( pos != self -> position )
-        return RC ( rcFS, rcFile, rcWriting, rcParam, rcInvalid );
-
-    rc = KFileWrite ( self -> file, pos, buffer, size, num_writ );
-    if ( rc == 0 && * num_writ != 0 )
-    {
-        self -> u . wr . changed = true;
-        self -> position += * num_writ;
-        if ( self -> position > self -> u . wr . max_position )
-            self -> u . wr . max_position = self -> position;
-        MD5StateAppend ( & self -> md5, buffer, * num_writ );
-    }
-
-    return rc;
-}
-
-
-/* ToKFile
- *  an MD5 file is a subclass of KFile
- *  this is an explicit cast operator
- */
-LIB_EXPORT KFile* CC KMD5FileToKFile ( KMD5File *self )
-{
-    if ( self != NULL )
-        return & self -> dad;
-    return NULL;
-}
-
-LIB_EXPORT const KFile* CC KMD5FileToKFileConst ( const KMD5File *self )
-{
-    if ( self != NULL )
-        return & self -> dad;
-    return NULL;
-}
-
-
-/* BeginTransaction
- *  preserve current MD5 state and file marker
- *  in preparation for rollback
- */
-LIB_EXPORT rc_t CC KMD5FileBeginTransaction ( KMD5File *self )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcFreezing, rcSelf, rcNull );
-    if ( ! self -> dad . write_enabled )
-        return RC ( rcFS, rcFile, rcFreezing, rcFile, rcReadonly );
-    if ( self -> u . wr . topen )
-        return RC ( rcFS, rcFile, rcFreezing, rcFile, rcBusy );
-
-    self -> u . wr . topen = true;
-    self -> u . wr . tposition = self -> position;
-    self -> u . wr . tmd5 = self -> md5;
-
-    return 0;
-}
-
-
-/* Commit
- *  accept current MD5 state as correct
- */
-LIB_EXPORT rc_t CC KMD5FileCommit ( KMD5File *self )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcCommitting, rcSelf, rcNull );
-    if ( ! self -> dad . write_enabled )
-        return RC ( rcFS, rcFile, rcCommitting, rcFile, rcReadonly );
-
-    self -> u . wr . topen = false;
-
-    return 0;
-}
-
-
-/* Revert
- *  revert state to previous transaction boundary conditions
- */
-LIB_EXPORT rc_t CC KMD5FileRevert ( KMD5File *self )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcReverting, rcSelf, rcNull );
-    if ( ! self -> dad . write_enabled )
-        return RC ( rcFS, rcFile, rcReverting, rcFile, rcReadonly );
-    if ( ! self -> u . wr . topen )
-        return RC ( rcFS, rcFile, rcReverting, rcFile, rcInconsistent );
-
-    self -> position = self -> u . wr . tposition;
-    self -> md5 = self -> u . wr . tmd5;
-    self -> u . wr . topen = false;
-
-    return 0;
-}
-
-/* Reset
- *  reset state to that of an empty file
- *  aborts any open transaction
- */
-LIB_EXPORT rc_t CC KMD5FileReset ( KMD5File *self )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcResetting, rcSelf, rcNull );
-    if ( ! self -> dad . write_enabled )
-        return RC ( rcFS, rcFile, rcResetting, rcFile, rcReadonly );
-#if 1
-    self -> u . wr . topen = false;
-#else
-    if ( self -> u . wr . topen )
-        return RC ( rcFS, rcFile, rcResetting, rcFile, rcBusy );
-#endif
-
-    self -> u . wr . changed = true;
-    self -> position = 0;
-    MD5StateInit ( & self -> md5 );
-
-    return 0;
-}
-
-/*--------------------------------------------------------------------------
- * MD5File factories
- */
-
-
-/* MakeMD5Read
- *  creates an adapter to check MD5 checksum for a source file
- *
- *  "f" [ OUT ] - return parameter for file with md5 check
- *
- *  "src" [ IN ] - source file with read permission
- *
- *  "digest" [ IN ] - MD5 checksum to match
- *
- * NB - creates a read-only file that does NOT support random access
- *  i.e. must be consumed serially starting from offset 0
- */
-static KFile_vt_v1 KMD5FileRead_vt =
-{
-    1, 1,
-
-    /* 1.0 */
-    KMD5FileWhackRead,
-    KMD5FileGetSysFile,
-    KMD5FileRandomAccessRead,
-    KMD5FileSize,
-    KMD5FileSetSizeRead,
-    KMD5FileRead,
-    KMD5FileBadWrite,
-
-    /* 1.1 */
-    KMD5FileType
-};
-
-LIB_EXPORT rc_t CC KFileMakeMD5Read ( const KFile **fp,
-    const KFile *src, const uint8_t digest [ 16 ] )
-{
-    rc_t rc;
-
-    if ( fp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( src == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! src -> read_enabled )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        else if ( digest == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-        else
-        {
-            KMD5File *f = malloc ( sizeof * f - sizeof f -> u + sizeof f -> u . rd );
-            if ( f == NULL )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KFileInit ( & f -> dad,
-				     ( const KFile_vt* ) & KMD5FileRead_vt, "KMD5File", "no-name", true, false );
-                if ( rc == 0 )
-                {
-                    f -> position = 0;
-                    MD5StateInit ( & f -> md5 );
-                    f -> file = ( KFile* ) src;
-                    f -> fmt = NULL;
-                    f -> type = KMD5FileTypeRead;
-                    f -> u . rd . rc = 0;
-                    f -> u . rd . eof = 0;
-                    memcpy ( f -> u . rd . digest, digest, sizeof f -> u . rd . digest );
-
-                    * fp = & f -> dad;
-                    return 0;
-                }
-            }
-
-            free ( f );
-        }
-
-        * fp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* MakeWrite
- *  creates an adapter to create MD5 checksum for a file
- *
- *  "f" [ OUT ] - return parameter for file with md5 check
- *
- *  "out" [ IN ] - output file with write permission
- *  since this file is being wrapped by "f", ownership of
- *  the provided reference is transferred to "f"
- *
- *  "md5" [ IN ] - md5 checksum output formatter.
- *  since this may be used for multiple checksums, "f" will
- *  attach its own reference to "md5".
- *
- *  "path" [ IN ] - md5 checksum output file path, used to
- *  create standard md5sum file entry.
- *
- * NB - creates a write-only file that does NOT suppport random access
- *  i.e. must be written serially from offset 0
- */
-static KFile_vt_v1 sKMD5FileWrite_vt =
-{
-    1, 0,
-
-    KMD5FileWhackWrite,
-    KMD5FileGetSysFile,
-    KMD5FileRandomAccessWrite,
-    KMD5FileSize,
-    KMD5FileSetSizeWrite,
-    KMD5FileFwdRead,
-    KMD5FileWrite
-};
-
-LIB_EXPORT rc_t CC KMD5FileMakeWrite ( KMD5File **fp,
-    KFile *out, KMD5SumFmt *md5, const char *path )
-{
-    rc_t rc;
-
-    if ( fp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( out == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! out -> write_enabled )
-        {
-            if ( out -> read_enabled )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcReadonly );
-            else
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        }
-        else if ( md5 == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( md5 -> read_only )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcReadonly );
-        else if ( path == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcPath, rcNull );
-        else if ( path [ 0 ] == 0 )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcPath, rcEmpty );
-        else
-        {
-            KMD5File *f = malloc ( sizeof * f - sizeof f -> u +
-                sizeof f -> u . wr + strlen ( path ) );
-            if ( f == NULL )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KFileInit ( & f -> dad,
-                    ( const KFile_vt* ) & sKMD5FileWrite_vt, "KMD5File", path, out -> read_enabled, true );
-                if ( rc == 0 )
-                {
-                    f -> position = 0;
-                    MD5StateInit ( & f -> md5 );
-                    f -> file = out;
-                    f -> fmt = md5;
-                    f -> type = KMD5FileTypeWrite;
-
-                    memset ( & f -> u . wr, 0, sizeof f -> u . wr );
-                    strcpy ( f -> u . wr . path, path );
-                    f -> u . wr . changed = false;
-
-                    rc = KFileSize ( out, & f -> u . wr . max_position );
-                    if (rc)
-                    {
-                        if (GetRCState (rc) == rcUnsupported)
-                        {
-                            f -> u . wr . max_position  = 0;
-                            rc = 0;
-                        }
-                    }    
-                    if ( rc == 0 )
-                        rc = KMD5SumFmtAddRef ( md5 );
-                    if ( rc == 0 )
-                    {
-                        * fp = f;
-                        return 0;
-                    }
-                }
-
-                free ( f );
-            }
-        }
-
-        * fp = NULL;
-    }
-
-    return rc;
-}
-
-/* MakeAppend
- *  creates an adapter to create MD5 checksum for a file
- *
- *  "f" [ OUT ] - return parameter for file with md5 check
- *
- *  "out" [ IN ] - output file with write permission
- *  since this file is being wrapped by "f", ownership of
- *  the provided reference is transferred to "f"
- *
- *  "md5" [ IN ] - md5 checksum output formatter.
- *  since this may be used for multiple checksums, "f" will
- *  attach its own reference to "md5".
- *
- *  "path" [ IN ] - md5 checksum output file path, used to
- *  create standard md5sum file entry.
- *
- * NB - creates a write-only file that does NOT suppport random access
- *  i.e. must be written serially from current EOF (minus the stored MD5 context)
- */
-static KFile_vt_v1 sKMD5FileAppend_vt =
-{
-    1, 0,
-
-    KMD5FileWhackAppend,
-    KMD5FileGetSysFile,
-    KMD5FileRandomAccessWrite,
-    KMD5FileSizeAppend,
-    KMD5FileSetSizeWrite,
-    KMD5FileFwdRead,
-    KMD5FileWrite
-};
-
-LIB_EXPORT rc_t CC KMD5FileMakeAppend ( KMD5File **fp, KFile *out, KMD5SumFmt *md5, const char *path )
-{
-    rc_t rc;
-    KLogLevel lvl = klogInt;
-    
-    if ( fp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( out == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! out -> write_enabled )
-        {
-            if ( out -> read_enabled )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcReadonly );
-            else
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        }
-        else if ( md5 == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( md5 -> read_only )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcReadonly );
-        else if ( path == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcPath, rcNull );
-        else if ( path [ 0 ] == 0 )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcPath, rcEmpty );
-        else
-        {
-            KMD5File *f = malloc ( sizeof * f - sizeof f -> u +
-                sizeof f -> u . wr + strlen ( path ) );
-            if ( f == NULL )
-            {
-                rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-                lvl = klogSys;
-            }
-            else
-            {
-                rc = KFileInit ( & f -> dad,
-                    ( const KFile_vt* ) & sKMD5FileAppend_vt, "KMD5File", path, out -> read_enabled, true );
-                if ( rc == 0 )
-                {
-                    MD5StateInit ( & f -> md5 );
-                    f -> file = out;
-                    f -> fmt = md5;
-                    f -> type = KMD5FileTypeWrite;
-                    
-                    rc = KMD5SumFmtAddRef ( md5 );
-                    if ( rc != 0 )
-                    {
-                        free ( f );
-                        * fp = NULL;
-                        return rc;
-                    }
-
-                    memset ( & f -> u . wr, 0, sizeof f -> u . wr );
-                    strcpy ( f -> u . wr . path, path );
-                    f -> u . wr . changed = false;
-
-                    lvl = klogSys;
-                    rc = KFileSize ( out, & f -> position );
-                    if ( rc == 0 )
-                    {
-                        uint8_t buffer [ sizeof MD5TAG + sizeof ENDIANTAG + sizeof f -> md5 ];
-
-                        /* an empty file is fine */
-                        if ( f -> position == 0 )
-                        {
-                            * fp = f;
-                            return 0;
-                        }
-
-                        /* set max */
-                        f -> u . wr . max_position = f -> position;
-
-                        /* a file without a trailing MD5 state is incorrect or corrupt */
-                        if ( f -> position < sizeof buffer )
-                        {
-                            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcIncorrect );
-                            lvl = klogErr;
-                        }
-                        else
-                        {
-                            /* try to read MD5 state */
-                            size_t num_read;
-                            rc = KFileRead ( out, f -> position - sizeof buffer, buffer, sizeof buffer, & num_read );
-                            if ( rc == 0 )
-                            {
-                                if ( num_read != sizeof buffer )
-                                    rc = RC ( rcFS, rcFile, rcConstructing, rcTransfer, rcIncomplete );
-                                else
-                                {
-                                    /* errors from here are usage errors */
-                                    lvl = klogErr;
-                                    
-                                    if ( memcmp ( buffer, MD5TAG, sizeof MD5TAG ) != 0 )
-                                        rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcIncorrect );
-                                    else
-                                    {
-                                        /* forget about the MD5 state */
-                                        f -> position -= sizeof buffer;
-                                        memcpy ( & f -> md5, & buffer [ sizeof MD5TAG + sizeof ENDIANTAG ], sizeof f -> md5 );
-                                        
-                                        /* check for proper byte order */
-                                        if ( memcmp ( & buffer [ sizeof MD5TAG ], ENDIANTAG, sizeof ENDIANTAG ) == 0 )
-                                        {
-                                            * fp = f;
-                                            return 0;
-                                        }
-
-                                        /* probably swapped, but confirm */
-                                        if ( memcmp ( & buffer [ sizeof MD5TAG ], ENDIANSWAPTAG, sizeof ENDIANSWAPTAG ) == 0 )
-                                        {
-                                            int i;
-
-                                            for ( i = 0; i < sizeof f -> md5 . count / sizeof f -> md5 . count [ 0 ]; ++ i )
-                                                f -> md5 . count [ i ] = bswap_32 ( f -> md5 . count [ i ] );
-                                            for ( i = 0; i < sizeof f -> md5 . abcd / sizeof f -> md5 . abcd [ 0 ]; ++ i )
-                                                f -> md5 . abcd [ i ] = bswap_32 ( f -> md5 . abcd [ i ] );
-
-                                            * fp = f;
-                                            return 0;
-                                        }
-                                        
-                                        /* garbage */
-                                        rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcCorrupt );
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    
-                    KMD5SumFmtRelease ( md5 );
-                }
-                
-                free ( f );
-            }
-        }
-        
-        * fp = NULL;
-    }
-    
-    LOGERR ( lvl, rc, "append-mode MD5 file" );
-    
-    return rc;
-}
-
-static KFile_vt_v1 sKMD5FileReadCreate_vt =
-{
-    1, 1,
-
-    KMD5FileWhackCreate,
-    KMD5FileGetSysFile,
-    KMD5FileRandomAccessRead,
-    KMD5FileSize,
-    KMD5FileSetSizeRead,
-    KMD5FileRead,
-    KMD5FileBadWrite,
-
-    /* 1.1 */
-    KMD5FileType
-};
-
-/* MakeReadNew
- *  creates an adapter to create MD5 checksum for a file
- *
- *  "in" [ IN ] - input file 
- *  since this file is being wrapped by "f", ownership of
- *  the provided reference is transferred to "f"
- */
-LIB_EXPORT rc_t CC KFileMakeNewMD5Read ( const KFile **fp,
-    const struct KFile *in, KMD5SumFmt *md5, const char *path )
-{
-    rc_t rc;
-
-    if ( fp == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( in == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! in -> read_enabled )
-	    rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        else if ( md5 == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( md5 -> read_only )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcReadonly );
-        else if ( path == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcPath, rcNull );
-        else if ( path [ 0 ] == 0 )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcPath, rcEmpty );
-        else
-        {
-            size_t path_size = string_size ( path );
-            KMD5File *f = malloc ( sizeof * f + path_size );
-            if ( f == NULL )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KFileInit ( & f -> dad,
-                    ( const KFile_vt* ) & sKMD5FileReadCreate_vt, "KMD5File", path, in -> read_enabled, false );
-                if ( rc == 0 )
-                {
-                    f -> position = 0;
-                    MD5StateInit ( & f -> md5 );
-                    f -> file = (KFile*)in;
-                    f -> fmt = md5;
-                    f -> type = KMD5FileTypeWrite;
-                    
-                    memset ( & f -> u . wr, 0, sizeof f -> u . wr );
-                    string_copy ( f -> u . wr . path, path_size + 1, path, path_size );
-                    f -> u . wr . changed = false;
-#if 0
-/* KFileSize can't always be used */
-                    rc = KFileSize ( in, & f -> u . wr . max_position );
-#else
-                    f->u.wr.max_position = 0;
-#endif
-                    if ( rc == 0 )
-                        rc = KMD5SumFmtAddRef ( md5 );
-                    if ( rc == 0 )
-                    {
-                        * fp = &f->dad;
-                        return 0;
-                    }
-                }
-
-                free ( f );
-            }
-        }
-
-        * fp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* end of file */
diff --git a/libs/kfs/mmap-priv.h b/libs/kfs/mmap-priv.h
deleted file mode 100644
index 8b9ffac..0000000
--- a/libs/kfs/mmap-priv.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_mmap_priv_
-#define _h_mmap_priv_
-
-#ifndef _h_kfs_mmap_
-#include <kfs/mmap.h>
-#endif
-
-#ifndef _h_kfs_file_
-#include <kfs/file.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * KMMap
- *  a memory mapped region
- */
-#if 0
-/* minimal structure */
-struct KMMap
-{
-    uint64_t off;
-    uint64_t pos;
-    size_t size;
-    char *addr;
-
-    KFile *f;
-    size_t pg_size;
-
-    uint32_t addr_adj;
-    uint32_t size_adj;
-
-    KRefcount refcount;
-
-    bool read_only;
-    bool sys_mmap;
-    bool dirty;
-};
-#endif
-
-
-/* Make
- *  make an open OS-specific KMMap structure
- *  common code will initialize common parts such as KFile*
- */
-rc_t KMMapMake ( KMMap **mmp );
-
-
-/* RWSys
- *  map the region of mapped file into memory for read & write
- *  using system memory mapping function
- *
- *  the values for "pos" and "size" can be trusted
- *  as correct for page alignment
- */
-rc_t KMMapRWSys ( KMMap *self, uint64_t pos, size_t size );
-
-
-/* ROSys
- *  map the region of mapped file into memory for read only
- *  using system memory mapping function
- *
- *  the values for "pos" and "size" can be trusted
- *  as correct for page alignment
- */
-rc_t KMMapROSys ( KMMap *self, uint64_t pos, size_t size );
-
-
-/* Unmap
- *  removes a memory map
- */
-rc_t KMMapUnmap ( KMMap *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_mmap_priv_ */
diff --git a/libs/kfs/mmap.c b/libs/kfs/mmap.c
deleted file mode 100644
index 69391d7..0000000
--- a/libs/kfs/mmap.c
+++ /dev/null
@@ -1,754 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-#include "mmap-priv.h"
-#include "sysmmap-priv.h"
-#include "sysfile-priv.h"
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-
-
-#define USE_MALLOC_MMAP 1
-
-#if USE_MALLOC_MMAP
-
-#ifndef FORCE_MALLOC_MMAP
-#define FORCE_MALLOC_MMAP 0
-#endif
-
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KMMap
- *  a memory mapped region
- */
-
-
-/* Unmap
- */
-static
-rc_t KMMapUnmapRgn ( KMMap *self )
-{
-    rc_t rc;
-
-    if ( self -> sys_mmap )
-        rc = KMMapUnmap ( self );
-    else
-    {
-        rc = 0;
-
-        if ( self -> dirty )
-        {
-            size_t num_writ, total;
-            for (  total = 0; total < self -> size; total += num_writ )
-            {
-                rc = KFileWrite ( self -> f, self -> pos + total,
-                    & self -> addr [ total ], self -> size - total, & num_writ );
-                if ( rc != 0 || num_writ == 0 )
-                    break;
-            }
-
-            if ( rc == 0 && total < self -> size )
-                rc = RC ( rcFS, rcMemMap, rcDestroying, rcTransfer, rcIncomplete );
-        }
-
-        if ( rc == 0 )
-            free ( self -> addr );
-    }
-
-    if ( rc == 0 )
-    {
-        self -> off = self -> pos = 0;
-        self -> addr = NULL;
-        self -> size = 0;
-        self -> sys_mmap = self -> dirty = false;
-    }
-
-    return rc;
-}
-
-/* Whack
- */
-static
-rc_t KMMapWhack ( KMMap *self )
-{
-    rc_t rc = KMMapUnmapRgn ( self );
-    if ( rc != 0 )
-    {
-        KRefcountAdd ( & self -> refcount, "KMMap" );
-        return rc;
-    }
-
-    /* now goes the file */
-    KFileRelease ( self -> f );
-    free ( self );
-
-    return 0;
-}
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KMMapAddRef ( const KMMap *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KMMap" ) )
-        {
-        case krefLimit:
-            return RC ( rcFS, rcMemMap, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KMMapRelease ( const KMMap *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KMMap" ) )
-        {
-        case krefWhack:
-            return KMMapWhack ( ( KMMap* ) self );
-        case krefNegative:
-            return RC ( rcFS, rcMemMap, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Size
- *  returns size of memory region
- *
- *  "size" [ OUT ] - return parameter for region size
- */
-LIB_EXPORT rc_t CC KMMapSize ( const KMMap *self, size_t *size )
-{
-    if ( size == NULL )
-        return RC ( rcFS, rcMemMap, rcAccessing, rcParam, rcNull );
-
-    if ( self != NULL )
-    {
-        * size = self -> size;
-        return 0;
-    }
-
-    * size = 0;
-    return RC ( rcFS, rcMemMap, rcAccessing, rcSelf, rcNull );
-}
-
-
-/* Position
- *  returns region starting offset into mapped file
- *
- *  "pos" [ OUT ] - return parameter for file offset
- */
-LIB_EXPORT rc_t CC KMMapPosition ( const KMMap *self, uint64_t *pos )
-{
-    if ( pos == NULL )
-        return RC ( rcFS, rcMemMap, rcAccessing, rcParam, rcNull );
-
-    if ( self != NULL )
-    {
-        * pos = self -> pos;
-        return 0;
-    }
-
-    * pos = 0;
-    return RC ( rcFS, rcMemMap, rcAccessing, rcSelf, rcNull );
-}
-
-
-/* Addr
- *  returns starting address of memory region
- *
- *  "addr" [ OUT ] - return parameter for memory address
- */
-LIB_EXPORT rc_t CC KMMapAddrRead ( const KMMap *self, const void **addr )
-{
-    if ( addr == NULL )
-        return RC ( rcFS, rcMemMap, rcAccessing, rcParam, rcNull );
-
-    if ( self != NULL )
-    {
-        if ( self -> addr == NULL )
-            return RC ( rcFS, rcMemMap, rcAccessing, rcMemMap, rcInvalid );
-
-        * addr = ( const void* ) self -> addr;
-        return 0;
-    }
-
-    * addr = NULL;
-    return RC ( rcFS, rcMemMap, rcAccessing, rcSelf, rcNull );
-}
-
-LIB_EXPORT rc_t CC KMMapAddrUpdate ( KMMap *self, void **addr )
-{
-    if ( addr == NULL )
-        return RC ( rcFS, rcMemMap, rcAccessing, rcParam, rcNull );
-
-    * addr = NULL;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcMemMap, rcAccessing, rcSelf, rcNull );
-
-    if ( self -> read_only )
-        return RC ( rcFS, rcMemMap, rcAccessing, rcMemMap, rcReadonly );
-
-    if (  self -> addr == NULL )
-        return RC ( rcFS, rcMemMap, rcAccessing, rcMemMap, rcInvalid );
-
-    if ( ! self -> sys_mmap )
-        self -> dirty = true;
-
-    * addr = self -> addr;
-    return 0;
-}
-
-
-/* MallocRgn
- */
-#if USE_MALLOC_MMAP
-static
-rc_t KMMapMallocRgn ( KMMap *self, uint64_t pos, size_t size, bool read_only )
-{
-    rc_t rc;
-    uint64_t eof;
-
-    self -> off = 0;
-    self -> read_only = read_only;
-    self -> sys_mmap = self -> dirty = false;
-
-    /* try to crop size to actual file size */
-    rc = KFileSize ( self -> f, & eof );
-    if ( rc == 0 )
-    {
-        /* mapping beyond end of file */
-        if ( pos >= eof )
-        {
-            if ( read_only )
-            {
-                self -> pos = pos;
-                self -> addr = NULL;
-                self -> size = 0;
-                return 0;
-            }
-
-            /* allocate real memory */
-            self -> addr = calloc ( 1, size );
-            if ( self -> addr == NULL )
-                return RC ( rcFS, rcMemMap, rcConstructing, rcMemory, rcExhausted );
-
-            self -> pos = pos;
-            self -> size = size;
-            self -> dirty = true;
-            return 0;
-        }
-
-        /* crop for readonly case */
-        if ( read_only && (( size == 0 ) || ( pos + size > eof )))
-            size = ( size_t ) ( eof - pos );
-    }
-
-    /* now allocate memory */
-    self -> addr = malloc ( size );
-    if ( self -> addr == NULL )
-        rc = RC ( rcFS, rcMemMap, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        size_t num_read, total;
-        for ( rc = 0, total = 0; total < size; total += num_read )
-        {
-            rc = KFileRead ( self -> f, pos + total,
-                & self -> addr [ total ], size - total, & num_read );
-            if ( rc != 0 || num_read == 0 )
-                break;
-        }
-
-        if ( total != 0 )
-            rc = 0;
-
-        if ( total != size )
-            memset ( & self -> addr [ total ], 0, size - total );
-
-        self -> pos = pos;
-        self -> size = total;
-    }
-
-    return rc;
-}
-#endif
-
-
-/* RWRgn
- */
-static
-rc_t KMMapRWRgn ( KMMap *self, uint64_t pos, size_t size )
-{
-    rc_t rc;
-    KSysFile *sf = KFileGetSysFile ( self -> f, & self -> off );
-
-    if ( ! self -> f -> read_enabled || ! self -> f -> write_enabled )
-        rc = RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcNoPerm );
-
-    else if ( sf == NULL )
-    {
-#if USE_MALLOC_MMAP
-        rc = KMMapMallocRgn ( self, pos, size, false );
-#else
-        rc = RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcIncorrect );
-#endif
-    }
-
-    else if ( self -> off != 0 )
-        rc = RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcNoPerm );
-
-    else
-    {
-        uint64_t eof;
-        rc = KFileSize ( self -> f, & eof );
-        if ( rc == 0 )
-        {
-            size_t bytes;
-            uint64_t pg_mask, left, right, range;
-
-            if ( size == 0 )
-            {
-                size = ( size_t ) eof;
-                if ( ( uint64_t ) size != eof )
-                    return RC ( rcFS, rcMemMap, rcConstructing, rcParam, rcExcessive );
-            }
-
-            pg_mask = self -> pg_size - 1;
-            left = pos & ~ pg_mask;
-            right = ( pos + size + pg_mask ) & ~ pg_mask;
-            range = right - left;
-
-            bytes = ( size_t ) range;
-            if ( ( uint64_t ) bytes != range )
-                return RC ( rcFS, rcMemMap, rcConstructing, rcParam, rcExcessive );
-
-            /* extend right edge if necessary */
-            if ( eof < right )
-            {
-                rc = KFileSetSize ( self -> f, right );
-                if ( rc != 0 )
-                    return ResetRCContext ( rc, rcFS, rcMemMap, rcConstructing );
-            }
-
-            if ( bytes == 0 )
-            {
-                self -> addr = NULL;
-                self -> addr_adj = 0;
-                self -> size_adj = 0;
-                self -> size = 0;
-            }
-            else
-            {
-#if FORCE_MALLOC_MMAP
-                rc = -1;
-#else
-                rc = KMMapRWSys ( self, left, bytes );
-#endif
-                if ( rc != 0 )
-                {
-                    self -> addr_adj = self -> size_adj = 0;
-                    self -> size = 0;
-
-                    if ( eof < right )
-                        KFileSetSize ( self -> f, eof );
-#if USE_MALLOC_MMAP
-                    rc = KMMapMallocRgn ( self, pos, size, false );
-#endif
-                    return rc;
-                }
-
-                self -> addr += pos - left;
-                self -> addr_adj = ( uint32_t ) ( pos - left );
-                self -> size_adj = ( uint32_t ) ( bytes - size );
-                self -> size = size;
-                self -> sys_mmap = true;
-            }
-
-            self -> pos = pos;
-            self -> read_only = false;
-        }
-    }
-
-    return rc;
-}
-
-
-/* RORgn
- */
-static
-rc_t KMMapRORgn ( KMMap *self, uint64_t pos, size_t size )
-{
-    rc_t rc;
-
-    if ( ! self -> f -> read_enabled )
-        rc = RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcNoPerm );
-    else
-    {
-        uint64_t eof;
-
-        /* pos is relative to a virtual file; s_pos is relative to a system file */
-        uint64_t s_pos = pos;
-
-        KSysFile *sf = KFileGetSysFile ( self -> f, & self -> off );
-        if ( sf == NULL )
-        {
-#if USE_MALLOC_MMAP
-            return KMMapMallocRgn ( self, pos, size, true );
-#else
-            return RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcIncorrect );
-#endif
-        }
-
-        rc = KFileSize ( self -> f, & eof );
-
-        /* if file has known size */
-        if ( rc == 0 )
-        {
-            size_t bytes;
-            uint64_t pg_mask, left, right, range;
-
-            if ( size == 0 )
-            {
-                size = ( size_t ) eof;
-                if ( ( uint64_t ) size != eof )
-                    return RC ( rcFS, rcMemMap, rcConstructing, rcParam, rcExcessive );
-            }
-
-            if ( pos + size > eof )
-            {
-                if ( pos >= eof )
-                    return RC ( rcFS, rcMemMap, rcConstructing, rcParam, rcInvalid );
-                size = ( size_t ) ( eof - pos );
-            }
-
-            if ( self -> off != 0 )
-            {
-                s_pos = pos + self -> off;
-                rc = KFileSize ( & sf -> dad, & eof ); /* eof is now for the sysfile */
-                if ( rc != 0 )
-                    return ResetRCContext ( rc, rcFS, rcMemMap, rcConstructing );
-            }
-
-            pg_mask = self -> pg_size - 1;
-            left = s_pos & ~ pg_mask;
-            right = ( s_pos + size + pg_mask ) & ~ pg_mask;
-
-            if ( eof < right )
-                right = eof;
-
-            range = right - left;
-            bytes = ( size_t ) range;
-            if ( ( uint64_t ) bytes != range )
-                return RC ( rcFS, rcMemMap, rcConstructing, rcParam, rcExcessive );
-
-            if ( bytes == 0 )
-            {
-                size = 0;
-                self -> addr = NULL;
-                self -> addr_adj = 0;
-                self -> size_adj = 0;
-            }
-            else
-            {
-#if FORCE_MALLOC_MMAP
-                rc = -1;
-#else
-                rc = KMMapROSys ( self, left, bytes );
-#endif
-                if ( rc != 0 )
-                {
-                    self -> addr_adj = self -> size_adj = 0;
-                    self -> size = 0;
-#if USE_MALLOC_MMAP
-                    rc = KMMapMallocRgn ( self, pos, size, true );
-#endif
-                    return rc;
-                }
-            
-                self -> addr += s_pos - left;
-                self -> addr_adj = ( uint32_t ) ( s_pos - left );
-                self -> size_adj = ( uint32_t ) ( bytes - size );
-                self -> sys_mmap = true;
-            }
-        }
-
-        self -> pos = pos;
-        self -> size = size;
-        self -> read_only = true;
-    }
-
-    return rc;
-}
-
-
-/* MakeRgn
- *  maps a portion of a file
- *
- *  "f" [ IN ] - file to map
- *  a new reference will be attached
- *
- *  "pos" [ IN ] - starting offset into file
- *
- *  "size" [ IN, DEFAULT ZERO ] - size of resulting region. if 0,
- *  the size will be interpreted as meaning size of "f" - "pos".
- */
-static
-rc_t KMMapMakeRgn ( KMMap **mmp, const KFile *f )
-{
-    KMMap *mm;
-    rc_t rc = KMMapMake ( & mm );
-    if ( rc == 0 )
-    {
-        rc = KFileAddRef ( f );
-        if ( rc == 0 )
-        {
-            mm -> f = ( KFile* ) f;
-            mm -> off = mm -> pos = 0;
-            mm -> size = 0;
-            mm -> addr = NULL;
-            mm -> addr_adj = mm -> size_adj = 0;
-            KRefcountInit ( & mm -> refcount, 1, "KMMap", "make", "mmap" );
-            mm -> sys_mmap = false;
-            mm -> read_only = false;
-            mm -> dirty = false;
-    
-            * mmp = mm;
-            return 0;
-        }
-
-        KMMapWhack ( mm );
-    }
-
-    * mmp = NULL;
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMMapMakeRgnRead ( const KMMap **mmp,
-    const KFile *f, uint64_t pos, size_t size )
-{
-    rc_t rc;
-    if ( mmp == NULL )
-        rc = RC ( rcFS, rcMemMap, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( f == NULL )
-            rc = RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcNull );
-        else if ( ! f -> read_enabled )
-            rc = RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcNoPerm );
-        else
-        {
-            KMMap *mm;
-            rc = KMMapMakeRgn ( & mm, f );
-            if ( rc == 0 )
-            {
-                rc = KMMapRORgn ( mm, pos, size );
-                if ( rc == 0 )
-                {
-                    * mmp = mm;
-                    return 0;
-                }
-
-                KMMapWhack ( mm );
-            }
-        }
-
-        * mmp = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KMMapMakeRgnUpdate ( KMMap **mmp,
-    KFile *f, uint64_t pos, size_t size )
-{
-    rc_t rc;
-    if ( mmp == NULL )
-        rc = RC ( rcFS, rcMemMap, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( f == NULL )
-            rc = RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcNull );
-        else if ( ! f -> read_enabled || ! f -> write_enabled )
-            rc = RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcNoPerm );
-        else
-        {
-            KMMap *mm;
-            rc = KMMapMakeRgn ( & mm, f );
-            if ( rc == 0 )
-            {
-                rc = KMMapRWRgn ( mm, pos, size );
-                if ( rc == 0 )
-                {
-                    * mmp = mm;
-                    return 0;
-                }
-
-                KMMapWhack ( mm );
-            }
-        }
-
-        * mmp = NULL;
-    }
-    return rc;
-}
-
-/* Make
- *  maps entire file
- *
- *  "f" [ IN ] - file to map.
- *  a new reference will be attached
- */
-LIB_EXPORT rc_t CC KMMapMakeRead ( const KMMap **mm, const KFile *f )
-{
-    return KMMapMakeRgnRead ( mm, f, 0, 0 );
-}
-
-LIB_EXPORT rc_t CC KMMapMakeUpdate ( KMMap **mm, KFile *f )
-{
-    return KMMapMakeRgnUpdate ( mm, f, 0, 0 );
-}
-
-
-/* MakeMax
- *  maps as much of a file as possible
- *
- *  "f" [ IN ] - file to map.
- *  a new reference will be added
- */
-LIB_EXPORT rc_t CC KMMapMakeMaxRead ( const KMMap **mm, const KFile *f )
-{
-    /* 32-bit architecture */
-    if ( sizeof mm == 4 )
-        return KMMapMakeRgnRead ( mm, f, 0, 1500 * 1024 * 1024 );
-
-    /* 64-bit or beyond */
-    return KMMapMakeRgnRead ( mm, f, 0,  ( ( size_t ) 48 ) * 1024 * 1024 * 1024 );
-}
-
-LIB_EXPORT rc_t CC KMMapMakeMaxUpdate ( KMMap **mm, KFile *f )
-{
-    uint64_t eof;
-    rc_t rc = KFileSize ( f, & eof );
-    if ( rc == 0 )
-    {
-        /* 32-bit architecture */
-        if ( sizeof mm == 4 && eof > 1500 * 1024 * 1024 )
-            eof = 1500 * 1024 * 1024;
-
-        /* 64-bit or beyond */
-        if ( sizeof mm == 8 && eof > ( ( size_t ) 48 ) * 1024 * 1024 * 1024 )
-            eof = ( ( size_t ) 48 ) * 1024 * 1024 * 1024;
-
-        rc = KMMapMakeRgnUpdate ( mm, f, 0, ( size_t ) eof );
-    }
-    return rc;
-}
-
-
-/* Reposition
- *  shift region to a new position
- *  may change region size
- *
- *  "pos" [ IN ] - new starting position for region
- *
- *  "size" [ OUT, NULL OKAY ] - optional return parameter
- *  for resultant region size
- */
-LIB_EXPORT rc_t CC KMMapReposition ( const KMMap *cself, uint64_t pos, size_t *size )
-{
-    KMMap *self;
-    size_t ignore;
-    if ( size == NULL )
-        size = & ignore;
-
-    * size = 0;
-
-    self = ( KMMap* ) cself;
-    if ( cself != NULL )
-    {
-        rc_t rc;
-        size_t rgn_size = self -> size;
-        uint64_t pg_mask, left, right;
-
-        /* regardless of condition, if no change
-           in position is requested, we're done */
-        if ( pos == self -> pos )
-        {
-            * size = rgn_size;
-            return 0;
-        }
-
-        /* detect multiple owners */
-        if ( atomic32_read ( & self -> refcount ) > 1 )
-            return RC ( rcFS, rcMemMap, rcPositioning, rcMemMap, rcBusy );
-
-        pg_mask = self -> pg_size - 1;
-        left = self -> pos & ~ pg_mask;
-        right = left + rgn_size + self -> size_adj;
-
-        /* we're modifiable, so see if position
-           is within first page of current map */
-        if ( ( pos & ~ pg_mask ) == left )
-        {
-            self -> addr -= self -> addr_adj;
-            self -> addr_adj = self -> size_adj = ( uint32_t ) ( pos - left );
-            self -> addr += pos - left;
-            self -> pos = pos;
-            * size = self -> size = ( size_t ) ( right - pos );
-            return 0;
-        }
-
-        if ( rgn_size != 0 || self -> size_adj != 0 )
-        {
-            rc = KMMapUnmapRgn ( self );
-            if ( rc != 0 )
-                return rc;
-        }
-
-        self -> addr_adj = self -> size_adj = 0;
-
-        rc = ( self -> read_only ? KMMapRORgn : KMMapRWRgn ) ( self, pos, rgn_size );
-
-        if ( rc == 0 )
-            * size = self -> size;
-        return rc;
-    }
-
-    return RC ( rcFS, rcMemMap, rcPositioning, rcSelf, rcNull );
-}
diff --git a/libs/kfs/nullfile.c b/libs/kfs/nullfile.c
deleted file mode 100644
index 22eab36..0000000
--- a/libs/kfs/nullfile.c
+++ /dev/null
@@ -1,273 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <kfs/extern.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <kfs/file.h>
-#include <sysalloc.h>
-#include <kfs/nullfile.h>
-
-#include <assert.h>
-#include <stdlib.h>
-
-/* ======================================================================
- * KNullFile
- */
-
-/* -----
- * define the specific types to be used in the templatish/inheritancish
- * definition of vtables and their elements
- */
-#define KFILE_IMPL struct KNullFile
-#include <kfs/impl.h>
-
-static rc_t CC KNullFileDestroy (KNullFile *self);
-static struct KSysFile *CC KNullFileGetSysFile (const KNullFile *self,
-					     uint64_t *offset);
-static rc_t CC KNullFileRandomAccess (const KNullFile *self);
-static uint32_t CC KNullFileType (const KNullFile *self);
-static rc_t CC KNullFileSize (const KNullFile *self, uint64_t *size);
-static rc_t CC KNullFileSetSize (KNullFile *self, uint64_t size);
-static rc_t CC KNullFileRead (const KNullFile *self, uint64_t pos,
-			   void *buffer, size_t bsize, size_t *num_read);
-static rc_t CC KNullFileWrite (KNullFile *self, uint64_t pos, const void *buffer,
-			    size_t size, size_t *num_writ);
-
-
-static const KFile_vt_v1 vtKNullFile =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KNullFileDestroy,
-    KNullFileGetSysFile,
-    KNullFileRandomAccess,
-    KNullFileSize,
-    KNullFileSetSize,
-    KNullFileRead,
-    KNullFileWrite,
-
-    /* 1.1 */
-    KNullFileType
-};
-
-/*-----------------------------------------------------------------------
- * KNullFile
- *  an archive file including tar and sra
- */
-struct KNullFile
-{
-    KFile	dad;
-};
-
-/* ----------------------------------------------------------------------
- * KNullFileMake
- *  create a new file object
- */
-static
-rc_t KNullFileMake (KNullFile ** self, bool write_allowed)
-{
-    rc_t	rc;
-    KNullFile *	pF;
-
-    /* -----
-     */
-    assert (self != NULL);
-
-    /* -----
-     * get space for the object
-     */
-    pF = malloc (sizeof (KNullFile));
-    if (pF == NULL)	/* allocation failed */
-    {
-	/* fail */
-	rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-    }
-    else
-    {
-	rc = KFileInit (&pF->dad,			/* initialize base class */
-			(const KFile_vt*)&vtKNullFile, 	/* VTable for KNullFile */
-            "KNullFile", "no-name",
-			true,				/* read allowed */
-			write_allowed);
-	if (rc == 0)
-	{
-	    *self = pF;
-	    return 0;
-	}
-	/* fail */
-	free (pF);
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KFileMakeNullRead ( const KFile ** self )
-{
-    return KNullFileMake ((KNullFile **)self, false);
-}
-
-LIB_EXPORT rc_t CC KFileMakeNullUpdate ( KFile ** self )
-{
-    return KNullFileMake ((KNullFile **)self, true);
-}
-
-/* ----------------------------------------------------------------------
- * Destroy
- *
- */
-static
-rc_t CC KNullFileDestroy (KNullFile *self)
-{
-    free (self);
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- *
- * We cant allow memory mapping a tee file as the read?writes ar needed
- * to trigger the writes to the copy KFile
- */
-
-static
-struct KSysFile *CC KNullFileGetSysFile (const KNullFile *self, uint64_t *offset)
-{
-    /* parameters must be non-NULL */
-    assert (self != NULL);
-    assert (offset != NULL);
-
-    /* not implmenting at this time */
-    return NULL;
-}
-
-/* ----------------------------------------------------------------------
- * RandomAccess
- *
- *  returns 0 if random access, error code otherwise
- *
- * Update needs to be able to seek both original and copy while read
- * only needs to be able to seek the original.
- */
-static
-rc_t CC KNullFileRandomAccess (const KNullFile *self)
-{
-    assert (self != NULL);
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KNullFileType (const KNullFile *self)
-{
-    return kfdNull;
-}
-
-
-/* ----------------------------------------------------------------------
- * Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KNullFileSize (const KNullFile *self, uint64_t *size)
-{
-    assert (self != NULL);
-    assert (size != NULL);
-
-    *size = 0;
-    return 0;;
-}
-
-/* ----------------------------------------------------------------------
- * SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KNullFileSetSize (KNullFile *self, uint64_t size)
-{
-    return RC (rcFS, rcFile, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-rc_t CC KNullFileRead	(const KNullFile *self,
-			 uint64_t pos,
-			 void *buffer,
-			 size_t bsize,
-			 size_t *num_read)
-{
-    *num_read = 0;
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- * Unsupported as we now treat archives as READ ONLY
- */
-static
-rc_t CC KNullFileWrite (KNullFile *self, uint64_t pos,
-		       const void *buffer, size_t bsize,
-		       size_t *num_writ)
-{
-    *num_writ = bsize;
-    return 0;
-}
-
-/* end of file nullfile.c */
-
diff --git a/libs/kfs/pagefile.c b/libs/kfs/pagefile.c
deleted file mode 100644
index 0516215..0000000
--- a/libs/kfs/pagefile.c
+++ /dev/null
@@ -1,1388 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-#include <kfs/pagefile.h>
-#include <kfs/impl.h>
-#include <klib/container.h>
-#include <klib/rc.h>
-#include <klib/debug.h>
-#include <atomic.h>
-#include <sysalloc.h>
-
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#define REQUIRE_RANDOM_ACCESS 0
-
-#ifdef _DEBUGGING
-#define PAGE_DEBUG(msg) DBGMSG(DBG_KFS,DBG_FLAG(DBG_KFS_PAGE),msg)
-#else
-#define PAGE_DEBUG(msg)
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KPageMem
- *  the raw page memory
- */
-
-/* must be kept in sync with kdb/btree.c */
-#define PGBITS 15
-#define PGSIZE ( 1U << PGBITS )
-
-static
-rc_t KPageMemNew ( void **ppage )
-{
-    void *page = calloc ( PGSIZE, 1 );
-    if ( page == NULL )
-        return RC ( rcFS, rcBlob, rcAllocating, rcMemory, rcExhausted );
-
-    * ppage = page;
-    return 0;
-}
-
-static
-rc_t KPageMemMake ( void **ppage )
-{
-    void *page = malloc ( PGSIZE );
-    if ( page == NULL )
-        return RC ( rcFS, rcBlob, rcAllocating, rcMemory, rcExhausted );
-
-    * ppage = page;
-    return 0;
-}
-
-static
-void KPageMemWhack ( void *page )
-{
-    free ( page );
-}
-
-
-/*--------------------------------------------------------------------------
- * KPageBacking
- *  a reference KFile wrapper
- */
-typedef struct KPageBacking KPageBacking;
-struct KPageBacking
-{
-    uint64_t eof;
-    KFile *backing;
-    KRefcount refcount;
-    bool write_through;
-    bool have_eof;
-};
-
-/* Whack
- */
-static
-void KPageBackingWhack ( KPageBacking *self )
-{
-    if(self -> backing) KFileRelease ( self -> backing );
-    free ( self );
-}
-
-/* Attach
- */
-static
-KPageBacking *KPageBackingAttach ( const KPageBacking *self )
-{
-    if ( self != NULL ) switch ( KRefcountAddDep ( & self -> refcount, "KPageBacking" ) )
-    {
-    case krefOkay:
-        return ( KPageBacking* ) self;
-    }
-
-    return NULL;
-}
-
-/* Sever
- */
-static
-void KPageBackingSever ( const KPageBacking *self )
-{
-    if ( self != NULL ) switch ( KRefcountDropDep ( & self -> refcount, "KPageBacking" ) )
-    {
-    case krefWhack:
-        KPageBackingWhack ( ( KPageBacking* ) self );
-        break;
-    }
-}
-
-/* Release
- */
-static
-void KPageBackingRelease ( const KPageBacking *self )
-{
-    if ( self != NULL ) switch ( KRefcountDrop ( & self -> refcount, "KPageBacking" ) )
-    {
-    case krefWhack:
-        KPageBackingWhack ( ( KPageBacking* ) self );
-        break;
-    }
-}
-
-/* Drop
- *  drop backing file
- */
-static
-rc_t KPageBackingDrop ( KPageBacking *self )
-{
-    KFile *backing;
-
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcDetaching, rcSelf, rcNull );
-
-    backing = self -> backing;
-    if ( backing != NULL && atomic_test_and_set_ptr ( ( atomic_ptr_t* ) & self -> backing, NULL, backing ) == backing )
-        KFileRelease ( backing );
-
-    self -> write_through = false;
-
-    return 0;
-}
-
-/* SetSize
- *  sets size of backing store
- */
-#define BACKING_FILE_GROWTH 1024 /** number of pages to grow at a time**/
-#define BACKING_FILE_MASK ( BACKING_FILE_GROWTH - 1 )
-static
-rc_t KPageBackingSetSize ( KPageBacking *self, uint32_t pg_count )
-{
-    uint64_t new_eof;
-
-    if ( pg_count > BACKING_FILE_GROWTH )
-		pg_count = ( pg_count + BACKING_FILE_MASK ) & ~ BACKING_FILE_MASK;
-
-    new_eof =  ( uint64_t ) pg_count << PGBITS;
-    if ( new_eof == self -> eof )
-        return 0;
-
-    self -> eof = new_eof;
-    return KFileSetSize ( self -> backing, self -> eof );
-}
-
-/* Read
- *  read a page from backing
- */
-#if 0
-static
-rc_t KFileReadAll ( const KFile *self, uint64_t pos, uint8_t *buff, size_t bsize, size_t *num_read )
-{
-    rc_t rc;
-    size_t total, partial;
-
-    for ( rc = 0, total = 0; total < bsize; total += partial )
-    {
-        rc = KFileRead ( self, pos + total, & buff [ total ], bsize - total, & partial );
-        if ( rc != 0 )
-            break;
-        if ( partial == 0 )
-            break;
-    }
-
-    if ( total != 0 )
-    {
-        * num_read = total;
-        return 0;
-    }
-
-    * num_read = 0;
-    return rc;
-}
-#endif
-
-static
-rc_t KPageBackingRead ( const KPageBacking *self, void **ppage, uint32_t pg_id )
-{
-    rc_t rc;
-    uint64_t pos;
-
-    /* can't read if backing isn't there */
-    if ( self -> backing == NULL )
-    {
-        * ppage = NULL;
-        return RC ( rcFS, rcFile, rcReading, rcBlob, rcNotFound );
-    }
-
-    /* the offset to the first byte after requested page */
-    pos = ( uint64_t ) pg_id << PGBITS;
-
-    /* allocate a page */
-    rc = KPageMemMake ( ppage );
-    if ( rc == 0 )
-    {
-        /* retrieve memory */
-        void *page = * ppage;
-
-        /* read page from file */
-        size_t num_read;
-        rc = KFileReadAll ( self -> backing, pos -= PGSIZE, page, PGSIZE, & num_read );
-        if ( rc == 0 )
-        {
-            if ( num_read != 0 )
-            {
-                /* keep track of eof */
-                pos += num_read;
-                if ( self -> eof < pos )
-                    ( ( KPageBacking* ) self ) -> eof = pos;
-
-                /* detect a partial page */
-                if ( num_read < PGSIZE )
-                    memset ( & ( ( uint8_t* ) page ) [ num_read ], 0, PGSIZE - num_read );
-
-                /* return page */
-                * ppage = page;
-                return 0;
-            }
-
-            rc = RC ( rcFS, rcFile, rcReading, rcBlob, rcNotFound );
-        }
-
-        KPageMemWhack ( page );
-    }
-
-    * ppage = NULL;
-    return rc;
-}
-
-
-/* Write
- *  write a page to backing store
- */
-#if 0
-static
-rc_t KFileWriteAll ( KFile *self, uint64_t pos, const uint8_t *buff, size_t size, size_t *num_writ )
-{
-    rc_t rc;
-    size_t total, partial;
-
-    for ( rc = 0, total = 0; total < size; total += partial )
-    {
-        rc = KFileWrite ( self, pos + total, & buff [ total ], size - total, & partial );
-        if ( rc != 0 )
-            break;
-        if ( partial == 0 )
-        {
-            rc = RC ( rcFS, rcBlob, rcWriting, rcTransfer, rcIncomplete );
-            break;
-        }
-    }
-
-    if ( total != 0 )
-    {
-        * num_writ = total;
-        return 0;
-    }
-
-    * num_writ = 0;
-    return rc;
-}
-#endif
-
-static
-rc_t KPageBackingWrite ( KPageBacking *self, const void *page, uint32_t pg_id )
-{
-    rc_t rc;
-    uint64_t pos;
-    size_t num_writ;
-
-    /* allow backing to be removed */
-    if ( self -> backing == NULL )
-    {
-        self -> write_through = false;
-        return 0;
-    }
-
-    /* the offset to the first byte after requested page */
-    pos = ( uint64_t ) pg_id << PGBITS;
-
-    /* write the page */
-    rc = KFileWriteAll ( self -> backing, pos -= PGSIZE, page, PGSIZE, & num_writ );
-    if ( rc == 0 )
-    {
-        pos += num_writ;
-        if ( self -> eof < pos )
-            self -> eof = pos;
-
-        if ( num_writ == PGSIZE )
-            return 0;
-
-        /* technically it is permissible for the file to deny us a complete page
-           but for this test, the file should accept whole pages.
-        */
-        rc = RC ( rcFS, rcBlob, rcWriting, rcTransfer, rcIncomplete );
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KPage
- *  a reference counted page
- *  meant to be held within a BSTree and DLList
- */
-struct KPage
-{
-    /* head for LRU cache */
-    DLNode ln;
-
-    /* backing file */
-    KPageBacking *backing;
-
-    /* raw memory */
-    void *page;
-
-    KRefcount refcount;
-
-    uint32_t page_id;
-    bool read_only;
-    bool dirty;
-};
-
-
-
-/* Whack
- */
-static
-rc_t KPageWhack ( KPage *self )
-{
-    if ( self -> backing )
-    {
-        if ( self -> dirty )
-            KPageBackingWrite ( self -> backing, self -> page, self -> page_id );
-        KPageBackingSever ( self -> backing );
-    }
-    KPageMemWhack ( self -> page );
-    free ( self );
-    return 0;
-}
-
-
-/* New
- *  make a new page
- */
-static
-rc_t KPageNew ( KPage **ppage, KPageBacking * backing, uint32_t page_id )
-{
-    rc_t rc;
-    KPage *page = malloc ( sizeof * page );
-    if ( page == NULL )
-        rc = RC ( rcFS, rcBlob, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        rc = KPageMemNew ( & page -> page );
-        if ( rc == 0 )
-        {
-            if ( backing != NULL )
-                page -> backing = KPageBackingAttach ( backing );
-            else
-                page -> backing = NULL;
-            KRefcountInit ( & page -> refcount, 1, "KPage", "new", "page" );
-            page -> page_id = page_id;
-            page -> read_only = false;
-            page -> dirty = false;
-
-            * ppage = page;
-            return 0;
-        }
-
-        free ( page );
-    }
-
-    * ppage = NULL;
-    return rc;
-}
-
-
-/* Make
- *  make a page from backing
- */
-static
-rc_t KPageMake ( KPage **ppage, KPageBacking *backing, uint32_t page_id )
-{
-    rc_t rc;
-    KPage *page = malloc ( sizeof * page );
-    if ( page == NULL )
-        rc = RC ( rcFS, rcBlob, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        rc = KPageBackingRead ( backing, & page -> page, page_id );
-        if ( rc == 0 )
-        {
-            page -> backing = KPageBackingAttach ( backing );
-            KRefcountInit ( & page -> refcount, 1, "KPage", "make", "page" );
-            page -> page_id = page_id;
-            page -> read_only = false;
-            page -> dirty = false;
-
-            * ppage = page;
-            return 0;
-        }
-
-        free ( page );
-    }
-
-    * ppage = NULL;
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KPageAddRef ( const KPage *self )
-{
-    if ( self != NULL ) switch ( KRefcountAdd ( & self -> refcount, "KPage" ) )
-    {
-    case krefOkay:
-        break;
-    default:
-        return RC ( rcFS, rcBlob, rcAttaching, rcConstraint, rcViolated );
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KPageRelease ( const KPage *self )
-{
-    if ( self != NULL ) switch ( KRefcountDrop ( & self -> refcount, "KPage" ) )
-    {
-    case krefOkay:
-        if ( self -> dirty && self -> backing && self -> backing -> write_through )
-        {
-            rc_t rc = KPageBackingWrite ( self -> backing, self -> page, self -> page_id );
-            if ( rc != 0 )
-                return rc;
-
-            ( ( KPage* ) self ) -> dirty = false;
-        }
-        break;
-    case krefWhack:
-        return KPageWhack ( ( KPage* ) self );
-    default:
-        return RC ( rcFS, rcBlob, rcReleasing, rcConstraint, rcViolated );
-    }
-
-    return 0;
-}
-
-
-/* Attach
- * Sever
- *  ignores NULL references
- */
-static
-void KPageAttach ( const KPage *self )
-{
-    if ( self != NULL )
-        KRefcountAddDep ( & self -> refcount, "KPage" );
-}
-
-static
-rc_t KPageSever ( const KPage *self )
-{
-    if ( self != NULL ) switch ( KRefcountDropDep ( & self -> refcount, "KPage" ) )
-    {
-    case krefOkay:
-        break;
-    case krefWhack:
-        return KPageWhack ( ( KPage* ) self );
-    default:
-        return RC ( rcFS, rcBlob, rcReleasing, rcConstraint, rcViolated );
-    }
-
-    return 0;
-}
-
-
-
-/* Id
- *  returns page id
- *
- *  "page_id" [ OUT ] - return parameter for page id
- */
-LIB_EXPORT rc_t CC KPageId ( const KPage *self, uint32_t *page_id )
-{
-    rc_t rc;
-
-    if ( page_id == NULL )
-        rc = RC ( rcFS, rcBlob, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcBlob, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * page_id = self -> page_id;
-            return 0;
-        }
-
-        * page_id = 0;
-    }
-
-    return rc;
-}
-
-
-/* ConstSize
- *  returns constant page size
- */
-LIB_EXPORT size_t CC KPageConstSize ( void )
-{
-    return PGSIZE;
-}
-
-
-/* AccessRead
- * AccessUpdate
- *  gain access to page memory
- *  update access marks page as modified
- */
-LIB_EXPORT rc_t CC KPageAccessRead ( const KPage *self, const void **mem, size_t *bytes )
-{
-    rc_t rc;
-
-    size_t dummy;
-    if ( bytes == NULL )
-        bytes = & dummy;
-
-    if ( mem == NULL )
-        rc = RC ( rcFS, rcBlob, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcBlob, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            assert ( self -> page != NULL );
-            * mem = self -> page;
-            * bytes = PGSIZE;
-            return 0;
-        }
-
-        * mem = NULL;
-    }
-
-    * bytes = 0;
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KPageAccessUpdate ( KPage *self, void **mem, size_t *bytes )
-{
-    rc_t rc;
-
-    size_t dummy;
-    if ( bytes == NULL )
-        bytes = & dummy;
-
-    if ( mem == NULL )
-        rc = RC ( rcFS, rcBlob, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcBlob, rcAccessing, rcSelf, rcNull );
-        else if ( self -> read_only )
-            rc = RC ( rcFS, rcBlob, rcAccessing, rcBlob, rcReadonly );
-        else
-        {
-            assert ( self -> page != NULL );
-            self -> dirty = true;
-            * mem = self -> page;
-            * bytes = PGSIZE;
-            return 0;
-        }
-
-        * mem = NULL;
-    }
-
-    * bytes = 0;
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KPageFile
- *  presents some level of page management on top of a random-access KFile
- */
-struct KPageFile
-{
-    void   **page_idx;
-    uint8_t  page_idx_depth;
-    DLList by_access;
-    KPageBacking *backing;
-    KRefcount refcount;
-    uint32_t count;
-    uint32_t ccount;
-    uint32_t climit;
-    bool read_only;
-};
-
-
-static
-void * KPageFile_whack_recursive( void **idx, uint8_t depth, uint32_t count,
-                                  DLList * mru, uint32_t * ccount )
-{
-	if ( idx != NULL )
-    {
-		if ( depth == 0 )
-        {
-			rc_t rc;
-			KPage * page = ( KPage* )idx;
-			DLListUnlink( mru, &page->ln );
-			rc=KPageSever( page );
-			if ( ccount != NULL )
-                ccount[ 0 ]--;
-			assert( rc == 0 );
-		}
-        else
-        {
-			int i;
-			uint8_t offset;
-
-			depth--;
-			offset = ( count >> ( 8 * depth ) ) & 0xff;
-			idx[ offset ] = KPageFile_whack_recursive( (void**)idx[ offset ], depth, count, mru, ccount );
-			for ( i = ( int )offset + 1; i < 256; i++ )
-            {
-				if ( idx[ i ] != NULL )
-                {
-					idx[ i ] = KPageFile_whack_recursive( (void**)idx[ i ], depth, 0, mru, ccount );
-				}
-			}	
-
-			if ( depth == 0 )
-            {
-				if ( offset == 0 )
-                {
-					free( idx );
-					return NULL;
-				}
-                else
-                {
-					return idx;
-				}
-			}
-            else if ( offset == 0 || ( offset == 1 && idx[ 1 ] == NULL ) )
-            {
-				void *tmp = idx[ 0 ];
-				free( idx );
-				return tmp;
-			}
-            else
-            {
-				return idx;
-			}
-		}
-	}
-	return NULL;
-}
-
-#define PAGE_IDX_DEPTH(A) ((A)>(1<<24)?4:((A)>(1<<16)?3:((A)>256?2:((A)>0?1:0))))
-
-static
-rc_t KPageFileSetPageCount( KPageFile * self, uint32_t count )
-{
-	void **tmp;	
-	uint8_t new_depth = PAGE_IDX_DEPTH( count );
-
-    /******* Adjust depth and change structure of the index if needed ****/
-	if ( new_depth > self->page_idx_depth )
-    {
-		if ( self->page_idx == NULL )
-        {
-			self->page_idx_depth = new_depth;
-		}
-        else while ( self->page_idx_depth < new_depth )
-        {
-			tmp = malloc( 256 * sizeof( *tmp ) );
-			memset( tmp, 0, 256 * sizeof( *tmp ) );
-			tmp[ 0 ] = self->page_idx;
-			self->page_idx = tmp;
-			self->page_idx_depth++;
-		}
-	}
-
-	if ( count < self->count )
-    {
-		self->page_idx = KPageFile_whack_recursive( self->page_idx, self->page_idx_depth,
-                                                    count, &self->by_access, &self->ccount );
-		self->page_idx_depth = new_depth;
-	}
-	self->count=count;
-	if ( self -> read_only )
-        return 0;
-
-	if ( self -> backing )
-        return KPageBackingSetSize ( self -> backing, count );
-	else if ( self->count > self->climit )
-    {
-        return RC ( rcFS, rcFile, rcProcessing, rcBuffer, rcExhausted );
-	}
-
-	return 0;
-}
-/* Whack
- */
-
-static
-rc_t KPageFileWhack ( KPageFile *self )
-{
-    /* first, visit each cached page in flush order */
-    self->page_idx = KPageFile_whack_recursive( self->page_idx, self->page_idx_depth,
-                                                0, &self->by_access, &self->ccount );
-    /* release the backing file */
-    if ( self -> backing )
-        KPageBackingRelease ( self -> backing );
-
-    /* delete the object */
-    free ( self );
-    return 0;
-}
-
-/* Make
- *  creates a page file
- *
- *  "pf" [ OUT ] - return parameter for page file
- *
- *  "backing" [ IN ] - backing file
- *   NB - attaches a new reference to file
- *        does not take ownership
- *
- *  "climit" [ IN ] - cache size limit
- */
-
-#define MIN_CACHE_PAGE 2
-
-LIB_EXPORT rc_t CC KPageFileMakeRead ( const KPageFile **pf, const KFile * backing, size_t climit )
-{
-    rc_t rc;
-
-    if ( pf == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( backing == NULL )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNull );
-        else if ( ! backing -> read_enabled )
-            rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-        else
-        {
-            KPageBacking *bf = calloc ( 1, sizeof * bf );
-            if ( bf == NULL )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                KPageFile *f = malloc ( sizeof * f );
-                if ( f == NULL )
-                    rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-                else
-                {
-                    rc = KFileAddRef ( backing );
-                    if ( rc == 0 )
-                    {
-                        f->page_idx = NULL;
-                        f->page_idx_depth = 0;
-                        DLListInit ( & f -> by_access );
-                        KRefcountInit ( & f -> refcount, 1, "KPageFile", "make", "pgfile" );
-                        f -> count = 0;
-                        f -> ccount = 0;
-                        f -> climit = ( uint32_t ) ( climit >>  PGBITS );
-                        if ( f -> climit < MIN_CACHE_PAGE )
-                            f -> climit = MIN_CACHE_PAGE;
-
-                        PAGE_DEBUG( ( "PAGE: KPageFileMakeRead {%p} limit = %u\n", f, f->climit ) );
-
-                        f -> read_only = true;
-
-                        /* finish the backing file */
-                        KRefcountInit ( & bf -> refcount, 1, "KPageBacking", "make", "backing" );
-                        f -> backing = bf;
-                        bf -> write_through = false;
-
-                        /* attached reference */
-                        bf -> backing = ( KFile* ) backing;
-
-                        /* if backing is random access, get its size */
-                        rc = KFileSize ( backing, & bf -> eof );
-                        if ( rc == 0 )
-                        {
-                            bf -> have_eof = true;
-                            rc = KPageFileSetPageCount( f, ( uint32_t ) ( ( bf -> eof + PGSIZE - 1 ) >> PGBITS ) );
-                            if ( rc != 0 )
-                                return rc;
-                        }
-                        * pf = f;
-                        return 0;
-                    }
-                    free ( f );
-                }
-                free ( bf );
-            }
-        }
-        * pf = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KPageFileMakeUpdate ( KPageFile **pf, KFile * backing, size_t climit, bool write_through )
-{
-    rc_t rc = 0;
-
-    if ( pf == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( backing != NULL )
-        {
-        	if ( ! backing -> read_enabled )
-            {
-                if ( backing -> write_enabled )
-                    rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcWriteonly );
-                else
-                    rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcNoPerm );
-            }
-            else if ( ! backing -> write_enabled )
-                rc = RC ( rcFS, rcFile, rcConstructing, rcFile, rcReadonly );
-        }
-
-        if ( rc == 0 )
-        {
-            KPageFile *f = malloc ( sizeof * f );
-            if ( f == NULL )
-            {
-                rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-            }
-            else 
-            {
-                f->page_idx = NULL;
-                f->page_idx_depth = 0;
-                DLListInit ( & f -> by_access );
-                KRefcountInit ( & f -> refcount, 1, "KPageFile", "make", "pgfile" );
-                f -> count = 0;
-                f -> ccount = 0;
-                f -> climit = ( uint32_t ) ( climit >>  PGBITS );
-                if ( f -> climit < MIN_CACHE_PAGE )
-                    f -> climit = MIN_CACHE_PAGE;
-
-                PAGE_DEBUG( ( "PAGE: KPageFileMakeUpdate {%p} limit = %u\n", f, f->climit ) );
-
-                f -> read_only = false;
-                f -> backing = NULL; /** for now **/
-            }
-
-            if ( rc == 0 && backing )
-            {
-                KPageBacking *bf = calloc ( 1, sizeof * bf );
-                if ( bf == NULL )
-                {
-                    rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-                }
-                else
-                {
-                    rc = KFileAddRef ( backing );
-                    if ( rc == 0 )
-                    {
-                        /* finish the backing file */
-                        KRefcountInit ( & bf -> refcount, 1, "KPageBacking", "make", "backing" );
-                        bf -> write_through = write_through;
-                        /* attached reference */
-                        bf -> backing = backing;
-
-                        /* see if file is random access */
-                        rc = KFileSize ( backing, & bf -> eof );
-                        if ( rc == 0 )
-                        {
-                            bf -> have_eof = true;
-                        }
-                    }
-                }
-
-                if ( rc == 0 )
-                {
-                    f -> backing = bf;
-                    rc = KPageFileSetPageCount( f, ( uint32_t ) ( ( bf -> eof + PGSIZE - 1 ) >> PGBITS ) );
-                }
-                else if ( bf != NULL )
-                {
-                    free ( bf );
-                }
-            }
-
-            if ( rc == 0 )
-            {
-                * pf = f;
-            }
-            else if ( f != NULL )
-            {
-                free( f );
-            }
-        }
-
-        if ( rc != 0 )
-        {
-            *pf = NULL;
-        }
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KPageFileAddRef ( const KPageFile *self )
-{
-    if ( self != NULL ) switch ( KRefcountAdd ( & self -> refcount, "KPageFile" ) )
-    {
-    case krefOkay:
-        break;
-    default:
-        return RC ( rcFS, rcFile, rcAttaching, rcConstraint, rcViolated );
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KPageFileRelease ( const KPageFile *self )
-{
-    if ( self != NULL ) switch ( KRefcountDrop ( & self -> refcount, "KPageFile" ) )
-    {
-    case krefOkay:
-        break;
-    case krefWhack:
-        return KPageFileWhack ( ( KPageFile* ) self );
-    default:
-        return RC ( rcFS, rcFile, rcReleasing, rcConstraint, rcViolated );
-    }
-
-    return 0;
-}
-
-
-/* Size
- *  returns size in bytes of file and cache
- *
- *  "lsize" [ OUT, NULL OKAY ] - return parameter for logical size
- *
- *  "fsize" [ OUT, NULL OKAY ] - return parameter for file size
- *
- *  "csize" [ OUT, NULL OKAY ] - return parameter for cache size
- */
-LIB_EXPORT rc_t CC KPageFileSize ( const KPageFile *self,
-    uint64_t *lsize, uint64_t *fsize, size_t *csize )
-{
-    rc_t rc = 0;
-
-    size_t dummysz;
-    uint64_t dummy64;
-
-    if ( lsize == NULL )
-        lsize = & dummy64;
-    if ( fsize == NULL )
-        fsize = & dummy64;
-    if ( csize == NULL )
-        csize = & dummysz;
-
-    if ( self == NULL )
-        rc = RC ( rcFS, rcFile, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        if ( self -> backing == NULL || self -> backing -> backing == NULL )
-            * fsize = 0;
-        else if ( ! self -> backing -> have_eof )
-            * fsize = self -> backing -> eof;
-        else
-            rc = KFileSize ( self -> backing -> backing, fsize );
-
-        if ( rc == 0 )
-        {
-            * lsize = ( uint64_t ) self -> count << PGBITS;
-            * csize = ( uint64_t ) self -> ccount << PGBITS;
-            return 0;
-        }
-    }
-
-    * lsize = 0;
-    * fsize = 0;
-    * csize = 0;
-
-    return rc;
-}
-
-/* SetSize
- *  extends or truncates underlying file
- *  may affect cache contents
- *
- *  "size" [ IN ] - logical size
- */
-LIB_EXPORT rc_t CC KPageFileSetSize ( KPageFile *self, uint64_t size )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcFS, rcFile, rcUpdating, rcSelf, rcNull );
-    else
-    {
-        uint32_t new_count = ( uint32_t ) ( ( size + PGSIZE - 1 ) >> PGBITS );
-	rc=KPageFileSetPageCount(self,new_count);
-	if(rc) return rc;
-	assert(self->count == new_count);
-    }
-    return rc;
-}
-
-
-static rc_t KPageFileIndexInsert( KPageFile * self, KPage * page )
-{
-	void    	**tmp;
-	uint8_t		depth;
-	uint32_t	page_id = page->page_id;
-	uint8_t		offset;
-
-	assert( page->page_id > 0 );
-
-	if ( page->page_id > self->count ) /**** This is an autogrowth ***/
-    {
-		rc_t rc= KPageFileSetPageCount( self, page->page_id );
-		if ( rc != 0 )
-            return rc;
-	}
-
-	if ( self->page_idx == NULL )
-    {
-		self->page_idx = malloc( 256 * sizeof( *tmp ) );
-		if( self->page_idx == NULL )
-			return RC( rcFS, rcIndex, rcInserting, rcMemory, rcInsufficient );
-		memset( self->page_idx, 0, 256 * sizeof( void * ) );
-	}
-
-	tmp = self->page_idx;
-	depth = self->page_idx_depth;
-	assert( PAGE_IDX_DEPTH( page_id ) <= depth );
-
-	while ( depth > 1 )
-    {
-		offset = ( ( page_id - 1 ) >> ( depth - 1 ) * 8 ) & 0xff;
-		if ( tmp[ offset ] == NULL )
-        {
-			tmp[ offset ] = malloc( 256 * sizeof( *tmp ) );
-			if ( tmp [ offset ] == NULL )
-				return RC( rcFS, rcIndex, rcInserting, rcMemory, rcInsufficient );
-			memset( tmp[ offset ], 0, 256 * sizeof( void * ) );
-		}
-		assert( tmp[ offset ] );
-		tmp = ( void** )tmp[ offset ];
-		depth--;
-	}
-
-	assert( depth == 1 );
-	offset = ( page_id - 1 ) & 0xff;
-	if ( tmp[ offset ] && tmp[ offset ] != page )
-        return RC( rcFS, rcIndex, rcInserting,rcId,rcDuplicate );
-
-	tmp[ offset ] = page;
-	return 0;
-}
-
-
-static rc_t KPageFileIndexDelete( KPageFile *self, uint32_t page_id )
-{
-	void ** tmp = self->page_idx;
-	uint8_t depth = self->page_idx_depth;
-    uint8_t offset;
-
-	assert( page_id > 0 );
-    assert( PAGE_IDX_DEPTH( page_id ) <= depth );
-
-	while( depth > 1 )
-    {
-        offset = ( ( page_id - 1 ) >> ( depth - 1 ) * 8 ) & 0xff;
-		if( tmp[ offset ] == 0 )
-			return RC( rcFS, rcIndex, rcRemoving,rcId,rcInconsistent );
-
-		assert( tmp[ offset ] );
-		tmp = ( void** )tmp[ offset ];
-		depth--;
-	}
-
-	offset=( page_id - 1 ) & 0xff;
-
-	if ( tmp[ offset ] == 0 )
-		return RC( rcFS, rcIndex, rcRemoving,rcId,rcInconsistent );
-
-	tmp[ offset ] = 0;
-	return 0;
-}
-
-
-static KPage * KPageFileIndexFind( KPageFile *self, uint32_t page_id )
-{
-    void ** tmp = self->page_idx;
-    uint8_t depth = self->page_idx_depth;
-    uint8_t offset;
-
-	assert( page_id > 0 );
-    if ( PAGE_IDX_DEPTH( page_id ) > depth )
-        return NULL;
-
-	if ( tmp == NULL )
-        return NULL;
-
-	while ( depth > 1 )
-    {
-        offset = ( ( page_id - 1 ) >> ( depth - 1 ) * 8 ) & 0xff;
-        if ( tmp[ offset ] == NULL )
-            return NULL;
-
-        assert( tmp[ offset ] );
-        tmp = ( void** )tmp[ offset ];
-        depth--;
-    }
-
-	offset = ( page_id - 1 ) & 0xff;
-	assert( tmp[ offset ] == NULL || ( ( KPage * )tmp[ offset ] )->page_id == page_id );
-	return ( KPage * )tmp[ offset ];
-}
-
-	
-/* CachePage
- *  insert a page into cache
- */
-static rc_t KPageFileCachePage ( KPageFile *self, KPage *page )
-{
-    rc_t rc;
-
-    /* perform insert */
-    rc = KPageFileIndexInsert( self, page );
-    if ( rc != 0 )
-        return rc;	
-
-    PAGE_DEBUG( ( "PAGE: {%p}.[%s] insert #%u\n", self, KDbgGetColName(), page->page_id ) );
-
-    DLListPushHead ( & self -> by_access, & page -> ln );
-
-    /* attach reference to page */
-    KPageAttach ( page );
-
-    /* check limit */
-    if ( ++ self -> ccount <= self -> climit )
-        return 0;
-
-    do
-    {
-        DLNode *last = DLListPopTail ( & self -> by_access );
-        KPage *doomed = ( KPage* ) last;
-
-        PAGE_DEBUG( ( "PAGE: {%p}.[%s] delete #%u\n", self, KDbgGetColName(), doomed->page_id ) );
-
-        rc = KPageFileIndexDelete( self, doomed->page_id );
-        if ( rc == 0 )
-            rc = KPageSever ( doomed );
-    }
-    while ( -- self -> ccount > self -> climit && rc == 0 );
-
-    return rc;
-}
-
-
-/* Alloc
- *  allocates a new page
- *  the page will be zeroed and initially unmodified
- *
- *  "page" [ OUT ] - return parameter for page object
- *
- *  "page_id" [ OUT, NULL OKAY ] - optional return parameter for page id
- */
-LIB_EXPORT rc_t CC KPageFileAlloc ( KPageFile *self, KPage **ppage, uint32_t *page_id )
-{
-    rc_t rc;
-
-    uint32_t dummy;
-    if ( page_id == NULL )
-        page_id = & dummy;
-
-    if ( ppage == NULL )
-        rc = RC ( rcFS, rcFile, rcAllocating, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcFile, rcAllocating, rcSelf, rcNull );
-        else if ( self -> read_only )
-            rc = RC ( rcFS, rcBlob, rcAllocating, rcFile, rcReadonly );
-        else
-        {
-            /* create new page */
-            rc = KPageNew ( ppage, self -> backing, self -> count + 1 );
-            if ( rc == 0 )
-            {
-                /* insert into cache */
-                rc = KPageFileCachePage ( self, * ppage );
-                if ( rc == 0 )
-                {
-                    * page_id = self -> count;
-                    return 0;
-                }
-
-                KPageRelease ( * ppage );
-            }
-        }
-
-        * ppage = NULL;
-    }
-
-    * page_id = 0;
-
-    return rc;
-}
-
-
-/* Get
- *  returns an existing page
- *
- *  "page" [ OUT ] - return parameter for page object
- *
- *  "page_id" [ IN ] - id of page to retrieve
- */
-LIB_EXPORT rc_t CC KPageFileGet ( KPageFile *self, KPage **ppage, uint32_t page_id )
-{
-    rc_t rc;
-
-    if ( ppage == NULL )
-        rc = RC ( rcFS, rcFile, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcFile, rcReading, rcSelf, rcNull );
-        else if ( page_id == 0 )
-            rc = RC ( rcFS, rcFile, rcReading, rcId, rcNull );
-        else
-        {
-            KPage *page = KPageFileIndexFind( self, page_id ); /** try to see if MRU pages work **/
-            if ( page != NULL )
-            {
-                rc = KPageAddRef ( * ppage = page );
-                if ( rc == 0 )
-                {
-                    PAGE_DEBUG( ( "PAGE: {%p}.[%s] found #%u\n", self, KDbgGetColName(), page_id ) );
-
-                    /* put page at head of list if not already there */
-                    if ( DLListHead ( & self -> by_access ) != & page -> ln )
-                    {
-                        DLListUnlink ( & self -> by_access, & page -> ln );
-                        DLListPushHead ( & self -> by_access, & page -> ln );
-                    }
-                    return 0;
-                }
-                * ppage = NULL;
-                return rc;
-            }
-
-            rc = KPageMake ( ppage, self -> backing, page_id );
-            if ( rc == 0 )
-            {
-                /* insert into cache */
-                rc = KPageFileCachePage ( self, * ppage );
-                if ( rc == 0 )
-                    return 0;
-
-                KPageRelease ( * ppage );
-            }
-        }
-
-        * ppage = NULL;
-    }
-
-    return rc;
-}
-
-
-/* PosGet
- *  returns a page corresponding to position
- *
- *  "page" [ OUT ] - return parameter for page object
- *
- *  "offset" [ IN ] - offset to a byte within file
- */
-LIB_EXPORT rc_t CC KPageFilePosGet ( KPageFile *self, KPage **page, uint64_t offset )
-{
-    rc_t rc;
-
-    if ( page == NULL )
-        rc = RC ( rcFS, rcFile, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcFile, rcReading, rcSelf, rcNull );
-        else
-        {
-            uint32_t aid, count = self -> count;
-            uint32_t zpgid = ( uint32_t ) ( offset >> PGBITS );
-
-            if ( self -> read_only || zpgid < count )
-                return KPageFileGet ( self, page, zpgid + 1 );
-
-            /* potentially extend count so that
-               the oid assigned will be zpgid + 1 */
-            self -> count = zpgid;
-            rc = KPageFileAlloc ( self, page, & aid );
-            if ( rc == 0 )
-            {
-                assert ( zpgid + 1 == aid );
-                return 0;
-            }
-
-            self -> count = count;
-        }
-
-        * page = NULL;
-    }
-
-    return rc;
-}
-
-
-/* DropBacking
- *  used immediately prior to releasing
- *  prevents modified pages from being flushed to disk
- */
-LIB_EXPORT rc_t CC KPageFileDropBacking ( KPageFile *self )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcFile, rcDetaching, rcSelf, rcNull );
-
-    return self -> backing ? KPageBackingDrop ( self -> backing ) : 0;
-}
diff --git a/libs/kfs/pmem.c b/libs/kfs/pmem.c
deleted file mode 100644
index 3aa8d94..0000000
--- a/libs/kfs/pmem.c
+++ /dev/null
@@ -1,632 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-#include <kfs/file.h>
-#include <kfs/pmem.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#define NUM_HOT_ENTRIES ((1024u * 1024u))
-
-typedef uint64_t BlockID;
-typedef union HotEntry HotEntry;
-typedef uint64_t Offset;
-typedef int64_t Size;
-
-struct HotEntryInUse {
-    int64_t size;  /* > 0 */
-    BlockID id;
-    void *storage;
-};
-
-struct HotEntryFree {
-    int64_t size; /* == 0 */
-    BlockID id;
-    unsigned next;
-};
-
-union HotEntry {
-    struct HotEntryInUse inuse;
-    struct HotEntryFree free;
-};
-
-typedef struct ColdPageLeaf ColdPageLeaf;
-struct ColdPageLeaf {
-    Offset offset;
-    Size size;
-};
-
-typedef union ColdPageNode ColdPageNode;
-union ColdPageNode {
-    ColdPageNode *next;
-    ColdPageLeaf *leaf;
-};
-
-/*--------------------------------------------------------------------------
- * KMemBank
- *  Uses a generational allocator.
- *  A fixed number of blocks are managed by malloc/free.
- *  Old blocks are written to a file and free'd.
- *
- *  The two envisioned usage patterns are:
- *    1) blocks which are written, read, and freed 'quickly'.
- *    2) blocks which are written, not used for 'a while', and then accessed all
- *       at once, in the order they were created.
- *
- *  No attempt is made to reclaim or reuse the space in the file.
- */
-struct KMemBank
-{
-    KFile *pf;
-
-    ColdPageNode coldStorage[64u * 1024u];
-
-    KRefcount refcount;
-
-    BlockID next;
-    uint64_t fileNext;
-    unsigned nextFree;
-    HotEntry hot[NUM_HOT_ENTRIES];
-};
-
-static KMemBank *newMemBank(void)
-{
-    KMemBank *self = calloc(1, sizeof(*self));
-
-    if (self) {
-        unsigned i;
-
-        for (i = 0; i < NUM_HOT_ENTRIES; ++i) {
-            self->hot[i].free.size = (int64_t)(-1);
-            self->hot[i].free.id = i + 1;
-            self->hot[i].free.next = i + 1;
-        }
-        self->next = NUM_HOT_ENTRIES;
-
-        KRefcountInit(&self->refcount, 1, "KMemBank", "new", "bank");
-        return self;
-    }
-    return NULL;
-}
-
-static void freeColdStorage(ColdPageNode *const node, int const depth);
-
-/* Whack
- */
-static
-void KMemBankWhack ( KMemBank *self )
-{
-    freeColdStorage(self->coldStorage, 0);
-    KFileRelease(self->pf);
-    free(self);
-}
-
-/* Make
- *  make a memory bank
- *
- *  "block_size" [ IN ] - ignored
- *
- *  "limit" [ IN, DFLT ZERO ] - ignored
- *
- *  "backing" [ IN ] - required.
- */
-LIB_EXPORT rc_t CC KMemBankMake ( KMemBank **bankp,
-    size_t block_size, uint64_t limit, KFile *backing )
-{
-    assert(backing != NULL);
-    assert(bankp != NULL);
-    if (bankp == NULL || backing == NULL) {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcConstructing, rcParam, rcNull);
-    }
-    else {
-        KMemBank *const self = newMemBank();
-        if (self == NULL) {
-            PLOGMSG(klogFatal, (klogFatal, "OUT OF MEMORY - " __FILE__ ":$(line)", "line=%i", __LINE__));
-            abort(); 
-            return RC(rcFS, rcMemory, rcConstructing, rcMemory, rcExhausted);
-        }
-        if (backing) {
-            self->pf = backing;
-            KFileAddRef(self->pf);
-        }
-        *bankp = self;
-        return 0;
-    }
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KMemBankAddRef(const KMemBank *cself)
-{
-    KMemBank *const self = (KMemBank *)cself;
-    if (self != NULL) {
-        int const rslt = KRefcountAdd(&self->refcount, "KMemBank");
-        assert(rslt == krefOkay);
-        if (rslt != krefOkay) {
-            PLOGMSG(klogFatal, (klogFatal, "LOGIC ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-            abort();
-            return RC(rcFS, rcMemory, rcAttaching, rcConstraint, rcViolated);
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KMemBankRelease(const KMemBank *cself)
-{
-    KMemBank *const self = (KMemBank *)cself;
-    if (self != NULL) {
-        int const rslt = KRefcountDrop(&self->refcount, "KMemBank");
-        switch(rslt) {
-        case krefWhack:
-            KMemBankWhack(self);
-            break;
-        case krefOkay:
-            break;
-        default:
-            PLOGMSG(klogFatal, (klogFatal, "LOGIC ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-            abort();
-            return RC(rcFS, rcMemory, rcAttaching, rcConstraint, rcViolated);
-        }
-    }
-    return 0;
-}
-
-static HotEntry *findBlock(KMemBank const *const self, BlockID const id)
-{
-    unsigned const slot = (id - 1) % NUM_HOT_ENTRIES;
-    HotEntry *const entry = (HotEntry *)&self->hot[slot];
-
-    return entry->inuse.id == id ? entry : NULL;
-}
-
-struct BlockID_ext {
-    int node[3];
-    int leaf;
-};
-
-static struct BlockID_ext extendBlockID(BlockID const id)
-{
-    struct BlockID_ext rslt;
-    rslt.node[0] = ((id - 1) >> 48) & 0xFFFF; /* -> node[65536] */
-    rslt.node[1] = ((id - 1) >> 32) & 0xFFFF; /* -> node[65536] */
-    rslt.node[2] = ((id - 1) >> 16) & 0xFFFF; /* -> leaf[65536] */
-    rslt.leaf    = ((id - 1) >>  0) & 0xFFFF; /* -> leaf      */
-    return rslt;
-}
-
-static void freeColdStorage(ColdPageNode *const node, int const depth)
-{
-    int i;
-    for (i = 0; i < 0x10000; ++i) {
-        if (node[i].next != NULL && depth < 2) {
-            freeColdStorage(node[i].next, depth + 1);
-        }
-        free(node[i].next);
-    }
-}
-
-static ColdPageLeaf *findColdBlock(KMemBank const *const self, BlockID const id)
-{
-    ColdPageNode const *node = self->coldStorage;
-    struct BlockID_ext const ext = extendBlockID(id);
-    int i;
-
-    for (i = 0; i < 2; ++i) {
-        int const j = ext.node[i];
-        if (node[j].next != NULL)
-            node = node[j].next;
-        else
-            return NULL;
-    }
-    {
-        ColdPageLeaf *const leaf = node[ext.node[2]].leaf;
-        return leaf == NULL ? NULL : &leaf[ext.leaf];
-    }
-}
-
-static rc_t transferToColdStorage(KMemBank *const self, BlockID const id, Offset const offset, Size const size)
-{
-    ColdPageNode *node = self->coldStorage;
-    struct BlockID_ext const ext = extendBlockID(id);
-    int i;
-
-    for (i = 0; i < 2; ++i) {
-        int const j = ext.node[i];
-        if (node[j].next != NULL)
-            node = node[j].next;
-        else {
-            node[j].next = calloc(64u * 1024u, sizeof(ColdPageNode));
-            if (node[j].next != NULL)
-                node = node[j].next;
-            else
-                return RC(rcFS, rcMemory, rcAllocating, rcMemory, rcExhausted);
-        }
-    }
-
-    if (node[ext.node[2]].leaf == NULL) {
-        node[ext.node[2]].leaf = calloc(64u * 1024u, sizeof(ColdPageLeaf));
-        if (node[ext.node[2]].leaf == NULL) {
-            return RC(rcFS, rcMemory, rcAllocating, rcMemory, rcExhausted);
-        }
-    }
-    {
-        ColdPageLeaf *const leaf = node[ext.node[2]].leaf;
-        leaf[ext.leaf].offset = offset;
-        leaf[ext.leaf].size = size;
-    }
-    return 0;
-}
-
-static rc_t freeColdBlock(KMemBank *const self, BlockID const id)
-{
-    ColdPageLeaf *const leaf = findColdBlock(self, id);
-
-    if (leaf && leaf->size > 0) {
-        leaf->size = -leaf->size;
-        return 0;
-    }
-    if (leaf == NULL || leaf->size == 0) {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - BLOCK WAS NEVER ALLOCATED - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcDestroying, rcId, rcNotFound);
-    }
-    else {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - DOUBLE FREE - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcDestroying, rcId, rcInvalid);
-    }
-}
-
-static rc_t freeBlock(KMemBank *const self, BlockID const id)
-{
-    HotEntry *const entry = findBlock(self, id);
-    if (entry) {
-        struct HotEntryInUse const inuse = entry->inuse;
-        struct HotEntryFree *const pfree = &entry->free;
-
-        if (inuse.size == 0) {
-            PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - DOUBLE FREE - " __FILE__ ":$(line)", "line=%i", __LINE__));
-            abort();
-            return RC(rcFS, rcMemory, rcDestroying, rcId, rcInvalid);
-        }
-        free(inuse.storage);
-        memset(pfree, 0, sizeof(*pfree));
-        pfree->size = (int64_t)(-1);
-        pfree->id = id;
-        pfree->next = self->nextFree;
-        self->nextFree = entry - self->hot;
-        return 0;
-    }
-    else
-        return freeColdBlock(self, id);
-}
-
-static struct HotEntryInUse *newBlock(KMemBank *const self, rc_t *const rc)
-{
-    struct HotEntryInUse *inuse = NULL;
-    
-    if (self->nextFree < NUM_HOT_ENTRIES) {
-        HotEntry *const entry = &self->hot[self->nextFree];
-        struct HotEntryFree const free = entry->free;
-
-        assert(free.size < 0); /* it really is free */
-
-        self->nextFree = free.next;
-        inuse = &entry->inuse;
-        memset(inuse, 0, sizeof(*inuse));
-        inuse->id = free.id;
-    }
-    else {
-        BlockID const id = ++self->next;
-        unsigned const slot = (id - 1) % NUM_HOT_ENTRIES;
-        size_t written = 0;
-
-        inuse = &self->hot[slot].inuse;
-        assert(inuse->size >= 0); /* it really is inuse */
-
-        while (written < inuse->size) {
-            size_t const n = inuse->size - written;
-            size_t w = 0;
-            *rc = KFileWrite(self->pf, self->fileNext + written, ((char const *)inuse->storage) + written, n, &w);
-            if (*rc != 0) return NULL;
-            written += w;
-        }
-
-        *rc = transferToColdStorage(self, inuse->id, self->fileNext, inuse->size);
-        if (*rc != 0) return NULL;
-
-        self->fileNext += inuse->size;
-        free(inuse->storage);
-        memset(inuse, 0, sizeof(*inuse));
-        inuse->id = id;
-    }
-    return inuse;
-}
-
-/* Alloc
- *  allocate memory
- *
- *  "id" [ OUT ] - return parameter for memory allocation id
- *
- *  "bytes" [ IN ] - the number of bytes to allocate
- *
- *  "clear" [ IN ] - ignored, memory is zero'ed
- */
-LIB_EXPORT rc_t CC KMemBankAlloc ( KMemBank *self,
-    uint64_t *id, uint64_t bytes, bool clear )
-{
-    rc_t rc = 0;
-    struct HotEntryInUse *new_block = NULL;
-
-    assert(self != NULL);
-    assert(id != NULL);
-    if (self == NULL) {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcAllocating, rcSelf, rcNull);
-    }
-    if (id == NULL) {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcAllocating, rcParam, rcNull);
-    }
-    if (bytes > INT64_MAX)
-        return RC(rcFS, rcMemory, rcResizing, rcSize, rcExcessive);
-    if (bytes == 0)
-        return RC(rcFS, rcMemory, rcResizing, rcSize, rcInvalid);
-
-    new_block = newBlock(self, &rc); if (rc) return rc;
-    new_block->storage = calloc(1, bytes);
-    if (new_block->storage == NULL) {
-        PLOGMSG(klogFatal, (klogFatal, "OUT OF MEMORY - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcAllocating, rcMemory, rcExhausted);
-    }
-    new_block->size = bytes;
-    *id = new_block->id;
-    return 0;
-}
-
-
-/* Free
- *  free memory
- *
- *  "id" [ IN, ZERO OKAY ] - id of the allocation to be freed
- */
-LIB_EXPORT rc_t CC KMemBankFree ( KMemBank *self, uint64_t id )
-{
-    if ( id == 0 )
-        return 0;
-
-    assert(self != NULL);
-    if (self == NULL) {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcAllocating, rcSelf, rcNull);
-    }
-    return freeBlock(self, id);
-}
-
-
-/* Size
- *  returns the allocated capacity of the memory object
- *
- *  "id" [ IN ] - id of the allocation
- *
- *  "size" [ OUT ] - return parameter
- */
-LIB_EXPORT rc_t CC KMemBankSize ( const KMemBank *self, uint64_t id, uint64_t *size )
-{
-    assert(self != NULL);
-    assert(size != NULL);
-    if (self == NULL) {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcAccessing, rcSelf, rcNull);
-    }
-    if (size == NULL) {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcAccessing, rcParam, rcNull);
-    }
-    else {
-        HotEntry const *const h = findBlock(self, id);
-        if (h) {
-            *size = h->inuse.size;
-            return 0;
-        }
-        else {
-            ColdPageLeaf const *const l = findColdBlock(self, id);
-            *size = (l && l->size > 0) ? l->size : 0;
-            return 0;
-        }
-    }
-}
-
-
-/* SetSize
- *  performs a reallocation of memory object
- *
- *  "id" [ IN ] - id of the allocation being resized
- *
- *  "bytes" [ IN ] - new capacity
- */
-LIB_EXPORT rc_t CC KMemBankSetSize ( KMemBank *self, uint64_t id, uint64_t bytes )
-{
-    assert(self != NULL);
-    assert(id != 0);
-    if (self == NULL) {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcResizing, rcSelf, rcNull);
-    }
-    if (id == 0) {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcResizing, rcId, rcInvalid);
-    }
-    if (bytes > INT64_MAX)
-        return RC(rcFS, rcMemory, rcResizing, rcSize, rcExcessive);
-    if (bytes == 0)
-        return RC(rcFS, rcMemory, rcResizing, rcSize, rcInvalid);
-    else {
-        HotEntry *const h = findBlock(self, id);
-        if (h && h->inuse.size > 0) {
-            void *const tmp = realloc(h->inuse.storage, bytes);
-            if (tmp) {
-                h->inuse.storage = tmp;
-                h->inuse.size = bytes;
-                return 0;
-            }
-            return RC(rcFS, rcMemory, rcResizing, rcMemory, rcExhausted);
-        }
-        else
-            return RC(rcFS, rcMemory, rcResizing, rcMode, rcUnsupported);
-    }
-}
-
-
-/* Read
- *  linearly access memory
- *
- *  "id" [ IN ] - id of the allocation being read
- *
- *  "pos" [ IN ] - starting offset into allocation
- *
- *  "buffer" [ IN ] and "bsize" [ IN ] - buffer for returned data
- *
- *  "num_read" [ OUT ] - return parameter for the number of bytes read
- */
-LIB_EXPORT rc_t CC KMemBankRead ( const KMemBank *self, uint64_t id,
-   uint64_t pos, void *buffer, size_t bsize, size_t *num_read )
-{
-    assert(self != NULL);
-    assert(num_read != NULL);
-    assert(id != 0);
-    if (self == NULL) {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcReading, rcSelf, rcNull);
-    }
-    if (id == 0) {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcReading, rcId, rcInvalid);
-    }
-    if (num_read == NULL) {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcReading, rcParam, rcNull);
-    }
-    else {
-        HotEntry const *const h = findBlock(self, id);
-        if (h) {
-            char const *in = (char *)h->inuse.storage + pos;
-            char const *const endp = (char *)h->inuse.storage + h->inuse.size;
-
-            if (endp > in) {
-                size_t const n = (endp - in) < bsize ? (endp - in) : bsize;
-                memcpy(buffer, in, n);
-                *num_read = n;
-            }
-            return 0;
-        }
-        else {
-            ColdPageLeaf const *const l = findColdBlock(self, id);
-
-            if (l == NULL || l->size <= 0)
-                return RC(rcFS, rcMemory, rcReading, rcId, rcNotFound);
-
-            return KFileRead(self->pf, l->offset + pos, buffer, bsize, num_read);
-        }
-    }
-}
-
-
-/* Write
- *  linearly update memory
- *  will resize as required
- *
- *  "id" [ IN ] - id of the allocation being writ
- *
- *  "pos" [ IN ] - starting offset into allocation
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to write
- *
- *  "num_writ" [ OUT ] - return parameter for the number of bytes written
- */
-LIB_EXPORT rc_t CC KMemBankWrite ( KMemBank *self, uint64_t id,
-    uint64_t pos, const void *buffer, size_t size, size_t *num_writ )
-{
-    assert(self != NULL);
-    assert(num_writ != NULL);
-    assert(id != 0);
-    if (self == NULL) {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcReading, rcSelf, rcNull);
-    }
-    if (id == 0) {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcReading, rcId, rcInvalid);
-    }
-    if (num_writ == NULL) {
-        PLOGMSG(klogFatal, (klogFatal, "PROGRAMMER ERROR - " __FILE__ ":$(line)", "line=%i", __LINE__));
-        abort();
-        return RC(rcFS, rcMemory, rcReading, rcParam, rcNull);
-    }
-    else {
-        HotEntry *const h = findBlock(self, id);
-        if (h) {
-            if (pos + size > h->inuse.size) {
-                void *const tmp = realloc(h->inuse.storage, pos + size);
-                if (tmp) {
-                    h->inuse.storage = tmp;
-                    h->inuse.size = pos + size;
-                }
-                else
-                    return RC(rcFS, rcMemory, rcResizing, rcMemory, rcExhausted);
-            }
-            memcpy(((char *)h->inuse.storage) + pos, buffer, size);
-            *num_writ = size;
-            return 0;
-        }
-        else
-            return RC(rcFS, rcMemory, rcWriting, rcMode, rcUnsupported);
-    }
-}
diff --git a/libs/kfs/quickmount.c b/libs/kfs/quickmount.c
deleted file mode 100644
index 4a27909..0000000
--- a/libs/kfs/quickmount.c
+++ /dev/null
@@ -1,967 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <kfs/extern.h>
-#include <kfs/quickmount.h>
-#include <kfs/directory.h>
-
-#include <klib/rc.h>
-#include <klib/printf.h>
-
-#include <sysalloc.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <assert.h>
-
-/* ----------------------------------------------------------------------
- * 
- */
-
-/* -----
- * define the specific types to be used in the templatish/inheritancish
- * definition of vtables and their elements
- */
-#define KDIR_IMPL struct KQuickMountDir
-#define KNAMELIST_IMPL   struct KQuickMountListing
-#include <kfs/impl.h>
-
-/* ======================================================================
- */
-/*--------------------------------------------------------------------------
- * KQuickMountDir
- *  a directory inside an archive (tar or SRA for example)
- *
- * This type is being engineered to mimic KQuickMountDir.
- */
-struct KQuickMountDir
-{
-    KDirectory   dad;
-    int          root;
-    const KFile* file;
-    char *       mount;
-    char         path[1];
-    /* actual allocation is based on actual string length */
-};
-
-
-
-/* KQuickMountDirCanonPath
- */
-static
-rc_t KQuickMountDirCanonPath ( const KQuickMountDir *self, enum RCContext ctx, char *path, size_t psize )
-{
-    char *low, *dst, *last, *end = path + psize;
-    low = dst = last = path + self -> root;
-
-    while ( 1 )
-    {
-        char *src = strchr ( last + 1, '/' );
-        if ( src == NULL )
-            src = end;
-
-        /* detect special sequences */
-        switch ( src - last )
-        {
-        case 2:
-            if ( last [ 1 ] == '.' )
-            {
-                /* skip over */
-                last = src;
-                if ( src != end )
-                    continue;
-            }
-            break;
-
-        case 3:
-            if ( last [ 1 ] == '.' && last [ 2 ] == '.' )
-            {
-                /* remove previous leaf in path */
-                dst [ 0 ] = 0;
-                dst = strrchr ( path, '/' );
-                if ( dst == NULL || dst < low )
-                    return RC ( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-
-                last = src;
-                if ( src != end )
-                    continue;
-            }
-            break;
-        }
-
-        /* if rewriting, copy leaf */
-        assert ( src >= last );
-
-        if ( dst != last )
-            memmove ( dst, last, src - last );
-
-        /* move destination ahead */
-        dst += src - last;
-        
-        /* if we're done, go */
-        if ( src == end )
-                break;
-
-        /* find next separator */
-        last = src;
-    }
-
-    /* NUL terminate if modified */
-    if ( dst != end )
-        * dst = 0;
-
-    return 0;
-}
-
-/* KQuickMountDirRelativePath
- *  makes "path" relative to "root"
- *  both "root" and "path" MUST be absolute
- *  both "root" and "path" MUST be canonical, i.e. have no "./" or "../" sequences
- */
-static
-rc_t KQuickMountDirRelativePath (const KQuickMountDir *self, enum RCContext ctx,
-                                 const char *root, char *path, size_t path_max)
-{
-    int backup;
-    size_t bsize, psize;
-
-    const char *r = root + self -> root;
-    const char *p = path + self -> root;
-
-    assert ( r != NULL && r [ 0 ] == '/' );
-    assert ( p != NULL && p [ 0 ] == '/' );
-
-    for ( ; * r == * p; ++ r, ++ p )
-    {
-        /* disallow identical paths */
-        if ( * r == 0 )
-            return RC ( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-    }
-
-    /* paths are identical up to "r","p"
-       if "r" is within a leaf name, then no backup is needed
-       by counting every '/' from "r" to end, obtain backup count */
-    for ( backup = 0; * r != 0; ++ r )
-    {
-        if ( * r == '/' )
-            ++ backup;
-    }
-
-    /* the number of bytes to be inserted */
-    bsize = backup * 3;
-
-    /* align "p" to last directory separator */
-    while ( p [ -1 ] != '/' ) -- p;
-
-    /* the size of the remaining relative path */
-    psize = strlen ( p );
-
-    /* open up space if needed */
-    if ( (size_t) (p - path) < bsize )
-    {
-        /* prevent overflow */
-        if ( bsize + psize >= path_max )
-            return RC ( rcFS, rcDirectory, ctx, rcPath, rcExcessive );
-        memmove ( path + bsize, p, psize + 1 /* 1 for '\0'*/ );
-    }
-
-    /* insert backup sequences */
-    for ( bsize = 0; backup > 0; bsize += 3, -- backup )
-        memcpy ( & path [ bsize ], "../", 3 );
-
-    /* close gap */
-    if ( (size_t) (p - path) > bsize )
-        memmove ( & path [ bsize ], p, strlen ( p ) + 1 );
-
-    return 0;
-}
-
-
-
-static __inline__
-rc_t KQuickMountDirVMakePath (const KQuickMountDir * self, enum RCContext ctx, 
-                              bool canon, char * buffer, size_t path_max,
-                              const char * path, va_list args)
-{
-    size_t psize;
-    size_t bsize;
-    rc_t rc;
-
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, ctx, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-
-    if ( args != NULL && path [ 0 ] == '%' )
-    {
-        rc = string_vprintf (buffer, path_max, &psize, path, args);
-
-        if (psize > path_max)
-            return RC ( rcFS, rcDirectory, ctx, rcPath, rcExcessive );
-        if (rc)
-            return rc;
-        if ( buffer [ 0 ] != '/' )
-        {
-            bsize = (self->mount - self->path) - 1;
-            if ( bsize + psize >= path_max )
-                return RC ( rcFS, rcDirectory, ctx, rcPath, rcExcessive );
-            memmove ( buffer + bsize, buffer, psize + 1 );
-            assert ( self -> path [ bsize - 1 ] == '/' );
-            memcpy ( buffer, self -> path, bsize );
-        }
-        else if ( ( bsize = self -> root ) != 0 )
-        {
-            if ( bsize + psize >= path_max )
-                return RC ( rcFS, rcDirectory, ctx, rcPath, rcExcessive );
-            memmove ( buffer + bsize, buffer, psize + 1 );
-            assert ( self -> path [ bsize - 1 ] != '/' );
-            memcpy ( buffer, self -> path, bsize );
-        }
-    }
-    else
-    {
-        if ( path [ 0 ] != '/' )
-        {
-/*             assert ( self -> path [ self -> size - 1 ] == '/' ); */
-            memcpy ( buffer, self -> path, bsize = (self->mount - self->path) - 1 );
-        }
-        else if ( ( bsize = self -> root ) != 0 )
-        {
-            assert ( self -> path [ bsize - 1 ] != '/' );
-            memcpy ( buffer, self -> path, bsize );
-        }
-
-
-        rc = string_vprintf ( buffer + bsize, path_max - bsize, &psize, path, args );
-        if (bsize + psize >= path_max)
-            return RC ( rcFS, rcDirectory, ctx, rcPath, rcExcessive );
-        if (rc)
-            return rc;
-    }
-
-    if ( buffer [ bsize + psize ] == '/' )
-        buffer [ bsize + -- psize ] = 0;
-
-    if ( psize > 0 && ( canon || self -> root != 0 ) )
-        return KQuickMountDirCanonPath ( self, ctx, buffer, bsize + psize );
-
-    return 0;
-}
-
-
-static __inline__
-rc_t KQuickMountDirMakePath (const KQuickMountDir * self, enum RCContext ctx, 
-                             bool canon, char * buffer, size_t path_max,
-                             const char * path, ...)
-{
-    va_list args;
-    rc_t rc;
-
-    va_start (args, path);
-    rc = KQuickMountDirVMakePath (self, ctx, canon, buffer,
-                                  path_max, path, args);
-    va_end (args);
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirDestroy
- */
-static rc_t CC KQuickMountDirDestroy (KQuickMountDir *self)
-{
-    rc_t rc;
-
-    rc = KFileRelease (self->file);
-
-    free (self);
-
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirList
- *  create a directory listing
- *
- *  "list" [ OUT ] - return parameter for list object
- *
- *  "path" [ IN, NULL OKAY ] - optional parameter for target
- *  directory. if NULL, interpreted to mean "."
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN]	 const KQuickMountDir *	self		Object oriented C; KQuickMountDir object for this method
- * [OUT] KNamelist **		listp,
- * [IN]  bool (* 		f	)(const KDirectory*,const char *, void *)
- * [IN]  void *			data
- * [IN]  const char *		path
- * [IN]  va_list		args
- */
-static
-rc_t CC KQuickMountDirList (const KQuickMountDir *self,
-                       KNamelist **listp,
-                       bool (CC* f) (const KDirectory *dir, const char *name, void *data),
-                       void *data,
-                       const char *path,
-                       va_list args)
-{
-    return RC (rcFS, rcDirectory, rcAccessing, rcFunction, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirVisit
- *  visit each path under designated directory,
- *  recursively if so indicated
- *
- *  "recurse" [ IN ] - if non-zero, recursively visit sub-directories
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - function to execute
- *  on each path. receives a base directory and relative path
- *  for each entry, where each path is also given the leaf name
- *  for convenience. if "f" returns non-zero, the iteration will
- *  terminate and that value will be returned. NB - "dir" will not
- *  be the same as "self".
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- */
-static 
-rc_t CC KQuickMountDirVisit (const KQuickMountDir *self, 
-                      bool recurse,
-                      rc_t (CC* f) (const KDirectory *, uint32_t, const char *, void *), 
-                      void *data,
-                      const char *path,
-                      va_list args)
-{
-    return RC (rcFS, rcDirectory, rcAccessing, rcFunction, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirVisitUpdate
- */
-static rc_t CC KQuickMountDirVisitUpdate (KQuickMountDir *self,
-                                   bool recurse,
-                                   rc_t (CC*f) (KDirectory *,uint32_t,const char *,void *),
-                                   void *data,
-                                   const char *path,
-                                   va_list args)
-{
-    return RC (rcFS, rcDirectory, rcUpdating, rcFunction, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirPathType
- *  returns a KPathType
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- *
- * [RET] uint32_t
- * [IN]  const KQuickMountDir *	self		Object oriented C; KQuickMountDir object for this method
- * [IN]  const char *		path
- * [IN]  va_list		args
- */
-static uint32_t CC KQuickMountDirPathType (const KQuickMountDir *self, const char *path, va_list args)
-{
-    char buff [8192];
-    rc_t rc;
-
-    rc = KQuickMountDirVMakePath (self, rcAccessing, true, buff, sizeof buff, path, args);
-    if (rc)
-        return kptBadPath;
-
-    if (strcmp (buff, self->path) == 0)
-        return kptFile;
-
-    return kptNotFound;
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirResolvePath
- *
- *  resolves path to an absolute or directory-relative path
- *
- * [IN]  const KQuickMountDir *self		Objected oriented self
- * [IN]	 bool 		absolute	if non-zero, always give a path starting
- *  					with '/'. NB - if the directory is 
- *					chroot'd, the absolute path
- *					will still be relative to directory root.
- * [OUT] char *		resolved	buffer for NUL terminated result path in 
- *					directory-native character set
- * [IN]	 size_t		rsize		limiting size of resolved buffer
- * [IN]  const char *	path		NUL terminated string in directory-native
- *					character set denoting target path. 
- *					NB - need not exist.
- *
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static rc_t CC KQuickMountDirResolvePath (const KQuickMountDir *self,
-                                          bool absolute,
-                                          char *resolved,
-                                          size_t rsize,
-                                          const char *path,
-                                          va_list args)
-{
-    char full [ 8192 ];
-    rc_t rc = KQuickMountDirVMakePath ( self, rcResolving, true, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        size_t path_size = strlen ( full );
-
-        if ( absolute )
-        {
-            /* test buffer capacity */
-            if ( path_size - self -> root >= rsize )
-                return RC ( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-
-            /* ready to go */
-            strcpy ( resolved, & full [ self -> root ] );
-/*             assert ( resolved [ 0 ] == '/' ); */
-        }
-        else
-        {
-            rc = KQuickMountDirRelativePath ( self, rcResolving, self -> path, full, sizeof full /*path_size*/ );
-            if ( rc == 0 )
-            {
-                path_size = strlen ( full );
-                if ( path_size >= rsize )
-                    return RC ( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-                strcpy ( resolved, full );
-            }
-        }
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirResolveAlias
- *  resolves an alias path to its immediate target
- *  NB - the resolved path may be yet another alias
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting an object presumed to be an alias.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character set
- *
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static rc_t CC KQuickMountDirResolveAlias (const KQuickMountDir * self, 
-				 bool absolute,
-				 char * resolved,
-				 size_t rsize,
-				 const char *alias,
-				 va_list args)
-{
-    return RC (rcFS, rcDirectory, rcAccessing, rcFunction, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirRename
- *  rename an object accessible from directory, replacing
- *  any existing target object of the same type
- *
- *  "from" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- *
- *  "to" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- */
-static
-rc_t CC KQuickMountDirRename (KQuickMountDir *self, bool force, const char *from, const char *to)
-{
-    assert (self != NULL);
-    assert (from != NULL);
-    assert (to != NULL);
-
-    return RC (rcFS, rcDirectory, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirRemove
- *  remove an accessible object from its directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "force" [ IN ] - if non-zero and target is a directory,
- *  remove recursively
- */
-static
-rc_t CC KQuickMountDirRemove (KQuickMountDir *self, bool force, const char *path, va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcDirectory, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirClearDir
- *  remove all directory contents
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "force" [ IN ] - if non-zero and directory entry is a
- *  sub-directory, remove recursively
- */
-static
-rc_t CC KQuickMountDirClearDir (KQuickMountDir *self, bool force, const char *path, va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcDirectory, rcUpdating, rcSelf, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirAccess
- *  get access to object
- *
- *  "access" [ OUT ] - return parameter for Unix access mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static rc_t CC KQuickMountDirVAccess (const KQuickMountDir *self,
-			    uint32_t *access,
-			    const char *path,
-			    va_list args)
-{
-    return RC (rcFS, rcDirectory, rcAccessing, rcFunction, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirSetAccess
- *  set access to object a la Unix "chmod"
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "access" [ IN ] and "mask" [ IN ] - definition of change
- *  where "access" contains new bit values and "mask defines
- *  which bits should be changed.
- *
- *  "recurse" [ IN ] - if non zero and "path" is a directory,
- *  apply changes recursively.
- */
-static rc_t CC KQuickMountDirSetAccess (KQuickMountDir *self,
-			      bool recurse,
-			      uint32_t access,
-			      uint32_t mask,
-			      const char *path,
-			      va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcDirectory, rcUpdating, rcSelf, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirCreateAlias
- *  creates a path alias according to create mode
- *
- *  "targ" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target alias
- *
- *  "access" [ IN ] - standard Unix directory access mode
- *  used when "mode" has kcmParents set and alias path does
- *  not exist.
- *
- *  "mode" [ IN ] - a creation mode (see explanation above).
- */
-static
-rc_t CC KQuickMountDirCreateAlias (KQuickMountDir *self,
-			 uint32_t access,
-			 KCreateMode mode,
-			 const char *targ,
-			 const char *alias)
-{
-    assert (self != NULL);
-    assert (targ != NULL);
-    assert (alias != NULL);
-
-    return RC (rcFS, rcDirectory, rcCreating, rcSelf, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirOpenFileRead
- *  opens an existing file with read-only access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t CC KQuickMountDirOpenFileRead	(const KQuickMountDir *self,
-					 const KFile **f,
-					 const char *path,
-					 va_list args)
-{
-    return RC (rcFS, rcDirectory, rcOpening, rcSelf, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirOpenFileWrite
- *  opens an existing file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- */
-static
-rc_t CC KQuickMountDirOpenFileWrite	(KQuickMountDir *self,
-					 KFile **f,
-					 bool update,
-					 const char *path,
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (f != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcDirectory, rcCreating, rcSelf, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirCreateFile
- *  opens a file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "mode" [ IN ] - a creation mode (see explanation above).
- */
-static
-rc_t CC KQuickMountDirCreateFile	(KQuickMountDir *self,
-					 KFile **f,
-					 bool update,
-					 uint32_t access,
-					 KCreateMode cmode,
-					 const char *path,
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (f != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcDirectory, rcCreating, rcSelf, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirFileSize
- *  returns size in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "size" [ OUT ] - return parameter for file size
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t CC KQuickMountDirFileSize		(const KQuickMountDir *self,
-					 uint64_t *size,
-					 const char *path,
-					 va_list args)
-{
-    return RC (rcFS, rcDirectory, rcCreating, rcSelf, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirSetFileSize
- *  sets size in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KQuickMountDirSetFileSize	(KQuickMountDir *self,
-					 uint64_t size,
-					 const char *path,
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcDirectory, rcWriting, rcSelf, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirOpenDirRead
- *
- *  opens a sub-directory
- *
- * [IN]  const KQuickMountDir *	self	Object Oriented C KQuickMountDir self
- * [OUT] const KDirectory **	subp	Where to put the new KDirectory/KQuickMountDir
- * [IN]  bool			chroot	Create a chroot cage for this new subdirectory
- * [IN]  const char *		path	Path to the directory to open
- * [IN]  va_list		args	So far the only use of args is possible additions to path
- */
-static 
-rc_t CC KQuickMountDirOpenDirRead	(const KQuickMountDir *self,
-					 const KDirectory **subp,
-					 bool chroot,
-					 const char *path,
-					 va_list args)
-{
-    return RC (rcFS, rcDirectory, rcOpening, rcSelf, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirOpenDirUpdate
- *  opens a sub-directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "chroot" [ IN ] - if non-zero, the new directory becomes
- *  chroot'd and will interpret paths beginning with '/'
- *  relative to itself.
- */
-static
-rc_t CC KQuickMountDirOpenDirUpdate	(KQuickMountDir *self,
-					 KDirectory ** subp, 
-					 bool chroot, 
-					 const char *path, 
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (subp != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcDirectory, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirCreateDir
- *  create a sub-directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "access" [ IN ] - standard Unix directory permissions
- *
- *  "mode" [ IN ] - a creation mode (see explanation above).
- */
-static
-rc_t CC KQuickMountDirCreateDir	(KQuickMountDir *self,
-					 uint32_t access,
-					 KCreateMode mode,
-					 const char *path,
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcDirectory, rcCreating, rcSelf, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * KQuickMountDirDestroyFile
- */
-#if 0
-static
-rc_t CC KQuickMountDirDestroyFile	(KQuickMountDir *self,
-					 KFile * f)
-{
-    assert (self != NULL);
-    assert (f != NULL);
-
-    return RC (rcFS, rcDirectory, rcDestroying, rcSelf, rcUnsupported);
-}
-
-
-static	rc_t CC KQuickMountDirDate (const KQuickMountDir *self,
-					 KTime_t *date,
-					 const char *path,
-					 va_list args)
-{
-    return RC (rcFS, rcDirectory, rcAccessing, rcSelf, rcUnsupported);
-
-}
-
-
-static	rc_t CC KQuickMountDirSetDate		(KQuickMountDir *self,
-					 bool recurse,
-					 KTime_t date,
-					 const char *path,
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcDirectory, rcUpdating, rcSelf, rcUnsupported);
-}
-#endif
-
-/* ----------------------------------------------------------------------
- *
- */
-static KDirectory_vt_v1 vtKQuickMountDir =
-{
-    /* version 1.0 */
-    1, 0,
-
-    /* start minor version 0 methods*/
-    KQuickMountDirDestroy,
-    KQuickMountDirList,
-    KQuickMountDirVisit,
-    KQuickMountDirVisitUpdate,
-    KQuickMountDirPathType,
-    KQuickMountDirResolvePath,
-    KQuickMountDirResolveAlias,
-    KQuickMountDirRename,
-    KQuickMountDirRemove,
-    KQuickMountDirClearDir,
-    KQuickMountDirVAccess,
-    KQuickMountDirSetAccess,
-    KQuickMountDirCreateAlias,
-    KQuickMountDirOpenFileRead,
-    KQuickMountDirOpenFileWrite,
-    KQuickMountDirCreateFile,
-    KQuickMountDirFileSize,
-    KQuickMountDirSetFileSize,
-    KQuickMountDirOpenDirRead,
-    KQuickMountDirOpenDirUpdate,
-    KQuickMountDirCreateDir,
-    NULL,
-    /* end minor version 0 methods*/
-    /* start minor version 1 methods*/
-    NULL,
-    NULL,
-    NULL,
-    /* end minor version 2 methods*/
-    NULL,
-    /* end minor version 2 methods*/
-    /* end minor version 3 methods*/
-    NULL,
-    NULL
-    /* end minor version 3 methods*/
-};
-
-
-static KQuickMountDir * KQuickMountDirAlloc (size_t path_size, size_t mount_size)
-{
-    return calloc (sizeof (KQuickMountDir) + path_size + mount_size + 1, 1);
-}
-
-
-KFS_EXTERN rc_t KQuickMountDirMake (const KDirectory * self, 
-                                    const KDirectory ** pnewdir,
-                                    const KFile * file,
-                                    const char * path, size_t path_size,
-                                    const char * mount, size_t mount_size)
-{
-    KQuickMountDir * newdir;
-    char * pc;
-    rc_t rc;
-    bool endslash;
-    char tbuff [8193];
-
-    endslash = path[path_size-1] == '/';
-
-    if (sizeof tbuff - 1 < mount_size)
-        return RC (rcFS, rcDirectory, rcCreating, rcBuffer, rcInsufficient);
-
-    memcpy (tbuff, mount, mount_size);
-    tbuff[mount_size] = '\0';
-
-    while ((pc = strpbrk (tbuff, "\"\\/")) != NULL)
-        *pc = '_';
-
-    rc = KFileAddRef (file);
-    if (rc == 0)
-    {
-        newdir = KQuickMountDirAlloc (path_size, mount_size);
-        if (newdir == NULL)
-            rc = RC (rcFS, rcDirectory, rcAllocating, rcMemory, rcExhausted);
-        else
-        {
-            newdir->file = file;
-            newdir->mount = newdir->path + path_size;
-            rc = KQuickMountDirMakePath (newdir, rcCreating, true, newdir->path,
-                                         path_size + 1 + mount_size + 1,
-                                         endslash?"%s%s":"%s/%s", path, tbuff);
-            if (rc == 0)
-            {
-                rc = KDirectoryInit (&newdir->dad, (const KDirectory_vt*) &vtKQuickMountDir,
-                                     "KQuickMountDir", path?path:"(null)", false);
-                if (rc == 0)
-                {
-                    newdir->mount = newdir->path + path_size + 1;
-                    newdir->root = 0;
-                    *pnewdir = &newdir->dad;
-                    return 0;
-                }
-/*             rc = RC (rcFS, rcDirectory, rcInitializing, rcObject, rcInvalid); */
-            }
-            KQuickMountDirDestroy (newdir);
-        }
-        KFileRelease (file);
-    }
-    return rc;
-}
-                         
-
-
-/* end of file quickmount.c */
-
diff --git a/libs/kfs/ramfile.c b/libs/kfs/ramfile.c
deleted file mode 100644
index 93f6995..0000000
--- a/libs/kfs/ramfile.c
+++ /dev/null
@@ -1,424 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <kfs/extern.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <kfs/file.h>
-#include <sysalloc.h>
-#include <kfs/ramfile.h>
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* ======================================================================
- * KRamFile
- */
-
-/* -----
- * define the specific types to be used in the templatish/inheritancish
- * definition of vtables and their elements
- */
-#define KFILE_IMPL struct KRamFile
-#include <kfs/impl.h>
-
-/*-----------------------------------------------------------------------
- * KRamFile
- *  A KFile that puts reads and writes into a buffer. The buffer is passed
- *  in so the creator will know where the buffer is.
- */
-struct KRamFile
-{
-    KFile	dad;
-
-    uint64_t pos;
-    uint64_t max_pos;
-    size_t   bsize;
-    size_t   max;
-    char *   buffer;
-};
-
-/* ----------------------------------------------------------------------
- * Destroy
- *
- */
-static
-rc_t CC KRamFileDestroy (KRamFile *self)
-{
-    free (self);
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or RAM if
- *  no such file is available.
- *
- * We cant allow memory mapping a tee file as the read?writes ar needed
- * to trigger the writes to the copy KFile
- */
-
-static
-struct KSysFile *CC KRamFileGetSysFile (const KRamFile *self, uint64_t *offset)
-{
-    /* parameters must be non-RAM */
-    assert (self != NULL);
-    assert (offset != NULL);
-
-    return NULL;
-}
-
-/* ----------------------------------------------------------------------
- * RandomAccess
- *
- *  returns 0 if random access, error code otherwise
- *
- * Update needs to be able to seek both original and copy while read
- * only needs to be able to seek the original.
- */
-static
-rc_t CC KRamFileRandomAccess (const KRamFile *self)
-{
-    assert (self != NULL);
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KRamFileType (const KRamFile *self)
-{
-    return kfdNull;
-}
-
-
-/* ----------------------------------------------------------------------
- * Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KRamFileSize (const KRamFile *self, uint64_t *size)
-{
-    assert (self != NULL);
-    assert (size != NULL);
-
-/*     return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported ); */
-    *size = self->max_pos;
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KRamFileSetSize (KRamFile *self, uint64_t size)
-{
-/*     return RC (rcFS, rcFile, rcUpdating, rcSelf, rcUnsupported); */
-    self->max_pos = size;
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, RAM OKAY ] - optional return parameter
- *  giving number of bytes actually read
- *
- * NOTE: Can not seek;
- *
- */
-static
-rc_t CC KRamFileRead	(const KRamFile *self,
-			 uint64_t pos,
-			 void *buffer,
-			 size_t bsize,
-			 size_t *num_read)
-{
-    assert (self);
-    assert (buffer);
-    assert (num_read);
-    /* no restrictions on pos or bsize */
-
-    if (pos >= self->max_pos)
-    {
-        *num_read = 0;
-        return 0;
-    }
-
-    if (pos + bsize > self->max_pos)
-        bsize = self->max_pos - pos;
-
-    /* if we are trying to read outside the current window */
-    if (self->pos > pos)
-    {
-        /* get some zeros */
-        size_t left_zeroes;
-
-        left_zeroes = self->pos - pos;
-
-        if (left_zeroes >= bsize)
-            left_zeroes = bsize;
-
-        memset (buffer, 0, bsize);
-    }
-    else if (self->pos + self->bsize < pos)
-        memset (buffer, 0, bsize);
-
-    /* so we are inside the current window */
-    else
-    {
-        /* are we trying to go past the window? */
-        if (pos + bsize > self->pos + self->bsize)
-            bsize = (self->pos + self->bsize) - pos;
-
-        memcpy (buffer, self->buffer + (pos - self->pos), bsize);
-    }
-    *num_read = bsize;
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, RAM OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- * Always accepts writes and can seek.
- */
-static
-rc_t CC KRamFileWrite (KRamFile *self, uint64_t pos,
-		       const void *buffer, size_t bsize,
-		       size_t *num_writ)
-{
-    char * to;
-
-    /* can't really fail */
-
-    assert (self);
-    assert (buffer);
-    assert (num_writ);
-
-    /* does the write fill the buffer? */
-    if (bsize >= self->max)
-    {
-        /* we can never allow a write larger than the internal buffer */
-        self->pos = pos;
-        self->bsize = bsize = self->max;
-        to = self->buffer;
-        if (self->max_pos < pos + bsize)
-            self->max_pos = pos + bsize;
-    }
-
-    /* else are we seeking forward or backward to completely new or completely
-     * over writing what is there */
-    else if ((self->bsize == 0) ||                     /* currently no buffer */
-             (pos >= (self->pos + self->max)) || /* past current */
-             (pos + self->max <= self->pos) ||   /* behind current */
-             ((pos <= self->pos) && (pos + bsize >= self->pos + self->bsize)))
-    {
-        /* reset the buffer parameters */
-        self->pos = pos;
-        self->bsize = bsize;
-        if (self->max_pos < pos + bsize)
-            self->max_pos = pos + bsize;
-
-        to = self->buffer;
-        /* clear any unused portion of the buffer */
-        if (self->max > bsize)
-            memset (self->buffer + bsize, 0, self->max - bsize);
-    }
-    else if (pos >= self->pos) 
-    {
-        /* if we are reading something at or after what we have now
-         * where the right edge was doesn't matter since we zero fill
-         * in the previous condition and at construction */
-        /* how far into the buffer will we start */
-        size_t poff = pos - self->pos;
-
-        /* do we have to slide the window? This is not optimized */
-        if ((poff != 0) && (poff + bsize > self->max))
-        {
-            size_t m = poff + bsize - self->max;
-            if (self->bsize < self->max)
-                memset (self->buffer + bsize, 0, self->max = self->bsize);
-            /* must use memmove not memcpy */
-            memmove (self->buffer, self->buffer + poff, self->max - pos);
-
-            poff -= m;
-            self->pos -= m;
-        }
-
-        /* check for a new self->bsize */
-        if (poff + bsize > self->bsize)
-            self->bsize = poff + bsize;
-
-        /* check for a new max position */
-        if (self->max_pos < self->pos + self->bsize)
-            self->max_pos = self->pos + self->bsize;
-
-        to = self->buffer + poff;
-    }
-    else
-    {
-        size_t poff = self->pos - pos;
-
-        /* non optimized slide */
-        memmove (self->buffer + poff, self->buffer, self->max - poff);
-        self->pos = pos;
-        self->bsize += poff;
-        if (self->bsize > self->max)
-            self->bsize = self->max;
-        to = self->buffer;
-    }
-    memcpy (to, buffer, bsize);
-    *num_writ = bsize;
-
-    return 0;
-}
-
-
-static const KFile_vt_v1 vtKRamFile =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KRamFileDestroy,
-    KRamFileGetSysFile,
-    KRamFileRandomAccess,
-    KRamFileSize,
-    KRamFileSetSize,
-    KRamFileRead,
-    KRamFileWrite,
-
-    /* 1.1 */
-    KRamFileType
-};
-
-/* ----------------------------------------------------------------------
- * KRamFileMake
- *  create a new file object
- */
-static
-rc_t KRamFileMake (KRamFile ** pself, char * buffer, size_t buffer_size, bool r, bool w)
-{
-    rc_t	rc;
-    KRamFile *	self;
-
-    /* -----
-     */
-    if (pself == NULL)
-        return RC (rcFS, rcFile, rcConstructing, rcSelf, rcNull);
-
-    if (buffer == NULL)
-        return RC (rcFS, rcFile, rcConstructing, rcParam, rcNull);
-
-    /* we only deny size 0 buffer just to avoid the too weird corner cases */
-    if (buffer_size == 0)
-        return RC (rcFS, rcFile, rcConstructing, rcParam, rcTooShort);
-
-    if (((r != true) && (r != false)) || ((w != true) && (w != false)))
-        return RC (rcFS, rcFile, rcConstructing, rcParam, rcInvalid);
-
-    /* -----
-     * get space for the object
-     */
-    self = malloc (sizeof (*self));
-    if (self == NULL)	/* allocation failed */
-    {
-	/* fail */
-	rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-    }
-    else
-    {
-	rc = KFileInit (&self->dad,			/* initialize base class */
-			(const KFile_vt*)&vtKRamFile, 	/* VTable for KRamFile */
-            "KRamFile", "ram",
-                        r,w);
-	if (rc == 0)
-	{
-            self->pos = self->max_pos = 0;
-            self->max = buffer_size;
-            self->bsize = 0;
-            self->buffer = buffer;
-	    *pself = self;
-	    return 0;
-	}
-	/* fail */
-	free (self);
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KRamFileMakeRead (const KFile ** selfp,char * buffer, size_t buffer_size)
-{
-    KRamFile *self;
-    rc_t rc = KRamFileMake ( & self, buffer, buffer_size, true, false);
-    if ( rc == 0 )
-    {
-        self -> max_pos = buffer_size;
-        self -> bsize = buffer_size;
-        * selfp = & self -> dad;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KRamFileMakeWrite (KFile ** self, char * buffer, size_t buffer_size)
-{
-    return KRamFileMake ((KRamFile **)self, buffer, buffer_size, false, true);
-}
-
-LIB_EXPORT rc_t CC KRamFileMakeUpdate (KFile ** self, char * buffer, size_t buffer_size)
-{
-    return KRamFileMake ((KRamFile **)self, buffer, buffer_size, true, true);
-}
-
-
-/* end of file ramfile.c */
-
diff --git a/libs/kfs/readheadfile.c b/libs/kfs/readheadfile.c
deleted file mode 100644
index 59ab0a5..0000000
--- a/libs/kfs/readheadfile.c
+++ /dev/null
@@ -1,294 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <kfs/extern.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <kfs/file.h>
-#include <kfs/readheadfile.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-/* ======================================================================
- * KReadHeadFile
- */
-
-/* -----
- * define the specific types to be used in the templatish/inheritancish
- * definition of vtables and their elements
- */
-struct KReadHeadFile;
-#define KFILE_IMPL struct KReadHeadFile
-#include <kfs/impl.h>
-
-
-/*-----------------------------------------------------------------------
- * KReadHeadFile
- */
-typedef struct KReadHeadFile
-{
-    KFile	  dad;
-    uint64_t	  max_position;
-    const KFile * original;
-    size_t        buffer_size;
-    uint8_t       buffer [1];
-} KReadHeadFile;
-
-/* ----------------------------------------------------------------------
- * Destroy
- *
- */
-static
-rc_t CC KReadHeadFileDestroy (KReadHeadFile *self)
-{
-    rc_t rc;
-
-    rc = KFileRelease (self->original);
-
-    free (self);
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- *
- * bytes could not be counted if memory mapped so this is disallowed
- */
-
-static
-struct KSysFile *CC KReadHeadFileGetSysFile (const KReadHeadFile *self, uint64_t *offset)
-{
-    /* parameters must be non-NULL */
-    assert (self != NULL);
-    assert (offset != NULL);
-
-    return KFileGetSysFile (self->original, offset);
-}
-
-/* ----------------------------------------------------------------------
- * RandomAccess
- *
- *  returns 0 if random access, error code otherwise
- */
-static
-rc_t CC KReadHeadFileRandomAccess (const KReadHeadFile *self)
-{
-    return KFileRandomAccess (self->original);
-}
-
-/* ----------------------------------------------------------------------
- * Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KReadHeadFileType (const KReadHeadFile *self)
-{
-    return KFileType (self->original);
-}
-
-/* ----------------------------------------------------------------------
- * Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KReadHeadFileSize (const KReadHeadFile *self, uint64_t *size)
-{
-    return KFileSize (self->original, size);
-}
-
-/* ----------------------------------------------------------------------
- * SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KReadHeadFileSetSize (KReadHeadFile *self, uint64_t size)
-{
-    return RC (rcFS, rcFile, rcUpdating, rcFunction, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-rc_t CC KReadHeadFileRead	(const KReadHeadFile *cself,
-				 uint64_t pos,
-				 void *buffer,
-				 size_t bsize,
-				 size_t *num_read)
-{
-    rc_t rc;
-    size_t valid = 0;
-    size_t this_read;
-    KReadHeadFile *self = (KReadHeadFile *)cself;
-    *num_read = 0;
-
-    /* are we re-reading? */
-    if (pos < self->max_position)
-    {
-        size_t valid = self->max_position - pos;
-
-        if (bsize <= valid)
-        {
-            memmove (buffer, self->buffer + pos, bsize);
-            return 0;
-        }
-
-        memmove (buffer, self->buffer + pos, valid);
-    }
-    rc = KFileRead (self->original, pos + valid, (char *)buffer + valid,
-                    bsize - valid, &this_read);
-
-    *num_read = (rc) ? 0 : valid + this_read;
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- * Unsupported as we now treat archives as READ ONLY
- */
-static
-rc_t CC KReadHeadFileWrite (KReadHeadFile *self, uint64_t pos,
-			   const void *buffer, size_t bsize,
-			   size_t *num_writ)
-{
-    assert ( self != NULL );
-    return RC (rcFS, rcFile, rcWriting, rcFunction, rcUnsupported);
-}
-
-static const KFile_vt_v1 vtKReadHeadFile =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KReadHeadFileDestroy,
-    KReadHeadFileGetSysFile,
-    KReadHeadFileRandomAccess,
-    KReadHeadFileSize,
-    KReadHeadFileSetSize,
-    KReadHeadFileRead,
-    KReadHeadFileWrite,
-
-    /* 1.1 */
-    KReadHeadFileType
-};
-
-
-
-/* ----------------------------------------------------------------------
- * KReadHeadFileMake
- *  create a new file object
- */
-
-LIB_EXPORT rc_t CC KFileMakeReadHead (const KFile ** pself,
-                                      const KFile * original,
-                                      size_t buffer_size)
-{
-    rc_t rc;
-
-    if (pself == NULL)
-        return RC (rcFS, rcFile, rcConstructing, rcSelf, rcNull);
-
-    *pself = NULL;
-
-    if (original == NULL)
-        return RC (rcFS, rcFile, rcConstructing, rcParam, rcNull);
-
-    rc = KFileAddRef (original);
-    if (rc)
-        return rc;
-
-    rc = KFileRandomAccess (original);
-
-    /* buffering not needed as existing file is random access */
-    if (rc == 0)
-    {
-        *pself = original;
-        return 0;
-    }
-
-    /* some other failure we'll have to bail on */
-    else if (GetRCState(rc) != rcUnsupported)
-        return rc;
-
-    else
-    {
-        KReadHeadFile * self;
-
-        self = malloc (sizeof (*self) + buffer_size); /* really too much but too hard to tune down accurately */
-        if (self == NULL)
-            return RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-
-	rc = KFileInit (&self->dad,			/* initialize base class */
-			(const KFile_vt*)&vtKReadHeadFile,/* VTable for KReadHeadFile */
-            "KReadHeadFile", "no-name",
-			original->read_enabled,
-			false);
-	if (rc == 0)
-	{
-            self->max_position = 0;
-            self->original = original;
-            self->buffer_size = buffer_size;
-            *pself = &self->dad;
-            return 0;
-	}
-	/* fail */
-	free (self);
-    }
-    return rc;
-}
-
-/* end of file countfile.c */
-
diff --git a/libs/kfs/report.c b/libs/kfs/report.c
deleted file mode 100644
index 4cb3be9..0000000
--- a/libs/kfs/report.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-
-#include <klib/klib-priv.h>
-#include <klib/out.h> /* KOutHandlerSet */
-#include <klib/rc.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h> /* KFileWrite */
-
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdlib.h> /* calloc */
-#include <string.h> /* memset */
-
-#ifndef PATH_MAX
-#define PATH_MAX 4096
-#endif
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
-
-/*
- * An unrecoverable error happened.
- * We can help to solve it
- * by reporting information about known application execution environment.
- */
-
-#define report ( * f -> report )
-#define reportData ( * f -> reportData )
-#define reportData1 ( * f -> reportData1 )
-#define reportOpen ( * f -> reportOpen )
-#define reportOpen1 ( * f -> reportOpen1 )
-#define reportClose ( * f -> reportClose )
-#define reportClose1 ( * f -> reportClose1 )
-#define reportError ( * f -> reportError )
-#define reportErrorStr ( * f -> reportErrorStr )
-#define reportErrorStrImpl ( * f -> reportErrorStrImpl )
-#define reportErrorStrInt ( * f -> reportErrorStrInt )
-#define reportError3Str ( * f -> reportError3Str )
-
-#define MAGIC 0x6521
-
-typedef struct SFile {
-    uint64_t magic;
-    KFile* f;
-    uint64_t pos;
-} SFile;
-
-static rc_t CC fileWriter
-(void* data, const char* buffer, size_t bytes, size_t* num_writ)
-{
-    rc_t rc = 0;
-
-    SFile* self = (SFile*)data;
-    size_t dummy;
-    if (num_writ == NULL)
-    {   num_writ = &dummy; }
-    *num_writ = 0;
-
-    assert(self);
-    if (self->magic != MAGIC) {
-        return rc;
-    }
-
-    rc = KFileWrite(self->f, self->pos, buffer, bytes, num_writ);
-    self->pos += *num_writ;
-
-    return rc;
-}
-
-rc_t CC ReportRedirect
-( KWrtHandler* handler, const char* filename, bool* to_file, bool finalize )
-{
-    rc_t rc = 0;
-    if (!finalize) {
-        if (handler) {
-            handler->writer = KOutWriterGet();
-            handler->data = KOutDataGet();
-        }
-        if (filename) {
-            KDirectory* dir = NULL;
-            SFile* data = calloc(1, sizeof *data);
-            if (data == NULL) {
-                return RC(rcFS, rcMemory, rcAllocating, rcMemory, rcExhausted);
-            }
-            data->magic = MAGIC;
-            rc = KDirectoryNativeDir(&dir);
-            if (rc == 0) {
-                rc = KDirectoryCreateFile
-                    (dir, &data->f, false, 0664, kcmInit, "%s", filename);
-            }
-            if (rc == 0) {
-                rc = KOutHandlerSet(fileWriter, data);
-            }
-            RELEASE(KDirectory, dir);
-        }
-        if (rc != 0 || filename == NULL) {
-            KOutHandlerSetStdErr();
-            if (to_file)
-            {   *to_file = false; }
-        }
-        else if (to_file)
-        {   *to_file = true; }
-
-    }
-    else {
-        void* data = KOutDataGet();
-        SFile* self = (SFile*)data;
-        if (self) {
-            if (self->magic == MAGIC) {
-                RELEASE(KFile, self->f);;
-            }
-            memset(self, 0, sizeof *self);
-            free(self);
-        }
-        if (handler) {
-            KOutHandlerSet(handler->writer, handler->data);
-        }
-    }
-    return rc;
-}
-
-rc_t CC ReportCWD ( const ReportFuncs *f, uint32_t indent )
-{
-    KDirectory *wd;
-    rc_t rc = KDirectoryNativeDir ( & wd );
-    if ( rc != 0 )
-        reportError(indent, rc, "KDirectoryNativeDir");
-    else
-    {
-        char cwd [ PATH_MAX + 1 ];
-        rc = KDirectoryResolvePath ( wd, true, cwd, sizeof cwd, "." );
-        KDirectoryRelease ( wd );
-
-        if ( rc != 0 )
-            reportError(indent, rc, "KDirectoryResolvePath");
-        else
-            reportData(indent, "Cwd", cwd, 0);
-    }
-
-    return rc;
-}
diff --git a/libs/kfs/sra.c b/libs/kfs/sra.c
deleted file mode 100644
index f237505..0000000
--- a/libs/kfs/sra.c
+++ /dev/null
@@ -1,486 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <kfs/extern.h>
-
-#include <klib/defs.h>
-#include <byteswap.h>
-#include <klib/rc.h>
-#include <kfs/file.h>
-#include <kfs/sra.h>
-/* #include <kfs/toc.h> */
-#include <klib/log.h>
-#include "toc-priv.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <sysalloc.h>
-
-
-struct KToc;
-struct KDirectory;
-
-
-
-static
-const KSraHeader ksraheader_v1 =
-{
-    { 'N', 'C','B', 'I' },
-    { '.', 's','r', 'a' },
-    eSraByteOrderTag,
-    1
-};
-
-LIB_EXPORT size_t CC SraHeaderSize ( const KSraHeader * self )
-{
-    /* self can be NULL */
-    return sizeof ( KSraHeader );
-}
-
-static
-uint64_t add_filler (uint64_t z, KSRAFileAlignment a)
-{
-    if (a > 1)
-    {
-        uint64_t m = (uint64_t)a - 1;
-        return (z + m) & ~ m;
-    }
-    return z;
-}
-
-static void	SraHeaderInit (KSraHeader * self, size_t treesize, KSRAFileAlignment alignment)
-{
-    memcpy (self, &ksraheader_v1, sizeof ksraheader_v1);
-    self->u.v1.file_offset = add_filler (sizeof * self + treesize, alignment);
-}
-
-rc_t SraHeaderMake (KSraHeader ** pself, size_t treesize, KSRAFileAlignment alignment)
-{
-    KSraHeader * self = malloc (sizeof (KSraHeader));
-    if (self == NULL)
-	return RC ( rcFS, rcToc, rcConstructing, rcMemory, rcExhausted );
-    SraHeaderInit (self, treesize, alignment);
-    *pself = self;
-    return 0;
-}
-
-
-static rc_t  SraHeaderValidate ( const KSraHeader * self, bool * reverse, uint32_t * _version, size_t bytes_available )
-{
-    uint64_t offset;
-    rc_t rc;
-    uint32_t version;
-    bool rev;
-
-    if (reverse != NULL)
-	*reverse = false;
-    if (_version != NULL)
-	*_version = 0;
-
-    if (bytes_available < 8)
-        return RC (rcFS, rcArc, rcParsing, rcHeader, rcInsufficient);
-
-    if (memcmp ((void*)self, &ksraheader_v1,
-		sizeof (ksraheader_v1.ncbi) + sizeof (ksraheader_v1.sra)) != 0)
-	return RC (rcFS, rcArc, rcParsing, rcHeader, rcInvalid);
-
-    if (bytes_available < 12)
-        return 0;
-
-    switch (self->byte_order)
-    {
-    default:
-	return RC (rcFS, rcArc, rcParsing, rcHeader, rcCorrupt);
-    case eSraByteOrderTag:
-	rev = false;
-	break;
-    case eSraByteOrderReverse:
-	rev = true;
-	break;
-    }
-    rc = 0;
-
-    if (bytes_available < 16)
-        return 0;
-
-    version = rev ? bswap_32 (self->version) : self->version;
-    offset = rev ? bswap_64 (self->u.v1.file_offset) : self->u.v1.file_offset;
-
-    if (version > FS_SRA_CUR_VERSION)
-	rc =  RC (rcFS, rcArc, rcParsing, rcHeader, rcUnsupported);
-
-    /* 4 is minimum size for a TOC */
-    else if (offset < (sizeof ksraheader_v1 + 4))
-	return RC (rcFS, rcArc, rcParsing, rcHeader, rcCorrupt);
-
-    if (reverse != NULL)
-	*reverse = rev;
-    if (_version != NULL)
-	*_version = version;
-
-    return rc;
-}
-
-LIB_EXPORT uint64_t CC SraHeaderGetFileOffset ( const KSraHeader * self )
-{
-    if ( self -> byte_order == eSraByteOrderReverse )
-        return bswap_64 ( self->u.v1.file_offset );
-    return self->u.v1.file_offset;
-}
-
-static
-rc_t KTocParseRead (const KFile * f, uint64_t p, void * b, size_t z, size_t * n)
-{
-    rc_t rc;
-    size_t a;
-    size_t t;
-
-    rc = 0;
-    for (a = 0; a < z; a += t)
-    {
-	rc = KFileRead (f, p + a, (uint8_t*)b + a, z - a, &t);
-	if (rc != 0)
-	    return rc;
-	if (t == 0)
-	    break;
-    }
-    if (a < z)
-	rc = RC (rcFS, rcToc, rcParsing, rcFile, rcTooShort);
-    *n = a;
-    return rc;
-}
-
-
-static
-rc_t KTocParseReadPBSTree (struct KToc * self, const KFile * file, uint64_t endpos, void ** header)
-{
-    rc_t rc;
-    uint64_t toc_pos;
-    uint64_t end_pos;
-    size_t num_read;
-    size_t tree_size;
-
-    rc = 0;
-    toc_pos = SraHeaderSize(NULL);
-    end_pos = endpos;
-
-    if (end_pos <= toc_pos)
-    {
-        /* 	rc = RC (rcFS, rcToc, rc */
-    }
-    tree_size = (size_t)(end_pos - toc_pos);
-
-    *header = malloc (tree_size);
-    if (*header == NULL)
-    {
-        rc = RC (rcFS, rcToc, rcParsing, rcMemory, rcExhausted);
-    }
-    else
-    {
-        rc = KTocParseRead (file, toc_pos, *header, tree_size, &num_read);
-        if (rc == 0)
-        {
-            return 0;
-        }
-        free (*header);
-        *header = NULL;
-    }
-    return rc;
-}
-
-static
-rc_t CC KArcParseSRAInt ( struct KToc * self,
-                          const void * kvoid,
-                          bool ( CC * ignored ) ( const struct KDirectory *,  const char *, void * ),
-                          void * ignored_data, 
-                          bool unbounded,
-                          bool silent )
-{
-    uint64_t arcsize;
-    rc_t rc;
-    bool reverse;
-    uint32_t version;
-    KSraHeader header;
-    size_t num_read;
-    size_t all_read;
-    const KFile * file;
-    void * pbstreeBuffer;
-    /*     uint64_t toc_offset; */
-    /*     uint64_t file_offset; */
-
-    rc = 0;
-    if ( kvoid == NULL )
-    {
-        rc = RC ( rcFS, rcToc, rcParsing, rcParam, rcNull );
-        if ( !silent )
-            LOGERR ( klogErr, rc, "File parameter null for parsing .sra" );
-        return rc;
-    }
-    file = kvoid;
-
-    rc = KFileSize ( file, &arcsize );
-    if (rc)
-    {
-        if ( unbounded )
-            arcsize = ( (uint64_t)0 ) - 1;
-        else
-        {
-            rc = RC ( rcFS, rcToc, rcParsing, rcFile, rcIncorrect );
-            if ( !silent )
-                LOGERR ( klogErr, rc, "Can't determine archive file size" );
-            return rc;
-        }
-    }
-
-    for ( num_read = all_read = 0; all_read < sizeof (header); all_read += num_read )
-    {
-        rc = KTocParseRead ( file, 0, &header, sizeof (header), &num_read );
-        if ( num_read == 0 )
-        {
-            rc = RC ( rcFS, rcToc, rcParsing, rcFile, rcTooShort );
-            break;
-        }
-    }
-    if ( rc != 0 )
-    {
-        if ( !silent )
-            LOGERR ( klogErr, rc, "error reading file to parse .sra" );
-        return rc;
-    }
-
-    /* version is ignored at this point as there is only one version */
-    rc = SraHeaderValidate ( &header, &reverse, &version, sizeof header );
-    if ( rc != 0 )
-    {
-        if ( !silent )
-            LOGERR ( klogErr, rc, "File header invalid for .sra header" );
-        return rc;
-    }
-
-    switch ( version )
-    {
-    default:
-        rc = RC ( rcFS, rcToc, rcParsing, rcFileFormat, rcBadVersion );
-        if ( !silent )
-            LOGERR ( klogInt, rc, "Incompatible file version" );
-        break;
-    case 1:
-        rc = KTocParseReadPBSTree ( self, file, SraHeaderGetFileOffset (&header),
-                                   &pbstreeBuffer );
-        if ( rc != 0 )
-        {
-            if ( !silent )
-                LOGERR ( klogErr, rc, "File TOC not read for .sra header" );
-            break;
-        }
-        else
-        {
-            uint64_t offset;
-            offset = SraHeaderGetFileOffset (&header);
-            rc = KTocInflatePBSTree ( self, arcsize, pbstreeBuffer, 
-                                     (uint32_t)(offset - sizeof (header)),
-                                     offset,
-                                     reverse, "" );
-            free ( pbstreeBuffer );
-            if ( rc != 0 && !silent )
-            {
-                LOGERR (klogErr, rc, "File TOC not valid for .sra");
-            }
-            /* 	    else */
-            /* 	    { */
-            /* 		rc = KTocParseSraDirectory (self, bst, ""); */
-            /* 		if (rc == 0) */
-            /* 		    return 0; */
-            /* 	    } */
-        }
-        break;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KArcParseSRA ( struct KToc * self,
-                                  const void * kvoid,
-                                  bool (CC*ignored) (const struct KDirectory*,  const char*, void*),
-                                  void *ignored_data )
-{
-    return KArcParseSRAInt ( self, kvoid, ignored, ignored_data, false, false );
-}
-
-
-LIB_EXPORT rc_t CC KArcParseSRA_silent ( struct KToc * self,
-                                  const void * kvoid,
-                                  bool (CC*ignored) (const struct KDirectory*,  const char*, void*),
-                                  void *ignored_data )
-{
-    return KArcParseSRAInt ( self, kvoid, ignored, ignored_data, false, true );
-}
-
-LIB_EXPORT rc_t CC KArcParseSRAUnbounded ( struct KToc * self,
-                                  const void * kvoid,
-                                  bool (CC*ignored) (const struct KDirectory*,  const char*, void*),
-                                  void *ignored_data )
-{
-    return KArcParseSRAInt ( self, kvoid, ignored, ignored_data, true, false );
-}
-
-LIB_EXPORT rc_t CC KArcParseSRAUnbounded_silent ( struct KToc * self,
-                                  const void * kvoid,
-                                  bool (CC*ignored) (const struct KDirectory*,  const char*, void*),
-                                  void *ignored_data )
-{
-    return KArcParseSRAInt ( self, kvoid, ignored, ignored_data, true, false );
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryVOpenSraArchiveRead ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const char *path, va_list args )
-{
-    /* respond properly to va_list */
-    char full [ 4096 ];
-    int len = vsnprintf ( full, sizeof full, path, args );
-    if ( len < 0 )
-        return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcExcessive );
-
-    /* putting off parameter validation into this call */
-    return KDirectoryOpenArcDirRead (self, sra_dir, chroot, full, tocKFile,
-                                     KArcParseSRA, NULL, NULL);
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryOpenSraArchiveRead ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVOpenSraArchiveRead ( self, sra_dir, chroot, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryVOpenSraArchiveRead_silent ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const char *path, va_list args )
-{
-    /* respond properly to va_list */
-    char full [ 4096 ];
-    int len = vsnprintf ( full, sizeof full, path, args );
-    if ( len < 0 )
-        return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcExcessive );
-
-    /* putting off parameter validation into this call */
-    return KDirectoryOpenArcDirRead_silent ( self, sra_dir, false, full, tocKFile,
-                                     KArcParseSRA_silent, NULL, NULL );
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryOpenSraArchiveRead_silent ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVOpenSraArchiveRead_silent ( self, sra_dir, chroot, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryVOpenSraArchiveReadUnbounded_silent_preopened ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const struct KFile * f, const char *path, va_list args )
-{
-    /* respond properly to va_list */
-    char full [ 4096 ];
-    int len = vsnprintf ( full, sizeof full, path, args );
-    if ( len < 0 || len >= sizeof full )
-        return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcExcessive );
-
-    /* putting off parameter validation into this call */
-    return KDirectoryOpenArcDirRead_silent_preopened ( self, sra_dir, false, full, tocKFile,
-        ( void* ) f, KArcParseSRAUnbounded_silent, NULL, NULL );
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryOpenSraArchiveReadUnbounded_silent_preopened ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const struct KFile * f, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVOpenSraArchiveReadUnbounded_silent_preopened ( self, sra_dir, chroot, f, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryVOpenSraArchiveReadUnbounded ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const char *path, va_list args )
-{
-    /* respond properly to va_list */
-    char full [ 4096 ];
-    int len = vsnprintf ( full, sizeof full, path, args );
-    if ( len < 0 )
-        return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcExcessive );
-
-    /* putting off parameter validation into this call */
-    return KDirectoryOpenArcDirRead (self, sra_dir, false, full, tocKFile,
-                                     KArcParseSRAUnbounded, NULL, NULL);
-}
-
-
-LIB_EXPORT rc_t CC KDirectoryOpenSraArchiveReadUnbounded ( struct KDirectory const *self,
-    struct KDirectory const **sra_dir, int chroot, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVOpenSraArchiveReadUnbounded (self, sra_dir, chroot, path, args);
-    va_end ( args );
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KFileIsSRA (const char * b, size_t z)
-{
-    const KSraHeader * h = (const KSraHeader *)b;
-
-    if (SraHeaderValidate (h, NULL, NULL, z) == 0)
-        return 0;
-    
-    return RC (rcFS, rcFile, rcIdentifying, rcBuffer, rcWrongType);
-}
-
-/* end of file */
diff --git a/libs/kfs/subfile.c b/libs/kfs/subfile.c
deleted file mode 100644
index 4a3525d..0000000
--- a/libs/kfs/subfile.c
+++ /dev/null
@@ -1,337 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <kfs/extern.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <kfs/file.h>
-#include <kfs/subfile.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdlib.h>
-
-/* ======================================================================
- * KSubFile
- *  a file inside an archive
- */
-
-/* -----
- * define the specific types to be used in the templatish/inheritancish
- * definition of vtables and their elements
- */
-#define KFILE_IMPL struct KSubFile
-#include <kfs/impl.h>
-
-static rc_t CC KSubFileDestroy (KSubFile *self);
-static struct KSysFile *CC KSubFileGetSysFile (const KSubFile *self,
-					    uint64_t *offset);
-static rc_t CC KSubFileRandomAccess (const KSubFile *self);
-static uint32_t CC KSubFileType (const KSubFile *self);
-static rc_t CC KSubFileSize (const KSubFile *self, uint64_t *size);
-static rc_t CC KSubFileSetSize (KSubFile *self, uint64_t size);
-static rc_t CC KSubFileRead (const KSubFile *self, uint64_t pos,
-			  void *buffer, size_t bsize, size_t *num_read);
-static rc_t CC KSubFileWrite (KSubFile *self, uint64_t pos, const void *buffer,
-			   size_t size, size_t *num_writ);
-
-
-static const KFile_vt_v1 vtKSubFile =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KSubFileDestroy,
-    KSubFileGetSysFile,
-    KSubFileRandomAccess,
-    KSubFileSize,
-    KSubFileSetSize,
-    KSubFileRead,
-    KSubFileWrite,
-
-    /* 1.1 */
-    KSubFileType
-};
-
-/*-----------------------------------------------------------------------
- * KSubFile
- *  an archive file including tar and sra
- */
-struct KSubFile
-{
-    KFile	dad;
-    uint64_t	start;
-    uint64_t	size;
-    KFile *	original;
-};
-
-/* ----------------------------------------------------------------------
- * KSubFileMake
- *  create a new file object
- */
-
-static
-rc_t KSubFileMake (KSubFile ** self,
-		   KFile * original,
-		   uint64_t start,
-		   uint64_t size,
-		   bool read_enabled,
-		   bool write_enabled)
-{
-    rc_t	rc;
-    KSubFile *	pF;
-
-    /* -----
-     */
-    assert (self != NULL);
-    assert (original != NULL);
-/*     assert (start >= size); */
-
-    /* -----
-     * the enables should be true or false
-     */
-    assert ((read_enabled == true)||(read_enabled == false));
-    assert ((write_enabled == true)||(write_enabled == false));
-
-    /* -----
-     * get space for the object
-     */
-    pF = malloc (sizeof (KSubFile));
-    if (pF == NULL)	/* allocation failed */
-    {
-        /* fail */
-        rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-    }
-    else
-    {
-        rc = KFileInit (&pF->dad,			/* initialize base class */
-            (const KFile_vt*)&vtKSubFile, 	/* VTable for KSubFile */
-            "KSubFile", "no-name",
-                        read_enabled,		/* read allowed */
-                        write_enabled);		/* write disallowed */
-	if (rc == 0)
-	{
-	    KFileAddRef (original);
-	    /* succeed */
-	    pF->original = original;
-	    pF->start = start;
-	    pF->size = size;
-	    *self = pF;
-	    return 0;
-	}
-	/* fail */
-	free (pF);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KFileMakeSubRead (const KFile ** self, const KFile * original, uint64_t start, uint64_t size)
-{
-    return KSubFileMake ((KSubFile **)self, (KFile*)original, start, size,
-			 true, false);
-}
-
-LIB_EXPORT rc_t CC KFileMakeSubUpdate (KFile ** self, KFile * original, uint64_t start, uint64_t size)
-{
-    return KSubFileMake ((KSubFile **)self, original, start, size,
-			 true, true);
-}
-
-/* ----------------------------------------------------------------------
- * Destroy
- *
- */
-static
-rc_t CC KSubFileDestroy (KSubFile *self)
-{
-    assert (self != NULL);
-    KFileRelease (self->original);
-    free (self);
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- *
- * We cant allow memory mapping a tee file as the read?writes ar needed
- * to trigger the writes to the copy KFile
- */
-
-static
-struct KSysFile *CC KSubFileGetSysFile (const KSubFile *self, uint64_t *offset)
-{
-    /* parameters must be non-NULL */
-    assert (self != NULL);
-    assert (offset != NULL);
-
-    /* not implmenting at this time */
-    return NULL;
-}
-
-/* ----------------------------------------------------------------------
- * RandomAccess
- *
- *  returns 0 if random access, error code otherwise
- *
- * Update needs to be able to seek both original and copy while read
- * only needs to be able to seek the original.
- */
-static
-rc_t CC KSubFileRandomAccess (const KSubFile *self)
-{
-    assert (self != NULL);
-    return KFileRandomAccess (self->original);
-}
-
-/* ----------------------------------------------------------------------
- * Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KSubFileType (const KSubFile *self)
-{
-    return KFileType (self->original);
-}
-
-
-/* ----------------------------------------------------------------------
- * Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KSubFileSize (const KSubFile *self, uint64_t *size)
-{
-    assert (self != NULL);
-    assert (size != NULL);
-
-    *size = self->size;
-
-    return 0;;
-}
-
-/* ----------------------------------------------------------------------
- * SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KSubFileSetSize (KSubFile *self, uint64_t size)
-{
-    return RC (rcFS, rcFile, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-rc_t CC KSubFileRead	(const KSubFile *self,
-			 uint64_t pos,
-			 void *buffer,
-			 size_t bsize,
-			 size_t *num_read)
-{
-    size_t	request;
-    rc_t	rc;
-
-
-    /* -----
-     * self and buffer were validated as not NULL before calling here
-     *
-     * So get the KTTOCNode type: chunked files and contiguous files 
-     * are read differently.
-     */
-    assert (self != NULL);
-    assert (buffer != NULL);
-    assert (num_read != NULL);
-
-    *num_read = 0;
-    if (pos >= self->size)
-    {
-	return 0;
-    }
-    if ((pos + bsize) <= self->size)
-	request = bsize;
-    else
-	request = (size_t)(self->size - pos);
-
-    rc = KFileRead (self->original, self->start + pos, buffer, request, num_read);
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- * Unsupported as we now treat archives as READ ONLY
- */
-static
-rc_t CC KSubFileWrite (KSubFile *self, uint64_t pos,
-		       const void *buffer, size_t bsize,
-		       size_t *num_writ)
-{
-    size_t to_write;
-
-    assert (self != NULL);
-    assert (buffer != NULL);
-    assert (num_writ != NULL);
-
-    *num_writ = 0;
-    if (pos >= ( uint64_t ) self->size)
-        return 0;
-
-    to_write = bsize;
-    if ((pos + bsize) > self->size)
-        to_write = ( uint64_t ) self -> size - pos;
-
-    return KFileWrite (self->original, self->start + pos, buffer, to_write, num_writ);
-}
-
-/* end of file subfile.c */
-
diff --git a/libs/kfs/szip.c b/libs/kfs/szip.c
deleted file mode 100644
index 59cc74a..0000000
--- a/libs/kfs/szip.c
+++ /dev/null
@@ -1,575 +0,0 @@
-/*=======================================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-struct KSZipFile;
-#define KFILE_IMPL struct KSZipFile
-
-#include <kfs/extern.h>
-#include <kfs/impl.h>  /* KFile_vt_v1 */
-#include <kfs/szip.h>  /* KFileMakeSzipFor... */
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-
-#include <ext/szlib.h>      /* sz_stream */
-
-#include <assert.h>
-#include <stdlib.h>    /* malloc */
-
-#ifdef _DEBUGGING
-#define SZIP_DEBUG(msg) DBGMSG(DBG_KFS,DBG_FLAG(DBG_KFS_GZIP), msg)
-#else
-#define SZIP_DEBUG(msg)
-#endif
-
-/***************************************************************************************/
-/* Szip File                                                                     */
-/***************************************************************************************/
-
-#define SZFCHUNK 0x20000    /* 128K */
-/** Szip KFile structure */
-struct KSZipFile {
-    KFile dad;
-    KFile *file; /* inderlying KFile */
-    uint64_t filePosition;
-    uint64_t myPosition;
-    sz_stream strm;
-    unsigned char buff[ SZFCHUNK ]; /* buffer to cache KFile data */
-    bool completed;
-};
-typedef struct KSZipFile KSZipFile;
-
-/* virtual functions declarations (definitions for unsupported ) ***********************/
-
-static struct KSysFile *CC s_GetSysFile(const KSZipFile *self,
-    uint64_t *offset)
-{ return NULL; }
-
-static rc_t CC s_FileRandomAccess(const KSZipFile *self)
-{ return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported ); }
-
-static uint32_t CC s_FileType ( const KSZipFile *self )
-{ return KFileType ( self -> file ); }
-
-static rc_t CC s_FileSize(const KSZipFile *self, uint64_t *size)
-{ return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported ); }
-
-static rc_t CC s_FileSetSize(KSZipFile *self,
-    uint64_t size)
-{ return RC ( rcFS, rcFile, rcUpdating, rcFunction, rcUnsupported ); }
-
-/* read-only methods *******************************************************************/
-
-static rc_t CC KSZipFile_InDestroy ( KSZipFile *self );
-
-static rc_t CC KSZipFile_InRead ( const KSZipFile *cself,
-    uint64_t pos,
-    void *buffer,
-    size_t bsize,
-    size_t *num_read );
-
-static rc_t CC KSZipFile_InWrite ( KSZipFile *self,
-    uint64_t pos,
-    const void *buffer,
-    size_t size,
-    size_t *num_writ )
-{ return RC ( rcFS, rcFile, rcWriting, rcFunction, rcUnsupported ); }
-
-/** virtual table **********************************************************************/
-static KFile_vt_v1 s_vtKFile_InSz = {
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KSZipFile_InDestroy,
-    s_GetSysFile,
-    s_FileRandomAccess,
-    s_FileSize,
-    s_FileSetSize,
-    KSZipFile_InRead,
-    KSZipFile_InWrite,
-
-    /* 1.1 */
-    s_FileType
-};
-
-#define WINDOW_BITS (15 + 16)
-
-/** Factory method definition **********************************************************/
-
-LIB_EXPORT rc_t CC KFileMakeSzipForRead( const struct KFile **result,
-    const struct KFile *file )
-{
-    rc_t rc;
-    sz_stream* strm;
-    KSZipFile *obj;
-
-    if ( result == NULL || file == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-
-    obj = ( KSZipFile* ) malloc( sizeof( KSZipFile ) );
-    if ( !obj )
-        return RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-
-    rc = KFileInit( &obj->dad, (const KFile_vt*) &s_vtKFile_InSz, true, false );
-    if ( rc != 0 ) {
-        free( obj );
-        return rc;
-    }
-
-    strm = &obj->strm;
-    strm->avail_in = 0;
-    strm->next_in  = SZ_NULL;
-
-    /* TBD - this should check gzlib error codes */
-    if ( SZ_DecompressInit( strm ) != SZ_OK ) {
-        free( obj );
-        return RC ( rcFS, rcFile, rcConstructing, rcNoObj, rcUnknown );
-    }
-
-        obj->myPosition   = 0;
-        obj->filePosition = 0;
-
-    rc = KFileAddRef( file );
-    if ( rc != 0 )
-    {
-        obj->file = NULL;
-        KSZipFile_InDestroy ( obj );
-    }
-    else
-    {
-        obj->file = (KFile*) file;
-        *result = &obj->dad;
-    }
-
-    return rc;
-}
-
-/* private functions declarations ******************************************************/
-
-static rc_t s_read ( KSZipFile * self, void * buffer, size_t bsize, size_t * num_read );
-static rc_t s_skip ( KSZipFile *self, uint64_t pos );
-
-/* virtual functions definitions *******************************************************/
-
-static rc_t CC KSZipFile_InDestroy( KSZipFile *self ) {
-    rc_t rc = KFileRelease( self->file );
-    if ( rc == 0 ) {
-        SZ_DecompressEnd( &self->strm );
-        free( self );
-    }
-    return rc;
-}
-
-static rc_t CC KSZipFile_InRead( const KSZipFile *cself,
-    uint64_t pos,
-    void *buffer,
-    size_t bsize,
-    size_t *num_read )
-{
-    KSZipFile *self = (KSZipFile*) cself;
-    rc_t rc = 0;
-
-    size_t numRead = 0, ignore;
-    if ( num_read == NULL )
-        num_read = &ignore;
-
-    *num_read = 0;
-
-    if ( !cself || !buffer )
-        return RC ( rcFS, rcFile, rcReading, rcParam, rcNull );
-
-    if ( !bsize )
-        return 0;
-
-    if ( pos < self->myPosition )
-        return RC ( rcFS, rcFile, rcReading, rcParam, rcInvalid );
-
-    SZIP_DEBUG(( "%s: pos %lu bsize %zu\n", __func__, pos, bsize ));
-
-    if ( pos > self->myPosition )
-    {
-    rc =  s_skip ( self, pos );
-    if ( rc != 0 )
-        return rc;
-    if ( pos != self->myPosition )
-        return 0;
-    }
-
-    rc = s_read ( self, buffer, bsize, &numRead );
-    if ( rc != 0 )
-        return rc;
-
-    *num_read = numRead;
-
-    self->myPosition += numRead;
-
-    return 0;
-}
-
-/* private functions definitions *******************************************************/
-
-static rc_t s_read ( KSZipFile * self, void * buffer, size_t bsize, size_t * _num_read )
-{
-    rc_t rc = 0;
-    size_t num_read = 0;
-
-    SZIP_DEBUG(( "%s: Enter\n", __func__ ));
-
-    for ( num_read = 0; num_read  == 0; )
-    {
-        sz_stream * strm = &self->strm;
-        size_t src_read;
-        int sret;
-        
-        strm->next_out = buffer;
-        strm->next_out += num_read;
-        strm->avail_out = bsize;
-
-        SZIP_DEBUG (( "%s: call inflate\n", __func__ ));
-
-        SZIP_DEBUG (( "%s: next_in %14p avail_in %6u total_in %10lu next_out %14p avail_out %6u total_out %10lu\n",
-                     __func__, strm->next_in, strm->avail_in, strm->total_in,
-                     strm->next_out, strm->avail_out, strm->total_out ));
-
-        sret = SZ_Decompress ( strm, SZ_NO_FLUSH );
-
-        SZIP_DEBUG (( "%s: next_in %14p avail_in %6u total_in %10lu next_out %14p avail_out %6u total_out %10lu\n",
-                     __func__, strm->next_in, strm->avail_in, strm->total_in,
-                     strm->next_out, strm->avail_out, strm->total_out ));
-
-        num_read = bsize - strm->avail_out;
-
-        switch ( sret )
-        {
-            /* unexpected error returns from slib */
-        default:
-        /* no equivalent in szlib.h
-        case Z_ERRNO:
-            SZIP_DEBUG (( "%s: unknown error %d\n",__func__, sret ));
-            return RC ( rcFS, rcFile, rcReading, rcFile, rcUnknown );
-        */
-
-        /* known unfixable errors */
-        case SZ_STREAM_ERROR:
-            SZIP_DEBUG (( "%s: stream error %d\n",__func__, sret ));
-            return RC ( rcFS, rcFile, rcReading, rcSelf, rcCorrupt );
-
-            /* don't handle these yet */
-        case SZ_STREAM_END:
-            SZIP_DEBUG (( "%s: stream end %d\n", __func__, sret ));
-            do
-            {
-                rc_t rc_2;
-                uint8_t junkbuff[4096];
-
-                rc_2 = KFileRead ( self->file, self->filePosition,
-                                   junkbuff, sizeof (junkbuff), &src_read );
-                if ( rc_2 != 0 )
-                {
-                    rc = rc_2;
-                    break;
-                }
-                if ( ( ( rc == 0 ) && ( src_read != 0 ) ) || ( strm->avail_in > 0 ) )
-                    rc = RC ( rcFS, rcFile, rcReading, rcData, rcExcessive );
-            } while ( src_read );
-            goto done;
-
-            break;
-
-        case SZ_MEM_ERROR:
-            SZIP_DEBUG (( "%s: mem error %d\n", __func__, sret ));
-            if ( strm->avail_out > 0 )
-            {
-                rc = KFileRead ( self->file, self->filePosition, 
-                                 self->buff, sizeof (self->buff), &src_read );
-                if ( rc != 0 )
-                    break;
-
-                strm->avail_in = src_read;
-                self->filePosition += src_read;
-                strm->next_in = (char*)self->buff;
-
-                /* this is either a truncated file or a blocked stream
-                 * code outside of here has to handle it */
-                if ( ( src_read == 0 ) && ( sret == SZ_MEM_ERROR ) )
-                {
-                    SZIP_DEBUG (( "%s: truncated input\n", __func__ ));
-                    rc = RC ( rcFS, rcFile, rcReading, rcData, rcInsufficient );
-                    break;
-                }
-
-            }
-            break;
-        case SZ_OK:
-            break;
-        }
-        if ( rc != 0 )
-            break;
-    }
-done:
-    *_num_read = num_read;
-    return rc;
-}
-
-
-static rc_t s_skip ( KSZipFile *self, uint64_t pos )
-{
-    rc_t rc = 0;
-    size_t num_read = 0; /* superfluous to quiet compiler */
-    size_t to_read;
-    uint8_t buff [ 32 * 1024 ];
-
-    SZIP_DEBUG (( "%s: enter pos %lu\n", __func__, pos ));
-
-    for ( to_read = sizeof buff; self -> myPosition < pos; self -> myPosition += num_read )
-    {
-    if ( self->myPosition + sizeof buff > pos )
-        to_read = pos - self->myPosition;
-
-    SZIP_DEBUG (( "%s: call z_read to_read %zu \n", __func__ ));
-
-    rc = s_read ( self, buff, to_read, &num_read );
-
-    SZIP_DEBUG (( "%s: return z_read num_read %zu \n", __func__ ));
-
-    if ( rc != 0 )
-        break;
-
-    if ( num_read == 0 )
-        break;
-    }
-    return rc;
-}
-
-/***************************************************************************************/
-/* Szip Output File                                                                    */
-/***************************************************************************************/
-
-/* write-only methods ******************************************************************/
-
-static rc_t CC KSZipFile_OutDestroy( KSZipFile *self );
-
-static rc_t CC KSZipFile_OutRead( const KSZipFile *cself,
-    uint64_t pos,
-    void *buffer,
-    size_t bsize,
-    size_t *num_read )
-{ return RC ( rcFS, rcFile, rcReading, rcFunction, rcUnsupported ); }
-
-static rc_t CC KSZipFile_OutWrite( KSZipFile *self,
-    uint64_t pos,
-    const void *buffer,
-    size_t bsize,
-    size_t *num_writ );
-
-/** virtual table **********************************************************************/
-static KFile_vt_v1 s_vtKFile_OutSz = {
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KSZipFile_OutDestroy,
-    s_GetSysFile,
-    s_FileRandomAccess,
-    s_FileSize,
-    s_FileSetSize,
-    KSZipFile_OutRead,
-    KSZipFile_OutWrite,
-
-    /* 1.1 */
-    s_FileType
-};
-
-/** Factory method definition **********************************************************/
-LIB_EXPORT rc_t CC KFileMakeSzipForWrite( struct KFile **result,
-    struct KFile *file )
-{
-    rc_t rc;
-    sz_stream* strm;
-    KSZipFile *obj;
-
-    if ( result == NULL || file == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcParam, rcNull );
-
-    obj = ( KSZipFile* ) malloc( sizeof( KSZipFile ) );
-    if ( obj == NULL )
-        return RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-
-    rc = KFileInit( &obj->dad, (const KFile_vt*) &s_vtKFile_OutSz, false, true );
-    if ( rc != 0 ) {
-        free( obj );
-        return rc;
-    }
-
-    strm = &obj->strm;
-    strm->avail_in = 0;
-    strm->next_in  = SZ_NULL;
-    strm->total_out = 0;
-    strm->next_out = 0;
-
-    strm->hidden = 0;
-    strm->options_mask = SZ_RAW_OPTION_MASK | SZ_NN_OPTION_MASK | SZ_MSB_OPTION_MASK;
-    strm->bits_per_pixel = 8;
-    strm->pixels_per_block = 8;
-    strm->pixels_per_scanline = 16;
-    strm->image_pixels = 16;
-
-    /* TBD - this should check gzlib error codes */
-    if ( SZ_CompressInit( strm ) != SZ_OK )
-    {
-        free( obj );
-        return RC ( rcFS, rcFile, rcConstructing, rcNoObj, rcUnknown );
-    }
-
-    obj->myPosition   = 0;
-    obj->filePosition = 0;
-    obj->completed    = false;
-
-    rc = KFileAddRef( file );
-    if ( rc != 0 )
-    {
-        obj->file = NULL;
-        KSZipFile_OutDestroy ( obj );
-    }
-    else
-    {
-        obj->file = file;
-        *result = &obj->dad;
-    }
-
-    return rc;
-}
-
-/* private functions declarations ******************************************************/
-
-static int s_SzipAndWrite ( KSZipFile *self,
-    bool flush,
-    size_t *num_writ,
-    rc_t *rc );
-
-/* virtual functions definitions *******************************************************/
-
-static rc_t CC KSZipFile_OutDestroy( KSZipFile *self) {
-    rc_t rc;
-    if ( !self->completed ) {
-        int ret;
-        size_t wrtn;
-        sz_stream* strm = &self->strm;
-        strm->avail_in = 0;
-        strm->next_in = SZ_NULL;
-
-        ret = s_SzipAndWrite( self, SZ_FINISH, &wrtn, &rc );
-        if ( rc != 0 )
-            return rc;
-        assert( ret == SZ_STREAM_END );        /* stream will be complete */
-        
-        SZ_CompressEnd( strm );   /* clean up */
-            
-        self->completed = true;
-    }
-
-    rc = KFileRelease( self->file );
-    if ( rc == 0 )
-        free( self );
-
-    return rc;
-}
-
-static rc_t CC KSZipFile_OutWrite( struct KSZipFile *self,
-    uint64_t pos,
-    const void *buffer,
-    size_t bsize,
-    size_t *num_writ )
-{
-    int ret;
-    rc_t rc;
-    sz_stream* strm;
-    size_t ignore;
-    if ( num_writ == NULL )
-        num_writ = &ignore;
-
-    *num_writ = 0;
-
-    if ( pos != self->myPosition )
-        return RC ( rcFS, rcFile, rcWriting, rcParam, rcInvalid );
-
-    strm = &self->strm;
-    strm->next_in  = (char *) buffer;
-    strm->avail_in = bsize;
-
-    rc = 0;
-    ret = s_SzipAndWrite( self, SZ_NO_FLUSH, num_writ, &rc );
-    if ( rc != 0 )
-        return rc;
-    assert( ret != SZ_STREAM_END );        /* stream will be complete */
-
-    self->myPosition += * num_writ;
-
-    return 0;
-}
-
-/* private functions definitions *******************************************************/
-
-static int s_SzipAndWrite( KSZipFile *self,
-    bool flush,
-    size_t *num_writ,
-    rc_t *rc )
-{
-    sz_stream *strm;
-    long avail_in;
-    int ret;
-
-    assert( self && num_writ && rc );
-
-    *num_writ = 0;
-    strm = &self->strm;
-    avail_in = strm->avail_in;
-    ret = 0;
-    /* run deflate() on input until output buffer not full, finish
-       compression if all of source has been read in */
-    do {
-        uint32_t have;
-        size_t written;
-        strm->avail_out = sizeof(self->buff);
-        strm->next_out = self->buff;
-        ret = SZ_Compress( strm, flush ? SZ_FINISH : SZ_NO_FLUSH );  /* no bad return value */
-        assert( ret != SZ_STREAM_ERROR );  /* state not clobbered */
-        have = sizeof( self->buff ) - strm->avail_out;
-        written = 0;
-        *rc = KFileWrite( self->file, self->filePosition, self->buff, have, &written );
-        /* this is wrong - Z_ERRNO would tell us to check errno for error
-           but the error is in *rc */
-        if ( *rc != 0 )
-            return SZ_STREAM_ERROR;
-        self->filePosition += written;
-        *num_writ = avail_in - strm->avail_in;
-    } while ( strm->avail_out == 0 );
-    assert( strm->avail_in == 0 );     /* all input will be used */
-    return ret;
-}
-
-/* EOF */
diff --git a/libs/kfs/tar.c b/libs/kfs/tar.c
deleted file mode 100644
index d7f058f..0000000
--- a/libs/kfs/tar.c
+++ /dev/null
@@ -1,2672 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#define HANDLING_EXTENDED_HEADERS 0
-
-#include <kfs/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <kfs/file.h>
-#include <kfs/mmap.h>
-#include <kfs/arc.h>
-#include <kfs/toc.h>
-#include <kfs/tar.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-
-#include "toc-priv.h"
-#include <os-native.h>
-#include <sysalloc.h>
-#include <strtol.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h> /* temporary for development */
-
-#include <limits.h>
-/* #include <sys/types.h> */
-
-#ifdef _DEBUGGING
-#define TAR_FUNC_ENTRY() DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_TARENTRY), ("Enter: %s\n", __func__))
-#define TAR_DEBUG(msg) DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_TAR), msg)
-#else
-#define TAR_FUNC_ENTRY()
-#define TAR_DEBUG(msg)
-#endif
-
-/* -----
- * offset of is the count of bytes between the base of a structure and 
- * a particular member of that structure
- */
-#ifndef OFFSET_OF
-#define	OFFSET_OF(structure,member) ((size_t)((&(((structure*)0)->member))-(0)))
-#endif
-
-/* -----
- * Hide any definition of sun that might have come from sun compilers
- * or the like
- */
-#undef sun
-#undef SUN
-
-
-#define PASTE_2(a,b)   a##b
-#define PASTE_3(a,b,c) a##b##c
-#define STRINGIFY(a)   #a
-
-
-/* ======================================================================
- * return an ASCII string that describes a header type
- *
- * Needs to match tar_header_type_enum.
- */
-#if _DEBUGGING
-static const char * get_bool_string (bool b)
-{
-    switch (b)
-    {
-    case true:
-	return "true";
-    case false:
-	return "false";
-    default:
-	return "not-false";
-    }
-}
-#endif
-
-
-/* ======================================================================
- * Header format structures
- *
- * Tar (tape archiver) started possibly as a unix utility in BSD rivalling
- * the cpio from the AT&T System III.  The exact derivation is unimportant
- * and some names might be slightly misleading based on historical 
- * inaccuracies but successful implmentation is not dependant on such 
- * accuracy in historical trivia but rather on accuracy in technical details.
- *
- * Posix attempted to standardize the growingly divergent variants of tar
- * but it has led to only slightly more standardized variants with vaguely
- * compatible extensions.
- *
- * For the purposes of this implmentation we will refer to the known to the
- * author versions of tar and include the tar like aspects of the posix pax 
- * replacement for tar.
- *
- * Cpio support could be added if desired with only some difficulty.
- *
- * Supported known variants for this implmentation will be:
- * 	V7 	- the oldest known common base defitions for a tar header
- *		   block ( possibly from Unix V7?)
- *    	POSIX	- Posix.1-1988 initial restandardization of a header block
- *		  This versio introduced the ustar name for a tar header
- *		  and includes that term as a "magic" constant.
- *	PAX	- Posix.1.2001 headers for pax a tar derivative that us a
- *		  peaceful attempt to unify the tar and cpio formats apparently.
- *		  It isn't different than POSIX in the ustar block but instead
- *		  is an introduction of two new values of a link field in the
- *		  tar header that defines what comes next (see headers defined
- *		  below).
- *	SUN	- an extension to the POSIX tar header format from SunOS 5
- *	STAR 85	- pre-POSIX extensions to tar from Heorg Schilling (ask him its
- *		  the bestest most greatest tar until STAR94)
- *	STAR 94	- A redo of star based on the POSIX ustar tar header.  A less
- *		  broken than most implmentation of a POSIX/ustar tar header
- *		  based tar. Schilling says its the only real implmentation of
- *		  a ustar based tar but it isn't fully compliant by design.
- *	GNU 89	- a selected variant of tar from FSF/GNU that is a broken 
- *		  implementation of a POSIX/ustar header based tar.
- *	GNU 01	- A slight redo of the FSF/GNU tar format.  There are actually
- *		  evolving variants all of which are still somewhat broken
- *		  implementations of a ustar based tar header format.
- *
- * Along with these variants of a tar/ustar semi-standard tar header there are
- * other header blocks and other significant blocks that are also tracked in
- * this implmentation of a tar reader.
- *	ZERO BLOCK - a block of 512 zero bytes that is supposed to be padding at
- *		  the end of a tar file to meet some super blocksize.  Based on
- *		  where it fits in it would be found when looking for a header
- *		  for the next file included in a tar archive.
- *	RAW	- a convention to mean a header block of a type that has not been 
- *		  determined.
- */
-#define TYPES() \
-    type_(UNDEFINED) type_(ZERO_BLOCK) type_(CPIO) type_(V7) type_(POSIX) \
-        type_(SUN) type_(STAR_85) type_(STAR_94)  type_(GNU_89) type_(SPARSE)
-
-
-#define type_(e) PASTE_2(TAR_,e),
-
-typedef enum tar_header_type
-{
-    TYPES()
-    TAR_TYPE_COUNT
-} tar_header_type;
-
-#undef type_
-#define type_(e) STRINGIFY(e),
-static const char *	get_type_string(tar_header_type t)
-{
-    static const char * type_error = "Error";
-    static const char * type_strings[] = 
-        {
-            TYPES()
-        };
-    if ((t < 0) || (t >= TAR_TYPE_COUNT))
-	return type_error;
-    return type_strings[t];
-}
-#undef type_
-#undef TYPES
-
-
-/* =============================================================================
- * Tar headers are almost ASCII based but definitely byte/octet based so all
- * elements are best defined as arrays of char and use casts to signed and unsigned
- * where appropriate in interpretation..
- * 
- * All Tar files or streams are divided into blocks of 512 bytes
- * This is significant in the file data in that the last block 
- * of a file is supposed to be padded with NUL to fill out a block
- * and then be followed by two blocks of all NUL bytes.
- * headers are also 512 bytes with various but fairly consistent 
- * interpretations of what is where with in that block
- *
- * Most tar utilities further define super blocks consisting of a number of blocks
- * typically 10 of them for a length of 5120 bytes.  This is irrelevant for this
- * implmentation.  By definition a tar file ends with two "zero blocks" and enough
- * more after that to fill one of these super blocks.  We ignore all aspects of 
- * this.
- */
-#define TAR_BLOCK_SIZE		(512)
-typedef char tar_raw_block [TAR_BLOCK_SIZE];
-#define BLOCKS_FOR_BYTES(byte_count)	((byte_count+TAR_BLOCK_SIZE-1)/TAR_BLOCK_SIZE)
-
-/* --------------------------------------------------------------------------------
- * lengths of various tar header fields
- */
-
-/* --------------------
- * Tar file names are always 100 bytes long and include preceding 
- * path names.  The utilities do not precluded paths that put the 
- * files outside of the "base" where the tar file was created.
- *
- * To handle tar files made by older tar utilities if the last 
- * character is '/' then the file should be assumed to be a directory.
- *
- * This 'type' is used for both the name of the object being archived
- * and the link target if it is a hard or soft link.
- */
-#define	TAR_NAME_LEN		(100)
-typedef char	tar_file_name	[TAR_NAME_LEN];
-
-/* --------------------
- * Tar mode strings are always 8 bytes long.
- *
- * 9 file access permissions bits and three execution mode bits.
- *
- * Zero '0' not NUL pre-fill unused bytes.  a user permision of 0644 would be stored as
- * "0000644" with a NUL terminator.
- *
- * The format is 7 octal ASCII bytes with only the last 4 being 
- * significant.  That is the first three are always '0'.  The 8th 
- * byte is NUL.
- *
- * Older utilities might put preceding ' ' characters or
- * instead of pre-fill have post fill ' ' or NUL.
- */
-#define TAR_MODE_LEN		(8)
-typedef char	tar_file_mode	[TAR_MODE_LEN];
-/* -----
- * These are the bits if the mode is in binary (octal defines for ease of interpretation)
- * they match the st_mode field from the stat()/fstat() struct stat.
- *
- * GNU tar puts the file type bits from the stat structure in the mode of the tar file.
- * Other tar implmentations might as well though no where is this dktefined as required or
- * recommended or even supported.
- */
-#define	TAR_SUID_BIT	(04000)	/* set UID on execution */
-#define	TAR_GUID_BIT	(02000)	/* set GID on execution */
-#define	TAR_STICKY_BIT	(01000)	/* save text / sticky bit */
-/* file permissions */
-#define	TAR_MODE_OREAD	(00400)	/* read by owner */
-#define	TAR_MODE_OWRITE	(00200)	/* write by owner */
-#define	TAR_MODE_OEXEC	(00100)	/* execute by owner */
-#define	TAR_MODE_GREAD	(00040)	/* read by group */
-#define	TAR_MODE_GWRITE	(00020)	/* write by group */
-#define	TAR_MODE_GEXEC	(00010)	/* execute by group */
-#define	TAR_MODE_WREAD	(00004)	/* read by other */
-#define	TAR_MODE_WWRITE	(00002)	/* write by other */
-#define	TAR_MODE_WEXEC	(00001)	/* execute by other */
-
-/* -----
- * These are the bits once converted into ASCII
- * with in an ASCII byte these bits are actually usable so no conversion needed
- * '0' = 0x30 / 060
- * '1' = 0x31 / 061
- * '2' = 0x32 / 062
- * '3' = 0x33 / 063
- * '4' = 0x34 / 064
- * '5' = 0x35 / 065
- * '6' = 0x36 / 066
- * '7' = 0x37 / 067
- */
-#define	TAR_MODE_READ		(0x01)
-#define	TAR_MODE_WRITE		(0x02)
-#define	TAR_MODE_EXEC		(0x04)
-#define TAR_MODE_STICKY		(0x01)
-#define TAR_MODE_GUID		(0x02)
-#define TAR_MODE_SUID		(0x04)
-#define	TAR_MODE_OWNER_BYTE	(6)
-#define	TAR_MODE_GROUP_BYTE	(5)
-#define	TAR_MODE_WORLD_BYTE	(4)
-#define	TAR_MODE_USER_BYTE	(3)
-#define	TAR_MODE_EXEC_BYTE	(2)
-
-/* --------------------
- * Tar user (and group) numeric IDs are put into 8 bytes.
- *
- * There is a '0' prefill and as terminating NUL.
- *
- * Older utilities might put preceding ' ' characters or
- * instead of pre-fill have post fill ' ' or NUL.
- */
-#define TAR_ID_LEN		(8)
-typedef	char	tar_id		[TAR_ID_LEN];
-
-/* --------------------
- * Tar file size elements are 12 bytes long with 11 used
- * for octal characters making the maximum size of a file
- * for pure classic or Posix tar limited to 8 GBytes.  
- * Various tar utilities handle longer files in different
- * ways if at all.
- *
- * A length of 100 bytes would be stored as "00000000144".
- *
- * Links and some other special values are archived with a
- * length of zero and thus no data blocks.
- *
- * There is a '0' prefill and as terminating NUL.
- *
- * Older utilities might put preceding ' ' characters or
- * instead of pre-fill have post fill ' ' or NUL.
- *
- * GNU tar implmentations use alternative intrpretatopms of
- * this and possibly other fields using mime base 64 or
- * base 256 (big endian nonstandard sized binary)
- */
-#define	TAR_SIZE_LEN		(12)
-typedef char	tar_size	[TAR_SIZE_LEN];
-#define MAX_TAR_FILE_SIZE	(077777777777)
-
-/* --------------------
- * Tar file modification/access/creation times are 12 bytes
- * long.  This holds 11 octal ASCII digits representing the
- * number of seconds since 01/01/1970 00:00 UTC.
- *
- * There is a '0' prefill and as terminating NUL.
- *
- * Older utilities might put preceding ' ' characters or
- * instead of pre-fill have post fill ' ' or NUL.
- */
-#define TAR_TIME_LEN		(12)
-typedef	char	tar_time	[TAR_TIME_LEN];
-
-/* --------------------
- * Tar has a weak checksum protection of part of the tar header
- * that is 8 bytes long and again uses 7 ASCII octal digits.
- *
- * There is a '0' prefill and as terminating NUL.
- *
- * Older utilities might put preceding ' ' characters or
- * instead of pre-fill have post fill ' ' or NUL.
- */
-#define TAR_CSUM_LEN		(8)
-typedef	char	tar_csum	[TAR_CSUM_LEN];
-#define	csum_blanks		("       ")
-
-/* --------------------
- * The tar link is a single byte that expresses the type of file
- * or special value represented by this entry.
- */
-typedef	char	tar_link;
-
-#define LINKS()                   \
-    link_('\0',OLDNORMAL_FILE)    \
-    link_('0',NORMAL_FILE)        \
-    link_('1',HARD_LINK)          \
-    link_('2',SYMBOLIC_LINK)      \
-    link_('3',CHARACTER_SPECIAL)  \
-    link_('4',BLOCK_SPECIAL)      \
-    link_('5',DIRECTORY)          \
-    link_('6',FIFO)               \
-    link_('7',CONTIGUOUS_FILE)    \
-    link_('A',SOLARIS_ACL)        \
-    link_('D',GNU_DUMPDIR)        \
-    link_('E',SOLARIS_ACL_FILE)   \
-    link_('I',INODE_METADATA)     \
-    link_('K',NEXT_LONG_LINK)     \
-    link_('L',NEXT_LONG_NAME)     \
-    link_('M',MULTI_VOLUME)       \
-    link_('N',GNU1989_LONG_NAMES) \
-    link_('S',SPARSE)             \
-    link_('V',VOLUME_NAME)        \
-    link_('X',SUN_XHDR)           \
-    link_('g',PAX_GLOBAL_XHDR)    \
-    link_('x',PAX_XHDR)
-
-#define link_(v,n)      PASTE_2(LINK_,n) = v,
-
-/* LINK_COUNT is a count not a mac value */
-enum e_tar_link
-{
-    LINKS()
-    LINK_COUNT
-};
-#undef link_
-
-#if _DEBUGGING
-#define link_(v,n) {STRINGIFY(n), v},
-struct nv_pair
-{
-    const char * name;
-    tar_link  link;
-};
-static const char * get_link_string(tar_link l)
-{
-    static const struct nv_pair pairs[] = 
-        {
-            LINKS()
-            {NULL, 0}
-        };
-    unsigned int ix;
-
-    for (ix = 0; pairs[ix].name != NULL; ++ix)
-        if (pairs[ix].link == l)
-            return pairs[ix].name;
-    return "UNDEFINED";
-}
-#undef link_
-#endif
-#undef LINKS
-
-
-/* --------------------
- * The tar magic string is 6 bytes long.
- */
-#define	TAR_MAGIC_LEN		(6)
-typedef char	tar_magic	[TAR_MAGIC_LEN];
-#define	POSIX_MAGIC_CONST	"ustar"		/* includes terminating NUL */
-
-/* --------------------
- * The tar version string is two bytes long and uses both bytes
- */
-#define	TAR_VERSION_LEN		(2)
-typedef	char	tar_version	[TAR_VERSION_LEN];
-#define	POSIX_VERSION_CONST	"00"		/* does not include terminating NUL */
-
-/* --------------------
- * The Posix strong user/group name is 32 bytes long
- */
-#define TAR_STRNAME_LEN		(32)
-typedef	char	tar_strname	[TAR_STRNAME_LEN];
-
-/* --------------------
- * The dev? strings are 8 bytes long
- */
-#define	TAR_DEV_LEN		(8)
-typedef	char	tar_dev		[TAR_DEV_LEN];
-
-/* --------------------
- * Posix prefix is 155 bytes that can be put before the name to give a path of
- * 255 bytes instad of the smaller limit of 99.
- */
-#define	TAR_PREFIX_LEN		(155)
-typedef	char	tar_prefix	[TAR_PREFIX_LEN];
-
-/*
- * Sun extensions
- */
-
-/* --------------------
- */
-typedef	char sun_extnum;
-#define	SUN_FULLSIZE_LEN	(10)
-typedef	char	sun_fullsize	[SUN_FULLSIZE_LEN];
-
-/* --------------------
- * star extensions
- *
- * star85 is old star from 1985
- */
-typedef	char	star85_version;
-#define	STAR85_FILETYPE_LEN	(8)
-typedef char	star85_filetype	[STAR85_FILETYPE_LEN];
-#define	STAR85_TYPE_LEN		(12)
-typedef	char	star85_type	[STAR85_TYPE_LEN];
-#define	STAR85_RDEV_LEN		(12)
-typedef	char	star85_rdev	[STAR85_RDEV_LEN];
-/* ignoring the 11 byte rdev with minor bits */
-#define	STAR85_UNAME_LEN	(16)
-typedef	char	star85_uname	[STAR85_UNAME_LEN];
-#define	STAR85_GNAME_LEN	(15)
-typedef	char	star85_gname	[STAR85_GNAME_LEN];
-#define	STAR_XMAGIC_LEN		(4)
-typedef	char	star_magic	[STAR_XMAGIC_LEN];
-#define	STAR_MAGIC_CONST	("tar")
-#define	NSTAR_PREFIX_LEN	(1)
-typedef	char	nstar_prefix	[NSTAR_PREFIX_LEN];
-
-/* --------------------
- * gnu extensions
- */
-#define	GNU89_MAGIC_LEN		(8)
-typedef	char	gnu89_magic	[GNU89_MAGIC_LEN];
-#define	GNU_89_MAGIC_CONST	"ustar  "		/* includes terminating NUL */
-#define	GNU_89_GNUMAGIC_CONST	"GNUtar "		/* includes terminating NUL */
-#define GNU89_LONGNAMES_LEN	(4)
-typedef char	gnu89_longnames	[GNU89_LONGNAMES_LEN];
-
-
-/* --------------------
- * shared between the feuding star and gnu tar
- */
-typedef	char	tar_isextended ;
-typedef struct	tar_sparse
-{
-    tar_size	offset;
-    tar_size	num_bytes;
-} tar_sparse;
-#define	GNU_SPARSES_IN_EXTRA_HEADER		(16)
-#define	GNU_SPARSES_IN_OLD_HEADER		(4)
-#define	GNU_SPARSES_IN_SPARSE_HEADER		(21)
-#define	STAR_SPARSES_IN_HEADER			(4)
-#define	STAR_SPARSES_IN_EXT_HEADER		(21)
-
-
-/* ----------------------------------------
- * The various tar header formats
- *
- * Note that in all the tar, posix and pax formats the first 257 bytes are
- * the same.  In all posix ad almost compliant formats the first
- * 345 bytes are the same (except GNU 89).  It is abuse of the 155
- * bytes of the prefix that make star and gnu truly not posix compliant
- * Sun used the 12 bytes after the prefix so is still psox compliant.
- */
-typedef	struct	tar_v7_header
-{
-    /* type		member name			 and offset */
-    tar_file_name	name;				/*   0 */
-    tar_file_mode	mode;				/* 100 */
-    tar_id		uid;				/* 108 */
-    tar_id		gid;				/* 116 */
-    tar_size		size;				/* 124 */
-    tar_time		mtime;				/* 136 */
-    tar_csum		csum;				/* 148 */
-    tar_link		link;				/* 156 */
-    tar_file_name	linkname;			/* 157 */
-    /* end of header					// 257 */
-} tar_v7_header;
-
-typedef struct tar_posix_header
-{
-    /* type		member name			 and offset */
-    tar_file_name	name;				/*   0 */
-    tar_file_mode	mode;				/* 100 */
-    tar_id		uid;				/* 108 */
-    tar_id		gid;				/* 116 */
-    tar_size		size;				/* 124 */
-    tar_time		mtime;				/* 136 */
-    tar_csum		csum;				/* 148 */
-    tar_link		link;				/* 156 */
-    tar_file_name	linkname;			/* 157 */
-    tar_magic		magic;				/* 257 */
-    tar_version		version;			/* 263 */
-    tar_strname		uname;				/* 265 */
-    tar_strname		gname;				/* 297 */
-    tar_dev		devmajor;			/* 329 */
-    tar_dev		devminor;			/* 337 */
-    tar_prefix		prefix;				/* 345 */
-    /* end of header					// 500 */
-} tar_posix_header, tar_pax_header;
-
-typedef struct tar_sun_header
-{
-    /* type		member name			 and offset */
-    tar_file_name	name;				/*   0 */
-    tar_file_mode	mode;				/* 100 */
-    tar_id		uid;				/* 108 */
-    tar_id		gid;				/* 116 */
-    tar_size		size;				/* 124 */
-    tar_time		mtime;				/* 136 */
-    tar_csum		csum;				/* 148 */
-    tar_link		link;				/* 156 */
-    tar_file_name	linkname;			/* 157 */
-    tar_magic		magic;				/* 257 */
-    tar_version		version;			/* 263 */
-    tar_strname		uname;				/* 265 */
-    tar_strname		gname;				/* 297 */
-    tar_dev		devmajor;			/* 329 */
-    tar_dev		devminor;			/* 337 */
-    tar_prefix		prefix;				/* 345 */
-    sun_extnum		extnum;				/* 500 non-conformant */
-    sun_extnum		extcount;			/* 501 non-conformant */
-    sun_fullsize	fullsize;			/* 502 non-conformant */
-    /* end of header					// 512 non-conformant */
-} tar_sun_header;
-
-typedef struct tar_star_85_header
-{
-    /* type		member name			 and offset */
-    tar_file_name	name;				/*   0 */
-    tar_file_mode	mode;				/* 100 */
-    tar_id		uid;				/* 108 */
-    tar_id		gid;				/* 116 */
-    tar_size		size;				/* 124 */
-    tar_time		mtime;				/* 136 */
-    tar_csum		csum;				/* 148 */
-    tar_link		link;				/* 156 */
-    tar_file_name	linkname;			/* 157 */
-    star85_version	starversion;			/* 257 non-conformant */
-    star85_filetype	starfiletype;			/* 258 internal type of file? non-conformant */
-    star85_type		startype;			/* 266 type of file (UNIX)? non-conformant */
-    star85_rdev		rdev;				/* 278 non-conformant */
-    tar_time		atime;				/* 290 non-conformant */
-    tar_time		ctime;				/* 302 non-conformant */
-    star85_uname	uname;				/* 314 non-conformant */
-    star85_gname	gname;				/* 330 non-conformant */
-    tar_prefix		prefix;				/* 345 non-conformant */
-    char		___fill0[8];			/* 500 non-conformant */
-    star_magic		xmagic;				/* 508 non-conformant */
-    /* end of header					// 512 non-conformant */
-} tar_star_85_header;
-typedef struct tar_star_94_header
-{
-    /* type		member name			 and offset */
-    tar_file_name	name;				/*   0 */
-    tar_file_mode	mode;				/* 100 */
-    tar_id		uid;				/* 108 */
-    tar_id		gid;				/* 116 */
-    tar_size		size;				/* 124 */
-    tar_time		mtime;				/* 136 */
-    tar_csum		csum;				/* 148 */
-    tar_link		link;				/* 156 */
-    tar_file_name	linkname;			/* 157 */
-    tar_magic		magic;				/* 257 */
-    tar_version		version;			/* 263 */
-    tar_strname		uname;				/* 265 */
-    tar_strname		gname;				/* 297 */
-    tar_dev		devmajor;			/* 329 */
-    tar_dev		devminor;			/* 337 */
-    nstar_prefix	prefix;				/* 345 */
-    char		___fill0;			/* 346 */
-    char		___fill1[8];			/* 347 */
-    tar_isextended	isextended;			/* 355 non-conformant */
-    tar_sparse 		sparse[STAR_SPARSES_IN_HEADER];	/* 356 non-conformant */
-    tar_size		realsize;			/* 452 non-conformant */
-    tar_size		offset;				/* 464 non-conformant */
-    tar_time		atime;				/* 476 non-conformant */
-    tar_time		ctime;				/* 488 non-conformant */
-    char		___fill2[8];			/* 500 */
-    star_magic		xmagic;				/* 508 non-conformant */
-    /* end of header					// 512 */
-} tar_star_94_header;
-
-typedef struct tar_gnu_89_header
-{
-    /* type		member name			 and offset */
-    tar_file_name	name;				/*   0 */
-    tar_file_mode	mode;				/* 100 */
-    tar_id		uid;				/* 108 */
-    tar_id		gid;				/* 116 */
-    tar_size		size;				/* 124 */
-    tar_time		mtime;				/* 136 */
-    tar_csum		csum;				/* 148 */
-    tar_link		link;				/* 156 */
-    tar_file_name	linkname;			/* 157 */
-    gnu89_magic		magic;				/* 257 non-conformant */
-    tar_strname		uname;				/* 265 */
-    tar_strname		gname;				/* 297 */
-    tar_dev		devmajor;			/* 329 */
-    tar_dev		devminor;			/* 337 */
-    tar_time		atime;				/* 345 non-conformant */
-    tar_time		ctime;				/* 357 non-conformant */
-    tar_size		offset;				/* 369 non-conformant */
-    gnu89_longnames	longnames;			/* 381 non-conformant */
-    char		___fill0[1];			/* 385 */
-    tar_sparse		sparse	[GNU_SPARSES_IN_OLD_HEADER];/* 386 optional sparse */
-    tar_isextended	isextended;			/* 482 non-conformant */
-    tar_size		realsize;			/* 483 non-conformant */
-    /* end of header					// 495 */
-} tar_gnu_89_header;
-
-typedef struct tar_gnu_99_header
-{
-    /* type		member name			 and offset */
-    tar_file_name	name;				/*   0 */
-    tar_file_mode	mode;				/* 100 */
-    tar_id		uid;				/* 108 */
-    tar_id		gid;				/* 116 */
-    tar_size		size;				/* 124 */
-    tar_time		mtime;				/* 136 */
-    tar_csum		csum;				/* 148 */
-    tar_link		link;				/* 156 */
-    tar_file_name	linkname;			/* 157 */
-    gnu89_magic		magic;				/* 257 non-conformant */
-    tar_strname		uname;				/* 265 */
-    tar_strname		gname;				/* 297 */
-    tar_dev		devmajor;			/* 329 */
-    tar_dev		devminor;			/* 337 */
-    tar_time		atime;				/* 345 non-conformant */
-    tar_time		ctime;				/* 357 non-conformant */
-    tar_size		offset;				/* 369 non-conformant */
-    gnu89_longnames	longnames;			/* 381 non-conformant */
-    char		___fill0[1];			/* 385 */
-    tar_sparse		sparse	[GNU_SPARSES_IN_OLD_HEADER];/* 386 non-conformant optional sparse */
-    tar_isextended	isextended;			/* 482 non-conformant */
-    tar_size		realsize;			/* 483 non-conformant */
-    /* end of header					// 495 */
-} tar_gnu_99_header;
-
-typedef struct tar_sparse_header
-{
-    /* type		member name			 and offset */
-    tar_sparse		sparse	[STAR_SPARSES_IN_EXT_HEADER];/* 0 */
-    tar_isextended	isextended;			/* 504 */
-} tar_sparse_header;					/* 505 end of header */
-
-typedef struct tar_cpio_header
-{
-    /* type		member name			 and offset */
-    char		magic		[6];		/*   0	must be "070707" */
-#define	TAR_CPIO_MAGIC_CONST ("070707")
-    char		dev		[6];		/*   6  (dev,ino) is unique for each file in archive */
-    char		ino		[6];		/*  12  see dev */
-    char		mode		[6];		/*  18 */
-    char		uid		[6];		/*  24 */
-    char		gif		[6];		/*  30 */
-    char		nlink		[6];		/*  36 */
-    char		rdev		[6];		/*  42 */
-    char		mtime		[11];		/*  48 */
-    char		namesize	[6];		/*  59 */
-    char		filesize	[6];		/*  65 */
-    char		buff		[1];		/*  71  name and file data */
-} tar_cpio_header;
-
-typedef union tar_header
-{
-    /* ----------
-     * The TAR header is to be zero filled by definition but some tar
-     * programs use ' ' instead.
-     *
-     * accept zeros ('0'), spaces (' ') or NULs (0x00) as equivalent where reasonable
-     *
-     * This name refers to the entire header as a single undifferentiated
-     * sequence of bytes.
-     */
-    tar_raw_block	raw;		/* tar block as an array of bytes: used for 0 blocks here */
-    tar_cpio_header	cpio;		/* cpio not really tar */
-    tar_v7_header	tar;		/* classic header back to the beginnings of memory */
-    tar_posix_header	posix;		/* ustar or Posix 1003.1 header */
-    tar_sun_header	suntar;		/* Sun Microsystems tar header */
-    tar_star_85_header	star_85;	/* star header from 1985 (pre-Posix) */
-    tar_star_94_header	star_94;	/* star header from 1994 (post-Posix) */
-    tar_gnu_89_header	gnu_89;		/* gnu header from circa 1989 (post-posix but broken) */
-    tar_gnu_99_header	gnu_99;         /* gnu header from ???? */
-    tar_sparse_header	sparse;		/* star / gnu extended sparses header */
-} tar_header;
-
-
-/* ======================================================================
- * local module-wide function like macros
- */
-/* -----
- * offset of is the count of bytes between the base of a structure and 
- * a particular member of that structure
- */
-#define	OFFSET_OF(structure,member) ((size_t)((&(((structure*)0)->member))-(0)))
-
-
-/* ======================================================================
- * compilation unit local functions
- */
-
-/* ======================================================================
- * return the RFC 2045 base 64 value for a byte character 
- * -1 for any out of range
- *
- * base 64 uses A-Z as 0-25, a-z as 26-51, 0-9 as 52-61, + as 62 and / as 63
- */
-static int64_t decode_base64char (uint8_t byte)
-{
-    /* 
-     * trade off of space for table versus time to upsize the return
-     * and reupsize where it is used
-     */
-    static const int8_t table[] = 
-	{
-	    /*
-	     * 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
-	     */
-	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 00 */
-	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 10 */
-	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63, /* 20 */
-	    52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1, /* 30 */
-	    -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14, /* 40 */
-	    15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1, /* 50 */
-	    -1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, /* 60 */
-	    41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1, /* 70 */
-	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 80 */
-	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 90 */
-	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* A0 */
-	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* B0 */
-	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* C0 */
-	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* D0 */
-	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* E0 */
-	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1  /* F0 */
-	};
-    return table[byte];
-}
-
-
-/* ======================================================================
- * return the RFC 2045 base 64 value of a string at <str> of length <len>
- *
- * Interpreted the specification to mean that you simply ignore any out
- * of range characters.  They are not treated as bytes of 0 as that would
- * mean a shift of earlier bytes.
- *
- * Each character is 6 bits of the final value.
- */
-static int64_t decode_base64string (const uint8_t* str, size_t len)
-{
-    int64_t 	result = 0;
-    int64_t 	temp = 0;
-    size_t 	ix;
-
-    for (ix = 0; ix < len; ++ix)
-    {
-	if ((temp = decode_base64char(str[ix])) >= 0)
-	{
-	    result <<= 6; /* result *= 64 */
-	    result += temp;
-	}
-    }
-    return result;
-}
-
-
-/* ======================================================================
- * tar_strtoll
- *
- * This function will convert a string in a tar header into a 64 signed
- * integer.
- *
- * The original tar header used just octal numbers in ascii in fixed length
- * fields.  As normal in the computer software world these "obviously plenty
- * big" fields became way too small.
- *
- * GNU tar invented two approaches to make these numeric fields "bigger" but
- * only prolonged the pain by squeezing the new numbers into the same fields.
- *
- * In the tar v7 and ustar based tar headers the fields are:
- *	Name	Size	Octal Range	Interpretation
- *	mode	8	0-2097151 	bit flags
- *	uid	8	0-2097151
- *	gid	8	0-2097151
- *	size	12	0-8589934591	up to 8 Giga-Byte files
- *	mtime	12	0-8589934591 	1970/01/01 00:00:00 GMT-2242/03/16 12:56:31 GMT
- *	
- *	atime	12	0-8589934591 	1970/01/01 00:00:00 GMT-2242/03/16 12:56:31 GMT
- *	ctime	12	0-8589934591 	1970/01/01 00:00:00 GMT-2242/03/16 12:56:31 GMT
- *
- * GNU's first and already obsolete approach was to put Mime base-64 numbers
- * With these the first byte is '+' or '-' to signal it isn't octal ASCII.
- *
- * GNU's second approach is base-256 which is a big endian binary string of lengths other
- * than the 1, 2, 4 or 8 bytes of the standard integer types.  In this approach the first
- * byte is either 0x80 for a positive number or 0xFF for a negative number.
- */
-
-static int64_t tar_strtoll (const uint8_t * str, size_t len)
-{
-    int64_t	result = 0;
-    bool negative = false;
-    uint8_t temp_buff[24];	/* long enough to hold all octal bytes for 64 bit numbers */
-
-    /* -----
-     * force a NUL in case the source doesn't have one; this is for
-     * strtoll() on ASCII Octal
-     */
-    if ( len >= sizeof temp_buff )
-        len = sizeof temp_buff - 1;
-    memcpy (temp_buff, str, len);
-    temp_buff[ len ] = 0x00;
-
-    /* -----
-     * Most are going to be simple ASCII octal using '0'-'7' with NUL terminator
-     * leading 0 is not required but of course is accepted to match tar 
-     * header specifications
-     */
-    if (((temp_buff[0] >= '0')&&(temp_buff[0] <= '7'))||(temp_buff[0] == ' '))
-    {
-        /* use stdlib strtoll - longest expected goes a few bits into the upper longword */
-        result = strtoi64((char*)temp_buff,NULL,8);
-    }
-    /* -----
-     * "base-256" well that is "binary" big endian of some length
-     *
-     * For fields longer than eight bytes upper bytes will shift out of 
-     * significance into the bit bucket.
-     */
-    else if ((temp_buff[0] == 0x80)||(temp_buff[0] == 0xFF)) /* from GNU tar */
-    {
-        unsigned int ix;
-        negative = (bool)((temp_buff[0] == 0xFF) ? true : false);
-        result = temp_buff[0] & 0x7F; /* toss first flag bit */
-        for (ix = 1; ix < len; ++ix)
-        {
-            result <<= 8; /* result *= 256; */
-            result += temp_buff[ix];
-        }
-        if (negative)
-            result = -result;
-    }
-    /* -----
-     * "base-64" an already dumped idea from GNU tar
-     */
-    else if ((temp_buff[0] == '+')||(temp_buff[0] == '-')) /* from GNU tar */
-    {
-        int64_t temp;
-        negative = (bool)((temp_buff[0] == '-') ? true : false);
-        temp = decode_base64string(temp_buff+1,len-1);
-        /* potential overflow */
-        result = negative ? -temp : temp;
-    }
-
-    /* -----
-     * look for an empty field of all NUL
-     */
-    else if (temp_buff[0] == 0x00)
-    {
-        unsigned int ix;
-        for (ix = 1; ix < len; ++ix)
-        {
-            if (temp_buff[ix] != 0x00)
-                goto fail;
-        }
-    }
-    /* -----
-     * no idea what it is then
-     */
-    else
-    {
-    fail:
-        result = 0; /* as good a guess as any */
-        TAR_DEBUG (("%s: unknown integer storage type %c%c%c%c%c%c%c%c\n",
-                    temp_buff[0],temp_buff[1],temp_buff[2],temp_buff[3],
-                    temp_buff[4],temp_buff[5],temp_buff[6],temp_buff[7]));
-        PLOGMSG (klogErr, (klogErr, "unknown integer storage type $(B0)$(B1)$(B2)$(B3)$(B4)$(B5)$(B6)$(B7)",
-                           "B0=%c,B1=%c,B2=%c,B3=%c,B4=%c,B5=%c,B6=%c,B7=%c",
-                           temp_buff[0],temp_buff[1],temp_buff[2],temp_buff[3],
-                           temp_buff[4],temp_buff[5],temp_buff[6],temp_buff[7]));
-    }
-    return result;
-}
-
-
-
-/* ======================================================================
- * tar_header_type
- * determine most probable tar header block type
- */
-static tar_header_type	what_header_type(const tar_header* header)
-{
-    /* -----
-     * we'll assume its bad until we find a better guess
-     */
-    tar_header_type type = TAR_UNDEFINED;
-
-    /* -----
-     * look for a cpio header though we aren't expecting to support it quite yet
-     */
-    if (strncmp(header->cpio.magic, TAR_CPIO_MAGIC_CONST, sizeof(header->cpio.magic)) == 0)
-    {
-	type = TAR_CPIO;
-    }
-    /* -----
-     * look for extended headers of some type
-     *
-     * look for posix based extensions as hopefully most likely
-     */
-    else if (strcmp(header->posix.magic, POSIX_MAGIC_CONST) == 0)
-    {
-	/* -----
-	 * we have a post posix standard tar header but we aren't done yet
-	 *
-	 * First we look for star extensions to the header
-	 */
-	if (strcmp(header->star_94.xmagic, STAR_MAGIC_CONST) == 0)
-	{
-
-	    /* -----
-	     * we have either an old or new star archive
-	     */
-	    if (strcmp(header->star_94.magic, POSIX_MAGIC_CONST) == 0)
-	    {
-		/* -----
-		 * we have a new star type archive
-		 */
-		type = TAR_STAR_94;
-	    }
-	    else
-	    {
-		/* -----
-		 * we have a old star type archive
-		 */
-		type = TAR_STAR_85;
-	    }
-	}
-	/* -----
-	 * Next we look for SunOS5 extensions to the header
-	 */
-	else if (header->suntar.extnum &&
-		 header->suntar.extcount &&
-		 header->suntar.fullsize[0])
-	{
-	    type = TAR_SUN;
-	}
-	/* -----
-	 * Else it seems to be the generic Posix tar header
-	 */
-	else
-	{
-	    type = TAR_POSIX;
-	}
-    }
-    /* -----
-     * Not a proper magic for a POSIX ustar header so look for the improper magic of GNU's tar
-     */
-    else if (strcmp(header->star_94.magic, GNU_89_MAGIC_CONST) == 0)
-    {
-	/* we have an old GNU not really posix compliant archive type */
-	type = TAR_GNU_89;
-    }
-    /* -----
-     * If there is anything else there we don't know what to do with it
-     */
-    else if (header->posix.magic[0] != 0)
-    {
-	/* -----
-	 * Log an anomaly showing what we found in the magic field
-	 */
-	char temp_str	[9];
-	memset(temp_str,0,sizeof(temp_str));
-	string_copy(temp_str, sizeof(temp_str), header->posix.magic, 8);
-        TAR_DEBUG(("%s: unknown header type magic [%s]\n",
-                   __func__, temp_str));
-	type = TAR_UNDEFINED;
-    }
-    /* -----
-     * not knowing what we have lets see if it is a block of all zeroes
-     * knowing we can ignore it
-     */
-    else
-    {
-	/* -----
-	 * If this were a legitimate V7 (well just old style)
-	 * tar header the first character would be non-NUL
-	 * and the link would be on eof the old types
-	 */
-	if ((header->raw[0]>= ' ')&&(header->raw[0] <= '~'))
-	{
-	    switch (header->tar.link)
-	    {
-	    case LINK_OLDNORMAL_FILE:
-	    case LINK_NORMAL_FILE:
-	    case LINK_HARD_LINK:
-	    case LINK_SYMBOLIC_LINK:
-	    case LINK_CHARACTER_SPECIAL:
-	    case LINK_BLOCK_SPECIAL:
-	    case LINK_DIRECTORY:
-	    case LINK_FIFO:
-	    case LINK_CONTIGUOUS_FILE:
-		/* GNU TAR will do this to us */
-	    case LINK_NEXT_LONG_LINK:
-	    case LINK_NEXT_LONG_NAME:
-	    case LINK_GNU1989_LONG_NAMES:
-		type = TAR_V7;
-		break;
-	    default:
-		break;
-	    }
-	}
-	else
-	{
-	    /* -----
-	     * look for anything not zero
-	     */
-	    unsigned int ix;
-
-	    for (ix = 0; ix < sizeof(tar_header); ++ix)
-	    {
-		if (header->raw[ix])
-		{
-		    /* -----
-		     * non-zero so quit looking
-		     */
-		    break;
-		}
-	    }
-	    /* -----
-	     * if we got to the end we know they are all zero so say so
-	     */
-	    if (ix == sizeof(tar_header))
-	    {
-		type = TAR_ZERO_BLOCK;
-	    }
-	}
-    }
-    TAR_DEBUG (("%s: %s(%d)\n", __func__, get_type_string(type), type));
-    return type;
-}
-
-
-typedef struct sparse_data
-{
-    struct sparse_data*	next;
-    uint64_t		offset;
-    uint64_t		size;
-} sparse_data;
-/* ======================================================================
- */
-
-static rc_t	sparse_data_make (sparse_data ** new_item, uint64_t offset, uint64_t size)
-{
-    sparse_data * p;
-
-    p = malloc (sizeof (sparse_data));
-    if (p != NULL)
-    {
-        p->offset = offset;
-        p->size = size;
-        p->next = NULL;
-        *new_item = p;
-        return 0;
-    }
-	return -1;
-}
-
-static rc_t	sparse_data_push(sparse_data ** q, uint64_t offset, uint64_t size)
-{
-    if (q == NULL)
-        return -1;
-    if (*q == NULL)
-        return sparse_data_make (q, offset, size);
-    return sparse_data_push (&((*q)->next), offset, size);
-}
-
-static rc_t	sparse_data_pop (sparse_data ** q, sparse_data **item)
-{
-    if ((q == NULL) || (item == NULL))
-        return -1;
-
-	*item = *q;
-	*q = (*item)->next;
-	(*item)->next = NULL;
-	return 0;
-}
-
-static rc_t	sparse_data_kill (sparse_data ** q)
-{
-    if (q == NULL)
-        return -1;
-    if (*q == NULL)
-        return 0;
-    if ((*q)->next != NULL)
-        return sparse_data_kill(&(*q)->next);
-
-    free (*q);
-    *q = NULL;
-    return 0;
-}
-
-/* ======================================================================
- * local module-wide variables (reduction in parameter pushing)
- *
- * Module shared variables; kinda like C++ class elements
- */
-typedef struct KTarState
-{
-    /* TODO: optimize chunk/sparse lists by counting as pushed */
-    const KFile *	kfile;		/* KFS reference to the specific file being parsed */
-    const KMMap *	kmmap;		/* KFS memory mapping for a portion of that file */
-    const void *	map;		/* where the tar file got put by mmap */
-    sparse_data * 	sparse_q;
-    KTocChunk *		chunks;		/* table of chunks: logical_position, source_position, size */
-    KToc *		toc;		/* the Table of Contents we are building */
-    size_t		tar_length;	/* how long is the tar file */
-    size_t		buffer_length;	/* how long is the window into the buffer */
-    uint64_t		buffer_start;	/* how far into the tar file is the buffer start */
-    uint64_t		buffer_limit;	/* how far into the tar file is the buffer end */
-    uint32_t		num_chunks;
-    /* -----
-     * zero blocks are only supposed to pad out the end of a tar file to
-     * match a larger block size.  If we find something after a zero block
-     * it is a file error of some type
-     */
-    bool		found_zero_block;
-    bool		found_second_zero_block;
-} KTarState;
-
-static rc_t make_chunk_list(KTarState * self, uint64_t file_offset)
-{
-    uint64_t		count = self->num_chunks;
-    uint64_t		source_position = file_offset;
-    uint64_t		ix;
-    sparse_data * 	psd;
-    rc_t		ret;
-
-    if (self->chunks)
-	free (self->chunks); /* shouldn't happen */
-    self->chunks = malloc( (size_t)( count * sizeof(KTocChunk) ) );
-    if (self->chunks == NULL)
-	return -1;
-
-
-    for (ix = 0; ix < count; ++ix)
-    {
-	ret = sparse_data_pop (&self->sparse_q, &psd);
-	if (ret != 0)
-	    return ret;
-	self->chunks[ix].logical_position = psd->offset;
-	self->chunks[ix].source_position = source_position;
-	self->chunks[ix].size = psd->size;
-	source_position += psd->size;
-	sparse_data_kill(&psd);
-    }
-    return 0;
-}
-
-static void whack_chunk_list(KTarState * self)
-{
-    free (self->chunks);
-    self->chunks = NULL;
-    self->num_chunks = 0;
-}
-
-#if HANDLING_EXTENDED_HEADERS
-/* ======================================================================
- * mini class for handling pax/posix/ustar 
- * extended headers and global extended headers
- *
- * Many of the values are included to get past range limits imposed by the ustar format
- * particular for string length and charcter set or shortish integral values.  <ekyword>
- * and <value> below are UTF-8.
- *
- * values in the header are string values written as with a 'printf' using the form
- *	printf("%d %s=%s\n",<length>,<keyword>,<value>)
- *
- * <length> is described ambiguously as 
- *	"The <length> field shall be the decimal length of the extended header record in octets,
- *	 including the trailing <newline>."
- * So does that include the length of <length>? or not?
- *
- * The field <keyword> is allowed in a pax Extended Header include but are not limited to
- *	atime		time_t but with fractional seconds maybe
- *	charset		enumeration list
- *	comment		human readable comments
- *	gid		integer gid allowing numbers greater than ustar limit of 2097151 (07777777)
- *	gname		over rides xhdr gid and ustar gname and gid
- *	linkpath
- *	mtime		time_t but with franctional seconds maybe
- *	path
- *	realtime.<ANY>
- *	security.<ANY>
- *	size
- *	uid		integer uid allowing numbers greater than ustar limit of 2097151 (07777777)
- *	uname
- * Any other keywords desired can be included but might not be meaningful to many applications.
- * Keyword can have pretty much any character in it except '='.
- *
- * <value> is a UTF-8 string that ends with the '\n'.
- * 
- *
- * charset is limited to (omit the quotation marks)
- *      <value>			  Formal Standard
- * "ISO-IR 646 1990"		ISO/IEC 646:1990
- * "ISO-IR 8859 1 1998"		ISO/IEC 8859-1:1998
- * "ISO-IR 8859 2 1999"		ISO/IEC 8859-2:1999
- * "ISO-IR 8859 3 1999"		ISO/IEC 8859-3:1999
- * "ISO-IR 8859 4 1998"		ISO/IEC 8859-4:1998
- * "ISO-IR 8859 5 1999"		ISO/IEC 8859-5:1999
- * "ISO-IR 8859 6 1999"		ISO/IEC 8859-6:1999
- * "ISO-IR 8859 7 1987"		ISO/IEC 8859-7:1987
- * "ISO-IR 8859 8 1999"		ISO/IEC 8859-8:1999
- * "ISO-IR 8859 9 1999"		ISO/IEC 8859-9:1999
- * "ISO-IR 8859 10 1998"	ISO/IEC 8859-10:1998
- * "ISO-IR 8859 13 1998"	ISO/IEC 8859-13:1998
- * "ISO-IR 8859 14 1998"	ISO/IEC 8859-14:1998
- * "ISO-IR 8859 15 1999"	ISO/IEC 8859-15:1999
- * "ISO-IR 10646 2000"		ISO/IEC 10646:2000
- * "ISO-IR 10646 2000 UTF-8"	ISO/IEC 10646, UTF-8 encoding
- * "BINARY"			None.
- */
-typedef enum pax_charset
-{
-    PAX_CS_NOT_SPECIFIED,
-    PAX_CS_ISO_IR_646_1990,
-    PAX_CS_ISO_IR_8859_1_1998,
-    PAX_CS_ISO_IR_8859_2_1999,
-    PAX_CS_ISO_IR_8859_3_1999,
-    PAX_CS_ISO_IR_8859_4_1998,
-    PAX_CS_ISO_IR_8859_5_1999,
-    PAX_CS_ISO_IR_8859_6_1999,
-    PAX_CS_PAX_CS_ISO_IR_8859_7_1997,
-    PAX_CS_ISO_IR_8859_8_1999,
-    PAX_CS_ISO_IR_8859_9_1999,
-    PAX_CS_ISO_IR_8859_10_1998,
-    PAX_CS_ISO_IR_8859_13_1998,
-    PAX_CS_ISO_IR_8859_14_1998,
-    PAX_CS_ISO_IR_8859_15_1998,
-    PAX_CS_ISO_IR_1064_2000,
-    PAX_CS_ISO_IR_1064_2000_UTF_8,
-    PAX_CS_BINARY
-} pax_charset;
-
-static const char * pax_charset_strings[] = 
-{
-    "Not Specified",
-    "ISO-IR 646 1990",
-    "ISO-IR 8859 1 1998",
-    "ISO-IR 8859 2 1999",
-    "ISO-IR 8859 3 1999",
-    "ISO-IR 8859 4 1998",
-    "ISO-IR 8859 5 1999",
-    "ISO-IR 8859 6 1999",
-    "ISO-IR 8859 7 1987",
-    "ISO-IR 8859 8 1999",
-    "ISO-IR 8859 9 1999",
-    "ISO-IR 8859 10 1998",
-    "ISO-IR 8859 13 1998",
-    "ISO-IR 8859 14 1998",
-    "ISO-IR 8859 15 1999",
-    "ISO-IR 10646 2000",
-    "ISO-IR 10646 2000 UTF-8",
-    "BINARY",
-    NULL
-};
-
-static pax_charset pax_xhdr_parse_charset_string(char*string)
-{
-    int ix;		/* index */
-    const char * ps;	/* pointer to string */
-
-    for (ps = pax_charset_strings[ix= 0]; ps; ps = pax_charset_strings[++ix])
-	if (strcmp(ps,string) == 0)
-	    return ix;
-    return PAX_CS_NOT_SPECIFIED;	/* matched none so set it to not specified */
-}
-
-typedef struct pax_xheader pax_xheader;
-struct pax_xheader
-{
-    char *	path;		/* supercedes .posix.name */
-    char *	linkpath;	/* supercedes .posix.linkname */
-    char *	uname;		/* user name supercedes .posix.uname uid and .posix.uid */
-    char *	gname;		/* group name supercedes .posix.gname gid and .posix.gid */
-    time_t	atime;		/* supercedes .posix.atime */
-    time_t	mtime;		/* supercedes .posix.mtime */
-    uid_t	uid;		/* supercedes .posix.uid */
-    uint32_t	gid;		/* supercedes .posix.gname */
-    uint64_t	size;		/* supercedes .posix.size */
-    pax_charset	charset;	/* not supported by us? */
-};
-
-static pax_xheader *	pax_xhdr_create (void)
-{
-    pax_xheader * pxv = malloc (sizeof(pax_xheader));
-    memset (pxv,0,sizeof(pax_xheader));
-    return pxv;
-}
-
-static void	pax_xhdr_delete(pax_xheader * self)
-{
-    if (self->path)
-	free (self->path);
-    if (self->linkpath)
-	free (self->linkpath);
-    if (self->uname)
-	free (self->uname);
-    if (self->gname)
-	free (self->gname);
-    free (self);
-}
-
-static rc_t  pax_xhdr_set_general_string (char ** str, const char * val)
-{
-    size_t	len;	/* how much memory */
-    char      *	nl;	/* point to any new line in source */
-    rc_t	rc = 0;	/* return code; assume success */
-
-    if (*str)		/* if already set, free the old value */
-	free (*str);
-    nl = strchr (val, '\n');
-    if (nl)
-    {
-	len = nl - val + 1; /* +1 for NUL */
-    }
-    else
-    {
-        size_t size;
-        len = string_measure(val, &size) + 1;
-    }
-    *str = malloc (len);
-    if (*str)
-    {
-        string_copy(*str, len, val, len-1);
-        (*str)[len-1] = '\0'; /* if it was a '\n' terminated value this is needed not worth the check if needed */
-    }
-    else
-    {
-	rc = RC(rcFS/*?*/,rcAllocating,0/*?*/,rcNoObj/*?*/,rcNull); /* well its not 0 */
-    }
-    return rc;
-}
-
-/* ----------
- * new_path points to a string that ends with either a '\n' or a NUL
- */
-LIB_EXPORT rc_t CC pax_xhdr_set_path(pax_xheader * self, char * new_path)
-{
-    return pax_xhdr_set_general_string(&(self->path),new_path);
-}
-
-/* ----------
- * new_path points to a string that ends with either a '\n' or a NUL
- */
-LIB_EXPORT rc_t CC pax_xhdr_set_linkpath(pax_xheader * self, char * new_path)
-{
-    return pax_xhdr_set_general_string(&(self->linkpath),new_path);
-}
-
-/* ----------
- * new_name points to a string that ends with either a '\n' or a NUL
- */
-LIB_EXPORT rc_t CC pax_xhdr_set_uname(pax_xheader * self, char * new_name)
-{
-    return pax_xhdr_set_general_string(&(self->uname),new_name);
-}
-
-/* ----------
- * new_name points to a string that ends with either a '\n' or a NUL
- */
-LIB_EXPORT rc_t CC pax_xhdr_set_gname(pax_xheader * self, char * new_name)
-{
-    return pax_xhdr_set_general_string(&(self->gname),new_name);
-}
-
-LIB_EXPORT bool CC pax_xhdr_get_general_string (char**src, char**dst, size_t max)
-{
-    size_t size;
-    if (string_measure(*src, &size) > max-1)	/* fail if too big for target */
-    {
-        return false;
-    }
-    string_copy(*dst, max, *src, size);
-    return true;
-}
-
-LIB_EXPORT rc_t CC pax_xhdr_get_path(pax_xheader * self, char ** path, size_t max)
-{
-    return (pax_xhdr_get_general_string(&self->path,path,max))? 0 : ~0;
-}
-
-LIB_EXPORT rc_t CC pax_xhdr_get_linkpath(pax_xheader * self, char ** path, size_t max)
-{
-    return (pax_xhdr_get_general_string(&self->linkpath,path,max))? 0 : ~0;
-}
-
-LIB_EXPORT rc_t CC pax_xhdr_get_uname(pax_xheader * self, char ** name, size_t max)
-{
-    return (pax_xhdr_get_general_string(&self->uname,name,max))? 0 : ~0;
-}
-
-LIB_EXPORT rc_t CC pax_xhdr_get_gname(pax_xheader * self, char ** name, size_t max)
-{
-    return (pax_xhdr_get_general_string(&self->gname,name,max))? 0 : ~0;
-}
-
-/* ----------
- * The mtime and atime <value> is defined as
- *	The pax utility shall write an mtime record for each file in write
- *	or copy modes if the file's modification time cannot be represented
- *	exactly in the ustar header logical record described in ustar
- *	Interchange Format. This can occur if the time is out of ustar range,
- *	or if the file system of the underlying implementation supports
- *	non-integer time granularities and the time is not an integer. All of
- *	these time records shall be formatted as a decimal representation of
- *	the time in seconds since the Epoch. If a period ( '.' ) decimal
- *	point character is present, the digits to the right of the point shall
- *	represent the units of a subsecond timing granularity, where the first
- *	digit is tenths of a second and each subsequent digit is a tenth of
- *	the previous digit. In read or copy mode, the pax utility shall
- *	truncate the time of a file to the greatest value that is not greater
- *	than the input header file time. In write or copy mode, the pax
- *	utility shall output a time exactly if it can be represented exactly
- *	as a decimal number, and otherwise shall generate only enough digits
- *	so that the same time shall be recovered if the file is extracted on a
- *	system whose underlying implementation supports the same time
- *	granularity.
- *
- * So...
- * Looks like for our purposes we ignore anything after a possible decimal
- * point and just use the integer part of whatever is there and just not be
- * to worried about it since we aren't creating any of this, just reading ie.
- */
-static rc_t	pax_xhdr_set_general_time (const char * ts, time_t * tt)
-{
-    uint64_t temp = strtou64(ts,NULL,10); /* tosses decimal part for us */
-
-    if (temp)
-        *tt = (time_t)temp;
-    return temp ? 0 : ~0;
-}
-
-/* ======================================================================
- * This is the data accumulated for each entry in a tar file.
- */
-static struct	tar_entry_data
-{
-    /* -----
-     * We are not using linux (or other O/S specific) type here because the ranges
-     * for the system creating the archive might have larger types than the system
-     * we are running on.  We'll leave it to the outside caller of this program to
-     * "make it fit".
-     */
-
-    
-    entry_type	type;
-
-    char *	path;
-    char *	link;
-
-    uint64_t	size;
-    uint64_t	offset;
-
-    mode_t	mode;
-
-    char *	uname;
-    uid_t	uid;
-
-    char *	gname;
-    uint32_t	gid;
-
-    time_t	mtime;
-    time_t	atime;
-    time_t	ctime;
-
-} tar_entry_data;
-#endif
-/* ======================================================================
- * Mapping a memory region
- *
- * This will have two versions:
- *	initially for development it will make raw Linux O/S calls
- *	quickly it will be ported to use KFS structures instead
- */
-/* -----
- * Use a map window size of a gigabyte
- * Life would be really bad if a single header was with in pagesize of that gigabyte
- * This assumes that a gigabyte is a multiple of system pagesize - a very safe bet.
- */
-#define	MAP_WINDOW_SIZE	(1024*1024*1024)
-
-/* ----------
- * map_tar_file
- *
- * This function uses existing members of the ktar state structure and a single parameter
- * to decide what part of a file to map.
- *
- * IN: offset: 	an uint64_t type of where the starting point with in the file the memory mapped region
- *		should start
- * SIDE:	side effects are a freeing of any existing memory mapped region of a file and
- *		if successful mappinga region it will have mapped that region and put real
- *		parameters describing that region in the private memory block
- */
-static
-rc_t map_tar_file (KTarState * self, uint64_t requested_offset)
-{
-    rc_t  ret = 0;
-
-    /* -----
-     * If we are mapping for the first time
-     */
-    if (self->kmmap == NULL)
-    {
-	ret = KMMapMakeMaxRead(&self->kmmap,self->kfile);
-	if (ret)
-	    return ret;
-	ret = KMMapSize(self->kmmap, &self->buffer_length);
-	if (ret)
-	    return ret;
-    }
-    /* -----
-     * if we are remapping the region
-     */
-    else
-    {
-	ret = KMMapReposition(self->kmmap, requested_offset, &self->buffer_length);
-	if (ret)
-	    return ret;
-    }
-    ret = KMMapAddrRead(self->kmmap, &self->map);
-    if (ret)
-	return ret;
-    ret = KMMapPosition(self->kmmap, &self->buffer_start);
-    if (ret)
-	return ret;
-    ret = KMMapSize(self->kmmap, &self->buffer_length);
-    if (ret)
-	return ret;
-    self->buffer_limit = self->buffer_start + self->buffer_length;
-
-    return ret;
-}
-
-static
-rc_t release_map (KTarState * self)
-{
-    KMMapRelease (self->kmmap);
-    self->kmmap = NULL;
-    return 0;
-}
-
-/* ======================================================================
- *
- * offset is the byte position within the tar file
- * hard_limit is the byte position with in the tar file that is not mapped
- *
- * This is the ugliest function/method in the whole module.  The extensions
- * to the tar header are not done in a consistent manner so convolutions
- * have to be made to support all manner of extensions.
- */
-static
-uint64_t process_one_entry (KTarState * self, uint64_t offset, uint64_t hard_limit, bool silent)
-{
-    /* -----
-     * full_path will store the full path of an element which can be longer than 
-     * will fit in the standard tar header.  This will also usually be an output
-     * to the consumer.
-     */
-    char full_path [ 4096 ];
-
-    /* -----
-     * full_path will store the full link (if any) of an element which can be longer than 
-     * will fit in the standard tar header.  This will also usually be an output
-     * to the consumer.
-     */
-    char full_link [ 4096 ];
-
-    /* -----
-     * data_offset will index into the tar file where the data portion for the current header
-     * lies. (Usually at the address of the header + 512)  This will also usually be an output
-     * to the consumer.
-     */
-    uint64_t data_offset = 0;
-
-    /* -----
-     * data_size will hold the size of the data portion for the current header.  This will also
-     * usually be an output to the consumer.
-     */
-    uint64_t data_size = 0;
-
-    /* -----
-     * virtual_data_size will hold the virtual size of a sparse file.  This will also
-     * usually be an output to the consumer.
-     */
-    uint64_t virtual_data_size = 0;
-    /* -----
-     * type is an enumerated type that described the format of the tar header.  Its initialized
-     * to an invalid header type.
-     */
-    tar_header_type	type = TAR_UNDEFINED;
-
-    /* -----
-     * link is an enumerated type that described the contents of this element.
-     */
-    tar_link link = LINK_OLDNORMAL_FILE;
-
-#if _DEBUGGING && 0
-/* We are not using these components of the tar header block at this point 
- * but with a debug build it doesn't hurt to verify we fully understand the
- * header.
- */
-    uid_t  uid = 0;
-    uint32_t gid = 0;
-#endif
-    time_t mtime = 0;
-    mode_t mode = 0;
-
-    /* -----
-     * current_offset is the offset of the current header which might be a different header 
-     * than the one we started with.
-     */
-    uint64_t current_offset = offset;
-
-    /* -----
-     * we can access the header either as a sequence of bytes or as a
-     * header structure.  That header can further be accessed as one of
-     * several more specific types of header.
-     */
-    union
-    {
-        const uint8_t *    b;
-        const tar_header * h;
-    } current_header;
-
-    /* -----
-     * done is a flag as to when we are finished processing a tar element
-     * that might have multiple headers and other elements
-     */
-    bool done = false;
-
-    /* -----
-     * gnu_sparse is a flag that we are currently inside a sparse file
-     * with in the TAR and have more sparse header elements to parse
-     */
-    bool gnu_sparse = false;
-
-    TAR_FUNC_ENTRY();
-
-    /* -----
-     * check right away to make sure we are still in our memory mapped window
-     */
-    if (offset > self->buffer_limit)
-    {
-        /* -----
-         * if not bail and say we couldn't consume any bytes
-         */
-        return 0;
-    }
-
-    /* -----
-     * clear the full name and link name entries
-     */
-    memset (full_path, 0, sizeof(full_path));
-    memset (full_link, 0, sizeof(full_link));
-
-    /* -----
-     * set the header at the current TAR block.
-     * That is the map starts at offset buffer_start and we are at 
-     * current_offset into the file so we take the map as a pointer
-     * and add to it the difference between our current offset and the map's
-     * initial offset (first header is at map + 0 - 0)
-     */
-    current_header.b = (const uint8_t *)self->map + current_offset - self->buffer_start;
-    /* -----
-     * start processing
-     */
-    do
-    {
-        TAR_DEBUG (( "Processing one block at (%lu), it is sparse? %s\n",
-                     current_offset, get_bool_string(gnu_sparse)));
-
-        /* -----
-         * what we will do depends upon the type of this block
-         */
-        type = gnu_sparse ? TAR_SPARSE : what_header_type(current_header.h);
-        if (self->found_zero_block)
-        {
-            if (self->found_second_zero_block == true)
-            {
-                type = TAR_ZERO_BLOCK; /* skip anyway */
-            }
-            else if (type == TAR_ZERO_BLOCK)
-            {
-                self->found_second_zero_block = true;
-            }
-            else
-            {
-                if ( ! silent )
-                {
-                    PLOGMSG(klogErr,(klogErr,
-                        "Found Extra Header after a block of zeros $(O)",
-                        PLOG_U64(O), offset));
-                }
-                return -1;
-            }
-        }
-        switch (type)
-        {
-        case TAR_ZERO_BLOCK:
-        {
-            self->found_zero_block = true;
-            done = true;
-            break;
-        }
-        case TAR_SPARSE:
-        {
-            /* -----
-             * If there is an extension header we'll have different work to do
-             */
-#if 0
-            if (current_header.h->sparse.isextended)
-            {
-                LOGMSG (klogDebug3,"isextended true");
-            }
-            else
-            {
-                LOGMSG (klogDebug3,"isextended false");
-            }
-#endif
-            {
-                int64_t  ix;
-                uint64_t of;
-                uint64_t sz;
-
-                for (ix = 0; ix< GNU_SPARSES_IN_EXTRA_HEADER; ++ix)
-                {
-                    rc_t ret;
-                    of = tar_strtoll((const uint8_t*)current_header.h->sparse.sparse[ix].offset,
-                                     TAR_SIZE_LEN);
-                    sz = tar_strtoll((const uint8_t*)current_header.h->sparse.sparse[ix].num_bytes,
-                                     TAR_SIZE_LEN);
-                    if (sz == 0)
-                    {
-                        break;
-                    }
-#if 0
-                    PLOGMSG ((klogDebug4, 
-                              "SPARSE ext: $(count): $(offset) $(size)",
-                              PLOG_3(PLOG_I64(count),PLOG_X64(offset),PLOG_X64(size)),
-                              ix,
-                              of,
-                              sz));
-#endif
-
-                    ret = sparse_data_push (&self->sparse_q, of, sz);
-                    if (ret)
-                    {
-                        sparse_data_kill(&self->sparse_q);
-                        return -1;
-                    }
-                    ++self->num_chunks;
-                }
-            }
-        }
-        break;
-
-#if 0
-        /*Same as the default case */
-        case TAR_CPIO:
-            PLOGMSG ((klogErr,
-                      "unsupported header type $(type) $(string)",
-                      "type=%d,string=%s",
-                      type, get_type_string(type)));
-            done = true;
-            break;
-#endif
-
-        default:
-            if ( ! silent )
-            {
-                PLOGMSG (klogErr,(klogErr,
-                                  "unsupported header type $(type) $(string)",
-                                  "type=%d,string=%s",
-                                  type, get_type_string(type)));
-            }
-            done = true;
-            break;
-
-        case TAR_GNU_89:
-        case TAR_V7:
-        case TAR_POSIX:
-            /* -----
-             * almost anything we do will depend upon the size of the data for this block
-             *
-             * this will be wrong if we ever support cpio...
-             */
-            data_size = (uint64_t)(tar_strtoll((uint8_t*)current_header.h->tar.size,TAR_SIZE_LEN));
-#if _DEBUGGING && 0
-            uid =  (tar_strtoll((uint8_t*)current_header.h->tar.uid,TAR_ID_LEN));
-            gid =  (tar_strtoll((uint8_t*)current_header.h->tar.gid,TAR_ID_LEN));
-#endif
-            mtime = (tar_strtoll((uint8_t*)current_header.h->tar.mtime,TAR_TIME_LEN));
-            mode = (uint32_t)(tar_strtoll((uint8_t*)current_header.h->tar.mode,TAR_MODE_LEN));
-        }
-
-        /* -----
-         * Sometimes we are done just by identifying the header type.
-         * If so we break the loop here.
-         */
-        if (done)
-        {
-            /* -----
-             * point at the next header block
-             * Add the size of the header itself plus enough block sizes of data to cover
-             * any associated data.
-             */
-            size_t header_plus_data_block_size = (1+BLOCKS_FOR_BYTES(data_size))*TAR_BLOCK_SIZE;
-            current_offset += (uint64_t)header_plus_data_block_size;
-            current_header.b += header_plus_data_block_size;
-            break;
-        }
-
-        /* -----
-         * several extensions to USTAR/TAR format headers involve
-         * prepending another header type to give a name longer 
-         * than will fit in tthe header itself.  If we had one of
-         * those use that name.  But if the full path has not been
-         * set use the path from this header.
-         */
-        if (full_path[0] == 0) /* if full_path wasn't filled in by an 'L' long name */
-        {
-            size_t len, size;
-            /* -----
-             * if there is a prefix (POSIX style) use it
-             * copy the prefix and then concatenate the name field
-             */
-            if (current_header.h->posix.prefix[0])
-            {
-#if 0
-                PLOGMSG ((klogDebug1,
-                          "used a posix prefix $(prefix)",
-                          "prefix=%s",
-                          current_header.h->posix.prefix));
-#endif
-                /* -----
-                 * copy in the prefix, force a NUL just in case. then add a directory divider 
-                 */
-                string_copy(full_path, sizeof(full_path), current_header.h->posix.prefix, TAR_PREFIX_LEN);
-                full_path[TAR_PREFIX_LEN] = 0x00;
-                strcat(full_path,"/");
-            }
-
-            strncat(full_path,current_header.h->tar.name,TAR_NAME_LEN);
-            len = string_measure(full_path, &size);
-            while (len > 1)
-            {
-                if (full_path[len-1] == '/')
-                    len--;
-                else
-                    break;
-            }
-            full_path[len] = '\0';
-        }
-        link = current_header.h->tar.link;
-        TAR_DEBUG(("link = %s(%c)\n",get_link_string(link),link));
-        switch (link)
-        {
-        case LINK_SPARSE:
-            /* -----
-             * If there is an extension header we'll have different work to do
-             */
-            if (current_header.h->gnu_89.isextended)
-            {
-                /* -----
-                 * If we have an extended header following make sure there is room
-                 */
-                if ( (uint64_t)( offset + 2 * sizeof(tar_header) ) > hard_limit )
-                    return 0;
-                done = false;
-                gnu_sparse = true;	/* next block will be part of the header and not data */
-                data_offset = offset + 2 * sizeof(tar_header);
-            }
-            else
-            {
-                done = true;
-                gnu_sparse = false;
-                data_offset = offset + sizeof(tar_header);
-            }
-
-            done = (bool)! current_header.h->gnu_89.isextended;
-            {
-                int32_t ix;
-                rc_t	ret;
-
-                virtual_data_size = (uint64_t)(tar_strtoll((uint8_t*)current_header.h->gnu_89.realsize,TAR_SIZE_LEN));
-
-                for (ix = 0; ix< GNU_SPARSES_IN_OLD_HEADER; ++ix)
-                {
-                    uint64_t soffset = tar_strtoll((const uint8_t*)current_header.h->gnu_89.sparse[ix].offset,
-                                                   TAR_SIZE_LEN);
-                    uint64_t ssize = tar_strtoll((const uint8_t*)current_header.h->gnu_89.sparse[ix].num_bytes,
-                                                 TAR_SIZE_LEN);
-                    if (ssize == 0)
-                    {
-                        break;
-                    }
-
-                    ret = sparse_data_push (&self->sparse_q, soffset, ssize);
-                    if (ret) 
-                    {
-                        sparse_data_kill(&self->sparse_q);
-                        return -1;
-                    }
-                    ++self->num_chunks;
-                }
-            }
-            data_offset = current_offset + sizeof(tar_header);
-            break;
-
-        case LINK_OLDNORMAL_FILE:		/* deprecated normal file */
-            /* -----
-             * this should only happen with LINK_OLDNORMAL_FILE
-             *
-             * If the type is file but the last character in the path is "/"
-             * treat it as a directory instead
-             */
-        {
-            size_t size;
-            if (full_path[string_measure(full_path, &size)-1] == '/')
-            {
-                link = LINK_DIRECTORY;
-            }
-        }
-	    /* fall through */
-        case LINK_NORMAL_FILE:
-        case LINK_CONTIGUOUS_FILE:
-        case LINK_DIRECTORY:
-            data_offset = current_offset + sizeof(tar_header);
-            done = true;
-            break;
-
-            /* since we do not extract for tar files, a symlink and a hardlink
-             * are the same to us */
-        case LINK_HARD_LINK:
-        case LINK_SYMBOLIC_LINK:
-            if (full_link[0] == 0)
-            {
-                string_copy(full_link, sizeof(full_link), current_header.h->tar.linkname, TAR_NAME_LEN);
-            }
-            done = true;
-            break;
-            
-            /* ----------
-             * These types we ignore and they are defined to not have a data size
-             */
-        case LINK_CHARACTER_SPECIAL:
-        case LINK_BLOCK_SPECIAL:
-        case LINK_FIFO:
-        case LINK_INODE_METADATA:
-            /* -----
-             * Nothing to be done
-             */
-            TAR_DEBUG (("%s: ignored block link type %s(%c) @ %lu\n",
-                        __func__,
-                        get_link_string(current_header.h->tar.link),
-                        get_link_string(current_header.h->tar.link),
-                        (uint64_t)(current_offset)+(uint64_t)(OFFSET_OF(tar_v7_header,link)))); 
-            data_size = 0; /* data size is specifically to be ignored */
-            done = true;
-            break;
-            
-            /* ----------
-             * These types we ignore as a final block or a block unto themselves and are
-             * not part of a series of blocks and they are defined to have a data size
-             */
-        case LINK_PAX_GLOBAL_XHDR:
-        case LINK_GNU_DUMPDIR: /* we are just gonna ignore this and not treat it like LINK_DIRECTORY */
-        case LINK_SOLARIS_ACL_FILE:
-        case LINK_VOLUME_NAME:
-        case LINK_MULTI_VOLUME:
-            TAR_DEBUG (("%s: ignored block link type %s(%c) %lu @ %lu\n",
-                        __func__,
-                        get_link_string(current_header.h->tar.link),
-                        get_link_string(current_header.h->tar.link),
-                        data_size,
-                        (uint64_t)(current_offset)+(uint64_t)(OFFSET_OF(tar_v7_header,link)))); 
-            done = true;
-            break;
-            
-            /* ----------
-             * These types we ignore as a block with in a series of blocks
-             * and they are defined to have a data size
-             *
-             * Nothing to be done
-             */
-        case LINK_SOLARIS_ACL:
-        case LINK_PAX_XHDR:	/* posix extended */
-            /* -----
-             */
-            TAR_DEBUG (("%s: ignored block link type %s(%c) @ %lu\n",
-                        __func__,
-                        get_link_string(current_header.h->tar.link),
-                        get_link_string(current_header.h->tar.link),
-                        (uint64_t)(current_offset)+(uint64_t)(OFFSET_OF(tar_v7_header,link)))); 
-            break;
-            
-            /* some link types we ignore this block */
-        default:
-            TAR_DEBUG (("%s: Ignoring block with link %s(%c/%02.2x) @ %lu\n",
-                        __func__, 
-                        get_link_string(current_header.h->tar.link),
-                        current_header.h->tar.link,
-                        (unsigned)(current_header.h->tar.link),
-                        (uint64_t)(current_offset)+(uint64_t)(OFFSET_OF(tar_v7_header,link))));
-            break;
-            
-        case LINK_NEXT_LONG_LINK:	/* long link name */
-            /* -----
-             * Long link name needs access now to its full set of data blocks, request a window shift 
-             * if it is not currently accessible
-             */
-            if ( (uint64_t)( offset + sizeof( tar_header ) + data_size ) > hard_limit )
-                return 0;
-            
-            string_copy(full_link, sizeof(full_link), (char*)(current_header.b + sizeof(tar_header)), data_size);
-            break;
-        case LINK_NEXT_LONG_NAME:	/* long path name */
-            /* -----
-             * Long path name needs access now to its full set of data blocks, request a window shift 
-             * if it is not currently accessible
-             */
-            if ( (uint64_t)( offset + sizeof( tar_header ) + data_size ) > hard_limit )
-            {
-                return 0;
-            }
-            
-            string_copy(full_path, sizeof(full_path), (char*)(current_header.b + sizeof(tar_header)), data_size);
-            break;
-        }
-        
-        /* -----
-         * move the current header offset to past the data blocks
-         */
-        if (link == LINK_SPARSE)
-        {
-            current_offset += sizeof (tar_header);
-            current_header.b += sizeof(tar_header);
-        }
-        else
-        {
-            current_offset += sizeof (tar_header)+ ((data_size+TAR_BLOCK_SIZE-1)/TAR_BLOCK_SIZE)*TAR_BLOCK_SIZE;
-            current_header.b += sizeof(tar_header) + ((data_size+TAR_BLOCK_SIZE-1)/TAR_BLOCK_SIZE)*TAR_BLOCK_SIZE;
-        }
-        /* -----
-         * if that is past the currently available
-         * quit the parse of this entry asn ask for a window shift, yeah, we'll redo work
-         * but its far simpler code to just start over than track being in the middle
-         */
-        if ((!done) && (current_offset >= hard_limit))
-        {
-            return 0;
-        }
-        
-    } while (! done);
-    
-    /* -----
-     * generate output for this entry
-     */
-    switch (type)
-    {
-    default:
-        if ( ! silent )
-        {
-            PLOGMSG (klogErr,(klogErr,"Unhandled Header Block Type $(type):$(typeint)","type=%c,typeint=%d",type ? type : '0',type));
-        }
-        return RC (rcFS, rcArc, rcParsing, rcData, rcUnsupported);
-    case TAR_ZERO_BLOCK:
-#if 0
-        LOGMSG (klogDebug1, "Zero Block");
-#endif
-        /* ignored */
-        break;
-
-    case TAR_CPIO:
-    case TAR_V7:
-    case TAR_POSIX:
-#if 0
-    case TAR_PAX:
-#endif
-    case TAR_SUN:
-    case TAR_STAR_85:
-    case TAR_STAR_94:
-    case TAR_GNU_89:
-#if 0
-    case TAR_GNU_01:
-#endif
-    case TAR_SPARSE:
-        /* -----
-         * TODO:
-         *	implement a header checksum routine call it here, and return -1 if the check sum fails
-         */
-        if (gnu_sparse)
-        {
-#if 0
-            PLOGMSG ((klogDebug3,
-                      "Need to create a file but gnu_sparse is true $(l)",
-                      PLOG_U8(l),
-                      link
-                         ));
-#endif
-            link = LINK_SPARSE;	/* faking it for the next section */
-        }
-        switch (link)
-        {
-        case LINK_OLDNORMAL_FILE:
-        case LINK_NORMAL_FILE:
-        case LINK_CONTIGUOUS_FILE:
-#if 0
-            LOGMSG (klogDebug3, "KTocCreateFile");
-#endif
-            TAR_DEBUG (("%s call KTocCreateFile '%c':%hhd\n", __func__, link, link));
-            KTocCreateFile (self->toc,
-                            data_size?data_offset:0,
-                            data_size,
-                            mtime,
-                            mode,
-                            (KCreateMode)(kcmInit|kcmParents),
-                            full_path);
-            /* -----
-             * TODO:
-             *	print something if extraneous fields found
-             */
-            break;
-        case LINK_HARD_LINK:
-            TAR_DEBUG (("%s call KTocCreateHardLink\n", __func__));
-            KTocCreateHardLink (self->toc, mtime, mode,
-                                (KCreateMode)(kcmInit|kcmParents),
-                                full_link, full_path);
-            /* -----
-             * TODO:
-             *	print something if extraneous fields found
-             */
-            break;
-        case LINK_SYMBOLIC_LINK:
-            TAR_DEBUG (("%s call KTocCreateSoftLink\n", __func__));
-            KTocCreateSoftLink (self->toc, mtime, mode,
-                                (KCreateMode)(kcmInit|kcmParents),
-                                full_link, full_path);
-            /* -----
-             * TODO:
-             *	print something if extraneous fields found
-             */
-            break;
-
-        case LINK_SPARSE:
-            TAR_DEBUG (("%s LINK_SPARSE current_offset %jx: data_offset %jx: data_size %jx\n",
-                        __func__, current_offset, data_offset, data_size));
-            make_chunk_list(self, data_offset);
-            KTocCreateChunkedFile (self->toc,
-                                   virtual_data_size,
-                                   mtime, mode,
-                                   self->num_chunks,
-                                   self->chunks,
-                                   (KCreateMode)(kcmInit|kcmParents), 
-                                   full_path);
-            whack_chunk_list (self);
-            break;
-        case LINK_CHARACTER_SPECIAL:
-        case LINK_BLOCK_SPECIAL:
-        case LINK_FIFO:
-        case LINK_VOLUME_NAME:
-        case LINK_SOLARIS_ACL:
-        case LINK_GNU_DUMPDIR:
-        case LINK_SUN_XHDR:
-        case LINK_INODE_METADATA:
-            TAR_DEBUG ( ( "%s ignored entry type %s linktype name  %s\n",
-                          __func__, get_link_string( link ), full_path ) );
-            /* ignore */
-            break;
-        case LINK_DIRECTORY:
-            TAR_DEBUG (("%s call KTocCreateDir\n", __func__));
-            KTocCreateDir (self->toc, mtime, mode, (KCreateMode)(kcmOpen|kcmParents), full_path);
-            /* -----
-             * TODO:
-             *	print something if extraneous fields found?
-             */
-            break;
-        default:
-            if ( ! silent )
-            {
-                PLOGMSG(klogErr,(klogErr,
-                                 " type ($(type)) name ($(name() link ($(link)) size ($(size)) offset ($(offset))",
-                                 "type=%s,name=%s,link=%s,size=%lld,offset=%lld",
-                                 get_type_string(type),
-                                 full_path,
-                                 full_link,
-                                 data_size,
-                                 data_offset));
-            }
-            break;
-        }
-        break;
-    }
-    return current_offset - offset;
-}
-
-
-static
-rc_t KArcParseTAR_intern ( KToc * self, 
-                           const void * kvoid,
-                           bool silent )
-{
-    KTarState state;
-    /* -----
-     * offset is the running index into the file of where the first tar header
-     *          for the next element should start
-     */
-    uint64_t offset;
-    /* -----
-     * used is the count of bytes used for headers, storage and padding of the last
-     *          examined element
-     */
-    uint64_t used;
-    uint64_t filesize;
-    const KFile * kfile = kvoid;
-    rc_t rc;
-
-    TAR_FUNC_ENTRY();
-
-    /* -----
-     * save the KFS File and TOC references
-     */
-
-    if ( kfile == NULL )
-    {
-        if ( !silent )
-            LOGMSG ( klogFatal, "Called with a bad KFile parameter" );
-        return RC (rcFS, rcArc, rcParsing, rcParam, rcNull );
-    }
-    else if ( self == NULL )
-    {
-        if ( !silent )
-            LOGMSG (klogFatal, "Called with a bad KToc parameter");
-        return RC (rcFS, rcArc, rcParsing, rcSelf, rcNull );
-    }
-
-    memset (&state, 0, sizeof (state));
-    state.kfile = kfile;
-    state.toc = self;
-
-    if ( ( rc = KFileSize ( state.kfile, &filesize ) ) != 0 )
-    {
-        if ( !silent )
-            LOGERR ( klogFatal, rc, "Failed to get file size of tarfile" );
-    }
-    else if ( filesize == 0 )
-    {
-        rc = RC ( rcFS, rcArc, rcAccessing, rcArc, rcEmpty );
-        if ( !silent )
-            LOGERR( klogFatal, rc, "Empty file" );
-    }
-    else if ( ( rc = map_tar_file ( &state, 0 ) ) != 0 )
-    {
-        if ( !silent )
-            PLOGMSG( klogFatal, 
-                    ( klogFatal, "Failed to $(operation) of size $(size)",
-                      "operation=%s,size=%lu", "mmap", filesize ) );
-        return rc;
-    }
-    else
-    {
-        int stalled = 0;
-
-        for ( offset = 0; offset < filesize; )
-        {
-            /* -----
-             * evaluate the tar file header at the current offset into the file
-             *
-             * the return is a positive number of bytes used
-             * OR a negative on a file parse error
-             * OR zero for a file that would exceed the current window
-             */
-            used = process_one_entry ( &state, offset, state.buffer_limit, silent );
-
-            if ( used == 0 )
-                stalled ++;
-            else
-                stalled = 0;
-
-            /* kill any left over sparse data - safely handles an empty queue */
-            sparse_data_kill ( &state.sparse_q );
-
-            if ( state.found_second_zero_block )
-            {
-                break;
-            }
-            if ( used > 0 )
-            {
-                offset += used;
-            }
-            else if ( used == 0 )   /* if the validate returns 0 we need more buffer */
-            {
-                if ( stalled == 5 ) /* sure why not 5 tries */
-                {
-                    rc = RC ( rcFS, rcArc, rcParsing, rcArc, rcIncomplete );
-                    break;
-                }
-                map_tar_file ( &state, offset ); /* slide the window up to current location */
-                /* -----
-                 * TODO:
-                 *	Handle a repeated call from the same location as a failure in file format
-                 * (truncation) of the tar file
-                 */
-            }
-            else /*if (used < 0)*/		/* if it is negative it means abort the tar file */
-            {
-                rc = RC ( rcFS, rcArc, rcParsing, rcArc, rcUnexpected );
-                break;
-            }
-        }
-        if ( offset > filesize )
-        {
-            rc = RC ( rcFS, rcArc, rcParsing, rcToc, rcIncomplete );
-            TAR_DEBUG (( "%s %R File offset %ju exceeds filesize %ju\n",
-                         __func__, rc, offset, filesize ));
-        }
-        release_map ( &state );
-    }
-    return rc;
-}
-
-/* ======================================================================
- * validating a tar file is listing the files, links and directories
- * in that archive.
- *
- * partial results are not to be accepted in the end but it is the responsibility
- * of the caller to clear them.
- *
- * returns 0 for good archive and -1 for bad archive
- */
-LIB_EXPORT rc_t CC KArcParseTAR ( KToc * self, 
-              const void * kvoid,
-              bool ( CC * ignored )( const KDirectory *, const char *, void * ),
-              void *also_ignored )
-{
-    return KArcParseTAR_intern ( self, kvoid, false );
-}
-
-
-LIB_EXPORT rc_t CC KArcParseTAR_silent ( KToc * self, 
-              const void * kvoid,
-              bool ( CC * ignored )( const KDirectory *, const char *, void * ),
-              void *also_ignored )
-{
-    return KArcParseTAR_intern ( self, kvoid, true );
-}
-
-
-LIB_EXPORT int CC KDirectoryVOpenTarArchiveRead ( struct KDirectory const *self,
-    struct KDirectory const **tar_dir, int chroot, const char *fmt, va_list args )
-{
-    char path [ 4096 ];
-    int size = (args == NULL) ?
-        snprintf  ( path, sizeof path, "%s", fmt ) :
-        vsnprintf ( path, sizeof path, fmt, args );
-    if ( size < 0 || size >= ( int ) sizeof path )
-        return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcExcessive );
-
-    /* putting off parameter validation into this call */
-    return KDirectoryOpenArcDirRead ( self, tar_dir, false, path, tocKFile,
-                                      KArcParseTAR, NULL, NULL );
-}
-
-LIB_EXPORT int CC KDirectoryVOpenTarArchiveRead_silent ( struct KDirectory const *self,
-    struct KDirectory const **tar_dir, int chroot, const char *fmt, va_list args )
-{
-    char path [ 4096 ];
-    int size = (args == NULL) ?
-        snprintf  ( path, sizeof path, "%s", fmt ) :
-        vsnprintf ( path, sizeof path, fmt, args );
-    if ( size < 0 || size >= ( int ) sizeof path )
-        return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcExcessive );
-
-    /* putting off parameter validation into this call */
-    return KDirectoryOpenArcDirRead_silent ( self, tar_dir, false, path, tocKFile,
-                                      KArcParseTAR_silent, NULL, NULL );
-}
-
-
-LIB_EXPORT int CC KDirectoryVOpenTarArchiveRead_silent_preopened ( struct KDirectory const *self,
-    struct KDirectory const **tar_dir, int chroot, const struct KFile * f, const char *fmt, va_list args )
-{
-    char path [ 4096 ];
-    int size = (args == NULL) ?
-        snprintf  ( path, sizeof path, "%s", fmt ) :
-        vsnprintf ( path, sizeof path, fmt, args );
-    if ( size < 0 || size >= ( int ) sizeof path )
-        return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcExcessive );
-
-    /* putting off parameter validation into this call */
-    return KDirectoryOpenArcDirRead_silent_preopened ( self, tar_dir, false, path, tocKFile, 
-                                      (void*)f, KArcParseTAR_silent, NULL, NULL );
-}
-
-
-LIB_EXPORT int CC KDirectoryOpenTarArchiveRead ( struct KDirectory const *self,
-    struct KDirectory const **tar_dir, int chroot, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVOpenTarArchiveRead ( self, tar_dir, chroot, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-LIB_EXPORT int CC KDirectoryOpenTarArchiveRead_silent ( struct KDirectory const *self,
-    struct KDirectory const **tar_dir, int chroot, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVOpenTarArchiveRead_silent ( self, tar_dir, chroot, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-LIB_EXPORT int CC KDirectoryOpenTarArchiveRead_silent_preopened ( struct KDirectory const *self,
-    struct KDirectory const **tar_dir, int chroot, const KFile * f, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDirectoryVOpenTarArchiveRead_silent_preopened ( self, tar_dir, chroot, f, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* ----------
- * Validate that the compiler packed all the character arrays into the correct sizes
- * to use the header.
- *
- * a bunch of magic numbers are in the function because we are making sure that
- * they are reached by using the structure members.  They are listed in comments
- * within comments in the tar_header.h file.
- *
- * No return value
- */
-LIB_EXPORT bool CC validate_header_offsets( void )
-{
-    bool pass_fail = true; /* assume pass */
-#if _DEBUGGING
-    /* -----
-     * checking the size entails making sure the compiler made the structure
-     * the right length to match the series of octents in the file
-     */
-#define	check_size(T,V)     if( sizeof(T) != (size_t)V) { pass_fail = false; printf ("*** BAD_SIZE: %s is %u not %u\n", #T, (unsigned)sizeof(T), (unsigned)V);}
-    /* -----
-     * checking the offset entails making sure the compiler put the field at the
-     * right absolute location within a structure
-     */
-#define	check_offset(T,M,V) if( OFFSET_OF(T,M) != (size_t)V ) { pass_fail = false; printf ("*** BAD_OFFSET: %s.%s is %u not %d\n", #T, #M, (unsigned)OFFSET_OF(T,M), V);}
-
-    check_size(tar_raw_block,512);
-    check_size(tar_v7_header,257);
-    check_size(tar_posix_header,500);
-    check_size(tar_sun_header,512);
-    check_size(tar_star_85_header,512);
-    check_size(tar_star_94_header,512);
-    check_size(tar_gnu_89_header,495);
-    /*check_size(tar_new_gnu_header,512); */
-    check_size(tar_sparse_header,505);
-  
-
-    /* tar_header union */
-    check_offset(tar_header,raw,0);
-    check_offset(tar_header,tar,0);
-    check_offset(tar_header,posix,0);
-    check_offset(tar_header,suntar,0);
-    check_offset(tar_header,star_85,0);
-    check_offset(tar_header,star_94,0);
-    check_offset(tar_header,gnu_89,0);
-    /*check_offset(tar_header,new_gnu,0); */
-    check_offset(tar_header,sparse,0);
-
-    /* tar_v7_header */
-    check_offset(tar_v7_header,name,0);
-    check_offset(tar_v7_header,mode,100);
-    check_offset(tar_v7_header,uid,108);
-    check_offset(tar_v7_header,gid,116);
-    check_offset(tar_v7_header,size,124);
-    check_offset(tar_v7_header,mtime,136);
-    check_offset(tar_v7_header,csum,148);
-    check_offset(tar_v7_header,link,156);
-    check_offset(tar_v7_header,linkname,157);
-
-    /* tar_posix_header */
-    check_offset(tar_posix_header,name,0);
-    check_offset(tar_posix_header,mode,100);
-    check_offset(tar_posix_header,uid,108);
-    check_offset(tar_posix_header,gid,116);
-    check_offset(tar_posix_header,size,124);
-    check_offset(tar_posix_header,mtime,136);
-    check_offset(tar_posix_header,csum,148);
-    check_offset(tar_posix_header,link,156);
-    check_offset(tar_posix_header,linkname,157);
-    check_offset(tar_posix_header,magic,257);
-    check_offset(tar_posix_header,version,263);
-    check_offset(tar_posix_header,uname,265);
-    check_offset(tar_posix_header,gname,297);
-    check_offset(tar_posix_header,devmajor,329);
-    check_offset(tar_posix_header,devminor,337);
-    check_offset(tar_posix_header,prefix,345);
-
-    /* tar_sun_header */
-    check_offset(tar_sun_header,name,0);
-    check_offset(tar_sun_header,mode,100);
-    check_offset(tar_sun_header,uid,108);
-    check_offset(tar_sun_header,gid,116);
-    check_offset(tar_sun_header,size,124);
-    check_offset(tar_sun_header,mtime,136);
-    check_offset(tar_sun_header,csum,148);
-    check_offset(tar_sun_header,link,156);
-    check_offset(tar_sun_header,linkname,157);
-    check_offset(tar_sun_header,magic,257);
-    check_offset(tar_sun_header,version,263);
-    check_offset(tar_sun_header,uname,265);
-    check_offset(tar_sun_header,gname,297);
-    check_offset(tar_sun_header,devmajor,329);
-    check_offset(tar_sun_header,devminor,337);
-    check_offset(tar_sun_header,prefix,345);
-    check_offset(tar_sun_header,extnum,500);
-    check_offset(tar_sun_header,extcount,501);
-    check_offset(tar_sun_header,fullsize,502);
-
-    /* tar_star_85_header */
-    check_offset(tar_star_85_header,name,0);
-    check_offset(tar_star_85_header,mode,100);
-    check_offset(tar_star_85_header,uid,108);
-    check_offset(tar_star_85_header,gid,116);
-    check_offset(tar_star_85_header,size,124);
-    check_offset(tar_star_85_header,mtime,136);
-    check_offset(tar_star_85_header,csum,148);
-    check_offset(tar_star_85_header,link,156);
-    check_offset(tar_star_85_header,linkname,157);
-    check_offset(tar_star_85_header,starversion,257);
-    check_offset(tar_star_85_header,starfiletype,258);
-    check_offset(tar_star_85_header,startype,266);
-    check_offset(tar_star_85_header,rdev,278);
-    check_offset(tar_star_85_header,atime,290);
-    check_offset(tar_star_85_header,ctime,302);
-    check_offset(tar_star_85_header,uname,314);
-    check_offset(tar_star_85_header,gname,330);
-    check_offset(tar_star_85_header,prefix,345);
-    check_offset(tar_star_85_header,xmagic,508);
-
-    /* tar_star_94_header */
-    check_offset(tar_star_94_header,name,0);
-    check_offset(tar_star_94_header,mode,100);
-    check_offset(tar_star_94_header,uid,108);
-    check_offset(tar_star_94_header,gid,116);
-    check_offset(tar_star_94_header,size,124);
-    check_offset(tar_star_94_header,mtime,136);
-    check_offset(tar_star_94_header,csum,148);
-    check_offset(tar_star_94_header,link,156);
-    check_offset(tar_star_94_header,linkname,157);
-    check_offset(tar_star_94_header,magic,257);
-    check_offset(tar_star_94_header,version,263);
-    check_offset(tar_star_94_header,uname,265);
-    check_offset(tar_star_94_header,gname,297);
-    check_offset(tar_star_94_header,devmajor,329);
-    check_offset(tar_star_94_header,devminor,337);
-    check_offset(tar_star_94_header,prefix,345);
-    check_offset(tar_star_94_header,isextended,355);
-    check_offset(tar_star_94_header,sparse,356);
-    check_offset(tar_star_94_header,realsize,452);
-    check_offset(tar_star_94_header,offset,464);
-    check_offset(tar_star_94_header,atime,476);
-    check_offset(tar_star_94_header,ctime,488);
-    check_offset(tar_star_94_header,xmagic,508);
-
-    /* tar_gnu_89_header */
-    check_offset(tar_gnu_89_header,name,0);
-    check_offset(tar_gnu_89_header,mode,100);
-    check_offset(tar_gnu_89_header,uid,108);
-    check_offset(tar_gnu_89_header,gid,116);
-    check_offset(tar_gnu_89_header,size,124);
-    check_offset(tar_gnu_89_header,mtime,136);
-    check_offset(tar_gnu_89_header,csum,148);
-    check_offset(tar_gnu_89_header,link,156);
-    check_offset(tar_gnu_89_header,linkname,157);
-    check_offset(tar_gnu_89_header,magic,257);
-    check_offset(tar_gnu_89_header,uname,265);
-    check_offset(tar_gnu_89_header,gname,297);
-    check_offset(tar_gnu_89_header,atime,345);
-    check_offset(tar_gnu_89_header,ctime,357);
-    check_offset(tar_gnu_89_header,offset,369);
-    check_offset(tar_gnu_89_header,longnames,381);
-    check_offset(tar_gnu_89_header,sparse,386);
-    check_offset(tar_gnu_89_header,isextended,482);
-
-    /* tar_extended_header */
-    check_offset(tar_sparse_header,sparse,0);
-    check_offset(tar_sparse_header,isextended,504);
-#endif
-    return pass_fail;
-}
-
-/* end of file */
diff --git a/libs/kfs/teefile.c b/libs/kfs/teefile.c
deleted file mode 100644
index 17f9d2a..0000000
--- a/libs/kfs/teefile.c
+++ /dev/null
@@ -1,532 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <kfs/extern.h>
-/* #include <klib/container.h> */
-/* #include <klib/vector.h> */
-/* #include <klib/pbstree.h> */
-/* #include <klib/text.h> */
-/* #include <kfs/file.h> */
-/* #include <assert.h> */
-/* #include <limits.h> */
-/* #include <stdio.h> */
-/* #include <stdlib.h> */
-/* #include <string.h> */
-
-/* #include <klib/container.h> */
-/* #include <klib/vector.h> */
-/* #include <klib/pbstree.h> */
-/* #include <klib/text.h> */
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <kfs/file.h>
-#include <kfs/teefile.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-/* #include <limits.h> */
-/* #include <stdio.h> */
-#include <stdlib.h>
-/* #include <string.h> */
-
-/* ======================================================================
- * KTeeFile
- *  a file inside an archive
- */
-
-/* -----
- * define the specific types to be used in the templatish/inheritancish
- * definition of vtables and their elements
- */
-#define KFILE_IMPL struct KTeeFile
-#include <kfs/impl.h>
-
-static rc_t CC KTeeFileDestroy (KTeeFile *self);
-static struct KSysFile *CC KTeeFileGetSysFile (const KTeeFile *self,
-					    uint64_t *offset);
-static rc_t CC KTeeFileRandomAccessRead (const KTeeFile *self);
-static rc_t CC KTeeFileRandomAccessUpdate (const KTeeFile *self);
-static uint32_t CC KTeeFileType (const KTeeFile *self);
-static rc_t CC KTeeFileSize (const KTeeFile *self, uint64_t *size);
-static rc_t CC KTeeFileSetSizeRead (KTeeFile *self, uint64_t size);
-static rc_t CC KTeeFileSetSizeUpdate (KTeeFile *self, uint64_t size);
-static rc_t CC KTeeFileRead (const KTeeFile *self, uint64_t pos,
-			  void *buffer, size_t bsize, size_t *num_read);
-static rc_t CC KTeeFileWriteRead (KTeeFile *self, uint64_t pos, const void *buffer,
-			       size_t size, size_t *num_writ);
-static rc_t CC KTeeFileWriteUpdate (KTeeFile *self, uint64_t pos, const void *buffer,
-				 size_t size, size_t *num_writ);
-
-
-static const KFile_vt_v1 vtKTeeFileRead =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KTeeFileDestroy,
-    KTeeFileGetSysFile,
-    KTeeFileRandomAccessRead,
-    KTeeFileSize,
-    KTeeFileSetSizeRead,
-    KTeeFileRead,
-    KTeeFileWriteRead,
-
-    /* 1.1 */
-    KTeeFileType
-};
-static const KFile_vt_v1 vtKTeeFileUpdate =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KTeeFileDestroy,
-    KTeeFileGetSysFile,
-    KTeeFileRandomAccessUpdate,
-    KTeeFileSize,
-    KTeeFileSetSizeUpdate,
-    KTeeFileRead,
-    KTeeFileWriteUpdate,
-
-    /* 1.1 */
-    KTeeFileType
-};
-
-
-/*-----------------------------------------------------------------------
- * KTeeFile
- *  an archive file including tar and sra
- */
-struct KTeeFile
-{
-    KFile	dad;
-    uint64_t	maxposition;
-    KFile *	original;
-    KFile *	copy;
-};
-
-static
-rc_t KTeeFileSeek (const KTeeFile *cself, uint64_t pos)
-{
-    KTeeFile * self;
-    rc_t rc = 0;
-    size_t num_read;
-    uint8_t buff [ 32 * 1024 ];
-
-    self = (KTeeFile *)cself;
-    /* seek to "pos" */
-    while (self->maxposition < pos)
-    {
-        /* maximum to read in this buffer */
-        size_t to_read = sizeof buff;
-        if (self->maxposition + sizeof buff > pos )
-            to_read = (size_t) (pos - self->maxposition);
-
-        /* read bytes */
-        rc = KFileRead (&self->dad, self->maxposition, buff, to_read, &num_read );
-        if ( rc != 0 )
-            break;
-
-        /* detect EOF */
-        if (num_read == 0)
-        {
-            break;
-        }
-    }
-
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KTeeFileMake
- *  create a new file object
- */
-
-static
-rc_t KTeeFileMake (KTeeFile ** self,
-		   KFile * original,
-		   KFile * copy,
-		   const KFile_vt * vt,
-		   bool read_enabled,
-		   bool write_enabled)
-{
-    rc_t	rc;
-    KTeeFile *	pF;
-
-    /* -----
-     * we can not accept any of the three pointer parameters as NULL
-     */
-    assert (self != NULL);
-    assert (original != NULL);
-    assert (copy != NULL);
-
-    /* -----
-     * the enables should be true or false
-     */
-    assert ((read_enabled == true)||(read_enabled == false));
-    assert ((write_enabled == true)||(write_enabled == false));
-
-    /* -----
-     * get space for the object
-     */
-    pF = malloc (sizeof (KTeeFile));
-    if (pF == NULL)	/* allocation failed */
-    {
-	/* fail */
-	rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-    }
-    else
-    {
-	rc = KFileInit (&pF->dad,			/* initialize base class */
-			vt,			 	/* VTable for KTeeFile */
-            "KTeeFile", "no-name",
-			read_enabled,			/* read allowed */
-			write_enabled);			/* write disallowed */
-	if (rc == 0)
-	{
-/* take over the existing KFile Reference for original and copy*/
-	    /* succeed */
-	    pF->original = original;
-	    pF->copy = copy;
-	    pF->maxposition = 0;
-	    *self = pF;
-	    return 0;
-	}
-	/* fail */
-	free (pF);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KFileMakeTeeRead (const KFile ** self, const KFile * original, KFile * copy)
-{
-    return KTeeFileMake ((KTeeFile **)self, (KFile*)original, copy,
-			 (const KFile_vt*)&vtKTeeFileRead, true, false);
-}
-
-LIB_EXPORT rc_t CC KFileMakeTeeUpdate (KFile ** self, KFile * original, KFile * copy)
-{
-    return KTeeFileMake ((KTeeFile **)self, original, copy,
-			 (const KFile_vt*)&vtKTeeFileUpdate, true, true);
-}
-
-/* ----------------------------------------------------------------------
- * Destroy
- *
- */
-static
-rc_t CC KTeeFileDestroy (KTeeFile *self)
-{
-    rc_t rc;
-    uint64_t last_max;
-
-    assert (self != NULL);
-
-    do
-    {
-        last_max = self->maxposition;
-
-        /* keep seeking ahead by a Gigabyte until we read no more */
-	rc = KTeeFileSeek (self, last_max + 1024*1024*1024);
-	if (rc != 0)
-	    return rc;
-
-    } while (last_max < self->maxposition);
-
-    rc = KFileRelease (self->original);
-    if ( rc == 0 )
-    {
-        KFileRelease (self->copy);
-        free (self);
-    }
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- *
- * We cant allow memory mapping a tee file as the read?writes ar needed
- * to trigger the writes to the copy KFile
- */
-
-static
-struct KSysFile *CC KTeeFileGetSysFile (const KTeeFile *self, uint64_t *offset)
-{
-    /* parameters must be non-NULL */
-    assert (self != NULL);
-    assert (offset != NULL);
-
-    return NULL;
-}
-
-/* ----------------------------------------------------------------------
- * RandomAccess
- *
- *  returns 0 if random access, error code otherwise
- *
- * Update needs to be able to seek both original and copy while read
- * only needs to be able to seek the original.
- */
-static
-rc_t CC KTeeFileRandomAccessUpdate (const KTeeFile *self)
-{
-    rc_t rc;
-    assert (self != NULL);
-    rc = KFileRandomAccess (self->original);
-    if (rc == 0)
-	rc = KFileRandomAccess (self->copy);
-    return rc;
-}
-static
-rc_t CC KTeeFileRandomAccessRead (const KTeeFile *self)
-{
-    rc_t rc;
-    assert (self != NULL);
-    rc = KFileRandomAccess (self->original);
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KTeeFileType (const KTeeFile *self)
-{
-    return KFileType (self->original);
-}
-
-
-/* ----------------------------------------------------------------------
- * Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KTeeFileSize (const KTeeFile *self, uint64_t *size)
-{
-    rc_t	rc;
-    uint64_t	fsize;
-
-    assert (self != NULL);
-    assert (size != NULL);
-
-    rc = KFileSize (self->original, &fsize);
-
-    if (rc == 0)
-    {
-	/* success */
-	*size = fsize;
-    }
-    /* pass along RC value */
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KTeeFileSetSizeUpdate (KTeeFile *self, uint64_t size)
-{
-    rc_t rc;
-
-    rc = KFileSetSize (self->original, size);
-    if (rc == 0)
-	rc = KFileSetSize (self->copy, size);
-    return rc;
-}
-static
-rc_t CC KTeeFileSetSizeRead (KTeeFile *self, uint64_t size)
-{
-    return RC (rcFS, rcFile, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-rc_t CC KTeeFileRead	(const KTeeFile *cself,
-			 uint64_t pos,
-			 void *buffer,
-			 size_t bsize,
-			 size_t *num_read)
-{
-    KTeeFile * 	self;
-    uint64_t	maxposition;
-    size_t	read;
-    size_t	written;
-    size_t	sofar;
-    rc_t	rc;
-
-
-    /* -----
-     * self and buffer were validated as not NULL before calling here
-     *
-     * So get the KTTOCNode type: chunked files and contiguous files 
-     * are read differently.
-     */
-    assert (cself != NULL);
-    assert (buffer != NULL);
-    assert (num_read != NULL);
-    assert (bsize != 0);
-
-    rc = 0;
-    read = 0;
-    self = (KTeeFile*)cself;
-    maxposition = self->maxposition;
-    if (pos > maxposition)
-	rc = KTeeFileSeek (self, pos);
-    if (rc == 0)
-    {
-	rc = KFileRead (self->original, pos, buffer, bsize, &read);
-	if (rc == 0)
-	{
-	    if (pos + read > maxposition)
-	    {
-		for ( sofar = (size_t)( maxposition - pos );
-			  sofar < read;
-		      sofar += written)
-		{
-		    rc = KFileWrite (self->copy, pos + sofar, (uint8_t*)buffer + sofar,
-				     read - sofar, &written);
-		    if (rc != 0)
-			break;
-		    if (written == 0)
-		    {
-			LOGERR (klogErr, rc, "Failure to write to copy in KTeeFileRead");
-			rc = RC (rcFS, rcFile, rcReading, rcFile, rcIncomplete);
-		    break;
-		    }
-		}
-		maxposition = pos + sofar;
-		if (maxposition > self->maxposition)
-		    self->maxposition = maxposition;
-	    }
-	}
-    }
-    *num_read = read;
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- * Unsupported as we now treat archives as READ ONLY
- */
-static
-rc_t CC KTeeFileWriteUpdate (KTeeFile *self, uint64_t pos,
-		       const void *buffer, size_t bsize,
-		       size_t *num_writ)
-{
-    uint64_t	max_position;
-    size_t	writ;
-    size_t	written;
-    size_t	sofar;
-    rc_t	rc;
-
-    assert (self != NULL);
-    assert (buffer != NULL);
-    assert (num_writ != NULL);
-    assert (bsize != 0);
-
-    writ = 0;
-    rc = 0;
-    if (pos > self->maxposition)
-	rc = KTeeFileSeek (self, pos);
-    if (rc == 0)
-    {
-	rc = KFileWrite (self->original, pos, buffer, bsize, &writ);
-	if (rc == 0)
-	{
-	    for ( sofar = written = 0; sofar < writ; sofar += written)
-	    {
-		rc = KFileWrite (self->copy, pos + sofar, (uint8_t*)buffer + sofar,
-			     writ - sofar, &written);
-		if (rc != 0)
-		    break;
-		if (written == 0)
-		{
-		    rc = RC (rcFS, rcFile, rcReading, rcFile, rcIncomplete);
-		    LOGERR (klogErr, rc, "Failure to write to copy in KTeeFileWrite");
-		    break;
-		}
-	    }
-	    max_position = pos + sofar;
-	    if (max_position > self->maxposition)
-		self->maxposition = max_position;
-	}
-    }
-    *num_writ = writ;
-    return rc;
-}
-static
-rc_t CC KTeeFileWriteRead (KTeeFile *self, uint64_t pos,
-			   const void *buffer, size_t bsize,
-			   size_t *num_writ)
-{
-    assert (self != NULL);
-    assert (buffer != NULL);
-    assert (num_writ != NULL);
-    assert (bsize != 0);
-
-    *num_writ = 0;
-    return RC (rcFS, rcFile, rcWriting, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * 
- */
-
-
-/* end of file teefile.c */
-
diff --git a/libs/kfs/toc-priv.h b/libs/kfs/toc-priv.h
deleted file mode 100644
index d33cd1d..0000000
--- a/libs/kfs/toc-priv.h
+++ /dev/null
@@ -1,841 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_toc_priv_h_
-#define _h_kfs_toc_priv_h_
-
-#include <klib/container.h>
-#include <klib/text.h>
-#include <kfs/arc.h>
-#include <kfs/toc.h>
-#include <atomic.h>
-
-#ifdef _DEBUGGING
-#define TOC_FUNC_ENTRY() DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_TOCENTRY), ("Enter: %s\n", __func__))
-#define TOC_SORT(msg) DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_SRASORT), msg)
-#define TOC_DEBUG(msg) DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_TOC), msg)
-#else
-#define TOC_FUNC_ENTRY()
-#define TOC_SORT(msg)
-#define TOC_DEBUG(msg)
-#endif
-
-
-
-/*--------------------------------------------------------------------------
- * KTocEntry
- */
-typedef struct KTocEntry KTocEntry;
-typedef enum KTocEntryType
-{
-    ktocentrytype_unknown = -1,
-    ktocentrytype_notfound,
-    ktocentrytype_dir,
-    ktocentrytype_file,
-    ktocentrytype_chunked,
-    ktocentrytype_softlink,
-    ktocentrytype_hardlink,
-    ktocentrytype_emptyfile,
-    ktocentrytype_zombiefile /* zombie in the sense that it is somewhere between live and dead */
-} KTocEntryType;
-
-/* arbitrary number that was originially set much much higher than expected needs. */
-#define	KARC_LINK_RESOLVE_LOOPMAX		(16)
-
-typedef struct KTocPageChunk
-{
-    uint64_t file_offset;
-    uint32_t page_id;
-    uint32_t page_offset;
-} KTocPageChunk;
-
-
-
-struct KTocEntry
-{
-    /* -----
-     * In C putting this first allows a weak form of polymorphism for
-     * a entry class.  A pointer to a BSTNode can be an alias to a pointer to 
-     * this form of node.
-     */
-    BSTNode		node;
-
-    /* -----
-     * The name of the directory/file/link that this Entry represents.  It is not
-     * the full path which must be assembled going up the tree.
-     *
-     * Be careful what String functions you try as some want to reallocate memory.
-     */
-    String		name;
-
-    /* -----
-     * Unix style file modification time (same as a 64-bit time_t)
-     */
-    KTime_t		mtime;
-
-    /* -----
-     * Unix style file access
-     */
-    uint32_t		access;
-
-    /* -----
-     * what type of entry is this?
-     */
-    KTocEntryType	type;
-
-    union KTocEntryUnion
-    {
-	struct KTocEntryDir
-	{
-	    /* -----
-	     * Tree of directories, files and links below this directory
-	     */
-            BSTree      tree;
-	} dir;
-	struct KTocEntryFile
-	{
-	    /*
-	     * how long is this file?
-	     */
-	    uint64_t	file_size;
-	    /* 
-	     * location within the archive where this file's data starts
-	     */
-	    uint64_t	archive_offset;
-	} contiguous_file;
-	struct KTocEntryZombieFile
-	{
-/* KEEP the first two fields here match the first two fields above
- * file_size and archive_offset so the chunked is sort of a derived type */
-	    /*
-	     * how long is this file supposed to be?
-	     */
-	    uint64_t	file_size;
-	    /* 
-	     * location within the archive where this file's data would have started
-	     */
-	    uint64_t	archive_offset;
-	} zombie_file;
-	struct KTocEntryChunkFile
-	{
-/* KEEP the first two fields here match the first two fields above
- * file_size and archive_offset so the chunked is sort of a derived type */
-	    /*
-	     * Size of the whole file including all chunks and any zero byte holes
-	     * between chunks
-	     */
-	    uint64_t	file_size;
-	    /* 
-	     * location within the archive where this file's data starts if viewws
-	     * as a virtual "*.sra"
-	     */
-	    uint64_t	archive_offset;
-
-	    KTocChunk *	chunks;			/* this will piggy back in the same allocation */
-	    uint32_t	num_chunks;	    
-	} chunked_file;
-        struct KTocEntryPagedChunkFile
-        {
-            uint64_t file_size;
-        } paged_chunk_file;
-	struct KTocEntrySoftLink
-	{
-	    String	link_path;
-	} symbolic_link;
-	struct KTocEntryHardLink
-	{
-	    const struct KTocEntry * ref;
-	    /* -----
-	     * This approach can lead to failures if the target of the link is deleted and this
-	     * reference is left dangling.
-	     */
-	} hard_link;
-    } u;
-};
-
-typedef struct KTocEntryIndex KTocEntryIndex;
-struct KTocEntryIndex
-{
-    BSTNode	node;
-    KTocEntry *	entry;
-    String	fullpath;
-};
-
-
-/* ----------------------------------------------------------------------
- * KTocEntryParam
- *
- * An internal structure used only with in this compilation unit / module
- */
-/* ----------------------------------------------------------------------
- * NOTE: This oddness of specific to general to specific can probably be 
- * refactored into specific functions (the published API) that uses common
- * functions instead of a common target function.
- */
-typedef struct KTocEntryParam	KTocEntryParam;
-struct KTocEntryParam
-{
-    KTocEntryType	type;
-    KTime_t		mtime;
-    uint32_t		access;
-    union
-    {
-	struct
-	{
-	    uint64_t		size;
-	    uint64_t		source_position;
-	} file;
-	struct
-	{
-	    uint64_t		size;
-	    uint32_t		num_chunks;
-	    const KTocChunk *	chunks;
-	} chunked;
-	struct
-	{
-            const KTocEntry *   ref;
-	} hardlink;
-	struct
-	{
-	    const char *	targ;
-	} softlink;
-    } u;
-};
-
-/* ----------------------------------------------------------------------
- * KArcTOCNodeWhack
- * [IN] BSTNode * 		n	
- * [IN] void *    		data	
- *
- * This function matches the signature for a function pointer in a 
- * call to BSTreeWhack().  It ignores the data pointer second parameter
- * which can safely be called with NULL. 
- */
-void	CC KTocEntryWhack	(BSTNode * n, void * data);
-int64_t	CC KTocEntryCmpVoid (const void * item, const BSTNode * node);
-rc_t	KTocEntryDelete	(KTocEntry * self);
-int64_t	CC KTocEntryCmp2 (const BSTNode * n, const BSTNode * p);
-rc_t	KTocEntryNewDirectory	(KTocEntry ** new_entry,
-					 const char * name,
-					 size_t name_size,
-					 KTime_t mtime,
-					 uint32_t access);
-rc_t		KTocEntryNewFile	(KTocEntry ** new_entry,
-					 const char * name,
-					 size_t name_size,
-					 KTime_t mtime,
-					 uint32_t access,
-					 uint64_t offset,
-					 uint64_t size);
-rc_t		KTocEntryNewChunked	(KTocEntry ** new_entry,
-					 const char * name,
-					 size_t name_size,
-					 KTime_t mtime,
-					 uint32_t access,
-					 uint64_t size,
-					 const KTocChunk * chunks,
-					 uint32_t num_chunks);
-rc_t		KTocEntryNewSoft	(KTocEntry ** new_entry,
-					 const char * name,
-					 size_t name_size,
-					 KTime_t mtime,
-					 uint32_t access,
-					 const char * link,
-					 size_t link_size);
-rc_t		KTocEntryNewHard	(KTocEntry ** new_entry,
-					 const char * name,
-					 size_t name_size,
-					 KTime_t mtime,
-					 uint32_t access,
-                                         const KTocEntry * targ);
-rc_t		KTocEntryNewZombieFile	(KTocEntry ** new_entry,
-					 const char * name,
-					 size_t name_size,
-					 KTime_t mtime,
-					 uint32_t access,
-					 uint64_t offset,
-					 uint64_t size);
-
-
-typedef struct	KTocEntryStack 	KTocEntryStack;
-rc_t KTocEntryStackNew(KTocEntryStack ** self);
-rc_t KTocEntryStackDel(KTocEntryStack * self);
-rc_t KTocEntryStackDepth(KTocEntryStack * self, int * depth);
-rc_t KTocEntryStackPush(KTocEntryStack * self, KTocEntry * pathaddr);
-rc_t KTocEntryStackPop(KTocEntryStack * self, KTocEntry ** pathaddr);
-
-const char * KTocEntryTypeGetString(KTocEntryType t);
-const char * get_mode_string (KCreateMode mode);
-
-typedef struct KTocEntryPersistWriteFuncData
-{
-    uint8_t *	buffptr;
-    uint8_t *	limit;
-} KTocEntryPersistWriteFuncData;
-KFS_EXTERN rc_t CC KTocEntryPersistWriteFunc (void * param, const void * buffer, size_t size,
-				size_t * num_writ);
-
-rc_t KTocEntryPersistNodeDir (void *param, const KTocEntry * n,
-			      size_t * num_writ, 
-			      PTWriteFunc write, void * write_param);
-
-/* ======================================================================
- * KToc struct
- */
-struct KArcDir;
-
-struct KToc
-{
-    KArcFSType	arctype;
-    KSRAFileAlignment alignment;
-    /* -----
-     * File containing the archive: details of its type hidden behind KFile.
-     * We should be able to do an archive in an archive by having this KFile
-     * point to a KArcFile with no problems.
-     */
-    union
-    {
-	const void *		v;
-	struct KFile const *f;
-	const KDirectory * 	d;
-    } archive;
-
-    /* -----
-     * KArcDir that implements the KDirectory interface for the contents of 
-     * the file opened as archive.  This link is needed to get to the 
-     * KDirectory interface from a KFile symbolic link.
-     *
-     * This reference is not counted in refcount as it is a link back to the
-     * tracked reference from the KArcDir to the KARcTOC.
-     */
-/*     const struct KArcDir *	karchive; */
-
-    /* -----
-     * count of references to this opened archive
-     */
-    atomic32_t		refcount;
-
-    /* -----
-     * A entry outside of a tree: instantiated as a special KTocEntry that is part of
-     * no BSTree with type set to ktocentrytype_dir (directory).
-     * Does not use the base dir BSTNode but makes processing easier to have a 
-     *"entry" type...
-     */
-    KTocEntry		entry;
-
-    /* -----
-     * These next two are used only in the KFile interface on top of a KToc
-     * on a KDirectory.  This needs to be rewritten as an interface so these
-     * don't exist in all KToc implmentations.
-     *
-     * Index  The main tree in 'entry' is sorted by names with in directories.
-     * This index is a directory less tree sorted by offset with in the archive.
-     *
-     * This is not currently used in tar file versions of the TOC archive.
-     *
-     * Each entry is of type KTocEntryIndex;
-     */
-    BSTree		offset_index;
-    KSraHeader *	header;
-
-
-    /* -----
-     * This is the full path of the archive file as used to open it as a KFile.
-     */
-    String		path;
-
-};
-
-/* four fields are common to all entries.*/
-
-
-/* GetName
- *
- *  [RET] rc_t                  0 for success; anything else for a failure
- *                       see itf/klib/rc.h for general details
- *  [IN]     const KTocEntry *  self        object oriented object reference
- *  [OUT] const char **         name        where to put a reference to the name
- */
-rc_t KTocEntryGetName(const KTocEntry *self,
-                     const char ** name);
-
-/* GetTime
- *
- * [RET] rc_t                   0 for success; anything else for a failure
- *                      see itf/klib/rc.h for general details
- * [IN]  const KTocEntry *  self        object oriented object reference
- * [OUT] KTime_t *      mtime       where to put unix/posix style permission flags
- */
-rc_t KTocEntryGetTime(const KTocEntry *self,
-                     KTime_t *mtime);
-
-/* GetAccess
- *
- * [RET] rc_t                   0 for success; anything else for a failure
- *                             see itf/klib/rc.h for general details
- * [IN]  const KTocEntry *  self        object oriented object reference
- * [OUT] uint32_t       access      where to put unix/posix style permission flags
- */
-rc_t KTocEntryGetAccess(const KTocEntry * self, uint32_t * access);
-
-
-/* GetType
- *
- * [RET] rc_t                   0 for success; anything else for a failure
- *                      see itf/klib/rc.h for general details
- * [IN]  const KTocEntry *  self        object oriented object reference
- * [OUT] KTocEntryType *    type        where to put the type specific node type (differs
- *                      from KDirectory type)
- */
-rc_t KTocEntryGetType(const KTocEntry *self,
-                     KTocEntryType * type);
-/* the type retrieved by GetType will permit several more fields specialized by type */
-/* for a directory the only specialzied field is the "BSTree" */
-
-#if 0
-const char * KTocEntryGetTypeString(KTocEntryType type);
-#endif
-
-/* GetBSTree
- *
- * Get a reference to the BSTree of a TocEntry that represents a directory.
- * This will fail for all ites taht are not directories.
- *
- * [RET] rc_t                   0 for success; anything else for a failure
- *                      see itf/klib/rc.h for general details
- * [IN]  const KTocEntry *  self        object oriented object reference
- * [OUT] const BSTree **    ptree       where to put a reference to the kcont/BSTree of a
- *                      directory node
- */
-rc_t KTocEntryGetBSTree( const KTocEntry * self,
-                         struct BSTree const ** ptree);
-
-/* for a file there are two fields: a container offset and a file size */
-
-
-/* GetFileLocator (works for contiguous or chunked files)
- *
- * [RET] rc_t                   0 for success; anything else for a failure
- *                      see itf/klib/rc.h for general details
- * [IN]  const KTocEntry *  self        object oriented object reference
- * [OUT] uint64 *       locator        where to put the locator of a referenced node
- */
-rc_t KTocEntryGetFileLocator( const KTocEntry * self,
-                              uint64_t * locator);
-
-
-/* GetFileSize (works for contiguous or chunked files)
- *
- * [RET] rc_t                   0 for success; anything else for a failure
- *                      see itf/klib/rc.h for general details
- * [IN]  const KTocEntry *  self        object oriented object reference
- * [OUT] uint64 *       size        where to put the size of a referenced node
- */
-rc_t KTocEntryGetFileSize( const KTocEntry * self,
-                     uint64_t * size);
-
-
-/* GetFilePhysicalSize (works for contiguous or chunked files)
- *
- * [RET] rc_t                   0 for success; anything else for a failure
- *                      see itf/klib/rc.h for general details
- * [IN]  const KTocEntry *  self        object oriented object reference
- * [OUT] uint64 *       size        where to put the size of a referenced node
- */
-rc_t KTocEntryGetFilePhysicalSize( const KTocEntry * self,
-                                   uint64_t * size);
-
-
-/* GetFileContiguous (works for contiguous or chunked files)
- *
- * [RET] rc_t                   0 for success; anything else for a failure
- *                      see itf/klib/rc.h for general details
- * [IN]  const KTocEntry *  self        object oriented object reference
- * [OUT] uint64 *       size        where to put the size of a referenced node
- */
-rc_t KTocEntryGetFileContiguous( const KTocEntry * self,
-                                 bool * contiguous);
-
-
-/* GetFileOffset
- *
- * For normal contiguous file nodes 'offset' gets the offset to the start of the file.
- * For all other nodes, 'offset' gets 0 with an appropriate rc_t return.
- *
- *
- * [RET] rc_t                   0 for success; anything else for a failure
- *                      see itf/klib/rc.h for general details
- * [IN]  const KTocEntry *  self        object oriented object reference
- * [OUT] uint64 *       offset      where to put the offset of a referenced node
- */
-rc_t KTocEntryGetFileOffset( const KTocEntry * self,
-                     uint64_t * offset);
-
-
-/* GetHardTarget
- *
- * [RET] rc_t                   0 for success; anything else for a failure
- *                      see itf/klib/rc.h for general details
- * [IN]  const KTocEntry *  self        object oriented object reference
- * [OUT] const KTocEntry ** target      where to put a reference from a hard link node
- */
-rc_t KTocEntryGetHardTarget( const KTocEntry *self,
-                     const KTocEntry ** target);
-
-/* there are two specialzied fields for chunked files - both retrieved with the saem method */
-
-
-/* GetChunks
- *
- * [RET] rc_t                   0 for success; anything else for a failure
- *                      see itf/klib/rc.h for general details
- * [IN]  const KTocEntry *  self        object oriented object reference
- * [OUT] const KTocChunk *  chunks      where to put the size of a referenced node
- */
-rc_t KTocEntryGetChunks (const KTocEntry * self,
-                     uint32_t * num_chunks,
-                     const KTocChunk ** chunks);
-
-/* GetSoftTarget
- *
- * [RET] rc_t                   0 for success; anything else for a failure
- *                      see itf/klib/rc.h for general details
- * [IN]  const KTocEntry *  self        object oriented object reference
- * [OUT] const char **      target      where to put a reference from a hard link node
- */
-rc_t KTocEntryGetSoftTarget (const KTocEntry *self,
-                     const char ** target);
-
-
-/*--------------------------------------------------------------------------
- * KToc
- *  archive table of contents
- *
- *  the "CreateXXX" series of methodss take a KCreateMode ( see kfs/directory.h ).
- *  when mode == kcmOpen, create if needed, overwrite if exists.
- *  when mode == kcmInit, create if needed, clear if exists.
- *  when mode == kcmCreate, fail if exists, create otherwise.
- *  if mode has kcmParents set, fill in missing parents on create.
- *
- * These is the only open API into a TOC with in the archive package of classes.
- * Functions to parse archives (Tar was the first format but is not expected to 
- * be the only format) use these methods to add entries to the TOC.  New parsers
- * should fit the signature of 
- *
- *  rc_t PARSER (KToc * <TOC>, const KFile * <ARCHIVE>)
- *
- * "PARSER" [IN] is the parsing function
- *
- * "TOC" [OUT] is a opaque class that is never exposed other than to these create
- * entry methods
- *
- * "FILE" [IN] is an archive opaquely opened as a KFile and then given to a
- * KDirectory and should not be accessed from outside this parsing function.
- *
- * An Archive is opened via a call to friend function.  It has by design been
- * made to mimic the signature of KDirectoryOpenDirRead with only a change in
- * parameters after path.  No "..." or va_list is supported.  To use that
- * functionality one would have to call KDirectoryResolvePath and use the
- * new path generated by that call as the path parameter for this function.
- *
- * rc_t KDirectoryOpenArcDirRead (const KDirectory * dir, 
- *                    KDirectory ** pdir,
- *                    bool chroot,
- *                    const char * path,
- *                    rc_t (CC* parse )(KToc *,const KFile*));
- *
- * "dir" [IN] is an existing KDirectory in which to find the archive file.
- *
- * "pdir" [OUT] is a pointer which will after the function is called point to the new
- * KDirectory that is the archive opened as a directory with the same name as
- * its containing file.
- *
- * "chroot" [IN] is false(1)/true(1 [or any non zero]) as to whether the archive will
- * treat its contents as a virtual root directory ('/') or not.
- *
- * "path" [IN] is the address with in directory of the archive.
- *
- * "parse" [IN] is the function that will create TOC entries for that archive.
- *
- * No member element or function of an object of class TOC will be exposed
- * other than these create entry methods.
- */
-typedef struct KToc KToc;
-
-/* Init
- *  construct a TOC tied to a KFile with a given path
- * At this point, this method has been made private and will only be called by 
- * KDirectoryOpenArcDirRead().
- */
-
-rc_t KTocInit( KToc**self, struct String const * path, KArcFSType arctype,
-        const void * archive, KSRAFileAlignment alignment);
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-rc_t KTocAddRef( const KToc *self );
-rc_t KTocRelease( const KToc *self );
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- * At this point, these methods have been made private and will only be called by 
- * with in the archive package.  References to the TOC will be handled within 
- * the constructors and destructors for KDirectorys and KFiles created by
- * KDirectory OpenArcDirRead() and then any KDirectory OpenFileRead() and 
- * KDirectory OpenDirRead() with in that initial KDirectory().  At this point
- * archives are read only so OpenFileWrite() OpenDirWrite() CreateDir() CreateFile()
- * and other such methods are not supported for archives.
- */
-rc_t KTocAddRef ( const KToc *self );
-rc_t KTocRelease ( const KToc *self );
-
-
-/* ResolvePathNode
- *
- *
- * [RET] rc_t                   0 for success; anything else for a failure
- *                      see itf/klib/rc.h for general details
- * [IN]  const KToc *   self        TOC self reference: object oriented in C
- * [IN]  const char *       path        the path to be parsed - it will start at the root 
- *                      of the TOC's address
- * [OUT] const KTocEntry **     pnode       the address of the final node traversed is put here
- * [OUT] uint32_t *         type        the type of node for the final node
- * [OUT] char **        unusedpath  This will point to any part of the path not used up
- *                      in parsing against the TOC.
- *                      NULL if the leaf node was found
- *                      the start of a node that could not be parsed
- *                      the start of the node after a softlink (or NULL)
- */
-rc_t KTocResolvePathTocEntry( const KToc *self,
-                         const KTocEntry ** pnode,
-                         const char *path,
-                         size_t path_len,
-                         KTocEntryType * ptype,
-                         const char ** unusedpath);
-
-/*--------------------------------------------------------------------------
- * Constructors/factories
- */
-
-/* CreateDir
- *  create a sub-directory
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- */
-rc_t KTocCreateDir ( KToc *self, KTime_t mtime, uint32_t access, 
-        KCreateMode mode, const char *path, ... );
-rc_t KTocVCreateDir ( KToc *self, KTime_t mtime, uint32_t access,
-        KCreateMode mode, const char *path, va_list args );
-
-/* CreateFile
- *  create an entry for a contiguous file
- *
- *  "source_position" [ IN ] and "size" [ IN ] - description of the contiguous
- *  region of the archive file occupied by the file
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- * This is used also to create an empty file.  When size is zero the underlying 
- * library might create a special zero length entry type.
- */
-rc_t KTocCreateFile ( KToc *self, uint64_t source_position, uint64_t size,
-              KTime_t mtime, uint32_t access, KCreateMode mode,
-              const char *path, ... );
-rc_t KTocVCreateFile ( KToc *self, uint64_t source_position, uint64_t size,
-               KTime_t mtime, uint32_t access, KCreateMode mode,
-               const char *path, va_list args );
-rc_t KTocCreateZombieFile ( KToc *self, uint64_t source_position, uint64_t size,
-              KTime_t mtime, uint32_t access, KCreateMode mode,
-              const char *path, ... );
-rc_t KTocVCreateZombieFile ( KToc *self, uint64_t source_position, uint64_t size,
-               KTime_t mtime, uint32_t access, KCreateMode mode,
-               const char *path, va_list args );
-
-/* CreateChunkedFile
- *  create an entry for a chunked file
- *
- *  a chunked file consists of 0 or more possibly discontiguous chunks
- *  positioned within the logical file
- *
- *  "size" [ IN ] - the size of the logical file
- *
- *  "num_chunks" [ IN ] - the number of chunks in "chunks"
- *
- *  "chunks" [ IN ] - an array of chunk descriptors, where each chunk
- *  contains valid data that are mapped to form file
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-rc_t KTocCreateChunkedFile ( KToc *self, uint64_t size, KTime_t mtime,
-                 uint32_t access, uint32_t num_chunks,
-                 const KTocChunk chunks [], KCreateMode mode,
-                 const char *path, ... );
-rc_t KTocVCreateChunkedFile ( KToc *self, uint64_t size, KTime_t mtime,
-                  uint32_t access, uint32_t num_chunks,
-                  const KTocChunk chunks [], KCreateMode mode,
-                  const char *path, va_list args );
-
-/* CreateHardLink
- *  creates a hard link to an existing file within TOC
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "targ" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "link" [ IN ] - NUL terminated string in directory-native
- *  character set denoting alias
- */
-rc_t KTocCreateHardLink ( KToc *self, KTime_t mtime, uint32_t access,
-              KCreateMode mode, const char *targ,
-              const char *link, ... );
-rc_t KTocVCreateHardLink ( KToc *self, KTime_t mtime, uint32_t access,
-               KCreateMode mode, const char *targ,
-               const char *link, va_list args );
-
-/* CreateSoftLink
- *  creates a soft link to any file or directory
- *  that is interpreted upon acces.
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "targ" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target alias
- */
-rc_t KTocCreateSoftLink ( KToc * self, KTime_t mtime, uint32_t access,
-              KCreateMode mode, const char * targ,
-              const char * alias, ... );
-rc_t KTocVCreateSoftLink ( KToc * self, KTime_t mtime, uint32_t access,
-               KCreateMode mode, const char * targ,
-               const char * alias, va_list args );
-
-/* OpenArcDirRead
- *  Open an archive file as a KDirectory derived type: made to match 
- *  KDirectoryOpenDirRead() where parse could be the first element of arg
- *
- * [IN]  dir    A KDirectory (of any derived type) to reach the archive file
- * [OUT] pdir   The KDirectory (of type KArcDir) that will be created
- * [IN]  chroot if non-zero, the new directory becomes chroot'd and interprets paths
- *      stating with '/'
- * [IN]  path   The path to the archive - this will become the directory path
- * [IN]  parse  A pointer to the function needed to build a TOC by parsing the file
- *
- * parameters to parse
- * REQUIRED:    KToc *
- * REQUIRED:    void *  KFile* | KDirectory* | ???
- * OPTIONAL:    bool (*)(const char*)           Filter: include or skip this path
- * OPTIONAL:    rc_t (*)(???)               Sort: reorder name list
- */
-
-KFS_EXTERN
-rc_t CC KDirectoryOpenArcDirRead (const KDirectory * dir, 
-            const KDirectory ** pdir,
-            bool chroot,
-            const char * path,
-            KArcFSType baseType,
-            rc_t (CC*parse)(KToc*,const void *,
-                bool(CC*)(const KDirectory*,const char *, void*),
-                void *),
-                bool (CC* filter )(const KDirectory*, const char *, void *),
-            void * filterparam );
-
-
-#if 0
-rc_t KTocResolvePathTocEntry( const KToc *self,
-                 const KTocEntry ** pnode,
-                 const char *path,  /* must be entirely in the TOC */
-                 size_t path_len,
-                 KTocEntryType * ptype,
-                 const char ** unusedpath);
-#endif
-
-
-
-const KTocEntry* KTocGetRoot( const KToc * self );
-
-#if 0
-const char * KTocGetRootPath( const KToc * self, size_t * len );
-#endif
-
-rc_t KTocGetPath( const KToc * self, struct String const ** path );
-rc_t KTocResolvePathFromOffset( const KToc *self,
-                const char ** path,
-                uint64_t * ppos,
-                uint64_t offset );
-
-KSRAFileAlignment KTocAlignmentGet( KToc * self );
-rc_t KTocAlignmentSet( KToc * self,KSRAFileAlignment align );
-
-const void * KTocGetArchive( const KToc * self );
-
-KFS_EXTERN rc_t KTocPersist( const KToc * self,
-                             void ** buffer, size_t * buffer_size,
-                             uint64_t * virtual_file_size,
-                             struct Vector const * files );
-
-KFS_EXTERN rc_t CC KTocEntryPersist( void *param, const void * node,
-                                     size_t * num_writ, 
-                                     PTWriteFunc write, void * write_param );
-
-rc_t KTocInflatePBSTree (KToc * self, uint64_t arcsize, const void * treestart,
-                         uint32_t maxsize, uint64_t offset,
-                         bool rev, const char * path);
-
-rc_t KArcDirPersistHeader	(const KArcDir * self,
-    void ** buffer, size_t * buffer_size, uint64_t * file_sile, uint32_t align,
-    rc_t ( CC *sort )(const struct KDirectory*, struct Vector*) );
-
-
-/* ----------------------------------------------------------------------
- * KArcDirGetTOC
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN]  const KArcDir *	self		Object oriented C; KArcDir object for this method
- * [OUT] const KToc **		toc
- */
-rc_t  KArcDirGetTOC (const struct KArcDir * self, const struct KToc ** toc);
-
-
-
-#endif /* #ifndef _h_kfs_toc_priv_h_ */
-/* end of file */
diff --git a/libs/kfs/toc.c b/libs/kfs/toc.c
deleted file mode 100644
index 9eeb89b..0000000
--- a/libs/kfs/toc.c
+++ /dev/null
@@ -1,1764 +0,0 @@
-/*===========================================================================
- *
- *                            Public DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <kfs/extern.h>
-#include <atomic32.h>
-#include <klib/container.h>
-#include <klib/vector.h>
-#include <klib/pbstree.h>
-#include <klib/text.h>
-#include <kfs/arc.h>
-#include <kfs/sra.h>
-#include <kfs/toc.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include "toc-priv.h"
-
-#include <assert.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <os-native.h>
-
-
-/* ======================================================================
- * Defines relevant to the whole compilation unit.
- */
-
-/* !!!!!!!! WHY ISN'T THIS IN A COMMON PRIVATE HEADER FILE? !!!!!!! */
-rc_t SraHeaderMake (KSraHeader ** pself, size_t treesize, KSRAFileAlignment alignment);
-
-/* ======================================================================
- * KTocEntryStack
- *
- * A private class used to keep track of directories passed through while adding
- * entries to the TOC.
- *
- * private little class for handling a stack of pointers to TOC entrys
- */
-struct KTocEntryStack
-{
-    unsigned		count;
-    unsigned		allocated;
-    KTocEntry **	stack;
-};
-
-/* ----------------------------------------------------------------------
- * KTocEntryStackNew
- * [OUT] KTocEntryStack ** 	pself		object oriented object reference where
- * construct a Entry Stack at where the pointer to pointer so self points
- *						to put the reference to the new object
- */
-rc_t KTocEntryStackNew( KTocEntryStack ** self )
-{
-#define ARBITRARY_STACK_SIZE	(16)
-    if (self == NULL)
-        return RC (rcFS, rcToc, rcConstructing, rcParam, rcNull);
-
-    *self = malloc (sizeof (KTocEntryStack));
-    (*self)->count = 0;
-    (*self)->allocated = ARBITRARY_STACK_SIZE;
-    (*self)->stack = malloc ((*self)->allocated * sizeof (KTocEntry*));
-    if ((*self)->stack == NULL)
-        return RC (rcFS, rcToc, rcAllocating, rcMemory, rcInsufficient);
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * KTocEntryStackDel
- *
- * destruct a Entry Stack
- *
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN] KTocEntryStack *	self		object oriented object reference what to destroy
- */
-rc_t KTocEntryStackDel( KTocEntryStack * self )
-{
-
-    /* empty stack there so just return ok for now */
-    if (self == NULL)
-        return 0;
-
-    if (self->stack != NULL)
-        free (self->stack);
-
-    free (self);
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * KTocEntryStackDepth
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN]  KTocEntryStack * 	self		object oriented object reference
- * [OUT] int			depth		return the current depth/length of the stack
- *						(int allows compiler flexibilty to use
- *						efficient type)
- */
-rc_t KTocEntryStackDepth( KTocEntryStack * self, int * depth )
-{
-    *depth = self->count;
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * KTocEntryStackPush
- *
- * adds a reference to KTocEntry to the stack
- *
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN] KTocEntryStack *	self		object oriented object reference what to destroy
- * [IN] KTocEntry * 		pathaddr	the entry to add
- */
-rc_t KTocEntryStackPush( KTocEntryStack * self, KTocEntry * pathaddr )
-{
-#define ARBITRARY_INCREMENT_SIZE	(8)
-
-    if (self == NULL)
-        return RC (rcFS, rcToc, rcInserting, rcSelf, rcNull);
-
-    if (self->count >= self->allocated)
-    {
-        KTocEntry **	stack;
-        int	new_allocated = self->allocated + ARBITRARY_INCREMENT_SIZE;
-        stack = realloc (self->stack, self->allocated * sizeof (KTocEntry*));
-        if (stack == NULL)
-        {
-            return RC (rcFS, rcToc, rcAllocating, rcMemory, rcInsufficient);
-        }
-        self->allocated = new_allocated;
-        self->stack = stack;
-    }
-    self->stack[self->count++] = pathaddr;
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * KTocEntryStackPop
- *
- * removess a reference to KTocEntry to the stack (not C++STLish but more normal stack operation)
- *
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN]  KTocEntryStack * 	self		object oriented object reference what to destroy
- * [OUT] KTocEntry ** 	pathaddr	where to put the reference to the entry removed
- */
-rc_t KTocEntryStackPop( KTocEntryStack * self, KTocEntry ** pathaddr )
-{
-    if (self == NULL)
-        return RC (rcFS, rcToc, rcReading, rcSelf, rcNull);
-
-    if (pathaddr == NULL)
-        return RC (rcFS, rcToc, rcReading, rcParam, rcNull);
-
-    if (self->count == 0)
-    {
-        /* -----
-         * this means empty stack and is not considered an error
-         * though it should be looked for by the caller
-         */
-        *pathaddr = NULL;
-    }
-    else
-    {
-        *pathaddr = self->stack[--(self->count)];
-    }
-    return 0;
-}
-
-
-static
-int64_t CC KTocEntryIndexCmp2 (const BSTNode * n, const BSTNode * p)
-{
-    uint64_t nos;
-    uint64_t noe;
-    uint64_t pos;
-    uint64_t poe;
-
-    assert (n != NULL);
-    assert (p != NULL);
-    {
-        const KTocEntryIndex * ne = (const KTocEntryIndex*)n;
-        nos = ne->entry->u.contiguous_file.archive_offset;
-        noe = nos + ne->entry->u.contiguous_file.file_size;
-    }
-    {
-        const KTocEntryIndex * pe = (const KTocEntryIndex*)p;
-        pos = pe->entry->u.contiguous_file.archive_offset;
-        poe = pos + pe->entry->u.contiguous_file.file_size;
-    }
-    if ((nos == pos)&&(noe == poe))
-        return 0;
-    if (noe <= pos)
-        return -1;
-    return 1;
-}
-
-static
-uint64_t add_filler (uint64_t z, KSRAFileAlignment a)
-{
-    if (a > 1)
-    {
-        uint64_t m = (uint64_t)a - 1;
-        return (z + m) & ~ m;
-    }
-    return z;
-}
-
-static
-rc_t KTocCreateEntryIndex (KToc * self, const char * path, uint64_t * file_offset)
-{
-    rc_t rc;
-    size_t len;
-    union idx
-    {
-        void * v;
-        KTocEntryIndex * i;
-        char * b;
-    } idx;
-    KTocEntryType type;
-/*     const KTocEntry * entry; */
-    const char * left;
-
-    TOC_FUNC_ENTRY();
-
-    assert (self != NULL);
-    assert (path != NULL);
-
-    rc = 0;
-
-    len = strlen (path);
-    idx.v = malloc (sizeof (*idx.i) + len + 1);
-    if (idx.v == NULL)
-    {
-        rc = RC (rcFS, rcToc, rcReindexing, rcMemory, rcExhausted);
-        LOGERR( klogErr, rc, "Out of memory creating new path");
-    }
-    else
-    {
-        char * tmp;
-
-        type = ktocentrytype_unknown;
-        tmp = idx.b + sizeof (*idx.i);
-        strcpy (tmp, path);
-        StringInitCString (&idx.i->fullpath, tmp);
-        rc = KTocResolvePathTocEntry (self, (const KTocEntry**)&idx.i->entry, path, len, &type, &left);
-        if (rc != 0)
-            LOGERR( klogErr, rc, "Unable to resolve path");
-        else
-        {
-    /* 	    if (left != 0) */
-    /* 		rc = RC (rcFS, rcToc, rcAccessing, rcPath, rcNotFound); */
-    /* 	    else */
-            {
-                uint64_t offset;
-                uint64_t new_offset;
-                switch (type)
-                {
-                case ktocentrytype_dir:
-                case ktocentrytype_softlink:
-                case ktocentrytype_hardlink:
-                case ktocentrytype_emptyfile:
-                    goto no_entry;
-                case ktocentrytype_file:
-                            offset = add_filler (*file_offset, self->alignment);
-                            idx.i->entry->u.contiguous_file.archive_offset = offset;
-                            new_offset = offset + idx.i->entry->u.contiguous_file.file_size;
-                    break;
-                case ktocentrytype_chunked:
-                            offset = add_filler (*file_offset, self->alignment);
-                    idx.i->entry->u.chunked_file.archive_offset = offset;
-                    new_offset = offset + idx.i->entry->u.chunked_file.file_size;
-                    break;
-                case ktocentrytype_unknown:
-                    rc = RC (rcFS, rcToc, rcReindexing, rcTocEntry, rcUnknown);
-                    break;
-                case ktocentrytype_notfound:
-                    rc = RC (rcFS, rcToc, rcReindexing, rcTocEntry, rcNotFound);
-                    break;
-                default:
-                    rc = RC (rcFS, rcToc, rcReindexing, rcTocEntry, rcInvalid);
-                    break;
-                }
-                if (rc != 0)
-                    LOGERR( klogErr, rc, "Unable to handle path");
-                else
-                {
-                    rc = BSTreeInsert (&self->offset_index, &idx.i->node, KTocEntryIndexCmp2);
-                    if (rc == 0)
-                    {
-                        *file_offset = new_offset;
-                        return 0;
-                    }
-                }
-            }
-        }
-        no_entry:
-        free (idx.v);
-    }
-    return rc;
-}
-
-static
-void CC KTocEntryIndexWhack (BSTNode * n, void * data)
-{
-    free (n);
-}
-
-struct ugliness
-{
-    const KToc * toc;
-    uint64_t     offset;
-    uint64_t     foffset;
-};
-
-static int64_t CC KTocEntryIndexCmpOffset (const void * item /* offset */,
-    const BSTNode * n)
-{
-    struct ugliness * ugly;
-    uint64_t nos;
-    uint64_t noe;
-    uint64_t po;
-    assert (item != NULL);
-    assert (n != NULL);
-    ugly = (struct ugliness*)item;
-    {
-        const KTocEntryIndex * ne = (const KTocEntryIndex*)n;
-        nos = ne->entry->u.contiguous_file.archive_offset;
-        noe = add_filler (nos + ne->entry->u.contiguous_file.file_size,
-                          ugly->toc->alignment);
-    }
-    po = ugly->offset;
-
-    TOC_DEBUG (("%s: %lu %lu %lu\n", __func__, po, nos, noe));
-
-    ugly->foffset = 0;
-    if (po < nos)
-        return -1;
-    else if (po < noe)
-    {
-        ugly->foffset = po - nos;
-        return 0;
-    }
-    else
-        return 1;
-}
-
-/* -----
- * We use MAX_PATH if it is available but not religiously.  We handle most
- * buffer over-runs with in the module only truncating paths at the border
- * of the module where KDirectory doesn't handle path's longer than MAX_PATH
- */
-#ifdef MAX_PATH
-#define	KARC_DEFAULT_PATH_ALLOC			(MAX_PATH)
-#else
-#define	KARC_DEFAULT_PATH_ALLOC			(4096)
-#endif
-
-/* ======================================================================
- * KToc method prototypes and defines
- */
-
-/*--------------------------------------------------------------------------
- * KToc
- *  archive table of contents
- *
- *  the "CreateXXX" series of messages take a KCreateMode (see kfs/directory.h).
- *  when mode == kcmOpen, create if needed, overwrite if exists.
- *  when mode == kcmInit, create if needed, clear if exists.
- *  when mode == kcmCreate, fail if exists, create otherwise.
- *  if mode has kcmParents set, fill in missing parents on create.
- */
-
-
-/* ======================================================================
- * KToc method bodies
- */
-
-/* ----------------------------------------------------------------------
- * KToc
- *  archive table of contents
- *
- *  the "CreateXXX" series of messages take a KCreateMode (see kfs/directory.h).
- *  when mode == kcmOpen, create if needed, overwrite if exists.
- *  when mode == kcmInit, create if needed, clear if exists.
- *  when mode == kcmCreate, fail if exists, create otherwise.
- *  if mode has kcmParents set, fill in missing parents on create.
- */
-
-rc_t KTocInit ( KToc ** self,
-                const String * path,
-                KArcFSType arctype,
-                const void * archive,
-                KSRAFileAlignment alignment )
-{
-    char * str_data;
-    rc_t rc;
-
-    /* -----
-     * expected failure mode is NULL references for needed initializers
-     */
-    if (self == NULL)
-    {
-        return RC (rcFS, rcToc, rcConstructing, rcSelf, rcNull);
-    }
-    if ((path == NULL)||(archive == NULL))
-    {
-        return RC (rcFS, rcToc, rcConstructing, rcParam, rcNull);
-    }
-
-    /* -----
-     * get memory for the TOC and for its path
-     */
-    *self = malloc (sizeof(KToc) + StringSize(path) + 1);
-
-    /* -----
-     * expected failure mode is memory allocation failure
-     */
-    if (*self == NULL)
-    {
-        return RC (rcFS, rcToc, rcAllocating, rcMemory, rcInsufficient);
-    }
-
-    /* -----
-     * point past the KToc structure in the allocated memory for the
-     * string path of this TOC
-     */
-    str_data = (char *)*self + sizeof (KToc);
-
-    /* -----
-     * reference the existing KFile
-     */
-    switch ((*self)->arctype = arctype)
-    {
-    default:
-        free (self);
-        return RC (rcFS, rcToc, rcConstructing, rcParam, rcInvalid);
-    case tocKFile:
-        KFileAddRef ((*self)->archive.v = archive);
-        break;
-    case tocKDirectory:
-        KDirectoryAddRef ((*self)->archive.v = archive);
-        break;
-    }
-
-    /* need to set back pointer karchive */
-
-    /* -----
-     * We added here by default
-     */
-    atomic32_set (&(*self)->refcount, 1);
-
-    /* -----
-     * a tad clunky
-     */
-    string_copy (str_data, 1 + StringSize(path), path->addr, StringSize(path));
-    StringInit (&((*self)->path), str_data, StringSize(path), StringLength(path));
-    rc = (KTocAlignmentSet (*self, alignment));
-    if (rc == 0)
-    /* -----
-     * Build the "root directory" structure for the TOC initialized to empty
-     */
-    {
-        KTocEntry * pentry = &(*self)->entry;
-        const char *  pchar = strrchr ((*self)->path.addr, '/') + 1;
-        size_t	      size = (*self)->path.size - (pchar - (*self)->path.addr);
-
-        if (pchar == NULL)
-            pchar = (*self)->path.addr;
-
-        StringInit ( &pentry->name, pchar, size, (uint32_t)size );
-        pentry->type = ktocentrytype_dir;
-        BSTreeInit(&pentry->u.dir.tree);
-        BSTreeInit(&(*self)->offset_index);
-        (*self)->header = NULL;
-    }
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * AddRef
- *  ignores NULL references
- */
-rc_t KTocAddRef ( const KToc *self )
-{
-    KToc *	mutable_self = (KToc*)self; /* strip const protection for mutable field */
-
-    if (mutable_self != NULL)
-        atomic32_inc (&mutable_self->refcount);
-
-    return 0;
-}
-/* ----------------------------------------------------------------------
- * AddRef
- * Release
- *  ignores NULL references
- */
-rc_t KTocRelease ( const KToc *self )
-{
-    KToc *	mutable_self = (KToc*)self; /* strip const protection for mutable field */
-    rc_t	rc = 0;
-
-    if (mutable_self == NULL)
-    {
-        return RC (rcFS, rcToc, rcReleasing, rcSelf, rcNull);
-    }
-
-    if (atomic32_dec_and_test (&mutable_self->refcount))
-    {
-        switch (self->arctype)
-        {
-        case tocUnknown:
-        case tocKVirtual:
-            free((void*)self->archive.v);
-            break;
-
-        case tocKFile:
-            KFileRelease (self->archive.f);
-            break;
-        case tocKDirectory:
-            KDirectoryRelease (self->archive.d);
-            break;
-        }
-        BSTreeWhack (&mutable_self->entry.u.dir.tree, KTocEntryWhack, &rc);
-        BSTreeWhack (&mutable_self->offset_index, KTocEntryIndexWhack, &rc);
-        free (mutable_self);
-    }
-/*     else */
-/*     { */
-/*     } */
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KTocCreateSubdirs
- *
- * This is a constructor/parse helper method (the p starting the name is meant to 
- * imply a c++/Java private situation)
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [INOUT]KToc * 		self		TOC self reference: object oriented in C
- * [IN]   const char * 		_path		start of directory path
- * [IN]   const char * 		end		end of directory path
- * [IN]   KCreateMode  		mode		whether or not to document the existing?
- * [INOUT]KTocEntryStack * 	pathstack	created outside this function but this is
- *						where it is primarily filled in.  This is
- *						created for use in KTocResolveHardLink
- */
-static
-rc_t	KTocCreateSubdirs (KToc *    self,	   /* TOC self reference: object oriented in C */
-			   const char * _path,   /* start of directory path */
-			   const char * end, 	   /* end of directory path */
-			   KTime_t mtime,
-			   uint32_t access,
-			   KCreateMode  mode,    /* whether or not to document the existing? */
-			   KTocEntryStack * pathstack)
-{
-    const
-	char * 	path = _path;		/* pointer to head of remaining path to parse: starts at the beginning of course */
-    const
-	char *  slash;			/* pointer to the next '/' (or NUL) past the next facet of the path */
-    BSTree *	tree = &self->entry.u.dir.tree;	/* current directory tree we are in */
-    rc_t	rc = 0;		/* general purpose rc_t for calls and our own return */
-    BSTNode *   exists = NULL;		/* is there already a entry with our name? this will be it */
-    bool	success = true;		/*  */
-
-    /* -----
-     * special case of absolute position being turned into relative
-     * skip past initial "/" or "//" in a path
-     */
-    while (*path == '/')
-    {
-        PLOGMSG (klogWarn, (klogWarn,
-                            "skipping initial '/' in $(path)",
-                            PLOG_S(path),
-                            path));
-        ++path;
-    }
-
-    /* -----
-     * Now continue on with each facet of the path one at a time
-     */
-    for (;path < end; path = slash+1)
-    {
-        KTocEntry * newentry;			/* new entry for the new name entry: might be a duplicate */
-        bool	      do_insert = false;	/* do we insert a new entry? short cut for later */
-
-        /* -----
-         * find the next (first) '/' in the remaining path
-         */
-        slash = strchr (path, '/');
-
-        /* -----
-         * we've got the last directory in the path if there are no
-         * more '/' characters or if the next '/' is the last character in the
-         * path (we don't do white space checks!)
-         */
-        if (slash == NULL)
-        {
-            slash = end;
-        }
-
-        /* -----
-         * first we'll compare our new path against the special '.' and '..'
-         * special directory pointers
-         */
-        if ((path[0] == '.')&&(path+1 == slash))	/* . */
-        {
-            /* -----
-             * just ignore "here" directory references
-             */
-            continue;
-        }
-        else if ((path[0] == '.')&&(path[1] == '.')&&(path+2 == slash))	/* .. */
-        {
-            /* -----
-             * for up to parent directory references we try to change to that directory
-             */
-            int depth;
-
-            rc = KTocEntryStackDepth (pathstack, &depth);
-            if (depth <= 0)
-            {
-                /* FAILURE */
-                rc = RC (rcFS, rcToc, rcConstructing, rcLink, rcViolated);
-                success = false;
-                break;
-            }
-            else
-            {
-                rc = KTocEntryStackPop (pathstack, &newentry);
-            }
-        }
-        else
-        {
-            /* -----
-             * Create a new directory entry
-             *
-             * access isn't really implemented yet so make a directory
-             * default to read + execute for anyone
-             *
-             * we might only be using this directory entry for comparisons <shrug>
-             */
-            rc = KTocEntryNewDirectory (&newentry, path, slash - path, mtime, access);
-
-            /* -----
-             * pass along failures - no need to change any parts at this point
-             * but that time may come
-             */
-            if (rc != 0)
-            {
-                LOGMSG (klogErr, "failed to construct a directory entry: memory allocation");
-                return rc;
-            }
-
-            exists = BSTreeFind (tree, newentry, KTocEntryCmpVoid);
-
-            /* -----
-             * the expected is to insert the entry if it wasn't there but will check
-             * special circumstances
-             *
-             * so plan to insert or not based on whether it is there and expect
-             * all to be well.
-             *
-             * never insert if it already exists
-             */
-            do_insert = (bool)((exists == NULL) ?  true : false);
-            rc = 0;
-
-            /* -----
-             * Open/init/create with no make parents:
-             */
-            if ((exists == NULL)&& !(mode & kcmParents))
-            {
-                /* parent did not exist so we will fail */
-                rc = RC (rcFS, rcToc, rcCreating, rcSelf, rcInconsistent);
-                do_insert = false;
-                success = false;
-            }
-
-            /* -----
-             * if rc is set, we had a problem and will fail
-             */
-            if (rc != 0)
-            {
-                LOGERR	(klogErr, rc,
-                         "directory parse/creation failed");
-                (void)KTocEntryDelete(newentry);
-                break;
-            }
-
-            if (do_insert)
-            {
-                rc = BSTreeInsert (tree, &newentry->node, KTocEntryCmp2);
-                if (rc)
-                {
-                    LOGMSG (klogErr, "directory parse/creation failed 2");
-                    (void)KTocEntryDelete(newentry);
-                    break;
-                }
-                TOC_DEBUG (("%s: inserted new directory into TOC %S\n", __func__, newentry->name));
-            }
-            else
-            {
-                (void)KTocEntryDelete(newentry);
-                newentry = (KTocEntry*)exists;
-            }
-
-            /* -----
-             * move into the subdirectory for the next directory in the path
-             */
-            if ((rc = KTocEntryStackPush (pathstack, newentry)) != 0)
-            {
-                success = false;
-                break;
-            }
-
-            tree = &newentry->u.dir.tree;
-        }
-    }
-    return success ? 0 : rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KTocCreate
- *
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN] KToc *		self		TOC self reference: object oriented in C
- * [IN] KCreateMode 		mode		KDirectory defines that define what to so with
- *						"files" that already existed or did not including
- *						missing subdirectories in the path
- * [IN] const char *		ppath		the path name for the new entry relative to the
- *						base of the TOC
- * [IN] const KTocEntryParam*	pparams		specific parameters for this type of entry - the
- *						type of entry is included in this structure
- */
-static rc_t KTocCreate (KToc *self,
-			KCreateMode mode,
-			const char *ppath,
-			const KTocEntryParam * pparams)
-{
-    rc_t		rc;
-    char *		pend;
-    size_t		name_size;
-    BSTree *		ptree;
-    KTocEntry * 	pnewentry = NULL;	/* init to kill a warning */
-    KTocEntry * 	pexistingentry;
-    KTocEntry * 	pwd = NULL;
-    KTocEntryStack *	pdirstack;
-
-    assert (self != NULL);
-    assert (ppath != NULL);
-    assert (pparams != NULL);
-
-    ptree = &self->entry.u.dir.tree;
-
-    if ((rc = KTocEntryStackNew (&pdirstack)) != 0)
-    {
-        return rc;
-    }
-    /* -----
-     * look for a '/' that isn't the last character in the path
-     */
-    pend = string_rchr (ppath, strlen(ppath)-1, '/');
-    if (pend != NULL)
-    {
-
-        rc = KTocCreateSubdirs (self, ppath, pend, pparams->mtime,
-                                pparams->access, mode, pdirstack);
-
-        rc = KTocEntryStackPop (pdirstack, &pwd);
-        if (pwd)
-        {
-            ptree = &(pwd->u.dir.tree);
-        }
-
-        ppath = pend+1;
-    }
-
-    name_size = strlen(ppath);
-    switch (pparams->type)
-    {
-    default:
-        break;
-    case ktocentrytype_dir:
-        rc = KTocEntryNewDirectory (&pnewentry,
-                                    ppath,
-                                    name_size,
-                                    pparams->mtime,
-                                    pparams->access);
-        break;
-    case ktocentrytype_file:
-        rc = KTocEntryNewFile (&pnewentry,
-                               ppath,
-                               name_size,
-                               pparams->mtime,
-                               pparams->access,
-                               pparams->u.file.source_position,
-                               pparams->u.file.size);
-        break;
-    case ktocentrytype_zombiefile:
-        rc = KTocEntryNewZombieFile (&pnewentry,
-                                     ppath,
-                                     name_size,
-                                     pparams->mtime,
-                                     pparams->access,
-                                     pparams->u.file.source_position,
-                                     pparams->u.file.size);
-        break;
-    case ktocentrytype_chunked:
-        rc = KTocEntryNewChunked (&pnewentry,
-                                  ppath,
-                                  name_size,
-                                  pparams->mtime,
-                                  pparams->access,
-                                  pparams->u.chunked.size,
-                                  pparams->u.chunked.chunks,
-                                  pparams->u.chunked.num_chunks);
-        break;
-    case ktocentrytype_softlink:
-        rc = KTocEntryNewSoft (&pnewentry,
-                               ppath,
-                               name_size,
-                               pparams->mtime,
-                               pparams->access,
-                               pparams->u.softlink.targ,
-                               strlen (pparams->u.softlink.targ));
-        break;
-    case ktocentrytype_hardlink:
-        rc = KTocEntryNewHard (&pnewentry,
-                               ppath,
-                               name_size,
-                               pparams->mtime,
-                               pparams->access,
-                               pparams->u.hardlink.ref);
-        break;
-    }
-/*     if (rc != 0) */
-/* 	; */
-
-    pexistingentry = (KTocEntry*)BSTreeFind (ptree, pnewentry, KTocEntryCmpVoid);
-
-    if (pexistingentry != NULL)
-    {
-        switch (mode & kcmValueMask)
-        {
-        default:
-            LOGMSG (klogInt, "invalis create mode flag for Toc Entry");
-        case kcmOpen:	/* use existing entry if it exists */
-            KTocEntryDelete (pnewentry);
-            break;
-
-        case kcmInit:
-            BSTreeUnlink (ptree, &pexistingentry->node); /*?*/
-            KTocEntryDelete (pexistingentry);
-            goto insert;
-            break;
-
-        case kcmCreate:
-            KTocEntryDelete (pnewentry);
-            rc = RC (rcFS, rcToc, rcInserting, rcDirEntry, rcDuplicate);
-            break;
-        }
-    }
-    else
-    {
-    insert:
-        rc = BSTreeInsert (ptree, &pnewentry->node, KTocEntryCmp2);
-        TOC_DEBUG (("%s: inserted new %s into TOC %s\n", __func__,
-                    KTocEntryTypeGetString(pparams->type),
-                    pnewentry->name.addr));
-    }
-#if 0
-    if (pparams->type == ktocentrytype_hardlink)
-    {
-
-        /* -----
-         * Now the ugly specific part of a hard link - resolve the link
-         */
-        rc = KTocResolveHardLink (self, pparams->u.hardlink.targ, pdirstack, pwd, &(pnewentry->u.hard_link.ref));
-        if (rc  != 0)
-        {
-            /* kill off node */
-            BSTreeUnlink (ptree, &pnewentry->node);
-            rc = RC (rcFS, rcToc, rcAliasing, rcArcHardLink, rcNotFound);
-        }
-    }
-#endif
-    KTocEntryStackDel (pdirstack);
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * Constructors/factories
- */
-static
-rc_t createPath (char ** newpath, const char * path, va_list args)
-{
-    rc_t rc;
-    char * p;
-    char * pp;
-    size_t l;
-    int i;
-
-    rc = 0;
-    p = NULL;
-    l = 4096;
-    *newpath = p;
-
-    /* not trusting C99 version of vsnprintf is in place rather than SUSv2 */
-    for (;;)
-    {
-        pp = realloc (p,l);
-        if (pp == NULL)
-        {
-            rc = RC (rcFS, rcToc, rcConstructing, rcMemory, rcExhausted);
-            return rc;
-        }
-        if (args == NULL)
-        {
-            i = (int)strlen ( path );
-            if ( i < (int)l )
-            strcpy ( pp, path );
-        }
-        else
-            i = vsnprintf (pp, l, path, args);
-        if (i < 0)
-        {
-            rc = RC (rcFS, rcToc, rcConstructing, rcFormat, rcInvalid);
-            free (pp);
-            return rc;
-        }
-        p = pp;
-        if ( i < (int)l )
-            break;
-        l = i + 1;
-    } 
-
-    *newpath = pp;
-
-    return rc;
-}
-
-
-
-/* ---------
- * CreateDir
- *  create a sub-directory
- *
- *  "mode" [ IN ] - a creation mode (see explanation in kfs/directory.h).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- */
-rc_t KTocCreateDir ( KToc *self,KTime_t mtime, uint32_t access,
-		    KCreateMode mode, const char *path, ... )
-{
-    va_list 	args;
-    rc_t	rc;
-
-    va_start (args, path);
-    rc = KTocVCreateDir (self, mtime, access, mode, path, args);
-    va_end (args);
-    return rc;
-}
-
-rc_t KTocVCreateDir ( KToc *self,KTime_t mtime, uint32_t access,
-		     KCreateMode mode, const char *path, va_list args )
-{
-    KTocEntryParam	params;
-    char * npath;
-    rc_t rc;
-
-    TOC_DEBUG (("%s: Name: %s Mode: %s\n", __func__,
-	     path, get_mode_string(mode)));
-
-    rc = createPath (&npath, path, args);
-    if (rc)
-        return rc;
-
-    params.type = ktocentrytype_dir;
-    params.mtime = mtime;
-    params.access = access;
-
-    rc = KTocCreate (self, mode, npath, &params);
-    free (npath);
-    return rc;
-}
-
-/* ----------
- * CreateFile
- *  create an entry for a contiguous file
- *
- *  "source_position" [ IN ] and "size" [ IN ] - description of the contiguous
- *  region of the archive file occupied by the file
- *
- *  "mode" [ IN ] - a creation mode (see explanation above).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-rc_t KTocCreateFile ( KToc *self,
-		     uint64_t source_position, uint64_t size,
-		    KTime_t mtime, uint32_t access, 
-		     KCreateMode mode, const char *path, ... )
-{
-    va_list 	args;
-    rc_t	rc;
-
-    va_start (args, path);
-    rc = KTocVCreateFile (self, source_position, size,
-			  mtime, access, mode, path, args);
-    va_end (args);
-    return rc;
-}
-
-rc_t KTocVCreateFile ( KToc *self,
-                       uint64_t source_position, uint64_t size,
-                       KTime_t mtime, uint32_t access, 
-                       KCreateMode mode, const char *path, va_list args )
-{
-    KTocEntryParam	params;
-    char * npath;
-    rc_t rc;
-
-    TOC_DEBUG (("%s: Name: %s Mode: %sn Time: %lu\n", __func__,
-                path, get_mode_string(mode), mtime));
-
-
-    rc = createPath (&npath, path, args);
-    if (rc)
-        return rc;
-
-    params.type = ktocentrytype_file;
-    params.mtime = mtime;
-    params.access = access;
-    params.u.file.size = size;
-    params.u.file.source_position = source_position;
-
-    rc = KTocCreate (self, mode, npath, &params);
-    free (npath);
-    return rc;
-}
-
-rc_t KTocCreateZombieFile ( KToc *self,
-                            uint64_t source_position, uint64_t size,
-                            KTime_t mtime, uint32_t access, 
-                            KCreateMode mode, const char *path, ... )
-{
-    va_list 	args;
-    rc_t	rc;
-
-    va_start (args, path);
-    rc = KTocVCreateZombieFile (self, source_position, size,
-                                mtime, access, mode, path, args);
-    va_end (args);
-    return rc;
-}
-
-rc_t KTocVCreateZombieFile ( KToc *self,
-                             uint64_t source_position, uint64_t size,
-                             KTime_t mtime, uint32_t access, 
-                             KCreateMode mode, const char *path, va_list args )
-{
-    KTocEntryParam	params;
-    char * npath;
-    rc_t rc;
-
-    TOC_DEBUG (("%s: Name: %s Mode: %sn Time: %lu\n", __func__,
-                path, get_mode_string(mode), mtime));
-
-
-    rc = createPath (&npath, path, args);
-    if (rc)
-        return rc;
-
-    params.type = ktocentrytype_zombiefile;
-    params.mtime = mtime;
-    params.access = access;
-    params.u.file.size = size;
-    params.u.file.source_position = source_position;
-
-    rc = KTocCreate (self, mode, npath, &params);
-    free (npath);
-    return rc;
-}
-
-/* ---------
- * CreateChunkedFile
- */
-rc_t KTocCreateChunkedFile ( KToc *self, uint64_t size,KTime_t mtime,
-                             uint32_t access, uint32_t num_chunks,
-                             const KTocChunk chunks [], KCreateMode mode,
-                             const char *path, ... )
-{
-    va_list 	args;
-    rc_t	rc;
-
-    va_start (args, path);
-    rc = KTocVCreateChunkedFile (self, size, mtime, access, num_chunks,
-				 chunks, mode, path, args);
-    va_end (args);
-    return rc;
-}
-
-rc_t KTocVCreateChunkedFile ( KToc *self, uint64_t size,KTime_t mtime,
-                              uint32_t access, uint32_t num_chunks,
-                              const KTocChunk chunks [], KCreateMode mode,
-                              const char *path, va_list args )
-{
-    KTocEntryParam	params;
-    unsigned int	ix;
-    rc_t		rc;
-    char * 		npath;
-
-    TOC_DEBUG (("KToc Create Chunked File:: Name: %s Size: %ju Chunk count: %u Mode %s\n",
-                path, size, num_chunks, get_mode_string(mode)));
-
-    for (ix = 0; ix < num_chunks; ++ix)
-    {
-        TOC_DEBUG (( "KToc Create Chunk %u: 0x%jx 0x%jx %ju\n",
-                     ix,
-                     chunks[ix].logical_position,
-                     chunks[ix].source_position,
-                     chunks[ix].size));
-    }
-
-    rc = createPath (&npath, path, args);
-    if (rc)
-        return rc;
-
-    params.type = ktocentrytype_chunked;
-    params.u.chunked.size = size;
-    params.u.chunked.chunks = chunks;
-    params.u.chunked.num_chunks = num_chunks;
-
-    rc = KTocCreate (self, mode, npath, &params);
-    free (npath);
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * CreateHardLink
- */
-rc_t KTocCreateHardLink ( KToc *self,KTime_t mtime, uint32_t access,
-                          KCreateMode mode, const char *targ,
-                          const char *link, ... )
-{
-    va_list 	args;
-    rc_t	rc;
-
-    va_start (args, link);
-    rc = KTocVCreateHardLink(self, mtime, access, mode, targ,
-			     link, args);
-    va_end (args);
-    return rc;
-}
-
-rc_t KTocVCreateHardLink ( KToc *self,KTime_t mtime, uint32_t access,
-			  KCreateMode mode, const char *targ,
-			  const char *link_fmt, va_list args )
-{
-#if 0
-    KTocEntryParam	params;
-    char * npath;
-    rc_t rc;
-
-
-
-    return rc;
-#else
-    KTocEntryParam	params;
-    char * npath;
-    const char * excess_path;
-    const KTocEntry * targ_entry;
-    KTocEntryType targ_type;
-    rc_t rc;
-
-    TOC_DEBUG (("Hard link_fmt:: Name: %s Link: %s Mode: %s\n",
-                link_fmt, targ, get_mode_string(mode)));
-
-    /* figure out where we are supposed to point */
-    rc = KTocResolvePathTocEntry (self, &targ_entry, targ, string_size (targ),
-                                  &targ_type, &excess_path);
-    if (rc == 0)
-    {
-        /* hard links to directories are kept as hard links
-         * while other types become true unix style links */
-        char link[4096];
-        int size;
-
-        switch (targ_type)
-        {
-        case ktocentrytype_dir:
-            rc = createPath (&npath, link_fmt, args);
-            if (rc)
-                return rc;
-            params.type = ktocentrytype_hardlink;
-            params.mtime = mtime;
-            params.access = access;
-            params.u.hardlink.ref = targ_entry;
-            rc = KTocCreate (self, mode, npath, &params);
-            free (npath);
-            return rc;
-
-            /* resolve by one indirection */
-        case ktocentrytype_hardlink:
-            rc = createPath (&npath, link_fmt, args);
-            if (rc)
-                return rc;
-            params.type = ktocentrytype_hardlink;
-            params.mtime = mtime;
-            params.access = access;
-            params.u.hardlink.ref = targ_entry->u.hard_link.ref;
-            rc = KTocCreate (self, mode, npath, &params);
-            free (npath);
-            return rc;
-
-        case ktocentrytype_file:
-        case ktocentrytype_zombiefile:
-            size = (args == NULL) ?
-                snprintf  ( link, sizeof link, "%s", link_fmt ) :
-                vsnprintf ( link, sizeof link, link_fmt, args );
-            if (size < 0 || size >= ( int ) sizeof link)
-                rc = RC (rcFS, rcToc, rcConstructing, rcLink, rcExcessive);
-            return rc ? rc : KTocCreateFile (self, targ_entry->u.contiguous_file.archive_offset,
-                                   targ_entry->u.contiguous_file.file_size,
-                                   mtime, access, mode, link);
-
-        case ktocentrytype_emptyfile:
-            size = (args == NULL) ?
-                snprintf  ( link, sizeof link, "%s", link_fmt ) :
-                vsnprintf ( link, sizeof link, link_fmt, args );
-            if (size < 0 || size >= ( int ) sizeof link)
-                rc = RC (rcFS, rcToc, rcConstructing, rcLink, rcExcessive);
-            return rc ? rc : KTocCreateFile (self, 0, 0, mtime, access, mode, link);
-
-        case ktocentrytype_chunked:
-            size = (args == NULL) ?
-                snprintf  ( link, sizeof link, "%s", link_fmt ) :
-                vsnprintf ( link, sizeof link, link_fmt, args );
-            if (size < 0 || size >= ( int ) sizeof link)
-                rc = RC (rcFS, rcToc, rcConstructing, rcLink, rcExcessive);
-            return rc ? rc : KTocCreateChunkedFile (self, targ_entry->u.chunked_file.file_size, mtime,
-                                          access, targ_entry->u.chunked_file.num_chunks,
-                                          targ_entry->u.chunked_file.chunks, mode, link);
-
-        case ktocentrytype_softlink:
-            size = (args == NULL) ?
-                snprintf  ( link, sizeof link, "%s", link_fmt ) :
-                vsnprintf ( link, sizeof link, link_fmt, args );
-            if (size < 0 || size >= ( int ) sizeof link)
-                rc = RC (rcFS, rcToc, rcConstructing, rcLink, rcExcessive);
-            return rc ? rc : KTocCreateSoftLink (self, mtime, access, mode, link,
-                                       targ_entry->u.symbolic_link.link_path.addr);
-
-        default:
-        case ktocentrytype_notfound:
-            /* silent ignore? */
-            break;
-        }
-    }
-    return rc;
-#endif
-}
-
-/* ----------------------------------------------------------------------
- * CreateSoftLink
- */
-rc_t KTocCreateSoftLink ( KToc *self,KTime_t mtime, uint32_t access,
-			 KCreateMode mode, const char *targ,
-			 const char *alias, ... )
-{
-    va_list 	args;
-    rc_t	rc;
-
-    va_start (args, alias);
-    rc = KTocVCreateSoftLink (self, mtime, access, mode,
-			      targ, alias, args);
-    va_end (args);
-    return rc;
-}
-
-rc_t KTocVCreateSoftLink ( KToc *self,KTime_t mtime, uint32_t access,
-			  KCreateMode mode, const char *targ,
-			  const char *alias, va_list args )
-{
-    KTocEntryParam	params;
-    char * npath;
-    rc_t rc;
-
-    TOC_DEBUG (("Soft link:: Name: %s Link: %s Mode: %s\n",
-                alias, targ, get_mode_string(mode)));
-
-    rc = createPath (&npath, alias, args);
-    if (rc)
-        return rc;
-
-    params.type = ktocentrytype_softlink;
-    params.mtime = mtime;
-    params.access = access;
-    params.u.softlink.targ = targ;
-
-    rc = KTocCreate (self, mode, npath, &params);
-    free (npath);
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- *
- */
-const KTocEntry * KTocGetRoot	(const KToc * self)
-{
-    if (self == NULL)
-        return NULL;
-
-    return &self->entry;
-}
-
-rc_t KTocGetPath ( const KToc * self, const String ** ppath )
-{
-    assert (self != NULL);
-    *ppath = &self->path;
-    return 0;
-}
-
-KSRAFileAlignment KTocAlignmentGet( KToc * self )
-{
-    return self->alignment;
-}
-
-rc_t KTocAlignmentSet( KToc * self,KSRAFileAlignment align )
-{
-    if ((align != 0) && (align == ((align)&~(align-1))))
-    {
-        self->alignment = align;
-        return 0;
-    }
-    return RC (rcFS, rcToc, rcConverting, rcParam, rcInvalid);
-}
-
-
-/* const char * KTocGetRootPath (const KToc * self, size_t * len) */
-/* { */
-/*     if (self == NULL) */
-/* 	return NULL; */
-/*     *len = self->path.len; */
-/*     return &self->path.addr;; */
-/* } */
-/*****
- ***** CURRENTLY DOES NOT SUPPORT any form of crossing of
- ***** KDirectory type paths
- *****/
-rc_t KTocResolvePathTocEntry ( const KToc *self,
-                               const KTocEntry ** pentry,
-                               const char *path,	/* must be entirely in the TOC */
-                               size_t path_len,
-                               KTocEntryType * ptype,
-                               const char ** unusedpath )
-{
-    const char *  	slash;		/* points to the / following the current facet */
-    const char *  	next_facet;	/* points to the start of the current facet */
-    const char *	end;		/* points to the character after the path */
-    const KTocEntry * dentry;		/* the current entry we are at during the walk through */
-    KTocEntry * 	tentry;		/* points to a Temporary ENTRY built for comparisons */
-    union
-    {
-        const BSTNode     * b;		/* access to the BSTree Node starting the KToc entry */
-        const KTocEntry * k;		/* access to the whole of the entry */
-    }		  	fentry;		/* Found ENTRY: two ways to access to skip casts */
-    rc_t	  	rc;		/* temporary storage for the return from many calls */
-    size_t	  	facet_size;	/* length of a single facet (part of a path dir or file) */
-    size_t		path_size;	/* temporary size (shrinks as we go through the path */	
-    /* int		  	loopcount;	counter for loop limiting hardlink resolution */
-    KTocEntryType 	type = ktocentrytype_unknown;	/* type of a entry found for a facet (init to kill a warning */
-    bool		is_last_facet = false;
-    bool		is_facet_dir = false; /* if the path ends in / we know the last facet is a dir */
-    int                 outer_loopcount;
-    /* -----
-     * point to one character past the path - usually it will be a NUL but we
-     * are not making that a requirement here
-     */
-    next_facet = path;
-    path_size = path_len;
-    end = next_facet + path_size;
-    dentry = &self->entry;
-
-    /* -----
-     * look first for here references:
-     * either no path (not NULL but "") or just "."
-     */
-    if ((path_len == 0) || ((path_len == 1) && (path[0] == '.')))
-    {
-        *pentry = dentry;
-        *ptype = ktocentrytype_dir;
-        *unusedpath = end;
-        return 0;
-    }
-
-
-    /* -----
-     * now start wending our way down through subdirectories
-     */
-    for (outer_loopcount = 0; next_facet < end; ++ outer_loopcount)
-    {
-        TOC_DEBUG (("%s: stepping through subs (%d) (%s)\n", __func__, outer_loopcount, next_facet));
-
-        /* -----
-         * look for the end of the next facet in the path
-         */
-        slash = strchr (next_facet, '/');
-
-        /* -----
-         * if there was no '/' found then point to the end as that is the end of the facet
-         * but also mark that we know this is the last one (be it a directory, link or file)
-         */
-        if (slash == NULL)			
-        {
-            slash = end;
-            is_last_facet = true;
-        }
-        /* -----
-         * handle the special case of a path ending in / which also makes the last facet
-         * known to be a directory
-         */
-        else if (slash + 1 == end)
-        {
-            slash = end;
-            is_last_facet = true;
-            is_facet_dir = true;
-        }
-        facet_size = slash - next_facet;	/* how many characters in this facet */
-
-        /* -----
-         * build a temporary entry for comparisons
-         */
-        rc = KTocEntryNewDirectory (&tentry, next_facet, facet_size, 0, 0555);
-        if (rc != 0)
-        {
-            *pentry = NULL;		/* if we couldn't make then fail */
-            return rc;
-        }
-        fentry.b = BSTreeFind (&dentry->u.dir.tree, tentry, KTocEntryCmpVoid);
-        KTocEntryDelete(tentry);	/* clean up the temporary entry */
-
-        if (fentry.b == NULL)
-        {
-            /* -----
-             * we failed to find this facet.
-             */
-            *pentry = NULL;		/* if we couldn't make it fail */
-            *unusedpath = next_facet;	/* the name we couldn't find */
-            *ptype = ktocentrytype_notfound;
-
-            TOC_DEBUG (("%s: couldn't find (%s)\n", __func__, next_facet));
-
-            return SILENT_RC (rcFS, rcArc, rcResolving, rcParam, rcNotFound);
-        }
-
-        /* loopcount = 0; */
-
-        /* check the type to see if we're okay with it */
-        if ((rc = KTocEntryGetType (fentry.k, &type)) != 0)
-        {
-            if (type == ktocentrytype_notfound)
-            {
-                *ptype = type;
-            }
-            else
-            {
-                *ptype = ktocentrytype_unknown;
-            }
-            *pentry = NULL;		/* if we couldn't then fail */
-            *unusedpath = next_facet;	/* the name we couldn't find */
-            return rc;
-        }
-        *ptype = type;
-        switch (type)
-        {
-            /* -----
-             * resolve a hardlink immediately 
-             * re-resolve until we've gone too many hops or the
-             * resolution is to something that isn't another hardlink
-             *
-             * re-enter this switch with the type of the resolved entry
-             */
-        case ktocentrytype_hardlink:
-            if (is_last_facet)
-            {
-                *pentry = fentry.k->u.hard_link.ref;
-                *unusedpath = end;
-                /* successful arrival at the end at a directory */
-                return 0;
-            }
-            else
-            {
-                /* -----
-                 * this is the only path that continues through the loop
-                 */
-                next_facet = slash + 1;	 /* point past the slash */
-                dentry = fentry.k->u.hard_link.ref; /* make the found entry our current entry */
-            }
-            continue;	/* back to for(;;) */
-
-        case ktocentrytype_dir:
-            if (is_last_facet)
-            {
-                *pentry = fentry.k;
-                *unusedpath = end;
-                /* successful arrival at the end at a directory */
-                return 0;
-            }
-            else
-            {
-                /* -----
-                 * this is the only path that continues through the loop
-                 */
-                next_facet = slash + 1;	/* point past the slash */
-                dentry = fentry.k;	/* make the found entry our current entry */
-            }
-            continue;	/* back to for(;;) */
-
-        default:
-            *pentry = fentry.k;
-            *ptype = ktocentrytype_unknown;
-            *unusedpath = next_facet;
-            /* failure return */
-            return RC (rcFS, rcToc, rcResolving, rcParam, rcInvalid);
-
-        case ktocentrytype_emptyfile:
-        case ktocentrytype_file:
-        case ktocentrytype_chunked:
-        case ktocentrytype_zombiefile:
-            *pentry = fentry.k;
-
-            /* -----
-             * success if we are on the last facet that wasn't supposed to be a directory
-             * failure if we are not
-             */
-            if (is_last_facet && (! is_facet_dir))
-            {
-                *unusedpath = end;
-                return 0;
-            }
-            else
-            {
-                *unusedpath = next_facet;
-                return RC (rcFS, rcToc, rcResolving, rcParam, rcInvalid);
-            }
-
-        case ktocentrytype_softlink:
-            /* -----
-             * We got a softlink entry in the path.
-             */
-            *pentry = fentry.k;
-            *unusedpath = slash;
-            return 0;	/* This is a bit clunky but is a valid incomplete return */
-        }
-    }
-    /* should never get here */
-    return RC (rcFS, rcToc, rcResolving, rcParam, rcUnexpected);
-}
-
-/* SRA tocfile only not tar or other archives only */
-rc_t KTocResolvePathFromOffset ( const KToc *self,
-                                 const char ** path,
-                                 uint64_t * ppos,
-                                 uint64_t _offset )
-{
-    rc_t rc;
-    union u
-    {
-        const BSTNode * n;
-        const KTocEntryIndex * i;
-    } u;
-    uint64_t offset;
-    struct ugliness thisIsReallyUgly;
-
-    rc = 0;
-    offset = _offset - SraHeaderGetFileOffset (self->header);
-
-    TOC_DEBUG(("KTocResolvePathFromOffset _offset %lu offset %lu\n",
-               _offset, offset));
-
-    *path = NULL;
-    *ppos = 0;
-    thisIsReallyUgly.toc = self;
-    thisIsReallyUgly.offset = offset;
-
-    u.n =  BSTreeFind (&self->offset_index, &thisIsReallyUgly, KTocEntryIndexCmpOffset);
-    if (u.n != NULL)
-    {
-        *path = u.i->fullpath.addr;
-        *ppos = thisIsReallyUgly.foffset;
-    }
-    return rc;
-}
-
-const void * KTocGetArchive( const KToc * self )
-{
-    if (self == NULL)
-        return NULL;
-    return self->archive.v;
-}
-				
-
-
-
-typedef struct KDBHdr KDBHdr;
-
-typedef
-struct PersistFilesIndexData
-{
-    uint64_t offset;
-    const KToc * toc;
-    rc_t rc;
-} PersistFilesIndexData;
-
-LIB_EXPORT void CC PersistFilesIndex ( void * vitem, void * vdata )
-{
-    PersistFilesIndexData * data;
-    const char * path;
-
-    TOC_FUNC_ENTRY();
-
-    data = vdata;
-    if (data->rc != 0)
-    {
-        TOC_DEBUG(("PersistFilesIndex leave early %R\n", data->rc));
-        return;
-    }
-    path = (char*)vitem;
-
-    TOC_DEBUG(("PersistFilesIndex %s\n", path));
-
-    data->rc = KTocCreateEntryIndex ((KToc*)data->toc, path, &data->offset);
-}
-
-rc_t KTocPersist ( const KToc * self,
-                   void ** buffer, size_t * buffer_size,
-                   uint64_t * virtual_file_size,
-                   const Vector * files )
-{
-    rc_t rc;
-    size_t treesize;
-    KSraHeader * header;
-    uint8_t * bbuffer;
-    uint64_t filesize;
-
-    TOC_FUNC_ENTRY();
-
-    rc = 0;
-    treesize = 0;
-    bbuffer = NULL;
-    *buffer = NULL;
-    *buffer_size = 0;
-    *virtual_file_size = 0;
-
-    rc = KTocEntryPersistNodeDir (NULL, &self->entry, &treesize, NULL, NULL);
-    if (rc != 0)
-    {
-        LOGMSG (klogErr, "Failure to Persist Toc Root Entry");
-    }
-    else
-    {
-        rc = SraHeaderMake (&header, treesize, self->alignment);
-        if (header == NULL)
-        {
-            rc = RC (rcFS, rcToc, rcPersisting, rcMemory, rcExhausted);
-            LOGERR (klogErr, rc, "Failure to allocate buffer for header");
-        }
-        else
-        {
-                TOC_DEBUG (("KTocPersist: treesize %ju\n", treesize));
-
-            bbuffer = realloc ( header, (size_t)SraHeaderGetFileOffset( header ) );
-            if (bbuffer == NULL)
-            {
-                free (header);
-                rc = RC (rcFS, rcToc, rcPersisting, rcMemory, rcExhausted);
-                LOGERR (klogErr, rc, "Failure to allocate buffer for persisted header");
-            }
-            else
-            {
-                PersistFilesIndexData data;
-
-                header = (KSraHeader*)bbuffer;
-                data.offset = 0;
-                data.toc = self;
-                data.rc = 0;
-
-                VectorForEach (files, false, PersistFilesIndex, &data);
-                filesize = SraHeaderGetFileOffset(header) + data.offset;
-                rc = data.rc;
-                if (rc == 0)
-                {
-                            KTocEntryPersistWriteFuncData wdata;
-                            wdata.buffptr = bbuffer + SraHeaderSize(NULL);
-                            wdata.limit = bbuffer + SraHeaderGetFileOffset(header);
-                            rc = KTocEntryPersistNodeDir (NULL, &self->entry, &treesize,
-                                                          KTocEntryPersistWriteFunc, 
-                                                          &wdata);
-                }
-            }
-        }
-    }
-    if (rc == 0)
-    {
-        ((KToc*)self)->header = (KSraHeader *)bbuffer;
-        *buffer = bbuffer;
-        *buffer_size = treesize + SraHeaderSize(NULL);
-        *virtual_file_size = filesize;
-        return 0;
-    }
-    else if (bbuffer != NULL)
-    {
-        TOC_DEBUG (("Free called in KTocPersist\n"));
-        free (bbuffer);
-    }
-    return rc;
-}
-
-
-/* end of file toc.c */
diff --git a/libs/kfs/tocdir.c b/libs/kfs/tocdir.c
deleted file mode 100644
index e3752fc..0000000
--- a/libs/kfs/tocdir.c
+++ /dev/null
@@ -1,411 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
- 
-#include <kfs/extern.h>
-#include "toc-priv.h"
-#include <klib/rc.h>
-#include <klib/defs.h>
-#include <klib/namelist.h>
-#include <kfs/directory.h>
-#include <kfs/toc.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <stdio.h>
-
-static
-rc_t KTocProcessOneNameCommonAtt (const KDirectory * dir,
-				  const char * path,
-				  KTime_t * mtime,
-				  uint32_t * access)
-{
-    rc_t rc;
-
-    *mtime = 0;
-    *access = 0;
-    rc = KDirectoryDate (dir, mtime, "%s", path);
-    if (rc != 0)
-    {
-	PLOGERR (klogErr, (klogErr, rc, "Failure getting mtime of $(p)", PLOG_S(p), path));
-    }
-    else
-    {
-        rc = KDirectoryAccess (dir, access, "%s", path);
-	if (rc != 0)
-	{
-	    PLOGERR (klogErr, (klogErr, rc, "Failure getting access of $(p)", PLOG_S(p), path));
-	}
-    }
-    TOC_DEBUG (("%s path %s ktime_t %lu access %o\n", __func__, path, *mtime, *access));
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KTocParseKDirRecurOnePath
- *
- * take a single path name and add it to the TOC
- *
- * KToc *			self	read/write	the TOC being built
- * const KDirectory *		dir	read		the directory owning the path
- * bool (*)(const KDirectory*,
- *          const char *,
- *          void *)		filter	read/execute	a filtering function for path inclusion
- * void *			data	read		passed in as third parameter to filter
- * const char *			name	read		the path to be added
- *
- * filter and data can be NULL
- */
-static
-rc_t KTocParseKDirRecur	(KToc * self,
-			 const KDirectory * dir,
-			 const char * path,
-			 bool (CC* filter )(const KDirectory *,const char *, void*),
-			 void *  data);
-             
-static
-rc_t KTocParseKDirRecurOnePath (KToc * self,
-				   const KDirectory * dir,
-				   const char * path,
-				   bool (CC* filter )(const KDirectory *,const char *, void*),
-				   void *  data)
-{
-    rc_t rc;
-    KPathType type;
-    KTime_t mtime;
-    uint32_t access;
-    uint64_t size;
-
-    assert (self != NULL);
-    assert (dir != NULL);
-    assert (path != NULL);
-
-    TOC_DEBUG (("%s: recur path for %s\n", __func__, path));
-
-    type = (KPathType)KDirectoryPathType (dir, "%s", path);
-
-    if (type & kptAlias)
-    {
-	size = 0;
-	rc = KTocProcessOneNameCommonAtt (dir, path, &mtime, &access);
-	if (rc == 0)
-	{
-	    char * res;
-	    char * tres;
-	    size_t res_sz;
-
-	    res = NULL;
-	    rc = RC ( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-	    for (res_sz = 128; 
-		 rc == RC ( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-		 res_sz <<= 1)
-	    {
-		tres = realloc (res, res_sz);
-		if (tres == NULL)
-		{
-		    if (res != NULL)
-			free (res);
-		    return RC (rcFS, rcToc, rcParsing, rcMemory, rcExhausted);
-		}
-		res = tres;
-        rc = KDirectoryResolveAlias (dir, false, res, res_sz, "%s", path );
-	    }
-	    if (rc != 0)
-	    {
-		PLOGERR (klogWarn, (klogWarn, rc, "Failure getting alias target of $(p)", PLOG_S(p), path));
-	    }
-	    else
-	    {
-		rc = KTocCreateSoftLink (self, mtime, access, kcmCreate, res, path);
-	    }
-	    if (res != NULL)
-		free (res);
-	}
-    }
-    else
-    {
-	switch (type)
-	{
-	default:
-	    /* -----
-	     * fail on anything we don't understand
-	     */
-	    rc = RC (rcFS, rcToc, rcConstructing, rcToc, rcUnexpected);
-	    PLOGERR (klogInt, (klogInt, rc, "Failure getting type for $(p)", PLOG_S(p), path));
-	    break;
-	case kptCharDev:
-	case kptBlockDev:
-	case kptFIFO:
-	    /* -----
-	     * silently drop all devices and fifo/queues
-	     */
-	    rc = 0;
-	    break;
-	case kptFile:
-		/* TBD: add support here for chunked files and for hard links
-		 *
-		 * use lstat (not stat) to see if there are more than one link.  
-		 * if so then this inode will end up in a bstree of possible doubly
-		 * linked files.  first time we find it put in in the toc as a file,
-		 * while on subsequent times put it in as a hardlink
-		 *
-		 * Don't know how to detect sparse files yet (other than this from wikipedia)
-		 *
-		 * http://en.wikipedia.org/wiki/Sparse_files#Detecting_sparse_files_in_Unix
-		 * Sparse files have different apparent and actual file sizes. This can be
-		 * detected by comparing the output of:
-		 *
-		 *	du -s -B1 --apparent-size sparse-file
-		 *
-		 * and:
-		 *
-		 *	du -s -B1 sparse-file
-		 *
-		 */
-	    rc = KDirectoryFileSize (dir, &size, "%s", path);
-	    if (rc != 0)
-	    {
-		PLOGERR (klogErr, (klogErr, rc, "Failure getting size of $(p)", PLOG_S(p), path));
-	    }
-	    else
-	    {
-		rc = KTocProcessOneNameCommonAtt (dir, path, &mtime, &access);
-		if (rc == 0)
-		{
-/* eventually we can choose to check for a compression */
-		    rc = KTocCreateFile (self, 0/*place holder*/, size, mtime, 
-                                          access, kcmCreate, path);
-		}
-	    }
-	    break;
-	case kptDir:
-	    size = 0;
-	    rc = KTocProcessOneNameCommonAtt (dir, path, &mtime, &access);
-	    if (rc == 0)
-	    {
-		rc = KTocCreateDir (self, mtime, access, kcmCreate, path);
-		if (rc == 0)
-		{
-		    rc = KTocParseKDirRecur (self, dir, path, filter, data);
-		}
-	    }
-	    break;
-	} /* switch (type) */
-    } /* if (type & kptAlias) ... else ... */
-    return rc;
-}
-
-
-static
-rc_t KTocParseKDirRecur	(KToc * self,
-			 const KDirectory * dir,
-			 const char * path,
-			 bool (CC* filter )(const KDirectory *,const char *, void*),
-			 void *  data)
-{
-    rc_t rc;
-    KNamelist * names;
-
-    assert (self != NULL);
-    assert (dir != NULL);
-    assert (path != NULL);
-
-    TOC_DEBUG (("%s: recur path for %s\n", __func__, path));
-
-    /* -----
-     * get a list of files in this directory
-     */
-    rc = KDirectoryList (dir, &names, NULL, NULL, "%s", path);
-    if (rc != 0)
-    {
-	LOGERR (klogErr, rc, "Failure to build a name list");
-    }
-    else
-    {
-	/* -----
-	 * get the length of the list
-	 */
-	uint32_t limit;
-
-	rc = KNamelistCount (names, &limit);
-	if (rc != 0)
-	{
-	    LOGERR (klogErr, rc, "Failure to count elements of a name list");
-	}
-	else
-	{
-	    /* -----
-	     * loop through the list
-	     */
-	    uint32_t idx;
-	    size_t pathlen;
-
-            TOC_DEBUG (("%s KNamelistCount counted %u\n", __func__, limit));
-	    pathlen = strlen (path);
-
-	    for (idx = 0; idx < limit; ++idx)
-	    {
-		/* -----
-		 * get the nth path name from the list
-		 */
-		const char * name;
-
-		rc = KNamelistGet (names, idx, &name);
-		if (rc != 0)
-		{
-		    LOGERR (klogErr, rc, "Failure to pull name from name list");
-		}
-		else
-		{
-		    char * new_path;
-		    size_t namelen;
-		    size_t new_pathlen;
-
-                    TOC_DEBUG(("%s KNamelistCount  %s\n", __func__, name));
-            
-		    namelen = strlen (name);
-		    /* length of previous path + '/' + length of name */
-		    new_pathlen = pathlen + 1 + namelen;
-		    new_path = malloc (new_pathlen + 1);  /* + NUL */
-
-		    if (new_path == NULL)
-		    {
-			rc = RC (rcFS, rcToc, rcConstructing, rcMemory, rcExhausted);
-			LOGERR (klogErr, rc, "out of memory building paths for TOC");
-		    }
-		    else
-		    {
-			bool use_name;
-			char * recur_path;
-                        size_t recur_path_z;
-
-			memcpy (new_path, path, pathlen);
-			new_path[pathlen] = '/';
-			memcpy (new_path + pathlen + 1, name, namelen);
-			new_path[pathlen+1+namelen] = '\0';
-
-#if 1
-                        recur_path_z = pathlen + 1 + namelen + 1;
-#else
-                        recur_path_z = 4096;
-#endif
- 			recur_path = malloc (recur_path_z);
-			if (recur_path == NULL)
-			{
-			    rc = RC (rcFS, rcToc, rcConstructing, rcMemory, rcExhausted);
-			    LOGERR (klogErr, rc, "out of memory building paths for TOC");
-			}
-			else
-			{
-			    rc = KDirectoryResolvePath (dir, false, recur_path, recur_path_z,
-                                            "%s", new_path);
-                            TOC_DEBUG (("%s: resolved path %s for %s\n", __func__, recur_path, new_path));
-                            TOC_DEBUG (("%s: filter %p\n", __func__, filter));
-			    if (rc == 0)
-			    {
-				if (filter != NULL)
-				{
-				    use_name = filter (dir, recur_path, data);
-				}
-				else
-				    use_name = true;
-
-				if (use_name)
-				{
-                                    TOC_DEBUG (("%s: use_name true for %s\n", __func__, recur_path));
-				    rc = KTocParseKDirRecurOnePath (self, dir, recur_path, filter, data);
-				    if (rc != 0)
-				    {
-					PLOGERR (klogErr, (klogErr, rc, "Failure to process name from name list $(p)",
-                                                           PLOG_S(p), name));
-				    }
-				}
-			    }
-			    free (recur_path);
-			}
-			free (new_path);
-		    }
-		}
-		if (rc != 0)
-		    break;
-	    } /* for (idx = 0; idx < limit; ++idx) */
-	}
-	KNamelistRelease (names);
-    }
-    return rc;
-}
-
-/* ======================================================================
- * KTocParseKDir
- *
- * This matches the standard signature for creating a KToc with a
- * KDirectory (any implementation including another KArcDir) as the
- * source to parse.
- *
- * Filter is a reference to a function that given a directory, a path
- * as a char ASCIZ string and a pointer to some form of data probably 
- * a struct will return 0 for do not include and 1 for include that
- * path in the TOC.
- *
- * Filter can be NULL and no filtering function will be called.
- * Data can be NULL is there is no Filter that expects it to b non-null.
- */
-LIB_EXPORT rc_t CC KArcParseKDir ( KToc * self,
-                                   const void * kvoid,
-                                   bool(CC*filter)(const KDirectory*,const char *, void*),
-                                   void * data )
-{
-    const KDirectory * kdir;
-    rc_t rc;
-
-    kdir = kvoid;
-    rc = 0;
-
-    if (self == NULL)
-    {
-	rc = RC (rcFS, rcArc, rcParsing, rcSelf, rcNull);;
-	LOGERR (klogErr, rc, "KTocParseKDir: self was NULL");
-    }
-    else if (kdir == NULL)
-    {
-	rc = RC (rcFS, rcArc, rcParsing, rcParam, rcNull);;
-	LOGERR (klogErr, rc, "KTocParseKDir: kdir was NULL");
-    }
-    else
-    {
-        TOC_DEBUG (("Start Parse\n"));
-	rc = KTocParseKDirRecur (self, kdir, ".", filter, data);
-    }
-    return rc;
-}
-
-/* end of file */
diff --git a/libs/kfs/tocentry.c b/libs/kfs/tocentry.c
deleted file mode 100644
index 0ef8c2f..0000000
--- a/libs/kfs/tocentry.c
+++ /dev/null
@@ -1,1748 +0,0 @@
-/*===========================================================================
- *
- *                            Public DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <kfs/extern.h>
-#include <atomic32.h>
-#include <klib/container.h>
-#include <klib/vector.h>
-#include <klib/pbstree.h>
-#include <klib/text.h>
-#include <kfs/arc.h>
-#include <kfs/toc.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <klib/sort.h>
-#include <sysalloc.h>
-
-#include "toc-priv.h"
-
-#include <assert.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <byteswap.h>
-
-
-/* ======================================================================
- * KTocEntry
- *
- * A private class used to keep track of a single entry (
- */
-
-
-/* ======================================================================
- * KTocEntry method
- *
- * This class is not set up with a vtable at this point.  This API exposes
- * (due to the nature of using a c struct as a class) much of it's opaque 
- * elements by providing accessor functions to most of them.  Since they 
- * are static in this file they are expected to be used only by a class 
- * that is like a C++ friend class by being implemented in the same 
- * compilation unit.
- */
-
-/* NOTE data is not used but required to match the signature for a pointer to function */
-void CC KTocEntryWhack ( BSTNode * n, void * data )
-{
-    KTocEntry * p = (KTocEntry*)n;
-    /**(rc_t*)data = */ KTocEntryDelete (p);
-}
-
-/* ----------------------------------------------------------------------
- * KTocEntryDelete
- * [INOUT] self the entry to delete
- */
-rc_t KTocEntryDelete ( KTocEntry * self )
-{
-    /* defensive programming ensure minimally valid pointer */
-    if (self == NULL)
-    {
-        return 0;
-/* 	return RC (rcFS, rcToc, rcConstructing, rcSelf, rcNull); */
-    }
-
-    switch (self->type)
-    {
-    case ktocentrytype_unknown:
-    case ktocentrytype_file:
-    case ktocentrytype_chunked:
-    case ktocentrytype_softlink:
-    case ktocentrytype_hardlink:
-    case ktocentrytype_zombiefile:
-    default:
-	/* -----
-	 * at this point in the implementation there is nothing we need to
-	 * do with these entry types except free their "self" allocated memory.
-	 *
-	 * Used a switch in case we did for one or more of these.
-	 */
-	break;
-    case ktocentrytype_dir:
-	/* -----
-	 * directories have a BSTree below them that need to be 
-	 * deleted first
-	 */
-	BSTreeWhack (&self->u.dir.tree, KTocEntryWhack, NULL);
-	break;
-    }
-    free (self);
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * KTocEntryCmp2
- *
- * [RET] int					>0: if n > p
- *						0:  if n == p
- *						<0: if n < p
- * [IN]  const BSTNode * 	n		where the pointer to a node matching the key is put
- * [IN]  const BSTNode * 	p		where the pointer to a node matching the key is put
- * This function fits the function signature needed for BSTreeInsert
- *
- * can not inline or make into a macro as it is referenced via a pointer
- */
-int64_t CC KTocEntryCmp2 ( const BSTNode * n, const BSTNode * p )
-{
-
-    KTocEntry * nn;
-    KTocEntry * pp;
-    int64_t		  ii;
-
-    nn = (KTocEntry *)n;
-    pp =  (KTocEntry *)p;
-    ii = StringCompare (&nn->name, &pp->name);
-    return ii;
-}
-
-/* ----------------------------------------------------------------------
- * KTocEntryCmpVoid
- *
- * [RET] int					>0: if n > p
- *						0:  if n == p
- *						<0: if n < p
- * [IN]  const void * 		item		'key' to find a matching bject in the BSTree
- * [OUT] const BSTNode *	node		where the pointer to a node matching the key is put
- * This function fits the function signature needed for BSTreeFind
- *
- * can not inline or make into a macro as it is referenced via a pointer
- */
-int64_t CC KTocEntryCmpVoid ( const void * item, const BSTNode * node )
-{
-    const BSTNode * _item = item;
-    return KTocEntryCmp2 (_item, node);
-}
-
-/* ----------------------------------------------------------------------
- * KTocEntryNew
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [OUT] KTocEntry ** 	new_entry	where to put a pointer to the new TOC Entry
- * [IN]  const char * 		name		name of the entry (file, link, directory...)
- *						(not assumed to be ASCIZ)
- * [IN]  size_t			name_size	length of name
- * [IN]  uint32_t 		access		unix/posix style permission flags
- * [IN]  size_t 		entry_specific	specific initialyers by entry type
- */
-static
-rc_t		KTocEntryNew		(KTocEntry ** new_entry,
-					 const char * name,
-					 size_t name_size,
-					 KTime_t mtime,
-					 uint32_t access,
-					 size_t entry_specific)
-{
-    KTocEntry * entry;
-    size_t	  nsize;
-    char *	  namep;
-
-    nsize = entry_specific + name_size + 1; /* we want a NUL at end of name */
-
-    entry = malloc (nsize);
-    if (entry == NULL)
-    {
-	LOGMSG (klogErr,
-		"Failed to allocate for a TOC File entry");
-	return RC (rcFS, rcToc, rcAllocating, rcMemory, rcInsufficient);
-    }
-
-    /* entry->entry is fine left as undefined */
-    namep =(char*)entry + entry_specific;
-    string_copy (namep, name_size+1, name, name_size);
-    StringInit (&(entry->name), namep, name_size, (uint32_t)name_size);
-
-    entry->mtime = mtime;
-    entry->access = access;
-
-    *new_entry = entry;
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * KTocEntryNewFile
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [OUT] KTocEntry **		new_entry	where to put a pointer to the new TOC Entry
- * [IN]  const char *		name		name of the file (not path) (not assumed to be ASCIZ)
- * [IN]  size_t 		name_size	length of name
- * [IN]  uint32_t 		access		unix/posix style permission flags
- * [IN]  uint64_t		offset		starting offset within the archive file of this file
- * [IN]  uint64_t 		size		number of bytes in the file
- */
-rc_t KTocEntryNewFile ( KTocEntry ** new_entry,
-                        const char * name,
-                        size_t name_size,
-                        KTime_t mtime,
-                        uint32_t access,
-                        uint64_t offset,
-                        uint64_t size )
-{
-    rc_t	rc;
-
-    TOC_SORT (("%s: %s %lu %u\n", __func__, name, mtime, access));
-
-    rc = KTocEntryNew (new_entry, name, name_size, mtime, access, 
-		       sizeof(KTocEntry) 
-		       - sizeof(union KTocEntryUnion)
-		       + sizeof(struct KTocEntryFile));
-
-    if (rc)
-	return rc;
-
-    if (size == 0)
-        (*new_entry)->type = ktocentrytype_emptyfile;
-
-    else
-    {
-        (*new_entry)->type = ktocentrytype_file;
-
-        (*new_entry)->u.contiguous_file.archive_offset = offset;
-        (*new_entry)->u.contiguous_file.file_size = size;
-    }
-
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * KTocEntryNewZombieFile
- *
- * A zombie file is a file whose directory is in the archive but whose 
- * storage is not
- *
- * [RET] rc_t					0 for success; anything else
- *						for a failure
- *                                              see itf/klib/rc.h for general
- *                                              details
- * [OUT] KTocEntry **		new_entry	where to put a pointer to the
- *                                              new TOC Entry
- * [IN]  const char *		name		name of the file (not path)
- *                                              (not assumed to be ASCIZ)
- * [IN]  size_t 		name_size	length of name
- * [IN]  uint32_t 		access		unix/posix style permission
- *                                              flags
- * [IN]  uint64_t		offset		starting offset within the
- *                                              archive file of this file
- * [IN]  uint64_t 		size		number of bytes in the file
- */
-rc_t KTocEntryNewZombieFile ( KTocEntry ** new_entry,
-                              const char * name,
-                              size_t name_size,
-                              KTime_t mtime,
-                              uint32_t access,
-                              uint64_t offset,
-                              uint64_t size )
-{
-    rc_t	rc;
-    
-/*     TOC_DEBUG (("%s: %s %lu\n", __func__, name, mtime)); */
-
-    rc = KTocEntryNew (new_entry, name, name_size, mtime, access, 
-		       sizeof(KTocEntry) 
-		       - sizeof(union KTocEntryUnion)
-		       + sizeof(struct KTocEntryFile));
-
-    if (rc)
-	return rc;
-
-    if (size == 0)
-        (*new_entry)->type = ktocentrytype_emptyfile;
-
-    else
-    {
-        (*new_entry)->type = ktocentrytype_zombiefile;
-
-        (*new_entry)->u.contiguous_file.archive_offset = offset;
-        (*new_entry)->u.contiguous_file.file_size = size;
-    }
-
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * KTocEntryNewChunked
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [OUT] KTocEntry **		new_entry	where to put a pointer to the new TOC Entry
- * [IN]  const char *		name		name of the file (not path) (not assumed to be ASCIZ)
- * [IN]  size_t			name_size	length of name
- * [IN]  uint32_t		access		unix/posix style permission flags
- * [IN]  uint64_t 		size		virtual number of bytes in the file: not actual
- *						number of stored bytes
- * [IN]  const KTocChunk * 	chunks		pointer to an array of chunk structures	
- * [IN]  uint32_t 		num_chunks	number of chunks in the array above
- */
-static
-int64_t CC chunkcmp (const void * a, const void * b, void * ignored)
-{
-    const KTocChunk *A = a;
-    const KTocChunk *B = b;
-    /* -----
-     * We can't rely on a cast down to int not getting messed up 
-     * by overflow nor even on uint64_t - uint64_t not overflowing int64_t
-     */
-    if (A->logical_position == B->logical_position)
-	return 0;
-    else if (A->logical_position > B->logical_position)
-	return 1;
-    else
-	return -1;
-}
-
-rc_t KTocEntryNewChunked ( KTocEntry ** new_entry,
-					 const char * name,
-					 size_t name_size,
-					 KTime_t mtime,
-					 uint32_t access,
-					 uint64_t size,
-					 const KTocChunk * chunks,
-					 uint32_t num_chunks )
-{
-    rc_t	rc;
-    KTocChunk * chunkp;
-    size_t	nsize;
-    size_t	csize;
-
-    /* -----
-     * This is a bit ugly...
-     *
-     * first (Compile time optimizations does much of the heavy lifting) figure out how
-     * much is the extra malloc amount
-     *
-     * Take size of a generic entry - the size of the union part but add back the size of
-     * the chunked file part
-     *
-     * Add to that the size of a 64 bit integer.  This is 8 bytes extra from what is
-     * needed by the header alone.
-     * 
-     * Mask that against the binary bit inverse of 1 less tha the size of a 64 bit integer.
-     *
-     * Now you have the size of the header plus the number of bytes needed to get to a 8
-     * byte address 0.  This is possibly more than is needed as 8 byte quantities could be
-     * read from 4 byte boundaries in many cases.
-     *
-     * Then add to that the size in bytes of the chunked data (all 64 bit numbers).
-     */
-    nsize = ~( ( size_t ) sizeof(uint64_t)-1) & 
-	(sizeof(KTocEntry)
-	 - sizeof(union KTocEntryUnion)
-	 + sizeof(struct KTocEntryChunkFile)
-	 + sizeof(uint64_t));
-    csize = sizeof(KTocChunk) * num_chunks;
-
-    if ((rc = KTocEntryNew (new_entry, name, name_size, mtime, access, 
-			    nsize + csize))
-	!= 0)
-    {
-	return rc;
-    }
-
-    chunkp = (KTocChunk*)((char*)*new_entry + nsize);
-    (*new_entry)->type = ktocentrytype_chunked;
-    (*new_entry)->u.chunked_file.file_size = size;
-    (*new_entry)->u.chunked_file.chunks = chunkp;
-    (*new_entry)->u.chunked_file.num_chunks = num_chunks;
-    memcpy(chunkp, chunks, csize);
-    ksort (chunkp, num_chunks, sizeof(KTocChunk), chunkcmp, NULL);
-    /* -----
-     * TODO: We currently do no validation of the chunks.
-     * We accept that after the sort (which is probably superfluous)
-     * that for each chunk 
-     *
-     *	chunkp[N].logical_position + chunkp[N].size <= chunkp[N+1].logical_position
-     *
-     * We should probably verify this.
-     */
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * KTocEntryNewSoft
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [OUT] KTocEntry **		new_entry	where to put a pointer to the new TOC Entry
- * [IN]  const char * 		name		name of the file (not path) (not assumed to be ASCIZ)
- * [IN]  size_t 		name_size	length of name
- * [IN]  uint32_t		access		unix/posix style permission flags
- * [IN]  const char * 		link		character array (string) holding the name of the
- *						links target (not assumed to be ASCIZ)
- * [IN]  size_t 		link_size	length of the target string
- * Link is run time resolved
- */
-rc_t KTocEntryNewSoft ( KTocEntry ** new_entry,
-					 const char * name,
-					 size_t name_size,
-					 KTime_t mtime,
-					 uint32_t access,
-					 const char * link,
-					 size_t link_size )
-{
-    rc_t	rc;
-    char *	linkp;
-
-    rc = KTocEntryNew (new_entry, name, name_size, mtime, access, 
-		       (sizeof(KTocEntry)
-			- sizeof(union KTocEntryUnion))
-		       + sizeof(struct KTocEntrySoftLink) + link_size + 1);
-    if (rc != 0)
-    {
-	return rc;
-    }
-    (*new_entry)->type = ktocentrytype_softlink;
-    linkp =(char*)(*new_entry) + sizeof(KTocEntry) - sizeof(union KTocEntryUnion)
-	+ sizeof(struct KTocEntrySoftLink);
-    string_copy (linkp, link_size+1, link, link_size);
-    StringInit ( &((*new_entry)->u.symbolic_link.link_path), linkp, link_size, (uint32_t)link_size );
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * KTocEntryNewHard
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [OUT] KTocEntry ** 	new_entry	where to put a pointer to the new TOC Entry
- * [IN]  const char * 		name		name of the file (not path) (not assumed to be ASCIZ)
- * [IN]  size_t			name_size	length of name
- * [IN]  uint32_t		access		unix/posix style permission flags
- * Resolution of the link is not set up in this function
- */
-rc_t KTocEntryNewHard ( KTocEntry ** new_entry,
-                        const char * name,
-                        size_t name_size,
-                        KTime_t mtime,
-                        uint32_t access,
-                        const KTocEntry * targ )
-{
-    rc_t	rc;
-
-    if ((rc = KTocEntryNew (new_entry, name, name_size, mtime, access, 
-			    sizeof(KTocEntry)
-			    - sizeof(union KTocEntryUnion)
-			    + sizeof(struct KTocEntryHardLink)))
-	!= 0)
-    {
-	return rc;
-    }
-    (*new_entry)->type = ktocentrytype_hardlink;
-    (*new_entry)->u.hard_link.ref = targ;
-
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * KTocEntryNewDirectory
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [OUT] KTocEntry **		new_entry	where to put a pointer to the new TOC Entry
- * [IN]  const char *		name		name of the directory (not assumed to be ASCIZ)
- * [IN]  size_t			name_size	length of name
- * [IN]  uint32_t		access		unix/posix style permission flags
- */
-rc_t KTocEntryNewDirectory ( KTocEntry ** new_entry,
-					 const char * name,
-					 size_t name_size,
-					 KTime_t mtime,
-					 uint32_t access )
-{
-    rc_t	rc;
-
-    /* -----
-     * get rid of trailing '/' characters in a file name
-     */
-    while (name[name_size-1] == '/')
-	--name_size;
-
-    if ((rc = KTocEntryNew (new_entry, name, name_size, mtime, access, 
-			    sizeof(KTocEntry)
-			    - sizeof(union KTocEntryUnion)
-			    + sizeof(struct KTocEntryDir)))
-	!= 0)
-    {
-	return rc;
-    }
-    (*new_entry)->type = ktocentrytype_dir;
-    BSTreeInit(&(*new_entry)->u.dir.tree);	/* start with an empty tree */
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- *
- */
-rc_t KTocEntryGetTime ( const KTocEntry *self, KTime_t *mtime )
-{
-    if (self == NULL)
-    {
-	return RC (rcFS, rcToc, rcAccessing, rcSelf, rcNull);
-    }
-    *mtime = self->mtime;
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- *
- */
-rc_t KTocEntryGetAccess ( const KTocEntry *self, uint32_t *access )
-{
-    if (self == NULL)
-    {
-	return RC (rcFS, rcToc, rcAccessing, rcSelf, rcNull);
-    }
-    *access = self->access;
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- *
- */
-rc_t KTocEntryGetType ( const KTocEntry *self, KTocEntryType* type )
-{
-    if (self == NULL)
-    {
-	return RC (rcFS, rcToc, rcAccessing, rcSelf, rcNull);
-    }
-    *type = self->type;
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- *
- */
-rc_t KTocEntryGetFileSize ( const KTocEntry * self, uint64_t * size )
-{
-    int	loopcount;
-    const KTocEntry * target;
-
-    assert (self != NULL);
-    assert (size != NULL);
-
-    *size = 0;
-
-    for (loopcount = 0; loopcount < KARC_LINK_RESOLVE_LOOPMAX; ++loopcount)
-    {
-	switch (self->type)
-	{
-	default:
-	case ktocentrytype_unknown:
-	case ktocentrytype_notfound:
-	    return RC (rcFS, rcFile, rcAccessing, rcFile, rcInvalid);
-
-	case ktocentrytype_dir:
-	    return RC (rcFS, rcFile, rcAccessing, rcFileDesc, rcIncorrect);
-
-	case ktocentrytype_file:
-	    *size = self->u.contiguous_file.file_size;
-	    return 0;
-
-	case ktocentrytype_chunked:
-	    *size = self->u.chunked_file.file_size;
-	    return 0;
-
-	case ktocentrytype_zombiefile:
-	    *size = self->u.zombie_file.file_size;
-	    return 0;
-
-	case ktocentrytype_softlink:
-	    /* architect called for KArcDir to handle symbolic link resolution */
-	    return RC (rcFS, rcFile, rcAliasing, rcLink, rcNoErr);
-
-	case ktocentrytype_hardlink:
-	    if (KTocEntryGetHardTarget(self, &target) != 0)
-		return RC (rcFS, rcFile, rcAccessing, rcFile, rcInvalid);
-	    /* this breaks "object oriented rules" but lets us loop instead of recur */
-	    self = target; /* catch bad returns at reiteration of switch */
-	    /* only non-terminal path within the loop */
-	    break;
-
-        case ktocentrytype_emptyfile:
-	    *size = 0;
-	    return 0;
-
-	}
-    }
-    return RC (rcFS, rcFile, rcAccessing, rcFile, rcInvalid);
-}
-
-rc_t KTocEntryGetFilePhysicalSize ( const KTocEntry * self, uint64_t * size )
-{
-    int	loopcount;
-    const KTocEntry * target;
-
-    assert (self != NULL);
-    assert (size != NULL);
-
-    *size = 0;
-
-    for (loopcount = 0; loopcount < KARC_LINK_RESOLVE_LOOPMAX; ++loopcount)
-    {
-	switch (self->type)
-	{
-	default:
-	case ktocentrytype_unknown:
-	case ktocentrytype_notfound:
-	    return RC (rcFS, rcFile, rcAccessing, rcFile, rcInvalid);
-
-	case ktocentrytype_dir:
-	    return RC (rcFS, rcFile, rcAccessing, rcFileDesc, rcIncorrect);
-
-	case ktocentrytype_file:
-	    *size = self->u.contiguous_file.file_size;
-	    return 0;
-
-	case ktocentrytype_chunked:
-        {
-            uint64_t size_;
-            uint32_t ix;
-            for (size_ = 0, ix = 0; ix < self->u.chunked_file.num_chunks; ++ix)
-                size_ += self->u.chunked_file.chunks[ix].size;
-            *size = size_;
-	    return 0;
-        }
-	case ktocentrytype_zombiefile:
-	    *size = self->u.zombie_file.file_size;
-	    return 0;
-
-	case ktocentrytype_softlink:
-	    /* architect called for KArcDir to handle symbolic link resolution */
-	    return RC (rcFS, rcFile, rcAliasing, rcLink, rcNoErr);
-
-	case ktocentrytype_hardlink:
-	    if (KTocEntryGetHardTarget(self, &target) != 0)
-		return RC (rcFS, rcFile, rcAccessing, rcFile, rcInvalid);
-	    /* this breaks "object oriented rules" but lets us loop instead of recur */
-	    self = target; /* catch bad returns at reiteration of switch */
-	    /* only non-terminal path within the loop */
-	    break;
-
-        case ktocentrytype_emptyfile:
-	    *size = 0;
-	    return 0;
-
-	}
-    }
-    return RC (rcFS, rcFile, rcAccessing, rcFile, rcInvalid);
-}
-
-/* ----------------------------------------------------------------------
- *
- */
-rc_t KTocEntryGetFileLocator ( const KTocEntry * self, uint64_t * locator )
-{
-    int	loopcount;
-    const KTocEntry * target;
-
-    assert (self != NULL);
-    assert (locator != NULL);
-
-    *locator = 0;
-
-    for (loopcount = 0; loopcount < KARC_LINK_RESOLVE_LOOPMAX; ++loopcount)
-    {
-	switch (self->type)
-	{
-	default:
-	case ktocentrytype_unknown:
-	case ktocentrytype_notfound:
-	    return RC (rcFS, rcFile, rcAccessing, rcFile, rcInvalid);
-
-	case ktocentrytype_dir:
-	    return RC (rcFS, rcFile, rcAccessing, rcFileDesc, rcIncorrect);
-
-	case ktocentrytype_file:
-	case ktocentrytype_zombiefile:
-	    *locator = self->u.contiguous_file.archive_offset;
-	    return 0;
-	case ktocentrytype_chunked:
-        {
-            /* find lowest offset chunk */
-            if (self->u.chunked_file.num_chunks > 0)
-            {
-                uint64_t loc;
-                uint32_t ix;
-
-                *locator = self->u.chunked_file.chunks[0].source_position;
-                for (ix = 1; ix < self->u.chunked_file.num_chunks; ++ix)
-                {
-                    loc = self->u.chunked_file.chunks[ix].source_position;
-                    if (loc < *locator)
-                        *locator = loc;
-                }
-            }
-            else
-                *locator = 0;
-
-	    return 0;
-        }
-	case ktocentrytype_softlink:
-	    /* architect called for KArcDir to handle symbolic link resolution */
-	    return RC (rcFS, rcFile, rcAliasing, rcLink, rcNoErr);
-
-	case ktocentrytype_hardlink:
-	    if (KTocEntryGetHardTarget(self, &target) != 0)
-		return RC (rcFS, rcFile, rcAccessing, rcFile, rcInvalid);
-	    /* this breaks "object oriented rules" but lets us loop instead of recur */
-	    self = target; /* catch bad returns at reiteration of switch */
-	    /* only non-terminal path within the loop */
-	    break;
-
-        case ktocentrytype_emptyfile:
-	    *locator = 0;
-	    return 0;
-
-	}
-    }
-    return RC (rcFS, rcFile, rcAccessing, rcFile, rcInvalid);
-}
-
-/* ----------------------------------------------------------------------
- *
- */
-rc_t KTocEntryGetChunks ( const KTocEntry * self,
-                          uint32_t * num_chunks,
-                          const KTocChunk ** chunks )
-{
-    int	loopcount;
-    const KTocEntry * target;
-
-    *chunks = NULL;
-    *num_chunks = 0;
-
-    for (loopcount = 0; loopcount < KARC_LINK_RESOLVE_LOOPMAX; ++loopcount)
-    {
-	switch (self->type)
-	{
-	default:
-	case ktocentrytype_unknown:
-	case ktocentrytype_notfound:
-	    return RC (rcFS, rcFile, rcAccessing, rcFile, rcInvalid);
-
-	case ktocentrytype_dir:
-	case ktocentrytype_file:
-	    return RC (rcFS, rcFile, rcAccessing, rcFileDesc, rcIncorrect);
-
-	case ktocentrytype_chunked:
-	    *chunks = self->u.chunked_file.chunks;
-	    *num_chunks = self->u.chunked_file.num_chunks;
-	    return 0;
-
-	case ktocentrytype_softlink:
-	    /* architect called for KArcDir to handle symbolic link resolution */
-	    return RC (rcFS, rcFile, rcAliasing, rcLink, rcNoErr);
-
-	case ktocentrytype_hardlink:
-	    if (KTocEntryGetHardTarget(self, &target) != 0)
-		return RC (rcFS, rcFile, rcAccessing, rcFile, rcInvalid);
-	    /* this breaks "object oriented rules" but lets us loop instead of recur */
-	    self = target; /* catch bad returns at reiteration of switch */
-	    /* only non-terminal path within the loop */
-	    break;
-	}
-    }
-    return RC (rcFS, rcFile, rcAccessing, rcFile, rcInvalid);
-}
-
-/* ----------------------------------------------------------------------
- *
- */
-rc_t KTocEntryGetFileOffset ( const KTocEntry * self, uint64_t * offset )
-{
-    int			loopcount;
-    const KTocEntry * target;
-
-    *offset = 0;
-
-    for (loopcount = 0; loopcount < KARC_LINK_RESOLVE_LOOPMAX; ++loopcount)
-    {
-	switch (self->type)
-	{
-	default:
-	case ktocentrytype_unknown:
-	case ktocentrytype_notfound:
-	    return RC (rcFS, rcTocEntry, rcAccessing, rcFile, rcUnknown);
-
-	case ktocentrytype_dir:
-	case ktocentrytype_chunked:
-	    return RC (rcFS, rcTocEntry, rcAccessing, rcSelf, rcUnsupported);
-
-	case ktocentrytype_file:
-	    *offset = self->u.contiguous_file.archive_offset;
-	    return 0;
-
-        case ktocentrytype_emptyfile:
-	    *offset = 0;
-	    return 0;
-
-	case ktocentrytype_softlink:
-	    /* architect called for KArcDir to handle symbolic link resolution */
-	    return RC (rcFS, rcTocEntry, rcAliasing, rcLink, rcNoErr);
-
-	case ktocentrytype_hardlink:
-	    if (KTocEntryGetHardTarget(self, &target) != 0)
-		return RC (rcFS, rcTocEntry, rcAccessing, rcSelf, rcInvalid);
-
-	    /* this breaks "object oriented rules" but lets us loop instead of recur */
-	    self = target; /* catch bad returns at reiteration of switch */
-	    /* only non-terminal path within the loop */
-	    break;
-	}
-    }
-    return RC (rcFS, rcToc, rcAccessing, rcSelf, rcInvalid);	/* loop fail - too many hard links */
-}
-
-/* ----------------------------------------------------------------------
- *
- */
-rc_t KTocEntryGetBSTree ( const KTocEntry * self,const BSTree ** ptree )
-{
-    KTocEntryType	type;
-
-    if (self == NULL)
-    {
-	return RC (rcFS, rcToc, rcAccessing, rcSelf, rcNull);
-    }
-    if (KTocEntryGetType(self,&type) != 0)
-    {
-	return RC  (rcFS, rcToc, rcAccessing, rcParam, rcInvalid);
-    }
-    if (type != ktocentrytype_dir)
-    {
-	return RC  (rcFS, rcToc, rcAccessing, rcParam, rcInvalid);
-    }
-    *ptree = &self->u.dir.tree;
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- *
- */
-rc_t KTocEntryGetHardTarget ( const KTocEntry *self, const KTocEntry ** target )
-{
-    if (self == NULL)
-    {
-	return RC (rcFS, rcToc, rcAccessing, rcSelf, rcNull);
-    }
-    if (target == NULL)
-    {
-	return RC (rcFS, rcToc, rcAccessing, rcParam, rcNull);
-    }
-    *target = (self->type == ktocentrytype_hardlink) ? self->u.hard_link.ref : NULL;
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- *
- */
-rc_t KTocEntryGetSoftTarget ( const KTocEntry *self,
-				const char ** target )
-{
-    if (self == NULL)
-    {
-	return RC (rcFS, rcToc, rcAccessing, rcSelf, rcNull);
-    }
-    if (self->type != ktocentrytype_softlink)
-    {
-	return RC  (rcFS, rcToc, rcAccessing, rcSelf, rcInvalid);
-    }
-    *target = self->u.symbolic_link.link_path.addr;
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- *
- */
-rc_t KTocEntryGetName ( const KTocEntry *self,
-			  const char ** name )
-{
-    if (self == NULL)
-    {
-	return RC (rcFS, rcToc, rcAccessing, rcSelf, rcNull);
-    }
-    *name = self->name.addr;
-    return 0;
-}
-
-/* ======================================================================
- */
-const char * KTocEntryTypeGetString(KTocEntryType t)
-{
-    static const char * entryTypeString[] = 
-	{
-	    "ktocentrytype_unknown",
-	    "ktocentrytype_notfound",
-	    "ktocentrytype_dir",
-	    "ktocentrytype_file",
-	    "ktocentrytype_chunked",
-	    "ktocentrytype_softlink",
-	    "ktocentrytype_hardlink",
-	    "ktocentrytype_emptyfile" 
-	};
-
-    switch (t)
-    {
-    case ktocentrytype_unknown:
-    case ktocentrytype_dir:
-    case ktocentrytype_file:
-    case ktocentrytype_chunked:
-    case ktocentrytype_softlink:
-    case ktocentrytype_hardlink:
-    case ktocentrytype_emptyfile:
-	return entryTypeString[t+1];
-    default:
-	return "ktocentrytype_error";
-    }
-}
-
-/*
- * preferred behavior of this needs to be determined
- */
-LIB_EXPORT rc_t CC KTocEntryPersistWriteFunc ( void * param,
-                                               const void * buffer,
-                                               size_t size,
-                                               size_t * num_writ )
-{
-    KTocEntryPersistWriteFuncData * data;
-    rc_t rc;
-    size_t to_write;
-
-    assert (param != NULL);
-    assert (buffer != NULL);
-    assert (num_writ != NULL);
-
-    rc = 0;
-    *num_writ = 0;
-    data = param;
-    if (size != 0)
-    {
-	if ((data->buffptr + size) > data->limit)
-	{
-	    to_write = data->limit - data->buffptr;
-	    rc = RC (rcFS, rcTocEntry, rcPersisting, rcBuffer, rcTooShort);
-	}
-	else
-	    to_write = size;
-	memcpy (data->buffptr, buffer, to_write);
-	data->buffptr += to_write;
-	*num_writ = to_write;
-#if 0
-	{
-	    size_t ix;
-
-	    for (ix = 0; ix < to_write; ix ++)
-	    {
-/* please do not delete commented out code */
-/* 		if ((ix & 0xF) == 0x0) */
-/* 		    printf ("%.08x : ", ix); */
-/* 		printf( "%.02x ", ((uint8_t*)buffer)[ix]); */
-
-/* 		if ((ix & 0xF) == 0xF) */
-/* 		    printf ("\n"); */
-	    }
-/*  	    printf ("\n"); */
-	}
-#endif
-    }
-    return rc;
-}
-
-
-static
-rc_t KTocEntryPersistNodeCommon (void * param, const KTocEntry * n,
-				 size_t * num_writ, PTWriteFunc write,
-				 void * write_param)
-{
-    size_t all_written;
-    size_t written;
-    uint16_t nsize;
-    const char * name;
-    rc_t rc;
-    KTocEntryType t;
-    uint8_t b;
-    KTime_t mtime;
-    uint32_t access;
-
-    rc = KTocEntryGetName (n, &name);
-    if (rc != 0)
-	return rc;
-    TOC_DEBUG (("%s %s\n", __func__, name));
-    if (write)
-    {
-
-/* please do not delete commented out code */
-/* 	printf ("----------\n"); */
-	nsize = (uint16_t)strlen(name);
-	rc = KTocEntryGetTime (n, &mtime);
-	if (rc != 0)
-	    return rc;
-	rc = KTocEntryGetAccess (n, &access);
-	if (rc != 0)
-	    return rc;
-	rc = KTocEntryGetType (n, &t);
-	if (rc != 0)
-	    return rc;
-	b = (uint8_t)t;
-/* 	printf ("name size\t"); */
-	rc = (*write) (write_param, &nsize, sizeof nsize, &all_written);
-	if (rc == 0)
-	{
-/* 	    printf("name %s\t", name); */
-	    rc = (*write) (write_param, name, nsize, &written);
-	    all_written += written;
-	    if (rc == 0)
-	    {
-/* 		printf("mtime\t"); */
-		rc = (*write) (write_param, &mtime, sizeof mtime, &written);
-		all_written += written;
-		if (rc == 0)
-		{
-/* 		    printf("access\t"); */
-		    rc = (*write) (write_param, &access, sizeof access, &written);
-		    all_written += written;
-		    if (rc == 0)
-		    {
-/* 			printf("type\t"); */
-			rc = (*write) (write_param, &b, sizeof b, &written);
-			all_written += written;
-		    }
-		}
-	    }
-	}
-	*num_writ = all_written;
-	return rc;
-    }
-    else
-    {
-	*num_writ = (sizeof (nsize) + strlen (name) + sizeof (mtime) +
-		     sizeof (access) + sizeof (b));
-	return 0;
-    }
-}
-
-rc_t KTocEntryPersistNodeDir ( void *param, const KTocEntry * n,
-			      size_t * num_writ, 
-			      PTWriteFunc write, void * write_param )
-{
-    rc_t rc;
-
-/*     size_t	start,end; */
-
-    TOC_FUNC_ENTRY();
-
-
-/*     start = *num_writ; */
-
-    rc = BSTreePersist (&n->u.dir.tree,
-			num_writ,
-			write,
-			write_param,
-			KTocEntryPersist,
-			NULL);
-    if (rc != 0)
-    {
-        TOC_DEBUG (("KTocEntryPersistNodeDir: failure return from BSTreePersist"));
-    }
-
-/*     end = *num_writ; */
-    return rc;
-}
-
-static
-rc_t KTocEntryPersistNodeFile (void *param, const KTocEntry * n,
-			       size_t * num_writ, 
-			       PTWriteFunc write, void * write_param)
-{
-    TOC_FUNC_ENTRY();
-
-    if (write)
-    {
-	rc_t rc;
-	size_t all_written;
-	size_t written;
-
-/* please do not delete commented out code */
-/* 	printf("file offset\t"); */
-	rc = (*write) (write_param, &n->u.contiguous_file.archive_offset,
-		       sizeof n->u.contiguous_file.archive_offset, &all_written);
-	if (rc == 0)
-	{
-/* 	    printf("file size\t"); */
-	    rc = (*write) (write_param, &n->u.contiguous_file.file_size,
-			   sizeof n->u.contiguous_file.file_size, &written);
-            all_written += written;
-	}
-	*num_writ = all_written;
-	return rc;
-    }
-    else
-    {
-	*num_writ = (sizeof n->u.contiguous_file.archive_offset +
-		     sizeof n->u.contiguous_file.file_size);
-	return 0;
-    }
-}
-
-static
-rc_t KTocEntryPersistNodeChunked (void *param, const KTocEntry * n,
-				  size_t * num_writ, 
-				  PTWriteFunc write, void * write_param)
-{
-    KTocChunk * chunks;
-    uint32_t count;
-
-    count = n->u.chunked_file.num_chunks; /* used with write and no write */
-    chunks = n->u.chunked_file.chunks;
-    if (write)
-    {
-	rc_t rc;
-	size_t all_written;
-	size_t written;
-
-/* please do not delete commented out code */
-/* 	printf("file size\t"); */
-	rc = (*write) (write_param, &n->u.chunked_file.file_size,
-		       sizeof n->u.chunked_file.file_size, &all_written);
-	if (rc == 0)
-	{
-/* 	    printf("chunk count\t"); */
-	    rc = (*write) (write_param, &count, sizeof count, &written);
-	    all_written += written;
-	    if (rc == 0)
-	    {
-		for ( ; count--; chunks++)
-		{
-/* 		    printf("chunk l position\t"); */
- 		    rc = (*write) (write_param, &chunks->logical_position,
- 				   sizeof chunks->logical_position, &written);
-		    all_written += written;
-		    if (rc != 0)
-			break;
-/* 		    printf("chunk s position\t"); */
-		    rc = (*write) (write_param, &chunks->source_position,
-				   sizeof chunks->source_position, &all_written);
-		    all_written += written;
-		    if (rc != 0)
-			break;
-/* 		    printf("chunk size\t"); */
-		    rc = (*write) (write_param, &chunks->size,
-				   sizeof chunks->size, &written);
-		    all_written += written;
-		    if (rc != 0)
-			break;
-		}
-	    }
-	}
-	*num_writ = all_written;
-	return rc;
-    }
-    else
-    {
-	*num_writ = (sizeof n->u.chunked_file.file_size + sizeof count +
-		     count * (sizeof chunks->logical_position +
-			      sizeof chunks->source_position +
-			      sizeof chunks->size));
-	return 0;
-    }
-}
-
-static
-rc_t KTocEntryPersistNodeSym (void *param, const KTocEntry * n,
-			      size_t * num_writ, PTWriteFunc write,
-			      void * write_param)
-{
-    uint16_t nsize;
-
-    nsize = (uint16_t)n->u.symbolic_link.link_path.size;
-    if (write)
-    {
-	rc_t rc;
-	size_t all_written;
-	size_t written;
-
-	rc = (*write) (write_param, &nsize, sizeof nsize, &all_written);
-	if (rc == 0)
-	{
-	    rc = (*write) (write_param, 
-			   n->u.symbolic_link.link_path.addr,
-			   nsize,
-			   &written);
-	    all_written += written;
-	}
-	*num_writ = all_written;
-	return rc;
-    }
-    else
-    {
-	*num_writ = (sizeof (nsize) + nsize);
-	return 0;
-    }
-}
-
-static
-rc_t KTocEntryPersistNodeLink (void *param, const KTocEntry * n,
-			       size_t * num_writ, 
-			       PTWriteFunc write, void * write_param)
-{
-    uint16_t nsize;
-
-    nsize = (uint16_t)n->u.hard_link.ref->name.size;
-    if (write)
-    {
-	rc_t rc;
-	size_t all_written;
-	size_t written;
-
-	rc = (*write) (write_param, &nsize, sizeof nsize, &all_written);
-	if (rc == 0)
-	{
-	    rc = (*write) (write_param, 
-			   n->u.hard_link.ref->name.addr,
-			   nsize,
-			   &written);
-	    all_written += written;
-	}
-	*num_writ = all_written;
-	return rc;
-    }
-    else
-    {
-	*num_writ = (sizeof (nsize) + nsize);
-	return 0;
-    }
-}
-
-LIB_EXPORT rc_t CC KTocEntryPersist ( void *param, const void * node,
-                                      size_t * num_writ, 
-                                      PTWriteFunc write, void * write_param )
-{
-    rc_t rc;
-    size_t all_written;
-    size_t written;
-    const KTocEntry * n;
-
-    TOC_FUNC_ENTRY();
-
-    all_written = 0;
-    n = (const KTocEntry *)node;
-    rc = KTocEntryPersistNodeCommon (param, n, &all_written, write, write_param);
-    if (rc == 0)
-    {
-	written = 0;
-	switch (n->type)
-	{
-	default:
-	    rc = RC (rcFS, rcTocEntry, rcPersisting, rcTocEntry, rcInvalid );
-	    LOGERR (klogInt, rc, "malformed node with bad type");
-	    break;
-
- 	case ktocentrytype_notfound:
-	    rc = RC (rcFS, rcTocEntry, rcPersisting, rcTocEntry, rcCorrupt );
-	    LOGERR (klogInt, rc, "malformed tree node not found ");
- 	    break;
-
-	case ktocentrytype_dir:
-	    /* recur */
-/* please do not delete commented out code */
-/* 	    printf("KTocEntryPersist Directory\n"); */
-	    rc = KTocEntryPersistNodeDir (param, n, &written, write, write_param);
-	    break;
-
-	case ktocentrytype_file:
-/* 	    printf("KTocEntryPersist File\n"); */
-	    rc = KTocEntryPersistNodeFile (param, n, &written, write, write_param);
-	    break;
-
-	case ktocentrytype_emptyfile:
-/* 	    printf("KTocEntryPersist Empty File\n"); */
-	    break;
-
-	case ktocentrytype_chunked:
-/* 	    printf("KTocEntryPersist chunked File\n"); */
-	    rc = KTocEntryPersistNodeChunked (param, n, &written, write, write_param);
-	    break;
-
-	case ktocentrytype_softlink:
-/* 	    printf("KTocEntryPersist soft link\n"); */
-	    rc = KTocEntryPersistNodeSym (param, n, &written, write, write_param);
-	    break;
-
-	case ktocentrytype_hardlink:
-/* 	    printf("KTocEntryPersist hard link\n"); */
-	    rc = KTocEntryPersistNodeLink (param, n, &written, write, write_param);
-	    break;
-	}
-	all_written += written;
-    }
-    *num_writ = all_written;
-    return rc;
-}
-
-typedef
-struct KTocEntryInflateData
-{
-    KToc * toc;
-    const char * path;
-    uint64_t arcsize;
-    uint64_t offset;
-    rc_t rc;
-    bool rev;
-} KTocEntryInflateData;
-
-typedef
-struct KTocEntryInflateCommon
-{
-    char * name;
-    KTime_t mtime;
-    uint32_t access;
-    KTocEntryType type;
-} KTocEntryInflateCommon;
-/* TBD: replace the list of parameters in the inflatenode functions
-typedef
-struct KTocEntryInflateNodeData
-{
-    KToc * toc;
-    const void * ptr;
-    const void * limit;
-    char * name;
-    KTime_t mtime;
-    uint32_t access;
-    KTocEntryType type;
-    bool rev;
-} KTocEntryInflateNodeData;
-*/
-
-static
-bool check_limit (const void * ptr, const void * limit, size_t size)
-{
-    const uint8_t * p = ptr;
-    const uint8_t * l = limit;
-    return ((p + size) > l);
-}
-
-#define read_scalar(N,T,S)	     \
-    static rc_t N (const void ** _ptr, const void * limit, bool rev, T * pout) \
-    {									\
-	const T * ptr;							\
-									\
-	if (check_limit (*_ptr, limit, sizeof (T)))			\
-	    return RC (rcFS, rcTocEntry, rcParsing, rcBuffer, rcTooShort); \
-	    								\
-	ptr = *_ptr;							\
-									\
-	if (rev)							\
-	{								\
-	    T t;							\
-	    memcpy (&t, ptr, sizeof (T));				\
-	    *pout = S (t);						\
-	}								\
-	else								\
-	    memcpy (pout, ptr, sizeof (T));                             \
-	*_ptr = ++ptr;							\
-	return 0;							\
-    }
-
-read_scalar (read_u16,uint16_t,bswap_16)
-read_scalar (read_u32,uint32_t,bswap_32)
-read_scalar (read_u64,uint64_t,bswap_64)
-read_scalar (read_i64,int64_t,bswap_64)
-
-static
-rc_t read_u8 (const void ** _ptr, const void * limit, uint8_t * pout)
-{
-    const uint8_t * ptr;
-
-    if (check_limit (*_ptr, limit, sizeof (uint8_t)))
-	return RC (rcFS, rcTocEntry, rcParsing, rcBuffer, rcTooShort);
-
-    ptr = *_ptr;
-    *pout = *ptr++;
-    *_ptr = ptr;
-    return 0;
-}
-
-static
-rc_t KTocEntryInflateNodeCommon (const void ** ptr,
-				 const void * limit,
-				 KTocEntryInflateCommon * common,
-				 const char * path,
-				 bool rev)
-{
-    rc_t rc;
-    uint16_t plen;
-    uint16_t nlen;
-
-    rc = read_u16 (ptr, limit, rev, &nlen);
-    if (rc)
-	return rc;
-
-    if (check_limit (*ptr, limit, nlen))
-	return RC (rcFS, rcTocEntry, rcParsing, rcBuffer, rcTooShort);;
-
-    plen = (uint16_t)strlen (path);
-    if (plen == 0)
-    {
-	common->name = malloc (nlen+1);
-	if (common->name == NULL)
-	{
-	    return RC (rcFS, rcTocEntry, rcInflating, rcMemory, rcExhausted);
-	}
-	memcpy (common->name, *ptr, nlen);
-	common->name[nlen] = '\0';
-    }
-    else
-    {
-	common->name = malloc (plen + 1 + nlen+1);
-	if (common->name == NULL)
-	{
-	    return RC (rcFS, rcTocEntry, rcInflating, rcMemory, rcExhausted);
-	}
-	memcpy (common->name, path, plen);
-	common->name[plen] = '/';
-	memcpy (common->name+plen+1, *ptr, nlen);
-	common->name[plen + nlen + 1] = '\0';
-    }
-
-    *ptr = ((uint8_t*)*ptr) + nlen;
-
-    rc = read_i64 (ptr, limit, rev, &common->mtime);
-    if (rc == 0)
-    {
-	rc =read_u32 (ptr, limit, rev, &common->access);
-	if (rc == 0)
-	{
-	    uint8_t type;
-	    rc = read_u8 (ptr, limit, &type);
-	    if (rc == 0)
-	    {
-		common->type = type;
-		return 0;
-	    }
-	}
-    }
-    free (common->name);
-    common->name = NULL;
-    common->mtime = 0;
-    common->access = 0;
-    common->type = ktocentrytype_unknown;
-    return rc;
-}
-
-
-static
-rc_t KTocEntryInflateNodeDir (KToc * toc, KTocEntryInflateCommon * common, 
-			      const void ** ptr, uint64_t offset, uint64_t arcsize, const void * limit, bool rev)
-{
-    rc_t rc;
-
-    rc = KTocCreateDir (toc,
-			common->mtime,
-			common->access,
-			(KCreateMode)(kcmInit|kcmParents),
-			common->name);
-    if (rc == 0)
-    {
-	rc = KTocInflatePBSTree (toc, arcsize, *ptr, (uint32_t)( (uint8_t*)limit - (uint8_t*)*ptr ),
-                                 offset, rev, common->name);
-    }
-    return rc;
-}
-
-static
-rc_t KTocEntryInflateNodeFile (KToc * toc, const KTocEntryInflateCommon * common, 
-			       const void ** ptr, uint64_t offset, uint64_t arcsize, const void * limit, bool rev)
-{
-    rc_t rc;
-    uint64_t size;
-    uint64_t foffset;
-
-    rc = read_u64 (ptr, limit, rev, &foffset);
-    if (rc == 0)
-    {
-	rc = read_u64 (ptr, limit, rev, &size);
-	if (rc == 0)
-	{
-/*             KOutMsg ("%s %s %lu %lu %lu\n", __func__, common->name, size, offset + foffset, arcsize); */
-            if (arcsize >= offset + foffset + size )
-
-                rc = KTocCreateFile (toc,
-                                 offset + foffset,
-                                 size,
-                                 common->mtime,
-                                 common->access,
-                                 (KCreateMode)(kcmInit|kcmParents),
-                                 common->name);
-            else
-/*                 KOutMsg ("ZOMBIE: %s\n", common->name), */
-
-                rc = KTocCreateZombieFile (toc,
-                                           offset + foffset,
-                                           size,
-                                           common->mtime,
-                                           common->access,
-                                           (KCreateMode)(kcmInit|kcmParents),
-                                           common->name);
-	}
-    }
-    return rc;
-}
-
-static
-rc_t KTocEntryInflateNodeEmptyFile (KToc * toc, const KTocEntryInflateCommon * common, 
-                                    const void ** ptr, uint64_t offset, const void * limit, bool rev)
-{
-    rc_t rc;
-
-    rc = KTocCreateFile (toc,
-                         0,
-                         0,
-                         common->mtime,
-                         common->access,
-                         (KCreateMode)(kcmInit|kcmParents),
-                         common->name);
-    return rc;
-}
-
-static
-rc_t KTocEntryInflateNodeChunked (KToc * toc, const KTocEntryInflateCommon * common, 
-				  const void ** ptr, uint64_t offset, const void * limit, bool rev)
-{
-    rc_t rc;
-    uint64_t size;
-    uint32_t count;
-    KTocChunk * chunks;
-
-    rc = read_u64 (ptr, limit, rev, &size);
-    if (rc == 0)
-    {
-	rc = read_u32 (ptr, limit, rev, &count);
-	if (rc == 0)
-	{
-	    chunks = malloc (sizeof (KTocChunk) * count);
-	    if (chunks == NULL)
-		rc = RC (rcFS, rcTocEntry, rcParsing, rcMemory, rcExhausted);
-	    else
-	    {
-		uint32_t ix;
-		for (ix = 0; (rc == 0) && (ix < count); ++ix)
-		{
-		    if (rc == 0)
-			rc = read_u64 (ptr, limit, rev, &chunks[ix].logical_position);
-		    if (rc == 0)
-		    {
-			rc = read_u64 (ptr, limit, rev, &chunks[ix].source_position);
-			chunks[ix].source_position += offset;
-		    }
-		    if (rc == 0)
-			rc = read_u64 (ptr, limit, rev, &chunks[ix].size);
-		}
-		if (rc == 0)
-		    rc = KTocCreateChunkedFile (toc,
-						size,
-						common->mtime,
-						common->access,
-						count,
-						chunks,
-						(KCreateMode)(kcmInit|kcmParents),
-						common->name);
-		free (chunks);
-	    }
-	}
-    }
-    return rc;
-}
-
-static
-rc_t KTocEntryInflateNodeHardLink (KToc * toc, const KTocEntryInflateCommon * common, 
-				   const void ** ptr, uint64_t offset, const void * limit, bool rev)
-{
-    rc_t rc;
-    uint16_t llen;
-    char * link;
-
-    rc = read_u16 (ptr, limit, rev, &llen);
-    if (rc)
-	return rc;
-
-    if (check_limit (*ptr, limit, llen))
-	return RC (rcFS, rcTocEntry, rcParsing, rcBuffer, rcTooShort);;
-
-    link = malloc (llen + 1);
-    if (link == NULL)
-	return RC (rcFS, rcTocEntry, rcParsing, rcMemory, rcExhausted);
-
-    memcpy (link, ptr, llen);
-    link[llen] = '\0';
-
-    rc = KTocCreateHardLink (toc, 
-			     common->mtime,
-			     common->access,
-			     (KCreateMode)(kcmInit|kcmParents),
-			     link,
-			     common->name);
-    
-    free (link);
-    return rc;
-}
-
-static
-rc_t KTocEntryInflateNodeSoftLink (KToc * toc, const KTocEntryInflateCommon * common, 
-				  const void ** ptr, uint64_t offset, const void * limit, bool rev)
-{
-    rc_t rc;
-    uint16_t llen;
-    char * link;
-
-    rc = read_u16 (ptr, limit, rev, &llen);
-    if (rc)
-	return rc;
-
-    if (check_limit (*ptr, limit, llen))
-	return RC (rcFS, rcTocEntry, rcParsing, rcBuffer, rcTooShort);;
-
-    link = malloc (llen + 1);
-    if (link == NULL)
-	return RC (rcFS, rcTocEntry, rcParsing, rcMemory, rcExhausted);
-
-    memcpy (link, *ptr, llen);
-    link[llen] = '\0';
-
-    rc = KTocCreateSoftLink (toc, 
-			     common->mtime,
-			     common->access,
-			     (KCreateMode)(kcmInit|kcmParents),
-			     link,
-			     common->name);
-    
-    free (link);
-    return rc;
-}
-
-static
-void CC KTocEntryInflate (PBSTNode * n, void * _data)
-{
-    KTocEntryInflateData * data;
-    const void * ptr;
-    const void * limit;
-    KTocEntryInflateCommon common;
-    rc_t rc;
-
-    data = _data;
-    if (data->rc != 0)
-	return;
-    ptr = n->data.addr;
-    limit = (uint8_t*)ptr + n->data.size;
-    rc = KTocEntryInflateNodeCommon (&ptr, limit, &common, data->path, data->rev);
-    if (rc == 0)
-    {
-	switch (common.type)
-	{
-	default:
-	case ktocentrytype_unknown:
-	case ktocentrytype_notfound:
-	    rc = RC (rcFS, rcTocEntry, rcParsing, rcFile, rcCorrupt);
-	    break;
-	case ktocentrytype_dir:
-	    rc = KTocEntryInflateNodeDir (data->toc, &common, &ptr, data->offset,
-                                          data->arcsize, limit, data->rev);
-	    break;
-	case ktocentrytype_file:
-            rc = KTocEntryInflateNodeFile (data->toc, &common, &ptr, data->offset,
-                                           data->arcsize, limit, data->rev);
-	    break;
-	case ktocentrytype_emptyfile:
-	    rc = KTocEntryInflateNodeEmptyFile (data->toc, &common, &ptr, data->offset,
-                                                limit, data->rev);
-	    break;
-	case ktocentrytype_chunked:
-	    rc = KTocEntryInflateNodeChunked (data->toc, &common, &ptr, data->offset, limit, data->rev);
-	    break;
-	case ktocentrytype_softlink:
-	    rc = KTocEntryInflateNodeSoftLink (data->toc, &common, &ptr, data->offset, limit, data->rev);
-	    break;
-	case ktocentrytype_hardlink:
-	    rc = KTocEntryInflateNodeHardLink (data->toc, &common, &ptr, data->offset, limit, data->rev);
-	    break;
-	}
-	free (common.name);
-    }    
-    data->rc = rc; /* return */
-}
-
-rc_t KTocInflatePBSTree ( KToc * self, uint64_t arcsize, const void * treestart, uint32_t maxsize,
-			 uint64_t offset, bool rev, const char * path )
-{
-    rc_t rc;
-    PBSTree * pbst;
-
-    rc = PBSTreeMake (&pbst, treestart, maxsize, rev);
-    if (rc == 0)
-    {
-        KTocEntryInflateData data;
-
-        data.toc = self;
-        data.path = path;
-        data.arcsize = arcsize;
-        data.rc = 0;
-        data.rev = rev;
-        data.offset = offset;
-        
-        PBSTreeForEach (pbst, false, KTocEntryInflate, &data);
-
-        rc = data.rc;
-
-        PBSTreeWhack (pbst);
-    }
-    return rc;
-}
-
-
-/* end of file tocentry.c */
-
diff --git a/libs/kfs/tocfile.c b/libs/kfs/tocfile.c
deleted file mode 100644
index f5675b1..0000000
--- a/libs/kfs/tocfile.c
+++ /dev/null
@@ -1,635 +0,0 @@
-/*===========================================================================
- *
- *                            Public DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <kfs/extern.h>
-#include <klib/rc.h>
-#include <kfs/file.h>
-#include <kfs/arc.h>
-#include <kfs/toc.h>
-#include <kfs/sra.h>
-#include <kfs/directory.h>
-#include <klib/defs.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <sysalloc.h>
-
-#include "toc-priv.h"
-
-#include <assert.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-struct KTocFile;
-#define KFILE_IMPL struct KTocFile
-#include <kfs/impl.h>
-
-#define OPEN_FILE_CACHE_MAX 1
-
-
-/*--------------------------------------------------------------------------
- * FileCacheNode
- */
-typedef struct FileCacheNode FileCacheNode;
-
-struct FileCacheNode
-{
-    BSTNode n;
-    const char *path;
-    const KFile *file;
-    struct FileCacheNode * newer;
-};
-
-static
-int64_t CC FileCacheNodeCmp ( const void *item, const BSTNode *n )
-{
-    const char *a = item;
-    const FileCacheNode *b = ( const FileCacheNode* ) n;
-
-    if ( a < b -> path )
-        return -1;
-    return a > b -> path;
-}
-
-static
-int64_t CC FileCacheNodeSort ( const BSTNode *item, const BSTNode *n )
-{
-    const FileCacheNode *a = ( const FileCacheNode* ) item;
-    const FileCacheNode *b = ( const FileCacheNode* ) n;
-
-    if ( a -> path < b -> path )
-        return -1;
-    return a -> path > b -> path;
-}
-
-static
-void CC FileCacheNodeWhack ( BSTNode *n, void *ignore )
-{
-    FileCacheNode *self = ( FileCacheNode* ) n;
-    KFileRelease ( self -> file );
-    free ( self );
-}
-
-static
-rc_t FileCacheNodeMake ( FileCacheNode **fcnp, const char *path, const KFile *file )
-{
-    FileCacheNode *fcn = malloc ( sizeof *fcn );
-    if ( fcn == NULL )
-        return RC ( rcFS, rcFile, rcReading, rcMemory, rcExhausted );
-
-    fcn -> path = path;
-    fcn -> file = file;
-
-    * fcnp = fcn;
-    return 0;
-}
-
-/*--------------------------------------------------------------------------
- * KTocFile
- */
-
-typedef struct KTocFile
-{
-    KFile dad;
-    const KToc * toc;
-    const KDirectory * dir;
-    uint8_t * header;
-/* these three below fields are mutable */
-    BSTree open_file_cache;     /* opened files by name */
-    FileCacheNode * head;       /* least recently opened */
-    FileCacheNode * tail;       /* most recently opened */
-/* these three above fields are mutable */
-    uint64_t file_size;
-    size_t header_size;
-/* the below field s mutable */
-    uint32_t cache_count;
-/* the above field is mutable */
-} KTocFile;
-
-/* Destroy
- */
-static
-rc_t CC KTocFileDestroy (KTocFile *self)
-{
-    BSTreeWhack ( & self -> open_file_cache, FileCacheNodeWhack, NULL );
-    KTocRelease (self->toc);
-    KDirectoryRelease (self->dir);
-    free (self->header);
-    free (self);
-    return 0;
-}
-
-/* GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- *
- * Since this file does not have a system file underlaying the header
- * nor does it have a single file underlaying the various "subfiles"
- * it must return NULL;
- */
-static struct
-KSysFile *CC KTocFileGetSysFile ( const KTocFile *self, uint64_t *offset )
-{
-    * offset = 0;
-    return NULL;
-}
-
-/* RandomAccess
- *  ALMOST by definition, the file is random access
- *  certain file types ( notably compressors ) will refuse random access
- *
- *  returns 0 if random access, error code otherwise
- */
-static
-rc_t CC KTocFileRandomAccess ( const KTocFile *self )
-{
-    assert (self != NULL);
-    return 0;
-}
-
-
-/* Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KTocFileType ( const KTocFile *self )
-{
-    return kfdFile;
-}
-
-
-/* Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KTocFileSize ( const KTocFile *self, uint64_t *size )
-{
-    assert (self != NULL);
-    assert (size != NULL);
-
-    *size = self->file_size;
-    return 0;
-}
-
-/* SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KTocFileSetSize ( KTocFile *self, uint64_t size )
-{
-    return RC (rcFS, rcFile, rcUpdating, rcToc, rcUnsupported);
-}
-
-/* Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-size_t get_filler (const KTocFile *self, size_t z)
-{
-    size_t align = KTocAlignmentGet((KToc *)self->toc); /* type convert mutable field */
-    if (align > 1)
-    {
-        size_t mask = (size_t)align - 1;    /* get significant bits */
-        return (align - (z & mask)) & mask;
-    }
-    return 0;
-}
-
-static
-rc_t CC KTocFileRead ( const KTocFile *self, uint64_t _pos,
-    void *_buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc;
-    uint64_t pos;
-    uint8_t * buffer;
-    size_t filler;
-
-    assert (self != NULL);
-    assert (_buffer != NULL);
-
-    TOC_DEBUG (("%s: off %lu siz %zu ------\n", __func__, _pos, bsize));
-    TOC_DEBUG (("%s: self->file_size %lu\n", __func__, self->file_size));
-    rc = 0;
-    pos = _pos;
-    buffer = _buffer;
-
-    *num_read = 0;
-
-    /* go ahead and trim from read attempts anything beyond EOF
-     * return as EOF if we are asked to read beyond virtual file size
-     */
-    if (pos > self->file_size)  /* fully past EOF quit now */
-    {
-        TOC_DEBUG (("KTocFileRead read 0 past EOF"));
-	return 0;
-    }
-
-    if ((pos + bsize) > self->file_size)        /* partially past EOF quit at EOF */
-    {
-	bsize = (size_t)( self->file_size - pos );
-        TOC_DEBUG (("KTocFileRead trimmed read to %zu\n",bsize));
-    }
-
-    filler = get_filler (self, self->header_size);
-
-    /* get portion of read from header */
-    if (pos < (uint64_t) (self->header_size + filler))
-    {
-	size_t to_read = 0;
-
-        TOC_DEBUG (("%s size of header %zu filler after header %zu\n",
-                    __func__, self->header_size, filler));
-
-        /* header proper */
-        if (pos < self->header_size)
-        {
-            to_read = self->header_size - (size_t)pos;
-            if (to_read > bsize)
-                to_read = bsize;
-            memcpy (buffer, self->header + pos, to_read);
-
-            pos += to_read;
-            bsize -= to_read;
-        }
-        /* filler after header */
-        if (pos != self->header_size)    /* didn't reach end of header */
-            filler = 0;
-        else
-        {
-            if (filler > bsize)
-                filler = bsize;
-            if (filler)
-            {
-                memset (buffer + to_read, 0, filler);
-            }
-        }
-
-	/* exit on partial read */
-	*num_read = to_read + filler;
-        TOC_DEBUG (("%s hdr read %zu", __func__, *num_read));
-	return 0;
-    }
-    else
-        /* start in on files */
-    {
-        uint64_t fpos;
-        uint64_t fsize;
-        const char * path;
-        const KDirectory * dir;
-        size_t to_read;
-        size_t this_read;
-        size_t all_read;
-        size_t filler;
-
-        *num_read = all_read = to_read = 0;
-
-        dir = KTocGetArchive (self->toc);
-        rc = KTocResolvePathFromOffset (self->toc, &path, &fpos, pos);
-        if (path != NULL)
-        {
-            if (rc != 0)
-            {
-                TOC_DEBUG (("%s can't resolve offset $(O) %R\n", __func__, pos, rc));
-                return rc;
-            }
-            TOC_DEBUG (("%s reading \"%s\" at offset %lu\n", __func__, path, pos));
-            rc = KDirectoryFileSize (dir, &fsize, "%s", path);
-            if (rc != 0)
-            {
-                TOC_DEBUG (("%s can't  determine sub file size  %s %R\n", __func__, path, rc));
-                return rc;
-            }
-            TOC_DEBUG (("%s size %lu\n", __func__, fsize));
-
-            if ((fpos + bsize) <= fsize)
-            {
-                filler = 0;
-                to_read = bsize;
-            }
-            else
-            {
-                filler = get_filler ( self, (size_t)fsize );
-                if ( bsize > ( fsize + filler ) )
-                    bsize = (size_t)( fsize + filler );
-
-                if (fpos < fsize)
-                {
-                    to_read = (size_t)( fsize - fpos );
-                    if (bsize <  (to_read + filler))
-                        filler = bsize - to_read;
-                }
-                else
-                {
-                    to_read = 0;
-                    if (filler > bsize)
-                        filler = bsize;
-                }
-            }
-
-            if (to_read)
-            {
-                KTocFile *mself = (KTocFile *)self;        /* to access mutable fields within self */
-                FileCacheNode *n;
-
-                TOC_DEBUG (("%s subfile %s\n", __func__, path));
-
-                /* look in cache */
-                n = ( FileCacheNode* ) BSTreeFind ( & mself -> open_file_cache,
-                                                    path, FileCacheNodeCmp );
-                if ( n != NULL )
-                {
-                    FileCacheNode * this_one;
-                    TOC_DEBUG (("%s cache hit for subfile %s\n", __func__, path));
-
-                    for (this_one = mself->head; this_one != n; this_one = this_one->newer)
-                    {
-                        if (this_one == NULL)
-                            return RC (rcFS, rcFile, rcOpening, rcToc, rcCorrupt);
-                    }
-                    if (mself->tail != mself->head) /* nothing to do if only one in queue */
-                    {
-                        if (this_one == mself->head)
-                        {
-                            mself->head = n->newer;
-                            n->newer = NULL;
-                            this_one = mself->tail;
-                            /* race condition possible: bad if next pair of assigns is not atomic and multi-threading */
-                            mself->tail = this_one->newer = n;
-                        }
-                    }
-                }
-                else
-                {
-                    const KFile * file;
-
-                    for (;;)
-                    {
-                        /* if we don't have too many files open, try to close something in the cache */
-                        if (mself->cache_count <= OPEN_FILE_CACHE_MAX)
-                        {
-                            TOC_DEBUG (("%s open subfile %s\n", __func__, path));
-                            /* open file on demand */
-                            rc = KDirectoryOpenFileRead (KTocGetArchive(self->toc), &file, "%s", path);
-                            if (rc == 0)
-                                break;
-                        }
-                        
-                        /* if we've run out of file descriptors try clearing the cache a bit */
-                        if ( ( rc == 0 ) || ( ( GetRCObject( rc ) == ( enum RCObject ) rcFileDesc ) &&
-                                               ( GetRCState( rc ) == rcExhausted ) ) )
-                        {
-                            TOC_DEBUG (("%s no more file descriptors\n", __func__));
-
-                            if (mself->cache_count != 0)
-                            {
-                                FileCacheNode * pn;
-
-                                rc = 0;
-                                pn = mself->head;
-                                TOC_DEBUG (("%s cache closing %s\n", __func__, pn->path));
-                                BSTreeUnlink (&mself->open_file_cache, &pn->n);
-                                mself->cache_count--;
-                                mself->head = pn->newer;
-                                (void)FileCacheNodeWhack (&pn->n, NULL);
-                                continue;
-                            }
-                        }
-                        return rc;
-                    }
-
-                    /* create a new cache node */
-                    rc = FileCacheNodeMake ( & n, path, file );
-                    if ( rc != 0 )
-                    {
-                        TOC_DEBUG (("%s %R  can't cache sub file %s\n", __func__, rc, path));
-                        KFileRelease ( file );
-                        return rc;
-                    }
-
-                    /* insert into cache */
-                    BSTreeInsert ( & mself -> open_file_cache, & n -> n, FileCacheNodeSort );
-                    mself->cache_count++;
-                    if (mself->head == NULL)
-                        mself->head = mself->tail = n;
-                    else
-                    {
-                        mself->tail->newer = n;
-                        mself->tail = n;
-                    }
-                }
-
-                rc = KFileRead (n ->file, fpos, buffer, to_read, &this_read);
-                if ( rc != 0)
-                {
-                    TOC_DEBUG (("%s %R error reading sub file %s\n", __func__, rc, path));
-                    return rc;
-                }
-            }
-            if (filler)
-                memset (buffer+to_read, 0, filler);
-
-            *num_read = to_read + filler;
-            TOC_DEBUG (("%s file %s read %zu\n", __func__, path, *num_read));
-        }
-    }
-    return rc;
-}
-
-/* Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- */
-static
-rc_t CC KTocFileWrite ( KTocFile *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ)
-{
-    assert ( self != NULL );
-    return RC (rcFS, rcFile, rcWriting, rcToc, rcUnsupported);
-}
-
-
-static const KFile_vt_v1 vtKTocFile =
-{
-    /* version 1.1 */
-    1, 1,
-
-    /* start minor version 0 methods */
-    KTocFileDestroy,
-    KTocFileGetSysFile,
-    KTocFileRandomAccess,
-    KTocFileSize,
-    KTocFileSetSize,
-    KTocFileRead,
-    KTocFileWrite,
-    /* end minor version 0 methods */
-
-    /* start minor version == 1 */
-    KTocFileType
-    /* end minor version == 1 */
-};
-
-LIB_EXPORT rc_t CC KTocFileMake ( const KFile ** pself,
-		   const KToc * toc,
-		   const KDirectory * dir,
-		   void * header,
-		   uint64_t file_size,
-		   size_t header_size )
-{
-    KTocFile * self;
-    rc_t rc;
-
-    rc = 0;
-    self = malloc (sizeof (*self));
-    if (self == NULL)
-    {
-	rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-	LOGERR (klogErr, rc, "Out of memory in KTocFileMake");
-    }
-    else
-    {
-	rc = KFileInit (&self->dad, (const KFile_vt*)&vtKTocFile, "KTocFile", "no-name", true, false);
-	if (rc != 0)
-	{
-	    LOGERR (klogErr, rc, "Init failure in KTocFileMake");
-	}
-	else
-	{
-	    self->toc = toc;
-	    self->dir = dir;
-	    self->header = header;
-            BSTreeInit ( & self -> open_file_cache );
-            self->head = self->tail = NULL;
-            self->cache_count = 0;
-	    self->file_size = file_size;
-	    self->header_size = header_size;
-            TOC_DEBUG (("%s: file_size %lu header_size %u\n", __func__, file_size, header_size));
-	    KTocAddRef (toc);
-	    KDirectoryAddRef (dir);
-	    *pself = &self->dad;
-	    return 0;
-	}
-	free (self);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDirectoryOpenTocFileRead ( const KDirectory * self,
-				const KFile ** pfile,
-                                KSRAFileAlignment align,
-				bool ( CC * filter ) ( const KDirectory*, const char*, void* ),
-				void * filter_param,
-				rc_t ( CC * usort ) ( const KDirectory*, struct Vector* ) )
-{
-    rc_t rc;
-
-    TOC_DEBUG (("%s: enter\n",__func__));
-
-    rc = 0;
-    if (self == NULL)
-    {
-	rc = RC (rcFS, rcDirectory, rcConstructing, rcSelf, rcNull);
-	LOGERR (klogErr, rc, "Directory NULL in constructing a TocFile");
-	return rc;
-    }
-    if (pfile == NULL)
-    {
-	rc = RC (rcFS, rcDirectory, rcConstructing, rcParam, rcNull);
-	LOGERR (klogErr, rc, "file pointer parameter NULL in constructing a TocFile");
-	return rc;
-    }
-    if (rc == 0)
-    {
-	const KDirectory * dir;
-
-	rc = KDirectoryOpenArcDirRead (self, &dir, true, ".", tocKDirectory,
-				       KArcParseKDir, filter, filter_param);
-	if (rc != 0)
-	{
-	    LOGERR (klogErr, rc, "Failure to parse directory to TOC");
-	}
-	else
-	{
-	    void * header;
-	    uint64_t file_size;
-	    size_t header_size;
-
-            TOC_DEBUG (("%s: Persisting header\n", __func__));
-	    rc = KArcDirPersistHeader ((KArcDir*)dir, &header, &header_size, &file_size, align, usort);
-	    if (rc == 0)
-	    {
-		const KToc * toc;
-
-                TOC_DEBUG (("%s: Get TOC\n", __func__));
-		rc = KArcDirGetTOC ((const KArcDir*)dir, &toc); /* does not addref() */
-		if (rc != 0)
-		{
-		    LOGERR (klogErr, rc, "Failure to parse directory to TOC");
-		}
-		else
-		{
-		    const KFile * file;
-
-                    TOC_DEBUG (("%s: call KTocFileMake file_size %lu \n", __func__, file_size));
-
-		    rc = KTocFileMake (&file, toc, self, header, file_size, header_size);
-		    if (rc != 0)
-		    {
-			LOGERR (klogErr, rc, "Failure to make KTocFile");
-		    }
-		    else
-		    {
-			*pfile = file;
-		    }
-		}
-	    }
-            KDirectoryRelease (dir);
-	}
-    }
-    return rc;
-}
-						
-
-/* end of file dirfile.c */
diff --git a/libs/kfs/unix/sysdir-priv.h b/libs/kfs/unix/sysdir-priv.h
deleted file mode 100644
index 9cd1729..0000000
--- a/libs/kfs/unix/sysdir-priv.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sysdir_priv_
-#define _h_sysdir_priv_
-
-#ifndef _h_kfs_impl_
-#include <kfs/impl.h>
-#endif
-
-#ifndef _h_klib_rc_
-#include <klib/rc.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * KSysDir
- *  a Unix directory
- */
-typedef struct KSysDir_v1 KSysDir_v1;
-typedef struct KSysDir_v2 KSysDir_v2;
-/* MakePath
- *  create a full path from partial
- *
- *  "ctx" [ IN ] - a prepared context for returning non-zero rc_t
- *
- *  "canon" [ IN ] - if true, rewrite path in canonical form. usually
- *  not required when passing a path to the system, as the OS performs
- *  its own processing.
- *
- *  "bufer" [ OUT ] and "path_max" [ IN ] - return buffer for processed path
- *
- *  "path" [ IN ] and "args" [ IN, NULL OKAY ] - input path to be resolved
- */
-rc_t KSysDirMakePath_v1 ( struct KSysDir_v1 const *self, enum RCContext ctx, bool canon,
-    char *buffer, size_t path_max, const char *path, va_list args );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_sysdir_priv_ */
diff --git a/libs/kfs/unix/sysdir.c b/libs/kfs/unix/sysdir.c
deleted file mode 100644
index a2a9799..0000000
--- a/libs/kfs/unix/sysdir.c
+++ /dev/null
@@ -1,2414 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define TRACK_REFERENCES 0
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KSysDir_v1;
-struct KSysDirListing;
-
-#define KDIR_IMPL struct KSysDir_v1
-#define KNAMELIST_IMPL struct KSysDirListing
-
-#include <kfs/extern.h>
-#include "sysdir-priv.h"
-#include "sysfile-priv.h"
-#include <klib/sort.h>
-#include <klib/impl.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/rc.h>
-#include <klib/klib-priv.h>
-#include <sysalloc.h>
-
-#include "os-native.h"
-
-#ifndef __USE_UNIX98
-#define __USE_UNIX98 1
-#endif
-#include <unistd.h>
-
-/* old Sun includes won't define PATH_MAX */
-#ifndef __XOPEN_OR_POSIX
-#define __XOPEN_OR_POSIX 1
-#endif
-
-#include <limits.h>
-
-/* now they won't define lstat */
-#undef __XOPEN_OR_POSIX
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <utime.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * KSysDirEnum
- *  a Unix directory enumerator
- */
-typedef struct KSysDirEnum KSysDirEnum;
-struct KSysDirEnum
-{
-    DIR *dir;
-};
-
-/* Whack
- */
-static
-void KSysDirEnumWhack ( KSysDirEnum *self )
-{
-    closedir ( self -> dir );
-}
-
-/* Init
- */
-static
-rc_t KSysDirEnumInit ( KSysDirEnum *self, const char *path )
-{
-    self -> dir = opendir ( path );
-    if ( self -> dir != NULL )
-        return 0;
-
-    switch ( errno )
-    {
-    case EACCES:
-        return RC ( rcFS, rcDirectory, rcListing, rcDirectory, rcUnauthorized );
-    case EMFILE:
-    case ENFILE:
-        return RC ( rcFS, rcDirectory, rcListing, rcFileDesc, rcExhausted );
-    case ENOENT:
-        return RC ( rcFS, rcDirectory, rcListing, rcPath, rcNotFound );
-    case ENOMEM:
-        return RC ( rcFS, rcDirectory, rcListing, rcMemory, rcExhausted );
-    case ENOTDIR:
-        return RC ( rcFS, rcDirectory, rcListing, rcPath, rcIncorrect );
-    }
-
-    return RC ( rcFS, rcDirectory, rcListing, rcNoObj, rcUnknown );
-}
-
-/* Next
- */
-static
-const char *KSysDirEnumNext ( const KSysDirEnum *self )
-{
-    while ( 1 )
-    {
-        struct dirent *e = readdir ( self -> dir );
-        if ( e == NULL )
-            break;
-
-        if ( e -> d_name [ 0 ] == '.' )
-        {
-            switch ( e -> d_name [ 1 ] )
-            {
-            case 0:
-                continue;
-            case '.':
-                if ( e -> d_name [ 2 ] == 0 )
-                    continue;
-                break; 
-            }
-        }
-
-        return e -> d_name;
-    }
-
-    return NULL;
-}
-
-
-/*--------------------------------------------------------------------------
- * KSysDirListing
- *  a Unix directory listing
- */
-typedef struct KSysDirListing KSysDirListing;
-struct KSysDirListing
-{
-    KNamelist dad;
-    const char **namelist;
-    int cnt;
-};
-
-/* Whack
- */
-static
-rc_t KSysDirListingWhack ( const KSysDirListing *self )
-{
-    int i;
-    for ( i = 0; i < self -> cnt; ++ i )
-        free ( ( void* ) self -> namelist [ i ] );
-    free ( self -> namelist );
-    return 0;
-}
-
-static
-rc_t KSysDirListingDestroy ( KSysDirListing *self )
-{
-    rc_t rc = KSysDirListingWhack ( self );
-    if ( rc == 0 )
-        free ( self );
-    return rc;
-}
-
-/* Count
- */
-static
-rc_t KSysDirListingCount ( const KSysDirListing *self, uint32_t *count )
-{
-    * count = self -> cnt;
-    return 0;
-}
-
-/* Get
- */
-static
-rc_t KSysDirListingGet ( const KSysDirListing *self, uint32_t idx, const char **name )
-{
-    if ( idx >= ( uint32_t ) self -> cnt )
-        return RC ( rcFS, rcNamelist, rcAccessing, rcParam, rcExcessive );
-    * name = self -> namelist [ idx ];
-    return 0;
-}
-
-/* Init
- */
-static KNamelist_vt_v1 vtKSysDirListing =
-{
-    /* version 1.0 */
-    1, 0,
-
-    /* start minor version 0 methods */
-    KSysDirListingDestroy,
-    KSysDirListingCount,
-    KSysDirListingGet
-    /* end minor version 0 methods */
-};
-
-static
-int64_t KSysDirListingSort ( const void *a, const void *b, void * ignored )
-{
-    return strcmp ( * ( const char** ) a, * ( const char** ) b );
-}
-
-static
-rc_t KSysDirListingInit ( KSysDirListing *self, const char *path, const KDirectory_v1 *dir,
-    bool ( * f ) ( const KDirectory_v1*, const char*, void* ), void *data )
-{
-    rc_t rc;
-
-    self -> namelist = NULL;
-    self -> cnt = 0;
-
-    rc = KNamelistInit ( & self -> dad,
-        ( const KNamelist_vt* ) & vtKSysDirListing );
-    if ( rc == 0 )
-    {
-        KSysDirEnum list;
-        rc = KSysDirEnumInit ( & list, path );
-        if ( rc == 0 )
-        {
-            uint32_t len = 512;
-            self -> namelist = malloc ( len * sizeof self -> namelist [ 0 ] );
-            if ( self -> namelist == NULL )
-                rc = RC ( rcFS, rcDirectory, rcListing, rcMemory, rcExhausted );
-            else
-            {
-                void *r;
-                const char *name;
-                while ( ( name = KSysDirEnumNext ( & list ) ) != NULL )
-                {
-                    if ( f != NULL )
-                    {
-                        if ( ! ( * f ) ( dir, name, data ) )
-                            continue;
-                    }
-                    
-                    if ( self -> cnt == len )
-                    {
-                        len += len;
-                        r = realloc ( self -> namelist,
-                            len * sizeof self -> namelist [ 0 ] );
-                        if ( r == NULL )
-                        {
-                            rc = RC ( rcFS, rcDirectory, rcListing, rcMemory, rcExhausted );
-                            break;
-                        }
-                        self -> namelist = r;
-                    }
-
-                    self -> namelist [ self -> cnt ] = malloc ( strlen ( name ) + 1 );
-                    if ( self -> namelist [ self -> cnt ] == NULL )
-                    {
-                        rc = RC ( rcFS, rcDirectory, rcListing, rcMemory, rcExhausted );
-                        break;
-                    }
-                    strcpy ( ( char* ) self -> namelist [ self -> cnt ], name );
-                    ++ self -> cnt;
-                }
-
-                if ( rc == 0 )
-                {
-                    r = realloc ( self -> namelist,
-                        self -> cnt * sizeof self -> namelist [ 0 ] );
-                    if ( r != NULL )
-                    {
-                        self -> namelist = r;
-                        ksort ( r, self -> cnt, sizeof self -> namelist [ 0 ], KSysDirListingSort, NULL );
-                    }
-                    else if ( self -> cnt != 0 )
-                    {
-                        rc = RC ( rcFS, rcDirectory, rcListing, rcMemory, rcExhausted );
-                    }
-                    else
-                    {
-                        self -> namelist = r;
-                    }
-                }
-
-                if ( rc != 0 )
-                {
-                    KSysDirListingWhack ( self );
-                    self -> namelist = NULL;
-                    self -> cnt = 0;
-                }
-            }
-
-            KSysDirEnumWhack ( & list );
-        }
-    }
-    return rc;
-}
-
-/*--------------------------------------------------------------------------
- * KSysDir
- *  a Unix directory
- */
-struct KSysDir_v1
-{
-    KDirectory_v1 dad;
-    uint32_t root;
-    uint32_t size;
-    char path [ PATH_MAX ];
-};
-
-/* KSysDirMake
- *  allocate an uninialized object
- */
-static
-KSysDir_v1 *KSysDirMake_v1 ( size_t path_size )
-{
-    KSysDir_v1 *dir = malloc ( ( sizeof * dir - sizeof dir -> path + 2 ) + path_size );
-    return dir;
-}
-
-/* KSysDirDestroy
- */
-static
-rc_t KSysDirDestroy_v1 ( KSysDir_v1 * self )
-{
-    free ( self );
-    return 0;
-}
-
-/* KSysDirInit
- */
-static
-rc_t KSysDirInit_v1 ( KSysDir_v1 * self, enum RCContext ctx, uint32_t dad_root,
-    const char *path, uint32_t path_size, bool update, bool chroot );
-
-
-/* KSysDirCanonPath
- */
-static
-rc_t KSysDirCanonPath_v1 ( const KSysDir_v1 * self, enum RCContext ctx, char *path, size_t psize )
-{
-    char *low, *dst, *last, *end = path + psize;
-    low = dst = last = path + self -> root;
-
-    while ( 1 )
-    {
-        char *src = strchr ( last + 1, '/' );
-        if ( src == NULL )
-            src = end;
-
-        /* detect special sequences */
-        switch ( src - last )
-        {
-        case 1: 
-            if ( last [ 1 ] == '/' )
-            {
-                /* "//" -> "/" */
-                last = src;
-            }
-            break;
-            
-        case 2:
-            if ( last [ 1 ] == '.' )
-            {
-                /* skip over "./" */
-                last = src;
-                if ( src != end )
-                    continue;
-            }
-            break;
-
-        case 3:
-            if ( last [ 1 ] == '.' && last [ 2 ] == '.' )
-            {
-                /* remove previous leaf in path */
-                dst [ 0 ] = 0;
-                dst = strrchr ( path, '/' );
-                if ( dst == NULL || dst < low )
-                    return RC ( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-
-                last = src;
-                if ( src != end )
-                    continue;
-            }
-            break;
-        }
-
-        /* if rewriting, copy leaf */
-        assert ( src >= last );
-
-        if ( dst != last )
-            memmove ( dst, last, src - last );
-
-        /* move destination ahead */
-        dst += src - last;
-        
-        /* if we're done, go */
-        if ( src == end )
-                break;
-
-        /* find next separator */
-        last = src;
-    }
-
-    /* NUL terminate if modified */
-    if ( dst != end )
-        * dst = 0;
-
-    return 0;
-}
-
-/* KSysDirMakePath
- *  creates a full path from partial
- */
-rc_t KSysDirMakePath_v1 ( const KSysDir_v1 * self, enum RCContext ctx, bool canon,
-    char *buffer, size_t path_max, const char *path, va_list args )
-{
-    int psize;
-    size_t bsize;
-
-    if ( path == NULL )
-        return RC ( rcFS, rcDirectory, ctx, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-
-    if ( args != NULL && path [ 0 ] == '%' )
-    {
-        psize = vsnprintf ( buffer, path_max, path, args );
-        if ( psize < 0 || psize >= path_max )
-            return RC ( rcFS, rcDirectory, ctx, rcPath, rcExcessive );
-        if ( buffer [ 0 ] != '/' )
-        {
-            bsize = self -> size;
-            if ( bsize + psize >= path_max )
-                return RC ( rcFS, rcDirectory, ctx, rcPath, rcExcessive );
-            memmove ( buffer + bsize, buffer, psize + 1 );
-            assert ( self -> path [ bsize - 1 ] == '/' );
-            memcpy ( buffer, self -> path, bsize );
-        }
-        else if ( ( bsize = self -> root ) != 0 )
-        {
-            if ( bsize + psize >= path_max )
-                return RC ( rcFS, rcDirectory, ctx, rcPath, rcExcessive );
-            memmove ( buffer + bsize, buffer, psize + 1 );
-            assert ( self -> path [ bsize - 1 ] != '/' );
-            memcpy ( buffer, self -> path, bsize );
-        }
-    }
-    else
-    {
-        if ( path [ 0 ] != '/' )
-        {
-            assert ( self -> path [ self -> size - 1 ] == '/' );
-            memcpy ( buffer, self -> path, bsize = self -> size );
-        }
-        else if ( ( bsize = self -> root ) != 0 )
-        {
-            assert ( self -> path [ bsize - 1 ] != '/' );
-            memcpy ( buffer, self -> path, bsize );
-        }
-
-        if ( args == NULL )
-            psize = snprintf ( buffer + bsize, path_max - bsize, "%s", path );
-        else
-            psize = vsnprintf ( buffer + bsize, path_max - bsize, path, args );
-
-        if ( psize < 0 || bsize + psize >= path_max )
-            return RC ( rcFS, rcDirectory, ctx, rcPath, rcExcessive );
-    }
-
-    /* remove trailing slashes; keep the leading slash */
-    while ( bsize + psize > 1 && buffer [ bsize + psize - 1] == '/' )
-        buffer [ bsize + -- psize ] = 0;
-
-    if ( psize > 0 && ( canon || self -> root != 0 ) )
-        return KSysDirCanonPath_v1 ( self, ctx, buffer, bsize + psize );
-
-    return 0;
-}
-
-
-/* RealPath
- *  returns a real OS path
- */
-rc_t KSysDirVRealPath ( const KSysDir_v1 * self,
-    char *real, size_t bsize, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcLoading, false,
-        full, sizeof full, path, args );
-    assert ( bsize >= PATH_MAX );
-    if ( rc == 0 && realpath ( full, real ) == NULL )
-    {
-        switch ( errno )
-        {
-        case EACCES:
-            return RC ( rcFS, rcDylib, rcLoading, rcDirectory, rcUnauthorized );
-        case ENOTDIR:
-        case EINVAL:
-        case ELOOP:
-            return RC ( rcFS, rcDylib, rcLoading, rcPath, rcInvalid );
-        case EIO:
-            return RC ( rcFS, rcDylib, rcLoading, rcTransfer, rcUnknown );
-        case ENAMETOOLONG:
-            return RC ( rcFS, rcDylib, rcLoading, rcPath, rcExcessive );
-        case ENOENT:
-            return RC ( rcFS, rcDylib, rcLoading, rcPath, rcNotFound );
-        default:
-            return RC ( rcFS, rcDylib, rcLoading, rcNoObj, rcUnknown );
-        }
-    }
-
-    return rc;
-}
-
-rc_t KSysDirRealPath_v1 ( const KSysDir_v1 * self,
-    char *real, size_t bsize, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KSysDirVRealPath ( self, real, bsize, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-/* KSysDirList
- *  create a directory listing
- *
- *  "list" [ OUT ] - return parameter for list object
- *
- *  "path" [ IN, NULL OKAY ] - optional parameter for target
- *  directory. if NULL, interpreted to mean "."
- */
-static
-rc_t KSysDirList_v1 ( const KSysDir_v1 * self, KNamelist **listp,
-    bool ( * f ) ( const KDirectory_v1 *dir, const char *name, void *data ), void *data,
-    const char *path, va_list args )
-{
-    KSysDir_v1 full;
-    rc_t rc = KSysDirMakePath_v1 ( self, rcListing, true,
-        full . path, sizeof full . path, path, args );
-    if ( rc == 0 )
-    {
-        rc = KSysDirInit_v1 ( & full, rcListing, self -> root,
-            NULL, strlen ( full . path ), 0, 0 );
-        if ( rc == 0 )
-        {
-            KSysDirListing *list = malloc ( sizeof * list );
-            if ( list == NULL )
-                rc = RC ( rcFS, rcDirectory, rcListing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KSysDirListingInit ( list,
-                    full . path, & full . dad, f, data );
-                if ( rc != 0 )
-                    free ( list );
-                else
-                    * listp = & list -> dad;
-            }
-        }
-    }
-    return rc;
-}
-
-
-/* KSysDirPathType
- *  returns a KPathType
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- */
-static
-uint32_t KSysDirFullPathType_v1 ( const char *path )
-{
-    struct stat st;
-    int type, alias;
-
-    if ( lstat ( path, & st ) != 0 ) switch ( errno )
-    {
-    case ENOENT:
-        return kptNotFound;
-    default:
-        return kptBadPath;
-    }
-
-    alias = 0;
-
-    if ( S_ISLNK ( st . st_mode ) )
-    {
-        alias = kptAlias;
-
-        if ( stat ( path, & st ) != 0 ) switch ( errno )
-        {
-        case ENOENT:
-            return kptNotFound | alias;
-        default:
-            return kptBadPath | alias;
-        } 
-    }
-
-    /* not a bad assumption */
-    type = kptFile;
-
-    /* overrides */
-    if ( S_ISDIR ( st . st_mode ) )
-        type = kptDir;
-    else if ( S_ISCHR ( st . st_mode ) )
-        type = kptCharDev;
-    else if ( S_ISBLK ( st . st_mode ) )
-        type = kptBlockDev;
-    else if ( S_ISFIFO ( st . st_mode ) )
-        type = kptFIFO;
-    else if ( S_ISSOCK ( st . st_mode ) )
-        type = kptFIFO;
-
-    /* add in alias bit */
-    return type | alias;
-}
-
-static
-uint32_t KSysDirPathType_v1 ( const KSysDir_v1 * self, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcAccessing, false, full, sizeof full, path, args );
-    if ( rc == 0 )
-        return KSysDirFullPathType_v1 ( full );
-    return kptBadPath;
-}
-
-/* KSysDirVisit
- *  visit each path under designated directory,
- *  recursively if so indicated
- *
- *  "recur" [ IN ] - if non-zero, recursively visit sub-directories
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - function to execute
- *  on each path. receives a base directory and relative path
- *  for each entry, where each path is also given the leaf name
- *  for convenience. if "f" returns non-zero, the iteration will
- *  terminate and that value will be returned. NB - "dir" will not
- *  be the same as "self".
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- */
-typedef struct KSysDirVisitData KSysDirVisitData;
-struct KSysDirVisitData
-{
-    rc_t ( * f ) ( KDirectory_v1*, uint32_t, const char*, void* );
-    void *data;
-    KSysDir_v1 dir;
-    bool recur;
-};
-
-static
-rc_t KSysDirVisitDir ( KSysDirVisitData *pb )
-{
-    /* get a directory listing */
-    KSysDirEnum listing;
-    rc_t rc = KSysDirEnumInit ( & listing, pb -> dir . path );
-    if ( rc == 0 )
-    {
-        const char *name;
-        uint32_t size = pb -> dir . size;
-
-        /* complete directory path */
-        pb -> dir . path [ size ] = '/';
-        if ( ++ size >= sizeof pb -> dir . path )
-            rc = RC ( rcFS, rcDirectory, rcVisiting, rcPath, rcExcessive );
-        else for ( pb -> dir . size = size, name = KSysDirEnumNext ( & listing );
-                   name != NULL; name = KSysDirEnumNext ( & listing ) )
-        {
-            uint32_t type, len = strlen ( name );
-            if ( size + len >= sizeof pb -> dir . path )
-            {
-                rc = RC ( rcFS, rcDirectory, rcVisiting, rcPath, rcExcessive );
-                break;
-            }
-            strcpy ( & pb -> dir . path [ size ], name );
-
-            type = KSysDirFullPathType_v1 ( pb -> dir . path );
-            if ( type == kptBadPath )
-            {
-                rc = RC ( rcFS, rcDirectory, rcVisiting, rcPath, rcInvalid );
-                break;
-            }
-
-            rc = ( * pb -> f ) ( & pb -> dir . dad, type, name, pb -> data );
-            if ( rc != 0 )
-                break;
-
-            if ( pb -> recur && ( type & ( kptAlias - 1 ) ) == kptDir )
-            {
-                pb -> dir . size += len;
-                rc = KSysDirVisitDir ( pb );
-                pb -> dir . size = size;
-                if ( rc != 0 )
-                    break;
-            }
-        }
-
-        
-        KSysDirEnumWhack ( & listing );
-    }
-    return rc;
-}
-
-static
-rc_t KSysDirVisit_v1 ( const KSysDir_v1 * self, bool recur,
-    rc_t ( * f ) ( KDirectory_v1 *dir, uint32_t type, const char *name, void *data ), void *data,
-    const char *path, va_list args )
-{
-    KSysDirVisitData pb;
-    rc_t rc = KSysDirMakePath_v1 ( self, rcVisiting, true,
-        pb . dir . path, sizeof pb . dir . path, path, args );
-    if ( rc == 0 )
-    {
-        uint32_t path_size;
-
-        switch ( KSysDirFullPathType_v1 ( pb . dir . path ) & ( kptAlias - 1 ) )
-        {
-        case kptNotFound:
-            return RC ( rcFS, rcDirectory, rcVisiting, rcPath, rcNotFound );
-        case kptBadPath:
-            return RC ( rcFS, rcDirectory, rcVisiting, rcPath, rcInvalid );
-        case kptDir:
-            break;
-        default:
-            return RC ( rcFS, rcDirectory, rcVisiting, rcPath, rcIncorrect );
-        }
-
-        path_size = strlen ( pb . dir . path );
-        while ( path_size > 1 && path_size > self -> root && pb . dir . path [ path_size - 1 ] == '/' )
-            -- path_size;
-
-        rc = KSysDirInit_v1 ( & pb . dir, rcVisiting, self -> root,
-            NULL, path_size, self -> dad . read_only ? 0 : 1, 0 );
-        if ( rc == 0 )
-        {
-            pb . f = f;
-            pb . data = data;
-            pb . recur = recur;
-            pb . dir . path [ -- pb . dir . size ] = 0;
-            rc = KSysDirVisitDir ( & pb );
-        }
-    }
-    return rc;
-}
-
-/* KSysDirRelativePath
- *  makes "path" relative to "root"
- *  both "root" and "path" MUST be absolute
- *  both "root" and "path" MUST be canonical, i.e. have no "./" or "../" sequences
- */
-static
-rc_t KSysDirRelativePath_v1 ( const KSysDir_v1 * self, enum RCContext ctx,
-    const char *root, char *path, size_t path_max )
-{
-    int backup;
-    size_t bsize, psize;
-
-    const char *r = root + self -> root;
-    const char *p = path + self -> root;
-
-    assert ( r != NULL && r [ 0 ] == '/' );
-    assert ( p != NULL && p [ 0 ] == '/' );
-
-    for ( ; * r == * p; ++ r, ++ p )
-    {
-        /* disallow identical paths */
-        if ( * r == 0 )
-            return RC ( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-    }
-
-    /* paths are identical up to "r","p"
-       if "r" is within a leaf name, then no backup is needed
-       by counting every '/' from "r" to end, obtain backup count */
-    for ( backup = 0; * r != 0; ++ r )
-    {
-        if ( * r == '/' )
-            ++ backup;
-    }
-
-    /* the number of bytes to be inserted */
-    bsize = backup * 3;
-
-    /* align "p" to last directory separator */
-    while ( p [ -1 ] != '/' ) -- p;
-
-    /* the size of the remaining relative path */
-    psize = strlen ( p );
-
-    /* open up space if needed */
-    if ( p - path < bsize )
-    {
-        /* prevent overflow */
-        if ( bsize + psize >= path_max )
-            return RC ( rcFS, rcDirectory, ctx, rcPath, rcExcessive );
-        memmove ( path + bsize, p, psize + 1 /* 1 for '\0'*/ );
-    }
-
-    /* insert backup sequences */
-    for ( bsize = 0; backup > 0; bsize += 3, -- backup )
-        memcpy ( & path [ bsize ], "../", 3 );
-
-    /* close gap */
-    if ( p - path > bsize )
-        memmove ( & path [ bsize ], p, strlen ( p ) + 1 );
-
-    return 0;
-}
-
-/* KSysDirResolvePath
- *  resolves path to an absolute or directory-relative path
- *
- *  "absolute" [ IN ] - if non-zero, always give a path starting
- *  with '/'. NB - if the directory is chroot'd, the absolute path
- *  will still be relative to directory root.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character set
- *  the resolved path will be directory relative
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target path. NB - need not exist.
- */
-static
-rc_t KSysDirResolvePath_v1 ( const KSysDir_v1 * self, bool absolute,
-    char *resolved, size_t rsize, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcResolving, true, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        uint32_t path_size = strlen ( full );
-
-        if ( absolute )
-        {
-            /* test buffer capacity */
-            if ( path_size - self -> root >= rsize )
-                return RC ( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-
-            /* ready to go */
-            strcpy ( resolved, & full [ self -> root ] );
-/*             assert ( resolved [ 0 ] == '/' ); */
-        }
-        else
-        {
-            rc = KSysDirRelativePath_v1 ( self, rcResolving, self -> path, full, sizeof full /*path_size*/ );
-            if ( rc == 0 )
-            {
-                path_size = strlen ( full );
-                if ( path_size >= rsize )
-                    return RC ( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-                strcpy ( resolved, full );
-            }
-        }
-    }
-    return rc;
-}
-
-/* KSysDirResolveAlias
- *  resolves an alias path to its immediate target
- *  NB - the resolved path may be yet another alias
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting an object presumed to be an alias.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character set
- */
-static
-rc_t KSysDirResolveAlias_v1 ( const KSysDir_v1 * self, bool absolute,
-    char *resolved, size_t rsize, const char *alias, va_list args )
-{
-    KSysDir_v1 full;
-    rc_t rc = KSysDirMakePath_v1 ( self, rcResolving, true,
-        full . path, sizeof full . path, alias, args );
-    if ( rc == 0 )
-    {
-        char link [ PATH_MAX ];
-        int len = readlink ( full . path, link, sizeof link );
-        if ( len < 0 ) switch ( errno )
-        {
-        case ENOENT:
-            return RC ( rcFS, rcDirectory, rcResolving, rcPath, rcNotFound );
-        case ENOTDIR:
-            return RC ( rcFS, rcDirectory, rcResolving, rcPath, rcIncorrect );
-        case ENAMETOOLONG:
-        case ELOOP:
-            return RC ( rcFS, rcDirectory, rcResolving, rcPath, rcInvalid );
-        case EACCES:
-            return RC ( rcFS, rcDirectory, rcResolving, rcDirectory, rcUnauthorized );
-        case ENOMEM:
-            return RC ( rcFS, rcDirectory, rcResolving, rcMemory, rcExhausted );
-        case EIO:
-            return RC ( rcFS, rcDirectory, rcResolving, rcTransfer, rcUnknown );
-        default:
-            return RC ( rcFS, rcDirectory, rcResolving, rcNoObj, rcUnknown );
-        }
-
-        if ( ( size_t ) len == sizeof link )
-            return RC ( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-        link [ len ] = 0;
-
-        if ( link [ 0 ] == '/' )
-        {
-            full . size = 1;
-            strcpy ( full . path, link );
-        }
-        else
-        {
-            char *f = strrchr ( full . path, '/' );
-            assert ( f != NULL );
-            full . size = ++f - full . path;
-            if ( full . size + len >= sizeof full . path )
-                return RC ( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-            strcpy ( f, link );
-        }
-
-        full . root = 0;
-
-/*         rc = KSysDirCanonPath ( & full, rcResolving, full . path, len ); */
-        rc = KSysDirCanonPath_v1 ( & full, rcResolving, full . path, full . size + len);
-        if ( rc == 0 )
-        {
-            /* the path in full is an absolute path
-               if outside of chroot, it's a bad link */
-            if ( memcmp ( full . path, self -> path, self -> root + 1 ) != 0 )
-                return RC ( rcFS, rcDirectory, rcResolving, rcLink, rcInvalid );
-
-            /* this is the absolute path length */
-            len = strlen ( & full . path [ self -> root ] );
-
-            /* if not requesting absolute, make self relative */
-            if ( ! absolute )
-            {
-                rc = KSysDirRelativePath_v1 ( self, rcResolving, self -> path, full . path, sizeof full.path/*len*/ );
-                if ( rc != 0 )
-                    return rc;
-                len = strlen ( full . path );
-            }
-
-            if ( ( size_t ) len >= rsize )
-                return RC ( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-
-            strcpy ( resolved, & full . path [ self -> root ] );
-        }
-    }
-    return rc;
-}
-
-
-/* KSysDirRename
- *  rename an object accessible from directory, replacing
- *  any existing target object of the same type
- *
- *  "from" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- *
- *  "to" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- */
-static rc_t KSysDirVAccess ( const KSysDir_v1 * self, uint32_t *access, const char *path,
-                             va_list args );
-static rc_t KSysDirSetAccess_v1 ( KSysDir_v1 * self, bool recur, uint32_t access, uint32_t mask,
-                               const char *path, va_list args );
-
-static
-rc_t KSysDirRename_v1 ( KSysDir_v1 * self, bool force, const char *from, const char *to )
-{
-    char ffrom [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcRenaming, false, ffrom, sizeof ffrom, from, NULL );
-    if ( rc == 0 )
-    {
-        char fto [ PATH_MAX ];
-        rc = KSysDirMakePath_v1 ( self, rcRenaming, false, fto, sizeof fto, to, NULL );
-        if ( rc == 0 )
-        {
-            if ( rename ( ffrom, fto ) != 0 ) switch ( errno )
-            {
-            case EISDIR:
-            case EXDEV:
-                rc = RC ( rcFS, rcDirectory, rcRenaming, rcPath, rcIncorrect );
-                break;
-            case ENOTEMPTY:
-            case EEXIST:
-            case EBUSY:
-                rc = RC ( rcFS, rcDirectory, rcRenaming, rcPath, rcBusy );
-                break;
-            case EINVAL:
-            case ENOTDIR:
-            case ENAMETOOLONG:
-            case ELOOP:
-                rc = RC ( rcFS, rcDirectory, rcRenaming, rcPath, rcInvalid );
-                break;
-            case EACCES:
-            case EPERM:
-            case EROFS:
-                rc = RC ( rcFS, rcDirectory, rcRenaming, rcDirectory, rcUnauthorized );
-                break;
-            case ENOSPC:
-                rc= RC ( rcFS, rcDirectory, rcRenaming, rcStorage, rcExhausted );
-                break;
-            case ENOMEM:
-                rc = RC ( rcFS, rcDirectory, rcRenaming, rcMemory, rcExhausted );
-                break;
-            case ENOENT:
-                rc = RC ( rcFS, rcDirectory, rcRenaming, rcPath, rcNotFound );
-                break;
-            default:
-                rc = RC ( rcFS, rcDirectory, rcRenaming, rcNoObj, rcUnknown );
-                break;
-            }
-        }
-        if (force)
-        {
-            if (GetRCState(rc) == rcUnauthorized)
-            {
-                uint32_t faccess = 0;
-                uint32_t taccess = 0;
-                bool fchanged = false;
-                bool tchanged = false;
-
-                rc = KSysDirVAccess (self, &taccess, to, NULL);
-                if (rc == 0)
-                {
-                    rc = KSysDirSetAccess_v1 (self, false, 0222, 0222, to, NULL);
-                    tchanged = true;
-                }
-                else if(GetRCState(rc) ==  rcNotFound)
-                {
-                    rc = 0;
-                }
-
-                if (rc == 0)
-                {
-                    rc = KSysDirVAccess (self, &faccess, from, NULL);
-                    if (rc == 0)
-                    {
-                        rc = KSysDirSetAccess_v1 (self, false, 0222, 0222, from, NULL);
-                        if (rc == 0)
-                        {
-                            fchanged = true;
-                            rc = KSysDirRename_v1 (self, false, from, to);
-                        }
-                    }
-                    if (rc == 0)
-                    {
-                        /* set access on the new name to the access from the old name */
-                        KSysDirSetAccess_v1 (self, false, faccess, 0222, to, NULL);
-                    }
-                    else
-                    {
-                        /* since something falied, try to restore changed access bits */
-                        if (fchanged)
-                            KSysDirSetAccess_v1 (self, false, faccess, 0222, from, NULL);
-                        if (tchanged)
-                            KSysDirSetAccess_v1 (self, false, taccess, 0222, to, NULL);
-                    }
-                        
-                }
-
-            }
-        }
-    }
-    return rc;
-}
-
-
-/* KSysDirClearDir
- *  remove all directory contents
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "force" [ IN ] - if non-zero and directory entry is a
- *  sub-directory, remove recursively
- */
-static
-rc_t KSysDirRemoveEntry_v1 ( char *path, size_t path_max, bool force );
-
-static
-rc_t KSysDirEmptyDir_v1 ( char *path, size_t path_max, bool force )
-{
-    KSysDirEnum list;
-    rc_t rc = KSysDirEnumInit ( & list, path );
-    if ( rc != 0 )
-        rc = ResetRCContext ( rc, rcFS, rcDirectory, rcClearing );
-    else
-    {
-        size_t path_size = strlen ( path );
-        path [ path_size ] = '/';
-        if ( ++ path_size == path_max )
-            rc = RC ( rcFS, rcDirectory, rcClearing, rcPath, rcExcessive );
-        else
-        {
-            const char *leaf;
-            while ( ( leaf = KSysDirEnumNext ( & list ) ) != NULL )
-            {
-                size_t leaf_size = strlen ( leaf );
-                if ( path_size + leaf_size >= path_max )
-                {
-                    rc = RC ( rcFS, rcDirectory, rcClearing, rcPath, rcExcessive );
-                    break;
-                }
-
-                strcpy ( & path [ path_size ], leaf );
-                rc = KSysDirRemoveEntry_v1 ( path, path_max, force );
-                if ( rc != 0 )
-                {
-                    rc = ResetRCContext ( rc, rcFS, rcDirectory, rcClearing );
-                    break;
-                }
-            }
-
-            path [ path_size - 1 ] = 0;
-        }
-
-        KSysDirEnumWhack ( & list );
-    }
-    return rc;
-}
-
-static
-rc_t KSysDirClearDir_v1 ( KSysDir_v1 * self, bool force, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcClearing, false, full, sizeof full, path, args );
-    if ( rc == 0 )
-        rc = KSysDirEmptyDir_v1 ( full, sizeof full, force );
-    return rc;
-}
-
-/* KSysDirRemove
- *  remove an accessible object from its directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "force" [ IN ] - if non-zero and target is a directory,
- *  remove recursively
- */
-static
-rc_t KSysDirRemoveEntry_v1 ( char *path, size_t path_max, bool force )
-{
-    if ( unlink ( path ) != 0 )
-    {
-        switch ( errno )
-        {
-        case ENOENT:
-            return 0;
-        case EPERM:
-        case EISDIR:
-            break;
-        case EACCES:
-        case EROFS:
-            return RC ( rcFS, rcDirectory, rcRemoving, rcDirectory, rcUnauthorized );
-        case EBUSY:
-            return RC ( rcFS, rcDirectory, rcRemoving, rcPath, rcBusy );
-        case ENAMETOOLONG:
-        case ENOTDIR:
-        case ELOOP:
-            return RC ( rcFS, rcDirectory, rcRemoving, rcPath, rcInvalid );
-        case ENOMEM:
-            return RC ( rcFS, rcDirectory, rcRemoving, rcMemory, rcExhausted );
-        case EIO:
-            return RC ( rcFS, rcDirectory, rcRemoving, rcTransfer, rcUnknown );
-        default:
-            return RC ( rcFS, rcDirectory, rcRemoving, rcNoObj, rcUnknown );
-        }
-
-        while ( rmdir ( path ) != 0 ) switch ( errno )
-        {
-        case EEXIST:
-        case ENOTEMPTY:
-            if ( force )
-            {
-                rc_t rc = KSysDirEmptyDir_v1 ( path, path_max, force );
-                if ( rc != 0 )
-                    return rc;
-                force = false;
-                break;
-            }
-        case EBUSY:
-            return RC ( rcFS, rcDirectory, rcRemoving, rcPath, rcBusy );
-        case EPERM:
-        case EACCES:
-        case EROFS:
-            return RC ( rcFS, rcDirectory, rcRemoving, rcDirectory, rcUnauthorized );
-        case ENOMEM:
-            return RC ( rcFS, rcDirectory, rcRemoving, rcMemory, rcExhausted );
-        default:
-            return RC ( rcFS, rcDirectory, rcRemoving, rcNoObj, rcUnknown );
-        }
-    }
-
-    return 0;
-}
-
-static
-rc_t KSysDirRemove_v1 ( KSysDir_v1 * self, bool force, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcRemoving, false, full, sizeof full, path, args );
-    if ( rc == 0 )
-        rc = KSysDirRemoveEntry_v1 ( full, sizeof full, force );
-    return rc;
-}
-
-/* KSysDirAccess
- *  get access to object
- *
- *  "access" [ OUT ] - return parameter for Unix access mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-static
-rc_t KSysDirVAccess ( const KSysDir_v1 * self,
-    uint32_t *access, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcAccessing, false, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        struct stat st;
-        if ( lstat ( full, & st ) != 0 ) switch ( errno )
-        {
-        case ENOENT:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcNotFound );
-        case ENOTDIR:
-        case ELOOP:
-        case ENAMETOOLONG:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcInvalid );
-        case EACCES:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcDirectory, rcUnauthorized );
-        case ENOMEM:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcMemory, rcExhausted );
-        default:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcNoObj, rcUnknown );
-        }
-
-        * access = st . st_mode & 07777;
-    }
-    return rc;
-}
-
-/* KSysDirSetAccess
- *  set access to object a la Unix "chmod"
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "access" [ IN ] and "mask" [ IN ] - definition of change
- *  where "access" contains new bit values and "mask defines
- *  which bits should be changed.
- *
- *  "recur" [ IN ] - if non zero and "path" is a directory,
- *  apply changes recursively.
- */
-static
-rc_t KSysDirChangeAccess_v1 ( char *path, size_t path_max,
-    uint32_t access, uint32_t mask, bool recur );
-
-static
-rc_t KSysDirChangeDirAccess_v1 ( char *path, size_t path_max,
-    uint32_t access, uint32_t mask )
-{
-    KSysDirEnum list;
-    rc_t rc = KSysDirEnumInit ( & list, path );
-    if ( rc == 0 )
-    {
-        bool eperm = false;
-        size_t path_size = strlen ( path );
-        path [ path_size ] = '/';
-        if ( ++ path_size == path_max )
-            rc = RC ( rcFS, rcDirectory, rcUpdating, rcBuffer, rcInsufficient );
-        else
-        {
-            const char *leaf;
-            while ( ( leaf = KSysDirEnumNext ( & list ) ) != NULL )
-            {
-                size_t leaf_size = strlen ( leaf );
-                if ( path_size + leaf_size >= path_max )
-                {
-                    rc = RC ( rcFS, rcDirectory, rcUpdating, rcBuffer, rcInsufficient );
-                    break;
-                }
-
-                strcpy ( & path [ path_size ], leaf );
-                rc = KSysDirChangeAccess_v1 ( path, path_max, access, mask, 1 );
-                if ( rc != 0 )
-                {
-                    if ( GetRCState ( rc ) != rcUnauthorized )
-                        break;
-                    eperm = true;
-                    rc = 0;
-                }
-            }
-
-            path [ path_size - 1 ] = 0;
-        }
-
-        KSysDirEnumWhack ( & list );
-
-        if ( rc == 0 && eperm )
-            rc = RC ( rcFS, rcDirectory, rcUpdating, rcDirectory, rcUnauthorized );
-    }
-    return rc;
-}
-
-static
-rc_t KSysDirChangeEntryAccess_v1 ( char *path, size_t path_max,
-    uint32_t access, uint32_t mask, uint32_t st_mode )
-{
-    /* keep old bits */
-    access &= mask;
-    access |= st_mode & ~ mask;
-
-    if ( chmod ( path, access & 07777 ) != 0 ) switch ( errno )
-    {
-    case EPERM:
-    case EACCES:
-    case EROFS:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcDirectory, rcUnauthorized );
-    case ENOTDIR:
-    case ELOOP:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcInvalid );
-    case ENAMETOOLONG:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcExcessive );
-    case ENOENT:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcNotFound );
-    case ENOMEM:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcMemory, rcExhausted );
-    default:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-static
-rc_t KSysDirChangeAccess_v1 ( char *path, size_t path_max,
-    uint32_t access, uint32_t mask, bool recur )
-{
-    struct stat st;
-    if ( lstat ( path, & st ) != 0 ) switch ( errno )
-    {
-    case ENOENT:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcNotFound );
-    case ENOTDIR:
-    case ELOOP:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcInvalid );
-    case ENAMETOOLONG:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcExcessive );
-    case EACCES:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcDirectory, rcUnauthorized );
-    case ENOMEM:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcMemory, rcExhausted );
-    default:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcNoObj, rcUnknown );
-    }
-
-    if ( recur && S_ISDIR ( st . st_mode ) )
-    {
-        rc_t rc;
-        uint32_t enable = access & mask;
-        if ( enable != 0 )
-        {
-            rc = KSysDirChangeEntryAccess_v1 ( path, path_max,
-                access, enable, st . st_mode );
-            if ( rc != 0 )
-                return rc;
-        }
-
-       rc = KSysDirChangeDirAccess_v1 ( path, path_max, access, mask );
-        if ( rc == 0 )
-        {
-            uint32_t disable = ~ access & mask;
-            if ( disable != 0 )
-            {
-                rc = KSysDirChangeEntryAccess_v1 ( path, path_max,
-                    access, disable, st . st_mode | enable );
-            }
-        }
-        return rc;
-    }
-
-    return KSysDirChangeEntryAccess_v1 ( path, path_max,
-         access, mask, st . st_mode );
-}
-
-static
-rc_t KSysDirSetAccess_v1 ( KSysDir_v1 * self, bool recur,
-    uint32_t access, uint32_t mask, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcUpdating, false, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        if ( mask == 0 )
-            mask = 07777;
-
-        rc = KSysDirChangeAccess_v1 ( full, sizeof full,
-            access, mask & 07777, recur );
-    }
-    return rc;
-}
-
-/* KSysDirDate
- *  get access to object
- *
- *  "date" [ OUT ] - return parameter for Unix access mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-static
-rc_t KSysDirVDate ( const KSysDir_v1 * self,
-    KTime_t * date, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcAccessing, false, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        struct stat st;
-        if ( lstat ( full, & st ) != 0 ) switch ( errno )
-        {
-        case ENOENT:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcNotFound );
-        case ENOTDIR:
-        case ELOOP:
-        case ENAMETOOLONG:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcInvalid );
-        case EACCES:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcDirectory, rcUnauthorized );
-        case ENOMEM:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcMemory, rcExhausted );
-        default:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcNoObj, rcUnknown );
-        }
-
-        * date = ( KTime_t ) st . st_mtime;
-    }
-    return rc;
-}
-
-/* KSysDirSetDate
- *  set date to object a la Unix "touch"
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "date" [ IN ]  - new mtime
- *
- *  "recur" [ IN ] - if non zero and "path" is a directory,
- *  apply changes recursively.
- */
-static
-rc_t KSysDirChangeDate_v1 ( char *path, size_t path_max,
-			 KTime_t date, bool recur );
-
-static
-rc_t KSysDirChangeDirDate_v1 ( char *path, size_t path_max,
-			      KTime_t date )
-{
-    KSysDirEnum list;
-    rc_t rc = KSysDirEnumInit ( & list, path );
-    if ( rc == 0 )
-    {
-        bool eperm = false;
-        size_t path_size = strlen ( path );
-        path [ path_size ] = '/';
-        if ( ++ path_size == path_max )
-            rc = RC ( rcFS, rcDirectory, rcUpdating, rcBuffer, rcInsufficient );
-        else
-        {
-            const char *leaf;
-            while ( ( leaf = KSysDirEnumNext ( & list ) ) != NULL )
-            {
-                size_t leaf_size = strlen ( leaf );
-                if ( path_size + leaf_size >= path_max )
-                {
-                    rc = RC ( rcFS, rcDirectory, rcUpdating, rcBuffer, rcInsufficient );
-                    break;
-                }
-
-                strcpy ( & path [ path_size ], leaf );
-                rc = KSysDirChangeDate_v1 ( path, path_max, date, 1 );
-                if ( rc != 0 )
-                {
-                    if ( GetRCState ( rc ) != rcUnauthorized )
-                        break;
-                    eperm = true;
-                    rc = 0;
-                }
-            }
-
-            path [ path_size - 1 ] = 0;
-        }
-
-        KSysDirEnumWhack ( & list );
-
-        if ( rc == 0 && eperm )
-            rc = RC ( rcFS, rcDirectory, rcUpdating, rcDirectory, rcUnauthorized );
-    }
-    return rc;
-}
-
-static
-rc_t KSysDirChangeEntryDate_v1 ( char *path, size_t path_max,
-			      struct utimbuf * tb)
-{
-    if ( utime ( path, tb ) != 0 ) switch ( errno )
-    {
-    case EPERM:
-    case EACCES:
-    case EROFS:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcDirectory, rcUnauthorized );
-    case ENOTDIR:
-    case ELOOP:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcInvalid );
-    case ENAMETOOLONG:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcExcessive );
-    case ENOENT:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcNotFound );
-    case ENOMEM:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcMemory, rcExhausted );
-    default:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-static
-rc_t KSysDirChangeDate_v1 ( char *path, size_t path_max,
-			 KTime_t date, bool recur )
-{
-    struct stat st;
-    struct utimbuf u;
-
-    if ( lstat ( path, & st ) != 0 ) switch ( errno )
-    {
-    case ENOENT:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcNotFound );
-    case ENOTDIR:
-    case ELOOP:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcInvalid );
-    case ENAMETOOLONG:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcExcessive );
-    case EACCES:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcDirectory, rcUnauthorized );
-    case ENOMEM:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcMemory, rcExhausted );
-    default:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcNoObj, rcUnknown );
-    }
-
-    u . actime = u . modtime = date;
-
-    if ( recur && S_ISDIR ( st . st_mode ) )
-    {
-        rc_t rc = KSysDirChangeEntryDate_v1 ( path, path_max, & u );
-        if ( rc != 0 )
-            return rc;
-
-        rc = KSysDirChangeDirDate_v1 ( path, path_max, date );
-        if ( rc == 0 )
-            rc = KSysDirChangeEntryDate_v1 ( path, path_max, & u  );
-
-        return rc;
-    }
-
-    return  KSysDirChangeEntryDate_v1 ( path, path_max, & u );
-}
-
-static
-rc_t KSysDirVSetDate ( KSysDir_v1 *self, bool recur,
-	KTime_t date, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcUpdating, false, full, sizeof full, path, args );
-    if ( rc == 0 )
-        rc = KSysDirChangeDate_v1 ( full, sizeof full, date, recur );
-
-    return rc;
-}
-
-static
-KSysDir_v1 *KSysDirGetSysdir_v1 ( const KSysDir_v1 *cself )
-{
-    return ( KSysDir_v1 * ) cself;
-}
-
-/* KSysDirCreateParents
- *  creates missing parent directories
- */
-static
-rc_t make_dir_v1 ( const char *path, uint32_t access )
-{
-    if ( mkdir ( path, ( int ) access ) != 0 ) switch ( errno )
-    {
-    case ENOENT:
-        return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcNotFound );
-    case EEXIST:
-        return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcExists );
-    case EPERM:
-    case EACCES:
-    case EROFS:
-        return RC ( rcFS, rcDirectory, rcCreating, rcDirectory, rcUnauthorized );
-    case ENOTDIR:
-    case ELOOP:
-        return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcInvalid );
-    case ENOMEM:
-        return RC ( rcFS, rcDirectory, rcCreating, rcMemory, rcExhausted );
-    case ENOSPC:
-        return RC ( rcFS, rcDirectory, rcCreating, rcStorage, rcExhausted );
-    default:
-        return RC ( rcFS, rcDirectory, rcCreating, rcNoObj, rcUnknown );
-    }
-    return 0;
-}
-
-static
-rc_t KSysDirCreateParents_v1 ( const KSysDir_v1 * self,
-    char *path, uint32_t access, bool strip )
-{
-    rc_t rc;
-    char *p, *par = path + self -> root + 1;
-    size_t size = strlen ( par );
-
-    if ( ! strip )
-        p = par + size;
-    else
-    {
-        p = strrchr ( par, '/' );
-        if ( p == NULL )
-            return 0;
-        size = p - par;
-    }
-
-    while ( 1 )
-    {
-        /* crop string */
-        p [ 0 ] = 0;
-
-        /* try to create directory */
-        rc = make_dir_v1 ( path, access );
-        if ( GetRCState ( rc ) != rcNotFound )
-            break;
-
-        /* back up some more */
-        p = strrchr ( par, '/' );
-        if ( p == NULL )
-        {
-            p = par + strlen ( par );
-            break;
-        }
-    }
-
-    par += size;
-    assert ( p != NULL );
-
-    /* create directories from here */
-    if ( rc == 0 ) while ( p < par )
-    {
-        p [ 0 ] = '/';
-        rc = make_dir_v1 ( path, access );
-        if ( rc != 0 || ++ p >= par )
-            break;
-        p += strlen ( p );
-    }
-
-    /* fix up remaining path */
-    while ( p < par )
-    {
-        p [ 0 ] = '/';
-        if ( ++ p >= par )
-            break;
-        p += strlen ( p );
-    }
-
-    /* repair stripped path */
-    if ( strip )
-        par [ 0 ] = '/';
-
-    return rc;
-}
-
-/* CreateAlias
- *  creates a path alias according to create mode
- *  such that "alias" => "targ"
- *
- *  "access" [ IN ] - standard Unix directory access mode
- *  used when "mode" has kcmParents set and alias path does
- *  not exist.
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "targ" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object, i.e. the object which
- *  is designated by symlink "alias".
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target alias, i.e. the symlink that
- *  designates a target "targ".
- */
-static
-rc_t KSysDirCreateAlias_v1 ( KSysDir_v1 * self,
-    uint32_t access, KCreateMode mode,
-    const char *targ, const char *alias )
-{
-    /* create full path to symlink */
-    char falias [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcCreating, true, falias, sizeof falias, alias, NULL );
-    if ( rc == 0 )
-    {
-        /* the full path to target RELATIVE TO self */
-        char ftarg [ PATH_MAX ];
-        rc = KSysDirMakePath_v1 ( self, rcCreating, true, ftarg, sizeof ftarg, targ, NULL );
-        if ( rc == 0 )
-        {
-            /* if "targ" is relative or "self" is chroot'd,
-               "ftarg" must be made relative */
-            if ( targ [ 0 ] != '/' || self -> root != 0 )
-            {
-                /* take path to alias as root.
-                   generate a path RELATIVE TO alias */
-                rc = KSysDirRelativePath_v1 ( self, rcCreating, falias,
-                    ftarg, sizeof ftarg /*strlen ( ftarg )*/ );
-                if ( rc != 0 )
-                    return rc;
-            }
-
-            if ( symlink ( ftarg, falias ) == 0 )
-                return 0;
-
-            switch ( errno )
-            {
-            case EEXIST:
-                /* alias already exists. unless mode is
-                   create-only, force creation by removing old */
-                if ( ( mode & kcmValueMask ) != kcmCreate )
-                {
-                    /* refuse to drop if not an alias */
-                    if ( ( KSysDirFullPathType_v1 ( falias ) & kptAlias ) == 0 )
-                        return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcIncorrect );
-
-                    /* drop existing alias */
-                    rc = KSysDirRemoveEntry_v1 ( falias, sizeof falias, false );
-                    if ( rc == 0 )
-                        break;
-                }
-                return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcExists );
-
-            case ENOENT:
-                /* a part of the alias path doesn't exist */
-                if ( ( mode & kcmParents ) != 0 )
-                {
-                    KSysDirCreateParents_v1 ( self, falias, access, true );
-                    break;
-                }
-                return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcNotFound );
-
-            case EPERM:
-            case EACCES:
-            case EROFS:
-                return RC ( rcFS, rcDirectory, rcCreating, rcDirectory, rcUnauthorized );
-            case ENAMETOOLONG:
-                return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcExcessive );
-            case ENOTDIR:
-            case ELOOP:
-                return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcInvalid );
-            case ENOMEM:
-                return RC ( rcFS, rcDirectory, rcCreating, rcMemory, rcExhausted );
-            case ENOSPC:
-                return RC ( rcFS, rcDirectory, rcCreating, rcStorage, rcExhausted );
-            case EIO:
-                return RC ( rcFS, rcDirectory, rcCreating, rcTransfer, rcUnknown );
-            default:
-                return RC ( rcFS, rcDirectory, rcCreating, rcNoObj, rcUnknown );
-            }
-
-            /* try again either with existing guy removed
-               or missing directories created */
-            if ( symlink ( ftarg, falias ) != 0 ) switch ( errno )
-            {
-            case EEXIST:
-                return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcExists );
-            case ENOENT:
-                return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcNotFound );
-            default:
-                return RC ( rcFS, rcDirectory, rcCreating, rcNoObj, rcUnknown );
-            }
-
-            assert ( rc == 0 );
-        }
-    }
-    return rc;
-}
-
-/* KSysDirOpenFileRead
- *  opens an existing file with read-only access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-static
-rc_t KSysDirOpenFileRead_v1 ( const KSysDir_v1 * self,
-    const KFile_v1 **f, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcOpening, false, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        int fd = open ( full, O_RDONLY );
-        if ( fd < 0 ) switch ( errno )
-        {
-        case ENOENT:
-            return SILENT_RC ( rcFS, rcDirectory, rcOpening, rcPath, rcNotFound );
-        case EACCES:
-            return RC ( rcFS, rcDirectory, rcOpening, rcDirectory, rcUnauthorized );
-        case EISDIR:
-            return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcIncorrect );
-        case ENOTDIR:
-        case ELOOP:
-            return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcInvalid );
-        case ENAMETOOLONG:
-            return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcExcessive );
-        case ENOMEM:
-            return RC ( rcFS, rcDirectory, rcOpening, rcMemory, rcExhausted );
-        case EMFILE:
-        case ENFILE:
-            return RC ( rcFS, rcDirectory, rcOpening, rcFileDesc, rcExhausted );
-        default:
-            return RC ( rcFS, rcDirectory, rcOpening, rcNoObj, rcUnknown );
-        }
-
-        rc = KSysFileMake_v1 ( ( KSysFile_v1 ** ) f, fd, full, true, false );
-        if ( rc != 0 )
-            close ( fd );
-    }
-    return rc;
-}
-
-/* KSysDirOpenFileWrite
- *  opens an existing file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- */
-static
-rc_t KSysDirOpenFileWrite_v1 ( KSysDir_v1 * self,
-    KFile_v1 **f, bool update, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcOpening, false, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        int fd = open ( full, update ? O_RDWR : O_WRONLY );
-        if ( fd < 0 ) switch ( errno )
-        {
-        case ENOENT:
-            return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcNotFound );
-        case EACCES:
-        case EROFS:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcDirectory, rcUnauthorized );
-        case EISDIR:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcIncorrect );
-        case ENOTDIR:
-        case ELOOP:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcInvalid );
-        case ENAMETOOLONG:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcExcessive );
-        case ENOMEM:
-            return RC ( rcFS, rcDirectory, rcOpening, rcMemory, rcExhausted );
-        case EMFILE:
-        case ENFILE:
-            return RC ( rcFS, rcDirectory, rcOpening, rcFileDesc, rcExhausted );
-        default:
-            return RC ( rcFS, rcDirectory, rcOpening, rcNoObj, rcUnknown );
-        }
-
-        rc = KSysFileMake_v1 ( ( KSysFile_v1 ** ) f, fd, full, update, 1 );
-        if ( rc != 0 )
-            close ( fd );
-    }
-    return rc;
-}
-
-/* KSysDirCreateFile
- *  opens a file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- */
-static
-rc_t KSysDirCreateFile_v1 ( KSysDir_v1 * self, KFile_v1 **f, bool update,
-    uint32_t access, KCreateMode cmode, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcCreating, true, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        int fd, mode = update ? O_RDWR | O_CREAT : O_WRONLY | O_CREAT;
-        switch ( cmode & kcmValueMask )
-        {
-        case kcmOpen:
-            break;
-        case kcmInit:
-            mode |= O_TRUNC;
-            break;
-        case kcmCreate:
-            mode |= O_EXCL;
-            break;
-        case kcmSharedAppend:
-            mode = O_WRONLY | O_APPEND | O_CREAT;
-            break;
-        }
-
-        fd = open ( full, mode, ( int ) access );
-        while ( fd < 0 )
-        {
-            /* a common creation error is missing parents */
-            if ( ( cmode & kcmParents ) != 0 && errno == ENOENT )
-            {
-                /* force directory mode to have execute
-                   wherever there is read or write on file */
-                uint32_t dir_access = access |
-                    ( ( access & 0444 ) >> 2 ) | ( ( access & 0222 ) >> 1 );
-                /* NEW 2/15/2013 - also force read */
-                dir_access |= ( dir_access & 0111 ) << 2;
-                KSysDirCreateParents_v1 ( self, full, dir_access, true );
-
-                /* try again */
-                fd = open ( full, mode, ( int ) access );
-                if ( fd >= 0 )
-                    break;
-            }
-
-            /* when simply "touching" a file, the request for
-               write access may fail if created without write access */
-            if ( ( access & 0200 ) == 0 && errno == EACCES )
-            {
-                mode = O_CREAT;
-                if ( ( access & 0400 ) != 0 )
-                    mode |= O_RDONLY;
-                fd = open ( full, mode, ( int ) access );
-                if ( fd >= 0 )
-                    break;
-            }
-
-            switch ( errno )
-            {
-            case ENOENT:
-                rc = RC ( rcFS, rcDirectory, rcCreating, rcPath, rcNotFound );
-                break;
-            case EEXIST:
-                rc = RC ( rcFS, rcDirectory, rcCreating, rcPath, rcExists );
-                break;
-            case EACCES:
-            case EROFS:
-                rc = RC ( rcFS, rcDirectory, rcCreating, rcDirectory, rcUnauthorized );
-                break;
-            case EISDIR:
-                rc = RC ( rcFS, rcDirectory, rcCreating, rcPath, rcIncorrect );
-                break;
-            case ENOTDIR:
-            case ELOOP:
-                rc = RC ( rcFS, rcDirectory, rcCreating, rcPath, rcInvalid );
-                break;
-            case ENAMETOOLONG:
-                rc = RC ( rcFS, rcDirectory, rcCreating, rcPath, rcExcessive );
-                break;
-            case ENOSPC:
-                rc = RC ( rcFS, rcDirectory, rcCreating, rcStorage, rcExhausted );
-                break;
-            case ENOMEM:
-                rc = RC ( rcFS, rcDirectory, rcCreating, rcMemory, rcExhausted );
-                break;
-            case EMFILE:
-            case ENFILE:
-                rc = RC ( rcFS, rcDirectory, rcCreating, rcFileDesc, rcExhausted );
-                break;
-            default:
-                rc = RC ( rcFS, rcDirectory, rcCreating, rcNoObj, rcUnknown );
-                break;
-            }
-            
-            /* disabled 12/12/2012 : it prints an error message, if vdb tries to open
-               the same reference-object twice via http. The lock-file for the 2nd try
-               does already exist. This is not an error, just a condition. */
-
-            /* PLOGERR (klogErr, (klogErr, rc, "failed to create '$(F)'", "F=%s", full)); */
-            return rc;
-        }
-
-        rc = KSysFileMake_v1 ( ( KSysFile** ) f, fd, full, update, true );
-        if ( rc != 0 )
-            close ( fd );
-    }
-    return rc;
-}
-
-/* KSysDirFileSize
- *  returns size in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t KSysDirFileSize_v1 ( const KSysDir_v1 * self,
-    uint64_t *size, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcAccessing, false, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        struct stat st;
-        if ( stat ( full, & st ) != 0 ) switch ( errno )
-        {
-        case ENOENT:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcNotFound );
-        case ENOTDIR:
-        case ELOOP:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcInvalid );
-        case ENAMETOOLONG:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcExcessive );
-        case EACCES:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcDirectory, rcUnauthorized );
-        case ENOMEM:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcMemory, rcExhausted );
-        default:
-            return RC ( rcFS, rcDirectory, rcAccessing, rcNoObj, rcUnknown );
-        }
-
-        if ( S_ISDIR ( st . st_mode ) )
-            return RC ( rcFS, rcDirectory, rcAccessing, rcPath, rcIncorrect );
-
-        * size = st . st_size;
-    }
-    return rc;
-}
-
-/* KSysDirSetFileSize
- *  sets size in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t KSysDirSetFileSize_v1 ( KSysDir_v1 * self,
-    uint64_t size, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcUpdating, false, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        if ( truncate ( full, size ) != 0 ) switch ( errno )
-        {
-        case ENOENT:
-            return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcNotFound );
-        case EACCES:
-        case EROFS:
-            return RC ( rcFS, rcDirectory, rcUpdating, rcDirectory, rcUnauthorized );
-        case EFBIG:
-            return RC ( rcFS, rcDirectory, rcUpdating, rcParam, rcExcessive );
-        case EINTR:
-            return RC ( rcFS, rcDirectory, rcUpdating, rcFunction, rcIncomplete );
-        case EINVAL:
-            return RC ( rcFS, rcDirectory, rcUpdating, rcParam, rcInvalid );
-        case EIO:
-            return RC ( rcFS, rcDirectory, rcUpdating, rcTransfer, rcUnknown );
-        case EISDIR:
-            return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcIncorrect );
-        case ELOOP:
-            return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcInvalid );
-        case ENAMETOOLONG:
-            return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcExcessive );
-        default:
-            return RC ( rcFS, rcDirectory, rcUpdating, rcNoObj, rcUnknown );
-        }
-    }
-    return rc;
-}
-
-/* KSysDirOpenDirRead
- * KSysDirOpenDirUpdate
- *  opens a sub-directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "chroot" [ IN ] - if non-zero, the new directory becomes
- *  chroot'd and will interpret paths beginning with '/'
- *  relative to itself.
- */
-static
-rc_t KSysDirOpenDirRead_v1 ( const KSysDir_v1 * self,
-     const KDirectory_v1 **subp, bool chroot, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc; 
-
-    rc = KSysDirMakePath_v1 ( self, rcOpening, true, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        int t;
-        KSysDir_v1 *sub;
-
-        size_t path_size = strlen ( full );
-        while ( path_size > 1 && full [ path_size - 1 ] == '/' )
-            full [ -- path_size ] = 0;
-            
-        t = KSysDirFullPathType_v1 ( full ) & ( kptAlias - 1 );
-        if ( t == kptNotFound )
-            return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcNotFound );
-        if ( t != kptDir )
-            return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcIncorrect );
-        
-        sub = KSysDirMake_v1 ( path_size );
-        if ( sub == NULL )
-            rc = RC ( rcFS, rcDirectory, rcOpening, rcMemory, rcExhausted );
-        else
-        {
-            rc = KSysDirInit_v1 ( sub, rcOpening, self -> root, full, path_size, false, chroot );
-            if ( rc == 0 )
-            {
-                * subp = & sub -> dad;
-                return 0;
-            }
-
-            free ( sub );
-        }
-    }
-    return rc;
-}
-
-static
-rc_t KSysDirOpenDirUpdate_v1 ( KSysDir_v1 * self,
-    KDirectory_v1 **subp, bool chroot, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc;
-
-    rc = KSysDirMakePath_v1 ( self, rcOpening, true, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        KSysDir_v1 *sub;
-
-        size_t path_size = strlen ( full );
-        while ( path_size > 1 && full [ path_size - 1 ] == '/' )
-            full [ -- path_size ] = 0;
-
-        switch ( KSysDirFullPathType_v1 ( full ) )
-        {
-        case kptNotFound:
-            return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcNotFound );
-        case kptBadPath:
-            return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcInvalid );
-        case kptDir:
-        case kptDir | kptAlias:
-            break;
-        default:
-            return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcIncorrect );
-        }
-
-        sub = KSysDirMake_v1 ( path_size );
-        if ( sub == NULL )
-            rc = RC ( rcFS, rcDirectory, rcOpening, rcMemory, rcExhausted );
-        else
-        {
-            rc = KSysDirInit_v1 ( sub, rcOpening, self -> root, full, path_size, true, chroot );
-            if ( rc == 0 )
-            {
-                * subp = & sub -> dad;
-                return 0;
-            }
-
-            free ( sub );
-        }
-    }
-    return rc;
-}
-
-/* KSysDirCreateDir
- *  create a sub-directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "access" [ IN ] - standard Unix directory permissions
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- */
-static
-rc_t KSysDirCreateDir_v1 ( KSysDir_v1 * self,
-    uint32_t access, KCreateMode mode, const char *path, va_list args )
-{
-    char full [ PATH_MAX ];
-    rc_t rc = KSysDirMakePath_v1 ( self, rcCreating, true, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        if ( ( mode & kcmValueMask ) == kcmCreate )
-        {
-            switch ( KSysDirFullPathType_v1 ( full ) )
-            {
-            case kptNotFound:
-                break;
-            case kptBadPath:
-                return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcInvalid );
-            case kptDir:
-                return RC ( rcFS, rcDirectory, rcCreating, rcDirectory, rcExists );
-            default:
-                return RC ( rcFS, rcDirectory, rcCreating, rcPath, rcIncorrect );
-            }
-        }
-
-        rc = make_dir_v1 ( full, access );
-        if ( rc != 0 ) switch ( GetRCState ( rc ) )
-        {
-        case rcExists:
-            rc = 0;
-            if ( ( mode & kcmValueMask ) == kcmInit )
-                rc = KSysDirEmptyDir_v1 ( full, sizeof full, 1 );
-            break;
-        case rcNotFound:
-            if ( ( mode & kcmParents ) != 0 )
-                rc = KSysDirCreateParents_v1 ( self, full, access, false );
-            break;
-        default:
-            break;
-        }
-    }
-    return rc;
-}
-
-/* KDirectoryNativeDir
- *  returns a native file-system directory node reference
- *  the directory root will be "/" and set to the native
- *  idea of current working directory
- *
- *  NB - the returned reference will be non-const, allowing
- *  modification operations to be attempted. these operations
- *  may still fail if the underlying FS disallows them.
- *
- *  "dir" [ OUT ] - return parameter for native directory
- */
-
-static KDirectory_vt_v1 vtKSysDir =
-{
-    /* version 1.1 */
-    1, 1,
-
-    /* start minor version 0 methods*/
-    KSysDirDestroy_v1,
-    KSysDirList_v1,
-
-    /* the following two messages map to the same method, requiring type casting */
-    ( rc_t ( * )  ( const KSysDir_v1*, bool,
-        rc_t ( * ) ( const KDirectory_v1*, uint32_t, const char*, void* ), void*,
-       const char*, va_list ) ) KSysDirVisit_v1,
-    ( rc_t ( * ) ( KSysDir_v1*, bool,
-        rc_t ( * ) ( KDirectory_v1*, uint32_t, const char*, void* ), void*,
-       const char*, va_list ) ) KSysDirVisit_v1,
-
-    KSysDirPathType_v1,
-    KSysDirResolvePath_v1,
-    KSysDirResolveAlias_v1,
-    KSysDirRename_v1,
-    KSysDirRemove_v1,
-    KSysDirClearDir_v1,
-    KSysDirVAccess,
-    KSysDirSetAccess_v1,
-    KSysDirCreateAlias_v1,
-    KSysDirOpenFileRead_v1,
-    KSysDirOpenFileWrite_v1,
-    KSysDirCreateFile_v1,
-    KSysDirFileSize_v1,
-    KSysDirSetFileSize_v1,
-    KSysDirOpenDirRead_v1,
-    KSysDirOpenDirUpdate_v1,
-    KSysDirCreateDir_v1,
-    NULL, /* we don't track files*/
-    /* end minor version 0 methods*/
-
-    /* start minor version 1 methods*/
-    KSysDirVDate,
-    KSysDirVSetDate,
-    KSysDirGetSysdir_v1
-    /* end minor version 1 methods*/
-};
-
-/* KSysDirInit
- */
-static
-rc_t KSysDirInit_v1 ( KSysDir_v1 * self, enum RCContext ctx, uint32_t dad_root,
-    const char *path, uint32_t path_size, bool update, bool chroot )
-{
-    rc_t rc;
-
-    rc = KDirectoryInit ( & self -> dad, ( const KDirectory_vt * ) & vtKSysDir,
-                          "KSysDir", path?path:"(null)", update );
-    if ( rc != 0 )
-        return ResetRCContext ( rc, rcFS, rcDirectory, ctx );
-
-    if ( path != NULL )
-        memcpy ( self -> path, path, path_size );
-    self -> root = chroot ? path_size : dad_root;
-    self -> size = path_size + 1;
-    self -> path [ path_size ] = '/';
-    self -> path [ path_size + 1 ] = 0;
-
-    return 0;
-}
-
-extern rc_t CC ReportCWD ( const ReportFuncs *f, uint32_t indent );
-extern rc_t CC ReportRedirect ( KWrtHandler* handler,
-    const char* filename, bool* to_file, bool finalize );
-
-LIB_EXPORT rc_t CC KDirectoryNativeDir_v1 ( KDirectory_v1 **dirp )
-{
-    rc_t rc;
-    KSysDir_v1 *dir;
-    uint32_t size;
-    char wd [ PATH_MAX ];
-
-    static bool latch;
-    if ( ! latch )
-    {
-        ReportInitKFS ( ReportCWD, ReportRedirect );
-        latch = true;
-    }
-
-    if ( dirp == NULL )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcParam, rcNull );
-
-    * dirp = NULL;
-
-    if ( realpath ( ".", wd ) == NULL ) switch ( errno )
-    {
-    case EACCES:
-        return RC ( rcFS, rcDirectory, rcAccessing, rcDirectory, rcUnauthorized );
-    case EIO:
-        return RC ( rcFS, rcDirectory, rcAccessing, rcTransfer, rcUnknown );
-    default:
-        return RC ( rcFS, rcDirectory, rcAccessing, rcNoObj, rcUnknown );
-    }
-
-    size = strlen ( wd );
-    if ( size + 2 > sizeof wd )
-        return RC ( rcFS, rcDirectory, rcAccessing, rcBuffer, rcInsufficient );
-
-    /* trim trailing slash */
-    if ( size > 0 && wd [ size - 1 ] == '/' )
-        wd [ -- size ] = 0;
-
-    dir = KSysDirMake_v1 ( size );
-    if ( dir == NULL )
-        rc = RC ( rcFS, rcDirectory, rcAccessing, rcMemory, rcExhausted );
-    else
-    {
-        rc = KSysDirInit_v1 ( dir, rcAccessing, 0, wd, size, true, false );
-        if ( rc == 0 )
-        {
-            * dirp = & dir -> dad;
-            return 0;
-        }
-
-        free ( dir );
-    }
-
-    return rc;
-}
diff --git a/libs/kfs/unix/sysdll.c b/libs/kfs/unix/sysdll.c
deleted file mode 100644
index 54c7f4b..0000000
--- a/libs/kfs/unix/sysdll.c
+++ /dev/null
@@ -1,1436 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define TRACK_REFERENCES 0
-
-#include "va_copy.h"
-#include "sysdir-priv.h"
-
-#include <kfs/extern.h>
-#include <kfs/dyload.h>
-#include <kfs/directory.h>
-#include <klib/refcount.h>
-#include <klib/vector.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/out.h>
-#include <klib/log.h>
-#include <klib/status.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include "os-native.h"
-
-/* old Sun includes won't define PATH_MAX */
-
-#ifndef __XOPEN_OR_POSIX
-#define __XOPEN_OR_POSIX 1
-#endif
-
-#include <limits.h>
-
-#undef __XOPEN_OR_POSIX
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-
-#include <dlfcn.h>
-
-
-#if _DEBUGGING
-#define DLOPEN_MODE RTLD_NOW
-#else
-#define DLOPEN_MODE RTLD_LAZY
-#endif
-
-#define ALWAYS_ADD_EXE 1
-#define USE_DYLOAD 1
-
-/* PATH_MAX is not really universal even on Linux/Unix */
-#ifndef PATH_MAX
-#define PATH_MAX        4096
-#endif
-
-/*--------------------------------------------------------------------------
- * KDirectory
- */
-static
-void KDirRefRelease ( void *item, void *ignore )
-{
-    KDirectoryRelease ( ( const void* ) item );
-}
-
-/*--------------------------------------------------------------------------
- * KDyld
- *  dynamic library loader
- *
- *  maintains cache of libraries it has opened while they remain open
- *  such that subsequent requests for an open library will return a
- *  new reference to the existing library.
- */
-struct KDyld
-{
-    Vector search;
-    KRefcount refcount;
-};
-
-
-/* Whack
- */
-static
-rc_t KDyldWhack ( KDyld *self )
-{
-    KRefcountWhack ( & self -> refcount, "KDyld" );
-
-    VectorWhack ( & self -> search, KDirRefRelease, NULL );
-    free ( self );
-
-    return 0;
-}
-
-
-/* Make
- *  create a dynamic loader object
- *
- *  "dl" [ OUT ] - return parameter for loader
- */
-LIB_EXPORT rc_t CC KDyldMake ( KDyld **dlp )
-{
-    rc_t rc;
-
-    if ( dlp == NULL )
-        rc = RC ( rcFS, rcDylib, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KDyld *dl = malloc ( sizeof * dl );
-        if ( dl == NULL )
-            rc = RC ( rcFS, rcDylib, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            VectorInit ( & dl -> search, 1, 8 );
-            KRefcountInit ( & dl -> refcount, 1, "KDyld", "make", "dl" );
-
-            * dlp = dl;
-            return 0;
-        }
-
-        * dlp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KDyldAddRef ( const KDyld *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KDyld" ) )
-        {
-        case krefLimit:
-            return RC ( rcFS, rcDylib, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KDyldRelease ( const KDyld *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KDyld" ) )
-        {
-        case krefWhack:
-            return KDyldWhack ( ( KDyld* ) self );
-        case krefNegative:
-            return RC ( rcFS, rcDylib, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Attach
- * Sever
- */
-static
-KDyld *KDyldAttach ( const KDyld *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "KDyld" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( KDyld* ) self;
-}
-
-static
-rc_t KDyldSever ( const KDyld *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "KDyld" ) )
-        {
-        case krefWhack:
-            return KDyldWhack ( ( KDyld* ) self );
-        case krefNegative:
-            return RC ( rcFS, rcDylib, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* AddSearchPath
- *  add a search path to loader for locating library files
- */
-LIB_EXPORT rc_t CC KDyldVAddSearchPath ( KDyld *self, const char *path, va_list args )
-{
-    rc_t rc;
-    if ( self == NULL )
-        rc = RC ( rcFS, rcDylib, rcUpdating, rcSelf, rcNull );
-    else
-    {
-        KDirectory *wd;
-        rc = KDirectoryNativeDir ( & wd );
-        if ( rc == 0 )
-        {
-            const KDirectory *dir;
-            rc = KDirectoryVOpenDirRead ( wd, & dir, false, path, args );
-            if ( rc == 0 )
-            {
-                rc = VectorAppend ( & self -> search, NULL, dir );
-                if ( rc != 0 )
-                    KDirectoryRelease ( dir );
-            }
-
-            KDirectoryRelease ( wd );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDyldAddSearchPath ( KDyld *self, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDyldVAddSearchPath ( self, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-static
-void KDyldForEach ( const KDyld *self,
-    void ( * f ) ( const KDirectory *dir, void *data ), void *data )
-{
-    VectorForEach ( & self -> search, false,
-        ( void ( * ) ( void*, void* ) ) f, data );
-}
-
-
-/* HomeDirectory
- *  returns a KDirectory where the binary for a given function is located
- *
- *  "dir" [ OUT ] - return parameter for home directory ( read-only ), if found
- *
- *  "func" [ IN ] - function pointer within binary to be located
- */
-LIB_EXPORT rc_t CC KDyldHomeDirectory ( const KDyld *self, const KDirectory **dir, fptr_t func )
-{
-    rc_t rc;
-
-    if ( dir == NULL )
-        rc = RC ( rcFS, rcDylib, rcSearching, rcParam, rcNull );
-    else
-    {
-        * dir = NULL;
-
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcSearching, rcSelf, rcNull );
-        else if ( func == NULL )
-            rc = RC ( rcFS, rcDylib, rcSearching, rcFunction, rcNull );
-        else
-        {
-            Dl_info info;
-            memset ( & info, 0, sizeof info );
-            if ( dladdr ( ( void* ) func, & info ) == 0 )
-                rc = RC ( rcFS, rcDylib, rcSearching, rcFunction, rcNotFound );
-            else
-            {
-                KDirectory *wd;
-                rc = KDirectoryNativeDir ( & wd );
-                if ( rc == 0 )
-                {
-                    /* turn this into a real path */
-                    const KSysDir *sdir = KDirectoryGetSysDir ( wd );
-                    if ( sdir == NULL )
-                        rc = RC ( rcFS, rcDylib, rcSearching, rcDirectory, rcIncorrect );
-                    else
-                    {
-                        /* "dladdr" will return a simple name rather than a path
-                           when the address is within the application itself and
-                           the application was found using PATH. this is brilliant
-                           design at its best. */
-                        char thanks_for_brilliant_APIs [ PATH_MAX ];
-                        const char *dli_fname = info . dli_fname;
-
-                        /* check for a path rather than a name */
-                        const char *last_slash = strrchr ( info . dli_fname, '/' );
-                        if ( last_slash == NULL )
-                        {
-                            /* simple name - get PATH */
-                            const char *PATH = getenv ( "PATH" );
-                            rc = RC ( rcFS, rcDylib, rcSearching, rcPath, rcNotFound );
-                            if ( PATH != NULL )
-                            {
-                                /* loop over PATH */
-                                const char *path_start, *path_end;
-                                for ( path_start = PATH;; path_start = path_end + 1 )
-                                {
-                                    /* look for non-empty directory */
-                                    path_end = strchr ( path_start, ':' );
-                                    if ( path_start != path_end && path_start [ 0 ] != 0 )
-                                    {
-                                        rc_t rc2;
-                                        uint32_t path_type;
-
-                                        /* handle last element in list */
-                                        if ( path_end == NULL )
-                                            last_slash = path_start + strlen ( path_start );
-                                        else for ( last_slash = path_end; last_slash > path_start; -- last_slash )
-                                        {
-                                            if ( last_slash [ -1 ] != '/' )
-                                                break;
-                                        }
-
-                                        /* create possible path, using up to ':' */
-                                        rc2 = string_printf ( thanks_for_brilliant_APIs, sizeof thanks_for_brilliant_APIs, NULL,
-                                                              "%.*s/%s", ( int ) ( last_slash - path_start ), path_start, dli_fname );
-
-                                        /* if failed to create path string */
-                                        if ( rc2 != 0 )
-                                            break;
-
-                                        /* check path against working directory */
-                                        path_type = KDirectoryPathType ( wd, "%s", thanks_for_brilliant_APIs );
-                                        if ( ( path_type & ~ kptAlias ) == kptFile )
-                                        {
-                                            uint32_t access = 0;
-                                            rc = KDirectoryAccess ( wd, & access, "%s", thanks_for_brilliant_APIs );
-                                            if ( rc != 0 )
-                                                break;
-
-                                            /* try to do a quick check that the file can be executed.
-                                               but it could fail to do the right guess. */
-                                            if ( access & 0100 || access & 0010 || access & 0001 ) {
-                                                /* this is a file, which can be assumed to be an executable */
-                                                dli_fname = thanks_for_brilliant_APIs;
-                                                last_slash
-                                                    = & thanks_for_brilliant_APIs [ last_slash - path_start ];
-                                                rc = 0;
-                                                break;
-                                            }
-                                        }
-                                    }
-
-                                    /* exit if no more paths */
-                                    if ( path_end == NULL )
-                                        break;
-                                }
-                            }
-                        }
-
-                        if ( rc == 0 )
-                        {
-                            char real [ PATH_MAX ];
-                            rc = KSysDirRealPath ( sdir, real, sizeof real, "%.*s"
-                                , ( int ) ( last_slash - dli_fname ), dli_fname );
-
-                            if ( rc == 0 )
-                                rc = KDirectoryOpenDirRead ( wd, dir, false, "%s", real );
-
-                            DBGMSG(DBG_KFS, DBG_FLAG(DBG_KFS_DIR), ("%s: %R path is '%s'\n", __func__, rc, real));
-                        }
-                    }
-
-                    KDirectoryRelease ( wd );
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KDylib
- *  Unix dynamic library
- */
-struct KDylib
-{
-    void *handle;
-    String path;
-    KRefcount refcount;
-};
-
-
-/* Whack
- */
-static
-rc_t KDylibWhack ( KDylib *self )
-{
-    KRefcountWhack ( & self -> refcount, "KDylib" );
-
-
-/* Darwin, especially before 10.5 doesn't/didn't do this well */
-#if ! MAC
-    /* try to close library */
-    if ( self -> handle && dlclose ( self -> handle ) )
-    {
-        /* report error */
-        const char *msg = dlerror ();
-        rc_t rc = RC ( rcFS, rcDylib, rcClosing, rcNoObj, rcUnknown );
-        LOGERR ( klogInt, rc, msg );
-        ( void ) msg;
-
-        return rc;
-    }
-#endif
-    free ( self );
-    return 0;
-}
-
-
-/* Make
- */
-static
-rc_t KDylibMake ( KDylib **libp, const String *path )
-{
-    KDylib *lib = malloc ( sizeof * lib + path -> size + 1 );
-    if ( lib == NULL )
-        return RC ( rcFS, rcDylib, rcConstructing, rcMemory, rcExhausted );
-
-    lib -> handle = NULL;
-    string_copy ( ( char* ) ( lib + 1 ), path -> size + 1, path -> addr, path -> size );
-    StringInit ( & lib -> path, ( char* ) ( lib + 1 ), path -> size, path -> len );
-    KRefcountInit ( & lib -> refcount, 1, "KDylib", "make", lib -> path . addr );
-
-    * libp = lib;
-    return 0;
-}
-
-
-/* SetLogging
- */
-static
-rc_t KDylibSetLogging ( const KDylib *self )
-{
-    rc_t ( CC * set_formatter ) ( KFmtWriter writer, KLogFmtFlags flags, void *data );
-    rc_t ( CC * set_writer ) ( KWrtWriter writer, void *data );
-    rc_t ( CC * set_level ) ( KLogLevel lvl );
-    
-    if ( ! self -> handle )
-    {
-        return 0;
-    }
-
-    /* set the current logging level */
-    set_level = ( rc_t ( * ) ( KLogLevel ) ) dlsym ( self -> handle, "KLogLevelSet" );
-    if ( set_level != NULL )
-    {
-        KLogLevel lvl = KLogLevelGet ();
-        ( * set_level ) ( lvl );
-    }
-
-    /* determine current library logging */
-    set_writer = ( rc_t ( * ) ( KWrtWriter, void* ) ) dlsym ( self -> handle, "KOutHandlerSet" );
-    if ( set_writer != NULL ) {
-        const KWrtHandler* handler = KOutHandlerGet ();
-        ( * set_writer ) ( handler -> writer, handler -> data );
-    }
-
-    set_formatter = ( rc_t ( * ) ( KFmtWriter, KLogFmtFlags, void* ) ) dlsym ( self -> handle, "KLogLibFmtHandlerSet" );
-    if ( set_formatter != NULL ) {
-        KLogFmtFlags flags = KLogLibFmtFlagsGet ();
-        const KFmtHandler* fmt_handler = KLogFmtHandlerGet ();
-        ( * set_formatter ) ( fmt_handler -> formatter, flags, fmt_handler -> data );
-    }
-    set_writer = ( rc_t ( * ) ( KWrtWriter, void* ) ) dlsym ( self -> handle, "KLogLibHandlerSet" );
-    if ( set_writer != NULL ) {
-        const KWrtHandler* handler = KLogLibHandlerGet ();
-        ( * set_writer ) ( handler -> writer, handler -> data );
-    }
-
-    set_formatter = ( rc_t ( * ) ( KFmtWriter, KLogFmtFlags, void* ) ) dlsym ( self -> handle, "KStsLibFmtHandlerSet" );
-    if ( set_formatter != NULL ) {
-        KStsFmtFlags flags = KStsLibFmtFlagsGet ();
-        const KFmtHandler* fmt_handler = KStsFmtHandlerGet ();
-        ( * set_formatter ) ( fmt_handler -> formatter, flags, fmt_handler -> data );
-    }
-    set_writer = ( rc_t ( * ) ( KWrtWriter, void* ) ) dlsym ( self -> handle, "KStsLibHandlerSet" );
-    if ( set_writer != NULL ) {
-        const KWrtHandler* handler = KStsLibHandlerGet ();
-        ( * set_writer ) ( handler -> writer, handler -> data );
-    }
-#if _DEBUGGING
-    set_writer = ( rc_t ( * ) ( KWrtWriter, void* ) ) dlsym ( self -> handle, "KDbgHandlerSet" );
-    if ( set_writer != NULL ) {
-        const KWrtHandler* handler = KDbgHandlerGet ();
-        ( * set_writer ) ( handler -> writer, handler -> data );
-    }
-#endif
-    return 0;
-}
-
-/* LoadLib
- *  load a dynamic library
- *
- *  "lib" [ OUT ] - return parameter for loaded library
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target library
- */
-static
-rc_t KDyldLoad ( KDyld *self, KDylib *lib, const char *path )
-{
-/* (VDB-1391) remove dynamic linker interfaces from system */
-#if USE_DYLOAD
-    rc_t rc;
-    const char *msg;
-    size_t msg_len;
-
-    lib -> handle = dlopen ( path, path == NULL ? RTLD_LAZY : DLOPEN_MODE );
-    if ( lib -> handle != NULL )
-        return KDylibSetLogging ( lib );
-
-    msg = dlerror ();
-    rc = RC ( rcFS, rcDylib, rcLoading, rcNoObj, rcUnknown );
-
-    msg_len = strlen(msg);
-    if ( msg_len > lib -> path . size + 2 )
-    {
-        const char *cmp = & msg [ lib -> path . size + 2 ];
-        if ( strcmp ( cmp, "cannot open shared object file: No such file or directory" ) == 0 )
-            rc = RC ( rcFS, rcDylib, rcLoading, rcPath, rcNotFound );
-        else if ( strncmp ( cmp, "undefined symbol: ", sizeof "undefined symbol: " - 1 ) == 0 )
-            rc = RC ( rcFS, rcDylib, rcLoading, rcDylib, rcIncomplete );
-    }
-    if (GetRCState(rc) == rcUnknown) {
-        static const char imageNotFound[] = " image not found";
-        const char *cmp1 = strstr(msg, imageNotFound);
-        const char *cmp2 = msg + msg_len - (sizeof(imageNotFound) - 1);
-        if (cmp1 == cmp2)
-            rc = RC ( rcFS, rcDylib, rcLoading, rcPath, rcNotFound );
-    }
-    
-    DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_DLL), ("%s: %R %s\n", __func__, rc, msg));
-    if (GetRCState(rc) == rcUnknown) {
-        (void)LOGMSG(klogWarn, (msg));
-    }
-    
-    return rc;
-#else
-    lib -> handle = NULL;
-    return 0;
-#endif    
-}
-
-static
-rc_t KDyldVTryLoadLib ( KDyld *self, KDylib **lib,
-    const KDirectory *dir, const char *path, va_list args )
-{
-    rc_t rc;
-
-    const KSysDir *sdir = KDirectoryGetSysDir ( dir );
-    if ( sdir == NULL )
-        rc = RC ( rcFS, rcDylib, rcLoading, rcDirectory, rcIncorrect );
-    else
-    {
-        char real [ PATH_MAX ];
-        rc = KSysDirVRealPath ( sdir, real, sizeof real, path, args );
-        if ( rc == 0 )
-        {
-            String pstr;
-            StringInitCString ( & pstr, real );
-
-            rc = KDylibMake ( lib, & pstr );
-            if ( rc == 0 )
-            {
-                rc = KDyldLoad ( self, * lib, real );
-                if ( rc == 0 )
-                    return 0;
-
-                free ( * lib );
-            }
-        }
-    }
-
-    * lib = NULL;
-
-    return rc;
-}
-
-static
-rc_t KDyldTryLoadLib ( KDyld *self, KDylib **lib,
-    const KDirectory *dir, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-    va_start ( args, path );
-    rc = KDyldVTryLoadLib ( self, lib, dir, path, args );
-    va_end ( args );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDyldVLoadLib ( KDyld *self,
-    KDylib **lib, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( lib == NULL )
-        rc = RC ( rcFS, rcDylib, rcLoading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcLoading, rcSelf, rcNull );
-        else if ( path == NULL || path [ 0 ] == 0 )
-        {
-            String pstr;
-            CONST_STRING ( & pstr, "" );
-
-            rc = KDylibMake ( lib, & pstr );
-            if ( rc == 0 )
-            {
-                rc = KDyldLoad ( self, * lib, NULL );
-                if ( rc == 0 )
-                    return 0;
-            
-                free ( * lib );
-            }
-        }
-        else
-        {
-            uint32_t i = VectorStart ( & self -> search );
-            uint32_t end = i + VectorLength ( & self -> search );
-
-            if ( i == end )
-            {
-                char name [ 4096 ];
-                int len = ( args == NULL ) ?
-                    snprintf  ( name, sizeof name, "%s", path ) :
-                    vsnprintf ( name, sizeof name, path, args );
-                if ( len < 0 || len >= sizeof name )
-                    rc = RC ( rcFS, rcDylib, rcLoading, rcPath, rcExcessive );
-                else
-                {
-                    String pstr;
-                    StringInit ( & pstr, name, len, string_len ( name, len ) );
-
-                    rc = KDylibMake ( lib, & pstr );
-                    if ( rc == 0 )
-                    {
-                        rc = KDyldLoad ( self, * lib, name );
-                        if ( rc == 0 )
-                            return 0;
-                    
-                        free ( * lib );
-                    }
-                }
-            }
-            else
-            {
-                for ( * lib = NULL; i < end; ++ i )
-                {
-                    const KDirectory *dir;
-
-                    va_list cpy;
-                    va_copy ( cpy, args );
-
-                    dir = ( const void* ) VectorGet ( & self -> search, i );
-                    rc = KDyldVTryLoadLib ( self, lib, dir, path, cpy );
-
-                    va_end ( cpy );
-
-                    if ( rc == 0 || GetRCState ( rc ) != rcNotFound )
-                        return rc;
-                }
-
-                rc = RC ( rcFS, rcDylib, rcLoading, rcPath, rcNotFound );
-            }
-        }
-
-        * lib = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDyldLoadLib ( KDyld *self,
-    KDylib **lib, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDyldVLoadLib ( self, lib, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KDylibAddRef ( const KDylib *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KDylib" ) )
-        {
-        case krefLimit:
-            return RC ( rcFS, rcDylib, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KDylibRelease ( const KDylib *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KDylib" ) )
-        {
-        case krefWhack:
-            return KDylibWhack ( ( KDylib* ) self );
-        case krefNegative:
-            return RC ( rcFS, rcDylib, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-static
-void KDylibVectRelease ( void *item, void *ignore )
-{
-    KDylib *self = item;
-    KDylibRelease ( self );
-}
-
-
-/* Attach
- * Sever
- */
-static
-KDylib *KDylibAttach ( const KDylib *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "KDylib" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( KDylib* ) self;
-}
-
-static
-rc_t KDylibSever ( const KDylib *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "KDylib" ) )
-        {
-        case krefWhack:
-            return KDylibWhack ( ( KDylib* ) self );
-        case krefNegative:
-            return RC ( rcFS, rcDylib, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Sort
- */
-static
-int64_t KDylibSort ( const void *item, const void *n )
-{
-    const KDylib *a = item;
-    const KDylib *b = n;
-    return StringOrderNoNullCheck ( & a -> path, & b -> path );
-}
-
-
-/* FullPath
- *  return full path to library
- */
-LIB_EXPORT rc_t CC KDylibFullPath ( const KDylib *self, char *path, size_t psize )
-{
-    rc_t rc;
-
-    if ( psize == 0 )
-        rc = RC ( rcFS, rcDylib, rcAccessing, rcBuffer, rcInsufficient );
-    else if ( path == NULL )
-        rc = RC ( rcFS, rcDylib, rcAccessing, rcBuffer, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            size_t bytes = string_copy ( path, psize,
-                self -> path . addr, self -> path . size );
-            if ( bytes < psize )
-                return 0;
-
-            rc = RC ( rcFS, rcDylib, rcAccessing, rcBuffer, rcInsufficient );
-        }
-
-        path [ 0 ] = 0;
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KDlset
- *  ordered set of dynamic libraries
- *  contained libraries remain resident until set is released
- */
-struct KDlset
-{
-    KDyld *dl;
-    Vector name, ord;
-    KRefcount refcount;
-};
-
-
-/* Whack
- */
-static
-rc_t KDlsetWhack ( KDlset *self )
-{
-    KRefcountWhack ( & self -> refcount, "KDlset" );
-
-    VectorWhack ( & self -> name, NULL, NULL );
-    VectorWhack ( & self -> ord, KDylibVectRelease, NULL );
-    KDyldSever ( self -> dl );
-    free ( self );
-
-    return 0;
-}
-
-#define STRINGIZE(s) #s
-#define LIBNAME(pref, name, suff) STRINGIZE(pref) name STRINGIZE(suff)
-/* MakeSet
- *  load a dynamic library
- *
- *  "set" [ OUT ] - return parameter for lib set
- */
-LIB_EXPORT rc_t CC KDyldMakeSet ( const KDyld *self, KDlset **setp )
-{
-    rc_t rc = 0;
-
-    if ( setp == NULL )
-        rc = RC ( rcFS, rcDylib, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcConstructing, rcSelf, rcNull );
-        else
-        {
-            KDlset *set = malloc ( sizeof * set );
-            if ( set == NULL )
-                rc = RC ( rcFS, rcDylib, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                set -> dl = KDyldAttach ( self );
-                VectorInit ( & set -> name, 0, 16 );
-                VectorInit ( & set -> ord, 0, 16 );
-                KRefcountInit ( & set -> refcount, 1, "KDlset", "make", "dlset" );
-#if ! ALWAYS_ADD_EXE
-                {   
-                    KDylib *jni;
-                    const char* libname = LIBNAME(LIBPREFIX, "vdb_jni.", SHLIBEXT);
-                    if ( KDyldLoadLib ( ( KDyld* ) self, & jni, libname ) == 0 )
-                    {
-                        rc = KDlsetAddLib ( set, jni );
-                        KDylibRelease ( jni );
-                    }
-                    if (rc == 0)
-                    {
-                        * setp = set;
-                        return 0;
-                    }
-                }
-#else
-                {
-                    KDylib *exe;
-                    rc = KDyldLoadLib ( ( KDyld* ) self, & exe, NULL );
-                    if ( rc == 0 )
-                    {
-                        rc = KDlsetAddLib ( set, exe );
-                        KDylibRelease ( exe );
-                        if ( rc == 0 )
-                        {
-                            * setp = set;
-                            return 0;
-                        }
-                    }
-                }
-#endif
-                KDlsetRelease ( set );
-            }
-        }
-
-        * setp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KDlsetAddRef ( const KDlset *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KDlset" ) )
-        {
-        case krefLimit:
-            return RC ( rcFS, rcDylib, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KDlsetRelease ( const KDlset *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KDlset" ) )
-        {
-        case krefWhack:
-            return KDlsetWhack ( ( KDlset* ) self );
-        case krefNegative:
-            return RC ( rcFS, rcDylib, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* AddLib
- *  adds a dynamic library to end of ordered set
- *
- *  "lib" [ IN ] - library returned from KDyldLoadLib
- */
-static
-rc_t KDlsetAddLibInt ( KDlset *self, KDylib *lib )
-{
-    uint32_t idx;
-    rc_t rc = VectorAppend ( & self -> ord, & idx, lib );
-    if ( rc == 0 )
-    {
-        void *ignore;
-
-        rc = VectorInsertUnique ( & self -> name,
-            lib, NULL, KDylibSort );
-        if ( rc == 0 )
-            return 0;
-
-        VectorSwap ( & self -> ord, idx, NULL, & ignore );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDlsetAddLib ( KDlset *self, KDylib *lib )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcFS, rcDylib, rcInserting, rcSelf, rcNull );
-    else if ( lib == NULL )
-        rc = RC ( rcFS, rcDylib, rcInserting, rcDylib, rcNull );
-    else
-    {
-        rc = KDylibAddRef ( lib );
-        if ( rc == 0 )
-        {
-            rc = KDlsetAddLibInt ( self, lib );
-            if ( rc == 0 )
-                return 0;
-
-            KDylibRelease ( lib );
-        }
-    }
-
-    return rc;
-}
-
-
-/* AddAll
- *  adds all dynamic libraries found in dl search path
- */
-static
-rc_t KDlsetTryLib ( const KDirectory *dir,
-    uint32_t type, const char *name, void *data )
-{
-    KDlset *self = data;
-
-    if ( ( type & ~ kptAlias ) == kptFile )
-    {
-        rc_t rc;
-        KDylib *lib;
-#ifdef SHLX
-        /* force simple shared library extension */
-        if ( sizeof SHLX >= 2 )
-        {
-            /* SHLX has at least 1 character plus NUL byte */
-            uint32_t len = strlen ( name );
-            /* name must be at least 1 character larger */
-            if ( len <= ( sizeof SHLX - 1 ) )
-                return 0;
-            /* name must end with shared library extension */
-            if ( memcmp ( & name [ len - ( sizeof SHLX - 1 ) ], SHLX, sizeof SHLX - 1 ) != 0 )
-                return 0;
-        }
-#endif
-        rc = KDyldTryLoadLib ( self -> dl, & lib, dir, name );
-        if ( rc == 0 )
-        {
-            rc = KDlsetAddLibInt ( self, lib );
-            if ( rc == 0 )
-                return 0;
-
-            KDylibRelease ( lib );
-        }
-    }
-
-    return 0;
-}
-
-static
-void KDlsetVisitDir ( const KDirectory *dir, void *data )
-{
-    KDirectoryVisit ( dir, false, KDlsetTryLib, data, "." );
-}
-
-LIB_EXPORT rc_t CC KDlsetAddAll ( KDlset *self )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcDylib, rcInserting, rcSelf, rcNull );
-    KDyldForEach ( self -> dl, KDlsetVisitDir, self );
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * KSymAddr
- *  symbol address within a dynamic library
- */
-struct KSymAddr
-{
-    KDylib *lib;
-    void *addr;
-    KRefcount refcount;
-};
-
-
-/* Whack
- */
-static
-rc_t KSymAddrWhack ( KSymAddr *self )
-{
-    KRefcountWhack ( & self -> refcount, "KSymAddr" );
-
-    KDylibSever ( self -> lib );
-    free ( self );
-
-    return 0;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KSymAddrAddRef ( const KSymAddr *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KSymAddr" ) )
-        {
-        case krefLimit:
-            return RC ( rcFS, rcDylib, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KSymAddrRelease ( const KSymAddr *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KSymAddr" ) )
-        {
-        case krefWhack:
-            return KSymAddrWhack ( ( KSymAddr* ) self );
-        case krefNegative:
-            return RC ( rcFS, rcDylib, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Make
- */
-static
-rc_t KSymAddrMake ( KSymAddr **symp,
-    const KDylib *lib, const char *name )
-{
-    if ( lib -> handle )
-    {
-        void *addr = dlsym ( lib -> handle, name );
-        const char *estr = dlerror();
-        
-        if ( addr != NULL || estr == NULL )
-        {
-            KSymAddr *sym = malloc ( sizeof * sym );
-            if ( sym == NULL )
-                return RC ( rcFS, rcDylib, rcConstructing, rcMemory, rcExhausted );
-
-            sym -> lib = KDylibAttach ( lib );
-            sym -> addr = addr;
-            KRefcountInit ( & sym -> refcount, 1, "KSymAddr", "make", name );
-            * symp = sym;
-            return 0;
-        }
-    }
-    * symp = NULL;
-    return RC ( rcFS, rcDylib, rcSelecting, rcName, rcNotFound );
-}
-
-
-/* Symbol
- *  find a symbol within dynamic library
- *
- *  "sym" [ OUT ] - return parameter for exported symbol address
- *
- *  "name" [ IN ] - NUL terminated symbol name in
- *  library-native character set
- */
-LIB_EXPORT rc_t CC KDylibSymbol ( const KDylib *self, KSymAddr **sym, const char *name )
-{
-    rc_t rc;
-
-    if ( sym == NULL )
-        rc = RC ( rcFS, rcDylib, rcSelecting, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcSelf, rcNull );
-        else if ( name == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcNull );
-        else if ( name [ 0 ] == 0 )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcEmpty );
-        else
-        {
-            return KSymAddrMake ( sym, self, name );
-        }
-
-        * sym = NULL;
-    }
-
-    return rc;
-}
-
-typedef struct KDlsetTrySymData KDlsetTrySymData;
-struct KDlsetTrySymData
-{
-    const KDlset *self;
-    const char *name;
-
-    bool ( CC * test ) ( const KSymAddr *sym, void *data );
-    void *data;
-
-    KSymAddr *sym;
-    rc_t rc;
-    bool first;
-};
-
-static
-bool KDlsetTrySymbol ( void *item, void *data )
-{
-    KSymAddr *sym;
-    KDlsetTrySymData *pb = data;
-    pb -> rc = KDylibSymbol ( item, & sym, pb -> name );
-    if ( pb -> rc == 0 )
-    {
-        /* simple case */
-        if ( pb -> test == NULL )
-        {
-            pb -> sym = sym;
-            return true;
-        }
-
-        /* apply filter function */
-        if ( ( * pb -> test ) ( sym, pb -> data ) )
-        {
-            KSymAddrRelease ( pb -> sym );
-            pb -> sym = sym;
-            return pb -> first;
-        }
-
-        KSymAddrRelease ( sym );
-    }
-    return false;
-}
-
-LIB_EXPORT rc_t CC KDlsetSymbol ( const KDlset *self, KSymAddr **sym, const char *name )
-{
-    rc_t rc;
-
-    if ( sym == NULL )
-        rc = RC ( rcFS, rcDylib, rcSelecting, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcSelf, rcNull );
-        else if ( name == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcNull );
-        else if ( name [ 0 ] == 0 )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcEmpty );
-        else
-        {
-            KDlsetTrySymData pb;
-            memset ( & pb, 0, sizeof pb );
-            pb . self = self;
-            pb . name = name;
-            pb . rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcNotFound );
-
-            if ( VectorDoUntil ( & self -> ord, false, KDlsetTrySymbol, & pb ) )
-            {
-                * sym = pb . sym;
-                return 0;
-            }
-
-            rc = pb . rc;
-        }
-
-        * sym = NULL;
-    }
-
-    return rc;
-}
-
-
-/* FirstSymbol
- * LastSymbol
- *  find a symbol within dynamic library set matching criteria
- *
- *  "sym" [ OUT ] - return parameter for exported symbol address
- *
- *  "name" [ IN ] - NUL terminated symbol name in
- *  library-native character set
- *
- *  "test" [ IN ] and "data" [ IN, OPAQUE ] - callback filter function
- *  return true if symbol matches criteria
- */
-LIB_EXPORT rc_t CC KDlsetFirstSymbol ( const KDlset *self, KSymAddr **sym, const char *name,
-    bool ( CC * test ) ( const KSymAddr *sym, void *data ), void *data )
-{
-    rc_t rc;
-
-    if ( sym == NULL )
-        rc = RC ( rcFS, rcDylib, rcSelecting, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcSelf, rcNull );
-        else if ( name == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcNull );
-        else if ( name [ 0 ] == 0 )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcEmpty );
-        else if ( test == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcFunction, rcNull );
-        else
-        {
-            KDlsetTrySymData pb;
-            memset ( & pb, 0, sizeof pb );
-            pb . self = self;
-            pb . name = name;
-            pb . test = test;
-            pb . data = data;
-            pb . rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcNotFound );
-            pb . first = true;
-
-            if ( VectorDoUntil ( & self -> ord, false, KDlsetTrySymbol, & pb ) )
-            {
-                * sym = pb . sym;
-                return 0;
-            }
-
-            rc = pb . rc;
-        }
-
-        * sym = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDlsetLastSymbol ( const KDlset *self, KSymAddr **sym, const char *name,
-    bool ( CC * test ) ( const KSymAddr *sym, void *data ), void *data )
-{
-    rc_t rc;
-
-    if ( sym == NULL )
-        rc = RC ( rcFS, rcDylib, rcSelecting, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcSelf, rcNull );
-        else if ( name == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcNull );
-        else if ( name [ 0 ] == 0 )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcEmpty );
-        else if ( test == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcFunction, rcNull );
-        else
-        {
-            KDlsetTrySymData pb;
-            memset ( & pb, 0, sizeof pb );
-            pb . self = self;
-            pb . name = name;
-            pb . test = test;
-            pb . data = data;
-            pb . rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcNotFound );
-
-            VectorDoUntil ( & self -> ord, false, KDlsetTrySymbol, & pb );
-            if ( pb . sym != NULL )
-            {
-                * sym = pb . sym;
-                return 0;
-            }
-
-            rc = pb . rc;
-        }
-
-        * sym = NULL;
-    }
-
-    return rc;
-}
-
-
-/* List - PRIVATE
- *  list the paths to the libraries in the set
- */
-typedef struct list_dylib_param list_dylib_param;
-struct list_dylib_param
-{
-    VNamelist *list;
-    rc_t rc;
-};
-
-static
-bool CC list_dylib ( void *item, void *data )
-{
-    list_dylib_param *pb = data;
-    const KDylib *lib = ( const void* ) item;
-
-    /* "lib" was created with KDylibMake
-       which creates a NUL terminated path.
-       of course, this could seg-fault if bad... */
-    assert ( lib -> path . addr [ lib -> path . size ] == 0 );
-
-    pb -> rc = VNamelistAppend ( pb -> list, lib -> path . addr );
-    return pb -> rc != 0;
-}
-
-LIB_EXPORT rc_t CC KDlsetList ( const KDlset *self, KNamelist **listp )
-{
-    list_dylib_param pb;
-
-    assert ( listp != NULL );
-
-    if ( self == NULL )
-        pb . rc = RC ( rcFS, rcDylib, rcListing, rcSelf, rcNull );
-    else
-    {
-        pb . rc = VNamelistMake ( & pb . list, VectorLength ( & self -> name ) );
-        if ( pb . rc == 0 )
-        {
-            bool fail = VectorDoUntil ( & self -> name, false, list_dylib, & pb );
-            if ( ! fail )
-                pb . rc = VNamelistToNamelist ( pb . list, listp );
-
-            VNamelistRelease ( pb . list );
-        }
-    }
-
-    return pb . rc;
-}
-
-
-/* AsObj
- * AsFunc
- *  retrieve symbol address as pointer to object
- */
-LIB_EXPORT void * CC KSymAddrAsObj ( const KSymAddr *self )
-{
-    if ( self != NULL )
-        return self -> addr;
-    return NULL;
-}
-
-LIB_EXPORT void CC KSymAddrAsFunc ( const KSymAddr *self, fptr_t *fp )
-{
-    if ( self != NULL && fp != NULL )
-        * fp = ( fptr_t ) self -> addr;
-}
-
-
diff --git a/libs/kfs/unix/sysfile-priv.h b/libs/kfs/unix/sysfile-priv.h
deleted file mode 100644
index 2c175e2..0000000
--- a/libs/kfs/unix/sysfile-priv.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef USE_TIMEOUT
-#define USE_TIMEOUT false
-#endif
-
-#ifndef USE_NO_TIMEOUT_TTY
-#define USE_NO_TIMEOUT_TTY false
-#endif
-
-#ifndef _h_sysfile_priv_
-#define _h_sysfile_priv_
-
-#ifndef _h_kfs_impl_
-#include <kfs/impl.h>
-#endif
-
-#include <sys/select.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * KSysFile
- *  a Unix file
- */
-typedef struct KSysFile_v1 KSysFile_v1;
-struct KSysFile_v1
-{
-    KFile_v1 dad;
-    int fd;
-#if USE_TIMEOUT
-    fd_set fds;
-    struct timeval to;
-    bool use_to;
-#endif
-};
-
-typedef struct KSysFile_v2 KSysFile_v2;
-struct KSysFile_v2
-{
-    KFile_v2 dad;
-    int fd;
-#if USE_TIMEOUT
-    fd_set fds;
-    struct timeval to;
-    bool use_to;
-#endif
-};
-
-/* KSysFileMake
- *  create a new file object
- *  from file descriptor
- */
-rc_t KSysFileMake_v1 ( KSysFile_v1 **fp, int fd, const char *path, bool read_enabled, bool write_enabled );
-    KSysFile_v2 * KSysFileMake_v2 ( ctx_t ctx, int fd, const char *path, bool read_enabled, bool write_enabled );
-
-#define KSysFileMake NAME_VERS ( KSysFileMake, KFILE_VERS )
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_sysfile_priv_ */
diff --git a/libs/kfs/unix/sysfile-v2.c b/libs/kfs/unix/sysfile-v2.c
deleted file mode 100644
index 1e839f0..0000000
--- a/libs/kfs/unix/sysfile-v2.c
+++ /dev/null
@@ -1,1018 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KSysFile_v2;
-#define KFILE_IMPL struct KSysFile_v2
-#define KFILE_VERS 2
-
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <kfs/extern.h>
-#include "sysfile-priv.h"
-#include <kfs/kfs-priv.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <sysalloc.h>
-
-
-#ifndef __USE_UNIX98
-#define __USE_UNIX98 1
-#endif
-#include <unistd.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <assert.h>
-#include <string.h>
-
-#ifdef _DEBUGGING
-#define SYSDEBUG(msg) DBGMSG(DBG_KFS,DBG_FLAG(DBG_KFS_SYS),msg)
-#else
-#define SYSDEBUG(msg)
-#endif
-
-/*--------------------------------------------------------------------------
- * KSysFile
- *  a Unix file
- */
-
-
-#if USE_TIMEOUT
-/* default timeout amount 3 seconds is 10,000 milliseconds */
-#define TIMEOUT_MSECS (3 * 1000)
-
-int32_t KSysFileTimeout = TIMEOUT_MSECS;
-
-enum
-{
-    select_read = 1,
-    select_write = 2,
-    select_exception = 4
-} select_operations;
-
-static
-void KSysFileSelect_v2 ( const KSysFile_v2 *self, ctx_t ctx, uint32_t operations )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcSelecting );
-
-    SYSDEBUG( ( "%s: Enter (%p, %x)\n", __func__, self, operations ) );
-
-
-    if ( self -> use_to )
-    {
-        fd_set fdsread;
-        fd_set fdswrite;
-        fd_set fdsexcept;
-        struct timeval to;
-
-        fdsread = self -> fds;
-        fdswrite = self -> fds;
-        fdsexcept = self -> fds;
-
-        to = self -> to;
-
-        while ( ! FAILED () )
-        {
-            int selected;
-            SYSDEBUG ( ( "%s: call select\n", __func__ ) );
-
-            selected = select ( self -> fd + 1, 
-                               ( operations & select_read ) ? &fdsread : NULL,
-                               ( operations & select_write ) ? &fdswrite : NULL,
-                               ( operations & select_exception ) ? &fdsexcept : NULL,
-                               &to );
-            SYSDEBUG(( "%s: select returned '%d' \n", __func__, selected));
-
-            if ( selected == 0 )
-                INTERNAL_ERROR ( xcFileTimeout, "timeout while selecting file" );
-
-            else if ( selected < 0 )
-            {
-                int lerrno = errno;
-
-                switch ( lerrno )
-                {
-                case EINVAL:
-                    INTERNAL_ERROR ( xcFileTimeout, "timeout while selecting file : coding error bad timeout or negative nfds" );
-                    break;
-
-                case EBADF:
-                    INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error fd = %d", self->fd );
-                    break;
-
-                case EINTR:/*  A signal was caught. */
-                    continue;
-
-                case ENOMEM:
-                    SYSTEM_ERROR ( xcNoMemory, "out of memory setting up read timeout" );
-                    break;
-
-                default:
-                    INTERNAL_ERROR ( xcFileUnexpected, "unexpected error code: %!", lerrno );
-                }
-                /* function documentation seems to show that unless EINTR was 
-                 * set we can now do our read
-                 */
-            }
-            else
-            {
-                assert ( FD_ISSET ( self -> fd, &fdsread )  ||
-                         FD_ISSET ( self -> fd, &fdswrite ) ||
-                         FD_ISSET ( self -> fd, &fdsexcept ) );
-
-                break;
-            }
-        }
-    }
-}
-#endif
-
-
-/* Destroy
- */
-static
-void KSysFileDestroy_v2 ( KSysFile_v2 *self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcDestroying );
-
-    int lerrno;
-
-    while ( 1 )
-    {
-        if ( close ( self -> fd ) != 0 )
-        {
-            switch ( lerrno = errno )
-            {
-            case EBADF:
-                INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error fd = %d", self->fd );
-                break;
-                
-            case EINTR:
-                continue;
-                
-            default:
-                INTERNAL_ERROR ( xcFileUnexpected, "unexpected error code: %!", lerrno );
-                break;
-            }
-            
-            return;
-        }
-    }
-    
-    free ( self );
-}
-
-/* GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- */
-static
-KSysFile_v2 * KSysFileGetSysFile_v2 ( const KSysFile_v2 *self, ctx_t ctx, uint64_t *offset )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcRetrieving );
-
-    * offset = 0;
-    return ( KSysFile_v2 * ) self;
-}
-
-/* RandomAccess
- *  ALMOST by definition, the file is random access
- *  certain file types ( notably compressors ) will refuse random access
- *
- *  returns true if random access
- */
-static
-bool KSysFileRandomAccess_v2 ( const KSysFile_v2 *self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcAccessing );
-
-    struct stat st;
-
-    int lerrno;
-
-    /* "fstat" gets metadata for an open file */
-    if ( fstat ( self -> fd, & st ) != 0 )
-    {
-        switch ( lerrno = errno )
-        {
-        case EBADF:
-            INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error fd = %d", self->fd );
-            break;
-            
-        default:
-            INTERNAL_ERROR ( xcFileUnexpected, "unexpected error code: %!", lerrno );
-            break;
-        }
-
-        return false;
-    }
-
-    /* here we check if the file supports random access by asking
-       if it is a "regular" file. It's the only type we actually
-       create via open, but we can be given an fd we didn't open,
-       and it might not be a regular file. */
-    if ( ! S_ISREG ( st . st_mode ) )
-        return false;
-
-    return true;
-}
-
-
-/* Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t KSysFileType_v2 ( const KSysFile_v2 *self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcEvaluating );
-
-    struct stat st;
-
-    if ( fstat ( self -> fd, & st ) != 0 )
-        return kfdInvalid;
-
-    if ( ! S_ISREG ( st . st_mode ) )
-    {
-        if ( S_ISCHR ( st . st_mode ) )
-            return kfdCharDev;
-        if ( S_ISBLK ( st . st_mode ) )
-            return kfdBlockDev;
-        if ( S_ISFIFO ( st . st_mode ) )
-            return kfdFIFO;
-        if ( S_ISSOCK ( st . st_mode ) )
-            return kfdSocket;
-    }
-
-    return kfdFile;
-}
-
-
-/* Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-uint64_t KSysFileSize_v2 ( const KSysFile_v2 *self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcAccessing );
-
-    struct stat st;
-
-    int lerrno;
-
-    if ( fstat ( self -> fd, & st ) != 0 )
-    {
-        switch ( lerrno = errno )
-        {
-        case EBADF:
-            INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error fd = %d", self->fd );
-            break;
-            
-        default:
-            INTERNAL_ERROR ( xcFileUnexpected, "unexpected error code: %!", lerrno );
-            break;
-        }
-
-        return 0;
-    }
-
-    if ( ! S_ISREG ( st . st_mode ) )
-    {
-        // what would be the error for a non regular file
-        SYSTEM_ERROR ( xcErrorUnknown, "?" );
-        return 0;
-    }
-
-    return st . st_size;
-}
-
-/* SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-void KSysFileSetSize_v2 ( KSysFile_v2 *self, ctx_t ctx, uint64_t size )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcAccessing );
-
-    int lerrno;
-
-    if ( ftruncate ( self -> fd, size ) != 0 ) 
-        switch ( lerrno = errno )
-        {
-        case EBADF:
-            INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error fd = %d", self->fd );
-            break;
-            
-        default:
-            INTERNAL_ERROR ( xcFileUnexpected, "unexpected error code: %!", lerrno );
-            break;
-        }
-}
-
-/* Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-size_t KSysFileRead_v2 ( const KSysFile_v2 *self, ctx_t ctx,
-     uint64_t pos,void *buffer, size_t bsize )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcReading );
-
-    ssize_t count = 0;
-
-    assert ( self != NULL );
-
-    while ( 1 )
-    {
-        int lerrno;
-
-#if USE_TIMEOUT
-        ON_FAIL ( KSysFileSelect_v2 ( self, ctx, select_read | select_exception ) )
-        {
-            return 0;
-        }
-#endif
-
-        count = pread ( self -> fd, buffer, bsize, pos );
-
-        if ( count < 0 ) 
-        {
-            switch ( lerrno = errno )
-            {
-            case EINTR:
-                continue;
-
-            case EIO:
-                SYSTEM_ERROR ( xcTransferIncomplete, "system I/O error - likely broken pipe" );
-                break;
-                
-            case EBADF:
-                INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error fd = %d", self->fd );
-                break;
-                
-            case EISDIR:
-                INTERNAL_ERROR ( xcFileDescInvalid, "system misuse of a directory error");
-                break;
-                
-            case EINVAL:
-                SYSTEM_ERROR ( xcParamInvalid, "system invalid argument error");
-                break;
-
-            default:
-                INTERNAL_ERROR ( xcFileUnexpected, "unexpected error code: %!", lerrno );
-                break;
-            }
-            
-            return 0;
-        }
-
-        break;
-    }
-
-    return count;
-}
-
-/* Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- */
-static
-size_t KSysFileWrite_v2 ( KSysFile_v2 *self, ctx_t ctx, 
-      uint64_t pos, const void *buffer, size_t size )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcWriting );
-
-    ssize_t count = 0;
-
-    assert ( self != NULL );
-
-    while ( 1 )
-    {
-        int lerrno;
-
-#if USE_TIMEOUT
-        ON_FAIL ( KSysFileSelect_v2 ( self, ctx, select_read | select_exception ) )
-        {
-            return 0;
-        }
-#endif
-
-        count = pwrite ( self -> fd, buffer, size, pos );
-
-        if ( count < 0 ) 
-        {
-            switch ( lerrno = errno )
-            {
-            case ENOSPC:
-                INTERNAL_ERROR ( xcStorageExhausted, "system bad file descriptor error fd = %d", self -> fd );
-                break;
-
-            case EINTR:
-                continue;
-                
-            case EFBIG:
-                INTERNAL_ERROR ( xcFileExcessive, "system file too large error" );
-                break;
-                
-            case EIO:
-                SYSTEM_ERROR ( xcTransferIncomplete, "system I/O error - likely broken pipe" );
-                break;
-                
-            case EBADF:
-                INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error fd = %d", self->fd );
-                break;
-                
-            case EISDIR:
-                INTERNAL_ERROR ( xcFileDescInvalid, "system misuse of a directory error");
-                break;
-
-            case EINVAL:
-                SYSTEM_ERROR ( xcParamInvalid, "system invalid argument error");
-                break;
-
-            default:
-                INTERNAL_ERROR ( xcFileUnexpected, "unexpected error code: %!", lerrno );
-                break;
-            }
-
-            return 0;
-        }
-
-        break;
-    }
-
-    return count;
-}
-
-
-/* Make
- *  create a new file object
- *  from file descriptor
- */
-static KFile_vt_v2 vtKSysFile =
-{
-    /* version 2.0 */
-    2, 0,
-
-    /* start minor version 0 methods */
-    KSysFileDestroy_v2,
-    KSysFileGetSysFile_v2,
-    KSysFileRandomAccess_v2,
-    KSysFileSize_v2,
-    KSysFileSetSize_v2,
-    KSysFileRead_v2,
-    KSysFileWrite_v2,
-    KSysFileType_v2
-    /* end minor version 0 methods */
-};
-
-static
-KSysFile_v2 * KSysFileMakeVT_v2 ( ctx_t ctx, int fd, const KFile_vt *vt,
-    const char *path, bool read_enabled, bool write_enabled )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcConstructing );
-
-    KSysFile_v2 *f;
-
-    if ( fd < 0 )
-    {
-        INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error fd = %d", fd );
-        return NULL;
-    }
-
-    f = calloc ( sizeof * f, 1 );
-    if ( f == NULL )
-    {
-        SYSTEM_ERROR ( xcNoMemory, "out of memory" );
-        return NULL;
-    }
-
-#if USE_TIMEOUT
-    if ( KSysFileTimeout >= 0 )
-    {
-        f -> to.tv_sec = KSysFileTimeout / 1000;
-        f -> to.tv_usec = ( KSysFileTimeout % 1000 ) * 1000;
-        f -> use_to = true;
-        FD_ZERO ( &f -> fds );
-        FD_SET ( fd, &f -> fds );
-    }
-#endif
-
-    TRY ( KFileInit_v2 ( & f -> dad, ctx, vt, "KSysFile", path, read_enabled, write_enabled ) );
-    {
-        f -> fd = fd;
-        return f;
-    }
-
-    free ( f );
-    
-    return NULL;
-}
-
-LIB_EXPORT KSysFile_v2 * CC KSysFileMake_v2 ( ctx_t ctx, int fd, const char *path, bool read_enabled, bool write_enabled )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcConstructing );
-
-    return KSysFileMakeVT_v2 ( ctx, fd, ( const KFile_vt * ) & vtKSysFile,
-        path, read_enabled, write_enabled );
-}
-
-/*--------------------------------------------------------------------------
- * KFile
- *  Unix-specific standard i/o interfaces
- */
-
-typedef struct KStdIOFile_v2 KStdIOFile_v2;
-struct KStdIOFile_v2
-{
-    KSysFile_v2 dad;
-    uint64_t pos;
-};
-
-
-/* Destroy
- *  does not close fd
- */
-static
-void KStdIOFileDestroy_v2 ( KSysFile_v2 *self, ctx_t ctx )
-{
-    free ( self );
-}
-
-static KFile_vt_v2 vtKStdIOFile =
-{
-    /* version 1.1 */
-    2, 0,
-
-    /* start minor version 0 methods */
-    KStdIOFileDestroy_v2,
-    KSysFileGetSysFile_v2,
-    KSysFileRandomAccess_v2,
-    KSysFileSize_v2,
-    KSysFileSetSize_v2,
-    KSysFileRead_v2,
-    KSysFileWrite_v2,
-    KSysFileType_v2
-    /* end minor version 0 methods */
-};
-
-/* RandomAccess
- */
-static
-bool KStdIOFileRandomAccess_v2 ( const KSysFile_v2 *self, ctx_t ctx )
-{
-    INTERNAL_ERROR ( xcFunctionUnimplemented, "function is not supported" );
-    return false;
-}
-
-
-/* Size
- */
-static
-uint64_t KStdIOFileSize_v2 ( const KSysFile_v2 *self, ctx_t ctx )
-{
-    INTERNAL_ERROR ( xcFunctionUnimplemented, "function is not supported" );
-
-    return 0;
-}
-
-/* SetSize
- */
-static
-void KStdIOFileSetSize_v2 ( KSysFile_v2 *self, ctx_t ctx, uint64_t size )
-{
-    INTERNAL_ERROR ( xcFunctionUnimplemented, "function is not supported" );
-}
-
-/* Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-size_t KStdIOFileRead_v2 ( const KSysFile_v2 *dad, ctx_t ctx, 
-      uint64_t pos, void *buffer, size_t bsize )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcReading );
-
-    KStdIOFile_v2 *self = ( KStdIOFile_v2* ) dad;
-    ssize_t count = 0;
-
-    assert ( self != NULL );
-
-    if ( self -> pos != pos )
-        INTERNAL_ERROR ( xcParamInvalid, "system invalid argument error");
-    
-
-    while ( 1 )
-    {
-        int lerrno;
-
-#if USE_TIMEOUT
-        ON_FAIL ( KSysFileSelect_v2 ( &self->dad, ctx,  select_read | select_exception ) );
-        {
-            return 0;
-        }
-#endif
-
-        count = read ( self -> dad . fd, buffer, bsize );
-
-        if ( count < 0 ) switch ( lerrno = errno )
-        {
-        case EINTR:
-            continue;
-            
-        case EIO:
-            SYSTEM_ERROR ( xcTransferIncomplete, "system I/O error - likely broken pipe" );
-            break;
-            
-        case EBADF:
-            INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error fd = %d", self -> dad . fd );
-            break;
-            
-        case EISDIR:
-            INTERNAL_ERROR ( xcFileDescInvalid, "system misuse of a directory error");
-            break;
-            
-        case EINVAL:
-            SYSTEM_ERROR ( xcParamInvalid, "system invalid argument error");
-            break;
-            
-        default:
-            INTERNAL_ERROR ( xcFileUnexpected, "unexpected error code: %!", lerrno );
-            break;
-        }
-
-        self -> pos += count;
-        break;
-    }
-
-    return count;
-}
-
-/* Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- */
-static
-size_t KStdIOFileWrite_v2 ( KSysFile_v2 *dad, ctx_t ctx, 
-      uint64_t pos, const void *buffer, size_t size )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcWriting );
-
-    KStdIOFile_v2 *self = ( KStdIOFile_v2* ) dad;
-    ssize_t count = 0
-;
-    assert ( self != NULL );
-
-    if ( self -> pos != pos )
-        INTERNAL_ERROR ( xcParamInvalid, "system invalid argument error");
-
-    while ( 1 )
-    {
-        int lerrno;
-
-#if USE_TIMEOUT
-        ON_FAIL ( KSysFileSelect_v1 ( &self -> dad, select_read | select_exception ) );
-        {
-            return 0;
-        }
-#endif
-
-        count = write ( self -> dad . fd, buffer, size );
-
-        if ( count < 0 ) 
-        {
-            switch ( lerrno = errno )
-            {
-            case ENOSPC:
-                INTERNAL_ERROR ( xcStorageExhausted, "system bad file descriptor error fd = %d", self -> dad . fd );
-                break;
-                
-            case EINTR:
-                continue;
-                
-            case EFBIG:
-                INTERNAL_ERROR ( xcFileExcessive, "system file too large error" );
-                break;
-                
-            case EIO:
-                SYSTEM_ERROR ( xcTransferIncomplete, "system I/O error - likely broken pipe" );
-                break;
-                
-            case EBADF:
-                INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error fd = %d", self -> dad . fd );
-                break;
-                
-            case EISDIR:
-                INTERNAL_ERROR ( xcFileDescInvalid, "system misuse of a directory error");
-                break;
-                
-            case EINVAL:
-                SYSTEM_ERROR ( xcParamInvalid, "system invalid argument error");
-                break;
-                
-            default:
-                INTERNAL_ERROR ( xcFileUnexpected, "unexpected error code: %!", lerrno );
-                break;
-            }
-
-            return 0;
-        }
-
-        self -> pos += count;
-        break;
-    }
-
-    return count;
-}
-
-static KFile_vt_v2 vtKStdIOStream =
-{
-    /* version 1.1 */
-    2, 0,
-
-    /* start minor version 0 methods */
-    KStdIOFileDestroy_v2,
-    KSysFileGetSysFile_v2,
-    KStdIOFileRandomAccess_v2,
-    KStdIOFileSize_v2,
-    KStdIOFileSetSize_v2,
-    KStdIOFileRead_v2,
-    KStdIOFileWrite_v2,
-    KSysFileType_v2
-    /* end minor version 0 methods */
-};
-
-static
-void KStdIOFileTest_v2 ( ctx_t ctx, int fd, bool *seekable, bool *readable, bool *writable )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcCreating );
-
-    int lerrno;
-    struct stat st;
-
-    if ( fstat ( fd, & st ) == 0 )
-    {
-        int fl;
-
-        if ( S_ISREG ( st . st_mode ) )
-            * seekable = true;
-        else
-            * seekable = false;
-
-        fl = fcntl ( fd, F_GETFL ) & O_ACCMODE;
-        switch ( fl )
-        {
-        case O_RDONLY:
-            * readable = true;
-            * writable = false;
-            break;
-        case O_WRONLY:
-            * readable = false;
-            * writable = true;
-            break;
-        case O_RDWR:
-            * readable = true;
-            * writable = true;
-            break;
-        }
-    }
-    else switch ( lerrno = errno )
-    {
-    case EBADF:
-        USER_ERROR ( xcFileDescInvalid, "bad file descriptor error fd = %d", fd );
-        break;
-    default:
-        USER_ERROR ( xcErrorUnknown, "unexpected error code: %!", lerrno );
-        break;
-    }
-}
-
-static
-KFile_v2 * KStdIOFileMake_v2 ( ctx_t ctx, int fd, bool seekable, bool read_enabled, bool write_enabled )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcConstructing );
-
-
-    if ( seekable )
-    {
-        /* a seekable fd means it can be treated like a normal file */
-
-        // !!! not sure if the cast is correct, or if the function needs to return a different type
-        return ( KFile_v2 * ) KSysFileMakeVT_v2 ( ctx, fd, ( const KFile_vt * ) & vtKStdIOFile,
-            "stdio-file", read_enabled, write_enabled );
-    }
-
-    if ( fd < 0 )
-        USER_ERROR ( xcFileDescInvalid, "bad file descriptor error fd = %d", fd );
-    else
-    {
-        KStdIOFile_v2 *f;
-        /* create a streamable version */
-        f = calloc ( sizeof *f, 1 );
-        if ( f == NULL )
-            SYSTEM_ERROR ( xcNoMemory, "out of memory" );
-        else
-        {
-#if USE_TIMEOUT
-            if ( ( KSysFileTimeout >= 0 )
-#if USE_NO_TIMEOUT_TTY
-                 && ( ! isatty ( fd ) )
-#endif
-                )
-            {
-                KSysFile_v2 *ff = &f -> dad;
-                
-                ff -> to.tv_sec = KSysFileTimeout / 1000;
-                ff -> to.tv_usec = ( KSysFileTimeout % 1000 ) * 1000;
-                ff -> use_to = true;
-                FD_ZERO ( &ff -> fds );
-                FD_SET ( fd, &ff -> fds );
-            }
-#endif
-            TRY ( KFileInit_v2 ( &f -> dad . dad, ctx, ( const KFile_vt * ) &vtKStdIOStream,
-                                "KStdIOFile", "fd", read_enabled, write_enabled ) )
-            {
-                f -> dad . fd = fd;
-                f -> pos = 0;
-                return & f -> dad . dad;
-            }
-
-            free ( f );
-        }
-    }
-    return NULL;
-}
-
-/* MakeStdIn
- *  creates a read-only file on stdin
- */
-LIB_EXPORT const KFile_v2 * CC KFileMakeStdIn_v2 ( ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcConstructing );
-
-    bool seekable, readable, writable;
-
-    TRY ( KStdIOFileTest_v2 ( ctx, 0, & seekable, & readable, & writable ) )
-    {
-        if ( ! readable )
-            USER_ERROR ( xcFileWriteOnly, "file descriptor 0 is write only!" );
-        else
-            return KStdIOFileMake_v2 ( ctx, 0, seekable, true, false );
-    }
-
-    return NULL;
-
-#if 0
-    TRY ( KStdIOFileTest_v2 ( ctx, 0, & seekable, & readable, & writable ) )
-    {
-        if ( ! readable )
-            USER_ERROR ( xcFileWriteOnly, "file descriptor 0 is write only!" );
-        
-        return KStdIOFileMake_v2 ( 0, seekable, true, false );
-    }
-
-    return NULL;
-#endif
-}
-
-/* MakeStdOut
- * MakeStdErr
- *  creates a write-only file on stdout or stderr
- */
-LIB_EXPORT const KFile_v2 * CC KFileMakeStdOut_v2 ( ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcConstructing );
-
-    bool seekable, readable, writable;
-
-    TRY ( KStdIOFileTest_v2 ( ctx, 1, & seekable, & readable, & writable ) )
-    {
-        if ( ! writable ) // !!! Should this return NULL here or is it ok to continue?
-            USER_ERROR ( xcFileReadOnly, "file descriptor 1 is read only!" );
-
-        return KStdIOFileMake_v2 ( ctx, 1, seekable, false, true );
-    }
-
-    return NULL;
-}
-
-LIB_EXPORT const KFile_v2 * CC KFileMakeStdErr_v2 ( ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcConstructing );
-
-    bool seekable, readable, writable;
-
-    TRY ( KStdIOFileTest_v2 ( ctx, 2, & seekable, & readable, & writable ) )
-    {
-        if ( ! writable )
-            USER_ERROR ( xcFileReadOnly, "file descriptor 2 is read only!" );
-
-        return KStdIOFileMake_v2 ( ctx, 2, seekable, false, true );
-    } 
-
-    return NULL;
-}
-
-/* MakeFDFile
- *  creates a file from a file-descriptor
- *  not supported under Windows
- */
-LIB_EXPORT const KFile_v2 * CC KFileMakeFDFileRead_v2 ( ctx_t ctx, int fd )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcConstructing );
-
-    bool seekable, readable, writable;
-
-    TRY ( KStdIOFileTest_v2 ( ctx, fd, & seekable, & readable, & writable ) )
-    {
-        if ( ! readable )
-            USER_ERROR ( xcFileWriteOnly, "file descriptor is write only!" );
-
-        return KStdIOFileMake_v2 ( ctx, fd, seekable, true, false );
-    }
-
-    return NULL;
-}
-
-LIB_EXPORT  KFile_v2 * CC KFileMakeFDFileWrite_v2 ( ctx_t ctx, bool update, int fd )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcConstructing );
-
-    bool seekable, readable, writable;
-
-    TRY ( KStdIOFileTest_v2 ( ctx, fd, & seekable, & readable, & writable ) )
-    {
-        if ( update && ! readable )
-            USER_ERROR ( xcFileWriteOnly, "file descriptor is write only!" );
-        if ( ! writable )
-            USER_ERROR ( xcFileReadOnly, "file descriptor 2 is read only!" );
-
-        return KStdIOFileMake_v2 ( ctx, fd, seekable, update, true );
-    }
-
-    return NULL;
-}
diff --git a/libs/kfs/unix/sysfile.c b/libs/kfs/unix/sysfile.c
deleted file mode 100644
index ace186d..0000000
--- a/libs/kfs/unix/sysfile.c
+++ /dev/null
@@ -1,1079 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KSysFile_v1;
-#define KFILE_IMPL struct KSysFile_v1
-
-#include <kfs/extern.h>
-#include "sysfile-priv.h"
-#include <kfs/kfs-priv.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <sysalloc.h>
-
-
-#ifndef __USE_UNIX98
-#define __USE_UNIX98 1
-#endif
-#include <unistd.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <assert.h>
-#include <string.h>
-
-#ifdef _DEBUGGING
-#define SYSDEBUG(msg) DBGMSG(DBG_KFS,DBG_FLAG(DBG_KFS_SYS),msg)
-#define POS_DEBUG(msg) DBGMSG(DBG_KFS,DBG_FLAG(DBG_KFS_POS),msg)
-#else
-#define SYSDEBUG(msg)
-#define POS_DEBUG(msg)
-#endif
-
-/*--------------------------------------------------------------------------
- * KSysFile
- *  a Unix file
- */
-
-
-#if USE_TIMEOUT
-/* default timeout amount 3 seconds is 10,000 milliseconds */
-#define TIMEOUT_MSECS (3 * 1000)
-
-int32_t KSysFileTimeout = TIMEOUT_MSECS;
-
-enum
-{
-    select_read = 1,
-    select_write = 2,
-    select_exception = 4
-} select_operations;
-
-static
-rc_t KSysFileSelect_v1 (const KSysFile_v1* self, uint32_t operations)
-{
-    rc_t rc = 0;
-
-    SYSDEBUG(( "%s: Enter (%p, %x)\n", __func__, self, operations));
-
-
-    if (self->use_to)
-    {
-        fd_set fdsread;
-        fd_set fdswrite;
-        fd_set fdsexcept;
-        struct timeval to;
-        int selected;
-
-        fdsread = self->fds;
-        fdswrite = self->fds;
-        fdsexcept = self->fds;
-
-        to = self->to;
-
-        for (rc = 0; rc == 0; ) 
-        {
-            SYSDEBUG(( "%s: call select\n", __func__));
-
-            selected = select (self->fd + 1, 
-                               (operations & select_read) ? &fdsread : NULL,
-                               (operations & select_write) ? &fdswrite : NULL,
-                               (operations & select_exception) ? &fdsexcept : NULL,
-                               &to);
-            SYSDEBUG(( "%s: select returned '%d' \n", __func__, selected));
-
-            if (selected == 0)
-            {
-
-                rc = RC (rcFS, rcFile, rcSelecting, rcTimeout, rcDone);
-            }
-            else if (selected < 0)
-            {
-                int lerrno = errno;
-
-                switch (lerrno)
-                {
-                case EINVAL:
-                    rc = RC (rcFS, rcFile, rcSelecting, rcTimeout, rcInvalid);
-                    LOGERR (klogInt, rc, "coding error bad timeout or negative nfds");
-                    break;
-
-                case EBADF:
-                    rc = RC ( rcFS, rcFile, rcSelecting, rcFileDesc, rcInvalid );
-                    PLOGERR (klogErr,
-                             (klogErr, rc, "system bad file descriptor error fd='$(E)'",
-                              "E=%d", self->fd));
-                    break;
-
-                case EINTR:/*  A signal was caught. */
-                    continue;
-
-                case ENOMEM:
-                    rc = RC (rcFS, rcFile, rcSelecting, rcMemory, rcExhausted);
-                    LOGERR (klogErr, rc, "out of memory setting up read timeout");
-                    break;
-                }
-                /* function documentation seems to show that unless EINTR was 
-                 * set we can now do our read
-                 */
-            }
-            else
-            {
-                assert (FD_ISSET (self->fd, &fdsread) ||
-                        FD_ISSET (self->fd, &fdswrite) ||
-                        FD_ISSET (self->fd, &fdsexcept));
-
-                return 0;
-            }
-        }
-    }
-    return rc;
-}
-#endif
-
-
-/* Destroy
- */
-static
-rc_t KSysFileDestroy_v1 ( KSysFile_v1 *self )
-{
-    rc_t rc = 0;
-    int lerrno;
-
-    if ( close ( self -> fd ) != 0 ) switch ( lerrno = errno )
-    {
-    case EBADF:
-        rc = RC ( rcFS, rcFile, rcDestroying, rcFunction, rcIncomplete );
-        PLOGERR (klogInt,
-                 (klogInt, rc, "system bad file descriptor error '$(F)'",
-                  "F=%d", self->fd));
-        break;
-
-    case EINTR:
-        rc = RC ( rcFS, rcFile, rcDestroying, rcFunction, rcIncomplete );
-        LOGERR (klogErr, rc, "system interrupted function error");
-        return rc;
-
-    default:
-        rc = RC ( rcFS, rcFile, rcDestroying, rcNoObj, rcUnknown );
-        PLOGERR (klogErr,
-                 (klogErr, rc, "unknown system error '$(S)($(E))'",
-                 "S=%!,E=%d", lerrno, lerrno));
-        return rc;
-    }
-
-    free ( self );
-    return 0;
-}
-
-/* GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- */
-static
-KSysFile_v1 * KSysFileGetSysFile_v1 ( const KSysFile_v1 *self, uint64_t *offset )
-{
-    * offset = 0;
-    return ( KSysFile_v1 * ) self;
-}
-
-/* RandomAccess
- *  ALMOST by definition, the file is random access
- *  certain file types ( notably compressors ) will refuse random access
- *
- *  returns 0 if random access, error code otherwise
- */
-static
-rc_t KSysFileRandomAccess_v1 ( const KSysFile_v1 *self )
-{
-    struct stat st;
-    rc_t rc = 0;
-    int lerrno;
-    if ( fstat ( self -> fd, & st ) != 0 ) switch ( lerrno = errno )
-    {
-    case EBADF:
-        rc = RC ( rcFS, rcFile, rcAccessing, rcFileDesc, rcInvalid );
-        PLOGERR (klogErr,
-                 (klogErr, rc, "system bad file descriptor error fd='$(F)'",
-                  "F=%d", self->fd));
-        return rc;
-
-    default:
-        rc = RC ( rcFS, rcFile, rcAccessing, rcNoObj, rcUnknown );
-        PLOGERR (klogErr,
-                 (klogErr, rc, "unknown system error '$(F)($(E))'",
-                  "F=%!,E=%d", lerrno, lerrno));
-        return rc;
-    }
-
-    if ( ! S_ISREG ( st . st_mode ) )
-    {
-        rc = RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported );
-        /* not a deadly error so don't log now         
-        LOGERR (klogErr, (klogErr, rc, ""));
-        */
-        return rc;
-    }
-    return 0;
-}
-
-
-/* Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t KSysFileType_v1 ( const KSysFile_v1 *self )
-{
-    struct stat st;
-
-    if ( fstat ( self -> fd, & st ) != 0 )
-        return kfdInvalid;
-
-    if ( ! S_ISREG ( st . st_mode ) )
-    {
-        if ( S_ISCHR ( st . st_mode ) )
-            return kfdCharDev;
-        if ( S_ISBLK ( st . st_mode ) )
-            return kfdBlockDev;
-        if ( S_ISFIFO ( st . st_mode ) )
-            return kfdFIFO;
-        if ( S_ISSOCK ( st . st_mode ) )
-            return kfdSocket;
-    }
-
-    return kfdFile;
-}
-
-
-/* Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t KSysFileSize_v1 ( const KSysFile_v1 *self, uint64_t *size )
-{
-    struct stat st;
-    rc_t rc = 0;
-    int lerrno;
-
-    if ( fstat ( self -> fd, & st ) != 0 ) switch ( lerrno = errno )
-    {
-    case EBADF:
-        rc = RC ( rcFS, rcFile, rcAccessing, rcFileDesc, rcInvalid );
-        PLOGERR (klogInt,
-                 (klogInt, rc, "system bad file descriptor error fd='$(F)'",
-                  "F=%d", self->fd));
-        return rc;
-    default:
-        rc = RC ( rcFS, rcFile, rcAccessing, rcNoObj, rcUnknown );
-        PLOGERR (klogErr,
-                 (klogErr, rc, "unknown system error '$(F)($(E))'",
-                  "F=%!,E=%d", lerrno, lerrno));
-        return rc;
-    }
-
-    if ( S_ISDIR ( st . st_mode ) )
-/*         return RC ( rcFS, rcFile, rcAccessing, rcFileDesc, rcIncorrect ); */
-        return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported );
-
-    * size = st . st_size;
-
-    return 0;
-}
-
-/* SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t KSysFileSetSize_v1 ( KSysFile_v1 *self, uint64_t size )
-{
-    rc_t rc;
-    int lerrno;
-
-    if ( ftruncate ( self -> fd, size ) != 0 ) switch ( lerrno = errno )
-    {
-    case EBADF:
-        rc = RC ( rcFS, rcFile, rcUpdating, rcFileDesc, rcInvalid );
-        PLOGERR (klogInt,
-                (klogInt, rc, "system bad file descriptor error fd='$(E)'",
-                 "E=%d", self->fd));
-        return rc;
-    default:
-        rc = RC ( rcFS, rcFile, rcUpdating, rcNoObj, rcUnknown );
-        PLOGERR (klogErr,
-                 (klogErr, rc, "unknown system error '$(S)($(E))'",
-                  "S=%!,E=%d", lerrno, lerrno));
-        return rc;
-    }
-
-    return 0;
-}
-
-/* Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-rc_t KSysFileRead_v1 ( const KSysFile_v1 *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc;
-
-    assert ( self != NULL );
-    assert (num_read != NULL);
-
-    *num_read = 0;
-
-    while ( 1 )
-    {
-        ssize_t count;
-        int lerrno;
-
-#if USE_TIMEOUT
-        rc = KSysFileSelect_v1 ( self, select_read | select_exception );
-        if (rc)
-            return rc;
-#endif
-
-#ifdef _DEBUGGING
-        {
-            POS_DEBUG( ( "%s,%lu,%lu\n", KDbgGetColName(), pos, bsize ) );
-        }
-#endif
-
-        count = pread ( self -> fd, buffer, bsize, pos );
-
-        if ( count < 0 ) switch ( lerrno = errno )
-        {
-        case EINTR:
-            continue;
-        case EIO:
-            rc = RC ( rcFS, rcFile, rcReading, rcTransfer, rcUnknown );
-            LOGERR (klogErr, rc, "system I/O error - likely broken pipe");
-            return rc;
-
-        case EBADF:
-            rc = RC ( rcFS, rcFile, rcReading, rcFileDesc, rcInvalid );
-            PLOGERR (klogErr,
-                     (klogErr, rc, "system bad file descriptor error fd='$(E)'",
-                      "E=%d", self->fd));
-            return rc;
-
-        case EISDIR:
-            rc = RC ( rcFS, rcFile, rcReading, rcFileDesc, rcIncorrect );
-            LOGERR (klogErr, rc, "system misuse of a directory error");
-            return rc;
-
-        case EINVAL:
-            rc = RC ( rcFS, rcFile, rcReading, rcParam, rcInvalid );
-            LOGERR (klogErr, rc, "system invalid argument error");
-            return rc;
-
-        default:
-            rc = RC ( rcFS, rcFile, rcReading, rcNoObj, rcUnknown );
-            PLOGERR (klogErr,
-                     (klogErr, rc, "unknown system error '$(S)($(E))'",
-                      "S=%!,E=%d", lerrno, lerrno));
-            return rc;
-        }
-
-        assert ( num_read != NULL );
-        * num_read = count;
-        break;
-    }
-
-    return 0;
-}
-
-/* Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- */
-static
-rc_t KSysFileWrite_v1 ( KSysFile_v1 *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ)
-{
-    assert ( self != NULL );
-    while ( 1 )
-    {
-        rc_t rc;
-        int lerrno;
-        ssize_t count;
-
-#if USE_TIMEOUT
-        rc = KSysFileSelect_v1 (self, select_write | select_exception);
-        if (rc)
-            return rc;
-#endif
-
-        count = pwrite ( self -> fd, buffer, size, pos );
-
-        if ( count < 0 ) switch ( lerrno = errno )
-        {
-        case ENOSPC:
-            rc = RC ( rcFS, rcFile, rcWriting, rcStorage, rcExhausted );
-            PLOGERR (klogErr,
-                     (klogErr, rc, "system bad file descriptor error fd='$(E)'",
-                      "E=%d", self->fd));
-            return rc;
-
-        case EINTR:
-            continue;
-
-        case EFBIG:
-            rc = RC ( rcFS, rcFile, rcWriting, rcFile, rcExcessive );
-            LOGERR (klogErr, rc, "system file too large error");
-            return rc;
-
-        case EIO:
-            rc = RC ( rcFS, rcFile, rcWriting, rcTransfer, rcUnknown );
-            LOGERR (klogErr, rc, "system I/O error");
-            return rc;
-
-        case EBADF:
-            rc = RC ( rcFS, rcFile, rcWriting, rcFileDesc, rcInvalid );
-            PLOGERR (klogErr,
-                     (klogErr, rc, "system bad file descriptor error fd='$(E)'",
-                      "E=%d", self->fd));
-            return rc;
-
-        case EISDIR:
-            rc = RC ( rcFS, rcFile, rcWriting, rcFileDesc, rcIncorrect );
-            LOGERR (klogErr, rc, "system misuse of a directory error");
-            return rc;
-
-        case EINVAL:
-            rc = RC ( rcFS, rcFile, rcWriting, rcParam, rcInvalid );
-            LOGERR (klogErr, rc, "system invalid argument error");
-            return rc;
-
-        default:
-            rc = RC ( rcFS, rcFile, rcWriting, rcNoObj, rcUnknown );
-            PLOGERR (klogErr,
-                     (klogErr, rc, "unknown system error errno='$(S)($(E))'",
-                      "S=%!,E=%d", lerrno, lerrno));
-            return rc;
-        }
-
-        assert ( num_writ != NULL );
-        * num_writ = count;
-        break;
-    }
-
-    return 0;
-}
-
-
-/* Make
- *  create a new file object
- *  from file descriptor
- */
-static KFile_vt_v1 vtKSysFile =
-{
-    /* version 1.1 */
-    1, 1,
-
-    /* start minor version 0 methods */
-    KSysFileDestroy_v1,
-    KSysFileGetSysFile_v1,
-    KSysFileRandomAccess_v1,
-    KSysFileSize_v1,
-    KSysFileSetSize_v1,
-    KSysFileRead_v1,
-    KSysFileWrite_v1,
-    /* end minor version 0 methods */
-
-    /* start minor version == 1 */
-    KSysFileType_v1
-    /* end minor version == 1 */
-};
-
-static
-rc_t KSysFileMakeVT ( KSysFile_v1 **fp, int fd, const KFile_vt *vt,
-    const char *path, bool read_enabled, bool write_enabled )
-{
-    rc_t rc;
-    KSysFile_v1 *f;
-
-    if ( fd < 0 )
-    {
-        rc = RC ( rcFS, rcFile, rcConstructing, rcFileDesc, rcInvalid );
-        PLOGERR (klogInt,
-                 (klogInt, rc, "invalid file descriptor $(F)",
-                  "F=%d", fd));
-        return rc;
-    }
-
-    f = calloc ( sizeof * f, 1 );
-    if ( f == NULL )
-    {
-        rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-        LOGERR (klogErr, rc, "out of memory");
-        return rc;
-    }
-    else
-    {
-#if USE_TIMEOUT
-        if (KSysFileTimeout >= 0)
-        {
-            f->to.tv_sec = KSysFileTimeout / 1000;
-            f->to.tv_usec = (KSysFileTimeout % 1000) * 1000;
-            f->use_to = true;
-            FD_ZERO (&f->fds);
-            FD_SET (fd, &f->fds);
-        }
-#endif
-
-        rc = KFileInit_v1( & f -> dad, vt, "KSysFile", path, read_enabled, write_enabled );
-        if ( rc == 0 )
-        {
-            f -> fd = fd;
-            * fp = f;
-            return 0;
-        }
-
-        free ( f );
-    }
-    return rc;
-}
-
-/*--------------------------------------------------------------------------
- * KFile
- *  Unix-specific standard i/o interfaces
- */
-
-typedef struct KStdIOFile KStdIOFile;
-struct KStdIOFile
-{
-    KSysFile_v1 dad;
-    uint64_t pos;
-};
-
-
-/* Destroy
- *  does not close fd
- */
-static
-rc_t KStdIOFileDestroy ( KSysFile_v1*self )
-{
-    free ( self );
-    return 0;
-}
-
-static KFile_vt_v1 vtKStdIOFile =
-{
-    /* version 1.1 */
-    1, 1,
-
-    /* start minor version 0 methods */
-    KStdIOFileDestroy,
-    KSysFileGetSysFile_v1,
-    KSysFileRandomAccess_v1,
-    KSysFileSize_v1,
-    KSysFileSetSize_v1,
-    KSysFileRead_v1,
-    KSysFileWrite_v1,
-    /* end minor version 0 methods */
-
-    /* start minor version == 1 */
-    KSysFileType_v1
-    /* end minor version == 1 */
-};
-
-/* RandomAccess
- */
-static
-rc_t KStdIOFileRandomAccess ( const KSysFile_v1 *self )
-{
-/*     return RC ( rcFS, rcFile, rcAccessing, rcFileDesc, rcIncorrect ); */
-    return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported );
-}
-
-
-/* Size
- */
-static
-rc_t KStdIOFileSize ( const KSysFile_v1 *self, uint64_t *size )
-{
-    * size = 0;
-
-/*     return RC ( rcFS, rcFile, rcAccessing, rcFileDesc, rcIncorrect ); */
-    return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported );
-}
-
-/* SetSize
- */
-static
-rc_t KStdIOFileSetSize ( KSysFile_v1 *self, uint64_t size )
-{
-/*     return RC ( rcFS, rcFile, rcUpdating, rcFileDesc, rcIncorrect ); */
-    return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported );
-}
-
-/* Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-rc_t KStdIOFileRead ( const KSysFile_v1 *dad, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc;
-
-    KStdIOFile *self = ( KStdIOFile* ) dad;
-    assert ( self != NULL );
-
-    if ( self -> pos != pos )
-    {
-        rc = RC ( rcFS, rcFile, rcReading, rcParam, rcInvalid );
-        PLOGERR (klogErr,
-                 (klogErr, rc, "Bad position for STDIO read $(P) instead of $(O)",
-                  "P=%lu,O=%lu", pos, self->pos));
-        return rc;
-    }
-
-    while ( 1 )
-    {
-        ssize_t count;
-        int lerrno;
-
-#if USE_TIMEOUT
-        rc = KSysFileSelect_v1 (&self->dad, select_read | select_exception);
-        if (rc)
-            return rc;
-#endif
-
-        count = read ( self -> dad . fd, buffer, bsize );
-
-        if ( count < 0 ) switch ( lerrno = errno )
-        {
-        case EINTR:
-            continue;
-
-        case EIO:
-            rc = RC ( rcFS, rcFile, rcReading, rcTransfer, rcUnknown );
-            LOGERR (klogErr, rc, "system I/O error - broken pipe");
-            return rc;
-
-        case EBADF:
-            rc = RC ( rcFS, rcFile, rcReading, rcFileDesc, rcInvalid );
-            PLOGERR (klogInt,
-                     (klogInt, rc, "system bad file descriptor fd='$(E)'",
-                      "E=%d", self->dad.fd));
-            return rc;
-
-        case EISDIR:
-            rc = RC ( rcFS, rcFile, rcReading, rcFileDesc, rcIncorrect );
-            LOGERR (klogInt, rc, "system misuse of a directory error");
-            return rc;
-
-        case EINVAL:
-            rc = RC ( rcFS, rcFile, rcReading, rcParam, rcInvalid );
-            LOGERR (klogErr, rc, "system invalid argument error");
-            return rc;
-
-        default:
-            rc = RC ( rcFS, rcFile, rcReading, rcNoObj, rcUnknown );
-            PLOGERR (klogErr,
-                     (klogErr, rc, "unknown system error '$(S)($(E))'",
-                      "S=%!,E=%d", lerrno, lerrno));
-            return rc;
-        }
-
-        assert ( num_read != NULL );
-        * num_read = count;
-        self -> pos += count;
-        break;
-    }
-
-    return 0;
-}
-
-/* Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- */
-static
-rc_t KStdIOFileWrite ( KSysFile_v1 *dad, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ)
-{
-    rc_t rc;
-    KStdIOFile *self = ( KStdIOFile* ) dad;
-    assert ( self != NULL );
-
-    if ( self -> pos != pos )
-    {
-        rc = RC ( rcFS, rcFile, rcWriting, rcParam, rcInvalid );
-        PLOGERR (klogErr,
-                 (klogErr, rc, "Bad position for STDIO write $(P) instead of $(O)",
-                  "P=%lu,O=%lu", pos, self->pos));
-        return rc;
-    }
-
-    while ( 1 )
-    {
-        int lerrno;
-        ssize_t count;
-
-#if USE_TIMEOUT
-        rc = KSysFileSelect_v1 ( &self->dad, select_read | select_exception);
-        if (rc)
-            return rc;
-#endif
-
-        count = write ( self -> dad . fd, buffer, size );
-
-        if ( count < 0 ) switch ( lerrno = errno )
-        {
-        case ENOSPC:
-            rc = RC ( rcFS, rcFile, rcWriting, rcStorage, rcExhausted );
-            LOGERR (klogErr, rc, "system device full error");
-            return rc;
-
-        case EINTR:
-            continue;
-
-        case EFBIG:
-            rc = RC ( rcFS, rcFile, rcWriting, rcFile, rcExcessive );
-            LOGERR (klogErr, rc, "system file too big error");
-            return rc;
-
-        case EIO:
-            rc = RC ( rcFS, rcFile, rcWriting, rcTransfer, rcUnknown );
-            LOGERR (klogErr, rc, "system I/O error - broken pipe");
-            return rc;
-            
-        case EBADF:
-            rc = RC ( rcFS, rcFile, rcWriting, rcFileDesc, rcInvalid );
-            PLOGERR (klogInt,
-                     (klogInt, rc, "system bad file descriptor error fd=$(F)",
-                      "F=%d", lerrno, self->dad.fd));
-            return rc;
-
-        case EINVAL:
-            rc = RC ( rcFS, rcFile, rcWriting, rcParam, rcInvalid );
-            LOGERR (klogInt, rc, "system invalid argument error");
-            return rc;
-
-        default:
-            rc = RC ( rcFS, rcFile, rcWriting, rcNoObj, rcUnknown );
-            PLOGERR (klogErr,
-                     (klogErr, rc, "unknown system error '$(S)($(E))'",
-                      "S=%!,E=%d", lerrno, lerrno));
-            return rc;
-        }
-
-        assert ( num_writ != NULL );
-        * num_writ = count;
-        self -> pos += count;
-        break;
-    }
-
-    return 0;
-}
-
-static KFile_vt_v1 vtKStdIOStream =
-{
-    /* version 1.1 */
-    1, 1,
-
-    /* start minor version 0 methods */
-    KStdIOFileDestroy,
-    KSysFileGetSysFile_v1,
-    KStdIOFileRandomAccess,
-    KStdIOFileSize,
-    KStdIOFileSetSize,
-    KStdIOFileRead,
-    KStdIOFileWrite,
-    /* end minor version 0 methods */
-
-    /* start minor version == 1 */
-    KSysFileType_v1
-    /* end minor version == 1 */
-};
-
-static
-rc_t KStdIOFileTest ( KFile_v1 **rp, int fd, bool *seekable, bool *readable, bool *writable )
-{
-    struct stat st;
-    int lerrno;
-    rc_t rc = 0;
-
-    if ( rp == NULL )
-        return RC ( rcFS, rcFile, rcCreating, rcParam, rcNull );
-
-    * rp = NULL;
-
-    if ( fstat ( fd, & st ) == 0 )
-    {
-        int fl;
-
-        if ( S_ISREG ( st . st_mode ) )
-            * seekable = true;
-        else
-            * seekable = false;
-
-        fl = fcntl ( fd, F_GETFL ) & O_ACCMODE;
-        switch (fl)
-        {
-        case O_RDONLY:
-            *readable = true;
-            *writable = false;
-            break;
-        case O_WRONLY:
-            *readable = false;
-            *writable = true;
-            break;
-        case O_RDWR:
-            *readable = true;
-            *writable = true;
-            break;
-        }
-    }
-    else switch (lerrno = errno)
-    {
-    case EBADF:
-        rc = RC ( rcFS, rcFile, rcCreating, rcFileDesc, rcInvalid );
-        PLOGERR (klogErr,
-                 (klogErr, rc, "system error bad file descriptor '$(F)'",
-                  "F=%d", fd));
-        break;
-    default:
-        rc = RC ( rcFS, rcFile, rcCreating, rcNoObj, rcUnknown );
-        PLOGERR (klogErr,
-                 (klogErr, rc, "unknown system error '$(F) ($(E))'",
-                  "F=%!,E=%d", lerrno, lerrno));
-        break;
-    }
-
-    return rc;
-}
-
-static
-rc_t KStdIOFileMake ( KFile_v1 **fp, int fd,
-    bool seekable, bool read_enabled, bool write_enabled )
-{
-    rc_t rc;
-    KStdIOFile *f;
-
-    if ( seekable )
-    {
-        return KSysFileMakeVT ( ( KSysFile_v1 ** ) fp, fd,
-            ( const KFile_vt * ) & vtKStdIOFile, "stdio-file", read_enabled, write_enabled );
-    }
-
-    if ( fd < 0 )
-    {
-        rc = RC ( rcFS, rcFile, rcConstructing, rcFileDesc, rcInvalid );
-        PLOGERR (klogInt,
-                 (klogInt, rc, "invalid file descriptor $(F)",
-                  "F=%d", fd));
-        return rc;
-    }
-    else
-    {
-        f = calloc ( sizeof *f, 1 );
-        if ( f == NULL )
-        {
-            rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-            LOGERR (klogErr, rc, "out of memory");
-        }
-        else
-        {
-#if USE_TIMEOUT
-            if ((KSysFileTimeout >= 0)
-#if USE_NO_TIMEOUT_TTY
-                && (! isatty (fd)
-#endif
-                    )
-            {
-                KSysFile_v1 *ff = &f->dad;
-
-                ff->to.tv_sec = KSysFileTimeout / 1000;
-                ff->to.tv_usec = (KSysFileTimeout % 1000) * 1000;
-                ff->use_to = true;
-                FD_ZERO (&ff->fds);
-                FD_SET (fd, &ff->fds);
-            }
-#endif
-            rc = KFileInit_v1 ( &f->dad.dad, ( const KFile_vt * ) &vtKStdIOStream,
-                             "KStdIOFile", "fd", read_enabled, write_enabled );
-            if ( rc == 0 )
-            {
-                f -> dad . fd = fd;
-                f -> pos = 0;
-                * fp = & f -> dad . dad;
-                return 0;
-            }
-
-            free ( f );
-        }
-    }
-    return rc;
-}
-
-/* MakeStdIn
- *  creates a read-only file on stdin
- */
-LIB_EXPORT rc_t CC KFileMakeStdIn ( const KFile_v1 **std_in )
-{
-    bool seekable;
-    bool readable;
-    bool writable;
-    rc_t rc = KStdIOFileTest ( ( KFile_v1 ** ) std_in, 0, & seekable, & readable, & writable );
-    if ( rc != 0 )
-        return rc;
-    if ( ! readable )
-        return RC ( rcFS, rcFile, rcConstructing, rcFileDesc, rcWriteonly );
-
-    return KStdIOFileMake ( ( KFile_v1 ** ) std_in, 0, seekable, true, false );
-}
-
-/* MakeStdOut
- * MakeStdErr
- *  creates a write-only file on stdout or stderr
- */
-LIB_EXPORT rc_t CC KFileMakeStdOut ( KFile_v1 **std_out )
-{
-    bool seekable;
-    bool readable;
-    bool writable;
-    rc_t rc = KStdIOFileTest ( std_out, 1, & seekable, & readable, & writable );
-    if ( rc != 0 )
-        return rc;
-    if ( ! writable )
-        return RC ( rcFS, rcFile, rcConstructing, rcFileDesc, rcReadonly );
-
-    return KStdIOFileMake ( std_out, 1, false, false, true );
-}
-
-LIB_EXPORT rc_t CC KFileMakeStdErr ( KFile_v1 **std_err )
-{
-    bool seekable;
-    bool readable;
-    bool writable;
-    rc_t rc = KStdIOFileTest ( std_err, 2, & seekable, & readable, & writable );
-    if ( rc != 0 )
-        return rc;
-    if ( ! writable )
-        return RC ( rcFS, rcFile, rcConstructing, rcFileDesc, rcReadonly );
-
-    return KStdIOFileMake ( std_err, 2, false, false, true );
-}
-
-/* MakeFDFile
- *  creates a file from a file-descriptor
- *  not supported under Windows
- */
-LIB_EXPORT rc_t CC KFileMakeFDFileRead ( const KFile_v1 **f, int fd )
-{
-    bool seekable;
-    bool readable;
-    bool writable;
-    rc_t rc = KStdIOFileTest ( ( KFile_v1 ** ) f, fd, & seekable, & readable, & writable );
-    if ( rc != 0 )
-        return rc;
-    if ( ! readable )
-    {
-        rc = RC ( rcFS, rcFile, rcConstructing, rcFileDesc, rcWriteonly );
-        LOGERR (klogErr, rc, "error constructing read file from write only file descriptor");
-        return rc;
-    }
-    return KStdIOFileMake ( ( KFile** ) f, fd, seekable, true, false );
-}
-
-LIB_EXPORT rc_t CC KFileMakeFDFileWrite ( KFile_v1 **f, bool update, int fd )
-{
-    bool seekable;
-    bool readable;
-    bool writable;
-    rc_t rc = KStdIOFileTest ( f, fd, & seekable, & readable, & writable );
-    if ( rc != 0 )
-        return rc;
-    if ( update && ! readable )
-        return RC ( rcFS, rcFile, rcConstructing, rcFileDesc, rcWriteonly );
-    if ( ! writable )
-        return RC ( rcFS, rcFile, rcConstructing, rcFileDesc, rcReadonly );
-
-    return KStdIOFileMake ( f, fd, seekable, update, true );
-}
-
-LIB_EXPORT rc_t CC KSysFileMake ( KSysFile_v1 **fp, int fd, const char *path, bool read_enabled, bool write_enabled )
-{
-    bool seekable;
-    bool readable;
-    bool writable;
-    rc_t rc = KStdIOFileTest ( ( KFile** )fp, fd, & seekable, & readable, & writable );
-    if ( rc != 0 )
-        return rc;
-    if ( read_enabled && ! readable )
-        return RC ( rcFS, rcFile, rcConstructing, rcFileDesc, rcWriteonly );
-    if ( write_enabled && ! writable )
-        return RC ( rcFS, rcFile, rcConstructing, rcFileDesc, rcReadonly );
-    if (!seekable)
-        return KStdIOFileMake ( ( KFile** )fp, fd, false, read_enabled, write_enabled );
-    else
-        return KSysFileMakeVT ( fp, fd, ( const KFile_vt * ) & vtKSysFile,
-            path, read_enabled, write_enabled );
-}
diff --git a/libs/kfs/unix/syslockfile.c b/libs/kfs/unix/syslockfile.c
deleted file mode 100644
index 928d934..0000000
--- a/libs/kfs/unix/syslockfile.c
+++ /dev/null
@@ -1,215 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-typedef struct KExclAccessFile KExclAccessFile;
-#define KFILE_IMPL KExclAccessFile
-
-#include <kfs/extern.h>
-#include <kfs/lockfile.h>
-#include <kfs/impl.h>
-#include <kfs/file.h>
-#include <kfs/directory.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-
-/*--------------------------------------------------------------------------
- * KExclAccessFile
- */
-struct KExclAccessFile
-{
-    KFile dad;
-    KLockFile *lock;
-    KFile *f;
-};
-
-static
-rc_t KExclAccessFileDestroy ( KExclAccessFile *self )
-{
-    rc_t rc = KFileRelease ( self -> f );
-    if ( rc == 0 )
-    {
-        KLockFileRelease ( self -> lock );
-        free ( self );
-    }
-    return rc;
-}
-
-static
-struct KSysFile *KExclAccessFileGetSysFile ( const KExclAccessFile *self, uint64_t *offset )
-{
-    return KFileGetSysFile ( self -> f, offset );
-}
-
-static
-rc_t KExclAccessFileRandomAccess ( const KExclAccessFile *self )
-{
-    return KFileRandomAccess ( self -> f );
-}
-
-static
-rc_t KExclAccessFileSize ( const KExclAccessFile *self, uint64_t *size )
-{
-    return KFileSize ( self -> f, size );
-}
-
-static
-rc_t KExclAccessFileSetSize ( KExclAccessFile *self, uint64_t size )
-{
-    return KFileSetSize ( self -> f, size );
-}
-
-static
-rc_t KExclAccessFileRead ( const KExclAccessFile *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    return KFileRead ( self -> f, pos, buffer, bsize, num_read );
-}
-
-static
-rc_t KExclAccessFileWrite ( KExclAccessFile *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    return KFileWrite ( self -> f, pos, buffer, size, num_writ );
-}
-
-static
-uint32_t KExclAccessFileType ( const KExclAccessFile * self )
-{
-    return KFileType ( self -> f );
-}
-
-static KFile_vt_v1 KExclAccessFile_vt =
-{
-    1, 1,
-
-    KExclAccessFileDestroy,
-    KExclAccessFileGetSysFile,
-    KExclAccessFileRandomAccess,
-    KExclAccessFileSize,
-    KExclAccessFileSetSize,
-    KExclAccessFileRead,
-    KExclAccessFileWrite,
-    KExclAccessFileType
-};
-
-static
-rc_t KExclAccessFileMake ( KExclAccessFile **fp, KLockFile *lock, KFile *f )
-{
-    rc_t rc;
-    KExclAccessFile *xf = malloc ( sizeof * xf );
-    if ( xf == NULL )
-        rc = RC ( rcFS, rcFile, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        rc = KFileInit ( & xf -> dad, ( const KFile_vt* ) & KExclAccessFile_vt,
-            "KExclAccessFile", "no-name", f -> read_enabled, f -> write_enabled );
-        if ( rc == 0 )
-        {
-            xf -> lock = lock;
-            xf -> f = f;
-            * fp = xf;
-            return 0;
-        }
-
-        free ( xf );
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KDirectory
- *  interface extensions
- */
-
-
-/* CreateExclusiveAccessFile
- *  opens a file with exclusive write access
- *
- *  "fp" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if true, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT rc_t CC KDirectoryVCreateExclusiveAccessFile ( KDirectory *self, KFile **fp,
-    bool update, uint32_t access, KCreateMode mode, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( fp == NULL )
-        rc = RC ( rcFS, rcFile, rcLocking, rcParam, rcNull );
-    else
-    {
-        /* create the path */
-        char full [ 4096 ];
-        rc = KDirectoryVResolvePath ( self, true, full, sizeof full, path, args );
-        if ( rc == 0 )
-        {
-            KLockFile *lock;
-
-            /* acquire the lock */
-            rc = KDirectoryCreateLockFile ( self, & lock, "%s.lock", full );
-            if ( rc == 0 )
-            {
-                KFile *f;
-
-                /* create the file */
-                rc = KDirectoryCreateFile ( self, & f, update, access, mode, "%s", full );
-                if ( rc == 0 )
-                {
-                    KExclAccessFile *xf;
-
-                    /* wrap the file */
-                    rc = KExclAccessFileMake ( & xf, lock, f );
-                    if ( rc == 0 )
-                    {
-                        * fp = & xf -> dad;
-                        return 0;
-                    }
-
-                    KFileRelease ( f );
-                }
-
-                KLockFileRelease ( lock );
-            }
-        }
-
-        * fp = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/kfs/unix/sysmmap-priv.h b/libs/kfs/unix/sysmmap-priv.h
deleted file mode 100644
index 639c9a3..0000000
--- a/libs/kfs/unix/sysmmap-priv.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sysmmap_priv_
-#define _h_sysmmap_priv_
-
-#ifndef _h_mmap_priv_
-#include "../mmap-priv.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KMMap
- *  a memory mapped region
- */
-struct KMMap
-{
-    uint64_t off;
-    uint64_t pos;
-    size_t size;
-    char *addr;
-
-    KFile *f;
-    size_t pg_size;
-
-    uint32_t addr_adj;
-    uint32_t size_adj;
-
-    KRefcount refcount;
-
-    bool read_only;
-    bool sys_mmap;
-    bool dirty;
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sysmmap_priv_ */
diff --git a/libs/kfs/unix/sysmmap.c b/libs/kfs/unix/sysmmap.c
deleted file mode 100644
index 21bb985..0000000
--- a/libs/kfs/unix/sysmmap.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "sysmmap-priv.h"
-#include "sysfile-priv.h"
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/mman.h>
-#include <errno.h>
-
-
-/*--------------------------------------------------------------------------
- * KMMap
- *  a memory mapped region
- */
-
-/* Make
- */
-rc_t KMMapMake ( KMMap **mmp )
-{
-    KMMap *mm = calloc ( 1, sizeof * mm );
-    if ( mm == NULL )
-        return RC ( rcFS, rcMemMap, rcConstructing, rcMemory, rcExhausted );
-    
-    mm -> pg_size = sysconf ( _SC_PAGE_SIZE );
-
-    * mmp = mm;
-
-    return 0;
-}
-
-
-/* RWSys
- */
-rc_t KMMapRWSys ( KMMap *self, uint64_t pos, size_t size )
-{
-    KSysFile *sf = KFileGetSysFile ( self -> f, & self -> off );
-    if ( sf == NULL )
-        return RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcIncorrect );
-
-    self -> addr = mmap ( 0, size,
-        PROT_READ | PROT_WRITE, MAP_SHARED, sf -> fd, pos );
-    if ( self -> addr != ( char* ) MAP_FAILED )
-        return 0;
-
-    switch ( errno )
-    {
-    case EBADF:
-        return RC ( rcFS, rcMemMap, rcConstructing, rcFileDesc, rcInvalid );
-    case EACCES:
-        return RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcNoPerm );
-    case ETXTBSY:
-    case ENODEV:
-        return RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcInvalid );
-    case EAGAIN:
-        return RC ( rcFS, rcMemMap, rcConstructing, rcFunction, rcIncomplete );
-    case ENOMEM:
-        return RC ( rcFS, rcMemMap, rcConstructing, rcMemory, rcExhausted );
-    }
-
-    return RC ( rcFS, rcMemMap, rcConstructing, rcNoObj, rcUnknown );
-}
-
-
-/* ROSys
- */
-rc_t KMMapROSys ( KMMap *self, uint64_t pos, size_t size )
-{
-    KSysFile *sf = KFileGetSysFile ( self -> f, & self -> off );
-    if ( sf == NULL )
-        return RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcIncorrect );
-
-    self -> addr = mmap ( 0, size,
-        PROT_READ, MAP_SHARED, sf -> fd, pos );
-    if ( self -> addr != ( char* ) MAP_FAILED )
-        return 0;
-
-    switch ( errno )
-    {
-    case EBADF:
-        return RC ( rcFS, rcMemMap, rcConstructing, rcFileDesc, rcInvalid );
-    case EACCES:
-        return RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcNoPerm );
-    case ETXTBSY:
-    case ENODEV:
-        return RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcInvalid );
-    case EAGAIN:
-        return RC ( rcFS, rcMemMap, rcConstructing, rcFunction, rcIncomplete );
-    case ENOMEM:
-        return RC ( rcFS, rcMemMap, rcConstructing, rcMemory, rcExhausted );
-    }
-
-    return RC ( rcFS, rcMemMap, rcConstructing, rcNoObj, rcUnknown );
-}
-
-
-/* Unmap
- *  removes a memory map
- */
-rc_t KMMapUnmap ( KMMap *self )
-{
-    if ( self -> size != 0 )
-    {
-        if ( munmap ( self -> addr - self -> addr_adj,
-                 self -> size + self -> size_adj ) )
-        {
-            if ( errno != EINVAL )
-                return RC ( rcFS, rcMemMap, rcDestroying, rcNoObj, rcUnknown );
-        }
-
-        self -> addr = NULL;
-        self -> size = 0;
-    }
-
-    return 0;
-}
diff --git a/libs/kfs/win/directory-path.c b/libs/kfs/win/directory-path.c
deleted file mode 100644
index fefb193..0000000
--- a/libs/kfs/win/directory-path.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-
-#include "sysdir-priv.h"
-
-#include <kfs/impl.h> /* KSysDir */
-#include <kfs/directory.h>
-#include <kfs/kfs-priv.h> /* KSysDirOSPath */
-
-#include <klib/rc.h>
-
-#include <wchar.h>
-
-/* PosixStringToSystemString
- * converts posix path string to system path
- *  "buffer" [ OUT ] - NUL terminated system path string
- *  "bsize" [ IN ] - buffer length
- *  "path" [ IN ] - NUL terminated posix path string
- */
-LIB_EXPORT rc_t CC KDirectoryPosixStringToSystemString(const KDirectory *self,
-    char *buffer,
-    size_t bsize,
-    const char *path,
-    ...)
-{
-    rc_t rc = 0;
-
-    if (self == NULL) {
-        return RC(rcFS, rcDirectory, rcAccessing, rcSelf, rcNull);
-    }
-
-    if (buffer == NULL) {
-        return RC(rcFS, rcDirectory, rcAccessing, rcBuffer, rcNull);
-    }
-
-    if (bsize == 0) {
-        return RC(rcFS, rcDirectory, rcAccessing, rcBuffer, rcInsufficient);
-    }
-
-    {
-        struct KSysDir *sysDir = KDirectoryGetSysDir(self);
-        wchar_t wd_path[MAX_PATH];
-
-        va_list args;
-        va_start(args, path);
-        rc = KSysDirOSPath(sysDir, wd_path, MAX_PATH, path, args);
-        va_end(args);
-
-        if (rc == 0) {
-            size_t ret = wcstombs(buffer, wd_path, bsize);
-            if (ret >= MAX_PATH) {
-                return RC(rcExe, rcPath, rcConverting, rcPath, rcExcessive);
-            }
-        }
-    }
-
-    return rc;
-}
diff --git a/libs/kfs/win/lnk_tools.c b/libs/kfs/win/lnk_tools.c
deleted file mode 100644
index 82a565f..0000000
--- a/libs/kfs/win/lnk_tools.c
+++ /dev/null
@@ -1,518 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <sysalloc.h>
-
-#include <Shlobj.h>
-
-#define LNK_RES_ERROR 0
-#define LNK_RES_FILE 1
-#define LNK_RES_DIR 2
-
-#define LNK_FLAG_HasLinkTargetIDList 0x1
-#define LNK_FLAG_HasLinkInfo 0x2
-#define LNK_FLAG_HasName 0x4
-#define LNK_FLAG_HasRelativePath 0x8
-#define LNK_FLAG_HasWorkingDir 0x10
-#define LNK_FLAG_HasArguments 0x20
-#define LNK_FLAG_HasIconLocation 0x40
-#define LNK_FLAG_IsUniCode 0x80
-#define LNK_FLAG_ForceNoLinkInfo 0x100
-#define LNK_FLAG_HasExpString 0x200
-#define LNK_FLAG_RunInSeparateProcess 0x400
-#define LNK_FLAG_Unused1 0x800
-#define LNK_FLAG_HasDarwinID 0x1000
-#define LNK_FLAG_RunAsUser 0x2000
-#define LNK_FLAG_HasExpIcon 0x4000
-#define LNK_FLAG_NoPidIAlias 0x8000
-#define LNK_FLAG_Unused2 0x10000
-#define LNK_FLAG_RunWithShimLayer 0x20000
-#define LNK_FLAG_ForceNoLinkTrack 0x40000
-#define LNK_FLAG_EnableTargetMatdata 0x80000
-#define LNK_FLAG_DisableLinkPathTracking 0x100000
-#define LNK_FLAG_DisableKnowFolderTracking 0x200000
-#define LNK_FLAG_DisableKnowFolderAlias 0x400000
-#define LNK_FLAG_AllowLinkToLink 0x800000
-#define LNK_FLAG_UnaliasOnSave 0x1000000
-
-
-#define LNK_ATTR_FILE_ATTRIBUTE_READONLY 0x1
-#define LNK_ATTR_FILE_ATTRIBUTE_HIDDEN 0x2
-#define LNK_ATTR_FILE_ATTRIBUTE_SYSTEM 0x4
-#define LNK_ATTR_Reserved1 0x8
-#define LNK_ATTR_FILE_ATTRIBUTE_DIRECTORY 0x10
-#define LNK_ATTR_FILE_ATTRIBUTE_ARCHIVE 0x20
-#define LNK_ATTR_Reserved2 0x40
-#define LNK_ATTR_FILE_ATTRIBUTE_NORMAL 0x80
-#define LNK_ATTR_FILE_ATTRIBUTE_TEMPORARY 0x100
-#define LNK_ATTR_FILE_ATTRIBUTE_SPARSE_FILE 0x200
-#define LNK_ATTR_FILE_ATTRIBUTE_REPARSE_POINT 0x400
-#define LNK_ATTR_FILE_ATTRIBUTE_COMPRESSED 0x800
-#define LNK_ATTR_FILE_ATTRIBUTE_OFFLINE 0x1000
-#define LNK_ATTR_FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x2000
-#define LNK_ATTR_FILE_ATTRIBUTE_ENCRYPTED 0x4000
-
-/* the first 20 "magic" bytes of a MS-lnk-file
-   ( 4 bytes header-size and 16 bytes LinkCLSID ) */
-const unsigned char lnk_ref[ 20 ] =
-{
-    0x4C, 0x00, 0x00, 0x00, 0x01, 0x14, 0x02, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x46
-};
-
-
-static bool has_lnk_extension( const wchar_t *path )
-{
-    size_t len = wcslen( path );
-
-    if ( len < 5 ) return false;
-    if ( path[ len - 4 ] != '.' ) return false;
-    if ( path[ len - 3 ] != 'l' && path[ len - 3 ] != 'L' ) return false;
-    if ( path[ len - 2 ] != 'n' && path[ len - 2 ] == 'N' ) return false;
-    if ( path[ len - 1 ] != 'k' && path[ len - 1 ] == 'K' ) return false;
-    return true;
-}
-
-
-static bool add_lnk_extension( wchar_t *path, const size_t path_size )
-{
-    size_t len = wcslen( path );
-    if ( len + 5 >= path_size )
-        return false;
-    path[ len + 0 ] = '.';
-    path[ len + 1 ] = 'l';
-    path[ len + 2 ] = 'n';
-    path[ len + 3 ] = 'k';
-    path[ len + 5 ] = 0;
-    return true;
-}
-
-
-static HANDLE lnk_file_open( const wchar_t *path, DWORD * filesize )
-{
-    HANDLE hfile = CreateFileW( path,           // file to open
-                         GENERIC_READ,          // open for reading
-                         FILE_SHARE_READ,       // share for reading
-                         NULL,                  // default security
-                         OPEN_EXISTING,         // existing file only
-                         FILE_ATTRIBUTE_NORMAL, // normal file
-                         NULL );                // no attr. template
-    if ( hfile != INVALID_HANDLE_VALUE )
-    {
-        if ( filesize != NULL )
-            *filesize = GetFileSize( hfile, NULL );
-    }
-    return hfile;
-}
-
-
-static bool lnk_file_exists( const wchar_t *path )
-{
-    HANDLE hFile = lnk_file_open( path, NULL );
-    if ( hFile != INVALID_HANDLE_VALUE )
-    {
-        CloseHandle( hFile );
-        return true;
-    }
-    else
-        return false;
-} 
-
-
-static unsigned char * lnk_file_read( HANDLE hfile, const size_t n_bytes, DWORD * read )
-{
-    unsigned char * res;
-
-    if ( read != NULL ) *read = 0;
-    res = (unsigned char *)malloc( n_bytes );
-    if ( res != NULL )
-    {
-        DWORD dwBytesRead;
-        if ( FALSE == ReadFile( hfile, res, ( DWORD ) n_bytes, &dwBytesRead, NULL ) )
-        {
-            free( res );
-            res = NULL;
-        }
-        else
-        {
-            if ( read != NULL )
-                *read = dwBytesRead;
-        }
-    }
-    return res;
-}
-
-
-static DWORD lnk_file_get_DWORD( const unsigned char * buffer, const int idx )
-{
-    DWORD res = 0;
-    memcpy( &res, &(buffer[ idx ]), sizeof( res ) );
-    return res;
-}
-
-static WORD lnk_file_get_WORD( const unsigned char * buffer, const int idx )
-{
-    WORD res = 0;
-    memcpy( &res, &(buffer[ idx ]), sizeof( res ) );
-    return res;
-}
-
-
-static bool lnk_file_validate_buffer( const unsigned char * buffer, const size_t buffsize )
-{
-    bool res = ( buffsize >= sizeof lnk_ref );
-    if ( res )
-        res = ( 0 == memcmp ( buffer, lnk_ref, sizeof lnk_ref ) );
-    return res;
-}
-
-
-/* the path is given in windows-native notation and wide-char */
-static bool lnk_file_validate( const wchar_t *path )
-{
-    HANDLE hfile;
-    bool res;
-
-    hfile = lnk_file_open( path, NULL );
-    res = ( hfile != INVALID_HANDLE_VALUE );
-    if ( res )
-    {
-        DWORD dwBytesRead;
-        unsigned char * buffer = lnk_file_read( hfile, 32, &dwBytesRead );
-        CloseHandle( hfile );
-        res = ( buffer != NULL );
-        if ( res )
-        {
-            res = lnk_file_validate_buffer( buffer, dwBytesRead );
-            free( buffer );
-        }
-    }
-    return res;
-}
-
-/*  resolves a lnk file, after it's content was loaded into a buffer
-    buffer   ...    IN  points to the file-content
-    buffsize ...    IN  also the size of the lnk-file
-    resolved ...    OUT resolved path as wchar_t in windows-native form
-
-    return-value    0 ... resolving failed
-                    1 ... resolved path is a file
-                    2 ... resolved path is a directory
-*/
-static int lnk_file_resolve_buffer( const unsigned char * buffer, const size_t buffsize,
-                                    wchar_t ** resolved )
-{
-    char * base_path = NULL;
-    int res = LNK_RES_ERROR;
-    if ( lnk_file_validate_buffer( buffer, buffsize ) )
-    {
-        int idx = 0x4C;
-        DWORD flags = lnk_file_get_DWORD( buffer, 0x14 );
-        DWORD attr  = lnk_file_get_DWORD( buffer, 0x18 );
-
-        /* we have to handle the TargetIDList even if it is of no relevance
-        to resolving the link, just to get the correct index for the next
-        section */
-        if ( flags & LNK_FLAG_HasLinkTargetIDList )
-            idx += ( lnk_file_get_WORD( buffer, idx ) + 2 );
-        if ( flags & LNK_FLAG_HasLinkInfo )
-        {
-            DWORD base_path_ofs = lnk_file_get_DWORD( buffer, idx + 16 );
-            if ( base_path_ofs > 0 )
-            {
-                const char * src = (const char *)&( buffer[ idx + base_path_ofs ]);
-                if ( *src != 0 )
-                {
-                    size_t required;
-                    errno_t e = mbstowcs_s( &required, NULL, 0, src, 0 );
-                    if ( required > 0 )
-                    {
-                        *resolved = (wchar_t *) malloc( ( required + 1 ) * 2 );
-                        if ( *resolved )
-                        {
-                            size_t converted;
-                            mbstowcs_s( &converted, *resolved, required + 1, src, required + 1 );
-                            if ( attr & LNK_ATTR_FILE_ATTRIBUTE_DIRECTORY )
-                                res = LNK_RES_DIR;
-                            else
-                                res = LNK_RES_FILE;
-                        }
-                    }
-                }
-            }
-        }
-    }
-    return res;
-}
-
-
-/* translate a given lnk-file (full path) 'c:\somewhere\alink.lnk' 
-   into the path the lnk-file contains: 
-   'c:\somewhere\subpath\file.txt'
-   or 
-   'c:\anotherpath\sub\sub\file.txt' 
-   */
-static int lnk_file_resolve( const wchar_t *lnk_file, wchar_t ** resolved )
-{
-    HANDLE hfile;
-    DWORD dwFileSize;
-    int res = LNK_RES_ERROR;
-
-    if ( resolved != NULL )
-    {
-        *resolved = NULL;
-        hfile = lnk_file_open( lnk_file, &dwFileSize );
-        if ( hfile != INVALID_HANDLE_VALUE )
-        {
-            unsigned char * buffer = lnk_file_read( hfile, (size_t)dwFileSize, NULL );
-            if ( buffer != NULL )
-            {
-                res = lnk_file_resolve_buffer( buffer, dwFileSize, resolved );
-                free( buffer );
-            }
-        }
-    }
-    return res;
-}
-
-
-static bool win_path_exists( const wchar_t * path )
-{
-    bool res = false;
-    if ( path != NULL )
-    {
-        HANDLE hfile = CreateFileW( path, 
-                                0, /* do not ask for RD or WR, that prevents access-denied-err */
-                                FILE_SHARE_READ, /* needed to get a handle to obj's that are shared */
-                                NULL,
-                                OPEN_EXISTING,
-                                FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS,
-                                NULL );
-        if ( hfile != INVALID_HANDLE_VALUE )
-        {
-            res = true;
-            CloseHandle( hfile );
-        }
-#if _DEBUGGING
-        else
-        {
-            DWORD status = GetLastError ();
-            switch ( status )
-            {
-            case ERROR_FILE_NOT_FOUND:
-            case ERROR_PATH_NOT_FOUND:
-                break;
-            default:
-                DBGMSG ( DBG_KFS, DBG_FLAG_ANY, ( "win_path_exists: WARNING - unrecognized error code - %u.", status ) );
-            }
-        }
-#endif
-    }
-    return res;
-}
-
-static
-wchar_t * less_brain_dead_wcsdup ( const wchar_t * path )
-{
-    if ( path != NULL )
-    {
-        size_t len = wcslen ( path ) + 3;
-        wchar_t *cpy = malloc ( len * sizeof * cpy );
-        if ( cpy != NULL )
-            return wcscpy ( cpy, path );
-    }
-    return NULL;
-}
-
-static size_t win_existing_path( const wchar_t *path )
-{
-    size_t res = 0;
-    wchar_t * temp = less_brain_dead_wcsdup( path );
-    if ( temp != NULL )
-    {
-        wchar_t * part = wcsrchr( temp, L'\\' );
-        while ( part != NULL && res == 0 )
-        {
-            *part = 0;
-            if ( win_path_exists( temp ) )
-                res = ( part - temp );
-            else
-                part = wcsrchr( temp, L'\\' );
-        }
-        free( temp );
-    }
-    return res;
-}
-
-
-static wchar_t * win_assemble_lnk( const wchar_t *path, const size_t exists, size_t * remaining )
-{
-    wchar_t * res = NULL;
-    if ( path != NULL && remaining != NULL )
-    {
-        size_t path_len, buff_len;
-
-        *remaining = 0;
-        path_len = wcslen( path );
-        #define ExtraChars 5
-        buff_len = ( path_len + ExtraChars ) * sizeof( * path );
-        res = (wchar_t *)malloc( buff_len );
-        if ( res != NULL )
-        {
-            size_t term;
-            const wchar_t * from = ( path + exists + 1 );
-            const wchar_t * next_bs = wcschr( from, L'\\' );
-            if ( next_bs == NULL )
-                term = path_len;
-            else
-            {
-                term = ( next_bs - path );
-                *remaining = term;
-            }
-            /* if the string to be copied does not fit into the buffer 
-               wcsncpy_s will terminate the application instead of returning
-               an error !!! */
-            wcsncpy_s( res, path_len + ExtraChars, path, term ); /* 2nd argument is in elements, not bytes */
-            res[ term + 0 ] = L'.';
-            res[ term + 1 ] = L'l';
-            res[ term + 2 ] = L'n';
-            res[ term + 3 ] = L'k';
-            res[ term + 4 ] = 0;
-        }
-        #undef ExtraChars
-    }
-    return res;
-}
-
-
-static wchar_t * win_assemble_path( const wchar_t *part1, const wchar_t *part2 )
-{
-    wchar_t *res = NULL;
-    if ( part1 != NULL && part2 != NULL )
-    {
-        size_t len1 = wcslen( part1 );
-        size_t len2 = wcslen( part2 );
-        res = (wchar_t *)malloc( ( len1 + len2 + 1 ) * sizeof( * part1 ) );
-        if ( res != NULL )
-        {
-            /* if the string to be copied does not fit into the buffer 
-               wcsncpy_s will terminate the application instead of returning
-               an error !!! */
-            wcsncpy_s( res, len1+1, part1, len1 );
-            wcsncpy_s( res+len1, len2+1, part2, len2 );
-            res[ len1 + len2 ] = 0;
-        }
-    }
-    return res;
-}
-
-
-static bool win_resolve_path( const wchar_t *path, wchar_t ** resolved, const int depth )
-{
-    bool res = false;
-
-    if ( depth > 10 )
-        return res;
-    if ( resolved != NULL )
-    {
-        *resolved = NULL;
-        res = win_path_exists( path );
-        if ( res )
-            /* the given path exists, no need to resolve links... */
-            *resolved = less_brain_dead_wcsdup( path );
-        else
-        {
-            /* detect the part of the path that does exist
-            exists points at the backslash behind the existing path */
-            size_t exists = win_existing_path( path );
-            if ( exists > 0 )
-            {
-                size_t remaining;
-                wchar_t * possible_lnk = win_assemble_lnk( path, exists, &remaining );
-                if ( possible_lnk != NULL )
-                {
-                    wchar_t * lnk_resolved = NULL;
-                    int status = lnk_file_resolve( possible_lnk, &lnk_resolved );
-                    if ( status != LNK_RES_ERROR )
-                    {
-                        if ( remaining > 0 )
-                        {
-                            wchar_t * new_path = win_assemble_path( lnk_resolved, path + remaining );
-                            free( lnk_resolved );
-                            if ( new_path != NULL )
-                            {
-                                res = win_resolve_path( new_path, resolved, depth + 1 );
-                                free( new_path );
-                            }
-                        }
-                        else
-                        {
-                            *resolved = lnk_resolved;
-                            res = true;
-                        }
-                    }
-                    free( possible_lnk );
-                }
-            }
-        }
-    }
-    return res;
-}
-
-
-bool win_CreateLink( const wchar_t * target, const wchar_t * lnk_file, const wchar_t * desc )
-{ 
-    bool res = false;
-    HRESULT hres;
-    IShellLink * psl; 
-
-    // Get a pointer to the IShellLink interface. 
-    hres = CoCreateInstance( &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, 
-                             &IID_IShellLink, (LPVOID*)&psl ); 
-    if ( SUCCEEDED( hres ) ) 
-    { 
-        IPersistFile* ppf; 
- 
-        // Set the path to the shortcut target and add the description. 
-        psl -> lpVtbl -> SetPath( psl, target );
-        if ( desc != NULL )
-            psl -> lpVtbl -> SetDescription( psl, desc ); 
- 
-        // Query IShellLink for the IPersistFile interface for saving the 
-        // shortcut in persistent storage. 
-        hres = psl -> lpVtbl -> QueryInterface( psl, &IID_IPersistFile, (LPVOID*)&ppf ); 
-        if ( SUCCEEDED( hres ) ) 
-        { 
-            // Save the link by calling IPersistFile::Save. 
-            hres = ppf -> lpVtbl -> Save( ppf, lnk_file, TRUE );
-            res = SUCCEEDED( hres );
-            ppf -> lpVtbl -> Release( ppf );
-        } 
-        psl -> lpVtbl -> Release( psl );
-    } 
-    return res; 
-}
diff --git a/libs/kfs/win/sysdir-priv.h b/libs/kfs/win/sysdir-priv.h
deleted file mode 100644
index 1ae8cc7..0000000
--- a/libs/kfs/win/sysdir-priv.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sysdir_priv_
-#define _h_sysdir_priv_
-
-#ifndef _h_kfs_impl_
-#include <kfs/impl.h>
-#endif
-
-#ifndef _h_klib_rc_
-#include <klib/rc.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * KDirectory
- *  a Windows extension
- */
-
-
-/* MakeFromRealPath
- *  creates a KDirectory from a Windows path
- */
-rc_t KDirectoryMakeFromRealPath ( KDirectory **dirp,
-    const wchar_t *real, bool update, bool chroot );
-
-
-/*--------------------------------------------------------------------------
- * KSysDir
- *  a Windows directory
- */
-typedef struct KSysDir KSysDir;
-
-
-#if 0
-/* MakePath
- *  create a full path from partial
- *
- *  "ctx" [ IN ] - a prepared context for returning non-zero rc_t
- *
- *  "canon" [ IN ] - if true, rewrite path in canonical form. usually
- *  not required when passing a path to the system, as the OS performs
- *  its own processing.
- *
- *  "bufer" [ OUT ] and "path_max" [ IN ] - return buffer for processed path
- *
- *  "path" [ IN ] and "args" [ IN, NULL OKAY ] - input path to be resolved
- */
-rc_t KSysDirMakePath ( const KSysDir* self, enum RCContext ctx, bool canon,
-	wchar_t *buffer, size_t path_max, const char *path, va_list args );
-#endif
-
-
-/* OSPath
- *  returns a real OS path
- */
-rc_t KSysDirOSPath ( const KSysDir *self,
-    wchar_t *real, size_t bsize, const char *path, va_list args );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_sysdir_priv_ */
diff --git a/libs/kfs/win/sysdir.c b/libs/kfs/win/sysdir.c
deleted file mode 100644
index b503f5f..0000000
--- a/libs/kfs/win/sysdir.c
+++ /dev/null
@@ -1,3135 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KSysDir;
-
-#define UNICODE 1
-#define _UNICODE 1
-
-#define KDIR_IMPL struct KSysDir
-
-#include "sysfile-priv.h"
-#include <klib/namelist.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/debug.h>
-#include <klib/klib-priv.h>
-
-#include <sysalloc.h>
-
-#include <stdio.h>
-#include <wchar.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <WINDOWS.H>
-#include <WINNT.H>
-
-#include "lnk_tools.c"
-
-#include <os-native.h>
-
-#ifndef IO_REPARSE_TAG_SYMLINK
-#define IO_REPARSE_TAG_SYMLINK 0xA000000C
-#endif
-
-
-/* Missing functions from our text library
- * size is bytes; max_chars is number of elements
- */
-
-/* utf16_utf32
- *  converts UTF16 text to a single UTF32 character
- *  returns the number of UTF16 words consumed, such that:
- *    return > 0 means success
- *    return == 0 means insufficient input
- *    return < 0 means bad input or bad argument
- */
-static
-int utf16_utf32 ( uint32_t *dst, const wchar_t *begin, const wchar_t *end )
-{
-    uint32_t ch;
-
-    if ( dst == NULL || begin == NULL || end == NULL )
-        return -1;
-
-    if ( begin == end )
-        return 0;
-
-    /* windows utf16 */
-
-    ch = (uint32_t)(begin [0]);
-
-    if ((ch < 0xD800) || (ch <= 0xE000))
-    {
-        *dst = ch;
-        return 1;
-    }
-    else
-    {
-        uint32_t ch;
-
-        /* need at least 2 words */
-        if (begin >= end)
-            return -1;
-
-        /* extreme checks */
-        if (((begin[0] & 0xFC00) != 0xD8) ||
-            ((begin[1] & 0xFC00) != 0xDC))
-            return -1;
-
-        ch = (begin[0] & 0x03FF) << 10 |
-            (begin[1] & 0x03FF);
-        return 2;
-    }
-}
-
-
-/* utf32_utf16
- *  converts a single UTF32 character to UTF16 text
- *  returns the number of UTF16 words generated, such that:
- *    return > 0 means success
- *    return == 0 means insufficient output
- *    return < 0 means bad character or bad argument
- */
-static 
-int utf32_utf16 ( wchar_t *begin, wchar_t *end, uint32_t ch )
-{
-    if (ch < 0x10000)
-    {
-        if ((ch <= 0xDFFF) && (ch >= 0xD800))
-            return -1;
-
-        begin[0] = (uint16_t)ch;
-        return 1;
-    }
-    else if ((ch >= 0x10FFFF) || (end <= begin))
-        return -1;
-    else
-    {
-        uint32_t cch;
-
-        cch = ch - 0x10000;
-        /* cch <= 0xFFFFF since ch < 0x10FFFF */
-
-        begin[0] = 0xD800 | (cch >> 10); /* upper 10 bits */
-        begin[1] = 0xDC00 | (cch & 0x3FF); /* lower 10 bita */
-        return 2;
-    }
-}
-
-
-static int wstrcase_cmp (const wchar_t * a, size_t asize,
-                         const wchar_t * b, size_t bsize,
-                         uint32_t max_chars)
-{
-    uint32_t num_chars;
-    const wchar_t *aend, *bend;
-
-    assert ( a != NULL && b != NULL );
-
-    /* set up end limit triggers */
-    aend = a + asize;
-    bend = b + bsize;
-
-    num_chars = 0;
-
-    while ( a < aend && b < bend )
-    {
-        uint32_t ach, bch;
-
-        /* read a character from a */
-        int len = utf16_utf32 ( & ach, a, aend );
-        if ( len <= 0 )
-        {
-            asize -= ( size_t ) ( aend - a );
-            break;
-        }
-        a += len;
-
-        /* read a character from b */
-        len = utf16_utf32 ( & bch, b, bend );
-        if ( len <= 0 )
-        {
-            bsize -= ( size_t ) ( bend - b );
-            break;
-        }
-        b += len;
-
-        /* compare characters with case */
-        if ( ach != bch )
-        {
-            /* only go lower case if they differ */
-            ach = towlower ( ( wint_t ) ach );
-            bch = towlower ( ( wint_t ) bch );
-
-            if ( ach != bch )
-            {
-                if ( ach < bch )
-                    return -1;
-                return 1;
-            }
-        }
-
-        /* if char count is sufficient, we're done */
-        if ( ++ num_chars == max_chars )
-            return 0;
-    }
-
-    /* one or both reached end < max_chars */
-    if (asize < bsize)
-        return -1;
-    return asize > bsize;
-}
-
-/*--------------------------------------------------------------------------
- * KSysDirEnum
- *  a Windows directory enumerator
- */
-typedef struct KSysDirEnum KSysDirEnum;
-struct KSysDirEnum
-{
-    HANDLE handle;
-    WIN32_FIND_DATAW fd;
-    int found;
-    bool first;
-};
-
-/* Whack
- */
-static
-void KSysDirEnumWhack ( KSysDirEnum *self )
-{
-    FindClose( self->handle );
-}
-
-/* Init
- */
-static
-rc_t KSysDirEnumInit ( KSysDirEnum *self, const wchar_t *path )
-{
-    uint32_t err;
-    rc_t rc;
-
-    self -> first = true;
-    self -> handle = FindFirstFileW ( path, & self -> fd );
-    if ( self -> handle != INVALID_HANDLE_VALUE )
-    {
-        self -> found = 1;
-        return 0;
-    }
-
-    self -> found = 0;
-    err = GetLastError ();
-    switch ( err )
-    {
-    case ERROR_FILE_NOT_FOUND:
-    case ERROR_PATH_NOT_FOUND:
-        rc = RC ( rcFS, rcDirectory, rcListing, rcPath, rcNotFound );
-        break;
-    default :
-        rc = RC ( rcFS, rcDirectory, rcListing, rcNoObj, rcUnknown );
-    }
-
-    PLOGERR ( klogInfo,
-             ( klogInfo, rc, "error FindFirstFileW - $(E) - $(C)",
-              "E=%!,C=%u", err, err ) ); 
-
-    return rc;
-}
-
-
-static
-rc_t KSysDirEnumInitAll ( KSysDirEnum *self, wchar_t *path, uint32_t path_length )
-{
-    /* prepare the path for KSysDirEnumInit() */
-    path [ path_length + 0 ] = '\\';
-    path [ path_length + 1 ] = '*';
-    path [ path_length + 2 ] = '.';
-    path [ path_length + 3 ] = '*';
-    path [ path_length + 4 ] = 0;
-
-    return KSysDirEnumInit ( self, path );
-}
-
-/* Next
- */
-static
-const wchar_t *KSysDirEnumNext ( const KSysDirEnum *cself )
-{
-    KSysDirEnum* self = (KSysDirEnum*)cself;
-
-    while( self->found )
-    {
-        if ( self -> first )
-            self -> first = false;
-        else
-            self->found = FindNextFileW( self->handle, &self->fd );
-
-        if ( self->found )
-        {
-            /* filter out the '.' and '..' entries */
-            if ( self ->fd.cFileName[ 0 ] == '.' )
-            {
-                switch ( self->fd.cFileName[ 1 ] )
-                {
-                case 0:
-                    continue;
-                case '.':
-                    if ( self->fd.cFileName[ 2 ] == 0 )
-                        continue;
-                    break; 
-                }
-            }
-            return self->fd.cFileName;
-        }
-    }
-
-    return NULL;
-}
-
-
-/*--------------------------------------------------------------------------
- * KSysDirListing
- *  a Windows directory listing
- */
-typedef VNamelist KSysDirListing;
-
-static
-int KSysDirListingSort ( const void *a, const void *b )
-{
-    size_t A,B,M;
-    A = wchar_string_size (a);
-    B = wchar_string_size (b);
-    /* close enough for max chars? */
-    M = (A>B) ? A : B;
-
-    return wstrcase_cmp (a, A, b, B, ( uint32_t ) M);
-}
-
-static
-rc_t KSysDirListingInit ( KSysDirListing *self, const wchar_t *path, const KDirectory *dir,
-    bool ( CC * f ) ( const KDirectory*, const char*, void* ), void *data )
-{
-    KSysDirEnum list;
-    rc_t rc = KSysDirEnumInit ( & list, path );
-    if ( rc == 0 )
-    {
-        const wchar_t *name;
-        char utf8_name[ MAX_PATH ];
-        size_t utf8_size, utf16_size;
-
-        while ( ( name = KSysDirEnumNext ( & list ) ) != NULL )
-        {
-            utf16_size = wchar_string_size ( name );
-            utf8_size = wchar_cvt_string_copy ( utf8_name, sizeof( utf8_name ), name, utf16_size );
-            if ( utf8_size >= sizeof( utf8_name ) )
-            {
-                rc = RC(rcFS, rcDirectory, rcListing, rcName, rcExcessive );
-                break;
-            }
-
-            if ( f != NULL )
-            {
-                if ( ! ( * f ) ( dir, utf8_name, data ) )
-                    continue;
-            }
-            
-            rc = VNamelistAppend( self, utf8_name );
-            if ( rc != 0 )
-            {
-                break;
-            }
-
-        }
-
-        KSysDirEnumWhack ( & list );
-    }
-    return rc;
-}
-
-/*--------------------------------------------------------------------------
- * KSysDir
- *  a Windows directory
- */
-typedef struct KSysDir KSysDir;
-struct KSysDir
-{
-    KDirectory dad;
-    uint32_t root;
-    uint32_t length;
-    wchar_t path [ MAX_PATH ];
-};
-
-
-/* helper function to translate a windows-error-code into rc-code */
-static
-rc_t translate_file_error( DWORD error, enum RCContext ctx )
-{
-    switch ( error )
-    {
-    case ERROR_FILE_NOT_FOUND :
-    case ERROR_PATH_NOT_FOUND :
-    case ERROR_INVALID_DRIVE :
-        return RC ( rcFS, rcDirectory, ctx, rcPath, rcNotFound );
-
-    case ERROR_ALREADY_EXISTS:
-    case ERROR_FILE_EXISTS :
-        return RC ( rcFS, rcDirectory, ctx, rcPath, rcExists );
-
-/*    case ERROR_PATH_NOT_FOUND : */
-    case ERROR_INVALID_NAME :
-    case ERROR_BAD_PATHNAME :
-        return RC ( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-
-    case ERROR_ACCESS_DENIED :
-    case ERROR_INVALID_ACCESS :
-    case ERROR_SHARING_VIOLATION :
-    case ERROR_LOCK_VIOLATION :
-    case ERROR_PATH_BUSY :
-    case ERROR_WRITE_PROTECT :
-    case ERROR_DELETE_PENDING :
-        return RC ( rcFS, rcDirectory, ctx, rcDirectory, rcUnauthorized );
-
-    case ERROR_NOT_ENOUGH_MEMORY :
-    case ERROR_OUTOFMEMORY :
-        return RC ( rcFS, rcDirectory, ctx, rcMemory, rcExhausted );
-
-    case ERROR_TOO_MANY_OPEN_FILES :
-        return RC ( rcFS, rcDirectory, ctx, rcFileDesc, rcExhausted );
-
-    case ERROR_HANDLE_DISK_FULL :
-        return RC ( rcFS, rcDirectory, ctx, rcStorage, rcExhausted );
-
-    case ERROR_BUFFER_OVERFLOW :
-    case ERROR_FILENAME_EXCED_RANGE :
-        return RC ( rcFS, rcDirectory, ctx, rcPath, rcExcessive );
-    }
-    return RC ( rcFS, rcDirectory, ctx, rcNoObj, rcUnknown );
-}
-
-
-/* helper */
-
-static rc_t print_error_for( DWORD error, const wchar_t * path, const char * function, enum RCContext ctx, KLogLevel level )
-{
-    rc_t rc = translate_file_error( error, ctx );
-#if _DEBUGGING
-    char buffer[ 4096 ];
-    size_t src_size, dst_size, len;
-    wchar_cvt_string_measure ( path, &src_size, &dst_size );
-    len = wchar_cvt_string_copy ( buffer, sizeof buffer, path, src_size );
-    buffer[ len ] = 0;
-    PLOGERR ( level,
-              ( level, rc, "error $(F) - $(E) - $(C) for $(D)",
-                "F=%s,E=%!,C=%u,D=%s", function, error, error, buffer ) ); 
-#endif
-    return rc;
-}
-
-
-static void wchar_2_char( const wchar_t * path, char * buffer, size_t buflen )
-{
-    size_t src_size, dst_size, len;
-    wchar_cvt_string_measure ( path, &src_size, &dst_size );
-    len = wchar_cvt_string_copy ( buffer, buflen, path, src_size );
-    buffer[ len ] = 0;
-}
-
-
-static
-uint32_t KSysDirPathTypeFromFindData ( WIN32_FIND_DATA *find_data, 
-                                       const wchar_t * path,
-                                       const uint32_t type )
-{
-    uint32_t res = type;
-
-    if( ( find_data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) != 0 )
-    {
-        res = kptDir;
-    }
-    else if ( ( find_data->dwFileAttributes & FILE_ATTRIBUTE_DEVICE ) != 0 )
-    {
-        res = kptCharDev;
-    }
-
-    /* add in alias bit */
-    if ( ( find_data->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT ) != 0 )
-    {
-        if ( ( find_data->dwReserved0 & IO_REPARSE_TAG_SYMLINK ) != 0 )
-            res |= kptAlias;
-    }
-    else
-    {
-        if ( has_lnk_extension( path ) ) /* lnk_tools.c */
-            if ( lnk_file_validate( path ) ) /* lnk_tools.c */
-                res |= kptAlias;
-    }
-    return res;
-}
-
-static
-uint32_t KSysDirResolvePathAndDetectPathType ( const wchar_t *path )
-{
-    uint32_t res = kptNotFound;
-    wchar_t *resolved;
-    if ( win_resolve_path( path, &resolved, 1 ) ) /* lnk_tools.c */
-    {
-        WIN32_FIND_DATA find_data;
-        HANDLE f_findfile = FindFirstFileW( resolved, &find_data );
-        if ( f_findfile != INVALID_HANDLE_VALUE )
-        {
-            FindClose( f_findfile );
-            res = KSysDirPathTypeFromFindData ( &find_data, resolved, kptFile );
-        }
-        else
-        {
-            uint32_t err = GetLastError();
-            switch( err )
-            {
-            case ERROR_BAD_NETPATH:
-            case ERROR_BAD_NET_NAME:
-                /* see if the netpath is a server
-                   NB - our special wcsdup allocated extra space for this */
-                wcscat ( resolved, L"\\*" );
-                f_findfile = FindFirstFileW( resolved, &find_data );
-                if ( f_findfile != INVALID_HANDLE_VALUE )
-                {
-                    FindClose ( f_findfile );
-                    res = kptDir;
-                    break;
-                }
-                /* no break */
-            case ERROR_FILE_NOT_FOUND:
-            case ERROR_PATH_NOT_FOUND:
-                res = kptNotFound;
-                break;
-
-            default:
-                res = kptBadPath;
-            }
-        }
-        free( resolved );
-    }
-    return res;
-}
-
-/* KSysDirPathType
- *  returns a KPathType
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- */
-static
-uint32_t KSysDirFullFSPathType ( const wchar_t * path )
-{
-    WIN32_FIND_DATA find_data;
-    HANDLE f_findfile = FindFirstFileW( path, &find_data );
-    if ( f_findfile == INVALID_HANDLE_VALUE )
-    {
-        DWORD status = GetLastError ();
-        switch( status )
-        {
-        case ERROR_FILE_NOT_FOUND:
-        case ERROR_PATH_NOT_FOUND:
-        case ERROR_BAD_NETPATH:
-        case ERROR_BAD_NET_NAME:
-            /* try to follow the path, section by section
-               if a section cannot be found try to resolve it as
-               MS-shell-link ( .lnk file ) */
-            return KSysDirResolvePathAndDetectPathType ( path );
-        default:
-            DBGMSG ( DBG_KFS, DBG_FLAG_ANY, ( "FindFirstFileW: WARNING - unrecognized return code - %u.\n", status ) );
-            print_error_for( status, path, "FindFirstFileW", rcResolving, klogErr );
-            return kptBadPath;
-        }
-    }
-    FindClose( f_findfile );
-    return KSysDirPathTypeFromFindData ( &find_data, path, kptFile );
-}
-
-
-static
-uint32_t KSysDirFullPathType ( const wchar_t *path )
-{
-    /* recognize of odd, POSIX'ish patterns and handle them directly */
-    if ( path [ 0 ] == '/' || path [ 0 ] == '\\' )
-    {
-        /* looking exactly for "root" */
-        if ( path [ 1 ] == 0 )
-            return kptFakeRoot;
-    }
-
-	/* regognize this 'c:\' as a valid path...*/
-	if ( iswalpha( path[ 0 ] ) && path [ 1 ] == ':' && path [ 2 ] == '\\' && path[ 3 ] == 0 )
-	{
-		uint32_t path_type = kptBadPath;
-		uint32_t mask = 0;
-		if ( path[ 0 ] >= 'A' && path[ 0 ] <= 'Z' )
-		{
-			mask = ( 1 << ( path[ 0 ] - 'A' ) );
-		}
-		else if ( path[ 0 ] >= 'a' && path[ 0 ] <= 'z' )
-		{
-			mask = ( 1 << ( path[ 0 ] - 'a' ) );
-		}
-		if ( mask > 0 )
-		{
-			DWORD drivebitmask = GetLogicalDrives();	/* each logical drive has its own bit set */
-			if ( ( drivebitmask & mask ) == mask )
-				path_type = kptDir;
-		}
-		return path_type;
-	}
-	
-    /* let the file system tell us */
-    return KSysDirFullFSPathType ( path );
-}
-
-
-/* KSysDirMake
- *  allocate an uninialized object
- */
-static
-KSysDir *KSysDirMake ( size_t path_size )
-{
-    KSysDir *dir = malloc ( sizeof *dir - sizeof dir->path +
-        4 * sizeof dir -> path [ 0 ] + path_size );
-    return dir;
-}
-
-
-/* KSysDirDestroy
- */
-static
-rc_t CC KSysDirDestroy ( KSysDir *self )
-{
-    free ( self );
-    return 0;
-}
-
-/* KSysDirCanonPath
- */
-static
-rc_t KSysDirCanonPath ( const KSysDir *self, enum RCContext ctx, wchar_t *path, uint32_t path_length )
-{
-    wchar_t *low, *dst, *last, *end = path + path_length;
-
-    if ( self -> root != 0 )
-        low = path + self -> root;
-    else if ( path [ 1 ] == ':' )
-        low = path + 2;
-    else
-        low = path;
-    dst = last = low;
-
-    while( 1 )
-    {
-        wchar_t *src = wcschr ( last + 1, '\\' );
-        if ( src == NULL )
-            src = end;
-
-        /* detect special sequences */
-        switch ( src - last )
-        {
-        case 1: 
-            if ( last [ 1 ] == '\\' && last != path ) /* keep leading double slash */
-            {
-                /* "\\\\" -> "\\" */
-                last = src;
-            }
-            break;
-
-        case 2:
-            if ( last [ 1 ] == '.' )
-            {
-                /* skip over */
-                last = src;
-                if ( src != end )
-                    continue;
-            }
-            break;
-
-        case 3:
-            if ( last [ 1 ] == '.' && last [ 2 ] == '.' )
-            {
-                /* remove previous leaf in path */
-                dst [ 0 ] = 0;
-                dst = wcsrchr ( path, '\\' );
-                if ( dst == NULL || dst < low )
-                    return RC( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-
-                last = src;
-                if ( src != end )
-                    continue;
-            }
-            break;
-        }
-
-        /* if rewriting, copy leaf */
-        assert ( src >= last );
-
-        /* if rewriting, copy leaf */
-        if ( dst != last )
-            memmove ( dst, last, ( src - last ) * sizeof * dst );
-
-        /* move destination ahead */
-        dst += src - last;
-        
-        /* if we're done, go */
-        if ( src == end )
-            break;
-
-        /* find next separator */
-        last = src;
-    }
-
-    /* NUL terminate if modified */
-    if ( dst != end )
-        *dst = 0;
-
-    return 0;
-}
-
-/* KSysDirMakePath
- *  creates a full path from partial
-
- self ....... has the first (base) part of the path in wchar_t !!!
- canon ...... if true the assembled path will be "canonilized" as last step
- buffer ..... into this buffer the full-path will be assembled ( wchar_t !!! )
- path_max ... the size of the buffer in bytes
- path ....... the partial path in utf8, can contain string-subst-elements !!!
- args ....... arguments to construct the partial path in utf8 ( can be NULL )
- */
-static
-rc_t KSysDirMakeSimulatedFSPath ( const KSysDir* self, enum RCContext ctx, bool canon,
-    wchar_t *buffer, size_t path_max, const char *path, va_list args, bool fake_posix )
-{
-    int temp_size_in_bytes;
-    uint32_t i, temp_length_in_utf8_chars;
-    uint32_t buffer_length_in_wchars;
-    char temp_utf8_buffer [ MAX_PATH ];
-
-    /* check if the given partial path is not NULL and not empty */
-    if( path == NULL )
-        return RC( rcFS, rcDirectory, ctx, rcPath, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-
-    /* We construct in temp_utf8_buffer the relative path the user has given:
-    If there are no args we copy with _snprintf else we use vsnprintf,
-    !!! the args are always utf8, the given path is in utf8 !!!
-    that is the reason for the temporary utf8-buffer */
-    temp_size_in_bytes = ( args == NULL ) ?
-        _snprintf ( temp_utf8_buffer, sizeof temp_utf8_buffer, "%s", path ):
-        vsnprintf( temp_utf8_buffer, sizeof temp_utf8_buffer, path, args );
-
-    /* we check if _snprnitf/vsnprintf was sucessful */
-    if ( temp_size_in_bytes < 0 || temp_size_in_bytes >= sizeof temp_utf8_buffer )
-        return RC( rcFS, rcDirectory, ctx, rcPath, rcExcessive );
-
-    /* we measure the number of utf8-chars we have in our temp-buffer
-        only for international chars in the temp-buffer there will be
-        path_length_in_utf8_chars != path_size_in_bytes */
-    temp_length_in_utf8_chars = string_len ( temp_utf8_buffer, temp_size_in_bytes );
-
-    /* normally we don't receive native Windows paths here.
-       but there is a use below ( when creating native directory )
-       that feeds a Windows path, so deal with it here. */
-    if ( ( isalpha ( temp_utf8_buffer [ 0 ] ) && temp_utf8_buffer [ 1 ] == ':' ) ||
-         ( temp_utf8_buffer [ 0 ] == '\\' && temp_utf8_buffer [ 1 ] == '\\' )    ||
-         ( temp_utf8_buffer [ 0 ] == '/' && temp_utf8_buffer [ 1 ] == '/' ) )
-    {
-    /* in the case the path is a absolute path for windows (starting with "C:" for instance)
-        we completely ignore the path in self and use the given path only.
-        !!! except we are chrooted, in this case the given path is invalid 
-        ( no abs. path for chrooted dir's ) */
-        if ( self -> root != 0 )
-            return RC ( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-
-        /* we detected a drive or UNC path - require a further character */
-        if ( temp_utf8_buffer [ 2 ] == 0 )
-            return RC ( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-
-        buffer_length_in_wchars = 0;
-    }
-
-
-    /**************************************************/
-    /* THESE ARE EXPECTED TO BE POSIX-STYLE PATHS NOW */
-    /**************************************************/
-
-    /* relative path to directory */
-    else if ( temp_utf8_buffer [ 0 ] != '/' )
-    {
-        /* copy base of path from self */
-        assert ( self -> length >= 3 );
-        buffer_length_in_wchars = self -> length;
-    }
-    else
-    {
-        /* POSIX full path, should include drive letter or UNC slashes */
-
-        /* get chroot'd path length */
-        buffer_length_in_wchars = self -> root;
-
-        /* if the full path includes a drive letter */
-        if ( isalpha ( temp_utf8_buffer [ 1 ] ) && temp_utf8_buffer [ 2 ] == '/' )
-        {
-            /* fail if chroot'd */
-            if ( self -> root != 0 )
-                return RC ( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-
-            /* rewrite drive letter */
-            temp_utf8_buffer [ 0 ] = tolower ( temp_utf8_buffer [ 1 ] );
-            temp_utf8_buffer [ 1 ] = ':';
-        }
-        /* detect UNC path */
-        else if ( temp_utf8_buffer [ 1 ] == '/' )
-        {
-            /* fail if chroot'd */
-            if ( self -> root != 0 )
-                return RC ( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-
-            /* fail if just '//' */
-            if ( temp_utf8_buffer [ 2 ] == 0 )
-            {
-                if ( ! fake_posix )
-                    return RC ( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-
-                temp_utf8_buffer [ 1 ] = 0;
-                temp_length_in_utf8_chars = 1;
-                temp_size_in_bytes = 1;
-            }
-        }
-        else if ( self -> root == 0 )
-        {
-            /* this is a "full" path that does not appear to be convertible
-               to a Windows full path, unless we are chroot'd */
-            if ( ! fake_posix )
-                return RC ( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-
-            /* allow path like "/C" */
-            if ( isalpha ( temp_utf8_buffer [ 1 ] ) && temp_utf8_buffer [ 2 ] == 0 )
-            {
-                temp_utf8_buffer [ 0 ] = tolower ( temp_utf8_buffer [ 1 ] );
-                temp_utf8_buffer [ 1 ] = ':';
-                temp_utf8_buffer [ 2 ] = '/';
-                temp_utf8_buffer [ 3 ] = 0;
-                temp_length_in_utf8_chars = 3;
-                temp_size_in_bytes = 3;
-            }
-        }
-        else
-        {
-            /* this needs to be a valid UNC or drive path */
-            assert ( self -> root >= 3 );
-        }
-    }
-
-    /* check for buffer overrun */
-    if ( buffer_length_in_wchars + temp_length_in_utf8_chars >= path_max / sizeof * buffer )
-        return RC ( rcFS, rcDirectory, ctx, rcPath, rcExcessive );
-
-    /* prepend UTF-16 directory path */
-    if ( buffer_length_in_wchars != 0 )
-    {
-        memcpy ( buffer, self -> path, buffer_length_in_wchars * sizeof * buffer );
-
-        /* if path is relative, expect trailing '\\'
-            if path is full, expect NO trailing '\\' */
-        assert ( ( buffer_length_in_wchars == self ->length &&
-                    buffer [ buffer_length_in_wchars - 1 ] == '\\' ) ||
-                 ( buffer_length_in_wchars == self ->root &&
-                   buffer [ buffer_length_in_wchars - 1 ] != '\\' ) );
-    }
-
-    /* append the temp_utf8_buffer to the  user-supplied relative path */
-    buffer_length_in_wchars += (uint32_t)string_cvt_wchar_copy ( & buffer [ buffer_length_in_wchars ],
-        path_max - buffer_length_in_wchars * sizeof buffer [ 0 ],
-        temp_utf8_buffer, temp_size_in_bytes );
-    /* the job of the temp_utf8_buffer is done now... */
-
-    /* detect exhausted buffer */
-    if ( buffer_length_in_wchars >= path_max / sizeof * buffer )
-        return RC ( rcFS, rcDirectory, ctx, rcPath, rcExcessive );
-
-    /* must be either:
-       1) a full drive-letter path, or
-       2) an UNC path.
-       minimum path length is 3 */
-    assert ( buffer_length_in_wchars >= 3 || fake_posix );
-    assert ( buffer[ buffer_length_in_wchars ] == 0 );
-
-    if ( buffer_length_in_wchars > 3 )
-    {
-        /* remove any trailing slash added by caller */
-        while ( buffer_length_in_wchars > 3 && buffer [ buffer_length_in_wchars - 1 ] == '/' )
-            buffer [ -- buffer_length_in_wchars ] = 0;
-    }
-
-    /* convert forward to backward slashes */
-    for ( i = 0; i < buffer_length_in_wchars; ++ i )
-    {
-        if ( buffer [ i ] == '/' )
-            buffer [ i ] = '\\';
-    }
-
-    /* if caller wants canonical representation
-       or I'm chrooted, rewrite */
-    if ( buffer_length_in_wchars > 2 && ( canon || self -> root > 2 ) )
-    {
-        return KSysDirCanonPath ( self, ctx, buffer, buffer_length_in_wchars );
-    }
-
-    return 0;
-}
-
-static
-rc_t KSysDirMakePath ( const KSysDir* self, enum RCContext ctx, bool canon,
-    wchar_t *buffer, size_t path_max, const char *path, va_list args )
-{
-    return KSysDirMakeSimulatedFSPath ( self, ctx, canon, buffer, path_max, path, args, false );
-}
-
-LIB_EXPORT rc_t KSysDirOSPath ( const KSysDir *self,
-    wchar_t *real, size_t real_size, const char *path, va_list args )
-{
-    return KSysDirMakePath ( self, rcLoading, true, real, real_size, path, args );
-}
-
-/* KSysDirInit - forward declaration
- */
-static
-rc_t KSysDirInit ( KSysDir *self, enum RCContext ctx, uint32_t dad_root,
-                   const wchar_t *path, size_t path_size, uint32_t path_length, 
-                   bool update, bool chroot );
-
-/* KSysDirList
- *  create a directory listing
- *
- *  "list" [ OUT ] - return parameter for list object
- *
- *  "path" [ IN, NULL OKAY ] - optional parameter for target
- *  directory. if NULL, interpreted to mean "."
- */
-static
-rc_t CC KSysDirList ( const KSysDir *self, KNamelist **listp,
-    bool ( CC * f ) ( const KDirectory *dir, const char *name, void *data ), void *data,
-                   const char *path, va_list args )
-{
-    KSysDir full;
-    rc_t rc = KSysDirMakePath ( self, rcListing, true, full.path, sizeof full.path, path, args );
-    if ( rc == 0 )
-    {
-        size_t size_in_bytes;
-        uint32_t len_in_chars = utf16_string_measure( full.path, &size_in_bytes );
-
-        /* require space for a '\\*.*' and NUL */
-        if ( len_in_chars + 5 > sizeof full.path / sizeof full . path [ 0 ] )
-            rc = RC ( rcFS, rcDirectory, rcListing, rcPath, rcExcessive );
-        else
-        {
-            rc = KSysDirInit( &full, rcListing, self->root, NULL, size_in_bytes, len_in_chars, 0, 0 );
-            if ( rc == 0 )
-            {
-                KSysDirListing *list;
-
-                len_in_chars = full.length;
-                full . path [ len_in_chars + 0 ] = '*';
-                full . path [ len_in_chars + 1 ] = '.';
-                full . path [ len_in_chars + 2 ] = '*';
-                full . path [ len_in_chars + 3 ] = 0;
-
-                rc = VNamelistMake ( &list, 5 ); 
-                if ( rc == 0 )
-                {
-                    rc = KSysDirListingInit( list, full.path, & full.dad, f, data );
-                    if ( rc != 0 )
-                    {
-                        VNamelistRelease ( list );
-                    }
-                    else
-                    {
-                        rc = VNamelistToNamelist ( list, listp );
-                        VNamelistRelease ( list );
-                    }
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-static
-uint32_t CC KSysDirPathType ( const KSysDir *self, const char *path, va_list args )
-{
-    wchar_t full[ MAX_PATH ];
-    rc_t rc = KSysDirMakePath( self, rcAccessing, false, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        return KSysDirFullPathType( full );
-    }
-    return kptBadPath;
-}
-
-/* KSysDirVisit
- *  visit each path under designated directory,
- *  recursively if so indicated
- *
- *  "recurse" [ IN ] - if non-zero, recursively visit sub-directories
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - function to execute
- *  on each path. receives a base directory and relative path
- *  for each entry, where each path is also given the leaf name
- *  for convenience. if "f" returns non-zero, the iteration will
- *  terminate and that value will be returned. NB - "dir" will not
- *  be the same as "self".
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- */
-typedef struct KSysDirVisitData KSysDirVisitData;
-struct KSysDirVisitData
-{
-    rc_t ( CC * f ) ( KDirectory*, uint32_t, const char*, void* );
-    void *data;
-    KSysDir dir;
-    bool recurse;
-};
-
-static
-rc_t KSysDirVisitDir ( KSysDirVisitData *pb )
-{
-    /* get a directory listing */
-    rc_t rc;
-    KSysDirEnum listing;
-    uint32_t path_length;
-    size_t path_size;
-
-    /* measure length and size of the given path, we will need both... */
-    path_length = wchar_string_measure ( pb->dir.path, &path_size );
-
-    /* add a trailing backslash (windows!) if it is not there... */
-    if ( pb->dir.path[ path_length - 1 ] != '\\' )
-    {
-        /* check if there is space for another character */
-        if ( ( path_size + sizeof pb->dir.path [ 0 ] ) >= sizeof pb->dir.path )
-        {
-            return RC( rcFS, rcDirectory, rcVisiting, rcPath, rcExcessive );
-        }
-        pb->dir.path[ path_length + 0 ] = '\\';
-        pb->dir.path[ path_length + 1 ] = 0;
-        ++ path_length;
-        path_size += sizeof pb->dir.path[ 0 ];
-        pb->dir.length = path_length;
-    }
-
-    /* check if there is space for 6 more bytes ( '*.*' ) */
-    if ( ( path_size + 3 * sizeof pb->dir.path[ 0 ] ) >= sizeof pb->dir.path )
-    {
-        return RC( rcFS, rcDirectory, rcVisiting, rcPath, rcExcessive );
-    } 
-    /* append '*.*' to make KSysDirEnumInit work under Windows! */
-    pb -> dir . path [ path_length + 0 ] = '*';
-    pb -> dir . path [ path_length + 1 ] = '.';
-    pb -> dir . path [ path_length + 2 ] = '*';
-    pb -> dir . path [ path_length + 3 ] = 0;
-
-    rc = KSysDirEnumInit ( &listing, pb->dir.path );
-    if( rc == 0 )
-    {
-        const wchar_t *name;
-
-        /* truncate the appended '*.*' to visit the entries */
-        pb -> dir . path [ path_length ] = 0;
-
-        for ( name = KSysDirEnumNext( &listing ); 
-              name != NULL; 
-              name = KSysDirEnumNext( &listing ) )
-        {
-            uint32_t type, name_length;
-            size_t name_size;
-            char temp_utf8_buffer [ MAX_PATH ];
-
-            /* measure length and size of the element-name, we will need both... */
-            name_length = wchar_string_measure ( name, &name_size );
-            /* check if we have enought space for path and element-name */
-            if ( path_size + name_size >= sizeof pb->dir.path )
-            {
-                rc = RC( rcFS, rcDirectory, rcVisiting, rcPath, rcExcessive );
-                break;
-            }
-
-            /* append the element-name to the path */
-            wcscpy ( &pb->dir.path[ path_length ], name );
-            type = KSysDirFullPathType( pb->dir.path );
-            if( type == kptBadPath )
-            {
-                rc = RC( rcFS, rcDirectory, rcVisiting, rcPath, rcInvalid );
-                break;
-            }
-
-            /* the callback-function expects the name as utf8 !!! */
-            wchar_cvt_string_copy ( temp_utf8_buffer, sizeof temp_utf8_buffer, 
-                                    name, name_size );
-            rc = (*pb->f)( &pb->dir.dad, type, temp_utf8_buffer, pb->data );
-            if ( rc != 0 )
-                break;
-
-            /* if recursive visiting is requested and the element is a directory */
-            if ( pb->recurse && ( type & ( kptAlias - 1 ) ) == kptDir )
-            {
-                /* append the element-name-length temporary to the length of the path */
-                pb->dir.length += name_length;
-                /* call this function recursive */
-                rc = KSysDirVisitDir( pb );
-                /* restore the original path-length (for the caller function) */
-                pb->dir.length = path_length;
-                if ( rc != 0 )
-                    break;
-            }
-
-        } /* for () */
-
-        KSysDirEnumWhack( &listing );
-    }
-    return rc;
-}
-
-
-static
-rc_t Enumerate_DriveLetters( const KSysDir *self, 
-	rc_t ( CC * f ) ( KDirectory *dir, uint32_t type, const char *name, void *data ), void *data )
-{
-	rc_t rc = 0;
-	DWORD drivebitmask = GetLogicalDrives();	/* each logical drive has its own bit set */
-	if ( drivebitmask == 0 )
-		rc = translate_file_error( GetLastError(), rcListing );
-	else
-	{
-		uint32_t i, n, mask = 1;
-		for ( i = 0; i < 26 && rc == 0; ++i, mask <<= 1 )
-		{
-			if ( ( drivebitmask & mask ) == mask )
-			{
-				char drive[ 5 ];
-				drive[ 0 ] = 'A' + i;
-				drive[ 1 ] = 0;
-				rc = f( ( KDirectory * ) self, kptDir, ( const char * )drive, data );
-			}
-		}
-	}
-	return rc;
-}
-
-
-static
-rc_t CC KSysDirVisit ( const KSysDir *self, bool recurse,
-    rc_t ( CC * f ) ( KDirectory *dir, uint32_t type, const char *name, void *data ), void *data,
-    const char *path, va_list args )
-{
-    KSysDirVisitData pb;
-    rc_t rc = KSysDirMakeSimulatedFSPath( self, rcVisiting, true, pb.dir.path, sizeof pb.dir.path, path, args, true );
-    if ( rc == 0 )
-    {
-        size_t path_size;
-        uint32_t path_length;
-
-		uint32_t path_type = KSysDirFullPathType( pb.dir.path );
-        switch( path_type & ( kptAlias - 1 ) )
-        {
-            case kptNotFound:
-                return RC( rcFS, rcDirectory, rcVisiting, rcPath, rcNotFound );
-            case kptBadPath:
-                return RC( rcFS, rcDirectory, rcVisiting, rcPath, rcInvalid );
-            case kptDir:
-                break;
-            case kptFakeRoot:
-				return Enumerate_DriveLetters( self, f, data );
-				
-			/* call code to enumerate drives */
-            default:
-                return RC( rcFS, rcDirectory, rcVisiting, rcPath, rcIncorrect );
-        }
-
-        path_length = utf16_string_measure( pb.dir.path, &path_size );
-        rc = KSysDirInit ( & pb . dir, rcVisiting, self -> root,
-                           NULL, path_size, path_length,
-                           self -> dad . read_only ? 0 : 1, 0 );
-        if ( rc == 0 )
-        {
-            pb . f = f;
-            pb . data = data;
-            pb . recurse = recurse;
-            rc = KSysDirVisitDir ( & pb );
-        }
-    }
-    return rc;
-}
-
-/* KSysDirRelativePath
- *  makes "path" relative to "root"
- *  both "root" and "path" MUST be absolute
- *  both "root" and "path" MUST be canonical, i.e. have no "./" or "../" sequences
- *  both root and path are in windows-native format!
- */
-static
-rc_t KSysDirRelativePath ( const KSysDir *self, enum RCContext ctx,
-    const wchar_t *root, wchar_t *path, size_t path_max )
-{
-    size_t psize;
-    uint32_t backup, blength_in_chars, dst, diff_from_here;
-
-    const wchar_t *r = root + self->root;
-    const wchar_t *p = path + self->root;
-
-    /* stop gap fix..  not actually comparing the utf16 values correctly */
-    for ( ; towlower (*r) == towlower (*p); ++ r, ++ p )
-    {
-        /* disallow identical paths */
-        if ( * r == 0 )
-            return RC( rcFS, rcDirectory, ctx, rcPath, rcInvalid );
-    }
-
-    /* paths are identical up to "r","p"
-       if "r" is within a leaf name, then no backup is needed
-       by counting every '\\' from "r" to end, obtain backup count */
-    for ( backup = 0; * r != 0; ++ r )
-    {
-        if ( * r == '\\' )
-            ++ backup;
-    }
-
-    /* the number of characters to be inserted */
-    blength_in_chars = backup * 3;
-
-    /* align "p" to last directory separator */
-    if ( p > path ) {
-        while ( p [ -1 ] != '\\' ) -- p;
-    }
-
-    /* the size of the remaining relative path */
-    psize = wcslen ( p );
-    diff_from_here = ( uint32_t )( p - path );
-
-    /* open up space if needed */
-    if ( diff_from_here < blength_in_chars )
-    {
-        /* prevent overflow */
-        if ( ( blength_in_chars + psize ) * sizeof( *path ) >= path_max )
-            return RC( rcFS, rcDirectory, ctx, rcPath, rcExcessive );
-        memmove ( & path[ blength_in_chars ], p, psize * ( sizeof *p ) );
-    }
-
-    /* insert backup sequences */
-    for ( dst = 0; backup > 0; -- backup )
-    {
-        path [ dst++ ] = '.';
-        path [ dst++ ] = '.';
-        path [ dst++ ] = '\\';
-    }
-
-    /* close gap */
-    if ( diff_from_here > blength_in_chars )
-        wcscpy ( & path [ blength_in_chars ], p );
-    path[ blength_in_chars + psize ] = 0;
-
-    return 0;
-}
-
-/* KSysDirResolvePath
- *  resolves path to an absolute or directory-relative path
- *
- *  "absolute" [ IN ] - if non-zero, always give a path starting
- *  with '/'. NB - if the directory is chroot'd, the absolute path
- *  will still be relative to directory root.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character sets
- *  the resolved path will be directory relative
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target path. NB - need not exist.
- */
-static
-rc_t CC KSysDirResolvePath ( const KSysDir *self, bool absolute,
-    char *resolved, size_t rsize, const char *path, va_list args )
-{
-    wchar_t temp [ MAX_PATH ];
-    size_t temp_size;
-    uint32_t temp_length;
-
-    /* convert the utf8-input-parameter path into wchar_t */
-    rc_t rc = KSysDirMakePath ( self, rcResolving, true, temp, sizeof temp, path, args );
-    if ( rc != 0 )
-        return rc;
-
-    temp[ 0 ] = tolower( temp[ 0 ] ); /* this is important:
-                                         otherwise the comparison for is_on_same_drive_letter fails
-                                         AND
-                                         KSysDirRelativePath() fails too! */
-
-    temp_length = wchar_string_measure ( temp, &temp_size );
-    if ( absolute )
-    {
-        /* test buffer capacity */
-        if ( temp_length - self->root >= rsize )
-            return RC ( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-    }
-    else
-    {
-        /* we are on windows, only if the path has a drive letter and it is the same
-           one as in KSysDir itself, we should try to create a relative path */
-        wchar_t colon = ':';
-        bool is_on_same_drive_letter = ( iswascii ( temp[ 0 ] ) && iswascii ( self->path[ 0 ] ) &&
-                                         ( temp[ 1 ] == colon ) && ( self->path[ 1 ] == colon ) &&
-                                         ( towlower ( temp[ 0 ] ) == towlower ( self->path[ 0 ] ) ) );
-        if ( is_on_same_drive_letter )
-        {
-            rc = KSysDirRelativePath( self, rcResolving, self->path, temp, sizeof temp );
-            if ( rc == 0 )
-            {
-                uint32_t temp_length = wchar_string_measure ( temp, &temp_size );
-                if ( temp_length >= rsize )
-                    return RC ( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-            }
-        }
-        else
-        {
-            /* treat it as if absolute were requested ( see above ) */
-            if ( temp_length - self->root >= rsize )
-                return RC ( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-        }
-    }
-
-    if ( rc == 0 )
-    {
-        uint32_t i;    
-        /* convert it back to utf8 */
-        utf16_cvt_string_copy ( resolved, rsize, temp, temp_size );
-
-        /* convert it back to POSIX */
-        if ( isalpha ( resolved[ 0 ] ) && resolved[ 1 ] == ':' )
-        {
-            /* rewrite drive letter */
-            resolved[ 1 ] = tolower ( resolved [ 0 ] );
-            resolved[ 0 ] = '/';
-        }
-        
-        /* convert backward to forward slashes */
-        for ( i = 0; resolved[ i ]; ++ i )
-        {
-            if ( resolved[ i ] == '\\' )
-                resolved[ i ] = '/';
-        }
-    }
-
-    return rc;
-}
-
-/* KSysDirResolveAlias
- *  resolves an alias path to its immediate target
- *  NB - the resolved path may be yet another alias
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting an object presumed to be an alias.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character set
- */
-static
-rc_t CC KSysDirResolveAlias ( const KSysDir *self, bool absolute,
-                              char *resolved, size_t rsize,
-                              const char *alias, va_list args )
-{
-    KSysDir temp;
-    size_t temp_size;
-    uint32_t temp_length, path_type;
-    wchar_t * w_resolved;
-
-    rc_t rc = KSysDirMakePath( self, rcResolving, true, temp.path, sizeof temp.path, alias, args );
-    if ( rc != 0 )
-        return rc;
-
-    temp_length = wchar_string_measure ( temp.path, &temp_size );
-    path_type = KSysDirFullPathType ( temp.path );
-    if ( path_type == kptFile || path_type == kptDir )
-    {
-        /* if the path points to a file or a dir, then there is no alias involved at all */
-        if ( temp_size >= rsize )
-        {
-            return RC ( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-        }
-        /* we have to convert temp.path back from wchar_t to char ! */
-        wchar_cvt_string_copy ( resolved, rsize, temp.path, temp_size );
-        return 0;
-    }
-
-
-    /* trying to attach a .lnk to the path, if it resolves it is a link... */
-    if ( temp_size + 10 >= rsize )
-    {
-        return RC( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-    }
-    temp.path[ temp_length + 0 ] = '.';
-    temp.path[ temp_length + 1 ] = 'l';
-    temp.path[ temp_length + 2 ] = 'n';
-    temp.path[ temp_length + 3 ] = 'k';
-    temp.path[ temp_length + 4 ] = 0;
-
-    if ( lnk_file_resolve( temp.path, &w_resolved ) != LNK_RES_ERROR )
-    {
-        size_t w_size;
-        uint32_t w_len;
-
-        /* we have to copy the resolved path into temp to use KSysDirCanonPath() */
-        w_len = wchar_string_measure ( w_resolved, &w_size );
-        if ( w_size > sizeof temp.path )
-        {
-            free( w_resolved );
-            return RC( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-        }
-        wcscpy( temp.path, w_resolved );
-        free( w_resolved );
-
-        rc = KSysDirCanonPath( &temp, rcResolving, temp.path, w_len );
-        if ( rc == 0 )
-        {
-            /* the path in full is an absolute path
-               if outside of chroot, it's a bad link */
-            if (wstrcase_cmp (temp.path, self->root + 1,
-                              self->path, self->root + 1,self->root + 1) != 0)
-                return RC( rcFS, rcDirectory, rcResolving, rcLink, rcInvalid );
-
-            /* this is the absolute path length */
-            w_len = wchar_string_measure ( temp.path, &w_size );
-
-            /* if not requesting absolute, make self relative */
-            if( !absolute )
-            {
-                rc = KSysDirRelativePath( self, rcResolving, self->path, 
-                                          temp.path, w_len );
-                if ( rc != 0 )
-                    return rc;
-                w_len = wchar_string_measure ( temp.path, &w_size );
-            }
-            if ( ( size_t ) w_len >= rsize )
-                return RC(rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-
-            w_len = wchar_string_measure ( &(temp.path[ self -> root ]), &w_size );
-            wchar_cvt_string_copy ( resolved, rsize, &(temp.path[ self -> root ]), w_size );
-        }
-    }
-
-
-#if 0
-    /* NEXT - attach ".lnk" to the path and see if it resolves
-       if not, the supplied path simply does not exist */
-        if ( ( wcslen( full.path ) + 5 ) >= rsize )
-        {
-            return RC( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-        }
-        wcscpy( resolved, full.path );
-        wcscat( resolved, L".lnk" );
-        refnum = FindFirstFile( resolved, &info );
-        if ( refnum == INVALID_HANDLE_VALUE )
-        {
-            wcscpy( resolved, L"\0" );
-            return RC( rcFS, rcDirectory, rcResolving, rcPath, rcNotFound );
-        }
-        FindClose( refnum );
-
-        {
-
-            /* get a COM reference to the Explorer. we should be
-               able to do this in C with no problem */
-            HRESULT rslt = ERROR_INSUFFICIENT_BUFFER;
-            IShellLink *shellLink;
-            rslt = CoCreateInstance( &IID_IShellLink, 0, CLSCTX_INPROC_SERVER, &IID_IShellLink, &shellLink );
-            if( !rslt )
-            {
-                /* get a file interface that isn't attached to anything */
-                IPersistFile *persistFile;
-                rslt = shellLink->lpVtbl->QueryInterface( shellLink, &IID_IPersistFile, (void**)&persistFile );
-                if( !rslt )
-                {
-                    /* now try to do the thing
-                       the link name needs to be in Unicode */
-                    rslt = persistFile->lpVtbl->Load(persistFile, resolved, STGM_READ );
-                    if( !rslt )
-                    {
-                        /* Unicode is no longer necessary */
-                        rslt = shellLink->lpVtbl->Resolve( shellLink, 0, SLR_NO_UI + SLR_ANY_MATCH );
-                        if ( !rslt )
-                        {
-                            /* read what the path is, i.e. read the shortcut file */
-                            rslt = shellLink->lpVtbl->GetPath( shellLink, resolved, rsize, &info, 0 );
-                            if( rslt )
-                            {
-                                wcscpy( resolved, L"\0" );
-                            }
-                        }
-                    }
-                    persistFile->lpVtbl->Release( persistFile );
-                }
-                shellLink->lpVtbl->Release( shellLink );
-            }
-            if ( wcslen( resolved ) == 0 )
-            {
-                return RC( rcFS, rcDirectory, rcResolving, rcPath, rcInvalid );
-            }
-
-        }
-
-        len = wcslen( resolved );
-        if( resolved[0] == '/' )
-        {
-            full.size = 1;
-            wcscpy( full.path, resolved );
-        }
-        else
-        {
-            wchar_t *f = wcsrchr( full.path, '/' );
-            full.size = f - full.path + 1;
-            if ( full.size + len >= sizeof full.path )
-            {
-                return RC( rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-            }
-            wcscpy( f, resolved );
-        }
-        full.root = 0;
-
-        rc = KSysDirCanonPath( &full, rcResolving, full.path, len );
-        if ( rc == 0 )
-        {
-            size_t f, s;
-
-            f = wchar_string_size (full.path);
-            s = wchar_string_size (self->path);
-            /* the path in full is an absolute path
-               if outside of chroot, it's a bad link */
-            if ( wstrcase_cmp (full.path, f, self->path, s, self->root + 1 ) != 0 )
-            {
-                return RC( rcFS, rcDirectory, rcResolving, rcLink, rcInvalid );
-            }
-
-            /* this is the absolute path length */
-            len = wchar_string_size( &full.path[self->root] );
-
-            /* if not requesting absolute, make self relative */
-            if( !absolute )
-            {
-            rc = KSysDirRelativePath( self, rcResolving, self->path, full.path, sizeof full.path /*len*/ );
-                if ( rc != 0 )
-                    return rc;
-                len = wchar_string_size(full.path);
-            }
-            if ( ( size_t ) len >= rsize )
-                return RC(rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient );
-
-            wcscpy ( resolved, & full . path [ self -> root ] );
-        }
-#endif
-    return rc;
-}
-
-/* KSysDirRename
- *  rename an object accessible from directory, replacing
- *  any existing target object of the same type
- *
- *  "from" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- *
- *  "to" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- */
-static
-rc_t CC KSysDirRename ( KSysDir *self, bool force, const char *from, const char *to )
-{
-    wchar_t current_name[ MAX_PATH ];
-    rc_t rc = KSysDirMakePath ( self, rcRenaming, false, current_name, sizeof current_name, from, NULL );
-    if ( rc == 0 )
-    {
-
-        wchar_t new_name[ MAX_PATH ];
-        rc = KSysDirMakePath ( self, rcRenaming, false, new_name, sizeof new_name, to, NULL );
-        if ( rc == 0 )
-        {
-            DWORD err = 0;
-            uint32_t try = 0;
-
-            do
-            {
-                BOOL success = false;
-                if ( force ) {
-                    DWORD dwFlags = MOVEFILE_REPLACE_EXISTING;
-                    success = MoveFileEx ( current_name, new_name, dwFlags );
-                }
-                else {
-                    success = MoveFileW ( current_name, new_name );
-                }
-                if ( success )
-                {
-                    rc = 0;
-                }
-                else
-                {
-                    err = GetLastError();
-                    switch( err )
-                    {
-                        case ERROR_FILE_NOT_FOUND:
-                        case ERROR_PATH_NOT_FOUND:
-                        case ERROR_INVALID_DRIVE:
-                            return RC ( rcFS, rcDirectory, rcRenaming, rcFile, rcNotFound );
-                        case ERROR_ACCESS_DENIED:
-                            try++;
-                            Sleep( 500 ); /* sleep for a half a second */
-                            rc = RC ( rcFS, rcDirectory, rcRenaming, rcFile, rcUnauthorized );
-                            break;
-                       case ERROR_SHARING_VIOLATION:
-                           return RC ( rcFS, rcDirectory, rcRenaming, rcFile, rcBusy );
-                        default:
-                            return RC ( rcFS, rcDirectory, rcRenaming, rcNoObj, rcUnknown );
-                    }
-                }
-            } while ( err == ERROR_ACCESS_DENIED && try < 30 );
-        }
-    }
-    return rc;
-}
-
-
-/* helper function for KSysDirCreateParents() */
-static
-rc_t directory_exists( const wchar_t *path, bool *exists )
-{
-    /* try it with CreateFileW() */
-    *exists = win_path_exists( path );
-    return 0;
-#if 0
-    wchar_t temp[ MAX_PATH ];
-    WIN32_FIND_DATA find_data;
-    HANDLE h_find;
-    size_t path_size;
-    uint32_t path_length = utf16_string_measure( path, &path_size );
-
-    *exists = false;
-
-    if ( ( path_size + 10 ) > sizeof temp )
-        return RC( rcFS, rcDirectory, rcCreating, rcMemory, rcExhausted );
-
-    wcscpy( temp, path );
-    if ( temp[ path_length - 1 ] != '\\' )
-        temp[ path_length++ ] = '\\';
-    temp[ path_length + 0 ] = '*';
-    temp[ path_length + 1 ] = '.';
-    temp[ path_length + 2 ] = '*';
-    temp[ path_length + 3 ] = 0;
-
-    h_find = FindFirstFileW( temp, &find_data );
-    if ( h_find != INVALID_HANDLE_VALUE )
-    {
-        *exists = true;
-        FindClose( h_find );
-    }
-
-    return 0;
-#endif
-}
-
-
-static
-rc_t KSysDirRemoveEntry ( wchar_t *path, size_t path_max, bool force );
-
-
-static
-rc_t KSysDirEmptyDir ( wchar_t *path, size_t path_max, bool force )
-{
-    rc_t rc;
-    KSysDirEnum list;
-    size_t path_size;
-    uint32_t path_length = wchar_string_measure ( path, &path_size );
-
-    if ( ( path_size + 10 ) > path_max )
-        return RC( rcFS, rcDirectory, rcListing, rcMemory, rcExhausted );
-
-    rc = KSysDirEnumInitAll ( & list, path, path_length );
-    if ( rc != 0 )
-    {
-        rc = ResetRCContext ( rc, rcFS, rcDirectory, rcClearing );
-    }
-    else
-    {
-        const wchar_t *leaf;
-
-        /* we keep only the appended '\\' for the loop... */
-        path_length++;
-        path_size += sizeof *path;
-
-        for ( leaf = KSysDirEnumNext( &list ); 
-              leaf != NULL; 
-              leaf = KSysDirEnumNext( &list ) )
-        {
-            size_t leaf_size;
-            uint32_t leaf_length = wchar_string_measure ( leaf, &leaf_size );
-            if ( path_size + leaf_size >= path_max )
-            {
-                rc = RC ( rcFS, rcDirectory, rcClearing, rcPath, rcExcessive );
-                break;
-            }
-
-            /* wcscpy adds termination, so wprintf is safe to call */
-            wcscpy ( & path [ path_length ], leaf );
-
-            rc = KSysDirRemoveEntry ( path, path_max, force );
-            if ( rc != 0 )
-            {
-                rc = ResetRCContext ( rc, rcFS, rcDirectory, rcClearing );
-                break;
-            }
-        }
-        KSysDirEnumWhack ( & list );
-        /* restore the original path... */
-        path [ path_length - 1 ] = 0;
-    }
-    return rc;
-}
-
-
-/* KSysDirClearDir
- *  remove all directory contents
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "force" [ IN ] - if non-zero and directory entry is a
- *  sub-directory, remove recursively
- */
-static
-rc_t CC KSysDirClearDir ( KSysDir *self, bool force, const char *path, va_list args )
-{
-    wchar_t dir_name [ MAX_PATH ];
-    rc_t rc = KSysDirMakePath ( self, rcClearing, false, dir_name, sizeof dir_name, path, args );
-    if ( rc == 0 )
-        rc = KSysDirEmptyDir ( dir_name, sizeof dir_name, force );
-    return rc;
-}
-
-
-/* KSysDirRemove
- *  remove an accessible object from its directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "force" [ IN ] - if non-zero and target is a directory,
- *  remove recursively
- */
-static
-rc_t KSysDirRemoveEntry ( wchar_t *path, size_t path_max, bool force )
-{
-    if ( !DeleteFileW( path ) )
-    {
-        DWORD file_error = GetLastError();
-
-        switch ( file_error )
-        {
-        case ERROR_PATH_NOT_FOUND :
-            return 0;
-/*
-        case ERROR_ACCESS_DENIED :
-            !!! Do not use this error code here, it occurs if path is not a file, but
-            a directory instead. Handling it here would prevent the remaining code
-            from beeing executed !!!
-            return RC( rcFS, rcDirectory, rcRemoving, rcDirectory, rcUnauthorized );
-*/
-
-        default :
-#if _DEBUGGING && 0
-    OUTMSG (( "DeleteFileW returned '%#X'\n", file_error ));
-#endif
-            break;
-        }
-
-        /* we have not been able to delete it as a file,
-           we try to delete it as a directory... */
-        if ( !RemoveDirectoryW( path ) )
-        {
-            rc_t rc;
-            DWORD error = GetLastError();
-
-            /* find out if the reason is that it is not empty and force = true --->
-               in this case delete all files and directories in it 
-               and then try again... */
-            switch ( error )
-            {
-            case ERROR_DIR_NOT_EMPTY :
-                if ( force )
-                {
-                    rc = KSysDirEmptyDir ( path, path_max, force );
-                    if ( rc == 0 )
-                    {
-                        if ( !RemoveDirectoryW( path ) )
-                        {
-                            rc = RC ( rcFS, rcDirectory, rcRemoving, rcDirectory, rcUnauthorized );
-                            print_error_for( error, path, "RemoveDirectoryW", rcRemoving, klogErr );
-                        }
-                    }
-                    return rc;
-                }
-                else
-                    rc = RC ( rcFS, rcDirectory, rcRemoving, rcDirectory, rcUnauthorized );
-                break;
-
-            case ERROR_ACCESS_DENIED :
-                rc = RC ( rcFS, rcDirectory, rcRemoving, rcDirectory, rcUnauthorized );
-                break;
-
-            case ERROR_DIRECTORY: /* not a directory */
-                /* looks like it was a file after all; report the original error */
-                error = file_error;
-                print_error_for( file_error, path, "DeleteFileW", rcRemoving, klogInfo);
-                return RC ( rcFS, rcDirectory, rcRemoving, rcDirectory, rcUnauthorized );
-
-            default :
-                rc = RC ( rcFS, rcDirectory, rcCreating, rcNoObj, rcUnknown );
-                break;
-            }
-
-            print_error_for( error, path, "RemoveDirectoryW", rcRemoving, klogInfo);
-            return rc;
-        }
-    }
-    return 0;
-}
-
-
-static
-rc_t CC KSysDirRemove ( KSysDir *self, bool force, const char *path, va_list args )
-{
-    wchar_t dir_name [ MAX_PATH ];
-    rc_t rc = KSysDirMakePath ( self, rcRemoving, false, dir_name, sizeof dir_name, path, args );
-    if ( rc == 0 )
-        rc = KSysDirRemoveEntry ( dir_name, sizeof dir_name, force );
-    return rc;
-}
-
-/* KSysDirAccess
- *  get access to object
- *
- *  "access" [ OUT ] - return parameter for Unix access mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-
-#define DEFAULT_WIN_ACCESS   0555
-#define DEFAULT_WRITE_ACCESS 0222
-
-
-/* FromMSDN */
-#define UNIX_EPOCH_IN_WIN       116444736000000000
-#define UINX_TIME_UNITS_IN_WIN  10000000
-static __inline__
-void KTimeToWinTime ( KTime_t unix, LPFILETIME win )
-{
-    uint64_t ll = ( ( unix * UINX_TIME_UNITS_IN_WIN ) + UNIX_EPOCH_IN_WIN );
-    win->dwLowDateTime = (DWORD)ll;
-    win->dwHighDateTime = ll >> 32;
-}
-
-
-static __inline__
-KTime_t WinTimeToKTime ( LPFILETIME win )
-{
-    uint64_t ll = (uint64_t)win->dwLowDateTime + ((int64_t)win->dwHighDateTime << 32);
-
-/*     DBGMSG(DBG_KFS,DBG_FLAG(DBG_KFS_DIR),("%s %x %x %lx %lx\n", */
-/*                                           __func__,win->dwLowDateTime,win->dwHighDateTime, */
-/*                                           ll,( ll - UNIX_EPOCH_IN_WIN ) / 10000000)); */
-
-    /* if its negative, so be it */
-    return ( ll - UNIX_EPOCH_IN_WIN ) / UINX_TIME_UNITS_IN_WIN;
-}
-
-
-static __inline
-rc_t get_attributes ( const wchar_t * wpath, uint32_t * access, KTime_t * date )
-{
-    WIN32_FIND_DATA fd;
-    rc_t rc;
-    HANDLE h = FindFirstFile ( wpath, &fd );
-    if ( h != INVALID_HANDLE_VALUE )
-    {
-        if ( access != NULL )
-        {
-/* TBD - track user's main group and group Everyone */
-            *access = DEFAULT_WIN_ACCESS |
-                (((fd.dwFileAttributes & FILE_ATTRIBUTE_READONLY) == FILE_ATTRIBUTE_READONLY)
-                 ? 0 : DEFAULT_WRITE_ACCESS);
-        }
-        if ( date != NULL )
-        {
-            *date = WinTimeToKTime ( &fd.ftLastWriteTime );
-        }
-        FindClose ( h );
-        return 0;
-    }
-
-/* TBD check values in error */
-    if ( access != NULL )
-        *access = 0;
-    if ( date != NULL )
-        *date = 0;
-
-    rc = print_error_for( GetLastError(), wpath, "FindFirstFile", rcAccessing, klogErr );
-    return rc;
-}
-
-
-static
-rc_t CC KSysDirVAccess ( const KSysDir *self,
-    uint32_t *access, const char *path, va_list args )
-{
-    wchar_t winpath [ MAX_PATH ];
-    rc_t rc = KSysDirMakePath ( self, rcAccessing, false, winpath, sizeof winpath, path, args );
-    if ( rc == 0 )
-        rc = get_attributes ( winpath, access, NULL );
-    return rc;
-}
-
-/* KSysDirSetAccess
- *  set access to object a la Unix "chmod"
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "access" [ IN ] and "mask" [ IN ] - definition of change
- *  where "access" contains new bit values and "mask defines
- *  which bits should be changed.
- *
- *  "recurse" [ IN ] - if non zero and "path" is a directory,
- *  apply changes recursively.
- */
-static
-rc_t KSysDirChangeAccess ( char *path, size_t path_max,
-    uint32_t access, uint32_t mask, bool recurse );
-
-    
-static
-rc_t KSysDirChangeDirAccess ( char *path, size_t path_max,
-    uint32_t access, uint32_t mask )
-{
-    /*
-    KSysDirEnum list;
-    rc_t rc = KSysDirEnumInit ( & list, path );
-    if ( rc == 0 )
-    {
-        bool eperm = false;
-        size_t path_size = strlen ( path );
-        path [ path_size ] = '/';
-        if ( ++ path_size == path_max )
-            rc = RC(rcFS, rcDirectory, rcUpdating, rcBuffer, rcInsufficient );
-        else
-        {
-            const char *leaf;
-            while ( ( leaf = KSysDirEnumNext ( & list ) ) != NULL )
-            {
-                size_t leaf_size = strlen ( leaf );
-                if ( path_size + leaf_size >= path_max )
-                {
-                    rc = RC(rcFS, rcDirectory, rcUpdating, rcBuffer, rcInsufficient );
-                    break;
-                }
-
-                strcpy ( & path [ path_size ], leaf );
-                rc = KSysDirChangeAccess ( path, path_max, access, mask, 1 );
-                if ( rc != 0 )
-                {
-                    if ( GetRCState ( rc ) != rcUnauthorized )
-                        break;
-                    eperm = true;
-                    rc = 0;
-                }
-            }
-
-            path [ path_size - 1 ] = 0;
-        }
-
-        KSysDirEnumWhack ( & list );
-
-        if ( rc == 0 && eperm )
-            rc = RC(rcFS, rcDirectory, rcUpdating, rcDirectory, rcUnauthorized );
-    }
-    return rc;
-    */
-    return 0;
-}
-
-
-static
-rc_t KSysDirChangeEntryAccess ( char *path, size_t path_max,
-    uint32_t access, uint32_t mask, uint32_t st_mode )
-{
-#if 0
-    /* keep old bits
-       we have no chmod in Windows - leave it blank... */
-    access &= mask;
-    access |= st_mode & ~ mask;
-
-    if ( chmod ( path, access & 07777 ) != 0 )
-        switch ( errno )
-        {
-        case EPERM:
-        case EACCES:
-        case EROFS:
-            return RC(rcFS, rcDirectory, rcUpdating, rcDirectory, rcUnauthorized );
-        case ENOTDIR:
-        case ELOOP:
-            return RC(rcFS, rcDirectory, rcUpdating, rcPath, rcInvalid );
-        case ENAMETOOLONG:
-            return RC(rcFS, rcDirectory, rcUpdating, rcPath, rcExcessive );
-        case ENOENT:
-            return RC(rcFS, rcDirectory, rcUpdating, rcPath, rcNotFound );
-        case ENOMEM:
-            return RC(rcFS, rcDirectory, rcUpdating, rcMemory, rcExhausted );
-        default:
-            return RC(rcFS, rcDirectory, rcUpdating, rcNoObj, rcUnknown );
-        }
-#endif
-    return 0;
-}
-
-
-static
-rc_t KSysDirChangeAccess ( char *path, size_t path_max,
-    uint32_t access, uint32_t mask, bool recurse )
-{
-    /*
-    struct stat st;
-    if ( stat ( path, & st ) != 0 ) switch ( errno )
-    {
-    case ENOENT:
-        return RC(rcFS, rcDirectory, rcUpdating, rcPath, rcNotFound );
-    case ENOTDIR:
-    case ELOOP:
-        return RC(rcFS, rcDirectory, rcUpdating, rcPath, rcInvalid );
-    case ENAMETOOLONG:
-        return RC(rcFS, rcDirectory, rcUpdating, rcPath, rcExcessive );
-    case EACCES:
-        return RC(rcFS, rcDirectory, rcUpdating, rcDirectory, rcUnauthorized );
-    case ENOMEM:
-        return RC(rcFS, rcDirectory, rcUpdating, rcMemory, rcExhausted );
-    default:
-        return RC(rcFS, rcDirectory, rcUpdating, rcNoObj, rcUnknown );
-    }
-
-    if ( recurse && S_ISDIR ( st . st_mode ) )
-    {
-        rc_t rc;
-        uint32_t enable = access & mask;
-        if ( enable != 0 )
-        {
-            rc = KSysDirChangeEntryAccess ( path, path_max,
-                access, enable, st . st_mode );
-            if ( rc != 0 )
-                return rc;
-        }
-
-       rc = KSysDirChangeDirAccess ( path, path_max, access, mask );
-        if ( rc == 0 )
-        {
-            uint32_t disable = ~ access & mask;
-            if ( disable != 0 )
-            {
-                rc = KSysDirChangeEntryAccess ( path, path_max,
-                    access, disable, st . st_mode | enable );
-            }
-        }
-        return rc;
-    }
-
-    return KSysDirChangeEntryAccess ( path, path_max,
-         access, mask, st . st_mode );
-    */
-    return 0;
-}
-
-
-static
-rc_t CC KSysDirSetAccess ( KSysDir *self, bool recurse,
-    uint32_t access, uint32_t mask, const char *path, va_list args )
-{
-    rc_t rc = 0;
-    /*
-    char full[MAX_PATH];
-    rc_t rc = KSysDirMakePath ( self, rcUpdating, false, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        if ( mask == 0 )
-            mask = 07777;
-
-        rc = KSysDirChangeAccess ( full, sizeof full,
-            access, mask & 07777, recurse );
-    }
-    */
-    return rc;
-}
-
-
-/* make_dir()
- *  helper function that encapsulates the OS-specific call
- *  to create a directory - the return codes are used by the
- *  caller-functions to decide what to do in case of a error...
- *  the callers are: KSysDirCreateParents() and KSysDirCreateDir()
- *  special on windows: path is wchar_t and we ignore access !!!
- *  TBD: translate access into a windows security descriptor...
- *       find out the other possible ERROR_* 's produced 
- */
-static
-rc_t make_dir ( const wchar_t *path, uint32_t access )
-{
-    rc_t rc = 0;
-    /* try to create the directory */
-    if ( !CreateDirectoryW ( path, NULL ) )
-    {
-        DWORD error = GetLastError();
-        rc = translate_file_error( error, rcCreating );
-/*
-        Do not print an error code here, it is valid that this can happen!
-        rc = print_error_for( error, path, "CreateDirectoryW", rcCreating, klogErr );
-*/
-    }
-    return rc;
-}
-
-
-#if OLD_CREATE_PARENTS
-static
-rc_t check_and_make( wchar_t *path, uint32_t access )
-{
-    bool exists;
-    rc_t rc = directory_exists( path, &exists );
-    if ( rc == 0 && !exists )
-    {
-        rc = make_dir ( path, access );
-    }
-    return rc;
-}
-#endif
-
-
-/* KSysDirCreateParents
- *  creates missing parent directories
- *  Windows special: path is wide-char, separator is back-slash, 
- *  starts with drive-letter...
- */
-static
-rc_t KSysDirCreateParents ( const KSysDir *self, wchar_t *path, uint32_t access, bool strip )
-{
-#if ! OLD_CREATE_PARENTS
-    rc_t rc;
-    size_t len;
-    wchar_t *p, *par = path;
-
-    /* if directory is chroot'd, skip past root and slash */
-    if ( self -> root != 0 )
-        par += self -> root + 1;
-    else
-    {
-        /* skip drive letter */
-        if ( path [ 1 ] == ':' )
-            par += 2;
-    /* skip slashes, network or otherwise */
-        while ( par [ 0 ] == '\\' )
-            ++ par;
-    }
-
-    len = wcslen ( par );
-
-    if ( ! strip )
-        p = par + len;
-    else
-    {
-        p = wcsrchr ( par, '\\' );
-        if ( p == NULL )
-            return 0;
-        len = p - par;
-    }
-
-    while ( 1 )
-    {
-        /* crop string */
-        p [ 0 ] = 0;
-
-        /* try to create directory */
-        rc = make_dir ( path, access );
-        if ( GetRCState ( rc ) != rcNotFound )
-            break;
-
-        /* back up some more */
-        p = wcsrchr ( par, '\\' );
-        if ( p == NULL )
-        {
-            p = par + wcslen ( par );
-            break;
-        }
-    }
-
-    par += len;
-    assert ( p != NULL );
-
-    /* create directories from here */
-    if ( rc == 0 ) while ( p < par )
-    {
-        p [ 0 ] = '\\';
-        rc = make_dir ( path, access );
-        if ( rc != 0 || ++ p >= par )
-            break;
-        p += wcslen ( p );
-    }
-
-    /* repair stripped path */
-    if ( strip )
-        par [ 0 ] = '\\';
-
-    return rc;
-
-#else
-
-    rc_t rc;
-    wchar_t *separator = path;
-    bool finished;
-
-    do
-    {
-        /* find the next separator */
-        separator = wcschr( separator + 1, '\\' );
-
-        /* we are finished, if not found */
-        finished = (bool)( separator == NULL );
-        if ( !finished )
-        {
-            /* temporary terminate at the separator */
-            *separator = 0;
-            rc = check_and_make( path, access );
-            finished = (bool)( rc != 0 );
-            /* put the terminator back in place... */
-            *separator = '\\';
-        }
-    } while ( !finished );
-
-    /* finally test and make the whole path... */
-    rc = check_and_make( path, access );
-
-    return rc;
-#endif
-}
-
-/* KSysDirCreateAlias
- *  creates a path alias according to create mode
- *
- *  "targ" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target alias
- *
- *  "access" [ IN ] - standard Unix directory access mode
- *  used when "mode" has kcmParents set and alias path does
- *  not exist.
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- */
-static
-rc_t CC KSysDirCreateAlias ( KSysDir *self, uint32_t access, KCreateMode mode,
-                             const char *targ, const char *alias )
-{
-    wchar_t w_target[ MAX_PATH ];
-    rc_t rc = KSysDirMakePath ( self, rcCreating, true, w_target, sizeof w_target, targ, NULL );
-    if ( rc == 0 )
-    {
-        wchar_t w_alias[ MAX_PATH ];
-        rc = KSysDirMakePath ( self, rcCreating, true, w_alias, sizeof w_alias, alias, NULL );
-        if ( rc == 0 )
-        {
-            bool alias_ok = true;
-            if ( ! has_lnk_extension( w_alias ) ) /* lnk_tools.c */
-                alias_ok = add_lnk_extension( w_alias, sizeof w_alias ); /* lnk_tools.c */
-
-            if ( lnk_file_exists( w_alias ) )
-            {
-                DeleteFileW( w_alias );
-                alias_ok = ( ! lnk_file_exists( w_alias ) );
-            }
-
-            if ( alias_ok )
-            {
-                /* if "alias" is relative or "self" is chroot'd,
-                   "w_alias" must be made relative */
-                if ( alias [ 0 ] != '/' || self -> root != 0 )
-                {
-                    rc = KSysDirRelativePath ( self, rcCreating, w_alias, w_target, sizeof w_target );
-                    if ( rc != 0 )
-                        return rc;
-                }
-                if ( win_CreateLink( w_target, w_alias, NULL ) ) /* lnk_tools.c */
-                    rc = 0;
-                else
-                    rc = translate_file_error( GetLastError (), rcCreating );
-            }
-            else
-                rc = RC ( rcFS, rcDirectory, rcCreating, rcMemory, rcExhausted ); 
-        }
-    }
-    return rc;
-}
-
-
-/* KSysDirOpenFileRead
- *  opens an existing file with read-only access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-static
-rc_t CC KSysDirOpenFileRead ( const KSysDir *self,
-    const KFile **f, const char *path, va_list args )
-{
-    wchar_t file_name[ MAX_PATH ];
-    rc_t rc = KSysDirMakePath( self, rcOpening, false, file_name, sizeof file_name, path, args );
-    if ( rc == 0 )
-    {
-        HANDLE file_handle = CreateFileW( file_name, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, 
-                                OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
-        if ( file_handle == INVALID_HANDLE_VALUE )
-        {
-            rc = print_error_for( GetLastError(), file_name, "CreateFileW", rcOpening, klogInfo );
-        }
-        else
-        {
-            char buffer[ MAX_PATH ];
-            wchar_2_char( file_name, buffer, sizeof buffer );
-            rc = KSysFileMake ( ( KSysFile** ) f, file_handle, buffer, true, false );
-            if ( rc != 0 )
-                CloseHandle ( file_handle );
-        }
-    }
-    return rc;
-}
-
-/* KSysDirOpenFileWrite
- *  opens an existing file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- */
-static
-rc_t CC KSysDirOpenFileWrite ( KSysDir *self,
-    KFile **f, bool update, const char *path, va_list args )
-{
-    wchar_t file_name[ MAX_PATH ];
-    rc_t rc = KSysDirMakePath ( self, rcOpening, false, file_name, sizeof file_name, path, args );
-    if ( rc == 0 )
-    {
-        DWORD dwDesiredAccess = update ? GENERIC_READ | GENERIC_WRITE : GENERIC_WRITE;
-        HANDLE file_handle = CreateFileW( file_name, dwDesiredAccess, FILE_SHARE_READ, NULL, 
-                                OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL );
-
-        if ( file_handle == INVALID_HANDLE_VALUE )
-        {
-            rc = print_error_for( GetLastError(), file_name, "CreateFileW", rcAccessing, klogErr );
-
-        }
-        else
-        {
-            char buffer[ MAX_PATH ];
-            wchar_2_char( file_name, buffer, sizeof buffer );
-            rc = KSysFileMake ( ( KSysFile** ) f, file_handle, buffer, update, true );
-            if ( rc != 0 )
-                CloseHandle ( file_handle );
-        }
-    }
-    return rc;
-}
-
-/* KSysDirCreateFile
- *  opens a file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- */
-static
-rc_t CC KSysDirCreateFile ( KSysDir *self, KFile **f, bool update,
-    uint32_t access, KCreateMode cmode, const char *path_fmt, va_list args )
-{
-    wchar_t file_name[ MAX_PATH ];
-    rc_t rc = KSysDirMakePath( self, rcCreating, true, file_name, sizeof file_name, path_fmt, args );
-    if ( rc == 0 )
-    {
-        HANDLE file_handle;
-        DWORD dwDesiredAccess = update ? GENERIC_READ | GENERIC_WRITE : GENERIC_WRITE;
-        DWORD dwCreationDisposition = CREATE_ALWAYS;
-        DWORD dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL;
-        DWORD dwShareMode = FILE_SHARE_READ;
-
-        switch ( cmode & kcmValueMask )
-        {
-        case kcmOpen : /* open if it exists, create if it does not exist */
-            dwCreationDisposition = OPEN_ALWAYS;
-            break;
-
-        case kcmInit : /* always create, if it already exists truncate to zero */
-            dwCreationDisposition = CREATE_ALWAYS;
-            break;
-
-        case kcmCreate : /* create and open only if does not already exist */
-            dwCreationDisposition = CREATE_NEW;
-            break;
-        case kcmSharedAppend :
-            dwCreationDisposition = OPEN_ALWAYS;
-            dwDesiredAccess = FILE_APPEND_DATA;
-            dwFlagsAndAttributes |= FILE_FLAG_WRITE_THROUGH;
-            dwShareMode |= FILE_SHARE_WRITE;
-            break;
-        }
-
-        file_handle = CreateFileW ( file_name, dwDesiredAccess, dwShareMode,
-            NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL );
-        while ( file_handle == INVALID_HANDLE_VALUE )
-        {
-            DWORD error;
-
-            if ( ( cmode & kcmParents ) != 0 )
-            {
-                /* maybe there were missing parent directories */
-                uint32_t dir_access = access |
-                    ( ( access & 0444 ) >> 2 ) | ( ( access & 0222 ) >> 1 );
-                KSysDirCreateParents ( self, file_name, dir_access, true );
-
-                /* try creating the file again */
-                file_handle = CreateFileW ( file_name, dwDesiredAccess, dwShareMode,
-                    NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL );
-                if ( file_handle != INVALID_HANDLE_VALUE )
-                    break;
-            }
-
-            error = GetLastError();
-            rc = translate_file_error( error, rcCreating );
-
-            /* disabled 12/12/2012 : it prints an error message, if vdb tries to open
-               the same reference-object twice via http. The lock-file for the 2nd try
-               does already exist. This is not an error, just a condition. */
-
-            /*
-            PLOGERR ( klogErr,
-                      ( klogErr, rc, "error CreateFileW - $(E) - $(C)",
-                        "E=%!,C=%u", error, error ) ); 
-            */
-
-            /* Unix code has a special case when creating an empty file, which is
-               to say, creating a directory entry without needing to write to file */
-            return rc;
-        }
-
-        {
-            char buffer[ MAX_PATH ];
-            char path[4096];
-            int size = ( args == NULL) ?
-                snprintf  ( path, sizeof path, "%s", path_fmt) :
-                vsnprintf ( path, sizeof path, path_fmt, args );
-            if ( size < 0 || size >= ( int ) sizeof path )
-                rc = RC ( rcFS, rcFile, rcCreating, rcPath, rcExcessive );
-            else
-            {
-                wchar_2_char( file_name, buffer, sizeof buffer );
-                rc = KSysFileMake ( ( KSysFile** ) f, file_handle, path, update, true );
-            }
-            if ( rc != 0 )
-                CloseHandle ( file_handle );
-        }
-    }
-    return rc;
-}
-
-/* KSysDirFileSize
- *  returns size in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KSysDirFileSize ( const KSysDir *self,
-    uint64_t *size, const char *path, va_list args )
-{
-    wchar_t file_name[ MAX_PATH ];
-    rc_t rc = KSysDirMakePath( self, rcAccessing, false, file_name, sizeof file_name, path, args );
-    if ( rc == 0 )
-    {
-        WIN32_FILE_ATTRIBUTE_DATA file_data;
-        if ( GetFileAttributesEx ( file_name, GetFileExInfoStandard, &file_data ) )
-        {
-            *size = file_data.nFileSizeHigh;
-            *size <<= 32;
-            *size |= file_data.nFileSizeLow;
-        }
-        else
-        {
-            rc = print_error_for( GetLastError(), file_name, "GetFileAttributesEx", rcAccessing, klogErr );
-        }
-    }
-    return rc;
-}
-
-/* KSysDirSetFileSize
- *  sets size in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KSysDirSetFileSize ( KSysDir *self,
-    uint64_t size, const char *path, va_list args )
-{
-    wchar_t file_name[ MAX_PATH ];
-    rc_t rc = KSysDirMakePath ( self, rcUpdating, false, file_name, sizeof file_name, path, args );
-    if ( rc == 0 )
-    {
-        HANDLE file_handle = CreateFileW( file_name, GENERIC_READ | GENERIC_WRITE, 0, NULL, 
-                                OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL );
-        if ( file_handle != INVALID_HANDLE_VALUE )
-        {
-            DWORD file_pos_low, file_pos_high, file_set_res;
-
-            file_pos_low = (DWORD)( size & 0xFFFFFFFF );
-            size >>= 32;
-            file_pos_high = (DWORD)( size & 0xFFFFFFFF );
-            file_set_res = SetFilePointer ( file_handle, file_pos_low, (PLONG)&file_pos_high, FILE_BEGIN );
-            if ( file_set_res != INVALID_SET_FILE_POINTER )
-            {
-                if ( SetEndOfFile ( file_handle ) )
-                    rc = 0; /* success !!! */
-                else
-                    rc = translate_file_error( GetLastError(), rcUpdating );
-            }
-            CloseHandle ( file_handle );
-        }
-        else
-        {
-            rc = print_error_for( GetLastError(), file_name, "CreateFileW", rcUpdating, klogErr );
-        }
-    }
-    return rc;
-}
-
-/* KSysDirOpenDirRead
- * KSysDirOpenDirUpdate
- *  opens a sub-directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "chroot" [ IN ] - if non-zero, the new directory becomes
- *  chroot'd and will interpret paths beginning with '/'
- *  relative to itself.
- */
-static
-rc_t CC KSysDirOpenDirRead ( const KSysDir *self,
-     const KDirectory **subp, bool chroot, const char *path, va_list args )
-{
-    wchar_t dir_name[ MAX_PATH ];
-    rc_t rc = KSysDirMakePath ( self, rcOpening, true, dir_name, sizeof dir_name, path, args );
-    if ( rc == 0 )
-    {
-        int t;
-        KSysDir *sub;
-
-        size_t dir_size;
-        uint32_t dir_length = utf16_string_measure( dir_name, &dir_size );
-        uint32_t length_org = dir_length;
-        while ( dir_length > 0 && dir_name [ dir_length - 1 ] == '/' )
-            dir_name [ -- dir_length ] = 0;
-        if ( dir_length != length_org )
-            dir_length = utf16_string_measure( dir_name, &dir_size );
-
-        t = KSysDirFullPathType ( dir_name ) & ( kptAlias - 1 );
-        if ( t == kptNotFound )
-            return RC ( rcFS, rcDirectory, rcOpening, rcPath, rcNotFound );
-        if ( t != kptDir )
-            return RC(rcFS, rcDirectory, rcOpening, rcPath, rcIncorrect );
-
-        sub = KSysDirMake ( dir_size );
-        if ( sub == NULL )
-            rc = RC(rcFS, rcDirectory, rcOpening, rcMemory, rcExhausted );
-        else
-        {
-            rc = KSysDirInit ( sub, rcOpening, self -> root, dir_name, 
-                               dir_size, dir_length, false, chroot );
-            if ( rc == 0 )
-            {
-                * subp = & sub -> dad;
-                return 0;
-            }
-
-            free ( sub );
-        }
-    }
-    return rc;
-}
-
-static
-rc_t CC KSysDirOpenDirUpdate ( KSysDir *self,
-    KDirectory **subp, bool chroot, const char *path, va_list args )
-{
-    wchar_t dir_name[ MAX_PATH ];
-    rc_t rc = KSysDirMakePath ( self, rcOpening, true, dir_name, sizeof dir_name, path, args );
-    if ( rc == 0 )
-    {
-        KSysDir *sub;
-
-        size_t dir_size;
-        uint32_t dir_length = utf16_string_measure( dir_name, &dir_size );
-        uint32_t length_org = dir_length;
-        while ( dir_length > 0 && dir_name [ dir_length - 1 ] == '/' )
-            dir_name [ -- dir_length ] = 0;
-        if ( dir_length != length_org )
-            dir_length = utf16_string_measure( dir_name, &dir_size );
-
-        switch ( KSysDirFullPathType ( dir_name ) )
-        {
-        case kptNotFound:
-            return RC( rcFS, rcDirectory, rcOpening, rcPath, rcNotFound );
-        case kptBadPath:
-            return RC( rcFS, rcDirectory, rcOpening, rcPath, rcInvalid );
-        case kptDir:
-        case kptDir | kptAlias:
-            break;
-        default:
-            return RC( rcFS, rcDirectory, rcOpening, rcPath, rcIncorrect );
-        }
-
-        sub = KSysDirMake ( dir_size );
-        if ( sub == NULL )
-            rc = RC( rcFS, rcDirectory, rcOpening, rcMemory, rcExhausted );
-        else
-        {
-            rc = KSysDirInit ( sub, rcOpening, self -> root, dir_name, 
-                               dir_size, dir_length, true, chroot );
-            if ( rc == 0 )
-            {
-                * subp = & sub -> dad;
-                return 0;
-            }
-
-            free ( sub );
-        }
-    }
-    return rc;
-}
-
-/* KSysDirCreateDir
- *  create a sub-directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "access" [ IN ] - standard Unix directory permissions
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- */
-static
-rc_t CC KSysDirCreateDir ( KSysDir *self,
-    uint32_t access, KCreateMode mode, const char *path, va_list args )
-{
-    wchar_t dir_name[ MAX_PATH ];
-    rc_t rc = KSysDirMakePath ( self, rcCreating, true, dir_name, sizeof dir_name, path, args );
-    if ( rc == 0 )
-    {
-        if ( ( mode & kcmValueMask ) == kcmCreate )
-        {
-            switch ( KSysDirFullPathType ( dir_name ) )
-            {
-            case kptNotFound:
-                break;
-            case kptBadPath:
-                return RC(rcFS, rcDirectory, rcCreating, rcPath, rcInvalid );
-            case kptDir:
-                return RC(rcFS, rcDirectory, rcCreating, rcDirectory, rcExists );
-            default:
-                return RC(rcFS, rcDirectory, rcCreating, rcPath, rcIncorrect );
-            }
-        }
-        rc = make_dir ( dir_name, access );
-        if ( rc != 0 )
-        {
-            switch ( GetRCState ( rc ) )
-            {
-            case rcExists:
-                rc = 0;
-                if ( ( mode & kcmValueMask ) == kcmInit )
-                    rc = KSysDirEmptyDir ( dir_name, sizeof dir_name, 1 );
-                break;
-            case rcNotFound:
-                if ( ( mode & kcmParents ) != 0 )
-                    rc = KSysDirCreateParents ( self, dir_name, access, false );
-                break;
-            }
-        }
-    }
-    return rc;
-}
-
-/* KSysDirDate
- *  get access to object
- *
- *  "date" [ OUT ] - return parameter for Unix access mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-static
-rc_t CC KSysDirVDate ( const KSysDir *self,
-    KTime_t * date, const char *path, va_list args )
-{
-    wchar_t full [ MAX_PATH ];
-    rc_t rc = KSysDirMakePath ( self, rcAccessing, false, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        rc = get_attributes ( full, NULL, date );
-    }
-    return rc;
-}
-
-
-static
-rc_t change_item_date( wchar_t *path, LPFILETIME win_time, bool dir_flag )
-{
-    rc_t rc;
-    HANDLE file_handle;
-
-    if ( dir_flag )
-        file_handle = CreateFileW( path, GENERIC_READ | GENERIC_WRITE, 0, NULL, 
-                                   OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL );
-    else
-        file_handle = CreateFileW( path, GENERIC_READ | GENERIC_WRITE, 0, NULL, 
-                                   OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL );
-    if ( file_handle == INVALID_HANDLE_VALUE )
-    {
-        rc = print_error_for( GetLastError(), path, "CreateFileW", rcUpdating, klogErr );
-    }
-    else
-    {
-        if ( SetFileTime ( file_handle, NULL, NULL, win_time ) )
-        {
-            rc = 0;
-        }
-        else
-        {
-            rc = print_error_for( GetLastError(), path, "SetFileTime", rcUpdating, klogErr );
-        }
-        CloseHandle ( file_handle );
-    }
-
-    return rc;
-}
-
-
-static
-rc_t change_dir_date( wchar_t *path, size_t path_max, LPFILETIME win_time, bool recurse )
-{
-    KSysDirEnum list;
-    const wchar_t *leaf;
-    size_t path_size;
-    uint32_t path_length;
-
-    rc_t rc = change_item_date( path, win_time, true );
-    if ( rc != 0 || !recurse )
-        return rc;
-
-    path_length = wchar_string_measure ( path, &path_size );
-    if ( ( path_size + 10 ) > path_max )
-        return RC( rcFS, rcDirectory, rcListing, rcMemory, rcExhausted );
-
-    rc = KSysDirEnumInitAll ( & list, path, path_length );
-    if ( rc != 0 )
-        return ResetRCContext ( rc, rcFS, rcDirectory, rcUpdating );
-
-    /* we keep only the appended '\\' for the loop... */
-    path_length++;
-    path_size += sizeof *path;
-
-    for ( leaf = KSysDirEnumNext( &list ); 
-          leaf != NULL && rc == 0; 
-          leaf = KSysDirEnumNext( &list ) )
-    {
-        size_t leaf_size;
-        int32_t path_type;
-        uint32_t leaf_length = wchar_string_measure ( leaf, &leaf_size );
-        if ( path_size + leaf_size >= path_max )
-            rc = RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcExcessive );
-        else
-        {
-
-            /* wcscpy adds termination, so wprintf is safe to call */
-            wcscpy ( & path [ path_length ], leaf );
-
-            path_type = KSysDirFullPathType ( path );
-            switch( path_type )
-            {
-            case kptFile : rc = change_item_date( path, win_time, false );
-                           break;
-            case kptDir  : rc = change_dir_date( path, path_max, win_time, true );
-                           break;
-            }
-        }
-    }
-
-    KSysDirEnumWhack ( & list );
-    /* restore the original path... */
-    path [ path_length - 1 ] = 0;
-
-    return rc;
-}
-
-
-static
-rc_t KSysDirChangeDate ( wchar_t *path, size_t path_max,
-            KTime_t date, bool recurse )
-{
-    FILETIME win_time;
-    int32_t path_type;
-    rc_t rc;
-
-    KTimeToWinTime ( date, &win_time );
-    path_type = KSysDirFullPathType ( path );
-    switch( path_type )
-    {
-    case kptFile : rc = change_item_date( path, &win_time, false );
-                   break;
-
-    case kptDir  : rc = change_dir_date( path, path_max, &win_time, recurse );
-                   break;
-
-    default      : rc = RC( rcFS, rcDirectory, rcUpdating, rcNoObj, rcUnsupported );
-                   break;
-    }
-    return rc;
-}    
-
-
-/*
-    struct stat st;
-    struct utimbuf u;
-
-    if ( stat ( path, & st ) != 0 ) switch ( errno )
-    {
-    case ENOENT:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcNotFound );
-    case ENOTDIR:
-    case ELOOP:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcInvalid );
-    case ENAMETOOLONG:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcPath, rcExcessive );
-    case EACCES:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcDirectory, rcUnauthorized );
-    case ENOMEM:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcMemory, rcExhausted );
-    default:
-        return RC ( rcFS, rcDirectory, rcUpdating, rcNoObj, rcUnknown );
-    }
-    u . actime = u . modtime = date;
-
-    if ( recurse && S_ISDIR ( st . st_mode ) )
-    {
-        rc_t rc;
-
-    rc = KSysDirChangeEntryDate ( path, path_max, & u );
-    if ( rc != 0 )
-        return rc;
-
-    rc = KSysDirChangeDirDate ( path, path_max, date );
-        if ( rc == 0 )
-        {
-        rc = KSysDirChangeEntryDate ( path, path_max, & u  );
-        }
-        return rc;
-    }
-
-    return  KSysDirChangeEntryDate ( path, path_max, & u );
-*/
-
-static
-rc_t CC KSysDirVSetDate ( KSysDir * self, bool recurse,
-    KTime_t date, const char *path, va_list args )
-{
-    wchar_t full [ MAX_PATH ];
-    rc_t rc = KSysDirMakePath ( self, rcUpdating, false, full, sizeof full, path, args );
-    if ( rc == 0 )
-    {
-        rc = KSysDirChangeDate ( full, sizeof full, date, recurse );
-    }
-    return rc;
-}
-
-static
-KSysDir *CC KSysDirGetSysdir ( const KSysDir *cself )
-{
-    return ( KSysDir* ) cself;
-}
-
-static KDirectory_vt_v1 vtKSysDir =
-{
-    /* version 1.0 */
-    1, 1,
-
-    /* start minor version 0 methods*/
-    KSysDirDestroy,
-    KSysDirList,
-
-    /* the following two messages map to the same method, requiring type casting */
-    ( rc_t ( CC * )  ( const KSysDir*, bool,
-        rc_t ( CC * ) ( const KDirectory*, uint32_t, const char*, void* ), void*,
-        const char*, va_list ) ) KSysDirVisit,
-    ( rc_t ( CC * )  ( KSysDir*, bool,
-        rc_t ( CC * ) ( KDirectory*, uint32_t, const char*, void* ), void*,
-        const char*, va_list ) ) KSysDirVisit,
-
-    KSysDirPathType,
-    KSysDirResolvePath,
-    KSysDirResolveAlias,
-    KSysDirRename,
-    KSysDirRemove,
-    KSysDirClearDir,
-    KSysDirVAccess,
-    KSysDirSetAccess,
-    KSysDirCreateAlias,
-    KSysDirOpenFileRead,
-    KSysDirOpenFileWrite,
-    KSysDirCreateFile,
-    KSysDirFileSize,
-    KSysDirSetFileSize,
-    KSysDirOpenDirRead,
-    KSysDirOpenDirUpdate,
-    KSysDirCreateDir,
-    NULL, /* we don't track files*/
-    /* end minor version 0 methods*/
-
-    /* start minor version 1 methods*/
-    KSysDirVDate,
-    KSysDirVSetDate,
-    KSysDirGetSysdir
-    /* end minor version 1 methods*/
-};
-
-/* KSysDirInit
- */
-#if TRACK_REFERENCES
-static
-const char *convert_wide_path ( const wchar_t *path, const size_t path_size )
-{
-    /* copy wide string to static */
-    static char static_path [ MAX_PATH ];
-    wchar_cvt_string_copy ( static_path, sizeof static_path, path, path_size );
-
-    return static_path;
-}
-#else
-#define convert_wide_path( path, path_size ) "ignore"
-#endif
-
-static
-rc_t KSysDirInit ( KSysDir *self, enum RCContext ctx, uint32_t dad_root,
-                   const wchar_t *path, size_t path_size, uint32_t path_length, 
-                   bool update, bool chroot )
-{
-    rc_t rc;
-    if ( path == NULL )
-    {
-        rc = KDirectoryInit( &self->dad, (const KDirectory_vt*)&vtKSysDir, 
-                            "KSysDir", NULL, update );
-    }
-    else
-    {
-        rc = KDirectoryInit( &self->dad, (const KDirectory_vt*)&vtKSysDir, 
-                             "KSysDir", convert_wide_path ( path, path_size ), update );
-    }
-
-    if ( rc != 0 )
-    {
-        return ResetRCContext ( rc, rcFS, rcDirectory, ctx );
-    }
-
-    if ( path != NULL )
-    {
-        memcpy( self->path, path, path_size );
-    }
-
-    self->root = chroot ? path_length : dad_root;
-    self->length = path_length + 1;
-    self->path[ path_length ] = '\\';
-    self->path[ path_length + 1 ] = 0;
-    return 0;
-}
-
-
-/* MakeFromRealPath
- *  creates a KDirectory from a Windows path
- */
-rc_t KDirectoryMakeFromRealPath ( KDirectory **dirp, const wchar_t *real, bool update, bool chroot )
-{
-    rc_t rc;
-    size_t size;
-    uint32_t length = wchar_string_measure ( real, & size );
-    if ( length + 4 > MAX_PATH )
-        rc = RC ( rcFS, rcDirectory, rcCreating, rcPath, rcExcessive );
-    else
-    {
-        KSysDir *dir = KSysDirMake ( size );
-        if ( dir == NULL )
-            rc = RC ( rcFS, rcDirectory, rcAccessing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KSysDirInit ( dir, rcAccessing, 0, real, size, length, update, chroot );
-            if ( rc == 0 )
-            {
-                * dirp = & dir -> dad;
-                return 0;
-            }
-            KSysDirDestroy ( dir );
-        }
-    }
-
-    * dirp = NULL;
-    return rc;
-}
-
-/* KDirectoryNativeDir
- *  returns a native file-system directory node reference
- *  the directory root will be "/" and set to the native
- *  idea of current working directory
- *
- *  NB - the returned reference will be non-const, allowing
- *  modification operations to be attempted. these operations
- *  may still fail if the underlying FS disallows them.
- *
- *  "dir" [ OUT ] - return parameter for native directory
- */
-extern rc_t CC ReportCWD ( const ReportFuncs *f, uint32_t indent );
-extern rc_t CC ReportRedirect ( KWrtHandler* handler,
-    const char* filename, bool* to_file, bool finalize );
-
-LIB_EXPORT rc_t CC KDirectoryNativeDir ( KDirectory **dirp )
-{
-    rc_t rc;
-
-    static bool latch;
-    if ( ! latch )
-    {
-        ReportInitKFS ( ReportCWD, ReportRedirect );
-        latch = true;
-    }
-
-    if ( dirp == NULL )
-        rc = RC ( rcFS, rcDirectory, rcAccessing, rcParam, rcNull );
-    else
-    {
-        wchar_t wd [ MAX_PATH ];
-        DWORD error;
-        DWORD wd_len = GetCurrentDirectoryW ( sizeof wd / sizeof wd [ 0 ], wd );
-        if ( wd_len != 0 )
-            return KDirectoryMakeFromRealPath ( dirp, wd, true, false );
-
-        error = GetLastError();
-        switch ( error )
-        {
-        case ERROR_ACCESS_DENIED:
-            rc = RC ( rcFS, rcDirectory, rcAccessing, rcDirectory, rcUnauthorized );
-            break;
-        default:
-            rc = RC ( rcFS, rcDirectory, rcAccessing, rcNoObj, rcUnknown );
-        }
-        PLOGERR ( klogErr,
-                  ( klogErr, rc, "error GetCurrentDirectoryW - $(E) - $(C)",
-                    "E=%!,C=%u", error, error ) ); 
-
-        * dirp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* RealPath
- *  exposes functionality of system directory
- */
-LIB_EXPORT rc_t CC KSysDirRealPath ( struct KSysDir const *self,
-    char *real, size_t bsize, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KSysDirVRealPath ( self, real, bsize, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KSysDirVRealPath ( struct KSysDir const *self,
-    char *real, size_t bsize, const char *path, va_list args )
-{
-    /* Windows is ... challenged when it comes to answering
-       this question. What is needed is to 1) convert the path
-       to a Windows-style wchar path, then 2) resolve each of
-       its components, etc. to come up with a real path, then
-       3) rewrite the path as a UTF-8 POSIX path */
-    return KSysDirResolvePath ( self, true, real, bsize, path, args );
-}
diff --git a/libs/kfs/win/sysdll.c b/libs/kfs/win/sysdll.c
deleted file mode 100644
index bd75027..0000000
--- a/libs/kfs/win/sysdll.c
+++ /dev/null
@@ -1,1417 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _WIN32_WINNT /* This file requires OS newer than Windows 2000 */
-# define _WIN32_WINNT 0x0501
-#endif
-
-#include <kfs/extern.h>
-
-#define TRACK_REFERENCES 0
-
-#include "va_copy.h"
-#include "sysdir-priv.h"
-
-#include <kfs/dyload.h>
-#include <kfs/directory.h>
-#include <kfs/kfs-priv.h>
-#include <klib/refcount.h>
-#include <klib/vector.h>
-#include <klib/text.h>
-#include <klib/out.h>
-#include <klib/log.h>
-#include <klib/status.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-
-#include <WINDOWS.H>
-
-#define ALWAYS_ADD_EXE 1
-
-
-
-/*--------------------------------------------------------------------------
- * WString
- */
-typedef struct WString WString;
-struct WString
-{
-    const wchar_t *addr;
-    size_t size;
-    uint32_t len;
-};
-
-#define WStringInit( s, val, sz, length ) \
-    StringInit ( s, val, sz, length )
-
-#define WStringInitCString( s, cstr ) \
-    ( void ) ( ( s ) -> len = ( uint32_t )( wcslen ( ( s ) -> addr = ( cstr ) ) ), \
-               ( s ) -> size = ( ( size_t ) ( s ) -> len * sizeof ( wchar_t ) ) )
-
-#define CONST_WSTRING( s, val ) \
-    WStringInitCString ( s, L ## val )
-
-static
-int64_t WStringCaseCompare ( const WString *a, const WString *b )
-{
-    int64_t diff;
-
-    uint32_t min_len = a -> len;
-    if ( a -> len > b -> len )
-        min_len = b -> len;
-
-    diff = _wcsnicmp ( a -> addr, b -> addr, min_len );
-    if ( diff == 0 )
-        diff = ( int64_t ) a -> len - ( int64_t ) b -> len;
-
-    return diff;
-}
-
-
-/*--------------------------------------------------------------------------
- * KDirectory
- */
-static
-void CC KDirRefRelease ( void *item, void *ignore )
-{
-    KDirectoryRelease ( ( const void* ) item );
-}
-
-/*--------------------------------------------------------------------------
- * KDyld
- *  dynamic library loader
- *
- *  maintains cache of libraries it has opened while they remain open
- *  such that subsequent requests for an open library will return a
- *  new reference to the existing library.
- */
-struct KDyld
-{
-    Vector search;
-    KRefcount refcount;
-};
-
-
-/* Whack
- */
-static
-rc_t KDyldWhack ( KDyld *self )
-{
-    KRefcountWhack ( & self -> refcount, "KDyld" );
-
-    VectorWhack ( & self -> search, KDirRefRelease, NULL );
-    free ( self );
-
-    return 0;
-}
-
-
-/* Make
- *  create a dynamic loader object
- *
- *  "dl" [ OUT ] - return parameter for loader
- */
-LIB_EXPORT rc_t CC KDyldMake ( KDyld **dlp )
-{
-    rc_t rc;
-
-    if ( dlp == NULL )
-        rc = RC ( rcFS, rcDylib, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KDyld *dl = malloc ( sizeof * dl );
-        if ( dl == NULL )
-            rc = RC ( rcFS, rcDylib, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            VectorInit ( & dl -> search, 1, 8 );
-            KRefcountInit ( & dl -> refcount, 1, "KDyld", "make", "dl" );
-
-            * dlp = dl;
-            return 0;
-        }
-
-        * dlp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KDyldAddRef ( const KDyld *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KDyld" ) )
-        {
-        case krefLimit:
-            return RC ( rcFS, rcDylib, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KDyldRelease ( const KDyld *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KDyld" ) )
-        {
-        case krefWhack:
-            return KDyldWhack ( ( KDyld* ) self );
-        case krefNegative:
-            return RC ( rcFS, rcDylib, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Attach
- * Sever
- */
-static
-KDyld *KDyldAttach ( const KDyld *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "KDyld" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( KDyld* ) self;
-}
-
-static
-rc_t KDyldSever ( const KDyld *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "KDyld" ) )
-        {
-        case krefWhack:
-            return KDyldWhack ( ( KDyld* ) self );
-        case krefNegative:
-            return RC ( rcFS, rcDylib, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* AddSearchPath
- *  add a search path to loader for locating library files
- */
-LIB_EXPORT rc_t CC KDyldVAddSearchPath ( KDyld *self, const char *path, va_list args )
-{
-    rc_t rc;
-    if ( self == NULL )
-        rc = RC ( rcFS, rcDylib, rcUpdating, rcSelf, rcNull );
-    else
-    {
-        KDirectory *wd;
-        rc = KDirectoryNativeDir ( & wd );
-        if ( rc == 0 )
-        {
-            const KDirectory *dir;
-            rc = KDirectoryVOpenDirRead ( wd, & dir, false, path, args );
-            if ( rc == 0 )
-            {
-                rc = VectorAppend ( & self -> search, NULL, dir );
-                if ( rc != 0 )
-                    KDirectoryRelease ( dir );
-            }
-
-            KDirectoryRelease ( wd );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDyldAddSearchPath ( KDyld *self, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDyldVAddSearchPath ( self, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-static
-void KDyldForEach ( const KDyld *self,
-    void ( CC * f ) ( const KDirectory *dir, void *data ), void *data )
-{
-    VectorForEach ( & self -> search, false,
-        ( void ( CC * ) ( void*, void* ) ) f, data );
-}
-
-
-/* HomeDirectory
- *  returns a KDirectory where the binary for a given function is located
- *
- *  "dir" [ OUT ] - return paraeter for home directory, if found
- *
- *  "func" [ IN ] - function pointer within binary to be located
- */
-LIB_EXPORT rc_t CC KDyldHomeDirectory ( const KDyld *self, const KDirectory **dir, fptr_t func )
-{
-    rc_t rc;
-
-    if ( dir == NULL )
-        rc = RC ( rcFS, rcDylib, rcSearching, rcParam, rcNull );
-    else
-    {
-        * dir = NULL;
-
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcSearching, rcSelf, rcNull );
-        else if ( func == NULL )
-            rc = RC ( rcFS, rcDylib, rcSearching, rcFunction, rcNull );
-        else
-        {
-            HMODULE h;
-            /* casting a function pointer to a string pointer because the Windows API
-             * allows a name or an address within to be passed in but doesn't provide
-             * a type safe way to do this */
-            BOOL success = GetModuleHandleEx ( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
-                                               | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
-                                               ( const TCHAR * )func, & h );
-            if ( success )
-            {
-                wchar_t fname [ MAX_PATH ];
-                DWORD name_len = GetModuleFileNameW ( h, fname, ( DWORD ) sizeof fname / sizeof fname [ 0 ] );
-                if ( name_len >= sizeof fname / sizeof fname [ 0 ] )
-                    rc = RC ( rcFS, rcDylib, rcSearching, rcPath, rcExcessive );
-                else
-                {
-                    /* trim off module name */
-                    while ( name_len > 0 )
-                    {
-                        if ( fname [ -- name_len ] == '\\' )
-                        {
-                            fname [ name_len ] = 0;
-                            break;
-                        }
-                    }
-
-                    /* now use directory path */
-                    rc = KDirectoryMakeFromRealPath ( ( KDirectory** ) dir, fname, false, false );
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KDylib
- *  Windows dynamic library
- */
-struct KDylib
-{
-    HMODULE handle;
-    WString path;
-    KRefcount refcount;
-};
-
-
-/* Whack
- */
-static
-rc_t KDylibWhack ( KDylib *self )
-{
-    KRefcountWhack ( & self -> refcount, "KDylib" );
-
-    /* try to close library */
-	if ( !FreeLibrary( self -> handle ) )
-    {
-        /* report error */
-/*        const char *msg = dlerror (); */
-        rc_t rc = RC ( rcFS, rcDylib, rcClosing, rcNoObj, rcUnknown );
-/*        LOGERR ( klogInt, rc, msg );
-        ( void ) msg; */
-        return rc;
-    }
-
-    free ( self );
-    return 0;
-}
-
-
-/* Make
- */
-static
-rc_t KDylibMake ( KDylib **libp, const WString *path )
-{
-    wchar_t *cpy;
-    KDylib *lib = malloc ( sizeof * lib + path -> size + 4 );
-    if ( lib == NULL )
-        return RC ( rcFS, rcDylib, rcConstructing, rcMemory, rcExhausted );
-
-    cpy = ( wchar_t* ) ( lib + 1 );
-    lib -> handle = NULL;
-
-    memcpy ( cpy, path -> addr, path -> size );
-    cpy [ path -> len ] = 0;
-
-    WStringInit ( & lib -> path, cpy, path -> size, path -> len );
-
-    KRefcountInit ( & lib -> refcount, 1, "KDylib", "make", "WinDLL" );
-
-    * libp = lib;
-    return 0;
-}
-
-/* SetLogging
- */
-static
-rc_t KDylibSetLogging ( const KDylib *self )
-{
-    rc_t ( CC * set_formatter ) ( KFmtWriter writer, KLogFmtFlags flags, void *data );
-    rc_t ( CC * set_writer ) ( KWrtWriter writer, void *data );
-
-    /* set the current logging level */
-    rc_t ( CC * set_level ) ( KLogLevel lvl ) = ( void* ) GetProcAddress ( self -> handle, "KLogLevelSet" );
-    if ( set_level != NULL )
-    {
-        KLogLevel lvl = KLogLevelGet ();
-        ( * set_level ) ( lvl );
-    }
-
-    /* determine current library logging */
-    set_writer = ( void* ) GetProcAddress ( self -> handle, "KOutHandlerSet" );
-    if ( set_writer != NULL )
-    {
-        const KWrtHandler* handler = KOutHandlerGet ();
-        ( * set_writer ) ( handler -> writer, handler -> data );
-    }
-
-    set_formatter = ( void* ) GetProcAddress ( self -> handle, "KLogLibFmtHandlerSet" );
-    if ( set_formatter != NULL )
-    {
-        KLogFmtFlags flags = KLogLibFmtFlagsGet ();
-        const KFmtHandler* fmt_handler = KLogFmtHandlerGet ();
-        ( * set_formatter ) ( fmt_handler -> formatter, flags, fmt_handler -> data );
-    }
-    set_writer = ( void* ) GetProcAddress ( self -> handle, "KLogLibHandlerSet" );
-    if ( set_writer != NULL )
-    {
-        const KWrtHandler* handler = KLogLibHandlerGet ();
-        ( * set_writer ) ( handler -> writer, handler -> data );
-    }
-
-    set_formatter = ( void* ) GetProcAddress ( self -> handle, "KStsLibFmtHandlerSet" );
-    if ( set_formatter != NULL )
-    {
-        KStsFmtFlags flags = KStsLibFmtFlagsGet ();
-        const KFmtHandler* fmt_handler = KStsFmtHandlerGet ();
-        ( * set_formatter ) ( fmt_handler -> formatter, flags, fmt_handler -> data );
-    }
-    set_writer = ( void* ) GetProcAddress ( self -> handle, "KStsLibHandlerSet" );
-    if ( set_writer != NULL )
-    {
-        const KWrtHandler* handler = KStsLibHandlerGet ();
-        ( * set_writer ) ( handler -> writer, handler -> data );
-    }
-#if _DEBUGGING
-    set_writer = ( void* ) GetProcAddress ( self -> handle, "KDbgHandlerSet" );
-    if ( set_writer != NULL )
-    {
-        const KWrtHandler* handler = KDbgHandlerGet ();
-        ( * set_writer ) ( handler -> writer, handler -> data );
-    }
-#endif
-    return 0;
-}
-
-/* LoadLib
- *  load a dynamic library
- *
- *  "lib" [ OUT ] - return parameter for loaded library
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target library
- */
-static
-rc_t KDyldLoad ( KDyld *self, KDylib *lib, const wchar_t *path )
-{
-#if USE_DYLOAD
-
-    DWORD err;
-#if WE_WERE_BUILDING_FOR_WINDOWS_7_ALONE
-    UINT errMode = GetErrorMode();
-#endif
-
-	if ( path == NULL )
-	{
-		if ( GetModuleHandleExW( 0, NULL, &( lib -> handle ) ) )
-			return 0;
-
-        return RC ( rcFS, rcDylib, rcLoading, rcNoObj, rcUnknown );
-	}
-
-    SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); /* suppress the message box in case of an error */
-    lib -> handle = LoadLibraryW ( path );
-#if WE_WERE_BUILDING_FOR_WINDOWS_7_ALONE
-    SetErrorMode(errMode);
-#endif
-    if ( lib -> handle != NULL )
-        return KDylibSetLogging ( lib );
-
-    err = GetLastError ();
-    switch ( err )
-    {
-    case ERROR_MOD_NOT_FOUND :
-        return RC ( rcFS, rcDylib, rcLoading, rcPath, rcNotFound );
-    case ERROR_BAD_EXE_FORMAT :
-        return RC ( rcFS, rcDylib, rcLoading, rcFormat, rcInvalid );
-    }
-
-    return RC ( rcFS, rcDylib, rcLoading, rcNoObj, rcUnknown );
-
-#else
-    lib -> handle = NULL;
-    return 0;
-#endif
-}
-
-static
-rc_t KDyldVTryLoadLib ( KDyld *self, KDylib **lib,
-    const KDirectory *dir, const char *path, va_list args )
-{
-    rc_t rc;
-
-    const KSysDir *sdir = KDirectoryGetSysDir ( dir );
-    if ( sdir == NULL )
-        rc = RC ( rcFS, rcDylib, rcLoading, rcDirectory, rcIncorrect );
-    else
-    {
-        wchar_t real [ MAX_PATH ];
-
-		rc = KSysDirOSPath ( sdir, real, sizeof real, path, args );
-		if ( rc == 0 )
-		{
-			WString pstr;
-			WStringInitCString ( & pstr, real );
-
-			rc = KDylibMake ( lib, & pstr );
-			if ( rc == 0 )
-			{
-				rc = KDyldLoad ( self, * lib, real );
-				if ( rc == 0 )
-					return 0;
-				free ( * lib );
-			}
-        }
-    }
-
-    * lib = NULL;
-
-    return rc;
-}
-
-static
-rc_t KDyldTryLoadLib ( KDyld *self, KDylib **lib,
-    const KDirectory *dir, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-    va_start ( args, path );
-    rc = KDyldVTryLoadLib ( self, lib, dir, path, args );
-    va_end ( args );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDyldVLoadLib ( KDyld *self,
-    KDylib **lib, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( lib == NULL )
-        rc = RC ( rcFS, rcDylib, rcLoading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcLoading, rcSelf, rcNull );
-        else if ( path == NULL || path [ 0 ] == 0 )
-        {
-            WString pstr;
-            CONST_WSTRING ( & pstr, "" );
-
-            rc = KDylibMake ( lib, & pstr );
-            if ( rc == 0 )
-            {
-                rc = KDyldLoad ( self, * lib, NULL );
-                if ( rc == 0 )
-                    return 0;
-            
-                free ( * lib );
-            }
-        }
-        else
-        {
-            uint32_t i = VectorStart ( & self -> search );
-            uint32_t end = i + VectorLength ( & self -> search );
-
-            if ( i == end )
-            {
-                char name [ 4096 ];
-                int len = ( args == NULL ) ?
-                    snprintf  ( name, sizeof name, "%s", path ) : 
-                    vsnprintf ( name, sizeof name, path, args );
-                if ( len < 0 || len >= sizeof name )
-                    rc = RC ( rcFS, rcDylib, rcLoading, rcPath, rcExcessive );
-                else
-                {
-                    WString pstr;
-                    wchar_t wname [ 4096 ];
-                    size_t wsize = string_cvt_wchar_copy ( wname, sizeof wname, name, len );
-                    WStringInit ( & pstr, wname, wsize * sizeof wname [ 0 ], string_len ( name, len ) );
-
-                    rc = KDylibMake ( lib, & pstr );
-                    if ( rc == 0 )
-                    {
-                        rc = KDyldLoad ( self, * lib, wname );
-                        if ( rc == 0 )
-                            return 0;
-                    
-                        free ( * lib );
-                    }
-                }
-            }
-            else
-            {
-                for ( * lib = NULL; i < end; ++ i )
-                {
-                    const KDirectory *dir;
-
-                    va_list cpy;
-                    va_copy ( cpy, args );
-
-                    dir = ( const void* ) VectorGet ( & self -> search, i );
-                    rc = KDyldVTryLoadLib ( self, lib, dir, path, cpy );
-
-                    va_end ( cpy );
-
-                    if ( rc == 0 || GetRCState ( rc ) != rcNotFound )
-                        return rc;
-                }
-
-                rc = RC ( rcFS, rcDylib, rcLoading, rcPath, rcNotFound );
-            }
-        }
-
-        * lib = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDyldLoadLib ( KDyld *self,
-    KDylib **lib, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = KDyldVLoadLib ( self, lib, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KDylibAddRef ( const KDylib *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KDylib" ) )
-        {
-        case krefLimit:
-            return RC ( rcFS, rcDylib, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KDylibRelease ( const KDylib *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KDylib" ) )
-        {
-        case krefWhack:
-            return KDylibWhack ( ( KDylib* ) self );
-        case krefNegative:
-            return RC ( rcFS, rcDylib, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-static
-void CC KDylibVectRelease ( void *item, void *ignore )
-{
-    KDylib *self = item;
-    KDylibRelease ( self );
-}
-
-
-/* Attach
- * Sever
- */
-static
-KDylib *KDylibAttach ( const KDylib *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "KDylib" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( KDylib* ) self;
-}
-
-static
-rc_t KDylibSever ( const KDylib *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "KDylib" ) )
-        {
-        case krefWhack:
-            return KDylibWhack ( ( KDylib* ) self );
-        case krefNegative:
-            return RC ( rcFS, rcDylib, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Sort
- */
-static
-int64_t CC KDylibSort ( const void *item, const void *n )
-{
-    const KDylib *a = item;
-    const KDylib *b = n;
-    return WStringCaseCompare ( & a -> path, & b -> path );
-}
-
-
-/* FullPath
- *  return full path to library
- */
-LIB_EXPORT rc_t CC KDylibFullPath ( const KDylib *self, char *path, size_t psize )
-{
-    rc_t rc;
-
-    if ( psize == 0 )
-        rc = RC ( rcFS, rcDylib, rcAccessing, rcBuffer, rcInsufficient );
-    else if ( path == NULL )
-        rc = RC ( rcFS, rcDylib, rcAccessing, rcBuffer, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            size_t i, bytes = wchar_cvt_string_copy ( path, psize,
-                self -> path . addr, self -> path . size );
-            if ( bytes < psize )
-            {
-                if ( isalpha ( path [ 0 ] ) && path [ 1 ] == ':' )
-                {
-                    path [ 1 ] = path [ 0 ];
-                    path [ 0 ] = '/';
-                }
-                for ( i = 0; i < bytes; ++ i )
-                {
-                    if ( path [ i ] == '\\' )
-                        path [ i ] = '/';
-                }
-
-                return 0;
-            }
-
-            rc = RC ( rcFS, rcDylib, rcAccessing, rcBuffer, rcInsufficient );
-        }
-
-        path [ 0 ] = 0;
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KDlset
- *  ordered set of dynamic libraries
- *  contained libraries remain resident until set is released
- */
-struct KDlset
-{
-    KDyld *dl;
-    Vector name, ord;
-    KRefcount refcount;
-};
-
-
-/* Whack
- */
-static
-rc_t KDlsetWhack ( KDlset *self )
-{
-    KRefcountWhack ( & self -> refcount, "KDlset" );
-
-    VectorWhack ( & self -> name, NULL, NULL );
-    VectorWhack ( & self -> ord, KDylibVectRelease, NULL );
-    KDyldSever ( self -> dl );
-    free ( self );
-
-    return 0;
-}
-
-#define STRINGIZE(s) #s
-#define LIBNAME(pref, name, suff) STRINGIZE(pref) name STRINGIZE(suff)
-/* MakeSet
- *  load a dynamic library
- *
- *  "set" [ OUT ] - return parameter for lib set
- */
-LIB_EXPORT rc_t CC KDyldMakeSet ( const KDyld *self, KDlset **setp )
-{
-    rc_t rc = 0;
-    
-    if ( setp == NULL )
-        rc = RC ( rcFS, rcDylib, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcConstructing, rcSelf, rcNull );
-        else
-        {
-            KDlset *set = malloc ( sizeof * set );
-            if ( set == NULL )
-                rc = RC ( rcFS, rcDylib, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                set -> dl = KDyldAttach ( self );
-                VectorInit ( & set -> name, 0, 16 );
-                VectorInit ( & set -> ord, 0, 16 );
-                KRefcountInit ( & set -> refcount, 1, "KDlset", "make", "dlset" );
-#if ! ALWAYS_ADD_EXE
-                {   
-                    KDylib *jni;
-                    const char* libname = "vdb_jni.dll";
-                    rc = KDyldLoadLib ( ( KDyld* ) self, & jni, libname );
-                    if ( rc == 0 )
-                    {
-                        rc = KDlsetAddLib ( set, jni );
-                        KDylibRelease ( jni );
-                    }
-                    /*if (rc == 0)*/ /* if JNI code is not there, C tools should not suffer */
-                    {
-                        * setp = set;
-                        return 0;
-                    }
-                }
-#else
-                {
-                    KDylib *exe;
-                    rc = KDyldLoadLib ( ( KDyld* ) self, & exe, NULL );
-                    if ( rc == 0 )
-                    {
-                        rc = KDlsetAddLib ( set, exe );
-                        KDylibRelease ( exe );
-                        if ( rc == 0 )
-                        {
-                            * setp = set;
-                            return 0;
-                        }
-                    }
-                }
-
-                KDlsetRelease ( set );
-#endif
-            }
-        }
-
-        * setp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KDlsetAddRef ( const KDlset *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KDlset" ) )
-        {
-        case krefLimit:
-            return RC ( rcFS, rcDylib, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KDlsetRelease ( const KDlset *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KDlset" ) )
-        {
-        case krefWhack:
-            return KDlsetWhack ( ( KDlset* ) self );
-        case krefNegative:
-            return RC ( rcFS, rcDylib, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* AddLib
- *  adds a dynamic library to end of ordered set
- *
- *  "lib" [ IN ] - library returned from KDyldLoadLib
- */
-static
-rc_t KDlsetAddLibInt ( KDlset *self, KDylib *lib )
-{
-    uint32_t idx;
-    rc_t rc = VectorAppend ( & self -> ord, & idx, lib );
-    if ( rc == 0 )
-    {
-        void *ignore;
-        
-        rc = VectorInsertUnique ( & self -> name,
-            lib, NULL, KDylibSort );
-        if ( rc == 0 )
-            return 0;
-
-        VectorSwap ( & self -> ord, idx, NULL, & ignore );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDlsetAddLib ( KDlset *self, KDylib *lib )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcFS, rcDylib, rcInserting, rcSelf, rcNull );
-    else if ( lib == NULL )
-        rc = RC ( rcFS, rcDylib, rcInserting, rcDylib, rcNull );
-    else
-    {
-        rc = KDylibAddRef ( lib );
-        if ( rc == 0 )
-        {
-            rc = KDlsetAddLibInt ( self, lib );
-            if ( rc == 0 )
-                return 0;
-
-            KDylibRelease ( lib );
-        }
-    }
-
-    return rc;
-}
-
-
-/* AddAll
- *  adds all dynamic libraries found in dl search path
- */
-static
-rc_t CC KDlsetTryLib ( const KDirectory *dir,
-    uint32_t type, const char *name, void *data )
-{
-    KDlset *self = data;
-
-    if ( ( type & ~ kptAlias ) == kptFile )
-    {
-        rc_t rc;
-        KDylib *lib;
-#ifdef SHLX
-        /* force simple shared library extension */
-        if ( sizeof SHLX >= 2 )
-        {
-            /* SHLX has at least 1 character plus NUL byte */
-            size_t len = strlen ( name );
-            /* name must be at least 1 character larger */
-            if ( len <= ( sizeof SHLX - 1 ) )
-                return 0;
-            /* name must end with shared library extension */
-            if ( memcmp ( & name [ len - ( sizeof SHLX - 1 ) ], SHLX, sizeof SHLX - 1 ) != 0 )
-                return 0;
-        }
-#endif
-        rc = KDyldTryLoadLib ( self -> dl, & lib, dir, name );
-        if ( rc == 0 )
-        {
-            rc = KDlsetAddLibInt ( self, lib );
-            if ( rc == 0 )
-                return 0;
-
-            KDylibRelease ( lib );
-        }
-    }
-
-    return 0;
-}
-
-static
-void CC KDlsetVisitDir ( const KDirectory *dir, void *data )
-{
-    KDirectoryVisit ( dir, false, KDlsetTryLib, data, "." );
-}
-
-LIB_EXPORT rc_t CC KDlsetAddAll ( KDlset *self )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcDylib, rcInserting, rcSelf, rcNull );
-    KDyldForEach ( self -> dl, KDlsetVisitDir, self );
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * KSymAddr
- *  symbol address within a dynamic library
- */
-struct KSymAddr
-{
-    KDylib *lib;
-    void *addr;
-    KRefcount refcount;
-};
-
-
-/* Whack
- */
-static
-rc_t KSymAddrWhack ( KSymAddr *self )
-{
-    KRefcountWhack ( & self -> refcount, "KSymAddr" );
-
-    KDylibSever ( self -> lib );
-    free ( self );
-
-    return 0;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KSymAddrAddRef ( const KSymAddr *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KSymAddr" ) )
-        {
-        case krefLimit:
-            return RC ( rcFS, rcDylib, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KSymAddrRelease ( const KSymAddr *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KSymAddr" ) )
-        {
-        case krefWhack:
-            return KSymAddrWhack ( ( KSymAddr* ) self );
-        case krefNegative:
-            return RC ( rcFS, rcDylib, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Make
- */
-static
-rc_t KSymAddrMake ( KSymAddr **symp,
-    const KDylib *lib, const char *name )
-{
-    FARPROC addr = GetProcAddress ( lib -> handle, name );
-    if ( addr != NULL )
-    {
-        KSymAddr *sym = malloc ( sizeof * sym );
-        if ( sym == NULL )
-            return RC ( rcFS, rcDylib, rcConstructing, rcMemory, rcExhausted );
-
-        sym -> lib = KDylibAttach ( lib );
-        sym -> addr = (void *)addr;
-        KRefcountInit ( & sym -> refcount, 1, "KSymAddr", "make", name );
-        * symp = sym;
-        return 0;
-    }
-
-    * symp = NULL;
-    return RC ( rcFS, rcDylib, rcSelecting, rcName, rcNotFound );
-}
-
-
-/* Symbol
- *  find a symbol within dynamic library
- *
- *  "sym" [ OUT ] - return parameter for exported symbol address
- *
- *  "name" [ IN ] - NUL terminated symbol name in
- *  library-native character set
- */
-LIB_EXPORT rc_t CC KDylibSymbol ( const KDylib *self, KSymAddr **sym, const char *name )
-{
-    rc_t rc;
-
-    if ( sym == NULL )
-        rc = RC ( rcFS, rcDylib, rcSelecting, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcSelf, rcNull );
-        else if ( name == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcNull );
-        else if ( name [ 0 ] == 0 )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcEmpty );
-        else
-        {
-            return KSymAddrMake ( sym, self, name );
-        }
-
-        * sym = NULL;
-    }
-
-    return rc;
-}
-
-typedef struct KDlsetTrySymData KDlsetTrySymData;
-struct KDlsetTrySymData
-{
-    const KDlset *self;
-    const char *name;
-
-    bool ( CC * test ) ( const KSymAddr *sym, void *data );
-    void *data;
-
-    KSymAddr *sym;
-    rc_t rc;
-    bool first;
-};
-
-static
-bool CC KDlsetTrySymbol ( void *item, void *data )
-{
-    KSymAddr *sym;
-    KDlsetTrySymData *pb = data;
-    pb -> rc = KDylibSymbol ( item, & sym, pb -> name );
-    if ( pb -> rc == 0 )
-    {
-        /* simple case */
-        if ( pb -> test == NULL )
-        {
-            pb -> sym = sym;
-            return true;
-        }
-
-        /* apply filter function */
-        if ( ( * pb -> test ) ( sym, pb -> data ) )
-        {
-            KSymAddrRelease ( pb -> sym );
-            pb -> sym = sym;
-            return pb -> first;
-        }
-
-        KSymAddrRelease ( sym );
-    }
-    return false;
-}
-
-LIB_EXPORT rc_t CC KDlsetSymbol ( const KDlset *self, KSymAddr **sym, const char *name )
-{
-    rc_t rc;
-
-    if ( sym == NULL )
-        rc = RC ( rcFS, rcDylib, rcSelecting, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcSelf, rcNull );
-        else if ( name == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcNull );
-        else if ( name [ 0 ] == 0 )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcEmpty );
-        else
-        {
-            KDlsetTrySymData pb;
-            memset ( & pb, 0, sizeof pb );
-            pb . self = self;
-            pb . name = name;
-            pb . rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcNotFound );
-
-            if ( VectorDoUntil ( & self -> ord, false, KDlsetTrySymbol, & pb ) )
-            {
-                * sym = pb . sym;
-                return 0;
-            }
-
-            rc = pb . rc;
-        }
-
-        * sym = NULL;
-    }
-
-    return rc;
-}
-
-
-/* FirstSymbol
- * LastSymbol
- *  find a symbol within dynamic library set matching criteria
- *
- *  "sym" [ OUT ] - return parameter for exported symbol address
- *
- *  "name" [ IN ] - NUL terminated symbol name in
- *  library-native character set
- *
- *  "test" [ IN ] and "data" [ IN, OPAQUE ] - callback filter function
- *  return true if symbol matches criteria
- */
-LIB_EXPORT rc_t CC KDlsetFirstSymbol ( const KDlset *self, KSymAddr **sym, const char *name,
-    bool ( CC * test ) ( const KSymAddr *sym, void *data ), void *data )
-{
-    rc_t rc;
-
-    if ( sym == NULL )
-        rc = RC ( rcFS, rcDylib, rcSelecting, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcSelf, rcNull );
-        else if ( name == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcNull );
-        else if ( name [ 0 ] == 0 )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcEmpty );
-        else if ( test == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcFunction, rcNull );
-        else
-        {
-            KDlsetTrySymData pb;
-            memset ( & pb, 0, sizeof pb );
-            pb . self = self;
-            pb . name = name;
-            pb . test = test;
-            pb . data = data;
-            pb . rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcNotFound );
-            pb . first = true;
-
-            if ( VectorDoUntil ( & self -> ord, false, KDlsetTrySymbol, & pb ) )
-            {
-                * sym = pb . sym;
-                return 0;
-            }
-
-            rc = pb . rc;
-        }
-
-        * sym = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDlsetLastSymbol ( const KDlset *self, KSymAddr **sym, const char *name,
-    bool ( CC * test ) ( const KSymAddr *sym, void *data ), void *data )
-{
-    rc_t rc;
-    
-    if ( sym == NULL )
-        rc = RC ( rcFS, rcDylib, rcSelecting, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcSelf, rcNull );
-        else if ( name == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcNull );
-        else if ( name [ 0 ] == 0 )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcEmpty );
-        else if ( test == NULL )
-            rc = RC ( rcFS, rcDylib, rcSelecting, rcFunction, rcNull );
-        else
-        {
-            KDlsetTrySymData pb;
-            memset ( & pb, 0, sizeof pb );
-            pb . self = self;
-            pb . name = name;
-            pb . test = test;
-            pb . data = data;
-            pb . rc = RC ( rcFS, rcDylib, rcSelecting, rcName, rcNotFound );
-
-            VectorDoUntil ( & self -> ord, false, KDlsetTrySymbol, & pb );
-            if ( pb . sym != NULL )
-            {
-                * sym = pb . sym;
-                return 0;
-            }
-
-            rc = pb . rc;
-        }
-
-        * sym = NULL;
-    }
-
-    return rc;
-}
-
-
-/* List - PRIVATE
- *  list the paths to the libraries in the set
- */
-typedef struct list_dylib_param list_dylib_param;
-struct list_dylib_param
-{
-    VNamelist *list;
-    rc_t rc;
-};
-
-static
-bool CC list_dylib ( void *item, void *data )
-{
-    size_t bytes;
-    char utf8 [ 4096 ], *p;
-
-    list_dylib_param *pb = data;
-    const KDylib *lib = ( const void* ) item;
-
-    /* "lib" was created with KDylibMake
-       which creates a NUL terminated path.
-       of course, this could seg-fault if bad... */
-    assert ( lib -> path . addr [ lib -> path . len ] == 0 );
-
-    /* convert wide-character to UTF-8 */
-    bytes = wchar_cvt_string_copy ( utf8, sizeof utf8, lib -> path . addr, lib -> path . size );
-    if ( bytes < sizeof utf8 )
-    {
-        pb -> rc = VNamelistAppend ( pb -> list, utf8 );
-        return pb -> rc != 0;
-    }
-
-    p = malloc ( 16 * 1024 );
-    if ( p == NULL )
-    {
-        pb -> rc = RC ( rcFS, rcDylib, rcListing, rcMemory, rcExhausted );
-        return true;
-    }
-
-    bytes = wchar_cvt_string_copy ( p, 16 * 1024, lib -> path . addr, lib -> path . size );
-    if ( bytes >= 16 * 1024 )
-        pb -> rc = RC ( rcFS, rcDylib, rcListing, rcPath, rcTooLong );
-    else
-        pb -> rc = VNamelistAppend ( pb -> list, p );
-
-    free ( p );
-    return pb -> rc != 0;
-}
-
-LIB_EXPORT rc_t CC KDlsetList ( const KDlset *self, KNamelist **listp )
-{
-    list_dylib_param pb;
-
-    assert ( listp != NULL );
-
-    if ( self == NULL )
-        pb . rc = RC ( rcFS, rcDylib, rcListing, rcSelf, rcNull );
-    else
-    {
-        pb . rc = VNamelistMake ( & pb . list, VectorLength ( & self -> name ) );
-        if ( pb . rc == 0 )
-        {
-            bool fail = VectorDoUntil ( & self -> name, false, list_dylib, & pb );
-            if ( ! fail )
-                pb . rc = VNamelistToNamelist ( pb . list, listp );
-
-            VNamelistRelease ( pb . list );
-        }
-    }
-
-    return pb . rc;
-}
-
-
-/* AsObj
- * AsFunc
- *  retrieve symbol address as pointer to object
- */
-LIB_EXPORT void * CC KSymAddrAsObj ( const KSymAddr *self )
-{
-    if ( self != NULL )
-        return self -> addr;
-    return NULL;
-}
-
-LIB_EXPORT void CC KSymAddrAsFunc ( const KSymAddr *self, fptr_t *fp )
-{
-    if ( self != NULL && fp != NULL )
-        * fp = ( fptr_t ) self -> addr;
-}
-
-
diff --git a/libs/kfs/win/sysfile-priv.h b/libs/kfs/win/sysfile-priv.h
deleted file mode 100644
index 2fd8ed2..0000000
--- a/libs/kfs/win/sysfile-priv.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sysfile_priv_
-#define _h_sysfile_priv_
-
-#ifndef _h_os_native_
-#include <os-native.h>
-#endif
-
-#ifndef _h_kfs_impl_
-#include <kfs/impl.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * KSysFile
- *  a Windows file
- */
-typedef struct KSysFile_v1 KSysFile_v1;
-struct KSysFile_v1
-{
-    KFile_v1 dad;
-    HANDLE handle;
-    uint64_t pos;
-    bool failed_set_sparse;
-    bool is_sparse; /* throws off size dang it */
-    CRITICAL_SECTION lock;    
-};
-
-typedef struct KSysFile_v2 KSysFile_v2;
-struct KSysFile_v2
-{
-    KFile_v2 dad;
-    HANDLE handle;
-    uint64_t pos;
-    bool failed_set_sparse;
-    bool is_sparse; /* throws off size dang it */
-    CRITICAL_SECTION lock;
-};
-
-/* KSysFileMake
- *  create a new file object
- *  from file descriptor
- */
-rc_t KSysFileMake_v1 ( KSysFile_v1 **fp, HANDLE fd, const char *path, bool read_enabled, bool write_enabled );
-KSysFile_v2 * KSysFileMake_v2 ( ctx_t ctx, HANDLE fd, const char *path, bool read_enabled, bool write_enabled );
-
-#define KSysFileMake NAME_VERS ( KSysFileMake, KFILE_VERS )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*  _h_sysfile_priv_ */
diff --git a/libs/kfs/win/sysfile-v2.c b/libs/kfs/win/sysfile-v2.c
deleted file mode 100644
index eb5d936..0000000
--- a/libs/kfs/win/sysfile-v2.c
+++ /dev/null
@@ -1,1028 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KSysFile_v2;
-#define KFILE_IMPL struct KSysFile_v2
-#define KFILE_VERS 2
-
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include "sysfile-priv.h"
-#include <kfs/kfs-priv.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <klib/text.h>
-#include <sysalloc.h>
-
-/* temporary */
-/* #include <klib/out.h> */
-
-
-
-#include <Windows.h>
-/* #include <WinIoCtl.h> nested include in Windows.h? */
-
-/*--------------------------------------------------------------------------
- * KSysFile
- *  a Windows file
- */
-
-/* minimum set size or write beyond size difference to trigger setting sparse */
-/* tune this if too many or too few sparse files */
-#define MIN_SET_SPARSE_DIFF   (16*1024)
-#define MIN_SPARSE_BLOCK_DIFF  (4*1024)
-
-
-/* ----------
- * Some functions to isolate the calls to Windows functions as I feel dirty
- * just using them.
- * really its to isolate some calls the very different style of parmaters
- * for the calls from the usualy project approach.
- *
- * if the compiler inlines them it's all good.
- */
-
-/*
- * Get file size 
- */
-static rc_t get_file_size ( const KSysFile_v2 *self, uint64_t *size )
-{
-    LARGE_INTEGER sz;
-
-    if ( GetFileSizeEx ( self -> handle, & sz ) == 0 )
-    {
-        rc_t rc;
-        DWORD last_error;
-
-        last_error = GetLastError ();
-        switch ( last_error )
-        {
-        case ERROR_INVALID_HANDLE:
-            rc = RC ( rcFS, rcFile, rcAccessing, rcFileDesc, rcInvalid );
-            break;
-        default:
-            rc = RC ( rcFS, rcFile, rcAccessing, rcNoObj, rcUnknown );
-            break;
-        }
-        PLOGERR (klogErr,
-                 (klogErr, rc, "error accessing file system status - $(E)($(C))",
-                  "E=%!,C=%u", last_error, last_error)); 
-        return rc;
-    }
-    *size = sz.QuadPart;
-
-    return 0;
-}
-
-
-/* returns (and side effect sets in structure)
- * if the file is already a sparse file
- */
-static bool check_if_sparse ( KSysFile_v2 *self )
-{
-    BY_HANDLE_FILE_INFORMATION info;
-    BOOL worked;
-
-    if (self->is_sparse)
-        return true;
-
-    /*
-     * we don't use the GetFileInformationBy HandleEx as we don't want to 
-     * exclude Win XP yet.
-     */
-    worked = GetFileInformationByHandle (self->handle, &info);
-
-    self->is_sparse = 
-        ((info.dwFileAttributes & FILE_ATTRIBUTE_SPARSE_FILE)
-         == FILE_ATTRIBUTE_SPARSE_FILE);
-
-    return self->is_sparse;
-}
-
-/*
- * make a file sparse set_it == true
- * return is like Windows funcs with true being good
- *
- * we can't set if the Windows Volume doesn't allow it
- * but we'll let the function fail rather than try to get the value at 
- * CREATE (open) time because we'd be then checking at all file CREATE
- * whether we'd ever make it sparse or not
- */
-static
-bool set_sparse ( KSysFile_v2 *self )
-{
-    FILE_SET_SPARSE_BUFFER b = { true };
-    DWORD ret;
-    BOOL worked;
-    bool rreett = false;
-
-    /* don't duplicate effort */
-    if (self->is_sparse)
-        rreett =  true;
-
-    else if (self->failed_set_sparse)
-        rreett = false;
-
-    else
-    {
-        worked = DeviceIoControl ( self->handle, FSCTL_SET_SPARSE, &b, sizeof b,
-                              NULL, 0, &ret, NULL );
-/*         KOutMsg ("%s: %u\n",__func__,worked); */
-
-        /* not trusting bool is BOOL cause I don't trust Microsoft */
-        self->failed_set_sparse = (worked == 0);
-        self->is_sparse = !self->failed_set_sparse;
-        rreett =  self->is_sparse;
-    }
-/*     KOutMsg ("%s: %d\n",__func__,rreett); */
-    return rreett;
-}
-
-
-static bool set_not_sparse ( KSysFile_v2 *self )
-{
-    FILE_SET_SPARSE_BUFFER b = { false };
-    DWORD ret;
-    BOOL worked;
-
-    /* don't duplicate effort */
-    if (!check_if_sparse (self))
-        return true;
-
-    if (self->failed_set_sparse)
-        return false;
-
-    worked = DeviceIoControl (self->handle, FSCTL_SET_SPARSE, &b, sizeof b,
-                              NULL, 0, &ret, NULL);
-
-    /* not trusting bool is BOOL cause I don't trust Microsoft */
-    self->failed_set_sparse = (worked == 0);
-    self->is_sparse = self->failed_set_sparse;
-    return ! self->is_sparse;
-}
-
-/*
- * this one works for non-sparse files too but what evs.
- */
-static rc_t set_zero_region ( KSysFile_v2 *self, uint64_t start, uint64_t size)
-{
-    FILE_ZERO_DATA_INFORMATION b = { ( DWORD ) start, ( LONG ) ( start + size ) };
-    DWORD ret;
-    BOOL worked;
-
-    worked = DeviceIoControl (self->handle, FSCTL_SET_ZERO_DATA,
-                            &b, sizeof b,
-                            NULL, 0,
-                            &ret, NULL);
-
-    /* TODO: check error codes with GetLastError and better rc values */
-    return (worked != 0) ? 0 : RC (rcFS, rcFile, rcWriting, rcBuffer, rcUnexpected);
-}
-
-
-/*
- * returns true if we can convert this file into a non-sparse file
- *
- * We went simple and fast.  We ask about zero regions.
- * if we specifically get back that there are none we say true
- * otherwise we say false.
- *
- * self can be modified so it can not be const
- */
-static bool can_be_made_not_sparse ( KSysFile_v2 *self )
-{
-#if 1
-    return false;
-#else
-    /* this is backwards - the list of os non-zero regions not zero regions */
-    LARGE_INTEGER fo;
-    LARGE_INTEGER l;
-    uint64_t size;
-    FILE_ALLOCATED_RANGE_BUFFER i;
-    FILE_ALLOCATED_RANGE_BUFFER o [16]; /* some none 0 number */
-    uint64_t count;
-    DWORD ret;
-    BOOL worked;
-    rc_t rc;
-
-    /* if is isn't sparse we can't make it not sparse */
-    /* first might be not yet set */
-    if (!check_if_sparse (self))
-        return true;
-
-    /* we can't scan for zero regions if we can't get a size */
-    rc = get_file_size (self, &size);
-    if (rc)
-        return false;
-
-    /* Microsoft APIs can be fairly odd */
-    fo.QuadPart = 0;
-    l.QuadPart = size;
-    i.FileOffset = fo;
-    i.Length = l;
-
-    worked = DeviceIoControl (self->handle, FSCTL_QUERY_ALLOCATED_RANGES,
-                              &i, sizeof i, o, sizeof o, & ret, NULL);
-    /* we can't change to non-sparse if we can't scan for zero regions */
-    if (worked == 0)
-        return false;
-
-    return (ret == 0);
-#endif
-}
-
-
-/* Destroy
- */
-static
-void CC KSysFileDestroy_v2 ( KSysFile_v2 *self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcDestroying );
-
-    if ( CloseHandle (self -> handle ) == 0 )
-    {
-        DWORD last_error;
-
-        last_error = GetLastError();
-        switch ( last_error )
-        {
-        case ERROR_INVALID_HANDLE:
-            INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error handle = %zu", self->handle );
-            break;
-        default:
-            INTERNAL_ERROR ( xcErrorUnknown, "error closing system file" );
-        }
-        return;
-    }
-
-    free ( self );
-}
-
-
-static
-void CC KSysStdIOFileDestroy_v2 ( KSysFile_v2 *self, ctx_t ctx )
-{
-    free ( self );
-}
-
-
-/* GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- */
-static
-KSysFile_v2 * CC KSysFileGetSysFile_v2 ( const KSysFile_v2 * self, ctx_t ctx, uint64_t *offset )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcAccessing );
-
-    * offset = 0;
-    return ( KSysFile_v2 * ) self;
-}
-
-/* RandomAccess
- *  returns 0 if random access, error code otherwise
- */
-static
-bool CC KSysDiskFileRandomAccess_v2 ( const KSysFile_v2 *self, ctx_t ctx )
-{
-    INTERNAL_ERROR ( xcFunctionUnsupported, "function is not supported" );
-    return false;
-}
-static
-bool CC KSysFileRandomAccess_v2 ( const KSysFile_v2 *self, ctx_t ctx )
-{
-    INTERNAL_ERROR ( xcFunctionUnsupported, "function is not supported" );
-    return false;
-}
-
-
-/* Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KSysFileType_v2 ( const KSysFile_v2 *self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcEvaluating );
-
-    switch ( GetFileType ( self -> handle ) )
-    {
-    case FILE_TYPE_DISK:
-        return kfdFile;
-    case FILE_TYPE_CHAR:
-        return kfdCharDev;
-    case FILE_TYPE_PIPE:
-        return kfdSocket;
-    }
-
-    return kfdInvalid;
-}
-
-
-/* Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-uint64_t CC KSysDiskFileSize_v2 ( const KSysFile_v2 *self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcAccessing );
-#if 1
-/*     KOutMsg ("%s:\n",__func__); */
-    uint64_t size;
-    rc_t rc = get_file_size (self, &size);
-    if ( rc )
-        return 0 ;
-
-    return size;
-#else
-
-    LARGE_INTEGER sz;
-
-    if ( GetFileSizeEx ( self -> handle, & sz ) == 0 )
-    {
-        rc_t rc;
-        DWORD last_error;
-
-        last_error = GetLastError ();
-        switch ( last_error )
-        {
-        case ERROR_INVALID_HANDLE:
-            INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error handle = %zu", self->handle );
-            break;
-        default:
-            INTERNAL_ERROR ( xcErrorUnknown, "error accessing file system status" );
-            break;
-        }
-         return 0;
-    }
-
-    return sz . QuadPart;
-#endif
-}
-
-
-static
-uint64_t CC KSysFileSize_v2 ( const KSysFile_v2 *self, ctx_t ctx )
-{
-    INTERNAL_ERROR ( xcFunctionUnsupported, "function is not supported" );
-    return 0;
-}
-
-
-/* SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-void CC KSysDiskFileSetSize_v2 ( KSysFile_v2 *self, ctx_t ctx, uint64_t size )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcUpdating );
-
-    rc_t rc;
-    LARGE_INTEGER p;
-    uint64_t prev_size;
-
-/*     KOutMsg ("%s:\n",__func__); */
-    /* get previous size for setting or clearing sparse */
-    rc = get_file_size ( self, &prev_size);
-    if (rc)
-        return;
-/*     KOutMsg ("%s: %lu\n",__func__, prev_size); */
-
-    p . QuadPart = size;
-
-    if ( ! SetFilePointerEx ( self -> handle, p, & p, FILE_BEGIN ) )
-        rc = 1;
-    else
-    {
-        self -> pos = size;
-        if ( ! SetEndOfFile( self -> handle ) )
-            rc = 1;
-    }
-
-    /* failure to set size*/
-    if ( rc != 0 )
-    {
-        DWORD last_error;
-
-        last_error = GetLastError ();
-        switch ( last_error  )
-        {
-        case ERROR_INVALID_HANDLE:
-            INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error handle = %zu", self->handle );
-            break;
-        default:
-            INTERNAL_ERROR ( xcErrorUnknown, "error accessing file system status" );
-        }
-        return;
-    }
-
-    /* check for wanting to be sparse file */
-    if (size > prev_size)
-    {
-        uint64_t diff;
-
-/*         KOutMsg ("%s: size(%lu) larger than prev_size(%lu)\n",__func__, size, prev_size); */
-
-        diff = size - prev_size;
-
-        /* if block size if big enough we'll try to make it a sparse block */
-        if (diff >= MIN_SPARSE_BLOCK_DIFF)
-        {
-/*             KOutMsg ("%s: diff(%lu) larger than block constant(%lu)\n",__func__, diff, MIN_SPARSE_BLOCK_DIFF); */
-            /* set sparse? */
-            if (!check_if_sparse(self)) /* isn't sparse now */
-            {
-                if (diff >= MIN_SET_SPARSE_DIFF)
-                {
-/*                     KOutMsg ("%s: diff(%lu) larger than sparse constant(%lu)\n",__func__, diff, MIN_SET_SPARSE_DIFF); */
-                    (void)set_sparse (self);
-                }
-            }
-            /* ordered to try to set before looking to set the zero region */
-            if (self->is_sparse)
-            {
-                /* set sparse region at end */
-                set_zero_region (self, prev_size, diff);
-            }
-        }
-    }
-    else if (can_be_made_not_sparse (self))
-        (void)set_not_sparse (self);
-}
-
-
-static
-void CC KSysFileSetSize_v2 ( KSysFile_v2 *self, ctx_t ctx, uint64_t size )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcUpdating );
-
-    INTERNAL_ERROR ( xcFunctionUnsupported, "function is not supported" );
-}
-
-
-/* Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-size_t KSysFileReadCommon_v2 ( const KSysFile_v2 *cself, ctx_t ctx, 
-    void *buffer, size_t bsize )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcReading );
-
-    DWORD to_read, bytes_read;
-    KSysFile_v2 *self = ( KSysFile* ) cself;
-    
-    to_read = ( DWORD ) bsize;
-    if ( sizeof bsize > sizeof to_read && ( size_t ) to_read != bsize )
-        to_read = ~ 0U;
-
-    while ( 1 )
-    {
-        bytes_read = 0;
-        if ( ReadFile ( self -> handle, buffer, to_read, & bytes_read, NULL ) == 0 )
-        {
-            DWORD last_error;
-
-            switch ( last_error = GetLastError () )
-            {
-            case ERROR_HANDLE_EOF:
-                break;
-            case ERROR_IO_PENDING:
-                continue; 
-            default:
-                {
-                    INTERNAL_ERROR ( xcErrorUnknown, "error reading system file" );
-                    return 0;
-                }
-           }
-        }
-        
-        self -> pos += bytes_read;
-        break;
-    }
-
-    return bytes_read;
-}
-
-static
-size_t CC KSysDiskFileRead_v2 ( const KSysFile_v2 *cself, ctx_t ctx, uint64_t pos,
-    void *buffer, size_t bsize )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcReading );
-
-    KSysFile_v2 *self = ( KSysFile* ) cself;
-
-    if ( self -> pos != pos )
-    {
-        LARGE_INTEGER p;
-
-        if ( !GetFileSizeEx( self -> handle, &p ) )
-        {
-            DWORD last_error;
-
-            last_error = GetLastError ();
-            switch ( last_error )
-            {
-            case ERROR_INVALID_HANDLE:
-                INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error handle = %zu", self->handle );
-                break;
-            default:
-                INTERNAL_ERROR ( xcErrorUnknown, "error positioning  system file" );
-                break;
-            }
-            return 0;
-        }
-
-        /* if we try to read beyond the end of the file... */
-        if ( ( LONGLONG ) pos >= p . QuadPart )   
-        {   /* We've defined reading beyond EOF as return RC of 0 but bytes read as 0 */
-            /*return RC ( rcFS, rcFile, rcPositioning, rcFileDesc, rcInvalid );*/
-            INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error handle" );
-            return 0;
-        }
-
-        p . QuadPart = pos;
-        if ( !SetFilePointerEx ( self -> handle, p, & p, FILE_BEGIN ) )
-        {
-            DWORD last_error;
-
-            last_error = GetLastError ();
-            switch ( last_error )
-            {
-            case ERROR_INVALID_HANDLE:
-                INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error handle = %zu", self->handle );
-                break;
-            default:
-                INTERNAL_ERROR ( xcErrorUnknown, "error positioning  system file" );
-                break;
-            }
-            return 0;
-        }
-
-        self -> pos = p . QuadPart;
-        if ( pos != p . QuadPart )
-        {
-            if ( pos > (uint64_t)( p . QuadPart ) )
-            {
-                INTERNAL_ERROR ( xcErrorUnknown, "positioning error while writing to system file" );
-                return 0;
-            }
-
-            INTERNAL_ERROR ( xcErrorUnknown, "error positioning  system file" );
-            return 0;
-        }
-    }
-
-    return KSysFileReadCommon_v2 ( cself, ctx, buffer, bsize );
-}
-
-static
-size_t CC KSysFileRead_v2 ( const KSysFile_v2 *cself, ctx_t ctx,  uint64_t pos,
-    void *buffer, size_t bsize )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcReading );
-
-    KSysFile_v2 *self = ( KSysFile* ) cself;
-
-    if ( self -> pos != pos )
-    {
-        INTERNAL_ERROR ( xcFileDescInvalid, "incorrect file descriptor  handle = %zu", self->handle );
-        return 0;
-    }
-
-    return KSysFileReadCommon_v2 ( cself, ctx, buffer, bsize );
-}
-
-
-/* Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- */
-
-#define WINDOWS_HEAP_LIMIT (32*1024)
-
-static
-size_t KSysFileWriteCommon_v2 ( KSysFile_v2 *self, ctx_t ctx,
-    const void *_buffer, size_t size )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcWriting );
-
-    DWORD to_write;
-    DWORD bytes_writ;
-    DWORD iter_writ;
-    const char * buffer = _buffer;
-
-    to_write = (DWORD) size;
-
-    if (sizeof size > sizeof to_write && ( size_t ) to_write != size )
-        to_write = ~ 0U;
-
-    for ( bytes_writ = 0; to_write > 0; )
-    {
-        DWORD iter_to_write = 
-            (to_write > WINDOWS_HEAP_LIMIT)? WINDOWS_HEAP_LIMIT : to_write;
-
-        
-        for (iter_writ = 0;
-             ! WriteFile ( self -> handle, buffer, iter_to_write, &iter_writ, NULL);
-             iter_writ = 0)
-        {
-            DWORD last_error;
-
-            last_error = GetLastError ();
-            switch ( last_error )
-            {
-            case ERROR_IO_PENDING:
-                Sleep (100); /* sure let's give it a chance to settle */
-                if (iter_writ)
-                {
-                    buffer += iter_writ;
-                    iter_to_write -= iter_writ;
-                    to_write -= iter_writ;
-                    bytes_writ += iter_writ;
-                }
-                continue; /* back to while() */
- 
-            case ERROR_INVALID_HANDLE:
-                INTERNAL_ERROR ( xcFileDescInvalid, "invalid system file  handle = %zu", self->handle );
-                break;
-
-            case ERROR_NOT_ENOUGH_MEMORY:
-                INTERNAL_ERROR ( xcNoMemory, "out of memory for WindowWriteFile" );
-                break;
-
-            default:
-                INTERNAL_ERROR ( xcErrorUnknown, "error writing  system file" );
-                break;
-            }
-            return 0;
-        }
-
-        buffer += iter_writ;
-        to_write -= iter_writ;
-        bytes_writ += iter_writ;
-    }
-
-    self -> pos += bytes_writ;
-
-    return (size_t)bytes_writ;
-}
-
-static
-size_t CC KSysDiskFileWrite_v2 ( KSysFile_v2 *self, ctx_t ctx, uint64_t pos,
-    const void *buffer, size_t size )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcWriting );
-
-    rc_t rc;
-    if ( self -> pos != pos )
-    {
-        LARGE_INTEGER p;
-        uint64_t curr_size;
-
-        rc = get_file_size ( self, &curr_size );
-        if ( rc != 0 )
-        {
-            INTERNAL_ERROR ( xcErrorUnknown, "failed to get file size" );
-            return 0;
-        }
-
-        if ( curr_size < pos )
-        {
-            KSysDiskFileSetSize_v2 (self, ctx, pos);
-            if ( FAILED () )
-            {
-                INTERNAL_ERROR ( xcErrorUnknown, "failed to set file size" );
-                return 0;
-            }
-        }
-
-
-        p . QuadPart = pos;
-
-        if ( SetFilePointerEx ( self -> handle, p, & p, FILE_BEGIN ) == 0 )
-        {
-            DWORD last_error;
-
-            last_error = GetLastError ();
-            switch ( last_error )
-            {
-            case ERROR_INVALID_HANDLE:
-                INTERNAL_ERROR ( xcFileDescInvalid, "invalid system file  handle = %zu", self->handle );
-                break;
-            default:
-                INTERNAL_ERROR ( xcErrorUnknown, "error writing  system file" );
-                break;
-            }
-            return 0;
-        }
-
-        self -> pos = p . QuadPart;
-        if ( pos != p . QuadPart )
-        {
-            INTERNAL_ERROR ( xcErrorUnknown, "positioning error while writing to system file" );
-        }
-    }
-
-    return KSysFileWriteCommon_v2 ( self, ctx, buffer, size );
-}
-static
-size_t CC KSysFileWrite_v2 ( KSysFile_v2 *self, ctx_t ctx, uint64_t pos,
-    const void *buffer, size_t size )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcWriting );
-
-    if ( self -> pos != pos )
-    {
-        INTERNAL_ERROR ( xcFileDescInvalid, "incorrect file descriptor  handle = %zu", self->handle );
-        return 0;
-    }
-
-    return KSysFileWriteCommon_v2 ( self, ctx, buffer, size );
-}
-
-
-/* Make
- *  create a new file object
- *  from file descriptor
- */
-static const KFile_vt_v2 vtKSysDiskFile =
-{
-    /* version 2.0 */
-    2, 0,
-
-    /* start minor version 0 methods */
-    KSysFileDestroy_v2,
-    KSysFileGetSysFile_v2,
-    KSysDiskFileRandomAccess_v2,
-    KSysDiskFileSize_v2,
-    KSysDiskFileSetSize_v2,
-    KSysDiskFileRead_v2,
-    KSysDiskFileWrite_v2,
-    KSysFileType_v2
-
-};
-static const KFile_vt_v2 vtKSysOtherFile =
-{
-    /* version 2.0 */
-    2, 0,
-
-    /* start minor version 0 methods */
-    KSysFileDestroy_v2,
-    KSysFileGetSysFile_v2,
-    KSysFileRandomAccess_v2,
-    KSysFileSize_v2,
-    KSysFileSetSize_v2,
-    KSysFileRead_v2,
-    KSysFileWrite_v2,
-    KSysFileType_v2
-
-};
-static const KFile_vt_v2 vtKSysStdIODiskFile =
-{
-    /* version 2.0 */
-    2, 0,
-
-    /* start minor version 0 methods */
-    KSysStdIOFileDestroy_v2,
-    KSysFileGetSysFile_v2,
-    KSysDiskFileRandomAccess_v2,
-    KSysDiskFileSize_v2,
-    KSysDiskFileSetSize_v2,
-    KSysDiskFileRead_v2,
-    KSysDiskFileWrite_v2,
-    KSysFileType_v2
-
-};
-static const KFile_vt_v2 vtKSysStdIOOtherFile =
-{
-    /* version 2.0 */
-    2, 0,
-
-    /* start minor version 0 methods */
-    KSysStdIOFileDestroy_v2,
-    KSysFileGetSysFile_v2,
-    KSysFileRandomAccess_v2,
-    KSysFileSize_v2,
-    KSysFileSetSize_v2,
-    KSysFileRead_v2,
-    KSysFileWrite_v2,
-    KSysFileType_v2
-
-};
-
-
-static
-KSysFile_v2 * KSysFileMakeVT_v2 ( ctx_t ctx, HANDLE fd, const KFile_vt *vt, const char *path,
-    uint64_t initial_pos, bool read_enabled, bool write_enabled )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcConstructing );
-
-    KSysFile_v2 *f;
-
-    if( fd == INVALID_HANDLE_VALUE ) /* ? */
-    {
-        INTERNAL_ERROR ( xcFileDescInvalid, "bad file descriptor error fd = %zu", fd );
-        return NULL;
-    }
-
-
-    f = malloc ( sizeof *f );
-    if ( f == NULL )
-    {
-        SYSTEM_ERROR ( xcNoMemory, "out of memory" );
-        return NULL;
-    }
-    else
-    {
-        TRY ( KFileInit ( & f -> dad, ctx, vt, "KSysFile", path, read_enabled, write_enabled ) )
-        {
-            f -> handle = fd;
-            f -> pos = initial_pos;
-            f -> failed_set_sparse = f->is_sparse = false;
-            check_if_sparse (f);
-            return f;
-        }
-
-        free ( f );
-    }
-    return NULL;
-}
-
-/* bit flags */
-#define ISDISK  1
-#define ISSTDIO 2
-
-static
-KSysFile_v2 * KSysFileMakeInt_v2 ( ctx_t ctx, HANDLE fd, const char *path, bool read_enabled, bool write_enabled, unsigned flags )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcConstructing );
-
-    DWORD ret;
-    const KFile_vt * vt;
-    uint64_t initial_pos;
-
-
-    ret = GetFileType (fd);
-
-    switch (ret)
-    {
-    case FILE_TYPE_DISK:
-        flags |= ISDISK;
-        initial_pos = -1;
-        break;
-
-    case FILE_TYPE_UNKNOWN:
-        ret = GetLastError();
-        switch (ret)
-        {
-        default:
-            INTERNAL_ERROR ( xcErrorUnknown, "error unknown file type" );
-            return NULL;
-
-            /* specific errors can be added here */
-
-        case NO_ERROR:
-            break;
-        }
-
-        initial_pos = 0;
-        flags &= ~ISDISK;
-        break;
-
-    default:
-        initial_pos = 0;
-        flags &= ~ISDISK;
-        break;
-    }
-
-    switch (flags & (ISDISK|ISSTDIO))
-    {
-    case 0:
-        vt = (const KFile_vt*)&vtKSysOtherFile;
-        break;
-
-    case ISDISK:
-        vt = (const KFile_vt*)&vtKSysDiskFile;
-        break;
-
-    case ISSTDIO:
-        vt = (const KFile_vt*)&vtKSysStdIOOtherFile;
-        break;
-
-    case ISDISK|ISSTDIO:
-        vt = (const KFile_vt*)&vtKSysStdIODiskFile;
-        break;
-    }
-
-    return KSysFileMakeVT_v2 ( ctx, fd, vt, path, initial_pos, read_enabled, write_enabled );
-}
-
-/* extern, but internal to libkfs */
-KSysFile_v2 * KSysFileMake_v2 ( ctx_t ctx, HANDLE fd, const char *path, bool read_enabled, bool write_enabled )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcConstructing );
-
-    return  KSysFileMakeInt_v2 ( ctx, fd, path, read_enabled, write_enabled, 0 );
-}
-
-
-/* MakeStdIn
- *  creates a read-only file on stdin
- */
-LIB_EXPORT const KFile_v2 * CC KFileMakeStdIn_v2 ( ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcConstructing );
-
-    HANDLE fd = GetStdHandle ( STD_INPUT_HANDLE );
-    return ( KFile_v2 * ) KSysFileMakeInt_v2 ( ctx, fd, "stdin", true, false, ISSTDIO );
-}
-
-/* MakeStdOut
- * MakeStdErr
- *  creates a write-only file on stdout or stderr
- */
-LIB_EXPORT const KFile_v2 * CC KFileMakeStdOut_v2 ( ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcConstructing );
-
-    HANDLE fd = GetStdHandle ( STD_OUTPUT_HANDLE );
-    return ( const KFile_v2 * ) KSysFileMakeInt_v2 ( ctx, fd, "stdout", false, true, ISSTDIO );
-}
-
-LIB_EXPORT const KFile_v2 * CC KFileMakeStdErr_v2 ( ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcFS, rcFile, rcConstructing );
-
-    HANDLE fd = GetStdHandle ( STD_ERROR_HANDLE );
-    return ( const KFile_v2 * ) KSysFileMakeInt_v2 ( ctx, fd, "stderr", false, true, ISSTDIO );
-}
-
-/* MakeFDFile
- *  creates a file from a file-descriptor
- *  not supported under Windows
- */
-LIB_EXPORT const KFile_v2 * CC KFileMakeFDFileRead_v2 ( ctx_t ctx, int fd )
-{
-    INTERNAL_ERROR ( xcFunctionUnsupported, "function is not supported" );
-
-    return NULL;
-}
-
-LIB_EXPORT KFile_v2 * CC KFileMakeFDFileWrite_v2 ( ctx_t ctx, bool update, int fd )
-{
-    INTERNAL_ERROR ( xcFunctionUnsupported, "function is not supported" );
-
-    return NULL;
-}
diff --git a/libs/kfs/win/sysfile.c b/libs/kfs/win/sysfile.c
deleted file mode 100644
index bb39d79..0000000
--- a/libs/kfs/win/sysfile.c
+++ /dev/null
@@ -1,1059 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KSysFile_v1;
-#define KFILE_IMPL struct KSysFile_v1
-
-#include "sysfile-priv.h"
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <klib/text.h>
-#include <sysalloc.h>
-
-/* temporary */
-/* #include <klib/out.h> */
-
-/* do not include windows.h it is already included by os-native.h */
-#include <os-native.h>
-#include <WinIoCtl.h>
-
-/*--------------------------------------------------------------------------
- * KSysFile
- *  a Windows file
- */
-
-/* minimum set size or write beyond size difference to trigger setting sparse */
-/* tune this if too many or too few sparse files */
-#define MIN_SET_SPARSE_DIFF   (16*1024)
-#define MIN_SPARSE_BLOCK_DIFF  (4*1024)
-
-
-/* ----------
- * Some functions to isolate the calls to Windows functions as I feel dirty
- * just using them.
- * really its to isolate some calls the very different style of parmaters
- * for the calls from the usualy project approach.
- *
- * if the compiler inlines them it's all good.
- */
-
-/*
- * Get file size 
- */
-static rc_t get_file_size ( const KSysFile_v1 *self, uint64_t *size )
-{
-    LARGE_INTEGER sz;
-
-    if ( GetFileSizeEx ( self -> handle, & sz ) == 0 )
-    {
-        rc_t rc;
-        DWORD last_error;
-
-        last_error = GetLastError ();
-        switch ( last_error )
-        {
-        case ERROR_INVALID_HANDLE:
-            rc = RC ( rcFS, rcFile, rcAccessing, rcFileDesc, rcInvalid );
-            break;
-        default:
-            rc = RC ( rcFS, rcFile, rcAccessing, rcNoObj, rcUnknown );
-            break;
-        }
-        PLOGERR (klogErr,
-                 (klogErr, rc, "error accessing file system status - $(E)($(C))",
-                  "E=%!,C=%u", last_error, last_error)); 
-        return rc;
-    }
-    *size = sz.QuadPart;
-
-    return 0;
-}
-
-
-/* returns (and side effect sets in structure)
- * if the file is already a sparse file
- */
-static bool check_if_sparse ( KSysFile_v1 *self )
-{
-    BY_HANDLE_FILE_INFORMATION info;
-    BOOL worked;
-
-    if (self->is_sparse)
-        return true;
-
-    /*
-     * we don't use the GetFileInformationBy HandleEx as we don't want to 
-     * exclude Win XP yet.
-     */
-    worked = GetFileInformationByHandle (self->handle, &info);
-
-    self->is_sparse = 
-        ((info.dwFileAttributes & FILE_ATTRIBUTE_SPARSE_FILE)
-         == FILE_ATTRIBUTE_SPARSE_FILE);
-
-    return self->is_sparse;
-}
-
-/*
- * make a file sparse set_it == true
- * return is like Windows funcs with true being good
- *
- * we can't set if the Windows Volume doesn't allow it
- * but we'll let the function fail rather than try to get the value at 
- * CREATE (open) time because we'd be then checking at all file CREATE
- * whether we'd ever make it sparse or not
- */
-static
-bool set_sparse ( KSysFile_v1 *self )
-{
-    FILE_SET_SPARSE_BUFFER b = { true };
-    DWORD ret;
-    BOOL worked;
-    bool rreett = false;
-
-    /* don't duplicate effort */
-    if (self->is_sparse)
-        rreett =  true;
-
-    else if (self->failed_set_sparse)
-        rreett = false;
-
-    else
-    {
-        worked = DeviceIoControl ( self->handle, FSCTL_SET_SPARSE, &b, sizeof b,
-                              NULL, 0, &ret, NULL );
-/*         KOutMsg ("%s: %u\n",__func__,worked); */
-
-        /* not trusting bool is BOOL cause I don't trust Microsoft */
-        self->failed_set_sparse = (worked == 0);
-        self->is_sparse = !self->failed_set_sparse;
-        rreett =  self->is_sparse;
-    }
-/*     KOutMsg ("%s: %d\n",__func__,rreett); */
-    return rreett;
-}
-
-
-static bool set_not_sparse ( KSysFile_v1 *self )
-{
-    FILE_SET_SPARSE_BUFFER b = { false };
-    DWORD ret;
-    BOOL worked;
-
-    /* don't duplicate effort */
-    if (!check_if_sparse (self))
-        return true;
-
-    if (self->failed_set_sparse)
-        return false;
-
-    worked = DeviceIoControl (self->handle, FSCTL_SET_SPARSE, &b, sizeof b,
-                              NULL, 0, &ret, NULL);
-
-    /* not trusting bool is BOOL cause I don't trust Microsoft */
-    self->failed_set_sparse = (worked == 0);
-    self->is_sparse = self->failed_set_sparse;
-    return ! self->is_sparse;
-}
-
-/*
- * this one works for non-sparse files too but what evs.
- */
-static rc_t set_zero_region ( KSysFile_v1 *self, uint64_t start, uint64_t size)
-{
-    FILE_ZERO_DATA_INFORMATION b = { ( DWORD ) start, ( LONG ) ( start + size ) };
-    DWORD ret;
-    BOOL worked;
-
-    worked = DeviceIoControl (self->handle, FSCTL_SET_ZERO_DATA,
-                            &b, sizeof b,
-                            NULL, 0,
-                            &ret, NULL);
-
-    /* TODO: check error codes with GetLastError and better rc values */
-    return (worked != 0) ? 0 : RC (rcFS, rcFile, rcWriting, rcBuffer, rcUnexpected);
-}
-
-
-/*
- * returns true if we can convert this file into a non-sparse file
- *
- * We went simple and fast.  We ask about zero regions.
- * if we specifically get back that there are none we say true
- * otherwise we say false.
- *
- * self can be modified so it can not be const
- */
-static bool can_be_made_not_sparse ( KSysFile_v1 *self )
-{
-#if 1
-    return false;
-#else
-    /* this is backwards - the list of os non-zero regions not zero regions */
-    LARGE_INTEGER fo;
-    LARGE_INTEGER l;
-    uint64_t size;
-    FILE_ALLOCATED_RANGE_BUFFER i;
-    FILE_ALLOCATED_RANGE_BUFFER o [16]; /* some none 0 number */
-    uint64_t count;
-    DWORD ret;
-    BOOL worked;
-    rc_t rc;
-
-    /* if is isn't sparse we can't make it not sparse */
-    /* first might be not yet set */
-    if (!check_if_sparse (self))
-        return true;
-
-    /* we can't scan for zero regions if we can't get a size */
-    rc = get_file_size (self, &size);
-    if (rc)
-        return false;
-
-    /* Microsoft APIs can be fairly odd */
-    fo.QuadPart = 0;
-    l.QuadPart = size;
-    i.FileOffset = fo;
-    i.Length = l;
-
-    worked = DeviceIoControl (self->handle, FSCTL_QUERY_ALLOCATED_RANGES,
-                              &i, sizeof i, o, sizeof o, & ret, NULL);
-    /* we can't change to non-sparse if we can't scan for zero regions */
-    if (worked == 0)
-        return false;
-
-    return (ret == 0);
-#endif
-}
-
-
-/* Destroy
- */
-static
-rc_t CC KSysFileDestroy_v1 ( KSysFile_v1 *self )
-{
-    rc_t rc = 0;
-
-    if ( CloseHandle (self -> handle ) == 0 )
-    {
-        DWORD last_error;
-
-        last_error = GetLastError();
-        switch ( last_error )
-        {
-        case ERROR_INVALID_HANDLE:
-            break;
-        default:
-            rc = RC (rcFS, rcFile, rcDestroying, rcNoObj, rcUnknown);
-            PLOGERR (klogErr,
-                     (klogErr, rc, "error closing system file - $(E)$($(C))",
-                      "E=%!,C=%u", last_error, last_error)); 
-        }
-    }
-    DeleteCriticalSection(&self -> lock);
-    free ( self );
-    return rc;
-}
-
-
-static
-rc_t CC KSysStdIOFileDestroy_v1 ( KSysFile_v1 *self )
-{
-    DeleteCriticalSection(&self -> lock);
-    free ( self );
-    return 0;
-}
-
-
-/* GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- */
-static
-KSysFile_v1 * CC KSysFileGetSysFile_v1 ( const KSysFile_v1 *self, uint64_t *offset )
-{
-    * offset = 0;
-    return ( KSysFile_v1 * ) self;
-}
-
-/* RandomAccess
- *  returns 0 if random access, error code otherwise
- */
-static
-rc_t CC KSysDiskFileRandomAccess_v1 ( const KSysFile_v1 *self )
-{
-    return 0;
-}
-static
-rc_t CC KSysFileRandomAccess_v1 ( const KSysFile_v1 *self )
-{
-/*     return RC ( rcFS, rcFile, rcAccessing, rcFileDesc, rcIncorrect ); */
-        return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported );
-}
-
-
-/* Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KSysFileType_v1 ( const KSysFile_v1 *self )
-{
-    switch ( GetFileType ( self -> handle ) )
-    {
-    case FILE_TYPE_DISK:
-        return kfdFile;
-    case FILE_TYPE_CHAR:
-        return kfdCharDev;
-    case FILE_TYPE_PIPE:
-        return kfdSocket;
-    }
-
-    return kfdInvalid;
-}
-
-
-/* Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KSysDiskFileSize_v1 ( const KSysFile_v1 *self, uint64_t *size )
-{
-#if 1
-/*     KOutMsg ("%s:\n",__func__); */
-    return get_file_size (self, size);
-#else
-
-    LARGE_INTEGER sz;
-
-    if ( GetFileSizeEx ( self -> handle, & sz ) == 0 )
-    {
-        rc_t rc;
-        DWORD last_error;
-
-        last_error = GetLastError ();
-        switch ( last_error )
-        {
-        case ERROR_INVALID_HANDLE:
-            rc = RC ( rcFS, rcFile, rcAccessing, rcFileDesc, rcInvalid );
-            break;
-        default:
-            rc = RC ( rcFS, rcFile, rcAccessing, rcNoObj, rcUnknown );
-            break;
-        }
-        PLOGERR (klogErr,
-                 (klogErr, rc, "error accessing file system status - $(E)($(C))",
-                  "E=%!,C=%u", last_error, last_error)); 
-        return rc;
-    }
-
-    *size = sz . QuadPart;
-    return 0;
-#endif
-}
-
-
-static
-rc_t CC KSysFileSize_v1 ( const KSysFile_v1 *self, uint64_t *size )
-{
-    *size = 0;
-/*     return RC ( rcFS, rcFile, rcAccessing, rcFileDesc, rcIncorrect ); */
-    return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported );
-}
-
-
-/* SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KSysDiskFileSetSize_v1 ( KSysFile_v1 *self, uint64_t size )
-{
-    rc_t rc = 1;
-    LARGE_INTEGER p;
-    uint64_t prev_size;
-
-    EnterCriticalSection(&self->lock);
-/*     KOutMsg ("%s:\n",__func__); */
-    /* get previous size for setting or clearing sparse */
-    rc = get_file_size ( self, &prev_size);
-    if (rc) {
-        LeaveCriticalSection(&self->lock);
-        return rc;
-    }
-/*     KOutMsg ("%s: %lu\n",__func__, prev_size); */
-
-    p . QuadPart = size;
-
-    if ( SetFilePointerEx ( self -> handle, p, & p, FILE_BEGIN ) )
-    {
-        self -> pos = size;
-        if ( SetEndOfFile( self -> handle ) )
-        {
-            rc = 0;
-        }
-    }
-
-    /* failure to set size*/
-    if ( rc != 0 )
-    {
-        DWORD last_error;
-
-        last_error = GetLastError ();
-        switch ( last_error  )
-        {
-        case ERROR_INVALID_HANDLE:
-            rc = RC ( rcFS, rcFile, rcUpdating, rcFileDesc, rcInvalid );
-        default:
-            rc = RC ( rcFS, rcFile, rcUpdating, rcNoObj, rcUnknown );
-        }
-        PLOGERR ( klogErr,
-                 ( klogErr, rc, "error setting filesize - $(E) - $(C) to $(D)",
-                   "E=%!,C=%u,D=%lu", last_error, last_error, size ) ); 
-    }
-
-    /* check for wanting to be sparse file */
-    if (size > prev_size)
-    {
-        uint64_t diff;
-
-/*         KOutMsg ("%s: size(%lu) larger than prev_size(%lu)\n",__func__, size, prev_size); */
-
-        diff = size - prev_size;
-
-        /* if block size if big enough we'll try to make it a sparse block */
-        if (diff >= MIN_SPARSE_BLOCK_DIFF)
-        {
-/*             KOutMsg ("%s: diff(%lu) larger than block constant(%lu)\n",__func__, diff, MIN_SPARSE_BLOCK_DIFF); */
-            /* set sparse? */
-            if (!check_if_sparse(self)) /* isn't sparse now */
-            {
-                if (diff >= MIN_SET_SPARSE_DIFF)
-                {
-/*                     KOutMsg ("%s: diff(%lu) larger than sparse constant(%lu)\n",__func__, diff, MIN_SET_SPARSE_DIFF); */
-                    (void)set_sparse (self);
-                }
-            }
-            /* ordered to try to set before looking to set the zero region */
-            if (self->is_sparse)
-            {
-                /* set sparse region at end */
-                set_zero_region (self, prev_size, diff);
-            }
-        }
-    }
-    else if (can_be_made_not_sparse (self))
-        (void)set_not_sparse (self);
-
-    LeaveCriticalSection(&self->lock);
-    return rc;
-}
-
-
-static
-rc_t CC KSysFileSetSize_v1 ( KSysFile_v1 *self, uint64_t size )
-{
-/*     return RC ( rcFS, rcFile, rcUpdating, rcFileDesc, rcIncorrect ); */
-        return RC ( rcFS, rcFile, rcUpdating, rcFunction, rcUnsupported );
-}
-
-
-/* Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-rc_t KSysFileReadCommon_v1 ( const KSysFile_v1 *cself,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    DWORD to_read, bytes_read;
-    KSysFile_v1 *self = ( KSysFile* ) cself;
-
-    to_read = ( DWORD ) bsize;
-    if ( sizeof bsize > sizeof to_read && ( size_t ) to_read != bsize )
-        to_read = ~ 0U;
-
-    for (;;)
-    {
-        bytes_read = 0;
-        if ( ReadFile ( self -> handle, buffer, to_read, & bytes_read, NULL ) == 0 )
-        {
-            DWORD last_error;
-
-            switch ( last_error = GetLastError () )
-            {
-            case ERROR_HANDLE_EOF:
-                break;
-            case ERROR_IO_PENDING:
-                continue; 
-            default:
-                {
-                    rc_t rc = RC ( rcFS, rcFile, rcReading, rcNoObj, rcUnknown);
-                    PLOGERR ( klogErr,
-                            ( klogErr, rc, "error reading system file - $(E)($(C))",
-                                            "E=%!,C=%u", last_error, last_error ) ); 
-                    return rc;
-                }
-           }
-        }
-        
-        self -> pos += bytes_read;
-        * num_read = bytes_read;
-        break;
-    }
-
-    return 0;
-}
-
-static
-rc_t CC KSysDiskFileRead_v1 ( const KSysFile_v1 *cself, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc;
-    KSysFile_v1 *self = ( KSysFile* ) cself;
-
-    EnterCriticalSection(&self->lock);
-
-    if ( self -> pos != pos )
-    {
-        LARGE_INTEGER p;
-
-        if ( !GetFileSizeEx( self -> handle, &p ) )
-        {
-            rc_t rc;
-            DWORD last_error;
-
-            last_error = GetLastError ();
-            switch ( last_error )
-            {
-            case ERROR_INVALID_HANDLE:
-                rc = RC ( rcFS, rcFile, rcPositioning, rcFileDesc, rcInvalid );
-                break;
-            default:
-                rc = RC ( rcFS, rcFile, rcPositioning, rcNoObj, rcUnknown );
-                break;
-            }
-            PLOGERR ( klogErr,
-                     ( klogErr, rc, "error positioning system file - $(E)($(C)) to $(D)",
-                       "E=%!,C=%u,D=%u", last_error, last_error, pos ) ); 
-            LeaveCriticalSection(&self->lock);
-            return rc;
-        }
-
-        /* if we try to read beyond the end of the file... */
-        if ( ( LONGLONG ) pos >= p . QuadPart )   
-        {   /* We've defined reading beyond EOF as return RC of 0 but bytes read as 0 */
-            /*return RC ( rcFS, rcFile, rcPositioning, rcFileDesc, rcInvalid );*/
-            LeaveCriticalSection(&self->lock);
-            return 0;
-        }
-
-        p . QuadPart = pos;
-        if ( !SetFilePointerEx ( self -> handle, p, & p, FILE_BEGIN ) )
-        {
-            rc_t rc;
-            DWORD last_error;
-
-            last_error = GetLastError ();
-            switch ( last_error )
-            {
-            case ERROR_INVALID_HANDLE:
-                rc = RC ( rcFS, rcFile, rcPositioning, rcFileDesc, rcInvalid );
-                PLOGERR (klogErr,
-                         (klogErr, rc, "invalid system file handle - $(E)($(C))",
-                          "E=%!,C=%u", last_error, last_error)); 
-                LeaveCriticalSection(&self->lock);
-                return rc;
-            default:
-                rc = RC ( rcFS, rcFile, rcPositioning, rcNoObj, rcUnknown );
-                PLOGERR ( klogErr,
-                          ( klogErr, rc, "error positioning system file - $(E)($(C)) to $(D)",
-                            "E=%!,C=%u,D=%lu", last_error, last_error, pos ) ); 
-                LeaveCriticalSection(&self->lock);
-                return rc;
-            }
-        }
-
-        self -> pos = p . QuadPart;
-        if ( pos != p . QuadPart )
-        {
-            if ( pos > (uint64_t)( p . QuadPart ) )
-            {
-                * num_read = 0;
-                LeaveCriticalSection(&self->lock);
-                return 0;
-            }
-
-            LeaveCriticalSection(&self->lock);
-            return RC ( rcFS, rcFile, rcPositioning, rcNoObj, rcUnknown );
-        }
-    }
-
-    rc = KSysFileReadCommon_v1 ( cself, buffer, bsize, num_read );
-    LeaveCriticalSection(&self->lock);
-    return rc;    
-}
-
-static
-rc_t CC KSysFileRead_v1 ( const KSysFile_v1 *cself, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc;
-    KSysFile_v1 *self = ( KSysFile* ) cself;
-    
-    EnterCriticalSection(&self->lock);
-    if ( self -> pos != pos )
-    {
-        LeaveCriticalSection(&self->lock);
-        *num_read = 0;
-        return RC ( rcFS, rcFile, rcPositioning, rcFileDesc, rcIncorrect );
-    }
-
-    rc = KSysFileReadCommon_v1 ( cself, buffer, bsize, num_read );
-    LeaveCriticalSection(&self->lock);
-    return rc;    
-}
-
-
-/* Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- */
-
-#define WINDOWS_HEAP_LIMIT (32*1024)
-
-static
-rc_t KSysFileWriteCommon_v1 ( KSysFile_v1 *self, 
-    const void *_buffer, size_t size, size_t *num_writ)
-{
-    DWORD to_write;
-    DWORD bytes_writ;
-    DWORD iter_writ;
-    const char * buffer = _buffer;
-
-    to_write = (DWORD) size;
-
-    if (sizeof size > sizeof to_write && ( size_t ) to_write != size )
-        to_write = ~ 0U;
-
-    for ( bytes_writ = 0; to_write > 0; )
-    {
-        DWORD iter_to_write = 
-            (to_write > WINDOWS_HEAP_LIMIT)? WINDOWS_HEAP_LIMIT : to_write;
-
-        
-        for (iter_writ = 0;
-             ! WriteFile ( self -> handle, buffer, iter_to_write, &iter_writ, NULL);
-             iter_writ = 0)
-        {
-            rc_t rc;
-            DWORD last_error;
-            const char * fmt;
-
-            last_error = GetLastError ();
-            switch ( last_error )
-            {
-            case ERROR_IO_PENDING:
-                Sleep (100); /* sure let's give it a chance to settle */
-                if (iter_writ)
-                {
-                    buffer += iter_writ;
-                    iter_to_write -= iter_writ;
-                    to_write -= iter_writ;
-                    bytes_writ += iter_writ;
-                }
-                continue; /* back to while() */
- 
-            case ERROR_INVALID_HANDLE:
-                rc = RC ( rcFS, rcFile, rcWriting, rcFileDesc, rcInvalid );
-                fmt = "invalid system file handle - $(E)($(C))";
-                break;
-
-            case ERROR_NOT_ENOUGH_MEMORY:
-                rc = RC (rcFS, rcFile, rcWriting, rcMemory, rcExhausted);
-                fmt = "error out of memory for WindowsWriteFile - $(E)($(C))";
-                break;
-
-            default:
-                rc = RC ( rcFS, rcFile, rcWriting, rcNoObj, rcUnknown );
-                fmt = "error writing system file - $(E)($(C))";
-                break;
-            }
-
-            PLOGERR (klogErr,
-                     (klogErr, rc, fmt, "E=%!,C=%u", last_error, last_error)); 
-            return rc;
-        }
-        buffer += iter_writ;
-        to_write -= iter_writ;
-        bytes_writ += iter_writ;
-    }
-
-    self -> pos += bytes_writ;
-
-    if (num_writ != NULL)
-        * num_writ = (size_t)bytes_writ;
-
-    return 0;
-}
-static
-rc_t CC KSysDiskFileWrite_v1 ( KSysFile_v1 *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ)
-{
-    rc_t rc;
-    EnterCriticalSection(&self->lock);
-    if ( self -> pos != pos )
-    {
-        LARGE_INTEGER p;
-        uint64_t curr_size;
-
-        rc = get_file_size ( self, &curr_size );
-        if ( rc != 0 ) 
-        {
-            LeaveCriticalSection(&self->lock);
-            return rc;
-        }
-
-        if ( curr_size < pos )
-        {
-            LeaveCriticalSection(&self->lock);
-            rc = KSysDiskFileSetSize_v1 (self, pos);
-            if (rc)
-                return rc;
-            EnterCriticalSection(&self->lock);
-        }
-
-
-        p . QuadPart = pos;
-
-        if ( SetFilePointerEx ( self -> handle, p, & p, FILE_BEGIN ) == 0 )
-        {
-            DWORD last_error;
-
-            last_error = GetLastError ();
-            switch ( last_error )
-            {
-            case ERROR_INVALID_HANDLE:
-                rc = RC ( rcFS, rcFile, rcWriting, rcFileDesc, rcInvalid );
-                PLOGERR (klogErr,
-                         (klogErr, rc, "invalid system file handle - $(E)($(C))",
-                          "E=%!,C=%u", last_error, last_error)); 
-                break;
-            default:
-                rc = RC ( rcFS, rcFile, rcWriting, rcNoObj, rcUnknown );
-                PLOGERR (klogErr,
-                         (klogErr, rc, "error writing system file - $(E)($(C))",
-                          "E=%!,C=%u", last_error, last_error)); 
-                break;
-            }
-            LeaveCriticalSection(&self->lock);
-            return rc;
-        }
-
-        self -> pos = p . QuadPart;
-        if ( pos != p . QuadPart )
-        {
-            LeaveCriticalSection(&self->lock);
-            return RC ( rcFS, rcFile, rcPositioning, rcNoObj, rcUnknown );
-        }
-    }
-
-    rc = KSysFileWriteCommon_v1 ( self, buffer, size, num_writ );
-    LeaveCriticalSection(&self->lock);
-    return rc;    
-}
-static
-rc_t CC KSysFileWrite_v1 ( KSysFile_v1 *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ)
-{
-    rc_t rc;
-    EnterCriticalSection(&self->lock);
-    if ( self -> pos != pos )
-    {
-        *num_writ = 0;
-        LeaveCriticalSection(&self->lock);
-        return RC ( rcFS, rcFile, rcPositioning, rcFileDesc, rcIncorrect );
-    }
-
-    rc = KSysFileWriteCommon_v1 ( self, buffer, size, num_writ );
-    LeaveCriticalSection(&self->lock);
-    return rc;    
-}
-
-
-/* Make
- *  create a new file object
- *  from file descriptor
- */
-static const KFile_vt_v1 vtKSysDiskFile =
-{
-    /* version 1.1 */
-    1, 1,
-
-    /* start minor version 0 methods */
-    KSysFileDestroy_v1,
-    KSysFileGetSysFile_v1,
-    KSysDiskFileRandomAccess_v1,
-    KSysDiskFileSize_v1,
-    KSysDiskFileSetSize_v1,
-    KSysDiskFileRead_v1,
-    KSysDiskFileWrite_v1,
-    /* end minor version 0 methods */
-
-    /* start minor version == 1 */
-    KSysFileType_v1
-    /* end minor version == 1 */
-};
-static const KFile_vt_v1 vtKSysOtherFile =
-{
-    /* version 1.1 */
-    1, 1,
-
-    /* start minor version 0 methods */
-    KSysFileDestroy_v1,
-    KSysFileGetSysFile_v1,
-    KSysFileRandomAccess_v1,
-    KSysFileSize_v1,
-    KSysFileSetSize_v1,
-    KSysFileRead_v1,
-    KSysFileWrite_v1,
-    /* end minor version 0 methods */
-
-    /* start minor version == 1 */
-    KSysFileType_v1
-    /* end minor version == 1 */
-};
-static const KFile_vt_v1 vtKSysStdIODiskFile =
-{
-    /* version 1.1 */
-    1, 1,
-
-    /* start minor version 0 methods */
-    KSysStdIOFileDestroy_v1,
-    KSysFileGetSysFile_v1,
-    KSysDiskFileRandomAccess_v1,
-    KSysDiskFileSize_v1,
-    KSysDiskFileSetSize_v1,
-    KSysDiskFileRead_v1,
-    KSysDiskFileWrite_v1,
-    /* end minor version 0 methods */
-
-    /* start minor version == 1 */
-    KSysFileType_v1
-    /* end minor version == 1 */
-};
-static const KFile_vt_v1 vtKSysStdIOOtherFile =
-{
-    /* version 1.1 */
-    1, 1,
-
-    /* start minor version 0 methods */
-    KSysStdIOFileDestroy_v1,
-    KSysFileGetSysFile_v1,
-    KSysFileRandomAccess_v1,
-    KSysFileSize_v1,
-    KSysFileSetSize_v1,
-    KSysFileRead_v1,
-    KSysFileWrite_v1,
-    /* end minor version 0 methods */
-
-    /* start minor version == 1 */
-    KSysFileType_v1
-    /* end minor version == 1 */
-};
-
-
-static
-rc_t KSysFileMakeVT ( KSysFile_v1 **fp, HANDLE fd, const KFile_vt *vt, const char *path,
-    uint64_t initial_pos, bool read_enabled, bool write_enabled )
-{
-    rc_t rc;
-    KSysFile_v1 *f;
-
-    if( fd == INVALID_HANDLE_VALUE ) /* ? */
-        return RC ( rcFS, rcFile, rcConstructing, rcFileDesc, rcInvalid );
-
-    f = malloc ( sizeof *f );
-    if ( f == NULL )
-        rc = RC(rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-    else
-    {
-        rc = KFileInit ( & f -> dad, vt, "KSysFile", path, read_enabled, write_enabled );
-        if ( rc == 0 )
-        {
-            f -> handle = fd;
-            f -> pos = initial_pos;
-            f -> failed_set_sparse = f->is_sparse = false;
-            check_if_sparse (f);
-            InitializeCriticalSection(& f -> lock);
-            *fp = f;
-            return 0;
-        }
-
-        free ( f );
-    }
-    return rc;
-}
-
-/* bit flags */
-#define ISDISK  1
-#define ISSTDIO 2
-
-static
-rc_t KSysFileMakeInt ( KSysFile_v1 **fp, HANDLE fd, const char *path, bool read_enabled, bool write_enabled, unsigned flags )
-{
-    DWORD ret;
-    const KFile_vt * vt;
-    uint64_t initial_pos;
-
-    if (fp == NULL)
-        return RC (rcFS, rcFile, rcConstructing, rcSelf, rcNull);
-
-    *fp = NULL; /* pre-fail */
-
-    ret = GetFileType (fd);
-
-    switch (ret)
-    {
-    case FILE_TYPE_DISK:
-        flags |= ISDISK;
-        initial_pos = -1;
-        break;
-
-    case FILE_TYPE_UNKNOWN:
-        ret = GetLastError();
-        switch (ret)
-        {
-        default:
-            return RC (rcFS, rcFile, rcConstructing, rcFileDesc, rcUnknown);
-
-            /* specific errors can be added here */
-
-        case NO_ERROR:
-            break;
-        }
-
-        initial_pos = 0;
-        flags &= ~ISDISK;
-        break;
-
-    default:
-        initial_pos = 0;
-        flags &= ~ISDISK;
-        break;
-    }
-
-    switch (flags & (ISDISK|ISSTDIO))
-    {
-    case 0:
-        vt = (const KFile_vt*)&vtKSysOtherFile;
-        break;
-
-    case ISDISK:
-        vt = (const KFile_vt*)&vtKSysDiskFile;
-        break;
-
-    case ISSTDIO:
-        vt = (const KFile_vt*)&vtKSysStdIOOtherFile;
-        break;
-
-    case ISDISK|ISSTDIO:
-        vt = (const KFile_vt*)&vtKSysStdIODiskFile;
-        break;
-    }
-
-    return KSysFileMakeVT ( fp, fd, vt, path, initial_pos, read_enabled, write_enabled );
-}
-
-/* extern, but internal to libkfs */
-rc_t KSysFileMake ( KSysFile_v1 **fp, HANDLE fd, const char *path, bool read_enabled, bool write_enabled )
-{
-    return KSysFileMakeInt ( fp, fd, path, read_enabled, write_enabled, 0 );
-}
-
-
-/* MakeStdIn
- *  creates a read-only file on stdin
- */
-LIB_EXPORT rc_t CC KFileMakeStdIn ( const KFile **fp )
-{
-    HANDLE fd = GetStdHandle ( STD_INPUT_HANDLE );
-    return KSysFileMakeInt ( (KSysFile**)fp, fd, "stdin", true, false, ISSTDIO );
-}
-
-/* MakeStdOut
- * MakeStdErr
- *  creates a write-only file on stdout or stderr
- */
-LIB_EXPORT rc_t CC KFileMakeStdOut ( KFile **fp )
-{
-    HANDLE fd = GetStdHandle ( STD_OUTPUT_HANDLE );
-    return KSysFileMakeInt ( (KSysFile**)fp, fd, "stdout", false, true, ISSTDIO );
-}
-
-LIB_EXPORT rc_t CC KFileMakeStdErr ( KFile **fp )
-{
-    HANDLE fd = GetStdHandle ( STD_ERROR_HANDLE );
-    return KSysFileMakeInt ( (KSysFile**)fp, fd, "stderr", false, true, ISSTDIO );
-}
-
-/* MakeFDFile
- *  creates a file from a file-descriptor
- *  not supported under Windows
- */
-LIB_EXPORT rc_t CC KFileMakeFDFileRead ( const KFile **f, int fd )
-{
-    return RC (rcFS, rcFile, rcConstructing, rcFunction, rcUnsupported);
-}
-
-LIB_EXPORT rc_t CC KFileMakeFDFileWrite ( KFile **f, bool update, int fd )
-{
-    return RC (rcFS, rcFile, rcConstructing, rcFunction, rcUnsupported);
-}
diff --git a/libs/kfs/win/syslockfile.c b/libs/kfs/win/syslockfile.c
deleted file mode 100644
index 9b09f8d..0000000
--- a/libs/kfs/win/syslockfile.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-#include <kfs/lockfile.h>
-#include <kfs/directory.h>
-#include <klib/rc.h>
-
-
-/*--------------------------------------------------------------------------
- * KDirectory
- *  interface extensions
- */
-
-
-/* CreateExclusiveAccessFile
- *  opens a file with exclusive write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if true, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT rc_t CC KDirectoryVCreateExclusiveAccessFile ( KDirectory *self, struct KFile **f,
-    bool update, uint32_t access, KCreateMode mode, const char *path, va_list args )
-{
-    /* Windows should naturally behave as we want here... */
-    rc_t rc = KDirectoryVCreateFile ( self, f, update, access, mode, path, args );
-    if ( rc != 0 )
-    {
-        if ( GetRCState ( rc ) == rcExists )
-            rc = RC ( rcFS, rcFile, rcLocking, rcLocking, rcBusy );
-        else
-            rc = ResetRCContext ( rc, rcFS, rcFile, rcLocking );
-    }
-    return rc;
-}
diff --git a/libs/kfs/win/sysmmap-priv.h b/libs/kfs/win/sysmmap-priv.h
deleted file mode 100644
index 71dbdf9..0000000
--- a/libs/kfs/win/sysmmap-priv.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sysmmap_priv_
-#define _h_sysmmap_priv_
-
-#ifndef _h_mmap_priv_
-#include "../mmap-priv.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KMMap
- *  a memory mapped region
- */
-struct KMMap
-{
-    uint64_t off;
-    uint64_t pos;
-    size_t size;
-    char *addr;
-
-    struct KFile *f;
-    size_t pg_size;
-
-    /* file mapping handle */
-    HANDLE handle;
-
-    uint32_t addr_adj;
-    uint32_t size_adj;
-
-    KRefcount refcount;
-
-    bool read_only;
-    bool sys_mmap;
-    bool dirty;
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sysmmap_priv_ */
diff --git a/libs/kfs/win/sysmmap.c b/libs/kfs/win/sysmmap.c
deleted file mode 100644
index 28c9873..0000000
--- a/libs/kfs/win/sysmmap.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-#include "sysmmap-priv.h"
-#include "sysfile-priv.h"
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <WINDOWS.H>
-
-
-/*--------------------------------------------------------------------------
- * KMMap
- *  a memory mapped region
- */
-
-/* Make
- */
-rc_t KMMapMake ( KMMap **mmp )
-{
-    SYSTEM_INFO sinfo;
-
-    KMMap *mm = calloc ( 1, sizeof * mm );
-    if ( mm == NULL )
-        return RC ( rcFS, rcMemMap, rcConstructing, rcMemory, rcExhausted );
-
-    GetSystemInfo ( & sinfo );
-    mm -> pg_size = sinfo . dwAllocationGranularity;
-
-    * mmp = mm;
-
-    return 0;
-}
-
-
-/* RWSys
- */
-rc_t KMMapRWSys ( KMMap *self, uint64_t pos, size_t size )
-{
-    DWORD status;
-
-    KSysFile *sf = KFileGetSysFile ( self -> f, & self -> off );
-    if ( sf == NULL )
-        return RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcIncorrect );
-
-    self -> handle = CreateFileMapping ( sf -> handle, NULL, PAGE_READWRITE, 0, 0, NULL );
-    if ( self -> handle != NULL )
-    {
-        self -> addr = MapViewOfFile ( self -> handle, FILE_MAP_ALL_ACCESS, 
-            ( DWORD ) ( pos >> 32 ), ( DWORD ) pos, size );
-        if ( self -> addr != NULL )
-            return 0;
-    }
-
-    switch ( status = GetLastError () )
-    {
-    /* NEED ERROR CODES - THANKS, REDMOND!! */
-    default:
-        break;
-    }
-
-    return RC ( rcFS, rcMemMap, rcConstructing, rcNoObj, rcUnknown );
-}
-
-
-/* ROSys
- */
-rc_t KMMapROSys ( KMMap *self, uint64_t pos, size_t size )
-{
-    DWORD status;
-
-    KSysFile *sf = KFileGetSysFile ( self -> f, & self -> off );
-    if ( sf == NULL )
-        return RC ( rcFS, rcMemMap, rcConstructing, rcFile, rcIncorrect );
-
-    self -> handle = CreateFileMapping ( sf -> handle, NULL, PAGE_READONLY, 0, 0, NULL );
-    if ( self -> handle != NULL )
-    {
-        self -> addr = MapViewOfFile ( self -> handle, FILE_MAP_READ, 
-            ( DWORD ) ( pos >> 32 ), ( DWORD ) pos, size );
-        if ( self -> addr != NULL )
-            return 0;
-    }
-
-    switch ( status = GetLastError () )
-    {
-    /* NEED ERROR CODES - THANKS, REDMOND!! */
-    default:
-        break;
-    }
-
-    return RC ( rcFS, rcMemMap, rcConstructing, rcNoObj, rcUnknown );
-}
-
-
-/* Unmap
- *  removes a memory map
- */
-rc_t KMMapUnmap ( KMMap *self )
-{
-    if ( self -> handle != NULL )
-    {
-        if ( ! CloseHandle ( self -> handle ) )
-            return RC ( rcFS, rcMemMap, rcDestroying, rcNoObj, rcUnknown );
-        if ( ! UnmapViewOfFile( self -> addr ) )
-            return RC ( rcFS, rcMemMap, rcDestroying, rcNoObj, rcUnknown );
-
-        self -> addr = NULL;
-        self -> size = 0;
-        self -> handle = NULL;
-    }
-
-    return 0;
-}
diff --git a/libs/klib/.gitignore b/libs/klib/.gitignore
deleted file mode 100644
index c253038..0000000
--- a/libs/klib/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.def
diff --git a/libs/klib/Judy.h b/libs/klib/Judy.h
deleted file mode 100644
index b844e0a..0000000
--- a/libs/klib/Judy.h
+++ /dev/null
@@ -1,635 +0,0 @@
-#ifndef _JUDY_INCLUDED
-#define _JUDY_INCLUDED
-/*
-// _________________
-//
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-//
-// HEADER FILE FOR EXPORTED FEATURES IN JUDY LIBRARY, libJudy.*
-//
-// See the manual entries for details.
-//
-// Note:  This header file uses old-style comments on #-directive lines and
-// avoids "()" on macro names in comments for compatibility with older cc -Aa
-// and some tools on some platforms.
-
-
-// PLATFORM-SPECIFIC
-*/
-
-#if __SIZEOF_POINTER__*__CHAR_BIT__ == 64
-#define JU_64BIT 1
-#else
-#define JU_32BIT 1
-#endif
-
-#if ! JUST_DEFINE_YOUR_STUFF
-
-#ifdef JU_WIN /* =============================================== */
-
-typedef __int8           int8_t;
-typedef __int16          int16_t;
-typedef __int32          int32_t;
-typedef __int64          int64_t;
-
-typedef unsigned __int8  uint8_t;
-typedef unsigned __int16 uint16_t;
-typedef unsigned __int32 uint32_t;
-typedef unsigned __int64 uint64_t;
-
-#else /* ================ ! JU_WIN ============================= */
-
-/* ISO C99: 7.8 Format conversion of integer types <inttypes.h> */
-/*#include <inttypes.h>   if this FAILS, try #include <stdint.h> */ 
-
-/* ISO C99: 7.18 Integer types uint*_t */
-#include <stdint.h> 
-
-#endif /* ================ ! JU_WIN ============================= */
-
-/* ISO C99 Standard: 7.20 General utilities */
-#include <stdlib.h>  
-
-/* ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types */
-#include <limits.h>
-
-#endif /* JUST_DEFINE_YOUR_STUFF */
-
-#ifdef __cplusplus      /* support use by C++ code */
-extern "C" {
-#endif
-
-
-/* ****************************************************************************
-// DECLARE SOME BASE TYPES IN CASE THEY ARE MISSING:
-//
-// These base types include "const" where appropriate, but only where of
-// interest to the caller.  For example, a caller cares that a variable passed
-// by reference will not be modified, such as, "const void * Pindex", but not
-// that the called function internally does not modify the pointer itself, such
-// as, "void * const Pindex".
-//
-// Note that its OK to pass a Pvoid_t to a Pcvoid_t; the latter is the same,
-// only constant.  Callers need to do this so they can also pass & Pvoid_t to
-// PPvoid_t (non-constant).
-*/
-
-#ifndef _PCVOID_T
-#define _PCVOID_T
-typedef const void * Pcvoid_t;
-#endif
-
-#ifndef _PVOID_T
-#define _PVOID_T
-typedef void *   Pvoid_t;
-typedef void ** PPvoid_t;
-#endif
-
-#ifndef _WORD_T
-#define _WORD_T
-    typedef  size_t  Word_t, * PWord_t;  /* expect 32-bit or 64-bit words. */
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-
-/* ****************************************************************************
-// SUPPORT FOR ERROR HANDLING:
-//
-// Judy error numbers:
-//
-// Note:  These are an enum so theres a related typedef, but the numbers are
-// spelled out so you can map a number back to its name.
-*/
-typedef enum            /* uint8_t -- but C does not support this type of enum.
-                                   -- nor does it support // comments!!         */
-{
-
-/* Note:  JU_ERRNO_NONE and JU_ERRNO_FULL are not real errors.  They specify
-// conditions which are otherwise impossible return values from 32-bit
-// Judy1Count, which has 2^32 + 1 valid returns (0..2^32) plus one error
-// return.  These pseudo-errors support the return values that cannot otherwise
-// be unambiguously represented in a 32-bit word, and will never occur on a
-// 64-bit system. */
-
-        JU_ERRNO_NONE           = 0,
-        JU_ERRNO_FULL           = 1,
-        JU_ERRNO_NFMAX          = JU_ERRNO_FULL,
-
-/* JU_ERRNO_NOMEM comes from malloc(3C) when Judy cannot obtain needed memory.
-// The system errno value is also set to ENOMEM.  This error can be recoverable
-// if the calling application frees other memory.
-//
-// TBD:  Currently there is no guarantee the Judy array has no memory leaks
-// upon JU_ERRNO_NOMEM. */
-
-        JU_ERRNO_NOMEM          = 2,
-
-/* Problems with parameters from the calling program:
-//
-// JU_ERRNO_NULLPPARRAY means PPArray was null; perhaps PArray was passed where
-// &PArray was intended.  Similarly, JU_ERRNO_NULLPINDEX means PIndex was null;
-// perhaps &Index was intended.  Also, JU_ERRNO_NONNULLPARRAY,
-// JU_ERRNO_NULLPVALUE, and JU_ERRNO_UNSORTED, all added later (hence with
-// higher numbers), mean:  A non-null array was passed in where a null pointer
-// was required; PValue was null; and unsorted indexes were detected. */
-
-        JU_ERRNO_NULLPPARRAY    = 3,    /* see above.                       */
-        JU_ERRNO_NONNULLPARRAY  = 10,   /* see above.                       */
-        JU_ERRNO_NULLPINDEX     = 4,    /* see above.                       */
-        JU_ERRNO_NULLPVALUE     = 11,   /* see above.                       */
-        JU_ERRNO_NOTJUDY1       = 5,    /* PArray is not to a Judy1 array.  */
-        JU_ERRNO_NOTJUDYL       = 6,    /* PArray is not to a JudyL array.  */
-        JU_ERRNO_NOTJUDYSL      = 7,    /* PArray is not to a JudySL array. */
-        JU_ERRNO_UNSORTED       = 12,   /* see above.                       */
-
-/* Errors below this point are not recoverable; further tries to access the
-// Judy array might result in EFAULT and a core dump:
-//
-// JU_ERRNO_OVERRUN occurs when Judy detects, upon reallocation, that a block
-// of memory in its own freelist was modified since being freed. */
-
-        JU_ERRNO_OVERRUN        = 8,
-
-/* JU_ERRNO_CORRUPT occurs when Judy detects an impossible value in a Judy data
-// structure:
-//
-// Note:  The Judy data structure contains some redundant elements that support
-// this type of checking. */
-
-        JU_ERRNO_CORRUPT        = 9
-
-/* Warning:  At least some C or C++ compilers do not tolerate a trailing comma
-// above here.  At least we know of one case, in aCC; see JAGad58928. */
-
-} JU_Errno_t;
-
-
-/* Judy errno structure:
-//
-// WARNING:  For compatibility with possible future changes, the fields of this
-// struct should not be referenced directly.  Instead use the macros supplied
-// below.
-
-// This structure should be declared on the stack in a threaded process. */
-
-typedef struct J_UDY_ERROR_STRUCT
-{
-    JU_Errno_t je_Errno;            /* one of the enums above.               */
-    int        je_ErrID;            /* often an internal source line number. */
-    Word_t     je_reserved[4];      /* for future backward compatibility.    */
-
-} JError_t, * PJError_t;
-
-
-/* Related macros:
-//
-// Fields from error struct: */
-
-#define JU_ERRNO(PJError)  ((PJError)->je_Errno)
-#define JU_ERRID(PJError)  ((PJError)->je_ErrID)
-
-/* For checking return values from various Judy functions:
-//
-// Note:  Define JERR as -1, not as the seemingly more portable (Word_t)
-// (~0UL), to avoid a compiler "overflow in implicit constant conversion"
-// warning. */
-
-#define   JERR (-1)                     /* functions returning int or Word_t */
-#define  PJERR ((Pvoid_t)  (~0UL))      /* mainly for use here, see below    */
-#define PPJERR ((PPvoid_t) (~0UL))      /* functions that return PPvoid_t    */
-
-/* Convenience macro for when detailed error information (PJError_t) is not
-// desired by the caller; a purposely short name: */
-
-#define PJE0  ((PJError_t) NULL)
-
-
-/* ****************************************************************************
-// JUDY FUNCTIONS:
-//
-// P_JE is a shorthand for use below:
-*/
-#define P_JE  PJError_t PJError
-
-/* ****************************************************************************
-// JUDY1 FUNCTIONS:
-*/
-extern int      Judy1Test(       Pcvoid_t  PArray, Word_t   Index,   P_JE);
-extern int      Judy1Set(        PPvoid_t PPArray, Word_t   Index,   P_JE);
-extern int      Judy1SetArray(   PPvoid_t PPArray, Word_t   Count,
-                                             const Word_t * const PIndex,
-                                                                     P_JE);
-extern int      Judy1Unset(      PPvoid_t PPArray, Word_t   Index,   P_JE);
-extern Word_t   Judy1Count(      Pcvoid_t  PArray, Word_t   Index1,
-                                                   Word_t   Index2,  P_JE);
-extern int      Judy1ByCount(    Pcvoid_t  PArray, Word_t   Count,
-                                                   Word_t * PIndex,  P_JE);
-extern Word_t   Judy1FreeArray(  PPvoid_t PPArray,                   P_JE);
-extern Word_t   Judy1MemUsed(    Pcvoid_t  PArray);
-extern Word_t   Judy1MemActive(  Pcvoid_t  PArray);
-extern int      Judy1First(      Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-extern int      Judy1Next(       Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-extern int      Judy1Last(       Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-extern int      Judy1Prev(       Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-extern int      Judy1FirstEmpty( Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-extern int      Judy1NextEmpty(  Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-extern int      Judy1LastEmpty(  Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-extern int      Judy1PrevEmpty(  Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-
-/* ****************************************************************************
-// JUDYL FUNCTIONS:
-*/
-extern PPvoid_t JudyLGet(        Pcvoid_t  PArray, Word_t    Index,  P_JE);
-extern PPvoid_t JudyLIns(        PPvoid_t PPArray, Word_t    Index,  P_JE);
-extern int      JudyLInsArray(   PPvoid_t PPArray, Word_t    Count,
-                                             const Word_t * const PIndex,
-                                             const Word_t * const PValue,
-                                                                     P_JE);
-
-extern int      JudyLDel(        PPvoid_t PPArray, Word_t    Index,  P_JE);
-extern Word_t   JudyLCount(      Pcvoid_t  PArray, Word_t    Index1,
-                                                   Word_t    Index2, P_JE);
-extern PPvoid_t JudyLByCount(    Pcvoid_t  PArray, Word_t    Count,
-                                                   Word_t *  PIndex, P_JE);
-extern Word_t   JudyLFreeArray(  PPvoid_t PPArray,                   P_JE);
-extern Word_t   JudyLMemUsed(    Pcvoid_t  PArray);
-extern Word_t   JudyLMemActive(  Pcvoid_t  PArray);
-extern PPvoid_t JudyLFirst(      Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-extern PPvoid_t JudyLNext(       Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-extern PPvoid_t JudyLLast(       Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-extern PPvoid_t JudyLPrev(       Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-extern int      JudyLFirstEmpty( Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-extern int      JudyLNextEmpty(  Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-extern int      JudyLLastEmpty(  Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-extern int      JudyLPrevEmpty(  Pcvoid_t  PArray, Word_t * PIndex,  P_JE);
-
-/* ****************************************************************************
-// JUDYSL FUNCTIONS:
-*/
-extern PPvoid_t JudySLGet(       Pcvoid_t, const uint8_t * Index, P_JE);
-extern PPvoid_t JudySLIns(       PPvoid_t, const uint8_t * Index, P_JE);
-extern int      JudySLDel(       PPvoid_t, const uint8_t * Index, P_JE);
-extern Word_t   JudySLFreeArray( PPvoid_t,                        P_JE);
-extern PPvoid_t JudySLFirst(     Pcvoid_t,       uint8_t * Index, P_JE);
-extern PPvoid_t JudySLNext(      Pcvoid_t,       uint8_t * Index, P_JE);
-extern PPvoid_t JudySLLast(      Pcvoid_t,       uint8_t * Index, P_JE);
-extern PPvoid_t JudySLPrev(      Pcvoid_t,       uint8_t * Index, P_JE);
-
-/* ****************************************************************************
-// JUDYHSL FUNCTIONS:
-*/
-extern PPvoid_t JudyHSGet(       Pcvoid_t,  void *, Word_t);
-extern PPvoid_t JudyHSIns(       PPvoid_t,  void *, Word_t, P_JE);
-extern int      JudyHSDel(       PPvoid_t,  void *, Word_t, P_JE);
-extern Word_t   JudyHSFreeArray( PPvoid_t,                  P_JE);
-
-extern const char *Judy1MallocSizes;
-extern const char *JudyLMallocSizes;
-
-/* ****************************************************************************
-// JUDY memory interface to malloc() FUNCTIONS:
-*/
-extern Word_t JudyMalloc(Word_t);               /* words reqd => words allocd. */
-extern Word_t JudyMallocVirtual(Word_t);        /* words reqd => words allocd. */
-extern void   JudyFree(Pvoid_t, Word_t);        /* free, size in words.        */
-extern void   JudyFreeVirtual(Pvoid_t, Word_t); /* free, size in words.        */
-
-#define JLAP_INVALID    0x1     /* flag to mark pointer "not a Judy array" */
-
-/* ****************************************************************************
-// MACRO EQUIVALENTS FOR JUDY FUNCTIONS:
-//
-// The following macros, such as J1T, are shorthands for calling Judy functions
-// with parameter address-of and detailed error checking included.  Since they
-// are macros, the error checking code is replicated each time the macro is
-// used, but it runs fast in the normal case of no error.
-//
-// If the caller does not like the way the default JUDYERROR macro handles
-// errors (such as an exit(1) call when out of memory), they may define their
-// own before the "#include <Judy.h>".  A routine such as HandleJudyError
-// could do checking on specific error numbers and print a different message
-// dependent on the error.  The following is one example:
-//
-// Note: the back-slashes are removed because some compilers will not accept
-// them in comments.
-//
-// void HandleJudyError(uint8_t *, int, uint8_t *, int, int);
-// #define JUDYERROR(CallerFile, CallerLine, JudyFunc, JudyErrno, JudyErrID)
-// {
-//    HandleJudyError(CallerFile, CallerLine, JudyFunc, JudyErrno, JudyErrID);
-// }
-//
-// The routine HandleJudyError could do checking on specific error numbers and
-// print a different message dependent on the error.
-//
-// The macro receives five parameters that are:
-//
-// 1.  CallerFile:  Source filename where a Judy call returned a serious error.
-// 2.  CallerLine:  Line number in that source file.
-// 3.  JudyFunc:    Name of Judy function reporting the error.
-// 4.  JudyErrno:   One of the JU_ERRNO* values enumerated above.
-// 5.  JudyErrID:   The je_ErrID field described above.
-*/
-#ifndef JUDYERROR_NOTEST
-#ifndef JUDYERROR       /* supply a default error macro */
-#include <stdio.h>
-
-#define JUDYERROR(CallerFile, CallerLine, JudyFunc, JudyErrno, JudyErrID) \
-    {                                                                     \
-        (void) fprintf(stderr, "File '%s', line %d: %s(), "               \
-           "JU_ERRNO_* == %d, ID == %d\n",                                \
-           CallerFile, CallerLine,                                        \
-           JudyFunc, JudyErrno, JudyErrID);                               \
-        exit(1);                                                          \
-    }
-
-#endif /* JUDYERROR */
-#endif /* JUDYERROR_NOTEST */
-
-/* If the JUDYERROR macro is not desired at all, then the following eliminates
-// it.  However, the return code from each Judy function (that is, the first
-// parameter of each macro) must be checked by the caller to assure that an
-// error did not occur.
-//
-// Example:
-//
-//   #define JUDYERROR_NOTEST 1
-//   #include <Judy.h>
-//
-// or use this cc option at compile time:
-//
-//   cc -DJUDYERROR_NOTEST ...
-//
-// Example code:
-//
-//   J1S(Rc, PArray, Index);
-//   if (Rc == JERR) goto ...error
-//
-// or:
-//
-//   JLI(PValue, PArray, Index);
-//   if (PValue == PJERR) goto ...error
-
-
-// Internal shorthand macros for writing the J1S, etc. macros:
-*/
-#ifdef JUDYERROR_NOTEST /* ============================================ */
-
-/* "Judy Set Error": */
-
-#define J_SE(FuncName,Errno)  ((void) 0)
-
-/* Note:  In each J_*() case below, the digit is the number of key parameters
-// to the Judy*() call.  Just assign the Func result to the callers Rc value
-// without a cast because none is required, and this keeps the API simpler.
-// However, a family of different J_*() macros is needed to support the
-// different numbers of key parameters (0,1,2) and the Func return type.
-//
-// In the names below, "I" = integer result; "P" = pointer result.  Note, the
-// Funcs for J_*P() return PPvoid_t, but cast this to a Pvoid_t for flexible,
-// error-free assignment, and then compare to PJERR.
-*/
-#define J_0I(Rc,PArray,Func,FuncName) \
-        { (Rc) = Func(PArray, PJE0); }
-
-#define J_1I(Rc,PArray,Index,Func,FuncName) \
-        { (Rc) = Func(PArray, Index, PJE0); }
-
-#define J_1P(PV,PArray,Index,Func,FuncName) \
-        { (PV) = (Pvoid_t) Func(PArray, Index, PJE0); }
-
-#define J_2I(Rc,PArray,Index,Arg2,Func,FuncName) \
-        { (Rc) = Func(PArray, Index, Arg2, PJE0); }
-
-#define J_2C(Rc,PArray,Index1,Index2,Func,FuncName) \
-        { (Rc) = Func(PArray, Index1, Index2, PJE0); }
-
-#define J_2P(PV,PArray,Index,Arg2,Func,FuncName) \
-        { (PV) = (Pvoid_t) Func(PArray, Index, Arg2, PJE0); }
-
-/* Variations for Judy*Set/InsArray functions: */
-
-#define J_2AI(Rc,PArray,Count,PIndex,Func,FuncName) \
-        { (Rc) = Func(PArray, Count, PIndex, PJE0); }
-#define J_3AI(Rc,PArray,Count,PIndex,PValue,Func,FuncName) \
-        { (Rc) = Func(PArray, Count, PIndex, PValue, PJE0); }
-
-#else /* ================ ! JUDYERROR_NOTEST ============================= */
-
-#define J_E(FuncName,PJE) \
-        JUDYERROR(__FILE__, __LINE__, FuncName, JU_ERRNO(PJE), JU_ERRID(PJE))
-
-#define J_SE(FuncName,Errno)                                            \
-        {                                                               \
-            JError_t J_Error;                                           \
-            JU_ERRNO(&J_Error) = (Errno);                               \
-            JU_ERRID(&J_Error) = __LINE__;                              \
-            J_E(FuncName, &J_Error);                                    \
-        }
-
-/* Note:  In each J_*() case below, the digit is the number of key parameters
-// to the Judy*() call.  Just assign the Func result to the callers Rc value
-// without a cast because none is required, and this keeps the API simpler.
-// However, a family of different J_*() macros is needed to support the
-// different numbers of key parameters (0,1,2) and the Func return type.
-//
-// In the names below, "I" = integer result; "P" = pointer result.  Note, the
-// Funcs for J_*P() return PPvoid_t, but cast this to a Pvoid_t for flexible,
-// error-free assignment, and then compare to PJERR.
-*/
-#define J_0I(Rc,PArray,Func,FuncName)                                   \
-        {                                                               \
-            JError_t J_Error;                                           \
-            if (((Rc) = Func(PArray, &J_Error)) == JERR)                \
-                J_E(FuncName, &J_Error);                                \
-        }
-
-#define J_1I(Rc,PArray,Index,Func,FuncName)                             \
-        {                                                               \
-            JError_t J_Error;                                           \
-            if (((Rc) = Func(PArray, Index, &J_Error)) == JERR)         \
-                J_E(FuncName, &J_Error);                                \
-        }
-
-#define J_1P(Rc,PArray,Index,Func,FuncName)                             \
-        {                                                               \
-            JError_t J_Error;                                           \
-            if (((Rc) = (Pvoid_t) Func(PArray, Index, &J_Error)) == PJERR) \
-                J_E(FuncName, &J_Error);                                \
-        }
-
-#define J_2I(Rc,PArray,Index,Arg2,Func,FuncName)                        \
-        {                                                               \
-            JError_t J_Error;                                           \
-            if (((Rc) = Func(PArray, Index, Arg2, &J_Error)) == JERR)   \
-                J_E(FuncName, &J_Error);                                \
-        }
-
-/* Variation for Judy*Count functions, which return 0, not JERR, for error (and
-// also for other non-error cases):
-//
-// Note:  JU_ERRNO_NFMAX should only apply to 32-bit Judy1, but this header
-// file lacks the necessary ifdefs to make it go away otherwise, so always
-// check against it.
-*/
-#define J_2C(Rc,PArray,Index1,Index2,Func,FuncName)                     \
-        {                                                               \
-            JError_t J_Error;                                           \
-            if ((((Rc) = Func(PArray, Index1, Index2, &J_Error)) == 0)  \
-             && (JU_ERRNO(&J_Error) > JU_ERRNO_NFMAX))                  \
-            {                                                           \
-                J_E(FuncName, &J_Error);                                \
-            }                                                           \
-        }
-
-#define J_2P(PV,PArray,Index,Arg2,Func,FuncName)                        \
-        {                                                               \
-            JError_t J_Error;                                           \
-            if (((PV) = (Pvoid_t) Func(PArray, Index, Arg2, &J_Error))  \
-                == PJERR) J_E(FuncName, &J_Error);                      \
-        }
-
-/* Variations for Judy*Set/InsArray functions: */
-
-#define J_2AI(Rc,PArray,Count,PIndex,Func,FuncName)                     \
-        {                                                               \
-            JError_t J_Error;                                           \
-            if (((Rc) = Func(PArray, Count, PIndex, &J_Error)) == JERR) \
-                J_E(FuncName, &J_Error);                                \
-        }
-
-#define J_3AI(Rc,PArray,Count,PIndex,PValue,Func,FuncName)              \
-        {                                                               \
-            JError_t J_Error;                                           \
-            if (((Rc) = Func(PArray, Count, PIndex, PValue, &J_Error))  \
-                == JERR) J_E(FuncName, &J_Error);                       \
-        }
-
-#endif /* ================ ! JUDYERROR_NOTEST ============================= */
-
-/* Some of the macros are special cases that use inlined shortcuts for speed
-// with root-level leaves:
-
-// This is a slower version with current processors, but in the future...
-*/
-#define J1T(Rc,PArray,Index)                                            \
-    (Rc) = Judy1Test((Pvoid_t)(PArray), Index, PJE0)
-
-#define J1S( Rc,    PArray,   Index) \
-        J_1I(Rc, (&(PArray)), Index,  Judy1Set,   "Judy1Set")
-#define J1SA(Rc,    PArray,   Count, PIndex) \
-        J_2AI(Rc,(&(PArray)), Count, PIndex, Judy1SetArray, "Judy1SetArray")
-#define J1U( Rc,    PArray,   Index) \
-        J_1I(Rc, (&(PArray)), Index,  Judy1Unset, "Judy1Unset")
-#define J1F( Rc,    PArray,   Index) \
-        J_1I(Rc,    PArray, &(Index), Judy1First, "Judy1First")
-#define J1N( Rc,    PArray,   Index) \
-        J_1I(Rc,    PArray, &(Index), Judy1Next,  "Judy1Next")
-#define J1L( Rc,    PArray,   Index) \
-        J_1I(Rc,    PArray, &(Index), Judy1Last,  "Judy1Last")
-#define J1P( Rc,    PArray,   Index) \
-        J_1I(Rc,    PArray, &(Index), Judy1Prev,  "Judy1Prev")
-#define J1FE(Rc,    PArray,   Index) \
-        J_1I(Rc,    PArray, &(Index), Judy1FirstEmpty, "Judy1FirstEmpty")
-#define J1NE(Rc,    PArray,   Index) \
-        J_1I(Rc,    PArray, &(Index), Judy1NextEmpty,  "Judy1NextEmpty")
-#define J1LE(Rc,    PArray,   Index) \
-        J_1I(Rc,    PArray, &(Index), Judy1LastEmpty,  "Judy1LastEmpty")
-#define J1PE(Rc,    PArray,   Index) \
-        J_1I(Rc,    PArray, &(Index), Judy1PrevEmpty,  "Judy1PrevEmpty")
-#define J1C( Rc,    PArray,   Index1,  Index2) \
-        J_2C(Rc,    PArray,   Index1,  Index2, Judy1Count,   "Judy1Count")
-#define J1BC(Rc,    PArray,   Count,   Index) \
-        J_2I(Rc,    PArray,   Count, &(Index), Judy1ByCount, "Judy1ByCount")
-#define J1FA(Rc,    PArray) \
-        J_0I(Rc, (&(PArray)), Judy1FreeArray, "Judy1FreeArray")
-#define J1MU(Rc,    PArray) \
-        (Rc) = Judy1MemUsed(PArray)
-
-#define JLG(PV,PArray,Index)                                            \
-    (PV) = (Pvoid_t)JudyLGet((Pvoid_t)PArray, Index, PJE0)
-
-#define JLI( PV,    PArray,   Index)                                    \
-        J_1P(PV, (&(PArray)), Index,  JudyLIns,   "JudyLIns")
-
-#define JLIA(Rc,    PArray,   Count, PIndex, PValue)                    \
-        J_3AI(Rc,(&(PArray)), Count, PIndex, PValue, JudyLInsArray,     \
-                                                  "JudyLInsArray")
-#define JLD( Rc,    PArray,   Index)                                    \
-        J_1I(Rc, (&(PArray)), Index,  JudyLDel,   "JudyLDel")
-
-#define JLF( PV,    PArray,   Index)                                    \
-        J_1P(PV,    PArray, &(Index), JudyLFirst, "JudyLFirst")
-
-#define JLN( PV,    PArray,   Index)                                    \
-        J_1P(PV,    PArray, &(Index), JudyLNext, "JudyLNext")
-
-#define JLL( PV,    PArray,   Index)                                    \
-        J_1P(PV,    PArray, &(Index), JudyLLast,  "JudyLLast")
-#define JLP( PV,    PArray,   Index)                                    \
-        J_1P(PV,    PArray, &(Index), JudyLPrev,  "JudyLPrev")
-#define JLFE(Rc,    PArray,   Index)                                    \
-        J_1I(Rc,    PArray, &(Index), JudyLFirstEmpty, "JudyLFirstEmpty")
-#define JLNE(Rc,    PArray,   Index)                                    \
-        J_1I(Rc,    PArray, &(Index), JudyLNextEmpty,  "JudyLNextEmpty")
-#define JLLE(Rc,    PArray,   Index)                                    \
-        J_1I(Rc,    PArray, &(Index), JudyLLastEmpty,  "JudyLLastEmpty")
-#define JLPE(Rc,    PArray,   Index)                                    \
-        J_1I(Rc,    PArray, &(Index), JudyLPrevEmpty,  "JudyLPrevEmpty")
-#define JLC( Rc,    PArray,   Index1,  Index2)                          \
-        J_2C(Rc,    PArray,   Index1,  Index2, JudyLCount,   "JudyLCount")
-#define JLBC(PV,    PArray,   Count,   Index)                           \
-        J_2P(PV,    PArray,   Count, &(Index), JudyLByCount, "JudyLByCount")
-#define JLFA(Rc,    PArray)                                             \
-        J_0I(Rc, (&(PArray)), JudyLFreeArray, "JudyLFreeArray")
-#define JLMU(Rc,    PArray)                                             \
-        (Rc) = JudyLMemUsed(PArray)
-
-#define JHSI(PV,    PArray,   PIndex,   Count)                          \
-        J_2P(PV, (&(PArray)), PIndex,   Count, JudyHSIns, "JudyHSIns")
-#define JHSG(PV,    PArray,   PIndex,   Count)                          \
-        (PV) = (Pvoid_t) JudyHSGet(PArray, PIndex, Count)
-#define JHSD(Rc,    PArray,   PIndex,   Count)                          \
-        J_2I(Rc, (&(PArray)), PIndex, Count, JudyHSDel, "JudyHSDel")
-#define JHSFA(Rc,    PArray)                                            \
-        J_0I(Rc, (&(PArray)), JudyHSFreeArray, "JudyHSFreeArray")
-
-#define JSLG( PV,    PArray,   Index)                                   \
-        J_1P( PV,    PArray,   Index, JudySLGet,   "JudySLGet")
-#define JSLI( PV,    PArray,   Index)                                   \
-        J_1P( PV, (&(PArray)), Index, JudySLIns,   "JudySLIns")
-#define JSLD( Rc,    PArray,   Index)                                   \
-        J_1I( Rc, (&(PArray)), Index, JudySLDel,   "JudySLDel")
-#define JSLF( PV,    PArray,   Index)                                   \
-        J_1P( PV,    PArray,   Index, JudySLFirst, "JudySLFirst")
-#define JSLN( PV,    PArray,   Index)                                   \
-        J_1P( PV,    PArray,   Index, JudySLNext,  "JudySLNext")
-#define JSLL( PV,    PArray,   Index)                                   \
-        J_1P( PV,    PArray,   Index, JudySLLast,  "JudySLLast")
-#define JSLP( PV,    PArray,   Index)                                   \
-        J_1P( PV,    PArray,   Index, JudySLPrev,  "JudySLPrev")
-#define JSLFA(Rc,    PArray)                                            \
-        J_0I( Rc, (&(PArray)), JudySLFreeArray, "JudySLFreeArray")
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* ! _JUDY_INCLUDED */
diff --git a/libs/klib/Makefile b/libs/klib/Makefile
deleted file mode 100644
index f312342..0000000
--- a/libs/klib/Makefile
+++ /dev/null
@@ -1,159 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: all
-
-TOP ?= $(abspath ../..)
-MODULE = libs/klib
-
-INT_LIBS = \
-	libklib
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES = \
-	$(KLIB_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all: makedirs compile
-	@ $(MAKE) -C $(SRCDIR)/judy all
-	@ $(MAKE_CMD) $(TARGDIR)/all
-
-std: makedirs compile
-	@ $(MAKE) -C $(SRCDIR)/judy std
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE) -C $(SRCDIR)/judy std
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# all, std
-#
-$(TARGDIR)/all $(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/all $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-	@ $(MAKE) -C $(SRCDIR)/judy clean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# klib
-#
-$(ILIBDIR)/libklib: $(addprefix $(ILIBDIR)/libklib.,$(ILIBEXT))
-
-KLIB_SRC = \
-	text \
-	time \
-	utf8 \
-	iso8859 \
-	iso8859-1 \
-	cp1252 \
-	token \
-	symtab \
-	container \
-	vector \
-	namelist \
-	ncbi-vdb-version \
-	vector_namelist \
-	trie \
-	pbstree \
-	pbstree-impl.nopt \
-	pbstree-impl.swap.nopt \
-	bstpersist.nopt \
-	ptrie.nopt \
-	ptpersist.nopt \
-	crc32 \
-	md5 \
-	misc \
-	SHA-32bit \
-	SHA-64bit \
-	qsort \
-	ksort \
-	bsearch \
-	pack \
-	unpack \
-	vlen-encode \
-	data-buffer \
-	refcount \
-	printf \
-	status-rc-strings \
-	status-rc \
-	syserrcode \
-	syswriter \
-	out \
-	status \
-	log \
-	writer \
-	syslog \
-	systime \
-	rc-tbl \
-	rc-idx-tbl \
-	judy-vector \
-	report-klib \
-	num-gen \
-	progressbar \
-	sra-release-version \
-	btree
-#	path
-
-ifeq (win,$(OS))
-	KLIB_SRC += sysalloc
-endif
-
-ifeq (dbg,$(BUILD))
-	KLIB_SRC += debug
-endif
-
-KLIB_OBJ = \
-	$(addsuffix .$(LOBX),$(KLIB_SRC))
-
-KLIB_LIB = \
-	-sjudy \
-	-lm
-
-$(ILIBDIR)/libklib.$(LIBX): $(KLIB_OBJ)
-	$(LD) --slib -o $@ $^ $(KLIB_LIB)
-
-
-# compilation
-compile: makedirs
-	@ $(MAKE) -C $(SRCDIR)/judy compile
-	@ $(MAKE_CMD) -j$(MAKE_JOBS) $(TARGDIR)/compile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/klib/SHA-32bit.c b/libs/klib/SHA-32bit.c
deleted file mode 100644
index cbf9ad5..0000000
--- a/libs/klib/SHA-32bit.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/extern.h>
-#include <klib/checksum.h>
-#include <arch-impl.h>
-
-#include <endian.h>
-#include <byteswap.h>
-
-#include <stdint.h>
-#include <string.h>
-
-static const uint32_t H0_1[5] =
-{
-    0x67452301U,
-    0xefcdab89U,
-    0x98badcfeU,
-    0x10325476U,
-    0xc3d2e1f0U,
-};
-
-static const uint32_t K_1[4] =
-{
-    0x5a827999U,
-    0x6ed9eba1U,
-    0x8f1bbcdcU,
-    0xca62c1d6U
-};
-
-static const uint32_t H0_2[8] =
-{
-    0x6a09e667U,
-    0xbb67ae85U,
-    0x3c6ef372U,
-    0xa54ff53aU,
-    0x510e527fU,
-    0x9b05688cU,
-    0x1f83d9abU,
-    0x5be0cd19U,
-};
-
-static const uint32_t K_2[] =
-{
-    0x428a2f98U, 0x71374491U, 0xb5c0fbcfU, 0xe9b5dba5U, 
-    0x3956c25bU, 0x59f111f1U, 0x923f82a4U, 0xab1c5ed5U, 
-    0xd807aa98U, 0x12835b01U, 0x243185beU, 0x550c7dc3U, 
-    0x72be5d74U, 0x80deb1feU, 0x9bdc06a7U, 0xc19bf174U, 
-    0xe49b69c1U, 0xefbe4786U, 0x0fc19dc6U, 0x240ca1ccU, 
-    0x2de92c6fU, 0x4a7484aaU, 0x5cb0a9dcU, 0x76f988daU, 
-    0x983e5152U, 0xa831c66dU, 0xb00327c8U, 0xbf597fc7U, 
-    0xc6e00bf3U, 0xd5a79147U, 0x06ca6351U, 0x14292967U, 
-    0x27b70a85U, 0x2e1b2138U, 0x4d2c6dfcU, 0x53380d13U, 
-    0x650a7354U, 0x766a0abbU, 0x81c2c92eU, 0x92722c85U, 
-    0xa2bfe8a1U, 0xa81a664bU, 0xc24b8b70U, 0xc76c51a3U, 
-    0xd192e819U, 0xd6990624U, 0xf40e3585U, 0x106aa070U, 
-    0x19a4c116U, 0x1e376c08U, 0x2748774cU, 0x34b0bcb5U, 
-    0x391c0cb3U, 0x4ed8aa4aU, 0x5b9cca4fU, 0x682e6ff3U, 
-    0x748f82eeU, 0x78a5636fU, 0x84c87814U, 0x8cc70208U, 
-    0x90befffaU, 0xa4506cebU, 0xbef9a3f7U, 0xc67178f2U, 
-};
-
-#if 0 /* this is slower than pure C version */
-#define ROL(X, N) uint32_rol ( X, N )
-#define ROR(X, N) uint32_ror ( X, N )
-#else
-#define ROL(X, N) (((X) << (N)) | ((X) >> (32 - (N))))
-#define ROR(X, N) ROL(X, 32-N)
-#endif
-#define SHR(X, N) ((X) >> (N))
-
-#define Ch(X, Y, Z) (((X) & (Y))^((~(X))&(Z)))
-#define Maj(X, Y, Z) (((X)&(Y))^((X)&(Z))^((Y)&(Z)))
-#define Parity(X, Y, Z) ((X)^(Y)^(Z))
-#define Sigma0(X) (ROR((X),  2)^ROR((X), 13)^ROR((X), 22))
-#define Sigma1(X) (ROR((X),  6)^ROR((X), 11)^ROR((X), 25))
-#define sigma0(X) (ROR((X),  7)^ROR((X), 18)^SHR((X),  3))
-#define sigma1(X) (ROR((X), 17)^ROR((X), 19)^SHR((X), 10))
-
-static void SHA1_stage(uint32_t Ho[8], const uint32_t Hi[8], uint32_t W[16])
-{
-    uint32_t a = Hi[0];
-    uint32_t b = Hi[1];
-    uint32_t c = Hi[2];
-    uint32_t d = Hi[3];
-    uint32_t e = Hi[4];
-    unsigned t;
-    
-    for (t = 0; t != 16; ++t) {
-        const uint32_t T = ROL(a, 5) + Ch(b, c, d) + e + K_1[0] + W[t];
-        
-        e = d; d = c; c = ROL(b, 30); b = a; a = T;
-    }
-    for ( ; t != 20; ++t) {
-        const uint32_t T = ROL(a, 5) + Ch(b, c, d) + e + K_1[0] +
-            (W[t%16] = ROL(W[(t-3)%16] ^ W[(t-8)%16] ^ W[(t-14)%16] ^ W[(t-16)%16], 1));
-        
-        e = d; d = c; c = ROL(b, 30); b = a; a = T;
-    }
-    for ( ; t != 40; ++t) {
-        const uint32_t T = ROL(a, 5) + Parity(b, c, d) + e + K_1[1] +
-            (W[t%16] = ROL(W[(t-3)%16] ^ W[(t-8)%16] ^ W[(t-14)%16] ^ W[(t-16)%16], 1));
-        
-        e = d; d = c; c = ROL(b, 30); b = a; a = T;
-    }
-    for ( ; t != 60; ++t) {
-        const uint32_t T = ROL(a, 5) + Maj(b, c, d) + e + K_1[2] +
-            (W[t%16] = ROL(W[(t-3)%16] ^ W[(t-8)%16] ^ W[(t-14)%16] ^ W[(t-16)%16], 1));
-        
-        e = d; d = c; c = ROL(b, 30); b = a; a = T;
-    }
-    for ( ; t != 80; ++t) {
-        const uint32_t T = ROL(a, 5) + Parity(b, c, d) + e + K_1[3] +
-            (W[t%16] = ROL(W[(t-3)%16] ^ W[(t-8)%16] ^ W[(t-14)%16] ^ W[(t-16)%16], 1));
-        
-        e = d; d = c; c = ROL(b, 30); b = a; a = T;
-    }
-    Ho[0] = Hi[0] + a;
-    Ho[1] = Hi[1] + b;
-    Ho[2] = Hi[2] + c;
-    Ho[3] = Hi[3] + d;
-    Ho[4] = Hi[4] + e;
-}
-
-static void SHA2_stage(uint32_t Ho[8], const uint32_t Hi[8], uint32_t W[16])
-{
-    uint32_t a = Hi[0];
-    uint32_t b = Hi[1];
-    uint32_t c = Hi[2];
-    uint32_t d = Hi[3];
-    uint32_t e = Hi[4];
-    uint32_t f = Hi[5];
-    uint32_t g = Hi[6];
-    uint32_t h = Hi[7];
-    unsigned t;
-    
-    for (t = 0; t != 16; ++t) {
-        const uint32_t T1 = h + Sigma1(e) + Ch(e, f, g) + K_2[t] + W[t];
-        const uint32_t T2 = Sigma0(a) + Maj(a, b, c);
-        
-        h = g; g = f; f = e; e = d + T1;
-        d = c; c = b; b = a; a = T1 + T2;
-    }
-    for ( ; t != 64; ++t) {
-        const uint32_t T1 = h + Sigma1(e) + Ch(e, f, g) + K_2[t] +
-            (W[t%16] = sigma1(W[(t-2)%16])+W[(t-7)%16]+sigma0(W[(t-15)%16])+W[(t-16)%16]);
-        const uint32_t T2 = Sigma0(a) + Maj(a, b, c);
-        
-        h = g; g = f; f = e; e = d + T1;
-        d = c; c = b; b = a; a = T1 + T2;
-    }
-    Ho[0] = Hi[0] + a;
-    Ho[1] = Hi[1] + b;
-    Ho[2] = Hi[2] + c;
-    Ho[3] = Hi[3] + d;
-    Ho[4] = Hi[4] + e;
-    Ho[5] = Hi[5] + f;
-    Ho[6] = Hi[6] + g;
-    Ho[7] = Hi[7] + h;
-}
-
-static __inline__ void SHA_32b_Init(struct SHA32bitState *ctx, int which)
-{
-    if (which == 0)
-        memcpy(ctx->H, H0_1, sizeof(H0_1));
-    else
-        memcpy(ctx->H, H0_2, sizeof(H0_2));
-    ctx->len = 0;
-    ctx->cur = 0;
-}
-
-static __inline__ void SHA_32b_Append(struct SHA32bitState *ctx, int which, const uint8_t data[], size_t length)
-{
-    unsigned i;
-    unsigned j;
-    unsigned n;
-    
-    ctx->len += length;
-    for (i = 0; i != length; i += n) {
-        n = length - i > 64 ? 64 : (unsigned)(length - i);
-        if (ctx->cur + n > 64)
-            n = 64 - ctx->cur;
-        memcpy(&ctx->W[ctx->cur], &data[i], n);
-        ctx->cur += n;
-        if (ctx->cur == 64) {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-            uint32_t W[16];
-            
-            for (j = 0; j != 16; ++j)
-                W[j] = bswap_32(((const uint32_t *)ctx->W)[j]);
-            
-            (which ? SHA2_stage : SHA1_stage)(ctx->H, ctx->H, W);
-#else
-            (which ? SHA2_stage : SHA1_stage)(ctx->H, ctx->H, ctx->W);
-#endif
-            ctx->cur = 0;
-        }
-    }
-}
-
-static __inline__ void SHA_32b_Finish(const struct SHA32bitState *ctx, int which, uint32_t rslt[8])
-{
-    unsigned j;
-    unsigned const n = (ctx->cur + 3) >> 2;
-    uint32_t W[32];
-    
-    memset(W, 0, sizeof(W));
-    for (j = 0; j != n; ++j) {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-        W[j] = bswap_32(((const uint32_t *)ctx->W)[j]);
-#else
-        W[j] = ((const uint32_t *)ctx->W)[j];
-#endif
-    }
-    if (ctx->cur & 3) {
-        --j;
-        W[j] &= (~((uint32_t)0)) << ((4 - (ctx->cur & 3)) * 8);
-        W[j] |= ((uint32_t)0x80U) << ((3 - (ctx->cur & 3)) * 8);
-    }
-    else
-        W[j] = ((uint32_t)0x80U) << 24;
-    if (j < 14) {
-        W[14] = (uint32_t)(ctx->len >> 29);
-        W[15] = (uint32_t)(ctx->len <<  3);
-        (which ? SHA2_stage : SHA1_stage)(rslt, ctx->H, W);
-    }
-    else {
-        W[30] = (uint32_t)(ctx->len >> 29);
-        W[31] = (uint32_t)(ctx->len <<  3);
-        (which ? SHA2_stage : SHA1_stage)(rslt, ctx->H, W);
-        (which ? SHA2_stage : SHA1_stage)(rslt, rslt, W + 16);
-    }
-}
-
-void CC SHA1StateInit(SHA1State *ctx)
-{
-    SHA_32b_Init(ctx, 0);
-}
-
-void CC SHA1StateAppend(SHA1State *ctx, const void *data, size_t length)
-{
-    SHA_32b_Append(ctx, 0, data, length);
-}
-
-void CC SHA1StateFinish(SHA1State *ctx, uint8_t hash[20])
-{
-    uint32_t H[8];
-
-    SHA_32b_Finish(ctx, 0, H);
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-    {
-        H[0] = bswap_32(H[0]);
-        H[1] = bswap_32(H[1]);
-        H[2] = bswap_32(H[2]);
-        H[3] = bswap_32(H[3]);
-        H[4] = bswap_32(H[4]);
-    }
-#endif
-    memcpy(hash, H, 20);
-}
-
-void CC SHA256StateInit(SHA256State *ctx)
-{
-    SHA_32b_Init(ctx, 1);
-}
-
-void CC SHA256StateAppend(SHA256State *ctx, const void *data, size_t length)
-{
-    SHA_32b_Append(ctx, 1, data, length);
-}
-
-void CC SHA256StateFinish(SHA256State *ctx, uint8_t hash[32])
-{
-    uint32_t H[8];
-
-    SHA_32b_Finish(ctx, 1, H);
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-    {
-        H[0] = bswap_32(H[0]);
-        H[1] = bswap_32(H[1]);
-        H[2] = bswap_32(H[2]);
-        H[3] = bswap_32(H[3]);
-        H[4] = bswap_32(H[4]);
-        H[5] = bswap_32(H[5]);
-        H[6] = bswap_32(H[6]);
-        H[7] = bswap_32(H[7]);
-    }
-#endif
-    memcpy(hash, H, 32);
-}
diff --git a/libs/klib/SHA-64bit.c b/libs/klib/SHA-64bit.c
deleted file mode 100644
index efcdc2a..0000000
--- a/libs/klib/SHA-64bit.c
+++ /dev/null
@@ -1,271 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/extern.h>
-#include <klib/checksum.h>
-#include <arch-impl.h>
-
-#include <endian.h>
-#include <byteswap.h>
-
-#include <stdint.h>
-#include <string.h>
-
-#if _ARCH_BITS == 32
-#define UL( x ) x ## ULL
-#else
-#define UL( x ) x ## UL
-#endif
-
-static const uint64_t H0_384[8] =
-{
-    UL(0xcbbb9d5dc1059ed8),
-    UL(0x629a292a367cd507),
-    UL(0x9159015a3070dd17),
-    UL(0x152fecd8f70e5939),
-    UL(0x67332667ffc00b31),
-    UL(0x8eb44a8768581511),
-    UL(0xdb0c2e0d64f98fa7),
-    UL(0x47b5481dbefa4fa4),
-};
-
-static const uint64_t H0_512[8] =
-{
-    UL(0x6a09e667f3bcc908),
-    UL(0xbb67ae8584caa73b),
-    UL(0x3c6ef372fe94f82b),
-    UL(0xa54ff53a5f1d36f1),
-    UL(0x510e527fade682d1),
-    UL(0x9b05688c2b3e6c1f),
-    UL(0x1f83d9abfb41bd6b),
-    UL(0x5be0cd19137e2179),
-};
-
-static const uint64_t K[] =
-{
-    UL(0x428a2f98d728ae22), UL(0x7137449123ef65cd), UL(0xb5c0fbcfec4d3b2f), UL(0xe9b5dba58189dbbc), 
-    UL(0x3956c25bf348b538), UL(0x59f111f1b605d019), UL(0x923f82a4af194f9b), UL(0xab1c5ed5da6d8118), 
-    UL(0xd807aa98a3030242), UL(0x12835b0145706fbe), UL(0x243185be4ee4b28c), UL(0x550c7dc3d5ffb4e2), 
-    UL(0x72be5d74f27b896f), UL(0x80deb1fe3b1696b1), UL(0x9bdc06a725c71235), UL(0xc19bf174cf692694), 
-    UL(0xe49b69c19ef14ad2), UL(0xefbe4786384f25e3), UL(0x0fc19dc68b8cd5b5), UL(0x240ca1cc77ac9c65), 
-    UL(0x2de92c6f592b0275), UL(0x4a7484aa6ea6e483), UL(0x5cb0a9dcbd41fbd4), UL(0x76f988da831153b5), 
-    UL(0x983e5152ee66dfab), UL(0xa831c66d2db43210), UL(0xb00327c898fb213f), UL(0xbf597fc7beef0ee4), 
-    UL(0xc6e00bf33da88fc2), UL(0xd5a79147930aa725), UL(0x06ca6351e003826f), UL(0x142929670a0e6e70), 
-    UL(0x27b70a8546d22ffc), UL(0x2e1b21385c26c926), UL(0x4d2c6dfc5ac42aed), UL(0x53380d139d95b3df), 
-    UL(0x650a73548baf63de), UL(0x766a0abb3c77b2a8), UL(0x81c2c92e47edaee6), UL(0x92722c851482353b), 
-    UL(0xa2bfe8a14cf10364), UL(0xa81a664bbc423001), UL(0xc24b8b70d0f89791), UL(0xc76c51a30654be30), 
-    UL(0xd192e819d6ef5218), UL(0xd69906245565a910), UL(0xf40e35855771202a), UL(0x106aa07032bbd1b8), 
-    UL(0x19a4c116b8d2d0c8), UL(0x1e376c085141ab53), UL(0x2748774cdf8eeb99), UL(0x34b0bcb5e19b48a8), 
-    UL(0x391c0cb3c5c95a63), UL(0x4ed8aa4ae3418acb), UL(0x5b9cca4f7763e373), UL(0x682e6ff3d6b2b8a3), 
-    UL(0x748f82ee5defb2fc), UL(0x78a5636f43172f60), UL(0x84c87814a1f0ab72), UL(0x8cc702081a6439ec), 
-    UL(0x90befffa23631e28), UL(0xa4506cebde82bde9), UL(0xbef9a3f7b2c67915), UL(0xc67178f2e372532b), 
-    UL(0xca273eceea26619c), UL(0xd186b8c721c0c207), UL(0xeada7dd6cde0eb1e), UL(0xf57d4f7fee6ed178), 
-    UL(0x06f067aa72176fba), UL(0x0a637dc5a2c898a6), UL(0x113f9804bef90dae), UL(0x1b710b35131c471b), 
-    UL(0x28db77f523047d84), UL(0x32caab7b40c72493), UL(0x3c9ebe0a15c9bebc), UL(0x431d67c49c100d4c), 
-    UL(0x4cc5d4becb3e42b6), UL(0x597f299cfc657e2a), UL(0x5fcb6fab3ad6faec), UL(0x6c44198c4a475817), 
-};
-
-#undef UL
-
-#define ROL(X, N) uint64_rol ( X, N )
-#define ROR(X, N) uint64_ror ( X, N )
-#define SHR(X, N) ((X) >> (N))
-
-#define Ch(X, Y, Z) (((X) & (Y))^((~(X))&(Z)))
-#define Maj(X, Y, Z) (((X)&(Y))^((X)&(Z))^((Y)&(Z)))
-#define Parity(X, Y, Z) ((X)^(Y)^(Z))
-#define Sigma0(X) (ROR((X), 28)^ROR((X), 34)^ROR((X), 39))
-#define Sigma1(X) (ROR((X), 14)^ROR((X), 18)^ROR((X), 41))
-#define sigma0(X) (ROR((X),  1)^ROR((X),  8)^SHR((X), 7))
-#define sigma1(X) (ROR((X), 19)^ROR((X), 61)^SHR((X), 6))
-
-static void SHA_stage(uint64_t Ho[8], const uint64_t Hi[8], uint64_t W[16])
-{
-    uint64_t a = Hi[0];
-    uint64_t b = Hi[1];
-    uint64_t c = Hi[2];
-    uint64_t d = Hi[3];
-    uint64_t e = Hi[4];
-    uint64_t f = Hi[5];
-    uint64_t g = Hi[6];
-    uint64_t h = Hi[7];
-    unsigned t;
-    
-    for (t = 0; t != 16; ++t) {
-        const uint64_t T1 = h + Sigma1(e) + Ch(e, f, g) + K[t] + W[t];
-        const uint64_t T2 = Sigma0(a) + Maj(a, b, c);
-        
-        h = g; g = f; f = e; e = d + T1;
-        d = c; c = b; b = a; a = T1 + T2;
-    }
-    for ( ; t != 80; ++t) {
-        const uint64_t T1 = h + Sigma1(e) + Ch(e, f, g) + K[t] +
-            (W[t%16] = sigma1(W[(t-2)%16])+W[(t-7)%16]+sigma0(W[(t-15)%16])+W[(t-16)%16]);
-        const uint64_t T2 = Sigma0(a) + Maj(a, b, c);
-        
-        h = g; g = f; f = e; e = d + T1;
-        d = c; c = b; b = a; a = T1 + T2;
-    }
-    Ho[0] = Hi[0] + a;
-    Ho[1] = Hi[1] + b;
-    Ho[2] = Hi[2] + c;
-    Ho[3] = Hi[3] + d;
-    Ho[4] = Hi[4] + e;
-    Ho[5] = Hi[5] + f;
-    Ho[6] = Hi[6] + g;
-    Ho[7] = Hi[7] + h;
-}
-
-static __inline__ void SHA_64b_Init(struct SHA64bitState *ctx, int which)
-{
-    if (which == 0)
-        memcpy(ctx->H, H0_384, sizeof(H0_384));
-    else
-        memcpy(ctx->H, H0_512, sizeof(H0_512));
-    ctx->len = 0;
-    ctx->cur = 0;
-}
-
-static __inline__ void SHA_64b_Append(struct SHA64bitState *ctx, const uint8_t data[], size_t length)
-{
-    unsigned i;
-    unsigned j;
-    unsigned n;
-    
-    ctx->len += length;
-    for (i = 0; i != length; i += n) {
-        n = length - i > 128 ? 128 : (unsigned)(length - i);
-        if (ctx->cur + n > 128)
-            n = 128 - ctx->cur;
-        memcpy(&ctx->W[ctx->cur], &data[i], n);
-        ctx->cur += n;
-        if (ctx->cur == 128) {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-            uint64_t W[16];
-            
-            for (j = 0; j != 16; ++j)
-                W[j] = bswap_64(((const uint64_t *)ctx->W)[j]);
-            SHA_stage(ctx->H, ctx->H, W);
-#else
-            SHA_stage(ctx->H, ctx->H, ctx->W);
-#endif
-            ctx->cur = 0;
-        }
-    }
-}
-
-
-static __inline__ void SHA_64b_Finish(const struct SHA64bitState *ctx, uint64_t rslt[8])
-{
-    unsigned j;
-    unsigned const n = (ctx->cur + 7) >> 3;
-    uint64_t W[32];
-    
-    memset(W, 0, sizeof(W));
-    for (j = 0; j != n; ++j) {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-        W[j] = bswap_64(((const uint64_t *)ctx->W)[j]);
-#else
-        W[j] = ((const uint64_t *)ctx->W)[j];
-#endif
-    }
-    if (ctx->cur & 7) {
-        --j;
-        W[j] &= (~((uint64_t)0)) << ((8 - (ctx->cur & 7)) * 8);
-        W[j] |= ((uint64_t)0x80U) << ((7 - (ctx->cur & 7)) * 8);
-    }
-    else
-        W[j] = ((uint64_t)0x80U) << 56;
-    if (j < 14) {
-        W[14] = ctx->len >> 61;
-        W[15] = ctx->len <<  3;
-        SHA_stage(rslt, ctx->H, W);
-    }
-    else {
-        W[30] = ctx->len >> 61;
-        W[31] = ctx->len <<  3;
-        SHA_stage(rslt, ctx->H, W);
-        SHA_stage(rslt, rslt, W + 16);
-    }
-}
-
-void CC SHA384StateInit(SHA384State *ctx)
-{
-    SHA_64b_Init(ctx, 0);
-}
-
-void CC SHA384StateAppend(SHA384State *ctx, const void *data, size_t length)
-{
-    SHA_64b_Append(ctx, data, length);
-}
-
-void CC SHA384StateFinish(SHA384State *ctx, uint8_t hash[48])
-{
-    uint64_t H[8];
-
-    SHA_64b_Finish(ctx, H);
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-    {
-        H[0] = bswap_64(H[0]);
-        H[1] = bswap_64(H[1]);
-        H[2] = bswap_64(H[2]);
-        H[3] = bswap_64(H[3]);
-        H[4] = bswap_64(H[4]);
-        H[5] = bswap_64(H[5]);
-    }
-#endif
-    memcpy(hash, H, 48);
-}
-
-void CC SHA512StateInit(SHA512State *ctx)
-{
-    SHA_64b_Init(ctx, 1);
-}
-
-void CC SHA512StateAppend(SHA512State *ctx, const void *data, size_t length)
-{
-    SHA_64b_Append(ctx, data, length);
-}
-
-void CC SHA512StateFinish(SHA512State *ctx, uint8_t hash[64])
-{
-    uint64_t H[8];
-
-    SHA_64b_Finish(ctx, H);
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-    {
-        H[0] = bswap_64(H[0]);
-        H[1] = bswap_64(H[1]);
-        H[2] = bswap_64(H[2]);
-        H[3] = bswap_64(H[3]);
-        H[4] = bswap_64(H[4]);
-        H[5] = bswap_64(H[5]);
-        H[6] = bswap_64(H[6]);
-        H[7] = bswap_64(H[7]);
-    }
-#endif
-    memcpy(hash, H, 64);
-}
diff --git a/libs/klib/bsd/syserrcode.c b/libs/klib/bsd/syserrcode.c
deleted file mode 100644
index dcc7082..0000000
--- a/libs/klib/bsd/syserrcode.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include "writer-priv.h"
-#include <klib/writer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <os-native.h> /* for strchrnul on non-linux */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <assert.h>
-
-size_t KWrtFmt_error_code ( char * pout, size_t max, uint32_t error_code )
-{
-    strerror_r ((int)error_code, pout, max);
-    return string_size (pout);
-}
diff --git a/libs/klib/bsearch.c b/libs/klib/bsearch.c
deleted file mode 100644
index b071479..0000000
--- a/libs/klib/bsearch.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/extern.h>
-#include <klib/sort.h>
-#include <sysalloc.h>
-
-/* Copyright (C) 1991,92,97,2000,02 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <stdlib.h>
-
-
-/* Perform a binary search for KEY in BASE which has NMEMB elements
-   of SIZE bytes each.  The comparisons are done by (*COMPAR)().  */
-LIB_EXPORT void* CC kbsearch ( const void *key, const void *base, size_t nmemb, size_t size,
-    int64_t ( CC * compar ) ( const void *, const void *, void *data ), void *data )
-{
-    size_t l, u, idx;
-    const void *p;
-    int64_t comparison;
-
-    l = 0;
-    u = nmemb;
-    while (l < u)
-    {
-        idx = (l + u) / 2;
-        p = (void *) (((const char *) base) + (idx * size));
-        comparison = (*compar) (key, p, data);
-        if (comparison < 0)
-            u = idx;
-        else if (comparison > 0)
-            l = idx + 1;
-        else
-            return (void *) p;
-    }
-
-    return NULL;
-}
diff --git a/libs/klib/bstpersist.c b/libs/klib/bstpersist.c
deleted file mode 100644
index 58eeb52..0000000
--- a/libs/klib/bstpersist.c
+++ /dev/null
@@ -1,252 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include "trie-priv.h"
-#include "pbstree-priv.h"
-#include <klib/container.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * PBSTree
- * PBSTreeData
- */
-
-typedef struct PBSTreeData PBSTreeData;
-struct PBSTreeData
-{
-    PTWriteFunc write;
-    void *write_param;
-
-    PTAuxFunc aux;
-    void *aux_param;
-
-    P_BSTree *pt;
-    void ( CC * record ) ( P_BSTree*, unsigned int, size_t );
-
-    size_t num_writ;
-    size_t data_size;
-    uint32_t num_nodes;
-
-    rc_t rc;
-};
-
-static
-bool CC PBSTreeGatherInfo ( BSTNode *n, void *data )
-{
-    PBSTreeData *pb = data;
-
-    size_t node_size;
-    pb -> rc = ( * pb -> aux ) ( pb -> aux_param, n, & node_size, NULL, NULL );
-    if ( pb -> rc != 0 )
-        return true;
-
-    if ( pb -> pt != NULL )
-        ( * pb -> record ) ( pb -> pt, pb -> num_nodes, pb -> data_size );
-
-    pb -> data_size += node_size;
-    ++ pb -> num_nodes;
-
-    return false;
-}
-
-static
-void CC PBSTreeRecordU8 ( P_BSTree *pt, unsigned int idx, size_t offset )
-{
-    pt -> data_idx . v8 [ idx ] = ( uint8_t ) offset;
-}
-
-static
-void CC PBSTreeRecordU16 ( P_BSTree *pt, unsigned int idx, size_t offset )
-{
-    pt -> data_idx . v16 [ idx ] = ( uint16_t ) offset;
-}
-
-static
-void CC PBSTreeRecordU32 ( P_BSTree *pt, unsigned int idx, size_t offset )
-{
-    pt -> data_idx . v32 [ idx ] = ( uint32_t ) offset;
-}
-
-static
-bool CC PBSTreeWriteNodes ( BSTNode *n, void *data )
-{
-    PBSTreeData *pb = data;
-
-    size_t node_size;
-    pb -> rc = ( * pb -> aux ) ( pb -> aux_param,
-        n, & node_size, pb -> write, pb -> write_param );
-    if ( pb -> rc != 0 )
-        return true;
-
-    pb -> num_writ += node_size;
-    return false;
-}
-
-/*--------------------------------------------------------------------------
- * BSTree
- */
-
-/* BSTreePersist
- *  write a b-tree to some storage location
- *
- *  the b-tree is persisted by making between one and three passes
- *  over its nodes, see description of "write" parameter.
- *
- *  the first pass examines internal tree structure and invokes
- *  a user-supplied function to determine overall size.
- *
- *  the second pass persists the internal structure in a packed
- *  format, using the user-supplied generic "write" function.
- *
- *  the third pass invokes another user-supplied function to write
- *  auxiliary node data to output.
- *
- *  "num_writ" returns the number of bytes written as a result of
- *  persisting the b-tree. this will be the actual bytes written
- *  regardless of return status.
- *
- *  "write" is a generic output streaming function used for all
- *  operations. if NULL, then the function will exit after its
- *  first pass with the number of bytes required in "num_writ".
- *
- *  "aux" is a specialized function for streaming auxiliary node
- *  data to output using the supplied "write" function. it is invoked
- *  during the first pass with a NULL write function for gathering
- *  size data, and during the third pass with a non-NULL write function.
- */
-KLIB_EXTERN rc_t CC BSTreePersist ( const BSTree *bt, size_t *num_writ,
-    PTWriteFunc write, void *write_param, PTAuxFunc aux, void *aux_param )
-{
-    PBSTreeData pb;
-
-    if ( num_writ != NULL )
-        * num_writ = 0;
-
-    if ( bt == NULL )
-        return RC ( rcCont, rcTree, rcPersisting, rcSelf, rcNull );
-    if ( aux == NULL )
-        return RC ( rcCont, rcTree, rcPersisting, rcFunction, rcNull );
-
-    pb . num_writ = 0;
-
-    /* handle the trivial case */
-    if ( bt -> root == NULL )
-    {
-        P_BSTree pt;
-        if ( write == NULL )
-        {
-            pb . num_writ = sizeof pt . num_nodes;
-            pb . rc = 0;
-        }
-        else
-        {
-            pt . num_nodes = 0;
-            pb . rc = ( * write ) ( write_param,
-                & pt, sizeof pt . num_nodes, & pb . num_writ );
-        }
-    }
-    else
-    {
-        /* initialize callback param block */
-        pb . write = write;
-        pb . write_param = write_param;
-        pb . aux = aux;
-        pb . aux_param = aux_param;
-        pb . rc = 0;
-
-        /* count nodes and tally data size */
-        pb . pt = NULL;
-        pb . data_size = 0;
-        pb . num_nodes = 0;
-        BSTreeDoUntil ( bt, 0, PBSTreeGatherInfo, & pb );
-        if ( pb . rc == 0 )
-        {
-            size_t pt_size;
-
-            /* determine object size */
-            if ( pb . data_size <= 256 )
-            {
-                pt_size = 1;
-                pb . record = PBSTreeRecordU8;
-            }
-            else if ( pb . data_size <= 65536 )
-            {
-                pt_size = 2;
-                pb . record = PBSTreeRecordU16;
-            }
-            else
-            {
-                pt_size = 4;
-                pb . record = PBSTreeRecordU32;
-            }
-
-            pt_size = sizeof * pb . pt - sizeof pb . pt -> data_idx +
-                pb . num_nodes * pt_size;
-
-            if ( write == NULL )
-                pb . num_writ = pt_size + pb . data_size;
-
-            else
-            {
-                pb . pt = malloc ( pt_size );
-                if ( pb . pt != NULL )
-                {
-                    pb . pt -> num_nodes = pb . num_nodes;
-                    pb . pt -> data_size = ( uint32_t ) pb . data_size;
-                    
-                    /* record node offsets */
-                    pb . data_size = 0;
-                    pb . num_nodes = 0;
-                    BSTreeDoUntil ( bt, 0, PBSTreeGatherInfo, & pb );
-                    if ( pb . rc != 0 )
-                        free ( pb . pt );
-                    else
-                    {
-                        pb . rc = ( write ) ( write_param,
-                            pb . pt, pt_size, & pb . num_writ );
-                        free ( pb . pt );
-                        
-                        if ( pb . rc == 0 )
-                            BSTreeDoUntil ( bt, 0, PBSTreeWriteNodes, & pb );
-                    }
-                }
-            }
-        }
-    }
-
-    if ( num_writ != NULL )
-        * num_writ = pb . num_writ;
-
-    return pb . rc;
-}
diff --git a/libs/klib/btree.c b/libs/klib/btree.c
deleted file mode 100644
index eba7ee6..0000000
--- a/libs/klib/btree.c
+++ /dev/null
@@ -1,1458 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/extern.h>
-#include <klib/btree.h>
-#include <klib/ksort-macro.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <stdio.h>
-
-typedef struct SearchWindow {
-    uint16_t	lower;
-    uint16_t	upper;
-} SearchWindow;
-
-
-/* the leaf node works out naturally to be an odd count
- which is needed for splitting at the median. so we
- let a leaf fill, then split before further insert */
-#define LNSIZE ( ( PGSIZE - 2 ) / 8 )
-#define LNMEDIAN ( LNSIZE / 2 )
-#define LNHALF ( LNSIZE / 2 )
-
-typedef struct LeafEntry LeafEntry;
-struct LeafEntry
-{
-    uint16_t key;
-    uint16_t ksize;
-};
-
-typedef struct LeafNode LeafNode;
-struct LeafNode
-{
-    uint16_t key_prefix;       /*** prefix offset into the blob ***/
-    uint16_t key_prefix_len;   /*** length of the prefix ***/
-    SearchWindow   win[256]; /*** search windows for first letter of the key ***/
-    uint16_t count;	       /*** number of elements **/
-    uint16_t key_bytes;        /*** bytes used for storing keys ***/
-    LeafEntry ord [ ( PGSIZE - 8 - 256 * sizeof(SearchWindow)) / sizeof ( LeafEntry ) ];
-};
-
-
-/* the branch node works out to be an even key count
- which means that we also split before insert when
- full, but the split leaves the target insert side
- light, corrected immediately with an insert */
-#define BRSIZE ( ( PGSIZE - 2 - 4 ) / 12 )
-
-typedef struct BranchEntry BranchEntry;
-struct BranchEntry
-{
-    uint16_t key;
-    uint16_t ksize;
-    uint32_t trans;
-};
-
-typedef struct BranchNode BranchNode;
-struct BranchNode
-{
-    uint16_t key_prefix;       /*** offset into the blob ***/
-    uint16_t key_prefix_len;   /*** length of the prefix ***/
-    SearchWindow   win[256]; /*** search windows for first letter of the key ***/
-    /* the exact structure here is important:
-     "ltrans" will be accessed as node -> ord [ -1 ] . trans */
-    uint16_t count;
-    uint16_t key_bytes;
-    
-    uint32_t ltrans;
-    BranchEntry ord [ ( PGSIZE - 12 - 256 * sizeof(SearchWindow) ) / sizeof ( BranchEntry ) ];
-};
-
-
-
-/* when keys are stored in pages, the max key size
- will be such that some number of keys are guaranteed to fit */
-#define MIN_KEY_COUNT 2
-#define MAX_KEY_SIZE \
-(( PGSIZE - 12 - 256 * sizeof(SearchWindow)   - \
-MIN_KEY_COUNT * ( sizeof ( BranchEntry ) + sizeof ( uint32_t ) ) \
-) / MIN_KEY_COUNT )
-
-
-
-/* Find
- *  searches for a match
- *
- *  "val" [ OUT ] - return parameter for value found
- *   accessed via KBTreeValueAccess* described above
- *   must be balanced with a call to KBTreeValueWhack.
- *
- *  "key" [ IN ] and "key_size" [ IN ] - describes an
- *   opaque key
- */
-
-static int compare_keys(unsigned const qsize, uint8_t const query[/* qsize */], unsigned const ksize, uint8_t const key[/* ksize */])
-{
-    unsigned const csize = (qsize < ksize) ? qsize : ksize;
-    int const diff = csize == 0 ? 0 : memcmp(query, key, csize);
-    return diff == 0 ? (int)qsize - (int)ksize : diff;
-}
-
-static rc_t leaf_find(Pager *const pager, Pager_vt const *const vt, void const *page,
-                      uint32_t *id, uint8_t const *const query, unsigned const qsize)
-{
-    const uint8_t *query_8 = query;
-    size_t  qsize_8 = qsize;
-    rc_t rc = 0;
-    const LeafNode *cnode = vt->access(pager, page);
-    assert(cnode != NULL);
-
-    if(cnode->key_prefix_len > 0){
-        const size_t key_prefix_len=cnode->key_prefix_len;
-        /*** prefix must match ***/
-        assert(key_prefix_len == 0 || compare_keys(key_prefix_len, query, key_prefix_len, ((uint8_t *)cnode )+cnode->key_prefix) == 0);
-        /*************************/
-        query_8 += key_prefix_len;
-        qsize_8 -= key_prefix_len;
-    }
-    {
-    /* perform search on branch node */
-    unsigned const q = (qsize_8 > 0)?*query_8:0;
-    unsigned lower = cnode->win[q].lower;
-    unsigned upper = cnode->win[q].upper;
-
-    while (lower < upper)
-    {
-        /* determine the slot to examine */
-        unsigned const slot = ( lower + upper ) >> 1;
-
-        /* perform comparison */
-        const uint8_t *key = & ( ( const uint8_t* ) cnode ) [ cnode -> ord [ slot ] . key ];
-        int const diff = compare_keys ( qsize_8, query_8, cnode -> ord [ slot ] . ksize, key );
-        if ( diff == 0 )
-        {
-            memcpy(id, key + cnode->ord[slot].ksize, 4);
-            return 0;
-        }
-        if ( diff < 0 )
-            upper = slot;
-        else
-            lower = slot + 1;
-    }
-    }
-    return RC(rcDB, rcTree, rcSelecting, rcItem, rcNotFound);
-}
-
-static rc_t branch_find(Pager *const pager, Pager_vt const *const vt, void const *page,
-                        uint32_t *id, uint8_t const *const query, unsigned const qsize)
-{
-    const uint8_t *query_8 = query;
-    size_t  qsize_8 = qsize;
-    rc_t rc = 0;
-    const BranchNode *cnode = vt->access(pager, page);
-    assert(cnode != NULL);
-
-    if(cnode->key_prefix_len > 0){
-        const size_t key_prefix_len=cnode->key_prefix_len;
-        /*** prefix must match ***/
-        assert(key_prefix_len == 0 || compare_keys(key_prefix_len, query, key_prefix_len, ((uint8_t *)cnode )+cnode->key_prefix) == 0);
-        /*************************/
-        query_8 += key_prefix_len;
-        qsize_8 -= key_prefix_len;
-    }
-    {
-        /* perform search on branch node */
-        unsigned const q = (qsize_8 > 0)?*query_8:0;
-        unsigned lower = cnode->win[q].lower;
-        unsigned upper = cnode->win[q].upper;
-
-        while (lower < upper)
-        {
-            /* determine the slot to examine */
-            unsigned const slot = ( lower + upper ) >> 1;
-
-            /* perform comparison */
-            const uint8_t *key = & ( ( const uint8_t* ) cnode ) [ cnode -> ord [ slot ] . key ];
-            int const diff = compare_keys ( qsize_8, query_8, cnode -> ord [ slot ] . ksize, key );
-            if ( diff == 0 )
-            {
-                memcpy(id, key + cnode->ord[slot].ksize, 4);
-                return 0;
-            }
-            if ( diff < 0 )
-                upper = slot;
-            else
-                lower = slot + 1;
-        }
-        /* should have the last slot tried ( < 0 ) or next slot to try ( > 0 ) */
-        assert ( lower == upper );
-
-        /* the node id is left-shifted by 1 and has the "branch-bit" indicator
-           in the LSB. the remaining bits should NOT be zero */
-        /* NB - if "upper" is 0 and type is signed,
-           this will access entry -1, giving "ltrans" */
-        {
-            uint32_t const nid = (upper == 0) ? cnode->ltrans : cnode -> ord [ upper - 1 ] . trans;
-            assert ( ( nid >> 1 ) != 0 );
-
-            /* access child node */
-            {
-                void const *const child = vt->use(pager, nid >> 1);
-                assert(child != NULL);
-                rc = ( ( ( nid & 1 ) == 0 ) ? leaf_find : branch_find )
-                    ( pager, vt, child, id, query, qsize );
-                vt->unuse(pager, child);
-            }
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC BTreeFind ( uint32_t const root, Pager *const pager, Pager_vt const *const vt, uint32_t *id,
-                              const void *const key, size_t const key_size )
-{
-    assert (root != 0);
-    assert (vt != NULL);
-    assert (id != NULL);
-    assert (key != NULL);
-    assert (key_size != 0);
-    {
-        rc_t rc = 0;
-        void const *const page = vt->use(pager, root >> 1);
-
-        assert(page != NULL);
-        rc = (((root & 1) == 0) ? leaf_find : branch_find)(pager, vt, page, id, key, key_size);
-        vt->unuse(pager, page);
-        return rc;
-    }
-}
-
-/* Entry
- *  searches for a match or creates a new entry
- *
- *  "val" [ OUT ] - return parameter for value found
- *   accessed via KBTreeValueAccess* described above
- *   must be balanced with a call to KBTreeValueWhack.
- *
- *  "was_inserted" [ OUT ] - if true, the returned value was the result of an
- *   insertion and can be guaranteed to be all 0 bits. otherwise, the returned
- *   value will be whatever was there previously.
- *
- *  "alloc_size" [ IN ] - the number of value bytes to allocate upon insertion,
- *   i.e. if the key was not found. this value must agree with the limits
- *   specified in Make ( see above ).
- *
- *  "key" [ IN ] and "key_size" [ IN ] - describes an
- *   opaque key
- */
-typedef struct Split Split;
-struct Split
-{
-    void *key;
-    uint32_t left;
-    uint32_t right;
-    uint16_t ksize;
-    uint8_t buff [ 256 ];
-};
-
-void SplitInit(Split *const self)
-{
-    memset(self, 0, 32);
-}
-
-void SplitWhack(Split *const self)
-{
-    if (self->key && self->key != &self->buff[0]) {
-        free(self->key);
-    }
-}
-
-typedef struct EntryData EntryData;
-struct EntryData
-{
-    Pager *pager;
-    Pager_vt const *vt;
-    uint32_t root;
-    uint32_t *id;
-    const void *key;
-    size_t key_size;
-    bool was_inserted;
-};
-
-
-static
-rc_t make_entry ( EntryData *pb, void *hdrp, void *ordp )
-{
-    rc_t rc=0;
-    /* use id provided from outside */
-    {
-        uint8_t *page = hdrp;
-        LeafNode *hdr = hdrp;
-        LeafEntry *ord = ordp;
-        const uint8_t *key = pb -> key;
-        uint16_t key_size = (uint16_t) ( pb -> key_size - hdr->key_prefix_len );
-        
-        
-        assert(hdr->key_prefix_len == 0 || memcmp(key,page + hdr->key_prefix, hdr -> key_prefix_len)==0);/*** validate in debug mode **/
-        key += hdr->key_prefix_len;
-        
-        /* grab memory for key and value-id */
-        hdr -> key_bytes += key_size + sizeof ( uint32_t );
-        assert ( hdr -> key_bytes < PGSIZE );
-        
-        /* location of key within page */
-        ord -> key = PGSIZE - hdr -> key_bytes;
-        ord -> ksize = ( uint16_t ) key_size;
-        
-        /* insert key */
-        memcpy ( page + ord -> key, key,  key_size );
-        
-        /* record value id */
-        memcpy ( & page [ ord -> key + key_size ], pb -> id, sizeof * pb -> id );
-        
-        /* mark inserted */
-        pb -> was_inserted = true;
-    }
-    
-    return rc;
-}
-
-static
-bool leaf_node_full ( const LeafNode *node, size_t key_size )
-{
-    /*** add existing keys ***/
-    size_t size = node -> key_bytes;
-    /*** add new key ***/
-    
-    assert( key_size >= node -> key_prefix_len);
-    size += key_size + sizeof ( uint32_t ) - node -> key_prefix_len;
-    /*** add key index **/
-    size += (uint8_t*)(node->ord + node -> count+1)  - (uint8_t*)node ;
-    
-    if ( size > PGSIZE )
-    return true;
-    return false;
-}
-
-static
-rc_t leaf_insert ( EntryData *pb, LeafNode *node, uint32_t slot )
-{
-    rc_t rc;
-    uint16_t q;
-    
-    /* check that key will fit */
-    if ( leaf_node_full ( node, pb->key_size ) ) {
-        return RC ( rcDB, rcTree, rcInserting, rcConstraint, rcViolated );
-    }
-    
-    /* open hole */
-    if ( slot != node -> count )
-    memmove ( & node -> ord [ slot + 1 ], & node -> ord [ slot ], sizeof node -> ord [ 0 ] * ( node -> count - slot ) );
-    
-    /* enter into the leaf */
-    rc = make_entry ( pb, node, & node -> ord [ slot ] );
-    if ( rc == 0 )
-    ++ node -> count;
-    
-    /* recover from error */
-    else if ( slot != node -> count )
-    memmove ( & node -> ord [ slot ], & node -> ord [ slot + 1 ], sizeof node -> ord [ 0 ] * ( node -> count - slot ) );
-    
-    /* correct search windows */
-    q=(pb->key_size > node->key_prefix_len)?((uint8_t*)pb->key)[node->key_prefix_len]:0;
-    /*** unused windows should have been maintained properly ****/
-    assert((node->win[q].upper==node->win[q].lower)?(node->win[q].lower==slot):true);
-    node->win[q].upper ++;
-    for(q=q+1; q < 256; q++){
-        node->win[q].lower++;
-        node->win[q].upper++;
-    }
-    return rc;
-}
-
-static void LeafEntry_sort_desc_by_offset(uint16_t ord[], unsigned const count, LeafNode const *const node)
-{
-    uint16_t i;
-    
-    for (i = 0; i < (uint16_t)count; ++ i)
-        ord[i] = i;
-    
-#define CMP(A, B) (node->ord[*(uint16_t *)B].key - node->ord[*(uint16_t *)A].key)
-#define SWAP(A, B, C, D) do { i = *(uint16_t *)A; *(uint16_t *)A = *(uint16_t *)B; *(uint16_t *)B = i; } while(0)
-    {
-    KSORT(ord, count, sizeof(ord[0]), 0, 0);
-    }
-#undef SWAP
-#undef CMP
-}
-
-static void BranchEntry_sort_desc_by_offset(uint16_t ord[], unsigned const count, BranchNode const *const node)
-{
-    uint16_t i;
-    
-    for (i = 0; i < (uint16_t)count; ++ i)
-        ord[i] = i;
-    
-#define CMP(A, B) (node->ord[*(uint16_t *)B].key - node->ord[*(uint16_t *)A].key)
-#define SWAP(A, B, C, D) do { i = *(uint16_t *)A; *(uint16_t *)A = *(uint16_t *)B; *(uint16_t *)B = i; } while(0)
-    {
-    KSORT(ord, count, sizeof(ord[0]), 0, 0);
-    }
-#undef SWAP
-#undef CMP
-}
-
-static
-rc_t split_leaf ( EntryData *pb,
-                 LeafNode *left, LeafNode *right, uint32_t slot, Split *split)
-{
-    size_t off, ksize;
-    bool hoist_existing;
-    uint16_t ord [ ( sizeof left -> ord / sizeof left -> ord [ 0 ] + 1 ) / 2 ];
-    
-    /* calculate median */
-    int32_t i, j, median = ( left -> count + 1 ) >> 1;
-    
-    /* pointers to pages */
-    uint8_t * lpage = ( void* ) left;
-    uint8_t * rpage = ( void* ) right;
-    
-    /* check to see if key being inserted would be hoisted */
-    if ( slot == median && median > ( left -> count >> 1 ) )
-    {
-        hoist_existing = false;
-        ksize = pb -> key_size;
-    }
-    else
-    {
-        /* TBD - choose median based upon count and slot */
-        /* get median key size */
-        hoist_existing = true;
-        ksize = left -> ord [ median ] . ksize + left -> key_prefix_len;
-    }
-    
-    /* allocate key space */
-    split -> key = split -> buff;
-    if ( ksize > ( sizeof split -> buff - sizeof ( uint32_t ) ) )
-    {
-        split -> key = malloc ( ksize + sizeof ( uint32_t ) );
-        if ( split -> key == NULL )
-        return RC ( rcDB, rcTree, rcInserting, rcMemory, rcExhausted );
-    }
-    
-    /* copy out key plus value id */
-    if ( hoist_existing ){
-        split -> ksize = 0;
-        if(left -> key_prefix_len > 0){
-            memcpy ( ((uint8_t*)split -> key) + split -> ksize, lpage + left -> key_prefix, left -> key_prefix_len );
-            split -> ksize +=left -> key_prefix_len;
-        }
-        memcpy(((uint8_t*)split -> key) + split -> ksize, lpage + left -> ord [ median ] . key , left -> ord [ median ] . ksize + sizeof ( uint32_t ) );
-        split -> ksize += left -> ord [ median ] . ksize;
-    }
-    
-    /* right page is empty */
-    right -> key_bytes = 0;
-    
-    /* copy all of the keys to the right of median from left to right */
-    for ( i = 0, j = median + hoist_existing; j < left -> count; ++ i, ++ j )
-    {
-        ksize = left -> ord [ j ] . ksize + sizeof ( uint32_t );
-        right -> ord [ i ] . ksize = left -> ord [ j ] . ksize;
-        right -> key_bytes += (uint16_t) ksize;
-        right -> ord [ i ] . key = ( uint16_t ) ( PGSIZE - right -> key_bytes );
-        memcpy (rpage + right -> ord [ i ] . key, lpage + left -> ord [ j ] . key, ksize );
-        if(i == 0 && left->key_prefix_len > 0){
-            right -> key_prefix_len = left -> key_prefix_len;
-            right -> key_bytes     += left -> key_prefix_len;
-            right -> key_prefix     = PGSIZE - right -> key_bytes;
-            memcpy ( rpage + right -> key_prefix, lpage + left->key_prefix, left -> key_prefix_len );
-        }
-    }
-    
-    /* each node has half its former count */
-    right -> count = ( uint16_t ) i;
-    left -> count = median;
-    
-    /* compact the keys */
-    LeafEntry_sort_desc_by_offset(ord, median, left);
-    for ( left -> key_bytes = 0, i = 0; i < median; ++ i )
-    {
-        j = ord [ i ];
-        ksize = left -> ord [ j ] . ksize + sizeof ( uint32_t );
-        off = PGSIZE - ( left -> key_bytes += (uint16_t) ksize );
-        if ( left -> ord [ j ] . key != off )
-        {
-            memmove ( & lpage [ off ], & lpage [ left -> ord [ j ] . key ], ksize );
-            left -> ord [ j ] . key = ( uint16_t ) off;
-        }
-        if(i == 0 && left->key_prefix_len > 0){ /** need to restore prefix from the right ***/
-            left -> key_bytes += left -> key_prefix_len;
-            left -> key_prefix = PGSIZE - left -> key_bytes;
-            memcpy ( lpage + left -> key_prefix, rpage + right -> key_prefix, left -> key_prefix_len );
-        }
-    }
-    /*** maintain search windows ****/
-    /*** find the last window of left ***/
-    for(i=0;left->win[i].upper < left->count; i++){
-        assert(i<256);
-        right->win[i].lower=0;
-        right->win[i].upper=0;
-    }
-    j=right->ord[0].ksize?((uint8_t*)right)[right->ord[0].key]:0;
-    assert(i<=j);
-    for(;i<j;i++){
-        right->win[i].lower=0;
-        right->win[i].upper=0;
-        left->win[i].upper=left->count;
-        left->win[i+1].lower=left->count;
-    }
-    /*** set first window of right ***/
-    right->win[i].lower = 0;
-    assert( left->win[i].upper >= left->count + hoist_existing);
-    right->win[i].upper = left->win[i].upper - left->count - hoist_existing;
-    /*** set last window of left ***/
-    left->win[i].upper = left->count;
-    i++;
-    /*** set right windows from left, reset left ***/
-    for(;i<256;i++){
-        assert( left->win[i].lower >= left->count + hoist_existing );
-        assert( left->win[i].upper >= left->count + hoist_existing );
-        right->win[i].lower = left->win[i].lower - left->count  - hoist_existing;
-        right->win[i].upper = left->win[i].upper - left->count  - hoist_existing;
-        left->win[i].lower=left->count;
-        left->win[i].upper=left->count;
-    }
-    assert(right->win[255].upper == right -> count);
-    /*** reset right window ***/
-    for(;i<256;i++){
-        right->win[i].lower=right->count;
-        right->win[i].upper=right->count;
-    }
-    /*****************************************/
-    
-    /* if insert would be hoisted, do it directly */
-    if ( ! hoist_existing )
-    {
-        memcpy ( split -> key, pb -> key , pb -> key_size );
-        memcpy ( & ( ( uint8_t* ) split -> key ) [ pb -> key_size ], pb -> id, sizeof * pb -> id );
-        split -> ksize =  (uint16_t) pb -> key_size;
-        return 0;
-    }
-    
-    /* TBD - with keys in pages, there is no guarantee that the following insert
-     will succeed, unless there would be a provision for overflow. */
-    
-    /* decide where to insert entry */
-    if ( slot <= (uint32_t) median )
-    return leaf_insert ( pb, left, slot );
-    return leaf_insert ( pb, right, slot - median - 1 );
-}
-
-
-
-static
-rc_t leaf_entry ( EntryData *pb, void const *page, Split *split)
-{
-    int lower, upper;
-    rc_t rc = 0;
-    
-    const uint8_t *query = pb -> key;
-    size_t qsize = pb -> key_size;
-    uint16_t q;
-    
-    /* access page for read */
-    const LeafNode *cnode = pb->vt->access(pb->pager, page);
-    assert(cnode != NULL);
-    
-    /* special case for root node initial insert */
-    if ( cnode -> count == 0 )
-    {
-        LeafNode *node = pb->vt->update(pb->pager, page);
-        assert(node != NULL);
-        
-        {
-            rc = make_entry ( pb, node, & node -> ord [ 0 ] );
-            if ( rc == 0 ){
-                int i;
-                q=(qsize >0)? *query:0;
-                node -> count = 1;
-                node -> win[q].lower = 0;
-                node -> win[q].upper = 1;
-                for(i=0;i<q;i++){
-                    node -> win[i].lower = 0;
-                    node -> win[i].upper = 0;
-                }
-                for(i=q+1;i<256;i++){
-                    node -> win[i].lower = 1;
-                    node -> win[i].upper = 1;
-                }
-            }
-        }
-        return rc;
-    }
-    
-    /* perform search on branch node */
-    /* start with prefix compare */
-    if(cnode->key_prefix_len > 0){
-        const size_t key_prefix_len=cnode->key_prefix_len;
-        /*** prefix must match ***/
-        assert(key_prefix_len == 0 || compare_keys(key_prefix_len, query, key_prefix_len, ((uint8_t *)cnode )+cnode->key_prefix) == 0);
-        /*************************/
-        query += cnode->key_prefix_len;
-        qsize -= cnode->key_prefix_len;
-        
-    }
-    q=(qsize >0)? *query:0;
-    for ( lower = cnode->win[q].lower, upper = cnode -> win[q].upper; lower < upper; )
-    {
-        /* determine the slot to examine */
-        int slot = ( lower + upper ) >> 1;
-        
-        /* perform comparison */
-        const uint8_t *key = & ( ( const uint8_t* ) cnode ) [ cnode -> ord [ slot ] . key ];
-        int diff = compare_keys(qsize, query, cnode -> ord [ slot ] . ksize, key);
-        if ( diff == 0 )
-        {
-            uint32_t val_id;
-            memcpy ( & val_id, & key [ cnode -> ord [ slot ] . ksize ], sizeof val_id );
-            * pb -> id = val_id;
-            return 0;
-        }
-        if ( diff < 0 )
-        upper = slot;
-        else
-        lower = slot + 1;
-    }
-    
-    /* should have the last slot tried ( < 0 ) or next slot to try ( > 0 ) */
-    assert ( lower == upper );
-    {
-    /* going to need to update the node */
-    LeafNode *node = pb->vt->update(pb->pager, page);
-    assert(node != NULL);
-    
-    /* unless an error occurs */
-    pb -> was_inserted = true;
-    
-    /* test for split */
-    if ( leaf_node_full ( node, pb->key_size ) )
-    {
-        /* create another leaf node to right */
-        void const *dup = pb->vt->alloc(pb->pager, &split->right);
-        if (dup == NULL)
-        rc = RC ( rcDB, rcTree, rcInserting, rcMemory, rcExhausted );
-        else {
-            void *mem = pb->vt->update(pb->pager, dup);
-            assert(mem != NULL);
-            {
-                rc = split_leaf ( pb, node, mem, upper, split);
-                if ( rc == 0 )
-                {
-                    rc = RC ( rcDB, rcTree, rcInserting, rcId, rcInsufficient );
-                    split -> right <<= 1;
-                }
-            }
-            pb->vt->unuse(pb->pager, dup);
-        }
-    }
-    else
-    {
-        /* simple insert */
-        rc = leaf_insert ( pb, node, upper );
-    }
-    }
-    return rc;
-}
-
-static
-bool branch_node_full ( const BranchNode *node, size_t key_size )
-{
-    /*** add existing keys ***/
-    size_t size = node -> key_bytes;
-    /*** add new key ***/
-    assert( key_size >= node -> key_prefix_len);
-    size += key_size + sizeof ( uint32_t ) - node -> key_prefix_len;
-    
-    /*** add key index **/
-    size += (uint8_t*)(node->ord + node -> count+1)  - (uint8_t*)node ;
-    if ( size > PGSIZE )
-    return true;
-    return false;
-}
-
-static
-rc_t branch_insert ( BranchNode *node, const Split *split, uint32_t slot )
-{
-    uint16_t ksize = split -> ksize;
-    uint8_t *key   = split -> key;
-    uint8_t *page = (uint8_t*) node;
-    uint16_t q;
-    
-    /* remove prefix from the key */
-    ksize -= node -> key_prefix_len;
-    
-    assert(node->key_prefix_len == 0 || memcmp(key,page + node->key_prefix, node -> key_prefix_len)==0);/*** validate in debug mode **/
-    key   += node -> key_prefix_len;
-    
-    /* check that key will fit */
-    if ( branch_node_full ( node, split -> ksize ) )
-    return RC ( rcDB, rcTree, rcInserting, rcConstraint, rcViolated );
-    
-    /* open hole */
-    if ( slot != node -> count )
-    memmove ( & node -> ord [ slot + 1 ], & node -> ord [ slot ], sizeof node -> ord [ 0 ] * ( node -> count - slot ) );
-    
-    /* enter key value pair */
-    node -> key_bytes += ksize + sizeof ( uint32_t );
-    node -> ord [ slot ] . ksize = ksize;
-    node -> ord [ slot ] . key = ( uint16_t ) ( PGSIZE - node -> key_bytes );
-    memcpy ( & ( ( uint8_t* ) node ) [ PGSIZE - node -> key_bytes ], key, ksize + sizeof ( uint32_t ) );
-    
-    /* enter the new transitions */
-    assert ( node -> ord [ ( int ) slot - 1 ] . trans == split -> left );
-    node -> ord [ ( int ) slot - 1 ] . trans = split -> left;
-    node -> ord [ slot ] . trans = split -> right;
-    
-    ++ node -> count;
-    
-    /* correct search windows */
-    q=(split->ksize > node->key_prefix_len)?((uint8_t*)split->key)[node->key_prefix_len]:0;
-    /*** unused windows should have beed maintained properly ****/
-    assert((node->win[q].upper==node->win[q].lower)?(node->win[q].lower==slot):true);
-    node->win[q].upper ++;
-    for(q=q+1; q < 256; q++){
-        node->win[q].lower++;
-        node->win[q].upper++;
-    }
-    return 0;
-}
-
-static rc_t split_branch ( BranchNode *left, BranchNode *right, const Split *val, Split *split, uint32_t slot)
-{
-    size_t off, ksize;
-    bool hoist_existing;
-    uint16_t ord [ ( sizeof left -> ord / sizeof left -> ord [ 0 ] + 1 ) / 2 ];
-    
-    /* calculate median */
-    int32_t i, j, median = ( left -> count + 1 ) >> 1;
-    
-    /* pointers to pages */
-    uint8_t * lpage = ( void* ) left;
-    uint8_t * rpage = ( void* ) right;
-    
-    /* check to see if key being inserted would be hoisted */
-    if ( slot == median && median > ( left -> count >> 1 ) )
-    {
-        hoist_existing = false;
-        ksize = val -> ksize;
-    }
-    else
-    {
-        /* get median key size */
-        hoist_existing = true;
-        ksize = left -> ord [ median ] . ksize + left -> key_prefix_len;
-    }
-    
-    /* allocate key space */
-    split -> key = split -> buff;
-    if ( ksize > ( sizeof split -> buff - sizeof ( uint32_t ) ) )
-    {
-        split -> key = malloc ( ksize + sizeof ( uint32_t ) );
-        if ( split -> key == NULL )
-        return RC ( rcDB, rcTree, rcInserting, rcMemory, rcExhausted );
-    }
-    
-    /* copy out key plus value id */
-    if ( hoist_existing ){
-        split -> ksize = 0;
-        if(left -> key_prefix_len > 0){
-            memcpy ( ((uint8_t*)split -> key) + split -> ksize, lpage + left -> key_prefix, left -> key_prefix_len );
-            split -> ksize +=left -> key_prefix_len;
-        }
-        memcpy(((uint8_t*)split -> key) + split -> ksize, lpage + left -> ord [ median ] . key , left -> ord [ median ] . ksize + sizeof ( uint32_t ) );
-        split -> ksize +=  left -> ord [ median ] . ksize;
-    }
-    
-    
-    /* right page is empty */
-    right -> key_bytes = 0;
-    
-    /* copy all of the keys to the right of the median from left to right */
-    for ( i = 0, j = median + hoist_existing; j < left -> count; ++ i, ++ j )
-    {
-        ksize = left -> ord [ j ] . ksize + sizeof ( uint32_t );
-        right -> ord [ i ] . ksize = left -> ord [ j ] . ksize;
-        right -> key_bytes += (uint16_t) ksize;
-        right -> ord [ i ] . key = ( uint16_t ) ( PGSIZE - right -> key_bytes );
-        memcpy ( & rpage [ PGSIZE - right -> key_bytes ], & lpage [ left -> ord [ j ] . key ], ksize );
-        right -> ord [ i - 1 ] . trans = left -> ord [ j - 1 ] . trans;
-        if(i == 0 && left->key_prefix_len > 0){
-            off = PGSIZE - right -> key_bytes - left -> key_prefix_len;
-            memcpy ( & rpage [ off ], lpage + left -> key_prefix, left -> key_prefix_len );
-            right -> key_bytes += left -> key_prefix_len;
-            right -> key_prefix_len = left -> key_prefix_len;
-            right -> key_prefix = (uint16_t) off;
-        }
-    }
-    
-    /* copy the last trans */
-    right -> ord [ i - 1 ] . trans = left -> ord [ j - 1 ] . trans;
-    
-    /* each node has half its former count */
-    right -> count = ( uint16_t ) i;
-    left -> count = median;
-    
-    /* compact the keys */
-    BranchEntry_sort_desc_by_offset(ord, median, left);
-    for ( left -> key_bytes = 0, i = 0; i < median; ++ i )
-    {
-        j = ord [ i ];
-        ksize = left -> ord [ j ] . ksize + sizeof ( uint32_t );
-        off = PGSIZE - ( left -> key_bytes += (uint16_t) ksize );
-        if ( left -> ord [ j ] . key != off )
-        {
-            memmove ( & lpage [ off ], & lpage [ left -> ord [ j ] . key ], ksize );
-            left -> ord [ j ] . key = ( uint16_t ) off;
-        }
-        if(i == 0 && left->key_prefix_len > 0){ /** need to restore prefix from the right ***/
-            off = PGSIZE - left -> key_bytes - left -> key_prefix_len;
-            memcpy ( & lpage [ off ], rpage + right -> key_prefix, left -> key_prefix_len );
-            left -> key_bytes += left -> key_prefix_len;
-            left -> key_prefix = (uint16_t) off;
-        }
-    }
-    /*** maintain search windows ****/
-    /*** find the last window of left ***/
-    for(i=0;left->win[i].upper < left->count; i++){
-        assert(i<256);
-        right->win[i].lower=0;
-        right->win[i].upper=0;
-    }
-    j=right->ord[0].ksize?((uint8_t*)right)[right->ord[0].key]:0;
-    assert(i<=j);
-    for(;i<j;i++){
-        right->win[i].lower=0;
-        right->win[i].upper=0;
-        left->win[i].upper=left->count;
-        left->win[i+1].lower=left->count;
-    }
-    /*** set first window of right ***/
-    right->win[i].lower = 0;
-    assert( left->win[i].upper >= left->count + hoist_existing);
-    right->win[i].upper = left->win[i].upper - left->count - hoist_existing;
-    /*** set last window of left ***/
-    left->win[i].upper = left->count;
-    i++;
-    /*** set right windows from left, reset left ***/
-    for(;i<256;i++){
-        assert( left->win[i].lower >= left->count + hoist_existing );
-        assert( left->win[i].upper >= left->count + hoist_existing );
-        right->win[i].lower = left->win[i].lower - left->count  - hoist_existing;
-        right->win[i].upper = left->win[i].upper - left->count  - hoist_existing;
-        left->win[i].lower=left->count;
-        left->win[i].upper=left->count;
-    }
-    assert(right->win[255].upper == right -> count);
-    /*** reset right window ***/
-    for(;i<256;i++){
-        right->win[i].lower=right->count;
-        right->win[i].upper=right->count;
-    }
-    /*****************************************/
-    
-    /* if insert would be hoisted, do it directly */
-    if ( ! hoist_existing )
-    {
-        /* copy key and value */
-        memcpy ( split -> key, val -> key, val -> ksize + sizeof ( uint32_t ) );
-        split ->  ksize = val -> ksize;
-        
-        /* set left and right transitions */
-        assert ( left -> ord [ median - 1 ] . trans == val -> left );
-        left -> ord [ median - 1 ] . trans = val -> left;
-        right -> ltrans = val -> right;
-        
-        return 0;
-    }
-    
-    /* decide where to insert entry */
-    if ( slot <= (uint32_t) median )
-        return branch_insert ( left, val, slot );
-    return branch_insert ( right, val, slot - median - 1 );
-}
-#define MIN_PREFIX_TO_COMPACT 1 /*** minimum prefix delta to initiate compacting ****/
-static
-rc_t leaf_compact (EntryData *pb, void const *pg,uint16_t prefix_len)
-{
-    rc_t rc = 0;
-    const LeafNode *cnode = pb->vt->access(pb->pager, pg);
-    assert(cnode != NULL);
-    
-    if(cnode->key_prefix_len < prefix_len) {
-        assert(cnode->count   > 0);
-        if( cnode->count   > 0 && prefix_len > cnode->key_prefix_len ){
-            prefix_len -= cnode->key_prefix_len; /*** need only to compact the delta **/
-            assert(prefix_len == 0 || memcmp(((uint8_t*)cnode)+cnode->ord[0].key,
-                          ((uint8_t*)cnode)+cnode->ord[cnode->count-1].key,
-                          prefix_len )==0);/****** To be sure ****/
-            if( prefix_len >= MIN_PREFIX_TO_COMPACT){ /*** good to compact ***/
-                LeafNode *node = pb->vt->update(pb->pager, pg);
-                assert(node != NULL);
-                {
-                    uint8_t  q,last;
-                    uint16_t i;
-                    uint16_t ord [ ( sizeof node -> ord / sizeof node -> ord [ 0 ] + 1 ) / 2 ];
-                    
-                    LeafEntry_sort_desc_by_offset(ord, node->count, node);
-                    /*** deal with prefix and index 0 ***/
-                    /*** prefix is cut from the last stored key on the page **/
-                    if(node->key_prefix_len == 0){
-                        node->key_prefix = node->ord[ord[0]].key;
-                    }
-                    node->key_prefix_len    += prefix_len;
-                    node->ord[ord[0]].key   += prefix_len;
-                    node->ord[ord[0]].ksize -= prefix_len;
-                    /*** deal with index 1 (shift) ***/
-                    if(node->count > 1){
-                        node->ord[ord[1]].key   += prefix_len;
-                        node->ord[ord[1]].ksize -= prefix_len;
-                    }
-                    /*** cut all other values ***/
-                    for ( i = 2; i < node->count; ++ i ){
-                        uint16_t j = ord[i];
-                        uint8_t *src = ((uint8_t*)node) + node->ord[j].key + prefix_len;
-                        uint8_t *dst = src + (i-1)*prefix_len; /*** proportional offset ***/
-                        uint16_t ksize = node->ord[j].ksize + sizeof ( uint32_t ) - prefix_len;
-                        memmove(dst,src,ksize);
-                        node->ord[j].ksize -= prefix_len;
-                        node->ord[j].key    = (uint16_t) ( dst -  ((uint8_t*)node) );
-                    }
-                    assert( node -> key_bytes > (node->count-1) * prefix_len);
-                    node -> key_bytes -= (node->count-1) * prefix_len;
-                    /*** rebuild search windows ***/
-                    q=node->ord[0].ksize?((uint8_t*)node)[node->ord[0].key]:0;
-                    for(i=0;i<q;i++){
-                        node->win[i].lower=0;
-                        node->win[i].upper=0;
-                    }
-                    node->win[q].lower=0;
-                    for(i=0,last=q;i< node->count; ++ i ){
-                        q=node->ord[i].ksize?((uint8_t*)node)[node->ord[i].key]:0;
-                        assert(last<=q);
-                        if(q!=last){
-                            node->win[last++].upper = i;
-                            for(;last<q;last++){/*** need to catch up ***/
-                                node->win[last].lower=i;
-                                node->win[last].upper=i;
-                            }
-                            node->win[q].lower=i;
-                            last=q;
-                        }
-                    }
-                    node->win[last].upper=node->count;
-                    for(i=last+1;i<256;i++){
-                        node->win[i].lower=node->count;
-                        node->win[i].upper=node->count;
-                    }
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-static
-rc_t branch_compact (EntryData *pb, void const *pg,uint16_t prefix_len)
-{
-    rc_t rc = 0;
-    const BranchNode *cnode = pb->vt->access(pb->pager, pg);
-    assert(cnode != NULL);
-    
-    if(cnode->key_prefix_len < prefix_len) {
-        assert(cnode->count   > 0);
-        if( cnode->count   > 0 && prefix_len > cnode->key_prefix_len ){
-            prefix_len -= cnode->key_prefix_len; /*** need only to compact the delta **/
-            assert(prefix_len == 0 || memcmp(((uint8_t*)cnode)+cnode->ord[0].key,
-                          ((uint8_t*)cnode)+cnode->ord[cnode->count-1].key,
-                          prefix_len )==0);/****** To be sure ****/
-            if( prefix_len >= MIN_PREFIX_TO_COMPACT){ /*** good to compact ***/
-                BranchNode *node = pb->vt->update(pb->pager, pg);
-                assert(node != NULL);
-                {
-                    uint8_t	 q,last;
-                    uint16_t i;
-                    uint16_t ord [ ( sizeof node -> ord / sizeof node -> ord [ 0 ] + 1 ) / 2 ];
-                    
-                    BranchEntry_sort_desc_by_offset(ord, node->count, node);
-                    /*** deal with prefix and index 0 ***/
-                    /*** prefix is cut from the last stored key on the page **/
-                    if(node->key_prefix_len == 0){
-                        node->key_prefix = node->ord[ord[0]].key;
-                    }
-                    node->key_prefix_len    += prefix_len;
-                    node->ord[ord[0]].key   += prefix_len;
-                    node->ord[ord[0]].ksize -= prefix_len;
-                    /*** deal with index 1 (shift) ***/
-                    if(node->count > 1){
-                        node->ord[ord[1]].key   += prefix_len;
-                        node->ord[ord[1]].ksize -= prefix_len;
-                    }
-                    /*** cut all other values ***/
-                    for ( i = 2; i < node->count; ++ i ){
-                        uint16_t j = ord[i];
-                        uint8_t *src = ((uint8_t*)node) + node->ord[j].key + prefix_len;
-                        uint8_t *dst = src + (i-1)*prefix_len; /*** proportional offset ***/
-                        uint16_t ksize = node->ord[j].ksize + sizeof ( uint32_t ) - prefix_len;
-                        memmove(dst,src,ksize);
-                        node->ord[j].ksize -= prefix_len;
-                        node->ord[j].key    = (uint16_t) ( dst -  ((uint8_t*)node) );
-                    }
-                    assert( node -> key_bytes > (node->count-1) * prefix_len);
-                    node -> key_bytes -= (node->count-1) * prefix_len;
-                    /*** rebuild search windows ***/
-                    q=node->ord[0].ksize?((uint8_t*)node)[node->ord[0].key]:0;
-                    for(i=0;i<q;i++){
-                        node->win[i].lower=0;
-                        node->win[i].upper=0;
-                    }
-                    node->win[q].lower=0;
-                    for(i=0,last=q;i< node->count; ++ i ){
-                        q=node->ord[i].ksize?((uint8_t*)node)[node->ord[i].key]:0;
-                        assert(last<=q);
-                        if(q!=last){
-                            node->win[last++].upper = i;
-                            for(;last<q;last++){/*** need to catch up ***/
-                                node->win[last].lower=i;
-                                node->win[last].upper=i;
-                            }
-                            node->win[q].lower=i;
-                            last=q;
-                        }
-                    }
-                    node->win[last].upper=node->count;
-                    for(i=last+1;i<256;i++){
-                        node->win[i].lower=node->count;
-                        node->win[i].upper=node->count;
-                    }
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-static
-rc_t compact_page ( EntryData *pb, uint32_t nid, uint16_t prefix_len)
-{
-    void const *pg = pb->vt->use(pb->pager, nid >> 1);
-    assert(pg != NULL);
-    {
-    rc_t const rc = (((nid & 1) == 0) ? leaf_compact : branch_compact)(pb, pg, prefix_len);
-    pb->vt->unuse(pb->pager, pg);
-    return rc;
-    }
-}
-
-
-static
-rc_t branch_entry ( EntryData *pb, void const *page, Split *rsplit)
-{
-    void const *child;
-    uint32_t nid;
-    int lower, upper;
-    const uint8_t *query = pb -> key;
-    size_t qsize = pb -> key_size;
-    uint16_t q;
-    rc_t rc = 0;
-
-    /* look at node in read-only mode */
-    const BranchNode *cnode = pb->vt->access(pb->pager, page);
-    assert(cnode != NULL);
-    
-    /* perform search on branch node */
-    /* start with prefix compare */
-    if(cnode->key_prefix_len > 0){
-        const size_t key_prefix_len=cnode->key_prefix_len;
-        /*** prefix must match ***/
-        assert(key_prefix_len == 0 || compare_keys(key_prefix_len, query,key_prefix_len, ((uint8_t *)cnode )+cnode->key_prefix) == 0);
-        /*************************/
-        query += cnode->key_prefix_len;
-        qsize -= cnode->key_prefix_len;
-    }
-    q = (qsize>0)?*query:0;
-    
-    for ( lower = cnode->win[q].lower, upper = cnode -> win[q].upper; lower < upper; )
-    {
-        /* determine the slot to examine */
-        int slot = ( lower + upper ) >> 1;
-        
-        /* perform comparison */
-        const uint8_t *key = & ( ( const uint8_t* ) cnode ) [ cnode -> ord [ slot ] . key ];
-        int diff = compare_keys(qsize, query, cnode -> ord [ slot ] . ksize, key);
-        if ( diff == 0 )
-        {
-            memcpy(pb->id, &key[cnode->ord[slot].ksize], 4);
-            return 0;
-        }
-        if ( diff < 0 )
-        upper = slot;
-        else
-        lower = slot + 1;
-    }
-    
-    /* should have the last slot tried ( < 0 ) or next slot to try ( > 0 ) */
-    assert ( lower == upper );
-    
-    /* the node id is left-shifted by 1 and has the "branch-bit" indicator
-     in the LSB. the remaining bits should NOT be zero */
-    nid = cnode -> ord [ upper - 1 ] . trans;
-    assert ( ( nid >> 1 ) != 0 );
-    
-    /* access child node */
-    child = pb->vt->use(pb->pager, nid >> 1);
-    assert(child != NULL);
-    {
-        Split split;
-        SplitInit ( & split );
-        /* recursively continue search */
-        rc = (((nid & 1) == 0) ? leaf_entry : branch_entry)(pb, child, &split);
-        /* detect split */
-        if ( GetRCState ( rc ) == rcInsufficient && GetRCObject ( rc ) == rcId )
-        {
-            /* splitting may replace value being inserted in to the branch ***/
-            /* access current node */
-            BranchNode *node = pb->vt->update(pb->pager, page);
-            assert(node != NULL);
-            rc = 0;
-            {
-                split . left = nid;
-                
-                /* if we are also full, we have to split */
-                if ( branch_node_full ( node, split.ksize ) )
-                {
-                    /* create another branch node to right */
-                    void const *dup = pb->vt->alloc(pb->pager, &rsplit->right);
-                    if (dup == NULL)
-                        rc = RC ( rcDB, rcTree, rcInserting, rcMemory, rcExhausted );
-                    else {
-                        void *mem = pb->vt->update(pb->pager, dup);
-                        assert(mem != NULL);
-                        {
-                            split_branch( node, mem, & split, rsplit, upper);
-                            rc = RC ( rcDB, rcTree, rcInserting, rcId, rcInsufficient );
-                            rsplit -> right += rsplit -> right + 1;
-                        }
-                        pb->vt->unuse(pb->pager, dup);
-                    }
-                }
-                else
-                {
-                    int pl;/**common prefix_len **/
-                    /* hoist into location */
-                    /* it will increase node->count and upper will start pointing into a new key ***/
-                    if(rc==0 && upper > 0 ){ /*** left side compact is possible  upper is 1 based ***/
-                        uint8_t   *a = (uint8_t*)split.key;
-                        uint8_t   *b = (uint8_t*)node;
-                        
-                        a += node->key_prefix_len;
-                        b += node->ord[upper-1].key;
-                        assert ( node->ord[upper-1].trans == split.left );
-                        for(pl=0;pl < split.ksize - node->key_prefix_len && pl < node->ord[upper-1].ksize && a[pl]==b[pl];pl++){}
-                        pl+=node->key_prefix_len;
-                        if(pl >= MIN_PREFIX_TO_COMPACT){
-                            rc=compact_page(pb,split.left,pl);
-                        }
-                    }
-                    if(rc==0 && upper < node->count ){ /*** right side compact is possible ***/
-                        uint8_t   *a = (uint8_t*)split.key;
-                        uint8_t   *b = (uint8_t*)node;
-                        a += node->key_prefix_len;
-                        b += node->ord[upper].key;
-                        for(pl=0;pl < split.ksize - node->key_prefix_len && pl < node->ord[upper].ksize && a[pl]==b[pl];pl++){}
-                        pl+=node->key_prefix_len;
-                        if(pl >= MIN_PREFIX_TO_COMPACT){
-                            rc=compact_page(pb,split.right,pl);
-                        }
-                    }
-                    if(rc == 0 ){
-                        rc=branch_insert ( node, & split, upper );
-                        assert(rc==0);
-                    }
-                }
-            }
-        }
-        
-        SplitWhack ( & split );
-        
-        pb->vt->unuse(pb->pager, child);
-    }
-    
-    return rc;
-}
-
-static rc_t tree_entry(EntryData *pb)
-{
-    void const *page;
-    rc_t rc;
-    Split split;
-    
-    if (pb->root == 0) {
-        uint32_t new_id = 0;
-        
-        page = pb->vt->alloc(pb->pager, &new_id);
-        if (page == NULL)
-            return RC ( rcDB, rcTree, rcInserting, rcMemory, rcExhausted );
-        pb->root = new_id << 1;
-    }
-    else {
-        page = pb->vt->use(pb->pager, pb->root >> 1);
-        assert(page != NULL);
-    }
-    SplitInit(&split);
-    
-    rc = (((pb->root & 1) == 0) ? leaf_entry : branch_entry)(pb, page, &split);
-    /* detect split */
-    if ( GetRCState ( rc ) == rcInsufficient && GetRCObject ( rc ) == rcId ) {
-        void const *new_root;
-
-        rc = 0;
-        split.left = pb->root;
-        new_root = pb->vt->alloc(pb->pager, &pb->root);
-        if (new_root) {
-            BranchNode *node = pb->vt->update(pb->pager, new_root);
-            assert(node != NULL);
-            {
-                uint16_t	q,i;
-                /* install the new root */
-                node -> key_bytes = split . ksize + sizeof ( uint32_t );
-                node -> key_prefix_len = 0;
-                node -> key_prefix = 0;
-                node -> ord [ 0 ] . ksize = split . ksize;
-                node -> ord [ 0 ] . key = ( uint16_t ) ( PGSIZE - node -> key_bytes );
-                memcpy ( & ( ( uint8_t* ) node ) [ PGSIZE - node -> key_bytes ], split . key, node -> key_bytes );
-                node -> ltrans = split . left;
-                node -> ord [ 0 ] . trans = split . right;
-                node -> count = 1;
-                /* 				assert ( split . left < 10000 && split . right < 10000); */
-                /*** init search windows ***/
-                q=(split.ksize>0)? *(uint8_t*)split.key:0;
-                node -> win[q].lower = 0;
-                node -> win[q].upper = 1;
-                for(i=0;i<q;i++){
-                    node -> win[i].lower = 0;
-                    node -> win[i].upper = 0;
-                }
-                for(i=q+1;i<256;i++){
-                    node -> win[i].lower = 1;
-                    node -> win[i].upper = 1;
-                }
-                pb->root = (pb->root << 1) | 1;
-            }
-            pb->vt->unuse(pb->pager, new_root);
-        }
-        else
-            rc = RC ( rcDB, rcTree, rcInserting, rcMemory, rcExhausted );
-    }
-    SplitWhack(&split);
-    pb->vt->unuse(pb->pager, page);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC BTreeEntry ( uint32_t *root, Pager *pager, Pager_vt const *vt, uint32_t *id,
-                               bool *was_inserted, const void *key, size_t key_size )
-{
-    assert(root != NULL);
-    assert(vt != NULL);
-    assert(id != NULL);
-    assert(was_inserted != NULL);
-    assert(key != NULL);
-    assert(key_size != 0);
-    {
-        EntryData pb;
-        
-        pb.pager = pager;
-        pb.vt = vt;
-        pb.root = *root;
-        pb.id = id;
-        pb.key = key;
-        pb.key_size = key_size;
-        pb.was_inserted = false;
-        {
-            rc_t const rc = tree_entry(&pb);
-            
-            *root = pb.root;
-            *was_inserted = pb.was_inserted;
-            return rc;
-        }
-    }
-}
-
-
-/* ForEach
- *  executes a function on each tree element
- *
- *  "reverse" [ IN ] - if true, iterate in reverse order
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - callback function
- */
-static void invoke_foreach_func ( void const *const cnode, void const *const ordp,
-                                 void ( CC * f ) ( const void *key, size_t key_size, uint32_t id, void *data ), void *data )
-{
-    LeafEntry const *const ord = ordp;
-    uint8_t const *const page = cnode;
-    uint8_t const *const key = &page[ord->key];
-    size_t const key_size = ord->ksize;
-    uint32_t val_id;
-    
-    memcpy(&val_id, &key[key_size], 4);
-    f(key, key_size, val_id, data);
-}
-
-static void foreach_leaf_reverse(uint32_t nodeid, Pager *pager, Pager_vt const *vt,
-                                 void ( CC * f ) ( const void *key, size_t key_size, uint32_t id, void *data ), void *data )
-{
-    void const *const page = vt->use(pager, nodeid);
-    assert(page != NULL);
-    {
-        unsigned i;
-    LeafNode const *const node = vt->access(pager, page);
-    assert(node != NULL);
-    
-    for (i = node->count; i > 0; ) {
-        invoke_foreach_func(node, &node->ord[--i], f, data);
-    }
-    }
-    vt->unuse(pager, page);
-}
-
-static void foreach_branch_reverse(uint32_t nodeid, Pager *pager, Pager_vt const *vt,
-                                   void ( CC * f ) ( const void *key, size_t key_size, uint32_t id, void *data ), void *data )
-{
-    void const *const page = vt->use(pager, nodeid);
-    assert(page != NULL);
-    {
-        unsigned i;
-    BranchNode const *const node = vt->access(pager, page);
-    assert(node != NULL);
-    
-    for (i = node->count; i > 0; ) {
-        uint32_t const child = node->ord[--i].trans;
-        
-        invoke_foreach_func(node, &node->ord[i], f, data);
-        if (child & 1) {
-            foreach_branch_reverse(child >> 1, pager, vt, f, data);
-        }
-        else {
-            foreach_leaf_reverse(child >> 1, pager, vt, f, data);
-        }
-    }
-    }
-    vt->unuse(pager, page);
-}
-
-static void foreach_reverse(uint32_t root, Pager *pager, Pager_vt const *vt,
-                            void ( CC * f ) ( const void *key, size_t key_size, uint32_t id, void *data ), void *data )
-{
-    if (root & 1) {
-        foreach_branch_reverse(root >> 1, pager, vt, f, data);
-    }
-    else {
-        foreach_leaf_reverse(root >> 1, pager, vt, f, data);
-    }
-}
-
-static void foreach_leaf(uint32_t nodeid, Pager *pager, Pager_vt const *vt,
-                         void ( CC * f ) ( const void *key, size_t key_size, uint32_t id, void *data ), void *data )
-{
-    void const *const page = vt->use(pager, nodeid);
-    assert(page != NULL);
-    {
-        unsigned i;
-    LeafNode const *const node = vt->access(pager, page);
-    assert(node != NULL);
-    
-    for (i = 0; i < node->count; ++i) {
-        invoke_foreach_func(node, &node->ord[i], f, data);
-    }
-    }
-    vt->unuse(pager, page);
-}
-
-static void foreach_branch(uint32_t nodeid, Pager *pager, Pager_vt const *vt,
-                           void ( CC * f ) ( const void *key, size_t key_size, uint32_t id, void *data ), void *data )
-{
-    void const *const page = vt->use(pager, nodeid);
-    assert(page != NULL);
-    {
-        unsigned i;
-    BranchNode const *const node = vt->access(pager, page);
-    assert(node != NULL);
-    
-    for (i = 0; i < node->count; ++i) {
-        uint32_t const child = node->ord[i].trans;
-        
-        invoke_foreach_func(node, &node->ord[i], f, data);
-        if (child & 1) {
-            foreach_branch(child >> 1, pager, vt, f, data);
-        }
-        else {
-            foreach_leaf(child >> 1, pager, vt, f, data);
-        }
-    }
-    }
-    vt->unuse(pager, page);
-}
-
-static void foreach(uint32_t root, Pager *pager, Pager_vt const *vt,
-                    void ( CC * f ) ( const void *key, size_t key_size, uint32_t id, void *data ), void *data )
-{
-    if (root & 1) {
-        foreach_branch(root >> 1, pager, vt, f, data);
-    }
-    else {
-        foreach_leaf(root >> 1, pager, vt, f, data);
-    }
-}
-
-LIB_EXPORT rc_t CC BTreeForEach ( uint32_t root, Pager *pager, Pager_vt const *vt, bool reverse,
-                                 void ( CC * f ) ( const void *key, size_t key_size, uint32_t id, void *data ), void *data )
-{
-    if (vt != NULL && root != 0 && f != NULL) {
-        if (reverse) {
-            foreach_reverse(root, pager, vt, f, data);
-        }
-        else {
-            foreach(root, pager, vt, f, data);
-        }
-    }
-    return 0;
-}
diff --git a/libs/klib/container.c b/libs/klib/container.c
deleted file mode 100644
index 710b722..0000000
--- a/libs/klib/container.c
+++ /dev/null
@@ -1,1646 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/container.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * SLNode
- *  singly linked node
- */
-
-#if 0
-/* SLNodeFindNext
- *  find next element satisfying criteria
- */
-LIB_EXPORT SLNode* CC SLNodeFindNext ( const SLNode *p, bool ( CC * f ) ( const SLNode *n ) )
-{
-    if ( p != NULL )
-    {
-        SLNode *n = p -> next;
-        while ( n != NULL )
-        {
-            if ( ( * f ) ( n ) )
-                return n;
-            n = n -> next;
-        }
-    }
-    return NULL;
-}
-#endif
-
-
-/*--------------------------------------------------------------------------
- * SLList
- *  singly linked list
- */
-
-/* SLListPushTail
- *  push a single node onto tail of list
- */
-LIB_EXPORT void CC SLListPushTail ( SLList *sl, SLNode *n )
-{
-    if ( sl != NULL && n != NULL )
-    {
-        if ( sl -> tail == NULL )
-            sl -> head = sl -> tail = n;
-        else
-        {
-            sl -> tail -> next = n;
-            sl -> tail = n;
-        }
-        n -> next = NULL;
-    }
-}
-
-/* SLListPopHead
- *  pop a single node from head of list
- */
-LIB_EXPORT SLNode* CC SLListPopHead ( SLList *sl )
-{
-    if ( sl != NULL )
-    {
-        SLNode *n = sl -> head;
-        if ( n != NULL )
-        {
-            sl -> head = n -> next;
-            if ( n -> next == NULL )
-                sl -> tail = NULL;
-        }
-        return n;
-    }
-    return NULL;
-}
-
-/* SLListPopTail
- *  pop a single node from tail of list
- */
-LIB_EXPORT SLNode* CC SLListPopTail ( SLList *sl )
-{
-    if ( sl != NULL )
-    {
-        SLNode *n = sl -> head;
-        if ( n != NULL )
-        {
-            SLNode *tail = sl -> tail;
-            if ( n == tail )
-            {
-                sl -> head = sl -> tail = NULL;
-                return n;
-            }
-            while ( n -> next != tail )
-                n = n -> next;
-            sl -> tail = n;
-            n -> next = NULL;
-            return tail;
-        }
-    }
-    return NULL;
-}
-
-/* SLListUnlink
- *  removes a designated node from list
- */
-LIB_EXPORT void CC SLListUnlink ( SLList *sl, SLNode *n )
-{
-    if ( sl != NULL && n != NULL )
-    {
-        SLNode *p = sl -> head;
-        if ( p == n )
-        {
-            sl -> head = p -> next;
-            if ( p -> next == NULL )
-                sl -> tail = NULL;
-        }
-        else while ( p != NULL )
-        {
-            if ( p -> next == n )
-            {
-                p -> next = n -> next;
-                if ( n -> next == NULL )
-                    sl -> tail = p;
-                break;
-            }
-            p = p -> next;
-        }
-    }
-}
-
-/* SLListForEach
- *  executes a function on each list element
- */
-LIB_EXPORT void CC SLListForEach ( const SLList *sl,
-    void ( CC * f ) ( SLNode *n, void *data ), void *data )
-{
-    if ( sl != NULL )
-    {
-        SLNode *n = sl -> head;
-        while ( n != NULL )
-        {
-            SLNode *next = n -> next;
-            ( * f ) ( n, data );
-            n = next;
-        }
-    }
-}
-
-/* SLListDoUntil
- *  executes a function on each element
- *  until the function returns true
- */
-LIB_EXPORT bool CC SLListDoUntil ( const SLList *sl,
-    bool ( CC * f ) ( SLNode *n, void *data ), void *data )
-{
-    if ( sl )
-    {
-        SLNode *n = sl -> head;
-        while ( n != NULL )
-        {
-            SLNode *next = n -> next;
-            if ( ( * f ) ( n, data ) )
-                return true;
-            n = next;
-        }
-    }
-
-    return false;
-}
-
-/* SLListFindFirst
- *  find first element satisfying criteria
- */
-LIB_EXPORT SLNode* CC SLListFindFirst ( const SLList *sl,
-    bool ( CC * f ) ( const SLNode *n ) )
-{
-    if ( sl != NULL )
-    {
-        SLNode *n = sl -> head;
-        while ( n != NULL )
-        {
-            SLNode *next = n -> next;
-            if ( ( * f ) ( n ) )
-                return n;
-            n = next;
-        }
-    }
-    return NULL;
-}
-
-/* SLListWhack
- *  pops elements from list and
- *  executes a user provided destructor
- */
-LIB_EXPORT void CC SLListWhack ( SLList *sl, 
-    void ( CC * whack ) ( SLNode *n, void *data ), void *data )
-{
-    if ( sl != NULL )
-    {
-        SLNode *n = sl -> head;
-        sl -> head = sl -> tail = NULL;
-
-        if ( whack != NULL )
-        {
-            while ( n != NULL )
-            {
-                SLNode *next = n -> next;
-                ( * whack ) ( n, data );
-                n = next;
-            }
-        }
-    }
-}
-
-
-/*--------------------------------------------------------------------------
- * DLNode
- *  doubly linked node
- */
-
-#if 0
-/* DLNodeFindNext
- *  find next element satisfying criteria
- */
-LIB_EXPORT DLNode* CC DLNodeFindNext ( const DLNode *p, 
-    bool ( CC * f ) ( const DLNode *n ) )
-{
-    if ( p != NULL )
-    {
-        DLNode *n = p -> next;
-        while ( n != NULL )
-        {
-            if ( ( * f ) ( n ) )
-                return n;
-            n = n -> next;
-        }
-    }
-    return NULL;
-}
-
-/* DLNodeFindPrev
- *  find previous element satisfying criteria
- */
-LIB_EXPORT DLNode* CC DLNodeFindPrev ( const DLNode *p,
-    bool ( CC * f ) ( const DLNode *n ) )
-{
-    if ( p != NULL )
-    {
-        DLNode *n = p -> prev;
-        while ( n != NULL )
-        {
-            if ( ( * f ) ( n ) )
-                return n;
-            n = n -> prev;
-        }
-    }
-    return NULL;
-}
-#endif
-
-
-/*--------------------------------------------------------------------------
- * DLList
- *  doubly linked list
- */
-
-/* DLListPushHead
- *  push a single node onto the head of list
- */
-LIB_EXPORT void CC DLListPushHead ( DLList *dl, DLNode *n )
-{
-    if ( dl != NULL && n != NULL )
-    {
-        n -> prev = NULL;
-        n -> next = dl -> head;
-        if ( dl -> head == NULL )
-            dl -> head = dl -> tail = n;
-        else
-        {
-            dl -> head -> prev = n;
-            dl -> head = n;
-        }
-    }
-}
-
-/* DLListPushTail
- *  push a single node onto the tail of list
- */
-LIB_EXPORT void CC DLListPushTail ( DLList *dl, DLNode *n )
-{
-    if ( dl != NULL && n != NULL )
-    {
-        n -> next = NULL;
-        n -> prev = dl -> tail;
-        if ( dl -> tail == NULL )
-            dl -> tail = dl -> head = n;
-        else
-        {
-            dl -> tail -> next = n;
-            dl -> tail = n;
-        }
-    }
-}
-
-/* DLListPopHead
- *  pop a single node from head of list
- */
-LIB_EXPORT DLNode* CC DLListPopHead ( DLList *dl )
-{
-    if ( dl != NULL )
-    {
-        DLNode *n = dl -> head;
-        if ( dl -> head != NULL )
-        {
-            dl -> head = n -> next;
-            if ( n -> next == NULL )
-                dl -> tail = NULL;
-            else
-                n -> next -> prev = NULL;
-        }
-        return n;
-    }
-    return NULL;
-}
-
-/* DLListPopTail
- *  pop a single node from tail of list
- */
-LIB_EXPORT DLNode* CC DLListPopTail ( DLList *dl )
-{
-    if ( dl != NULL )
-    {
-        DLNode *n = dl -> tail;
-        if ( dl -> tail != NULL )
-        {
-            dl -> tail = n -> prev;
-            if ( n -> prev == NULL )
-                dl -> head = NULL;
-            else
-                n -> prev -> next = NULL;
-        }
-        return n;
-    }
-    return NULL;
-}
-
-/* DLListPrependList
- *  pushes list contents onto the head of target
- */
-LIB_EXPORT void CC DLListPrependList ( DLList *dl, DLList *l )
-{
-    if ( dl != NULL && l != NULL && l -> head != NULL )
-    {
-        if ( dl -> tail == NULL )
-            * dl = * l;
-        else
-        {
-            dl -> head -> prev = l -> tail;
-            l -> tail -> next = dl -> head;
-            dl -> head = l -> head;
-        }
-
-        l -> head = l -> tail = NULL;
-    }
-}
-
-/* DLListAppendList
- *  pushes list contents onto the tail of target
- */
-LIB_EXPORT void CC DLListAppendList ( DLList *dl, DLList *l )
-{
-    if ( dl != NULL && l != NULL && l -> head != NULL )
-    {
-        if ( dl -> tail == NULL )
-            * dl = * l;
-        else
-        {
-            dl -> tail -> next = l -> head;
-            l -> head -> prev = dl -> tail;
-            dl -> tail = l -> tail;
-        }
-
-        l -> head = l -> tail = NULL;
-    }
-}
-
-/* DLListInsertNodeBefore
- *  inserts node "n" before "which" within list
- */
-LIB_EXPORT void CC DLListInsertNodeBefore ( DLList *dl, DLNode *which, DLNode *n )
-{
-    if ( which != NULL && n != NULL )
-    {
-        /* take care of "n" */
-        n -> next = which;
-        n -> prev = which -> prev;
-
-        /* link "which"'s prev to "n" */
-        if ( which -> prev != NULL )
-            which -> prev -> next = n;
-
-        /* or if none, then perhaps head of list */
-        else if ( dl != NULL && dl -> head == which )
-            dl -> head = n;
-
-        /* link "which" to "n" */
-        which -> prev = n;
-    }
-}
-
-/* DLListInsertNodeAfter
- *  inserts node "n" after "which" within list
- */
-LIB_EXPORT void CC DLListInsertNodeAfter ( DLList *dl, DLNode *which, DLNode *n )
-{
-    if ( which != NULL && n != NULL )
-    {
-        /* take care of "n" */
-        n -> prev = which;
-        n -> next = which -> next;
-
-        /* link "which"'s next to "n" */
-        if ( which -> next != NULL )
-            which -> next -> prev = n;
-
-        /* or if none, then perhaps tail of list */
-        else if ( dl != NULL && dl -> tail == which )
-            dl -> tail = n;
-
-        /* link "which" to "n" */
-        which -> next = n;
-    }
-}
-
-/* DLListInsertListBefore
- *  inserts list "l" before "which" within list "dl"
- */
-LIB_EXPORT void CC DLListInsertListBefore ( DLList *dl, DLNode *which, DLList *l )
-{
-    if ( which != NULL && l != NULL && l -> head != NULL )
-    {
-        /* take care of inserting list */
-        l -> tail -> next = which;
-        l -> head -> prev = which -> prev;
-
-        /* link "which"'s prev to "l -> head" */
-        if ( which -> prev != NULL )
-            which -> prev -> next = l -> head;
-
-        /* or if none, then perhaps head of list */
-        else if ( dl != NULL && dl -> head == which )
-            dl -> head = l -> head;
-
-        /* link "which" to "l -> tail" */
-        which -> prev = l -> tail;
-
-        /* remove items from "l" */
-        l -> head = l -> tail = NULL;
-    }
-}
-
-/* DLListInsertListAfter
- *  inserts list "l" after "which" within list "dl"
- */
-LIB_EXPORT void CC DLListInsertListAfter ( DLList *dl, DLNode *which, DLList *l )
-{
-    if ( which != NULL && l != NULL && l -> head != NULL )
-    {
-        /* take care of inserting list */
-        l -> head -> prev = which;
-        l -> tail -> next = which -> next;
-
-        /* link "which"'s next to "l -> tail" */
-        if ( which -> next != NULL )
-            which -> next -> prev = l -> tail;
-
-        /* or if none, then perhaps tail of list */
-        else if ( dl != NULL && dl -> tail == which )
-            dl -> head = l -> tail;
-
-        /* link "which" to "l -> head" */
-        which -> next = l -> head;
-
-        /* remove items from "l" */
-        l -> head = l -> tail = NULL;
-    }
-}
-
-/* DLListUnlink
- *  removes a designated node from list
- */
-LIB_EXPORT void CC DLListUnlink ( DLList *dl, DLNode *n )
-{
-    if ( n != NULL )
-    {
-        if ( n -> next == NULL )
-        {
-            if ( dl != NULL && dl -> tail == n )
-            {
-                if ( n -> prev == NULL )
-                    dl -> head = dl -> tail = NULL;
-                else
-                {
-                    n -> prev -> next = NULL;
-                    dl -> tail = n -> prev;
-                }
-            }
-            else
-            {
-                if ( n -> prev != NULL )
-                    n -> prev -> next = NULL;
-            }
-        }
-        else if ( n -> prev == NULL )
-        {
-            n -> next -> prev = NULL;
-            if ( dl != NULL && dl -> head == n )
-                dl -> head = n -> next;
-        }
-        else
-        {
-            n -> next -> prev = n -> prev;
-            n -> prev -> next = n -> next;
-        }
-    }
-}
-
-/* DLListForEach
- *  executes a function on each list element
- */
-LIB_EXPORT void CC DLListForEach ( const DLList *dl, bool reverse,
-    void ( CC * f ) ( DLNode *n, void *data ), void *data )
-{
-    if ( dl != NULL )
-    {
-        DLNode *n, *next;
-        if ( reverse )
-        {
-            n = dl -> tail;
-            while ( n != NULL )
-            {
-                next = n -> prev;
-                ( * f ) ( n, data );
-                n = next;
-            }
-        }
-        else
-        {
-            n = dl -> head;
-            while ( n != NULL )
-            {
-                next = n -> next;
-                ( * f ) ( n, data );
-                n = next;
-            }
-        }
-    }
-}
-
-/* DLListDoUntil
- *  executes a function on each element
- *  until the function returns 1
- */
-LIB_EXPORT bool CC DLListDoUntil ( const DLList *dl, bool reverse,
-    bool ( CC * f ) ( DLNode *n, void *data ), void *data )
-{
-    if ( dl != NULL )
-    {
-        DLNode *n, *next;
-        if ( reverse )
-        {
-            n = dl -> tail;
-            while ( n != NULL )
-            {
-                next = n -> prev;
-                if ( ( * f ) ( n, data ) )
-                    return true;
-                n = next;
-            }
-        }
-        else
-        {
-            n = dl -> head;
-            while ( n != NULL )
-            {
-                next = n -> next;
-                if ( ( * f ) ( n, data ) )
-                    return true;
-                n = next;
-            }
-        }
-    }
-    return false;
-}
-
-/* DLListFindFirst
- *  find first element satisfying criteria
- */
-LIB_EXPORT DLNode* CC DLListFindFirst ( const DLList *dl,
-    bool ( CC * f ) ( const DLNode *n ) )
-{
-    if ( dl != NULL )
-    {
-        DLNode *n = dl -> head;
-        while ( n != NULL )
-        {
-            if ( ( * f ) ( n ) )
-                return n;
-            n = n -> next;
-        }
-    }
-    return NULL;
-}
-
-/* DLListFindLast
- *  find last element satisfying criteria
- */
-LIB_EXPORT DLNode* CC DLListFindLast ( const DLList *dl,
-    bool ( CC * f ) ( const DLNode *n ) )
-{
-    if ( dl != NULL )
-    {
-        DLNode *n = dl -> tail;
-        while ( n != NULL )
-        {
-            if ( ( * f ) ( n ) )
-                return n;
-            n = n -> prev;
-        }
-    }
-    return NULL;
-}
-
-/* DLListWhack
- *  pops elements from list and
- *  executes a user provided destructor
- */
-LIB_EXPORT void CC DLListWhack ( DLList *dl,
-    void ( CC * whack ) ( DLNode *n, void *data ), void *data )
-{
-    if ( dl != NULL )
-    {
-        DLNode *n = dl -> head;
-        dl -> head = dl -> tail = NULL;
-
-        if ( whack != NULL )
-        {
-            while ( n != NULL )
-            {
-                DLNode *next = n -> next;
-                ( * whack ) ( n, data );
-                n = next;
-            }
-        }
-    }
-}
-
-
-/*--------------------------------------------------------------------------
- * BSTNode
- *  b-tree node
- */
-
-#define LEFT 1
-#define RIGHT 2
-
-#define BALANCE( node ) \
-    ( ( size_t ) ( node ) -> par & 3 )
-#define ZERO_BALANCE( node ) \
-    ( * ( size_t* ) & ( node ) -> par &= ~ ( size_t ) 3 )
-#define CLR_BALANCE( node, bal ) \
-    ( * ( size_t* ) & ( node ) -> par ^= ( bal ) )
-#define SET_BALANCE( node, bal ) \
-    ( * ( size_t* ) & ( node ) -> par |= ( bal ) )
-#define LEFT_HEAVY( node ) \
-    ( ( ( size_t ) ( node ) -> par & LEFT ) != 0 )
-#define RIGHT_HEAVY( node ) \
-    ( ( ( size_t ) ( node ) -> par & RIGHT ) != 0 )
-
-#define PMASK 3
-#define BBITS( node, bal ) ( bal )
-
-#define PBITS( node ) \
-    ( ( size_t ) ( node ) -> par & PMASK )
-#define PARENT( node ) \
-    ( BSTNode* ) ( ( size_t ) ( node ) -> par & ~ ( size_t ) PMASK )
-#define SET_PARENT( node, p ) \
-    ( ( node ) -> par = ( BSTNode* ) ( ( size_t ) ( p ) | PBITS ( node ) ) )
-#define SET_PARBAL( node, p, bal ) \
-    ( ( node ) -> par = ( BSTNode* ) ( ( size_t ) ( p ) | BBITS ( node, bal ) ) )
-
-
-/* LeftMost
- *  returns the left-most child
- */
-static
-BSTNode* CC LeftMost ( BSTNode *q )
-{
-    if ( q != NULL )
-    {
-        BSTNode *p = q -> child [ 0 ];
-        while ( p != NULL )
-        {
-            q = p;
-            p = p -> child [ 0 ];
-        }
-    }
-    return q;
-}
-
-/* RightMost
- *  returns the right-most child
- */
-static
-BSTNode* CC RightMost ( BSTNode *q )
-{
-    if ( q != NULL )
-    {
-        BSTNode *p = q -> child [ 1 ];
-        while ( p != NULL )
-        {
-            q = p;
-            p = p -> child [ 1 ];
-        }
-    }
-    return q;
-}
-
-/* FirstNode
- *  the left-most node in tree
- */
-#define FirstNode( bt ) \
-    LeftMost ( ( bt ) -> root )
-
-/* LastNode
- *  the right-most node in tree
- */
-#define LastNode( bt ) \
-    RightMost ( ( bt ) -> root )
-
-/* BSTNodeNext
- *  returns next node
- */
-LIB_EXPORT BSTNode* CC BSTNodeNext ( const BSTNode *n )
-{
-    BSTNode *p;
-
-    if ( n == NULL )
-        return NULL;
-
-    p = n -> child [ 1 ];
-    if ( p == 0 )
-    {
-        BSTNode *q = ( BSTNode* ) n;
-        while ( 1 )
-        {
-            p = PARENT ( q );
-            if ( p == NULL )
-                return NULL;
-            if ( p -> child [ 0 ] == q )
-                return p;
-            q = p;
-        }
-    }
-    return LeftMost ( p );
-}
-
-/* BSTNodePrev
- *  returns prev node
- */
-LIB_EXPORT BSTNode* CC BSTNodePrev ( const BSTNode *n )
-{
-    BSTNode *p = n -> child [ 0 ];
-    if ( p == 0 )
-    {
-        BSTNode *q = ( BSTNode* ) n;
-        while ( 1 )
-        {
-            p = PARENT ( q );
-            if ( p == NULL )
-                return NULL;
-            if ( p -> child [ 1 ] == q )
-                return p;
-            q = p;
-        }
-    }
-    return RightMost ( p );
-}
-
-/* BSTNodeParent
- *  returns a parent node if there, NULL otherwise
- */
-LIB_EXPORT BSTNode* CC BSTNodeParent ( const BSTNode *n )
-{
-    if ( n != NULL )
-        return PARENT ( n );
-    return NULL;
-}
-
-/* BSTNodeFindNext
- *  find next element satisfying criteria
- */
-LIB_EXPORT BSTNode* CC BSTNodeFindNext ( const BSTNode *p,
-    bool ( CC * f ) ( const BSTNode *n ) )
-{
-    if ( p != NULL )
-    {
-        BSTNode *n = BSTNodeNext ( p );
-        while ( n != NULL )
-        {
-            if ( ( * f ) ( n ) )
-                return n;
-            n = BSTNodeNext ( n );
-        }
-    }
-    return NULL;
-}
-
-/* BSTNodeFindPrev
- *  find previous element satisfying criteria
- */
-LIB_EXPORT BSTNode* CC BSTNodeFindPrev ( const BSTNode *p,
-    bool ( CC * f ) ( const BSTNode *n ) )
-{
-    if ( p != NULL )
-    {
-        BSTNode *n = BSTNodePrev ( p );
-        while ( n != NULL )
-        {
-            if ( ( * f ) ( n ) )
-                return n;
-            n = BSTNodePrev ( n );
-        }
-    }
-    return NULL;
-}
-
-
-/*--------------------------------------------------------------------------
- * BSTree
- *  b-tree
- */
-
-/* BSTreeDepth
- *  returns number of layers in b-tree
- *
- *  if "exact" is 1, then the maximum
- *  depth is returned. otherwise, the depth of
- *  an arbitrary leaf node is returned
- */
-LIB_EXPORT uint32_t CC BSTreeDepth ( const BSTree *bt, bool exact )
-{
-    BSTNode *p;
-    uint32_t depth;
-
-    if ( bt == NULL || bt -> root == NULL )
-        return 0;
-
-    depth = 1;
-
-    if ( exact )
-    {
-        for ( p = FirstNode ( bt ); p != NULL; p = BSTNodeNext ( p ) )
-        {
-            BSTNode *q;
-            unsigned int ndepth;
-
-            if ( p -> child [ 0 ] != NULL || p -> child [ 1 ] != NULL )
-                continue;
-
-            for ( ndepth = 1, q = PARENT ( p ); q != NULL; q = PARENT ( q ) )
-                ++ ndepth;
-
-            if ( ndepth > depth )
-                depth = ndepth;
-        }
-    }
-    else
-    {
-        for ( p = bt -> root;; ++ depth )
-        {
-            if ( p -> child [ 0 ] != NULL )
-                p = p -> child [ 0 ];
-            else if ( p -> child [ 1 ] != NULL )
-                p = p -> child [ 1 ];
-            else
-                break;
-        }
-    }
-
-    return depth;
-}
-
-/* BSTreeFirst
- *  returns first node
- */
-LIB_EXPORT BSTNode* CC BSTreeFirst ( const BSTree *bt )
-{
-    if ( bt == NULL )
-        return NULL;
-    return FirstNode ( bt );
-}
-
-/* BSTreeLast
- *  returns last node
- */
-LIB_EXPORT BSTNode* CC BSTreeLast ( const BSTree *bt )
-{
-    if ( bt == NULL )
-        return NULL;
-    return LastNode ( bt );
-}
-
-/* BSTreeFind
- *  find an object within tree
- *  "cmp" function returns equivalent of "item" - "n"
- */
-LIB_EXPORT BSTNode* CC BSTreeFind ( const BSTree *bt, const void *item,
-    int64_t ( CC * cmp ) ( const void *item, const BSTNode *n ) )
-{
-    if ( bt != NULL )
-    {
-        BSTNode *n = bt -> root;
-        while ( n != NULL )
-        {
-            int64_t diff = ( * cmp ) ( item, n );
-            if ( diff == 0 )
-                return n;
-            n = n -> child [ diff > 0 ];
-        }
-    }
-    return NULL;
-}
-
-/* BSTreeInsert
- *  insert an object within tree, even if duplicate
- *  "sort" function returns equivalent of "item" - "n"
- *
- *  the treatment of order for items reported as identical
- *  i.e. sort function returns zero when they are compared,
- *  is undefined.
- *
- *  the current implementation treats '<=' as '<' such
- *  that all inserts are converted to a '<' or '>' comparison,
- *  but this should not be relied upon.
- */
-static
-BSTNode* CC RotateRightAtY ( BSTNode *y, BSTNode *x )
-{
-    BSTNode *w = x;
-    BSTNode *z = x -> child [ 1 ];
-    y -> child [ 0 ] = z;
-    x -> child [ 1 ] = y;
-    x -> par = PARENT ( y );
-    y -> par = x;
-
-    /* patch parent link */
-    if ( z != 0 )
-        SET_PARENT ( z, y );
-
-    return w;
-}
-
-static
-BSTNode* CC RotateLeftAtY ( BSTNode *y, BSTNode *x )
-{
-    BSTNode *w = x;
-    BSTNode *z = x -> child [ 0 ];
-    y -> child [ 1 ] = z;
-    x -> child [ 0 ] = y;
-    x -> par = PARENT ( y );
-    y -> par = x;
-
-    /* patch parent link */
-    if ( z != 0 )
-        SET_PARENT ( z, y );
-
-    return w;
-}
-
-static
-BSTNode* CC RotateLeftAtXRightAtY ( BSTNode *y, BSTNode *x )
-{
-    BSTNode *w = x -> child [ 1 ];
-    BSTNode *z = w -> child [ 0 ];
-    x -> child [ 1 ] = z;
-    if ( z != 0 )
-        SET_PARENT ( z, x );
-    z = w -> child [ 1 ];
-    w -> child [ 0 ] = x;
-    y -> child [ 0 ] = z;
-    w -> child [ 1 ] = y;
-        
-    switch ( BALANCE ( w ) )
-    {
-    case 0:
-        w -> par = PARENT ( y );
-        x -> par = w;
-        y -> par = w;
-        break;
-    case LEFT:
-        w -> par = PARENT ( y );
-        x -> par = w;
-        SET_PARBAL ( y, w, RIGHT );
-        break;
-    case RIGHT:
-        w -> par = PARENT ( y );
-        SET_PARBAL ( x, w, LEFT );
-        y -> par = w;
-        break;
-    }
-
-    /* patch parent link */
-    if ( z != 0 )
-        SET_PARENT ( z, y );
-
-    return w;
-}
-
-static
-BSTNode* CC RotateRightAtXLeftAtY ( BSTNode *y, BSTNode *x )
-{
-    BSTNode *w = x -> child [ 0 ];
-    BSTNode *z = w -> child [ 1 ];
-    x -> child [ 0 ] = z;
-    if ( z != 0 )
-        SET_PARENT ( z, x );
-    z = w -> child [ 0 ];
-    w -> child [ 1 ] = x;
-    y -> child [ 1 ] = z;
-    w -> child [ 0 ] = y;
-        
-    switch ( BALANCE ( w ) )
-    {
-    case 0:
-        w -> par = PARENT ( y );
-        x -> par = w;
-        y -> par = w;
-        break;
-    case LEFT:
-        w -> par = PARENT ( y );
-        SET_PARBAL ( x, w, RIGHT );
-        y -> par = w;
-        break;
-    case RIGHT:
-        w -> par = PARENT ( y );
-        x -> par = w;
-        SET_PARBAL ( y, w, LEFT );
-        break;
-    }
-
-    /* patch parent link */
-    if ( z != 0 )
-        SET_PARENT ( z, y );
-
-    return w;
-}
-
-static
-BSTNode* CC RebalanceLeft ( BSTNode *y, BSTNode *x )
-{
-    /* detect child balance */
-    if ( LEFT_HEAVY ( x ) )
-        return RotateRightAtY ( y, x );
-
-    /* child is right heavy */
-    return RotateLeftAtXRightAtY ( y, x );
-}
-
-static
-BSTNode* CC RebalanceRight ( BSTNode *y, BSTNode *x )
-{
-    /* detect child balance */
-    if ( RIGHT_HEAVY ( x ) )
-        return RotateLeftAtY ( y, x );
-
-    /* left heavy */
-    return RotateRightAtXLeftAtY ( y, x );
-}
-
-
-static
-void CC RebalanceAfterInsert ( BSTNode **root, BSTNode *y, BSTNode *x )
-{
-    BSTNode *w, *z;
-
-    /* detect left insertion */
-    if ( y -> child [ 0 ] == x )
-    {
-        /* if y was right-heavy, done */
-        if ( RIGHT_HEAVY ( y ) )
-        {
-            CLR_BALANCE ( y, RIGHT );
-            return;
-        }
-
-        /* rebalance left insertion */
-        w = RebalanceLeft ( y, x );
-    }
-
-    /* right insertion */
-    else
-    {
-        /* if y was left-heavy, done */
-        if ( LEFT_HEAVY ( y ) )
-        {
-            CLR_BALANCE ( y, LEFT );
-            return;
-        }
-
-        /* rebalance right insertion */
-        w = RebalanceRight ( y, x );
-    }
-
-    /* fix parent to child */
-    assert ( BALANCE ( w ) == 0 );
-    z = w -> par;
-    if ( z == 0 )
-        * root = w;
-    else
-        z -> child [ z -> child [ 1 ] == y ] = w;
-}
-
-LIB_EXPORT rc_t CC BSTreeInsert ( BSTree *bt, BSTNode *n,
-    int64_t ( CC * sort ) ( const BSTNode *n, const BSTNode *p ) )
-{
-    if ( bt != NULL && n != NULL )
-    {
-        int64_t diff;
-
-        BSTNode *p = bt -> root;
-        BSTNode *q = NULL;
-        BSTNode *y = NULL;
-
-        while ( p != NULL )
-        {
-            diff = ( * sort ) ( n, p );
-            q = p;
-            if ( BALANCE ( p ) != 0 )
-                y = p;
-            p = p -> child [ diff > 0 ];
-        }
-
-        n -> par = q;
-        n -> child [ 0 ] = n -> child [ 1 ] = NULL;
-
-        if ( q == NULL )
-            bt -> root = n;
-        else
-        {
-            q -> child [ diff > 0 ] = n;
-
-            /* run a trace-back */
-            for ( p = n; q != y; )
-            {
-                /* this is safe because q has 0 balance */
-                BSTNode *z = q -> par;
-                if ( q -> child [ 0 ] == p )
-                    SET_BALANCE ( q, LEFT );
-                else
-                    SET_BALANCE ( q, RIGHT );
-
-                p = q;
-                q = z;
-            }
-
-            /* rebalance */
-            if ( q != NULL )
-                RebalanceAfterInsert ( & bt -> root, q, p );
-        }
-    }
-
-    /* never fails in this implementation */
-    return 0;
-}
-
-/* BSTreeInsertUnique
- *  insert an object within tree, but only if unique
- *  "sort" function returns equivalent of "item" - "n"
- *  returns non-NULL "n" upon match or NULL on success
- */
-LIB_EXPORT rc_t CC BSTreeInsertUnique ( BSTree *bt, BSTNode *n, BSTNode **exist,
-    int64_t ( CC * sort ) ( const BSTNode *n, const BSTNode *p ) )
-{
-    if ( bt != NULL && n != NULL )
-    {
-        int64_t diff;
-
-        BSTNode *p = bt -> root;
-        BSTNode *q = NULL;
-        BSTNode *y = NULL;
-
-        while ( p != NULL )
-        {
-            diff = ( * sort ) ( n, p );
-
-            if ( diff == 0 )
-            {
-                /* fail to insert */
-                if ( exist != NULL )
-                    * exist = p;
-                return SILENT_RC ( rcCont, rcTree, rcInserting, rcNode, rcExists );
-            }
-
-            q = p;
-            if ( BALANCE ( p ) != 0 )
-                y = p;
-            p = p -> child [ diff > 0 ];
-        }
-
-        n -> par = q;
-        n -> child [ 0 ] = n -> child [ 1 ] = NULL;
-
-        if ( q == NULL )
-            bt -> root = n;
-        else
-        {
-            q -> child [ diff > 0 ] = n;
-
-            /* run a trace-back */
-            for ( p = n; q != y; )
-            {
-                /* this is safe because q has 0 balance */
-                BSTNode *z = q -> par;
-                if ( q -> child [ 0 ] == p )
-                    SET_BALANCE ( q, LEFT );
-                else
-                    SET_BALANCE ( q, RIGHT );
-
-                p = q;
-                q = z;
-            }
-
-            /* rebalance */
-            if ( q != NULL )
-                RebalanceAfterInsert ( & bt -> root, q, p );
-        }
-    }
-
-    /* only fails on existing item in this implementation */
-    return 0;
-}
-
-/* BSTreeResort
- *  an optimized removal and re-insertion of
- *  all contained elements using another function
- *
- *  the treatment of order for items reported as identical
- *  i.e. sort function returns zero when they are compared,
- *  is undefined.
- *
- *  the current implementation treats '<=' as '<' such
- *  that all inserts are converted to a '<' or '>' comparison,
- *  but this should not be relied upon.
- */
-LIB_EXPORT void CC BSTreeResort ( BSTree *bt,
-    int64_t ( CC * resort ) ( const BSTNode *item, const BSTNode *n ) )
-{
-    if ( bt != NULL )
-    {
-        BSTNode *p = bt -> root;
-        bt -> root = NULL;
-
-        while ( p != NULL )
-        {
-            BSTNode *q = p -> child [ 0 ];
-            if ( q == 0 )
-            {
-                q = p -> child [ 1 ];
-                BSTreeInsert ( bt, p, resort );
-            }
-            else
-            {
-                p -> child [ 0 ] = q -> child [ 1 ];
-                q -> child [ 1 ] = p;
-            }
-            p = q;
-        }
-    }
-}
-
-/* BSTreeUnlink
- *  removes a node from tree
- */
-static
-void CC RebalanceAfterUnlink ( BSTNode **root, BSTNode *q, int dir )
-{
-    while ( q != 0 )
-    {
-        BSTNode *w, *x, *y = q;
-        q = PARENT ( q );
-
-        if ( ! dir )
-        {
-            if ( q && q -> child [ 1 ] == y )
-                dir = 1;
-
-            /* simulate an increment of balance */
-            switch ( BALANCE ( y ) )
-            {
-            case 0:
-                SET_BALANCE ( y, RIGHT );
-                return;
-            case LEFT:
-                CLR_BALANCE ( y, LEFT );
-                break;
-            case RIGHT:
-                /* y has just become ++ */
-                x = y -> child [ 1 ];
-                if ( LEFT_HEAVY ( x ) )
-                {
-                    w = RotateRightAtXLeftAtY ( y, x );
-                    if ( q == 0 )
-                        * root = w;
-                    else
-                        q -> child [ dir ] = w;
-                }
-                else
-                {
-                    w = y -> child [ 1 ] = x -> child [ 0 ];
-                    x -> child [ 0 ] = y;
-                    SET_PARENT ( x, q );
-                    SET_PARENT ( y, x );
-                    if ( w != 0 )
-                        SET_PARENT ( w, y );
-                    if ( q == 0 )
-                        * root = x;
-                    else
-                        q -> child [ dir ] = x;
-                    if ( BALANCE ( x ) == 0 )
-                    {
-                        SET_BALANCE ( x, LEFT );
-                        SET_PARBAL ( y, x, RIGHT );
-                        return;
-                    }
-                    ZERO_BALANCE ( x );
-                    ZERO_BALANCE ( y );
-                    /* y = x; */
-                }
-                break;
-            }
-        }
-
-        /* symmetric case */
-        else
-        {
-            if ( q && q -> child [ 0 ] == y )
-                dir = 0;
-
-            switch ( BALANCE ( y ) )
-            {
-            case 0:
-                SET_BALANCE ( y, LEFT );
-                return;
-            case LEFT:
-                /* y has just become -- */
-                x = y -> child [ 0 ];
-                if ( RIGHT_HEAVY ( x ) )
-                {
-                    w = RotateLeftAtXRightAtY ( y, x );
-                    if ( q == 0 )
-                        * root = w;
-                    else
-                        q -> child [ dir ] = w;
-                }
-                else
-                {
-                    w = x -> child [ 1 ];
-                    y -> child [ 0 ] = w;
-                    x -> child [ 1 ] = y;
-                    SET_PARENT ( x, q );
-                    SET_PARENT ( y, x );
-                    if ( w != 0 )
-                        SET_PARENT ( w, y );
-                    if ( q == 0 )
-                        * root = x;
-                    else
-                        q -> child [ dir ] = x;
-                    if ( BALANCE ( x ) == 0 )
-                    {
-                        SET_BALANCE ( x, RIGHT );
-                        SET_PARBAL ( y, x, LEFT );
-                        return;
-                    }
-                    ZERO_BALANCE ( x );
-                    ZERO_BALANCE ( y );
-                    /* y = x; */
-                }
-                break;
-            case RIGHT:
-                CLR_BALANCE ( y, RIGHT );
-                break;
-            }
-        }
-    }
-}
-
-static
-void CC BTUnlink ( BSTNode **root, BSTNode *p, int dir )
-{
-    BSTNode *q = PARENT ( p );
-    BSTNode *l, *r = p -> child [ 1 ];
-    if ( r == 0 )
-    {
-      /* no right child - simple unlink */
-        l = p -> child [ 0 ];
-        if ( q == 0 )
-            * root = l;
-        else
-            q -> child [ dir ] = l;
-        if ( l != 0 )
-            SET_PARENT ( l, q );
-    }
-    else
-    {
-      /* have a right child - check its left */
-        l = r -> child [ 0 ];
-        if ( l == 0 )
-        {
-            l = p -> child [ 0 ];
-            r -> child [ 0 ] = l;
-
-            /* take not only p's parent ( q )
-            // but its balance as well */
-            r -> par = p -> par;
-
-            if ( q == 0 )
-                * root = r;
-            else
-                q -> child [ dir ] = r;
-
-            if ( l != 0 )
-                SET_PARENT ( l, r );
-
-            /* artificially reset for following */
-            q = r;
-            dir = 1;
-        }
-
-        /* involves some work */
-        else
-        {
-	  /* find smallest subsequent item */
-            r = l -> child [ 0 ];
-            while ( r != 0 )
-            {
-                l = r;
-                r = l -> child [ 0 ];
-            }
-
-            /* unlink it */
-            r = PARENT ( l );
-            r -> child [ 0 ] = l -> child [ 1 ];
-
-            /* take over doomed node */
-            l -> child [ 0 ] = p -> child [ 0 ];
-            l -> child [ 1 ] = p -> child [ 1 ];
-
-            /* take not only p's parent ( q )
-            // but its balance as well */
-            l -> par = p -> par;
-
-            /* new king pin */
-            if ( q == 0 )
-                * root = l;
-            else
-                q -> child [ dir ] = l;
-
-            /* update parent links */
-            q = l -> child [ 0 ];
-            if ( q != 0 )
-                SET_PARENT ( q, l );
-            q = l -> child [ 1 ];
-            SET_PARENT ( q, l );
-            q = r -> child [ 0 ];
-            if ( q != 0 )
-                SET_PARENT ( q, r );
-
-            q = r;
-            dir = 0;
-        }
-    }
-
-    /* now - rebalance what we've undone */
-    if ( q != 0 )
-        RebalanceAfterUnlink ( root, q, dir );
-}
-
-static
-bool CC BSTreeContains ( const BSTNode *root, const BSTNode *n )
-{
-    while ( n != NULL )
-    {
-        if ( n == root )
-            return true;
-        n = PARENT ( n );
-    }
-    return false;
-}
-
-LIB_EXPORT bool CC BSTreeUnlink ( BSTree *bt, BSTNode *n )
-{
-    if ( bt != NULL && BSTreeContains ( bt -> root, n ) )
-    {
-        int dir = 0;
-        BSTNode *q = PARENT ( n );
-        if ( q != 0 )
-        {
-            assert ( q -> child [ 0 ] == n || q -> child [ 1 ] == n );
-            dir = q -> child [ 1 ] == n;
-        }
-        BTUnlink ( & bt -> root, n, ( int ) dir );
-        return true;
-    }
-    return false;
-}
-
-/* BSTreeForEach
- *  executes a function on each tree element
- */
-LIB_EXPORT void CC BSTreeForEach ( const BSTree *bt, bool reverse,
-    void ( CC * f ) ( BSTNode *n, void *data ), void *data )
-{
-    if ( bt != NULL )
-    {
-        BSTNode *n, *next;
-        if ( reverse )
-        {
-            n = LastNode ( bt );
-            while ( n != NULL )
-            {
-                next = BSTNodePrev ( n );
-                ( * f ) ( n, data );
-                n = next;
-            }
-        }
-        else
-        {
-            n = FirstNode ( bt );
-            while ( n != NULL )
-            {
-                next = BSTNodeNext ( n );
-                ( * f ) ( n, data );
-                n = next;
-            }
-        }
-    }
-}
-
-/* BSTreeDoUntil
- *  executes a function on each element
- *  until the function returns 1
- */
-LIB_EXPORT bool CC BSTreeDoUntil ( const BSTree *bt, bool reverse,
-    bool ( CC * f ) ( BSTNode *n, void *data ), void *data )
-{
-    if ( bt != NULL )
-    {
-        BSTNode *n, *next;
-        if ( reverse )
-        {
-            n = LastNode ( bt );
-            while ( n != NULL )
-            {
-                next = BSTNodePrev ( n );
-                if ( ( * f ) ( n, data ) )
-                    return true;
-                n = next;
-            }
-        }
-        else
-        {
-            n = FirstNode ( bt );
-            while ( n != NULL )
-            {
-                next = BSTNodeNext ( n );
-                if ( ( * f ) ( n, data ) )
-                    return true;
-                n = next;
-            }
-        }
-    }
-    return false;
-}
-
-/* BSTreeWhack
- *  removes nodes from tree and
- *  executes a user provided destructor
- */
-LIB_EXPORT void CC BSTreeWhack ( BSTree *bt,
-    void ( CC * whack ) ( BSTNode *n, void *data ), void *data )
-{
-    if ( bt != NULL )
-    {
-        BSTNode *p = bt -> root;
-        bt -> root = NULL;
-
-        if ( whack != NULL )
-        {
-            while ( p != NULL )
-            {
-                BSTNode *q = p -> child [ 0 ];
-                if ( q == 0 )
-                {
-                    q = p -> child [ 1 ];
-                    ( * whack ) ( p, data );
-                }
-                else
-                {
-                    p -> child [ 0 ] = q -> child [ 1 ];
-                    q -> child [ 1 ] = p;
-                }
-                p = q;
-            }
-        }
-    }
-}
diff --git a/libs/klib/cp1252.c b/libs/klib/cp1252.c
deleted file mode 100644
index 21734d9..0000000
--- a/libs/klib/cp1252.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <sysalloc.h>
-#include <stdint.h>
-
-LIB_EXPORT const uint32_t cp1252 [ 128 ] =
-{
-    /*0x80   0x81   0x82   0x83   0x84   0x85   0x86   0x87*/
-    0x20AC,0x0000,0x201A,0x0192,0x201E,0x201E,0x201E,0x201E,
-    /*0x88   0x89   0x8A   0x8B   0x8C   0x8D   0x8E   0x8F*/
-    0x201E,0x201E,0x201E,0x201E,0x201E,0x0000,0x201E,0x0000,
-    /*0x90   0x91   0x92   0x93   0x94   0x95   0x96   0x97*/
-    0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
-    /*0x98   0x99   0x9A   0x9B   0x9C   0x9D   0x9E   0x9F*/
-    0x02DC,0x2122,0x0161,0x203A,0x0153,0x0000,0x017E,0x0178,
-    /*0xA0   0xA1   0xA2   0xA3   0xA4   0xA5   0xA6   0xA7*/
-    0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
-    /*0xA8   0xA9   0xAA   0xAB   0xAC   0xAD   0xAE   0xAF*/
-    0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
-    /*0xB0   0xB1   0xB2   0xB3   0xB4   0xB5   0xB6   0xB7*/
-    0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
-    /*0xB8   0xB9   0xBA   0xBB   0xBC   0xBD   0xBE   0xBF*/
-    0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,
-    /*0xC0   0xC1   0xC2   0xC3   0xC4   0xC5   0xC6   0xC7*/
-    0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,
-    /*0xC8   0xC9   0xCA   0xCB   0xCC   0xCD   0xCE   0xCF*/
-    0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,
-    /*0xD0   0xD1   0xD2   0xD3   0xD4   0xD5   0xD6   0xD7*/
-    0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,
-    /*0xD8   0xD9   0xDA   0xDB   0xDC   0xDD   0xDE   0xDF*/
-    0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,
-    /*0xE0   0xE1   0xE2   0xE3   0xE4   0xE5   0xE6   0xE7*/
-    0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,
-    /*0xE8   0xE9   0xEA   0xEB   0xEC   0xED   0xEE   0xEF*/
-    0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,
-    /*0xF0   0xF1   0xF2   0xF3   0xF4   0xF5   0xF6   0xF7*/
-    0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,
-    /*0xF8   0xF9   0xFA   0xFB   0xFC   0xFD   0xFE   0xFF*/
-    0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF
-};
diff --git a/libs/klib/crc32.c b/libs/klib/crc32.c
deleted file mode 100644
index bd0f2d6..0000000
--- a/libs/klib/crc32.c
+++ /dev/null
@@ -1,500 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/checksum.h>
-#include <byteswap.h>
-
-#include <sysalloc.h>
-
-#define SLOW_CRC 0
-
-#if SLOW_CRC == 1
-/*--------------------------------------------------------------------------
- * CRC32
- */
-static
-uint32_t sCRC32_tbl [ 256 ];
-
-/* CRC32Init
- *  initializes table
- *  IDEMPOTENT
- */
-LIB_EXPORT void CC CRC32Init ( void )
-{
-    static int beenHere = 0;
-    if ( ! beenHere )
-    {
-        int i, j;
-        int32_t kPoly32 = 0x04C11DB7;
-        
-        for ( i = 0; i < 256; ++ i )
-        {
-            int32_t byteCRC = i << 24;
-            for ( j = 0; j < 8; ++ j )
-            {
-                if ( byteCRC < 0 )
-                    byteCRC = ( byteCRC << 1 ) ^ kPoly32;
-                else
-                    byteCRC <<= 1;
-            }
-            sCRC32_tbl [ i ] = byteCRC;
-        }
-
-        beenHere = 1;
-    }
-}
-
-/* CRC32
- *  runs checksum on arbitrary data, returning result
- *  initial checksum to be passed in is 0
- *  subsequent checksums should be return from prior invocation
- */
-LIB_EXPORT uint32_t CC CRC32 ( uint32_t checksum, const void *data, size_t size )
-{
-    size_t j;
-
-#define str ( ( const unsigned char* ) data )
-
-    if ( sCRC32_tbl [ 0 ] == sCRC32_tbl [ 1 ] )
-        CRC32Init();
-
-    for ( j = 0; j < size; ++ j )
-    {
-        uint32_t i = ( checksum >> 24 ) ^ str [ j ];
-        checksum <<= 8;
-        checksum ^= sCRC32_tbl [ i ];
-    }
-    return checksum;
-    
-#undef str
-}
-
-#else /* SLOW_CRC != 1*/
-/* -------  experimenting with slicing ------------*/
-
-uint32_t const sCRC32_tbl_[8][256] =
-{
-	{
-		0x00000000,0x04C11DB7,0x09823B6E,0x0D4326D9,0x130476DC,0x17C56B6B,0x1A864DB2,0x1E475005,
-		0x2608EDB8,0x22C9F00F,0x2F8AD6D6,0x2B4BCB61,0x350C9B64,0x31CD86D3,0x3C8EA00A,0x384FBDBD,
-		0x4C11DB70,0x48D0C6C7,0x4593E01E,0x4152FDA9,0x5F15ADAC,0x5BD4B01B,0x569796C2,0x52568B75,
-		0x6A1936C8,0x6ED82B7F,0x639B0DA6,0x675A1011,0x791D4014,0x7DDC5DA3,0x709F7B7A,0x745E66CD,
-		0x9823B6E0,0x9CE2AB57,0x91A18D8E,0x95609039,0x8B27C03C,0x8FE6DD8B,0x82A5FB52,0x8664E6E5,
-		0xBE2B5B58,0xBAEA46EF,0xB7A96036,0xB3687D81,0xAD2F2D84,0xA9EE3033,0xA4AD16EA,0xA06C0B5D,
-		0xD4326D90,0xD0F37027,0xDDB056FE,0xD9714B49,0xC7361B4C,0xC3F706FB,0xCEB42022,0xCA753D95,
-		0xF23A8028,0xF6FB9D9F,0xFBB8BB46,0xFF79A6F1,0xE13EF6F4,0xE5FFEB43,0xE8BCCD9A,0xEC7DD02D,
-		0x34867077,0x30476DC0,0x3D044B19,0x39C556AE,0x278206AB,0x23431B1C,0x2E003DC5,0x2AC12072,
-		0x128E9DCF,0x164F8078,0x1B0CA6A1,0x1FCDBB16,0x018AEB13,0x054BF6A4,0x0808D07D,0x0CC9CDCA,
-		0x7897AB07,0x7C56B6B0,0x71159069,0x75D48DDE,0x6B93DDDB,0x6F52C06C,0x6211E6B5,0x66D0FB02,
-		0x5E9F46BF,0x5A5E5B08,0x571D7DD1,0x53DC6066,0x4D9B3063,0x495A2DD4,0x44190B0D,0x40D816BA,
-		0xACA5C697,0xA864DB20,0xA527FDF9,0xA1E6E04E,0xBFA1B04B,0xBB60ADFC,0xB6238B25,0xB2E29692,
-		0x8AAD2B2F,0x8E6C3698,0x832F1041,0x87EE0DF6,0x99A95DF3,0x9D684044,0x902B669D,0x94EA7B2A,
-		0xE0B41DE7,0xE4750050,0xE9362689,0xEDF73B3E,0xF3B06B3B,0xF771768C,0xFA325055,0xFEF34DE2,
-		0xC6BCF05F,0xC27DEDE8,0xCF3ECB31,0xCBFFD686,0xD5B88683,0xD1799B34,0xDC3ABDED,0xD8FBA05A,
-		0x690CE0EE,0x6DCDFD59,0x608EDB80,0x644FC637,0x7A089632,0x7EC98B85,0x738AAD5C,0x774BB0EB,
-		0x4F040D56,0x4BC510E1,0x46863638,0x42472B8F,0x5C007B8A,0x58C1663D,0x558240E4,0x51435D53,
-		0x251D3B9E,0x21DC2629,0x2C9F00F0,0x285E1D47,0x36194D42,0x32D850F5,0x3F9B762C,0x3B5A6B9B,
-		0x0315D626,0x07D4CB91,0x0A97ED48,0x0E56F0FF,0x1011A0FA,0x14D0BD4D,0x19939B94,0x1D528623,
-		0xF12F560E,0xF5EE4BB9,0xF8AD6D60,0xFC6C70D7,0xE22B20D2,0xE6EA3D65,0xEBA91BBC,0xEF68060B,
-		0xD727BBB6,0xD3E6A601,0xDEA580D8,0xDA649D6F,0xC423CD6A,0xC0E2D0DD,0xCDA1F604,0xC960EBB3,
-		0xBD3E8D7E,0xB9FF90C9,0xB4BCB610,0xB07DABA7,0xAE3AFBA2,0xAAFBE615,0xA7B8C0CC,0xA379DD7B,
-		0x9B3660C6,0x9FF77D71,0x92B45BA8,0x9675461F,0x8832161A,0x8CF30BAD,0x81B02D74,0x857130C3,
-		0x5D8A9099,0x594B8D2E,0x5408ABF7,0x50C9B640,0x4E8EE645,0x4A4FFBF2,0x470CDD2B,0x43CDC09C,
-		0x7B827D21,0x7F436096,0x7200464F,0x76C15BF8,0x68860BFD,0x6C47164A,0x61043093,0x65C52D24,
-		0x119B4BE9,0x155A565E,0x18197087,0x1CD86D30,0x029F3D35,0x065E2082,0x0B1D065B,0x0FDC1BEC,
-		0x3793A651,0x3352BBE6,0x3E119D3F,0x3AD08088,0x2497D08D,0x2056CD3A,0x2D15EBE3,0x29D4F654,
-		0xC5A92679,0xC1683BCE,0xCC2B1D17,0xC8EA00A0,0xD6AD50A5,0xD26C4D12,0xDF2F6BCB,0xDBEE767C,
-		0xE3A1CBC1,0xE760D676,0xEA23F0AF,0xEEE2ED18,0xF0A5BD1D,0xF464A0AA,0xF9278673,0xFDE69BC4,
-		0x89B8FD09,0x8D79E0BE,0x803AC667,0x84FBDBD0,0x9ABC8BD5,0x9E7D9662,0x933EB0BB,0x97FFAD0C,
-		0xAFB010B1,0xAB710D06,0xA6322BDF,0xA2F33668,0xBCB4666D,0xB8757BDA,0xB5365D03,0xB1F740B4
-	},
-	{
-		0x00000000,0xD219C1DC,0xA0F29E0F,0x72EB5FD3,0x452421A9,0x973DE075,0xE5D6BFA6,0x37CF7E7A,
-		0x8A484352,0x5851828E,0x2ABADD5D,0xF8A31C81,0xCF6C62FB,0x1D75A327,0x6F9EFCF4,0xBD873D28,
-		0x10519B13,0xC2485ACF,0xB0A3051C,0x62BAC4C0,0x5575BABA,0x876C7B66,0xF58724B5,0x279EE569,
-		0x9A19D841,0x4800199D,0x3AEB464E,0xE8F28792,0xDF3DF9E8,0x0D243834,0x7FCF67E7,0xADD6A63B,
-		0x20A33626,0xF2BAF7FA,0x8051A829,0x524869F5,0x6587178F,0xB79ED653,0xC5758980,0x176C485C,
-		0xAAEB7574,0x78F2B4A8,0x0A19EB7B,0xD8002AA7,0xEFCF54DD,0x3DD69501,0x4F3DCAD2,0x9D240B0E,
-		0x30F2AD35,0xE2EB6CE9,0x9000333A,0x4219F2E6,0x75D68C9C,0xA7CF4D40,0xD5241293,0x073DD34F,
-		0xBABAEE67,0x68A32FBB,0x1A487068,0xC851B1B4,0xFF9ECFCE,0x2D870E12,0x5F6C51C1,0x8D75901D,
-		0x41466C4C,0x935FAD90,0xE1B4F243,0x33AD339F,0x04624DE5,0xD67B8C39,0xA490D3EA,0x76891236,
-		0xCB0E2F1E,0x1917EEC2,0x6BFCB111,0xB9E570CD,0x8E2A0EB7,0x5C33CF6B,0x2ED890B8,0xFCC15164,
-		0x5117F75F,0x830E3683,0xF1E56950,0x23FCA88C,0x1433D6F6,0xC62A172A,0xB4C148F9,0x66D88925,
-		0xDB5FB40D,0x094675D1,0x7BAD2A02,0xA9B4EBDE,0x9E7B95A4,0x4C625478,0x3E890BAB,0xEC90CA77,
-		0x61E55A6A,0xB3FC9BB6,0xC117C465,0x130E05B9,0x24C17BC3,0xF6D8BA1F,0x8433E5CC,0x562A2410,
-		0xEBAD1938,0x39B4D8E4,0x4B5F8737,0x994646EB,0xAE893891,0x7C90F94D,0x0E7BA69E,0xDC626742,
-		0x71B4C179,0xA3AD00A5,0xD1465F76,0x035F9EAA,0x3490E0D0,0xE689210C,0x94627EDF,0x467BBF03,
-		0xFBFC822B,0x29E543F7,0x5B0E1C24,0x8917DDF8,0xBED8A382,0x6CC1625E,0x1E2A3D8D,0xCC33FC51,
-		0x828CD898,0x50951944,0x227E4697,0xF067874B,0xC7A8F931,0x15B138ED,0x675A673E,0xB543A6E2,
-		0x08C49BCA,0xDADD5A16,0xA83605C5,0x7A2FC419,0x4DE0BA63,0x9FF97BBF,0xED12246C,0x3F0BE5B0,
-		0x92DD438B,0x40C48257,0x322FDD84,0xE0361C58,0xD7F96222,0x05E0A3FE,0x770BFC2D,0xA5123DF1,
-		0x189500D9,0xCA8CC105,0xB8679ED6,0x6A7E5F0A,0x5DB12170,0x8FA8E0AC,0xFD43BF7F,0x2F5A7EA3,
-		0xA22FEEBE,0x70362F62,0x02DD70B1,0xD0C4B16D,0xE70BCF17,0x35120ECB,0x47F95118,0x95E090C4,
-		0x2867ADEC,0xFA7E6C30,0x889533E3,0x5A8CF23F,0x6D438C45,0xBF5A4D99,0xCDB1124A,0x1FA8D396,
-		0xB27E75AD,0x6067B471,0x128CEBA2,0xC0952A7E,0xF75A5404,0x254395D8,0x57A8CA0B,0x85B10BD7,
-		0x383636FF,0xEA2FF723,0x98C4A8F0,0x4ADD692C,0x7D121756,0xAF0BD68A,0xDDE08959,0x0FF94885,
-		0xC3CAB4D4,0x11D37508,0x63382ADB,0xB121EB07,0x86EE957D,0x54F754A1,0x261C0B72,0xF405CAAE,
-		0x4982F786,0x9B9B365A,0xE9706989,0x3B69A855,0x0CA6D62F,0xDEBF17F3,0xAC544820,0x7E4D89FC,
-		0xD39B2FC7,0x0182EE1B,0x7369B1C8,0xA1707014,0x96BF0E6E,0x44A6CFB2,0x364D9061,0xE45451BD,
-		0x59D36C95,0x8BCAAD49,0xF921F29A,0x2B383346,0x1CF74D3C,0xCEEE8CE0,0xBC05D333,0x6E1C12EF,
-		0xE36982F2,0x3170432E,0x439B1CFD,0x9182DD21,0xA64DA35B,0x74546287,0x06BF3D54,0xD4A6FC88,
-		0x6921C1A0,0xBB38007C,0xC9D35FAF,0x1BCA9E73,0x2C05E009,0xFE1C21D5,0x8CF77E06,0x5EEEBFDA,
-		0xF33819E1,0x2121D83D,0x53CA87EE,0x81D34632,0xB61C3848,0x6405F994,0x16EEA647,0xC4F7679B,
-		0x79705AB3,0xAB699B6F,0xD982C4BC,0x0B9B0560,0x3C547B1A,0xEE4DBAC6,0x9CA6E515,0x4EBF24C9
-	},
-	{
-		0x00000000,0x01D8AC87,0x03B1590E,0x0269F589,0x0762B21C,0x06BA1E9B,0x04D3EB12,0x050B4795,
-		0x0EC56438,0x0F1DC8BF,0x0D743D36,0x0CAC91B1,0x09A7D624,0x087F7AA3,0x0A168F2A,0x0BCE23AD,
-		0x1D8AC870,0x1C5264F7,0x1E3B917E,0x1FE33DF9,0x1AE87A6C,0x1B30D6EB,0x19592362,0x18818FE5,
-		0x134FAC48,0x129700CF,0x10FEF546,0x112659C1,0x142D1E54,0x15F5B2D3,0x179C475A,0x1644EBDD,
-		0x3B1590E0,0x3ACD3C67,0x38A4C9EE,0x397C6569,0x3C7722FC,0x3DAF8E7B,0x3FC67BF2,0x3E1ED775,
-		0x35D0F4D8,0x3408585F,0x3661ADD6,0x37B90151,0x32B246C4,0x336AEA43,0x31031FCA,0x30DBB34D,
-		0x269F5890,0x2747F417,0x252E019E,0x24F6AD19,0x21FDEA8C,0x2025460B,0x224CB382,0x23941F05,
-		0x285A3CA8,0x2982902F,0x2BEB65A6,0x2A33C921,0x2F388EB4,0x2EE02233,0x2C89D7BA,0x2D517B3D,
-		0x762B21C0,0x77F38D47,0x759A78CE,0x7442D449,0x714993DC,0x70913F5B,0x72F8CAD2,0x73206655,
-		0x78EE45F8,0x7936E97F,0x7B5F1CF6,0x7A87B071,0x7F8CF7E4,0x7E545B63,0x7C3DAEEA,0x7DE5026D,
-		0x6BA1E9B0,0x6A794537,0x6810B0BE,0x69C81C39,0x6CC35BAC,0x6D1BF72B,0x6F7202A2,0x6EAAAE25,
-		0x65648D88,0x64BC210F,0x66D5D486,0x670D7801,0x62063F94,0x63DE9313,0x61B7669A,0x606FCA1D,
-		0x4D3EB120,0x4CE61DA7,0x4E8FE82E,0x4F5744A9,0x4A5C033C,0x4B84AFBB,0x49ED5A32,0x4835F6B5,
-		0x43FBD518,0x4223799F,0x404A8C16,0x41922091,0x44996704,0x4541CB83,0x47283E0A,0x46F0928D,
-		0x50B47950,0x516CD5D7,0x5305205E,0x52DD8CD9,0x57D6CB4C,0x560E67CB,0x54679242,0x55BF3EC5,
-		0x5E711D68,0x5FA9B1EF,0x5DC04466,0x5C18E8E1,0x5913AF74,0x58CB03F3,0x5AA2F67A,0x5B7A5AFD,
-		0xEC564380,0xED8EEF07,0xEFE71A8E,0xEE3FB609,0xEB34F19C,0xEAEC5D1B,0xE885A892,0xE95D0415,
-		0xE29327B8,0xE34B8B3F,0xE1227EB6,0xE0FAD231,0xE5F195A4,0xE4293923,0xE640CCAA,0xE798602D,
-		0xF1DC8BF0,0xF0042777,0xF26DD2FE,0xF3B57E79,0xF6BE39EC,0xF766956B,0xF50F60E2,0xF4D7CC65,
-		0xFF19EFC8,0xFEC1434F,0xFCA8B6C6,0xFD701A41,0xF87B5DD4,0xF9A3F153,0xFBCA04DA,0xFA12A85D,
-		0xD743D360,0xD69B7FE7,0xD4F28A6E,0xD52A26E9,0xD021617C,0xD1F9CDFB,0xD3903872,0xD24894F5,
-		0xD986B758,0xD85E1BDF,0xDA37EE56,0xDBEF42D1,0xDEE40544,0xDF3CA9C3,0xDD555C4A,0xDC8DF0CD,
-		0xCAC91B10,0xCB11B797,0xC978421E,0xC8A0EE99,0xCDABA90C,0xCC73058B,0xCE1AF002,0xCFC25C85,
-		0xC40C7F28,0xC5D4D3AF,0xC7BD2626,0xC6658AA1,0xC36ECD34,0xC2B661B3,0xC0DF943A,0xC10738BD,
-		0x9A7D6240,0x9BA5CEC7,0x99CC3B4E,0x981497C9,0x9D1FD05C,0x9CC77CDB,0x9EAE8952,0x9F7625D5,
-		0x94B80678,0x9560AAFF,0x97095F76,0x96D1F3F1,0x93DAB464,0x920218E3,0x906BED6A,0x91B341ED,
-		0x87F7AA30,0x862F06B7,0x8446F33E,0x859E5FB9,0x8095182C,0x814DB4AB,0x83244122,0x82FCEDA5,
-		0x8932CE08,0x88EA628F,0x8A839706,0x8B5B3B81,0x8E507C14,0x8F88D093,0x8DE1251A,0x8C39899D,
-		0xA168F2A0,0xA0B05E27,0xA2D9ABAE,0xA3010729,0xA60A40BC,0xA7D2EC3B,0xA5BB19B2,0xA463B535,
-		0xAFAD9698,0xAE753A1F,0xAC1CCF96,0xADC46311,0xA8CF2484,0xA9178803,0xAB7E7D8A,0xAAA6D10D,
-		0xBCE23AD0,0xBD3A9657,0xBF5363DE,0xBE8BCF59,0xBB8088CC,0xBA58244B,0xB831D1C2,0xB9E97D45,
-		0xB2275EE8,0xB3FFF26F,0xB19607E6,0xB04EAB61,0xB545ECF4,0xB49D4073,0xB6F4B5FA,0xB72C197D
-	},
-	{
-		0x00000000,0xDC6D9AB7,0xBC1A28D9,0x6077B26E,0x7CF54C05,0xA098D6B2,0xC0EF64DC,0x1C82FE6B,
-		0xF9EA980A,0x258702BD,0x45F0B0D3,0x999D2A64,0x851FD40F,0x59724EB8,0x3905FCD6,0xE5686661,
-		0xF7142DA3,0x2B79B714,0x4B0E057A,0x97639FCD,0x8BE161A6,0x578CFB11,0x37FB497F,0xEB96D3C8,
-		0x0EFEB5A9,0xD2932F1E,0xB2E49D70,0x6E8907C7,0x720BF9AC,0xAE66631B,0xCE11D175,0x127C4BC2,
-		0xEAE946F1,0x3684DC46,0x56F36E28,0x8A9EF49F,0x961C0AF4,0x4A719043,0x2A06222D,0xF66BB89A,
-		0x1303DEFB,0xCF6E444C,0xAF19F622,0x73746C95,0x6FF692FE,0xB39B0849,0xD3ECBA27,0x0F812090,
-		0x1DFD6B52,0xC190F1E5,0xA1E7438B,0x7D8AD93C,0x61082757,0xBD65BDE0,0xDD120F8E,0x017F9539,
-		0xE417F358,0x387A69EF,0x580DDB81,0x84604136,0x98E2BF5D,0x448F25EA,0x24F89784,0xF8950D33,
-		0xD1139055,0x0D7E0AE2,0x6D09B88C,0xB164223B,0xADE6DC50,0x718B46E7,0x11FCF489,0xCD916E3E,
-		0x28F9085F,0xF49492E8,0x94E32086,0x488EBA31,0x540C445A,0x8861DEED,0xE8166C83,0x347BF634,
-		0x2607BDF6,0xFA6A2741,0x9A1D952F,0x46700F98,0x5AF2F1F3,0x869F6B44,0xE6E8D92A,0x3A85439D,
-		0xDFED25FC,0x0380BF4B,0x63F70D25,0xBF9A9792,0xA31869F9,0x7F75F34E,0x1F024120,0xC36FDB97,
-		0x3BFAD6A4,0xE7974C13,0x87E0FE7D,0x5B8D64CA,0x470F9AA1,0x9B620016,0xFB15B278,0x277828CF,
-		0xC2104EAE,0x1E7DD419,0x7E0A6677,0xA267FCC0,0xBEE502AB,0x6288981C,0x02FF2A72,0xDE92B0C5,
-		0xCCEEFB07,0x108361B0,0x70F4D3DE,0xAC994969,0xB01BB702,0x6C762DB5,0x0C019FDB,0xD06C056C,
-		0x3504630D,0xE969F9BA,0x891E4BD4,0x5573D163,0x49F12F08,0x959CB5BF,0xF5EB07D1,0x29869D66,
-		0xA6E63D1D,0x7A8BA7AA,0x1AFC15C4,0xC6918F73,0xDA137118,0x067EEBAF,0x660959C1,0xBA64C376,
-		0x5F0CA517,0x83613FA0,0xE3168DCE,0x3F7B1779,0x23F9E912,0xFF9473A5,0x9FE3C1CB,0x438E5B7C,
-		0x51F210BE,0x8D9F8A09,0xEDE83867,0x3185A2D0,0x2D075CBB,0xF16AC60C,0x911D7462,0x4D70EED5,
-		0xA81888B4,0x74751203,0x1402A06D,0xC86F3ADA,0xD4EDC4B1,0x08805E06,0x68F7EC68,0xB49A76DF,
-		0x4C0F7BEC,0x9062E15B,0xF0155335,0x2C78C982,0x30FA37E9,0xEC97AD5E,0x8CE01F30,0x508D8587,
-		0xB5E5E3E6,0x69887951,0x09FFCB3F,0xD5925188,0xC910AFE3,0x157D3554,0x750A873A,0xA9671D8D,
-		0xBB1B564F,0x6776CCF8,0x07017E96,0xDB6CE421,0xC7EE1A4A,0x1B8380FD,0x7BF43293,0xA799A824,
-		0x42F1CE45,0x9E9C54F2,0xFEEBE69C,0x22867C2B,0x3E048240,0xE26918F7,0x821EAA99,0x5E73302E,
-		0x77F5AD48,0xAB9837FF,0xCBEF8591,0x17821F26,0x0B00E14D,0xD76D7BFA,0xB71AC994,0x6B775323,
-		0x8E1F3542,0x5272AFF5,0x32051D9B,0xEE68872C,0xF2EA7947,0x2E87E3F0,0x4EF0519E,0x929DCB29,
-		0x80E180EB,0x5C8C1A5C,0x3CFBA832,0xE0963285,0xFC14CCEE,0x20795659,0x400EE437,0x9C637E80,
-		0x790B18E1,0xA5668256,0xC5113038,0x197CAA8F,0x05FE54E4,0xD993CE53,0xB9E47C3D,0x6589E68A,
-		0x9D1CEBB9,0x4171710E,0x2106C360,0xFD6B59D7,0xE1E9A7BC,0x3D843D0B,0x5DF38F65,0x819E15D2,
-		0x64F673B3,0xB89BE904,0xD8EC5B6A,0x0481C1DD,0x18033FB6,0xC46EA501,0xA419176F,0x78748DD8,
-		0x6A08C61A,0xB6655CAD,0xD612EEC3,0x0A7F7474,0x16FD8A1F,0xCA9010A8,0xAAE7A2C6,0x768A3871,
-		0x93E25E10,0x4F8FC4A7,0x2FF876C9,0xF395EC7E,0xEF171215,0x337A88A2,0x530D3ACC,0x8F60A07B
-	},
-	{
-		0x00000000,0x490D678D,0x921ACF1A,0xDB17A897,0x20F48383,0x69F9E40E,0xB2EE4C99,0xFBE32B14,
-		0x41E90706,0x08E4608B,0xD3F3C81C,0x9AFEAF91,0x611D8485,0x2810E308,0xF3074B9F,0xBA0A2C12,
-		0x83D20E0C,0xCADF6981,0x11C8C116,0x58C5A69B,0xA3268D8F,0xEA2BEA02,0x313C4295,0x78312518,
-		0xC23B090A,0x8B366E87,0x5021C610,0x192CA19D,0xE2CF8A89,0xABC2ED04,0x70D54593,0x39D8221E,
-		0x036501AF,0x4A686622,0x917FCEB5,0xD872A938,0x2391822C,0x6A9CE5A1,0xB18B4D36,0xF8862ABB,
-		0x428C06A9,0x0B816124,0xD096C9B3,0x999BAE3E,0x6278852A,0x2B75E2A7,0xF0624A30,0xB96F2DBD,
-		0x80B70FA3,0xC9BA682E,0x12ADC0B9,0x5BA0A734,0xA0438C20,0xE94EEBAD,0x3259433A,0x7B5424B7,
-		0xC15E08A5,0x88536F28,0x5344C7BF,0x1A49A032,0xE1AA8B26,0xA8A7ECAB,0x73B0443C,0x3ABD23B1,
-		0x06CA035E,0x4FC764D3,0x94D0CC44,0xDDDDABC9,0x263E80DD,0x6F33E750,0xB4244FC7,0xFD29284A,
-		0x47230458,0x0E2E63D5,0xD539CB42,0x9C34ACCF,0x67D787DB,0x2EDAE056,0xF5CD48C1,0xBCC02F4C,
-		0x85180D52,0xCC156ADF,0x1702C248,0x5E0FA5C5,0xA5EC8ED1,0xECE1E95C,0x37F641CB,0x7EFB2646,
-		0xC4F10A54,0x8DFC6DD9,0x56EBC54E,0x1FE6A2C3,0xE40589D7,0xAD08EE5A,0x761F46CD,0x3F122140,
-		0x05AF02F1,0x4CA2657C,0x97B5CDEB,0xDEB8AA66,0x255B8172,0x6C56E6FF,0xB7414E68,0xFE4C29E5,
-		0x444605F7,0x0D4B627A,0xD65CCAED,0x9F51AD60,0x64B28674,0x2DBFE1F9,0xF6A8496E,0xBFA52EE3,
-		0x867D0CFD,0xCF706B70,0x1467C3E7,0x5D6AA46A,0xA6898F7E,0xEF84E8F3,0x34934064,0x7D9E27E9,
-		0xC7940BFB,0x8E996C76,0x558EC4E1,0x1C83A36C,0xE7608878,0xAE6DEFF5,0x757A4762,0x3C7720EF,
-		0x0D9406BC,0x44996131,0x9F8EC9A6,0xD683AE2B,0x2D60853F,0x646DE2B2,0xBF7A4A25,0xF6772DA8,
-		0x4C7D01BA,0x05706637,0xDE67CEA0,0x976AA92D,0x6C898239,0x2584E5B4,0xFE934D23,0xB79E2AAE,
-		0x8E4608B0,0xC74B6F3D,0x1C5CC7AA,0x5551A027,0xAEB28B33,0xE7BFECBE,0x3CA84429,0x75A523A4,
-		0xCFAF0FB6,0x86A2683B,0x5DB5C0AC,0x14B8A721,0xEF5B8C35,0xA656EBB8,0x7D41432F,0x344C24A2,
-		0x0EF10713,0x47FC609E,0x9CEBC809,0xD5E6AF84,0x2E058490,0x6708E31D,0xBC1F4B8A,0xF5122C07,
-		0x4F180015,0x06156798,0xDD02CF0F,0x940FA882,0x6FEC8396,0x26E1E41B,0xFDF64C8C,0xB4FB2B01,
-		0x8D23091F,0xC42E6E92,0x1F39C605,0x5634A188,0xADD78A9C,0xE4DAED11,0x3FCD4586,0x76C0220B,
-		0xCCCA0E19,0x85C76994,0x5ED0C103,0x17DDA68E,0xEC3E8D9A,0xA533EA17,0x7E244280,0x3729250D,
-		0x0B5E05E2,0x4253626F,0x9944CAF8,0xD049AD75,0x2BAA8661,0x62A7E1EC,0xB9B0497B,0xF0BD2EF6,
-		0x4AB702E4,0x03BA6569,0xD8ADCDFE,0x91A0AA73,0x6A438167,0x234EE6EA,0xF8594E7D,0xB15429F0,
-		0x888C0BEE,0xC1816C63,0x1A96C4F4,0x539BA379,0xA878886D,0xE175EFE0,0x3A624777,0x736F20FA,
-		0xC9650CE8,0x80686B65,0x5B7FC3F2,0x1272A47F,0xE9918F6B,0xA09CE8E6,0x7B8B4071,0x328627FC,
-		0x083B044D,0x413663C0,0x9A21CB57,0xD32CACDA,0x28CF87CE,0x61C2E043,0xBAD548D4,0xF3D82F59,
-		0x49D2034B,0x00DF64C6,0xDBC8CC51,0x92C5ABDC,0x692680C8,0x202BE745,0xFB3C4FD2,0xB231285F,
-		0x8BE90A41,0xC2E46DCC,0x19F3C55B,0x50FEA2D6,0xAB1D89C2,0xE210EE4F,0x390746D8,0x700A2155,
-		0xCA000D47,0x830D6ACA,0x581AC25D,0x1117A5D0,0xEAF48EC4,0xA3F9E949,0x78EE41DE,0x31E32653
-	},
-	{
-		0x00000000,0x1B280D78,0x36501AF0,0x2D781788,0x6CA035E0,0x77883898,0x5AF02F10,0x41D82268,
-		0xD9406BC0,0xC26866B8,0xEF107130,0xF4387C48,0xB5E05E20,0xAEC85358,0x83B044D0,0x989849A8,
-		0xB641CA37,0xAD69C74F,0x8011D0C7,0x9B39DDBF,0xDAE1FFD7,0xC1C9F2AF,0xECB1E527,0xF799E85F,
-		0x6F01A1F7,0x7429AC8F,0x5951BB07,0x4279B67F,0x03A19417,0x1889996F,0x35F18EE7,0x2ED9839F,
-		0x684289D9,0x736A84A1,0x5E129329,0x453A9E51,0x04E2BC39,0x1FCAB141,0x32B2A6C9,0x299AABB1,
-		0xB102E219,0xAA2AEF61,0x8752F8E9,0x9C7AF591,0xDDA2D7F9,0xC68ADA81,0xEBF2CD09,0xF0DAC071,
-		0xDE0343EE,0xC52B4E96,0xE853591E,0xF37B5466,0xB2A3760E,0xA98B7B76,0x84F36CFE,0x9FDB6186,
-		0x0743282E,0x1C6B2556,0x311332DE,0x2A3B3FA6,0x6BE31DCE,0x70CB10B6,0x5DB3073E,0x469B0A46,
-		0xD08513B2,0xCBAD1ECA,0xE6D50942,0xFDFD043A,0xBC252652,0xA70D2B2A,0x8A753CA2,0x915D31DA,
-		0x09C57872,0x12ED750A,0x3F956282,0x24BD6FFA,0x65654D92,0x7E4D40EA,0x53355762,0x481D5A1A,
-		0x66C4D985,0x7DECD4FD,0x5094C375,0x4BBCCE0D,0x0A64EC65,0x114CE11D,0x3C34F695,0x271CFBED,
-		0xBF84B245,0xA4ACBF3D,0x89D4A8B5,0x92FCA5CD,0xD32487A5,0xC80C8ADD,0xE5749D55,0xFE5C902D,
-		0xB8C79A6B,0xA3EF9713,0x8E97809B,0x95BF8DE3,0xD467AF8B,0xCF4FA2F3,0xE237B57B,0xF91FB803,
-		0x6187F1AB,0x7AAFFCD3,0x57D7EB5B,0x4CFFE623,0x0D27C44B,0x160FC933,0x3B77DEBB,0x205FD3C3,
-		0x0E86505C,0x15AE5D24,0x38D64AAC,0x23FE47D4,0x622665BC,0x790E68C4,0x54767F4C,0x4F5E7234,
-		0xD7C63B9C,0xCCEE36E4,0xE196216C,0xFABE2C14,0xBB660E7C,0xA04E0304,0x8D36148C,0x961E19F4,
-		0xA5CB3AD3,0xBEE337AB,0x939B2023,0x88B32D5B,0xC96B0F33,0xD243024B,0xFF3B15C3,0xE41318BB,
-		0x7C8B5113,0x67A35C6B,0x4ADB4BE3,0x51F3469B,0x102B64F3,0x0B03698B,0x267B7E03,0x3D53737B,
-		0x138AF0E4,0x08A2FD9C,0x25DAEA14,0x3EF2E76C,0x7F2AC504,0x6402C87C,0x497ADFF4,0x5252D28C,
-		0xCACA9B24,0xD1E2965C,0xFC9A81D4,0xE7B28CAC,0xA66AAEC4,0xBD42A3BC,0x903AB434,0x8B12B94C,
-		0xCD89B30A,0xD6A1BE72,0xFBD9A9FA,0xE0F1A482,0xA12986EA,0xBA018B92,0x97799C1A,0x8C519162,
-		0x14C9D8CA,0x0FE1D5B2,0x2299C23A,0x39B1CF42,0x7869ED2A,0x6341E052,0x4E39F7DA,0x5511FAA2,
-		0x7BC8793D,0x60E07445,0x4D9863CD,0x56B06EB5,0x17684CDD,0x0C4041A5,0x2138562D,0x3A105B55,
-		0xA28812FD,0xB9A01F85,0x94D8080D,0x8FF00575,0xCE28271D,0xD5002A65,0xF8783DED,0xE3503095,
-		0x754E2961,0x6E662419,0x431E3391,0x58363EE9,0x19EE1C81,0x02C611F9,0x2FBE0671,0x34960B09,
-		0xAC0E42A1,0xB7264FD9,0x9A5E5851,0x81765529,0xC0AE7741,0xDB867A39,0xF6FE6DB1,0xEDD660C9,
-		0xC30FE356,0xD827EE2E,0xF55FF9A6,0xEE77F4DE,0xAFAFD6B6,0xB487DBCE,0x99FFCC46,0x82D7C13E,
-		0x1A4F8896,0x016785EE,0x2C1F9266,0x37379F1E,0x76EFBD76,0x6DC7B00E,0x40BFA786,0x5B97AAFE,
-		0x1D0CA0B8,0x0624ADC0,0x2B5CBA48,0x3074B730,0x71AC9558,0x6A849820,0x47FC8FA8,0x5CD482D0,
-		0xC44CCB78,0xDF64C600,0xF21CD188,0xE934DCF0,0xA8ECFE98,0xB3C4F3E0,0x9EBCE468,0x8594E910,
-		0xAB4D6A8F,0xB06567F7,0x9D1D707F,0x86357D07,0xC7ED5F6F,0xDCC55217,0xF1BD459F,0xEA9548E7,
-		0x720D014F,0x69250C37,0x445D1BBF,0x5F7516C7,0x1EAD34AF,0x058539D7,0x28FD2E5F,0x33D52327
-	},
-	{
-		0x00000000,0x4F576811,0x9EAED022,0xD1F9B833,0x399CBDF3,0x76CBD5E2,0xA7326DD1,0xE86505C0,
-		0x73397BE6,0x3C6E13F7,0xED97ABC4,0xA2C0C3D5,0x4AA5C615,0x05F2AE04,0xD40B1637,0x9B5C7E26,
-		0xE672F7CC,0xA9259FDD,0x78DC27EE,0x378B4FFF,0xDFEE4A3F,0x90B9222E,0x41409A1D,0x0E17F20C,
-		0x954B8C2A,0xDA1CE43B,0x0BE55C08,0x44B23419,0xACD731D9,0xE38059C8,0x3279E1FB,0x7D2E89EA,
-		0xC824F22F,0x87739A3E,0x568A220D,0x19DD4A1C,0xF1B84FDC,0xBEEF27CD,0x6F169FFE,0x2041F7EF,
-		0xBB1D89C9,0xF44AE1D8,0x25B359EB,0x6AE431FA,0x8281343A,0xCDD65C2B,0x1C2FE418,0x53788C09,
-		0x2E5605E3,0x61016DF2,0xB0F8D5C1,0xFFAFBDD0,0x17CAB810,0x589DD001,0x89646832,0xC6330023,
-		0x5D6F7E05,0x12381614,0xC3C1AE27,0x8C96C636,0x64F3C3F6,0x2BA4ABE7,0xFA5D13D4,0xB50A7BC5,
-		0x9488F9E9,0xDBDF91F8,0x0A2629CB,0x457141DA,0xAD14441A,0xE2432C0B,0x33BA9438,0x7CEDFC29,
-		0xE7B1820F,0xA8E6EA1E,0x791F522D,0x36483A3C,0xDE2D3FFC,0x917A57ED,0x4083EFDE,0x0FD487CF,
-		0x72FA0E25,0x3DAD6634,0xEC54DE07,0xA303B616,0x4B66B3D6,0x0431DBC7,0xD5C863F4,0x9A9F0BE5,
-		0x01C375C3,0x4E941DD2,0x9F6DA5E1,0xD03ACDF0,0x385FC830,0x7708A021,0xA6F11812,0xE9A67003,
-		0x5CAC0BC6,0x13FB63D7,0xC202DBE4,0x8D55B3F5,0x6530B635,0x2A67DE24,0xFB9E6617,0xB4C90E06,
-		0x2F957020,0x60C21831,0xB13BA002,0xFE6CC813,0x1609CDD3,0x595EA5C2,0x88A71DF1,0xC7F075E0,
-		0xBADEFC0A,0xF589941B,0x24702C28,0x6B274439,0x834241F9,0xCC1529E8,0x1DEC91DB,0x52BBF9CA,
-		0xC9E787EC,0x86B0EFFD,0x574957CE,0x181E3FDF,0xF07B3A1F,0xBF2C520E,0x6ED5EA3D,0x2182822C,
-		0x2DD0EE65,0x62878674,0xB37E3E47,0xFC295656,0x144C5396,0x5B1B3B87,0x8AE283B4,0xC5B5EBA5,
-		0x5EE99583,0x11BEFD92,0xC04745A1,0x8F102DB0,0x67752870,0x28224061,0xF9DBF852,0xB68C9043,
-		0xCBA219A9,0x84F571B8,0x550CC98B,0x1A5BA19A,0xF23EA45A,0xBD69CC4B,0x6C907478,0x23C71C69,
-		0xB89B624F,0xF7CC0A5E,0x2635B26D,0x6962DA7C,0x8107DFBC,0xCE50B7AD,0x1FA90F9E,0x50FE678F,
-		0xE5F41C4A,0xAAA3745B,0x7B5ACC68,0x340DA479,0xDC68A1B9,0x933FC9A8,0x42C6719B,0x0D91198A,
-		0x96CD67AC,0xD99A0FBD,0x0863B78E,0x4734DF9F,0xAF51DA5F,0xE006B24E,0x31FF0A7D,0x7EA8626C,
-		0x0386EB86,0x4CD18397,0x9D283BA4,0xD27F53B5,0x3A1A5675,0x754D3E64,0xA4B48657,0xEBE3EE46,
-		0x70BF9060,0x3FE8F871,0xEE114042,0xA1462853,0x49232D93,0x06744582,0xD78DFDB1,0x98DA95A0,
-		0xB958178C,0xF60F7F9D,0x27F6C7AE,0x68A1AFBF,0x80C4AA7F,0xCF93C26E,0x1E6A7A5D,0x513D124C,
-		0xCA616C6A,0x8536047B,0x54CFBC48,0x1B98D459,0xF3FDD199,0xBCAAB988,0x6D5301BB,0x220469AA,
-		0x5F2AE040,0x107D8851,0xC1843062,0x8ED35873,0x66B65DB3,0x29E135A2,0xF8188D91,0xB74FE580,
-		0x2C139BA6,0x6344F3B7,0xB2BD4B84,0xFDEA2395,0x158F2655,0x5AD84E44,0x8B21F677,0xC4769E66,
-		0x717CE5A3,0x3E2B8DB2,0xEFD23581,0xA0855D90,0x48E05850,0x07B73041,0xD64E8872,0x9919E063,
-		0x02459E45,0x4D12F654,0x9CEB4E67,0xD3BC2676,0x3BD923B6,0x748E4BA7,0xA577F394,0xEA209B85,
-		0x970E126F,0xD8597A7E,0x09A0C24D,0x46F7AA5C,0xAE92AF9C,0xE1C5C78D,0x303C7FBE,0x7F6B17AF,
-		0xE4376989,0xAB600198,0x7A99B9AB,0x35CED1BA,0xDDABD47A,0x92FCBC6B,0x43050458,0x0C526C49
-	},
-	{
-		0x00000000,0x5BA1DCCA,0xB743B994,0xECE2655E,0x6A466E9F,0x31E7B255,0xDD05D70B,0x86A40BC1,
-		0xD48CDD3E,0x8F2D01F4,0x63CF64AA,0x386EB860,0xBECAB3A1,0xE56B6F6B,0x09890A35,0x5228D6FF,
-		0xADD8A7CB,0xF6797B01,0x1A9B1E5F,0x413AC295,0xC79EC954,0x9C3F159E,0x70DD70C0,0x2B7CAC0A,
-		0x79547AF5,0x22F5A63F,0xCE17C361,0x95B61FAB,0x1312146A,0x48B3C8A0,0xA451ADFE,0xFFF07134,
-		0x5F705221,0x04D18EEB,0xE833EBB5,0xB392377F,0x35363CBE,0x6E97E074,0x8275852A,0xD9D459E0,
-		0x8BFC8F1F,0xD05D53D5,0x3CBF368B,0x671EEA41,0xE1BAE180,0xBA1B3D4A,0x56F95814,0x0D5884DE,
-		0xF2A8F5EA,0xA9092920,0x45EB4C7E,0x1E4A90B4,0x98EE9B75,0xC34F47BF,0x2FAD22E1,0x740CFE2B,
-		0x262428D4,0x7D85F41E,0x91679140,0xCAC64D8A,0x4C62464B,0x17C39A81,0xFB21FFDF,0xA0802315,
-		0xBEE0A442,0xE5417888,0x09A31DD6,0x5202C11C,0xD4A6CADD,0x8F071617,0x63E57349,0x3844AF83,
-		0x6A6C797C,0x31CDA5B6,0xDD2FC0E8,0x868E1C22,0x002A17E3,0x5B8BCB29,0xB769AE77,0xECC872BD,
-		0x13380389,0x4899DF43,0xA47BBA1D,0xFFDA66D7,0x797E6D16,0x22DFB1DC,0xCE3DD482,0x959C0848,
-		0xC7B4DEB7,0x9C15027D,0x70F76723,0x2B56BBE9,0xADF2B028,0xF6536CE2,0x1AB109BC,0x4110D576,
-		0xE190F663,0xBA312AA9,0x56D34FF7,0x0D72933D,0x8BD698FC,0xD0774436,0x3C952168,0x6734FDA2,
-		0x351C2B5D,0x6EBDF797,0x825F92C9,0xD9FE4E03,0x5F5A45C2,0x04FB9908,0xE819FC56,0xB3B8209C,
-		0x4C4851A8,0x17E98D62,0xFB0BE83C,0xA0AA34F6,0x260E3F37,0x7DAFE3FD,0x914D86A3,0xCAEC5A69,
-		0x98C48C96,0xC365505C,0x2F873502,0x7426E9C8,0xF282E209,0xA9233EC3,0x45C15B9D,0x1E608757,
-		0x79005533,0x22A189F9,0xCE43ECA7,0x95E2306D,0x13463BAC,0x48E7E766,0xA4058238,0xFFA45EF2,
-		0xAD8C880D,0xF62D54C7,0x1ACF3199,0x416EED53,0xC7CAE692,0x9C6B3A58,0x70895F06,0x2B2883CC,
-		0xD4D8F2F8,0x8F792E32,0x639B4B6C,0x383A97A6,0xBE9E9C67,0xE53F40AD,0x09DD25F3,0x527CF939,
-		0x00542FC6,0x5BF5F30C,0xB7179652,0xECB64A98,0x6A124159,0x31B39D93,0xDD51F8CD,0x86F02407,
-		0x26700712,0x7DD1DBD8,0x9133BE86,0xCA92624C,0x4C36698D,0x1797B547,0xFB75D019,0xA0D40CD3,
-		0xF2FCDA2C,0xA95D06E6,0x45BF63B8,0x1E1EBF72,0x98BAB4B3,0xC31B6879,0x2FF90D27,0x7458D1ED,
-		0x8BA8A0D9,0xD0097C13,0x3CEB194D,0x674AC587,0xE1EECE46,0xBA4F128C,0x56AD77D2,0x0D0CAB18,
-		0x5F247DE7,0x0485A12D,0xE867C473,0xB3C618B9,0x35621378,0x6EC3CFB2,0x8221AAEC,0xD9807626,
-		0xC7E0F171,0x9C412DBB,0x70A348E5,0x2B02942F,0xADA69FEE,0xF6074324,0x1AE5267A,0x4144FAB0,
-		0x136C2C4F,0x48CDF085,0xA42F95DB,0xFF8E4911,0x792A42D0,0x228B9E1A,0xCE69FB44,0x95C8278E,
-		0x6A3856BA,0x31998A70,0xDD7BEF2E,0x86DA33E4,0x007E3825,0x5BDFE4EF,0xB73D81B1,0xEC9C5D7B,
-		0xBEB48B84,0xE515574E,0x09F73210,0x5256EEDA,0xD4F2E51B,0x8F5339D1,0x63B15C8F,0x38108045,
-		0x9890A350,0xC3317F9A,0x2FD31AC4,0x7472C60E,0xF2D6CDCF,0xA9771105,0x4595745B,0x1E34A891,
-		0x4C1C7E6E,0x17BDA2A4,0xFB5FC7FA,0xA0FE1B30,0x265A10F1,0x7DFBCC3B,0x9119A965,0xCAB875AF,
-		0x3548049B,0x6EE9D851,0x820BBD0F,0xD9AA61C5,0x5F0E6A04,0x04AFB6CE,0xE84DD390,0xB3EC0F5A,
-		0xE1C4D9A5,0xBA65056F,0x56876031,0x0D26BCFB,0x8B82B73A,0xD0236BF0,0x3CC10EAE,0x6760D264
-	}
-};
-
-
-#if 0 /* precomputing table */
-void CRC32Init_slicing8()
-{
-    static int beenHere = 0;
-    if ( ! beenHere )
-    {
-        int32_t kPoly32 = 0x04C11DB7;
-        size_t i;
-        for (i = 0; i < 256; ++i)
-        {
-            int32_t crc = i << 24;
-            size_t j;
-            for (j = 0; j < 8; ++j)
-            {
-                /*if (crc < 0)
-                    crc = (crc << 1) ^ kPoly32;
-                else
-                    crc <<= 1;*/
-                crc = (crc << 1) ^ ((crc >> 31) & kPoly32);
-            }
-            sCRC32_tbl_[0][i] = crc;
-        }
-        for (int i = 0; i < 256; ++i)
-        {
-            sCRC32_tbl_[1][i] = (sCRC32_tbl_[0][i] << 8) ^ sCRC32_tbl_[0][sCRC32_tbl_[0][i] >> 24];
-            sCRC32_tbl_[2][i] = (sCRC32_tbl_[1][i] << 8) ^ sCRC32_tbl_[0][sCRC32_tbl_[1][i] >> 24];
-            sCRC32_tbl_[3][i] = (sCRC32_tbl_[2][i] << 8) ^ sCRC32_tbl_[0][sCRC32_tbl_[2][i] >> 24];
-
-            sCRC32_tbl_[4][i] = (sCRC32_tbl_[3][i] << 8) ^ sCRC32_tbl_[0][sCRC32_tbl_[3][i] >> 24];
-            sCRC32_tbl_[5][i] = (sCRC32_tbl_[4][i] << 8) ^ sCRC32_tbl_[0][sCRC32_tbl_[4][i] >> 24];
-            sCRC32_tbl_[6][i] = (sCRC32_tbl_[5][i] << 8) ^ sCRC32_tbl_[0][sCRC32_tbl_[5][i] >> 24];
-            sCRC32_tbl_[7][i] = (sCRC32_tbl_[6][i] << 8) ^ sCRC32_tbl_[0][sCRC32_tbl_[6][i] >> 24];
-        }
-        beenHere = 1;
-    }
-}
-#endif
-LIB_EXPORT void CC CRC32Init ( void ) {} /* TODO: some other files call this function. Need to delete those calls and then to delete this empty function */
-
-static uint32_t CRC32_one_byte_lookup(uint32_t previousCrc32, const void *data, size_t length)
-{
-    uint32_t crc = previousCrc32;
-    const uint8_t* currentChar = (const uint8_t*) data;
-    while (length-- > 0)
-    {
-        uint32_t i = ( crc >> 24 ) ^ *currentChar;
-        ++currentChar;
-        crc <<= 8;
-        crc ^= sCRC32_tbl_[0][i];
-    }
-    return crc;
-}
-
-#define QWORD_READ 0
-#define INVERT_PREVIOUS_CRC 0
-
-LIB_EXPORT uint32_t CC CRC32(uint32_t previousCrc32, const void *data, size_t length)
-{
-#if INVERT_PREVIOUS_CRC
-    uint32_t crc = ~previousCrc32; /* same as previousCrc32 ^ 0xFFFFFFFF*/
-#else
-    uint32_t crc = previousCrc32;
-#endif
-
-#if QWORD_READ == 1
-    const uint64_t* current = (const uint64_t*) data;
-    size_t const ALIGN_BYTES = 8;
-#else
-    const uint32_t* current = (const uint32_t*) data;
-    size_t const ALIGN_BYTES = 4;
-#endif
-
-    /* if 'data' is unaligned, process first unaligned bytes with simple algorithm,
-    then apply slicing to the aligned remainder */
-    size_t nFisrtUnalignedBytes = ((size_t)data % ALIGN_BYTES);
-    if (nFisrtUnalignedBytes)
-    {
-        nFisrtUnalignedBytes = ALIGN_BYTES - nFisrtUnalignedBytes;
-        crc = CRC32_one_byte_lookup(crc, data, nFisrtUnalignedBytes);
-        length -= nFisrtUnalignedBytes;
-        current = (const uint32_t*) ((char*)data + nFisrtUnalignedBytes);
-    }
-
-    /* process aligned data with slicing-by-8 algorithm */
-    while (length >= 8)
-    {
-#if QWORD_READ == 1 /* this is slower than 2x4-bytes */
-        uint64_t qword = *current++ ^ bswap_32(crc); /* in theory it should be no bswap for little-endian here */
-        crc =
-            sCRC32_tbl_[0][(uint8_t)(qword>>56)] ^
-            sCRC32_tbl_[1][(uint8_t)(qword>>48)] ^
-            sCRC32_tbl_[2][(uint8_t)(qword>>40)] ^
-            sCRC32_tbl_[3][(uint8_t)(qword>>32)] ^
-            sCRC32_tbl_[4][(uint8_t)(qword>>24)] ^
-            sCRC32_tbl_[5][(uint8_t)(qword>>16)] ^
-            sCRC32_tbl_[6][(uint8_t)(qword>> 8)] ^
-            sCRC32_tbl_[7][(uint8_t)qword];
-#else
-        uint32_t one = *current++ ^ bswap_32(crc); /* in theory it should be no bswap for little-endian here */
-        uint32_t two = *current++;
-        crc =
-            sCRC32_tbl_[0][(uint8_t)(two>>24)] ^
-            sCRC32_tbl_[1][(uint8_t)(two>>16)] ^
-            sCRC32_tbl_[2][(uint8_t)(two>> 8)] ^
-            sCRC32_tbl_[3][(uint8_t)two] ^
-            sCRC32_tbl_[4][(uint8_t)(one>>24)] ^
-            sCRC32_tbl_[5][(uint8_t)(one>>16)] ^
-            sCRC32_tbl_[6][(uint8_t)(one>> 8)] ^
-            sCRC32_tbl_[7][(uint8_t)one];
-#endif
-
-        length -= 8;
-    }
-
-    /* remaining 1 to 7 bytes (standard algorithm) */
-    crc = CRC32_one_byte_lookup(crc, current, length);
-
-#if INVERT_PREVIOUS_CRC
-    return ~crc; // same as crc ^ 0xFFFFFFFF
-#else
-    return crc;
-#endif
-}
-
-#endif /* SLOW_CRC */
diff --git a/libs/klib/data-buffer.c b/libs/klib/data-buffer.c
deleted file mode 100644
index 16cc14c..0000000
--- a/libs/klib/data-buffer.c
+++ /dev/null
@@ -1,656 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/extern.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <atomic32.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#if _ARCH_BITS == 32
-#define BASE_PTR_ALIGNMENT 8
-#else
-#define BASE_PTR_ALIGNMENT 16
-#endif
-
-#define DEBUG_ALIGNMENT 0
-
-#if _DEBUGGING
-#define DEBUG_MALLOC_FREE 1
-#include <stdio.h>
-#endif
-
-#if DEBUG_ALIGNMENT
-#if ! _DEBUGGING
-#include <stdio.h>
-#endif
-
-static
-void cc_impl ( const KDataBuffer * self, const char * func, uint32_t lineno )
-{
-    /* if not byte-aligned, pointer is always a byte pointer */
-    if ( ( self -> elem_bits & 7 ) == 0 )
-    {
-        /* convert from bits to bytes */
-        uint64_t elem_bytes = self -> elem_bits >> 3;
-
-        /* if the size is an integral power of 2 */
-        if ( ( ( elem_bytes - 1 ) & elem_bytes ) == 0 )
-        {
-            /* never should be called with < 2 bytes ( see "cc" macro ) */
-            assert ( elem_bytes >= 2 );
-
-#if _ARCH_BITS == 32
-            /* test pointer alignment against 1 ( 16-bit ), 3 ( 32-bit ) */
-            if ( ( ( size_t ) self -> base & ( elem_bytes - 1 ) & 3 ) != 0 )
-            {
-                /* this buffer has bad pointer alignment */
-                fprintf ( stderr, "%s:%u: %s - WARNING: bad pointer alignment: 0x%08lx -> %lu bytes\n",
-                          __FILE__, lineno, func, ( size_t ) self -> base, ( size_t ) elem_bytes );
-            }
-#else
-            /* test pointer alignment against 1 ( 16-bit ), 3 ( 32-bit ), 7 ( 64-bit ), 15 ( 128-bit ) */
-            if ( ( ( size_t ) self -> base & ( elem_bytes - 1 ) & 15 ) != 0 )
-            {
-                /* this buffer has bad pointer alignment */
-                fprintf ( stderr, "%s:%u: %s - WARNING: bad pointer alignment: 0x%016lx -> %lu bytes\n",
-                          __FILE__, lineno, func, ( size_t ) self -> base, ( size_t ) elem_bytes );
-            }
-#endif
-        }
-    }
-}
-
-#define cc( self )                                          \
-    if ( ( self ) != NULL && ( self ) -> elem_bits > 16 )   \
-        cc_impl ( self, __func__, __LINE__ )
-#else
-#define cc( self ) ( ( void ) 0 )
-#endif
-
-/*--------------------------------------------------------------------------
- * KDataBufferImpl
- */
-typedef struct buffer_impl_t buffer_impl_t;
-struct buffer_impl_t {
-    size_t allocated;
-    atomic32_t refcount;
-    uint32_t foo;
-#if _ARCH_BITS == 32
-    uint32_t foo2;
-#endif
-};
-
-static size_t roundup(size_t value, unsigned bits)
-{
-    size_t const mask = (((size_t)1u) << bits) - 1;
-    return (value + mask) & (~mask);
-}
-
-static
-rc_t allocate(buffer_impl_t **target, size_t capacity) {
-    buffer_impl_t *y = malloc(capacity + sizeof(*y));
-
-    if (y == NULL)
-        return RC(rcRuntime, rcBuffer, rcAllocating, rcMemory, rcExhausted);
-
-    y->allocated = capacity;
-    atomic32_set(&y->refcount, 1);
-    
-#if DEBUG_MALLOC_FREE
-    y->foo = 0;
-#endif
-
-    *target = y;
-    return 0;
-}
-
-static buffer_impl_t *add_ref(buffer_impl_t *self) {
-    atomic32_inc(&self->refcount);
-    return self;
-}
-
-static buffer_impl_t *test_add_ref(buffer_impl_t *self) {
-    if (self) add_ref(self);
-    return self;
-}
-
-static void release(buffer_impl_t *self) {
-    int32_t refcount = atomic32_read_and_add(&self->refcount, -1);
-    
-    if (refcount == 1) {
-#if DEBUG_MALLOC_FREE
-        if (self->foo != 0) {
-            fprintf(stderr, "DIE DIE\n");
-        }
-        self->foo = 55;
-#endif
-        free(self);
-    }
-#if DEBUG_MALLOC_FREE
-    else if (refcount < 1) {
-        fprintf(stderr, "ALREADY DEAD\n");
-    }
-#endif
-}
-
-/* always returns object (new or original) with refcount == 1 */
-static rc_t reallocate(buffer_impl_t **target, size_t capacity) {
-    buffer_impl_t *temp;
-    buffer_impl_t *self = *target;
-
-    if (capacity <= self->allocated)
-        return 0;
-
-    /* check reference count for copies */
-    if (atomic32_read(&self->refcount) <= 1)
-    {
-        temp = realloc(self, capacity + sizeof(*temp));
-        if (temp == NULL)
-            return RC(rcRuntime, rcBuffer, rcResizing, rcMemory, rcExhausted);
-    }
-    else
-    {
-        temp = malloc(capacity + sizeof(*temp));
-        if (temp == NULL)
-            return RC(rcRuntime, rcBuffer, rcResizing, rcMemory, rcExhausted);
-        memcpy(temp, self, self->allocated + sizeof(*temp));
-        release(self);
-    }
-    self = temp;
-    self->allocated = capacity;
-    atomic32_set(&self->refcount, 1);
-    *target = self;
-
-    return 0;
-}
-
-static rc_t shrink(buffer_impl_t **target, size_t capacity)
-{
-    buffer_impl_t *self = *target;
-    
-    if (capacity < self->allocated && atomic32_read(&self->refcount) == 1) {
-        buffer_impl_t *temp = realloc(self, capacity + sizeof(*temp));
-        
-        if (temp == NULL)
-            return RC(rcRuntime, rcBuffer, rcResizing, rcMemory, rcExhausted);
-
-        temp->allocated = capacity;
-        *target = temp;
-    }
-    return 0;
-}
-
-/*
- either returns original with refcount == 2
- or returns new copy with refcount == 1
- */
-static buffer_impl_t* make_copy(buffer_impl_t *self) {
-    if (atomic32_read_and_add_eq(&self->refcount, 1, 1)==1)
-        return self;
-    else {
-        buffer_impl_t *copy = malloc(self->allocated + sizeof(*self));
-        if (copy) {
-            memcpy(copy, self, self->allocated + sizeof(*copy));
-            atomic32_set(&copy->refcount, 1);
-        }
-        return copy;
-    }
-}
-
-static void const *get_data(buffer_impl_t const *self)
-{
-    return &self[1];
-}
-
-static void const *get_data_endp(buffer_impl_t const *self)
-{
-    return (uint8_t const *)get_data(self) + self->allocated;
-}
-
-static
-rc_t buffer_impl_check_integrity (buffer_impl_t const *self, uint8_t const *base, size_t offset, size_t size)
-{
-    void const *const endp = &base[size+offset];
-
-    if (self == NULL)
-        return 0;
-
-    /* refcount is of major importance */
-    if (atomic32_read (& self->refcount) <= 0)
-        return RC (rcRuntime, rcBuffer, rcValidating, rcBuffer, rcDestroyed);
-
-#if DEBUG_MALLOC_FREE
-    if (self->foo != 0)
-        return RC (rcRuntime, rcBuffer, rcValidating, rcBuffer, rcDestroyed);
-#endif
-
-    if ((void const *)base < get_data(self) || get_data_endp(self) < endp)
-        return RC (rcRuntime, rcBuffer, rcValidating, rcData, rcCorrupt);
-
-    return 0;
-}
-
-/* Make
- *  create a new empty buffer
- *
- *  "buffer" [ OUT ] - pointer to structure to initialize
- *
- *  "capacity" [ IN ] - the number of bytes to be allocated
- */
-LIB_EXPORT rc_t CC KDataBufferMake(KDataBuffer *target, uint64_t elem_bits, uint64_t elem_count) {
-    rc_t rc;
-    size_t bytes;
-    buffer_impl_t **impp;
-    
-    if (target == NULL)
-    	return RC(rcRuntime, rcBuffer, rcConstructing, rcParam, rcNull);
-
-    impp = (buffer_impl_t **)&target->ignore;
-    
-    bytes = roundup((elem_bits * elem_count + 7) / 8, 12);
-    if (8 * (uint64_t)bytes < elem_bits * elem_count)
-    	return RC(rcRuntime, rcBuffer, rcConstructing, rcParam, rcTooBig);
-    
-    memset (target, 0, sizeof(*target));
-
-    rc = allocate(impp, bytes);
-    if (rc == 0) {
-        target->base = (void *)get_data(*impp);
-        target->elem_bits = elem_bits;
-        target->elem_count = elem_count;
-    }
-
-    cc ( target );
-
-    return rc;
-}
-
-static rc_t KDataBufferResizeInt(KDataBuffer *self, uint64_t new_count) {
-    rc_t rc;
-    buffer_impl_t *imp;
-    buffer_impl_t *new_imp;
-    size_t new_size;
-    uint64_t bits;
-    const uint8_t *new_end;
-    const uint8_t *cur_end;
-    
-    if (self == NULL)
-    	return RC(rcRuntime, rcBuffer, rcResizing, rcParam, rcNull);
-
-    if (new_count == 0) {
-        self->elem_count = 0;
-        return 0; /*** no change for empty data ***/
-    }
-
-    bits = self->elem_bits * new_count;
-    if (((bits + 7) >> 35) != 0)
-    	return RC(rcRuntime, rcBuffer, rcConstructing, rcParam, rcTooBig);
-    
-    imp = (buffer_impl_t *)self->ignore;
-    if (imp == NULL) {
-        /* new buffer */
-        rc = allocate(&imp, roundup((bits + 7) / 8, 12));
-        if (rc == 0) {
-            self->ignore = imp;
-            self->base = (void *)get_data(imp);
-            self->elem_count = new_count;
-        }
-        return rc;
-    }
-
-    cur_end = &((const uint8_t *)imp)[imp->allocated + sizeof *imp];
-    new_end = &((const uint8_t *)self->base)[(bits + self->bit_offset + 7) >> 3];
-    if (cur_end >= new_end) {
-        /* requested end-of-buffer is within current allocation; realloc not required */
-        self->elem_count = new_count;
-        return 0;
-    }
-
-    if (!KDataBufferWritable(self))
-        return RC(rcRuntime, rcBuffer, rcResizing, rcSelf, rcReadonly);
-    
-    new_size = roundup((bits + 7) / 8, 12);
-    if (self->base == get_data(imp) && self->bit_offset == 0) {
-        rc = reallocate(&imp, new_size);
-        if (rc == 0) {
-            self->ignore = imp;
-            self->base = (void *)get_data(imp);
-            self->elem_count = new_count;
-        }
-        return rc;
-    }
-
-    /* is sub-buffer but is sole reference */
-    rc = allocate(&new_imp, roundup(new_size, 12));
-    if (rc == 0) {
-        memcpy((void *)get_data(new_imp), self->base, new_size);
-        release(imp);
-        self->base = (void *)get_data(new_imp);
-        self->ignore = new_imp;
-        self->elem_count = new_count;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDataBufferResize(KDataBuffer *self, uint64_t new_count)
-{
-    rc_t rc = KDataBufferResizeInt ( self, new_count );
-    cc ( self );
-    return rc;
-}
-
-static rc_t KDataBufferSubInt (const KDataBuffer *self,
-    KDataBuffer *target, uint64_t start, uint64_t count)
-{
-    if (self == NULL || target == NULL)
-    	return RC(rcRuntime, rcBuffer, rcConstructing, rcParam, rcNull);
-    
-    if (self->ignore == NULL) {
-        if (start > 0 || count < UINT64_MAX)
-            return RC(rcRuntime, rcBuffer, rcConstructing, rcParam, rcNull);
-        *target = *self;
-        return 0;
-    }
-    if ((const KDataBuffer *)target != self) {
-        *target = *self;
-        target->ignore = add_ref((buffer_impl_t *)self->ignore);
-    }
-    {
-        buffer_impl_t *imp = (buffer_impl_t *)self->ignore;
-        bitsz_t offset = self->bit_offset + (((bitsz_t)((uint8_t const *)self->base - (uint8_t const *)get_data(imp))) << 3);
-        
-        if (start > self->elem_count){
-            start = self->elem_count;
-            count = 0;
-        }
-        else if (count > self->elem_count) {
-            count = self->elem_count;
-        }
-        if (start + count > self->elem_count) {
-            count = self->elem_count - start;
-        }
-        target->elem_count = count;
-        offset += (bitsz_t)start * self->elem_bits;
-        target->base = &((uint8_t *)get_data(imp))[offset >> 3];
-        target->bit_offset = (uint8_t)offset & 0x07;
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KDataBufferSub (const KDataBuffer *self,
-    KDataBuffer *target, uint64_t start, uint64_t count)
-{
-    rc_t rc = KDataBufferSubInt ( self, target, start, count );
-    cc ( self );
-    return rc;
-}
-
-static
-rc_t KDataBufferCastInt(const KDataBuffer *self, KDataBuffer *target, uint64_t new_elem_bits, bool can_shrink)
-{
-    bitsz_t bits;
-    size_t new_elem_count;
-    bitsz_t new_bits;
-
-    if (self == NULL)
-        return RC (rcRuntime, rcBuffer, rcCasting, rcSelf, rcNull);
-    if (target == NULL)
-    	return RC (rcRuntime, rcBuffer, rcCasting, rcParam, rcNull);
-    if (new_elem_bits == 0)
-    	return RC (rcRuntime, rcBuffer, rcCasting, rcParam, rcInvalid);
-    
-    bits = KDataBufferBits(self);
-    new_elem_count = bits / new_elem_bits;
-    new_bits = new_elem_bits * new_elem_count;
-    
-    if (new_bits != bits && ! (can_shrink && new_bits < bits))
-        return RC(rcRuntime, rcBuffer, rcCasting, rcParam, rcInvalid);
-
-    /* check alignment - if new element size is integral power of 2 and >= 16 bits */
-    if ( ( ( new_elem_bits - 1 ) & new_elem_bits ) == 0 && new_elem_bits >= 16 )
-    {
-        uint64_t elem_bytes = new_elem_bits >> 3;
-        if ( ( ( size_t ) self -> base & ( elem_bytes - 1 ) ) != 0 )
-        {
-            buffer_impl_t * buffer = ( buffer_impl_t * ) self -> ignore;
-            size_t total_bytes = KDataBufferBytes ( self );
-
-#if DEBUG_ALIGNMENT
-            fprintf ( stderr, "NOTICE: %s - adjusting pointer alignment of %zu byte buffer: ", __func__, total_bytes );
-#endif
-
-            /* need to realign data */
-            if ( ( const KDataBuffer * ) target == self && atomic32_read ( & buffer -> refcount ) == 1 )
-            {
-#if DEBUG_ALIGNMENT
-                fprintf ( stderr, "using memmove within buffer\n" );
-#endif
-                /* can simply memmove */
-                memmove ( buffer + 1, target -> base, total_bytes );
-                target -> base = buffer + 1;
-                assert ( ( ( size_t ) target -> base & ( BASE_PTR_ALIGNMENT - 1 ) ) == 0 );
-
-                /* perform cast */
-                target-> elem_count = new_elem_count;
-                target-> elem_bits = new_elem_bits;
-            }
-            else
-            {
-                /* must realloc */
-                KDataBuffer tmp;
-                rc_t rc = KDataBufferMakeBytes ( & tmp, total_bytes );
-                if ( rc != 0 )
-                    return rc;
-                assert ( ( ( size_t ) tmp . base & ( BASE_PTR_ALIGNMENT - 1 ) ) == 0 );
-
-#if DEBUG_ALIGNMENT
-                fprintf ( stderr, "reallocating and copying buffer\n" );
-#endif
-                /* copy */
-                memcpy ( tmp . base, self -> base, total_bytes );
-
-                /* if assigning target would overwrite self, whack original */
-                if ( ( const KDataBuffer * ) target == self )
-                    KDataBufferWhack ( target );
-
-                /* new buffer is now output */
-                * target = tmp;
-            }
-
-            return 0;
-        }
-    }
-
-    if ((const KDataBuffer *)target != self)
-    {
-        *target = *self;
-        target->ignore = test_add_ref((buffer_impl_t *)self->ignore);
-    }
-
-    target->elem_count = new_elem_count;
-    target->elem_bits = new_elem_bits;
-
-    return 0;
-
-}
-
-LIB_EXPORT rc_t CC KDataBufferCast(const KDataBuffer *self, KDataBuffer *target, uint64_t new_elem_bits, bool can_shrink)
-{
-    rc_t rc = KDataBufferCastInt ( self, target, new_elem_bits, can_shrink );
-    cc ( self );
-    return rc;
-}
-
-static rc_t KDataBufferMakeWritableInt (const KDataBuffer *cself, KDataBuffer *target)
-{
-    if (cself == NULL)
-    	return RC(rcRuntime, rcBuffer, rcConstructing, rcParam, rcNull);
-    
-    if (target == NULL)
-    	return RC(rcRuntime, rcBuffer, rcConstructing, rcParam, rcNull);
-
-    if ((KDataBuffer const *)target != cself)
-        memset(target, 0, sizeof(*target));
-    
-    if (cself->ignore == NULL)
-        return KDataBufferMake(target, cself->elem_bits, cself->elem_count);
-    else {
-        buffer_impl_t *self = (buffer_impl_t *)cself->ignore;
-        buffer_impl_t *copy;
-        
-        if (cself->base == get_data(self) && cself->bit_offset == 0) {
-            /* not a sub-buffer */
-            copy = make_copy(self);
-            if (copy) {
-                if ((KDataBuffer const *)target == cself)
-                    release(self);
-                else 
-                    *target = *cself;
-                target->ignore = copy;
-                target->base = (uint8_t *)get_data(copy);
-                
-                return 0;
-            }
-            return RC(rcRuntime, rcBuffer, rcAllocating, rcMemory, rcExhausted);
-        }
-        else if (atomic32_read(&self->refcount) == 1) {
-            /* sub-buffer but is only reference so let it be */
-            if ((KDataBuffer const *)target != cself) {
-                *target = *cself;
-                atomic32_set(&self->refcount, 2);
-            }
-            return 0;
-        }
-        else {
-            /* sub-buffer so make new and copy */
-            rc_t rc;
-            
-            rc = allocate(&copy, roundup(KDataBufferBytes(cself), 12));
-            if (rc == 0) {
-                if (cself->bit_offset == 0)
-                    memcpy((void *)get_data(copy), cself->base, KDataBufferBytes(cself));
-                else
-                    bitcpy((void *)get_data(copy), 0, cself->base, cself->bit_offset, KDataBufferBits(cself));
-
-                if ((const KDataBuffer *)target == cself)
-                    release(self);
-                else 
-                    *target = *cself;
-                target->ignore = copy;
-                target->base = (uint8_t *)get_data(copy);
-                target->bit_offset = 0;
-                return 0;
-            }
-            return rc;
-        }
-    }
-}
-
-LIB_EXPORT rc_t CC KDataBufferMakeWritable (const KDataBuffer *cself, KDataBuffer *target)
-{
-    rc_t rc = KDataBufferMakeWritableInt ( cself, target );
-    cc ( cself );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDataBufferWhack (KDataBuffer *self)
-{
-    cc ( self );
-    if (self)
-    {
-        if (self->ignore)
-            release((buffer_impl_t *)self->ignore);
-
-        memset(self, 0, sizeof(*self));
-    }
-    return 0;
-}
-
-LIB_EXPORT bool CC KDataBufferWritable(const KDataBuffer *cself)
-{
-    cc ( cself );
-    return (cself != NULL && cself->ignore != NULL &&
-            atomic32_read(&((buffer_impl_t *)cself->ignore)->refcount) == 1) ? true : false;
-}
-
-LIB_EXPORT rc_t CC KDataBufferShrink(KDataBuffer *self)
-{
-    rc_t rc = 0;
-    if (self && self->ignore) {
-        rc = shrink((buffer_impl_t **)&self->ignore,
-            (self->elem_bits * self->elem_count + self->bit_offset + 7) / 8);
-        cc ( self );
-    }
-    return rc;
-}
-
-LIB_EXPORT size_t CC KDataBufferMemorySize(KDataBuffer const *self)
-{
-    cc ( self );
-    if (self && self->ignore) {
-        return ((buffer_impl_t const *)self->ignore)->allocated + sizeof(buffer_impl_t);
-    }
-    return 0;
-}
-
-/* CheckIntegrity
- *  performs some level of integrity checking on buffer structure
- */
-LIB_EXPORT rc_t CC KDataBufferCheckIntegrity (const KDataBuffer *self)
-{
-    /* whether NULL is allowed is determined by caller */
-    if (self == NULL)
-        return RC (rcRuntime, rcBuffer, rcValidating, rcSelf, rcNull);
-
-    /* elem-bits must not be 0, unless there is no allocation */
-    if (self->elem_bits == 0)
-    {
-        if (self->elem_count == 0 && self->bit_offset == 0 && self->ignore == NULL) {
-            /* no allocation */
-            return 0;
-        }
-	    return RC (rcRuntime, rcBuffer, rcValidating, rcSelf, rcCorrupt);
-    }
-
-    /* if there is no allocation, check self */
-    if (self->ignore == NULL)
-    {
-        if (self->elem_count != 0 || self->bit_offset != 0)
-	    return RC (rcRuntime, rcBuffer, rcValidating, rcSelf, rcCorrupt);
-    }
-
-    /* test self against allocated buffer */
-    return buffer_impl_check_integrity (self->ignore, (const void*) self->base,
-        self->bit_offset / self->elem_bits, KDataBufferBytes (self));
-}
-
-/* 0x101e9b000 */
diff --git a/libs/klib/debug.c b/libs/klib/debug.c
deleted file mode 100644
index 62ab1bf..0000000
--- a/libs/klib/debug.c
+++ /dev/null
@@ -1,352 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#if _DEBUGGING
-
-#include <klib/extern.h>
-#include <klib/debug.h>
-#include "writer-priv.h"
-#include <sysalloc.h>
-
-/* PUT THIS IN A CORRECT PLACE */
-#define _module(mod) \
-    KDbgFlag DBG_PASTE_3(DBG_,mod,_ANY) = ( DBG_PASTE_2(mod,_CONDITIONS()) 0);
-#define _condition(mod,flag) \
-    (((KDbgFlag)1)<<DBG_PASTE_4(DBG_,mod,_,flag)) |
-
-MODULE_NAMES()
-
-#undef _module
-#undef _condition
-
-#define _module(mod)                            \
-    dbg_s_flag DBG_PASTE_2(dbg_s_flag_,mod) [] = \
-    {                                            \
-        DBG_PASTE_2(mod,_CONDITIONS())           \
-        { NULL, DBG_FLAG_NONE }                      \
-    };
-
-#define _condition(mod,flag)                                           \
-    { DBG_STRING(flag), ((KDbgFlag)1)<<DBG_PASTE_4(DBG_,mod,_,flag) },
-
-MODULE_NAMES()
-
-#undef _module
-#undef _condition
-
-#define _module(mod)                           \
-    {                                           \
-        DBG_STRING(mod),                         \
-        DBG_PASTE_2(dbg_s_flag_,mod),        \
-        0                                       \
-    },
-
-dbg_s_mod dbg_flag_mod [] = 
-{
-    MODULE_NAMES()
-    { NULL, NULL }
-};
-#undef _module
-
-#define _module(mod) 
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <stdio.h>
-#include <string.h>
-
-KWrtHandler G_dbg_handler;
-
-
-/*  ********************************************************
-
-    setters and getters to find out what causes file-acces
-
-    ******************************************************** */
-
-uint64_t dbg_row_id;
-char dbg_col_name[ 128 ];
-
-
-LIB_EXPORT void CC KDbgSetRowId( uint64_t row_id )
-{
-    dbg_row_id = row_id;
-}
-
-
-LIB_EXPORT uint64_t CC KDbgGetRowId( void )
-{
-    return dbg_row_id;
-}
-
-LIB_EXPORT void CC KDbgSetColName( const char * col_name )
-{
-    if ( col_name != NULL )
-        string_copy ( dbg_col_name, sizeof dbg_col_name, col_name, string_size( col_name ) );
-    else
-        dbg_col_name[ 0 ] = 0;
-}
-
-LIB_EXPORT const char * CC KDbgGetColName( void )
-{
-    return dbg_col_name;
-}
-
-
-/*  ********************************************************  */
-
-/*
- * Init()
- * Initialize the debug messages module to a known state
- */
-LIB_EXPORT rc_t CC KDbgInit( void )
-{
-    KDbgHandlerSetStdErr();
-    dbg_row_id = 0;
-    dbg_col_name[ 0 ] = 0;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KDbgMsg ( const char * fmt, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, fmt );
-
-    if( (rc = vkfprintf(KDbgHandlerGet (), NULL, fmt, args)) != 0 ) {
-        kfprintf(KDbgHandlerGet(), NULL, "dbgmsg failure: %R in '%s'\n", rc, fmt);
-    }
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT KDbgFlag CC KDbgCondToFlag( KDbgCond cond )
-{
-    return (((KDbgFlag)1)<<cond);
-}
-
-/*
- * For module 'mod' turn on or off the specific flags in
- * mask flags
- *
- * bits in mask are effected.
- * return previous 
- */
-LIB_EXPORT KDbgMask CC KDbgSetModConds( KDbgMod mod, KDbgMask mask, KDbgMask flags )
-{
-    KDbgMask previous;
-
-    if ((mod < 0) || (mod >= DBG_MOD_COUNT))
-    {
-        /* unmaskable debug message */
-        KDbgMsg ("%s: Undefined module: (%u)\n", __func__, mod);
-        return DBG_FLAG_NONE;
-    }
-    previous = dbg_flag_mod[mod].flags;
-
-    dbg_flag_mod[mod].flags = (flags & mask) | (previous & ~mask);
-
-    return previous;
-}
-
-
-LIB_EXPORT bool CC KDbgTestModConds( KDbgMod mod, KDbgMask flags )
-{
-    if (mod >= DBG_MOD_COUNT)
-    {
-        /* unmaskable debug message */
-        KDbgMsg ("%s: Undefined module: (%u)\n", __func__, mod);
-        return false;
-    }
-    return DBG_FLAG_NONE != (KDbgGetModFlags (mod) & flags);
-}
-
-
-/*
- * Get the KDbgMod associated with a name.
- */
-LIB_EXPORT rc_t CC KDbgGetModId( KDbgMod * mod, 
-                   const char * mod_name, size_t mod_size )
-{
-    KDbgMod idx;
-
-    for (idx = 0; idx < DBG_MOD_COUNT; ++idx)
-    {
-        if (strncmp (dbg_flag_mod[idx].name, mod_name, mod_size) == 0)
-        {
-            *mod = idx;
-            return 0;
-        }
-    }
-    *mod = DBG_MOD_NOT_FOUND;
-    return RC (rcRuntime, rcLog, rcAccessing, rcParam, rcNotFound);
-}
-
-
-/*
- * Get the KDbgCond associated with a name.
- */
-LIB_EXPORT rc_t CC KDbgGetCndFlag( KDbgMod mod, KDbgFlag * flag,
-                      const char * cnd_name, size_t cnd_size )
-{
-    const dbg_s_flag * cnd;
-
-    for (cnd = dbg_flag_mod[mod].conds; cnd->name != NULL; ++cnd)
-    {
-        if (strncmp (cnd_name, cnd->name, cnd_size) == 0)
-            break;
-    }
-    if (cnd->name == NULL)
-        return RC (rcRuntime, rcArgv, rcAccessing, rcParam, rcUndefined);
-
-    *flag = cnd->flag;
-    return 0;
-}
-
-LIB_EXPORT KDbgMask CC KDbgGetModFlags( KDbgMod mod )
-{
-    if ((mod < 0) || (mod >= DBG_MOD_COUNT))
-    {
-        /* unmaskable debug message */
-        KDbgMsg ("%s: Undefined module: (%u)\n", __func__, mod);
-        return DBG_FLAG_NONE;
-    }
-    return dbg_flag_mod[mod].flags;
-}
-
-/* 
- * param is coming in as utf-8/ASCII with NUL terminator or we fail
- * we also assume no more than 127 significant characters
- *
- * These strings can be utf-8 or ASCII even if we are using 
- * clib strXXX functions.
- */
-LIB_EXPORT rc_t CC KDbgSetString( const char * string )
-{
-    const char * mod_s;
-    const char * flag_s;
-    size_t mod_z;
-
-    KDbgMod mod;
-
-    rc_t rc;
-
-    mod_s = string;
-
-    if (mod_s == NULL)
-        return RC (rcRuntime, rcArgv, rcAccessing, rcParam, rcNull);
-    if (*mod_s == '\0')
-        return 0;
-
-    flag_s = strchr (mod_s, '-');
-    if (flag_s)
-    {
-        mod_z = (size_t)(flag_s - mod_s);
-
-        if (*(++flag_s) == '\0')
-            flag_s = NULL;
-    }
-    else
-        mod_z = strlen (mod_s);
-
-    rc = KDbgGetModId (&mod, mod_s, mod_z);
-    if (rc)
-        return rc;
-
-    /* now we have a id for the module so we need to figure out the flag */
-
-    if (flag_s == NULL)
-    {
-        dbg_flag_mod[mod].flags = ~(KDbgMask)0;
-        rc = 0;
-    }
-    else
-    {
-        const dbg_s_flag * cnd;
-
-        for (cnd = dbg_flag_mod[mod].conds; cnd->name != NULL; ++cnd)
-        {
-            if (strcmp (flag_s, cnd->name) == 0)
-                break;
-        }
-        if (cnd->name == NULL)
-            return RC (rcRuntime, rcArgv, rcAccessing, rcParam, rcUndefined);
-
-        dbg_flag_mod[mod].flags |= cnd->flag;
-
-    }
-    return 0;
-}
-
-/* -----
- * Handlers for application and library writers.
- */
-
-#undef KDbgHandlerSetStdOut
-LIB_EXPORT rc_t CC KDbgHandlerSetStdOut( void )
-{
-    return KDbgHandlerSet( KWrt_DefaultWriter,KWrt_DefaultWriterDataStdOut );
-}
-
-
-#undef KDbgHandlerSetStdErr
-LIB_EXPORT rc_t CC KDbgHandlerSetStdErr( void )
-{
-    return KDbgHandlerSet( KWrt_DefaultWriter,KWrt_DefaultWriterDataStdErr );
-}
-
-
-#undef KDbgHandlerSet
-LIB_EXPORT rc_t CC KDbgHandlerSet( KWrtWriter writer, void * writer_data )
-{
-    G_dbg_handler.writer = writer;
-    G_dbg_handler.data = writer_data;
-    return 0;
-}
-
-#undef KDbgWriterDataGet
-LIB_EXPORT void * CC KDbgWriterDataGet( void )
-{
-    return ( KDbgHandlerGet()->data );
-}
-
-
-#undef KDbgWriterGet
-LIB_EXPORT KWrtWriter CC KDbgWriterGet( void )
-{
-    return ( KDbgHandlerGet()->writer );
-}
-
-
-#undef KDbgHandlerGet
-LIB_EXPORT KWrtHandler * CC KDbgHandlerGet( void )
-{
-    return ( &G_dbg_handler );
-}
-
-#endif /* _DEBUGGING */
diff --git a/libs/klib/iso8859-1.c b/libs/klib/iso8859-1.c
deleted file mode 100644
index e62cdc9..0000000
--- a/libs/klib/iso8859-1.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <sysalloc.h>
-#include <stdint.h>
-
-LIB_EXPORT const uint32_t iso8859_1 [ 128 ] =
-{
-    /*  +       0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15 */
-    /* 128 */   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-    /* 144 */   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-    /* 160 */ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
-    /* 176 */ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
-    /* 192 */ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
-    /* 208 */ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
-    /* 224 */ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
-    /* 240 */ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
diff --git a/libs/klib/iso8859.c b/libs/klib/iso8859.c
deleted file mode 100644
index 0973624..0000000
--- a/libs/klib/iso8859.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/text.h>
-#include <sysalloc.h>
-#include <assert.h>
-
-/* iso8859_utf32
- *  converts 8-bit text to a single UTF32 character
- *  returns the number of 8-bit bytes consumed, such that:
- *    return > 0 means success
- *    return == 0 means insufficient input
- *    return < 0 means bad input
- */
-LIB_EXPORT int CC iso8859_utf32 ( const uint32_t map [ 128 ],
-    uint32_t *cp, const char *begin, const char *end )
-{
-    uint32_t ch;
-
-    if ( begin == NULL || end == NULL )
-        return -1;
-    if ( begin >= end )
-        return 0;
-
-    ch = begin [ 0 ];
-    if ( begin [ 0 ] < 0 )
-    {
-        ch = map [ ch & 0x7F ];
-        if ( ch == 0 )
-            return -1;
-    }
-
-    * cp = ch;
-    return 1;
-}
-
-/* iso8859_string_size/len/measure
- *  measures UTF-16 strings
- */
-LIB_EXPORT size_t CC iso8859_string_size ( const uint32_t map [ 128 ],
-    const char *str )
-{
-    uint32_t i, ch;
-
-    for ( ch = str [ i = 0 ]; ch != 0; ch = str [ ++ i ] )
-    {
-        if ( ( int ) ch < 0 && map [ ch & 0x7F ] == 0 )
-            break;
-    }
-
-    return ( size_t ) i;
-}
-
-LIB_EXPORT uint32_t CC iso8859_string_len ( const uint32_t map [ 128 ],
-    const char *str, size_t size )
-{
-    uint32_t i;
-
-    for ( i = 0; i < ( uint32_t ) size; ++ i )
-    {
-        uint32_t ch = str [ i ];
-        if ( str [ i ] < 0 && map [ ch & 0x7F ] == 0 )
-            break;
-    }
-
-    return i;
-}
-
-LIB_EXPORT uint32_t CC iso8859_string_measure ( const uint32_t map [ 128 ],
-    const char *str, size_t *size )
-{
-    uint32_t i, ch;
-
-    for ( ch = str [ i = 0 ]; ch != 0; ch = str [ ++ i ] )
-    {
-        if ( ( int ) ch < 0 && map [ ch & 0x7F ] == 0 )
-            break;
-    }
-
-    * size = i;
-    return i;
-}
-
-/* conversion from ISO-8859-x to internal standard */
-LIB_EXPORT uint32_t CC iso8859_cvt_string_len ( const uint32_t map [ 128 ],
-    const char *src, size_t src_size, size_t *dst_size )
-{
-    size_t size;
-    uint32_t i;
-
-    for ( i = 0, size = 0; i < ( uint32_t ) src_size; ++ i )
-    {
-        uint32_t ch = src [ i ];
-        if ( src [ i ] < 0 )
-        {
-            int ch_len;
-            char ignore [ 8 ];
-
-            ch = map [ ch & 0x7F ];
-            if ( ch == 0 )
-                break;
-
-            ch_len = utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch );
-            if ( ch_len <= 0 )
-                break;
-
-            size += ch_len;
-        }
-        else
-        {
-            ++ size;
-        }
-    }
-
-    * dst_size = size;
-
-    return i;
-}
-
-LIB_EXPORT uint32_t CC iso8859_cvt_string_measure ( const uint32_t map [ 128 ],
-    const char *src, size_t *src_size, size_t *dst_size )
-{
-    size_t size;
-    uint32_t i, ch;
-
-    for ( ch = src [ i = 0 ], size = 0; ch != 0; ch = src [ ++ i ] )
-    {
-        if ( ( int ) ch < 0 )
-        {
-            int ch_len;
-            char ignore [ 8 ];
-
-            ch = map [ ch & 0x7F ];
-            if ( ch == 0 )
-                break;
-
-            ch_len = utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch );
-            if ( ch_len <= 0 )
-                break;
-
-            size += ch_len;
-        }
-        else
-        {
-            ++ size;
-        }
-    }
-
-    * src_size = ( size_t ) i;
-    * dst_size = size;
-
-    return i;
-}
-
-LIB_EXPORT size_t CC iso8859_cvt_string_copy ( const uint32_t map [ 128 ],
-    char *dst, size_t dst_size, const char *src, size_t src_size )
-{
-    char *begin = dst;
-    char *dend = dst + dst_size;
-    const char *send = src + src_size;
-
-    while ( dst < dend && src < send )
-    {
-        int ch_len;
-        uint32_t ch = * src ++;
-        if ( ( int ) ch < 0 )
-        {
-            ch = map [ ch & 0x7F ];
-            if ( ch == 0 )
-                break;
-        }
-        ch_len = utf32_utf8 ( dst, dend, ch );
-        if ( ch_len <= 0 )
-            break;
-        dst += ch_len;
-    }
-
-    if ( dst < dend )
-        * dst = 0;
-    return ( size_t ) ( dst - begin );
-}
diff --git a/libs/klib/judy-vector.c b/libs/klib/judy-vector.c
deleted file mode 100644
index 9e34f6f..0000000
--- a/libs/klib/judy-vector.c
+++ /dev/null
@@ -1,1793 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/vector.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#define JUST_DEFINE_YOUR_STUFF 1
-#include "Judy.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * KVector
- *  encapsulated vector interface
- *
- *  a vector obeys a particular set of messages
- *  it may be implemented as an array, but not necessarily.
- *
- *  the principal property of a vector is that it acts as a map
- *  between an integer key and a value of some type. in this case,
- *  we only accept unsigned integers as keys.
- */
-struct KVector
-{
-    void *nancy;
-    KRefcount refcount;
-    uint32_t fixed_size;
-    bool nancy_bool;
-};
-
-
-/* Make
- *  create an empty vector
- */
-LIB_EXPORT rc_t CC KVectorMake ( KVector **vp )
-{
-    rc_t rc;
-
-    if ( vp == NULL )
-        rc = RC ( rcCont, rcVector, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KVector *v = calloc ( 1, sizeof * v );
-        if ( v == NULL )
-            rc = RC ( rcCont, rcVector, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            KRefcountInit ( & v -> refcount, 1, "KVector", "make", "v" );
-            * vp = v;
-            return 0;
-        }
-
-        * vp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* Whack
- */
-static
-rc_t KVectorWhack ( KVector *self )
-{
-    if ( self -> nancy != NULL )
-    {
-        JError_t err;
-        Word_t whee =
-            ( self -> nancy_bool ? Judy1FreeArray : JudyLFreeArray )
-            ( & self -> nancy, & err );
-        ( void ) whee;
-    }
-
-    free ( self );
-    return 0;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KVectorAddRef ( const KVector *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KVector" ) )
-        {
-        case krefOkay:
-            break;
-        case krefLimit:
-            return RC ( rcCont, rcVector, rcAttaching, rcRange, rcExcessive );
-        default:
-            return RC ( rcCont, rcVector, rcAttaching, rcRefcount, rcDestroyed );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KVectorRelease ( const KVector *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KVector" ) )
-        {
-        case krefOkay:
-            break;
-        case krefWhack:
-        case krefZero:
-            return KVectorWhack ( ( KVector* ) self );
-        default:
-            return RC ( rcCont, rcVector, rcReleasing, rcRefcount, rcDestroyed );
-        }
-    }
-    return 0;
-}
-
-
-/* NancyError
- *  translate a JError_t to an rc_t
- */
-static
-rc_t NancyError ( const JError_t *err, enum RCContext ctx )
-{
-    switch ( JU_ERRNO ( err ) )
-    {
-    case JU_ERRNO_NONE:
-        break;
-    case JU_ERRNO_FULL:
-        return RC ( rcCont, rcVector, ctx, rcRange, rcExcessive );
-    case JU_ERRNO_NOMEM:
-        return RC ( rcCont, rcVector, ctx, rcMemory, rcExhausted );
-    case JU_ERRNO_NULLPPARRAY:
-    case JU_ERRNO_NULLPINDEX:
-        return RC ( rcCont, rcVector, ctx, rcParam, rcNull );
-    case JU_ERRNO_NOTJUDY1:
-    case JU_ERRNO_NOTJUDYL:
-    case JU_ERRNO_NOTJUDYSL:
-        return RC ( rcCont, rcVector, ctx, rcType, rcIncorrect );
-    case JU_ERRNO_OVERRUN:
-    case JU_ERRNO_CORRUPT:
-        return RC ( rcCont, rcVector, ctx, rcVector, rcCorrupt );
-    case JU_ERRNO_NONNULLPARRAY:
-    case JU_ERRNO_NULLPVALUE:
-    case JU_ERRNO_UNSORTED:
-        return RC ( rcCont, rcVector, ctx, rcParam, rcInvalid );
-    }
-
-    return 0;
-}
-
-
-/* Get
- *  get an untyped value
- *  returns rc_t state of rcNull if index is not set
- *
- *  "key" [ IN ] - vector index
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for value
- *
- *  "bytes" [ OUT ] - return parameter for bytes in value
- *
- * NB - if rc_t state is rcInsufficient, "bytes" will contain
- *  the number of bytes required to access the indexed value
- */
-static
-rc_t Nancy1Test ( const void *nancy, uint64_t idx, bool *value )
-{
-    JError_t err;
-    int data = Judy1Test ( nancy, ( Word_t ) idx, & err );
-    if ( data == JERR )
-        return NancyError ( & err, rcAccessing );
-    * value = data != 0;
-    return 0;
-}
-
-static
-rc_t NancyLGet ( const void *nancy, uint64_t idx, Word_t *value )
-{
-    JError_t err;
-    PPvoid_t datap = JudyLGet ( nancy, ( Word_t ) idx, & err );
-    if ( datap == NULL )
-        return RC ( rcCont, rcVector, rcAccessing, rcItem, rcNotFound );
-    if ( datap == PPJERR )
-        return NancyError ( & err, rcAccessing );
-
-    * value = * ( const Word_t* ) datap;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KVectorGet ( const KVector *self, uint64_t key,
-    void *buffer, size_t bsize, size_t *bytes )
-{
-    rc_t rc;
-
-    if ( bytes == NULL )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcCont, rcVector, rcAccessing, rcSelf, rcNull );
-        else if ( buffer == NULL && bsize != 0 )
-            rc = RC ( rcCont, rcVector, rcAccessing, rcParam, rcNull );
-        else if ( sizeof key > sizeof ( Word_t ) && ( key >> 32 ) != 0 )
-            rc = RC ( rcCont, rcVector, rcAccessing, rcRange, rcExcessive );
-        else
-        {
-            if ( self -> nancy_bool )
-            {
-                bool data;
-                rc = Nancy1Test ( self -> nancy, key, & data );
-                if ( rc == 0 )
-                {
-                    * bytes = sizeof data;
-                    if ( bsize < sizeof data )
-                        rc = RC ( rcCont, rcVector, rcAccessing, rcBuffer, rcInsufficient );
-                    else
-                        * ( bool* ) buffer = data;
-                    return rc;
-                }
-            }
-            else
-            {
-                Word_t data;
-                rc = NancyLGet ( self -> nancy, key, & data );
-                if ( rc == 0 )
-                {
-                    if ( self -> fixed_size == 0 )
-                        rc = RC ( rcCont, rcVector, rcAccessing, rcFunction, rcUnsupported );
-                    else
-                    {
-                        * bytes = self -> fixed_size;
-                        if ( bsize < self -> fixed_size )
-                            rc = RC ( rcCont, rcVector, rcAccessing, rcBuffer, rcInsufficient );
-                        else switch ( self -> fixed_size )
-                        {
-                        case 1:
-                            if ( data >= 0x100 )
-                                rc = RC ( rcCont, rcVector, rcAccessing, rcData, rcCorrupt );
-                            * ( uint8_t* ) buffer = ( uint8_t ) data;
-                            break;
-                        case 2:
-                            if ( data >= 0x10000 )
-                                rc = RC ( rcCont, rcVector, rcAccessing, rcData, rcCorrupt );
-                            * ( uint16_t* ) buffer = ( uint16_t ) data;
-                            break;
-                        case 4:
-                            if ( sizeof data > 4 && ( ( uint64_t ) data >> 32 ) != 0 )
-                                rc = RC ( rcCont, rcVector, rcAccessing, rcData, rcCorrupt );
-                            * ( uint32_t* ) buffer = ( uint32_t ) data;
-                            break;
-                        case 8:
-                            * ( uint64_t* ) buffer = ( uint64_t ) data;
-                            break;
-                        default:
-                            rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-                        }
-                        return rc;
-                    }
-                }
-            }
-        }
-
-        * bytes = 0;
-    }
-
-    return rc;
-}
-
-/* Get
- *  get typed values
- *  returns rc_t state of rcNull if index is not set
- *
- *  "key" [ IN ] - vector index
- *
- *  "data" [ OUT ] - return parameter for value
- */
-
-#if _ARCH_BITS == 64
-
-//#define bstored_bits_t size_t //uint64_t
-
-#define KVectorBoolGetStoredBits KVectorGetU64
-#define KVectorBoolSetStoredBits KVectorSetU64
-#define KVectorBoolVisitStoredBits KVectorVisitU64
-#define KVectorBoolGetFirstStoredBits KVectorGetFirstU64
-#define KVectorBoolGetPrevStoredBits KVectorGetPrevU64
-#define KVectorBoolGetNextStoredBits KVectorGetNextU64
-
-#elif _ARCH_BITS == 32
-
-//#define bstored_bits_t size_t //uint32_t
-
-#define KVectorBoolGetStoredBits KVectorGetU32
-#define KVectorBoolSetStoredBits KVectorSetU32
-#define KVectorBoolVisitStoredBits KVectorVisitU32
-#define KVectorBoolGetFirstStoredBits KVectorGetFirstU32
-#define KVectorBoolGetPrevStoredBits KVectorGetPrevU32
-#define KVectorBoolGetNextStoredBits KVectorGetNextU32
-
-#endif
-
-
-#define BOOL_VECT_RECORD_SIZE_IN_BITS (size_t)2
-#define BOOL_VECT_BIT_SET_MASK        (size_t)0x2
-#define BOOL_VECT_BIT_VALUE_MASK      (size_t)0x1
-#define BOOL_VECT_BIT_RECORD_MASK     (size_t)(BOOL_VECT_BIT_SET_MASK | BOOL_VECT_BIT_VALUE_MASK)
-
-
-LIB_EXPORT rc_t CC KVectorGetBoolOld ( const KVector *self, uint64_t key, bool *data )
-{
-    size_t bytes;
-    return KVectorGet ( self, key, data, sizeof * data, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetBool ( const KVector *self, uint64_t key, bool *data )
-{
-    rc_t rc = 0;
-    size_t stored_bits;
-    uint64_t key_qword = key / (sizeof(stored_bits) * 8 / BOOL_VECT_RECORD_SIZE_IN_BITS);
-    size_t bit_offset_in_qword = (key % (sizeof(stored_bits) * 8 / BOOL_VECT_RECORD_SIZE_IN_BITS)) * BOOL_VECT_RECORD_SIZE_IN_BITS;
-
-    size_t record;
-
-    if ( data == NULL )
-        return RC ( rcCont, rcVector, rcAccessing, rcParam, rcNull );
-
-    rc = KVectorBoolGetStoredBits ( self, key_qword, & stored_bits );
-    if ( rc )
-        return rc;
-
-    record = stored_bits >> bit_offset_in_qword;
-    if ( ( record & BOOL_VECT_BIT_SET_MASK ) == 0 )
-    {
-        * data = false;
-        return RC ( rcCont, rcVector, rcAccessing, rcItem, rcNotFound );
-    }
-    * data = (bool) (record & BOOL_VECT_BIT_VALUE_MASK);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KVectorGetI8 ( const KVector *self, uint64_t key, int8_t *data )
-{
-    size_t bytes;
-    return KVectorGet ( self, key, data, sizeof * data, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetI16 ( const KVector *self, uint64_t key, int16_t *data )
-{
-    size_t bytes;
-    return KVectorGet ( self, key, data, sizeof * data, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetI32 ( const KVector *self, uint64_t key, int32_t *data )
-{
-    size_t bytes;
-    return KVectorGet ( self, key, data, sizeof * data, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetI64 ( const KVector *self, uint64_t key, int64_t *data )
-{
-    size_t bytes;
-    return KVectorGet ( self, key, data, sizeof * data, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetU8 ( const KVector *self, uint64_t key, uint8_t *data )
-{
-    size_t bytes;
-    return KVectorGet ( self, key, data, sizeof * data, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetU16 ( const KVector *self, uint64_t key, uint16_t *data )
-{
-    size_t bytes;
-    return KVectorGet ( self, key, data, sizeof * data, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetU32 ( const KVector *self, uint64_t key, uint32_t *data )
-{
-    size_t bytes;
-    return KVectorGet ( self, key, data, sizeof * data, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetU64 ( const KVector *self, uint64_t key, uint64_t *data )
-{
-    size_t bytes;
-    return KVectorGet ( self, key, data, sizeof * data, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetF32 ( const KVector *self, uint64_t key, float *data )
-{
-    size_t bytes;
-    rc_t rc = KVectorGet ( self, key, data, sizeof * data, & bytes );
-    if ( rc == 0 && bytes != sizeof * data )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KVectorGetF64 ( const KVector *self, uint64_t key, double *data )
-{
-    size_t bytes;
-    rc_t rc = KVectorGet ( self, key, data, sizeof * data, & bytes );
-    if ( rc == 0 && bytes != sizeof * data )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KVectorGetPtr ( const KVector *self, uint64_t key, void **data )
-{
-    size_t bytes;
-    rc_t rc = KVectorGet ( self, key, data, sizeof * data, & bytes );
-    if ( rc == 0 && bytes != sizeof * data )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-    return rc;
-}
-
-
-/* GetFirst
- *  get first non-null element
- *  returns key of found element in "first"
- */
-
-static
-rc_t NancyLGetFirst ( const void *nancy, uint64_t * first, Word_t * value )
-{
-    JError_t err;
-    Word_t idx = 0;
-    PPvoid_t datap = JudyLFirst ( nancy, & idx, & err );
-    if ( datap == NULL )
-        return RC ( rcCont, rcVector, rcAccessing, rcItem, rcNotFound );
-    if ( datap == PPJERR )
-        return NancyError ( & err, rcAccessing );
-
-    * first = idx;
-    * value = * ( const Word_t* ) datap;
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KVectorGetFirst ( const KVector *self, uint64_t *first,
-    void * buffer, size_t bsize, size_t * bytes )
-{
-    rc_t rc;
-
-    if ( bytes == NULL )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcCont, rcVector, rcAccessing, rcSelf, rcNull );
-        else if ( buffer == NULL && bsize != 0 )
-            rc = RC ( rcCont, rcVector, rcAccessing, rcParam, rcNull );
-        else if ( self -> nancy_bool )
-            rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-        else
-        {
-            Word_t data;
-            rc = NancyLGetFirst ( self -> nancy, first, & data );
-            if ( rc == 0 )
-            {
-                if ( self -> fixed_size == 0 )
-                    rc = RC ( rcCont, rcVector, rcAccessing, rcFunction, rcUnsupported );
-                else
-                {
-                    * bytes = self -> fixed_size;
-                    if ( bsize < self -> fixed_size )
-                        rc = RC ( rcCont, rcVector, rcAccessing, rcBuffer, rcInsufficient );
-                    else switch ( self -> fixed_size )
-                    {
-                    case 1:
-                        if ( data >= 0x100 )
-                            rc = RC ( rcCont, rcVector, rcAccessing, rcData, rcCorrupt );
-                        * ( uint8_t* ) buffer = ( uint8_t ) data;
-                        break;
-                    case 2:
-                        if ( data >= 0x10000 )
-                            rc = RC ( rcCont, rcVector, rcAccessing, rcData, rcCorrupt );
-                        * ( uint16_t* ) buffer = ( uint16_t ) data;
-                        break;
-                    case 4:
-                        if ( sizeof data > 4 && ( ( uint64_t ) data >> 32 ) != 0 )
-                            rc = RC ( rcCont, rcVector, rcAccessing, rcData, rcCorrupt );
-                        * ( uint32_t* ) buffer = ( uint32_t ) data;
-                        break;
-                    case 8:
-                        * ( uint64_t* ) buffer = ( uint64_t ) data;
-                        break;
-                    default:
-                        rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-                    }
-                    return rc;
-                }
-            }
-        }
-
-        * bytes = 0;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KVectorGetFirstBool ( const KVector *self, uint64_t *first, bool *data )
-{
-    rc_t rc;
-    uint64_t i;
-    size_t stored_bits;
-    const uint64_t width = sizeof stored_bits * 8 / BOOL_VECT_RECORD_SIZE_IN_BITS;
-
-    /* THIS IS INCORRECT - have to test "self" first to return correct error code */
-    if ( data == NULL )
-        return RC ( rcCont, rcVector, rcAccessing, rcParam, rcNull );
-
-    rc = KVectorBoolGetFirstStoredBits ( self, first, & stored_bits );
-    while ( rc == 0 && stored_bits == 0 )
-        rc = KVectorBoolGetNextStoredBits ( self, first, * first, & stored_bits );
-    if ( rc != 0 )
-        return rc;
-
-    * first *= width;
-
-    for ( i = 0; i < width; ++ i )
-    {
-        if ( ( stored_bits & ( ( size_t ) BOOL_VECT_BIT_SET_MASK << i * BOOL_VECT_RECORD_SIZE_IN_BITS ) ) != 0 )
-            break;
-    }
-
-    * first += i;
-    * data = ( bool ) ( ( stored_bits >> i * BOOL_VECT_RECORD_SIZE_IN_BITS ) & BOOL_VECT_BIT_VALUE_MASK );
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KVectorGetFirstI8 ( const KVector *self, uint64_t *first, int8_t *value )
-{
-    size_t bytes;
-    return KVectorGetFirst ( self, first, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetFirstI16 ( const KVector *self, uint64_t *first, int16_t *value )
-{
-    size_t bytes;
-    return KVectorGetFirst ( self, first, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetFirstI32 ( const KVector *self, uint64_t *first, int32_t *value )
-{
-    size_t bytes;
-    return KVectorGetFirst ( self, first, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetFirstI64 ( const KVector *self, uint64_t *first, int64_t *value )
-{
-    size_t bytes;
-    return KVectorGetFirst ( self, first, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetFirstU8 ( const KVector *self, uint64_t *first, uint8_t *value )
-{
-    size_t bytes;
-    return KVectorGetFirst ( self, first, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetFirstU16 ( const KVector *self, uint64_t *first, uint16_t *value )
-{
-    size_t bytes;
-    return KVectorGetFirst ( self, first, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetFirstU32 ( const KVector *self, uint64_t *first, uint32_t *value )
-{
-    size_t bytes;
-    return KVectorGetFirst ( self, first, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetFirstU64 ( const KVector *self, uint64_t *first, uint64_t *value )
-{
-    size_t bytes;
-    return KVectorGetFirst ( self, first, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetFirstF32 ( const KVector *self, uint64_t *first, float *value )
-{
-    size_t bytes;
-    rc_t rc = KVectorGetFirst ( self, first, value, sizeof * value, & bytes );
-    if ( rc == 0 && bytes != sizeof * value )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KVectorGetFirstF64 ( const KVector *self, uint64_t *first, double *value )
-{
-    size_t bytes;
-    rc_t rc = KVectorGetFirst ( self, first, value, sizeof * value, & bytes );
-    if ( rc == 0 && bytes != sizeof * value )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KVectorGetFirstPtr ( const KVector *self, uint64_t *first, void **value )
-{
-    size_t bytes;
-    rc_t rc = KVectorGetFirst ( self, first, value, sizeof * value, & bytes );
-    if ( rc == 0 && bytes != sizeof * value )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-    return rc;
-}
-
-/* GetPrev
- *  given a starting key, get first previous non-null element
- *  returns key of found element in "prev"
- *
- *  "prev" [ OUT ] - pointer to vector index of the returned value
- *
- *  "key" [ IN ] - vector index
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for value
- *
- *  "bytes" [ OUT ] - return parameter for bytes in value
- *
- * NB - if rc_t state is rcInsufficient, "bytes" will contain
- *  the number of bytes required to access the indexed value
-*/
-
-static
-rc_t Nancy1TestPrev ( const void *nancy, uint64_t* prev, uint64_t idx, bool *value )
-{
-    JError_t err;
-    int data;
-    *prev = idx;
-    data = Judy1Prev ( nancy, ( Word_t* ) prev, & err );
-    if ( data == JERR )
-        return NancyError ( & err, rcAccessing );
-    * value = data != 0;
-    return 0;
-}
-
-static
-rc_t NancyLGetPrev ( const void *nancy, uint64_t* prev, uint64_t idx, Word_t *value )
-{
-    JError_t err;
-    PPvoid_t datap;
-    *prev = idx;
-    datap = JudyLPrev ( nancy, ( Word_t* ) prev, & err );
-    if ( datap == NULL )
-        return RC ( rcCont, rcVector, rcAccessing, rcItem, rcNotFound );
-    if ( datap == PPJERR )
-        return NancyError ( & err, rcAccessing );
-
-    * value = * ( const Word_t* ) datap;
-    return 0;
-}
-
-KLIB_EXTERN rc_t CC KVectorGetPrev ( const KVector *self, uint64_t *prev,
-    uint64_t key, void *value_buffer, size_t bsize, size_t *bytes )
-{
-    rc_t rc;
-
-    if ( bytes == NULL )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcCont, rcVector, rcAccessing, rcSelf, rcNull );
-        else if ( ( value_buffer == NULL && bsize != 0 ) || prev == NULL )
-            rc = RC ( rcCont, rcVector, rcAccessing, rcParam, rcNull );
-        else if ( sizeof key > sizeof ( Word_t ) && ( key >> 32 ) != 0 )
-            rc = RC ( rcCont, rcVector, rcAccessing, rcRange, rcExcessive );
-        else
-        {
-            if ( self -> nancy_bool )
-            {
-                bool data;
-                rc = Nancy1TestPrev ( self -> nancy, prev, key, & data );
-                if ( rc == 0 )
-                {
-                    * bytes = sizeof data;
-                    if ( bsize < sizeof data )
-                        rc = RC ( rcCont, rcVector, rcAccessing, rcBuffer, rcInsufficient );
-                    else
-                        * ( bool* ) value_buffer = data;
-                    return rc;
-                }
-            }
-            else
-            {
-                Word_t data;
-                rc = NancyLGetPrev ( self -> nancy, prev, key, & data );
-                if ( rc == 0 )
-                {
-                    if ( self -> fixed_size == 0 )
-                        rc = RC ( rcCont, rcVector, rcAccessing, rcFunction, rcUnsupported );
-                    else
-                    {
-                        * bytes = self -> fixed_size;
-                        if ( bsize < self -> fixed_size )
-                            rc = RC ( rcCont, rcVector, rcAccessing, rcBuffer, rcInsufficient );
-                        else switch ( self -> fixed_size )
-                        {
-                        case 1:
-                            if ( data >= 0x100 )
-                                rc = RC ( rcCont, rcVector, rcAccessing, rcData, rcCorrupt );
-                            * ( uint8_t* ) value_buffer = ( uint8_t ) data;
-                            break;
-                        case 2:
-                            if ( data >= 0x10000 )
-                                rc = RC ( rcCont, rcVector, rcAccessing, rcData, rcCorrupt );
-                            * ( uint16_t* ) value_buffer = ( uint16_t ) data;
-                            break;
-                        case 4:
-                            if ( sizeof data > 4 && ( ( uint64_t ) data >> 32 ) != 0 )
-                                rc = RC ( rcCont, rcVector, rcAccessing, rcData, rcCorrupt );
-                            * ( uint32_t* ) value_buffer = ( uint32_t ) data;
-                            break;
-                        case 8:
-                            * ( uint64_t* ) value_buffer = ( uint64_t ) data;
-                            break;
-                        default:
-                            rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-                        }
-                        return rc;
-                    }
-                }
-            }
-        }
-
-        * bytes = 0;
-    }
-
-    return rc;
-}
-
-/* GetPrev
- *  get prev typed values
- *  returns rc_t state of rcNull if index is not set
- *
- *  "prev" [ OUT ] - pointer to vector index of the returned value
- *
- *  "key" [ IN ] - vector index
- *
- *  "data" [ OUT ] - return parameter for value
- */
-
-LIB_EXPORT rc_t CC KVectorGetPrevBoolOld ( const KVector *self,
-    uint64_t *prev, uint64_t key, bool *value )
-{
-    size_t bytes;
-    return KVectorGetPrev ( self, prev, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetPrevBool ( const KVector *self,
-    uint64_t *prev, uint64_t key, bool *value )
-{
-    rc_t rc = 0;
-    size_t stored_bits = 0;
-    uint64_t key_qword = key / (sizeof(stored_bits) * 8 / BOOL_VECT_RECORD_SIZE_IN_BITS);
-    size_t bit_offset_in_qword = (key % (sizeof(stored_bits) * 8 / BOOL_VECT_RECORD_SIZE_IN_BITS)) * BOOL_VECT_RECORD_SIZE_IN_BITS;
-
-    if ( bit_offset_in_qword )
-    {
-        rc = KVectorBoolGetStoredBits ( self, key_qword, & stored_bits );
-        if ( rc && rc != RC ( rcCont, rcVector, rcAccessing, rcItem, rcNotFound ))
-            return rc;
-    }
-
-    for (;;)
-    {
-        size_t record;
-
-        for (; bit_offset_in_qword; )
-        {
-            bit_offset_in_qword -= BOOL_VECT_RECORD_SIZE_IN_BITS;
-
-            record = stored_bits >> bit_offset_in_qword & BOOL_VECT_BIT_RECORD_MASK;
-            if ( record & BOOL_VECT_BIT_SET_MASK )
-            {
-                *value = (bool) (record & BOOL_VECT_BIT_VALUE_MASK);
-                *prev = key_qword * (sizeof(stored_bits) * 8 / BOOL_VECT_RECORD_SIZE_IN_BITS) |
-                        (uint64_t)(bit_offset_in_qword / BOOL_VECT_RECORD_SIZE_IN_BITS);
-                goto EXIT;
-            }
-        }
-
-        rc = KVectorBoolGetPrevStoredBits ( self, & key_qword, key_qword, & stored_bits );
-        if (rc)
-            break;
-        bit_offset_in_qword = sizeof(stored_bits) * 8;
-    }
-
-    EXIT:
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KVectorGetPrevI8 ( const KVector *self,
-    uint64_t *prev, uint64_t key, int8_t *value )
-{
-    size_t bytes;
-    return KVectorGetPrev ( self, prev, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetPrevI16 ( const KVector *self,
-    uint64_t *prev, uint64_t key, int16_t *value )
-{
-    size_t bytes;
-    return KVectorGetPrev ( self, prev, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetPrevI32 ( const KVector *self,
-    uint64_t *prev, uint64_t key, int32_t *value )
-{
-    size_t bytes;
-    return KVectorGetPrev ( self, prev, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetPrevI64 ( const KVector *self,
-    uint64_t *prev, uint64_t key, int64_t *value )
-{
-    size_t bytes;
-    return KVectorGetPrev ( self, prev, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetPrevU8 ( const KVector *self,
-    uint64_t *prev, uint64_t key, uint8_t *value )
-{
-    size_t bytes;
-    return KVectorGetPrev ( self, prev, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetPrevU16 ( const KVector *self,
-    uint64_t *prev, uint64_t key, uint16_t *value )
-{
-    size_t bytes;
-    return KVectorGetPrev ( self, prev, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetPrevU32 ( const KVector *self,
-    uint64_t *prev, uint64_t key, uint32_t *value )
-{
-    size_t bytes;
-    return KVectorGetPrev ( self, prev, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetPrevU64 ( const KVector *self,
-    uint64_t *prev, uint64_t key, uint64_t *value )
-{
-    size_t bytes;
-    return KVectorGetPrev ( self, prev, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetPrevF32 ( const KVector *self,
-    uint64_t *prev, uint64_t key, float *value )
-{
-    size_t bytes;
-    rc_t rc = KVectorGetPrev ( self, prev, key, value, sizeof * value, & bytes );
-    if ( rc == 0 && bytes != sizeof * value )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KVectorGetPrevF64 ( const KVector *self,
-    uint64_t *prev, uint64_t key, double *value )
-{
-    size_t bytes;
-    rc_t rc = KVectorGetPrev ( self, prev, key, value, sizeof * value, & bytes );
-    if ( rc == 0 && bytes != sizeof * value )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KVectorGetPrevPtr ( const KVector *self,
-    uint64_t *prev, uint64_t key, void **value )
-{
-    size_t bytes;
-    rc_t rc = KVectorGetPrev ( self, prev, key, value, sizeof * value, & bytes );
-    if ( rc == 0 && bytes != sizeof * value )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-    return rc;
-}
-
-/* GetNext
- *  given a starting key, get first following non-null element
- *  returns key of found element in "next"
- *
- *  "next" [ OUT ] - pointer to vector index of the returned value
- *
- *  "key" [ IN ] - vector index
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for value
- *
- *  "bytes" [ OUT ] - return parameter for bytes in value
- *
- * NB - if rc_t state is rcInsufficient, "bytes" will contain
- *  the number of bytes required to access the indexed value
-*/
-
-static
-rc_t Nancy1TestNext ( const void *nancy, uint64_t* next, uint64_t idx, bool *value )
-{
-    JError_t err;
-    int data;
-    *next = idx;
-    data = Judy1Next ( nancy, ( Word_t* ) next, & err );
-    if ( data == JERR )
-        return NancyError ( & err, rcAccessing );
-    * value = data != 0;
-    return 0;
-}
-
-static
-rc_t NancyLGetNext ( const void *nancy, uint64_t* next, uint64_t idx, Word_t *value )
-{
-    JError_t err;
-    PPvoid_t datap;
-    *next = idx;
-    datap = JudyLNext ( nancy, ( Word_t* ) next, & err );
-    if ( datap == NULL )
-        return RC ( rcCont, rcVector, rcAccessing, rcItem, rcNotFound );
-    if ( datap == PPJERR )
-        return NancyError ( & err, rcAccessing );
-
-    * value = * ( const Word_t* ) datap;
-    return 0;
-}
-
-KLIB_EXTERN rc_t CC KVectorGetNext ( const KVector *self, uint64_t *next,
-    uint64_t key, void *value_buffer, size_t bsize, size_t *bytes )
-{
-    rc_t rc;
-
-    if ( bytes == NULL )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcCont, rcVector, rcAccessing, rcSelf, rcNull );
-        else if ( ( value_buffer == NULL && bsize != 0 ) || next == NULL )
-            rc = RC ( rcCont, rcVector, rcAccessing, rcParam, rcNull );
-        else if ( sizeof key > sizeof ( Word_t ) && ( key >> 32 ) != 0 )
-            rc = RC ( rcCont, rcVector, rcAccessing, rcRange, rcExcessive );
-        else
-        {
-            if ( self -> nancy_bool )
-            {
-                bool data;
-                rc = Nancy1TestNext ( self -> nancy, next, key, & data );
-                if ( rc == 0 )
-                {
-                    * bytes = sizeof data;
-                    if ( bsize < sizeof data )
-                        rc = RC ( rcCont, rcVector, rcAccessing, rcBuffer, rcInsufficient );
-                    else
-                        * ( bool* ) value_buffer = data;
-                    return rc;
-                }
-            }
-            else
-            {
-                Word_t data;
-                rc = NancyLGetNext ( self -> nancy, next, key, & data );
-                if ( rc == 0 )
-                {
-                    if ( self -> fixed_size == 0 )
-                        rc = RC ( rcCont, rcVector, rcAccessing, rcFunction, rcUnsupported );
-                    else
-                    {
-                        * bytes = self -> fixed_size;
-                        if ( bsize < self -> fixed_size )
-                            rc = RC ( rcCont, rcVector, rcAccessing, rcBuffer, rcInsufficient );
-                        else switch ( self -> fixed_size )
-                        {
-                        case 1:
-                            if ( data >= 0x100 )
-                                rc = RC ( rcCont, rcVector, rcAccessing, rcData, rcCorrupt );
-                            * ( uint8_t* ) value_buffer = ( uint8_t ) data;
-                            break;
-                        case 2:
-                            if ( data >= 0x10000 )
-                                rc = RC ( rcCont, rcVector, rcAccessing, rcData, rcCorrupt );
-                            * ( uint16_t* ) value_buffer = ( uint16_t ) data;
-                            break;
-                        case 4:
-                            if ( sizeof data > 4 && ( ( uint64_t ) data >> 32 ) != 0 )
-                                rc = RC ( rcCont, rcVector, rcAccessing, rcData, rcCorrupt );
-                            * ( uint32_t* ) value_buffer = ( uint32_t ) data;
-                            break;
-                        case 8:
-                            * ( uint64_t* ) value_buffer = ( uint64_t ) data;
-                            break;
-                        default:
-                            rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-                        }
-                        return rc;
-                    }
-                }
-            }
-        }
-
-        * bytes = 0;
-    }
-
-    return rc;
-}
-
-/* GetNext
- *  get next typed values
- *  returns rc_t state of rcNull if index is not set
- *
- *  "next" [ OUT ] - pointer to vector index of the returned value
- *
- *  "key" [ IN ] - vector index
- *
- *  "data" [ OUT ] - return parameter for value
- */
-
-LIB_EXPORT rc_t CC KVectorGetNextBoolOld ( const KVector *self,
-    uint64_t *next, uint64_t key, bool *value )
-{
-    size_t bytes;
-    return KVectorGetNext ( self, next, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetNextBool ( const KVector *self,
-    uint64_t *next, uint64_t key, bool *value )
-{
-    rc_t rc = 0;
-    size_t stored_bits = 0;
-    uint64_t key_qword = key / (sizeof(stored_bits) * 8 / BOOL_VECT_RECORD_SIZE_IN_BITS);
-    size_t bit_offset_in_qword = (key % (sizeof(stored_bits) * 8 / BOOL_VECT_RECORD_SIZE_IN_BITS)) * BOOL_VECT_RECORD_SIZE_IN_BITS;
-
-    size_t const MAX_BIT_OFFSET = sizeof(stored_bits) * 8 - BOOL_VECT_RECORD_SIZE_IN_BITS;
-
-    /* unless the "previous" value is the last entry in a word,
-       try to get the word and look for its next value */
-    if ( bit_offset_in_qword != MAX_BIT_OFFSET )
-    {
-        /* if the initial value does not exist, this may fail */
-        rc = KVectorBoolGetStoredBits ( self, key_qword, & stored_bits );
-        if ( rc != 0 )
-        {
-            /* any failure other than "not found" is considered hard */
-            if ( GetRCState ( rc ) != rcNotFound )
-                return rc;
-
-            /* the "key" passed in may be fake. */
-            rc = KVectorBoolGetNextStoredBits ( self, & key_qword, key_qword, & stored_bits );
-        }
-    }
-
-    for (;;)
-    {
-        size_t record;
-
-        for (; bit_offset_in_qword != MAX_BIT_OFFSET; )
-        {
-            bit_offset_in_qword += BOOL_VECT_RECORD_SIZE_IN_BITS;
-
-            record = stored_bits >> bit_offset_in_qword & BOOL_VECT_BIT_RECORD_MASK;
-            if ( record & BOOL_VECT_BIT_SET_MASK )
-            {
-                *value = (bool) (record & BOOL_VECT_BIT_VALUE_MASK);
-                *next = key_qword * (sizeof(stored_bits) * 8 / BOOL_VECT_RECORD_SIZE_IN_BITS) |
-                        (uint64_t)(bit_offset_in_qword / BOOL_VECT_RECORD_SIZE_IN_BITS);
-                goto EXIT;
-            }
-        }
-
-        rc = KVectorBoolGetNextStoredBits ( self, & key_qword, key_qword, & stored_bits );
-        if (rc)
-            break;
-        bit_offset_in_qword = 0 - BOOL_VECT_RECORD_SIZE_IN_BITS;
-    }
-
-    EXIT:
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KVectorGetNextI8 ( const KVector *self,
-    uint64_t *next, uint64_t key, int8_t *value )
-{
-    size_t bytes;
-    return KVectorGetNext ( self, next, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetNextI16 ( const KVector *self,
-    uint64_t *next, uint64_t key, int16_t *value )
-{
-    size_t bytes;
-    return KVectorGetNext ( self, next, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetNextI32 ( const KVector *self,
-    uint64_t *next, uint64_t key, int32_t *value )
-{
-    size_t bytes;
-    return KVectorGetNext ( self, next, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetNextI64 ( const KVector *self,
-    uint64_t *next, uint64_t key, int64_t *value )
-{
-    size_t bytes;
-    return KVectorGetNext ( self, next, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetNextU8 ( const KVector *self,
-    uint64_t *next, uint64_t key, uint8_t *value )
-{
-    size_t bytes;
-    return KVectorGetNext ( self, next, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetNextU16 ( const KVector *self,
-    uint64_t *next, uint64_t key, uint16_t *value )
-{
-    size_t bytes;
-    return KVectorGetNext ( self, next, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetNextU32 ( const KVector *self,
-    uint64_t *next, uint64_t key, uint32_t *value )
-{
-    size_t bytes;
-    return KVectorGetNext ( self, next, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetNextU64 ( const KVector *self,
-    uint64_t *next, uint64_t key, uint64_t *value )
-{
-    size_t bytes;
-    return KVectorGetNext ( self, next, key, value, sizeof * value, & bytes );
-}
-
-LIB_EXPORT rc_t CC KVectorGetNextF32 ( const KVector *self,
-    uint64_t *next, uint64_t key, float *value )
-{
-    size_t bytes;
-    rc_t rc = KVectorGetNext ( self, next, key, value, sizeof * value, & bytes );
-    if ( rc == 0 && bytes != sizeof * value )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KVectorGetNextF64 ( const KVector *self,
-    uint64_t *next, uint64_t key, double *value )
-{
-    size_t bytes;
-    rc_t rc = KVectorGetNext ( self, next, key, value, sizeof * value, & bytes );
-    if ( rc == 0 && bytes != sizeof * value )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KVectorGetNextPtr ( const KVector *self,
-    uint64_t *next, uint64_t key, void **value )
-{
-    size_t bytes;
-    rc_t rc = KVectorGetNext ( self, next, key, value, sizeof * value, & bytes );
-    if ( rc == 0 && bytes != sizeof * value )
-        rc = RC ( rcCont, rcVector, rcAccessing, rcType, rcUnsupported );
-    return rc;
-}
-
-/* Set
- *  set an untyped value
- *
- *  "key" [ IN ] - vector index
- *
- *  "data" [ IN ] and "bytes" [ IN ] - value buffer
- */
-static
-rc_t Nancy1Set ( void **nancy, uint64_t idx, bool value )
-{
-    JError_t err;
-    int status = ( value ? Judy1Set : Judy1Unset ) ( nancy, ( Word_t ) idx, & err );
-    if ( status == JERR )
-        return NancyError ( & err, rcWriting );
-    return 0;
-}
-
-static
-rc_t NancyLSet ( void **nancy, uint64_t idx, Word_t value )
-{
-    JError_t err;
-    PPvoid_t datap = JudyLIns ( nancy, ( Word_t ) idx, & err );
-    if ( datap == NULL )
-        return RC ( rcCont, rcVector, rcWriting, rcMemory, rcExhausted );
-    if ( datap == PPJERR )
-        return NancyError ( & err, rcWriting );
-    * ( Word_t* ) datap = value;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KVectorSet ( KVector *self, uint64_t key,
-    const void *data, size_t bytes )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcCont, rcVector, rcWriting, rcSelf, rcNull );
-    else if ( data == NULL )
-        rc = RC ( rcCont, rcVector, rcWriting, rcParam, rcNull );
-    else if ( bytes == 0 )
-        rc = RC ( rcCont, rcVector, rcWriting, rcParam, rcEmpty );
-    else
-    {
-        Word_t value;
-
-        /* detect first set */
-        if ( self -> nancy == NULL )
-        {
-            switch ( bytes )
-            {
-            case 1:
-            case 2:
-            case 4:
-                break;
-            case 8:
-                if ( sizeof value < 8 )
-                    return RC ( rcCont, rcVector, rcWriting, rcParam, rcExcessive );
-            }
-
-            self -> fixed_size = ( uint32_t ) bytes;
-        }
-        else if ( bytes != ( size_t ) self -> fixed_size )
-        {
-            return RC ( rcCont, rcVector, rcWriting, rcParam, rcInconsistent );
-        }
-        else if ( self -> nancy_bool )
-        {
-            /* clang gets upset about switching on boolean
-               the intent is to catch implementations that
-               may treat anything non-zero as true. */
-            switch ( ( uint32_t ) * ( const bool* ) data )
-            {
-            case 0:
-            case 1:
-                break;
-            default:
-                return RC ( rcCont, rcVector, rcWriting, rcParam, rcInvalid );
-            }
-            return Nancy1Set ( & self -> nancy, key, * ( const bool* ) data );
-        }
-
-        switch ( bytes )
-        {
-        case 1:
-            value = * ( const uint8_t* ) data;
-            break;
-        case 2:
-            value = * ( const uint16_t* ) data;
-            break;
-        case 4:
-            value = * ( const uint32_t* ) data;
-            break;
-        case 8:
-            value = ( Word_t ) * ( const uint64_t* ) data;
-            break;
-        }
-
-        rc = NancyLSet ( & self -> nancy, key, value );
-    }
-
-    return rc;
-}
-
-/* Set
- *  set typed values
- *
- *  "key" [ IN ] - vector index
- *
- *  "data" [ IN ] - value
- */
-LIB_EXPORT rc_t CC KVectorSetBoolOld ( KVector *self, uint64_t key, bool data )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcCont, rcVector, rcWriting, rcSelf, rcNull );
-    else
-    {
-        /* detect first set */
-        if ( self -> nancy == NULL )
-        {
-            self -> fixed_size = sizeof data;
-            self -> nancy_bool = true;
-        }
-        else if ( ! self -> nancy_bool )
-        {
-            return RC ( rcCont, rcVector, rcWriting, rcParam, rcInvalid );
-        }
-
-        rc = Nancy1Set ( & self -> nancy, key, data );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KVectorSetBool ( KVector *self, uint64_t key, bool data )
-{
-    rc_t rc;
-
-    size_t stored_bits = 0;
-    uint64_t key_qword = key / (sizeof(stored_bits) * 8 / BOOL_VECT_RECORD_SIZE_IN_BITS);
-    size_t bit_offset_in_qword = (key % (sizeof(stored_bits) * 8 / BOOL_VECT_RECORD_SIZE_IN_BITS)) * BOOL_VECT_RECORD_SIZE_IN_BITS;
-    size_t new_bit_record;
-    size_t stored_bit_record;
-
-    data = !!data; /* forcing bool to be E {0, 1} */
-
-    rc = KVectorBoolGetStoredBits ( self, key_qword, &stored_bits );
-    if ( rc != 0 )
-    {
-        if ( GetRCState ( rc ) != rcNotFound )
-            return rc;
-
-        assert ( stored_bits == 0 );
-        rc = 0;
-    }
-
-    new_bit_record = (BOOL_VECT_BIT_SET_MASK | (uint64_t)data) << bit_offset_in_qword;
-    stored_bit_record = BOOL_VECT_BIT_RECORD_MASK << bit_offset_in_qword & stored_bits;
-
-    assert ( new_bit_record != 0 );
-    assert ( rc == 0 );
-
-    if ( new_bit_record != stored_bit_record )
-    {
-        stored_bits &= ~(BOOL_VECT_BIT_RECORD_MASK << bit_offset_in_qword); // clear stored record to assign a new value by bitwise OR
-        stored_bits |= new_bit_record;
-
-        rc = KVectorBoolSetStoredBits ( self, key_qword, stored_bits );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KVectorSetI8 ( KVector *self, uint64_t key, int8_t value )
-{
-    return KVectorSet ( self, key, & value, sizeof value );
-}
-
-LIB_EXPORT rc_t CC KVectorSetI16 ( KVector *self, uint64_t key, int16_t value )
-{
-    return KVectorSet ( self, key, & value, sizeof value );
-}
-
-LIB_EXPORT rc_t CC KVectorSetI32 ( KVector *self, uint64_t key, int32_t value )
-{
-    return KVectorSet ( self, key, & value, sizeof value );
-}
-
-LIB_EXPORT rc_t CC KVectorSetI64 ( KVector *self, uint64_t key, int64_t value )
-{
-    return KVectorSet ( self, key, & value, sizeof value );
-}
-
-LIB_EXPORT rc_t CC KVectorSetU8 ( KVector *self, uint64_t key, uint8_t value )
-{
-    return KVectorSet ( self, key, & value, sizeof value );
-}
-
-LIB_EXPORT rc_t CC KVectorSetU16 ( KVector *self, uint64_t key, uint16_t value )
-{
-    return KVectorSet ( self, key, & value, sizeof value );
-}
-
-LIB_EXPORT rc_t CC KVectorSetU32 ( KVector *self, uint64_t key, uint32_t value )
-{
-    return KVectorSet ( self, key, & value, sizeof value );
-}
-
-LIB_EXPORT rc_t CC KVectorSetU64 ( KVector *self, uint64_t key, uint64_t value )
-{
-    return KVectorSet ( self, key, & value, sizeof value );
-}
-
-LIB_EXPORT rc_t CC KVectorSetF32 ( KVector *self, uint64_t key, float value )
-{
-    return KVectorSet ( self, key, & value, sizeof value );
-}
-
-LIB_EXPORT rc_t CC KVectorSetF64 ( KVector *self, uint64_t key, double value )
-{
-    return KVectorSet ( self, key, & value, sizeof value );
-}
-
-LIB_EXPORT rc_t CC KVectorSetPtr ( KVector *self, uint64_t key, const void *value )
-{
-    return KVectorSet ( self, key, & value, sizeof value );
-}
-
-
-/* Unset
- *  unset an entry
- *  returns rc_t state rcNull if index is not set
- *
- *  "key" [ IN ] - vector index
- */
-LIB_EXPORT rc_t CC KVectorUnset ( KVector *self, uint64_t key )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcCont, rcVector, rcRemoving, rcSelf, rcNull );
-    else
-    {
-        int status;
-        JError_t err;
-
-        if ( self -> nancy_bool )
-            return Nancy1Set ( & self -> nancy, key, false );
-
-        status = JudyLDel ( & self -> nancy, ( Word_t ) key, & err );
-        if ( status == JERR )
-            return NancyError ( & err, rcRemoving );
-
-        rc = 0;
-    }
-
-    return rc;
-}
-
-
-/* Visit
- *  executes a function on each key/value pair
- *  returns early if "f" returns non-zero rc_t
- *
- *  "reverse" [ IN ] - if true, execute in reverse order
- *
- *  "f" [ IN ] and "user_data" [ IN, OPAQUE ] - function to be
- *  executed on each vector element or until the function
- *  returns true.
- */
-LIB_EXPORT rc_t CC KVectorVisit ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, const void *value, size_t bytes, void *user_data ),
-    void *user_data )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcCont, rcVector, rcVisiting, rcSelf, rcNull );
-    else if ( f == NULL )
-        rc = RC ( rcCont, rcVector, rcVisiting, rcFunction, rcNull );
-    else
-    {
-        rc = 0;
-
-        if ( self -> nancy != NULL )
-        {
-            JError_t err;
-            Word_t first, last, idx;
-
-	    /** Judy1First searches for first value higher then first**/ 
-            first = 0;
-	    /** Judy1Last searches for first value lower then last **/
-            last = (Word_t)-1;
-
-            if ( self -> nancy_bool )
-            {
-                bool value = true;
-                int status = Judy1First ( self -> nancy, & first, & err );
-                if ( status != JERR )
-                    status = Judy1Last ( self -> nancy, & last, & err );
-                if ( status == JERR )
-                    rc = NancyError ( & err, rcVisiting );
-                else if ( reverse )
-                {
-                    for ( idx = last; ; )
-                    {
-                        rc = ( * f ) ( idx, & value, sizeof value, user_data );
-                        if ( rc != 0 )
-                            break;
-                        if ( idx == first )
-                            break;
-                        status = Judy1Prev ( self -> nancy, & idx, & err );
-                        if ( status == JERR )
-                        {
-                            rc = NancyError ( & err, rcVisiting );
-                            break;
-                        }
-                    }
-                }
-                else
-                {
-                    for ( idx = first; ; )
-                    {
-                        rc = ( * f ) ( idx, & value, sizeof value, user_data );
-                        if ( rc != 0 )
-                            break;
-                        if ( idx == last )
-                            break;
-                        status = Judy1Next ( self -> nancy, & idx, & err );
-                        if ( status == JERR )
-                        {
-                            rc = NancyError ( & err, rcVisiting );
-                            break;
-                        }
-                    }
-                }
-            }
-            else
-            {
-                Word_t value;
-                PPvoid_t lastp, datap = JudyLFirst ( self -> nancy, & first, & err );
-                if ( datap != PPJERR )
-                    lastp = JudyLLast ( self -> nancy, & last, & err );
-                if ( datap == PPJERR || lastp == PPJERR )
-                    rc = NancyError ( & err, rcVisiting );
-                else if ( reverse )
-                {
-                    for ( rc = 0, idx = last, datap = lastp; ; )
-                    {
-                        if ( datap == NULL )
-                            break;
-                        value = * ( const Word_t* ) datap;
-                        rc = ( * f ) ( idx, & value, sizeof value, user_data );
-                        if ( rc != 0 )
-                            break;
-                        if ( idx == first )
-                            break;
-                        datap = JudyLPrev ( self -> nancy, & idx, & err );
-                        if ( datap == PPJERR )
-                        {
-                            rc = NancyError ( & err, rcVisiting );
-                            break;
-                        }
-                    }
-                }
-                else
-                {
-                    for ( rc = 0, idx = first; ; )
-                    {
-                        if ( datap == NULL )
-                            break;
-                        value = * ( const Word_t* ) datap;
-                        rc = ( * f ) ( idx, & value, sizeof value, user_data );
-                        if ( rc != 0 )
-                            break;
-                        if ( idx == last )
-                            break;
-                        datap = JudyLNext ( self -> nancy, & idx, & err );
-                        if ( datap == PPJERR )
-                        {
-                            rc = NancyError ( & err, rcVisiting );
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* Visit
- *  visit typed values
- *  returns early if "f" returns non-zero rc_t
- *
- *  "reverse" [ IN ] - if true, execute in reverse order
- *
- *  "f" [ IN ] and "user_data" [ IN, OPAQUE ] - function to be
- *  executed on each vector element or until the function
- *  returns true.
- */
-typedef struct KVectorVisitTypedData KVectorVisitTypedData;
-struct KVectorVisitTypedData
-{
-    union
-    {
-        rc_t ( CC * b ) ( uint64_t key, bool value, void *user_data );
-        rc_t ( CC * i ) ( uint64_t key, int64_t value, void *user_data );
-        rc_t ( CC * u ) ( uint64_t key, uint64_t value, void *user_data );
-        rc_t ( CC * f ) ( uint64_t key, double value, void *user_data );
-        rc_t ( CC * p ) ( uint64_t key, const void *value, void *user_data );
-        rc_t ( CC * u32 ) ( uint64_t key, uint32_t value, void *user_data );
-    } f;
-    void *user_data;
-};
-
-static
-rc_t CC KVectorVisitBoolFunc ( uint64_t key, const void *ptr, size_t bytes, void *user_data )
-{
-    rc_t rc;
-    bool value;
-    if ( bytes != sizeof value )
-        rc = RC ( rcCont, rcVector, rcVisiting, rcType, rcInvalid );
-    else if ( * ( const uint8_t* ) ptr > 1 )
-        rc = RC ( rcCont, rcVector, rcVisiting, rcData, rcInvalid );
-    else
-    {
-        KVectorVisitTypedData *pb = user_data;
-        rc = ( * pb -> f . b ) ( key,  * ( const bool* ) ptr, pb -> user_data );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KVectorVisitBoolOld ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, bool value, void *user_data ),
-    void *user_data )
-{
-    KVectorVisitTypedData pb;
-    pb . f . b = f;
-    pb . user_data = user_data;
-
-    return KVectorVisit ( self, reverse, KVectorVisitBoolFunc, & pb );
-}
-
-typedef struct UserDataStoredBitstoBool UserDataStoredBitstoBool;
-struct UserDataStoredBitstoBool
-{
-    rc_t ( * f ) ( uint64_t key, bool value, void *user_data );
-    void* user_data;
-};
-
-static rc_t VisitStoredBitstoBoolAdapter ( uint64_t key, size_t value, void *user_data )
-{
-    rc_t ( * bool_callback ) ( uint64_t key, bool value, void *user_data );
-
-    rc_t rc = 0;
-    size_t i;
-    void* original_user_data = ((struct UserDataStoredBitstoBool*) user_data) -> user_data;
-    bool_callback = ((UserDataStoredBitstoBool*) user_data) -> f;
-
-    for ( i = 0; i < sizeof (value) * 8 / BOOL_VECT_RECORD_SIZE_IN_BITS; ++i )
-    {
-        uint64_t key_bool = key * sizeof(value) * 8 / BOOL_VECT_RECORD_SIZE_IN_BITS + i;
-        size_t record = value >> i * BOOL_VECT_RECORD_SIZE_IN_BITS & BOOL_VECT_BIT_RECORD_MASK;
-        if ( record & BOOL_VECT_BIT_SET_MASK )
-        {
-            rc = bool_callback ( key_bool, (bool) (record & BOOL_VECT_BIT_VALUE_MASK), original_user_data );
-            if ( rc )
-                return rc;
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KVectorVisitBool ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, bool value, void *user_data ),
-    void *user_data )
-{
-    UserDataStoredBitstoBool user_data_adapter = { f, user_data };
-    return KVectorBoolVisitStoredBits ( self, reverse, VisitStoredBitstoBoolAdapter, &user_data_adapter );
-}
-
-static
-rc_t CC KVectorVisitI64Func ( uint64_t key, const void *ptr, size_t bytes, void *user_data )
-{
-    int64_t value;
-    KVectorVisitTypedData *pb = user_data;
-
-    switch ( bytes )
-    {
-    case 1:
-        value = ( int8_t ) * ( const Word_t* ) ptr;
-        break;
-    case 2:
-        value = ( int16_t ) * ( const Word_t* ) ptr;
-        break;
-    case 4:
-        value = ( int32_t ) * ( const Word_t* ) ptr;
-        break;
-    default:
-        value = ( int64_t ) * ( const Word_t* ) ptr;
-    }
-
-    return ( * pb -> f . i ) ( key, value, pb -> user_data );
-}
-
-LIB_EXPORT rc_t CC KVectorVisitI64 ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, int64_t value, void *user_data ),
-    void *user_data )
-{
-    KVectorVisitTypedData pb;
-    pb . f . i = f;
-    pb . user_data = user_data;
-
-    return KVectorVisit ( self, reverse, KVectorVisitI64Func, & pb );
-}
-
-static
-rc_t CC KVectorVisitU64Func ( uint64_t key, const void *ptr, size_t bytes, void *user_data )
-{
-    KVectorVisitTypedData *pb = user_data;
-    return ( * pb -> f . u ) ( key, * ( const Word_t* ) ptr, pb -> user_data );
-}
-
-LIB_EXPORT rc_t CC KVectorVisitU64 ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, uint64_t value, void *user_data ),
-    void *user_data )
-{
-    KVectorVisitTypedData pb;
-    pb . f . u = f;
-    pb . user_data = user_data;
-
-    return KVectorVisit ( self, reverse, KVectorVisitU64Func, & pb );
-}
-
-rc_t CC KVectorVisitU32Func ( uint64_t key, const void *ptr, size_t bytes, void *user_data )
-{
-    KVectorVisitTypedData *pb = user_data;
-    return ( * pb -> f . u32 ) ( key, * ( const Word_t* ) ptr, pb -> user_data );
-}
-
-LIB_EXPORT rc_t CC KVectorVisitU32 ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, uint32_t value, void *user_data ),
-    void *user_data )
-{
-    KVectorVisitTypedData pb;
-    pb . f . u32 = f;
-    pb . user_data = user_data;
-
-    return KVectorVisit ( self, reverse, KVectorVisitU32Func, & pb );
-}
-
-static
-rc_t CC KVectorVisitF64Func ( uint64_t key, const void *ptr, size_t bytes, void *user_data )
-{
-    uint32_t u32;
-    double value;
-    KVectorVisitTypedData *pb = user_data;
-
-    switch ( bytes )
-    {
-    case 4:
-        u32 = ( uint32_t ) * ( const Word_t* ) ptr;
-        value = * ( const float* ) & u32;
-        break;
-    default:
-        value = * ( const double* ) ptr;
-    }
-
-    return ( * pb -> f . f ) ( key, value, pb -> user_data );
-}
-
-LIB_EXPORT rc_t CC KVectorVisitF64 ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, double value, void *user_data ),
-    void *user_data )
-{
-    KVectorVisitTypedData pb;
-    pb . f . f = f;
-    pb . user_data = user_data;
-
-    return KVectorVisit ( self, reverse, KVectorVisitF64Func, & pb );
-}
-
-static
-rc_t CC KVectorVisitPtrFunc ( uint64_t key, const void *ptr, size_t bytes, void *user_data )
-{
-    KVectorVisitTypedData *pb = user_data;
-    return ( * pb -> f . p ) ( key, * ( const void** ) ptr, pb -> user_data );
-}
-
-LIB_EXPORT rc_t CC KVectorVisitPtr ( const KVector *self, bool reverse,
-    rc_t ( CC * f ) ( uint64_t key, const void *value, void *user_data ),
-    void *user_data )
-{
-    KVectorVisitTypedData pb;
-    pb . f . p = f;
-    pb . user_data = user_data;
-
-    return KVectorVisit ( self, reverse, KVectorVisitPtrFunc, & pb );
-}
diff --git a/libs/klib/judy/Judy1.h b/libs/klib/judy/Judy1.h
deleted file mode 100644
index 5eeb6fd..0000000
--- a/libs/klib/judy/Judy1.h
+++ /dev/null
@@ -1,549 +0,0 @@
-#ifndef _JUDY1_INCLUDED
-#define _JUDY1_INCLUDED
-// _________________
-//
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// ****************************************************************************
-//          JUDY1 -- SMALL/LARGE AND/OR CLUSTERED/SPARSE BIT ARRAYS
-//
-//                                    -by-
-//
-//                             Douglas L. Baskins
-//                             doug at sourcejudy.com
-//
-// Judy arrays are designed to be used instead of arrays.  The performance
-// suggests the reason why Judy arrays are thought of as arrays, instead of
-// trees.  They are remarkably memory efficient at all populations.
-// Implemented as a hybrid digital tree (but really a state machine, see
-// below), Judy arrays feature fast insert/retrievals, fast near neighbor
-// searching, and contain a population tree for extremely fast ordinal related
-// retrievals.
-//
-// CONVENTIONS:
-//
-// - The comments here refer to 32-bit [64-bit] systems.
-//
-// - BranchL, LeafL refer to linear branches and leaves (small populations),
-//   except LeafL does not actually appear as such; rather, Leaf1..3 [Leaf1..7]
-//   is used to represent leaf Index sizes, and LeafW refers to a Leaf with
-//   full (long) word Indexes, which is also a type of linear leaf.  Note that
-//   root-level LeafW (Leaf4 [Leaf8]) leaves are also called LEAFW.
-//
-// - BranchB, LeafB1 refer to bitmap branches and leaves (intermediate
-//   populations).
-//
-// - BranchU refers to uncompressed branches.  An uncompressed branch has 256
-//   JPs, some of which could be null.  Note:  All leaves are compressed (and
-//   sorted), or else an expanse is full (FullPopu), so there is no LeafU
-//   equivalent to BranchU.
-//
-// - "Popu" is short for "Population".
-// - "Pop1" refers to actual population (base 1).
-// - "Pop0" refers to Pop1 - 1 (base 0), the way populations are stored in data
-//   structures.
-//
-// - Branches and Leaves are both named by the number of bytes in their Pop0
-//   field.  In the case of Leaves, the same number applies to the Index sizes.
-//
-// - The representation of many numbers as hex is a relatively safe and
-//   portable way to get desired bitpatterns as unsigned longs.
-//
-// - Some preprocessors cant handle single apostrophe characters within
-//   #ifndef code, so here, use delete all instead.
-
-#include "JudyPrivate.h"        // includes Judy.h in turn.
-#include "JudyPrivateBranch.h"
-
-
-// ****************************************************************************
-// JUDY1 ROOT POINTER (JRP) AND JUDY1 POINTER (JP) TYPE FIELDS
-// ****************************************************************************
-//
-// The following enum lists all possible JP Type fields. 
-
-typedef enum            // uint8_t -- but C does not support this type of enum.
-{
-
-// JP NULL TYPES:
-//
-// There is a series of cJ1_JPNULL* Types because each one pre-records a
-// different Index Size for when the first Index is inserted in the previously
-// null JP.  They must start >= 8 (three bits).
-//
-// Note:  These Types must be in sequential order for doing relative
-// calculations between them.
-
-        cJ1_JPNULL1 = 1,
-                                // Index Size 1[1] byte  when 1 Index inserted.
-        cJ1_JPNULL2,            // Index Size 2[2] bytes when 1 Index inserted.
-        cJ1_JPNULL3,            // Index Size 3[3] bytes when 1 Index inserted.
-
-#ifndef JU_64BIT
-#define cJ1_JPNULLMAX cJ1_JPNULL3
-#else
-        cJ1_JPNULL4,            // Index Size 4[4] bytes when 1 Index inserted.
-        cJ1_JPNULL5,            // Index Size 5[5] bytes when 1 Index inserted.
-        cJ1_JPNULL6,            // Index Size 6[6] bytes when 1 Index inserted.
-        cJ1_JPNULL7,            // Index Size 7[7] bytes when 1 Index inserted.
-#define cJ1_JPNULLMAX cJ1_JPNULL7
-#endif
-
-
-// JP BRANCH TYPES:
-//
-// Note:  There are no state-1 branches; only leaves reside at state 1.
-
-// Linear branches:
-//
-// Note:  These Types must be in sequential order for doing relative
-// calculations between them.
-
-        cJ1_JPBRANCH_L2,        // 2[2] bytes Pop0, 1[5] bytes Dcd.
-        cJ1_JPBRANCH_L3,        // 3[3] bytes Pop0, 0[4] bytes Dcd.
-
-#ifdef JU_64BIT
-        cJ1_JPBRANCH_L4,        //  [4] bytes Pop0,  [3] bytes Dcd.
-        cJ1_JPBRANCH_L5,        //  [5] bytes Pop0,  [2] bytes Dcd.
-        cJ1_JPBRANCH_L6,        //  [6] bytes Pop0,  [1] byte  Dcd.
-        cJ1_JPBRANCH_L7,        //  [7] bytes Pop0,  [0] bytes Dcd.
-#endif
-
-        cJ1_JPBRANCH_L,         // note:  DcdPopO field not used.
-
-// Bitmap branches:
-//
-// Note:  These Types must be in sequential order for doing relative
-// calculations between them.
-
-        cJ1_JPBRANCH_B2,        // 2[2] bytes Pop0, 1[5] bytes Dcd.
-        cJ1_JPBRANCH_B3,        // 3[3] bytes Pop0, 0[4] bytes Dcd.
-
-#ifdef JU_64BIT
-        cJ1_JPBRANCH_B4,        //  [4] bytes Pop0,  [3] bytes Dcd.
-        cJ1_JPBRANCH_B5,        //  [5] bytes Pop0,  [2] bytes Dcd.
-        cJ1_JPBRANCH_B6,        //  [6] bytes Pop0,  [1] byte  Dcd.
-        cJ1_JPBRANCH_B7,        //  [7] bytes Pop0,  [0] bytes Dcd.
-#endif
-
-        cJ1_JPBRANCH_B,         // note:  DcdPopO field not used.
-
-// Uncompressed branches:
-//
-// Note:  These Types must be in sequential order for doing relative
-// calculations between them.
-
-        cJ1_JPBRANCH_U2,        // 2[2] bytes Pop0, 1[5] bytes Dcd.
-        cJ1_JPBRANCH_U3,        // 3[3] bytes Pop0, 0[4] bytes Dcd.
-
-#ifdef JU_64BIT
-        cJ1_JPBRANCH_U4,        //  [4] bytes Pop0,  [3] bytes Dcd.
-        cJ1_JPBRANCH_U5,        //  [5] bytes Pop0,  [2] bytes Dcd.
-        cJ1_JPBRANCH_U6,        //  [6] bytes Pop0,  [1] byte  Dcd.
-        cJ1_JPBRANCH_U7,        //  [7] bytes Pop0,  [0] bytes Dcd.
-#endif
-
-        cJ1_JPBRANCH_U,         // note:  DcdPopO field not used.
-
-
-// JP LEAF TYPES:
-
-// Linear leaves:
-//
-// Note:  These Types must be in sequential order for doing relative
-// calculations between them.
-//
-// Note:  There is no cJ1_JPLEAF1 for 64-bit for a subtle reason.  An immediate
-// JP can hold 15 1-byte Indexes, and a bitmap leaf would be used for 17
-// Indexes, so rather than support a linear leaf for only the case of exactly
-// 16 Indexes, a bitmap leaf is used in that case.  See also below regarding
-// cJ1_LEAF1_MAXPOP1 on 64-bit systems.
-//
-// Note:  There is no full-word (4-byte [8-byte]) Index leaf under a JP because
-// non-root-state leaves only occur under branches that decode at least one
-// byte.  Full-word, root-state leaves are under a JRP, not a JP.  However, in
-// the code a "fake" JP can be created temporarily above a root-state leaf.
-
-#ifndef JU_64BIT // 32-bit only; see above.
-        cJ1_JPLEAF1,            // 1    byte  Pop0, 2    bytes Dcd.
-#endif
-
-        cJ1_JPLEAF2,            // 2[2] bytes Pop0, 1[5] bytes Dcd.
-        cJ1_JPLEAF3,            // 3[3] bytes Pop0, 0[4] bytes Dcd.
-
-#ifdef JU_64BIT
-        cJ1_JPLEAF4,            //  [4] bytes Pop0,  [3] bytes Dcd.
-        cJ1_JPLEAF5,            //  [5] bytes Pop0,  [2] bytes Dcd.
-        cJ1_JPLEAF6,            //  [6] bytes Pop0,  [1] byte  Dcd.
-        cJ1_JPLEAF7,            //  [7] bytes Pop0,  [0] bytes Dcd.
-#endif
-
-// Bitmap leaf; Index Size == 1:
-//
-// Note:  These are currently only supported at state 1.  At other states the
-// bitmap would grow from 256 to 256^2, 256^3, ... bits, which would not be
-// efficient..
-
-        cJ1_JPLEAF_B1,          // 1[1] byte Pop0, 2[6] bytes Dcd.
-
-
-// Full population; Index Size == 1 virtual leaf:
-//
-// Note:  These are currently only supported at state 1.  At other states they
-// could be used, but they would be rare and the savings are dubious.
-
-        cJ1_JPFULLPOPU1,        // 1[1] byte Pop0, 2[6] bytes Dcd.
-
-#ifdef notdef  // for future enhancements
-        cJ1_JPFULLPOPU1m1,      // Full Population - 1 
-        cJ1_JPFULLPOPU1m2,      // Full Population - 2 
-        cJ1_JPFULLPOPU1m3,      // Full Population - 3 
-        cJ1_JPFULLPOPU1m4,      // Full Population - 4 
-        cJ1_JPFULLPOPU1m5,      // Full Population - 5 
-        cJ1_JPFULLPOPU1m6,      // Full Population - 6 
-        cJ1_JPFULLPOPU1m7,      // Full Population - 7 
-
-#ifdef JU_64BIT
-        cJ1_JPFULLPOPU1m8,      // Full Population - 8 
-        cJ1_JPFULLPOPU1m9,      // Full Population - 9 
-        cJ1_JPFULLPOPU1m10,     // Full Population - 10 
-        cJ1_JPFULLPOPU1m11,     // Full Population - 11
-        cJ1_JPFULLPOPU1m12,     // Full Population - 12
-        cJ1_JPFULLPOPU1m13,     // Full Population - 13
-        cJ1_JPFULLPOPU1m14,     // Full Population - 14
-        cJ1_JPFULLPOPU1m15,     // Full Population - 15
-#endif
-#endif // notdef -- for future enhancements
-
-
-// JP IMMEDIATES; leaves (Indexes) stored inside a JP:
-//
-// The second numeric suffix is the Pop1 for each type.  As the Index Size
-// increases, the maximum possible population decreases.
-//
-// Note:  These Types must be in sequential order in each group (Index Size),
-// and the groups in correct order too, for doing relative calculations between
-// them.  For example, since these Types enumerate the Pop1 values (unlike
-// other JP Types where there is a Pop0 value in the JP), the maximum Pop1 for
-// each Index Size is computable.
-
-        cJ1_JPIMMED_1_01,       // Index Size = 1, Pop1 = 1.
-        cJ1_JPIMMED_2_01,       // Index Size = 2, Pop1 = 1.
-        cJ1_JPIMMED_3_01,       // Index Size = 3, Pop1 = 1.
-#ifdef JU_64BIT
-        cJ1_JPIMMED_4_01,       // Index Size = 4, Pop1 = 1.
-        cJ1_JPIMMED_5_01,       // Index Size = 5, Pop1 = 1.
-        cJ1_JPIMMED_6_01,       // Index Size = 6, Pop1 = 1.
-        cJ1_JPIMMED_7_01,       // Index Size = 7, Pop1 = 1.
-#endif
-
-        cJ1_JPIMMED_1_02,       // Index Size = 1, Pop1 = 2.
-        cJ1_JPIMMED_1_03,       // Index Size = 1, Pop1 = 3.
-        cJ1_JPIMMED_1_04,       // Index Size = 1, Pop1 = 4.
-        cJ1_JPIMMED_1_05,       // Index Size = 1, Pop1 = 5.
-        cJ1_JPIMMED_1_06,       // Index Size = 1, Pop1 = 6.
-        cJ1_JPIMMED_1_07,       // Index Size = 1, Pop1 = 7.
-
-#ifdef JU_64BIT
-        cJ1_JPIMMED_1_08,       // Index Size = 1, Pop1 = 8.
-        cJ1_JPIMMED_1_09,       // Index Size = 1, Pop1 = 9.
-        cJ1_JPIMMED_1_10,       // Index Size = 1, Pop1 = 10.
-        cJ1_JPIMMED_1_11,       // Index Size = 1, Pop1 = 11.
-        cJ1_JPIMMED_1_12,       // Index Size = 1, Pop1 = 12.
-        cJ1_JPIMMED_1_13,       // Index Size = 1, Pop1 = 13.
-        cJ1_JPIMMED_1_14,       // Index Size = 1, Pop1 = 14.
-        cJ1_JPIMMED_1_15,       // Index Size = 1, Pop1 = 15.
-#endif
-
-        cJ1_JPIMMED_2_02,       // Index Size = 2, Pop1 = 2.
-        cJ1_JPIMMED_2_03,       // Index Size = 2, Pop1 = 3.
-
-#ifdef JU_64BIT
-        cJ1_JPIMMED_2_04,       // Index Size = 2, Pop1 = 4.
-        cJ1_JPIMMED_2_05,       // Index Size = 2, Pop1 = 5.
-        cJ1_JPIMMED_2_06,       // Index Size = 2, Pop1 = 6.
-        cJ1_JPIMMED_2_07,       // Index Size = 2, Pop1 = 7.
-#endif
-
-        cJ1_JPIMMED_3_02,       // Index Size = 3, Pop1 = 2.
-
-#ifdef JU_64BIT
-        cJ1_JPIMMED_3_03,       // Index Size = 3, Pop1 = 3.
-        cJ1_JPIMMED_3_04,       // Index Size = 3, Pop1 = 4.
-        cJ1_JPIMMED_3_05,       // Index Size = 3, Pop1 = 5.
-
-        cJ1_JPIMMED_4_02,       // Index Size = 4, Pop1 = 2.
-        cJ1_JPIMMED_4_03,       // Index Size = 4, Pop1 = 3.
-
-        cJ1_JPIMMED_5_02,       // Index Size = 5, Pop1 = 2.
-        cJ1_JPIMMED_5_03,       // Index Size = 3, Pop1 = 3.
-
-        cJ1_JPIMMED_6_02,       // Index Size = 6, Pop1 = 2.
-
-        cJ1_JPIMMED_7_02,       // Index Size = 7, Pop1 = 2.
-#endif
-
-// This special Type is merely a sentinel for doing relative calculations.
-// This value should not be used in switch statements (to avoid allocating code
-// for it), which is also why it appears at the end of the enum list.
-
-        cJ1_JPIMMED_CAP
-
-} jp1_Type_t;
-
-
-// RELATED VALUES:
-//
-// Index Size (state) for leaf JP, and JP type based on Index Size (state):
-
-#ifndef JU_64BIT // 32-bit
-#define J1_LEAFINDEXSIZE(jpType) ((jpType)    - cJ1_JPLEAF1 + 1)
-#define J1_LEAFTYPE(IndexSize)   ((IndexSize) + cJ1_JPLEAF1 - 1)
-#else
-#define J1_LEAFINDEXSIZE(jpType) ((jpType)    - cJ1_JPLEAF2 + 2)
-#define J1_LEAFTYPE(IndexSize)   ((IndexSize) + cJ1_JPLEAF2 - 2)
-#endif
-
-
-// ****************************************************************************
-// JUDY1 POINTER (JP) -- RELATED MACROS AND CONSTANTS
-// ****************************************************************************
-
-// MAXIMUM POPULATIONS OF LINEAR LEAVES:
-//
-// Allow up to 2 cache lines per leaf, with N bytes per index.
-//
-// J_1_MAXB is the maximum number of bytes (sort of) to allocate per leaf.
-// ALLOCSIZES is defined here, not there, for single-point control of these key
-// definitions.  See JudyTables.c for "TERMINATOR".
-
-#define J_1_MAXB   (sizeof(Word_t) * 32)
-#define ALLOCSIZES { 3, 5, 7, 11, 15, 23, 32, 47, 64, TERMINATOR } // in words.
-#define cJ1_LEAF1_MAXWORDS  5           // Leaf1 max alloc size in words.
-
-// Under JRP (root-state leaves):
-//
-// Includes a count (Population) word.
-//
-// Under JP (non-root-state leaves), which have no count (Population) words:
-//
-// When a 1-byte index leaf grows above cJ1_LEAF1_MAXPOP1 Indexes (bytes),
-// the memory chunk required grows to a size where a bitmap is just as
-// efficient, so use a bitmap instead for all greater Populations, on both
-// 32-bit and 64-bit systems.  However, on a 32-bit system this occurs upon
-// going from 6 to 8 words (24 to 32 bytes) in the memory chunk, but on a
-// 64-bit system this occurs upon going from 2 to 4 words (16 to 32 bytes).  It
-// would be silly to go from a 15-Index Immediate JP to a 16-Index linear leaf
-// to a 17-Index bitmap leaf, so just use a bitmap leaf for 16+ Indexes, which
-// means set cJ1_LEAF1_MAXPOP1 to cJ1_IMMED1_MAXPOP1 (15) to cause the
-// transition at that point.
-//
-// Note:  cJ1_LEAF1_MAXPOP1 is not used on 64-bit systems.
-
-#ifndef JU_64BIT // 32-bit
-
-#define cJ1_LEAF1_MAXPOP1    (cJ1_LEAF1_MAXWORDS * cJU_BYTESPERWORD)
-#define cJ1_LEAF2_MAXPOP1    (J_1_MAXB / 2)
-#define cJ1_LEAF3_MAXPOP1    (J_1_MAXB / 3)
-#define cJ1_LEAFW_MAXPOP1    ((J_1_MAXB - cJU_BYTESPERWORD) / cJU_BYTESPERWORD)
-
-#else // 64-bit
-
-// #define cJ1_LEAF1_MAXPOP1                    // no LEAF1 in 64-bit.
-#define cJ1_LEAF2_MAXPOP1    (J_1_MAXB / 2)
-#define cJ1_LEAF3_MAXPOP1    (J_1_MAXB / 3)
-#define cJ1_LEAF4_MAXPOP1    (J_1_MAXB / 4)
-#define cJ1_LEAF5_MAXPOP1    (J_1_MAXB / 5)
-#define cJ1_LEAF6_MAXPOP1    (J_1_MAXB / 6)
-#define cJ1_LEAF7_MAXPOP1    (J_1_MAXB / 7)
-#define cJ1_LEAFW_MAXPOP1    ((J_1_MAXB - cJU_BYTESPERWORD) / cJU_BYTESPERWORD)
-
-#endif
-
-
-// MAXIMUM POPULATIONS OF IMMEDIATE JPs:
-//
-// These specify the maximum Population of immediate JPs with various Index
-// Sizes (== sizes of remaining undecoded Index bits).
-
-#define cJ1_IMMED1_MAXPOP1  ((sizeof(jp_t) - 1) / 1)    // 7 [15].
-#define cJ1_IMMED2_MAXPOP1  ((sizeof(jp_t) - 1) / 2)    // 3  [7].
-#define cJ1_IMMED3_MAXPOP1  ((sizeof(jp_t) - 1) / 3)    // 2  [5].
-
-#ifdef JU_64BIT
-#define cJ1_IMMED4_MAXPOP1  ((sizeof(jp_t) - 1) / 4)    //    [3].
-#define cJ1_IMMED5_MAXPOP1  ((sizeof(jp_t) - 1) / 5)    //    [3].
-#define cJ1_IMMED6_MAXPOP1  ((sizeof(jp_t) - 1) / 6)    //    [2].
-#define cJ1_IMMED7_MAXPOP1  ((sizeof(jp_t) - 1) / 7)    //    [2].
-#endif
-
-
-// ****************************************************************************
-// JUDY1 BITMAP LEAF (J1LB) SUPPORT
-// ****************************************************************************
-
-#define J1_JLB_BITMAP(Pjlb,Subexp)  ((Pjlb)->j1lb_Bitmap[Subexp])
-
-typedef struct J__UDY1_BITMAP_LEAF
-{
-        BITMAPL_t j1lb_Bitmap[cJU_NUMSUBEXPL];
-
-} j1lb_t, * Pj1lb_t;
-
-
-// ****************************************************************************
-// MEMORY ALLOCATION SUPPORT
-// ****************************************************************************
-
-// ARRAY-GLOBAL INFORMATION:
-//
-// At the cost of an occasional additional cache fill, this object, which is
-// pointed at by a JRP and in turn points to a JP_BRANCH*, carries array-global
-// information about a Judy1 array that has sufficient population to amortize
-// the cost.  The jpm_Pop0 field prevents having to add up the total population
-// for the array in insert, delete, and count code.  The jpm_JP field prevents
-// having to build a fake JP for entry to a state machine; however, the
-// jp_DcdPopO field in jpm_JP, being one byte too small, is not used.
-//
-// Note:  Struct fields are ordered to keep "hot" data in the first 8 words
-// (see left-margin comments) for machines with 8-word cache lines, and to keep
-// sub-word fields together for efficient packing.
-
-typedef struct J_UDY1_POPULATION_AND_MEMORY
-{
-/* 1 */ Word_t     jpm_Pop0;            // total population-1 in array.
-/* 2 */ jp_t       jpm_JP;              // JP to first branch; see above.
-/* 4 */ Word_t     jpm_LastUPop0;       // last jpm_Pop0 when convert to BranchU
-// Note:  Field names match PJError_t for convenience in macros:
-/* 7 */ char       je_Errno;            // one of the enums in Judy.h.
-/* 7/8 */ int      je_ErrID;            // often an internal source line number.
-/* 8/9 */ Word_t   jpm_TotalMemWords;   // words allocated in array.
-} j1pm_t, *Pj1pm_t;
-
-
-// TABLES FOR DETERMINING IF LEAVES HAVE ROOM TO GROW:
-//
-// These tables indicate if a given memory chunk can support growth of a given
-// object into wasted (rounded-up) memory in the chunk.  This violates the
-// hiddenness of the JudyMalloc code.
-//
-// Also define macros to hide the details in the code using these tables.
-
-#ifndef JU_64BIT
-extern const uint8_t j__1_Leaf1PopToWords[cJ1_LEAF1_MAXPOP1 + 1];
-#endif
-extern const uint8_t j__1_Leaf2PopToWords[cJ1_LEAF2_MAXPOP1 + 1];
-extern const uint8_t j__1_Leaf3PopToWords[cJ1_LEAF3_MAXPOP1 + 1];
-#ifdef JU_64BIT
-extern const uint8_t j__1_Leaf4PopToWords[cJ1_LEAF4_MAXPOP1 + 1];
-extern const uint8_t j__1_Leaf5PopToWords[cJ1_LEAF5_MAXPOP1 + 1];
-extern const uint8_t j__1_Leaf6PopToWords[cJ1_LEAF6_MAXPOP1 + 1];
-extern const uint8_t j__1_Leaf7PopToWords[cJ1_LEAF7_MAXPOP1 + 1];
-#endif
-extern const uint8_t j__1_LeafWPopToWords[cJ1_LEAFW_MAXPOP1 + 1];
-
-// Check if increase of population will fit in same leaf:
-
-#ifndef JU_64BIT
-#define J1_LEAF1GROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJ1_LEAF1_MAXPOP1, j__1_Leaf1PopToWords)
-#endif
-#define J1_LEAF2GROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJ1_LEAF2_MAXPOP1, j__1_Leaf2PopToWords)
-#define J1_LEAF3GROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJ1_LEAF3_MAXPOP1, j__1_Leaf3PopToWords)
-#ifdef JU_64BIT
-#define J1_LEAF4GROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJ1_LEAF4_MAXPOP1, j__1_Leaf4PopToWords)
-#define J1_LEAF5GROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJ1_LEAF5_MAXPOP1, j__1_Leaf5PopToWords)
-#define J1_LEAF6GROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJ1_LEAF6_MAXPOP1, j__1_Leaf6PopToWords)
-#define J1_LEAF7GROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJ1_LEAF7_MAXPOP1, j__1_Leaf7PopToWords)
-#endif
-#define J1_LEAFWGROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJ1_LEAFW_MAXPOP1, j__1_LeafWPopToWords)
-
-#ifndef JU_64BIT
-#define J1_LEAF1POPTOWORDS(Pop1)  (j__1_Leaf1PopToWords[Pop1])
-#endif
-#define J1_LEAF2POPTOWORDS(Pop1)  (j__1_Leaf2PopToWords[Pop1])
-#define J1_LEAF3POPTOWORDS(Pop1)  (j__1_Leaf3PopToWords[Pop1])
-#ifdef JU_64BIT
-#define J1_LEAF4POPTOWORDS(Pop1)  (j__1_Leaf4PopToWords[Pop1])
-#define J1_LEAF5POPTOWORDS(Pop1)  (j__1_Leaf5PopToWords[Pop1])
-#define J1_LEAF6POPTOWORDS(Pop1)  (j__1_Leaf6PopToWords[Pop1])
-#define J1_LEAF7POPTOWORDS(Pop1)  (j__1_Leaf7PopToWords[Pop1])
-#endif
-#define J1_LEAFWPOPTOWORDS(Pop1)  (j__1_LeafWPopToWords[Pop1])
-
-
-// FUNCTIONS TO ALLOCATE OBJECTS:
-
-Pj1pm_t j__udy1AllocJ1PM(void);                         // constant size.
-
-Pjbl_t  j__udy1AllocJBL(          Pj1pm_t);             // constant size.
-Pjbb_t  j__udy1AllocJBB(          Pj1pm_t);             // constant size.
-Pjp_t   j__udy1AllocJBBJP(Word_t, Pj1pm_t);
-Pjbu_t  j__udy1AllocJBU(          Pj1pm_t);             // constant size.
-
-#ifndef JU_64BIT
-Pjll_t  j__udy1AllocJLL1( Word_t, Pj1pm_t);
-#endif
-Pjll_t  j__udy1AllocJLL2( Word_t, Pj1pm_t);
-Pjll_t  j__udy1AllocJLL3( Word_t, Pj1pm_t);
-
-#ifdef JU_64BIT
-Pjll_t  j__udy1AllocJLL4( Word_t, Pj1pm_t);
-Pjll_t  j__udy1AllocJLL5( Word_t, Pj1pm_t);
-Pjll_t  j__udy1AllocJLL6( Word_t, Pj1pm_t);
-Pjll_t  j__udy1AllocJLL7( Word_t, Pj1pm_t);
-#endif
-
-Pjlw_t  j__udy1AllocJLW(  Word_t         );             // no Pj1pm needed.
-Pj1lb_t j__udy1AllocJLB1(         Pj1pm_t);             // constant size.
-
-
-// FUNCTIONS TO FREE OBJECTS:
-
-void    j__udy1FreeJ1PM( Pj1pm_t,        Pj1pm_t);      // constant size.
-
-void    j__udy1FreeJBL(  Pjbl_t,         Pj1pm_t);      // constant size.
-void    j__udy1FreeJBB(  Pjbb_t,         Pj1pm_t);      // constant size.
-void    j__udy1FreeJBBJP(Pjp_t,  Word_t, Pj1pm_t);
-void    j__udy1FreeJBU(  Pjbu_t,         Pj1pm_t);      // constant size.
-
-#ifndef JU_64BIT
-void    j__udy1FreeJLL1( Pjll_t, Word_t, Pj1pm_t);
-#endif
-void    j__udy1FreeJLL2( Pjll_t, Word_t, Pj1pm_t);
-void    j__udy1FreeJLL3( Pjll_t, Word_t, Pj1pm_t);
-
-#ifdef JU_64BIT
-void    j__udy1FreeJLL4( Pjll_t, Word_t, Pj1pm_t);
-void    j__udy1FreeJLL5( Pjll_t, Word_t, Pj1pm_t);
-void    j__udy1FreeJLL6( Pjll_t, Word_t, Pj1pm_t);
-void    j__udy1FreeJLL7( Pjll_t, Word_t, Pj1pm_t);
-#endif
-
-void    j__udy1FreeJLW(  Pjlw_t, Word_t, Pj1pm_t);
-void    j__udy1FreeJLB1( Pj1lb_t,        Pj1pm_t);      // constant size.
-void    j__udy1FreeSM(   Pjp_t,          Pj1pm_t);      // everything below Pjp.
-
-#endif // ! _JUDY1_INCLUDED
diff --git a/libs/klib/judy/Judy1Tables.32.c b/libs/klib/judy/Judy1Tables.32.c
deleted file mode 100644
index 8b57a1c..0000000
--- a/libs/klib/judy/Judy1Tables.32.c
+++ /dev/null
@@ -1,72 +0,0 @@
-// @(#) From generation tool: JudyTablesGen.c
-//
-
-#include "Judy1.h"
-// Leave the malloc() sizes readable in the binary (via strings(1)):
-const char * Judy1MallocSizes = "Judy1MallocSizes = 3, 5, 7, 11, 15, 23, 32, 47, 64, Leaf1 = 20";
-
-
-//	object uses 64 words
-//	cJU_BITSPERSUBEXPB = 32
-const uint8_t
-j__1_BranchBJPPopToWords[cJU_BITSPERSUBEXPB + 1] =
-{
-	 0,
-	 3,  5,  7, 11, 11, 15, 15, 23, 
-	23, 23, 23, 32, 32, 32, 32, 32, 
-	47, 47, 47, 47, 47, 47, 47, 64, 
-	64, 64, 64, 64, 64, 64, 64, 64
-};
-
-//	object uses 5 words
-//	cJ1_LEAF1_MAXPOP1 = 20
-const uint8_t
-j__1_Leaf1PopToWords[cJ1_LEAF1_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  3,  3,  3,  3,  3,  3, 
-	 3,  3,  3,  3,  5,  5,  5,  5, 
-	 5,  5,  5,  5
-};
-
-//	object uses 32 words
-//	cJ1_LEAF2_MAXPOP1 = 64
-const uint8_t
-j__1_Leaf2PopToWords[cJ1_LEAF2_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  3,  3,  3,  3,  5,  5, 
-	 5,  5,  7,  7,  7,  7, 11, 11, 
-	11, 11, 11, 11, 11, 11, 15, 15, 
-	15, 15, 15, 15, 15, 15, 23, 23, 
-	23, 23, 23, 23, 23, 23, 23, 23, 
-	23, 23, 23, 23, 23, 23, 32, 32, 
-	32, 32, 32, 32, 32, 32, 32, 32, 
-	32, 32, 32, 32, 32, 32, 32, 32
-};
-
-//	object uses 32 words
-//	cJ1_LEAF3_MAXPOP1 = 42
-const uint8_t
-j__1_Leaf3PopToWords[cJ1_LEAF3_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  3,  3,  5,  5,  7,  7, 
-	 7, 11, 11, 11, 11, 11, 15, 15, 
-	15, 15, 15, 15, 23, 23, 23, 23, 
-	23, 23, 23, 23, 23, 23, 32, 32, 
-	32, 32, 32, 32, 32, 32, 32, 32, 
-	32, 32
-};
-
-//	object uses 32 words
-//	cJ1_LEAFW_MAXPOP1 = 31
-const uint8_t
-j__1_LeafWPopToWords[cJ1_LEAFW_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  5,  5,  7,  7, 11, 11, 
-	11, 11, 15, 15, 15, 15, 23, 23, 
-	23, 23, 23, 23, 23, 23, 32, 32, 
-	32, 32, 32, 32, 32, 32, 32
-};
diff --git a/libs/klib/judy/Judy1Tables.64.c b/libs/klib/judy/Judy1Tables.64.c
deleted file mode 100644
index 140ea53..0000000
--- a/libs/klib/judy/Judy1Tables.64.c
+++ /dev/null
@@ -1,132 +0,0 @@
-// @(#) From generation tool: JudyTablesGen.c
-//
-
-#include "Judy1.h"
-// Leave the malloc() sizes readable in the binary (via strings(1)):
-const char * Judy1MallocSizes = "Judy1MallocSizes = 3, 5, 7, 11, 15, 23, 32, 47, 64,";
-
-
-//	object uses 64 words
-//	cJU_BITSPERSUBEXPB = 32
-const uint8_t
-j__1_BranchBJPPopToWords[cJU_BITSPERSUBEXPB + 1] =
-{
-	 0,
-	 3,  5,  7, 11, 11, 15, 15, 23, 
-	23, 23, 23, 32, 32, 32, 32, 32, 
-	47, 47, 47, 47, 47, 47, 47, 64, 
-	64, 64, 64, 64, 64, 64, 64, 64
-};
-
-//	object uses 32 words
-//	cJ1_LEAF2_MAXPOP1 = 128
-const uint8_t
-j__1_Leaf2PopToWords[cJ1_LEAF2_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  3,  3,  3,  3,  3,  3, 
-	 3,  3,  3,  3,  5,  5,  5,  5, 
-	 5,  5,  5,  5,  7,  7,  7,  7, 
-	 7,  7,  7,  7, 11, 11, 11, 11, 
-	11, 11, 11, 11, 11, 11, 11, 11, 
-	11, 11, 11, 11, 15, 15, 15, 15, 
-	15, 15, 15, 15, 15, 15, 15, 15, 
-	15, 15, 15, 15, 23, 23, 23, 23, 
-	23, 23, 23, 23, 23, 23, 23, 23, 
-	23, 23, 23, 23, 23, 23, 23, 23, 
-	23, 23, 23, 23, 23, 23, 23, 23, 
-	23, 23, 23, 23, 32, 32, 32, 32, 
-	32, 32, 32, 32, 32, 32, 32, 32, 
-	32, 32, 32, 32, 32, 32, 32, 32, 
-	32, 32, 32, 32, 32, 32, 32, 32, 
-	32, 32, 32, 32, 32, 32, 32, 32
-};
-
-//	object uses 32 words
-//	cJ1_LEAF3_MAXPOP1 = 85
-const uint8_t
-j__1_Leaf3PopToWords[cJ1_LEAF3_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  3,  3,  3,  3,  3,  3, 
-	 5,  5,  5,  5,  5,  7,  7,  7, 
-	 7,  7, 11, 11, 11, 11, 11, 11, 
-	11, 11, 11, 11, 11, 15, 15, 15, 
-	15, 15, 15, 15, 15, 15, 15, 15, 
-	23, 23, 23, 23, 23, 23, 23, 23, 
-	23, 23, 23, 23, 23, 23, 23, 23, 
-	23, 23, 23, 23, 23, 32, 32, 32, 
-	32, 32, 32, 32, 32, 32, 32, 32, 
-	32, 32, 32, 32, 32, 32, 32, 32, 
-	32, 32, 32, 32, 32
-};
-
-//	object uses 32 words
-//	cJ1_LEAF4_MAXPOP1 = 64
-const uint8_t
-j__1_Leaf4PopToWords[cJ1_LEAF4_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  3,  3,  3,  3,  5,  5, 
-	 5,  5,  7,  7,  7,  7, 11, 11, 
-	11, 11, 11, 11, 11, 11, 15, 15, 
-	15, 15, 15, 15, 15, 15, 23, 23, 
-	23, 23, 23, 23, 23, 23, 23, 23, 
-	23, 23, 23, 23, 23, 23, 32, 32, 
-	32, 32, 32, 32, 32, 32, 32, 32, 
-	32, 32, 32, 32, 32, 32, 32, 32
-};
-
-//	object uses 32 words
-//	cJ1_LEAF5_MAXPOP1 = 51
-const uint8_t
-j__1_Leaf5PopToWords[cJ1_LEAF5_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  3,  3,  5,  5,  5,  5, 
-	 7,  7,  7, 11, 11, 11, 11, 11, 
-	11, 15, 15, 15, 15, 15, 15, 15, 
-	23, 23, 23, 23, 23, 23, 23, 23, 
-	23, 23, 23, 23, 32, 32, 32, 32, 
-	32, 32, 32, 32, 32, 32, 32, 32, 
-	32, 32, 32
-};
-
-//	object uses 32 words
-//	cJ1_LEAF6_MAXPOP1 = 42
-const uint8_t
-j__1_Leaf6PopToWords[cJ1_LEAF6_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  3,  3,  5,  5,  7,  7, 
-	 7, 11, 11, 11, 11, 11, 15, 15, 
-	15, 15, 15, 15, 23, 23, 23, 23, 
-	23, 23, 23, 23, 23, 23, 32, 32, 
-	32, 32, 32, 32, 32, 32, 32, 32, 
-	32, 32
-};
-
-//	object uses 32 words
-//	cJ1_LEAF7_MAXPOP1 = 36
-const uint8_t
-j__1_Leaf7PopToWords[cJ1_LEAF7_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  3,  5,  5,  7,  7,  7, 
-	11, 11, 11, 11, 15, 15, 15, 15, 
-	15, 23, 23, 23, 23, 23, 23, 23, 
-	23, 23, 32, 32, 32, 32, 32, 32, 
-	32, 32, 32, 32
-};
-
-//	object uses 32 words
-//	cJ1_LEAFW_MAXPOP1 = 31
-const uint8_t
-j__1_LeafWPopToWords[cJ1_LEAFW_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  5,  5,  7,  7, 11, 11, 
-	11, 11, 15, 15, 15, 15, 23, 23, 
-	23, 23, 23, 23, 23, 23, 32, 32, 
-	32, 32, 32, 32, 32, 32, 32
-};
diff --git a/libs/klib/judy/JudyByCount.c b/libs/klib/judy/JudyByCount.c
deleted file mode 100644
index f6efea0..0000000
--- a/libs/klib/judy/JudyByCount.c
+++ /dev/null
@@ -1,952 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// Judy*ByCount() function for Judy1 and JudyL.
-// Compile with one of -DJUDY1 or -DJUDYL.
-//
-// Compile with -DNOSMARTJBB, -DNOSMARTJBU, and/or -DNOSMARTJLB to build a
-// version with cache line optimizations deleted, for testing.
-//
-// Judy*ByCount() is a conceptual although not literal inverse of Judy*Count().
-// Judy*Count() takes a pair of Indexes, and allows finding the ordinal of a
-// given Index (that is, its position in the list of valid indexes from the
-// beginning) as a degenerate case, because in general the count between two
-// Indexes, inclusive, is not always just the difference in their ordinals.
-// However, it suffices for Judy*ByCount() to simply be an ordinal-to-Index
-// mapper.
-//
-// Note:  Like Judy*Count(), this code must "count sideways" in branches, which
-// can result in a lot of cache line fills.  However, unlike Judy*Count(), this
-// code does not receive a specific Index, hence digit, where to start in each
-// branch, so it cant accurately calculate cache line fills required in each
-// direction.  The best it can do is an approximation based on the total
-// population of the expanse (pop1 from Pjp) and the ordinal of the target
-// Index (see SETOFFSET()) within the expanse.
-//
-// Compile with -DSMARTMETRICS to obtain global variables containing smart
-// cache line metrics.  Note:  Dont turn this on simultaneously for this file
-// and JudyCount.c because they export the same globals.
-// ****************************************************************************
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-// These are imported from JudyCount.c:
-//
-// TBD:  Should this be in common code?  Exported from a header file?
-
-#ifdef JUDY1
-extern	Word_t j__udy1JPPop1(const Pjp_t Pjp);
-#define	j__udyJPPop1 j__udy1JPPop1
-#else
-extern	Word_t j__udyLJPPop1(const Pjp_t Pjp);
-#define	j__udyJPPop1 j__udyLJPPop1
-#endif
-
-// Avoid duplicate symbols since this file is multi-compiled:
-
-#ifdef SMARTMETRICS
-#ifdef JUDY1
-Word_t	jbb_upward   = 0;	// counts of directions taken:
-Word_t	jbb_downward = 0;
-Word_t	jbu_upward   = 0;
-Word_t	jbu_downward = 0;
-Word_t	jlb_upward   = 0;
-Word_t	jlb_downward = 0;
-#else
-extern Word_t jbb_upward;
-extern Word_t jbb_downward;
-extern Word_t jbu_upward;
-extern Word_t jbu_downward;
-extern Word_t jlb_upward;
-extern Word_t jlb_downward;
-#endif
-#endif
-
-
-// ****************************************************************************
-// J U D Y   1   B Y   C O U N T
-// J U D Y   L   B Y   C O U N T
-//
-// See the manual entry.
-
-#ifdef JUDY1
-FUNCTION int Judy1ByCount
-#else
-FUNCTION PPvoid_t JudyLByCount
-#endif
-        (
-	Pcvoid_t  PArray,	// root pointer to first branch/leaf in SM.
-	Word_t	  Count,	// ordinal of Index to find, 1..MAX.
-	Word_t *  PIndex,	// to return found Index.
-	PJError_t PJError	// optional, for returning error info.
-        )
-{
-	Word_t	  Count0;	// Count, base-0, to match pop0.
-	Word_t	  state;	// current state in SM.
-	Word_t	  pop1;		// of current branch or leaf, or of expanse.
-	Word_t	  pop1lower;	// pop1 of expanses (JPs) below that for Count.
-	Word_t	  digit;	// current word in branch.
-	Word_t	  jpcount;	// JPs in a BranchB subexpanse.
-	long	  jpnum;	// JP number in a branch (base 0).
-	long	  subexp;	// for stepping through layer 1 (subexpanses).
-	int	  offset;	// index ordinal within a leaf, base 0.
-
-	Pjp_t	  Pjp;		// current JP in branch.
-	Pjll_t	  Pjll;		// current Judy linear leaf.
-
-
-// CHECK FOR EMPTY ARRAY OR NULL PINDEX:
-
-	if (PArray == (Pvoid_t) NULL) JU_RET_NOTFOUND;
-
-	if (PIndex == (PWord_t) NULL)
-	{
-	    JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);
-	    JUDY1CODE(return(JERRI );)
-	    JUDYLCODE(return(PPJERR);)
-	}
-
-// Convert Count to Count0; assume special case of Count = 0 maps to ~0, as
-// desired, to represent the last index in a full array:
-//
-// Note:  Think of Count0 as a reliable "number of Indexes below the target."
-
-	Count0 = Count - 1;
-	assert((Count || Count0 == ~0));  // ensure CPU is sane about 0 - 1.
-	pop1lower = 0;
-
-	if (JU_LEAFW_POP0(PArray) < cJU_LEAFW_MAXPOP1) // must be a LEAFW
-	{
-	    Pjlw_t Pjlw = P_JLW(PArray);		// first word of leaf.
-
-	    if (Count0 > Pjlw[0]) JU_RET_NOTFOUND;	// too high.
-
-	    *PIndex = Pjlw[Count];			// Index, base 1.
-
-	    JU_RET_FOUND_LEAFW(Pjlw, Pjlw[0] + 1, Count0);
-	}
-	else
-	{
-	    Pjpm_t Pjpm = P_JPM(PArray);
-
-	    if (Count0 > (Pjpm->jpm_Pop0)) JU_RET_NOTFOUND;	// too high.
-
-	    Pjp  = &(Pjpm->jpm_JP);
-	    pop1 =  (Pjpm->jpm_Pop0) + 1;
-
-//	    goto SMByCount;
-	}
-
-// COMMON CODE:
-//
-// Prepare to handle a root-level or lower-level branch:  Save the current
-// state, obtain the total population for the branch in a state-dependent way,
-// and then branch to common code for multiple cases.
-//
-// For root-level branches, the state is always cJU_ROOTSTATE, and the array
-// population must already be set in pop1; it is not available in jp_DcdPopO.
-//
-// Note:  The total population is only needed in cases where the common code
-// "counts down" instead of up to minimize cache line fills.  However, its
-// available cheaply, and its better to do it with a constant shift (constant
-// state value) instead of a variable shift later "when needed".
-
-#define	PREPB_ROOT(Next)	\
-	state = cJU_ROOTSTATE;	\
-	goto Next
-
-// Use PREPB_DCD() to first copy the Dcd bytes to *PIndex if there are any
-// (only if state < cJU_ROOTSTATE - 1):
-
-#define	PREPB_DCD(Pjp,cState,Next)			\
-	JU_SETDCD(*PIndex, Pjp, cState);	        \
-	PREPB((Pjp), cState, Next)
-
-#define	PREPB(Pjp,cState,Next)	\
-	state = (cState);	\
-	pop1  = JU_JPBRANCH_POP0(Pjp, (cState)) + 1; \
-	goto Next
-
-// Calculate whether the ordinal of an Index within a given expanse falls in
-// the lower or upper half of the expanses population, taking care with
-// unsigned math and boundary conditions:
-//
-// Note:  Assume the ordinal falls within the expanses population, that is,
-// 0 < (Count - Pop1lower) <= Pop1exp (assuming infinite math).
-//
-// Note:  If the ordinal is the middle element, it doesnt matter whether
-// LOWERHALF() is TRUE or FALSE.
-
-#define	LOWERHALF(Count0,Pop1lower,Pop1exp) \
-	(((Count0) - (Pop1lower)) < ((Pop1exp) / 2))
-
-// Calculate the (signed) offset within a leaf to the desired ordinal (Count -
-// Pop1lower; offset is one less), and optionally ensure its in range:
-
-#define	SETOFFSET(Offset,Count0,Pop1lower,Pjp)	\
-	(Offset) = (Count0) - (Pop1lower);	\
-	assert((Offset) >= 0);			\
-	assert((Offset) <= JU_JPLEAF_POP0(Pjp))
-
-// Variations for immediate indexes, with and without pop1-specific assertions:
-
-#define	SETOFFSET_IMM_CK(Offset,Count0,Pop1lower,cPop1)	\
-	(Offset) = (Count0) - (Pop1lower);		\
-	assert((Offset) >= 0);				\
-	assert((Offset) <  (cPop1))
-
-#define	SETOFFSET_IMM(Offset,Count0,Pop1lower) \
-	(Offset) = (Count0) - (Pop1lower)
-
-
-// STATE MACHINE -- TRAVERSE TREE:
-//
-// In branches, look for the expanse (digit), if any, where the total pop1
-// below or at that expanse would meet or exceed Count, meaning the Index must
-// be in this expanse.
-
-SMByCount:			// return here for next branch/leaf.
-
-	switch (JU_JPTYPE(Pjp))
-	{
-
-
-// ----------------------------------------------------------------------------
-// LINEAR BRANCH; count populations in JPs in the JBL upwards until finding the
-// expanse (digit) containing Count, and "recurse".
-//
-// Note:  There are no null JPs in a JBL; watch out for pop1 == 0.
-//
-// Note:  A JBL should always fit in one cache line => no need to count up
-// versus down to save cache line fills.
-//
-// TBD:  The previous is no longer true.  Consider enhancing this code to count
-// up/down, but it can wait for a later tuning phase.  In the meantime, PREPB()
-// sets pop1 for the whole array, but that value is not used here.  001215:
-// Maybe its true again?
-
-	case cJU_JPBRANCH_L2:  PREPB_DCD(Pjp, 2, BranchL);
-#ifndef JU_64BIT
-	case cJU_JPBRANCH_L3:  PREPB(	 Pjp, 3, BranchL);
-#else
-	case cJU_JPBRANCH_L3:  PREPB_DCD(Pjp, 3, BranchL);
-	case cJU_JPBRANCH_L4:  PREPB_DCD(Pjp, 4, BranchL);
-	case cJU_JPBRANCH_L5:  PREPB_DCD(Pjp, 5, BranchL);
-	case cJU_JPBRANCH_L6:  PREPB_DCD(Pjp, 6, BranchL);
-	case cJU_JPBRANCH_L7:  PREPB(	 Pjp, 7, BranchL);
-#endif
-	case cJU_JPBRANCH_L:   PREPB_ROOT(	 BranchL);
-	{
-	    Pjbl_t Pjbl;
-
-// Common code (state-independent) for all cases of linear branches:
-
-BranchL:
-	    Pjbl = P_JBL(Pjp->jp_Addr);
-
-	    for (jpnum = 0; jpnum < (Pjbl->jbl_NumJPs); ++jpnum)
-	    {
-	        if ((pop1 = j__udyJPPop1((Pjbl->jbl_jp) + jpnum))
-		 == cJU_ALLONES)
-	        {
-		    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-		    JUDY1CODE(return(JERRI );)
-		    JUDYLCODE(return(PPJERR);)
-	        }
-	        assert(pop1 != 0);
-
-// Warning:  pop1lower and pop1 are unsigned, so do not subtract 1 and compare
-// >=, but instead use the following expression:
-
-	        if (pop1lower + pop1 > Count0)	 // Index is in this expanse.
-	        {
-		    JU_SETDIGIT(*PIndex, Pjbl->jbl_Expanse[jpnum], state);
-		    Pjp = (Pjbl->jbl_jp) + jpnum;
-		    goto SMByCount;			// look under this expanse.
-	        }
-
-	        pop1lower += pop1;			// add this JPs pop1.
-	    }
-
-	    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);  // should never get here.
-	    JUDY1CODE(return(JERRI );)
-	    JUDYLCODE(return(PPJERR);)
-
-	} // case cJU_JPBRANCH_L
-
-
-// ----------------------------------------------------------------------------
-// BITMAP BRANCH; count populations in JPs in the JBB upwards or downwards
-// until finding the expanse (digit) containing Count, and "recurse".
-//
-// Note:  There are no null JPs in a JBB; watch out for pop1 == 0.
-
-	case cJU_JPBRANCH_B2:  PREPB_DCD(Pjp, 2, BranchB);
-#ifndef JU_64BIT
-	case cJU_JPBRANCH_B3:  PREPB(	 Pjp, 3, BranchB);
-#else
-	case cJU_JPBRANCH_B3:  PREPB_DCD(Pjp, 3, BranchB);
-	case cJU_JPBRANCH_B4:  PREPB_DCD(Pjp, 4, BranchB);
-	case cJU_JPBRANCH_B5:  PREPB_DCD(Pjp, 5, BranchB);
-	case cJU_JPBRANCH_B6:  PREPB_DCD(Pjp, 6, BranchB);
-	case cJU_JPBRANCH_B7:  PREPB(	 Pjp, 7, BranchB);
-#endif
-	case cJU_JPBRANCH_B:   PREPB_ROOT(	 BranchB);
-	{
-	    Pjbb_t Pjbb;
-
-// Common code (state-independent) for all cases of bitmap branches:
-
-BranchB:
-	    Pjbb = P_JBB(Pjp->jp_Addr);
-
-// Shorthand for one subexpanse in a bitmap and for one JP in a bitmap branch:
-//
-// Note: BMPJP0 exists separately to support assertions.
-
-#define	BMPJP0(Subexp)	     (P_JP(JU_JBB_PJP(Pjbb, Subexp)))
-#define	BMPJP(Subexp,JPnum)  (BMPJP0(Subexp) + (JPnum))
-
-
-// Common code for descending through a JP:
-//
-// Determine the digit for the expanse and save it in *PIndex; then "recurse".
-
-#define	JBB_FOUNDEXPANSE			\
-	{					\
-	    JU_BITMAPDIGITB(digit, subexp, JU_JBB_BITMAP(Pjbb,subexp), jpnum); \
-	    JU_SETDIGIT(*PIndex, digit, state);	\
-	    Pjp = BMPJP(subexp, jpnum);		\
-	    goto SMByCount;			\
-	}
-
-
-#ifndef NOSMARTJBB  // enable to turn off smart code for comparison purposes.
-
-// FIGURE OUT WHICH DIRECTION CAUSES FEWER CACHE LINE FILLS; adding the pop1s
-// in JPs upwards, or subtracting the pop1s in JPs downwards:
-//
-// See header comments about limitations of this for Judy*ByCount().
-
-#endif
-
-// COUNT UPWARD, adding each "below" JPs pop1:
-
-#ifndef NOSMARTJBB  // enable to turn off smart code for comparison purposes.
-
-	    if (LOWERHALF(Count0, pop1lower, pop1))
-	    {
-#endif
-#ifdef SMARTMETRICS
-		++jbb_upward;
-#endif
-		for (subexp = 0; subexp < cJU_NUMSUBEXPB; ++subexp)
-		{
-		    if ((jpcount = j__udyCountBitsB(JU_JBB_BITMAP(Pjbb,subexp)))
-		     && (BMPJP0(subexp) == (Pjp_t) NULL))
-		    {
-			JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);  // null ptr.
-			JUDY1CODE(return(JERRI );)
-			JUDYLCODE(return(PPJERR);)
-		    }
-
-// Note:  An empty subexpanse (jpcount == 0) is handled "for free":
-
-		    for (jpnum = 0; jpnum < jpcount; ++jpnum)
-		    {
-			if ((pop1 = j__udyJPPop1(BMPJP(subexp, jpnum)))
-			  == cJU_ALLONES)
-			{
-			    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-			    JUDY1CODE(return(JERRI );)
-			    JUDYLCODE(return(PPJERR);)
-			}
-			assert(pop1 != 0);
-
-// Warning:  pop1lower and pop1 are unsigned, see earlier comment:
-
-			if (pop1lower + pop1 > Count0)
-			    JBB_FOUNDEXPANSE;	// Index is in this expanse.
-
-			pop1lower += pop1;	// add this JPs pop1.
-		    }
-		}
-#ifndef NOSMARTJBB  // enable to turn off smart code for comparison purposes.
-	    }
-
-
-// COUNT DOWNWARD, subtracting each "above" JPs pop1 from the whole expanses
-// pop1:
-
-	    else
-	    {
-#ifdef SMARTMETRICS
-		++jbb_downward;
-#endif
-		pop1lower += pop1;		// add whole branch to start.
-
-		for (subexp = cJU_NUMSUBEXPB - 1; subexp >= 0; --subexp)
-		{
-		    if ((jpcount = j__udyCountBitsB(JU_JBB_BITMAP(Pjbb, subexp)))
-		     && (BMPJP0(subexp) == (Pjp_t) NULL))
-		    {
-			JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);  // null ptr.
-			JUDY1CODE(return(JERRI );)
-			JUDYLCODE(return(PPJERR);)
-		    }
-
-// Note:  An empty subexpanse (jpcount == 0) is handled "for free":
-
-		    for (jpnum = jpcount - 1; jpnum >= 0; --jpnum)
-		    {
-			if ((pop1 = j__udyJPPop1(BMPJP(subexp, jpnum)))
-			  == cJU_ALLONES)
-			{
-			    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-			    JUDY1CODE(return(JERRI );)
-			    JUDYLCODE(return(PPJERR);)
-			}
-			assert(pop1 != 0);
-
-// Warning:  pop1lower and pop1 are unsigned, see earlier comment:
-
-			pop1lower -= pop1;
-
-// Beware unsigned math problems:
-
-			if ((pop1lower == 0) || (pop1lower - 1 < Count0))
-			    JBB_FOUNDEXPANSE;	// Index is in this expanse.
-		    }
-		}
-	    }
-#endif // NOSMARTJBB
-
-	    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);  // should never get here.
-	    JUDY1CODE(return(JERRI );)
-	    JUDYLCODE(return(PPJERR);)
-
-	} // case cJU_JPBRANCH_B
-
-
-// ----------------------------------------------------------------------------
-// UNCOMPRESSED BRANCH; count populations in JPs in the JBU upwards or
-// downwards until finding the expanse (digit) containing Count, and "recurse".
-
-	case cJU_JPBRANCH_U2:  PREPB_DCD(Pjp, 2, BranchU);
-#ifndef JU_64BIT
-	case cJU_JPBRANCH_U3:  PREPB(	 Pjp, 3, BranchU);
-#else
-	case cJU_JPBRANCH_U3:  PREPB_DCD(Pjp, 3, BranchU);
-	case cJU_JPBRANCH_U4:  PREPB_DCD(Pjp, 4, BranchU);
-	case cJU_JPBRANCH_U5:  PREPB_DCD(Pjp, 5, BranchU);
-	case cJU_JPBRANCH_U6:  PREPB_DCD(Pjp, 6, BranchU);
-	case cJU_JPBRANCH_U7:  PREPB(	 Pjp, 7, BranchU);
-#endif
-	case cJU_JPBRANCH_U:   PREPB_ROOT(	 BranchU);
-	{
-	    Pjbu_t Pjbu;
-
-// Common code (state-independent) for all cases of uncompressed branches:
-
-BranchU:
-	    Pjbu = P_JBU(Pjp->jp_Addr);
-
-// Common code for descending through a JP:
-//
-// Save the digit for the expanse in *PIndex, then "recurse".
-
-#define	JBU_FOUNDEXPANSE			\
-	{					\
-	    JU_SETDIGIT(*PIndex, jpnum, state);	\
-	    Pjp = (Pjbu->jbu_jp) + jpnum;	\
-	    goto SMByCount;			\
-	}
-
-
-#ifndef NOSMARTJBU  // enable to turn off smart code for comparison purposes.
-
-// FIGURE OUT WHICH DIRECTION CAUSES FEWER CACHE LINE FILLS; adding the pop1s
-// in JPs upwards, or subtracting the pop1s in JPs downwards:
-//
-// See header comments about limitations of this for Judy*ByCount().
-
-#endif
-
-// COUNT UPWARD, simply adding the pop1 of each JP:
-
-#ifndef NOSMARTJBU  // enable to turn off smart code for comparison purposes.
-
-	    if (LOWERHALF(Count0, pop1lower, pop1))
-	    {
-#endif
-#ifdef SMARTMETRICS
-		++jbu_upward;
-#endif
-
-		for (jpnum = 0; jpnum < cJU_BRANCHUNUMJPS; ++jpnum)
-		{
-		    // shortcut, save a function call:
-
-		    if ((Pjbu->jbu_jp[jpnum].jp_Type) <= cJU_JPNULLMAX)
-			continue;
-
-		    if ((pop1 = j__udyJPPop1((Pjbu->jbu_jp) + jpnum))
-		     == cJU_ALLONES)
-		    {
-			JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-			JUDY1CODE(return(JERRI );)
-			JUDYLCODE(return(PPJERR);)
-		    }
-		    assert(pop1 != 0);
-
-// Warning:  pop1lower and pop1 are unsigned, see earlier comment:
-
-		    if (pop1lower + pop1 > Count0)
-			JBU_FOUNDEXPANSE;	// Index is in this expanse.
-
-		    pop1lower += pop1;		// add this JPs pop1.
-		}
-#ifndef NOSMARTJBU  // enable to turn off smart code for comparison purposes.
-	    }
-
-
-// COUNT DOWNWARD, subtracting the pop1 of each JP above from the whole
-// expanses pop1:
-
-	    else
-	    {
-#ifdef SMARTMETRICS
-		++jbu_downward;
-#endif
-		pop1lower += pop1;		// add whole branch to start.
-
-		for (jpnum = cJU_BRANCHUNUMJPS - 1; jpnum >= 0; --jpnum)
-		{
-		    // shortcut, save a function call:
-
-		    if ((Pjbu->jbu_jp[jpnum].jp_Type) <= cJU_JPNULLMAX)
-			continue;
-
-		    if ((pop1 = j__udyJPPop1(Pjbu->jbu_jp + jpnum))
-		     == cJU_ALLONES)
-		    {
-			JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-			JUDY1CODE(return(JERRI );)
-			JUDYLCODE(return(PPJERR);)
-		    }
-		    assert(pop1 != 0);
-
-// Warning:  pop1lower and pop1 are unsigned, see earlier comment:
-
-		    pop1lower -= pop1;
-
-// Beware unsigned math problems:
-
-		    if ((pop1lower == 0) || (pop1lower - 1 < Count0))
-			JBU_FOUNDEXPANSE;	// Index is in this expanse.
-		}
-	    }
-#endif // NOSMARTJBU
-
-	    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);  // should never get here.
-	    JUDY1CODE(return(JERRI );)
-	    JUDYLCODE(return(PPJERR);)
-
-	} // case cJU_JPBRANCH_U
-
-// ----------------------------------------------------------------------------
-// LINEAR LEAF:
-//
-// Return the Index at the proper ordinal (see SETOFFSET()) in the leaf.  First
-// copy Dcd bytes, if there are any (only if state < cJU_ROOTSTATE - 1), to
-// *PIndex.
-//
-// Note:  The preceding branch traversal code MIGHT set pop1 for this expanse
-// (linear leaf) as a side-effect, but dont depend on that (for JUDYL, which
-// is the only cases that need it anyway).
-
-#define	PREPL_DCD(cState)				\
-	JU_SETDCD(*PIndex, Pjp, cState);	        \
-	PREPL
-
-#ifdef JUDY1
-#define	PREPL_SETPOP1			// not needed in any cases.
-#else
-#define	PREPL_SETPOP1  pop1 = JU_JPLEAF_POP0(Pjp) + 1
-#endif
-
-#define	PREPL				\
-	Pjll = P_JLL(Pjp->jp_Addr);	\
-	PREPL_SETPOP1;			\
-	SETOFFSET(offset, Count0, pop1lower, Pjp)
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-	case cJU_JPLEAF1:
-
-	    PREPL_DCD(1);
-	    JU_SETDIGIT1(*PIndex, ((uint8_t *) Pjll)[offset]);
-	    JU_RET_FOUND_LEAF1(Pjll, pop1, offset);
-#endif
-
-	case cJU_JPLEAF2:
-
-	    PREPL_DCD(2);
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(2)))
-		    | ((uint16_t *) Pjll)[offset];
-	    JU_RET_FOUND_LEAF2(Pjll, pop1, offset);
-
-#ifndef JU_64BIT
-	case cJU_JPLEAF3:
-	{
-	    Word_t lsb;
-	    PREPL;
-	    JU_COPY3_PINDEX_TO_LONG(lsb, ((uint8_t *) Pjll) + (3 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(3))) | lsb;
-	    JU_RET_FOUND_LEAF3(Pjll, pop1, offset);
-	}
-
-#else
-	case cJU_JPLEAF3:
-	{
-	    Word_t lsb;
-	    PREPL_DCD(3);
-	    JU_COPY3_PINDEX_TO_LONG(lsb, ((uint8_t *) Pjll) + (3 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(3))) | lsb;
-	    JU_RET_FOUND_LEAF3(Pjll, pop1, offset);
-	}
-
-	case cJU_JPLEAF4:
-
-	    PREPL_DCD(4);
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(4)))
-		    | ((uint32_t *) Pjll)[offset];
-	    JU_RET_FOUND_LEAF4(Pjll, pop1, offset);
-
-	case cJU_JPLEAF5:
-	{
-	    Word_t lsb;
-	    PREPL_DCD(5);
-	    JU_COPY5_PINDEX_TO_LONG(lsb, ((uint8_t *) Pjll) + (5 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(5))) | lsb;
-	    JU_RET_FOUND_LEAF5(Pjll, pop1, offset);
-	}
-
-	case cJU_JPLEAF6:
-	{
-	    Word_t lsb;
-	    PREPL_DCD(6);
-	    JU_COPY6_PINDEX_TO_LONG(lsb, ((uint8_t *) Pjll) + (6 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(6))) | lsb;
-	    JU_RET_FOUND_LEAF6(Pjll, pop1, offset);
-	}
-
-	case cJU_JPLEAF7:
-	{
-	    Word_t lsb;
-	    PREPL;
-	    JU_COPY7_PINDEX_TO_LONG(lsb, ((uint8_t *) Pjll) + (7 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(7))) | lsb;
-	    JU_RET_FOUND_LEAF7(Pjll, pop1, offset);
-	}
-#endif
-
-
-// ----------------------------------------------------------------------------
-// BITMAP LEAF:
-//
-// Return the Index at the proper ordinal (see SETOFFSET()) in the leaf by
-// counting bits.  First copy Dcd bytes (always present since state 1 <
-// cJU_ROOTSTATE) to *PIndex.
-//
-// Note:  The preceding branch traversal code MIGHT set pop1 for this expanse
-// (bitmap leaf) as a side-effect, but dont depend on that.
-
-	case cJU_JPLEAF_B1:
-	{
-	    Pjlb_t Pjlb;
-
-	    JU_SETDCD(*PIndex, Pjp, 1);
-	    Pjlb = P_JLB(Pjp->jp_Addr);
-	    pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-
-// COUNT UPWARD, adding the pop1 of each subexpanse:
-//
-// The entire bitmap should fit in one cache line, but still try to save some
-// CPU time by counting the fewest possible number of subexpanses from the
-// bitmap.
-//
-// See header comments about limitations of this for Judy*ByCount().
-
-#ifndef NOSMARTJLB  // enable to turn off smart code for comparison purposes.
-
-	    if (LOWERHALF(Count0, pop1lower, pop1))
-	    {
-#endif
-#ifdef SMARTMETRICS
-		++jlb_upward;
-#endif
-		for (subexp = 0; subexp < cJU_NUMSUBEXPL; ++subexp)
-		{
-		    pop1 = j__udyCountBitsL(JU_JLB_BITMAP(Pjlb, subexp));
-
-// Warning:  pop1lower and pop1 are unsigned, see earlier comment:
-
-		    if (pop1lower + pop1 > Count0)
-			goto LeafB1;		// Index is in this subexpanse.
-
-		    pop1lower += pop1;		// add this subexpanses pop1.
-		}
-#ifndef NOSMARTJLB  // enable to turn off smart code for comparison purposes.
-	    }
-
-
-// COUNT DOWNWARD, subtracting each "above" subexpanses pop1 from the whole
-// expanses pop1:
-
-	    else
-	    {
-#ifdef SMARTMETRICS
-		++jlb_downward;
-#endif
-		pop1lower += pop1;		// add whole leaf to start.
-
-		for (subexp = cJU_NUMSUBEXPL - 1; subexp >= 0; --subexp)
-		{
-		    pop1lower -= j__udyCountBitsL(JU_JLB_BITMAP(Pjlb, subexp));
-
-// Beware unsigned math problems:
-
-		    if ((pop1lower == 0) || (pop1lower - 1 < Count0))
-			goto LeafB1;		// Index is in this subexpanse.
-		}
-	    }
-#endif // NOSMARTJLB
-
-	    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);  // should never get here.
-	    JUDY1CODE(return(JERRI );)
-	    JUDYLCODE(return(PPJERR);)
-
-
-// RETURN INDEX FOUND:
-//
-// Come here with subexp set to the correct subexpanse, and pop1lower set to
-// the sum for all lower expanses and subexpanses in the Judy tree.  Calculate
-// and save in *PIndex the digit corresponding to the ordinal in this
-// subexpanse.
-
-LeafB1:
-	    SETOFFSET(offset, Count0, pop1lower, Pjp);
-	    JU_BITMAPDIGITL(digit, subexp, JU_JLB_BITMAP(Pjlb, subexp), offset);
-	    JU_SETDIGIT1(*PIndex, digit);
-	    JU_RET_FOUND_LEAF_B1(Pjlb, subexp, offset);
-//	    == return((PPvoid_t) (P_JV(JL_JLB_PVALUE(Pjlb, subexp)) + offset))
-
-	} // case cJU_JPLEAF_B1
-
-
-#ifdef JUDY1
-// ----------------------------------------------------------------------------
-// FULL POPULATION:
-//
-// Copy Dcd bytes (always present since state 1 < cJU_ROOTSTATE) to *PIndex,
-// then set the appropriate digit for the ordinal (see SETOFFSET()) in the leaf
-// as the LSB in *PIndex.
-
-	case cJ1_JPFULLPOPU1:
-
-	    JU_SETDCD(*PIndex, Pjp, 1);
-	    SETOFFSET(offset, Count0, pop1lower, Pjp);
-	    assert(offset >= 0);
-	    assert(offset <= cJU_JPFULLPOPU1_POP0);
-	    JU_SETDIGIT1(*PIndex, offset);
-	    JU_RET_FOUND_FULLPOPU1;
-#endif
-
-
-// ----------------------------------------------------------------------------
-// IMMEDIATE:
-//
-// Locate the Index with the proper ordinal (see SETOFFSET()) in the Immediate,
-// depending on leaf Index Size and pop1.  Note:  There are no Dcd bytes in an
-// Immediate JP, but in a cJU_JPIMMED_*_01 JP, the field holds the least bytes
-// of the immediate Index.
-
-#define	SET_01(cState)  JU_SETDIGITS(*PIndex, JU_JPDCDPOP0(Pjp), cState)
-
-	case cJU_JPIMMED_1_01: SET_01(1); goto Imm_01;
-	case cJU_JPIMMED_2_01: SET_01(2); goto Imm_01;
-	case cJU_JPIMMED_3_01: SET_01(3); goto Imm_01;
-#ifdef JU_64BIT
-	case cJU_JPIMMED_4_01: SET_01(4); goto Imm_01;
-	case cJU_JPIMMED_5_01: SET_01(5); goto Imm_01;
-	case cJU_JPIMMED_6_01: SET_01(6); goto Imm_01;
-	case cJU_JPIMMED_7_01: SET_01(7); goto Imm_01;
-#endif
-
-Imm_01:
-
-	    DBGCODE(SETOFFSET_IMM_CK(offset, Count0, pop1lower, 1);)
-	    JU_RET_FOUND_IMM_01(Pjp);
-
-// Shorthand for where to find start of Index bytes array:
-
-#ifdef JUDY1
-#define	PJI (Pjp->jp_1Index)
-#else
-#define	PJI (Pjp->jp_LIndex)
-#endif
-
-// Optional code to check the remaining ordinal (see SETOFFSET_IMM()) against
-// the Index Size of the Immediate:
-
-#ifndef DEBUG				// simple placeholder:
-#define	IMM(cPop1,Next) \
-	goto Next
-#else					// extra pop1-specific checking:
-#define	IMM(cPop1,Next)						\
-	SETOFFSET_IMM_CK(offset, Count0, pop1lower, cPop1);	\
-	goto Next
-#endif
-
-	case cJU_JPIMMED_1_02: IMM( 2, Imm1);
-	case cJU_JPIMMED_1_03: IMM( 3, Imm1);
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_1_04: IMM( 4, Imm1);
-	case cJU_JPIMMED_1_05: IMM( 5, Imm1);
-	case cJU_JPIMMED_1_06: IMM( 6, Imm1);
-	case cJU_JPIMMED_1_07: IMM( 7, Imm1);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_1_08: IMM( 8, Imm1);
-	case cJ1_JPIMMED_1_09: IMM( 9, Imm1);
-	case cJ1_JPIMMED_1_10: IMM(10, Imm1);
-	case cJ1_JPIMMED_1_11: IMM(11, Imm1);
-	case cJ1_JPIMMED_1_12: IMM(12, Imm1);
-	case cJ1_JPIMMED_1_13: IMM(13, Imm1);
-	case cJ1_JPIMMED_1_14: IMM(14, Imm1);
-	case cJ1_JPIMMED_1_15: IMM(15, Imm1);
-#endif
-
-Imm1:	    SETOFFSET_IMM(offset, Count0, pop1lower);
-	    JU_SETDIGIT1(*PIndex, ((uint8_t *) PJI)[offset]);
-	    JU_RET_FOUND_IMM(Pjp, offset);
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_2_02: IMM(2, Imm2);
-	case cJU_JPIMMED_2_03: IMM(3, Imm2);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_2_04: IMM(4, Imm2);
-	case cJ1_JPIMMED_2_05: IMM(5, Imm2);
-	case cJ1_JPIMMED_2_06: IMM(6, Imm2);
-	case cJ1_JPIMMED_2_07: IMM(7, Imm2);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-Imm2:	    SETOFFSET_IMM(offset, Count0, pop1lower);
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(2)))
-		    | ((uint16_t *) PJI)[offset];
-	    JU_RET_FOUND_IMM(Pjp, offset);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_3_02: IMM(2, Imm3);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_3_03: IMM(3, Imm3);
-	case cJ1_JPIMMED_3_04: IMM(4, Imm3);
-	case cJ1_JPIMMED_3_05: IMM(5, Imm3);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-Imm3:
-	{
-	    Word_t lsb;
-	    SETOFFSET_IMM(offset, Count0, pop1lower);
-	    JU_COPY3_PINDEX_TO_LONG(lsb, ((uint8_t *) PJI) + (3 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(3))) | lsb;
-	    JU_RET_FOUND_IMM(Pjp, offset);
-	}
-#endif
-
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_4_02: IMM(2, Imm4);
-	case cJ1_JPIMMED_4_03: IMM(3, Imm4);
-
-Imm4:	    SETOFFSET_IMM(offset, Count0, pop1lower);
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(4)))
-		    | ((uint32_t *) PJI)[offset];
-	    JU_RET_FOUND_IMM(Pjp, offset);
-
-	case cJ1_JPIMMED_5_02: IMM(2, Imm5);
-	case cJ1_JPIMMED_5_03: IMM(3, Imm5);
-
-Imm5:
-	{
-	    Word_t lsb;
-	    SETOFFSET_IMM(offset, Count0, pop1lower);
-	    JU_COPY5_PINDEX_TO_LONG(lsb, ((uint8_t *) PJI) + (5 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(5))) | lsb;
-	    JU_RET_FOUND_IMM(Pjp, offset);
-	}
-
-	case cJ1_JPIMMED_6_02: IMM(2, Imm6);
-
-Imm6:
-	{
-	    Word_t lsb;
-	    SETOFFSET_IMM(offset, Count0, pop1lower);
-	    JU_COPY6_PINDEX_TO_LONG(lsb, ((uint8_t *) PJI) + (6 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(6))) | lsb;
-	    JU_RET_FOUND_IMM(Pjp, offset);
-	}
-
-	case cJ1_JPIMMED_7_02: IMM(2, Imm7);
-
-Imm7:
-	{
-	    Word_t lsb;
-	    SETOFFSET_IMM(offset, Count0, pop1lower);
-	    JU_COPY7_PINDEX_TO_LONG(lsb, ((uint8_t *) PJI) + (7 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(7))) | lsb;
-	    JU_RET_FOUND_IMM(Pjp, offset);
-	}
-#endif // (JUDY1 && JU_64BIT)
-
-
-// ----------------------------------------------------------------------------
-// UNEXPECTED JP TYPES:
-
-	default: JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-		 JUDY1CODE(return(JERRI );)
-		 JUDYLCODE(return(PPJERR);)
-
-	} // SMByCount switch.
-
-	/*NOTREACHED*/
-
-} // Judy1ByCount() / JudyLByCount()
diff --git a/libs/klib/judy/JudyByCountWithDefs.c b/libs/klib/judy/JudyByCountWithDefs.c
deleted file mode 100644
index b4ad243..0000000
--- a/libs/klib/judy/JudyByCountWithDefs.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define NOSMARTJBB 1
-#define NOSMARTJBU 1
-#define NOSMARTJLB 1
-#include "JudyByCount.c"
diff --git a/libs/klib/judy/JudyCascade.c b/libs/klib/judy/JudyCascade.c
deleted file mode 100644
index fccb747..0000000
--- a/libs/klib/judy/JudyCascade.c
+++ /dev/null
@@ -1,1940 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-extern int j__udyCreateBranchL(Pjp_t, Pjp_t, uint8_t *, Word_t, Pvoid_t);
-extern int j__udyCreateBranchB(Pjp_t, Pjp_t, uint8_t *, Word_t, Pvoid_t);
-
-DBGCODE(extern void JudyCheckSorted(Pjll_t Pjll, Word_t Pop1, long IndexSize);)
-
-static const jbb_t StageJBBZero;	// zeroed versions of namesake struct.
-
-// TBD:  There are multiple copies of (some of) these CopyWto3, Copy3toW,
-// CopyWto7 and Copy7toW functions in Judy1Cascade.c, JudyLCascade.c, and
-// JudyDecascade.c.  These static functions should probably be moved to a
-// common place, made macros, or something to avoid having four copies.
-
-
-// ****************************************************************************
-// __ J U D Y   C O P Y   X   T O   W
-
-
-FUNCTION static void j__udyCopy3toW(
-	PWord_t	  PDest,
-	uint8_t * PSrc,
-	Word_t	  LeafIndexes)
-{
-	do
-	{
-		JU_COPY3_PINDEX_TO_LONG(*PDest, PSrc);
-		PSrc	+= 3;
-		PDest	+= 1;
-
-	} while(--LeafIndexes);
-
-} //j__udyCopy3toW()
-
-
-#ifdef JU_64BIT
-
-FUNCTION static void j__udyCopy4toW(
-	PWord_t	   PDest,
-	uint32_t * PSrc,
-	Word_t	   LeafIndexes)
-{
-	do { *PDest++ = *PSrc++;
-	} while(--LeafIndexes);
-
-} // j__udyCopy4toW()
-
-
-FUNCTION static void j__udyCopy5toW(
-	PWord_t	  PDest,
-	uint8_t	* PSrc,
-	Word_t	  LeafIndexes)
-{
-	do
-	{
-		JU_COPY5_PINDEX_TO_LONG(*PDest, PSrc);
-		PSrc	+= 5;
-		PDest	+= 1;
-
-	} while(--LeafIndexes);
-
-} // j__udyCopy5toW()
-
-
-FUNCTION static void j__udyCopy6toW(
-	PWord_t	  PDest,
-	uint8_t	* PSrc,
-	Word_t	  LeafIndexes)
-{
-	do
-	{
-		JU_COPY6_PINDEX_TO_LONG(*PDest, PSrc);
-		PSrc	+= 6;
-		PDest	+= 1;
-
-	} while(--LeafIndexes);
-
-} // j__udyCopy6toW()
-
-
-FUNCTION static void j__udyCopy7toW(
-	PWord_t	  PDest,
-	uint8_t	* PSrc,
-	Word_t	  LeafIndexes)
-{
-	do
-	{
-		JU_COPY7_PINDEX_TO_LONG(*PDest, PSrc);
-		PSrc	+= 7;
-		PDest	+= 1;
-
-	} while(--LeafIndexes);
-
-} // j__udyCopy7toW()
-
-#endif // JU_64BIT
-
-
-// ****************************************************************************
-// __ J U D Y   C O P Y   W   T O   X
-
-
-FUNCTION static void j__udyCopyWto3(
-	uint8_t	* PDest,
-	PWord_t	  PSrc,
-	Word_t	  LeafIndexes)
-{
-	do
-	{
-		JU_COPY3_LONG_TO_PINDEX(PDest, *PSrc);
-		PSrc	+= 1;
-		PDest	+= 3;
-
-	} while(--LeafIndexes);
-
-} // j__udyCopyWto3()
-
-
-#ifdef JU_64BIT
-
-FUNCTION static void j__udyCopyWto4(
-	uint8_t	* PDest,
-	PWord_t	  PSrc,
-	Word_t	  LeafIndexes)
-{
-	uint32_t *PDest32 = (uint32_t *)PDest;
-
-	do
-	{
-		*PDest32 = *PSrc;
-		PSrc	+= 1;
-		PDest32	+= 1;
-	} while(--LeafIndexes);
-
-} // j__udyCopyWto4()
-
-
-FUNCTION static void j__udyCopyWto5(
-	uint8_t	* PDest,
-	PWord_t	  PSrc,
-	Word_t	  LeafIndexes)
-{
-	do
-	{
-		JU_COPY5_LONG_TO_PINDEX(PDest, *PSrc);
-		PSrc	+= 1;
-		PDest	+= 5;
-
-	} while(--LeafIndexes);
-
-} // j__udyCopyWto5()
-
-
-FUNCTION static void j__udyCopyWto6(
-	uint8_t	* PDest,
-	PWord_t	  PSrc,
-	Word_t	  LeafIndexes)
-{
-	do
-	{
-		JU_COPY6_LONG_TO_PINDEX(PDest, *PSrc);
-		PSrc	+= 1;
-		PDest	+= 6;
-
-	} while(--LeafIndexes);
-
-} // j__udyCopyWto6()
-
-
-FUNCTION static void j__udyCopyWto7(
-	uint8_t	* PDest,
-	PWord_t	  PSrc,
-	Word_t	  LeafIndexes)
-{
-	do
-	{
-		JU_COPY7_LONG_TO_PINDEX(PDest, *PSrc);
-		PSrc	+= 1;
-		PDest	+= 7;
-
-	} while(--LeafIndexes);
-
-} // j__udyCopyWto7()
-
-#endif // JU_64BIT
-
-
-// ****************************************************************************
-// COMMON CODE (MACROS):
-//
-// Free objects in an array of valid JPs, StageJP[ExpCnt] == last one may
-// include Immeds, which are ignored.
-
-#define FREEALLEXIT(ExpCnt,StageJP,Pjpm)				\
-	{								\
-	    Word_t _expct = (ExpCnt);					\
-	    while (_expct--) j__udyFreeSM(&((StageJP)[_expct]), Pjpm);  \
-	    return(-1);                                                 \
-	}
-
-// Clear the array that keeps track of the number of JPs in a subexpanse:
-
-#define ZEROJP(SubJPCount)                                              \
-	{								\
-		int ii;							\
-		for (ii = 0; ii < cJU_NUMSUBEXPB; ii++) (SubJPCount[ii]) = 0; \
-	}
-
-// ****************************************************************************
-// __ J U D Y   S T A G E   J B B   T O   J B B
-//
-// Create a mallocd BranchB (jbb_t) from a staged BranchB while "splaying" a
-// single old leaf.  Return -1 if out of memory, otherwise 1.
-
-static int j__udyStageJBBtoJBB(
-	Pjp_t     PjpLeaf,	// JP of leaf being splayed.
-	Pjbb_t    PStageJBB,	// temp jbb_t on stack.
-	Pjp_t     PjpArray,	// array of JPs to splayed new leaves.
-	uint8_t * PSubCount,	// count of JPs for each subexpanse.
-	Pjpm_t    Pjpm)		// the jpm_t for JudyAlloc*().
-{
-	Pjbb_t    PjbbRaw;	// pointer to new bitmap branch.
-	Pjbb_t    Pjbb;
-	Word_t    subexp;
-
-// Get memory for new BranchB:
-
-	if ((PjbbRaw = j__udyAllocJBB(Pjpm)) == (Pjbb_t) NULL) return(-1);
-	Pjbb = P_JBB(PjbbRaw);
-
-// Copy staged BranchB into just-allocated BranchB:
-
-	*Pjbb = *PStageJBB;
-
-// Allocate the JP subarrays (BJP) for the new BranchB:
-
-	for (subexp = 0; subexp < cJU_NUMSUBEXPB; subexp++)
-	{
-	    Pjp_t  PjpRaw;
-	    Pjp_t  Pjp;
-	    Word_t NumJP;       // number of JPs in each subexpanse.
-
-	    if ((NumJP = PSubCount[subexp]) == 0) continue;	// empty.
-
-// Out of memory, back out previous allocations:
-
-	    if ((PjpRaw = j__udyAllocJBBJP(NumJP, Pjpm)) == (Pjp_t) NULL)
-	    {
-		while(subexp--)
-		{
-		    if ((NumJP = PSubCount[subexp]) == 0) continue;
-
-		    PjpRaw = JU_JBB_PJP(Pjbb, subexp);
-		    j__udyFreeJBBJP(PjpRaw, NumJP, Pjpm);
-		}
-		j__udyFreeJBB(PjbbRaw, Pjpm);
-		return(-1);	// out of memory.
-	    }
-	    Pjp = P_JP(PjpRaw);
-
-// Place the JP subarray pointer in the new BranchB, copy subarray JPs, and
-// advance to the next subexpanse:
-
-	    JU_JBB_PJP(Pjbb, subexp) = PjpRaw;
-	    JU_COPYMEM(Pjp, PjpArray, NumJP);
-	    PjpArray += NumJP;
-
-	} // for each subexpanse.
-
-// Change the PjpLeaf from Leaf to BranchB:
-
-	PjpLeaf->jp_Addr  = (Word_t) PjbbRaw;
-	PjpLeaf->jp_Type += cJU_JPBRANCH_B2 - cJU_JPLEAF2;  // Leaf to BranchB.
-
-	return(1);
-
-} // j__udyStageJBBtoJBB()
-
-
-// ****************************************************************************
-// __ J U D Y   J L L 2   T O   J L B 1
-//
-// Create a LeafB1 (jlb_t = JLB1) from a Leaf2 (2-byte Indexes and for JudyL,
-// Word_t Values).  Return NULL if out of memory, else a pointer to the new
-// LeafB1.
-//
-// NOTE:  Caller must release the Leaf2 that was passed in.
-
-FUNCTION static Pjlb_t j__udyJLL2toJLB1(
-	uint16_t * Pjll,	// array of 16-bit indexes.
-#ifdef JUDYL
-	Pjv_t      Pjv,		// array of associated values.
-#endif
-	Word_t     LeafPop1,	// number of indexes/values.
-	Pvoid_t    Pjpm)	// jpm_t for JudyAlloc*()/JudyFree*().
-{
-	Pjlb_t     PjlbRaw;
-	Pjlb_t     Pjlb;
-	int	   offset;
-JUDYLCODE(int	   subexp;)
-
-// Allocate the LeafB1:
-
-	if ((PjlbRaw = j__udyAllocJLB1(Pjpm)) == (Pjlb_t) NULL)
-	    return((Pjlb_t) NULL);
-	Pjlb = P_JLB(PjlbRaw);
-
-// Copy Leaf2 indexes to LeafB1:
-
-	for (offset = 0; offset < LeafPop1; ++offset)
-	    JU_BITMAPSETL(Pjlb, Pjll[offset]);
-
-#ifdef JUDYL
-
-// Build LeafVs from bitmap:
-
-	for (subexp = 0; subexp < cJU_NUMSUBEXPL; ++subexp)
-	{
-	    struct _POINTER_VALUES
-	    {
-		Word_t pv_Pop1;		// size of value area.
-		Pjv_t  pv_Pjv;		// raw pointer to value area.
-	    } pv[cJU_NUMSUBEXPL];
-
-// Get the population of the subexpanse, and if any, allocate a LeafV:
-
-	    pv[subexp].pv_Pop1 = j__udyCountBitsL(JU_JLB_BITMAP(Pjlb, subexp));
-
-	    if (pv[subexp].pv_Pop1)
-	    {
-		Pjv_t Pjvnew;
-
-// TBD:  There is an opportunity to put pop == 1 value in pointer:
-
-		pv[subexp].pv_Pjv = j__udyLAllocJV(pv[subexp].pv_Pop1, Pjpm);
-
-// Upon out of memory, free all previously allocated:
-
-		if (pv[subexp].pv_Pjv == (Pjv_t) NULL)
-		{
-		    while(subexp--)
-		    {
-			if (pv[subexp].pv_Pop1)
-			{
-			    j__udyLFreeJV(pv[subexp].pv_Pjv, pv[subexp].pv_Pop1,
-					  Pjpm);
-			}
-		    }
-		    j__udyFreeJLB1(PjlbRaw, Pjpm);
-		    return((Pjlb_t) NULL);
-		}
-
-		Pjvnew = P_JV(pv[subexp].pv_Pjv);
-		JU_COPYMEM(Pjvnew, Pjv, pv[subexp].pv_Pop1);
-		Pjv += pv[subexp].pv_Pop1;	// advance value pointer.
-
-// Place raw pointer to value array in bitmap subexpanse:
-
-		JL_JLB_PVALUE(Pjlb, subexp) = pv[subexp].pv_Pjv;
-
-	    } // populated subexpanse.
-	} // each subexpanse.
-
-#endif // JUDYL
-
-	return(PjlbRaw);	// pointer to LeafB1.
-
-} // j__udyJLL2toJLB1()
-
-
-// ****************************************************************************
-// __ J U D Y   C A S C A D E 1
-//
-// Create bitmap leaf from 1-byte Indexes and Word_t Values.
-//
-// TBD:  There must be a better way.
-//
-// Only for JudyL 32 bit:  (note, unifdef disallows comment on next line)
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-
-FUNCTION int j__udyCascade1(
-	Pjp_t	   Pjp,
-	Pvoid_t    Pjpm)
-{
-        Word_t     DcdP0;
-	uint8_t	 * PLeaf;
-	Pjlb_t	   PjlbRaw;
-	Pjlb_t	   Pjlb;
-	Word_t     Pop1;
-	Word_t     ii;		// temp for loop counter
-JUDYLCODE(Pjv_t	   Pjv;)
-
-	assert(JU_JPTYPE(Pjp) == cJU_JPLEAF1);
-	assert((JU_JPDCDPOP0(Pjp) & 0xFF) == (cJU_LEAF1_MAXPOP1-1));
-
-	PjlbRaw = j__udyAllocJLB1(Pjpm);
-	if (PjlbRaw == (Pjlb_t) NULL) return(-1);
-
-	Pjlb  = P_JLB(PjlbRaw);
-	PLeaf = (uint8_t *) P_JLL(Pjp->jp_Addr);
-	Pop1  = JU_JPLEAF_POP0(Pjp) + 1;
-
-	JUDYLCODE(Pjv = JL_LEAF1VALUEAREA(PLeaf, Pop1);)
-
-//	Copy 1 byte index Leaf to bitmap Leaf
-	for (ii = 0; ii < Pop1; ii++) JU_BITMAPSETL(Pjlb, PLeaf[ii]);
-
-#ifdef JUDYL
-//	Build 8 subexpanse Value leaves from bitmap
-	for (ii = 0; ii < cJU_NUMSUBEXPL; ii++)
-	{
-//	    Get number of Indexes in subexpanse
-	    if ((Pop1 = j__udyCountBitsL(JU_JLB_BITMAP(Pjlb, ii))))
-	    {
-		Pjv_t PjvnewRaw;	// value area of new leaf.
-		Pjv_t Pjvnew;
-
-		PjvnewRaw = j__udyLAllocJV(Pop1, Pjpm);
-		if (PjvnewRaw == (Pjv_t) NULL)	// out of memory.
-		{
-//                  Free prevously allocated LeafVs:
-		    while(ii--)
-		    {
-			if ((Pop1 = j__udyCountBitsL(JU_JLB_BITMAP(Pjlb, ii))))
-			{
-			    PjvnewRaw = JL_JLB_PVALUE(Pjlb, ii);
-			    j__udyLFreeJV(PjvnewRaw, Pop1, Pjpm);
-			}
-		    }
-//                  Free the bitmap leaf
-		    j__udyLFreeJLB1(PjlbRaw,Pjpm);
-		    return(-1);
-		}
-		Pjvnew    = P_JV(PjvnewRaw);
-		JU_COPYMEM(Pjvnew, Pjv, Pop1);
-
-		Pjv += Pop1;
-		JL_JLB_PVALUE(Pjlb, ii) = PjvnewRaw;
-	    }
-	}
-#endif // JUDYL
-
-	DcdP0 = JU_JPDCDPOP0(Pjp) | (PLeaf[0] & cJU_DCDMASK(1));
-        JU_JPSETADT(Pjp, (Word_t)PjlbRaw, DcdP0, cJU_JPLEAF_B1);
-
-	return(1);	// return success
-
-} // j__udyCascade1()
-
-#endif // (!(JUDY1 && JU_64BIT))
-
-
-// ****************************************************************************
-// __ J U D Y   C A S C A D E 2
-//
-// Entry PLeaf of size LeafPop1 is either compressed or splayed with pointer
-// returned in Pjp.  Entry Levels sizeof(Word_t) down to level 2.
-//
-// Splay or compress the 2-byte Index Leaf that Pjp point to.  Return *Pjp as a
-// (compressed) cJU_LEAFB1 or a cJU_BRANCH_*2
-
-FUNCTION int j__udyCascade2(
-	Pjp_t	   Pjp,
-	Pvoid_t	   Pjpm)
-{
-	uint16_t * PLeaf;	// pointer to leaf, explicit type.
-	Word_t	   End, Start;	// temporaries.
-	Word_t	   ExpCnt;	// count of expanses of splay.
-	Word_t     CIndex;	// current Index word.
-JUDYLCODE(Pjv_t	   Pjv;)	// value area of leaf.
-
-//	Temp staging for parts(Leaves) of newly splayed leaf
-	jp_t	   StageJP   [cJU_LEAF2_MAXPOP1];  // JPs of new leaves
-	uint8_t	   StageExp  [cJU_LEAF2_MAXPOP1];  // Expanses of new leaves
-	uint8_t	   SubJPCount[cJU_NUMSUBEXPB];     // JPs in each subexpanse
-	jbb_t      StageJBB;                       // staged bitmap branch
-
-	assert(JU_JPTYPE(Pjp) == cJU_JPLEAF2);
-	assert((JU_JPDCDPOP0(Pjp) & 0xFFFF) == (cJU_LEAF2_MAXPOP1-1));
-
-//	Get the address of the Leaf
-	PLeaf = (uint16_t *) P_JLL(Pjp->jp_Addr);
-
-//	And its Value area
-	JUDYLCODE(Pjv = JL_LEAF2VALUEAREA(PLeaf, cJU_LEAF2_MAXPOP1);)
-
-//  If Leaf is in 1 expanse -- just compress it to a Bitmap Leaf
-
-	CIndex = PLeaf[0];
-	if (!JU_DIGITATSTATE(CIndex ^ PLeaf[cJU_LEAF2_MAXPOP1-1], 2))
-	{
-//	cJU_JPLEAF_B1
-                Word_t DcdP0;
-		Pjlb_t PjlbRaw;
-		PjlbRaw = j__udyJLL2toJLB1(PLeaf,
-#ifdef JUDYL
-				     Pjv,
-#endif
-				     cJU_LEAF2_MAXPOP1, Pjpm);
-		if (PjlbRaw == (Pjlb_t)NULL) return(-1);  // out of memory
-
-//		Merge in another Dcd byte because compressing
-		DcdP0 = (CIndex & cJU_DCDMASK(1)) | JU_JPDCDPOP0(Pjp);
-                JU_JPSETADT(Pjp, (Word_t)PjlbRaw, DcdP0, cJU_JPLEAF_B1);
-
-		return(1);
-	}
-
-//  Else in 2+ expanses, splay Leaf into smaller leaves at higher compression
-
-	StageJBB = StageJBBZero;       // zero staged bitmap branch
-	ZEROJP(SubJPCount);
-
-//	Splay the 2 byte index Leaf to 1 byte Index Leaves
-	for (ExpCnt = Start = 0, End = 1; ; End++)
-	{
-//		Check if new expanse or last one
-		if (	(End == cJU_LEAF2_MAXPOP1)
-				||
-			(JU_DIGITATSTATE(CIndex ^ PLeaf[End], 2))
-		   )
-		{
-//			Build a leaf below the previous expanse
-//
-			Pjp_t  PjpJP	= StageJP + ExpCnt;
-			Word_t Pop1	= End - Start;
-			Word_t expanse = JU_DIGITATSTATE(CIndex, 2);
-			Word_t subexp  = expanse / cJU_BITSPERSUBEXPB;
-//
-//                      set the bit that is the current expanse
-			JU_JBB_BITMAP(&StageJBB, subexp) |= JU_BITPOSMASKB(expanse);
-#ifdef SUBEXPCOUNTS
-			StageJBB.jbb_subPop1[subexp] += Pop1; // pop of subexpanse
-#endif
-//                      count number of expanses in each subexpanse
-			SubJPCount[subexp]++;
-
-//			Save byte expanse of leaf
-			StageExp[ExpCnt] = JU_DIGITATSTATE(CIndex, 2);
-
-			if (Pop1 == 1)	// cJU_JPIMMED_1_01
-			{
-	                    Word_t DcdP0;
-	                    DcdP0 = (JU_JPDCDPOP0(Pjp) & cJU_DCDMASK(1)) |
-                                CIndex;
-#ifdef JUDY1
-                            JU_JPSETADT(PjpJP, 0, DcdP0, cJ1_JPIMMED_1_01);
-#else   // JUDYL
-                            JU_JPSETADT(PjpJP, Pjv[Start], DcdP0, 
-                                cJL_JPIMMED_1_01);
-#endif  // JUDYL
-			}
-			else if (Pop1 <= cJU_IMMED1_MAXPOP1) // bigger
-			{
-//		cJL_JPIMMED_1_02..3:  JudyL 32
-//		cJ1_JPIMMED_1_02..7:  Judy1 32
-//		cJL_JPIMMED_1_02..7:  JudyL 64
-//		cJ1_JPIMMED_1_02..15: Judy1 64
-#ifdef JUDYL
-				Pjv_t  PjvnewRaw;	// value area of leaf.
-				Pjv_t  Pjvnew;
-
-//				Allocate Value area for Immediate Leaf
-				PjvnewRaw = j__udyLAllocJV(Pop1, Pjpm);
-				if (PjvnewRaw == (Pjv_t) NULL)
-					FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-				Pjvnew = P_JV(PjvnewRaw);
-
-//				Copy to Values to Value Leaf
-				JU_COPYMEM(Pjvnew, Pjv + Start, Pop1);
-				PjpJP->jp_Addr = (Word_t) PjvnewRaw;
-
-//				Copy to JP as an immediate Leaf
-				JU_COPYMEM(PjpJP->jp_LIndex, PLeaf + Start,
-					   Pop1);
-#else
-				JU_COPYMEM(PjpJP->jp_1Index, PLeaf + Start,
-					   Pop1);
-#endif
-//				Set Type, Population and Index size
-				PjpJP->jp_Type = cJU_JPIMMED_1_02 + Pop1 - 2;
-			}
-
-// 64Bit Judy1 does not have Leaf1:  (note, unifdef disallows comment on next
-// line)
-
-#if (! (defined(JUDY1) && defined(JU_64BIT)))
-			else if (Pop1 <= cJU_LEAF1_MAXPOP1) // still bigger
-			{
-//		cJU_JPLEAF1
-                                Word_t  DcdP0;
-				Pjll_t PjllRaw;	 // pointer to new leaf.
-				Pjll_t Pjll;
-		      JUDYLCODE(Pjv_t  Pjvnew;)	 // value area of new leaf.
-
-//				Get a new Leaf
-				PjllRaw = j__udyAllocJLL1(Pop1, Pjpm);
-				if (PjllRaw == (Pjll_t)NULL)
-					FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-				Pjll = P_JLL(PjllRaw);
-#ifdef JUDYL
-//				Copy to Values to new Leaf
-				Pjvnew = JL_LEAF1VALUEAREA(Pjll, Pop1);
-				JU_COPYMEM(Pjvnew, Pjv + Start, Pop1);
-#endif
-//				Copy Indexes to new Leaf
-				JU_COPYMEM((uint8_t *)Pjll, PLeaf+Start, Pop1);
-
-				DBGCODE(JudyCheckSorted(Pjll, Pop1, 1);)
-
-                                DcdP0 = (JU_JPDCDPOP0(Pjp) & cJU_DCDMASK(2)) 
-                                                |
-                                        (CIndex & cJU_DCDMASK(2-1))
-                                                |
-                                        (Pop1 - 1);
-
-                                JU_JPSETADT(PjpJP, (Word_t)PjllRaw, DcdP0,
-                                        cJU_JPLEAF1);
-			}
-#endif //  (!(JUDY1 && JU_64BIT)) // Not 64Bit Judy1
-
-			else				// biggest
-			{
-//		cJU_JPLEAF_B1
-                                Word_t  DcdP0;
-				Pjlb_t PjlbRaw;
-				PjlbRaw = j__udyJLL2toJLB1(
-						PLeaf + Start,
-#ifdef JUDYL
-						Pjv + Start,
-#endif
-						Pop1, Pjpm);
-				if (PjlbRaw == (Pjlb_t)NULL)
-					FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-                                DcdP0 = (JU_JPDCDPOP0(Pjp) & cJU_DCDMASK(2)) 
-                                                |
-                                        (CIndex & cJU_DCDMASK(2-1)) 
-                                                |
-                                        (Pop1 - 1);
-
-                                JU_JPSETADT(PjpJP, (Word_t)PjlbRaw, DcdP0,
-                                        cJU_JPLEAF_B1);
-			}
-			ExpCnt++;
-//                      Done?
-			if (End == cJU_LEAF2_MAXPOP1) break;
-
-//			New Expanse, Start and Count
-			CIndex = PLeaf[End];
-			Start  = End;
-		}
-	}
-
-//      Now put all the Leaves below a BranchL or BranchB:
-	if (ExpCnt <= cJU_BRANCHLMAXJPS) // put the Leaves below a BranchL
-	{
-	    if (j__udyCreateBranchL(Pjp, StageJP, StageExp, ExpCnt,
-			Pjpm) == -1) FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-	    Pjp->jp_Type = cJU_JPBRANCH_L2;
-	}
-	else
-	{
-	    if (j__udyStageJBBtoJBB(Pjp, &StageJBB, StageJP, SubJPCount, Pjpm)
-		== -1) FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-	}
-	return(1);
-
-} // j__udyCascade2()
-
-
-// ****************************************************************************
-// __ J U D Y   C A S C A D E 3
-//
-// Return *Pjp as a (compressed) cJU_LEAF2, cJU_BRANCH_L3, cJU_BRANCH_B3.
-
-FUNCTION int j__udyCascade3(
-	Pjp_t	   Pjp,
-	Pvoid_t	   Pjpm)
-{
-	uint8_t  * PLeaf;	// pointer to leaf, explicit type.
-	Word_t	   End, Start;	// temporaries.
-	Word_t	   ExpCnt;	// count of expanses of splay.
-	Word_t     CIndex;	// current Index word.
-JUDYLCODE(Pjv_t	   Pjv;)	// value area of leaf.
-
-//	Temp staging for parts(Leaves) of newly splayed leaf
-	jp_t	   StageJP   [cJU_LEAF3_MAXPOP1];  // JPs of new leaves
-	Word_t	   StageA    [cJU_LEAF3_MAXPOP1];
-	uint8_t	   StageExp  [cJU_LEAF3_MAXPOP1];  // Expanses of new leaves
-	uint8_t	   SubJPCount[cJU_NUMSUBEXPB];     // JPs in each subexpanse
-	jbb_t      StageJBB;                       // staged bitmap branch
-
-	assert(JU_JPTYPE(Pjp) == cJU_JPLEAF3);
-	assert((JU_JPDCDPOP0(Pjp) & 0xFFFFFF) == (cJU_LEAF3_MAXPOP1-1));
-
-//	Get the address of the Leaf
-	PLeaf = (uint8_t *) P_JLL(Pjp->jp_Addr);
-
-//	Extract leaf to Word_t and insert-sort Index into it
-	j__udyCopy3toW(StageA, PLeaf, cJU_LEAF3_MAXPOP1);
-
-//	Get the address of the Leaf and Value area
-	JUDYLCODE(Pjv = JL_LEAF3VALUEAREA(PLeaf, cJU_LEAF3_MAXPOP1);)
-
-//  If Leaf is in 1 expanse -- just compress it (compare 1st, last & Index)
-
-	CIndex = StageA[0];
-	if (!JU_DIGITATSTATE(CIndex ^ StageA[cJU_LEAF3_MAXPOP1-1], 3))
-	{
-                Word_t DcdP0;
-		Pjll_t PjllRaw;	 // pointer to new leaf.
-		Pjll_t Pjll;
-      JUDYLCODE(Pjv_t  Pjvnew;)	 // value area of new leaf.
-
-//		Alloc a 2 byte Index Leaf
-		PjllRaw	= j__udyAllocJLL2(cJU_LEAF3_MAXPOP1, Pjpm);
-		if (PjllRaw == (Pjlb_t)NULL) return(-1);  // out of memory
-
-		Pjll = P_JLL(PjllRaw);
-
-//		Copy just 2 bytes Indexes to new Leaf
-//		j__udyCopyWto2((uint16_t *) Pjll, StageA, cJU_LEAF3_MAXPOP1);
-		JU_COPYMEM    ((uint16_t *) Pjll, StageA, cJU_LEAF3_MAXPOP1);
-#ifdef JUDYL
-//		Copy Value area into new Leaf
-		Pjvnew = JL_LEAF2VALUEAREA(Pjll, cJU_LEAF3_MAXPOP1);
-		JU_COPYMEM(Pjvnew, Pjv, cJU_LEAF3_MAXPOP1);
-#endif
-		DBGCODE(JudyCheckSorted(Pjll, cJU_LEAF3_MAXPOP1, 2);)
-
-//		Form new JP, Pop0 field is unchanged
-//		Add in another Dcd byte because compressing
-                DcdP0 = (CIndex & cJU_DCDMASK(2)) | JU_JPDCDPOP0(Pjp);
-
-                JU_JPSETADT(Pjp, (Word_t) PjllRaw, DcdP0, cJU_JPLEAF2);
-
-		return(1); // Success
-	}
-
-//  Else in 2+ expanses, splay Leaf into smaller leaves at higher compression
-
-	StageJBB = StageJBBZero;       // zero staged bitmap branch
-	ZEROJP(SubJPCount);
-
-//	Splay the 3 byte index Leaf to 2 byte Index Leaves
-	for (ExpCnt = Start = 0, End = 1; ; End++)
-	{
-//		Check if new expanse or last one
-		if (	(End == cJU_LEAF3_MAXPOP1)
-				||
-			(JU_DIGITATSTATE(CIndex ^ StageA[End], 3))
-		   )
-		{
-//			Build a leaf below the previous expanse
-
-			Pjp_t  PjpJP	= StageJP + ExpCnt;
-			Word_t Pop1	= End - Start;
-			Word_t expanse = JU_DIGITATSTATE(CIndex, 3);
-			Word_t subexp  = expanse / cJU_BITSPERSUBEXPB;
-//
-//                      set the bit that is the current expanse
-			JU_JBB_BITMAP(&StageJBB, subexp) |= JU_BITPOSMASKB(expanse);
-#ifdef SUBEXPCOUNTS
-			StageJBB.jbb_subPop1[subexp] += Pop1; // pop of subexpanse
-#endif
-//                      count number of expanses in each subexpanse
-			SubJPCount[subexp]++;
-
-//			Save byte expanse of leaf
-			StageExp[ExpCnt] = JU_DIGITATSTATE(CIndex, 3);
-
-			if (Pop1 == 1)	// cJU_JPIMMED_2_01
-			{
-	                    Word_t DcdP0;
-	                    DcdP0 = (JU_JPDCDPOP0(Pjp) & cJU_DCDMASK(2)) |
-                                CIndex;
-#ifdef JUDY1
-                            JU_JPSETADT(PjpJP, 0, DcdP0, cJ1_JPIMMED_2_01);
-#else   // JUDYL
-                            JU_JPSETADT(PjpJP, Pjv[Start], DcdP0, 
-                                cJL_JPIMMED_2_01);
-#endif  // JUDYL
-			}
-#if (defined(JUDY1) || defined(JU_64BIT))
-			else if (Pop1 <= cJU_IMMED2_MAXPOP1)
-			{
-//		cJ1_JPIMMED_2_02..3:  Judy1 32
-//		cJL_JPIMMED_2_02..3:  JudyL 64
-//		cJ1_JPIMMED_2_02..7:  Judy1 64
-#ifdef JUDYL
-//				Alloc is 1st in case of malloc fail
-				Pjv_t PjvnewRaw;  // value area of new leaf.
-				Pjv_t Pjvnew;
-
-//				Allocate Value area for Immediate Leaf
-				PjvnewRaw = j__udyLAllocJV(Pop1, Pjpm);
-				if (PjvnewRaw == (Pjv_t) NULL)
-					FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-				Pjvnew = P_JV(PjvnewRaw);
-
-//				Copy to Values to Value Leaf
-				JU_COPYMEM(Pjvnew, Pjv + Start, Pop1);
-
-				PjpJP->jp_Addr = (Word_t) PjvnewRaw;
-
-//				Copy to Index to JP as an immediate Leaf
-				JU_COPYMEM((uint16_t *) (PjpJP->jp_LIndex),
-					   StageA + Start, Pop1);
-#else // JUDY1
-				JU_COPYMEM((uint16_t *) (PjpJP->jp_1Index),
-					   StageA + Start, Pop1);
-#endif // JUDY1
-//				Set Type, Population and Index size
-				PjpJP->jp_Type = cJU_JPIMMED_2_02 + Pop1 - 2;
-			}
-#endif // (JUDY1 || JU_64BIT)
-
-			else	// Make a linear leaf2
-			{
-//		cJU_JPLEAF2
-                                Word_t  DcdP0;
-				Pjll_t PjllRaw;	 // pointer to new leaf.
-				Pjll_t Pjll;
-		      JUDYLCODE(Pjv_t  Pjvnew;)	 // value area of new leaf.
-
-				PjllRaw = j__udyAllocJLL2(Pop1, Pjpm);
-				if (PjllRaw == (Pjll_t) NULL)
-					FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-				Pjll = P_JLL(PjllRaw);
-#ifdef JUDYL
-//				Copy to Values to new Leaf
-				Pjvnew = JL_LEAF2VALUEAREA(Pjll, Pop1);
-				JU_COPYMEM(Pjvnew, Pjv + Start, Pop1);
-#endif
-//				Copy least 2 bytes per Index of Leaf to new Leaf
-				JU_COPYMEM((uint16_t *) Pjll, StageA+Start,
-					   Pop1);
-
-				DBGCODE(JudyCheckSorted(Pjll, Pop1, 2);)
-
-                                DcdP0 = (JU_JPDCDPOP0(Pjp) & cJU_DCDMASK(3)) 
-                                                |
-                                        (CIndex & cJU_DCDMASK(3-1)) 
-                                                |
-                                        (Pop1 - 1);
-
-                                JU_JPSETADT(PjpJP, (Word_t)PjllRaw, DcdP0,
-                                        cJU_JPLEAF2);
-			}
-			ExpCnt++;
-//                      Done?
-			if (End == cJU_LEAF3_MAXPOP1) break;
-
-//			New Expanse, Start and Count
-			CIndex = StageA[End];
-			Start  = End;
-		}
-	}
-
-//      Now put all the Leaves below a BranchL or BranchB:
-	if (ExpCnt <= cJU_BRANCHLMAXJPS) // put the Leaves below a BranchL
-	{
-	    if (j__udyCreateBranchL(Pjp, StageJP, StageExp, ExpCnt,
-			Pjpm) == -1) FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-	    Pjp->jp_Type = cJU_JPBRANCH_L3;
-	}
-	else
-	{
-	    if (j__udyStageJBBtoJBB(Pjp, &StageJBB, StageJP, SubJPCount, Pjpm)
-		== -1) FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-	}
-	return(1);
-
-} // j__udyCascade3()
-
-
-#ifdef JU_64BIT   // JudyCascade[4567]
-
-// ****************************************************************************
-// __ J U D Y   C A S C A D E 4
-//
-// Cascade from a cJU_JPLEAF4 to one of the following:
-//  1. if leaf is in 1 expanse:
-//        compress it into a JPLEAF3
-//  2. if leaf contains multiple expanses:
-//        create linear or bitmap branch containing
-//        each new expanse is either a:
-//               JPIMMED_3_01  branch
-//               JPIMMED_3_02  branch
-//               JPLEAF3
-
-FUNCTION int j__udyCascade4(
-	Pjp_t	   Pjp,
-	Pvoid_t	   Pjpm)
-{
-	uint32_t * PLeaf;	// pointer to leaf, explicit type.
-	Word_t	   End, Start;	// temporaries.
-	Word_t	   ExpCnt;	// count of expanses of splay.
-	Word_t     CIndex;	// current Index word.
-JUDYLCODE(Pjv_t	   Pjv;)	// value area of leaf.
-
-//	Temp staging for parts(Leaves) of newly splayed leaf
-	jp_t	   StageJP   [cJU_LEAF4_MAXPOP1];  // JPs of new leaves
-	Word_t	   StageA    [cJU_LEAF4_MAXPOP1];
-	uint8_t	   StageExp  [cJU_LEAF4_MAXPOP1];  // Expanses of new leaves
-	uint8_t	   SubJPCount[cJU_NUMSUBEXPB];     // JPs in each subexpanse
-	jbb_t      StageJBB;                       // staged bitmap branch
-
-	assert(JU_JPTYPE(Pjp) == cJU_JPLEAF4);
-	assert((JU_JPDCDPOP0(Pjp) & 0xFFFFFFFF) == (cJU_LEAF4_MAXPOP1-1));
-
-//	Get the address of the Leaf
-	PLeaf = (uint32_t *) P_JLL(Pjp->jp_Addr);
-
-//	Extract 4 byte index Leaf to Word_t
-	j__udyCopy4toW(StageA, PLeaf, cJU_LEAF4_MAXPOP1);
-
-//	Get the address of the Leaf and Value area
-	JUDYLCODE(Pjv = JL_LEAF4VALUEAREA(PLeaf, cJU_LEAF4_MAXPOP1);)
-
-//  If Leaf is in 1 expanse -- just compress it (compare 1st, last & Index)
-
-	CIndex = StageA[0];
-	if (!JU_DIGITATSTATE(CIndex ^ StageA[cJU_LEAF4_MAXPOP1-1], 4))
-	{
-                Word_t DcdP0;
-		Pjll_t PjllRaw;	 // pointer to new leaf.
-		Pjll_t Pjll;
-      JUDYLCODE(Pjv_t  Pjvnew;)	 // value area of new Leaf.
-
-//		Alloc a 3 byte Index Leaf
-		PjllRaw = j__udyAllocJLL3(cJU_LEAF4_MAXPOP1, Pjpm);
-		if (PjllRaw == (Pjlb_t)NULL) return(-1);  // out of memory
-
-		Pjll = P_JLL(PjllRaw);
-
-//		Copy Index area into new Leaf
-		j__udyCopyWto3((uint8_t *) Pjll, StageA, cJU_LEAF4_MAXPOP1);
-#ifdef JUDYL
-//		Copy Value area into new Leaf
-		Pjvnew = JL_LEAF3VALUEAREA(Pjll, cJU_LEAF4_MAXPOP1);
-		JU_COPYMEM(Pjvnew, Pjv, cJU_LEAF4_MAXPOP1);
-#endif
-		DBGCODE(JudyCheckSorted(Pjll, cJU_LEAF4_MAXPOP1, 3);)
-
-	        DcdP0 = JU_JPDCDPOP0(Pjp) | (CIndex & cJU_DCDMASK(3));
-                JU_JPSETADT(Pjp, (Word_t)PjllRaw, DcdP0, cJU_JPLEAF3);
-
-		return(1);
-	}
-
-//  Else in 2+ expanses, splay Leaf into smaller leaves at higher compression
-
-	StageJBB = StageJBBZero;       // zero staged bitmap branch
-	ZEROJP(SubJPCount);
-
-//	Splay the 4 byte index Leaf to 3 byte Index Leaves
-	for (ExpCnt = Start = 0, End = 1; ; End++)
-	{
-//		Check if new expanse or last one
-		if (	(End == cJU_LEAF4_MAXPOP1)
-				||
-			(JU_DIGITATSTATE(CIndex ^ StageA[End], 4))
-		   )
-		{
-//			Build a leaf below the previous expanse
-
-			Pjp_t  PjpJP	= StageJP + ExpCnt;
-			Word_t Pop1	= End - Start;
-			Word_t expanse = JU_DIGITATSTATE(CIndex, 4);
-			Word_t subexp  = expanse / cJU_BITSPERSUBEXPB;
-//
-//                      set the bit that is the current expanse
-			JU_JBB_BITMAP(&StageJBB, subexp) |= JU_BITPOSMASKB(expanse);
-#ifdef SUBEXPCOUNTS
-			StageJBB.jbb_subPop1[subexp] += Pop1; // pop of subexpanse
-#endif
-//                      count number of expanses in each subexpanse
-			SubJPCount[subexp]++;
-
-//			Save byte expanse of leaf
-			StageExp[ExpCnt] = JU_DIGITATSTATE(CIndex, 4);
-
-			if (Pop1 == 1)	// cJU_JPIMMED_3_01
-			{
-	                    Word_t DcdP0;
-	                    DcdP0 = (JU_JPDCDPOP0(Pjp) & cJU_DCDMASK(3)) |
-                                CIndex;
-#ifdef JUDY1
-                            JU_JPSETADT(PjpJP, 0, DcdP0, cJ1_JPIMMED_3_01);
-#else   // JUDYL
-                            JU_JPSETADT(PjpJP, Pjv[Start], DcdP0,
-                                cJL_JPIMMED_3_01);
-#endif  // JUDYL
-			}
-			else if (Pop1 <= cJU_IMMED3_MAXPOP1)
-			{
-//		cJ1_JPIMMED_3_02   :  Judy1 32
-//		cJL_JPIMMED_3_02   :  JudyL 64
-//		cJ1_JPIMMED_3_02..5:  Judy1 64
-
-#ifdef JUDYL
-//				Alloc is 1st in case of malloc fail
-				Pjv_t PjvnewRaw;  // value area of new leaf.
-				Pjv_t Pjvnew;
-
-//				Allocate Value area for Immediate Leaf
-				PjvnewRaw = j__udyLAllocJV(Pop1, Pjpm);
-				if (PjvnewRaw == (Pjv_t) NULL)
-					FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-				Pjvnew = P_JV(PjvnewRaw);
-
-//				Copy to Values to Value Leaf
-				JU_COPYMEM(Pjvnew, Pjv + Start, Pop1);
-				PjpJP->jp_Addr = (Word_t) PjvnewRaw;
-
-//				Copy to Index to JP as an immediate Leaf
-				j__udyCopyWto3(PjpJP->jp_LIndex,
-					       StageA + Start, Pop1);
-#else
-				j__udyCopyWto3(PjpJP->jp_1Index,
-					       StageA + Start, Pop1);
-#endif
-//				Set type, population and Index size
-				PjpJP->jp_Type = cJU_JPIMMED_3_02 + Pop1 - 2;
-			}
-			else
-			{
-//		cJU_JPLEAF3
-                                Word_t  DcdP0;
-				Pjll_t PjllRaw;	 // pointer to new leaf.
-				Pjll_t Pjll;
-		      JUDYLCODE(Pjv_t  Pjvnew;)	 // value area of new leaf.
-
-				PjllRaw = j__udyAllocJLL3(Pop1, Pjpm);
-				if (PjllRaw == (Pjll_t)NULL)
-					FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-				Pjll = P_JLL(PjllRaw);
-
-//				Copy Indexes to new Leaf
-				j__udyCopyWto3((uint8_t *) Pjll, StageA + Start,
-					       Pop1);
-#ifdef JUDYL
-//				Copy to Values to new Leaf
-				Pjvnew = JL_LEAF3VALUEAREA(Pjll, Pop1);
-				JU_COPYMEM(Pjvnew, Pjv + Start, Pop1);
-#endif
-				DBGCODE(JudyCheckSorted(Pjll, Pop1, 3);)
-
-                                DcdP0 = (JU_JPDCDPOP0(Pjp) & cJU_DCDMASK(4)) 
-                                                |
-                                        (CIndex & cJU_DCDMASK(4-1)) 
-                                                |
-                                        (Pop1 - 1);
-
-                                JU_JPSETADT(PjpJP, (Word_t)PjllRaw, DcdP0,
-                                        cJU_JPLEAF3);
-			}
-			ExpCnt++;
-//                      Done?
-			if (End == cJU_LEAF4_MAXPOP1) break;
-
-//			New Expanse, Start and Count
-			CIndex = StageA[End];
-			Start  = End;
-		}
-	}
-
-//      Now put all the Leaves below a BranchL or BranchB:
-	if (ExpCnt <= cJU_BRANCHLMAXJPS) // put the Leaves below a BranchL
-	{
-	    if (j__udyCreateBranchL(Pjp, StageJP, StageExp, ExpCnt,
-			Pjpm) == -1) FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-	    Pjp->jp_Type = cJU_JPBRANCH_L4;
-	}
-	else
-	{
-	    if (j__udyStageJBBtoJBB(Pjp, &StageJBB, StageJP, SubJPCount, Pjpm)
-		== -1) FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-	}
-	return(1);
-
-}  // j__udyCascade4()
-
-
-// ****************************************************************************
-// __ J U D Y   C A S C A D E 5
-//
-// Cascade from a cJU_JPLEAF5 to one of the following:
-//  1. if leaf is in 1 expanse:
-//        compress it into a JPLEAF4
-//  2. if leaf contains multiple expanses:
-//        create linear or bitmap branch containing
-//        each new expanse is either a:
-//               JPIMMED_4_01  branch
-//               JPLEAF4
-
-FUNCTION int j__udyCascade5(
-	Pjp_t	   Pjp,
-	Pvoid_t	   Pjpm)
-{
-	uint8_t  * PLeaf;	// pointer to leaf, explicit type.
-	Word_t	   End, Start;	// temporaries.
-	Word_t	   ExpCnt;	// count of expanses of splay.
-	Word_t     CIndex;	// current Index word.
-JUDYLCODE(Pjv_t	   Pjv;)	// value area of leaf.
-
-//	Temp staging for parts(Leaves) of newly splayed leaf
-	jp_t	   StageJP   [cJU_LEAF5_MAXPOP1];  // JPs of new leaves
-	Word_t	   StageA    [cJU_LEAF5_MAXPOP1];
-	uint8_t	   StageExp  [cJU_LEAF5_MAXPOP1];  // Expanses of new leaves
-	uint8_t	   SubJPCount[cJU_NUMSUBEXPB];     // JPs in each subexpanse
-	jbb_t      StageJBB;                       // staged bitmap branch
-
-	assert(JU_JPTYPE(Pjp) == cJU_JPLEAF5);
-	assert((JU_JPDCDPOP0(Pjp) & 0xFFFFFFFFFF) == (cJU_LEAF5_MAXPOP1-1));
-
-//	Get the address of the Leaf
-	PLeaf = (uint8_t *) P_JLL(Pjp->jp_Addr);
-
-//	Extract 5 byte index Leaf to Word_t
-	j__udyCopy5toW(StageA, PLeaf, cJU_LEAF5_MAXPOP1);
-
-//	Get the address of the Leaf and Value area
-	JUDYLCODE(Pjv = JL_LEAF5VALUEAREA(PLeaf, cJU_LEAF5_MAXPOP1);)
-
-//  If Leaf is in 1 expanse -- just compress it (compare 1st, last & Index)
-
-	CIndex = StageA[0];
-	if (!JU_DIGITATSTATE(CIndex ^ StageA[cJU_LEAF5_MAXPOP1-1], 5))
-	{
-                Word_t DcdP0;
-		Pjll_t PjllRaw;	 // pointer to new leaf.
-		Pjll_t Pjll;
-      JUDYLCODE(Pjv_t  Pjvnew;)	 // value area of new leaf.
-
-//		Alloc a 4 byte Index Leaf
-		PjllRaw = j__udyAllocJLL4(cJU_LEAF5_MAXPOP1, Pjpm);
-		if (PjllRaw == (Pjlb_t)NULL) return(-1);  // out of memory
-
-		Pjll = P_JLL(PjllRaw);
-
-//		Copy Index area into new Leaf
-		j__udyCopyWto4((uint8_t *) Pjll, StageA, cJU_LEAF5_MAXPOP1);
-#ifdef JUDYL
-//		Copy Value area into new Leaf
-		Pjvnew = JL_LEAF4VALUEAREA(Pjll, cJU_LEAF5_MAXPOP1);
-		JU_COPYMEM(Pjvnew, Pjv, cJU_LEAF5_MAXPOP1);
-#endif
-		DBGCODE(JudyCheckSorted(Pjll, cJU_LEAF5_MAXPOP1, 4);)
-
-	        DcdP0 = JU_JPDCDPOP0(Pjp) | (CIndex & cJU_DCDMASK(4));
-                JU_JPSETADT(Pjp, (Word_t)PjllRaw, DcdP0, cJU_JPLEAF4);
-
-		return(1);
-	}
-
-//  Else in 2+ expanses, splay Leaf into smaller leaves at higher compression
-
-	StageJBB = StageJBBZero;       // zero staged bitmap branch
-	ZEROJP(SubJPCount);
-
-//	Splay the 5 byte index Leaf to 4 byte Index Leaves
-	for (ExpCnt = Start = 0, End = 1; ; End++)
-	{
-//		Check if new expanse or last one
-		if (	(End == cJU_LEAF5_MAXPOP1)
-				||
-			(JU_DIGITATSTATE(CIndex ^ StageA[End], 5))
-		   )
-		{
-//			Build a leaf below the previous expanse
-
-			Pjp_t  PjpJP	= StageJP + ExpCnt;
-			Word_t Pop1	= End - Start;
-			Word_t expanse = JU_DIGITATSTATE(CIndex, 5);
-			Word_t subexp  = expanse / cJU_BITSPERSUBEXPB;
-//
-//                      set the bit that is the current expanse
-			JU_JBB_BITMAP(&StageJBB, subexp) |= JU_BITPOSMASKB(expanse);
-#ifdef SUBEXPCOUNTS
-			StageJBB.jbb_subPop1[subexp] += Pop1; // pop of subexpanse
-#endif
-//                      count number of expanses in each subexpanse
-			SubJPCount[subexp]++;
-
-//			Save byte expanse of leaf
-			StageExp[ExpCnt] = JU_DIGITATSTATE(CIndex, 5);
-
-			if (Pop1 == 1)	// cJU_JPIMMED_4_01
-			{
-	                    Word_t DcdP0;
-	                    DcdP0 = (JU_JPDCDPOP0(Pjp) & cJU_DCDMASK(4)) |
-                                CIndex;
-#ifdef JUDY1
-                            JU_JPSETADT(PjpJP, 0, DcdP0, cJ1_JPIMMED_4_01);
-#else   // JUDYL
-                            JU_JPSETADT(PjpJP, Pjv[Start], DcdP0,
-                                cJL_JPIMMED_4_01);
-#endif  // JUDYL
-			}
-#ifdef JUDY1
-			else if (Pop1 <= cJ1_IMMED4_MAXPOP1)
-			{
-//		cJ1_JPIMMED_4_02..3: Judy1 64
-
-//                              Copy to Index to JP as an immediate Leaf
-				j__udyCopyWto4(PjpJP->jp_1Index,
-					       StageA + Start, Pop1);
-
-//                              Set pointer, type, population and Index size
-				PjpJP->jp_Type = cJ1_JPIMMED_4_02 + Pop1 - 2;
-			}
-#endif
-			else
-			{
-//		cJU_JPLEAF4
-                                Word_t  DcdP0;
-				Pjll_t PjllRaw;	 // pointer to new leaf.
-				Pjll_t Pjll;
-		      JUDYLCODE(Pjv_t  Pjvnew;)	 // value area of new leaf.
-
-//				Get a new Leaf
-				PjllRaw = j__udyAllocJLL4(Pop1, Pjpm);
-				if (PjllRaw == (Pjll_t)NULL)
-					FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-				Pjll = P_JLL(PjllRaw);
-
-//				Copy Indexes to new Leaf
-				j__udyCopyWto4((uint8_t *) Pjll, StageA + Start,
-					       Pop1);
-#ifdef JUDYL
-//				Copy to Values to new Leaf
-				Pjvnew = JL_LEAF4VALUEAREA(Pjll, Pop1);
-				JU_COPYMEM(Pjvnew, Pjv + Start, Pop1);
-#endif
-				DBGCODE(JudyCheckSorted(Pjll, Pop1, 4);)
-
-                                DcdP0 = (JU_JPDCDPOP0(Pjp) & cJU_DCDMASK(5)) 
-                                                |
-                                        (CIndex & cJU_DCDMASK(5-1)) 
-                                                |
-                                        (Pop1 - 1);
-
-                                JU_JPSETADT(PjpJP, (Word_t)PjllRaw, DcdP0,
-                                        cJU_JPLEAF4);
-			}
-			ExpCnt++;
-//                      Done?
-			if (End == cJU_LEAF5_MAXPOP1) break;
-
-//			New Expanse, Start and Count
-			CIndex = StageA[End];
-			Start  = End;
-		}
-	}
-
-//      Now put all the Leaves below a BranchL or BranchB:
-	if (ExpCnt <= cJU_BRANCHLMAXJPS) // put the Leaves below a BranchL
-	{
-	    if (j__udyCreateBranchL(Pjp, StageJP, StageExp, ExpCnt,
-			Pjpm) == -1) FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-	    Pjp->jp_Type = cJU_JPBRANCH_L5;
-	}
-	else
-	{
-	    if (j__udyStageJBBtoJBB(Pjp, &StageJBB, StageJP, SubJPCount, Pjpm)
-		== -1) FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-	}
-	return(1);
-
-}  // j__udyCascade5()
-
-
-// ****************************************************************************
-// __ J U D Y   C A S C A D E 6
-//
-// Cascade from a cJU_JPLEAF6 to one of the following:
-//  1. if leaf is in 1 expanse:
-//        compress it into a JPLEAF5
-//  2. if leaf contains multiple expanses:
-//        create linear or bitmap branch containing
-//        each new expanse is either a:
-//               JPIMMED_5_01 ... JPIMMED_5_03  branch
-//               JPIMMED_5_01  branch
-//               JPLEAF5
-
-FUNCTION int j__udyCascade6(
-	Pjp_t	   Pjp,
-	Pvoid_t	   Pjpm)
-{
-	uint8_t  * PLeaf;	// pointer to leaf, explicit type.
-	Word_t	   End, Start;	// temporaries.
-	Word_t	   ExpCnt;	// count of expanses of splay.
-	Word_t     CIndex;	// current Index word.
-JUDYLCODE(Pjv_t	   Pjv;)	// value area of leaf.
-
-//	Temp staging for parts(Leaves) of newly splayed leaf
-	jp_t	   StageJP   [cJU_LEAF6_MAXPOP1];  // JPs of new leaves
-	Word_t	   StageA    [cJU_LEAF6_MAXPOP1];
-	uint8_t	   StageExp  [cJU_LEAF6_MAXPOP1];  // Expanses of new leaves
-	uint8_t	   SubJPCount[cJU_NUMSUBEXPB];     // JPs in each subexpanse
-	jbb_t      StageJBB;                       // staged bitmap branch
-
-	assert(JU_JPTYPE(Pjp) == cJU_JPLEAF6);
-	assert((JU_JPDCDPOP0(Pjp) & 0xFFFFFFFFFFFF) == (cJU_LEAF6_MAXPOP1-1));
-
-//	Get the address of the Leaf
-	PLeaf = (uint8_t *) P_JLL(Pjp->jp_Addr);
-
-//	Extract 6 byte index Leaf to Word_t
-	j__udyCopy6toW(StageA, PLeaf, cJU_LEAF6_MAXPOP1);
-
-//	Get the address of the Leaf and Value area
-	JUDYLCODE(Pjv = JL_LEAF6VALUEAREA(PLeaf, cJU_LEAF6_MAXPOP1);)
-
-//  If Leaf is in 1 expanse -- just compress it (compare 1st, last & Index)
-
-	CIndex = StageA[0];
-	if (!JU_DIGITATSTATE(CIndex ^ StageA[cJU_LEAF6_MAXPOP1-1], 6))
-	{
-                Word_t DcdP0;
-		Pjll_t PjllRaw;	 // pointer to new leaf.
-		Pjll_t Pjll;
-      JUDYLCODE(Pjv_t  Pjvnew;)	 // value area of new leaf.
-
-//		Alloc a 5 byte Index Leaf
-		PjllRaw = j__udyAllocJLL5(cJU_LEAF6_MAXPOP1, Pjpm);
-		if (PjllRaw == (Pjlb_t)NULL) return(-1);  // out of memory
-
-		Pjll = P_JLL(PjllRaw);
-
-//		Copy Index area into new Leaf
-		j__udyCopyWto5((uint8_t *) Pjll, StageA, cJU_LEAF6_MAXPOP1);
-#ifdef JUDYL
-//		Copy Value area into new Leaf
-		Pjvnew = JL_LEAF5VALUEAREA(Pjll, cJU_LEAF6_MAXPOP1);
-		JU_COPYMEM(Pjvnew, Pjv, cJU_LEAF6_MAXPOP1);
-#endif
-		DBGCODE(JudyCheckSorted(Pjll, cJU_LEAF6_MAXPOP1, 5);)
-
-	        DcdP0 = JU_JPDCDPOP0(Pjp) | (CIndex & cJU_DCDMASK(5));
-                JU_JPSETADT(Pjp, (Word_t)PjllRaw, DcdP0, cJU_JPLEAF5);
-
-		return(1);
-	}
-
-//  Else in 2+ expanses, splay Leaf into smaller leaves at higher compression
-
-	StageJBB = StageJBBZero;       // zero staged bitmap branch
-	ZEROJP(SubJPCount);
-
-//	Splay the 6 byte index Leaf to 5 byte Index Leaves
-	for (ExpCnt = Start = 0, End = 1; ; End++)
-	{
-//		Check if new expanse or last one
-		if (	(End == cJU_LEAF6_MAXPOP1)
-				||
-			(JU_DIGITATSTATE(CIndex ^ StageA[End], 6))
-		   )
-		{
-//			Build a leaf below the previous expanse
-
-			Pjp_t  PjpJP	= StageJP + ExpCnt;
-			Word_t Pop1	= End - Start;
-			Word_t expanse = JU_DIGITATSTATE(CIndex, 6);
-			Word_t subexp  = expanse / cJU_BITSPERSUBEXPB;
-//
-//                      set the bit that is the current expanse
-			JU_JBB_BITMAP(&StageJBB, subexp) |= JU_BITPOSMASKB(expanse);
-#ifdef SUBEXPCOUNTS
-			StageJBB.jbb_subPop1[subexp] += Pop1; // pop of subexpanse
-#endif
-//                      count number of expanses in each subexpanse
-			SubJPCount[subexp]++;
-
-//			Save byte expanse of leaf
-			StageExp[ExpCnt] = JU_DIGITATSTATE(CIndex, 6);
-
-			if (Pop1 == 1)	// cJU_JPIMMED_5_01
-			{
-	                    Word_t DcdP0;
-	                    DcdP0 = (JU_JPDCDPOP0(Pjp) & cJU_DCDMASK(5)) |
-                                CIndex;
-#ifdef JUDY1
-                            JU_JPSETADT(PjpJP, 0, DcdP0, cJ1_JPIMMED_5_01);
-#else   // JUDYL
-                            JU_JPSETADT(PjpJP, Pjv[Start], DcdP0,
-                                cJL_JPIMMED_5_01);
-#endif  // JUDYL
-			}
-#ifdef JUDY1
-			else if (Pop1 <= cJ1_IMMED5_MAXPOP1)
-			{
-//		cJ1_JPIMMED_5_02..3: Judy1 64
-
-//                              Copy to Index to JP as an immediate Leaf
-				j__udyCopyWto5(PjpJP->jp_1Index,
-					       StageA + Start, Pop1);
-
-//                              Set pointer, type, population and Index size
-				PjpJP->jp_Type = cJ1_JPIMMED_5_02 + Pop1 - 2;
-			}
-#endif
-			else
-			{
-//		cJU_JPLEAF5
-                                Word_t  DcdP0;
-				Pjll_t PjllRaw;	 // pointer to new leaf.
-				Pjll_t Pjll;
-		      JUDYLCODE(Pjv_t  Pjvnew;)	 // value area of new leaf.
-
-//				Get a new Leaf
-				PjllRaw = j__udyAllocJLL5(Pop1, Pjpm);
-				if (PjllRaw == (Pjll_t)NULL)
-					FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-				Pjll = P_JLL(PjllRaw);
-
-//				Copy Indexes to new Leaf
-				j__udyCopyWto5((uint8_t *) Pjll, StageA + Start,
-					       Pop1);
-
-//				Copy to Values to new Leaf
-#ifdef JUDYL
-				Pjvnew = JL_LEAF5VALUEAREA(Pjll, Pop1);
-				JU_COPYMEM(Pjvnew, Pjv + Start, Pop1);
-#endif
-				DBGCODE(JudyCheckSorted(Pjll, Pop1, 5);)
-
-                                DcdP0 = (JU_JPDCDPOP0(Pjp) & cJU_DCDMASK(6)) 
-                                                |
-                                        (CIndex & cJU_DCDMASK(6-1)) 
-                                                |
-                                        (Pop1 - 1);
-
-                                JU_JPSETADT(PjpJP, (Word_t)PjllRaw, DcdP0,
-                                        cJU_JPLEAF5);
-			}
-			ExpCnt++;
-//                      Done?
-			if (End == cJU_LEAF6_MAXPOP1) break;
-
-//			New Expanse, Start and Count
-			CIndex = StageA[End];
-			Start  = End;
-		}
-	}
-
-//      Now put all the Leaves below a BranchL or BranchB:
-	if (ExpCnt <= cJU_BRANCHLMAXJPS) // put the Leaves below a BranchL
-	{
-	    if (j__udyCreateBranchL(Pjp, StageJP, StageExp, ExpCnt,
-			Pjpm) == -1) FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-	    Pjp->jp_Type = cJU_JPBRANCH_L6;
-	}
-	else
-	{
-	    if (j__udyStageJBBtoJBB(Pjp, &StageJBB, StageJP, SubJPCount, Pjpm)
-		== -1) FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-	}
-	return(1);
-
-}  // j__udyCascade6()
-
-
-// ****************************************************************************
-// __ J U D Y   C A S C A D E 7
-//
-// Cascade from a cJU_JPLEAF7 to one of the following:
-//  1. if leaf is in 1 expanse:
-//        compress it into a JPLEAF6
-//  2. if leaf contains multiple expanses:
-//        create linear or bitmap branch containing
-//        each new expanse is either a:
-//               JPIMMED_6_01 ... JPIMMED_6_02  branch
-//               JPIMMED_6_01  branch
-//               JPLEAF6
-
-FUNCTION int j__udyCascade7(
-	Pjp_t	   Pjp,
-	Pvoid_t	   Pjpm)
-{
-	uint8_t  * PLeaf;	// pointer to leaf, explicit type.
-	Word_t	   End, Start;	// temporaries.
-	Word_t	   ExpCnt;	// count of expanses of splay.
-	Word_t     CIndex;	// current Index word.
-JUDYLCODE(Pjv_t	   Pjv;)	// value area of leaf.
-
-//	Temp staging for parts(Leaves) of newly splayed leaf
-	jp_t	   StageJP   [cJU_LEAF7_MAXPOP1];  // JPs of new leaves
-	Word_t	   StageA    [cJU_LEAF7_MAXPOP1];
-	uint8_t	   StageExp  [cJU_LEAF7_MAXPOP1];  // Expanses of new leaves
-	uint8_t	   SubJPCount[cJU_NUMSUBEXPB];     // JPs in each subexpanse
-	jbb_t      StageJBB;                       // staged bitmap branch
-
-	assert(JU_JPTYPE(Pjp) == cJU_JPLEAF7);
-	assert(JU_JPDCDPOP0(Pjp) == (cJU_LEAF7_MAXPOP1-1));
-
-//	Get the address of the Leaf
-	PLeaf = (uint8_t *) P_JLL(Pjp->jp_Addr);
-
-//	Extract 7 byte index Leaf to Word_t
-	j__udyCopy7toW(StageA, PLeaf, cJU_LEAF7_MAXPOP1);
-
-//	Get the address of the Leaf and Value area
-	JUDYLCODE(Pjv = JL_LEAF7VALUEAREA(PLeaf, cJU_LEAF7_MAXPOP1);)
-
-//  If Leaf is in 1 expanse -- just compress it (compare 1st, last & Index)
-
-	CIndex = StageA[0];
-	if (!JU_DIGITATSTATE(CIndex ^ StageA[cJU_LEAF7_MAXPOP1-1], 7))
-	{
-                Word_t DcdP0;
-		Pjll_t PjllRaw;	 // pointer to new leaf.
-		Pjll_t Pjll;
-      JUDYLCODE(Pjv_t  Pjvnew;)	 // value area of new leaf.
-
-//		Alloc a 6 byte Index Leaf
-		PjllRaw = j__udyAllocJLL6(cJU_LEAF7_MAXPOP1, Pjpm);
-		if (PjllRaw == (Pjlb_t)NULL) return(-1);  // out of memory
-
-		Pjll = P_JLL(PjllRaw);
-
-//		Copy Index area into new Leaf
-		j__udyCopyWto6((uint8_t *) Pjll, StageA, cJU_LEAF7_MAXPOP1);
-#ifdef JUDYL
-//		Copy Value area into new Leaf
-		Pjvnew = JL_LEAF6VALUEAREA(Pjll, cJU_LEAF7_MAXPOP1);
-		JU_COPYMEM(Pjvnew, Pjv, cJU_LEAF7_MAXPOP1);
-#endif
-		DBGCODE(JudyCheckSorted(Pjll, cJU_LEAF7_MAXPOP1, 6);)
-
-	        DcdP0 = JU_JPDCDPOP0(Pjp) | (CIndex & cJU_DCDMASK(6));
-                JU_JPSETADT(Pjp, (Word_t)PjllRaw, DcdP0, cJU_JPLEAF6);
-
-		return(1);
-	}
-
-//  Else in 2+ expanses, splay Leaf into smaller leaves at higher compression
-
-	StageJBB = StageJBBZero;       // zero staged bitmap branch
-	ZEROJP(SubJPCount);
-
-//	Splay the 7 byte index Leaf to 6 byte Index Leaves
-	for (ExpCnt = Start = 0, End = 1; ; End++)
-	{
-//		Check if new expanse or last one
-		if (	(End == cJU_LEAF7_MAXPOP1)
-				||
-			(JU_DIGITATSTATE(CIndex ^ StageA[End], 7))
-		   )
-		{
-//			Build a leaf below the previous expanse
-
-			Pjp_t  PjpJP	= StageJP + ExpCnt;
-			Word_t Pop1	= End - Start;
-			Word_t expanse = JU_DIGITATSTATE(CIndex, 7);
-			Word_t subexp  = expanse / cJU_BITSPERSUBEXPB;
-//
-//                      set the bit that is the current expanse
-			JU_JBB_BITMAP(&StageJBB, subexp) |= JU_BITPOSMASKB(expanse);
-#ifdef SUBEXPCOUNTS
-			StageJBB.jbb_subPop1[subexp] += Pop1; // pop of subexpanse
-#endif
-//                      count number of expanses in each subexpanse
-			SubJPCount[subexp]++;
-
-//			Save byte expanse of leaf
-			StageExp[ExpCnt] = JU_DIGITATSTATE(CIndex, 7);
-
-			if (Pop1 == 1)	// cJU_JPIMMED_6_01
-			{
-	                    Word_t DcdP0;
-	                    DcdP0 = (JU_JPDCDPOP0(Pjp) & cJU_DCDMASK(6)) |
-                                CIndex;
-#ifdef JUDY1
-                            JU_JPSETADT(PjpJP, 0, DcdP0, cJ1_JPIMMED_6_01);
-#else   // JUDYL
-                            JU_JPSETADT(PjpJP, Pjv[Start], DcdP0,
-                                cJL_JPIMMED_6_01);
-#endif  // JUDYL
-			}
-#ifdef JUDY1
-			else if (Pop1 == cJ1_IMMED6_MAXPOP1)
-			{
-//		cJ1_JPIMMED_6_02:    Judy1 64
-
-//                              Copy to Index to JP as an immediate Leaf
-				j__udyCopyWto6(PjpJP->jp_1Index,
-					       StageA + Start, 2);
-
-//                              Set pointer, type, population and Index size
-				PjpJP->jp_Type = cJ1_JPIMMED_6_02;
-			}
-#endif
-			else
-			{
-//		cJU_JPLEAF6
-                                Word_t  DcdP0;
-				Pjll_t PjllRaw;	 // pointer to new leaf.
-				Pjll_t Pjll;
-		      JUDYLCODE(Pjv_t  Pjvnew;)	 // value area of new leaf.
-
-//				Get a new Leaf
-				PjllRaw = j__udyAllocJLL6(Pop1, Pjpm);
-				if (PjllRaw == (Pjll_t)NULL)
-					FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-				Pjll = P_JLL(PjllRaw);
-
-//				Copy Indexes to new Leaf
-				j__udyCopyWto6((uint8_t *) Pjll, StageA + Start,
-					       Pop1);
-#ifdef JUDYL
-//				Copy to Values to new Leaf
-				Pjvnew = JL_LEAF6VALUEAREA(Pjll, Pop1);
-				JU_COPYMEM(Pjvnew, Pjv + Start, Pop1);
-#endif
-				DBGCODE(JudyCheckSorted(Pjll, Pop1, 6);)
-
-                                DcdP0 = (JU_JPDCDPOP0(Pjp) & cJU_DCDMASK(7)) 
-                                                |
-                                        (CIndex & cJU_DCDMASK(7-1)) 
-                                                |
-                                        (Pop1 - 1);
-
-                                JU_JPSETADT(PjpJP, (Word_t)PjllRaw, DcdP0,
-                                        cJU_JPLEAF6);
-			}
-			ExpCnt++;
-//                      Done?
-			if (End == cJU_LEAF7_MAXPOP1) break;
-
-//			New Expanse, Start and Count
-			CIndex = StageA[End];
-			Start  = End;
-		}
-	}
-
-//      Now put all the Leaves below a BranchL or BranchB:
-	if (ExpCnt <= cJU_BRANCHLMAXJPS) // put the Leaves below a BranchL
-	{
-	    if (j__udyCreateBranchL(Pjp, StageJP, StageExp, ExpCnt,
-			Pjpm) == -1) FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-	    Pjp->jp_Type = cJU_JPBRANCH_L7;
-	}
-	else
-	{
-	    if (j__udyStageJBBtoJBB(Pjp, &StageJBB, StageJP, SubJPCount, Pjpm)
-		== -1) FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-	}
-	return(1);
-
-}  // j__udyCascade7()
-
-#endif // JU_64BIT
-
-
-// ****************************************************************************
-// __ J U D Y   C A S C A D E   L
-//
-// (Compressed) cJU_LEAF3[7], cJ1_JPBRANCH_L.
-//
-// Cascade from a LEAFW (under Pjp) to one of the following:
-//  1. if LEAFW is in 1 expanse:
-//        create linear branch with a JPLEAF3[7] under it
-//  2. LEAFW contains multiple expanses:
-//        create linear or bitmap branch containing new expanses
-//        each new expanse is either a: 32   64
-//               JPIMMED_3_01  branch    Y    N
-//               JPIMMED_7_01  branch    N    Y
-//               JPLEAF3                 Y    N
-//               JPLEAF7                 N    Y
-
-FUNCTION int j__udyCascadeL(
-	Pjp_t	   Pjp,
-	Pvoid_t	   Pjpm)
-{
-	Pjlw_t	   Pjlw;	// leaf to work on.
-	Word_t	   End, Start;	// temporaries.
-	Word_t	   ExpCnt;	// count of expanses of splay.
-	Word_t	   CIndex;	// current Index word.
-JUDYLCODE(Pjv_t	   Pjv;)	// value area of leaf.
-
-//	Temp staging for parts(Leaves) of newly splayed leaf
-	jp_t	StageJP [cJU_LEAFW_MAXPOP1];
-	uint8_t	StageExp[cJU_LEAFW_MAXPOP1];
-	uint8_t	   SubJPCount[cJU_NUMSUBEXPB];     // JPs in each subexpanse
-	jbb_t      StageJBB;                       // staged bitmap branch
-
-//	Get the address of the Leaf
-	Pjlw = P_JLW(Pjp->jp_Addr);
-
-	assert(Pjlw[0] == (cJU_LEAFW_MAXPOP1 - 1));
-
-//	Get pointer to Value area of old Leaf
-	JUDYLCODE(Pjv = JL_LEAFWVALUEAREA(Pjlw, cJU_LEAFW_MAXPOP1);)
-
-	Pjlw++;		// Now point to Index area
-
-// If Leaf is in 1 expanse -- first compress it (compare 1st, last & Index):
-
-	CIndex = Pjlw[0];	// also used far below
-	if (!JU_DIGITATSTATE(CIndex ^ Pjlw[cJU_LEAFW_MAXPOP1 - 1],
-			     cJU_ROOTSTATE))
-	{
-		Pjll_t PjllRaw;		// pointer to new leaf.
-		Pjll_t Pjll;
-      JUDYLCODE(Pjv_t  Pjvnew;)		// value area of new leaf.
-
-//		Get the common expanse to all elements in Leaf
-		StageExp[0] = JU_DIGITATSTATE(CIndex, cJU_ROOTSTATE);
-
-//		Alloc a 3[7] byte Index Leaf
-#ifdef JU_64BIT
-		PjllRaw	= j__udyAllocJLL7(cJU_LEAFW_MAXPOP1, Pjpm);
-		if (PjllRaw == (Pjlb_t)NULL) return(-1);  // out of memory
-
-		Pjll = P_JLL(PjllRaw);
-
-//		Copy LEAFW to a cJU_JPLEAF7
-		j__udyCopyWto7((uint8_t *) Pjll, Pjlw, cJU_LEAFW_MAXPOP1);
-#ifdef JUDYL
-//		Get the Value area of new Leaf
-		Pjvnew = JL_LEAF7VALUEAREA(Pjll, cJU_LEAFW_MAXPOP1);
-		JU_COPYMEM(Pjvnew, Pjv, cJU_LEAFW_MAXPOP1);
-#endif
-		DBGCODE(JudyCheckSorted(Pjll, cJU_LEAFW_MAXPOP1, 7);)
-#else // 32 Bit
-		PjllRaw	= j__udyAllocJLL3(cJU_LEAFW_MAXPOP1, Pjpm);
-		if (PjllRaw == (Pjll_t) NULL) return(-1);
-
-		Pjll = P_JLL(PjllRaw);
-
-//		Copy LEAFW to a cJU_JPLEAF3
-		j__udyCopyWto3((uint8_t *) Pjll, Pjlw, cJU_LEAFW_MAXPOP1);
-#ifdef JUDYL
-//		Get the Value area of new Leaf
-		Pjvnew = JL_LEAF3VALUEAREA(Pjll, cJU_LEAFW_MAXPOP1);
-		JU_COPYMEM(Pjvnew, Pjv, cJU_LEAFW_MAXPOP1);
-#endif
-		DBGCODE(JudyCheckSorted(Pjll, cJU_LEAFW_MAXPOP1, 3);)
-#endif  // 32 Bit
-
-//		Following not needed because cJU_DCDMASK(3[7]) is == 0
-//////		StageJP[0].jp_DcdPopO	|= (CIndex & cJU_DCDMASK(3[7]));
-#ifdef JU_64BIT
-                JU_JPSETADT(&(StageJP[0]), (Word_t)PjllRaw, cJU_LEAFW_MAXPOP1-1,
-                                cJU_JPLEAF7);
-#else   // 32BIT
-                JU_JPSETADT(&(StageJP[0]), (Word_t)PjllRaw, cJU_LEAFW_MAXPOP1-1,
-                                cJU_JPLEAF3);
-#endif  // 32BIT
-//		Create a 1 element Linear branch
-		if (j__udyCreateBranchL(Pjp, StageJP, StageExp, 1, Pjpm) == -1)
-		    return(-1);
-
-//		Change the type of callers JP
-		Pjp->jp_Type = cJU_JPBRANCH_L;
-
-		return(1);
-	}
-
-//  Else in 2+ expanses, splay Leaf into smaller leaves at higher compression
-
-	StageJBB = StageJBBZero;       // zero staged bitmap branch
-	ZEROJP(SubJPCount);
-
-//	Splay the 4[8] byte Index Leaf to 3[7] byte Index Leaves
-	for (ExpCnt = Start = 0, End = 1; ; End++)
-	{
-//		Check if new expanse or last one
-		if (	(End == cJU_LEAFW_MAXPOP1)
-				||
-			(JU_DIGITATSTATE(CIndex ^ Pjlw[End], cJU_ROOTSTATE))
-		   )
-		{
-//			Build a leaf below the previous expanse
-
-			Pjp_t  PjpJP	= StageJP + ExpCnt;
-			Word_t Pop1	= End - Start;
-			Word_t expanse = JU_DIGITATSTATE(CIndex, cJU_ROOTSTATE);
-			Word_t subexp  = expanse / cJU_BITSPERSUBEXPB;
-//
-//                      set the bit that is the current expanse
-			JU_JBB_BITMAP(&StageJBB, subexp) |= JU_BITPOSMASKB(expanse);
-#ifdef SUBEXPCOUNTS
-			StageJBB.jbb_subPop1[subexp] += Pop1; // pop of subexpanse
-#endif
-//                      count number of expanses in each subexpanse
-			SubJPCount[subexp]++;
-
-//			Save byte expanse of leaf
-			StageExp[ExpCnt] = JU_DIGITATSTATE(CIndex,
-							   cJU_ROOTSTATE);
-
-			if (Pop1 == 1)	// cJU_JPIMMED_3[7]_01
-			{
-#ifdef  JU_64BIT
-#ifdef JUDY1
-                            JU_JPSETADT(PjpJP, 0, CIndex, cJ1_JPIMMED_7_01);
-#else   // JUDYL
-                            JU_JPSETADT(PjpJP, Pjv[Start], CIndex,
-                                cJL_JPIMMED_7_01);
-#endif  // JUDYL
-
-#else   // JU_32BIT
-#ifdef JUDY1
-                            JU_JPSETADT(PjpJP, 0, CIndex, cJ1_JPIMMED_3_01);
-#else   // JUDYL
-                            JU_JPSETADT(PjpJP, Pjv[Start], CIndex,
-                                cJL_JPIMMED_3_01);
-#endif  // JUDYL
-#endif  // JU_32BIT
-			}
-#ifdef JUDY1
-#ifdef  JU_64BIT
-			else if (Pop1 <= cJ1_IMMED7_MAXPOP1)
-#else
-			else if (Pop1 <= cJ1_IMMED3_MAXPOP1)
-#endif
-			{
-//		cJ1_JPIMMED_3_02   :  Judy1 32
-//		cJ1_JPIMMED_7_02   :  Judy1 64
-//                              Copy to JP as an immediate Leaf
-#ifdef  JU_64BIT
-				j__udyCopyWto7(PjpJP->jp_1Index, Pjlw+Start, 2);
-				PjpJP->jp_Type = cJ1_JPIMMED_7_02;
-#else
-				j__udyCopyWto3(PjpJP->jp_1Index, Pjlw+Start, 2);
-				PjpJP->jp_Type = cJ1_JPIMMED_3_02;
-#endif // 32 Bit
-			}
-#endif // JUDY1
-			else // Linear Leaf JPLEAF3[7]
-			{
-//		cJU_JPLEAF3[7]
-				Pjll_t PjllRaw;	 // pointer to new leaf.
-				Pjll_t Pjll;
-		      JUDYLCODE(Pjv_t  Pjvnew;)	 // value area of new leaf.
-#ifdef JU_64BIT
-				PjllRaw = j__udyAllocJLL7(Pop1, Pjpm);
-				if (PjllRaw == (Pjll_t) NULL) return(-1);
-				Pjll = P_JLL(PjllRaw);
-
-				j__udyCopyWto7((uint8_t *) Pjll, Pjlw + Start,
-					       Pop1);
-#ifdef JUDYL
-				Pjvnew = JL_LEAF7VALUEAREA(Pjll, Pop1);
-				JU_COPYMEM(Pjvnew, Pjv + Start, Pop1);
-#endif // JUDYL
-				DBGCODE(JudyCheckSorted(Pjll, Pop1, 7);)
-#else // JU_64BIT - 32 Bit
-				PjllRaw = j__udyAllocJLL3(Pop1, Pjpm);
-				if (PjllRaw == (Pjll_t) NULL) return(-1);
-				Pjll = P_JLL(PjllRaw);
-
-				j__udyCopyWto3((uint8_t *) Pjll, Pjlw + Start,
-					       Pop1);
-#ifdef JUDYL
-				Pjvnew = JL_LEAF3VALUEAREA(Pjll, Pop1);
-				JU_COPYMEM(Pjvnew, Pjv + Start, Pop1);
-#endif // JUDYL
-				DBGCODE(JudyCheckSorted(Pjll, Pop1, 3);)
-#endif // 32 Bit
-
-#ifdef JU_64BIT
-                                JU_JPSETADT(PjpJP, (Word_t)PjllRaw, Pop1 - 1,
-                                        cJU_JPLEAF7);
-#else // JU_64BIT - 32 Bit
-                                JU_JPSETADT(PjpJP, (Word_t)PjllRaw, Pop1 - 1,
-                                        cJU_JPLEAF3);
-#endif // 32 Bit
-			}
-			ExpCnt++;
-//                      Done?
-			if (End == cJU_LEAFW_MAXPOP1) break;
-
-//			New Expanse, Start and Count
-			CIndex = Pjlw[End];
-			Start  = End;
-		}
-	}
-
-// Now put all the Leaves below a BranchL or BranchB:
-	if (ExpCnt <= cJU_BRANCHLMAXJPS) // put the Leaves below a BranchL
-	{
-	    if (j__udyCreateBranchL(Pjp, StageJP, StageExp, ExpCnt,
-			Pjpm) == -1) FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-	    Pjp->jp_Type = cJU_JPBRANCH_L;
-	}
-	else
-	{
-	    if (j__udyStageJBBtoJBB(Pjp, &StageJBB, StageJP, SubJPCount, Pjpm)
-		== -1) FREEALLEXIT(ExpCnt, StageJP, Pjpm);
-
-	    Pjp->jp_Type = cJU_JPBRANCH_B;  // cJU_LEAFW is out of sequence
-	}
-	return(1);
-
-} // j__udyCascadeL()
diff --git a/libs/klib/judy/JudyCount.c b/libs/klib/judy/JudyCount.c
deleted file mode 100644
index a8a6eb1..0000000
--- a/libs/klib/judy/JudyCount.c
+++ /dev/null
@@ -1,1193 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// Judy*Count() function for Judy1 and JudyL.
-// Compile with one of -DJUDY1 or -DJUDYL.
-//
-// Compile with -DNOSMARTJBB, -DNOSMARTJBU, and/or -DNOSMARTJLB to build a
-// version with cache line optimizations deleted, for testing.
-//
-// Compile with -DSMARTMETRICS to obtain global variables containing smart
-// cache line metrics.  Note:  Dont turn this on simultaneously for this file
-// and JudyByCount.c because they export the same globals.
-//
-// Judy*Count() returns the "count of Indexes" (inclusive) between the two
-// specified limits (Indexes).  This code is remarkably fast.  It traverses the
-// "Judy array" data structure.
-//
-// This count code is the GENERIC untuned version (minimum code size).  It
-// might be possible to tuned to a specific architecture to be faster.
-// However, in real applications, with a modern machine, it is expected that
-// the instruction times will be swamped by cache line fills.
-// ****************************************************************************
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-
-// define a phoney that is for sure
-
-#define cJU_LEAFW       cJU_JPIMMED_CAP
-
-// Avoid duplicate symbols since this file is multi-compiled:
-
-#ifdef SMARTMETRICS
-#ifdef JUDY1
-Word_t jbb_upward   = 0;	// counts of directions taken:
-Word_t jbb_downward = 0;
-Word_t jbu_upward   = 0;
-Word_t jbu_downward = 0;
-Word_t jlb_upward   = 0;
-Word_t jlb_downward = 0;
-#else
-extern Word_t jbb_upward;
-extern Word_t jbb_downward;
-extern Word_t jbu_upward;
-extern Word_t jbu_downward;
-extern Word_t jlb_upward;
-extern Word_t jlb_downward;
-#endif
-#endif
-
-
-// FORWARD DECLARATIONS (prototypes):
-
-static	Word_t j__udy1LCountSM(const Pjp_t Pjp, const Word_t Index,
-			       const Pjpm_t Pjpm);
-
-// Each of Judy1 and JudyL get their own private (static) version of this
-// function:
-
-static	int j__udyCountLeafB1(const Pjll_t Pjll, const Word_t Pop1,
-			      const Word_t Index);
-
-// These functions are not static because they are exported to Judy*ByCount():
-//
-// TBD:  Should be made static for performance reasons?  And thus duplicated?
-//
-// Note:  There really are two different functions, but for convenience they
-// are referred to here with a generic name.
-
-#ifdef JUDY1
-#define	j__udyJPPop1 j__udy1JPPop1
-#else
-#define	j__udyJPPop1 j__udyLJPPop1
-#endif
-
-Word_t j__udyJPPop1(const Pjp_t Pjp);
-
-
-// LOCAL ERROR HANDLING:
-//
-// The Judy*Count() functions are unusual because they return 0 instead of JERR
-// for an error.  In this source file, define C_JERR for clarity.
-
-#define	C_JERR 0
-
-
-// ****************************************************************************
-// J U D Y   1   C O U N T
-// J U D Y   L   C O U N T
-//
-// See the manual entry for details.
-//
-// This code is written recursively, at least at first, because thats much
-// simpler; hope its fast enough.
-
-#ifdef JUDY1
-FUNCTION Word_t Judy1Count
-#else
-FUNCTION Word_t JudyLCount
-#endif
-        (
-	Pcvoid_t  PArray,	// JRP to first branch/leaf in SM.
-	Word_t	  Index1,	// starting Index.
-	Word_t	  Index2,	// ending Index.
-	PJError_t PJError	// optional, for returning error info.
-        )
-{
-	jpm_t	  fakejpm;	// local temporary for small arrays.
-	Pjpm_t	  Pjpm;		// top JPM or local temporary for error info.
-	jp_t	  fakejp;	// constructed for calling j__udy1LCountSM().
-	Pjp_t	  Pjp;		// JP to pass to j__udy1LCountSM().
-	Word_t	  pop1;		// total for the array.
-	Word_t	  pop1above1;	// indexes at or above Index1, inclusive.
-	Word_t	  pop1above2;	// indexes at or above Index2, exclusive.
-	int	  retcode;	// from Judy*First() calls.
-JUDYLCODE(PPvoid_t PPvalue);	// from JudyLFirst() calls.
-
-
-// CHECK FOR SHORTCUTS:
-//
-// As documented, return C_JERR if the Judy array is empty or Index1 > Index2.
-
-	if ((PArray == (Pvoid_t) NULL) || (Index1 > Index2))
-	{
-	    JU_SET_ERRNO(PJError, JU_ERRNO_NONE);
-	    return(C_JERR);
-	}
-
-// If Index1 == Index2, simply check if the specified Index is set; pass
-// through the return value from Judy1Test() or JudyLGet() with appropriate
-// translations.
-
-	if (Index1 == Index2)
-	{
-#ifdef JUDY1
-	    retcode = Judy1Test(PArray, Index1, PJError);
-
-	    if (retcode == JERRI) return(C_JERR);	// pass through error.
-
-	    if (retcode == 0)
-	    {
-		JU_SET_ERRNO(PJError, JU_ERRNO_NONE);
-		return(C_JERR);
-	    }
-#else
-	    PPvalue = JudyLGet(PArray, Index1, PJError);
-
-	    if (PPvalue == PPJERR) return(C_JERR);	// pass through error.
-
-	    if (PPvalue == (PPvoid_t) NULL)		// Index is not set.
-	    {
-		JU_SET_ERRNO(PJError, JU_ERRNO_NONE);
-		return(C_JERR);
-	    }
-#endif
-	    return(1);					// single index is set.
-	}
-
-
-// CHECK JRP TYPE:
-//
-// Use an if/then for speed rather than a switch, and put the most common cases
-// first.
-//
-// Note:  Since even cJU_LEAFW types require counting between two Indexes,
-// prepare them here for common code below that calls j__udy1LCountSM(), rather
-// than handling them even more specially here.
-
-	if (JU_LEAFW_POP0(PArray) < cJU_LEAFW_MAXPOP1) // must be a LEAFW
-	{
-	    Pjlw_t Pjlw	   = P_JLW(PArray);	// first word of leaf.
-	    Pjpm	   = & fakejpm;
-	    Pjp		   = & fakejp;
-	    Pjp->jp_Addr   = (Word_t) Pjlw;
-	    Pjp->jp_Type   = cJU_LEAFW;
-	    Pjpm->jpm_Pop0 = Pjlw[0];		// from first word of leaf.
-	    pop1	   = Pjpm->jpm_Pop0 + 1;
-	}
-	else
-	{
-	    Pjpm = P_JPM(PArray);
-	    Pjp	 = &(Pjpm->jpm_JP);
-	    pop1 = (Pjpm->jpm_Pop0) + 1;	// note: can roll over to 0.
-
-#if (defined(JUDY1) && (! defined(JU_64BIT)))
-	    if (pop1 == 0)		// rare special case of full array:
-	    {
-		Word_t count = Index2 - Index1 + 1;	// can roll over again.
-
-		if (count == 0)
-		{
-		    JU_SET_ERRNO(PJError, JU_ERRNO_FULL);
-		    return(C_JERR);
-		}
-		return(count);
-	    }
-#else
-	    assert(pop1);	// JudyL or 64-bit cannot create a full array!
-#endif
-	}
-
-
-// COUNT POP1 ABOVE INDEX1, INCLUSIVE:
-
-	assert(pop1);		// just to be safe.
-
-	if (Index1 == 0)	// shortcut, pop1above1 is entire population:
-	{
-	    pop1above1 = pop1;
-	}
-	else			// find first valid Index above Index1, if any:
-	{
-#ifdef JUDY1
-	    if ((retcode = Judy1First(PArray, & Index1, PJError)) == JERRI)
-		return(C_JERR);			// pass through error.
-#else
-	    if ((PPvalue = JudyLFirst(PArray, & Index1, PJError)) == PPJERR)
-		return(C_JERR);			// pass through error.
-
-	    retcode = (PPvalue != (PPvoid_t) NULL);	// found a next Index.
-#endif
-
-// If theres no Index at or above Index1, just return C_JERR (early exit):
-
-	    if (retcode == 0)
-	    {
-		JU_SET_ERRNO(PJError, JU_ERRNO_NONE);
-		return(C_JERR);
-	    }
-
-// If a first/next Index was found, call the counting motor starting with that
-// known valid Index, meaning the return should be positive, not C_JERR except
-// in case of a real error:
-
-	    if ((pop1above1 = j__udy1LCountSM(Pjp, Index1, Pjpm)) == C_JERR)
-	    {
-		JU_COPY_ERRNO(PJError, Pjpm);	// pass through error.
-		return(C_JERR);
-	    }
-	}
-
-
-// COUNT POP1 ABOVE INDEX2, EXCLUSIVE, AND RETURN THE DIFFERENCE:
-//
-// In principle, calculate the ordinal of each Index and take the difference,
-// with caution about off-by-one errors due to the specified Indexes being set
-// or unset.  In practice:
-//
-// - The ordinals computed here are inverse ordinals, that is, the populations
-//   ABOVE the specified Indexes (Index1 inclusive, Index2 exclusive), so
-//   subtract pop1above2 from pop1above1, rather than vice-versa.
-//
-// - Index1s result already includes a count for Index1 and/or Index2 if
-//   either is set, so calculate pop1above2 exclusive of Index2.
-//
-// TBD:  If Index1 and Index2 fall in the same expanse in the top-state
-// branch(es), would it be faster to walk the SM only once, to their divergence
-// point, before calling j__udy1LCountSM() or equivalent?  Possibly a non-issue
-// if a top-state pop1 becomes stored with each Judy1 array.  Also, consider
-// whether the first call of j__udy1LCountSM() fills the cache, for common tree
-// branches, for the second call.
-//
-// As for pop1above1, look for shortcuts for special cases when pop1above2 is
-// zero.  Otherwise call the counting "motor".
-
-	    assert(pop1above1);		// just to be safe.
-
-	    if (Index2++ == cJU_ALLONES) return(pop1above1); // Index2 at limit.
-
-#ifdef JUDY1
-	    if ((retcode = Judy1First(PArray, & Index2, PJError)) == JERRI)
-		return(C_JERR);
-#else
-	    if ((PPvalue = JudyLFirst(PArray, & Index2, PJError)) == PPJERR)
-		return(C_JERR);
-
-	    retcode = (PPvalue != (PPvoid_t) NULL);	// found a next Index.
-#endif
-	    if (retcode == 0) return(pop1above1);  // no Index above Index2.
-
-// Just as for Index1, j__udy1LCountSM() cannot return 0 (locally == C_JERR)
-// except in case of a real error:
-
-	    if ((pop1above2 = j__udy1LCountSM(Pjp, Index2, Pjpm)) == C_JERR)
-	    {
-		JU_COPY_ERRNO(PJError, Pjpm);		// pass through error.
-		return(C_JERR);
-	    }
-
-	    if (pop1above1 == pop1above2)
-	    {
-		JU_SET_ERRNO(PJError, JU_ERRNO_NONE);
-		return(C_JERR);
-	    }
-
-	    return(pop1above1 - pop1above2);
-
-} // Judy1Count() / JudyLCount()
-
-
-// ****************************************************************************
-// __ J U D Y 1 L   C O U N T   S M
-//
-// Given a pointer to a JP (with invalid jp_DcdPopO at cJU_ROOTSTATE), a known
-// valid Index, and a Pjpm for returning error info, recursively visit a Judy
-// array state machine (SM) and return the count of Indexes, including Index,
-// through the end of the Judy array at this state or below.  In case of error
-// or a count of 0 (should never happen), return C_JERR with appropriate
-// JU_ERRNO in the Pjpm.
-//
-// Note:  This function is not told the current state because its encoded in
-// the JP Type.
-//
-// Method:  To minimize cache line fills, while studying each branch, if Index
-// resides above the midpoint of the branch (which often consists of multiple
-// cache lines), ADD the populations at or above Index; otherwise, SUBTRACT
-// from the population of the WHOLE branch (available from the JP) the
-// populations at or above Index.  This is especially tricky for bitmap
-// branches.
-//
-// Note:  Unlike, say, the Ins and Del walk routines, this function returns the
-// same type of returns as Judy*Count(), so it can use *_SET_ERRNO*() macros
-// the same way.
-
-FUNCTION static Word_t j__udy1LCountSM(
-const	Pjp_t	Pjp,		// top of Judy (sub)SM.
-const	Word_t	Index,		// count at or above this Index.
-const	Pjpm_t	Pjpm)		// for returning error info.
-{
-	Pjbl_t	Pjbl;		// Pjp->jp_Addr masked and cast to types:
-	Pjbb_t	Pjbb;
-	Pjbu_t	Pjbu;
-	Pjll_t	Pjll;		// a Judy lower-level linear leaf.
-
-	Word_t	digit;		// next digit to decode from Index.
-	long	jpnum;		// JP number in a branch (base 0).
-	int	offset;		// index ordinal within a leaf, base 0.
-	Word_t	pop1;		// total population of an expanse.
-	Word_t	pop1above;	// to return.
-
-// Common code to check Decode bits in a JP against the equivalent portion of
-// Index; XOR together, then mask bits of interest; must be all 0:
-//
-// Note:  Why does this code only assert() compliance rather than actively
-// checking for outliers?  Its because Index is supposed to be valid, hence
-// always match any Dcd bits traversed.
-//
-// Note:  This assertion turns out to be always true for cState = 3 on 32-bit
-// and 7 on 64-bit, but its harmless, probably removed by the compiler.
-
-#define	CHECKDCD(Pjp,cState) \
-	assert(! JU_DCDNOTMATCHINDEX(Index, Pjp, cState))
-
-// Common code to prepare to handle a root-level or lower-level branch:
-// Extract a state-dependent digit from Index in a "constant" way, obtain the
-// total population for the branch in a state-dependent way, and then branch to
-// common code for multiple cases:
-//
-// For root-level branches, the state is always cJU_ROOTSTATE, and the
-// population is received in Pjpm->jpm_Pop0.
-//
-// Note:  The total population is only needed in cases where the common code
-// "counts up" instead of down to minimize cache line fills.  However, its
-// available cheaply, and its better to do it with a constant shift (constant
-// state value) instead of a variable shift later "when needed".
-
-#define	PREPB_ROOT(Pjp,Next)				\
-	digit = JU_DIGITATSTATE(Index, cJU_ROOTSTATE);	\
-	pop1  = (Pjpm->jpm_Pop0) + 1;			\
-	goto Next
-
-#define	PREPB(Pjp,cState,Next)				\
-	digit = JU_DIGITATSTATE(Index, cState);		\
-	pop1  = JU_JPBRANCH_POP0(Pjp, (cState)) + 1;    \
-	goto Next
-
-
-// SWITCH ON JP TYPE:
-//
-// WARNING:  For run-time efficiency the following cases replicate code with
-// varying constants, rather than using common code with variable values!
-
-	switch (JU_JPTYPE(Pjp))
-	{
-
-
-// ----------------------------------------------------------------------------
-// ROOT-STATE LEAF that starts with a Pop0 word; just count within the leaf:
-
-	case cJU_LEAFW:
-	{
-	    Pjlw_t Pjlw = P_JLW(Pjp->jp_Addr);		// first word of leaf.
-
-	    assert((Pjpm->jpm_Pop0) + 1 == Pjlw[0] + 1);  // sent correctly.
-	    offset = j__udySearchLeafW(Pjlw + 1, Pjpm->jpm_Pop0 + 1, Index);
-	    assert(offset >= 0);			// Index must exist.
-	    assert(offset < (Pjpm->jpm_Pop0) + 1);	// Index be in range.
-	    return((Pjpm->jpm_Pop0) + 1 - offset);	// INCLUSIVE of Index.
-	}
-
-// ----------------------------------------------------------------------------
-// LINEAR BRANCH; count populations in JPs in the JBL ABOVE the next digit in
-// Index, and recurse for the next digit in Index:
-//
-// Note:  There are no null JPs in a JBL; watch out for pop1 == 0.
-//
-// Note:  A JBL should always fit in one cache line => no need to count up
-// versus down to save cache line fills.  (PREPB() sets pop1 for no reason.)
-
-	case cJU_JPBRANCH_L2:  CHECKDCD(Pjp, 2); PREPB(Pjp, 2, BranchL);
-	case cJU_JPBRANCH_L3:  CHECKDCD(Pjp, 3); PREPB(Pjp, 3, BranchL);
-
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_L4:  CHECKDCD(Pjp, 4); PREPB(Pjp, 4, BranchL);
-	case cJU_JPBRANCH_L5:  CHECKDCD(Pjp, 5); PREPB(Pjp, 5, BranchL);
-	case cJU_JPBRANCH_L6:  CHECKDCD(Pjp, 6); PREPB(Pjp, 6, BranchL);
-	case cJU_JPBRANCH_L7:  CHECKDCD(Pjp, 7); PREPB(Pjp, 7, BranchL);
-#endif
-	case cJU_JPBRANCH_L:   PREPB_ROOT(Pjp, BranchL);
-
-// Common code (state-independent) for all cases of linear branches:
-
-BranchL:
-
-	Pjbl      = P_JBL(Pjp->jp_Addr);
-	jpnum     = Pjbl->jbl_NumJPs;			// above last JP.
-	pop1above = 0;
-
-	while (digit < (Pjbl->jbl_Expanse[--jpnum]))	 // still ABOVE digit.
-	{
-	    if ((pop1 = j__udyJPPop1((Pjbl->jbl_jp) + jpnum)) == cJU_ALLONES)
-	    {
-		JU_SET_ERRNO_NONNULL(Pjpm, JU_ERRNO_CORRUPT);
-		return(C_JERR);
-	    }
-
-	    pop1above += pop1;
-	    assert(jpnum > 0);				// should find digit.
-	}
-
-	assert(digit == (Pjbl->jbl_Expanse[jpnum]));	// should find digit.
-
-	pop1 = j__udy1LCountSM((Pjbl->jbl_jp) + jpnum, Index, Pjpm);
-	if (pop1 == C_JERR) return(C_JERR);		// pass error up.
-
-	assert(pop1above + pop1);
-	return(pop1above + pop1);
-
-
-// ----------------------------------------------------------------------------
-// BITMAP BRANCH; count populations in JPs in the JBB ABOVE the next digit in
-// Index, and recurse for the next digit in Index:
-//
-// Note:  There are no null JPs in a JBB; watch out for pop1 == 0.
-
-	case cJU_JPBRANCH_B2:  CHECKDCD(Pjp, 2); PREPB(Pjp, 2, BranchB);
-	case cJU_JPBRANCH_B3:  CHECKDCD(Pjp, 3); PREPB(Pjp, 3, BranchB);
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_B4:  CHECKDCD(Pjp, 4); PREPB(Pjp, 4, BranchB);
-	case cJU_JPBRANCH_B5:  CHECKDCD(Pjp, 5); PREPB(Pjp, 5, BranchB);
-	case cJU_JPBRANCH_B6:  CHECKDCD(Pjp, 6); PREPB(Pjp, 6, BranchB);
-	case cJU_JPBRANCH_B7:  CHECKDCD(Pjp, 7); PREPB(Pjp, 7, BranchB);
-#endif
-	case cJU_JPBRANCH_B:   PREPB_ROOT(Pjp, BranchB);
-
-// Common code (state-independent) for all cases of bitmap branches:
-
-BranchB:
-	{
-	    long   subexp;	// for stepping through layer 1 (subexpanses).
-	    long   findsub;	// subexpanse containing   Index (digit).
-	    Word_t findbit;	// bit	      representing Index (digit).
-	    Word_t lowermask;	// bits for indexes at or below Index.
-	    Word_t jpcount;	// JPs in a subexpanse.
-	    Word_t clbelow;	// cache lines below digits cache line.
-	    Word_t clabove;	// cache lines above digits cache line.
-
-	    Pjbb      = P_JBB(Pjp->jp_Addr);
-	    findsub   = digit / cJU_BITSPERSUBEXPB;
-	    findbit   = digit % cJU_BITSPERSUBEXPB;
-	    lowermask = JU_MASKLOWERINC(JU_BITPOSMASKB(findbit));
-	    clbelow   = clabove = 0;	// initial/default => always downward.
-
-	    assert(JU_BITMAPTESTB(Pjbb, digit)); // digit must have a JP.
-	    assert(findsub < cJU_NUMSUBEXPB);	 // falls in expected range.
-
-// Shorthand for one subexpanse in a bitmap and for one JP in a bitmap branch:
-//
-// Note: BMPJP0 exists separately to support assertions.
-
-#define	BMPJP0(Subexp)       (P_JP(JU_JBB_PJP(Pjbb, Subexp)))
-#define	BMPJP(Subexp,JPnum)  (BMPJP0(Subexp) + (JPnum))
-
-#ifndef NOSMARTJBB  // enable to turn off smart code for comparison purposes.
-
-// FIGURE OUT WHICH DIRECTION CAUSES FEWER CACHE LINE FILLS; adding the pop1s
-// in JPs above Indexs JP, or subtracting the pop1s in JPs below Indexs JP.
-//
-// This is tricky because, while each set bit in the bitmap represents a JP,
-// the JPs are scattered over cJU_NUMSUBEXPB subexpanses, each of which can
-// contain JPs packed into multiple cache lines, and this code must visit every
-// JP either BELOW or ABOVE the JP for Index.
-//
-// Number of cache lines required to hold a linear list of the given number of
-// JPs, assuming the first JP is at the start of a cache line or the JPs in
-// jpcount fit wholly within a single cache line, which is ensured by
-// JudyMalloc():
-
-#define	CLPERJPS(jpcount) \
-	((((jpcount) * cJU_WORDSPERJP) + cJU_WORDSPERCL - 1) / cJU_WORDSPERCL)
-
-// Count cache lines below/above for each subexpanse:
-
-	    for (subexp = 0; subexp < cJU_NUMSUBEXPB; ++subexp)
-	    {
-		jpcount = j__udyCountBitsB(JU_JBB_BITMAP(Pjbb, subexp));
-
-// When at the subexpanse containing Index (digit), add cache lines
-// below/above appropriately, excluding the cache line containing the JP for
-// Index itself:
-
-		if	(subexp <  findsub)  clbelow += CLPERJPS(jpcount);
-		else if (subexp >  findsub)  clabove += CLPERJPS(jpcount);
-		else // (subexp == findsub)
-		{
-		    Word_t clfind;	// cache line containing Index (digit).
-
-		    clfind = CLPERJPS(j__udyCountBitsB(
-				    JU_JBB_BITMAP(Pjbb, subexp) & lowermask));
-
-		    assert(clfind > 0);	 // digit itself should have 1 CL.
-		    clbelow += clfind - 1;
-		    clabove += CLPERJPS(jpcount) - clfind;
-		}
-	    }
-#endif // ! NOSMARTJBB
-
-// Note:  Its impossible to get through the following "if" without setting
-// jpnum -- see some of the assertions below -- but gcc -Wall doesnt know
-// this, so preset jpnum to make it happy:
-
-	    jpnum = 0;
-
-
-// COUNT POPULATION FOR A BITMAP BRANCH, in whichever direction should result
-// in fewer cache line fills:
-//
-// Note:  If the remainder of Index is zero, pop1above is the pop1 of the
-// entire expanse and theres no point in recursing to lower levels; but this
-// should be so rare that its not worth checking for;
-// Judy1Count()/JudyLCount() never even calls the motor for Index == 0 (all
-// bytes).
-
-
-// COUNT UPWARD, subtracting each "below or at" JPs pop1 from the whole
-// expanses pop1:
-//
-// Note:  If this causes clbelow + 1 cache line fills including JPs cache
-// line, thats OK; at worst this is the same as clabove.
-
-	    if (clbelow < clabove)
-	    {
-#ifdef SMARTMETRICS
-		++jbb_upward;
-#endif
-		pop1above = pop1;		// subtract JPs at/below Index.
-
-// Count JPs for which to accrue pop1s in this subexpanse:
-//
-// TBD:  If JU_JBB_BITMAP is cJU_FULLBITMAPB, dont bother counting.
-
-		for (subexp = 0; subexp <= findsub; ++subexp)
-		{
-		    jpcount = j__udyCountBitsB((subexp < findsub) ?
-				      JU_JBB_BITMAP(Pjbb, subexp) :
-				      JU_JBB_BITMAP(Pjbb, subexp) & lowermask);
-
-		    // should always find findbit:
-		    assert((subexp < findsub) || jpcount);
-
-// Subtract pop1s from JPs BELOW OR AT Index (digit):
-//
-// Note:  The pop1 for Indexs JP itself is partially added back later at a
-// lower state.
-//
-// Note:  An empty subexpanse (jpcount == 0) is handled "for free".
-//
-// Note:  Must be null JP subexp pointer in empty subexpanse and non-empty in
-// non-empty subexpanse:
-
-		    assert(   jpcount  || (BMPJP0(subexp) == (Pjp_t) NULL));
-		    assert((! jpcount) || (BMPJP0(subexp) != (Pjp_t) NULL));
-
-		    for (jpnum = 0; jpnum < jpcount; ++jpnum)
-		    {
-			if ((pop1 = j__udyJPPop1(BMPJP(subexp, jpnum)))
-			    == cJU_ALLONES)
-			{
-			    JU_SET_ERRNO_NONNULL(Pjpm, JU_ERRNO_CORRUPT);
-			    return(C_JERR);
-			}
-
-			pop1above -= pop1;
-		    }
-
-		    jpnum = jpcount - 1;	// make correct for digit.
-		}
-	    }
-
-// COUNT DOWNWARD, adding each "above" JPs pop1:
-
-	    else
-	    {
-		long jpcountbf;			// below findbit, inclusive.
-#ifdef SMARTMETRICS
-		++jbb_downward;
-#endif
-		pop1above = 0;			// add JPs above Index.
-		jpcountbf = 0;			// until subexp == findsub.
-
-// Count JPs for which to accrue pop1s in this subexpanse:
-//
-// This is more complicated than counting upward because the scan of digits
-// subexpanse must count ALL JPs, to know where to START counting down, and
-// ALSO note the offset of digits JP to know where to STOP counting down.
-
-		for (subexp = cJU_NUMSUBEXPB - 1; subexp >= findsub; --subexp)
-		{
-		    jpcount = j__udyCountBitsB(JU_JBB_BITMAP(Pjbb, subexp));
-
-		    // should always find findbit:
-		    assert((subexp > findsub) || jpcount);
-
-		    if (! jpcount) continue;	// empty subexpanse, save time.
-
-// Count JPs below digit, inclusive:
-
-		    if (subexp == findsub)
-		    {
-			jpcountbf = j__udyCountBitsB(JU_JBB_BITMAP(Pjbb, subexp)
-						  & lowermask);
-		    }
-
-		    // should always find findbit:
-		    assert((subexp > findsub) || jpcountbf);
-		    assert(jpcount >= jpcountbf);	// proper relationship.
-
-// Add pop1s from JPs ABOVE Index (digit):
-
-		    // no null JP subexp pointers:
-		    assert(BMPJP0(subexp) != (Pjp_t) NULL);
-
-		    for (jpnum = jpcount - 1; jpnum >= jpcountbf; --jpnum)
-		    {
-			if ((pop1 = j__udyJPPop1(BMPJP(subexp, jpnum)))
-			    == cJU_ALLONES)
-			{
-			    JU_SET_ERRNO_NONNULL(Pjpm, JU_ERRNO_CORRUPT);
-			    return(C_JERR);
-			}
-
-			pop1above += pop1;
-		    }
-		    // jpnum is now correct for digit.
-		}
-	    } // else.
-
-// Return the net population ABOVE the digits JP at this state (in this JBB)
-// plus the population AT OR ABOVE Index in the SM under the digits JP:
-
-	    pop1 = j__udy1LCountSM(BMPJP(findsub, jpnum), Index, Pjpm);
-	    if (pop1 == C_JERR) return(C_JERR);		// pass error up.
-
-	    assert(pop1above + pop1);
-	    return(pop1above + pop1);
-
-	} // case.
-
-
-// ----------------------------------------------------------------------------
-// UNCOMPRESSED BRANCH; count populations in JPs in the JBU ABOVE the next
-// digit in Index, and recurse for the next digit in Index:
-//
-// Note:  If the remainder of Index is zero, pop1above is the pop1 of the
-// entire expanse and theres no point in recursing to lower levels; but this
-// should be so rare that its not worth checking for;
-// Judy1Count()/JudyLCount() never even calls the motor for Index == 0 (all
-// bytes).
-
-	case cJU_JPBRANCH_U2:  CHECKDCD(Pjp, 2); PREPB(Pjp, 2, BranchU);
-	case cJU_JPBRANCH_U3:  CHECKDCD(Pjp, 3); PREPB(Pjp, 3, BranchU);
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_U4:  CHECKDCD(Pjp, 4); PREPB(Pjp, 4, BranchU);
-	case cJU_JPBRANCH_U5:  CHECKDCD(Pjp, 5); PREPB(Pjp, 5, BranchU);
-	case cJU_JPBRANCH_U6:  CHECKDCD(Pjp, 6); PREPB(Pjp, 6, BranchU);
-	case cJU_JPBRANCH_U7:  CHECKDCD(Pjp, 7); PREPB(Pjp, 7, BranchU);
-#endif
-	case cJU_JPBRANCH_U:   PREPB_ROOT(Pjp, BranchU);
-
-// Common code (state-independent) for all cases of uncompressed branches:
-
-BranchU:
-	    Pjbu = P_JBU(Pjp->jp_Addr);
-
-#ifndef NOSMARTJBU  // enable to turn off smart code for comparison purposes.
-
-// FIGURE OUT WHICH WAY CAUSES FEWER CACHE LINE FILLS; adding the JPs above
-// Indexs JP, or subtracting the JPs below Indexs JP.
-//
-// COUNT UPWARD, subtracting the pop1 of each JP BELOW OR AT Index, from the
-// whole expanses pop1:
-
-	    if (digit < (cJU_BRANCHUNUMJPS / 2))
-	    {
-		pop1above = pop1;		// subtract JPs below Index.
-#ifdef SMARTMETRICS
-		++jbu_upward;
-#endif
-		for (jpnum = 0; jpnum <= digit; ++jpnum)
-		{
-		    if ((Pjbu->jbu_jp[jpnum].jp_Type) <= cJU_JPNULLMAX)
-			continue;	// shortcut, save a function call.
-
-		    if ((pop1 = j__udyJPPop1(Pjbu->jbu_jp + jpnum))
-		     == cJU_ALLONES)
-		    {
-			JU_SET_ERRNO_NONNULL(Pjpm, JU_ERRNO_CORRUPT);
-			return(C_JERR);
-		    }
-
-		    pop1above -= pop1;
-		}
-	    }
-
-// COUNT DOWNWARD, simply adding the pop1 of each JP ABOVE Index:
-
-	    else
-#endif // NOSMARTJBU
-	    {
-		assert(digit < cJU_BRANCHUNUMJPS);
-#ifdef SMARTMETRICS
-		++jbu_downward;
-#endif
-		pop1above = 0;			// add JPs above Index.
-
-		for (jpnum = cJU_BRANCHUNUMJPS - 1; jpnum > digit; --jpnum)
-		{
-		    if ((Pjbu->jbu_jp[jpnum].jp_Type) <= cJU_JPNULLMAX)
-			continue;	// shortcut, save a function call.
-
-		    if ((pop1 = j__udyJPPop1(Pjbu->jbu_jp + jpnum))
-		     == cJU_ALLONES)
-		    {
-			JU_SET_ERRNO_NONNULL(Pjpm, JU_ERRNO_CORRUPT);
-			return(C_JERR);
-		    }
-
-		    pop1above += pop1;
-		}
-	    }
-
-	    if ((pop1 = j__udy1LCountSM(Pjbu->jbu_jp + digit, Index, Pjpm))
-	     == C_JERR) return(C_JERR);		// pass error up.
-
-	    assert(pop1above + pop1);
-	    return(pop1above + pop1);
-
-
-// ----------------------------------------------------------------------------
-// LEAF COUNT MACROS:
-//
-// LEAF*ABOVE() are common code for different JP types (linear leaves, bitmap
-// leaves, and immediates) and different leaf Index Sizes, which result in
-// calling different leaf search functions.  Linear leaves get the leaf address
-// from jp_Addr and the Population from jp_DcdPopO, while immediates use Pjp
-// itself as the leaf address and get Population from jp_Type.
-
-#define	LEAFLABOVE(Func)				\
-	Pjll = P_JLL(Pjp->jp_Addr);			\
-	pop1 = JU_JPLEAF_POP0(Pjp) + 1;	                \
-	LEAFABOVE(Func, Pjll, pop1)
-
-#define	LEAFB1ABOVE(Func) LEAFLABOVE(Func)  // different Func, otherwise same.
-
-#ifdef JUDY1
-#define	IMMABOVE(Func,Pop1)	\
-	Pjll = (Pjll_t) Pjp;	\
-	LEAFABOVE(Func, Pjll, Pop1)
-#else
-// Note:  For JudyL immediates with >= 2 Indexes, the index bytes are in a
-// different place than for Judy1:
-
-#define	IMMABOVE(Func,Pop1) \
-	LEAFABOVE(Func, (Pjll_t) (Pjp->jp_LIndex), Pop1)
-#endif
-
-// For all leaf types, the population AT OR ABOVE is the total pop1 less the
-// offset of Index; and Index should always be found:
-
-#define	LEAFABOVE(Func,Pjll,Pop1)		\
-	offset = Func(Pjll, Pop1, Index);	\
-	assert(offset >= 0);			\
-	assert(offset < (Pop1));		\
-	return((Pop1) - offset)
-
-// IMMABOVE_01 handles the special case of an immediate JP with 1 index, which
-// the search functions arent used for anyway:
-//
-// The target Index should be the one in this Immediate, in which case the
-// count above (inclusive) is always 1.
-
-#define	IMMABOVE_01						\
-	assert((JU_JPDCDPOP0(Pjp)) == JU_TRIMTODCDSIZE(Index));	\
-	return(1)
-
-
-// ----------------------------------------------------------------------------
-// LINEAR LEAF; search the leaf for Index; size is computed from jp_Type:
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-	case cJU_JPLEAF1:  LEAFLABOVE(j__udySearchLeaf1);
-#endif
-	case cJU_JPLEAF2:  LEAFLABOVE(j__udySearchLeaf2);
-	case cJU_JPLEAF3:  LEAFLABOVE(j__udySearchLeaf3);
-
-#ifdef JU_64BIT
-	case cJU_JPLEAF4:  LEAFLABOVE(j__udySearchLeaf4);
-	case cJU_JPLEAF5:  LEAFLABOVE(j__udySearchLeaf5);
-	case cJU_JPLEAF6:  LEAFLABOVE(j__udySearchLeaf6);
-	case cJU_JPLEAF7:  LEAFLABOVE(j__udySearchLeaf7);
-#endif
-
-
-// ----------------------------------------------------------------------------
-// BITMAP LEAF; search the leaf for Index:
-//
-// Since the bitmap describes Indexes digitally rather than linearly, this is
-// not really a search, but just a count.
-
-	case cJU_JPLEAF_B1:  LEAFB1ABOVE(j__udyCountLeafB1);
-
-
-#ifdef JUDY1
-// ----------------------------------------------------------------------------
-// FULL POPULATION:
-//
-// Return the count of Indexes AT OR ABOVE Index, which is the total population
-// of the expanse (a constant) less the value of the undecoded digit remaining
-// in Index (its base-0 offset in the expanse), which yields an inclusive count
-// above.
-//
-// TBD:  This only supports a 1-byte full expanse.  Should this extract a
-// stored value for pop0 and possibly more LSBs of Index, to handle larger full
-// expanses?
-
-	case cJ1_JPFULLPOPU1:
-	    return(cJU_JPFULLPOPU1_POP0 + 1 - JU_DIGITATSTATE(Index, 1));
-#endif
-
-
-// ----------------------------------------------------------------------------
-// IMMEDIATE:
-
-	case cJU_JPIMMED_1_01:  IMMABOVE_01;
-	case cJU_JPIMMED_2_01:  IMMABOVE_01;
-	case cJU_JPIMMED_3_01:  IMMABOVE_01;
-#ifdef JU_64BIT
-	case cJU_JPIMMED_4_01:  IMMABOVE_01;
-	case cJU_JPIMMED_5_01:  IMMABOVE_01;
-	case cJU_JPIMMED_6_01:  IMMABOVE_01;
-	case cJU_JPIMMED_7_01:  IMMABOVE_01;
-#endif
-
-	case cJU_JPIMMED_1_02:  IMMABOVE(j__udySearchLeaf1,  2);
-	case cJU_JPIMMED_1_03:  IMMABOVE(j__udySearchLeaf1,  3);
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_1_04:  IMMABOVE(j__udySearchLeaf1,  4);
-	case cJU_JPIMMED_1_05:  IMMABOVE(j__udySearchLeaf1,  5);
-	case cJU_JPIMMED_1_06:  IMMABOVE(j__udySearchLeaf1,  6);
-	case cJU_JPIMMED_1_07:  IMMABOVE(j__udySearchLeaf1,  7);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_1_08:  IMMABOVE(j__udySearchLeaf1,  8);
-	case cJ1_JPIMMED_1_09:  IMMABOVE(j__udySearchLeaf1,  9);
-	case cJ1_JPIMMED_1_10:  IMMABOVE(j__udySearchLeaf1, 10);
-	case cJ1_JPIMMED_1_11:  IMMABOVE(j__udySearchLeaf1, 11);
-	case cJ1_JPIMMED_1_12:  IMMABOVE(j__udySearchLeaf1, 12);
-	case cJ1_JPIMMED_1_13:  IMMABOVE(j__udySearchLeaf1, 13);
-	case cJ1_JPIMMED_1_14:  IMMABOVE(j__udySearchLeaf1, 14);
-	case cJ1_JPIMMED_1_15:  IMMABOVE(j__udySearchLeaf1, 15);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_2_02:  IMMABOVE(j__udySearchLeaf2,  2);
-	case cJU_JPIMMED_2_03:  IMMABOVE(j__udySearchLeaf2,  3);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_2_04:  IMMABOVE(j__udySearchLeaf2,  4);
-	case cJ1_JPIMMED_2_05:  IMMABOVE(j__udySearchLeaf2,  5);
-	case cJ1_JPIMMED_2_06:  IMMABOVE(j__udySearchLeaf2,  6);
-	case cJ1_JPIMMED_2_07:  IMMABOVE(j__udySearchLeaf2,  7);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_3_02:  IMMABOVE(j__udySearchLeaf3,  2);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_3_03:  IMMABOVE(j__udySearchLeaf3,  3);
-	case cJ1_JPIMMED_3_04:  IMMABOVE(j__udySearchLeaf3,  4);
-	case cJ1_JPIMMED_3_05:  IMMABOVE(j__udySearchLeaf3,  5);
-
-	case cJ1_JPIMMED_4_02:  IMMABOVE(j__udySearchLeaf4,  2);
-	case cJ1_JPIMMED_4_03:  IMMABOVE(j__udySearchLeaf4,  3);
-
-	case cJ1_JPIMMED_5_02:  IMMABOVE(j__udySearchLeaf5,  2);
-	case cJ1_JPIMMED_5_03:  IMMABOVE(j__udySearchLeaf5,  3);
-
-	case cJ1_JPIMMED_6_02:  IMMABOVE(j__udySearchLeaf6,  2);
-
-	case cJ1_JPIMMED_7_02:  IMMABOVE(j__udySearchLeaf7,  2);
-#endif
-
-
-// ----------------------------------------------------------------------------
-// OTHER CASES:
-
-	default: JU_SET_ERRNO_NONNULL(Pjpm, JU_ERRNO_CORRUPT); return(C_JERR);
-
-	} // switch on JP type
-
-	/*NOTREACHED*/
-
-} // j__udy1LCountSM()
-
-
-// ****************************************************************************
-// J U D Y   C O U N T   L E A F   B 1
-//
-// This is a private analog of the j__udySearchLeaf*() functions for counting
-// in bitmap 1-byte leaves.  Since a bitmap leaf describes Indexes digitally
-// rather than linearly, this is not really a search, but just a count of the
-// valid Indexes == set bits below or including Index, which should be valid.
-// Return the "offset" (really the ordinal), 0 .. Pop1 - 1, of Index in Pjll;
-// if Indexs bit is not set (which should never happen, so this is DEBUG-mode
-// only), return the 1s-complement equivalent (== negative offset minus 1).
-//
-// Note:  The source code for this function looks identical for both Judy1 and
-// JudyL, but the JU_JLB_BITMAP macro varies.
-//
-// Note:  For simpler calling, the first arg is of type Pjll_t but then cast to
-// Pjlb_t.
-
-FUNCTION static int j__udyCountLeafB1(
-const	Pjll_t	Pjll,		// bitmap leaf, as Pjll_t for consistency.
-const	Word_t	Pop1,		// Population of whole leaf.
-const	Word_t	Index)		// to which to count.
-{
-	Pjlb_t	Pjlb	= (Pjlb_t) Pjll;	// to proper type.
-	Word_t	digit   = Index & cJU_MASKATSTATE(1);
-	Word_t	findsub = digit / cJU_BITSPERSUBEXPL;
-	Word_t	findbit = digit % cJU_BITSPERSUBEXPL;
-	int	count;		// in leaf through Index.
-	long	subexp;		// for stepping through subexpanses.
-
-
-// COUNT UPWARD:
-//
-// The entire bitmap should fit in one cache line, but still try to save some
-// CPU time by counting the fewest possible number of subexpanses from the
-// bitmap.
-
-#ifndef NOSMARTJLB  // enable to turn off smart code for comparison purposes.
-
-	if (findsub < (cJU_NUMSUBEXPL / 2))
-	{
-#ifdef SMARTMETRICS
-	    ++jlb_upward;
-#endif
-	    count = 0;
-
-	    for (subexp = 0; subexp < findsub; ++subexp)
-	    {
-		count += ((JU_JLB_BITMAP(Pjlb, subexp) == cJU_FULLBITMAPL) ?
-			  cJU_BITSPERSUBEXPL :
-			  j__udyCountBitsL(JU_JLB_BITMAP(Pjlb, subexp)));
-	    }
-
-// This count includes findbit, which should be set, resulting in a base-1
-// offset:
-
-	    count += j__udyCountBitsL(JU_JLB_BITMAP(Pjlb, findsub)
-				& JU_MASKLOWERINC(JU_BITPOSMASKL(findbit)));
-
-	    DBGCODE(if (! JU_BITMAPTESTL(Pjlb, digit)) return(~count);)
-	    assert(count >= 1);
-	    return(count - 1);		// convert to base-0 offset.
-	}
-#endif // NOSMARTJLB
-
-
-// COUNT DOWNWARD:
-//
-// Count the valid Indexes above or at Index, and subtract from Pop1.
-
-#ifdef SMARTMETRICS
-	++jlb_downward;
-#endif
-	count = Pop1;			// base-1 for now.
-
-	for (subexp = cJU_NUMSUBEXPL - 1; subexp > findsub; --subexp)
-	{
-	    count -= ((JU_JLB_BITMAP(Pjlb, subexp) == cJU_FULLBITMAPL) ?
-		      cJU_BITSPERSUBEXPL :
-		      j__udyCountBitsL(JU_JLB_BITMAP(Pjlb, subexp)));
-	}
-
-// This count includes findbit, which should be set, resulting in a base-0
-// offset:
-
-	count -= j__udyCountBitsL(JU_JLB_BITMAP(Pjlb, findsub)
-				& JU_MASKHIGHERINC(JU_BITPOSMASKL(findbit)));
-
-	DBGCODE(if (! JU_BITMAPTESTL(Pjlb, digit)) return(~count);)
-	assert(count >= 0);		// should find Index itself.
-	return(count);			// is already a base-0 offset.
-
-} // j__udyCountLeafB1()
-
-
-// ****************************************************************************
-// J U D Y   J P   P O P 1
-//
-// This function takes any type of JP other than a root-level JP (cJU_LEAFW* or
-// cJU_JPBRANCH* with no number suffix) and extracts the Pop1 from it.  In some
-// sense this is a wrapper around the JU_JP*_POP0 macros.  Why write it as a
-// function instead of a complex macro containing a trinary?  (See version
-// Judy1.h version 4.17.)  We think its cheaper to call a function containing
-// a switch statement with "constant" cases than to do the variable
-// calculations in a trinary.
-//
-// For invalid JP Types return cJU_ALLONES.  Note that this is an impossibly
-// high Pop1 for any JP below a top level branch.
-
-FUNCTION Word_t j__udyJPPop1(
-const	Pjp_t Pjp)		// JP to count.
-{
-	switch (JU_JPTYPE(Pjp))
-	{
-#ifdef notdef // caller should shortcut and not even call with these:
-
-	case cJU_JPNULL1:
-	case cJU_JPNULL2:
-	case cJU_JPNULL3:  return(0);
-#ifdef JU_64BIT
-	case cJU_JPNULL4:
-	case cJU_JPNULL5:
-	case cJU_JPNULL6:
-	case cJU_JPNULL7:  return(0);
-#endif
-#endif // notdef
-
-	case cJU_JPBRANCH_L2:
-	case cJU_JPBRANCH_B2:
-	case cJU_JPBRANCH_U2: return(JU_JPBRANCH_POP0(Pjp,2) + 1);
-
-	case cJU_JPBRANCH_L3:
-	case cJU_JPBRANCH_B3:
-	case cJU_JPBRANCH_U3: return(JU_JPBRANCH_POP0(Pjp,3) + 1);
-
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_L4:
-	case cJU_JPBRANCH_B4:
-	case cJU_JPBRANCH_U4: return(JU_JPBRANCH_POP0(Pjp,4) + 1);
-
-	case cJU_JPBRANCH_L5:
-	case cJU_JPBRANCH_B5:
-	case cJU_JPBRANCH_U5: return(JU_JPBRANCH_POP0(Pjp,5) + 1);
-
-	case cJU_JPBRANCH_L6:
-	case cJU_JPBRANCH_B6:
-	case cJU_JPBRANCH_U6: return(JU_JPBRANCH_POP0(Pjp,6) + 1);
-
-	case cJU_JPBRANCH_L7:
-	case cJU_JPBRANCH_B7:
-	case cJU_JPBRANCH_U7: return(JU_JPBRANCH_POP0(Pjp,7) + 1);
-#endif
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-	case cJU_JPLEAF1:
-#endif
-	case cJU_JPLEAF2:
-	case cJU_JPLEAF3:
-#ifdef JU_64BIT
-	case cJU_JPLEAF4:
-	case cJU_JPLEAF5:
-	case cJU_JPLEAF6:
-	case cJU_JPLEAF7:
-#endif
-	case cJU_JPLEAF_B1:	return(JU_JPLEAF_POP0(Pjp) + 1);
-
-#ifdef JUDY1
-	case cJ1_JPFULLPOPU1:	return(cJU_JPFULLPOPU1_POP0 + 1);
-#endif
-
-	case cJU_JPIMMED_1_01:
-	case cJU_JPIMMED_2_01:
-	case cJU_JPIMMED_3_01:	return(1);
-#ifdef JU_64BIT
-	case cJU_JPIMMED_4_01:
-	case cJU_JPIMMED_5_01:
-	case cJU_JPIMMED_6_01:
-	case cJU_JPIMMED_7_01:	return(1);
-#endif
-
-	case cJU_JPIMMED_1_02:	return(2);
-	case cJU_JPIMMED_1_03:	return(3);
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_1_04:	return(4);
-	case cJU_JPIMMED_1_05:	return(5);
-	case cJU_JPIMMED_1_06:	return(6);
-	case cJU_JPIMMED_1_07:	return(7);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_1_08:	return(8);
-	case cJ1_JPIMMED_1_09:	return(9);
-	case cJ1_JPIMMED_1_10:	return(10);
-	case cJ1_JPIMMED_1_11:	return(11);
-	case cJ1_JPIMMED_1_12:	return(12);
-	case cJ1_JPIMMED_1_13:	return(13);
-	case cJ1_JPIMMED_1_14:	return(14);
-	case cJ1_JPIMMED_1_15:	return(15);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_2_02:	return(2);
-	case cJU_JPIMMED_2_03:	return(3);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_2_04:	return(4);
-	case cJ1_JPIMMED_2_05:	return(5);
-	case cJ1_JPIMMED_2_06:	return(6);
-	case cJ1_JPIMMED_2_07:	return(7);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_3_02:	return(2);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_3_03:	return(3);
-	case cJ1_JPIMMED_3_04:	return(4);
-	case cJ1_JPIMMED_3_05:	return(5);
-
-	case cJ1_JPIMMED_4_02:	return(2);
-	case cJ1_JPIMMED_4_03:	return(3);
-
-	case cJ1_JPIMMED_5_02:	return(2);
-	case cJ1_JPIMMED_5_03:	return(3);
-
-	case cJ1_JPIMMED_6_02:	return(2);
-
-	case cJ1_JPIMMED_7_02:	return(2);
-#endif
-
-	default:		return(cJU_ALLONES);
-	}
-
-	/*NOTREACHED*/
-
-} // j__udyJPPop1()
diff --git a/libs/klib/judy/JudyCreateBranch.c b/libs/klib/judy/JudyCreateBranch.c
deleted file mode 100644
index 1234c31..0000000
--- a/libs/klib/judy/JudyCreateBranch.c
+++ /dev/null
@@ -1,312 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// Branch creation functions for Judy1 and JudyL.
-// Compile with one of -DJUDY1 or -DJUDYL.
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-
-// ****************************************************************************
-// J U D Y   C R E A T E   B R A N C H   L
-//
-// Build a BranchL from an array of JPs and associated 1 byte digits
-// (expanses).  Return with Pjp pointing to the BranchL.  Caller must
-// deallocate passed arrays, if necessary.
-//
-// We have no idea what kind of BranchL it is, so caller must set the jp_Type.
-//
-// Return -1 if error (details in Pjpm), otherwise return 1.
-
-FUNCTION int j__udyCreateBranchL(
-	Pjp_t	Pjp,		// Build JPs from this place
-	Pjp_t	PJPs,		// Array of JPs to put into Bitmap branch
-	uint8_t Exp[],		// Array of expanses to put into bitmap
-	Word_t  ExpCnt,		// Number of above JPs and Expanses
-	Pvoid_t	Pjpm)
-{
-	Pjbl_t	PjblRaw;	// pointer to linear branch.
-	Pjbl_t	Pjbl;
-
-	assert(ExpCnt <= cJU_BRANCHLMAXJPS);
-
-	PjblRaw	= j__udyAllocJBL(Pjpm);
-	if (PjblRaw == (Pjbl_t) NULL) return(-1);
-        Pjbl    = P_JBL(PjblRaw);
-
-//	Build a Linear Branch
-	Pjbl->jbl_NumJPs = ExpCnt;
-
-//	Copy from the Linear branch from splayed leaves
-	JU_COPYMEM(Pjbl->jbl_Expanse, Exp,  ExpCnt);
-	JU_COPYMEM(Pjbl->jbl_jp,      PJPs, ExpCnt);
-
-//	Pass back new pointer to the Linear branch in JP
-	Pjp->jp_Addr = (Word_t) PjblRaw;
-
-	return(1);
-
-} // j__udyCreateBranchL()
-
-
-// ****************************************************************************
-// J U D Y   C R E A T E   B R A N C H   B
-//
-// Build a BranchB from an array of JPs and associated 1 byte digits
-// (expanses).  Return with Pjp pointing to the BranchB.  Caller must
-// deallocate passed arrays, if necessary.
-//
-// We have no idea what kind of BranchB it is, so caller must set the jp_Type.
-//
-// Return -1 if error (details in Pjpm), otherwise return 1.
-
-FUNCTION int j__udyCreateBranchB(
-	Pjp_t	Pjp,		// Build JPs from this place
-	Pjp_t	PJPs,		// Array of JPs to put into Bitmap branch
-	uint8_t Exp[],		// Array of expanses to put into bitmap
-	Word_t  ExpCnt,		// Number of above JPs and Expanses
-	Pvoid_t	Pjpm)
-{
-	Pjbb_t	PjbbRaw;	// pointer to bitmap branch.
-	Pjbb_t	Pjbb;
-	Word_t  ii, jj;		// Temps
-	uint8_t CurrSubExp;	// Current sub expanse for BM
-
-// This assertion says the number of populated subexpanses is not too large.
-// This function is only called when a BranchL overflows to a BranchB or when a
-// cascade occurs, meaning a leaf overflows.  Either way ExpCnt cant be very
-// large, in fact a lot smaller than cJU_BRANCHBMAXJPS.  (Otherwise a BranchU
-// would be used.)  Popping this assertion means something (unspecified) has
-// gone very wrong, or else Judys design criteria have changed, although in
-// fact there should be no HARM in creating a BranchB with higher actual
-// fanout.
-
-	assert(ExpCnt <= cJU_BRANCHBMAXJPS);
-
-//	Get memory for a Bitmap branch
-	PjbbRaw	= j__udyAllocJBB(Pjpm);
-	if (PjbbRaw == (Pjbb_t) NULL) return(-1);
-	Pjbb = P_JBB(PjbbRaw);
-
-//	Get 1st "sub" expanse (0..7) of bitmap branch
-	CurrSubExp = Exp[0] / cJU_BITSPERSUBEXPB;
-
-// Index thru all 1 byte sized expanses:
-
-	for (jj = ii = 0; ii <= ExpCnt; ii++)
-	{
-		Word_t SubExp;	// Cannot be a uint8_t
-
-//		Make sure we cover the last one
-		if (ii == ExpCnt)
-		{
-			SubExp = cJU_ALLONES;	// Force last one
-		}
-		else
-		{
-//			Calculate the "sub" expanse of the byte expanse
-			SubExp = Exp[ii] / cJU_BITSPERSUBEXPB;  // Bits 5..7.
-
-//			Set the bit that represents the expanse in Exp[]
-			JU_JBB_BITMAP(Pjbb, SubExp) |= JU_BITPOSMASKB(Exp[ii]);
-		}
-//		Check if a new "sub" expanse range needed
-		if (SubExp != CurrSubExp)
-		{
-//			Get number of JPs in this sub expanse
-			Word_t NumJP = ii - jj;
-			Pjp_t  PjpRaw;
-			Pjp_t  Pjp;
-
-			PjpRaw = j__udyAllocJBBJP(NumJP, Pjpm);
-                        Pjp    = P_JP(PjpRaw);
-
-			if (PjpRaw == (Pjp_t) NULL)	// out of memory.
-			{
-
-// Free any previous allocations:
-
-			    while(CurrSubExp--)
-			    {
-				NumJP = j__udyCountBitsB(JU_JBB_BITMAP(Pjbb,
-								  CurrSubExp));
-				if (NumJP)
-				{
-				    j__udyFreeJBBJP(JU_JBB_PJP(Pjbb,
-						    CurrSubExp), NumJP, Pjpm);
-				}
-			    }
-			    j__udyFreeJBB(PjbbRaw, Pjpm);
-			    return(-1);
-			}
-
-// Place the array of JPs in bitmap branch:
-
-			JU_JBB_PJP(Pjbb, CurrSubExp) = PjpRaw;
-
-// Copy the JPs to new leaf:
-
-			JU_COPYMEM(Pjp, PJPs + jj, NumJP);
-
-// On to the next bitmap branch "sub" expanse:
-
-			jj	   = ii;
-			CurrSubExp = SubExp;
-		}
-	} // for each 1-byte expanse
-
-// Pass back some of the JP to the new Bitmap branch:
-
-	Pjp->jp_Addr = (Word_t) PjbbRaw;
-
-	return(1);
-
-} // j__udyCreateBranchB()
-
-
-// ****************************************************************************
-// J U D Y   C R E A T E   B R A N C H   U
-//
-// Build a BranchU from a BranchB.  Return with Pjp pointing to the BranchU.
-// Free the BranchB and its JP subarrays.
-//
-// Return -1 if error (details in Pjpm), otherwise return 1.
-
-FUNCTION int j__udyCreateBranchU(
-	Pjp_t	  Pjp,
-	Pvoid_t	  Pjpm)
-{
-	jp_t	  JPNull;
-        Pjbu_t    PjbuRaw;
-        Pjbu_t    Pjbu;
-	Pjbb_t	  PjbbRaw;
-	Pjbb_t	  Pjbb;
-	Word_t	  ii, jj;
-	BITMAPB_t BitMap;
-	Pjp_t	  PDstJP;
-#ifdef JU_STAGED_EXP
-	jbu_t	  BranchU;	// Staged uncompressed branch
-#else
-
-// Allocate memory for a BranchU:
-
-	PjbuRaw = j__udyAllocJBU(Pjpm);
-	if (PjbuRaw == (Pjbu_t) NULL) return(-1);
-        Pjbu = P_JBU(PjbuRaw);
-#endif
-        JU_JPSETADT(&JPNull, 0, 0, JU_JPTYPE(Pjp) - cJU_JPBRANCH_B2 + cJU_JPNULL1);
-
-// Get the pointer to the BranchB:
-
-	PjbbRaw	= (Pjbb_t) (Pjp->jp_Addr);
-	Pjbb	= P_JBB(PjbbRaw);
-
-//	Set the pointer to the Uncompressed branch
-#ifdef JU_STAGED_EXP
-	PDstJP = BranchU.jbu_jp;
-#else
-        PDstJP = Pjbu->jbu_jp;
-#endif
-	for (ii = 0; ii < cJU_NUMSUBEXPB; ii++)
-	{
-		Pjp_t	PjpA;
-		Pjp_t	PjpB;
-
-		PjpB = PjpA = P_JP(JU_JBB_PJP(Pjbb, ii));
-
-//		Get the bitmap for this subexpanse
-		BitMap	= JU_JBB_BITMAP(Pjbb, ii);
-
-//		NULL empty subexpanses
-		if (BitMap == 0)
-		{
-//			But, fill with NULLs
-			for (jj = 0; jj < cJU_BITSPERSUBEXPB; jj++)
-			{
-				PDstJP[jj] = JPNull;
-			}
-			PDstJP += cJU_BITSPERSUBEXPB;
-			continue;
-		}
-//		Check if Uncompressed subexpanse
-		if (BitMap == cJU_FULLBITMAPB)
-		{
-//			Copy subexpanse to the Uncompressed branch intact
-			JU_COPYMEM(PDstJP, PjpA, cJU_BITSPERSUBEXPB);
-
-//			Bump to next subexpanse
-			PDstJP += cJU_BITSPERSUBEXPB;
-
-//			Set length of subexpanse
-			jj = cJU_BITSPERSUBEXPB;
-		}
-		else
-		{
-			for (jj = 0; jj < cJU_BITSPERSUBEXPB; jj++)
-			{
-//				Copy JP or NULLJP depending on bit
-				if (BitMap & 1) { *PDstJP = *PjpA++; }
-				else		{ *PDstJP = JPNull; }
-
-				PDstJP++;	// advance to next JP
-				BitMap >>= 1;
-			}
-			jj = PjpA - PjpB;
-		}
-
-// Free the subexpanse:
-
-		j__udyFreeJBBJP(JU_JBB_PJP(Pjbb, ii), jj, Pjpm);
-
-	} // for each JP in BranchU
-
-#ifdef JU_STAGED_EXP
-
-// Allocate memory for a BranchU:
-
-	PjbuRaw = j__udyAllocJBU(Pjpm);
-	if (PjbuRaw == (Pjbu_t) NULL) return(-1);
-        Pjbu = P_JBU(PjbuRaw);
-
-// Copy staged branch to newly allocated branch:
-//
-// TBD:  I think this code is broken.
-
-	*Pjbu = BranchU;
-
-#endif // JU_STAGED_EXP
-
-// Finally free the BranchB and put the BranchU in its place:
-
-	j__udyFreeJBB(PjbbRaw, Pjpm);
-
-	Pjp->jp_Addr  = (Word_t) PjbuRaw;
-	Pjp->jp_Type += cJU_JPBRANCH_U - cJU_JPBRANCH_B;
-
-	return(1);
-
-} // j__udyCreateBranchU()
diff --git a/libs/klib/judy/JudyDecascade.c b/libs/klib/judy/JudyDecascade.c
deleted file mode 100644
index da625bc..0000000
--- a/libs/klib/judy/JudyDecascade.c
+++ /dev/null
@@ -1,1204 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// "Decascade" support functions for JudyDel.c:  These functions convert
-// smaller-index-size leaves to larger-index-size leaves, and also, bitmap
-// leaves (LeafB1s) to Leaf1s, and some types of branches to smaller branches
-// at the same index size.  Some "decascading" occurs explicitly in JudyDel.c,
-// but rare or large subroutines appear as functions here, and the overhead to
-// call them is negligible.
-//
-// Compile with one of -DJUDY1 or -DJUDYL.  Note:  Function names are converted
-// to Judy1 or JudyL specific values by external #defines.
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#endif
-#ifdef JUDYL
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-DBGCODE(extern void JudyCheckSorted(Pjll_t Pjll, Word_t Pop1, long IndexSize);)
-
-
-// ****************************************************************************
-// __ J U D Y   C O P Y   2   T O   3
-//
-// Copy one or more 2-byte Indexes to a series of 3-byte Indexes.
-
-FUNCTION static void j__udyCopy2to3(
-	uint8_t *  PDest,	// to where to copy 3-byte Indexes.
-	uint16_t * PSrc,	// from where to copy 2-byte indexes.
-	Word_t     Pop1,	// number of Indexes to copy.
-	Word_t     MSByte)	// most-significant byte, prefix to each Index.
-{
-	Word_t	   Temp;	// for building 3-byte Index.
-
-	assert(Pop1);
-
-        do {
-	    Temp = MSByte | *PSrc++;
-	    JU_COPY3_LONG_TO_PINDEX(PDest, Temp);
-	    PDest += 3;
-        } while (--Pop1);
-
-} // j__udyCopy2to3()
-
-
-#ifdef JU_64BIT
-
-// ****************************************************************************
-// __ J U D Y   C O P Y   3   T O   4
-//
-// Copy one or more 3-byte Indexes to a series of 4-byte Indexes.
-
-FUNCTION static void j__udyCopy3to4(
-	uint32_t * PDest,	// to where to copy 4-byte Indexes.
-	uint8_t *  PSrc,	// from where to copy 3-byte indexes.
-	Word_t     Pop1,	// number of Indexes to copy.
-	Word_t     MSByte)	// most-significant byte, prefix to each Index.
-{
-	Word_t	   Temp;	// for building 4-byte Index.
-
-	assert(Pop1);
-
-        do {
-	    JU_COPY3_PINDEX_TO_LONG(Temp, PSrc);
-	    Temp |= MSByte;
-	    PSrc += 3;
-	    *PDest++ = Temp;		// truncates to uint32_t.
-        } while (--Pop1);
-
-} // j__udyCopy3to4()
-
-
-// ****************************************************************************
-// __ J U D Y   C O P Y   4   T O   5
-//
-// Copy one or more 4-byte Indexes to a series of 5-byte Indexes.
-
-FUNCTION static void j__udyCopy4to5(
-	uint8_t *  PDest,	// to where to copy 4-byte Indexes.
-	uint32_t * PSrc,	// from where to copy 4-byte indexes.
-	Word_t     Pop1,	// number of Indexes to copy.
-	Word_t     MSByte)	// most-significant byte, prefix to each Index.
-{
-	Word_t	   Temp;	// for building 5-byte Index.
-
-	assert(Pop1);
-
-        do {
-	    Temp = MSByte | *PSrc++;
-	    JU_COPY5_LONG_TO_PINDEX(PDest, Temp);
-	    PDest += 5;
-        } while (--Pop1);
-
-} // j__udyCopy4to5()
-
-
-// ****************************************************************************
-// __ J U D Y   C O P Y   5   T O   6
-//
-// Copy one or more 5-byte Indexes to a series of 6-byte Indexes.
-
-FUNCTION static void j__udyCopy5to6(
-	uint8_t * PDest,	// to where to copy 6-byte Indexes.
-	uint8_t * PSrc,		// from where to copy 5-byte indexes.
-	Word_t    Pop1,		// number of Indexes to copy.
-	Word_t    MSByte)	// most-significant byte, prefix to each Index.
-{
-	Word_t	  Temp;		// for building 6-byte Index.
-
-	assert(Pop1);
-
-        do {
-	    JU_COPY5_PINDEX_TO_LONG(Temp, PSrc);
-	    Temp |= MSByte;
-	    JU_COPY6_LONG_TO_PINDEX(PDest, Temp);
-	    PSrc  += 5;
-	    PDest += 6;
-        } while (--Pop1);
-
-} // j__udyCopy5to6()
-
-
-// ****************************************************************************
-// __ J U D Y   C O P Y   6   T O   7
-//
-// Copy one or more 6-byte Indexes to a series of 7-byte Indexes.
-
-FUNCTION static void j__udyCopy6to7(
-	uint8_t * PDest,	// to where to copy 6-byte Indexes.
-	uint8_t * PSrc,		// from where to copy 5-byte indexes.
-	Word_t    Pop1,		// number of Indexes to copy.
-	Word_t    MSByte)	// most-significant byte, prefix to each Index.
-{
-	Word_t	  Temp;		// for building 6-byte Index.
-
-	assert(Pop1);
-
-        do {
-	    JU_COPY6_PINDEX_TO_LONG(Temp, PSrc);
-	    Temp |= MSByte;
-	    JU_COPY7_LONG_TO_PINDEX(PDest, Temp);
-	    PSrc  += 6;
-	    PDest += 7;
-        } while (--Pop1);
-
-} // j__udyCopy6to7()
-
-#endif // JU_64BIT
-
-
-#ifndef JU_64BIT // 32-bit
-
-// ****************************************************************************
-// __ J U D Y   C O P Y   3   T O   W
-//
-// Copy one or more 3-byte Indexes to a series of longs (words, always 4-byte).
-
-FUNCTION static void j__udyCopy3toW(
-	PWord_t   PDest,	// to where to copy full-word Indexes.
-	uint8_t * PSrc,		// from where to copy 3-byte indexes.
-	Word_t    Pop1,		// number of Indexes to copy.
-	Word_t    MSByte)	// most-significant byte, prefix to each Index.
-{
-	assert(Pop1);
-
-        do {
-	    JU_COPY3_PINDEX_TO_LONG(*PDest, PSrc);
-	    *PDest++ |= MSByte;
-	    PSrc     += 3;
-        } while (--Pop1);
-
-} // j__udyCopy3toW()
-
-
-#else // JU_64BIT
-
-// ****************************************************************************
-// __ J U D Y   C O P Y   7   T O   W
-//
-// Copy one or more 7-byte Indexes to a series of longs (words, always 8-byte).
-
-FUNCTION static void j__udyCopy7toW(
-	PWord_t   PDest,	// to where to copy full-word Indexes.
-	uint8_t * PSrc,		// from where to copy 7-byte indexes.
-	Word_t    Pop1,		// number of Indexes to copy.
-	Word_t    MSByte)	// most-significant byte, prefix to each Index.
-{
-	assert(Pop1);
-
-        do {
-	    JU_COPY7_PINDEX_TO_LONG(*PDest, PSrc);
-	    *PDest++ |= MSByte;
-	    PSrc     += 7;
-        } while (--Pop1);
-
-} // j__udyCopy7toW()
-
-#endif // JU_64BIT
-
-
-// ****************************************************************************
-// __ J U D Y   B R A N C H   B   T O   B R A N C H   L
-//
-// When a BranchB shrinks to have few enough JPs, call this function to convert
-// it to a BranchL.  Return 1 for success, or -1 for failure (with details in
-// Pjpm).
-
-FUNCTION int j__udyBranchBToBranchL(
-	Pjp_t	Pjp,		// points to BranchB to shrink.
-	Pvoid_t	Pjpm)		// for global accounting.
-{
-	Pjbb_t	PjbbRaw;	// old BranchB to shrink.
-	Pjbb_t	Pjbb;
-	Pjbl_t	PjblRaw;	// new BranchL to create.
-	Pjbl_t	Pjbl;
-	Word_t	Digit;		// in BranchB.
-	Word_t  NumJPs;		// non-null JPs in BranchB.
-	uint8_t Expanse[cJU_BRANCHLMAXJPS];	// for building jbl_Expanse[].
-	Pjp_t	Pjpjbl;		// current JP in BranchL.
-	Word_t  SubExp;		// in BranchB.
-
-	assert(JU_JPTYPE(Pjp) >= cJU_JPBRANCH_B2);
-	assert(JU_JPTYPE(Pjp) <= cJU_JPBRANCH_B);
-
-	PjbbRaw	= (Pjbb_t) (Pjp->jp_Addr);
-	Pjbb	= P_JBB(PjbbRaw);
-
-// Copy 1-byte subexpanse digits from BranchB to temporary buffer for BranchL,
-// for each bit set in the BranchB:
-//
-// TBD:  The following supports variable-sized linear branches, but they are no
-// longer variable; this could be simplified to save the copying.
-//
-// TBD:  Since cJU_BRANCHLMAXJP == 7 now, and cJU_BRANCHUNUMJPS == 256, the
-// following might be inefficient; is there a faster way to do it?  At least
-// skip wholly empty subexpanses?
-
-	for (NumJPs = Digit = 0; Digit < cJU_BRANCHUNUMJPS; ++Digit)
-	{
-	    if (JU_BITMAPTESTB(Pjbb, Digit))
-	    {
-		Expanse[NumJPs++] = Digit;
-		assert(NumJPs <= cJU_BRANCHLMAXJPS);	// required of caller.
-	    }
-	}
-
-// Allocate and populate the BranchL:
-
-	if ((PjblRaw = j__udyAllocJBL(Pjpm)) == (Pjbl_t) NULL) return(-1);
-	Pjbl = P_JBL(PjblRaw);
-
-	JU_COPYMEM(Pjbl->jbl_Expanse, Expanse, NumJPs);
-
-	Pjbl->jbl_NumJPs = NumJPs;
-	DBGCODE(JudyCheckSorted((Pjll_t) (Pjbl->jbl_Expanse), NumJPs, 1);)
-
-// Copy JPs from each BranchB subexpanse subarray:
-
-	Pjpjbl = P_JP(Pjbl->jbl_jp);	// start at first JP in array.
-
-	for (SubExp = 0; SubExp < cJU_NUMSUBEXPB; ++SubExp)
-	{
-	    Pjp_t PjpRaw = JU_JBB_PJP(Pjbb, SubExp);	// current Pjp.
-	    Pjp_t Pjp;
-
-	    if (PjpRaw == (Pjp_t) NULL) continue;  // skip empty subexpanse.
-	    Pjp = P_JP(PjpRaw);
-
-	    NumJPs = j__udyCountBitsB(JU_JBB_BITMAP(Pjbb, SubExp));
-	    assert(NumJPs);
-	    JU_COPYMEM(Pjpjbl, Pjp, NumJPs);	 // one subarray at a time.
-
-	    Pjpjbl += NumJPs;
-	    j__udyFreeJBBJP(PjpRaw, NumJPs, Pjpm);	// subarray.
-	}
-	j__udyFreeJBB(PjbbRaw, Pjpm);		// BranchB itself.
-
-// Finish up:  Calculate new JP type (same index size = level in new class),
-// and tie new BranchB into parent JP:
-
-	Pjp->jp_Type += cJU_JPBRANCH_L - cJU_JPBRANCH_B;
-	Pjp->jp_Addr  = (Word_t) PjblRaw;
-
-	return(1);
-
-} // j__udyBranchBToBranchL()
-
-
-#ifdef notdef
-
-// ****************************************************************************
-// __ J U D Y   B R A N C H   U   T O   B R A N C H   B
-//
-// When a BranchU shrinks to need little enough memory, call this function to
-// convert it to a BranchB to save memory (at the cost of some speed).  Return
-// 1 for success, or -1 for failure (with details in Pjpm).
-//
-// TBD:  Fill out if/when needed.  Not currently used in JudyDel.c for reasons
-// explained there.
-
-FUNCTION int j__udyBranchUToBranchB(
-	Pjp_t	Pjp,		// points to BranchU to shrink.
-	Pvoid_t	Pjpm)		// for global accounting.
-{
-	assert(FALSE);
-	return(1);
-}
-#endif // notdef
-
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-
-// ****************************************************************************
-// __ J U D Y   L E A F   B 1   T O   L E A F   1
-//
-// Shrink a bitmap leaf (cJU_LEAFB1) to linear leaf (cJU_JPLEAF1).
-// Return 1 for success, or -1 for failure (with details in Pjpm).
-//
-// Note:  This function is different than the other JudyLeaf*ToLeaf*()
-// functions because it receives a Pjp, not just a leaf, and handles its own
-// allocation and free, in order to allow the caller to continue with a LeafB1
-// if allocation fails.
-
-FUNCTION int j__udyLeafB1ToLeaf1(
-	Pjp_t	  Pjp,		// points to LeafB1 to shrink.
-	Pvoid_t	  Pjpm)		// for global accounting.
-{
-	Pjlb_t    PjlbRaw;	// bitmap in old leaf.
-	Pjlb_t    Pjlb;
-	Pjll_t	  PjllRaw;	// new Leaf1.
-	uint8_t	* Pleaf1;	// Leaf1 pointer type.
-	Word_t    Digit;	// in LeafB1 bitmap.
-#ifdef JUDYL
-	Pjv_t	  PjvNew;	// value area in new Leaf1.
-	Word_t    Pop1;
-	Word_t    SubExp;
-#endif
-
-	assert(JU_JPTYPE(Pjp) == cJU_JPLEAF_B1);
-	assert(((JU_JPDCDPOP0(Pjp) & 0xFF) + 1) == cJU_LEAF1_MAXPOP1);
-
-// Allocate JPLEAF1 and prepare pointers:
-
-	if ((PjllRaw = j__udyAllocJLL1(cJU_LEAF1_MAXPOP1, Pjpm)) == 0)
-	    return(-1);
-
-	Pleaf1	= (uint8_t *) P_JLL(PjllRaw);
-	PjlbRaw	= (Pjlb_t) (Pjp->jp_Addr);
-	Pjlb	= P_JLB(PjlbRaw);
-	JUDYLCODE(PjvNew = JL_LEAF1VALUEAREA(Pleaf1, cJL_LEAF1_MAXPOP1);)
-
-// Copy 1-byte indexes from old LeafB1 to new Leaf1:
-
-	for (Digit = 0; Digit < cJU_BRANCHUNUMJPS; ++Digit)
-	    if (JU_BITMAPTESTL(Pjlb, Digit))
-		*Pleaf1++ = Digit;
-
-#ifdef JUDYL
-
-// Copy all old-LeafB1 value areas from value subarrays to new Leaf1:
-
-	for (SubExp = 0; SubExp < cJU_NUMSUBEXPL; ++SubExp)
-	{
-	    Pjv_t PjvRaw = JL_JLB_PVALUE(Pjlb, SubExp);
-	    Pjv_t Pjv    = P_JV(PjvRaw);
-
-	    if (Pjv == (Pjv_t) NULL) continue;	// skip empty subarray.
-
-	    Pop1 = j__udyCountBitsL(JU_JLB_BITMAP(Pjlb, SubExp));  // subarray.
-	    assert(Pop1);
-
-	    JU_COPYMEM(PjvNew, Pjv, Pop1);		// copy value areas.
-	    j__udyLFreeJV(PjvRaw, Pop1, Pjpm);
-	    PjvNew += Pop1;				// advance through new.
-	}
-
-	assert((((Word_t) Pleaf1) - (Word_t) P_JLL(PjllRaw))
-	    == (PjvNew - JL_LEAF1VALUEAREA(P_JLL(PjllRaw), cJL_LEAF1_MAXPOP1)));
-#endif // JUDYL
-
-	DBGCODE(JudyCheckSorted((Pjll_t) P_JLL(PjllRaw),
-			    (((Word_t) Pleaf1) - (Word_t) P_JLL(PjllRaw)), 1);)
-
-// Finish up:  Free the old LeafB1 and plug the new Leaf1 into the JP:
-//
-// Note:  jp_DcdPopO does not change here.
-
-	j__udyFreeJLB1(PjlbRaw, Pjpm);
-
-	Pjp->jp_Addr = (Word_t) PjllRaw;
-	Pjp->jp_Type = cJU_JPLEAF1;
-
-	return(1);
-
-} // j__udyLeafB1ToLeaf1()
-
-#endif // (JUDYL || (! JU_64BIT))
-
-
-// ****************************************************************************
-// __ J U D Y   L E A F   1   T O   L E A F   2
-//
-// Copy 1-byte Indexes from a LeafB1 or Leaf1 to 2-byte Indexes in a Leaf2.
-// Pjp MUST be one of:  cJU_JPLEAF_B1, cJU_JPLEAF1, or cJU_JPIMMED_1_*.
-// Return number of Indexes copied.
-//
-// TBD:  In this and all following functions, the caller should already be able
-// to compute the Pop1 return value, so why return it?
-
-FUNCTION Word_t  j__udyLeaf1ToLeaf2(
-	uint16_t * PLeaf2,	// destination uint16_t * Index portion of leaf.
-#ifdef JUDYL
-	Pjv_t	   Pjv2,	// destination value part of leaf.
-#endif
-	Pjp_t	   Pjp,		// 1-byte-index object from which to copy.
-	Word_t     MSByte,	// most-significant byte, prefix to each Index.
-	Pvoid_t	   Pjpm)	// for global accounting.
-{
-	Word_t	   Pop1;	// Indexes in leaf.
-	Word_t	   Offset;	// in linear leaf list.
-JUDYLCODE(Pjv_t	   Pjv1Raw;)	// source object value area.
-JUDYLCODE(Pjv_t	   Pjv1;)
-
-	switch (JU_JPTYPE(Pjp))
-	{
-
-
-// JPLEAF_B1:
-
-	case cJU_JPLEAF_B1:
-	{
-	    Pjlb_t Pjlb = P_JLB(Pjp->jp_Addr);
-	    Word_t Digit;	// in LeafB1 bitmap.
-  JUDYLCODE(Word_t SubExp;)	// in LeafB1.
-
-	    Pop1 = JU_JPBRANCH_POP0(Pjp, 1) + 1; assert(Pop1);
-
-// Copy 1-byte indexes from old LeafB1 to new Leaf2, including splicing in
-// the missing MSByte needed in the Leaf2:
-
-	    for (Digit = 0; Digit < cJU_BRANCHUNUMJPS; ++Digit)
-		if (JU_BITMAPTESTL(Pjlb, Digit))
-		    *PLeaf2++ = MSByte | Digit;
-
-#ifdef JUDYL
-
-// Copy all old-LeafB1 value areas from value subarrays to new Leaf2:
-
-	    for (SubExp = 0; SubExp < cJU_NUMSUBEXPL; ++SubExp)
-	    {
-		Word_t SubExpPop1;
-
-		Pjv1Raw = JL_JLB_PVALUE(Pjlb, SubExp);
-		if (Pjv1Raw == (Pjv_t) NULL) continue;	// skip empty.
-		Pjv1 = P_JV(Pjv1Raw);
-
-		SubExpPop1 = j__udyCountBitsL(JU_JLB_BITMAP(Pjlb, SubExp));
-		assert(SubExpPop1);
-
-		JU_COPYMEM(Pjv2, Pjv1, SubExpPop1);	// copy value areas.
-		j__udyLFreeJV(Pjv1Raw, SubExpPop1, Pjpm);
-		Pjv2 += SubExpPop1;			// advance through new.
-	    }
-#endif // JUDYL
-
-	    j__udyFreeJLB1((Pjlb_t) (Pjp->jp_Addr), Pjpm);  // LeafB1 itself.
-	    return(Pop1);
-
-	} // case cJU_JPLEAF_B1
-
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-
-// JPLEAF1:
-
-	case cJU_JPLEAF1:
-	{
-	    uint8_t * PLeaf1 = (uint8_t *) P_JLL(Pjp->jp_Addr);
-
-	    Pop1 = JU_JPBRANCH_POP0(Pjp, 1) + 1; assert(Pop1);
-	    JUDYLCODE(Pjv1 = JL_LEAF1VALUEAREA(PLeaf1, Pop1);)
-
-// Copy all Index bytes including splicing in missing MSByte needed in Leaf2
-// (plus, for JudyL, value areas):
-
-	    for (Offset = 0; Offset < Pop1; ++Offset)
-	    {
-		PLeaf2[Offset] = MSByte | PLeaf1[Offset];
-		JUDYLCODE(Pjv2[Offset] = Pjv1[Offset];)
-	    }
-	    j__udyFreeJLL1((Pjll_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    return(Pop1);
-	}
-#endif // (JUDYL || (! JU_64BIT))
-
-
-// JPIMMED_1_01:
-//
-// Note:  jp_DcdPopO has 3 [7] bytes of Index (all but most significant byte),
-// so the assignment to PLeaf2[] truncates and MSByte is not needed.
-
-	case cJU_JPIMMED_1_01:
-	{
-	    PLeaf2[0] = JU_JPDCDPOP0(Pjp);	// see above.
-	    JUDYLCODE(Pjv2[0] = Pjp->jp_Addr;)
-	    return(1);
-	}
-
-
-// JPIMMED_1_0[2+]:
-
-	case cJU_JPIMMED_1_02:
-	case cJU_JPIMMED_1_03:
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_1_04:
-	case cJU_JPIMMED_1_05:
-	case cJU_JPIMMED_1_06:
-	case cJU_JPIMMED_1_07:
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_1_08:
-	case cJ1_JPIMMED_1_09:
-	case cJ1_JPIMMED_1_10:
-	case cJ1_JPIMMED_1_11:
-	case cJ1_JPIMMED_1_12:
-	case cJ1_JPIMMED_1_13:
-	case cJ1_JPIMMED_1_14:
-	case cJ1_JPIMMED_1_15:
-#endif
-	{
-	    Pop1 = JU_JPTYPE(Pjp) - cJU_JPIMMED_1_02 + 2; assert(Pop1);
-	    JUDYLCODE(Pjv1Raw = (Pjv_t) (Pjp->jp_Addr);)
-	    JUDYLCODE(Pjv1    = P_JV(Pjv1Raw);)
-
-	    for (Offset = 0; Offset < Pop1; ++Offset)
-	    {
-#ifdef JUDY1
-		PLeaf2[Offset] = MSByte | Pjp->jp_1Index[Offset];
-#else
-		PLeaf2[Offset] = MSByte | Pjp->jp_LIndex[Offset];
-		Pjv2  [Offset] = Pjv1[Offset];
-#endif
-	    }
-	    JUDYLCODE(j__udyLFreeJV(Pjv1Raw, Pop1, Pjpm);)
-	    return(Pop1);
-	}
-
-
-// UNEXPECTED CASES, including JPNULL1, should be handled by caller:
-
-	default: assert(FALSE); break;
-
-	} // switch
-
-	return(0);
-
-} // j__udyLeaf1ToLeaf2()
-
-
-// *****************************************************************************
-// __ J U D Y   L E A F   2   T O   L E A F   3
-//
-// Copy 2-byte Indexes from a Leaf2 to 3-byte Indexes in a Leaf3.
-// Pjp MUST be one of:  cJU_JPLEAF2 or cJU_JPIMMED_2_*.
-// Return number of Indexes copied.
-//
-// Note:  By the time this function is called to compress a level-3 branch to a
-// Leaf3, the branch has no narrow pointers under it, meaning only level-2
-// objects are below it and must be handled here.
-
-FUNCTION Word_t  j__udyLeaf2ToLeaf3(
-	uint8_t * PLeaf3,	// destination "uint24_t *" Index part of leaf.
-#ifdef JUDYL
-	Pjv_t	  Pjv3,		// destination value part of leaf.
-#endif
-	Pjp_t	  Pjp,		// 2-byte-index object from which to copy.
-	Word_t    MSByte,	// most-significant byte, prefix to each Index.
-	Pvoid_t	  Pjpm)		// for global accounting.
-{
-	Word_t	  Pop1;		// Indexes in leaf.
-#if (defined(JUDYL) && defined(JU_64BIT))
-	Pjv_t	  Pjv2Raw;	// source object value area.
-#endif
-JUDYLCODE(Pjv_t	  Pjv2;)
-
-	switch (JU_JPTYPE(Pjp))
-	{
-
-
-// JPLEAF2:
-
-	case cJU_JPLEAF2:
-	{
-	    uint16_t * PLeaf2 = (uint16_t *) P_JLL(Pjp->jp_Addr);
-
-	    Pop1 = JU_JPLEAF_POP0(Pjp) + 1; assert(Pop1);
-	    j__udyCopy2to3(PLeaf3, PLeaf2, Pop1, MSByte);
-#ifdef JUDYL
-	    Pjv2 = JL_LEAF2VALUEAREA(PLeaf2, Pop1);
-	    JU_COPYMEM(Pjv3, Pjv2, Pop1);
-#endif
-	    j__udyFreeJLL2((Pjll_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    return(Pop1);
-	}
-
-
-// JPIMMED_2_01:
-//
-// Note:  jp_DcdPopO has 3 [7] bytes of Index (all but most significant byte),
-// so the "assignment" to PLeaf3[] is exact [truncates] and MSByte is not
-// needed.
-
-	case cJU_JPIMMED_2_01:
-	{
-	    JU_COPY3_LONG_TO_PINDEX(PLeaf3, JU_JPDCDPOP0(Pjp));	// see above.
-	    JUDYLCODE(Pjv3[0] = Pjp->jp_Addr;)
-	    return(1);
-	}
-
-
-// JPIMMED_2_0[2+]:
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_2_02:
-	case cJU_JPIMMED_2_03:
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_2_04:
-	case cJ1_JPIMMED_2_05:
-	case cJ1_JPIMMED_2_06:
-	case cJ1_JPIMMED_2_07:
-#endif
-#if (defined(JUDY1) || defined(JU_64BIT))
-	{
-	    JUDY1CODE(uint16_t * PLeaf2 = (uint16_t *) (Pjp->jp_1Index);)
-	    JUDYLCODE(uint16_t * PLeaf2 = (uint16_t *) (Pjp->jp_LIndex);)
-
-	    Pop1 = JU_JPTYPE(Pjp) - cJU_JPIMMED_2_02 + 2; assert(Pop1);
-	    j__udyCopy2to3(PLeaf3, PLeaf2, Pop1, MSByte);
-#ifdef JUDYL
-	    Pjv2Raw = (Pjv_t) (Pjp->jp_Addr);
-	    Pjv2    = P_JV(Pjv2Raw);
-	    JU_COPYMEM(Pjv3, Pjv2, Pop1);
-	    j__udyLFreeJV(Pjv2Raw, Pop1, Pjpm);
-#endif
-	    return(Pop1);
-	}
-#endif // (JUDY1 || JU_64BIT)
-
-
-// UNEXPECTED CASES, including JPNULL2, should be handled by caller:
-
-	default: assert(FALSE); break;
-
-	} // switch
-
-	return(0);
-
-} // j__udyLeaf2ToLeaf3()
-
-
-#ifdef JU_64BIT
-
-// ****************************************************************************
-// __ J U D Y   L E A F   3   T O   L E A F   4
-//
-// Copy 3-byte Indexes from a Leaf3 to 4-byte Indexes in a Leaf4.
-// Pjp MUST be one of:  cJU_JPLEAF3 or cJU_JPIMMED_3_*.
-// Return number of Indexes copied.
-//
-// Note:  By the time this function is called to compress a level-4 branch to a
-// Leaf4, the branch has no narrow pointers under it, meaning only level-3
-// objects are below it and must be handled here.
-
-FUNCTION Word_t  j__udyLeaf3ToLeaf4(
-	uint32_t * PLeaf4,	// destination uint32_t * Index part of leaf.
-#ifdef JUDYL
-	Pjv_t	   Pjv4,	// destination value part of leaf.
-#endif
-	Pjp_t	   Pjp,		// 3-byte-index object from which to copy.
-	Word_t     MSByte,	// most-significant byte, prefix to each Index.
-	Pvoid_t	   Pjpm)	// for global accounting.
-{
-	Word_t	   Pop1;	// Indexes in leaf.
-JUDYLCODE(Pjv_t	   Pjv3Raw;)	// source object value area.
-JUDYLCODE(Pjv_t	   Pjv3;)
-
-	switch (JU_JPTYPE(Pjp))
-	{
-
-
-// JPLEAF3:
-
-	case cJU_JPLEAF3:
-	{
-	    uint8_t * PLeaf3 = (uint8_t *) P_JLL(Pjp->jp_Addr);
-
-	    Pop1 = JU_JPLEAF_POP0(Pjp) + 1; assert(Pop1);
-	    j__udyCopy3to4(PLeaf4, (uint8_t *) PLeaf3, Pop1, MSByte);
-#ifdef JUDYL
-	    Pjv3 = JL_LEAF3VALUEAREA(PLeaf3, Pop1);
-	    JU_COPYMEM(Pjv4, Pjv3, Pop1);
-#endif
-	    j__udyFreeJLL3((Pjll_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    return(Pop1);
-	}
-
-
-// JPIMMED_3_01:
-//
-// Note:  jp_DcdPopO has 7 bytes of Index (all but most significant byte), so
-// the assignment to PLeaf4[] truncates and MSByte is not needed.
-
-	case cJU_JPIMMED_3_01:
-	{
-	    PLeaf4[0] = JU_JPDCDPOP0(Pjp);	// see above.
-	    JUDYLCODE(Pjv4[0] = Pjp->jp_Addr;)
-	    return(1);
-	}
-
-
-// JPIMMED_3_0[2+]:
-
-	case cJU_JPIMMED_3_02:
-#ifdef JUDY1
-	case cJ1_JPIMMED_3_03:
-	case cJ1_JPIMMED_3_04:
-	case cJ1_JPIMMED_3_05:
-#endif
-	{
-	    JUDY1CODE(uint8_t * PLeaf3 = (uint8_t *) (Pjp->jp_1Index);)
-	    JUDYLCODE(uint8_t * PLeaf3 = (uint8_t *) (Pjp->jp_LIndex);)
-
-	    JUDY1CODE(Pop1 = JU_JPTYPE(Pjp) - cJU_JPIMMED_3_02 + 2;)
-	    JUDYLCODE(Pop1 = 2;)
-
-	    j__udyCopy3to4(PLeaf4, PLeaf3, Pop1, MSByte);
-#ifdef JUDYL
-	    Pjv3Raw = (Pjv_t) (Pjp->jp_Addr);
-	    Pjv3    = P_JV(Pjv3Raw);
-	    JU_COPYMEM(Pjv4, Pjv3, Pop1);
-	    j__udyLFreeJV(Pjv3Raw, Pop1, Pjpm);
-#endif
-	    return(Pop1);
-	}
-
-
-// UNEXPECTED CASES, including JPNULL3, should be handled by caller:
-
-	default: assert(FALSE); break;
-
-	} // switch
-
-	return(0);
-
-} // j__udyLeaf3ToLeaf4()
-
-
-// Note:  In all following j__udyLeaf*ToLeaf*() functions, JPIMMED_*_0[2+]
-// cases exist for Judy1 (&& 64-bit) only.  JudyL has no equivalent Immeds.
-
-
-// *****************************************************************************
-// __ J U D Y   L E A F   4   T O   L E A F   5
-//
-// Copy 4-byte Indexes from a Leaf4 to 5-byte Indexes in a Leaf5.
-// Pjp MUST be one of:  cJU_JPLEAF4 or cJU_JPIMMED_4_*.
-// Return number of Indexes copied.
-//
-// Note:  By the time this function is called to compress a level-5 branch to a
-// Leaf5, the branch has no narrow pointers under it, meaning only level-4
-// objects are below it and must be handled here.
-
-FUNCTION Word_t  j__udyLeaf4ToLeaf5(
-	uint8_t * PLeaf5,	// destination "uint40_t *" Index part of leaf.
-#ifdef JUDYL
-	Pjv_t	  Pjv5,		// destination value part of leaf.
-#endif
-	Pjp_t	  Pjp,		// 4-byte-index object from which to copy.
-	Word_t    MSByte,	// most-significant byte, prefix to each Index.
-	Pvoid_t	  Pjpm)		// for global accounting.
-{
-	Word_t	  Pop1;		// Indexes in leaf.
-JUDYLCODE(Pjv_t	  Pjv4;)	// source object value area.
-
-	switch (JU_JPTYPE(Pjp))
-	{
-
-
-// JPLEAF4:
-
-	case cJU_JPLEAF4:
-	{
-	    uint32_t * PLeaf4 = (uint32_t *) P_JLL(Pjp->jp_Addr);
-
-	    Pop1 = JU_JPLEAF_POP0(Pjp) + 1; assert(Pop1);
-	    j__udyCopy4to5(PLeaf5, PLeaf4, Pop1, MSByte);
-#ifdef JUDYL
-	    Pjv4 = JL_LEAF4VALUEAREA(PLeaf4, Pop1);
-	    JU_COPYMEM(Pjv5, Pjv4, Pop1);
-#endif
-	    j__udyFreeJLL4((Pjll_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    return(Pop1);
-	}
-
-
-// JPIMMED_4_01:
-//
-// Note:  jp_DcdPopO has 7 bytes of Index (all but most significant byte), so
-// the assignment to PLeaf5[] truncates and MSByte is not needed.
-
-	case cJU_JPIMMED_4_01:
-	{
-	    JU_COPY5_LONG_TO_PINDEX(PLeaf5, JU_JPDCDPOP0(Pjp));	// see above.
-	    JUDYLCODE(Pjv5[0] = Pjp->jp_Addr;)
-	    return(1);
-	}
-
-
-#ifdef JUDY1
-
-// JPIMMED_4_0[4+]:
-
-	case cJ1_JPIMMED_4_02:
-	case cJ1_JPIMMED_4_03:
-	{
-	    uint32_t * PLeaf4 = (uint32_t *) (Pjp->jp_1Index);
-
-	    Pop1 = JU_JPTYPE(Pjp) - cJ1_JPIMMED_4_02 + 2;
-	    j__udyCopy4to5(PLeaf5, PLeaf4, Pop1, MSByte);
-	    return(Pop1);
-	}
-#endif // JUDY1
-
-
-// UNEXPECTED CASES, including JPNULL4, should be handled by caller:
-
-	default: assert(FALSE); break;
-
-	} // switch
-
-	return(0);
-
-} // j__udyLeaf4ToLeaf5()
-
-
-// ****************************************************************************
-// __ J U D Y   L E A F   5   T O   L E A F   6
-//
-// Copy 5-byte Indexes from a Leaf5 to 6-byte Indexes in a Leaf6.
-// Pjp MUST be one of:  cJU_JPLEAF5 or cJU_JPIMMED_5_*.
-// Return number of Indexes copied.
-//
-// Note:  By the time this function is called to compress a level-6 branch to a
-// Leaf6, the branch has no narrow pointers under it, meaning only level-5
-// objects are below it and must be handled here.
-
-FUNCTION Word_t  j__udyLeaf5ToLeaf6(
-	uint8_t * PLeaf6,	// destination uint8_t * Index part of leaf.
-#ifdef JUDYL
-	Pjv_t	  Pjv6,		// destination value part of leaf.
-#endif
-	Pjp_t	  Pjp,		// 5-byte-index object from which to copy.
-	Word_t    MSByte,	// most-significant byte, prefix to each Index.
-	Pvoid_t	  Pjpm)		// for global accounting.
-{
-	Word_t	  Pop1;		// Indexes in leaf.
-JUDYLCODE(Pjv_t	  Pjv5;)	// source object value area.
-
-	switch (JU_JPTYPE(Pjp))
-	{
-
-
-// JPLEAF5:
-
-	case cJU_JPLEAF5:
-	{
-	    uint8_t * PLeaf5 = (uint8_t *) P_JLL(Pjp->jp_Addr);
-
-	    Pop1 = JU_JPLEAF_POP0(Pjp) + 1; assert(Pop1);
-	    j__udyCopy5to6(PLeaf6, PLeaf5, Pop1, MSByte);
-#ifdef JUDYL
-	    Pjv5 = JL_LEAF5VALUEAREA(PLeaf5, Pop1);
-	    JU_COPYMEM(Pjv6, Pjv5, Pop1);
-#endif
-	    j__udyFreeJLL5((Pjll_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    return(Pop1);
-	}
-
-
-// JPIMMED_5_01:
-//
-// Note:  jp_DcdPopO has 7 bytes of Index (all but most significant byte), so
-// the assignment to PLeaf6[] truncates and MSByte is not needed.
-
-	case cJU_JPIMMED_5_01:
-	{
-	    JU_COPY6_LONG_TO_PINDEX(PLeaf6, JU_JPDCDPOP0(Pjp));	// see above.
-	    JUDYLCODE(Pjv6[0] = Pjp->jp_Addr;)
-	    return(1);
-	}
-
-
-#ifdef JUDY1
-
-// JPIMMED_5_0[2+]:
-
-	case cJ1_JPIMMED_5_02:
-	case cJ1_JPIMMED_5_03:
-	{
-	    uint8_t * PLeaf5 = (uint8_t *) (Pjp->jp_1Index);
-
-	    Pop1 = JU_JPTYPE(Pjp) - cJ1_JPIMMED_5_02 + 2;
-	    j__udyCopy5to6(PLeaf6, PLeaf5, Pop1, MSByte);
-	    return(Pop1);
-	}
-#endif // JUDY1
-
-
-// UNEXPECTED CASES, including JPNULL5, should be handled by caller:
-
-	default: assert(FALSE); break;
-
-	} // switch
-
-	return(0);
-
-} // j__udyLeaf5ToLeaf6()
-
-
-// *****************************************************************************
-// __ J U D Y   L E A F   6   T O   L E A F   7
-//
-// Copy 6-byte Indexes from a Leaf2 to 7-byte Indexes in a Leaf7.
-// Pjp MUST be one of:  cJU_JPLEAF6 or cJU_JPIMMED_6_*.
-// Return number of Indexes copied.
-//
-// Note:  By the time this function is called to compress a level-7 branch to a
-// Leaf7, the branch has no narrow pointers under it, meaning only level-6
-// objects are below it and must be handled here.
-
-FUNCTION Word_t  j__udyLeaf6ToLeaf7(
-	uint8_t * PLeaf7,	// destination "uint24_t *" Index part of leaf.
-#ifdef JUDYL
-	Pjv_t	  Pjv7,		// destination value part of leaf.
-#endif
-	Pjp_t	  Pjp,		// 6-byte-index object from which to copy.
-	Word_t    MSByte,	// most-significant byte, prefix to each Index.
-	Pvoid_t	  Pjpm)		// for global accounting.
-{
-	Word_t	  Pop1;		// Indexes in leaf.
-JUDYLCODE(Pjv_t	  Pjv6;)	// source object value area.
-
-	switch (JU_JPTYPE(Pjp))
-	{
-
-
-// JPLEAF6:
-
-	case cJU_JPLEAF6:
-	{
-	    uint8_t * PLeaf6 = (uint8_t *) P_JLL(Pjp->jp_Addr);
-
-	    Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-	    j__udyCopy6to7(PLeaf7, PLeaf6, Pop1, MSByte);
-#ifdef JUDYL
-	    Pjv6 = JL_LEAF6VALUEAREA(PLeaf6, Pop1);
-	    JU_COPYMEM(Pjv7, Pjv6, Pop1);
-#endif
-	    j__udyFreeJLL6((Pjll_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    return(Pop1);
-	}
-
-
-// JPIMMED_6_01:
-//
-// Note:  jp_DcdPopO has 7 bytes of Index (all but most significant byte), so
-// the "assignment" to PLeaf7[] is exact and MSByte is not needed.
-
-	case cJU_JPIMMED_6_01:
-	{
-	    JU_COPY7_LONG_TO_PINDEX(PLeaf7, JU_JPDCDPOP0(Pjp));	// see above.
-	    JUDYLCODE(Pjv7[0] = Pjp->jp_Addr;)
-	    return(1);
-	}
-
-
-#ifdef JUDY1
-
-// JPIMMED_6_02:
-
-	case cJ1_JPIMMED_6_02:
-	{
-	    uint8_t * PLeaf6 = (uint8_t *) (Pjp->jp_1Index);
-
-	    j__udyCopy6to7(PLeaf7, PLeaf6, /* Pop1 = */ 2, MSByte);
-	    return(2);
-	}
-#endif // JUDY1
-
-
-// UNEXPECTED CASES, including JPNULL6, should be handled by caller:
-
-	default: assert(FALSE); break;
-
-	} // switch
-
-	return(0);
-
-} // j__udyLeaf6ToLeaf7()
-
-#endif // JU_64BIT
-
-
-#ifndef JU_64BIT // 32-bit version first
-
-// ****************************************************************************
-// __ J U D Y   L E A F   3   T O   L E A F   W
-//
-// Copy 3-byte Indexes from a Leaf3 to 4-byte Indexes in a LeafW.  Pjp MUST be
-// one of:  cJU_JPLEAF3 or cJU_JPIMMED_3_*.  Return number of Indexes copied.
-//
-// Note:  By the time this function is called to compress a level-L branch to a
-// LeafW, the branch has no narrow pointers under it, meaning only level-3
-// objects are below it and must be handled here.
-
-FUNCTION Word_t  j__udyLeaf3ToLeafW(
-	Pjlw_t	Pjlw,		// destination Index part of leaf.
-#ifdef JUDYL
-	Pjv_t	PjvW,		// destination value part of leaf.
-#endif
-	Pjp_t	Pjp,		// 3-byte-index object from which to copy.
-	Word_t	MSByte,		// most-significant byte, prefix to each Index.
-	Pvoid_t	Pjpm)		// for global accounting.
-{
-	Word_t	Pop1;		// Indexes in leaf.
-JUDYLCODE(Pjv_t Pjv3;)		// source object value area.
-
-	switch (JU_JPTYPE(Pjp))
-	{
-
-
-// JPLEAF3:
-
-	case cJU_JPLEAF3:
-	{
-	    uint8_t * PLeaf3 = (uint8_t *) P_JLL(Pjp->jp_Addr);
-
-	    Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-	    j__udyCopy3toW((PWord_t) Pjlw, PLeaf3, Pop1, MSByte);
-#ifdef JUDYL
-	    Pjv3 = JL_LEAF3VALUEAREA(PLeaf3, Pop1);
-	    JU_COPYMEM(PjvW, Pjv3, Pop1);
-#endif
-	    j__udyFreeJLL3((Pjll_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    return(Pop1);
-	}
-
-
-// JPIMMED_3_01:
-//
-// Note:  jp_DcdPopO has 3 bytes of Index (all but most significant byte), and
-// MSByte must be ord in.
-
-	case cJU_JPIMMED_3_01:
-	{
-	    Pjlw[0] = MSByte | JU_JPDCDPOP0(Pjp);		// see above.
-	    JUDYLCODE(PjvW[0] = Pjp->jp_Addr;)
-	    return(1);
-	}
-
-
-#ifdef JUDY1
-
-// JPIMMED_3_02:
-
-	case cJU_JPIMMED_3_02:
-	{
-	    uint8_t * PLeaf3 = (uint8_t *) (Pjp->jp_1Index);
-
-	    j__udyCopy3toW((PWord_t) Pjlw, PLeaf3, /* Pop1 = */ 2, MSByte);
-	    return(2);
-	}
-#endif // JUDY1
-
-
-// UNEXPECTED CASES, including JPNULL3, should be handled by caller:
-
-	default: assert(FALSE); break;
-
-	} // switch
-
-	return(0);
-
-} // j__udyLeaf3ToLeafW()
-
-
-#else // JU_64BIT
-
-
-// ****************************************************************************
-// __ J U D Y   L E A F   7   T O   L E A F   W
-//
-// Copy 7-byte Indexes from a Leaf7 to 8-byte Indexes in a LeafW.
-// Pjp MUST be one of:  cJU_JPLEAF7 or cJU_JPIMMED_7_*.
-// Return number of Indexes copied.
-//
-// Note:  By the time this function is called to compress a level-L branch to a
-// LeafW, the branch has no narrow pointers under it, meaning only level-7
-// objects are below it and must be handled here.
-
-FUNCTION Word_t  j__udyLeaf7ToLeafW(
-	Pjlw_t	Pjlw,		// destination Index part of leaf.
-#ifdef JUDYL
-	Pjv_t	PjvW,		// destination value part of leaf.
-#endif
-	Pjp_t	Pjp,		// 7-byte-index object from which to copy.
-	Word_t	MSByte,		// most-significant byte, prefix to each Index.
-	Pvoid_t	Pjpm)		// for global accounting.
-{
-	Word_t	Pop1;		// Indexes in leaf.
-JUDYLCODE(Pjv_t	Pjv7;)		// source object value area.
-
-	switch (JU_JPTYPE(Pjp))
-	{
-
-
-// JPLEAF7:
-
-	case cJU_JPLEAF7:
-	{
-	    uint8_t * PLeaf7 = (uint8_t *) P_JLL(Pjp->jp_Addr);
-
-	    Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-	    j__udyCopy7toW((PWord_t) Pjlw, PLeaf7, Pop1, MSByte);
-#ifdef JUDYL
-	    Pjv7 = JL_LEAF7VALUEAREA(PLeaf7, Pop1);
-	    JU_COPYMEM(PjvW, Pjv7, Pop1);
-#endif
-	    j__udyFreeJLL7((Pjll_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    return(Pop1);
-	}
-
-
-// JPIMMED_7_01:
-//
-// Note:  jp_DcdPopO has 7 bytes of Index (all but most significant byte), and
-// MSByte must be ord in.
-
-	case cJU_JPIMMED_7_01:
-	{
-	    Pjlw[0] = MSByte | JU_JPDCDPOP0(Pjp);		// see above.
-	    JUDYLCODE(PjvW[0] = Pjp->jp_Addr;)
-	    return(1);
-	}
-
-
-#ifdef JUDY1
-
-// JPIMMED_7_02:
-
-	case cJ1_JPIMMED_7_02:
-	{
-	    uint8_t * PLeaf7 = (uint8_t *) (Pjp->jp_1Index);
-
-	    j__udyCopy7toW((PWord_t) Pjlw, PLeaf7, /* Pop1 = */ 2, MSByte);
-	    return(2);
-	}
-#endif
-
-
-// UNEXPECTED CASES, including JPNULL7, should be handled by caller:
-
-	default: assert(FALSE); break;
-
-	} // switch
-
-	return(0);
-
-} // j__udyLeaf7ToLeafW()
-
-#endif // JU_64BIT
diff --git a/libs/klib/judy/JudyDel.c b/libs/klib/judy/JudyDel.c
deleted file mode 100644
index 4291da6..0000000
--- a/libs/klib/judy/JudyDel.c
+++ /dev/null
@@ -1,2144 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// Judy1Unset() and JudyLDel() functions for Judy1 and JudyL.
-// Compile with one of -DJUDY1 or -DJUDYL.
-//
-// About HYSTERESIS:  In the Judy code, hysteresis means leaving around a
-// nominally suboptimal (not maximally compressed) data structure after a
-// deletion.  As a result, the shape of the tree for two identical index sets
-// can differ depending on the insert/delete path taken to arrive at the index
-// sets.  The purpose is to minimize worst-case behavior (thrashing) that could
-// result from a series of intermixed insertions and deletions.  It also makes
-// for MUCH simpler code, because instead of performing, "delete and then
-// compress," it can say, "compress and then delete," where due to hysteresis,
-// compression is not even attempted until the object IS compressible.
-//
-// In some cases the code has no choice and it must "ungrow" a data structure
-// across a "phase transition" boundary without hysteresis.  In other cases the
-// amount (such as "hysteresis = 1") is indicated by the number of JP deletions
-// (in branches) or index deletions (in leaves) that can occur in succession
-// before compressing the data structure.  (It appears that hysteresis <= 1 in
-// all cases.)
-//
-// In general no hysteresis occurs when the data structure type remains the
-// same but the allocated memory chunk for the node must shrink, because the
-// relationship is hardwired and theres no way to know how much memory is
-// allocated to a given data structure.  Hysteresis = 0 in all these cases.
-//
-// TBD:  Could this code be faster if memory chunk hysteresis were supported
-// somehow along with data structure type hysteresis?
-//
-// TBD:  Should some of the assertions here be converted to product code that
-// returns JU_ERRNO_CORRUPT?
-//
-// TBD:  Dougs code had an odd mix of function-wide and limited-scope
-// variables.  Should some of the function-wide variables appear only in
-// limited scopes, or more likely, vice-versa?
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-DBGCODE(extern void JudyCheckPop(Pvoid_t PArray);)
-DBGCODE(extern void JudyCheckSorted(Pjll_t Pjll, Word_t Pop1, long IndexSize);)
-
-#ifdef TRACEJP
-#include "JudyPrintJP.c"
-#endif
-
-// These are defined to generic values in JudyCommon/JudyPrivateTypes.h:
-//
-// TBD:  These should be exported from a header file, but perhaps not, as they
-// are only used here, and exported from JudyDecascade.c, which is a separate
-// file for profiling reasons (to prevent inlining), but which potentially
-// could be merged with this file, either in SoftCM or at compile-time:
-
-#ifdef JUDY1
-
-extern int      j__udy1BranchBToBranchL(Pjp_t Pjp, Pvoid_t Pjpm);
-#ifndef JU_64BIT
-extern int      j__udy1LeafB1ToLeaf1(Pjp_t, Pvoid_t);
-#endif
-extern Word_t   j__udy1Leaf1ToLeaf2(uint16_t *, Pjp_t, Word_t, Pvoid_t);
-extern Word_t   j__udy1Leaf2ToLeaf3(uint8_t  *, Pjp_t, Word_t, Pvoid_t);
-#ifndef JU_64BIT
-extern Word_t   j__udy1Leaf3ToLeafW(Pjlw_t,     Pjp_t, Word_t, Pvoid_t);
-#else
-extern Word_t   j__udy1Leaf3ToLeaf4(uint32_t *, Pjp_t, Word_t, Pvoid_t);
-extern Word_t   j__udy1Leaf4ToLeaf5(uint8_t  *, Pjp_t, Word_t, Pvoid_t);
-extern Word_t   j__udy1Leaf5ToLeaf6(uint8_t  *, Pjp_t, Word_t, Pvoid_t);
-extern Word_t   j__udy1Leaf6ToLeaf7(uint8_t  *, Pjp_t, Word_t, Pvoid_t);
-extern Word_t   j__udy1Leaf7ToLeafW(Pjlw_t,     Pjp_t, Word_t, Pvoid_t);
-#endif
-
-#else // JUDYL
-
-extern int      j__udyLBranchBToBranchL(Pjp_t Pjp, Pvoid_t Pjpm);
-extern int      j__udyLLeafB1ToLeaf1(Pjp_t, Pvoid_t);
-extern Word_t   j__udyLLeaf1ToLeaf2(uint16_t *, Pjv_t, Pjp_t, Word_t, Pvoid_t);
-extern Word_t   j__udyLLeaf2ToLeaf3(uint8_t  *, Pjv_t, Pjp_t, Word_t, Pvoid_t);
-#ifndef JU_64BIT
-extern Word_t   j__udyLLeaf3ToLeafW(Pjlw_t,     Pjv_t, Pjp_t, Word_t, Pvoid_t);
-#else
-extern Word_t   j__udyLLeaf3ToLeaf4(uint32_t *, Pjv_t, Pjp_t, Word_t, Pvoid_t);
-extern Word_t   j__udyLLeaf4ToLeaf5(uint8_t  *, Pjv_t, Pjp_t, Word_t, Pvoid_t);
-extern Word_t   j__udyLLeaf5ToLeaf6(uint8_t  *, Pjv_t, Pjp_t, Word_t, Pvoid_t);
-extern Word_t   j__udyLLeaf6ToLeaf7(uint8_t  *, Pjv_t, Pjp_t, Word_t, Pvoid_t);
-extern Word_t   j__udyLLeaf7ToLeafW(Pjlw_t,     Pjv_t, Pjp_t, Word_t, Pvoid_t);
-#endif
-
-#endif // JUDYL
-
-// For convenience in the calling code; "M1" means "minus one":
-
-#ifndef JU_64BIT
-#define j__udyLeafM1ToLeafW j__udyLeaf3ToLeafW
-#else
-#define j__udyLeafM1ToLeafW j__udyLeaf7ToLeafW
-#endif
-
-
-// ****************************************************************************
-// __ J U D Y   D E L   W A L K
-//
-// Given a pointer to a JP, an Index known to be valid, the number of bytes
-// left to decode (== level in the tree), and a pointer to a global JPM, walk a
-// Judy (sub)tree to do an unset/delete of that index, and possibly modify the
-// JPM.  This function is only called internally, and recursively.  Unlike
-// Judy1Test() and JudyLGet(), the extra time required for recursion should be
-// negligible compared with the total.
-//
-// Return values:
-//
-// -1 error; details in JPM
-//
-//  0 Index already deleted (should never happen, Index is known to be valid)
-//
-//  1 previously valid Index deleted
-//
-//  2 same as 1, but in addition the JP now points to a BranchL containing a
-//    single JP, which should be compressed into the parent branch (if there
-//    is one, which is not the case for a top-level branch under a JPM)
-
-DBGCODE(uint8_t parentJPtype;)          // parent branch JP type.
-
-FUNCTION static int j__udyDelWalk(
-        Pjp_t   Pjp,            // current JP under which to delete.
-        Word_t  Index,          // to delete.
-        Word_t  ParentLevel,    // of parent branch.
-        Pjpm_t  Pjpm)           // for returning info to top level.
-{
-        Word_t  pop1;           // of a leaf.
-        Word_t  level;          // of a leaf.
-        uint8_t digit;          // from Index, in current branch.
-        Pjll_t  PjllnewRaw;     // address of newly allocated leaf.
-        Pjll_t  Pjllnew;
-        int     offset;         // within a branch.
-        int     retcode;        // return code: -1, 0, 1, 2.
-JUDYLCODE(Pjv_t PjvRaw;)        // value area.
-JUDYLCODE(Pjv_t Pjv;)
-
-        DBGCODE(level = 0;)
-
-ContinueDelWalk:                // for modifying state without recursing.
-
-#ifdef TRACEJP
-        JudyPrintJP(Pjp, "d", __LINE__);
-#endif
-
-        switch (JU_JPTYPE(Pjp)) // entry:  Pjp, Index.
-        {
-
-
-// ****************************************************************************
-// LINEAR BRANCH:
-//
-// MACROS FOR COMMON CODE:
-//
-// Check for population too high to compress a branch to a leaf, meaning just
-// descend through the branch, with a purposeful off-by-one error that
-// constitutes hysteresis = 1.  In other words, do not compress until the
-// branchs CURRENT population fits in the leaf, even BEFORE deleting one
-// index.
-//
-// Next is a label for branch-type-specific common code.  Variables pop1,
-// level, digit, and Index are in the context.
-
-#define JU_BRANCH_KEEP(cLevel,MaxPop1,Next)             \
-        if (pop1 > (MaxPop1))   /* hysteresis = 1 */    \
-        {                                               \
-            assert((cLevel) >= 2);                      \
-            level = (cLevel);                           \
-            digit = JU_DIGITATSTATE(Index, cLevel);     \
-            goto Next;                                  \
-        }
-
-// Support for generic calling of JudyLeaf*ToLeaf*() functions:
-//
-// Note:  Cannot use JUDYLCODE() because this contains a comma.
-
-#ifdef JUDY1
-#define JU_PVALUEPASS  // null.
-#else
-#define JU_PVALUEPASS  Pjv,
-#endif
-
-// During compression to a leaf, check if a JP contains nothing but a
-// cJU_JPIMMED_*_01, in which case shortcut calling j__udyLeaf*ToLeaf*():
-//
-// Copy the index bytes from the jp_DcdPopO field (with possible truncation),
-// and continue the branch-JP-walk loop.  Variables Pjp and Pleaf are in the
-// context.
-
-#define JU_BRANCH_COPY_IMMED_EVEN(cLevel,Pjp,ignore)            \
-        if (JU_JPTYPE(Pjp) == cJU_JPIMMED_1_01 + (cLevel) - 2)  \
-        {                                                       \
-            *Pleaf++ = JU_JPDCDPOP0(Pjp);                       \
-  JUDYLCODE(*Pjv++   = (Pjp)->jp_Addr;)                         \
-            continue;   /* for-loop */                          \
-        }
-
-#define JU_BRANCH_COPY_IMMED_ODD(cLevel,Pjp,CopyIndex)          \
-        if (JU_JPTYPE(Pjp) == cJU_JPIMMED_1_01 + (cLevel) - 2)  \
-        {                                                       \
-            CopyIndex(Pleaf, (Word_t) (JU_JPDCDPOP0(Pjp)));     \
-            Pleaf += (cLevel);  /* index size = level */        \
-  JUDYLCODE(*Pjv++ = (Pjp)->jp_Addr;)                           \
-            continue;   /* for-loop */                          \
-        }
-
-// Compress a BranchL into a leaf one index size larger:
-//
-// Allocate a new leaf, walk the JPs in the old BranchL and pack their contents
-// into the new leaf (of type NewJPType), free the old BranchL, and finally
-// restart the switch to delete Index from the new leaf.  (Note that all
-// BranchLs are the same size.)  Variables Pjp, Pjpm, Pleaf, digit, and pop1
-// are in the context.
-
-#define JU_BRANCHL_COMPRESS(cLevel,LeafType,MaxPop1,NewJPType,          \
-                            LeafToLeaf,Alloc,ValueArea,                 \
-                            CopyImmed,CopyIndex)                        \
-        {                                                               \
-            LeafType Pleaf;                                             \
-            Pjbl_t   PjblRaw;                                           \
-            Pjbl_t   Pjbl;                                              \
-            Word_t   numJPs;                                            \
-                                                                        \
-            if ((PjllnewRaw = Alloc(MaxPop1, Pjpm)) == 0) return(-1);   \
-            Pjllnew = P_JLL(PjllnewRaw);                                \
-            Pleaf   = (LeafType) Pjllnew;                               \
-  JUDYLCODE(Pjv     = ValueArea(Pleaf, MaxPop1);)                       \
-                                                                        \
-            PjblRaw = (Pjbl_t) (Pjp->jp_Addr);                          \
-            Pjbl    = P_JBL(PjblRaw);                                   \
-            numJPs  = Pjbl->jbl_NumJPs;                                 \
-                                                                        \
-            for (offset = 0; offset < numJPs; ++offset)                 \
-            {                                                           \
-                CopyImmed(cLevel, (Pjbl->jbl_jp) + offset, CopyIndex);  \
-                                                                        \
-                pop1 = LeafToLeaf(Pleaf, JU_PVALUEPASS                  \
-                          (Pjbl->jbl_jp) + offset,                      \
-                          JU_DIGITTOSTATE(Pjbl->jbl_Expanse[offset],    \
-                          cLevel), (Pvoid_t) Pjpm);                     \
-                Pleaf = (LeafType) (((Word_t) Pleaf) + ((cLevel) * pop1)); \
-      JUDYLCODE(Pjv  += pop1;)                                          \
-            }                                                           \
-            assert(((((Word_t) Pleaf) - ((Word_t) Pjllnew)) / (cLevel)) == (MaxPop1)); \
-  JUDYLCODE(assert((Pjv - ValueArea(Pjllnew, MaxPop1)) == (MaxPop1));)  \
-            DBGCODE(JudyCheckSorted(Pjllnew, MaxPop1, cLevel);)         \
-                                                                        \
-            j__udyFreeJBL(PjblRaw, Pjpm);                               \
-                                                                        \
-            Pjp->jp_Type = (NewJPType);                                 \
-            Pjp->jp_Addr = (Word_t) PjllnewRaw;                         \
-            goto ContinueDelWalk;       /* delete from new leaf */      \
-        }
-
-// Overall common code for initial BranchL deletion handling:
-//
-// Assert that Index is in the branch, then see if the BranchL should be kept
-// or else compressed to a leaf.  Variables Index, Pjp, and pop1 are in the
-// context.
-
-#define JU_BRANCHL(cLevel,MaxPop1,LeafType,NewJPType,                   \
-                   LeafToLeaf,Alloc,ValueArea,CopyImmed,CopyIndex)      \
-                                                                        \
-        assert(! JU_DCDNOTMATCHINDEX(Index, Pjp, cLevel));              \
-        assert(ParentLevel > (cLevel));                                 \
-                                                                        \
-        pop1 = JU_JPBRANCH_POP0(Pjp, cLevel) + 1;                       \
-        JU_BRANCH_KEEP(cLevel, MaxPop1, BranchLKeep);                   \
-        assert(pop1 == (MaxPop1));                                      \
-                                                                        \
-        JU_BRANCHL_COMPRESS(cLevel, LeafType, MaxPop1, NewJPType,       \
-                            LeafToLeaf, Alloc, ValueArea, CopyImmed, CopyIndex)
-
-
-// END OF MACROS, START OF CASES:
-
-        case cJU_JPBRANCH_L2:
-
-            JU_BRANCHL(2, cJU_LEAF2_MAXPOP1, uint16_t *, cJU_JPLEAF2,
-                       j__udyLeaf1ToLeaf2, j__udyAllocJLL2, JL_LEAF2VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_EVEN, ignore);
-
-        case cJU_JPBRANCH_L3:
-
-            JU_BRANCHL(3, cJU_LEAF3_MAXPOP1, uint8_t *, cJU_JPLEAF3,
-                       j__udyLeaf2ToLeaf3, j__udyAllocJLL3, JL_LEAF3VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_ODD, JU_COPY3_LONG_TO_PINDEX);
-
-#ifdef JU_64BIT
-        case cJU_JPBRANCH_L4:
-
-            JU_BRANCHL(4, cJU_LEAF4_MAXPOP1, uint32_t *, cJU_JPLEAF4,
-                       j__udyLeaf3ToLeaf4, j__udyAllocJLL4, JL_LEAF4VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_EVEN, ignore);
-
-        case cJU_JPBRANCH_L5:
-
-            JU_BRANCHL(5, cJU_LEAF5_MAXPOP1, uint8_t *, cJU_JPLEAF5,
-                       j__udyLeaf4ToLeaf5, j__udyAllocJLL5, JL_LEAF5VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_ODD, JU_COPY5_LONG_TO_PINDEX);
-
-        case cJU_JPBRANCH_L6:
-
-            JU_BRANCHL(6, cJU_LEAF6_MAXPOP1, uint8_t *, cJU_JPLEAF6,
-                       j__udyLeaf5ToLeaf6, j__udyAllocJLL6, JL_LEAF6VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_ODD, JU_COPY6_LONG_TO_PINDEX);
-
-        case cJU_JPBRANCH_L7:
-
-            JU_BRANCHL(7, cJU_LEAF7_MAXPOP1, uint8_t *, cJU_JPLEAF7,
-                       j__udyLeaf6ToLeaf7, j__udyAllocJLL7, JL_LEAF7VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_ODD, JU_COPY7_LONG_TO_PINDEX);
-#endif // JU_64BIT
-
-// A top-level BranchL is different and cannot use JU_BRANCHL():  Dont try to
-// compress to a (LEAFW) leaf yet, but leave this for a later deletion
-// (hysteresis > 0); and the next JP type depends on the system word size; so
-// dont use JU_BRANCH_KEEP():
-
-        case cJU_JPBRANCH_L:
-        {
-            Pjbl_t Pjbl;
-            Word_t numJPs;
-
-            level = cJU_ROOTSTATE;
-            digit = JU_DIGITATSTATE(Index, cJU_ROOTSTATE);
-
-            // fall through:
-
-
-// COMMON CODE FOR KEEPING AND DESCENDING THROUGH A BRANCHL:
-//
-// Come here with level and digit set.
-
-BranchLKeep:
-            Pjbl   = P_JBL(Pjp->jp_Addr);
-            numJPs = Pjbl->jbl_NumJPs;
-            assert(numJPs > 0);
-            DBGCODE(parentJPtype = JU_JPTYPE(Pjp);)
-
-// Search for a match to the digit (valid Index => must find digit):
-
-            for (offset = 0; (Pjbl->jbl_Expanse[offset]) != digit; ++offset)
-                assert(offset < numJPs - 1);
-
-            Pjp = (Pjbl->jbl_jp) + offset;
-
-// If not at a (deletable) JPIMMED_*_01, continue the walk (to descend through
-// the BranchL):
-
-            assert(level >= 2);
-            if ((JU_JPTYPE(Pjp)) != cJU_JPIMMED_1_01 + level - 2) break;
-
-// At JPIMMED_*_01:  Ensure the index is in the right expanse, then delete the
-// Immed from the BranchL:
-//
-// Note:  A BranchL has a fixed size and format regardless of numJPs.
-
-            assert(JU_JPDCDPOP0(Pjp) == JU_TRIMTODCDSIZE(Index));
-
-            JU_DELETEINPLACE(Pjbl->jbl_Expanse, numJPs, offset, ignore);
-            JU_DELETEINPLACE(Pjbl->jbl_jp,      numJPs, offset, ignore);
-
-            DBGCODE(JudyCheckSorted((Pjll_t) (Pjbl->jbl_Expanse),
-                                    numJPs - 1, 1);)
-
-// If only one index left in the BranchL, indicate this to the caller:
-
-            return ((--(Pjbl->jbl_NumJPs) <= 1) ? 2 : 1);
-
-        } // case cJU_JPBRANCH_L.
-
-
-// ****************************************************************************
-// BITMAP BRANCH:
-//
-// MACROS FOR COMMON CODE:
-//
-// Note the reuse of common macros here, defined earlier:  JU_BRANCH_KEEP(),
-// JU_PVALUE*.
-//
-// Compress a BranchB into a leaf one index size larger:
-//
-// Allocate a new leaf, walk the JPs in the old BranchB (one bitmap subexpanse
-// at a time) and pack their contents into the new leaf (of type NewJPType),
-// free the old BranchB, and finally restart the switch to delete Index from
-// the new leaf.  Variables Pjp, Pjpm, Pleaf, digit, and pop1 are in the
-// context.
-//
-// Note:  Its no accident that the interface to JU_BRANCHB_COMPRESS() is
-// identical to JU_BRANCHL_COMPRESS().  Only the details differ in how to
-// traverse the branchs JPs.
-
-#define JU_BRANCHB_COMPRESS(cLevel,LeafType,MaxPop1,NewJPType,          \
-                            LeafToLeaf,Alloc,ValueArea,                 \
-                            CopyImmed,CopyIndex)                        \
-        {                                                               \
-            LeafType  Pleaf;                                            \
-            Pjbb_t    PjbbRaw;  /* BranchB to compress */               \
-            Pjbb_t    Pjbb;                                             \
-            Word_t    subexp;   /* current subexpanse number    */      \
-            BITMAPB_t bitmap;   /* portion for this subexpanse  */      \
-            Pjp_t     Pjp2Raw;  /* one subexpanses subarray     */      \
-            Pjp_t     Pjp2;                                             \
-                                                                        \
-            if ((PjllnewRaw = Alloc(MaxPop1, Pjpm)) == 0) return(-1);   \
-            Pjllnew = P_JLL(PjllnewRaw);                                \
-            Pleaf   = (LeafType) Pjllnew;                               \
-  JUDYLCODE(Pjv     = ValueArea(Pleaf, MaxPop1);)                       \
-                                                                        \
-            PjbbRaw = (Pjbb_t) (Pjp->jp_Addr);                          \
-            Pjbb    = P_JBB(PjbbRaw);                                   \
-                                                                        \
-            for (subexp = 0; subexp < cJU_NUMSUBEXPB; ++subexp)         \
-            {                                                           \
-                if ((bitmap = JU_JBB_BITMAP(Pjbb, subexp)) == 0)        \
-                    continue;           /* empty subexpanse */          \
-                                                                        \
-                digit   = subexp * cJU_BITSPERSUBEXPB;                  \
-                Pjp2Raw = JU_JBB_PJP(Pjbb, subexp);                     \
-                Pjp2    = P_JP(Pjp2Raw);                                \
-                assert(Pjp2 != (Pjp_t) NULL);                           \
-                                                                        \
-                for (offset = 0; bitmap != 0; bitmap >>= 1, ++digit)    \
-                {                                                       \
-                    if (! (bitmap & 1))                                 \
-                        continue;       /* empty sub-subexpanse */      \
-                                                                        \
-                    ++offset;           /* before any continue */       \
-                                                                        \
-                    CopyImmed(cLevel, Pjp2 + offset - 1, CopyIndex);    \
-                                                                        \
-                    pop1 = LeafToLeaf(Pleaf, JU_PVALUEPASS              \
-                                      Pjp2 + offset - 1,                \
-                                      JU_DIGITTOSTATE(digit, cLevel),   \
-                                      (Pvoid_t) Pjpm);                  \
-                    Pleaf = (LeafType) (((Word_t) Pleaf) + ((cLevel) * pop1)); \
-          JUDYLCODE(Pjv  += pop1;)                                      \
-                }                                                       \
-                j__udyFreeJBBJP(Pjp2Raw, /* pop1 = */ offset, Pjpm);    \
-            }                                                           \
-            assert(((((Word_t) Pleaf) - ((Word_t) Pjllnew)) / (cLevel)) == (MaxPop1)); \
-  JUDYLCODE(assert((Pjv - ValueArea(Pjllnew, MaxPop1)) == (MaxPop1));)  \
-            DBGCODE(JudyCheckSorted(Pjllnew, MaxPop1, cLevel);)         \
-                                                                        \
-            j__udyFreeJBB(PjbbRaw, Pjpm);                               \
-                                                                        \
-            Pjp->jp_Type = (NewJPType);                                 \
-            Pjp->jp_Addr = (Word_t) PjllnewRaw;                         \
-            goto ContinueDelWalk;       /* delete from new leaf */      \
-        }
-
-// Overall common code for initial BranchB deletion handling:
-//
-// Assert that Index is in the branch, then see if the BranchB should be kept
-// or else compressed to a leaf.  Variables Index, Pjp, and pop1 are in the
-// context.
-
-#define JU_BRANCHB(cLevel,MaxPop1,LeafType,NewJPType,                   \
-                   LeafToLeaf,Alloc,ValueArea,CopyImmed,CopyIndex)      \
-                                                                        \
-        assert(! JU_DCDNOTMATCHINDEX(Index, Pjp, cLevel));              \
-        assert(ParentLevel > (cLevel));                                 \
-                                                                        \
-        pop1 = JU_JPBRANCH_POP0(Pjp, cLevel) + 1;                       \
-        JU_BRANCH_KEEP(cLevel, MaxPop1, BranchBKeep);                   \
-        assert(pop1 == (MaxPop1));                                      \
-                                                                        \
-        JU_BRANCHB_COMPRESS(cLevel, LeafType, MaxPop1, NewJPType,       \
-                            LeafToLeaf, Alloc, ValueArea, CopyImmed, CopyIndex)
-
-
-// END OF MACROS, START OF CASES:
-//
-// Note:  Its no accident that the macro calls for these cases is nearly
-// identical to the code for BranchLs.
-
-        case cJU_JPBRANCH_B2:
-
-            JU_BRANCHB(2, cJU_LEAF2_MAXPOP1, uint16_t *, cJU_JPLEAF2,
-                       j__udyLeaf1ToLeaf2, j__udyAllocJLL2, JL_LEAF2VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_EVEN, ignore);
-
-        case cJU_JPBRANCH_B3:
-
-            JU_BRANCHB(3, cJU_LEAF3_MAXPOP1, uint8_t *, cJU_JPLEAF3,
-                       j__udyLeaf2ToLeaf3, j__udyAllocJLL3, JL_LEAF3VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_ODD, JU_COPY3_LONG_TO_PINDEX);
-
-#ifdef JU_64BIT
-        case cJU_JPBRANCH_B4:
-
-            JU_BRANCHB(4, cJU_LEAF4_MAXPOP1, uint32_t *, cJU_JPLEAF4,
-                       j__udyLeaf3ToLeaf4, j__udyAllocJLL4, JL_LEAF4VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_EVEN, ignore);
-
-        case cJU_JPBRANCH_B5:
-
-            JU_BRANCHB(5, cJU_LEAF5_MAXPOP1, uint8_t *, cJU_JPLEAF5,
-                       j__udyLeaf4ToLeaf5, j__udyAllocJLL5, JL_LEAF5VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_ODD, JU_COPY5_LONG_TO_PINDEX);
-
-        case cJU_JPBRANCH_B6:
-
-            JU_BRANCHB(6, cJU_LEAF6_MAXPOP1, uint8_t *, cJU_JPLEAF6,
-                       j__udyLeaf5ToLeaf6, j__udyAllocJLL6, JL_LEAF6VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_ODD, JU_COPY6_LONG_TO_PINDEX);
-
-        case cJU_JPBRANCH_B7:
-
-            JU_BRANCHB(7, cJU_LEAF7_MAXPOP1, uint8_t *, cJU_JPLEAF7,
-                       j__udyLeaf6ToLeaf7, j__udyAllocJLL7, JL_LEAF7VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_ODD, JU_COPY7_LONG_TO_PINDEX);
-#endif // JU_64BIT
-
-// A top-level BranchB is different and cannot use JU_BRANCHB():  Dont try to
-// compress to a (LEAFW) leaf yet, but leave this for a later deletion
-// (hysteresis > 0); and the next JP type depends on the system word size; so
-// dont use JU_BRANCH_KEEP():
-
-        case cJU_JPBRANCH_B:
-        {
-            Pjbb_t    Pjbb;             // BranchB to modify.
-            Word_t    subexp;           // current subexpanse number.
-            Word_t    subexp2;          // in second-level loop.
-            BITMAPB_t bitmap;           // portion for this subexpanse.
-            BITMAPB_t bitmask;          // with digits bit set.
-            Pjp_t     Pjp2Raw;          // one subexpanses subarray.
-            Pjp_t     Pjp2;
-            Word_t    numJPs;           // in one subexpanse.
-
-            level = cJU_ROOTSTATE;
-            digit = JU_DIGITATSTATE(Index, cJU_ROOTSTATE);
-
-            // fall through:
-
-
-// COMMON CODE FOR KEEPING AND DESCENDING THROUGH A BRANCHB:
-//
-// Come here with level and digit set.
-
-BranchBKeep:
-            Pjbb    = P_JBB(Pjp->jp_Addr);
-            subexp  = digit / cJU_BITSPERSUBEXPB;
-            bitmap  = JU_JBB_BITMAP(Pjbb, subexp);
-            bitmask = JU_BITPOSMASKB(digit);
-            assert(bitmap & bitmask);   // Index valid => digits bit is set.
-            DBGCODE(parentJPtype = JU_JPTYPE(Pjp);)
-
-// Compute digits offset into the bitmap, with a fast method if all bits are
-// set:
-
-            offset = ((bitmap == (cJU_FULLBITMAPB)) ?
-                      digit % cJU_BITSPERSUBEXPB :
-                      j__udyCountBitsB(bitmap & JU_MASKLOWEREXC(bitmask)));
-
-            Pjp2Raw = JU_JBB_PJP(Pjbb, subexp);
-            Pjp2    = P_JP(Pjp2Raw);
-            assert(Pjp2 != (Pjp_t) NULL);       // valid subexpanse pointer.
-
-// If not at a (deletable) JPIMMED_*_01, continue the walk (to descend through
-// the BranchB):
-
-            if (JU_JPTYPE(Pjp2 + offset) != cJU_JPIMMED_1_01 + level - 2)
-            {
-                Pjp = Pjp2 + offset;
-                break;
-            }
-
-// At JPIMMED_*_01:  Ensure the index is in the right expanse, then delete the
-// Immed from the BranchB:
-
-            assert(JU_JPDCDPOP0(Pjp2 + offset)
-                   == JU_TRIMTODCDSIZE(Index));
-
-// If only one index is left in the subexpanse, free the JP array:
-
-            if ((numJPs = j__udyCountBitsB(bitmap)) == 1)
-            {
-                j__udyFreeJBBJP(Pjp2Raw, /* pop1 = */ 1, Pjpm);
-                JU_JBB_PJP(Pjbb, subexp) = (Pjp_t) NULL;
-            }
-
-// Shrink JP array in-place:
-
-            else if (JU_BRANCHBJPGROWINPLACE(numJPs - 1))
-            {
-                assert(numJPs > 0);
-                JU_DELETEINPLACE(Pjp2, numJPs, offset, ignore);
-            }
-
-// JP array would end up too large; compress it to a smaller one:
-
-            else
-            {
-                Pjp_t PjpnewRaw;
-                Pjp_t Pjpnew;
-
-                if ((PjpnewRaw = j__udyAllocJBBJP(numJPs - 1, Pjpm))
-                 == (Pjp_t) NULL) return(-1);
-                Pjpnew = P_JP(PjpnewRaw);
-
-                JU_DELETECOPY(Pjpnew, Pjp2, numJPs, offset, ignore);
-                j__udyFreeJBBJP(Pjp2Raw, numJPs, Pjpm);         // old.
-
-                JU_JBB_PJP(Pjbb, subexp) = PjpnewRaw;
-            }
-
-// Clear digits bit in the bitmap:
-
-            JU_JBB_BITMAP(Pjbb, subexp) ^= bitmask;
-
-// If the current subexpanse alone is still too large for a BranchL (with
-// hysteresis = 1), the delete is all done:
-
-            if (numJPs > cJU_BRANCHLMAXJPS) return(1);
-
-// Consider shrinking the current BranchB to a BranchL:
-//
-// Check the numbers of JPs in other subexpanses in the BranchL.  Upon reaching
-// the critical number of numJPs (which could be right at the start; again,
-// with hysteresis = 1), its faster to just watch for any non-empty subexpanse
-// than to count bits in each subexpanse.  Upon finding too many JPs, give up
-// on shrinking the BranchB.
-
-            for (subexp2 = 0; subexp2 < cJU_NUMSUBEXPB; ++subexp2)
-            {
-                if (subexp2 == subexp) continue;  // skip current subexpanse.
-
-                if ((numJPs == cJU_BRANCHLMAXJPS) ?
-                    JU_JBB_BITMAP(Pjbb, subexp2) :
-                    ((numJPs += j__udyCountBitsB(JU_JBB_BITMAP(Pjbb, subexp2)))
-                     > cJU_BRANCHLMAXJPS))
-                {
-                    return(1);          // too many JPs, cannot shrink.
-                }
-            }
-
-// Shrink current BranchB to a BranchL:
-//
-// Note:  In this rare case, ignore the return value, do not pass it to the
-// caller, because the deletion is already successfully completed and the
-// caller(s) must decrement population counts.  The only errors expected from
-// this call are JU_ERRNO_NOMEM and JU_ERRNO_OVERRUN, neither of which is worth
-// forwarding from this point.  See also 4.1, 4.8, and 4.15 of this file.
-
-            (void) j__udyBranchBToBranchL(Pjp, Pjpm);
-            return(1);
-
-        } // case.
-
-
-// ****************************************************************************
-// UNCOMPRESSED BRANCH:
-//
-// MACROS FOR COMMON CODE:
-//
-// Note the reuse of common macros here, defined earlier:  JU_PVALUE*.
-//
-// Compress a BranchU into a leaf one index size larger:
-//
-// Allocate a new leaf, walk the JPs in the old BranchU and pack their contents
-// into the new leaf (of type NewJPType), free the old BranchU, and finally
-// restart the switch to delete Index from the new leaf.  Variables Pjp, Pjpm,
-// digit, and pop1 are in the context.
-//
-// Note:  Its no accident that the interface to JU_BRANCHU_COMPRESS() is
-// nearly identical to JU_BRANCHL_COMPRESS(); just NullJPType is added.  The
-// details differ in how to traverse the branchs JPs --
-//
-// -- and also, what to do upon encountering a cJU_JPIMMED_*_01 JP.  In
-// BranchLs and BranchBs the JP must be deleted, but in a BranchU its merely
-// converted to a null JP, and this is done by other switch cases, so the "keep
-// branch" situation is simpler here and JU_BRANCH_KEEP() is not used.  Also,
-// theres no code to convert a BranchU to a BranchB since counting the JPs in
-// a BranchU is (at least presently) expensive, and besides, keeping around a
-// BranchU is form of hysteresis.
-
-#define JU_BRANCHU_COMPRESS(cLevel,LeafType,MaxPop1,NullJPType,NewJPType,   \
-                            LeafToLeaf,Alloc,ValueArea,CopyImmed,CopyIndex) \
-        {                                                               \
-            LeafType Pleaf;                                             \
-            Pjbu_t PjbuRaw = (Pjbu_t) (Pjp->jp_Addr);                   \
-            Pjp_t  Pjp2    = JU_JBU_PJP0(Pjp);                          \
-            Word_t ldigit;      /* larger than uint8_t */               \
-                                                                        \
-            if ((PjllnewRaw = Alloc(MaxPop1, Pjpm)) == 0) return(-1);   \
-            Pjllnew = P_JLL(PjllnewRaw);                                \
-            Pleaf   = (LeafType) Pjllnew;                               \
-  JUDYLCODE(Pjv     = ValueArea(Pleaf, MaxPop1);)                       \
-                                                                        \
-            for (ldigit = 0; ldigit < cJU_BRANCHUNUMJPS; ++ldigit, ++Pjp2) \
-            {                                                           \
-                /* fast-process common types: */                        \
-                if (JU_JPTYPE(Pjp2) == (NullJPType)) continue;          \
-                CopyImmed(cLevel, Pjp2, CopyIndex);                     \
-                                                                        \
-                pop1 = LeafToLeaf(Pleaf, JU_PVALUEPASS Pjp2,            \
-                                  JU_DIGITTOSTATE(ldigit, cLevel),      \
-                                  (Pvoid_t) Pjpm);                      \
-                Pleaf = (LeafType) (((Word_t) Pleaf) + ((cLevel) * pop1)); \
-      JUDYLCODE(Pjv  += pop1;)                                          \
-            }                                                           \
-            assert(((((Word_t) Pleaf) - ((Word_t) Pjllnew)) / (cLevel)) == (MaxPop1)); \
-  JUDYLCODE(assert((Pjv - ValueArea(Pjllnew, MaxPop1)) == (MaxPop1));)  \
-            DBGCODE(JudyCheckSorted(Pjllnew, MaxPop1, cLevel);)         \
-                                                                        \
-            j__udyFreeJBU(PjbuRaw, Pjpm);                               \
-                                                                        \
-            Pjp->jp_Type = (NewJPType);                                 \
-            Pjp->jp_Addr = (Word_t) PjllnewRaw;                         \
-            goto ContinueDelWalk;       /* delete from new leaf */      \
-        }
-
-// Overall common code for initial BranchU deletion handling:
-//
-// Assert that Index is in the branch, then see if a BranchU should be kept or
-// else compressed to a leaf.  Variables level, Index, Pjp, and pop1 are in the
-// context.
-//
-// Note:  BranchU handling differs from BranchL and BranchB as described above.
-
-#define JU_BRANCHU(cLevel,MaxPop1,LeafType,NullJPType,NewJPType,        \
-                   LeafToLeaf,Alloc,ValueArea,CopyImmed,CopyIndex)      \
-                                                                        \
-        assert(! JU_DCDNOTMATCHINDEX(Index, Pjp, cLevel));              \
-        assert(ParentLevel > (cLevel));                                 \
-        DBGCODE(parentJPtype = JU_JPTYPE(Pjp);)                         \
-                                                                        \
-        pop1 = JU_JPBRANCH_POP0(Pjp, cLevel) + 1;                       \
-                                                                        \
-        if (pop1 > (MaxPop1))   /* hysteresis = 1 */                    \
-        {                                                               \
-            level = (cLevel);                                           \
-            Pjp   = P_JP(Pjp->jp_Addr) + JU_DIGITATSTATE(Index, cLevel);\
-            break;              /* descend to next level */             \
-        }                                                               \
-        assert(pop1 == (MaxPop1));                                      \
-                                                                        \
-        JU_BRANCHU_COMPRESS(cLevel, LeafType, MaxPop1, NullJPType, NewJPType, \
-                            LeafToLeaf, Alloc, ValueArea, CopyImmed, CopyIndex)
-
-
-// END OF MACROS, START OF CASES:
-//
-// Note:  Its no accident that the macro calls for these cases is nearly
-// identical to the code for BranchLs, with the addition of cJU_JPNULL*
-// parameters only needed for BranchUs.
-
-        case cJU_JPBRANCH_U2:
-
-            JU_BRANCHU(2, cJU_LEAF2_MAXPOP1, uint16_t *,
-                       cJU_JPNULL1, cJU_JPLEAF2,
-                       j__udyLeaf1ToLeaf2, j__udyAllocJLL2, JL_LEAF2VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_EVEN, ignore);
-
-        case cJU_JPBRANCH_U3:
-
-            JU_BRANCHU(3, cJU_LEAF3_MAXPOP1, uint8_t *,
-                       cJU_JPNULL2, cJU_JPLEAF3,
-                       j__udyLeaf2ToLeaf3, j__udyAllocJLL3, JL_LEAF3VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_ODD, JU_COPY3_LONG_TO_PINDEX);
-
-#ifdef JU_64BIT
-        case cJU_JPBRANCH_U4:
-
-            JU_BRANCHU(4, cJU_LEAF4_MAXPOP1, uint32_t *,
-                       cJU_JPNULL3, cJU_JPLEAF4,
-                       j__udyLeaf3ToLeaf4, j__udyAllocJLL4, JL_LEAF4VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_EVEN, ignore);
-
-        case cJU_JPBRANCH_U5:
-
-            JU_BRANCHU(5, cJU_LEAF5_MAXPOP1, uint8_t *,
-                       cJU_JPNULL4, cJU_JPLEAF5,
-                       j__udyLeaf4ToLeaf5, j__udyAllocJLL5, JL_LEAF5VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_ODD, JU_COPY5_LONG_TO_PINDEX);
-
-        case cJU_JPBRANCH_U6:
-
-            JU_BRANCHU(6, cJU_LEAF6_MAXPOP1, uint8_t *,
-                       cJU_JPNULL5, cJU_JPLEAF6,
-                       j__udyLeaf5ToLeaf6, j__udyAllocJLL6, JL_LEAF6VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_ODD, JU_COPY6_LONG_TO_PINDEX);
-
-        case cJU_JPBRANCH_U7:
-
-            JU_BRANCHU(7, cJU_LEAF7_MAXPOP1, uint8_t *,
-                       cJU_JPNULL6, cJU_JPLEAF7,
-                       j__udyLeaf6ToLeaf7, j__udyAllocJLL7, JL_LEAF7VALUEAREA,
-                       JU_BRANCH_COPY_IMMED_ODD, JU_COPY7_LONG_TO_PINDEX);
-#endif // JU_64BIT
-
-// A top-level BranchU is different and cannot use JU_BRANCHU():  Dont try to
-// compress to a (LEAFW) leaf yet, but leave this for a later deletion
-// (hysteresis > 0); just descend through the BranchU:
-
-        case cJU_JPBRANCH_U:
-
-            DBGCODE(parentJPtype = JU_JPTYPE(Pjp);)
-
-            level = cJU_ROOTSTATE;
-            Pjp   = P_JP(Pjp->jp_Addr) + JU_DIGITATSTATE(Index, cJU_ROOTSTATE);
-            break;
-
-
-// ****************************************************************************
-// LINEAR LEAF:
-//
-// State transitions while deleting an Index, the inverse of the similar table
-// that appears in JudyIns.c:
-//
-// Note:  In JudyIns.c this table is not needed and does not appear until the
-// Immed handling code; because once a Leaf is reached upon growing the tree,
-// the situation remains simpler, but for deleting indexes, the complexity
-// arises when leaves must compress to Immeds.
-//
-// Note:  There are other transitions possible too, not shown here, such as to
-// a leaf one level higher.
-//
-// (Yes, this is very terse...  Study it and it will make sense.)
-// (Note, parts of this diagram are repeated below for quick reference.)
-//
-//                      reformat JP here for Judy1 only, from word-1 to word-2
-//                                                                     |
-//           JUDY1 && JU_64BIT   JUDY1 || JU_64BIT                     |
-//                                                                     V
-// (*) Leaf1 [[ => 1_15..08 ] => 1_07 => ... => 1_04 ] => 1_03 => 1_02 => 1_01
-//     Leaf2 [[ => 2_07..04 ] => 2_03 => 2_02        ]                 => 2_01
-//     Leaf3 [[ => 3_05..03 ] => 3_02                ]                 => 3_01
-// JU_64BIT only:
-//     Leaf4 [[ => 4_03..02 ]]                                         => 4_01
-//     Leaf5 [[ => 5_03..02 ]]                                         => 5_01
-//     Leaf6 [[ => 6_02     ]]                                         => 6_01
-//     Leaf7 [[ => 7_02     ]]                                         => 7_01
-//
-// (*) For Judy1 & 64-bit, go directly from a LeafB1 to cJU_JPIMMED_1_15; skip
-//     Leaf1, as described in Judy1.h regarding cJ1_JPLEAF1.
-//
-// MACROS FOR COMMON CODE:
-//
-// (De)compress a LeafX into a LeafY one index size (cIS) larger (X+1 = Y):
-//
-// This is only possible when the current leaf is under a narrow pointer
-// ((ParentLevel - 1) > cIS) and its population fits in a higher-level leaf.
-// Variables ParentLevel, pop1, PjllnewRaw, Pjllnew, Pjpm, and Index are in the
-// context.
-//
-// Note:  Doing an "uplevel" doesnt occur until the old leaf can be compressed
-// up one level BEFORE deleting an index; that is, hysteresis = 1.
-//
-// Note:  LeafType, MaxPop1, NewJPType, and Alloc refer to the up-level leaf,
-// not the current leaf.
-//
-// Note:  010327:  Fixed bug where the jp_DcdPopO next-uplevel digit (byte)
-// above the current Pop0 value was not being cleared.  When upleveling, one
-// digit in jp_DcdPopO "moves" from being part of the Dcd subfield to the Pop0
-// subfield, but since a leaf maxpop1 is known to be <= 1 byte in size, the new
-// Pop0 byte should always be zero.  This is easy to overlook because
-// JU_JPLEAF_POP0() "knows" to only use the LSB of Pop0 (for efficiency) and
-// ignore the other bytes...  Until someone uses cJU_POP0MASK() instead of
-// JU_JPLEAF_POP0(), such as in JudyInsertBranch.c.
-//
-// TBD:  Should JudyInsertBranch.c use JU_JPLEAF_POP0() rather than
-// cJU_POP0MASK(), for efficiency?  Does it know for sure its a narrow pointer
-// under the leaf?  Not necessarily.
-
-#define JU_LEAF_UPLEVEL(cIS,LeafType,MaxPop1,NewJPType,LeafToLeaf,      \
-                        Alloc,ValueArea)                                \
-                                                                        \
-        assert(((ParentLevel - 1) == (cIS)) || (pop1 >= (MaxPop1)));    \
-                                                                        \
-        if (((ParentLevel - 1) > (cIS))  /* under narrow pointer */     \
-         && (pop1 == (MaxPop1)))         /* hysteresis = 1       */     \
-        {                                                               \
-            Word_t D_cdP0;                                              \
-            if ((PjllnewRaw = Alloc(MaxPop1, Pjpm)) == 0) return(-1);   \
-            Pjllnew = P_JLL(PjllnewRaw);                                \
-  JUDYLCODE(Pjv     = ValueArea((LeafType) Pjllnew, MaxPop1);)          \
-                                                                        \
-            (void) LeafToLeaf((LeafType) Pjllnew, JU_PVALUEPASS Pjp,    \
-                              Index & cJU_DCDMASK(cIS), /* TBD, Doug says */ \
-                              (Pvoid_t) Pjpm);                          \
-            DBGCODE(JudyCheckSorted(Pjllnew, MaxPop1, cIS + 1);)        \
-                                                                        \
-            D_cdP0 = (~cJU_MASKATSTATE((cIS) + 1)) & JU_JPDCDPOP0(Pjp); \
-            JU_JPSETADT(Pjp, (Word_t)PjllnewRaw, D_cdP0, NewJPType);    \
-            goto ContinueDelWalk;       /* delete from new leaf */      \
-        }
-
-
-// For Leaf3, only support JU_LEAF_UPLEVEL on a 64-bit system, and for Leaf7,
-// there is no JU_LEAF_UPLEVEL:
-//
-// Note:  Theres no way here to go from Leaf3 [Leaf7] to LEAFW on a 32-bit
-// [64-bit] system.  Thats handled in the main code, because its different in
-// that a JPM is involved.
-
-#ifndef JU_64BIT // 32-bit.
-#define JU_LEAF_UPLEVEL64(cIS,LeafType,MaxPop1,NewJPType,LeafToLeaf,    \
-                          Alloc,ValueArea)              // null.
-#else
-#define JU_LEAF_UPLEVEL64(cIS,LeafType,MaxPop1,NewJPType,LeafToLeaf,    \
-                          Alloc,ValueArea)                              \
-        JU_LEAF_UPLEVEL  (cIS,LeafType,MaxPop1,NewJPType,LeafToLeaf,    \
-                          Alloc,ValueArea)
-#define JU_LEAF_UPLEVEL_NONE(cIS,LeafType,MaxPop1,NewJPType,LeafToLeaf, \
-                          Alloc,ValueArea)              // null.
-#endif
-
-// Compress a Leaf* with pop1 = 2, or a JPIMMED_*_02, into a JPIMMED_*_01:
-//
-// Copy whichever Index is NOT being deleted (and assert that the other one is
-// found; Index must be valid).  This requires special handling of the Index
-// bytes (and value area).  Variables Pjp, Index, offset, and Pleaf are in the
-// context, offset is modified to the undeleted Index, and Pjp is modified
-// including jp_Addr.
-
-
-#define JU_TOIMMED_01_EVEN(cIS,ignore1,ignore2)                         \
-{                                                                       \
-        Word_t  D_cdP0;                                                 \
-        Word_t  A_ddr = 0;                                              \
-        uint8_t T_ype = JU_JPTYPE(Pjp);                                 \
-        offset = (Pleaf[0] == JU_LEASTBYTES(Index, cIS)); /* undeleted Ind */ \
-        assert(Pleaf[offset ? 0 : 1] == JU_LEASTBYTES(Index, cIS));     \
-        D_cdP0 = (Index & cJU_DCDMASK(cIS)) | Pleaf[offset];            \
-JUDYLCODE(A_ddr = Pjv[offset];)                                         \
-        JU_JPSETADT(Pjp, A_ddr, D_cdP0, T_ype);                         \
-}
-
-#define JU_TOIMMED_01_ODD(cIS,SearchLeaf,CopyPIndex)                    \
-        {                                                               \
-            Word_t  D_cdP0;                                             \
-            Word_t  A_ddr = 0;                                          \
-            uint8_t T_ype = JU_JPTYPE(Pjp);                             \
-                                                                        \
-            offset = SearchLeaf(Pleaf, 2, Index);                       \
-            assert(offset >= 0);        /* Index must be valid */       \
-            CopyPIndex(D_cdP0, & (Pleaf[offset ? 0 : cIS]));            \
-            D_cdP0 |= Index & cJU_DCDMASK(cIS);                         \
-  JUDYLCODE(A_ddr = Pjv[offset ? 0 : 1];)                               \
-            JU_JPSETADT(Pjp, A_ddr, D_cdP0, T_ype);                     \
-        }
-
-
-// Compress a Leaf* into a JPIMMED_*_0[2+]:
-//
-// This occurs as soon as its possible, with hysteresis = 0.  Variables pop1,
-// Pleaf, offset, and Pjpm are in the context.
-//
-// TBD:  Explain why hysteresis = 0 here, rather than > 0.  Probably because
-// the insert code assumes if the population is small enough, an Immed is used,
-// not a leaf.
-//
-// The differences between Judy1 and JudyL with respect to value area handling
-// are just too large for completely common code between them...  Oh well, some
-// big ifdefs follow.
-
-#ifdef JUDY1
-
-#define JU_LEAF_TOIMMED(cIS,LeafType,MaxPop1,BaseJPType,ignore1,\
-                        ignore2,ignore3,ignore4,                \
-                        DeleteCopy,FreeLeaf)                    \
-                                                                \
-        assert(pop1 > (MaxPop1));                               \
-                                                                \
-        if ((pop1 - 1) == (MaxPop1))    /* hysteresis = 0 */    \
-        {                                                       \
-            Pjll_t PjllRaw = (Pjll_t) (Pjp->jp_Addr);           \
-            DeleteCopy((LeafType) (Pjp->jp_1Index), Pleaf, pop1, offset, cIS); \
-            DBGCODE(JudyCheckSorted((Pjll_t) (Pjp->jp_1Index),  pop1-1, cIS);) \
-            Pjp->jp_Type = (BaseJPType) - 1 + (MaxPop1) - 1;    \
-            FreeLeaf(PjllRaw, pop1, Pjpm);                      \
-            return(1);                                          \
-        }
-
-#else // JUDYL
-
-// Pjv is also in the context.
-
-#define JU_LEAF_TOIMMED(cIS,LeafType,MaxPop1,BaseJPType,ignore1,\
-                        ignore2,ignore3,ignore4,                \
-                        DeleteCopy,FreeLeaf)                    \
-                                                                \
-        assert(pop1 > (MaxPop1));                               \
-                                                                \
-        if ((pop1 - 1) == (MaxPop1))    /* hysteresis = 0 */    \
-        {                                                       \
-            Pjll_t PjllRaw = (Pjll_t) (Pjp->jp_Addr);           \
-            Pjv_t  PjvnewRaw;                                   \
-            Pjv_t  Pjvnew;                                      \
-                                                                \
-            if ((PjvnewRaw = j__udyLAllocJV(pop1 - 1, Pjpm))    \
-                == (Pjv_t) NULL) return(-1);                    \
-   JUDYLCODE(Pjvnew = P_JV(PjvnewRaw);)                         \
-                                                                \
-            DeleteCopy((LeafType) (Pjp->jp_LIndex), Pleaf, pop1, offset, cIS); \
-            JU_DELETECOPY(Pjvnew, Pjv, pop1, offset, cIS);      \
-            DBGCODE(JudyCheckSorted((Pjll_t) (Pjp->jp_LIndex),  pop1-1, cIS);) \
-            FreeLeaf(PjllRaw, pop1, Pjpm);                      \
-            Pjp->jp_Addr = (Word_t) PjvnewRaw;                  \
-            Pjp->jp_Type = (BaseJPType) - 2 + (MaxPop1);        \
-            return(1);                                          \
-        }
-
-// A complicating factor for JudyL & 32-bit is that Leaf2..3, and for JudyL &
-// 64-bit Leaf 4..7, go directly to an Immed*_01, where the value is stored in
-// jp_Addr and not in a separate LeafV.  For efficiency, use the following
-// macro in cases where it can apply; it is rigged to do the right thing.
-// Unfortunately, this requires the calling code to "know" the transition table
-// and call the right macro.
-//
-// This variant compresses a Leaf* with pop1 = 2 into a JPIMMED_*_01:
-
-#define JU_LEAF_TOIMMED_01(cIS,LeafType,MaxPop1,ignore,Immed01JPType,   \
-                           ToImmed,SearchLeaf,CopyPIndex,               \
-                           DeleteCopy,FreeLeaf)                         \
-                                                                        \
-        assert(pop1 > (MaxPop1));                                       \
-                                                                        \
-        if ((pop1 - 1) == (MaxPop1))    /* hysteresis = 0 */            \
-        {                                                               \
-            Pjll_t PjllRaw = (Pjll_t) (Pjp->jp_Addr);                   \
-            ToImmed(cIS, SearchLeaf, CopyPIndex);                       \
-            FreeLeaf(PjllRaw, pop1, Pjpm);                              \
-            Pjp->jp_Type = (Immed01JPType);                             \
-            return(1);                                                  \
-        }
-#endif // JUDYL
-
-// See comments above about these:
-//
-// Note:  Here "23" means index size 2 or 3, and "47" means 4..7.
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-#define JU_LEAF_TOIMMED_23(cIS,LeafType,MaxPop1,BaseJPType,Immed01JPType, \
-                           ToImmed,SearchLeaf,CopyPIndex,               \
-                           DeleteCopy,FreeLeaf)                         \
-        JU_LEAF_TOIMMED(   cIS,LeafType,MaxPop1,BaseJPType,ignore1,     \
-                           ignore2,ignore3,ignore4,                     \
-                           DeleteCopy,FreeLeaf)
-#else // JUDYL && 32-bit
-#define JU_LEAF_TOIMMED_23(cIS,LeafType,MaxPop1,BaseJPType,Immed01JPType, \
-                           ToImmed,SearchLeaf,CopyPIndex,               \
-                           DeleteCopy,FreeLeaf)                         \
-        JU_LEAF_TOIMMED_01(cIS,LeafType,MaxPop1,ignore,Immed01JPType,   \
-                           ToImmed,SearchLeaf,CopyPIndex,               \
-                           DeleteCopy,FreeLeaf)
-#endif
-
-#ifdef JU_64BIT
-#ifdef JUDY1
-#define JU_LEAF_TOIMMED_47(cIS,LeafType,MaxPop1,BaseJPType,Immed01JPType, \
-                           ToImmed,SearchLeaf,CopyPIndex,               \
-                           DeleteCopy,FreeLeaf)                         \
-        JU_LEAF_TOIMMED(   cIS,LeafType,MaxPop1,BaseJPType,ignore1,     \
-                           ignore2,ignore3,ignore4,                     \
-                           DeleteCopy,FreeLeaf)
-#else // JUDYL && 64-bit
-#define JU_LEAF_TOIMMED_47(cIS,LeafType,MaxPop1,BaseJPType,Immed01JPType, \
-                           ToImmed,SearchLeaf,CopyPIndex,               \
-                           DeleteCopy,FreeLeaf)                         \
-        JU_LEAF_TOIMMED_01(cIS,LeafType,MaxPop1,ignore,Immed01JPType,   \
-                           ToImmed,SearchLeaf,CopyPIndex,               \
-                           DeleteCopy,FreeLeaf)
-#endif // JUDYL
-#endif // JU_64BIT
-
-// Compress a Leaf* in place:
-//
-// Here hysteresis = 0 (no memory is wasted).  Variables pop1, Pleaf, and
-// offset, and for JudyL, Pjv, are in the context.
-
-#ifdef JUDY1
-#define JU_LEAF_INPLACE(cIS,GrowInPlace,DeleteInPlace)          \
-        if (GrowInPlace(pop1 - 1))      /* hysteresis = 0 */    \
-        {                                                       \
-            DeleteInPlace(Pleaf, pop1, offset, cIS);            \
-            DBGCODE(JudyCheckSorted(Pleaf, pop1 - 1, cIS);)     \
-            return(1);                                          \
-        }
-#else
-#define JU_LEAF_INPLACE(cIS,GrowInPlace,DeleteInPlace)          \
-        if (GrowInPlace(pop1 - 1))      /* hysteresis = 0 */    \
-        {                                                       \
-            DeleteInPlace(Pleaf, pop1, offset, cIS);            \
-/**/        JU_DELETEINPLACE(Pjv, pop1, offset, ignore);        \
-            DBGCODE(JudyCheckSorted(Pleaf, pop1 - 1, cIS);)     \
-            return(1);                                          \
-        }
-#endif
-
-// Compress a Leaf* into a smaller memory object of the same JP type:
-//
-// Variables PjllnewRaw, Pjllnew, Pleafpop1, Pjpm, PleafRaw, Pleaf, and offset
-// are in the context.
-
-#ifdef JUDY1
-
-#define JU_LEAF_SHRINK(cIS,LeafType,DeleteCopy,Alloc,FreeLeaf,ValueArea) \
-        if ((PjllnewRaw = Alloc(pop1 - 1, Pjpm)) == 0) return(-1);       \
-        Pjllnew = P_JLL(PjllnewRaw);                                     \
-        DeleteCopy((LeafType) Pjllnew, Pleaf, pop1, offset, cIS);        \
-        DBGCODE(JudyCheckSorted(Pjllnew, pop1 - 1, cIS);)                \
-        FreeLeaf(PleafRaw, pop1, Pjpm);                                  \
-        Pjp->jp_Addr = (Word_t) PjllnewRaw;                              \
-        return(1)
-
-#else // JUDYL
-
-#define JU_LEAF_SHRINK(cIS,LeafType,DeleteCopy,Alloc,FreeLeaf,ValueArea) \
-        {                                                               \
-/**/        Pjv_t Pjvnew;                                               \
-                                                                        \
-            if ((PjllnewRaw = Alloc(pop1 - 1, Pjpm)) == 0) return(-1);  \
-            Pjllnew = P_JLL(PjllnewRaw);                                \
-/**/        Pjvnew  = ValueArea(Pjllnew, pop1 - 1);                     \
-            DeleteCopy((LeafType) Pjllnew, Pleaf, pop1, offset, cIS);   \
-/**/        JU_DELETECOPY(Pjvnew, Pjv, pop1, offset, cIS);              \
-            DBGCODE(JudyCheckSorted(Pjllnew, pop1 - 1, cIS);)           \
-            FreeLeaf(PleafRaw, pop1, Pjpm);                             \
-            Pjp->jp_Addr = (Word_t) PjllnewRaw;                         \
-            return(1);                                                  \
-        }
-#endif // JUDYL
-
-// Overall common code for Leaf* deletion handling:
-//
-// See if the leaf can be:
-// - (de)compressed to one a level higher (JU_LEAF_UPLEVEL()), or if not,
-// - compressed to an Immediate JP (JU_LEAF_TOIMMED()), or if not,
-// - shrunk in place (JU_LEAF_INPLACE()), or if none of those, then
-// - shrink the leaf to a smaller chunk of memory (JU_LEAF_SHRINK()).
-//
-// Variables Pjp, pop1, Index, and offset are in the context.
-// The *Up parameters refer to a leaf one level up, if there is any.
-
-#define JU_LEAF(cIS,                                                    \
-                UpLevel,                                                \
-                  LeafTypeUp,MaxPop1Up,LeafJPTypeUp,LeafToLeaf,         \
-                  AllocUp,ValueAreaUp,                                  \
-                LeafToImmed,ToImmed,CopyPIndex,                         \
-                  LeafType,ImmedMaxPop1,ImmedBaseJPType,Immed01JPType,  \
-                  SearchLeaf,GrowInPlace,DeleteInPlace,DeleteCopy,      \
-                  Alloc,FreeLeaf,ValueArea)                             \
-        {                                                               \
-            Pjll_t   PleafRaw;                                          \
-            LeafType Pleaf;                                             \
-                                                                        \
-            assert(! JU_DCDNOTMATCHINDEX(Index, Pjp, cIS));             \
-            assert(ParentLevel > (cIS));                                \
-                                                                        \
-            PleafRaw = (Pjll_t) (Pjp->jp_Addr);                         \
-            Pleaf    = (LeafType) P_JLL(PleafRaw);                      \
-            pop1     = JU_JPLEAF_POP0(Pjp) + 1;                         \
-                                                                        \
-            UpLevel(cIS, LeafTypeUp, MaxPop1Up, LeafJPTypeUp,           \
-                    LeafToLeaf, AllocUp, ValueAreaUp);                  \
-                                                                        \
-            offset = SearchLeaf(Pleaf, pop1, Index);                    \
-            assert(offset >= 0);        /* Index must be valid */       \
-  JUDYLCODE(Pjv = ValueArea(Pleaf, pop1);)                              \
-                                                                        \
-            LeafToImmed(cIS, LeafType, ImmedMaxPop1,                    \
-                        ImmedBaseJPType, Immed01JPType,                 \
-                        ToImmed, SearchLeaf, CopyPIndex,                \
-                        DeleteCopy, FreeLeaf);                          \
-                                                                        \
-            JU_LEAF_INPLACE(cIS, GrowInPlace, DeleteInPlace);           \
-                                                                        \
-            JU_LEAF_SHRINK(cIS, LeafType, DeleteCopy, Alloc, FreeLeaf,  \
-                           ValueArea);                                  \
-        }
-
-// END OF MACROS, START OF CASES:
-//
-// (*) Leaf1 [[ => 1_15..08 ] => 1_07 => ... => 1_04 ] => 1_03 => 1_02 => 1_01
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-        case cJU_JPLEAF1:
-
-            JU_LEAF(1,
-                    JU_LEAF_UPLEVEL, uint16_t *, cJU_LEAF2_MAXPOP1, cJU_JPLEAF2,
-                      j__udyLeaf1ToLeaf2, j__udyAllocJLL2, JL_LEAF2VALUEAREA,
-                    JU_LEAF_TOIMMED, ignore, ignore,
-                      uint8_t *, cJU_IMMED1_MAXPOP1,
-                      cJU_JPIMMED_1_02, cJU_JPIMMED_1_01, j__udySearchLeaf1,
-                      JU_LEAF1GROWINPLACE, JU_DELETEINPLACE, JU_DELETECOPY,
-                      j__udyAllocJLL1, j__udyFreeJLL1, JL_LEAF1VALUEAREA);
-#endif
-
-// A complicating factor is that for JudyL & 32-bit, a Leaf2 must go directly
-// to an Immed 2_01 and a Leaf3 must go directly to an Immed 3_01:
-//
-// Leaf2 [[ => 2_07..04 ] => 2_03 => 2_02 ] => 2_01
-// Leaf3 [[ => 3_05..03 ] => 3_02         ] => 3_01
-//
-// Hence use JU_LEAF_TOIMMED_23 instead of JU_LEAF_TOIMMED in the cases below,
-// and also the parameters ToImmed and, for odd index sizes, CopyPIndex, are
-// required.
-
-        case cJU_JPLEAF2:
-
-            JU_LEAF(2,
-                    JU_LEAF_UPLEVEL, uint8_t *, cJU_LEAF3_MAXPOP1, cJU_JPLEAF3,
-                      j__udyLeaf2ToLeaf3, j__udyAllocJLL3, JL_LEAF3VALUEAREA,
-                    JU_LEAF_TOIMMED_23, JU_TOIMMED_01_EVEN, ignore,
-                      uint16_t *, cJU_IMMED2_MAXPOP1,
-                      cJU_JPIMMED_2_02, cJU_JPIMMED_2_01, j__udySearchLeaf2,
-                      JU_LEAF2GROWINPLACE, JU_DELETEINPLACE, JU_DELETECOPY,
-                      j__udyAllocJLL2, j__udyFreeJLL2, JL_LEAF2VALUEAREA);
-
-// On 32-bit there is no transition to "uplevel" for a Leaf3, so use
-// JU_LEAF_UPLEVEL64 instead of JU_LEAF_UPLEVEL:
-
-        case cJU_JPLEAF3:
-
-            JU_LEAF(3,
-                    JU_LEAF_UPLEVEL64, uint32_t *, cJU_LEAF4_MAXPOP1,
-                      cJU_JPLEAF4,
-                      j__udyLeaf3ToLeaf4, j__udyAllocJLL4, JL_LEAF4VALUEAREA,
-                    JU_LEAF_TOIMMED_23,
-                      JU_TOIMMED_01_ODD, JU_COPY3_PINDEX_TO_LONG,
-                      uint8_t *, cJU_IMMED3_MAXPOP1,
-                      cJU_JPIMMED_3_02, cJU_JPIMMED_3_01, j__udySearchLeaf3,
-                      JU_LEAF3GROWINPLACE, JU_DELETEINPLACE_ODD,
-                                           JU_DELETECOPY_ODD,
-                      j__udyAllocJLL3, j__udyFreeJLL3, JL_LEAF3VALUEAREA);
-
-#ifdef JU_64BIT
-
-// A complicating factor is that for JudyL & 64-bit, a Leaf[4-7] must go
-// directly to an Immed [4-7]_01:
-//
-// Leaf4 [[ => 4_03..02 ]] => 4_01
-// Leaf5 [[ => 5_03..02 ]] => 5_01
-// Leaf6 [[ => 6_02     ]] => 6_01
-// Leaf7 [[ => 7_02     ]] => 7_01
-//
-// Hence use JU_LEAF_TOIMMED_47 instead of JU_LEAF_TOIMMED in the cases below.
-
-        case cJU_JPLEAF4:
-
-            JU_LEAF(4,
-                    JU_LEAF_UPLEVEL, uint8_t *, cJU_LEAF5_MAXPOP1, cJU_JPLEAF5,
-                      j__udyLeaf4ToLeaf5, j__udyAllocJLL5, JL_LEAF5VALUEAREA,
-                    JU_LEAF_TOIMMED_47, JU_TOIMMED_01_EVEN, ignore,
-                      uint32_t *, cJU_IMMED4_MAXPOP1,
-                      cJ1_JPIMMED_4_02, cJU_JPIMMED_4_01, j__udySearchLeaf4,
-                      JU_LEAF4GROWINPLACE, JU_DELETEINPLACE, JU_DELETECOPY,
-                      j__udyAllocJLL4, j__udyFreeJLL4, JL_LEAF4VALUEAREA);
-
-        case cJU_JPLEAF5:
-
-            JU_LEAF(5,
-                    JU_LEAF_UPLEVEL, uint8_t *, cJU_LEAF6_MAXPOP1, cJU_JPLEAF6,
-                      j__udyLeaf5ToLeaf6, j__udyAllocJLL6, JL_LEAF6VALUEAREA,
-                    JU_LEAF_TOIMMED_47,
-                      JU_TOIMMED_01_ODD, JU_COPY5_PINDEX_TO_LONG,
-                      uint8_t *, cJU_IMMED5_MAXPOP1,
-                      cJ1_JPIMMED_5_02, cJU_JPIMMED_5_01, j__udySearchLeaf5,
-                      JU_LEAF5GROWINPLACE, JU_DELETEINPLACE_ODD,
-                                           JU_DELETECOPY_ODD,
-                      j__udyAllocJLL5, j__udyFreeJLL5, JL_LEAF5VALUEAREA);
-
-        case cJU_JPLEAF6:
-
-            JU_LEAF(6,
-                    JU_LEAF_UPLEVEL, uint8_t *, cJU_LEAF7_MAXPOP1, cJU_JPLEAF7,
-                      j__udyLeaf6ToLeaf7, j__udyAllocJLL7, JL_LEAF7VALUEAREA,
-                    JU_LEAF_TOIMMED_47,
-                      JU_TOIMMED_01_ODD, JU_COPY6_PINDEX_TO_LONG,
-                      uint8_t *, cJU_IMMED6_MAXPOP1,
-                      cJ1_JPIMMED_6_02, cJU_JPIMMED_6_01, j__udySearchLeaf6,
-                      JU_LEAF6GROWINPLACE, JU_DELETEINPLACE_ODD,
-                                           JU_DELETECOPY_ODD,
-                      j__udyAllocJLL6, j__udyFreeJLL6, JL_LEAF6VALUEAREA);
-
-// There is no transition to "uplevel" for a Leaf7, so use JU_LEAF_UPLEVEL_NONE
-// instead of JU_LEAF_UPLEVEL, and ignore all of the parameters to that macro:
-
-        case cJU_JPLEAF7:
-
-            JU_LEAF(7,
-                    JU_LEAF_UPLEVEL_NONE, ignore1, ignore2, ignore3, ignore4,
-                      ignore5, ignore6,
-                    JU_LEAF_TOIMMED_47,
-                      JU_TOIMMED_01_ODD, JU_COPY7_PINDEX_TO_LONG,
-                      uint8_t *, cJU_IMMED7_MAXPOP1,
-                      cJ1_JPIMMED_7_02, cJU_JPIMMED_7_01, j__udySearchLeaf7,
-                      JU_LEAF7GROWINPLACE, JU_DELETEINPLACE_ODD,
-                                           JU_DELETECOPY_ODD,
-                      j__udyAllocJLL7, j__udyFreeJLL7, JL_LEAF7VALUEAREA);
-#endif // JU_64BIT
-
-
-// ****************************************************************************
-// BITMAP LEAF:
-
-        case cJU_JPLEAF_B1:
-        {
-#ifdef JUDYL
-            Pjv_t     PjvnewRaw;        // new value area.
-            Pjv_t     Pjvnew;
-            Word_t    subexp;           // 1 of 8 subexpanses in bitmap.
-            Pjlb_t    Pjlb;             // pointer to bitmap part of the leaf.
-            BITMAPL_t bitmap;           // for one subexpanse.
-            BITMAPL_t bitmask;          // bit set for Indexs digit.
-#endif
-            assert(! JU_DCDNOTMATCHINDEX(Index, Pjp, 1));
-            assert(ParentLevel > 1);
-            // valid Index:
-            assert(JU_BITMAPTESTL(P_JLB(Pjp->jp_Addr), Index));
-
-            pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-
-// Like a Leaf1, see if its under a narrow pointer and can become a Leaf2
-// (hysteresis = 1):
-
-            JU_LEAF_UPLEVEL(1, uint16_t *, cJU_LEAF2_MAXPOP1, cJU_JPLEAF2,
-                            j__udyLeaf1ToLeaf2, j__udyAllocJLL2,
-                            JL_LEAF2VALUEAREA);
-
-#if (defined(JUDY1) && defined(JU_64BIT))
-
-// Handle the unusual special case, on Judy1 64-bit only, where a LeafB1 goes
-// directly to a JPIMMED_1_15; as described in comments in Judy1.h and
-// JudyIns.c.  Copy 1-byte indexes from old LeafB1 to the Immed:
-
-            if ((pop1 - 1) == cJU_IMMED1_MAXPOP1)       // hysteresis = 0.
-            {
-                Pjlb_t    PjlbRaw;      // bitmap in old leaf.
-                Pjlb_t    Pjlb;
-                uint8_t * Pleafnew;     // JPIMMED as a pointer.
-                Word_t    ldigit;       // larger than uint8_t.
-
-                PjlbRaw  = (Pjlb_t) (Pjp->jp_Addr);
-                Pjlb     = P_JLB(PjlbRaw);
-                Pleafnew = Pjp->jp_1Index;
-
-                JU_BITMAPCLEARL(Pjlb, Index);   // unset Indexs bit.
-
-// TBD:  This is very slow, there must be a better way:
-
-                for (ldigit = 0; ldigit < cJU_BRANCHUNUMJPS; ++ldigit)
-                {
-                    if (JU_BITMAPTESTL(Pjlb, ldigit))
-                    {
-                        *Pleafnew++ = ldigit;
-                        assert(Pleafnew - (Pjp->jp_1Index)
-                            <= cJU_IMMED1_MAXPOP1);
-                    }
-                }
-
-                DBGCODE(JudyCheckSorted((Pjll_t) (Pjp->jp_1Index),
-                                        cJU_IMMED1_MAXPOP1, 1);)
-                j__udyFreeJLB1(PjlbRaw, Pjpm);
-
-                Pjp->jp_Type = cJ1_JPIMMED_1_15;
-                return(1);
-            }
-
-#else // (JUDYL || (! JU_64BIT))
-
-// Compress LeafB1 to a Leaf1:
-//
-// Note:  4.37 of this file contained alternate code for Judy1 only that simply
-// cleared the bit and allowed the LeafB1 to go below cJU_LEAF1_MAXPOP1.  This
-// was the ONLY case where a malloc failure was not fatal; however, it violated
-// the critical assumption that the tree is always kept in least-compressed
-// form.
-
-            if (pop1 == cJU_LEAF1_MAXPOP1)      // hysteresis = 1.
-            {
-                if (j__udyLeafB1ToLeaf1(Pjp, Pjpm) == -1) return(-1);
-                goto ContinueDelWalk;   // delete Index in new Leaf1.
-            }
-#endif // (JUDYL || (! JU_64BIT))
-
-#ifdef JUDY1
-            // unset Indexs bit:
-
-            JU_BITMAPCLEARL(P_JLB(Pjp->jp_Addr), Index);
-#else // JUDYL
-
-// This is very different from Judy1 because of the need to manage the value
-// area:
-//
-// Get last byte to decode from Index, and pointer to bitmap leaf:
-
-            digit = JU_DIGITATSTATE(Index, 1);
-            Pjlb = P_JLB(Pjp->jp_Addr);
-
-// Prepare additional values:
-
-            subexp  = digit / cJU_BITSPERSUBEXPL;       // which subexpanse.
-            bitmap  = JU_JLB_BITMAP(Pjlb, subexp);      // subexps 32-bit map.
-            PjvRaw  = JL_JLB_PVALUE(Pjlb, subexp);      // corresponding values.
-            Pjv     = P_JV(PjvRaw);
-            bitmask = JU_BITPOSMASKL(digit);            // mask for Index.
-
-            assert(bitmap & bitmask);                   // Index must be valid.
-
-            if (bitmap == cJU_FULLBITMAPL)      // full bitmap, take shortcut:
-            {
-                pop1   = cJU_BITSPERSUBEXPL;
-                offset = digit % cJU_BITSPERSUBEXPL;
-            }
-            else        // compute subexpanse pop1 and value area offset:
-            {
-                pop1   = j__udyCountBitsL(bitmap);
-                offset = j__udyCountBitsL(bitmap & (bitmask - 1));
-            }
-
-// Handle solitary Index remaining in subexpanse:
-
-            if (pop1 == 1)
-            {
-                j__udyLFreeJV(PjvRaw, 1, Pjpm);
-
-                JL_JLB_PVALUE(Pjlb, subexp) = (Pjv_t) NULL;
-                JU_JLB_BITMAP(Pjlb, subexp) = 0;
-
-                return(1);
-            }
-
-// Shrink value area in place or move to a smaller value area:
-
-            if (JL_LEAFVGROWINPLACE(pop1 - 1))          // hysteresis = 0.
-            {
-                JU_DELETEINPLACE(Pjv, pop1, offset, ignore);
-            }
-            else
-            {
-                if ((PjvnewRaw = j__udyLAllocJV(pop1 - 1, Pjpm))
-                    == (Pjv_t) NULL) return(-1);
-                Pjvnew = P_JV(PjvnewRaw);
-
-                JU_DELETECOPY(Pjvnew, Pjv, pop1, offset, ignore);
-                j__udyLFreeJV(PjvRaw, pop1, Pjpm);
-                JL_JLB_PVALUE(Pjlb, subexp) = (Pjv_t) PjvnewRaw;
-            }
-
-            JU_JLB_BITMAP(Pjlb, subexp) ^= bitmask;     // clear Indexs bit.
-
-#endif // JUDYL
-
-            return(1);
-
-        } // case.
-
-
-#ifdef JUDY1
-
-// ****************************************************************************
-// FULL POPULATION LEAF:
-//
-// Convert to a LeafB1 and delete the index.  Hysteresis = 0; none is possible.
-//
-// Note:  Earlier the second assertion below said, "== 2", but in fact the
-// parent could be at a higher level if a fullpop is under a narrow pointer.
-
-        case cJ1_JPFULLPOPU1:
-        {
-            Pjlb_t PjlbRaw;
-            Pjlb_t Pjlb;
-            Word_t subexp;
-
-            assert(! JU_DCDNOTMATCHINDEX(Index, Pjp, 2));
-            assert(ParentLevel > 1);    // see above.
-
-            if ((PjlbRaw = j__udyAllocJLB1(Pjpm)) == (Pjlb_t) NULL)
-                return(-1);
-            Pjlb = P_JLB(PjlbRaw);
-
-// Fully populate the leaf, then unset Indexs bit:
-
-            for (subexp = 0; subexp < cJU_NUMSUBEXPL; ++subexp)
-                JU_JLB_BITMAP(Pjlb, subexp) = cJU_FULLBITMAPL;
-
-            JU_BITMAPCLEARL(Pjlb, Index);
-
-            Pjp->jp_Addr = (Word_t) PjlbRaw;
-            Pjp->jp_Type = cJU_JPLEAF_B1;
-
-            return(1);
-        }
-#endif // JUDY1
-
-
-// ****************************************************************************
-// IMMEDIATE JP:
-//
-// If theres just the one Index in the Immed, convert the JP to a JPNULL*
-// (should only happen in a BranchU); otherwise delete the Index from the
-// Immed.  See the state transitions table elsewhere in this file for a summary
-// of which Immed types must be handled.  Hysteresis = 0; none is possible with
-// Immeds.
-//
-// MACROS FOR COMMON CODE:
-//
-// Single Index remains in cJU_JPIMMED_*_01; convert JP to null:
-//
-// Variables Pjp and parentJPtype are in the context.
-//
-// Note:  cJU_JPIMMED_*_01 should only be encountered in BranchUs, not in
-// BranchLs or BranchBs (where its improper to merely modify the JP to be a
-// null JP); that is, BranchL and BranchB code should have already handled
-// any cJU_JPIMMED_*_01 by different means.
-
-#define JU_IMMED_01(NewJPType,ParentJPType)                             \
-                                                                        \
-            assert(parentJPtype == (ParentJPType));                     \
-            assert(JU_JPDCDPOP0(Pjp) == JU_TRIMTODCDSIZE(Index));       \
-            JU_JPSETADT(Pjp, 0, 0, NewJPType);                          \
-            return(1)
-
-// Convert cJ*_JPIMMED_*_02 to cJU_JPIMMED_*_01:
-//
-// Move the undeleted Index, whichever does not match the least bytes of Index,
-// from undecoded-bytes-only (in jp_1Index or jp_LIndex as appropriate) to
-// jp_DcdPopO (full-field).  Pjp, Index, and offset are in the context.
-
-#define JU_IMMED_02(cIS,LeafType,NewJPType)             \
-        {                                               \
-            LeafType Pleaf;                             \
-                                                        \
-            assert((ParentLevel - 1) == (cIS));         \
-  JUDY1CODE(Pleaf  = (LeafType) (Pjp->jp_1Index);)      \
-  JUDYLCODE(Pleaf  = (LeafType) (Pjp->jp_LIndex);)      \
-  JUDYLCODE(PjvRaw = (Pjv_t) (Pjp->jp_Addr);)           \
-  JUDYLCODE(Pjv    = P_JV(PjvRaw);)                     \
-            JU_TOIMMED_01_EVEN(cIS, ignore, ignore);    \
-  JUDYLCODE(j__udyLFreeJV(PjvRaw, 2, Pjpm);)            \
-            Pjp->jp_Type = (NewJPType);                 \
-            return(1);                                  \
-        }
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-
-// Variation for "odd" cJ*_JPIMMED_*_02 JP types, which are very different from
-// "even" types because they use leaf search code and odd-copy macros:
-//
-// Note:  JudyL 32-bit has no "odd" JPIMMED_*_02 types.
-
-#define JU_IMMED_02_ODD(cIS,NewJPType,SearchLeaf,CopyPIndex)    \
-        {                                                       \
-            uint8_t * Pleaf;                                    \
-                                                                \
-            assert((ParentLevel - 1) == (cIS));                 \
-  JUDY1CODE(Pleaf  = (uint8_t *) (Pjp->jp_1Index);)             \
-  JUDYLCODE(Pleaf  = (uint8_t *) (Pjp->jp_LIndex);)             \
-  JUDYLCODE(PjvRaw = (Pjv_t) (Pjp->jp_Addr);)                   \
-  JUDYLCODE(Pjv    = P_JV(PjvRaw);)                             \
-            JU_TOIMMED_01_ODD(cIS, SearchLeaf, CopyPIndex);     \
-  JUDYLCODE(j__udyLFreeJV(PjvRaw, 2, Pjpm);)                    \
-            Pjp->jp_Type = (NewJPType);                         \
-            return(1);                                          \
-        }
-#endif // (JUDY1 || JU_64BIT)
-
-// Core code for deleting one Index (and for JudyL, its value area) from a
-// larger Immed:
-//
-// Variables Pleaf, pop1, and offset are in the context.
-
-#ifdef JUDY1
-#define JU_IMMED_DEL(cIS,DeleteInPlace)                 \
-        DeleteInPlace(Pleaf, pop1, offset, cIS);        \
-        DBGCODE(JudyCheckSorted(Pleaf, pop1 - 1, cIS);)
-
-#else // JUDYL
-
-// For JudyL the value area might need to be shrunk:
-
-#define JU_IMMED_DEL(cIS,DeleteInPlace)                         \
-                                                                \
-        if (JL_LEAFVGROWINPLACE(pop1 - 1)) /* hysteresis = 0 */ \
-        {                                                       \
-            DeleteInPlace(   Pleaf,  pop1, offset, cIS);        \
-            JU_DELETEINPLACE(Pjv, pop1, offset, ignore);        \
-            DBGCODE(JudyCheckSorted(Pleaf, pop1 - 1, cIS);)     \
-        }                                                       \
-        else                                                    \
-        {                                                       \
-            Pjv_t PjvnewRaw;                                    \
-            Pjv_t Pjvnew;                                       \
-                                                                \
-            if ((PjvnewRaw = j__udyLAllocJV(pop1 - 1, Pjpm))    \
-                == (Pjv_t) NULL) return(-1);                    \
-            Pjvnew = P_JV(PjvnewRaw);                           \
-                                                                \
-            DeleteInPlace(Pleaf, pop1, offset, cIS);            \
-            JU_DELETECOPY(Pjvnew, Pjv, pop1, offset, ignore);   \
-            DBGCODE(JudyCheckSorted(Pleaf, pop1 - 1, cIS);)     \
-            j__udyLFreeJV(PjvRaw, pop1, Pjpm);                  \
-                                                                \
-            (Pjp->jp_Addr) = (Word_t) PjvnewRaw;                \
-        }
-#endif // JUDYL
-
-// Delete one Index from a larger Immed where no restructuring is required:
-//
-// Variables pop1, Pjp, offset, and Index are in the context.
-
-#define JU_IMMED(cIS,LeafType,BaseJPType,SearchLeaf,DeleteInPlace)      \
-        {                                                               \
-            LeafType Pleaf;                                             \
-                                                                        \
-            assert((ParentLevel - 1) == (cIS));                         \
-  JUDY1CODE(Pleaf  = (LeafType) (Pjp->jp_1Index);)                      \
-  JUDYLCODE(Pleaf  = (LeafType) (Pjp->jp_LIndex);)                      \
-  JUDYLCODE(PjvRaw = (Pjv_t) (Pjp->jp_Addr);)                           \
-  JUDYLCODE(Pjv    = P_JV(PjvRaw);)                                     \
-            pop1   = (JU_JPTYPE(Pjp)) - (BaseJPType) + 2;               \
-            offset = SearchLeaf(Pleaf, pop1, Index);                    \
-            assert(offset >= 0);        /* Index must be valid */       \
-                                                                        \
-            JU_IMMED_DEL(cIS, DeleteInPlace);                           \
-            --(Pjp->jp_Type);                                           \
-            return(1);                                                  \
-        }
-
-
-// END OF MACROS, START OF CASES:
-
-// Single Index remains in Immed; convert JP to null:
-
-        case cJU_JPIMMED_1_01: JU_IMMED_01(cJU_JPNULL1, cJU_JPBRANCH_U2);
-        case cJU_JPIMMED_2_01: JU_IMMED_01(cJU_JPNULL2, cJU_JPBRANCH_U3);
-#ifndef JU_64BIT
-        case cJU_JPIMMED_3_01: JU_IMMED_01(cJU_JPNULL3, cJU_JPBRANCH_U);
-#else
-        case cJU_JPIMMED_3_01: JU_IMMED_01(cJU_JPNULL3, cJU_JPBRANCH_U4);
-        case cJU_JPIMMED_4_01: JU_IMMED_01(cJU_JPNULL4, cJU_JPBRANCH_U5);
-        case cJU_JPIMMED_5_01: JU_IMMED_01(cJU_JPNULL5, cJU_JPBRANCH_U6);
-        case cJU_JPIMMED_6_01: JU_IMMED_01(cJU_JPNULL6, cJU_JPBRANCH_U7);
-        case cJU_JPIMMED_7_01: JU_IMMED_01(cJU_JPNULL7, cJU_JPBRANCH_U);
-#endif
-
-// Multiple Indexes remain in the Immed JP; delete the specified Index:
-
-        case cJU_JPIMMED_1_02:
-
-            JU_IMMED_02(1, uint8_t *, cJU_JPIMMED_1_01);
-
-        case cJU_JPIMMED_1_03:
-#if (defined(JUDY1) || defined(JU_64BIT))
-        case cJU_JPIMMED_1_04:
-        case cJU_JPIMMED_1_05:
-        case cJU_JPIMMED_1_06:
-        case cJU_JPIMMED_1_07:
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-        case cJ1_JPIMMED_1_08:
-        case cJ1_JPIMMED_1_09:
-        case cJ1_JPIMMED_1_10:
-        case cJ1_JPIMMED_1_11:
-        case cJ1_JPIMMED_1_12:
-        case cJ1_JPIMMED_1_13:
-        case cJ1_JPIMMED_1_14:
-        case cJ1_JPIMMED_1_15:
-#endif
-            JU_IMMED(1, uint8_t *, cJU_JPIMMED_1_02,
-                     j__udySearchLeaf1, JU_DELETEINPLACE);
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-        case cJU_JPIMMED_2_02:
-
-            JU_IMMED_02(2, uint16_t *, cJU_JPIMMED_2_01);
-
-        case cJU_JPIMMED_2_03:
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-        case cJ1_JPIMMED_2_04:
-        case cJ1_JPIMMED_2_05:
-        case cJ1_JPIMMED_2_06:
-        case cJ1_JPIMMED_2_07:
-#endif
-#if (defined(JUDY1) || defined(JU_64BIT))
-            JU_IMMED(2, uint16_t *, cJU_JPIMMED_2_02,
-                     j__udySearchLeaf2, JU_DELETEINPLACE);
-
-        case cJU_JPIMMED_3_02:
-
-            JU_IMMED_02_ODD(3, cJU_JPIMMED_3_01,
-                            j__udySearchLeaf3, JU_COPY3_PINDEX_TO_LONG);
-
-#endif
-
-#if (defined(JUDY1) && defined(JU_64BIT))
-        case cJ1_JPIMMED_3_03:
-        case cJ1_JPIMMED_3_04:
-        case cJ1_JPIMMED_3_05:
-
-            JU_IMMED(3, uint8_t *, cJU_JPIMMED_3_02,
-                     j__udySearchLeaf3, JU_DELETEINPLACE_ODD);
-
-        case cJ1_JPIMMED_4_02:
-
-            JU_IMMED_02(4, uint32_t *, cJU_JPIMMED_4_01);
-
-        case cJ1_JPIMMED_4_03:
-
-            JU_IMMED(4, uint32_t *, cJ1_JPIMMED_4_02,
-                     j__udySearchLeaf4, JU_DELETEINPLACE);
-
-        case cJ1_JPIMMED_5_02:
-
-            JU_IMMED_02_ODD(5, cJU_JPIMMED_5_01,
-                            j__udySearchLeaf5, JU_COPY5_PINDEX_TO_LONG);
-
-        case cJ1_JPIMMED_5_03:
-
-            JU_IMMED(5, uint8_t *, cJ1_JPIMMED_5_02,
-                     j__udySearchLeaf5, JU_DELETEINPLACE_ODD);
-
-        case cJ1_JPIMMED_6_02:
-
-            JU_IMMED_02_ODD(6, cJU_JPIMMED_6_01,
-                            j__udySearchLeaf6, JU_COPY6_PINDEX_TO_LONG);
-
-        case cJ1_JPIMMED_7_02:
-
-            JU_IMMED_02_ODD(7, cJU_JPIMMED_7_01,
-                            j__udySearchLeaf7, JU_COPY7_PINDEX_TO_LONG);
-
-#endif // (JUDY1 && JU_64BIT)
-
-
-// ****************************************************************************
-// INVALID JP TYPE:
-
-        default: JU_SET_ERRNO_NONNULL(Pjpm, JU_ERRNO_CORRUPT); return(-1);
-
-        } // switch
-
-
-// PROCESS JP -- RECURSIVELY:
-//
-// For non-Immed JP types, if successful, post-decrement the population count
-// at this level, or collapse a BranchL if necessary by copying the remaining
-// JP in the BranchL to the parent (hysteresis = 0), which implicitly creates a
-// narrow pointer if there was not already one in the hierarchy.
-
-        assert(level);
-        retcode =  j__udyDelWalk(Pjp, Index, level, Pjpm);
-        assert(retcode != 0);           // should never happen.
-
-        if ((JU_JPTYPE(Pjp)) < cJU_JPIMMED_1_01)                // not an Immed.
-        {
-            switch (retcode)
-            {
-            case 1: 
-            {
-                jp_t JP = *Pjp;
-                Word_t DcdP0;
-
-                DcdP0 = JU_JPDCDPOP0(Pjp) - 1;          // decrement count.
-                JU_JPSETADT(Pjp, JP.jp_Addr, DcdP0, JU_JPTYPE(&JP)); 
-                break;
-            }
-            case 2:     // collapse BranchL to single JP; see above:
-                {
-                    Pjbl_t PjblRaw = (Pjbl_t) (Pjp->jp_Addr);
-                    Pjbl_t Pjbl    = P_JBL(PjblRaw);
-
-                    *Pjp = Pjbl->jbl_jp[0];
-                    j__udyFreeJBL(PjblRaw, Pjpm);
-                    retcode = 1;
-                }
-            }
-        }
-
-        return(retcode);
-
-} // j__udyDelWalk()
-
-
-// ****************************************************************************
-// J U D Y   1   U N S E T
-// J U D Y   L   D E L
-//
-// Main entry point.  See the manual entry for details.
-
-#ifdef JUDY1
-FUNCTION int Judy1Unset 
-#else
-FUNCTION int JudyLDel
-#endif
-        (
-        PPvoid_t  PPArray,      // in which to delete.
-        Word_t    Index,        // to delete.
-        PJError_t PJError       // optional, for returning error info.
-        )
-{
-        Word_t    pop1;         // population of leaf.
-        int       offset;       // at which to delete Index.
-    JUDY1CODE(int retcode;)     // return code from Judy1Test().
-JUDYLCODE(PPvoid_t PPvalue;)  // pointer from JudyLGet().
-
-
-// CHECK FOR NULL ARRAY POINTER (error by caller):
-
-        if (PPArray == (PPvoid_t) NULL)
-        {
-            JU_SET_ERRNO(PJError, JU_ERRNO_NULLPPARRAY);
-            return(JERRI);
-        }
-
-
-// CHECK IF INDEX IS INVALID:
-//
-// If so, theres nothing to do.  This saves a lot of time.  Pass through
-// PJError, if any, from the "get" function.
-
-#ifdef JUDY1
-        if ((retcode = Judy1Test(*PPArray, Index, PJError)) == JERRI)
-            return (JERRI);
-
-        if (retcode == 0) return(0);
-#else
-        if ((PPvalue = JudyLGet(*PPArray, Index, PJError)) == PPJERR)
-            return (JERRI);
-
-        if (PPvalue == (PPvoid_t) NULL) return(0);
-#endif
-
-
-// ****************************************************************************
-// PROCESS TOP LEVEL (LEAFW) BRANCHES AND LEAVES:
-
-// ****************************************************************************
-// LEAFW LEAF, OTHER SIZE:
-//
-// Shrink or convert the leaf as necessary.  Hysteresis = 0; none is possible.
-
-        if (JU_LEAFW_POP0(*PPArray) < cJU_LEAFW_MAXPOP1) // must be a LEAFW
-        {
-  JUDYLCODE(Pjv_t  Pjv;)                        // current value area.
-  JUDYLCODE(Pjv_t  Pjvnew;)                     // value area in new leaf.
-            Pjlw_t Pjlw = P_JLW(*PPArray);      // first word of leaf.
-            Pjlw_t Pjlwnew;                     // replacement leaf.
-            pop1 = Pjlw[0] + 1;                 // first word of leaf is pop0.
-
-// Delete single (last) Index from array:
-
-            if (pop1 == 1)
-            {
-                j__udyFreeJLW(Pjlw, /* pop1 = */ 1, (Pjpm_t) NULL);
-                *PPArray = (Pvoid_t) NULL;
-                return(1);
-            }
-
-// Locate Index in compressible leaf:
-
-            offset = j__udySearchLeafW(Pjlw + 1, pop1, Index);
-            assert(offset >= 0);                // Index must be valid.
-
-  JUDYLCODE(Pjv = JL_LEAFWVALUEAREA(Pjlw, pop1);)
-
-// Delete Index in-place:
-//
-// Note:  "Grow in place from pop1 - 1" is the logical inverse of, "shrink in
-// place from pop1."  Also, Pjlw points to the count word, so skip that for
-// doing the deletion.
-
-            if (JU_LEAFWGROWINPLACE(pop1 - 1))
-            {
-                JU_DELETEINPLACE(Pjlw + 1, pop1, offset, ignore);
-#ifdef JUDYL // also delete from value area:
-                JU_DELETEINPLACE(Pjv,      pop1, offset, ignore);
-#endif
-                DBGCODE(JudyCheckSorted((Pjll_t) (Pjlw + 1), pop1 - 1,
-                                        cJU_ROOTSTATE);)
-                --(Pjlw[0]);                    // decrement population.
-                DBGCODE(JudyCheckPop(*PPArray);)
-                return(1);
-            }
-
-// Allocate new leaf for use in either case below:
-
-            Pjlwnew = j__udyAllocJLW(pop1 - 1);
-            JU_CHECKALLOC(Pjlw_t, Pjlwnew, JERRI);
-
-// Shrink to smaller LEAFW:
-//
-// Note:  Skip the first word = pop0 in each leaf.
-
-            Pjlwnew[0] = (pop1 - 1) - 1;
-            JU_DELETECOPY(Pjlwnew + 1, Pjlw + 1, pop1, offset, ignore);
-
-#ifdef JUDYL // also delete from value area:
-            Pjvnew = JL_LEAFWVALUEAREA(Pjlwnew, pop1 - 1);
-            JU_DELETECOPY(Pjvnew, Pjv, pop1, offset, ignore);
-#endif
-            DBGCODE(JudyCheckSorted(Pjlwnew + 1, pop1 - 1, cJU_ROOTSTATE);)
-
-            j__udyFreeJLW(Pjlw, pop1, (Pjpm_t) NULL);
-
-////        *PPArray = (Pvoid_t)  Pjlwnew | cJU_LEAFW);
-            *PPArray = (Pvoid_t)  Pjlwnew; 
-            DBGCODE(JudyCheckPop(*PPArray);)
-            return(1);
-
-        }
-        else
-
-
-// ****************************************************************************
-// JRP BRANCH:
-//
-// Traverse through the JPM to do the deletion unless the population is small
-// enough to convert immediately to a LEAFW.
-
-        {
-            Pjpm_t Pjpm;
-            Pjp_t  Pjp;         // top-level JP to process.
-            Word_t digit;       // in a branch.
-  JUDYLCODE(Pjv_t  Pjv;)        // to value area.
-            Pjlw_t Pjlwnew;                     // replacement leaf.
-    DBGCODE(Pjlw_t Pjlwnew_orig;)
-
-            Pjpm = P_JPM(*PPArray);     // top object in array (tree).
-            Pjp  = &(Pjpm->jpm_JP);     // next object (first branch or leaf).
-
-            assert(((Pjpm->jpm_JP.jp_Type) == cJU_JPBRANCH_L)
-                || ((Pjpm->jpm_JP.jp_Type) == cJU_JPBRANCH_B)
-                || ((Pjpm->jpm_JP.jp_Type) == cJU_JPBRANCH_U));
-
-// WALK THE TREE 
-//
-// Note:  Recursive code in j__udyDelWalk() knows how to collapse a lower-level
-// BranchL containing a single JP into the parent JP as a narrow pointer, but
-// the code here cant do that for a top-level BranchL.  The result can be
-// PArray -> JPM -> BranchL containing a single JP.  This situation is
-// unavoidable because a JPM cannot contain a narrow pointer; the BranchL is
-// required in order to hold the top digit decoded, and it does not collapse to
-// a LEAFW until the population is low enough.
-//
-// TBD:  Should we add a topdigit field to JPMs so they can hold narrow
-// pointers?
-
-            if (j__udyDelWalk(Pjp, Index, cJU_ROOTSTATE, Pjpm) == -1)
-            {
-                JU_COPY_ERRNO(PJError, Pjpm);
-                return(JERRI);
-            }
-
-            --(Pjpm->jpm_Pop0); // success; decrement total population.
-
-            if ((Pjpm->jpm_Pop0 + 1) != cJU_LEAFW_MAXPOP1)
-            {
-                DBGCODE(JudyCheckPop(*PPArray);)
-                return(1);
-            }
-
-// COMPRESS A BRANCH[LBU] TO A LEAFW:
-//
-            Pjlwnew = j__udyAllocJLW(cJU_LEAFW_MAXPOP1);
-            JU_CHECKALLOC(Pjlw_t, Pjlwnew, JERRI);
-
-// Plug leaf into root pointer and set population count:
-
-////        *PPArray  = (Pvoid_t) ((Word_t) Pjlwnew | cJU_LEAFW);
-            *PPArray  = (Pvoid_t) Pjlwnew;
-#ifdef JUDYL // prepare value area:
-            Pjv = JL_LEAFWVALUEAREA(Pjlwnew, cJU_LEAFW_MAXPOP1);
-#endif
-            *Pjlwnew++ = cJU_LEAFW_MAXPOP1 - 1; // set pop0.
-            DBGCODE(Pjlwnew_orig = Pjlwnew;)
-
-            switch (JU_JPTYPE(Pjp))
-            {
-
-// JPBRANCH_L:  Copy each JPs indexes to the new LEAFW and free the old
-// branch:
-
-            case cJU_JPBRANCH_L:
-            {
-                Pjbl_t PjblRaw = (Pjbl_t) (Pjp->jp_Addr);
-                Pjbl_t Pjbl    = P_JBL(PjblRaw);
-
-                for (offset = 0; offset < Pjbl->jbl_NumJPs; ++offset)
-                {
-                    pop1 = j__udyLeafM1ToLeafW(Pjlwnew, JU_PVALUEPASS
-                             (Pjbl->jbl_jp) + offset,
-                             JU_DIGITTOSTATE(Pjbl->jbl_Expanse[offset],
-                                             cJU_BYTESPERWORD),
-                             (Pvoid_t) Pjpm);
-                    Pjlwnew += pop1;            // advance through indexes.
-          JUDYLCODE(Pjv     += pop1;)           // advance through values.
-                }
-                j__udyFreeJBL(PjblRaw, Pjpm);
-
-                assert(Pjlwnew == Pjlwnew_orig + cJU_LEAFW_MAXPOP1);
-                break;                  // delete Index from new LEAFW.
-            }
-
-// JPBRANCH_B:  Copy each JPs indexes to the new LEAFW and free the old
-// branch, including each JP subarray:
-
-            case cJU_JPBRANCH_B:
-            {
-                Pjbb_t    PjbbRaw = (Pjbb_t) (Pjp->jp_Addr);
-                Pjbb_t    Pjbb    = P_JBB(PjbbRaw);
-                Word_t    subexp;       // current subexpanse number.
-                BITMAPB_t bitmap;       // portion for this subexpanse.
-                Pjp_t     Pjp2Raw;      // one subexpanses subarray.
-                Pjp_t     Pjp2;
-
-                for (subexp = 0; subexp < cJU_NUMSUBEXPB; ++subexp)
-                {
-                    if ((bitmap = JU_JBB_BITMAP(Pjbb, subexp)) == 0)
-                        continue;               // skip empty subexpanse.
-
-                    digit   = subexp * cJU_BITSPERSUBEXPB;
-                    Pjp2Raw = JU_JBB_PJP(Pjbb, subexp);
-                    Pjp2    = P_JP(Pjp2Raw);
-                    assert(Pjp2 != (Pjp_t) NULL);
-
-// Walk through bits for all possible sub-subexpanses (digits); increment
-// offset for each populated subexpanse; until no more set bits:
-
-                    for (offset = 0; bitmap != 0; bitmap >>= 1, ++digit)
-                    {
-                        if (! (bitmap & 1))     // skip empty sub-subexpanse.
-                            continue;
-
-                        pop1 = j__udyLeafM1ToLeafW(Pjlwnew, JU_PVALUEPASS
-                                 Pjp2 + offset,
-                                 JU_DIGITTOSTATE(digit, cJU_BYTESPERWORD),
-                                 (Pvoid_t) Pjpm);
-                        Pjlwnew += pop1;         // advance through indexes.
-              JUDYLCODE(Pjv     += pop1;)        // advance through values.
-                        ++offset;
-                    }
-                    j__udyFreeJBBJP(Pjp2Raw, /* pop1 = */ offset, Pjpm);
-                }
-                j__udyFreeJBB(PjbbRaw, Pjpm);
-
-                assert(Pjlwnew == Pjlwnew_orig + cJU_LEAFW_MAXPOP1);
-                break;                  // delete Index from new LEAFW.
-
-            } // case cJU_JPBRANCH_B.
-
-
-// JPBRANCH_U:  Copy each JPs indexes to the new LEAFW and free the old
-// branch:
-
-            case cJU_JPBRANCH_U:
-            {
-                Pjbu_t  PjbuRaw = (Pjbu_t) (Pjp->jp_Addr);
-                Pjbu_t  Pjbu    = P_JBU(PjbuRaw);
-                Word_t  ldigit;         // larger than uint8_t.
-
-                for (Pjp = Pjbu->jbu_jp, ldigit = 0;
-                     ldigit < cJU_BRANCHUNUMJPS;
-                     ++Pjp, ++ldigit)
-                {
-
-// Shortcuts, to save a little time for possibly big branches:
-
-                    if ((JU_JPTYPE(Pjp)) == cJU_JPNULLMAX)  // skip null JP.
-                        continue;
-
-// TBD:  Should the following shortcut also be used in BranchL and BranchB
-// code?
-
-#ifndef JU_64BIT
-                    if ((JU_JPTYPE(Pjp)) == cJU_JPIMMED_3_01)
-#else
-                    if ((JU_JPTYPE(Pjp)) == cJU_JPIMMED_7_01)
-#endif
-                    {                                   // single Immed:
-                        *Pjlwnew++ = JU_DIGITTOSTATE(ldigit, cJU_BYTESPERWORD)
-                                   | JU_JPDCDPOP0(Pjp); // rebuild Index.
-#ifdef JUDYL
-                        *Pjv++ = Pjp->jp_Addr;  // copy value area.
-#endif
-                        continue;
-                    }
-
-                    pop1 = j__udyLeafM1ToLeafW(Pjlwnew, JU_PVALUEPASS
-                             Pjp, JU_DIGITTOSTATE(ldigit, cJU_BYTESPERWORD),
-                             (Pvoid_t) Pjpm);
-                    Pjlwnew += pop1;            // advance through indexes.
-          JUDYLCODE(Pjv     += pop1;)           // advance through values.
-                }
-                j__udyFreeJBU(PjbuRaw, Pjpm);
-
-                assert(Pjlwnew == Pjlwnew_orig + cJU_LEAFW_MAXPOP1);
-                break;                  // delete Index from new LEAFW.
-
-            } // case cJU_JPBRANCH_U.
-
-
-// INVALID JP TYPE in jpm_t struct
-
-            default: JU_SET_ERRNO_NONNULL(Pjpm, JU_ERRNO_CORRUPT);
-                     return(JERRI);
-
-            } // end switch on sub-JP type.
-
-            DBGCODE(JudyCheckSorted((Pjll_t) Pjlwnew_orig, cJU_LEAFW_MAXPOP1,
-                                    cJU_ROOTSTATE);)
-
-// FREE JPM (no longer needed):
-
-            j__udyFreeJPM(Pjpm, (Pjpm_t) NULL);
-            DBGCODE(JudyCheckPop(*PPArray);)
-            return(1);
-
-        } 
-        /*NOTREACHED*/
-
-} // Judy1Unset() / JudyLDel()
diff --git a/libs/klib/judy/JudyFirst.c b/libs/klib/judy/JudyFirst.c
deleted file mode 100644
index 91533a9..0000000
--- a/libs/klib/judy/JudyFirst.c
+++ /dev/null
@@ -1,211 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// Judy*First[Empty]() and Judy*Last[Empty]() routines for Judy1 and JudyL.
-// Compile with one of -DJUDY1 or -DJUDYL.
-//
-// These are inclusive versions of Judy*Next[Empty]() and Judy*Prev[Empty]().
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-
-// ****************************************************************************
-// J U D Y   1   F I R S T
-// J U D Y   L   F I R S T
-//
-// See the manual entry for details.
-
-#ifdef JUDY1
-FUNCTION int	  Judy1First
-#else
-FUNCTION PPvoid_t JudyLFirst
-#endif
-        (
-	Pcvoid_t  PArray,	// Judy array to search.
-	Word_t *  PIndex,	// starting point and result.
-	PJError_t PJError	// optional, for returning error info.
-        )
-{
-        if (PIndex == (PWord_t) NULL)		// caller error:
-	{
-	    JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);
-	    JUDY1CODE(return(JERRI );)
-	    JUDYLCODE(return(PPJERR);)
-	}
-
-#ifdef JUDY1
-	switch (Judy1Test(PArray, *PIndex, PJError))
-	{
-	case 1:	 return(1);			// found *PIndex itself.
-	case 0:  return(Judy1Next(PArray, PIndex, PJError));
-	default: return(JERRI);
-	}
-#else
-	{
-	    PPvoid_t PValue;
-
-	    if ((PValue = JudyLGet(PArray, *PIndex, PJError)) == PPJERR)
-		return(PPJERR);
-
-	    if (PValue != (PPvoid_t) NULL) return(PValue);  // found *PIndex.
-
-	    return(JudyLNext(PArray, PIndex, PJError));
-	}
-#endif
-
-} // Judy1First() / JudyLFirst()
-
-
-// ****************************************************************************
-// J U D Y   1   L A S T
-// J U D Y   L   L A S T
-//
-// See the manual entry for details.
-
-#ifdef JUDY1
-FUNCTION int	  Judy1Last(
-#else
-FUNCTION PPvoid_t JudyLLast(
-#endif
-	Pcvoid_t  PArray,	// Judy array to search.
-	Word_t *  PIndex,	// starting point and result.
-	PJError_t PJError)	// optional, for returning error info.
-{
-        if (PIndex == (PWord_t) NULL)
-	{
-	    JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);	 // caller error.
-	    JUDY1CODE(return(JERRI );)
-	    JUDYLCODE(return(PPJERR);)
-	}
-
-#ifdef JUDY1
-	switch (Judy1Test(PArray, *PIndex, PJError))
-	{
-	case 1:	 return(1);			// found *PIndex itself.
-	case 0:  return(Judy1Prev(PArray, PIndex, PJError));
-	default: return(JERRI);
-	}
-#else
-	{
-	    PPvoid_t PValue;
-
-	    if ((PValue = JudyLGet(PArray, *PIndex, PJError)) == PPJERR)
-		return(PPJERR);
-
-	    if (PValue != (PPvoid_t) NULL) return(PValue);  // found *PIndex.
-
-	    return(JudyLPrev(PArray, PIndex, PJError));
-	}
-#endif
-
-} // Judy1Last() / JudyLLast()
-
-
-// ****************************************************************************
-// J U D Y   1   F I R S T   E M P T Y
-// J U D Y   L   F I R S T   E M P T Y
-//
-// See the manual entry for details.
-
-#ifdef JUDY1
-FUNCTION int Judy1FirstEmpty(
-#else
-FUNCTION int JudyLFirstEmpty(
-#endif
-	Pcvoid_t  PArray,	// Judy array to search.
-	Word_t *  PIndex,	// starting point and result.
-	PJError_t PJError)	// optional, for returning error info.
-{
-        if (PIndex == (PWord_t) NULL)		// caller error:
-	{
-	    JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);
-	    return(JERRI);
-	}
-
-#ifdef JUDY1
-	switch (Judy1Test(PArray, *PIndex, PJError))
-	{
-	case 0:	 return(1);			// found *PIndex itself.
-	case 1:  return(Judy1NextEmpty(PArray, PIndex, PJError));
-	default: return(JERRI);
-	}
-#else
-	{
-	    PPvoid_t PValue;
-
-	    if ((PValue = JudyLGet(PArray, *PIndex, PJError)) == PPJERR)
-		return(JERRI);
-
-	    if (PValue == (PPvoid_t) NULL) return(1);	// found *PIndex.
-
-	    return(JudyLNextEmpty(PArray, PIndex, PJError));
-	}
-#endif
-
-} // Judy1FirstEmpty() / JudyLFirstEmpty()
-
-
-// ****************************************************************************
-// J U D Y   1   L A S T   E M P T Y
-// J U D Y   L   L A S T   E M P T Y
-//
-// See the manual entry for details.
-
-#ifdef JUDY1
-FUNCTION int Judy1LastEmpty(
-#else
-FUNCTION int JudyLLastEmpty(
-#endif
-	Pcvoid_t  PArray,	// Judy array to search.
-	Word_t *  PIndex,	// starting point and result.
-	PJError_t PJError)	// optional, for returning error info.
-{
-        if (PIndex == (PWord_t) NULL)
-	{
-	    JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);	 // caller error.
-	    return(JERRI);
-	}
-
-#ifdef JUDY1
-	switch (Judy1Test(PArray, *PIndex, PJError))
-	{
-	case 0:	 return(1);			// found *PIndex itself.
-	case 1:  return(Judy1PrevEmpty(PArray, PIndex, PJError));
-	default: return(JERRI);
-	}
-#else
-	{
-	    PPvoid_t PValue;
-
-	    if ((PValue = JudyLGet(PArray, *PIndex, PJError)) == PPJERR)
-		return(JERRI);
-
-	    if (PValue == (PPvoid_t) NULL) return(1);	// found *PIndex.
-
-	    return(JudyLPrevEmpty(PArray, PIndex, PJError));
-	}
-#endif
-
-} // Judy1LastEmpty() / JudyLLastEmpty()
diff --git a/libs/klib/judy/JudyFreeArray.c b/libs/klib/judy/JudyFreeArray.c
deleted file mode 100644
index 0145479..0000000
--- a/libs/klib/judy/JudyFreeArray.c
+++ /dev/null
@@ -1,361 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// Judy1FreeArray() and JudyLFreeArray() functions for Judy1 and JudyL.
-// Compile with one of -DJUDY1 or -DJUDYL.
-// Return the number of bytes freed from the array.
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-DBGCODE(extern void JudyCheckPop(Pvoid_t PArray);)
-
-
-// ****************************************************************************
-// J U D Y   1   F R E E   A R R A Y
-// J U D Y   L   F R E E   A R R A Y
-//
-// See the Judy*(3C) manual entry for details.
-//
-// This code is written recursively, at least at first, because thats much
-// simpler.  Hope its fast enough.
-
-#ifdef JUDY1
-FUNCTION Word_t Judy1FreeArray
-#else
-FUNCTION Word_t JudyLFreeArray
-#endif
-        (
-	PPvoid_t  PPArray,	// array to free.
-	PJError_t PJError	// optional, for returning error info.
-        )
-{
-	jpm_t	  jpm;		// local to accumulate free statistics.
-
-// CHECK FOR NULL POINTER (error by caller):
-
-	if (PPArray == (PPvoid_t) NULL)
-	{
-	    JU_SET_ERRNO(PJError, JU_ERRNO_NULLPPARRAY);
-	    return(JERR);
-	}
-
-	DBGCODE(JudyCheckPop(*PPArray);)
-
-// Zero jpm.jpm_Pop0 (meaning the array will be empty in a moment) for accurate
-// logging in TRACEMI2.
-
-	jpm.jpm_Pop0	      = 0;		// see above.
-	jpm.jpm_TotalMemWords = 0;		// initialize memory freed.
-
-// 	Empty array:
-
-	if (P_JLW(*PPArray) == (Pjlw_t) NULL) return(0);
-
-// PROCESS TOP LEVEL "JRP" BRANCHES AND LEAF:
-
-	if (JU_LEAFW_POP0(*PPArray) < cJU_LEAFW_MAXPOP1) // must be a LEAFW
-	{
-	    Pjlw_t Pjlw = P_JLW(*PPArray);	// first word of leaf.
-
-	    j__udyFreeJLW(Pjlw, Pjlw[0] + 1, &jpm);
-	    *PPArray = (Pvoid_t) NULL;		// make an empty array.
-	    return (-(jpm.jpm_TotalMemWords * cJU_BYTESPERWORD));  // see above.
-	}
-	else
-
-// Rootstate leaves:  just free the leaf:
-
-// Common code for returning the amount of memory freed.
-//
-// Note:  In a an ordinary LEAFW, pop0 = *PPArray[0].
-//
-// Accumulate (negative) words freed, while freeing objects.
-// Return the positive bytes freed.
-
-	{
-	    Pjpm_t Pjpm	    = P_JPM(*PPArray);
-	    Word_t TotalMem = Pjpm->jpm_TotalMemWords;
-
-	    j__udyFreeSM(&(Pjpm->jpm_JP), &jpm);  // recurse through tree.
-	    j__udyFreeJPM(Pjpm, &jpm);
-
-// Verify the array was not corrupt.  This means that amount of memory freed
-// (which is negative) is equal to the initial amount:
-
-	    if (TotalMem + jpm.jpm_TotalMemWords)
-	    {
-		JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-		return(JERR);
-	    }
-
-	    *PPArray = (Pvoid_t) NULL;		// make an empty array.
-	    return (TotalMem * cJU_BYTESPERWORD);
-	}
-
-} // Judy1FreeArray() / JudyLFreeArray()
-
-
-// ****************************************************************************
-// __ J U D Y   F R E E   S M
-//
-// Given a pointer to a JP, recursively visit and free (depth first) all nodes
-// in a Judy array BELOW the JP, but not the JP itself.  Accumulate in *Pjpm
-// the total words freed (as a negative value).  "SM" = State Machine.
-//
-// Note:  Corruption is not detected at this level because during a FreeArray,
-// if the code hasnt already core dumped, its better to remain silent, even
-// if some memory has not been freed, than to bother the caller about the
-// corruption.  TBD:  Is this true?  If not, must list all legitimate JPNULL
-// and JPIMMED above first, and revert to returning bool_t (see 4.34).
-
-FUNCTION void j__udyFreeSM(
-	Pjp_t	Pjp,		// top of Judy (top-state).
-	Pjpm_t	Pjpm)		// to return words freed.
-{
-	Word_t	Pop1;
-
-	switch (JU_JPTYPE(Pjp))
-	{
-
-#ifdef JUDY1
-
-// FULL EXPANSE -- nothing to free  for this jp_Type.
-
-	case cJ1_JPFULLPOPU1:
-	    break;
-#endif
-
-// JUDY BRANCH -- free the sub-tree depth first:
-
-// LINEAR BRANCH -- visit each JP in the JBLs list, then free the JBL:
-//
-// Note:  There are no null JPs in a JBL.
-
-	case cJU_JPBRANCH_L:
-	case cJU_JPBRANCH_L2:
-	case cJU_JPBRANCH_L3:
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_L4:
-	case cJU_JPBRANCH_L5:
-	case cJU_JPBRANCH_L6:
-	case cJU_JPBRANCH_L7:
-#endif // JU_64BIT
-	{
-	    Pjbl_t Pjbl = P_JBL(Pjp->jp_Addr);
-	    Word_t offset;
-
-	    for (offset = 0; offset < Pjbl->jbl_NumJPs; ++offset)
-	        j__udyFreeSM((Pjbl->jbl_jp) + offset, Pjpm);
-
-	    j__udyFreeJBL((Pjbl_t) (Pjp->jp_Addr), Pjpm);
-	    break;
-	}
-
-
-// BITMAP BRANCH -- visit each JP in the JBBs list based on the bitmap, also
-//
-// Note:  There are no null JPs in a JBB.
-
-	case cJU_JPBRANCH_B:
-	case cJU_JPBRANCH_B2:
-	case cJU_JPBRANCH_B3:
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_B4:
-	case cJU_JPBRANCH_B5:
-	case cJU_JPBRANCH_B6:
-	case cJU_JPBRANCH_B7:
-#endif // JU_64BIT
-	{
-	    Word_t subexp;
-	    Word_t offset;
-	    Word_t jpcount;
-
-	    Pjbb_t Pjbb = P_JBB(Pjp->jp_Addr);
-
-	    for (subexp = 0; subexp < cJU_NUMSUBEXPB; ++subexp)
-	    {
-	        jpcount = j__udyCountBitsB(JU_JBB_BITMAP(Pjbb, subexp));
-
-	        if (jpcount)
-	        {
-		    for (offset = 0; offset < jpcount; ++offset)
-		    {
-		       j__udyFreeSM(P_JP(JU_JBB_PJP(Pjbb, subexp)) + offset,
-				    Pjpm);
-		    }
-		    j__udyFreeJBBJP(JU_JBB_PJP(Pjbb, subexp), jpcount, Pjpm);
-	        }
-	    }
-	    j__udyFreeJBB((Pjbb_t) (Pjp->jp_Addr), Pjpm);
-
-	    break;
-	}
-
-
-// UNCOMPRESSED BRANCH -- visit each JP in the JBU array, then free the JBU
-// itself:
-//
-// Note:  Null JPs are handled during recursion at a lower state.
-
-	case cJU_JPBRANCH_U:
-	case cJU_JPBRANCH_U2:
-	case cJU_JPBRANCH_U3:
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_U4:
-	case cJU_JPBRANCH_U5:
-	case cJU_JPBRANCH_U6:
-	case cJU_JPBRANCH_U7:
-#endif // JU_64BIT
-	{
-	    Word_t offset;
-	    Pjbu_t Pjbu = P_JBU(Pjp->jp_Addr);
-
-	    for (offset = 0; offset < cJU_BRANCHUNUMJPS; ++offset)
-	        j__udyFreeSM((Pjbu->jbu_jp) + offset, Pjpm);
-
-	    j__udyFreeJBU((Pjbu_t) (Pjp->jp_Addr), Pjpm);
-	    break;
-	}
-
-
-// -- Cases below here terminate and do not recurse. --
-
-
-// LINEAR LEAF -- just free the leaf; size is computed from jp_Type:
-//
-// Note:  cJU_JPLEAF1 is a special case, see discussion in ../Judy1/Judy1.h
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-	case cJU_JPLEAF1:
-	    Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-	    j__udyFreeJLL1((Pjll_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    break;
-#endif
-
-	case cJU_JPLEAF2:
-	    Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-	    j__udyFreeJLL2((Pjll_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    break;
-
-	case cJU_JPLEAF3:
-	    Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-	    j__udyFreeJLL3((Pjll_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    break;
-
-#ifdef JU_64BIT
-	case cJU_JPLEAF4:
-	    Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-	    j__udyFreeJLL4((Pjll_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    break;
-
-	case cJU_JPLEAF5:
-	    Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-	    j__udyFreeJLL5((Pjll_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    break;
-
-	case cJU_JPLEAF6:
-	    Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-	    j__udyFreeJLL6((Pjll_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    break;
-
-	case cJU_JPLEAF7:
-	    Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-	    j__udyFreeJLL7((Pjll_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    break;
-#endif // JU_64BIT
-
-
-// BITMAP LEAF -- free sub-expanse arrays of JPs, then free the JBB.
-
-	case cJU_JPLEAF_B1:
-	{
-#ifdef JUDYL
-	    Word_t subexp;
-	    Word_t jpcount;
-	    Pjlb_t Pjlb = P_JLB(Pjp->jp_Addr);
-
-// Free the value areas in the bitmap leaf:
-
-	    for (subexp = 0; subexp < cJU_NUMSUBEXPL; ++subexp)
-	    {
-	        jpcount = j__udyCountBitsL(JU_JLB_BITMAP(Pjlb, subexp));
-
-	        if (jpcount)
-		    j__udyLFreeJV(JL_JLB_PVALUE(Pjlb, subexp), jpcount, Pjpm);
-	    }
-#endif // JUDYL
-
-	    j__udyFreeJLB1((Pjlb_t) (Pjp->jp_Addr), Pjpm);
-	    break;
-
-	} // case cJU_JPLEAF_B1
-
-#ifdef JUDYL
-
-
-// IMMED*:
-//
-// For JUDYL, all non JPIMMED_*_01s have a LeafV which must be freed:
-
-	case cJU_JPIMMED_1_02:
-	case cJU_JPIMMED_1_03:
-#ifdef JU_64BIT
-	case cJU_JPIMMED_1_04:
-	case cJU_JPIMMED_1_05:
-	case cJU_JPIMMED_1_06:
-	case cJU_JPIMMED_1_07:
-#endif
-	    Pop1 = JU_JPTYPE(Pjp) - cJU_JPIMMED_1_02 + 2;
-	    j__udyLFreeJV((Pjv_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    break;
-
-#ifdef JU_64BIT
-	case cJU_JPIMMED_2_02:
-	case cJU_JPIMMED_2_03:
-
-	    Pop1 = JU_JPTYPE(Pjp) - cJU_JPIMMED_2_02 + 2;
-	    j__udyLFreeJV((Pjv_t) (Pjp->jp_Addr), Pop1, Pjpm);
-	    break;
-
-	case cJU_JPIMMED_3_02:
-	    j__udyLFreeJV((Pjv_t) (Pjp->jp_Addr), 2, Pjpm);
-	    break;
-
-#endif // JU_64BIT
-#endif // JUDYL
-
-
-// OTHER JPNULL, JPIMMED, OR UNEXPECTED TYPE -- nothing to free for this type:
-//
-// Note:  Lump together no-op and invalid JP types; see function header
-// comments.
-
-	default: break;
-
-	} // switch (JU_JPTYPE(Pjp))
-
-} // j__udyFreeSM()
diff --git a/libs/klib/judy/JudyGet.c b/libs/klib/judy/JudyGet.c
deleted file mode 100644
index 5071a3f..0000000
--- a/libs/klib/judy/JudyGet.c
+++ /dev/null
@@ -1,1092 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// Judy1Test() and JudyLGet() functions for Judy1 and JudyL.
-// Compile with one of -DJUDY1 or -DJUDYL.
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-#ifdef TRACEJPR                 // different macro name, for "retrieval" only.
-#include "JudyPrintJP.c"
-#endif
-
-
-// ****************************************************************************
-// J U D Y   1   T E S T
-// J U D Y   L   G E T
-//
-// See the manual entry for details.  Note support for "shortcut" entries to
-// trees known to start with a JPM.
-
-#ifdef JUDY1
-
-#ifdef JUDYGETINLINE
-FUNCTION int j__udy1Test
-#else
-FUNCTION int Judy1Test
-#endif
-
-#else  // JUDYL
-
-#ifdef JUDYGETINLINE
-FUNCTION PPvoid_t j__udyLGet
-#else
-FUNCTION PPvoid_t JudyLGet
-#endif
-
-#endif // JUDYL
-        (
-#ifdef JUDYGETINLINE
-        Pvoid_t   PArray,       // from which to retrieve.
-        Word_t    Index         // to retrieve.
-#else
-        Pcvoid_t  PArray,       // from which to retrieve.
-        Word_t    Index,        // to retrieve.
-        PJError_t PJError       // optional, for returning error info.
-#endif
-        )
-{
-        Pjp_t     Pjp;          // current JP while walking the tree.
-        Pjpm_t    Pjpm;         // for global accounting.
-        uint8_t   Digit;        // byte just decoded from Index.
-        Word_t    Pop1;         // leaf population (number of indexes).
-        Pjll_t    Pjll;         // pointer to LeafL.
-        DBGCODE(uint8_t ParentJPType;)
-
-#ifndef JUDYGETINLINE
-
-        if (PArray == (Pcvoid_t) NULL)  // empty array.
-        {
-  JUDY1CODE(return(0);)
-  JUDYLCODE(return((PPvoid_t) NULL);)
-        }
-
-// ****************************************************************************
-// PROCESS TOP LEVEL BRANCHES AND LEAF:
-
-        if (JU_LEAFW_POP0(PArray) < cJU_LEAFW_MAXPOP1) // must be a LEAFW
-        {
-            Pjlw_t Pjlw = P_JLW(PArray);        // first word of leaf.
-            int    posidx;                      // signed offset in leaf.
-
-            Pop1   = Pjlw[0] + 1;
-            posidx = j__udySearchLeafW(Pjlw + 1, Pop1, Index);
-
-            if (posidx >= 0)
-            {
-      JUDY1CODE(return(1);)
-      JUDYLCODE(return((PPvoid_t) (JL_LEAFWVALUEAREA(Pjlw, Pop1) + posidx));)
-            }
-  JUDY1CODE(return(0);)
-  JUDYLCODE(return((PPvoid_t) NULL);)
-        }
-
-#endif // ! JUDYGETINLINE
-
-        Pjpm = P_JPM(PArray);
-        Pjp = &(Pjpm->jpm_JP);  // top branch is below JPM.
-
-// ****************************************************************************
-// WALK THE JUDY TREE USING A STATE MACHINE:
-
-ContinueWalk:           // for going down one level; come here with Pjp set.
-
-#ifdef TRACEJPR
-        JudyPrintJP(Pjp, "g", __LINE__);
-#endif
-        switch (JU_JPTYPE(Pjp))
-        {
-
-// Ensure the switch table starts at 0 for speed; otherwise more code is
-// executed:
-
-        case 0: goto ReturnCorrupt;     // save a little code.
-
-
-// ****************************************************************************
-// JPNULL*:
-//
-// Note:  These are legitimate in a BranchU (only) and do not constitute a
-// fault.
-
-        case cJU_JPNULL1:
-        case cJU_JPNULL2:
-        case cJU_JPNULL3:
-#ifdef JU_64BIT
-        case cJU_JPNULL4:
-        case cJU_JPNULL5:
-        case cJU_JPNULL6:
-        case cJU_JPNULL7:
-#endif
-            assert(ParentJPType >= cJU_JPBRANCH_U2);
-            assert(ParentJPType <= cJU_JPBRANCH_U);
-      JUDY1CODE(return(0);)
-      JUDYLCODE(return((PPvoid_t) NULL);)
-
-
-// ****************************************************************************
-// JPBRANCH_L*:
-//
-// Note:  The use of JU_DCDNOTMATCHINDEX() in branches is not strictly
-// required,since this can be done at leaf level, but it costs nothing to do it
-// sooner, and it aborts an unnecessary traversal sooner.
-
-        case cJU_JPBRANCH_L2:
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 2)) break;
-            Digit = JU_DIGITATSTATE(Index, 2);
-            goto JudyBranchL;
-
-        case cJU_JPBRANCH_L3:
-
-#ifdef JU_64BIT // otherwise its a no-op:
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 3)) break;
-#endif
-            Digit = JU_DIGITATSTATE(Index, 3);
-            goto JudyBranchL;
-
-#ifdef JU_64BIT
-        case cJU_JPBRANCH_L4:
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 4)) break;
-            Digit = JU_DIGITATSTATE(Index, 4);
-            goto JudyBranchL;
-
-        case cJU_JPBRANCH_L5:
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 5)) break;
-            Digit = JU_DIGITATSTATE(Index, 5);
-            goto JudyBranchL;
-
-        case cJU_JPBRANCH_L6:
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 6)) break;
-            Digit = JU_DIGITATSTATE(Index, 6);
-            goto JudyBranchL;
-
-        case cJU_JPBRANCH_L7:
-
-            // JU_DCDNOTMATCHINDEX() would be a no-op.
-            Digit = JU_DIGITATSTATE(Index, 7);
-            goto JudyBranchL;
-
-#endif // JU_64BIT
-
-        case cJU_JPBRANCH_L:
-        {
-            Pjbl_t Pjbl;
-            int    posidx;
-
-            Digit = JU_DIGITATSTATE(Index, cJU_ROOTSTATE);
-
-// Common code for all BranchLs; come here with Digit set:
-
-JudyBranchL:
-            Pjbl = P_JBL(Pjp->jp_Addr);
-
-            posidx = 0;
-
-            do {
-                if (Pjbl->jbl_Expanse[posidx] == Digit)
-                {                       // found Digit; continue traversal:
-                    DBGCODE(ParentJPType = JU_JPTYPE(Pjp);)
-                    Pjp = Pjbl->jbl_jp + posidx;
-                    goto ContinueWalk;
-                }
-            } while (++posidx != Pjbl->jbl_NumJPs);
-
-            break;
-        }
-
-
-// ****************************************************************************
-// JPBRANCH_B*:
-
-        case cJU_JPBRANCH_B2:
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 2)) break;
-            Digit = JU_DIGITATSTATE(Index, 2);
-            goto JudyBranchB;
-
-        case cJU_JPBRANCH_B3:
-
-#ifdef JU_64BIT // otherwise its a no-op:
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 3)) break;
-#endif
-            Digit = JU_DIGITATSTATE(Index, 3);
-            goto JudyBranchB;
-
-
-#ifdef JU_64BIT
-        case cJU_JPBRANCH_B4:
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 4)) break;
-            Digit = JU_DIGITATSTATE(Index, 4);
-            goto JudyBranchB;
-
-        case cJU_JPBRANCH_B5:
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 5)) break;
-            Digit = JU_DIGITATSTATE(Index, 5);
-            goto JudyBranchB;
-
-        case cJU_JPBRANCH_B6:
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 6)) break;
-            Digit = JU_DIGITATSTATE(Index, 6);
-            goto JudyBranchB;
-
-        case cJU_JPBRANCH_B7:
-
-            // JU_DCDNOTMATCHINDEX() would be a no-op.
-            Digit = JU_DIGITATSTATE(Index, 7);
-            goto JudyBranchB;
-
-#endif // JU_64BIT
-
-        case cJU_JPBRANCH_B:
-        {
-            Pjbb_t    Pjbb;
-            Word_t    subexp;   // in bitmap, 0..7.
-            BITMAPB_t BitMap;   // for one subexpanse.
-            BITMAPB_t BitMask;  // bit in BitMap for Indexs Digit.
-
-            Digit = JU_DIGITATSTATE(Index, cJU_ROOTSTATE);
-
-// Common code for all BranchBs; come here with Digit set:
-
-JudyBranchB:
-            DBGCODE(ParentJPType = JU_JPTYPE(Pjp);)
-            Pjbb   = P_JBB(Pjp->jp_Addr);
-            subexp = Digit / cJU_BITSPERSUBEXPB;
-
-            BitMap = JU_JBB_BITMAP(Pjbb, subexp);
-            Pjp    = P_JP(JU_JBB_PJP(Pjbb, subexp));
-
-            BitMask = JU_BITPOSMASKB(Digit);
-
-// No JP in subexpanse for Index => Index not found:
-
-            if (! (BitMap & BitMask)) break;
-
-// Count JPs in the subexpanse below the one for Index:
-
-            Pjp += j__udyCountBitsB(BitMap & (BitMask - 1));
-
-            goto ContinueWalk;
-
-        } // case cJU_JPBRANCH_B*
-
-
-// ****************************************************************************
-// JPBRANCH_U*:
-//
-// Notice the reverse order of the cases, and falling through to the next case,
-// for performance.
-
-        case cJU_JPBRANCH_U:
-
-            DBGCODE(ParentJPType = JU_JPTYPE(Pjp);)
-            Pjp = JU_JBU_PJP(Pjp, Index, cJU_ROOTSTATE);
-
-// If not a BranchU, traverse; otherwise fall into the next case, which makes
-// this very fast code for a large Judy array (mainly BranchUs), especially
-// when branches are already in the cache, such as for prev/next:
-
-#ifndef JU_64BIT
-            if (JU_JPTYPE(Pjp) != cJU_JPBRANCH_U3) goto ContinueWalk;
-#else
-            if (JU_JPTYPE(Pjp) != cJU_JPBRANCH_U7) goto ContinueWalk;
-#endif
-
-#ifdef JU_64BIT
-        case cJU_JPBRANCH_U7:
-
-            // JU_DCDNOTMATCHINDEX() would be a no-op.
-            DBGCODE(ParentJPType = JU_JPTYPE(Pjp);)
-            Pjp = JU_JBU_PJP(Pjp, Index, 7);
-
-            if (JU_JPTYPE(Pjp) != cJU_JPBRANCH_U6) goto ContinueWalk;
-            // and fall through.
-
-        case cJU_JPBRANCH_U6:
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 6)) break;
-            DBGCODE(ParentJPType = JU_JPTYPE(Pjp);)
-            Pjp = JU_JBU_PJP(Pjp, Index, 6);
-
-            if (JU_JPTYPE(Pjp) != cJU_JPBRANCH_U5) goto ContinueWalk;
-            // and fall through.
-
-        case cJU_JPBRANCH_U5:
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 5)) break;
-            DBGCODE(ParentJPType = JU_JPTYPE(Pjp);)
-            Pjp = JU_JBU_PJP(Pjp, Index, 5);
-
-            if (JU_JPTYPE(Pjp) != cJU_JPBRANCH_U4) goto ContinueWalk;
-            // and fall through.
-
-        case cJU_JPBRANCH_U4:
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 4)) break;
-            DBGCODE(ParentJPType = JU_JPTYPE(Pjp);)
-            Pjp = JU_JBU_PJP(Pjp, Index, 4);
-
-            if (JU_JPTYPE(Pjp) != cJU_JPBRANCH_U3) goto ContinueWalk;
-            // and fall through.
-
-#endif // JU_64BIT
-
-        case cJU_JPBRANCH_U3:
-
-#ifdef JU_64BIT // otherwise its a no-op:
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 3)) break;
-#endif
-            DBGCODE(ParentJPType = JU_JPTYPE(Pjp);)
-            Pjp = JU_JBU_PJP(Pjp, Index, 3);
-
-            if (JU_JPTYPE(Pjp) != cJU_JPBRANCH_U2) goto ContinueWalk;
-            // and fall through.
-
-        case cJU_JPBRANCH_U2:
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 2)) break;
-            DBGCODE(ParentJPType = JU_JPTYPE(Pjp);)
-            Pjp = JU_JBU_PJP(Pjp, Index, 2);
-
-// Note:  BranchU2 is a special case that must continue traversal to a leaf,
-// immed, full, or null type:
-
-            goto ContinueWalk;
-
-
-// ****************************************************************************
-// JPLEAF*:
-//
-// Note:  Here the calls of JU_DCDNOTMATCHINDEX() are necessary and check
-// whether Index is out of the expanse of a narrow pointer.
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-
-        case cJU_JPLEAF1:
-        {
-            int posidx;         // signed offset in leaf.
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 1)) break;
-
-            Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-            Pjll = P_JLL(Pjp->jp_Addr);
-
-            if ((posidx = j__udySearchLeaf1(Pjll, Pop1, Index)) < 0) break;
-
-  JUDY1CODE(return(1);)
-  JUDYLCODE(return((PPvoid_t) (JL_LEAF1VALUEAREA(Pjll, Pop1) + posidx));)
-        }
-
-#endif // (JUDYL || (! JU_64BIT))
-
-        case cJU_JPLEAF2:
-        {
-            int posidx;         // signed offset in leaf.
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 2)) break;
-
-            Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-            Pjll = P_JLL(Pjp->jp_Addr);
-
-            if ((posidx = j__udySearchLeaf2(Pjll, Pop1, Index)) < 0) break;
-
-  JUDY1CODE(return(1);)
-  JUDYLCODE(return((PPvoid_t) (JL_LEAF2VALUEAREA(Pjll, Pop1) + posidx));)
-        }
-        case cJU_JPLEAF3:
-        {
-            int posidx;         // signed offset in leaf.
-
-#ifdef JU_64BIT // otherwise its a no-op:
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 3)) break;
-#endif
-
-            Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-            Pjll = P_JLL(Pjp->jp_Addr);
-
-            if ((posidx = j__udySearchLeaf3(Pjll, Pop1, Index)) < 0) break;
-
-  JUDY1CODE(return(1);)
-  JUDYLCODE(return((PPvoid_t) (JL_LEAF3VALUEAREA(Pjll, Pop1) + posidx));)
-        }
-#ifdef JU_64BIT
-        case cJU_JPLEAF4:
-        {
-            int posidx;         // signed offset in leaf.
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 4)) break;
-
-            Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-            Pjll = P_JLL(Pjp->jp_Addr);
-
-            if ((posidx = j__udySearchLeaf4(Pjll, Pop1, Index)) < 0) break;
-
-  JUDY1CODE(return(1);)
-  JUDYLCODE(return((PPvoid_t) (JL_LEAF4VALUEAREA(Pjll, Pop1) + posidx));)
-        }
-        case cJU_JPLEAF5:
-        {
-            int posidx;         // signed offset in leaf.
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 5)) break;
-
-            Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-            Pjll = P_JLL(Pjp->jp_Addr);
-
-            if ((posidx = j__udySearchLeaf5(Pjll, Pop1, Index)) < 0) break;
-
-  JUDY1CODE(return(1);)
-  JUDYLCODE(return((PPvoid_t) (JL_LEAF5VALUEAREA(Pjll, Pop1) + posidx));)
-        }
-
-        case cJU_JPLEAF6:
-        {
-            int posidx;         // signed offset in leaf.
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 6)) break;
-
-            Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-            Pjll = P_JLL(Pjp->jp_Addr);
-
-            if ((posidx = j__udySearchLeaf6(Pjll, Pop1, Index)) < 0) break;
-
-  JUDY1CODE(return(1);)
-  JUDYLCODE(return((PPvoid_t) (JL_LEAF6VALUEAREA(Pjll, Pop1) + posidx));)
-        }
-        case cJU_JPLEAF7:
-        {
-            int posidx;         // signed offset in leaf.
-
-            // JU_DCDNOTMATCHINDEX() would be a no-op.
-            Pop1 = JU_JPLEAF_POP0(Pjp) + 1;
-            Pjll = P_JLL(Pjp->jp_Addr);
-
-            if ((posidx = j__udySearchLeaf7(Pjll, Pop1, Index)) < 0) break;
-
-  JUDY1CODE(return(1);)
-  JUDYLCODE(return((PPvoid_t) (JL_LEAF7VALUEAREA(Pjll, Pop1) + posidx));)
-        }
-#endif // JU_64BIT
-
-
-// ****************************************************************************
-// JPLEAF_B1:
-
-        case cJU_JPLEAF_B1:
-        {
-            Pjlb_t    Pjlb;
-#ifdef JUDYL
-            int       posidx;
-            Word_t    subexp;   // in bitmap, 0..7.
-            BITMAPL_t BitMap;   // for one subexpanse.
-            BITMAPL_t BitMask;  // bit in BitMap for Indexs Digit.
-            Pjv_t     Pjv;
-#endif
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 1)) break;
-
-            Pjlb = P_JLB(Pjp->jp_Addr);
-
-#ifdef JUDY1
-
-// Simply check if Indexs bit is set in the bitmap:
-
-            if (JU_BITMAPTESTL(Pjlb, Index)) return(1);
-            break;
-
-#else // JUDYL
-
-// JudyL is much more complicated because of value area subarrays:
-
-            Digit   = JU_DIGITATSTATE(Index, 1);
-            subexp  = Digit / cJU_BITSPERSUBEXPL;
-            BitMap  = JU_JLB_BITMAP(Pjlb, subexp);
-            BitMask = JU_BITPOSMASKL(Digit);
-
-// No value in subexpanse for Index => Index not found:
-
-            if (! (BitMap & BitMask)) break;
-
-// Count value areas in the subexpanse below the one for Index:
-
-            Pjv = P_JV(JL_JLB_PVALUE(Pjlb, subexp));
-            assert(Pjv != (Pjv_t) NULL);
-            posidx = j__udyCountBitsL(BitMap & (BitMask - 1));
-
-            return((PPvoid_t) (Pjv + posidx));
-
-#endif // JUDYL
-
-        } // case cJU_JPLEAF_B1
-
-#ifdef JUDY1
-
-// ****************************************************************************
-// JPFULLPOPU1:
-//
-// If the Index is in the expanse, it is necessarily valid (found).
-
-        case cJ1_JPFULLPOPU1:
-
-            if (JU_DCDNOTMATCHINDEX(Index, Pjp, 1)) break;
-            return(1);
-
-#ifdef notdef // for future enhancements
-#ifdef JU_64BIT
-
-// Note: Need ? if (JU_DCDNOTMATCHINDEX(Index, Pjp, 1)) break;
-
-        case cJ1_JPFULLPOPU1m15:
-            if (Pjp->jp_1Index[14] == (uint8_t)Index) break;
-        case cJ1_JPFULLPOPU1m14:
-            if (Pjp->jp_1Index[13] == (uint8_t)Index) break;
-        case cJ1_JPFULLPOPU1m13:
-            if (Pjp->jp_1Index[12] == (uint8_t)Index) break;
-        case cJ1_JPFULLPOPU1m12:
-            if (Pjp->jp_1Index[11] == (uint8_t)Index) break;
-        case cJ1_JPFULLPOPU1m11:
-            if (Pjp->jp_1Index[10] == (uint8_t)Index) break;
-        case cJ1_JPFULLPOPU1m10:
-            if (Pjp->jp_1Index[9] == (uint8_t)Index) break;
-        case cJ1_JPFULLPOPU1m9:
-            if (Pjp->jp_1Index[8] == (uint8_t)Index) break;
-        case cJ1_JPFULLPOPU1m8:
-            if (Pjp->jp_1Index[7] == (uint8_t)Index) break;
-#endif
-        case cJ1_JPFULLPOPU1m7:
-            if (Pjp->jp_1Index[6] == (uint8_t)Index) break;
-        case cJ1_JPFULLPOPU1m6:
-            if (Pjp->jp_1Index[5] == (uint8_t)Index) break;
-        case cJ1_JPFULLPOPU1m5:
-            if (Pjp->jp_1Index[4] == (uint8_t)Index) break;
-        case cJ1_JPFULLPOPU1m4:
-            if (Pjp->jp_1Index[3] == (uint8_t)Index) break;
-        case cJ1_JPFULLPOPU1m3:
-            if (Pjp->jp_1Index[2] == (uint8_t)Index) break;
-        case cJ1_JPFULLPOPU1m2:
-            if (Pjp->jp_1Index[1] == (uint8_t)Index) break;
-        case cJ1_JPFULLPOPU1m1:
-            if (Pjp->jp_1Index[0] == (uint8_t)Index) break;
-
-            return(1);  // found, not in exclusion list
-
-#endif // JUDY1
-#endif //  notdef
-
-// ****************************************************************************
-// JPIMMED*:
-//
-// Note that the contents of jp_DcdPopO are different for cJU_JPIMMED_*_01:
-
-        case cJU_JPIMMED_1_01:
-        case cJU_JPIMMED_2_01:
-        case cJU_JPIMMED_3_01:
-#ifdef JU_64BIT
-        case cJU_JPIMMED_4_01:
-        case cJU_JPIMMED_5_01:
-        case cJU_JPIMMED_6_01:
-        case cJU_JPIMMED_7_01:
-#endif
-            if (JU_JPDCDPOP0(Pjp) != JU_TRIMTODCDSIZE(Index)) break;
-
-  JUDY1CODE(return(1);)
-  JUDYLCODE(return((PPvoid_t) &(Pjp->jp_Addr));)  // immediate value area.
-
-
-//   Macros to make code more readable and avoid dup errors
-
-#ifdef JUDY1
-
-#define CHECKINDEXNATIVE(LEAF_T, PJP, IDX, INDEX)                       \
-if (((LEAF_T *)((PJP)->jp_1Index))[(IDX) - 1] == (LEAF_T)(INDEX))       \
-    return(1)
-
-#define CHECKLEAFNONNAT(LFBTS, PJP, INDEX, IDX, COPY)                   \
-{                                                                       \
-    Word_t   i_ndex;                                                    \
-    uint8_t *a_ddr;                                                     \
-    a_ddr  = (PJP)->jp_1Index + (((IDX) - 1) * (LFBTS));                \
-    COPY(i_ndex, a_ddr);                                                \
-    if (i_ndex == JU_LEASTBYTES((INDEX), (LFBTS)))                      \
-        return(1);                                                      \
-}
-#endif
-
-#ifdef JUDYL
-
-#define CHECKINDEXNATIVE(LEAF_T, PJP, IDX, INDEX)                       \
-if (((LEAF_T *)((PJP)->jp_LIndex))[(IDX) - 1] == (LEAF_T)(INDEX))       \
-        return((PPvoid_t)(P_JV((PJP)->jp_Addr) + (IDX) - 1))
-
-#define CHECKLEAFNONNAT(LFBTS, PJP, INDEX, IDX, COPY)                   \
-{                                                                       \
-    Word_t   i_ndex;                                                    \
-    uint8_t *a_ddr;                                                     \
-    a_ddr  = (PJP)->jp_LIndex + (((IDX) - 1) * (LFBTS));                \
-    COPY(i_ndex, a_ddr);                                                \
-    if (i_ndex == JU_LEASTBYTES((INDEX), (LFBTS)))                      \
-        return((PPvoid_t)(P_JV((PJP)->jp_Addr) + (IDX) - 1));           \
-}
-#endif
-
-#if (defined(JUDY1) && defined(JU_64BIT))
-        case cJ1_JPIMMED_1_15: CHECKINDEXNATIVE(uint8_t, Pjp, 15, Index);
-        case cJ1_JPIMMED_1_14: CHECKINDEXNATIVE(uint8_t, Pjp, 14, Index);
-        case cJ1_JPIMMED_1_13: CHECKINDEXNATIVE(uint8_t, Pjp, 13, Index);
-        case cJ1_JPIMMED_1_12: CHECKINDEXNATIVE(uint8_t, Pjp, 12, Index);
-        case cJ1_JPIMMED_1_11: CHECKINDEXNATIVE(uint8_t, Pjp, 11, Index);
-        case cJ1_JPIMMED_1_10: CHECKINDEXNATIVE(uint8_t, Pjp, 10, Index);
-        case cJ1_JPIMMED_1_09: CHECKINDEXNATIVE(uint8_t, Pjp,  9, Index);
-        case cJ1_JPIMMED_1_08: CHECKINDEXNATIVE(uint8_t, Pjp,  8, Index);
-#endif
-#if (defined(JUDY1) || defined(JU_64BIT))
-        case cJU_JPIMMED_1_07: CHECKINDEXNATIVE(uint8_t, Pjp,  7, Index);
-        case cJU_JPIMMED_1_06: CHECKINDEXNATIVE(uint8_t, Pjp,  6, Index);
-        case cJU_JPIMMED_1_05: CHECKINDEXNATIVE(uint8_t, Pjp,  5, Index);
-        case cJU_JPIMMED_1_04: CHECKINDEXNATIVE(uint8_t, Pjp,  4, Index);
-#endif
-        case cJU_JPIMMED_1_03: CHECKINDEXNATIVE(uint8_t, Pjp,  3, Index);
-        case cJU_JPIMMED_1_02: CHECKINDEXNATIVE(uint8_t, Pjp,  2, Index);
-                               CHECKINDEXNATIVE(uint8_t, Pjp,  1, Index);
-        break;
-
-#if (defined(JUDY1) && defined(JU_64BIT))
-        case cJ1_JPIMMED_2_07: CHECKINDEXNATIVE(uint16_t, Pjp, 7, Index);
-        case cJ1_JPIMMED_2_06: CHECKINDEXNATIVE(uint16_t, Pjp, 6, Index);
-        case cJ1_JPIMMED_2_05: CHECKINDEXNATIVE(uint16_t, Pjp, 5, Index);
-        case cJ1_JPIMMED_2_04: CHECKINDEXNATIVE(uint16_t, Pjp, 4, Index);
-#endif
-#if (defined(JUDY1) || defined(JU_64BIT))
-        case cJU_JPIMMED_2_03: CHECKINDEXNATIVE(uint16_t, Pjp, 3, Index);
-        case cJU_JPIMMED_2_02: CHECKINDEXNATIVE(uint16_t, Pjp, 2, Index);
-                               CHECKINDEXNATIVE(uint16_t, Pjp, 1, Index);
-        break;
-#endif
-
-#if (defined(JUDY1) && defined(JU_64BIT))
-        case cJ1_JPIMMED_3_05: 
-            CHECKLEAFNONNAT(3, Pjp, Index, 5, JU_COPY3_PINDEX_TO_LONG);
-        case cJ1_JPIMMED_3_04:
-            CHECKLEAFNONNAT(3, Pjp, Index, 4, JU_COPY3_PINDEX_TO_LONG);
-        case cJ1_JPIMMED_3_03:
-            CHECKLEAFNONNAT(3, Pjp, Index, 3, JU_COPY3_PINDEX_TO_LONG);
-#endif
-#if (defined(JUDY1) || defined(JU_64BIT))
-        case cJU_JPIMMED_3_02:
-            CHECKLEAFNONNAT(3, Pjp, Index, 2, JU_COPY3_PINDEX_TO_LONG);
-            CHECKLEAFNONNAT(3, Pjp, Index, 1, JU_COPY3_PINDEX_TO_LONG);
-            break;
-#endif
-
-#if (defined(JUDY1) && defined(JU_64BIT))
-
-        case cJ1_JPIMMED_4_03: CHECKINDEXNATIVE(uint32_t, Pjp, 3, Index);
-        case cJ1_JPIMMED_4_02: CHECKINDEXNATIVE(uint32_t, Pjp, 2, Index);
-                               CHECKINDEXNATIVE(uint32_t, Pjp, 1, Index);
-            break;
-
-        case cJ1_JPIMMED_5_03:
-            CHECKLEAFNONNAT(5, Pjp, Index, 3, JU_COPY5_PINDEX_TO_LONG);
-        case cJ1_JPIMMED_5_02:
-            CHECKLEAFNONNAT(5, Pjp, Index, 2, JU_COPY5_PINDEX_TO_LONG);
-            CHECKLEAFNONNAT(5, Pjp, Index, 1, JU_COPY5_PINDEX_TO_LONG);
-            break;
-
-        case cJ1_JPIMMED_6_02:
-            CHECKLEAFNONNAT(6, Pjp, Index, 2, JU_COPY6_PINDEX_TO_LONG);
-            CHECKLEAFNONNAT(6, Pjp, Index, 1, JU_COPY6_PINDEX_TO_LONG);
-            break;
-
-        case cJ1_JPIMMED_7_02:
-            CHECKLEAFNONNAT(7, Pjp, Index, 2, JU_COPY7_PINDEX_TO_LONG);
-            CHECKLEAFNONNAT(7, Pjp, Index, 1, JU_COPY7_PINDEX_TO_LONG);
-            break;
-
-#endif // (JUDY1 && JU_64BIT)
-
-
-// ****************************************************************************
-// INVALID JP TYPE:
-
-        default:
-
-ReturnCorrupt:
-
-#ifdef JUDYGETINLINE    // Pjpm is known to be non-null:
-            JU_SET_ERRNO_NONNULL(Pjpm, JU_ERRNO_CORRUPT);
-#else
-            JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-#endif
-            JUDY1CODE(return(JERRI );)
-            JUDYLCODE(return(PPJERR);)
-
-        } // switch on JP type
-
-JUDY1CODE(return(0);)
-JUDYLCODE(return((PPvoid_t) NULL);)
-
-} // Judy1Test() / JudyLGet()
-
-
-#ifndef JUDYGETINLINE   // only compile the following function once:
-#ifdef DEBUG
-
-// ****************************************************************************
-// J U D Y   C H E C K   P O P
-//
-// Given a pointer to a Judy array, traverse the entire array to ensure
-// population counts add up correctly.  This can catch various coding errors.
-//
-// Since walking the entire tree is probably time-consuming, enable this
-// function by setting env parameter $CHECKPOP to first call at which to start
-// checking.  Note:  This function is called both from insert and delete code.
-//
-// Note:  Even though this function does nothing useful for LEAFW leaves, its
-// good practice to call it anyway, and cheap too.
-//
-// TBD:  This is a debug-only check function similar to JudyCheckSorted(), but
-// since it walks the tree it is Judy1/JudyL-specific and must live in a source
-// file that is built both ways.
-//
-// TBD:  As feared, enabling this code for every insert/delete makes Judy
-// deathly slow, even for a small tree (10K indexes).  Its not so bad if
-// present but disabled (<1% slowdown measured).  Still, should it be ifdefd
-// other than DEBUG and/or called less often?
-//
-// TBD:  Should this "population checker" be expanded to a comprehensive tree
-// checker?  It currently detects invalid LEAFW/JP types as well as inconsistent
-// pop1s.  Other possible checks, all based on essentially redundant data in
-// the Judy tree, include:
-//
-// - Zero LS bits in jp_Addr field.
-//
-// - Correct Dcd bits.
-//
-// - Consistent JP types (always descending down the tree).
-//
-// - Sorted linear lists in BranchLs and leaves (using JudyCheckSorted(), but
-//   ideally that function is already called wherever appropriate after any
-//   linear list is modified).
-//
-// - Any others possible?
-
-#include <stdlib.h>             // for getenv() and atol().
-
-static Word_t JudyCheckPopSM(Pjp_t Pjp, Word_t RootPop1);
-
-FUNCTION void JudyCheckPop(
-        Pvoid_t PArray)
-{
-static  bool_t  checked = FALSE;        // already checked env parameter.
-static  bool_t  enabled = FALSE;        // env parameter set.
-static  bool_t  active  = FALSE;        // calls >= callsmin.
-static  Word_t  callsmin;               // start point from $CHECKPOP.
-static  Word_t  calls = 0;              // times called so far.
-
-
-// CHECK FOR EXTERNAL ENABLING:
-
-        if (! checked)                  // only check once.
-        {
-            char * value;               // for getenv().
-
-            checked = TRUE;
-
-            if ((value = getenv("CHECKPOP")) == (char *) NULL)
-            {
-#ifdef notdef
-// Take this out because nightly tests want to be flavor-independent; its not
-// OK to emit special non-error output from the debug flavor:
-
-                (void) puts("JudyCheckPop() present but not enabled by "
-                            "$CHECKPOP env parameter; set it to the number of "
-                            "calls at which to begin checking");
-#endif
-                return;
-            }
-
-            callsmin = atol(value);     // note: non-number evaluates to 0.
-            enabled  = TRUE;
-
-            (void) printf("JudyCheckPop() present and enabled; callsmin = "
-                          "%lu\n", callsmin);
-        }
-        else if (! enabled) return;
-
-// Previously or just now enabled; check if non-active or newly active:
-
-        if (! active)
-        {
-            if (++calls < callsmin) return;
-
-            (void) printf("JudyCheckPop() activated at call %lu\n", calls);
-            active = TRUE;
-        }
-
-// IGNORE LEAFW AT TOP OF TREE:
-
-        if (JU_LEAFW_POP0(PArray) < cJU_LEAFW_MAXPOP1) // must be a LEAFW
-                return;
-
-// Check JPM pop0 against tree, recursively:
-//
-// Note:  The traversal code in JudyCheckPopSM() is simplest when the case
-// statement for each JP type compares the pop1 for that JP to its subtree (if
-// any) after traversing the subtree (thats the hard part) and adding up
-// actual pop1s.  A top branchs JP in the JPM does not have room for a
-// full-word pop1, so pass it in as a special case.
-
-        {
-            Pjpm_t Pjpm = P_JPM(PArray);
-            (void) JudyCheckPopSM(&(Pjpm->jpm_JP), Pjpm->jpm_Pop0 + 1);
-            return;
-        }
-
-} // JudyCheckPop()
-
-
-// ****************************************************************************
-// J U D Y   C H E C K   P O P   S M
-//
-// Recursive state machine (subroutine) for JudyCheckPop():  Given a Pjp (other
-// than JPNULL*; caller should shortcut) and the root population for top-level
-// branches, check the subtrees actual pop1 against its nominal value, and
-// return the total pop1 for the subtree.
-//
-// Note:  Expect RootPop1 to be ignored at lower levels, so pass down 0, which
-// should pop an assertion if this expectation is violated.
-
-FUNCTION static Word_t JudyCheckPopSM(
-        Pjp_t  Pjp,             // top of subtree.
-        Word_t RootPop1)        // whole array, for top-level branches only.
-{
-        Word_t pop1_jp;         // nominal population from the JP.
-        Word_t pop1 = 0;        // actual population at this level.
-        Word_t offset;          // in a branch.
-
-#define PREPBRANCH(cPopBytes,Next) \
-        pop1_jp = JU_JPBRANCH_POP0(Pjp, cPopBytes) + 1; goto Next
-
-assert((((Word_t) (Pjp->jp_Addr)) & 7) == 3);
-        switch (JU_JPTYPE(Pjp))
-        {
-
-        case cJU_JPBRANCH_L2: PREPBRANCH(2, BranchL);
-        case cJU_JPBRANCH_L3: PREPBRANCH(3, BranchL);
-#ifdef JU_64BIT
-        case cJU_JPBRANCH_L4: PREPBRANCH(4, BranchL);
-        case cJU_JPBRANCH_L5: PREPBRANCH(5, BranchL);
-        case cJU_JPBRANCH_L6: PREPBRANCH(6, BranchL);
-        case cJU_JPBRANCH_L7: PREPBRANCH(7, BranchL);
-#endif
-        case cJU_JPBRANCH_L:  pop1_jp = RootPop1;
-        {
-            Pjbl_t Pjbl;
-BranchL:
-            Pjbl = P_JBL(Pjp->jp_Addr);
-
-            for (offset = 0; offset < (Pjbl->jbl_NumJPs); ++offset)
-                pop1 += JudyCheckPopSM((Pjbl->jbl_jp) + offset, 0);
-
-            assert(pop1_jp == pop1);
-            return(pop1);
-        }
-
-        case cJU_JPBRANCH_B2: PREPBRANCH(2, BranchB);
-        case cJU_JPBRANCH_B3: PREPBRANCH(3, BranchB);
-#ifdef JU_64BIT
-        case cJU_JPBRANCH_B4: PREPBRANCH(4, BranchB);
-        case cJU_JPBRANCH_B5: PREPBRANCH(5, BranchB);
-        case cJU_JPBRANCH_B6: PREPBRANCH(6, BranchB);
-        case cJU_JPBRANCH_B7: PREPBRANCH(7, BranchB);
-#endif
-        case cJU_JPBRANCH_B:  pop1_jp = RootPop1;
-        {
-            Word_t subexp;
-            Word_t jpcount;
-            Pjbb_t Pjbb;
-BranchB:
-            Pjbb = P_JBB(Pjp->jp_Addr);
-
-            for (subexp = 0; subexp < cJU_NUMSUBEXPB; ++subexp)
-            {
-                jpcount = j__udyCountBitsB(JU_JBB_BITMAP(Pjbb, subexp));
-
-                for (offset = 0; offset < jpcount; ++offset)
-                {
-                    pop1 += JudyCheckPopSM(P_JP(JU_JBB_PJP(Pjbb, subexp))
-                                         + offset, 0);
-                }
-            }
-
-            assert(pop1_jp == pop1);
-            return(pop1);
-        }
-
-        case cJU_JPBRANCH_U2: PREPBRANCH(2, BranchU);
-        case cJU_JPBRANCH_U3: PREPBRANCH(3, BranchU);
-#ifdef JU_64BIT
-        case cJU_JPBRANCH_U4: PREPBRANCH(4, BranchU);
-        case cJU_JPBRANCH_U5: PREPBRANCH(5, BranchU);
-        case cJU_JPBRANCH_U6: PREPBRANCH(6, BranchU);
-        case cJU_JPBRANCH_U7: PREPBRANCH(7, BranchU);
-#endif
-        case cJU_JPBRANCH_U:  pop1_jp = RootPop1;
-        {
-            Pjbu_t Pjbu;
-BranchU:
-            Pjbu = P_JBU(Pjp->jp_Addr);
-
-            for (offset = 0; offset < cJU_BRANCHUNUMJPS; ++offset)
-            {
-                if (((Pjbu->jbu_jp[offset].jp_Type) >= cJU_JPNULL1)
-                 && ((Pjbu->jbu_jp[offset].jp_Type) <= cJU_JPNULLMAX))
-                {
-                    continue;           // skip null JP to save time.
-                }
-
-                pop1 += JudyCheckPopSM((Pjbu->jbu_jp) + offset, 0);
-            }
-
-            assert(pop1_jp == pop1);
-            return(pop1);
-        }
-
-
-// -- Cases below here terminate and do not recurse. --
-//
-// For all of these cases except JPLEAF_B1, there is no way to check the JPs
-// pop1 against the object itself; just return the pop1; but for linear leaves,
-// a bounds check is possible.
-
-#define CHECKLEAF(MaxPop1)                              \
-        pop1 = JU_JPLEAF_POP0(Pjp) + 1;                 \
-        assert(pop1 >= 1);                              \
-        assert(pop1 <= (MaxPop1));                      \
-        return(pop1)
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-        case cJU_JPLEAF1:  CHECKLEAF(cJU_LEAF1_MAXPOP1);
-#endif
-        case cJU_JPLEAF2:  CHECKLEAF(cJU_LEAF2_MAXPOP1);
-        case cJU_JPLEAF3:  CHECKLEAF(cJU_LEAF3_MAXPOP1);
-#ifdef JU_64BIT
-        case cJU_JPLEAF4:  CHECKLEAF(cJU_LEAF4_MAXPOP1);
-        case cJU_JPLEAF5:  CHECKLEAF(cJU_LEAF5_MAXPOP1);
-        case cJU_JPLEAF6:  CHECKLEAF(cJU_LEAF6_MAXPOP1);
-        case cJU_JPLEAF7:  CHECKLEAF(cJU_LEAF7_MAXPOP1);
-#endif
-
-        case cJU_JPLEAF_B1:
-        {
-            Word_t subexp;
-            Pjlb_t Pjlb;
-
-            pop1_jp = JU_JPLEAF_POP0(Pjp) + 1;
-
-            Pjlb = P_JLB(Pjp->jp_Addr);
-
-            for (subexp = 0; subexp < cJU_NUMSUBEXPL; ++subexp)
-                pop1 += j__udyCountBitsL(JU_JLB_BITMAP(Pjlb, subexp));
-
-            assert(pop1_jp == pop1);
-            return(pop1);
-        }
-
-        JUDY1CODE(case cJ1_JPFULLPOPU1: return(cJU_JPFULLPOPU1_POP0);)
-
-        case cJU_JPIMMED_1_01:  return(1);
-        case cJU_JPIMMED_2_01:  return(1);
-        case cJU_JPIMMED_3_01:  return(1);
-#ifdef JU_64BIT
-        case cJU_JPIMMED_4_01:  return(1);
-        case cJU_JPIMMED_5_01:  return(1);
-        case cJU_JPIMMED_6_01:  return(1);
-        case cJU_JPIMMED_7_01:  return(1);
-#endif
-
-        case cJU_JPIMMED_1_02:  return(2);
-        case cJU_JPIMMED_1_03:  return(3);
-#if (defined(JUDY1) || defined(JU_64BIT))
-        case cJU_JPIMMED_1_04:  return(4);
-        case cJU_JPIMMED_1_05:  return(5);
-        case cJU_JPIMMED_1_06:  return(6);
-        case cJU_JPIMMED_1_07:  return(7);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-        case cJ1_JPIMMED_1_08:  return(8);
-        case cJ1_JPIMMED_1_09:  return(9);
-        case cJ1_JPIMMED_1_10:  return(10);
-        case cJ1_JPIMMED_1_11:  return(11);
-        case cJ1_JPIMMED_1_12:  return(12);
-        case cJ1_JPIMMED_1_13:  return(13);
-        case cJ1_JPIMMED_1_14:  return(14);
-        case cJ1_JPIMMED_1_15:  return(15);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-        case cJU_JPIMMED_2_02:  return(2);
-        case cJU_JPIMMED_2_03:  return(3);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-        case cJ1_JPIMMED_2_04:  return(4);
-        case cJ1_JPIMMED_2_05:  return(5);
-        case cJ1_JPIMMED_2_06:  return(6);
-        case cJ1_JPIMMED_2_07:  return(7);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-        case cJU_JPIMMED_3_02:  return(2);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-        case cJ1_JPIMMED_3_03:  return(3);
-        case cJ1_JPIMMED_3_04:  return(4);
-        case cJ1_JPIMMED_3_05:  return(5);
-
-        case cJ1_JPIMMED_4_02:  return(2);
-        case cJ1_JPIMMED_4_03:  return(3);
-        case cJ1_JPIMMED_5_02:  return(2);
-        case cJ1_JPIMMED_5_03:  return(3);
-        case cJ1_JPIMMED_6_02:  return(2);
-        case cJ1_JPIMMED_7_02:  return(2);
-#endif
-
-        } // switch (JU_JPTYPE(Pjp))
-
-        assert(FALSE);          // unrecognized JP type => corruption.
-        return(0);              // to make some compilers happy.
-
-} // JudyCheckPopSM()
-
-#endif // DEBUG
-#endif // ! JUDYGETINLINE
diff --git a/libs/klib/judy/JudyHS.c b/libs/klib/judy/JudyHS.c
deleted file mode 100644
index aa9fbfa..0000000
--- a/libs/klib/judy/JudyHS.c
+++ /dev/null
@@ -1,770 +0,0 @@
-//=======================================================================
-//   Author Douglas L. Baskins, Dec 2003.
-//   Permission to use this code is freely granted, provided that this
-//   statement is retained.
-//   email - doug at sourcejudy.com -or- dougbaskins at yahoo.com
-//=======================================================================
-
-#include <string.h>                     // for memcmp(), memcpy()
-
-#include <Judy.h>                       // for JudyL* routines/macros
-
-/*
-   This routine is a very fast "string" version of an ADT that stores
-   (JudyHSIns()), retrieves (JudyHSGet()), deletes (JudyHSDel()) and
-   frees the entire ADT (JudyHSFreeArray()) strings.  It uses the "Judy
-   arrays" JudyL() API as the main workhorse.  The length of the string
-   is included in the calling parameters so that strings with embedded
-   \0s can be used.  The string lengths can be from 0 bytes to whatever
-   malloc() can handle (~2GB).
-
-   Compile:
-  
-      cc -O JudyHS.c -c         needs to link with -lJudy (libJudy.a)
-  
-      Note: in gcc version 3.3.1, -O2 generates faster code than -O
-      Note: in gcc version 3.3.2, -O3 generates faster code than -O2
-
-   NOTES:
-
-1) There may be some performance issues with 64 bit machines, because I
-   have not characterized that it yet.
-
-2) It appears that a modern CPU (>2Ghz) that the instruction times are
-   much faster that a RAM access, so building up a word from bytes takes
-   no longer that a whole word access.  I am taking advantage of this to
-   make this code endian neutral.  A side effect of this is strings do
-   not need to be aligned, nor tested to be on to a word boundry.  In
-   older and in slow (RISC) machines, this may be a performance issue.
-   I have given up trying to optimize for machines that have very slow
-   mpy, mod, variable shifts and call returns.
-
-3) JudyHS is very scalable from 1 string to billions (with enough RAM).
-   The memory usage is also scales with population.  I have attempted to
-   combine the best characteristics of JudyL arrays with Hashing methods
-   and well designed modern processors (such as the 1.3Ghz Intel
-   Centrino this is being written on).
-
-   HOW JudyHS WORKS: ( 4[8] means 4 bytes in 32 bit machine and 8 in 64)
-
-   A) A JudyL array is used to separate strings of equal lengths into
-   their own structures (a different hash table is used for each length
-   of string).  The additional time overhead is very near zero because
-   of the CPU cache.  The space efficiency is improved because the
-   length need not be stored with the string (ls_t).  The "JLHash" ADT
-   in the test program "StringCompare" is verification of both these
-   assumptions.
-
-   B) A 32 bit hash value is produced from the string.  Many thanks to
-   the Internet and the author (Bob Jenkins) for coming up with a very
-   good and fast universal string hash.  Next the 32 bit hash number is
-   used as an Index to another JudyL array.  Notice that one (1) JudyL
-   array is used as a hash table per each string length.  If there are
-   no hash collisions (normally) then the string is copied to a
-   structure (ls_t) along with room for storing a Value.  A flag is
-   added to the pointer to note it is pointing to a ls_t structure.
-   Since the lengths of the strings are the same, there is no need to
-   stored length of string in the ls_t structure.  This saves about a
-   word per string of memory.
-
-   C) When there is a hashing collision (very rare), a JudyL array is
-   used to decode the next 4[8] bytes of the string.  That is, the next
-   4[8] bytes of the string are used as the Index.  This process is
-   repeated until the remaining string is unique.  The remaining string
-   (if any) is stored in a (now smaller) ls_t structure.  If the
-   remaining string is less or equal to 4[8] bytes, then the ls_t
-   structure is not needed and the Value area in the JudyL array is
-   used.  A compile option -DDONOTUSEHASH is available to test this
-   structure without using hashing (only the JudyL tree is used).  This
-   is equivalent to having all strings hashed to the same bucket.  The
-   speed is still better than all other tree based ADTs I have tested.
-   An added benefit of this is a very fast "hash collision" resolving.
-   It could foil hackers that exploit the slow synonym (linked-list)
-   collision handling property used with most hashing algorithms.  If
-   this is not a necessary property, then a simpler ADT "JLHash" that is
-   documented the the test program "StringCompare.c" may be used with a
-   little loss of memory efficiency (because it includes the string
-   length with the ls_t structure).  JudyHS was written to be the
-   fastest, very scalable, memory efficient, general purpose string ADT
-   possible.  (However, I would like to eat those words someday). (dlb)
-
-*/
-
-#ifdef EXAMPLE_CODE
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-
-#include <Judy.h>
-
-//#include "JudyHS.h"                   // for Judy.h without JudyHS*()
-
-// By Doug Baskins Apr 2004 - for JudyHS man page
-
-#define MAXLINE 1000000                 /* max length of line */
-char      Index[MAXLINE];               // string to check
-
-int     // Usage:  CheckDupLines < file
-main()
-{
-    Pvoid_t   PJArray = (PWord_t)NULL;  // Judy array.
-    PWord_t   PValue;                   // ^ Judy array element.
-    Word_t    Bytes;                    // size of JudyHS array.
-    Word_t    LineNumb = 0;             // current line number
-    Word_t    Dups = 0;                 // number of duplicate lines
-
-    while (fgets(Index, MAXLINE, stdin) != (char *)NULL)
-    {
-        LineNumb++;                     // line number
-
-//      store string into array
-        JHSI(PValue, PJArray, Index, strlen(Index)); 
-        if (*PValue)                    // check if duplicate
-        {
-            Dups++;                     // count duplicates
-            printf("Duplicate lines %lu:%lu:%s", *PValue, LineNumb, Index);
-        }
-        else
-        {
-            *PValue = LineNumb;         // store Line number
-        }
-    }
-    printf("%lu Duplicates, free JudyHS array of %lu Lines\n", 
-                    Dups, LineNumb - Dups);
-    JHSFA(Bytes, PJArray);              // free array
-    printf("The JudyHS array allocated %lu bytes of memory\n", Bytes);
-    return (0);
-}
-#endif // EXAMPLE_CODE
-
-// Note:  Use JLAP_INVALID, which is non-zero, to mark pointers to a ls_t
-// This makes it compatable with previous versions of JudyL()
-
-#define IS_PLS(PLS)     (((Word_t) (PLS)) & JLAP_INVALID)
-#define CLEAR_PLS(PLS)  (((Word_t) (PLS)) & (~JLAP_INVALID))
-#define SET_PLS(PLS)    (((Word_t) (PLS)) | JLAP_INVALID)
-
-#define WORDSIZE     (sizeof(Word_t))
-
-// this is the struct used for "leaf" strings.  Note that
-// the Value is followed by a "variable" length ls_String array.
-//
-typedef struct L_EAFSTRING
-{
-    Word_t    ls_Value;                 // Value area (cannot change size)
-    uint8_t   ls_String[WORDSIZE];      // to fill out to a Word_t size
-} ls_t     , *Pls_t;
-
-#define LS_STRUCTOVD     (sizeof(ls_t) - WORDSIZE)
-
-// Calculate size of ls_t including the string of length of LEN.
-//
-#define LS_WORDLEN(LEN)  (((LEN) + LS_STRUCTOVD + WORDSIZE - 1) / WORDSIZE)
-
-// Copy from 0..4[8] bytes from string to a Word_t
-// NOTE: the copy in in little-endian order to take advantage of improved 
-// memory efficiency of JudyLIns() with smaller numbers
-//
-#define        COPYSTRING4toWORD(WORD,STR,LEN)          \
-{                                                       \
-    WORD = 0;                                           \
-    switch(LEN)                                         \
-    {                                                   \
-    default:    /* four and greater */                  \
-    case 4:                                             \
-        WORD += (Word_t)(((uint8_t *)(STR))[3] << 24);  \
-    case 3:                                             \
-        WORD += (Word_t)(((uint8_t *)(STR))[2] << 16);  \
-    case 2:                                             \
-        WORD += (Word_t)(((uint8_t *)(STR))[1] <<  8);  \
-    case 1:                                             \
-        WORD += (Word_t)(((uint8_t *)(STR))[0]);        \
-    case 0: break;                                      \
-    }                                                   \
-}
-
-#ifdef JU_64BIT
-
-// copy from 0..8 bytes from string to Word_t
-//
-#define        COPYSTRING8toWORD(WORD,STR,LEN)          \
-{                                                       \
-    WORD = 0UL;                                         \
-    switch(LEN)                                         \
-    {                                                   \
-    default:    /* eight and greater */                 \
-    case 8:                                             \
-        WORD += ((Word_t)((uint8_t *)(STR))[7] << 56);  \
-    case 7:                                             \
-        WORD += ((Word_t)((uint8_t *)(STR))[6] << 48);  \
-    case 6:                                             \
-        WORD += ((Word_t)((uint8_t *)(STR))[5] << 40);  \
-    case 5:                                             \
-        WORD += ((Word_t)((uint8_t *)(STR))[4] << 32);  \
-    case 4:                                             \
-        WORD += ((Word_t)((uint8_t *)(STR))[3] << 24);  \
-    case 3:                                             \
-        WORD += ((Word_t)((uint8_t *)(STR))[2] << 16);  \
-    case 2:                                             \
-        WORD += ((Word_t)((uint8_t *)(STR))[1] <<  8);  \
-    case 1:                                             \
-        WORD += ((Word_t)((uint8_t *)(STR))[0]);        \
-    case 0: break;                                      \
-    }                                                   \
-}
-
-#define COPYSTRINGtoWORD COPYSTRING8toWORD
-
-#else  // JU_32BIT
-
-#define COPYSTRINGtoWORD COPYSTRING4toWORD
-
-#endif // JU_32BIT
-
-// set JError_t locally
-
-#define JU_SET_ERRNO(PJERROR, JERRNO)           \
-{                                               \
-    if (PJERROR != (PJError_t) NULL)            \
-    {                                           \
-        if (JERRNO)                             \
-            JU_ERRNO(PJError) = (JERRNO);       \
-        JU_ERRID(PJERROR) = __LINE__;           \
-    }                                           \
-}
-
-//=======================================================================
-// This routine must hash string to 24..32 bits.  The "goodness" of
-// the hash is not as important as its speed.
-//=======================================================================
-
-// hash to no more than 32 bits
-
-// extern Word_t gHmask; for hash bits experiments
-
-#define JUDYHASHSTR(HVALUE,STRING,LENGTH)       \
-{                                               \
-    uint8_t *p_ = (uint8_t *)(STRING);          \
-    uint8_t *q_ = p_ + (LENGTH);                \
-    uint32_t c_ = 0;                            \
-    for (; p_ != q_; ++p_)                      \
-    {                                           \
-        c_ = (c_ * 31) + *p_;                   \
-    }                                           \
-/*  c_ &= gHmask;   see above   */              \
-    (HVALUE) = c_;                              \
-}
-
-// Find String of Len in JudyHS structure, return pointer to associated Value
-
-PPvoid_t
-JudyHSGet(Pcvoid_t PArray,              // pointer (^) to structure
-           void * Str,                  // pointer to string
-           Word_t Len                   // length of string
-    )
-{
-    uint8_t  *String = (uint8_t *)Str;
-    PPvoid_t  PPValue;                  // pointer to Value
-    Word_t    Index;                    // 4[8] bytes of String
-
-    JLG(PPValue, PArray, Len);          // find hash table for strings of Len
-    if (PPValue == (PPvoid_t) NULL)
-        return ((PPvoid_t) NULL);       // no strings of this Len
-
-//  check for caller error (null pointer)
-//
-    if ((String == (void *) NULL) && (Len != 0))
-        return ((PPvoid_t) NULL);       // avoid null-pointer dereference
-
-#ifndef DONOTUSEHASH
-    if (Len > WORDSIZE)                 // Hash table not necessary with short
-    {
-        uint32_t  HValue;               // hash of input string
-        JUDYHASHSTR(HValue, String, Len);       // hash to no more than 32 bits
-        JLG(PPValue, *PPValue, (Word_t)HValue); // get ^ to hash bucket
-        if (PPValue == (PPvoid_t) NULL)
-            return ((PPvoid_t) NULL);   // no entry in Hash table
-    }
-#endif // DONOTUSEHASH
-
-/*
-  Each JudyL array decodes 4[8] bytes of the string.  Since the hash
-  collisions occur very infrequently, the performance is not important.
-  However, even if the Hash code is not used this method still is
-  significantly faster than common tree methods (AVL, Red-Black, Splay,
-  b-tree, etc..).  You can compare it yourself with #define DONOTUSEHASH
-  1 or putting -DDONOTUSEHASH in the cc line.  Use the "StringCompare.c"
-  code to compare (9Dec2003 dlb).
-*/
-    while (Len > WORDSIZE)              // traverse tree of JudyL arrays
-    {
-        if (IS_PLS(*PPValue))           // ^ to JudyL array or ls_t struct?
-        {
-            Pls_t     Pls;              // ls_t struct, termination of tree
-            Pls = (Pls_t) CLEAR_PLS(*PPValue);  // remove flag from ^
-
-//          if remaining string matches, return ^ to Value, else NULL
-
-            if (memcmp(String, Pls->ls_String, Len) == 0)
-                return ((PPvoid_t) (&(Pls->ls_Value)));
-            else
-                return ((PPvoid_t) NULL);       // string does not match
-        }
-        else
-        {
-            COPYSTRINGtoWORD(Index, String, WORDSIZE);
-
-            JLG(PPValue, *PPValue, Index);      // decode next 4[8] bytes
-            if (PPValue == (PPvoid_t) NULL)     // if NULL array, bail out
-                return ((PPvoid_t) NULL);       // string does not match
-
-            String += WORDSIZE;                 // advance
-            Len -= WORDSIZE;
-        }
-    }
-
-//  Get remaining 1..4[8] bytes left in string
-
-    COPYSTRINGtoWORD(Index, String, Len);
-    JLG(PPValue, *PPValue, Index);      // decode last 1-4[8] bytes
-    return (PPValue);
-}
-
-// Add string to a tree of JudyL arrays (all lengths must be same)
-
-static PPvoid_t
-insStrJudyLTree(uint8_t * String,      // string to add to tree of JudyL arrays
-                 Word_t Len,            // length of string
-                 PPvoid_t PPValue,      // pointer to root pointer
-                 PJError_t PJError      // for returning error info
-    )
-{
-    Word_t    Index;                    // next 4[8] bytes of String
-
-    while (Len > WORDSIZE)              // add to JudyL tree
-    {
-//      CASE 1, pointer is to a NULL, make a new ls_t leaf
-
-        if (*PPValue == (Pvoid_t)NULL)
-        {
-            Pls_t     Pls;              // memory for a ls_t
-            Pls = (Pls_t) JudyMalloc(LS_WORDLEN(Len));
-            if (Pls == NULL)
-            {
-                JU_SET_ERRNO(PJError, JU_ERRNO_NOMEM);
-                return (PPJERR);
-            }
-            Pls->ls_Value = 0;                          // clear Value word
-            memcpy(Pls->ls_String, String, Len);        // copy to new struct
-            *PPValue = (Pvoid_t)SET_PLS(Pls);           // mark pointer
-            return ((PPvoid_t) (&Pls->ls_Value));       // return ^ to Value
-        }                                               // no exit here
-//      CASE 2: is a ls_t, free (and shorten), then decode into JudyL tree
-
-        if (IS_PLS(*PPValue))                   // pointer to a ls_t? (leaf)
-        {
-            Pls_t     Pls;                      // ^ to ls_t
-            uint8_t  *String0;                  // ^ to string in ls_t
-            Word_t    Index0;                   // 4[8] bytes in string
-            Word_t    FreeLen;                  // length of ls_t
-            PPvoid_t  PPsplit;
-
-            FreeLen = LS_WORDLEN(Len);          // length of ls_t
-
-            Pls = (Pls_t) CLEAR_PLS(*PPValue);  // demangle ^ to ls_t
-            String0 = Pls->ls_String;
-            if (memcmp(String, String0, Len) == 0)      // check if match?
-            {
-                return ((PPvoid_t) (&Pls->ls_Value));   // yes, duplicate
-            }
-
-            *PPValue = NULL;            // clear ^ to ls_t and make JudyL
-
-//          This do loop is technically not required, saves multiple JudyFree()
-//          when storing already sorted strings into structure
-
-            do                          // decode next 4[8] bytes of string
-            {                           // with a JudyL array
-//              Note: string0 is always aligned
-
-                COPYSTRINGtoWORD(Index0, String0, WORDSIZE);
-                String0 += WORDSIZE;
-                COPYSTRINGtoWORD(Index, String, WORDSIZE);
-                String += WORDSIZE;
-                Len -= WORDSIZE;
-                PPsplit = PPValue;      // save for split below
-                PPValue = JudyLIns(PPValue, Index0, PJError);
-                if (PPValue == PPJERR)
-                {
-                    JU_SET_ERRNO(PJError, 0);
-                    return (PPJERR);
-                }
-
-            } while ((Index0 == Index) && (Len > WORDSIZE));
-
-//          finish storing remainder of string that was in the ls_t
-
-            PPValue = insStrJudyLTree(String0, Len, PPValue, PJError);
-            if (PPValue == PPJERR)
-            {
-                return (PPJERR);
-            }
-//          copy old Value to Value in new struct
-
-            *(PWord_t)PPValue = Pls->ls_Value;
-
-//          free the string buffer (ls_t)
-
-            JudyFree((Pvoid_t)Pls, FreeLen);
-            PPValue = JudyLIns(PPsplit, Index, PJError);
-            if (PPValue == PPJERR)
-            {
-                JU_SET_ERRNO(PJError, 0);
-                return (PPValue);
-            }
-
-//          finish remainder of newly inserted string
-
-            PPValue = insStrJudyLTree(String, Len, PPValue, PJError);
-            return (PPValue);
-        }                               // no exit here
-//      CASE 3, more JudyL arrays, decode to next tree
-
-        COPYSTRINGtoWORD(Index, String, WORDSIZE);
-        Len -= WORDSIZE;
-        String += WORDSIZE;
-
-        PPValue = JudyLIns(PPValue, Index, PJError);    // next 4[8] bytes
-        if (PPValue == PPJERR)
-        {
-            JU_SET_ERRNO(PJError, 0);
-            return (PPValue);
-        }
-    }
-//  this is done outside of loop so "Len" can be an unsigned number
-
-    COPYSTRINGtoWORD(Index, String, Len);
-    PPValue = JudyLIns(PPValue, Index, PJError);    // remaining 4[8] bytes
-
-    return (PPValue);
-}
-
-
-// Insert string to JudyHS structure, return pointer to associated Value
-
-PPvoid_t
-JudyHSIns(PPvoid_t PPArray,             // ^ to JudyHashArray name
-           void * Str,                  // pointer to string
-           Word_t Len,                  // length of string
-           PJError_t PJError            // optional, for returning error info
-    )
-{
-    uint8_t * String = (uint8_t *)Str;
-    PPvoid_t  PPValue;
-
-//  string can only be NULL if Len is 0.
-
-    if ((String == (uint8_t *) NULL) && (Len != 0UL))
-    {
-        JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);
-        return (PPJERR);
-    }
-    JLG(PPValue, *PPArray, Len);        // JudyL hash table for strings of Len
-    if (PPValue == (PPvoid_t) NULL)     // make new if missing, (very rare)
-    {
-        PPValue = JudyLIns(PPArray, Len, PJError);
-        if (PPValue == PPJERR)
-        {
-            JU_SET_ERRNO(PJError, 0);
-            return (PPJERR);
-        }
-    }
-#ifndef DONOTUSEHASH
-    if (Len > WORDSIZE)
-    {
-        uint32_t  HValue;                       // hash of input string
-        JUDYHASHSTR(HValue, String, Len);       // hash to no more than 32 bits
-        PPValue = JudyLIns(PPValue, (Word_t)HValue, PJError);
-        if (PPValue == PPJERR)
-        {
-            JU_SET_ERRNO(PJError, 0);
-            return (PPJERR);
-        }
-    }
-#endif // DONOTUSEHASH
-
-    PPValue = insStrJudyLTree(String, Len, PPValue, PJError); // add string 
-    return (PPValue);                   //  ^  to Value
-}
-
-// Delete string from tree of JudyL arrays (all Lens must be same)
-
-static int
-delStrJudyLTree(uint8_t * String,      // delete from tree of JudyL arrays
-                 Word_t Len,            // length of string
-                 PPvoid_t PPValue,      // ^ to hash bucket
-                 PJError_t PJError      // for returning error info
-    )
-{
-    PPvoid_t  PPValueN;                 // next pointer
-    Word_t    Index;
-    int       Ret;                      // -1=failed, 1=success, 2=quit del
-
-    if (IS_PLS(*PPValue))               // is pointer to ls_t?
-    {
-        Pls_t     Pls;
-        Pls = (Pls_t) CLEAR_PLS(*PPValue);      // demangle pointer
-        JudyFree((Pvoid_t)Pls, LS_WORDLEN(Len));        // free the ls_t
-
-        *PPValue = (Pvoid_t)NULL;       // clean pointer
-        return (1);                     // successfully deleted
-    }
-
-    if (Len > WORDSIZE)                 // delete from JudyL tree, not leaf
-    {
-        COPYSTRINGtoWORD(Index, String, WORDSIZE);      // get Index
-        JLG(PPValueN, *PPValue, Index); // get pointer to next JudyL array
-
-        String += WORDSIZE;             // advance to next 4[8] bytes
-        Len -= WORDSIZE;
-
-        Ret = delStrJudyLTree(String, Len, PPValueN, PJError);
-        if (Ret != 1) return(Ret);
-
-        if (*PPValueN == (PPvoid_t) NULL)
-        {
-//          delete JudyL element from tree
-
-            Ret = JudyLDel(PPValue, Index, PJError);
-        }
-    }
-    else
-    {
-        COPYSTRINGtoWORD(Index, String, Len);   // get leaf element
-
-//      delete last 1-4[8] bytes from leaf element
-
-        Ret = JudyLDel(PPValue, Index, PJError); 
-    }
-    return (Ret);
-}
-
-// Delete string from JHS structure
-
-int
-JudyHSDel(PPvoid_t PPArray,             // ^ to JudyHashArray struct
-           void * Str,                  // pointer to string
-           Word_t Len,                  // length of string
-           PJError_t PJError            // optional, for returning error info
-    )
-{
-    uint8_t * String = (uint8_t *)Str;
-    PPvoid_t  PPBucket, PPHtble;
-    int       Ret;                      // return bool from Delete routine
-#ifndef DONOTUSEHASH
-    uint32_t  HValue = 0;               // hash value of input string
-#endif // DONOTUSEHASH
-
-    if (PPArray == NULL)
-        return (0);                     // no pointer, return not found
-
-//  This is a little slower than optimum method, but not much in new CPU
-//  Verify that string is in the structure -- simplifies future assumptions
-
-    if (JudyHSGet(*PPArray, String, Len) == (PPvoid_t) NULL)
-        return (0);                     // string not found, return
-
-//  string is in structure, so testing for absence is not necessary
-
-    JLG(PPHtble, *PPArray, Len);        // JudyL hash table for strings of Len
-
-#ifdef DONOTUSEHASH
-    PPBucket = PPHtble;                 // simulate below code
-#else  // USEHASH
-    if (Len > WORDSIZE)
-    {
-        JUDYHASHSTR(HValue, String, Len);       // hash to no more than 32 bits
-
-//  get pointer to hash bucket
-
-        JLG(PPBucket, *PPHtble, (Word_t)HValue);
-    }
-    else
-    {
-        PPBucket = PPHtble;             // no bucket to JLGet
-    }
-#endif // USEHASH
-
-// delete from JudyL tree
-//
-    Ret = delStrJudyLTree(String, Len, PPBucket, PJError);
-    if (Ret != 1)
-    {
-        JU_SET_ERRNO(PJError, 0);
-        return(-1);
-    }
-//  handle case of missing JudyL array from hash table and length table
-
-    if (*PPBucket == (Pvoid_t)NULL)     // if JudyL tree gone
-    {
-#ifndef DONOTUSEHASH
-        if (Len > WORDSIZE)
-        {
-//          delete entry in Hash table
-
-            Ret = JudyLDel(PPHtble, (Word_t)HValue, PJError); 
-            if (Ret != 1)
-            {
-                JU_SET_ERRNO(PJError, 0);
-                return(-1);
-            }
-        }
-#endif // USEHASH
-        if (*PPHtble == (PPvoid_t) NULL)        // if Hash table gone
-        {
-//          delete entry from the String length table
-
-            Ret = JudyLDel(PPArray, Len, PJError); 
-            if (Ret != 1)
-            {
-                JU_SET_ERRNO(PJError, 0);
-                return(-1);
-            }
-        }
-    }
-    return (1);                         // success
-}
-
-static Word_t
-delJudyLTree(PPvoid_t PPValue,                 // ^ to JudyL root pointer
-              Word_t Len,                       // length of string
-              PJError_t PJError)                // for returning error info
-{
-    Word_t    bytes_freed = 0;                  // bytes freed at point
-    Word_t    bytes_total = 0;                  // accumulated bytes freed
-    PPvoid_t  PPValueN;
-
-//  Pointer is to another tree of JudyL arrays or ls_t struct
-
-    if (Len > WORDSIZE)                         // more depth to tree
-    {
-        Word_t NEntry;
-
-//      Pointer is to a ls_t struct
-
-        if (IS_PLS(*PPValue)) 
-        {
-            Pls_t   Pls;
-            Word_t  freewords;
-
-            freewords = LS_WORDLEN(Len);        // calculate length
-            Pls = (Pls_t)CLEAR_PLS(*PPValue);   // demangle pointer
-
-//        *PPValue = (Pvoid_t)NULL;               // clean pointer
-           JudyFree((Pvoid_t)Pls, freewords);   // free the ls_t
-
-            return(freewords * WORDSIZE);
-        }
-//      else
-//      Walk all the entrys in the JudyL array
-
-        NEntry = 0;                             // start at beginning
-        for (PPValueN = JudyLFirst(*PPValue, &NEntry, PJError);
-            (PPValueN != (PPvoid_t) NULL) && (PPValueN != PPJERR);
-             PPValueN = JudyLNext(*PPValue, &NEntry, PJError))
-        {
-//          recurse to the next level in the tree of arrays
-
-            bytes_freed = delJudyLTree(PPValueN, Len - WORDSIZE, PJError);
-            if (bytes_freed == JERR) return(JERR);
-            bytes_total += bytes_freed;
-        }
-        if (PPValueN == PPJERR) return(JERR);
-
-//      now free this JudyL array
-
-        bytes_freed = JudyLFreeArray(PPValue, PJError);
-        if (bytes_freed == JERR) return(JERR);
-        bytes_total += bytes_freed;
-
-        return(bytes_total);  // return amount freed
-    }
-//  else
-
-//  Pointer to simple JudyL array
-
-    bytes_freed = JudyLFreeArray(PPValue, PJError);
-
-    return(bytes_freed);
-}
-
-
-Word_t                                  // bytes freed
-JudyHSFreeArray(PPvoid_t PPArray,       // ^ to JudyHashArray struct
-           PJError_t PJError            // optional, for returning error info
-    )
-{
-    Word_t    Len;                      // start at beginning
-    Word_t    bytes_freed;              // bytes freed at this level.
-    Word_t    bytes_total;              // bytes total at all levels.
-    PPvoid_t  PPHtble;
-
-    if (PPArray == NULL) 
-        return (0);                     // no pointer, return none
-
-//  Walk the string length table for subsidary hash structs
-//  NOTE: This is necessary to determine the depth of the tree
-
-    bytes_freed = 0; 
-    bytes_total = 0;
-    Len = 0;                            // walk to length table
-
-    for (PPHtble  = JudyLFirst(*PPArray, &Len, PJError);
-        (PPHtble != (PPvoid_t) NULL) && (PPHtble != PPJERR);
-         PPHtble  = JudyLNext(*PPArray, &Len, PJError))
-    {
-        PPvoid_t PPValueH;
-
-#ifndef DONOTUSEHASH
-        if (Len > WORDSIZE)
-        {
-            Word_t HEntry = 0;              // walk the hash tables
-
-            for (PPValueH  = JudyLFirst(*PPHtble, &HEntry, PJError);
-                (PPValueH != (PPvoid_t) NULL) && (PPValueH != PPJERR);
-                 PPValueH  = JudyLNext(*PPHtble, &HEntry, PJError))
-            {
-                bytes_freed = delJudyLTree(PPValueH, Len, PJError);
-                if (bytes_freed == JERR) return(JERR);
-                bytes_total += bytes_freed;
-            }
-
-            if (PPValueH == PPJERR) return(JERR);
-
-//          free the Hash table for this length of string
-
-            bytes_freed = JudyLFreeArray(PPHtble, PJError);
-            if (bytes_freed == JERR) return(JERR);
-            bytes_total += bytes_freed;
-        }
-        else
-#endif // DONOTUSEHASH
-        {
-                PPValueH = PPHtble;     // simulate hash table
-
-                bytes_freed = delJudyLTree(PPValueH, Len, PJError);
-                if (bytes_freed == JERR) return(JERR);
-                bytes_total += bytes_freed;
-        }
-    }
-    if (PPHtble == PPJERR) return(JERR);
-
-//  free the length table
-
-    bytes_freed = JudyLFreeArray(PPArray, PJError);
-    if (bytes_freed == JERR) return(JERR);
-
-    bytes_total += bytes_freed;
-
-    return(bytes_total);                // return bytes freed
-}
diff --git a/libs/klib/judy/JudyHS.h b/libs/klib/judy/JudyHS.h
deleted file mode 100644
index b403501..0000000
--- a/libs/klib/judy/JudyHS.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// ****************************************************************************
-// Quick and dirty header file for use with old Judy.h without JudyHS defs
-// May 2004 (dlb) - No copyright or license -- it is free period.
-
-#include <stdint.h>
-
-// ****************************************************************************
-// JUDYHSL MACROS:
-
-#define JHSI(PV,    PArray,   PIndex,   Count)                          \
-        J_2P(PV, (&(PArray)), PIndex,   Count, JudyHSIns, "JudyHSIns")
-#define JHSG(PV,    PArray,   PIndex,   Count)                          \
-        (PV) = (Pvoid_t) JudyHSGet(PArray, PIndex, Count)
-#define JHSD(Rc,    PArray,   PIndex,   Count)                          \
-        J_2I(Rc, (&(PArray)), PIndex, Count, JudyHSDel, "JudyHSDel")
-#define JHSFA(Rc,    PArray)                                            \
-        J_0I(Rc, (&(PArray)), JudyHSFreeArray, "JudyHSFreeArray")
-
-// ****************************************************************************
-// JUDY memory interface to malloc() FUNCTIONS:
-
-extern Word_t JudyMalloc(Word_t);               // words reqd => words allocd.
-extern Word_t JudyMallocVirtual(Word_t);        // words reqd => words allocd.
-extern void   JudyFree(Pvoid_t, Word_t);        // block to free and its size in words.
-extern void   JudyFreeVirtual(Pvoid_t, Word_t); // block to free and its size in words.
-
-// ****************************************************************************
-// JUDYHS FUNCTIONS:
-
-extern PPvoid_t JudyHSGet(       Pcvoid_t,  void *, Word_t);
-extern PPvoid_t JudyHSIns(       PPvoid_t,  void *, Word_t, P_JE);
-extern int      JudyHSDel(       PPvoid_t,  void *, Word_t, P_JE);
-extern Word_t   JudyHSFreeArray( PPvoid_t,                  P_JE);
-
-extern uint32_t JudyHashStr(                void *, Word_t);
diff --git a/libs/klib/judy/JudyIns.c b/libs/klib/judy/JudyIns.c
deleted file mode 100644
index d90820b..0000000
--- a/libs/klib/judy/JudyIns.c
+++ /dev/null
@@ -1,1871 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// Judy1Set() and JudyLIns() functions for Judy1 and JudyL.
-// Compile with one of -DJUDY1 or -DJUDYL.
-//
-// TBD:  Should some of the assertions here be converted to product code that
-// returns JU_ERRNO_CORRUPT?
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-// Note:  Call JudyCheckPop() even before "already inserted" returns, to catch
-// population errors; see fix in 4.84:
-
-DBGCODE(extern void JudyCheckPop(Pvoid_t PArray);)
-DBGCODE(extern void JudyCheckSorted(Pjll_t Pjll, Word_t Pop1, long IndexSize);)
-
-#ifdef TRACEJP
-#include "JudyPrintJP.c"
-#endif
-
-
-// These are defined to generic values in JudyCommon/JudyPrivateTypes.h:
-//
-// TBD:  These should be exported from a header file, but perhaps not, as they
-// are only used here, and exported from Judy*Decascade, which is a separate
-// file for profiling reasons (to prevent inlining), but which potentially
-// could be merged with this file, either in SoftCM or at compile-time.
-
-#ifdef JUDY1
-extern int j__udy1CreateBranchB(Pjp_t, Pjp_t, uint8_t *, Word_t, Pvoid_t);
-extern int j__udy1CreateBranchU(Pjp_t, Pvoid_t);
-
-#ifndef JU_64BIT
-extern int j__udy1Cascade1(Pjp_t, Pvoid_t);
-#endif
-extern int j__udy1Cascade2(Pjp_t, Pvoid_t);
-extern int j__udy1Cascade3(Pjp_t, Pvoid_t);
-#ifdef JU_64BIT
-extern int j__udy1Cascade4(Pjp_t, Pvoid_t);
-extern int j__udy1Cascade5(Pjp_t, Pvoid_t);
-extern int j__udy1Cascade6(Pjp_t, Pvoid_t);
-extern int j__udy1Cascade7(Pjp_t, Pvoid_t);
-#endif
-extern int j__udy1CascadeL(Pjp_t, Pvoid_t);
-
-extern int j__udy1InsertBranch(Pjp_t Pjp, Word_t Index, Word_t Btype, Pjpm_t);
-
-#else // JUDYL
-
-extern int j__udyLCreateBranchB(Pjp_t, Pjp_t, uint8_t *, Word_t, Pvoid_t);
-extern int j__udyLCreateBranchU(Pjp_t, Pvoid_t);
-
-extern int j__udyLCascade1(Pjp_t, Pvoid_t);
-extern int j__udyLCascade2(Pjp_t, Pvoid_t);
-extern int j__udyLCascade3(Pjp_t, Pvoid_t);
-#ifdef JU_64BIT
-extern int j__udyLCascade4(Pjp_t, Pvoid_t);
-extern int j__udyLCascade5(Pjp_t, Pvoid_t);
-extern int j__udyLCascade6(Pjp_t, Pvoid_t);
-extern int j__udyLCascade7(Pjp_t, Pvoid_t);
-#endif
-extern int j__udyLCascadeL(Pjp_t, Pvoid_t);
-
-extern int j__udyLInsertBranch(Pjp_t Pjp, Word_t Index, Word_t Btype, Pjpm_t);
-#endif
-
-
-// ****************************************************************************
-// MACROS FOR COMMON CODE:
-//
-// Check if Index is an outlier to (that is, not a member of) this expanse:
-//
-// An outlier is an Index in-the-expanse of the slot containing the pointer,
-// but not-in-the-expanse of the "narrow" pointer in that slot.  (This means
-// the Dcd part of the Index differs from the equivalent part of jp_DcdPopO.)
-// Therefore, the remedy is to put a cJU_JPBRANCH_L* between the narrow pointer
-// and the object to which it points, and add the outlier Index as an Immediate
-// in the cJU_JPBRANCH_L*.  The "trick" is placing the cJU_JPBRANCH_L* at a
-// Level that is as low as possible.  This is determined by counting the digits
-// in the existing narrow pointer that are the same as the digits in the new
-// Index (see j__udyInsertBranch()).
-//
-// Note:  At some high Levels, cJU_DCDMASK() is all zeros => dead code; assume
-// the compiler optimizes this out.
-
-#define JU_CHECK_IF_OUTLIER(Pjp, Index, cLevel, Pjpm)                   \
-        if (JU_DCDNOTMATCHINDEX(Index, Pjp, cLevel))                    \
-            return(j__udyInsertBranch(Pjp, Index, cLevel, Pjpm))
-
-// Check if an Index is already in a leaf or immediate, after calling
-// j__udySearchLeaf*() to set Offset:
-//
-// A non-negative Offset means the Index already exists, so return 0; otherwise
-// complement Offset to proceed.
-
-#ifdef JUDY1
-#define Pjv ignore                                      // placeholder.
-#define JU_CHECK_IF_EXISTS(Offset,ignore,Pjpm)  \
-        {                                       \
-            if ((Offset) >= 0) return(0);       \
-            (Offset) = ~(Offset);               \
-        }
-#else
-// For JudyL, also set the value area pointer in the Pjpm:
-
-#define JU_CHECK_IF_EXISTS(Offset,Pjv,Pjpm)             \
-        {                                               \
-            if ((Offset) >= 0)                          \
-            {                                           \
-                (Pjpm)->jpm_PValue = (Pjv) + (Offset);  \
-                return(0);                              \
-            }                                           \
-            (Offset) = ~(Offset);                       \
-        }
-#endif
-
-
-// ****************************************************************************
-// __ J U D Y   I N S   W A L K
-//
-// Walk the Judy tree to do a set/insert.  This is only called internally, and
-// recursively.  Unlike Judy1Test() and JudyLGet(), the extra time required for
-// recursion should be negligible compared with the total.
-//
-// Return -1 for error (details in JPM), 0 for Index already inserted, 1 for
-// new Index inserted.
-
-FUNCTION static int j__udyInsWalk(
-        Pjp_t   Pjp,            // current JP to descend.
-        Word_t  Index,          // to insert.
-        Pjpm_t  Pjpm)           // for returning info to top Level.
-{
-        uint8_t digit;          // from Index, current offset into a branch.
-        jp_t    newJP;          // for creating a new Immed JP.
-        Word_t  exppop1;        // expanse (leaf) population.
-        int     retcode;        // return codes:  -1, 0, 1.
-
-#ifdef SUBEXPCOUNTS
-// Pointer to BranchB/U subexpanse counter:
-//
-// Note:  Very important for performance reasons (avoids cache fills).
-
-        PWord_t PSubExp = (PWord_t) NULL;
-#endif
-
-ContinueInsWalk:                // for modifying state without recursing.
-
-#ifdef TRACEJP
-        JudyPrintJP(Pjp, "i", __LINE__);
-#endif
-
-        switch (JU_JPTYPE(Pjp)) // entry:  Pjp, Index.
-        {
-
-
-// ****************************************************************************
-// JPNULL*:
-//
-// Convert JP in place from current null type to cJU_JPIMMED_*_01 by
-// calculating new JP type.
-
-        case cJU_JPNULL1:
-        case cJU_JPNULL2:
-        case cJU_JPNULL3:
-#ifdef JU_64BIT
-        case cJU_JPNULL4:
-        case cJU_JPNULL5:
-        case cJU_JPNULL6:
-        case cJU_JPNULL7:
-#endif
-            assert((Pjp->jp_Addr) == 0);
-            JU_JPSETADT(Pjp, 0, Index, JU_JPTYPE(Pjp) + cJU_JPIMMED_1_01 - cJU_JPNULL1);
-#ifdef JUDYL
-            // value area is first word of new Immed_01 JP:
-            Pjpm->jpm_PValue = (Pjv_t) (&(Pjp->jp_Addr));
-#endif
-            return(1);
-
-
-// ****************************************************************************
-// JPBRANCH_L*:
-//
-// If the new Index is not an outlier to the branchs expanse, and the branch
-// should not be converted to uncompressed, extract the digit and record the
-// Immediate type to create for a new Immed JP, before going to common code.
-//
-// Note:  JU_CHECK_IF_OUTLIER() is a no-op for BranchB3[7] on 32[64]-bit.
-
-#define JU_BRANCH_OUTLIER(DIGIT,POP1,cLEVEL,PJP,INDEX,PJPM)  \
-        JU_CHECK_IF_OUTLIER(PJP, INDEX, cLEVEL, PJPM);       \
-        (DIGIT) = JU_DIGITATSTATE(INDEX, cLEVEL);            \
-        (POP1)  = JU_JPBRANCH_POP0(PJP, cLEVEL)
-
-        case cJU_JPBRANCH_L2:
-            JU_BRANCH_OUTLIER(digit, exppop1, 2, Pjp, Index, Pjpm);
-            goto JudyBranchL;
-
-        case cJU_JPBRANCH_L3:
-            JU_BRANCH_OUTLIER(digit, exppop1, 3, Pjp, Index, Pjpm);
-            goto JudyBranchL;
-
-#ifdef JU_64BIT
-        case cJU_JPBRANCH_L4:
-            JU_BRANCH_OUTLIER(digit, exppop1, 4, Pjp, Index, Pjpm);
-            goto JudyBranchL;
-
-        case cJU_JPBRANCH_L5:
-            JU_BRANCH_OUTLIER(digit, exppop1, 5, Pjp, Index, Pjpm);
-            goto JudyBranchL;
-
-        case cJU_JPBRANCH_L6:
-            JU_BRANCH_OUTLIER(digit, exppop1, 6, Pjp, Index, Pjpm);
-            goto JudyBranchL;
-
-        case cJU_JPBRANCH_L7:
-            JU_BRANCH_OUTLIER(digit, exppop1, 7, Pjp, Index, Pjpm);
-            goto JudyBranchL;
-#endif
-
-// Similar to common code above, but no outlier check is needed, and the Immed
-// type depends on the word size:
-
-        case cJU_JPBRANCH_L:
-        {
-            Pjbl_t PjblRaw;     // pointer to old linear branch.
-            Pjbl_t Pjbl;
-            Pjbu_t PjbuRaw;     // pointer to new uncompressed branch.
-            Pjbu_t Pjbu;
-            Word_t numJPs;      // number of JPs = populated expanses.
-            int    offset;      // in branch.
-
-            digit = JU_DIGITATSTATE(Index, cJU_ROOTSTATE);
-            exppop1 = Pjpm->jpm_Pop0;
-
-            // fall through:
-
-// COMMON CODE FOR LINEAR BRANCHES:
-//
-// Come here with digit and exppop1 already set.
-
-JudyBranchL:
-            PjblRaw = (Pjbl_t) (Pjp->jp_Addr);
-            Pjbl    = P_JBL(PjblRaw);
-
-// If population under this branch greater than:
-
-            if (exppop1 > JU_BRANCHL_MAX_POP)
-                goto ConvertBranchLtoU;
-
-            numJPs = Pjbl->jbl_NumJPs;
-
-            if ((numJPs == 0) || (numJPs > cJU_BRANCHLMAXJPS))
-            {
-                JU_SET_ERRNO_NONNULL(Pjpm, JU_ERRNO_CORRUPT);
-                return(-1);
-            }
-
-// Search for a match to the digit:
-
-            offset = j__udySearchLeaf1((Pjll_t) (Pjbl->jbl_Expanse), numJPs,
-                                       digit);
-
-// If Index is found, offset is into an array of 1..cJU_BRANCHLMAXJPS JPs:
-
-            if (offset >= 0)
-            {
-                Pjp = (Pjbl->jbl_jp) + offset;  // address of next JP.
-                break;                          // continue walk.
-            }
-
-// Expanse is missing (not populated) for the passed Index, so insert an Immed
-// -- if theres room:
-
-            if (numJPs < cJU_BRANCHLMAXJPS)
-            {
-                offset = ~offset;       // insertion offset.
-
-                JU_JPSETADT(&newJP, 0, Index,
-                        JU_JPTYPE(Pjp) + cJU_JPIMMED_1_01-cJU_JPBRANCH_L2);
-
-                JU_INSERTINPLACE(Pjbl->jbl_Expanse, numJPs, offset, digit);
-                JU_INSERTINPLACE(Pjbl->jbl_jp,      numJPs, offset, newJP);
-
-                DBGCODE(JudyCheckSorted((Pjll_t) (Pjbl->jbl_Expanse),
-                                        numJPs + 1, /* IndexSize = */ 1);)
-                ++(Pjbl->jbl_NumJPs);
-#ifdef JUDYL
-                // value area is first word of new Immed 01 JP:
-                Pjpm->jpm_PValue = (Pjv_t) ((Pjbl->jbl_jp) + offset);
-#endif
-                return(1);
-            }
-
-
-// MAXED OUT LINEAR BRANCH, CONVERT TO A BITMAP BRANCH, THEN INSERT:
-//
-// Copy the linear branch to a bitmap branch.
-//
-// TBD:  Consider renaming j__udyCreateBranchB() to j__udyConvertBranchLtoB().
-
-            assert((numJPs) <= cJU_BRANCHLMAXJPS);
-
-            if (j__udyCreateBranchB(Pjp, Pjbl->jbl_jp, Pjbl->jbl_Expanse,
-                                    numJPs, Pjpm) == -1)
-            {
-                return(-1);
-            }
-
-// Convert jp_Type from linear branch to equivalent bitmap branch:
-
-            Pjp->jp_Type += cJU_JPBRANCH_B - cJU_JPBRANCH_L;
-
-            j__udyFreeJBL(PjblRaw, Pjpm);       // free old BranchL.
-
-// Having changed branch types, now do the insert in the new branch type:
-
-            goto ContinueInsWalk;
-
-
-// OPPORTUNISTICALLY CONVERT FROM BRANCHL TO BRANCHU:
-//
-// Memory efficiency is no object because the branchs pop1 is large enough, so
-// speed up array access.  Come here with PjblRaw set.  Note:  This is goto
-// code because the previous block used to fall through into it as well, but no
-// longer.
-
-ConvertBranchLtoU:
-
-// Allocate memory for an uncompressed branch:
-
-            if ((PjbuRaw = j__udyAllocJBU(Pjpm)) == (Pjbu_t) NULL)
-                return(-1);
-            Pjbu = P_JBU(PjbuRaw);
-
-// Set the proper NULL type for most of the uncompressed branchs JPs:
-
-            JU_JPSETADT(&newJP, 0, 0, 
-                    JU_JPTYPE(Pjp) - cJU_JPBRANCH_L2 + cJU_JPNULL1);
-
-// Initialize:  Pre-set uncompressed branch to mostly JPNULL*s:
-
-            for (numJPs = 0; numJPs < cJU_BRANCHUNUMJPS; ++numJPs)
-                Pjbu->jbu_jp[numJPs] = newJP;
-
-// Copy JPs from linear branch to uncompressed branch:
-
-            {
-#ifdef SUBEXPCOUNTS
-                Word_t popmask = cJU_POP0MASK(JU_JPTYPE(Pjp))
-                                             - cJU_JPBRANCH_L2 - 2;
-
-                for (numJPs = 0; numJPs < cJU_NUMSUBEXPU; ++numJPs)
-                    Pjbu->jbu_subPop1[numJPs] = 0;
-#endif
-                for (numJPs = 0; numJPs < Pjbl->jbl_NumJPs; ++numJPs)
-                {
-                    Pjp_t Pjp1           = &(Pjbl->jbl_jp[numJPs]);
-                    offset               = Pjbl->jbl_Expanse[numJPs];
-                    Pjbu->jbu_jp[offset] = *Pjp1;
-#ifdef SUBEXPCOUNTS
-                    Pjbu->jbu_subPop1[offset/cJU_NUMSUBEXPU] +=
-                        JU_JPDCDPOP0(Pjp1) & popmask + 1;
-#endif
-                }
-            }
-            j__udyFreeJBL(PjblRaw, Pjpm);               // free old BranchL.
-
-// Plug new values into parent JP:
-
-            Pjp->jp_Addr  = (Word_t) PjbuRaw;
-            Pjp->jp_Type += cJU_JPBRANCH_U - cJU_JPBRANCH_L;    // to BranchU.
-
-// Save global population of last BranchU conversion:
-
-            Pjpm->jpm_LastUPop0 = Pjpm->jpm_Pop0;
-            goto ContinueInsWalk;
-
-        } // case cJU_JPBRANCH_L.
-
-
-// ****************************************************************************
-// JPBRANCH_B*:
-//
-// If the new Index is not an outlier to the branchs expanse, extract the
-// digit and record the Immediate type to create for a new Immed JP, before
-// going to common code.
-//
-// Note:  JU_CHECK_IF_OUTLIER() is a no-op for BranchB3[7] on 32[64]-bit.
-
-        case cJU_JPBRANCH_B2:
-            JU_BRANCH_OUTLIER(digit, exppop1, 2, Pjp, Index, Pjpm);
-            goto JudyBranchB;
-
-        case cJU_JPBRANCH_B3:
-            JU_BRANCH_OUTLIER(digit, exppop1, 3, Pjp, Index, Pjpm);
-            goto JudyBranchB;
-
-#ifdef JU_64BIT
-        case cJU_JPBRANCH_B4:
-            JU_BRANCH_OUTLIER(digit, exppop1, 4, Pjp, Index, Pjpm);
-            goto JudyBranchB;
-
-        case cJU_JPBRANCH_B5:
-            JU_BRANCH_OUTLIER(digit, exppop1, 5, Pjp, Index, Pjpm);
-            goto JudyBranchB;
-
-        case cJU_JPBRANCH_B6:
-            JU_BRANCH_OUTLIER(digit, exppop1, 6, Pjp, Index, Pjpm);
-            goto JudyBranchB;
-
-        case cJU_JPBRANCH_B7:
-            JU_BRANCH_OUTLIER(digit, exppop1, 7, Pjp, Index, Pjpm);
-            goto JudyBranchB;
-#endif
-
-        case cJU_JPBRANCH_B:
-        {
-            Pjbb_t    Pjbb;             // pointer to bitmap branch.
-            Pjbb_t    PjbbRaw;          // pointer to bitmap branch.
-            Pjp_t     Pjp2Raw;          // 1 of N arrays of JPs.
-            Pjp_t     Pjp2;             // 1 of N arrays of JPs.
-            Word_t    subexp;           // 1 of N subexpanses in bitmap.
-            BITMAPB_t bitmap;           // for one subexpanse.
-            BITMAPB_t bitmask;          // bit set for Indexs digit.
-            Word_t    numJPs;           // number of JPs = populated expanses.
-            int       offset;           // in bitmap branch.
-
-// Similar to common code above, but no outlier check is needed, and the Immed
-// type depends on the word size:
-
-            digit   = JU_DIGITATSTATE(Index, cJU_ROOTSTATE);
-            exppop1 = Pjpm->jpm_Pop0;
-
-            // fall through:
-
-
-// COMMON CODE FOR BITMAP BRANCHES:
-//
-// Come here with digit and exppop1 already set.
-
-JudyBranchB:
-
-// If population increment is greater than..  (300):
-
-            if ((Pjpm->jpm_Pop0 - Pjpm->jpm_LastUPop0) > JU_BTOU_POP_INCREMENT)
-            {
-
-// If total population of array is greater than..  (750):
-
-                if (Pjpm->jpm_Pop0 > JU_BRANCHB_MAX_POP)
-                {
-
-// If population under the branch is greater than..  (135):
-
-                    if (exppop1 > JU_BRANCHB_MIN_POP)
-                    {
-                        if (j__udyCreateBranchU(Pjp, Pjpm) == -1) return(-1);
-
-// Save global population of last BranchU conversion:
-
-                        Pjpm->jpm_LastUPop0 = Pjpm->jpm_Pop0;
-
-                        goto ContinueInsWalk;
-                    }
-                }
-            }
-
-// CONTINUE TO USE BRANCHB:
-//
-// Get pointer to bitmap branch (JBB):
-
-            PjbbRaw = (Pjbb_t) (Pjp->jp_Addr);
-            Pjbb    = P_JBB(PjbbRaw);
-
-// Form the Int32 offset, and Bit offset values:
-//
-// 8 bit Decode | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
-//              |SubExpanse |    Bit offset     |
-//
-// Get the 1 of 8 expanses from digit, Bits 5..7 = 1 of 8, and get the 32-bit
-// word that may have a bit set:
-
-            subexp = digit / cJU_BITSPERSUBEXPB;
-            bitmap = JU_JBB_BITMAP(Pjbb, subexp);
-
-            Pjp2Raw = JU_JBB_PJP(Pjbb, subexp);
-            Pjp2    = P_JP(Pjp2Raw);
-
-// Get the bit position that represents the desired expanse, and get the offset
-// into the array of JPs for the JP that matches the bit.
-
-            bitmask = JU_BITPOSMASKB(digit);
-            offset  = j__udyCountBitsB(bitmap & (bitmask - 1));
-
-// If JP is already in this expanse, get Pjp and continue the walk:
-
-            if (bitmap & bitmask)
-            {
-#ifdef SUBEXPCOUNTS
-                PSubExp = &(Pjbb->jbb_Counts[subexp]);  // ptr to subexp counts.
-#endif
-                Pjp =  Pjp2 + offset;
-                break;                                  // continue walk.
-            }
-
-
-// ADD NEW EXPANSE FOR NEW INDEX:
-//
-// The new expanse always an cJU_JPIMMED_*_01 containing just the new Index, so
-// finish setting up an Immed JP.
-
-            JU_JPSETADT(&newJP, 0, Index, 
-                JU_JPTYPE(Pjp) + cJU_JPIMMED_1_01-cJU_JPBRANCH_B2);
-
-// Get 1 of the 8 JP arrays and calculate number of JPs in subexpanse array:
-
-            Pjp2Raw = JU_JBB_PJP(Pjbb, subexp);
-            Pjp2    = P_JP(Pjp2Raw);
-            numJPs  = j__udyCountBitsB(bitmap);
-
-// Expand branch JP subarray in-place:
-
-            if (JU_BRANCHBJPGROWINPLACE(numJPs))
-            {
-                assert(numJPs > 0);
-                JU_INSERTINPLACE(Pjp2, numJPs, offset, newJP);
-#ifdef JUDYL
-                // value area is first word of new Immed 01 JP:
-                Pjpm->jpm_PValue = (Pjv_t) (Pjp2 + offset);
-#endif
-            }
-
-// No room, allocate a bigger bitmap branch JP subarray:
-
-            else
-            {
-                Pjp_t PjpnewRaw;
-                Pjp_t Pjpnew;
-
-                if ((PjpnewRaw = j__udyAllocJBBJP(numJPs + 1, Pjpm)) == 0)
-                    return(-1);
-                Pjpnew = P_JP(PjpnewRaw);
-
-// If there was an old JP array, then copy it, insert the new Immed JP, and
-// free the old array:
-
-                if (numJPs)
-                {
-                    JU_INSERTCOPY(Pjpnew, Pjp2, numJPs, offset, newJP);
-                    j__udyFreeJBBJP(Pjp2Raw, numJPs, Pjpm);
-#ifdef JUDYL
-                    // value area is first word of new Immed 01 JP:
-                    Pjpm->jpm_PValue = (Pjv_t) (Pjpnew + offset);
-#endif
-                }
-
-// New JP subarray; point to cJU_JPIMMED_*_01 and place it:
-
-                else
-                {
-                    assert(JU_JBB_PJP(Pjbb, subexp) == (Pjp_t) NULL);
-                     Pjp = Pjpnew;
-                    *Pjp = newJP;               // copy to new memory.
-#ifdef JUDYL
-                    // value area is first word of new Immed 01 JP:
-                    Pjpm->jpm_PValue = (Pjv_t) (&(Pjp->jp_Addr));
-#endif
-                }
-
-// Place new JP subarray in BranchB:
-
-                JU_JBB_PJP(Pjbb, subexp) = PjpnewRaw;
-
-            } // else
-
-// Set the new Indexs bit:
-
-            JU_JBB_BITMAP(Pjbb, subexp) |= bitmask;
-
-            return(1);
-
-        } // case
-
-
-// ****************************************************************************
-// JPBRANCH_U*:
-//
-// Just drop through the JP for the correct digit.  If the JP turns out to be a
-// JPNULL*, thats OK, the memory is already allocated, and the next walk
-// simply places an Immed in it.
-//
-#ifdef SUBEXPCOUNTS
-#define JU_GETSUBEXP(PSubExp,Pjbu,Digit) \
-        (PSubExp) = &((Pjbu)->jbu_subPop1[(Digit) / cJU_NUMSUBEXPU])
-#else
-#define JU_GETSUBEXP(PSubExp,Pjbu,Digit)  // null.
-#endif
-
-#define JU_JBU_PJP_SUBEXP(Pjp,PSubExp,Index,Level)              \
-        {                                                       \
-            uint8_t digit = JU_DIGITATSTATE(Index, Level);      \
-            Pjbu_t  P_jbu  = P_JBU((Pjp)->jp_Addr);             \
-            (Pjp) = &(P_jbu->jbu_jp[digit]);                    \
-            JU_GETSUBEXP(PSubExp, P_jbu, digit);                \
-        }
-
-        case cJU_JPBRANCH_U2:
-            JU_CHECK_IF_OUTLIER(Pjp, Index, 2, Pjpm);
-            JU_JBU_PJP_SUBEXP(Pjp, PSubExp, Index, 2);
-            break;
-
-#ifdef JU_64BIT
-        case cJU_JPBRANCH_U3:
-            JU_CHECK_IF_OUTLIER(Pjp, Index, 3, Pjpm);
-            JU_JBU_PJP_SUBEXP(Pjp, PSubExp, Index, 3);
-            break;
-
-        case cJU_JPBRANCH_U4:
-            JU_CHECK_IF_OUTLIER(Pjp, Index, 4, Pjpm);
-            JU_JBU_PJP_SUBEXP(Pjp, PSubExp, Index, 4);
-            break;
-
-        case cJU_JPBRANCH_U5:
-            JU_CHECK_IF_OUTLIER(Pjp, Index, 5, Pjpm);
-            JU_JBU_PJP_SUBEXP(Pjp, PSubExp, Index, 5);
-            break;
-
-        case cJU_JPBRANCH_U6:
-            JU_CHECK_IF_OUTLIER(Pjp, Index, 6, Pjpm);
-            JU_JBU_PJP_SUBEXP(Pjp, PSubExp, Index, 6);
-            break;
-
-        case cJU_JPBRANCH_U7:
-            JU_JBU_PJP_SUBEXP(Pjp, PSubExp, Index, 7);
-#else
-        case cJU_JPBRANCH_U3:
-            JU_JBU_PJP_SUBEXP(Pjp, PSubExp, Index, 3);
-#endif
-            break;
-
-        case cJU_JPBRANCH_U:
-            JU_JBU_PJP_SUBEXP(Pjp, PSubExp, Index, cJU_ROOTSTATE);
-            break;
-
-
-// ****************************************************************************
-// JPLEAF*:
-//
-// COMMON CODE FRAGMENTS TO MINIMIZE REDUNDANCY BELOW:
-//
-// These are necessary to support performance by function and loop unrolling
-// while avoiding huge amounts of nearly identical code.
-//
-// Prepare to handle a linear leaf:  Check for an outlier; set pop1 and pointer
-// to leaf:
-
-#ifdef JUDY1
-#define JU_LEAFVALUE(Pjv)                       // null.
-#define JU_LEAFPREPVALUE(Pjv, ValueArea)        // null.
-#else
-#define JU_LEAFVALUE(Pjv)                Pjv_t Pjv
-#define JU_LEAFPREPVALUE(Pjv, ValueArea) (Pjv) = ValueArea(Pleaf, exppop1)
-#endif
-
-#define JU_LEAFPREP(cIS,Type,MaxPop1,ValueArea)         \
-        Pjll_t  PjllRaw;                                \
-        Type    Pleaf;  /* specific type */             \
-        int     offset;                                 \
-        JU_LEAFVALUE(Pjv);                              \
-                                                        \
-        JU_CHECK_IF_OUTLIER(Pjp, Index, cIS, Pjpm);     \
-                                                        \
-        exppop1 = JU_JPLEAF_POP0(Pjp) + 1;              \
-        assert(exppop1 <= (MaxPop1));                   \
-        PjllRaw = (Pjll_t) (Pjp->jp_Addr);              \
-        Pleaf   = (Type) P_JLL(PjllRaw);                \
-        JU_LEAFPREPVALUE(Pjv, ValueArea)
-
-// Add to, or grow, a linear leaf:  Find Index position; if the Index is
-// absent, if theres room in the leaf, insert the Index [and value of 0] in
-// place, otherwise grow the leaf:
-//
-// Note:  These insertions always take place with whole words, using
-// JU_INSERTINPLACE() or JU_INSERTCOPY().
-
-#ifdef JUDY1
-#define JU_LEAFGROWVALUEADD(Pjv,ExpPop1,Offset)  // null.
-#else
-#define JU_LEAFGROWVALUEADD(Pjv,ExpPop1,Offset)         \
-        JU_INSERTINPLACE(Pjv, ExpPop1, Offset, 0);      \
-        Pjpm->jpm_PValue = (Pjv) + (Offset)
-#endif
-
-#ifdef JUDY1
-#define JU_LEAFGROWVALUENEW(ValueArea,Pjv,ExpPop1,Offset)  // null.
-#else
-#define JU_LEAFGROWVALUENEW(ValueArea,Pjv,ExpPop1,Offset)               \
-        {                                                               \
-            Pjv_t Pjvnew = ValueArea(Pleafnew, (ExpPop1) + 1);          \
-            JU_INSERTCOPY(Pjvnew, Pjv, ExpPop1, Offset, 0);             \
-            Pjpm->jpm_PValue = (Pjvnew) + (Offset);                     \
-        }
-#endif
-
-#define JU_LEAFGROW(cIS,Type,MaxPop1,Search,ValueArea,GrowInPlace,      \
-                    InsertInPlace,InsertCopy,Alloc,Free)                \
-                                                                        \
-        offset = Search(Pleaf, exppop1, Index);                         \
-        JU_CHECK_IF_EXISTS(offset, Pjv, Pjpm);                          \
-                                                                        \
-        if (GrowInPlace(exppop1))       /* add to current leaf */       \
-        {                                                               \
-            InsertInPlace(Pleaf, exppop1, offset, Index);               \
-            JU_LEAFGROWVALUEADD(Pjv, exppop1, offset);                  \
-            DBGCODE(JudyCheckSorted((Pjll_t) Pleaf, exppop1 + 1, cIS);) \
-            return(1);                                                  \
-        }                                                               \
-                                                                        \
-        if (exppop1 < (MaxPop1))        /* grow to new leaf */          \
-        {                                                               \
-            Pjll_t PjllnewRaw;                                          \
-            Type   Pleafnew;                                            \
-            if ((PjllnewRaw = Alloc(exppop1 + 1, Pjpm)) == 0) return(-1); \
-            Pleafnew = (Type) P_JLL(PjllnewRaw);                        \
-            InsertCopy(Pleafnew, Pleaf, exppop1, offset, Index);        \
-            JU_LEAFGROWVALUENEW(ValueArea, Pjv, exppop1, offset);       \
-            DBGCODE(JudyCheckSorted((Pjll_t) Pleafnew, exppop1 + 1, cIS);) \
-            Free(PjllRaw, exppop1, Pjpm);                               \
-            (Pjp->jp_Addr) = (Word_t) PjllnewRaw;                       \
-            return(1);                                                  \
-        }                                                               \
-        assert(exppop1 == (MaxPop1))
-
-// Handle linear leaf overflow (cascade):  Splay or compress into smaller
-// leaves:
-
-#define JU_LEAFCASCADE(MaxPop1,Cascade,Free)            \
-        if (Cascade(Pjp, Pjpm) == -1) return(-1);       \
-        Free(PjllRaw, MaxPop1, Pjpm);                   \
-        goto ContinueInsWalk
-
-// Wrapper around all of the above:
-
-#define JU_LEAFSET(cIS,Type,MaxPop1,Search,GrowInPlace,InsertInPlace,   \
-                   InsertCopy,Cascade,Alloc,Free,ValueArea)             \
-        {                                                               \
-            JU_LEAFPREP(cIS,Type,MaxPop1,ValueArea);                    \
-            JU_LEAFGROW(cIS,Type,MaxPop1,Search,ValueArea,GrowInPlace,  \
-                        InsertInPlace,InsertCopy,Alloc,Free);           \
-            JU_LEAFCASCADE(MaxPop1,Cascade,Free);                       \
-        }
-
-// END OF MACROS; LEAFL CASES START HERE:
-//
-// 64-bit Judy1 does not have 1-byte leaves:
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-
-        case cJU_JPLEAF1:
-
-            JU_LEAFSET(1, uint8_t *, cJU_LEAF1_MAXPOP1, j__udySearchLeaf1,
-                       JU_LEAF1GROWINPLACE, JU_INSERTINPLACE, JU_INSERTCOPY,
-                       j__udyCascade1, j__udyAllocJLL1, j__udyFreeJLL1,
-                       JL_LEAF1VALUEAREA);
-
-#endif // (JUDYL || ! JU_64BIT)
-
-        case cJU_JPLEAF2:
-
-            JU_LEAFSET(2, uint16_t *, cJU_LEAF2_MAXPOP1, j__udySearchLeaf2,
-                       JU_LEAF2GROWINPLACE, JU_INSERTINPLACE, JU_INSERTCOPY,
-                       j__udyCascade2, j__udyAllocJLL2, j__udyFreeJLL2,
-                       JL_LEAF2VALUEAREA);
-
-        case cJU_JPLEAF3:
-
-            JU_LEAFSET(3, uint8_t *, cJU_LEAF3_MAXPOP1, j__udySearchLeaf3,
-                       JU_LEAF3GROWINPLACE, JU_INSERTINPLACE3, JU_INSERTCOPY3,
-                       j__udyCascade3, j__udyAllocJLL3, j__udyFreeJLL3,
-                       JL_LEAF3VALUEAREA);
-
-#ifdef JU_64BIT
-        case cJU_JPLEAF4:
-
-            JU_LEAFSET(4, uint32_t *, cJU_LEAF4_MAXPOP1, j__udySearchLeaf4,
-                       JU_LEAF4GROWINPLACE, JU_INSERTINPLACE, JU_INSERTCOPY,
-                       j__udyCascade4, j__udyAllocJLL4, j__udyFreeJLL4,
-                       JL_LEAF4VALUEAREA);
-
-        case cJU_JPLEAF5:
-
-            JU_LEAFSET(5, uint8_t *, cJU_LEAF5_MAXPOP1, j__udySearchLeaf5,
-                       JU_LEAF5GROWINPLACE, JU_INSERTINPLACE5, JU_INSERTCOPY5,
-                       j__udyCascade5, j__udyAllocJLL5, j__udyFreeJLL5,
-                       JL_LEAF5VALUEAREA);
-
-        case cJU_JPLEAF6:
-
-            JU_LEAFSET(6, uint8_t *, cJU_LEAF6_MAXPOP1, j__udySearchLeaf6,
-                       JU_LEAF6GROWINPLACE, JU_INSERTINPLACE6, JU_INSERTCOPY6,
-                       j__udyCascade6, j__udyAllocJLL6, j__udyFreeJLL6,
-                       JL_LEAF6VALUEAREA);
-
-        case cJU_JPLEAF7:
-
-            JU_LEAFSET(7, uint8_t *, cJU_LEAF7_MAXPOP1, j__udySearchLeaf7,
-                       JU_LEAF7GROWINPLACE, JU_INSERTINPLACE7, JU_INSERTCOPY7,
-                       j__udyCascade7, j__udyAllocJLL7, j__udyFreeJLL7,
-                       JL_LEAF7VALUEAREA);
-#endif // JU_64BIT
-
-
-// ****************************************************************************
-// JPLEAF_B1:
-//
-// 8 bit Decode | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
-//              |SubExpanse |    Bit offset     |
-//
-// Note:  For JudyL, values are stored in 8 subexpanses, each a linear word
-// array of up to 32 values each.
-
-        case cJU_JPLEAF_B1:
-        {
-#ifdef JUDYL
-            Pjv_t     PjvRaw;           // pointer to value part of the leaf.
-            Pjv_t     Pjv;              // pointer to value part of the leaf.
-            Pjv_t     PjvnewRaw;        // new value area.
-            Pjv_t     Pjvnew;           // new value area.
-            Word_t    subexp;           // 1 of 8 subexpanses in bitmap.
-            Pjlb_t    Pjlb;             // pointer to bitmap part of the leaf.
-            BITMAPL_t bitmap;           // for one subexpanse.
-            BITMAPL_t bitmask;          // bit set for Indexs digit.
-            int       offset;           // of index in value area.
-#endif
-
-            JU_CHECK_IF_OUTLIER(Pjp, Index, 1, Pjpm);
-
-#ifdef JUDY1
-
-// If Index (bit) is already set, return now:
-
-            if (JU_BITMAPTESTL(P_JLB(Pjp->jp_Addr), Index)) return(0);
-
-// If bitmap is not full, set the new Indexs bit; otherwise convert to a Full:
-
-            if ((exppop1 = JU_JPLEAF_POP0(Pjp) + 1)
-              < cJU_JPFULLPOPU1_POP0)
-            {
-                JU_BITMAPSETL(P_JLB(Pjp->jp_Addr), Index);
-            }
-            else
-            {
-                j__udyFreeJLB1((Pjlb_t) (Pjp->jp_Addr), Pjpm);  // free LeafB1.
-                Pjp->jp_Type = cJ1_JPFULLPOPU1;
-                Pjp->jp_Addr = 0;
-            }
-
-#else // JUDYL
-
-// This is very different from Judy1 because of the need to return a value area
-// even for an existing Index, or manage the value area for a new Index, and
-// because JudyL has no Full type:
-
-// Get last byte to decode from Index, and pointer to bitmap leaf:
-
-            digit = JU_DIGITATSTATE(Index, 1);
-            Pjlb  = P_JLB(Pjp->jp_Addr);
-
-// Prepare additional values:
-
-            subexp  = digit / cJU_BITSPERSUBEXPL;       // which subexpanse.
-            bitmap  = JU_JLB_BITMAP(Pjlb, subexp);      // subexps 32-bit map.
-            PjvRaw  = JL_JLB_PVALUE(Pjlb, subexp);      // corresponding values.
-            Pjv     = P_JV(PjvRaw);                     // corresponding values.
-            bitmask = JU_BITPOSMASKL(digit);            // mask for Index.
-            offset  = j__udyCountBitsL(bitmap & (bitmask - 1)); // of Index.
-
-// If Index already exists, get value pointer and exit:
-
-            if (bitmap & bitmask)
-            {
-                assert(Pjv);
-                Pjpm->jpm_PValue = Pjv + offset;        // existing value.
-                return(0);
-            }
-
-// Get the total bits set = expanse population of Value area:
-
-            exppop1 = j__udyCountBitsL(bitmap);
-
-// If the value area can grow in place, do it:
-
-            if (JL_LEAFVGROWINPLACE(exppop1))
-            {
-                JU_INSERTINPLACE(Pjv, exppop1, offset, 0);
-                JU_JLB_BITMAP(Pjlb, subexp) |= bitmask;  // set Indexs bit.
-                Pjpm->jpm_PValue = Pjv + offset;          // new value area.
-                return(1);
-            }
-
-// Increase size of value area:
-
-            if ((PjvnewRaw = j__udyLAllocJV(exppop1 + 1, Pjpm))
-             == (Pjv_t) NULL) return(-1);
-            Pjvnew = P_JV(PjvnewRaw);
-
-            if (exppop1)                // have existing value area.
-            {
-                assert(Pjv);
-                JU_INSERTCOPY(Pjvnew, Pjv, exppop1, offset, 0);
-                Pjpm->jpm_PValue = Pjvnew + offset;
-                j__udyLFreeJV(PjvRaw, exppop1, Pjpm);   // free old values.
-            }
-            else                        // first index, new value area:
-            {
-                 Pjpm->jpm_PValue   = Pjvnew;
-                *(Pjpm->jpm_PValue) = 0;
-            }
-
-// Set bit for new Index and place new leaf value area in bitmap:
-
-            JU_JLB_BITMAP(Pjlb, subexp) |= bitmask;
-            JL_JLB_PVALUE(Pjlb, subexp)  = PjvnewRaw;
-
-#endif // JUDYL
-
-            return(1);
-
-        } // case
-
-
-#ifdef JUDY1
-// ****************************************************************************
-// JPFULLPOPU1:
-//
-// If Index is not an outlier, then by definition its already set.
-
-        case cJ1_JPFULLPOPU1:
-
-            JU_CHECK_IF_OUTLIER(Pjp, Index, 1, Pjpm);
-            return(0);
-#endif
-
-
-// ****************************************************************************
-// JPIMMED*:
-//
-// This is some of the most complex code in Judy considering Judy1 versus JudyL
-// and 32-bit versus 64-bit variations.  The following comments attempt to make
-// this clearer.
-//
-// Of the 2 words in a JP, for immediate indexes Judy1 can use 2 words - 1 byte
-// = 7 [15] bytes, but JudyL can only use 1 word - 1 byte = 3 [7] bytes because
-// the other word is needed for a value area or a pointer to a value area.
-//
-// For both Judy1 and JudyL, cJU_JPIMMED_*_01 indexes are in word 2; otherwise
-// for Judy1 only, a list of 2 or more indexes starts in word 1.  JudyL keeps
-// the list in word 2 because word 1 is a pointer (to a LeafV, that is, a leaf
-// containing only values).  Furthermore, cJU_JPIMMED_*_01 indexes are stored
-// all-but-first-byte in jp_DcdPopO, not just the Index Sizes bytes.
-//
-// TBD:  This can be confusing because Doug didnt use data structures for it.
-// Instead he often directly accesses Pjp for the first word and jp_DcdPopO for
-// the second word.  It would be nice to use data structs, starting with
-// jp_1Index and jp_LIndex where possible.
-//
-// Maximum Immed JP types for Judy1/JudyL, depending on Index Size (cIS):
-//
-//          32-bit  64-bit
-//
-//    bytes:  7/ 3   15/ 7   (Judy1/JudyL)
-//
-//    cIS
-//    1_     07/03   15/07   (as in: cJ1_JPIMMED_1_07)
-//    2_     03/01   07/03
-//    3_     02/01   05/02
-//    4_             03/01
-//    5_             03/01
-//    6_             02/01
-//    7_             02/01
-//
-// State transitions while inserting an Index, matching the above table:
-// (Yes, this is very terse...  Study it and it will make sense.)
-// (Note, parts of this diagram are repeated below for quick reference.)
-//
-//      +-- reformat JP here for Judy1 only, from word-2 to word-1
-//      |
-//      |                  JUDY1 || JU_64BIT        JUDY1 && JU_64BIT
-//      V
-// 1_01 => 1_02 => 1_03 => [ 1_04 => ... => 1_07 => [ 1_08..15 => ]] Leaf1 (*)
-// 2_01 =>                 [ 2_02 => 2_03 =>        [ 2_04..07 => ]] Leaf2
-// 3_01 =>                 [ 3_02 =>                [ 3_03..05 => ]] Leaf3
-// JU_64BIT only:
-// 4_01 =>                                         [[ 4_02..03 => ]] Leaf4
-// 5_01 =>                                         [[ 5_02..03 => ]] Leaf5
-// 6_01 =>                                         [[ 6_02     => ]] Leaf6
-// 7_01 =>                                         [[ 7_02     => ]] Leaf7
-//
-// (*) For Judy1 & 64-bit, go directly from cJU_JPIMMED_1_15 to a LeafB1; skip
-//     Leaf1, as described in Judy1.h regarding cJ1_JPLEAF1.
-
-
-// COMMON CODE FRAGMENTS TO MINIMIZE REDUNDANCY BELOW:
-//
-// These are necessary to support performance by function and loop unrolling
-// while avoiding huge amounts of nearly identical code.
-//
-// The differences between Judy1 and JudyL with respect to value area handling
-// are just too large for completely common code between them...  Oh well, some
-// big ifdefs follow.  However, even in the following ifdefd code, use cJU_*,
-// JU_*, and Judy*() instead of cJ1_* / cJL_*, J1_* / JL_*, and
-// Judy1*()/JudyL*(), for minimum diffs.
-//
-// Handle growth of cJU_JPIMMED_*_01 to cJU_JPIMMED_*_02, for an even or odd
-// Index Size (cIS), given oldIndex, Index, and Pjll in the context:
-//
-// Put oldIndex and Index in their proper order.  For odd indexes, must copy
-// bytes.
-
-#ifdef JUDY1
-
-#define JU_IMMSET_01_COPY_EVEN(ignore1,ignore2) \
-        if (oldIndex < Index) { Pjll[0] = oldIndex; Pjll[1] = Index;    } \
-        else                  { Pjll[0] = Index;    Pjll[1] = oldIndex; }
-
-#define JU_IMMSET_01_COPY_ODD(cIS,CopyWord)     \
-        if (oldIndex < Index)                   \
-        {                                       \
-            CopyWord(Pjll + 0,     oldIndex);   \
-            CopyWord(Pjll + (cIS), Index);      \
-        }                                       \
-        else                                    \
-        {                                       \
-            CopyWord(Pjll + 0,    Index);       \
-            CopyWord(Pjll + (cIS), oldIndex);   \
-        }
-
-// The "real" *_01 Copy macro:
-//
-// Trim the high byte off Index, look for a match with the old Index, and if
-// none, insert the new Index in the leaf in the correct place, given Pjp and
-// Index in the context.
-//
-// Note:  A single immediate index lives in the jp_DcdPopO field, but two or
-// more reside starting at Pjp->jp_1Index.
-
-#define JU_IMMSET_01_COPY(cIS,LeafType,NewJPType,Copy,CopyWord) \
-        {                                                       \
-            LeafType Pjll;                                      \
-            Word_t   oldIndex = JU_JPDCDPOP0(Pjp);              \
-                                                                \
-            Index = JU_TRIMTODCDSIZE(Index);                    \
-            if (oldIndex == Index) return(0);                   \
-                                                                \
-            Pjll = (LeafType) (Pjp->jp_1Index);                 \
-            Copy(cIS,CopyWord);                                 \
-            DBGCODE(JudyCheckSorted(Pjll, 2, cIS);)             \
-                                                                \
-            Pjp->jp_Type = (NewJPType);                         \
-            return(1);                                          \
-        }
-
-#else // JUDYL
-
-// Variations to also handle value areas; see comments above:
-//
-// For JudyL, Pjv (start of value area) and oldValue are also in the context;
-// leave Pjv set to the value area for Index.
-
-#define JU_IMMSET_01_COPY_EVEN(cIS,CopyWord)    \
-        if (oldIndex < Index)                   \
-        {                                       \
-            Pjll[0] = oldIndex;                 \
-            Pjv [0] = oldValue;                 \
-            Pjll[1] = Index;                    \
-            ++Pjv;                              \
-        }                                       \
-        else                                    \
-        {                                       \
-            Pjll[0] = Index;                    \
-            Pjll[1] = oldIndex;                 \
-            Pjv [1] = oldValue;                 \
-        }
-
-#define JU_IMMSET_01_COPY_ODD(cIS,CopyWord)     \
-        if (oldIndex < Index)                   \
-        {                                       \
-            CopyWord(Pjll + 0,     oldIndex);   \
-            CopyWord(Pjll + (cIS), Index);      \
-            Pjv[0] = oldValue;                  \
-            ++Pjv;                              \
-        }                                       \
-        else                                    \
-        {                                       \
-            CopyWord(Pjll + 0,    Index);       \
-            CopyWord(Pjll + (cIS), oldIndex);   \
-            Pjv[1] = oldValue;                  \
-        }
-
-// The old value area is in the first word (*Pjp), and Pjv and Pjpm are also in
-// the context.  Also, unlike Judy1, indexes remain in word 2 (jp_LIndex),
-// meaning insert-in-place rather than copy.
-//
-// Return jpm_PValue pointing to Indexs value area.  If Index is new, allocate
-// a 2-value-leaf and attach it to the JP.
-
-#define JU_IMMSET_01_COPY(cIS,LeafType,NewJPType,Copy,CopyWord) \
-        {                                                       \
-            LeafType Pjll;                                      \
-            Word_t   oldIndex = JU_JPDCDPOP0(Pjp);              \
-            Word_t   oldValue;                                  \
-            Pjv_t    PjvRaw;                                    \
-            Pjv_t    Pjv;                                       \
-                                                                \
-            Index = JU_TRIMTODCDSIZE(Index);                    \
-                                                                \
-            if (oldIndex == Index)                              \
-            {                                                   \
-                Pjpm->jpm_PValue = (Pjv_t) Pjp;                 \
-                return(0);                                      \
-            }                                                   \
-                                                                \
-            if ((PjvRaw = j__udyLAllocJV(2, Pjpm)) == (Pjv_t) NULL) \
-                return(-1);                                     \
-            Pjv = P_JV(PjvRaw);                                 \
-                                                                \
-            oldValue       = Pjp->jp_Addr;                      \
-            (Pjp->jp_Addr) = (Word_t) PjvRaw;                   \
-            Pjll           = (LeafType) (Pjp->jp_LIndex);       \
-                                                                \
-            Copy(cIS,CopyWord);                                 \
-            DBGCODE(JudyCheckSorted(Pjll, 2, cIS);)             \
-                                                                \
-            Pjp->jp_Type   = (NewJPType);                       \
-            *Pjv             = 0;                               \
-            Pjpm->jpm_PValue = Pjv;                             \
-            return(1);                                          \
-        }
-
-// The following is a unique mix of JU_IMMSET_01() and JU_IMMSETCASCADE() for
-// going from cJU_JPIMMED_*_01 directly to a cJU_JPLEAF* for JudyL:
-//
-// If Index is not already set, allocate a leaf, copy the old and new indexes
-// into it, clear and return the new value area, and modify the current JP.
-// Note that jp_DcdPop is set to a pop0 of 0 for now, and incremented later.
-
-
-#define JU_IMMSET_01_CASCADE(cIS,LeafType,NewJPType,ValueArea,  \
-                             Copy,CopyWord,Alloc)               \
-        {                                                       \
-            Word_t   D_P0;                                      \
-            LeafType PjllRaw;                                   \
-            LeafType Pjll;                                      \
-            Word_t   oldIndex = JU_JPDCDPOP0(Pjp);              \
-            Word_t   oldValue;                                  \
-            Pjv_t    Pjv;                                       \
-                                                                \
-            Index = JU_TRIMTODCDSIZE(Index);                    \
-                                                                \
-            if (oldIndex == Index)                              \
-            {                                                   \
-                Pjpm->jpm_PValue = (Pjv_t) (&(Pjp->jp_Addr));   \
-                return(0);                                      \
-            }                                                   \
-                                                                \
-            if ((PjllRaw = (LeafType) Alloc(2, Pjpm)) == (LeafType) NULL) \
-                return(-1);                                     \
-            Pjll = (LeafType) P_JLL(PjllRaw);                   \
-            Pjv  = ValueArea(Pjll, 2);                          \
-                                                                \
-            oldValue = Pjp->jp_Addr;                            \
-                                                                \
-            Copy(cIS,CopyWord);                                 \
-            DBGCODE(JudyCheckSorted(Pjll, 2, cIS);)             \
-                                                                \
-            *Pjv = 0;                                           \
-            Pjpm->jpm_PValue  = Pjv;                            \
-            D_P0 = Index & cJU_DCDMASK(cIS); /* pop0 = 0 */     \
-            JU_JPSETADT(Pjp, (Word_t)PjllRaw, D_P0, NewJPType); \
-                                                                \
-            return(1);                                          \
-        }
-
-#endif // JUDYL
-
-// Handle growth of cJU_JPIMMED_*_[02..15]:
-
-#ifdef JUDY1
-
-// Insert an Index into an immediate JP that has room for more, if the Index is
-// not already present; given Pjp, Index, exppop1, Pjv, and Pjpm in the
-// context:
-//
-// Note:  Use this only when the JP format doesnt change, that is, going from
-// cJU_JPIMMED_X_0Y to cJU_JPIMMED_X_0Z, where X >= 2 and Y+1 = Z.
-//
-// Note:  Incrementing jp_Type is how to increase the Index population.
-
-#define JU_IMMSETINPLACE(cIS,LeafType,BaseJPType_02,Search,InsertInPlace) \
-        {                                                               \
-            LeafType Pjll;                                              \
-            int      offset;                                            \
-                                                                        \
-            exppop1 = JU_JPTYPE(Pjp) - (BaseJPType_02) + 2;             \
-            offset  = Search((Pjll_t) (Pjp->jp_1Index), exppop1, Index); \
-                                                                        \
-            JU_CHECK_IF_EXISTS(offset, ignore, Pjpm);                   \
-                                                                        \
-            Pjll = (LeafType) (Pjp->jp_1Index);                         \
-            InsertInPlace(Pjll, exppop1, offset, Index);                \
-            DBGCODE(JudyCheckSorted(Pjll, exppop1 + 1, cIS);)           \
-            ++(Pjp->jp_Type);                                           \
-            return(1);                                                  \
-        }
-
-// Insert an Index into an immediate JP that has no room for more:
-//
-// If the Index is not already present, do a cascade (to a leaf); given Pjp,
-// Index, Pjv, and Pjpm in the context.
-
-
-#define JU_IMMSETCASCADE(cIS,OldPop1,LeafType,NewJPType,                \
-                         ignore,Search,InsertCopy,Alloc)                \
-        {                                                               \
-            Word_t   D_P0;                                              \
-            Pjll_t PjllRaw;                                             \
-            Pjll_t Pjll;                                                \
-            int    offset;                                              \
-                                                                        \
-            offset = Search((Pjll_t) (Pjp->jp_1Index), (OldPop1), Index); \
-            JU_CHECK_IF_EXISTS(offset, ignore, Pjpm);                   \
-                                                                        \
-            if ((PjllRaw = Alloc((OldPop1) + 1, Pjpm)) == 0) return(-1); \
-            Pjll = P_JLL(PjllRaw);                                      \
-                                                                        \
-            InsertCopy((LeafType) Pjll, (LeafType) (Pjp->jp_1Index),    \
-                       OldPop1, offset, Index);                         \
-            DBGCODE(JudyCheckSorted(Pjll, (OldPop1) + 1, cIS);)         \
-                                                                        \
-            D_P0 = (Index & cJU_DCDMASK(cIS)) + (OldPop1) - 1;          \
-            JU_JPSETADT(Pjp, (Word_t)PjllRaw, D_P0, NewJPType);         \
-            return(1);                                                  \
-        }
-
-#else // JUDYL
-
-// Variations to also handle value areas; see comments above:
-//
-// For JudyL, Pjv (start of value area) is also in the context.
-//
-// TBD:  This code makes a true but weak assumption that a JudyL 32-bit 2-index
-// value area must be copied to a new 3-index value area.  AND it doesnt know
-// anything about JudyL 64-bit cases (cJU_JPIMMED_1_0[3-7] only) where the
-// value area can grow in place!  However, this should not break it, just slow
-// it down.
-
-#define JU_IMMSETINPLACE(cIS,LeafType,BaseJPType_02,Search,InsertInPlace) \
-        {                                                                 \
-            LeafType Pleaf;                                               \
-            int      offset;                                              \
-            Pjv_t    PjvRaw;                                              \
-            Pjv_t    Pjv;                                                 \
-            Pjv_t    PjvnewRaw;                                           \
-            Pjv_t    Pjvnew;                                              \
-                                                                          \
-            exppop1 = JU_JPTYPE(Pjp) - (BaseJPType_02) + 2;               \
-            offset  = Search((Pjll_t) (Pjp->jp_LIndex), exppop1, Index);  \
-            PjvRaw  = (Pjv_t) (Pjp->jp_Addr);                             \
-            Pjv     = P_JV(PjvRaw);                                       \
-                                                                          \
-            JU_CHECK_IF_EXISTS(offset, Pjv, Pjpm);                        \
-                                                                          \
-            if ((PjvnewRaw = j__udyLAllocJV(exppop1 + 1, Pjpm))           \
-             == (Pjv_t) NULL) return(-1);                                 \
-            Pjvnew = P_JV(PjvnewRaw);                                     \
-                                                                          \
-            Pleaf = (LeafType) (Pjp->jp_LIndex);                          \
-                                                                          \
-            InsertInPlace(Pleaf, exppop1, offset, Index);                 \
-            /* see TBD above about this: */                               \
-            JU_INSERTCOPY(Pjvnew, Pjv, exppop1, offset, 0);               \
-            DBGCODE(JudyCheckSorted(Pleaf, exppop1 + 1, cIS);)            \
-            j__udyLFreeJV(PjvRaw, exppop1, Pjpm);                         \
-            Pjp->jp_Addr     = (Word_t) PjvnewRaw;                        \
-            Pjpm->jpm_PValue = Pjvnew + offset;                           \
-                                                                          \
-            ++(Pjp->jp_Type);                                             \
-            return(1);                                                    \
-        }
-
-#define JU_IMMSETCASCADE(cIS,OldPop1,LeafType,NewJPType,                \
-                         ValueArea,Search,InsertCopy,Alloc)             \
-        {                                                               \
-            Word_t   D_P0;                                      \
-            Pjll_t PjllRaw;                                             \
-            Pjll_t Pjll;                                                \
-            int    offset;                                              \
-            Pjv_t  PjvRaw;                                              \
-            Pjv_t  Pjv;                                                 \
-            Pjv_t  Pjvnew;                                              \
-                                                                        \
-            PjvRaw = (Pjv_t) (Pjp->jp_Addr);                            \
-            Pjv    = P_JV(PjvRaw);                                      \
-            offset = Search((Pjll_t) (Pjp->jp_LIndex), (OldPop1), Index); \
-            JU_CHECK_IF_EXISTS(offset, Pjv, Pjpm);                      \
-                                                                        \
-            if ((PjllRaw = Alloc((OldPop1) + 1, Pjpm)) == 0)            \
-                return(-1);                                             \
-            Pjll = P_JLL(PjllRaw);                                      \
-            InsertCopy((LeafType) Pjll, (LeafType) (Pjp->jp_LIndex),    \
-                       OldPop1, offset, Index);                         \
-            DBGCODE(JudyCheckSorted(Pjll, (OldPop1) + 1, cIS);)         \
-                                                                        \
-            Pjvnew = ValueArea(Pjll, (OldPop1) + 1);                    \
-            JU_INSERTCOPY(Pjvnew, Pjv, OldPop1, offset, 0);             \
-            j__udyLFreeJV(PjvRaw, (OldPop1), Pjpm);                     \
-            Pjpm->jpm_PValue = Pjvnew + offset;                         \
-                                                                        \
-            D_P0 = (Index & cJU_DCDMASK(cIS)) + (OldPop1) - 1;          \
-            JU_JPSETADT(Pjp, (Word_t)PjllRaw, D_P0, NewJPType);         \
-            return(1);                                                  \
-        }
-
-#endif // JUDYL
-
-// Common convenience/shorthand wrappers around JU_IMMSET_01_COPY() for
-// even/odd index sizes:
-
-#define JU_IMMSET_01(     cIS, LeafType, NewJPType) \
-        JU_IMMSET_01_COPY(cIS, LeafType, NewJPType, JU_IMMSET_01_COPY_EVEN, \
-                          ignore)
-
-#define JU_IMMSET_01_ODD( cIS,            NewJPType, CopyWord) \
-        JU_IMMSET_01_COPY(cIS, uint8_t *, NewJPType, JU_IMMSET_01_COPY_ODD, \
-                          CopyWord)
-
-
-// END OF MACROS; IMMED CASES START HERE:
-
-// cJU_JPIMMED_*_01 cases:
-//
-// 1_01 always leads to 1_02:
-//
-// (1_01 => 1_02 => 1_03 => [ 1_04 => ... => 1_07 => [ 1_08..15 => ]] LeafL)
-
-        case cJU_JPIMMED_1_01: JU_IMMSET_01(1, uint8_t *, cJU_JPIMMED_1_02);
-
-// 2_01 leads to 2_02, and 3_01 leads to 3_02, except for JudyL 32-bit, where
-// they lead to a leaf:
-//
-// (2_01 => [ 2_02 => 2_03 => [ 2_04..07 => ]] LeafL)
-// (3_01 => [ 3_02 =>         [ 3_03..05 => ]] LeafL)
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-        case cJU_JPIMMED_2_01: JU_IMMSET_01(2, uint16_t *, cJU_JPIMMED_2_02);
-        case cJU_JPIMMED_3_01: JU_IMMSET_01_ODD (3, cJU_JPIMMED_3_02,
-                                                 JU_COPY3_LONG_TO_PINDEX);
-#else
-        case cJU_JPIMMED_2_01:
-            JU_IMMSET_01_CASCADE(2, uint16_t *, cJU_JPLEAF2, JL_LEAF2VALUEAREA,
-                                 JU_IMMSET_01_COPY_EVEN, ignore,
-                                 j__udyAllocJLL2);
-        case cJU_JPIMMED_3_01:
-            JU_IMMSET_01_CASCADE(3, uint8_t *,  cJU_JPLEAF3, JL_LEAF3VALUEAREA,
-                                 JU_IMMSET_01_COPY_ODD,
-                                 JU_COPY3_LONG_TO_PINDEX, j__udyAllocJLL3);
-#endif
-
-#ifdef JU_64BIT
-
-// [4-7]_01 lead to [4-7]_02 for Judy1, and to leaves for JudyL:
-//
-// (4_01 => [[ 4_02..03 => ]] LeafL)
-// (5_01 => [[ 5_02..03 => ]] LeafL)
-// (6_01 => [[ 6_02 =>     ]] LeafL)
-// (7_01 => [[ 7_02 =>     ]] LeafL)
-
-#ifdef JUDY1
-        case cJU_JPIMMED_4_01: JU_IMMSET_01(4, uint32_t *, cJ1_JPIMMED_4_02);
-        case cJU_JPIMMED_5_01: JU_IMMSET_01_ODD(5, cJ1_JPIMMED_5_02,
-                                                JU_COPY5_LONG_TO_PINDEX);
-        case cJU_JPIMMED_6_01: JU_IMMSET_01_ODD(6, cJ1_JPIMMED_6_02,
-                                                JU_COPY6_LONG_TO_PINDEX);
-        case cJU_JPIMMED_7_01: JU_IMMSET_01_ODD(7, cJ1_JPIMMED_7_02,
-                                                JU_COPY7_LONG_TO_PINDEX);
-#else // JUDYL
-        case cJU_JPIMMED_4_01:
-            JU_IMMSET_01_CASCADE(4, uint32_t *, cJU_JPLEAF4, JL_LEAF4VALUEAREA,
-                                 JU_IMMSET_01_COPY_EVEN, ignore,
-                                 j__udyAllocJLL4);
-        case cJU_JPIMMED_5_01:
-            JU_IMMSET_01_CASCADE(5, uint8_t *, cJU_JPLEAF5, JL_LEAF5VALUEAREA,
-                                 JU_IMMSET_01_COPY_ODD,
-                                 JU_COPY5_LONG_TO_PINDEX, j__udyAllocJLL5);
-        case cJU_JPIMMED_6_01:
-            JU_IMMSET_01_CASCADE(6, uint8_t *, cJU_JPLEAF6, JL_LEAF6VALUEAREA,
-                                 JU_IMMSET_01_COPY_ODD,
-                                 JU_COPY6_LONG_TO_PINDEX, j__udyAllocJLL6);
-        case cJU_JPIMMED_7_01:
-            JU_IMMSET_01_CASCADE(7, uint8_t *, cJU_JPLEAF7, JL_LEAF7VALUEAREA,
-                                 JU_IMMSET_01_COPY_ODD,
-                                 JU_COPY7_LONG_TO_PINDEX, j__udyAllocJLL7);
-#endif // JUDYL
-#endif // JU_64BIT
-
-// cJU_JPIMMED_1_* cases that can grow in place:
-//
-// (1_01 => 1_02 => 1_03 => [ 1_04 => ... => 1_07 => [ 1_08..15 => ]] LeafL)
-
-        case cJU_JPIMMED_1_02:
-#if (defined(JUDY1) || defined(JU_64BIT))
-        case cJU_JPIMMED_1_03:
-        case cJU_JPIMMED_1_04:
-        case cJU_JPIMMED_1_05:
-        case cJU_JPIMMED_1_06:
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-        case cJU_JPIMMED_1_07:
-        case cJ1_JPIMMED_1_08:
-        case cJ1_JPIMMED_1_09:
-        case cJ1_JPIMMED_1_10:
-        case cJ1_JPIMMED_1_11:
-        case cJ1_JPIMMED_1_12:
-        case cJ1_JPIMMED_1_13:
-        case cJ1_JPIMMED_1_14:
-#endif
-            JU_IMMSETINPLACE(1, uint8_t *, cJU_JPIMMED_1_02, j__udySearchLeaf1,
-                             JU_INSERTINPLACE);
-
-// cJU_JPIMMED_1_* cases that must cascade:
-//
-// (1_01 => 1_02 => 1_03 => [ 1_04 => ... => 1_07 => [ 1_08..15 => ]] LeafL)
-
-#if (defined(JUDYL) && (! defined(JU_64BIT)))
-        case cJU_JPIMMED_1_03:
-            JU_IMMSETCASCADE(1, 3, uint8_t *, cJU_JPLEAF1, JL_LEAF1VALUEAREA,
-                             j__udySearchLeaf1, JU_INSERTCOPY,
-                             j__udyAllocJLL1);
-#endif
-#if (defined(JUDY1) && (! defined(JU_64BIT)))
-        case cJU_JPIMMED_1_07:
-            JU_IMMSETCASCADE(1, 7, uint8_t *, cJU_JPLEAF1, ignore,
-                             j__udySearchLeaf1, JU_INSERTCOPY,
-                             j__udyAllocJLL1);
-
-#endif
-#if (defined(JUDYL) && defined(JU_64BIT))
-        case cJU_JPIMMED_1_07:
-            JU_IMMSETCASCADE(1, 7, uint8_t *, cJU_JPLEAF1, JL_LEAF1VALUEAREA,
-                             j__udySearchLeaf1, JU_INSERTCOPY,
-                             j__udyAllocJLL1);
-
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-// Special case, as described above, go directly from Immed to LeafB1:
-
-        case cJ1_JPIMMED_1_15:
-        {
-            Word_t DcdP0;
-            int    offset;
-            Pjlb_t PjlbRaw;
-            Pjlb_t Pjlb;
-
-            offset = j__udySearchLeaf1((Pjll_t) Pjp->jp_1Index, 15, Index);
-
-            JU_CHECK_IF_EXISTS(offset, ignore, Pjpm);
-
-// Create a bitmap leaf (special case for Judy1 64-bit only, see usage):  Set
-// new Index in bitmap, copy an Immed1_15 to the bitmap, and set the parent JP
-// EXCEPT jp_DcdPopO, leaving any followup to the caller:
-
-            if ((PjlbRaw = j__udyAllocJLB1(Pjpm)) == (Pjlb_t) NULL)
-                return(-1);
-            Pjlb = P_JLB(PjlbRaw);
-
-            JU_BITMAPSETL(Pjlb, Index);
-
-            for (offset = 0; offset < 15; ++offset)
-                JU_BITMAPSETL(Pjlb, Pjp->jp_1Index[offset]);
-
-//          Set jp_DcdPopO including the current pop0; incremented later:
-            DcdP0 = (Index & cJU_DCDMASK(1)) + 15 - 1;
-            JU_JPSETADT(Pjp, (Word_t)PjlbRaw, DcdP0, cJU_JPLEAF_B1);
-
-            return(1);
-        }
-#endif
-
-// cJU_JPIMMED_[2..7]_[02..15] cases that grow in place or cascade:
-//
-// (2_01 => [ 2_02 => 2_03 => [ 2_04..07 => ]] LeafL)
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-        case cJU_JPIMMED_2_02:
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-        case cJU_JPIMMED_2_03:
-        case cJ1_JPIMMED_2_04:
-        case cJ1_JPIMMED_2_05:
-        case cJ1_JPIMMED_2_06:
-#endif
-#if (defined(JUDY1) || defined(JU_64BIT))
-            JU_IMMSETINPLACE(2, uint16_t *, cJU_JPIMMED_2_02, j__udySearchLeaf2,
-                             JU_INSERTINPLACE);
-#endif
-
-#undef OLDPOP1
-#if ((defined(JUDY1) && (! defined(JU_64BIT))) || (defined(JUDYL) && defined(JU_64BIT)))
-        case cJU_JPIMMED_2_03:
-#define OLDPOP1 3
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-        case cJ1_JPIMMED_2_07:
-#define OLDPOP1 7
-#endif
-#if (defined(JUDY1) || defined(JU_64BIT))
-            JU_IMMSETCASCADE(2, OLDPOP1, uint16_t *, cJU_JPLEAF2,
-                             JL_LEAF2VALUEAREA, j__udySearchLeaf2,
-                             JU_INSERTCOPY, j__udyAllocJLL2);
-#endif
-
-// (3_01 => [ 3_02 => [ 3_03..05 => ]] LeafL)
-
-#if (defined(JUDY1) && defined(JU_64BIT))
-        case cJU_JPIMMED_3_02:
-        case cJ1_JPIMMED_3_03:
-        case cJ1_JPIMMED_3_04:
-
-            JU_IMMSETINPLACE(3, uint8_t *, cJU_JPIMMED_3_02, j__udySearchLeaf3,
-                             JU_INSERTINPLACE3);
-#endif
-
-#undef OLDPOP1
-#if ((defined(JUDY1) && (! defined(JU_64BIT))) || (defined(JUDYL) && defined(JU_64BIT)))
-        case cJU_JPIMMED_3_02:
-#define OLDPOP1 2
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-        case cJ1_JPIMMED_3_05:
-#define OLDPOP1 5
-#endif
-#if (defined(JUDY1) || defined(JU_64BIT))
-            JU_IMMSETCASCADE(3, OLDPOP1, uint8_t *, cJU_JPLEAF3,
-                             JL_LEAF3VALUEAREA, j__udySearchLeaf3,
-                             JU_INSERTCOPY3, j__udyAllocJLL3);
-#endif
-
-#if (defined(JUDY1) && defined(JU_64BIT))
-
-// (4_01 => [[ 4_02..03 => ]] LeafL)
-
-        case cJ1_JPIMMED_4_02:
-
-            JU_IMMSETINPLACE(4, uint32_t *, cJ1_JPIMMED_4_02, j__udySearchLeaf4,
-                             JU_INSERTINPLACE);
-
-        case cJ1_JPIMMED_4_03:
-
-            JU_IMMSETCASCADE(4, 3, uint32_t *, cJU_JPLEAF4, ignore,
-                             j__udySearchLeaf4, JU_INSERTCOPY,
-                             j__udyAllocJLL4);
-
-// (5_01 => [[ 5_02..03 => ]] LeafL)
-
-        case cJ1_JPIMMED_5_02:
-
-            JU_IMMSETINPLACE(5, uint8_t *, cJ1_JPIMMED_5_02, j__udySearchLeaf5,
-                             JU_INSERTINPLACE5);
-
-        case cJ1_JPIMMED_5_03:
-
-            JU_IMMSETCASCADE(5, 3, uint8_t *, cJU_JPLEAF5, ignore,
-                             j__udySearchLeaf5, JU_INSERTCOPY5,
-                             j__udyAllocJLL5);
-
-// (6_01 => [[ 6_02 => ]] LeafL)
-
-        case cJ1_JPIMMED_6_02:
-
-            JU_IMMSETCASCADE(6, 2, uint8_t *, cJU_JPLEAF6, ignore,
-                             j__udySearchLeaf6, JU_INSERTCOPY6,
-                             j__udyAllocJLL6);
-
-// (7_01 => [[ 7_02 => ]] LeafL)
-
-        case cJ1_JPIMMED_7_02:
-
-            JU_IMMSETCASCADE(7, 2, uint8_t *, cJU_JPLEAF7, ignore,
-                             j__udySearchLeaf7, JU_INSERTCOPY7,
-                             j__udyAllocJLL7);
-
-#endif // (JUDY1 && JU_64BIT)
-
-
-// ****************************************************************************
-// INVALID JP TYPE:
-
-        default: JU_SET_ERRNO_NONNULL(Pjpm, JU_ERRNO_CORRUPT); return(-1);
-
-        } // switch on JP type
-
-        {
-
-#ifdef SUBEXPCOUNTS
-
-// This code might seem strange here.  However it saves some memory read time
-// during insert (~70nS) because a pipelined processor does not need to "stall"
-// waiting for the memory read to complete.  Hope the compiler is not too smart
-// or dumb and moves the code down to where it looks like it belongs (below a
-// few lines).
-
-            Word_t SubExpCount = 0;     // current subexpanse counter.
-
-            if (PSubExp != (PWord_t) NULL)      // only if BranchB/U.
-                SubExpCount = PSubExp[0];
-#endif
-
-// PROCESS JP -- RECURSIVELY:
-//
-// For non-Immed JP types, if successful, post-increment the population count
-// at this Level.
-
-            retcode = j__udyInsWalk(Pjp, Index, Pjpm);
-
-// Successful insert, increment JP and subexpanse count:
-
-            if ((JU_JPTYPE(Pjp) < cJU_JPIMMED_1_01) && (retcode == 1))
-            {
-                jp_t   JP;
-                Word_t DcdP0;
-#ifdef SUBEXPCOUNTS
-
-// Note:  Pjp must be a pointer to a BranchB/U:
-
-                if (PSubExp != (PWord_t) NULL) PSubExp[0] = SubExpCount + 1;
-#endif
-
-                JP = *Pjp;
-                DcdP0 = JU_JPDCDPOP0(Pjp) + 1;
-                JU_JPSETADT(Pjp, JP.jp_Addr, DcdP0, JU_JPTYPE(&JP));
-            }
-        }
-        return(retcode);
-
-} // j__udyInsWalk()
-
-
-// ****************************************************************************
-// J U D Y   1   S E T
-// J U D Y   L   I N S
-//
-// Main entry point.  See the manual entry for details.
-
-#ifdef JUDY1
-FUNCTION int Judy1Set
-#else
-FUNCTION PPvoid_t JudyLIns
-#endif
-        (
-        PPvoid_t  PPArray,      // in which to insert.
-        Word_t    Index,        // to insert.
-        PJError_t PJError       // optional, for returning error info.
-        )
-{
-#ifdef JUDY1
-#define Pjv       ignore        // placeholders for macros.
-#define Pjvnew    ignore
-#else
-        Pjv_t     Pjv;          // value area in old leaf.
-        Pjv_t     Pjvnew;       // value area in new leaf.
-#endif
-        Pjpm_t    Pjpm;         // array-global info.
-        int       offset;       // position in which to store new Index.
-        Pjlw_t    Pjlw;
-
-
-// CHECK FOR NULL POINTER (error by caller):
-
-        if (PPArray == (PPvoid_t) NULL)
-        {
-            JU_SET_ERRNO(PJError, JU_ERRNO_NULLPPARRAY);
-            JUDY1CODE(return(JERRI );)
-            JUDYLCODE(return(PPJERR);)
-        }
-
-        Pjlw = P_JLW(*PPArray); // first word of leaf.
-
-// ****************************************************************************
-// PROCESS TOP LEVEL "JRP" BRANCHES AND LEAVES:
-
-// ****************************************************************************
-// JRPNULL (EMPTY ARRAY):  BUILD A LEAFW WITH ONE INDEX:
-
-// if a valid empty array (null pointer), so create an array of population == 1:
-
-        if (Pjlw == (Pjlw_t)NULL)
-        {
-            Pjlw_t Pjlwnew;
-
-            Pjlwnew = j__udyAllocJLW(1);
-            JUDY1CODE(JU_CHECKALLOC(Pjlw_t, Pjlwnew, JERRI );)
-            JUDYLCODE(JU_CHECKALLOC(Pjlw_t, Pjlwnew, PPJERR);)
-
-            Pjlwnew[0] = 1 - 1;         // pop0 = 0.
-            Pjlwnew[1] = Index;
-
-            *PPArray = (Pvoid_t) Pjlwnew;
-            DBGCODE(JudyCheckPop(*PPArray);)
-
-  JUDY1CODE(return(1); )
-  JUDYLCODE(Pjlwnew[2] = 0; )           // value area.
-  JUDYLCODE(return((PPvoid_t) (Pjlwnew + 2)); )
-
-        }  // NULL JRP
-
-// ****************************************************************************
-// LEAFW, OTHER SIZE:
-
-        if (JU_LEAFW_POP0(*PPArray) < cJU_LEAFW_MAXPOP1) // must be a LEAFW
-        {
-            Pjlw_t Pjlwnew;
-            Word_t pop1;
-
-            Pjlw = P_JLW(*PPArray);             // first word of leaf.
-            pop1 = Pjlw[0] + 1;
-
-#ifdef JUDYL
-            Pjv = JL_LEAFWVALUEAREA(Pjlw, pop1);
-#endif
-            offset = j__udySearchLeafW(Pjlw + 1, pop1, Index);
-
-            if (offset >= 0)            // index is already valid:
-            {
-                DBGCODE(JudyCheckPop(*PPArray);)
-                JUDY1CODE(return(0); )
-                JUDYLCODE(return((PPvoid_t) (Pjv + offset)); )
-            }
-
-            offset = ~offset;
-
-// Insert index in cases where no new memory is needed:
-
-            if (JU_LEAFWGROWINPLACE(pop1))
-            {
-                ++Pjlw[0];                      // increase population.
-
-                JU_INSERTINPLACE(Pjlw + 1, pop1, offset, Index);
-#ifdef JUDYL
-                JU_INSERTINPLACE(Pjv, pop1, offset, 0);
-#endif
-                DBGCODE(JudyCheckPop(*PPArray);)
-                DBGCODE(JudyCheckSorted(Pjlw + 1, pop1 + 1, cJU_ROOTSTATE);)
-
-      JUDY1CODE(return(1); )
-      JUDYLCODE(return((PPvoid_t) (Pjv + offset)); )
-            }
-
-// Insert index into a new, larger leaf:
-
-            if (pop1 < cJU_LEAFW_MAXPOP1)       // can grow to a larger leaf.
-            {
-                Pjlwnew = j__udyAllocJLW(pop1 + 1);
-                JUDY1CODE(JU_CHECKALLOC(Pjlw_t, Pjlwnew, JERRI );)
-                JUDYLCODE(JU_CHECKALLOC(Pjlw_t, Pjlwnew, PPJERR);)
-
-                Pjlwnew[0] = pop1;              // set pop0 in new leaf.
-
-                JU_INSERTCOPY(Pjlwnew + 1, Pjlw + 1, pop1, offset, Index);
-#ifdef JUDYL
-                Pjvnew = JL_LEAFWVALUEAREA(Pjlwnew, pop1 + 1);
-                JU_INSERTCOPY(Pjvnew, Pjv, pop1, offset, 0);
-#endif
-                DBGCODE(JudyCheckSorted(Pjlwnew + 1, pop1 + 1, cJU_ROOTSTATE);)
-
-                j__udyFreeJLW(Pjlw, pop1, NULL);
-
-                *PPArray = (Pvoid_t) Pjlwnew;
-                DBGCODE(JudyCheckPop(*PPArray);)
-
-      JUDY1CODE(return(1); )
-      JUDYLCODE(return((PPvoid_t) (Pjvnew + offset)); )
-            }
-
-            assert(pop1 == cJU_LEAFW_MAXPOP1);
-
-// Leaf at max size => cannot insert new index, so cascade instead:
-//
-// Upon cascading from a LEAFW leaf to the first branch, must allocate and
-// initialize a JPM.
-
-            Pjpm = j__udyAllocJPM();
-            JUDY1CODE(JU_CHECKALLOC(Pjpm_t, Pjpm, JERRI );)
-            JUDYLCODE(JU_CHECKALLOC(Pjpm_t, Pjpm, PPJERR);)
-
-            (Pjpm->jpm_Pop0)       = cJU_LEAFW_MAXPOP1 - 1;
-            (Pjpm->jpm_JP.jp_Addr) = (Word_t) Pjlw;
-
-            if (j__udyCascadeL(&(Pjpm->jpm_JP), Pjpm) == -1)
-            {
-                JU_COPY_ERRNO(PJError, Pjpm);
-                JUDY1CODE(return(JERRI );)
-                JUDYLCODE(return(PPJERR);)
-            }
-
-// Note:  No need to pass Pjpm for memory decrement; LEAFW memory is never
-// counted in a JPM at all:
-
-            j__udyFreeJLW(Pjlw, cJU_LEAFW_MAXPOP1, NULL);
-            *PPArray = (Pvoid_t) Pjpm;
-
-        } // JU_LEAFW
-
-// ****************************************************************************
-// BRANCH:
-
-        {
-            int retcode;  // really only needed for Judy1, but free for JudyL.
-
-            Pjpm = P_JPM(*PPArray);
-            retcode = j__udyInsWalk(&(Pjpm->jpm_JP), Index, Pjpm);
-
-            if (retcode == -1)
-            {
-                JU_COPY_ERRNO(PJError, Pjpm);
-                JUDY1CODE(return(JERRI );)
-                JUDYLCODE(return(PPJERR);)
-            }
-
-            if (retcode ==  1) ++(Pjpm->jpm_Pop0);  // incr total array popu.
-
-            assert(((Pjpm->jpm_JP.jp_Type) == cJU_JPBRANCH_L)
-                || ((Pjpm->jpm_JP.jp_Type) == cJU_JPBRANCH_B)
-                || ((Pjpm->jpm_JP.jp_Type) == cJU_JPBRANCH_U));
-            DBGCODE(JudyCheckPop(*PPArray);)
-
-#ifdef JUDY1
-            assert((retcode == 0) || (retcode == 1));
-            return(retcode);            // == JU_RET_*_JPM().
-#else
-            assert(Pjpm->jpm_PValue != (Pjv_t) NULL);
-            return((PPvoid_t) Pjpm->jpm_PValue);
-#endif
-        }
-        /*NOTREACHED*/
-
-} // Judy1Set() / JudyLIns()
diff --git a/libs/klib/judy/JudyInsArray.c b/libs/klib/judy/JudyInsArray.c
deleted file mode 100644
index c647ea5..0000000
--- a/libs/klib/judy/JudyInsArray.c
+++ /dev/null
@@ -1,1176 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// TBD:  It would probably be faster for the caller if the JudyL version took
-// PIndex as an interleaved array of indexes and values rather than just
-// indexes with a separate values array (PValue), especially considering
-// indexes and values are copied here with for-loops anyway and not the
-// equivalent of memcpy().  All code could be revised to simply count by two
-// words for JudyL?  Supports "streaming" the data to/from disk better later?
-// In which case get rid of JU_ERRNO_NULLPVALUE, no longer needed, and simplify
-// the API to this code.
-// _________________
-
-// Judy1SetArray() and JudyLInsArray() functions for Judy1 and JudyL.
-// Compile with one of -DJUDY1 or -DJUDYL.
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-DBGCODE(extern void JudyCheckPop(Pvoid_t PArray);)
-
-
-// IMMED AND LEAF SIZE AND BRANCH TYPE ARRAYS:
-//
-// These support fast and easy lookup by level.
-
-static uint8_t immed_maxpop1[] = {
-    0,
-    cJU_IMMED1_MAXPOP1,
-    cJU_IMMED2_MAXPOP1,
-    cJU_IMMED3_MAXPOP1,
-#ifdef JU_64BIT
-    cJU_IMMED4_MAXPOP1,
-    cJU_IMMED5_MAXPOP1,
-    cJU_IMMED6_MAXPOP1,
-    cJU_IMMED7_MAXPOP1,
-#endif
-    // note:  There are no IMMEDs for whole words.
-};
-
-static uint8_t leaf_maxpop1[] = {
-    0,
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-    cJU_LEAF1_MAXPOP1,
-#else
-    0,                                  // 64-bit Judy1 has no Leaf1.
-#endif
-    cJU_LEAF2_MAXPOP1,
-    cJU_LEAF3_MAXPOP1,
-#ifdef JU_64BIT
-    cJU_LEAF4_MAXPOP1,
-    cJU_LEAF5_MAXPOP1,
-    cJU_LEAF6_MAXPOP1,
-    cJU_LEAF7_MAXPOP1,
-#endif
-    // note:  Root-level leaves are handled differently.
-};
-
-static uint8_t branchL_JPtype[] = {
-    0,
-    0,
-    cJU_JPBRANCH_L2,
-    cJU_JPBRANCH_L3,
-#ifdef JU_64BIT
-    cJU_JPBRANCH_L4,
-    cJU_JPBRANCH_L5,
-    cJU_JPBRANCH_L6,
-    cJU_JPBRANCH_L7,
-#endif
-    cJU_JPBRANCH_L,
-};
-
-static uint8_t branchB_JPtype[] = {
-    0,
-    0,
-    cJU_JPBRANCH_B2,
-    cJU_JPBRANCH_B3,
-#ifdef JU_64BIT
-    cJU_JPBRANCH_B4,
-    cJU_JPBRANCH_B5,
-    cJU_JPBRANCH_B6,
-    cJU_JPBRANCH_B7,
-#endif
-    cJU_JPBRANCH_B,
-};
-
-static uint8_t branchU_JPtype[] = {
-    0,
-    0,
-    cJU_JPBRANCH_U2,
-    cJU_JPBRANCH_U3,
-#ifdef JU_64BIT
-    cJU_JPBRANCH_U4,
-    cJU_JPBRANCH_U5,
-    cJU_JPBRANCH_U6,
-    cJU_JPBRANCH_U7,
-#endif
-    cJU_JPBRANCH_U,
-};
-
-// Subexpanse masks are similer to JU_DCDMASK() but without the need to clear
-// the first digits bits.  Avoid doing variable shifts by precomputing a
-// lookup array.
-
-static Word_t subexp_mask[] = {
-    0,
-    ~cJU_POP0MASK(1),
-    ~cJU_POP0MASK(2),
-    ~cJU_POP0MASK(3),
-#ifdef JU_64BIT
-    ~cJU_POP0MASK(4),
-    ~cJU_POP0MASK(5),
-    ~cJU_POP0MASK(6),
-    ~cJU_POP0MASK(7),
-#endif
-};
-
-
-// FUNCTION PROTOTYPES:
-
-static bool_t j__udyInsArray(Pjp_t PjpParent, int Level, PWord_t PPop1,
-                             PWord_t PIndex,
-#ifdef JUDYL
-                             Pjv_t   PValue,
-#endif
-                             Pjpm_t  Pjpm);
-
-
-// ****************************************************************************
-// J U D Y   1   S E T   A R R A Y
-// J U D Y   L   I N S   A R R A Y
-//
-// Main entry point.  See the manual entry for external overview.
-//
-// TBD:  Until thats written, note that the function returns 1 for success or
-// JERRI for serious error, including insufficient memory to build whole array;
-// use Judy*Count() to see how many were stored, the first N of the total
-// Count.  Also, since it takes Count == Pop1, it cannot handle a full array.
-// Also, "sorted" means ascending without duplicates, otherwise you get the
-// "unsorted" error.
-//
-// The purpose of these functions is to allow rapid construction of a large
-// Judy array given a sorted list of indexes (and for JudyL, corresponding
-// values).  At least one customer saw this as useful, and probably it would
-// also be useful as a sufficient workaround for fast(er) unload/reload to/from
-// disk.
-//
-// This code is written recursively for simplicity, until/unless someone
-// decides to make it faster and more complex.  Hopefully recursion is fast
-// enough simply because the function is so much faster than a series of
-// Set/Ins calls.
-
-#ifdef JUDY1
-FUNCTION int Judy1SetArray
-#else
-FUNCTION int JudyLInsArray
-#endif
-        (
-        PPvoid_t  PPArray,      // in which to insert, initially empty.
-        Word_t    Count,        // number of indexes (and values) to insert.
-const   Word_t *  const PIndex, // list of indexes to insert.
-#ifdef JUDYL
-const   Word_t *  const PValue, // list of corresponding values.
-#endif
-        PJError_t PJError       // optional, for returning error info.
-        )
-{
-        Pjlw_t    Pjlw;         // new root-level leaf.
-        Pjlw_t    Pjlwindex;    // first index in root-level leaf.
-        int       offset;       // in PIndex.
-
-
-// CHECK FOR NULL OR NON-NULL POINTER (error by caller):
-
-        if (PPArray == (PPvoid_t) NULL)
-        { JU_SET_ERRNO(PJError, JU_ERRNO_NULLPPARRAY);   return(JERRI); }
-
-        if (*PPArray != (Pvoid_t) NULL)
-        { JU_SET_ERRNO(PJError, JU_ERRNO_NONNULLPARRAY); return(JERRI); }
-
-        if (PIndex == (PWord_t) NULL)
-        { JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);    return(JERRI); }
-
-#ifdef JUDYL
-        if (PValue == (PWord_t) NULL)
-        { JU_SET_ERRNO(PJError, JU_ERRNO_NULLPVALUE);    return(JERRI); }
-#endif
-
-
-// HANDLE LARGE COUNT (= POP1) (typical case):
-//
-// Allocate and initialize a JPM, set the root pointer to point to it, and then
-// build the tree underneath it.
-
-// Common code for unusual error handling when no JPM available:
-
-        if (Count > cJU_LEAFW_MAXPOP1)  // too big for root-level leaf.
-        {
-            Pjpm_t Pjpm;                        // new, to allocate.
-
-// Allocate JPM:
-
-            Pjpm = j__udyAllocJPM();
-            JU_CHECKALLOC(Pjpm_t, Pjpm, JERRI);
-            *PPArray = (Pvoid_t) Pjpm;
-
-// Set some JPM fields:
-
-            (Pjpm->jpm_Pop0) = Count - 1;
-            // note: (Pjpm->jpm_TotalMemWords) is now initialized.
-
-// Build Judy tree:
-//
-// In case of error save the final Count, possibly modified, unless modified to
-// 0, in which case free the JPM itself:
-
-            if (! j__udyInsArray(&(Pjpm->jpm_JP), cJU_ROOTSTATE, &Count,
-                                 (PWord_t) PIndex,
-#ifdef JUDYL
-                                 (Pjv_t) PValue,
-#endif
-                                 Pjpm))
-            {
-                JU_COPY_ERRNO(PJError, Pjpm);
-
-                if (Count)              // partial success, adjust pop0:
-                {
-                    (Pjpm->jpm_Pop0) = Count - 1;
-                }
-                else                    // total failure, free JPM:
-                {
-                    j__udyFreeJPM(Pjpm, (Pjpm_t) NULL);
-                    *PPArray = (Pvoid_t) NULL;
-                }
-
-                DBGCODE(JudyCheckPop(*PPArray);)
-                return(JERRI);
-            }
-
-            DBGCODE(JudyCheckPop(*PPArray);)
-            return(1);
-
-        } // large count
-
-
-// HANDLE SMALL COUNT (= POP1):
-//
-// First ensure indexes are in sorted order:
-
-        for (offset = 1; offset < Count; ++offset)
-        {
-            if (PIndex[offset - 1] >= PIndex[offset])
-            { JU_SET_ERRNO(PJError, JU_ERRNO_UNSORTED); return(JERRI); }
-        }
-
-        if (Count == 0) return(1);              // *PPArray remains null.
-
-        {
-            Pjlw      = j__udyAllocJLW(Count + 1);
-                        JU_CHECKALLOC(Pjlw_t, Pjlw, JERRI);
-            *PPArray  = (Pvoid_t) Pjlw;
-            Pjlw[0]   = Count - 1;              // set pop0.
-            Pjlwindex = Pjlw + 1;
-        }
-
-// Copy whole-word indexes (and values) to the root-level leaf:
-
-          JU_COPYMEM(Pjlwindex,                      PIndex, Count);
-JUDYLCODE(JU_COPYMEM(JL_LEAFWVALUEAREA(Pjlw, Count), PValue, Count));
-
-        DBGCODE(JudyCheckPop(*PPArray);)
-        return(1);
-
-} // Judy1SetArray() / JudyLInsArray()
-
-
-// ****************************************************************************
-// __ J U D Y   I N S   A R R A Y
-//
-// Given:
-//
-// - a pointer to a JP
-//
-// - the JPs level in the tree, that is, the number of digits left to decode
-//   in the indexes under the JP (one less than the level of the JPM or branch
-//   in which the JP resides); cJU_ROOTSTATE on first entry (when JP is the one
-//   in the JPM), down to 1 for a Leaf1, LeafB1, or FullPop
-//
-// - a pointer to the number of indexes (and corresponding values) to store in
-//   this subtree, to modify in case of partial success
-//
-// - a list of indexes (and for JudyL, corresponding values) to store in this
-//   subtree
-//
-// - a JPM for tracking memory usage and returning errors
-//
-// Recursively build a subtree (immediate indexes, leaf, or branch with
-// subtrees) and modify the JP accordingly.  On the way down, build a BranchU
-// (only) for any expanse with *PPop1 too high for a leaf; on the way out,
-// convert the BranchU to a BranchL or BranchB if appropriate.  Keep memory
-// statistics in the JPM.
-//
-// Return TRUE for success, or FALSE with error information set in the JPM in
-// case of error, in which case leave a partially constructed but healthy tree,
-// and modify parent population counts on the way out.
-//
-// Note:  Each call of this function makes all modifications to the PjpParent
-// it receives; neither the parent nor child calls do this.
-
-FUNCTION static bool_t j__udyInsArray(
-        Pjp_t   PjpParent,              // parent JP in/under which to store.
-        int     Level,                  // initial digits remaining to decode.
-        PWord_t PPop1,                  // number of indexes to store.
-        PWord_t PIndex,                 // list of indexes to store.
-#ifdef JUDYL
-        Pjv_t   PValue,                 // list of corresponding values.
-#endif
-        Pjpm_t  Pjpm)                   // for memory and errors.
-{
-        Pjp_t   Pjp;                    // lower-level JP.
-        Word_t  Pjbany;                 // any type of branch.
-        int     levelsub;               // actual, of Pjps node, <= Level.
-        Word_t  pop1 = *PPop1;          // fast local value.
-        Word_t  pop1sub;                // population of one subexpanse.
-        uint8_t JPtype;                 // current JP type.
-        uint8_t JPtype_null;            // precomputed value for new branch.
-        jp_t    JPnull;                 // precomputed for speed.
-        Pjbu_t  PjbuRaw;                // constructed BranchU.
-        Pjbu_t  Pjbu;
-        int     digit;                  // in BranchU.
-        Word_t  digitmask;              // for a digit in a BranchU.
-        Word_t  digitshifted;           // shifted to correct offset.
-        Word_t  digitshincr;            // increment for digitshifted.
-        int     offset;                 // in PIndex, or a bitmap subexpanse.
-        int     numJPs;                 // number non-null in a BranchU.
-        bool_t  retval;                 // to return from this func.
-JUDYLCODE(Pjv_t PjvRaw);                // destination value area.
-JUDYLCODE(Pjv_t Pjv);
-
-
-// MACROS FOR COMMON CODE:
-//
-// Note:  These use function and local parameters from the context.
-// Note:  Assume newly allocated memory is zeroed.
-
-// Indicate whether a sorted list of indexes in PIndex, based on the first and
-// last indexes in the list using pop1, are in the same subexpanse between
-// Level and L_evel:
-//
-// This can be confusing!  Note that SAMESUBEXP(L) == TRUE means the indexes
-// are the same through level L + 1, and it says nothing about level L and
-// lower; they might be the same or they might differ.
-//
-// Note:  In principle SAMESUBEXP needs a mask for the digits from Level,
-// inclusive, to L_evel, exclusive.  But in practice, since the indexes are all
-// known to be identical above Level, it just uses a mask for the digits
-// through L_evel + 1; see subexp_mask[].
-
-#define SAMESUBEXP(L_evel) \
-        (! ((PIndex[0] ^ PIndex[pop1 - 1]) & subexp_mask[L_evel]))
-
-// Set PjpParent to a null JP appropriate for the level of the node to which it
-// points, which is 1 less than the level of the node in which the JP resides,
-// which is by definition Level:
-//
-// Note:  This can set the JPMs JP to an invalid jp_Type, but it doesnt
-// matter because the JPM is deleted by the caller.
-
-#define SETJPNULL_PARENT \
-            JU_JPSETADT(PjpParent, 0, 0, cJU_JPNULL1 + Level - 1);
-
-// Variation to set a specified JP (in a branch being built) to a precomputed
-// null JP:
-
-#define SETJPNULL(Pjp) *(Pjp) = JPnull
-
-// Handle complete (as opposed to partial) memory allocation failure:  Set the
-// parent JP to an appropriate null type (to leave a consistent tree), zero the
-// callers population count, and return FALSE:
-//
-// Note:  At Level == cJU_ROOTSTATE this sets the JPMs JPs jp_Type to a bogus
-// value, but it doesnt matter because the JPM should be deleted by the
-// caller.
-
-#define NOMEM { SETJPNULL_PARENT; *PPop1 = 0; return(FALSE); }
-
-// Allocate a Leaf1-N and save the address in Pjll; in case of failure, NOMEM:
-
-#define ALLOCLEAF(AllocLeaf) \
-        if ((PjllRaw = AllocLeaf(pop1, Pjpm)) == (Pjll_t) NULL) NOMEM; \
-        Pjll = P_JLL(PjllRaw);
-
-// Copy indexes smaller than words (and values which are whole words) from
-// given arrays to immediate indexes or a leaf:
-//
-// TBD:  These macros overlap with some of the code in JudyCascade.c; do some
-// merging?  That file has functions while these are macros.
-
-#define COPYTOLEAF_EVEN_SUB(Pjll,LeafType)              \
-        {                                               \
-            LeafType * P_leaf  = (LeafType *) (Pjll);   \
-            Word_t     p_op1   = pop1;                  \
-            PWord_t    P_Index = PIndex;                \
-                                                        \
-            assert(pop1 > 0);                           \
-                                                        \
-            do { *P_leaf++ = *P_Index++; /* truncates */\
-            } while (--(p_op1));                        \
-        }
-
-#define COPYTOLEAF_ODD_SUB(cLevel,Pjll,Copy)            \
-        {                                               \
-            uint8_t * P_leaf  = (uint8_t *) (Pjll);     \
-            Word_t    p_op1   = pop1;                   \
-            PWord_t   P_Index = PIndex;                 \
-                                                        \
-            assert(pop1 > 0);                           \
-                                                        \
-            do {                                        \
-                Copy(P_leaf, *P_Index);                 \
-                P_leaf += (cLevel); ++P_Index;          \
-            } while (--(p_op1));                        \
-        }
-
-#ifdef JUDY1
-
-#define COPYTOLEAF_EVEN(Pjll,LeafType)   COPYTOLEAF_EVEN_SUB(Pjll,LeafType)
-#define COPYTOLEAF_ODD(cLevel,Pjll,Copy) COPYTOLEAF_ODD_SUB(cLevel,Pjll,Copy)
-
-#else // JUDYL adds copying of values:
-
-#define COPYTOLEAF_EVEN(Pjll,LeafType)                  \
-        {                                               \
-            COPYTOLEAF_EVEN_SUB(Pjll,LeafType)          \
-            JU_COPYMEM(Pjv, PValue, pop1);              \
-        }
-
-#define COPYTOLEAF_ODD(cLevel,Pjll,Copy)                \
-        {                                               \
-            COPYTOLEAF_ODD_SUB( cLevel,Pjll,Copy)       \
-            JU_COPYMEM(Pjv, PValue, pop1);              \
-        }
-
-#endif
-
-// Set the JP type for an immediate index, where BaseJPType is JPIMMED_*_02:
-
-#define SETIMMTYPE(BaseJPType)  (PjpParent->jp_Type) = (BaseJPType) + pop1 - 2
-
-// Allocate and populate a Leaf1-N:
-//
-// Build MAKELEAF_EVEN() and MAKELEAF_ODD() using macros for common code.
-
-#define MAKELEAF_SUB1(AllocLeaf,ValueArea,LeafType)                     \
-        ALLOCLEAF(AllocLeaf);                                           \
-        JUDYLCODE(Pjv = ValueArea(Pjll, pop1))
-
-
-#define MAKELEAF_SUB2(cLevel,JPType)                                    \
-{                                                                       \
-        Word_t D_cdP0;                                                  \
-        assert(pop1 - 1 <= cJU_POP0MASK(cLevel));                       \
-        D_cdP0 = (*PIndex & cJU_DCDMASK(cLevel)) | (pop1 - 1);          \
-        JU_JPSETADT(PjpParent, (Word_t)PjllRaw, D_cdP0, JPType);        \
-}
-
-
-#define MAKELEAF_EVEN(cLevel,JPType,AllocLeaf,ValueArea,LeafType)       \
-        MAKELEAF_SUB1(AllocLeaf,ValueArea,LeafType);                    \
-        COPYTOLEAF_EVEN(Pjll, LeafType);                                \
-        MAKELEAF_SUB2(cLevel, JPType)
-
-#define MAKELEAF_ODD(cLevel,JPType,AllocLeaf,ValueArea,Copy)            \
-        MAKELEAF_SUB1(AllocLeaf,ValueArea,LeafType);                    \
-        COPYTOLEAF_ODD(cLevel, Pjll, Copy);                             \
-        MAKELEAF_SUB2(cLevel, JPType)
-
-// Ensure that the indexes to be stored in immediate indexes or a leaf are
-// sorted:
-//
-// This check is pure overhead, but required in order to protect the Judy array
-// against caller error, to avoid a later corruption or core dump from a
-// seemingly valid Judy array.  Do this check piecemeal at the leaf level while
-// the indexes are already in the cache.  Higher-level order-checking occurs
-// while building branches.
-//
-// Note:  Any sorting error in the expanse of a single immediate indexes JP or
-// a leaf => save no indexes in that expanse.
-
-#define CHECKLEAFORDER                                                  \
-        {                                                               \
-            for (offset = 1; offset < pop1; ++offset)                   \
-            {                                                           \
-                if (PIndex[offset - 1] >= PIndex[offset])               \
-                {                                                       \
-                    SETJPNULL_PARENT;                                   \
-                    *PPop1 = 0;                                         \
-                    JU_SET_ERRNO_NONNULL(Pjpm, JU_ERRNO_UNSORTED);      \
-                    return(FALSE);                                      \
-                }                                                       \
-            }                                                           \
-        }
-
-
-// ------ START OF CODE ------
-
-        assert( Level >= 1);
-        assert( Level <= cJU_ROOTSTATE);
-        assert((Level <  cJU_ROOTSTATE) || (pop1 > cJU_LEAFW_MAXPOP1));
-
-
-// CHECK FOR TOP LEVEL:
-//
-// Special case:  If at the top level (PjpParent is in the JPM), a top-level
-// branch must be created, even if its a BranchL with just one JP.  (The JPM
-// cannot point to a leaf because the leaf would have to be a lower-level,
-// higher-capacity leaf under a narrow pointer (otherwise a root-level leaf
-// would suffice), and the JPMs JP cant handle a narrow pointer because the
-// jp_DcdPopO field isnt big enough.)  Otherwise continue to check for a pop1
-// small enough to support immediate indexes or a leaf before giving up and
-// making a lower-level branch.
-
-        if (Level == cJU_ROOTSTATE)
-        {
-            levelsub = cJU_ROOTSTATE;
-            goto BuildBranch2;
-        }
-        assert(Level < cJU_ROOTSTATE);
-
-
-// SKIP JPIMMED_*_01:
-//
-// Immeds with pop1 == 1 should be handled in-line during branch construction.
-
-        assert(pop1 > 1);
-
-
-// BUILD JPIMMED_*_02+:
-//
-// The starting address of the indexes depends on Judy1 or JudyL; also, JudyL
-// includes a pointer to a values-only leaf.
-
-        if (pop1 <= immed_maxpop1[Level])      // note: always < root level.
-        {
-            JUDY1CODE(uint8_t * Pjll = (uint8_t *) (PjpParent->jp_1Index);)
-            JUDYLCODE(uint8_t * Pjll = (uint8_t *) (PjpParent->jp_LIndex);)
-
-            CHECKLEAFORDER;             // indexes to be stored are sorted.
-
-#ifdef JUDYL
-            if ((PjvRaw = j__udyLAllocJV(pop1, Pjpm)) == (Pjv_t) NULL)
-                NOMEM;
-            (PjpParent->jp_Addr) = (Word_t) PjvRaw;
-            Pjv = P_JV(PjvRaw);
-#endif
-
-            switch (Level)
-            {
-            case 1: COPYTOLEAF_EVEN(Pjll, uint8_t);
-                    SETIMMTYPE(cJU_JPIMMED_1_02);
-                    break;
-#if (defined(JUDY1) || defined(JU_64BIT))
-            case 2: COPYTOLEAF_EVEN(Pjll, uint16_t);
-                    SETIMMTYPE(cJU_JPIMMED_2_02);
-                    break;
-            case 3: COPYTOLEAF_ODD(3, Pjll, JU_COPY3_LONG_TO_PINDEX);
-                    SETIMMTYPE(cJU_JPIMMED_3_02);
-                    break;
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-            case 4: COPYTOLEAF_EVEN(Pjll, uint32_t);
-                    SETIMMTYPE(cJ1_JPIMMED_4_02);
-                    break;
-            case 5: COPYTOLEAF_ODD(5, Pjll, JU_COPY5_LONG_TO_PINDEX);
-                    SETIMMTYPE(cJ1_JPIMMED_5_02);
-                    break;
-            case 6: COPYTOLEAF_ODD(6, Pjll, JU_COPY6_LONG_TO_PINDEX);
-                    SETIMMTYPE(cJ1_JPIMMED_6_02);
-                    break;
-            case 7: COPYTOLEAF_ODD(7, Pjll, JU_COPY7_LONG_TO_PINDEX);
-                    SETIMMTYPE(cJ1_JPIMMED_7_02);
-                    break;
-#endif
-            default: assert(FALSE);     // should be impossible.
-            }
-
-            return(TRUE);               // note: no children => no *PPop1 mods.
-
-        } // JPIMMED_*_02+
-
-
-// BUILD JPLEAF*:
-//
-// This code is a little tricky.  The method is:  For each level starting at
-// the present Level down through levelsub = 1, and then as a special case for
-// LeafB1 and FullPop (which are also at levelsub = 1 but have different
-// capacity, see later), check if pop1 fits in a leaf (using leaf_maxpop1[])
-// at that level.  If so, except for Level == levelsub, check if all of the
-// current indexes to be stored are in the same (narrow) subexpanse, that is,
-// the digits from Level to levelsub + 1, inclusive, are identical between the
-// first and last index in the (sorted) list (in PIndex).  If this condition is
-// satisfied at any level, build a leaf at that level (under a narrow pointer
-// if Level > levelsub).
-//
-// Note:  Doing the search in this order results in storing the indexes in
-// "least compressed form."
-
-        for (levelsub = Level; levelsub >= 1; --levelsub)
-        {
-            Pjll_t PjllRaw;
-            Pjll_t Pjll;
-
-// Check if pop1 is too large to fit in a leaf at levelsub; if so, try the next
-// lower level:
-
-            if (pop1 > leaf_maxpop1[levelsub]) continue;
-
-// If pop1 fits in a leaf at levelsub, but levelsub is lower than Level, must
-// also check whether all the indexes in the expanse to store can in fact be
-// placed under a narrow pointer; if not, a leaf cannot be used, at this or any
-// lower level (levelsub):
-
-            if ((levelsub < Level) && (! SAMESUBEXP(levelsub)))
-                goto BuildBranch;       // cant use a narrow, need a branch.
-
-// Ensure valid pop1 and all indexes are in fact common through Level:
-
-            assert(pop1 <= cJU_POP0MASK(Level) + 1);
-            assert(! ((PIndex[0] ^ PIndex[pop1 - 1]) & cJU_DCDMASK(Level)));
-
-            CHECKLEAFORDER;             // indexes to be stored are sorted.
-
-// Build correct type of leaf:
-//
-// Note:  The jp_DcdPopO and jp_Type assignments in MAKELEAF_* happen correctly
-// for the levelsub (not Level) of the new leaf, even if its under a narrow
-// pointer.
-
-            switch (levelsub)
-            {
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-            case 1: MAKELEAF_EVEN(1, cJU_JPLEAF1, j__udyAllocJLL1,
-                                  JL_LEAF1VALUEAREA, uint8_t);
-                    break;
-#endif
-            case 2: MAKELEAF_EVEN(2, cJU_JPLEAF2, j__udyAllocJLL2,
-                                  JL_LEAF2VALUEAREA, uint16_t);
-                    break;
-            case 3: MAKELEAF_ODD( 3, cJU_JPLEAF3, j__udyAllocJLL3,
-                                  JL_LEAF3VALUEAREA, JU_COPY3_LONG_TO_PINDEX);
-                    break;
-#ifdef JU_64BIT
-            case 4: MAKELEAF_EVEN(4, cJU_JPLEAF4, j__udyAllocJLL4,
-                                  JL_LEAF4VALUEAREA, uint32_t);
-                    break;
-            case 5: MAKELEAF_ODD( 5, cJU_JPLEAF5, j__udyAllocJLL5,
-                                  JL_LEAF5VALUEAREA, JU_COPY5_LONG_TO_PINDEX);
-                    break;
-            case 6: MAKELEAF_ODD( 6, cJU_JPLEAF6, j__udyAllocJLL6,
-                                  JL_LEAF6VALUEAREA, JU_COPY6_LONG_TO_PINDEX);
-                    break;
-            case 7: MAKELEAF_ODD( 7, cJU_JPLEAF7, j__udyAllocJLL7,
-                                  JL_LEAF7VALUEAREA, JU_COPY7_LONG_TO_PINDEX);
-                    break;
-#endif
-            default: assert(FALSE);     // should be impossible.
-            }
-
-            return(TRUE);               // note: no children => no *PPop1 mods.
-
-        } // JPLEAF*
-
-
-// BUILD JPLEAF_B1 OR JPFULLPOPU1:
-//
-// See above about JPLEAF*.  If pop1 doesnt fit in any level of linear leaf,
-// it might still fit in a LeafB1 or FullPop, perhaps under a narrow pointer.
-
-        if ((Level == 1) || SAMESUBEXP(1))      // same until last digit.
-        {
-            Pjlb_t PjlbRaw;                     // for bitmap leaf.
-            Pjlb_t Pjlb;
-
-            assert(pop1 <= cJU_JPFULLPOPU1_POP0 + 1);
-            CHECKLEAFORDER;             // indexes to be stored are sorted.
-
-#ifdef JUDY1
-
-// JPFULLPOPU1:
-
-            if (pop1 == cJU_JPFULLPOPU1_POP0 + 1)
-            {
-                Word_t  Addr  = PjpParent->jp_Addr;
-                Word_t  DcdP0 = (*PIndex & cJU_DCDMASK(1))
-                                        | cJU_JPFULLPOPU1_POP0;
-                JU_JPSETADT(PjpParent, Addr, DcdP0, cJ1_JPFULLPOPU1);
-
-                return(TRUE);
-            }
-#endif
-
-// JPLEAF_B1:
-
-            if ((PjlbRaw = j__udyAllocJLB1(Pjpm)) == (Pjlb_t) NULL)
-                NOMEM;
-            Pjlb = P_JLB(PjlbRaw);
-
-            for (offset = 0; offset < pop1; ++offset)
-                JU_BITMAPSETL(Pjlb, PIndex[offset]);
-
-            retval = TRUE;              // default.
-
-#ifdef JUDYL
-
-// Build subexpanse values-only leaves (LeafVs) under LeafB1:
-
-            for (offset = 0; offset < cJU_NUMSUBEXPL; ++offset)
-            {
-                if (! (pop1sub = j__udyCountBitsL(JU_JLB_BITMAP(Pjlb, offset))))
-                    continue;           // skip empty subexpanse.
-
-// Allocate one LeafV = JP subarray; if out of memory, clear bitmaps for higher
-// subexpanses and adjust *PPop1:
-
-                if ((PjvRaw = j__udyLAllocJV(pop1sub, Pjpm))
-                 == (Pjv_t) NULL)
-                {
-                    for (/* null */; offset < cJU_NUMSUBEXPL; ++offset)
-                    {
-                        *PPop1 -= j__udyCountBitsL(JU_JLB_BITMAP(Pjlb, offset));
-                        JU_JLB_BITMAP(Pjlb, offset) = 0;
-                    }
-
-                    retval = FALSE;
-                    break;
-                }
-
-// Populate values-only leaf and save the pointer to it:
-
-                Pjv = P_JV(PjvRaw);
-                JU_COPYMEM(Pjv, PValue, pop1sub);
-                JL_JLB_PVALUE(Pjlb, offset) = PjvRaw;   // first-tier pointer.
-                PValue += pop1sub;
-
-            } // for each subexpanse
-
-#endif // JUDYL
-
-// Attach new LeafB1 to parent JP; note use of *PPop1 possibly < pop1:
-
-            JU_JPSETADT(PjpParent, (Word_t) PjlbRaw, 
-                    (*PIndex & cJU_DCDMASK(1)) | (*PPop1 - 1), cJU_JPLEAF_B1);
-
-            return(retval);
-
-        } // JPLEAF_B1 or JPFULLPOPU1
-
-
-// BUILD JPBRANCH_U*:
-//
-// Arriving at BuildBranch means Level < top level but the pop1 is too large
-// for immediate indexes or a leaf, even under a narrow pointer, including a
-// LeafB1 or FullPop at level 1.  This implies SAMESUBEXP(1) == FALSE, that is,
-// the indexes to be stored "branch" at level 2 or higher.
-
-BuildBranch:    // come here directly if a leaf wont work.
-
-        assert(Level >= 2);
-        assert(Level < cJU_ROOTSTATE);
-        assert(! SAMESUBEXP(1));                // sanity check, see above.
-
-// Determine the appropriate level for a new branch node; see if a narrow
-// pointer can be used:
-//
-// This can be confusing.  The branch is required at the lowest level L where
-// the indexes to store are not in the same subexpanse at level L-1.  Work down
-// from Level to tree level 3, which is 1 above the lowest tree level = 2 at
-// which a branch can be used.  Theres no need to check SAMESUBEXP at level 2
-// because its known to be false at level 2-1 = 1.
-//
-// Note:  Unlike for a leaf node, a narrow pointer is always used for a branch
-// if possible, that is, maximum compression is always used, except at the top
-// level of the tree, where a JPM cannot support a narrow pointer, meaning a
-// top BranchL can have a single JP (fanout = 1); but that case jumps directly
-// to BuildBranch2.
-//
-// Note:  For 32-bit systems the only usable values for a narrow pointer are
-// Level = 3 and levelsub = 2; 64-bit systems have many more choices; but
-// hopefully this for-loop is fast enough even on a 32-bit system.
-//
-// TBD:  If not fast enough, #ifdef JU_64BIT and handle the 32-bit case faster.
-
-        for (levelsub = Level; levelsub >= 3; --levelsub)  // see above.
-            if (! SAMESUBEXP(levelsub - 1))     // at limit of narrow pointer.
-                break;                          // put branch at levelsub.
-
-BuildBranch2:   // come here directly for Level = levelsub = cJU_ROOTSTATE.
-
-        assert(levelsub >= 2);
-        assert(levelsub <= Level);
-
-// Initially build a BranchU:
-//
-// Always start with a BranchU because the number of populated subexpanses is
-// not yet known.  Use digitmask, digitshifted, and digitshincr to avoid
-// expensive variable shifts within JU_DIGITATSTATE within the loop.
-//
-// TBD:  The use of digitmask, etc. results in more increment operations per
-// loop, is there an even faster way?
-//
-// TBD:  Would it pay to pre-count the populated JPs (subexpanses) and
-// pre-compress the branch, that is, build a BranchL or BranchB immediately,
-// also taking account of opportunistic uncompression rules?  Probably not
-// because at high levels of the tree there might be huge numbers of indexes
-// (hence cache lines) to scan in the PIndex array to determine the fanout
-// (number of JPs) needed.
-
-        if ((PjbuRaw = j__udyAllocJBU(Pjpm)) == (Pjbu_t) NULL) NOMEM;
-        Pjbu = P_JBU(PjbuRaw);
-
-        JPtype_null       = cJU_JPNULL1 + levelsub - 2;  // in new BranchU.
-        JU_JPSETADT(&JPnull, 0, 0, JPtype_null);
-
-        Pjp               = Pjbu->jbu_jp;           // for convenience in loop.
-        numJPs            = 0;                      // non-null in the BranchU.
-        digitmask         = cJU_MASKATSTATE(levelsub);   // see above.
-        digitshincr       = 1UL << (cJU_BITSPERBYTE * (levelsub - 1));
-        retval            = TRUE;
-
-// Scan and populate JPs (subexpanses):
-//
-// Look for all indexes matching each digit in the BranchU (at the correct
-// levelsub), and meanwhile notice any sorting error.  Increment PIndex (and
-// PValue) and reduce pop1 for each subexpanse handled successfully.
-
-        for (digit = digitshifted = 0;
-             digit < cJU_BRANCHUNUMJPS;
-             ++digit, digitshifted += digitshincr, ++Pjp)
-        {
-            DBGCODE(Word_t pop1subprev;)
-            assert(pop1 != 0);          // end of indexes is handled elsewhere.
-
-// Count indexes in digits subexpanse:
-
-            for (pop1sub = 0; pop1sub < pop1; ++pop1sub)
-                if (digitshifted != (PIndex[pop1sub] & digitmask)) break;
-
-// Empty subexpanse (typical, performance path) or sorting error (rare):
-
-            if (pop1sub == 0)
-            {
-                if (digitshifted < (PIndex[0] & digitmask))
-                { SETJPNULL(Pjp); continue; }           // empty subexpanse.
-
-                assert(pop1 < *PPop1);  // did save >= 1 index and decr pop1.
-                JU_SET_ERRNO_NONNULL(Pjpm, JU_ERRNO_UNSORTED);
-                goto AbandonBranch;
-            }
-
-// Non-empty subexpanse:
-//
-// First shortcut by handling pop1sub == 1 (JPIMMED_*_01) inline locally.
-
-            if (pop1sub == 1)                   // note: can be at root level.
-            {
-                Word_t Addr = 0;
-      JUDYLCODE(Addr    = (Word_t) (*PValue++);)
-                JU_JPSETADT(Pjp, Addr, *PIndex, cJU_JPIMMED_1_01 + levelsub -2);
-
-                ++numJPs;
-
-                if (--pop1) { ++PIndex; continue; }  // more indexes to store.
-
-                ++digit; ++Pjp;                 // skip JP just saved.
-                goto ClearBranch;               // save time.
-            }
-
-// Recurse to populate one digits (subexpanses) JP; if successful, skip
-// indexes (and values) just stored (performance path), except when expanse is
-// completely stored:
-
-            DBGCODE(pop1subprev = pop1sub;)
-
-            if (j__udyInsArray(Pjp, levelsub - 1, &pop1sub, (PWord_t) PIndex,
-#ifdef JUDYL
-                               (Pjv_t) PValue,
-#endif
-                               Pjpm))
-            {                                   // complete success.
-                ++numJPs;
-                assert(pop1subprev == pop1sub);
-                assert(pop1 >= pop1sub);
-
-                if ((pop1 -= pop1sub) != 0)     // more indexes to store:
-                {
-                    PIndex += pop1sub;          // skip indexes just stored.
-          JUDYLCODE(PValue += pop1sub;)
-                    continue;
-                }
-                // else leave PIndex in BranchUs expanse.
-
-// No more indexes to store in BranchUs expanse:
-
-                ++digit; ++Pjp;                 // skip JP just saved.
-                goto ClearBranch;               // save time.
-            }
-
-// Handle any error at a lower level of recursion:
-//
-// In case of partial success, pop1sub != 0, but it was reduced from the value
-// passed to j__udyInsArray(); skip this JP later during ClearBranch.
-
-            assert(pop1subprev > pop1sub);      // check j__udyInsArray().
-            assert(pop1        > pop1sub);      // check j__udyInsArray().
-
-            if (pop1sub)                        // partial success.
-            { ++digit; ++Pjp; ++numJPs; }       // skip JP just saved.
-
-            pop1 -= pop1sub;                    // deduct saved indexes if any.
-
-// Same-level sorting error, or any lower-level error; abandon the rest of the
-// branch:
-//
-// Arrive here with pop1 = remaining unsaved indexes (always non-zero).  Adjust
-// the *PPop1 value to record and return, modify retval, and use ClearBranch to
-// finish up.
-
-AbandonBranch:
-            assert(pop1 != 0);                  // more to store, see above.
-            assert(pop1 <= *PPop1);             // sanity check.
-
-            *PPop1 -= pop1;                     // deduct unsaved indexes.
-            pop1    = 0;                        // to avoid error later.
-            retval  = FALSE;
-
-// Error (rare), or end of indexes while traversing new BranchU (performance
-// path); either way, mark the remaining JPs, if any, in the BranchU as nulls
-// and exit the loop:
-//
-// Arrive here with digit and Pjp set to the first JP to set to null.
-
-ClearBranch:
-            for (/* null */; digit < cJU_BRANCHUNUMJPS; ++digit, ++Pjp)
-                SETJPNULL(Pjp);
-            break;                              // saves one more compare.
-
-        } // for each digit
-
-
-// FINISH JPBRANCH_U*:
-//
-// Arrive here with a BranchU built under Pjbu, numJPs set, and either:  retval
-// == TRUE and *PPop1 unmodified, or else retval == FALSE, *PPop1 set to the
-// actual number of indexes saved (possibly 0 for complete failure at a lower
-// level upon the first call of j__udyInsArray()), and the Judy error set in
-// Pjpm.  Either way, PIndex points to an index within the expanse just
-// handled.
-
-        Pjbany = (Word_t) PjbuRaw;              // default = use this BranchU.
-        JPtype = branchU_JPtype[levelsub];
-
-// Check for complete failure above:
-
-        assert((! retval) || *PPop1);           // sanity check.
-
-        if ((! retval) && (*PPop1 == 0))        // nothing stored, full failure.
-        {
-            j__udyFreeJBU(PjbuRaw, Pjpm);
-            SETJPNULL_PARENT;
-            return(FALSE);
-        }
-
-// Complete or partial success so far; watch for sorting error after the
-// maximum digit (255) in the BranchU, which is indicated by having more
-// indexes to store in the BranchUs expanse:
-//
-// For example, if an index to store has a digit of 255 at levelsub, followed
-// by an index with a digit of 254, the for-loop above runs out of digits
-// without reducing pop1 to 0.
-
-        if (pop1 != 0)
-        {
-            JU_SET_ERRNO_NONNULL(Pjpm, JU_ERRNO_UNSORTED);
-            *PPop1 -= pop1;             // deduct unsaved indexes.
-            retval  = FALSE;
-        }
-        assert(*PPop1 != 0);            // branch (still) cannot be empty.
-
-
-// OPTIONALLY COMPRESS JPBRANCH_U*:
-//
-// See if the BranchU should be compressed to a BranchL or BranchB; if so, do
-// that and free the BranchU; otherwise just use the existing BranchU.  Follow
-// the same rules as in JudyIns.c (version 4.95):  Only check local population
-// (cJU_OPP_UNCOMP_POP0) for BranchL, and only check global memory efficiency
-// (JU_OPP_UNCOMPRESS) for BranchB.  TBD:  Have the rules changed?
-//
-// Note:  Because of differing order of operations, the latter compression
-// might not result in the same set of branch nodes as a series of sequential
-// insertions.
-//
-// Note:  Allocating a BranchU only to sometimes convert it to a BranchL or
-// BranchB is unfortunate, but attempting to work with a temporary BranchU on
-// the stack and then allocate and keep it as a BranchU in many cases is worse
-// in terms of error handling.
-
-
-// COMPRESS JPBRANCH_U* TO JPBRANCH_L*:
-
-        if (numJPs <= cJU_BRANCHLMAXJPS)        // JPs fit in a BranchL.
-        {
-            Pjbl_t PjblRaw = (Pjbl_t) NULL;     // new BranchL; init for cc.
-            Pjbl_t Pjbl;
-
-            if ((*PPop1 > JU_BRANCHL_MAX_POP)   // pop too high.
-             || ((PjblRaw = j__udyAllocJBL(Pjpm)) == (Pjbl_t) NULL))
-            {                                   // cant alloc BranchL.
-                goto SetParent;                 // just keep BranchU.
-            }
-
-            Pjbl = P_JBL(PjblRaw);
-
-// Copy BranchU JPs to BranchL:
-
-            (Pjbl->jbl_NumJPs) = numJPs;
-            offset = 0;
-
-            for (digit = 0; digit < cJU_BRANCHUNUMJPS; ++digit)
-            {
-                if ((((Pjbu->jbu_jp) + digit)->jp_Type) == JPtype_null)
-                    continue;
-
-                (Pjbl->jbl_Expanse[offset  ]) = digit;
-                (Pjbl->jbl_jp     [offset++]) = Pjbu->jbu_jp[digit];
-            }
-            assert(offset == numJPs);           // found same number.
-
-// Free the BranchU and prepare to use the new BranchL instead:
-
-            j__udyFreeJBU(PjbuRaw, Pjpm);
-
-            Pjbany = (Word_t) PjblRaw;
-            JPtype = branchL_JPtype[levelsub];
-
-        } // compress to BranchL
-
-
-// COMPRESS JPBRANCH_U* TO JPBRANCH_B*:
-//
-// If unable to allocate the BranchB or any JP subarray, free all related
-// memory and just keep the BranchU.
-//
-// Note:  This use of JU_OPP_UNCOMPRESS is a bit conservative because the
-// BranchU is already allocated while the (presumably smaller) BranchB is not,
-// the opposite of how its used in single-insert code.
-
-        else
-        {
-            Pjbb_t PjbbRaw = (Pjbb_t) NULL;     // new BranchB; init for cc.
-            Pjbb_t Pjbb;
-            Pjp_t  Pjp2;                        // in BranchU.
-
-            if ((*PPop1 > JU_BRANCHB_MAX_POP)   // pop too high.
-             || ((PjbbRaw = j__udyAllocJBB(Pjpm)) == (Pjbb_t) NULL))
-            {                                   // cant alloc BranchB.
-                goto SetParent;                 // just keep BranchU.
-            }
-
-            Pjbb = P_JBB(PjbbRaw);
-
-// Set bits in bitmap for populated subexpanses:
-
-            Pjp2 = Pjbu->jbu_jp;
-
-            for (digit = 0; digit < cJU_BRANCHUNUMJPS; ++digit)
-                if ((((Pjbu->jbu_jp) + digit)->jp_Type) != JPtype_null)
-                    JU_BITMAPSETB(Pjbb, digit);
-
-// Copy non-null JPs to BranchB JP subarrays:
-
-            for (offset = 0; offset < cJU_NUMSUBEXPB; ++offset)
-            {
-                Pjp_t PjparrayRaw;
-                Pjp_t Pjparray;
-
-                if (! (numJPs = j__udyCountBitsB(JU_JBB_BITMAP(Pjbb, offset))))
-                    continue;                   // skip empty subexpanse.
-
-// If unable to allocate a JP subarray, free all BranchB memory so far and
-// continue to use the BranchU:
-
-                if ((PjparrayRaw = j__udyAllocJBBJP(numJPs, Pjpm))
-                    == (Pjp_t) NULL)
-                {
-                    while (offset-- > 0)
-                    {
-                        if (JU_JBB_PJP(Pjbb, offset) == (Pjp_t) NULL) continue;
-
-                        j__udyFreeJBBJP(JU_JBB_PJP(Pjbb, offset),
-                                 j__udyCountBitsB(JU_JBB_BITMAP(Pjbb, offset)),
-                                        Pjpm);
-                    }
-                    j__udyFreeJBB(PjbbRaw, Pjpm);
-                    goto SetParent;             // keep BranchU.
-                }
-
-// Set one JP subarray pointer and copy the subexpanses JPs to the subarray:
-//
-// Scan the BranchU for non-null JPs until numJPs JPs are copied.
-
-                JU_JBB_PJP(Pjbb, offset) = PjparrayRaw;
-                Pjparray = P_JP(PjparrayRaw);
-
-                while (numJPs-- > 0)
-                {
-                    while ((Pjp2->jp_Type) == JPtype_null)
-                    {
-                        ++Pjp2;
-                        assert(Pjp2 < (Pjbu->jbu_jp) + cJU_BRANCHUNUMJPS);
-                    }
-                    *Pjparray++ = *Pjp2++;
-                }
-            } // for each subexpanse
-
-// Free the BranchU and prepare to use the new BranchB instead:
-
-            j__udyFreeJBU(PjbuRaw, Pjpm);
-
-            Pjbany = (Word_t) PjbbRaw;
-            JPtype = branchB_JPtype[levelsub];
-
-        } // compress to BranchB
-
-
-// COMPLETE OR PARTIAL SUCCESS:
-//
-// Attach new branch (under Pjp, with JPtype) to parent JP; note use of *PPop1,
-// possibly reduced due to partial failure.
-
-SetParent:
-        (PjpParent->jp_Addr) = Pjbany;
-        (PjpParent->jp_Type) = JPtype;
-
-        if (Level < cJU_ROOTSTATE)              // PjpParent not in JPM:
-        {
-            Word_t DcdP0 = (*PIndex & cJU_DCDMASK(levelsub)) | (*PPop1 - 1);
-
-            JU_JPSETADT(PjpParent ,Pjbany, DcdP0, JPtype);
-        }
-
-        return(retval);
-
-} // j__udyInsArray()
diff --git a/libs/klib/judy/JudyInsertBranch.c b/libs/klib/judy/JudyInsertBranch.c
deleted file mode 100644
index 307285c..0000000
--- a/libs/klib/judy/JudyInsertBranch.c
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// BranchL insertion functions for Judy1 and JudyL.
-// Compile with one of -DJUDY1 or -DJUDYL.
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-extern int j__udyCreateBranchL(Pjp_t, Pjp_t, uint8_t *, Word_t, Pvoid_t);
-
-
-// ****************************************************************************
-// __ J U D Y   I N S E R T   B R A N C H
-//
-// Insert 2-element BranchL in between Pjp and Pjp->jp_Addr.
-//
-// Return -1 if out of memory, otherwise return 1.
-
-FUNCTION int j__udyInsertBranch(
-	Pjp_t	Pjp,		// JP containing narrow pointer.
-	Word_t	Index,		// outlier to Pjp.
-	Word_t	BranchLevel,	// of what JP points to, mapped from JP type.
-	Pjpm_t	Pjpm)		// for global accounting.
-{
-	jp_t	JP2 [2];
-	jp_t	JP;
-	Pjp_t	PjpNull;
-	Word_t	XorExp;
-	Word_t	Inew, Iold;
-	Word_t  DCDMask;	// initially for original BranchLevel.
-	int	Ret;
-	uint8_t	Exp2[2];
-	uint8_t	DecodeByteN, DecodeByteO;
-
-//	Get the current mask for the DCD digits:
-
-	DCDMask = cJU_DCDMASK(BranchLevel);
-
-//	Obtain Dcd bits that differ between Index and JP, shifted so the
-//	digit for BranchLevel is the LSB:
-
-	XorExp = ((Index ^ JU_JPDCDPOP0(Pjp)) & (cJU_ALLONES >> cJU_BITSPERBYTE))
-	       >> (BranchLevel * cJU_BITSPERBYTE);
-	assert(XorExp);		// Index must be an outlier.
-
-//	Count levels between object under narrow pointer and the level at which
-//	the outlier diverges from it, which is always at least initial
-//	BranchLevel + 1, to end up with the level (JP type) at which to insert
-//	the new intervening BranchL:
-
-	do { ++BranchLevel; } while ((XorExp >>= cJU_BITSPERBYTE));
-	assert((BranchLevel > 1) && (BranchLevel < cJU_ROOTSTATE));
-
-//	Get the MSB (highest digit) that differs between the old expanse and
-//	the new Index to insert:
-
-	DecodeByteO = JU_DIGITATSTATE(JU_JPDCDPOP0(Pjp), BranchLevel);
-	DecodeByteN = JU_DIGITATSTATE(Index,	         BranchLevel);
-
-	assert(DecodeByteO != DecodeByteN);
-
-//	Determine sorted order for old expanse and new Index digits:
-
-	if (DecodeByteN > DecodeByteO)	{ Iold = 0; Inew = 1; }
-	else				{ Iold = 1; Inew = 0; }
-
-//	Copy old JP into staging area for new Branch
-	JP2 [Iold] = *Pjp;
-	Exp2[Iold] = DecodeByteO;
-	Exp2[Inew] = DecodeByteN;
-
-//	Create a 2 Expanse Linear branch
-//
-//	Note: Pjp->jp_Addr is set by j__udyCreateBranchL()
-
-	Ret = j__udyCreateBranchL(Pjp, JP2, Exp2, 2, Pjpm);
-	if (Ret == -1) return(-1);
-
-//	Get Pjp to the NULL of where to do insert
-	PjpNull	= ((P_JBL(Pjp->jp_Addr))->jbl_jp) + Inew;
-
-//	Convert to a cJU_JPIMMED_*_01 at the correct level:
-//	Build JP and set type below to: cJU_JPIMMED_X_01
-        JU_JPSETADT(PjpNull, 0, Index, cJU_JPIMMED_1_01 - 2 + BranchLevel);
-
-//	Return pointer to Value area in cJU_JPIMMED_X_01
-	JUDYLCODE(Pjpm->jpm_PValue = (Pjv_t) PjpNull;)
-
-//	The old JP now points to a BranchL that is at higher level.  Therefore
-//	it contains excess DCD bits (in the least significant position) that
-//	must be removed (zeroed); that is, they become part of the Pop0
-//	subfield.  Note that the remaining (lower) bytes in the Pop0 field do
-//	not change.
-//
-//	Take from the old DCDMask, which went "down" to a lower BranchLevel,
-//	and zero any high bits that are still in the mask at the new, higher
-//	BranchLevel; then use this mask to zero the bits in jp_DcdPopO:
-
-//	Set old JP to a BranchL at correct level
-
-	Pjp->jp_Type = cJU_JPBRANCH_L2 - 2 + BranchLevel;
-	DCDMask		^= cJU_DCDMASK(BranchLevel);
-	DCDMask		 = ~DCDMask & JU_JPDCDPOP0(Pjp);
-        JP = *Pjp;
-        JU_JPSETADT(Pjp, JP.jp_Addr, DCDMask, JP.jp_Type);
-
-	return(1);
-
-} // j__udyInsertBranch()
diff --git a/libs/klib/judy/JudyL.h b/libs/klib/judy/JudyL.h
deleted file mode 100644
index 13c7d66..0000000
--- a/libs/klib/judy/JudyL.h
+++ /dev/null
@@ -1,503 +0,0 @@
-#ifndef _JUDYL_INCLUDED
-#define _JUDYL_INCLUDED
-// _________________
-//
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// ****************************************************************************
-//          JUDYL -- SMALL/LARGE AND/OR CLUSTERED/SPARSE ARRAYS
-//
-//                                    -by-
-//
-//                             Douglas L. Baskins
-//                             doug at sourcejudy.com
-//
-// Judy arrays are designed to be used instead of arrays.  The performance
-// suggests the reason why Judy arrays are thought of as arrays, instead of
-// trees.  They are remarkably memory efficient at all populations.
-// Implemented as a hybrid digital tree (but really a state machine, see
-// below), Judy arrays feature fast insert/retrievals, fast near neighbor
-// searching, and contain a population tree for extremely fast ordinal related
-// retrievals.
-//
-// CONVENTIONS:
-//
-// - The comments here refer to 32-bit [64-bit] systems.
-//
-// - BranchL, LeafL refer to linear branches and leaves (small populations),
-//   except LeafL does not actually appear as such; rather, Leaf1..3 [Leaf1..7]
-//   is used to represent leaf Index sizes, and LeafW refers to a Leaf with
-//   full (Long) word Indexes, which is also a type of linear leaf.  Note that
-//   root-level LeafW (Leaf4 [Leaf8]) leaves are called LEAFW.
-//
-// - BranchB, LeafB1 refer to bitmap branches and leaves (intermediate
-//   populations).
-//
-// - BranchU refers to uncompressed branches.  An uncompressed branch has 256
-//   JPs, some of which could be null.  Note:  All leaves are compressed (and
-//   sorted), or else an expanse is full (FullPopu), so there is no LeafU
-//   equivalent to BranchU.
-//
-// - "Popu" is short for "Population".
-// - "Pop1" refers to actual population (base 1).
-// - "Pop0" refers to Pop1 - 1 (base 0), the way populations are stored in data
-//   structures.
-//
-// - Branches and Leaves are both named by the number of bytes in their Pop0
-//   field.  In the case of Leaves, the same number applies to the Index sizes.
-//
-// - The representation of many numbers as hex is a relatively safe and
-//   portable way to get desired bitpatterns as unsigned longs.
-//
-// - Some preprocessors cant handle single apostrophe characters within
-//   #ifndef code, so here, delete all instead.
-
-
-#include "JudyPrivate.h"        // includes Judy.h in turn.
-#include "JudyPrivateBranch.h"  // support for branches.
-
-
-// ****************************************************************************
-// JUDYL ROOT POINTER (JRP) AND JUDYL POINTER (JP) TYPE FIELDS
-// ****************************************************************************
-
-typedef enum            // uint8_t -- but C does not support this type of enum.
-{
-
-// JP NULL TYPES:
-//
-// There is a series of cJL_JPNULL* Types because each one pre-records a
-// different Index Size for when the first Index is inserted in the previously
-// null JP.  They must start >= 8 (three bits).
-//
-// Note:  These Types must be in sequential order for doing relative
-// calculations between them.
-
-        cJL_JPNULL1 = 1,
-                                // Index Size 1[1] byte  when 1 Index inserted.
-        cJL_JPNULL2,            // Index Size 2[2] bytes when 1 Index inserted.
-        cJL_JPNULL3,            // Index Size 3[3] bytes when 1 Index inserted.
-
-#ifndef JU_64BIT
-#define cJL_JPNULLMAX cJL_JPNULL3
-#else
-        cJL_JPNULL4,            // Index Size 4[4] bytes when 1 Index inserted.
-        cJL_JPNULL5,            // Index Size 5[5] bytes when 1 Index inserted.
-        cJL_JPNULL6,            // Index Size 6[6] bytes when 1 Index inserted.
-        cJL_JPNULL7,            // Index Size 7[7] bytes when 1 Index inserted.
-#define cJL_JPNULLMAX cJL_JPNULL7
-#endif
-
-
-// JP BRANCH TYPES:
-//
-// Note:  There are no state-1 branches; only leaves reside at state 1.
-
-// Linear branches:
-//
-// Note:  These Types must be in sequential order for doing relative
-// calculations between them.
-
-        cJL_JPBRANCH_L2,        // 2[2] bytes Pop0, 1[5] bytes Dcd.
-        cJL_JPBRANCH_L3,        // 3[3] bytes Pop0, 0[4] bytes Dcd.
-
-#ifdef JU_64BIT
-        cJL_JPBRANCH_L4,        //  [4] bytes Pop0,  [3] bytes Dcd.
-        cJL_JPBRANCH_L5,        //  [5] bytes Pop0,  [2] bytes Dcd.
-        cJL_JPBRANCH_L6,        //  [6] bytes Pop0,  [1] byte  Dcd.
-        cJL_JPBRANCH_L7,        //  [7] bytes Pop0,  [0] bytes Dcd.
-#endif
-
-        cJL_JPBRANCH_L,         // note:  DcdPopO field not used.
-
-// Bitmap branches:
-//
-// Note:  These Types must be in sequential order for doing relative
-// calculations between them.
-
-        cJL_JPBRANCH_B2,        // 2[2] bytes Pop0, 1[5] bytes Dcd.
-        cJL_JPBRANCH_B3,        // 3[3] bytes Pop0, 0[4] bytes Dcd.
-
-#ifdef JU_64BIT
-        cJL_JPBRANCH_B4,        //  [4] bytes Pop0,  [3] bytes Dcd.
-        cJL_JPBRANCH_B5,        //  [5] bytes Pop0,  [2] bytes Dcd.
-        cJL_JPBRANCH_B6,        //  [6] bytes Pop0,  [1] byte  Dcd.
-        cJL_JPBRANCH_B7,        //  [7] bytes Pop0,  [0] bytes Dcd.
-#endif
-
-        cJL_JPBRANCH_B,         // note:  DcdPopO field not used.
-
-// Uncompressed branches:
-//
-// Note:  These Types must be in sequential order for doing relative
-// calculations between them.
-
-        cJL_JPBRANCH_U2,        // 2[2] bytes Pop0, 1[5] bytes Dcd.
-        cJL_JPBRANCH_U3,        // 3[3] bytes Pop0, 0[4] bytes Dcd.
-
-#ifdef JU_64BIT
-        cJL_JPBRANCH_U4,        //  [4] bytes Pop0,  [3] bytes Dcd.
-        cJL_JPBRANCH_U5,        //  [5] bytes Pop0,  [2] bytes Dcd.
-        cJL_JPBRANCH_U6,        //  [6] bytes Pop0,  [1] byte  Dcd.
-        cJL_JPBRANCH_U7,        //  [7] bytes Pop0,  [0] bytes Dcd.
-#endif
-
-        cJL_JPBRANCH_U,         // note:  DcdPopO field not used.
-
-
-// JP LEAF TYPES:
-
-// Linear leaves:
-//
-// Note:  These Types must be in sequential order for doing relative
-// calculations between them.
-//
-// Note:  There is no full-word (4-byte [8-byte]) Index leaf under a JP because
-// non-root-state leaves only occur under branches that decode at least one
-// byte.  Full-word, root-state leaves are under a JRP, not a JP.  However, in
-// the code a "fake" JP can be created temporarily above a root-state leaf.
-
-        cJL_JPLEAF1,            // 1[1] byte  Pop0, 2    bytes Dcd.
-        cJL_JPLEAF2,            // 2[2] bytes Pop0, 1[5] bytes Dcd.
-        cJL_JPLEAF3,            // 3[3] bytes Pop0, 0[4] bytes Dcd.
-
-#ifdef JU_64BIT
-        cJL_JPLEAF4,            //  [4] bytes Pop0,  [3] bytes Dcd.
-        cJL_JPLEAF5,            //  [5] bytes Pop0,  [2] bytes Dcd.
-        cJL_JPLEAF6,            //  [6] bytes Pop0,  [1] byte  Dcd.
-        cJL_JPLEAF7,            //  [7] bytes Pop0,  [0] bytes Dcd.
-#endif
-
-// Bitmap leaf; Index Size == 1:
-//
-// Note:  These are currently only supported at state 1.  At other states the
-// bitmap would grow from 256 to 256^2, 256^3, ... bits, which would not be
-// efficient..
-
-        cJL_JPLEAF_B1,          // 1[1] byte Pop0, 2[6] bytes Dcd.
-
-// Full population; Index Size == 1 virtual leaf:
-//
-// Note:  JudyL has no cJL_JPFULLPOPU1 equivalent to cJ1_JPFULLPOPU1, because
-// in the JudyL case this could result in a values-only leaf of up to 256 words
-// (value areas) that would be slow to insert/delete.
-
-
-// JP IMMEDIATES; leaves (Indexes) stored inside a JP:
-//
-// The second numeric suffix is the Pop1 for each type.  As the Index Size
-// increases, the maximum possible population decreases.
-//
-// Note:  These Types must be in sequential order in each group (Index Size),
-// and the groups in correct order too, for doing relative calculations between
-// them.  For example, since these Types enumerate the Pop1 values (unlike
-// other JP Types where there is a Pop0 value in the JP), the maximum Pop1 for
-// each Index Size is computable.
-//
-// All enums equal or above this point are cJL_JPIMMEDs.
-
-        cJL_JPIMMED_1_01,       // Index Size = 1, Pop1 = 1.
-        cJL_JPIMMED_2_01,       // Index Size = 2, Pop1 = 1.
-        cJL_JPIMMED_3_01,       // Index Size = 3, Pop1 = 1.
-
-#ifdef JU_64BIT
-        cJL_JPIMMED_4_01,       // Index Size = 4, Pop1 = 1.
-        cJL_JPIMMED_5_01,       // Index Size = 5, Pop1 = 1.
-        cJL_JPIMMED_6_01,       // Index Size = 6, Pop1 = 1.
-        cJL_JPIMMED_7_01,       // Index Size = 7, Pop1 = 1.
-#endif
-
-        cJL_JPIMMED_1_02,       // Index Size = 1, Pop1 = 2.
-        cJL_JPIMMED_1_03,       // Index Size = 1, Pop1 = 3.
-
-#ifdef JU_64BIT
-        cJL_JPIMMED_1_04,       // Index Size = 1, Pop1 = 4.
-        cJL_JPIMMED_1_05,       // Index Size = 1, Pop1 = 5.
-        cJL_JPIMMED_1_06,       // Index Size = 1, Pop1 = 6.
-        cJL_JPIMMED_1_07,       // Index Size = 1, Pop1 = 7.
-
-        cJL_JPIMMED_2_02,       // Index Size = 2, Pop1 = 2.
-        cJL_JPIMMED_2_03,       // Index Size = 2, Pop1 = 3.
-
-        cJL_JPIMMED_3_02,       // Index Size = 3, Pop1 = 2.
-#endif
-
-// This special Type is merely a sentinel for doing relative calculations.
-// This value should not be used in switch statements (to avoid allocating code
-// for it), which is also why it appears at the end of the enum list.
-
-        cJL_JPIMMED_CAP
-
-} jpL_Type_t;
-
-
-// RELATED VALUES:
-
-// Index Size (state) for leaf JP, and JP type based on Index Size (state):
-
-#define JL_LEAFINDEXSIZE(jpType) ((jpType)    - cJL_JPLEAF1 + 1)
-#define JL_LEAFTYPE(IndexSize)   ((IndexSize) + cJL_JPLEAF1 - 1)
-
-
-// MAXIMUM POPULATIONS OF LINEAR LEAVES:
-
-#ifndef JU_64BIT // 32-bit
-
-#define J_L_MAXB                (sizeof(Word_t) * 64)
-#define ALLOCSIZES { 3, 5, 7, 11, 15, 23, 32, 47, 64, TERMINATOR } // in words.
-#define cJL_LEAF1_MAXWORDS               (32)   // max Leaf1 size in words.
-
-// Note:  cJL_LEAF1_MAXPOP1 is chosen such that the index portion is less than
-// 32 bytes -- the number of bytes the index takes in a bitmap leaf.
-
-#define cJL_LEAF1_MAXPOP1 \
-   ((cJL_LEAF1_MAXWORDS * cJU_BYTESPERWORD)/(1 + cJU_BYTESPERWORD))
-#define cJL_LEAF2_MAXPOP1       (J_L_MAXB / (2 + cJU_BYTESPERWORD))
-#define cJL_LEAF3_MAXPOP1       (J_L_MAXB / (3 + cJU_BYTESPERWORD))
-#define cJL_LEAFW_MAXPOP1 \
-           ((J_L_MAXB - cJU_BYTESPERWORD) / (2 * cJU_BYTESPERWORD))
-
-#else // 64-bit
-
-#define J_L_MAXB                (sizeof(Word_t) * 64)
-#define ALLOCSIZES { 3, 5, 7, 11, 15, 23, 32, 47, 64, TERMINATOR } // in words.
-#define cJL_LEAF1_MAXWORDS       (15)   // max Leaf1 size in words.
-
-#define cJL_LEAF1_MAXPOP1 \
-   ((cJL_LEAF1_MAXWORDS * cJU_BYTESPERWORD)/(1 + cJU_BYTESPERWORD))
-#define cJL_LEAF2_MAXPOP1       (J_L_MAXB / (2 + cJU_BYTESPERWORD))
-#define cJL_LEAF3_MAXPOP1       (J_L_MAXB / (3 + cJU_BYTESPERWORD))
-#define cJL_LEAF4_MAXPOP1       (J_L_MAXB / (4 + cJU_BYTESPERWORD))
-#define cJL_LEAF5_MAXPOP1       (J_L_MAXB / (5 + cJU_BYTESPERWORD))
-#define cJL_LEAF6_MAXPOP1       (J_L_MAXB / (6 + cJU_BYTESPERWORD))
-#define cJL_LEAF7_MAXPOP1       (J_L_MAXB / (7 + cJU_BYTESPERWORD))
-#define cJL_LEAFW_MAXPOP1 \
-           ((J_L_MAXB - cJU_BYTESPERWORD) / (2 * cJU_BYTESPERWORD))
-
-#endif // 64-bit
-
-
-// MAXIMUM POPULATIONS OF IMMEDIATE JPs:
-//
-// These specify the maximum Population of immediate JPs with various Index
-// Sizes (== sizes of remaining undecoded Index bits).  Since the JP Types enum
-// already lists all the immediates in order by state and size, calculate these
-// values from it to avoid redundancy.
-
-#define cJL_IMMED1_MAXPOP1  ((cJU_BYTESPERWORD - 1) / 1)        // 3 [7].
-#define cJL_IMMED2_MAXPOP1  ((cJU_BYTESPERWORD - 1) / 2)        // 1 [3].
-#define cJL_IMMED3_MAXPOP1  ((cJU_BYTESPERWORD - 1) / 3)        // 1 [2].
-
-#ifdef JU_64BIT
-#define cJL_IMMED4_MAXPOP1  ((cJU_BYTESPERWORD - 1) / 4)        //   [1].
-#define cJL_IMMED5_MAXPOP1  ((cJU_BYTESPERWORD - 1) / 5)        //   [1].
-#define cJL_IMMED6_MAXPOP1  ((cJU_BYTESPERWORD - 1) / 6)        //   [1].
-#define cJL_IMMED7_MAXPOP1  ((cJU_BYTESPERWORD - 1) / 7)        //   [1].
-#endif
-
-
-// ****************************************************************************
-// JUDYL LEAF BITMAP (JLLB) SUPPORT
-// ****************************************************************************
-//
-// Assemble bitmap leaves out of smaller units that put bitmap subexpanses
-// close to their associated pointers.  Why not just use a bitmap followed by a
-// series of pointers?  (See 4.27.)  Turns out this wastes a cache fill on
-// systems with smaller cache lines than the assumed value cJU_WORDSPERCL.
-
-#define JL_JLB_BITMAP(Pjlb, Subexp)  ((Pjlb)->jLlb_jLlbs[Subexp].jLlbs_Bitmap)
-#define JL_JLB_PVALUE(Pjlb, Subexp)  ((Pjlb)->jLlb_jLlbs[Subexp].jLlbs_PValue)
-
-typedef struct J__UDYL_LEAF_BITMAP_SUBEXPANSE
-{
-        BITMAPL_t jLlbs_Bitmap;
-        Pjv_t     jLlbs_PValue;
-
-} jLlbs_t;
-
-typedef struct J__UDYL_LEAF_BITMAP
-{
-        jLlbs_t jLlb_jLlbs[cJU_NUMSUBEXPL];
-
-} jLlb_t, * PjLlb_t;
-
-// Words per bitmap leaf:
-
-#define cJL_WORDSPERLEAFB1  (sizeof(jLlb_t) / cJU_BYTESPERWORD)
-
-
-// ****************************************************************************
-// MEMORY ALLOCATION SUPPORT
-// ****************************************************************************
-
-// ARRAY-GLOBAL INFORMATION:
-//
-// At the cost of an occasional additional cache fill, this object, which is
-// pointed at by a JRP and in turn points to a JP_BRANCH*, carries array-global
-// information about a JudyL array that has sufficient population to amortize
-// the cost.  The jpm_Pop0 field prevents having to add up the total population
-// for the array in insert, delete, and count code.  The jpm_JP field prevents
-// having to build a fake JP for entry to a state machine; however, the
-// jp_DcdPopO field in jpm_JP, being one byte too small, is not used.
-//
-// Note:  Struct fields are ordered to keep "hot" data in the first 8 words
-// (see left-margin comments) for machines with 8-word cache lines, and to keep
-// sub-word fields together for efficient packing.
-
-typedef struct J_UDYL_POPULATION_AND_MEMORY
-{
-/* 1 */ Word_t     jpm_Pop0;            // total population-1 in array.
-/* 2 */ jp_t       jpm_JP;              // JP to first branch; see above.
-/* 4 */ Word_t     jpm_LastUPop0;       // last jpm_Pop0 when convert to BranchU
-/* 7 */ Pjv_t      jpm_PValue;          // pointer to value to return.
-// Note:  Field names match PJError_t for convenience in macros:
-/* 8 */ char       je_Errno;            // one of the enums in Judy.h.
-/* 8/9  */ int     je_ErrID;            // often an internal source line number.
-/* 9/10 */ Word_t  jpm_TotalMemWords;   // words allocated in array.
-} jLpm_t, *PjLpm_t;
-
-
-// TABLES FOR DETERMINING IF LEAVES HAVE ROOM TO GROW:
-//
-// These tables indicate if a given memory chunk can support growth of a given
-// object into wasted (rounded-up) memory in the chunk.  Note:  This violates
-// the hiddenness of the JudyMalloc code.
-
-extern const uint8_t j__L_Leaf1PopToWords[cJL_LEAF1_MAXPOP1 + 1];
-extern const uint8_t j__L_Leaf2PopToWords[cJL_LEAF2_MAXPOP1 + 1];
-extern const uint8_t j__L_Leaf3PopToWords[cJL_LEAF3_MAXPOP1 + 1];
-#ifdef JU_64BIT
-extern const uint8_t j__L_Leaf4PopToWords[cJL_LEAF4_MAXPOP1 + 1];
-extern const uint8_t j__L_Leaf5PopToWords[cJL_LEAF5_MAXPOP1 + 1];
-extern const uint8_t j__L_Leaf6PopToWords[cJL_LEAF6_MAXPOP1 + 1];
-extern const uint8_t j__L_Leaf7PopToWords[cJL_LEAF7_MAXPOP1 + 1];
-#endif
-extern const uint8_t j__L_LeafWPopToWords[cJL_LEAFW_MAXPOP1 + 1];
-extern const uint8_t j__L_LeafVPopToWords[];
-
-// These tables indicate where value areas start:
-
-extern const uint8_t j__L_Leaf1Offset    [cJL_LEAF1_MAXPOP1 + 1];
-extern const uint8_t j__L_Leaf2Offset    [cJL_LEAF2_MAXPOP1 + 1];
-extern const uint8_t j__L_Leaf3Offset    [cJL_LEAF3_MAXPOP1 + 1];
-#ifdef JU_64BIT
-extern const uint8_t j__L_Leaf4Offset    [cJL_LEAF4_MAXPOP1 + 1];
-extern const uint8_t j__L_Leaf5Offset    [cJL_LEAF5_MAXPOP1 + 1];
-extern const uint8_t j__L_Leaf6Offset    [cJL_LEAF6_MAXPOP1 + 1];
-extern const uint8_t j__L_Leaf7Offset    [cJL_LEAF7_MAXPOP1 + 1];
-#endif
-extern const uint8_t j__L_LeafWOffset    [cJL_LEAFW_MAXPOP1 + 1];
-
-// Also define macros to hide the details in the code using these tables.
-
-#define JL_LEAF1GROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJL_LEAF1_MAXPOP1, j__L_Leaf1PopToWords)
-#define JL_LEAF2GROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJL_LEAF2_MAXPOP1, j__L_Leaf2PopToWords)
-#define JL_LEAF3GROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJL_LEAF3_MAXPOP1, j__L_Leaf3PopToWords)
-#ifdef JU_64BIT
-#define JL_LEAF4GROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJL_LEAF4_MAXPOP1, j__L_Leaf4PopToWords)
-#define JL_LEAF5GROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJL_LEAF5_MAXPOP1, j__L_Leaf5PopToWords)
-#define JL_LEAF6GROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJL_LEAF6_MAXPOP1, j__L_Leaf6PopToWords)
-#define JL_LEAF7GROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJL_LEAF7_MAXPOP1, j__L_Leaf7PopToWords)
-#endif
-#define JL_LEAFWGROWINPLACE(Pop1) \
-        J__U_GROWCK(Pop1, cJL_LEAFW_MAXPOP1, j__L_LeafWPopToWords)
-#define JL_LEAFVGROWINPLACE(Pop1)  \
-        J__U_GROWCK(Pop1, cJU_BITSPERSUBEXPL,  j__L_LeafVPopToWords)
-
-#define JL_LEAF1VALUEAREA(Pjv,Pop1)  (((PWord_t)(Pjv)) + j__L_Leaf1Offset[Pop1])
-#define JL_LEAF2VALUEAREA(Pjv,Pop1)  (((PWord_t)(Pjv)) + j__L_Leaf2Offset[Pop1])
-#define JL_LEAF3VALUEAREA(Pjv,Pop1)  (((PWord_t)(Pjv)) + j__L_Leaf3Offset[Pop1])
-#ifdef JU_64BIT
-#define JL_LEAF4VALUEAREA(Pjv,Pop1)  (((PWord_t)(Pjv)) + j__L_Leaf4Offset[Pop1])
-#define JL_LEAF5VALUEAREA(Pjv,Pop1)  (((PWord_t)(Pjv)) + j__L_Leaf5Offset[Pop1])
-#define JL_LEAF6VALUEAREA(Pjv,Pop1)  (((PWord_t)(Pjv)) + j__L_Leaf6Offset[Pop1])
-#define JL_LEAF7VALUEAREA(Pjv,Pop1)  (((PWord_t)(Pjv)) + j__L_Leaf7Offset[Pop1])
-#endif
-#define JL_LEAFWVALUEAREA(Pjv,Pop1)  (((PWord_t)(Pjv)) + j__L_LeafWOffset[Pop1])
-
-#define JL_LEAF1POPTOWORDS(Pop1)        (j__L_Leaf1PopToWords[Pop1])
-#define JL_LEAF2POPTOWORDS(Pop1)        (j__L_Leaf2PopToWords[Pop1])
-#define JL_LEAF3POPTOWORDS(Pop1)        (j__L_Leaf3PopToWords[Pop1])
-#ifdef JU_64BIT
-#define JL_LEAF4POPTOWORDS(Pop1)        (j__L_Leaf4PopToWords[Pop1])
-#define JL_LEAF5POPTOWORDS(Pop1)        (j__L_Leaf5PopToWords[Pop1])
-#define JL_LEAF6POPTOWORDS(Pop1)        (j__L_Leaf6PopToWords[Pop1])
-#define JL_LEAF7POPTOWORDS(Pop1)        (j__L_Leaf7PopToWords[Pop1])
-#endif
-#define JL_LEAFWPOPTOWORDS(Pop1)        (j__L_LeafWPopToWords[Pop1])
-#define JL_LEAFVPOPTOWORDS(Pop1)        (j__L_LeafVPopToWords[Pop1])
-
-
-// FUNCTIONS TO ALLOCATE OBJECTS:
-
-PjLpm_t j__udyLAllocJLPM(void);                         // constant size.
-
-Pjbl_t  j__udyLAllocJBL(          PjLpm_t);             // constant size.
-Pjbb_t  j__udyLAllocJBB(          PjLpm_t);             // constant size.
-Pjp_t   j__udyLAllocJBBJP(Word_t, PjLpm_t);
-Pjbu_t  j__udyLAllocJBU(          PjLpm_t);             // constant size.
-
-Pjll_t  j__udyLAllocJLL1( Word_t, PjLpm_t);
-Pjll_t  j__udyLAllocJLL2( Word_t, PjLpm_t);
-Pjll_t  j__udyLAllocJLL3( Word_t, PjLpm_t);
-
-#ifdef JU_64BIT
-Pjll_t  j__udyLAllocJLL4( Word_t, PjLpm_t);
-Pjll_t  j__udyLAllocJLL5( Word_t, PjLpm_t);
-Pjll_t  j__udyLAllocJLL6( Word_t, PjLpm_t);
-Pjll_t  j__udyLAllocJLL7( Word_t, PjLpm_t);
-#endif
-
-Pjlw_t  j__udyLAllocJLW(  Word_t         );             // no PjLpm_t needed.
-PjLlb_t j__udyLAllocJLB1(         PjLpm_t);             // constant size.
-Pjv_t   j__udyLAllocJV(   Word_t, PjLpm_t);
-
-
-// FUNCTIONS TO FREE OBJECTS:
-
-void    j__udyLFreeJLPM( PjLpm_t,        PjLpm_t);      // constant size.
-
-void    j__udyLFreeJBL(  Pjbl_t,         PjLpm_t);      // constant size.
-void    j__udyLFreeJBB(  Pjbb_t,         PjLpm_t);      // constant size.
-void    j__udyLFreeJBBJP(Pjp_t,  Word_t, PjLpm_t);
-void    j__udyLFreeJBU(  Pjbu_t,         PjLpm_t);      // constant size.
-
-void    j__udyLFreeJLL1( Pjll_t, Word_t, PjLpm_t);
-void    j__udyLFreeJLL2( Pjll_t, Word_t, PjLpm_t);
-void    j__udyLFreeJLL3( Pjll_t, Word_t, PjLpm_t);
-
-#ifdef JU_64BIT
-void    j__udyLFreeJLL4( Pjll_t, Word_t, PjLpm_t);
-void    j__udyLFreeJLL5( Pjll_t, Word_t, PjLpm_t);
-void    j__udyLFreeJLL6( Pjll_t, Word_t, PjLpm_t);
-void    j__udyLFreeJLL7( Pjll_t, Word_t, PjLpm_t);
-#endif
-
-void    j__udyLFreeJLW(  Pjlw_t, Word_t, PjLpm_t);
-void    j__udyLFreeJLB1( PjLlb_t,        PjLpm_t);      // constant size.
-void    j__udyLFreeJV(   Pjv_t,  Word_t, PjLpm_t);
-void    j__udyLFreeSM(   Pjp_t,          PjLpm_t);      // everything below Pjp.
-
-#endif // ! _JUDYL_INCLUDED
diff --git a/libs/klib/judy/JudyLTables.32.c b/libs/klib/judy/JudyLTables.32.c
deleted file mode 100644
index c5f8793..0000000
--- a/libs/klib/judy/JudyLTables.32.c
+++ /dev/null
@@ -1,121 +0,0 @@
-// @(#) From generation tool: JudyTablesGen.c
-//
-
-#include "JudyL.h"
-// Leave the malloc() sizes readable in the binary (via strings(1)):
-const char * JudyLMallocSizes = "JudyLMallocSizes = 3, 5, 7, 11, 15, 23, 32, 47, 64, Leaf1 = 25";
-
-
-//	object uses 64 words
-//	cJU_BITSPERSUBEXPB = 32
-const uint8_t
-j__L_BranchBJPPopToWords[cJU_BITSPERSUBEXPB + 1] =
-{
-	 0,
-	 3,  5,  7, 11, 11, 15, 15, 23, 
-	23, 23, 23, 32, 32, 32, 32, 32, 
-	47, 47, 47, 47, 47, 47, 47, 64, 
-	64, 64, 64, 64, 64, 64, 64, 64
-};
-
-//	object uses 32 words
-//	cJL_LEAF1_MAXPOP1 = 25
-const uint8_t
-j__L_Leaf1PopToWords[cJL_LEAF1_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  5,  5,  7, 11, 11, 11, 
-	15, 15, 15, 15, 23, 23, 23, 23, 
-	23, 23, 32, 32, 32, 32, 32, 32, 
-	32
-};
-const uint8_t
-j__L_Leaf1Offset[cJL_LEAF1_MAXPOP1 + 1] =
-{
-	 0,
-	 1,  1,  1,  1,  2,  3,  3,  3, 
-	 3,  3,  3,  3,  5,  5,  5,  5, 
-	 5,  5,  7,  7,  7,  7,  7,  7, 
-	 7
-};
-
-//	object uses 63 words
-//	cJL_LEAF2_MAXPOP1 = 42
-const uint8_t
-j__L_Leaf2PopToWords[cJL_LEAF2_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  5,  7, 11, 11, 11, 15, 
-	15, 15, 23, 23, 23, 23, 23, 32, 
-	32, 32, 32, 32, 32, 47, 47, 47, 
-	47, 47, 47, 47, 47, 47, 47, 63, 
-	63, 63, 63, 63, 63, 63, 63, 63, 
-	63, 63
-};
-const uint8_t
-j__L_Leaf2Offset[cJL_LEAF2_MAXPOP1 + 1] =
-{
-	 0,
-	 1,  1,  2,  2,  4,  4,  4,  5, 
-	 5,  5,  8,  8,  8,  8,  8, 11, 
-	11, 11, 11, 11, 11, 16, 16, 16, 
-	16, 16, 16, 16, 16, 16, 16, 21, 
-	21, 21, 21, 21, 21, 21, 21, 21, 
-	21, 21
-};
-
-//	object uses 63 words
-//	cJL_LEAF3_MAXPOP1 = 36
-const uint8_t
-j__L_Leaf3PopToWords[cJL_LEAF3_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  5,  7,  7, 11, 11, 15, 15, 
-	23, 23, 23, 23, 23, 32, 32, 32, 
-	32, 32, 47, 47, 47, 47, 47, 47, 
-	47, 47, 63, 63, 63, 63, 63, 63, 
-	63, 63, 63, 63
-};
-const uint8_t
-j__L_Leaf3Offset[cJL_LEAF3_MAXPOP1 + 1] =
-{
-	 0,
-	 1,  3,  3,  3,  5,  5,  6,  6, 
-	10, 10, 10, 10, 10, 14, 14, 14, 
-	14, 14, 20, 20, 20, 20, 20, 20, 
-	20, 20, 27, 27, 27, 27, 27, 27, 
-	27, 27, 27, 27
-};
-
-//	object uses 63 words
-//	cJL_LEAFW_MAXPOP1 = 31
-const uint8_t
-j__L_LeafWPopToWords[cJL_LEAFW_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  5,  7, 11, 11, 15, 15, 23, 
-	23, 23, 23, 32, 32, 32, 32, 47, 
-	47, 47, 47, 47, 47, 47, 47, 63, 
-	63, 63, 63, 63, 63, 63, 63
-};
-const uint8_t
-j__L_LeafWOffset[cJL_LEAFW_MAXPOP1 + 1] =
-{
-	 0,
-	 2,  3,  4,  6,  6,  8,  8, 12, 
-	12, 12, 12, 16, 16, 16, 16, 24, 
-	24, 24, 24, 24, 24, 24, 24, 32, 
-	32, 32, 32, 32, 32, 32, 32
-};
-
-//	object uses 32 words
-//	cJU_BITSPERSUBEXPL = 32
-const uint8_t
-j__L_LeafVPopToWords[cJU_BITSPERSUBEXPL + 1] =
-{
-	 0,
-	 3,  3,  3,  5,  5,  7,  7, 11, 
-	11, 11, 11, 15, 15, 15, 15, 23, 
-	23, 23, 23, 23, 23, 23, 23, 32, 
-	32, 32, 32, 32, 32, 32, 32, 32
-};
diff --git a/libs/klib/judy/JudyLTables.64.c b/libs/klib/judy/JudyLTables.64.c
deleted file mode 100644
index 8b818e1..0000000
--- a/libs/klib/judy/JudyLTables.64.c
+++ /dev/null
@@ -1,219 +0,0 @@
-// @(#) From generation tool: JudyTablesGen.c
-//
-
-#include "JudyL.h"
-// Leave the malloc() sizes readable in the binary (via strings(1)):
-const char * JudyLMallocSizes = "JudyLMallocSizes = 3, 5, 7, 11, 15, 23, 32, 47, 64, Leaf1 = 13";
-
-
-//	object uses 64 words
-//	cJU_BITSPERSUBEXPB = 32
-const uint8_t
-j__L_BranchBJPPopToWords[cJU_BITSPERSUBEXPB + 1] =
-{
-	 0,
-	 3,  5,  7, 11, 11, 15, 15, 23, 
-	23, 23, 23, 32, 32, 32, 32, 32, 
-	47, 47, 47, 47, 47, 47, 47, 64, 
-	64, 64, 64, 64, 64, 64, 64, 64
-};
-
-//	object uses 15 words
-//	cJL_LEAF1_MAXPOP1 = 13
-const uint8_t
-j__L_Leaf1PopToWords[cJL_LEAF1_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  5,  5,  7,  7, 11, 11, 
-	11, 15, 15, 15, 15
-};
-const uint8_t
-j__L_Leaf1Offset[cJL_LEAF1_MAXPOP1 + 1] =
-{
-	 0,
-	 1,  1,  1,  1,  1,  1,  2,  2, 
-	 2,  2,  2,  2,  2
-};
-
-//	object uses 64 words
-//	cJL_LEAF2_MAXPOP1 = 51
-const uint8_t
-j__L_Leaf2PopToWords[cJL_LEAF2_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  5,  5,  7, 11, 11, 11, 
-	15, 15, 15, 15, 23, 23, 23, 23, 
-	23, 23, 32, 32, 32, 32, 32, 32, 
-	32, 47, 47, 47, 47, 47, 47, 47, 
-	47, 47, 47, 47, 47, 64, 64, 64, 
-	64, 64, 64, 64, 64, 64, 64, 64, 
-	64, 64, 64
-};
-const uint8_t
-j__L_Leaf2Offset[cJL_LEAF2_MAXPOP1 + 1] =
-{
-	 0,
-	 1,  1,  1,  1,  2,  3,  3,  3, 
-	 3,  3,  3,  3,  5,  5,  5,  5, 
-	 5,  5,  7,  7,  7,  7,  7,  7, 
-	 7, 10, 10, 10, 10, 10, 10, 10, 
-	10, 10, 10, 10, 10, 13, 13, 13, 
-	13, 13, 13, 13, 13, 13, 13, 13, 
-	13, 13, 13
-};
-
-//	object uses 64 words
-//	cJL_LEAF3_MAXPOP1 = 46
-const uint8_t
-j__L_Leaf3PopToWords[cJL_LEAF3_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  5,  7,  7, 11, 11, 11, 
-	15, 15, 23, 23, 23, 23, 23, 23, 
-	32, 32, 32, 32, 32, 32, 32, 47, 
-	47, 47, 47, 47, 47, 47, 47, 47, 
-	47, 47, 64, 64, 64, 64, 64, 64, 
-	64, 64, 64, 64, 64, 64
-};
-const uint8_t
-j__L_Leaf3Offset[cJL_LEAF3_MAXPOP1 + 1] =
-{
-	 0,
-	 1,  1,  2,  2,  2,  3,  3,  3, 
-	 4,  4,  6,  6,  6,  6,  6,  6, 
-	 9,  9,  9,  9,  9,  9,  9, 13, 
-	13, 13, 13, 13, 13, 13, 13, 13, 
-	13, 13, 18, 18, 18, 18, 18, 18, 
-	18, 18, 18, 18, 18, 18
-};
-
-//	object uses 63 words
-//	cJL_LEAF4_MAXPOP1 = 42
-const uint8_t
-j__L_Leaf4PopToWords[cJL_LEAF4_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  3,  5,  7, 11, 11, 11, 15, 
-	15, 15, 23, 23, 23, 23, 23, 32, 
-	32, 32, 32, 32, 32, 47, 47, 47, 
-	47, 47, 47, 47, 47, 47, 47, 63, 
-	63, 63, 63, 63, 63, 63, 63, 63, 
-	63, 63
-};
-const uint8_t
-j__L_Leaf4Offset[cJL_LEAF4_MAXPOP1 + 1] =
-{
-	 0,
-	 1,  1,  2,  2,  4,  4,  4,  5, 
-	 5,  5,  8,  8,  8,  8,  8, 11, 
-	11, 11, 11, 11, 11, 16, 16, 16, 
-	16, 16, 16, 16, 16, 16, 16, 21, 
-	21, 21, 21, 21, 21, 21, 21, 21, 
-	21, 21
-};
-
-//	object uses 64 words
-//	cJL_LEAF5_MAXPOP1 = 39
-const uint8_t
-j__L_Leaf5PopToWords[cJL_LEAF5_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  5,  5,  7, 11, 11, 15, 15, 
-	15, 23, 23, 23, 23, 23, 32, 32, 
-	32, 32, 32, 47, 47, 47, 47, 47, 
-	47, 47, 47, 47, 64, 64, 64, 64, 
-	64, 64, 64, 64, 64, 64, 64
-};
-const uint8_t
-j__L_Leaf5Offset[cJL_LEAF5_MAXPOP1 + 1] =
-{
-	 0,
-	 2,  2,  2,  3,  4,  4,  6,  6, 
-	 6,  9,  9,  9,  9,  9, 12, 12, 
-	12, 12, 12, 18, 18, 18, 18, 18, 
-	18, 18, 18, 18, 25, 25, 25, 25, 
-	25, 25, 25, 25, 25, 25, 25
-};
-
-//	object uses 63 words
-//	cJL_LEAF6_MAXPOP1 = 36
-const uint8_t
-j__L_Leaf6PopToWords[cJL_LEAF6_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  5,  7,  7, 11, 11, 15, 15, 
-	23, 23, 23, 23, 23, 32, 32, 32, 
-	32, 32, 47, 47, 47, 47, 47, 47, 
-	47, 47, 63, 63, 63, 63, 63, 63, 
-	63, 63, 63, 63
-};
-const uint8_t
-j__L_Leaf6Offset[cJL_LEAF6_MAXPOP1 + 1] =
-{
-	 0,
-	 1,  3,  3,  3,  5,  5,  6,  6, 
-	10, 10, 10, 10, 10, 14, 14, 14, 
-	14, 14, 20, 20, 20, 20, 20, 20, 
-	20, 20, 27, 27, 27, 27, 27, 27, 
-	27, 27, 27, 27
-};
-
-//	object uses 64 words
-//	cJL_LEAF7_MAXPOP1 = 34
-const uint8_t
-j__L_Leaf7PopToWords[cJL_LEAF7_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  5,  7, 11, 11, 15, 15, 15, 
-	23, 23, 23, 23, 32, 32, 32, 32, 
-	32, 47, 47, 47, 47, 47, 47, 47, 
-	47, 64, 64, 64, 64, 64, 64, 64, 
-	64, 64
-};
-const uint8_t
-j__L_Leaf7Offset[cJL_LEAF7_MAXPOP1 + 1] =
-{
-	 0,
-	 1,  3,  3,  5,  5,  7,  7,  7, 
-	11, 11, 11, 11, 15, 15, 15, 15, 
-	15, 22, 22, 22, 22, 22, 22, 22, 
-	22, 30, 30, 30, 30, 30, 30, 30, 
-	30, 30
-};
-
-//	object uses 63 words
-//	cJL_LEAFW_MAXPOP1 = 31
-const uint8_t
-j__L_LeafWPopToWords[cJL_LEAFW_MAXPOP1 + 1] =
-{
-	 0,
-	 3,  5,  7, 11, 11, 15, 15, 23, 
-	23, 23, 23, 32, 32, 32, 32, 47, 
-	47, 47, 47, 47, 47, 47, 47, 63, 
-	63, 63, 63, 63, 63, 63, 63
-};
-const uint8_t
-j__L_LeafWOffset[cJL_LEAFW_MAXPOP1 + 1] =
-{
-	 0,
-	 2,  3,  4,  6,  6,  8,  8, 12, 
-	12, 12, 12, 16, 16, 16, 16, 24, 
-	24, 24, 24, 24, 24, 24, 24, 32, 
-	32, 32, 32, 32, 32, 32, 32
-};
-
-//	object uses 64 words
-//	cJU_BITSPERSUBEXPL = 64
-const uint8_t
-j__L_LeafVPopToWords[cJU_BITSPERSUBEXPL + 1] =
-{
-	 0,
-	 3,  3,  3,  5,  5,  7,  7, 11, 
-	11, 11, 11, 15, 15, 15, 15, 23, 
-	23, 23, 23, 23, 23, 23, 23, 32, 
-	32, 32, 32, 32, 32, 32, 32, 32, 
-	47, 47, 47, 47, 47, 47, 47, 47, 
-	47, 47, 47, 47, 47, 47, 47, 64, 
-	64, 64, 64, 64, 64, 64, 64, 64, 
-	64, 64, 64, 64, 64, 64, 64, 64
-};
diff --git a/libs/klib/judy/JudyMalloc.c b/libs/klib/judy/JudyMalloc.c
deleted file mode 100644
index 165521f..0000000
--- a/libs/klib/judy/JudyMalloc.c
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// ************************************************************************ //
-//                    JUDY - Memory Allocater                             //
-//                              -by-					  //
-//		         Douglas L. Baskins				  //
-//			  Hewlett Packard				  //
-//                        Fort Collins, Co				  //
-//                         (970) 229-2027				  //
-//									  //
-// ************************************************************************ //
-
-// JUDY INCLUDE FILES
-#include "Judy.h"
-
-// ****************************************************************************
-// J U D Y   M A L L O C
-//
-// Allocate RAM.  This is the single location in Judy code that calls
-// malloc(3C).  Note:  JPM accounting occurs at a higher level.
-
-Word_t JudyMalloc(
-	Word_t Words)
-{
-	Word_t Addr;
-
-	Addr = (Word_t) malloc(Words * sizeof(Word_t));
-	return(Addr);
-
-} // JudyMalloc()
-
-
-// ****************************************************************************
-// J U D Y   F R E E
-
-void JudyFree(
-	void * PWord,
-	Word_t Words)
-{
-	(void) Words;
-	free(PWord);
-
-} // JudyFree()
-
-
-// ****************************************************************************
-// J U D Y   M A L L O C
-//
-// Higher-level "wrapper" for allocating objects that need not be in RAM,
-// although at this time they are in fact only in RAM.  Later we hope that some
-// entire subtrees (at a JPM or branch) can be "virtual", so their allocations
-// and frees should go through this level.
-
-Word_t JudyMallocVirtual(
-	Word_t Words)
-{
-	return(JudyMalloc(Words));
-
-} // JudyMallocVirtual()
-
-
-// ****************************************************************************
-// J U D Y   F R E E
-
-void JudyFreeVirtual(
-	void * PWord,
-	Word_t Words)
-{
-        JudyFree(PWord, Words);
-
-} // JudyFreeVirtual()
diff --git a/libs/klib/judy/JudyMallocIF.c b/libs/klib/judy/JudyMallocIF.c
deleted file mode 100644
index fa91d80..0000000
--- a/libs/klib/judy/JudyMallocIF.c
+++ /dev/null
@@ -1,780 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// Judy malloc/free interface functions for Judy1 and JudyL.
-//
-// Compile with one of -DJUDY1 or -DJUDYL.
-//
-// Compile with -DTRACEMI (Malloc Interface) to turn on tracing of malloc/free
-// calls at the interface level.  (See also TRACEMF in lower-level code.)
-// Use -DTRACEMI2 for a terser format suitable for trace analysis.
-//
-// There can be malloc namespace bits in the LSBs of "raw" addresses from most,
-// but not all, of the j__udy*Alloc*() functions; see also JudyPrivate.h.  To
-// test the Judy code, compile this file with -DMALLOCBITS and use debug flavor
-// only (for assertions).  This test ensures that (a) all callers properly mask
-// the namespace bits out before dereferencing a pointer (or else a core dump
-// occurs), and (b) all callers send "raw" (unmasked) addresses to
-// j__udy*Free*() calls.
-//
-// Note:  Currently -DDEBUG turns on MALLOCBITS automatically.
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-// Set "hidden" global j__uMaxWords to the maximum number of words to allocate
-// to any one array (large enough to have a JPM, otherwise j__uMaxWords is
-// ignored), to trigger a fake malloc error when the number is exceeded.  Note,
-// this code is always executed, not #ifdefd, because its virtually free.
-//
-// Note:  To keep the MALLOC macro faster and simpler, set j__uMaxWords to
-// MAXINT, not zero, by default.
-
-Word_t j__uMaxWords = ~0UL;
-
-// This macro hides the faking of a malloc failure:
-//
-// Note:  To keep this fast, just compare WordsPrev to j__uMaxWords without the
-// complexity of first adding WordsNow, meaning the trigger point is not
-// exactly where you might assume, but it shouldnt matter.
-
-#define MALLOC(MallocFunc,WordsPrev,WordsNow) \
-        (((WordsPrev) > j__uMaxWords) ? 0UL : MallocFunc(WordsNow))
-
-// Clear words starting at address:
-//
-// Note:  Only use this for objects that care; in other cases, it doesnt
-// matter if the objects memory is pre-zeroed.
-
-#define ZEROWORDS(Addr,Words)                   \
-        {                                       \
-            Word_t  Words__ = (Words);          \
-            PWord_t Addr__  = (PWord_t) (Addr); \
-            while (Words__--) *Addr__++ = 0UL;  \
-        }
-
-#ifdef TRACEMI
-
-// TRACING SUPPORT:
-//
-// Note:  For TRACEMI, use a format for address printing compatible with other
-// tracing facilities; in particular, %x not %lx, to truncate the "noisy" high
-// part on 64-bit systems.
-//
-// TBD: The trace macros need fixing for alternate address types.
-//
-// Note:  TRACEMI2 supports trace analysis no matter the underlying malloc/free
-// engine used.
-
-#include <stdio.h>
-
-static Word_t j__udyMemSequence = 0L;   // event sequence number.
-
-#define TRACE_ALLOC5(a,b,c,d,e)   (void) printf(a, (b), c, d)
-#define TRACE_FREE5( a,b,c,d,e)   (void) printf(a, (b), c, d)
-#define TRACE_ALLOC6(a,b,c,d,e,f) (void) printf(a, (b), c, d, e)
-#define TRACE_FREE6( a,b,c,d,e,f) (void) printf(a, (b), c, d, e)
-
-#else
-
-#ifdef TRACEMI2
-
-#include <stdio.h>
-
-#define b_pw cJU_BYTESPERWORD
-
-#define TRACE_ALLOC5(a,b,c,d,e)   \
-            (void) printf("a %lx %lx %lx\n", (b), (d) * b_pw, e)
-#define TRACE_FREE5( a,b,c,d,e)   \
-            (void) printf("f %lx %lx %lx\n", (b), (d) * b_pw, e)
-#define TRACE_ALLOC6(a,b,c,d,e,f)         \
-            (void) printf("a %lx %lx %lx\n", (b), (e) * b_pw, f)
-#define TRACE_FREE6( a,b,c,d,e,f)         \
-            (void) printf("f %lx %lx %lx\n", (b), (e) * b_pw, f)
-
-static Word_t j__udyMemSequence = 0L;   // event sequence number.
-
-#else
-
-#define TRACE_ALLOC5(a,b,c,d,e)   // null.
-#define TRACE_FREE5( a,b,c,d,e)   // null.
-#define TRACE_ALLOC6(a,b,c,d,e,f) // null.
-#define TRACE_FREE6( a,b,c,d,e,f) // null.
-
-#endif // ! TRACEMI2
-#endif // ! TRACEMI
-
-
-// MALLOC NAMESPACE SUPPORT:
-
-#if (defined(DEBUG) && (! defined(MALLOCBITS))) // for now, DEBUG => MALLOCBITS:
-#define MALLOCBITS 1
-#endif
-
-#ifdef MALLOCBITS
-#define MALLOCBITS_VALUE 0x3    // bit pattern to use.
-#define MALLOCBITS_MASK  0x7    // note: matches mask__ in JudyPrivate.h.
-
-#define MALLOCBITS_SET( Type,Addr) \
-        ((Addr) = (Type) ((Word_t) (Addr) |  MALLOCBITS_VALUE))
-#define MALLOCBITS_TEST(Type,Addr) \
-        assert((((Word_t) (Addr)) & MALLOCBITS_MASK) == MALLOCBITS_VALUE); \
-        ((Addr) = (Type) ((Word_t) (Addr) & ~MALLOCBITS_VALUE))
-#else
-#define MALLOCBITS_SET( Type,Addr)  // null.
-#define MALLOCBITS_TEST(Type,Addr)  // null.
-#endif
-
-
-// SAVE ERROR INFORMATION IN A Pjpm:
-//
-// "Small" (invalid) Addr values are used to distinguish overrun and no-mem
-// errors.  (TBD, non-zero invalid values are no longer returned from
-// lower-level functions, that is, JU_ERRNO_OVERRUN is no longer detected.)
-
-#define J__UDYSETALLOCERROR(Addr)                                       \
-        {                                                               \
-            JU_ERRID(Pjpm) = __LINE__;                                  \
-            if ((Word_t) (Addr) > 0) JU_ERRNO(Pjpm) = JU_ERRNO_OVERRUN; \
-            else                     JU_ERRNO(Pjpm) = JU_ERRNO_NOMEM;   \
-            return(0);                                                  \
-        }
-
-
-// ****************************************************************************
-// ALLOCATION FUNCTIONS:
-//
-// To help the compiler catch coding errors, each function returns a specific
-// object type.
-//
-// Note:  Only j__udyAllocJPM() and j__udyAllocJLW() return multiple values <=
-// sizeof(Word_t) to indicate the type of memory allocation failure.  Other
-// allocation functions convert this failure to a JU_ERRNO.
-
-
-// Note:  Unlike other j__udyAlloc*() functions, Pjpms are returned non-raw,
-// that is, without malloc namespace or root pointer type bits:
-
-FUNCTION Pjpm_t j__udyAllocJPM(void)
-{
-        Word_t Words = (sizeof(jpm_t) + cJU_BYTESPERWORD - 1) / cJU_BYTESPERWORD;
-        Pjpm_t Pjpm  = (Pjpm_t) MALLOC(JudyMalloc, Words, Words);
-
-        assert((Words * cJU_BYTESPERWORD) == sizeof(jpm_t));
-
-        if ((Word_t) Pjpm > sizeof(Word_t))
-        {
-            ZEROWORDS(Pjpm, Words);
-            Pjpm->jpm_TotalMemWords = Words;
-        }
-
-        TRACE_ALLOC5("0x%x %8lu = j__udyAllocJPM(), Words = %lu\n",
-                     Pjpm, j__udyMemSequence++, Words, cJU_LEAFW_MAXPOP1 + 1);
-        // MALLOCBITS_SET(Pjpm_t, Pjpm);  // see above.
-        return(Pjpm);
-
-} // j__udyAllocJPM()
-
-
-FUNCTION Pjbl_t j__udyAllocJBL(Pjpm_t Pjpm)
-{
-        Word_t Words   = sizeof(jbl_t) / cJU_BYTESPERWORD;
-        Pjbl_t PjblRaw = (Pjbl_t) MALLOC(JudyMallocVirtual,
-                                         Pjpm->jpm_TotalMemWords, Words);
-
-        assert((Words * cJU_BYTESPERWORD) == sizeof(jbl_t));
-
-        if ((Word_t) PjblRaw > sizeof(Word_t))
-        {
-            ZEROWORDS(P_JBL(PjblRaw), Words);
-            Pjpm->jpm_TotalMemWords += Words;
-        }
-        else { J__UDYSETALLOCERROR(PjblRaw); }
-
-        TRACE_ALLOC5("0x%x %8lu = j__udyAllocJBL(), Words = %lu\n", PjblRaw,
-                     j__udyMemSequence++, Words, (Pjpm->jpm_Pop0) + 2);
-        MALLOCBITS_SET(Pjbl_t, PjblRaw);
-        return(PjblRaw);
-
-} // j__udyAllocJBL()
-
-
-FUNCTION Pjbb_t j__udyAllocJBB(Pjpm_t Pjpm)
-{
-        Word_t Words   = sizeof(jbb_t) / cJU_BYTESPERWORD;
-        Pjbb_t PjbbRaw = (Pjbb_t) MALLOC(JudyMallocVirtual,
-                                         Pjpm->jpm_TotalMemWords, Words);
-
-        assert((Words * cJU_BYTESPERWORD) == sizeof(jbb_t));
-
-        if ((Word_t) PjbbRaw > sizeof(Word_t))
-        {
-            ZEROWORDS(P_JBB(PjbbRaw), Words);
-            Pjpm->jpm_TotalMemWords += Words;
-        }
-        else { J__UDYSETALLOCERROR(PjbbRaw); }
-
-        TRACE_ALLOC5("0x%x %8lu = j__udyAllocJBB(), Words = %lu\n", PjbbRaw,
-                     j__udyMemSequence++, Words, (Pjpm->jpm_Pop0) + 2);
-        MALLOCBITS_SET(Pjbb_t, PjbbRaw);
-        return(PjbbRaw);
-
-} // j__udyAllocJBB()
-
-
-FUNCTION Pjp_t j__udyAllocJBBJP(Word_t NumJPs, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_BRANCHJP_NUMJPSTOWORDS(NumJPs);
-        Pjp_t  PjpRaw;
-
-        PjpRaw = (Pjp_t) MALLOC(JudyMalloc, Pjpm->jpm_TotalMemWords, Words);
-
-        if ((Word_t) PjpRaw > sizeof(Word_t))
-        {
-            Pjpm->jpm_TotalMemWords += Words;
-        }
-        else { J__UDYSETALLOCERROR(PjpRaw); }
-
-        TRACE_ALLOC6("0x%x %8lu = j__udyAllocJBBJP(%lu), Words = %lu\n", PjpRaw,
-                     j__udyMemSequence++, NumJPs, Words, (Pjpm->jpm_Pop0) + 2);
-        MALLOCBITS_SET(Pjp_t, PjpRaw);
-        return(PjpRaw);
-
-} // j__udyAllocJBBJP()
-
-
-FUNCTION Pjbu_t j__udyAllocJBU(Pjpm_t Pjpm)
-{
-        Word_t Words   = sizeof(jbu_t) / cJU_BYTESPERWORD;
-        Pjbu_t PjbuRaw = (Pjbu_t) MALLOC(JudyMallocVirtual,
-                                         Pjpm->jpm_TotalMemWords, Words);
-
-        assert((Words * cJU_BYTESPERWORD) == sizeof(jbu_t));
-
-        if ((Word_t) PjbuRaw > sizeof(Word_t))
-        {
-            Pjpm->jpm_TotalMemWords += Words;
-        }
-        else { J__UDYSETALLOCERROR(PjbuRaw); }
-
-        TRACE_ALLOC5("0x%x %8lu = j__udyAllocJBU(), Words = %lu\n", PjbuRaw,
-                     j__udyMemSequence++, Words, (Pjpm->jpm_Pop0) + 2);
-        MALLOCBITS_SET(Pjbu_t, PjbuRaw);
-        return(PjbuRaw);
-
-} // j__udyAllocJBU()
-
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-
-FUNCTION Pjll_t j__udyAllocJLL1(Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_LEAF1POPTOWORDS(Pop1);
-        Pjll_t PjllRaw;
-
-        PjllRaw = (Pjll_t) MALLOC(JudyMalloc, Pjpm->jpm_TotalMemWords, Words);
-
-        if ((Word_t) PjllRaw > sizeof(Word_t))
-        {
-            Pjpm->jpm_TotalMemWords += Words;
-        }
-        else { J__UDYSETALLOCERROR(PjllRaw); }
-
-        TRACE_ALLOC6("0x%x %8lu = j__udyAllocJLL1(%lu), Words = %lu\n", PjllRaw,
-                     j__udyMemSequence++, Pop1, Words, (Pjpm->jpm_Pop0) + 2);
-        MALLOCBITS_SET(Pjll_t, PjllRaw);
-        return(PjllRaw);
-
-} // j__udyAllocJLL1()
-
-#endif // (JUDYL || (! JU_64BIT))
-
-
-FUNCTION Pjll_t j__udyAllocJLL2(Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_LEAF2POPTOWORDS(Pop1);
-        Pjll_t PjllRaw;
-
-        PjllRaw = (Pjll_t) MALLOC(JudyMalloc, Pjpm->jpm_TotalMemWords, Words);
-
-        if ((Word_t) PjllRaw > sizeof(Word_t))
-        {
-            Pjpm->jpm_TotalMemWords += Words;
-        }
-        else { J__UDYSETALLOCERROR(PjllRaw); }
-
-        TRACE_ALLOC6("0x%x %8lu = j__udyAllocJLL2(%lu), Words = %lu\n", PjllRaw,
-                     j__udyMemSequence++, Pop1, Words, (Pjpm->jpm_Pop0) + 2);
-        MALLOCBITS_SET(Pjll_t, PjllRaw);
-        return(PjllRaw);
-
-} // j__udyAllocJLL2()
-
-
-FUNCTION Pjll_t j__udyAllocJLL3(Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_LEAF3POPTOWORDS(Pop1);
-        Pjll_t PjllRaw;
-
-        PjllRaw = (Pjll_t) MALLOC(JudyMalloc, Pjpm->jpm_TotalMemWords, Words);
-
-        if ((Word_t) PjllRaw > sizeof(Word_t))
-        {
-            Pjpm->jpm_TotalMemWords += Words;
-        }
-        else { J__UDYSETALLOCERROR(PjllRaw); }
-
-        TRACE_ALLOC6("0x%x %8lu = j__udyAllocJLL3(%lu), Words = %lu\n", PjllRaw,
-                     j__udyMemSequence++, Pop1, Words, (Pjpm->jpm_Pop0) + 2);
-        MALLOCBITS_SET(Pjll_t, PjllRaw);
-        return(PjllRaw);
-
-} // j__udyAllocJLL3()
-
-
-#ifdef JU_64BIT
-
-FUNCTION Pjll_t j__udyAllocJLL4(Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_LEAF4POPTOWORDS(Pop1);
-        Pjll_t PjllRaw;
-
-        PjllRaw = (Pjll_t) MALLOC(JudyMalloc, Pjpm->jpm_TotalMemWords, Words);
-
-        if ((Word_t) PjllRaw > sizeof(Word_t))
-        {
-            Pjpm->jpm_TotalMemWords += Words;
-        }
-        else { J__UDYSETALLOCERROR(PjllRaw); }
-
-        TRACE_ALLOC6("0x%x %8lu = j__udyAllocJLL4(%lu), Words = %lu\n", PjllRaw,
-                     j__udyMemSequence++, Pop1, Words, (Pjpm->jpm_Pop0) + 2);
-        MALLOCBITS_SET(Pjll_t, PjllRaw);
-        return(PjllRaw);
-
-} // j__udyAllocJLL4()
-
-
-FUNCTION Pjll_t j__udyAllocJLL5(Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_LEAF5POPTOWORDS(Pop1);
-        Pjll_t PjllRaw;
-
-        PjllRaw = (Pjll_t) MALLOC(JudyMalloc, Pjpm->jpm_TotalMemWords, Words);
-
-        if ((Word_t) PjllRaw > sizeof(Word_t))
-        {
-            Pjpm->jpm_TotalMemWords += Words;
-        }
-        else { J__UDYSETALLOCERROR(PjllRaw); }
-
-        TRACE_ALLOC6("0x%x %8lu = j__udyAllocJLL5(%lu), Words = %lu\n", PjllRaw,
-                     j__udyMemSequence++, Pop1, Words, (Pjpm->jpm_Pop0) + 2);
-        MALLOCBITS_SET(Pjll_t, PjllRaw);
-        return(PjllRaw);
-
-} // j__udyAllocJLL5()
-
-
-FUNCTION Pjll_t j__udyAllocJLL6(Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_LEAF6POPTOWORDS(Pop1);
-        Pjll_t PjllRaw;
-
-        PjllRaw = (Pjll_t) MALLOC(JudyMalloc, Pjpm->jpm_TotalMemWords, Words);
-
-        if ((Word_t) PjllRaw > sizeof(Word_t))
-        {
-            Pjpm->jpm_TotalMemWords += Words;
-        }
-        else { J__UDYSETALLOCERROR(PjllRaw); }
-
-        TRACE_ALLOC6("0x%x %8lu = j__udyAllocJLL6(%lu), Words = %lu\n", PjllRaw,
-                     j__udyMemSequence++, Pop1, Words, (Pjpm->jpm_Pop0) + 2);
-        MALLOCBITS_SET(Pjll_t, PjllRaw);
-        return(PjllRaw);
-
-} // j__udyAllocJLL6()
-
-
-FUNCTION Pjll_t j__udyAllocJLL7(Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_LEAF7POPTOWORDS(Pop1);
-        Pjll_t PjllRaw;
-
-        PjllRaw = (Pjll_t) MALLOC(JudyMalloc, Pjpm->jpm_TotalMemWords, Words);
-
-        if ((Word_t) PjllRaw > sizeof(Word_t))
-        {
-            Pjpm->jpm_TotalMemWords += Words;
-        }
-        else { J__UDYSETALLOCERROR(PjllRaw); }
-
-        TRACE_ALLOC6("0x%x %8lu = j__udyAllocJLL7(%lu), Words = %lu\n", PjllRaw,
-                     j__udyMemSequence++, Pop1, Words, (Pjpm->jpm_Pop0) + 2);
-        MALLOCBITS_SET(Pjll_t, PjllRaw);
-        return(PjllRaw);
-
-} // j__udyAllocJLL7()
-
-#endif // JU_64BIT
-
-
-// Note:  Root-level leaf addresses are always whole words (Pjlw_t), and unlike
-// other j__udyAlloc*() functions, they are returned non-raw, that is, without
-// malloc namespace or root pointer type bits (the latter are added later by
-// the caller):
-
-FUNCTION Pjlw_t j__udyAllocJLW(Word_t Pop1)
-{
-        Word_t Words = JU_LEAFWPOPTOWORDS(Pop1);
-        Pjlw_t Pjlw  = (Pjlw_t) MALLOC(JudyMalloc, Words, Words);
-
-        TRACE_ALLOC6("0x%x %8lu = j__udyAllocJLW(%lu), Words = %lu\n", Pjlw,
-                     j__udyMemSequence++, Pop1, Words, Pop1);
-        // MALLOCBITS_SET(Pjlw_t, Pjlw);  // see above.
-        return(Pjlw);
-
-} // j__udyAllocJLW()
-
-
-FUNCTION Pjlb_t j__udyAllocJLB1(Pjpm_t Pjpm)
-{
-        Word_t Words = sizeof(jlb_t) / cJU_BYTESPERWORD;
-        Pjlb_t PjlbRaw;
-
-        PjlbRaw = (Pjlb_t) MALLOC(JudyMalloc, Pjpm->jpm_TotalMemWords, Words);
-
-        assert((Words * cJU_BYTESPERWORD) == sizeof(jlb_t));
-
-        if ((Word_t) PjlbRaw > sizeof(Word_t))
-        {
-            ZEROWORDS(P_JLB(PjlbRaw), Words);
-            Pjpm->jpm_TotalMemWords += Words;
-        }
-        else { J__UDYSETALLOCERROR(PjlbRaw); }
-
-        TRACE_ALLOC5("0x%x %8lu = j__udyAllocJLB1(), Words = %lu\n", PjlbRaw,
-                     j__udyMemSequence++, Words, (Pjpm->jpm_Pop0) + 2);
-        MALLOCBITS_SET(Pjlb_t, PjlbRaw);
-        return(PjlbRaw);
-
-} // j__udyAllocJLB1()
-
-
-#ifdef JUDYL
-
-FUNCTION Pjv_t j__udyLAllocJV(Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JL_LEAFVPOPTOWORDS(Pop1);
-        Pjv_t  PjvRaw;
-
-        PjvRaw = (Pjv_t) MALLOC(JudyMalloc, Pjpm->jpm_TotalMemWords, Words);
-
-        if ((Word_t) PjvRaw > sizeof(Word_t))
-        {
-            Pjpm->jpm_TotalMemWords += Words;
-        }
-        else { J__UDYSETALLOCERROR(PjvRaw); }
-
-        TRACE_ALLOC6("0x%x %8lu = j__udyLAllocJV(%lu), Words = %lu\n", PjvRaw,
-                     j__udyMemSequence++, Pop1, Words, (Pjpm->jpm_Pop0) + 2);
-        MALLOCBITS_SET(Pjv_t, PjvRaw);
-        return(PjvRaw);
-
-} // j__udyLAllocJV()
-
-#endif // JUDYL
-
-
-// ****************************************************************************
-// FREE FUNCTIONS:
-//
-// To help the compiler catch coding errors, each function takes a specific
-// object type to free.
-
-
-// Note:  j__udyFreeJPM() receives a root pointer with NO root pointer type
-// bits present, that is, they must be stripped by the caller using P_JPM():
-
-FUNCTION void j__udyFreeJPM(Pjpm_t PjpmFree, Pjpm_t PjpmStats)
-{
-        Word_t Words = (sizeof(jpm_t) + cJU_BYTESPERWORD - 1) / cJU_BYTESPERWORD;
-
-        // MALLOCBITS_TEST(Pjpm_t, PjpmFree);   // see above.
-        JudyFree((Pvoid_t) PjpmFree, Words);
-
-        if (PjpmStats != (Pjpm_t) NULL) PjpmStats->jpm_TotalMemWords -= Words;
-
-// Note:  Log PjpmFree->jpm_Pop0, similar to other j__udyFree*() functions, not
-// an assumed value of cJU_LEAFW_MAXPOP1, for when the caller is
-// Judy*FreeArray(), jpm_Pop0 is set to 0, and the population after the free
-// really will be 0, not cJU_LEAFW_MAXPOP1.
-
-        TRACE_FREE6("0x%x %8lu =  j__udyFreeJPM(%lu), Words = %lu\n", PjpmFree,
-                    j__udyMemSequence++, Words, Words, PjpmFree->jpm_Pop0);
-
-
-} // j__udyFreeJPM()
-
-
-FUNCTION void j__udyFreeJBL(Pjbl_t Pjbl, Pjpm_t Pjpm)
-{
-        Word_t Words = sizeof(jbl_t) / cJU_BYTESPERWORD;
-
-        MALLOCBITS_TEST(Pjbl_t, Pjbl);
-        JudyFreeVirtual((Pvoid_t) Pjbl, Words);
-
-        Pjpm->jpm_TotalMemWords -= Words;
-
-        TRACE_FREE5("0x%x %8lu =  j__udyFreeJBL(), Words = %lu\n", Pjbl,
-                    j__udyMemSequence++, Words, Pjpm->jpm_Pop0);
-
-
-} // j__udyFreeJBL()
-
-
-FUNCTION void j__udyFreeJBB(Pjbb_t Pjbb, Pjpm_t Pjpm)
-{
-        Word_t Words = sizeof(jbb_t) / cJU_BYTESPERWORD;
-
-        MALLOCBITS_TEST(Pjbb_t, Pjbb);
-        JudyFreeVirtual((Pvoid_t) Pjbb, Words);
-
-        Pjpm->jpm_TotalMemWords -= Words;
-
-        TRACE_FREE5("0x%x %8lu =  j__udyFreeJBB(), Words = %lu\n", Pjbb,
-                    j__udyMemSequence++, Words, Pjpm->jpm_Pop0);
-
-
-} // j__udyFreeJBB()
-
-
-FUNCTION void j__udyFreeJBBJP(Pjp_t Pjp, Word_t NumJPs, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_BRANCHJP_NUMJPSTOWORDS(NumJPs);
-
-        MALLOCBITS_TEST(Pjp_t, Pjp);
-        JudyFree((Pvoid_t) Pjp, Words);
-
-        Pjpm->jpm_TotalMemWords -= Words;
-
-        TRACE_FREE6("0x%x %8lu =  j__udyFreeJBBJP(%lu), Words = %lu\n", Pjp,
-                    j__udyMemSequence++, NumJPs, Words, Pjpm->jpm_Pop0);
-
-
-} // j__udyFreeJBBJP()
-
-
-FUNCTION void j__udyFreeJBU(Pjbu_t Pjbu, Pjpm_t Pjpm)
-{
-        Word_t Words = sizeof(jbu_t) / cJU_BYTESPERWORD;
-
-        MALLOCBITS_TEST(Pjbu_t, Pjbu);
-        JudyFreeVirtual((Pvoid_t) Pjbu, Words);
-
-        Pjpm->jpm_TotalMemWords -= Words;
-
-        TRACE_FREE5("0x%x %8lu =  j__udyFreeJBU(), Words = %lu\n", Pjbu,
-                    j__udyMemSequence++, Words, Pjpm->jpm_Pop0);
-
-
-} // j__udyFreeJBU()
-
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-
-FUNCTION void j__udyFreeJLL1(Pjll_t Pjll, Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_LEAF1POPTOWORDS(Pop1);
-
-        MALLOCBITS_TEST(Pjll_t, Pjll);
-        JudyFree((Pvoid_t) Pjll, Words);
-
-        Pjpm->jpm_TotalMemWords -= Words;
-
-        TRACE_FREE6("0x%x %8lu =  j__udyFreeJLL1(%lu), Words = %lu\n", Pjll,
-                    j__udyMemSequence++, Pop1, Words, Pjpm->jpm_Pop0);
-
-
-} // j__udyFreeJLL1()
-
-#endif // (JUDYL || (! JU_64BIT))
-
-
-FUNCTION void j__udyFreeJLL2(Pjll_t Pjll, Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_LEAF2POPTOWORDS(Pop1);
-
-        MALLOCBITS_TEST(Pjll_t, Pjll);
-        JudyFree((Pvoid_t) Pjll, Words);
-
-        Pjpm->jpm_TotalMemWords -= Words;
-
-        TRACE_FREE6("0x%x %8lu =  j__udyFreeJLL2(%lu), Words = %lu\n", Pjll,
-                    j__udyMemSequence++, Pop1, Words, Pjpm->jpm_Pop0);
-
-
-} // j__udyFreeJLL2()
-
-
-FUNCTION void j__udyFreeJLL3(Pjll_t Pjll, Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_LEAF3POPTOWORDS(Pop1);
-
-        MALLOCBITS_TEST(Pjll_t, Pjll);
-        JudyFree((Pvoid_t) Pjll, Words);
-
-        Pjpm->jpm_TotalMemWords -= Words;
-
-        TRACE_FREE6("0x%x %8lu =  j__udyFreeJLL3(%lu), Words = %lu\n", Pjll,
-                    j__udyMemSequence++, Pop1, Words, Pjpm->jpm_Pop0);
-
-
-} // j__udyFreeJLL3()
-
-
-#ifdef JU_64BIT
-
-FUNCTION void j__udyFreeJLL4(Pjll_t Pjll, Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_LEAF4POPTOWORDS(Pop1);
-
-        MALLOCBITS_TEST(Pjll_t, Pjll);
-        JudyFree((Pvoid_t) Pjll, Words);
-
-        Pjpm->jpm_TotalMemWords -= Words;
-
-        TRACE_FREE6("0x%x %8lu =  j__udyFreeJLL4(%lu), Words = %lu\n", Pjll,
-                    j__udyMemSequence++, Pop1, Words, Pjpm->jpm_Pop0);
-
-
-} // j__udyFreeJLL4()
-
-
-FUNCTION void j__udyFreeJLL5(Pjll_t Pjll, Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_LEAF5POPTOWORDS(Pop1);
-
-        MALLOCBITS_TEST(Pjll_t, Pjll);
-        JudyFree((Pvoid_t) Pjll, Words);
-
-        Pjpm->jpm_TotalMemWords -= Words;
-
-        TRACE_FREE6("0x%x %8lu =  j__udyFreeJLL5(%lu), Words = %lu\n", Pjll,
-                    j__udyMemSequence++, Pop1, Words, Pjpm->jpm_Pop0);
-
-
-} // j__udyFreeJLL5()
-
-
-FUNCTION void j__udyFreeJLL6(Pjll_t Pjll, Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_LEAF6POPTOWORDS(Pop1);
-
-        MALLOCBITS_TEST(Pjll_t, Pjll);
-        JudyFree((Pvoid_t) Pjll, Words);
-
-        Pjpm->jpm_TotalMemWords -= Words;
-
-        TRACE_FREE6("0x%x %8lu =  j__udyFreeJLL6(%lu), Words = %lu\n", Pjll,
-                    j__udyMemSequence++, Pop1, Words, Pjpm->jpm_Pop0);
-
-
-} // j__udyFreeJLL6()
-
-
-FUNCTION void j__udyFreeJLL7(Pjll_t Pjll, Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_LEAF7POPTOWORDS(Pop1);
-
-        MALLOCBITS_TEST(Pjll_t, Pjll);
-        JudyFree((Pvoid_t) Pjll, Words);
-
-        Pjpm->jpm_TotalMemWords -= Words;
-
-        TRACE_FREE6("0x%x %8lu =  j__udyFreeJLL7(%lu), Words = %lu\n", Pjll,
-                    j__udyMemSequence++, Pop1, Words, Pjpm->jpm_Pop0);
-
-
-} // j__udyFreeJLL7()
-
-#endif // JU_64BIT
-
-
-// Note:  j__udyFreeJLW() receives a root pointer with NO root pointer type
-// bits present, that is, they are stripped by P_JLW():
-
-FUNCTION void j__udyFreeJLW(Pjlw_t Pjlw, Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JU_LEAFWPOPTOWORDS(Pop1);
-
-        // MALLOCBITS_TEST(Pjlw_t, Pjlw);       // see above.
-        JudyFree((Pvoid_t) Pjlw, Words);
-
-        if (Pjpm) Pjpm->jpm_TotalMemWords -= Words;
-
-        TRACE_FREE6("0x%x %8lu =  j__udyFreeJLW(%lu), Words = %lu\n", Pjlw,
-                    j__udyMemSequence++, Pop1, Words, Pop1 - 1);
-
-
-} // j__udyFreeJLW()
-
-
-FUNCTION void j__udyFreeJLB1(Pjlb_t Pjlb, Pjpm_t Pjpm)
-{
-        Word_t Words = sizeof(jlb_t) / cJU_BYTESPERWORD;
-
-        MALLOCBITS_TEST(Pjlb_t, Pjlb);
-        JudyFree((Pvoid_t) Pjlb, Words);
-
-        Pjpm->jpm_TotalMemWords -= Words;
-
-        TRACE_FREE5("0x%x %8lu =  j__udyFreeJLB1(), Words = %lu\n", Pjlb,
-                    j__udyMemSequence++, Words, Pjpm->jpm_Pop0);
-
-
-} // j__udyFreeJLB1()
-
-
-#ifdef JUDYL
-
-FUNCTION void j__udyLFreeJV(Pjv_t Pjv, Word_t Pop1, Pjpm_t Pjpm)
-{
-        Word_t Words = JL_LEAFVPOPTOWORDS(Pop1);
-
-        MALLOCBITS_TEST(Pjv_t, Pjv);
-        JudyFree((Pvoid_t) Pjv, Words);
-
-        Pjpm->jpm_TotalMemWords -= Words;
-
-        TRACE_FREE6("0x%x %8lu = j__udyLFreeJV(%lu), Words = %lu\n", Pjv,
-                    j__udyMemSequence++, Pop1, Words, Pjpm->jpm_Pop0);
-
-
-} // j__udyLFreeJV()
-
-#endif // JUDYL
diff --git a/libs/klib/judy/JudyMemActive.c b/libs/klib/judy/JudyMemActive.c
deleted file mode 100644
index d95a134..0000000
--- a/libs/klib/judy/JudyMemActive.c
+++ /dev/null
@@ -1,257 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// Return number of bytes of memory used to support a Judy1/L array.
-// Compile with one of -DJUDY1 or -DJUDYL.
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-FUNCTION static Word_t j__udyGetMemActive(Pjp_t);
-
-
-// ****************************************************************************
-// J U D Y   1   M E M   A C T I V E
-// J U D Y   L   M E M   A C T I V E
-
-#ifdef JUDY1
-FUNCTION Word_t Judy1MemActive
-#else
-FUNCTION Word_t JudyLMemActive
-#endif
-        (
-	Pcvoid_t PArray	        // from which to retrieve.
-        )
-{
-	if (PArray == (Pcvoid_t)NULL) return(0);
-
-	if (JU_LEAFW_POP0(PArray) < cJU_LEAFW_MAXPOP1) // must be a LEAFW
-        {
-	    Pjlw_t Pjlw = P_JLW(PArray);	// first word of leaf.
-            Word_t Words = Pjlw[0] + 1;		// population.
-#ifdef JUDY1
-            return((Words + 1) * sizeof(Word_t));
-#else
-            return(((Words * 2) + 1) * sizeof(Word_t));
-#endif
-        }
-	else
-	{
-	    Pjpm_t Pjpm = P_JPM(PArray);
-	    return(j__udyGetMemActive(&Pjpm->jpm_JP) + sizeof(jpm_t));
-	}
-
-} // JudyMemActive()
-
-
-// ****************************************************************************
-// __ J U D Y   G E T   M E M   A C T I V E
-
-FUNCTION static Word_t j__udyGetMemActive(
-	Pjp_t  Pjp)		// top of subtree.
-{
-	Word_t offset;		// in a branch.
-	Word_t Bytes = 0;	// actual bytes used at this level.
-	Word_t IdxSz;		// bytes per index in leaves
-
-	switch (JU_JPTYPE(Pjp))
-	{
-
-	case cJU_JPBRANCH_L2:
-	case cJU_JPBRANCH_L3:
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_L4:
-	case cJU_JPBRANCH_L5:
-	case cJU_JPBRANCH_L6:
-	case cJU_JPBRANCH_L7:
-#endif
-	case cJU_JPBRANCH_L:
-	{
-	    Pjbl_t Pjbl = P_JBL(Pjp->jp_Addr);
-
-	    for (offset = 0; offset < (Pjbl->jbl_NumJPs); ++offset)
-	        Bytes += j__udyGetMemActive((Pjbl->jbl_jp) + offset);
-
-	    return(Bytes + sizeof(jbl_t));
-	}
-
-	case cJU_JPBRANCH_B2:
-	case cJU_JPBRANCH_B3:
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_B4:
-	case cJU_JPBRANCH_B5:
-	case cJU_JPBRANCH_B6:
-	case cJU_JPBRANCH_B7:
-#endif
-	case cJU_JPBRANCH_B:
-	{
-	    Word_t subexp;
-	    Word_t jpcount;
-	    Pjbb_t Pjbb = P_JBB(Pjp->jp_Addr);
-
-	    for (subexp = 0; subexp < cJU_NUMSUBEXPB; ++subexp)
-	    {
-	        jpcount = j__udyCountBitsB(JU_JBB_BITMAP(Pjbb, subexp));
-                Bytes  += jpcount * sizeof(jp_t);
-
-		for (offset = 0; offset < jpcount; ++offset)
-		{
-		    Bytes += j__udyGetMemActive(P_JP(JU_JBB_PJP(Pjbb, subexp))
-			   + offset);
-		}
-	    }
-
-	    return(Bytes + sizeof(jbb_t));
-	}
-
-	case cJU_JPBRANCH_U2:
-	case cJU_JPBRANCH_U3:
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_U4:
-	case cJU_JPBRANCH_U5:
-	case cJU_JPBRANCH_U6:
-	case cJU_JPBRANCH_U7:
-#endif
-	case cJU_JPBRANCH_U:
-        {
-	    Pjbu_t Pjbu = P_JBU(Pjp->jp_Addr);
-
-            for (offset = 0; offset < cJU_BRANCHUNUMJPS; ++offset)
-	    {
-		if (((Pjbu->jbu_jp[offset].jp_Type) >= cJU_JPNULL1)
-		 && ((Pjbu->jbu_jp[offset].jp_Type) <= cJU_JPNULLMAX))
-		{
-		    continue;		// skip null JP to save time.
-		}
-
-	        Bytes += j__udyGetMemActive(Pjbu->jbu_jp + offset);
-	    }
-
-	    return(Bytes + sizeof(jbu_t));
-        }
-
-
-// -- Cases below here terminate and do not recurse. --
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-        case cJU_JPLEAF1: IdxSz = 1; goto LeafWords;
-#endif
-	case cJU_JPLEAF2: IdxSz = 2; goto LeafWords;
-	case cJU_JPLEAF3: IdxSz = 3; goto LeafWords;
-#ifdef JU_64BIT
-	case cJU_JPLEAF4: IdxSz = 4; goto LeafWords;
-	case cJU_JPLEAF5: IdxSz = 5; goto LeafWords;
-	case cJU_JPLEAF6: IdxSz = 6; goto LeafWords;
-	case cJU_JPLEAF7: IdxSz = 7; goto LeafWords;
-#endif
-LeafWords:
-
-#ifdef JUDY1
-            return(IdxSz * (JU_JPLEAF_POP0(Pjp) + 1));
-#else
-            return((IdxSz + sizeof(Word_t))
-		 * (JU_JPLEAF_POP0(Pjp) + 1));
-#endif
-	case cJU_JPLEAF_B1:
-	{
-#ifdef JUDY1
-            return(sizeof(jlb_t));
-#else
-            Bytes = (JU_JPLEAF_POP0(Pjp) + 1) * sizeof(Word_t);
-
-	    return(Bytes + sizeof(jlb_t));
-#endif
-	}
-
-	JUDY1CODE(case cJ1_JPFULLPOPU1: return(0);)
-
-#ifdef JUDY1
-#define J__Mpy 0
-#else
-#define J__Mpy sizeof(Word_t)
-#endif
-
-	case cJU_JPIMMED_1_01:	return(0);
-	case cJU_JPIMMED_2_01:	return(0);
-	case cJU_JPIMMED_3_01:	return(0);
-#ifdef JU_64BIT
-	case cJU_JPIMMED_4_01:	return(0);
-	case cJU_JPIMMED_5_01:	return(0);
-	case cJU_JPIMMED_6_01:	return(0);
-	case cJU_JPIMMED_7_01:	return(0);
-#endif
-
-	case cJU_JPIMMED_1_02:	return(J__Mpy * 2);
-	case cJU_JPIMMED_1_03:	return(J__Mpy * 3);
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_1_04:	return(J__Mpy * 4);
-	case cJU_JPIMMED_1_05:	return(J__Mpy * 5);
-	case cJU_JPIMMED_1_06:	return(J__Mpy * 6);
-	case cJU_JPIMMED_1_07:	return(J__Mpy * 7);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_1_08:	return(0);
-	case cJ1_JPIMMED_1_09:	return(0);
-	case cJ1_JPIMMED_1_10:	return(0);
-	case cJ1_JPIMMED_1_11:	return(0);
-	case cJ1_JPIMMED_1_12:	return(0);
-	case cJ1_JPIMMED_1_13:	return(0);
-	case cJ1_JPIMMED_1_14:	return(0);
-	case cJ1_JPIMMED_1_15:	return(0);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_2_02:	return(J__Mpy * 2);
-	case cJU_JPIMMED_2_03:	return(J__Mpy * 3);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_2_04:	return(0);
-	case cJ1_JPIMMED_2_05:	return(0);
-	case cJ1_JPIMMED_2_06:	return(0);
-	case cJ1_JPIMMED_2_07:	return(0);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_3_02:	return(J__Mpy * 2);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_3_03:	return(0);
-	case cJ1_JPIMMED_3_04:	return(0);
-	case cJ1_JPIMMED_3_05:	return(0);
-
-	case cJ1_JPIMMED_4_02:	return(0);
-	case cJ1_JPIMMED_4_03:	return(0);
-	case cJ1_JPIMMED_5_02:	return(0);
-	case cJ1_JPIMMED_5_03:	return(0);
-	case cJ1_JPIMMED_6_02:	return(0);
-	case cJ1_JPIMMED_7_02:	return(0);
-#endif
-
-	} // switch (JU_JPTYPE(Pjp))
-
-	return(0);			// to make some compilers happy.
-
-} // j__udyGetMemActive()
diff --git a/libs/klib/judy/JudyMemUsed.c b/libs/klib/judy/JudyMemUsed.c
deleted file mode 100644
index e25f65b..0000000
--- a/libs/klib/judy/JudyMemUsed.c
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// Return number of bytes of memory used to support a Judy1/L array.
-// Compile with one of -DJUDY1 or -DJUDYL.
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-#ifdef JUDY1
-FUNCTION Word_t Judy1MemUsed
-#else  // JUDYL
-FUNCTION Word_t JudyLMemUsed
-#endif
-        (
-	Pcvoid_t PArray 	// from which to retrieve.
-        )
-{
-	Word_t	 Words = 0;
-
-        if (PArray == (Pcvoid_t) NULL) return(0);
-
-	if (JU_LEAFW_POP0(PArray) < cJU_LEAFW_MAXPOP1) // must be a LEAFW
-	{
-	    Pjlw_t Pjlw = P_JLW(PArray);		// first word of leaf.
-	    Words = JU_LEAFWPOPTOWORDS(Pjlw[0] + 1);	// based on pop1.
-	}
-	else
-	{
-	    Pjpm_t Pjpm = P_JPM(PArray);
-	    Words = Pjpm->jpm_TotalMemWords;
-	}
-
-	return(Words * sizeof(Word_t));		// convert to bytes.
-
-} // Judy1MemUsed() / JudyLMemUsed()
diff --git a/libs/klib/judy/JudyNext.c b/libs/klib/judy/JudyNext.c
deleted file mode 100644
index 4af06e2..0000000
--- a/libs/klib/judy/JudyNext.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define JUDYNEXT 1
-#include "JudyPrevNext.c"
diff --git a/libs/klib/judy/JudyNextEmpty.c b/libs/klib/judy/JudyNextEmpty.c
deleted file mode 100644
index 73b0926..0000000
--- a/libs/klib/judy/JudyNextEmpty.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define JUDYNEXT 1
-#include "JudyPrevNextEmpty.c"
diff --git a/libs/klib/judy/JudyPrev.c b/libs/klib/judy/JudyPrev.c
deleted file mode 100644
index 3d9f484..0000000
--- a/libs/klib/judy/JudyPrev.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define JUDYPREV 1
-#include "JudyPrevNext.c"
diff --git a/libs/klib/judy/JudyPrevEmpty.c b/libs/klib/judy/JudyPrevEmpty.c
deleted file mode 100644
index f9a182b..0000000
--- a/libs/klib/judy/JudyPrevEmpty.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define JUDYPREV 1
-#include "JudyPrevNextEmpty.c"
diff --git a/libs/klib/judy/JudyPrevNext.c b/libs/klib/judy/JudyPrevNext.c
deleted file mode 100644
index 1131eef..0000000
--- a/libs/klib/judy/JudyPrevNext.c
+++ /dev/null
@@ -1,1888 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// Judy*Prev() and Judy*Next() functions for Judy1 and JudyL.
-// Compile with one of -DJUDY1 or -DJUDYL.
-//
-// Compile with -DJUDYNEXT for the Judy*Next() function; otherwise defaults to
-// Judy*Prev().
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifndef JUDYNEXT
-#ifndef JUDYPREV
-#define	JUDYPREV 1		// neither set => use default.
-#endif
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-
-// ****************************************************************************
-// J U D Y   1   P R E V
-// J U D Y   1   N E X T
-// J U D Y   L   P R E V
-// J U D Y   L   N E X T
-//
-// See the manual entry for the API.
-//
-// OVERVIEW OF Judy*Prev():
-//
-// Use a reentrant switch statement (state machine, SM1 = "get") to decode the
-// callers *PIndex-1, starting with the (PArray), through branches, if
-// any, down to an immediate or a leaf.  Look for *PIndex-1 in that leaf, and
-// if found, return it.
-//
-// A dead end is either a branch that does not contain a JP for the appropriate
-// digit in *PIndex-1, or a leaf that does not contain the undecoded digits of
-// *PIndex-1.  Upon reaching a dead end, backtrack through the leaf/branches
-// that were just traversed, using a list (history) of parent JPs that is built
-// while going forward in SM1Get.  Start with the current leaf or branch.  In a
-// backtracked leaf, look for an Index less than *PIndex-1.  In each
-// backtracked branch, look "sideways" for the next JP, if any, lower than the
-// one for the digit (from *PIndex-1) that was previously decoded.  While
-// backtracking, if a leaf has no previous Index or a branch has no lower JP,
-// go to its parent branch in turn.  Upon reaching the JRP, return failure, "no
-// previous Index".  The backtrack process is sufficiently different from
-// SM1Get to merit its own separate reentrant switch statement (SM2 =
-// "backtrack").
-//
-// While backtracking, upon finding a lower JP in a branch, there is certain to
-// be a "prev" Index under that JP (unless the Judy array is corrupt).
-// Traverse forward again, this time taking the last (highest, right-most) JP
-// in each branch, and the last (highest) Index upon reaching an immediate or a
-// leaf.  This traversal is sufficiently different from SM1Get and SM2Backtrack
-// to merit its own separate reentrant switch statement (SM3 = "findlimit").
-//
-// "Decode" bytes in JPs complicate this process a little.  In SM1Get, when a
-// JP is a narrow pointer, that is, when states are skipped (so the skipped
-// digits are stored in jp_DcdPopO), compare the relevant digits to the same
-// digits in *PIndex-1.  If they are EQUAL, proceed in SM1Get as before.  If
-// jp_DcdPopOs digits are GREATER, treat the JP as a dead end and proceed in
-// SM2Backtrack.  If jp_DcdPopOs digits are LESS, treat the JP as if it had
-// just been found during a backtrack and proceed directly in SM3Findlimit.
-//
-// Note that Decode bytes can be ignored in SM3Findlimit; they dont matter.
-// Also note that in practice the Decode bytes are routinely compared with
-// *PIndex-1 because thats simpler and no slower than first testing for
-// narrowness.
-//
-// Decode bytes also make it unnecessary to construct the Index to return (the
-// revised *PIndex) during the search.  This step is deferred until finding an
-// Index during backtrack or findlimit, before returning it.  The first digit
-// of *PIndex is derived (saved) based on which JP is used in a JRP branch.
-// The remaining digits are obtained from the jp_DcdPopO field in the JP (if
-// any) above the immediate or leaf containing the found (prev) Index, plus the
-// remaining digit(s) in the immediate or leaf itself.  In the case of a LEAFW,
-// the Index to return is found directly in the leaf.
-//
-// Note:  Theoretically, as described above, upon reaching a dead end, SM1Get
-// passes control to SM2Backtrack to look sideways, even in a leaf.  Actually
-// its a little more efficient for the SM1Get leaf cases to shortcut this and
-// take care of the sideways searches themselves.  Hence the history list only
-// contains branch JPs, and SM2Backtrack only handles branches.  In fact, even
-// the branch handling cases in SM1Get do some shortcutting (sideways
-// searching) to avoid pushing history and calling SM2Backtrack unnecessarily.
-//
-// Upon reaching an Index to return after backtracking, *PIndex must be
-// modified to the found Index.  In principle this could be done by building
-// the Index from a saved rootdigit (in the top branch) plus the Dcd bytes from
-// the parent JP plus the appropriate Index bytes from the leaf.  However,
-// Immediates are difficult because their parent JPs lack one (last) digit.  So
-// instead just build the *PIndex to return "top down" while backtracking and
-// findlimiting.
-//
-// This function is written iteratively for speed, rather than recursively.
-//
-// CAVEATS:
-//
-// Why use a backtrack list (history stack), since it has finite size?  The
-// size is small for Judy on both 32-bit and 64-bit systems, and a list (really
-// just an array) is fast to maintain and use.  Other alternatives include
-// doing a lookahead (lookaside) in each branch while traversing forward
-// (decoding), and restarting from the top upon a dead end.
-//
-// A lookahead means noting the last branch traversed which contained a
-// non-null JP lower than the one specified by a digit in *PIndex-1, and
-// returning to that point for SM3Findlimit.  This seems like a good idea, and
-// should be pretty cheap for linear and bitmap branches, but it could result
-// in up to 31 unnecessary additional cache line fills (in extreme cases) for
-// every uncompressed branch traversed.  We have considered means of attaching
-// to or hiding within an uncompressed branch (in null JPs) a "cache line map"
-// or other structure, such as an offset to the next non-null JP, that would
-// speed this up, but it seems unnecessary merely to avoid having a
-// finite-length list (array).  (If JudySL is ever made "native", the finite
-// list length will be an issue.)
-//
-// Restarting at the top of the Judy array after a dead end requires a careful
-// modification of *PIndex-1 to decrement the digit for the parent branch and
-// set the remaining lower digits to all 1s.  This must be repeated each time a
-// parent branch contains another dead end, so even though it should all happen
-// in cache, the CPU time can be excessive.  (For JudySL or an equivalent
-// "infinitely deep" Judy array, consider a hybrid of a large, finite,
-// "circular" list and a restart-at-top when the list is backtracked to
-// exhaustion.)
-//
-// Why search for *PIndex-1 instead of *PIndex during SM1Get?  In rare
-// instances this prevents an unnecessary decode down the wrong path followed
-// by a backtrack; its pretty cheap to set up initially; and it means the
-// SM1Get machine can simply return if/when it finds that Index.
-//
-// TBD:  Wed like to enhance this function to make successive searches faster.
-// This would require saving some previous state, including the previous Index
-// returned, and in which leaf it was found.  If the next call is for the same
-// Index and the array has not been modified, start at the same leaf.  This
-// should be much easier to implement since this is iterative rather than
-// recursive code.
-//
-// VARIATIONS FOR Judy*Next():
-//
-// The Judy*Next() code is nearly a perfect mirror of the Judy*Prev() code.
-// See the Judy*Prev() overview comments, and mentally switch the following:
-//
-// - "*PIndex-1"  => "*PIndex+1"
-// - "less than"  => "greater than"
-// - "lower"      => "higher"
-// - "lowest"     => "highest"
-// - "next-left"  => "next-right"
-// - "right-most" => "left-most"
-//
-// Note:  SM3Findlimit could be called SM3Findmax/SM3Findmin, but a common name
-// for both Prev and Next means many fewer ifdefs in this code.
-//
-// TBD:  Currently this code traverses a JP whether its expanse is partially or
-// completely full (populated).  For Judy1 (only), since there is no value area
-// needed, consider shortcutting to a "success" return upon encountering a full
-// JP in SM1Get (or even SM3Findlimit?)  A full JP looks like this:
-//
-//	(((JU_JPDCDPOP0(Pjp) ^ cJU_ALLONES) & cJU_POP0MASK(cLevel)) == 0)
-
-#ifdef JUDY1
-#ifdef JUDYPREV
-FUNCTION int Judy1Prev
-#else
-FUNCTION int Judy1Next
-#endif
-#else
-#ifdef JUDYPREV
-FUNCTION PPvoid_t JudyLPrev
-#else
-FUNCTION PPvoid_t JudyLNext
-#endif
-#endif
-        (
-	Pcvoid_t  PArray,	// Judy array to search.
-	Word_t *  PIndex,	// starting point and result.
-	PJError_t PJError	// optional, for returning error info.
-        )
-{
-	Pjp_t	  Pjp, Pjp2;	// current JPs.
-	Pjbl_t	  Pjbl;		// Pjp->jp_Addr masked and cast to types:
-	Pjbb_t	  Pjbb;
-	Pjbu_t	  Pjbu;
-
-// Note:  The following initialization is not strictly required but it makes
-// gcc -Wall happy because there is an "impossible" path from Immed handling to
-// SM1LeafLImm code that looks like Pjll might be used before set:
-
-	Pjll_t	  Pjll = (Pjll_t) NULL;
-	Word_t	  state;	// current state in SM.
-	Word_t	  digit;	// next digit to decode from Index.
-
-// Note:  The following initialization is not strictly required but it makes
-// gcc -Wall happy because there is an "impossible" path from Immed handling to
-// SM1LeafLImm code (for JudyL & JudyPrev only) that looks like pop1 might be
-// used before set:
-
-#if (defined(JUDYL) && defined(JUDYPREV))
-	Word_t	  pop1 = 0;	// in a leaf.
-#else
-	Word_t	  pop1;		// in a leaf.
-#endif
-	int	  offset;	// linear branch/leaf, from j__udySearchLeaf*().
-	int	  subexp;	// subexpanse in a bitmap branch.
-	Word_t	  bitposmask;	// bit in bitmap for Index.
-
-// History for SM2Backtrack:
-//
-// For a given histnum, APjphist[histnum] is a parent JP that points to a
-// branch, and Aoffhist[histnum] is the offset of the NEXT JP in the branch to
-// which the parent JP points.  The meaning of Aoffhist[histnum] depends on the
-// type of branch to which the parent JP points:
-//
-// Linear:  Offset of the next JP in the JP list.
-//
-// Bitmap:  Which subexpanse, plus the offset of the next JP in the
-// subexpanses JP list (to avoid bit-counting again), plus for Judy*Next(),
-// hidden one byte to the left, which digit, because Judy*Next() also needs
-// this.
-//
-// Uncompressed:  Digit, which is actually the offset of the JP in the branch.
-//
-// Note:  Only branch JPs are stored in APjphist[] because, as explained
-// earlier, SM1Get shortcuts sideways searches in leaves (and even in branches
-// in some cases), so SM2Backtrack only handles branches.
-
-#define	HISTNUMMAX cJU_ROOTSTATE	// maximum branches traversable.
-	Pjp_t	APjphist[HISTNUMMAX];	// list of branch JPs traversed.
-	int	Aoffhist[HISTNUMMAX];	// list of next JP offsets; see above.
-	int	histnum = 0;		// number of JPs now in list.
-
-
-// ----------------------------------------------------------------------------
-// M A C R O S
-//
-// These are intended to make the code a bit more readable and less redundant.
-
-
-// "PUSH" AND "POP" Pjp AND offset ON HISTORY STACKS:
-//
-// Note:  Ensure a corrupt Judy array does not overflow *hist[].  Meanwhile,
-// underflowing *hist[] simply means theres no more room to backtrack =>
-// "no previous/next Index".
-
-#define	HISTPUSH(Pjp,Offset)			\
-	APjphist[histnum] = (Pjp);		\
-	Aoffhist[histnum] = (Offset);		\
-						\
-	if (++histnum >= HISTNUMMAX)		\
-	{					\
-	    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT) \
-	    JUDY1CODE(return(JERRI );)		\
-	    JUDYLCODE(return(PPJERR);)		\
-	}
-
-#define	HISTPOP(Pjp,Offset)			\
-	if ((histnum--) < 1) JU_RET_NOTFOUND;	\
-	(Pjp)	 = APjphist[histnum];		\
-	(Offset) = Aoffhist[histnum]
-
-// How to pack/unpack Aoffhist[] values for bitmap branches:
-
-#ifdef JUDYPREV
-
-#define	HISTPUSHBOFF(Subexp,Offset,Digit)	  \
-	(((Subexp) * cJU_BITSPERSUBEXPB) | (Offset))
-
-#define	HISTPOPBOFF(Subexp,Offset,Digit)	  \
-	(Subexp)  = (Offset) / cJU_BITSPERSUBEXPB; \
-	(Offset) %= cJU_BITSPERSUBEXPB
-#else
-
-#define	HISTPUSHBOFF(Subexp,Offset,Digit)	 \
-	 (((Digit) << cJU_BITSPERBYTE)		 \
-	| ((Subexp) * cJU_BITSPERSUBEXPB) | (Offset))
-
-#define	HISTPOPBOFF(Subexp,Offset,Digit)	 \
-	(Digit)   = (Offset) >> cJU_BITSPERBYTE; \
-	(Subexp)  = ((Offset) & JU_LEASTBYTESMASK(1)) / cJU_BITSPERSUBEXPB; \
-	(Offset) %= cJU_BITSPERSUBEXPB
-#endif
-
-
-// CHECK FOR NULL JP:
-
-#define	JPNULL(Type)  (((Type) >= cJU_JPNULL1) && ((Type) <= cJU_JPNULLMAX))
-
-
-// SEARCH A BITMAP:
-//
-// This is a weak analog of j__udySearchLeaf*() for bitmaps.  Return the actual
-// or next-left position, base 0, of Digit in the single uint32_t bitmap, also
-// given a Bitposmask for Digit.
-//
-// Unlike j__udySearchLeaf*(), the offset is not returned bit-complemented if
-// Digits bit is unset, because the caller can check the bitmap themselves to
-// determine that.  Also, if Digits bit is unset, the returned offset is to
-// the next-left JP (including -1), not to the "ideal" position for the Index =
-// next-right JP.
-//
-// Shortcut and skip calling j__udyCountBits*() if the bitmap is full, in which
-// case (Digit % cJU_BITSPERSUBEXP*) itself is the base-0 offset.
-//
-// TBD for Judy*Next():  Should this return next-right instead of next-left?
-// That is, +1 from current value?  Maybe not, if Digits bit IS set, +1 would
-// be wrong.
-
-#define	SEARCHBITMAPB(Bitmap,Digit,Bitposmask)				\
-	(((Bitmap) == cJU_FULLBITMAPB) ? (Digit % cJU_BITSPERSUBEXPB) :	\
-	 j__udyCountBitsB((Bitmap) & JU_MASKLOWERINC(Bitposmask)) - 1)
-
-#define	SEARCHBITMAPL(Bitmap,Digit,Bitposmask)				\
-	(((Bitmap) == cJU_FULLBITMAPL) ? (Digit % cJU_BITSPERSUBEXPL) :	\
-	 j__udyCountBitsL((Bitmap) & JU_MASKLOWERINC(Bitposmask)) - 1)
-
-#ifdef JUDYPREV
-// Equivalent to search for the highest offset in Bitmap:
-
-#define	SEARCHBITMAPMAXB(Bitmap)				  \
-	(((Bitmap) == cJU_FULLBITMAPB) ? cJU_BITSPERSUBEXPB - 1 : \
-	 j__udyCountBitsB(Bitmap) - 1)
-
-#define	SEARCHBITMAPMAXL(Bitmap)				  \
-	(((Bitmap) == cJU_FULLBITMAPL) ? cJU_BITSPERSUBEXPL - 1 : \
-	 j__udyCountBitsL(Bitmap) - 1)
-#endif
-
-
-// CHECK DECODE BYTES:
-//
-// Check Decode bytes in a JP against the equivalent portion of *PIndex.  If
-// *PIndex is lower (for Judy*Prev()) or higher (for Judy*Next()), this JP is a
-// dead end (the same as if it had been absent in a linear or bitmap branch or
-// null in an uncompressed branch), enter SM2Backtrack; otherwise enter
-// SM3Findlimit to find the highest/lowest Index under this JP, as if the code
-// had already backtracked to this JP.
-
-#ifdef JUDYPREV
-#define	CDcmp__ <
-#else
-#define	CDcmp__ >
-#endif
-
-#define	CHECKDCD(cState)						\
-	if (JU_DCDNOTMATCHINDEX(*PIndex, Pjp, cState))	                \
-	{								\
-	    if ((*PIndex		& cJU_DCDMASK(cState))		\
-	      CDcmp__(JU_JPDCDPOP0(Pjp) & cJU_DCDMASK(cState)))		\
-	    {								\
-		goto SM2Backtrack;					\
-	    }								\
-	    goto SM3Findlimit;						\
-	}
-
-
-// PREPARE TO HANDLE A LEAFW OR JRP BRANCH IN SM1:
-//
-// Extract a state-dependent digit from Index in a "constant" way, then jump to
-// common code for multiple cases.
-
-#define	SM1PREPB(cState,Next)				\
-	state = (cState);				\
-	digit = JU_DIGITATSTATE(*PIndex, cState);	\
-	goto Next
-
-
-// PREPARE TO HANDLE A LEAFW OR JRP BRANCH IN SM3:
-//
-// Optionally save Dcd bytes into *PIndex, then save state and jump to common
-// code for multiple cases.
-
-#define	SM3PREPB_DCD(cState,Next)			\
-	JU_SETDCD(*PIndex, Pjp, cState);	        \
-	SM3PREPB(cState,Next)
-
-#define	SM3PREPB(cState,Next)  state = (cState); goto Next
-
-
-// ----------------------------------------------------------------------------
-// CHECK FOR SHORTCUTS:
-//
-// Error out if PIndex is null.  Execute JU_RET_NOTFOUND if the Judy array is
-// empty or *PIndex is already the minimum/maximum Index possible.
-//
-// Note:  As documented, in case of failure *PIndex may be modified.
-
-	if (PIndex == (PWord_t) NULL)
-	{
-	    JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);
-	    JUDY1CODE(return(JERRI );)
-	    JUDYLCODE(return(PPJERR);)
-	}
-
-#ifdef JUDYPREV
-	if ((PArray == (Pvoid_t) NULL) || ((*PIndex)-- == 0))
-#else
-	if ((PArray == (Pvoid_t) NULL) || ((*PIndex)++ == cJU_ALLONES))
-#endif
-	    JU_RET_NOTFOUND;
-
-
-// HANDLE JRP:
-//
-// Before even entering SM1Get, check the JRP type.  For JRP branches, traverse
-// the JPM; handle LEAFW leaves directly; but look for the most common cases
-// first.
-
-// ROOT-STATE LEAF that starts with a Pop0 word; just look within the leaf:
-//
-// If *PIndex is in the leaf, return it; otherwise return the Index, if any,
-// below where it would belong.
-
-	if (JU_LEAFW_POP0(PArray) < cJU_LEAFW_MAXPOP1) // must be a LEAFW
-	{
-	    Pjlw_t Pjlw = P_JLW(PArray);	// first word of leaf.
-	    pop1 = Pjlw[0] + 1;
-
-	    if ((offset = j__udySearchLeafW(Pjlw + 1, pop1, *PIndex))
-		>= 0)				// Index is present.
-	    {
-		assert(offset < pop1);			  // in expected range.
-		JU_RET_FOUND_LEAFW(Pjlw, pop1, offset); // *PIndex is set.
-	    }
-
-#ifdef JUDYPREV
-	    if ((offset = ~offset) == 0)	// no next-left Index.
-#else
-	    if ((offset = ~offset) >= pop1)	// no next-right Index.
-#endif
-		JU_RET_NOTFOUND;
-
-	    assert(offset <= pop1);		// valid result.
-
-#ifdef JUDYPREV
-	    *PIndex = Pjlw[offset--];		// next-left Index, base 1.
-#else
-	    *PIndex = Pjlw[offset + 1];		// next-right Index, base 1.
-#endif
-	    JU_RET_FOUND_LEAFW(Pjlw, pop1, offset);	// base 0.
-
-	}
-	else	// JRP BRANCH
-	{
-	    Pjpm_t Pjpm = P_JPM(PArray);
-	    Pjp = &(Pjpm->jpm_JP);
-
-//	    goto SM1Get;
-	}
-
-// ============================================================================
-// STATE MACHINE 1 -- GET INDEX:
-//
-// Search for *PIndex (already decremented/incremented so as to be inclusive).
-// If found, return it.  Otherwise in theory hand off to SM2Backtrack or
-// SM3Findlimit, but in practice "shortcut" by first sideways searching the
-// current branch or leaf upon hitting a dead end.  During sideways search,
-// modify *PIndex to a new path taken.
-//
-// ENTRY:  Pjp points to next JP to interpret, whose Decode bytes have not yet
-// been checked.  This JP is not yet listed in history.
-//
-// Note:  Check Decode bytes at the start of each loop, not after looking up a
-// new JP, so its easy to do constant shifts/masks, although this requires
-// cautious handling of Pjp, offset, and *hist[] for correct entry to
-// SM2Backtrack.
-//
-// EXIT:  Return, or branch to SM2Backtrack or SM3Findlimit with correct
-// interface, as described elsewhere.
-//
-// WARNING:  For run-time efficiency the following cases replicate code with
-// varying constants, rather than using common code with variable values!
-
-SM1Get:				// return here for next branch/leaf.
-
-	switch (JU_JPTYPE(Pjp))
-	{
-
-
-// ----------------------------------------------------------------------------
-// LINEAR BRANCH:
-//
-// Check Decode bytes, if any, in the current JP, then search for a JP for the
-// next digit in *PIndex.
-
-	case cJU_JPBRANCH_L2: CHECKDCD(2); SM1PREPB(2, SM1BranchL);
-	case cJU_JPBRANCH_L3: CHECKDCD(3); SM1PREPB(3, SM1BranchL);
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_L4: CHECKDCD(4); SM1PREPB(4, SM1BranchL);
-	case cJU_JPBRANCH_L5: CHECKDCD(5); SM1PREPB(5, SM1BranchL);
-	case cJU_JPBRANCH_L6: CHECKDCD(6); SM1PREPB(6, SM1BranchL);
-	case cJU_JPBRANCH_L7: CHECKDCD(7); SM1PREPB(7, SM1BranchL);
-#endif
-	case cJU_JPBRANCH_L:		   SM1PREPB(cJU_ROOTSTATE, SM1BranchL);
-
-// Common code (state-independent) for all cases of linear branches:
-
-SM1BranchL:
-	    Pjbl = P_JBL(Pjp->jp_Addr);
-
-// Found JP matching current digit in *PIndex; record parent JP and the next
-// JPs offset, and iterate to the next JP:
-
-	    if ((offset = j__udySearchLeaf1((Pjll_t) (Pjbl->jbl_Expanse),
-					     Pjbl->jbl_NumJPs, digit)) >= 0)
-	    {
-		HISTPUSH(Pjp, offset);
-		Pjp = (Pjbl->jbl_jp) + offset;
-		goto SM1Get;
-	    }
-
-// Dead end, no JP in BranchL for next digit in *PIndex:
-//
-// Get the ideal location of digits JP, and if theres no next-left/right JP
-// in the BranchL, shortcut and start backtracking one level up; ignore the
-// current Pjp because it points to a BranchL with no next-left/right JP.
-
-#ifdef JUDYPREV
-	    if ((offset = (~offset) - 1) < 0)	// no next-left JP in BranchL.
-#else
-	    if ((offset = (~offset)) >= Pjbl->jbl_NumJPs)  // no next-right.
-#endif
-		goto SM2Backtrack;
-
-// Theres a next-left/right JP in the current BranchL; save its digit in
-// *PIndex and shortcut to SM3Findlimit:
-
-	    JU_SETDIGIT(*PIndex, Pjbl->jbl_Expanse[offset], state);
-	    Pjp = (Pjbl->jbl_jp) + offset;
-	    goto SM3Findlimit;
-
-
-// ----------------------------------------------------------------------------
-// BITMAP BRANCH:
-//
-// Check Decode bytes, if any, in the current JP, then look for a JP for the
-// next digit in *PIndex.
-
-	case cJU_JPBRANCH_B2: CHECKDCD(2); SM1PREPB(2, SM1BranchB);
-	case cJU_JPBRANCH_B3: CHECKDCD(3); SM1PREPB(3, SM1BranchB);
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_B4: CHECKDCD(4); SM1PREPB(4, SM1BranchB);
-	case cJU_JPBRANCH_B5: CHECKDCD(5); SM1PREPB(5, SM1BranchB);
-	case cJU_JPBRANCH_B6: CHECKDCD(6); SM1PREPB(6, SM1BranchB);
-	case cJU_JPBRANCH_B7: CHECKDCD(7); SM1PREPB(7, SM1BranchB);
-#endif
-	case cJU_JPBRANCH_B:		   SM1PREPB(cJU_ROOTSTATE, SM1BranchB);
-
-// Common code (state-independent) for all cases of bitmap branches:
-
-SM1BranchB:
-	    Pjbb = P_JBB(Pjp->jp_Addr);
-
-// Locate the digits JP in the subexpanse list, if present, otherwise the
-// offset of the next-left JP, if any:
-
-	    subexp     = digit / cJU_BITSPERSUBEXPB;
-	    assert(subexp < cJU_NUMSUBEXPB);	// falls in expected range.
-	    bitposmask = JU_BITPOSMASKB(digit);
-	    offset     = SEARCHBITMAPB(JU_JBB_BITMAP(Pjbb, subexp), digit,
-				       bitposmask);
-	    // right range:
-	    assert((offset >= -1) && (offset < (int) cJU_BITSPERSUBEXPB));
-
-// Found JP matching current digit in *PIndex:
-//
-// Record the parent JP and the next JPs offset; and iterate to the next JP.
-
-//	    if (JU_BITMAPTESTB(Pjbb, digit))			// slower.
-	    if (JU_JBB_BITMAP(Pjbb, subexp) & bitposmask)	// faster.
-	    {
-		// not negative since at least one bit is set:
-		assert(offset >= 0);
-
-		HISTPUSH(Pjp, HISTPUSHBOFF(subexp, offset, digit));
-
-		if ((Pjp = P_JP(JU_JBB_PJP(Pjbb, subexp))) == (Pjp_t) NULL)
-		{
-		    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-		    JUDY1CODE(return(JERRI );)
-		    JUDYLCODE(return(PPJERR);)
-		}
-
-		Pjp += offset;
-		goto SM1Get;		// iterate to next JP.
-	    }
-
-// Dead end, no JP in BranchB for next digit in *PIndex:
-//
-// If theres a next-left/right JP in the current BranchB, shortcut to
-// SM3Findlimit.  Note:  offset is already set to the correct value for the
-// next-left/right JP.
-
-#ifdef JUDYPREV
-	    if (offset >= 0)		// next-left JP is in this subexpanse.
-		goto SM1BranchBFindlimit;
-
-	    while (--subexp >= 0)		// search next-left subexpanses.
-#else
-	    if (JU_JBB_BITMAP(Pjbb, subexp) & JU_MASKHIGHEREXC(bitposmask))
-	    {
-		++offset;			// next-left => next-right.
-		goto SM1BranchBFindlimit;
-	    }
-
-	    while (++subexp < cJU_NUMSUBEXPB)	// search next-right subexps.
-#endif
-	    {
-		if (! JU_JBB_PJP(Pjbb, subexp)) continue;  // empty subexpanse.
-
-#ifdef JUDYPREV
-		offset = SEARCHBITMAPMAXB(JU_JBB_BITMAP(Pjbb, subexp));
-		// expected range:
-		assert((offset >= 0) && (offset < cJU_BITSPERSUBEXPB));
-#else
-		offset = 0;
-#endif
-
-// Save the next-left/right JPs digit in *PIndex:
-
-SM1BranchBFindlimit:
-		JU_BITMAPDIGITB(digit, subexp, JU_JBB_BITMAP(Pjbb, subexp),
-				offset);
-		JU_SETDIGIT(*PIndex, digit, state);
-
-		if ((Pjp = P_JP(JU_JBB_PJP(Pjbb, subexp))) == (Pjp_t) NULL)
-		{
-		    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-		    JUDY1CODE(return(JERRI );)
-		    JUDYLCODE(return(PPJERR);)
-		}
-
-		Pjp += offset;
-		goto SM3Findlimit;
-	    }
-
-// Theres no next-left/right JP in the BranchB:
-//
-// Shortcut and start backtracking one level up; ignore the current Pjp because
-// it points to a BranchB with no next-left/right JP.
-
-	    goto SM2Backtrack;
-
-
-// ----------------------------------------------------------------------------
-// UNCOMPRESSED BRANCH:
-//
-// Check Decode bytes, if any, in the current JP, then look for a JP for the
-// next digit in *PIndex.
-
-	case cJU_JPBRANCH_U2: CHECKDCD(2); SM1PREPB(2, SM1BranchU);
-	case cJU_JPBRANCH_U3: CHECKDCD(3); SM1PREPB(3, SM1BranchU);
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_U4: CHECKDCD(4); SM1PREPB(4, SM1BranchU);
-	case cJU_JPBRANCH_U5: CHECKDCD(5); SM1PREPB(5, SM1BranchU);
-	case cJU_JPBRANCH_U6: CHECKDCD(6); SM1PREPB(6, SM1BranchU);
-	case cJU_JPBRANCH_U7: CHECKDCD(7); SM1PREPB(7, SM1BranchU);
-#endif
-	case cJU_JPBRANCH_U:		   SM1PREPB(cJU_ROOTSTATE, SM1BranchU);
-
-// Common code (state-independent) for all cases of uncompressed branches:
-
-SM1BranchU:
-	    Pjbu = P_JBU(Pjp->jp_Addr);
-	    Pjp2 = (Pjbu->jbu_jp) + digit;
-
-// Found JP matching current digit in *PIndex:
-//
-// Record the parent JP and the next JPs digit, and iterate to the next JP.
-//
-// TBD:  Instead of this, just goto SM1Get, and add cJU_JPNULL* cases to the
-// SM1Get state machine?  Then backtrack?  However, it means you cant detect
-// an inappropriate cJU_JPNULL*, when it occurs in other than a BranchU, and
-// return JU_RET_CORRUPT.
-
-	    if (! JPNULL(JU_JPTYPE(Pjp2)))	// digit has a JP.
-	    {
-		HISTPUSH(Pjp, digit);
-		Pjp = Pjp2;
-		goto SM1Get;
-	    }
-
-// Dead end, no JP in BranchU for next digit in *PIndex:
-//
-// Search for a next-left/right JP in the current BranchU, and if one is found,
-// save its digit in *PIndex and shortcut to SM3Findlimit:
-
-#ifdef JUDYPREV
-	    while (digit >= 1)
-	    {
-		Pjp = (Pjbu->jbu_jp) + (--digit);
-#else
-	    while (digit < cJU_BRANCHUNUMJPS - 1)
-	    {
-		Pjp = (Pjbu->jbu_jp) + (++digit);
-#endif
-		if (JPNULL(JU_JPTYPE(Pjp))) continue;
-
-		JU_SETDIGIT(*PIndex, digit, state);
-		goto SM3Findlimit;
-	    }
-
-// Theres no next-left/right JP in the BranchU:
-//
-// Shortcut and start backtracking one level up; ignore the current Pjp because
-// it points to a BranchU with no next-left/right JP.
-
-	    goto SM2Backtrack;
-
-
-// ----------------------------------------------------------------------------
-// LINEAR LEAF:
-//
-// Check Decode bytes, if any, in the current JP, then search the leaf for
-// *PIndex.
-
-#define	SM1LEAFL(Func)					\
-	Pjll   = P_JLL(Pjp->jp_Addr);			\
-	pop1   = JU_JPLEAF_POP0(Pjp) + 1;	        \
-	offset = Func(Pjll, pop1, *PIndex);		\
-	goto SM1LeafLImm
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-	case cJU_JPLEAF1:  CHECKDCD(1); SM1LEAFL(j__udySearchLeaf1);
-#endif
-	case cJU_JPLEAF2:  CHECKDCD(2); SM1LEAFL(j__udySearchLeaf2);
-	case cJU_JPLEAF3:  CHECKDCD(3); SM1LEAFL(j__udySearchLeaf3);
-
-#ifdef JU_64BIT
-	case cJU_JPLEAF4:  CHECKDCD(4); SM1LEAFL(j__udySearchLeaf4);
-	case cJU_JPLEAF5:  CHECKDCD(5); SM1LEAFL(j__udySearchLeaf5);
-	case cJU_JPLEAF6:  CHECKDCD(6); SM1LEAFL(j__udySearchLeaf6);
-	case cJU_JPLEAF7:  CHECKDCD(7); SM1LEAFL(j__udySearchLeaf7);
-#endif
-
-// Common code (state-independent) for all cases of linear leaves and
-// immediates:
-
-SM1LeafLImm:
-	    if (offset >= 0)		// *PIndex is in LeafL / Immed.
-#ifdef JUDY1
-		JU_RET_FOUND;
-#else
-	    {				// JudyL is trickier...
-		switch (JU_JPTYPE(Pjp))
-		{
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-		case cJU_JPLEAF1: JU_RET_FOUND_LEAF1(Pjll, pop1, offset);
-#endif
-		case cJU_JPLEAF2: JU_RET_FOUND_LEAF2(Pjll, pop1, offset);
-		case cJU_JPLEAF3: JU_RET_FOUND_LEAF3(Pjll, pop1, offset);
-#ifdef JU_64BIT
-		case cJU_JPLEAF4: JU_RET_FOUND_LEAF4(Pjll, pop1, offset);
-		case cJU_JPLEAF5: JU_RET_FOUND_LEAF5(Pjll, pop1, offset);
-		case cJU_JPLEAF6: JU_RET_FOUND_LEAF6(Pjll, pop1, offset);
-		case cJU_JPLEAF7: JU_RET_FOUND_LEAF7(Pjll, pop1, offset);
-#endif
-
-		case cJU_JPIMMED_1_01:
-		case cJU_JPIMMED_2_01:
-		case cJU_JPIMMED_3_01:
-#ifdef JU_64BIT
-		case cJU_JPIMMED_4_01:
-		case cJU_JPIMMED_5_01:
-		case cJU_JPIMMED_6_01:
-		case cJU_JPIMMED_7_01:
-#endif
-		    JU_RET_FOUND_IMM_01(Pjp);
-
-		case cJU_JPIMMED_1_02:
-		case cJU_JPIMMED_1_03:
-#ifdef JU_64BIT
-		case cJU_JPIMMED_1_04:
-		case cJU_JPIMMED_1_05:
-		case cJU_JPIMMED_1_06:
-		case cJU_JPIMMED_1_07:
-		case cJU_JPIMMED_2_02:
-		case cJU_JPIMMED_2_03:
-		case cJU_JPIMMED_3_02:
-#endif
-		    JU_RET_FOUND_IMM(Pjp, offset);
-		}
-
-		JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);  // impossible?
-		JUDY1CODE(return(JERRI );)
-		JUDYLCODE(return(PPJERR);)
-
-	    } // found *PIndex
-
-#endif // JUDYL
-
-// Dead end, no Index in LeafL / Immed for remaining digit(s) in *PIndex:
-//
-// Get the ideal location of Index, and if theres no next-left/right Index in
-// the LeafL / Immed, shortcut and start backtracking one level up; ignore the
-// current Pjp because it points to a LeafL / Immed with no next-left/right
-// Index.
-
-#ifdef JUDYPREV
-	    if ((offset = (~offset) - 1) < 0)	// no next-left Index.
-#else
-	    if ((offset = (~offset)) >= pop1)	// no next-right Index.
-#endif
-		goto SM2Backtrack;
-
-// Theres a next-left/right Index in the current LeafL / Immed; shortcut by
-// copying its digit(s) to *PIndex and returning it.
-//
-// Unfortunately this is pretty hairy, especially avoiding endian issues.
-//
-// The cJU_JPLEAF* cases are very similar to same-index-size cJU_JPIMMED* cases
-// for *_02 and above, but must return differently, at least for JudyL, so
-// spell them out separately here at the cost of a little redundant code for
-// Judy1.
-
-	    switch (JU_JPTYPE(Pjp))
-	    {
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-	    case cJU_JPLEAF1:
-
-		JU_SETDIGIT1(*PIndex, ((uint8_t *) Pjll)[offset]);
-		JU_RET_FOUND_LEAF1(Pjll, pop1, offset);
-#endif
-
-	    case cJU_JPLEAF2:
-
-		*PIndex = (*PIndex & (~JU_LEASTBYTESMASK(2)))
-			| ((uint16_t *) Pjll)[offset];
-		JU_RET_FOUND_LEAF2(Pjll, pop1, offset);
-
-	    case cJU_JPLEAF3:
-	    {
-		Word_t lsb;
-		JU_COPY3_PINDEX_TO_LONG(lsb, ((uint8_t *) Pjll) + (3 * offset));
-		*PIndex = (*PIndex & (~JU_LEASTBYTESMASK(3))) | lsb;
-		JU_RET_FOUND_LEAF3(Pjll, pop1, offset);
-	    }
-
-#ifdef JU_64BIT
-	    case cJU_JPLEAF4:
-
-		*PIndex = (*PIndex & (~JU_LEASTBYTESMASK(4)))
-			| ((uint32_t *) Pjll)[offset];
-		JU_RET_FOUND_LEAF4(Pjll, pop1, offset);
-
-	    case cJU_JPLEAF5:
-	    {
-		Word_t lsb;
-		JU_COPY5_PINDEX_TO_LONG(lsb, ((uint8_t *) Pjll) + (5 * offset));
-		*PIndex = (*PIndex & (~JU_LEASTBYTESMASK(5))) | lsb;
-		JU_RET_FOUND_LEAF5(Pjll, pop1, offset);
-	    }
-
-	    case cJU_JPLEAF6:
-	    {
-		Word_t lsb;
-		JU_COPY6_PINDEX_TO_LONG(lsb, ((uint8_t *) Pjll) + (6 * offset));
-		*PIndex = (*PIndex & (~JU_LEASTBYTESMASK(6))) | lsb;
-		JU_RET_FOUND_LEAF6(Pjll, pop1, offset);
-	    }
-
-	    case cJU_JPLEAF7:
-	    {
-		Word_t lsb;
-		JU_COPY7_PINDEX_TO_LONG(lsb, ((uint8_t *) Pjll) + (7 * offset));
-		*PIndex = (*PIndex & (~JU_LEASTBYTESMASK(7))) | lsb;
-		JU_RET_FOUND_LEAF7(Pjll, pop1, offset);
-	    }
-
-#endif // JU_64BIT
-
-#define	SET_01(cState)  JU_SETDIGITS(*PIndex, JU_JPDCDPOP0(Pjp), cState)
-
-	    case cJU_JPIMMED_1_01: SET_01(1); goto SM1Imm_01;
-	    case cJU_JPIMMED_2_01: SET_01(2); goto SM1Imm_01;
-	    case cJU_JPIMMED_3_01: SET_01(3); goto SM1Imm_01;
-#ifdef JU_64BIT
-	    case cJU_JPIMMED_4_01: SET_01(4); goto SM1Imm_01;
-	    case cJU_JPIMMED_5_01: SET_01(5); goto SM1Imm_01;
-	    case cJU_JPIMMED_6_01: SET_01(6); goto SM1Imm_01;
-	    case cJU_JPIMMED_7_01: SET_01(7); goto SM1Imm_01;
-#endif
-SM1Imm_01:	JU_RET_FOUND_IMM_01(Pjp);
-
-// Shorthand for where to find start of Index bytes array:
-
-#ifdef JUDY1
-#define	PJI (Pjp->jp_1Index)
-#else
-#define	PJI (Pjp->jp_LIndex)
-#endif
-
-	    case cJU_JPIMMED_1_02:
-	    case cJU_JPIMMED_1_03:
-#if (defined(JUDY1) || defined(JU_64BIT))
-	    case cJU_JPIMMED_1_04:
-	    case cJU_JPIMMED_1_05:
-	    case cJU_JPIMMED_1_06:
-	    case cJU_JPIMMED_1_07:
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	    case cJ1_JPIMMED_1_08:
-	    case cJ1_JPIMMED_1_09:
-	    case cJ1_JPIMMED_1_10:
-	    case cJ1_JPIMMED_1_11:
-	    case cJ1_JPIMMED_1_12:
-	    case cJ1_JPIMMED_1_13:
-	    case cJ1_JPIMMED_1_14:
-	    case cJ1_JPIMMED_1_15:
-#endif
-		JU_SETDIGIT1(*PIndex, ((uint8_t *) PJI)[offset]);
-		JU_RET_FOUND_IMM(Pjp, offset);
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	    case cJU_JPIMMED_2_02:
-	    case cJU_JPIMMED_2_03:
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	    case cJ1_JPIMMED_2_04:
-	    case cJ1_JPIMMED_2_05:
-	    case cJ1_JPIMMED_2_06:
-	    case cJ1_JPIMMED_2_07:
-#endif
-#if (defined(JUDY1) || defined(JU_64BIT))
-		*PIndex = (*PIndex & (~JU_LEASTBYTESMASK(2)))
-			| ((uint16_t *) PJI)[offset];
-		JU_RET_FOUND_IMM(Pjp, offset);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	    case cJU_JPIMMED_3_02:
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	    case cJ1_JPIMMED_3_03:
-	    case cJ1_JPIMMED_3_04:
-	    case cJ1_JPIMMED_3_05:
-#endif
-#if (defined(JUDY1) || defined(JU_64BIT))
-	    {
-		Word_t lsb;
-		JU_COPY3_PINDEX_TO_LONG(lsb, ((uint8_t *) PJI) + (3 * offset));
-		*PIndex = (*PIndex & (~JU_LEASTBYTESMASK(3))) | lsb;
-		JU_RET_FOUND_IMM(Pjp, offset);
-	    }
-#endif
-
-#if (defined(JUDY1) && defined(JU_64BIT))
-	    case cJ1_JPIMMED_4_02:
-	    case cJ1_JPIMMED_4_03:
-
-		*PIndex = (*PIndex & (~JU_LEASTBYTESMASK(4)))
-			| ((uint32_t *) PJI)[offset];
-		JU_RET_FOUND_IMM(Pjp, offset);
-
-	    case cJ1_JPIMMED_5_02:
-	    case cJ1_JPIMMED_5_03:
-	    {
-		Word_t lsb;
-		JU_COPY5_PINDEX_TO_LONG(lsb, ((uint8_t *) PJI) + (5 * offset));
-		*PIndex = (*PIndex & (~JU_LEASTBYTESMASK(5))) | lsb;
-		JU_RET_FOUND_IMM(Pjp, offset);
-	    }
-
-	    case cJ1_JPIMMED_6_02:
-	    {
-		Word_t lsb;
-		JU_COPY6_PINDEX_TO_LONG(lsb, ((uint8_t *) PJI) + (6 * offset));
-		*PIndex = (*PIndex & (~JU_LEASTBYTESMASK(6))) | lsb;
-		JU_RET_FOUND_IMM(Pjp, offset);
-	    }
-
-	    case cJ1_JPIMMED_7_02:
-	    {
-		Word_t lsb;
-		JU_COPY7_PINDEX_TO_LONG(lsb, ((uint8_t *) PJI) + (7 * offset));
-		*PIndex = (*PIndex & (~JU_LEASTBYTESMASK(7))) | lsb;
-		JU_RET_FOUND_IMM(Pjp, offset);
-	    }
-
-#endif // (JUDY1 && JU_64BIT)
-
-	    } // switch for not-found *PIndex
-
-	    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);	// impossible?
-	    JUDY1CODE(return(JERRI );)
-	    JUDYLCODE(return(PPJERR);)
-
-
-// ----------------------------------------------------------------------------
-// BITMAP LEAF:
-//
-// Check Decode bytes, if any, in the current JP, then look in the leaf for
-// *PIndex.
-
-	case cJU_JPLEAF_B1:
-	{
-	    Pjlb_t Pjlb;
-	    CHECKDCD(1);
-
-	    Pjlb	= P_JLB(Pjp->jp_Addr);
-	    digit       = JU_DIGITATSTATE(*PIndex, 1);
-	    subexp      = JU_SUBEXPL(digit);
-	    bitposmask  = JU_BITPOSMASKL(digit);
-	    assert(subexp < cJU_NUMSUBEXPL);	// falls in expected range.
-
-// *PIndex exists in LeafB1:
-
-//	    if (JU_BITMAPTESTL(Pjlb, digit))			// slower.
-	    if (JU_JLB_BITMAP(Pjlb, subexp) & bitposmask)	// faster.
-	    {
-#ifdef JUDYL				// needs offset at this point:
-		offset = SEARCHBITMAPL(JU_JLB_BITMAP(Pjlb, subexp), digit, bitposmask);
-#endif
-		JU_RET_FOUND_LEAF_B1(Pjlb, subexp, offset);
-//	== return((PPvoid_t) (P_JV(JL_JLB_PVALUE(Pjlb, subexp)) + (offset)));
-	    }
-
-// Dead end, no Index in LeafB1 for remaining digit in *PIndex:
-//
-// If theres a next-left/right Index in the current LeafB1, which for
-// Judy*Next() is true if any bits are set for higher Indexes, shortcut by
-// returning it.  Note:  For Judy*Prev(), offset is set here to the correct
-// value for the next-left JP.
-
-	    offset = SEARCHBITMAPL(JU_JLB_BITMAP(Pjlb, subexp), digit,
-				   bitposmask);
-	    // right range:
-	    assert((offset >= -1) && (offset < (int) cJU_BITSPERSUBEXPL));
-
-#ifdef JUDYPREV
-	    if (offset >= 0)		// next-left JP is in this subexpanse.
-		goto SM1LeafB1Findlimit;
-
-	    while (--subexp >= 0)		// search next-left subexpanses.
-#else
-	    if (JU_JLB_BITMAP(Pjlb, subexp) & JU_MASKHIGHEREXC(bitposmask))
-	    {
-		++offset;			// next-left => next-right.
-		goto SM1LeafB1Findlimit;
-	    }
-
-	    while (++subexp < cJU_NUMSUBEXPL)	// search next-right subexps.
-#endif
-	    {
-		if (! JU_JLB_BITMAP(Pjlb, subexp)) continue;  // empty subexp.
-
-#ifdef JUDYPREV
-		offset = SEARCHBITMAPMAXL(JU_JLB_BITMAP(Pjlb, subexp));
-		// expected range:
-		assert((offset >= 0) && (offset < (int) cJU_BITSPERSUBEXPL));
-#else
-		offset = 0;
-#endif
-
-// Save the next-left/right Indexess digit in *PIndex:
-
-SM1LeafB1Findlimit:
-		JU_BITMAPDIGITL(digit, subexp, JU_JLB_BITMAP(Pjlb, subexp), offset);
-		JU_SETDIGIT1(*PIndex, digit);
-		JU_RET_FOUND_LEAF_B1(Pjlb, subexp, offset);
-//	== return((PPvoid_t) (P_JV(JL_JLB_PVALUE(Pjlb, subexp)) + (offset)));
-	    }
-
-// Theres no next-left/right Index in the LeafB1:
-//
-// Shortcut and start backtracking one level up; ignore the current Pjp because
-// it points to a LeafB1 with no next-left/right Index.
-
-	    goto SM2Backtrack;
-
-	} // case cJU_JPLEAF_B1
-
-#ifdef JUDY1
-// ----------------------------------------------------------------------------
-// FULL POPULATION:
-//
-// If the Decode bytes match, *PIndex is found (without modification).
-
-	case cJ1_JPFULLPOPU1:
-
-	    CHECKDCD(1);
-	    JU_RET_FOUND_FULLPOPU1;
-#endif
-
-
-// ----------------------------------------------------------------------------
-// IMMEDIATE:
-
-#ifdef JUDYPREV
-#define	SM1IMM_SETPOP1(cPop1)
-#else
-#define SM1IMM_SETPOP1(cPop1)  pop1 = (cPop1)
-#endif
-
-#define	SM1IMM(Func,cPop1)				\
-	SM1IMM_SETPOP1(cPop1);				\
-	offset = Func((Pjll_t) (PJI), cPop1, *PIndex);	\
-	goto SM1LeafLImm
-
-// Special case for Pop1 = 1 Immediate JPs:
-//
-// If *PIndex is in the immediate, offset is 0, otherwise the binary NOT of the
-// offset where it belongs, 0 or 1, same as from the search functions.
-
-#ifdef JUDYPREV
-#define	SM1IMM_01_SETPOP1
-#else
-#define SM1IMM_01_SETPOP1  pop1 = 1
-#endif
-
-#define	SM1IMM_01							  \
-	SM1IMM_01_SETPOP1;						  \
-	offset = ((JU_JPDCDPOP0(Pjp) <  JU_TRIMTODCDSIZE(*PIndex)) ? ~1 : \
-		  (JU_JPDCDPOP0(Pjp) == JU_TRIMTODCDSIZE(*PIndex)) ?  0 : \
-								     ~0); \
-	goto SM1LeafLImm
-
-	case cJU_JPIMMED_1_01:
-	case cJU_JPIMMED_2_01:
-	case cJU_JPIMMED_3_01:
-#ifdef JU_64BIT
-	case cJU_JPIMMED_4_01:
-	case cJU_JPIMMED_5_01:
-	case cJU_JPIMMED_6_01:
-	case cJU_JPIMMED_7_01:
-#endif
-	    SM1IMM_01;
-
-// TBD:  Doug says it would be OK to have fewer calls and calculate arg 2, here
-// and in Judy*Count() also.
-
-	case cJU_JPIMMED_1_02:  SM1IMM(j__udySearchLeaf1,  2);
-	case cJU_JPIMMED_1_03:  SM1IMM(j__udySearchLeaf1,  3);
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_1_04:  SM1IMM(j__udySearchLeaf1,  4);
-	case cJU_JPIMMED_1_05:  SM1IMM(j__udySearchLeaf1,  5);
-	case cJU_JPIMMED_1_06:  SM1IMM(j__udySearchLeaf1,  6);
-	case cJU_JPIMMED_1_07:  SM1IMM(j__udySearchLeaf1,  7);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_1_08:  SM1IMM(j__udySearchLeaf1,  8);
-	case cJ1_JPIMMED_1_09:  SM1IMM(j__udySearchLeaf1,  9);
-	case cJ1_JPIMMED_1_10:  SM1IMM(j__udySearchLeaf1, 10);
-	case cJ1_JPIMMED_1_11:  SM1IMM(j__udySearchLeaf1, 11);
-	case cJ1_JPIMMED_1_12:  SM1IMM(j__udySearchLeaf1, 12);
-	case cJ1_JPIMMED_1_13:  SM1IMM(j__udySearchLeaf1, 13);
-	case cJ1_JPIMMED_1_14:  SM1IMM(j__udySearchLeaf1, 14);
-	case cJ1_JPIMMED_1_15:  SM1IMM(j__udySearchLeaf1, 15);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_2_02:  SM1IMM(j__udySearchLeaf2,  2);
-	case cJU_JPIMMED_2_03:  SM1IMM(j__udySearchLeaf2,  3);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_2_04:  SM1IMM(j__udySearchLeaf2,  4);
-	case cJ1_JPIMMED_2_05:  SM1IMM(j__udySearchLeaf2,  5);
-	case cJ1_JPIMMED_2_06:  SM1IMM(j__udySearchLeaf2,  6);
-	case cJ1_JPIMMED_2_07:  SM1IMM(j__udySearchLeaf2,  7);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_3_02:  SM1IMM(j__udySearchLeaf3,  2);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_3_03:  SM1IMM(j__udySearchLeaf3,  3);
-	case cJ1_JPIMMED_3_04:  SM1IMM(j__udySearchLeaf3,  4);
-	case cJ1_JPIMMED_3_05:  SM1IMM(j__udySearchLeaf3,  5);
-
-	case cJ1_JPIMMED_4_02:  SM1IMM(j__udySearchLeaf4,  2);
-	case cJ1_JPIMMED_4_03:  SM1IMM(j__udySearchLeaf4,  3);
-
-	case cJ1_JPIMMED_5_02:  SM1IMM(j__udySearchLeaf5,  2);
-	case cJ1_JPIMMED_5_03:  SM1IMM(j__udySearchLeaf5,  3);
-
-	case cJ1_JPIMMED_6_02:  SM1IMM(j__udySearchLeaf6,  2);
-
-	case cJ1_JPIMMED_7_02:  SM1IMM(j__udySearchLeaf7,  2);
-#endif
-
-
-// ----------------------------------------------------------------------------
-// INVALID JP TYPE:
-
-	default: JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-		 JUDY1CODE(return(JERRI );)
-		 JUDYLCODE(return(PPJERR);)
-
-	} // SM1Get switch.
-
-	/*NOTREACHED*/
-
-
-// ============================================================================
-// STATE MACHINE 2 -- BACKTRACK BRANCH TO PREVIOUS JP:
-//
-// Look for the next-left/right JP in a branch, backing up the history list as
-// necessary.  Upon finding a next-left/right JP, modify the corresponding
-// digit in *PIndex before passing control to SM3Findlimit.
-//
-// Note:  As described earlier, only branch JPs are expected here; other types
-// fall into the default case.
-//
-// Note:  If a found JP contains needed Dcd bytes, thats OK, theyre copied to
-// *PIndex in SM3Findlimit.
-//
-// TBD:  This code has a lot in common with similar code in the shortcut cases
-// in SM1Get.  Can combine this code somehow?
-//
-// ENTRY:  List, possibly empty, of JPs and offsets in APjphist[] and
-// Aoffhist[]; see earlier comments.
-//
-// EXIT:  Execute JU_RET_NOTFOUND if no previous/next JP; otherwise jump to
-// SM3Findlimit to resume a new but different downward search.
-
-SM2Backtrack:		// come or return here for first/next sideways search.
-
-	HISTPOP(Pjp, offset);
-
-	switch (JU_JPTYPE(Pjp))
-	{
-
-
-// ----------------------------------------------------------------------------
-// LINEAR BRANCH:
-
-	case cJU_JPBRANCH_L2: state = 2;	     goto SM2BranchL;
-	case cJU_JPBRANCH_L3: state = 3;	     goto SM2BranchL;
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_L4: state = 4;	     goto SM2BranchL;
-	case cJU_JPBRANCH_L5: state = 5;	     goto SM2BranchL;
-	case cJU_JPBRANCH_L6: state = 6;	     goto SM2BranchL;
-	case cJU_JPBRANCH_L7: state = 7;	     goto SM2BranchL;
-#endif
-	case cJU_JPBRANCH_L:  state = cJU_ROOTSTATE; goto SM2BranchL;
-
-SM2BranchL:
-#ifdef JUDYPREV
-	    if (--offset < 0) goto SM2Backtrack;  // no next-left JP in BranchL.
-#endif
-	    Pjbl = P_JBL(Pjp->jp_Addr);
-#ifdef JUDYNEXT
-	    if (++offset >= (Pjbl->jbl_NumJPs)) goto SM2Backtrack;
-						// no next-right JP in BranchL.
-#endif
-
-// Theres a next-left/right JP in the current BranchL; save its digit in
-// *PIndex and continue with SM3Findlimit:
-
-	    JU_SETDIGIT(*PIndex, Pjbl->jbl_Expanse[offset], state);
-	    Pjp = (Pjbl->jbl_jp) + offset;
-	    goto SM3Findlimit;
-
-
-// ----------------------------------------------------------------------------
-// BITMAP BRANCH:
-
-	case cJU_JPBRANCH_B2: state = 2;	     goto SM2BranchB;
-	case cJU_JPBRANCH_B3: state = 3;	     goto SM2BranchB;
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_B4: state = 4;	     goto SM2BranchB;
-	case cJU_JPBRANCH_B5: state = 5;	     goto SM2BranchB;
-	case cJU_JPBRANCH_B6: state = 6;	     goto SM2BranchB;
-	case cJU_JPBRANCH_B7: state = 7;	     goto SM2BranchB;
-#endif
-	case cJU_JPBRANCH_B:  state = cJU_ROOTSTATE; goto SM2BranchB;
-
-SM2BranchB:
-	    Pjbb = P_JBB(Pjp->jp_Addr);
-	    HISTPOPBOFF(subexp, offset, digit);		// unpack values.
-
-// If theres a next-left/right JP in the current BranchB, which for
-// Judy*Next() is true if any bits are set for higher Indexes, continue to
-// SM3Findlimit:
-//
-// Note:  offset is set to the JP previously traversed; go one to the
-// left/right.
-
-#ifdef JUDYPREV
-	    if (offset > 0)		// next-left JP is in this subexpanse.
-	    {
-		--offset;
-		goto SM2BranchBFindlimit;
-	    }
-
-	    while (--subexp >= 0)		// search next-left subexpanses.
-#else
-	    if (JU_JBB_BITMAP(Pjbb, subexp)
-	      & JU_MASKHIGHEREXC(JU_BITPOSMASKB(digit)))
-	    {
-		++offset;			// next-left => next-right.
-		goto SM2BranchBFindlimit;
-	    }
-
-	    while (++subexp < cJU_NUMSUBEXPB)	// search next-right subexps.
-#endif
-	    {
-		if (! JU_JBB_PJP(Pjbb, subexp)) continue;  // empty subexpanse.
-
-#ifdef JUDYPREV
-		offset = SEARCHBITMAPMAXB(JU_JBB_BITMAP(Pjbb, subexp));
-		// expected range:
-		assert((offset >= 0) && (offset < cJU_BITSPERSUBEXPB));
-#else
-		offset = 0;
-#endif
-
-// Save the next-left/right JPs digit in *PIndex:
-
-SM2BranchBFindlimit:
-		JU_BITMAPDIGITB(digit, subexp, JU_JBB_BITMAP(Pjbb, subexp),
-				offset);
-		JU_SETDIGIT(*PIndex, digit, state);
-
-		if ((Pjp = P_JP(JU_JBB_PJP(Pjbb, subexp))) == (Pjp_t) NULL)
-		{
-		    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-		    JUDY1CODE(return(JERRI );)
-		    JUDYLCODE(return(PPJERR);)
-		}
-
-		Pjp += offset;
-		goto SM3Findlimit;
-	    }
-
-// Theres no next-left/right JP in the BranchB:
-
-	    goto SM2Backtrack;
-
-
-// ----------------------------------------------------------------------------
-// UNCOMPRESSED BRANCH:
-
-	case cJU_JPBRANCH_U2: state = 2;	     goto SM2BranchU;
-	case cJU_JPBRANCH_U3: state = 3;	     goto SM2BranchU;
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_U4: state = 4;	     goto SM2BranchU;
-	case cJU_JPBRANCH_U5: state = 5;	     goto SM2BranchU;
-	case cJU_JPBRANCH_U6: state = 6;	     goto SM2BranchU;
-	case cJU_JPBRANCH_U7: state = 7;	     goto SM2BranchU;
-#endif
-	case cJU_JPBRANCH_U:  state = cJU_ROOTSTATE; goto SM2BranchU;
-
-SM2BranchU:
-
-// Search for a next-left/right JP in the current BranchU, and if one is found,
-// save its digit in *PIndex and continue to SM3Findlimit:
-
-	    Pjbu  = P_JBU(Pjp->jp_Addr);
-	    digit = offset;
-
-#ifdef JUDYPREV
-	    while (digit >= 1)
-	    {
-		Pjp = (Pjbu->jbu_jp) + (--digit);
-#else
-	    while (digit < cJU_BRANCHUNUMJPS - 1)
-	    {
-		Pjp = (Pjbu->jbu_jp) + (++digit);
-#endif
-		if (JPNULL(JU_JPTYPE(Pjp))) continue;
-
-		JU_SETDIGIT(*PIndex, digit, state);
-		goto SM3Findlimit;
-	    }
-
-// Theres no next-left/right JP in the BranchU:
-
-	    goto SM2Backtrack;
-
-
-// ----------------------------------------------------------------------------
-// INVALID JP TYPE:
-
-	default: JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-		 JUDY1CODE(return(JERRI );)
-		 JUDYLCODE(return(PPJERR);)
-
-	} // SM2Backtrack switch.
-
-	/*NOTREACHED*/
-
-
-// ============================================================================
-// STATE MACHINE 3 -- FIND LIMIT JP/INDEX:
-//
-// Look for the highest/lowest (right/left-most) JP in each branch and the
-// highest/lowest Index in a leaf or immediate, and return it.  While
-// traversing, modify appropriate digit(s) in *PIndex to reflect the path
-// taken, including Dcd bytes in each JP (which could hold critical missing
-// digits for skipped branches).
-//
-// ENTRY:  Pjp set to a JP under which to find max/min JPs (if a branch JP) or
-// a max/min Index and return (if a leaf or immediate JP).
-//
-// EXIT:  Execute JU_RET_FOUND* upon reaching a leaf or immediate.  Should be
-// impossible to fail, unless the Judy array is corrupt.
-
-SM3Findlimit:		// come or return here for first/next branch/leaf.
-
-	switch (JU_JPTYPE(Pjp))
-	{
-// ----------------------------------------------------------------------------
-// LINEAR BRANCH:
-//
-// Simply use the highest/lowest (right/left-most) JP in the BranchL, but first
-// copy the Dcd bytes to *PIndex if there are any (only if state <
-// cJU_ROOTSTATE - 1).
-
-	case cJU_JPBRANCH_L2:  SM3PREPB_DCD(2, SM3BranchL);
-#ifndef JU_64BIT
-	case cJU_JPBRANCH_L3:  SM3PREPB(    3, SM3BranchL);
-#else
-	case cJU_JPBRANCH_L3:  SM3PREPB_DCD(3, SM3BranchL);
-	case cJU_JPBRANCH_L4:  SM3PREPB_DCD(4, SM3BranchL);
-	case cJU_JPBRANCH_L5:  SM3PREPB_DCD(5, SM3BranchL);
-	case cJU_JPBRANCH_L6:  SM3PREPB_DCD(6, SM3BranchL);
-	case cJU_JPBRANCH_L7:  SM3PREPB(    7, SM3BranchL);
-#endif
-	case cJU_JPBRANCH_L:   SM3PREPB(    cJU_ROOTSTATE, SM3BranchL);
-
-SM3BranchL:
-	    Pjbl = P_JBL(Pjp->jp_Addr);
-
-#ifdef JUDYPREV
-	    if ((offset = (Pjbl->jbl_NumJPs) - 1) < 0)
-#else
-	    offset = 0; if ((Pjbl->jbl_NumJPs) == 0)
-#endif
-	    {
-		JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-		JUDY1CODE(return(JERRI );)
-		JUDYLCODE(return(PPJERR);)
-	    }
-
-	    JU_SETDIGIT(*PIndex, Pjbl->jbl_Expanse[offset], state);
-	    Pjp = (Pjbl->jbl_jp) + offset;
-	    goto SM3Findlimit;
-
-
-// ----------------------------------------------------------------------------
-// BITMAP BRANCH:
-//
-// Look for the highest/lowest (right/left-most) non-null subexpanse, then use
-// the highest/lowest JP in that subexpanse, but first copy Dcd bytes, if there
-// are any (only if state < cJU_ROOTSTATE - 1), to *PIndex.
-
-	case cJU_JPBRANCH_B2:  SM3PREPB_DCD(2, SM3BranchB);
-#ifndef JU_64BIT
-	case cJU_JPBRANCH_B3:  SM3PREPB(    3, SM3BranchB);
-#else
-	case cJU_JPBRANCH_B3:  SM3PREPB_DCD(3, SM3BranchB);
-	case cJU_JPBRANCH_B4:  SM3PREPB_DCD(4, SM3BranchB);
-	case cJU_JPBRANCH_B5:  SM3PREPB_DCD(5, SM3BranchB);
-	case cJU_JPBRANCH_B6:  SM3PREPB_DCD(6, SM3BranchB);
-	case cJU_JPBRANCH_B7:  SM3PREPB(    7, SM3BranchB);
-#endif
-	case cJU_JPBRANCH_B:   SM3PREPB(    cJU_ROOTSTATE, SM3BranchB);
-
-SM3BranchB:
-	    Pjbb   = P_JBB(Pjp->jp_Addr);
-#ifdef JUDYPREV
-	    subexp = cJU_NUMSUBEXPB;
-
-	    while (! (JU_JBB_BITMAP(Pjbb, --subexp)))  // find non-empty subexp.
-	    {
-		if (subexp <= 0)		    // wholly empty bitmap.
-		{
-		    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-		    JUDY1CODE(return(JERRI );)
-		    JUDYLCODE(return(PPJERR);)
-		}
-	    }
-
-	    offset = SEARCHBITMAPMAXB(JU_JBB_BITMAP(Pjbb, subexp));
-	    // expected range:
-	    assert((offset >= 0) && (offset < cJU_BITSPERSUBEXPB));
-#else
-	    subexp = -1;
-
-	    while (! (JU_JBB_BITMAP(Pjbb, ++subexp)))  // find non-empty subexp.
-	    {
-		if (subexp >= cJU_NUMSUBEXPB - 1)      // didnt find one.
-		{
-		    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-		    JUDY1CODE(return(JERRI );)
-		    JUDYLCODE(return(PPJERR);)
-		}
-	    }
-
-	    offset = 0;
-#endif
-
-	    JU_BITMAPDIGITB(digit, subexp, JU_JBB_BITMAP(Pjbb, subexp), offset);
-	    JU_SETDIGIT(*PIndex, digit, state);
-
-	    if ((Pjp = P_JP(JU_JBB_PJP(Pjbb, subexp))) == (Pjp_t) NULL)
-	    {
-		JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-		JUDY1CODE(return(JERRI );)
-		JUDYLCODE(return(PPJERR);)
-	    }
-
-	    Pjp += offset;
-	    goto SM3Findlimit;
-
-
-// ----------------------------------------------------------------------------
-// UNCOMPRESSED BRANCH:
-//
-// Look for the highest/lowest (right/left-most) non-null JP, and use it, but
-// first copy Dcd bytes to *PIndex if there are any (only if state <
-// cJU_ROOTSTATE - 1).
-
-	case cJU_JPBRANCH_U2:  SM3PREPB_DCD(2, SM3BranchU);
-#ifndef JU_64BIT
-	case cJU_JPBRANCH_U3:  SM3PREPB(    3, SM3BranchU);
-#else
-	case cJU_JPBRANCH_U3:  SM3PREPB_DCD(3, SM3BranchU);
-	case cJU_JPBRANCH_U4:  SM3PREPB_DCD(4, SM3BranchU);
-	case cJU_JPBRANCH_U5:  SM3PREPB_DCD(5, SM3BranchU);
-	case cJU_JPBRANCH_U6:  SM3PREPB_DCD(6, SM3BranchU);
-	case cJU_JPBRANCH_U7:  SM3PREPB(    7, SM3BranchU);
-#endif
-	case cJU_JPBRANCH_U:   SM3PREPB(    cJU_ROOTSTATE, SM3BranchU);
-
-SM3BranchU:
-	    Pjbu  = P_JBU(Pjp->jp_Addr);
-#ifdef JUDYPREV
-	    digit = cJU_BRANCHUNUMJPS;
-
-	    while (digit >= 1)
-	    {
-		Pjp = (Pjbu->jbu_jp) + (--digit);
-#else
-
-	    for (digit = 0; digit < cJU_BRANCHUNUMJPS; ++digit)
-	    {
-		Pjp = (Pjbu->jbu_jp) + digit;
-#endif
-		if (JPNULL(JU_JPTYPE(Pjp))) continue;
-
-		JU_SETDIGIT(*PIndex, digit, state);
-		goto SM3Findlimit;
-	    }
-
-// No non-null JPs in BranchU:
-
-	    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-	    JUDY1CODE(return(JERRI );)
-	    JUDYLCODE(return(PPJERR);)
-
-
-// ----------------------------------------------------------------------------
-// LINEAR LEAF:
-//
-// Simply use the highest/lowest (right/left-most) Index in the LeafL, but the
-// details vary depending on leaf Index Size.  First copy Dcd bytes, if there
-// are any (only if state < cJU_ROOTSTATE - 1), to *PIndex.
-
-#define	SM3LEAFLDCD(cState)				\
-	JU_SETDCD(*PIndex, Pjp, cState);	        \
-	SM3LEAFLNODCD
-
-#ifdef JUDY1
-#define	SM3LEAFL_SETPOP1		// not needed in any cases.
-#else
-#define	SM3LEAFL_SETPOP1  pop1 = JU_JPLEAF_POP0(Pjp) + 1
-#endif
-
-#ifdef JUDYPREV
-#define	SM3LEAFLNODCD			\
-	Pjll = P_JLL(Pjp->jp_Addr);	\
-	SM3LEAFL_SETPOP1;		\
-	offset = JU_JPLEAF_POP0(Pjp); assert(offset >= 0)
-#else
-#define	SM3LEAFLNODCD			\
-	Pjll = P_JLL(Pjp->jp_Addr);	\
-	SM3LEAFL_SETPOP1;		\
-	offset = 0; assert(JU_JPLEAF_POP0(Pjp) >= 0);
-#endif
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-	case cJU_JPLEAF1:
-
-	    SM3LEAFLDCD(1);
-	    JU_SETDIGIT1(*PIndex, ((uint8_t *) Pjll)[offset]);
-	    JU_RET_FOUND_LEAF1(Pjll, pop1, offset);
-#endif
-
-	case cJU_JPLEAF2:
-
-	    SM3LEAFLDCD(2);
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(2)))
-		    | ((uint16_t *) Pjll)[offset];
-	    JU_RET_FOUND_LEAF2(Pjll, pop1, offset);
-
-#ifndef JU_64BIT
-	case cJU_JPLEAF3:
-	{
-	    Word_t lsb;
-	    SM3LEAFLNODCD;
-	    JU_COPY3_PINDEX_TO_LONG(lsb, ((uint8_t *) Pjll) + (3 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(3))) | lsb;
-	    JU_RET_FOUND_LEAF3(Pjll, pop1, offset);
-	}
-
-#else
-	case cJU_JPLEAF3:
-	{
-	    Word_t lsb;
-	    SM3LEAFLDCD(3);
-	    JU_COPY3_PINDEX_TO_LONG(lsb, ((uint8_t *) Pjll) + (3 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(3))) | lsb;
-	    JU_RET_FOUND_LEAF3(Pjll, pop1, offset);
-	}
-
-	case cJU_JPLEAF4:
-
-	    SM3LEAFLDCD(4);
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(4)))
-		    | ((uint32_t *) Pjll)[offset];
-	    JU_RET_FOUND_LEAF4(Pjll, pop1, offset);
-
-	case cJU_JPLEAF5:
-	{
-	    Word_t lsb;
-	    SM3LEAFLDCD(5);
-	    JU_COPY5_PINDEX_TO_LONG(lsb, ((uint8_t *) Pjll) + (5 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(5))) | lsb;
-	    JU_RET_FOUND_LEAF5(Pjll, pop1, offset);
-	}
-
-	case cJU_JPLEAF6:
-	{
-	    Word_t lsb;
-	    SM3LEAFLDCD(6);
-	    JU_COPY6_PINDEX_TO_LONG(lsb, ((uint8_t *) Pjll) + (6 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(6))) | lsb;
-	    JU_RET_FOUND_LEAF6(Pjll, pop1, offset);
-	}
-
-	case cJU_JPLEAF7:
-	{
-	    Word_t lsb;
-	    SM3LEAFLNODCD;
-	    JU_COPY7_PINDEX_TO_LONG(lsb, ((uint8_t *) Pjll) + (7 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(7))) | lsb;
-	    JU_RET_FOUND_LEAF7(Pjll, pop1, offset);
-	}
-#endif
-
-
-// ----------------------------------------------------------------------------
-// BITMAP LEAF:
-//
-// Look for the highest/lowest (right/left-most) non-null subexpanse, then use
-// the highest/lowest Index in that subexpanse, but first copy Dcd bytes
-// (always present since state 1 < cJU_ROOTSTATE) to *PIndex.
-
-	case cJU_JPLEAF_B1:
-	{
-	    Pjlb_t Pjlb;
-
-	    JU_SETDCD(*PIndex, Pjp, 1);
-
-	    Pjlb   = P_JLB(Pjp->jp_Addr);
-#ifdef JUDYPREV
-	    subexp = cJU_NUMSUBEXPL;
-
-	    while (! JU_JLB_BITMAP(Pjlb, --subexp))  // find non-empty subexp.
-	    {
-		if (subexp <= 0)		// wholly empty bitmap.
-		{
-		    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-		    JUDY1CODE(return(JERRI );)
-		    JUDYLCODE(return(PPJERR);)
-		}
-	    }
-
-// TBD:  Might it be faster to just use a variant of BITMAPDIGIT*() that yields
-// the digit for the right-most Index with a bit set?
-
-	    offset = SEARCHBITMAPMAXL(JU_JLB_BITMAP(Pjlb, subexp));
-	    // expected range:
-	    assert((offset >= 0) && (offset < cJU_BITSPERSUBEXPL));
-#else
-	    subexp = -1;
-
-	    while (! JU_JLB_BITMAP(Pjlb, ++subexp))  // find non-empty subexp.
-	    {
-		if (subexp >= cJU_NUMSUBEXPL - 1)    // didnt find one.
-		{
-		    JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-		    JUDY1CODE(return(JERRI );)
-		    JUDYLCODE(return(PPJERR);)
-		}
-	    }
-
-	    offset = 0;
-#endif
-
-	    JU_BITMAPDIGITL(digit, subexp, JU_JLB_BITMAP(Pjlb, subexp), offset);
-	    JU_SETDIGIT1(*PIndex, digit);
-	    JU_RET_FOUND_LEAF_B1(Pjlb, subexp, offset);
-//	== return((PPvoid_t) (P_JV(JL_JLB_PVALUE(Pjlb, subexp)) + (offset)));
-
-	} // case cJU_JPLEAF_B1
-
-#ifdef JUDY1
-// ----------------------------------------------------------------------------
-// FULL POPULATION:
-//
-// Copy Dcd bytes to *PIndex (always present since state 1 < cJU_ROOTSTATE),
-// then set the highest/lowest possible digit as the LSB in *PIndex.
-
-	case cJ1_JPFULLPOPU1:
-
-	    JU_SETDCD(   *PIndex, Pjp, 1);
-#ifdef JUDYPREV
-	    JU_SETDIGIT1(*PIndex, cJU_BITSPERBITMAP - 1);
-#else
-	    JU_SETDIGIT1(*PIndex, 0);
-#endif
-	    JU_RET_FOUND_FULLPOPU1;
-#endif // JUDY1
-
-
-// ----------------------------------------------------------------------------
-// IMMEDIATE:
-//
-// Simply use the highest/lowest (right/left-most) Index in the Imm, but the
-// details vary depending on leaf Index Size and pop1.  Note:  There are no Dcd
-// bytes in an Immediate JP, but in a cJU_JPIMMED_*_01 JP, the field holds the
-// least bytes of the immediate Index.
-
-	case cJU_JPIMMED_1_01: SET_01(1); goto SM3Imm_01;
-	case cJU_JPIMMED_2_01: SET_01(2); goto SM3Imm_01;
-	case cJU_JPIMMED_3_01: SET_01(3); goto SM3Imm_01;
-#ifdef JU_64BIT
-	case cJU_JPIMMED_4_01: SET_01(4); goto SM3Imm_01;
-	case cJU_JPIMMED_5_01: SET_01(5); goto SM3Imm_01;
-	case cJU_JPIMMED_6_01: SET_01(6); goto SM3Imm_01;
-	case cJU_JPIMMED_7_01: SET_01(7); goto SM3Imm_01;
-#endif
-SM3Imm_01:	JU_RET_FOUND_IMM_01(Pjp);
-
-#ifdef JUDYPREV
-#define	SM3IMM_OFFSET(cPop1)  (cPop1) - 1	// highest.
-#else
-#define	SM3IMM_OFFSET(cPop1)  0			// lowest.
-#endif
-
-#define	SM3IMM(cPop1,Next)		\
-	offset = SM3IMM_OFFSET(cPop1);	\
-	goto Next
-
-	case cJU_JPIMMED_1_02: SM3IMM( 2, SM3Imm1);
-	case cJU_JPIMMED_1_03: SM3IMM( 3, SM3Imm1);
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_1_04: SM3IMM( 4, SM3Imm1);
-	case cJU_JPIMMED_1_05: SM3IMM( 5, SM3Imm1);
-	case cJU_JPIMMED_1_06: SM3IMM( 6, SM3Imm1);
-	case cJU_JPIMMED_1_07: SM3IMM( 7, SM3Imm1);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_1_08: SM3IMM( 8, SM3Imm1);
-	case cJ1_JPIMMED_1_09: SM3IMM( 9, SM3Imm1);
-	case cJ1_JPIMMED_1_10: SM3IMM(10, SM3Imm1);
-	case cJ1_JPIMMED_1_11: SM3IMM(11, SM3Imm1);
-	case cJ1_JPIMMED_1_12: SM3IMM(12, SM3Imm1);
-	case cJ1_JPIMMED_1_13: SM3IMM(13, SM3Imm1);
-	case cJ1_JPIMMED_1_14: SM3IMM(14, SM3Imm1);
-	case cJ1_JPIMMED_1_15: SM3IMM(15, SM3Imm1);
-#endif
-
-SM3Imm1:    JU_SETDIGIT1(*PIndex, ((uint8_t *) PJI)[offset]);
-	    JU_RET_FOUND_IMM(Pjp, offset);
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_2_02: SM3IMM(2, SM3Imm2);
-	case cJU_JPIMMED_2_03: SM3IMM(3, SM3Imm2);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_2_04: SM3IMM(4, SM3Imm2);
-	case cJ1_JPIMMED_2_05: SM3IMM(5, SM3Imm2);
-	case cJ1_JPIMMED_2_06: SM3IMM(6, SM3Imm2);
-	case cJ1_JPIMMED_2_07: SM3IMM(7, SM3Imm2);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-SM3Imm2:    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(2)))
-		    | ((uint16_t *) PJI)[offset];
-	    JU_RET_FOUND_IMM(Pjp, offset);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_3_02: SM3IMM(2, SM3Imm3);
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_3_03: SM3IMM(3, SM3Imm3);
-	case cJ1_JPIMMED_3_04: SM3IMM(4, SM3Imm3);
-	case cJ1_JPIMMED_3_05: SM3IMM(5, SM3Imm3);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-SM3Imm3:
-	{
-	    Word_t lsb;
-	    JU_COPY3_PINDEX_TO_LONG(lsb, ((uint8_t *) PJI) + (3 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(3))) | lsb;
-	    JU_RET_FOUND_IMM(Pjp, offset);
-	}
-#endif
-
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_4_02: SM3IMM(2, SM3Imm4);
-	case cJ1_JPIMMED_4_03: SM3IMM(3, SM3Imm4);
-
-SM3Imm4:    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(4)))
-		    | ((uint32_t *) PJI)[offset];
-	    JU_RET_FOUND_IMM(Pjp, offset);
-
-	case cJ1_JPIMMED_5_02: SM3IMM(2, SM3Imm5);
-	case cJ1_JPIMMED_5_03: SM3IMM(3, SM3Imm5);
-
-SM3Imm5:
-	{
-	    Word_t lsb;
-	    JU_COPY5_PINDEX_TO_LONG(lsb, ((uint8_t *) PJI) + (5 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(5))) | lsb;
-	    JU_RET_FOUND_IMM(Pjp, offset);
-	}
-
-	case cJ1_JPIMMED_6_02: SM3IMM(2, SM3Imm6);
-
-SM3Imm6:
-	{
-	    Word_t lsb;
-	    JU_COPY6_PINDEX_TO_LONG(lsb, ((uint8_t *) PJI) + (6 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(6))) | lsb;
-	    JU_RET_FOUND_IMM(Pjp, offset);
-	}
-
-	case cJ1_JPIMMED_7_02: SM3IMM(2, SM3Imm7);
-
-SM3Imm7:
-	{
-	    Word_t lsb;
-	    JU_COPY7_PINDEX_TO_LONG(lsb, ((uint8_t *) PJI) + (7 * offset));
-	    *PIndex = (*PIndex & (~JU_LEASTBYTESMASK(7))) | lsb;
-	    JU_RET_FOUND_IMM(Pjp, offset);
-	}
-#endif // (JUDY1 && JU_64BIT)
-
-
-// ----------------------------------------------------------------------------
-// OTHER CASES:
-
-	default: JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT);
-		 JUDY1CODE(return(JERRI );)
-		 JUDYLCODE(return(PPJERR);)
-
-	} // SM3Findlimit switch.
-
-	/*NOTREACHED*/
-
-} // Judy1Prev() / Judy1Next() / JudyLPrev() / JudyLNext()
diff --git a/libs/klib/judy/JudyPrevNextEmpty.c b/libs/klib/judy/JudyPrevNextEmpty.c
deleted file mode 100644
index 7eef40d..0000000
--- a/libs/klib/judy/JudyPrevNextEmpty.c
+++ /dev/null
@@ -1,1388 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// Judy*PrevEmpty() and Judy*NextEmpty() functions for Judy1 and JudyL.
-// Compile with one of -DJUDY1 or -DJUDYL.
-//
-// Compile with -DJUDYNEXT for the Judy*NextEmpty() function; otherwise
-// defaults to Judy*PrevEmpty().
-//
-// Compile with -DTRACEJPSE to trace JP traversals.
-//
-// This file is separate from JudyPrevNext.c because it differs too greatly for
-// ifdefs.  This might be a bit surprising, but there are two reasons:
-//
-// - First, down in the details, searching for an empty index (SearchEmpty) is
-//   remarkably asymmetric with searching for a valid index (SearchValid),
-//   mainly with respect to:  No return of a value area for JudyL; partially-
-//   full versus totally-full JPs; and handling of narrow pointers.
-//
-// - Second, we chose to implement SearchEmpty without a backtrack stack or
-//   backtrack engine, partly as an experiment, and partly because we think
-//   restarting from the top of the tree is less likely for SearchEmpty than
-//   for SearchValid, because empty indexes are more likely than valid indexes.
-//
-// A word about naming:  A prior version of this feature (see 4.13) was named
-// Judy*Free(), but there were concerns about that being read as a verb rather
-// than an adjective.  After prolonged debate and based on user input, we
-// changed "Free" to "Empty".
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#ifndef JUDYNEXT
-#ifndef JUDYPREV
-#define	JUDYPREV 1		// neither set => use default.
-#endif
-#endif
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-
-#include "JudyPrivate1L.h"
-
-#ifdef TRACEJPSE
-#include "JudyPrintJP.c"
-#endif
-
-
-// ****************************************************************************
-// J U D Y   1   P R E V   E M P T Y
-// J U D Y   1   N E X T   E M P T Y
-// J U D Y   L   P R E V   E M P T Y
-// J U D Y   L   N E X T   E M P T Y
-//
-// See the manual entry for the API.
-//
-// OVERVIEW OF Judy*PrevEmpty() / Judy*NextEmpty():
-//
-// See also for comparison the equivalent comments in JudyPrevNext.c.
-//
-// Take the callers *PIndex and subtract/add 1, but watch out for
-// underflow/overflow, which means "no previous/next empty index found."  Use a
-// reentrant switch statement (state machine, see SMGetRestart and
-// SMGetContinue) to decode Index, starting with the JRP (PArray), through a
-// JPM and branches, if any, down to an immediate or a leaf.  Look for Index in
-// that immediate or leaf, and if not found (invalid index), return success
-// (Index is empty).
-//
-// This search can result in a dead end where taking a different path is
-// required.  There are four kinds of dead ends:
-//
-// BRANCH PRIMARY dead end:  Encountering a fully-populated JP for the
-// appropriate digit in Index.  Search sideways in the branch for the
-// previous/next absent/null/non-full JP, and if one is found, set Index to the
-// highest/lowest index possible in that JPs expanse.  Then if the JP is an
-// absent or null JP, return success; otherwise for a non-full JP, traverse
-// through the partially populated JP.
-//
-// BRANCH SECONDARY dead end:  Reaching the end of a branch during a sideways
-// search after a branch primary dead end.  Set Index to the lowest/highest
-// index possible in the whole branchs expanse (one higher/lower than the
-// previous/next branchs expanse), then restart at the top of the tree, which
-// includes pre-decrementing/incrementing Index (again) and watching for
-// underflow/overflow (again).
-//
-// LEAF PRIMARY dead end:  Finding a valid (non-empty) index in an immediate or
-// leaf matching Index.  Search sideways in the immediate/leaf for the
-// previous/next empty index; if found, set *PIndex to match and return success.
-//
-// LEAF SECONDARY dead end:  Reaching the end of an immediate or leaf during a
-// sideways search after a leaf primary dead end.  Just as for a branch
-// secondary dead end, restart at the top of the tree with Index set to the
-// lowest/highest index possible in the whole immediate/leafs expanse.
-// TBD:  If leaf secondary dead end occurs, could shortcut and treat it as a
-// branch primary dead end; but this would require remembering the parent
-// branchs type and offset (a "one-deep stack"), and also wrestling with
-// narrow pointers, at least for leaves (but not for immediates).
-//
-// Note some ASYMMETRIES between SearchValid and SearchEmpty:
-//
-// - The SearchValid code, upon descending through a narrow pointer, if Index
-//   is outside the expanse of the subsidiary node (effectively a secondary
-//   dead end), must decide whether to backtrack or findlimit.  But the
-//   SearchEmpty code simply returns success (Index is empty).
-//
-// - Similarly, the SearchValid code, upon finding no previous/next index in
-//   the expanse of a narrow pointer (again, a secondary dead end), can simply
-//   start to backtrack at the parent JP.  But the SearchEmpty code would have
-//   to first determine whether or not the parent JPs narrow expanse contains
-//   a previous/next empty index outside the subexpanse.  Rather than keeping a
-//   parent state stack and backtracking this way, upon a secondary dead end,
-//   the SearchEmpty code simply restarts at the top of the tree, whether or
-//   not a narrow pointer is involved.  Again, see the equivalent comments in
-//   JudyPrevNext.c for comparison.
-//
-// This function is written iteratively for speed, rather than recursively.
-//
-// TBD:  Wed like to enhance this function to make successive searches faster.
-// This would require saving some previous state, including the previous Index
-// returned, and in which leaf it was found.  If the next call is for the same
-// Index and the array has not been modified, start at the same leaf.  This
-// should be much easier to implement since this is iterative rather than
-// recursive code.
-
-#ifdef JUDY1
-#ifdef JUDYPREV
-FUNCTION int Judy1PrevEmpty
-#else
-FUNCTION int Judy1NextEmpty
-#endif
-#else
-#ifdef JUDYPREV
-FUNCTION int JudyLPrevEmpty
-#else
-FUNCTION int JudyLNextEmpty
-#endif
-#endif
-        (
-	Pcvoid_t  PArray,	// Judy array to search.
-	Word_t *  PIndex,	// starting point and result.
-	PJError_t PJError	// optional, for returning error info.
-        )
-{
-	Word_t	  Index;	// fast copy, in a register.
-	Pjp_t	  Pjp;		// current JP.
-	Pjbl_t	  Pjbl;		// Pjp->jp_Addr masked and cast to types:
-	Pjbb_t	  Pjbb;
-	Pjbu_t	  Pjbu;
-	Pjlb_t	  Pjlb;
-	PWord_t	  Pword;	// alternate name for use by GET* macros.
-
-	Word_t	  digit;	// next digit to decode from Index.
-	Word_t	  digits;	// current state in SM = digits left to decode.
-	Word_t	  pop0;		// in a leaf.
-	Word_t	  pop0mask;	// precalculated to avoid variable shifts.
-	long	  offset;	// within a branch or leaf (can be large).
-	int	  subexp;	// subexpanse in a bitmap branch.
-	BITMAPB_t bitposmaskB;	// bit in bitmap for bitmap branch.
-	BITMAPL_t bitposmaskL;	// bit in bitmap for bitmap leaf.
-	Word_t	  possfullJP1;	// JP types for possibly full subexpanses:
-	Word_t	  possfullJP2;
-	Word_t	  possfullJP3;
-
-
-// ----------------------------------------------------------------------------
-// M A C R O S
-//
-// These are intended to make the code a bit more readable and less redundant.
-
-
-// CHECK FOR NULL JP:
-//
-// TBD:  In principle this can be reduced (here and in other *.c files) to just
-// the latter clause since no Type should ever be below cJU_JPNULL1, but in
-// fact some root pointer types can be lower, so for safety do both checks.
-
-#define	JPNULL(Type)  (((Type) >= cJU_JPNULL1) && ((Type) <= cJU_JPNULLMAX))
-
-
-// CHECK FOR A FULL JP:
-//
-// Given a JP, indicate if it is fully populated.  Use digits, pop0mask, and
-// possfullJP1..3 in the context.
-//
-// This is a difficult problem because it requires checking the Pop0 bits for
-// all-ones, but the number of bytes depends on the JP type, which is not
-// directly related to the parent branchs type or level -- the JPs child
-// could be under a narrow pointer (hence not full).  The simple answer
-// requires switching on or otherwise calculating the JP type, which could be
-// slow.  Instead, in SMPREPB* precalculate pop0mask and also record in
-// possfullJP1..3 the child JP (branch) types that could possibly be full (one
-// level down), and use them here.  For level-2 branches (with digits == 2),
-// the test for a full child depends on Judy1/JudyL.
-//
-// Note:  This cannot be applied to the JP in a JPM because it doesnt have
-// enough pop0 digits.
-//
-// TBD:  JPFULL_BRANCH diligently checks for BranchL or BranchB, where neither
-// of those can ever be full as it turns out.  Could just check for a BranchU
-// at the right level.  Also, pop0mask might be overkill, its not used much,
-// so perhaps just call cJU_POP0MASK(digits - 1) here?
-//
-// First, JPFULL_BRANCH checks for a full expanse for a JP whose child can be a
-// branch, that is, a JP in a branch at level 3 or higher:
-
-#define	JPFULL_BRANCH(Pjp)						\
-	  ((((JU_JPDCDPOP0(Pjp) ^ cJU_ALLONES) & pop0mask) == 0)	\
-	&& ((JU_JPTYPE(Pjp) == possfullJP1)				\
-	 || (JU_JPTYPE(Pjp) == possfullJP2)				\
-	 || (JU_JPTYPE(Pjp) == possfullJP3)))
-
-#ifdef JUDY1
-#define	JPFULL(Pjp)							\
-	((digits == 2) ?						\
-	 (JU_JPTYPE(Pjp) == cJ1_JPFULLPOPU1) : JPFULL_BRANCH(Pjp))
-#else
-#define	JPFULL(Pjp)							\
-	((digits == 2) ?						\
-	   (JU_JPTYPE(Pjp) == cJU_JPLEAF_B1)				\
-	 && (((JU_JPDCDPOP0(Pjp) & cJU_POP0MASK(1)) == cJU_POP0MASK(1))) : \
-	 JPFULL_BRANCH(Pjp))
-#endif
-
-
-// RETURN SUCCESS:
-//
-// This hides the need to set *PIndex back to the local value of Index -- use a
-// local value for faster operation.  Note that the callers *PIndex is ALWAYS
-// modified upon success, at least decremented/incremented.
-
-#define	RET_SUCCESS { *PIndex = Index; return(1); }
-
-
-// RETURN A CORRUPTION:
-
-#define	RET_CORRUPT { JU_SET_ERRNO(PJError, JU_ERRNO_CORRUPT); return(JERRI); }
-
-
-// SEARCH A BITMAP BRANCH:
-//
-// This is a weak analog of j__udySearchLeaf*() for bitmap branches.  Return
-// the actual or next-left position, base 0, of Digit in a BITMAPB_t bitmap
-// (subexpanse of a full bitmap), also given a Bitposmask for Digit.  The
-// position is the offset within the set bits.
-//
-// Unlike j__udySearchLeaf*(), the offset is not returned bit-complemented if
-// Digits bit is unset, because the caller can check the bitmap themselves to
-// determine that.  Also, if Digits bit is unset, the returned offset is to
-// the next-left JP or index (including -1), not to the "ideal" position for
-// the index = next-right JP or index.
-//
-// Shortcut and skip calling j__udyCountBitsB() if the bitmap is full, in which
-// case (Digit % cJU_BITSPERSUBEXPB) itself is the base-0 offset.
-
-#define	SEARCHBITMAPB(Bitmap,Digit,Bitposmask)				\
-	(((Bitmap) == cJU_FULLBITMAPB) ? (Digit % cJU_BITSPERSUBEXPB) :	\
-	 j__udyCountBitsB((Bitmap) & JU_MASKLOWERINC(Bitposmask)) - 1)
-
-#ifdef JUDYPREV
-// Equivalent to search for the highest offset in Bitmap, that is, one less
-// than the number of bits set:
-
-#define	SEARCHBITMAPMAXB(Bitmap)					\
-	(((Bitmap) == cJU_FULLBITMAPB) ? cJU_BITSPERSUBEXPB - 1 :	\
-	 j__udyCountBitsB(Bitmap) - 1)
-#endif
-
-
-// CHECK DECODE BYTES:
-//
-// Check Decode bytes in a JP against the equivalent portion of Index.  If they
-// dont match, Index is outside the subexpanse of a narrow pointer, hence is
-// empty.
-
-#define	CHECKDCD(cDigits) \
-	if (JU_DCDNOTMATCHINDEX(Index, Pjp, cDigits)) RET_SUCCESS
-
-
-// REVISE REMAINDER OF INDEX:
-//
-// Put one digit in place in Index and clear/set the lower digits, if any, so
-// the resulting Index is at the start/end of an expanse, or just clear/set the
-// least digits.
-//
-// Actually, to make simple use of JU_LEASTBYTESMASK, first clear/set all least
-// digits of Index including the digit to be overridden, then set the value of
-// that one digit.  If Digits == 1 the first operation is redundant, but either
-// very fast or even removed by the optimizer.
-
-#define	CLEARLEASTDIGITS(Digits) Index &= ~JU_LEASTBYTESMASK(Digits)
-#define	SETLEASTDIGITS(  Digits) Index |=  JU_LEASTBYTESMASK(Digits)
-
-#define	CLEARLEASTDIGITS_D(Digit,Digits)	\
-	{					\
-	    CLEARLEASTDIGITS(Digits);		\
-	    JU_SETDIGIT(Index, Digit, Digits);	\
-	}
-
-#define	SETLEASTDIGITS_D(Digit,Digits)		\
-	{					\
-	    SETLEASTDIGITS(Digits);		\
-	    JU_SETDIGIT(Index, Digit, Digits);	\
-	}
-
-
-// SET REMAINDER OF INDEX AND THEN RETURN OR CONTINUE:
-
-#define	SET_AND_RETURN(OpLeastDigits,Digit,Digits)	\
-	{						\
-	    OpLeastDigits(Digit, Digits);		\
-	    RET_SUCCESS;				\
-	}
-
-#define	SET_AND_CONTINUE(OpLeastDigits,Digit,Digits)	\
-	{						\
-	    OpLeastDigits(Digit, Digits);		\
-	    goto SMGetContinue;				\
-	}
-
-
-// PREPARE TO HANDLE A LEAFW OR JP BRANCH IN THE STATE MACHINE:
-//
-// Extract a state-dependent digit from Index in a "constant" way, then jump to
-// common code for multiple cases.
-//
-// TBD:  Should this macro do more, such as preparing variable-shift masks for
-// use in CLEARLEASTDIGITS and SETLEASTDIGITS?
-
-#define	SMPREPB(cDigits,Next,PossFullJP1,PossFullJP2,PossFullJP3)	\
-	digits	 = (cDigits);						\
-	digit	 = JU_DIGITATSTATE(Index, cDigits);			\
-	pop0mask = cJU_POP0MASK((cDigits) - 1);	 /* for branchs JPs */	\
-	possfullJP1 = (PossFullJP1);					\
-	possfullJP2 = (PossFullJP2);					\
-	possfullJP3 = (PossFullJP3);					\
-	goto Next
-
-// Variations for specific-level branches and for shorthands:
-//
-// Note:  SMPREPB2 need not initialize possfullJP* because JPFULL does not use
-// them for digits == 2, but gcc -Wall isnt quite smart enough to see this, so
-// waste a bit of time and space to get rid of the warning:
-
-#define	SMPREPB2(Next)				\
-	digits	 = 2;				\
-	digit	 = JU_DIGITATSTATE(Index, 2);	\
-	pop0mask = cJU_POP0MASK(1);  /* for branchs JPs */ \
-	possfullJP1 = possfullJP2 = possfullJP3 = 0;	    \
-	goto Next
-
-#define	SMPREPB3(Next) SMPREPB(3,	      Next, cJU_JPBRANCH_L2, \
-						    cJU_JPBRANCH_B2, \
-						    cJU_JPBRANCH_U2)
-#ifndef JU_64BIT
-#define	SMPREPBL(Next) SMPREPB(cJU_ROOTSTATE, Next, cJU_JPBRANCH_L3, \
-						    cJU_JPBRANCH_B3, \
-						    cJU_JPBRANCH_U3)
-#else
-#define	SMPREPB4(Next) SMPREPB(4,	      Next, cJU_JPBRANCH_L3, \
-						    cJU_JPBRANCH_B3, \
-						    cJU_JPBRANCH_U3)
-#define	SMPREPB5(Next) SMPREPB(5,	      Next, cJU_JPBRANCH_L4, \
-						    cJU_JPBRANCH_B4, \
-						    cJU_JPBRANCH_U4)
-#define	SMPREPB6(Next) SMPREPB(6,	      Next, cJU_JPBRANCH_L5, \
-						    cJU_JPBRANCH_B5, \
-						    cJU_JPBRANCH_U5)
-#define	SMPREPB7(Next) SMPREPB(7,	      Next, cJU_JPBRANCH_L6, \
-						    cJU_JPBRANCH_B6, \
-						    cJU_JPBRANCH_U6)
-#define	SMPREPBL(Next) SMPREPB(cJU_ROOTSTATE, Next, cJU_JPBRANCH_L7, \
-						    cJU_JPBRANCH_B7, \
-						    cJU_JPBRANCH_U7)
-#endif
-
-
-// RESTART AFTER SECONDARY DEAD END:
-//
-// Set Index to the first/last index in the branch or leaf subexpanse and start
-// over at the top of the tree.
-
-#ifdef JUDYPREV
-#define	SMRESTART(Digits) { CLEARLEASTDIGITS(Digits); goto SMGetRestart; }
-#else
-#define	SMRESTART(Digits) { SETLEASTDIGITS(  Digits); goto SMGetRestart; }
-#endif
-
-
-// CHECK EDGE OF LEAFS EXPANSE:
-//
-// Given the LSBs of the lowest/highest valid index in a leaf (or equivalently
-// in an immediate JP), the level (index size) of the leaf, and the full index
-// to return (as Index in the context) already set to the full index matching
-// the lowest/highest one, determine if there is an empty index in the leafs
-// expanse below/above the lowest/highest index, which is true if the
-// lowest/highest index is not at the "edge" of the leafs expanse based on its
-// LSBs.  If so, return Index decremented/incremented; otherwise restart at the
-// top of the tree.
-//
-// Note:  In many cases Index is already at the right spot and calling
-// SMRESTART instead of just going directly to SMGetRestart is a bit of
-// overkill.
-//
-// Note:  Variable shift occurs if Digits is not a constant.
-
-#ifdef JUDYPREV
-#define	LEAF_EDGE(MinIndex,Digits)			\
-	{						\
-	    if (MinIndex) { --Index; RET_SUCCESS; }	\
-	    SMRESTART(Digits);				\
-	}
-#else
-#define	LEAF_EDGE(MaxIndex,Digits)			\
-	{						\
-	    if ((MaxIndex) != JU_LEASTBYTES(cJU_ALLONES, Digits)) \
-	    { ++Index; RET_SUCCESS; }			\
-	    SMRESTART(Digits);				\
-	}
-#endif
-
-// Same as above except Index is not already set to match the lowest/highest
-// index, so do that before decrementing/incrementing it:
-
-#ifdef JUDYPREV
-#define	LEAF_EDGE_SET(MinIndex,Digits)	\
-	{				\
-	    if (MinIndex)		\
-	    { JU_SETDIGITS(Index, MinIndex, Digits); --Index; RET_SUCCESS; } \
-	    SMRESTART(Digits);		\
-	}
-#else
-#define	LEAF_EDGE_SET(MaxIndex,Digits)	\
-	{				\
-	    if ((MaxIndex) != JU_LEASTBYTES(cJU_ALLONES, Digits))	    \
-	    { JU_SETDIGITS(Index, MaxIndex, Digits); ++Index; RET_SUCCESS; } \
-	    SMRESTART(Digits);		\
-	}
-#endif
-
-
-// FIND A HOLE (EMPTY INDEX) IN AN IMMEDIATE OR LEAF:
-//
-// Given an index location in a leaf (or equivalently an immediate JP) known to
-// contain a usable hole (an empty index less/greater than Index), and the LSBs
-// of a minimum/maximum index to locate, find the previous/next empty index and
-// return it.
-//
-// Note:  "Even" index sizes (1,2,4[,8] bytes) have corresponding native C
-// types; "odd" index sizes dont, but they are not represented here because
-// they are handled completely differently; see elsewhere.
-
-#ifdef JUDYPREV
-
-#define	LEAF_HOLE_EVEN(cDigits,Pjll,IndexLSB)				\
-	{								\
-	    while (*(Pjll) > (IndexLSB)) --(Pjll); /* too high */	\
-	    if (*(Pjll) < (IndexLSB)) RET_SUCCESS  /* Index is empty */	\
-	    while (*(--(Pjll)) == --(IndexLSB)) /* null, find a hole */;\
-	    JU_SETDIGITS(Index, IndexLSB, cDigits);			\
-	    RET_SUCCESS;						\
-	}
-#else
-#define	LEAF_HOLE_EVEN(cDigits,Pjll,IndexLSB)				\
-	{								\
-	    while (*(Pjll) < (IndexLSB)) ++(Pjll); /* too low */	\
-	    if (*(Pjll) > (IndexLSB)) RET_SUCCESS  /* Index is empty */	\
-	    while (*(++(Pjll)) == ++(IndexLSB)) /* null, find a hole */;\
-	    JU_SETDIGITS(Index, IndexLSB, cDigits);			\
-	    RET_SUCCESS;						\
-	}
-#endif
-
-
-// SEARCH FOR AN EMPTY INDEX IN AN IMMEDIATE OR LEAF:
-//
-// Given a pointer to the first index in a leaf (or equivalently an immediate
-// JP), the population of the leaf, and a first empty Index to find (inclusive,
-// as Index in the context), where Index is known to fall within the expanse of
-// the leaf to search, efficiently find the previous/next empty index in the
-// leaf, if any.  For simplicity the following overview is stated in terms of
-// Judy*NextEmpty() only, but the same concepts apply symmetrically for
-// Judy*PrevEmpty().  Also, in each case the comparisons are for the LSBs of
-// Index and leaf indexes, according to the leafs level.
-//
-// 1.  If Index is GREATER than the last (highest) index in the leaf
-//     (maxindex), return success, Index is empty.  (Remember, Index is known
-//     to be in the leafs expanse.)
-//
-// 2.  If Index is EQUAL to maxindex:  If maxindex is not at the edge of the
-//     leafs expanse, increment Index and return success, there is an empty
-//     Index one higher than any in the leaf; otherwise restart with Index
-//     reset to the upper edge of the leafs expanse.  Note:  This might cause
-//     an extra cache line fill, but this is OK for repeatedly-called search
-//     code, and it saves CPU time.
-//
-// 3.  If Index is LESS than maxindex, check for "dense to end of leaf":
-//     Subtract Index from maxindex, and back up that many slots in the leaf.
-//     If the resulting offset is not before the start of the leaf then compare
-//     the index at this offset (baseindex) with Index:
-//
-// 3a.  If GREATER, the leaf must be corrupt, since indexes are sorted and
-//      there are no duplicates.
-//
-// 3b.  If EQUAL, the leaf is "dense" from Index to maxindex, meaning there is
-//      no reason to search it.  "Slide right" to the high end of the leaf
-//      (modify Index to maxindex) and continue with step 2 above.
-//
-// 3c.  If LESS, continue with step 4.
-//
-// 4.  If the offset based on maxindex minus Index falls BEFORE the start of
-//     the leaf, or if, per 3c above, baseindex is LESS than Index, the leaf is
-//     guaranteed "not dense to the end" and a usable empty Index must exist.
-//     This supports a more efficient search loop.  Start at the FIRST index in
-//     the leaf, or one BEYOND baseindex, respectively, and search the leaf as
-//     follows, comparing each current index (currindex) with Index:
-//
-// 4a.  If LESS, keep going to next index.  Note:  This is certain to terminate
-//      because maxindex is known to be greater than Index, hence the loop can
-//      be small and fast.
-//
-// 4b.  If EQUAL, loop and increment Index until finding currindex greater than
-//      Index, and return success with the modified Index.
-//
-// 4c.  If GREATER, return success, Index (unmodified) is empty.
-//
-// Note:  These are macros rather than functions for speed.
-
-#ifdef JUDYPREV
-
-#define	JSLE_EVEN(Addr,Pop0,cDigits,LeafType)				\
-	{								\
-	    LeafType * PjllLSB  = (LeafType *) (Addr);			\
-	    LeafType   IndexLSB = Index;	/* auto-masking */	\
-									\
-	/* Index before or at start of leaf: */				\
-									\
-	    if (*PjllLSB >= IndexLSB)		/* no need to search */	\
-	    {								\
-		if (*PjllLSB > IndexLSB) RET_SUCCESS; /* Index empty */	\
-		LEAF_EDGE(*PjllLSB, cDigits);				\
-	    }								\
-									\
-	/* Index in or after leaf: */					\
-									\
-	    offset = IndexLSB - *PjllLSB;	/* tentative offset  */	\
-	    if (offset <= (Pop0))		/* can check density */	\
-	    {								\
-		PjllLSB += offset;		/* move to slot */	\
-									\
-		if (*PjllLSB <= IndexLSB)	/* dense or corrupt */	\
-		{							\
-		    if (*PjllLSB == IndexLSB)	/* dense, check edge */	\
-			LEAF_EDGE_SET(PjllLSB[-offset], cDigits);	\
-		    RET_CORRUPT;					\
-		}							\
-		--PjllLSB;	/* not dense, start at previous */	\
-	    }								\
-	    else PjllLSB = ((LeafType *) (Addr)) + (Pop0); /* start at max */ \
-									\
-	    LEAF_HOLE_EVEN(cDigits, PjllLSB, IndexLSB);			\
-	}
-
-// JSLE_ODD is completely different from JSLE_EVEN because its important to
-// minimize copying odd indexes to compare them (see 4.14).  Furthermore, a
-// very complex version (4.17, but abandoned before fully debugged) that
-// avoided calling j__udySearchLeaf*() ran twice as fast as 4.14, but still
-// half as fast as SearchValid.  Doug suggested that to minimize complexity and
-// share common code we should use j__udySearchLeaf*() for the initial search
-// to establish if Index is empty, which should be common.  If Index is valid
-// in a leaf or immediate indexes, odds are good that an empty Index is nearby,
-// so for simplicity just use a *COPY* function to linearly search the
-// remainder.
-//
-// TBD:  Pathological case?  Average performance should be good, but worst-case
-// might suffer.  When Search says the initial Index is valid, so a linear
-// copy-and-compare is begun, if the caller builds fairly large leaves with
-// dense clusters AND frequently does a SearchEmpty at one end of such a
-// cluster, performance wont be very good.  Might a dense-check help?  This
-// means checking offset against the index at offset, and then against the
-// first/last index in the leaf.  We doubt the pathological case will appear
-// much in real applications because they will probably alternate SearchValid
-// and SearchEmpty calls.
-
-#define	JSLE_ODD(cDigits,Pjll,Pop0,Search,Copy)				\
-	{								\
-	    Word_t IndexLSB;		/* least bytes only */		\
-	    Word_t IndexFound;		/* in leaf	    */		\
-									\
-	    if ((offset = Search(Pjll, (Pop0) + 1, Index)) < 0)		\
-		RET_SUCCESS;		/* Index is empty */		\
-									\
-	    IndexLSB = JU_LEASTBYTES(Index, cDigits);			\
-	    offset  *= (cDigits);					\
-									\
-	    while ((offset -= (cDigits)) >= 0)				\
-	    {				/* skip until empty or start */	\
-		Copy(IndexFound, ((uint8_t *) (Pjll)) + offset);	\
-		if (IndexFound != (--IndexLSB))	/* found an empty */	\
-		{ JU_SETDIGITS(Index, IndexLSB, cDigits); RET_SUCCESS; }\
-	    }								\
-	    LEAF_EDGE_SET(IndexLSB, cDigits);				\
-	}
-
-#else // JUDYNEXT
-
-#define	JSLE_EVEN(Addr,Pop0,cDigits,LeafType)				\
-	{								\
-	    LeafType * PjllLSB   = ((LeafType *) (Addr)) + (Pop0);	\
-	    LeafType   IndexLSB = Index;	/* auto-masking */	\
-									\
-	/* Index at or after end of leaf: */				\
-									\
-	    if (*PjllLSB <= IndexLSB)		/* no need to search */	\
-	    {								\
-		if (*PjllLSB < IndexLSB) RET_SUCCESS;  /* Index empty */\
-		LEAF_EDGE(*PjllLSB, cDigits);				\
-	    }								\
-									\
-	/* Index before or in leaf: */					\
-									\
-	    offset = *PjllLSB - IndexLSB;	/* tentative offset  */	\
-	    if (offset <= (Pop0))		/* can check density */	\
-	    {								\
-		PjllLSB -= offset;		/* move to slot */	\
-									\
-		if (*PjllLSB >= IndexLSB)	/* dense or corrupt */	\
-		{							\
-		    if (*PjllLSB == IndexLSB)	/* dense, check edge */	\
-			LEAF_EDGE_SET(PjllLSB[offset], cDigits);	\
-		    RET_CORRUPT;					\
-		}							\
-		++PjllLSB;		/* not dense, start at next */	\
-	    }								\
-	    else PjllLSB = (LeafType *) (Addr);	/* start at minimum */	\
-									\
-	    LEAF_HOLE_EVEN(cDigits, PjllLSB, IndexLSB);			\
-	}
-
-#define	JSLE_ODD(cDigits,Pjll,Pop0,Search,Copy)				\
-	{								\
-	    Word_t IndexLSB;		/* least bytes only */		\
-	    Word_t IndexFound;		/* in leaf	    */		\
-	    int	   offsetmax;		/* in bytes	    */		\
-									\
-	    if ((offset = Search(Pjll, (Pop0) + 1, Index)) < 0)		\
-		RET_SUCCESS;			/* Index is empty */	\
-									\
-	    IndexLSB  = JU_LEASTBYTES(Index, cDigits);			\
-	    offset   *= (cDigits);					\
-	    offsetmax = (Pop0) * (cDigits);	/* single multiply */	\
-									\
-	    while ((offset += (cDigits)) <= offsetmax)			\
-	    {				/* skip until empty or end */	\
-		Copy(IndexFound, ((uint8_t *) (Pjll)) + offset);	\
-		if (IndexFound != (++IndexLSB))	/* found an empty */	\
-		{ JU_SETDIGITS(Index, IndexLSB, cDigits); RET_SUCCESS; } \
-	    }								\
-	    LEAF_EDGE_SET(IndexLSB, cDigits);				\
-	}
-
-#endif // JUDYNEXT
-
-// Note:  Immediate indexes never fill a single index group, so for odd index
-// sizes, save time by calling JSLE_ODD_IMM instead of JSLE_ODD.
-
-#define	j__udySearchLeafEmpty1(Addr,Pop0) \
-	JSLE_EVEN(Addr, Pop0, 1, uint8_t)
-
-#define	j__udySearchLeafEmpty2(Addr,Pop0) \
-	JSLE_EVEN(Addr, Pop0, 2, uint16_t)
-
-#define	j__udySearchLeafEmpty3(Addr,Pop0) \
-	JSLE_ODD(3, Addr, Pop0, j__udySearchLeaf3, JU_COPY3_PINDEX_TO_LONG)
-
-#ifndef JU_64BIT
-
-#define	j__udySearchLeafEmptyL(Addr,Pop0) \
-	JSLE_EVEN(Addr, Pop0, 4, Word_t)
-
-#else
-
-#define	j__udySearchLeafEmpty4(Addr,Pop0) \
-	JSLE_EVEN(Addr, Pop0, 4, uint32_t)
-
-#define	j__udySearchLeafEmpty5(Addr,Pop0) \
-	JSLE_ODD(5, Addr, Pop0, j__udySearchLeaf5, JU_COPY5_PINDEX_TO_LONG)
-
-#define	j__udySearchLeafEmpty6(Addr,Pop0) \
-	JSLE_ODD(6, Addr, Pop0, j__udySearchLeaf6, JU_COPY6_PINDEX_TO_LONG)
-
-#define	j__udySearchLeafEmpty7(Addr,Pop0) \
-	JSLE_ODD(7, Addr, Pop0, j__udySearchLeaf7, JU_COPY7_PINDEX_TO_LONG)
-
-#define	j__udySearchLeafEmptyL(Addr,Pop0) \
-	JSLE_EVEN(Addr, Pop0, 8, Word_t)
-
-#endif // JU_64BIT
-
-
-// ----------------------------------------------------------------------------
-// START OF CODE:
-//
-// CHECK FOR SHORTCUTS:
-//
-// Error out if PIndex is null.
-
-	if (PIndex == (PWord_t) NULL)
-	{
-	    JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);
-	    return(JERRI);
-	}
-
-	Index = *PIndex;			// fast local copy.
-
-// Set and pre-decrement/increment Index, watching for underflow/overflow:
-//
-// An out-of-bounds Index means failure:  No previous/next empty index.
-
-SMGetRestart:		// return here with revised Index.
-
-#ifdef JUDYPREV
-	if (Index-- == 0) return(0);
-#else
-	if (++Index == 0) return(0);
-#endif
-
-// An empty array with an in-bounds (not underflowed/overflowed) Index means
-// success:
-//
-// Note:  This check is redundant after restarting at SMGetRestart, but should
-// take insignificant time.
-
-	if (PArray == (Pvoid_t) NULL) RET_SUCCESS;
-
-// ----------------------------------------------------------------------------
-// ROOT-LEVEL LEAF that starts with a Pop0 word; just look within the leaf:
-//
-// If Index is not in the leaf, return success; otherwise return the first
-// empty Index, if any, below/above where it would belong.
-
-	if (JU_LEAFW_POP0(PArray) < cJU_LEAFW_MAXPOP1) // must be a LEAFW
-	{
-	    Pjlw_t Pjlw = P_JLW(PArray);	// first word of leaf.
-	    pop0 = Pjlw[0];
-
-#ifdef	JUDY1
-	    if (pop0 == 0)			// special case.
-	    {
-#ifdef JUDYPREV
-		if ((Index != Pjlw[1]) || (Index-- != 0)) RET_SUCCESS;
-#else
-		if ((Index != Pjlw[1]) || (++Index != 0)) RET_SUCCESS;
-#endif
-		return(0);		// no previous/next empty index.
-	    }
-#endif // JUDY1
-
-	    j__udySearchLeafEmptyL(Pjlw + 1, pop0);
-
-//  No return -- thanks ALAN
-
-	}
-	else
-
-// ----------------------------------------------------------------------------
-// HANDLE JRP Branch:
-//
-// For JRP branches, traverse the JPM; handle LEAFW
-// directly; but look for the most common cases first.
-
-	{
-	    Pjpm_t Pjpm = P_JPM(PArray);
-	    Pjp = &(Pjpm->jpm_JP);
-
-//	    goto SMGetContinue;
-	}
-
-
-// ============================================================================
-// STATE MACHINE -- GET INDEX:
-//
-// Search for Index (already decremented/incremented so as to be an inclusive
-// search).  If not found (empty index), return success.  Otherwise do a
-// previous/next search, and if successful modify Index to the empty index
-// found.  See function header comments.
-//
-// ENTRY:  Pjp points to next JP to interpret, whose Decode bytes have not yet
-// been checked.
-//
-// Note:  Check Decode bytes at the start of each loop, not after looking up a
-// new JP, so its easy to do constant shifts/masks.
-//
-// EXIT:  Return, or branch to SMGetRestart with modified Index, or branch to
-// SMGetContinue with a modified Pjp, as described elsewhere.
-//
-// WARNING:  For run-time efficiency the following cases replicate code with
-// varying constants, rather than using common code with variable values!
-
-SMGetContinue:			// return here for next branch/leaf.
-
-#ifdef TRACEJPSE
-	JudyPrintJP(Pjp, "sf", __LINE__);
-#endif
-
-	switch (JU_JPTYPE(Pjp))
-	{
-
-
-// ----------------------------------------------------------------------------
-// LINEAR BRANCH:
-//
-// Check Decode bytes, if any, in the current JP, then search for a JP for the
-// next digit in Index.
-
-	case cJU_JPBRANCH_L2: CHECKDCD(2); SMPREPB2(SMBranchL);
-	case cJU_JPBRANCH_L3: CHECKDCD(3); SMPREPB3(SMBranchL);
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_L4: CHECKDCD(4); SMPREPB4(SMBranchL);
-	case cJU_JPBRANCH_L5: CHECKDCD(5); SMPREPB5(SMBranchL);
-	case cJU_JPBRANCH_L6: CHECKDCD(6); SMPREPB6(SMBranchL);
-	case cJU_JPBRANCH_L7: CHECKDCD(7); SMPREPB7(SMBranchL);
-#endif
-	case cJU_JPBRANCH_L:		   SMPREPBL(SMBranchL);
-
-// Common code (state-independent) for all cases of linear branches:
-
-SMBranchL:
-	    Pjbl = P_JBL(Pjp->jp_Addr);
-
-// First, check if Indexs expanse (digit) is below/above the first/last
-// populated expanse in the BranchL, in which case Index is empty; otherwise
-// find the offset of the lowest/highest populated expanse at or above/below
-// digit, if any:
-//
-// Note:  The for-loop is guaranteed to exit eventually because the first/last
-// expanse is known to be a terminator.
-//
-// Note:  Cannot use j__udySearchLeaf*Empty1() here because it only applies to
-// leaves and does not know about partial versus full JPs, unlike the use of
-// j__udySearchLeaf1() for BranchLs in SearchValid code.  Also, since linear
-// leaf expanse lists are small, dont waste time calling j__udySearchLeaf1(),
-// just scan the expanse list.
-
-#ifdef JUDYPREV
-	    if ((Pjbl->jbl_Expanse[0]) > digit) RET_SUCCESS;
-
-	    for (offset = (Pjbl->jbl_NumJPs) - 1; /* null */; --offset)
-#else
-	    if ((Pjbl->jbl_Expanse[(Pjbl->jbl_NumJPs) - 1]) < digit)
-		RET_SUCCESS;
-
-	    for (offset = 0; /* null */; ++offset)
-#endif
-	    {
-
-// Too low/high, keep going; or too high/low, meaning the loop passed a hole
-// and the initial Index is empty:
-
-#ifdef JUDYPREV
-		if ((Pjbl->jbl_Expanse[offset]) > digit) continue;
-		if ((Pjbl->jbl_Expanse[offset]) < digit) RET_SUCCESS;
-#else
-		if ((Pjbl->jbl_Expanse[offset]) < digit) continue;
-		if ((Pjbl->jbl_Expanse[offset]) > digit) RET_SUCCESS;
-#endif
-
-// Found expanse matching digit; if its not full, traverse through it:
-
-		if (! JPFULL((Pjbl->jbl_jp) + offset))
-		{
-		    Pjp = (Pjbl->jbl_jp) + offset;
-		    goto SMGetContinue;
-		}
-
-// Common code:  While searching for a lower/higher hole or a non-full JP, upon
-// finding a lower/higher hole, adjust Index using the revised digit and
-// return; or upon finding a consecutive lower/higher expanse, if the expanses
-// JP is non-full, modify Index and traverse through the JP:
-
-#define	BRANCHL_CHECK(OpIncDec,OpLeastDigits,Digit,Digits)	\
-	{							\
-	    if ((Pjbl->jbl_Expanse[offset]) != OpIncDec digit)	\
-		SET_AND_RETURN(OpLeastDigits, Digit, Digits);	\
-								\
-	    if (! JPFULL((Pjbl->jbl_jp) + offset))		\
-	    {							\
-		Pjp = (Pjbl->jbl_jp) + offset;			\
-		SET_AND_CONTINUE(OpLeastDigits, Digit, Digits);	\
-	    }							\
-	}
-
-// BranchL primary dead end:  Expanse matching Index/digit is full (rare except
-// for dense/sequential indexes):
-//
-// Search for a lower/higher hole, a non-full JP, or the end of the expanse
-// list, while decrementing/incrementing digit.
-
-#ifdef JUDYPREV
-		while (--offset >= 0)
-		    BRANCHL_CHECK(--, SETLEASTDIGITS_D, digit, digits)
-#else
-		while (++offset < Pjbl->jbl_NumJPs)
-		    BRANCHL_CHECK(++, CLEARLEASTDIGITS_D, digit, digits)
-#endif
-
-// Passed end of BranchL expanse list after finding a matching but full
-// expanse:
-//
-// Digit now matches the lowest/highest expanse, which is a full expanse; if
-// digit is at the end of BranchLs expanse (no hole before/after), break out
-// of the loop; otherwise modify Index to the next lower/higher digit and
-// return success:
-
-#ifdef JUDYPREV
-		if (digit == 0) break;
-		--digit; SET_AND_RETURN(SETLEASTDIGITS_D, digit, digits);
-#else
-		if (digit == JU_LEASTBYTES(cJU_ALLONES, 1)) break;
-		++digit; SET_AND_RETURN(CLEARLEASTDIGITS_D, digit, digits);
-#endif
-	    } // for-loop
-
-// BranchL secondary dead end, no non-full previous/next JP:
-
-	    SMRESTART(digits);
-
-
-// ----------------------------------------------------------------------------
-// BITMAP BRANCH:
-//
-// Check Decode bytes, if any, in the current JP, then search for a JP for the
-// next digit in Index.
-
-	case cJU_JPBRANCH_B2: CHECKDCD(2); SMPREPB2(SMBranchB);
-	case cJU_JPBRANCH_B3: CHECKDCD(3); SMPREPB3(SMBranchB);
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_B4: CHECKDCD(4); SMPREPB4(SMBranchB);
-	case cJU_JPBRANCH_B5: CHECKDCD(5); SMPREPB5(SMBranchB);
-	case cJU_JPBRANCH_B6: CHECKDCD(6); SMPREPB6(SMBranchB);
-	case cJU_JPBRANCH_B7: CHECKDCD(7); SMPREPB7(SMBranchB);
-#endif
-	case cJU_JPBRANCH_B:		   SMPREPBL(SMBranchB);
-
-// Common code (state-independent) for all cases of bitmap branches:
-
-SMBranchB:
-	    Pjbb = P_JBB(Pjp->jp_Addr);
-
-// Locate the digits JP in the subexpanse list, if present:
-
-	    subexp     = digit / cJU_BITSPERSUBEXPB;
-	    assert(subexp < cJU_NUMSUBEXPB);	// falls in expected range.
-	    bitposmaskB = JU_BITPOSMASKB(digit);
-
-// Absent JP = no JP matches current digit in Index:
-
-//	    if (! JU_BITMAPTESTB(Pjbb, digit))			// slower.
-	    if (! (JU_JBB_BITMAP(Pjbb, subexp) & bitposmaskB))	// faster.
-		RET_SUCCESS;
-
-// Non-full JP matches current digit in Index:
-//
-// Iterate to the subsidiary non-full JP.
-
-	    offset = SEARCHBITMAPB(JU_JBB_BITMAP(Pjbb, subexp), digit,
-				   bitposmaskB);
-	    // not negative since at least one bit is set:
-	    assert(offset >= 0);
-	    assert(offset < (int) cJU_BITSPERSUBEXPB);
-
-// Watch for null JP subarray pointer with non-null bitmap (a corruption):
-
-	    if ((Pjp = P_JP(JU_JBB_PJP(Pjbb, subexp)))
-	     == (Pjp_t) NULL) RET_CORRUPT;
-
-	    Pjp += offset;
-	    if (! JPFULL(Pjp)) goto SMGetContinue;
-
-// BranchB primary dead end:
-//
-// Upon hitting a full JP in a BranchB for the next digit in Index, search
-// sideways for a previous/next absent JP (unset bit) or non-full JP (set bit
-// with non-full JP); first in the current bitmap subexpanse, then in
-// lower/higher subexpanses.  Upon entry, Pjp points to a known-unusable JP,
-// ready to decrement/increment.
-//
-// Note:  The preceding code is separate from this loop because Index does not
-// need revising (see SET_AND_*()) if the initial index is an empty index.
-//
-// TBD:  For speed, shift bitposmaskB instead of using JU_BITMAPTESTB or
-// JU_BITPOSMASKB, but this shift has knowledge of bit order that really should
-// be encapsulated in a header file.
-
-#define	BRANCHB_CHECKBIT(OpLeastDigits)					\
-    if (! (JU_JBB_BITMAP(Pjbb, subexp) & bitposmaskB))  /* absent JP */	\
-	SET_AND_RETURN(OpLeastDigits, digit, digits)
-
-#define	BRANCHB_CHECKJPFULL(OpLeastDigits)				\
-    if (! JPFULL(Pjp))							\
-	SET_AND_CONTINUE(OpLeastDigits, digit, digits)
-
-#define	BRANCHB_STARTSUBEXP(OpLeastDigits)				\
-    if (! JU_JBB_BITMAP(Pjbb, subexp)) /* empty subexpanse, shortcut */ \
-	SET_AND_RETURN(OpLeastDigits, digit, digits)			\
-    if ((Pjp = P_JP(JU_JBB_PJP(Pjbb, subexp))) == (Pjp_t) NULL) RET_CORRUPT
-
-#ifdef JUDYPREV
-
-	    --digit;				// skip initial digit.
-	    bitposmaskB >>= 1;			// see TBD above.
-
-BranchBNextSubexp:	// return here to check next bitmap subexpanse.
-
-	    while (bitposmaskB)			// more bits to check in subexp.
-	    {
-		BRANCHB_CHECKBIT(SETLEASTDIGITS_D);
-		--Pjp;				// previous in subarray.
-		BRANCHB_CHECKJPFULL(SETLEASTDIGITS_D);
-		assert(digit >= 0);
-		--digit;
-		bitposmaskB >>= 1;
-	    }
-
-	    if (subexp-- > 0)			// more subexpanses.
-	    {
-		BRANCHB_STARTSUBEXP(SETLEASTDIGITS_D);
-		Pjp += SEARCHBITMAPMAXB(JU_JBB_BITMAP(Pjbb, subexp)) + 1;
-		bitposmaskB = (1U << (cJU_BITSPERSUBEXPB - 1));
-		goto BranchBNextSubexp;
-	    }
-
-#else // JUDYNEXT
-
-	    ++digit;				// skip initial digit.
-	    bitposmaskB <<= 1;			// note:  BITMAPB_t.
-
-BranchBNextSubexp:	// return here to check next bitmap subexpanse.
-
-	    while (bitposmaskB)			// more bits to check in subexp.
-	    {
-		BRANCHB_CHECKBIT(CLEARLEASTDIGITS_D);
-		++Pjp;				// previous in subarray.
-		BRANCHB_CHECKJPFULL(CLEARLEASTDIGITS_D);
-		assert(digit < cJU_SUBEXPPERSTATE);
-		++digit;
-		bitposmaskB <<= 1;		// note:  BITMAPB_t.
-	    }
-
-	    if (++subexp < cJU_NUMSUBEXPB)	// more subexpanses.
-	    {
-		BRANCHB_STARTSUBEXP(CLEARLEASTDIGITS_D);
-		--Pjp;				// pre-decrement.
-		bitposmaskB = 1;
-		goto BranchBNextSubexp;
-	    }
-
-#endif // JUDYNEXT
-
-// BranchB secondary dead end, no non-full previous/next JP:
-
-	    SMRESTART(digits);
-
-
-// ----------------------------------------------------------------------------
-// UNCOMPRESSED BRANCH:
-//
-// Check Decode bytes, if any, in the current JP, then search for a JP for the
-// next digit in Index.
-
-	case cJU_JPBRANCH_U2: CHECKDCD(2); SMPREPB2(SMBranchU);
-	case cJU_JPBRANCH_U3: CHECKDCD(3); SMPREPB3(SMBranchU);
-#ifdef JU_64BIT
-	case cJU_JPBRANCH_U4: CHECKDCD(4); SMPREPB4(SMBranchU);
-	case cJU_JPBRANCH_U5: CHECKDCD(5); SMPREPB5(SMBranchU);
-	case cJU_JPBRANCH_U6: CHECKDCD(6); SMPREPB6(SMBranchU);
-	case cJU_JPBRANCH_U7: CHECKDCD(7); SMPREPB7(SMBranchU);
-#endif
-	case cJU_JPBRANCH_U:		   SMPREPBL(SMBranchU);
-
-// Common code (state-independent) for all cases of uncompressed branches:
-
-SMBranchU:
-	    Pjbu = P_JBU(Pjp->jp_Addr);
-	    Pjp	 = (Pjbu->jbu_jp) + digit;
-
-// Absent JP = null JP for current digit in Index:
-
-	    if (JPNULL(JU_JPTYPE(Pjp))) RET_SUCCESS;
-
-// Non-full JP matches current digit in Index:
-//
-// Iterate to the subsidiary JP.
-
-	    if (! JPFULL(Pjp)) goto SMGetContinue;
-
-// BranchU primary dead end:
-//
-// Upon hitting a full JP in a BranchU for the next digit in Index, search
-// sideways for a previous/next null or non-full JP.  BRANCHU_CHECKJP() is
-// shorthand for common code.
-//
-// Note:  The preceding code is separate from this loop because Index does not
-// need revising (see SET_AND_*()) if the initial index is an empty index.
-
-#define	BRANCHU_CHECKJP(OpIncDec,OpLeastDigits)			\
-	{							\
-	    OpIncDec Pjp;					\
-								\
-	    if (JPNULL(JU_JPTYPE(Pjp)))				\
-		SET_AND_RETURN(OpLeastDigits, digit, digits)	\
-								\
-	    if (! JPFULL(Pjp))					\
-		SET_AND_CONTINUE(OpLeastDigits, digit, digits)	\
-	}
-
-#ifdef JUDYPREV
-	    while (digit-- > 0)
-		BRANCHU_CHECKJP(--, SETLEASTDIGITS_D);
-#else
-	    while (++digit < cJU_BRANCHUNUMJPS)
-		BRANCHU_CHECKJP(++, CLEARLEASTDIGITS_D);
-#endif
-
-// BranchU secondary dead end, no non-full previous/next JP:
-
-	    SMRESTART(digits);
-
-
-// ----------------------------------------------------------------------------
-// LINEAR LEAF:
-//
-// Check Decode bytes, if any, in the current JP, then search the leaf for the
-// previous/next empty index starting at Index.  Primary leaf dead end is
-// hidden within j__udySearchLeaf*Empty*().  In case of secondary leaf dead
-// end, restart at the top of the tree.
-//
-// Note:  Pword is the name known to GET*; think of it as Pjlw.
-
-#define	SMLEAFL(cDigits,Func)                   \
-	Pword = (PWord_t) P_JLW(Pjp->jp_Addr);  \
-	pop0  = JU_JPLEAF_POP0(Pjp);            \
-	Func(Pword, pop0)
-
-#if (defined(JUDYL) || (! defined(JU_64BIT)))
-	case cJU_JPLEAF1:  CHECKDCD(1); SMLEAFL(1, j__udySearchLeafEmpty1);
-#endif
-	case cJU_JPLEAF2:  CHECKDCD(2); SMLEAFL(2, j__udySearchLeafEmpty2);
-	case cJU_JPLEAF3:  CHECKDCD(3); SMLEAFL(3, j__udySearchLeafEmpty3);
-
-#ifdef JU_64BIT
-	case cJU_JPLEAF4:  CHECKDCD(4); SMLEAFL(4, j__udySearchLeafEmpty4);
-	case cJU_JPLEAF5:  CHECKDCD(5); SMLEAFL(5, j__udySearchLeafEmpty5);
-	case cJU_JPLEAF6:  CHECKDCD(6); SMLEAFL(6, j__udySearchLeafEmpty6);
-	case cJU_JPLEAF7:  CHECKDCD(7); SMLEAFL(7, j__udySearchLeafEmpty7);
-#endif
-
-
-// ----------------------------------------------------------------------------
-// BITMAP LEAF:
-//
-// Check Decode bytes, if any, in the current JP, then search the leaf for the
-// previous/next empty index starting at Index.
-
-	case cJU_JPLEAF_B1:
-
-	    CHECKDCD(1);
-
-	    Pjlb	= P_JLB(Pjp->jp_Addr);
-	    digit	= JU_DIGITATSTATE(Index, 1);
-	    subexp	= digit / cJU_BITSPERSUBEXPL;
-	    bitposmaskL	= JU_BITPOSMASKL(digit);
-	    assert(subexp < cJU_NUMSUBEXPL);	// falls in expected range.
-
-// Absent index = no index matches current digit in Index:
-
-//	    if (! JU_BITMAPTESTL(Pjlb, digit))			// slower.
-	    if (! (JU_JLB_BITMAP(Pjlb, subexp) & bitposmaskL))	// faster.
-		RET_SUCCESS;
-
-// LeafB1 primary dead end:
-//
-// Upon hitting a valid (non-empty) index in a LeafB1 for the last digit in
-// Index, search sideways for a previous/next absent index, first in the
-// current bitmap subexpanse, then in lower/higher subexpanses.
-// LEAFB1_CHECKBIT() is shorthand for common code to handle one bit in one
-// bitmap subexpanse.
-//
-// Note:  The preceding code is separate from this loop because Index does not
-// need revising (see SET_AND_*()) if the initial index is an empty index.
-//
-// TBD:  For speed, shift bitposmaskL instead of using JU_BITMAPTESTL or
-// JU_BITPOSMASKL, but this shift has knowledge of bit order that really should
-// be encapsulated in a header file.
-
-#define	LEAFB1_CHECKBIT(OpLeastDigits)				\
-	if (! (JU_JLB_BITMAP(Pjlb, subexp) & bitposmaskL))	\
-	    SET_AND_RETURN(OpLeastDigits, digit, 1)
-
-#define	LEAFB1_STARTSUBEXP(OpLeastDigits)			\
-	if (! JU_JLB_BITMAP(Pjlb, subexp)) /* empty subexp */	\
-	    SET_AND_RETURN(OpLeastDigits, digit, 1)
-
-#ifdef JUDYPREV
-
-	    --digit;				// skip initial digit.
-	    bitposmaskL >>= 1;			// see TBD above.
-
-LeafB1NextSubexp:	// return here to check next bitmap subexpanse.
-
-	    while (bitposmaskL)			// more bits to check in subexp.
-	    {
-		LEAFB1_CHECKBIT(SETLEASTDIGITS_D);
-		assert(digit >= 0);
-		--digit;
-		bitposmaskL >>= 1;
-	    }
-
-	    if (subexp-- > 0)		// more subexpanses.
-	    {
-		LEAFB1_STARTSUBEXP(SETLEASTDIGITS_D);
-		bitposmaskL = ((Word_t)1U << (cJU_BITSPERSUBEXPL - 1));
-		goto LeafB1NextSubexp;
-	    }
-
-#else // JUDYNEXT
-
-	    ++digit;				// skip initial digit.
-	    bitposmaskL <<= 1;			// note:  BITMAPL_t.
-
-LeafB1NextSubexp:	// return here to check next bitmap subexpanse.
-
-	    while (bitposmaskL)			// more bits to check in subexp.
-	    {
-		LEAFB1_CHECKBIT(CLEARLEASTDIGITS_D);
-		assert(digit < cJU_SUBEXPPERSTATE);
-		++digit;
-		bitposmaskL <<= 1;		// note:  BITMAPL_t.
-	    }
-
-	    if (++subexp < cJU_NUMSUBEXPL)	// more subexpanses.
-	    {
-		LEAFB1_STARTSUBEXP(CLEARLEASTDIGITS_D);
-		bitposmaskL = 1;
-		goto LeafB1NextSubexp;
-	    }
-
-#endif // JUDYNEXT
-
-// LeafB1 secondary dead end, no empty index:
-
-	    SMRESTART(1);
-
-
-#ifdef JUDY1
-// ----------------------------------------------------------------------------
-// FULL POPULATION:
-//
-// If the Decode bytes do not match, Index is empty (without modification);
-// otherwise restart.
-
-	case cJ1_JPFULLPOPU1:
-
-	    CHECKDCD(1);
-	    SMRESTART(1);
-#endif
-
-
-// ----------------------------------------------------------------------------
-// IMMEDIATE:
-//
-// Pop1 = 1 Immediate JPs:
-//
-// If Index is not in the immediate JP, return success; otherwise check if
-// there is an empty index below/above the immediate JPs index, and if so,
-// return success with modified Index, else restart.
-//
-// Note:  Doug says its fast enough to calculate the index size (digits) in
-// the following; no need to set it separately for each case.
-
-	case cJU_JPIMMED_1_01:
-	case cJU_JPIMMED_2_01:
-	case cJU_JPIMMED_3_01:
-#ifdef JU_64BIT
-	case cJU_JPIMMED_4_01:
-	case cJU_JPIMMED_5_01:
-	case cJU_JPIMMED_6_01:
-	case cJU_JPIMMED_7_01:
-#endif
-	    if (JU_JPDCDPOP0(Pjp) != JU_TRIMTODCDSIZE(Index)) RET_SUCCESS;
-	    digits = JU_JPTYPE(Pjp) - cJU_JPIMMED_1_01 + 1;
-	    LEAF_EDGE(JU_LEASTBYTES(JU_JPDCDPOP0(Pjp), digits), digits);
-
-// Immediate JPs with Pop1 > 1:
-
-#define	IMM_MULTI(Func,BaseJPType)			\
-	JUDY1CODE(Pword = (PWord_t) (Pjp->jp_1Index);)	\
-	JUDYLCODE(Pword = (PWord_t) (Pjp->jp_LIndex);)	\
-	Func(Pword, JU_JPTYPE(Pjp) - (BaseJPType) + 1)
-
-	case cJU_JPIMMED_1_02:
-	case cJU_JPIMMED_1_03:
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_1_04:
-	case cJU_JPIMMED_1_05:
-	case cJU_JPIMMED_1_06:
-	case cJU_JPIMMED_1_07:
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_1_08:
-	case cJ1_JPIMMED_1_09:
-	case cJ1_JPIMMED_1_10:
-	case cJ1_JPIMMED_1_11:
-	case cJ1_JPIMMED_1_12:
-	case cJ1_JPIMMED_1_13:
-	case cJ1_JPIMMED_1_14:
-	case cJ1_JPIMMED_1_15:
-#endif
-	    IMM_MULTI(j__udySearchLeafEmpty1, cJU_JPIMMED_1_02);
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_2_02:
-	case cJU_JPIMMED_2_03:
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_2_04:
-	case cJ1_JPIMMED_2_05:
-	case cJ1_JPIMMED_2_06:
-	case cJ1_JPIMMED_2_07:
-#endif
-#if (defined(JUDY1) || defined(JU_64BIT))
-	    IMM_MULTI(j__udySearchLeafEmpty2, cJU_JPIMMED_2_02);
-#endif
-
-#if (defined(JUDY1) || defined(JU_64BIT))
-	case cJU_JPIMMED_3_02:
-#endif
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_3_03:
-	case cJ1_JPIMMED_3_04:
-	case cJ1_JPIMMED_3_05:
-#endif
-#if (defined(JUDY1) || defined(JU_64BIT))
-	    IMM_MULTI(j__udySearchLeafEmpty3, cJU_JPIMMED_3_02);
-#endif
-
-#if (defined(JUDY1) && defined(JU_64BIT))
-	case cJ1_JPIMMED_4_02:
-	case cJ1_JPIMMED_4_03:
-	    IMM_MULTI(j__udySearchLeafEmpty4, cJ1_JPIMMED_4_02);
-
-	case cJ1_JPIMMED_5_02:
-	case cJ1_JPIMMED_5_03:
-	    IMM_MULTI(j__udySearchLeafEmpty5, cJ1_JPIMMED_5_02);
-
-	case cJ1_JPIMMED_6_02:
-	    IMM_MULTI(j__udySearchLeafEmpty6, cJ1_JPIMMED_6_02);
-
-	case cJ1_JPIMMED_7_02:
-	    IMM_MULTI(j__udySearchLeafEmpty7, cJ1_JPIMMED_7_02);
-#endif
-
-
-// ----------------------------------------------------------------------------
-// INVALID JP TYPE:
-
-	default: RET_CORRUPT;
-
-	} // SMGet switch.
-
-} // Judy1PrevEmpty() / Judy1NextEmpty() / JudyLPrevEmpty() / JudyLNextEmpty()
diff --git a/libs/klib/judy/JudyPrintJP.c b/libs/klib/judy/JudyPrintJP.c
deleted file mode 100644
index 3764da1..0000000
--- a/libs/klib/judy/JudyPrintJP.c
+++ /dev/null
@@ -1,399 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// JudyPrintJP() debugging/tracing function for Judy1 or JudyL code.
-// The caller should #include this file, with its static function (replicated
-// in each compilation unit), in another *.c file, and compile with one of
-// -DJUDY1 or -DJUDYL.
-//
-// The caller can set j__udyIndex and/or j__udyPopulation non-zero to have
-// those values reported, and also to control trace-enabling (see below).
-//
-// Tracing is disabled by default unless one or both of two env parameters is
-// set (regardless of value).  If either value is set but null or evaluates to
-// zero, tracing is immediately enabled.  To disable tracing until a particular
-// j__udy*Index value is seen, set STARTINDEX=<hex-index> in the env.  To
-// disable it until a particular j__udy*Population value is seen, set
-// STARTPOP=<decimal-population> in the env.  Once either condition is met,
-// tracing "latches on".
-//
-// Example:
-//
-//      STARTPOP=0              // immediate tracing.
-//      STARTINDEX=f35430a8     // not until one of these is met.
-//      STARTPOP=1000000
-//
-// Note:  Trace-enabling does nothing unless the caller sets the appropriate
-// global variable non-zero.
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#include <stdlib.h>             // for getenv() and strtoul().
-
-
-// GLOBALS FROM CALLER:
-//
-// Note:  This storage is declared once in each compilation unit that includes
-// this file, but the linker should merge all cases into single locations, but
-// ONLY if these are uninitialized, so ASSUME they are 0 to start.
-
-Word_t j__udyIndex;             // current Index itself, optional from caller.
-Word_t j__udyPopulation;        // Indexes in array, optional from caller.
-
-// Other globals:
-
-static Word_t startindex = 0;           // see usage below.
-static Word_t startpop   = 0;
-static bool_t enabled    = FALSE;       // by default, unless env params set.
-
-// Shorthand for announcing JP addresses, Desc (in context), and JP types:
-//
-// Note:  Width is at least one blank wider than any JP type name, and the line
-// is left unfinished.
-//
-// Note:  Use a format for address printing compatible with other tracing
-// facilities; in particular, %x not %lx, to truncate the "noisy" high part on
-// 64-bit systems.
-
-#define JPTYPE(Type)  printf("0x%lx %s %-17s", (Word_t) Pjp, Desc, Type)
-
-// Shorthands for announcing expanse populations from DcdPopO fields:
-
-#define POP0 printf("Pop1 = 0 ")
-#define POP1 printf("Pop1 = %ld ", (Word_t) ((JU_JPDCDPOP0(Pjp) &            0xff) + 1))
-#define POP2 printf("Pop1 = %ld ", (Word_t) ((JU_JPDCDPOP0(Pjp) &          0xffff) + 1))
-#define POP3 printf("Pop1 = %ld ", (Word_t) ((JU_JPDCDPOP0(Pjp) &        0xffffff) + 1))
-#ifdef JU_64BIT
-#define POP4 printf("Pop1 = %ld ", (Word_t) ((JU_JPDCDPOP0(Pjp) &       0xffffffff) + 1))
-#define POP5 printf("Pop1 = %ld ", (Word_t) ((JU_JPDCDPOP0(Pjp) &     0xffffffffff) + 1))
-#define POP6 printf("Pop1 = %ld ", (Word_t) ((JU_JPDCDPOP0(Pjp) &   0xffffffffffff) + 1))
-#define POP7 printf("Pop1 = %ld ", (Word_t) ((JU_JPDCDPOP0(Pjp) & 0xffffffffffffff) + 1))
-#endif
-
-// Shorthands for announcing populations of Immeds:
-//
-// Note:  Line up the small populations that often occur together, but beyond
-// that, dont worry about it because populations can get arbitrarily large.
-
-#define POP_1   printf("Pop1 =  1 ")
-#define POP_2   printf("Pop1 =  2 ")
-#define POP_3   printf("Pop1 =  3 ")
-#define POP_4   printf("Pop1 =  4 ")
-#define POP_5   printf("Pop1 =  5 ")
-#define POP_6   printf("Pop1 =  6 ")
-#define POP_7   printf("Pop1 =  7 ")
-#define POP_8   printf("Pop1 =  8 ")
-#define POP_9   printf("Pop1 =  8 ")
-#define POP_10  printf("Pop1 = 10 ")
-#define POP_11  printf("Pop1 = 11 ")
-#define POP_12  printf("Pop1 = 12 ")
-#define POP_13  printf("Pop1 = 13 ")
-#define POP_14  printf("Pop1 = 14 ")
-#define POP_15  printf("Pop1 = 15 ")
-
-// Shorthands for other announcements:
-
-#define NUMJPSL printf("NumJPs = %d ", P_JBL(Pjp->jp_Addr)->jbl_NumJPs)
-#define OOPS    printf("-- OOPS, invalid Type\n"); exit(1)
-
-// This is harder to compute:
-
-#define NUMJPSB                                                         \
-        {                                                               \
-            Pjbb_t Pjbb = P_JBB(Pjp->jp_Addr);                          \
-            Word_t subexp;                                              \
-            int    numJPs = 0;                                          \
-                                                                        \
-            for (subexp = 0; subexp < cJU_NUMSUBEXPB; ++subexp)         \
-                numJPs += j__udyCountBitsB(JU_JBB_BITMAP(Pjbb, subexp));\
-                                                                        \
-            printf("NumJPs = %d ", numJPs);                             \
-        }
-
-
-// ****************************************************************************
-// J U D Y   P R I N T   J P
-//
-// Dump information about a JP, at least its address, type, population, and
-// number of JPs, as appropriate.  Error out upon any unexpected JP type.
-//
-// TBD:  Dump more detailed information about the JP?
-
-FUNCTION static void JudyPrintJP(
-        Pjp_t  Pjp,             // JP to describe.
-        char * Desc,            // brief description of caller, such as "i".
-        int    Line)            // callers source line number.
-{
-static  bool_t checked = FALSE; // set upon first entry and check for params.
-        char * value;           // for getenv().
-
-
-// CHECK FOR EXTERNAL ENABLING:
-//
-// If a parameter is set, report the value, even if it is null or otherwise
-// evaluates to zero, in which case enable tracing immediately; otherwise wait
-// for the value to be hit.
-
-#define GETENV(Name,Value,Base)                                 \
-        if ((value = getenv (Name)) != (char *) NULL)           \
-        {                                                       \
-            (Value) = strtoul (value, (char **) NULL, Base);    \
-            enabled |= ((Value) == 0);  /* see above */         \
-                                                                \
-            (void) printf ("JudyPrintJP(\"%s\"): $%s = %lu\n",  \
-                           Desc, Name, Value);                  \
-        }
-
-        if (! checked)  // only check once.
-        {
-            checked = TRUE;
-
-            GETENV ("STARTINDEX", startindex, 16);
-            GETENV ("STARTPOP",   startpop,   10);
-
-            (void) printf ("JudyPrintJP(\"%s\"): Tracing present %s\n", Desc,
-                           enabled ? "and immediately enabled" :
-                           (startindex || startpop) ?
-                           "but disabled until start condition met" :
-                           "but not enabled by env parameter");
-        }
-
-        if (! enabled)  // check repeatedly until latched enabled:
-        {
-            if (startindex && (startindex == j__udyIndex))
-            {
-                 (void) printf ("=== TRACING ENABLED (\"%s\"), "
-                                "startindex = 0x%lx\n", Desc, startindex);
-                 enabled = TRUE;
-            }
-            else if (startpop && (startpop == j__udyPopulation))
-            {
-                 (void) printf ("=== TRACING ENABLED (\"%s\"), "
-                                "startpop = %lu\n", Desc, startpop);
-                 enabled = TRUE;
-            }
-            else
-            {
-                return;         // print nothing this time.
-            }
-        }
-
-
-// SWITCH ON JP TYPE:
-
-        switch (JU_JPTYPE(Pjp))
-        {
-
-// Note:  The following COULD be merged more tightly between Judy1 and JudyL,
-// but we decided that the output should say cJ1*/cJL*, not cJU*, to be more
-// specific.
-
-#ifdef JUDY1
-        case cJ1_JPNULL1:       JPTYPE("cJ1_JPNULL1"); POP0;            break;
-        case cJ1_JPNULL2:       JPTYPE("cJ1_JPNULL2"); POP0;            break;
-        case cJ1_JPNULL3:       JPTYPE("cJ1_JPNULL3"); POP0;            break;
-#ifdef JU_64BIT
-        case cJ1_JPNULL4:       JPTYPE("cJ1_JPNULL4"); POP0;            break;
-        case cJ1_JPNULL5:       JPTYPE("cJ1_JPNULL5"); POP0;            break;
-        case cJ1_JPNULL6:       JPTYPE("cJ1_JPNULL6"); POP0;            break;
-        case cJ1_JPNULL7:       JPTYPE("cJ1_JPNULL7"); POP0;            break;
-#endif
-
-        case cJ1_JPBRANCH_L2:   JPTYPE("cJ1_JPBRANCH_L2"); POP2;NUMJPSL;break;
-        case cJ1_JPBRANCH_L3:   JPTYPE("cJ1_JPBRANCH_L3"); POP3;NUMJPSL;break;
-#ifdef JU_64BIT
-        case cJ1_JPBRANCH_L4:   JPTYPE("cJ1_JPBRANCH_L4"); POP4;NUMJPSL;break;
-        case cJ1_JPBRANCH_L5:   JPTYPE("cJ1_JPBRANCH_L5"); POP5;NUMJPSL;break;
-        case cJ1_JPBRANCH_L6:   JPTYPE("cJ1_JPBRANCH_L6"); POP6;NUMJPSL;break;
-        case cJ1_JPBRANCH_L7:   JPTYPE("cJ1_JPBRANCH_L7"); POP7;NUMJPSL;break;
-#endif
-        case cJ1_JPBRANCH_L:    JPTYPE("cJ1_JPBRANCH_L");       NUMJPSL;break;
-
-        case cJ1_JPBRANCH_B2:   JPTYPE("cJ1_JPBRANCH_B2"); POP2;NUMJPSB;break;
-        case cJ1_JPBRANCH_B3:   JPTYPE("cJ1_JPBRANCH_B3"); POP3;NUMJPSB;break;
-#ifdef JU_64BIT
-        case cJ1_JPBRANCH_B4:   JPTYPE("cJ1_JPBRANCH_B4"); POP4;NUMJPSB;break;
-        case cJ1_JPBRANCH_B5:   JPTYPE("cJ1_JPBRANCH_B5"); POP5;NUMJPSB;break;
-        case cJ1_JPBRANCH_B6:   JPTYPE("cJ1_JPBRANCH_B6"); POP6;NUMJPSB;break;
-        case cJ1_JPBRANCH_B7:   JPTYPE("cJ1_JPBRANCH_B7"); POP7;NUMJPSB;break;
-#endif
-        case cJ1_JPBRANCH_B:    JPTYPE("cJ1_JPBRANCH_B");       NUMJPSB;break;
-
-        case cJ1_JPBRANCH_U2:   JPTYPE("cJ1_JPBRANCH_U2"); POP2;        break;
-        case cJ1_JPBRANCH_U3:   JPTYPE("cJ1_JPBRANCH_U3"); POP3;        break;
-#ifdef JU_64BIT
-        case cJ1_JPBRANCH_U4:   JPTYPE("cJ1_JPBRANCH_U4"); POP4;        break;
-        case cJ1_JPBRANCH_U5:   JPTYPE("cJ1_JPBRANCH_U5"); POP5;        break;
-        case cJ1_JPBRANCH_U6:   JPTYPE("cJ1_JPBRANCH_U6"); POP6;        break;
-        case cJ1_JPBRANCH_U7:   JPTYPE("cJ1_JPBRANCH_U7"); POP7;        break;
-#endif
-        case cJ1_JPBRANCH_U:    JPTYPE("cJ1_JPBRANCH_U");               break;
-
-#ifndef JU_64BIT
-        case cJ1_JPLEAF1:       JPTYPE("cJ1_JPLEAF1"); POP1;            break;
-#endif
-        case cJ1_JPLEAF2:       JPTYPE("cJ1_JPLEAF2"); POP2;            break;
-        case cJ1_JPLEAF3:       JPTYPE("cJ1_JPLEAF3"); POP3;            break;
-#ifdef JU_64BIT
-        case cJ1_JPLEAF4:       JPTYPE("cJ1_JPLEAF4"); POP4;            break;
-        case cJ1_JPLEAF5:       JPTYPE("cJ1_JPLEAF5"); POP5;            break;
-        case cJ1_JPLEAF6:       JPTYPE("cJ1_JPLEAF6"); POP6;            break;
-        case cJ1_JPLEAF7:       JPTYPE("cJ1_JPLEAF7"); POP7;            break;
-#endif
-
-        case cJ1_JPLEAF_B1:     JPTYPE("cJ1_JPLEAF_B1");    POP1;       break;
-        case cJ1_JPFULLPOPU1:   JPTYPE("cJ1_JPFULLPOPU1");  POP1;       break;
-
-        case cJ1_JPIMMED_1_01:  JPTYPE("cJ1_JPIMMED_1_01"); POP_1;      break;
-        case cJ1_JPIMMED_2_01:  JPTYPE("cJ1_JPIMMED_2_01"); POP_1;      break;
-        case cJ1_JPIMMED_3_01:  JPTYPE("cJ1_JPIMMED_3_01"); POP_1;      break;
-#ifdef JU_64BIT
-        case cJ1_JPIMMED_4_01:  JPTYPE("cJ1_JPIMMED_4_01"); POP_1;      break;
-        case cJ1_JPIMMED_5_01:  JPTYPE("cJ1_JPIMMED_5_01"); POP_1;      break;
-        case cJ1_JPIMMED_6_01:  JPTYPE("cJ1_JPIMMED_6_01"); POP_1;      break;
-        case cJ1_JPIMMED_7_01:  JPTYPE("cJ1_JPIMMED_7_01"); POP_1;      break;
-#endif
-
-        case cJ1_JPIMMED_1_02:  JPTYPE("cJ1_JPIMMED_1_02"); POP_2;      break;
-        case cJ1_JPIMMED_1_03:  JPTYPE("cJ1_JPIMMED_1_03"); POP_3;      break;
-        case cJ1_JPIMMED_1_04:  JPTYPE("cJ1_JPIMMED_1_04"); POP_4;      break;
-        case cJ1_JPIMMED_1_05:  JPTYPE("cJ1_JPIMMED_1_05"); POP_5;      break;
-        case cJ1_JPIMMED_1_06:  JPTYPE("cJ1_JPIMMED_1_06"); POP_6;      break;
-        case cJ1_JPIMMED_1_07:  JPTYPE("cJ1_JPIMMED_1_07"); POP_7;      break;
-#ifdef JU_64BIT
-        case cJ1_JPIMMED_1_08:  JPTYPE("cJ1_JPIMMED_1_08"); POP_8;      break;
-        case cJ1_JPIMMED_1_09:  JPTYPE("cJ1_JPIMMED_1_09"); POP_9;      break;
-        case cJ1_JPIMMED_1_10:  JPTYPE("cJ1_JPIMMED_1_10"); POP_10;     break;
-        case cJ1_JPIMMED_1_11:  JPTYPE("cJ1_JPIMMED_1_11"); POP_11;     break;
-        case cJ1_JPIMMED_1_12:  JPTYPE("cJ1_JPIMMED_1_12"); POP_12;     break;
-        case cJ1_JPIMMED_1_13:  JPTYPE("cJ1_JPIMMED_1_13"); POP_13;     break;
-        case cJ1_JPIMMED_1_14:  JPTYPE("cJ1_JPIMMED_1_14"); POP_14;     break;
-        case cJ1_JPIMMED_1_15:  JPTYPE("cJ1_JPIMMED_1_15"); POP_15;     break;
-#endif
-        case cJ1_JPIMMED_2_02:  JPTYPE("cJ1_JPIMMED_2_02"); POP_2;      break;
-        case cJ1_JPIMMED_2_03:  JPTYPE("cJ1_JPIMMED_2_03"); POP_3;      break;
-#ifdef JU_64BIT
-        case cJ1_JPIMMED_2_04:  JPTYPE("cJ1_JPIMMED_2_04"); POP_4;      break;
-        case cJ1_JPIMMED_2_05:  JPTYPE("cJ1_JPIMMED_2_05"); POP_5;      break;
-        case cJ1_JPIMMED_2_06:  JPTYPE("cJ1_JPIMMED_2_06"); POP_6;      break;
-        case cJ1_JPIMMED_2_07:  JPTYPE("cJ1_JPIMMED_2_07"); POP_7;      break;
-#endif
-
-        case cJ1_JPIMMED_3_02:  JPTYPE("cJ1_JPIMMED_3_02"); POP_2;      break;
-#ifdef JU_64BIT
-        case cJ1_JPIMMED_3_03:  JPTYPE("cJ1_JPIMMED_3_03"); POP_3;      break;
-        case cJ1_JPIMMED_3_04:  JPTYPE("cJ1_JPIMMED_3_04"); POP_4;      break;
-        case cJ1_JPIMMED_3_05:  JPTYPE("cJ1_JPIMMED_3_05"); POP_5;      break;
-        case cJ1_JPIMMED_4_02:  JPTYPE("cJ1_JPIMMED_4_02"); POP_2;      break;
-        case cJ1_JPIMMED_4_03:  JPTYPE("cJ1_JPIMMED_4_03"); POP_3;      break;
-        case cJ1_JPIMMED_5_02:  JPTYPE("cJ1_JPIMMED_5_02"); POP_2;      break;
-        case cJ1_JPIMMED_5_03:  JPTYPE("cJ1_JPIMMED_5_03"); POP_3;      break;
-        case cJ1_JPIMMED_6_02:  JPTYPE("cJ1_JPIMMED_6_02"); POP_2;      break;
-        case cJ1_JPIMMED_7_02:  JPTYPE("cJ1_JPIMMED_7_02"); POP_2;      break;
-#endif
-        case cJ1_JPIMMED_CAP:   JPTYPE("cJ1_JPIMMED_CAP");              OOPS;
-
-#else // JUDYL ===============================================================
-
-        case cJL_JPNULL1:       JPTYPE("cJL_JPNULL1"); POP0;            break;
-        case cJL_JPNULL2:       JPTYPE("cJL_JPNULL2"); POP0;            break;
-        case cJL_JPNULL3:       JPTYPE("cJL_JPNULL3"); POP0;            break;
-#ifdef JU_64BIT
-        case cJL_JPNULL4:       JPTYPE("cJL_JPNULL4"); POP0;            break;
-        case cJL_JPNULL5:       JPTYPE("cJL_JPNULL5"); POP0;            break;
-        case cJL_JPNULL6:       JPTYPE("cJL_JPNULL6"); POP0;            break;
-        case cJL_JPNULL7:       JPTYPE("cJL_JPNULL7"); POP0;            break;
-#endif
-
-        case cJL_JPBRANCH_L2:   JPTYPE("cJL_JPBRANCH_L2"); POP2;NUMJPSL;break;
-        case cJL_JPBRANCH_L3:   JPTYPE("cJL_JPBRANCH_L3"); POP3;NUMJPSL;break;
-#ifdef JU_64BIT
-        case cJL_JPBRANCH_L4:   JPTYPE("cJL_JPBRANCH_L4"); POP4;NUMJPSL;break;
-        case cJL_JPBRANCH_L5:   JPTYPE("cJL_JPBRANCH_L5"); POP5;NUMJPSL;break;
-        case cJL_JPBRANCH_L6:   JPTYPE("cJL_JPBRANCH_L6"); POP6;NUMJPSL;break;
-        case cJL_JPBRANCH_L7:   JPTYPE("cJL_JPBRANCH_L7"); POP7;NUMJPSL;break;
-#endif
-        case cJL_JPBRANCH_L:    JPTYPE("cJL_JPBRANCH_L");       NUMJPSL;break;
-
-        case cJL_JPBRANCH_B2:   JPTYPE("cJL_JPBRANCH_B2"); POP2;NUMJPSB;break;
-        case cJL_JPBRANCH_B3:   JPTYPE("cJL_JPBRANCH_B3"); POP3;NUMJPSB;break;
-#ifdef JU_64BIT
-        case cJL_JPBRANCH_B4:   JPTYPE("cJL_JPBRANCH_B4"); POP4;NUMJPSB;break;
-        case cJL_JPBRANCH_B5:   JPTYPE("cJL_JPBRANCH_B5"); POP5;NUMJPSB;break;
-        case cJL_JPBRANCH_B6:   JPTYPE("cJL_JPBRANCH_B6"); POP6;NUMJPSB;break;
-        case cJL_JPBRANCH_B7:   JPTYPE("cJL_JPBRANCH_B7"); POP7;NUMJPSB;break;
-#endif
-        case cJL_JPBRANCH_B:    JPTYPE("cJL_JPBRANCH_B");       NUMJPSB;break;
-
-        case cJL_JPBRANCH_U2:   JPTYPE("cJL_JPBRANCH_U2"); POP2;        break;
-        case cJL_JPBRANCH_U3:   JPTYPE("cJL_JPBRANCH_U3"); POP3;        break;
-#ifdef JU_64BIT
-        case cJL_JPBRANCH_U4:   JPTYPE("cJL_JPBRANCH_U4"); POP4;        break;
-        case cJL_JPBRANCH_U5:   JPTYPE("cJL_JPBRANCH_U5"); POP5;        break;
-        case cJL_JPBRANCH_U6:   JPTYPE("cJL_JPBRANCH_U6"); POP6;        break;
-        case cJL_JPBRANCH_U7:   JPTYPE("cJL_JPBRANCH_U7"); POP7;        break;
-#endif
-        case cJL_JPBRANCH_U:    JPTYPE("cJL_JPBRANCH_U");               break;
-
-        case cJL_JPLEAF1:       JPTYPE("cJL_JPLEAF1"); POP1;            break;
-        case cJL_JPLEAF2:       JPTYPE("cJL_JPLEAF2"); POP2;            break;
-        case cJL_JPLEAF3:       JPTYPE("cJL_JPLEAF3"); POP3;            break;
-#ifdef JU_64BIT
-        case cJL_JPLEAF4:       JPTYPE("cJL_JPLEAF4"); POP4;            break;
-        case cJL_JPLEAF5:       JPTYPE("cJL_JPLEAF5"); POP5;            break;
-        case cJL_JPLEAF6:       JPTYPE("cJL_JPLEAF6"); POP6;            break;
-        case cJL_JPLEAF7:       JPTYPE("cJL_JPLEAF7"); POP7;            break;
-#endif
-
-        case cJL_JPLEAF_B1:     JPTYPE("cJL_JPLEAF_B1"); POP1;  break;
-
-        case cJL_JPIMMED_1_01:  JPTYPE("cJL_JPIMMED_1_01"); POP_1;      break;
-        case cJL_JPIMMED_2_01:  JPTYPE("cJL_JPIMMED_2_01"); POP_1;      break;
-        case cJL_JPIMMED_3_01:  JPTYPE("cJL_JPIMMED_3_01"); POP_1;      break;
-#ifdef JU_64BIT
-        case cJL_JPIMMED_4_01:  JPTYPE("cJL_JPIMMED_4_01"); POP_1;      break;
-        case cJL_JPIMMED_5_01:  JPTYPE("cJL_JPIMMED_5_01"); POP_1;      break;
-        case cJL_JPIMMED_6_01:  JPTYPE("cJL_JPIMMED_6_01"); POP_1;      break;
-        case cJL_JPIMMED_7_01:  JPTYPE("cJL_JPIMMED_7_01"); POP_1;      break;
-#endif
-
-        case cJL_JPIMMED_1_02:  JPTYPE("cJL_JPIMMED_1_02"); POP_2;      break;
-        case cJL_JPIMMED_1_03:  JPTYPE("cJL_JPIMMED_1_03"); POP_3;      break;
-#ifdef JU_64BIT
-        case cJL_JPIMMED_1_04:  JPTYPE("cJL_JPIMMED_1_04"); POP_4;      break;
-        case cJL_JPIMMED_1_05:  JPTYPE("cJL_JPIMMED_1_05"); POP_5;      break;
-        case cJL_JPIMMED_1_06:  JPTYPE("cJL_JPIMMED_1_06"); POP_6;      break;
-        case cJL_JPIMMED_1_07:  JPTYPE("cJL_JPIMMED_1_07"); POP_7;      break;
-        case cJL_JPIMMED_2_02:  JPTYPE("cJL_JPIMMED_2_02"); POP_2;      break;
-        case cJL_JPIMMED_2_03:  JPTYPE("cJL_JPIMMED_2_03"); POP_3;      break;
-        case cJL_JPIMMED_3_02:  JPTYPE("cJL_JPIMMED_3_02"); POP_2;      break;
-#endif
-        case cJL_JPIMMED_CAP:   JPTYPE("cJL_JPIMMED_CAP");      OOPS;
-
-#endif // JUDYL
-
-        default:  printf("Unknown Type = %d", JU_JPTYPE(Pjp));          OOPS;
-        }
-
-        if (j__udyIndex)        printf("Index = 0x%lx", j__udyIndex);
-        if (j__udyPopulation)   printf("Pop = %lu",     j__udyPopulation);
-
-        printf("line = %d\n", Line);
-
-} // JudyPrintJP()
diff --git a/libs/klib/judy/JudyPrivate.h b/libs/klib/judy/JudyPrivate.h
deleted file mode 100644
index 0d0c5f3..0000000
--- a/libs/klib/judy/JudyPrivate.h
+++ /dev/null
@@ -1,1610 +0,0 @@
-#ifndef _JUDYPRIVATE_INCLUDED
-#define _JUDYPRIVATE_INCLUDED
-// _________________
-//
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// Header file for all Judy sources, for global but private (non-exported)
-// declarations.
-
-#include "Judy.h"
-
-// ****************************************************************************
-// A VERY BRIEF EXPLANATION OF A JUDY ARRAY
-//
-// A Judy array is, effectively, a digital tree (or Trie) with 256 element
-// branches (nodes), and with "compression tricks" applied to low-population
-// branches or leaves to save a lot of memory at the cost of relatively little
-// CPU time or cache fills.
-//
-// In the actual implementation, a Judy array is level-less, and traversing the
-// "tree" actually means following the states in a state machine (SM) as
-// directed by the Index.  A Judy array is referred to here as an "SM", rather
-// than as a "tree"; having "states", rather than "levels".
-//
-// Each branch or leaf in the SM decodes a portion ("digit") of the original
-// Index; with 256-way branches there are 8 bits per digit.  There are 3 kinds
-// of branches, called:  Linear, Bitmap and Uncompressed, of which the first 2
-// are compressed to contain no NULL entries.
-//
-// An Uncompressed branch has a 1.0 cache line fill cost to decode 8 bits of
-// (digit, part of an Index), but it might contain many NULL entries, and is
-// therefore inefficient with memory if lightly populated.
-//
-// A Linear branch has a ~1.75 cache line fill cost when at maximum population.
-// A Bitmap branch has ~2.0 cache line fills.  Linear and Bitmap branches are
-// converted to Uncompressed branches when the additional memory can be
-// amortized with larger populations.  Higher-state branches have higher
-// priority to be converted.
-//
-// Linear branches can hold 28 elements (based on detailed analysis) -- thus 28
-// expanses.  A Linear branch is converted to a Bitmap branch when the 29th
-// expanse is required.
-//
-// A Bitmap branch could hold 256 expanses, but is forced to convert to an
-// Uncompressed branch when 185 expanses are required.  Hopefully, it is
-// converted before that because of population growth (again, based on detailed
-// analysis and heuristics in the code).
-//
-// A path through the SM terminates to a leaf when the Index (or key)
-// population in the expanse below a pointer will fit into 1 or 2 cache lines
-// (~31..255 Indexes).  A maximum-population Leaf has ~1.5 cache line fill
-// cost.
-//
-// Leaves are sorted arrays of Indexes, where the Index Sizes (IS) are:  0, 1,
-// 8, 16, 24, 32, [40, 48, 56, 64] bits.  The IS depends on the "density"
-// (population/expanse) of the values in the Leaf.  Zero bits are possible if
-// population == expanse in the SM (that is, a full small expanse).
-//
-// Elements of a branches are called Judy Pointers (JPs).  Each JP object
-// points to the next object in the SM, plus, a JP can decode an additional
-// 2[6] bytes of an Index, but at the cost of "narrowing" the expanse
-// represented by the next object in the SM.  A "narrow" JP (one which has
-// decode bytes/digits) is a way of skipping states in the SM.
-//
-// Although counterintuitive, we think a Judy SM is optimal when the Leaves are
-// stored at MINIMUM compression (narrowing, or use of Decode bytes).  If more
-// aggressive compression was used, decompression of a leaf be required to
-// insert an index.  Additional compression would save a little memory but not
-// help performance significantly.
-
-
-#ifdef A_PICTURE_IS_WORTH_1000_WORDS
-*******************************************************************************
-
-JUDY 32-BIT STATE MACHINE (SM) EXAMPLE, FOR INDEX = 0x02040103
-
-The Index used in this example is purposely chosen to allow small, simple
-examples below; each 1-byte "digit" from the Index has a small numeric value
-that fits in one column.  In the drawing below:
-
-   JRP  == Judy Root Pointer;
-
-    C   == 1 byte of a 1..3 byte Population (count of Indexes) below this
-           pointer.  Since this is shared with the Decode field, the combined
-           sizes must be 3[7], that is, 1 word less 1 byte for the JP Type.
-
-   The 1-byte field jp_Type is represented as:
-
-   1..3 == Number of bytes in the population (Pop0) word of the Branch or Leaf
-           below the pointer (note:  1..7 on 64-bit); indicates:
-           - number of bytes in Decode field == 3 - this number;
-           - number of bytes remaining to decode.
-           Note:  The maximum is 3, not 4, because the 1st byte of the Index is
-           always decoded digitally in the top branch.
-   -B-  == JP points to a Branch (there are many kinds of Branches).
-   -L-  == JP points to a Leaf (there are many kinds of Leaves).
-
-   (2)  == Digit of Index decoded by position offset in branch (really
-           0..0xff).
-
-    4*  == Digit of Index necessary for decoding a "narrow" pointer, in a
-           Decode field; replaces 1 missing branch (really 0..0xff).
-
-    4+  == Digit of Index NOT necessary for decoding a "narrow" pointer, but
-           used for fast traversal of the SM by Judy1Test() and JudyLGet()
-           (see the code) (really 0..0xff).
-
-    0   == Byte in a JPs Pop0 field that is always ignored, because a leaf
-           can never contain more than 256 Indexes (Pop0 <= 255).
-
-    +-----  == A Branch or Leaf; drawn open-ended to remind you that it could
-    |          have up to 256 columns.
-    +-----
-
-    |
-    |   == Pointer to next Branch or Leaf.
-    V
-
-    |
-    O   == A state is skipped by using a "narrow" pointer.
-    |
-
-    < 1 > == Digit (Index) shown as an example is not necessarily in the
-             position shown; is sorted in order with neighbor Indexes.
-             (Really 0..0xff.)
-
-Note that this example shows every possibly topology to reach a leaf in a
-32-bit Judy SM, although this is a very subtle point!
-
-                                                                          STATE or`
-                                                                          LEVEL
-     +---+    +---+    +---+    +---+    +---+    +---+    +---+    +---+
-     |RJP|    |RJP|    |RJP|    |RJP|    |RJP|    |RJP|    |RJP|    |RJP|
-     L---+    B---+    B---+    B---+    B---+    B---+    B---+    B---+
-     |        |        |        |        |        |        |        |
-     |        |        |        |        |        |        |        |
-     V        V (2)    V (2)    V (2)    V (2)    V (2)    V (2)    V (2)
-     +------  +------  +------  +------  +------  +------  +------  +------
-Four |< 2 >   |  0     |  4*    |  C     |  4*    |  4*    |  C     |  C
-byte |< 4 >   |  0     |  0     |  C     |  1*    |  C     |  C     |  C     4
-Index|< 1 >   |  C     |  C     |  C     |  C     |  C     |  C     |  C
-Leaf |< 3 >   |  3     |  2     |  3     |  1     |  2     |  3     |  3
-     +------  +--L---  +--L---  +--B---  +--L---  +--B---  +--B---  +--B---
-                 |        |        |        |        |        |        |
-                /         |       /         |        |       /        /
-               /          |      /          |        |      /        /
-              |           |     |           |        |     |        |
-              V           |     V   (4)     |        |     V   (4)  V   (4)
-              +------     |     +------     |        |     +------  +------
-    Three     |< 4 >      |     |    4+     |        |     |    4+  |    4+
-    byte Index|< 1 >      O     |    0      O        O     |    1*  |    C   3
-    Leaf      |< 3 >      |     |    C      |        |     |    C   |    C
-              +------     |     |    2      |        |     |    1   |    2
-                         /      +----L-     |        |     +----L-  +----B-
-                        /            |      |        |          |        |
-                       |            /       |       /          /        /
-                       |           /        |      /          /        /
-                       |          /         |     |          /        /
-                       |         /          |     |         /        /
-                       |        |           |     |        |        |
-                       V        V           |     V(1)     |        V(1)
-                       +------  +------     |     +------  |        +------
-          Two byte     |< 1 >   |< 1 >      |     | 4+     |        | 4+
-          Index Leaf   |< 3 >   |< 3 >      O     | 1+     O        | 1+     2
-                       +------  +------    /      | C      |        | C
-                                          /       | 1      |        | 1
-                                         |        +-L----  |        +-L----
-                                         |          |      |          |
-                                         |         /       |         /
-                                         |        |        |        |
-                                         V        V        V        V
-                                         +------  +------  +------  +------
-                    One byte Index Leaf  |< 3 >   |< 3 >   |< 3 >   |< 3 >   1
-                                         +------  +------  +------  +------
-
-
-#endif // A_PICTURE_IS_WORTH_1000_WORDS
-
-
-// ****************************************************************************
-// MISCELLANEOUS GLOBALS:
-//
-// PLATFORM-SPECIFIC CONVENIENCE MACROS:
-//
-// These are derived from context (set by cc or in system header files) or
-// based on JU_<PLATFORM> macros from make_includes/platform.*.mk.  We decided
-// on 011018 that any macro reliably derivable from context (cc or headers) for
-// ALL platforms supported by Judy is based on that derivation, but ANY
-// exception means to stop using the external macro completely and derive from
-// JU_<PLATFORM> instead.
-
-// Other miscellaneous stuff:
-
-#ifndef _BOOL_T
-#define _BOOL_T
-typedef int bool_t;
-#endif
-
-#define FUNCTION                // null; easy to find functions.
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#ifdef TRACE            // turn on all other tracing in the code:
-#define TRACEJP  1      // JP traversals in JudyIns.c and JudyDel.c.
-#define TRACEJPR 1      // JP traversals in retrieval code, JudyGet.c.
-#define TRACECF  1      // cache fills in JudyGet.c.
-#define TRACEMI  1      // malloc calls in JudyMallocIF.c.
-#define TRACEMF  1      // malloc calls at a lower level in JudyMalloc.c.
-#endif
-
-#ifndef inline
-    #define inline __inline__
-#endif
-
-// SUPPORT FOR DEBUG-ONLY CODE:
-//
-// By convention, use -DDEBUG to enable both debug-only code AND assertions in
-// the Judy sources.
-//
-// Invert the sense of assertions, so they are off unless explicitly requested,
-// in a uniform way.
-//
-// Note:  It is NOT appropriate to put this in Judy.h; it would mess up
-// application code.
-
-#ifndef DEBUG
-#define NDEBUG 1                // must be 1 for "#if".
-#endif
-
-// Shorthand notations to avoid #ifdefs for single-line conditional statements:
-//
-// Warning:  These cannot be used around compiler directives, such as
-// "#include", nor in the case where Code contains a comma other than nested
-// within parentheses or quotes.
-
-#define DBGCODE(Code)  /* nothing */
-
-#ifdef JUDY1
-#define JUDY1CODE(Code) Code
-#define JUDYLCODE(Code) // null.
-#endif
-
-#ifdef JUDYL
-#define JUDYLCODE(Code) Code
-#define JUDY1CODE(Code) // null.
-#endif
-
-#include <assert.h>
-
-// ****************************************************************************
-// FUNDAMENTAL CONSTANTS FOR MACHINE
-// ****************************************************************************
-
-// Machine (CPU) cache line size:
-//
-// NOTE:  A leaf size of 2 cache lines maximum is the target (optimal) for
-// Judy.  Its hard to obtain a machines cache line size at compile time, but
-// if the machine has an unexpected cache line size, its not devastating if
-// the following constants end up causing leaves that are 1 cache line in size,
-// or even 4 cache lines in size.  The assumed 32-bit system has 16-word =
-// 64-byte cache lines, and the assumed 64-bit system has 16-word = 128-byte
-// cache lines.
-
-#ifdef JU_64BIT
-#define cJU_BYTESPERCL 128              // cache line size in bytes.
-#else
-#define cJU_BYTESPERCL  64              // cache line size in bytes.
-#endif
-
-// Bits Per Byte:
-
-#define cJU_BITSPERBYTE 0x8
-
-// Bytes Per Word and Bits Per Word, latter assuming sizeof(byte) is 8 bits:
-//
-// Expect 32 [64] bits per word.
-
-#define cJU_BYTESPERWORD (sizeof(Word_t))
-#define cJU_BITSPERWORD  (sizeof(Word_t) * cJU_BITSPERBYTE)
-
-#define JU_BYTESTOWORDS(BYTES) \
-        (((BYTES) + cJU_BYTESPERWORD - 1) / cJU_BYTESPERWORD)
-
-// A word that is all-ones, normally equal to -1UL, but safer with ~0:
-
-#define cJU_ALLONES  (~ ( Word_t ) 0UL)
-
-// Note, these are forward references, but thats OK:
-
-#define cJU_FULLBITMAPB ((BITMAPB_t) cJU_ALLONES)
-#define cJU_FULLBITMAPL ((BITMAPL_t) cJU_ALLONES)
-
-
-// ****************************************************************************
-// MISCELLANEOUS JUDY-SPECIFIC DECLARATIONS
-// ****************************************************************************
-
-// ROOT STATE:
-//
-// State at the start of the Judy SM, based on 1 byte decoded per state; equal
-// to the number of bytes per Index to decode.
-
-#define cJU_ROOTSTATE (sizeof(Word_t))
-
-
-// SUBEXPANSES PER STATE:
-//
-// Number of subexpanses per state traversed, which is the number of JPs in a
-// branch (actual or theoretical) and the number of bits in a bitmap.
-
-#define cJU_SUBEXPPERSTATE  256
-
-
-// LEAF AND VALUE POINTERS:
-//
-// Some other basic object types are in declared in JudyPrivateBranch.h
-// (Pjbl_t, Pjbb_t, Pjbu_t, Pjp_t) or are Judy1/L-specific (Pjlb_t).  The
-// few remaining types are declared below.
-//
-// Note:  Leaf pointers are cast to different-sized objects depending on the
-// leafs level, but are at least addresses (not just numbers), so use void *
-// (Pvoid_t), not PWord_t or Word_t for them, except use Pjlw_t for whole-word
-// (top-level, root-level) leaves.  Value areas, however, are always whole
-// words.
-//
-// Furthermore, use Pjll_t only for generic leaf pointers (for various size
-// LeafLs).  Use Pjlw_t for LeafWs.  Use Pleaf (with type uint8_t *, uint16_t
-// *, etc) when the leaf index size is known.
-
-typedef PWord_t Pjlw_t;  // pointer to root-level leaf (whole-word indexes).
-typedef Pvoid_t Pjll_t;  // pointer to lower-level linear leaf.
-
-#ifdef JUDYL
-typedef PWord_t Pjv_t;   // pointer to JudyL value area.
-#endif
-
-
-// POINTER PREPARATION MACROS:
-//
-// These macros are used to strip malloc-namespace-type bits from a pointer +
-// malloc-type word (which references any Judy mallocd object that might be
-// obtained from other than a direct call of malloc()), prior to dereferencing
-// the pointer as an address.  The malloc-type bits allow Judy mallocd objects
-// to come from different "malloc() namespaces".
-//
-//    (root pointer)    (JRP, see above)
-//    jp.jp_Addr        generic pointer to next-level node, except when used
-//                      as a JudyL Immed01 value area
-//    JU_JBB_PJP        macro hides jbbs_Pjp (pointer to JP subarray)
-//    JL_JLB_PVALUE     macro hides jLlbs_PValue (pointer to value subarray)
-//
-// When setting one of these fields or passing an address to j__udyFree*(), the
-// "raw" memory address is used; otherwise the memory address must be passed
-// through one of the macros below before its dereferenced.
-//
-// Note:  After much study, the typecasts below appear in the macros rather
-// than at the point of use, which is both simpler and allows the compiler to
-// do type-checking.
-
-
-#define P_JLW(  ADDR) ((Pjlw_t) (ADDR))  // root leaf.
-#define P_JPM(  ADDR) ((Pjpm_t) (ADDR))  // root JPM.
-#define P_JBL(  ADDR) ((Pjbl_t) (ADDR))  // BranchL.
-#define P_JBB(  ADDR) ((Pjbb_t) (ADDR))  // BranchB.
-#define P_JBU(  ADDR) ((Pjbu_t) (ADDR))  // BranchU.
-#define P_JLL(  ADDR) ((Pjll_t) (ADDR))  // LeafL.
-#define P_JLB(  ADDR) ((Pjlb_t) (ADDR))  // LeafB1.
-#define P_JP(   ADDR) ((Pjp_t)  (ADDR))  // JP.
-
-#ifdef JUDYL
-#define P_JV(   ADDR) ((Pjv_t)  (ADDR))  // &value.
-#endif
-
-
-// LEAST BYTES:
-//
-// Mask for least bytes of a word, and a macro to perform this mask on an
-// Index.
-//
-// Note:  This macro has been problematic in the past to get right and to make
-// portable.  Its not OK on all systems to shift by the full word size.  This
-// macro should allow shifting by 1..N bytes, where N is the word size, but
-// should produce a compiler warning if the macro is called with Bytes == 0.
-//
-// Warning:  JU_LEASTBYTESMASK() is not a constant macro unless Bytes is a
-// constant; otherwise it is a variable shift, which is expensive on some
-// processors.
-
-#define JU_LEASTBYTESMASK(BYTES) \
-        (((Word_t)0x100 << (cJU_BITSPERBYTE * ((BYTES) - 1))) - 1)
-
-#define JU_LEASTBYTES(INDEX,BYTES)  ((INDEX) & JU_LEASTBYTESMASK(BYTES))
-
-
-// BITS IN EACH BITMAP SUBEXPANSE FOR BITMAP BRANCH AND LEAF:
-//
-// The bits per bitmap subexpanse times the number of subexpanses equals a
-// constant (cJU_SUBEXPPERSTATE).  You can also think of this as a compile-time
-// choice of "aspect ratio" for bitmap branches and leaves (which can be set
-// independently for each).
-//
-// A default aspect ratio is hardwired here if not overridden at compile time,
-// such as by "EXTCCOPTS=-DBITMAP_BRANCH16x16 make".
-
-#if (! (defined(BITMAP_BRANCH8x32) || defined(BITMAP_BRANCH16x16) || defined(BITMAP_BRANCH32x8)))
-#define BITMAP_BRANCH32x8 1     // 32 bits per subexpanse, 8 subexpanses.
-#endif
-
-#ifdef BITMAP_BRANCH8x32
-#define BITMAPB_t uint8_t
-#endif
-
-#ifdef BITMAP_BRANCH16x16
-#define BITMAPB_t uint16_t
-#endif
-
-#ifdef BITMAP_BRANCH32x8
-#define BITMAPB_t uint32_t
-#endif
-
-// Note:  For bitmap leaves, BITMAP_LEAF64x4 is only valid for 64 bit:
-//
-// Note:  Choice of aspect ratio mostly matters for JudyL bitmap leaves.  For
-// Judy1 the choice doesnt matter much -- the code generated for different
-// BITMAP_LEAF* values choices varies, but correctness and performance are the
-// same.
-
-#ifndef JU_64BIT
-
-#if (! (defined(BITMAP_LEAF8x32) || defined(BITMAP_LEAF16x16) || defined(BITMAP_LEAF32x8)))
-#define BITMAP_LEAF32x8         // 32 bits per subexpanse, 8 subexpanses.
-#endif
-
-#else // 32BIT
-
-#if (! (defined(BITMAP_LEAF8x32) || defined(BITMAP_LEAF16x16) || defined(BITMAP_LEAF32x8) || defined(BITMAP_LEAF64x4)))
-#define BITMAP_LEAF64x4         // 64 bits per subexpanse, 4 subexpanses.
-
-#endif
-#endif // JU_64BIT
-
-#ifdef BITMAP_LEAF8x32
-#define BITMAPL_t uint8_t
-#endif
-
-#ifdef BITMAP_LEAF16x16
-#define BITMAPL_t uint16_t
-#endif
-
-#ifdef BITMAP_LEAF32x8
-#define BITMAPL_t uint32_t
-#endif
-
-#ifdef BITMAP_LEAF64x4
-#define BITMAPL_t uint64_t
-#endif
-
-
-// EXPORTED DATA AND FUNCTIONS:
-
-#ifdef JUDY1
-extern const uint8_t j__1_BranchBJPPopToWords[];
-#endif
-
-#ifdef JUDYL
-extern const uint8_t j__L_BranchBJPPopToWords[];
-#endif
-
-// Fast LeafL search routine used for inlined code:
-
-#if (! defined(SEARCH_BINARY)) || (! defined(SEARCH_LINEAR))
-// default a binary search leaf method
-#define SEARCH_BINARY 1
-//#define SEARCH_LINEAR 1
-#endif
-
-#ifdef SEARCH_LINEAR
-
-#define SEARCHLEAFNATIVE(LEAFTYPE,ADDR,POP1,INDEX)              \
-    LEAFTYPE *P_leaf = (LEAFTYPE *)(ADDR);                      \
-    LEAFTYPE  I_ndex = (INDEX); /* with masking */              \
-    if (I_ndex > P_leaf[(POP1) - 1]) return(~(POP1));           \
-    while(I_ndex > *P_leaf) P_leaf++;                           \
-    if (I_ndex == *P_leaf) return(P_leaf - (LEAFTYPE *)(ADDR)); \
-    return(~(P_leaf - (LEAFTYPE *)(ADDR)));
-
-
-#define SEARCHLEAFNONNAT(ADDR,POP1,INDEX,LFBTS,COPYINDEX)       \
-{                                                               \
-    uint8_t *P_leaf, *P_leafEnd;                                \
-    Word_t   i_ndex;                                            \
-    Word_t   I_ndex = JU_LEASTBYTES((INDEX), (LFBTS));          \
-    Word_t   p_op1;                                             \
-                                                                \
-    P_leaf    = (uint8_t *)(ADDR);                              \
-    P_leafEnd = P_leaf + ((POP1) * (LFBTS));                    \
-                                                                \
-    do {                                                        \
-        JU_COPY3_PINDEX_TO_LONG(i_ndex, P_leaf);                \
-        if (I_ndex <= i_ndex) break;                            \
-        P_leaf += (LFBTS);                                      \
-    } while (P_leaf < P_leafEnd);                               \
-                                                                \
-    p_op1 = (P_leaf - (uint8_t *) (ADDR)) / (LFBTS);            \
-    if (I_ndex == i_ndex) return(p_op1);                        \
-    return(~p_op1);                                             \
-}
-#endif // SEARCH_LINEAR
-
-#ifdef SEARCH_BINARY
-
-#define SEARCHLEAFNATIVE(LEAFTYPE,ADDR,POP1,INDEX)              \
-    LEAFTYPE *P_leaf = (LEAFTYPE *)(ADDR);                      \
-    LEAFTYPE I_ndex = (LEAFTYPE)INDEX; /* truncate hi bits */   \
-    Word_t   l_ow   = cJU_ALLONES;                              \
-    Word_t   m_id;                                              \
-    Word_t   h_igh  = POP1;                                     \
-                                                                \
-    while ((h_igh - l_ow) > 1UL)                                \
-    {                                                           \
-        m_id = (h_igh + l_ow) / 2;                              \
-        if (P_leaf[m_id] > I_ndex)                              \
-            h_igh = m_id;                                       \
-        else                                                    \
-            l_ow = m_id;                                        \
-    }                                                           \
-    if (l_ow == cJU_ALLONES || P_leaf[l_ow] != I_ndex)          \
-        return(~h_igh);                                         \
-    return(l_ow)
-
-
-#define SEARCHLEAFNONNAT(ADDR,POP1,INDEX,LFBTS,COPYINDEX)       \
-    uint8_t *P_leaf = (uint8_t *)(ADDR);                        \
-    Word_t   l_ow   = cJU_ALLONES;                              \
-    Word_t   m_id;                                              \
-    Word_t   h_igh  = POP1;                                     \
-    Word_t   I_ndex = JU_LEASTBYTES((INDEX), (LFBTS));          \
-    Word_t   i_ndex;                                            \
-                                                                \
-    I_ndex = JU_LEASTBYTES((INDEX), (LFBTS));                   \
-                                                                \
-    while ((h_igh - l_ow) > 1UL)                                \
-    {                                                           \
-        m_id = (h_igh + l_ow) / 2;                              \
-        COPYINDEX(i_ndex, &P_leaf[m_id * (LFBTS)]);             \
-        if (i_ndex > I_ndex)                                    \
-            h_igh = m_id;                                       \
-        else                                                    \
-            l_ow = m_id;                                        \
-    }                                                           \
-    if (l_ow == cJU_ALLONES) return(~h_igh);                    \
-                                                                \
-    COPYINDEX(i_ndex, &P_leaf[l_ow * (LFBTS)]);                 \
-    if (i_ndex != I_ndex) return(~h_igh);                       \
-    return(l_ow)
-
-#endif // SEARCH_BINARY
-
-// Fast way to count bits set in 8..32[64]-bit int:
-//
-// For performance, j__udyCountBits*() are written to take advantage of
-// platform-specific features where available.
-//
-
-#ifdef JU_NOINLINE
-
-extern BITMAPB_t j__udyCountBitsB(BITMAPB_t word);
-extern BITMAPL_t j__udyCountBitsL(BITMAPL_t word);
-
-// Compiler supports inline
-
-#elif  defined(JU_HPUX_IPF)
-
-#define j__udyCountBitsB(WORD)  _Asm_popcnt(WORD)
-#define j__udyCountBitsL(WORD)  _Asm_popcnt(WORD)
-
-#elif defined(JU_LINUX_IPF)
-
-static inline BITMAPB_t j__udyCountBitsB(BITMAPB_t word)
-{
-        BITMAPB_t result;
-        __asm__ ("popcnt %0=%1" : "=r" (result) : "r" (word));
-        return(result);
-}
-
-static inline BITMAPL_t j__udyCountBitsL(BITMAPL_t word)
-{
-        BITMAPL_t result;
-        __asm__ ("popcnt %0=%1" : "=r" (result) : "r" (word));
-        return(result);
-}
-
-
-#else // No instructions available, use inline code
-
-// ****************************************************************************
-// __ J U D Y   C O U N T   B I T S   B
-//
-// Return the number of bits set in "Word", for a bitmap branch.
-//
-// Note:  Bitmap branches have maximum bitmap size = 32 bits.
-
-#ifdef JU_WIN
-static __inline BITMAPB_t j__udyCountBitsB(BITMAPB_t word)
-#else
-static inline BITMAPB_t j__udyCountBitsB(BITMAPB_t word)
-#endif 
-{
-        word = (word & 0x55555555) + ((word & 0xAAAAAAAA) >>  1);
-        word = (word & 0x33333333) + ((word & 0xCCCCCCCC) >>  2);
-        word = (word & 0x0F0F0F0F) + ((word & 0xF0F0F0F0) >>  4); // >= 8 bits.
-#if defined(BITMAP_BRANCH16x16) || defined(BITMAP_BRANCH32x8)
-        word = (word & 0x00FF00FF) + ((word & 0xFF00FF00) >>  8); // >= 16 bits.
-#endif
-
-#ifdef BITMAP_BRANCH32x8
-        word = (word & 0x0000FFFF) + ((word & 0xFFFF0000) >> 16); // >= 32 bits.
-#endif
-        return(word);
-
-} // j__udyCountBitsB()
-
-
-// ****************************************************************************
-// __ J U D Y   C O U N T   B I T S   L
-//
-// Return the number of bits set in "Word", for a bitmap leaf.
-//
-// Note:  Bitmap branches have maximum bitmap size = 32 bits.
-
-// Note:  Need both 32-bit and 64-bit versions of j__udyCountBitsL() because
-// bitmap leaves can have 64-bit bitmaps.
-
-#ifdef JU_WIN
-static __inline BITMAPL_t j__udyCountBitsL(BITMAPL_t word)
-#else
-static inline BITMAPL_t j__udyCountBitsL(BITMAPL_t word)
-#endif
-{
-#ifndef JU_64BIT
-
-        word = (word & 0x55555555) + ((word & 0xAAAAAAAA) >>  1);
-        word = (word & 0x33333333) + ((word & 0xCCCCCCCC) >>  2);
-        word = (word & 0x0F0F0F0F) + ((word & 0xF0F0F0F0) >>  4); // >= 8 bits.
-#if defined(BITMAP_LEAF16x16) || defined(BITMAP_LEAF32x8)
-        word = (word & 0x00FF00FF) + ((word & 0xFF00FF00) >>  8); // >= 16 bits.
-#endif
-#ifdef BITMAP_LEAF32x8
-        word = (word & 0x0000FFFF) + ((word & 0xFFFF0000) >> 16); // >= 32 bits.
-#endif
-
-#else // JU_64BIT
-
-        word = (word & 0x5555555555555555) + ((word & 0xAAAAAAAAAAAAAAAA) >> 1);
-        word = (word & 0x3333333333333333) + ((word & 0xCCCCCCCCCCCCCCCC) >> 2);
-        word = (word & 0x0F0F0F0F0F0F0F0F) + ((word & 0xF0F0F0F0F0F0F0F0) >> 4);
-#if defined(BITMAP_LEAF16x16) || defined(BITMAP_LEAF32x8) || defined(BITMAP_LEAF64x4)
-        word = (word & 0x00FF00FF00FF00FF) + ((word & 0xFF00FF00FF00FF00) >> 8);
-#endif
-#if defined(BITMAP_LEAF32x8) || defined(BITMAP_LEAF64x4)
-        word = (word & 0x0000FFFF0000FFFF) + ((word & 0xFFFF0000FFFF0000) >>16);
-#endif
-#ifdef BITMAP_LEAF64x4
-        word = (word & 0x00000000FFFFFFFF) + ((word & 0xFFFFFFFF00000000) >>32);
-#endif
-#endif // JU_64BIT
-
-        return(word);
-
-} // j__udyCountBitsL()
-
-#endif // Compiler supports inline
-
-// GET POP0:
-//
-// Get from jp_DcdPopO the Pop0 for various JP Types.
-//
-// Notes:
-//
-// - Different macros require different parameters...
-//
-// - There are no simple macros for cJU_BRANCH* Types because their
-//   populations must be added up and dont reside in an already-calculated
-//   place.  (TBD:  This is no longer true, now its in the JPM.)
-//
-// - cJU_JPIMM_POP0() is not defined because it would be redundant because the
-//   Pop1 is already encoded in each enum name.
-//
-// - A linear or bitmap leaf Pop0 cannot exceed cJU_SUBEXPPERSTATE - 1 (Pop0 =
-//   0..255), so use a simpler, faster macro for it than for other JP Types.
-//
-// - Avoid any complex calculations that would slow down the compiled code.
-//   Assume these macros are only called for the appropriate JP Types.
-//   Unfortunately theres no way to trigger an assertion here if the JP type
-//   is incorrect for the macro, because these are merely expressions, not
-//   statements.
-
-#define  JU_LEAFW_POP0(JRP)                  (*P_JLW(JRP))
-#define cJU_JPFULLPOPU1_POP0                 (cJU_SUBEXPPERSTATE - 1)
-
-// GET JP Type:
-// Since bit fields greater than 32 bits are not supported in some compilers
-// the jp_DcdPopO field is expanded to include the jp_Type in the high 8 bits
-// of the Word_t.
-// First the read macro:
-
-#define JU_JPTYPE(PJP)          ((PJP)->jp_Type)
-
-#define JU_JPLEAF_POP0(PJP)     ((PJP)->jp_DcdP0[sizeof(Word_t) - 2])
-
-#ifdef JU_64BIT
-
-#define JU_JPDCDPOP0(PJP)               \
-    ((Word_t)(PJP)->jp_DcdP0[0] << 48 | \
-     (Word_t)(PJP)->jp_DcdP0[1] << 40 | \
-     (Word_t)(PJP)->jp_DcdP0[2] << 32 | \
-     (Word_t)(PJP)->jp_DcdP0[3] << 24 | \
-     (Word_t)(PJP)->jp_DcdP0[4] << 16 | \
-     (Word_t)(PJP)->jp_DcdP0[5] <<  8 | \
-     (Word_t)(PJP)->jp_DcdP0[6])
-
-
-#define JU_JPSETADT(PJP,ADDR,DCDPOP0,TYPE)                      \
-{                                                               \
-    (PJP)->jp_Addr     = (ADDR);                                \
-    (PJP)->jp_DcdP0[0] = (uint8_t)((Word_t)(DCDPOP0) >> 48);    \
-    (PJP)->jp_DcdP0[1] = (uint8_t)((Word_t)(DCDPOP0) >> 40);    \
-    (PJP)->jp_DcdP0[2] = (uint8_t)((Word_t)(DCDPOP0) >> 32);    \
-    (PJP)->jp_DcdP0[3] = (uint8_t)((Word_t)(DCDPOP0) >> 24);    \
-    (PJP)->jp_DcdP0[4] = (uint8_t)((Word_t)(DCDPOP0) >> 16);    \
-    (PJP)->jp_DcdP0[5] = (uint8_t)((Word_t)(DCDPOP0) >>  8);    \
-    (PJP)->jp_DcdP0[6] = (uint8_t)((Word_t)(DCDPOP0));          \
-    (PJP)->jp_Type     = (TYPE);                                \
-}
-
-#else   // 32 Bit
-
-#define JU_JPDCDPOP0(PJP)               \
-    ((Word_t)(PJP)->jp_DcdP0[0] << 16 | \
-     (Word_t)(PJP)->jp_DcdP0[1] <<  8 | \
-     (Word_t)(PJP)->jp_DcdP0[2])
-
-
-#define JU_JPSETADT(PJP,ADDR,DCDPOP0,TYPE)                      \
-{                                                               \
-    (PJP)->jp_Addr     = (ADDR);                                \
-    (PJP)->jp_DcdP0[0] = (uint8_t)((Word_t)(DCDPOP0) >> 16);    \
-    (PJP)->jp_DcdP0[1] = (uint8_t)((Word_t)(DCDPOP0) >>  8);    \
-    (PJP)->jp_DcdP0[2] = (uint8_t)((Word_t)(DCDPOP0));          \
-    (PJP)->jp_Type     = (TYPE);                                \
-}
-
-#endif  // 32 Bit
-
-// NUMBER OF BITS IN A BRANCH OR LEAF BITMAP AND SUBEXPANSE:
-//
-// Note:  cJU_BITSPERBITMAP must be the same as the number of JPs in a branch.
-
-#define cJU_BITSPERBITMAP cJU_SUBEXPPERSTATE
-
-// Bitmaps are accessed in units of "subexpanses":
-
-#define cJU_BITSPERSUBEXPB  (sizeof(BITMAPB_t) * cJU_BITSPERBYTE)
-#define cJU_NUMSUBEXPB      (cJU_BITSPERBITMAP / cJU_BITSPERSUBEXPB)
-
-#define cJU_BITSPERSUBEXPL  (sizeof(BITMAPL_t) * cJU_BITSPERBYTE)
-#define cJU_NUMSUBEXPL      (cJU_BITSPERBITMAP / cJU_BITSPERSUBEXPL)
-
-
-// MASK FOR A SPECIFIED BIT IN A BITMAP:
-//
-// Warning:  If BitNum is a variable, this results in a variable shift that is
-// expensive, at least on some processors.  Use with caution.
-//
-// Warning:  BitNum must be less than cJU_BITSPERWORD, that is, 0 ..
-// cJU_BITSPERWORD - 1, to avoid a truncated shift on some machines.
-//
-// TBD:  Perhaps use an array[32] of masks instead of calculating them.
-
-#define JU_BITPOSMASKB(BITNUM) ((Word_t)1 << ((BITNUM) % cJU_BITSPERSUBEXPB))
-#define JU_BITPOSMASKL(BITNUM) ((Word_t)1 << ((BITNUM) % cJU_BITSPERSUBEXPL))
-
-
-// TEST/SET/CLEAR A BIT IN A BITMAP LEAF:
-//
-// Test if a byte-sized Digit (portion of Index) has a corresponding bit set in
-// a bitmap, or set a byte-sized Digits bit into a bitmap, by looking up the
-// correct subexpanse and then checking/setting the correct bit.
-//
-// Note:  Mask higher bits, if any, for the convenience of the user of this
-// macro, in case they pass a full Index, not just a digit.  If the caller has
-// a true 8-bit digit, make it of type uint8_t and the compiler should skip the
-// unnecessary mask step.
-
-#define JU_SUBEXPL(DIGIT) (((DIGIT) / cJU_BITSPERSUBEXPL) & (cJU_NUMSUBEXPL-1))
-
-#define JU_BITMAPTESTL(PJLB, INDEX)  \
-    (JU_JLB_BITMAP(PJLB, JU_SUBEXPL(INDEX)) &  JU_BITPOSMASKL(INDEX))
-
-#define JU_BITMAPSETL(PJLB, INDEX)   \
-    (JU_JLB_BITMAP(PJLB, JU_SUBEXPL(INDEX)) |= JU_BITPOSMASKL(INDEX))
-
-#define JU_BITMAPCLEARL(PJLB, INDEX) \
-    (JU_JLB_BITMAP(PJLB, JU_SUBEXPL(INDEX)) ^= JU_BITPOSMASKL(INDEX))
-
-
-// MAP BITMAP BIT OFFSET TO DIGIT:
-//
-// Given a digit variable to set, a bitmap branch or leaf subexpanse (base 0),
-// the bitmap (BITMAP*_t) for that subexpanse, and an offset (Nth set bit in
-// the bitmap, base 0), compute the digit (also base 0) corresponding to the
-// subexpanse and offset by counting all bits in the bitmap until offset+1 set
-// bits are seen.  Avoid expensive variable shifts.  Offset should be less than
-// the number of set bits in the bitmap; assert this.
-//
-// If theres a better way to do this, I dont know what it is.
-
-#define JU_BITMAPDIGITB(DIGIT,SUBEXP,BITMAP,OFFSET)             \
-        {                                                       \
-            BITMAPB_t bitmap = (BITMAP); int remain = (OFFSET); \
-            (DIGIT) = (SUBEXP) * cJU_BITSPERSUBEXPB;            \
-                                                                \
-            while ((remain -= (bitmap & 1)) >= 0)               \
-            {                                                   \
-                bitmap >>= 1; ++(DIGIT);                        \
-                assert((DIGIT) < ((SUBEXP) + 1) * cJU_BITSPERSUBEXPB); \
-            }                                                   \
-        }
-
-#define JU_BITMAPDIGITL(DIGIT,SUBEXP,BITMAP,OFFSET)             \
-        {                                                       \
-            BITMAPL_t bitmap = (BITMAP); int remain = (OFFSET); \
-            (DIGIT) = (SUBEXP) * cJU_BITSPERSUBEXPL;            \
-                                                                \
-            while ((remain -= (bitmap & 1)) >= 0)               \
-            {                                                   \
-                bitmap >>= 1; ++(DIGIT);                        \
-                assert((DIGIT) < ((SUBEXP) + 1) * cJU_BITSPERSUBEXPL); \
-            }                                                   \
-        }
-
-
-// MASKS FOR PORTIONS OF 32-BIT WORDS:
-//
-// These are useful for bitmap subexpanses.
-//
-// "LOWER"/"HIGHER" means bits representing lower/higher-valued Indexes.  The
-// exact order of bits in the word is explicit here but is hidden from the
-// caller.
-//
-// "EXC" means exclusive of the specified bit; "INC" means inclusive.
-//
-// In each case, BitPos is either "JU_BITPOSMASK*(BitNum)", or a variable saved
-// from an earlier call of that macro; either way, it must be a 32-bit word
-// with a single bit set.  In the first case, assume the compiler is smart
-// enough to optimize out common subexpressions.
-//
-// The expressions depend on unsigned decimal math that should be universal.
-
-#define JU_MASKLOWEREXC( BITPOS)  ((BITPOS) - 1)
-#define JU_MASKLOWERINC( BITPOS)  (JU_MASKLOWEREXC(BITPOS) | (BITPOS))
-#define JU_MASKHIGHERINC(BITPOS)  (-(BITPOS))
-#define JU_MASKHIGHEREXC(BITPOS)  (JU_MASKHIGHERINC(BITPOS) ^ (BITPOS))
-
-
-// ****************************************************************************
-// SUPPORT FOR NATIVE INDEX SIZES
-// ****************************************************************************
-//
-// Copy a series of generic objects (uint8_t, uint16_t, uint32_t, Word_t) from
-// one place to another.
-
-#define JU_COPYMEM(PDST,PSRC,POP1)                      \
-    {                                                   \
-        Word_t i_ndex = 0;                              \
-        assert((POP1) > 0);                             \
-        do { (PDST)[i_ndex] = (PSRC)[i_ndex]; } \
-        while (++i_ndex < (POP1));                      \
-    }
-
-
-// ****************************************************************************
-// SUPPORT FOR NON-NATIVE INDEX SIZES
-// ****************************************************************************
-//
-// Copy a 3-byte Index pointed by a uint8_t * to a Word_t:
-//
-#define JU_COPY3_PINDEX_TO_LONG(DESTLONG,PINDEX)        \
-    DESTLONG  = (Word_t)(PINDEX)[0] << 16;              \
-    DESTLONG += (Word_t)(PINDEX)[1] <<  8;              \
-    DESTLONG += (Word_t)(PINDEX)[2]
-
-// Copy a Word_t to a 3-byte Index pointed at by a uint8_t *:
-
-#define JU_COPY3_LONG_TO_PINDEX(PINDEX,SOURCELONG)      \
-    (PINDEX)[0] = (uint8_t)((SOURCELONG) >> 16);        \
-    (PINDEX)[1] = (uint8_t)((SOURCELONG) >>  8);        \
-    (PINDEX)[2] = (uint8_t)((SOURCELONG))
-
-#ifdef JU_64BIT
-
-// Copy a 5-byte Index pointed by a uint8_t * to a Word_t:
-//
-#define JU_COPY5_PINDEX_TO_LONG(DESTLONG,PINDEX)        \
-    DESTLONG  = (Word_t)(PINDEX)[0] << 32;              \
-    DESTLONG += (Word_t)(PINDEX)[1] << 24;              \
-    DESTLONG += (Word_t)(PINDEX)[2] << 16;              \
-    DESTLONG += (Word_t)(PINDEX)[3] <<  8;              \
-    DESTLONG += (Word_t)(PINDEX)[4]
-
-// Copy a Word_t to a 5-byte Index pointed at by a uint8_t *:
-
-#define JU_COPY5_LONG_TO_PINDEX(PINDEX,SOURCELONG)      \
-    (PINDEX)[0] = (uint8_t)((SOURCELONG) >> 32);        \
-    (PINDEX)[1] = (uint8_t)((SOURCELONG) >> 24);        \
-    (PINDEX)[2] = (uint8_t)((SOURCELONG) >> 16);        \
-    (PINDEX)[3] = (uint8_t)((SOURCELONG) >>  8);        \
-    (PINDEX)[4] = (uint8_t)((SOURCELONG))
-
-// Copy a 6-byte Index pointed by a uint8_t * to a Word_t:
-//
-#define JU_COPY6_PINDEX_TO_LONG(DESTLONG,PINDEX)        \
-    DESTLONG  = (Word_t)(PINDEX)[0] << 40;              \
-    DESTLONG += (Word_t)(PINDEX)[1] << 32;              \
-    DESTLONG += (Word_t)(PINDEX)[2] << 24;              \
-    DESTLONG += (Word_t)(PINDEX)[3] << 16;              \
-    DESTLONG += (Word_t)(PINDEX)[4] <<  8;              \
-    DESTLONG += (Word_t)(PINDEX)[5]
-
-// Copy a Word_t to a 6-byte Index pointed at by a uint8_t *:
-
-#define JU_COPY6_LONG_TO_PINDEX(PINDEX,SOURCELONG)      \
-    (PINDEX)[0] = (uint8_t)((SOURCELONG) >> 40);        \
-    (PINDEX)[1] = (uint8_t)((SOURCELONG) >> 32);        \
-    (PINDEX)[2] = (uint8_t)((SOURCELONG) >> 24);        \
-    (PINDEX)[3] = (uint8_t)((SOURCELONG) >> 16);        \
-    (PINDEX)[4] = (uint8_t)((SOURCELONG) >>  8);        \
-    (PINDEX)[5] = (uint8_t)((SOURCELONG))
-
-// Copy a 7-byte Index pointed by a uint8_t * to a Word_t:
-//
-#define JU_COPY7_PINDEX_TO_LONG(DESTLONG,PINDEX)        \
-    DESTLONG  = (Word_t)(PINDEX)[0] << 48;              \
-    DESTLONG += (Word_t)(PINDEX)[1] << 40;              \
-    DESTLONG += (Word_t)(PINDEX)[2] << 32;              \
-    DESTLONG += (Word_t)(PINDEX)[3] << 24;              \
-    DESTLONG += (Word_t)(PINDEX)[4] << 16;              \
-    DESTLONG += (Word_t)(PINDEX)[5] <<  8;              \
-    DESTLONG += (Word_t)(PINDEX)[6]
-
-// Copy a Word_t to a 7-byte Index pointed at by a uint8_t *:
-
-#define JU_COPY7_LONG_TO_PINDEX(PINDEX,SOURCELONG)      \
-    (PINDEX)[0] = (uint8_t)((SOURCELONG) >> 48);        \
-    (PINDEX)[1] = (uint8_t)((SOURCELONG) >> 40);        \
-    (PINDEX)[2] = (uint8_t)((SOURCELONG) >> 32);        \
-    (PINDEX)[3] = (uint8_t)((SOURCELONG) >> 24);        \
-    (PINDEX)[4] = (uint8_t)((SOURCELONG) >> 16);        \
-    (PINDEX)[5] = (uint8_t)((SOURCELONG) >>  8);        \
-    (PINDEX)[6] = (uint8_t)((SOURCELONG))
-
-#endif // JU_64BIT
-
-// ****************************************************************************
-// COMMON CODE FRAGMENTS (MACROS)
-// ****************************************************************************
-//
-// These code chunks are shared between various source files.
-
-
-// SET (REPLACE) ONE DIGIT IN AN INDEX:
-//
-// To avoid endian issues, use masking and ORing, which operates in a
-// big-endian register, rather than treating the Index as an array of bytes,
-// though that would be simpler, but would operate in endian-specific memory.
-//
-// TBD:  This contains two variable shifts, is that bad?
-
-#define JU_SETDIGIT(INDEX,DIGIT,STATE)                  \
-        (INDEX) = ((INDEX) & (~cJU_MASKATSTATE(STATE))) \
-                           | (((Word_t) (DIGIT))        \
-                              << (((STATE) - 1) * cJU_BITSPERBYTE))
-
-// Fast version for single LSB:
-
-#define JU_SETDIGIT1(INDEX,DIGIT) (INDEX) = ((INDEX) & ~0xff) | (DIGIT)
-
-
-// SET (REPLACE) "N" LEAST DIGITS IN AN INDEX:
-
-#define JU_SETDIGITS(INDEX,INDEX2,cSTATE) \
-        (INDEX) = ((INDEX ) & (~JU_LEASTBYTESMASK(cSTATE))) \
-                | ((INDEX2) & ( JU_LEASTBYTESMASK(cSTATE)))
-
-// COPY DECODE BYTES FROM JP TO INDEX:
-//
-// Modify Index digit(s) to match the bytes in jp_DcdPopO in case one or more
-// branches are skipped and the digits are significant.  Its probably faster
-// to just do this unconditionally than to check if its necessary.
-//
-// To avoid endian issues, use masking and ORing, which operates in a
-// big-endian register, rather than treating the Index as an array of bytes,
-// though that would be simpler, but would operate in endian-specific memory.
-//
-// WARNING:  Must not call JU_LEASTBYTESMASK (via cJU_DCDMASK) with Bytes =
-// cJU_ROOTSTATE or a bad mask is generated, but there are no Dcd bytes to copy
-// in this case anyway.  In fact there are no Dcd bytes unless State <
-// cJU_ROOTSTATE - 1, so dont call this macro except in those cases.
-//
-// TBD:  It would be nice to validate jp_DcdPopO against known digits to ensure
-// no corruption, but this is non-trivial.
-
-#define JU_SETDCD(INDEX,PJP,cSTATE)                             \
-    (INDEX) = ((INDEX) & ~cJU_DCDMASK(cSTATE))                  \
-                | (JU_JPDCDPOP0(PJP) & cJU_DCDMASK(cSTATE))
-
-// INSERT/DELETE AN INDEX IN-PLACE IN MEMORY:
-//
-// Given a pointer to an array of "even" (native), same-sized objects
-// (indexes), the current population of the array, an offset in the array, and
-// a new Index to insert, "shift up" the array elements (Indexes) above the
-// insertion point and insert the new Index.  Assume there is sufficient memory
-// to do this.
-//
-// In these macros, "i_offset" is an index offset, and "b_off" is a byte
-// offset for odd Index sizes.
-//
-// Note:  Endian issues only arise fro insertion, not deletion, and even for
-// insertion, they are transparent when native (even) objects are used, and
-// handled explicitly for odd (non-native) Index sizes.
-//
-// Note:  The following macros are tricky enough that there is some test code
-// for them appended to this file.
-
-#define JU_INSERTINPLACE(PARRAY,POP1,OFFSET,INDEX)              \
-        assert((long) (POP1) > 0);                              \
-        assert((Word_t) (OFFSET) <= (Word_t) (POP1));           \
-        {                                                       \
-            Word_t i_offset = (POP1);                           \
-                                                                \
-            while (i_offset-- > (OFFSET))                       \
-                (PARRAY)[i_offset + 1] = (PARRAY)[i_offset];    \
-                                                                \
-            (PARRAY)[OFFSET] = (INDEX);                         \
-        }
-
-
-// Variation for non-native Indexes, where cIS = Index Size
-// and PByte must point to a uint8_t (byte); shift byte-by-byte:
-//
-
-#define JU_INSERTINPLACE3(PBYTE,POP1,OFFSET,INDEX)              \
-{                                                               \
-    Word_t i_off = POP1;                                        \
-                                                                \
-    while (i_off-- > (OFFSET))                                  \
-    {                                                           \
-        Word_t  i_dx = i_off * 3;                               \
-        (PBYTE)[i_dx + 0 + 3] = (PBYTE)[i_dx + 0];              \
-        (PBYTE)[i_dx + 1 + 3] = (PBYTE)[i_dx + 1];              \
-        (PBYTE)[i_dx + 2 + 3] = (PBYTE)[i_dx + 2];              \
-    }                                                           \
-    JU_COPY3_LONG_TO_PINDEX(&((PBYTE)[(OFFSET) * 3]), INDEX);   \
-}
-
-#ifdef JU_64BIT
-
-#define JU_INSERTINPLACE5(PBYTE,POP1,OFFSET,INDEX)              \
-{                                                               \
-    Word_t i_off = POP1;                                        \
-                                                                \
-    while (i_off-- > (OFFSET))                                  \
-    {                                                           \
-        Word_t  i_dx = i_off * 5;                               \
-        (PBYTE)[i_dx + 0 + 5] = (PBYTE)[i_dx + 0];              \
-        (PBYTE)[i_dx + 1 + 5] = (PBYTE)[i_dx + 1];              \
-        (PBYTE)[i_dx + 2 + 5] = (PBYTE)[i_dx + 2];              \
-        (PBYTE)[i_dx + 3 + 5] = (PBYTE)[i_dx + 3];              \
-        (PBYTE)[i_dx + 4 + 5] = (PBYTE)[i_dx + 4];              \
-    }                                                           \
-    JU_COPY5_LONG_TO_PINDEX(&((PBYTE)[(OFFSET) * 5]), INDEX);   \
-}
-
-#define JU_INSERTINPLACE6(PBYTE,POP1,OFFSET,INDEX)              \
-{                                                               \
-    Word_t i_off = POP1;                                        \
-                                                                \
-    while (i_off-- > (OFFSET))                                  \
-    {                                                           \
-        Word_t  i_dx = i_off * 6;                               \
-        (PBYTE)[i_dx + 0 + 6] = (PBYTE)[i_dx + 0];              \
-        (PBYTE)[i_dx + 1 + 6] = (PBYTE)[i_dx + 1];              \
-        (PBYTE)[i_dx + 2 + 6] = (PBYTE)[i_dx + 2];              \
-        (PBYTE)[i_dx + 3 + 6] = (PBYTE)[i_dx + 3];              \
-        (PBYTE)[i_dx + 4 + 6] = (PBYTE)[i_dx + 4];              \
-        (PBYTE)[i_dx + 5 + 6] = (PBYTE)[i_dx + 5];              \
-    }                                                           \
-    JU_COPY6_LONG_TO_PINDEX(&((PBYTE)[(OFFSET) * 6]), INDEX);   \
-}
-
-#define JU_INSERTINPLACE7(PBYTE,POP1,OFFSET,INDEX)              \
-{                                                               \
-    Word_t i_off = POP1;                                        \
-                                                                \
-    while (i_off-- > (OFFSET))                                  \
-    {                                                           \
-        Word_t  i_dx = i_off * 7;                               \
-        (PBYTE)[i_dx + 0 + 7] = (PBYTE)[i_dx + 0];              \
-        (PBYTE)[i_dx + 1 + 7] = (PBYTE)[i_dx + 1];              \
-        (PBYTE)[i_dx + 2 + 7] = (PBYTE)[i_dx + 2];              \
-        (PBYTE)[i_dx + 3 + 7] = (PBYTE)[i_dx + 3];              \
-        (PBYTE)[i_dx + 4 + 7] = (PBYTE)[i_dx + 4];              \
-        (PBYTE)[i_dx + 5 + 7] = (PBYTE)[i_dx + 5];              \
-        (PBYTE)[i_dx + 6 + 7] = (PBYTE)[i_dx + 6];              \
-    }                                                           \
-    JU_COPY7_LONG_TO_PINDEX(&((PBYTE)[(OFFSET) * 7]), INDEX);   \
-}
-#endif // JU_64BIT
-
-// Counterparts to the above for deleting an Index:
-//
-// "Shift down" the array elements starting at the Index to be deleted.
-
-#define JU_DELETEINPLACE(PARRAY,POP1,OFFSET,IGNORE)             \
-        assert((long) (POP1) > 0);                              \
-        assert((Word_t) (OFFSET) < (Word_t) (POP1));            \
-        {                                                       \
-            Word_t i_offset = (OFFSET);                         \
-                                                                \
-            while (++i_offset < (POP1))                         \
-                (PARRAY)[i_offset - 1] = (PARRAY)[i_offset];    \
-        }
-
-// Variation for odd-byte-sized (non-native) Indexes, where cIS = Index Size
-// and PByte must point to a uint8_t (byte); copy byte-by-byte:
-//
-// Note:  If cIS == 1, JU_DELETEINPLACE_ODD == JU_DELETEINPLACE.
-//
-// Note:  There are no endian issues here because bytes are just shifted as-is,
-// not converted to/from an Index.
-
-#define JU_DELETEINPLACE_ODD(PBYTE,POP1,OFFSET,cIS)             \
-        assert((long) (POP1) > 0);                              \
-        assert((Word_t) (OFFSET) < (Word_t) (POP1));            \
-        {                                                       \
-            Word_t b_off = (((OFFSET) + 1) * (cIS)) - 1;        \
-                                                                \
-            while (++b_off < ((POP1) * (cIS)))                  \
-                (PBYTE)[b_off - (cIS)] = (PBYTE)[b_off];        \
-        }
-
-
-// INSERT/DELETE AN INDEX WHILE COPYING OTHERS:
-//
-// Copy PSource[] to PDest[], where PSource[] has Pop1 elements (Indexes),
-// inserting Index at PDest[Offset].  Unlike JU_*INPLACE*() above, these macros
-// are used when moving Indexes from one memory object to another.
-
-#define JU_INSERTCOPY(PDEST,PSOURCE,POP1,OFFSET,INDEX)          \
-        assert((long) (POP1) > 0);                              \
-        assert((Word_t) (OFFSET) <= (Word_t) (POP1));           \
-        {                                                       \
-            Word_t i_offset;                                    \
-                                                                \
-            for (i_offset = 0; i_offset < (OFFSET); ++i_offset) \
-                (PDEST)[i_offset] = (PSOURCE)[i_offset];        \
-                                                                \
-            (PDEST)[i_offset] = (INDEX);                        \
-                                                                \
-            for (/* null */; i_offset < (POP1); ++i_offset)     \
-                (PDEST)[i_offset + 1] = (PSOURCE)[i_offset];    \
-        }
-
-#define JU_INSERTCOPY3(PDEST,PSOURCE,POP1,OFFSET,INDEX)         \
-assert((long) (POP1) > 0);                                      \
-assert((Word_t) (OFFSET) <= (Word_t) (POP1));                   \
-{                                                               \
-    Word_t o_ff;                                                \
-                                                                \
-    for (o_ff = 0; o_ff < (OFFSET); o_ff++)                     \
-    {                                                           \
-        Word_t  i_dx = o_ff * 3;                                \
-        (PDEST)[i_dx + 0] = (PSOURCE)[i_dx + 0];                \
-        (PDEST)[i_dx + 1] = (PSOURCE)[i_dx + 1];                \
-        (PDEST)[i_dx + 2] = (PSOURCE)[i_dx + 2];                \
-    }                                                           \
-    JU_COPY3_LONG_TO_PINDEX(&((PDEST)[(OFFSET) * 3]), INDEX);   \
-                                                                \
-    for (/* null */; o_ff < (POP1); o_ff++)                     \
-    {                                                           \
-        Word_t  i_dx = o_ff * 3;                                \
-        (PDEST)[i_dx + 0 + 3] = (PSOURCE)[i_dx + 0];            \
-        (PDEST)[i_dx + 1 + 3] = (PSOURCE)[i_dx + 1];            \
-        (PDEST)[i_dx + 2 + 3] = (PSOURCE)[i_dx + 2];            \
-    }                                                           \
-}
-
-#ifdef JU_64BIT
-
-#define JU_INSERTCOPY5(PDEST,PSOURCE,POP1,OFFSET,INDEX)         \
-assert((long) (POP1) > 0);                                      \
-assert((Word_t) (OFFSET) <= (Word_t) (POP1));                   \
-{                                                               \
-    Word_t o_ff;                                                \
-                                                                \
-    for (o_ff = 0; o_ff < (OFFSET); o_ff++)                     \
-    {                                                           \
-        Word_t  i_dx = o_ff * 5;                                \
-        (PDEST)[i_dx + 0] = (PSOURCE)[i_dx + 0];                \
-        (PDEST)[i_dx + 1] = (PSOURCE)[i_dx + 1];                \
-        (PDEST)[i_dx + 2] = (PSOURCE)[i_dx + 2];                \
-        (PDEST)[i_dx + 3] = (PSOURCE)[i_dx + 3];                \
-        (PDEST)[i_dx + 4] = (PSOURCE)[i_dx + 4];                \
-    }                                                           \
-    JU_COPY5_LONG_TO_PINDEX(&((PDEST)[(OFFSET) * 5]), INDEX);   \
-                                                                \
-    for (/* null */; o_ff < (POP1); o_ff++)                     \
-    {                                                           \
-        Word_t  i_dx = o_ff * 5;                                \
-        (PDEST)[i_dx + 0 + 5] = (PSOURCE)[i_dx + 0];            \
-        (PDEST)[i_dx + 1 + 5] = (PSOURCE)[i_dx + 1];            \
-        (PDEST)[i_dx + 2 + 5] = (PSOURCE)[i_dx + 2];            \
-        (PDEST)[i_dx + 3 + 5] = (PSOURCE)[i_dx + 3];            \
-        (PDEST)[i_dx + 4 + 5] = (PSOURCE)[i_dx + 4];            \
-    }                                                           \
-}
-
-#define JU_INSERTCOPY6(PDEST,PSOURCE,POP1,OFFSET,INDEX)         \
-assert((long) (POP1) > 0);                                      \
-assert((Word_t) (OFFSET) <= (Word_t) (POP1));                   \
-{                                                               \
-    Word_t o_ff;                                                \
-                                                                \
-    for (o_ff = 0; o_ff < (OFFSET); o_ff++)                     \
-    {                                                           \
-        Word_t  i_dx = o_ff * 6;                                \
-        (PDEST)[i_dx + 0] = (PSOURCE)[i_dx + 0];                \
-        (PDEST)[i_dx + 1] = (PSOURCE)[i_dx + 1];                \
-        (PDEST)[i_dx + 2] = (PSOURCE)[i_dx + 2];                \
-        (PDEST)[i_dx + 3] = (PSOURCE)[i_dx + 3];                \
-        (PDEST)[i_dx + 4] = (PSOURCE)[i_dx + 4];                \
-        (PDEST)[i_dx + 5] = (PSOURCE)[i_dx + 5];                \
-    }                                                           \
-    JU_COPY6_LONG_TO_PINDEX(&((PDEST)[(OFFSET) * 6]), INDEX);   \
-                                                                \
-    for (/* null */; o_ff < (POP1); o_ff++)                     \
-    {                                                           \
-        Word_t  i_dx = o_ff * 6;                                \
-        (PDEST)[i_dx + 0 + 6] = (PSOURCE)[i_dx + 0];            \
-        (PDEST)[i_dx + 1 + 6] = (PSOURCE)[i_dx + 1];            \
-        (PDEST)[i_dx + 2 + 6] = (PSOURCE)[i_dx + 2];            \
-        (PDEST)[i_dx + 3 + 6] = (PSOURCE)[i_dx + 3];            \
-        (PDEST)[i_dx + 4 + 6] = (PSOURCE)[i_dx + 4];            \
-        (PDEST)[i_dx + 5 + 6] = (PSOURCE)[i_dx + 5];            \
-    }                                                           \
-}
-
-#define JU_INSERTCOPY7(PDEST,PSOURCE,POP1,OFFSET,INDEX)         \
-assert((long) (POP1) > 0);                                      \
-assert((Word_t) (OFFSET) <= (Word_t) (POP1));                   \
-{                                                               \
-    Word_t o_ff;                                                \
-                                                                \
-    for (o_ff = 0; o_ff < (OFFSET); o_ff++)                     \
-    {                                                           \
-        Word_t  i_dx = o_ff * 7;                                \
-        (PDEST)[i_dx + 0] = (PSOURCE)[i_dx + 0];                \
-        (PDEST)[i_dx + 1] = (PSOURCE)[i_dx + 1];                \
-        (PDEST)[i_dx + 2] = (PSOURCE)[i_dx + 2];                \
-        (PDEST)[i_dx + 3] = (PSOURCE)[i_dx + 3];                \
-        (PDEST)[i_dx + 4] = (PSOURCE)[i_dx + 4];                \
-        (PDEST)[i_dx + 5] = (PSOURCE)[i_dx + 5];                \
-        (PDEST)[i_dx + 6] = (PSOURCE)[i_dx + 6];                \
-    }                                                           \
-    JU_COPY7_LONG_TO_PINDEX(&((PDEST)[(OFFSET) * 7]), INDEX);   \
-                                                                \
-    for (/* null */; o_ff < (POP1); o_ff++)                     \
-    {                                                           \
-        Word_t  i_dx = o_ff * 7;                                \
-        (PDEST)[i_dx + 0 + 7] = (PSOURCE)[i_dx + 0];            \
-        (PDEST)[i_dx + 1 + 7] = (PSOURCE)[i_dx + 1];            \
-        (PDEST)[i_dx + 2 + 7] = (PSOURCE)[i_dx + 2];            \
-        (PDEST)[i_dx + 3 + 7] = (PSOURCE)[i_dx + 3];            \
-        (PDEST)[i_dx + 4 + 7] = (PSOURCE)[i_dx + 4];            \
-        (PDEST)[i_dx + 5 + 7] = (PSOURCE)[i_dx + 5];            \
-        (PDEST)[i_dx + 6 + 7] = (PSOURCE)[i_dx + 6];            \
-    }                                                           \
-}
-
-#endif // JU_64BIT
-
-// Counterparts to the above for deleting an Index:
-
-#define JU_DELETECOPY(PDEST,PSOURCE,POP1,OFFSET,IGNORE)         \
-        assert((long) (POP1) > 0);                              \
-        assert((Word_t) (OFFSET) < (Word_t) (POP1));            \
-        {                                                       \
-            Word_t i_offset;                                    \
-                                                                \
-            for (i_offset = 0; i_offset < (OFFSET); ++i_offset) \
-                (PDEST)[i_offset] = (PSOURCE)[i_offset];        \
-                                                                \
-            for (++i_offset; i_offset < (POP1); ++i_offset)     \
-                (PDEST)[i_offset - 1] = (PSOURCE)[i_offset];    \
-        }
-
-// Variation for odd-byte-sized (non-native) Indexes, where cIS = Index Size;
-// copy byte-by-byte:
-//
-// Note:  There are no endian issues here because bytes are just shifted as-is,
-// not converted to/from an Index.
-//
-// Note:  If cIS == 1, JU_DELETECOPY_ODD == JU_DELETECOPY, at least in concept.
-
-#define JU_DELETECOPY_ODD(PDEST,PSOURCE,POP1,OFFSET,cIS)                \
-        assert((long) (POP1) > 0);                                      \
-        assert((Word_t) (OFFSET) < (Word_t) (POP1));                    \
-        {                                                               \
-            uint8_t *_Pdest   = (uint8_t *) (PDEST);                    \
-            uint8_t *_Psource = (uint8_t *) (PSOURCE);                  \
-            Word_t   b_off;                                             \
-                                                                        \
-            for (b_off = 0; b_off < ((OFFSET) * (cIS)); ++b_off)        \
-                *_Pdest++ = *_Psource++;                                \
-                                                                        \
-            _Psource += (cIS);                                          \
-                                                                        \
-            for (b_off += (cIS); b_off < ((POP1) * (cIS)); ++b_off)     \
-                *_Pdest++ = *_Psource++;                                \
-        }
-
-
-// GENERIC RETURN CODE HANDLING FOR JUDY1 (NO VALUE AREAS) AND JUDYL (VALUE
-// AREAS):
-//
-// This common code hides Judy1 versus JudyL details of how to return various
-// conditions, including a pointer to a value area for JudyL.
-//
-// First, define an internal variation of JERR called JERRI (I = int) to make
-// lint happy.  We accidentally shipped to 11.11 OEUR with all functions that
-// return int or Word_t using JERR, which is type Word_t, for errors.  Lint
-// complains about this for functions that return int.  So, internally use
-// JERRI for error returns from the int functions.  Experiments show that
-// callers which compare int Foo() to (Word_t) JERR (~0UL) are OK, since JERRI
-// sign-extends to match JERR.
-
-#define JERRI ((int) ~0)                // see above.
-
-#ifdef JUDY1
-
-#define JU_RET_FOUND    return(1)
-#define JU_RET_NOTFOUND return(0)
-
-// For Judy1, these all "fall through" to simply JU_RET_FOUND, since there is no
-// value area pointer to return:
-
-#define JU_RET_FOUND_LEAFW(PJLW,POP1,OFFSET)    JU_RET_FOUND
-
-#define JU_RET_FOUND_JPM(Pjpm)                  JU_RET_FOUND
-#define JU_RET_FOUND_PVALUE(Pjv,OFFSET)         JU_RET_FOUND
-#ifndef JU_64BIT
-#define JU_RET_FOUND_LEAF1(Pjll,POP1,OFFSET)    JU_RET_FOUND
-#endif
-#define JU_RET_FOUND_LEAF2(Pjll,POP1,OFFSET)    JU_RET_FOUND
-#define JU_RET_FOUND_LEAF3(Pjll,POP1,OFFSET)    JU_RET_FOUND
-#ifdef JU_64BIT
-#define JU_RET_FOUND_LEAF4(Pjll,POP1,OFFSET)    JU_RET_FOUND
-#define JU_RET_FOUND_LEAF5(Pjll,POP1,OFFSET)    JU_RET_FOUND
-#define JU_RET_FOUND_LEAF6(Pjll,POP1,OFFSET)    JU_RET_FOUND
-#define JU_RET_FOUND_LEAF7(Pjll,POP1,OFFSET)    JU_RET_FOUND
-#endif
-#define JU_RET_FOUND_IMM_01(Pjp)                JU_RET_FOUND
-#define JU_RET_FOUND_IMM(Pjp,OFFSET)            JU_RET_FOUND
-
-// Note:  No JudyL equivalent:
-
-#define JU_RET_FOUND_FULLPOPU1                   JU_RET_FOUND
-#define JU_RET_FOUND_LEAF_B1(PJLB,SUBEXP,OFFSET) JU_RET_FOUND
-
-#else // JUDYL
-
-//      JU_RET_FOUND            // see below; must NOT be defined for JudyL.
-#define JU_RET_NOTFOUND return((PPvoid_t) NULL)
-
-// For JudyL, the location of the value area depends on the JP type and other
-// factors:
-//
-// TBD:  The value areas should be accessed via data structures, here and in
-// Dougs code, not by hard-coded address calculations.
-//
-// This is useful in insert/delete code when the value area is returned from
-// lower levels in the JPM:
-
-#define JU_RET_FOUND_JPM(Pjpm)  return((PPvoid_t) ((Pjpm)->jpm_PValue))
-
-// This is useful in insert/delete code when the value area location is already
-// computed:
-
-#define JU_RET_FOUND_PVALUE(Pjv,OFFSET) return((PPvoid_t) ((Pjv) + OFFSET))
-
-#define JU_RET_FOUND_LEAFW(PJLW,POP1,OFFSET) \
-                return((PPvoid_t) (JL_LEAFWVALUEAREA(PJLW, POP1) + (OFFSET)))
-
-#define JU_RET_FOUND_LEAF1(Pjll,POP1,OFFSET) \
-                return((PPvoid_t) (JL_LEAF1VALUEAREA(Pjll, POP1) + (OFFSET)))
-#define JU_RET_FOUND_LEAF2(Pjll,POP1,OFFSET) \
-                return((PPvoid_t) (JL_LEAF2VALUEAREA(Pjll, POP1) + (OFFSET)))
-#define JU_RET_FOUND_LEAF3(Pjll,POP1,OFFSET) \
-                return((PPvoid_t) (JL_LEAF3VALUEAREA(Pjll, POP1) + (OFFSET)))
-#ifdef JU_64BIT
-#define JU_RET_FOUND_LEAF4(Pjll,POP1,OFFSET) \
-                return((PPvoid_t) (JL_LEAF4VALUEAREA(Pjll, POP1) + (OFFSET)))
-#define JU_RET_FOUND_LEAF5(Pjll,POP1,OFFSET) \
-                return((PPvoid_t) (JL_LEAF5VALUEAREA(Pjll, POP1) + (OFFSET)))
-#define JU_RET_FOUND_LEAF6(Pjll,POP1,OFFSET) \
-                return((PPvoid_t) (JL_LEAF6VALUEAREA(Pjll, POP1) + (OFFSET)))
-#define JU_RET_FOUND_LEAF7(Pjll,POP1,OFFSET) \
-                return((PPvoid_t) (JL_LEAF7VALUEAREA(Pjll, POP1) + (OFFSET)))
-#endif
-
-// Note:  Here jp_Addr is a value area itself and not an address, so P_JV() is
-// not needed:
-
-#define JU_RET_FOUND_IMM_01(PJP)  return((PPvoid_t) (&((PJP)->jp_Addr)))
-
-// Note:  Here jp_Addr is a pointer to a separately-mallocd value area, so
-// P_JV() is required; likewise for JL_JLB_PVALUE:
-
-#define JU_RET_FOUND_IMM(PJP,OFFSET) \
-            return((PPvoid_t) (P_JV((PJP)->jp_Addr) + (OFFSET)))
-
-#define JU_RET_FOUND_LEAF_B1(PJLB,SUBEXP,OFFSET) \
-            return((PPvoid_t) (P_JV(JL_JLB_PVALUE(PJLB, SUBEXP)) + (OFFSET)))
-
-#endif // JUDYL
-
-
-// GENERIC ERROR HANDLING:
-//
-// This is complicated by variations in the needs of the callers of these
-// macros.  Only use JU_SET_ERRNO() for PJError, because it can be null; use
-// JU_SET_ERRNO_NONNULL() for Pjpm, which is never null, and also in other
-// cases where the pointer is known not to be null (to save dead branches).
-//
-// Note:  Most cases of JU_ERRNO_OVERRUN or JU_ERRNO_CORRUPT should result in
-// an assertion failure in debug code, so they are more likely to be caught, so
-// do that here in each macro.
-
-#define JU_SET_ERRNO(PJError, JErrno)                   \
-        {                                               \
-            assert((JErrno) != JU_ERRNO_OVERRUN);       \
-            assert((JErrno) != JU_ERRNO_CORRUPT);       \
-                                                        \
-            if (PJError != (PJError_t) NULL)            \
-            {                                           \
-                JU_ERRNO(PJError) = (JErrno);           \
-                JU_ERRID(PJError) = __LINE__;           \
-            }                                           \
-        }
-
-// Variation for callers who know already that PJError is non-null; and, it can
-// also be Pjpm (both PJError_t and Pjpm_t have je_* fields), so only assert it
-// for null, not cast to any specific pointer type:
-
-#define JU_SET_ERRNO_NONNULL(PJError, JErrno)           \
-        {                                               \
-            assert((JErrno) != JU_ERRNO_OVERRUN);       \
-            assert((JErrno) != JU_ERRNO_CORRUPT);       \
-            assert(PJError);                            \
-                                                        \
-            JU_ERRNO(PJError) = (JErrno);               \
-            JU_ERRID(PJError) = __LINE__;               \
-        }
-
-// Variation to copy error info from a (required) JPM to an (optional)
-// PJError_t:
-//
-// Note:  The assertions above about JU_ERRNO_OVERRUN and JU_ERRNO_CORRUPT
-// should have already popped, so they are not needed here.
-
-#define JU_COPY_ERRNO(PJError, Pjpm)                            \
-        {                                                       \
-            if (PJError)                                        \
-            {                                                   \
-                JU_ERRNO(PJError) = (uint8_t)JU_ERRNO(Pjpm);    \
-                JU_ERRID(PJError) = JU_ERRID(Pjpm);             \
-            }                                                   \
-        }
-
-// For JErrno parameter to previous macros upon return from Judy*Alloc*():
-//
-// The memory allocator returns an address of 0 for out of memory,
-// 1..sizeof(Word_t)-1 for corruption (an invalid pointer), otherwise a valid
-// pointer.
-
-#define JU_ALLOC_ERRNO(ADDR) \
-        (((void *) (ADDR) != (void *) NULL) ? JU_ERRNO_OVERRUN : JU_ERRNO_NOMEM)
-
-#define JU_CHECKALLOC(Type,Ptr,Retval)                  \
-        if ((Ptr) < (Type) sizeof(Word_t))              \
-        {                                               \
-            JU_SET_ERRNO(PJError, JU_ALLOC_ERRNO(Ptr)); \
-            return(Retval);                             \
-        }
-
-// Leaf search routines
-
-#ifdef JU_NOINLINE
-
-int j__udySearchLeaf1(Pjll_t Pjll, Word_t LeafPop1, Word_t Index);
-int j__udySearchLeaf2(Pjll_t Pjll, Word_t LeafPop1, Word_t Index);
-int j__udySearchLeaf3(Pjll_t Pjll, Word_t LeafPop1, Word_t Index);
-
-#ifdef JU_64BIT
-
-int j__udySearchLeaf4(Pjll_t Pjll, Word_t LeafPop1, Word_t Index);
-int j__udySearchLeaf5(Pjll_t Pjll, Word_t LeafPop1, Word_t Index);
-int j__udySearchLeaf6(Pjll_t Pjll, Word_t LeafPop1, Word_t Index);
-int j__udySearchLeaf7(Pjll_t Pjll, Word_t LeafPop1, Word_t Index);
-
-#endif // JU_64BIT
-
-int j__udySearchLeafW(Pjlw_t Pjlw, Word_t LeafPop1, Word_t Index);
-
-#else  // complier support for inline
-
-#ifdef JU_WIN
-static __inline int j__udySearchLeaf1(Pjll_t Pjll, Word_t LeafPop1, Word_t Index)
-#else
-static inline int j__udySearchLeaf1(Pjll_t Pjll, Word_t LeafPop1, Word_t Index)
-#endif
-{ SEARCHLEAFNATIVE(uint8_t,  Pjll, LeafPop1, Index); }
-
-#ifdef JU_WIN
-static __inline int j__udySearchLeaf2(Pjll_t Pjll, Word_t LeafPop1, Word_t Index)
-#else
-static inline int j__udySearchLeaf2(Pjll_t Pjll, Word_t LeafPop1, Word_t Index)
-#endif
-{ SEARCHLEAFNATIVE(uint16_t, Pjll, LeafPop1, Index); }
-
-#ifdef JU_WIN
-static __inline int j__udySearchLeaf3(Pjll_t Pjll, Word_t LeafPop1, Word_t Index)
-#else
-static inline int j__udySearchLeaf3(Pjll_t Pjll, Word_t LeafPop1, Word_t Index)
-#endif
-{ SEARCHLEAFNONNAT(Pjll, LeafPop1, Index, 3, JU_COPY3_PINDEX_TO_LONG); }
-
-#ifdef JU_64BIT
-
-#ifdef JU_WIN
-static __inline int j__udySearchLeaf4(Pjll_t Pjll, Word_t LeafPop1, Word_t Index)
-#else
-static inline int j__udySearchLeaf4(Pjll_t Pjll, Word_t LeafPop1, Word_t Index)
-#endif
-{ SEARCHLEAFNATIVE(uint32_t, Pjll, LeafPop1, Index); }
-
-#ifdef JU_WIN
-static __inline int j__udySearchLeaf5(Pjll_t Pjll, Word_t LeafPop1, Word_t Index)
-#else
-static inline int j__udySearchLeaf5(Pjll_t Pjll, Word_t LeafPop1, Word_t Index)
-#endif
-{ SEARCHLEAFNONNAT(Pjll, LeafPop1, Index, 5, JU_COPY5_PINDEX_TO_LONG); }
-
-#ifdef JU_WIN
-static __inline int j__udySearchLeaf6(Pjll_t Pjll, Word_t LeafPop1, Word_t Index)
-#else
-static inline int j__udySearchLeaf6(Pjll_t Pjll, Word_t LeafPop1, Word_t Index)
-#endif
-{ SEARCHLEAFNONNAT(Pjll, LeafPop1, Index, 6, JU_COPY6_PINDEX_TO_LONG); }
-
-#ifdef JU_WIN
-static __inline int j__udySearchLeaf7(Pjll_t Pjll, Word_t LeafPop1, Word_t Index)
-#else
-static inline int j__udySearchLeaf7(Pjll_t Pjll, Word_t LeafPop1, Word_t Index)
-#endif
-{ SEARCHLEAFNONNAT(Pjll, LeafPop1, Index, 7, JU_COPY7_PINDEX_TO_LONG); }
-
-#endif // JU_64BIT
-
-#ifdef JU_WIN
-static __inline int j__udySearchLeafW(Pjlw_t Pjlw, Word_t LeafPop1, Word_t Index)
-#else
-static inline int j__udySearchLeafW(Pjlw_t Pjlw, Word_t LeafPop1, Word_t Index)
-#endif
-{ SEARCHLEAFNATIVE(Word_t, Pjlw, LeafPop1, Index); }
-
-#endif // compiler support for inline
-
-#endif // ! _JUDYPRIVATE_INCLUDED
diff --git a/libs/klib/judy/JudyPrivate1L.h b/libs/klib/judy/JudyPrivate1L.h
deleted file mode 100644
index 5b9591f..0000000
--- a/libs/klib/judy/JudyPrivate1L.h
+++ /dev/null
@@ -1,483 +0,0 @@
-#ifndef _JUDYPRIVATE1L_INCLUDED
-#define	_JUDYPRIVATE1L_INCLUDED
-// _________________
-//
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// ****************************************************************************
-// Declare common cJU_* names for JP Types that occur in both Judy1 and JudyL,
-// for use by code that ifdefs JUDY1 and JUDYL.  Only JP Types common to both
-// Judy1 and JudyL are #defined here with equivalent cJU_* names.  JP Types
-// unique to only Judy1 or JudyL are listed in comments, so the type lists
-// match the Judy1.h and JudyL.h files.
-//
-// This file also defines cJU_* for other JP-related constants and functions
-// that some shared JUDY1/JUDYL code finds handy.
-//
-// At least in principle this file should be included AFTER Judy1.h or JudyL.h.
-//
-// WARNING:  This file must be kept consistent with the enums in Judy1.h and
-// JudyL.h.
-//
-// TBD:  You might think, why not define common cJU_* enums in, say,
-// JudyPrivate.h, and then inherit them into superset enums in Judy1.h and
-// JudyL.h?  The problem is that the enum lists for each class (cJ1_* and
-// cJL_*) must be numerically "packed" into the correct order, for two reasons:
-// (1) allow the compiler to generate "tight" switch statements with no wasted
-// slots (although this is not very big), and (2) allow calculations using the
-// enum values, although this is also not an issue if the calculations are only
-// within each cJ*_JPIMMED_*_* class and the members are packed within the
-// class.
-
-#ifdef JUDY1
-
-#define	cJU_JRPNULL		cJ1_JRPNULL
-#define	cJU_JPNULL1		cJ1_JPNULL1
-#define	cJU_JPNULL2		cJ1_JPNULL2
-#define	cJU_JPNULL3		cJ1_JPNULL3
-#ifdef JU_64BIT
-#define	cJU_JPNULL4		cJ1_JPNULL4
-#define	cJU_JPNULL5		cJ1_JPNULL5
-#define	cJU_JPNULL6		cJ1_JPNULL6
-#define	cJU_JPNULL7		cJ1_JPNULL7
-#endif
-#define	cJU_JPNULLMAX		cJ1_JPNULLMAX
-#define	cJU_JPBRANCH_L2		cJ1_JPBRANCH_L2
-#define	cJU_JPBRANCH_L3		cJ1_JPBRANCH_L3
-#ifdef JU_64BIT
-#define	cJU_JPBRANCH_L4		cJ1_JPBRANCH_L4
-#define	cJU_JPBRANCH_L5		cJ1_JPBRANCH_L5
-#define	cJU_JPBRANCH_L6		cJ1_JPBRANCH_L6
-#define	cJU_JPBRANCH_L7		cJ1_JPBRANCH_L7
-#endif
-#define	cJU_JPBRANCH_L		cJ1_JPBRANCH_L
-#define	j__U_BranchBJPPopToWords j__1_BranchBJPPopToWords
-#define	cJU_JPBRANCH_B2		cJ1_JPBRANCH_B2
-#define	cJU_JPBRANCH_B3		cJ1_JPBRANCH_B3
-#ifdef JU_64BIT
-#define	cJU_JPBRANCH_B4		cJ1_JPBRANCH_B4
-#define	cJU_JPBRANCH_B5		cJ1_JPBRANCH_B5
-#define	cJU_JPBRANCH_B6		cJ1_JPBRANCH_B6
-#define	cJU_JPBRANCH_B7		cJ1_JPBRANCH_B7
-#endif
-#define	cJU_JPBRANCH_B		cJ1_JPBRANCH_B
-#define	cJU_JPBRANCH_U2		cJ1_JPBRANCH_U2
-#define	cJU_JPBRANCH_U3		cJ1_JPBRANCH_U3
-#ifdef JU_64BIT
-#define	cJU_JPBRANCH_U4		cJ1_JPBRANCH_U4
-#define	cJU_JPBRANCH_U5		cJ1_JPBRANCH_U5
-#define	cJU_JPBRANCH_U6		cJ1_JPBRANCH_U6
-#define	cJU_JPBRANCH_U7		cJ1_JPBRANCH_U7
-#endif
-#define	cJU_JPBRANCH_U		cJ1_JPBRANCH_U
-#ifndef JU_64BIT
-#define	cJU_JPLEAF1		cJ1_JPLEAF1
-#endif
-#define	cJU_JPLEAF2		cJ1_JPLEAF2
-#define	cJU_JPLEAF3		cJ1_JPLEAF3
-#ifdef JU_64BIT
-#define	cJU_JPLEAF4		cJ1_JPLEAF4
-#define	cJU_JPLEAF5		cJ1_JPLEAF5
-#define	cJU_JPLEAF6		cJ1_JPLEAF6
-#define	cJU_JPLEAF7		cJ1_JPLEAF7
-#endif
-#define	cJU_JPLEAF_B1		cJ1_JPLEAF_B1
-//				cJ1_JPFULLPOPU1
-#define	cJU_JPIMMED_1_01	cJ1_JPIMMED_1_01
-#define	cJU_JPIMMED_2_01	cJ1_JPIMMED_2_01
-#define	cJU_JPIMMED_3_01	cJ1_JPIMMED_3_01
-#ifdef JU_64BIT
-#define	cJU_JPIMMED_4_01	cJ1_JPIMMED_4_01
-#define	cJU_JPIMMED_5_01	cJ1_JPIMMED_5_01
-#define	cJU_JPIMMED_6_01	cJ1_JPIMMED_6_01
-#define	cJU_JPIMMED_7_01	cJ1_JPIMMED_7_01
-#endif
-#define	cJU_JPIMMED_1_02	cJ1_JPIMMED_1_02
-#define	cJU_JPIMMED_1_03	cJ1_JPIMMED_1_03
-#define	cJU_JPIMMED_1_04	cJ1_JPIMMED_1_04
-#define	cJU_JPIMMED_1_05	cJ1_JPIMMED_1_05
-#define	cJU_JPIMMED_1_06	cJ1_JPIMMED_1_06
-#define	cJU_JPIMMED_1_07	cJ1_JPIMMED_1_07
-#ifdef JU_64BIT
-//				cJ1_JPIMMED_1_08
-//				cJ1_JPIMMED_1_09
-//				cJ1_JPIMMED_1_10
-//				cJ1_JPIMMED_1_11
-//				cJ1_JPIMMED_1_12
-//				cJ1_JPIMMED_1_13
-//				cJ1_JPIMMED_1_14
-//				cJ1_JPIMMED_1_15
-#endif
-#define	cJU_JPIMMED_2_02	cJ1_JPIMMED_2_02
-#define	cJU_JPIMMED_2_03	cJ1_JPIMMED_2_03
-#ifdef JU_64BIT
-//				cJ1_JPIMMED_2_04
-//				cJ1_JPIMMED_2_05
-//				cJ1_JPIMMED_2_06
-//				cJ1_JPIMMED_2_07
-#endif
-#define	cJU_JPIMMED_3_02	cJ1_JPIMMED_3_02
-#ifdef JU_64BIT
-//				cJ1_JPIMMED_3_03
-//				cJ1_JPIMMED_3_04
-//				cJ1_JPIMMED_3_05
-//				cJ1_JPIMMED_4_02
-//				cJ1_JPIMMED_4_03
-//				cJ1_JPIMMED_5_02
-//				cJ1_JPIMMED_5_03
-//				cJ1_JPIMMED_6_02
-//				cJ1_JPIMMED_7_02
-#endif
-#define	cJU_JPIMMED_CAP		cJ1_JPIMMED_CAP
-
-#else // JUDYL ****************************************************************
-
-#define	cJU_JRPNULL		cJL_JRPNULL
-#define	cJU_JPNULL1		cJL_JPNULL1
-#define	cJU_JPNULL2		cJL_JPNULL2
-#define	cJU_JPNULL3		cJL_JPNULL3
-#ifdef JU_64BIT
-#define	cJU_JPNULL4		cJL_JPNULL4
-#define	cJU_JPNULL5		cJL_JPNULL5
-#define	cJU_JPNULL6		cJL_JPNULL6
-#define	cJU_JPNULL7		cJL_JPNULL7
-#endif
-#define	cJU_JPNULLMAX		cJL_JPNULLMAX
-#define	cJU_JPBRANCH_L2		cJL_JPBRANCH_L2
-#define	cJU_JPBRANCH_L3		cJL_JPBRANCH_L3
-#ifdef JU_64BIT
-#define	cJU_JPBRANCH_L4		cJL_JPBRANCH_L4
-#define	cJU_JPBRANCH_L5		cJL_JPBRANCH_L5
-#define	cJU_JPBRANCH_L6		cJL_JPBRANCH_L6
-#define	cJU_JPBRANCH_L7		cJL_JPBRANCH_L7
-#endif
-#define	cJU_JPBRANCH_L		cJL_JPBRANCH_L
-#define	j__U_BranchBJPPopToWords j__L_BranchBJPPopToWords
-#define	cJU_JPBRANCH_B2		cJL_JPBRANCH_B2
-#define	cJU_JPBRANCH_B3		cJL_JPBRANCH_B3
-#ifdef JU_64BIT
-#define	cJU_JPBRANCH_B4		cJL_JPBRANCH_B4
-#define	cJU_JPBRANCH_B5		cJL_JPBRANCH_B5
-#define	cJU_JPBRANCH_B6		cJL_JPBRANCH_B6
-#define	cJU_JPBRANCH_B7		cJL_JPBRANCH_B7
-#endif
-#define	cJU_JPBRANCH_B		cJL_JPBRANCH_B
-#define	cJU_JPBRANCH_U2		cJL_JPBRANCH_U2
-#define	cJU_JPBRANCH_U3		cJL_JPBRANCH_U3
-#ifdef JU_64BIT
-#define	cJU_JPBRANCH_U4		cJL_JPBRANCH_U4
-#define	cJU_JPBRANCH_U5		cJL_JPBRANCH_U5
-#define	cJU_JPBRANCH_U6		cJL_JPBRANCH_U6
-#define	cJU_JPBRANCH_U7		cJL_JPBRANCH_U7
-#endif
-#define	cJU_JPBRANCH_U		cJL_JPBRANCH_U
-#define	cJU_JPLEAF1		cJL_JPLEAF1
-#define	cJU_JPLEAF2		cJL_JPLEAF2
-#define	cJU_JPLEAF3		cJL_JPLEAF3
-#ifdef JU_64BIT
-#define	cJU_JPLEAF4		cJL_JPLEAF4
-#define	cJU_JPLEAF5		cJL_JPLEAF5
-#define	cJU_JPLEAF6		cJL_JPLEAF6
-#define	cJU_JPLEAF7		cJL_JPLEAF7
-#endif
-#define	cJU_JPLEAF_B1		cJL_JPLEAF_B1
-#define	cJU_JPIMMED_1_01	cJL_JPIMMED_1_01
-#define	cJU_JPIMMED_2_01	cJL_JPIMMED_2_01
-#define	cJU_JPIMMED_3_01	cJL_JPIMMED_3_01
-#ifdef JU_64BIT
-#define	cJU_JPIMMED_4_01	cJL_JPIMMED_4_01
-#define	cJU_JPIMMED_5_01	cJL_JPIMMED_5_01
-#define	cJU_JPIMMED_6_01	cJL_JPIMMED_6_01
-#define	cJU_JPIMMED_7_01	cJL_JPIMMED_7_01
-#endif
-#define	cJU_JPIMMED_1_02	cJL_JPIMMED_1_02
-#define	cJU_JPIMMED_1_03	cJL_JPIMMED_1_03
-#ifdef JU_64BIT
-#define	cJU_JPIMMED_1_04	cJL_JPIMMED_1_04
-#define	cJU_JPIMMED_1_05	cJL_JPIMMED_1_05
-#define	cJU_JPIMMED_1_06	cJL_JPIMMED_1_06
-#define	cJU_JPIMMED_1_07	cJL_JPIMMED_1_07
-#define	cJU_JPIMMED_2_02	cJL_JPIMMED_2_02
-#define	cJU_JPIMMED_2_03	cJL_JPIMMED_2_03
-#define	cJU_JPIMMED_3_02	cJL_JPIMMED_3_02
-#endif
-#define	cJU_JPIMMED_CAP		cJL_JPIMMED_CAP
-
-#endif // JUDYL
-
-
-// ****************************************************************************
-// cJU*_ other than JP types:
-
-#ifdef JUDY1
-
-#define	cJU_LEAFW_MAXPOP1	cJ1_LEAFW_MAXPOP1
-#ifndef JU_64BIT
-#define	cJU_LEAF1_MAXPOP1	cJ1_LEAF1_MAXPOP1
-#endif
-#define	cJU_LEAF2_MAXPOP1	cJ1_LEAF2_MAXPOP1
-#define	cJU_LEAF3_MAXPOP1	cJ1_LEAF3_MAXPOP1
-#ifdef JU_64BIT
-#define	cJU_LEAF4_MAXPOP1	cJ1_LEAF4_MAXPOP1
-#define	cJU_LEAF5_MAXPOP1	cJ1_LEAF5_MAXPOP1
-#define	cJU_LEAF6_MAXPOP1	cJ1_LEAF6_MAXPOP1
-#define	cJU_LEAF7_MAXPOP1	cJ1_LEAF7_MAXPOP1
-#endif
-#define	cJU_IMMED1_MAXPOP1	cJ1_IMMED1_MAXPOP1
-#define	cJU_IMMED2_MAXPOP1	cJ1_IMMED2_MAXPOP1
-#define	cJU_IMMED3_MAXPOP1	cJ1_IMMED3_MAXPOP1
-#ifdef JU_64BIT
-#define	cJU_IMMED4_MAXPOP1	cJ1_IMMED4_MAXPOP1
-#define	cJU_IMMED5_MAXPOP1	cJ1_IMMED5_MAXPOP1
-#define	cJU_IMMED6_MAXPOP1	cJ1_IMMED6_MAXPOP1
-#define	cJU_IMMED7_MAXPOP1	cJ1_IMMED7_MAXPOP1
-#endif
-
-#define	JU_LEAF1POPTOWORDS(Pop1)	J1_LEAF1POPTOWORDS(Pop1)
-#define	JU_LEAF2POPTOWORDS(Pop1)	J1_LEAF2POPTOWORDS(Pop1)
-#define	JU_LEAF3POPTOWORDS(Pop1)	J1_LEAF3POPTOWORDS(Pop1)
-#ifdef JU_64BIT
-#define	JU_LEAF4POPTOWORDS(Pop1)	J1_LEAF4POPTOWORDS(Pop1)
-#define	JU_LEAF5POPTOWORDS(Pop1)	J1_LEAF5POPTOWORDS(Pop1)
-#define	JU_LEAF6POPTOWORDS(Pop1)	J1_LEAF6POPTOWORDS(Pop1)
-#define	JU_LEAF7POPTOWORDS(Pop1)	J1_LEAF7POPTOWORDS(Pop1)
-#endif
-#define	JU_LEAFWPOPTOWORDS(Pop1)	J1_LEAFWPOPTOWORDS(Pop1)
-
-#ifndef JU_64BIT
-#define	JU_LEAF1GROWINPLACE(Pop1)	J1_LEAF1GROWINPLACE(Pop1)
-#endif
-#define	JU_LEAF2GROWINPLACE(Pop1)	J1_LEAF2GROWINPLACE(Pop1)
-#define	JU_LEAF3GROWINPLACE(Pop1)	J1_LEAF3GROWINPLACE(Pop1)
-#ifdef JU_64BIT
-#define	JU_LEAF4GROWINPLACE(Pop1)	J1_LEAF4GROWINPLACE(Pop1)
-#define	JU_LEAF5GROWINPLACE(Pop1)	J1_LEAF5GROWINPLACE(Pop1)
-#define	JU_LEAF6GROWINPLACE(Pop1)	J1_LEAF6GROWINPLACE(Pop1)
-#define	JU_LEAF7GROWINPLACE(Pop1)	J1_LEAF7GROWINPLACE(Pop1)
-#endif
-#define	JU_LEAFWGROWINPLACE(Pop1)	J1_LEAFWGROWINPLACE(Pop1)
-
-#define	j__udyCreateBranchL	j__udy1CreateBranchL
-#define	j__udyCreateBranchB	j__udy1CreateBranchB
-#define	j__udyCreateBranchU	j__udy1CreateBranchU
-#define	j__udyCascade1		j__udy1Cascade1
-#define	j__udyCascade2		j__udy1Cascade2
-#define	j__udyCascade3		j__udy1Cascade3
-#ifdef JU_64BIT
-#define	j__udyCascade4		j__udy1Cascade4
-#define	j__udyCascade5		j__udy1Cascade5
-#define	j__udyCascade6		j__udy1Cascade6
-#define	j__udyCascade7		j__udy1Cascade7
-#endif
-#define	j__udyCascadeL		j__udy1CascadeL
-#define	j__udyInsertBranch	j__udy1InsertBranch
-
-#define	j__udyBranchBToBranchL	j__udy1BranchBToBranchL
-#ifndef JU_64BIT
-#define	j__udyLeafB1ToLeaf1	j__udy1LeafB1ToLeaf1
-#endif
-#define	j__udyLeaf1ToLeaf2	j__udy1Leaf1ToLeaf2
-#define	j__udyLeaf2ToLeaf3	j__udy1Leaf2ToLeaf3
-#ifndef JU_64BIT
-#define	j__udyLeaf3ToLeafW	j__udy1Leaf3ToLeafW
-#else
-#define	j__udyLeaf3ToLeaf4	j__udy1Leaf3ToLeaf4
-#define	j__udyLeaf4ToLeaf5	j__udy1Leaf4ToLeaf5
-#define	j__udyLeaf5ToLeaf6	j__udy1Leaf5ToLeaf6
-#define	j__udyLeaf6ToLeaf7	j__udy1Leaf6ToLeaf7
-#define	j__udyLeaf7ToLeafW	j__udy1Leaf7ToLeafW
-#endif
-
-#define	jpm_t			j1pm_t
-#define	Pjpm_t			Pj1pm_t
-
-#define	jlb_t			j1lb_t
-#define	Pjlb_t			Pj1lb_t
-
-#define	JU_JLB_BITMAP		J1_JLB_BITMAP
-
-#define	j__udyAllocJPM		j__udy1AllocJ1PM
-#define	j__udyAllocJBL		j__udy1AllocJBL
-#define	j__udyAllocJBB		j__udy1AllocJBB
-#define	j__udyAllocJBBJP	j__udy1AllocJBBJP
-#define	j__udyAllocJBU		j__udy1AllocJBU
-#ifndef JU_64BIT
-#define	j__udyAllocJLL1		j__udy1AllocJLL1
-#endif
-#define	j__udyAllocJLL2		j__udy1AllocJLL2
-#define	j__udyAllocJLL3		j__udy1AllocJLL3
-#ifdef JU_64BIT
-#define	j__udyAllocJLL4		j__udy1AllocJLL4
-#define	j__udyAllocJLL5		j__udy1AllocJLL5
-#define	j__udyAllocJLL6		j__udy1AllocJLL6
-#define	j__udyAllocJLL7		j__udy1AllocJLL7
-#endif
-#define	j__udyAllocJLW		j__udy1AllocJLW
-#define	j__udyAllocJLB1		j__udy1AllocJLB1
-#define	j__udyFreeJPM		j__udy1FreeJ1PM
-#define	j__udyFreeJBL		j__udy1FreeJBL
-#define	j__udyFreeJBB		j__udy1FreeJBB
-#define	j__udyFreeJBBJP		j__udy1FreeJBBJP
-#define	j__udyFreeJBU		j__udy1FreeJBU
-#ifndef JU_64BIT
-#define	j__udyFreeJLL1		j__udy1FreeJLL1
-#endif
-#define	j__udyFreeJLL2		j__udy1FreeJLL2
-#define	j__udyFreeJLL3		j__udy1FreeJLL3
-#ifdef JU_64BIT
-#define	j__udyFreeJLL4		j__udy1FreeJLL4
-#define	j__udyFreeJLL5		j__udy1FreeJLL5
-#define	j__udyFreeJLL6		j__udy1FreeJLL6
-#define	j__udyFreeJLL7		j__udy1FreeJLL7
-#endif
-#define	j__udyFreeJLW		j__udy1FreeJLW
-#define	j__udyFreeJLB1		j__udy1FreeJLB1
-#define	j__udyFreeSM		j__udy1FreeSM
-
-#define	j__uMaxWords		j__u1MaxWords
-
-#ifdef DEBUG
-#define	JudyCheckPop		Judy1CheckPop
-#endif
-
-#else // JUDYL ****************************************************************
-
-#define	cJU_LEAFW_MAXPOP1	cJL_LEAFW_MAXPOP1
-#define	cJU_LEAF1_MAXPOP1	cJL_LEAF1_MAXPOP1
-#define	cJU_LEAF2_MAXPOP1	cJL_LEAF2_MAXPOP1
-#define	cJU_LEAF3_MAXPOP1	cJL_LEAF3_MAXPOP1
-#ifdef JU_64BIT
-#define	cJU_LEAF4_MAXPOP1	cJL_LEAF4_MAXPOP1
-#define	cJU_LEAF5_MAXPOP1	cJL_LEAF5_MAXPOP1
-#define	cJU_LEAF6_MAXPOP1	cJL_LEAF6_MAXPOP1
-#define	cJU_LEAF7_MAXPOP1	cJL_LEAF7_MAXPOP1
-#endif
-#define	cJU_IMMED1_MAXPOP1	cJL_IMMED1_MAXPOP1
-#define	cJU_IMMED2_MAXPOP1	cJL_IMMED2_MAXPOP1
-#define	cJU_IMMED3_MAXPOP1	cJL_IMMED3_MAXPOP1
-#ifdef JU_64BIT
-#define	cJU_IMMED4_MAXPOP1	cJL_IMMED4_MAXPOP1
-#define	cJU_IMMED5_MAXPOP1	cJL_IMMED5_MAXPOP1
-#define	cJU_IMMED6_MAXPOP1	cJL_IMMED6_MAXPOP1
-#define	cJU_IMMED7_MAXPOP1	cJL_IMMED7_MAXPOP1
-#endif
-
-#define	JU_LEAF1POPTOWORDS(Pop1)	JL_LEAF1POPTOWORDS(Pop1)
-#define	JU_LEAF2POPTOWORDS(Pop1)	JL_LEAF2POPTOWORDS(Pop1)
-#define	JU_LEAF3POPTOWORDS(Pop1)	JL_LEAF3POPTOWORDS(Pop1)
-#ifdef JU_64BIT
-#define	JU_LEAF4POPTOWORDS(Pop1)	JL_LEAF4POPTOWORDS(Pop1)
-#define	JU_LEAF5POPTOWORDS(Pop1)	JL_LEAF5POPTOWORDS(Pop1)
-#define	JU_LEAF6POPTOWORDS(Pop1)	JL_LEAF6POPTOWORDS(Pop1)
-#define	JU_LEAF7POPTOWORDS(Pop1)	JL_LEAF7POPTOWORDS(Pop1)
-#endif
-#define	JU_LEAFWPOPTOWORDS(Pop1)	JL_LEAFWPOPTOWORDS(Pop1)
-
-#define	JU_LEAF1GROWINPLACE(Pop1)	JL_LEAF1GROWINPLACE(Pop1)
-#define	JU_LEAF2GROWINPLACE(Pop1)	JL_LEAF2GROWINPLACE(Pop1)
-#define	JU_LEAF3GROWINPLACE(Pop1)	JL_LEAF3GROWINPLACE(Pop1)
-#ifdef JU_64BIT
-#define	JU_LEAF4GROWINPLACE(Pop1)	JL_LEAF4GROWINPLACE(Pop1)
-#define	JU_LEAF5GROWINPLACE(Pop1)	JL_LEAF5GROWINPLACE(Pop1)
-#define	JU_LEAF6GROWINPLACE(Pop1)	JL_LEAF6GROWINPLACE(Pop1)
-#define	JU_LEAF7GROWINPLACE(Pop1)	JL_LEAF7GROWINPLACE(Pop1)
-#endif
-#define	JU_LEAFWGROWINPLACE(Pop1)	JL_LEAFWGROWINPLACE(Pop1)
-
-#define	j__udyCreateBranchL	j__udyLCreateBranchL
-#define	j__udyCreateBranchB	j__udyLCreateBranchB
-#define	j__udyCreateBranchU	j__udyLCreateBranchU
-#define	j__udyCascade1		j__udyLCascade1
-#define	j__udyCascade2		j__udyLCascade2
-#define	j__udyCascade3		j__udyLCascade3
-#ifdef JU_64BIT
-#define	j__udyCascade4		j__udyLCascade4
-#define	j__udyCascade5		j__udyLCascade5
-#define	j__udyCascade6		j__udyLCascade6
-#define	j__udyCascade7		j__udyLCascade7
-#endif
-#define	j__udyCascadeL		j__udyLCascadeL
-#define	j__udyInsertBranch	j__udyLInsertBranch
-
-#define	j__udyBranchBToBranchL	j__udyLBranchBToBranchL
-#define	j__udyLeafB1ToLeaf1	j__udyLLeafB1ToLeaf1
-#define	j__udyLeaf1ToLeaf2	j__udyLLeaf1ToLeaf2
-#define	j__udyLeaf2ToLeaf3	j__udyLLeaf2ToLeaf3
-#ifndef JU_64BIT
-#define	j__udyLeaf3ToLeafW	j__udyLLeaf3ToLeafW
-#else
-#define	j__udyLeaf3ToLeaf4	j__udyLLeaf3ToLeaf4
-#define	j__udyLeaf4ToLeaf5	j__udyLLeaf4ToLeaf5
-#define	j__udyLeaf5ToLeaf6	j__udyLLeaf5ToLeaf6
-#define	j__udyLeaf6ToLeaf7	j__udyLLeaf6ToLeaf7
-#define	j__udyLeaf7ToLeafW	j__udyLLeaf7ToLeafW
-#endif
-
-#define	jpm_t			jLpm_t
-#define	Pjpm_t			PjLpm_t
-
-#define	jlb_t			jLlb_t
-#define	Pjlb_t			PjLlb_t
-
-#define	JU_JLB_BITMAP		JL_JLB_BITMAP
-
-#define	j__udyAllocJPM		j__udyLAllocJLPM
-#define	j__udyAllocJBL		j__udyLAllocJBL
-#define	j__udyAllocJBB		j__udyLAllocJBB
-#define	j__udyAllocJBBJP	j__udyLAllocJBBJP
-#define	j__udyAllocJBU		j__udyLAllocJBU
-#define	j__udyAllocJLL1		j__udyLAllocJLL1
-#define	j__udyAllocJLL2		j__udyLAllocJLL2
-#define	j__udyAllocJLL3		j__udyLAllocJLL3
-#ifdef JU_64BIT
-#define	j__udyAllocJLL4		j__udyLAllocJLL4
-#define	j__udyAllocJLL5		j__udyLAllocJLL5
-#define	j__udyAllocJLL6		j__udyLAllocJLL6
-#define	j__udyAllocJLL7		j__udyLAllocJLL7
-#endif
-#define	j__udyAllocJLW		j__udyLAllocJLW
-#define	j__udyAllocJLB1		j__udyLAllocJLB1
-//				j__udyLAllocJV
-#define	j__udyFreeJPM		j__udyLFreeJLPM
-#define	j__udyFreeJBL		j__udyLFreeJBL
-#define	j__udyFreeJBB		j__udyLFreeJBB
-#define	j__udyFreeJBBJP		j__udyLFreeJBBJP
-#define	j__udyFreeJBU		j__udyLFreeJBU
-#define	j__udyFreeJLL1		j__udyLFreeJLL1
-#define	j__udyFreeJLL2		j__udyLFreeJLL2
-#define	j__udyFreeJLL3		j__udyLFreeJLL3
-#ifdef JU_64BIT
-#define	j__udyFreeJLL4		j__udyLFreeJLL4
-#define	j__udyFreeJLL5		j__udyLFreeJLL5
-#define	j__udyFreeJLL6		j__udyLFreeJLL6
-#define	j__udyFreeJLL7		j__udyLFreeJLL7
-#endif
-#define	j__udyFreeJLW		j__udyLFreeJLW
-#define	j__udyFreeJLB1		j__udyLFreeJLB1
-#define	j__udyFreeSM		j__udyLFreeSM
-//				j__udyLFreeJV
-
-#define	j__uMaxWords		j__uLMaxWords
-
-#ifdef DEBUG
-#define	JudyCheckPop		JudyLCheckPop
-#endif
-
-#endif // JUDYL
-
-#endif // _JUDYPRIVATE1L_INCLUDED
diff --git a/libs/klib/judy/JudyPrivateBranch.h b/libs/klib/judy/JudyPrivateBranch.h
deleted file mode 100644
index 4e0dda4..0000000
--- a/libs/klib/judy/JudyPrivateBranch.h
+++ /dev/null
@@ -1,777 +0,0 @@
-#ifndef _JUDY_PRIVATE_BRANCH_INCLUDED
-#define _JUDY_PRIVATE_BRANCH_INCLUDED
-// _________________
-//
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// Header file for all Judy sources, for global but private (non-exported)
-// declarations specific to branch support.
-//
-// See also the "Judy Shop Manual" (try judy/doc/int/JudyShopManual.*).
-
-
-// ****************************************************************************
-// JUDY POINTER (JP) SUPPORT
-// ****************************************************************************
-//
-// This "rich pointer" object is pivotal to Judy execution.
-//
-// JP CONTAINING OTHER THAN IMMEDIATE INDEXES:
-//
-// If the JP points to a linear or bitmap leaf, jp_DcdPopO contains the
-// Population-1 in LSbs and Decode (Dcd) bytes in the MSBs.  (In practice the
-// Decode bits are masked off while accessing the Pop0 bits.)
-//
-// The Decode Size, the number of Dcd bytes available, is encoded in jpo_Type.
-// It can also be thought of as the number of states "skipped" in the SM, where
-// each state decodes 8 bits = 1 byte.
-//
-// TBD:  Dont need two structures, except possibly to force jp_Type to highest
-// address!
-//
-// Note:  The jpo_u union is not required by HP-UX or Linux but Win32 because
-// the cl.exe compiler otherwise refuses to pack a bitfield (DcdPopO) with
-// anything else, even with the -Zp option.  This is pretty ugly, but
-// fortunately portable, and its all hide-able by macros (see below).
-
-typedef struct J_UDY_POINTER_OTHERS      // JPO.
-        {
-            Word_t      j_po_Addr;       // first word:  Pjp_t, Word_t, etc.
-            union {
-//              Word_t  j_po_DcdPop0:cJU_BITSPERWORD-cJU_BITSPERBYTE;
-                uint8_t j_po_DcdP0[sizeof(Word_t) - 1];
-                uint8_t j_po_Bytes[sizeof(Word_t)];     // last byte = jp_Type.
-            } jpo_u;
-        } jpo_t;
-
-
-// JP CONTAINING IMMEDIATE INDEXES:
-//
-// j_pi_1Index[] plus j_pi_LIndex[] together hold as many N-byte (1..3-byte
-// [1..7-byte]) Indexes as will fit in sizeof(jpi_t) less 1 byte for j_pi_Type
-// (that is, 7..1 [15..1] Indexes).
-//
-// For Judy1, j_pi_1Index[] is used and j_pi_LIndex[] is not used.
-// For JudyL, j_pi_LIndex[] is used and j_pi_1Index[] is not used.
-//
-// Note:  Actually when Pop1 = 1, jpi_t is not used, and the least bytes of the
-// single Index are stored in j_po_DcdPopO, for both Judy1 and JudyL, so for
-// JudyL the j_po_Addr field can hold the target value.
-//
-// TBD:  Revise this structure to not overload j_po_DcdPopO this way?  The
-// current arrangement works, its just confusing.
-
-typedef struct _JUDY_POINTER_IMMED      // JPI.
-        {
-            uint8_t j_pi_1Index[sizeof(Word_t)];        // see above.
-            uint8_t j_pi_LIndex[sizeof(Word_t) - 1];    // see above.
-            uint8_t j_pi_Type;                  // JP type, 1 of cJ*_JPIMMED*.
-        } jpi_t;
-
-
-// UNION OF JP TYPES:
-//
-// A branch is an array of cJU_BRANCHUNUMJPS (256) of this object, or an
-// alternate data type such as:  A linear branch which is a list of 2..7 JPs,
-// or a bitmap branch which contains 8 lists of 0..32 JPs.  JPs reside only in
-// branches of a Judy SM.
-
-typedef union J_UDY_POINTER             // JP.
-        {
-            jpo_t j_po;                 // other than immediate indexes.
-            jpi_t j_pi;                 // immediate indexes.
-        } jp_t, *Pjp_t;
-
-// For coding convenience:
-//
-// Note, jp_Type has the same bits in jpo_t and jpi_t.
-
-#define jp_1Index  j_pi.j_pi_1Index     // for storing Indexes in first  word.
-#define jp_LIndex  j_pi.j_pi_LIndex     // for storing Indexes in second word.
-#define jp_Addr    j_po.j_po_Addr
-//#define       jp_DcdPop0 j_po.jpo_u.j_po_DcdPop0
-#define jp_Type    j_po.jpo_u.j_po_Bytes[sizeof(Word_t) - 1]
-#define jp_DcdP0   j_po.jpo_u.j_po_DcdP0
-
-
-// ****************************************************************************
-// JUDY POINTER (JP) -- RELATED MACROS AND CONSTANTS
-// ****************************************************************************
-
-// EXTRACT VALUES FROM JP:
-//
-// Masks for the bytes in the Dcd and Pop0 parts of jp_DcdPopO:
-//
-// cJU_DCDMASK() consists of a mask that excludes the (LSb) Pop0 bytes and
-// also, just to be safe, the top byte of the word, since jp_DcdPopO is 1 byte
-// less than a full word.
-//
-// Note:  These are constant macros (cJU) because cPopBytes should be a
-// constant.  Also note cPopBytes == state in the SM.
-
-#define cJU_POP0MASK(cPopBytes) JU_LEASTBYTESMASK(cPopBytes)
-
-#define cJU_DCDMASK(cPopBytes) \
-        ((cJU_ALLONES >> cJU_BITSPERBYTE) & (~cJU_POP0MASK(cPopBytes)))
-
-// Mask off the high byte from INDEX to it can be compared to DcdPopO:
-
-#define JU_TRIMTODCDSIZE(INDEX) ((cJU_ALLONES >> cJU_BITSPERBYTE) & (INDEX))
-
-// Get from jp_DcdPopO the Pop0 for various branch JP Types:
-//
-// Note:  There are no simple macros for cJU_BRANCH* Types because their
-// populations must be added up and dont reside in an already-calculated
-// place.
-
-#define JU_JPBRANCH_POP0(PJP,cPopBytes) \
-        (JU_JPDCDPOP0(PJP) & cJU_POP0MASK(cPopBytes))
-
-// METHOD FOR DETERMINING IF OBJECTS HAVE ROOM TO GROW:
-//
-// J__U_GROWCK() is a generic method to determine if an object can grow in
-// place, based on whether the next population size (one more) would use the
-// same space.
-
-#define J__U_GROWCK(POP1,MAXPOP1,POPTOWORDS) \
-        (((POP1) != (MAXPOP1)) && (POPTOWORDS[POP1] == POPTOWORDS[(POP1) + 1]))
-
-#define JU_BRANCHBJPGROWINPLACE(NumJPs) \
-        J__U_GROWCK(NumJPs, cJU_BITSPERSUBEXPB, j__U_BranchBJPPopToWords)
-
-
-// DETERMINE IF AN INDEX IS (NOT) IN A JPS EXPANSE:
-
-#define JU_DCDNOTMATCHINDEX(INDEX,PJP,POP0BYTES) \
-        (((INDEX) ^ JU_JPDCDPOP0(PJP)) & cJU_DCDMASK(POP0BYTES))
-
-
-// NUMBER OF JPs IN AN UNCOMPRESSED BRANCH:
-//
-// An uncompressed branch is simply an array of 256 Judy Pointers (JPs).  It is
-// a minimum cacheline fill object.  Define it here before its first needed.
-
-#define cJU_BRANCHUNUMJPS  cJU_SUBEXPPERSTATE
-
-
-// ****************************************************************************
-// JUDY BRANCH LINEAR (JBL) SUPPORT
-// ****************************************************************************
-//
-// A linear branch is a way of compressing empty expanses (null JPs) out of an
-// uncompressed 256-way branch, when the number of populated expanses is so
-// small that even a bitmap branch is excessive.
-//
-// The maximum number of JPs in a Judy linear branch:
-//
-// Note:  This number results in a 1-cacheline sized structure.  Previous
-// versions had a larger struct so a linear branch didnt become a bitmap
-// branch until the memory consumed was even, but for speed, its better to
-// switch "sooner" and keep a linear branch fast.
-
-#define cJU_BRANCHLMAXJPS 7
-
-
-// LINEAR BRANCH STRUCT:
-//
-// 1-byte count, followed by array of byte-sized expanses, followed by JPs.
-
-typedef struct J__UDY_BRANCH_LINEAR
-        {
-            uint8_t jbl_NumJPs;                     // num of JPs (Pjp_t), 1..N.
-            uint8_t jbl_Expanse[cJU_BRANCHLMAXJPS]; // 1..7 MSbs of pop exps.
-            jp_t    jbl_jp     [cJU_BRANCHLMAXJPS]; // JPs for populated exps.
-        } jbl_t, * Pjbl_t;
-
-
-// ****************************************************************************
-// JUDY BRANCH BITMAP (JBB) SUPPORT
-// ****************************************************************************
-//
-// A bitmap branch is a way of compressing empty expanses (null JPs) out of
-// uncompressed 256-way branch.  This costs 1 additional cache line fill, but
-// can save a lot of memory when it matters most, near the leaves, and
-// typically there will be only one at most in the path to any Index (leaf).
-//
-// The bitmap indicates which of the cJU_BRANCHUNUMJPS (256) JPs in the branch
-// are NOT null, that is, their expanses are populated.  The jbb_t also
-// contains N pointers to "mini" Judy branches ("subexpanses") of up to M JPs
-// each (see BITMAP_BRANCHMxN, for example, BITMAP_BRANCH32x8), where M x N =
-// cJU_BRANCHUNUMJPS.  These are dynamically allocated and never contain
-// cJ*_JPNULL* jp_Types.  An empty subexpanse is represented by no bit sets in
-// the corresponding subexpanse bitmap, in which case the corresponding
-// jbbs_Pjp pointers value is unused.
-//
-// Note that the number of valid JPs in each 1-of-N subexpanses is determined
-// by POPULATION rather than by EXPANSE -- the desired outcome to save memory
-// when near the leaves.  Note that the memory required for 185 JPs is about as
-// much as an uncompressed 256-way branch, therefore 184 is set as the maximum.
-// However, it is expected that a conversion to an uncompressed 256-way branch
-// will normally take place before this limit is reached for other reasons,
-// such as improving performance when the "wasted" memory is well amortized by
-// the population under the branch, preserving an acceptable overall
-// bytes/Index in the Judy array.
-//
-// The number of pointers to arrays of JPs in the Judy bitmap branch:
-//
-// Note:  The numbers below are the same in both 32 and 64 bit systems.
-
-#define cJU_BRANCHBMAXJPS  184          // maximum JPs for bitmap branches.
-
-// Convenience wrappers for referencing BranchB bitmaps or JP subarray
-// pointers:
-//
-// Note:  JU_JBB_PJP produces a "raw" memory address that must pass through
-// P_JP before use, except when freeing memory:
-
-#define JU_JBB_BITMAP(Pjbb, SubExp)  ((Pjbb)->jbb_jbbs[SubExp].jbbs_Bitmap)
-#define JU_JBB_PJP(   Pjbb, SubExp)  ((Pjbb)->jbb_jbbs[SubExp].jbbs_Pjp)
-
-#define JU_SUBEXPB(Digit) (((Digit) / cJU_BITSPERSUBEXPB) & (cJU_NUMSUBEXPB-1))
-
-#define JU_BITMAPTESTB(Pjbb, Index) \
-        (JU_JBB_BITMAP(Pjbb, JU_SUBEXPB(Index)) &  JU_BITPOSMASKB(Index))
-
-#define JU_BITMAPSETB(Pjbb, Index)  \
-        (JU_JBB_BITMAP(Pjbb, JU_SUBEXPB(Index)) |= JU_BITPOSMASKB(Index))
-
-// Note:  JU_BITMAPCLEARB is not defined because the code does it a faster way.
-
-typedef struct J__UDY_BRANCH_BITMAP_SUBEXPANSE
-        {
-            BITMAPB_t jbbs_Bitmap;
-            Pjp_t     jbbs_Pjp;
-
-        } jbbs_t;
-
-typedef struct J__UDY_BRANCH_BITMAP
-        {
-            jbbs_t jbb_jbbs   [cJU_NUMSUBEXPB];
-#ifdef SUBEXPCOUNTS
-            Word_t jbb_subPop1[cJU_NUMSUBEXPB];
-#endif
-        } jbb_t, * Pjbb_t;
-
-#define JU_BRANCHJP_NUMJPSTOWORDS(NumJPs) (j__U_BranchBJPPopToWords[NumJPs])
-
-#ifdef SUBEXPCOUNTS
-#define cJU_NUMSUBEXPU  16      // number of subexpanse counts.
-#endif
-
-
-// ****************************************************************************
-// JUDY BRANCH UNCOMPRESSED (JBU) SUPPORT
-// ****************************************************************************
-
-// Convenience wrapper for referencing BranchU JPs:
-//
-// Note:  This produces a non-"raw" address already passed through P_JBU().
-
-#define JU_JBU_PJP(Pjp,Index,Level) \
-        (&((P_JBU((Pjp)->jp_Addr))->jbu_jp[JU_DIGITATSTATE(Index, Level)]))
-#define JU_JBU_PJP0(Pjp) \
-        (&((P_JBU((Pjp)->jp_Addr))->jbu_jp[0]))
-
-typedef struct J__UDY_BRANCH_UNCOMPRESSED
-        {
-            jp_t   jbu_jp     [cJU_BRANCHUNUMJPS];  // JPs for populated exp.
-#ifdef SUBEXPCOUNTS
-            Word_t jbu_subPop1[cJU_NUMSUBEXPU];
-#endif
-        } jbu_t, * Pjbu_t;
-
-
-// ****************************************************************************
-// OTHER SUPPORT FOR JUDY STATE MACHINES (SMs)
-// ****************************************************************************
-
-// OBJECT SIZES IN WORDS:
-//
-// Word_ts per various JudyL structures that have constant sizes.
-// cJU_WORDSPERJP should always be 2; this is fundamental to the Judy
-// structures.
-
-#define cJU_WORDSPERJP (sizeof(jp_t)   / cJU_BYTESPERWORD)
-#define cJU_WORDSPERCL (cJU_BYTESPERCL / cJU_BYTESPERWORD)
-
-
-// OPPORTUNISTIC UNCOMPRESSION:
-//
-// Define populations at which a BranchL or BranchB must convert to BranchU.
-// Earlier conversion is possible with good memory efficiency -- see below.
-
-#ifndef NO_BRANCHU
-
-// Max population below BranchL, then convert to BranchU:
-
-#define JU_BRANCHL_MAX_POP      1000
-
-// Minimum global population increment before next conversion of a BranchB to a
-// BranchU:
-//
-// This is was done to allow malloc() to coalesce memory before the next big
-// (~512 words) allocation.
-
-#define JU_BTOU_POP_INCREMENT    300
-
-// Min/max population below BranchB, then convert to BranchU:
-
-#define JU_BRANCHB_MIN_POP       135
-#define JU_BRANCHB_MAX_POP       750
-
-#else // NO_BRANCHU
-
-// These are set up to have conservative conversion schedules to BranchU:
-
-#define JU_BRANCHL_MAX_POP      (-1UL)
-#define JU_BTOU_POP_INCREMENT      300
-#define JU_BRANCHB_MIN_POP        1000
-#define JU_BRANCHB_MAX_POP      (-1UL)
-
-#endif // NO_BRANCHU
-
-
-// MISCELLANEOUS MACROS:
-
-// Get N most significant bits from the shifted Index word:
-//
-// As Index words are decoded, they are shifted left so only relevant,
-// undecoded Index bits remain.
-
-#define JU_BITSFROMSFTIDX(SFTIDX, N)  ((SFTIDX) >> (cJU_BITSPERWORD - (N)))
-
-// TBD:  I have my doubts about the necessity of these macros (dlb):
-
-// Produce 1-digit mask at specified state:
-
-#define cJU_MASKATSTATE(State)  ((Word_t)0xff << (((State) - 1) * cJU_BITSPERBYTE))
-
-// Get byte (digit) from Index at the specified state, right justified:
-//
-// Note:  State must be 1..cJU_ROOTSTATE, and Digits must be 1..(cJU_ROOTSTATE
-// - 1), but theres no way to assert these within an expression.
-
-#define JU_DIGITATSTATE(Index,cState) \
-         ((uint8_t)((Index) >> (((cState) - 1) * cJU_BITSPERBYTE)))
-
-// Similarly, place byte (digit) at correct position for the specified state:
-//
-// Note:  Cast digit to a Word_t first so there are no complaints or problems
-// about shifting it more than 32 bits on a 64-bit system, say, when it is a
-// uint8_t from jbl_Expanse[].  (Believe it or not, the C standard says to
-// promote an unsigned char to a signed int; -Ac does not do this, but -Ae
-// does.)
-//
-// Also, to make lint happy, cast the whole result again because apparently
-// shifting a Word_t does not result in a Word_t!
-
-#define JU_DIGITTOSTATE(Digit,cState) \
-        ((Word_t) (((Word_t) (Digit)) << (((cState) - 1) * cJU_BITSPERBYTE)))
-
-#endif // ! _JUDY_PRIVATE_BRANCH_INCLUDED
-
-
-#ifdef TEST_INSDEL
-
-// ****************************************************************************
-// TEST CODE FOR INSERT/DELETE MACROS
-// ****************************************************************************
-//
-// To use this, compile a temporary *.c file containing:
-//
-//      #define DEBUG
-//      #define JUDY_ASSERT
-//      #define TEST_INSDEL
-//      #include "JudyPrivate.h"
-//      #include "JudyPrivateBranch.h"
-//
-// Use a command like this:  cc -Ae +DD64 -I. -I JudyCommon -o t t.c
-// For best results, include +DD64 on a 64-bit system.
-//
-// This test code exercises some tricky macros, but the output must be studied
-// manually to verify it.  Assume that for even-index testing, whole words
-// (Word_t) suffices.
-
-#include <stdio.h>
-
-#define INDEXES 3               // in each array.
-
-
-// ****************************************************************************
-// I N I T
-//
-// Set up variables for next test.  See usage.
-
-FUNCTION void Init (
-        int       base,
-        PWord_t   PeIndex,
-        PWord_t   PoIndex,
-        PWord_t   Peleaf,       // always whole words.
-#ifndef JU_64BIT
-        uint8_t * Poleaf3)
-#else
-        uint8_t * Poleaf3,
-        uint8_t * Poleaf5,
-        uint8_t * Poleaf6,
-        uint8_t * Poleaf7)
-#endif
-{
-        int offset;
-
-        *PeIndex = 99;
-
-        for (offset = 0; offset <= INDEXES; ++offset)
-            Peleaf[offset] = base + offset;
-
-        for (offset = 0; offset < (INDEXES + 1) * 3; ++offset)
-            Poleaf3[offset] = base + offset;
-
-#ifndef JU_64BIT
-        *PoIndex = (91 << 24) | (92 << 16) | (93 << 8) | 94;
-#else
-
-        *PoIndex = (91L << 56) | (92L << 48) | (93L << 40) | (94L << 32)
-                 | (95L << 24) | (96L << 16) | (97L <<  8) |  98L;
-
-        for (offset = 0; offset < (INDEXES + 1) * 5; ++offset)
-            Poleaf5[offset] = base + offset;
-
-        for (offset = 0; offset < (INDEXES + 1) * 6; ++offset)
-            Poleaf6[offset] = base + offset;
-
-        for (offset = 0; offset < (INDEXES + 1) * 7; ++offset)
-            Poleaf7[offset] = base + offset;
-#endif
-
-} // Init()
-
-
-// ****************************************************************************
-// P R I N T   L E A F
-//
-// Print the byte values in a leaf.
-
-FUNCTION void PrintLeaf (
-        char *    Label,        // for output.
-        int       IOffset,      // insertion offset in array.
-        int       Indsize,      // index size in bytes.
-        uint8_t * PLeaf)        // array of Index bytes.
-{
-        int       offset;       // in PLeaf.
-        int       byte;         // in one word.
-
-        (void) printf("%s %u: ", Label, IOffset);
-
-        for (offset = 0; offset <= INDEXES; ++offset)
-        {
-            for (byte = 0; byte < Indsize; ++byte)
-                (void) printf("%2d", PLeaf[(offset * Indsize) + byte]);
-
-            (void) printf(" ");
-        }
-
-        (void) printf("\n");
-
-} // PrintLeaf()
-
-
-// ****************************************************************************
-// M A I N
-//
-// Test program.
-
-FUNCTION main()
-{
-        Word_t  eIndex;                         // even, to insert.
-        Word_t  oIndex;                         // odd,  to insert.
-        Word_t  eleaf [ INDEXES + 1];           // even leaf, index size 4.
-        uint8_t oleaf3[(INDEXES + 1) * 3];      // odd leaf,  index size 3.
-#ifdef JU_64BIT
-        uint8_t oleaf5[(INDEXES + 1) * 5];      // odd leaf,  index size 5.
-        uint8_t oleaf6[(INDEXES + 1) * 6];      // odd leaf,  index size 6.
-        uint8_t oleaf7[(INDEXES + 1) * 7];      // odd leaf,  index size 7.
-#endif
-        Word_t  eleaf_2 [ INDEXES + 1];         // same, but second arrays:
-        uint8_t oleaf3_2[(INDEXES + 1) * 3];
-#ifdef JU_64BIT
-        uint8_t oleaf5_2[(INDEXES + 1) * 5];
-        uint8_t oleaf6_2[(INDEXES + 1) * 6];
-        uint8_t oleaf7_2[(INDEXES + 1) * 7];
-#endif
-        int     ioffset;                // index insertion offset.
-
-#ifndef JU_64BIT
-#define INIT        Init( 0, & eIndex, & oIndex, eleaf,   oleaf3)
-#define INIT2 INIT; Init(50, & eIndex, & oIndex, eleaf_2, oleaf3_2)
-#else
-#define INIT        Init( 0, & eIndex, & oIndex, eleaf,   oleaf3, \
-                         oleaf5,   oleaf6,   oleaf7)
-#define INIT2 INIT; Init(50, & eIndex, & oIndex, eleaf_2, oleaf3_2, \
-                         oleaf5_2, oleaf6_2, oleaf7_2)
-#endif
-
-#define WSIZE sizeof (Word_t)           // shorthand.
-
-#ifdef PRINTALL                 // to turn on "noisy" printouts.
-#define PRINTLEAF(Label,IOffset,Indsize,PLeaf) \
-        PrintLeaf(Label,IOffset,Indsize,PLeaf)
-#else
-#define PRINTLEAF(Label,IOffset,Indsize,PLeaf)  \
-        if (ioffset == 0)                       \
-        PrintLeaf(Label,IOffset,Indsize,PLeaf)
-#endif
-
-        (void) printf(
-"In each case, tests operate on an initial array of %d indexes.  Even-index\n"
-"tests set index values to 0,1,2...; odd-index tests set byte values to\n"
-"0,1,2...  Inserted indexes have a value of 99 or else byte values 91,92,...\n",
-                        INDEXES);
-
-        (void) puts("\nJU_INSERTINPLACE():");
-
-        for (ioffset = 0; ioffset <= INDEXES; ++ioffset)
-        {
-            INIT;
-            PRINTLEAF("Before", ioffset, WSIZE, (uint8_t *) eleaf);
-            JU_INSERTINPLACE(eleaf, INDEXES, ioffset, eIndex);
-            PrintLeaf("After ", ioffset, WSIZE, (uint8_t *) eleaf);
-        }
-
-        (void) puts("\nJU_INSERTINPLACE3():");
-
-        for (ioffset = 0; ioffset <= INDEXES; ++ioffset)
-        {
-            INIT;
-            PRINTLEAF("Before", ioffset, 3, oleaf3);
-            JU_INSERTINPLACE3(oleaf3, INDEXES, ioffset, oIndex);
-            PrintLeaf("After ", ioffset, 3, oleaf3);
-        }
-
-#ifdef JU_64BIT
-        (void) puts("\nJU_INSERTINPLACE5():");
-
-        for (ioffset = 0; ioffset <= INDEXES; ++ioffset)
-        {
-            INIT;
-            PRINTLEAF("Before", ioffset, 5, oleaf5);
-            JU_INSERTINPLACE5(oleaf5, INDEXES, ioffset, oIndex);
-            PrintLeaf("After ", ioffset, 5, oleaf5);
-        }
-
-        (void) puts("\nJU_INSERTINPLACE6():");
-
-        for (ioffset = 0; ioffset <= INDEXES; ++ioffset)
-        {
-            INIT;
-            PRINTLEAF("Before", ioffset, 6, oleaf6);
-            JU_INSERTINPLACE6(oleaf6, INDEXES, ioffset, oIndex);
-            PrintLeaf("After ", ioffset, 6, oleaf6);
-        }
-
-        (void) puts("\nJU_INSERTINPLACE7():");
-
-        for (ioffset = 0; ioffset <= INDEXES; ++ioffset)
-        {
-            INIT;
-            PRINTLEAF("Before", ioffset, 7, oleaf7);
-            JU_INSERTINPLACE7(oleaf7, INDEXES, ioffset, oIndex);
-            PrintLeaf("After ", ioffset, 7, oleaf7);
-        }
-#endif // JU_64BIT
-
-        (void) puts("\nJU_DELETEINPLACE():");
-
-        for (ioffset = 0; ioffset < INDEXES; ++ioffset)
-        {
-            INIT;
-            PRINTLEAF("Before", ioffset, WSIZE, (uint8_t *) eleaf);
-            JU_DELETEINPLACE(eleaf, INDEXES, ioffset);
-            PrintLeaf("After ", ioffset, WSIZE, (uint8_t *) eleaf);
-        }
-
-        (void) puts("\nJU_DELETEINPLACE_ODD(3):");
-
-        for (ioffset = 0; ioffset < INDEXES; ++ioffset)
-        {
-            INIT;
-            PRINTLEAF("Before", ioffset, 3, oleaf3);
-            JU_DELETEINPLACE_ODD(oleaf3, INDEXES, ioffset, 3);
-            PrintLeaf("After ", ioffset, 3, oleaf3);
-        }
-
-#ifdef JU_64BIT
-        (void) puts("\nJU_DELETEINPLACE_ODD(5):");
-
-        for (ioffset = 0; ioffset < INDEXES; ++ioffset)
-        {
-            INIT;
-            PRINTLEAF("Before", ioffset, 5, oleaf5);
-            JU_DELETEINPLACE_ODD(oleaf5, INDEXES, ioffset, 5);
-            PrintLeaf("After ", ioffset, 5, oleaf5);
-        }
-
-        (void) puts("\nJU_DELETEINPLACE_ODD(6):");
-
-        for (ioffset = 0; ioffset < INDEXES; ++ioffset)
-        {
-            INIT;
-            PRINTLEAF("Before", ioffset, 6, oleaf6);
-            JU_DELETEINPLACE_ODD(oleaf6, INDEXES, ioffset, 6);
-            PrintLeaf("After ", ioffset, 6, oleaf6);
-        }
-
-        (void) puts("\nJU_DELETEINPLACE_ODD(7):");
-
-        for (ioffset = 0; ioffset < INDEXES; ++ioffset)
-        {
-            INIT;
-            PRINTLEAF("Before", ioffset, 7, oleaf7);
-            JU_DELETEINPLACE_ODD(oleaf7, INDEXES, ioffset, 7);
-            PrintLeaf("After ", ioffset, 7, oleaf7);
-        }
-#endif // JU_64BIT
-
-        (void) puts("\nJU_INSERTCOPY():");
-
-        for (ioffset = 0; ioffset <= INDEXES; ++ioffset)
-        {
-            INIT2;
-            PRINTLEAF("Before, src ", ioffset, WSIZE, (uint8_t *) eleaf);
-            PRINTLEAF("Before, dest", ioffset, WSIZE, (uint8_t *) eleaf_2);
-            JU_INSERTCOPY(eleaf_2, eleaf, INDEXES, ioffset, eIndex);
-            PRINTLEAF("After,  src ", ioffset, WSIZE, (uint8_t *) eleaf);
-            PrintLeaf("After,  dest", ioffset, WSIZE, (uint8_t *) eleaf_2);
-        }
-
-        (void) puts("\nJU_INSERTCOPY3():");
-
-        for (ioffset = 0; ioffset <= INDEXES; ++ioffset)
-        {
-            INIT2;
-            PRINTLEAF("Before, src ", ioffset, 3, oleaf3);
-            PRINTLEAF("Before, dest", ioffset, 3, oleaf3_2);
-            JU_INSERTCOPY3(oleaf3_2, oleaf3, INDEXES, ioffset, oIndex);
-            PRINTLEAF("After,  src ", ioffset, 3, oleaf3);
-            PrintLeaf("After,  dest", ioffset, 3, oleaf3_2);
-        }
-
-#ifdef JU_64BIT
-        (void) puts("\nJU_INSERTCOPY5():");
-
-        for (ioffset = 0; ioffset <= INDEXES; ++ioffset)
-        {
-            INIT2;
-            PRINTLEAF("Before, src ", ioffset, 5, oleaf5);
-            PRINTLEAF("Before, dest", ioffset, 5, oleaf5_2);
-            JU_INSERTCOPY5(oleaf5_2, oleaf5, INDEXES, ioffset, oIndex);
-            PRINTLEAF("After,  src ", ioffset, 5, oleaf5);
-            PrintLeaf("After,  dest", ioffset, 5, oleaf5_2);
-        }
-
-        (void) puts("\nJU_INSERTCOPY6():");
-
-        for (ioffset = 0; ioffset <= INDEXES; ++ioffset)
-        {
-            INIT2;
-            PRINTLEAF("Before, src ", ioffset, 6, oleaf6);
-            PRINTLEAF("Before, dest", ioffset, 6, oleaf6_2);
-            JU_INSERTCOPY6(oleaf6_2, oleaf6, INDEXES, ioffset, oIndex);
-            PRINTLEAF("After,  src ", ioffset, 6, oleaf6);
-            PrintLeaf("After,  dest", ioffset, 6, oleaf6_2);
-        }
-
-        (void) puts("\nJU_INSERTCOPY7():");
-
-        for (ioffset = 0; ioffset <= INDEXES; ++ioffset)
-        {
-            INIT2;
-            PRINTLEAF("Before, src ", ioffset, 7, oleaf7);
-            PRINTLEAF("Before, dest", ioffset, 7, oleaf7_2);
-            JU_INSERTCOPY7(oleaf7_2, oleaf7, INDEXES, ioffset, oIndex);
-            PRINTLEAF("After,  src ", ioffset, 7, oleaf7);
-            PrintLeaf("After,  dest", ioffset, 7, oleaf7_2);
-        }
-#endif // JU_64BIT
-
-        (void) puts("\nJU_DELETECOPY():");
-
-        for (ioffset = 0; ioffset < INDEXES; ++ioffset)
-        {
-            INIT2;
-            PRINTLEAF("Before, src ", ioffset, WSIZE, (uint8_t *) eleaf);
-            PRINTLEAF("Before, dest", ioffset, WSIZE, (uint8_t *) eleaf_2);
-            JU_DELETECOPY(eleaf_2, eleaf, INDEXES, ioffset, ignore);
-            PRINTLEAF("After,  src ", ioffset, WSIZE, (uint8_t *) eleaf);
-            PrintLeaf("After,  dest", ioffset, WSIZE, (uint8_t *) eleaf_2);
-        }
-
-        (void) puts("\nJU_DELETECOPY_ODD(3):");
-
-        for (ioffset = 0; ioffset < INDEXES; ++ioffset)
-        {
-            INIT2;
-            PRINTLEAF("Before, src ", ioffset, 3, oleaf3);
-            PRINTLEAF("Before, dest", ioffset, 3, oleaf3_2);
-            JU_DELETECOPY_ODD(oleaf3_2, oleaf3, INDEXES, ioffset, 3);
-            PRINTLEAF("After,  src ", ioffset, 3, oleaf3);
-            PrintLeaf("After,  dest", ioffset, 3, oleaf3_2);
-        }
-
-#ifdef JU_64BIT
-        (void) puts("\nJU_DELETECOPY_ODD(5):");
-
-        for (ioffset = 0; ioffset < INDEXES; ++ioffset)
-        {
-            INIT2;
-            PRINTLEAF("Before, src ", ioffset, 5, oleaf5);
-            PRINTLEAF("Before, dest", ioffset, 5, oleaf5_2);
-            JU_DELETECOPY_ODD(oleaf5_2, oleaf5, INDEXES, ioffset, 5);
-            PRINTLEAF("After,  src ", ioffset, 5, oleaf5);
-            PrintLeaf("After,  dest", ioffset, 5, oleaf5_2);
-        }
-
-        (void) puts("\nJU_DELETECOPY_ODD(6):");
-
-        for (ioffset = 0; ioffset < INDEXES; ++ioffset)
-        {
-            INIT2;
-            PRINTLEAF("Before, src ", ioffset, 6, oleaf6);
-            PRINTLEAF("Before, dest", ioffset, 6, oleaf6_2);
-            JU_DELETECOPY_ODD(oleaf6_2, oleaf6, INDEXES, ioffset, 6);
-            PRINTLEAF("After,  src ", ioffset, 6, oleaf6);
-            PrintLeaf("After,  dest", ioffset, 6, oleaf6_2);
-        }
-
-        (void) puts("\nJU_DELETECOPY_ODD(7):");
-
-        for (ioffset = 0; ioffset < INDEXES; ++ioffset)
-        {
-            INIT2;
-            PRINTLEAF("Before, src ", ioffset, 7, oleaf7);
-            PRINTLEAF("Before, dest", ioffset, 7, oleaf7_2);
-            JU_DELETECOPY_ODD(oleaf7_2, oleaf7, INDEXES, ioffset, 7);
-            PRINTLEAF("After,  src ", ioffset, 7, oleaf7);
-            PrintLeaf("After,  dest", ioffset, 7, oleaf7_2);
-        }
-#endif // JU_64BIT
-
-        return(0);
-
-} // main()
-
-#endif // TEST_INSDEL
diff --git a/libs/klib/judy/JudySL.c b/libs/klib/judy/JudySL.c
deleted file mode 100644
index 637782d..0000000
--- a/libs/klib/judy/JudySL.c
+++ /dev/null
@@ -1,1125 +0,0 @@
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-// JUDY FUNCTIONS FOR STRING INDEXES, where associated values are longs.  One
-// JudySL*() corresponds to each JudyL*() function (with exceptions).
-//
-// See the manual entry for details.
-//
-// METHOD:  Break up each null-terminated Index (string) into chunks of W
-// bytes, where W is the machines word size, with null-padding in the last
-// word if necessary.  Store strings as a tree of JudyL arrays, that is, array
-// of array of array...  where each level consumes W bytes (one word) as an
-// index to the JudyL array at that level.  Since strings can begin on
-// arbitrary byte boundaries, copy each chunk of W bytes from Index into a
-// word-aligned object before using it as a Judy index.
-//
-// The JudySL tree also supports "single-index shortcut leaves".  A simple
-// JudySL array (tree of JudyL arrays) would go as many levels deep as the
-// Index (string) is long, which wastes time and memory when an Index is unique
-// beyond a certain point.  When theres just one Index under a pointer, given
-// a reliable way to tell that the pointer is not a root pointer to another
-// JudyL array, it should save a lot of time to instead point to a "leaf"
-// object, similar to leaves in JudyL arrays.
-//
-// TBD:  Multi-index leaves, like those in JudyL, are also worth considering,
-// but their payback for JudySL is less certain.  Likewise, shortcut branches
-// are worth considering too.
-//
-// This code uses the Judy.h definitions and Doug Baskins convention of a "P"
-// prefix for pointers, except no "P" for the first level of char * (strings).
-
-// IMPORTS:
-
-#include <string.h>                     // for strcmp(), strlen(), strcpy()
-#include <Judy.h>
-
-#ifndef NDEDUG
-#define NDEBUG 1
-#endif
-#include <assert.h>
-
-//=======================================================================
-// Compile:
-//
-//    cc -O JudyHS.c -c
-//
-//    Notes:
-//    1) use -DJU_64BIT for 64 bit compiles (HP, Sun, IPF, Motorola/IBM? etc..)
-//    2) In gcc version 3.3.1 for a Centrino, -O2 is faster than -O
-//    3) In gcc version 3.3.2 for a Centrino, -O3 is faster than -O2
-//=======================================================================
-
-#define JU_SET_ERRNO(PJERROR, JERRNO)           \
-{                                               \
-    if (PJERROR != (PJError_t)NULL)             \
-    {                                           \
-        JU_ERRNO(PJERROR) = (JERRNO);           \
-        JU_ERRID(PJERROR) = __LINE__;           \
-    }                                           \
-}
-
-#define JU_SET_ERRNO_NONNULL(PJERROR, JERRNO)   \
-{                                               \
-    JU_ERRNO(PJERROR) = (JERRNO);               \
-    JU_ERRID(PJERROR) = __LINE__;               \
-}
-
-// SUPPORT FOR HANDLING WORDS:
-
-#define WORDSIZE     (sizeof (Word_t))  // bytes in word = JudyL index.
-#define WORDS(BYTES) (((BYTES) + WORDSIZE - 1) / WORDSIZE)      // round up.
-
-// To mark a pointer is to a "short cut leaf", set least bit
-
-#define IS_PSCL(PSCL)     (((Word_t) (PSCL)) & JLAP_INVALID)
-#define CLEAR_PSCL(PSCL)  ((Pscl_t)(((Word_t) (PSCL)) & (~JLAP_INVALID)))
-#define SET_PSCL(PSCL)    (((Word_t) (PSCL)) | JLAP_INVALID)
-
-// MISCELLANEOUS GLOBALS:
-
-// Get the Index (string) length in bytes, including the trailing \0, which
-// is an integral part of the string:
-
-// A string is "in the last word" if a previously-set byte count is at or below
-// the system word size, or in some cases if the last byte in the (null-padded)
-// word is null (assume big-endian, including in a register on a little-endian
-// machine):
-
-#define LASTWORD_BY_VALUE(WORD) (! ((WORD) & 0xffL))
-
-#ifdef JU_64BIT
-
-// copy from 1..7 bytes from string to Word_t and test if \0 bytes
-//
-#define        COPYSTRINGtoWORD(WORD,STR)               \
-{                                                       \
-    do                                                  \
-    {                                                   \
-        uint8_t chr;                                    \
-        WORD =      (Word_t)(STR)[0] << 56;             \
-        if (!(WORD)) break;                             \
-        if (!(chr  = (STR)[1])) break;                  \
-        WORD += ((Word_t)(chr) << 48);                  \
-        if (!(chr  = (STR)[2])) break;                  \
-        WORD += ((Word_t)(chr) << 40);                  \
-        if (!(chr  = (STR)[3])) break;                  \
-        WORD += ((Word_t)(chr) << 32);                  \
-        if (!(chr  = (STR)[4])) break;                  \
-        WORD += ((Word_t)(chr) << 24);                  \
-        if (!(chr  = (STR)[5])) break;                  \
-        WORD += ((Word_t)(chr) << 16);                  \
-        if (!(chr  = (STR)[6])) break;                  \
-        WORD += ((Word_t)(chr) << 8) + (STR)[7];        \
-    } while(0);                                         \
-}
-
-// copy Word_t from 1..8 bytes to string and test of \0 bytes
-//
-#define         COPYWORDtoSTRING(STR,WORD)                      \
-{                                                               \
-    do                                                          \
-    {                                                           \
-        if (!((STR)[0] = (uint8_t)((WORD) >> 56))) break;       \
-        if (!((STR)[1] = (uint8_t)((WORD) >> 48))) break;       \
-        if (!((STR)[2] = (uint8_t)((WORD) >> 40))) break;       \
-        if (!((STR)[3] = (uint8_t)((WORD) >> 32))) break;       \
-        if (!((STR)[4] = (uint8_t)((WORD) >> 24))) break;       \
-        if (!((STR)[5] = (uint8_t)((WORD) >> 16))) break;       \
-        if (!((STR)[6] = (uint8_t)((WORD) >>  8))) break;       \
-        (STR)[7]       = (uint8_t)(WORD);                       \
-    } while(0);                                                 \
-}
-
-#else  // JU_32BIT
-
-// copy from 1..4 bytes from string to Word_t and test if \0 bytes
-
-#define        COPYSTRINGtoWORD(WORD,STR)               \
-{                                                       \
-    do                                                  \
-    {                                                   \
-        uint8_t chr;                                    \
-        WORD =       (STR)[0] << 24;                    \
-        if (WORD == 0) break;                           \
-        if (!(chr  = (STR)[1])) break;                  \
-        WORD += (Word_t)(chr << 16);                    \
-        if (!(chr  = (STR)[2])) break;                  \
-        WORD += (Word_t)(chr << 8) + (STR)[3];          \
-    } while(0);                                         \
-}
-
-// copy Word_t from 1..4 bytes to string and test of \0 bytes
-
-#define        COPYWORDtoSTRING(STR,WORD)                       \
-{                                                               \
-    do                                                          \
-    {                                                           \
-        if (!((STR)[0] = (uint8_t)((WORD) >> 24))) break;       \
-        if (!((STR)[1] = (uint8_t)((WORD) >> 16))) break;       \
-        if (!((STR)[2] = (uint8_t)((WORD) >>  8))) break;       \
-        (STR)[3]       = (uint8_t)(WORD);                       \
-    } while(0);                                                 \
-}
-#endif // JU_32BIT
-
-
-// SUPPORT FOR SINGLE-INDEX SHORTCUT LEAVES:
-
-typedef struct SHORCUTLEAF
-{
-    Pvoid_t   scl_Pvalue;               // callers value area.
-    uint8_t   scl_Index[WORDSIZE];      // base Index string.
-} scl_t  , *Pscl_t;
-
-// overhead of the scl_Pvalue only, the scl_Index is calculate elsewhere
-
-#define STRUCTOVD       (sizeof(scl_t) - WORDSIZE)
-
-// How big to malloc a shortcut leaf; stringlen should already include the
-// trailing null char:
-
-#define SCLSIZE(LEN)  (((LEN) + STRUCTOVD + WORDSIZE - 1) / WORDSIZE)
-
-// string routines, may replace with your own
-//
-#define STRCMP(S1,S2)   strcmp((void *)(S1), (void *)(S2))
-#define STRCPY(S1,S2)   strcpy((void *)(S1), (void *)(S2))
-#define STRLEN(S1)      (strlen((void *)(S1)) + 1)
-
-
-// Index and value area for a shortcut leaf, depending on how it matches the
-// undecoded remainder of the Index, given a Pscl_t that includes type bits
-// that must be cleared:
-//
-// PSCLINDEX() and PSCLVALUE() are also useful when Pscl contains uncleared
-// TYPE bits.
-//
-// Note:  SCLCMP() cannot take advantage of knowing the Index length because
-// the scl_Index length is not pre-known when these macros are used.
-
-#define PSCLINDEX(PSCL)  ((CLEAR_PSCL(PSCL))->scl_Index)
-#define PSCLVALUE(PSCL)  ((CLEAR_PSCL(PSCL))->scl_Pvalue)
-
-#define SCLCMP(INDEX,PSCL) STRCMP(INDEX, PSCLINDEX(PSCL))
-
-#define PPSCLVALUE_EQ(INDEX,PSCL)                                       \
-    ((SCLCMP(INDEX, PSCL) == 0) ? &PSCLVALUE(PSCL) : (PPvoid_t)NULL)
-
-#define PPSCLVALUE_LT(INDEX,PSCL)                                       \
-    ((SCLCMP(INDEX, PSCL) < 0) ? &PSCLVALUE(PSCL) : (PPvoid_t)NULL)
-
-#define PPSCLVALUE_GT(INDEX,PSCL)                                       \
-    ((SCLCMP(INDEX, PSCL) > 0) ? &PSCLVALUE(PSCL) : (PPvoid_t)NULL)
-
-// Common in-lined code to append or free a shortcut leaf:
-//
-// See header comments about premature return().  Note that malloc() does not
-// pre-zero the memory, so ensure scl_Pvalue is zeroed, just like a value area
-// in a JudyL array.  Hope strcpy() is fast enough in this context.
-
-#define APPEND_SCL(PSCL,PPARRAY,INDEX,LEN,PJERROR)                      \
-{                                                                       \
-    if (((PSCL) = (Pscl_t) JudyMalloc(SCLSIZE(LEN))) == (Pscl_t)NULL)   \
-    {                                                                   \
-        JU_SET_ERRNO(PJERROR, JU_ERRNO_NOMEM);                          \
-        return (PPJERR);                                                \
-    }                                                                   \
-    *(PPARRAY) = (Pvoid_t)SET_PSCL(PSCL);                               \
-    ((PSCL)->scl_Pvalue) = (Pvoid_t)NULL;                               \
-    (void)STRCPY((PSCL)->scl_Index, INDEX);                             \
-}
-
-// "FORWARD" DECLARATIONS:
-
-static void JudySLModifyErrno(PJError_t PJError,
-                              Pcvoid_t PArray, Pcvoid_t PArrayOrig);
-static int JudySLDelSub(PPvoid_t PPArray, PPvoid_t PPArrayOrig,
-                        const uint8_t * Index, Word_t len, PJError_t PJError);
-static PPvoid_t JudySLPrevSub(Pcvoid_t PArray, uint8_t * Index, int orig,
-                              Word_t len, PJError_t PJError);
-static PPvoid_t JudySLNextSub(Pcvoid_t PArray, uint8_t * Index, int orig,
-                              Word_t len, PJError_t PJError);
-
-// ****************************************************************************
-// J U D Y   S L   M O D I F Y   E R R N O
-//
-// Common code for error translation:  When a caller passes an invalid JAP
-// ("not a JudyL pointer"), OR if the JudySL array is corrupted at a lower
-// level, various JudyL*() calls return JU_ERRNO_NOTJUDYL.  If the caller wants
-// detailed error info, convert this particular error to JU_ERRNO_NOTJUDYSL if
-// at the top of the tree, otherwise convert it to JU_ERRNO_CORRUPT, meaning
-// there was a corruption (the only one even detectable outside JudyL) in the
-// JudySL tree; but pass through any other errors unaltered.
-
-static void
-JudySLModifyErrno(PJError_t PJError,    // to modify if non-null.
-                  Pcvoid_t PArray,      // current JudyL array.
-                  Pcvoid_t PArrayOrig   // top-of-tree JudyL array.
-    )
-{                                       //  map this Judy errno.
-    if ((PJError != PJE0) && (JU_ERRNO(PJError) == JU_ERRNO_NOTJUDYL))
-    {
-        if (PArray == PArrayOrig)       // callers fault.
-        {
-            JU_SET_ERRNO_NONNULL(PJError, JU_ERRNO_NOTJUDYSL);
-        }
-        else                            // lower level.
-        {
-            JU_SET_ERRNO_NONNULL(PJError, JU_ERRNO_CORRUPT);
-        }
-    }
-}                                       // JudySLModifyErrno()
-
-// ****************************************************************************
-// J U D Y   S L   G E T
-//
-// See comments in file header and below.
-
-PPvoid_t
-JudySLGet(Pcvoid_t PArray, const uint8_t * Index, PJError_t PJError)
-{
-    const uint8_t *pos = Index;         // place in Index.
-    Word_t    indexword;                // buffer for aligned copy.
-    PPvoid_t  PPValue;                  // from JudyL array.
-
-// CHECK FOR CALLER ERROR (NULL POINTER):
-
-    if (Index == (uint8_t *) NULL)
-    {
-        JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);
-        return (PPJERR);
-    }
-
-// SEARCH NEXT LEVEL JUDYL ARRAY IN TREE:
-//
-// Use or copy each word from the Index string and check for it in the next
-// level JudyL array in the array tree, but first watch for shortcut leaves.
-// Upon invalid Index or end of Index (string) in current word, return.
-
-    do                                  // until return.
-    {
-        if (IS_PSCL(PArray))            // a shortcut leaf.
-            return (PPSCLVALUE_EQ(pos, PArray));
-
-        COPYSTRINGtoWORD(indexword, pos);       // copy next 4[8] bytes.
-
-        JLG(PPValue, PArray, indexword);
-
-        if ((PPValue == (PPvoid_t) NULL) || LASTWORD_BY_VALUE(indexword))
-            return (PPValue);
-
-// CONTINUE TO NEXT LEVEL DOWN JUDYL ARRAY TREE:
-//
-// If a previous JudySLIns() ran out of memory partway down the tree, it left a
-// null *PPValue; this is automatically treated here as a dead-end (not a core
-// dump or assertion; see version 1.25).
-
-        pos += WORDSIZE;
-        PArray = *PPValue;              // each value -> next array.
-    } while(1);                         // forever
-//  NOTREACHED JudySLGet()
-}
-
-// ****************************************************************************
-// J U D Y   S L   I N S
-//
-// See also the comments in JudySLGet(), which is somewhat similar, though
-// simpler.
-//
-// Theory of operation:
-//
-// Upon encountering a null pointer in the tree of JudyL arrays, insert a
-// shortcut leaf -- including directly under a null root pointer for the first
-// Index in the JudySL array.
-//
-// Upon encountering a pre-existing shortcut leaf, if the old Index is equal to
-// the new one, return the old value area.  Otherwise, "carry down" the old
-// Index until the old and new Indexes diverge, at which point each Index
-// either terminates in the last JudyL array or a new shortcut leaf is inserted
-// under it for the Indexs remainder.
-//
-// TBD:  Running out of memory below the starting point causes a premature
-// return below (in several places) and leaves a dead-end in the JudySL tree.
-// Ideally the code here would back this out rather than wasting a little
-// memory, but in lieu of that, the get, delete, and search functions
-// understand dead-ends and handle them appropriately.
-
-PPvoid_t
-JudySLIns(PPvoid_t PPArray, const uint8_t * Index, PJError_t PJError)
-{
-    PPvoid_t  PPArrayOrig = PPArray;    // for error reporting.
-    const uint8_t *pos = Index;         // place in Index.
-    const uint8_t *pos2 = (uint8_t *) NULL;     // old Index (SCL being moved).
-    Word_t    len;                      // bytes remaining.
-
-// Note:  len2 is set when needed and only used when valid, but this is not
-// clear to gcc -Wall, so initialize it here to avoid a warning:
-
-    Word_t    len2 = 0;                 // for old Index (SCL being moved).
-    Word_t    scl2 = 0;                 // size in words of SCL
-    Word_t    indexword;                // buffer for aligned copy.
-    Word_t    indexword2;               // for old Index (SCL being moved).
-    PPvoid_t  PPValue;                  // from JudyL array.
-    PPvoid_t  PPValue2;                 // for old Index (SCL being moved).
-    Pscl_t    Pscl = (Pscl_t) NULL;     // shortcut leaf.
-    Pscl_t    Pscl2;                    // for old Index (SCL being moved).
-
-// CHECK FOR CALLER ERROR (NULL POINTERS):
-
-    if (PPArray == (PPvoid_t) NULL)
-    {
-        JU_SET_ERRNO(PJError, JU_ERRNO_NULLPPARRAY);
-        return (PPJERR);
-    }
-    if (Index == (uint8_t *) NULL)
-    {
-        JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);
-        return (PPJERR);
-    }
-
-    len = STRLEN(Index);        // bytes remaining.
-
-// APPEND SHORTCUT LEAF:
-//
-// If PPArray, which is the root pointer to the first or next JudyL array in
-// the tree, points to null (no next JudyL array), AND there is no shortcut
-// leaf being carried down, append a shortcut leaf here for the new Index, no
-// matter how much of the Index string remains (one or more bytes, including
-// the trailing \0).
-
-    while (1)                           // until return.
-    {
-        if (*PPArray == (Pvoid_t)NULL)  // no next JudyL array.
-        {
-            if (Pscl == (Pscl_t) NULL)  // no SCL being carried down.
-            {
-                APPEND_SCL(Pscl, PPArray, pos, len, PJError);   // returns if error.
-                return (&(Pscl->scl_Pvalue));
-            }
-            // else do nothing here; see below.
-        }
-
-// CARRY DOWN PRE-EXISTING SHORTCUT LEAF:
-//
-// When PPArray points to a pre-existing shortcut leaf, if its Index is equal
-// to the Index to be inserted, meaning no insertion is required, return its
-// value area; otherwise, "move it aside" and "carry it down" -- replace it
-// (see below) with one or more levels of JudyL arrays.  Moving it aside
-// initially just means setting Pscl non-null, both as a flag and for later
-// use, and clearing the pointer to the SCL in the JudyL array.
-
-        else if (IS_PSCL(*PPArray))
-        {
-            assert(Pscl == (Pscl_t) NULL);      // no nested SCLs.
-
-            Pscl = CLEAR_PSCL(*PPArray);
-
-            pos2 = Pscl->scl_Index;     // note: pos2 is always word-aligned.
-            len2 = STRLEN(pos2);        // bytes remaining.
-
-//          first check if string is already inserted
-
-            if ((len == len2) && (STRCMP(pos, pos2) == 0))
-                return (&(Pscl->scl_Pvalue));
-
-            *PPArray = (Pvoid_t)NULL;   // disconnect SCL.
-
-            scl2 = SCLSIZE(len2);       // save for JudyFree
-
-            // continue with *PPArray now clear, and Pscl, pos2, len2 set.
-        }
-
-// CHECK IF OLD AND NEW INDEXES DIVERGE IN THE CURRENT INDEX WORD:
-//
-// If a shortcut leaf is being carried down and its remaining Index chars now
-// diverge from the remaining chars of the Index being inserted, that is, if
-// the next words of each Index differ, "plug in" the old Index here, in a new
-// JudyL array, before proceeding.
-//
-// Note:  Call JudyLIns() for the SCL Index word before calling it for the new
-// Index word, so PPValue remains correct for the latter.  (JudyLIns() return
-// values are not stable across multiple calls.)
-//
-// Note:  Although pos2 is word-aligned, and a Pscl_t is a whole number of
-// words in size, pos2 is not certain to be null-padded through a whole word,
-// so copy it first to an index word for later use.
-//
-// See header comments about premature return().
-
-        COPYSTRINGtoWORD(indexword, pos);       // copy next 4[8] bytes.
-
-        if (Pscl != (Pscl_t) NULL)
-        {
-            COPYSTRINGtoWORD(indexword2, pos2); // copy next 4[8] bytes.
-
-            if (indexword != indexword2)        // SCL and new Indexes diverge.
-            {
-                assert(*PPArray == (Pvoid_t)NULL);      // should be new JudyL array.
-
-// Note:  If JudyLIns() returns JU_ERRNO_NOTJUDYL here, *PPArray should not be
-// modified, so JudySLModifyErrno() can do the right thing.
-
-                if ((PPValue2 = JudyLIns(PPArray, indexword2, PJError))
-                    == PPJERR)
-                {
-                    JudySLModifyErrno(PJError, *PPArray, *PPArrayOrig);
-                    return (PPJERR);
-                }
-
-                assert(PPValue2 != (PPvoid_t) NULL);
-
-// If the old (SCL) Index terminates here, copy its value directly into the
-// JudyL value area; otherwise create a new shortcut leaf for it, under
-// *PPValue2 (skipping the word just inserted), and copy its value to the new
-// SCL:
-
-                if (len2 <= WORDSIZE)
-                {
-                    *((PWord_t)PPValue2) = (Word_t)(Pscl->scl_Pvalue);
-                }
-                else
-                {
-                    APPEND_SCL(Pscl2, PPValue2, pos2 + WORDSIZE,
-                               len2 - WORDSIZE, PJError);
-                    (Pscl2->scl_Pvalue) = Pscl->scl_Pvalue;
-                }
-//              old SCL no longer needed.
-
-                JudyFree((void *)Pscl, scl2);
-
-                Pscl = (Pscl_t) NULL;
-            }
-        }
-
-// APPEND NEXT LEVEL JUDYL ARRAY TO TREE:
-//
-// If a shortcut leaf was carried down and diverged at this level, the code
-// above already appended the new JudyL array, but the next word of the new
-// Index still must be inserted in it.
-//
-// See header comments about premature return().
-//
-// Note:  If JudyLIns() returns JU_ERRNO_NOTJUDYL here, *PPArray should not be
-// modified, so JudySLModifyErrno() can do the right thing.
-
-        if ((PPValue = JudyLIns(PPArray, indexword, PJError)) == PPJERR)
-        {
-            JudySLModifyErrno(PJError, *PPArray, *PPArrayOrig);
-            return (PPJERR);
-        }
-
-        assert(PPValue != (PPvoid_t) NULL);
-
-// CHECK IF NEW INDEX TERMINATES:
-//
-// Note that if it does, and an old SCL was being carried down, it must have
-// diverged by this point, and is already handled.
-
-        if (len <= WORDSIZE)
-        {
-            assert(Pscl == (Pscl_t) NULL);
-            return (PPValue);           // is value for whole Index string.
-        }
-
-        pos += WORDSIZE;
-        len -= WORDSIZE;
-        pos2 += WORDSIZE;               // useless unless Pscl is set.
-        len2 -= WORDSIZE;
-
-        PPArray = PPValue;              // each value -> next array.
-    }                                   // while.
-}                                       // NOTREACHED, JudySLIns()
-
-// ****************************************************************************
-// J U D Y   S L   D E L
-//
-// See the comments in JudySLGet(), which is somewhat similar.
-//
-// Unlike JudySLGet() and JudySLIns(), recurse downward through the tree of
-// JudyL arrays to find and delete the given Index, if present, and then on the
-// way back up, any of its parent arrays which ends up empty.
-//
-// TECHNICAL NOTES:
-//
-// Recursion seems bad, but this allows for an arbitrary-length Index.  Also, a
-// more clever iterative solution that used JudyLCount() (see below) would
-// still require a function call per tree level, so why not just recurse?
-//
-// An earlier version (1.20) used a fixed-size stack, which limited the Index
-// size.  We were going to replace this with using JudyLCount(), in order to
-// note and return to (read this carefully) the highest level JudyL array with
-// a count of 1, all of whose descendant JudyL arrays also have a count of 1,
-// and delete from that point downwards.  This solution would traverse the
-// array tree downward looking to see if the given Index is in the tree, then
-// if so, delete layers downwards starting below the last one that contains
-// other Indexes than the one being deleted.
-//
-// TBD:  To save time coding, and to very likely save time overall during
-// execution, this function does "lazy deletions", or putting it more nicely,
-// it allows "hysteresis" in the JudySL tree, when shortcut leafs are present.
-// It only removes the specified Index, and recursively any empty JudyL arrays
-// above it, without fully reversing the effects of JudySLIns().  This is
-// probably OK because any application that calls JudySLDel() is likely to call
-// JudySLIns() again with the same or a neighbor Index.
-
-int
-JudySLDel(PPvoid_t PPArray, const uint8_t * Index, PJError_t PJError)   // optional, for returning error info.
-{
-
-// Check for caller error (null pointer):
-
-    if (PPArray == (PPvoid_t) NULL)
-    {
-        JU_SET_ERRNO(PJError, JU_ERRNO_NULLPPARRAY);
-        return (JERR);
-    }
-    if (Index == (uint8_t *) NULL)
-    {
-        JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);
-        return (JERR);
-    }
-
-// Do the deletion:
-
-    return (JudySLDelSub(PPArray, PPArray, Index, STRLEN(Index), PJError));
-
-}                                       // JudySLDel()
-
-// ****************************************************************************
-// J U D Y   S L   D E L   S U B
-//
-// This is the "engine" for JudySLDel() that expects aligned and len to already
-// be computed (only once).  See the header comments for JudySLDel().
-
-static int
-JudySLDelSub(PPvoid_t PPArray,          // in which to delete.
-             PPvoid_t PPArrayOrig,      // for error reporting.
-             const uint8_t * Index,     // to delete.
-             Word_t len,                // bytes remaining.
-             PJError_t PJError)         // optional, for returning error info.
-{
-    Word_t    indexword;                // next word to find.
-    PPvoid_t  PPValue;                  // from JudyL array.
-    int       retcode;                  // from lower-level call.
-
-    assert(PPArray != (PPvoid_t) NULL);
-    assert(Index != (uint8_t *) NULL);
-
-// DELETE SHORTCUT LEAF:
-//
-// As described above, this can leave an empty JudyL array, or one containing
-// only a single other Index word -- which could be, but is not, condensed into
-// a higher-level shortcut leaf.  More precisely, at this level it leaves a
-// temporary "dead end" in the JudySL tree, similar to when running out of
-// memory during JudySLIns(), and this is somewhat cleaned up by higher
-// recursions of the same function (see below); but remaining shortcut leaves
-// for other Indexes are not coalesced.
-
-    if (IS_PSCL(*PPArray))
-    {
-        Pscl_t    Pscll = CLEAR_PSCL(*PPArray);
-        Word_t    words;
-
-        if (STRCMP(Index, Pscll->scl_Index))
-            return (0);                 // incorrect index.
-
-        words = SCLSIZE(STRLEN(Pscll->scl_Index));
-        JudyFree((void *)Pscll, words);
-
-        *PPArray = (Pvoid_t)NULL;
-        return (1);                     // correct index deleted.
-    }
-
-// DELETE LAST INDEX WORD, FROM CURRENT JUDYL ARRAY:
-//
-// When at the end of the full Index, delete the last word, if present, from
-// the current JudyL array, and return the result all the way up.
-
-    COPYSTRINGtoWORD(indexword, Index); // copy next 4[8] bytes.
-
-    if (len <= WORDSIZE)
-    {
-        if ((retcode = JudyLDel(PPArray, indexword, PJError)) == JERR)
-        {
-            JudySLModifyErrno(PJError, *PPArray, *PPArrayOrig);
-            return (JERR);
-        }
-        return (retcode);
-    }
-
-// DELETE BELOW NON-LAST INDEX WORD IN CURRENT JUDYL ARRAY:
-//
-// If a word before the end of the full Index is present in the current JudyL
-// array, recurse through its value, which must be a pointer to another JudyL
-// array, to continue the deletion at the next level.  Return the JudyLGet()
-// return if the Indexs current word is not in the JudyL array, or if no
-// delete occurs below this level, both of which mean the whole Index is not
-// currently valid.
-//
-
-    JLG(PPValue, *PPArray, indexword);
-    if (PPValue == (PPvoid_t) NULL)
-        return (0);                     // Index not in JudySL array.
-// If a previous JudySLIns() ran out of memory partway down the tree, it left a
-// null *PPValue; this is automatically treated as a dead-end (not a core dump
-// or assertion; see version 1.25).
-    if ((retcode =
-         JudySLDelSub(PPValue, PPArrayOrig, Index + WORDSIZE,
-                      len - WORDSIZE, PJError)) != 1)
-    {
-        return (retcode);               // no lower-level delete, or error.
-    }
-
-// DELETE EMPTY JUDYL ARRAY:
-//
-// A delete occurred below in the tree.  If the child JudyL array became empty,
-// delete the current Index word from the current JudyL array, which could
-// empty the current array and null out *PPArray in turn (or pass through an
-// error).  Otherwise simply indicate that a deletion did occur.
-
-    if (*PPValue == (Pvoid_t)NULL)
-    {
-        if ((retcode = JudyLDel(PPArray, indexword, PJError)) == JERR)
-        {
-            JudySLModifyErrno(PJError, *PPArray, *PPArrayOrig);
-            return (JERR);
-        }
-
-        return (retcode);
-    }
-
-    return (1);
-}                                       // JudySLDelSub()
-
-// ****************************************************************************
-// J U D Y   S L   P R E V
-//
-// Recursively traverse the JudySL tree downward using JudyLGet() to look for
-// each successive index word from Index in the JudyL array at each level.  At
-// the last level for the Index (LASTWORD_BY_LEN()), use JudyLPrev() instead of
-// JudyLGet(), to exclude the initial Index.  If this doesnt result in finding
-// a previous Index, work back up the tree using JudyLPrev() at each higher
-// level to search for a previous index word.  Upon finding a previous index
-// word, descend again if/as necessary, this time inclusively, to find and
-// return the full previous Index.
-//
-// Also support shortcut leaves.
-//
-// Since this function is recursive and it also needs to know if its still
-// looking for the original Index (to exclude it at the LASTWORD_BY_LEN()
-// level) or for the remaining words of the previous Index (inclusive),
-// actually call a subroutine that takes an additional parameter.
-//
-// See also the technical notes in JudySLDel() regarding the use of recursion
-// rather than iteration.
-
-PPvoid_t
-JudySLPrev(Pcvoid_t PArray, uint8_t * Index, PJError_t PJError) // optional, for returning error info.
-{
-// Check for caller error (null pointer), or empty JudySL array:
-
-    if (Index == (uint8_t *) NULL)
-    {
-        JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);
-        return (PPJERR);
-    }
-
-    if (PArray == (Pvoid_t)NULL)
-        return ((PPvoid_t) NULL);
-// Do the search:
-    return (JudySLPrevSub(PArray, Index, /* original = */ 1,
-                          STRLEN(Index), PJError));
-}                                       // JudySLPrev()
-
-// ****************************************************************************
-// J U D Y   S L   P R E V   S U B
-//
-// This is the "engine" for JudySLPrev() that knows whether its still looking
-// for the original Index (exclusive) or a neighbor index (inclusive), and that
-// expects aligned and len to already be computed (only once).  See the header
-// comments for JudySLPrev().
-
-static    PPvoid_t
-JudySLPrevSub(Pcvoid_t PArray, uint8_t * Index, int orig,
-              Word_t len,               // bytes remaining.
-              PJError_t PJError)        // optional, for returning error info.
-{
-    Word_t    indexword;                // next word to find.
-    PPvoid_t  PPValue;                  // from JudyL array.
-// ORIGINAL SEARCH:
-//
-// When at a shortcut leaf, copy its remaining Index (string) chars into Index
-// and return its value area if the current Index is after (greater than) the
-// SCLs index; otherwise return null.
-    if (orig)
-    {
-        if (IS_PSCL(PArray))
-        {
-            if ((PPValue = PPSCLVALUE_GT(Index, PArray)) != (PPvoid_t) NULL)
-                (void)STRCPY(Index, PSCLINDEX(PArray));
-            return (PPValue);
-        }
-
-// If the current Index word:
-// - is not the last word in Index (end of string),
-// - exists in the current JudyL array, and,
-// - a previous Index is found below it, return that Indexs value area.
-
-        COPYSTRINGtoWORD(indexword, Index);     // copy next 4[8] bytes.
-        if (len > WORDSIZE)             // not at end of Index.
-        {
-            JLG(PPValue, PArray, indexword);
-            if (PPValue != (PPvoid_t) NULL)
-            {
-
-// If a previous JudySLIns() ran out of memory partway down the tree, it left a
-// null *PPValue; this is automatically treated as a dead-end (not a core dump
-// or assertion; see version 1.25):
-
-                PPValue = JudySLPrevSub(*PPValue, Index + WORDSIZE,
-                                        /* original = */ 1,
-                                        len - WORDSIZE, PJError);
-                if (PPValue == PPJERR)
-                    return (PPJERR);    // propagate error.
-                if (PPValue != (PPvoid_t) NULL)
-                    return (PPValue);   // see above.
-            }
-        }
-
-// Search for previous index word:
-//
-// One of the above conditions is false.  Search the current JudyL array for
-// the Index word, if any, prior to the current index word.  If none is found,
-// return null; otherwise fall through to common later code.
-
-        if ((PPValue = JudyLPrev(PArray, &indexword, PJError)) == PPJERR)
-        {
-            JudySLModifyErrno(PJError, PArray, orig ? PArray : (Pvoid_t)NULL);
-            return (PPJERR);
-        }
-
-        if (PPValue == (PPvoid_t) NULL)
-            return ((PPvoid_t) NULL);   // no previous index word.
-    }                                   // if.
-
-// SUBSEQUENT SEARCH:
-//
-// A higher level search already excluded the initial Index, then found a
-// previous index word, and is now traversing down to determine the rest of the
-// Index and to obtain its value area.  If at a shortcut leaf, return its value
-// area.  Otherwise search the current JudyL array backward from the upper
-// limit for its last index word.  If no index word is found, return null --
-// should never happen unless the JudySL tree is corrupt; otherwise fall
-// through to common later code.
-
-    else
-    {
-        if (IS_PSCL(PArray))            // at shortcut leaf.
-        {
-            (void)STRCPY(Index, PSCLINDEX(PArray));
-            return (&PSCLVALUE(PArray));
-        }
-
-        indexword = ~0UL;
-        if ((PPValue = JudyLLast(PArray, &indexword, PJError)) == PPJERR)
-        {
-            JudySLModifyErrno(PJError, PArray, orig ? PArray : (Pvoid_t)NULL);
-            return (PPJERR);
-        }
-
-// If a previous JudySLIns() ran out of memory partway down the tree, it left a
-// null *PPValue; this is automatically treated as a dead-end (not a core dump
-// or assertion; see version 1.25):
-
-        if (PPValue == (PPvoid_t) NULL)
-            return ((PPvoid_t) NULL);   // no previous index word.
-    }
-
-// FOUND PREVIOUS INDEX WORD:
-//
-// A previous (if original) or last (if subsequent) index word was located in
-// the current JudyL array.  Store it into the callers Index (string).  Then
-// if the found (previous) Index ends here, return its value area; otherwise do
-// a subsequent search below this point, which should never fail unless the
-// JudySL tree is corrupt, but this is detected at a lower level by the above
-// assertion.
-//
-// Note:  Treat Index as unaligned, even if it is aligned, to avoid writing
-// past the end of allocated memory (in case its less than a whole number of
-// words).
-
-    COPYWORDtoSTRING(Index, indexword); // copy next 4[8] bytes.
-    if (LASTWORD_BY_VALUE(indexword))
-        return (PPValue);
-// If a previous JudySLIns() ran out of memory partway down the tree, it left a
-// null *PPValue; this is automatically treated as a dead-end (not a core dump
-// or assertion; see version 1.25):
-    return (JudySLPrevSub(*PPValue, Index + WORDSIZE, /* original = */ 0,
-                          len - WORDSIZE, PJError));
-}                                       // JudySLPrevSub()
-
-// ****************************************************************************
-// J U D Y   S L   N E X T
-//
-// See the comments in JudySLPrev(), which is very similar.
-//
-// TBD:  Could the two functions call a common engine function with various
-// subfunctions and other constants specified?
-
-PPvoid_t
-JudySLNext(Pcvoid_t PArray, uint8_t * Index, PJError_t PJError) // optional, for returning error info.
-{
-// Check for caller error (null pointer), or empty JudySL array:
-
-    if (Index == (uint8_t *) NULL)
-    {
-        JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);
-        return (PPJERR);
-    }
-
-    if (PArray == (Pvoid_t)NULL)
-        return ((PPvoid_t) NULL);
-// Do the search:
-    return (JudySLNextSub(PArray, Index, /* original = */ 1,
-                          STRLEN(Index), PJError));
-}                                       // JudySLNext()
-
-// ****************************************************************************
-// J U D Y   S L   N E X T   S U B
-//
-// See the comments in JudySLPrevSub(), which is very similar.
-
-static    PPvoid_t
-JudySLNextSub(Pcvoid_t PArray, uint8_t * Index, int orig,
-              Word_t len,               // bytes remaining.
-              PJError_t PJError)        // optional, for returning error info.
-{
-    Word_t    indexword;                // next word to find.
-    PPvoid_t  PPValue;                  // from JudyL array.
-    if (orig)
-    {
-        if (IS_PSCL(PArray))
-        {
-            if ((PPValue = PPSCLVALUE_LT(Index, PArray)) != (PPvoid_t) NULL)
-                (void)STRCPY(Index, PSCLINDEX(PArray));
-            return (PPValue);
-        }
-
-        COPYSTRINGtoWORD(indexword, Index);     // copy next 4[8] bytes.
-
-        if (len > WORDSIZE)             // not at end of Index.
-        {
-            JLG(PPValue, PArray, indexword);
-            if (PPValue != (PPvoid_t) NULL)
-            {
-// If a previous JudySLIns() ran out of memory partway down the tree, it left a
-// null *PPValue; this is automatically treated as a dead-end (not a core dump
-// or assertion; see version 1.25):
-
-                PPValue = JudySLNextSub(*PPValue, Index + WORDSIZE,
-                                        /* original = */ 1,
-                                        len - WORDSIZE, PJError);
-                if (PPValue == PPJERR)
-                    return (PPJERR);    // propagate error.
-                if (PPValue != (PPvoid_t) NULL)
-                    return (PPValue);   // see above.
-            }
-        }
-
-        if ((PPValue = JudyLNext(PArray, &indexword, PJError)) == PPJERR)
-        {
-            JudySLModifyErrno(PJError, PArray, orig ? PArray : (Pvoid_t)NULL);
-            return (PPJERR);
-        }
-
-        if (PPValue == (PPvoid_t) NULL)
-            return ((PPvoid_t) NULL);   // no next index word.
-    }
-    else
-    {
-        if (IS_PSCL(PArray))            // at shortcut leaf.
-        {
-            (void)STRCPY(Index, PSCLINDEX(PArray));
-            return (&PSCLVALUE(PArray));
-        }
-
-        indexword = 0;
-        if ((PPValue = JudyLFirst(PArray, &indexword, PJError)) == PPJERR)
-        {
-            JudySLModifyErrno(PJError, PArray, orig ? PArray : (Pvoid_t)NULL);
-            return (PPJERR);
-        }
-
-// If a previous JudySLIns() ran out of memory partway down the tree, it left a
-// null *PPValue; this is automatically treated as a dead-end (not a core dump
-// or assertion; see version 1.25):
-
-        if (PPValue == (PPvoid_t) NULL)
-            return ((PPvoid_t) NULL);   // no next index word.
-    }
-
-    COPYWORDtoSTRING(Index, indexword); // copy next 4[8] bytes
-    if (LASTWORD_BY_VALUE(indexword))
-        return (PPValue);
-// If a previous JudySLIns() ran out of memory partway down the tree, it left a
-// null *PPValue; this is automatically treated as a dead-end (not a core dump
-// or assertion; see version 1.25):
-    return (JudySLNextSub(*PPValue, Index + WORDSIZE, /* original = */ 0,
-                          len - WORDSIZE, PJError));
-}                                       // JudySLNextSub()
-
-// ****************************************************************************
-// J U D Y   S L   F I R S T
-//
-// Like JudyLFirst(), do a JudySLGet(), then if necessary a JudySLNext().
-
-PPvoid_t
-JudySLFirst(Pcvoid_t PArray, uint8_t * Index, PJError_t PJError)        // optional, for returning error info.
-{
-    PPvoid_t  PPValue;                  // from JudyL array.
-    if (Index == (uint8_t *) NULL)
-    {
-        JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);
-        return (PPJERR);
-    }
-
-    if ((PPValue = JudySLGet(PArray, Index, PJError)) == PPJERR)
-        return (PPJERR);                // propagate serious error.
-    if ((PPValue == (PPvoid_t) NULL)    // first try failed.
-        && ((PPValue = JudySLNext(PArray, Index, PJError)) == PPJERR))
-    {
-        return (PPJERR);                // propagate serious error.
-    }
-
-    return (PPValue);
-}                                       // JudySLFirst()
-
-// ****************************************************************************
-// J U D Y   S L   L A S T
-//
-// Like JudyLLast(), do a JudySLGet(), then if necessary a JudySLPrev().
-
-PPvoid_t
-JudySLLast(Pcvoid_t PArray, uint8_t * Index, PJError_t PJError) // optional, for returning error info.
-{
-    PPvoid_t  PPValue;                  // from JudyL array.
-    if (Index == (uint8_t *) NULL)
-    {
-        JU_SET_ERRNO(PJError, JU_ERRNO_NULLPINDEX);
-        return (PPJERR);
-    }
-
-    if ((PPValue = JudySLGet(PArray, Index, PJError)) == PPJERR)
-        return (PPJERR);                // propagate serious error.
-    if ((PPValue == (PPvoid_t) NULL)    // first try failed.
-        && ((PPValue = JudySLPrev(PArray, Index, PJError)) == PPJERR))
-    {
-        return (PPJERR);                // propagate serious error.
-    }
-
-    return (PPValue);
-}                                       // JudySLLast()
-
-// ****************************************************************************
-// J U D Y   S L   F R E E   A R R A Y
-//
-// Walk the JudySL tree of JudyL arrays to free each JudyL array, depth-first.
-// During the walk, ignore indexes (strings) that end in the current JudyL
-// array to be freed.  Just recurse through those indexes which do not end,
-// that is, those whose associated value areas point to subsidiary JudyL
-// arrays, except for those which point to shortcut leaves.  Return the total
-// bytes freed in all of the JudyL arrays at or below the current level.
-//
-// Like the JudyLFreeArray() and Judy1FreeArray() code, this is written
-// recursively, which is probably fast enough, to allow indexes (strings) of
-// arbitrary size.  If recursion turns out to be a problem, consider instead
-// doing some large, fixed number of iterative descents (like 100) using a
-// fixed-size "stack" (array), then recursing upon overflow (relatively
-// rarely).
-
-Word_t
-JudySLFreeArray(PPvoid_t PPArray, PJError_t PJError)    // optional, for returning error info.
-{
-    PPvoid_t  PPArrayOrig = PPArray;    // for error reporting.
-    Word_t    indexword = 0;            // word just found.
-    PPvoid_t  PPValue;                  // from Judy array.
-    Word_t    bytes_freed = 0;          // bytes freed at this level.
-    Word_t    bytes_total = 0;          // bytes freed at all levels.
-    if (PPArray == (PPvoid_t) NULL)
-    {
-        JU_SET_ERRNO(PJError, JU_ERRNO_NULLPPARRAY);
-        return (JERR);
-    }
-
-// FREE SHORTCUT LEAF:
-
-    if (IS_PSCL(*PPArray))
-    {
-        Word_t    freewords;
-        Pscl_t    Pscl;
-
-        Pscl = CLEAR_PSCL(*PPArray);
-
-        freewords = SCLSIZE(STRLEN(Pscl->scl_Index));
-
-        JudyFree((void *)Pscl, freewords);
-
-        *PPArray = (Pvoid_t)NULL;
-
-        return (freewords * WORDSIZE);
-    }
-
-// FREE EACH SUB-ARRAY (DEPTH-FIRST):
-//
-// If a previous JudySLIns() ran out of memory partway down the tree, it left a
-// null *PPValue.  This is automatically treated correctly here as a dead-end.
-//
-// An Index (string) ends in the current word iff the last byte of the
-// (null-padded) word is null.
-
-    for (PPValue = JudyLFirst(*PPArray, &indexword, PJError);
-         (PPValue != (PPvoid_t) NULL) && (PPValue != PPJERR);
-         PPValue = JudyLNext(*PPArray, &indexword, PJError))
-    {
-        if (!LASTWORD_BY_VALUE(indexword))
-        {
-            if ((bytes_freed = JudySLFreeArray(PPValue, PJError)) == JERR)
-                return (JERR);          // propagate serious error.
-            bytes_total += bytes_freed;
-        }
-    }
-
-// Check for a serious error in a JudyL*() call:
-
-    if (PPValue == PPJERR)
-    {
-        JudySLModifyErrno(PJError, *PPArray, *PPArrayOrig);
-        return (JERR);
-    }
-
-// Now free the current array, which also nulls the pointer:
-//
-// Note:  *PPArray can be null here for a totally null JudySL array =>
-// JudyLFreeArray() returns zero.
-
-    if ((bytes_freed = JudyLFreeArray(PPArray, PJError)) == JERR)
-    {
-        JudySLModifyErrno(PJError, *PPArray, *PPArrayOrig);
-        return (JERR);
-    }
-    return (bytes_total + bytes_freed);
-}                                       // JudySLFreeArray()
diff --git a/libs/klib/judy/JudyTablesGen.c b/libs/klib/judy/JudyTablesGen.c
deleted file mode 100644
index 7be5de9..0000000
--- a/libs/klib/judy/JudyTablesGen.c
+++ /dev/null
@@ -1,294 +0,0 @@
-// Copyright (C) 2000 - 2002 Hewlett-Packard Company
-//
-// This program is free software; you can redistribute it and/or modify it
-// under the term of the GNU Lesser 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 Lesser General Public License
-// for more details.
-//
-// You should have received a copy of the GNU Lesser 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
-// _________________
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#if (! (defined(JUDY1) || defined(JUDYL)))
-#error:  One of -DJUDY1 or -DJUDYL must be specified.
-#endif
-
-#define	TERMINATOR 999		// terminator for Alloc tables
-
-#define BPW sizeof(Word_t)	// define bytes per word
-
-#ifdef JUDY1
-#include "Judy1.h"
-#else
-#include "JudyL.h"
-#endif
-    
-FILE *fd;
-
-// Definitions come from header files Judy1.h and JudyL.h:
-
-int AllocSizes[] = ALLOCSIZES;
-
-#define	ROUNDUP(BYTES,BPW,OFFSETW) \
-	((((BYTES) + (BPW) - 1) / (BPW)) + (OFFSETW))
-
-
-// ****************************************************************************
-// G E N   T A B L E
-//
-// Note:  "const" is required for newer compilers.
-
-FUNCTION void GenTable(
-    const char * TableName,	// name of table string
-    const char * TableSize,	// dimentioned size string
-    int		 IndexBytes,	// bytes per Index
-    int		 LeafSize,	// number elements in object
-    int		 ValueBytes,	// bytes per Value
-    int		 OffsetWords)	// 1 for LEAFW
-{
-    int *	 PAllocSizes = AllocSizes;
-    int		 OWord;
-    int		 CurWord;
-    int		 IWord;
-    int		 ii;
-    int		 BytesOfIndex;
-    int		 BytesOfObject;
-    int		 Index;
-    int		 LastWords;
-    int		 Words [1000] = { 0 };
-    int		 Offset[1000] = { 0 };
-    int		 MaxWords;
-
-    MaxWords  =	ROUNDUP((IndexBytes + ValueBytes) * LeafSize, BPW, OffsetWords);
-    Words[0]  = 0;
-    Offset[0] = 0;
-    CurWord   = TERMINATOR;
-
-// Walk through all number of Indexes in table:
-
-    for (Index = 1; /* null */; ++Index)
-    {
-
-// Calculate byte required for next size:
-
-	BytesOfIndex  = IndexBytes * Index;
-	BytesOfObject = (IndexBytes + ValueBytes) * Index;
-
-// Round up and calculate words required for next size:
-
-        OWord =	ROUNDUP(BytesOfObject, BPW, OffsetWords);
-        IWord =	ROUNDUP(BytesOfIndex,  BPW, OffsetWords);
-
-// Root-level leaves of population of 1 and 2 do not have the 1 word offset:
-
-// Save minimum value of offset:
-
-        Offset[Index] = IWord;
-
-// Round up to next available size of words:
-
-	while (OWord > *PAllocSizes) PAllocSizes++;
-
-        if (Index == LeafSize)
-        {
-	    CurWord = Words[Index] = OWord;
-            break;
-        }
-//      end of available sizes ?
-
-	if (*PAllocSizes == TERMINATOR)
-        {
-            fprintf(stderr, "BUG, in %sPopToWords, sizes not big enough for object\n", TableName);
-	    exit(1);
-        }
-
-// Save words required and last word:
-
-        if (*PAllocSizes < MaxWords) { CurWord = Words[Index] = *PAllocSizes; }
-        else                         { CurWord = Words[Index] = MaxWords; }
-
-    } // for each index
-
-    LastWords = TERMINATOR;
-
-// Round up to largest size in each group of malloc sizes:
-
-    for (ii = LeafSize; ii > 0; ii--)
-    {
-        if (LastWords > (Words[ii] - ii)) LastWords = Offset[ii];
-        else                              Offset[ii] = LastWords;
-    }
-
-// Print the PopToWords[] table:
-
-    fprintf(fd,"\n//\tobject uses %d words\n", CurWord);
-    fprintf(fd,"//\t%s = %d\n", TableSize, LeafSize);
-
-    fprintf(fd,"const uint8_t\n");
-    fprintf(fd,"%sPopToWords[%s + 1] =\n", TableName, TableSize);
-    fprintf(fd,"{\n\t 0,");
-
-    for (ii = 1; ii <= LeafSize; ii++)
-    {
-
-// 8 columns per line, starting with 1:
-
-	if ((ii % 8) == 1) fprintf(fd,"\n\t");
-
-	fprintf(fd,"%2d", Words[ii]);
-
-// If not last number place comma:
-
-	if (ii != LeafSize) fprintf(fd,", ");
-    }
-    fprintf(fd,"\n};\n");
-
-// Print the Offset table if needed:
-
-    if (! ValueBytes) return;
-
-    fprintf(fd,"const uint8_t\n");
-    fprintf(fd,"%sOffset[%s + 1] =\n", TableName, TableSize);
-    fprintf(fd,"{\n");
-    fprintf(fd,"\t 0,");
-
-    for (ii = 1; ii <= LeafSize; ii++)
-    {
-        if ((ii % 8) == 1) fprintf(fd,"\n\t");
-
-	fprintf(fd,"%2d", Offset[ii]);
-
-	if (ii != LeafSize) fprintf(fd,", ");
-    }
-    fprintf(fd,"\n};\n");
-
-} // GenTable()
-
-
-// ****************************************************************************
-// M A I N
-
-#ifdef JU_WMAIN
-FUNCTION int wmain()
-#else
-FUNCTION int main()
-#endif
-{
-    int ii;
-
-#ifdef JUDY1
-    char *fname = "Judy1Tables.c";
-#else
-    char *fname = "JudyLTables.c";
-#endif
-
-    if ((fd = fopen(fname, "w")) == NULL){
-	perror("FATAL ERROR: could not write to Judy[1L]Tables.c file\n");
-	return (-1);
-    }
-
-
-    fprintf(fd,"// @(#) From generation tool: JudyTablesGen.c\n");
-    fprintf(fd,"//\n\n");
-
-
-// ================================ Judy1 =================================
-#ifdef JUDY1
-
-    fprintf(fd,"#include \"Judy1.h\"\n");
-
-    fprintf(fd,"// Leave the malloc() sizes readable in the binary (via "
-	   "strings(1)):\n");
-    fprintf(fd,"const char * Judy1MallocSizes = \"Judy1MallocSizes =");
-
-    for (ii = 0; AllocSizes[ii] != TERMINATOR; ii++)
-	fprintf(fd," %d,", AllocSizes[ii]);
-
-#ifndef JU_64BIT
-    fprintf(fd," Leaf1 = %d\";\n\n", ( int ) cJ1_LEAF1_MAXPOP1);
-#else
-    fprintf(fd,"\";\n\n");			// no Leaf1 in this case.
-#endif
-
-// ================================ 32 bit ================================
-#ifndef JU_64BIT
-
-    GenTable("j__1_BranchBJP","cJU_BITSPERSUBEXPB", 8, cJU_BITSPERSUBEXPB,0,0);
-
-    GenTable("j__1_Leaf1", "cJ1_LEAF1_MAXPOP1", 1, cJ1_LEAF1_MAXPOP1, 0, 0);
-    GenTable("j__1_Leaf2", "cJ1_LEAF2_MAXPOP1", 2, cJ1_LEAF2_MAXPOP1, 0, 0);
-    GenTable("j__1_Leaf3", "cJ1_LEAF3_MAXPOP1", 3, cJ1_LEAF3_MAXPOP1, 0, 0);
-    GenTable("j__1_LeafW", "cJ1_LEAFW_MAXPOP1", 4, cJ1_LEAFW_MAXPOP1, 0, 1);
-
-#endif
-
-// ================================ 64 bit ================================
-#ifdef JU_64BIT
-    GenTable("j__1_BranchBJP","cJU_BITSPERSUBEXPB",16, cJU_BITSPERSUBEXPB,0,0);
-
-    GenTable("j__1_Leaf2", "cJ1_LEAF2_MAXPOP1", 2, cJ1_LEAF2_MAXPOP1, 0, 0);
-    GenTable("j__1_Leaf3", "cJ1_LEAF3_MAXPOP1", 3, cJ1_LEAF3_MAXPOP1, 0, 0);
-    GenTable("j__1_Leaf4", "cJ1_LEAF4_MAXPOP1", 4, cJ1_LEAF4_MAXPOP1, 0, 0);
-    GenTable("j__1_Leaf5", "cJ1_LEAF5_MAXPOP1", 5, cJ1_LEAF5_MAXPOP1, 0, 0);
-    GenTable("j__1_Leaf6", "cJ1_LEAF6_MAXPOP1", 6, cJ1_LEAF6_MAXPOP1, 0, 0);
-    GenTable("j__1_Leaf7", "cJ1_LEAF7_MAXPOP1", 7, cJ1_LEAF7_MAXPOP1, 0, 0);
-    GenTable("j__1_LeafW", "cJ1_LEAFW_MAXPOP1", 8, cJ1_LEAFW_MAXPOP1, 0, 1);
-#endif
-#endif // JUDY1
-
-
-// ================================ JudyL =================================
-#ifdef JUDYL
-
-    fprintf(fd,"#include \"JudyL.h\"\n");
-
-    fprintf(fd,"// Leave the malloc() sizes readable in the binary (via "
-	   "strings(1)):\n");
-    fprintf(fd,"const char * JudyLMallocSizes = \"JudyLMallocSizes =");
-
-    for (ii = 0; AllocSizes[ii] != TERMINATOR; ii++)
-	fprintf(fd," %d,", AllocSizes[ii]);
-
-    fprintf(fd," Leaf1 = %ld\";\n\n", (Word_t)cJL_LEAF1_MAXPOP1);
-
-#ifndef JU_64BIT
-// ================================ 32 bit ================================
-    GenTable("j__L_BranchBJP","cJU_BITSPERSUBEXPB", 8, cJU_BITSPERSUBEXPB, 0,0);
-
-    GenTable("j__L_Leaf1", "cJL_LEAF1_MAXPOP1",  1, cJL_LEAF1_MAXPOP1, BPW,0);
-    GenTable("j__L_Leaf2", "cJL_LEAF2_MAXPOP1",  2, cJL_LEAF2_MAXPOP1, BPW,0);
-    GenTable("j__L_Leaf3", "cJL_LEAF3_MAXPOP1",  3, cJL_LEAF3_MAXPOP1, BPW,0);
-    GenTable("j__L_LeafW", "cJL_LEAFW_MAXPOP1",  4, cJL_LEAFW_MAXPOP1, BPW,1);
-    GenTable("j__L_LeafV", "cJU_BITSPERSUBEXPL", 4, cJU_BITSPERSUBEXPL,  0,0);
-#endif // 32 BIT
-
-#ifdef JU_64BIT
-// ================================ 64 bit ================================
-    GenTable("j__L_BranchBJP","cJU_BITSPERSUBEXPB",16, cJU_BITSPERSUBEXPB, 0,0);
-
-    GenTable("j__L_Leaf1", "cJL_LEAF1_MAXPOP1",  1, cJL_LEAF1_MAXPOP1,  BPW,0);
-    GenTable("j__L_Leaf2", "cJL_LEAF2_MAXPOP1",  2, cJL_LEAF2_MAXPOP1,  BPW,0);
-    GenTable("j__L_Leaf3", "cJL_LEAF3_MAXPOP1",  3, cJL_LEAF3_MAXPOP1,  BPW,0);
-    GenTable("j__L_Leaf4", "cJL_LEAF4_MAXPOP1",  4, cJL_LEAF4_MAXPOP1,  BPW,0);
-    GenTable("j__L_Leaf5", "cJL_LEAF5_MAXPOP1",  5, cJL_LEAF5_MAXPOP1,  BPW,0);
-    GenTable("j__L_Leaf6", "cJL_LEAF6_MAXPOP1",  6, cJL_LEAF6_MAXPOP1,  BPW,0);
-    GenTable("j__L_Leaf7", "cJL_LEAF7_MAXPOP1",  7, cJL_LEAF7_MAXPOP1,  BPW,0);
-    GenTable("j__L_LeafW", "cJL_LEAFW_MAXPOP1",  8, cJL_LEAFW_MAXPOP1,  BPW,1);
-    GenTable("j__L_LeafV", "cJU_BITSPERSUBEXPL", 8, cJU_BITSPERSUBEXPL, 0,0);
-#endif // 64 BIT
-
-#endif // JUDYL
-    fclose(fd);
-
-    return(0);
-
-} // main()
diff --git a/libs/klib/judy/Judy_Bit.c b/libs/klib/judy/Judy_Bit.c
deleted file mode 100644
index 2df7f37..0000000
--- a/libs/klib/judy/Judy_Bit.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#define JUDY1
-
-#ifdef JU_64BIT
-#   include "Judy1Tables.64.c"
-#else
-#   include "Judy1Tables.32.c"
-#endif
-
-#include "JudyGet.c"
-#include "JudyIns.c"
-#include "JudyInsArray.c"
-#include "JudyDel.c"
-#include "JudyCreateBranch.c"
-#include "JudyFirst.c"
-#include "JudyFreeArray.c"
-#include "JudyInsertBranch.c"
-#include "JudyMallocIF.c"
-#include "JudyMemActive.c"
-#include "JudyMemUsed.c"
-#include "JudyPrevEmpty.c"
-#include "JudyByCountWithDefs.c"
-#include "j__udyGet.c"
-
diff --git a/libs/klib/judy/Judy_Bit_Cascade.c b/libs/klib/judy/Judy_Bit_Cascade.c
deleted file mode 100644
index fe01d83..0000000
--- a/libs/klib/judy/Judy_Bit_Cascade.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define JUDY1
-
-#include "JudyCascade.c"
diff --git a/libs/klib/judy/Judy_Bit_Count.c b/libs/klib/judy/Judy_Bit_Count.c
deleted file mode 100644
index 92d6f37..0000000
--- a/libs/klib/judy/Judy_Bit_Count.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define JUDY1
-
-#include "JudyCount.c"
diff --git a/libs/klib/judy/Judy_Bit_Decascade.c b/libs/klib/judy/Judy_Bit_Decascade.c
deleted file mode 100644
index ad8bb17..0000000
--- a/libs/klib/judy/Judy_Bit_Decascade.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define JUDY1
-
-#include "JudyDecascade.c"
diff --git a/libs/klib/judy/Judy_Bit_Next.c b/libs/klib/judy/Judy_Bit_Next.c
deleted file mode 100644
index b3cb30d..0000000
--- a/libs/klib/judy/Judy_Bit_Next.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define JUDY1
-
-#include "JudyNext.c"
diff --git a/libs/klib/judy/Judy_Bit_NextEmpty.c b/libs/klib/judy/Judy_Bit_NextEmpty.c
deleted file mode 100644
index 9687ea7..0000000
--- a/libs/klib/judy/Judy_Bit_NextEmpty.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define JUDY1
-
-#include "JudyNextEmpty.c"
diff --git a/libs/klib/judy/Judy_Bit_Prev.c b/libs/klib/judy/Judy_Bit_Prev.c
deleted file mode 100644
index 92133b7..0000000
--- a/libs/klib/judy/Judy_Bit_Prev.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define JUDY1
-
-#include "JudyPrev.c"
diff --git a/libs/klib/judy/Judy_Word.c b/libs/klib/judy/Judy_Word.c
deleted file mode 100644
index f5c2a8f..0000000
--- a/libs/klib/judy/Judy_Word.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#define JUDYL
-
-#ifdef JU_64BIT
-#   include "JudyLTables.64.c"
-#else
-#   include "JudyLTables.32.c"
-#endif
-
-#include "JudyGet.c"
-#include "JudyIns.c"
-#include "JudyInsArray.c"
-#include "JudyDel.c"
-#include "JudyCreateBranch.c"
-#include "JudyFirst.c"
-#include "JudyFreeArray.c"
-#include "JudyInsertBranch.c"
-#include "JudyMallocIF.c"
-#include "JudyMemActive.c"
-#include "JudyMemUsed.c"
-#include "JudyPrevEmpty.c"
-#include "JudyByCountWithDefs.c"
-#include "j__udyGet.c"
-
diff --git a/libs/klib/judy/Judy_Word_Cascade.c b/libs/klib/judy/Judy_Word_Cascade.c
deleted file mode 100644
index 23af479..0000000
--- a/libs/klib/judy/Judy_Word_Cascade.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define JUDYL
-
-#include "JudyCascade.c"
diff --git a/libs/klib/judy/Judy_Word_Count.c b/libs/klib/judy/Judy_Word_Count.c
deleted file mode 100644
index 7ea0820..0000000
--- a/libs/klib/judy/Judy_Word_Count.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define JUDYL
-
-#include "JudyCount.c"
diff --git a/libs/klib/judy/Judy_Word_Decascade.c b/libs/klib/judy/Judy_Word_Decascade.c
deleted file mode 100644
index fa2572b..0000000
--- a/libs/klib/judy/Judy_Word_Decascade.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define JUDYL
-
-#include "JudyDecascade.c"
diff --git a/libs/klib/judy/Judy_Word_Next.c b/libs/klib/judy/Judy_Word_Next.c
deleted file mode 100644
index afefcaf..0000000
--- a/libs/klib/judy/Judy_Word_Next.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define JUDYL
-
-#include "JudyNext.c"
diff --git a/libs/klib/judy/Judy_Word_NextEmpty.c b/libs/klib/judy/Judy_Word_NextEmpty.c
deleted file mode 100644
index bfd6310..0000000
--- a/libs/klib/judy/Judy_Word_NextEmpty.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define JUDYL
-
-#include "JudyNextEmpty.c"
diff --git a/libs/klib/judy/Judy_Word_Prev.c b/libs/klib/judy/Judy_Word_Prev.c
deleted file mode 100644
index 7d9bd1e..0000000
--- a/libs/klib/judy/Judy_Word_Prev.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define JUDYL
-
-#include "JudyPrev.c"
diff --git a/libs/klib/judy/Makefile b/libs/klib/judy/Makefile
deleted file mode 100644
index 59f5bfe..0000000
--- a/libs/klib/judy/Makefile
+++ /dev/null
@@ -1,225 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: all
-
-TOP ?= $(abspath ../../..)
-MODULE = libs/klib/judy
-
-INT_LIBS = \
-	libjudy
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES = \
-	$(JUDY_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-
-#-------------------------------------------------------------------------------
-# special rules
-#  for some reason these guys use the same source and load it up with
-#  ifdefs, so we have general rules to produce two sets of object files
-#  from a single set of sources
-#
-%.n.32.$(OBJX): %.c
-	$(CC) -o $@ $(OPT) $(CFLAGS) $<
-%.n.64.$(OBJX): %.c
-	$(CC) -o $@ $(OPT) $(CFLAGS) $<
-%.n.32_64.$(OBJX): %.c
-	$(CC) -o $@ $(OPT) $(CFLAGS) $<
-%.n.32.$(LOBX): %.c
-	$(CC) -o $@ -fPIC $(OPT) $(CFLAGS) $<
-%.n.64.$(LOBX): %.c
-	$(CC) -o $@ -fPIC $(OPT) $(CFLAGS) $<
-%.n.32_64.$(LOBX): %.c
-	$(CC) -o $@ $(OPT) $(CFLAGS) $<
-
-%.b.32.$(OBJX): %.c
-	$(CC) -o $@ $(OPT) $(CFLAGS) -DJUDY1 $<
-%.b.64.$(OBJX): %.c
-	$(CC) -o $@ $(OPT) $(CFLAGS) -DJUDY1 $<
-%.b.32_64.$(OBJX): %.c
-	$(CC) -o $@ $(OPT) $(CFLAGS) -DJUDY1 $<
-%.b.32.$(LOBX): %.c
-	$(CC) -o $@ -fPIC $(OPT) $(CFLAGS) -DJUDY1 $<
-%.b.64.$(LOBX): %.c
-	$(CC) -o $@ -fPIC $(OPT) $(CFLAGS) -DJUDY1 $<
-%.b.32_64.$(LOBX): %.c
-	$(CC) -o $@ -fPIC $(OPT) $(CFLAGS) -DJUDY1 $<
-
-%.w.32.$(OBJX): %.c
-	$(CC) -o $@ $(OPT) $(CFLAGS) -DJUDYL $<
-%.w.64.$(OBJX): %.c
-	$(CC) -o $@ $(OPT) $(CFLAGS) -DJUDYL $<
-%.w.32_64.$(OBJX): %.c
-	$(CC) -o $@ $(OPT) $(CFLAGS) -DJUDYL $<
-%.w.32.$(LOBX): %.c
-	$(CC) -o $@ -fPIC $(OPT) $(CFLAGS) -DJUDYL $<
-%.w.64.$(LOBX): %.c
-	$(CC) -o $@ -fPIC $(OPT) $(CFLAGS) -DJUDYL $<
-%.w.32_64.$(LOBX): %.c
-	$(CC) -o $@ -fPIC $(OPT) $(CFLAGS) -DJUDYL $<
-
-ifeq (win,$(OS))
-#JUDY_WIN = -DJU_WIN
-JUDY_WIN = -DJU_WMAIN -I$(TOP)/interfaces/cc/vc++
-endif
-
-#ifeq (dbg, $(BUILD))
-#DEBUG := -DDEBUG
-#endif
-
-CFLAGS = $(DEBUG)               \
-	$(NO_ARRAY_BOUNDS_WARNING)  \
-	$(DBG) $(CARCH) $(PROF)     \
-	$(JUDY_WIN) $(PED)          \
-	$(DEFINES) $(ARCHDEFS)      \
-	$(MIN_DEPLOY_OS_OPT)        \
-	-I$(SRCDIR) -I$(SRCDIR)/..
-
-VPATH += $(OBJDIR)
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS)) \
-	$(addprefix $(LIBDIR)/,$(EXT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-
-#-------------------------------------------------------------------------------
-# judy tables - whee!
-#
-JUDY_TABLES_SRC = \
-	JudyTablesGen
-
-JUDY_TABLES_BOBJ = \
-	$(addsuffix .b.$(BITS).$(OBJX),$(JUDY_TABLES_SRC))
-
-JUDY_TABLES_WOBJ = \
-	$(addsuffix .w.$(BITS).$(OBJX),$(JUDY_TABLES_SRC))
-
-$(OBJDIR)/Judy1TablesGen: $(JUDY_TABLES_BOBJ)
-	$(LD) --exe -o $@ $^
-
-$(OBJDIR)/JudyLTablesGen: $(JUDY_TABLES_WOBJ)
-	$(LD) --exe -o $@ $^
-
-$(OBJDIR)/Judy1Tables.c: $(OBJDIR)/Judy1TablesGen
-	$(RUN_REMOTELY) $^
-
-$(OBJDIR)/JudyLTables.c: $(OBJDIR)/JudyLTablesGen
-	$(RUN_REMOTELY) $^
-
-$(ILIBDIR)/judy-tables: \
-	$(OBJDIR)/JudyLTables.c \
-	$(OBJDIR)/Judy1Tables.c
-
-#    
-# make judy-tables to manually regenerate Judy tables sources, if there is ever such a need.
-#    
-judy-tables:
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-	cp $(OBJDIR)/Judy1Tables.c $(SRCDIR)/Judy1Tables.$(BITS).c
-	cp $(OBJDIR)/JudyLTables.c $(SRCDIR)/JudyLTables.$(BITS).c
-
-.PHONY: judy-tables
-    
-#-------------------------------------------------------------------------------
-# judy whee!
-#
-
-$(ILIBDIR)/libjudy: $(addprefix $(ILIBDIR)/libjudy.,$(LIBX))
-
-JUDY_NEUTRAL = \
-	JudyMalloc \
-	JudySL \
-	JudyHS
-
-JUDY_CMN = \
-	JudyGet \
-	JudyIns \
-	JudyInsArray \
-	JudyDel \
-	JudyCascade \
-	JudyCount \
-	JudyCreateBranch \
-	JudyDecascade \
-	JudyFirst \
-	JudyFreeArray \
-	JudyInsertBranch \
-	JudyMallocIF \
-	JudyMemActive \
-	JudyMemUsed \
-	JudyNext \
-	JudyNextEmpty \
-	JudyPrev \
-	JudyPrevEmpty \
-	JudyByCountWithDefs \
-	j__udyGet
-
-JUDY_WORD = \
-	_JudyLTables
-
-JUDY_BIT = \
-	_Judy1Tables
-
-JUDY_SRC = \
-	$(addsuffix .n,$(JUDY_NEUTRAL)) \
-	$(addsuffix .w,$(JUDY_CMN) $(JUDY_WORD)) \
-	$(addsuffix .b,$(JUDY_CMN) $(JUDY_BIT))
-
-JUDY_OBJ = \
-	$(addsuffix .$(BITS).$(LOBX),$(JUDY_SRC))
-
-$(ILIBDIR)/libjudy.$(LIBX): $(JUDY_OBJ)
-	$(LD) --slib -o $@ $^
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/klib/judy/_Judy1Tables.c b/libs/klib/judy/_Judy1Tables.c
deleted file mode 100644
index c6aa8be..0000000
--- a/libs/klib/judy/_Judy1Tables.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
- 
-#if __SIZEOF_POINTER__*__CHAR_BIT__ == 64
-#include "Judy1Tables.64.c"
-#else
-#include "Judy1Tables.32.c"
-#endif
\ No newline at end of file
diff --git a/libs/klib/judy/_JudyLTables.c b/libs/klib/judy/_JudyLTables.c
deleted file mode 100644
index 13bcd3e..0000000
--- a/libs/klib/judy/_JudyLTables.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
- 
-#if __SIZEOF_POINTER__*__CHAR_BIT__ == 64
-#include "JudyLTables.64.c"
-#else
-#include "JudyLTables.32.c"
-#endif
\ No newline at end of file
diff --git a/libs/klib/judy/j__udyGet.c b/libs/klib/judy/j__udyGet.c
deleted file mode 100644
index 478c0f1..0000000
--- a/libs/klib/judy/j__udyGet.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define JUDYGETINLINE 1
-#include "JudyGet.c"
diff --git a/libs/klib/ksort.c b/libs/klib/ksort.c
deleted file mode 100644
index ea7b093..0000000
--- a/libs/klib/ksort.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/extern.h>
-#include <klib/sort.h>
-
-
-/*--------------------------------------------------------------------------
- * ksort
- *  qsort with a function data pointer
- */
-
-#define TSWAP( T, a, b )                                      \
-    do                                                        \
-    {                                                         \
-        T tmp = * ( const T* ) ( a );                         \
-        * ( T* ) ( a ) = * ( const T* ) ( b );                \
-        * ( T* ) ( b ) = tmp;                                 \
-    }                                                         \
-    while ( 0 )
-
-#define TCMP( T, a, b )                                       \
-    ( ( * ( const T* ) ( a ) < * ( const T* ) ( b ) ) ? -1 :  \
-      ( * ( const T* ) ( a ) > * ( const T* ) ( b ) ) )
-
-
-/* various custom ksort operations
- *  structures will generally want their own functions
- *  these fundamental types can be standardized
- */
-LIB_EXPORT void CC ksort_int32_t ( int32_t *pbase, size_t total_elems )
-{
-#define SWAP( a, b, off, size )  TSWAP ( int32_t, a, b )
-#define CMP( a, b )                                             \
-    ( (int64_t) * ( const int32_t* ) ( a ) - (int64_t) * ( const int32_t* ) ( b ) )
-
-    KSORT ( pbase, total_elems, sizeof * pbase, 0, sizeof * pbase );
-
-#undef SWAP
-#undef CMP
-}
-
-LIB_EXPORT void CC ksort_uint32_t ( uint32_t *pbase, size_t total_elems )
-{
-#define SWAP( a, b, off, size )  TSWAP ( uint32_t, a, b )
-#define CMP( a, b ) \
-    ( (int64_t) * ( const uint32_t* ) ( a ) - (int64_t) * ( const uint32_t* ) ( b ) )
-
-    KSORT ( pbase, total_elems, sizeof * pbase, 0, sizeof * pbase );
-
-#undef SWAP
-#undef CMP
-}
-
-LIB_EXPORT void CC ksort_int64_t ( int64_t *pbase, size_t total_elems )
-{
-#define SWAP( a, b, off, size )  TSWAP ( int64_t, a, b )
-#define CMP( a, b ) TCMP ( int64_t, a, b )
-
-    KSORT ( pbase, total_elems, sizeof * pbase, 0, sizeof * pbase );
-
-#undef SWAP
-#undef CMP
-}
-
-LIB_EXPORT void CC ksort_uint64_t ( uint64_t *pbase, size_t total_elems )
-{
-#define SWAP( a, b, off, size )  TSWAP ( uint64_t, a, b )
-#define CMP( a, b ) TCMP ( uint64_t, a, b )
-
-    KSORT ( pbase, total_elems, sizeof * pbase, 0, sizeof * pbase );
-
-#undef SWAP
-#undef CMP
-}
diff --git a/libs/klib/linux/syserrcode.c b/libs/klib/linux/syserrcode.c
deleted file mode 100644
index 9ecd7ee..0000000
--- a/libs/klib/linux/syserrcode.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include "writer-priv.h"
-#include <klib/writer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <os-native.h> /* for strchrnul on non-linux */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <assert.h>
-
-size_t KWrtFmt_error_code ( char * buffer, size_t buffer_size, uint32_t error_code )
-{
-    char * pc;
-
-    pc = strerror_r ((int)error_code, buffer, buffer_size);
-
-    /* the glibc guys are sorta strange */
-    if (pc != buffer)
-    {
-        string_copy_measure (buffer, buffer_size, pc);
-        buffer[buffer_size-1] = '\0';
-    }
-    return string_size (buffer);
-}
diff --git a/libs/klib/log-priv.h b/libs/klib/log-priv.h
deleted file mode 100644
index 042eb44..0000000
--- a/libs/klib/log-priv.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_log_priv_
-#define _h_log_priv_
-
-#ifndef _h_klib_log_
-#include <klib/log.h>
-#endif
-
-#ifndef _h_klib_rc_
-#include <klib/rc.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* some defaults */
-
-/*--------------------------------------------------------------------------
- * Log
- *  global logging
- */
-
-/* GetRCModuleText
- */
-const char *GetRCModuleText ( enum RCModule mod );
-
-/* GetRCTargetText
- */
-const char *GetRCTargetText ( enum RCTarget targ );
-
-/* GetRCContextText
- */
-const char *GetRCContextText ( enum RCContext ctx );
-
-/* GetRCObjectText
- *  obj can be RCTarget or RCObject
- */
-const char *GetRCObjectText ( int obj );
-
-/* GetRCStateText
- */
-const char *GetRCStateText ( enum RCState state );
-
-
-/* GetRCModuleIdxText
- */
-const char *GetRCModuleIdxText ( enum RCModule mod );
-
-/* GetRCTargetIdxText
- */
-const char *GetRCTargetIdxText ( enum RCTarget targ );
-
-/* GetRCContextIdxText
- */
-const char *GetRCContextIdxText ( enum RCContext ctx );
-
-/* GetRCObjectIdxText
- *  obj can be RCTarget or RCObject
- */
-const char *GetRCObjectIdxText ( int obj );
-
-/* GetRCStateIdxText
- */
-const char *GetRCStateIdxText ( enum RCState state );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_log_priv_ */
diff --git a/libs/klib/log.c b/libs/klib/log.c
deleted file mode 100644
index db696af..0000000
--- a/libs/klib/log.c
+++ /dev/null
@@ -1,986 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <klib/extern.h>
-#include "log-priv.h"
-#include "writer-priv.h"
-#include <klib/log.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/sort.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <os-native.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * LogLevel
- * defaults to the error level which is the lowest error level filtering
- * warning and informational messages
- */
-static KLogLevel G_log_level = klogErr;
-static rc_t G_log_last_rc = 0;
-
-static KWrtHandler G_log_writer;
-static KWrtHandler G_log_lib_writer;
-
-static KFmtHandler G_log_formatter;
-static KLogFmtFlags G_log_formatter_flags;
-static KFmtHandler G_log_lib_formatter;
-static KLogFmtFlags G_log_lib_formatter_flags;
-
-/* LogLevelAdjust
- *  adjust process-global log level by an offset from current
- */
-LIB_EXPORT void CC KLogLevelAdjust( int32_t adjust )
-{
-    int32_t lvl = KLogLevelGet();
-
-    lvl += adjust;
-    if( lvl < klogLevelMin ) {
-        lvl = klogLevelMin;
-    } else if( lvl > klogLevelMax ) {
-        lvl = klogLevelMax;
-    }
-    G_log_level = lvl;
-}
-
-/* Get
- *  retrieve current process-global log level
- */
-LIB_EXPORT KLogLevel CC KLogLevelGet(void)
-{
-    return G_log_level;
-}
-
-/* Set
- *  set process-global log level
- */
-LIB_EXPORT rc_t CC KLogLevelSet(KLogLevel lvl)
-{
-    /* Don't allow an out of range set */
-    if( (lvl < klogLevelMin) || (lvl > klogLevelMax) ) {
-        return RC(rcRuntime, rcLog, rcUpdating, rcRange, rcInvalid);
-    }
-    G_log_level = lvl;
-    return 0;
-}
-
-/*
- * These need to be kept in sync with type LogLevel
- */
-static const char * logLevelParamStrings [] = 
-{
-    "fatal",
-    "sys",
-    "int",
-    "err",
-    "warn",
-    "info",
-    "debug"
-};
-
-LIB_EXPORT const char ** CC KLogGetParamStrings ( void )
-{
-    return logLevelParamStrings;
-}
-
-
-/* LogLevelExplain
- *  inserts level description
- */
-LIB_EXPORT rc_t CC KLogLevelExplain ( KLogLevel lvl, char *buffer, size_t bsize, size_t *num_writ )
-{
-    static const char undefined[] = "undefined";
-    size_t size;
-    uint32_t len;
-    const char *t;
-
-    /* catch unaccounted for or bad changes in log.h
-     * if the asserts fail then the table above and the rest
-     * of the function will fail */
-    assert (klogLevelMin == 0);
-    assert (klogLevelMin == klogFatal);
-    assert ((klogFatal + 1) == klogSys);
-    assert ((klogSys + 1) == klogInt);
-    assert ((klogInt + 1) == klogErr);
-    assert ((klogErr + 1) == klogWarn);
-    assert ((klogWarn + 1) == klogInfo);
-    assert ((klogInfo + 1) == klogDebug);
-    assert ((klogDebug) == klogLevelMax);
-
-    if ((lvl < klogLevelMin) || (lvl > klogLevelMax)) {
-        t = undefined;
-    } else {
-        t = logLevelParamStrings[lvl];
-    }
-
-    len = string_measure (t, &size);
-    if(len > bsize) {
-        if (num_writ) {
-            *num_writ = 0;
-        }
-        return RC ( rcRuntime, rcLog, rcLogging, rcBuffer, rcInsufficient );
-    }
-    if(num_writ) {
-        *num_writ = len;
-    }
-    string_copy (buffer, bsize, t, len);
-    return 0;
-}
-
-rc_t CC KLogDefaultFormatter( void* self, KWrtHandler* writer,
-                              size_t argc, const wrt_nvp_t args[],
-                              size_t envc, const wrt_nvp_t envs[] )
-{
-    rc_t rc = 0;
-    size_t num_writ, nsize, msize;
-    uint64_t mlen;
-    char buffer[8192], *nbuffer;
-    const char* msg, *rc_msg;
-
-    /* if writer is null than silence */
-    if( writer == NULL || writer->writer == NULL ) {
-        return rc;
-    }
-    msg = wrt_nvp_find_value(envc, envs, "message");
-    rc_msg = wrt_nvp_find_value(envc, envs, "reason");
-    if( msg != NULL ) {
-        const char* mend = msg + string_measure(msg, &msize);
-        /* strip trailing newlines */
-        while( mend != msg && (*mend == '\n' || *mend == '\r') ) {
-            --mend;
-        }
-        mlen = mend - msg;
-    } else {
-        mlen = 0;
-    }
-
-    nbuffer = buffer;
-    nsize = sizeof(buffer);
-    do {
-        rc = string_printf(nbuffer, nsize, & num_writ, "%s %s.%s %s: %s%s%.*s\n",
-                                 wrt_nvp_find_value(envc, envs, "timestamp"),
-                                 wrt_nvp_find_value(envc, envs, "app"),
-                                 wrt_nvp_find_value(envc, envs, "version"),
-                                 wrt_nvp_find_value(envc, envs, "severity"),
-                                 rc_msg ? rc_msg : "", rc_msg ? " - " : "",
-                                 ( uint32_t ) mlen, msg);
-        if( num_writ > nsize )
-        {
-            assert ( nbuffer == buffer );
-            nbuffer = malloc(nsize = num_writ + 2);
-            if( nbuffer == NULL ) {
-                rc = RC(rcRuntime, rcLog, rcLogging, rcMemory, rcExhausted);
-                break;
-            }
-            continue;
-        }
-        /* replace newlines with spaces, excluding last one */
-        for(nsize = 0; nsize < num_writ - 1; nsize++) {
-            if( nbuffer[nsize] == '\n' || nbuffer[nsize] == '\r' ) {
-                nbuffer[nsize] = ' ';
-            }
-        }
-        break;
-    } while(true);
-    if( rc == 0 ) {
-        rc = LogFlush(writer, nbuffer, num_writ);
-    }
-    if( nbuffer != buffer ) {
-        free(nbuffer);
-    }
-    return rc;
-}
-
-
-/* Init
- *  initialize the logging module with executable identity and version,
- *  plus logging level. actual behavior is determined by the logging
- *  implementation.
- *
- *  "ident" [ IN ] - identity of executable
- *
- *  "vers" [ IN ] - 4-part version code: 0xMMmmrrrr, where
- *      MM = major release
- *      mm = minor release
- *    rrrr = bug-fix release
- *
- *  "lvl" [ IN ] - a LogLevel specifying cutoff point for logs, such
- *  that any log generated with a level above "lvl" will be ignored.
- */
-LIB_EXPORT rc_t CC KLogInit ( void )
-{
-    rc_t rc;
-
-    G_log_level = klogWarn;
-    G_log_last_rc = 0;
-
-    rc = KLogHandlerSetStdErr();
-
-    if (rc == 0)
-        rc = KLogLibHandlerSet (NULL, NULL);
-
-    if (rc == 0)
-        rc = KLogFmtHandlerSetDefault();
-
-    if (rc == 0)
-        rc = KLogLibFmtHandlerSetDefault();
-
-    return rc;
-}
-
-
-/* LastErrorCode
- * LastErrorCodeReset
- *  return or clear the last reported rc_t with log level LogErr or above
- */
-LIB_EXPORT rc_t CC KLogLastErrorCode ( void )
-{
-    return G_log_last_rc;
-}
-
-LIB_EXPORT void CC KLogLastErrorCodeReset ( void )
-{
-    G_log_last_rc = 0;
-}
-
-/* LastErrorCodeSet
- *  set the last reported rc_t with log level LogErr or above
- */
-LIB_EXPORT void CC KLogLastErrorCodeSet ( KLogLevel lvl, rc_t rc )
-{
-    if ( lvl <= klogErr )
-        G_log_last_rc = rc;
-}
-
-/* pLogMsg
- *  creates an info node with parameters
- *  <info time="" message="" ... />
- *
- *  "lvl" [ IN ] - severity of message
- *
- *  "msg" [ IN ] - NUL terminated string with named parameters
- *
- *  "fmt" [ IN ] - NUL terminated format string, behaves according
- *  to standard printf-style formatting
- */
-LIB_EXPORT rc_t CC pLogMsg ( KLogLevel lvl, const char *msg, const char *fmt, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    if ( lvl > KLogLevelGet() )
-        return 0;
-
-    va_start ( args, fmt );
-    rc = vLogMsg ( lvl, msg, fmt, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC pLogLibMsg ( KLogLevel lvl, const char *msg, const char *fmt, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    if ( lvl > KLogLevelGet() )
-        return 0;
-
-    va_start ( args, fmt );
-    rc = vLogLibMsg ( lvl, msg, fmt, args );
-    va_end ( args );
-
-    return rc;
-}
-
-/* logsubstituteparams
- *  perform param substitution by name
- */
-static
-rc_t logsubstituteparams ( const char* msg, uint32_t argc, const wrt_nvp_t argv[],
-                           uint32_t envc, const wrt_nvp_t envs[],
-                           char* buffer, size_t bsize, size_t* num_writ )
-{
-    rc_t rc;
-    size_t i, sz;
-    for ( rc = 0, i = 0, sz = 0; msg [ i ] != 0; ++ sz, ++ i )
-    {
-        /* copy msg character */
-        if ( sz < bsize )
-            buffer [ sz ] = msg [ i ];
-
-        /* detect substitution param */
-        if ( msg [ i ] == '$' && msg [ i + 1 ] == '(' )
-        {
-            const char *value;
-            size_t size;
-
-            /* find param by name */
-            const wrt_nvp_t *arg = wrt_nvp_find(argc, argv, &msg[ i + 2 ]);
-            if( arg == NULL ) {
-                arg = wrt_nvp_find(envc, envs, &msg[ i + 2 ]);
-                if( arg == NULL ) {
-                    rc = RC ( rcRuntime, rcLog, rcInserting, rcParam, rcNotFound );
-                    break;
-                }
-            }
-            /* substitute param value */
-            for(value = arg->value; *value != 0; value++, sz++) {
-                if( sz < bsize ) {
-                    buffer[sz] = *value;
-                }
-            }
-            /* compensate for outer loop's increment */
-            --sz;
-            /* advance past param token */
-            i += string_measure(arg->name, &size) + 2;
-            assert( msg[i] == ')' );
-        }
-    }
-
-    * num_writ = sz;
-
-    if ( rc != 0 )
-        return rc;
-
-    if ( sz >= bsize )
-        return RC ( rcRuntime, rcLog, rcInserting, rcBuffer, rcInsufficient );
-
-    buffer [ sz ] = 0;
-    return 0;
-}
-
-
-/* logappendpmsg
- *  appends a message and parameters
- */
-static
-int logmatchname ( const char *fmt, char *pdata )
-{
-    int i;
-    for ( i = 0; fmt [ i ] == pdata [ i ]; ++ i )
-    {
-        switch ( fmt [ i ] )
-        {
-        case '=':
-            if ( i > 0 )
-            {
-                pdata [ i ] = 0;
-                return i;
-            }
-        case 0:
-        case ',':
-            return -1;
-        }
-    }
-    return 0;
-}
-
-static
-rc_t logtokenizeparams ( const char* fmt, char* pdata,
-                         uint32_t* argcp, wrt_nvp_t argv[], uint32_t arg_max )
-{
-    /* now split into parameters */
-    uint32_t argc;
-    int len = logmatchname ( fmt, pdata );
-    if ( len ++ <= 0 )
-        return RC ( rcRuntime, rcLog, rcTokenizing, rcParam, rcInvalid );
-
-    argv [ 0 ] . name = pdata;
-    argv [ 0 ] . value = & pdata [ len ];
-    for ( argc = 1, fmt += len; ; ++ argc )
-    {
-        /* find end of formal param fmt */
-        char *end = strchr ( fmt, ',' );
-        if ( end == NULL )
-            break;
-        fmt = end + 1;
-
-        /* find end of param value by
-           finding beginning of next name */
-        end = strchr ( argv [ argc - 1 ] . value, ',' );
-        while ( end != NULL )
-        {
-            len = logmatchname ( fmt, end + 1 );
-            if ( len > 0 )
-                break;
-            if ( len < 0 )
-                return RC ( rcRuntime, rcLog, rcTokenizing, rcParam, rcInvalid );
-            end = strchr ( end + 1, ',' );
-        }
-
-        /* detect badly formed parameter value or va_list */
-        if ( end ++ == NULL )
-            return RC ( rcRuntime, rcLog, rcTokenizing, rcParam, rcInvalid );
-
-        /* detect too many parameters */
-        if ( argc == arg_max )
-            return RC ( rcRuntime, rcLog, rcTokenizing, rcRange, rcExcessive );
-
-        /* account for NUL */
-        ++ len;
-
-        /* NUL terminate value */
-        end [ -1 ] = 0;
-
-        /* record param name and value addresses */
-        argv [ argc ] . name = end;
-        argv [ argc ] . value = end + len;
-
-        /* advance over formal param name */
-        fmt += len;
-    }
-
-    /* if multiple parameters, order by name */
-    wrt_nvp_sort(argc, argv);
-    * argcp = argc;
-    return 0;
-}
-
-static
-rc_t prep_v_args( uint32_t* argc, wrt_nvp_t argv[], size_t max_argc,
-                  char* pbuffer, size_t pbsize, const char* fmt, va_list args )
-{
-    rc_t rc = string_vprintf ( pbuffer, pbsize, NULL, fmt, args );
-    if ( rc == 0 )
-    {
-        /* tokenize the parameters into name/value pairs */
-        rc = logtokenizeparams(fmt, pbuffer, argc, argv, ( uint32_t ) max_argc);
-    }
-    return rc;
-}
-
-static
-rc_t log_print( KFmtHandler* formatter, const KLogFmtFlags flags, KWrtHandler* writer,
-                KLogLevel lvl, bool use_rc, rc_t status, 
-                const char* msg, const char* fmt, va_list args )
-{
-    rc_t rc = 0;
-    char* nbuffer;
-    size_t num_writ, remaining;
-
-    uint32_t envc = 0;
-    wrt_nvp_t envs[20];
-    char ebuffer[2048];
-    uint32_t argc = 0;
-    wrt_nvp_t argv[32];
-    char pbuffer[4096];
-    char abuffer[4096];
-    KFmtWriter fmtwrt;
-    
-    assert(formatter != NULL);
-    assert(writer != NULL);
-
-    fmtwrt = formatter->formatter;
-    if( fmtwrt == NULL ) {
-        fmtwrt = KLogDefaultFormatter;
-    }
-    if( fmtwrt == KLogDefaultFormatter && writer->writer == NULL ) {
-        /* default formatting with NULL writer -> silence */
-        return rc;
-    }
-    nbuffer = (char*)ebuffer;
-    remaining = sizeof(ebuffer);
-    do {
-#define FIX_UP() if(rc){break;} remaining -= num_writ; nbuffer += num_writ
-        if( flags & (klogFmtTimestamp | klogFmtLocalTimestamp) ) {
-            if( flags & klogFmtLocalTimestamp ) {
-                rc = LogSimpleTimestamp(nbuffer, remaining, &num_writ);
-            } else {
-                rc = LogTimestamp(nbuffer, remaining, &num_writ);
-            }
-            nbuffer[num_writ++] = '\0';
-            envs[envc].name = "timestamp";
-            envs[envc++].value = nbuffer;
-            FIX_UP();
-        }
-        if( flags & klogFmtSeverity ) {
-            rc = KLogLevelExplain(lvl, nbuffer, remaining, &num_writ);
-            nbuffer[num_writ++] = '\0';
-            envs[envc].name = "severity";
-            envs[envc++].value = nbuffer;
-            FIX_UP();
-        }
-        if( flags & klogFmtPid ) {
-            rc = LogPID(nbuffer, remaining, &num_writ);
-            nbuffer[num_writ++] = '\0';
-            envs[envc].name = "pid";
-            envs[envc++].value = nbuffer;
-            FIX_UP();
-        }
-        if( flags & klogFmtAppName ) {
-            rc = LogAppName(nbuffer, remaining, &num_writ);
-            nbuffer[num_writ++] = '\0';
-            envs[envc].name = "app";
-            envs[envc++].value = nbuffer;
-            FIX_UP();
-        }
-        if( flags & klogFmtAppVersion ) {
-            rc = LogAppVersion(nbuffer, remaining, &num_writ);
-            nbuffer[num_writ++] = '\0';
-            envs[envc].name = "version";
-            envs[envc++].value = nbuffer;
-            FIX_UP();
-        }
-        if( use_rc ) {
-            if( flags & klogFmtReason ) {
-                rc = RCExplain(status, nbuffer, remaining, &num_writ);
-                nbuffer[num_writ++] = '\0';
-                envs[envc].name = "reason";
-                envs[envc++].value = nbuffer;
-                FIX_UP();
-            }
-            if( flags & klogFmtReasonShort ) {
-                rc = RCExplain2(status, nbuffer, remaining, &num_writ, eRCExOpt_ObjAndStateOnlyIfError);
-                nbuffer[num_writ++] = '\0';
-                envs[envc].name = "reason_short";
-                envs[envc++].value = nbuffer;
-                FIX_UP();
-            }
-            if( flags & klogFmtRC ) {
-                rc = string_printf(nbuffer, remaining, & num_writ, "%R", status);
-                envs[envc].name = "rc";
-                envs[envc++].value = nbuffer;
-                FIX_UP();
-            }
-            if( flags & klogFmtModule ) {
-                envs[envc].name = "module";
-                envs[envc++].value = GetRCModuleIdxText(GetRCModule(status));
-            }
-            if( flags & klogFmtTarget ) {
-                envs[envc].name = "target";
-                envs[envc++].value = GetRCTargetIdxText(GetRCTarget(status));
-            }
-            if( flags & klogFmtContext ) {
-                envs[envc].name = "context";
-                envs[envc++].value = GetRCContextIdxText(GetRCContext(status));
-            }
-            if( flags & klogFmtObject ) {
-                envs[envc].name = "object";
-                envs[envc++].value = GetRCObjectIdxText(GetRCObject(status));
-            }
-            if( flags & klogFmtState ) {
-                envs[envc].name = "state";
-                envs[envc++].value = GetRCStateIdxText(GetRCState(status));
-            }
-            if( flags & klogFmtModuleText ) {
-                envs[envc].name = "module-text";
-                envs[envc++].value = GetRCModuleText(GetRCModule(status));
-            }
-            if( flags & klogFmtTargetText ) {
-                envs[envc].name = "target-text";
-                envs[envc++].value = GetRCTargetText(GetRCTarget(status));
-            }
-            if( flags & klogFmtContextText ) {
-                envs[envc].name = "context-text";
-                envs[envc++].value = GetRCContextText(GetRCContext(status));
-            }
-            if( flags & klogFmtObjectText ) {
-                envs[envc].name = "object-text";
-                envs[envc++].value = GetRCObjectText(GetRCObject(status));
-            }
-            if( flags & klogFmtStateText ) {
-                envs[envc].name = "state-text";
-                envs[envc++].value = GetRCStateText(GetRCState(status));
-            }
-        }
-#undef FIX_UP
-    } while(false);
-    /* env must have one spare element for message added text below */
-    if( rc == 0 && envc >= (sizeof(envs)/sizeof(envs[0])) ) {
-        rc = RC(rcRuntime, rcLog, rcLogging, rcTable, rcInsufficient);
-    }
-    nbuffer = (char*)abuffer;
-    remaining = sizeof(abuffer);
-    if( rc == 0 ) {
-        if( fmt != NULL ) {
-            rc = prep_v_args(&argc, argv, sizeof(argv)/sizeof(argv[0]) - 1, pbuffer, sizeof(pbuffer), fmt, args);
-        }
-        if( rc == 0 && (flags & klogFmtMessage) ) {
-            if( msg == NULL || msg[0] == '\0' ) {
-                msg = "empty log message";
-            }
-            do {
-                /* substitute parameters into message */
-                wrt_nvp_sort(envc, envs);
-                rc = logsubstituteparams(msg, argc, argv, envc, envs, nbuffer, remaining - 1, &num_writ);
-                if( GetRCState(rc) == rcInsufficient ) {
-                    if(nbuffer != abuffer) {
-                        free(nbuffer);
-                    }
-                    remaining += num_writ > remaining ? num_writ : remaining;
-                    nbuffer = malloc(remaining);
-                    if( nbuffer == NULL ) {
-                        rc = RC(rcRuntime, rcLog, rcLogging, rcMemory, rcExhausted);
-                    }
-                } else {
-                    if( rc == 0 ) {
-                        nbuffer[num_writ] = '\0';
-                        envs[envc].name = "message";
-                        envs[envc++].value = nbuffer;
-                    }
-                    break;
-                }
-            } while(rc == 0);
-        }
-    }
-    if( rc != 0 ) {
-        /* print reason for failure */
-        string_printf((char*)abuffer, sizeof(abuffer), &num_writ, "log failure: %R in '%s'", rc, msg);
-        envs[envc].name = "message";
-        envs[envc++].value = abuffer;
-    }
-
-    wrt_nvp_sort(envc, envs);
-
-    {
-        rc_t rc2 = fmtwrt(formatter->data, writer, argc, argv, envc, envs);
-        if( (rc2 == 0) && use_rc ) {
-            KLogLastErrorCodeSet(lvl, status);
-        }
-        if(nbuffer != abuffer) {
-            free(nbuffer);
-        }
-        return rc != 0 ? rc : rc2;
-    }
-}
-
-/* LogMsg
- *  makes an entry to the log file
- *
- *  "lvl" [ IN ] - severity of message
- *
- *  "msg" [ IN ] - NUL terminated string
- */
-
-LIB_EXPORT rc_t CC LogMsg ( KLogLevel lvl, const char *msg )
-{
-    if ( lvl > KLogLevelGet() )
-        return 0;
-
-    return log_print(KLogFmtHandlerGet(), G_log_formatter_flags,
-                     KLogHandlerGet(), lvl, false, 0, msg, NULL, NULL );
-}
-
-LIB_EXPORT rc_t CC LogLibMsg ( KLogLevel lvl, const char *msg )
-{
-    if ( lvl > KLogLevelGet() )
-        return 0;
-
-    return log_print(KLogLibFmtHandlerGet(), G_log_lib_formatter_flags, 
-                     KLogLibHandlerGet(), lvl, false, 0, msg, NULL, NULL );
-}
-
-
-/* LogErr
- *  reports an error to log file
- *
- *  "lvl" [ IN ] - severity of message
- *
- *  "status" [ IN ] - return code to be decoded
- *
- *  "msg" [ IN, NULL OKAY ] - optional NUL terminated message string
- */
-LIB_EXPORT rc_t CC LogErr ( KLogLevel lvl, rc_t status, const char *msg )
-{
-    if ( lvl > KLogLevelGet() )
-        return 0;
-
-    return log_print(KLogFmtHandlerGet(), G_log_formatter_flags,
-                     KLogHandlerGet(), lvl, true, status, msg, NULL, NULL );
-}
-
-LIB_EXPORT rc_t CC LogLibErr ( KLogLevel lvl, rc_t status, const char *msg )
-{
-    if ( lvl > KLogLevelGet() )
-        return 0;
-
-    return log_print(KLogLibFmtHandlerGet(), G_log_lib_formatter_flags,
-                     KLogLibHandlerGet(), lvl, true, status, msg, NULL, NULL );
-}
-
-/* vLogMsg
- *  makes a parameterized entry to the log file
- *
- *  "lvl" [ IN ] - severity of message
- *
- *  "msg" [ IN ] - NUL terminated string with named parameters
- *
- *  "fmt" [ IN ] - NUL terminated format string, behaves according
- *  to standard printf-style formatting
- */
-LIB_EXPORT rc_t CC vLogMsg ( KLogLevel lvl, const char *msg, const char *fmt, va_list args )
-{
-    if ( lvl > KLogLevelGet() )
-        return 0;
-
-    return log_print(KLogFmtHandlerGet(), G_log_formatter_flags,
-                     KLogHandlerGet(), lvl, false, 0, msg, fmt, args );
-}
-
-LIB_EXPORT rc_t CC vLogLibMsg ( KLogLevel lvl, const char *msg, const char *fmt, va_list args )
-{
-    if ( lvl > KLogLevelGet() )
-        return 0;
-
-    return log_print(KLogLibFmtHandlerGet(), G_log_lib_formatter_flags,
-                     KLogLibHandlerGet(), lvl, false, 0, msg, fmt, args );
-}
-
-/* vLogErr
- *  reports an error to log file
- *
- *  "lvl" [ IN ] - severity of message
- *
- *  "status" [ IN ] - return code to be decoded
- *
- *  "msg" [ IN ] - NUL terminated message string with named parameters
- *
- *  "fmt" [ IN ] - NUL terminated format string, behaves according
- *  to standard printf-style formatting
- */
-LIB_EXPORT rc_t CC vLogErr ( KLogLevel lvl, rc_t status, const char *msg, const char *fmt, va_list args )
-{
-    if ( lvl > KLogLevelGet() )
-        return 0;
-
-    return log_print(KLogFmtHandlerGet(), G_log_formatter_flags,
-                     KLogHandlerGet(), lvl, true, status, msg, fmt, args );
-}
-
-LIB_EXPORT rc_t CC vLogLibErr ( KLogLevel lvl, rc_t status, const char *msg, const char *fmt, va_list args )
-{
-    if ( lvl > KLogLevelGet() )
-        return 0;
-    return log_print(KLogLibFmtHandlerGet(), G_log_lib_formatter_flags,
-                     KLogLibHandlerGet(), lvl, true, status, msg, fmt, args );
-}
-
-/* pLogErr
- *  reports an error to log file
- *
- *  "lvl" [ IN ] - severity of message
- *
- *  "status" [ IN ] - return code to be decoded
- *
- *  "msg" [ IN ] - NUL terminated message string with named parameters
- *
- *  "fmt" [ IN ] - NUL terminated format string, behaves according
- *  to standard printf-style formatting
- */
-LIB_EXPORT rc_t CC pLogErr ( KLogLevel lvl, rc_t status, const char *msg, const char *fmt, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    if ( lvl > KLogLevelGet() )
-        return 0;
-
-    va_start ( args, fmt );
-    rc = vLogErr ( lvl, status, msg, fmt, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC pLogLibErr ( KLogLevel lvl, rc_t status, const char *msg, const char *fmt, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    if ( lvl > KLogLevelGet() )
-        return 0;
-
-    va_start ( args, fmt );
-    rc = vLogLibErr ( lvl, status, msg, fmt, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KLogHandlerSetStdOut ( void )
-{
-    return KLogHandlerSet(KWrt_DefaultWriter, KWrt_DefaultWriterDataStdOut);
-}
-
-LIB_EXPORT rc_t CC KLogLibHandlerSetStdOut ( void )
-{
-    return KLogLibHandlerSet(KWrt_DefaultWriter, KWrt_DefaultWriterDataStdOut);
-}
-
-LIB_EXPORT rc_t CC KLogHandlerSetStdErr ( void )
-{
-    return KLogHandlerSet(KWrt_DefaultWriter, KWrt_DefaultWriterDataStdErr);
-}
-
-LIB_EXPORT rc_t CC KLogLibHandlerSetStdErr ( void )
-{
-    return KLogLibHandlerSet(KWrt_DefaultWriter, KWrt_DefaultWriterDataStdErr);
-}
-
-LIB_EXPORT rc_t CC KLogHandlerSet ( KWrtWriter writer, void * data )
-{
-    G_log_writer.writer = writer;
-    G_log_writer.data = data;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLogLibHandlerSet ( KWrtWriter writer, void * data )
-{
-    G_log_lib_writer.writer = writer;
-    G_log_lib_writer.data = data;
-    return 0;
-}
-
-LIB_EXPORT void * CC KLogDataGet ( void )
-{
-    return ( KLogHandlerGet()->data );
-}
-
-LIB_EXPORT void * CC KLogLibDataGet ( void )
-{
-    return ( KLogLibHandlerGet()->data );
-}
-
-LIB_EXPORT KWrtWriter CC KLogWriterGet ( void )
-{
-    return ( KLogHandlerGet()->writer );
-}
-
-LIB_EXPORT KWrtWriter CC KLogLibWriterGet ( void )
-{
-    return ( KLogLibHandlerGet()->writer );
-}
-
-LIB_EXPORT KWrtHandler * CC KLogHandlerGet ( void )
-{
-    return ( &G_log_writer );
-}
-
-LIB_EXPORT KWrtHandler * CC KLogLibHandlerGet ( void )
-{
-    return ( &G_log_lib_writer );
-}
-
-static const uint32_t log_dflt_opt = klogFmtTimestamp | klogFmtSeverity | klogFmtPid |
-                klogFmtMessage | klogFmtAppName | klogFmtAppVersion | klogFmtReason;
-
-LIB_EXPORT rc_t CC KLogFmtHandlerSetDefault ( void )
-{
-    rc_t rc = KLogFmtHandlerSet(KLogDefaultFormatter, 0, NULL);
-    if( rc == 0 ) {
-        G_log_formatter_flags = log_dflt_opt;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KLogLibFmtHandlerSetDefault ( void )
-{
-    rc_t rc = KLogLibFmtHandlerSet(KLogDefaultFormatter, 0, NULL);
-    if( rc == 0 ) {
-        G_log_lib_formatter_flags = log_dflt_opt;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KLogFmtFlagsSet ( KLogFmtFlags flags )
-{
-    G_log_formatter_flags |= flags;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLogLibFmtFlagsSet ( KLogFmtFlags flags )
-{
-    G_log_lib_formatter_flags |= flags;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLogFmtHandlerSet ( KFmtWriter formatter, KLogFmtFlags flags, void* data )
-{
-    if( formatter == NULL ) {
-        return RC(rcRuntime, rcLog, rcLogging, rcFunction, rcNull);
-    }
-    G_log_formatter.formatter = formatter;
-    G_log_formatter.data = data;
-    KLogFmtFlagsSet(flags);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLogLibFmtHandlerSet ( KFmtWriter formatter, KLogFmtFlags flags, void* data )
-{
-    if( formatter == NULL ) {
-        return RC(rcRuntime, rcLog, rcLogging, rcFunction, rcNull);
-    }
-    G_log_lib_formatter.formatter = formatter;
-    G_log_lib_formatter.data = data;
-    KLogLibFmtFlagsSet(flags);
-    return 0;
-}
-
-LIB_EXPORT void * CC KLogFmtDataGet ( void )
-{
-    return ( KLogFmtHandlerGet()->data );
-}
-
-LIB_EXPORT void * CC KLogLibFmtDataGet ( void )
-{
-    return ( KLogFmtHandlerGet()->data );
-}
-
-LIB_EXPORT KFmtWriter CC KLogFmtWriterGet ( void )
-{
-    return ( KLogFmtHandlerGet()->formatter ? KLogFmtHandlerGet()->formatter : KLogDefaultFormatter );
-}
-
-LIB_EXPORT KFmtWriter CC KLogLibFmtWriterGet ( void )
-{
-    return ( KLogLibFmtHandlerGet()->formatter ? KLogLibFmtHandlerGet()->formatter : KLogDefaultFormatter );
-}
-
-LIB_EXPORT KFmtHandler * CC KLogFmtHandlerGet ( void )
-{
-    return ( &G_log_formatter );
-}
-
-LIB_EXPORT KFmtHandler * CC KLogLibFmtHandlerGet ( void )
-{
-    return ( &G_log_lib_formatter );
-}
-
-LIB_EXPORT KLogFmtFlags CC KLogFmtFlagsGet ( void )
-{
-    return G_log_formatter_flags;
-}
-
-LIB_EXPORT KLogFmtFlags CC KLogLibFmtFlagsGet ( void )
-{
-    return G_log_lib_formatter_flags;
-}
diff --git a/libs/klib/maybeswap.h b/libs/klib/maybeswap.h
deleted file mode 100644
index 71696a0..0000000
--- a/libs/klib/maybeswap.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_maybeswap_
-#define _h_maybeswap_
-
-/* technically, a whitelist would be safer */
-#ifdef __sparc
-#  if SWAP_PERSISTED
-#    define GET_UNALIGNED( type, swap, dest, src )                  \
-        do {                                                        \
-            type tmp##__LINE__;                                     \
-            memcpy ( & tmp##__LINE__, & ( src ), sizeof ( type ) ); \
-            dest = swap ( tmp##__LINE__ );                          \
-        } while (0)
-#  else
-#    define GET_UNALIGNED( type, swap, dest, src ) \
-        memcpy ( & ( dest ), & ( src ), sizeof ( type ) )
-#  endif
-#elif SWAP_PERSISTED
-#  define GET_UNALIGNED( type, swap, dest, src ) dest = swap ( src )
-#else
-#  define GET_UNALIGNED( type, swap, dest, src ) \
-      dest = ( * ( const type* ) & ( src ) )
-#endif
-
-#include <byteswap.h>
-
-#define GET16( dest, src ) GET_UNALIGNED ( uint16_t, bswap_16, dest, src )
-#define GET32( dest, src ) GET_UNALIGNED ( uint32_t, bswap_32, dest, src )
-#define GET64( dest, src ) GET_UNALIGNED ( uint64_t, bswap_64, dest, src )
-
-#endif /* _h_maybeswap_ */
-
diff --git a/libs/klib/md5.c b/libs/klib/md5.c
deleted file mode 100644
index 4a717c6..0000000
--- a/libs/klib/md5.c
+++ /dev/null
@@ -1,421 +0,0 @@
-/*
-  Copyright (C) 1999 Aladdin Enterprises.  All rights reserved.
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  L. Peter Deutsch
-  ghost at aladdin.com
-
-*/
-/*
-  Independent implementation of MD5 (RFC 1321).
-
-  This code implements the MD5 Algorithm defined in RFC 1321.
-  It is derived directly from the text of the RFC and not from the
-  reference implementation.
-
-  The original and principal author of md5.c is L. Peter Deutsch
-  <ghost at aladdin.com>.  Other authors are noted in the change history
-  that follows (in reverse chronological order):
-
-  1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
-  1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5).
-  1999-05-03 lpd Original version.
-*/
-
-/*
-  This software is derived from original work by Peter Deutsch.
-  It has been incorporated into a body of PUBLIC DOMAIN software
-  distributed by the National Center for Biotechnology Information.
-
-  Although all reasonable efforts have been taken to ensure the accuracy
-  and reliability of the software and data, the NLM and the U.S.
-  Government do not and cannot warrant the performance or results that
-  may be obtained by using this software or data. The NLM and the U.S.
-  Government disclaim all warranties, express or implied, including
-  warranties of performance, merchantability or fitness for any particular
-  purpose.
-*/
-
-#include <klib/extern.h>
-#include <klib/checksum.h>
-#include <sysalloc.h>
-
-#include <string.h>
-#include <endian.h>
-#include <byteswap.h>
-
-#if ! defined __BYTE_ORDER || ! defined __LITTLE_ENDIAN
-#error "missing byte order definitions"
-#endif
-
-
-
-/*--------------------------------------------------------------------------
- * MD5
- *  taken from Peter Deutsch's sources due to simplicity
- */
-#define T_MASK ( ( uint32_t ) ~ 0 )
-
-/* MD5StateInit
- *  initialize the algorithm and state block
- */
-LIB_EXPORT void CC MD5StateInit ( MD5State *md5 )
-{
-    if ( md5 != NULL )
-    {
-        md5 -> count [ 0 ] = md5 -> count [ 1 ] = 0;
-        md5 -> abcd [ 0 ] = 0x67452301;
-        md5 -> abcd [ 1 ] = /*0xefcdab89*/ T_MASK ^ 0x10325476;
-        md5 -> abcd [ 2 ] = /*0x98badcfe*/ T_MASK ^ 0x67452301;
-        md5 -> abcd [ 3 ] = 0x10325476;
-        memset(md5->buf,0,sizeof(md5->buf));
-    }
-}
-
-/* MDStateProcess
- *  input is taken in blocks of little-endian 32 bit words
- *
- *  for big endian machines, this means data are copied
- *  and rearranged.
- *
- *  for little endian, data are copied if not properly aligned
- */
-#define T1 /* 0xd76aa478 */ ( T_MASK ^ 0x28955b87 )
-#define T2 /* 0xe8c7b756 */ ( T_MASK ^ 0x173848a9 )
-#define T3    0x242070db
-#define T4 /* 0xc1bdceee */ ( T_MASK ^ 0x3e423111 )
-#define T5 /* 0xf57c0faf */ ( T_MASK ^ 0x0a83f050 )
-#define T6    0x4787c62a
-#define T7 /* 0xa8304613 */ ( T_MASK ^ 0x57cfb9ec )
-#define T8 /* 0xfd469501 */ ( T_MASK ^ 0x02b96afe )
-#define T9    0x698098d8
-#define T10 /* 0x8b44f7af */ ( T_MASK ^ 0x74bb0850 )
-#define T11 /* 0xffff5bb1 */ ( T_MASK ^ 0x0000a44e )
-#define T12 /* 0x895cd7be */ ( T_MASK ^ 0x76a32841 )
-#define T13    0x6b901122
-#define T14 /* 0xfd987193 */ ( T_MASK ^ 0x02678e6c )
-#define T15 /* 0xa679438e */ ( T_MASK ^ 0x5986bc71 )
-#define T16    0x49b40821
-#define T17 /* 0xf61e2562 */ ( T_MASK ^ 0x09e1da9d )
-#define T18 /* 0xc040b340 */ ( T_MASK ^ 0x3fbf4cbf )
-#define T19    0x265e5a51
-#define T20 /* 0xe9b6c7aa */ ( T_MASK ^ 0x16493855 )
-#define T21 /* 0xd62f105d */ ( T_MASK ^ 0x29d0efa2 )
-#define T22    0x02441453
-#define T23 /* 0xd8a1e681 */ ( T_MASK ^ 0x275e197e )
-#define T24 /* 0xe7d3fbc8 */ ( T_MASK ^ 0x182c0437 )
-#define T25    0x21e1cde6
-#define T26 /* 0xc33707d6 */ ( T_MASK ^ 0x3cc8f829 )
-#define T27 /* 0xf4d50d87 */ ( T_MASK ^ 0x0b2af278 )
-#define T28    0x455a14ed
-#define T29 /* 0xa9e3e905 */ ( T_MASK ^ 0x561c16fa )
-#define T30 /* 0xfcefa3f8 */ ( T_MASK ^ 0x03105c07 )
-#define T31    0x676f02d9
-#define T32 /* 0x8d2a4c8a */ ( T_MASK ^ 0x72d5b375 )
-#define T33 /* 0xfffa3942 */ ( T_MASK ^ 0x0005c6bd )
-#define T34 /* 0x8771f681 */ ( T_MASK ^ 0x788e097e )
-#define T35    0x6d9d6122
-#define T36 /* 0xfde5380c */ ( T_MASK ^ 0x021ac7f3 )
-#define T37 /* 0xa4beea44 */ ( T_MASK ^ 0x5b4115bb )
-#define T38    0x4bdecfa9
-#define T39 /* 0xf6bb4b60 */ ( T_MASK ^ 0x0944b49f )
-#define T40 /* 0xbebfbc70 */ ( T_MASK ^ 0x4140438f )
-#define T41    0x289b7ec6
-#define T42 /* 0xeaa127fa */ ( T_MASK ^ 0x155ed805 )
-#define T43 /* 0xd4ef3085 */ ( T_MASK ^ 0x2b10cf7a )
-#define T44    0x04881d05
-#define T45 /* 0xd9d4d039 */ ( T_MASK ^ 0x262b2fc6 )
-#define T46 /* 0xe6db99e5 */ ( T_MASK ^ 0x1924661a )
-#define T47    0x1fa27cf8
-#define T48 /* 0xc4ac5665 */ ( T_MASK ^ 0x3b53a99a )
-#define T49 /* 0xf4292244 */ ( T_MASK ^ 0x0bd6ddbb )
-#define T50    0x432aff97
-#define T51 /* 0xab9423a7 */ ( T_MASK ^ 0x546bdc58 )
-#define T52 /* 0xfc93a039 */ ( T_MASK ^ 0x036c5fc6 )
-#define T53    0x655b59c3
-#define T54 /* 0x8f0ccc92 */ ( T_MASK ^ 0x70f3336d )
-#define T55 /* 0xffeff47d */ ( T_MASK ^ 0x00100b82 )
-#define T56 /* 0x85845dd1 */ ( T_MASK ^ 0x7a7ba22e )
-#define T57    0x6fa87e4f
-#define T58 /* 0xfe2ce6e0 */ ( T_MASK ^ 0x01d3191f )
-#define T59 /* 0xa3014314 */ ( T_MASK ^ 0x5cfebceb )
-#define T60    0x4e0811a1
-#define T61 /* 0xf7537e82 */ ( T_MASK ^ 0x08ac817d )
-#define T62 /* 0xbd3af235 */ ( T_MASK ^ 0x42c50dca )
-#define T63    0x2ad7d2bb
-#define T64 /* 0xeb86d391 */ ( T_MASK ^ 0x14792c6e )
-
-static
-void MD5StateProcess ( MD5State *md5, const uint8_t *data /* [ 64 ] */ ) 
-{
-    uint32_t t;
-
-    uint32_t a = md5 -> abcd [ 0 ];
-    uint32_t b = md5 -> abcd [ 1 ];
-    uint32_t c = md5 -> abcd [ 2 ];
-    uint32_t d = md5 -> abcd [ 3 ];
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-
-    uint32_t xbuf [ 16 ];
-
-    /* assume proper alignment */
-    const uint32_t *X = ( const uint32_t* ) data;
-
-    /* check alignment */
-    if ( ( ( size_t ) X & 3 ) != 0 )
-    {
-        /* use buffer instead */
-        X = xbuf;
-        memcpy ( xbuf, data, 64 );
-    }
-
-#elif __BYTE_ORDER == __BIG_ENDIAN
-
-    int i;
-    uint32_t X [ 16 ];
-    if ( ( ( size_t ) data & 3 ) == 0 )
-    {
-        const uint32_t *xp = ( const uint32_t* ) data;
-        for ( i = 0; i < 16; ++ i )
-            X [ i ] = bswap_32 ( xp [ i ] );
-    }
-
-    else
-    {
-        const uint8_t *xp = data;
-        for ( i = 0; i < 16; xp += 4, ++ i ) 
-            X [ i ] = xp [ 0 ] + ( xp [ 1 ] << 8 ) + ( xp [ 2 ] << 16 ) + ( xp [ 3 ] << 24 );
-    }
-
-#else
-#error "only big or little endian is supported"
-#endif
-
-#define ROTATE_LEFT( x, n ) \
-    ( ( ( x ) << ( n ) ) | ( ( x ) >> ( 32 - ( n ) ) ) ) 
-
-    /* Round 1. */
-    /* Let  [ abcd k s i ] denote the operation
-       a = b + ( ( a + F ( b,c,d ) + X [ k ] + T [ i ] ) <<< s ) . */
-#define F( x, y, z ) \
-    ( ( ( x ) & ( y ) ) | ( ~ ( x ) & ( z ) ) ) 
-#define SET( a, b, c, d, k, s, Ti ) \
-    t = a + F ( b,c,d ) + X [ k ] + Ti;\
-    a = ROTATE_LEFT ( t, s ) + b
-
-    /* Do the following 16 operations. */
-    SET ( a, b, c, d,  0,  7,  T1 );
-    SET ( d, a, b, c,  1, 12,  T2 );
-    SET ( c, d, a, b,  2, 17,  T3 );
-    SET ( b, c, d, a,  3, 22,  T4 );
-    SET ( a, b, c, d,  4,  7,  T5 );
-    SET ( d, a, b, c,  5, 12,  T6 );
-    SET ( c, d, a, b,  6, 17,  T7 );
-    SET ( b, c, d, a,  7, 22,  T8 );
-    SET ( a, b, c, d,  8,  7,  T9 );
-    SET ( d, a, b, c,  9, 12, T10 );
-    SET ( c, d, a, b, 10, 17, T11 );
-    SET ( b, c, d, a, 11, 22, T12 );
-    SET ( a, b, c, d, 12,  7, T13 );
-    SET ( d, a, b, c, 13, 12, T14 );
-    SET ( c, d, a, b, 14, 17, T15 );
-    SET ( b, c, d, a, 15, 22, T16 );
-#undef SET
-#undef F
-
-    /* Round 2. */
-    /* Let  [ abcd k s i ] denote the operation
-       a = b + ( ( a + G ( b,c,d ) + X [ k ] + T [ i ] ) <<< s ) . */
-#define G( x, y, z ) \
-    ( ( ( x ) & ( z ) ) | ( ( y ) & ~ ( z ) ) ) 
-#define SET( a, b, c, d, k, s, Ti ) \
-    t = a + G ( b,c,d ) + X [ k ] + Ti;\
-    a = ROTATE_LEFT ( t, s ) + b
-
-    /* Do the following 16 operations. */
-    SET ( a, b, c, d,  1,  5, T17 );
-    SET ( d, a, b, c,  6,  9, T18 );
-    SET ( c, d, a, b, 11, 14, T19 );
-    SET ( b, c, d, a,  0, 20, T20 );
-    SET ( a, b, c, d,  5,  5, T21 );
-    SET ( d, a, b, c, 10,  9, T22 );
-    SET ( c, d, a, b, 15, 14, T23 );
-    SET ( b, c, d, a,  4, 20, T24 );
-    SET ( a, b, c, d,  9,  5, T25 );
-    SET ( d, a, b, c, 14,  9, T26 );
-    SET ( c, d, a, b,  3, 14, T27 );
-    SET ( b, c, d, a,  8, 20, T28 );
-    SET ( a, b, c, d, 13,  5, T29 );
-    SET ( d, a, b, c,  2,  9, T30 );
-    SET ( c, d, a, b,  7, 14, T31 );
-    SET ( b, c, d, a, 12, 20, T32 );
-#undef SET
-#undef G
-
-    /* Round 3. */
-    /* Let  [ abcd k s t ] denote the operation
-       a = b + ( ( a + H ( b,c,d ) + X [ k ] + T [ i ] ) <<< s ) . */
-#define H( x, y, z ) \
-    ( ( x ) ^ ( y ) ^ ( z ) ) 
-#define SET( a, b, c, d, k, s, Ti ) \
-    t = a + H ( b,c,d ) + X [ k ] + Ti;\
-    a = ROTATE_LEFT ( t, s ) + b
-    
-    /* Do the following 16 operations. */
-    SET ( a, b, c, d,  5,  4, T33 );
-    SET ( d, a, b, c,  8, 11, T34 );
-    SET ( c, d, a, b, 11, 16, T35 );
-    SET ( b, c, d, a, 14, 23, T36 );
-    SET ( a, b, c, d,  1,  4, T37 );
-    SET ( d, a, b, c,  4, 11, T38 );
-    SET ( c, d, a, b,  7, 16, T39 );
-    SET ( b, c, d, a, 10, 23, T40 );
-    SET ( a, b, c, d, 13,  4, T41 );
-    SET ( d, a, b, c,  0, 11, T42 );
-    SET ( c, d, a, b,  3, 16, T43 );
-    SET ( b, c, d, a,  6, 23, T44 );
-    SET ( a, b, c, d,  9,  4, T45 );
-    SET ( d, a, b, c, 12, 11, T46 );
-    SET ( c, d, a, b, 15, 16, T47 );
-    SET ( b, c, d, a,  2, 23, T48 );
-#undef SET
-#undef H
-
-    /* Round 4. */
-    /* Let  [ abcd k s t ] denote the operation
-       a = b + ( ( a + I ( b,c,d ) + X [ k ] + T [ i ] ) <<< s ) . */
-#define I( x, y, z )                            \
-    ( ( y ) ^ ( ( x ) | ~ ( z ) ) ) 
-#define SET( a, b, c, d, k, s, Ti ) \
-    t = a + I ( b,c,d ) + X [ k ] + Ti;\
-    a = ROTATE_LEFT ( t, s ) + b
-
-    /* Do the following 16 operations. */
-    SET ( a, b, c, d,  0,  6, T49 );
-    SET ( d, a, b, c,  7, 10, T50 );
-    SET ( c, d, a, b, 14, 15, T51 );
-    SET ( b, c, d, a,  5, 21, T52 );
-    SET ( a, b, c, d, 12,  6, T53 );
-    SET ( d, a, b, c,  3, 10, T54 );
-    SET ( c, d, a, b, 10, 15, T55 );
-    SET ( b, c, d, a,  1, 21, T56 );
-    SET ( a, b, c, d,  8,  6, T57 );
-    SET ( d, a, b, c, 15, 10, T58 );
-    SET ( c, d, a, b,  6, 15, T59 );
-    SET ( b, c, d, a, 13, 21, T60 );
-    SET ( a, b, c, d,  4,  6, T61 );
-    SET ( d, a, b, c, 11, 10, T62 );
-    SET ( c, d, a, b,  2, 15, T63 );
-    SET ( b, c, d, a,  9, 21, T64 );
-#undef SET
-#undef I
-
-    /* Then perform the following additions. ( That is increment each
-       of the four registers by the value it had before this block
-       was started. ) */
-    md5 -> abcd [ 0 ] += a;
-    md5 -> abcd [ 1 ] += b;
-    md5 -> abcd [ 2 ] += c;
-    md5 -> abcd [ 3 ] += d;
-}
-
-
-/* MD5StateAppend
- *  run MD5 on data block
- *  accumulate results into "md5"
- *  processes data in chunks
- */
-LIB_EXPORT void CC MD5StateAppend ( MD5State *md5, const void *data, size_t size  ) 
-{
-    if ( md5 != NULL && data != NULL && size > 0 )
-    {
-        const uint8_t *p = data;
-        size_t left = size;
-        size_t offset = ( md5 -> count [ 0 ] >> 3 ) & 63;
-        uint32_t nbits = ( uint32_t ) ( size << 3 );
-
-        /* update the message length. */
-        md5 -> count [ 1 ] += ( uint32_t ) size >> 29;
-        md5 -> count [ 0 ] += nbits;
-
-        /* detect roll-over */
-        if ( md5 -> count [ 0 ] < nbits ) 
-            ++ md5 -> count [ 1 ];
-
-        /* process an initial partial block. */
-        if ( offset )
-        {
-            /* bytes to copy from input data are from offset up to 64 */
-            size_t copy = ( offset + size > 64 ? 64 - offset : size );
-            memcpy ( md5 -> buf + offset, p, copy );
-
-            /* don't process a tiny partial block */
-            if ( offset + copy < 64 ) 
-                return;
-
-            /* trim off initial bytes */
-            p += copy;
-            left -= copy;
-
-            /* process full state buffer */
-            MD5StateProcess ( md5, md5 -> buf );
-        }
-
-        /* continue processing blocks directly from input */
-        for ( ; left >= 64; p += 64, left -= 64 ) 
-            MD5StateProcess ( md5, p );
-
-        /* buffer any remainder */
-        if ( left ) 
-            memcpy ( md5 -> buf, p, left );
-    }
-}
-
-/* MD5StateFinish
- *  processes any remaining data in "md5"
- *  returns 16 bytes of digest
- */
-LIB_EXPORT void CC MD5StateFinish ( MD5State *md5, uint8_t digest  [ 16 ] ) 
-{
-    if ( md5 != NULL )
-    {
-        int i;
-        uint8_t data [ 8 ];
-        static const uint8_t pad [ 64 ] = {
-            0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-        };
-
-        /* save the length before padding in little-endian order */
-        for ( i = 0; i < 8; ++ i ) 
-            data [ i ] = ( uint8_t ) ( md5 -> count [ i >> 2 ] >> ( ( i & 3 ) << 3 ) );
-
-        /* Pad to 56 bytes mod 64. */
-        MD5StateAppend ( md5, pad, ( ( 55 - ( md5 -> count [ 0 ] >> 3 ) ) & 63 ) + 1 );
-
-        /* Append the length. */
-        MD5StateAppend ( md5, data, 8 );
-
-        /* create digest */
-        for ( i = 0; i < 16; ++ i ) 
-            digest [ i ] = ( uint8_t ) ( md5 -> abcd [ i >> 2 ] >> ( ( i & 3 ) << 3 ) );
-    }
-}
diff --git a/libs/klib/namelist.c b/libs/klib/namelist.c
deleted file mode 100644
index 4806d4c..0000000
--- a/libs/klib/namelist.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/rc.h>
-#include <klib/impl.h>
-#include <sysalloc.h>
-
-#define KNAMELIST_LATEST 1
-
-/*--------------------------------------------------------------------------
- * KNamelist
- *  a simple array of entry names
- */
-
-/* AddRef
- *  creates a new reference
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KNamelistAddRef ( const KNamelist *self )
-{
-    if ( self != NULL )
-        atomic_inc ( & ( ( KNamelist* ) self ) -> refcount );
-    return 0;
-}
-
-/* Release
- *  discard reference to list
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KNamelistRelease ( const KNamelist *cself )
-{
-    KNamelist *self = ( KNamelist* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic_dec_and_test ( & self -> refcount ) )
-        {
-            rc_t status;
-            switch ( self -> vt -> v1 . maj )
-            {
-            case 1:
-                status = ( * self -> vt -> v1 . destroy ) ( self );
-                break;
-            default:
-                status = RC ( rcCont, rcNamelist, rcReleasing, rcInterface, rcBadVersion );
-            }
-
-            if ( status != 0 )
-                atomic_set ( & self -> refcount, 1 );
-
-            return status;
-        }
-    }
-    return 0;
-}
-
-/* Count
- *  returns the number of entries
- *
- *  "count" [ OUT ] - return parameter for entry count
- */
-LIB_EXPORT rc_t CC KNamelistCount ( const KNamelist *self, uint32_t *count )
-{
-    if ( count == NULL )
-        return RC ( rcCont, rcNamelist, rcAccessing, rcParam, rcNull );
-
-    * count = 0;
-
-    if ( self == NULL )
-        return RC ( rcCont, rcNamelist, rcAccessing, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . count ) ( self, count );
-    }
-
-    return RC ( rcCont, rcNamelist, rcAccessing, rcInterface, rcBadVersion );
-}
-
-/* Get
- *  get an indexed name
- *
- *  "idx" [ IN ] - a zero-based name index
- *
- *  "name" [ OUT ] - return parameter for NUL terminated name
- */
-LIB_EXPORT rc_t CC KNamelistGet ( const KNamelist *self,
-    uint32_t idx, const char **name )
-{
-    if ( name == NULL )
-        return RC ( rcCont, rcNamelist, rcAccessing, rcParam, rcNull );
-
-    * name = NULL;
-
-    if ( self == NULL )
-        return RC ( rcCont, rcNamelist, rcAccessing, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . get ) ( self, idx, name );
-    }
-
-    return RC ( rcCont, rcNamelist, rcAccessing, rcInterface, rcBadVersion );
-}
-
-/* Init
- *  polymorphic parent constructor
- */
-LIB_EXPORT rc_t CC KNamelistInit ( KNamelist *self, const KNamelist_vt *vt )
-{
-    if ( self == NULL || vt == NULL )
-        return RC ( rcCont, rcNamelist, rcConstructing, rcSelf, rcNull );
-
-    if ( vt -> v1 . maj == 0 )
-        return RC ( rcCont, rcNamelist, rcConstructing, rcInterface, rcInvalid );
-
-    if ( vt -> v1 . maj > KNAMELIST_LATEST )
-        return RC ( rcCont, rcNamelist, rcConstructing, rcInterface, rcBadVersion );
-
-    self -> vt = vt;
-    atomic_set ( & self -> refcount, 1 );
-
-    return 0;
-}
diff --git a/libs/klib/ncbi-vdb-version.c b/libs/klib/ncbi-vdb-version.c
deleted file mode 100644
index 3c19aa5..0000000
--- a/libs/klib/ncbi-vdb-version.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-
-#include <klib/ncbi-vdb-version.h> /* GetPackageVersion */
-#include <klib/sra-release-version.h> /* SraReleaseVersion */
-
-#include <string.h> /* memset */
-
-
-LIB_EXPORT const char *GetPackageVersion(void) {
-    static char buffer[512] = "";
-
-    SraReleaseVersion version;
-    memset(&version, 0, sizeof version);
-
-    SraReleaseVersionGet(&version);
-
-    SraReleaseVersionPrint(&version, buffer, sizeof buffer, NULL);
-
-    return buffer;
-}
diff --git a/libs/klib/num-gen.c b/libs/klib/num-gen.c
deleted file mode 100644
index a8d089b..0000000
--- a/libs/klib/num-gen.c
+++ /dev/null
@@ -1,1157 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/rc.h>
-#include <klib/printf.h>
-#include <klib/text.h>
-#include <klib/vector.h>
-#include <klib/num-gen.h>
-#include <sysalloc.h>
-
-#include <strtol.h>
-#include <stdlib.h>
-#include <string.h>
-
-
-typedef struct num_gen_node
-{
-    int64_t start;
-    uint64_t count; /* 0 ... skip, > 0 ... valid */
-} num_gen_node;
-
-
-/* **************************************************************************
-{ start:5,count: 0 } ---> [ ]
-{ start:5,count: 1 } ---> [ 5 ]
-{ start:5,count: 2 } ---> [ 5, 6 ]
- ************************************************************************** */
-
-struct num_gen
-{
-    Vector nodes;
-    bool sorted;
-};
-
-
-struct num_gen_iter
-{
-    Vector nodes;
-    uint32_t curr_node;
-    uint64_t curr_node_sub_pos;
-    uint64_t total;
-    uint64_t progress;
-    int64_t min_value;
-    int64_t max_value;
-};
-
-/* forward decl. for fixing-function */
-static rc_t num_gen_fix_overlaps( struct num_gen * self, uint32_t * count );
-
-
-/* helper function to destroy a node*/
-static void CC num_gen_node_destroy( void *item, void *data )
-{
-    free( item );
-}
-
-
-/* helper function to create a node from start/count */
-static struct num_gen_node * num_gen_make_node( const int64_t start, const uint64_t count )
-{
-    num_gen_node * p = malloc( sizeof( * p ) );
-    if ( p != NULL )
-    {
-        p -> start = start;
-        p -> count = count;
-    }
-    return p;
-}
-
-
-/* helper callback to compare 2 nodes, lets VectorInsert create a sorted vector */
-static int64_t CC num_gen_insert_helper( const void* item1, const void* item2 )
-{
-    int64_t res = 0;
-    const num_gen_node * node1 = item1;
-    const num_gen_node * node2 = item2;
-    if ( node1 != NULL && node2 != NULL )
-    {
-        if ( node1 -> start < node2 -> start )
-            res = -1;
-        else if ( node1 -> start > node2 -> start )
-            res = 1;
-        else if ( node1 -> count < node2 -> count )
-            res = -1;
-        else if ( node1 -> count > node2 -> count )
-            res = 1;
-    }
-    return res;
-}
-
-
-/* helper callback to create a deep and conditional copy of a node-vector */
-static void CC num_gen_copy_cb_sorted( void *item, void *data )
-{
-    num_gen_node * node = item;
-    if ( node != NULL && node -> count > 0 )
-    {
-        num_gen_node * new_node = num_gen_make_node( node->start, node->count );
-        if ( new_node != NULL )
-        {
-            Vector * dst = data;
-            if ( dst != NULL )
-                VectorInsert( dst, new_node, NULL, num_gen_insert_helper );
-        }
-    }
-}
-
-static void CC num_gen_copy_cb_unsorted( void *item, void *data )
-{
-    num_gen_node * node = item;
-    if ( node != NULL && node -> count > 0 )
-    {
-        num_gen_node * new_node = num_gen_make_node( node->start, node->count );
-        if ( new_node != NULL )
-        {
-            Vector * dst = data;
-            if ( dst != NULL )
-                VectorAppend( dst, NULL, new_node );
-        }
-    }
-}
-
-
-/* helper function that creates a deep and conditional copy of a node-vector */
-static void num_gen_copy_vector( const Vector * src, Vector * dst, bool sorted )
-{
-    if ( src != NULL && dst != NULL )
-    {
-        if ( sorted )
-            VectorForEach ( src, false, num_gen_copy_cb_sorted, dst );
-        else
-            VectorForEach ( src, false, num_gen_copy_cb_unsorted, dst );
-    }
-}
-
-
-/* helper callback to add up all count values in the vector*/
-static void CC num_gen_total_count_cb( void *item, void *data )
-{
-    num_gen_node * node = item;
-    if ( node != NULL )
-    {
-        uint64_t * total = ( uint64_t *)data;
-        if ( total != NULL )
-            *total += node -> count;
-    }
-}
-
-
-/* helper function that adds up all count values in the vector*/
-static uint64_t num_gen_total_count( const Vector * src )
-{
-    uint64_t res = 0;
-    if ( src != NULL )
-        VectorForEach ( src, false, num_gen_total_count_cb, &res );
-    return res;
-}
-
-
-/* helper function for the parse-function */
-static rc_t num_gen_add_node( struct num_gen * self, const int64_t from, const int64_t to )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcInserting, rcSelf, rcNull );
-    else
-    {
-        num_gen_node * node;
-        if ( from < to )
-            node = num_gen_make_node( from, ( to - from ) + 1 );
-        else
-            node = num_gen_make_node( to, ( from - to ) + 1 );
-
-        if ( node == NULL )
-            rc = RC( rcVDB, rcNoTarg, rcInserting, rcMemory, rcExhausted );
-        else
-        {
-            if ( self->sorted )
-                rc = VectorInsert( &( self -> nodes ), node, NULL, num_gen_insert_helper );
-            else
-                rc = VectorAppend( &( self -> nodes ), NULL, node );
-        }
-    }
-    return rc;
-}
-
-
-#define MAX_NUM_STR 12
-/* helper-structure for num_gen_parse() */
-typedef struct num_gen_parse_ctx
-{
-    uint32_t num_str_idx;
-    bool this_is_the_first_number;
-    int64_t num1;
-    int64_t num2;
-    char num_str[ MAX_NUM_STR + 1 ];
-} num_gen_parse_ctx;
-
-
-/* helper for num_gen_parse() */
-static void num_gen_convert_ctx( num_gen_parse_ctx * parse_ctx )
-{
-    if ( parse_ctx != NULL )
-    {
-        char * endp;
-        
-        parse_ctx -> num_str[ parse_ctx -> num_str_idx ] = 0;
-        parse_ctx -> num1 = strtoi64( parse_ctx -> num_str, &endp, 10 );
-        parse_ctx -> this_is_the_first_number = false;
-        parse_ctx -> num_str_idx = 0;
-    }
-}
-
-
-/* helper for num_gen_parse() */
-static rc_t num_gen_convert_and_add_ctx( struct num_gen * self, num_gen_parse_ctx * parse_ctx )
-{
-    rc_t rc;
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcInserting, rcSelf, rcNull );
-    else if ( parse_ctx == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcNull );
-    else if ( parse_ctx -> num_str_idx == 0 )
-        rc = RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcEmpty );
-    else
-    {
-        char *endp;
-
-        /* terminate the source-string */
-        parse_ctx -> num_str[ parse_ctx -> num_str_idx ] = 0;
-
-        /* convert the string into a uint64_t */
-        if ( parse_ctx -> this_is_the_first_number )
-        {
-            parse_ctx -> num1 = strtoi64( parse_ctx -> num_str, &endp, 10 );
-            parse_ctx -> num2 = parse_ctx -> num1;
-        }
-        else
-        {
-            parse_ctx -> num2 = strtoi64( parse_ctx -> num_str, &endp, 10 );
-        }
-
-        /* empty the source-string to be reused */
-        parse_ctx -> num_str_idx = 0;
-        
-        parse_ctx -> this_is_the_first_number = true;
-        rc = num_gen_add_node( self, parse_ctx -> num1, parse_ctx -> num2 );
-    }
-    return rc;
-}
-
-
-static rc_t num_gen_parse_len( struct num_gen * self, const char * src, size_t len )
-{
-    rc_t rc = 0;
-
-    if ( len == 0 )
-        rc = RC( rcVDB, rcNoTarg, rcParsing, rcParam, rcEmpty );
-    else
-    {
-        size_t i;
-        num_gen_parse_ctx parse_ctx;
-
-        parse_ctx . num_str_idx = 0;
-        parse_ctx . this_is_the_first_number = true;
-
-        for ( i = 0; i < len && rc == 0; ++i )
-        {
-            switch ( src[ i ] )
-            {
-            /* a dash switches from N1-mode into N2-mode */
-            case '-' :
-                num_gen_convert_ctx( &parse_ctx );
-                break;
-
-            /* a comma ends a single number or a range */
-            case ',' :
-                rc = num_gen_convert_and_add_ctx( self, &parse_ctx );
-                break;
-
-            /* in both mode add the char to the temp string */
-            default:
-                if ( ( src[ i ] >= '0' ) && ( src[ i ] <= '9' )&&
-                     ( parse_ctx . num_str_idx < MAX_NUM_STR ) )
-                    parse_ctx . num_str[ parse_ctx . num_str_idx ++ ] = src[ i ];
-                break;
-            }
-        }
-
-        /* dont forget to add what is left in ctx.num_str ... */
-        if ( parse_ctx . num_str_idx > 0 )
-            rc = num_gen_convert_and_add_ctx( self, &parse_ctx );
-
-        if ( rc == 0 && self->sorted )
-            rc = num_gen_fix_overlaps( self, NULL );
-    }
-    return rc;
-}
-
-
-/* parse the given string and insert the found ranges 
-   into the number-generator, fixes eventual overlaps */
-LIB_EXPORT rc_t CC num_gen_parse( struct num_gen * self, const char * src )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcParsing, rcSelf, rcNull );
-    else if ( src == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcParsing, rcParam, rcNull );
-    else if ( src[ 0 ] == 0 )
-        rc = RC( rcVDB, rcNoTarg, rcParsing, rcParam, rcEmpty );
-    else
-        rc = num_gen_parse_len( self, src, string_measure ( src, NULL ) );
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_parse_S( struct num_gen * self, const String * src )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcParsing, rcSelf, rcNull );
-    else if ( src == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcParsing, rcParam, rcNull );
-    else if ( src->len == 0 )
-        rc = RC( rcVDB, rcNoTarg, rcParsing, rcParam, rcEmpty );
-    else
-        rc = num_gen_parse_len( self, src->addr, src->len );
-
-    return rc;
-}
-
-
-/* inserts the given ranges into the number-generator,
-   fixes eventual overlaps */
-LIB_EXPORT rc_t CC num_gen_add( struct num_gen * self, const int64_t first, const uint64_t count )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcInserting, rcSelf, rcNull );
-    if ( count == 0 )
-        rc = RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcEmpty );
-    else
-    {
-        rc = num_gen_add_node( self, first, ( first + count ) - 1 );
-        if ( rc == 0 && self->sorted )
-            rc = num_gen_fix_overlaps( self, NULL );
-    }
-    return rc;
-}
-
-
-/* helper function for range-check */
-static bool CC num_gen_check_range_start( num_gen_node * node, const int64_t range_start )
-{
-    bool res = ( node != NULL );
-    if ( res )
-    {
-        int64_t last = ( node -> start + node -> count ) - 1;
-        
-        if ( node -> start < range_start )
-        {
-            node -> start = range_start;
-            if ( node -> start <= last )
-                node -> count = ( last - ( node -> start ) ) + 1;
-            else
-            {
-                /* the node becomes invalid ... */
-                node -> start = 0;
-                node -> count = 0;
-                res = false;
-            }
-        }
-    }
-    return res;
-}
-
-
-/* helper function for range-check */
-static void CC num_gen_check_range_end( num_gen_node * node, const int64_t last )
-{
-    if ( node != NULL )
-    {
-        int64_t node_last = ( node -> start + node -> count ) - 1;
-
-        if ( node_last > last )
-        {
-            node_last = last;
-            if ( node -> start <= node_last )
-            {
-                node->count = ( node_last - ( node -> start ) ) + 1;
-            }
-            else
-            {
-                /* the node becomes invalid ... */
-                node -> start = 0;
-                node -> count = 0;
-            }
-        }
-    }
-}
-
-
-/* helper function for range-check */
-static void CC num_gen_check_range_callback( void * item, void * data )
-{
-    num_gen_node * node   = item;
-    num_gen_node * range  = data;
-
-    if ( node != NULL && range != NULL )
-    {
-        /* ignore invalid nodes... */
-        if ( node -> start != 0 && node -> count != 0 )
-        {
-            /* check if the start value is not out of range... */
-            if ( num_gen_check_range_start( node, range -> start ) )
-            {
-                uint64_t last = ( ( range -> start ) + ( range -> count ) ) - 1;
-                num_gen_check_range_end( node, last );
-            }
-        }
-    }
-}
-
-
-/* helper function for range-check */
-static void CC num_gen_count_invalid_nodes( void * item, void * data )
-{
-    num_gen_node * node = item;
-    
-    if ( ( node != NULL ) && ( node -> start == 0 ) && ( node -> count == 0 ) )
-    {
-        uint32_t * invalid_count = data;
-        if ( invalid_count != NULL )
-        {
-            ( *invalid_count )++;
-        }
-    }
-}
-
-
-/* helper function for range-check */
-static void CC num_gen_copy_valid_nodes( void * item, void * data )
-{
-    num_gen_node * node = item;
-
-    if ( node != NULL )
-    {
-        if ( ( node -> start != 0 )&&( node -> count != 0 ) )
-        {
-            Vector * dest = data;
-            if ( dest != NULL )
-                VectorInsert ( dest, node, NULL, num_gen_insert_helper );
-        }
-        else
-            free ( node );
-    }
-}
-
-
-/* helper function for range-check */
-static void num_gen_remove_invalid_nodes( struct num_gen * self )
-{
-    if ( self != NULL )
-    {
-        uint32_t count = VectorLength( &( self -> nodes ) );
-        if ( count > 0 )
-        {
-            Vector temp_nodes;
-            /* create a temp. vector */
-            VectorInit( &temp_nodes, 0, count );
-
-            /* copy all valid nodes into the temp. vector */
-            VectorForEach ( &( self -> nodes ), false,
-                            num_gen_copy_valid_nodes, &temp_nodes );
-
-            /* clear all nodes so far...,
-               DO NOT PASS num_gen_node_destroy into it */
-            VectorWhack( &( self -> nodes ), NULL, NULL );
-
-            /* initialize and copy (shallow) the valid nodes back
-               into the generator */
-            VectorCopy ( &temp_nodes, &( self -> nodes ) );
-
-            /* destroy the temp-vector,
-               DO NOT PASS num_gen_node_destroy into it */
-            VectorWhack ( &temp_nodes, NULL, NULL );
-        }
-    }
-}
-
-
-/* helper function for trim */
-LIB_EXPORT rc_t CC num_gen_trim( struct num_gen * self, const int64_t first, const uint64_t count )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcValidating, rcSelf, rcNull );
-    else
-    {
-        num_gen_node trim_range;
-        uint32_t invalid_nodes = 0;
-
-        /* walk all nodes to check for boundaries... */
-        trim_range.start = first;
-        trim_range.count = count;
-
-        VectorForEach ( &( self -> nodes), false,
-                        num_gen_check_range_callback, &trim_range );
-
-        VectorForEach ( &( self -> nodes ), false,
-                        num_gen_count_invalid_nodes, &invalid_nodes );
-
-        if ( invalid_nodes > 0 )
-            num_gen_remove_invalid_nodes( self );
-    }
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_make( struct num_gen ** self )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcSelf, rcNull );
-    else
-    {
-        struct num_gen * ng = calloc( 1, sizeof( * ng ) );
-        if ( ng == NULL )
-            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            VectorInit( &( ng -> nodes ), 0, 5 );
-            ng->sorted = false;
-            *self = ng;
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_make_sorted( struct num_gen ** self, bool sorted )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcSelf, rcNull );
-    else
-    {
-        struct num_gen * ng = calloc( 1, sizeof( * ng ) );
-        if ( ng == NULL )
-            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            VectorInit( &( ng -> nodes ), 0, 5 );
-            ng->sorted = sorted;
-            *self = ng;
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_make_from_str( struct num_gen ** self, const char * src )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcSelf, rcNull );
-    else if ( src == NULL || src[ 0 ] == 0 )
-    {
-        *self = NULL;
-        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcSelf, rcNull );
-    }
-    else
-    {
-        struct num_gen * temp;
-        rc = num_gen_make( &temp );
-        if ( rc == 0 )
-        {
-            rc = num_gen_parse( temp, src );
-        }
-        if ( rc == 0 )
-            *self = temp;
-        else
-        {
-            *self = NULL;
-            num_gen_destroy( temp );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_make_from_str_sorted( struct num_gen ** self, const char * src, bool sorted )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcSelf, rcNull );
-    else if ( src == NULL || src[ 0 ] == 0 )
-    {
-        *self = NULL;
-        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcSelf, rcNull );
-    }
-    else
-    {
-        struct num_gen * temp;
-        rc = num_gen_make_sorted( &temp, sorted );
-        if ( rc == 0 )
-        {
-            rc = num_gen_parse( temp, src );
-        }
-        if ( rc == 0 )
-            *self = temp;
-        else
-        {
-            *self = NULL;
-            num_gen_destroy( temp );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC num_gen_make_from_range( struct num_gen ** self, int64_t first, uint64_t count )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcSelf, rcNull );
-    else if ( count == 0 )
-    {
-        *self = NULL;
-        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcEmpty );
-    }
-    else
-    {
-        struct num_gen * temp;
-        rc = num_gen_make( &temp );
-        if ( rc == 0 )
-            rc = num_gen_add( temp, first, count );
-        if ( rc == 0 )
-            *self = temp;
-        else
-        {
-            *self = NULL;
-            num_gen_destroy( temp );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_clear( struct num_gen * self )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcClearing, rcSelf, rcNull );
-    else if ( VectorLength( &( self -> nodes ) ) > 0 )
-    {
-        /* clear all nodes so far... */
-        VectorWhack( &( self -> nodes ), num_gen_node_destroy, NULL );
-
-        /* re-init the vector */
-        VectorInit( &( self->nodes ), 0, 5 );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_destroy( struct num_gen * self )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcDestroying, rcSelf, rcNull );
-    else
-    {
-        VectorWhack( &( self -> nodes ), num_gen_node_destroy, NULL );
-        free( self );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT bool CC num_gen_empty( const struct num_gen * self )
-{
-    bool res = ( self != NULL );
-    if ( res )
-        res = ( VectorLength( &( self -> nodes ) ) < 1 );
-    return res;
-}
-
-
-typedef struct overlap_ctx
-{
-    num_gen_node * prev;
-    uint32_t overlaps;
-} overlap_ctx;
-
-
-/* static bool CC num_gen_overlap_fix_cb( void *item, void *data ) */
-static bool CC num_gen_overlap_fix_cb( void *item, void *data )
-{
-    bool res = false;
-    num_gen_node * node = item;
-    if ( node != NULL )
-    {
-        /* skip invalid nodes */
-        if ( node -> count > 0 && node -> start > 0 )
-        {
-            overlap_ctx * ov_ctx = data;
-            if ( ov_ctx != NULL )
-            {
-                /* if we do not have a previous node, take this one... */
-                if ( ov_ctx -> prev == NULL )
-                {
-                    ov_ctx -> prev = node;
-                }
-                else
-                {
-                    int64_t prev_last = ( ov_ctx -> prev -> start + ov_ctx -> prev -> count ) - 1;
-
-                    /* if we do not have an overlap, take this node as prev-node and continue */
-                    if ( prev_last < node -> start )
-                    {
-                        ov_ctx -> prev = node;
-                    }
-                    else
-                    {
-                        /* we have a overlap, the end of the prev-node is inside
-                           the current-node, we fix it by expanding the prev-node
-                           to the end of this node, and later declaring this
-                           node as invalid */
-                        int64_t this_last = ( node -> start + node -> count ) - 1;
-                        if ( prev_last < this_last )
-                        {
-                            ov_ctx -> prev -> count = ( prev_last - ( ov_ctx -> prev -> start ) ) + 1;
-                        }
-                        else
-                        {
-                            /* if the prev-node ends after this node, all we have to
-                               do is declaring this node as invalid */
-                            node->count = 0;
-                            node->start = 0;
-                        }
-                        res = true;
-                    }
-                }
-            }
-        }
-    }
-    return res;
-}
-
-
-static rc_t num_gen_fix_overlaps( struct num_gen * self, uint32_t * count )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
-    else
-    {
-        overlap_ctx ov_ctx;
-        bool fix_executed = false;
-        
-        ov_ctx . overlaps = 0;
-        do
-        {
-            ov_ctx . prev = NULL;
-            fix_executed = VectorDoUntil ( &( self -> nodes ), false,
-                                           num_gen_overlap_fix_cb, &ov_ctx );
-        } while ( fix_executed );
-
-        if ( count )
-            *count = ov_ctx . overlaps;
-    }
-    return rc;
-}
-
-
-typedef struct string_ctx
-{
-    char * buffer;
-    size_t buffsize, written;
-} string_ctx;
-
-
-static void CC num_gen_as_string_cb( void * item, void * data )
-{
-    num_gen_node * node = item;
-    if ( node != NULL )
-    {
-        string_ctx * str_ctx = data;
-        if ( str_ctx != NULL && node -> count > 0 )
-        {
-            size_t bsize = str_ctx -> buffsize - str_ctx -> written;
-            if ( bsize > 0 )
-            {
-                rc_t rc;
-                char * buf = str_ctx -> buffer + str_ctx -> written;
-                size_t written;
-                if ( node -> count == 1 )
-                {
-                    rc = string_printf ( buf, bsize, &written, "%ld,", node -> start );
-                }
-                else
-                {
-                    uint64_t last = ( ( node -> start ) + ( node -> count ) ) - 1;
-                    rc = string_printf ( buf, bsize, &written, "%ld-%ld,", node -> start, last );
-                }
-                if ( rc == 0 )
-                    str_ctx -> written += written;
-            }
-        }
-    }
-}
-
-
-static void CC num_gen_as_string_full_info_cb( void * item, void * data )
-{
-    num_gen_node * node = item;
-    if ( node != NULL )
-    {
-        string_ctx * str_ctx = data;
-        if ( str_ctx != NULL )
-        {
-            size_t bsize = str_ctx -> buffsize - str_ctx -> written;
-            char * buf = str_ctx -> buffer + str_ctx -> written;
-            size_t written;
-            rc_t rc = string_printf ( buf, bsize, &written, "[s:%lu c:%lu]", node -> start, node -> count );
-            if ( rc == 0 )
-                str_ctx -> written += written;
-        }
-    }
-}
-
-
-LIB_EXPORT rc_t CC num_gen_as_string( const struct num_gen * self, char * buffer, size_t buffsize, size_t * written, bool full_info )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
-    else if ( buffer == NULL || buffsize == 0 )
-        rc = RC( rcVDB, rcNoTarg, rcReading, rcParam, rcNull );
-    else
-    {
-        string_ctx str_ctx;
-    
-        str_ctx . buffer = buffer;
-        str_ctx . buffsize = buffsize;
-        str_ctx . written = 0;
-
-        if ( full_info )
-            VectorForEach ( &( self -> nodes ), false, num_gen_as_string_full_info_cb, &str_ctx );
-        else
-            VectorForEach ( &( self -> nodes ), false, num_gen_as_string_cb, &str_ctx );
-
-        if ( written != NULL )
-            *written = str_ctx . written;
-    }
-    return rc;
-}
-
-
-static bool CC num_gen_contains_cb( void * item, void * data )
-{
-    bool res = false;
-    num_gen_node * node = item;
-    if ( node != NULL && node->count > 0 )
-    {
-        int64_t * value = data;
-        if ( value != NULL )
-        {
-            int64_t end = ( node -> start + node -> count ) - 1;
-            res = ( node -> start <= *value && *value <= end );
-        }
-    }
-    return res;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_contains_value( const struct num_gen * self, const int64_t value )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
-    else
-    {
-        int64_t temp = value;
-        if ( !VectorDoUntil ( &( self -> nodes ), false, num_gen_contains_cb, &temp ) )
-            rc = RC( rcVDB, rcNoTarg, rcReading, rcData, rcEmpty );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_range_check( struct num_gen * self, const int64_t first, const uint64_t count )
-{
-    rc_t rc;
-    /* if the user did not specify a range, take all */
-    if ( num_gen_empty( self ) )
-        rc = num_gen_add( self, first, count );
-    /* if the user did specify a range, check the boundaries */
-    else
-        rc = num_gen_trim( self, first, count );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_copy( const struct num_gen * self, struct num_gen ** dest )
-{
-    rc_t rc = num_gen_make( dest );
-    if ( rc == 0 )
-    {
-        num_gen_copy_vector( &( self -> nodes ), &( ( *dest ) -> nodes ), self->sorted );
-    }
-    return rc;
-}
-
-
-static int64_t min_vector_value( Vector * v )
-{
-    int64_t res = 0;
-    num_gen_node * node = VectorGet( v, 0 );
-    if ( node != NULL )
-        res = node -> start;
-    return res;
-}
-
-
-static int64_t max_vector_value( Vector * v )
-{
-    int64_t res = 0;
-    uint32_t count = VectorLength( v );
-    if ( count > 0 )
-    {
-        num_gen_node * node = VectorGet( v, count - 1 );
-        if ( node != NULL )
-            res = ( node -> start + node -> count ) - 1;
-    }
-    return res;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_iterator_make( const struct num_gen * self, const struct num_gen_iter ** iter )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
-    else if ( iter == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcReading, rcParam, rcNull );
-    else
-    {
-        struct num_gen_iter * temp = calloc( 1, sizeof( * temp ) );
-        *iter = NULL;
-        if ( temp == NULL )
-            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            uint32_t count = VectorLength( &( self -> nodes ) );
-            if ( count == 0 )
-            {
-                VectorInit( &( temp -> nodes ), 0, 5 );
-                /* everything else is set to zero, because of calloc() above */
-            }
-            else
-            {
-                VectorInit( &( temp -> nodes ), 0, count );
-                num_gen_copy_vector( &( self -> nodes ), &( temp -> nodes ), self->sorted );
-                temp -> total = num_gen_total_count( &( temp -> nodes ) );
-                temp -> min_value = min_vector_value( &( temp -> nodes ) );
-                temp -> max_value = max_vector_value( &( temp -> nodes ) );
-            }
-            *iter = temp;
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_iterator_destroy( const struct num_gen_iter *self )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcDestroying, rcSelf, rcNull );
-    else
-    {
-        struct num_gen_iter * temp = ( struct num_gen_iter * )self;
-        VectorWhack( &( temp -> nodes ), num_gen_node_destroy, NULL );
-        free( temp );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT bool CC num_gen_iterator_next( const struct num_gen_iter * self, int64_t * value, rc_t * rc )
-{
-    bool res = false;
-    if ( self == NULL )
-    {
-        if ( rc != NULL )
-            *rc = RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
-    }
-    else if ( value == NULL )
-    {
-        if ( rc != NULL )
-            *rc = RC( rcVDB, rcNoTarg, rcReading, rcParam, rcNull );
-    }
-    else if ( self -> curr_node < VectorLength( &( self -> nodes ) ) )
-    {
-        *value = 0;
-        {
-            struct num_gen_iter * temp = ( struct num_gen_iter * )self;
-            num_gen_node * node = VectorGet( &( temp -> nodes ), temp -> curr_node );
-            if ( node == NULL )
-            {
-                if ( rc != NULL )
-                    *rc = RC( rcVDB, rcNoTarg, rcReading, rcItem, rcInvalid );
-            }
-            else
-            {
-                if ( node -> count < 2 )
-                {
-                    /* the node is a single-number-node, next node for next time */
-                    *value = node -> start;
-                    ( temp -> curr_node )++;
-                }
-                else
-                {
-                    /* the node is a number range, add the sub-position */
-                    *value = node -> start + temp -> curr_node_sub_pos;
-                    ( temp -> curr_node_sub_pos )++;
-                    /* if the sub-positions are used up, switch to next node */
-                    if ( temp -> curr_node_sub_pos >= node -> count )
-                    {
-                        ( temp -> curr_node )++;
-                        temp -> curr_node_sub_pos = 0;
-                    }
-                }
-                ( temp -> progress )++;
-                res = true;
-            }
-        }
-    }
-    return res;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_iterator_count( const struct num_gen_iter * self, uint64_t * count )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
-    else if ( count == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcReading, rcParam, rcNull );
-    else
-        *count = self -> total;
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_iterator_min( const struct num_gen_iter * self, int64_t * value )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
-    else if ( value == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcReading, rcParam, rcNull );
-    else
-        *value = self -> min_value;
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_iterator_max( const struct num_gen_iter * self, int64_t * value )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
-    else if ( value == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcReading, rcParam, rcNull );
-    else
-        *value = self -> max_value;
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC num_gen_iterator_percent( const struct num_gen_iter * self, uint8_t fract_digits, uint32_t * value )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
-    else if ( value == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcReading, rcParam, rcNull );
-    else
-    {
-        uint32_t factor = 100;
-        if ( fract_digits > 0 )
-        {
-            if ( fract_digits > 1 )
-                factor = 10000;
-            else
-                factor = 1000;
-        }
-            
-        if ( self -> total > 0 )
-        {
-            if ( self -> progress >= self -> total )
-                *value = factor;
-            else
-            {
-                uint64_t temp = self -> progress;
-                temp *= factor;
-                temp /= self -> total;
-                *value = ( uint16_t ) temp;
-            }
-        }
-        else
-            *value = 0;
-    }
-    return rc;
-}
diff --git a/libs/klib/out.c b/libs/klib/out.c
deleted file mode 100644
index 83c913d..0000000
--- a/libs/klib/out.c
+++ /dev/null
@@ -1,208 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*/
-
-#include <klib/extern.h>
-#include <klib/out.h>
-#include "writer-priv.h"
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <sysalloc.h>
-
-#include <stdarg.h>
-#include <string.h>
-
-LIB_EXPORT KWrtHandler G_out_handler;
-
-LIB_EXPORT rc_t CC KOutInit ( void )
-{
-    return KOutHandlerSetStdOut ();
-}
-
-static
-rc_t KOutMsgNulTermStringFmt ( const char * arg )
-{
-    size_t num_writ;
-    KWrtHandler * kout_msg_handler = KOutHandlerGet ();
-    return ( * kout_msg_handler -> writer ) ( kout_msg_handler -> data, arg, string_size ( arg ), & num_writ );        
-}
-
-static
-rc_t KOutMsgPrecNulTermStringFmt ( va_list args )
-{
-    unsigned int arg1 = va_arg ( args, unsigned int );
-    const char* arg2 = va_arg ( args, const char* );
-
-    size_t num_writ;
-    KWrtHandler * kout_msg_handler = KOutHandlerGet ();
-    return ( * kout_msg_handler -> writer ) ( kout_msg_handler -> data, arg2, arg1, & num_writ );        
-}
-
-static
-rc_t KOutMsgStringFmt ( const String * arg )
-{
-    size_t num_writ;
-    KWrtHandler * kout_msg_handler = KOutHandlerGet ();
-    return ( * kout_msg_handler -> writer ) ( kout_msg_handler -> data, arg->addr, arg->size, & num_writ );
-}
-
-static
-rc_t KOutMsgCharFmt ( uint32_t u32 )
-{
-    rc_t rc;
-    size_t num_writ;
-    KWrtHandler * kout_msg_handler = KOutHandlerGet ();
-
-    if ( u32 < 128 )
-    {
-        char ch = ( char ) u32;
-        rc = ( * kout_msg_handler -> writer ) ( kout_msg_handler -> data, &ch, 1, & num_writ );
-    }
-    else
-    {
-        char buf[4];
-        int dbytes = utf32_utf8 ( buf, & buf [ sizeof buf ], u32 );
-        if ( dbytes <= 0 )
-        {   /* invalid character */
-            rc = ( * kout_msg_handler -> writer ) ( kout_msg_handler -> data, "?", 1, & num_writ );
-        }
-        else
-        {
-            rc = ( * kout_msg_handler -> writer ) ( kout_msg_handler -> data, buf, dbytes, & num_writ );
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KOutMsg ( const char * fmt, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, fmt );
-
-#define MATCH_FORMAT(format, literal) \
-    ( ( const void* ) ( format ) == ( const void* ) ( literal ) )
-
-    /* rapid pointer comparison */
-    if ( MATCH_FORMAT ( fmt, "%s" ) )
-        rc = KOutMsgNulTermStringFmt ( va_arg ( args, const char * ) );
-    else if ( MATCH_FORMAT ( fmt, "%.*s" ) )
-        rc = KOutMsgPrecNulTermStringFmt ( args );
-    else if ( MATCH_FORMAT ( fmt, "%S" ) )
-        rc = KOutMsgStringFmt ( va_arg ( args, const String * ) );
-    else if ( MATCH_FORMAT ( fmt, "%c" ) )
-        rc = KOutMsgCharFmt ( va_arg ( args, unsigned int ) );
-
-#undef MATCH_FORMAT
-#define MATCH_FORMAT(format, literal) \
-    ( memcmp ( ( format ), ( literal ), sizeof ( literal ) ) == 0 )
-
-    /* slower value comparison */
-    else if (MATCH_FORMAT(fmt, "%s"))
-        rc = KOutMsgNulTermStringFmt ( va_arg ( args, const char * ) );
-    else if (MATCH_FORMAT(fmt, "%.*s"))
-        rc = KOutMsgPrecNulTermStringFmt ( args );
-    else if (MATCH_FORMAT(fmt, "%S"))
-        rc = KOutMsgStringFmt ( va_arg ( args, const String * ) );
-    else if (MATCH_FORMAT(fmt, "%c"))
-        rc = KOutMsgCharFmt ( va_arg ( args, unsigned int ) );
-    else if( (rc = vkfprintf(KOutHandlerGet(), NULL, fmt, args)) != 0 ) 
-    {
-        kfprintf(KOutHandlerGet(), NULL, "outmsg failure: %R in '%s'\n", rc, fmt);
-    }
-#undef MATCH_FORMAT
-
-    va_end ( args );
-
-    return rc;
-}
-
-/* kprintf
- *  performs a printf to our output writer
- *  much like KOutMsg, but returns a size_t
- */
-LIB_EXPORT rc_t CC kprintf ( size_t *num_writ, const char * fmt, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, fmt );
-
-    rc = vkfprintf ( KOutHandlerGet (), num_writ, fmt, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC vkprintf ( size_t *num_writ, const char * fmt, va_list args )
-{
-    return vkfprintf ( KOutHandlerGet (), num_writ, fmt, args );
-}
-
-
-#undef KOutHandlerSetStdOut
-LIB_EXPORT rc_t CC KOutHandlerSetStdOut ( void )
-{
-    return KOutHandlerSet( KWrt_DefaultWriter, KWrt_DefaultWriterDataStdOut );
-}
-
-
-#undef KOutHandlerSetStdErr
-LIB_EXPORT rc_t CC KOutHandlerSetStdErr ( void )
-{
-    return KOutHandlerSet( KWrt_DefaultWriter, KWrt_DefaultWriterDataStdErr );
-}
-
-
-#undef KOutHandlerSet
-LIB_EXPORT rc_t CC KOutHandlerSet ( KWrtWriter writer, void * writer_data )
-{
-    G_out_handler.writer = writer;
-    G_out_handler.data = writer_data;
-    return 0;
-}
-
-
-#undef KOutDataGet
-LIB_EXPORT void * CC KOutDataGet ( void )
-{
-    return ( KOutHandlerGet()->data );
-}
-
-
-#undef KOutWriterGet
-LIB_EXPORT KWrtWriter CC KOutWriterGet ( void )
-{
-    return ( KOutHandlerGet()->writer );
-}
-
-
-#undef KOutHandlerGet
-LIB_EXPORT KWrtHandler * CC KOutHandlerGet ( void )
-{
-    return ( &G_out_handler );
-}
diff --git a/libs/klib/pack.c b/libs/klib/pack.c
deleted file mode 100644
index 0b8285a..0000000
--- a/libs/klib/pack.c
+++ /dev/null
@@ -1,517 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/pack.h>
-#include <klib/rc.h>
-#include <arch-impl.h>
-#include <sysalloc.h>
-
-#include <endian.h>
-#include <byteswap.h>
-#include <string.h>
-#include <assert.h>
-
-#if ! defined __LITTLE_ENDIAN && ! defined __BIG_ENDIAN
-#error "only little and big endian architectures are supported"
-#endif
-
-
-/*--------------------------------------------------------------------------
- * pack
- */
-#define MASK_SRC 0
-
-/* READ_UNPACKED
- *  macro to read source elements into register
- *  casts source pointer to appropriate type
- *  performs byte swap if necessary to ensure that
- *    elements are in reverse order
- */
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define READ_UNPACKED8( src, idx ) \
-    ( ( const uint32_t* ) ( src ) ) [ idx ]
-#else
-#define READ_UNPACKED8( src, idx ) \
-    bswap_32 ( ( ( const uint32_t* ) ( src ) ) [ idx ] )
-#endif
-
-#define READ_UNPACKED16( src, idx ) \
-    ( ( const uint16_t* ) ( src ) ) [ idx ]
-
-#define READ_UNPACKED32( src, idx ) \
-    ( ( const uint32_t* ) ( src ) ) [ idx ]
-
-#define READ_UNPACKED64( src, idx ) \
-    ( ( const uint64_t* ) ( src ) ) [ idx ]
-
-/* MASK
- *  macro to mask off portion of source register
- */
-#if MASK_SRC
-
-#define MASK8( in ) \
-    ( in ) & src_mask
-#define MASK16( in ) \
-    ( in ) & src_mask
-#define MASK32( in ) \
-    ( in ) & src_mask
-#define MASK64( in ) \
-    ( in ) & src_mask
-
-#else
-
-#define MASK8( in ) \
-    ( uint8_t ) ( in )
-#define MASK16( in ) \
-    ( uint16_t ) ( in )
-#define MASK32( in ) \
-    ( uint32_t ) ( in )
-#define MASK64( in ) \
-    ( uint64_t ) ( in )
-
-#endif
-
-
-/* WRITE_PACKED
- *  macro to write dest elements from accumulator
- *  casts dest pointer to appropriate type
- *  performs byte swap if necessary to ensure that
- *    elements are in stream order
- */
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define WRITE_PACKED32( acc, dst, idx ) \
-    ( ( uint32_t* ) ( dst ) ) [ idx ] = bswap_32 ( ( uint32_t ) ( acc ) )
-#define WRITE_PACKED64( acc, dst, idx ) \
-    ( ( uint64_t* ) ( dst ) ) [ idx ] = bswap_64 ( ( uint64_t ) ( acc ) )
-#else
-#define WRITE_PACKED32( acc, dst, idx ) \
-    ( ( uint32_t* ) ( dst ) ) [ idx ] = ( uint32_t ) ( acc )
-#define WRITE_PACKED64( acc, dst, idx ) \
-    ( ( uint64_t* ) ( dst ) ) [ idx ] = ( uint64_t ) ( acc )
-#endif
-
-/* Pack8
- */
-static
-void Pack8 ( uint32_t packed, void *dst, const void *src, uint32_t count )
-{
-    /* accumulator */
-    uint64_t acc;
-    uint32_t abits;
-
-    /* loop indices */
-    uint32_t s, d, cnt;
-
-#if MASK_SRC
-    uint32_t src_mask = ( 1 << packed ) - 1;
-#endif
-
-    for ( acc = 0, abits = s = d = 0, cnt = count >> 2; s < cnt; ++ s )
-    {
-        /* get 4 bytes in reverse order, i.e.
-           bits 0-7 are src[0], bits 8-15 are src[1], etc. */
-        uint32_t in = READ_UNPACKED8 ( src, s );
-
-        /* pack the bytes into our accumulator */
-        acc <<= packed;
-        acc |= MASK8 ( in );
-
-        /* account for activity */
-        abits += packed;
-        in >>= 8;
-
-        /* detect need to dump accumulator */
-        if ( abits >= 32 )
-        {
-            abits -= 32;
-            WRITE_PACKED32 ( acc >> abits, dst, d ++ );
-        }
-
-        /* repeat for remaining 3 source bytes */
-        acc <<= packed;
-        acc |= MASK8 ( in );
-        abits += packed;
-        in >>= 8;
-        if ( abits >= 32 )
-        {
-            abits -= 32;
-            WRITE_PACKED32 ( acc >> abits, dst, d ++ );
-        }
-
-        acc <<= packed;
-        acc |= MASK8 ( in );
-        abits += packed;
-        in >>= 8;
-        if ( abits >= 32 )
-        {
-            abits -= 32;
-            WRITE_PACKED32 ( acc >> abits, dst, d ++ );
-        }
-
-        acc <<= packed;
-        acc |= MASK8 ( in );
-        abits += packed;
-        in >>= 8;
-        if ( abits >= 32 )
-        {
-            abits -= 32;
-            WRITE_PACKED32 ( acc >> abits, dst, d ++ );
-        }
-    }
-
-    /* handle remaining src bytes */
-    for ( s <<= 2; s < count; ++ s )
-    {
-        acc <<= packed;
-        acc |= MASK8 ( ( ( const uint8_t* ) src ) [ s ] );
-        abits += packed;
-        if ( abits >= 32 )
-        {
-            abits -= 32;
-            WRITE_PACKED32 ( acc >> abits, dst, d ++ );
-        }
-    }
-
-    /* handle remaining accumulator bits */
-    if ( abits != 0 )
-    {
-        uint32_t out = bswap_32 ( ( uint32_t ) ( acc << ( 32 - abits ) ) );
-        abits = ( abits + 7 ) >> 3;
-        for ( d <<= 2; abits != 0; -- abits, out >>= 8, ++ d )
-            ( ( uint8_t* ) dst ) [ d ] = ( uint8_t ) out;
-    }
-}
-
-/* Pack16
- */
-static
-void Pack16 ( uint32_t packed, void *dst, const void *src, uint32_t count )
-{
-    /* accumulator */
-    uint64_t acc;
-    uint32_t abits;
-
-    /* loop indices */
-    uint32_t s, d;
-
-#if MASK_SRC
-    uint32_t src_mask = ( 1 << packed ) - 1;
-#endif
-
-    for ( acc = 0, abits = d = s = 0; s < count; ++ s )
-    {
-        /* get 2 bytes in native order */
-        uint32_t in = READ_UNPACKED16 ( src, s );
-
-        /* pack the bytes into our accumulator */
-        acc <<= packed;
-        acc |= MASK16 ( in );
-
-        /* account for activity */
-        abits += packed;
-
-        /* detect need to dump accumulator */
-        if ( abits >= 32 )
-        {
-            abits -= 32;
-            WRITE_PACKED32 ( acc >> abits, dst, d ++ );
-        }
-    }
-
-    /* handle remaining accumulator bits */
-    if ( abits != 0 )
-    {
-        uint32_t out = bswap_32 ( ( uint32_t ) ( acc << ( 32 - abits ) ) );
-        abits = ( abits + 7 ) >> 3;
-        for ( d <<= 2; abits != 0; -- abits, out >>= 8, ++ d )
-            ( ( uint8_t* ) dst ) [ d ] = ( uint8_t ) out;
-    }
-}
-
-/* Pack32
- */
-static
-void Pack32 ( uint32_t packed, void *dst, const void *src, uint32_t count )
-{
-    /* accumulator */
-    uint64_t acc;
-    uint32_t abits;
-
-    /* loop indices */
-    uint32_t s, d;
-
-#if MASK_SRC
-    uint32_t src_mask = ( 1 << packed ) - 1;
-#endif
-
-    for ( acc = 0, abits = d = s = 0; s < count; ++ s )
-    {
-        /* get 4 bytes in native order */
-        uint32_t in = READ_UNPACKED32 ( src, s );
-
-        /* pack the bytes into our accumulator */
-        acc <<= packed;
-        acc |= MASK32 ( in );
-
-        /* account for activity */
-        abits += packed;
-
-        /* detect need to dump accumulator */
-        if ( abits >= 32 )
-        {
-            abits -= 32;
-            WRITE_PACKED32 ( acc >> abits, dst, d ++ );
-        }
-    }
-
-    /* handle remaining accumulator bits */
-    if ( abits != 0 )
-    {
-        uint32_t out = bswap_32 ( ( uint32_t ) ( acc << ( 32 - abits ) ) );
-        abits = ( abits + 7 ) >> 3;
-        for ( d <<= 2; abits != 0; -- abits, out >>= 8, ++ d )
-            ( ( uint8_t* ) dst ) [ d ] = ( uint8_t ) out;
-    }
-}
-
-/* Pack64a
- *  source is 64 bits, packed <= 32 bits
- */
-static
-void Pack64a ( uint32_t packed, void *dst, const void *src, uint32_t count )
-{
-    /* accumulator */
-    uint64_t acc;
-    uint32_t abits;
-
-    /* loop indices */
-    uint32_t s, d;
-
-#if MASK_SRC
-    uint64_t src_mask = ( 1 << packed ) - 1;
-#endif
-
-    for ( acc = 0, abits = d = s = 0; s < count; ++ s )
-    {
-        /* get 8 bytes in native order */
-        uint64_t in = READ_UNPACKED64 ( src, s );
-
-        /* pack the bytes into our accumulator */
-        acc <<= packed;
-        acc |= MASK32 ( in );
-
-        /* account for activity */
-        abits += packed;
-
-        /* detect need to dump accumulator */
-        if ( abits >= 32 )
-        {
-            abits -= 32;
-            WRITE_PACKED32 ( acc >> abits, dst, d ++ );
-        }
-    }
-
-    /* handle remaining accumulator bits */
-    if ( abits != 0 )
-    {
-        uint32_t out = bswap_32 ( ( uint32_t ) ( acc << ( 32 - abits ) ) );
-        abits = ( abits + 7 ) >> 3;
-        for ( d <<= 2; abits != 0; -- abits, out >>= 8, ++ d )
-            ( ( uint8_t* ) dst ) [ d ] = ( uint8_t ) out;
-    }
-}
-
-/* Pack64b
- *  source is 64 bits, packed > 32 bits
- */
-static
-void Pack64b ( uint32_t packed, void *dst, const void *src, uint32_t count )
-{
-    /* accumulator */
-    uint128_t acc;
-    uint32_t abits;
-
-    /* loop indices */
-    uint32_t s, d;
-
-#if MASK_SRC
-    uint64_t src_mask = ( ( uint64_t ) 1U << packed ) - 1;
-#endif
-
-    for ( abits = d = s = 0; s < count; ++ s )
-    {
-        /* get 8 bytes in native order */
-        uint64_t in = READ_UNPACKED64 ( src, s );
-
-        /* pack the bytes into our accumulator */
-        uint128_shl ( & acc, packed );
-        uint128_orlo ( & acc, MASK64 ( in ) );
-
-        /* account for activity */
-        abits += packed;
-
-        /* detect need to dump accumulator */
-        if ( abits >= 64 )
-        {
-            uint64_t save = uint128_lo ( & acc );
-            abits -= 64;
-            uint128_shr ( & acc, abits );
-            WRITE_PACKED64 ( uint128_lo ( & acc ), dst, d ++ );
-            uint128_setlo ( & acc, save );
-        }
-    }
-
-    /* handle remaining accumulator bits */
-    if ( abits != 0 )
-    {
-        uint64_t out;
-        uint128_shl ( & acc, 64 - abits );
-        out = bswap_64 ( uint128_lo ( & acc ) );
-        abits = ( abits + 7 ) & ~ 7;
-        for ( d <<= 3, out >>= 64 - abits; abits != 0; abits -= 8, out >>= 8, ++ d )
-            ( ( uint8_t* ) dst ) [ d ] = ( uint8_t ) out;
-    }
-}
-
-/* Pack
- *  accepts a series of unpacked source bits
- *  produces a series of packed destination bits by eliminating MSB
- *
- *  "unpacked" [ IN ] - original element size in bits
- *  must be in 2^^[3..6], i.e. { 8, 16, 32, 64 }
- *
- *  "packed" [ IN ] - packed element size in bits
- *  must be <= "unpacked"
- *
- *  "src" [ IN ] and "ssize" [ IN ] - source buffer
- *  with size given in bytes
- *
- *  "consumed" [ OUT, NULL OKAY ] - number of source bytes
- *  consumed. if NULL, then all source bytes MUST be consumed
- *  or an error will be generated.
- *
- *  "dst" [ OUT ] and "dst_off" [ IN ] - destination
- *  buffer bit address
- *
- *  "dsize" [ IN ] - size of "dst" in bits, not including "dst_off"
- *
- *  "psize" [ OUT ] - resultant packed size in bits
- *
- * NB - the implementation may allow packing in place
- */
-LIB_EXPORT rc_t CC Pack ( uint32_t unpacked, uint32_t packed,
-    const void *src, size_t ssize, size_t *consumed,
-    void *dst, bitsz_t dst_off, bitsz_t dsize, bitsz_t *psize )
-{
-    /* prepare for failure */
-    if ( consumed != NULL )
-        * consumed = 0;
-
-    /* validate output param */
-    if ( psize == NULL )
-        return RC ( rcXF, rcBuffer, rcPacking, rcParam, rcNull );
-    * psize = 0;
-
-    /* require power of 2 with value between 8 and 64 */
-    if ( ( ( unpacked - 1 ) & unpacked ) != 0 ||
-         unpacked < 8 || unpacked > 64 )
-        return RC ( rcXF, rcBuffer, rcPacking, rcParam, rcInvalid );
-
-    /* validate remaining params */
-    if ( unpacked < packed )
-        return RC ( rcXF, rcBuffer, rcPacking, rcParam, rcInvalid );
-
-    if ( packed == 0 )
-        return RC ( rcXF, rcBuffer, rcPacking, rcParam, rcInvalid );
-
-    if ( ssize == 0 )
-        return 0;
-
-    if ( src == NULL )
-        return RC ( rcXF, rcBuffer, rcPacking, rcParam, rcNull );
-
-    /* detect a byte size so large it can't be converted to bits */
-    if ( ( ssize & ( ( size_t ) 7 << ( sizeof ssize * 8 - 3 ) ) ) != 0 )
-        return RC ( rcXF, rcBuffer, rcPacking, rcBuffer, rcExcessive );
-
-    /* required destination buffer size */
-    * psize = ( ( ssize << 3 ) / unpacked ) * packed;
-
-    if ( dsize < * psize )
-    {
-        if ( consumed == NULL )
-            return RC ( rcXF, rcBuffer, rcPacking, rcBuffer, rcInsufficient );
-
-        ssize = ( dsize / packed ) * ( unpacked >> 3 );
-        * psize = ( ( ssize << 3 ) / unpacked ) * packed;
-    }
-
-    if ( dst == NULL )
-    {
-        * psize = 0;
-        return RC ( rcXF, rcBuffer, rcPacking, rcParam, rcNull );
-    }
-
-    /* all parameters are validated */
-    dst = & ( ( char* ) dst ) [ dst_off >> 3 ];
-    dst_off &= 7;
-
-    if ( consumed != NULL )
-        * consumed = ssize;
-
-    if ( unpacked == 8 && packed == 8 && dst_off == 0 )
-    {
-        if ( ( const void* ) dst != src )
-            memcpy ( dst, src, ssize );
-        return 0;
-    }
-
-    /* TBD - enable packing into existing buffers */
-    if ( dst_off != 0 )
-        return RC ( rcXF, rcBuffer, rcPacking, rcOffset, rcUnsupported );
-
-    switch ( unpacked )
-    {
-    case 8:
-        Pack8 ( packed, dst, src, ( uint32_t ) ssize );
-        break;
-    case 16:
-        Pack16 ( packed, dst, src, ( uint32_t ) ( ssize >> 1 ) );
-        break;
-    case 32:
-        Pack32 ( packed, dst, src, ( uint32_t ) ( ssize >> 2 ) );
-        break;
-    case 64:
-        if ( packed > 32 )
-            Pack64b ( packed, dst, src, ( uint32_t ) ( ssize >> 3 ) );
-        else
-            Pack64a ( packed, dst, src, ( uint32_t ) ( ssize >> 3 ) );
-        break;
-    }
-
-    return 0;
-}
diff --git a/libs/klib/pbstree-impl.c b/libs/klib/pbstree-impl.c
deleted file mode 100644
index 7b21db3..0000000
--- a/libs/klib/pbstree-impl.c
+++ /dev/null
@@ -1,847 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include "pbstree-priv.h"
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include "maybeswap.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * PBSTreeImpl
- *  a flattened b-tree
- */
-
-/* Count
- *  returns number of elements in b-tree
- */
-static
-uint32_t CC PBSTreeImplCount ( const PBSTree *self )
-{
-    uint32_t n;
-    GET32 ( n, self -> pt -> num_nodes );
-    return n;
-}
-
-/* Depth
- *  returns number of layers in b-tree
- */
-static
-uint32_t CC PBSTreeImplDepth ( const PBSTree *self )
-{
-    uint32_t depth, num_nodes;
-
-    GET32 ( num_nodes, self -> pt -> num_nodes );
-
-    for ( depth = 0; num_nodes != 0; ++ depth )
-        num_nodes >>= 1;
-
-    return depth;
-}
-
-/* Size
- *  returns the size in bytes
- *  of the PBSTree image
- */
-static
-size_t CC PBSTreeImplSize ( const PBSTree *oself )
-{
-    size_t bytes;
-    const P_BSTree *self = oself -> pt;
-    uint32_t data_size, bytes32;
-
-    GET32 ( bytes32, self -> num_nodes );
-    if ( bytes32 == 0 ) /* empty tree */
-        return sizeof self -> num_nodes;
-    else
-        bytes = bytes32;
-
-    GET32 ( data_size, self -> data_size );
-    if ( data_size > 256 )
-    {
-        if ( data_size <= 65536 )
-            bytes += bytes;
-        else
-            bytes <<= 2;
-    }
-
-    return sizeof * self - sizeof self -> data_idx +
-        bytes + data_size;
-}
-
-/* GetNodeData
- *  finds node data boundaries
- */
-static
-rc_t CC PBSTreeImplGetNodeData8 ( const PBSTree *oself,
-    const void **addr, size_t *size, uint32_t id )
-{
-    const P_BSTree *self = oself -> pt;
-
-    uint32_t num_nodes;
-    const uint8_t *data_start;
-    uint32_t off, end;
-
-    GET32 ( num_nodes, self -> num_nodes );
-    GET32 ( end, self -> data_size );
-
-    if ( id == 0 )
-        return RC ( rcCont, rcTree, rcAccessing, rcId, rcNull );
-    if ( id > num_nodes )
-        return RC ( rcCont, rcTree, rcAccessing, rcId, rcNotFound );
-
-    data_start = ( const uint8_t* )
-      & self -> data_idx . v8 [ num_nodes ];
-    off = self -> data_idx . v8 [ id - 1 ];
-    if ( id != num_nodes )
-      end = self -> data_idx . v8 [ id ];
-
-    * addr = & data_start [ off ];
-    * size = end - off;
-    return 0;
-}
-
-static
-rc_t CC PBSTreeImplGetNodeData16 ( const PBSTree *oself,
-    const void **addr, size_t *size, uint32_t id )
-{
-    const P_BSTree *self = oself -> pt;
-
-    uint32_t num_nodes, end;
-    const uint8_t *data_start;
-    uint16_t off;
-
-    GET32 ( num_nodes, self -> num_nodes );
-    GET32 ( end, self -> data_size );
-
-    if ( id == 0 )
-        return RC ( rcCont, rcTree, rcAccessing, rcId, rcNull );
-    if ( id > num_nodes )
-        return RC ( rcCont, rcTree, rcAccessing, rcId, rcNotFound );
-
-    data_start = ( const uint8_t* )
-      & self -> data_idx . v16 [ num_nodes ];
-    GET16 ( off, self -> data_idx . v16 [ id - 1 ] );
-    if ( id != num_nodes )
-    {
-      uint16_t end16;
-      GET16 ( end16, self -> data_idx . v16 [ id ] );
-      end = end16;
-    }
-
-    * addr = & data_start [ off ];
-    * size = end - off;
-    return 0;
-}
-
-static
-rc_t CC PBSTreeImplGetNodeData32 ( const PBSTree *oself,
-    const void **addr, size_t *size, uint32_t id )
-{
-    const P_BSTree *self = oself -> pt;
-
-    uint32_t num_nodes;
-    const uint8_t *data_start;
-    uint32_t off, end;
-
-    GET32 ( num_nodes, self -> num_nodes );
-    GET32 ( end, self -> data_size );
-
-    if ( id == 0 )
-        return RC ( rcCont, rcTree, rcAccessing, rcId, rcNull );
-    if ( id > num_nodes )
-        return RC ( rcCont, rcTree, rcAccessing, rcId, rcNotFound );
-
-    data_start = ( const uint8_t* )
-      & self -> data_idx . v32 [ num_nodes ];
-    GET32 ( off, self -> data_idx . v32 [ id - 1 ] );
-    if ( id != num_nodes )
-      GET32 ( end, self -> data_idx . v32 [ id ] );
-
-    * addr = & data_start [ off ];
-    * size = end - off;
-    return 0;
-}
-
-/* Find
- *  find an object within tree
- *  "cmp" function returns equivalent of "item" - "n"
- */
-static
-uint32_t CC PBSTreeImplFind8 ( const PBSTree *self, PBSTNode *n, const void *item,
-    int ( CC * cmp ) ( const void *item, const PBSTNode *n, void * data ), void * data )
-{
-    const P_BSTree *pt = self -> pt;
-    uint32_t right;
-    GET32 ( right, pt -> num_nodes );
-    if ( right != 0 )
-    {
-        int diff;
-        const uint8_t *data_start;
-        uint32_t off, end;
-        uint32_t id, left = 1;
-        uint32_t max_right = right;
-
-        GET32 ( end, pt -> data_size );
-	data_start = & pt -> data_idx . v8 [ right ];
-	
-	do
-	  {
-	    id = ( left + right ) >> 1;
-	    off = pt -> data_idx . v8 [ id - 1 ];
-	    n -> id = id;
-	    n -> data . addr = & data_start [ off ];
-	    if ( id == max_right )
-	      n -> data . size = end - off;
-	    else
-	      n -> data . size = pt -> data_idx . v8 [ id ] - off;
-	    diff = ( * cmp ) ( item, n, data );
-	    if ( diff == 0 )
-	      return id;
-	    if ( diff < 0 )
-	      right = id - 1;
-	    else
-	      left = id + 1;
-	  }
-	while ( left <= right );
-    }
-
-    n -> data . addr = NULL;
-    n -> data . size = 0;
-    return n -> id = 0;
-}
-
-static
-uint32_t CC PBSTreeImplFind16 ( const PBSTree *self, PBSTNode *n, const void *item,
-    int ( CC * cmp ) ( const void *item, const PBSTNode *n, void * data ), void * data )
-{
-    const P_BSTree *pt = self -> pt;
-    uint32_t right;
-    GET32 ( right, pt -> num_nodes );
-    if ( right != 0 )
-    {
-        int diff;
-        const uint8_t *data_start;
-        uint32_t end;
-        uint32_t id, left = 1;
-        uint32_t max_right = right;
-        uint16_t off;
-
-        GET32 ( end, pt -> data_size );
-	data_start = ( const uint8_t* )
-	  & pt -> data_idx . v16 [ right ];
-	
-	do
-	  {
-	    id = ( left + right ) >> 1;
-	    GET16 ( off, pt -> data_idx . v16 [ id - 1 ] );
-	    n -> id = id;
-	    n -> data . addr = & data_start [ off ];
-	    if ( id == max_right )
-	      n -> data . size = end - off;
-	    else
-	    {
-	      uint16_t size;
-	      GET16 ( size, pt -> data_idx . v16 [ id ] );
-	      n -> data . size = size - off;
-	    }
-	    diff = ( * cmp ) ( item, n, data );
-	    if ( diff == 0 )
-	      return id;
-	    if ( diff < 0 )
-	      right = id - 1;
-	    else
-	      left = id + 1;
-	  }
-	while ( left <= right );
-    }
-
-    n -> data . addr = NULL;
-    n -> data . size = 0;
-    return n -> id = 0;
-}
-
-static
-uint32_t CC PBSTreeImplFind32 ( const PBSTree *self, PBSTNode *n, const void *item,
-    int ( CC * cmp ) ( const void *item, const PBSTNode *n, void * data ), void * data )
-{
-    const P_BSTree *pt = self -> pt;
-    uint32_t right;
-    GET32 ( right, pt -> num_nodes );
-    if ( right != 0 )
-    {
-        int diff;
-        const uint8_t *data_start;
-        uint32_t off, end;
-        uint32_t id, left = 1;
-        uint32_t max_right = right;
-
-        GET32 ( end, pt -> data_size );
-	data_start = ( const uint8_t* )
-	  & pt -> data_idx . v32 [ right ];
-	
-	do
-	  {
-	    id = ( left + right ) >> 1;
-	    GET32 ( off, pt -> data_idx . v32 [ id - 1 ] );
-	    n -> id = id;
-	    n -> data . addr = & data_start [ off ];
-	    if ( id == max_right )
-	      n -> data . size = end - off;
-	    else
-	    {
-	      GET32 ( n -> data . size, pt -> data_idx . v32 [ id ] );
-	      n -> data . size -= off;
-	    }
-	    diff = ( * cmp ) ( item, n, data );
-	    if ( diff == 0 )
-	      return id;
-	    if ( diff < 0 )
-	      right = id - 1;
-	    else
-	      left = id + 1;
-	  }
-	while ( left <= right );
-    }
-
-    n -> data . addr = NULL;
-    n -> data . size = 0;
-    return n -> id = 0;
-}
-
-/* ForEach
- *  executes a function on each tree element
- */
-static
-void CC PBSTreeImplForEach8 ( const PBSTree *self, bool reverse,
-    void ( CC * f ) ( PBSTNode *n, void *data ), void *data )
-{
-    const P_BSTree *pt = self -> pt;
-    uint32_t num_nodes;
-    GET32 ( num_nodes, pt -> num_nodes );
-    if ( num_nodes != 0 )
-    {
-        PBSTNode n;
-        uint32_t id;
-        uint32_t off, end;
-        const uint8_t *data_start;
-
-        GET32 ( end, pt -> data_size );
-
-	data_start = & pt -> data_idx . v8 [ num_nodes ];
-	
-	if ( ! reverse )
-	  {
-	    for ( off = pt -> data_idx . v8 [ 0 ],
-		    id = 1; id < num_nodes; off = end, ++ id )
-	      {
-		end = pt -> data_idx . v8 [ id ];
-		n . internal = pt;
-		n . id = id;
-		n . data . addr = & data_start [ off ];
-		n . data . size = end - off;
-		( * f ) ( & n, data );
-	      }
-	    
-	    GET32 ( end, pt -> data_size );
-	  }
-	
-	off = pt -> data_idx . v8 [ num_nodes - 1 ];
-	n . internal = pt;
-	n . id = num_nodes;
-	n . data . addr = & data_start [ off ];
-	n . data . size = end - off;
-	( * f ) ( & n, data );
-	
-	if ( reverse )
-	  {
-	    for ( end = off, id = num_nodes - 1; id > 0; end = off, -- id )
-	      {
-		off = pt -> data_idx . v8 [ id - 1 ];
-		n . internal = pt;
-		n . id = id;
-		n . data . addr = & data_start [ off ];
-		n . data . size = end - off;
-		( * f ) ( & n, data );
-	      }
-	  }
-    }
-}
-
-static
-void CC PBSTreeImplForEach16 ( const PBSTree *self, bool reverse,
-    void ( CC * f ) ( PBSTNode *n, void *data ), void *data )
-{
-    const P_BSTree *pt = self -> pt;
-    uint32_t num_nodes;
-    GET32 ( num_nodes, pt -> num_nodes );
-    if ( num_nodes != 0 )
-    {
-        PBSTNode n;
-        uint32_t id, end;
-        uint16_t off;
-        const uint8_t *data_start;
-
-        GET32 ( end, pt -> data_size );
-
-	data_start = ( const uint8_t* )
-	  & pt -> data_idx . v16 [ num_nodes ];
-	
-	if ( ! reverse )
-	  {
-	    GET16 ( off, pt -> data_idx . v16 [ 0 ] );
-	    for ( id = 1; id < num_nodes; off = end, ++ id )
-	      {
-		uint16_t end16;
-		GET16 ( end16, pt -> data_idx . v16 [ id ] );
-		end = end16;
-		n . internal = pt;
-		n . id = id;
-		n . data . addr = & data_start [ off ];
-		n . data . size = end - off;
-		( * f ) ( & n, data );
-	      }
-	    
-	    GET32 ( end, pt -> data_size );
-	  }
-	
-	GET16 ( off, pt -> data_idx . v16 [ num_nodes - 1 ] );
-	n . internal = pt;
-	n . id = num_nodes;
-	n . data . addr = & data_start [ off ];
-	n . data . size = end - off;
-	( * f ) ( & n, data );
-        
-	if ( reverse )
-	  {
-	    for ( end = off, id = num_nodes - 1; id > 0; end = off, -- id )
-	      {
-		GET16 ( off, pt -> data_idx . v16 [ id - 1 ] );
-		n . internal = pt;
-		n . id = id;
-		n . data . addr = & data_start [ off ];
-		n . data . size = end - off;
-		( * f ) ( & n, data );
-	      }
-	  }
-    }
-}
-
-static
-void CC PBSTreeImplForEach32 ( const PBSTree *self, bool reverse,
-    void ( CC * f ) ( PBSTNode *n, void *data ), void *data )
-{
-    const P_BSTree *pt = self -> pt;
-    uint32_t num_nodes;
-    GET32 ( num_nodes, pt -> num_nodes );
-    if ( num_nodes != 0 )
-    {
-        PBSTNode n;
-        uint32_t id;
-        uint32_t off, end;
-        const uint8_t *data_start;
-
-        GET32 ( end, pt -> data_size );
-
-	data_start = ( const uint8_t* )
-	  & pt -> data_idx . v32 [ num_nodes ];
-	
-	if ( ! reverse )
-	  {
-	    GET32 ( off, pt -> data_idx . v32 [ 0 ] );
-	    for ( id = 1; id < num_nodes; off = end, ++ id )
-	      {
-		GET32( end, pt -> data_idx . v32 [ id ] );
-		n . internal = pt;
-		n . id = id;
-		n . data . addr = & data_start [ off ];
-		n . data . size = end - off;
-		( * f ) ( & n, data );
-	      }
-                
-	    GET32 ( end, pt -> data_size );
-	  }
-
-	GET32 ( off, pt -> data_idx . v32 [ num_nodes - 1 ] );
-	n . internal = pt;
-	n . id = num_nodes;
-	n . data . addr = & data_start [ off ];
-	n . data . size = end - off;
-	( * f ) ( & n, data );
-
-	if ( reverse )
-	  {
-	    for ( end = off, id = num_nodes - 1; id > 0; end = off, -- id )
-	      {
-		GET32 ( off, pt -> data_idx . v32 [ id - 1 ] );
-		n . internal = pt;
-		n . id = id;
-		n . data . addr = & data_start [ off ];
-		n . data . size = end - off;
-		( * f ) ( & n, data );
-	      }
-	  }
-    }
-}
-
-/* DoUntil
- *  executes a function on each element
- *  until the function returns true
- */
-static
-bool CC PBSTreeImplDoUntil8 ( const PBSTree *self, bool reverse,
-    bool ( CC * f ) ( PBSTNode *n, void *data ), void *data )
-{
-    const P_BSTree *pt = self -> pt;
-    uint32_t num_nodes;
-    GET32 ( num_nodes, pt -> num_nodes );
-    if ( num_nodes != 0 )
-    {
-        PBSTNode n;
-        uint32_t id;
-        uint32_t off, end;
-        const uint8_t *data_start;
-
-        GET32 ( end, pt -> data_size );
-
-        data_start = & pt -> data_idx . v8 [ num_nodes ];
-	
-        if ( ! reverse )
-        {
-            for ( off = pt -> data_idx . v8 [ 0 ],
-                  id = 1; id < num_nodes; off = end, ++ id )
-            {
-                end = pt -> data_idx . v8 [ id ];
-                n . internal = pt;
-                n . id = id;
-                n . data . addr = & data_start [ off ];
-                n . data . size = end - off;
-                if ( ( * f ) ( & n, data ) )
-                    return true;
-            }
-	    
-            GET32 ( end, pt -> data_size );
-        }
-
-        off = pt -> data_idx . v8 [ num_nodes - 1 ];
-        n . internal = pt;
-        n . id = num_nodes;
-        n . data . addr = & data_start [ off ];
-        n . data . size = end - off;
-        if ( ( * f ) ( & n, data ) )
-            return true;
-
-        if ( reverse )
-        {
-            for ( end = off, id = num_nodes - 1; id > 0; end = off, -- id )
-            {
-                off = pt -> data_idx . v8 [ id - 1 ];
-                n . internal = pt;
-                n . id = id;
-                n . data . addr = & data_start [ off ];
-                n . data . size = end - off;
-                if ( ( * f ) ( & n, data ) )
-                    return true;
-            }
-        }
-    }
-
-    return 0;
-}
-
-static
-bool CC PBSTreeImplDoUntil16 ( const PBSTree *self, bool reverse,
-    bool ( CC * f ) ( PBSTNode *n, void *data ), void *data )
-{
-    const P_BSTree *pt = self -> pt;
-    uint32_t num_nodes;
-    GET32 ( num_nodes, pt -> num_nodes );
-    if ( num_nodes != 0 )
-    {
-        PBSTNode n;
-        uint32_t id, end;
-        uint16_t off;
-        const uint8_t *data_start;
-
-        GET32 ( end, pt -> data_size );
-
-        data_start = ( const uint8_t* )
-            & pt -> data_idx . v16 [ num_nodes ];
-            
-        if ( ! reverse )
-        {
-            GET16 ( off, pt -> data_idx . v16 [ 0 ] );
-            for ( id = 1; id < num_nodes; off = end, ++ id )
-            {
-                uint16_t end16;
-                GET16 ( end16, pt -> data_idx . v16 [ id ] );
-                end = end16;
-                n . internal = pt;
-                n . id = id;
-                n . data . addr = & data_start [ off ];
-                n . data . size = end - off;
-                if ( ( * f ) ( & n, data ) )
-                    return true;
-            }
-                
-            GET32 ( end, pt -> data_size );
-        }
-
-        GET16 ( off, pt -> data_idx . v16 [ num_nodes - 1 ] );
-        n . internal = pt;
-        n . id = num_nodes;
-        n . data . addr = & data_start [ off ];
-        n . data . size = end - off;
-        if ( ( * f ) ( & n, data ) )
-            return true;
-            
-        if ( reverse )
-        {
-            for ( end = off, id = num_nodes - 1; id > 0; end = off, -- id )
-            {
-                GET16 ( off, pt -> data_idx . v16 [ id - 1 ] );
-                n . internal = pt;
-                n . id = id;
-                n . data . addr = & data_start [ off ];
-                n . data . size = end - off;
-                if ( ( * f ) ( & n, data ) )
-                    return true;
-            }
-        }
-    }
-    return 0;
-}
-
-static
-bool CC PBSTreeImplDoUntil32 ( const PBSTree *self, bool reverse,
-    bool ( CC * f ) ( PBSTNode *n, void *data ), void *data )
-{
-    const P_BSTree *pt = self -> pt;
-    uint32_t num_nodes;
-    GET32 ( num_nodes, pt -> num_nodes );
-    if ( num_nodes != 0 )
-    {
-        PBSTNode n;
-        uint32_t id;
-        uint32_t off, end;
-        const uint8_t *data_start;
-
-        GET32 ( end, pt -> data_size );
-
-        data_start = ( const uint8_t* )
-            & pt -> data_idx . v32 [ num_nodes ];
-            
-        if ( ! reverse )
-        {
-            GET32 ( off, pt -> data_idx . v32 [ 0 ] );
-            for ( id = 1; id < num_nodes; off = end, ++ id )
-            {
-                GET32 ( end, pt -> data_idx . v32 [ id ] );
-                n . internal = pt;
-                n . id = id;
-                n . data . addr = & data_start [ off ];
-                n . data . size = end - off;
-                if ( ( * f ) ( & n, data ) )
-                    return true;
-            }
-                
-            GET32 ( end, pt -> data_size );
-        }
-            
-        GET32 ( off, pt -> data_idx . v32 [ num_nodes - 1 ] );
-        n . internal = pt;
-        n . id = num_nodes;
-        n . data . addr = & data_start [ off ];
-        n . data . size = end - off;
-        if ( ( * f ) ( & n, data ) )
-            return true;
-            
-        if ( reverse )
-        {
-            for ( end = off, id = num_nodes - 1; id > 0; end = off, -- id )
-            {
-                GET32 ( off, pt -> data_idx . v32 [ id - 1 ] );
-                n . internal = pt;
-                n . id = id;
-                n . data . addr = & data_start [ off ];
-                n . data . size = end - off;
-                if ( ( * f ) ( & n, data ) )
-                    return true;
-            }
-        }
-    }
-
-    return 0;
-}
-
-/* Whack
- *  whacks PBSTree object
- *  does not free memory reference
- */
-static
-void CC PBSTreeImplWhack ( PBSTree *self )
-{
-    free ( self );
-}
-
-
-static PBSTree_vt_v1 vtPBSTreeImpl8 =
-{
-    /* version 1.0 */
-    1, 0,
-
-    /* required methods */
-    PBSTreeImplWhack,
-    PBSTreeImplCount,
-    PBSTreeImplDepth,
-    PBSTreeImplSize,
-    PBSTreeImplGetNodeData8,
-    PBSTreeImplFind8,
-    PBSTreeImplForEach8,
-    PBSTreeImplDoUntil8
-};
-
-static PBSTree_vt_v1 vtPBSTreeImpl16 =
-{
-    /* version 1.0 */
-    1, 0,
-
-    /* required methods */
-    PBSTreeImplWhack,
-    PBSTreeImplCount,
-    PBSTreeImplDepth,
-    PBSTreeImplSize,
-    PBSTreeImplGetNodeData16,
-    PBSTreeImplFind16,
-    PBSTreeImplForEach16,
-    PBSTreeImplDoUntil16
-};
-
-static PBSTree_vt_v1 vtPBSTreeImpl32 =
-{
-    /* version 1.0 */
-    1, 0,
-
-    /* required methods */
-    PBSTreeImplWhack,
-    PBSTreeImplCount,
-    PBSTreeImplDepth,
-    PBSTreeImplSize,
-    PBSTreeImplGetNodeData32,
-    PBSTreeImplFind32,
-    PBSTreeImplForEach32,
-    PBSTreeImplDoUntil32
-};
-
-
-/* GetVTable
- */
-static
-PBSTree_vt * CC PBSTreeImplGetVTable ( const P_BSTree *pt )
-{
-    uint32_t data_size;
-    GET32 ( data_size, pt -> data_size );
-    if ( data_size <= 256 )
-      return (PBSTree_vt *) & vtPBSTreeImpl8;
-    if ( data_size <= 65536 )
-      return (PBSTree_vt *) & vtPBSTreeImpl16;
-    return (PBSTree_vt *) & vtPBSTreeImpl32;
-}
-
-
-/* CheckPersisted
- *  check persisted image for apparent correctness
- */
-static
-rc_t CC PBSTreeImplCheckPersisted ( const P_BSTree *pt, size_t size )
-{
-    uint32_t num_nodes;
-
-    if ( pt == NULL)
-        return RC ( rcCont, rcTree, rcConstructing, rcParam, rcNull );
-    if ( size == 0 )
-        return 0;
-    if ( size < sizeof pt -> num_nodes )
-        return RC ( rcCont, rcTree, rcConstructing, rcData, rcInvalid );
-
-    GET32 ( num_nodes, pt -> num_nodes );
-    if ( num_nodes > 0 )
-    {
-        uint32_t data_size;
-        const uint8_t *end, *data_start;
-
-        GET32 ( data_size, pt -> data_size );
-        if ( size < sizeof * pt || data_size == 0 )
-            return RC ( rcCont, rcTree, rcConstructing, rcData, rcIncomplete );
-
-        end = ( const uint8_t* ) pt + size;
-
-        if ( data_size <= 256 )
-            data_start = & pt -> data_idx . v8 [ num_nodes ];
-        else  if ( data_size <= 65536 )
-        {
-            data_start = ( const uint8_t* )
-                & pt -> data_idx . v16 [ num_nodes ];
-        }
-        else
-        {
-            data_start = ( const uint8_t* )
-                & pt -> data_idx . v32 [ num_nodes ];
-        }
-        
-        if ( & data_start [ data_size ] > end )
-            return RC ( rcCont, rcTree, rcConstructing, rcData, rcCorrupt );
-    }
-    
-    return 0;
-}
-
-/* PBSTreeMake
- *  make a PBSTree structure
- *  the memory reference passed in is borrowed
- */
-#if SWAP_PERSISTED
-#define PBSTREEMAKE PBSTreeMakeSwapped
-#else
-#define PBSTREEMAKE PBSTreeMakeNative
-#endif
-
-rc_t PBSTREEMAKE ( PBSTree *pt, const void *addr, size_t size )
-{
-    rc_t rc = PBSTreeImplCheckPersisted ( addr, size );
-    if ( rc == 0 )
-    {
-        PBSTree_vt *vt = PBSTreeImplGetVTable ( addr );
-        rc = PBSTreeInit ( pt, vt, addr );
-    }
-    return rc;
-}
diff --git a/libs/klib/pbstree-native.c b/libs/klib/pbstree-native.c
deleted file mode 100644
index 9eb937e..0000000
--- a/libs/klib/pbstree-native.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#undef SWAP_PERSISTED
-#define SWAP_PERSISTED 0
-#include "pbstree-impl.c"
-#undef SWAP_PERSISTED
diff --git a/libs/klib/pbstree-priv.h b/libs/klib/pbstree-priv.h
deleted file mode 100644
index 4a5b0ae..0000000
--- a/libs/klib/pbstree-priv.h
+++ /dev/null
@@ -1,680 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_pbstree_priv_
-#define _h_pbstree_priv_
-
-#ifndef _h_klib_pbstree_
-#include <klib/pbstree.h>
-#endif
-
-#ifndef _h_klib_ptrie_
-#include <klib/ptrie.h>
-#endif
-
-#include <endian.h>
-
-
-#define RECORD_HDR_IDX   1
-#define RECORD_HDR_DEPTH 1
-#define EXTENDED_PTRIE   1
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * P_BSTree
- *  persisted binary search tree
- *
- *  in memory, the tree is built from nodes with 3 pointers. this
- *  arrangement allows parent identification, left & right child
- *  identification, as well as leaf node indication.
- *
- *  when persisted, the tree nodes are identified by index integer.
- *  this integer may be 8, 16 or 32 bits as determined by the node count.
- */
-typedef struct P_BSTree P_BSTree;
-struct P_BSTree
-{
-    /* a node count - if zero, then the structure ends */
-    uint32_t num_nodes;
-
-    /* the total size of auxiliary data */
-    uint32_t data_size;
-
-    /* offsets relative to & data_idx [ num_nodes ] */
-    union
-    {
-        uint8_t v8 [ 4 ];
-        uint16_t v16 [ 2 ];
-        uint32_t v32 [ 1 ];
-    } data_idx;
-
-#if 0
-    uint8_t data [ data_size ];
-#endif
-};
-
-
-/*--------------------------------------------------------------------------
- * PBSTree_vt
- *  versioned message dispatch table
- */
-#ifndef PBSTREE_IMPL
-#define PBSTREE_IMPL PBSTree
-#endif
-
-typedef struct PBSTree_vt_v1 PBSTree_vt_v1;
-struct PBSTree_vt_v1
-{
-    /* version == 1.x */
-    uint32_t maj;
-    uint32_t min;
-
-    /* start minor version == 0 */
-    void ( CC * destroy ) ( PBSTREE_IMPL *self );
-    uint32_t ( CC * count ) ( const PBSTREE_IMPL *self );
-    uint32_t ( CC * depth ) ( const PBSTREE_IMPL *self );
-    size_t ( CC * size ) ( const PBSTREE_IMPL *self );
-    rc_t ( CC * get_node_data ) ( const PBSTREE_IMPL *self,
-        const void **addr, size_t *size, uint32_t id );
-    uint32_t ( CC * find ) (  const PBSTREE_IMPL *self, PBSTNode *rtn,
-        const void *item, int ( CC * cmp ) ( const void*, const PBSTNode* , void* ), void *data );
-    void ( CC * for_each ) ( const PBSTREE_IMPL *self, bool reverse,
-        void ( CC * f ) ( PBSTNode*, void* ), void *data );
-    bool ( CC * do_until ) ( const PBSTREE_IMPL *self, bool reverse,
-        bool ( CC * f ) ( PBSTNode*, void* ), void *data );
-    /* end minor version == 0 */
-};
-
-/* latest major version */
-#define PBSTREE_LATEST 1
-
-typedef union PBSTree_vt PBSTree_vt;
-union PBSTree_vt
-{
-    PBSTree_vt_v1 v1;
-};
-
-/*--------------------------------------------------------------------------
- * PBSTree
- *  handle to persisted binary search tree
- */
-struct PBSTree
-{
-    const PBSTree_vt *vt;
-    const P_BSTree *pt;
-};
-
-
-/* Make
- *  swapped and native versions
- *  take a pre-allocated but uninitialized PBSTree structure
- */
-rc_t PBSTreeMakeNative ( PBSTree *pt, const void *addr, size_t size );
-rc_t PBSTreeMakeSwapped ( PBSTree *pt, const void *addr, size_t size );
-
-
-/* Init
- *  initialize the parent class
- */
-rc_t PBSTreeInit ( PBSTree *self, const PBSTree_vt *vt, const P_BSTree *pt );
-
-
-/* PBSTreeGetNodeData
- *  finds node data boundaries
- */
-rc_t PBSTreeGetNodeData ( const PBSTree *self,
-    const void **addr, size_t *size, uint32_t id );
-
-/* PBSTreeDump
- *  dumps a persisted binary search tree
- *
- *  "name" [ IN, NULL OKAY ] - optional tree name
- *
- *  "stdio_file" [ IN ] - an output FILE* opaquely typed to avoid
- *  requiring an include of stdio.h
- *
- *  "indent_level" [ IN ] - the indent tabbing amount for output
- *  the implementation uses a tab setting of 2 spaces
- *
- *  "dump_node" [ IN, NULL OKAY ] and "data" [ IN ] - an optional
- *  node dumping function and associated data
- */
-void PBSTreeDump ( const PBSTree *self, const char *name,
-    void *stdio_file, uint32_t indent_level,
-    void ( CC * dump_node ) ( const void *addr, size_t size, void *stdio_file,
-        uint32_t indent_level, void *data ), void *data );
-
-/* GetIndentString
- *  returns a string of spaces for indentation
- */
-const char *GetIndentString ( uint32_t indent_level, uint32_t indent_tab );
-
-
-/*--------------------------------------------------------------------------
- * P_TTrans
- * PTTrans
- *  the index is represented as a min-sized uint32_t,
- *  the child transitions are represented by two parallel
- *  sequences described below, and data values have an in-line
- *  PTBTree.
- */
-enum
-{
-#if RECORD_HDR_IDX
-    /* transition index from parent to here */
-    pttHdrIdx,
-#endif
-#if RECORD_HDR_DEPTH
-    /* tree depth of node, i.e. transitions from root */
-    pttHdrDepth,
-#endif
-    /* tcnt from TTrans, meaning the number of non-terminals */
-    pttHdrTransCnt,
-
-    /* zero if child array was NULL, or
-       the number of indicies in "idx" array
-       beyond the header values */
-    pttHdrIdxCnt,
-
-    /* the end of "idx" if cnt is zero */
-    pttHdrNullEnd,
-
-    /* the number of sequence entries in "idx",
-       where an entry is either a single index
-       or an index range, as indicated by "child_seq_type" */
-    pttHdrSeqLen = pttHdrNullEnd,
-
-    /* the number of entries in "child" array */
-    pttHdrChildCnt,
-
-    /* index of the last header */
-    pttLastHdr = pttHdrChildCnt,
-
-    /* index of the first entry in "idx" */
-    pttFirstIdx
-};
-
-typedef struct P_TTrans P_TTrans;
-struct P_TTrans
-{
-    /* the variant selected for idx depends upon the recorded
-       character set size, and is typically 8 bit.
-
-       idx [ pttHdrIdx ]      => transition index from parent,
-                                 i.e. character code
-       idx [ pttHdrDepth ]    => node depth
-       idx [ pttHdrTransCnt ] => transition count
-       idx [ pttIdxCnt ]      => index count, meaning the
-                                 dimension of "idx".
-
-       if idx . variant [ pttIdxCnt ] is zero, then the P_TTrans
-       child transition information is skipped, i.e. there is nothing
-       corresponding to the "child" array in a TTrans.
-
-       idx [ pttHdrSeqLen ]   => sequence length
-
-       if the child array exists, the index sequence starts
-       at offset pttFirstIdx into idx, due to the header information. */
-
-    union
-    {
-        uint8_t v8 [ 4 ];
-        uint16_t v16 [ 2 ];
-        uint32_t v32 [ 1 ];
-
-    } idx;
-
-    /* from this point forward, the structure members have calculated offsets */
-#if 0
-
-    /* transition array sequence type bits
-       indexed as: bits [ i / 8 ] & ( 1 << ( i % 8 ) )
-
-       a "0" indicates a simple { idx, trans } pair, while
-       a "1" indicates an index range { lower, upper } and
-       a trans [] corresponding to the range. the index range
-       is fully closed, i.e. upper is inclusive. */
-
-    uint8_t child_seq_type [ ( idx [ pttHdrSeqLen ] + 7 ) / 8 ];
-
-    /* alignment padding - when finding the location of the
-       "child" array ( if it exists ), it is forced to be aligned
-       to the size of its variant */
-
-    if ( offsetof align1 % sizeof child [ 0 ] != 0 )
-        uint8_t align1 [ sizeof child [ 0 ] - offsetof align1 % sizeof child [ 0 ] ];
-
-    /* if keys are embedded within tree, then record a backtrace
-       link from this P_TTrans to its parent */
-    if ( tt -> ext_keys == false )
-    {
-        union
-        {
-            uint8_t v8;
-            uint16_t v16;
-            uint32_t v32;
-
-        } dad;
-    }
-
-    /* transition ids. the variant selected depends upon
-       the number of transition nodes in the tree */
-
-    if ( idx [ pttHdrIdxCnt ] != 0 )
-    {
-        union
-        {
-            uint8_t v8 [ idx [ pttHdrChildCnt ] ];
-            uint16_t v16 [ idx [ pttHdrChildCnt ] ];
-            uint32_t v32 [ idx [ pttHdrChildCnt ] ];
-            
-        } child;
-    }
-    
-    /* alignment padding */
-    if ( offsetof align2 % sizeof uint32_t != 0 )
-    {
-        /* true or false as to whether to expect vals PBSTree */
-        uint8_t has_vals;
-
-        /* padding */
-        uint8_t align2 [ sizeof uint32_t - 1 - offsetof align2 % sizeof uint32_t ];
-    }
-
-    /* a persisted tree */
-    if ( offsetof align2 % sizeof uint32_t == 0 || has_vals != false )
-        PBSTree vals;
-
-    /* final alignment */
-    if ( offsetof align3 % 4 != 0 )
-        uint8_t align3 [ 4 - offsetof align3 % 4 ];
-#endif
-};
-
-typedef struct PTTrans PTTrans;
-struct PTTrans
-{
-    const PTTrans *back;
-
-    union
-    {
-        const uint8_t *v8;
-        const uint16_t *v16;
-        const uint32_t *v32;
-    } idx;
-
-    const uint8_t *child_seq_type;
-
-    union
-    {
-        const uint8_t *v8;
-        const uint16_t *v16;
-        const uint32_t *v32;
-    } dad;
-
-    union
-    {
-        const uint8_t *v8;
-        const uint16_t *v16;
-        const uint32_t *v32;
-    } child;
-
-    PBSTree _val;
-    const PBSTree *vals;
-
-    uint32_t tid;
-#if ! RECORD_HDR_IDX
-    uint32_t tidx;
-#endif
-#if ! RECORD_HDR_DEPTH
-    uint32_t depth;
-#endif
-    uint32_t tcnt;
-    uint32_t icnt;
-    uint32_t slen;
-    int32_t refcount;
-};
-
-/* PTTransGetIdx
- */
-#define PTTransGetIdx( self, tt, zidx ) \
-    ( * ( tt ) -> get_idx ) ( self, zidx )
-
-/* PTTransGetIdxAddr
- */
-#define PTTransGetIdxAddr( self, tt, zidx ) \
-    ( * ( tt ) -> get_idx_addr ) ( self, zidx )
-
-/* PTTransGetDad
- */
-#define PTTransGetDad( self, tt ) \
-    ( * ( tt ) -> get_dad ) ( self )
-
-/* PTTransAlignDadAddr
- */
-#define PTTransAlignDadAddr( self, tt ) \
-    ( * ( tt ) -> align_dad_addr ) ( self, ( tt ) -> backtrace )
-
-/* PTTransGetChild
- */
-#define PTTransGetChild( self, tt, zidx ) \
-    ( * ( tt ) -> get_child ) ( self, zidx )
-
-/* PTTransGetChildAddr
- */
-#define PTTransGetChildAddr( self, tt, zidx ) \
-    ( * ( tt ) -> get_child_addr ) ( self, zidx )
-
-/* PTTransGetTransCharCode
- *  get char code of parent to self transition
- */
-#if RECORD_HDR_IDX
-#define PTTransGetTransCharCode( self, tt ) \
-    PTTransGetIdx ( self, tt, pttHdrIdx )
-#else
-#define PTTransGetTransCharCode( self, tt ) \
-    ( self ) -> tidx
-#endif
-
-/* PTTransGetDepth
- *  get transition depth
- */
-#if RECORD_HDR_DEPTH
-#define PTTransGetDepth( self, tt ) \
-    PTTransGetIdx ( self, tt, pttHdrDepth )
-#else
-#define PTTransGetDepth( self, tt ) \
-    ( self ) -> depth
-#endif
-
-/* PTTransForEach
- */
-void PTTransForEach ( const PTTrans *self, const PTrie *tt,
-    void ( * f ) ( const PTTrans *trans, const PTrie *tt, void *data ), void * data );
-
-/* PTTransDoUntil
- */
-bool PTTransDoUntil ( const PTTrans *self, const PTrie *tt,
-    bool ( * f ) ( const PTTrans *trans, const PTrie *tt, void *data ), void * data );
-
-/* PTTransWhack
- */
-void PTTransWhack ( PTTrans *trans );
-
-/* PTTransDump
- *  takes a FILE* as argument
- *
- *  "tt" [ IN ] - the owning PTrie
- *
- *  "stdio_file" [ IN ] - an output FILE* opaquely typed to avoid
- *  requiring an include of stdio.h
- *
- *  "indent_level" [ IN ] - the indent tabbing amount for output
- *  the implementation uses a tab setting of 2 spaces
- */
-void PTTransDump ( const PTTrans *self , const PTrie *tt,
-    void *stdio_file, uint32_t indent_level,
-    void ( CC * dump_node ) ( const void *addr, size_t size, void *stdio_file,
-        uint32_t indent_level, void *data ), void *data );
-
-
-/*--------------------------------------------------------------------------
- * P_Trie
- * PTrie
- *  persisted TTree
- */
-typedef struct P_Trie P_Trie;
-struct P_Trie
-{
-    /* the number of transition nodes */
-    uint32_t num_trans;
-
-    /* the number of value nodes */
-    uint32_t num_nodes;
-
-    /* size of all P_TTrans data */
-    uint32_t data_size;
-
-    /* storage characteristics */
-#if 0
-    /* keys are like this, built always as little-endian, first fields lowest */
-    uint16_t ext_keys  : 1;
-    uint16_t backtrace : 1;
-    uint16_t id_coding : 3;
-#if EXTENDED_PTRIE
-    uint16_t unused    : 3;
-#else
-    uint16_t unused    : 11;
-#endif
-#elif EXTENDED_PTRIE
-    uint8_t keys;
-#else
-    uint16_t keys;
-#endif  
-#if EXTENDED_PTRIE
-    uint8_t ext_data_size;
-#endif
-
-    /* character set in indexed order
-       N.B. a character value of 0 means
-       unmapped, and is unlikely but possible */
-    uint16_t width;
-    uint32_t rmap [ 1 ];
-
-#if 0
-    /* P_TTrans index - consists of 4-byte
-       offsets relative to "data" member,
-       i.e. an index of 2 means 8 byte offset */
-    union
-    {
-        uint8_t v8 [ num_trans ];
-        uint16_t v16 [ num_trans ];
-        uint32_t v32 [ num_trans ];
-
-    } trans_idx;
-
-    /* an alignment to keep "data" on 4-byte boundary */
-    if ( ( offsetof align1 & 3 ) != 0 )
-        uint8_t align1 [ 4 - ( offsetof align1 & 3 ) ];
-
-    /* P_TTrans objects */
-    uint32_t data [ ( data_size + 3 ) / 4 ];
-
-#endif
-};
-
-
-/* P_TrieExtKeys
- */
-#define P_TrieExtKeys( keys ) \
-    ( ( keys ) & 1 )
-
-/* P_TrieBacktrace
- */
-#define P_TrieBacktrace( keys ) \
-    ( ( keys ) & 2 )
-
-/* P_TrieIdCoding
- */
-#define P_TrieIdCoding( keys ) \
-    ( ( keys >> 2 ) & 7 )
-
-/* P_TrieSetExtKeys
- */
-#define P_TrieSetExtKeys( keys, val ) \
-    ( void ) ( ( val ) ? ( ( keys ) |= 1 ) : ( ( keys ) &= ~ 1 ) )
-
-/* P_TrieSetBacktrace
- */
-#define P_TrieSetBacktrace( keys, val ) \
-    ( void ) ( ( val ) ? ( ( keys ) |= 2 ) : ( ( keys ) &= ~ 2 ) )
-
-/* P_TrieSetIdCoding
- */
-#define P_TrieSetIdCoding( keys, val ) \
-    ( void ) ( ( keys ) = ( ( keys ) & ~ ( 7 << 2 ) ) | ( ( ( val ) & 7 ) << 2 ) )
-
-
-struct PTrie
-{
-    /* virtual functions on PTTrans */
-    uint32_t ( * get_idx ) ( const PTTrans*, uint32_t idx );
-    const void* ( * get_idx_addr ) ( const PTTrans*, uint32_t idx );
-    uint32_t ( * get_dad ) ( const PTTrans* );
-    const void* ( * align_dad_addr ) ( PTTrans*, bool backtrace );
-    uint32_t ( * get_child ) ( const PTTrans*, uint32_t idx );
-    const void* ( * get_child_addr ) ( const PTTrans*, uint32_t tcnt );
-
-    /* virtual functions on PTrie */
-    size_t ( * get_node_off ) ( const PTrie*, uint32_t idx );
-    uint32_t ( * encode_node_id ) ( const PTrie*,
-        uint32_t tid, uint32_t btid );
-    rc_t ( * decode_node_id ) ( const PTrie*, uint32_t id,
-        uint32_t *tid, uint32_t *btid );
-    uint32_t ( * decode_char_id ) ( const PTrie*, uint32_t id );
-
-    /* P_TTrans index to character map */
-    const uint32_t *_rmap;
-
-    /* P_TTrans offsets */
-    union
-    {
-        const uint8_t *v8;
-        const uint16_t *v16;
-        const uint32_t *v32;
-        const uint64_t *v64;
-    } trans_off;
-
-    /* P_TTrans PTrans objects */
-    union
-    {
-        const uint32_t *v32;
-        const uint64_t *v64;
-    } data;
-
-    /* the number of transition nodes */
-    uint32_t num_trans;
-
-    /* the number of value nodes */
-    uint32_t num_nodes;
-
-    /* size of all P_TTrans data */
-    size_t data_size;
-
-    /* storage characteristics */
-    uint8_t ext_keys;
-    uint8_t backtrace;
-    uint8_t id_coding;
-    uint8_t byteswap;
-
-    /* width of character map & trans array */
-    uint16_t width;
-
-    /* range of UTF-32 input characters */
-    uint32_t first_char;
-    uint32_t last_char;
-
-    /* index of an unmapped character */
-    uint16_t unmapped_idx;
-
-    /* character to index map */
-    uint16_t map [ 1 ];
-};
-
-
-
-/* PTrieGetNodeOff
- */
-#define PTrieGetNodeOff( self, zidx ) \
-    ( * ( self ) -> get_node_off ) ( self, zidx )
-
-/* PTrieEncodeNodeId
- */
-#define PTrieEncodeNodeId( self, tid, btid ) \
-    ( * ( self ) -> encode_node_id ) ( self, tid, btid )
-
-/* PTrieDecodeNodeId
- */
-#define PTrieDecodeNodeId( self, id, tid, btid ) \
-    ( * ( self ) -> decode_node_id ) ( self, id, tid, btid )
-
-/* PTrieDecodeCharId
- */
-#define PTrieDecodeCharId( self, idx ) \
-    ( * ( self ) -> decode_char_id ) ( self, idx )
-
-
-/* PTrieInitNode
- *  takes a one-based index
- */
-rc_t PTrieInitNode ( const PTrie *self, PTTrans *trans, uint32_t idx );
-
-/* PTrieMakeNode
- *  takes a one-based index
- */
-rc_t PTrieMakeNode ( const PTrie *self, PTTrans **transp, uint32_t idx );
-
-/* PTrieDump
- *  takes a FILE* as argument
- *
- *  "name" [ IN, NULL OKAY ] - optional ttree name
- *
- *  "stdio_file" [ IN ] - an output FILE* opaquely typed to avoid
- *  requiring an include of stdio.h
- *
- *  "indent_level" [ IN ] - the indent tabbing amount for output
- *  the implementation uses a tab setting of 2 spaces
- *
- *  "dump_node" [ IN, NULL OKAY ] and "data" [ IN ] - an optional
- *  node dumping function and associated data
- */
-void PTrieDump ( const PTrie *self, const char *name,
-    void *stdio_file, uint32_t indent_level,
-    void ( * dump_node ) ( const void *addr, size_t size, void *stdio_file,
-        uint32_t indent_level, void *data ), void *data );
-
-/* PTrieDumpTrans
- *  takes a FILE* as argument
- *
- *  the indent level is used for hierarchy.
- *  2 spaces are emitted at the left margin for each level.
- */
-void PTrieDumpTrans ( const PTrie *self , uint32_t id,
-    void *stdio_file, uint32_t indent_level,
-    void ( * dump_node ) ( const void *addr, size_t size, void *stdio_file,
-        uint32_t indent_level, void *data ), void *data );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_pbstree_priv_ */
diff --git a/libs/klib/pbstree-swapped.c b/libs/klib/pbstree-swapped.c
deleted file mode 100644
index f9a9160..0000000
--- a/libs/klib/pbstree-swapped.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#undef SWAP_PERSISTED
-#define SWAP_PERSISTED 1
-#include "pbstree-impl.c"
-#undef SWAP_PERSISTED
diff --git a/libs/klib/pbstree.c b/libs/klib/pbstree.c
deleted file mode 100644
index 09f8b9c..0000000
--- a/libs/klib/pbstree.c
+++ /dev/null
@@ -1,395 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include "pbstree-priv.h"
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * PBSTree
- *  a flattened b-tree
- */
-
-/* Make
- *  make a PBSTree structure
- *  the memory reference passed in is borrowed
- */
-LIB_EXPORT rc_t CC PBSTreeMake ( PBSTree **ptp, const void *addr, size_t size, bool byteswap )
-{
-    rc_t rc;
-
-    if ( ptp == NULL )
-        rc = RC ( rcCont, rcTree, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( size == 0 )
-            rc = RC ( rcCont, rcTree, rcConstructing, rcData, rcInvalid );
-        else if ( addr == NULL )
-            rc = RC ( rcCont, rcTree, rcConstructing, rcData, rcNull );
-        else
-        {
-            PBSTree *pt = malloc ( sizeof * pt );
-            if ( pt == NULL )
-                rc = RC ( rcCont, rcTree, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = byteswap ?
-                    PBSTreeMakeSwapped ( pt, addr, size ):
-                    PBSTreeMakeNative ( pt, addr, size );
-                if ( rc == 0 )
-                {
-                    * ptp = pt;
-                    return 0;
-                }
-
-                free ( pt );
-            }
-        }
-
-        * ptp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* Init - PROTECTED
- *  initialize the parent class
- */
-rc_t PBSTreeInit ( PBSTree *self, const PBSTree_vt *vt, const P_BSTree *pt )
-{
-    if ( self == NULL )
-        return RC ( rcCont, rcTree, rcConstructing, rcSelf, rcNull );
-
-    if ( vt == NULL )
-        return RC ( rcCont, rcTree, rcConstructing, rcInterface, rcNull );
-    if ( vt -> v1 . maj == 0 )
-        return RC ( rcCont, rcTree, rcConstructing, rcInterface, rcInvalid );
-    if ( vt -> v1 . maj > PBSTREE_LATEST )
-        return RC ( rcFS, rcFile, rcConstructing, rcInterface, rcBadVersion );
-
-    if ( pt == NULL )
-        return RC ( rcCont, rcTree, rcConstructing, rcParam, rcNull );
-
-#if _DEBUGGING
-    if ( vt -> v1 . maj == 1 )
-    {
-        /* check v1.1 methods */
-        if ( vt -> v1 . destroy == NULL ||
-             vt -> v1 . count == NULL ||
-             vt -> v1 . depth == NULL ||
-             vt -> v1 . size == NULL ||
-             vt -> v1 . get_node_data == NULL ||
-             vt -> v1 . find == NULL ||
-             vt -> v1 . for_each == NULL ||
-             vt -> v1 . do_until == NULL )
-        return RC ( rcCont, rcTree, rcConstructing, rcInterface, rcNull );
-    }
-#endif
-
-    /* everything is okay */
-    self -> vt = vt;
-    self -> pt = pt;
-    return 0;
-}
-
-
-/* Count
- *  returns number of elements in b-tree
- */
-LIB_EXPORT uint32_t CC PBSTreeCount ( const PBSTree *self )
-{
-    if ( self != NULL )
-    {
-        switch ( self -> vt -> v1 . maj )
-        {
-        case 1:
-            return ( * self -> vt -> v1 . count ) ( self );
-        }
-    }
-    return 0;
-}
-
-/* Depth
- *  returns number of layers in b-tree
- */
-LIB_EXPORT uint32_t CC PBSTreeDepth ( const PBSTree *self )
-{
-    if ( self != NULL )
-    {
-        switch ( self -> vt -> v1 . maj )
-        {
-        case 1:
-            return ( * self -> vt -> v1 . depth ) ( self );
-        }
-    }
-
-    return 0;
-}
-
-/* Size
- *  returns the size in bytes
- *  of the PBSTree image
- */
-LIB_EXPORT size_t CC PBSTreeSize ( const PBSTree *self )
-{
-    if ( self != NULL )
-    {
-        switch ( self -> vt -> v1 . maj )
-        {
-        case 1:
-            return ( * self -> vt -> v1 . size ) ( self );
-        }
-    }
-
-    return 0;
-}
-
-
-/* GetNodeData - INTERNAL
- *  finds node data boundaries
- */
-rc_t PBSTreeGetNodeData ( const PBSTree *self,
-    const void **addr, size_t *size, uint32_t id )
-{
-    assert ( self != NULL );
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . get_node_data ) ( self, addr, size, id );
-    }
-
-    return RC ( rcCont, rcTree, rcAccessing, rcInterface, rcBadVersion );
-}
-
-
-/* GetNode
- *  gets a PBSTNode from an id
- *
- *  "node" [ OUT ] - return parameter for node
- *
- *  "id" [ IN ] - a 1-based integer node id
- *
- *  return values:
- *    EINVAL => an invalid parameter was passed
- *    ENOENT => id out of range
- */
-LIB_EXPORT rc_t CC PBSTreeGetNode ( const PBSTree *self, PBSTNode *node, uint32_t id )
-{
-    rc_t rc;
-    if ( node == NULL )
-        rc = RC ( rcCont, rcTree, rcAccessing, rcNode, rcNull );
-    else
-    {
-        if ( self == NULL)
-            rc = RC ( rcCont, rcTree, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = PBSTreeGetNodeData ( self,
-                & node -> data . addr, & node -> data . size, id );
-            if ( rc == 0 )
-            {
-                node -> internal = self;
-                node -> id = id;
-                return 0;
-            }
-        }
-
-        node -> data . addr = node -> internal = NULL;
-        node -> data . size = 0;
-        node -> id = 0;
-    }
-    return rc;
-}
-
-/* PBSTreeFind
- *  find an object within tree
- *  "cmp" function returns equivalent of "item" - "n"
- */
-LIB_EXPORT uint32_t CC PBSTreeFind ( const PBSTree *self, PBSTNode *n, const void *item,
-    int ( CC * cmp ) ( const void *item, const PBSTNode *n, void *data ), void *data )
-{
-    PBSTNode buffer;
-
-    if ( n == NULL )
-        n = & buffer;
-
-    n -> internal = self;
-    if ( self != NULL )
-    {
-        switch ( self -> vt -> v1 . maj )
-        {
-        case 1:
-            return ( * self -> vt -> v1 . find ) ( self, n, item, cmp, data );
-        }
-    }
-
-    n -> data . addr = NULL;
-    n -> data . size = 0;
-    return n -> id = 0;
-}
-
-/* PBSTreeForEach
- *  executes a function on each tree element
- */
-LIB_EXPORT void CC PBSTreeForEach ( const PBSTree *self, bool reverse,
-    void ( CC * f ) ( PBSTNode *n, void *data ), void *data )
-{
-    if ( self != NULL && f != NULL )
-    {
-        switch ( self -> vt -> v1 . maj )
-        {
-        case 1:
-            ( * self -> vt -> v1 . for_each ) ( self, reverse, f, data );
-            break;
-        }
-    }
-}
-
-/* PBSTreeDoUntil
- *  executes a function on each element
- *  until the function returns true
- */
-LIB_EXPORT bool CC PBSTreeDoUntil ( const PBSTree *self, bool reverse,
-    bool ( CC * f ) ( PBSTNode *n, void *data ), void *data )
-{
-    if ( self != NULL && f != NULL )
-    {
-        switch ( self -> vt -> v1 . maj )
-        {
-        case 1:
-            return ( * self -> vt -> v1 . do_until ) ( self, reverse, f, data );
-        }
-    }
-
-    return false;
-}
-
-/* PBSTreeWhack
- *  whacks PBSTree object
- *  does not free memory reference
- */
-LIB_EXPORT void CC PBSTreeWhack ( PBSTree *self )
-{
-    if ( self != NULL )
-    {
-        switch ( self -> vt -> v1 . maj )
-        {
-        case 1:
-            ( * self -> vt -> v1 . destroy ) ( self );
-            break;
-        }
-    }
-}
-
-
-/*--------------------------------------------------------------------------
- * PBSTNode
- *  identifies a node within persisted b-tree
- */
-
-/* Next
- *  returns next node id
- */
-LIB_EXPORT uint32_t CC PBSTNodeNext ( PBSTNode *n )
-{
-    if ( n == NULL )
-        return 0;
-
-    if ( PBSTreeGetNodeData ( n -> internal,
-             & n -> data . addr, & n -> data . size, n -> id + 1 ) )
-        return 0;
-
-    return ++ n -> id;
-}
-
-/* Prev
- *  returns prev node id
- */
-LIB_EXPORT uint32_t CC PBSTNodePrev ( PBSTNode *n )
-{
-    if ( n == NULL )
-        return 0;
-
-    if ( PBSTreeGetNodeData ( n -> internal,
-             & n -> data . addr, & n -> data . size, n -> id - 1 ) )
-        return 0;
-
-    return -- n -> id;
-}
-
-/* FindNext
- *  find next element satisfying criteria
- */
-LIB_EXPORT uint32_t CC PBSTNodeFindNext ( PBSTNode *n,
-    bool ( CC * f ) ( const PBSTNode *n ) )
-{
-    PBSTNode save;
-
-    if ( n == NULL || f == NULL )
-        return 0;
-
-    save = * n;
-
-    while ( PBSTNodeNext ( n ) )
-    {
-        if ( ( * f ) ( n ) )
-            return n -> id;
-    }
-
-    * n = save;
-    return 0;
-}
-
-/* FindPrev
- *  find previous element satisfying criteria
- */
-LIB_EXPORT uint32_t CC PBSTNodeFindPrev ( PBSTNode *n, 
-    bool ( CC * f ) ( const PBSTNode *n ) )
-{
-    PBSTNode save;
-
-    if ( n == NULL || f == NULL )
-        return 0;
-
-    save = * n;
-
-    while ( PBSTNodePrev ( n ) )
-    {
-        if ( ( * f ) ( n ) )
-            return n -> id;
-    }
-
-    * n = save;
-    return 0;
-}
diff --git a/libs/klib/printf.c b/libs/klib/printf.c
deleted file mode 100644
index d11b1fe..0000000
--- a/libs/klib/printf.c
+++ /dev/null
@@ -1,3540 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/writer.h>
-#include <klib/symbol.h>
-#include <klib/time.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-
-#include "writer-priv.h"
-
-#include <os-native.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <stdio.h>
-#include <assert.h>
-#include <va_copy.h>
-
-/* the number of PrintFmt, PrintArg and String
-   elements to allocate in function-local storage */
-#define LOCAL_FMT_COUNT 64
-
-
-/* for testing purposes - temporarily define this guy */
-#define STDC_COMPATIBILITY 1
-
-/***********************************
- * OLD PRINTF CODE IS NOW INACTIVE *
- ***********************************/
-#define USE_OLD_PRINTF 0
-
-/***********************************
- * OUR OLD BUDDY                   *
- ***********************************/
-#if WINDOWS
-#undef snprintf
-#define snprintf _snprintf
-#endif
-
-/**************************************
- * NAMING TRICKS TO HAVE BOTH ON HAND *
- **************************************/
-#if USE_OLD_PRINTF
-#define old_string_vprintf string_vprintf
-#define old_string_printf string_printf
-#define old_vkfprintf vkfprintf
-#define old_kfprintf kfprintf
-#else
-#define new_string_vprintf string_vprintf
-#define new_string_printf string_printf
-#define new_vkfprintf vkfprintf
-#define new_kfprintf kfprintf
-#endif
-
-/************************************
- * BEHAVIORS SENSITIVE TO STDC MODE *
- ************************************/
-#if STDC_COMPATIBILITY
-#define NULL_STRING_TEXT "(null)"
-#else
-#define NULL_STRING_TEXT "NULL"
-#endif
-#define DOUSE_NUM_PREFIX_IF_ZERO              STDC_COMPATIBILITY
-#define KEEP_OCT_PREFIX_IF_ZERO               STDC_COMPATIBILITY
-#define OCTAL_PREFIX_COUNTS_TOWARD_PRECISION  STDC_COMPATIBILITY
-#define HEX_PREFIX_FOLLOWS_CASE               STDC_COMPATIBILITY
-/* Present in 2.3.3 (from SLES 9.3), absent in 2.5 (from CentOS 5.6) */
-#define EMULATE_SMALLINT_EXTENSION_BUG      ( STDC_COMPATIBILITY && defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 5) ) )
-#define ZERO_PAD_ONLY_NUMBERS               ( !STDC_COMPATIBILITY || defined(__GLIBC__) )
-
-#define USE_LIB_FLOAT 1
-
-static
-size_t string_flush ( char *dst, size_t bsize, const KWrtHandler *flush, rc_t *rc, size_t *total )
-{
-    size_t num_writ, flushed;
-    for ( flushed = 0; flushed < bsize; flushed += num_writ )
-    {
-        * rc = ( * flush -> writer ) ( flush -> data, dst, bsize, & num_writ );
-        if ( * rc != 0 )
-            break;
-        if ( num_writ == 0 )
-            break;
-    }
-
-    if ( * rc == 0 )
-    {
-        * total += flushed;
-        if ( flushed < bsize )
-            memmove ( dst, dst + flushed, bsize - flushed );
-    }
-
-    return bsize - flushed;
-}
-
-static
-rc_t CC string_flush_printf ( char *dst, size_t bsize,
-    const KWrtHandler *flush, size_t *num_writ, const char *fmt, ... );
-
-static
-rc_t string_flush_vprintf ( char *dst, size_t bsize, const KWrtHandler *flush,
-    size_t *num_writ, const char *fmt, va_list args )
-{
-    rc_t rc;
-    size_t sidx, didx, total, sz;
-
-    uint32_t *np;
-    uint32_t u32;
-    int64_t i64;
-    uint64_t u64;
-    double f64;
-#if ! USE_LIB_FLOAT
-    uint64_t frac;
-    double ftmp;
-    uint32_t exponent;
-#endif
-    const char *cp, *end;
-    const String *str;
-    const KSymbol *sym;
-    const KTime *tm;
-
-    char buff [ 256 ];
-    char use_sign, padding;
-    const char *hex_digits;
-    uint32_t i, j, len, digits, min_field_width, max_field_width, precision;
-    bool left_align, comma_separate, have_precision, byte_size, half_size, long_size;
-    bool alternate, date_time_zone;
-#if ! USE_LIB_FLOAT
-    bool trim_trailing_zeros;
-#endif
-
-    if ( fmt == NULL )
-    {
-        rc = RC ( rcText, rcString, rcFormatting, rcParam, rcNull );
-        if ( num_writ != NULL )
-            * num_writ = 0;
-        return rc;
-    }
-
-    if ( fmt [ 0 ] == 0 )
-    {
-        rc = RC ( rcText, rcString, rcFormatting, rcParam, rcEmpty );
-        if ( num_writ != NULL )
-            * num_writ = 0;
-        return rc;
-    }
-
-    if ( dst == NULL )
-    {
-        flush = NULL;
-        bsize = 0;
-    }
-
-    for ( rc = 0, sidx = didx = total = 0; fmt [ sidx ] != 0 && rc == 0; ++ sidx )
-    {
-        /* flush buffer */
-        if ( didx == bsize && flush != NULL )
-        {
-            didx = string_flush ( dst, didx, flush, & rc, & total );
-            if ( rc != 0 )
-                break;
-        }
-
-        /* copy until ending NUL or '%' */
-        if ( fmt [ sidx ] != '%' )
-        {
-            if ( didx < bsize )
-                dst [ didx ] = fmt [ sidx ];
-            ++ didx;
-            continue;
-        }
-
-        /* process escaped '%' */
-        if ( fmt [ ++ sidx ] == '%' )
-        {
-            if ( didx < bsize )
-                dst [ didx ] = '%';
-            ++ didx;
-            continue;
-        }
-
-        digits = 0;
-
-        /* process flags */
-        use_sign = 0;
-        left_align = comma_separate = alternate = false;
-        padding = ' ';
-
-        while ( 1 )
-        {
-            switch ( fmt [ sidx ] )
-            {
-            case '-':
-                left_align = true;
-                padding = ' ';
-                ++ sidx;
-                continue;
-            case '+':
-                use_sign = '+';
-                ++ sidx;
-                continue;
-            case ' ':
-                if ( use_sign != '+' )
-                    use_sign = ' ';
-                ++ sidx;
-                continue;
-            case '0':
-                if ( ! left_align )
-                    padding = '0';
-                ++ sidx;
-                continue;
-            case ',':
-            case '\'':
-                comma_separate = true;
-                ++ sidx;
-                continue;
-            case '#':
-                alternate = true;
-                ++ sidx;
-                continue;
-            }
-
-            break;
-        }
-
-        /* field width */
-        min_field_width = 0;
-        if ( fmt [ sidx ] == '*' )
-        {
-            min_field_width = va_arg ( args, unsigned int );
-            ++ sidx;
-        }
-        else while ( isdigit ( fmt [ sidx ] ) )
-        {
-            min_field_width *= 10;
-            min_field_width += fmt [ sidx ++ ] - '0';
-        }
-
-        /* precision */
-        precision = 0;
-        have_precision = false;
-        if ( fmt [ sidx ] == '.' )
-        {
-            padding = ' ';
-            have_precision = true;
-            if ( fmt [ ++ sidx ] == '*' ) {
-                precision = va_arg ( args, unsigned int );
-                sidx++;
-            } else for ( ; isdigit ( fmt [ sidx ] ); ++ sidx )
-            {
-                precision *= 10;
-                precision += fmt [ sidx ] - '0';
-            }
-        }
-
-        /* storage size */
-        byte_size = half_size = long_size = date_time_zone = false;
-        switch ( fmt [ sidx ] )
-        {
-        case 't':
-            byte_size = true;
-            ++ sidx;
-            break;
-        case 'h':
-            /* this should not be necessary */
-            if ( fmt [  ++ sidx ] != 'h' )
-                half_size = true;
-            else
-            {
-                byte_size = true;
-                ++ sidx;
-            }
-            break;
-        case 'l':
-            long_size = true;
-            ++ sidx;
-            break;
-        case 'z':
-            date_time_zone = true;
-            if ( sizeof ( size_t ) == sizeof ( uint64_t ) )
-                long_size = true;
-            ++ sidx;
-            break;
-        }
-
-        /* format */
-#if ! USE_LIB_FLOAT
-        trim_trailing_zeros = false;
-#endif
-        switch ( fmt [  sidx  ] )
-        {
-        case 'd':
-        case 'i':
-
-            /* retrieve argument as signed integer */
-            if ( byte_size )
-                i64 = ( int8_t ) va_arg ( args, int );
-            else if ( half_size )
-                i64 = ( int16_t ) va_arg ( args, int );
-            else if ( long_size )
-                i64 = va_arg ( args, int64_t );
-            else
-                i64 = va_arg ( args, int32_t );
-
-#if ! STDC_COMPATIBILITY
-            /* detect zero */
-            if ( i64 == 0 )
-                use_sign = 0;
-            else
-#endif
-            /* detect negative */
-            if ( i64 < 0 )
-            {
-                use_sign = '-';
-                i64 = - i64;
-            }
-
-            i = sizeof buff;
-
-#if ! USE_LIB_FLOAT
-        make_signed_integer:
-#endif
-            /* convert to numeral */
-            if ( comma_separate ) for ( -- i, j = 0; ; -- i, ++ j )
-            {
-                if ( j == 3 )
-                {
-                    buff [ -- i ] = ',';
-                    j = 0;
-                }
-                buff [ i ] =  ( i64 % 10 ) + '0';
-                ++ digits;
-                if ( ( i64 /= 10 ) == 0 )
-                    break;
-            }
-            else for ( -- i, digits = 0; ; -- i )
-            {
-                buff [ i ] =  ( i64 % 10 ) + '0';
-                ++ digits;
-                if ( ( i64 /= 10 ) == 0 )
-                    break;
-            }
-
-        insert_integer:
-
-            /* the actual length */
-            len = sizeof buff - i;
-
-            /* test for buffer flush */
-            if ( flush != NULL && didx < bsize )
-            {
-                max_field_width = len;
-                if ( len < precision )
-                    max_field_width = precision;
-                max_field_width += ( use_sign != 0 );
-                if ( max_field_width < min_field_width )
-                    max_field_width = min_field_width;
-                if ( didx + max_field_width > bsize )
-                {
-                    didx = string_flush ( dst, didx, flush, & rc, & total );
-                    if ( rc != 0 )
-                        break;
-                }
-            }
-
-            /* insert left-aligned */
-            if ( left_align )
-            {
-                /* sign */
-                if ( use_sign != 0 )
-                {
-                    if ( didx < bsize )
-                        dst [ didx ] = use_sign;
-                    ++ didx;
-                    ++ len;
-                }
-
-                /* precision */
-                for ( ; digits < precision; ++ didx, ++ len, ++ digits )
-                {
-                    if ( didx < bsize )
-                        dst [ didx ] = '0';
-                }
-
-                /* value */
-                for ( ; i < sizeof buff; ++ didx, ++ i )
-                {
-                    if ( didx < bsize )
-                        dst [ didx ] = buff [ i ];
-                }
-
-                /* padding */
-                for ( ; len < min_field_width; ++ didx, ++ len )
-                {
-                    if ( didx < bsize )
-                        dst [ didx ] = ' ';
-                }
-            }
-            /* insert right-aligned */
-            else
-            {
-                /* remove sign from field width */
-                if ( use_sign != 0 && min_field_width != 0 )
-                    -- min_field_width;
-
-                /* zero padding means issue sign first */
-                if ( use_sign != 0 && padding == '0' )
-                {
-                    if ( didx < bsize )
-                        dst [ didx ] = use_sign;
-                    ++ didx;
-                    use_sign = 0;
-                }
-
-                /* adjust length for precision */
-                if ( precision > digits )
-                    len += precision - digits;
-
-                /* apply padding */
-                for ( ; len < min_field_width; ++ didx, -- min_field_width )
-                {
-                    if ( didx < bsize )
-                        dst [ didx ] = padding;
-                }
-
-                /* sign */
-                if ( use_sign != 0 )
-                {
-                    if ( didx < bsize )
-                        dst [ didx ] = use_sign;
-                    ++ didx;
-                }
-
-                /* precision */
-                for ( ; digits < precision; ++ didx, ++ digits )
-                {
-                    if ( didx < bsize )
-                        dst [ didx ] = '0';
-                }
-
-                /* value */
-                for ( ; i < sizeof buff; ++ didx, ++ i )
-                {
-                    if ( didx < bsize )
-                        dst [ didx ] = buff [ i ];
-                }
-            }
-
-            break;
-
-        case 'u':
-
-            /* retrieve argument as unsigned integer */
-            if ( byte_size )
-                u64 = ( uint8_t ) va_arg ( args, int );
-            else if ( half_size )
-                u64 = ( uint16_t ) va_arg ( args, int );
-            else if ( long_size )
-                u64 = va_arg ( args, uint64_t );
-            else
-                u64 = va_arg ( args, uint32_t );
-
-            /* no sign */
-            use_sign = 0;
-
-            i = sizeof buff - 1;
-
-            /* convert to numeral */
-            if ( comma_separate ) for ( j = digits = 0; ; -- i, ++ j )
-            {
-                if ( j == 3 )
-                {
-                    buff [ -- i ] = ',';
-                    j = 0;
-                }
-                buff [ i ] =  ( u64 % 10 ) + '0';
-                ++ digits;
-                if ( ( u64 /= 10 ) == 0 )
-                    break;
-            }
-            else for ( digits = 0; ; -- i )
-            {
-                buff [ i ] =  ( u64 % 10 ) + '0';
-                ++ digits;
-                if ( ( u64 /= 10 ) == 0 )
-                    break;
-            }
-
-            goto insert_integer;
-
-        case 'p':
-
-            /* retrieve argument as unsigned integer */
-            if ( sizeof ( void* ) == sizeof ( uint32_t ) )
-                u64 = va_arg ( args, uint32_t );
-            else
-                u64 = va_arg ( args, uint64_t );
-
-            goto make_hex_integer;
-
-        case 'x':
-        case 'X':
-
-            /* retrieve argument as unsigned integer */
-            if ( byte_size )
-                u64 = ( uint8_t ) va_arg ( args, int );
-            else if ( half_size )
-                u64 = ( uint16_t ) va_arg ( args, int );
-            else if ( long_size )
-                u64 = va_arg ( args, uint64_t );
-            else
-                u64 = va_arg ( args, uint32_t );
-
-        make_hex_integer:
-
-            /* choose numeric case */
-            hex_digits = ( fmt [ sidx ] == 'x' ) ?
-                "0123456789abcdefx" : "0123456789ABCDEFX";
-
-            /* no sign */
-            use_sign = 0;
-
-            i = sizeof buff - 1;
-
-            /* convert to numeral */
-            if ( comma_separate ) for ( j = digits = 0; ; -- i, ++ j )
-            {
-                if ( j == 3 )
-                {
-                    buff [ -- i ] = ',';
-                    j = 0;
-                }
-                buff [ i ] =  hex_digits [ u64 & 15 ];
-                ++ digits;
-                if ( ( u64 >>= 4 ) == 0 )
-                    break;
-            }
-            else for ( digits = 0; ; -- i )
-            {
-                buff [ i ] =  hex_digits [ u64 & 15 ];
-                ++ digits;
-                if ( ( u64 >>= 4 ) == 0 )
-                    break;
-            }
-
-            if ( alternate )
-            {
-                buff [ -- i ] = hex_digits [ 16 ];
-                buff [ -- i ] = '0';
-            }
-
-            goto insert_integer;
-
-        case 'o':
-
-            /* retrieve argument as unsigned integer */
-            if ( byte_size )
-                u64 = ( uint8_t ) va_arg ( args, int );
-            else if ( half_size )
-                u64 = ( uint16_t ) va_arg ( args, int );
-            else if ( long_size )
-                u64 = va_arg ( args, uint64_t );
-            else
-                u64 = va_arg ( args, uint32_t );
-
-            /* no sign */
-            use_sign = 0;
-
-            i = sizeof buff - 1;
-
-            /* convert to numeral */
-            if ( comma_separate ) for ( j = digits = 0; ; -- i, ++ j )
-            {
-                if ( j == 3 )
-                {
-                    buff [ -- i ] = ',';
-                    j = 0;
-                }
-                buff [ i ] =  ( u64 & 7 ) + '0';
-                ++ digits;
-                if ( ( u64 >>= 3 ) == 0 )
-                    break;
-            }
-            else for ( digits = 0; ; -- i )
-            {
-                buff [ i ] =  ( u64 & 7 ) + '0';
-                ++ digits;
-                if ( ( u64 >>= 3 ) == 0 )
-                    break;
-            }
-
-            if ( alternate )
-            {
-                buff [ -- i ] = '0';
-#if STDC_COMPATIBILITY
-                ++ digits;
-#endif
-            }
-
-            goto insert_integer;
-
-        case 'b':
-
-            /* retrieve argument as unsigned integer */
-            if ( byte_size )
-                u64 = ( uint8_t ) va_arg ( args, int );
-            else if ( half_size )
-                u64 = ( uint16_t ) va_arg ( args, int );
-            else if ( long_size )
-                u64 = va_arg ( args, uint64_t );
-            else
-                u64 = va_arg ( args, uint32_t );
-
-            /* no sign */
-            use_sign = 0;
-
-            i = sizeof buff - 1;
-
-            /* convert to numeral */
-            if ( comma_separate ) for ( j = digits = 0; ; -- i, ++ j )
-            {
-                if ( j == 3 )
-                {
-                    buff [ -- i ] = ',';
-                    j = 0;
-                }
-                buff [ i ] =  ( u64 & 1 ) + '0';
-                ++ digits;
-                if ( ( u64 >>= 1 ) == 0 )
-                    break;
-            }
-            else for ( i = sizeof buff - 1; ; -- i )
-            {
-                buff [ i ] =  ( u64 & 1 ) + '0';
-                ++ digits;
-                if ( ( u64 >>= 1 ) == 0 )
-                    break;
-            }
-
-            if ( alternate )
-            {
-                buff [ -- i ] = 'b';
-                buff [ -- i ] = '0';
-            }
-
-            goto insert_integer;
-
-#if USE_LIB_FLOAT
-        case 'g':
-        case 'e':
-        case 'f':
-        {
-            char subfmt [ 16 ];
-            char * psubfmt = subfmt;
-
-            *psubfmt++ = '%';
-
-            if (alternate)
-                *psubfmt++ = '#';
-
-            if (use_sign)
-                *psubfmt++ = use_sign;
-
-            if (left_align)
-                *psubfmt++ = '-';
-            else if (padding == '0')
-                *psubfmt++ = '0';
-
-            *psubfmt++ = '*';
-            *psubfmt++ = '.';
-            *psubfmt++ = '*';
-            *psubfmt++ = fmt [  sidx  ];
-            *psubfmt = '\0';
-            
-            /* retrieve argument as double or long double */
-        
-            if ( long_size )
-                f64 = ( double ) va_arg ( args, long double );
-            else
-                f64 = va_arg ( args, double );
-
-            if ( ! have_precision )
-                precision = 6;
-            else if ( precision > 20 )
-                precision = 20;
-
-            i = snprintf (buff, sizeof buff, subfmt, min_field_width, precision, f64);
-
-            if ( i >= sizeof buff )
-            {
-                i = sizeof buff - 1;
-                buff [ i ] = '\0';
-            }
-            min_field_width = 0;
-            have_precision = false;
-
-            cp = buff;
-            goto make_nul_term_string;
-        }
-#else
-        case 'g':
-            trim_trailing_zeros = true;
-        case 'e':
-
-#define HANDLE_NAN() \
-            switch (fpclassify (f64))                   \
-            {                                           \
-            case FP_NAN:                                \
-                cp = "nan";                             \
-                goto make_nul_term_string;              \
-            case FP_INFINITE:                           \
-                cp = (f64 < 0) ? "-inf" : "inf";        \
-                goto make_nul_term_string;              \
-            }
-
-
-            /* retrieve argument as double or long double */
-        
-            if ( long_size )
-                f64 = ( double ) va_arg ( args, long double );
-            else
-                f64 = va_arg ( args, double );
-
-            HANDLE_NAN();
-
-            if ( f64 < 0 )
-            {
-                use_sign = '-';
-                f64 = - f64;
-            }
-
-            exponent = 0;
-            buff [ sizeof buff - 3 ] = '+';
-            buff [ sizeof buff - 4 ] = 'e';
-
-            i = len = sizeof buff;
-
-            ftmp = f64;
-
-            if ( f64 >= 10.0 )
-            {
-                for ( ftmp = f64 / 10, exponent = 1; ftmp >= 10.0; ++ exponent )
-                    ftmp /= 10;
-
-                if ( exponent < precision && fmt [ sidx ] == 'g' )
-                    goto make_normal_float;
-            }
-            else if ( f64 < 1.0 && f64 > 0.0 )
-            {
-                buff [ sizeof buff - 3 ] = '-';
-                for ( ftmp = f64 * 10, exponent = 1; ftmp < 1.0; ++ exponent )
-                    ftmp *= 10;
-
-                if ( exponent <= 4 && fmt [ sidx ] == 'g' )
-                    goto make_normal_float;
-            }
-            else if ( fmt [ sidx ] == 'g' )
-            {
-                goto make_normal_float;
-            }
-
-            /* just for safety */
-            exponent %= 100;
-
-            trim_trailing_zeros = false;
-
-            f64 = ftmp;
-
-            buff [ sizeof buff - 1 ] = ( exponent % 10 ) + '0';
-            buff [ sizeof buff - 2 ] = ( exponent / 10 ) + '0';
-
-            i = len = sizeof buff - 4;
-            goto make_normal_float;
-
-        case 'f':
-
-            /* retrieve argument as double or long double */
-            if ( long_size )
-                f64 = ( double ) va_arg ( args, long double );
-            else
-                f64 = va_arg ( args, double );
-
-            HANDLE_NAN();
-
-            if ( f64 < 0 )
-            {
-                use_sign = '-';
-                f64 = - f64;
-            }
-
-            i = len = sizeof buff;
-
-        make_normal_float:
-
-            if ( ! have_precision )
-                precision = 6;
-            else if ( precision > 20 )
-                precision = 20;
-
-            ftemp = 0.5;
-            for (j = 0; j < precision ; ++j)
-                ftemp /= 10;
-
-            f64 += ftemp;
-
-
-            /* save off integral portion */
-            i64 = ( int64_t ) f64;
-
-            /* convert to fraction */
-            f64 = f64 - i64;
-
-            /* promote by precision */
-            for ( j = 0; j < precision; ++ j )
-                f64 *= 10;
-
-            for ( frac = ( uint64_t ) f64; i + precision > len; frac /= 10 )
-                buff [ -- i ] = frac % 10 + '0';
-
-            if ( trim_trailing_zeros )
-            {
-                for ( j = len; -- j >= i; -- precision )
-                {
-                    if ( buff [ j ] != '0' )
-                        break;
-                }
-
-                memmove ( & buff [ len - precision ], & buff [ i ], precision );
-                i = len - precision;
-            }
-
-            if ( precision != 0 || alternate )
-                buff [ -- i ] = '.';
-
-            goto make_signed_integer;
-#endif
-        case 'c':
-
-            /* retrieve as an int */
-            u32 = va_arg ( args, unsigned int );
-            if ( u32 < 128 )
-                buff [ i = sizeof buff - 1 ] = ( char ) u32;
-            else
-            {
-                int dbytes = utf32_utf8 ( buff, & buff [ sizeof buff ], u32 );
-                if ( dbytes <= 0 )
-                    buff [ i = sizeof buff - 1 ] = '?';
-                else
-                    memmove ( & buff [ i = sizeof buff - dbytes ], buff, dbytes );
-            }
-
-            /* precision makes no sense, but no error */
-            precision = 0;
-
-            /* sign makes no sense */
-            use_sign = 0;
-
-#if ZERO_PAD_ONLY_NUMBERS
-            /* padding is always with spaces */
-            padding = ' ';
-#endif
-
-            /* other than that, we can treat it as an integer */
-            goto insert_integer;
-
-        case 's':
-
-            /* retrieve as a NUL terminated ( or precision limited ) string */
-            cp = va_arg ( args, const char* );
-            if ( cp == NULL )
-                cp = "NULL";
-
-        make_nul_term_string:
-
-            /* in our case, no precision field means unlimited */
-            if ( ! have_precision )
-                precision = -1;
-
-#if ZERO_PAD_ONLY_NUMBERS
-            /* padding is always with spaces */
-            padding = ' ';
-#endif
-            /* test for buffer flush */
-            if ( flush != NULL && didx < bsize )
-            {
-                max_field_width = 0;
-                if ( have_precision )
-                    max_field_width = precision;
-                if ( max_field_width < min_field_width )
-                    max_field_width = min_field_width;
-                if ( didx + max_field_width > bsize )
-                {
-                    didx = string_flush ( dst, didx, flush, & rc, & total );
-                    if ( rc != 0 )
-                        break;
-                }
-            }
-
-            /* if right aligning with a minimum field width, measure string */
-            if ( ! left_align && min_field_width != 0 )
-            {
-                for ( len = 0; cp [ len ] != 0 && len < precision; ++ len )
-                    ( void ) 0;
-
-                for ( ; len < min_field_width; ++ didx, ++ len )
-                {
-                    if ( didx < bsize )
-                        dst [ didx ] = padding;
-                }
-            }
-
-            /* copy string */
-            for ( i = 0; i < precision && cp [ i ] != 0; ++ didx, ++ i )
-            {
-                if ( flush != NULL && didx == bsize )
-                {
-                    didx = string_flush ( dst, didx, flush, & rc, & total );
-                    if ( rc != 0 )
-                        break;
-                }
-
-                if ( didx < bsize )
-                    dst [ didx ] = cp [ i ];
-            }
-
-            if ( rc != 0 )
-                break;
-
-            /* apply right padding */
-            if ( left_align ) for ( ; i < min_field_width; ++ didx, ++ i )
-            {
-                if ( flush != NULL && didx == bsize )
-                {
-                    didx = string_flush ( dst, didx, flush, & rc, & total );
-                    if ( rc != 0 )
-                        break;
-                }
-
-                if ( didx < bsize )
-                    dst [ didx ] = ' ';
-            }
-            break;
-
-            /* String object */
-        case 'S':
-
-            /* retrieve as a NUL terminated ( or precision limited ) string */
-            str = va_arg ( args, const String* );
-            if ( str == NULL )
-            {
-                cp = "NULL";
-                goto make_nul_term_string;
-            }
-
-        make_String:
-
-            /* in our case, no precision field means unlimited */
-            if ( ! have_precision )
-                precision = -1;
-
-            /* test for buffer flush */
-            if ( flush != NULL && didx < bsize )
-            {
-                /* buffer is measured in bytes, while printing
-                   widths are measured in characters... */
-                max_field_width = ( uint32_t ) str -> size;
-                if ( str -> len < min_field_width )
-                    max_field_width += min_field_width - str -> len;
-                if ( didx + max_field_width > bsize )
-                {
-                    didx = string_flush ( dst, didx, flush, & rc, & total );
-                    if ( rc != 0 )
-                        break;
-                }
-            }
-
-            /* if right aligning with a minimum field width, measure string */
-            if ( ! left_align && min_field_width != 0 )
-            {
-                len = str -> len;
-                if ( len > precision )
-                    len = precision;
-
-                for ( ; len < min_field_width; ++ didx, ++ len )
-                {
-                    if ( didx < bsize )
-                        dst [ didx ] = ' ';
-                }
-            }
-
-            cp = str -> addr;
-            end = cp + str -> size;
-
-            /* copy string */
-            for ( i = 0; i < str -> len && i < precision; ++ i )
-            {
-                uint32_t ch;
-                int sbytes = utf8_utf32 ( & ch, cp, end );
-                if ( sbytes <= 0 )
-                {
-                    if ( sbytes == 0 )
-                        rc = RC ( rcText, rcString, rcFormatting, rcData, rcInsufficient );
-                    else
-                        rc = RC ( rcText, rcString, rcFormatting, rcData, rcCorrupt );
-                    break;
-                }
-                cp += sbytes;
-
-                if ( didx < bsize )
-                {
-                    int dbytes = utf32_utf8 ( dst + didx, dst + bsize, ch );
-                    if ( dbytes > 0 )
-                    {
-                        didx += dbytes;
-                        continue;
-                    }
-                    if ( dbytes < 0 )
-                    {
-                        rc = RC ( rcText, rcString, rcFormatting, rcData, rcCorrupt );
-                        break;
-                    }
-                }
-
-                didx += sbytes;
-            }
-
-            /* apply right padding */
-            if ( left_align ) for ( ; i < min_field_width; ++ didx, ++ i )
-            {
-                if ( didx < bsize )
-                    dst [ didx ] = ' ';
-            }
-            break;
-
-            /* version number */
-        case 'V':
-
-            u32 = va_arg ( args, uint32_t );
-
-            if ( ! have_precision )
-            {
-                if ( ( u32 & 0xFFFF ) != 0 )
-                    precision = 3;
-                else if ( ( u32 & 0xFF0000 ) != 0 )
-                    precision = 2;
-                else
-                    precision = 1;
-            }
-
-            switch ( precision )
-            {
-            case 0:
-                cp = ""; break;
-            case 1:
-                cp ="%u"; break;
-            case 2:
-                cp ="%u.%u"; break;
-            default:
-                cp ="%u.%u.%u";
-            }
-
-            have_precision = false;
-            precision = 0;
-
-            rc = string_printf ( buff, sizeof buff, & sz,
-                                 cp,
-                                 VersionGetMajor ( u32 ),
-                                 VersionGetMinor ( u32 ),
-                                 VersionGetRelease ( u32 ) );
-            if ( rc != 0 )
-                break;
-
-            use_sign = 0;
-            padding = ' ';
-            memmove ( & buff [ i = ( uint32_t ) ( sizeof buff - sz ) ], buff, sz );
-            goto insert_integer;
-
-        case 'R':
-
-            rc = va_arg ( args, rc_t );
-            sz = KWrtFmt_rc_t ( buff, sizeof buff, alternate ? "#" : "", rc );
-            rc = 0; /* reset back to ok */
-            assert ( sz < sizeof buff );
-
-            use_sign = 0;
-            padding = ' ';
-            memmove ( & buff [ i = ( uint32_t ) ( sizeof buff - sz ) ], buff, sz );
-            goto insert_integer;
-
-        case 'N':
-
-            /* THIS IS WRONG - FIELD WIDTH AND FRIENDS WILL NOT BE USED */
-            sym = va_arg ( args, const KSymbol* );
-
-            if ( sym -> dad != NULL )
-            {
-                if ( flush != NULL )
-                    didx = string_flush ( dst, didx, flush, & rc, & total );
-
-                sz = 0;
-                rc = string_flush_printf ( & dst [ didx ], bsize - didx, flush, & sz, "%N:", sym -> dad );
-                if ( rc != 0 )
-                    break;
-
-                didx += ( uint32_t ) sz;
-                if ( flush != NULL )
-                    didx = 0;
-            }
-
-            str = & sym -> name;
-            goto make_String;
-
-        case 'T': /* KTime */
-
-            tm = va_arg ( args, const KTime* );
-
-            sz = 0;
-
-            /* LEGEND
-             *  modifier 'h' means do date only
-             *  modifier 'l' means date and time
-             *  modifier 'z' means date, time and timezone
-             *  no modifier means time
-             *  precision affects time
-             *  leading zero affects time
-             */
-            if ( date_time_zone || long_size || half_size )
-            {
-                static char const *months [ 12 ] =
-                    { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
-                static char const *weekdays [ 7 ] =
-                    { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
-                rc = string_printf ( buff, sizeof buff, & sz, "%s %s %u %u"
-                                     , weekdays [ tm -> weekday ]
-                                     , months [ tm -> month ]
-                                     , tm -> day + 1
-                                     , tm -> year
-                    );
-                if ( rc != 0 )
-                    break;
-            }
-
-            if ( ! half_size )
-            {
-                if ( sz != 0 )
-                    buff [ sz ++ ] = ' ';
-
-                u64 = sz;
-
-                rc = string_printf ( & buff [ sz ], sizeof buff - sz, & sz,
-                                     padding == '0' ? "%02u:%02u:%02u %cM" : "%u:%02u:%02u %cM"
-                                     , ( tm -> hour + 11 ) % 12 + 1
-                                     , tm -> minute
-                                     , tm -> second
-                                     , ( tm -> hour < 12 ) ? 'A' : 'P'
-                    );
-                if ( rc != 0 )
-                    break;
-
-                u64 += sz;
-
-                if ( date_time_zone )
-                {
-                    rc = string_printf ( & buff [ u64 ], sizeof buff - ( size_t ) u64, & sz,
-                                         " %+02d", tm -> tzoff / 60 );
-                    if ( rc != 0 )
-                        break;
-
-                    u64 += sz;
-                }
-
-                sz = ( size_t ) u64;
-            }
-
-            padding = ' ';
-            memmove ( & buff [ i = ( uint32_t ) ( sizeof buff - sz ) ], buff, sz );
-            cp = buff;
-            goto make_nul_term_string;
-
-        case '!': /* operating system error code: e.g. errno or GetLastError() */
-            u32 = va_arg ( args, uint32_t ); /* fetching it unsigned but it can be signed */
-
-            sz = KWrtFmt_error_code ( buff, sizeof buff - 1, u32 );
-            assert ( sz < sizeof buff );
-            buff [ sz ] = '\0';
-
-            padding  = ' ';
-            memmove ( & buff [ i = ( uint32_t ) ( sizeof buff - sz ) ], buff, sz );
-            cp = buff;
-            goto make_nul_term_string;
-
-        case 'n':
-
-            np = va_arg ( args, uint32_t* );
-            if ( np != NULL )
-                * np = ( uint32_t ) ( total + didx );
-            break;
-
-        case 0:
-            -- sidx;
-            break;
-
-        default:
-            rc = RC ( rcText, rcString, rcFormatting, rcFormat, rcUnrecognized );
-        }
-    }
-
-    if ( num_writ != NULL )
-        * num_writ = total + didx;
-
-    if ( flush != NULL )
-    {
-        if ( rc == 0 && didx != 0 )
-        {
-            didx = string_flush ( dst, didx, flush, & rc, & total );
-            if ( rc == 0 && didx != 0 )
-                rc = RC ( rcRuntime, rcString, rcFormatting, rcTransfer, rcIncomplete );
-        }
-    }
-    else if ( didx < bsize )
-        dst [ didx ] = 0;
-    else if ( rc == 0 )
-        rc = RC ( rcText, rcString, rcFormatting, rcBuffer, rcInsufficient );
-
-    return rc;
-}
-
-static
-rc_t CC string_flush_printf ( char *dst, size_t bsize,
-    const KWrtHandler *flush, size_t *num_writ, const char *fmt, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, fmt );
-
-    rc = string_flush_vprintf ( dst, bsize, flush, num_writ, fmt, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC old_string_vprintf ( char *dst, size_t bsize,
-    size_t *num_writ, const char *fmt, va_list args )
-{
-    return string_flush_vprintf ( dst, bsize, NULL, num_writ, fmt, args );
-}
-
-LIB_EXPORT rc_t CC old_string_printf ( char *dst, size_t bsize, size_t *num_writ, const char *fmt, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, fmt );
-
-    rc = string_flush_vprintf ( dst, bsize, NULL, num_writ, fmt, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC old_vkfprintf ( const KWrtHandler *out,
-    size_t *num_writ, const char * fmt, va_list args )
-{
-    rc_t rc;
-
-    if ( out == NULL )
-    {
-        rc = RC ( rcRuntime, rcString, rcFormatting, rcFile, rcNull );
-        if ( num_writ != NULL )
-            * num_writ = 0;
-    }
-    else
-    {
-        char buff [ 4096 ];
-        rc = string_flush_vprintf ( buff, sizeof buff, out, num_writ, fmt, args );
-        if ( rc != 0 )
-            rc = ResetRCContext ( rc, rcRuntime, rcString, rcFormatting );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC old_kfprintf ( const KWrtHandler *out,
-    size_t *num_writ, const char * fmt, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, fmt );
-
-    rc = old_vkfprintf ( out, num_writ, fmt, args );
-        
-    va_end ( args );
-
-    return rc;
-}
-
-/****************************
- * NEW PRINTF IS NOW ACTIVE *
- ****************************/
-
-/* create_overflow
- *  create a buffer so large that it cannot overflow again
- *  copy in existing structures
- *  map self-referential pointers
- */
-static
-rc_t create_overflow ( KDataBuffer *overflow, const char *fmt_str,
-    String **strp, PrintFmt **fmtp, PrintArg **argp,
-    uint32_t str_idx, uint32_t fmt_idx, uint32_t arg_idx )
-{
-    /* measure the format string and infer that
-       we can never have more format items than
-       characters in the string... */
-    size_t fmt_str_size = strlen ( fmt_str );
-
-    /* our size will create a format and argument
-       for every byte. this should be a total overkill. */
-    size_t buff_size = ( sizeof ** strp + sizeof ** fmtp + sizeof **argp ) * fmt_str_size;
-
-    /* make the buffer */
-    rc_t rc = KDataBufferMakeBytes ( overflow, buff_size );
-    if ( rc == 0 )
-    {
-        /* capture pointers to stack structures */
-        const String *str = * strp;
-        const PrintFmt *fmt = * fmtp;
-        const PrintArg *args = * argp;
-
-        /* destination pointers */
-        String *dstr = overflow -> base;
-        PrintFmt *dfmt = ( void* ) ( dstr + fmt_str_size );
-        PrintArg *dargs = ( void* ) ( dfmt + fmt_str_size );
-
-        /* copy existing data */
-        memcpy ( dstr, str, str_idx * sizeof * dstr );
-        memcpy ( dfmt, fmt, fmt_idx * sizeof * dfmt );
-        memcpy ( dargs, args, arg_idx * sizeof * dargs );
-
-        /* if there are any pointers into "str", relocate them */
-        if ( str_idx != 0 )
-        {
-            uint32_t i, j;
-            for ( i = j = 0; i < fmt_idx && j < str_idx; ++ i )
-            {
-                switch ( dfmt [ i ] . type )
-                {
-                case sptString:
-                case sptUCS2String:
-                case sptUTF32String:
-                    if ( dargs [ i ] . S == & str [ j ] )
-                        dargs [ i ] . S = & dstr [ j ++ ];
-                    break;
-                }
-            }
-        }
-
-        /* replace pointers */
-        * strp = dstr;
-        * fmtp = dfmt;
-        * argp = dargs;
-   }
-
-    return rc;
-}
-
-
-/* parse_format_string
- *  parse format string and args into structured format
- */
-static
-rc_t parse_format_string ( const char *fmt_str, va_list vargs,
-    String **strp, PrintFmt **fmtp, PrintArg **argp, KDataBuffer *overflow )
-{
-    rc_t rc;
-    uint32_t i, str_idx, fmt_idx, arg_idx;
-
-    PrintFmt *fmt = * fmtp;
-    PrintArg *args = * argp;
-
-    /* loop over format string */
-    for ( rc = 0, i = str_idx = fmt_idx = arg_idx = 0; fmt_str [ i ] != 0; ++ i )
-    {
-        bool alternate, numeric;
-        char size_modifier, time_modifier;
-        bool has_precision, has_index, infinite_first;
-
-        /* loop to gather literal portions */
-        uint32_t start;
-        for ( start = i; ; ++ i )
-        {
-            /* run until we hit start of substitution token
-               or until we hit end of format string */
-            if ( fmt_str [ i ] != 0 && fmt_str [ i ] != '%' )
-                continue;
-
-            /* detect a literal string */
-            if ( i != start )
-            {
-                /* expand into overflow */
-                if ( fmt_idx == LOCAL_FMT_COUNT )
-                {
-                    rc = create_overflow ( overflow, fmt_str,
-                        strp, fmtp, argp, str_idx, fmt_idx, arg_idx );
-                    if ( rc != 0 )
-                        return rc;
-
-                    fmt = * fmtp;
-                    args = * argp;
-                }
-
-                /* create a text-literal format */
-                memset ( & fmt [ fmt_idx ], 0, sizeof fmt [ 0 ] );
-                fmt [ fmt_idx ] . u . l . text = & fmt_str [ start ];
-                fmt [ fmt_idx ] . u . l . size = i - start;
-                fmt [ fmt_idx ] . fmt = spfText;
-                fmt [ fmt_idx ] . type = sptLiteral;
-
-                /* increment counter */
-                ++ fmt_idx;
-            }
-
-            /* detect escape sequence */
-            if ( fmt_str [ i ] == 0 || fmt_str [ i + 1 ] != '%' )
-                break;
-
-            /* skip over escape */
-            start = ++ i;
-        }
-
-        /* done when NUL byte is seen */
-        if ( fmt_str [ i ] == 0 )
-            break;
-
-        /* detect overflow */
-        if ( fmt_idx == LOCAL_FMT_COUNT )
-        {
-            rc = create_overflow ( overflow, fmt_str,
-                strp, fmtp, argp, str_idx, fmt_idx, arg_idx );
-            if ( rc != 0 )
-                return rc;
-
-            fmt = * fmtp;
-            args = * argp;
-        }
-
-        /* initial format
-         *  thousands_separate    = false
-         *  add_prefix            = false
-         *  force_decimal_point   = false
-         *  leave_trailing_zeros  = false
-         *  print_time            = false
-         *  print_date            = false
-         *  print_weekday         = false
-         *  print_timezone        = false
-         *  hour_24               = false
-         *  sign                  = 0
-         *  left_fill             = space
-         */
-        memset ( & fmt [ fmt_idx ], 0, sizeof fmt [ 0 ] );
-        fmt [ fmt_idx ] . left_fill = ' ';
-
-        /* scan flags */
-        alternate = false;
-        while ( 1 )
-        {
-            switch ( fmt_str [ ++ i ] )
-            {
-                /* plus and space modify application of sign
-                   to signed integer and floating point conversions.
-                   plus overrides space. */
-            case ' ':
-                if ( fmt [ fmt_idx ] . sign == 0 )
-            case '+':
-                    fmt [ fmt_idx ] . sign = fmt_str [ i ];
-                continue;
-
-                /* dash indicates left-alignment. indicate this
-                   by setting "left_fill" to NUL. */
-            case '-':
-                fmt [ fmt_idx ] . left_fill = 0;
-                continue;
-
-                /* zero indicates an alternate left-fill for
-                   numeric conversions. the zero is inserted before
-                   any sign character in { '+', '-' or ' ' }.
-                   since "left_fill" is also used to indicate
-                   alignment, only store when right aligning. */
-            case '0':
-                if ( fmt [ fmt_idx ] . left_fill != 0 )
-                    fmt [ fmt_idx ] . left_fill = '0';
-                continue;
-
-                /* hash indicates that the formatter should use an
-                   "alternate" approach. that approach is specific
-                   to the format. */
-            case '#':
-                alternate = true;
-                continue;
-
-                /* comma ( or apostrophe outside of US ) indicates
-                   that the integer portion of a numeral should use
-                   a comma as a thousands separator for legibility. */
-            case ',':
-            case '\'':
-                fmt [ fmt_idx ] . thousands_separate = 1;
-                continue;
-            }
-
-            /* we've hit a non-flag character */
-            break;
-        }
-
-        /* minimum field width */
-        if ( isdigit ( fmt_str [ i ] ) )
-        {
-            /* literal */
-            fmt [ fmt_idx ] . u . f . min_field_width = fmt_str [ i ] - '0';
-            while ( isdigit ( fmt_str [ ++ i ] ) )
-            {
-                fmt [ fmt_idx ] . u . f . min_field_width *= 10;
-                fmt [ fmt_idx ] . u . f . min_field_width += fmt_str [ i ] - '0';
-            }
-        }
-        else if ( fmt_str [ i ] == '*' )
-        {
-            /* external - we populate the structure directly
-               rather than marking the value as external */
-            fmt [ fmt_idx ] . u . f . min_field_width = va_arg ( vargs, uint32_t );
-            ++ i;
-        }
-
-        /* precision */
-        has_precision = false;
-        if ( fmt_str [ i ] == '.' )
-        {
-            /* a single dot implies a precision value of 0 */
-            has_precision = true;
-
-            if ( isdigit ( fmt_str [ ++ i ] ) )
-            {
-                /* a literal precision */
-                fmt [ fmt_idx ] . u . f . precision = fmt_str [ i ] - '0';
-                while ( isdigit ( fmt_str [ ++ i ] ) )
-                {
-                    fmt [ fmt_idx ] . u . f . precision *= 10;
-                    fmt [ fmt_idx ] . u . f . precision += fmt_str [ i ] - '0';
-                }
-            }
-            else if ( fmt_str [ i ] == '*' )
-            {
-                /* external - again populate directly */
-                fmt [ fmt_idx ] . u . f . precision = va_arg ( vargs, uint32_t );
-                ++ i;
-            }
-            else if ( fmt_str [ i ] == '-' )
-            {
-                /* eat a negative precision - treat as 0 */
-                while ( isdigit ( fmt_str [ ++ i ] ) )
-                    ( void ) 0;
-            }
-        }
-
-        /* index - given when parameter is a vector */
-        has_index = infinite_first = false;
-        if ( fmt_str [ i ] == ':' )
-        {
-            bool has_start, has_len, has_end, end_is_stop;
-            has_start = has_len = has_end = end_is_stop = false;
-
-            /* parameter is taken as a vector,
-               with a default index starting at 0 */
-            has_index = true;
-
-            if ( isdigit ( fmt_str [ ++ i ] ) )
-            {
-                /* literal index */
-                fmt [ fmt_idx ] . u . f . start_idx = fmt_str [ i ] - '0';
-                while ( isdigit ( fmt_str [ ++ i ] ) )
-                {
-                    fmt [ fmt_idx ] . u . f . start_idx *= 10;
-                    fmt [ fmt_idx ] . u . f . start_idx += fmt_str [ i ] - '0';
-                }
-                has_start = true;
-            }
-            else switch ( fmt_str [ i ] )
-            {
-            case '*':
-                /* external index, captured directly */
-                fmt [ fmt_idx ] . u . f . start_idx = va_arg ( vargs, uint32_t );
-                ++ i;
-                has_start = true;
-                break;
-            case '$':
-                ++ i;
-                has_start = infinite_first = true;
-                break;
-            }
-
-            /* detect range */
-            switch ( fmt_str [ i ] )
-            {
-                /* given as start-stop */
-            case '-':
-                end_is_stop = true;
-
-                /* given as start/len */
-            case '/':
-
-                has_len = true;
-
-                if ( isdigit ( fmt_str [ ++ i ] ) )
-                {
-                    /* literal selection length or end */
-                    fmt [ fmt_idx ] . u . f . select_len = fmt_str [ i ] - '0';
-                    while ( isdigit ( fmt_str [ ++ i ] ) )
-                    {
-                        fmt [ fmt_idx ] . u . f . select_len *= 10;
-                        fmt [ fmt_idx ] . u . f . select_len += fmt_str [ i ] - '0';
-                    }
-                    has_end = true;
-                }
-                else switch ( fmt_str [ i ] )
-                {
-                case '*':
-                    /* external selection length or end */
-                    fmt [ fmt_idx ] . u . f . select_len = va_arg ( vargs, uint32_t );
-                    ++ i;
-                    has_end = true;
-                    break;
-                case '$':
-                    ++ i;
-                    end_is_stop = false;
-                    break;
-                case '-':
-                    /* negatives are garbage */
-                    while ( isdigit ( fmt_str [ ++ i ] ) )
-                        ( void ) 0;
-                    break;
-                default:
-                    end_is_stop = false;
-                }
-                break;
-            }
-
-            /* massage values */
-            if ( infinite_first )
-            {
-                /* having an infinite first forces length of 1 */
-                fmt [ fmt_idx ] . u . f . select_len = 1;
-            }
-            else if ( has_len )
-            {
-                /* if either a number or an external value was given */
-                if ( has_end && end_is_stop )
-                {
-                    /* end <= start is translated to length 1 */
-                    if ( fmt [ fmt_idx ] . u . f . select_len <= fmt [ fmt_idx ] . u . f . start_idx )
-                        fmt [ fmt_idx ] . u . f . select_len = 1;
-
-                    /* end > start is translated to stated length */
-                    else
-                        fmt [ fmt_idx ] . u . f . select_len -= fmt [ fmt_idx ] . u . f . start_idx - 1;
-                }
-            }
-            else if ( has_start )
-            {
-                /* with no end specified, selection length is 1 */
-                fmt [ fmt_idx ] . u . f . select_len = 1;
-            }
-        }
-
-        /* size - one of the greatest leg-irons in the C legacy,
-           guess at the parameter size so that va_arg can extract
-           it properly. rather than using predictable parameter sizes,
-           they are fuzzy. we have ( mostly ) kept them for tradition...
-           if no modifier is given, 32-bit is assumed for integer and
-           64-bit for floating point. */
-        size_modifier = time_modifier = 0;
-        switch ( fmt_str [ i ] )
-        {
-            /* "Tiny" modifier - like "hh" in C format */
-        case 't':
-            /* "Half" modifier - same as C format */
-        case 'h':
-            /* "Long" modifier - means 64-bit for integers, otherwise like C */
-        case 'l':
-            size_modifier = time_modifier = fmt_str [ i ++ ];
-            break;
-            /* "siZe" modifier - whatever the size of size_t is */
-        case 'z':
-            ++ i;
-            time_modifier = 'z';
-            if ( sizeof ( size_t ) == sizeof ( uint64_t ) )
-                size_modifier = 'l';
-            break;
-        }
-
-        /* output format
-           describes the formatting to apply on output
-           if precision has not been set, give it a default value */
-        numeric = false;
-        fmt [ fmt_idx ] . pointer_arg = has_index;
-        switch ( fmt_str [ i ] )
-        {
-            /* decimal signed integer */
-        case 'd':
-        case 'i':
-            fmt [ fmt_idx ] . radix = 10;
-            fmt [ fmt_idx ] . fmt = spfSignedInt;
-            numeric = true;
-            if ( ! has_precision )
-                fmt [ fmt_idx ] . u . f . precision = 1;
-            else if ( fmt [ fmt_idx ] . left_fill == '0' )
-                fmt [ fmt_idx ] . left_fill = ' ';
-            break;
-
-            /* decimal unsigned integer */
-        case 'u':
-            fmt [ fmt_idx ] . radix = 10;
-        unsigned_int:
-            fmt [ fmt_idx ] . fmt = spfUnsigned;
-            fmt [ fmt_idx ] . sign = 0;
-            numeric = true;
-            if ( ! has_precision )
-                fmt [ fmt_idx ] . u . f . precision = 1;
-            else if ( fmt [ fmt_idx ] . left_fill == '0' )
-                fmt [ fmt_idx ] . left_fill = ' ';
-            break;
-
-            /* hex unsigned integer */
-        case 'x':
-            fmt [ fmt_idx ] . add_prefix = alternate;
-            fmt [ fmt_idx ] . radix = 16;
-            goto unsigned_int;
-
-            /* upper-case hex unsigned integer or pointer value */
-        case 'X':
-        case 'p':
-            fmt [ fmt_idx ] . upper_case_num = 1;
-            fmt [ fmt_idx ] . add_prefix = alternate;
-            fmt [ fmt_idx ] . radix = 16;
-            goto unsigned_int;
-
-            /* octal unsigned integer */
-        case 'o':
-            fmt [ fmt_idx ] . add_prefix = alternate;
-            fmt [ fmt_idx ] . radix = 8;
-            goto unsigned_int;
-
-            /* binary unsigned integer */
-        case 'b':
-            fmt [ fmt_idx ] . add_prefix = alternate;
-            fmt [ fmt_idx ] . radix = 2;
-            goto unsigned_int;
-
-            /* decimal signed floating point */
-        case 'f':
-            fmt [ fmt_idx ] . fmt = spfStdFloat;
-        fmt_float:
-            fmt [ fmt_idx ] . radix = 10;
-            fmt [ fmt_idx ] . force_decimal_point = alternate;
-            numeric = true;
-            if ( ! has_precision )
-                fmt [ fmt_idx ] . u . f . precision = 6;
-            break;
-
-            /* scientific notation floating point */
-        case 'e':
-            fmt [ fmt_idx ] . fmt = spfSciFloat;
-            goto fmt_float;
-
-            /* "general" floating point */
-        case 'g':
-            fmt [ fmt_idx ] . leave_trailing_zeros = alternate;
-            fmt [ fmt_idx ] . fmt = spfGenFloat;
-            goto fmt_float;
-
-            /* character data */
-        case 's':
-        case 'S':
-            fmt [ fmt_idx ] . pointer_arg = 1;
-            if ( ! has_precision )
-            /* no break */
-        case 'c':
-                fmt [ fmt_idx ] . u . f . precision = -1;
-            fmt [ fmt_idx ] . fmt = spfText;
-            break;
-            
-            /* KSymbol* */
-        case 'N':
-            fmt [ fmt_idx ] . pointer_arg = 1;
-            fmt [ fmt_idx ] . fmt = spfSymbol;
-            break;
-
-            /* ver_t */
-        case 'V':
-            size_modifier = ( sizeof ( ver_t ) == sizeof ( uint32_t ) ) ? 0 : 'l';
-            fmt [ fmt_idx ] . min_vers_components = ! has_precision;
-            fmt [ fmt_idx ] . fmt = spfVersion;
-            break;
-
-            /* rc_t */
-        case 'R':
-            size_modifier = ( sizeof ( rc_t ) == sizeof ( uint32_t ) ) ? 0 : 'l';
-            fmt [ fmt_idx ] . explain_rc = alternate;
-            fmt [ fmt_idx ] . fmt = spfRC;
-            break;
-
-            /* KTime* */
-        case 'T':
-            fmt [ fmt_idx ] . pointer_arg = 1;
-            fmt [ fmt_idx ] . fmt = spfTime;
-            numeric = true;
-
-            /* here, the "size" modifier is interpreted
-               as a selector for the output format. perhaps
-               it could have been a precision thing, but... */
-            switch ( time_modifier )
-            {
-                /* by itself, 'T' implies print the time */
-            case 0:
-                fmt [ fmt_idx ] . print_time = 1;
-                break;
-
-                /* "half" 'T' means the date */
-            case 'h':
-                fmt [ fmt_idx ] . print_date = 1;
-                break;
-
-                /* "zone" 'T' means long date with time zone */
-            case 'z':
-                fmt [ fmt_idx ] . print_timezone = 1;
-                /* no break */
-
-                /* "long" 'T' means date and time */
-            case 'l':
-                fmt [ fmt_idx ] . print_time = 1;
-                fmt [ fmt_idx ] . print_date = 1;
-                fmt [ fmt_idx ] . print_weekday = 1;
-                break;
-            }
-            break;
-
-            /* OS-specific error code:
-               int on Unix-like systems
-               DWORD on Windows */
-        case '!':
-            size_modifier = 0;
-            fmt [ fmt_idx ] . fmt = spfOSErr;
-            break;
-
-#if SUPPORT_PERCENT_N
-            /* awful out parameter giving characters printed so far */
-        case 'n':
-            fmt [ fmt_idx ] . fmt = spfNone;
-            break;
-#endif
-        default:
-            return RC ( rcText, rcString, rcFormatting, rcFormat, rcUnrecognized );
-        }
-
-#if ZERO_PAD_ONLY_NUMBERS
-        /* handle zero padding for non-numeric cases */
-        if ( ! numeric && fmt [ fmt_idx ] . left_fill == '0' )
-            fmt [ fmt_idx ] . left_fill = ' ';
-#endif
-
-        /* argument format */
-        if ( has_index )
-        {
-            /* all arguments MUST be vectors. */
-            args [ arg_idx ] . p = va_arg ( vargs, const void* );
-
-            /* discriminate on vector type */
-            switch ( fmt_str [ i ] )
-            {
-                /* signed integer */
-            case 'd':
-            case 'i':
-            case '!':
-
-                if ( infinite_first )
-                    return RC ( rcText, rcString, rcFormatting, rcIndex, rcIncorrect );
-
-                /* select from 4 possibilities */
-                switch ( size_modifier )
-                {
-                case 0:
-                    fmt [ fmt_idx ] . type = sptSignedInt32Vect;
-                    break;
-                case 'l':
-                    fmt [ fmt_idx ] . type = sptSignedInt64Vect;
-                    break;
-                case 'h':
-                    fmt [ fmt_idx ] . type = sptSignedInt16Vect;
-                    break;
-                case 't':
-                    fmt [ fmt_idx ] . type = sptSignedInt8Vect;
-                    break;
-                }
-                break;
-
-                /* pointer value - cast to 32 or 64-bit unsigned integer */
-            case 'p':
-                size_modifier = ( sizeof ( void* ) == sizeof ( uint64_t ) ) ? 'l' : 0;
-                /* no break */
-
-                /* unsigned integer */
-            case 'u':
-            case 'x':
-            case 'X':
-            case 'o':
-            case 'b':
-            case 'V':
-            case 'R':
-
-                if ( infinite_first )
-                    return RC ( rcText, rcString, rcFormatting, rcIndex, rcIncorrect );
-
-                switch ( size_modifier )
-                {
-                case 0:
-                    fmt [ fmt_idx ] . type = sptUnsignedInt32Vect;
-                    break;
-                case 'l':
-                    fmt [ fmt_idx ] . type = sptUnsignedInt64Vect;
-                    break;
-                case 'h':
-                    fmt [ fmt_idx ] . type = sptUnsignedInt16Vect;
-                    break;
-                case 't':
-                    fmt [ fmt_idx ] . type = sptUnsignedInt8Vect;
-                    break;
-                }
-                break;
-
-                /* floating point */
-            case 'e':
-            case 'f':
-            case 'g':
-
-                if ( infinite_first )
-                    return RC ( rcText, rcString, rcFormatting, rcIndex, rcIncorrect );
-
-                switch ( size_modifier )
-                {
-                case 0:
-                    fmt [ fmt_idx ] . type = sptFloat64Vect;
-                    break;
-                case 'h':
-                    fmt [ fmt_idx ] . type = sptFloat32Vect;
-                    break;
-                case 'l':
-                    fmt [ fmt_idx ] . type = sptFloatLongVect;
-                    break;
-                }
-                break;
-
-                /* character array */
-            case 'c':
-
-                /* can't determine last */
-                if ( infinite_first )
-                    return RC ( rcText, rcString, rcFormatting, rcIndex, rcIncorrect );
-
-                /* length must be bounded */
-                if ( fmt [ fmt_idx ] . u . f . select_len == 0 )
-                    fmt [ fmt_idx ] . u . f . select_len = 1;
-
-                fmt [ fmt_idx ] . type = sptNulTermString;
-                break;
-
-            case 's':
-#if STDC_COMPATIBILITY
-                if ( args [ arg_idx ] . p == NULL ) {
-                    args [ arg_idx ] . p = NULL_STRING_TEXT;
-                }
-#endif
-                /* NUL-terminated string issues */
-                if ( args [ arg_idx ] . p != NULL && infinite_first )
-                {
-                    const char *cp = args [ arg_idx ] . p;
-
-                    /* handle selection of last element */
-                    size_t len = strlen ( cp );
-                    if ( len != 0 )
-                    {
-                        fmt [ fmt_idx ] . u . f . start_idx = len - 1;
-                        fmt [ fmt_idx ] . u . f . select_len = 1;
-                    }
-                }
-
-                fmt [ fmt_idx ] . type = sptNulTermString;
-                break;
-
-                /* character string */
-            case 'S':
-
-                /* if the index starts with last element */
-                if ( args [ arg_idx ] . p != NULL && infinite_first )
-                {
-                    const String *s = args [ arg_idx ] . p;
-                    if ( s -> size != 0 )
-                    {
-                        fmt [ fmt_idx ] . u . f . start_idx = s -> size - 1;
-                        fmt [ fmt_idx ] . u . f . select_len = 1;
-                    }
-                }
-
-                fmt [ fmt_idx ] . type = sptString;
-                break;
-
-                /* no other type supports vectors */
-            default:
-                return RC ( rcText, rcString, rcFormatting, rcFormat, rcIncorrect );
-            }
-        }
-        else
-        {
-            /* scalar or string arguments */
-            switch ( fmt_str [ i ] )
-            {
-                /* signed integer */
-            case 'd':
-            case 'i':
-            case '!':
-                fmt [ fmt_idx ] . type = sptSignedInt;
-                switch ( size_modifier )
-                {
-                case 0:
-                    args [ arg_idx ] . d = va_arg ( vargs, int32_t );
-                    break;
-                case 'l':
-                    args [ arg_idx ] . d = va_arg ( vargs, int64_t );
-                    break;
-#if EMULATE_SMALLINT_EXTENSION_BUG
-                case 'h':
-                case 't':
-                    args [ arg_idx ] . d = va_arg ( vargs, int );
-                    break;
-#else
-                case 'h':
-                    args [ arg_idx ] . d = ( int16_t ) va_arg ( vargs, int );
-                    break;
-                case 't':
-                    args [ arg_idx ] . d = ( int8_t ) va_arg ( vargs, int );
-                    break;
-#endif
-                }
-                break;
-
-                /* pointer cast to uint64_t */
-            case 'p':
-                size_modifier = ( sizeof ( void* ) == sizeof ( uint64_t ) ) ? 'l' : 0;
-                /* no break */
-
-                /* unsigned integer */
-            case 'u':
-            case 'x':
-            case 'X':
-            case 'o':
-            case 'b':
-            case 'V':
-            case 'R':
-                fmt [ fmt_idx ] . type = sptUnsignedInt;
-                switch ( size_modifier )
-                {
-                case 0:
-                    args [ arg_idx ] . u = va_arg ( vargs, uint32_t );
-                    break;
-                case 'l':
-                    args [ arg_idx ] . u = va_arg ( vargs, uint64_t );
-                    break;
-                case 'h':
-                    args [ arg_idx ] . u = ( uint16_t ) va_arg ( vargs, unsigned int );
-                    break;
-                case 't':
-                    args [ arg_idx ] . u = ( uint8_t ) va_arg ( vargs, unsigned int );
-                    break;
-                }
-                break;
-
-                /* floating point */
-            case 'e':
-            case 'f':
-            case 'g':
-                fmt [ fmt_idx ] . type = sptFloat;
-                switch ( size_modifier )
-                {
-                case 0:
-                case 'h':
-                    args [ arg_idx ] . f = va_arg ( vargs, double );
-                    break;
-                case 'l':
-                    args [ arg_idx ] . f = ( double ) va_arg ( vargs, long double );
-                    break;
-                default:
-                    return RC ( rcText, rcString, rcFormatting, rcFormat, rcIncorrect );
-                }
-                break;
-
-                /* single character */
-            case 'c':
-                fmt [ fmt_idx ] . type = sptChar;
-                args [ arg_idx ] . c = va_arg ( vargs, uint32_t );
-                break;
-
-                /* NUL-terminated string */
-            case 's':
-                fmt [ fmt_idx ] . type = sptNulTermString;
-                args [ arg_idx ] . s = va_arg ( vargs, const char* );
-                break;
-
-                /* String object */
-            case 'S':
-                fmt [ fmt_idx ] . type = sptString;
-                args [ arg_idx ] . S = va_arg ( vargs, const String* );
-                break;
-
-                /* KSymbol or KTime object */
-            case 'N':
-            case 'T':
-                fmt [ fmt_idx ] . type = sptPointer;
-                args [ arg_idx ] . p = va_arg ( vargs, const void* );
-                break;
-
-#if SUPPORT_PERCENT_N
-            case 'n':
-                fmt [ fmt_idx ] . type = sptBytesPrinted;
-                args [ arg_idx ] . n = va_arg ( vargs, uint32_t* );
-                break;
-#endif
-            }
-        }
-
-        /* account for format and argument */
-        ++ fmt_idx;
-        ++ arg_idx;
-    }
-
-    /* record final fmt */
-    if ( rc == 0 )
-    {
-        if ( fmt_idx == LOCAL_FMT_COUNT )
-        {
-            rc = create_overflow ( overflow, fmt_str,
-                strp, fmtp, argp, str_idx, fmt_idx, arg_idx );
-            if ( rc != 0 )
-                return rc;
-
-            fmt = * fmtp;
-        }
-
-        memset ( & fmt [ fmt_idx ], 0, sizeof fmt [ 0 ] );
-    }
-
-    return rc;
-}
-
-
-/* KBufferedWrtHandler
- *  combines buffer and possibly NULL handler
- *  handles flushing, counting, etc.
- */
-typedef struct KBufferedWrtHandler KBufferedWrtHandler;
-struct KBufferedWrtHandler
-{
-    const KWrtHandler *handler;
-    char *buff;
-    size_t bsize;
-    size_t cur;
-    size_t flushed;
-    bool overflow;
-};
-
-
-/* flush_buffer
- *  writes data to handler
- *  or NUL-terminates buffer
- */
-static
-rc_t flush_buffer ( KBufferedWrtHandler *out )
-{
-    const KWrtHandler *flush = out -> handler;
-    if ( flush != NULL  && flush -> writer != NULL )
-    {
-        rc_t rc = 0;
-        size_t num_writ, flushed;
-
-/*        assert ( out -> cur != 0 ); */
-
-        for ( flushed = 0; flushed < out -> cur; flushed += num_writ )
-        {
-            rc = ( * flush -> writer ) ( flush -> data,
-                & out -> buff [ flushed ], out -> cur - flushed, & num_writ );
-            if ( rc != 0 )
-                break;
-            if ( num_writ == 0 )
-                break;
-        }
-
-        if ( flushed == 0 )
-            return rc;
-
-        out -> flushed += flushed;
-        if ( flushed < out -> cur )
-            memmove ( out -> buff, & out -> buff [ flushed ], out -> cur - flushed );
-        out -> cur -= flushed;
-
-        return 0;
-    }
-
-    /* NB - header file states that space for NUL byte
-       is REQUIRED, so this test will declare overflow
-       whenever there is not space for the NUL termination */
-    if ( out -> cur >= out -> bsize )
-        out -> overflow = true;
-    else
-        out -> buff [ out -> cur ] = 0;
-
-    return 0;
-}
-
-static
-rc_t write_buffer ( KBufferedWrtHandler *out, const char *data, size_t bytes )
-{
-    size_t total, num_writ;
-    for ( total = 0; total < bytes; out -> cur += num_writ, total += num_writ )
-    {
-        if ( ! out -> overflow && out -> cur == out -> bsize )
-        {
-            rc_t rc = flush_buffer ( out );
-            if ( rc != 0 )
-                return rc;
-        }
-        if ( out -> overflow )
-            num_writ = bytes - total;
-        else
-        {
-            num_writ = out -> bsize - out -> cur;
-            if ( total + num_writ > bytes )
-                num_writ = bytes - total;
-            memcpy ( & out -> buff [ out -> cur ], & data [ total ], num_writ );
-        }
-    }
-    return 0;
-}
-
-
-/* print_padding
- *  issue padding characters
- */
-static
-rc_t print_padding ( KBufferedWrtHandler *out, size_t count, char pad_char )
-{
-    size_t total, num_writ;
-    for ( total = 0; total < count; out -> cur += num_writ, total += num_writ )
-    {
-        if ( ! out -> overflow && out -> cur == out -> bsize )
-        {
-            rc_t rc = flush_buffer ( out );
-            if ( rc != 0 )
-                return rc;
-        }
-        if ( out -> overflow )
-            num_writ = count - total;
-        else
-        {
-            size_t i = out -> cur;
-            size_t lim = out -> cur + count - total;
-            if ( lim > out -> bsize )
-                lim = out -> bsize;
-            for ( num_writ = lim - i; i < lim; ++ i )
-                out -> buff [ i ] = pad_char;
-        }
-    }
-    return 0;
-}
-
-/* print_nul_term_string
- */
-static
-rc_t print_nul_term_string ( KBufferedWrtHandler *out, String *S, size_t precision )
-{
-    size_t total, num_writ;
-    const char *s = S -> addr;
-
-    for ( S -> len = 0, total = 0; total < precision && s [ 0 ] != 0;
-          s += num_writ, out -> cur += num_writ, total += num_writ )
-    {
-        char *buff;
-        size_t lim;
-
-        if ( ! out -> overflow && out -> cur == out -> bsize )
-        {
-            rc_t rc = flush_buffer ( out );
-            if ( rc != 0 )
-                return rc;
-        }
-
-        if ( out -> overflow )
-        {
-            lim = precision - total;
-
-            for ( num_writ = 0; num_writ < lim; ++ num_writ )
-            {
-                if ( s [ num_writ ] == 0 )
-                    break;
-
-                /* count characters as well as bytes */
-                if ( ( s [ num_writ ] & 0xC0 ) != 0x80 )
-                    ++ S -> len;
-            }
-        }
-        else
-        {
-            buff = out -> buff + out -> cur;
-            lim = out -> bsize - out -> cur;
-
-            if ( total + lim > precision )
-                lim = precision - total;
-
-            for ( num_writ = 0; num_writ < lim; ++ num_writ )
-            {
-                if ( s [ num_writ ] == 0 )
-                    break;
-
-                /* count characters as well as bytes */
-                if ( ( ( buff [ num_writ ] = s [ num_writ ] ) & 0xC0 ) != 0x80 )
-                    ++ S -> len;
-            }
-        }
-    }
-
-    S -> size = total;
-
-    return 0;
-}
-
-/* print_string
- */
-static
-rc_t print_string ( KBufferedWrtHandler *out, const String *s, size_t precision )
-{
-    /* TBD - this is only correct for ASCII */
-    if ( s -> size < precision )
-        precision = s -> size;
-
-    return write_buffer ( out, s -> addr, precision );
-}
-
-static
-rc_t print_symbol ( KBufferedWrtHandler *out, const KSymbol *sym )
-{
-    if ( sym -> dad != NULL )
-    {
-        rc_t rc = print_symbol ( out, sym -> dad );
-        if ( rc == 0 )
-            rc = print_padding ( out, 1, ':' );
-        if ( rc != 0 )
-            return rc;
-    }
-    return print_string ( out, & sym -> name, sym -> name . size );
-}
-
-static
-rc_t print_literal ( KBufferedWrtHandler *out, const char *text, size_t size )
-{
-    return write_buffer ( out, text, size );
-}
-
-
-/* structured_print_engine
- *  prints into a buffer
- *  if an output handler is provided, the buffer will be flushed to it as needed
- *  returns the number of BYTES written, but not the number of characters.
- */
-static const char* alnum_set [ 2 ] [ 2 ] =
-{
-    /* "normal" alpha-numeric ordering for rendering numerals */
-    {
-        "0123456789abcdefghijklmnopqrstuvwxyz",
-        "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-    },
-    /* "abnormal" alpha-numeric ordering used by SFF format */
-    {
-        "abcdefghijklmnopqrstuvwxyz0123456789",
-        "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
-    }
-};
-
-static
-rc_t structured_print_engine ( KBufferedWrtHandler *out,
-    const PrintFmt *fmt, const PrintArg *args )
-{
-    rc_t rc;
-    uint32_t fmt_idx, arg_idx;
-
-    /* declare these here to stifle the compiler
-       they should most naturally be declared within the loop,
-       but since they are conditionally initialized by the switch,
-       the compiler warns they may be used before initialization.
-       rather than quiet the complaint within the loop, they have
-       been manually hoisted outside and initialized once. */
-    uint32_t i = 0;
-    int64_t i64 = 0;
-    uint64_t u64 = 0;
-    double f64 = 0;
-    const void *p = NULL;
-
-    /* most of the arguments are going to be pulled into "S" */
-    String S;
-    StringInit ( & S, NULL, 0, 0 );
-
-    /* mark no overflow */
-    out -> overflow = false;
-
-    /* loop across all format structures */
-    for ( rc = 0, out -> cur = out -> flushed = 0, fmt_idx = arg_idx = 0;
-          fmt [ fmt_idx ] . type != sptTerm; ++ fmt_idx )
-    {
-        /* copy entry - we're going to modify it */
-        PrintFmt f = fmt [ fmt_idx ];
-
-        /* ENGINE PARAMETERS */
-
-        /* padding to left side of field */
-        uint32_t left_pad;
-
-        /* sign character if not NUL */
-        char sign_char;
-
-        /* prefix for unsigned int */
-        char prefix [ 4 ];
-        uint32_t prefix_len;
-
-        /* true if performing comma separation */
-        bool comma_sep;
-
-        /* zero-fill, from either integer precision or min-field-width */
-        uint32_t zero_fill;
-
-        /* length of integer portion of numeral, prefix contribution */
-        uint32_t int_len = 0, prefix_contribution;
-
-        /* string index, from index and text precision */
-        bool text_index;
-        uint64_t text_start, text_lim;
-
-        /* END ENGINE PARAMETERS */
-
-        int cvt_len;
-        uint32_t c, *n;
-
-        const KTime *tm;
-        const KSymbol *N;
-
-        char text [ 1024 ];
-        uint32_t dst_len;
-
-        char ffmt [ 16 ];
-        const char *to_numeral, *cfmt;
-
-        /* detect literal */
-        if ( f . type == sptLiteral )
-        {
-            rc = print_literal ( out, f . u . l . text, f . u . l . size );
-            if ( rc != 0 )
-                break;
-
-            continue;
-        }
-
-        /* gather external parameters */
-        if ( f . ext_field_width )
-             f . u . f . min_field_width = args [ arg_idx ++ ] . u;
-        if ( f . ext_precision )
-            f . u . f . precision = args [ arg_idx ++ ] . u;
-        if ( f . ext_start_index )
-            f . u . f . start_idx = args [ arg_idx ++ ] . u;
-        if ( f . ext_select_len )
-            f . u . f . select_len = args [ arg_idx ++ ] . u;
-        else if ( f . ext_stop_index )
-        {
-            f . u . f . select_len = args [ arg_idx ++ ] . u;
-            if ( f . u . f . select_len <= f . u . f . start_idx )
-                f . u . f . select_len = 1;
-            else
-                f . u . f . select_len -= f . u . f . start_idx - 1;
-        }
-
-        /* early initialization */
-        text_index = false;
-        text_start = 0;
-        text_lim = -1;
-
-        /* vector parameters may have NULL pointers under certain
-           circumstances, e.g. pre-calculated format with out-of-bounds
-           index coordinates, when this is detectable. */
-        if ( f . pointer_arg && args [ arg_idx ] . p == NULL )
-        {
-            if ( f . fmt == spfText )
-            {
-                CONST_STRING ( & S, NULL_STRING_TEXT );
-                f . type_cast = 0;
-                f . type = sptString;
-                if ( f . u . f . precision < S . len )
-#if STDC_COMPATIBILITY  &&  !defined(__GLIBC__)
-                    S . size = f . u . f . precision;
-                    S . len = (uint32_t) f . u . f . precision;
-#else
-                    StringInit ( & S, "", 0, 0 );
-#endif                    
-            }
-            else
-            {
-                memset ( & f, 0, sizeof f );
-                f . u . f . precision = 1;
-                f . radix = 10;
-                f . fmt = spfUnsigned;
-                f . type = sptUnsignedInt;
-                u64 = 0;
-            }
-        }
-
-        /* get source */
-        else switch ( f . type )
-        {
-            /* scalar or vector signed integer */
-        case sptSignedInt:
-            i64 = args [ arg_idx ] . d;
-            break;
-        case sptSignedInt8Vect:
-            i64 = args [ arg_idx ] . d8 [ f . u . f . start_idx ];
-            break;
-        case sptSignedInt16Vect:
-            i64 = args [ arg_idx ] . d16 [ f . u . f . start_idx ];
-            break;
-        case sptSignedInt32Vect:
-            i64 = args [ arg_idx ] . d32 [ f . u . f . start_idx ];
-            break;
-        case sptSignedInt64Vect:
-            i64 = args [ arg_idx ] . d64 [ f . u . f . start_idx ];
-            break;
-
-            /* scalar or vector unsigned integer */
-        case sptUnsignedInt:
-            u64 = args [ arg_idx ] . u;
-            break;
-        case sptUnsignedInt8Vect:
-            u64 = args [ arg_idx ] . u8 [ f . u . f . start_idx ];
-            break;
-        case sptUnsignedInt16Vect:
-            u64 = args [ arg_idx ] . u16 [ f . u . f . start_idx ];
-            break;
-        case sptUnsignedInt32Vect:
-            u64 = args [ arg_idx ] . u32 [ f . u . f . start_idx ];
-            break;
-        case sptUnsignedInt64Vect:
-            u64 = args [ arg_idx ] . u64 [ f . u . f . start_idx ];
-            break;
-
-            /* scalar or vector float */
-        case sptFloat:
-            f64 = args [ arg_idx ] . f;
-            break;
-        case sptFloat32Vect:
-            f64 = args [ arg_idx ] . f32 [ f . u . f . start_idx ];
-            break;
-        case sptFloat64Vect:
-            f64 = args [ arg_idx ] . f64 [ f . u . f . start_idx ];
-            break;
-        case sptFloatLongVect:
-            f64 = ( double ) args [ arg_idx ] . flong [ f . u . f . start_idx ];
-            break;
-
-            /* utf-8 character */
-        case sptChar:
-            c = args [ arg_idx ] . c;
-            cvt_len = utf32_utf8 ( text, & text [ sizeof text ], c );
-            if ( cvt_len < 0 )
-            {
-                text [ 0 ] = '?';
-                cvt_len = 1;
-            }
-            StringInit ( & S, text, cvt_len, 1 );
-            break;
-
-            /* NUL-terminated string */
-        case sptNulTermString:
-
-            /* special initialization to flag size/length unknown */
-            StringInit ( & S, args [ arg_idx ] . s, 0, -1 );
-
-            /* IF THE STRING IS INDEXED OR MAY NEED LEFT ALIGNMENT */
-            if ( f . u . f . start_idx != 0 || f . u . f . select_len != 0 ||
-                 ( f . u . f . min_field_width != 0 && f . left_fill ) )
-            {
-                /* precision limits upper bounds
-                   if the index range is more restrictive than precision,
-                   take this as precision for text case */
-                if ( f . u . f . select_len != 0 && f . u . f . select_len < f . u . f . precision )
-                    f . u . f . precision = f . u . f . select_len;
-
-                /* scan to start location */
-                for ( S . len = 0; S . len < f . u . f . start_idx; ++ S . size )
-                {
-                    /* if end of NUL-terminated string is reached before start,
-                       then create EMPTY string */
-                    if ( S . addr [ S . size ] == 0 )
-                    {
-                        f . u . f . start_idx = 0;
-                        f . u . f . select_len = 0;
-                        f . u . f . precision = 0;
-                        break;
-                    }
-                    /* walk across utf-8 multi-byte character */
-                    if ( ( S . addr [ S . size ] & 0xC0 ) != 0x80 )
-                        ++ S . len;
-                }
-
-                /* create sub-string
-                   limit scan to required precision for efficiency */
-                for ( S . addr += S . size, S . size = 0, S . len = 0;
-                      S . len < f . u . f . precision; ++ S . size )
-                {
-                    if ( S . addr [ S . size ] == 0 )
-                        break;
-                    if ( ( S . addr [ S . size ] & 0xC0 ) != 0x80 )
-                        ++ S . len;
-                }
-            }
-
-            /* precision limits text length */
-            if ( text_lim > f . u . f . precision )
-                text_lim = f . u . f . precision;
-
-            break;
-
-            /* String object */
-        case sptString:
-
-            /* the String may be indexed */
-            if ( f . u . f . start_idx != 0 || f . u . f . select_len != 0 )
-            {
-                text_index = true;
-                text_start = f . u . f . start_idx;
-                if ( f . u . f . select_len != 0 )
-                    text_lim = f . u . f . select_len;
-            }
-
-            /* precision limits text length */
-            if ( text_lim > f . u . f . precision )
-                text_lim = f . u . f . precision;
-
-            S = * args [ arg_idx ] . S;
-            if ( S . addr == NULL && S . size == 0 && S . len == 0 )
-                S . addr = "";
-            break;
-
-            /* UCS-2 or UTF-32 String object */
-        case sptUCS2String:
-        case sptUTF32String:
-            return RC ( rcText, rcString, rcConverting, rcType, rcUnsupported );
-
-            /* an object pointer */
-        case sptPointer:
-            p = args [ arg_idx ] . p;
-            break;
-
-        case sptRowId:
-            i64 = args [ arg_idx ] . d;
-            break;
-        case sptRowLen:
-            u64 = args [ arg_idx ] . u;
-            break;
-
-#if SUPPORT_PERCENT_N
-        case sptBytesPrinted:
-            n = args [ arg_idx ] . n;
-            if ( n != NULL )
-                * n = (uint32_t) ( out -> cur + out -> flushed );
-            ++ arg_idx;
-            continue;
-#endif
-        default:
-            return RC ( rcText, rcString, rcConverting, rcType, rcUnrecognized );
-        }
-
-        if ( f . type_cast ) switch ( f . type )
-        {
-        case sptSignedInt:
-        case sptSignedInt8Vect:
-        case sptSignedInt16Vect:
-        case sptSignedInt32Vect:
-        case sptSignedInt64Vect:
-            f64 = (double) i64;
-            break;
-
-        case sptUnsignedInt:
-        case sptUnsignedInt8Vect:
-        case sptUnsignedInt16Vect:
-        case sptUnsignedInt32Vect:
-        case sptUnsignedInt64Vect:
-            f64 = (double) u64;
-            break;
-
-        case sptFloat:
-        case sptFloat32Vect:
-        case sptFloat64Vect:
-        case sptFloatLongVect:
-            i64 = (int64_t) f64;
-            break;
-
-        case sptChar:
-        case sptNulTermString:
-        case sptString:
-            break;
-
-            /* UCS-2 or UTF-32 String object */
-        case sptUCS2String:
-        case sptUTF32String:
-        case sptPointer:
-            return RC ( rcText, rcString, rcConverting, rcType, rcUnsupported );
-
-        case sptRowId:
-            f64 = (double) i64;
-            break;
-        case sptRowLen:
-            f64 = (double) u64;
-            break;
-
-#if SUPPORT_PERCENT_N
-        case sptBytesPrinted:
-            break;
-#endif
-        default:
-            return RC ( rcText, rcString, rcConverting, rcType, rcUnrecognized );
-        }
-
-        /* advance arg count */
-        ++ arg_idx;
-
-        /* initialize engine params */
-        sign_char = 0;
-        comma_sep = false;
-        left_pad = prefix_len = prefix_contribution = zero_fill = 0;
-
-        /* format */
-        switch ( f . fmt )
-        {
-        case spfNone:
-        case spfText:
-            break;
-
-        case spfSignedInt:
-            if ( i64 < 0 )
-            {
-                sign_char = '-';
-                u64 = - i64;
-            }
-            else
-            {
-                sign_char = f . sign;
-                u64 = i64;
-            }
-            f . add_prefix = 0;
-            /* no break */
-        case spfUnsigned:
-            to_numeral = alnum_set [ f . reverse_alnum ] [ f . upper_case_num ];
-
-            if ( f . radix > 36 )
-                f . radix = 10;
-
-            i = sizeof text;
-#if _DEBUGGING
-            text [ -- i ] = 0;
-#endif
-            /* record if we are comma separating below */
-            comma_sep = f . thousands_separate;
-
-#if DOUSE_NUM_PREFIX_IF_ZERO
-            if ( u64 == 0 && f . add_prefix )
-            {
-#if KEEP_OCT_PREFIX_IF_ZERO
-                if ( f . u . f . precision == 0 && f . radix == 8 )
-                    f . u . f . precision = 1;
-#endif
-                f . add_prefix = 0;
-            }
-#endif
-            /* special case for value 0 and precision 0 */
-            if ( u64 != 0 || f . u . f . precision != 0 )
-            {
-                /* convert numeral */
-                do
-                    text [ -- i ] = to_numeral [ u64 % f . radix ];
-                while ( ( u64 /= f . radix ) != 0 );
-
-                /* add prefix to unsigned numeral */
-                if ( f . add_prefix )
-                {
-                    switch ( f . radix )
-                    {
-                    case 2:
-                        memcpy ( prefix, "0b", prefix_len = 2 );
-                        break;
-                    case 8:
-                        memcpy ( prefix, "0", prefix_len = prefix_contribution = 1 );
-#if OCTAL_PREFIX_COUNTS_TOWARD_PRECISION
-                        if ( f . add_prefix && f . u . f . precision != 0 )
-                            -- f . u . f . precision;
-#endif
-                        break;
-                    case 16:
-#if HEX_PREFIX_FOLLOWS_CASE
-                        if ( to_numeral [ 10 ] == 'A' )
-                            memcpy ( prefix, "0X", prefix_len = 2 );
-                        else
-#endif
-                            memcpy ( prefix, "0x", prefix_len = 2 );
-                        break;
-                    }
-                }
-            }
-
-            /* determine length in characters, also size in bytes */
-#if _DEBUGGING
-            int_len = sizeof text - i - 1;
-#else
-            int_len = sizeof text - i;
-#endif
-            /* create text string */
-            StringInit ( & S, & text [ i ], int_len, int_len );
-
-            /* zero-fill amount */
-            if ( f . u . f . precision > ( uint64_t ) int_len )
-                zero_fill = ( uint32_t ) ( f . u . f . precision - ( uint64_t ) int_len );
-            else if ( f . left_fill == '0' )
-            {
-                /* the known characters associated with integer */
-                dst_len = int_len + prefix_len + ( sign_char != 0 );
-                if ( comma_sep && int_len != 0 )
-                    dst_len += ( int_len + prefix_contribution - 1 ) / 3;
-                if ( ( uint64_t ) dst_len < f . u . f . min_field_width )
-                {
-                    /* determine the numeric width, including zero padding */
-                    dst_len = ( uint32_t ) f . u . f . min_field_width -
-                        prefix_len + prefix_contribution - ( sign_char != 0 );
-                    if ( comma_sep && int_len != 0 )
-                    {
-                        /* desired numeric-only portion of field is "dst_len"
-                           it will be extended not only by some number of '0's,
-                           but will be sprinkled with commas.
-
-                           if "x" were our number of numerals, then:
-                             x + ( x - 1 ) / 3 = dst_len
-                           with allowances for integer math. solving for x:
-                             x = ( 3 * dst_len + 3 ) / 4
-
-                           for example: given int_len = 1, value = 0:
-                             dst_len =  1 : x =  1
-                             dst_len =  2 : x =  2
-                             dst_len =  3 : x =  3
-                             dst_len =  4 : x =  3 [ requires special compensation ]
-                             dst_len =  5 : x =  4
-                             dst_len =  6 : x =  5
-                             dst_len =  7 : x =  6
-                             dst_len =  8 : x =  6 [ requires special compensation ]
-                                . . .
-                             dst_len = 19 : x = 15
-                             dst_len = 20 : x = 15
-                             dst_len = 21 : x = 16
-                             dst_len = 22 : x = 17
-                        */
-
-                        /* apply compensation for impossible width */
-                        if ( ( dst_len & 3 ) == 0 )
-                            ++ left_pad;
-
-                        /* dst_len now becomes the number of numerals */
-                        dst_len = ( dst_len * 3 + 3 ) >> 2;
-                    }
-
-                    /* number of zeros to add */
-                    zero_fill = dst_len - int_len;
-                    prefix_len -= prefix_contribution;
-                }
-            }
-
-            break;
-
-            /* TEMPORARY - cheat by calling through to runtime sprintf
-               this needs to be implemented to handle thousands separation */
-        case spfStdFloat:
-            c = 'f';
-        fmt_float:
-            sign_char = f . sign;
-            if ( f64 < 0 )
-            {
-                sign_char = '-';
-                f64 = - f64;
-            }
-
-            ffmt [ i = 0 ] = '%';
-            if ( f . force_decimal_point )
-                ffmt [ ++ i ] = '#';
-            if ( f . u . f . precision > 20 )
-                f . u . f . precision = 20;
-            sprintf ( & ffmt [ ++ i ], ".%u%c"
-                      , ( uint32_t ) f . u . f . precision
-                      , ( char ) c );
-            cvt_len = snprintf ( text, sizeof text, ffmt, f64 );
-            assert ( cvt_len >= 0 && ( size_t ) cvt_len < sizeof text );
-            StringInit ( & S, text, cvt_len, cvt_len );
-
-            /* record if we are comma separating below and capture length of integer portion */
-            int_len = 0;
-            comma_sep = f . thousands_separate;
-            /* if ( comma_sep ) */
-            {
-                for ( ; isdigit ( text [ int_len ] ); ++ int_len )
-                    ( void ) 0;
-            }
-
-            /* zero-fill amount */
-            if ( f . left_fill == '0' )
-            {
-                /* the known characters associated with numeral */
-                dst_len = cvt_len + ( sign_char != 0 );
-                if ( comma_sep && int_len != 0 )
-                    dst_len += ( int_len - 1 ) / 3;
-                if ( ( uint64_t ) dst_len < f . u . f . min_field_width )
-                {
-                    /* determine the integer width, including zero padding */
-                    dst_len = ( uint32_t ) f . u . f . min_field_width -
-                        cvt_len + int_len - ( sign_char != 0 );
-                    if ( comma_sep && int_len != 0 )
-                    {
-                        /* SEE COMMENTS IN INTEGER SECTION */
-
-                        /* apply compensation for impossible width */
-                        if ( ( dst_len & 3 ) == 0 )
-                            ++ left_pad;
-
-                        /* dst_len now becomes the number of numerals */
-                        dst_len = ( dst_len * 3 + 3 ) >> 2;
-                    }
-
-                    /* number of zeros to add */
-                    zero_fill = dst_len - int_len;
-                }
-            }
-            break;
-
-        case spfGenFloat:
-            c = 'g';
-            goto fmt_float;
-
-        case spfSciFloat:
-            c = 'e';
-            goto fmt_float;
-
-            /* version */
-        case spfVersion:
-
-            if ( f . min_vers_components )
-            {
-                if ( ( u64 & 0xFFFF ) != 0 )
-                    f . u . f . precision = 3;
-                else if ( ( u64 & 0xFF0000 ) != 0 )
-                    f . u . f . precision = 2;
-                else
-                    f . u . f . precision = 1;
-            }
-
-            switch ( f . u . f . precision )
-            {
-            case 0:
-                cfmt = "";
-                break;
-            case 1:
-                cfmt = "%u";
-                break;
-            case 2:
-                cfmt = "%u.%u";
-                break;
-            default:
-                cfmt = "%u.%u.%u";
-            }
-
-            dst_len = sprintf ( text, cfmt
-                                , VersionGetMajor ( ( uint32_t ) u64 )
-                                , VersionGetMinor ( ( uint32_t ) u64 )
-                                , VersionGetRelease ( ( uint32_t ) u64 )
-                );
-            StringInit ( & S, text, dst_len, dst_len );
-            f . u . f . precision = dst_len;
-            break;
-
-        case spfSymbol:
-
-            /* calculate total size of symbol */
-            for ( N = p, S = N -> name, N = N -> dad; N != NULL; N = N -> dad )
-            {
-                S . len += N -> name . len + 1;
-                S . size += N -> name . size + 1;
-            }
-
-            /* mark need to recheck format */
-            S . addr = NULL;
-            break;
-
-
-        case spfTime:
-
-            tm = p;
-
-            dst_len = 0;
-            if ( f . print_date )
-            {
-                static char const *months [ 12 ] =
-                    { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
-                if ( f . print_weekday )
-                {
-                    static char const *weekdays [ 7 ] =
-                        { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
-                    dst_len = sprintf ( text, "%s %s %u %u"
-                                        , weekdays [ tm -> weekday ]
-                                        , months [ tm -> month ]
-                                        , tm -> day + 1
-                                        , tm -> year
-                        );
-                }
-                else
-                {
-                    dst_len = sprintf ( text, "%s %u %u"
-                                        , months [ tm -> month ]
-                                        , tm -> day + 1
-                                        , tm -> year
-                        );
-                }
-            }
-
-            if ( f . print_time )
-            {
-                if ( dst_len != 0 )
-                    text [ dst_len ++ ] = ' ';
-
-                if ( f . hour_24 )
-                {
-                    dst_len += sprintf ( & text [ dst_len ]
-                                         , f . left_fill == '0' ? "%02u:%02u:%02u" : "%u:%02u:%02u"
-                                         , tm -> hour
-                                         , tm -> minute
-                                         , tm -> second
-                        );
-                }
-                else
-                {
-                    dst_len += sprintf ( & text [ dst_len ]
-                                         , f . left_fill == '0' ? "%02u:%02u:%02u %cM" : "%u:%02u:%02u %cM"
-                                         , ( tm -> hour + 11 ) % 12 + 1
-                                         , tm -> minute
-                                         , tm -> second
-                                         , ( tm -> hour < 12 ) ? 'A' : 'P'
-                        );
-                }
-
-                if ( f . print_timezone )
-                {
-                    dst_len += sprintf ( & text [ dst_len ]
-                                         , " %+02d"
-                                         , tm -> tzoff / 60
-                        );
-                }
-            }
-
-            StringInit ( & S, text, dst_len, dst_len );
-            break;
-
-        case spfRC:
-            dst_len = (uint32_t) KWrtFmt_rc_t ( text, sizeof text, f . explain_rc ? "#" : "", ( rc_t ) u64 );
-            StringInit ( & S, text, dst_len, dst_len );
-            break;
-
-        case spfOSErr:
-            dst_len = (uint32_t) KWrtFmt_error_code ( text, sizeof text, ( int ) i64 );
-            StringInit ( & S, text, dst_len, dst_len );
-            break;
-
-        default:
-            return RC ( rcText, rcString, rcConverting, rcFormat, rcUnrecognized );
-        }
-
-        /* at this point, we have text in "S".
-           if the text pointer is NULL, it will need to be further processed.
-           if the text size is 0 but the length is not, then we may need to measure string.
-        */
-
-        /* apply index limitation */
-        if ( text_index )
-        {
-            assert ( S . addr != NULL );
-            assert ( S . size != 0 || S . len == 0 );
-            if ( StringSubstr ( & S, & S, ( uint32_t ) text_start, ( uint32_t ) text_lim ) == NULL )
-                StringInit ( & S, "", 0, 0 );
-        }
-
-        /* determine overall width of substitution so far */
-        dst_len = left_pad + ( sign_char != 0 ) + prefix_len + zero_fill + S . len;
-
-        /* if there are comma insertions, get those, too */
-        if ( comma_sep && ( int_len != 0 || zero_fill != 0 ) )
-            dst_len += ( int_len + zero_fill - 1 ) / 3;
-
-        /* calculate remaining left padding */
-        if ( f . left_fill != 0 && f . u . f . min_field_width > dst_len )
-        {
-            assert ( S . size != 0 || S . len == 0 );
-            left_pad += ( uint32_t ) ( f . u . f . min_field_width ) - dst_len;
-            dst_len = ( uint32_t ) f . u . f . min_field_width;
-        }
-
-        /* left padding */
-        if ( left_pad != 0 )
-        {
-            rc = print_padding ( out, left_pad, f . left_fill );
-            if ( rc != 0 )
-                return rc;
-        }
-
-        /* output sign or prefix */
-        if ( sign_char != 0 )
-        {
-            rc = print_padding ( out, 1, sign_char );
-            if ( rc != 0 )
-                return rc;
-        }
-        else if ( prefix_len != 0 )
-        {
-            rc = write_buffer ( out, prefix, prefix_len );
-            if ( rc != 0 )
-                return rc;
-        }
-
-        /* output comma-separated numeral */
-        if ( comma_sep && ( zero_fill != 0 || int_len != 0 ) )
-        {
-            uint32_t pos = zero_fill + int_len;
-            uint32_t chunk = ( pos - 1 ) % 3 + 1;
-
-            for ( i = 0, pos -= chunk; chunk > 0; -- chunk )
-            {
-                if ( zero_fill != 0 )
-                {
-                    rc = print_padding ( out, 1, '0' );
-                    -- zero_fill;
-                }
-                else
-                {
-                    rc = print_padding ( out, 1, S . addr [ i ] );
-                    ++ i;
-                }
-                if ( rc != 0 )
-                    return rc;
-            }
-
-            assert ( pos % 3 == 0 );
-            for ( pos /= 3; pos != 0; -- pos )
-            {
-                rc = print_padding ( out, 1, ',' );
-                if ( rc != 0 )
-                    return rc;
-
-                if ( zero_fill != 0 )
-                {
-                    if ( zero_fill >= 3 )
-                    {
-                        rc = print_padding ( out, 3, '0' );
-                        zero_fill -= 3;
-                    }
-                    else
-                    {
-                        rc = print_padding ( out, zero_fill, '0' );
-                        if ( rc == 0 )
-                            rc = write_buffer ( out, S . addr, 3 - zero_fill );
-                        i += 3 - zero_fill;
-                        zero_fill = 0;
-                    }
-                }
-                else
-                {
-                    rc = write_buffer ( out, & S . addr [ i ], 3 );
-                    i += 3;
-                }
-
-                if ( rc != 0 )
-                    return rc;
-            }
-
-            rc = write_buffer ( out, & S . addr [ i ], S . len - i );
-            if ( rc != 0 )
-                return rc;
-        }
-
-        /* output numeral with zero fill */
-        else if ( zero_fill != 0 )
-        {
-            rc = print_padding ( out, zero_fill, '0' );
-            if ( rc == 0 )
-                rc = print_string ( out, & S, text_lim );
-        }
-
-        /* output NUL-terminated string */
-        else if ( S . size == 0 && S . len != 0 )
-        {
-            assert ( f . left_fill == 0 || f . u . f . min_field_width == 0 );
-            rc = print_nul_term_string ( out, & S, text_lim );
-            dst_len = S . len;
-        }
-
-        /* output KSymbol */
-        else if ( S . addr == NULL )
-        {
-            rc = print_symbol ( out, p );
-        }
-
-        /* output anything else in a String */
-        else
-        {
-            rc = print_string ( out, & S, text_lim );
-        }
-
-        /* recover from error */
-        if ( rc != 0 )
-            return rc;
-
-        /* apply right padding */
-        if ( f . u . f . min_field_width > dst_len )
-        {
-            rc = print_padding ( out, f . u . f . min_field_width - dst_len, ' ' );
-            if ( rc != 0 )
-                return rc;
-        }
-    }
-
-    rc = flush_buffer ( out );
-
-    if ( rc == 0 && out -> overflow )
-        rc = RC ( rcText, rcString, rcConverting, rcBuffer, rcInsufficient );
-
-    return rc;
-}
-
-
-/* structured_printf
- *  uses constant format descriptors and argument block
- *  prints to "out" handler
- */
-LIB_EXPORT rc_t CC structured_printf ( const KWrtHandler *handler,
-    size_t *num_writ, const PrintFmt *fmt, const PrintArg *args )
-{
-    if ( handler != NULL )
-    {
-        rc_t rc;
-        char buff [ 4096 ];
-
-        KBufferedWrtHandler out;
-        out . handler = handler;
-        out . buff = buff;
-        out . bsize = sizeof buff;
-
-        rc = structured_print_engine ( & out, fmt, args );
-
-        if ( num_writ != NULL )
-            * num_writ = out . cur + out . flushed;
-
-        return rc;
-    }
-
-    if ( num_writ != NULL )
-        * num_writ = 0;
-
-    return RC ( rcRuntime, rcString, rcConverting, rcFile, rcNull );
-}
-
-
-/* structured_sprintf
- *  uses constant format descriptors and argument block
- *  prints to UTF-8 character buffer "dst"
- */
-LIB_EXPORT rc_t CC structured_sprintf ( char *dst, size_t bsize,
-    size_t *num_writ, const PrintFmt *fmt, const PrintArg *args )
-{
-    if ( dst != NULL || bsize == 0 )
-    {
-        rc_t rc;
-
-        KBufferedWrtHandler out;
-        out . handler = NULL;
-        out . buff = dst;
-        out . bsize = bsize;
-
-        rc = structured_print_engine ( & out, fmt, args );
-
-        if ( num_writ != NULL )
-            * num_writ = out . cur + out . flushed;
-
-        return rc;
-    }
-
-    if ( num_writ != NULL )
-        * num_writ = 0;
-
-    return RC ( rcRuntime, rcString, rcConverting, rcBuffer, rcNull );
-}
-
-
-/* string_printf
- *  provides a facility similar to snprintf
- *
- *  "dst" [ OUT ] and "bsize" [ IN ] - output buffer for string
- *  will be NUL-terminated if possible
- *
- *  "num_writ" [ OUT, NULL OKAY ] - returns the number of non-NUL bytes
- *  written to "dst" or the required "bsize" to complete successfully,
- *  not including the NUL termination.
- *
- *  "fmt" [ IN ] and "args" [ IN, OPTIONAL ] - data to write
- *
- *  returns 0 if all bytes were successfully written and a NUL-byte was
- *  written into the buffer.
- *
- *  returns rcBuffer, rcInsufficient if the buffer was too small. in this
- *  case, it is possible that the only missing byte would be the NUL
- *  termination, and the output string may still be usable since "num_writ"
- *  indicates the actual number of text bytes.
- */
-LIB_EXPORT rc_t CC new_string_vprintf ( char *dst, size_t bsize,
-    size_t *num_writ, const char *fmt_str, va_list vargs )
-{
-    rc_t rc;
-
-    String str [ 64 ], * strp = str;
-    PrintFmt fmt [ 64 ], * fmtp = fmt;
-    PrintArg args [ 64 ], * argp = args;
-
-    KDataBuffer overflow;
-
-    size_t dummy;
-    if ( num_writ == NULL )
-        num_writ = & dummy;
-
-    * num_writ = 0;
-
-    rc = parse_format_string ( fmt_str, vargs,
-        & strp, & fmtp, & argp, & overflow );
-
-    if ( rc == 0 )
-        rc = structured_sprintf ( dst, bsize, num_writ, fmtp, argp );
-
-    if ( strp != str )
-        KDataBufferWhack ( & overflow );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC new_string_printf ( char *dst, size_t bsize,
-    size_t *num_writ, const char *fmt, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, fmt );
-
-    rc = new_string_vprintf ( dst, bsize, num_writ, fmt, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC new_vkfprintf ( const KWrtHandler *out,
-    size_t *num_writ, const char *fmt_str, va_list vargs )
-{
-    rc_t rc;
-
-    String str [ 64 ], * strp = str;
-    PrintFmt fmt [ 64 ], * fmtp = fmt;
-    PrintArg args [ 64 ], * argp = args;
-
-    KDataBuffer overflow;
-
-    size_t dummy;
-    if ( num_writ == NULL )
-        num_writ = & dummy;
-
-    * num_writ = 0;
-
-    rc = parse_format_string ( fmt_str, vargs,
-        & strp, & fmtp, & argp, & overflow );
-
-    if ( rc == 0 )
-        rc = structured_printf ( out, num_writ, fmtp, argp );
-
-    if ( strp != str )
-        KDataBufferWhack ( & overflow );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC new_kfprintf ( const KWrtHandler *out,
-    size_t *num_writ, const char *fmt, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, fmt );
-
-    rc = new_vkfprintf ( out, num_writ, fmt, args );
-        
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KDataBufferVPrintf ( KDataBuffer * buf, const char * fmt, va_list args )
-{
-    rc_t rc;
-
-    if ( buf == NULL )
-        rc = RC ( rcText, rcString, rcFormatting, rcBuffer, rcNull );
-    else if ( fmt == NULL )
-        rc = RC ( rcText, rcString, rcFormatting, rcParam, rcNull );
-    else if ( fmt [ 0 ] == 0 )
-        rc = RC ( rcText, rcString, rcFormatting, rcParam, rcEmpty );
-    else
-    {
-        size_t bsize;
-        char *buffer;
-        size_t content;
-        size_t num_writ;
-
-        /* the C library ruins a va_list upon use
-           in case we ever need to use it a second time,
-           make a copy first */
-        va_list args_copy;
-        va_copy ( args_copy, args );
-
-        /* begin to calculate content and bsize */
-        content = ( size_t ) buf -> elem_count;
-
-        /* check for an empty buffer */
-        if ( content == 0 )
-        {
-            /* detect buffers initialized by memset */
-            if ( buf -> elem_bits == 0 )
-                buf -> elem_bits = 8;
-
-            rc = KDataBufferResize ( buf, bsize = 4096 );
-            if ( rc != 0 )
-                return rc;
-        }
-        else
-        {
-            /* generate even multiple of 4K */
-            bsize = ( content + 4095 ) & ~ ( size_t ) 4095;
-
-            /* discount NUL byte */
-            content -= 1;
-        }
-            
-        /* convert the 2-part url into a flat string */
-        buffer = buf -> base;
-        rc = string_vprintf ( &buffer [ content ], bsize - content, & num_writ, fmt, args );
-        /* Make sure there is enough room to store data including NUL */
-        if ( rc != 0 || ( content + num_writ ) == bsize )
-        {
-            bsize = ( content + num_writ + 4095 + 1 ) & ~ ( size_t ) 4095;
-            rc = KDataBufferResize ( buf, bsize );
-            if ( rc == 0 )
-            {
-                /* try again with the newly sized buffer */
-                rc = string_vprintf ( &buffer [ content ], bsize - content, & num_writ, fmt, args_copy );
-            }
-        }
-        va_end ( args_copy );
-    
-        /* size down to bsize + NUL */
-        if ( rc == 0 )
-            KDataBufferResize ( buf, content + num_writ + 1 );
-    }
-
-    return rc;
-}
-
-/* forward to KDataBufferVPrintf */
-LIB_EXPORT rc_t CC KDataBufferPrintf ( KDataBuffer * buf, const char * fmt, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, fmt );
-    rc = KDataBufferVPrintf ( buf, fmt, args );
-    va_end ( args );
-
-    return rc;
-}
diff --git a/libs/klib/progressbar.c b/libs/klib/progressbar.c
deleted file mode 100644
index 2c9cbf2..0000000
--- a/libs/klib/progressbar.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/rc.h>
-#include <klib/out.h>
-
-#include <sysalloc.h>
-#include <stdlib.h>
-
-typedef struct progressbar
-{
-	uint32_t percent;
-    bool initialized;
-	uint8_t digits;
-} progressbar;
-
-
-LIB_EXPORT rc_t CC make_progressbar( progressbar ** pb, const uint8_t digits )
-{
-	rc_t rc = 0;
-    if ( pb == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcSelf, rcNull );
-	else
-	{
-		progressbar	* p = calloc( 1, sizeof( *p ) );
-		if ( p == NULL )
-			rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-		else
-		{
-			if ( digits > 2 )
-				p -> digits = 2;
-			else
-				p -> digits = digits;
-			*pb = p;
-		}
-	}
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC destroy_progressbar( progressbar * pb )
-{
-    if ( pb == NULL )
-        return RC( rcVDB, rcNoTarg, rcDestroying, rcSelf, rcNull );
-    free( pb );
-    return 0;
-}
-
-
-static void progess_0a( const uint16_t percent )
-{
-    KOutMsg( "| %2u%%", percent );
-}
-
-
-static void progess_0( const uint16_t percent )
-{
-    if ( percent & 1 )
-        KOutMsg( "\b\b\b\b- %2u%%", percent );
-    else
-        KOutMsg( "\b\b\b%2u%%", percent );
-}
-
-
-static void progess_1a( const uint16_t percent )
-{
-    uint16_t p1 = percent / 10;
-    uint16_t p0 = percent - ( p1 * 10 );
-    KOutMsg( "| %2u.%01u%%", p1, p0 );
-}
-
-
-static void progess_1( const uint16_t percent )
-{
-    uint16_t p1 = percent / 10;
-    uint16_t p0 = percent - ( p1 * 10 );
-    if ( ( p1 & 1 )&&( p0 == 0 ) )
-        KOutMsg( "\b\b\b\b\b\b- %2u.%01u%%", p1, p0 );
-    else
-        KOutMsg( "\b\b\b\b\b%2u.%01u%%", p1, p0 );
-}
-
-
-static void progess_2a( const uint16_t percent )
-{
-    uint16_t p1 = percent / 100;
-    uint16_t p0 = percent - ( p1 * 100 );
-    KOutMsg( "| %2u.%02u%%", p1, p0 );
-}
-
-
-static void progess_2( const uint16_t percent )
-{
-    uint16_t p1 = percent / 100;
-    uint16_t p0 = percent - ( p1 * 100 );
-    if ( ( p1 & 1 )&&( p0 == 0 ) )
-        KOutMsg( "\b\b\b\b\b\b\b- %2u.%02u%%", p1, p0 );
-    else
-        KOutMsg( "\b\b\b\b\b\b%2u.%02u%%", p1, p0 );
-}
-
-
-LIB_EXPORT rc_t CC update_progressbar( progressbar * pb, const uint32_t percent )
-{
-	rc_t rc = 0;
-    if ( pb == NULL )
-        rc = RC( rcVDB, rcNoTarg, rcParsing, rcSelf, rcNull );
-	else
-	{
-		if ( pb->initialized )
-		{
-			if ( pb->percent != percent )
-			{
-				pb->percent = percent;
-				switch( pb -> digits )
-				{
-					case 0 : progess_0( percent ); break;
-					case 1 : progess_1( percent ); break;
-					case 2 : progess_2( percent ); break;
-				}
-			}
-		}
-		else
-		{
-			pb->percent = percent;
-			switch( pb -> digits )
-			{
-				case 0 : progess_0a( percent ); break;
-				case 1 : progess_1a( percent ); break;
-				case 2 : progess_2a( percent ); break;
-			}
-			pb->initialized = true;
-		}
-	}
-    return rc;
-}
diff --git a/libs/klib/ptpersist.c b/libs/klib/ptpersist.c
deleted file mode 100644
index 64f9e13..0000000
--- a/libs/klib/ptpersist.c
+++ /dev/null
@@ -1,1121 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include "trie-priv.h"
-#include "pbstree-priv.h"
-#include <klib/container.h>
-#include <klib/sort.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-
-#if _DEBUGGING
-#define DEBUGPRINT 0
-#endif
-
-/*--------------------------------------------------------------------------
- * private declarations
- */
-typedef struct IdxMap IdxMap;
-struct IdxMap
-{
-    uint32_t freq;
-    uint32_t idx;
-    uint32_t ch;
-};
-
-static
-int64_t CC IdxMapSort ( const void *left, const void *right, void *ignore )
-{
-#define a ( ( const IdxMap* ) left )
-#define b ( ( const IdxMap* ) right )
-
-    if ( b -> freq != a -> freq )
-        return ( int64_t ) b -> freq - ( int64_t ) a -> freq;
-    return ( int64_t ) a -> idx - ( int64_t ) b -> idx;
-
-#undef a
-#undef b
-}
-
-typedef struct PTChildNode PTChildNode;
-struct PTChildNode
-{
-    SLNode n;
-    const TTrans *trans;
-    uint32_t dad;
-    uint16_t idx;
-};
-
-static
-void CC PTChildNodeWhack ( SLNode *n, void *ignore )
-{
-    free ( n );
-}
-
-typedef struct PTriePersistData PTriePersistData;
-struct PTriePersistData
-{
-    PTWriteFunc write;
-    void *write_param;
-
-    PTAuxFunc aux;
-    void *aux_param;
-
-    PTAuxFunc null_write;
-    PTAuxFunc live_write;
-
-    IdxMap *idx_map;
-    size_t *trans_map;
-
-    void ( CC * record_idx ) ( void*, uint32_t, uint32_t );
-    void ( CC * record_trans ) ( void*, uint32_t, uint32_t );
-
-    union
-    {
-        uint8_t *v8;
-        uint16_t *v16;
-        uint32_t *v32;
-
-    } idx_seq;
-
-    uint8_t *child_seq_type;
-
-    union
-    {
-        uint8_t *v8;
-        uint16_t *v16;
-        uint32_t *v32;
-
-    } backtrace;
-
-    union
-    {
-        uint8_t *v8;
-        uint16_t *v16;
-        uint32_t *v32;
-
-    } trans_seq;
-
-    size_t data_size;
-
-    uint32_t num_nodes;
-    uint32_t max_nodes;
-
-    uint32_t num_trans;
-    uint32_t trans_id;
-    uint32_t child_id;
-
-    uint32_t min_width;
-    uint32_t depth;
-
-    rc_t rc;
-
-    uint8_t idx_size;
-    uint8_t trans_size;
-    uint8_t off_size;
-};
-
-static
-rc_t CC PTAlign ( PTriePersistData *pb, size_t *offset,
-    uint32_t size, uint32_t first_byte )
-{
-    rc_t rc;
-
-    union
-    {
-        uint8_t u8 [ 4 ];
-        uint32_t u32;
-    } u;
-    size_t to_write, num_writ;
-
-    int align = (int)( offset [ 0 ] & ( size - 1 ) );
-    if ( align == 0 )
-        return 0;
-
-#if DEBUGPRINT
-    fprintf(stderr, "PTAlign called.\n");
-#endif
-
-
-    to_write = size - align;
-
-    u . u32 = 0;
-    u . u8 [ 0 ] = ( uint8_t ) first_byte;
-
-    num_writ = 0;
-    rc = ( * pb -> write ) ( pb -> write_param, u . u8, to_write, & num_writ );
-
-    * offset += num_writ;
-
-    if ( rc != 0 )
-        return rc;
-    if ( num_writ != to_write )
-        return RC ( rcCont, rcTrie, rcPersisting, rcTransfer, rcIncomplete );
-    return 0;
-}
-
-static
-rc_t CC TNodeDataSize ( void *param, const void *n, size_t *num_writ,
-    PTWriteFunc write, void *write_param )
-{
-    PTriePersistData *pb = param;
-    rc_t rc = ( * pb -> aux ) ( pb -> aux_param, n, num_writ, write, write_param );
-    if ( rc == 0 )
-    {
-        String str;
-        const TNode *keynode = n;
-        if ( StringSubstr ( & keynode -> key, & str, pb -> depth, 0 ) == NULL )
-            * num_writ += 1;
-        else
-            * num_writ += str . size + 1;
-    }
-    return rc;
-}
-
-static
-rc_t CC TNodeWrite ( void *param, const void *n, size_t *num_writ,
-    PTWriteFunc write, void *write_param )
-{
-    PTriePersistData *pb = param;
-    const TNode *keynode = n;
-
-    rc_t rc;
-    String str;
-
-#if DEBUGPRINT
-    fprintf(stderr, "TNodeWrite called.\n");
-#endif
-
-
-    if ( write == NULL )
-        return TNodeDataSize ( param, n, num_writ, write, write_param );
-
-    /* TBD - find out why string is written with pb->write and NUL is written with write
-       they should be the same, and so the entire NUL terminated string should be done at once */
-    if ( StringSubstr ( & keynode -> key, & str, pb -> depth, 0 ) != NULL )
-        rc = ( * pb -> write ) ( pb -> write_param, str . addr, str . size, num_writ );
-    else
-    {
-        rc = 0;
-        * num_writ = 0;
-    }
-    if ( rc == 0 )
-    {
-        size_t writ;
-        char term [ 1 ];
-
-        term [ 0 ] = 0;
-        rc = ( * write ) ( write_param, term, 1, & writ );
-        if ( rc == 0 )
-        {
-            * num_writ += writ;
-            if ( writ != 1 )
-                return -1; /*AK: TODO is it correct?*/
-
-            writ = 0;
-            rc = ( * pb -> aux ) ( pb -> aux_param, n, & writ, write, write_param );
-            * num_writ += writ;
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t CC NullWrite ( void *param, const void *buffer, size_t bytes, size_t *num_writ )
-{
-    * num_writ = bytes;
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * TTrans
- */
-static
-void CC TTransCountNodes ( BSTNode *n, void *data )
-{
-    /* count node */
-    ++ ( * ( uint32_t* ) data );
-}
-
-static
-void CC TTransCountTrans ( const TTransBacktrace *bt, uint32_t width, void *data )
-{
-    PTriePersistData *pb = data;
-    const TTrans *trans = bt -> trans;
-
-    /* count transition node */
-    ++ pb -> num_trans;
-
-    /* count value nodes */
-    if ( trans -> vals . root != NULL )
-    {
-        uint32_t num_nodes = 0;
-        BSTreeForEach ( & trans -> vals, 0, TTransCountNodes, & num_nodes );
-
-        /* accumulate into overall counter */
-        pb -> num_nodes += num_nodes;
-
-        /* record max */
-        if ( num_nodes > pb -> max_nodes )
-            pb -> max_nodes = num_nodes;
-    }
-
-    /* analyze child transition array and character set */
-    if ( trans -> child != NULL )
-    {
-        uint32_t i;
-        for ( i = 0; i < width; ++ i )
-        {
-            if ( trans -> child [ i ] != NULL )
-                ++ pb -> idx_map [ i ] . freq;
-        }
-    }
-}
-
-static
-void CC TTransRecordU8 ( void *buffer, uint32_t idx, uint32_t val )
-{
-    ( ( uint8_t* ) buffer ) [ idx ] = ( uint8_t ) val;
-}
-
-static
-void CC TTransRecordU16 ( void *buffer, uint32_t idx, uint32_t val )
-{
-    ( ( uint16_t* ) buffer ) [ idx ] = ( uint16_t ) val;
-}
-
-static
-void CC TTransRecordU32 ( void *buffer, uint32_t idx, uint32_t val )
-{
-    ( ( uint32_t* ) buffer ) [ idx ] = ( uint32_t ) val;
-}
-
-static
-bool CC TTransPersist1 ( const TTrans *trans, PTriePersistData *pb,
-    uint32_t tid, uint32_t dad, uint16_t idx, SLList *sl,
-    uint32_t *icntp, uint32_t *slenp, uint32_t *tcntp )
-{
-    uint32_t icnt, slen, tcnt;
-
-    void ( CC * record_idx ) ( void*, uint32_t, uint32_t ) = pb -> record_idx;
-    void ( CC * record_trans ) ( void*, uint32_t, uint32_t ) = pb -> record_trans;
-
-#if DEBUGPRINT
-    fprintf(stderr, "TTransPersist1 called.\n");
-#endif
-
-
-    /* set up header */
-#if RECORD_HDR_IDX
-#if DEBUGPRINT
-    fprintf(stderr, "Recording header index %d, %d\n", pttHdrIdx, idx);
-#endif
-    /* zero-based character code of transition */
-    ( * record_idx ) ( pb -> idx_seq . v8, pttHdrIdx, idx );
-#endif
-#if RECORD_HDR_DEPTH
-#if DEBUGPRINT
-    fprintf(stderr, "Recording header depth %d, %d\n", pttHdrDepth, trans->depth);
-#endif
-    /* node depth */
-    ( * record_idx ) ( pb -> idx_seq . v8, pttHdrDepth, trans -> depth );
-#endif
-    /* the number of transitions; in child array or in vals btree */
-    ( * record_idx ) ( pb -> idx_seq . v8, pttHdrTransCnt, trans -> tcnt );
-
-    /* record one-based parent backtrace */
-    if ( pb -> backtrace . v8 != NULL )
-        ( * record_trans ) ( pb -> backtrace . v8, 0, dad );
-
-    /* record child transition table */
-    if ( trans -> child == NULL )
-    {
-        /* no sequence or indices beyond header */
-        icnt = slen = tcnt = 0;
-        ( * record_idx ) ( pb -> idx_seq . v8, pttHdrIdxCnt, 0 );
-    }
-    else
-    {
-        uint32_t i;
-
-        /* set all index entries to simple type
-           the working array is large enough to hold
-           one bit per character code */
-        memset ( pb -> child_seq_type, 0, ( pb -> min_width + 7 ) >> 3 );
-
-        /* walk child array:
-           i    => zero-based character code and
-                   indirect index into trans.child
-           tcnt => persisted child index and counter
-           icnt => idx index and counter
-           slen => child_seq_type index and counter */
-        for ( tcnt = icnt = slen = i = 0; i < pb -> min_width; ++ i )
-        {
-            PTChildNode *n;
-
-            /* look only at valid transitions
-               notice that i, which represents the new character code,
-               is first mapped to an old character code */
-            if ( trans -> child [ pb -> idx_map [ i ] . idx ] != NULL )
-            {
-                /* record trans into child slot and allocate id */
-                ( * record_trans ) ( pb -> trans_seq . v8, tcnt ++, ++ pb -> child_id );
-
-                /* record index, either single or lower part of pair
-                   index value is the new character code for transition */
-                ( * record_idx ) ( pb -> idx_seq . v8, ++ icnt + pttLastHdr, i );
-
-                /* create a node for next trans to visit */
-                n = malloc ( sizeof * n );
-                if ( n == NULL )
-                    return true;
-                n -> trans = trans -> child [ pb -> idx_map [ i ] . idx ];
-                n -> dad = tid;
-                n -> idx = i;
-                SLListPushTail ( sl, & n -> n );
-
-                /* determine type
-                   notice that "i" is incremented, even though it will be
-                   incremented by for loop. the effect of doing so, as well
-                   as the effect of the following compound statement, is to
-                   leave "i" such that child [ i ] is NULL, in which case
-                   we're going to skip it anyway */
-                if ( ++ i < pb -> min_width &&
-                     trans -> child [ pb -> idx_map [ i ] . idx ] != NULL )
-                {
-                    /* it's a range */
-                    pb -> child_seq_type [ slen >> 3 ] |=
-                        ( uint8_t ) ( 1U << ( slen & 7 ) );
-
-                    /* record each trans, allocating a new child id */
-                    ( * record_trans ) ( pb -> trans_seq . v8, tcnt ++, ++ pb -> child_id );
-                    n = malloc ( sizeof * n );
-                    if ( n == NULL )
-                        return true;
-                    n -> trans = trans -> child [ pb -> idx_map [ i ] . idx ];
-                    n -> dad = tid;
-                    n -> idx = i;
-                    SLListPushTail ( sl, & n -> n );
-
-                    /* continue until end */
-                    for ( ++ i; i < pb -> min_width; ++ i )
-                    {
-                        /* detect end of range */
-                        if ( trans -> child [ pb -> idx_map [ i ] . idx ] == NULL )
-                            break;
-                        ( * record_trans ) ( pb -> trans_seq . v8, tcnt ++, ++ pb -> child_id );
-                        n = malloc ( sizeof * n );
-                        if ( n == NULL )
-                            return true;
-                        n -> trans = trans -> child [ pb -> idx_map [ i ] . idx ];
-                        n -> dad = tid;
-                        n -> idx = i;
-                        SLListPushTail ( sl, & n -> n );
-                    }
-
-                    /* i is one beyond end of index range, but
-                       we store the range as fully closed */
-                    ( * record_idx ) ( pb -> idx_seq . v8, ++ icnt + pttLastHdr, i - 1 );
-                }
-
-                /* count the index sequence bit */
-                ++ slen;
-            }
-        }
-
-        /* complete the header for the case where child array was present */
-        ( * record_idx ) ( pb -> idx_seq . v8, pttHdrIdxCnt, icnt );
-        ( * record_idx ) ( pb -> idx_seq . v8, pttHdrSeqLen, slen );
-        ( * record_idx ) ( pb -> idx_seq . v8, pttHdrChildCnt, tcnt );
-    }
-
-    * icntp = icnt;
-    * slenp = slen;
-    * tcntp = tcnt;
-
-    return false;
-}
-
-static
-bool CC TTransPersist ( const TTrans *trans, PTriePersistData *pb,
-     uint32_t dad, uint16_t idx, SLList *sl )
-{
-    uint32_t ztid;
-    uint32_t icnt, slen, tcnt;
-    size_t to_write, num_writ, entry_size;
-
-#if DEBUGPRINT
-    fprintf(stderr, "TTransPersist called.\n");
-#endif
-
-
-    /* grab my zero-based trans id */
-    ztid = pb -> trans_id ++;
-    assert ( ztid < pb -> num_trans );
-
-    /* grab entry size */
-    entry_size = pb -> data_size;
-
-    /* assign initial size as zero */
-    pb -> trans_map [ ztid ] = 0;
-
-    /* populate tables and record child iteration nodes */
-    if ( TTransPersist1 ( trans, pb, ztid + 1, dad, idx, sl, & icnt, & slen, & tcnt ) )
-        return true;
-
-    /* write TTrans header data */
-    if ( icnt == 0 )
-    {
-        /* simple header for TTrans with no child array */
-        to_write = pttHdrNullEnd * pb -> idx_size;
-        pb -> rc = ( * pb -> write ) ( pb -> write_param,
-            pb -> idx_seq . v8, to_write, & num_writ );
-
-        /* write parent backtrace if needed */
-        if ( pb -> backtrace . v8 != NULL && pb -> rc == 0 && num_writ == to_write )
-        {
-            pb -> data_size += num_writ;
-            pb -> rc = PTAlign ( pb, & pb -> data_size, pb -> trans_size, 0 );
-            if ( pb -> rc == 0 )
-            {
-                to_write = pb -> trans_size;
-                pb -> rc = ( * pb -> write ) ( pb -> write_param,
-                    pb -> backtrace . v8, to_write, & num_writ );
-            }
-        }
-    }
-    else
-    {
-        /* write index array */
-        to_write = ( icnt + pttFirstIdx ) * pb -> idx_size;
-        pb -> rc = ( * pb -> write ) ( pb -> write_param,
-            pb -> idx_seq . v8, to_write, & num_writ );
-
-        /* proceed if no error and completely written
-           the incomplete write will be detected below */
-        if ( pb -> rc == 0 && num_writ == to_write )
-        {
-            pb -> data_size += num_writ;
-
-            /* write index type array */
-            assert ( slen != 0 );
-            to_write = ( slen + 7 ) >> 3;
-            pb -> rc = ( * pb -> write ) ( pb -> write_param,
-                pb -> child_seq_type, to_write, & num_writ );
-            if ( pb -> rc == 0 && num_writ == to_write )
-            {
-                /* align for transition size */
-                pb -> data_size += num_writ;
-                pb -> rc = PTAlign ( pb, & pb -> data_size, pb -> trans_size, 0 );
-                if ( pb -> rc == 0 )
-                {
-                    /* write parent backtrace if needed */
-                    if ( pb -> backtrace . v8 != NULL )
-                    {
-                        to_write = pb -> trans_size;
-                        pb -> rc = ( * pb -> write ) ( pb -> write_param,
-                            pb -> backtrace . v8, to_write, & num_writ );
-                        if ( pb -> rc != 0 )
-                            return true;
-                        if ( num_writ != to_write )
-                        {
-                            pb -> rc = RC ( rcCont, rcTrie, rcPersisting, rcTransfer, rcIncomplete );
-                            return true;
-                        }
-
-                        pb -> data_size += num_writ;
-                    }
-
-                    /* write transition array */
-                    to_write = tcnt * pb -> trans_size;
-                    pb -> rc = ( * pb -> write ) ( pb -> write_param,
-                        pb -> trans_seq . v8, to_write, & num_writ );
-                }
-            }
-        }
-    }
-
-    if ( pb -> rc != 0 )
-        return true;
-
-    pb -> data_size += num_writ;
-    if ( num_writ != to_write )
-    {
-        pb -> rc = RC ( rcCont, rcTrie, rcPersisting, rcTransfer, rcIncomplete );
-        return true;
-    }
-
-    /* record trans' depth for internal key storage */
-    pb -> depth = trans -> depth;
-
-    /* detect need to align for data */
-    if ( ( pb -> data_size & 3 ) != 0 )
-    {
-        /* may be able to bail before writing b-tree */
-        if ( trans -> vals . root == NULL )
-        {
-            pb -> rc = PTAlign ( pb, & pb -> data_size, 4, 0 );
-            if ( pb -> rc != 0 )
-                return true;
-
-            /* record the size */
-            pb -> trans_map [ ztid ] = pb -> data_size - entry_size;
-            return false;
-        }
-
-        /* perform alignment */
-        pb -> rc = PTAlign ( pb, & pb -> data_size, 4, 1 );
-        if ( pb -> rc != 0 )
-            return true;
-    }
-
-    /* detect fake pass */
-    if ( pb -> write == NullWrite )
-    {
-        /* gather sizes */
-        pb -> rc = BSTreePersist ( & trans -> vals, & num_writ,
-            NULL, NULL, pb -> null_write, pb );
-    }
-    else
-    {
-        /* write BSTree for values */
-        pb -> rc = BSTreePersist ( & trans -> vals, & num_writ,
-            pb -> write, pb -> write_param, pb -> live_write, pb );
-    }
-
-    pb -> data_size += num_writ;
-
-    /* align3 */
-    if ( pb -> rc == 0 )
-        pb -> rc = PTAlign ( pb, & pb -> data_size, 4, 0 );
-
-    if ( pb -> rc != 0 )
-        return true;
-
-    pb -> trans_map [ ztid ] = pb -> data_size - entry_size;
-    return false;
-}
-
-/* TTransPIterate
- *  walks TTrans nodes in a predictive order
- *  using a queue
- */
-static
-bool CC TTransPIterate ( const TTrans *self, PTriePersistData *pb )
-{
-    PTChildNode *n;
-
-    SLList sl;
-    SLListInit ( & sl );
-
-#if DEBUGPRINT
-    fprintf(stderr, "TTransPIterate called.\n");
-#endif
-
-
-    pb -> trans_id = pb -> child_id = 0;
-
-    /* prime list with root node */
-    n = malloc ( sizeof * n );
-    if ( n == NULL )
-        return true;
-
-    n -> trans = self;
-    n -> dad = 0;
-    n -> idx = 0;
-
-    /* now walk the list */
-    for ( ; n != NULL; n = ( PTChildNode* ) SLListPopHead ( & sl ) )
-    {
-        const TTrans *trans = n -> trans;
-        uint32_t dad = n -> dad;
-        uint16_t idx = n -> idx;
-
-        free ( n );
-
-        if ( TTransPersist ( trans, pb, dad, idx, & sl ) )
-        {
-            SLListWhack ( & sl, PTChildNodeWhack, NULL );
-            return true;
-        }
-    }
-
-    return false;
-}
-
-
-/*--------------------------------------------------------------------------
- * Trie
- */
-
-/* TriePersist
- *  much like BSTreePersist but operates on a Trie
- *
- *  "num_writ" [ OUT, NULL OKAY ] -  returns parameter for the number
- *  of bytes written as a result of persisting the b-tree. this will
- *  be the actual bytes written regardless of return status.
- *
- *  "ext_keys" [ IN ] - if true, does not store key data internally.
- *  key text gets encoded into the tree structure in all cases. when
- *  stored internally, any key text not represented by the tree will
- *  be explicitly written by this function. otherwise, the caller will
- *  be expected to store the text as desired. while internal storage
- *  will probably be more efficient, it will cause this function to
- *  fail if the Trie was built with ambiguous key transitions, i.e.
- *  if initialized with "cs_expand" false and keys were added having
- *  characters not included within the "accept" character set. this
- *  is because the tree channels all unrecognized characters through
- *  a single code, making their recovery impossible without being
- *  stored externally.
- *
- *  "write" [ IN, NULL OKAY ] and "write_param" [ IN ] -  a generic
- *  output streaming function used for all operations. if NULL, then
- *  the function will exit after its first pass with the number of
- *  bytes required in "num_writ".
- *
- *  "aux" [ IN ] and "aux_param" [ IN ] - a specialized function for
- *  streaming auxiliary node data to output using the supplied "write"
- *  function. it is invoked during the first pass with a NULL write
- *  function for gathering size data, and during the third pass with
- *  a non-NULL write function.
- */
-static
-rc_t CC TriePersist0 ( size_t *num_writ, int ext_keys,
-   PTWriteFunc write, void *write_param )
-{
-    rc_t rc;
-    P_Trie ptt;
-
-    assert ( num_writ != NULL );
-
-#if DEBUGPRINT
-    fprintf( stderr, "TriePersist0 called.\n" );
-#endif
-
-    ptt . num_trans = 0;
-    ptt . num_nodes = 0;
-    ptt . data_size = 0;
-    ptt . keys = 0;
-#if EXTENDED_PTRIE
-    ptt . ext_data_size = 0;
-#endif
-    ptt . width = 0;
-
-    P_TrieSetExtKeys ( ptt . keys, ext_keys );
-    P_TrieSetBacktrace ( ptt . keys, ! ext_keys );
-
-    rc = ( * write ) ( write_param, & ptt, 16, num_writ );
-    if ( rc == 0 && * num_writ != 16 )
-        return RC ( rcCont, rcTrie, rcPersisting, rcTransfer, rcIncomplete );
-    return rc;
-}
-
-static
-void CC TriePersist1 ( const Trie *tt, PTriePersistData *pb )
-{
-    uint16_t i;
-
-    assert ( tt != NULL );
-    assert ( pb != NULL );
-    assert ( tt -> root != NULL );
-    assert ( pb -> idx_map != NULL );
-
-#if DEBUGPRINT
-    fprintf(stderr, "TriePersist1 called.\n");
-#endif
-
-    /* initialize statistics */
-    for ( i = 0; i < tt -> width; ++ i )
-    {
-        pb -> idx_map [ i ] . freq = 0;
-        pb -> idx_map [ i ] . idx = i;
-        pb -> idx_map [ i ] . ch = tt -> rmap [ i ];
-    }
-
-    /* count nodes and transition frequencies */
-    pb -> num_trans = 0;
-    pb -> num_nodes = 0;
-    pb -> max_nodes = 0;
-    TTransForEach ( tt -> root, tt -> width, TTransCountTrans, pb );
-
-    /* rearrange the indices by frequency */
-    ksort ( pb -> idx_map, tt -> width, sizeof pb -> idx_map [ 0 ], IdxMapSort, NULL );
-
-    /* determine real charset width by searching for
-       the first slot with zero transitions */
-    for ( i = 0; i < tt -> width; ++ i )
-    {
-        if ( pb -> idx_map [ i ] . freq == 0 )
-            break;
-    }
-    pb -> min_width = i;
-
-    /* translate character set width and node count */
-    if ( pb -> min_width <= 256 )
-    {
-        pb -> record_idx = TTransRecordU8;
-        pb -> idx_size = 1;
-    }
-    else if ( pb -> min_width <= 65536 )
-    {
-        pb -> record_idx = TTransRecordU16;
-        pb -> idx_size = 2;
-    }
-    else
-    {
-        pb -> record_idx = TTransRecordU32;
-        pb -> idx_size = 4;
-    }
-
-    if ( pb -> num_trans <= 256 )
-    {
-        pb -> record_trans = TTransRecordU8;
-        pb -> trans_size = 1;
-    }
-    else if ( pb -> num_trans <= 65536 )
-    {
-        pb -> record_trans = TTransRecordU16;
-        pb -> trans_size = 2;
-    }
-    else
-    {
-        pb -> record_trans = TTransRecordU32;
-        pb -> trans_size = 4;
-    }
-}
-
-static
-rc_t CC TriePersist2 ( const Trie *tt, PTriePersistData *pb )
-{
-    assert ( tt != NULL );
-    assert ( pb != NULL );
-    assert ( pb -> write == NullWrite );
-
-#if DEBUGPRINT
-    fprintf(stderr, "TriePersist2 called.\n");
-#endif
-
-    pb -> trans_id = 0;
-    pb -> data_size = 0;
-    TTransPIterate ( tt -> root, pb );
-    if ( pb -> rc == 0 )
-    {
-        /* we should have visited every TTrans node */
-        assert ( pb -> trans_id == pb -> num_trans );
-
-        /* size of trans offset array slot
-           since the persisted TTrans objects
-           are 4-byte aligned, we may be able to
-           get some savings */
-        if ( pb -> data_size <= 256 * 4 )
-            pb -> off_size = 1;
-        else if ( pb -> data_size <= 65536 * 4 )
-            pb -> off_size = 2;
-        else
-            pb -> off_size = 4;
-    }
-
-    return pb -> rc;
-}
-
-static
-rc_t CC TriePersist3 ( const Trie *tt, PTriePersistData *pb, int ext_keys,
-    PTWriteFunc write, void *write_param, size_t *num_writ )
-{
-    P_Trie *pt;
-    size_t trans_offset;
-
-#if DEBUGPRINT
-    fprintf(stderr, "TriePersist3 called.\n");
-#endif
-
-    assert ( tt != NULL );
-    assert ( pb != NULL );
-    assert ( write != NULL );
-    assert ( num_writ != NULL );
-
-    /* detect size overflow */
-    if ( sizeof pb -> data_size > 4 )
-    {
-#if EXTENDED_PTRIE
-        if ( ( ( uint64_t ) ( pb -> data_size - 1 ) >> 34 ) != 0 )
-            return pb -> rc = RC ( rcCont, rcTrie, rcPersisting, rcData, rcExcessive );
-#else
-        if ( ( ( uint64_t ) pb -> data_size >> 32 ) != 0 )
-            return pb -> rc = RC ( rcCont, rcTrie, rcPersisting, rcData, rcExcessive );
-#endif
-    }
-
-    /* figure trans_offset up to trans member */
-    trans_offset = sizeof * pt - sizeof pt -> rmap +
-        pb -> min_width * sizeof pt -> rmap [ 0 ];
-
-    /* create the real deal */
-    pt = malloc ( trans_offset + pb -> num_trans * pb -> off_size );
-    if ( pt == NULL )
-        pb -> rc = RC ( rcCont, rcTrie, rcPersisting, rcMemory, rcExhausted );
-    else
-    {
-        uint32_t i;
-        size_t data_offset;
-        size_t pt_data_size = pb -> data_size;
-
-        /* initialize header */
-        pt -> num_trans = pb -> num_trans;
-        pt -> num_nodes = pb -> num_nodes;
-        pt -> data_size = ( uint32_t ) pt_data_size;
-#if EXTENDED_PTRIE
-        if ( sizeof pb -> data_size == 4 )
-            pt -> ext_data_size = 0;
-        else
-            pt -> ext_data_size = ( uint8_t ) ( ( uint64_t ) pt_data_size >> 32 );
-#endif
-        pt -> keys = 0;
-        P_TrieSetExtKeys ( pt -> keys, ext_keys );
-        P_TrieSetBacktrace ( pt -> keys, ! ext_keys );
-        pt -> width = pb -> min_width;
-
-        /* decide upon id encoding type:
-           0 => 24 : 8, i.e. 24 bits for trans id, 8 bits for local btree id
-           1 => 22 : 10
-           2 => 20 : 12
-           3 => 18 : 14
-           4 => 16 : 16
-           5 => 14 : 18
-           6 => 12 : 20
-           7 => by offset into data section
-        */
-#define VALID_IDCODE( pb, trans, bt ) \
-    ( ( pb ) -> num_trans <= ( 1U << ( trans ) ) && \
-      ( pb ) -> max_nodes <= ( 1U << ( bt ) ) )
-
-        if ( VALID_IDCODE ( pb, 24, 8 ) )
-            P_TrieSetIdCoding ( pt -> keys, 0 );
-        else if ( VALID_IDCODE ( pb, 22, 10 ) )
-            P_TrieSetIdCoding ( pt -> keys, 1 );
-        else if ( VALID_IDCODE ( pb, 20, 12 ) )
-            P_TrieSetIdCoding ( pt -> keys, 2 );
-        else if ( VALID_IDCODE ( pb, 18, 14 ) )
-            P_TrieSetIdCoding ( pt -> keys, 3 );
-        else if ( VALID_IDCODE ( pb, 16, 16 ) )
-            P_TrieSetIdCoding ( pt -> keys, 4 );
-        else if ( VALID_IDCODE ( pb, 14, 18 ) )
-            P_TrieSetIdCoding ( pt -> keys, 5 );
-        else if ( VALID_IDCODE ( pb, 12, 20 ) )
-            P_TrieSetIdCoding ( pt -> keys, 6 );
-        else
-            P_TrieSetIdCoding ( pt -> keys, 7 );
-
-#undef VALID_IDCODE
-
-        /* fill out rmap */
-        for ( i = 0; i < ( uint32_t ) pb -> min_width; ++ i )
-            pt -> rmap [ i ] = pb -> idx_map [ i ] . ch;
-
-        /* fill out transition offset table */
-        if ( pb -> off_size == 1 )
-        {
-            uint8_t *trans = ( void* ) ( ( char* ) pt + trans_offset );
-            data_offset = trans_offset + pb -> num_trans;
-
-            for ( trans_offset = 0, i = 0; i < pb -> num_trans; ++ i )
-            {
-                assert ( ( trans_offset & 3 ) == 0 );
-                trans [ i ] = ( uint8_t ) ( trans_offset >> 2 );
-                trans_offset += pb -> trans_map [ i ];
-            }
-        }
-        else if ( pb -> off_size == 2 )
-        {
-            uint16_t *trans = ( void* ) ( ( char* ) pt + trans_offset );
-            data_offset = trans_offset + ( pb -> num_trans << 1 );
-
-            for ( trans_offset = 0, i = 0; i < pb -> num_trans; ++ i )
-            {
-                assert ( ( trans_offset & 3 ) == 0 );
-                trans [ i ] = ( uint16_t ) ( trans_offset >> 2 );
-                trans_offset += pb -> trans_map [ i ];
-            }
-        }
-        else
-        {
-            uint32_t *trans = ( void* ) ( ( char* ) pt + trans_offset );
-            data_offset = trans_offset + ( pb -> num_trans << 2 );
-
-            for ( trans_offset = 0, i = 0; i < pb -> num_trans; ++ i )
-            {
-                assert ( ( trans_offset & 3 ) == 0 );
-                trans [ i ] = ( uint32_t ) ( trans_offset >> 2 );
-                trans_offset += pb -> trans_map [ i ];
-            }
-        }
-
-        /* the last offset should equal total data bytes */
-        assert ( trans_offset == pt_data_size );
-
-        /* write the tree header */
-        pb -> rc = ( * write ) ( write_param, pt, data_offset, num_writ );
-        if ( pb -> rc == 0 && * num_writ != data_offset )
-            pb -> rc = RC ( rcCont, rcTrie, rcPersisting, rcTransfer, rcIncomplete );
-
-        free ( pt );
-    }
-
-    return pb -> rc;
-}
-
-LIB_EXPORT rc_t CC TriePersist ( const Trie *tt, size_t *num_writ, bool ext_keys,
-    PTWriteFunc write, void *write_param, PTAuxFunc aux, void *aux_param )
-{
-    PTriePersistData pb;
-    size_t num_writ_buffer;
-
-#if DEBUGPRINT
-    fprintf(stderr, "TriePersist called\n");
-#endif
-
-    if ( num_writ == NULL )
-        num_writ = & num_writ_buffer;
-
-    if ( write == NULL )
-    {
-        write = NullWrite;
-        write_param = NULL;
-    }
-
-    * num_writ = 0;
-
-    if ( tt == NULL )
-        return RC ( rcCont, rcTrie, rcPersisting, rcSelf, rcNull );
-    if ( aux == NULL )
-        return RC ( rcCont, rcTrie, rcPersisting, rcFunction, rcNull );
-
-    /* handle empty tree */
-    if ( tt -> root == NULL )
-        return TriePersist0 ( num_writ, ext_keys, write, write_param );
-
-    pb . write = NullWrite;
-    pb . write_param = NULL;
-    pb . aux = aux;
-    pb . aux_param = aux_param;
-    pb . rc = 0;
-
-    if ( ext_keys )
-    {
-        pb . null_write = aux;
-        pb . live_write = aux;
-    }
-    else
-    {
-        pb . null_write = TNodeDataSize;
-        pb . live_write = TNodeWrite;
-    }
-
-    /* prepare a statistical array for character transition analysis */
-    pb . idx_map = malloc ( tt -> width * sizeof pb . idx_map [ 0 ] );
-    if ( pb . idx_map == NULL )
-        pb . rc = RC ( rcCont, rcTrie, rcPersisting, rcMemory, rcExhausted );
-    else
-    {
-        /* analyze table dimensions based upon counts */
-        TriePersist1 ( tt, & pb );
-
-        /* time to allocate some memory
-           allocate trans_map based upon the number of TTrans objects
-           and idx_seq for persisting a single child array */
-        pb . trans_map = malloc (
-            /* the TTrans node size/offset array */
-            pb . num_trans * sizeof pb . trans_map [ 0 ] +
-            /* maximum space for all indices, all transitions */
-            ( pb . idx_size + pb . trans_size ) * pb . min_width +
-            /* space for parent backtrace transition */
-            pb . trans_size +
-            /* maximum space for sequence entry type bits */
-            ( ( pb . min_width + 7 ) >> 3 ) +
-            /* space for header entries in index array */
-            ( pb . idx_size * pttFirstIdx ) +
-            /* ample space for align1 */
-            pb . trans_size );
-        if ( pb . trans_map == NULL )
-            pb . rc = RC ( rcCont, rcTrie, rcPersisting, rcMemory, rcExhausted );
-        else
-        {
-            /* set up idx_seq from trans_map */
-            pb . idx_seq . v8 = ( uint8_t* ) pb . trans_map +
-                pb . num_trans * sizeof pb . trans_map [ 0 ];
-
-            /* assign pointers to parts */
-            pb . child_seq_type =
-                & pb . idx_seq . v8 [ pb . idx_size * ( pttFirstIdx + pb . min_width ) ];
-            pb . backtrace . v8 = NULL;
-            pb . trans_seq . v8 =
-                pb . child_seq_type + ( ( pb . min_width + 7 ) >> 3 );
-            if ( ! ext_keys )
-            {
-                pb . backtrace . v8 = pb . trans_seq . v8;
-                pb . trans_seq . v8 += pb . trans_size;
-            }
-
-            /* perform a dry-run to obtain overall size */
-            if ( TriePersist2 ( tt, & pb ) == 0 )
-            {
-                /* create, initialize and write the P_Trie structure */
-                if ( TriePersist3 ( tt, & pb, ext_keys, write, write_param, num_writ ) == 0 )
-                {
-                    /* use the real write function */
-                    pb . write = write;
-                    pb . write_param = write_param;
-
-                    /* align to 4 byte boundary */
-                    pb . rc = PTAlign ( & pb, num_writ, 4, 0 );
-                    if ( pb . rc == 0 )
-                    {
-                        /* write the nodes and data */
-                        pb . trans_id = 0;
-                        pb . data_size = 0;
-                        TTransPIterate ( tt -> root, & pb );
-                        * num_writ += pb . data_size;
-                    }
-                }
-            }
-
-            free ( pb . trans_map );
-        }
-
-        free ( pb . idx_map );
-    }
-
-    return pb . rc;
-}
diff --git a/libs/klib/ptrie.c b/libs/klib/ptrie.c
deleted file mode 100644
index 198ac90..0000000
--- a/libs/klib/ptrie.c
+++ /dev/null
@@ -1,1992 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include "pbstree-priv.h"
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <byteswap.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * PTNode
- *  a node within text tree
- *
- *  a TTree will contain TTNodes, which themselves are intrusive but
- *  irrelevant internal tree links plus a key string plus an externally
- *  defined data structure, representing a value, and supporting multiple
- *  nodes per key. the internal links permit navigation from node
- *  to node that is not possible with the PTNode. furthermore, they
- *  provide direct access to the key string that is not normally stored
- *  verbatim within a persisted image.
- *
- *  a PTrie does not contain structured nodes, but stores linkage
- *  and ordering information separately from the externally defined
- *  data, and rather than using pointers, assigns integer ids to the
- *  nodes themselves. navigation by pointers would require allocations,
- *  which are unnecessary and expensive when traversing a read-only
- *  persisted image. navigation is therefore intrusive on an externally
- *  allocated node structure.
- */
-
-/* PTNodeMakeKey
- *  tries to may a key string from node
- *  will fail if key text was not embedded into image when created
- *
- *  "key" [ OUT ] - return parameter for a key string allocation
- *  that must be whacked with StringWhack when no longer needed.
- *
- *  return status codes:
- *    EINVAL => invalid parameter
- *    ENOENT => no key data were written to tree image
- *    ENOMEM => memory failure
- */
-LIB_EXPORT rc_t CC PTNodeMakeKey ( const PTNode *self, const String **keyp )
-{
-    rc_t rc;
-    if ( keyp == NULL )
-        rc = RC ( rcCont, rcNode, rcAccessing, rcParam, rcNull );
-    else
-    {
-        * keyp = NULL;
-
-        if ( self == NULL )
-            rc = RC ( rcCont, rcNode, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            const PTrie *tt = self -> internal;
-            if ( tt->ext_keys || ! tt->backtrace )
-                rc = RC ( rcCont, rcNode, rcAccessing, rcString, rcNotFound );
-            else
-            {
-                uint32_t tid, btid;
-
-                /* decode the node id into trans and btnode ids */
-                rc = PTrieDecodeNodeId ( tt, self -> id, & tid, & btid );
-                if ( rc == 0 )
-                {
-                    /* recover the trans node */
-                    PTTrans trans;
-                    rc = PTrieInitNode ( tt, & trans, tid );
-                    if ( rc == 0 )
-                    {
-                        size_t size;
-                        const void *addr;
-
-                        assert ( trans . vals != NULL );
-                        assert ( PBSTreeCount ( trans . vals ) >= btid );
-
-                        /* recover the value node */
-                        rc = PBSTreeGetNodeData ( trans . vals, & addr, & size, btid );
-                        if ( rc == 0 )
-                        {
-                            /* the depth of this transition is
-                               the length of the key string up to node */
-                            uint32_t depth = PTTransGetDepth ( & trans, tt );
-
-                            /* get an adequate UTF-32 buffer */
-                            uint32_t tbbuff [ 64 ], *traceback = tbbuff;
-                            if ( depth > sizeof tbbuff / sizeof tbbuff [ 0 ] )
-                                traceback = malloc ( depth * sizeof traceback [ 0 ] );
-
-                            /* complete the work */
-                            if ( traceback != NULL )
-                            {
-                                String *key;
-                                uint32_t nlen;
-                                size_t tbsize, nsize;
-
-                                uint32_t i;
-                                for ( i = depth; i > 0; )
-                                {
-                                    uint32_t zidx = PTTransGetTransCharCode ( & trans, tt );
-                                    traceback [ -- i ] =
-                                        ( zidx + 1 == tt -> unmapped_idx ) ?
-                                        ( uint32_t ) '?' : PTrieDecodeCharId ( tt, zidx );
-                                    tid = PTTransGetDad ( & trans, tt );
-                                    assert ( tid != 0 || i == 0 );
-                                    rc = PTrieInitNode ( tt, & trans, tid );
-                                    assert ( rc == 0 );
-                                }
-
-                                /* determine the size of traceback string */
-                                i = utf32_cvt_string_len ( traceback,
-                                    depth * sizeof traceback [ 0 ], & tbsize );
-                                assert ( i == depth );
-
-                                /* determine the size and length of node string */
-                                nlen = string_measure ( addr, & nsize );
-                                assert ( nsize < size );
-
-                                /* create the string object */
-                                key = malloc ( sizeof * key + tbsize + nsize + 1 );
-                                if ( key == NULL )
-                                    rc = RC ( rcCont, rcNode, rcAccessing, rcMemory, rcExhausted );
-                                else
-                                {
-                                    /* home free */
-                                    char *text = ( char* ) ( key + 1 );
-                                    tbsize = utf32_cvt_string_copy ( text, tbsize + 1,
-                                        traceback, depth * sizeof traceback [ 0 ] );
-                                    memcpy ( & text [ tbsize ], addr, nsize + 1 );
-                                    StringInit ( key, text, tbsize + nsize, depth + nlen );
-                                    * keyp = key;
-                                }
-
-                                if ( traceback != tbbuff )
-                                    free ( traceback );
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * PTTrans
- */
-
-/* Whack
- */
-void PTTransWhack ( PTTrans *trans )
-{
-    if ( trans != NULL ) while ( 1 )
-    {
-        PTTrans *doomed = trans;
-        trans = ( PTTrans* ) trans -> back;
-        if ( doomed -> vals != & doomed -> _val )
-            PBSTreeWhack ( ( PBSTree* ) doomed -> vals );
-        free ( doomed );
-        if ( trans == NULL )
-            break;
-        if ( -- trans -> refcount > 0 )
-            break;
-    }
-}
-
-/* GetDepth
- */
-#if ! RECORD_HDR_DEPTH
-LIB_EXPORT uint32_t CC PTTransGetDepth ( const PTTrans *self, const PTrie *tt )
-{
-    PTTrans trans;
-    uint32_t dad, depth;
-
-    assert ( self != NULL );
-    if ( self -> depth != 0 )
-        return self -> depth;
-
-    for ( depth = 0, dad = PTTransGetDad ( self, tt ); dad != 0;
-          ++ depth, dad = PTTransGetDad ( & trans, tt ) )
-    {
-        int status = PTrieInitNode ( tt, & trans, dad );
-        assert ( status == 0 );
-    }
-
-    return depth;
-}
-#endif
-
-/* GetChildChildIdx
- */
-static
-uint32_t PTTransGetChildChildIdx ( const PTTrans *self,
-    const PTrie *tt, uint32_t zidx )
-{
-    const uint8_t *child_seq_type = self -> child_seq_type;
-    if ( self -> child_seq_type != NULL )
-    {
-        uint32_t i, j, k;
-
-        /* terse variable name explanation:
-           "i" will be the index into "child_seq_type" bit array
-           "j" is a 1-based index into child trans array
-           "k" is an index into the index array */
-        for ( i = 0, j = 1, k = pttFirstIdx; i < self -> slen; ++ k, ++ j, ++ i )
-        {
-            /* get the single char code or
-               the left edge of char code range */
-            uint32_t left = PTTransGetIdx ( self, tt, k );
-
-            /* detect terminal condition */
-            if ( left >= zidx )
-            {
-                /* if single or range left is too high, there's no transition */
-                if ( left > zidx )
-                    break;
-
-                /* the single or range left is an exact match
-                   "j" is the 1-based index into child array */
-                return j;
-            }
-
-            /* check entry type: if 0, then the index was a single
-               value. if 1, then it's a range */
-            if ( ( child_seq_type [ i >> 3 ] & ( 1U << ( i & 7 ) ) ) != 0 )
-            {
-                /* check for inclusion within the range
-                   N.B. ensure that the increment of "k"
-                   does not get evaluated more than once */
-                uint32_t right = PTTransGetIdx ( self, tt, ++ k );
-                if ( right >= zidx )
-                {
-                    /* found the range - calculate 1-based index */
-                    return zidx - left + j;
-                }
-
-                /* advance "j" by range width - 1 */
-                j += right - left;
-            }
-        }
-    }
-
-    return 0;
-}
-
-/* 8 bit index */
-static
-uint32_t PTTransGetIdx8 ( const PTTrans *self, uint32_t zidx )
-{
-    return self -> idx . v8 [ zidx ];
-}
-
-static
-const void * PTTransGetIdxAddr8 ( const PTTrans *self, uint32_t zidx )
-{
-    return & self -> idx . v8 [ zidx ];
-}
-
-/* 16 bit index */
-static
-uint32_t PTTransGetIdx16 ( const PTTrans *self, uint32_t zidx )
-{ 
-    return self -> idx . v16 [ zidx ];
-}
-
-static
-uint32_t PTTransSwapIdx16 ( const PTTrans *self, uint32_t zidx )
-{
-    return bswap_16 ( self -> idx . v16 [ zidx ] );
-}
-
-static
-const void * PTTransGetIdxAddr16 ( const PTTrans *self, uint32_t zidx )
-{
-    return & self -> idx . v16 [ zidx ];
-}
-
-/* NULL dad access */
-static
-uint32_t PTTransGetDadNULL ( const PTTrans *self )
-{
-    return 0; 
-}
-
-/* 8 bit trans id */
-static
-uint32_t PTTransGetDad8 ( const PTTrans *self )
-{
-    return self -> dad . v8 [ 0 ];
-}
-
-static
-const void * PTTransAlignDadAddr8 ( PTTrans *self, bool backtrace )
-{
-    return & self -> dad . v8 [ backtrace ];
-}
-
-static
-uint32_t PTTransGetChild8 ( const PTTrans *self, uint32_t zidx )
-{
-    return self -> child . v8 [ zidx ];
-}
-
-static
-const void * PTTransGetChildAddr8 ( const PTTrans *self, uint32_t zidx )
-{
-    return & self -> child . v8 [ zidx ];
-}
-
-/* 16 bit trans id */
-static
-uint32_t PTTransGetDad16 ( const PTTrans *self )
-{
-    return self -> dad . v16 [ 0 ];
-}
-
-static
-uint32_t PTTransSwapDad16 ( const PTTrans *self )
-{
-    return bswap_16 ( self -> dad . v16 [ 0 ] );
-}
-
-static
-const void * PTTransAlignDadAddr16 ( PTTrans *self, bool backtrace )
-{
-    /* align dad first */
-    size_t i = ( size_t ) self -> dad . v16;
-    i = ( i + 1 ) & ~ ( size_t ) 1;
-    self -> dad . v16 = ( const uint16_t* ) i;
-    if ( backtrace )
-        return ( const void* ) ( i + 2 );
-    return ( const void* ) i;
-}
-
-static
-uint32_t PTTransGetChild16 ( const PTTrans *self, uint32_t zidx )
-{
-    return self -> child . v16 [ zidx ];
-}
-
-static
-uint32_t PTTransSwapChild16 ( const PTTrans *self, uint32_t zidx )
-{
-    return bswap_16 ( self -> child . v16 [ zidx ] );
-}
-
-static
-const void * PTTransGetChildAddr16 ( const PTTrans *self, uint32_t zidx )
-{
-    return & self -> child . v16 [ zidx ];
-}
-
-/* 32 bit trans id */
-static
-uint32_t PTTransGetDad32 ( const PTTrans *self )
-{
-    return self -> dad . v32 [ 0 ];
-}
-
-static
-uint32_t PTTransSwapDad32 ( const PTTrans *self )
-{
-    return bswap_32 ( self -> dad . v32 [ 0 ] );
-}
-
-static
-const void * PTTransAlignDadAddr32 ( PTTrans *self, bool backtrace )
-{
-    /* align dad first */
-    size_t i = ( size_t ) self -> dad . v32;
-    i = ( i + 3 ) & ~ ( size_t ) 3;
-    self -> dad . v32 = ( const uint32_t* ) i;
-    if ( backtrace )
-        return ( const void* ) ( i + 4 );
-    return ( const void* ) i;
-}
-
-static
-uint32_t PTTransGetChild32 ( const PTTrans *self, uint32_t zidx )
-{
-    return self -> child . v32 [ zidx ];
-}
-
-static
-uint32_t PTTransSwapChild32 ( const PTTrans *self, uint32_t zidx )
-{
-    return bswap_32 ( self -> child . v32 [ zidx ] );
-}
-
-static
-const void * PTTransGetChildAddr32 ( const PTTrans *self, uint32_t zidx )
-{
-    return & self -> child . v32 [ zidx ];
-}
-
-/* ForEach
- */
-void PTTransForEach ( const PTTrans *self, const PTrie *tt,
-    void ( * f ) ( const PTTrans *trans, const PTrie *tt, void *data ), void * data )
-{
-    const uint8_t *child_seq_type;
-
-    assert ( f != NULL );
-    ( * f ) ( self, tt, data );
-
-    child_seq_type = self -> child_seq_type;
-    if ( self -> child_seq_type != NULL )
-    {
-        PTTrans *trans = malloc ( sizeof * trans );
-        if ( trans != NULL )
-        {
-            uint32_t i, j, k;
-
-            /* see explanations in PTTransGetChildChildIdx */
-            for ( i = j = 0, k = pttFirstIdx; i < self -> slen; ++ k, ++ i )
-            {
-                uint32_t left, right;
-
-                /* get the single char code or
-                   the left edge of char code range */
-                left = right = PTTransGetIdx ( self, tt, k );
-
-                /* check entry type: if 0, then the index was a single
-                   value. if 1, then it's a range */
-                if ( ( child_seq_type [ i >> 3 ] & ( 1U << ( i & 7 ) ) ) != 0 )
-                    right = PTTransGetIdx ( self, tt, ++ k );
-
-                /* get child node id */
-                for ( ; left <= right; ++ j, ++ left )
-                {
-                    uint32_t tid = PTTransGetChild ( self, tt, j ) + 1;
-                    int status = PTrieInitNode ( tt, trans, tid );
-                    if ( status == 0 )
-                    {
-                        trans -> back = self;
-#if ! RECORD_HDR_IDX
-                        trans -> tidx = left;
-#endif
-#if ! RECORD_HDR_DEPTH
-                        trans -> depth = self -> depth + 1;
-#endif
-                        PTTransForEach ( trans, tt, f, data );
-                    }
-                }
-            }
-
-            free ( trans );
-        }
-    }
-}
-
-/* DoUntil
- */
-bool PTTransDoUntil ( const PTTrans *self, const PTrie *tt,
-    bool ( * f ) ( const PTTrans *trans, const PTrie *tt, void *data ), void * data )
-{
-    const uint8_t *child_seq_type;
-
-    assert ( f != NULL );
-    if ( ( * f ) ( self, tt, data ) )
-        return true;
-
-    child_seq_type = self -> child_seq_type;
-    if ( self -> child_seq_type != NULL )
-    {
-        PTTrans *trans = malloc ( sizeof * trans );
-        if ( trans != NULL )
-        {
-            uint32_t i, j, k;
-
-            /* see explanations in PTTransGetChildChildIdx */
-            for ( i = j = 0, k = pttFirstIdx; i < self -> slen; ++ k, ++ i )
-            {
-                uint32_t left, right;
-
-                /* get the single char code or
-                   the left edge of char code range */
-                left = right = PTTransGetIdx ( self, tt, k );
-
-                /* check entry type: if 0, then the index was a single
-                   value. if 1, then it's a range */
-                if ( ( child_seq_type [ i >> 3 ] & ( 1U << ( i & 7 ) ) ) != 0 )
-                    right = PTTransGetIdx ( self, tt, ++ k );
-
-                /* get child node id */
-                for ( ; left <= right; ++ j, ++ left )
-                {
-                    uint32_t tid = PTTransGetChild ( self, tt, j ) + 1;
-                    rc_t rc = PTrieInitNode ( tt, trans, tid );
-                    if ( rc == 0 )
-                    {
-                        trans -> back = self;
-#if ! RECORD_HDR_IDX
-                        trans -> tidx = left;
-#endif
-#if ! RECORD_HDR_DEPTH
-                        trans -> depth = self -> depth + 1;
-#endif
-                        if ( PTTransDoUntil ( trans, tt, f, data ) )
-                        {
-                            free ( trans );
-                            return true;
-                        }
-                    }
-                }
-            }
-
-            free ( trans );
-        }
-    }
-    return false;
-}
-
-
-/*--------------------------------------------------------------------------
- * PTrie
- *  a persisted tree of text nodes
- *
- *  this is a collection of { key, value } pairs, where a many-value
- *  to one key paradigm is naturally supported, as in the b-tree.
- *
- *  the desired retrieval operations are:
- *   a) key -> id : value
- *   b) key -> { id : value, ... }
- *   c) RE -> id : value
- *   d) RE -> { id : value, ... }
- *   e) iteration across { id : value, ... }
- *   f) id : value -> key
- *
- *  the reverse retrieval operation is:
- *   a) id -> value
- *
- *  indexing of the id is performed externally, and should not be interpreted
- *  as a serial, integer value. it may be a byte offset or a combination of
- *  two integer values, as well as anything else.
- */
-
-/* GetNodeOff
- *  takes a 1-based index
- *  returns an offset into data array
- */
-static
-size_t PTrieGetNodeOff8 ( const PTrie *self, uint32_t zidx )
-{
-    return self -> trans_off . v8 [ zidx ];
-}
-
-static
-size_t PTrieGetNodeOff16 ( const PTrie *self, uint32_t zidx )
-{
-    return self -> trans_off . v16 [ zidx ];
-}
-
-static
-size_t PTrieSwapNodeOff16 ( const PTrie *self, uint32_t zidx )
-{
-    return bswap_16 ( self -> trans_off . v16 [ zidx ] );
-}
-
-static
-size_t PTrieGetNodeOff32 ( const PTrie *self, uint32_t zidx )
-{
-    return self -> trans_off . v32 [ zidx ];
-}
-
-static
-size_t PTrieSwapNodeOff32 ( const PTrie *self, uint32_t zidx )
-{
-    return bswap_32 ( self -> trans_off . v32 [ zidx ] );
-}
-
-#if 0
-static
-size_t PTrieGetNodeOff64 ( const PTrie *self, uint32_t zidx )
-{
-    return self -> trans_off . v64 [ zidx ];
-}
-
-static
-size_t PTrieSwapNodeOff64 ( const PTrie *self, uint32_t zidx )
-{
-    return bswap_64 ( self -> trans_off . v64 [ zidx ] );
-}
-#endif
-
-
-/* EncodeNodeId
- * PTrieDecodeNodeId
- */
-static
-uint32_t PTrieOrigEncodeNodeId0 ( const PTrie *self,
-    uint32_t tid, uint32_t btid )
-{
-    return ( tid << 8 ) | btid; 
-}
-
-static
-uint32_t PTrieEncodeNodeId0 ( const PTrie *self,
-    uint32_t tid, uint32_t btid )
-{
-    return ( ( ( tid - 1 ) << 8 ) + ( btid - 1 ) ) + 1;
-}
-
-static
-rc_t PTrieOrigDecodeTestTrieNodeId ( const PTrie *self, uint32_t *tid, uint32_t *btid, uint32_t count )
-{
-    uint32_t which = 0;
-
-    PTTrans trans;
-    rc_t rc = PTrieInitNode ( self, & trans, * tid & ~ 1U );
-    if ( rc == 0 )
-    {
-        assert ( trans . vals != NULL );
-        if ( PBSTreeCount ( trans . vals ) == count )
-            which |= 1;
-    }
-    rc = PTrieInitNode ( self, & trans, * tid | 1U );
-    if ( rc == 0 )
-    {
-        assert ( trans . vals != NULL );
-        if ( PBSTreeCount ( trans . vals ) == count )
-            which |= 2;
-    }
-
-    switch ( which )
-    {
-    case 0:
-        return RC ( rcCont, rcTrie, rcAccessing, rcId, rcCorrupt );
-    case 1:
-        * tid &= ~ 1U;
-        * btid = count;
-        break;
-    case 2:
-        * tid |= 1U;
-        * btid = count;
-        break;
-    case 3:
-        * btid = count;
-        return RC ( rcCont, rcTrie, rcAccessing, rcId, rcAmbiguous );
-    }
-
-    return 0;
-}
-
-static
-rc_t PTrieOrigDecodeNodeId0 ( const PTrie *self, uint32_t id,
-    uint32_t *tid, uint32_t *btid )
-{
-    /* unpack 1-based ids */
-    * tid = id >> 8;
-    * btid = id & 0xFF;
-
-    /* detect no-overflow cases */
-    if ( * btid != 0 )
-        return 0;
-
-    /* handle overflow */
-    return PTrieOrigDecodeTestTrieNodeId ( self, tid, btid, 0x100 );
-}
-
-static
-rc_t PTrieDecodeNodeId0 ( const PTrie *self, uint32_t id,
-    uint32_t *tid, uint32_t *btid )
-{
-    -- id;
-    * tid = ( id >> 8 ) + 1;
-    * btid = ( id & 0xFF ) + 1;
-    return 0;
-}
-
-static
-uint32_t PTrieOrigEncodeNodeId1 ( const PTrie *self,
-    uint32_t tid, uint32_t btid )
-{
-    return ( tid << 10 ) | btid;
-}
-
-static
-uint32_t PTrieEncodeNodeId1 ( const PTrie *self,
-    uint32_t tid, uint32_t btid )
-{
-    return ( ( ( tid - 1 ) << 10 ) + ( btid - 1 ) ) + 1;
-}
-
-static
-rc_t PTrieOrigDecodeNodeId1 ( const PTrie *self, uint32_t id,
-    uint32_t *tid, uint32_t *btid )
-{
-    * tid = id >> 10;
-    * btid = id & 0x3FF;
-    if ( * btid != 0 )
-        return 0;
-    return PTrieOrigDecodeTestTrieNodeId ( self, tid, btid, 0x400 );
-}
-
-static
-rc_t PTrieDecodeNodeId1 ( const PTrie *self, uint32_t id,
-    uint32_t *tid, uint32_t *btid )
-{
-    -- id;
-    * tid = ( id >> 10 ) + 1;
-    * btid = ( id & 0x3FF ) + 1;
-    return 0;
-}
-
-static
-uint32_t PTrieOrigEncodeNodeId2 ( const PTrie *self,
-    uint32_t tid, uint32_t btid )
-{
-    return ( tid << 12 ) | btid;
-}
-
-static
-uint32_t PTrieEncodeNodeId2 ( const PTrie *self,
-    uint32_t tid, uint32_t btid )
-{
-    return ( ( ( tid - 1 ) << 12 ) + ( btid - 1 ) ) + 1;
-}
-
-static
-rc_t PTrieOrigDecodeNodeId2 ( const PTrie *self, uint32_t id,
-    uint32_t *tid, uint32_t *btid )
-{
-    * tid = id >> 12;
-    * btid = id & 0xFFF;
-    if ( * btid != 0 )
-        return 0;
-    return PTrieOrigDecodeTestTrieNodeId ( self, tid, btid, 0x1000 );
-}
-
-static
-rc_t PTrieDecodeNodeId2 ( const PTrie *self, uint32_t id,
-    uint32_t *tid, uint32_t *btid )
-{
-    -- id;
-    * tid = ( id >> 12 ) + 1;
-    * btid = ( id & 0xFFF ) + 1;
-    return 0;
-}
-
-static
-uint32_t PTrieOrigEncodeNodeId3 ( const PTrie *self,
-    uint32_t tid, uint32_t btid )
-{
-    return ( tid << 14 ) | btid;
-}
-
-static
-uint32_t PTrieEncodeNodeId3 ( const PTrie *self,
-    uint32_t tid, uint32_t btid )
-{
-    return ( ( ( tid - 1 ) << 14 ) + ( btid - 1 ) ) + 1;
-}
-
-static
-rc_t PTrieOrigDecodeNodeId3 ( const PTrie *self, uint32_t id,
-    uint32_t *tid, uint32_t *btid )
-{
-    * tid = id >> 14;
-    * btid = id & 0x3FFF;
-    if ( * btid != 0 )
-        return 0;
-    return PTrieOrigDecodeTestTrieNodeId ( self, tid, btid, 0x4000 );
-}
-
-static
-rc_t PTrieDecodeNodeId3 ( const PTrie *self, uint32_t id,
-    uint32_t *tid, uint32_t *btid )
-{
-    -- id;
-    * tid = ( id >> 14 ) + 1;
-    * btid = ( id & 0x3FFF ) + 1;
-    return 0;
-}
-
-static
-uint32_t PTrieOrigEncodeNodeId4 ( const PTrie *self,
-    uint32_t tid, uint32_t btid )
-{
-    return ( tid << 16 ) | btid;
-}
-
-static
-uint32_t PTrieEncodeNodeId4 ( const PTrie *self,
-    uint32_t tid, uint32_t btid )
-{
-    return ( ( ( tid - 1 ) << 16 ) + ( btid - 1 ) ) + 1;
-}
-
-static
-rc_t PTrieOrigDecodeNodeId4 ( const PTrie *self, uint32_t id,
-    uint32_t *tid, uint32_t *btid )
-{
-    * tid = id >> 16;
-    * btid = id & 0xFFFF;
-    if ( * btid != 0 )
-        return 0;
-    return PTrieOrigDecodeTestTrieNodeId ( self, tid, btid, 0x10000 );
-}
-
-static
-rc_t PTrieDecodeNodeId4 ( const PTrie *self, uint32_t id,
-    uint32_t *tid, uint32_t *btid )
-{
-    -- id;
-    * tid = ( id >> 16 ) + 1;
-    * btid = ( id & 0xFFFF ) + 1;
-    return 0;
-}
-
-static
-uint32_t PTrieOrigEncodeNodeId5 ( const PTrie *self,
-    uint32_t tid, uint32_t btid )
-{
-    return ( tid << 18 ) | btid;
-}
-
-static
-uint32_t PTrieEncodeNodeId5 ( const PTrie *self,
-    uint32_t tid, uint32_t btid )
-{
-    return ( ( ( tid - 1 ) << 18 ) + ( btid - 1 ) ) + 1;
-}
-
-static
-rc_t PTrieOrigDecodeNodeId5 ( const PTrie *self, uint32_t id,
-    uint32_t *tid, uint32_t *btid )
-{
-    * tid = id >> 18;
-    * btid = id & 0x3FFFF;
-    if ( * btid != 0 )
-        return 0;
-    return PTrieOrigDecodeTestTrieNodeId ( self, tid, btid, 0x40000 );
-}
-
-static
-rc_t PTrieDecodeNodeId5 ( const PTrie *self, uint32_t id,
-    uint32_t *tid, uint32_t *btid )
-{
-    -- id;
-    * tid = ( id >> 18 ) + 1;
-    * btid = ( id & 0x3FFFF ) + 1;
-    return 0;
-}
-
-static
-uint32_t PTrieOrigEncodeNodeId6 ( const PTrie *self,
-    uint32_t tid, uint32_t btid )
-{
-    return ( tid << 20 ) | btid;
-}
-
-static
-uint32_t PTrieEncodeNodeId6 ( const PTrie *self,
-    uint32_t tid, uint32_t btid )
-{
-    return ( ( ( tid - 1 ) << 20 ) + ( btid - 1 ) ) + 1;
-}
-
-static
-rc_t PTrieOrigDecodeNodeId6 ( const PTrie *self, uint32_t id,
-    uint32_t *tid, uint32_t *btid )
-{
-    * tid = id >> 20;
-    * btid = id & 0xFFFFF;
-    if ( * btid != 0 )
-        return 0;
-    return PTrieOrigDecodeTestTrieNodeId ( self, tid, btid, 0x100000 );
-}
-
-static
-rc_t PTrieDecodeNodeId6 ( const PTrie *self, uint32_t id,
-    uint32_t *tid, uint32_t *btid )
-{
-    -- id;
-    * tid = ( id >> 20 ) + 1;
-    * btid = ( id & 0xFFFFF ) + 1;
-    return 0;
-}
-
-static
-uint32_t PTrieEncodeNodeId7 ( const PTrie *self,
-    uint32_t tid, uint32_t btid )
-{
-    /* first get the byte offset to trans */
-    uint32_t id = PTrieGetNodeOff ( self, tid - 1 );
-
-    /* the trans node is supposed to have at least btid
-       nodes underneath, taking > 1 byte each, so by adding
-       the count to a trans offset, we get something that
-       can be recovered later, and we insist that this
-       offset will be somewhere within the trans */
-
-    /* NB - conversion from tid to offset gives a
-       zero-based index into an array of uint32_t,
-       which is converted to a zero-based byte offset
-       and then added to a one-based node id, resulting
-       in a one-based composite node id */
-    return ( id << 2 ) + btid;
-}
-
-static
-rc_t PTrieDecodeNodeId7 ( const PTrie *self, uint32_t id,
-    uint32_t *tid, uint32_t *btid )
-{
-    uint32_t left = 0;
-    uint32_t right = self -> num_nodes;
-    while ( left < right )
-    {
-        uint32_t i = ( left + right ) >> 1;
-        uint32_t off = PTrieGetNodeOff ( self, i ) << 2;
-        if ( off > id )
-            right = i;
-        else
-        {
-            size_t end;
-
-            /* should never be equal, because ids are 1-based */
-            assert ( off != id );
-
-            /* get offset of next or end of data */
-            if ( i + 1 == self -> num_nodes )
-                end = self -> data_size;
-            else
-                end = PTrieGetNodeOff ( self, i + 1 ) << 2;
-
-            if ( end > id )
-            {
-                /* found it */
-                * tid = i + 1;
-                * btid = id - off;
-                return 0;
-            }
-
-            left = i;
-        }
-    }
-
-    return RC ( rcCont, rcTrie, rcSelecting, rcId, rcNotFound );
-}
-
-
-/* DecodeCharId
- */
-static
-uint32_t PTrieGetRMap ( const PTrie *self, uint32_t idx )
-{ 
-    return self -> _rmap [ idx ];
-}
-
-static
-uint32_t PTrieSwapRMap ( const PTrie *self, uint32_t idx )
-{
-    return bswap_32 ( self -> _rmap [ idx ] );
-}
-
-
-/* MakeInt
- *  make a persisted tree structure
- *  includes code to handle original composite node encoding
- *
- *  "addr" [ IN ] and "size" [ IN ] - constant memory image of
- *  persisted text tree with a lifetime exceeding that of the
- *  PTrie itself
- *
- *  "byteswap" [ IN ] - true if persisted image must be byteswapped
- *
- *  "orig" [ IN ] - true if persisted node ids must be reprocessed
- *   for overflow. In the original implementation, the composite
- *   node ids were formed from one-based trie and bstree node ids,
- *   but the bits allotted for them were calculated from zero-based
- *   ids, causing an overflow when either node reached its maximum.
- *
- *   e.g.: tid_max <= 0x1000000, btid_max <= 0x100: 24:8 packing
- *   when ( one-based ) btid == 256, it requires 9 bits, whereas
- *   zero-based btid == 255, requiring the expected 8 bits.
- */
-static int16_t _get_16 ( uint16_t i ) { return ( int16_t ) i; }
-static int16_t _swap_16 ( uint16_t i ) { return ( int16_t ) bswap_16 ( i ); }
-static int32_t _get_32 ( uint32_t i ) { return ( int32_t ) i; }
-static int32_t _swap_32 ( uint32_t i ) { return ( int32_t ) bswap_32 ( i ); }
-
-#define PTOFFSETOF( mbr ) \
-    ( ( uint32_t ) ( size_t ) & ( ( ( P_Trie* ) 0 ) -> mbr ) )
-
-static
-rc_t PTrieMakeInt ( PTrie **ttp, const void *addr, size_t size, bool byteswap, bool orig )
-{
-    rc_t rc;
-
-    /* guard against unknown compiler struct packing */
-    assert ( PTOFFSETOF ( num_trans )     == 0x00 );
-    assert ( PTOFFSETOF ( num_nodes )     == 0x04 );
-    assert ( PTOFFSETOF ( data_size )     == 0x08 );
-    assert ( PTOFFSETOF ( keys )          == 0x0C );
-#if EXTENDED_PTRIE
-    assert ( PTOFFSETOF ( ext_data_size ) == 0x0D );
-#endif
-    assert ( PTOFFSETOF ( width )         == 0x0E );
-    assert ( PTOFFSETOF ( rmap )          == 0x10 );
-
-    if ( ttp == NULL )
-        rc = RC ( rcCont, rcTrie, rcAllocating, rcParam, rcNull );
-    else
-    {
-        if ( addr == NULL )
-            rc = RC ( rcCont, rcTrie, rcAllocating, rcParam, rcNull );
-        else if ( size == 0 )
-            rc = RC ( rcCont, rcTrie, rcAllocating, rcData, rcInvalid );
-        else
-        {
-            const P_Trie *ptt;
-
-            if ( size < ( sizeof * ptt - sizeof ptt -> rmap ) )
-                rc = RC ( rcCont, rcTrie, rcAllocating, rcData, rcCorrupt );
-            else
-            {
-                uint64_t min_size;
-                uint64_t data_size;
-
-                /* accessor functions */
-                int16_t ( * get_16 ) ( uint16_t ) = byteswap ? _swap_16 : _get_16;
-                int32_t ( * get_32 ) ( uint32_t ) = byteswap ? _swap_32 : _get_32;
-
-                /* everything looks good */
-                rc = 0;
-
-                /* structured pointer into const memory image */
-                ptt = addr;
-
-                /* extract data_size */
-                data_size = get_32 ( ptt -> data_size )
-#if EXTENDED_PTRIE
-                    + ( ( uint64_t ) ptt -> ext_data_size << 32 )
-#endif
-                    ;
-
-                /* minimum known size of the memory image
-                   will be adjusted as image is scanned */
-                min_size = sizeof * ptt - sizeof ptt -> rmap +
-                    get_16 ( ptt -> width ) * sizeof ptt -> rmap [ 0 ] +
-                    data_size;
-                if ( ( uint64_t ) size >= min_size )
-                {
-                    PTrie *tt;
-                    uint16_t i, unmapped;
-                    uint32_t ch, first, last;
-
-                    /* the accept character set is recovered from the
-                       reverse character map where the special character
-                       value NUL represents a wildcard.
-
-                       the forward map will be built using one-based
-                       character codes, where code 0 means unmapped.
-
-                       first determine the range of accept characters
-                       while at the same time capturing the one-based
-                       character code of wildcards */
-                    for ( last = 0, first = ~ 0, unmapped = i = 0;
-                          i < get_16 ( ptt -> width ); ++ i )
-                    {
-                        ch = get_32 ( ptt -> rmap [ i ] );
-                        if ( ch == 0 )
-                            unmapped = i + 1;
-                        else
-                        {
-                            if ( ch < first )
-                                first = ch;
-                            if ( ch > last )
-                                last = ch;
-                        }
-                    }
-
-                    /* this case occurs when all values are on the root node */
-                    if ( last < first )
-                        first = 1;
-                    
-                    /* allocated block with mapped sections */
-                    tt = malloc ( sizeof * tt - sizeof tt -> map +
-                        ( last - first + 1 ) * sizeof tt -> map [ 0 ] );
-                    if ( tt == NULL )
-                        rc = RC ( rcCont, rcTrie, rcAllocating, rcMemory, rcExhausted );
-                    else
-                    {
-                        uint16_t ptt_width = get_16 ( ptt -> width );
-
-                        /* fill character to index map with wildcard index
-                           usually NULL or unmapped */
-                        for ( ch = first; ch <= last; ++ ch )
-                            tt -> map [ ch - first ] = unmapped;
-
-                        /* now overwrite mapped characters with one-based char codes */
-                        for ( i = 0; i < ptt_width; ++ i )
-                        {
-                            ch = get_32 ( ptt -> rmap [ i ] );
-                            if ( ch != 0 )
-                                tt -> map [ ch - first ] = i + 1;
-                        }
-
-                        /* fill out the virtual functions */
-                        do
-                        {
-                            uint32_t trans_off_len;
-                            uint16_t ptt_keys = get_16 ( ptt -> keys );
-
-                            /* reverse character lookup */
-                            tt -> decode_char_id = byteswap ?
-                                PTrieSwapRMap : PTrieGetRMap;
-
-                            /* index encoding scheme */
-                            if ( orig ) switch ( P_TrieIdCoding ( ptt_keys ) )
-                            {
-                            case 0:
-                                tt -> encode_node_id = PTrieOrigEncodeNodeId0;
-                                tt -> decode_node_id = PTrieOrigDecodeNodeId0;
-                                break;
-                            case 1:
-                                tt -> encode_node_id = PTrieOrigEncodeNodeId1;
-                                tt -> decode_node_id = PTrieOrigDecodeNodeId1;
-                                break;
-                            case 2:
-                                tt -> encode_node_id = PTrieOrigEncodeNodeId2;
-                                tt -> decode_node_id = PTrieOrigDecodeNodeId2;
-                                break;
-                            case 3:
-                                tt -> encode_node_id = PTrieOrigEncodeNodeId3;
-                                tt -> decode_node_id = PTrieOrigDecodeNodeId3;
-                                break;
-                            case 4:
-                                tt -> encode_node_id = PTrieOrigEncodeNodeId4;
-                                tt -> decode_node_id = PTrieOrigDecodeNodeId4;
-                                break;
-                            case 5:
-                                tt -> encode_node_id = PTrieOrigEncodeNodeId5;
-                                tt -> decode_node_id = PTrieOrigDecodeNodeId5;
-                                break;
-                            case 6:
-                                tt -> encode_node_id = PTrieOrigEncodeNodeId6;
-                                tt -> decode_node_id = PTrieOrigDecodeNodeId6;
-                                break;
-                            default:
-                                tt -> encode_node_id = PTrieEncodeNodeId7;
-                                tt -> decode_node_id = PTrieDecodeNodeId7;
-                            }
-                            else switch ( P_TrieIdCoding ( ptt_keys ) )
-                            {
-                            case 0:
-                                tt -> encode_node_id = PTrieEncodeNodeId0;
-                                tt -> decode_node_id = PTrieDecodeNodeId0;
-                                break;
-                            case 1:
-                                tt -> encode_node_id = PTrieEncodeNodeId1;
-                                tt -> decode_node_id = PTrieDecodeNodeId1;
-                                break;
-                            case 2:
-                                tt -> encode_node_id = PTrieEncodeNodeId2;
-                                tt -> decode_node_id = PTrieDecodeNodeId2;
-                                break;
-                            case 3:
-                                tt -> encode_node_id = PTrieEncodeNodeId3;
-                                tt -> decode_node_id = PTrieDecodeNodeId3;
-                                break;
-                            case 4:
-                                tt -> encode_node_id = PTrieEncodeNodeId4;
-                                tt -> decode_node_id = PTrieDecodeNodeId4;
-                                break;
-                            case 5:
-                                tt -> encode_node_id = PTrieEncodeNodeId5;
-                                tt -> decode_node_id = PTrieDecodeNodeId5;
-                                break;
-                            case 6:
-                                tt -> encode_node_id = PTrieEncodeNodeId6;
-                                tt -> decode_node_id = PTrieDecodeNodeId6;
-                                break;
-                            default:
-                                tt -> encode_node_id = PTrieEncodeNodeId7;
-                                tt -> decode_node_id = PTrieDecodeNodeId7;
-                            }
-
-                            /* PTTrans index access based on the
-                               minimum allowed char code width
-                               where the 0 <= code < width */
-                            if ( ptt_width <= 256 )
-                            {
-                                tt -> get_idx = PTTransGetIdx8;
-                                tt -> get_idx_addr = PTTransGetIdxAddr8;
-                            }
-                            else
-                            {
-                                tt -> get_idx = byteswap ? PTTransSwapIdx16 : PTTransGetIdx16;
-                                tt -> get_idx_addr = PTTransGetIdxAddr16;
-                            }
-
-                            /* PTTrans child and parent access based
-                               ont the minimum allowed trans id width */
-                            if ( get_32 ( ptt -> num_trans ) <= 256 )
-                            {
-                                tt -> get_dad = PTTransGetDad8;
-                                tt -> align_dad_addr = PTTransAlignDadAddr8;
-                                tt -> get_child = PTTransGetChild8;
-                                tt -> get_child_addr = PTTransGetChildAddr8;
-                            }
-                            else if ( get_32 ( ptt -> num_trans ) <= 65536 )
-                            {
-                                if ( byteswap )
-                                {
-                                    tt -> get_dad = PTTransSwapDad16;
-                                    tt -> get_child = PTTransSwapChild16;
-                                }
-                                else
-                                {
-                                    tt -> get_dad = PTTransGetDad16;
-                                    tt -> get_child = PTTransGetChild16;
-                                }
-                                tt -> align_dad_addr = PTTransAlignDadAddr16;
-                                tt -> get_child_addr = PTTransGetChildAddr16;
-                            }
-                            else
-                            {
-                                if ( byteswap )
-                                {
-                                    tt -> get_dad = PTTransSwapDad32;
-                                    tt -> get_child = PTTransSwapChild32;
-                                }
-                                else
-                                {
-                                    tt -> get_dad = PTTransGetDad32;
-                                    tt -> get_child = PTTransGetChild32;
-                                }
-                                tt -> align_dad_addr = PTTransAlignDadAddr32;
-                                tt -> get_child_addr = PTTransGetChildAddr32;
-                            }
-
-                            /* wipe out the backtrace function */
-                            if ( ! P_TrieBacktrace ( ptt_keys ) )
-                                tt -> get_dad = PTTransGetDadNULL;
-
-                            /* the trans offset access is based upon the
-                               total data size to be represented in nodes.
-                               all entries are 4-byte aligned, making it
-                               possible to represent their offsets with
-                               the byte value / 4 */
-                            if ( data_size <= 256 * 4 )
-                            {
-                                tt -> get_node_off = PTrieGetNodeOff8;
-                                trans_off_len = ( get_32 ( ptt -> num_trans ) + 3 ) >> 2;
-                            }
-                            else if ( data_size <= 65536 * 4 )
-                            {
-                                tt -> get_node_off = byteswap ? PTrieSwapNodeOff16 : PTrieGetNodeOff16;
-                                trans_off_len = ( get_32 ( ptt -> num_trans ) + 1 ) >> 1;
-                            }
-                            else
-                            {
-                                tt -> get_node_off = byteswap ? PTrieSwapNodeOff32 : PTrieGetNodeOff32;
-                                trans_off_len = get_32 ( ptt -> num_trans );
-                            }
-
-                            /* the minimum size of this image */
-                            min_size += trans_off_len << 2;
-
-                            /* initialize a few members -
-                               could be here or inside following if
-                               placed here only for pipelining */
-                            tt -> _rmap = ptt -> rmap;
-                            tt -> trans_off . v32 = & ptt -> rmap [ ptt_width ];
-
-                            /* require image size to pass test */
-                            if ( min_size <= size )
-                            {
-                                tt -> data . v32 = & tt -> trans_off . v32 [ trans_off_len ];
-                                tt -> num_trans = get_32 ( ptt -> num_trans );
-                                tt -> num_nodes = get_32 ( ptt -> num_nodes );
-                                tt -> data_size = ( size_t ) data_size;
-                                tt -> ext_keys = P_TrieExtKeys ( ptt_keys ) != 0;
-                                tt -> backtrace = P_TrieBacktrace ( ptt_keys ) != 0;
-                                tt -> id_coding = P_TrieIdCoding ( ptt_keys );
-                                tt -> byteswap = byteswap;
-                                tt -> width = ptt_width;
-                                tt -> first_char = first;
-                                tt -> last_char = last;
-                                tt -> unmapped_idx = unmapped;
-
-                                * ttp = tt;
-                                return 0;
-                            }
-                        }
-                        while ( 0 );
-
-                        free ( tt );
-                    }
-                }
-            }
-        }
-
-        * ttp = NULL;
-    }
-    return rc;
-}
-
-/* Make
- *  make a persisted tree structure
- *
- *  "addr" [ IN ] and "size" [ IN ] - constant memory image of
- *  persisted text tree with a lifetime exceeding that of the
- *  PTrie itself
- *
- *  "byteswap" [ IN ] - true if persisted image must be byteswapped
- */
-LIB_EXPORT rc_t CC PTrieMake ( PTrie **tt, const void *addr, size_t size, bool byteswap )
-{
-    return PTrieMakeInt ( tt, addr, size, byteswap, false );
-}
-
-/* MakeOrig - DEPRECATED
- *  make a persisted tree structure
- *  includes code to handle original composite node encoding
- *
- *  "addr" [ IN ] and "size" [ IN ] - constant memory image of
- *  persisted text tree with a lifetime exceeding that of the
- *  PTrie itself
- *
- *  "byteswap" [ IN ] - true if persisted image must be byteswapped
- */
-LIB_EXPORT rc_t CC PTrieMakeOrig ( PTrie **tt, const void *addr, size_t size, bool byteswap )
-{
-    return PTrieMakeInt ( tt, addr, size, byteswap, true );
-}
-
-/* Count
- *  returns number of { id : value } pairs in text tree
- *  not included within the TTree interface itself, but
- *  was included here due to the fact that it is constant
- *
- *  return value:
- *    integer value >= 0
- */
-LIB_EXPORT uint32_t CC PTrieCount ( const PTrie *self )
-{
-    if ( self != NULL )
-      return self -> num_nodes;
-    return 0;
-}
-
-/* Size
- *  returns the size in bytes
- *  of the PTrie image
- */
-LIB_EXPORT size_t CC PTrieSize ( const PTrie *self )
-{
-    const P_Trie *ptt;
-
-    if ( self == NULL )
-        return 0;
-
-    /* the original image has some standard set of headers
-       plus a bunch of table data from "rmap" to "data", followed
-       by "data_size" bytes of data. */
-    return ( const char* ) self -> data . v32 - ( const char* ) self -> _rmap +
-      self -> data_size + sizeof * ptt - sizeof ptt -> rmap;
-}
-
-/* GetNode
- *  gets a PTNode from an id
- *
- *  "node" [ OUT ] - return parameter for node
- *
- *  "id" [ IN ] - a 1-based integer node id
- *
- *  return values:
- *    EINVAL => an invalid parameter was passed
- *    ENOENT => id out of range
- */
-LIB_EXPORT rc_t CC PTrieGetNode ( const PTrie *self, PTNode *node, uint32_t id )
-{
-    rc_t rc;
-    if ( node == NULL )
-        rc = RC ( rcCont, rcTrie, rcAccessing, rcNode, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcCont, rcTrie, rcAccessing, rcSelf, rcNull );
-        else if ( id == 0 )
-            rc = RC ( rcCont, rcTrie, rcAccessing, rcId, rcNull );
-        else
-        {
-            uint32_t tid, btid;
-            rc = PTrieDecodeNodeId ( self, id, & tid, & btid );
-            if ( rc == 0 )
-            {
-                PTTrans trans;
-                rc = PTrieInitNode ( self, & trans, tid );
-                if ( rc == 0 )
-                {
-                    const PBSTree *pbt = trans . vals;
-                    if ( pbt == NULL )
-                        rc = RC ( rcCont, rcTrie, rcAccessing, rcId, rcNotFound );
-                    else
-                    {
-                        rc = PBSTreeGetNodeData ( pbt,
-                            & node -> data . addr, & node -> data . size, btid );
-                        if ( rc == 0 )
-                        {
-                            node -> internal = self;
-                            node -> id = id;
-
-                            if ( ! self -> ext_keys )
-                            {
-                                size_t sz = strlen ( node -> data . addr ) + 1;
-                                assert ( sz <= node -> data . size );
-                                node -> data . addr =
-                                    ( const char* ) node -> data . addr + sz;
-                                node -> data . size -= sz;
-                            }
-
-                            return 0;
-                        }
-                    }
-                }
-            }
-        }
-
-        node -> data . addr = node -> internal = NULL;
-        node -> data . size = 0;
-        node -> id = 0;
-    }
-    return rc;
-}
-
-/* InitNode
- */
-rc_t PTrieInitNode ( const PTrie *self, PTTrans *trans, uint32_t idx )
-{
-    rc_t rc;
-    uint32_t tcnt;
-    const uint8_t *align2;
-
-    assert ( self != NULL );
-    assert ( trans != NULL );
-
-    if ( idx == 0 )
-        return RC ( rcCont, rcNode, rcConstructing, rcId, rcNull );
-    if ( idx > self -> num_trans )
-        return RC ( rcCont, rcNode, rcConstructing, rcId, rcNotFound );
-
-    /* record node id */
-    trans -> tid = idx;
-
-    /* no backtrace link yet assigned */
-    trans -> back = NULL;
-
-    /* nobody is linked to us yet */
-    trans -> refcount = 0;
-
-    /* initialize the trans' index member */
-    trans -> idx . v32 =
-        & self -> data . v32 [ PTrieGetNodeOff ( self, idx - 1 ) ];
-    assert ( ( ( size_t ) trans -> idx . v8 & 3 ) == 0 );
-
-    /* can now access header values within index */
-    trans -> tcnt = PTTransGetIdx ( trans, self, pttHdrTransCnt );
-    trans -> icnt = PTTransGetIdx ( trans, self, pttHdrIdxCnt );
-
-    /* if the icnt is zero, the original child array was NULL */
-    if ( trans -> icnt == 0 )
-    {
-        trans -> slen = tcnt = 0;
-        trans -> child_seq_type = NULL;
-
-        /* get unaligned dad pointer */
-        trans -> dad . v8 =
-            PTTransGetIdxAddr ( trans, self, pttHdrNullEnd );
-   }
-    else
-    {
-        tcnt = PTTransGetIdx ( trans, self, pttHdrChildCnt );
-        trans -> slen = PTTransGetIdx ( trans, self, pttHdrSeqLen );
-
-        /* sequence type */
-        trans -> child_seq_type =
-            PTTransGetIdxAddr ( trans, self, pttFirstIdx + trans -> icnt );
-
-        /* unaligned dad pointer */
-        trans -> dad . v8 = & trans -> child_seq_type [ ( trans -> slen + 7 ) >> 3 ];
-    }
-
-    /* align dad and get child pointer */
-    trans -> child . v8 = PTTransAlignDadAddr ( trans, self );
-
-    /* location of align2 */
-    align2 = PTTransGetChildAddr ( trans, self, tcnt );
-
-    /* NULL out dad pointer if no backtrace */
-    if ( ! self -> backtrace )
-        trans -> dad . v8 = NULL;
-
-    /* NULL out child pointer if no transitions */
-    if ( trans -> icnt == 0 )
-        trans -> child . v8 = NULL;
-
-    /* finally, look at align for boolean */
-    if ( ( ( size_t ) align2 & 3 ) != 0 )
-    {
-        if ( align2 [ 0 ] == 0 )
-        {
-            trans -> vals = NULL;
-            return 0;
-        }
-
-        * ( size_t* ) & align2 |= 3;
-        ++ align2;
-    }
-
-    /* to avoid an allocation, mimic the older behavior
-       that used persisted data directly as a PBSTree
-       and had no allocation. we introduced a wrapper
-       object in order to have a vtable for byte-swapping,
-       and this disturbs the older code. */
-    trans -> vals = & trans -> _val;
-
-    rc = self -> byteswap ?
-        PBSTreeMakeSwapped ( & trans -> _val, align2, 0 ):
-        PBSTreeMakeNative ( & trans -> _val, align2, 0 );
-    if ( rc == 0 )
-    {
-        if ( PBSTreeCount ( trans -> vals ) == 0 )
-        {
-            trans -> vals = NULL;
-        }
-    }
-    return rc;
-}
-
-/* MakeNode
- */
-rc_t PTrieMakeNode ( const PTrie *self, PTTrans **transp, uint32_t idx )
-{
-    rc_t rc;
-
-    PTTrans *trans = malloc ( sizeof * trans );
-    if ( trans == NULL )
-        return RC ( rcCont, rcNode, rcAllocating, rcMemory, rcExhausted );
-
-    assert ( transp != NULL );
-    rc = PTrieInitNode ( self, * transp = trans, idx );
-    if ( rc != 0 )
-        free ( trans );
-
-    return rc;
-}
-
-/* MapChar
- *  maps a character to a one-based character code
- */
-static
-uint32_t PTrieMapChar ( const PTrie *tt, uint32_t ch )
-{
-  if ( ch >= tt -> first_char && ch <= tt -> last_char )
-    return tt -> map [ ch - tt -> first_char ];
-    return tt -> unmapped_idx;
-}
-
-/* NextIdx
- *  pops a character from key string
- *  maps it to an index
- */
-static
-rc_t PTrieNextIdx ( const PTrie *tt, String *key, uint32_t *idx )
-{
-    uint32_t ch;
-    rc_t rc = StringPopHead ( key, & ch );
-    if ( rc == 0 )
-        * idx = PTrieMapChar ( tt, ch );
-    return rc;
-}
-
-/* FindTrans
- */
-static
-rc_t PTrieFindTrans ( const PTrie *self, String *key, PTTrans **transp )
-{
-    rc_t rc;
-
-    PTTrans *dad;
-    uint32_t tid;
-    uint32_t key_idx;
-
-    for ( dad = NULL, key_idx = 0, rc = PTrieMakeNode ( self, transp, 1 );
-          rc == 0; rc = PTrieMakeNode ( self, transp, tid ) )
-    {
-        PTTrans *trans = * transp;
-
-        /* link in dad */
-        trans -> back = dad;
-#if ! RECORD_HDR_IDX
-        trans -> tidx = key_idx;
-#endif
-        if ( dad != NULL )
-        {
-#if ! RECORD_HDR_DEPTH
-            trans -> depth = dad -> depth + 1;
-#endif
-            ++ dad -> refcount;
-        }
-#if ! RECORD_HDR_DEPTH
-        else
-        {
-            trans -> depth = 0;
-        }
-#endif
-
-        /* if there are no child transitions,
-           this must be the node */
-        if ( trans -> icnt == 0 )
-            return 0;
-
-        /* capture dad for next loop
-           or for failure cleanup */
-        dad = trans;
-
-        /* get transition index for character */
-        rc = PTrieNextIdx ( self, key, & key_idx );
-        if ( rc != 0 )
-        {
-            /* end of string */
-            if ( GetRCState ( rc ) == rcEmpty )
-                return 0;
-
-            /* invalid input */
-            break;
-        }
-
-        /* either an unrecognized character or
-           a NULL transition mean NOT FOUND */
-        rc = RC ( rcCont, rcTrie, rcSelecting, rcString, rcNotFound );
-
-        /* check for inability to take transition */
-        if ( key_idx == 0 )
-            break;
-
-        /* try to take transition */
-        tid = PTTransGetChildChildIdx ( trans, self, -- key_idx );
-        if ( tid == 0 )
-            break;
-
-        /* convert the child transition index into a trans id */
-        tid = PTTransGetChild ( trans, self, tid - 1 ) + 1;
-    }
-
-    PTTransWhack ( dad );
-    return rc;
-}
-
-/* Find
- * PTrieFindRE
- *  find a single { id, value } pair  within tree
- *
- *  "item" [ IN ] - an exact match text string
- *
- *  "re" [ IN ] - a regular expression string
- *
- *  "rtn" [ OUT ] - return parameter for node if found.
- *  its value is undefined unless the function returns success.
- *
- *  return value:
- *    0    => not found
- *    1..n => id of found pair
- */
-static
-int CC PTNodeFindExact ( const void *ignore, const PBSTNode *n , void * data)
-{
-    assert ( n -> data . addr != NULL );
-    assert ( n -> data . size > 0 );
-
-    if ( ( ( const char* ) n -> data . addr ) [ 0 ] == 0 )
-        return 0;
-    return -1;
-}
-
-static
-int CC PTNodeFindRem ( const void *item, const PBSTNode *n, void * data )
-{
-    /* compare the remainder of the key */
-    const String *rem = item;
-    int diff = string_cmp ( rem -> addr, rem -> size,
-        n -> data . addr, n -> data . size, rem -> len );
-
-    /* if they differed within the key length, it could
-       be that the node is shorter or that there was a
-       character mismatch */
-    if ( diff != 0 )
-        return diff;
-
-    /* the only thing to ascertain now
-       is that the lengths are equal */
-    if ( ( ( const char* ) n -> data . addr ) [ rem -> size ] == 0 )
-        return 0;
-
-    /* the key is shorter */
-    return -1;
-}
-
-LIB_EXPORT uint32_t CC PTrieFind ( const PTrie *self, const String *item, PTNode *rtn,
-        int ( CC * custom_cmp ) ( const void *item, const PBSTNode *n, void *data ), void *data )
-{
-
-    if ( rtn == NULL )
-        return 0;
-
-    rtn -> data . addr = rtn -> internal = NULL;
-    rtn -> data . size = 0;
-    rtn -> id = 0;
-
-    if ( self != NULL && item != NULL && self -> num_trans != 0 && item -> len != 0 )
-    {
-        String key = * item;
-
-        PTTrans *trans;
-        rc_t rc = PTrieFindTrans ( self, & key, & trans );
-
-        if ( rc == 0 )
-        {
-            /* any values in b-tree? */
-            if ( trans -> vals != NULL )
-            {
-                int ( CC * cmp ) ( const void *item, const PBSTNode *n, void *data );
-                
-                if ( custom_cmp != NULL)
-                    cmp = custom_cmp;
-                else if ( self -> ext_keys )
-                    cmp = NULL;
-                /* for exact match on node */
-                else if ( key . len == 0 )
-                    cmp = PTNodeFindExact;
-                /* for remainder */
-                else
-                    cmp = PTNodeFindRem;
-
-                /* try to find the node */
-                if ( cmp != NULL )
-                {
-                    PBSTNode btnode;
-                    uint32_t btid = PBSTreeFind ( trans -> vals, & btnode, & key, cmp, data );
-                    if ( btid != 0 )
-                    {
-                        /* grab the data */
-                        rtn -> data . addr = btnode . data . addr;
-                        rtn -> data . size = btnode . data . size;
-
-                        /* record reference to self */
-                        rtn -> internal = self;
-
-                        /* set an id */
-                        rtn -> id = PTrieEncodeNodeId ( self,
-                            trans -> tid, btid );
-
-                        /* adjust the data block for internal keys */
-                        if ( ! self -> ext_keys )
-                        {
-                            const char *ptr = ( const char* ) rtn -> data . addr;
-                            for ( ; rtn -> data . size > 1 && * ptr != '\0'; ++ ptr, -- rtn -> data . size )
-                                ( void ) 0;
-                            rtn -> data . addr = ptr + 1; /* skip terminating NUL byte */
-                            -- rtn -> data.size;
-                        }
-                    }
-                }
-            }
-
-            PTTransWhack ( trans );
-        }
-    }
-
-    return rtn -> id;
-}
-
-LIB_EXPORT uint32_t CC PTrieFindRE ( const PTrie *self, const String *re, PTNode *rtn );
-
-/* FindAll
- * PTrieFindAllRE
- *  find multiple objects within tree
- *
- *  "key" [ IN ] - an exact match text string
- *
- *  "re" [ IN ] - a regular expression string
- *
- *  "buffer" [ OUT ] and "capacity" [ IN ] - a user-supplied
- *  array of PTNode with a capacity of "capacity" elements.
- *  if successful, the entire found set will be returned unordered within.
- *
- *  "num_found" [ OUT ] - indicates the size of the found set,
- *  regardless of return value, such that if the supplied
- *  buffer were to be too small, the required size is returned.
- *
- *  returns status codes:
- *    EINVAL  => an invalid parameter
- *    ENOENT  => the found set was empty
- *    ENOBUFS => the found set was too large
- */
-LIB_EXPORT rc_t CC PTrieFindAll ( const PTrie *self, struct String const *key,
-    PTNode buffer [], uint32_t capacity, uint32_t *num_found,
-    int ( CC * custom_cmp ) ( const void *item, const PBSTNode *n, void *data ), void *data );
-
-LIB_EXPORT rc_t CC PTrieFindAllRE ( const PTrie *self, const String *re,
-    PTNode buffer [], uint32_t capacity, uint32_t *num_found );
-
-/* ForEach
- *  executes a function on each tree element
- *
- *  "f" [ IN ] and "data" [ IN ] - iteration callback function for
- *  examining each TTNode in the tree
- */
-typedef struct PTrieForEachData PTrieForEachData;
-struct PTrieForEachData
-{
-    const PTrie *tt;
-    void ( CC * f ) ( PTNode *n, void *data );
-    void *data;
-    uint32_t tid;
-};
-
-static
-void CC PTrieRunForEachVal ( PBSTNode *btn, void *data )
-{
-    PTNode ttn;
-    PTrieForEachData *pb = data;
-
-    ttn . data . addr = btn -> data . addr;
-    ttn . data . size = btn -> data . size;
-    ttn . internal = pb -> tt;
-    ttn . id = PTrieEncodeNodeId ( pb -> tt, pb -> tid, btn -> id );
-
-    if ( ! pb -> tt -> ext_keys )
-    {
-        size_t sz = strlen ( ttn . data . addr ) + 1;
-        assert ( sz <= ttn . data . size );
-        ttn . data . addr =
-            ( const char* ) ttn . data . addr + sz;
-        ttn . data . size -= sz;
-    }
-
-    ( * pb -> f ) ( & ttn, pb -> data );
-}
-
-static
-void PTrieRunForEachTrans ( const PTTrans *trans, const PTrie *tt, void *data )
-{
-    if ( trans -> vals != NULL )
-    {
-        PTrieForEachData *pb = data;
-        pb -> tid = trans -> tid;
-        PBSTreeForEach ( trans -> vals, 0, PTrieRunForEachVal, pb );
-    }
-}
-
-LIB_EXPORT void CC PTrieForEach ( const PTrie *self,
-    void ( CC * f ) ( PTNode *n, void *data ), void *data )
-{
-  if ( self != NULL && f != NULL && self -> num_trans != 0 )
-    {
-        PTTrans trans;
-        int status = PTrieInitNode ( self, & trans, 1 );
-        if ( status == 0 )
-        {
-            PTrieForEachData pb;
-            pb . tt = self;
-            pb . f = f;
-            pb . data = data;
-
-            PTTransForEach ( & trans, self, PTrieRunForEachTrans, & pb );
-        }
-    }
-}
-
-/* DoUntil
- *  executes a function on each tree element
- *  until the function returns true
- *
- *  "f" [ IN ] and "data" [ IN ] - iteration callback function for
- *  examining each TTNode in the tree. the function returns "true"
- *  to halt iteration.
- *
- *  return values:
- *    the last value returned by "f" or false if never invoked
- */
-typedef struct PTrieDoUntilData PTrieDoUntilData;
-struct PTrieDoUntilData
-{
-    const PTrie *tt;
-    bool ( CC * f ) ( PTNode *n, void *data );
-    void *data;
-    uint32_t tid;
-};
-
-static
-bool CC PTrieRunDoUntilVal ( PBSTNode *btn, void *data )
-{
-    PTNode ttn;
-    PTrieDoUntilData *pb = data;
-
-    ttn . data . addr = btn -> data . addr;
-    ttn . data . size = btn -> data . size;
-    ttn . internal = pb -> tt;
-    ttn . id = PTrieEncodeNodeId ( pb -> tt, pb -> tid, btn -> id );
-
-    if ( ! pb -> tt -> ext_keys )
-    {
-        size_t sz = strlen ( ttn . data . addr ) + 1;
-        assert ( sz <= ttn . data . size );
-        ttn . data . addr =
-            ( const char* ) ttn . data . addr + sz;
-        ttn . data . size -= sz;
-    }
-
-    return ( * pb -> f ) ( & ttn, pb -> data );
-}
-
-static
-bool PTrieRunDoUntilTrans ( const PTTrans *trans, const PTrie *tt, void *data )
-{
-    if ( trans -> vals != NULL )
-    {
-        PTrieDoUntilData *pb = data;
-        pb -> tid = trans -> tid;
-        return PBSTreeDoUntil ( trans -> vals, 0, PTrieRunDoUntilVal, pb );
-    }
-    return false;
-}
-
-LIB_EXPORT bool CC PTrieDoUntil ( const PTrie *self,
-    bool ( CC * f ) ( PTNode *n, void *data ), void *data )
-{
-  if ( self != NULL && f != NULL && self -> num_trans != 0 )
-    {
-        PTTrans trans;
-        rc_t rc = PTrieInitNode ( self, & trans, 1 );
-        if ( rc == 0 )
-        {
-            PTrieDoUntilData pb;
-            pb . tt = self;
-            pb . f = f;
-            pb . data = data;
-
-            return PTTransDoUntil ( & trans, self, PTrieRunDoUntilTrans, & pb );
-        }
-    }
-    return false;
-}
-
-/* Whack
- *  tears down internal structure
- */
-LIB_EXPORT void CC PTrieWhack ( PTrie *self )
-{
-    if ( self != NULL )
-        free ( self );
-}
diff --git a/libs/klib/qsort.c b/libs/klib/qsort.c
deleted file mode 100644
index 11901c8..0000000
--- a/libs/klib/qsort.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/extern.h>
-#include <klib/sort.h>
-#include <sysalloc.h>
-
-/* Copyright (C) 1991,1992,1996,1997,1999,2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Written by Douglas C. Schmidt (schmidt at ics.uci.edu).
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-/* If you consider tuning this algorithm, you should consult first:
-   Engineering a sort function; Jon Bentley and M. Douglas McIlroy;
-   Software - Practice and Experience; Vol. 23 (11), 1249-1265, 1993.  */
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* Byte-wise swap two items of size SIZE. */
-#define SWAP(a, b, size)                        \
-    do                                          \
-    {                                           \
-        register size_t __size = (size);        \
-        register char *__a = (a), *__b = (b);   \
-        do                                      \
-        {                                       \
-            char __tmp = *__a;                  \
-            *__a++ = *__b;                      \
-            *__b++ = __tmp;                     \
-        } while (--__size > 0);                 \
-    } while (0)
-
-/* Discontinue quicksort algorithm when partition gets below this size.
-   This particular magic number was chosen to work best on a Sun 4/260. */
-#define MAX_THRESH 4
-
-/* Stack node declarations used to store unfulfilled partition obligations. */
-typedef struct
-{
-    char *lo;
-    char *hi;
-} stack_node;
-
-/* The next 4 #defines implement a very fast in-line stack abstraction. */
-/* The stack needs log (total_elements) entries (we could even subtract
-   log(MAX_THRESH)).  Since total_elements has type size_t, we get as
-   upper bound for log (total_elements):
-   bits per byte (CHAR_BIT) * sizeof(size_t).  */
-#define STACK_SIZE	(CHAR_BIT * sizeof(size_t))
-#define PUSH(low, high)	((void) ((top->lo = (low)), (top->hi = (high)), ++top))
-#define	POP(low, high)	((void) (--top, (low = top->lo), (high = top->hi)))
-#define	STACK_NOT_EMPTY	(stack < top)
-
-
-/* Order size using quicksort.  This implementation incorporates
-   four optimizations discussed in Sedgewick:
-
-   1. Non-recursive, using an explicit stack of pointer that store the
-   next array partition to sort.  To save time, this maximum amount
-   of space required to store an array of SIZE_MAX is allocated on the
-   stack.  Assuming a 32-bit (64 bit) integer for size_t, this needs
-   only 32 * sizeof(stack_node) == 256 bytes (for 64 bit: 1024 bytes).
-   Pretty cheap, actually.
-
-   2. Chose the pivot element using a median-of-three decision tree.
-   This reduces the probability of selecting a bad pivot value and
-   eliminates certain extraneous comparisons.
-
-   3. Only quicksorts TOTAL_ELEMS / MAX_THRESH partitions, leaving
-   insertion sort to order the MAX_THRESH items within each partition.
-   This is a big win, since insertion sort is faster for small, mostly
-   sorted array segments.
-
-   4. The larger of the two sub-partitions is always pushed onto the
-   stack first, with the algorithm then concentrating on the
-   smaller partition.  This *guarantees* no more than log (total_elems)
-   stack size is needed (actually O(1) in this case)!  */
-
-LIB_EXPORT void CC ksort ( void *pbase, size_t total_elems, size_t size,
-    int64_t ( CC * cmp ) ( const void*, const void*, void *data ), void *data )
-{
-    register char *base_ptr = (char *) pbase;
-
-    const size_t max_thresh = MAX_THRESH * size;
-
-    /* NEW - NCBI ... avoid sorting a single element */
-    if (total_elems < 2)
-        /* Avoid lossage with unsigned arithmetic below.  */
-        return;
-
-    if (total_elems > MAX_THRESH)
-    {
-        char *lo = base_ptr;
-        char *hi = &lo[size * (total_elems - 1)];
-        stack_node stack[STACK_SIZE];
-        stack_node *top = stack;
-
-        PUSH (NULL, NULL);
-
-        while (STACK_NOT_EMPTY)
-        {
-            char *left_ptr;
-            char *right_ptr;
-
-            /* Select median value from among LO, MID, and HI. Rearrange
-               LO and HI so the three values are sorted. This lowers the
-               probability of picking a pathological pivot value and
-               skips a comparison for both the LEFT_PTR and RIGHT_PTR in
-               the while loops. */
-
-            char *mid = lo + size * ((hi - lo) / size >> 1);
-
-            if ((*cmp) ((void *) mid, (void *) lo, data) < 0)
-                SWAP (mid, lo, size);
-            if ((*cmp) ((void *) hi, (void *) mid, data) < 0)
-                SWAP (mid, hi, size);
-            else
-                goto jump_over;
-            if ((*cmp) ((void *) mid, (void *) lo, data) < 0)
-                SWAP (mid, lo, size);
-        jump_over:;
-
-            left_ptr  = lo + size;
-            right_ptr = hi - size;
-
-            /* Here's the famous ``collapse the walls'' section of quicksort.
-               Gotta like those tight inner loops!  They are the main reason
-               that this algorithm runs much faster than others. */
-            do
-            {
-                while ((*cmp) ((void *) left_ptr, (void *) mid, data) < 0)
-                    left_ptr += size;
-
-                while ((*cmp) ((void *) mid, (void *) right_ptr, data) < 0)
-                    right_ptr -= size;
-
-                if (left_ptr < right_ptr)
-                {
-                    SWAP (left_ptr, right_ptr, size);
-                    if (mid == left_ptr)
-                        mid = right_ptr;
-                    else if (mid == right_ptr)
-                        mid = left_ptr;
-                    left_ptr += size;
-                    right_ptr -= size;
-                }
-                else if (left_ptr == right_ptr)
-                {
-                    left_ptr += size;
-                    right_ptr -= size;
-                    break;
-                }
-            }
-            while (left_ptr <= right_ptr);
-
-            /* Set up pointers for next iteration.  First determine whether
-               left and right partitions are below the threshold size.  If so,
-               ignore one or both.  Otherwise, push the larger partition's
-               bounds on the stack and continue sorting the smaller one. */
-
-            if ((size_t) (right_ptr - lo) <= max_thresh)
-            {
-                if ((size_t) (hi - left_ptr) <= max_thresh)
-                    /* Ignore both small partitions. */
-                    POP (lo, hi);
-                else
-                    /* Ignore small left partition. */
-                    lo = left_ptr;
-            }
-            else if ((size_t) (hi - left_ptr) <= max_thresh)
-                /* Ignore small right partition. */
-                hi = right_ptr;
-            else if ((right_ptr - lo) > (hi - left_ptr))
-            {
-                /* Push larger left partition indices. */
-                PUSH (lo, right_ptr);
-                lo = left_ptr;
-            }
-            else
-            {
-                /* Push larger right partition indices. */
-                PUSH (left_ptr, hi);
-                hi = right_ptr;
-            }
-        }
-    }
-
-    /* Once the BASE_PTR array is partially sorted by quicksort the rest
-       is completely sorted using insertion sort, since this is efficient
-       for partitions below MAX_THRESH size. BASE_PTR points to the beginning
-       of the array to sort, and END_PTR points at the very last element in
-       the array (*not* one beyond it!). */
-
-#undef min
-#define min(x, y) ((x) < (y) ? (x) : (y))
-
-    {
-        char *const end_ptr = &base_ptr[size * (total_elems - 1)];
-        char *tmp_ptr = base_ptr;
-        char *thresh = min(end_ptr, base_ptr + max_thresh);
-        register char *run_ptr;
-
-        /* Find smallest element in first threshold and place it at the
-           array's beginning.  This is the smallest array element,
-           and the operation speeds up insertion sort's inner loop. */
-
-        for (run_ptr = tmp_ptr + size; run_ptr <= thresh; run_ptr += size)
-            if ((*cmp) ((void *) run_ptr, (void *) tmp_ptr, data) < 0)
-                tmp_ptr = run_ptr;
-
-        if (tmp_ptr != base_ptr)
-            SWAP (tmp_ptr, base_ptr, size);
-
-        /* Insertion sort, running from left-hand-side up to right-hand-side.  */
-
-#if 1
-        /* NEW - NCBI */
-        tmp_ptr = base_ptr + size;
-        for ( run_ptr = base_ptr + size + size; run_ptr <= end_ptr; tmp_ptr = run_ptr, run_ptr += size )
-        {
-            for ( ; tmp_ptr >= base_ptr; tmp_ptr -= size )
-            {
-                if ( ( * cmp ) ( run_ptr, tmp_ptr, data ) >= 0 )
-                    break;
-            }
-
-            tmp_ptr += size;
-            if ( tmp_ptr != run_ptr )
-            {
-                char *trav;
-
-                trav = run_ptr + size;
-                while (--trav >= run_ptr)
-                {
-                    char c = *trav;
-                    char *hi, *lo;
-
-                    for (hi = lo = trav; (lo -= size) >= tmp_ptr; hi = lo)
-                        *hi = *lo;
-                    *hi = c;
-                }
-            }
-        }
-
-#else
-        run_ptr = base_ptr + size;
-        while ((run_ptr += size) <= end_ptr)
-        {
-            tmp_ptr = run_ptr - size;
-            while ((*cmp) ((void *) run_ptr, (void *) tmp_ptr, data) < 0)
-                tmp_ptr -= size;
-
-            tmp_ptr += size;
-            if (tmp_ptr != run_ptr)
-            {
-                char *trav;
-
-                trav = run_ptr + size;
-                while (--trav >= run_ptr)
-                {
-                    char c = *trav;
-                    char *hi, *lo;
-
-                    for (hi = lo = trav; (lo -= size) >= tmp_ptr; hi = lo)
-                        *hi = *lo;
-                    *hi = c;
-                }
-            }
-        }
-#endif
-    }
-}
diff --git a/libs/klib/rc-idx-tbl.c b/libs/klib/rc-idx-tbl.c
deleted file mode 100644
index a851807..0000000
--- a/libs/klib/rc-idx-tbl.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*==============================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-* Is used in XML logging to generate RC-derived attributes
-*/
-
-#define RC_ENUM( type ) \
-    const char *g ## type ##Idx_str [] =
-
-#define RC_ENTRY( id, txt ) # id ,
-
-#define RC_VLAST( id )
-
-#define RC_LAST( id ) NULL
-
-#include <klib/rc.h>
-
-/* EOF */
diff --git a/libs/klib/rc-tbl.c b/libs/klib/rc-tbl.c
deleted file mode 100644
index e09543f..0000000
--- a/libs/klib/rc-tbl.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define RC_ENUM( type ) \
-    const char *g ## type ##_str [] =
-
-#define RC_ENTRY( id, txt ) txt,
-
-#define RC_VLAST( id )
-
-#define RC_LAST( id ) NULL
-
-#include <klib/rc.h>
diff --git a/libs/klib/refcount.c b/libs/klib/refcount.c
deleted file mode 100644
index e0acafb..0000000
--- a/libs/klib/refcount.c
+++ /dev/null
@@ -1,499 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define TRACK_REFERENCES 1
-#define INLINE_REFCOUNT 0
-
-#include <kfc/extern.h>
-
-#include <klib/refcount.h>
-#include <klib/log.h>
-#include <atomic32.h>
-
-#include <sysalloc.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <assert.h>
-
-/* the simple atomic32_dec_and_test interface does not detect
-   crossing to negative. better said, it internally detects the
-   event but does not pay for setting a tri-state return value
-   on exit, opting instead to only detect the zero crossing. */
-#ifndef DETECT_ZERO_STATE
-#define DETECT_ZERO_STATE 1
-#endif
-
-/* the simple atomic32_inc interface does not detect rollover */
-#ifndef DETECT_LIMIT_VIOLATION
-#define DETECT_LIMIT_VIOLATION 1
-#endif
-
-/* this is in here to detect if the refcount is above a certain value 
-   introduced to debug heap corruption in the windows-build */
-#define MAX_REFCOUNT_VALUE 1000
-#ifndef DETECT_MAX_REFCOUNT_VIOLATION
-#define DETECT_MAX_REFCOUNT_VIOLATION 1
-#endif
-
-
-#define DUAL_OWN_BITS 16
-#define DUAL_DEP_BITS ( 32 - DUAL_OWN_BITS )
-#define DUAL_OWN_VAL ( 1 << DUAL_DEP_BITS )
-#define DUAL_DEP_VAL 1
-#define DUAL_OWN_MAX ( ( 1 << ( DUAL_OWN_BITS - 1 ) ) - 1 )
-#define DUAL_DEP_MAX ( ( 1 << ( DUAL_DEP_BITS - 1 ) ) - 1 )
-#define DUAL_OWN_LIM ( DUAL_OWN_MAX << DUAL_DEP_BITS )
-#define DUAL_DEP_LIM DUAL_DEP_MAX
-#define DUAL_OWN_MASK ( ( 1 << DUAL_OWN_BITS ) - 1 )
-#define DUAL_DEP_MASK ( ( 1 << DUAL_DEP_BITS ) - 1 )
-
-/*--------------------------------------------------------------------------
- * KRefcount
- *  signed 32-bit reference counter
- * KDualRef
- *  dual signed/unsigned 16-bit reference counter
- */
-
-
-/* Init
- *  initialize a refcount object
- *
- *  "refcount" [ IN/OUT ] - pointer to object being initialized
- *
- *  "value" [ IN ] - initial refcount value
- *    -OR-
- *  "owned" [ IN ] and "dep" [ IN ] - owned and dependent counts
- *  function will return krefLimit if counts exceed limits
- *
- *  "clsname" [ IN ] - NUL-terminated string stating classname
- *  of object instance being initialized.
- *
- *  "op" [ IN ] - NUL-terminated string stating construction operation
- *
- *  "name" [ IN ] - NUL-terminated name of instance
- */
-#if ! INLINE_REFCOUNT
-void CC KRefcountInit ( KRefcount *refcount, int value,
-    const char *clsname, const char *op, const char *name )
-{
-    REFNEW ( clsname, op, name, refcount, value );
-    atomic32_set ( refcount, value );
-}
-#endif
-
-int CC KDualRefInit ( KDualRef *refcount, int owned, int dep,
-    const char *clsname, const char *op, const char *name )
-{
-    int value = owned << DUAL_DEP_BITS | dep;
-
-#if DETECT_LIMIT_VIOLATION
-    if ( owned < 0 || owned > DUAL_OWN_MAX ||
-         dep < 0 || dep > DUAL_DEP_MAX )
-    {
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "FAILED TO CREATE %s, operation %s, name '%s', instance $0x%p: initial refcounts 0x%x, 0x%x",
-                   clsname, op, name, refcount, owned, dep ) );
-        return krefLimit;
-    }
-#endif
-
-    REFNEW ( clsname, op, name, refcount, value );
-    atomic32_set ( refcount, value );
-    return krefOkay;
-}
-
-
-/* Whack
- *  tear down whatever was built up in object
- */
-#if ! INLINE_REFCOUNT
-void CC KRefcountWhack ( KRefcount *self, const char *clsname )
-{
-    REFMSG ( clsname, "whack", self );
-}
-#endif
-
-void CC KDualRefWhack ( KDualRef *self, const char *clsname )
-{
-    REFMSG ( clsname, "whack", self );
-}
-
-
-/* Add
- *  add an owned reference
- *  returns enum value indicating action to be taken
- *
- *  inline implementation always returns krefOkay.
- *
- *  linked-in implementation may return any of the following
- *  codes, depending upon how it was compiled:
- *    krefOkay     : reference was successfully added
- *    krefZero     : reference was added, but prior value was zero
- *    krefLimit    : reference was NOT added, too many references
- *    krefNegative : reference was NOT added, prior value was negative
- */
-#if ! INLINE_REFCOUNT
-int CC KRefcountAdd ( const KRefcount *self, const char *clsname )
-{
-#if DETECT_ZERO_STATE
-    int prior = atomic32_read_and_add_ge ( ( KRefcount* ) self, 1, 0 );
-    if ( prior < 0 )
-    {
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "FAILED to addref %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-        return krefNegative;
-    }
-    if ( prior == 0 )
-    {
-#if 0 /*** disabling this warning since code is noe initializing refcount to zero in several places ***/
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "about to addref %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-#endif
-        return krefZero;
-    }
-
-#if DETECT_LIMIT_VIOLATION
-    if ( prior == INT_MAX )
-    {
-        atomic32_dec ( ( KRefcount* ) self );
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "FAILED to addref %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-        return krefLimit;
-    }
-#endif
-
-    CNTMSG ( clsname, "addref", self, prior );
-
-#elif DETECT_LIMIT_VIOLATION
-    unsigned int prior = atomic32_read_and_add_lt ( ( KRefcount* ) self, 1, INT_MAX );
-    if ( prior >= INT_MAX )
-    {
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "FAILED to addref %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-        return krefLimit;
-    }
-    CNTMSG ( clsname, "addref", self, prior );
-#else
-    REFMSG ( clsname, "addref", self );
-    atomic32_inc ( ( KRefcount* ) ( self ) );
-#endif
-
-    return krefOkay;
-}
-#endif
-
-int CC KDualRefAdd ( const KDualRef *self, const char *clsname )
-{
-#if DETECT_LIMIT_VIOLATION
-    unsigned int prior = atomic32_read_and_add_lt ( ( KDualRef* ) self, DUAL_OWN_VAL, DUAL_OWN_LIM );
-#if DETECT_ZERO_STATE
-    unsigned int owned = prior >> DUAL_DEP_BITS;
-    if ( owned > DUAL_OWN_MAX )
-    {
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER, 
-                  ( "FAILED to addref %s instance 0x%p: prior refcount = 0x%x",
-                    clsname, self, prior ));
-        return krefNegative;
-    }
-    if ( prior == 0 )
-    {
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER, 
-                 ( "about to addref %s instance 0x%p: prior refcount = 0x%x",
-                    clsname, self, prior ) );
-        return krefZero;
-    }
-#endif
-    if ( prior >= DUAL_OWN_LIM )
-    {
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER, 
-                  ( "FAILED to addref %s instance 0x%p: prior refcount = 0x0%x",
-                    clsname, self, prior ));
-        return krefLimit;
-    }
-    CNTMSG ( clsname, "addref", self, prior );
-#elif DETECT_ZERO_STATE
-    unsigned int prior = atomic32_read_and_add ( ( KDualRef* ) self, DUAL_OWN_VAL );
-    unsigned int owned = prior >> DUAL_DEP_BITS;
-    if ( owned > DUAL_OWN_MAX )
-    {
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                  ( "FAILED to addref %s instance %0x%p: prior refcount = 0x%x",
-                    clsname, self, prior ));
-        return krefNegative;
-    }
-    if ( prior == 0 )
-    {
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                  ( "about to addref %s instance %0x%p: prior refcount = 0x%x",
-                    clsname, self, prior ));
-        return krefZero;
-    }
-    CNTMSG ( clsname, "addref", self, prior );
-#else
-    REFMSG ( clsname, "addref", self );
-    atomic32_add ( ( KDualRef* ) ( self ), DUAL_OWN_VAL );
-#endif
-    return krefOkay;
-}
-
-
-/* Drop
- *  drop an owned reference
- *  returns enum value indicating action to be taken
- *
- *  inline implementation returns:
- *    krefOkay     : reference was successfully dropped
- *    krefWhack    : all references are gone and object can be collected
- *
- *  linked-in implementation may return any of the following
- *  codes, depending upon how it was compiled:
- *    krefOkay     : reference was successfully dropped
- *    krefWhack    : all references are gone and object can be collected
- *    krefZero     : reference was dropped, and no further owned refernces exist
- *    krefNegative : reference was NOT dropped, as resultant count would be negative
- */
-#if ! INLINE_REFCOUNT
-int CC KRefcountDrop ( const KRefcount *self, const char *clsname )
-{
-#if DETECT_ZERO_STATE
-    int prior = atomic32_read_and_add ( ( KRefcount* ) self, -1 );
-    if ( prior <= 0 )
-    {
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "FAILED to release %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-        return krefNegative;
-    }
-    CNTMSG ( clsname, "release", self, prior );
-    if ( prior == 1 )
-        return krefWhack;
-#else
-    REFMSG ( clsname, "release", self );
-    if ( atomic32_dec_and_test ( ( KRefcount* ) ( self ) ) )
-        return krefWhack;
-#endif
-    return krefOkay;
-}
-#endif
-
-int CC KDualRefDrop ( const KDualRef *self, const char *clsname )
-{
-    int prior = atomic32_read_and_add_ge ( ( KDualRef* ) self, - DUAL_OWN_VAL, DUAL_OWN_VAL );
-#if DETECT_ZERO_STATE
-    if ( prior < DUAL_OWN_VAL )
-    {
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "FAILED to release %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-        return krefNegative;
-    }
-#endif
-    CNTMSG ( clsname, "release", self, prior );
-    if ( prior == DUAL_OWN_VAL )
-        return krefWhack;
-    if ( ( prior >> DUAL_DEP_BITS ) == 0 )
-        return krefZero;
-    return krefOkay;
-}
-
-
-/* AddDep
- *  adds a dependency reference
- *  returns enum value indicating action to be taken
- *
- *  inline implementation always returns krefOkay.
- *
- *  linked-in implementation may return any of the following
- *  codes, depending upon how it was compiled:
- *    krefOkay     : reference was successfully added
- *    krefZero     : reference was added, but prior value was zero
- *    krefNegative : reference was NOT added, prior value was negative
- */
-#if ! INLINE_REFCOUNT
-int CC KRefcountAddDep ( const KRefcount *self, const char *clsname )
-{
-#if DETECT_ZERO_STATE
-    int prior = atomic32_read_and_add ( ( KRefcount* ) self, 1 );
-    if ( prior < 0 )
-    {
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "FAILED to attach %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-        return krefNegative;
-    }
-    if ( prior == 0 )
-    {
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "about to attach %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-        return krefZero;
-    }
-#if DETECT_LIMIT_VIOLATION
-    if ( prior == INT_MAX )
-    {
-        atomic32_dec ( ( KRefcount* ) self );
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "FAILED to attach %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-        return krefLimit;
-    }
-#endif
-    CNTMSG ( clsname, "attach", self, prior );
-#elif DETECT_LIMIT_VIOLATION
-    unsigned int prior = atomic32_read_and_add_lt ( ( KRefcount* ) self, 1, INT_MAX );
-    if ( prior >= INT_MAX )
-    {
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "FAILED to attach %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-        return krefLimit;
-    }
-    CNTMSG ( clsname, "attach", self, prior );
-#else
-    REFMSG ( clsname, "attach", self );
-    atomic32_inc ( ( KRefcount* ) ( self ) );
-#endif
-    return krefOkay;
-}
-#endif
-
-int CC KDualRefAddDep ( const KDualRef *self, const char *clsname )
-{
-#if DETECT_ZERO_STATE
-    int prior = atomic32_read_and_add_ge ( ( KDualRef* ) self, 1, 0 );
-    int dep = prior & DUAL_DEP_MASK;
-    if ( prior < 0 || dep > DUAL_DEP_MAX )
-    {
-        if ( prior >= 0 )
-            atomic32_dec ( ( KDualRef* ) self );
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "FAILED to attach %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-        return krefNegative;
-    }
-    if ( prior == 0 )
-    {
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "about to attach %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-        return krefZero;
-    }
-#if DETECT_LIMIT_VIOLATION
-    if ( dep == DUAL_DEP_MAX )
-    {
-        atomic32_dec ( ( KDualRef* ) self );
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "FAILED to attach %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-        return krefLimit;
-    }
-#endif
-    CNTMSG ( clsname, "attach", self, prior );
-#elif DETECT_LIMIT_VIOLATION
-    int prior = atomic32_read_and_inc ( ( KDualRef* ) self );
-    if ( ( prior & DUAL_DEP_MASK ) >= DUAL_DEP_MAX )
-    {
-        atomic32_dec ( ( KDualRef* ) self );
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "FAILED to attach %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-        return krefLimit;
-    }
-    CNTMSG ( clsname, "attach", self, prior );
-#else
-    REFMSG ( clsname, "attach", self );
-    atomic32_inc ( ( KDualRef* ) ( self ) );
-#endif
-    return krefOkay;
-}
-
-
-/* DropDep
- *  drop a dependency reference
- *  returns enum value indicating action to be taken
- *
- *  inline implementation returns:
- *    krefOkay     : reference was successfully dropped
- *    krefWhack    : all references are gone and object can be collected
- *
- *  linked-in implementation may return any of the following
- *  codes, depending upon how it was compiled:
- *    krefOkay     : reference was successfully dropped
- *    krefWhack    : all references are gone and object can be collected
- *    krefZero     : reference was dropped, and no further dependent refernces exist
- *    krefNegative : reference was NOT dropped, as resultant count would be negative
- */
-#if ! INLINE_REFCOUNT
-int CC KRefcountDropDep ( const KRefcount *self, const char *clsname )
-{
-#if DETECT_ZERO_STATE
-    int prior = atomic32_read_and_add ( ( KRefcount* ) self, -1 );
-    if ( prior <= 0 )
-    {
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "FAILED to sever %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-        return krefNegative;
-    }
-    CNTMSG ( clsname, "sever", self, prior );
-    if ( prior == 1 )
-        return krefWhack;
-#else
-    REFMSG ( clsname, "sever", self );
-    if ( atomic32_dec_and_test ( ( KRefcount* ) ( self ) ) )
-        return krefWhack;
-#endif
-    return krefOkay;
-}
-#endif
-
-int CC KDualRefDropDep ( const KDualRef *self, const char *clsname )
-{
-    int prior = atomic32_read_and_add ( ( KDualRef* ) self, -1 );
-#if DETECT_ZERO_STATE
-    if ( prior <= 0 )
-    {
-        atomic32_inc ( ( KDualRef* ) self );
-        DBGMSG ( DBG_REF, DBG_REF_PLACEHOLDER,
-                 ( "FAILED to sever %s instance 0x%p: prior refcount = 0x%x",
-                   clsname, self, prior ) );
-        return krefNegative;
-    }
-#endif
-    CNTMSG ( clsname, "sever", self, prior );
-    if ( prior == 1 )
-        return krefWhack;
-    if ( ( prior & DUAL_DEP_MASK ) == 1 )
-        return krefZero;
-    return krefOkay;
-}
diff --git a/libs/klib/release-vers.h b/libs/klib/release-vers.h
deleted file mode 100644
index 052a099..0000000
--- a/libs/klib/release-vers.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/* THIS FILE IS NOT GENERATED AUTOMATICALLY! */
-
-/* The Version of current SRA Toolkit Release */
-#define RELEASE_VERS 0x02070000
-
-/* The Revision of Version of current SRA Toolkit Release */
-#define RELEASE_REVISION 0
-
-
-/* The Type of Version of current SRA Toolkit Release is one of:
- *  'a' - alpha
- *  'b' - beta
- *  'c' - release candidate
- *  'r' - final
- */
-#define RELEASE_TYPE 'r'
diff --git a/libs/klib/report-klib.c b/libs/klib/report-klib.c
deleted file mode 100644
index af90bd2..0000000
--- a/libs/klib/report-klib.c
+++ /dev/null
@@ -1,908 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h> /* MUST BE FIRST */
-
-#include <kapp/args.h> /* OPTION_REPORT */
-
-#include <kfs/directory.h> /* KDirectoryNativeDir */
-#include <kfg/kfg-priv.h> /* ENV_KRYPTO_PWFILE */
-
-#include <klib/klib-priv.h>
-#include <klib/log.h> /* LOGERR */
-#include <klib/misc.h> /* is_iser_an_admin */
-#include <klib/namelist.h> /* KNamelistRelease */
-#include <klib/out.h> /* OUTMSG */
-#include <klib/printf.h> /* string_printf */
-#include <klib/rc.h>
-#include <klib/report.h> /* ReportInit */
-#include <klib/time.h> /* KTime */
-#include <klib/text.h> /* string_printf */
-
-#include <atomic.h> /* atomic_test_and_set_ptr */
-
-#include <stdarg.h> /* va_start */
-#include <stdio.h> /* sprintf */
-#include <stdlib.h> /* malloc */
-#include <string.h> /* memset */
-#include <limits.h> /* PATH_MAX */
-#include <assert.h>
-
-#ifndef PATH_MAX
-#define PATH_MAX 4096
-#endif
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
-
-/*
- * An unrecoverable error happened.
- * We can help to solve it
- * by reporting information about known application execution environment.
- */
-
-static
-rc_t XMLLogger_Encode(const char* src, char *dst,
-    size_t dst_sz, size_t *num_writ)
-{
-    rc_t rc = 0;
-    if( src == NULL || dst == NULL || num_writ == NULL ) {
-        rc = RC(rcApp, rcArgv, rcParsing, rcParam, rcNull);
-    } else {
-        *num_writ = 0;
-        do {
-            size_t bytes;
-            const char* p;
-            switch(*src) {
-                case '\'':
-                    bytes = 6;
-                    p = "'";
-                    break;
-                case '"':
-                    bytes = 6;
-                    p = """;
-                    break;
-                case '&':
-                    bytes = 5;
-                    p = "&";
-                    break;
-                case '<':
-                    bytes = 4;
-                    p = "<";
-                    break;
-                case '>':
-                    bytes = 4;
-                    p = ">";
-                    break;
-                default:
-                    bytes = 1;
-                    p = src;
-                    break;
-            }
-            if( (*num_writ + bytes) > dst_sz ) {
-                rc = RC(rcApp, rcLog, rcEncoding, rcBuffer, rcInsufficient);
-                break;
-            } else {
-                memcpy(dst, p, bytes);
-                *num_writ = *num_writ + bytes;
-                dst += bytes;
-            }
-        } while(*src++ != '\0');
-        *num_writ = *num_writ - 1;
-    }
-    return rc;
-}
-
-typedef rc_t (CC ReportObj)(const ReportFuncs *f, uint32_t indent,
-                              const char *path, bool *wasDbOrTableSet);
-typedef rc_t (CC ReportSoftware)(const ReportFuncs *f, uint32_t indent,
-                          const char *argv_0, const char *date, ver_t tool_ver);
-typedef rc_t (CC Whack )(void);
-typedef struct Report {
-    rc_t ( CC * report_redirect ) ( KWrtHandler* handler,
-        const char* filename, bool* to_file, bool finalize );
-    rc_t ( CC * report_cwd ) ( const ReportFuncs *f, uint32_t indent );
-    rc_t ( CC * report_config ) ( const ReportFuncs *f,
-        uint32_t indent, uint32_t configNodesSkipCount, va_list args );
-    ReportObj *report_vdb;
-    ReportSoftware *report_software;
-    Whack *whack_vdb;
-    atomic_ptr_t object; /* path: to free */
-    const char* date;
-    char** argv;
-    int argc;
-    KTime_t start;
-    ver_t tool_ver;
-    bool hasZombies;
-    bool silence;
-} Report;
-
-static rc_t ReportReplaceObjectPtr(Report* self, const char* path) {
-    char *copy;
-    void *prev_ptr, *cur_ptr;
-
-    assert(self);
-
-    copy = string_dup_measure(path, NULL);
-    if (copy == NULL)
-        return RC(rcExe, rcMemory, rcAllocating, rcMemory, rcExhausted);
-
-    cur_ptr = self -> object . ptr;
-    do
-    {
-        prev_ptr = cur_ptr;
-        cur_ptr = atomic_test_and_set_ptr ( & self -> object, copy, prev_ptr );
-    }
-    while ( cur_ptr != prev_ptr );
-
-    if ( cur_ptr != NULL )
-        free ( cur_ptr );
-
-    return 0;
-}
-
-static rc_t ReportFreeObject(Report* self) {
-    rc_t rc = 0;
-    void *prev_ptr, *cur_ptr;
-
-    assert(self);
-
-    cur_ptr = self -> object . ptr;
-    do
-    {
-        prev_ptr = cur_ptr;
-        cur_ptr = atomic_test_and_set_ptr ( & self -> object, NULL, prev_ptr );
-    }
-    while ( cur_ptr != prev_ptr );
-
-    if ( cur_ptr != NULL )
-        free(cur_ptr);
-
-    return rc;
-}
-
-static atomic_ptr_t report_singleton;
-/*static Report * volatile report_singleton;*/
-
-static rc_t ReportGet(Report** self)
-{
-    if ( report_singleton . ptr == NULL )
-        return RC ( rcRuntime, rcStorage, rcAccessing, rcSelf, rcNull );
-
-    * self = report_singleton . ptr;
-    return 0;
-}
-static rc_t ReportRelease(void)
-{
-    rc_t rc = 0;
-    Report *prev_report, *cur_report;
-
-    cur_report = report_singleton . ptr;
-    do
-    {
-        prev_report = cur_report;
-        cur_report = atomic_test_and_set_ptr ( & report_singleton, NULL, prev_report );
-    }
-    while ( cur_report != prev_report );
-
-    if ( cur_report != NULL )
-    {
-
-        /* cleanup */
-        ReportFreeObject( cur_report );
-        if ( cur_report -> whack_vdb != NULL )
-            rc = ( * cur_report -> whack_vdb ) ();
-
-        if ( cur_report -> argv != NULL )
-        {
-            int i;
-            for ( i = 0; i < cur_report -> argc; ++ i )
-                free ( cur_report -> argv [ i ] );
-            free ( cur_report -> argv );
-            cur_report -> argv = NULL;
-        }
-
-        memset ( cur_report, 0, sizeof * cur_report );
-    }
-
-    return rc;
-}
-
-static void reportOpen1(uint32_t indent, const char* name) {
-    OUTMSG(("%*c%s>", indent + 1, '<', name));
-}
-
-static rc_t reportData1(const char* data) {
-    rc_t rc = 0;
-
-    char dummy[PATH_MAX * 2 + 1] = "";
-    const char* p = data;
-
-    assert(data);
-
-    if (data[0] == 0) {
-        return rc;
-    }
-
-    if (strpbrk(data, "'\"&<>")) {
-        size_t num_writ = 0;
-        rc = XMLLogger_Encode(data, dummy, sizeof dummy, &num_writ);
-        if (rc == 0)
-        {   p = dummy; }
-    }
-
-    OUTMSG(("%s", p));
-
-    return rc;
-}
-
-static void reportClose1(const char* name) { OUTMSG(("</%s>\n", name)); }
-
-static rc_t reportImpl(int indent, bool open, bool close, bool eol,
-    const char* name, const char* data, int count, va_list args)
-{
-    rc_t rc = 0;
-    int i = 0;
-
-    if (count < 0) {
-        eol = false;
-        count = -count;
-    }
-
-    OUTMSG(("%*c", eol ? ( indent + 1 ) : 1, '<'));
-    OUTMSG(("%s%s", ( ! open && close ) ? "/" : "", name));
-
-    for (i = 0; i < count; ++i) {
-        const char* name = va_arg(args, const char*);
-        int format = va_arg(args, int);
-        union {
-            const char* s;
-            int i;
-            int64_t i64;
-            KTime* t;
-            rc_t rc;
-            const uint8_t* digest;
-            uint64_t u64;
-            ver_t vers;
-        } u;
-        OUTMSG((" %s=\"", name));
-        u.i64 = 0;
-        switch(format) {
-            case 'M':
-                u.digest = va_arg(args, const uint8_t*);
-                {
-                    int i = 0;
-                    for (i = 0; i < 16; ++i)
-                    {  OUTMSG(("%02x", *(u.digest + i))); }
-                }
-                break;
-            case 'l':
-                u.i64 = va_arg(args, int64_t);
-                OUTMSG(("%ld", u.i64));
-                break;
-            case 'u':
-                u.u64 = va_arg(args, uint64_t);
-                OUTMSG(("%lu", u.u64));
-                break;
-            case 'R':
-                u.rc = va_arg(args, rc_t);
-                OUTMSG(("%R", u.rc));
-                break;
-            case 'T':
-                u.t = va_arg(args, KTime*);
-                OUTMSG(("%lT", u.t));
-                break;
-            case 's':
-                u.s = va_arg(args, const char*);
-                OUTMSG(("%s", u.s));
-                break;
-            case 'V':
-                u.vers = va_arg(args, ver_t);
-                OUTMSG(("%V", u.vers));
-                break;
-            case 'd':
-            default:
-                u.i = va_arg(args, int);
-                OUTMSG(("%d", u.i));
-                break;
-        }
-        OUTMSG(("\""));
-    }
-
-    if (data) {
-        OUTMSG((">"));
-        rc = reportData1(data);
-        if (close)
-        {   OUTMSG(("</%s", name)); }
-    }
-    else if (open && close)
-    {   OUTMSG(("/")); }
-
-    OUTMSG((">"));
-    if (eol)
-    {   OUTMSG(("\n")); }
-
-    return rc;
-}
-
-static void CC report(uint32_t indent, const char* name, uint32_t count, ...) {
-     va_list args;
-     va_start(args, count);
-     reportImpl(indent, true, true, true, name, NULL, count, args);
-     va_end(args);
-}
-
-static
-void CC reportData(uint32_t indent, const char* name, const char* data, uint32_t count, ...)
-{
-    va_list args;
-    va_start(args, count);
-    reportImpl(indent, true, true, true, name, data, count, args);
-    va_end(args);
-}
-
-static void CC reportOpen(uint32_t indent, const char* name, uint32_t count, ...) {
-    va_list args;
-    va_start(args, count);
-    reportImpl(indent, true, false, true, name, NULL, count, args);
-    va_end(args);
-}
-
-static void CC reportClose(uint32_t indent, const char* name)
-{   reportImpl(indent, false, true, true, name, NULL, 0, NULL); }
-
-static void CC reportError(uint32_t indent, rc_t rc, const char* function) {
-    report(indent, "Error", 2,
-         "rc"      , 'R', rc,
-         "function", 's', function);
-}
-
-static void CC reportErrorStrImpl(uint32_t indent, rc_t rc,
-    const char* function, const char* name, const char* val, bool eol)
-{
-    int sign = eol ? 1 : -1;
-    if (rc || function) {
-        if (name != NULL || val != NULL) {
-            report(indent, "Error", sign * 3,
-                "rc", 'R', rc,
-                "function", 's', function,
-                name, 's', val);
-        }
-        else {
-            report(indent, "Error", sign * 2,
-                "rc", 'R', rc,
-                "function", 's', function);
-        }
-    }
-    else {
-        report(indent, "Error", sign,
-            name, 's', val);
-    }
-}
-
-static void CC reportErrorStr(uint32_t indent, rc_t rc, const char* function,
-    const char* name, const char* val)
-{   reportErrorStrImpl(indent, rc, function, name, val, true); }
-
-static void CC reportErrorStrInt(uint32_t indent, rc_t rc, const char* function,
-    const char* names, const char* vals, const char* namei, uint32_t vali)
-{
-    report(indent, "Error", 4,
-        "rc"      , 'd', rc,
-        "function", 's', function,
-        names     , 's', vals,
-        namei     , 'd', vali);
-}
-
-static void CC reportError3Str(uint32_t indent, rc_t rc, const char* function,
-    const char* name, const char* v1, const char* v2, const char* v3,
-    bool eol)
-{
-    char* buffer = malloc(strlen(v1) + strlen(v2) + strlen(v3) + 1);
-    if (buffer) {
-        sprintf(buffer, "%s%s%s", v1, v2, v3);
-        reportErrorStrImpl(indent, rc, function, name, buffer, eol);
-        free(buffer);
-    }
-}
-
-static ReportFuncs report_funcs =
-{
-    report,
-    reportData,
-    reportData1,
-    reportOpen,
-    reportOpen1,
-    reportClose,
-    reportClose1,
-    reportError,
-    reportErrorStr,
-    reportErrorStrImpl,
-    reportErrorStrInt,
-    reportError3Str
-};
-
-static rc_t ReportRun(int indent, rc_t rc_in) {
-    rc_t rc = 0;
-
-    const char tag[] = "Run";
-
-    Report* self = NULL;
-    ReportGet(&self);
-    if (self == NULL) {
-        return rc;
-    }
-
-    reportOpen(indent, tag, 0);
-
-    {
-        KTime kt;
-        const char tag[] = "Date";
-        reportOpen(indent + 1, tag, 0);
-        KTimeLocal(&kt, self->start);
-        report(indent + 2, "Start", 1, "value", 'T', &kt);
-        KTimeLocal(&kt, KTimeStamp());
-        report(indent + 2, "End"  , 1, "value", 'T', &kt);
-        reportClose(indent + 1, tag);
-    }
-
-    {
-        const char* name = "HOME";
-        const char* val = getenv(name);
-        if (val == NULL) {
-            name = "USERPROFILE";
-            val = getenv(name);
-        }
-        if (val == NULL)
-        {   name = val = "not found"; }
-        report(indent + 1, "Home", 2, "name", 's', name, "value", 's', val);
-    }
-
-    if ( self -> report_cwd != NULL )
-        rc = ( * self -> report_cwd ) ( & report_funcs, indent + 1 );
-
-    {
-        const char tag[] = "CommandLine";
-        int i = 0;
-        reportOpen(indent + 1, tag, 1, "argc", 'd', self->argc);
-        for (i = 0; i < self->argc; ++i) {
-            if (self->argv && self->argv[i]) {
-                report(indent + 2, "Arg", 2, "index", 'd', i,
-                    "value", 's', self->argv[i]);
-            }
-        }
-        reportClose(indent + 1, tag);
-    }
-
-    report(indent + 1, "Result", 1, "rc", 'R', rc_in);
-
-    report(indent + 1, "User", 1,
-        "admin", 's', is_iser_an_admin() ? "true" : "false");
-
-    reportClose(indent, tag);
-
-    return rc;
-}
-
-static rc_t ReportEnv(int indent) {
-    rc_t rc = 0;
-
-    const char tag[] = "Env";
-
-    const char *env_list[] = {
-        "KLIB_CONFIG",
-        "VDBCONFIG",
-        "VDB_CONFIG",
-        ENV_KRYPTO_PWFILE
-    };
-
-    int i = 0;
-
-    reportOpen(indent, tag, 0);
-
-    for (i = 0; i < sizeof env_list / sizeof env_list[0]; ++i) {
-        const char *val = getenv(env_list[i]);
-        if (val != NULL) {
-            report(indent + 1, env_list[i], 1, "value", 's', val);
-        }
-    }
-
-    reportClose(indent, tag);
-
-    return rc;
-}
-
-/* Silence
- *  tell report to be silent at exit
- *  useful especially in response to ^C
- */
-LIB_EXPORT void CC ReportSilence ( void )
-{
-    Report* self = NULL;
-    ReportGet(&self);
-    if ( self != NULL )
-        self -> silence = true;
-}
-
-static rc_t reportToFileSet(const Report* self,
-    KWrtHandler* old_handler, const char* name, bool* to_file)
-{
-    rc_t rc = 0;
-    assert(self && to_file);
-    if (self->report_redirect) {
-        rc = (*self->report_redirect)(old_handler, name, to_file, false);
-    }
-    return rc;
-}
-
-static rc_t reportToStdErrSet(const Report* self, KWrtHandler* old_handler) {
-    rc_t rc = 0;
-    assert(self);
-    if (self->report_redirect) {
-        rc = (*self->report_redirect)(old_handler, NULL, NULL, false);
-    }
-    return rc;
-}
-
-/* Finalize:
- * If (rc_in != 0) then report environment information.
- * Then clean itself.
- *
- * When "--" OPTION_REPORT "always" command line argument is passed
- * then the report [usually] goes to strerr.
- *
- * When aForce == true then the report goes to strout:
- * it is done to insert it into test-sra output.
- */
-static rc_t _ReportFinalize
-    (rc_t rc_in, bool aForce, uint32_t configNodesSkipCount, ...)
-{
-    rc_t rc = 0;
-
-    va_list args;
-
-    const char* report_arg = NULL;
-
-    bool force = rc_in != 0;
-
-    Report* self = NULL;
-    ReportGet(&self);
-
-    if (self == NULL) {
-        return rc;
-    }
-
-    va_start(args, configNodesSkipCount);
-
-    if (GetRCTarget(rc_in) == rcArgv) {
-        force = false;
-    }
-    else {
-        bool wasDbOrTableSet = true;
-        if (self->report_vdb != NULL) {
-            (*self->report_vdb)(&report_funcs, 0, NULL, &wasDbOrTableSet);
-            if (!wasDbOrTableSet) {
-                force = false;
-            }
-        }
-    }
-
-    if (!force && aForce) {
-        force = true;
-        self -> silence = false;
-    }
-
-    if (self->argv) {
-        int i = 0;
-        for (i = 1; i < self->argc; ++i) {
-            if (strcmp("--" OPTION_REPORT, self->argv[i]) == 0) {
-                if (i + 1 < self->argc) {
-                    report_arg = self->argv[i + 1];
-                }
-                break;
-            }
-        }
-    }
-
-    if (report_arg && strcmp("always", report_arg) == 0) {
-        force = true;
-        self -> silence = false;
-    }
-
-    if (!self -> silence) {
-        if (force) { 
-            if (report_arg && strcmp("never", report_arg) == 0) {
-                force = false;
-            }
-        }
-/*                              PLOGERR(klogErr, (klogErr,
-                               RC(rcApp, rcArgv, rcParsing, rcRange, rcInvalid),
-                               "report type '$(type)' is unrecognized",
-                               "type=%s", self->argv[i + 1]));*/
-
-        if (force) {
-            if (self->hasZombies && !aForce) {
-                KOutHandlerSetStdErr();
-                if (self->object.ptr != NULL) {
-                    OUTMSG(("\nThe archive '%s' may be truncated: "
-                        "Please download it again.\n", self->object.ptr));
-                }
-                else {
-                    OUTMSG(("\nThe archive may be truncated: "
-                        "Please download it again.\n"));
-                }
-            }
-            else {
-                int indent = 0;
-                const char tag[] = "Report";
-
-                char path[PATH_MAX + 1] = "";
-                bool to_file = false;
-                KWrtHandler old_handler;
-                if (rc_in == 0) {
-                    if (!aForce) {
-                        reportToStdErrSet(self, &old_handler);
-                    }
-                }
-                else {
-                    rc_t rc2 = 0;
-                    const char name[] = "ncbi_error_report.xml";
-                    const char* home = getenv("HOME");
-                    if (home == NULL) {
-                        home = getenv("USERPROFILE");
-                    }
-                    if (home) {
-                        size_t num_writ = 0;
-                        rc2 = string_printf
-                            (path, sizeof path, &num_writ, "%s/%s", home, name);
-                        assert(num_writ < sizeof path);
-                    }
-                    if (rc2 != 0 || home == NULL) {
-                        size_t num_writ = 0;
-                        rc2 = string_printf
-                            (path, sizeof path, &num_writ, "%s", name);
-                        assert(num_writ < sizeof path);
-                        assert(rc2 == 0);
-                    }
-                    reportToFileSet(self, &old_handler, path, &to_file);
-                }
-                if (!to_file && rc_in) {
-                    OUTMSG((
-"\n"
-"=============================================================\n"
-"An error occurred during processing.\n"
-"If the problem persists, you may consider sending the following XML document\n"
-"to 'sra at ncbi.nlm.nih.gov' for assistance.\n"
-"=============================================================\n\n"));
-                }
-
-                reportOpen(indent, tag, 0);
-
-                {
-                    rc_t rc2 = ReportRun(indent + 1, rc_in);
-                    if (rc == 0 && rc2 != 0)
-                    {   rc = rc2; }
-                }
-
-                if ( self -> report_config != NULL )
-                {
-                    rc_t rc2 = ( * self -> report_config ) ( & report_funcs,
-                        indent + 1, configNodesSkipCount, args );
-                    if (rc == 0 && rc2 != 0)
-                    {   rc = rc2; }
-                }
-
-                if (self -> report_vdb != NULL) {
-                    rc_t rc2 = (*self->report_vdb)
-                        (&report_funcs, indent + 1, self -> object . ptr, NULL);
-                    if (rc == 0 && rc2 != 0) {
-                        rc = rc2;
-                    }
-                }
-
-                if ( self -> report_software != NULL )
-                {
-                    const char *argv_0 = self -> argv ? self -> argv [ 0 ] : "";
-                    rc_t rc2 = ( * self -> report_software )
-                        ( & report_funcs, indent + 1,
-                            argv_0, self -> date, self -> tool_ver );
-                    if (rc == 0 && rc2 != 0)
-                    {   rc = rc2; }
-                }
-
-                {
-                    rc_t rc2 = ReportEnv(indent + 1);
-                    if (rc == 0 && rc2 != 0)
-                    {   rc = rc2; }
-                }
-
-                if (self->hasZombies) {
-                    OUTMSG(("\nOne of archives may be truncated: "
-                        "It should be redownloaded.\n"));
-                }
-
-                reportClose(indent, tag);
-                reportData1("\n");
-
-                if (to_file) {
-                    KOutHandlerSetStdErr();
-                    OUTMSG((
-"\n"
-"=============================================================\n"
-"An error occurred during processing.\n"
-"A report was generated into the file '%s'.\n"
-"If the problem persists, you may consider sending the file\n"
-"to 'sra at ncbi.nlm.nih.gov' for assistance.\n"
-"=============================================================\n\n", path));
-                }
-            }
-        }
-    }
-
-    ReportRelease();
-
-    va_end(args);
-
-    return rc;
-}
-
-/* Finalize:
- * If (rc_in != 0) then report environment information.
- * Then clean itself.
- */
-LIB_EXPORT rc_t CC ReportFinalize(rc_t rc_in) {
-    return _ReportFinalize(rc_in, false, 0);
-}
-
-LIB_EXPORT rc_t CC ReportForceFinalize(void) {
-    return _ReportFinalize(0, true, 1, "VDBCOPY");
-}
-
-static
-char **copy_argv ( int argc, char **argv )
-{
-    char **argv2 = calloc ( argc, sizeof * argv2 );
-    if (argv2 != NULL) {
-        int i = 0;
-        for (i = 0; i < argc; ++i) {
-            argv2[i] = string_dup_measure(argv[i], NULL);
-        }
-    }
-    return argv2;
-}
-
-/* Init: initialize with common information */
-LIB_EXPORT void CC ReportInit(int argc, char* argv[], ver_t tool_version)
-{
-    static bool latch;
-    if ( ! latch )
-    {
-        /* comes pre-zeroed by runtime */
-        static Report self;
-
-        /* initialize with non-zero parameters */
-        self.start = KTimeStamp();
-        self.argc = argc;
-        self.argv = copy_argv ( argc, argv );
-        self.date = __DATE__;
-        self.tool_ver = tool_version;
-        self.silence = false;
-
-        /* export to the remainder of the source */
-        report_singleton . ptr = & self;
-
-        latch = true;
-    }
-}
-
-
-/* BuildDate
- *  set the build date of the tool
- *
- *  "date" [ IN ] - pre-processor __DATE__
- */
-LIB_EXPORT void CC ReportBuildDate ( const char *date )
-{
-    Report* self = NULL;
-    ReportGet(&self);
-    if ( self != NULL )
-        self -> date = date;
-}
-
-
-/* InitCWD
- */
-LIB_EXPORT void CC ReportInitKFS (
-    rc_t ( CC * report_cwd ) ( const ReportFuncs *f, uint32_t indent ),
-    rc_t ( CC * report_redirect ) ( KWrtHandler* handler,
-        const char* filename, bool* to_file, bool finalize ) )
-{
-    Report* self = NULL;
-    ReportGet(&self);
-    if ( self != NULL ) {
-        self -> report_redirect = report_redirect;
-        self -> report_cwd = report_cwd;
-    }
-}
-
-
-/* InitConfig
- */
-LIB_EXPORT const char* CC ReportInitConfig ( rc_t ( CC * report )
-    ( const ReportFuncs *f, uint32_t indent,
-      uint32_t configNodesSkipCount, va_list args ) )
-{
-    Report* self = NULL;
-    ReportGet(&self);
-    if ( self != NULL )
-    {
-        self -> report_config = report;
-        return self -> argv [ 0 ];
-    }
-    return NULL;
-}
-
-/* InitVDB
- */
-LIB_EXPORT rc_t CC ReportInitVDB(
-    ReportObj *report_obj, ReportSoftware *report_software, Whack *whack)
-{
-    Report* self = NULL;
-    rc_t rc = ReportGet(&self);
-    if ( rc == 0 && self)
-    {
-        self -> report_vdb = report_obj;
-        self -> report_software = report_software;
-        self -> whack_vdb = whack;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC ReportResetObject(const char* path)
-{
-    Report* self = NULL;
-
-    if ( path == NULL )
-        path = "NULL";
-    else if ( path [ 0 ] == 0 )
-        path = "EMPTY";
-
-    ReportGet(&self);
-    if (self == NULL) {
-        return 0;
-    }
-
-    return ReportReplaceObjectPtr(self, path);
-}
-
-LIB_EXPORT void CC ReportRecordZombieFile(void)
-{
-    Report* self = NULL;
-    ReportGet(&self);
-    if (self == NULL)
-    {   return; }
-    self->hasZombies = true;
-}
diff --git a/libs/klib/sra-release-version.c b/libs/klib/sra-release-version.c
deleted file mode 100644
index c712d74..0000000
--- a/libs/klib/sra-release-version.c
+++ /dev/null
@@ -1,329 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/printf.h> /* string_printf */
-#include <klib/rc.h>
-#include <klib/sra-release-version.h>
-
-#include "release-vers.h"
-
-#include <ctype.h> /* isdigit */
-#include <os-native.h>
-#include <string.h> /* memset */
-#include <assert.h>
-
-LIB_EXPORT rc_t CC SraReleaseVersionGet(SraReleaseVersion *version) {
-    if (version == NULL) {
-        return RC(rcRuntime, rcArgv, rcAccessing, rcParam, rcNull);
-    }
-
-    version->version = RELEASE_VERS;
-    version->revision = RELEASE_REVISION;
-
-    switch (RELEASE_TYPE) {
-        case 'a':
-            version->type = eSraReleaseVersionTypeAlpha;
-            break;
-        case 'b':
-            version->type = eSraReleaseVersionTypeBeta;
-            break;
-        case 'c':
-            version->type = eSraReleaseVersionTypeRC;
-            break;
-        default:
-            version->type = eSraReleaseVersionTypeFinal;
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC SraReleaseVersionCmp(const SraReleaseVersion *self,
-    const SraReleaseVersion *version2, int32_t *result)
-{
-    if (result == NULL) {
-        return RC(rcRuntime, rcArgv, rcAccessing, rcParam, rcNull);
-    }
-
-    *result = 0;
-
-    if (self == NULL) {
-        return RC(rcRuntime, rcArgv, rcAccessing, rcSelf, rcNull);
-    }
-
-    if (version2 == NULL) {
-        return RC(rcRuntime, rcArgv, rcAccessing, rcParam, rcNull);
-    }
-
-    if (self->version < version2->version) {
-        *result = 1;
-    }
-    else if (self->version > version2->version) {
-        *result = -1;
-    }
-    else if (self->type < version2->type) {
-        *result = 1;
-    }
-    else if (self->type > version2->type) {
-        *result = -1;
-    }
-    else if (self->revision < version2->revision) {
-        *result = 1;
-    }
-    else if (self->revision > version2->revision) {
-        *result = -1;
-    }
-    else {
-        *result = 0;
-    }
-
-    return 0;
-}
-
-static int32_t getdigit(const char **s, size_t *size, int32_t max) {
-    int32_t d = 0;
-    char c = 0;
-
-    assert(s && size);
-
-    if (*size == 0) {
-        return 0;
-    }
-
-    c = **s;
-    if (!isdigit(c)) {
-        if (c == '\n') {
-            return 0;
-        }
-        else {
-            return -1;
-        }
-    }
-
-    while (*size > 0) {
-        char c = **s;
-        if (isdigit(c)) {
-            d = d * 10 + c - '0';
-        }
-        else {
-            break;
-        }
-        ++(*s);
-        --*size;
-    }
-
-    if (max > 0 && d > max) {
-        return -2;
-    }
-
-    return d;
-}
-
-#define SET_RC(i) ( \
-    (i) == -1 ? RC(rcRuntime, rcFile, rcReading, rcFile, rcInvalid) \
-              : RC(rcRuntime, rcFile, rcReading, rcNumeral, rcExcessive) )
-
-/* Parse
- *  Initialize SraReleaseVersion from char version[size]
- */
-LIB_EXPORT rc_t CC SraReleaseVersionInit ( SraReleaseVersion *self,
-    const char *version, size_t size )
-{
-    rc_t rc = 0;
-    int32_t major = 0, minor = 0, release = 0, revision = 0, i = 0,
-        type = eSraReleaseVersionTypeFinal; 
-    const char *p = version;
-
-    if (self == NULL) {
-        return RC(rcRuntime, rcArgv, rcAccessing, rcSelf, rcNull);
-    }
-
-    assert(self);
-    memset(self, 0, sizeof *self);
-
-    self->type = eSraReleaseVersionTypeFinal;
-
-    if (size == 0) {
-        return 0;
-    }
-
-    /* major: 1. */
-    if (size > 0 && rc == 0) {
-        int32_t i = getdigit(&p, &size, 255);
-        if (i >= 0) {
-            major = i;
-        }
-        else {
-            rc = SET_RC(i);
-        }
-    }
-
-    /* minor: 1.2 */
-    if (size > 0 && rc == 0 && *p != '\n') {
-        if (*p != '.' && *p != '-') {
-            rc = RC(rcRuntime, rcFile, rcReading, rcFile, rcInvalid);
-        }
-        if (*p == '.') {
-            ++p;
-            --size;
-            i = getdigit(&p, &size, 255);
-            if (i >= 0) {
-                minor = i;
-            }
-            else {
-                rc = SET_RC(i);
-            }
-        }
-    }
-
-    /* release: 1.2.3 */
-    if (size > 0 && rc == 0 && *p != '\n') {
-        if (*p != '.' && *p != '-') {
-            rc = RC(rcRuntime, rcFile, rcReading, rcFile, rcInvalid);
-        }
-        if (*p == '.') {
-            ++p;
-            --size;
-            i = getdigit(&p, &size, 0xFFFF);
-            if (i >= 0) {
-                release = i;
-            }
-            else {
-                rc = SET_RC(i);
-            }
-        }
-    }
-
-    /* dash: 1.2.3- */
-    if (size > 0 && rc == 0 && *p != '\n') {
-        if (*p != '-') {
-            rc = RC(rcRuntime, rcFile, rcReading, rcFile, rcInvalid);
-        }
-        ++p;
-        --size;
-    }
-
-    /* type: 1.2.3-a 1.2.3-rc */
-    if (size > 0 && rc == 0 && *p != '\n') {
-        if (!isalpha(*p)) {
-            if (!isdigit(*p)) {
-                rc = RC(rcRuntime, rcFile, rcReading, rcFile, rcInvalid);
-            }
-        }
-        else {
-            switch (*p) {
-                case 'a':
-                    type = eSraReleaseVersionTypeAlpha;
-                    break;
-                case 'b':
-                    type = eSraReleaseVersionTypeBeta;
-                    break;
-                case 'r':
-                    type = eSraReleaseVersionTypeRC;
-                    ++p;
-                    --size;
-                    if (size == 0) {
-                        rc = RC(rcRuntime,
-                            rcFile, rcReading, rcFile, rcInvalid);
-                    }
-                    else if (*p != 'c') {
-                        rc = RC(rcRuntime,
-                            rcFile, rcReading, rcFile, rcInvalid);
-                    }
-                    break;
-            }
-            ++p;
-            --size;
-        }
-    }
-
-    /* revision: 1.2.3-4 1.2.3-b4 1.2.3-rc4 */
-    if (size > 0 && rc == 0 && *p != '\n') {
-        i = getdigit(&p, &size, 0);
-        if (i >= 0) {
-            revision = i;
-        }
-        else {
-            rc = SET_RC(i);
-        }
-    }
-
-    if (size > 0 && rc == 0 && *p != '\n') {
-        rc = RC(rcRuntime, rcFile, rcReading, rcFile, rcInvalid);
-    }
-
-    if (rc == 0) {
-        self->version = (major << 24) + (minor << 16) + release;
-        self->revision = revision;
-        self->type = type;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SraReleaseVersionPrint ( const SraReleaseVersion *self,
-    char *version, size_t size, size_t *num_writ )
-{
-    rc_t rc = 0;
-    const char *type = "";
-
-    if (self == NULL) {
-        return RC(rcRuntime, rcArgv, rcAccessing, rcSelf, rcNull);
-    }
-
-    switch (self->type) {
-        case eSraReleaseVersionTypeAlpha:
-            type = "-a";
-            break;
-        case eSraReleaseVersionTypeBeta:
-            type = "-b";
-            break;
-        case eSraReleaseVersionTypeRC:
-            type = "-rc";
-            break;
-        case eSraReleaseVersionTypeFinal:
-            if (self->revision == 0) {
-                type = "";
-            }
-            else {
-                type = "-";
-            }
-            break;
-        default:
-            assert(0);
-            break;
-    }
-
-    if (self->revision == 0) {
-        rc = string_printf(version, size, num_writ,
-            "%.3V%s", self->version, type);
-    }
-    else {
-        rc = string_printf(version, size, num_writ,
-            "%V%s%d", self->version, type, self->revision);
-    }
-
-    return rc;
-}
diff --git a/libs/klib/status-rc-strings.c b/libs/klib/status-rc-strings.c
deleted file mode 100644
index f890b0d..0000000
--- a/libs/klib/status-rc-strings.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <sysalloc.h>
-
-#define PASTE2(a,b) a##b
-#define STRINGIFY(a) #a
-#define RC_ENUM(type) const char * PASTE2(type,Strings)[] =
-#define RC_ENTRY(a,b) STRINGIFY(a),
-#define RC_VLAST(a)
-#define RC_LAST(a) "INVALID"
-
-#define RC_EMIT 0
-
-#include <klib/rc.h>
-
diff --git a/libs/klib/status-rc.c b/libs/klib/status-rc.c
deleted file mode 100644
index 73f7730..0000000
--- a/libs/klib/status-rc.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include "writer-priv.h"
-#include <klib/writer.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <os-native.h> /* for strchrnul on non-linux */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <assert.h>
-
-size_t KWrtFmt_rc_t ( char * pout, size_t max, const char * fmt, rc_t rc_in )
-{
-    rc_t rc;
-    const char * str;
-    const char * mod_str;
-    const char * targ_str;
-    const char * ctx_str;
-    const char * obj_str;
-    const char * state_str;
-    size_t needed;
-    size_t mod_size;
-    size_t targ_size;
-    size_t ctx_size;
-    size_t obj_size;
-    size_t state_size;
-    enum RCModule mod;
-    enum RCTarget targ;
-    enum RCContext ctx;
-    int obj;
-    enum RCState state;
-
-    assert (pout);
-    assert (fmt);
-
-    if (*fmt == '#')
-        rc = RCExplain (rc_in, pout, max, &needed);
-
-    else if (rc_in != 0)
-    {
-        mod = GetRCModule (rc_in);
-        targ = GetRCTarget (rc_in);
-        ctx = GetRCContext (rc_in);
-        obj = GetRCObject (rc_in);
-        state = GetRCState (rc_in);
-
-        if ((mod < 0) || (mod > rcLastModule_v1_1))
-            mod = rcLastModule_v1_1;
-
-        if ((targ < 0) || (targ > rcLastTarget_v1_1))
-            targ = rcLastTarget_v1_1;
-
-        if ((ctx < 0) || (ctx > rcLastContext_v1_1))
-            ctx = rcLastContext_v1_1;
-
-        if ((obj < 0) || (obj > rcLastObject_v1_1))
-            obj = rcLastObject_v1_1;
-
-        if ((state < 0) || (state > rcLastState_v1_1))
-            state = rcLastState_v1_1;
-
-        mod_str = RCModuleStrings[mod];
-        str = strchrnul(mod_str, ' ');
-        mod_size = str - mod_str;
-
-        targ_str = RCTargetStrings[targ];
-        str = strchrnul(targ_str, ' ');
-        targ_size = str - targ_str;
-
-        ctx_str = RCContextStrings[ctx];
-        str = strchrnul(ctx_str, ' ');
-        ctx_size = str - ctx_str;
-
-/* object is tricky because it overlaps target */
-        if (obj == 0)
-        {
-            obj_str = RCObjectStrings[obj];
-            str = strchrnul(obj_str, ' ');
-            obj_size = str - obj_str;
-        }
-        else if (obj < rcLastTarget_v1_1)
-        {
-            obj_str = RCTargetStrings[obj];
-            str = strchrnul(obj_str, ' ');
-            obj_size = str - obj_str;
-        }
-        else
-        {
-            obj -= (rcLastTarget_v1_1-1);
-            obj_str = RCObjectStrings[obj];
-            str = strchrnul(obj_str, ' ');
-            obj_size = str - obj_str;
-        }
-
-        state_str = RCStateStrings[state];
-        str = strchrnul(state_str, ' ');
-        state_size = str - state_str;
-
-#if _DEBUGGING
-        rc = string_printf (pout, max, & needed, "RC(%s:%u:%s %*s,%*s,%*s,%*s,%*s)", 
-                            GetRCFilename(), GetRCLineno(), GetRCFunction(),
-                           (uint32_t)mod_size, mod_str,
-                           (uint32_t)targ_size, targ_str,
-                           (uint32_t)ctx_size, ctx_str,
-                           (uint32_t)obj_size, obj_str,
-                           (uint32_t)state_size, state_str);
-#else
-        rc = string_printf (pout, max, & needed, "RC(%*s,%*s,%*s,%*s,%*s)", 
-                           (uint32_t)mod_size, mod_str,
-                           (uint32_t)targ_size, targ_str,
-                           (uint32_t)ctx_size, ctx_str,
-                           (uint32_t)obj_size, obj_str,
-                           (uint32_t)state_size, state_str);
-#endif
-    }
-    else
-    {
-        state = GetRCState (rc_in);
-        state_str = RCStateStrings[state];
-        str = strchrnul(state_str, ' ');
-        state_size = str - state_str;
-        rc = string_printf (pout, max, & needed, "RC(%*s)",
-                           (uint32_t)state_size, state_str);
-    }
-
-    return rc != 0 ? 0 : needed;
-}
diff --git a/libs/klib/status.c b/libs/klib/status.c
deleted file mode 100644
index e54b6b9..0000000
--- a/libs/klib/status.c
+++ /dev/null
@@ -1,436 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*/
-
-#include <klib/extern.h>
-#include <klib/status.h>
-#include "writer-priv.h"
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <va_copy.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-static KStsLevel G_sts_level = 0;
-
-static KWrtHandler G_sts_handler;
-static KWrtHandler G_sts_lib_handler;
-
-static KFmtHandler G_sts_formatter;
-static KStsFmtFlags G_sts_formatter_flags;
-static KFmtHandler G_sts_lib_formatter;
-static KStsFmtFlags G_sts_lib_formatter_flags;
-
-static
-rc_t CC KStsDefaultFormatter( void* self, KWrtHandler* writer,
-                              size_t argc, const wrt_nvp_t args[],
-                              size_t envc, const wrt_nvp_t envs[] )
-{
-    rc_t rc = 0;
-    size_t num_writ, nsize;
-    uint32_t mlen;
-    char buffer[8192], *nbuffer;
-    const char* msg, *mend;
-
-    /* if writer is null than silence */
-    if( writer == NULL || writer->writer == NULL ) {
-        return rc;
-    }
-    msg = wrt_nvp_find_value(envc, envs, "message");
-    if( msg != NULL ) {
-        mend = msg + strlen(msg);
-        /* strip trailing newlines */
-        while( mend != msg && (*mend == '\n' || *mend == '\r') ) {
-            --mend;
-        }
-        mlen = ( uint32_t ) ( mend - msg );
-    } else {
-        mlen = 0;
-    }
-
-    nbuffer = buffer;
-    nsize = sizeof(buffer);
-    do {
-        rc = string_printf(nbuffer, nsize, & num_writ, "%s %s.%s: %.*s\n",
-                                 wrt_nvp_find_value(envc, envs, "timestamp"),
-                                 wrt_nvp_find_value(envc, envs, "app"),
-                                 wrt_nvp_find_value(envc, envs, "version"),
-                                 ( uint32_t ) mlen, msg);
-        if( num_writ > nsize ) {
-            assert ( nbuffer == buffer );
-            nbuffer = malloc(nsize = num_writ + 2);
-            if( nbuffer == NULL ) {
-                rc = RC(rcRuntime, rcLog, rcLogging, rcMemory, rcExhausted);
-                break;
-            }
-            continue;
-        }
-        /* replace newlines with spaces, excluding last one */
-        for(nsize = 0; nsize < num_writ - 1; nsize++) {
-            if( nbuffer[nsize] == '\n' || nbuffer[nsize] == '\r' ) {
-                nbuffer[nsize] = ' ';
-            }
-        }
-        break;
-    } while(true);
-    if( rc == 0 ) {
-        rc = LogFlush(writer, nbuffer, num_writ);
-    }
-    if( nbuffer != buffer ) {
-        free(nbuffer);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KStsInit ( void )
-{
-    rc_t rc;
-    
-    G_sts_level = 0;
-    rc = KStsHandlerSetStdOut();
-
-    if (rc == 0)
-        rc = KStsLibHandlerSet(NULL, NULL);
-
-    if (rc == 0)
-        rc = KStsFmtHandlerSetDefault();
-
-    if (rc == 0)
-        rc = KStsLibFmtHandlerSetDefault();
-
-    return rc;
-}
-
-static
-rc_t CC sts_print(KFmtHandler* formatter, const KStsFmtFlags flags, KWrtHandler* writer, const char* msg, va_list args)
-{
-    rc_t rc = 0;
-    char* nbuffer;
-    size_t num_writ, remaining;
-
-    uint32_t envc = 0;
-    wrt_nvp_t envs[5];
-    char ebuffer[2048];
-    char mbuffer[2048];
-    KFmtWriter fmtwrt;
-
-    assert(formatter != NULL);
-    assert(writer != NULL);
-
-    fmtwrt = formatter->formatter;
-    if( fmtwrt == NULL ) {
-        fmtwrt = KStsDefaultFormatter;
-    }
-    if( fmtwrt == KStsDefaultFormatter && writer->writer == NULL ) {
-        /* default formatting with NULL writer -> silence */
-        return rc;
-    }
-    nbuffer = (char*)ebuffer;
-    remaining = sizeof(ebuffer);
-    do {
-#define FIX_UP() if(rc){break;} remaining -= num_writ; nbuffer += num_writ
-        if( flags & (kstsFmtTimestamp | kstsFmtLocalTimestamp) ) {
-            if( flags & kstsFmtLocalTimestamp ) {
-                rc = LogSimpleTimestamp(nbuffer, remaining, &num_writ);
-            } else {
-                rc = LogTimestamp(nbuffer, remaining, &num_writ);
-            }
-            nbuffer[num_writ++] = '\0';
-            envs[envc].name = "timestamp";
-            envs[envc++].value = nbuffer;
-            FIX_UP();
-        }
-        if( flags & kstsFmtPid ) {
-            rc = LogPID(nbuffer, remaining, &num_writ);
-            nbuffer[num_writ++] = '\0';
-            envs[envc].name = "pid";
-            envs[envc++].value = nbuffer;
-            FIX_UP();
-        }
-        if( flags & kstsFmtAppName ) {
-            rc = LogAppName(nbuffer, remaining, &num_writ);
-            nbuffer[num_writ++] = '\0';
-            envs[envc].name = "app";
-            envs[envc++].value = nbuffer;
-            FIX_UP();
-        }
-        if( flags & kstsFmtAppVersion ) {
-            rc = LogAppVersion(nbuffer, remaining, &num_writ);
-            nbuffer[num_writ++] = '\0';
-            envs[envc].name = "version";
-            envs[envc++].value = nbuffer;
-            FIX_UP();
-        }
-#undef FIX_UP
-    } while(false);
-    /* env must have one spare element for message added text below */
-    if( rc == 0 && envc >= (sizeof(envs)/sizeof(envs[0])) ) {
-        rc = RC(rcRuntime, rcLog, rcLogging, rcTable, rcInsufficient);
-    }
-    nbuffer = (char*)mbuffer;
-    remaining = sizeof(mbuffer);
-
-    if( rc == 0 ) {
-        if( flags & kstsFmtMessage ) {
-            if( msg == NULL || msg[0] == '\0' ) {
-                msg = "empty status message";
-            }
-            do {
-                va_list args_copy;
-                va_copy(args_copy, args);
-                rc = string_vprintf(nbuffer, remaining, &num_writ, msg, args_copy);
-                va_end(args_copy);
-                if( num_writ > remaining ) {
-                    if(nbuffer != mbuffer) {
-                        free(nbuffer);
-                    }
-                    nbuffer = malloc(remaining = num_writ);
-                    if( nbuffer == NULL ) {
-                        rc = RC(rcRuntime, rcLog, rcLogging, rcMemory, rcExhausted);
-                    }
-                } else {
-                    if( rc == 0 ) {
-                        envs[envc].name = "message";
-                        envs[envc++].value = nbuffer;
-                    }
-                    break;
-                }
-            } while( rc == 0 );
-        }
-    }
-    if( rc != 0 ) {
-        /* print reason for failure */
-        rc = string_printf((char*)mbuffer, sizeof(mbuffer), NULL, "status failure: %R in '%s'", rc, msg);
-        envs[envc].name = "message";
-        envs[envc++].value = mbuffer;
-    }
-    wrt_nvp_sort(envc, envs);
-    rc = fmtwrt(formatter->data, writer, 0, NULL, envc, envs);
-    if(nbuffer != mbuffer) {
-        free(nbuffer);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KStsMsg(const char* msg, ...)
-{
-    rc_t rc;
-    va_list args;
-
-    va_start(args, msg);
-    rc = sts_print(KStsFmtHandlerGet(), G_sts_formatter_flags, KStsHandlerGet(), msg, args);
-    va_end(args);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KStsLibMsg(const char* msg, ...)
-{
-    rc_t rc;
-    va_list args;
-
-    va_start(args, msg);
-    rc = sts_print(KStsLibFmtHandlerGet(), G_sts_lib_formatter_flags, KStsLibHandlerGet(), msg, args);
-    va_end(args);
-    return rc;
-}
-
-LIB_EXPORT KStsLevel CC KStsLevelGet(void)
-{
-    return G_sts_level;
-}
-
-LIB_EXPORT void CC KStsLevelSet(KStsLevel lvl)
-{
-    G_sts_level = lvl;
-}
-
-LIB_EXPORT void CC KStsLevelAdjust(int32_t adjust)
-{
-    int32_t l = KStsLevelGet();
-    l += adjust;
-    KStsLevelSet( l < 0 ? 0 : l);
-}
-
-LIB_EXPORT rc_t CC KStsHandlerSetStdOut ( void )
-{
-    return KStsHandlerSet( KWrt_DefaultWriter, KWrt_DefaultWriterDataStdOut );
-}
-
-LIB_EXPORT rc_t CC KStsLibHandlerSetStdOut ( void )
-{
-    return KStsLibHandlerSet( KWrt_DefaultWriter, KWrt_DefaultWriterDataStdOut );
-}
-
-LIB_EXPORT rc_t CC KStsHandlerSetStdErr ( void )
-{
-    return KStsHandlerSet( KWrt_DefaultWriter, KWrt_DefaultWriterDataStdErr );
-}
-
-LIB_EXPORT rc_t CC KStsLibHandlerSetStdErr ( void )
-{
-    return KStsLibHandlerSet( KWrt_DefaultWriter, KWrt_DefaultWriterDataStdErr );
-}
-
-LIB_EXPORT rc_t CC KStsHandlerSet ( KWrtWriter writer, void * writer_data )
-{
-    G_sts_handler.writer = writer;
-    G_sts_handler.data = writer_data;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KStsLibHandlerSet ( KWrtWriter writer, void * writer_data )
-{
-    G_sts_lib_handler.writer = writer;
-    G_sts_lib_handler.data = writer_data;
-    return 0;
-}
-
-LIB_EXPORT void * CC KStsDataGet ( void )
-{
-    return ( KStsHandlerGet()->data );
-}
-
-LIB_EXPORT void * CC KStsLibDataGet ( void )
-{
-    return ( KStsLibHandlerGet()->data );
-}
-
-LIB_EXPORT KWrtWriter CC KStsWriterGet ( void )
-{
-    return ( KStsHandlerGet()->writer );
-}
-
-LIB_EXPORT KWrtWriter CC KStsLibWriterGet ( void )
-{
-    return ( KStsLibHandlerGet()->writer );
-}
-
-LIB_EXPORT KWrtHandler * CC KStsHandlerGet ( void )
-{
-    return ( &G_sts_handler );
-}
-
-LIB_EXPORT KWrtHandler * CC KStsLibHandlerGet ( void )
-{
-    return ( &G_sts_lib_handler );
-}
-
-static const uint32_t sts_dflt_opt = kstsFmtTimestamp | kstsFmtPid |
-                                     kstsFmtMessage | kstsFmtAppName | kstsFmtAppVersion;
-
-LIB_EXPORT rc_t CC KStsFmtHandlerSetDefault ( void )
-{
-    rc_t rc = KStsFmtHandlerSet(KStsDefaultFormatter, 0, NULL);
-    if( rc == 0 ) {
-        G_sts_formatter_flags = sts_dflt_opt;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KStsLibFmtHandlerSetDefault ( void )
-{
-    rc_t rc = KStsLibFmtHandlerSet(KStsDefaultFormatter, 0, NULL);
-    if( rc == 0 ) {
-        G_sts_lib_formatter_flags = sts_dflt_opt;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KStsFmtFlagsSet ( KStsFmtFlags flags )
-{
-    G_sts_formatter_flags |= flags;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KStsLibFmtFlagsSet ( KStsFmtFlags flags )
-{
-    G_sts_lib_formatter_flags |= flags;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KStsFmtHandlerSet ( KFmtWriter formatter, KStsFmtFlags flags, void* data )
-{
-    if( formatter == NULL ) {
-        return RC(rcRuntime, rcLog, rcLogging, rcFunction, rcNull);
-    }
-    G_sts_formatter.formatter = formatter;
-    G_sts_formatter.data = data;
-    KStsFmtFlagsSet(flags);
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KStsLibFmtHandlerSet ( KFmtWriter formatter, KStsFmtFlags flags, void* data )
-{
-    if( formatter == NULL ) {
-        return RC(rcRuntime, rcLog, rcLogging, rcFunction, rcNull);
-    }
-    G_sts_lib_formatter.formatter = formatter;
-    G_sts_lib_formatter.data = data;
-    KStsLibFmtFlagsSet(flags);
-    return 0;
-}
-
-LIB_EXPORT void * CC KStsFmtDataGet ( void )
-{
-    return ( KStsFmtHandlerGet()->data );
-}
-
-LIB_EXPORT void * CC KStsLibFmtDataGet ( void )
-{
-    return ( KStsFmtHandlerGet()->data );
-}
-
-LIB_EXPORT KFmtWriter CC KStsFmtWriterGet ( void )
-{
-    return ( KStsFmtHandlerGet()->formatter ? KStsFmtHandlerGet()->formatter : KStsDefaultFormatter);
-}
-
-LIB_EXPORT KFmtWriter CC KStsLibFmtWriterGet ( void )
-{
-    return ( KStsLibFmtHandlerGet()->formatter ? KStsLibFmtHandlerGet()->formatter : KStsDefaultFormatter);
-}
-
-LIB_EXPORT KFmtHandler * CC KStsFmtHandlerGet ( void )
-{
-    return ( &G_sts_formatter );
-}
-
-LIB_EXPORT KFmtHandler * CC KStsLibFmtHandlerGet ( void )
-{
-    return ( &G_sts_lib_formatter );
-}
-
-LIB_EXPORT KStsFmtFlags CC KStsFmtFlagsGet ( void )
-{
-    return G_sts_formatter_flags;
-}
-
-LIB_EXPORT KStsFmtFlags CC KStsLibFmtFlagsGet ( void )
-{
-    return G_sts_lib_formatter_flags;
-}
diff --git a/libs/klib/sun/syslog.c b/libs/klib/sun/syslog.c
deleted file mode 100644
index 387f76f..0000000
--- a/libs/klib/sun/syslog.c
+++ /dev/null
@@ -1,208 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include "log-priv.h"
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-
-/* LogTimestamp
- *  generates a timestamp string
- */
-
-LIB_EXPORT rc_t CC LogTimestamp ( char *buffer, size_t bsize, size_t *num_writ )
-{
-    int len;
-    static time_t last_time = 0;
-    static struct tm cal;
-    
-    /* get current time */
-    time_t t = time ( 0 );
-    
-    /* initialize time on first run */
-    if ( ! last_time )
-    {
-        last_time = t;
-        cal = * gmtime ( & last_time );
-    }
-    
-    /* or update if time has passed */
-    else if ( t != last_time )
-    {
-        /* update every 5 minutes or so */
-        time_t dt = t - last_time;
-        last_time = t;
-        if ( dt >= 300 )
-            cal = * gmtime ( & last_time );
-	
-        /* otherwise, just update the struct manually */
-        else
-        {
-            /* advance seconds */
-            dt += cal . tm_sec;
-            cal . tm_sec = ( int ) ( dt % 60 );
-	    
-            /* detect a rolled-over minute */
-            if ( ( dt /= 60 ) != 0 )
-            {
-                /* advance minutes */
-                dt += cal . tm_min;
-                cal . tm_min = ( int ) ( dt % 60 );
-		
-                /* detect a rolled-over hour */
-                if ( ( dt /= 60 ) != 0 )
-                {
-                    /* roll-over of an hour - refetch */
-                    cal = * gmtime ( & last_time );
-                }
-            }
-        }
-    }
-    
-    /* make the timestamp */
-    len = snprintf ( buffer, bsize,
-                     "%04d-%02d-%02dT%02d:%02d:%02d"
-                     , cal . tm_year + 1900
-                     , cal . tm_mon + 1
-                     , cal . tm_mday
-                     , cal . tm_hour
-                     , cal . tm_min
-                     , cal . tm_sec
-        );
-
-    if ( num_writ != NULL )
-        * num_writ = len;
-
-    if ( len < 0 || ( size_t ) len >= bsize )
-    {
-        if ( len < 0 && num_writ != NULL )
-            * num_writ = 0;
-        return RC ( rcApp, rcLog, rcLogging, rcBuffer, rcInsufficient );
-    }
-
-    return 0;
-}
-
-/* LogSimpleTimestamp
- *  generates a local timestamp string without time zone
- */
-LIB_EXPORT rc_t CC LogSimpleTimestamp ( char *buffer, size_t bsize, size_t *num_writ )
-{
-    int len;
-    static time_t last_time = 0;
-    static struct tm cal;
-    
-    /* get current time */
-    time_t t = time ( 0 );
-    
-    /* initialize time on first run */
-    if ( ! last_time )
-    {
-        last_time = t;
-        cal = * localtime ( & last_time );
-    }
-    
-    /* or update if time has passed */
-    else if ( t != last_time )
-    {
-        /* update every 5 minutes or so */
-        time_t dt = t - last_time;
-        last_time = t;
-        if ( dt >= 300 )
-            cal = * localtime ( & last_time );
-
-        /* otherwise, just update the struct manually */
-        else
-        {
-            /* advance seconds */
-            dt += cal . tm_sec;
-            cal . tm_sec = ( int ) ( dt % 60 );
-
-            /* detect a rolled-over minute */
-            if ( ( dt /= 60 ) != 0 )
-            {
-                /* advance minutes */
-                dt += cal . tm_min;
-                cal . tm_min = ( int ) ( dt % 60 );
-
-                /* detect a rolled-over hour */
-                if ( ( dt /= 60 ) != 0 )
-                {
-                    /* roll-over of an hour - refetch */
-                    cal = * localtime ( & last_time );
-                }
-            }
-        }
-    }
-    
-    /* make the timestamp */
-    len = snprintf ( buffer, bsize,
-                     "%04d-%02d-%02dT%02d:%02d:%02d"
-                     , cal . tm_year + 1900
-                     , cal . tm_mon + 1
-                     , cal . tm_mday
-                     , cal . tm_hour
-                     , cal . tm_min
-                     , cal . tm_sec
-        );
-    if ( num_writ != NULL )
-        * num_writ = len;
-
-    if ( len < 0 || ( size_t ) len >= bsize )
-    {
-        if ( len < 0 && num_writ != NULL )
-            * num_writ = 0;
-        return RC ( rcApp, rcLog, rcLogging, rcBuffer, rcInsufficient );
-    }
-
-    return 0;
-}
-
-/* LogPID
- *  generates a process id
- */
-LIB_EXPORT rc_t CC LogPID ( char *buffer, size_t bsize, size_t *num_writ )
-{
-    /* pid_t is signed not unsigned int */
-    int len = snprintf ( buffer, bsize, "%d", getpid () );
-    * num_writ = len;
-    if ( len < 0 || ( size_t ) len >= bsize )
-    {
-        if ( len < 0 )
-            * num_writ = 0;
-        return RC ( rcApp, rcLog, rcLogging, rcBuffer, rcInsufficient );
-    }
-    return 0;
-}
diff --git a/libs/klib/sun/systime.c b/libs/klib/sun/systime.c
deleted file mode 100644
index 08a50c3..0000000
--- a/libs/klib/sun/systime.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/time.h>
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-
-/*--------------------------------------------------------------------------
- * KTime_t
- *  64 bit time_t
- */
-
-
-/* Stamp
- *  current timestamp
- */
-LIB_EXPORT KTime_t CC KTimeStamp ( void )
-{
-    return time ( NULL );
-}
-
-
-/*--------------------------------------------------------------------------
- * KTime
- *  simple time structure
- */
-
-
-/* Make
- *  make KTime from struct tm
- */
-static
-void KTimeMake ( KTime *kt, struct tm const *t )
-{
-    kt -> year = t -> tm_year + 1900;
-    kt -> month = t -> tm_mon;
-    kt -> day = t -> tm_mday - 1;
-    kt -> weekday = t -> tm_wday;
-#if 0
-    kt -> tzoff = ( int16_t ) ( t -> tm_gmtoff / 60 );
-#else
-    kt -> tzoff = 0;
-#endif
-    kt -> hour = ( uint8_t ) t -> tm_hour;
-    kt -> minute = ( uint8_t ) t -> tm_min;
-    kt -> second = ( uint8_t ) t -> tm_sec;
-    kt -> dst = t -> tm_isdst != 0;
-}
-
-
-/* Local
- *  populate "kt" from "ts" in local time zone
- */
-LIB_EXPORT const KTime* CC KTimeLocal ( KTime *kt, KTime_t ts )
-{
-    if ( kt != NULL )
-    {
-        struct tm t;
-        time_t unix_time = ( time_t ) ts;
-        t = * localtime ( & unix_time );
-        KTimeMake ( kt, & t );
-    }
-    return kt;
-}
-
-
-/* Global
- *  populate "kt" from "ts" in GMT
- */
-LIB_EXPORT const KTime* CC KTimeGlobal ( KTime *kt, KTime_t ts )
-{
-    if ( kt != NULL )
-    {
-        struct tm t;
-        time_t unix_time = ( time_t ) ts;
-        t = * gmtime ( & unix_time );
-        KTimeMake ( kt, & t );
-    }
-    return kt;
-}
diff --git a/libs/klib/symtab.c b/libs/klib/symtab.c
deleted file mode 100644
index 56bfea2..0000000
--- a/libs/klib/symtab.c
+++ /dev/null
@@ -1,736 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/symtab.h>
-#include <klib/symbol.h>
-#include <klib/token.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * KSymbol
- *  a name to object mapping
- */
-
-
-/* Init
- *  initialize a symbol without allocating space
- *
- *  "self" [ IN ] - where to initialize
- *
- *  "name" [ IN ] - symbol name
- *
- *  "type" [ IN ] - symbol type
- *
- *  "obj" [ IN, NULL OKAY ] - optional object mapping
- *
- */
-KLIB_EXTERN rc_t CC KSymbolInit ( KSymbol * self, 
-    const String * name, uint32_t type, const void * obj)
-{
-    rc_t rc;
-
-    if ( name == NULL )
-        rc = RC ( rcText, rcString, rcConstructing, rcName, rcNull );
-    else if ( name -> len == 0 )
-        rc = RC ( rcText, rcString, rcConstructing, rcName, rcEmpty );
-    else
-    {
-        string_copy ( ( char* ) ( self + 1 ), name -> size + 1, name -> addr, name -> size );
-        StringInit ( & self -> name, ( char* ) ( self + 1 ), name -> size, name -> len );
-        self -> u . obj = obj;
-        self -> dad = NULL;
-        self -> type = type;
-
-        return 0;
-    }
-    return rc;
-}
-
-/* Make
- *  create a symbol
- *
- *  "sym" [ OUT ] - return parameter for symbol
- *
- *  "name" [ IN ] - symbol name
- *
- *  "type" [ IN ] - symbol type
- *
- *  "obj" [ IN, NULL OKAY ] - optional object mapping
- */
-LIB_EXPORT rc_t CC KSymbolMake ( KSymbol **symp,
-    const String *name, uint32_t type, const void *obj )
-{
-    rc_t rc;
-    if ( symp == NULL )
-        rc = RC ( rcText, rcString, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KSymbol *sym = malloc ( sizeof *sym + name -> size + 1 );
-        if ( sym == NULL )
-            rc = RC ( rcText, rcString, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KSymbolInit (sym, name, type, obj);
-            if (rc == 0)
-            {
-                * symp = sym;
-                return 0;
-            }
-            free (sym);
-        }
-        * symp = NULL;
-    }
-    return rc;
-}
-
-/* Whack
- */
-LIB_EXPORT void CC KSymbolWhack ( BSTNode *n, void *ignore )
-{
-    KSymbol *self = ( KSymbol* ) n;
-
-    if ( self -> type == eNamespace )
-        BSTreeWhack ( & self -> u . scope, KSymbolWhack, ignore );
-
-    free ( self );
-}
-
-/* Cmp
- */
-LIB_EXPORT int64_t CC KSymbolCmp ( const void *item, const BSTNode *n )
-{
-    const String *a = item;
-    const KSymbol *b = ( const KSymbol* ) n;
-
-    return StringOrderNoNullCheck ( a, & b -> name );
-}
-
-/* Sort
- */
-LIB_EXPORT int64_t CC KSymbolSort ( const BSTNode *item, const BSTNode *n )
-{
-    const KSymbol *a = ( const KSymbol* ) item;
-    const KSymbol *b = ( const KSymbol* ) n;
-
-    return StringOrderNoNullCheck ( & a -> name, & b -> name );
-}
-
-
-
-/*--------------------------------------------------------------------------
- * KSymTable
- *  scoped stack of BSTree
- */
-
-
-/* Init
- *  create an empty symbol table
- *
- *  "intrinsic" [ IN ] - intrinsic scope
- */
-LIB_EXPORT rc_t CC KSymTableInit ( KSymTable *self, const BSTree *intrinsic )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcText, rcTree, rcConstructing, rcSelf, rcNull );
-    else
-    {
-        self -> ns = NULL;
-        VectorInit ( & self -> stack, 0, 16 );
-
-        if ( intrinsic == NULL )
-        {
-            self -> intrinsic = 0;
-            return 0;
-        }
-
-        self -> intrinsic = 1;
-        rc = VectorAppend ( & self -> stack, NULL, intrinsic );
-    }
-
-    return rc;
-}
-
-/* Whack
- *  must be called to clean up stack
- */
-#ifndef KSymTableWhack
-LIB_EXPORT void CC KSymTableWhack ( KSymTable *self )
-{
-    if ( self != NULL )
-        VectorWhack ( & self -> stack, NULL, NULL );
-}
-#endif
-
-
-/* PushScope
- *  pushes a tree onto stack
- *  fails if count == depth
- *  otherwise, pushes scope into top of stack
- *
- *  "scope" [ IN ] - current top scope
- */
-LIB_EXPORT rc_t CC KSymTablePushScope ( const KSymTable *cself, BSTree *scope )
-{
-    KSymTable *self = ( KSymTable* ) cself;
-    assert ( self != NULL );
-    assert ( scope != NULL );
-    return VectorAppend ( & self -> stack, NULL, scope );
-}
-
-
-/* PopScope
- *  removes a tree from stack
- *  noop if count < self->intrinsic,
- *  because stack bottom will be intrinsic scope
- */
-LIB_EXPORT void CC KSymTablePopScope ( const KSymTable *cself )
-{
-    if ( cself != NULL && cself -> stack . len > cself -> intrinsic )
-        -- ( ( KSymTable* ) cself ) -> stack . len;
-}
-
-
-/* PushNamespace
- *  pushes a namespace scope onto stack
- */
-LIB_EXPORT rc_t CC KSymTablePushNamespace ( const KSymTable *cself, KSymbol *ns )
-{
-    rc_t rc;
-    KSymTable *self = ( KSymTable* ) cself;
-    assert ( ns != NULL && ns -> type == eNamespace );
-    rc = KSymTablePushScope ( self, & ns -> u . scope );
-    if ( rc == 0 )
-        self -> ns = ns;
-    return rc;
-}
-
-
-/* PopNamespace
- */
-LIB_EXPORT void CC KSymTablePopNamespace ( const KSymTable *cself )
-{
-    KSymTable *self = ( KSymTable* ) cself;
-    assert ( self != NULL );
-    if ( self -> ns != NULL )
-    {
-        KSymTablePopScope ( self );
-        self -> ns = self -> ns -> dad;
-    }
-}
-
-
-/* CreateNamespace
- *  given a name, make it into a namespace,
- *
- *  "name" [ IN ] - name of namespace. if being created within
- *  another namespace, it will be linked to the parent.
- */
-LIB_EXPORT rc_t CC KSymTableCreateNamespace ( KSymTable *self, KSymbol **nsp, const String *name )
-{
-    rc_t rc;
-
-    assert ( self != NULL );
-    assert ( nsp != NULL );
-    assert ( name != NULL );
-
-    if ( name -> len == 0 )
-        rc = RC ( rcText, rcTree, rcInserting, rcString, rcEmpty );
-    else if ( VectorLength ( & self -> stack ) <= self -> intrinsic )
-        rc = RC ( rcText, rcTree, rcInserting, rcTree, rcReadonly );
-    else
-    {
-        uint32_t len = VectorLength ( & self -> stack );
-        BSTree *scope = VectorGet ( & self -> stack, len - 1 );
-        KSymbol *ns = ( KSymbol* ) BSTreeFind ( scope, name, KSymbolCmp );
-        if ( ns != NULL )
-        {
-            if ( ns -> type == eNamespace )
-            {
-                * nsp = ns;
-                return 0;
-            }
-
-            rc = RC ( rcText, rcTree, rcInserting, rcName, rcExists );
-        }
-        else
-        {
-            ns = malloc ( sizeof *ns + name -> size + 1 );
-            if ( ns == NULL )
-                rc = RC ( rcText, rcTree, rcInserting, rcMemory, rcExhausted );
-            else
-            {
-                /* initialize namespace */
-                string_copy ( ( char* ) ( ns + 1 ), name -> size + 1, name -> addr, name -> size );
-                StringInit ( & ns -> name, ( char* ) ( ns + 1 ), name -> size, name -> len );
-                BSTreeInit ( & ns -> u . scope );
-                ns -> dad = self -> ns;
-                ns -> type = eNamespace;
-
-                /* now insert into parent scope */
-                assert ( scope != NULL );
-                BSTreeInsert ( scope, & ns -> n, KSymbolSort );
-
-                /* done */
-                * nsp = ns;
-                return 0;
-            }
-        }
-    }
-
-    * nsp = NULL;
-
-    return rc;
-}
-
-
-/* CreateSymbol
- *  given a name, create an object reference
- *
- *  "symp" [ OUT, NULL OKAY ] - optional return parameter for
- *  newly created symbol, which is entered into the top scope
- *  and only returned for convenience.
- *
- *  "name" [ IN ] - symbol name. if being created within a
- *  namespace, the symbol will be linked to the parent.
- *
- *  "id" [ IN ] - if the symbol type
- *
- *  "obj" [ IN, NULL OKAY ] - if the object has been created
- *  at the point of symbol definition, it may be provided.
- */
-LIB_EXPORT rc_t CC KSymTableCreateSymbol ( KSymTable *self, KSymbol **symp,
-    const String *name, uint32_t id, const void *obj )
-{
-    rc_t rc;
-    KSymbol *sym = NULL;
-
-    if ( self == NULL )
-        rc = RC ( rcText, rcTree, rcInserting, rcSelf, rcNull );
-    else if ( name == NULL )
-        rc = RC ( rcText, rcTree, rcInserting, rcString, rcNull );
-    else if ( name -> len == 0 )
-        rc = RC ( rcText, rcTree, rcInserting, rcString, rcEmpty );
-    else if ( VectorLength ( & self -> stack ) <= self -> intrinsic )
-        rc = RC ( rcText, rcTree, rcInserting, rcTree, rcReadonly );
-    else
-    {
-        sym = malloc ( sizeof *sym + name -> size + 1 );
-        if ( sym == NULL )
-            rc = RC ( rcText, rcTree, rcInserting, rcMemory, rcExhausted );
-        else
-        {
-            KSymbol *exists;
-            uint32_t len = VectorLength ( & self -> stack );
-            BSTree *scope = VectorGet ( & self -> stack, len - 1 );
-
-            /* initialize symbol */
-            string_copy ( ( char* ) ( sym + 1 ), name -> size + 1, name -> addr, name -> size );
-            StringInit ( & sym -> name, ( char* ) ( sym + 1 ), name -> size, name -> len );
-            sym -> u . obj = obj;
-            sym -> dad = self -> ns;
-            sym -> type = id;
-
-            assert ( scope != NULL );
-            rc = BSTreeInsertUnique ( scope, & sym -> n, ( BSTNode** ) & exists, KSymbolSort );
-            if ( rc != 0 )
-            {
-                free ( sym );
-                sym = NULL;
-            }
-        }
-    }
-
-    if ( symp != NULL )
-        * symp = sym;
-
-    return rc;
-}
-
-
-/* DupSymbol
- *  given a symbol, create a duplicate
- *
- *  "dup" [ OUT, NULL OKAY ] - optional return parameter for
- *  newly created symbol, which is entered into the top scope
- *  and only returned for convenience.
- *
- *  "sym" [ IN ] - symbol to copy.
- *
- *  "id" [ IN ] - if the symbol type
- *
- *  "obj" [ IN, NULL OKAY ] - if the object has been created
- *  at the point of symbol definition, it may be provided.
- */
-static
-rc_t CC KSymTableDupNamespaces ( KSymTable *self, const KSymbol *ns )
-{
-    rc_t rc;
-
-    if ( ns == NULL )
-        return 0;
-
-    rc = KSymTableDupNamespaces ( self, ns -> dad );
-    if ( rc == 0 )
-    {
-        KSymbol *dup;
-        rc = KSymTableCreateNamespace ( self, & dup, & ns -> name );
-        if ( rc == 0 )
-            rc = KSymTablePushNamespace ( self, dup );
-    }
-
-    return rc;
-}
-
-static
-void CC KSymTablePopDupNamespaces ( KSymTable *self, const KSymbol *ns )
-{
-    for ( ; ns != NULL; ns = ns -> dad )
-        KSymTablePopNamespace ( self );
-}
-
-LIB_EXPORT rc_t CC KSymTableDupSymbol ( KSymTable *self, struct KSymbol **dupp,
-    const KSymbol *sym, uint32_t id, const void *obj )
-{
-    rc_t rc;
-    KSymbol *dup = NULL;
-
-    if ( self == NULL )
-        rc = RC ( rcText, rcTree, rcInserting, rcSelf, rcNull );
-    else if ( sym == NULL )
-        rc = RC ( rcText, rcTree, rcInserting, rcString, rcNull );
-    else if ( VectorLength ( & self -> stack ) <= self -> intrinsic )
-        rc = RC ( rcText, rcTree, rcInserting, rcTree, rcReadonly );
-    else
-    {
-        KSymbol *old = self -> ns;
-        rc = KSymTableDupNamespaces ( self, sym -> dad );
-        if ( rc == 0 )
-        {
-            rc = KSymTableCreateSymbol ( self, & dup, & sym -> name, id, obj );
-            KSymTablePopDupNamespaces ( self, dup -> dad );
-        }
-        self -> ns = old;
-    }
-
-    if ( dupp != NULL )
-        * dupp = dup;
-
-    return rc;
-}
-
-
-/* RemoveSymbol
- *  removes symbol from table
- *
- *  "sym" [ IN ] - symbol to be removed
- */
-LIB_EXPORT rc_t CC KSymTableRemoveSymbol ( KSymTable *self, const KSymbol *sym )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcText, rcTree, rcRemoving, rcSelf, rcNull );
-    else if ( sym == NULL )
-        rc = RC ( rcText, rcTree, rcRemoving, rcParam, rcNull );
-    else
-    {
-        uint32_t i;
-        BSTree *scope;
-
-        /* if the symbol lives within a namespace,
-           it won't be found directly. */
-        if ( sym -> dad != NULL )
-        {
-            KSymbol *ns = sym -> dad;
-            if ( ! BSTreeUnlink ( & ns -> u . scope, ( BSTNode* ) & sym -> n ) )
-                return RC ( rcText, rcTree, rcRemoving, rcNode, rcCorrupt );
-
-            /* if the namespace is not now empty, we're done */
-            if ( ns -> u . scope . root != NULL )
-                return 0;
-
-            /* remove and delete the namespace */
-            rc = KSymTableRemoveSymbol ( self, ns );
-            if ( rc == 0 )
-                KSymbolWhack ( & ns -> n, NULL );
-            return rc;
-        }
-
-        /* walk the stack trying to find owning scope */
-        for ( i = VectorLength ( & self -> stack ); i > self -> intrinsic; )
-        {
-            scope = VectorGet ( & self -> stack, -- i );
-            if ( BSTreeUnlink ( scope, ( BSTNode* ) & sym -> n ) )
-                return 0;
-        }
-
-        /* can't remove it from intrinsic table,
-           so see if it wasn't found or if it's intrinsic */
-        scope = VectorGet ( & self -> stack, 0 );
-        if ( scope != NULL && BSTreeFind ( scope, & sym -> name, KSymbolCmp ) != NULL )
-            rc = RC ( rcText, rcTree, rcRemoving, rcTree, rcReadonly );
-        else
-            rc = RC ( rcText, rcTree, rcRemoving, rcNode, rcNotFound );
-    }
-
-    return rc;
-}
-
-
-/* Find
- *  finds a symbol within the scope stack
- */
-LIB_EXPORT KSymbol * CC KSymTableFind ( const KSymTable *self, const String *name )
-{
-    if ( self != NULL && name != NULL && name -> len != 0 )
-    {
-        uint32_t i;
-
-        /* this is a pretty bad way to do things, but
-           we're a fairly low frequency symbol table... */
-        for ( i = VectorLength ( & self -> stack ); i > 0; )
-        {
-            BSTree *scope = VectorGet ( & self -> stack, -- i );
-            KSymbol *sym = ( KSymbol* )
-                BSTreeFind ( scope, name, KSymbolCmp );
-            if ( sym != NULL )
-                return sym;
-        }
-    }
-
-    return NULL;
-}
-
-static
-KSymbol * CC KSymTableDeepFindSymbol ( const KSymTable *self, const KSymbol *sym, uint32_t *level )
-{
-    uint32_t i;
-    KSymbol *found;
-
-    if ( sym -> dad != NULL )
-    {
-        found = KSymTableDeepFindSymbol ( self, sym -> dad, level );
-        if ( found == NULL || found -> type != eNamespace )
-            return NULL;
-        return ( KSymbol* ) BSTreeFind ( & found -> u . scope,
-            & sym -> name, KSymbolCmp );
-    }
-
-    for ( i = * level; i > 0; )
-    {
-        BSTree *scope = VectorGet ( & self -> stack, -- i );
-        found = ( KSymbol* ) BSTreeFind ( scope, & sym -> name, KSymbolCmp );
-        if ( found != NULL )
-        {
-            * level = i;
-            return found;
-        }
-    }
-
-    * level = 0;
-    return NULL;
-}
-
-LIB_EXPORT KSymbol * CC KSymTableFindSymbol ( const KSymTable *self, const KSymbol *sym )
-{
-    if ( self != NULL && sym != NULL )
-    {
-        uint32_t i;
-
-        /* the simple symbols are easy */
-        if ( sym -> dad == NULL )
-            return KSymTableFind ( self, & sym -> name );
-
-        /* namespaces are harder...
-
-           we're going to use recursion to find the root namespace
-           ( although it's unlikely to go beyond a practical limit )
-           and once the root name symbol is found, we need to step
-           backwards through the symtab scopes until we find the root.
-
-           the problem is that if that root doesn't produce a hit for
-           the requested symbol, we still have to keep looking through
-           other scopes
-        */
-
-        for ( i = VectorLength ( & self -> stack ); i > 0; )
-        {
-            KSymbol *found = KSymTableDeepFindSymbol ( self, sym, & i );
-            if ( found != NULL )
-                return found;
-        }
-    }
-
-    return NULL;
-}
-
-
-/* FindIntrinsic
- *  find an intrinsic symbol
- */
-LIB_EXPORT KSymbol * CC KSymTableFindIntrinsic ( const KSymTable *self, const String *name )
-{
-    KSymbol *sym = NULL;
-
-    if ( self != NULL && name != NULL && name -> len != 0 )
-    {
-        uint32_t i;
-
-        for ( i = self -> intrinsic; i > 0; )
-        {
-            BSTree *scope = VectorGet ( & self -> stack, -- i );
-            if ( scope != NULL )
-            {
-                KSymbol *sym_ = ( KSymbol* )
-                    BSTreeFind ( scope, name, KSymbolCmp );
-                if ( sym_ != NULL )
-                    return sym_;
-            }
-        }
-    }
-
-    return sym;
-}
-
-
-/* FindGlobal
- *  find a symbol at global scope
- */
-LIB_EXPORT KSymbol * CC KSymTableFindGlobal ( const KSymTable *self, const String *name )
-{
-    KSymbol *sym = NULL;
-
-    if ( self != NULL && name != NULL && name -> len != 0 )
-    {
-        uint32_t i;
-
-        for ( i = self -> intrinsic + 1; i > 0; )
-        {
-            BSTree *scope = VectorGet ( & self -> stack, -- i );
-            if ( scope != NULL )
-            {
-                KSymbol *sym_ = ( KSymbol* )
-                    BSTreeFind ( scope, name, KSymbolCmp );
-                if ( sym_ != NULL )
-                    return sym_;
-            }
-        }
-    }
-
-    return sym;
-}
-
-
-/* FindShallow
- *  find a symbol in top scope
- */
-LIB_EXPORT KSymbol * CC KSymTableFindShallow ( const KSymTable *self, const String *name )
-{
-    KSymbol *sym = NULL;
-
-    if ( self != NULL && name != NULL && name -> len != 0 )
-    {
-        uint32_t len = VectorLength ( & self -> stack );
-        if ( len > 0 )
-        {
-            BSTree *scope = VectorGet ( & self -> stack, len - 1 );
-            if ( scope != NULL )
-            {
-                sym = ( KSymbol* )
-                    BSTreeFind ( scope, name, KSymbolCmp );
-            }
-        }
-    }
-
-    return sym;
-}
-
-
-/* FindNext
- *  given a symbol that was found in nearest scope
- *  find next symbol of the same simple name in
- *  farther scopes
- */
-LIB_EXPORT KSymbol * CC KSymTableFindNext ( const KSymTable *self, const KSymbol *sym, uint32_t *id )
-{
-    KSymbol *next = NULL;
-
-    uint32_t i = 0;
-    if ( id != NULL )
-    {
-        i = * id;
-        * id = 0;
-    }
-
-    if ( self != NULL && sym != NULL )
-    {
-        BSTree *scope;
-        uint32_t len = VectorLength ( & self -> stack );
-
-        /* if the previous scope was not given */
-        if ( i == 0 || i > len )
-        {
-            for ( i = len; i > 0; )
-            {
-                scope = VectorGet ( & self -> stack, -- i );
-                next = ( KSymbol* ) BSTreeFind ( scope, & sym -> name, KSymbolCmp );
-                if ( next == sym )
-                {
-                    ++ i;
-                    break;
-                }
-            }
-
-            /* bail if not found */
-            if ( i == 0 )
-                return NULL;
-        }
-
-        /* continue the search */
-        for ( -- i ; i > 0; )
-        {
-            scope = VectorGet ( & self -> stack, -- i );
-            next = ( KSymbol* ) BSTreeFind ( scope, & sym -> name, KSymbolCmp );
-            if ( next != NULL )
-            {
-                if ( id != NULL )
-                    * id = i + 1;
-                break;
-            }
-        }
-    }
-
-    return next;
-}
diff --git a/libs/klib/text.c b/libs/klib/text.c
deleted file mode 100644
index 884146d..0000000
--- a/libs/klib/text.c
+++ /dev/null
@@ -1,1099 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <va_copy.h>
-
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <errno.h>
-#include <assert.h>
-
-/*--------------------------------------------------------------------------
- * String
- *  pseudo-intrinsic string
- */
-
-/* StringCopy
- *  allocates a copy of a string
- */
-LIB_EXPORT rc_t CC StringCopy ( const String **cpy, const String *str )
-{
-    if ( cpy != NULL )
-    {
-        if ( str != NULL )
-        {
-            size_t size = str -> size;
-            String *s = malloc ( sizeof * s + str -> size + 1 );
-            if ( s != NULL )
-            {
-                char *addr = ( char* ) ( s + 1 );
-                StringInit ( s, addr, size, str -> len );
-                memcpy ( addr, str -> addr, size );
-                addr [ size ] = 0;
-                * cpy = s;
-                return 0;
-            }
-
-            * cpy = NULL;
-            return RC ( rcText, rcString, rcCopying, rcMemory, rcInsufficient );
-        }
-
-        * cpy = NULL;
-    }
-    return RC ( rcText, rcString, rcCopying, rcParam, rcNull );
-}
-
-/* StringConcat
- *  concatenate one string onto another
- */
-LIB_EXPORT rc_t CC StringConcat ( const String **cat, const String *a, const String *b )
-{
-    if ( cat != NULL )
-    {
-        if ( a != NULL && b != NULL )
-        {
-            size_t size = a -> size + b -> size;
-            String *s = malloc ( sizeof * s + size + 1 );
-            if ( s != NULL )
-            {
-                char *addr = ( char* ) ( s + 1 );
-                StringInit ( s, addr, size, a -> len + b -> len );
-                memcpy ( addr, a -> addr, a -> size );
-                memcpy ( & addr [ a -> size ], b -> addr, b -> size );
-                addr [ size ] = 0;
-                * cat = s;
-                return 0;
-            }
-
-            * cat = NULL;
-            return RC ( rcText, rcString, rcConcatenating, rcMemory, rcInsufficient );
-        }
-
-        * cat = NULL;
-    }
-    return RC ( rcText, rcString, rcConcatenating, rcParam, rcNull );
-}
-
-/* StringSubstr
- *  creates a substring of an existing one
- *  note that the substring is always a non-allocated copy
- *  and is dependent upon the lifetime of its source
- *
- *  returns "sub" if "idx" was valid
- *  or NULL otherwise
- *
- *  "len" may be 0 to indicate infinite length
- *  or may extend beyond end of source string.
- */
-LIB_EXPORT String * CC StringSubstr ( const String *str, String *sub,
-    uint32_t idx, uint32_t len )
-{
-    if ( str != NULL && sub != NULL && idx < str -> len )
-    {
-        const char *addr = string_idx ( str -> addr, str -> size, idx );
-        if ( addr != NULL )
-        {
-            sub -> size = str -> size - ( size_t ) ( addr - str -> addr );
-            sub -> len = str -> len - idx;
-            sub -> addr = addr;
-            if ( len > 0 && len < sub -> len )
-            {
-                const char *end = string_idx ( sub -> addr, sub -> size, len );
-                if ( end != NULL )
-                {
-                    sub -> size = ( size_t ) ( end - sub -> addr );
-                    sub -> len = len;
-                }
-            }
-            return sub;
-        }
-    }
-    return NULL;
-}
-
-/* StringHead
- *  access the first character
- *
- *  this is an efficient enough function to be included.
- *  the generic functions of accessing characters by index
- *  are apt to be extremely inefficient with UTF-8, and
- *  as such are not included.
- *
- *  returns EINVAL if the character is bad,
- *  or ENODATA if the string is empty
- */
-LIB_EXPORT rc_t CC StringHead ( const String *str, uint32_t *ch )
-{
-    rc_t rc;
-    if ( ch == NULL )
-        rc = RC ( rcText, rcString, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( str == NULL )
-            rc = RC ( rcText, rcString, rcAccessing, rcParam, rcNull );
-        else
-        {
-            if ( str -> len == 0 )
-                rc = RC ( rcText, rcString, rcAccessing, rcString, rcEmpty );
-            else
-            {
-                int ch_len = utf8_utf32 ( ch, str -> addr, str -> addr + str -> size );
-                if ( ch_len > 0 )
-                    return 0;
-
-                rc = RC ( rcText, rcString, rcAccessing, rcChar, rcInvalid );
-            }
-        }
-
-        * ch = 0;
-    }
-
-    return rc;
-}
-
-/* StringPopHead
- *  remove and return the first character
- *
- *  returns EINVAL if the character is bad,
- *  or ENODATA if the string is empty
- */
-LIB_EXPORT rc_t CC StringPopHead ( String *str, uint32_t *ch )
-{
-    rc_t rc;
-    if ( ch == NULL )
-        rc = RC ( rcText, rcChar, rcRemoving, rcParam, rcNull );
-    else
-    {
-        if ( str == NULL )
-            rc = RC ( rcText, rcChar, rcRemoving, rcParam, rcNull );
-        else
-        {
-            if ( str -> len == 0 )
-                rc = SILENT_RC ( rcText, rcChar, rcRemoving, rcString, rcEmpty );
-            else
-            {
-                int ch_len = utf8_utf32 ( ch, str -> addr, str -> addr + str -> size );
-                if ( ch_len > 0 )
-                {
-                    str -> addr += ch_len;
-                    str -> size -= ch_len;
-                    str -> len -= 1;
-                    return 0;
-                }
-
-                rc = RC ( rcText, rcChar, rcRemoving, rcChar, rcInvalid );
-            }
-        }
-
-        * ch = 0;
-    }
-
-    return rc;
-}
-
-/* StringCompare
- *  compare strings for relative ordering
- */
-LIB_EXPORT int CC StringCompare ( const String *a, const String *b )
-{
-    int diff;
-    uint32_t len;
-
-    if ( a == b )
-        return 0;
-    if ( a == NULL )
-        return -1;
-    if ( b == NULL )
-        return 1;
-
-    len = a -> len;
-    if ( b -> len < len )
-        len = b -> len;
-
-    diff = string_cmp ( a -> addr, a -> size, b -> addr, b -> size, len );
-    if ( diff == 0 )
-        diff = ( int ) a -> len - ( int ) b -> len;
-    return diff;
-}
-
-/* StringCaseEqual
- *  compare strings for case-insensitive equality
- */
-LIB_EXPORT bool CC StringCaseEqual ( const String *a, const String *b )
-{
-    uint32_t len;
-
-    if ( a == b )
-        return true;
-    if ( a == NULL || b == NULL )
-        return false;
-
-    len = a -> len;
-    if ( b -> len != len )
-        return false;
-
-    return strcase_cmp ( a -> addr, a -> size, b -> addr, b -> size, len ) == 0;
-}
-
-/* StringCaseCompare
- *  compare strings for relative case-insensitive ordering
- */
-LIB_EXPORT int CC StringCaseCompare ( const String *a, const String *b )
-{
-    int diff;
-    uint32_t len;
-
-    if ( a == b )
-        return 0;
-    if ( a == NULL )
-        return -1;
-    if ( b == NULL )
-        return 1;
-
-    len = a -> len;
-    if ( b -> len < len )
-        len = b -> len;
-
-    diff = strcase_cmp ( a -> addr, a -> size, b -> addr, b -> size, len );
-    if ( diff == 0 )
-        diff = ( int ) a -> len - ( int ) b -> len;
-    return diff;
-}
-
-/* StringOrder
- *  compares strings as quickly as possible for
- *  deterministic ordering: first by length, then
- *  by binary (byte-wise) content.
- *
- *  performs more quickly than StringCompare for cases
- *  where only deterministic ordering is needed ( e.g. symbol table ).
- */
-LIB_EXPORT int64_t CC StringOrder ( const String *a, const String *b )
-{
-    if ( a == b )
-        return 0;
-    if ( a == NULL )
-        return -1;
-    if ( b == NULL )
-        return 1;
-
-    if ( a -> size < b -> size )
-        return -1;
-    if ( a -> size > b -> size )
-        return 1;
-    return memcmp ( a -> addr, b -> addr, a -> size );
-}
-
-/* StringOrderNoNullCheck
- *  avoids tests for NULL strings
- */
-LIB_EXPORT int64_t CC StringOrderNoNullCheck ( const String *a, const String *b )
-{
-    if ( a -> size < b -> size )
-        return -1;
-    if ( a -> size > b -> size )
-        return 1;
-    return memcmp ( a -> addr, b -> addr, a -> size );
-}
-
-/* StringMatch
- *  creates a substring of "a" in "match"
- *  for all of the sequential matching characters between "a" and "b"
- *  starting from character [ 0 ].
- *
- *  returns the number of characters that match.
- */
-LIB_EXPORT uint32_t CC StringMatch ( String *match, const String *a, const String *b )
-{
-    if ( a == NULL || b == NULL )
-    {
-        CONST_STRING ( match, "" );
-        return 0;
-    }
-
-    if ( a == b )
-    {
-        * match = * a;
-        return a -> len;
-    }
-
-    if ( match == NULL )
-    {
-        return string_match ( a -> addr, a -> size,
-            b -> addr, b -> size, (uint32_t)b -> size, NULL );
-    }
-
-    match -> addr = a -> addr;
-    return match -> len = string_match ( a -> addr, a -> size,
-        b -> addr, b -> size, (uint32_t)b -> size, & match -> size );
-}
-
-/* StringMatchExtend
- *  extends a substring of "a" in "match"
- *  for all of the sequential matching characters between "a" and "b"
- *  starting from character [ match -> len ].
- *
- *  returns the number of matching characters that were extended.
- */
-LIB_EXPORT uint32_t CC StringMatchExtend ( String *match, const String *a, const String *b )
-{
-    size_t msize;
-    uint32_t len;
-
-    assert ( match != NULL );
-    if ( match -> len == 0 )
-        return StringMatch ( match, a, b );
-
-    assert ( a != NULL );
-    assert ( match -> addr == a -> addr );
-    assert ( match -> len <= a -> len );
-
-    if ( b == NULL || match -> len == a -> len || match -> len >= b -> len )
-        return 0;
-
-    msize = match -> size;
-    len = string_match ( a -> addr + msize, a -> size - msize,
-        b -> addr + msize, b -> size - msize, (uint32_t)b -> size, & msize );
-
-    match -> len += len;
-    match -> size += msize;
-    return len;
-}
-
-/* StringCopyUTF...
- *  creates a String from UTF16 or UTF32 UNICODE input
- *  wchar_t is one or the other, depending upon OS and compiler.
- */
-LIB_EXPORT rc_t CC StringCopyUTF16 ( const String **cpy, const uint16_t *text, size_t bytes )
-{
-    if ( cpy != NULL )
-    {
-        if ( text != NULL || bytes == 0 )
-        {
-            size_t size;
-            uint32_t len = utf16_cvt_string_len ( text, bytes, & size );
-            String *str = ( String* ) malloc ( sizeof * str + 1 + size );
-            if ( ( * cpy = str ) == NULL )
-                return RC ( rcText, rcString, rcCopying, rcMemory, rcInsufficient );
-            StringInit ( str, ( char* ) ( str + 1 ), size, len );
-            str -> size = utf16_cvt_string_copy ( ( char* ) str -> addr, size, text, bytes );
-            return 0;
-        }
-
-        * cpy = NULL;
-    }
-    return RC ( rcText, rcString, rcCopying, rcParam, rcNull );
-}
-
-LIB_EXPORT rc_t CC StringCopyUTF32 ( const String **cpy, const uint32_t *text, size_t bytes )
-{
-    if ( cpy != NULL )
-    {
-        if ( text != NULL || bytes == 0 )
-        {
-            size_t size;
-            uint32_t len = utf32_cvt_string_len ( text, bytes, & size );
-            String *str = ( String* ) malloc ( sizeof * str + 1 + size );
-            if ( ( * cpy = str ) == NULL )
-                return RC ( rcText, rcString, rcCopying, rcMemory, rcInsufficient );
-            StringInit ( str, ( char* ) ( str + 1 ), size, len );
-            str -> size = utf32_cvt_string_copy ( ( char* ) str -> addr, size, text, bytes );
-            return 0;
-        }
-
-        * cpy = NULL;
-    }
-    return RC ( rcText, rcString, rcCopying, rcParam, rcNull );
-}
-
-/* StringWhack
- *  deallocates a string
- *  ignores strings not allocated by this library
- */
-LIB_EXPORT void CC StringWhack ( const String* self )
-{
-    free ( ( void* ) self );
-}
-
-
-/* StringToInt
- *  simple string conversion functions
- */
-LIB_EXPORT int64_t StringToI64 ( const String * self, rc_t * optional_rc )
-{
-    if ( self != NULL )
-        return string_to_I64 ( self -> addr, self -> size, optional_rc );
-
-    if ( optional_rc != NULL )
-        * optional_rc = RC ( rcText, rcString, rcEvaluating, rcSelf, rcNull );
-
-    return 0;
-}
-
-LIB_EXPORT uint64_t StringToU64 ( const String * self, rc_t * optional_rc )
-{
-    if ( self != NULL )
-        return string_to_U64 ( self -> addr, self -> size, optional_rc );
-
-    if ( optional_rc != NULL )
-        * optional_rc = RC ( rcText, rcString, rcEvaluating, rcSelf, rcNull );
-
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * raw text strings
- */
-
-/* string_size
- *  length of string in bytes
- */
-LIB_EXPORT size_t CC string_size ( const char *str )
-{
-    if ( str == NULL )
-        return 0;
-    return strlen ( str );
-}
-
-/* string_dup
- *  replaces the broken C library strndup
- *  creates a NUL-terminated malloc'd string
- */
-LIB_EXPORT char * CC string_dup ( const char *str, size_t size )
-{
-    char *dst;
-    if ( str == NULL )
-        dst = NULL;
-    else
-    {
-        dst = malloc ( size + 1 );
-        if ( dst != NULL )
-            string_copy ( dst, size + 1, str, size );
-    }
-    return dst;
-}
-
-/* string_dup_measure
- *  replaces the broken C library strdup
- *  creates a NUL-terminated malloc'd string
- *  returns size of string unless "size" is NULL
- */
-LIB_EXPORT char * CC string_dup_measure ( const char *str, size_t *size )
-{
-    size_t bytes = string_size ( str );
-    if ( size != NULL )
-        * size = bytes;
-    return string_dup ( str, bytes );
-}
-
-/* string_hash
- *  hashes a string
- */
-LIB_EXPORT uint32_t CC string_hash ( const char *str, size_t size )
-{
-    size_t i;
-    uint32_t hash;
-
-    assert ( str != NULL );
-
-    if ( str == NULL )
-        return 0;
-
-    for ( hash = 0, i = 0; i < size; ++ i )
-    {
-        uint32_t ch = ( ( const unsigned char* )  str ) [ i ];
-        hash = ( ( hash << 1 ) - ( hash >> 16 ) ) ^ ch;
-    }
-    return hash ^ ( hash >> 16 );
-}
-
-/* string_to_int
- *  simple string conversion functions
- *
- *  these functions are defined to consume the entire string.
- *  leading spaces are tolerated, repeated signs are accepted for signed conversion,
- *  decimal and hex encodings are accepted for unsigned conversion,
- *  decimal only for signed conversion.
- *
- *  "optional_rc" [ OUT, NULL OKAY ] - if non-null, user is interested
- *  in error conditions. if the parameter is present, the string must be
- *  completely consumed without overflow.
- *
- *  optional return values ( with { GetRCObject ( rc ), GetRCState ( rc ) }:
- *   0                            : no error
- *   { rcRange, rcExcessive }     : integer overflow
- *   { rcTransfer, rcIncomplete } : extra characters remain in string
- *   { rcData, rcInsufficient }   : no numeric text was found
- *
- *  return values - regardless of "optional_rc":
- *    val             : when no error
- *    val             : on incomplete transfer
- *    +/- max int64_t : when signed overflow occurs ( StringToI64 only )
- *    max uint64_t    : when unsigned overflow occurs ( StringToU64 only )
- *    0               : when no input text is found
- */
-LIB_EXPORT int64_t string_to_I64 ( const char * text, size_t bytes, rc_t * optional_rc )
-{
-    rc_t rc = 0;
-
-    if ( text == NULL )
-        rc = RC ( rcText, rcString, rcEvaluating, rcParam, rcNull );
-    else
-    {
-        int64_t val;
-
-        size_t i, start;
-        uint8_t negate = 0;
-
-        /* allow white space */
-        for ( i = 0; i < bytes; ++ i )
-        {
-            if ( ! isspace ( text [ i ] ) )
-                break;
-        }
-
-        /* allow sign */
-        for ( ; i < bytes; ++ i )
-        {
-            switch ( text [ i ] )
-            {
-            case '-':
-                negate ^= 1;
-                continue;
-            case '+':
-                continue;
-            }
-            break;
-        }
-
-        start = i;
-        for ( val = 0; i < bytes; ++ i )
-        {
-            uint8_t digit;
-
-            /* HACK ALERT: by declaring this variable "volatile",
-               we prevent gcc-4.8.1 and friends from trying to optimize
-               this loop, and producing bad code ( see below ).
-               gcc-4.9.1 does not exhibit this behavior.
-            */
-            volatile int64_t x = 0;
-
-            if ( ! isdigit ( text [ i ] ) )
-                break;
-
-            /* want to bring this digit into number */
-            digit = text [ i ] - '0';
-
-            /* detect overflow on multiplication
-               The gcc optimization replaced a signed int-max
-               with an unsigned int-max, destroying the test.
-             */
-            if ( val > INT64_MAX / 10 )
-            {
-                rc = RC ( rcText, rcString, rcEvaluating, rcRange, rcExcessive );
-                val = INT64_MAX;
-                break;
-            }
-
-            val *= 10;
-            assert ( val >= 0 );
-
-            /* detect overflow on addition */
-            x = val + digit - negate;
-            if ( x < 0 )
-            {
-                rc = RC ( rcText, rcString, rcEvaluating, rcRange, rcExcessive );
-                val = INT64_MAX;
-                break;
-            }
-
-            val += digit;
-        }
-
-        if ( negate )
-            val = ( rc != 0 ) ? INT64_MIN : - val;
-
-        if ( start != i )
-        {
-            if ( optional_rc != NULL )
-            {
-                if ( rc == 0 && i != bytes )
-                    rc = RC ( rcText, rcString, rcParsing, rcTransfer, rcIncomplete );
-
-                * optional_rc = rc;
-            }
-
-            return val;
-        }
-
-        /* no digits were converted */
-        rc = RC ( rcText, rcString, rcParsing, rcData, rcInsufficient );
-    }
-
-    if ( optional_rc != NULL )
-        * optional_rc = rc;
-
-    return 0;
-}
-
-LIB_EXPORT uint64_t string_to_U64 ( const char * text, size_t bytes, rc_t * optional_rc )
-{
-    rc_t rc = 0;
-
-    if ( text == NULL )
-        rc = RC ( rcText, rcString, rcEvaluating, rcParam, rcNull );
-    else
-    {
-        uint64_t val;
-        size_t i, start;
-
-        /* allow white space */
-        for ( i = 0; i < bytes; ++ i )
-        {
-            if ( ! isspace ( text [ i ] ) )
-                break;
-        }
-
-        /* detect hex */
-        if ( bytes - i >= 3 && text [ i ] == '0' && tolower ( text [ i + 1 ] ) == 'x' )
-        {
-            start = i += 2;
-            for ( val = 0; i < bytes; ++ i )
-            {
-                uint8_t xdigit;
-
-                if ( ! isxdigit ( text [ i ] ) )
-                    break;
-
-                /* want to bring this digit into number */
-                xdigit = isdigit ( text [ i ] ) ?
-                    text [ i ] - '0' : tolower ( text [ i ] ) - 'a' + 10;
-
-                /* detect overflow */
-                if ( i - start > 16 )
-                {
-                    rc = RC ( rcText, rcString, rcEvaluating, rcRange, rcExcessive );
-                    val = UINT64_MAX;
-                    break;
-                }
-
-                val = ( val << 4 ) | xdigit;
-            }
-        }
-        else
-        {
-            start = i;
-            for ( val = 0; i < bytes; ++ i )
-            {
-                uint8_t digit;
-
-                if ( ! isdigit ( text [ i ] ) )
-                    break;
-
-                /* want to bring this digit into number */
-                digit = text [ i ] - '0';
-
-                /* detect overflow on multiplication */
-                if ( val > UINT64_MAX / 10 )
-                {
-                    rc = RC ( rcText, rcString, rcEvaluating, rcRange, rcExcessive );
-                    val = UINT64_MAX;
-                    break;
-                }
-
-                val *= 10;
-
-                /* detect overflow on addition */
-                if ( val > UINT64_MAX - digit )
-                {
-                    rc = RC ( rcText, rcString, rcEvaluating, rcRange, rcExcessive );
-                    val = UINT64_MAX;
-                    break;
-                }
-
-                val += digit;
-            }
-        }
-
-        if ( start != i )
-        {
-            if ( optional_rc != NULL )
-            {
-                if ( rc == 0 && i != bytes )
-                    rc = RC ( rcText, rcString, rcEvaluating, rcTransfer, rcIncomplete );
-
-                * optional_rc = rc;
-            }
-
-            return val;
-        }
-
-        /* no digits were converted */
-        rc = RC ( rcText, rcString, rcParsing, rcData, rcInsufficient );
-    }
-
-    if ( optional_rc != NULL )
-        * optional_rc = rc;
-
-    return 0;
-}
-
-/* utf8_utf32
- *  converts UTF8 text to a single UTF32 character
- *  returns the number of UTF8 bytes consumed, such that:
- *    return > 0 means success
- *    return == 0 means insufficient input
- *    return < 0 means bad input or bad argument
- */
-LIB_EXPORT int CC utf8_utf32 ( uint32_t *dst, const char *begin, const char *end )
-{
-    int c;
-    uint32_t ch;
-    const char *src, *stop;
-
-    if ( dst == NULL || begin == NULL || end == NULL )
-        return -1;
-
-    if ( begin == end )
-        return 0;
-
-    /* non-negative bytes are ASCII-7 */
-    c = begin [ 0 ];
-    if ( begin [ 0 ] >= 0 )
-    {
-        dst [ 0 ] = c;
-        return 1;
-    }
-	
-    /* the leftmost 24 bits are set
-       the rightmost 8 can look like:
-       110xxxxx == 2 byte character
-       1110xxxx == 3 byte character
-       11110xxx == 4 byte character
-       111110xx == 5 byte character
-       1111110x == 6 byte character
-    */
-	
-    src = begin;
-	
-    /* invert bits to look at range */
-    ch = c;
-    c = ~ c;
-	
-    /* illegal range */
-    if ( c >= 0x40 )
-        return -1;
-	
-    /* 2 byte */
-    else if ( c >= 0x20 )
-    {
-        ch &= 0x1F;
-        stop = src + 2;
-    }
-	
-    /* 3 byte */
-    else if ( c >= 0x10 )
-    {
-        ch &= 0xF;
-        stop = src + 3;
-    }
-	
-    /* 4 byte */
-    else if ( c >= 8 )
-    {
-        ch &= 7;
-        stop = src + 4;
-    }
-	
-    /* 5 byte */
-    else if ( c >= 4 )
-    {
-        ch &= 3;
-        stop = src + 5;
-    }
-	
-    /* illegal */
-    else if ( c < 2 )
-        return -1;
-    
-    /* 6 byte */
-    else
-    {
-        ch &= 1;
-        stop = src + 6;
-    }
-    
-    /* must have sufficient input */
-    if ( stop > end )
-        return 0;
-	
-    /* complete the character */
-    while ( ++ src != stop )
-    {
-        c = src [ 0 ] & 0x7F;
-        if ( src [ 0 ] >= 0 || c >= 0x40 )
-            return -1;
-        ch = ( ch << 6 ) | c;
-    }
-	
-    /* record the character */
-    dst [ 0 ] = ch;
-	
-    /* return the bytes consumed */
-    return ( int ) ( src - begin );
-}
-
-/* utf32_utf8
- *  converts a single UTF32 character to UTF8 text
- *  returns the number of UTF8 bytes generated, such that:
- *    return > 0 means success
- *    return == 0 means insufficient output
- *    return < 0 means bad character or bad argument
- */
-LIB_EXPORT int CC utf32_utf8 ( char *begin, char *end, uint32_t ch )
-{
-    int len;
-    char *dst;
-    uint32_t mask;
-
-    if ( begin == NULL || end == NULL )
-        return -1;
-    if ( begin >= end )
-        return 0;
-
-    if ( ch < 128 )
-    {
-        begin [ 0 ] = ( char ) ch;
-        return 1;
-    }
-
-    /* 2 byte */
-    if ( ch < 0x00000800 )
-    {
-        /* 110xxxxx */
-        mask = 0xC0U;
-        len = 2;
-    }
-	
-    /* 3 byte */
-    else if ( ch < 0x00010000 )
-    {
-        /* 1110xxxx */
-        mask = 0xE0U;
-        len = 3;
-    }
-
-    /* 4 byte */
-    else if ( ch < 0x00200000 )
-    {
-        /* 11110xxx */
-        mask = 0xF0U;
-        len = 4;
-    }
-	
-    /* 5 byte */
-    else if ( ch < 0x04000000 )
-    {
-        /* 111110xx */
-        mask = 0xF8U;
-        len = 5;
-    }
-	
-    /* 6 byte */
-    else
-    {
-        /* 1111110x */
-        mask = 0xFCU;
-        len = 6;
-    }
-	
-    dst = begin + len;
-    if ( dst > end )
-        return 0;
-    
-    while ( -- dst > begin )
-    {
-        /* 10xxxxxx */ /* too many casts to suit different compilers */
-        dst [ 0 ] = ( char ) (( char ) 0x80 | ( ( char ) ch & ( char ) 0x3F ));
-        ch >>= 6;
-    }
-    
-    dst [ 0 ] = ( char ) ( mask | ch );
-
-    return len;
-}
-
-/* utf16_string_size/len/measure
- *  measures UTF-16 strings
- */
-LIB_EXPORT size_t CC utf16_string_size ( const uint16_t *str )
-{
-    uint32_t i, ch;
-
-    for ( ch = str [ i = 0 ]; ch != 0 ; ch = str [ ++ i ] )
-    {
-        char ignore [ 8 ];
-        if ( utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch ) <= 0 )
-            break;
-    }
-
-    return i * sizeof * str;
-}
-
-LIB_EXPORT uint32_t CC utf16_string_len ( const uint16_t *str, size_t size )
-{
-    uint32_t i, str_len = ( uint32_t ) ( size >> 1 );
-
-    for ( i = 0; i < str_len; ++ i )
-    {
-        char ignore [ 8 ];
-        uint32_t ch = str [ i ];
-        if ( utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch ) <= 0 )
-            break;
-    }
-
-    return i;
-}
-
-LIB_EXPORT uint32_t CC utf16_string_measure ( const uint16_t *str, size_t *size )
-{
-    uint32_t i, ch;
-
-    for ( ch = str [ i = 0 ]; ch != 0 ; ch = str [ ++ i ] )
-    {
-        char ignore [ 8 ];
-        if ( utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch ) <= 0 )
-            break;
-    }
-
-    * size = i * sizeof * str;
-
-    return i;
-}
-
-/* utf32_string_size/len/measure
- */
-LIB_EXPORT size_t CC utf32_string_size ( const uint32_t *str )
-{
-    uint32_t i, ch;
-
-    for ( ch = str [ i = 0 ]; ch != 0 ; ch = str [ ++ i ] )
-    {
-        char ignore [ 8 ];
-        if ( utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch ) <= 0 )
-            break;
-    }
-
-    return i * sizeof * str;
-}
-
-LIB_EXPORT uint32_t CC utf32_string_len ( const uint32_t *str, size_t size )
-{
-    uint32_t i, str_len = ( uint32_t ) ( size >> 2 );
-
-    for ( i = 0; i < str_len; ++ i )
-    {
-        char ignore [ 8 ];
-        uint32_t ch = str [ i ];
-        if ( utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch ) <= 0 )
-            break;
-    }
-
-    return i;
-}
-
-LIB_EXPORT uint32_t CC utf32_string_measure ( const uint32_t *str, size_t *size )
-{
-    uint32_t i, ch;
-
-    for ( ch = str [ i = 0 ]; ch != 0 ; ch = str [ ++ i ] )
-    {
-        char ignore [ 8 ];
-        if ( utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch ) <= 0 )
-            break;
-    }
-
-    * size = i * sizeof * str;
-
-    return i;
-}
-
-/* whcar_string_size/len/measure
- *  measures whcar_t strings
- */
-LIB_EXPORT size_t CC wchar_string_size ( const wchar_t *str )
-{
-    uint32_t i, ch;
-
-    for ( ch = str [ i = 0 ]; ch != 0 ; ch = str [ ++ i ] )
-    {
-        char ignore [ 8 ];
-        if ( utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch ) <= 0 )
-            break;
-    }
-
-    return i * sizeof * str;
-}
-
-LIB_EXPORT uint32_t CC wchar_string_len ( const wchar_t *str, size_t size )
-{
-    uint32_t i, str_len = ( uint32_t ) ( size / sizeof * str );
-
-    for ( i = 0; i < str_len; ++ i )
-    {
-        char ignore [ 8 ];
-        uint32_t ch = str [ i ];
-        if ( utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch ) <= 0 )
-            break;
-    }
-
-    return i;
-}
-
-LIB_EXPORT uint32_t CC wchar_string_measure ( const wchar_t *str, size_t *size )
-{
-    uint32_t i, ch;
-
-    for ( ch = str [ i = 0 ]; ch != 0 ; ch = str [ ++ i ] )
-    {
-        char ignore [ 8 ];
-        if ( utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch ) <= 0 )
-            break;
-    }
-
-    * size = i * sizeof * str;
-
-    return i;
-}
diff --git a/libs/klib/time.c b/libs/klib/time.c
deleted file mode 100644
index c9d8f99..0000000
--- a/libs/klib/time.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <klib/time.h> /* KSleep */
-
-LIB_EXPORT rc_t CC KSleep(uint32_t seconds) { return KSleepMs(seconds * 1000); }
diff --git a/libs/klib/token.c b/libs/klib/token.c
deleted file mode 100644
index 4bb6f9a..0000000
--- a/libs/klib/token.c
+++ /dev/null
@@ -1,1291 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/token.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-
-/* for parser simplicity before the days of expressions,
-   signed numerals were recognized as single tokens, i.e.
-   (+/-)NUM with no separating white space was a single token */
-#define SUPPORT_SIGNED_NUMERALS 0
-
-/*--------------------------------------------------------------------------
- * KToken
- *  a string with an id and source information
- */
-
-/* hex_to_int
- *  where 'c' is known to be hex
- */
-static
-unsigned int CC hex_to_int ( char c )
-{
-    int i = c - '0';
-    if ( c > '9' )
-    {
-        if ( c < 'a' )
-            i = c - 'A' + 10;
-        else
-            i = c - 'a' + 10;
-    }
-
-    assert ( i >= 0 && i < 16 );
-    return i;
-}
-
-static
-rc_t CC StringConvertHex ( const String *self, uint64_t *ip, int bits )
-{
-    uint32_t i;
-    uint64_t i64 = hex_to_int ( self -> addr [ 2 ] );
-    for ( i = 3; i < self -> len; ++ i )
-    {
-        i64 <<= 4;
-        i64 += hex_to_int ( self -> addr [ i ] );
-    }
-
-    if ( bits < 64 && ( i64 >> bits ) != 0 )
-        return RC ( rcVDB, rcToken, rcConverting, rcRange, rcExcessive );
-
-    * ip = i64;
-    return 0;
-}
-
-static
-rc_t CC StringConvertOctal ( const String *self, uint64_t *ip, int bits )
-{
-    uint32_t i;
-    uint64_t i64 = 0;
-    for ( i = 1; i < self -> len; ++ i )
-    {
-        i64 <<= 3;
-        i64 += self -> addr [ i ] - '0';
-    }
-
-    if ( bits < 64 && ( i64 >> bits ) != 0 )
-        return RC ( rcVDB, rcToken, rcConverting, rcRange, rcExcessive );
-
-    * ip = i64;
-    return 0;
-}
-
-static
-rc_t CC StringConvertDecimal ( const String *self, uint64_t *ip, int bits )
-{
-    uint32_t i;
-    uint64_t i64;
-
-    if ( bits > 32 )
-    {
-        i64 = self -> addr [ 0 ] - '0';
-        for ( i = 1; i < self -> len; ++ i )
-        {
-            i64 *= 10;
-            i64 += self -> addr [ i ] - '0';
-        }
-    }
-    else
-    {
-        uint32_t i32 = self -> addr [ 0 ] - '0';
-        for ( i = 1; i < self -> len; ++ i )
-        {
-            i32 *= 10;
-            i32 += self -> addr [ i ] - '0';
-        }
-        i64 = i32;
-    }
-
-    if ( bits < 64 && ( i64 >> bits ) != 0 )
-        return RC ( rcVDB, rcToken, rcConverting, rcRange, rcExcessive );
-
-    * ip = i64;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KTokenToI32 ( const KToken *self, int32_t *i )
-{
-    rc_t rc;
-    int64_t i64;
-
-    switch ( self -> id )
-    {
-    case eDecimal:
-        rc = StringConvertDecimal ( & self -> str, ( uint64_t* ) & i64, 31 );
-        break;
-    case eHex:
-        rc = StringConvertHex ( & self -> str, ( uint64_t* ) & i64, 31 );
-        break;
-    case eOctal:
-        rc = StringConvertOctal ( & self -> str, ( uint64_t* ) & i64, 31 );
-        break;
-    default:
-        return RC ( rcVDB, rcToken, rcConverting, rcType, rcIncorrect );
-    }
-
-    if ( rc == 0 )
-        * i = ( int32_t ) i64;
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTokenToU32 ( const KToken *self, uint32_t *i )
-{
-    rc_t rc;
-    uint64_t i64;
-
-    switch ( self -> id )
-    {
-    case eDecimal:
-        rc = StringConvertDecimal ( & self -> str, & i64, 32 );
-        break;
-    case eHex:
-        rc = StringConvertHex ( & self -> str, & i64, 32 );
-        break;
-    case eOctal:
-        rc = StringConvertOctal ( & self -> str, & i64, 32 );
-        break;
-    default:
-        return RC ( rcVDB, rcToken, rcConverting, rcType, rcIncorrect );
-    }
-
-    if ( rc == 0 )
-        * i = ( uint32_t ) i64;
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTokenToI64 ( const KToken *self, int64_t *i )
-{
-    switch ( self -> id )
-    {
-    case eDecimal:
-        return StringConvertDecimal ( & self -> str, ( uint64_t* ) i, 63 );
-    case eHex:
-        return StringConvertHex ( & self -> str, ( uint64_t* ) i, 63 );
-    case eOctal:
-        return StringConvertOctal ( & self -> str, ( uint64_t* ) i, 63 );
-    }
-
-    return RC ( rcVDB, rcToken, rcConverting, rcType, rcIncorrect );
-}
-
-LIB_EXPORT rc_t CC KTokenToU64 ( const KToken *self, uint64_t *i )
-{
-    switch ( self -> id )
-    {
-    case eDecimal:
-        return StringConvertDecimal ( & self -> str, i, 64 );
-    case eHex:
-        return StringConvertHex ( & self -> str, i, 64 );
-    case eOctal:
-        return StringConvertOctal ( & self -> str, i, 64 );
-    }
-
-    return RC ( rcVDB, rcToken, rcConverting, rcType, rcIncorrect );
-}
-
-LIB_EXPORT rc_t CC KTokenToF64 ( const KToken *self, double *d )
-{
-    char buffer [ 256 ], *end;
-
-    switch ( self -> id )
-    {
-    case eDecimal:
-    case eFloat:
-    case eExpFloat:
-        break;
-    case eOctal:
-        if ( self -> str . len == 1 )
-            break;
-    default:
-        return RC ( rcVDB, rcToken, rcConverting, rcType, rcIncorrect );
-    }
-
-    if ( string_copy ( buffer, sizeof buffer,
-             self -> str . addr, self -> str . size ) == sizeof buffer )
-    {
-        return RC ( rcVDB, rcToken, rcConverting, rcToken, rcExcessive );
-    }
-
-    * d = strtod ( buffer, & end );
-    if ( ( end - buffer ) != self -> str . size )
-        return RC ( rcVDB, rcToken, rcConverting, rcToken, rcInvalid );
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KTokenToVersion ( const KToken *self, uint32_t *vp )
-{
-    rc_t rc;
-    String str;
-    uint64_t i;
-    uint32_t v = 0;
-
-    const char *dot;
-    const char *start = self -> str . addr;
-    const char *end = start + self -> str . size;
-
-    switch ( self -> id )
-    {
-        /* three-part versions */
-    case eMajMinRel:
-        dot = string_rchr ( start, end - start, '.' ) + 1;
-        assert ( dot > start && dot < end );
-        StringInit ( & str, dot, (size_t)( end - dot ), (uint32_t)( end - dot ) );
-        rc = StringConvertDecimal ( & str, & i, 16 );
-        if ( rc != 0 )
-            break;
-
-        v = ( uint32_t ) i;
-        end = dot - 1;
-
-        /* two-part versions */
-    case eFloat:
-        dot = string_rchr ( start, end - start, '.' );
-        if ( dot == start )
-            return RC ( rcVDB, rcToken, rcConverting, rcType, rcIncorrect );
-        if ( ++ dot == end )
-            return RC ( rcVDB, rcToken, rcConverting, rcType, rcIncorrect );
-        StringInit ( & str, dot, (size_t)( end - dot ), (uint32_t)( end - dot ) );
-        rc = StringConvertDecimal ( & str, & i, 8 );
-        if ( rc != 0 )
-            break;
-
-        v |= ( uint32_t ) ( i << 16 );
-        end = dot - 1;
-
-        /* single-part versions */
-    case eOctal:
-    case eDecimal:
-        StringInit ( & str, start, (size_t)( end - start ), (uint32_t)( end - start ) );
-        rc = StringConvertDecimal ( & str, & i, 8 );
-        if ( rc != 0 )
-            break;
-
-        v |= ( uint32_t ) ( i << 24 );
-        break;
-
-    default:
-        return RC ( rcVDB, rcToken, rcConverting, rcType, rcIncorrect );
-    }
-
-    if ( rc == 0 )
-        * vp = v;
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTokenToString ( const KToken *self, char *buffer, size_t bsize, size_t *size )
-{
-    size_t i, j, sz = self -> str . size;
-
-    switch ( self -> id )
-    {
-    case eEndOfInput:
-        * size = 0;
-        return 0;
-
-    case eString:
-        -- sz;
-    case eUntermString:
-        * size = sz - 1;
-
-        if ( sz >= bsize )
-            return RC ( rcVDB, rcToken, rcConverting, rcBuffer, rcInsufficient );
-
-        string_copy ( buffer, bsize, self -> str . addr + 1, sz - 1 );
-        return 0;
-
-    case eEscapedString:
-        -- sz;
-    case eUntermEscapedString:
-        /* leave initial quote at str[0] in count */
-        break;
-
-    default:
-        * size = sz;
-
-        if ( sz + 1 >= bsize )
-            return RC ( rcVDB, rcToken, rcConverting, rcBuffer, rcInsufficient );
-
-        string_copy ( buffer, bsize, self -> str . addr, sz );
-        return 0;
-    }
-
-    /* walk across string starting at offset 1
-       to skip initial quote that was left in "sz" */
-    for ( i = 1, j = 0, -- bsize; i < sz; ++ i )
-    {
-        if ( j == bsize )
-            return RC ( rcVDB, rcToken, rcConverting, rcBuffer, rcInsufficient );
-
-        if ( ( buffer [ j ] = self -> str . addr [ i ] ) == '\\' )
-        {
-            if ( ++ i == sz )
-                break;
-            switch ( self -> str . addr [ i ] )
-            {
-                /* control characters */
-            case 'n':
-                buffer [ j ] = '\n';
-                break;
-            case 't':
-                buffer [ j ] = '\t';
-                break;
-            case 'r':
-                buffer [ j ] = '\r';
-                break;
-            case '0':
-                buffer [ j ] = '\0';
-                break;
-
-            case 'a':
-                buffer [ j ] = '\a';
-                break;
-            case 'b':
-                buffer [ j ] = '\b';
-                break;
-            case 'v':
-                buffer [ j ] = '\v';
-                break;
-            case 'f':
-                buffer [ j ] = '\f';
-                break;
-
-            case 'x': case 'X':
-                /* expect 2 additional hex characters */
-                if ( ( i + 2 ) < sz &&
-                     isxdigit ( self -> str . addr [ i + 1 ] ) &&
-                     isxdigit ( self -> str . addr [ i + 2 ] ) )
-                {
-                    /* go ahead and convert */
-                    buffer [ j ] = ( char )
-                        ( ( hex_to_int ( self -> str . addr [ i + 1 ] ) << 4 ) |
-                          hex_to_int ( self -> str . addr [ i + 2 ] ) );
-                    i += 2;
-                    break;
-                }
-                /* no break */
-
-                /* just quote self */
-            default:
-                buffer [ j ] = self -> str . addr [ i ];
-            }
-        }
-
-        ++ j;
-    }
-
-    * size = j;
-    return 0;
-}
-
-static
-rc_t CC utf8_utf32_cvt_string_copy ( uint32_t *dst, uint32_t blen, uint32_t *dlen, const char *src, size_t ssize )
-{
-    int rslt, len;
-    const char *end = src + ssize;
-
-    for ( len = 0; src < end; ++ len, src += rslt )
-    {
-        if ( len == blen )
-            return RC ( rcVDB, rcToken, rcConverting, rcBuffer, rcInsufficient );
-
-        rslt = utf8_utf32 ( & dst [ len ], src, end );
-        if ( rslt <= 0 )
-        {
-            if ( rslt == 0 )
-                return RC ( rcVDB, rcToken, rcConverting, rcString, rcInsufficient );
-
-            return RC ( rcVDB, rcToken, rcConverting, rcString, rcCorrupt );
-        }
-    }
-
-    * dlen = len;
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KTokenToWideString ( const KToken *self, uint32_t *buffer, uint32_t blen, uint32_t *len )
-{
-    int rslt;
-    const char *start, *end;
-    size_t i, sz = self -> str . size;
-
-    switch ( self -> id )
-    {
-    case eEndOfInput:
-        * len = 0;
-        return 0;
-
-    case eString:
-        -- sz;
-    case eUntermString:
-        return utf8_utf32_cvt_string_copy ( buffer, blen, len, self -> str . addr + 1, sz - 1 );
-
-    case eEscapedString:
-        -- sz;
-    case eUntermEscapedString:
-        -- sz;
-        break;
-
-    default:
-        return utf8_utf32_cvt_string_copy ( buffer, blen, len, self -> str . addr, sz );
-    }
-
-    /* get start and end pointers for utf8 string */
-    start = self -> str . addr + 1;
-    end = start + sz;
-
-    for ( i = 0; start < end; ++ i, start += rslt )
-    {
-        if ( i == blen )
-            return RC ( rcVDB, rcToken, rcConverting, rcBuffer, rcInsufficient );
-
-        rslt = utf8_utf32 ( & buffer [ i ], start, end );
-        if ( rslt <= 0 )
-        {
-            if ( rslt == 0 )
-                return RC ( rcVDB, rcToken, rcConverting, rcString, rcInsufficient );
-
-            return RC ( rcVDB, rcToken, rcConverting, rcString, rcCorrupt );
-        }
-
-        if ( buffer [ i ] == ( uint32_t ) '\\' )
-        {
-            rslt = utf8_utf32 ( & buffer [ i ], start += rslt, end );
-            if ( rslt <= 0 )
-            {
-                if ( rslt == 0 )
-                    return RC ( rcVDB, rcToken, rcConverting, rcString, rcInsufficient );
-
-                return RC ( rcVDB, rcToken, rcConverting, rcString, rcCorrupt );
-            }
-
-            if ( rslt == 1 ) switch ( ( char ) buffer [ i ] )
-            {
-                /* control characters */
-            case 'r':
-                buffer [ i ] = '\r';
-                break;
-            case 'n':
-                buffer [ i ] = '\n';
-                break;
-            case 't':
-                buffer [ i ] = '\t';
-                break;
-            case '0':
-                buffer [ i ] = '\0';
-                break;
-
-            case 'a':
-                buffer [ i ] = '\a';
-                break;
-            case 'b':
-                buffer [ i ] = '\b';
-                break;
-            case 'v':
-                buffer [ i ] = '\v';
-                break;
-            case 'f':
-                buffer [ i ] = '\f';
-                break;
-
-            case 'x': case 'X':
-                /* expect 2 additional hex characters */
-                if ( ( start + 2 ) < end &&
-                     isxdigit ( start [ 1 ] ) &&
-                     isxdigit ( start [ 2 ] ) )
-                {
-                    /* go ahead and convert */
-                    buffer [ i ] =
-                        ( ( hex_to_int ( start [ 1 ] ) << 4 ) |
-                            hex_to_int ( start [ 2 ] ) );
-                    start += 2;
-                }
-                break;
-
-            case 'u': case 'U':
-                /* expect 4 additional hex characters */
-                if ( ( start + 4 ) < end &&
-                     isxdigit ( start [ 1 ] ) &&
-                     isxdigit ( start [ 2 ] ) &&
-                     isxdigit ( start [ 3 ] ) &&
-                     isxdigit ( start [ 4 ] ) )
-                {
-                    /* go ahead and convert */
-                    buffer [ i ] =
-                        ( ( hex_to_int ( start [ 1 ] ) << 12 ) |
-                          ( hex_to_int ( start [ 2 ] ) << 8 ) |
-                          ( hex_to_int ( start [ 3 ] ) << 4 ) |
-                            hex_to_int ( start [ 4 ] ) );
-                    start += 4;
-                }
-                break;
-            }
-        }
-    }
-
-    * len = (uint32_t)i;
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * KTokenSource
- */
-
-
-/* Return
- *  returns token to source
- */
-LIB_EXPORT void CC KTokenSourceReturn ( KTokenSource *self, const KToken *t )
-{
-    if ( self != NULL && t != NULL )
-    {
-        if ( t -> str . addr + t -> str . size == self -> str . addr )
-        {
-            self -> str . addr = t -> str . addr;
-            self -> str . size += t -> str . size;
-            self -> str . len += t -> str . len;
-        }
-    }
-}
-
-
-/* Consume
- *  consumes all remaining data
- */
-LIB_EXPORT void CC KTokenSourceConsume ( KTokenSource *self )
-{
-    if ( self != NULL )
-    {
-        self -> str . addr += self -> str . size;
-        self -> str . len = 0;
-        self -> str . size = 0;
-    }
-}
-
-
-/* Extend
- *  try to make more data available
- */
-static
-rc_t CC KTokenSourceExtend ( KTokenSource *src )
-{
-    KTokenText *tt = ( KTokenText* ) src -> txt;
-    if ( tt -> read != NULL )
-    {
-        rc_t rc = ( * tt -> read ) ( tt -> data, tt, src -> str . size );
-        if ( rc != 0 )
-            return rc;
-        src -> str = tt -> str;
-    }
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * KTokenizer
- *  an encapsulation of the tokenizer code
- */
-
-/* Next
- *  get next token
- */
-#if CHECK_TOKENIZER
-static KToken * CC KTokenizerNextInt
-#else
-LIB_EXPORT KToken * CC KTokenizerNext
-#endif
- ( const KTokenizer *self, KTokenSource *src, KToken *t )
-{
-    int id;
-    const unsigned char *start, *stop;
-    bool return_eoln, allow_slash_slash, allow_hash_cmt, try_extend, path_ident;
-
-#define ispathident(c) ( isalnum (c) || (c) == '.' || (c) == '-' || (c) == '_' )
-
-    if ( t == NULL || src == NULL )
-        return NULL;
-
-    start = ( const unsigned char* ) src -> str . addr;
-    stop = start + src -> str . size;
-
-    /* glue token to text */
-    t -> txt = src -> txt;
-
-    /* no symbol */
-    t -> sym = NULL;
-
-    /* detect returning eoln */
-    return_eoln = ( self == kLineTokenizer );
-
-    /* the POSIX tokenizer doesn't want // comments */
-    allow_slash_slash = ( self != kPOSIXPathTokenizer );
-    allow_hash_cmt = ( self == kPOSIXPathTokenizer );
-    path_ident =  ( self == kPOSIXPathTokenizer );
-
-restart:
-
-    /* skip over blanks */
-    while ( start < stop && isspace ( * start ) )
-    {
-        switch ( * start )
-        {
-        case '\r':
-            t -> str . addr = ( const char* ) start;
-            if ( start + 1 < stop && start [ 1 ] == '\n' )
-                ++ start;
-            if ( ! return_eoln )
-            {
-                ++ src -> lineno;
-                break;
-            }
-            else
-            {
-        case '\n':
-                t -> str . addr = ( const char* ) start;
-                if ( start + 1 < stop && start [ 1 ] == '\r' )
-                    ++ start;
-                if ( ! return_eoln )
-                {
-                    ++ src -> lineno;
-                    break;
-                }
-            }
-
-            t -> str . len = (uint32_t)( start - ( const unsigned char* ) t -> str . addr );
-            t -> str . size = t -> str . len;
-            t -> lineno = src -> lineno ++;
-            t -> id = eEndOfLine;
-
-            src -> str . size -= start - ( const unsigned char* ) src -> str . addr;
-            src -> str . len -= (uint32_t)( start - ( const unsigned char* ) src -> str . addr );
-            src -> str . addr = ( const char* ) start;
-
-            return t;
-        }
-
-        ++ start;
-    }
-
-    /* detect end */
-    if ( start == stop )
-    {
-        src -> str . addr = ( const char* ) start;
-        src -> str . size = 0;
-        src -> str . len = 0;
-
-        KTokenSourceExtend ( src );
-        start = ( const unsigned char* ) src -> str . addr;
-        stop = start + src -> str . size;
-        if ( start != stop )
-            goto restart;
-
-        t -> str = src -> str;
-        t -> lineno = src -> lineno;
-        t -> id = eEndOfInput;
-        return t;
-    }
-
-    /* record start of token */
-    t -> str . addr = ( const char* ) start;
-    t -> lineno = src -> lineno;
-
-    /* many symbols do not need extend */
-    try_extend = false;
-
-    /* tokenize */
-    if ( isdigit ( * start ) )
-    {
-        try_extend = true;
-
-        /* assume numeral */
-        if ( * start != '0' )
-        {
-            id = eDecimal;
-#if SUPPORT_SIGNED_NUMERALS
-tokenize_decimal:
-#endif
-            while ( ++ start < stop )
-            {
-                if ( ! isdigit ( * start ) )
-                {
-                    if ( isalpha ( * start ) || * start == '_' )
-                    {
-                        if ( id != eDecimal )
-                            break;
-                        id = eName;
-                        goto tokenize_name;
-                    }
-                    if ( * start == '.' )
-                        goto tokenize_float;
-                    break;
-                }
-            }
-        }
-        else
-        {
-            if ( ( stop - start ) >= 3 &&
-                 ( start [ 1 ] == 'x' || start [ 1 ] == 'X' ) &&
-                 isxdigit ( start [ 2 ] ) )
-            {
-                id = eHex;
-                for ( start += 3; start < stop; ++ start )
-                {
-                    if ( ! isxdigit ( * start ) )
-                    {
-                        if ( isalpha ( * start ) || * start == '_' )
-                        {
-                            id = eName;
-                            goto tokenize_name;
-                        }
-                        break;
-                    }
-                }
-            }
-            else
-            {
-                id = eOctal;
-                while ( ++ start < stop )
-                {
-                    if ( ! isdigit ( * start ) )
-                    {
-                        if ( isalpha ( * start ) || * start == '_' )
-                        {
-                            id = eName;
-                            goto tokenize_name;
-                        }
-                        if ( * start == '.' )
-                            goto tokenize_float;
-                        break;
-                    }
-
-                    if ( * start > '7' )
-                        id = eDecimal;
-                }
-            }
-        }
-    }
-    else if ( isalpha ( * start ) )
-    {
-tokenize_ident:
-        try_extend = true;
-
-        id = eIdent;
-
-tokenize_name:
-        while ( ++ start < stop )
-        {
-            if ( path_ident && ( *start  == '.' || *start == '-' ) )
-                continue;
-
-            if ( ! isalnum ( * start ) && * start != '_' )
-                break;
-        }
-    }
-    else switch ( * start ++ )
-    {
-    case '_':
-        -- start;
-        goto tokenize_ident;
-    case '\'':
-        try_extend = true;
-        for ( id = eUntermString; start < stop; ++ start )
-        {
-            if ( * start == '\'' )
-            {
-                ++ id;
-                start += 1;
-                break;
-            }
-
-            if ( * start == '\\' )
-            {
-                id = eUntermEscapedString;
-                if ( ++ start == stop )
-                    break;
-            }
-        }
-        break;
-
-    case '"':
-        try_extend = true;
-        for ( id = eUntermString; start < stop; ++ start )
-        {
-            if ( * start == '"' )
-            {
-                ++ id;
-                start += 1;
-                break;
-            }
-
-            if ( * start == '\\' )
-            {
-                id = eUntermEscapedString;
-                if ( ++ start == stop )
-                    break;
-            }
-        }
-        break;
-
-    case '.':
-        if ( path_ident ) /* posix path parsing enabled */
-        {
-            /* find special identifier ".." by finding two periods not followed by 
-             * another identifier character
-             */
-            if ( start [ 0 ] == '.' && ! ispathident ( start [ 1 ]))
-            {
-                id = eDblPeriod;
-                break;
-            }
-            if ( isalnum ( * start ) || * start == '.' || * start == '_' || * start == '-' )
-            {
-                id = eName;
-                goto tokenize_name;
-            }
-        }
-        if ( stop > start && isdigit ( * start ) )
-        {
-tokenize_float:
-            try_extend = true;
-            id = eFloat;
-            while ( ++ start < stop )
-            {
-                if ( ! isdigit ( * start ) )
-                {
-                    if ( id != eFloat )
-                        break;
-                    if ( ( stop - start ) < 2 || ! isdigit ( start [ 1 ] ) )
-                        break;
-                    if ( * start == '.' )
-                        id = eMajMinRel;
-                    else if ( * start == 'e' || * start == 'E' )
-                        id = eExpFloat;
-                    else
-                    {
-                        break;
-                    }
-                    ++ start;
-                }
-            }
-            break;
-        }
-
-        if ( ( stop - start ) < 2 )
-            try_extend = true;
-        else if ( start [ 0 ] == '.' && start [ 1 ] == '.'  )
-        {
-            id = eEllipsis;
-            start += 2;
-            break;
-        }
-
-        id = ePeriod;
-        break;
-
-    case ',':
-        id = eComma;
-        break;
-    case ':':
-        id = eColon;
-        if ( start == stop )
-            try_extend = true;
-        else
-        {
-            switch ( start [ 0 ] )
-            {
-            case ':':
-                id = eDblColon;
-                start += 1;
-                break;
-            case '=':
-                id = eColonAssign;
-                start += 1;
-                break;
-            }
-        }
-        break;
-    case ';':
-        id = eSemiColon;
-        break;
-    case '?':
-        id = eQuestion;
-        break;
-    case '~':
-        id = eTilde;
-        break;
-    case '!':
-        id = eExclam;
-        if ( start == stop )
-            try_extend = true;
-        else if ( start [ 0 ] == '=' )
-        {
-            id = eNotEqual;
-            start += 1;
-        }
-        break;
-    case '@':
-        id = eAtSign;
-        break;
-    case '#':
-        if ( allow_hash_cmt )
-            goto line_cmt;
-        id = eHash;
-        break;
-    case '$':
-        id = eDollar;
-        break;
-    case '%':
-        id = ePercent;
-        break;
-    case '^':
-        id = eCaret;
-        break;
-    case '&':
-        id = eAmpersand;
-        if ( start == stop )
-            try_extend = true;
-        if ( start [ 0 ] == '&' )
-        {
-            id = eLogAnd;
-            start += 1;
-        }
-        break;
-    case '*':
-        id = eAsterisk;
-        break;
-    case '+':
-#if SUPPORT_SIGNED_NUMERALS
-        if ( start == stop )
-            try_extend = true;
-        else
-        {
-            if ( isdigit ( * start ) )
-            {
-                id = eSignedDec;
-                try_extend = true;
-                goto tokenize_decimal;
-            }
-            if ( start [ 0 ] == '=' )
-            {
-                id = ePlusAssign;
-                start += 1;
-                break;
-            }
-        }
-#endif
-        id = ePlus;
-        break;
-    case '-':
-#if SUPPORT_SIGNED_NUMERALS
-        if ( start == stop )
-            try_extend = true;
-        else
-        {
-            if ( isdigit ( * start ) )
-            {
-                id = eSignedDec;
-                try_extend = true;
-                goto tokenize_decimal;
-            }
-            if ( * start == '>' )
-            {
-                id = eOverArrow;
-                start += 1;
-                break;
-            }
-        }
-#endif
-        id = eMinus;
-        break;
-    case '=':
-        id = eAssign;
-        if ( start == stop )
-            try_extend = true;
-        else if ( start [ 0 ] == '=' )
-        {
-            id = eEqual;
-            start += 1;
-        }
-        break;
-    case '/':
-        id = eFwdSlash;
-        if ( start == stop )
-            try_extend = true;
-        else switch ( start [ 0 ] )
-        {
-        case '/':
-            if ( ! allow_slash_slash )
-                break;
-            ++ start;
-line_cmt:
-            try_extend = true;
-            for ( ; start < stop; ++ start )
-            {
-                switch ( start [ 0 ] )
-                {
-                case '\r':
-                case '\n':
-                    goto comment_restart;
-                }
-            }
-comment_restart:
-            src -> str . len -= string_len ( src -> str . addr, ( const char* ) start - src -> str . addr );
-            src -> str . size -= ( const char* ) start - src -> str . addr;
-            src -> str . addr = ( const char* ) start;
-            goto restart;
-
-        case '*':
-            try_extend = true;
-            id = eUntermComment;
-            if ( ++ start < stop ) switch ( start [ 0 ] )
-            {
-            case '\r':
-                if ( start + 1 < stop && start [ 1 ] == '\n' )
-                    ++ start;
-                ++ src -> lineno;
-                break;
-            case '\n':
-                if ( start + 1 < stop && start [ 1 ] == '\r' )
-                    ++ start;
-                ++ src -> lineno;
-                break;
-            }
-            for ( ++ start; start < stop; ++ start )
-            {
-                switch ( start [ 0 ] )
-                {
-                case '/':
-                    if ( start [ -1 ] == '*' )
-                    {
-                        ++ start;
-                        goto comment_restart;
-                    }
-                    break;
-                case '\r':
-                    if ( start + 1 < stop && start [ 1 ] == '\n' )
-                        ++ start;
-                    ++ src -> lineno;
-                    break;
-                case '\n':
-                    if ( start + 1 < stop && start [ 1 ] == '\r' )
-                        ++ start;
-                    ++ src -> lineno;
-                    break;
-                }
-            }
-            break;
-        }
-        break;
-    case '\\':
-        id = eBackSlash;
-        break;
-    case '|':
-        id = ePipe;
-        if ( start == stop )
-            try_extend = true;
-        else if ( start [ 0 ] == '|' )
-        {
-            id = eLogOr;
-            start += 1;
-        }
-        break;
-    case '(':
-        id = eLeftParen;
-        break;
-    case ')':
-        id = eRightParen;
-        break;
-    case '{':
-        id = eLeftCurly;
-        break;
-    case '}':
-        id = eRightCurly;
-        break;
-    case '<':
-        id = eLeftAngle;
-        if ( start == stop )
-            try_extend = true;
-        else if ( start [ 0 ] == '<' )
-        {
-            id = eDblLeftAngle;
-            start += 1;
-        }
-        break;
-    case '>':
-        id = eRightAngle;
-        if ( start == stop )
-            try_extend = true;
-        else if ( start [ 0 ] == '>' )
-        {
-            id = eDblRightAngle;
-            start += 1;
-        }
-        break;
-    case '[':
-        id = eLeftSquare;
-        if ( start == stop )
-            try_extend = true;
-        else if ( start [ 0 ] == '[' )
-        {
-            id = eDblLeftSquare;
-            start += 1;
-        }
-        break;
-    case ']':
-        id = eRightSquare;
-        if ( start == stop )
-            try_extend = true;
-        else if ( start [ 0 ] == ']' )
-        {
-            id = eDblRightSquare;
-            start += 1;
-        }
-        break;
-    default:
-        /* skip over single UTF-8 character */
-        if ( ( ( const char* ) start ) [ -1 ] < 0 )
-        {
-            while ( start < stop )
-            {
-                if ( ( * start & 0xC0 ) != 0x80 )
-                    break;
-                ++ start;
-            }
-        }
-
-        t -> str . len = 1;
-        t -> str . size = start - ( const unsigned char* ) t -> str . addr;
-
-        src -> str . addr = ( const char* ) start;
-        src -> str . len -= 1;
-        src -> str . size -= t -> str . size;
-
-        t -> id = eUnrecognized;
-        return t;
-    }
-
-    t -> str . len = (uint32_t)( start - ( const unsigned char* ) t -> str . addr );
-    t -> str . size = t -> str . len;
-    t -> id = id;
-
-    if ( ! try_extend || start < stop )
-    {
-        src -> str . size -= start - ( const unsigned char* ) src -> str . addr;
-        src -> str . len -= (uint32_t)( start - ( const unsigned char* ) src -> str . addr );
-        src -> str . addr = ( const char* ) start;
-    }
-    else
-    {
-        /* state that the amount left in source
-           is exactly what was tokenized */
-        src -> str = t -> str;
-
-        /* try to extend, which is successful
-           only if src ends up with more data */
-        KTokenSourceExtend ( src );
-        if ( src -> str . size > t -> str . size )
-        {
-            start = ( const unsigned char* ) src -> str . addr;
-            stop = start + src -> str . size;
-            goto restart;
-        }
-
-        /* out of data on source */
-        src -> str . addr = ( const char* ) stop;
-        src -> str . size = 0;
-        src -> str . len = 0;
-    }
-
-    return t;
-}
-
-#if CHECK_TOKENIZER
-#include <stdio.h>
-static
-void CC examine_src ( const KTokenSource *src, bool before )
-{
-    const KTokenText *tt = src -> txt;
-    const char *stage = before ? "before" : "after";
-
-    /* first test - are src addr and size correct */
-    if ( src -> str . addr + src -> str . size !=
-         tt -> str . addr + tt -> str . size )
-    {
-        /* in the case of console input before tokenization, this is allowed */
-        if ( before && src -> str . size == 0 && tt -> read != NULL )
-            return;
-
-        /* check for src addr being within text */
-        if ( src -> str . addr < tt -> str . addr ||
-             src -> str . addr >= tt -> str . addr + tt -> str . size )
-        {
-            fprintf ( stderr, "KTokenizerNext: bad src address %s scan\n", stage );
-        }
-        else
-        {
-            fprintf ( stderr, "KTokenizerNext: bad src size ( %lu ) %s scan "
-                      "at file \"%.*s\" offset %lu\n"
-                      , ( long unsigned ) src -> str . size
-                      , stage
-                      , ( int ) tt -> path . size, tt -> path . addr
-                      , ( long unsigned ) ( src -> str . addr - tt -> str . addr ) );
-        }
-    }
-
-    /* test number of characters */
-    else
-    {
-        uint32_t len = string_len ( src -> str . addr, src -> str . size );
-        if ( len != src -> str . len )
-        {
-            fprintf ( stderr, "KTokenizerNext: bad src character count "
-                      "( %u measured, %u stated ) %s scan\n", len, src -> str . len, stage );
-        }
-    }
-}
-
-LIB_EXPORT KToken * CC KTokenizerNext ( const KTokenizer *self, KTokenSource *src, KToken *t )
-{
-    KToken *rt;
-    examine_src ( src, true );
-    rt = KTokenizerNextInt ( self, src, t );
-    examine_src ( src, false );
-    return rt;
-}
-#endif
diff --git a/libs/klib/trie-priv.h b/libs/klib/trie-priv.h
deleted file mode 100644
index 3796ef7..0000000
--- a/libs/klib/trie-priv.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_trie_priv_
-#define _h_trie_priv_
-
-#ifndef _h_klib_trie_
-#include <klib/trie.h>
-#endif
-
-
-/*--------------------------------------------------------------------------
- * TTrans
- *  a text transition node
- */
-typedef struct TTrans TTrans;
-struct TTrans
-{
-    /* child nodes */
-    TTrans **child;
-
-    /* values associated with the node */
-    BSTree vals;
-
-    /* the depth occupied within tree */
-    uint32_t depth;
-
-    /* number of transitions in array */
-    uint16_t tcnt;
-
-    /* number of values in b-tree */
-    uint16_t vcnt;
-};
-
-/* TTransBacktrace
- *  describes a TTrans
- *  with backtrace pointer to parent and transition index from parent
- */
-typedef struct TTransBacktrace TTransBacktrace;
-struct TTransBacktrace
-{
-    const TTransBacktrace *par;
-    const TTrans *trans;
-    uint32_t idx;
-};
-
-/* TTransForEach
- * TTransForEachBT
- */
-void TTransForEach ( const TTrans *trans, uint32_t width,
-    void ( CC * f ) ( const TTransBacktrace *bt, uint32_t width, void *data ), void *data );
-void TTransForEachBT ( const TTransBacktrace *bt, uint32_t width,
-    void ( CC * f ) ( const TTransBacktrace *bt, uint32_t width, void *data ), void *data );
-
-/* TTransDoUntil
- * TTransDoUntilBT
- */
-bool TTransDoUntil ( const TTrans *trans, uint32_t width,
-    bool ( CC * f ) ( const TTransBacktrace *bt, uint32_t width, void *data ), void *data );
-bool TTransDoUntilBT ( const TTransBacktrace *bt, uint32_t width,
-    bool ( CC * f ) ( const TTransBacktrace *bt, uint32_t width, void *data ), void *data );
-
-/* TTransValidate
- *  recursively checks structure
- */
-int TTransValidate ( const TTrans *trans, const Trie *tt );
-
-
-/*--------------------------------------------------------------------------
- * TTSearchNode
- *  this is a complicated guy.
- *
- *  if the only values allowed in a TTrans were terminal values,
- *  then the natural structure would imply a TTrans node for every
- *  path and a child array to hold children. the tree would be
- *  simple to navigate; searching would return TTrans nodes.
- *
- *  however, the structure abandons child arrays when the count
- *  is low enough, and allows non-terminal values in the value
- *  tree. a string may still terminate on a TTrans, but necessarily
- *  there will be strings that terminate in space.
- *
- *  to handle this, as well as to address non-intrusive list
- *  functionality, this search node is able to do too many things.
- *
- *  1) it allows a poor version of a child array to be added
- *     to an existing TTrans.
- *
- *  2) it defines a fake TTrans object with its own depth
- *     and value list.
- *
- *  3) the fake TTrans can itself be exploded to contain
- *     further fake TTrans objects
- *
- *  4) it functions as a non-intrusive reference to a TTNode
- *     for inclusion into temporary child lists.
- */
-enum
-{
-    snTrans,
-    snKeynode,
-    snTransEx,
-    snFakeTrans,
-    snFakeTransEx
-};
-
-typedef struct TTSearchNode TTSearchNode;
-struct TTSearchNode
-{
-    union
-    {
-        /* snTrans, snTransEx */
-        struct
-        {
-            const TTrans *ref;
-            DLList vals;
-            DLList child;
-
-        } trans;
-
-        /* snKeynode */
-        struct
-        {
-            DLNode n;
-            const TNode *ref;
-
-        } keynode;
-
-        /* snFakeTrans, snFakeTransEx */
-        struct
-        {
-            DLNode n;
-            DLList vals;
-            DLList child;
-            uint32_t depth;
-            uint32_t idx;
-
-        } fake;
-
-    } u;
-
-    uint32_t refcount;
-    uint32_t variant;
-};
-
-/* TTSearchNodeMakeTrans
- *  creates a reference node
- */
-rc_t TTSearchNodeMakeTrans ( TTSearchNode **s, const TTrans *trans );
-
-/* TTSearchNodeExplodeTrans
- *  explodes a simple TTrans to split values into term and non-term
- *  may create fake trans objects within "child"
- */
-rc_t TTSearchNodeExplodeTrans ( TTSearchNode *s, const Trie *tt );
-
-/* TTSearchNodeExplodeFakeTrans
- *  explodes a fake trans to split values into term and non-term
- *  may create fake trans objects within "child"
- */
-rc_t TTSearchNodeExplodeFakeTrans ( TTSearchNode *s, const Trie *tt );
-
-/* TTSearchNodeRelease
- *  releases a reference, and potentially the object
- */
-void TTSearchNodeRelease ( TTSearchNode *s );
-
-/* TTSearchNodeReuseTrans
- *  if a node has no other references,
- *  destructs and re-initializes the node for reuse.
- *
- *  otherwise, a new node is created.
- */
-rc_t TTSearchNodeReuseTrans ( TTSearchNode **s, const TTrans *trans );
-
-
-/*--------------------------------------------------------------------------
- * TTSearchNodeRef
- */
-typedef struct TTSearchNodeRef TTSearchNodeRef;
-struct TTSearchNodeRef
-{
-    DLNode n;
-    TTSearchNode *s;
-};
-
-/* TTSearchNodeRefMake
- */
-rc_t TTSearchNodeRefMake ( TTSearchNodeRef **ref, TTSearchNode *s );
-
-/* TTSearchNodeRefWhack
- * TTSearchNodeRefWhackAll
- */
-void TTSearchNodeRefWhack ( TTSearchNodeRef *p );
-void TTSearchNodeRefWhackAll ( DLNode *n, void *ignore );
-
-
-/*--------------------------------------------------------------------------
- * Trie
- */
-
-/* TrieMapChar
- *  maps a character to an index
- */
-uint32_t TrieMapChar ( const Trie *tt, uint32_t ch );
-
-/* TrieNextIdx
- *  pops a character from key string
- *  maps it to an index
- */
-rc_t TrieNextIdx ( const Trie *tt, String *key, uint32_t *idx );
-
-
-#endif /* _h_trie_priv_ */
diff --git a/libs/klib/trie.c b/libs/klib/trie.c
deleted file mode 100644
index f902ac2..0000000
--- a/libs/klib/trie.c
+++ /dev/null
@@ -1,1486 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include "trie-priv.h"
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <wctype.h>
-#include <errno.h>
-#include <assert.h>
-
-
-
-/*--------------------------------------------------------------------------
- * TNode
- *  a node within text tree
- */
-
-/* TNodeMake
- *  creates a TNode of variable size
- *
- *  "n" will contain the returned node
- *
- *  "size" must be at least the size of a TNode
- */
-LIB_EXPORT rc_t CC TNodeMake ( TNode **np, size_t size )
-{
-    TNode *n;
-
-    if ( np == NULL )
-        return RC ( rcCont, rcNode, rcAllocating, rcParam, rcNull );
-
-    if ( size < sizeof * n )
-        return RC ( rcCont, rcNode, rcAllocating, rcParam, rcInvalid );
-
-    n = malloc ( size );
-    if ( n == NULL )
-        return RC ( rcCont, rcNode, rcAllocating, rcMemory, rcExhausted );
-
-    * np = n;
-    return 0;
-}
-
-/* TNodeWhack
- *  performs final whacking of node
- */
-LIB_EXPORT void CC TNodeWhack ( TNode *n )
-{
-    free ( n );
-}
-
-/* TNodeCmp
- */
-static
-int64_t CC TNodeCmp ( const void *item, const void *n )
-{
-#define a ( ( const String* ) item )
-#define b ( ( const TNode* ) n )
-
-    return StringCompare ( a, & b -> key );
-
-#undef a
-#undef b
-}
-
-/* TNodeSort
- */
-static
-int64_t CC TNodeSort ( const BSTNode *item, const BSTNode *n )
-{
-#define a ( ( const TNode* ) item )
-#define b ( ( const TNode* ) n )
-
-    return StringCompare ( & a -> key, & b -> key );
-
-#undef a
-#undef b
-}
-
-/*--------------------------------------------------------------------------
- * TTrans
- *  a text transition node
- *
- *  transitions to child nodes occur only if "tcnt" != 0 ( "child" != NULL )
- *  and are taken on the query string's character [ key . len ]
- */
-
-/* TTransMake
- */
-static
-rc_t CC TTransMake ( TTrans **tp, uint32_t depth )
-{
-    TTrans *trans = malloc ( sizeof * trans );
-    if ( trans == NULL )
-        return RC ( rcCont, rcNode, rcAllocating, rcMemory, rcExhausted );
-
-    trans -> child = NULL;
-    trans -> tcnt = trans -> vcnt = 0;
-    BSTreeInit ( & trans -> vals );
-    trans -> depth = depth;
-
-    * tp = trans;
-    return 0;
-}
-
-/* TTransForEach
- */
-void TTransForEach ( const TTrans *trans, uint32_t width,
-    void ( CC * f ) ( const TTransBacktrace *bt, uint32_t width, void *data ), void *data )
-{
-    TTransBacktrace bt;
-    bt . par = NULL;
-    bt . trans = trans;
-    bt . idx = 0;
-
-    TTransForEachBT ( & bt, width, f, data );
-}
-
-void TTransForEachBT ( const TTransBacktrace *bt, uint32_t width,
-    void ( CC * f ) ( const TTransBacktrace *bt, uint32_t width, void *data ), void *data )
-{
-    const TTrans *trans = bt -> trans;
-
-    if ( f != NULL )
-        ( * f ) ( bt, width, data );
-
-    assert ( trans != NULL );
-    if ( trans -> child != NULL )
-    {
-        uint32_t i;
-        TTransBacktrace child;
-        for ( child . par = bt, i = 0; i < width; ++ i )
-        {
-            if ( ( child . trans = trans -> child [ i ] ) != NULL )
-            {
-                child . idx = ( uint32_t ) i;
-                TTransForEachBT ( & child, width, f, data );
-            }
-        }
-    }
-}
-
-/* TTransDoUntil
- */
-bool TTransDoUntil ( const TTrans *trans, uint32_t width,
-    bool ( CC * f ) ( const TTransBacktrace *bt, uint32_t width, void *data ), void *data )
-{
-    TTransBacktrace bt;
-    bt . par = NULL;
-    bt . trans = trans;
-    bt . idx = 0;
-
-    return TTransDoUntilBT ( & bt, width, f, data );
-}
-
-bool TTransDoUntilBT ( const TTransBacktrace *bt, uint32_t width,
-    bool ( CC * f ) ( const TTransBacktrace *bt, uint32_t width, void *data ), void *data )
-{
-    const TTrans *trans = bt -> trans;
-
-    if ( f != NULL )
-    {
-        if ( ( * f ) ( bt, width, data ) )
-            return true;
-    }
-
-    assert ( trans != NULL );
-    if ( trans -> child != NULL )
-    {
-        uint32_t i;
-        TTransBacktrace child;
-        for ( child . par = bt, i = 0; i < width; ++ i )
-        {
-            if ( ( child . trans = trans -> child [ i ] ) != NULL )
-            {
-                child . idx = ( uint32_t ) i;
-                if ( TTransDoUntilBT ( & child, width, f, data ) )
-                    return true;
-            }
-        }
-    }
-
-    return false;
-}
-
-/* TTransWhack
- */
-static
-void TTransWhack ( TTrans *trans, uint32_t width,
-    void ( CC * whack ) ( TNode *n, void *data ), void *data )
-{
-    if ( trans != NULL )
-    {
-        if ( trans -> child != NULL )
-        {
-            uint32_t i;
-            for ( i = 0; i < width; ++ i )
-            {
-                TTrans *child = trans -> child [ i ];
-                if ( child != NULL )
-                    TTransWhack ( child, width, whack, data );
-            }
-
-            free ( trans -> child );
-        }
-
-        BSTreeWhack ( & trans -> vals,
-            ( void ( CC * ) ( BSTNode*, void* ) ) whack, data );
-
-        free ( trans );
-    }
-}
-
-
-/*--------------------------------------------------------------------------
- * Trie
- *  a tree of text nodes
- */
-
-/* TrieInit
- *  initialize a text-tree structure
- *
- *  "accept" is a character-set string where each character
- *  represents itself. the only exception is the '-' character,
- *  which - when sandwiched between two other characters - is
- *  interpreted en tot as a range expression. an example would be
- *  "-0-9" is identical to "-0123456789"
- *
- *  "limit" sets the number of values to be accumulated in any
- *  container. if this limit would be exceeded by any insertion,
- *  the node is expanded and its values are re-distributed among
- *  its children.
- *
- *  if "cs_expand" is 1, then any valid characters observed
- *  during insertions are automatically added to the accept
- *  character set. doing so will ensure that there are no
- *  ambiguous transitions.
- *
- *  returns status codes:
- *    0      => success
- *    EINVAL => an invalid parameter
- *    ENOMEM => failed to allocate internal structures
- *    EDOM   => either the limit was too high or the accept string too wide
- */
-LIB_EXPORT rc_t CC TrieInit ( Trie *tt, const char *accept,
-    uint32_t limit, bool cs_expand )
-{
-    int ch_len;
-    const char *src, *end;
-
-    uint32_t ch, ch2;
-    uint32_t first, last, width;
-
-    uint16_t *map;
-    uint32_t *rmap;
-
-    if ( tt == NULL )
-        return RC ( rcCont, rcTrie, rcConstructing, rcSelf, rcNull );
-
-    if ( accept == NULL )
-        return RC ( rcCont, rcTrie, rcConstructing, rcString, rcNull );
-
-    if ( accept [ 0 ] == 0 )
-        return RC ( rcCont, rcTrie, rcConstructing, rcString, rcEmpty );
-
-    if ( ( limit >> 16 ) != 0 )
-        return RC ( rcCont, rcTrie, rcConstructing, rcParam, rcExcessive );
-
-    memset ( tt, 0, sizeof * tt );
-    tt -> limit = ( uint16_t ) limit;
-    tt -> cs_expand = cs_expand;
-
-    /* determine width of accept string
-       N.B. we don't detect overlaps at this point */
-    src = accept;
-    end = src + strlen ( accept );
-
-    for ( last = 0, first = ~ 0; src < end; )
-    {
-        /* get a character */
-        ch_len = utf8_utf32 ( & ch, src, end );
-        if ( ch_len <= 0 )
-            return RC ( rcCont, rcTrie, rcConstructing, rcChar, rcInvalid );
-        src += ch_len;
-
-        /* this character represents itself */
-        if ( ch < first )
-            first = ch;
-        if ( ch > last )
-            last = ch;
-
-        /* check for a range expression */
-        if ( src < end && src [ 0 ] == '-' )
-        {
-            ch_len = utf8_utf32 ( & ch2, ++ src, end );
-            if ( ch_len <= 0 )
-                return RC ( rcCont, rcTrie, rcConstructing, rcChar, rcInvalid );
-            src += ch_len;
-
-            /* this character represents
-               hopefully a reasonable range */
-            if ( ch2 < ch )
-                return RC ( rcCont, rcTrie, rcConstructing, rcChar, rcInvalid );
-            if ( ch2 > last )
-                last = ch2;
-        }
-    }
-
-    /* must have had something */
-    if ( last < first )
-        return RC ( rcCont, rcTrie, rcConstructing, rcString, rcInvalid );
-
-    tt -> first_char = first;
-    tt -> last_char = last;
-
-    /* create a character map of pure unknown index */
-    map = calloc ( last - first + 1, sizeof map [ 0 ] );
-    if ( map == NULL )
-        return RC ( rcCont, rcTrie, rcConstructing, rcMemory, rcExhausted );
-    tt -> map = map;
-
-    /* mark the character map */
-    for ( src = accept; src < end; )
-    {
-        /* get a character */
-        ch_len = utf8_utf32 ( & ch, src, end );
-        src += ch_len;
-
-        /* mark character */
-#if REJECT_ACCEPT_OVERLAP
-        if ( map [ ch - first ] != 0 )
-        {
-            free ( map );
-            return RC ( rcCont, rcTrie, rcConstructing, rcChar, rcInvalid );
-        }
-#endif
-        map [ ch - first ] = 1;
-
-        /* check for a range expression */
-        if ( src < end && src [ 0 ] == '-' )
-        {
-            ch_len = utf8_utf32 ( & ch2, ++ src, end );
-            src += ch_len;
-
-            /* mark range */
-            for ( ++ ch; ch <= ch2; ++ ch )
-            {
-#if REJECT_ACCEPT_OVERLAP
-                if ( map [ ch - first ] != 0 )
-                {
-                    free ( map );
-                    return RC ( rcCont, rcTrie, rcConstructing, rcChar, rcInvalid );
-                }
-#endif
-                map [ ch - first ] = 1;
-            }
-        }
-    }
-
-    /* fill in the character map and determine width */
-    for ( width = 0, ch = first; ch <= last; ++ ch )
-    {
-        if ( map [ ch - first ] != 0 )
-            map [ ch - first ] = ++ width;
-    }
-
-    /* enforce maximum width */
-    assert ( width > 0 );
-    if ( ( ++ width >> 16 ) != 0 )
-    {
-        free ( map );
-        return RC ( rcCont, rcTrie, rcConstructing, rcRange, rcExcessive );
-    }
-
-    /* record trans width accounting for unmapped slot */
-    tt -> width = ( uint16_t ) width;
-
-    /* now create a reverse map to produce characters
-       from an index */
-#if _DEBUGGING
-    rmap = calloc ( width, sizeof rmap [ 0 ] );
-#else
-    rmap = malloc ( width * sizeof rmap [ 0 ] );
-#endif
-    if ( rmap == NULL )
-    {
-        free ( map );
-        return RC ( rcCont, rcTrie, rcConstructing, rcMemory, rcExhausted );
-    }
-    tt -> rmap = rmap;
-
-    for ( rmap [ 0 ] = 0, ch = first; ch <= last; ++ ch )
-    {
-        uint32_t idx = map [ ch - first ];
-        if ( idx != 0 )
-            rmap [ idx ] = ch;
-    }
-
-    return 0;
-}
-
-/* TrieMapChar
- *  maps a character to an index
- */
-uint32_t TrieMapChar ( const Trie *tt, uint32_t ch )
-{
-    if ( ch >= tt -> first_char && ch <= tt -> last_char )
-        return tt -> map [ ch - tt -> first_char ];
-    return 0;
-}
-
-/* TrieNextIdx
- *  pops a character from key string
- *  maps it to an index
- */
-rc_t TrieNextIdx ( const Trie *tt, String *key, uint32_t *idx )
-{
-    uint32_t ch;
-    rc_t rc = StringPopHead ( key, & ch );
-    if ( rc == 0 )
-        * idx = TrieMapChar ( tt, ch );
-    return rc;
-}
-
-/* TrieAutoExpand
- *  incorporates a new character into the accept charset
- *
- *    1. extends all existing "child" arrays
- *    2. reallocs "map" if necessary, invalidating new space
- *    3. reallocs "rmap"
- *    4. installs character <-> index into map
- *    5. increments width
- *
- *  the order of execution is designed to be benign if
- *  failures occur, due only to memory exhaustion.
- */
-typedef struct AutoExpandData AutoExpandData;
-struct AutoExpandData
-{
-    rc_t rc;
-};
-
-static
-bool CC TTransAutoExpand ( const TTransBacktrace *bt, uint32_t width, void *data )
-{
-    TTrans **child, *trans = ( TTrans* ) bt -> trans;
-
-    assert ( trans != NULL );
-    if ( trans -> child == NULL )
-        return false;
-
-    child = realloc ( trans -> child, ( width + 1 ) * sizeof * child );
-    if ( child == NULL )
-    {
-        ( ( AutoExpandData* ) data ) -> rc =
-            RC ( rcCont, rcTrie, rcInserting, rcMemory, rcExhausted );
-        return true;
-    }
-
-    child [ width ] = NULL;
-    trans -> child = child;
-    return false;
-}
-
-static
-rc_t CC TrieAutoExpand ( Trie *tt, uint32_t ch )
-{
-    AutoExpandData pb;
-    pb . rc = 0;
-
-    /* extend node child arrays */
-    TTransDoUntil ( tt -> root, tt -> width, TTransAutoExpand, & pb );
-    if ( pb . rc == 0 )
-    {
-        uint16_t *map = ( uint16_t* ) tt -> map;
-        uint32_t *rmap = ( uint32_t* ) tt -> rmap;
-
-        /* realloc charset to index map if necessary */
-        if ( ch < tt -> first_char )
-        {
-            map = malloc ( ( tt -> last_char - ch + 1 ) * sizeof * map );
-            if ( map == NULL )
-                return RC ( rcCont, rcTrie, rcInserting, rcMemory, rcExhausted );
-            memset ( map, 0, ( tt -> first_char - ch ) * sizeof * map );
-            memcpy ( & map [ tt -> first_char - ch ], tt -> map,
-                ( tt -> last_char - tt -> first_char + 1 ) * sizeof * map );
-            free ( ( void* ) tt -> map );
-            tt -> first_char = ch;
-        }
-        else if ( ch > tt -> last_char )
-        {
-            map = realloc ( map, ( ch - tt -> first_char + 1 ) * sizeof * map );
-            if ( map == NULL )
-                return RC ( rcCont, rcTrie, rcInserting, rcMemory, rcExhausted );
-            memset ( & map [ tt -> last_char - tt -> first_char + 1 ], 0, ( ch - tt -> last_char ) * sizeof * map );
-            tt -> last_char = ch;
-        }
-
-        /* record any change */
-        tt -> map = map;
-
-        /* extend index to charset map */
-        rmap = realloc ( rmap, ( tt -> width + 1 ) * sizeof * rmap );
-        if ( rmap == NULL )
-            return RC ( rcCont, rcTrie, rcInserting, rcMemory, rcExhausted );
-
-        tt -> rmap = rmap;
-
-        /* it is done */
-        rmap [ tt -> width ] = ch;
-        map [ ch - tt -> first_char ] = tt -> width ++;
-    }
-
-    return pb . rc;
-}
-
-/* TrieValidateRemainder
- *  ensures that all characters remaining in key
- *  are valid and, in the case of expanding the char set,
- *  are in the character set.
- */
-static
-rc_t CC TrieValidateRemainder ( Trie *tt, const String *key )
-{
-    rc_t rc;
-    String rem = * key;
-
-    while ( 1 )
-    {
-        uint32_t ch;
-        rc = StringPopHead ( & rem, & ch );
-        if ( GetRCState ( rc ) == rcEmpty )
-            return 0;
-
-        if ( tt -> cs_expand )
-        {
-            uint32_t idx = TrieMapChar ( tt, ch );
-            if ( idx == 0 )
-            {
-                /* get the new width */
-                uint16_t width = tt -> width + 1;
-                
-                /* get a new value for idx */
-                idx = tt -> width;
-                
-                /* make sure the expansion would not exceed
-                   the 16 bit limit on array width */
-                if ( width == 0 )
-                {
-                    rc = RC ( rcCont, rcTrie, rcInserting, rcRange, rcExcessive );
-                    break;
-                }
-                
-                /* incorporate the character */
-                rc = TrieAutoExpand ( tt, ch );
-                if ( rc != 0 )
-                    break;
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* TrieExplodeTrans
- *  a TTrans has exceeded its limit of TNode values
- */
-typedef struct ExplodeTransData ExplodeTransData;
-struct ExplodeTransData
-{
-    const Trie *tt;
-    TTrans *trans;
-    size_t tsize;
-    uint32_t tcnt;
-    uint32_t cnt;
-    rc_t rc;
-    bool over;
-};
-
-static
-bool CC CreateKids ( BSTNode *n, void *data )
-{
-    ExplodeTransData *pb = data;
-    TNode *item = ( TNode* ) n;
-    const TTrans *trans = pb -> trans;
-
-    if ( item -> key . len > trans -> depth )
-    {
-        uint32_t idx;
-        String key = item -> key;
-        const Trie *tt = pb -> tt;
-
-        /* perform a sub-string based upon
-           knowledge that the entry key matches
-           the first "trans->depth" characters */
-        key . addr += pb -> tsize;
-        key . len -= trans -> depth;
-        key . size -= pb -> tsize;
-
-        /* get the next transition index */
-        pb -> rc = TrieNextIdx ( tt, & key, & idx );
-        if ( pb -> rc != 0 )
-            return true;
-
-        /* test the transition */
-        assert ( trans -> child != NULL );
-        if ( trans -> child [ idx ] == NULL )
-        {
-            /* create the transition */
-            pb -> rc = TTransMake ( & trans -> child [ idx ], trans -> depth + 1 );
-            if ( pb -> rc != 0 )
-                return false;
-
-            ++ pb -> tcnt;
-        }
-
-#if _DEBUGGING
-        /* accounting for non-terminal key */
-        ++ pb -> cnt;
-#else
-        /* early exit */
-        if ( ++ pb -> cnt == trans -> tcnt )
-            return true;
-#endif
-    }
-
-    return false;
-}
-
-static
-bool CC WhackKids ( BSTNode *n, void *data )
-{
-    ExplodeTransData *pb = data;
-    TNode *item = ( TNode* ) n;
-    const TTrans *trans = pb -> trans;
-
-    if ( item -> key . len > trans -> depth )
-    {
-        TTrans *child;
-        uint32_t idx;
-        String key = item -> key;
-        const Trie *tt = pb -> tt;
-
-        /* perform a sub-string based upon
-           knowledge that the entry key matches
-           the first "trans->depth" characters */
-        key . addr += pb -> tsize;
-        key . len -= trans -> depth;
-        key . size -= pb -> tsize;
-
-        /* get the next transition character */
-        pb -> rc = TrieNextIdx ( tt, & key, & idx );
-        if ( pb -> rc != 0 )
-            return false;
-
-        /* test the transition - due to early
-           exit on error from child creation,
-           as well as from this function, we can
-           assert that this transition is not NULL */
-        assert ( trans -> child != NULL );
-        assert ( trans -> child [ idx ] != NULL );
-        child = trans -> child [ idx ];
-
-        /* if the child is totally empty, it was just
-           created and should be doused */
-        if ( child -> tcnt + child -> vcnt == 0 )
-        {
-            free ( child );
-            trans -> child [ idx ] = NULL;
-
-#if _DEBUGGING
-            /* not strictly required, because no changes
-               have been committed yet */
-            -- pb -> tcnt;
-#else
-            /* early exit when there could be no further work */
-            if ( -- pb -> tcnt == 0 )
-                return true;
-#endif
-        }
-
-        /* mandatory early exit when we detect limit */
-        if ( -- pb -> cnt == 0 )
-            return true;
-    }
-
-    return false;
-}
-
-static
-bool CC MoveKids ( BSTNode *n, void *data )
-{
-    ExplodeTransData *pb = data;
-    TNode *item = ( TNode* ) n;
-    TTrans *trans = pb -> trans;
-
-    if ( item -> key . len > trans -> depth )
-    {
-        TTrans *child;
-        uint32_t idx;
-        String key = item -> key;
-        const Trie *tt = pb -> tt;
-
-        /* perform a sub-string based upon
-           knowledge that the entry key matches
-           the first "trans->depth" characters */
-        key . addr += pb -> tsize;
-        key . len -= trans -> depth;
-        key . size -= pb -> tsize;
-
-        /* get the next transition character */
-        pb -> rc = TrieNextIdx ( tt, & key, & idx );
-        assert ( pb -> rc == 0 );
-
-        /* test the transition */
-        assert ( trans -> child != NULL );
-        assert ( trans -> child [ idx ] != NULL );
-        child = trans -> child [ idx ];
-
-        /* pop this guy from its current location */
-        BSTreeUnlink ( & trans -> vals, & item -> n );
-
-        /* insert into its new location */
-        pb -> rc = BSTreeInsert ( & child -> vals, & item -> n, TNodeSort );
-        assert ( pb -> rc == 0 );
-
-        if ( item -> key . len == child -> depth )
-            ++ child -> vcnt;
-        else
-            ++ child -> tcnt;
-
-        /* detect an over-limit child */
-        assert ( child -> child == NULL );
-        if ( child -> tcnt != 0 && ( child -> tcnt + child -> vcnt > tt -> limit ) )
-            pb -> over = true;
-
-#if _DEBUGGING
-        ++ pb -> cnt;
-#else
-        /* early exit */
-        if ( ++ pb -> cnt == trans -> tcnt )
-            return true;
-#endif
-    }
-
-    return false;
-}
-
-static
-rc_t CC TrieExplodeTrans ( const Trie *tt, TTrans *trans, size_t tsize )
-{
-    rc_t rc;
-    ExplodeTransData pb;
-
-    /* create a child array */
-    assert ( trans -> child == NULL );
-    trans -> child = calloc ( tt -> width, sizeof trans -> child [ 0 ] );
-    if ( trans -> child == NULL )
-        return RC ( rcCont, rcTrie, rcInserting, rcMemory, rcExhausted );
-
-    /* loop data structure */
-    pb . tt = tt;
-    pb . trans = trans;
-    pb . tsize = tsize;
-    pb . tcnt = 0;
-    pb . cnt = 0;
-    pb . rc = 0;
-
-    /* create new child nodes */
-    BSTreeDoUntil ( & trans -> vals, 0, CreateKids, & pb );
-    assert ( pb . tcnt <= tt -> width );
-    rc = pb . rc;
-
-    /* roll-back changes on error */
-    if ( rc != 0 && pb . cnt != trans -> tcnt )
-    {
-        if ( pb . tcnt != 0 )
-        {
-            BSTreeDoUntil ( & trans -> vals, 0, WhackKids, & pb );
-            assert ( pb . tcnt == 0 );
-        }
-
-        free ( trans -> child );
-        trans -> child = NULL;
-
-        return rc;
-    }
-
-    /* commit changes */
-    pb . cnt = 0;
-    pb . over = false;
-
-    BSTreeDoUntil ( & trans -> vals, 0, MoveKids, & pb );
-    assert ( pb . rc == 0 );
-    assert ( pb . cnt == trans -> tcnt );
-
-    assert ( pb . tcnt <= tt -> width );
-    trans -> tcnt = pb . tcnt;
-
-    /* handle over-limit kids */
-    if ( pb . over )
-    {
-        uint32_t i;
-        for ( i = 0; i < tt -> width; ++ i )
-        {
-            TTrans *child = trans -> child [ i ];
-            if ( trans -> child [ i ] != NULL )
-            {
-                assert ( child -> child == NULL );
-                if ( child -> tcnt != 0 && ( child -> tcnt + child -> vcnt > tt -> limit ) )
-                {
-                    /* re-calculate transition key string size */
-                    uint32_t ch;
-                    const TNode *item = ( const TNode* ) child -> vals . root;
-                    String key = item -> key;
-
-                    key . addr += tsize;
-                    key . len -= trans -> tcnt;
-                    key . size -= tsize;
-
-                    rc = StringPopHead ( & key, & ch );
-                    assert ( rc == 0 );
-
-                    rc = TrieExplodeTrans ( tt, child, item -> key . size - key . size );
-                    if ( rc != 0 )
-                        break;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* TrieInsertEngine
- *  inserts an item into tree
- *
- *  "item" is a TNode with an embedded key string.
- *
- *  "exist" is an optional return parameter for prior nodes
- *  and indicates whether to insert unique or not
- *
- *  returns status codes:
- *    0      => success
- *    EINVAL => an invalid parameter
- *    ENOMEM => failed to allocate internal structures
- */
-static
-rc_t CC TrieInsertEngine ( Trie *tt, TNode *item, TNode **exist )
-{
-    rc_t rc;
-    String key;
-    TTrans *trans;
-
-    /* quick parameter check */
-    if ( tt == NULL )
-        return RC ( rcCont, rcTrie, rcInserting, rcSelf, rcNull );
-    if ( item == NULL )
-        return RC ( rcCont, rcTrie, rcInserting, rcParam, rcNull );
-    if ( item -> key . len == 0 )
-        return RC ( rcCont, rcTrie, rcInserting, rcString, rcEmpty );
-
-    /* starting key */
-    key = item -> key;
-
-    /* get the root TTrans */
-    if ( tt -> root == NULL )
-    {
-        rc = TTransMake ( & tt -> root, 0 );
-        if ( rc != 0 )
-            return rc;
-    }
-    trans = tt -> root;
-
-    while ( 1 )
-    {
-        /* if there is a child array and the key is non-terminal */
-        if ( trans -> child != NULL && trans -> depth < item -> key . len )
-        {
-            /* get transition character and index */
-            uint32_t ch, idx;
-            rc = StringPopHead ( & key, & ch );
-            if ( rc != 0 )
-                break;
-            idx = TrieMapChar ( tt, ch );
-
-            /* check for auto-expand on unmapped character */
-            if ( idx == 0 && tt -> cs_expand )
-            {
-                /* get the new width */
-                uint16_t width = tt -> width + 1;
-
-                /* get a new value for idx */
-                idx = tt -> width;
-
-                /* make sure the expansion would not exceed
-                   the 16 bit limit on array width */
-                if ( width == 0 )
-                {
-                    rc = RC ( rcCont, rcTrie, rcInserting, rcRange, rcExcessive );
-                    break;
-                }
-                rc = TrieAutoExpand ( tt, ch );
-                if ( rc != 0 )
-                    break;
-            }
-
-            /* take transition if there */
-            if ( trans -> child [ idx ] != NULL )
-            {
-                trans = trans -> child [ idx ];
-                continue;
-            }
-
-            /* create new transition */
-            rc = TTransMake ( & trans -> child [ idx ], trans -> depth + 1 );
-            if ( rc != 0 )
-                break;
-
-            /* account for and take the new transition */
-            ++ trans -> tcnt;
-            trans = trans -> child [ idx ];
-        }
-
-        /* item should never be shorter than node */
-        assert ( trans -> depth <= item -> key . len );
-        if ( trans -> depth < item -> key . len )
-        {
-            rc = TrieValidateRemainder ( tt, & key );
-            if ( rc != 0 )
-                break;
-        }
-
-        /* going to install into value tree */
-        if ( exist == NULL )
-            rc = BSTreeInsert ( & trans -> vals, & item -> n, TNodeSort );
-        else
-        {
-            rc = BSTreeInsertUnique ( & trans -> vals,
-                & item -> n, ( BSTNode** ) exist, TNodeSort );
-        }
-        if ( rc == 0 )
-        {
-            /* account for type of insert */
-            if ( trans -> depth == item -> key . len )
-                ++ trans -> vcnt;
-            else
-                ++ trans -> tcnt;
-
-            /* now test for overflow */
-            if ( trans -> child == NULL && trans -> tcnt != 0 )
-            {
-                if ( trans -> vcnt + trans -> tcnt > tt -> limit )
-                {
-                    /* it's time to convert to a full transition node */
-                    TrieExplodeTrans ( tt, trans, item -> key . size - key . size );
-                }
-            }
-        }
-        break;
-    }
-
-#if _DEBUGGING && 0
-    if ( rc == 0 && tt -> validate )
-        rc = TTransValidate ( tt -> root, tt );
-#endif
-
-    return rc;
-}
-
-/* TrieInsert
- *  inserts an item into tree
- *
- *  "item" is a TNode with an embedded key string.
- *
- *  returns status codes:
- *    0      => success
- *    EINVAL => an invalid parameter
- *    ENOMEM => failed to allocate internal structures
- */
-LIB_EXPORT rc_t CC TrieInsert ( Trie *tt, TNode *item )
-{
-    return TrieInsertEngine ( tt, item, NULL );
-}
-
-/* TrieInsertUnique
- *  behaves like TrieInsert and returns 0 if insert succeeded
- *
- *  if insert failed with a return value of EEXIST, the existing
- *  object is returned in "exist".
- */
-LIB_EXPORT rc_t CC TrieInsertUnique ( Trie *tt, TNode *item, TNode **exist )
-{
-    TNode *dummy;
-    if ( exist == NULL )
-        exist = & dummy;
-
-    return TrieInsertEngine ( tt, item, exist );
-}
-
-/* TrieFindTrans
- */
-static
-rc_t CC TrieFindTrans ( const Trie *tt, TTrans *trans, const String *item, TTrans **buffer )
-{
-    String key = * item;
-
-    while ( trans -> child != NULL )
-    {
-        rc_t rc;
-        uint32_t idx;
-
-        assert ( trans -> tcnt != 0 );
-
-        rc = TrieNextIdx ( tt, & key, & idx );
-	/* This might actually happen if the trie has more internal
-	   nodes than one might think, and the string is short 
-	   (i.e. it terminates in an "internal" node */
-	/* This needs to know the reconstructed RC for better readability */
-	if (rc == RC( rcText, rcChar, rcRemoving, rcString, rcEmpty ) ) {
-	  *buffer = trans;
-	  return 0;
-	}
-        if ( rc != 0 )
-	  return rc;
-
-        if ( trans -> child [ idx ] == NULL )
-            break;
-
-        trans = trans -> child [ idx ];
-    }
-
-    * buffer = trans;
-    return 0;
-}
-
-/* TrieFindTransChain
- *  finds chain of TTrans objects having single transitions
- *
- *  explanation and justification:
- *
- *  - when TrieUnlink removes the last bucket from a value BSTree,
- *    the containing TTrans node may become empty and should be
- *    collected.
- *
- *  - to collect a TTrans object, a backlink to its parent or a
- *    forward list from parent(s) to node are required, in order
- *    to remove the parents' outgoing transition to the dead node.
- *
- *  - backlinks have been excluded from the design for many reasons,
- *    among them the expense of 64 bit pointers. a list of forward
- *    transitions only requires a head and tail, since the internal
- *    transitions are found with the key and may be recovered with
- *    the same key.
- *
- *  - this chain is defined as the head and tail of a list having
- *    a single line of transitions eminating from a remaining parent,
- *    such that "head" will be the deepest parent in the chain having
- *    a vcnt + tcnt > 1, or NULL if none are found. all subsequent nodes
- *    will be subject to collection.
- */
-static
-rc_t CC TrieFindTransChain ( const Trie *tt, TTrans *trans,
-    const String *item, TTrans **head, TTrans **tail )
-{
-    String key = * item;
-
-    * head = NULL;
-
-    while ( trans -> child != NULL )
-    {
-        rc_t rc;
-        uint32_t idx;
-
-        assert ( trans -> tcnt != 0 );
-
-        rc = TrieNextIdx ( tt, & key, & idx );
-        if ( rc != 0 )
-            return rc;
-
-        /* detect end of line */
-        if ( trans -> child [ idx ] == NULL )
-            break;
-
-        /* record new head */
-        if ( trans -> tcnt + trans -> vcnt > 1 )
-            * head = trans;
-
-        /* take transition */
-        trans = trans -> child [ idx ];
-    }
-
-    * tail = trans;
-    return 0;
-}
-
-/* TrieUnlink
- *  remove an object from the tree
- *
- *  returns "true" if node was actually removed from tree
- */
-LIB_EXPORT bool CC TrieUnlink ( Trie *tt, TNode *item )
-{
-    if ( tt != NULL && item != NULL && tt -> root != NULL )
-    {
-        TTrans *head, *tail;
-        rc_t rc = TrieFindTransChain ( tt, tt -> root, & item -> key, & head, & tail );
-        if ( rc == 0 && BSTreeUnlink ( & tail -> vals, & item -> n ) )
-        {
-            assert ( item -> key . len >= tail -> depth );
-            if ( item -> key . len == tail -> depth )
-            {
-                assert ( tail -> vcnt > 0 );
-                -- tail -> vcnt;
-            }
-            else
-            {
-                assert ( tail -> tcnt > 0 );
-                -- tail -> tcnt;
-            }
-
-            /* check for need to whack TTrans */
-            if ( tail -> vcnt + tail -> tcnt == 0 )
-            {
-                String key;
-                TTrans *trans;
-                uint32_t idx;
-
-                if ( head == NULL )
-                {
-                    /* going to whack everything */
-                    key = item -> key;
-                    trans = tt -> root;
-                }
-                else
-                {
-                    /* remove the leading characters of the key */
-                    StringSubstr ( & item -> key, & key, head -> depth, 0 );
-                    rc = TrieNextIdx ( tt, & key, & idx );
-                    assert ( rc == 0 );
-                    assert ( head -> child != NULL );
-                    trans = head -> child [ idx ];
-
-                    /* sever the transition */
-                    assert ( trans != NULL );
-                    head -> child [ idx ] = NULL;
-                    assert ( head -> vcnt > 0 );
-                    -- head -> vcnt;
-                }
-
-                /* whack all of the trans nodes down to tail */
-                while ( 1 )
-                {
-                    TTrans *next;
-
-                    /* get the next character index */
-                    rc = TrieNextIdx ( tt, & key, & idx );
-                    assert ( rc == 0 );
-
-                    /* get the next node */
-                    assert ( trans -> child != NULL );
-                    next = trans -> child [ idx ];
-                    assert ( next != NULL );
-
-                    /* whack the current node */
-                    assert ( trans -> vcnt + trans -> tcnt == 0 );
-                    assert ( trans -> vals . root == NULL );
-                    free ( trans -> child );
-                    free ( trans );
-
-                    /* get out if this was the tail */
-                    if ( trans == tail )
-                        break;
-
-                    /* take the next transition */
-                    trans = next;
-                }
-            }
-
-            return true;
-        }
-    }
-
-    return false;
-}
-
-/* TrieFind
- *  find a single object within tree
- *
- *  "item" is an exact match text string
- *
- *  returns an arbitrarily selected TNode* from matching set
- *  or NULL if none found.
- */
-LIB_EXPORT TNode * CC TrieFind ( const Trie *tt, const String *item )
-{
-    if ( tt != NULL && item != NULL && tt -> root != NULL && item -> len != 0 )
-    {
-        TTrans *trans;
-        rc_t rc = TrieFindTrans ( tt, tt -> root, item, & trans );
-	if (rc == 0)
-        {
-	    return ( TNode* ) BSTreeFind ( & trans -> vals, item,
-                ( int64_t ( CC * ) ( const void*, const BSTNode* ) ) TNodeCmp );
-	}
-    }
-
-    return NULL;
-}
-
-/* TrieFindAll
- *  find multiple objects within tree
- *
- *  "item" is an exact match text string
- *
- *  "buffer" is a user-supplied array of TNode* with a
- *  capacity of "capacity" elements. if successful, the
- *  entire found set will be returned unordered within.
- *
- *  "num_found" ( out ) indicates the size of the found set,
- *  regardless of return value, such that if the supplied
- *  buffer were to be too small, the required size is returned.
- *
- *  returns status codes:
- *    0       => success
- *    EINVAL  => an invalid parameter
- *    ENOENT  => the found set was empty
- *    ENOBUFS => the found set was too large
- */
-LIB_EXPORT rc_t CC TrieFindAll ( const Trie *tt, const String *item,
-    TNode *buffer [], uint32_t capacity,
-    uint32_t *num_found )
-{
-    rc_t rc;
-    TTrans *trans;
-    uint32_t count;
-
-    if ( tt == NULL )
-        return RC ( rcCont, rcTrie, rcSelecting, rcSelf, rcNull );
-    if ( item == NULL )
-        return RC ( rcCont, rcTrie, rcSelecting, rcString, rcNull );
-    if ( item -> len == 0 )
-        return RC ( rcCont, rcTrie, rcSelecting, rcString, rcEmpty );
-
-    if ( buffer == NULL && capacity != 0 )
-        return RC ( rcCont, rcTrie, rcSelecting, rcBuffer, rcNull );
-
-    count = 0;
-
-    rc = TrieFindTrans ( tt, tt -> root, item, & trans );
-    if ( rc == 0 )
-    {
-        TNode *node = ( TNode* ) BSTreeFind ( & trans -> vals, item,
-            ( int64_t ( CC * ) ( const void*, const BSTNode* ) ) TNodeCmp );
-        if ( node == NULL )
-            rc = RC ( rcCont, rcTrie, rcSelecting, rcString, rcNotFound );
-        else
-        {
-            TNode *nbr;
-
-            /* back up as far as we can */
-            for ( nbr = ( TNode* ) BSTNodePrev ( & node -> n );
-                  nbr != NULL && StringEqual ( & nbr -> key, item );
-                  nbr = ( TNode* ) BSTNodePrev ( & node -> n ) )
-            {
-                ++ count;
-                node = nbr;
-            }
-
-            /* recover to original point */
-            if ( count != 0 )
-            {
-                uint32_t i;
-                for ( i = 0; i < count; ++ i )
-                {
-                    if ( i < capacity )
-                        buffer [ i ] = node;
-                    node = ( TNode* ) BSTNodeNext ( & node -> n );
-                }
-            }
-
-            /* count the original */
-            if ( count < capacity )
-                buffer [ count ] = node;
-
-            /* now continue forward */
-            for ( ++ count, node = ( TNode* ) BSTNodeNext ( & node -> n );
-                  node != NULL && StringEqual ( & node -> key, item );
-                  ++ count, node = ( TNode* ) BSTNodeNext ( & node -> n ) )
-            {
-                if ( count < capacity )
-                    buffer [ count ] = node;
-            }
-
-            /* detect no buffer space */
-            if ( count > capacity )
-                rc = RC ( rcCont, rcTrie, rcSelecting, rcBuffer, rcInsufficient );
-        }
-    }
-
-    if ( num_found != NULL )
-        * num_found = count;
-
-    return rc;
-}
-
-/* TrieForEach
- *  executes a function on each tree element
- */
-typedef struct TrieForEachData TrieForEachData;
-struct TrieForEachData
-{
-    void ( CC * f ) ( TNode*, void* );
-    void *data;
-};
-
-static
-void CC TrieForEachElem ( const TTransBacktrace *bt, uint32_t width, void *data )
-{
-    const TTrans *trans = bt -> trans;
-    TrieForEachData *pb = data;
-    if ( trans -> vals . root != NULL )
-    {
-        BSTreeForEach ( & trans -> vals, 0,
-            ( void ( CC * ) ( BSTNode*, void* ) ) pb -> f, pb -> data );
-    }
-}
-
-LIB_EXPORT void CC TrieForEach ( const Trie *tt,
-    void ( CC * f ) ( TNode *n, void *data ), void *data )
-{
-    if ( tt != NULL && tt -> root != NULL )
-    {
-        TrieForEachData pb;
-        pb . f = f;
-        pb . data = data;
-        TTransForEach ( tt -> root, tt -> width, TrieForEachElem, & pb );
-    }
-}
-
-/* TrieDoUntil
- *  executes a function on each tree element
- *  until the function returns true
- */
-typedef struct TrieDoUntilData TrieDoUntilData;
-struct TrieDoUntilData
-{
-    bool ( CC * f ) ( TNode*, void* );
-    void *data;
-};
-
-static
-bool CC TrieDoUntilElem ( const TTransBacktrace *bt, uint32_t width, void *data )
-{
-    const TTrans *trans = bt -> trans;
-    TrieDoUntilData *pb = data;
-    if ( trans -> vals . root != NULL )
-    {
-        return BSTreeDoUntil ( & trans -> vals, 0,
-            ( bool ( CC * ) ( BSTNode*, void* ) ) pb -> f, pb -> data );
-    }
-    return false;
-}
-
-LIB_EXPORT bool CC TrieDoUntil ( const Trie *tt,
-    bool ( CC * f ) ( TNode *n, void *data ), void *data )
-{
-    if ( tt != NULL && tt -> root != NULL )
-    {
-        TrieDoUntilData pb;
-        pb . f = f;
-        pb . data = data;
-        return TTransDoUntil ( tt -> root, tt -> width, TrieDoUntilElem, & pb );
-    }
-    return false;
-}
-
-/* TrieExplore
- *  executes a function on each element in the path of the key
- *  from furthest node to closest node
- *  until the function returns true or end of chain
- */
-typedef struct TrieExploreData_struct {
-    bool ( CC * f ) ( TNode*, void* );
-    void *data;
-    const String* item;
-} TrieExploreData;
-
-static
-bool CC TrieExploreBSTree( BSTNode *n, void *data )
-{
-    TrieExploreData* pb = data;
-    TNode* node = (TNode*)n;
-    String sub = *pb->item;
-    sub.len = node->key.len;
-
-    if( StringCompare(&node->key, &sub) == 0 ) {
-        if( pb->f(node, pb->data) ) {
-            return true;
-        }
-    }
-    return false;
-}
-
-static
-bool CC TrieExploreTrans( const Trie *tt, TTrans *trans, String *key, TrieExploreData* data)
-{
-    /* first dive deeper if possible */
-    while( trans->child != NULL ) {
-        uint32_t idx;
-        if( TrieNextIdx(tt, key, &idx) != 0 ) {
-            break;
-        }
-        if( trans->child[idx] != NULL ) {
-            /* do not recur if current trans has no values */
-            if( trans->vcnt > 0 ) {
-                if( TrieExploreTrans(tt, trans->child[idx], key, data) ) {
-                    return true;
-                }
-                break;
-            } else {
-                trans = trans->child[idx];
-            }
-        }
-    }
-    /* than search local BSTree on the way out */
-    return BSTreeDoUntil(&trans->vals, true, TrieExploreBSTree, data);
-}
-
-LIB_EXPORT bool CC TrieExplore( const Trie *tt, const String *item, 
-    bool ( CC * f ) ( TNode *n, void *data ), void *data )
-{
-    if ( tt != NULL && item != NULL && tt->root != NULL && item->len != 0 ) {
-        TrieExploreData pb;
-        String key = *item;
-        pb.f = f;
-        pb.data = data;
-        pb.item = item;
-        return TrieExploreTrans(tt, tt->root, &key, &pb);
-    }
-    return false;
-}
-
-/* TrieWhack
- *  tears down internal structure
- *
- *  any parameter, including"tt," may be NULL
- */
-LIB_EXPORT void CC TrieWhack ( Trie *tt,
-    void ( CC * whack ) ( TNode *n, void *data ), void *data )
-{
-    if ( tt != NULL )
-    {
-        if ( tt -> root != NULL )
-            TTransWhack ( tt -> root, tt -> width, whack, data );
-
-        free ( ( void* ) tt -> map );
-        free ( ( void* ) tt -> rmap );
-    }
-}
diff --git a/libs/klib/trieval.c b/libs/klib/trieval.c
deleted file mode 100644
index d2c43c1..0000000
--- a/libs/klib/trieval.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include "trie-priv.h"
-#include <klib/log.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <wctype.h>
-#include <errno.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * TTrans
- *  a text transition node
- *
- *  transitions to child nodes occur only if "tcnt" != 0 ( "child" != NULL )
- *  and are taken on the query string's character [ key . len ]
- */
-
-/* TTransValidate
- */
-typedef struct TTValNodeCntData TTValNodeCntData;
-struct TTValNodeCntData
-{
-    unsigned int depth;
-    unsigned int vcnt;
-    unsigned int tcnt;
-};
-
-static
-void CC TTransCountTNodes ( BSTNode *n, void *data )
-{
-    TTValNodeCntData *pb = data;
-    const TNode *node = ( const TNode* ) n;
-
-    if ( strlen ( node -> key . addr ) == pb -> depth )
-        ++ pb -> vcnt;
-    else
-        ++ pb -> tcnt;
-}
-
-/* TTransValidate
- *  recursively checks structure
- */
-int CC TTransValidate ( const TTrans *trans, const Trie *tt )
-{
-    int status = 0;
-
-    TTValNodeCntData pb;
-    unsigned int i, width;
-
-    width = tt -> width;
-
-    pb . depth = trans -> depth;
-    pb . vcnt = pb . tcnt = 0;
-
-    /* count transition array */
-    if ( trans -> child != NULL )
-    {
-        for ( i = 0; i < width; ++ i )
-        {
-            if ( trans -> child [ i ] != NULL )
-                ++ pb . tcnt;
-        }
-    }
-
-    /* count value tree */
-    BSTreeForEach ( & trans -> vals, 0, TTransCountTNodes, & pb );
-
-    /* check validity */
-    if ( pb . tcnt != trans -> tcnt )
-    {
-        LOGERR ( status = EINVAL, "bad trans -> tcnt => %u, should be %u",
-                 trans -> tcnt, pb . tcnt );
-    }
-
-    /* should have a non-zero tcnt if has child array */
-    else if ( pb . tcnt == 0 && trans -> child != NULL )
-    {
-        LOGERR ( status = EINVAL, "empty trans -> child", NULL ); /* 3rd parameter is wrong so far... */
-    }
-
-    if ( pb . vcnt != trans -> vcnt )
-    {
-        LOGERR ( status = EINVAL, "bad trans -> vcnt => %u, should be %u",
-                 trans -> vcnt, pb . vcnt );
-    }
-
-    if ( trans -> child == NULL && pb . tcnt != 0 )
-    {
-        if ( pb . tcnt + pb . vcnt > tt -> limit )
-        {
-            /*
-            LOGMSG ( "WARNING: over-limit actual value count => %u, should be %u\n",
-                 pb . tcnt + pb . vcnt, tt -> limit );
-           */
-            LOGMSG ( status = EINVAL, "WARNING: over-limit actual value count => %u, should be %u\n" );
-        }
-    }
-
-    if ( status == 0 && trans -> child != NULL )
-    {
-        for ( i = 0; i < width; ++ i )
-        {
-            const TTrans *child = trans -> child [ i ];
-            if ( child != NULL )
-            {
-                if ( child -> depth != trans -> depth + 1 )
-                {
-                    LOGERR ( status = EINVAL, "bad trans -> depth => %u, should be %u",
-                             child -> depth, trans -> depth + 1 );
-                }
-                else
-                {
-                    int err = TTransValidate ( child, tt );
-                    if ( status == 0 )
-                        status = err;
-                }
-            }
-        }
-    }
-
-    return status;
-}
-
-/*--------------------------------------------------------------------------
- * Trie
- *  a tree of text nodes
- */
-
-/* TrieValidate
- *  run validation check on tree structure
- */
-LIB_EXPORT int CC TrieValidate ( const Trie *tt )
-{
-    if ( tt == NULL )
-        return EINVAL;
-    if ( tt -> root == NULL )
-        return 0;
-    return TTransValidate ( tt -> root, tt );
-}
diff --git a/libs/klib/unix/misc.c b/libs/klib/unix/misc.c
deleted file mode 100644
index e42e332..0000000
--- a/libs/klib/unix/misc.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/misc.h> /* is_iser_an_admin */
-
-#include <unistd.h> /* geteuid */
-
-LIB_EXPORT bool CC is_iser_an_admin(void) {
-    return geteuid() == 0;
-}
diff --git a/libs/klib/unix/syserrcode.c b/libs/klib/unix/syserrcode.c
deleted file mode 100644
index df2ab60..0000000
--- a/libs/klib/unix/syserrcode.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include "writer-priv.h"
-#include <klib/writer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <os-native.h> /* for strchrnul on non-linux */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <assert.h>
-
-size_t KWrtFmt_error_code ( char * buffer, size_t buffer_size, uint32_t error_code )
-{
-    /* this either returns char * or int - we don't really care
-     * if it fails as slong as it put something into the buffer */
-    strerror_r ((int)error_code, buffer, buffer_size);
-    return string_size (buffer);
-}
diff --git a/libs/klib/unix/syslog.c b/libs/klib/unix/syslog.c
deleted file mode 100644
index 16aa4ad..0000000
--- a/libs/klib/unix/syslog.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include "log-priv.h"
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <assert.h>
-#include <time.h>
-#include <errno.h>
-
-
-/* LogTimestamp
- *  generates a timestamp string
- */
-
-LIB_EXPORT rc_t CC LogTimestamp ( char *buffer, size_t bsize, size_t *num_writ )
-{
-    int len;
-    static time_t last_time = 0;
-    static struct tm cal;
-    
-    /* get current time */
-    time_t t = time ( 0 );
-    
-    /* initialize time on first run */
-    if ( ! last_time )
-    {
-        last_time = t;
-        gmtime_r ( & last_time, & cal );
-    }
-    
-    /* or update if time has passed */
-    else if ( t != last_time )
-    {
-        /* update every 5 minutes or so */
-        time_t dt = t - last_time;
-        last_time = t;
-        if ( dt >= 300 )
-            gmtime_r ( & last_time, & cal );
-	
-        /* otherwise, just update the struct manually */
-        else
-        {
-            /* advance seconds */
-            dt += cal . tm_sec;
-            cal . tm_sec = ( int ) ( dt % 60 );
-	    
-            /* detect a rolled-over minute */
-            if ( ( dt /= 60 ) != 0 )
-            {
-                /* advance minutes */
-                dt += cal . tm_min;
-                cal . tm_min = ( int ) ( dt % 60 );
-		
-                /* detect a rolled-over hour */
-                if ( ( dt /= 60 ) != 0 )
-                {
-                    /* roll-over of an hour - refetch */
-                    gmtime_r ( & last_time, & cal );
-                }
-            }
-        }
-    }
-    
-    /* make the timestamp */
-    len = snprintf ( buffer, bsize,
-                     "%04d-%02d-%02dT%02d:%02d:%02d"
-                     , cal . tm_year + 1900
-                     , cal . tm_mon + 1
-                     , cal . tm_mday
-                     , cal . tm_hour
-                     , cal . tm_min
-                     , cal . tm_sec
-        );
-
-    if ( num_writ != NULL )
-        * num_writ = len;
-
-    if ( len < 0 || ( size_t ) len >= bsize )
-    {
-        if ( len < 0 && num_writ != NULL )
-            * num_writ = 0;
-        return RC ( rcApp, rcLog, rcLogging, rcBuffer, rcInsufficient );
-    }
-
-    return 0;
-}
-
-/* LogSimpleTimestamp
- *  generates a local timestamp string without time zone
- */
-LIB_EXPORT rc_t CC LogSimpleTimestamp ( char *buffer, size_t bsize, size_t *num_writ )
-{
-    int len;
-    static time_t last_time = 0;
-    static struct tm cal;
-    
-    /* get current time */
-    time_t t = time ( 0 );
-    
-    /* initialize time on first run */
-    if ( ! last_time )
-    {
-        last_time = t;
-        localtime_r ( & last_time, & cal );
-    }
-    
-    /* or update if time has passed */
-    else if ( t != last_time )
-    {
-        /* update every 5 minutes or so */
-        time_t dt = t - last_time;
-        last_time = t;
-        if ( dt >= 300 )
-            localtime_r ( & last_time, & cal );
-
-        /* otherwise, just update the struct manually */
-        else
-        {
-            /* advance seconds */
-            dt += cal . tm_sec;
-            cal . tm_sec = ( int ) ( dt % 60 );
-
-            /* detect a rolled-over minute */
-            if ( ( dt /= 60 ) != 0 )
-            {
-                /* advance minutes */
-                dt += cal . tm_min;
-                cal . tm_min = ( int ) ( dt % 60 );
-
-                /* detect a rolled-over hour */
-                if ( ( dt /= 60 ) != 0 )
-                {
-                    /* roll-over of an hour - refetch */
-                    localtime_r ( & last_time, & cal );
-                }
-            }
-        }
-    }
-    
-    /* make the timestamp */
-    len = snprintf ( buffer, bsize,
-                     "%04d-%02d-%02dT%02d:%02d:%02d"
-                     , cal . tm_year + 1900
-                     , cal . tm_mon + 1
-                     , cal . tm_mday
-                     , cal . tm_hour
-                     , cal . tm_min
-                     , cal . tm_sec
-        );
-    if ( num_writ != NULL )
-        * num_writ = len;
-
-    if ( len < 0 || ( size_t ) len >= bsize )
-    {
-        if ( len < 0 && num_writ != NULL )
-            * num_writ = 0;
-        return RC ( rcApp, rcLog, rcLogging, rcBuffer, rcInsufficient );
-    }
-
-    return 0;
-}
-
-/* LogPID
- *  generates a process id
- */
-LIB_EXPORT rc_t CC LogPID ( char *buffer, size_t bsize, size_t *num_writ )
-{
-    /* pid_t is signed not unsigned int */
-    int len = snprintf ( buffer, bsize, "%d", getpid () );
-    * num_writ = len;
-    if ( len < 0 || ( size_t ) len >= bsize )
-    {
-        if ( len < 0 )
-            * num_writ = 0;
-        return RC ( rcApp, rcLog, rcLogging, rcBuffer, rcInsufficient );
-    }
-    return 0;
-}
-
diff --git a/libs/klib/unix/systime.c b/libs/klib/unix/systime.c
deleted file mode 100644
index 9bef887..0000000
--- a/libs/klib/unix/systime.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/time.h>
-#include <klib/rc.h> /* RC */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <assert.h>
-#include <time.h>
-#include <sys/time.h>
-#include <errno.h>
-
-
-/*--------------------------------------------------------------------------
- * KTime_t
- *  64 bit time_t
- */
-
-
-/* Stamp
- *  current timestamp
- */
-LIB_EXPORT KTime_t CC KTimeStamp ( void )
-{
-    return time ( NULL );
-}
-
-LIB_EXPORT KTimeMs_t CC KTimeMsStamp ( void )
-{
-	struct timeval tm;
-    gettimeofday( &tm, NULL );
-	return ( ( tm.tv_sec * 1000 ) + ( tm.tv_usec / 1000 ) );
-}
-
-/*--------------------------------------------------------------------------
- * KTime
- *  simple time structure
- */
-
-
-/* Make
- *  make KTime from struct tm
- */
-static
-void KTimeMake ( KTime *kt, struct tm const *t )
-{
-    kt -> year = t -> tm_year + 1900;
-    kt -> month = t -> tm_mon;
-    kt -> day = t -> tm_mday - 1;
-    kt -> weekday = t -> tm_wday;
-#if !defined(__SunOS)  &&  !defined(__sun__)
-    kt -> tzoff = ( int16_t ) ( t -> tm_gmtoff / 60 );
-#endif
-    kt -> hour = ( uint8_t ) t -> tm_hour;
-    kt -> minute = ( uint8_t ) t -> tm_min;
-    kt -> second = ( uint8_t ) t -> tm_sec;
-    kt -> dst = t -> tm_isdst != 0;
-}
-
-
-/* Local
- *  populate "kt" from "ts" in local time zone
- */
-LIB_EXPORT const KTime* CC KTimeLocal ( KTime *kt, KTime_t ts )
-{
-    if ( kt != NULL )
-    {
-        struct tm t;
-        time_t unix_time = ( time_t ) ts;
-        localtime_r ( & unix_time, & t );
-        KTimeMake ( kt, & t );
-    }
-    return kt;
-}
-
-
-/* Global
- *  populate "kt" from "ts" in GMT
- */
-LIB_EXPORT const KTime* CC KTimeGlobal ( KTime *kt, KTime_t ts )
-{
-    if ( kt != NULL )
-    {
-        struct tm t;
-        time_t unix_time = ( time_t ) ts;
-        gmtime_r ( & unix_time, & t );
-        KTimeMake ( kt, & t );
-    }
-    return kt;
-}
-
-
-/* MakeTime
- *  make a KTime_t from KTime
- */
-LIB_EXPORT KTime_t CC KTimeMakeTime ( const KTime *self )
-{
-    KTime_t ts = 0;
-
-    if ( self != NULL )
-    {
-        struct tm t;
-
-        assert ( self -> year >= 1900 );
-        t . tm_year = self -> year - 1900;
-        t . tm_mon = self -> month;
-        t . tm_mday = self -> day + 1;
-        t . tm_wday = self -> weekday;
-#if !defined(__SunOS)  &&  !defined(__sun__)
-        t . tm_gmtoff = self -> tzoff * 60; 
-#endif
-        t . tm_hour = self -> hour;
-        t . tm_min = self -> minute;
-        t . tm_sec = self -> second;
-        t . tm_isdst = self -> dst;
-
-        ts = mktime ( &t );
-    }
-
-    return ts;
-}
-
-
-LIB_EXPORT rc_t CC KSleepMs(uint32_t milliseconds) {
-    struct timespec time;
-
-    time.tv_sec = (milliseconds / 1000);
-    time.tv_nsec = (milliseconds % 1000) * 1000 * 1000;
-
-    if (nanosleep(&time, NULL)) {
-        return 0;
-    }
-    else {
-        return RC(rcRuntime, rcTimeout, rcWaiting, rcTimeout, rcInterrupted);
-    }
-}
diff --git a/libs/klib/unix/syswriter.c b/libs/klib/unix/syswriter.c
deleted file mode 100644
index 6c31c7a..0000000
--- a/libs/klib/unix/syswriter.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include "writer-priv.h"
-#include <klib/text.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-
-static int unix_stdout = 1;
-static int unix_stderr = 2;
-
-rc_t KWrtSysInit(void** h_stdout, void** h_stderr)
-{
-    if( h_stdout ) {
-        *h_stdout = &unix_stdout;
-    }
-    if( h_stderr ) {
-        *h_stderr = &unix_stderr;
-    }
-    return 0;
-}
-
-/* ----
- * write 'count' bytes starting at 'buf'  to a "stream/file" identified by 'fd'
- */
-rc_t CC KWrt_DefaultWriter ( void * self, const char * buffer, size_t bufsize, size_t * num_writ )
-{
-    size_t total;
-    size_t remaining;
-    ssize_t num_written;
-    const char * pbyte;
-    int handle;
-    rc_t rc;
-
-    if ( self == NULL ) {
-        return RC ( rcApp, rcLog, rcWriting, rcSelf, rcNull );
-    }
-
-    handle = *(int*)self;
-    pbyte = buffer;
-    rc = 0;
-
-    total = 0;
-    for (remaining = bufsize; remaining > 0; remaining -= num_written)
-    {
-        num_written = write (handle, pbyte, remaining);
-        if (num_written < 0)
-        {
-            switch (errno)
-            {
-            case ENOSPC:
-                rc = RC ( rcApp, rcLog, rcWriting, rcStorage, rcExhausted );
-                break;
-            case EINTR:
-                num_written = 0;
-                break;
-            case EFBIG:
-                rc = RC ( rcApp, rcLog, rcWriting, rcFile, rcExcessive );
-                break;
-            case EIO:
-                rc = RC ( rcApp, rcLog, rcWriting, rcTransfer, rcUnknown );
-                break;
-            case EBADF:
-                rc = RC ( rcApp, rcLog, rcWriting, rcFileDesc, rcInvalid );
-                break;
-            case EINVAL:
-                rc = RC ( rcApp, rcLog, rcWriting, rcParam, rcInvalid );
-                break;
-            default:
-                rc = RC ( rcApp, rcLog, rcWriting, rcNoObj, rcUnknown );
-                break;
-            }
-            if (rc)
-                break;
-        }
-        else
-            total += num_written;
-    }
-    *num_writ = total;
-    return rc;
-}
-
-void print_int_fixup ( char * fmt, size_t * len, size_t max )
-{
-    /* all the Unix flavors support a real printf
-     * Only Windows does it "wrong".
-     * In windows we can't just return like this but instead:
-     *    save fmt[len-1]
-     *    replace 'j' with I64
-     *    replace 'z' or 't',  with 'I'
-     *    replace 'hh' with 'h'
-     *    append saved fmt[len-1] to its new place.
-     *
-     */
-    if (*len > 3)
-    {
-        if ((fmt[*len-3] == 'l') &&
-            (fmt[*len-2] == 'l'))
-        {
-            --*len;
-            fmt[*len-2] = 'j';
-            fmt[*len-1] = fmt[*len];
-            fmt[*len] = '\0';
-        }
-    }
-    else if (*len > 2)
-    {
-        /* -----
-         * replace an 'l' with a 'j'
-         * on 32 bit l is 32 bits and j is 64 bits
-         * on 64 bit l is 64 bits and j is 64 bits
-         * so we want the one that is the same on both
-         * we are not otherwise "fixing" the format for bad specifications
-         * just this ambiguous specification.
-         */
-        if (fmt[*len-2] == 'l')
-            fmt[*len-2] = 'j';
-    }
-    return;
-}
-
-void print_float_fixup ( char * fmt, size_t * len, size_t max )
-{
-    /* all the Unix flavors support a real printf
-     * Only Windows does it "wrong".
-     */
-    return;
-}
-
-void print_char_fixup ( char * fmt, size_t * len, size_t max )
-{
-    /* all the Unix flavors support a real printf
-     * Only Windows does it "wrong".
-     */
-    return;
-}
diff --git a/libs/klib/unpack.c b/libs/klib/unpack.c
deleted file mode 100644
index e970d9d..0000000
--- a/libs/klib/unpack.c
+++ /dev/null
@@ -1,833 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/pack.h>
-#include <klib/rc.h>
-#include <arch-impl.h>
-#include <sysalloc.h>
-
-#include <endian.h>
-#include <byteswap.h>
-#include <string.h>
-#include <assert.h>
-
-#if ! defined __LITTLE_ENDIAN && ! defined __BIG_ENDIAN
-#error "only little and big endian architectures are supported"
-#endif
-
-
-/*--------------------------------------------------------------------------
- * unpack
- */
-
-/* READ_PACKED
- *  macro to read source elements into register
- *  casts source pointer to appropriate type
- *  performs byte swap if necessary to ensure that
- *    elements are in reverse order
- */
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define READ_PACKED32( src, idx ) \
-    bswap_32 ( ( ( const uint32_t* ) ( src ) ) [ idx ] )
-#define READ_PACKED64( src, idx ) \
-    bswap_64 ( ( ( const uint64_t* ) ( src ) ) [ idx ] )
-#else
-#define READ_PACKED32( src, idx ) \
-    ( ( const uint32_t* ) ( src ) ) [ idx ]
-#define READ_PACKED64( src, idx ) \
-    ( ( const uint64_t* ) ( src ) ) [ idx ]
-#endif
-
-/* WRITE_UNPACKED
- *  macro to write destination elements from register
- *  casts destination pointer to appropriate type
- *  performs byte swap if necessary to ensure that
- *    elements are in original stream order
- */
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define WRITE_UNPACKED8( out, dst, idx ) \
-    ( ( uint64_t* ) ( dst ) ) [ idx ] = ( out )
-#else
-#define WRITE_UNPACKED8( out, dst, idx ) \
-    ( ( uint64_t* ) ( dst ) ) [ idx ] = bswap_64 ( out )
-#endif
-uint8_t unpack_8_from_2_arr[256][4]={
-{0,0,0,0},{0,0,0,1},{0,0,0,2},{0,0,0,3},
-{0,0,1,0},{0,0,1,1},{0,0,1,2},{0,0,1,3},
-{0,0,2,0},{0,0,2,1},{0,0,2,2},{0,0,2,3},
-{0,0,3,0},{0,0,3,1},{0,0,3,2},{0,0,3,3},
-{0,1,0,0},{0,1,0,1},{0,1,0,2},{0,1,0,3},
-{0,1,1,0},{0,1,1,1},{0,1,1,2},{0,1,1,3},
-{0,1,2,0},{0,1,2,1},{0,1,2,2},{0,1,2,3},
-{0,1,3,0},{0,1,3,1},{0,1,3,2},{0,1,3,3},
-{0,2,0,0},{0,2,0,1},{0,2,0,2},{0,2,0,3},
-{0,2,1,0},{0,2,1,1},{0,2,1,2},{0,2,1,3},
-{0,2,2,0},{0,2,2,1},{0,2,2,2},{0,2,2,3},
-{0,2,3,0},{0,2,3,1},{0,2,3,2},{0,2,3,3},
-{0,3,0,0},{0,3,0,1},{0,3,0,2},{0,3,0,3},
-{0,3,1,0},{0,3,1,1},{0,3,1,2},{0,3,1,3},
-{0,3,2,0},{0,3,2,1},{0,3,2,2},{0,3,2,3},
-{0,3,3,0},{0,3,3,1},{0,3,3,2},{0,3,3,3},
-{1,0,0,0},{1,0,0,1},{1,0,0,2},{1,0,0,3},
-{1,0,1,0},{1,0,1,1},{1,0,1,2},{1,0,1,3},
-{1,0,2,0},{1,0,2,1},{1,0,2,2},{1,0,2,3},
-{1,0,3,0},{1,0,3,1},{1,0,3,2},{1,0,3,3},
-{1,1,0,0},{1,1,0,1},{1,1,0,2},{1,1,0,3},
-{1,1,1,0},{1,1,1,1},{1,1,1,2},{1,1,1,3},
-{1,1,2,0},{1,1,2,1},{1,1,2,2},{1,1,2,3},
-{1,1,3,0},{1,1,3,1},{1,1,3,2},{1,1,3,3},
-{1,2,0,0},{1,2,0,1},{1,2,0,2},{1,2,0,3},
-{1,2,1,0},{1,2,1,1},{1,2,1,2},{1,2,1,3},
-{1,2,2,0},{1,2,2,1},{1,2,2,2},{1,2,2,3},
-{1,2,3,0},{1,2,3,1},{1,2,3,2},{1,2,3,3},
-{1,3,0,0},{1,3,0,1},{1,3,0,2},{1,3,0,3},
-{1,3,1,0},{1,3,1,1},{1,3,1,2},{1,3,1,3},
-{1,3,2,0},{1,3,2,1},{1,3,2,2},{1,3,2,3},
-{1,3,3,0},{1,3,3,1},{1,3,3,2},{1,3,3,3},
-{2,0,0,0},{2,0,0,1},{2,0,0,2},{2,0,0,3},
-{2,0,1,0},{2,0,1,1},{2,0,1,2},{2,0,1,3},
-{2,0,2,0},{2,0,2,1},{2,0,2,2},{2,0,2,3},
-{2,0,3,0},{2,0,3,1},{2,0,3,2},{2,0,3,3},
-{2,1,0,0},{2,1,0,1},{2,1,0,2},{2,1,0,3},
-{2,1,1,0},{2,1,1,1},{2,1,1,2},{2,1,1,3},
-{2,1,2,0},{2,1,2,1},{2,1,2,2},{2,1,2,3},
-{2,1,3,0},{2,1,3,1},{2,1,3,2},{2,1,3,3},
-{2,2,0,0},{2,2,0,1},{2,2,0,2},{2,2,0,3},
-{2,2,1,0},{2,2,1,1},{2,2,1,2},{2,2,1,3},
-{2,2,2,0},{2,2,2,1},{2,2,2,2},{2,2,2,3},
-{2,2,3,0},{2,2,3,1},{2,2,3,2},{2,2,3,3},
-{2,3,0,0},{2,3,0,1},{2,3,0,2},{2,3,0,3},
-{2,3,1,0},{2,3,1,1},{2,3,1,2},{2,3,1,3},
-{2,3,2,0},{2,3,2,1},{2,3,2,2},{2,3,2,3},
-{2,3,3,0},{2,3,3,1},{2,3,3,2},{2,3,3,3},
-{3,0,0,0},{3,0,0,1},{3,0,0,2},{3,0,0,3},
-{3,0,1,0},{3,0,1,1},{3,0,1,2},{3,0,1,3},
-{3,0,2,0},{3,0,2,1},{3,0,2,2},{3,0,2,3},
-{3,0,3,0},{3,0,3,1},{3,0,3,2},{3,0,3,3},
-{3,1,0,0},{3,1,0,1},{3,1,0,2},{3,1,0,3},
-{3,1,1,0},{3,1,1,1},{3,1,1,2},{3,1,1,3},
-{3,1,2,0},{3,1,2,1},{3,1,2,2},{3,1,2,3},
-{3,1,3,0},{3,1,3,1},{3,1,3,2},{3,1,3,3},
-{3,2,0,0},{3,2,0,1},{3,2,0,2},{3,2,0,3},
-{3,2,1,0},{3,2,1,1},{3,2,1,2},{3,2,1,3},
-{3,2,2,0},{3,2,2,1},{3,2,2,2},{3,2,2,3},
-{3,2,3,0},{3,2,3,1},{3,2,3,2},{3,2,3,3},
-{3,3,0,0},{3,3,0,1},{3,3,0,2},{3,3,0,3},
-{3,3,1,0},{3,3,1,1},{3,3,1,2},{3,3,1,3},
-{3,3,2,0},{3,3,2,1},{3,3,2,2},{3,3,2,3},
-{3,3,3,0},{3,3,3,1},{3,3,3,2},{3,3,3,3},
-};
-uint8_t unpack_8_from_1_arr[256][8]={
-{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,1},{0,0,0,0,0,0,1,0},{0,0,0,0,0,0,1,1},
-{0,0,0,0,0,1,0,0},{0,0,0,0,0,1,0,1},{0,0,0,0,0,1,1,0},{0,0,0,0,0,1,1,1},
-{0,0,0,0,1,0,0,0},{0,0,0,0,1,0,0,1},{0,0,0,0,1,0,1,0},{0,0,0,0,1,0,1,1},
-{0,0,0,0,1,1,0,0},{0,0,0,0,1,1,0,1},{0,0,0,0,1,1,1,0},{0,0,0,0,1,1,1,1},
-{0,0,0,1,0,0,0,0},{0,0,0,1,0,0,0,1},{0,0,0,1,0,0,1,0},{0,0,0,1,0,0,1,1},
-{0,0,0,1,0,1,0,0},{0,0,0,1,0,1,0,1},{0,0,0,1,0,1,1,0},{0,0,0,1,0,1,1,1},
-{0,0,0,1,1,0,0,0},{0,0,0,1,1,0,0,1},{0,0,0,1,1,0,1,0},{0,0,0,1,1,0,1,1},
-{0,0,0,1,1,1,0,0},{0,0,0,1,1,1,0,1},{0,0,0,1,1,1,1,0},{0,0,0,1,1,1,1,1},
-{0,0,1,0,0,0,0,0},{0,0,1,0,0,0,0,1},{0,0,1,0,0,0,1,0},{0,0,1,0,0,0,1,1},
-{0,0,1,0,0,1,0,0},{0,0,1,0,0,1,0,1},{0,0,1,0,0,1,1,0},{0,0,1,0,0,1,1,1},
-{0,0,1,0,1,0,0,0},{0,0,1,0,1,0,0,1},{0,0,1,0,1,0,1,0},{0,0,1,0,1,0,1,1},
-{0,0,1,0,1,1,0,0},{0,0,1,0,1,1,0,1},{0,0,1,0,1,1,1,0},{0,0,1,0,1,1,1,1},
-{0,0,1,1,0,0,0,0},{0,0,1,1,0,0,0,1},{0,0,1,1,0,0,1,0},{0,0,1,1,0,0,1,1},
-{0,0,1,1,0,1,0,0},{0,0,1,1,0,1,0,1},{0,0,1,1,0,1,1,0},{0,0,1,1,0,1,1,1},
-{0,0,1,1,1,0,0,0},{0,0,1,1,1,0,0,1},{0,0,1,1,1,0,1,0},{0,0,1,1,1,0,1,1},
-{0,0,1,1,1,1,0,0},{0,0,1,1,1,1,0,1},{0,0,1,1,1,1,1,0},{0,0,1,1,1,1,1,1},
-{0,1,0,0,0,0,0,0},{0,1,0,0,0,0,0,1},{0,1,0,0,0,0,1,0},{0,1,0,0,0,0,1,1},
-{0,1,0,0,0,1,0,0},{0,1,0,0,0,1,0,1},{0,1,0,0,0,1,1,0},{0,1,0,0,0,1,1,1},
-{0,1,0,0,1,0,0,0},{0,1,0,0,1,0,0,1},{0,1,0,0,1,0,1,0},{0,1,0,0,1,0,1,1},
-{0,1,0,0,1,1,0,0},{0,1,0,0,1,1,0,1},{0,1,0,0,1,1,1,0},{0,1,0,0,1,1,1,1},
-{0,1,0,1,0,0,0,0},{0,1,0,1,0,0,0,1},{0,1,0,1,0,0,1,0},{0,1,0,1,0,0,1,1},
-{0,1,0,1,0,1,0,0},{0,1,0,1,0,1,0,1},{0,1,0,1,0,1,1,0},{0,1,0,1,0,1,1,1},
-{0,1,0,1,1,0,0,0},{0,1,0,1,1,0,0,1},{0,1,0,1,1,0,1,0},{0,1,0,1,1,0,1,1},
-{0,1,0,1,1,1,0,0},{0,1,0,1,1,1,0,1},{0,1,0,1,1,1,1,0},{0,1,0,1,1,1,1,1},
-{0,1,1,0,0,0,0,0},{0,1,1,0,0,0,0,1},{0,1,1,0,0,0,1,0},{0,1,1,0,0,0,1,1},
-{0,1,1,0,0,1,0,0},{0,1,1,0,0,1,0,1},{0,1,1,0,0,1,1,0},{0,1,1,0,0,1,1,1},
-{0,1,1,0,1,0,0,0},{0,1,1,0,1,0,0,1},{0,1,1,0,1,0,1,0},{0,1,1,0,1,0,1,1},
-{0,1,1,0,1,1,0,0},{0,1,1,0,1,1,0,1},{0,1,1,0,1,1,1,0},{0,1,1,0,1,1,1,1},
-{0,1,1,1,0,0,0,0},{0,1,1,1,0,0,0,1},{0,1,1,1,0,0,1,0},{0,1,1,1,0,0,1,1},
-{0,1,1,1,0,1,0,0},{0,1,1,1,0,1,0,1},{0,1,1,1,0,1,1,0},{0,1,1,1,0,1,1,1},
-{0,1,1,1,1,0,0,0},{0,1,1,1,1,0,0,1},{0,1,1,1,1,0,1,0},{0,1,1,1,1,0,1,1},
-{0,1,1,1,1,1,0,0},{0,1,1,1,1,1,0,1},{0,1,1,1,1,1,1,0},{0,1,1,1,1,1,1,1},
-{1,0,0,0,0,0,0,0},{1,0,0,0,0,0,0,1},{1,0,0,0,0,0,1,0},{1,0,0,0,0,0,1,1},
-{1,0,0,0,0,1,0,0},{1,0,0,0,0,1,0,1},{1,0,0,0,0,1,1,0},{1,0,0,0,0,1,1,1},
-{1,0,0,0,1,0,0,0},{1,0,0,0,1,0,0,1},{1,0,0,0,1,0,1,0},{1,0,0,0,1,0,1,1},
-{1,0,0,0,1,1,0,0},{1,0,0,0,1,1,0,1},{1,0,0,0,1,1,1,0},{1,0,0,0,1,1,1,1},
-{1,0,0,1,0,0,0,0},{1,0,0,1,0,0,0,1},{1,0,0,1,0,0,1,0},{1,0,0,1,0,0,1,1},
-{1,0,0,1,0,1,0,0},{1,0,0,1,0,1,0,1},{1,0,0,1,0,1,1,0},{1,0,0,1,0,1,1,1},
-{1,0,0,1,1,0,0,0},{1,0,0,1,1,0,0,1},{1,0,0,1,1,0,1,0},{1,0,0,1,1,0,1,1},
-{1,0,0,1,1,1,0,0},{1,0,0,1,1,1,0,1},{1,0,0,1,1,1,1,0},{1,0,0,1,1,1,1,1},
-{1,0,1,0,0,0,0,0},{1,0,1,0,0,0,0,1},{1,0,1,0,0,0,1,0},{1,0,1,0,0,0,1,1},
-{1,0,1,0,0,1,0,0},{1,0,1,0,0,1,0,1},{1,0,1,0,0,1,1,0},{1,0,1,0,0,1,1,1},
-{1,0,1,0,1,0,0,0},{1,0,1,0,1,0,0,1},{1,0,1,0,1,0,1,0},{1,0,1,0,1,0,1,1},
-{1,0,1,0,1,1,0,0},{1,0,1,0,1,1,0,1},{1,0,1,0,1,1,1,0},{1,0,1,0,1,1,1,1},
-{1,0,1,1,0,0,0,0},{1,0,1,1,0,0,0,1},{1,0,1,1,0,0,1,0},{1,0,1,1,0,0,1,1},
-{1,0,1,1,0,1,0,0},{1,0,1,1,0,1,0,1},{1,0,1,1,0,1,1,0},{1,0,1,1,0,1,1,1},
-{1,0,1,1,1,0,0,0},{1,0,1,1,1,0,0,1},{1,0,1,1,1,0,1,0},{1,0,1,1,1,0,1,1},
-{1,0,1,1,1,1,0,0},{1,0,1,1,1,1,0,1},{1,0,1,1,1,1,1,0},{1,0,1,1,1,1,1,1},
-{1,1,0,0,0,0,0,0},{1,1,0,0,0,0,0,1},{1,1,0,0,0,0,1,0},{1,1,0,0,0,0,1,1},
-{1,1,0,0,0,1,0,0},{1,1,0,0,0,1,0,1},{1,1,0,0,0,1,1,0},{1,1,0,0,0,1,1,1},
-{1,1,0,0,1,0,0,0},{1,1,0,0,1,0,0,1},{1,1,0,0,1,0,1,0},{1,1,0,0,1,0,1,1},
-{1,1,0,0,1,1,0,0},{1,1,0,0,1,1,0,1},{1,1,0,0,1,1,1,0},{1,1,0,0,1,1,1,1},
-{1,1,0,1,0,0,0,0},{1,1,0,1,0,0,0,1},{1,1,0,1,0,0,1,0},{1,1,0,1,0,0,1,1},
-{1,1,0,1,0,1,0,0},{1,1,0,1,0,1,0,1},{1,1,0,1,0,1,1,0},{1,1,0,1,0,1,1,1},
-{1,1,0,1,1,0,0,0},{1,1,0,1,1,0,0,1},{1,1,0,1,1,0,1,0},{1,1,0,1,1,0,1,1},
-{1,1,0,1,1,1,0,0},{1,1,0,1,1,1,0,1},{1,1,0,1,1,1,1,0},{1,1,0,1,1,1,1,1},
-{1,1,1,0,0,0,0,0},{1,1,1,0,0,0,0,1},{1,1,1,0,0,0,1,0},{1,1,1,0,0,0,1,1},
-{1,1,1,0,0,1,0,0},{1,1,1,0,0,1,0,1},{1,1,1,0,0,1,1,0},{1,1,1,0,0,1,1,1},
-{1,1,1,0,1,0,0,0},{1,1,1,0,1,0,0,1},{1,1,1,0,1,0,1,0},{1,1,1,0,1,0,1,1},
-{1,1,1,0,1,1,0,0},{1,1,1,0,1,1,0,1},{1,1,1,0,1,1,1,0},{1,1,1,0,1,1,1,1},
-{1,1,1,1,0,0,0,0},{1,1,1,1,0,0,0,1},{1,1,1,1,0,0,1,0},{1,1,1,1,0,0,1,1},
-{1,1,1,1,0,1,0,0},{1,1,1,1,0,1,0,1},{1,1,1,1,0,1,1,0},{1,1,1,1,0,1,1,1},
-{1,1,1,1,1,0,0,0},{1,1,1,1,1,0,0,1},{1,1,1,1,1,0,1,0},{1,1,1,1,1,0,1,1},
-{1,1,1,1,1,1,0,0},{1,1,1,1,1,1,0,1},{1,1,1,1,1,1,1,0},{1,1,1,1,1,1,1,1},
-};
-
-static
-void CC Unpack8From2(uint8_t *dst,const uint8_t *src,int32_t count)
-{
-	if(count > 0){
-		int i;
-		for(i=0;i<count/4;i++,dst+=4,src++){
-			memcpy(dst,unpack_8_from_2_arr[*src],4);
-		}
-		for(i=0;i< (count&3);i++){
-			dst[i] = unpack_8_from_2_arr[*src][i];
-		}
-	}
-}
-static
-void CC Unpack8From1(uint8_t *dst,const uint8_t *src,int32_t count)
-{
-	if(count > 0){
-		int i;
-		for(i=0;i<count/8;i++,dst+=8,src++){
-			memcpy(dst,unpack_8_from_1_arr[*src],8);
-		}
-		for(i=0;i< (count&7);i++){
-			dst[i] = unpack_8_from_1_arr[*src][i];
-		}
-	}
-}
-
-
-
-
-/* Unpack8
- */
-static
-void CC Unpack8 ( uint32_t packed, uint32_t count, void *dst,
-    const void *src, bitsz_t src_off, bitsz_t ssize )
-{
-    uint64_t acc;
-    uint64_t out;
-    uint32_t abits;
-    uint64_t src_mask;
-    /* keep track of trailing bits */
-    uint32_t discard = (uint32_t)( ( 0 - ( ssize += src_off ) ) & 7 );
-
-
-    if(src_off == 0){
-	switch(packed){
-	 case 1:
-		Unpack8From1(dst,src,count);
-		return;
-	 case 2:
-		Unpack8From2(dst,src,count);
-		return;
-	}
-    }
-	
-
-
-    /* convert to bytes */
-    ssize = ( ssize + 7 ) >> 3;
-
-    /* first, get any stray source bytes */
-    for ( abits = 0, acc = 0; ( ssize & 3 ) != 0; abits += 8 )
-    {
-        acc <<= 8;
-        acc |= ( ( const uint8_t* ) src ) [ -- ssize ];
-    }
-
-    /* only reading 4 bytes at a time now */
-    ssize >>= 2;
-
-    /* if source size was even multiple of 4 bytes */
-    if ( abits == 0 )
-    {
-        assert ( ssize != 0 );
-        acc = READ_PACKED32 ( src, -- ssize );
-        abits = 32;
-    }
-    /* bytes were accumulated in backward order */
-    else if ( abits != 8 )
-    {
-        acc = bswap_32 ( ( uint32_t ) ( acc << ( 32 - abits ) ) );
-    }
-
-    /* discard alignment bits */
-    if ( discard != 0 )
-    {
-        acc >>= discard;
-        abits -= discard;
-    }
-
-    /* create source mask */
-    src_mask = ( ( uint64_t ) 1U << packed ) - 1;
-
-    /* write stray output bytes */
-    for ( ; ( count & 7 ) != 0; abits -= packed, acc >>= packed )
-    {
-        /* make sure there are enough source bits */
-        if ( abits < packed )
-        {
-            assert ( ssize != 0 );
-            acc |= ( uint64_t ) READ_PACKED32 ( src, -- ssize ) << abits;
-            abits += 32;
-            assert ( abits >= packed );
-        }
-
-        /* write directly to destination */
-        ( ( uint8_t* ) dst ) [ -- count ] = ( uint8_t ) ( acc & src_mask );
-    }
-
-    /* accumulate into unpack register */
-    for ( count >>= 3; count != 0; abits -= packed, acc >>= packed )
-    {
-        /* bring in enough source bits */
-        if ( abits < packed )
-        {
-            assert ( ssize != 0 );
-            acc |= ( uint64_t ) READ_PACKED32 ( src, -- ssize ) << abits;
-            abits += 32;
-            assert ( abits >= packed );
-        }
-
-        /* get byte in reverse order */
-        out = acc & src_mask;
-
-        /* drop packed bits */
-        abits -= packed;
-        acc >>= packed;
-
-        /* same for remaining output bytes */
-        out <<= 8;
-        if ( abits < packed )
-        {
-            assert ( ssize != 0 );
-            acc |= ( uint64_t ) READ_PACKED32 ( src, -- ssize ) << abits;
-            abits += 32;
-            assert ( abits >= packed );
-        }
-        out |= acc & src_mask;
-        abits -= packed;
-        acc >>= packed;
-
-        out <<= 8;
-        if ( abits < packed )
-        {
-            assert ( ssize != 0 );
-            acc |= ( uint64_t ) READ_PACKED32 ( src, -- ssize ) << abits;
-            abits += 32;
-            assert ( abits >= packed );
-        }
-        out |= acc & src_mask;
-        abits -= packed;
-        acc >>= packed;
-
-        out <<= 8;
-        if ( abits < packed )
-        {
-            assert ( ssize != 0 );
-            acc |= ( uint64_t ) READ_PACKED32 ( src, -- ssize ) << abits;
-            abits += 32;
-            assert ( abits >= packed );
-        }
-        out |= acc & src_mask;
-        abits -= packed;
-        acc >>= packed;
-
-        out <<= 8;
-        if ( abits < packed )
-        {
-            assert ( ssize != 0 );
-            acc |= ( uint64_t ) READ_PACKED32 ( src, -- ssize ) << abits;
-            abits += 32;
-            assert ( abits >= packed );
-        }
-        out |= acc & src_mask;
-        abits -= packed;
-        acc >>= packed;
-
-        out <<= 8;
-        if ( abits < packed )
-        {
-            assert ( ssize != 0 );
-            acc |= ( uint64_t ) READ_PACKED32 ( src, -- ssize ) << abits;
-            abits += 32;
-            assert ( abits >= packed );
-        }
-        out |= acc & src_mask;
-        abits -= packed;
-        acc >>= packed;
-
-        out <<= 8;
-        if ( abits < packed )
-        {
-            assert ( ssize != 0 );
-            acc |= ( uint64_t ) READ_PACKED32 ( src, -- ssize ) << abits;
-            abits += 32;
-            assert ( abits >= packed );
-        }
-        out |= acc & src_mask;
-        abits -= packed;
-        acc >>= packed;
-
-        out <<= 8;
-        if ( abits < packed )
-        {
-            assert ( ssize != 0 );
-            acc |= ( uint64_t ) READ_PACKED32 ( src, -- ssize ) << abits;
-            abits += 32;
-            assert ( abits >= packed );
-        }
-        out |= acc & src_mask;
-
-        /* write output */
-        WRITE_UNPACKED8 ( out, dst, -- count );
-    }
-
-    /* should have written everything */
-    assert ( abits == 0 );
-    assert ( ssize == 0 );
-}
-
-
-/* Unpack16
- */
-static
-void CC Unpack16 ( uint32_t packed, uint32_t count, void *dst,
-    const void *src, bitsz_t src_off, bitsz_t ssize )
-{
-    uint64_t acc;
-    uint32_t abits;
-
-    uint64_t src_mask;
-    uint32_t discard = (uint32_t)( ( 0 - ( ssize += src_off ) ) & 7 );
-
-    /* convert to bytes */
-    ssize = ( ssize + 7 ) >> 3;
-
-    /* first, get any stray source bytes */
-    for ( abits = 0, acc = 0; ( ssize & 3 ) != 0; abits += 8 )
-    {
-        acc <<= 8;
-        acc |= ( ( const uint8_t* ) src ) [ -- ssize ];
-    }
-
-    /* only reading 4 bytes at a time now */
-    ssize >>= 2;
-
-    /* if source size was even multiple of 4 bytes */
-    if ( abits == 0 )
-    {
-        assert ( ssize != 0 );
-        acc = READ_PACKED32 ( src, -- ssize );
-        abits = 32;
-    }
-    /* bytes were accumulated in backward order */
-    else if ( abits != 8 )
-    {
-        acc = bswap_32 ( ( uint32_t ) ( acc << ( 32 - abits ) ) );
-    }
-
-
-    /* discard alignment bits */
-    if ( discard != 0 )
-    {
-        assert ( discard < 8 );
-        acc >>= discard;
-        abits -= discard;
-    }
-
-    /* create write mask */
-    src_mask = ( ( uint64_t ) 1U << packed ) - 1;
-
-    /* write output */
-    for ( ; count != 0; abits -= packed, acc >>= packed )
-    {
-        if ( abits < packed )
-        {
-            assert ( ssize != 0 );
-            acc |= ( uint64_t ) READ_PACKED32 ( src, -- ssize ) << abits;
-            abits += 32;
-            assert ( abits >= packed );
-        }
-
-        ( ( uint16_t* ) dst ) [ -- count ] = ( uint16_t ) ( acc & src_mask );
-    }
-
-    /* should have written everything */
-    assert ( abits == 0 );
-    assert ( ssize == 0 );
-}
-
-
-/* Unpack32
- */
-static
-void CC Unpack32 ( uint32_t packed, uint32_t count, void *dst,
-    const void *src, bitsz_t src_off, bitsz_t ssize )
-{
-    uint64_t acc;
-    uint32_t abits;
-
-    uint64_t src_mask;
-    uint32_t discard = (uint32_t)( ( 0 - ( ssize += src_off ) ) & 7 );
-
-    /* convert to bytes */
-    ssize = ( ssize + 7 ) >> 3;
-
-    /* first, get any stray source bytes */
-    for ( abits = 0, acc = 0; ( ssize & 3 ) != 0; abits += 8 )
-    {
-        acc <<= 8;
-        acc |= ( ( const uint8_t* ) src ) [ -- ssize ];
-    }
-
-    /* only reading 4 bytes at a time now */
-    ssize >>= 2;
-
-    /* if source size was even multiple of 4 bytes */
-    if ( abits == 0 )
-    {
-        assert ( ssize != 0 );
-        acc = READ_PACKED32 ( src, -- ssize );
-        abits = 32;
-    }
-    /* bytes were accumulated in backward order */
-    else if ( abits != 8 )
-    {
-        acc = bswap_32 ( ( uint32_t ) ( acc << ( 32 - abits ) ) );
-    }
-
-    /* discard alignment bits */
-    if ( discard != 0 )
-    {
-        assert ( discard < 8 );
-        acc >>= discard;
-        abits -= discard;
-    }
-
-    /* create write mask */
-    src_mask = ( ( uint64_t ) 1U << packed ) - 1;
-
-    /* write output */
-    for ( ; count != 0; abits -= packed, acc >>= packed )
-    {
-        if ( abits < packed )
-        {
-            assert ( ssize != 0 );
-            acc |= ( uint64_t ) READ_PACKED32 ( src, -- ssize ) << abits;
-            abits += 32;
-            assert ( abits >= packed );
-        }
-
-        ( ( uint32_t* ) dst ) [ -- count ] = ( uint32_t ) ( acc & src_mask );
-    }
-
-    /* should have written everything */
-    assert ( abits == 0 );
-    assert ( ssize == 0 );
-}
-
-
-/* Unpack64a
- *  packed size <= 32
- */
-static
-void CC Unpack64a ( uint32_t packed, uint32_t count, void *dst,
-    const void *src, bitsz_t src_off, bitsz_t ssize )
-{
-    uint64_t acc;
-    uint32_t abits;
-
-    uint64_t src_mask;
-    uint32_t discard = (uint32_t)( ( 0 - ( ssize += src_off ) ) & 7 );
-
-    /* convert to bytes */
-    ssize = ( ssize + 7 ) >> 3;
-
-    /* first, get any stray source bytes */
-    for ( abits = 0, acc = 0; ( ssize & 3 ) != 0; abits += 8 )
-    {
-        acc <<= 8;
-        acc |= ( ( const uint8_t* ) src ) [ -- ssize ];
-    }
-
-    /* only reading 4 bytes at a time now */
-    ssize >>= 2;
-
-    /* if source size was even multiple of 4 bytes */
-    if ( abits == 0 )
-    {
-        assert ( ssize != 0 );
-        acc = READ_PACKED32 ( src, -- ssize );
-        abits = 32;
-    }
-    /* bytes were accumulated in backward order */
-    else if ( abits != 8 )
-    {
-        acc = bswap_32 ( ( uint32_t ) ( acc << ( 32 - abits ) ) );
-    }
-
-    /* discard alignment bits */
-    if ( discard != 0 )
-    {
-        assert ( discard < 8 );
-        acc >>= discard;
-        abits -= discard;
-    }
-
-    /* create write mask */
-    src_mask = ( ( uint64_t ) 1U << packed ) - 1;
-
-    /* write output */
-    for ( ; count != 0; abits -= packed, acc >>= packed )
-    {
-        if ( abits < packed )
-        {
-            assert ( ssize != 0 );
-            acc |= ( uint64_t ) READ_PACKED32 ( src, -- ssize ) << abits;
-            abits += 32;
-            assert ( abits >= packed );
-        }
-
-        ( ( uint64_t* ) dst ) [ -- count ] = acc & src_mask;
-    }
-
-    /* should have written everything */
-    assert ( abits == 0 );
-    assert ( ssize == 0 );
-}
-
-
-/* Unpack64b
- *  packed size > 32
- */
-static
-void CC Unpack64b ( uint32_t packed, uint32_t count, void *dst,
-    const void *src, bitsz_t src_off, bitsz_t ssize )
-{
-    uint128_t acc;
-    uint32_t abits;
-
-    uint64_t src_mask;
-    uint32_t discard = (uint32_t)( ( 0 - ( ssize += src_off ) ) & 7 );
-
-    /* convert to bytes */
-    ssize = ( ssize + 7 ) >> 3;
-
-    /* probably still don't support native 128 bit */
-    uint128_sethi ( & acc, 0 );
-    uint128_setlo ( & acc, 0 );
-
-    /* first, get any stray source bytes */
-    for ( abits = 0; ( ssize & 7 ) != 0; abits += 8 )
-    {
-        uint128_shl ( & acc, 8 );
-        uint128_orlo ( & acc, ( ( const uint8_t* ) src ) [ -- ssize ] );
-    }
-
-    /* only reading 8 bytes at a time now */
-    ssize >>= 3;
-
-    /* if source size was even multiple of 4 bytes */
-    if ( abits == 0 )
-    {
-        assert ( ssize != 0 );
-        uint128_setlo ( & acc, READ_PACKED64 ( src, -- ssize ) );
-        abits = 64;
-    }
-    /* bytes were accumulated in backward order */
-    else if ( abits != 8 )
-    {
-        uint128_setlo ( & acc, bswap_64 ( uint128_lo ( & acc ) << ( 64 - abits ) ) );
-    }
-
-    /* discard alignment bits */
-    if ( discard != 0 )
-    {
-        assert ( discard < 8 );
-        uint128_shr ( & acc, discard );
-        abits -= discard;
-    }
-
-    /* create write mask */
-    src_mask = ( ( uint64_t ) 1U << packed ) - 1;
-
-    /* write output */
-    for ( ; count != 0; abits -= packed, uint128_shr ( & acc, packed ) )
-    {
-        if ( abits < packed )
-        {
-            uint128_t in;
-            assert ( ssize != 0 );
-            uint128_sethi ( & in, 0 );
-            uint128_setlo ( & in, READ_PACKED64 ( src, -- ssize ) );
-            uint128_shl ( & in, abits );
-            uint128_or ( & acc, & in );
-            abits += 64;
-            assert ( abits >= packed );
-        }
-
-        ( ( uint64_t* ) dst ) [ -- count ] = uint128_lo ( & acc ) & src_mask;
-    }
-
-    /* should have written everything */
-    assert ( abits == 0 );
-    assert ( ssize == 0 );
-}
-
-
-/* Unpack
- *  accepts a series of packed source bits
- *  produces a series of unpacked destination bits by left-padding zeros
- *
- *  "packed" [ IN ] - packed element size in bits
- *
- *  "unpacked [ IN ] - original element size in bits
- *  must be >= "packed" and
- *  must be in 2^^[3..6], i.e. { 8, 16, 32, 64 }
- *
- *  "src" [ IN ] and "src_off" [ IN ] - source buffer
- *  bit address
- *
- *  "ssize" [ IN ] - number of bits in "src", not including "src_off"
- *
- *  "consumed" [ OUT, NULL OKAY ] - number of source bits
- *  consumed. if NULL, then all source bits MUST be consumed
- *  or an error will be generated.
- *
- *  "dst" [ OUT ] and "dsize" [ IN ] - destination buffer
- *  where size is given in bytes
- *
- *  "usize" [ OUT ] - resultant unpacked size in bytes
- *
- * NB - "src" and "dst" may have same address since
- *  the implementation unpacks from right to left, smaller to larger
- */
-LIB_EXPORT rc_t CC Unpack ( uint32_t packed, uint32_t unpacked,
-    const void *src, bitsz_t src_off, bitsz_t ssize, bitsz_t *consumed,
-    void *dst, size_t dsize, size_t *usize )
-{
-    uint32_t count;
-
-    /* prepare for failure */
-    if ( consumed != NULL )
-        * consumed = 0;
-
-    /* validate output param */
-    if ( usize == NULL )
-        return RC ( rcXF, rcBuffer, rcUnpacking, rcParam, rcNull );
-    * usize = 0;
-
-    /* require power of 2 with value between 8 and 64 */
-    if ( ( ( unpacked - 1 ) & unpacked ) != 0 ||
-         unpacked < 8 || unpacked > 64 )
-        return RC ( rcXF, rcBuffer, rcUnpacking, rcParam, rcInvalid );
-
-    /* validate remaining params */
-    if ( unpacked < packed || packed == 0 )
-        return RC ( rcXF, rcBuffer, rcUnpacking, rcParam, rcInvalid );
-
-    if ( ssize == 0 )
-        return 0;
-
-    if ( src == NULL )
-        return RC ( rcXF, rcBuffer, rcUnpacking, rcParam, rcNull );
-
-    src = & ( ( const char* ) src ) [ src_off >> 3 ];
-    src_off &= 7;
-
-    /* required destination buffer size */
-    count = ( uint32_t ) ( ssize / packed );
-    if ( count == 0 )
-        return 0;
-    * usize = ( (size_t)count * unpacked ) >> 3;
-
-    if ( dsize < * usize )
-    {
-        if ( consumed == NULL )
-            return RC ( rcXF, rcBuffer, rcUnpacking, rcBuffer, rcInsufficient );
-
-        count = (uint32_t)( dsize / ( unpacked >> 3 ) );
-        ssize = (size_t)count * packed;
-        * usize = ( (size_t)count * unpacked ) >> 3;
-    }
-
-    if ( dst == NULL )
-    {
-        * usize = 0;
-        return RC ( rcXF, rcBuffer, rcUnpacking, rcParam, rcNull );
-    }
-
-    /* all parameters are validated */
-    if ( unpacked == 8 && packed == 8 && src_off == 0 )
-    {
-        if ( ( const void* ) dst != src )
-            memcpy ( dst, src, ssize >> 3 );
-        return 0;
-    }
-
-    /* TBD - enable unpacking from offsets */
-    if ( src_off != 0 )
-        return RC ( rcXF, rcBuffer, rcUnpacking, rcOffset, rcUnsupported );
-
-    switch ( unpacked )
-    {
-    case 8:
-        Unpack8 ( packed, count, dst, src, src_off, ssize );
-        break;
-    case 16:
-        Unpack16 ( packed, count, dst, src, src_off, ssize );
-        break;
-    case 32:
-        Unpack32 ( packed, count, dst, src, src_off, ssize );
-        break;
-    case 64:
-        if ( packed > 32 )
-            Unpack64b ( packed, count, dst, src, src_off, ssize );
-        else
-            Unpack64a ( packed, count, dst, src, src_off, ssize );
-        break;
-    }
-
-    return 0;
-}
diff --git a/libs/klib/utf8.c b/libs/klib/utf8.c
deleted file mode 100644
index 095863e..0000000
--- a/libs/klib/utf8.c
+++ /dev/null
@@ -1,1355 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/text.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-#include <wctype.h>
-
-/*--------------------------------------------------------------------------
- * raw text strings
- */
-
-/* string_len
- *  length of string in characters
- */
-LIB_EXPORT uint32_t CC string_len ( const char * str, size_t size )
-{
-    uint32_t len = 0;
-
-    if ( str != NULL )
-    {
-        size_t i;
-        for ( i = 0;; ++ len )
-        {
-            int c;
-            size_t start;
-
-            /* scan all ASCII characters */
-            for ( start = i; i < size && str [ i ] > 0; ++ i )
-                ( void ) 0;
-            len += ( uint32_t ) ( i - start );
-            if ( i >= size )
-                break;
-
-            /* handle a single UTF-8 character */
-            c = ~ ( int ) str [ i ];
-            if ( str [ i ] == 0 )
-                break;
-
-            /* str [ i ] was < 0 */
-            assert ( c > 0 && c <= 0x7F );
-
-            /* if original code was 0b10xxxxxx, illegal */
-            if ( c >= 0x40 )
-                break;
-	
-            /* original code 0b110xxxxx = 2 byte */
-            if ( c >= 0x20 )
-                i += 2;
-            /* original code 0b1110xxxx = 3 byte */
-            else if ( c >= 0x10 )
-                i += 3;
-            /* original code 0b11110xxx = 4 byte */
-            else if ( c >= 0x08 )
-                i += 4;
-            /* original code 0b111110xx = 5 byte */
-            else if ( c >= 0x04 )
-                i += 5;
-            /* original code 0b1111110x = 6 byte */
-            else if ( c >= 0x02 )
-                i += 6;
-            /* illegal code 0b1111111x */
-            else
-                break;
-	    }
-    }
-
-    return len;
-}
-
-/* string_measure
- *  measures length of string in both characters and bytes
- */
-LIB_EXPORT uint32_t CC string_measure ( const char * str, size_t * size )
-{
-    size_t i = 0;
-    uint32_t len = 0;
-
-    if ( str != NULL )
-    {
-        for ( ;; ++ len )
-        {
-            int c;
-            size_t start;
-
-            /* scan all ASCII characters */
-            for ( start = i; str [ i ] > 0; ++ i )
-                ( void ) 0;
-
-            /* the character that stopped scan */
-            c = ~ ( int ) str [ i ];
-
-            /* the number of characters */
-            len += ( uint32_t ) ( i - start );
-
-            /* handle a single UTF-8 character */
-            if ( str [ i ] == 0 )
-                break;
-
-            /* str [ i ] was < 0 */
-            assert ( c > 0 && c <= 0x7F );
-
-            /* if original code was 0b10xxxxxx, illegal */
-            if ( c >= 0x40 )
-                break;
-	
-            /* original code 0b110xxxxx = 2 byte */
-            if ( c >= 0x20 )
-                i += 2;
-            /* original code 0b1110xxxx = 3 byte */
-            else if ( c >= 0x10 )
-                i += 3;
-            /* original code 0b11110xxx = 4 byte */
-            else if ( c >= 0x08 )
-                i += 4;
-            /* original code 0b111110xx = 5 byte */
-            else if ( c >= 0x04 )
-                i += 5;
-            /* original code 0b1111110x = 6 byte */
-            else if ( c >= 0x02 )
-                i += 6;
-            /* illegal code 0b1111111x */
-            else
-                break;
-	    }
-    }
-
-    if ( size != NULL )
-        * size = i;
-
-    return len;
-}
-
-/* string_copy
- *  copies whole character text into a buffer
- *  terminates with null byte if possible
- *  returns the number of bytes copied
- */
-LIB_EXPORT size_t CC string_copy ( char *dst, size_t dst_size, const char *src, size_t src_size )
-{
-    size_t i;
-    char * dend;
-    const char * send;
-
-    if ( dst == NULL || src == NULL )
-        return 0;
-
-    if ( dst_size < src_size )
-        src_size = dst_size;
-
-    dend = dst + dst_size;
-    send = src + src_size;
-
-    for ( i = 0; i < src_size; )
-    {
-        uint32_t ch;
-        int len1, len2;
-
-        /* optimistic copy of ASCII data */
-        for ( ; i < src_size && src [ i ] > 0; ++ i )
-            dst [ i ] = src [ i ];
-        if ( i == src_size )
-            break;
-
-        /* read a ( hopefully complete ) UNICODE character ( detect NUL ) */
-        len1 = utf8_utf32 ( & ch, & src [ i ], send );
-        if ( len1 <= 0 || ch == 0 )
-            break;
-
-        /* write the UNICODE character in UTF-8 */
-        len2 = utf32_utf8 ( & dst [ i ], dend, ch );
-        if ( len2 <= 0 )
-            break;
-
-        /* should have been identical number of bytes */
-        if ( len1 != len2 )
-            break;
-
-        /* advance over the UTF-8 character */
-        i += len1;
-    }
-
-    if ( i < dst_size )
-        dst [ i ] = 0;
-
-    return i;
-}
-
-LIB_EXPORT size_t CC old_string_copy ( char *dst, size_t dst_size, const char *src, size_t src_size )
-{
-    const char *send;
-    char *dend, *begin;
-
-    assert ( dst != NULL && src != NULL );
-
-    if ( dst_size < src_size )
-        src_size = dst_size;
-
-    begin = dst;
-    dend = dst + dst_size;
-    send = src + src_size;
-
-    while ( src < send )
-    {
-        uint32_t ch;
-
-        /* get a complete source character */
-        int len = utf8_utf32 ( & ch, src, send );
-        if ( len <= 0 )
-            break;
-        src += len;
-
-        /* write it to the destination */
-        len = utf32_utf8 ( dst, dend, ch );
-        if ( len <= 0 )
-            break;
-        dst += len;
-    }
-
-    if ( dst < dend )
-        * dst = 0;
-
-    return ( size_t ) ( dst - begin );
-}
-
-
-/* string_copy_measure
- *  copies whole character text into a buffer
- *  terminates with null byte if possible
- *  returns the number of bytes copied
- */
-LIB_EXPORT size_t CC string_copy_measure ( char *dst, size_t dst_size, const char *src )
-{
-    size_t i;
-    char * dend;
-
-    if ( dst == NULL || src == NULL )
-        return 0;
-
-    dend = dst + dst_size;
-
-    for ( i = 0;; )
-    {
-        uint32_t ch;
-        int len1, len2;
-
-        /* optimistic copy of ASCII data ( NUL terminated ) */
-        for ( ; i < dst_size && src [ i ] > 0; ++ i )
-            dst [ i ] = src [ i ];
-        if ( i == dst_size || src [ i ] == 0 )
-            break;
-
-        /* read a ( hopefully complete ) UNICODE character */
-        len1 = utf8_utf32 ( & ch, & src [ i ], & src [ i + 6 ] );
-        if ( len1 <= 0 )
-            break;
-
-        /* write the UNICODE character in UTF-8 */
-        len2 = utf32_utf8 ( & dst [ i ], dend, ch );
-        if ( len2 <= 0 )
-            break;
-
-        /* should have been identical number of bytes */
-        if ( len1 != len2 )
-            break;
-
-        /* advance over the UTF-8 character */
-        i += len1;
-    }
-
-    if ( i < dst_size )
-        dst [ i ] = 0;
-
-    return i;
-}
-
-LIB_EXPORT size_t CC old_string_copy_measure ( char *dst, size_t dst_size, const char *src )
-{
-    char *dend, *begin;
-
-    assert ( dst != NULL && src != NULL );
-
-    begin = dst;
-    dend = dst + dst_size;
-
-    while ( dst < dend && src [ 0 ] != 0 )
-    {
-        uint32_t ch;
-
-        /* get a complete source character */
-        int len = utf8_utf32 ( & ch, src, src + 6 );
-        if ( len <= 0 )
-            break;
-        src += len;
-
-        /* write it to the destination */
-        len = utf32_utf8 ( dst, dend, ch );
-        if ( len <= 0 )
-            break;
-        dst += len;
-    }
-
-    if ( dst < dend )
-        * dst = 0;
-
-    return ( size_t ) ( dst - begin );
-}
-
-/* tolower_copy
- *  copies whole character text in lower-case
- *  terminates with null byte if possible
- *  returns the number of bytes copied
- */
-LIB_EXPORT size_t CC tolower_copy ( char *dst, size_t dst_size, const char *src, size_t src_size )
-{
-    size_t i;
-    char * dend;
-    const char * send;
-
-    if ( dst == NULL || src == NULL )
-        return 0;
-
-    if ( dst_size < src_size )
-        src_size = dst_size;
-
-    dend = dst + dst_size;
-    send = src + src_size;
-
-    for ( i = 0; i < src_size; )
-    {
-        uint32_t ch;
-        int len1, len2;
-
-        /* optimistic copy of ASCII data */
-        for ( ; i < src_size && src [ i ] > 0; ++ i )
-            dst [ i ] = ( char ) tolower ( src [ i ] );
-        if ( i == src_size )
-            break;
-
-        /* read a ( hopefully complete ) UNICODE character ( detect NUL ) */
-        len1 = utf8_utf32 ( & ch, & src [ i ], send );
-        if ( len1 <= 0 || ch == 0 )
-            break;
-
-        /* lower case it */
-        ch = towlower ( ( wint_t ) ch );
-
-        /* write the UNICODE character in UTF-8 */
-        len2 = utf32_utf8 ( & dst [ i ], dend, ch );
-        if ( len2 <= 0 )
-            break;
-
-        /* should have been identical number of bytes */
-        if ( len1 != len2 )
-            break;
-
-        /* advance over the UTF-8 character */
-        i += len1;
-    }
-
-    if ( i < dst_size )
-        dst [ i ] = 0;
-
-    return i;
-}
-
-
-LIB_EXPORT size_t CC old_tolower_copy ( char *dst, size_t dst_size, const char *src, size_t src_size )
-{
-    const char *send;
-    char *dend, *begin;
-
-    assert ( dst != NULL && src != NULL );
-
-    if ( dst_size < src_size )
-        src_size = dst_size;
-
-    begin = dst;
-    dend = dst + dst_size;
-    send = src + src_size;
-
-    while ( src < send )
-    {
-        uint32_t ch;
-
-        /* get a complete source character */
-        int len = utf8_utf32 ( & ch, src, send );
-        if ( len <= 0 )
-            break;
-        src += len;
-
-        /* lower case it */
-        ch = towlower ( ( wint_t ) ch );
-
-        /* write it to the destination */
-        len = utf32_utf8 ( dst, dend, ch );
-        if ( len <= 0 )
-            break;
-        dst += len;
-    }
-
-    if ( dst < dend )
-        * dst = 0;
-
-    return ( size_t ) ( dst - begin );
-}
-
-
-/* toupper_copy
- *  copies whole character text in upper-case
- *  terminates with null byte if possible
- *  returns the number of bytes copied
- */
-LIB_EXPORT size_t CC toupper_copy ( char *dst, size_t dst_size, const char *src, size_t src_size )
-{
-    size_t i;
-    char * dend;
-    const char * send;
-
-    if ( dst == NULL || src == NULL )
-        return 0;
-
-    if ( dst_size < src_size )
-        src_size = dst_size;
-
-    dend = dst + dst_size;
-    send = src + src_size;
-
-    for ( i = 0; i < src_size; )
-    {
-        uint32_t ch;
-        int len1, len2;
-
-        /* optimistic copy of ASCII data */
-        for ( ; i < src_size && src [ i ] > 0; ++ i )
-            dst [ i ] = ( char ) toupper ( src [ i ] );
-        if ( i == src_size )
-            break;
-
-        /* read a ( hopefully complete ) UNICODE character ( detect NUL ) */
-        len1 = utf8_utf32 ( & ch, & src [ i ], send );
-        if ( len1 <= 0 || ch == 0 )
-            break;
-
-        /* upper case it */
-        ch = towupper ( ( wint_t ) ch );
-
-        /* write the UNICODE character in UTF-8 */
-        len2 = utf32_utf8 ( & dst [ i ], dend, ch );
-        if ( len2 <= 0 )
-            break;
-
-        /* should have been identical number of bytes */
-        if ( len1 != len2 )
-            break;
-
-        /* advance over the UTF-8 character */
-        i += len1;
-    }
-
-    if ( i < dst_size )
-        dst [ i ] = 0;
-
-    return i;
-}
-
-LIB_EXPORT size_t CC old_toupper_copy ( char *dst, size_t dst_size, const char *src, size_t src_size )
-{
-    const char *send;
-    char *dend, *begin;
-
-    assert ( dst != NULL && src != NULL );
-
-    if ( dst_size < src_size )
-        src_size = dst_size;
-
-    begin = dst;
-    dend = dst + dst_size;
-    send = src + src_size;
-
-    while ( src < send )
-    {
-        uint32_t ch;
-
-        /* get a complete source character */
-        int len = utf8_utf32 ( & ch, src, send );
-        if ( len <= 0 )
-            break;
-        src += len;
-
-        /* upper case it */
-        ch = towupper ( ( wint_t ) ch );
-
-        /* write it to the destination */
-        len = utf32_utf8 ( dst, dend, ch );
-        if ( len <= 0 )
-            break;
-        dst += len;
-    }
-
-    if ( dst < dend )
-        * dst = 0;
-
-    return ( size_t ) ( dst - begin );
-}
-
-/* string_cmp
- *  performs a safe strncmp
- *
- *  "max_chars" limits the extent of the comparison
- *  to not exceed supplied value, i.e. the number of
- *  characters actually compared will be the minimum
- *  of asize, bsize and max_chars.
- *
- *  if either string size ( or both ) < max_chars and
- *  all compared characters match, then the result will
- *  be a comparison of asize against bsize.
- */
-LIB_EXPORT int CC string_cmp ( const char *a, size_t asize,
-    const char *b, size_t bsize, uint32_t max_chars )
-{
-    size_t i, sz;
-    uint32_t num_chars;
-    const char *aend, *bend;
-
-    if ( max_chars == 0 )
-        return 0;
-
-    if ( b == NULL )
-        return a != NULL;
-    if ( a == NULL )
-        return -1;
-
-    sz = asize;
-    if ( asize > bsize )
-        sz = bsize;
-
-    aend = a + asize;
-    bend = b + bsize;
-    num_chars = 0;
-
-    for ( i = 0; i < sz; )
-    {
-        int len1, len2;
-        uint32_t ach, bch;
-
-        /* loop to process ASCII characters */
-        for ( ; i < sz; ++ i )
-        {
-            /* detect UTF-8 character */
-            if ( a [ i ] < 0 || b [ i ] < 0 )
-                break;
-
-            /* detect different or NUL character */
-            if ( a [ i ] != b [ i ] || a [ i ] == 0 )
-                return a [ i ] - b [ i ];
-
-            /* if char count is sufficient, we're done */
-            if ( ++ num_chars == max_chars )
-                return 0;
-        }
-
-        /* read a character from a */
-        len1 = utf8_utf32 ( & ach, & a [ i ], aend );
-        if ( len1 <= 0 )
-        {
-            asize = i;
-
-            len2 = utf8_utf32 ( & bch, & b [ i ], bend );
-            if ( len2 <= 0 )
-                bsize = i;
-
-            break;
-        }
-
-        /* read a character from b */
-        len2 = utf8_utf32 ( & bch, & b [ i ], bend );
-        if ( len2 <= 0 )
-        {
-            bsize = i;
-            break;
-        }
-
-        /* compare characters */
-        if ( ach != bch )
-        {
-            if ( ach < bch )
-                return -1;
-            return 1;
-        }
-
-        /* if char count is sufficient, we're done */
-        if ( ++ num_chars == max_chars )
-            return 0;
-
-        /* adjust the pointers */
-        if ( len1 == len2 )
-            i += len1;
-        else
-        {
-            sz -= i;
-            a += i + len1;
-            b += i + len2;
-            i = 0;
-        }
-    }
-
-    /* one or both reached end < max_chars */
-    if ( asize < bsize )
-        return -1;
-
-    return asize > bsize;
-}
-
-LIB_EXPORT int CC old_string_cmp ( const char *a, size_t asize,
-    const char *b, size_t bsize, uint32_t max_chars )
-{
-    uint32_t num_chars;
-    const char *aend, *bend;
-
-    assert ( a != NULL && b != NULL );
-
-    if ( max_chars == 0 )
-        return 0;
-
-    aend = a + asize;
-    bend = b + bsize;
-    num_chars = 0;
-
-    while ( a < aend && b < bend )
-    {
-        uint32_t ach, bch;
-
-        /* read a character from a */
-        int len = utf8_utf32 ( & ach, a, aend );
-        if ( len <= 0 )
-        {
-            asize -= ( size_t ) ( aend - a );
-            break;
-        }
-        a += len;
-
-        /* read a character from b */
-        len = utf8_utf32 ( & bch, b, bend );
-        if ( len <= 0 )
-        {
-            bsize -= ( size_t ) ( bend - b );
-            break;
-        }
-        b += len;
-
-        /* compare characters */
-        if ( ach != bch )
-        {
-            if ( ach < bch )
-                return -1;
-            return 1;
-        }
-
-        /* if char count is sufficient, we're done */
-        if ( ++ num_chars == max_chars )
-            return 0;
-    }
-
-    /* one or both reached end < max_chars */
-    if ( asize < bsize )
-        return -1;
-    return asize > bsize;
-}
-
-/* strcase_cmp
- *  like string_cmp except case insensitive
- */
-LIB_EXPORT int CC strcase_cmp ( const char *a, size_t asize,
-    const char *b, size_t bsize, uint32_t max_chars )
-{
-    size_t i, sz;
-    uint32_t num_chars;
-    const char *aend, *bend;
-
-    if ( max_chars == 0 )
-        return 0;
-
-    if ( b == NULL )
-        return a != NULL;
-    if ( a == NULL )
-        return -1;
-
-    sz = asize;
-    if ( asize > bsize )
-        sz = bsize;
-
-    aend = a + asize;
-    bend = b + bsize;
-    num_chars = 0;
-
-    for ( i = 0; i < sz; )
-    {
-        int len1, len2;
-        uint32_t ach, bch;
-
-        /* loop to process ASCII characters */
-        for ( ; i < sz; ++ i )
-        {
-            /* detect UTF-8 character */
-            if ( a [ i ] < 0 || b [ i ] < 0 )
-                break;
-
-            /* detect different or NUL character */
-            if ( a [ i ] != b [ i ] || a [ i ] == 0 )
-            {
-                ach = tolower ( a [ i ] );
-                bch = tolower ( b [ i ] );
-                if ( ach != bch || ach == 0 )
-                    return ach - bch;
-            }
-
-            /* if char count is sufficient, we're done */
-            if ( ++ num_chars == max_chars )
-                return 0;
-        }
-
-        /* read a character from a */
-        len1 = utf8_utf32 ( & ach, & a [ i ], aend );
-        if ( len1 <= 0 )
-        {
-            asize = i;
-
-            len2 = utf8_utf32 ( & bch, & b [ i ], bend );
-            if ( len2 <= 0 )
-                bsize = i;
-
-            break;
-        }
-
-        /* read a character from b */
-        len2 = utf8_utf32 ( & bch, & b [ i ], bend );
-        if ( len2 <= 0 )
-        {
-            bsize = i;
-            break;
-        }
-
-        /* compare characters */
-        if ( ach != bch )
-        {
-            /* only go lower case if they differ */
-            ach = towlower ( ( wint_t ) ach );
-            bch = towlower ( ( wint_t ) bch );
-
-            if ( ach != bch )
-            {
-                if ( ach < bch )
-                    return -1;
-                return 1;
-            }
-        }
-
-        /* if char count is sufficient, we're done */
-        if ( ++ num_chars == max_chars )
-            return 0;
-
-        /* adjust the pointers */
-        if ( len1 == len2 )
-            i += len1;
-        else
-        {
-            sz -= i;
-            a += i + len1;
-            b += i + len2;
-            i = 0;
-        }
-    }
-
-    /* one or both reached end < max_chars */
-    if ( asize < bsize )
-        return -1;
-    return asize > bsize;
-}
-
-LIB_EXPORT int CC old_strcase_cmp ( const char *a, size_t asize,
-    const char *b, size_t bsize, uint32_t max_chars )
-{
-    uint32_t num_chars;
-    const char *aend, *bend;
-
-    assert ( a != NULL && b != NULL );
-
-    if ( max_chars == 0 )
-        return 0;
-
-    aend = a + asize;
-    bend = b + bsize;
-    num_chars = 0;
-
-    while ( a < aend && b < bend )
-    {
-        uint32_t ach, bch;
-
-        /* read a character from a */
-        int len = utf8_utf32 ( & ach, a, aend );
-        if ( len <= 0 )
-        {
-            asize -= ( size_t ) ( aend - a );
-            break;
-        }
-        a += len;
-
-        /* read a character from b */
-        len = utf8_utf32 ( & bch, b, bend );
-        if ( len <= 0 )
-        {
-            bsize -= ( size_t ) ( bend - b );
-            break;
-        }
-        b += len;
-
-        /* compare characters with case */
-        if ( ach != bch )
-        {
-            /* only go lower case if they differ */
-            ach = towlower ( ( wint_t ) ach );
-            bch = towlower ( ( wint_t ) bch );
-
-            if ( ach != bch )
-            {
-                if ( ach < bch )
-                    return -1;
-                return 1;
-            }
-        }
-
-        /* if char count is sufficient, we're done */
-        if ( ++ num_chars == max_chars )
-            return 0;
-    }
-
-    /* one or both reached end < max_chars */
-    if ( asize < bsize )
-        return -1;
-    return asize > bsize;
-}
-
-/* string_match
- *  returns the number of matching characters
- *
- *  "max_chars" limits the extent of the comparison
- *  to not exceed supplied value, i.e. the number of
- *  characters actually compared will be the minimum
- *  of asize, bsize and max_chars.
- *
- *  "msize" will be set to the size of the matched string
- *  if not NULL
- */
-LIB_EXPORT uint32_t CC string_match ( const char *a_orig, size_t asize,
-    const char *b, size_t bsize, uint32_t max_chars, size_t *msize )
-{
-    uint32_t i;
-    const char *a, *aend, *bend;
-
-    assert ( a_orig != NULL && b != NULL );
-
-    a = a_orig;
-    aend = a_orig + asize;
-    bend = b + bsize;
-
-    for ( i = 0; i < max_chars && a < aend && b < bend; ++ i )
-    {
-        int lena, lenb;
-        uint32_t ach, bch;
-
-        /* read a character from a */
-        lena = utf8_utf32 ( & ach, a, aend );
-        if ( lena <= 0 )
-            break;
-
-        /* read a character from b */
-        lenb = utf8_utf32 ( & bch, b, bend );
-        if ( lenb <= 0 )
-            break;
-
-        /* compare characters */
-        if ( ach != bch )
-            break;
-
-        a += lena;
-        b += lenb;
-    }
-
-    if ( msize != NULL )
-        * msize = ( size_t ) ( a - a_orig );
-    return i;
-}
-
-/* strcase_match
- *  like string_match except case insensitive
- */
-LIB_EXPORT uint32_t CC strcase_match ( const char *a_orig, size_t asize,
-    const char *b, size_t bsize, uint32_t max_chars, size_t *msize )
-{
-    uint32_t i;
-    const char *a, *aend, *bend;
-
-    assert ( a_orig != NULL && b != NULL );
-
-    a = a_orig;
-    aend = a_orig + asize;
-    bend = b + bsize;
-
-    for ( i = 0; i < max_chars && a < aend && b < bend; ++ i )
-    {
-        int lena, lenb;
-        uint32_t ach, bch;
-
-        /* read a character from a */
-        lena = utf8_utf32 ( & ach, a, aend );
-        if ( lena <= 0 )
-            break;
-
-        /* read a character from b */
-        lenb = utf8_utf32 ( & bch, b, bend );
-        if ( lenb <= 0 )
-            break;
-
-        /* compare characters */
-        if ( ach != bch )
-        {
-            /* only go lower case if they differ */
-            ach = towlower ( ( wint_t ) ach );
-            bch = towlower ( ( wint_t ) bch );
-
-            if ( ach != bch )
-                break;
-        }
-
-        a += lena;
-        b += lenb;
-    }
-
-    if ( msize != NULL )
-        * msize = ( size_t ) ( a - a_orig );
-    return i;
-}
-
-/* string_chr
- *  performs a safe strchr
- *  "ch" is in UTF32
- */
-LIB_EXPORT char * CC string_chr ( const char *str, size_t size, uint32_t ch )
-{
-    size_t i;
-
-    if ( str == NULL || size == 0 )
-        return NULL;
-
-    if ( ch < 128 )
-    {
-        /* looking for an ASCII character */
-        for ( i = 0; i < size; ++ i )
-        {
-            /* perform direct ASCII match */
-            if ( str [ i ] == ( char ) ch )
-                return ( char * ) & str [ i ];
-        }
-    }
-    else
-    {
-        int len;
-        uint32_t c;
-        const char *end = str + size;
-
-        for ( i = 0; i < size; )
-        {
-            /* skip over ASCII */
-            for ( ; i < size && str [ i ] > 0; ++ i )
-                ( void ) 0;
-            if ( i == size )
-                break;
-
-            /* read UTF-8 */
-            len = utf8_utf32 ( & c, & str [ i ], end );
-            if ( len <= 0 )
-                break;
-            if ( c == ch )
-                return ( char* ) & str [ i ];
-            i += len;
-        }
-    }
-    return NULL;
-}
-
-LIB_EXPORT char * CC old_string_chr ( const char *str, size_t size, uint32_t ch )
-{
-    const char *end;
-
-    if ( str == NULL )
-        return NULL;
-
-    end = str + size;
-    while ( str < end )
-    {
-        uint32_t c;
-        int len = utf8_utf32 ( & c, str, end );
-        if ( len <= 0 )
-            break;
-        if ( c == ch )
-            return ( char* ) str;
-        str += len;
-    }
-    return NULL;
-}
-
-/* string_rchr
- *  performs a safe strrchr
- */
-LIB_EXPORT char * CC string_rchr ( const char *str, size_t size, uint32_t ch )
-{
-    int64_t i;
-
-    if ( str == NULL || size == 0 )
-        return NULL;
-
-    if ( ch < 128 )
-    {
-        /* looking for an ASCII character */
-        for ( i = ( int64_t ) size - 1; i >= 0; -- i )
-        {
-            /* perform direct ASCII match */
-            if ( str [ i ] == ( char ) ch )
-                return ( char * ) & str [ i ];
-        }
-    }
-    else
-    {
-        int len;
-        uint32_t c;
-        const char *end;
-
-        for ( i = ( int64_t ) size - 1; i >= 0; -- i )
-        {
-            /* skip over ASCII */
-            for ( ; i >= 0 && str [ i ] > 0; -- i )
-                ( void ) 0;
-            if ( i < 0 )
-                break;
-
-            /* back over UTF-8 */
-            for ( end = & str [ i + 1 ]; i >= 0 && ( str [ i ] & 0xC0 ) == 0x80; -- i )
-                ( void ) 0;
-            if ( i < 0 )
-                break;
-
-            /* read UTF-8 */
-            len = utf8_utf32 ( & c, & str [ i ], end );
-            if ( len <= 0 || & str [ i + len ] != end )
-                break;
-            if ( c == ch )
-                return ( char* ) & str [ i ];
-        }
-    }
-    return NULL;
-}
-
-LIB_EXPORT char * CC old_string_rchr ( const char *str, size_t size, uint32_t ch )
-{
-    const char *end;
-
-    if ( str == NULL )
-        return NULL;
-
-    end = str + size;
-    while ( end > str )
-    {
-        int len;
-        uint32_t c;
-        const char *p = end - 1;
-
-        /* back up to find beginning of character */
-        while ( p > str && ( * p & 0xC0 ) == 0x80 )
-            -- p;
-
-        len = utf8_utf32 ( & c, p, end );
-        if ( len <= 0 )
-            break;
-        if ( c == ch )
-            return ( char* ) p;
-        end = p;
-    }
-    return NULL;
-}
-
-/* string_idx
- *  seek an indexed character
- */
-LIB_EXPORT char * CC string_idx ( const char *str, size_t size, uint32_t idx )
-{
-    uint32_t i;
-    const char *end;
-
-    if ( str == NULL )
-        return NULL;
-
-    end = str + size;
-    for ( i = 0; str < end; ++ i )
-    {
-        uint32_t c;
-        int len = utf8_utf32 ( & c, str, end );
-        if ( len <= 0 )
-            break;
-        if ( i == idx )
-            return ( char* ) str;
-        str += len;
-    }
-    return NULL;
-}
-
-/* conversion from UTF-16 to internal standard */
-LIB_EXPORT uint32_t CC utf16_cvt_string_len ( const uint16_t *src,
-    size_t src_size, size_t *dst_size )
-{
-    size_t size;
-    uint32_t i, src_len = ( uint32_t ) ( src_size >> 1 );
-
-    for ( size = 0, i = 0; i < src_len; ++ i )
-    {
-        uint32_t ch = src [ i ];
-
-        char ignore [ 8 ];
-        int ch_len = utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch );
-        if ( ch_len <= 0 )
-            break;
-        size += ch_len;
-    }
-
-    * dst_size = size;
-    return i;
-}
-
-LIB_EXPORT uint32_t CC utf16_cvt_string_measure ( const uint16_t *src,
-    size_t *src_size, size_t *dst_size )
-{
-    size_t size;
-    uint32_t i, ch;
-
-    for ( size = 0, ch = src [ i = 0 ]; ch != 0; ch = src [ ++ i ] )
-    {
-        char ignore [ 8 ];
-        int ch_len = utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch );
-        if ( ch_len <= 0 )
-            break;
-        size += ch_len;
-    }
-
-    * src_size = i * sizeof * src;
-    * dst_size = size;
-    return i;
-}
-
-LIB_EXPORT size_t CC utf16_cvt_string_copy ( char *dst, size_t dst_size,
-    const uint16_t *src, size_t src_size )
-{
-    char *begin = dst;
-    char *dend = dst + dst_size;
-    const uint16_t *send = ( const uint16_t* ) ( ( const char* ) src + src_size );
-
-    while ( dst < dend && src < send )
-    {
-        uint32_t ch = * src ++;
-        int ch_len = utf32_utf8 ( dst, dend, ch );
-        if ( ch_len <= 0 )
-            break;
-        dst += ch_len;
-    }
-
-    if ( dst < dend )
-        * dst = 0;
-    return ( size_t ) ( dst - begin );
-}
-
-/* conversion from UTF-32 to internal standard */
-LIB_EXPORT uint32_t CC utf32_cvt_string_len ( const uint32_t *src,
-    size_t src_size, size_t *dst_size )
-{
-    size_t size;
-    uint32_t i, src_len = ( uint32_t ) ( src_size >> 2 );
-
-    for ( size = 0, i = 0; i < src_len; ++ i )
-    {
-        uint32_t ch = src [ i ];
-
-        char ignore [ 8 ];
-        int ch_len = utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch );
-        if ( ch_len <= 0 )
-            break;
-        size += ch_len;
-    }
-
-    * dst_size = size;
-    return i;
-}
-
-LIB_EXPORT uint32_t CC utf32_cvt_string_measure ( const uint32_t *src,
-    size_t *src_size, size_t *dst_size )
-{
-    size_t size;
-    uint32_t i, ch;
-
-    for ( size = 0, ch = src [ i = 0 ]; ch != 0; ch = src [ ++ i ] )
-    {
-        char ignore [ 8 ];
-        int ch_len = utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch );
-        if ( ch_len <= 0 )
-            break;
-        size += ch_len;
-    }
-
-    * src_size = i * sizeof * src;
-    * dst_size = size;
-    return i;
-}
-
-LIB_EXPORT size_t CC utf32_cvt_string_copy ( char *dst, size_t dst_size,
-    const uint32_t *src, size_t src_size )
-{
-    char *begin = dst;
-    char *dend = dst + dst_size;
-    const uint32_t *send = ( const uint32_t* ) ( ( const char* ) src + src_size );
-
-    while ( dst < dend && src < send )
-    {
-        uint32_t ch = * src ++;
-        int ch_len = utf32_utf8 ( dst, dend, ch );
-        if ( ch_len <= 0 )
-            break;
-        dst += ch_len;
-    }
-
-    if ( dst < dend )
-        * dst = 0;
-    return ( size_t ) ( dst - begin );
-}
-
-/* conversion from wchar_t to internal standard */
-LIB_EXPORT uint32_t CC wchar_cvt_string_len ( const wchar_t *src,
-    size_t src_size, size_t *dst_size )
-{
-    size_t size;
-    uint32_t i, src_len = ( uint32_t ) ( src_size / sizeof * src );
-
-    for ( size = 0, i = 0; i < src_len; ++ i )
-    {
-        uint32_t ch = src [ i ];
-
-        char ignore [ 8 ];
-        int ch_len = utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch );
-        if ( ch_len <= 0 )
-            break;
-        size += ch_len;
-    }
-
-    * dst_size = size;
-    return i;
-}
-
-LIB_EXPORT uint32_t CC wchar_cvt_string_measure ( const wchar_t *src,
-    size_t *src_size, size_t *dst_size )
-{
-    size_t size;
-    uint32_t i, ch;
-
-    for ( size = 0, ch = src [ i = 0 ]; ch != 0; ch = src [ ++ i ] )
-    {
-        char ignore [ 8 ];
-        int ch_len = utf32_utf8 ( ignore, & ignore [ sizeof ignore ], ch );
-        if ( ch_len <= 0 )
-            break;
-        size += ch_len;
-    }
-
-    * src_size = i * sizeof * src;
-    * dst_size = size;
-    return i;
-}
-
-LIB_EXPORT size_t CC wchar_cvt_string_copy ( char *dst, size_t dst_size,
-    const wchar_t *src, size_t src_size )
-{
-    char *begin = dst;
-    char *dend = dst + dst_size;
-    const wchar_t *send = ( const wchar_t* ) ( ( const char* ) src + src_size );
-
-    while ( dst < dend && src < send )
-    {
-        uint32_t ch = * src ++;
-        int ch_len = utf32_utf8 ( dst, dend, ch );
-        if ( ch_len <= 0 )
-            break;
-        dst += ch_len;
-    }
-
-    if ( dst < dend )
-        * dst = 0;
-
-    return ( size_t ) ( dst - begin );
-}
-
-LIB_EXPORT size_t CC string_cvt_wchar_copy ( wchar_t *dst, size_t dst_size,
-    const char *src, size_t src_size )
-{
-    uint32_t len, blen = ( uint32_t ) ( dst_size / sizeof *dst );
-    const char *send = ( const char* ) src + src_size;
-
-    for ( len = 0; len < blen && src < send; ++ len )
-    {
-        uint32_t ch;
-        int consumed = utf8_utf32 ( &ch, src, send );
-        if ( consumed <= 0 )
-            break;
-        dst [ len ] = ( wchar_t ) ch;
-        src += consumed;
-    }
-
-    if ( len < blen )
-        dst [ len ] = 0;
-
-    return ( size_t ) ( len );
-}
diff --git a/libs/klib/vector.c b/libs/klib/vector.c
deleted file mode 100644
index af92012..0000000
--- a/libs/klib/vector.c
+++ /dev/null
@@ -1,626 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/vector.h>
-#include <klib/sort.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * Vector
- *  simple vector of void*
- */
-
-
-/* Init
- *  initialize vector
- *
- *  "block" [ IN ] - selects the number of elements in
- *  a vector block; used for allocating and extending
- */
-LIB_EXPORT void CC VectorInit ( Vector *self, uint32_t start, uint32_t block )
-{
-    if ( self != NULL )
-    {
-        self -> v = NULL;
-        self -> start = start;
-        self -> len = 0;
-
-        if ( block == 0 )
-            block = 64;
-
-        if ( ( ( block - 1 ) & block ) != 0 )
-        {
-            uint32_t blk;
-            for ( blk = 1; blk < block; blk <<= 1 )
-                ( void ) 0;
-            block = blk;
-        }
-
-        /* force a minimum of two */
-        self -> mask = ( block - 1 ) | 1;
-    }
-}
-
-
-/* Copy
- *  initialize a new vector from an existing one
- *  performs a shallow copy
- */
-LIB_EXPORT rc_t CC VectorCopy ( const Vector *self, Vector *copy )
-{
-    uint32_t cap;
-
-    if ( copy == NULL )
-        return RC ( rcCont, rcVector, rcCopying, rcParam, rcNull );
-    if ( self == NULL )
-        return RC ( rcCont, rcVector, rcCopying, rcSelf, rcNull );
-
-    VectorInit ( copy, self -> start, self -> mask + 1 );
-    cap = ( self -> len + self -> mask ) & ~ self -> mask;
-    copy -> v = malloc ( sizeof copy -> v [ 0 ] * cap );
-    if ( copy -> v == NULL )
-        return RC ( rcCont, rcVector, rcCopying, rcMemory, rcExhausted );
-
-    memcpy ( copy -> v, self -> v, self -> len * sizeof copy -> v [ 0 ] );
-    copy -> len = self -> len;
-
-    return 0;
-}
-
-
-/* Get
- *  retrieve an indexed element
- */
-LIB_EXPORT  void* CC VectorGet ( const Vector *self, uint32_t idx )
-{
-    if ( self != NULL && idx >= self -> start )
-    {
-        idx -= self -> start;
-        if ( idx < self -> len )
-            return self -> v [ idx ];
-    }
-    return NULL;
-}
-
-
-/* Set
- *  sets an indexed element
- *  extends vector as required
- *
- *  "idx" [ IN ] - item index
- *
- *  "item" [ IN, OPAQUE ] - item to be appended to vector
- *
- *  returns rcExists if element is not NULL
- */
-LIB_EXPORT rc_t CC VectorSet ( Vector *self, uint32_t idx, const void *item )
-{
-    uint32_t curcap, newcap;
-
-    if ( self == NULL )
-        return RC ( rcCont, rcVector, rcInserting, rcSelf, rcNull );
-    if ( idx < self -> start )
-        return RC ( rcCont, rcVector, rcInserting, rcParam, rcInvalid );
-    if ( ( idx -= self -> start ) < self -> len )
-    {
-        if ( self -> v [ idx ] != NULL )
-            return SILENT_RC ( rcCont, rcVector, rcInserting, rcItem, rcExists );
-        self -> v [ idx ] = ( void* ) item;
-        return 0;
-    }
-
-    curcap = ( self -> len + self -> mask ) & ~ self -> mask;
-    newcap = ( idx + self -> mask + 1 ) & ~ self -> mask;
-    if ( newcap > curcap )
-    {
-        void **v = realloc ( self -> v, newcap * sizeof * v );
-        if ( v == NULL )
-            return RC ( rcCont, rcVector, rcInserting, rcMemory, rcExhausted );
-        self -> v = v;
-    }
-
-    if ( idx > self -> len )
-        memset ( & self -> v [ self -> len ], 0, ( idx - self -> len ) * sizeof self -> v [ 0 ] );
-
-    self -> v [ idx ] = ( void* ) item;
-    self -> len = idx + 1;
-
-    return 0;
-}
-
-
-/* Swap
- *  swaps value of an indexed element
- *  behaves like Set except that it allows overwrite
- *
- *  "idx" [ IN ] - item index
- *
- *  "item" [ IN, OPAQUE ] - new element value
- *
- *  "prior" [ OUT ] - prior element value
- */
-LIB_EXPORT rc_t CC VectorSwap ( Vector *self, uint32_t idx,
-    const void *item, void **prior )
-{
-    rc_t rc;
-
-    if ( prior == NULL )
-        rc = RC ( rcCont, rcVector, rcInserting, rcParam, rcNull );
-    else
-    {
-        rc = VectorSet ( self, idx, item );
-        if ( GetRCState ( rc ) == rcExists )
-        {
-            idx -= self -> start;
-            * prior = self -> v [ idx ];
-
-            /* if swapping NULL for the last item
-               just drop the count */
-            if ( item == NULL && ( idx + 1 ) == self -> len )
-                -- self -> len;
-            else
-                self -> v [ idx ] = ( void* ) item;
-
-            return 0;
-        }
-
-        * prior = NULL;
-    }
-    return rc;
-}
-
-
-/* Append
- *  appends item to end of vector
- *
- *  "idx" [ OUT, NULL OKAY ] - optional return parameter for item index
- *
- *  "item" [ IN, OPAQUE ] - item to be appended to vector
- */
-LIB_EXPORT rc_t CC VectorAppend ( Vector *self, uint32_t *idx, const void *item )
-{
-    if ( self == NULL )
-        return RC ( rcCont, rcVector, rcInserting, rcSelf, rcNull );
-
-    if ( ( self -> len & self -> mask ) == 0 )
-    {
-        void **v = realloc ( self -> v, ( self -> len + self -> mask + 1 ) * sizeof * v );
-        if ( v == NULL )
-            return RC ( rcCont, rcVector, rcInserting, rcMemory, rcExhausted );
-        self -> v = v;
-    }
-
-    self -> v [ self -> len ] = ( void* ) item;
-
-    if ( idx != NULL )
-        * idx = self -> len + self -> start;
-
-    ++ self -> len;
-
-    return 0;
-}
-
-
-/* First
- * Last
- *  get item at either end of vector
- */
-LIB_EXPORT void* CC VectorFirst ( const Vector *self )
-{
-    if ( self != NULL && self -> len != 0 )
-        return self -> v [ 0 ];
-    return NULL;
-}
-
-LIB_EXPORT  void* CC VectorLast ( const Vector *self )
-{
-    if ( self != NULL && self -> len != 0 )
-        return self -> v [ self -> len - 1 ];
-    return NULL;
-}
-
-
-/* Find
- *  find an object within ordered vector
- *
- *  "key" [ IN ] - find criteria
- *
- *  "idx" [ OUT, NULL OKAY ] - optional return parameter for item index
- *
- *  "cmp" [ IN ] - comparison function that returns
- *  equivalent of "key" - "n"
- */
-LIB_EXPORT void* CC VectorFind ( const Vector *self, const void *key, uint32_t *idx,
-    int64_t ( CC * cmp ) ( const void *key, const void *n ) )
-{
-    if ( self != NULL && cmp != NULL )
-    {
-        uint32_t left, right;
-
-        for ( left = 0, right = self -> len; left < right; )
-        {
-            uint32_t i, mid = ( left + right ) >> 1;
-            void *n = self -> v [ i = mid ];
-            while ( n == NULL && i > left )
-                n = self -> v [ -- i ];
-            if ( n == NULL )
-                left = mid + 1;
-            else
-            {
-                int64_t diff = ( * cmp ) ( key, n );
-                if ( diff == 0 )
-                {
-                    if ( idx != NULL )
-                        * idx = i + self -> start;
-                    return n;
-                }
-                if ( diff < 0 )
-                    right = mid;
-                else
-                    left = mid + 1;
-            }
-        }
-    }
-
-    return NULL;
-}
-
-
-/* Insert
- *  insert an object to vector, even if duplicate
- *
- *  "item" [ IN ] - object to insert
- *
- *  "idx" [ OUT, NULL OKAY ] - optional return parameter for item index
- *
- *  "sort" [ IN ] - comparison function that returns
- *  equivalent of "item" - "n"
- *
- *  the treatment of order for items reported as identical
- *  i.e. sort function returns zero when they are compared,
- *  is undefined.
- *
- *  the current implementation treats '<=' as '<' such
- *  that all inserts are converted to a '<' or '>' comparison,
- *  but this should not be relied upon.
- */
-LIB_EXPORT rc_t CC VectorInsert ( Vector *self, const void *item, uint32_t *idx,
-    int64_t ( CC * sort ) ( const void *item, const void *n ) )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcCont, rcVector, rcInserting, rcSelf, rcNull );
-    if ( sort == NULL )
-        return RC ( rcCont, rcVector, rcInserting, rcFunction, rcNull );
-
-    /* let append handle vector expansion */
-    rc = VectorAppend ( self, NULL, item );
-    if ( rc == 0 )
-    {
-        uint32_t left, right;
-
-        for ( left = 0, right = ( int ) self -> len - 1; left < right; )
-        {
-            uint32_t i, mid = ( left + right ) >> 1;
-            void *n = self -> v [ i = mid ];
-            while ( n == NULL && i > left )
-                n = self -> v [ -- i ];
-            if ( n == NULL )
-                left = mid + 1;
-            else
-            {
-                int64_t diff = ( * sort ) ( item, n );
-                if ( diff <= 0 )
-                    right = mid;
-                else
-                    left = mid + 1;
-            }
-        }
-
-        if ( self -> len > ++ right )
-        {
-            memmove ( & self -> v [ right ], & self -> v [ left ],
-                ( self -> len - right ) * sizeof self -> v [ 0 ] );
-            self -> v [ left ] = ( void* ) item;
-        }
-
-        if ( idx != NULL )
-            * idx = left + self -> start;
-    }
-
-    return rc;
-}
-
-
-/* InsertUnique
- *  insert an object to vector, but only if unique.
- *
- *  "item" [ IN ] - object to insert
- *
- *  "idx" [ OUT, NULL OKAY ] - optional return parameter for
- *  item index. when return code state is rcExists, this value
- *  will be that of the existing item.
- *
- *  "sort" [ IN ] - comparison function that returns
- *  equivalent of "item" - "n"
- */
-LIB_EXPORT rc_t CC VectorInsertUnique ( Vector *self, const void *item, uint32_t *idx,
-    int64_t ( CC * sort ) ( const void *item, const void *n ) )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcCont, rcVector, rcInserting, rcSelf, rcNull );
-    if ( sort == NULL )
-        return RC ( rcCont, rcVector, rcInserting, rcFunction, rcNull );
-
-    rc = VectorAppend ( self, NULL, item );
-    if ( rc == 0 )
-    {
-        uint32_t left, right;
-
-        for ( left = 0, right = ( int ) self -> len - 1; left < right; )
-        {
-            uint32_t i, mid = ( left + right ) >> 1;
-            void *n = self -> v [ i = mid ];
-            while ( n == NULL && i > left )
-                n = self -> v [ -- i ];
-            if ( n == NULL )
-                left = mid + 1;
-            else
-            {
-                int64_t diff = ( * sort ) ( item, n );
-                if ( diff == 0 )
-                {
-                    -- self -> len;
-                    if ( idx != NULL )
-                        * idx = i + self -> start;
-                    return SILENT_RC ( rcCont, rcVector, rcInserting, rcNode, rcExists );
-                }
-                if ( diff < 0 )
-                    right = mid;
-                else
-                    left = mid + 1;
-            }
-        }
-
-        if ( self -> len > ++ right )
-        {
-            memmove ( & self -> v [ right ], & self -> v [ left ],
-                ( self -> len - right ) * sizeof self -> v [ 0 ] );
-            self -> v [ left ] = ( void* ) item;
-        }
-
-        if ( idx != NULL )
-            * idx = left + self -> start;
-    }
-
-    return rc;
-}
-
-
-/* Merge
- *  merge a sorted vector into an existing, sorted vector
- *
- *  "unique" [ IN ] - eliminate duplicates if true
- *
- *  "v" [ IN ] - sorted vector of elements to merge
- *
- *  "sort" [ IN ] - comparison function that returns
- *  equivalent of "item" - "n"
- */
-LIB_EXPORT rc_t CC VectorMerge ( Vector *self, bool unique, const Vector *v,
-    int64_t ( CC * sort ) ( const void *item, const void *n ) )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcCont, rcVector, rcInserting, rcSelf, rcNull );
-    else if ( v == NULL )
-        rc = RC ( rcCont, rcVector, rcInserting, rcParam, rcNull );
-    else if ( sort == NULL )
-        rc = RC ( rcCont, rcVector, rcInserting, rcFunction, rcNull );
-    else
-    {
-        void **out = malloc ( ( self -> len + v -> len ) * sizeof out [ 0 ] );
-        if ( out == NULL )
-            rc = RC ( rcCont, rcVector, rcInserting, rcMemory, rcExhausted );
-        else
-        {
-            uint32_t i, a, b;
-            for ( rc = 0, i = a = b = 0; a < self -> len && b < v -> len; ++ i )
-            {
-                int64_t diff = ( * sort ) ( self -> v [ a ], v -> v [ b ] );
-                if ( diff == 0 )
-                {
-                    out [ i ] = self -> v [ a ++ ];
-                    if ( ! unique )
-                        out [ ++ i ] = v -> v [ b ];
-                    ++ b;
-                }
-                else if ( diff < 0 )
-                    out [ i ] = self -> v [ a ++ ];
-                else
-                    out [ i ] = v -> v [ b ++ ];
-            }
-            for ( ; a < self -> len; ++ i, ++ a )
-                out [ i ] = self -> v [ a ];
-            for ( ; b < v -> len; ++ i, ++ b )
-                out [ i ] = v -> v [ b ];
-
-            self -> len = i;
-            free ( self -> v );
-            self -> v = out;
-        }
-    }
-
-    return rc;
-}
-
-
-/* Remove
- *  retrieves value at given index
- *  shifts all elements to right of index toward start,
- *  preserving order and decrements length by 1
- *  return removed item
- *
- *  "idx" [ IN ] - item index
- *
- *  "removed" [ OUT ] - removed element value
- */
-LIB_EXPORT rc_t CC VectorRemove ( Vector *self, uint32_t idx, void **removed )
-{
-    rc_t rc;
-    if ( removed == NULL )
-        rc = RC ( rcCont, rcVector, rcRemoving, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcCont, rcVector, rcRemoving, rcSelf, rcNull );
-        else if ( idx < self -> start )
-            rc = RC ( rcCont, rcVector, rcRemoving, rcParam, rcInvalid );
-        else if ( ( idx -= self -> start ) >= self -> len )
-            rc = RC ( rcCont, rcVector, rcRemoving, rcParam, rcInvalid );
-        else
-        {
-            * removed = self -> v [ idx ];
-            if ( -- self -> len > idx )
-            {
-                memmove ( & self -> v [ idx ], & self -> v [ idx + 1 ],
-                    ( self -> len - idx ) * sizeof self -> v [ 0 ] );
-            }
-            return 0;
-        }
-
-        * removed = NULL;
-    }
-    return rc;
-}
-
-
-/* Reorder
- *  execute qsort on vector with provided function
- *  not particularly well formed ( i.e. doesn't have a function param ),
- *  but works within a limited context
- */
-LIB_EXPORT void CC VectorReorder ( Vector *self,
-    int64_t ( CC * f ) ( const void**, const void**, void* ), void *data )
-{
-    if ( self != NULL && f != NULL && self -> len != 0 )
-    {
-        assert ( self -> v != NULL );
-        ksort ( self -> v, self -> len, sizeof self -> v [ 0 ],
-            ( int64_t ( CC * ) ( const void*, const void*, void* ) ) f, data );
-    }
-}
-
-
-/* ForEach
- *  executes a function on each vector element
- */
-LIB_EXPORT void CC VectorForEach ( const Vector *self, bool reverse,
-    void ( CC * f ) ( void *item, void *data ), void *data )
-{
-    if ( self != NULL && f != NULL )
-    {
-        uint32_t i;
-
-        assert ( self -> len == 0 || self -> v != NULL );
-
-        if ( reverse ) for ( i = self -> len; i > 0; )
-        {
-            ( * f ) ( self -> v [ -- i ], data );
-        }
-        else for ( i = 0; i < self -> len; ++ i )
-        {
-            ( * f ) ( self -> v [ i ], data );
-        }
-    }
-}
-
-
-/* DoUntil
- *  executes a function on each element
- *  until the function returns true
- *
- *  return values:
- *    false unless the function returns true
- */
-LIB_EXPORT bool CC VectorDoUntil ( const Vector *self, bool reverse,
-    bool ( CC * f ) ( void *item, void *data ), void *data )
-{
-    if ( self != NULL && f != NULL )
-    {
-        uint32_t i;
-
-        assert ( self -> len == 0 || self -> v != NULL );
-
-        if ( reverse ) for ( i = self -> len; i > 0; )
-        {
-            if ( ( * f ) ( self -> v [ -- i ], data ) )
-                return true;
-        }
-        else for ( i = 0; i < self -> len; ++ i )
-        {
-            if ( ( * f ) ( self -> v [ i ], data ) )
-                return true;
-        }
-    }
-
-    return false;
-}
-
-
-/* Whack
- *  removes entries from vector and
- *  executes a user provided destructor
- */
-LIB_EXPORT void CC VectorWhack ( Vector *self, 
-    void ( CC * whack ) ( void *item, void *data ), void *data )
-{
-    if ( self != NULL )
-    {
-        uint32_t i;
-
-        assert ( self -> len == 0 || self -> v != NULL );
-
-        if ( whack != NULL ) for ( i = 0; i < self -> len; ++ i )
-            ( * whack ) ( self -> v [ i ], data );
-
-        free ( self -> v );
-
-        self -> v = NULL;
-        self -> len = 0;
-    }
-}
diff --git a/libs/klib/vector_namelist.c b/libs/klib/vector_namelist.c
deleted file mode 100644
index ae6daa4..0000000
--- a/libs/klib/vector_namelist.c
+++ /dev/null
@@ -1,633 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-
-/*typedef struct VNamelist VNamelist;*/
-#define KNAMELIST_IMPL VNamelist
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/vector.h>
-#include <klib/impl.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-/*--------------------------------------------------------------------------
- * KVectorNamelist ... a generic Namelist based on a Vector
- */
-struct VNamelist
-{
-    KNamelist dad;
-    Vector name_vector;
-};
-
-
-static
-void CC VNameListDestroyNode( void* node, void* data )
-{
-    if ( node != NULL ) free( node );
-}
-
-static
-rc_t CC VNameListDestroy ( VNamelist *self )
-{
-    VectorWhack ( &(self->name_vector), VNameListDestroyNode, NULL );
-    free ( self );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VNameListCount ( const VNamelist *self, uint32_t *count )
-{
-    * count = VectorLength ( &(self->name_vector) );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VNameListGet ( const VNamelist *self, uint32_t idx, const char **name )
-{
-    if ( idx >= VectorLength ( &(self->name_vector) ) )
-        return RC ( rcCont, rcNamelist, rcAccessing, rcParam, rcExcessive );
-    * name = VectorGet ( &(self->name_vector), idx );
-    return 0;
-}
-
-static KNamelist_vt_v1 sVNameList_vt =
-{
-    1, 0,
-    VNameListDestroy,
-    VNameListCount,
-    VNameListGet
-};
-
-LIB_EXPORT rc_t CC VNamelistMake( VNamelist **names, const uint32_t alloc_blocksize  )
-{
-    rc_t rc;
-
-    if ( names == NULL )
-        rc = RC ( rcCont, rcNamelist, rcConstructing, rcParam, rcNull );
-    else
-    {
-        (*names)=malloc( sizeof(**names) );
-        if (*names != NULL )
-        {
-            rc = KNamelistInit( &(*names)->dad, (const KNamelist_vt*) &sVNameList_vt );
-            if ( rc == 0 )
-            {
-                VectorInit ( & (*names)->name_vector, 0, alloc_blocksize );
-            }
-            else
-            {
-                free( *names );
-                *names = NULL;
-            }
-        }
-        else
-        {
-            rc = RC( rcCont, rcNamelist, rcListing, rcParam, rcNull );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VNamelistRelease( const VNamelist *self )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        rc = KNamelistRelease( &(self->dad) );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VNamelistToNamelist( VNamelist *self, KNamelist **cast )
-{
-    rc_t rc;
-    if ( cast == NULL )
-        rc = RC ( rcCont, rcNamelist, rcCasting, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcCont, rcNamelist, rcCasting, rcSelf, rcNull );
-        else
-        {
-            rc = KNamelistAddRef ( & self -> dad );
-            if ( rc == 0 )
-            {
-                * cast = & self -> dad;
-                return 0;
-            }
-        }
-
-        * cast = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VNamelistToConstNamelist( const VNamelist *self, const KNamelist **cast )
-{
-    return VNamelistToNamelist ( ( VNamelist* ) self, ( KNamelist** ) cast );
-}
-
-LIB_EXPORT rc_t CC VNamelistAppend( VNamelist *self, const char* src )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcCont, rcNamelist, rcInserting, rcSelf, rcNull );
-    else
-    {
-        if ( src == NULL )
-            rc = RC( rcCont, rcNamelist, rcInserting, rcString, rcNull );
-        else
-        {
-            char* my_copy = string_dup( src, string_size( src ) );
-            if ( my_copy == NULL )
-                rc = RC( rcCont, rcNamelist, rcInserting, rcMemory, rcExhausted );
-            else
-            {
-                rc = VectorAppend( &(self->name_vector), NULL, my_copy );
-                if ( rc != 0 )
-                    free ( my_copy );
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VNamelistAppendString( VNamelist *self, const String * src )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcCont, rcNamelist, rcInserting, rcSelf, rcNull );
-    else
-    {
-        if ( src == NULL )
-            rc = RC( rcCont, rcNamelist, rcInserting, rcString, rcNull );
-        else if ( src->addr == NULL )
-            rc = RC( rcCont, rcNamelist, rcInserting, rcString, rcEmpty );
-        else
-        {
-            char* my_copy = string_dup ( src->addr, src->len );
-            if ( my_copy == NULL )
-                rc = RC( rcCont, rcNamelist, rcInserting, rcMemory, rcExhausted );
-            else
-            {
-                rc = VectorAppend( &(self->name_vector), NULL, my_copy );
-                if ( rc != 0 )
-                    free ( my_copy );
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VNamelistIndexOf( VNamelist *self, const char* s, uint32_t *found )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcCont, rcNamelist, rcSearching, rcSelf, rcNull );
-    else
-    {
-        if ( s == NULL )
-            rc = RC( rcCont, rcNamelist, rcSearching, rcString, rcNull );
-        else if ( s[0] == 0 )
-            rc = RC( rcCont, rcNamelist, rcSearching, rcString, rcEmpty );
-        else if ( found == NULL )
-            rc = RC( rcCont, rcNamelist, rcSearching, rcParam, rcNull );
-        else
-        {
-            uint32_t count;
-            rc = VNameListCount ( self, &count );
-            if ( rc == 0 )
-            {
-                uint32_t idx;
-                size_t n1 = string_size ( s );
-                for ( idx = 0; idx < count; ++idx )
-                {
-                    const char * name;
-                    rc = VNameListGet ( self, idx, &name );
-                    if ( rc == 0 )
-                    {
-                        size_t n2 = string_size ( name );
-                        if ( string_cmp ( s, n1, name, n2, (uint32_t) ( ( n1 < n2 ) ? n2 : n1 ) ) == 0 )
-                        {
-                            *found = idx;
-                            return 0;
-                        }
-                    }
-                }
-                rc = RC( rcCont, rcNamelist, rcSearching, rcString, rcNotFound );
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VNamelistRemoveIdx( VNamelist *self, uint32_t idx )
-{
-    rc_t rc;
-    if ( self == NULL )
-        rc = RC ( rcCont, rcNamelist, rcSearching, rcSelf, rcNull );
-    else
-    {
-        char *removed;
-        rc = VectorRemove ( &(self->name_vector), idx, (void **)&removed );
-        if ( rc == 0 )
-            free( removed );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VNamelistRemove( VNamelist *self, const char* s )
-{
-    uint32_t idx;
-
-    rc_t rc = VNamelistIndexOf( self, s, &idx );
-    if ( rc == 0 )
-        rc = VNamelistRemoveIdx( self, idx );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VNamelistRemoveAll( VNamelist *self )
-{
-    rc_t rc = 0;
-    uint32_t count = 1;
-    while ( count > 0 && rc == 0 )
-    {
-        rc = VNameListCount ( self, &count );
-        if ( rc == 0 && count > 0 )
-            rc = VNamelistRemoveIdx( self, count - 1 );
-    }
-    return rc;
-}
-
-
-/* Reorder
- *  sort the names according to case sensitivity
- *  and UNICODE character code ordering
- *
- *  "case_insensitive" [ IN ] - when true, perform "tolower" on
- *   each character before compare
- */
-static
-int64_t CC vect_string_cmp ( const void **a, const void **b, void *ignore )
-{
-    return strcmp ( * a, * b );
-}
-
-static
-int64_t CC vect_string_cmp_case ( const void **a, const void **b, void *ignore )
-{
-    uint32_t i;
-
-    const char *ap = * a;
-    const char *bp = * b;
-
-    if ( ap == NULL )
-        return bp != NULL;
-    if ( bp == NULL )
-        return -1;
-
-    for ( i = 0; ; ++ i )
-    {
-        if ( ap [ i ] != bp [ i ] )
-        {
-            /* TBD - this should perform UTF-8 to UNICODE conversion
-               but for that, create a function in text module */
-            int64_t diff = (int64_t)tolower ( ap [ i ] ) - (int64_t)tolower ( bp [ i ] );
-            if ( diff == 0 )
-                continue;
-
-            return diff;
-        }
-
-        if ( ap [ i ] == 0 )
-            break;
-    }
-
-    return 0;
-}
-
-LIB_EXPORT void CC VNamelistReorder ( VNamelist *self, bool case_insensitive )
-{
-    if ( self != NULL )
-    {
-        VectorReorder ( & self -> name_vector, case_insensitive ? vect_string_cmp_case : vect_string_cmp, NULL );
-    }
-}
-
-
-/* ---- split and join of strings ---------------------------------------------------------------- */
-
-LIB_EXPORT rc_t CC foreach_String_part( const String * src, const uint32_t delim,
-                                     rc_t ( CC * f ) ( const String * part, void *data ), void * data )
-{
-    rc_t rc = 0;
-    if ( src == NULL || f == NULL )
-        rc = RC ( rcCont, rcNamelist, rcParsing, rcParam, rcNull );
-    else
-    {
-        String tmp, part;
-        char * cptr;
-        char last_cptr_char = 0;
-        
-        StringInit( &tmp, src -> addr, src -> size, src -> len );
-        cptr = string_chr( tmp.addr, tmp.size, delim );
-        if ( cptr != NULL ) last_cptr_char = cptr[ 0 ];
-        while ( rc == 0 && cptr != NULL && tmp.len > 0 )
-        {
-            uint32_t l = ( cptr - tmp.addr );
-            StringInit( &part, tmp.addr, l, l );
-            rc = f( &part, data );
-            if ( rc == 0 )
-            {
-                tmp.addr = cptr + 1;
-                tmp.size -= l + 1;
-                tmp.len -= l + 1;
-                cptr = string_chr( tmp.addr, tmp.size, delim );
-                if ( cptr != NULL ) last_cptr_char = cptr[ 0 ];
-            }
-        }
-        if ( rc == 0 )
-        {
-            if ( tmp.len > 0 )
-                rc = f( &tmp, data );
-            else if ( last_cptr_char == delim )
-            {
-                part.addr = &last_cptr_char;
-                part.size = 0;
-                part.len = 0;
-                rc = f( &part, data );
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC foreach_Str_part( const char * src, const uint32_t delim,
-                                  rc_t ( CC * f ) ( const String * part, void *data ), void * data )
-{
-    rc_t rc;
-    if ( src == NULL || f == NULL )
-        rc = RC ( rcCont, rcNamelist, rcParsing, rcParam, rcNull );
-    else
-    {
-        String S;
-        StringInitCString( &S, src );
-        rc = foreach_String_part( &S, delim, f, data );
-    }
-    return rc;
-}
-
-
-static rc_t CC add_to_nl( const String * part, void * data )
-{
-    return VNamelistAppendString ( data, part );
-}
-
-
-LIB_EXPORT rc_t CC VNamelistSplitString ( VNamelist * list, const String * str, const uint32_t delim )
-{
-    rc_t rc = 0;
-    if ( list == NULL )
-        rc = RC ( rcCont, rcNamelist, rcParsing, rcSelf, rcNull );
-    else if ( str == NULL )
-        rc = RC ( rcCont, rcNamelist, rcParsing, rcParam, rcNull );
-    else
-        rc = foreach_String_part( str, delim, add_to_nl, list );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VNamelistSplitStr ( VNamelist * list, const char * str, const uint32_t delim )
-{
-    String S;
-    StringInitCString( &S, str );
-    return VNamelistSplitString ( list, &S, delim );
-}
-
-
-LIB_EXPORT rc_t CC VNamelistFromString ( VNamelist ** list, const String * str, const uint32_t delim )
-{
-    rc_t rc = VNamelistMake( list, 10 );
-    if ( rc == 0 )
-    {
-        rc = VNamelistSplitString ( *list, str, delim );
-        if ( rc != 0 )
-        {
-            VNamelistRelease( *list );
-            *list = NULL;
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VNamelistFromStr ( VNamelist ** list, const char * str, const uint32_t delim )
-{
-    String S;
-    StringInitCString( &S, str );
-    return VNamelistFromString ( list, &S, delim );
-}
-
-
-static rc_t join_size( const VNamelist * list, uint32_t count, size_t * size )
-{
-    rc_t rc = 0;
-    uint32_t idx;
-    *size = 0;
-    for ( idx = 0; rc == 0 && idx < count; ++idx )
-    {
-        const char * item;
-        rc = VNameListGet ( list, idx, &item );
-        if ( rc == 0 )
-            *size += string_size ( item );
-    }
-    *size += ( count - 1 );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VNamelistJoin( const VNamelist * list, const uint32_t delim, const String ** rslt )
-{
-    rc_t rc = 0;
-    if ( rslt == NULL )
-        rc = RC ( rcCont, rcNamelist, rcRetrieving, rcParam, rcNull );
-    else
-    {
-        *rslt = NULL;
-        if ( list == NULL )
-            rc = RC ( rcCont, rcNamelist, rcRetrieving, rcSelf, rcNull );
-        else
-        {
-            uint32_t count;
-            char empty[ 1 ];
-            
-            rc = VNameListCount ( list, &count );
-            if ( rc == 0 )
-            {
-                String j;
-                char * buffer = NULL;
-                if ( count < 1 )
-                {
-                    j.addr = empty;
-                    empty[ 0 ] = 0;
-                    j.len = 0;
-                    j.size = 1;
-                }
-                else if ( count == 1 )
-                {
-                    const char * item;
-                    rc = VNameListGet ( list, 0, &item );
-                    if ( rc == 0 )
-                        StringInitCString( &j, item );
-                }
-                else
-                {
-                    size_t js;
-                    rc = join_size( list, count, &js );
-                    if ( rc == 0 )
-                    {
-                        buffer = malloc( js + 1 );
-                        if ( buffer == NULL )
-                            rc = RC ( rcCont, rcNamelist, rcRetrieving, rcMemory, rcExhausted );
-                        else
-                        {
-                            uint32_t idx, dst = 0;
-                            size_t dst_size = js;
-                            for ( idx = 0; rc == 0 && idx < count; ++ idx )
-                            {
-                                const char * item;
-                                rc = VNameListGet ( list, idx, &item );
-                                if ( rc == 0 )
-                                {
-                                    size_t item_size = string_size ( item );
-                                    string_copy ( &buffer[ dst ], dst_size, item, item_size );
-                                    dst += item_size;
-                                    if ( idx < ( count - 1 ) )
-                                    {
-                                        buffer[ dst++ ] = delim;
-                                        dst_size -= ( item_size + 1 );
-                                    }
-                                }
-                            }
-                            if ( rc == 0 )
-                            {
-                                buffer[ dst ] = 0;
-                                StringInitCString( &j, buffer );
-                                /*
-                                j.addr = buffer;
-                                j.len  = ( uint32_t )( dst & 0xFFFFFFFF );
-                                j.size = dst;
-                                */
-                            }
-                        }
-                    }
-                }
-                if ( rc == 0 )
-                    rc = StringCopy ( rslt, &j );
-                if ( buffer != NULL )
-                    free( ( void * ) buffer );
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VNamelistContainsString( const VNamelist * list,
-    const String * item, int32_t * idx )
-{
-    rc_t rc = 0;
-    if ( idx == NULL )
-        rc = RC ( rcCont, rcNamelist, rcRetrieving, rcParam, rcNull );
-    else
-    {
-        *idx = -1;
-        if ( item == NULL )
-            rc = RC ( rcCont, rcNamelist, rcRetrieving, rcParam, rcNull );
-        else if ( list == NULL )
-            rc = RC ( rcCont, rcNamelist, rcRetrieving, rcSelf, rcNull );
-        else
-        {
-            uint32_t count, i;
-            rc = VNameListCount ( list, &count );
-            for ( i = 0; rc == 0 && *idx < 0 && i < count; ++i )
-            {
-                const char * s;
-                rc = VNameListGet ( list, i, &s );
-                if ( rc == 0 )
-                {
-                    int cmp;
-                    String S;
-                    StringInitCString( &S, s );
-                    cmp = StringCompare( item, &S );
-                    if ( cmp == 0 )
-                        *idx = i;
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VNamelistContainsStr( const VNamelist * list,
-        const char * item, int32_t * idx )
-{
-    rc_t rc = 0;
-    if ( idx == NULL )
-        rc = RC ( rcCont, rcNamelist, rcRetrieving, rcParam, rcNull );
-    else
-    {
-        *idx = -1;
-        if ( item == NULL )
-            rc = RC ( rcCont, rcNamelist, rcRetrieving, rcParam, rcNull );
-        else if ( list == NULL )
-            rc = RC ( rcCont, rcNamelist, rcRetrieving, rcSelf, rcNull );
-        else
-        {
-            String S;
-            StringInitCString( &S, item );
-            return VNamelistContainsString( list, &S, idx );
-        }
-    }
-    return rc;
-}
diff --git a/libs/klib/vlen-encode.c b/libs/klib/vlen-encode.c
deleted file mode 100644
index f8e4349..0000000
--- a/libs/klib/vlen-encode.c
+++ /dev/null
@@ -1,773 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/extern.h>
-#include <klib/vlen-encode.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <byteswap.h>
-#include <endian.h>
-#include <string.h>
-
-LIB_EXPORT rc_t CC vlen_encode1(void *Dst, uint64_t dsize, uint64_t *psize, int64_t X) {
-    int sgn = 0;
-    uint64_t x;
-    uint8_t *dst = Dst;
-    
-    if (dst == NULL)
-        dsize = 0;
-    
-    if (X < 0) {
-        sgn = 0x40;
-        x = -X;
-    }
-    else
-        x = X;
-    /* 6 -> 8 */
-    if (x < 0x40) {
-        if (psize)
-            *psize = 1;
-        if (dsize < 1)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = (uint8_t)sgn | ( (uint8_t)x & 0x3F );
-        return 0;
-    }
-    /* 13 -> 16 */
-    if (x < 0x2000) {
-        if (psize)
-            *psize = 2;
-        if (dsize < 2)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | (uint8_t)sgn | ( (uint8_t)( x >> 7 ) & 0x3F );
-        dst[1] = ( (uint8_t)x & 0x7F );
-        return 0;
-    }
-    /* 20 -> 24 */
-    if (x < 0x100000) {
-        if (psize)
-            *psize = 3;
-        if (dsize < 3)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | (uint8_t)sgn | ( (uint8_t)( x >> 14 ) & 0x3F );
-        dst[1] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-        dst[2] = ( (uint8_t)x & 0x7F );
-        return 0;
-    }
-    /* 27 -> 32 */
-    if (x < 0x8000000) {
-        if (psize)
-            *psize = 4;
-        if (dsize < 4)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | (uint8_t)sgn | ( (uint8_t)( x >> 21 ) & 0x3F );
-        dst[1] = 0x80 | ( (uint8_t)( x >> 14 ) & 0x7F );
-        dst[2] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-        dst[3] = ( (uint8_t)x & 0x7F );
-        return 0;
-    }
-    /* 34 -> 40 */
-    if (x < ( ( uint64_t ) 0x4 << 32 ) ) {
-        if (psize)
-            *psize = 5;
-        if (dsize < 5)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | (uint8_t)sgn | ( (uint8_t)( x >> 28 ) & 0x3F );
-        dst[1] = 0x80 | ( (uint8_t)( x >> 21 ) & 0x7F );
-        dst[2] = 0x80 | ( (uint8_t)( x >> 14 ) & 0x7F );
-        dst[3] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-        dst[4] = ( (uint8_t)x & 0x7F );
-        return 0;
-    }
-    /* 41 -> 48 */
-    if (x < ( ( uint64_t ) 0x200 << 32 ) ) {
-        if (psize)
-            *psize = 6;
-        if (dsize < 6)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | (uint8_t)sgn | ( (uint8_t)( x >> 35 ) & 0x3F );
-        dst[1] = 0x80 | ( (uint8_t)( x >> 28 ) & 0x7F );
-        dst[2] = 0x80 | ( (uint8_t)( x >> 21 ) & 0x7F );
-        dst[3] = 0x80 | ( (uint8_t)( x >> 14 ) & 0x7F );
-        dst[4] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-        dst[5] = ( (uint8_t)x & 0x7F );
-        return 0;
-    }
-    /* 48 -> 56 */
-    if (x < ( ( uint64_t ) 0x10000 << 32 ) ) {
-        if (psize)
-            *psize = 7;
-        if (dsize < 7)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | (uint8_t)sgn | ( (uint8_t)( x >> 42 ) & 0x3F );
-        dst[1] = 0x80 | ( (uint8_t)( x >> 35 ) & 0x7F );
-        dst[2] = 0x80 | ( (uint8_t)( x >> 28 ) & 0x7F );
-        dst[3] = 0x80 | ( (uint8_t)( x >> 21 ) & 0x7F );
-        dst[4] = 0x80 | ( (uint8_t)( x >> 14 ) & 0x7F );
-        dst[5] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-        dst[6] = ( (uint8_t)x & 0x7F );
-        return 0;
-    }
-    /* 55 -> 64 */
-    if (x < ( ( uint64_t ) 0x800000 << 32 ) ) {
-        if (psize)
-            *psize = 8;
-        if (dsize < 8)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | (uint8_t)sgn | ( (uint8_t)( x >> 49 ) & 0x3F );
-        dst[1] = 0x80 | ( (uint8_t)( x >> 42 ) & 0x7F );
-        dst[2] = 0x80 | ( (uint8_t)( x >> 35 ) & 0x7F );
-        dst[3] = 0x80 | ( (uint8_t)( x >> 28 ) & 0x7F );
-        dst[4] = 0x80 | ( (uint8_t)( x >> 21 ) & 0x7F );
-        dst[5] = 0x80 | ( (uint8_t)( x >> 14 ) & 0x7F );
-        dst[6] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-        dst[7] = ( (uint8_t)x & 0x7F );
-        return 0;
-    }
-    /* 62 -> 72 */
-    if (x < ( ( uint64_t ) 0x40000000 << 32 ) ) {
-        if (psize)
-            *psize = 9;
-        if (dsize < 9)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | (uint8_t)sgn | ( (uint8_t)( x >> 56 ) & 0x3F );
-        dst[1] = 0x80 | ( (uint8_t)( x >> 49 ) & 0x7F );
-        dst[2] = 0x80 | ( (uint8_t)( x >> 42 ) & 0x7F );
-        dst[3] = 0x80 | ( (uint8_t)( x >> 35 ) & 0x7F );
-        dst[4] = 0x80 | ( (uint8_t)( x >> 28 ) & 0x7F );
-        dst[5] = 0x80 | ( (uint8_t)( x >> 21 ) & 0x7F );
-        dst[6] = 0x80 | ( (uint8_t)( x >> 14 ) & 0x7F );
-        dst[7] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-        dst[8] = ( (uint8_t)x & 0x7F );
-        return 0;
-    }
-    /* 64 -> 80 */
-    if (psize)
-        *psize = 10;
-    if (dsize < 10)
-        return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-    dst[0] = 0x80 | (uint8_t)sgn | ( (uint8_t)( x >> 63 ) & 0x3F );
-    dst[1] = 0x80 | ( (uint8_t)( x >> 56 ) & 0x7F );
-    dst[2] = 0x80 | ( (uint8_t)( x >> 49 ) & 0x7F );
-    dst[3] = 0x80 | ( (uint8_t)( x >> 42 ) & 0x7F );
-    dst[4] = 0x80 | ( (uint8_t)( x >> 35 ) & 0x7F );
-    dst[5] = 0x80 | ( (uint8_t)( x >> 28 ) & 0x7F );
-    dst[6] = 0x80 | ( (uint8_t)( x >> 21 ) & 0x7F );
-    dst[7] = 0x80 | ( (uint8_t)( x >> 14 ) & 0x7F );
-    dst[8] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-    dst[9] = ( (uint8_t)x & 0x7F );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC vlen_decode1 ( int64_t *dst, const void *Src, uint64_t ssize, uint64_t *consumed ) {
-    const uint8_t *src = Src;
-    int x;
-    int i;
-    int sgn;
-    int64_t y;
-
-    if (dst == NULL || src == NULL)
-        return RC(rcXF, rcFunction, rcExecuting, rcParam, rcNull);
-    if (ssize == 0)
-        return RC(rcXF, rcFunction, rcExecuting, rcParam, rcInvalid);
-    if (ssize > 10)
-        ssize = 10;
-    
-    x = src[0];
-    sgn = x & 0x40;
-    y = x & 0x3F;
-    i = 1;
-    if ((x & 0x80) != 0) {
-        if (i == ssize)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-        x = src[i];
-        y = (y << 7) | (x & 0x7F);
-        ++i;
-        if ((x & 0x80) != 0) {
-            if (i == ssize)
-                return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-            x = src[i];
-            y = (y << 7) | (x & 0x7F);
-            ++i;
-            if ((x & 0x80) != 0) {
-                if (i == ssize)
-                    return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-                x = src[i];
-                y = (y << 7) | (x & 0x7F);
-                ++i;
-                if ((x & 0x80) != 0) {
-                    if (i == ssize)
-                        return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-                    x = src[i];
-                    y = (y << 7) | (x & 0x7F);
-                    ++i;
-                    if ((x & 0x80) != 0) {
-                        if (i == ssize)
-                            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-                        x = src[i];
-                        y = (y << 7) | (x & 0x7F);
-                        ++i;
-                        if ((x & 0x80) != 0) {
-                            if (i == ssize)
-                                return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-                            x = src[i];
-                            y = (y << 7) | (x & 0x7F);
-                            ++i;
-                            if ((x & 0x80) != 0) {
-                                if (i == ssize)
-                                    return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-                                x = src[i];
-                                y = (y << 7) | (x & 0x7F);
-                                ++i;
-                                if ((x & 0x80) != 0) {
-                                    if (i == ssize)
-                                        return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-                                    x = src[i];
-                                    y = (y << 7) | (x & 0x7F);
-                                    ++i;
-                                    if ((x & 0x80) != 0) {
-                                        if (i == ssize)
-                                            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-                                        x = src[i];
-                                        y = (y << 7) | (x & 0x7F);
-                                        ++i;
-                                        if ((x & 0x80) != 0)
-                                            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInvalid);
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-    *dst = sgn ? -y : y;
-    if (consumed)
-        *consumed = i;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC vlen_encode ( void *Dst, uint64_t dsize, uint64_t *act_size,
-    const int64_t x[], uint32_t xcount ) {
-    uint32_t i;
-    uint64_t n;
-    uint64_t m = 0;
-    rc_t rc = 0;
-    uint8_t *dst = Dst;
-    
-    if (dst != NULL) {
-        for (i = 0, rc = 0; rc == 0 && i != xcount; ++i) {
-            rc = vlen_encode1(dst, dsize, &n, x[i]);
-            dst += n;
-            dsize -= n;
-            m += n;
-        }
-        if (rc == 0)
-            goto DONE;
-    }
-    else
-        i = 0;
-    for (; i != xcount; ++i) {
-        vlen_encode1(0, 0, &n, x[i]);
-        m += n;
-    }
-DONE:
-    if (act_size)
-        *act_size = m;
-    return rc;
-}
-
-LIB_EXPORT rc_t CC vlen_decode ( int64_t *Y, uint64_t ycount, 
-    const void *Src, uint64_t ssize, uint64_t *consumed ) {
-    const uint8_t *src = Src;
-    uint64_t i, j;
-    
-    if (Y == NULL || Src == NULL)
-        return RC(rcXF, rcFunction, rcExecuting, rcParam, rcNull);
-    if (ssize == 0)
-        return RC(rcXF, rcFunction, rcExecuting, rcParam, rcInvalid);
-    if (ssize < ycount)
-        return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-    
-    for (i = 0, j = 0; j != ycount && i + 10 < ssize; ++j) {
-        int64_t y;
-        int sgn;
-#define XTYPE_SIZE 64
-#if XTYPE_SIZE == 64
-#define XTYPE uint64_t
-#elif XTYPE_SIZE == 32
-#define XTYPE uint32_t
-#else
-#endif
-        XTYPE x;
-        
-        memcpy (& x, src + i, sizeof x); /* may be misaligned */        
-#if __BYTE_ORDER == __BIG_ENDIAN
-#if XTYPE_SIZE == 32
-        x = bswap_32(x);
-#elif XTYPE_SIZE == 64
-        x = bswap_64(x);
-#endif
-#endif
-        sgn = (int)x & 0x40;
-        y = x & 0x3F;
-        ++i;
-        if ((x & 0x80) != 0) {
-            x >>= 8;
-            y = (y << 7) | (x & 0x7F);
-            ++i;
-            if ((x & 0x80) != 0) {
-                x >>= 8;
-                y = (y << 7) | (x & 0x7F);
-                ++i;
-                if ((x & 0x80) != 0) {
-                    x >>= 8;
-                    y = (y << 7) | (x & 0x7F);
-                    ++i;
-                    if ((x & 0x80) != 0) {
-#if XTYPE_SIZE == 32
-                        x = *(const XTYPE *)(src + i);
-#if __BYTE_ORDER == __BIG_ENDIAN
-                        x = bswap_32(x);
-#endif
-#elif XTYPE_SIZE == 64
-                        x >>= 8;
-#endif
-                        y = (y << 7) | (x & 0x7F);
-                        ++i;
-                        if ((x & 0x80) != 0) {
-                            x >>= 8;
-                            y = (y << 7) | (x & 0x7F);
-                            ++i;
-                            if ((x & 0x80) != 0) {
-                                x >>= 8;
-                                y = (y << 7) | (x & 0x7F);
-                                ++i;
-                                if ((x & 0x80) != 0) {
-                                    x >>= 8;
-                                    y = (y << 7) | (x & 0x7F);
-                                    ++i;
-                                    if ((x & 0x80) != 0) {
-                                        x = src[i];
-                                        y = (y << 7) | (x & 0x7F);
-                                        ++i;
-                                        if ((x & 0x80) != 0) {
-                                            x = src[i];
-                                            y = (y << 7) | (x & 0x7F);
-                                            ++i;
-                                            if ((x & 0x80) != 0)
-                                                return RC(rcXF, rcFunction, rcExecuting, rcData, rcInvalid);
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        Y[j] = sgn ? -y : y;
-    }
-    for ( ; j != ycount; ++j) {
-        uint64_t n;
-        rc_t rc = vlen_decode1(Y + j, src + i, ssize - i, &n);
-        if (rc)
-            return rc;
-        i += n;
-    }
-    if (consumed)
-        *consumed = i;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC vlen_encodeU1 ( void *Dst, uint64_t dsize,
-    uint64_t *psize, uint64_t X ) {
-    uint64_t x = X;
-    uint8_t *dst = Dst;
-    
-    if (dst == NULL)
-        dsize = 0;
-    
-    /* 7 -> 8 */
-    if (x < 0x80) {
-        if (psize)
-            *psize = 1;
-        if (dsize < 1)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = (uint8_t)x & 0x7F;
-        return 0;
-    }
-    /* 14 -> 16 */
-    if (x < 0x4000) {
-        if (psize)
-            *psize = 2;
-        if (dsize < 2)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F);
-        dst[1] = (uint8_t)x & 0x7F;
-        return 0;
-    }
-    /* 21 -> 24 */
-    if (x < 0x200000) {
-        if (psize)
-            *psize = 3;
-        if (dsize < 3)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | ( (uint8_t)( x >> 14 ) & 0x7F );
-        dst[1] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-        dst[2] = ( (uint8_t)x & 0x7F );
-        return 0;
-    }
-    /* 28 -> 32 */
-    if (x < 0x10000000) {
-        if (psize)
-            *psize = 4;
-        if (dsize < 4)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | ( (uint8_t)( x >> 21 ) & 0x7F );
-        dst[1] = 0x80 | ( (uint8_t)( x >> 14 ) & 0x7F );
-        dst[2] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-        dst[3] = ( (uint8_t)x & 0x7F );
-        return 0;
-    }
-    /* 35 -> 40 */
-    if (x < ( ( uint64_t ) 0x8 << 32 ) ) {
-        if (psize)
-            *psize = 5;
-        if (dsize < 5)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | ( (uint8_t)( x >> 28 ) & 0x7F );
-        dst[1] = 0x80 | ( (uint8_t)( x >> 21 ) & 0x7F );
-        dst[2] = 0x80 | ( (uint8_t)( x >> 14 ) & 0x7F );
-        dst[3] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-        dst[4] = ( (uint8_t)x & 0x7F );
-        return 0;
-    }
-    /* 42 -> 48 */
-    if (x < ( ( uint64_t ) 0x400 << 32 ) ) {
-        if (psize)
-            *psize = 6;
-        if (dsize < 6)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | ( (uint8_t)( x >> 35 ) & 0x7F );
-        dst[1] = 0x80 | ( (uint8_t)( x >> 28 ) & 0x7F );
-        dst[2] = 0x80 | ( (uint8_t)( x >> 21 ) & 0x7F );
-        dst[3] = 0x80 | ( (uint8_t)( x >> 14 ) & 0x7F );
-        dst[4] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-        dst[5] = ( (uint8_t)x & 0x7F );
-        return 0;
-    }
-    /* 49 -> 56 */
-    if (x < ( ( uint64_t ) 0x20000 << 32 ) ) {
-        if (psize)
-            *psize = 7;
-        if (dsize < 7)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | ( (uint8_t)( x >> 42 ) & 0x7F );
-        dst[1] = 0x80 | ( (uint8_t)( x >> 35 ) & 0x7F );
-        dst[2] = 0x80 | ( (uint8_t)( x >> 28 ) & 0x7F );
-        dst[3] = 0x80 | ( (uint8_t)( x >> 21 ) & 0x7F );
-        dst[4] = 0x80 | ( (uint8_t)( x >> 14 ) & 0x7F );
-        dst[5] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-        dst[6] = ( (uint8_t)x & 0x7F );
-        return 0;
-    }
-    /* 56 -> 64 */
-    if (x < ( ( uint64_t ) 0x1000000 << 32 ) ) {
-        if (psize)
-            *psize = 8;
-        if (dsize < 8)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | ( (uint8_t)( x >> 49 ) & 0x7F );
-        dst[1] = 0x80 | ( (uint8_t)( x >> 42 ) & 0x7F );
-        dst[2] = 0x80 | ( (uint8_t)( x >> 35 ) & 0x7F );
-        dst[3] = 0x80 | ( (uint8_t)( x >> 28 ) & 0x7F );
-        dst[4] = 0x80 | ( (uint8_t)( x >> 21 ) & 0x7F );
-        dst[5] = 0x80 | ( (uint8_t)( x >> 14 ) & 0x7F );
-        dst[6] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-        dst[7] = ( (uint8_t)x & 0x7F );
-        return 0;
-    }
-    /* 63 -> 72 */
-    if (x < ( ( uint64_t ) 0x80000000 << 32 ) ) {
-        if (psize)
-            *psize = 9;
-        if (dsize < 9)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        dst[0] = 0x80 | ( (uint8_t)( x >> 56 ) & 0x7F );
-        dst[1] = 0x80 | ( (uint8_t)( x >> 49 ) & 0x7F );
-        dst[2] = 0x80 | ( (uint8_t)( x >> 42 ) & 0x7F );
-        dst[3] = 0x80 | ( (uint8_t)( x >> 35 ) & 0x7F );
-        dst[4] = 0x80 | ( (uint8_t)( x >> 28 ) & 0x7F );
-        dst[5] = 0x80 | ( (uint8_t)( x >> 21 ) & 0x7F );
-        dst[6] = 0x80 | ( (uint8_t)( x >> 14 ) & 0x7F );
-        dst[7] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-        dst[8] = ( (uint8_t)x & 0x7F );
-        return 0;
-    }
-    /* 64 -> 80 */
-    if (psize)
-        *psize = 10;
-    if (dsize < 10)
-        return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-    dst[0] = 0x80 | ( (uint8_t)( x >> 63 ) & 0x7F );
-    dst[1] = 0x80 | ( (uint8_t)( x >> 56 ) & 0x7F );
-    dst[2] = 0x80 | ( (uint8_t)( x >> 49 ) & 0x7F );
-    dst[3] = 0x80 | ( (uint8_t)( x >> 42 ) & 0x7F );
-    dst[4] = 0x80 | ( (uint8_t)( x >> 35 ) & 0x7F );
-    dst[5] = 0x80 | ( (uint8_t)( x >> 28 ) & 0x7F );
-    dst[6] = 0x80 | ( (uint8_t)( x >> 21 ) & 0x7F );
-    dst[7] = 0x80 | ( (uint8_t)( x >> 14 ) & 0x7F );
-    dst[8] = 0x80 | ( (uint8_t)( x >> 7 ) & 0x7F );
-    dst[9] = ( (uint8_t)x & 0x7F );
-    return 0;
-}
-
-static
-rc_t vlen_decodeU1_imp ( uint64_t *dst, const void *Src,
-    uint64_t ssize, uint64_t *consumed ) {
-    const uint8_t *src = Src;
-    uint64_t y;
-    int c;
-    
-    if (ssize > 10)
-        ssize = 10;
-    
-	c = src[0];
-	if ((c & 0x80) == 0) {
-		*dst = c;
-		*consumed = 1;
-		return 0;
-	}
-	if (ssize != 1) {
-		y = c & 0x7F;
-        c = src[1];
-        if ((c & 0x80) == 0) {
-            *dst = (y << 7) | c;
-            *consumed = 2;
-            return 0;
-        }
-        if (ssize != 2) {
-            y = (y << 7) | (c & 0x7F);
-            c = src[2];
-            if ((c & 0x80) == 0) {
-                *dst = (y << 7) | c;
-                *consumed = 3;
-                return 0;
-            }
-            if (ssize != 3) {
-                y = (y << 7) | (c & 0x7F);
-                c = src[3];
-                if ((c & 0x80) == 0) {
-                    *dst = (y << 7) | c;
-                    *consumed = 4;
-                    return 0;
-                }
-                if (ssize != 4) {
-                    y = (y << 7) | (c & 0x7F);
-                    c = src[4];
-                    if ((c & 0x80) == 0) {
-                        *dst = (y << 7) | c;
-                        *consumed = 5;
-                        return 0;
-                    }
-                    if (ssize != 5) {
-                        y = (y << 7) | (c & 0x7F);
-                        c = src[5];
-                        if ((c & 0x80) == 0) {
-                            *dst = (y << 7) | c;
-                            *consumed = 6;
-                            return 0;
-                        }
-                        if (ssize != 6) {
-                            y = (y << 7) | (c & 0x7F);
-                            c = src[6];
-                            if ((c & 0x80) == 0) {
-                                *dst = (y << 7) | c;
-                                *consumed = 7;
-                                return 0;
-                            }
-                            if (ssize != 7) {
-                                y = (y << 7) | (c & 0x7F);
-                                c = src[7];
-                                if ((c & 0x80) == 0) {
-                                    *dst = (y << 7) | c;
-                                    *consumed = 8;
-                                    return 0;
-                                }
-                                if (ssize != 8) {
-                                    y = (y << 7) | (c & 0x7F);
-                                    c = src[8];
-                                    if ((c & 0x80) == 0) {
-                                        *dst = (y << 7) | c;
-                                        *consumed = 9;
-                                        return 0;
-                                    }
-                                    if (ssize != 9) {
-                                        y = (y << 7) | (c & 0x7F);
-                                        c = src[9];
-                                        if ((c & 0x80) == 0) {
-                                            *dst = (y << 7) | c;
-                                            *consumed = 10;
-                                            return 0;
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-                                            
-    return RC(rcRuntime, rcFunction, rcExecuting, rcData, rcInvalid);
-}
-
-LIB_EXPORT rc_t CC vlen_decodeU1( uint64_t *dst, const void *Src,
-    uint64_t ssize, uint64_t *consumed ) {
-    if (dst == NULL || Src == NULL)
-        return RC(rcXF, rcFunction, rcExecuting, rcParam, rcNull);
-    if (ssize == 0)
-        return RC(rcXF, rcFunction, rcExecuting, rcParam, rcInvalid);
-    
-    return vlen_decodeU1_imp(dst, Src, ssize, consumed);
-}
-
-LIB_EXPORT rc_t CC vlen_encodeU( void *Dst, uint64_t dsize,
-    uint64_t *act_size, const uint64_t x[], uint32_t xcount ) {
-    uint32_t i;
-    uint64_t n;
-    uint64_t m = 0;
-    rc_t rc = 0;
-    uint8_t *dst = Dst;
-    
-    if (dst != NULL) {
-        for (i = 0, rc = 0; rc == 0 && i != xcount; ++i) {
-            rc = vlen_encodeU1(dst, dsize, &n, x[i]);
-            dst += n;
-            dsize -= n;
-            m += n;
-        }
-        if (rc == 0)
-            goto DONE;
-    }
-    else
-        i = 0;
-    for (; i != xcount; ++i) {
-        vlen_encodeU1(0, 0, &n, x[i]);
-        m += n;
-    }
-DONE:
-    if (act_size)
-        *act_size = m;
-    return rc;
-}
-
-LIB_EXPORT rc_t CC vlen_decodeU ( uint64_t Y[], uint64_t ycount,
-    const void *Src, uint64_t ssize, uint64_t *consumed ) {
-    const uint8_t *src = Src;
-    uint64_t i, j;
-    
-    if (Y == NULL || Src == NULL)
-        return RC(rcXF, rcFunction, rcExecuting, rcParam, rcNull);
-    if (ssize == 0)
-        return RC(rcXF, rcFunction, rcExecuting, rcParam, rcInvalid);
-    if (ssize < ycount)
-        return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-    
-    for (j = i = 0; j != ycount; ++j) {
-        uint64_t n;
-        rc_t rc = vlen_decodeU1_imp(Y + j, src + i, ssize - i, &n);
-        if (rc)
-            return rc;
-        i += n;
-    }
-    if (consumed)
-        *consumed = i;
-    return 0;
-}
-
-#if 0
-#include <stdlib.h>
-#include <stdio.h>
-#include <assert.h>
-#include <string.h>
-
-static void print ( const unsigned char *buf, int n ) {
-    int i;
-    for (i = 0; i != n; ++i)
-        printf("%02X ", buf[i]);
-    puts("");
-}
-
-#define N 128
-void test( void ) {
-    unsigned char buf[N * 10];
-    uint32_t i;
-    uint64_t y[N], x[N];
-    unsigned s[8];
-    uint64_t bsz;
-    uint64_t temp;
-    uint32_t total;
-    uint64_t min = 640;
-    uint64_t max = 0;
-    int j;
-    
-    for (i = 0; i != 8; ++i) {
-        sranddev();
-        s[i] = random();
-    }
-    for (j = 0, total = 0; j != 1024 * 1024; ++j) {
-        for (i = 0; i != N; ++i)
-            x[i] = random();
-        vlen_encodeU(buf, 1024, &bsz, x, N);
-        total += bsz;
-        if (max < bsz)
-            max = bsz;
-        if (min > bsz)
-            min = bsz;
-        vlen_decodeU(y, N, buf, bsz, &temp);
-        assert(temp == bsz);
-        assert(memcmp(y, x, sizeof(y)) == 0);
-    }
-    for (j = 0, total = 0; j != 1024 * 1024; ++j) {
-        for (i = 0; i != N; ++i)
-            x[i] = random();
-        vlen_encode(buf, 1024, &bsz, x, N);
-        total += bsz;
-        if (max < bsz)
-            max = bsz;
-        if (min > bsz)
-            min = bsz;
-        vlen_decode(y, N, buf, bsz, &temp);
-        assert(temp == bsz);
-        assert(memcmp(y, x, sizeof(y)) == 0);
-    }
-    printf("min: %u\tmax: %u\tavg: %f\n", (int)min, (int)max, ((float)total) / j);
-}
-#endif
diff --git a/libs/klib/win/misc.c b/libs/klib/win/misc.c
deleted file mode 100644
index f204e34..0000000
--- a/libs/klib/win/misc.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/misc.h> /* is_iser_an_admin */
-
-#include <Shlobj.h> /* IsUserAnAdmin */
-
-LIB_EXPORT bool CC is_iser_an_admin(void) {
-    return IsUserAnAdmin();
-}
diff --git a/libs/klib/win/sysalloc.c b/libs/klib/win/sysalloc.c
deleted file mode 100644
index 7dfc73a..0000000
--- a/libs/klib/win/sysalloc.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#define _c_sysalloc_
-#include <sysalloc.h>
-
-#undef malloc
-#undef calloc
-#undef realloc
-#undef free
-
-#if _DEBUGGING
-#define _CRTDBG_MAP_ALLOC 1
-#include <crtdbg.h>
-#endif
-
-/* malloc
- */
-LIB_EXPORT void * CC klib_malloc ( size_t bytes )
-{
-    return malloc ( bytes );
-}
-
-/* calloc
- */
-LIB_EXPORT void * CC klib_calloc ( size_t count, size_t size )
-{
-    return calloc ( count, size );
-}
-
-/* realloc
- */
-LIB_EXPORT void * CC klib_realloc ( void *obj, size_t bytes )
-{
-    return realloc ( obj, bytes );
-}
-
-
-/* free
- */
-LIB_EXPORT void CC klib_free ( void *obj )
-{
-    free ( obj );
-}
diff --git a/libs/klib/win/syserrcode.c b/libs/klib/win/syserrcode.c
deleted file mode 100644
index 0c64db3..0000000
--- a/libs/klib/win/syserrcode.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include "writer-priv.h"
-#include <klib/writer.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <os-native.h>
-#include <Windows.h>
-
-#include <stdio.h>
-
-size_t KWrtFmt_error_code ( char * buffer, size_t buffer_size, uint32_t error_code )
-{
-    char  * tbuffer;
-    char * pc;
-    DWORD tbuffer_size;
-    size_t z;
-
-    tbuffer_size = FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER | 
-                                   FORMAT_MESSAGE_FROM_SYSTEM | 
-                                   FORMAT_MESSAGE_IGNORE_INSERTS, /* dwFlags */
-                                   NULL, /* lpSource */
-                                   error_code, /* dwMessageId */
-                                   0, /* dwLanguageId - we're lazy on language right now */
-                                   (LPSTR)&tbuffer,
-                                   0, /* nSize */
-                                   NULL);/* Arguments */
-    if (tbuffer_size == 0)
-    {
-        rc_t rc;
-
-        rc = string_printf (buffer, buffer_size, &z,
-                            "Undefined error: %u", error_code);
-        if (rc == 0)
-            return z;
-        else
-        {
-            static const char failed[] = "Failure to get Windows error string";
-            return string_copy (buffer, buffer_size, failed, sizeof failed);
-        }
-    }
-    else
-    {
-        for (pc = tbuffer; *pc ; ++pc)
-        {
-            if (*pc == '\r')
-            {
-                tbuffer_size = ( DWORD ) ( pc - tbuffer );
-                break;
-            }
-        }
-        z = string_copy (buffer, buffer_size, tbuffer, tbuffer_size);
-
-        LocalFree (tbuffer);
-    }
-    return z;
-}
diff --git a/libs/klib/win/syslog.c b/libs/klib/win/syslog.c
deleted file mode 100644
index e260cbd..0000000
--- a/libs/klib/win/syslog.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include "../log-priv.h"
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-
-/* do not include windows.h, it is included already by os-native.h */
-#include <os-native.h>
-
-/* LogTimestamp
- *  generates a timestamp-string in GMT-format
- */
-LIB_EXPORT rc_t CC LogTimestamp ( char *buffer, size_t bsize, size_t *num_writ )
-{
-    int len;
-    SYSTEMTIME my_time;
-    
-    GetSystemTime( &my_time );
-
-    /* make the timestamp */
-    len = snprintf ( buffer, bsize,
-                     "%04d-%02d-%02dT%02d:%02d:%02d",
-                     my_time.wYear,
-                     my_time.wMonth,
-                     my_time.wDay,
-                     my_time.wHour,
-                     my_time.wMinute,
-                     my_time.wSecond );
-    if ( num_writ != NULL )
-    {
-        * num_writ = len;
-    }
-
-    if ( len < 0 || ( size_t ) len >= bsize )
-    {
-        if ( len < 0 && num_writ != NULL )
-            * num_writ = 0;
-        return RC ( rcApp, rcLog, rcLogging, rcBuffer, rcInsufficient );
-    }
-
-    return 0;
-}
-
-/* LogSimpleTimestamp
- *  generates a local timestamp string without time zone
- */
-LIB_EXPORT rc_t CC LogSimpleTimestamp ( char *buffer, size_t bsize, size_t *num_writ )
-{
-    int len;
-    SYSTEMTIME my_time;
-
-    GetLocalTime( &my_time );
-
-    /* make the timestamp */
-    len = snprintf ( buffer, bsize,
-                     "%04d-%02d-%02dT%02d:%02d:%02d",
-                     my_time.wYear,
-                     my_time.wMonth,
-                     my_time.wDay,
-                     my_time.wHour,
-                     my_time.wMinute,
-                     my_time.wSecond );
-    if ( num_writ != NULL )
-    {
-        * num_writ = len;
-    }
-
-    if ( len < 0 || ( size_t ) len >= bsize )
-    {
-        if ( len < 0 && num_writ != NULL )
-            * num_writ = 0;
-        return RC ( rcApp, rcLog, rcLogging, rcBuffer, rcInsufficient );
-    }
-
-    return 0;
-}
-
-/* LogPID
- *  generates a process id
- */
-LIB_EXPORT rc_t CC LogPID ( char *buffer, size_t bsize, size_t *num_writ )
-{
-    DWORD my_process_id = GetCurrentProcessId();
-    int len = snprintf ( buffer, bsize, "%u", my_process_id );
-    * num_writ = len;
-    if ( len < 0 || ( size_t ) len >= bsize )
-    {
-        if ( len < 0 )
-            * num_writ = 0;
-        return RC ( rcApp, rcLog, rcLogging, rcBuffer, rcInsufficient );
-    }
-    return 0;
-}
diff --git a/libs/klib/win/systime.c b/libs/klib/win/systime.c
deleted file mode 100644
index d7a24ad..0000000
--- a/libs/klib/win/systime.c
+++ /dev/null
@@ -1,355 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/time.h>
-
-/* do not include windows.h, it is included already by os-native.h */
-#include <os-native.h>
-#include <time.h>
-
-
-/*--------------------------------------------------------------------------
- * KTime_t
- *  64 bit time_t
- */
-
-#if _ARCH_BITS == 32
-#define UNIX_EPOCH_IN_WIN       116444736000000000ULL
-#else
-#define UNIX_EPOCH_IN_WIN       116444736000000000UL
-#endif
-#define UNIX_TIME_UNITS_IN_WIN  10000000
-#define MS_TIME_UNITS_IN_WIN  	10000
-
-/* KTime2FILETIME
- *  convert from Unix to Windows
- */
-static
-const FILETIME *KTime2FILETIME ( KTime_t ts, FILETIME *ft )
-{
-    uint64_t win_time = ( ts * UNIX_TIME_UNITS_IN_WIN ) + UNIX_EPOCH_IN_WIN;
-    ft -> dwLowDateTime = ( DWORD ) win_time;
-    ft -> dwHighDateTime = win_time >> 32;
-    return ft;
-}
-
-/* FILETIME2KTime
- */
-static
-KTime_t FILETIME2KTime ( const FILETIME *ft )
-{
-    uint64_t win_time = ft -> dwLowDateTime + ( ( int64_t ) ft -> dwHighDateTime << 32 );
-    return ( KTime_t ) ( win_time - UNIX_EPOCH_IN_WIN ) / UNIX_TIME_UNITS_IN_WIN;
-}
-
-/* FILETIME2KTimeMs
- */
-static
-KTimeMs_t FILETIME2KTimeMs ( const FILETIME *ft )
-{
-    uint64_t win_time = ft -> dwLowDateTime + ( ( int64_t ) ft -> dwHighDateTime << 32 );
-    return ( KTimeMs_t ) ( win_time - UNIX_EPOCH_IN_WIN ) / MS_TIME_UNITS_IN_WIN;
-}
-
-
-/* Stamp
- *  current timestamp
- */
-LIB_EXPORT KTime_t CC KTimeStamp ( void )
-{
-    FILETIME ft;
-    GetSystemTimeAsFileTime ( & ft );
-    return FILETIME2KTime ( & ft );
-}
-
-LIB_EXPORT KTimeMs_t CC KTimeMsStamp ( void )
-{
-    FILETIME ft;
-    GetSystemTimeAsFileTime ( & ft );
-    return FILETIME2KTimeMs ( & ft );
-}
-
-/*--------------------------------------------------------------------------
- * SYSTEMTIME
- */
-
-static
-int SYSTEMTIME_compare ( const SYSTEMTIME *a, const SYSTEMTIME *b )
-{
-    int diff = a -> wMonth - b -> wMonth;
-    if ( diff == 0 )
-    {
-        diff = a -> wDay - b -> wDay;
-        if ( diff == 0 )
-        {
-            diff = a -> wHour - b -> wHour;
-            if ( diff == 0 )
-            {
-                diff = a -> wMinute - b -> wMinute;
-                if ( diff == 0 )
-                    diff = a -> wSecond - b -> wSecond;
-            }
-        }
-    }
-    return diff;
-}
-
-static
-void SYSTEMTIME_from_half_baked_SYSTEMTIME ( const SYSTEMTIME *half_baked, SYSTEMTIME *proper, WORD year )
-{
-    FILETIME ft;
-
-    * proper = * half_baked;
-
-    /* fix some stuff */
-    proper -> wYear = year;
-    proper -> wMonth = half_baked -> wMonth;
-    proper -> wDayOfWeek = 0; /* ignored */
-    proper -> wDay = 1;
-    proper -> wHour = half_baked -> wHour;
-    proper -> wMinute = 0;
-    proper -> wSecond = 0;
-    proper -> wMilliseconds = 0;
-
-    /* convert it to FILETIME and back, just to get the proper day of week
-       if there's a better way to do it, go ahead.
-       by now, my lunch is too difficult to keep down... */
-    SystemTimeToFileTime ( proper, & ft );
-    FileTimeToSystemTime ( & ft, proper );
-
-    /* now, move ahead to the day of week */
-    proper -> wDay += half_baked -> wDayOfWeek - proper -> wDayOfWeek;
-    if ( half_baked -> wDayOfWeek < proper -> wDayOfWeek )
-        proper -> wDay += 7;
-    proper -> wDayOfWeek = half_baked -> wDayOfWeek;
-
-    /* now find the occurrence of the weekday */
-    if ( half_baked -> wDay > 1 )
-        proper -> wDay += ( half_baked -> wDay - 1 ) * 7;
-}
-
-/*--------------------------------------------------------------------------
- * KTime
- *  simple time structure
- */
-
-
-/* Make
- *  make KTime from struct tm
- */
-static
-void KTimeMake ( KTime *kt, const SYSTEMTIME *st )
-{
-    kt -> year = st -> wYear;
-    kt -> month = st -> wMonth - 1;
-    kt -> day = st -> wDay - 1;
-    kt -> weekday = st -> wDayOfWeek;
-    kt -> hour = ( uint8_t ) st -> wHour;
-    kt -> minute = ( uint8_t ) st -> wMinute;
-    kt -> second = ( uint8_t ) st -> wSecond;
-}
-
-
-/* Local
- *  populate "kt" from "ts" in local time zone
- */
-LIB_EXPORT const KTime* CC KTimeLocal ( KTime *kt, KTime_t ts )
-{
-    if ( kt != NULL )
-    {
-        DWORD tz_id;
-        FILETIME ft;
-        SYSTEMTIME gst, lst;
-        TIME_ZONE_INFORMATION tz;
-
-        /* generate windows time in 100nS units */
-        KTime2FILETIME ( ts, & ft );
-
-        /* generate a system time - almost what we need,
-           except it's GMT and has no associated time zone */
-        FileTimeToSystemTime ( & ft, & gst );
-
-        /* assume we're NOT in DST */
-        kt -> dst = false;
-
-        /* get local timezone information */
-        tz_id = GetTimeZoneInformation ( & tz );
-        switch ( tz_id )
-        {
-        case TIME_ZONE_ID_STANDARD:
-        case TIME_ZONE_ID_DAYLIGHT:
-
-            /* convert GMT time to local time with tz info */
-            SystemTimeToTzSpecificLocalTime ( & tz, & gst, & lst );
-            KTimeMake ( kt, & lst );
-
-            /* our gentle brothers and sisters in Redmond never
-               cease to amaze... it's very nice - handy, even -
-               to know that the system is "currently" operating
-               in one mode or another, but that tells us nothing
-               about the timestamp we're trying to interpret.
-
-               to discover whether the timestamp we're converting
-               is within daylight savings time, we can compare against
-               the two railpost SYSTEMTIME entries, but then there's
-               no telling whether we're in or out since the calendar
-               is circular! aside from having to perform a multi-part
-               comparison, we'll come to different conclusions depending
-               upon whether the hemisphere is northern or southern!
-
-               to disambiguate, we can use tz_id to detect hemisphere,
-               and then know what's going on. Wow.
-
-               also, it's not clear to the author whether the returned
-               structures in tz will be proper or hacked, since the
-               MSDN descriptions only describe how to hack them for
-               input, but not how they will look on output. */
-
-            if ( tz . StandardDate . wMonth == 0 || tz . DaylightDate . wMonth == 0 )
-                kt -> tzoff = - ( int16_t ) tz . Bias;
-            else
-            {
-                bool south = tz_id == TIME_ZONE_ID_DAYLIGHT;
-
-                SYSTEMTIME cst, dst, std;
-                GetSystemTime ( & cst );
-
-                /* fill out proper structures, since those in tz are bad... */
-                SYSTEMTIME_from_half_baked_SYSTEMTIME ( & tz . DaylightDate, & dst, cst . wYear );
-                SYSTEMTIME_from_half_baked_SYSTEMTIME ( & tz . StandardDate, & std, cst . wYear );
-
-                /* perform northern test for DST */
-                if ( SYSTEMTIME_compare ( & lst, & dst ) >= 0 && SYSTEMTIME_compare ( & lst, & std ) < 0 )
-                    kt -> dst = true;
-
-                /* test to see which hemisphere */
-                south ^= ( SYSTEMTIME_compare ( & cst, & dst ) >= 0 && SYSTEMTIME_compare ( & cst, & std ) < 0 );
-
-                /* correct for southern hemisphere */
-                kt -> dst ^= south;
-
-                /* set the timezone offset */
-                kt -> tzoff = - ( int16_t ) ( tz . Bias +
-                    kt -> dst ? tz . DaylightBias : tz . StandardBias );
-            }
-            break;
-
-        default:
-
-            /* failed - use GMT instead */
-            KTimeMake ( kt, & gst );
-            kt -> tzoff = 0;
-        }
-    }
-    return kt;
-}
-
-
-/* Global
- *  populate "kt" from "ts" in GMT
- */
-LIB_EXPORT const KTime* CC KTimeGlobal ( KTime *kt, KTime_t ts )
-{
-    if ( kt != NULL )
-    {
-        FILETIME ft;
-        SYSTEMTIME gst;
-
-        /* generate windows time in 100nS units */
-        KTime2FILETIME ( ts, & ft );
-
-        /* generate a system time */
-        FileTimeToSystemTime ( & ft, & gst );
-
-	/* fill out GMT time structure */
-        KTimeMake ( kt, & gst );
-        kt -> tzoff = 0;
-        kt -> dst = false;
-    }
-    return kt;
-}
-
-/* MakeTime
- *  make a KTime_t from KTime
- */
-LIB_EXPORT KTime_t CC KTimeMakeTime ( const KTime *self )
-{
-    KTime_t ts = 0;
-
-    if ( self != NULL )
-    {
-#if USE_WINDOWS_NATIVE
-        FILETIME ft;
-        SYSTEMTIME st;
-        
-        st . wYear = self -> year;
-        st . wMonth = self -> month + 1;
-        st . wDay = self -> day + 1;
-        st . wDayOfWeek = self -> weekday;
-        st . wHour = self -> hour;
-        st . wMinute = self -> minute;
-        st . wSecond = self -> second;
-
-#if 0        
-        kt -> year = st -> wYear;
-        kt -> month = st -> wMonth - 1;
-        kt -> day = st -> wDay - 1;
-        kt -> weekday = st -> wDayOfWeek;
-        kt -> hour = ( uint8_t ) st -> wHour;
-        kt -> minute = ( uint8_t ) st -> wMinute;
-        kt -> second = ( uint8_t ) st -> wSecond;
-#endif
-
-        SystemTimeToFileTime ( & st, & ft );
-#error "TBD - convert ft to seconds"
-
-#else /* USE_WINDOWS_NATIVE */
-        struct tm t;
-
-        assert ( self -> year >= 1900 );
-        t . tm_year = self -> year - 1900;
-        t . tm_mon = self -> month;
-        t . tm_mday = self -> day + 1;
-        t . tm_wday = self -> weekday;
-        t . tm_hour = self -> hour;
-        t . tm_min = self -> minute;
-        t . tm_sec = self -> second;
-        t . tm_isdst = self -> dst;
-
-        ts = mktime ( &t );
-#endif /* USE_WINDOWS_NATIVE */
-    }
-
-    return ts;
-}
-
-LIB_EXPORT rc_t CC KSleepMs(uint32_t milliseconds) 
-{
-    Sleep ( milliseconds );
-    return 0;
-}
-
diff --git a/libs/klib/win/syswriter.c b/libs/klib/win/syswriter.c
deleted file mode 100644
index 80c354a..0000000
--- a/libs/klib/win/syswriter.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/writer.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include "writer-priv.h"
-
-#include <sysalloc.h>
-#include <stdio.h>
-#include <errno.h>
-#include <stdarg.h>
-
-#include <os-native.h>
-
-static HANDLE win_stdout;
-static HANDLE win_stderr;
-
-rc_t KWrtSysInit(void** h_stdout, void** h_stderr)
-{
-    win_stdout = GetStdHandle(STD_OUTPUT_HANDLE);
-    win_stderr = GetStdHandle(STD_ERROR_HANDLE);
-
-    if( h_stdout ) {
-        *h_stdout = &win_stdout;
-    }
-    if( h_stderr ) {
-        *h_stderr = &win_stderr;
-    }
-    return 0;
-}
-
-LIB_EXPORT int CC snprintf ( char * buffer, size_t bufsize, const char * format, ... )
-{
-    int ret;
-    size_t size;
-    rc_t rc;
-    va_list args;
-
-    va_start (args, format);
-    rc = string_vprintf ( buffer, bufsize, &size, format, args );
-    if ( rc == 0 )
-    {
-        ret = ( int ) size;
-    }
-    else
-    {
-        if ( ( GetRCState( rc ) == rcInsufficient )&&( GetRCObject( rc ) == rcBuffer ) )
-            ret = ( int ) size;
-        else
-            ret = -1;
-    }
-/*    ret = _vsnprintf (buffer, bufsize, format, args); */
-    va_end (args);
-    return ret;
-}
-
-/* ----
- * write 'count' bytes starting at 'buf'  to a "stream/file" identified by 'fd'
- */
-rc_t CC KWrt_DefaultWriter( void * self, const char * buffer, size_t bufsize, size_t * num_writ )
-{
-    size_t total;
-    DWORD remaining;
-    int num_written;
-    const char * pbyte;
-    HANDLE handle;
-    rc_t rc;
-
-    if ( self == NULL ) {
-        return RC ( rcApp, rcLog, rcWriting, rcSelf, rcNull );
-    }
-
-    handle = *(HANDLE *)self;
-    pbyte = buffer;
-    rc = 0;
-
-    total = 0;
-    for (remaining = ( DWORD ) bufsize; remaining > 0; remaining -= num_written)
-    {
-        if (WriteFile (handle, pbyte, remaining, &num_written, NULL) == 0)
-        {       
-            rc = RC ( rcApp, rcLog, rcWriting, rcTransfer, rcUnknown );
-            break;
-        }
-        else
-            total += num_written;
-    }
-    *num_writ = total;
-    return rc;
-}
-
-void print_int_fixup ( char * fmt, size_t * len, size_t max )
-{
-    char type;
-    /* all the Unix flavors support a real printf
-     * Only Windows does it "wrong".
-     * In windows we can't just return like this but instead:
-     *    save fmt[len-1]
-     *    replace 'j' with I64
-     *    replace 'z' or 't',  with 'I'
-     *    replace 'hh' with 'h'
-     *    append saved fmt[len-1] to its new place.
-     *
-     */
-    if (*len > 2)
-    {
-        if ((fmt [*len-3] == 'l') && (fmt [*len-2] == 'l'))
-        {
-            fmt [*len-2] = fmt [*len-1];
-            fmt [*len-1] = '\0';
-            --*len;
-        }
-    }
-    if (*len > 2)
-    {
-        switch (fmt[*len-2])
-        {
-        case 'h':
-            if (fmt[*len-3] == 'h')
-            {
-                fmt [*len-2] = fmt [*len-1];
-                fmt [*len-1] = '\0';
-                *len --;
-            }
-            break;
-
-        case 'z': /* 32-bit specific */
-        case 't':
-            fmt[*len-2] = 'l';
-            break;
-        case 'j':
-        case 'l':
-            type = fmt[*len-1];
-            fmt[*len-2] = 'I';
-            fmt[*len-1] = '6';
-            fmt[*len]   = '4';
-            fmt[*len+1] = type;
-            fmt[*len+2] = '\0';
-            *len += 2;
-            break;
-        }
-    }
-    return;
-}
-
-void print_float_fixup ( char * fmt, size_t * len, size_t max )
-{
-    /* all the Unix flavors support a real printf
-     * Only Windows does it "wrong".
-     */
-    return;
-}
-
-void print_char_fixup ( char * fmt, size_t * len, size_t max )
-{
-    /* all the Unix flavors support a real printf
-     * Only Windows does it "wrong".
-     */
-    return;
-}
diff --git a/libs/klib/writer-priv.h b/libs/klib/writer-priv.h
deleted file mode 100644
index 9a1c190..0000000
--- a/libs/klib/writer-priv.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_writer_priv_
-#define _h_writer_priv_
-
-#include <klib/writer.h>
-
-#ifndef _h_klib_rc_
-#include <klib/rc.h>
-#endif
-
-#ifndef _h_klib_log_
-#include <klib/log.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-rc_t KWrtSysInit(void** h_stdout, void** h_stderr);
-
-size_t KWrtFmt_rc_t  (char * buffer, size_t bufsize, const char * fmt, rc_t rc_in);
-size_t KWrtFmt_KTime_t (char * buffer, size_t bufsize, const char * fmt_ignored, KTime_t time_in);
-
-
-/* -----
- * write into the buffer a textual string describing the system specific
- * error code represented by the third parameter.  Will be NUL terminated.
- * expected to be used within string_printf and associated functions only.
- */
-size_t KWrtFmt_error_code (char * buffer, size_t bufsize, uint32_t error_code);
-
-/* -----
- * We have a default writer is the part that will possibly vary by O/S type
- */
-rc_t CC KWrt_DefaultWriter (void* data, const char * buffer, size_t bufsize, size_t * num_writ);
-
-/* -----
- * The default writer uses this data type object.
- * The actual definition might vary to work on non-Unix operating systems.  The port to Windows
- * might well force the full definition to a system file.
- */
-typedef struct KWrt_DefaultWriterData DefaultWriterData;
-
-/*
- * Windows or other O/S port might have to move this struct definition to a system specific file
- */
-struct KWrt_DefaultWriterData
-{
-    int sysfile_handle;
-};
-
-/*
- * We will have two common default writer data objects for the C library expected stdout and stderr
- *
- * These are the normal data stream and error data stream that will have to be set up for
- * windows console I/O
- */
-extern void *KWrt_DefaultWriterDataStdOut;
-extern void *KWrt_DefaultWriterDataStdErr;
-
-/* fix up windows printf shortcomings for integer types 
- * current format is len long at fmt with max max size for the format
- * len is updated to new length if fmt is changed
- */
-void print_int_fixup   (char * fmt, size_t * len, size_t max);
-void print_float_fixup (char * fmt, size_t * len, size_t max);
-void print_char_fixup  (char * fmt, size_t * len, size_t max);
-
-extern const char *gRCModule_str [];
-extern const char *gRCTarget_str [];
-extern const char *gRCContext_str [];
-extern const char *gRCObject_str [];
-extern const char *gRCState_str [];
-
-extern const char *gRCModuleIdx_str [];
-extern const char *gRCTargetIdx_str [];
-extern const char *gRCContextIdx_str [];
-extern const char *gRCObjectIdx_str [];
-extern const char *gRCStateIdx_str [];
-
-/* GetRCModuleText
- */
-const char *GetRCModuleText ( enum RCModule mod );
-
-/* GetRCTargetText
- */
-const char *GetRCTargetText ( enum RCTarget targ );
-
-/* GetRCContextText
- */
-const char *GetRCContextText ( enum RCContext ctx );
-
-/* GetRCObjectText
- *  obj can be RCTarget or RCObject
- */
-const char *GetRCObjectText ( int obj );
-
-/* GetRCStateText
- */
-const char *GetRCStateText ( enum RCState state );
-
-
-/* GetRCModuleIdxText
- */
-const char *GetRCModuleIdxText ( enum RCModule mod );
-
-/* GetRCTargetIdxText
- */
-const char *GetRCTargetIdxText ( enum RCTarget targ );
-
-/* GetRCContextIdxText
- */
-const char *GetRCContextIdxText ( enum RCContext ctx );
-
-/* GetRCObjectIdxText
- *  obj can be RCTarget or RCObject
- */
-const char *GetRCObjectIdxText ( int obj );
-
-/* GetRCStateIdxText
- */
-const char *GetRCStateIdxText ( enum RCState state );
-
-
-extern const char * RCModuleStrings[];
-extern const char * RCTargetStrings[];
-extern const char * RCContextStrings[];
-extern const char * RCObjectStrings[];
-extern const char * RCStateStrings[];
-
-enum ERCExplain2Options
-{
-    eRCExOpt_NoMessageIfNoError,
-    eRCExOpt_ObjAndStateOnlyIfError,
-    eRCExOpt_CompleteMsg
-};
-
-KLIB_EXTERN rc_t CC RCExplain2 ( rc_t rc, char *buffer, size_t bsize, size_t *num_writ, enum ERCExplain2Options options );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_writer_priv_ */
diff --git a/libs/klib/writer.c b/libs/klib/writer.c
deleted file mode 100644
index b3a3ef6..0000000
--- a/libs/klib/writer.c
+++ /dev/null
@@ -1,644 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/extern.h>
-#include <klib/out.h>
-#include <klib/status.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <klib/sort.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include "writer-priv.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-#include <os-native.h>
-
-static char wrt_app[32];
-static size_t wrt_app_length;
-static char wrt_vers[16];
-static size_t wrt_vers_length;
-
-void* KWrt_DefaultWriterDataStdOut = NULL;
-void* KWrt_DefaultWriterDataStdErr = NULL;
-
-typedef struct RCCreateLoc RCCreateLoc;
-struct RCCreateLoc
-{
-    const char *filename;
-    const char *function;
-    uint32_t lineno;
-    rc_t rc;
-};
-
-static RCCreateLoc RC_loc_queue [ 3 ];
-static atomic32_t RC_loc_reserve, RC_loc_written, RC_loc_read;
-#define RC_LOC_QUEUE_SIZE ( sizeof RC_loc_queue / sizeof RC_loc_queue [ 0 ] )
-#define RC_LOC_QUEUE_MASK ( RC_LOC_QUEUE_SIZE - 1 )
-static bool reporting_unread = false;
-
-/*
- *  "appname" [ IN ] - identity of executable, usually argv[0]
- *
- *  "vers" [ IN ] - 4-part version code: 0xMMmmrrrr, where
- *      MM = major release
- *      mm = minor release
- *    rrrr = bug-fix release
- */
-LIB_EXPORT rc_t CC KWrtInit( const char* appname, uint32_t vers )
-{
-    rc_t rc;
-
-    if ( appname == NULL )
-        return RC ( rcRuntime, rcLog, rcConstructing, rcString, rcNull );
-    if ( appname [ 0 ] == 0 )
-        return RC ( rcRuntime, rcLog, rcConstructing, rcString, rcEmpty );
-
-    do
-    {
-        const char* progname;
-        const char* ext;
-        size_t progname_z;
-
-        /* find whichever is last \ or / */
-        string_measure(appname, &progname_z);
-        progname = string_rchr(appname, progname_z, '/');
-        if( progname == NULL ) {
-            progname = appname;
-        } else {
-            progname++;
-            string_measure(progname, &progname_z);
-        }
-        appname = string_rchr(progname, progname_z, '\\');
-        if( appname == NULL ) {
-            appname = progname;
-        } else {
-            appname++;
-        }
-        string_measure(appname, &progname_z);
-
-        ext = string_chr(appname, progname_z, '.');
-
-        if( ext != NULL ) {
-            wrt_app_length = ext - appname;
-        } else {
-            wrt_app_length = progname_z;
-        }
-        if ( wrt_app_length >= sizeof(wrt_app) ) {
-            wrt_app_length = sizeof(wrt_app) - 1;
-        }
-        memcpy(wrt_app, appname, wrt_app_length);
-        wrt_app[wrt_app_length] = '\0';
-
-        rc = string_printf ( wrt_vers, sizeof wrt_vers, & wrt_vers_length, "%V", vers );
-        assert ( rc == 0 );
-
-        rc = KWrtSysInit(&KWrt_DefaultWriterDataStdOut, &KWrt_DefaultWriterDataStdErr);
-        if (rc) break;
-
-        rc = KOutInit();
-        if (rc) break;
-
-        rc = KLogInit();
-        if (rc) break;
-
-        rc = KStsInit();
-        if (rc) break;
-
-        rc = KDbgInit();
-    } while (0);
-
-    return rc;
-}
-
-/*--------------------------------------------------------------------------
- * nvp - name/value pair
- */
-static
-int64_t CC wrt_nvp_cmp_func(const void *a, const void *b, void * ignored)
-{
-    int i = 0;
-    const char *key = a;
-    const char *name = ( ( const wrt_nvp_t* ) b ) -> name;
-
-    while(key[i] == name[i]) {
-        if( key[i] == '\0' || name[i] == '\0' ) {
-            break;
-        }
-        ++i;
-    }
-    /* treat \0 or right-paren as key terminator */
-    if( key[i] != 0 && key[i] != ')' ) {
-        return (int64_t)key[i] - (int64_t)name[i];
-    }
-    return (int64_t)0 - (int64_t)name[i];
-}
-
-static
-int64_t CC wrt_nvp_sort_func(const void *a, const void *b, void * ignored)
-{
-    const wrt_nvp_t *left = a;
-    const wrt_nvp_t *right = b;
-    return strcmp ( left -> name, right -> name );
-}
-
-LIB_EXPORT void CC wrt_nvp_sort( size_t argc, wrt_nvp_t argv[])
-{
-    if( argc > 1 ) {
-        ksort(argv, argc, sizeof(argv[0]), wrt_nvp_sort_func, NULL);
-    }
-}
-
-LIB_EXPORT const wrt_nvp_t* CC wrt_nvp_find( size_t argc, const wrt_nvp_t argv[], const char* key )
-{
-    if( argc > 0 ) {
-        return kbsearch(key, argv, argc, sizeof(argv[0]), wrt_nvp_cmp_func, NULL);
-    }
-    return NULL;
-}
-
-LIB_EXPORT const char* CC wrt_nvp_find_value( size_t argc, const wrt_nvp_t argv[], const char* key )
-{
-    if( argc > 0 ) {
-        const wrt_nvp_t* n = (const wrt_nvp_t*)kbsearch(key, argv, argc, sizeof(argv[0]), wrt_nvp_cmp_func, NULL);
-        if( n != NULL ) {
-            return n->value;
-        }
-    }
-    return NULL;
-}
-
-static
-rc_t RCLiteral ( rc_t self, char *buffer, size_t bsize, size_t *num_writ )
-{
-#if ! _DEBUGGING && RECORD_RC_FILE_LINE
-    ( void ) GetRCLineno ();
-#endif
-    return string_printf ( buffer, bsize, num_writ
-#if _DEBUGGING
-        , "rc = %s:%u:$s:%u.%u.%u.%u.%u"
-        , GetRCFilename(), GetRCLineno (), GetRCFunction ()
-#else
-        , "rc = %u.%u.%u.%u.%u"
-#endif
-        , ( uint32_t ) GetRCModule ( self )
-        , ( uint32_t ) GetRCTarget ( self )
-        , ( uint32_t ) GetRCContext ( self )
-        , ( uint32_t ) GetRCObject ( self )
-        , ( uint32_t ) GetRCState ( self )
-    );
-}
-
-LIB_EXPORT rc_t CC RCExplain ( rc_t rc, char *buffer, size_t bsize, size_t *num_writ )
-{
-    return RCExplain2
-        ( rc, buffer, bsize, num_writ, eRCExOpt_CompleteMsg );
-}
-
-LIB_EXPORT rc_t CC RCExplain2 ( rc_t rc, char *buffer, size_t bsize, size_t *num_writ,
-                                enum ERCExplain2Options options )
-{
-    bool noMessageIfNoError =
-        (options == eRCExOpt_NoMessageIfNoError || 
-         options == eRCExOpt_ObjAndStateOnlyIfError);
-    int len;
-    size_t total = 0;
-
-    const char *mod = GetRCModuleText ( GetRCModule ( rc ) );
-    const char *targ = GetRCTargetText ( GetRCTarget ( rc ) );
-    const char *ctx = GetRCContextText ( GetRCContext ( rc ) );
-    const char *obj = GetRCObjectText ( GetRCObject ( rc ) );
-    const char *state = GetRCStateText ( GetRCState ( rc ) );
-
-    assert( buffer && num_writ );
-
-    *num_writ = 0;
-    if( rc == 0 && noMessageIfNoError ) {
-        buffer[0] = '\0';
-        return 0;
-    }
-
-    /* English'ish formatting */
-#if _DEBUGGING
-    {
-        const char *function = GetRCFunction ();
-        if ( function != NULL )
-        {
-            len = snprintf(buffer + total, bsize - total, "%s:%u:%s: ", GetRCFilename(), GetRCLineno (), function );
-            if( len < 0 || ( total + len ) >= bsize ) {
-                return RCLiteral ( rc, buffer, bsize, num_writ );
-            }
-            total += len;
-        }
-    }
-#elif RECORD_RC_FILE_LINE
-    ( void ) GetRCLineno ();
-#endif
-    if( obj != NULL ) {
-        len = snprintf(buffer + total, bsize - total, "%s", obj);
-        if( len < 0 || ( total + len ) >= bsize ) {
-            return RCLiteral ( rc, buffer, bsize, num_writ );
-        }
-        total += len;
-    }
-    if( state != NULL ) {
-        len = snprintf(buffer + total, bsize - total, "%s%s", total ? " " : "", state);
-        if( len < 0 || ( total + len ) >= bsize ) {
-            return RCLiteral ( rc, buffer, bsize, num_writ );
-        }
-        total += len;
-    }
-    if( rc != 0 && options == eRCExOpt_CompleteMsg ) {
-        if( ctx != NULL ) {
-            len = snprintf ( buffer + total, bsize - total, "%swhile %s", total ? " " : "", ctx );
-            if ( len < 0 || ( total + len ) >= bsize ) {
-                return RCLiteral ( rc, buffer, bsize, num_writ );
-            }
-            total += len;
-            if( targ != NULL ) {
-                len = snprintf ( buffer + total, bsize - total, "%s%s", total ? " " : "", targ );
-                if( len < 0 || ( total + len ) >= bsize ) {
-                    return RCLiteral ( rc, buffer, bsize, num_writ );
-                }
-                total += len;
-            }
-        } else if( targ != NULL ) {
-            len = snprintf ( buffer + total,
-                bsize - total, "%swhile acting upon %s", total ? " " : "", targ );
-            if( len < 0 || ( total + len ) >= bsize ) {
-                return RCLiteral ( rc, buffer, bsize, num_writ );
-            }
-            total += len;
-        }
-    }
-    if( mod != NULL && options == eRCExOpt_CompleteMsg ) {
-        len = snprintf(buffer + total, bsize - total, "%swithin %s module", total ? " " : "", mod);
-        if( len < 0 || ( total + len ) >= bsize ) {
-            return RCLiteral ( rc, buffer, bsize, num_writ );
-        }
-        total += len;
-    }
-    *num_writ = total;
-    return 0;
-}
-
-/*--------------------------------------------------------------------------
- * RC
- */
-
-
-/* GetRCModuleText
- */
-const char *GetRCModuleText ( enum RCModule mod )
-{
-    if ( ( int ) mod < 0 || ( int ) mod >= ( int ) rcLastModule_v1_1 )
-        return "<INVALID-MODULE>";
-    return gRCModule_str [ ( int ) mod ];
-}
-
-/* GetRCModuleIdxText
- */
-const char *GetRCModuleIdxText ( enum RCModule mod )
-{
-    if ( ( int ) mod < 0 || ( int ) mod >= ( int ) rcLastModule_v1_1 )
-        return "<INVALID-MODULE>";
-    return gRCModuleIdx_str [ ( int ) mod ];
-}
-
-/* GetRCTargetText
- */
-const char *GetRCTargetText ( enum RCTarget targ )
-{
-    if ( ( int ) targ < 0 || ( int ) targ >= ( int ) rcLastTarget_v1_1 )
-        return "<INVALID-TARGET>";
-    return gRCTarget_str [ ( int ) targ ];
-}
-
-/* GetRCTargetIdxText
- */
-const char *GetRCTargetIdxText ( enum RCTarget targ )
-{
-    if ( ( int ) targ < 0 || ( int ) targ >= ( int ) rcLastTarget_v1_1 )
-        return "<INVALID-TARGET>";
-    return gRCTargetIdx_str [ ( int ) targ ];
-}
-
-/* GetRCContextText
- */
-const char *GetRCContextText ( enum RCContext ctx )
-{
-    if ( ( int ) ctx < 0 || ( int ) ctx >= ( int ) rcLastContext_v1_1 )
-        return "<INVALID-CONTEXT>";
-    return gRCContext_str [ ( int ) ctx ];
-}
-
-/* GetRCContextIdxText
- */
-const char *GetRCContextIdxText ( enum RCContext ctx )
-{
-    if ( ( int ) ctx < 0 || ( int ) ctx >= ( int ) rcLastContext_v1_1 )
-        return "<INVALID-CONTEXT>";
-    return gRCContextIdx_str [ ( int ) ctx ];
-}
-
-/* GetRCObjectText
- */
-const char *GetRCObjectText ( int obj )
-{
-    if ( ( int ) obj < 0 || ( int ) obj >= ( int ) rcLastObject_v1_1 )
-        return "<INVALID-OBJECT>";
-    if ( ( int ) obj < ( int ) rcLastTarget_v1_1 )
-        return gRCTarget_str [ ( int ) obj ];
-    return gRCObject_str [ ( int ) obj - ( int ) ( rcLastTarget_v1_1 - 1 ) ];
-}
-
-/* GetRCObjectIdxText
- */
-const char *GetRCObjectIdxText ( int obj )
-{
-    if ( ( int ) obj < 0 || ( int ) obj >= ( int ) rcLastObject_v1_1 )
-        return "<INVALID-OBJECT>";
-    if ( ( int ) obj < ( int ) rcLastTarget_v1_1 )
-        return gRCTargetIdx_str [ ( int ) obj ];
-    return gRCObjectIdx_str [ ( int ) obj - ( int ) ( rcLastTarget_v1_1 - 1 ) ];
-}
-
-/* GetRCStateText
- */
-const char *GetRCStateText ( enum RCState state )
-{
-    if ( ( int ) state < 0 || ( int ) state >= ( int ) rcLastState_v1_1 )
-        return "<INVALID-STATE>";
-    return gRCState_str [ ( int ) state ];
-}
-
-/* GetRCStateIdxText
- */
-const char *GetRCStateIdxText ( enum RCState state )
-{
-    if ( ( int ) state < 0 || ( int ) state >= ( int ) rcLastState_v1_1 )
-        return "<INVALID-STATE>";
-    return gRCStateIdx_str [ ( int ) state ];
-}
-
-static
-uint32_t read_rc_loc_head ( void )
-{
-    int32_t idx = atomic32_read ( & RC_loc_written );
-    if ( ! reporting_unread )
-    {
-        atomic32_set ( & RC_loc_read, idx );
-    }
-    return idx;
-}
-
-static
-const char *get_rc_filename ( uint32_t idx )
-{
-    const char *p = RC_loc_queue [ idx & RC_LOC_QUEUE_MASK ] . filename;
-    if( p != NULL )
-    {
-        int i;
-        const char *sep;
-        const char *RC_filename = p;
-#if WINDOWS
-        static char win_rc_filename [ 4096 ];
-        size_t w, len = string_copy_measure ( win_rc_filename, sizeof win_rc_filename - 1, p );
-        if ( len >= 2 && isalpha ( win_rc_filename [ 0 ] ) && win_rc_filename [ 1 ] == ':' )
-        {
-            win_rc_filename [ 1 ] = win_rc_filename [ 0 ];
-            win_rc_filename [ 0 ] = '/';
-        }
-        for ( w = 0; w < len; ++ w )
-        {
-            if ( win_rc_filename [ w ] == '\\' )
-                win_rc_filename [ w ] = '/';
-        }
-        p = RC_filename = win_rc_filename;
-#endif
-        if ( (p = strstr(RC_filename, "/interfaces/")) != NULL ||
-             (p = strstr(RC_filename, "/libs/")) != NULL ||
-             (p = strstr(RC_filename, "/services/")) != NULL ||
-             (p = strstr(RC_filename, "/tools/")) != NULL ||
-             (p = strstr(RC_filename, "/asm-trace/")) != NULL )
-        {
-            return p + 1;
-        }
-
-        for ( i = 0, sep = strrchr ( p = RC_filename, '/' ); sep != NULL && i < 3; ++ i )
-        {
-            p = sep + 1;
-            sep = string_rchr ( RC_filename, sep - RC_filename, '/' );
-        }
-    }
-
-    return p;
-}
-
-LIB_EXPORT const char * CC GetRCFilename ( void )
-{
-    return get_rc_filename ( read_rc_loc_head () );
-}
-
-/* InsertSpace
- *  inserts a division after current text
- *
- *  "spacer" [ IN, NULL OKAY ] - optional characters to insert
- */
-LIB_EXPORT rc_t CC LogInsertSpace(const char *spacer, char *buffer, size_t bsize, size_t *num_writ)
-{
-    int len;
-
-    if ( spacer == NULL )
-    {
-        if ( bsize < 2 )
-            return RC ( rcRuntime, rcLog, rcLogging, rcBuffer, rcInsufficient );
-        buffer [ 0 ] = ' ';
-        buffer [ 1 ] = 0;
-        * num_writ = 1;
-        return 0;
-    }
-
-    len = snprintf ( buffer, bsize, "%s", spacer );
-
-    * num_writ = len;
-
-    if ( len < 0 || (size_t)len >= bsize )
-    {
-        if ( len < 0 )
-            * num_writ = 0;
-        return RC ( rcRuntime, rcLog, rcLogging, rcBuffer, rcInsufficient );
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC LogAppName(char *buffer, size_t bsize, size_t *num_writ)
-{
-    if( wrt_app_length > bsize ) {
-        return RC(rcRuntime, rcLog, rcLogging, rcBuffer, rcInsufficient);
-    }
-    memcpy(buffer, wrt_app, wrt_app_length);
-    *num_writ = wrt_app_length;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC LogAppVersion(char *buffer, size_t bsize, size_t *num_writ)
-{
-    if( wrt_vers_length > bsize ) {
-        return RC(rcRuntime, rcLog, rcLogging, rcBuffer, rcInsufficient);
-    }
-    memcpy(buffer, wrt_vers, wrt_vers_length);
-    *num_writ = wrt_vers_length;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC LogFlush ( const KWrtHandler* handler, const char *buffer, const size_t bsize)
-{
-    rc_t rc = 0;
-    size_t num_written;
-    size_t remaining;
-
-    assert(handler != NULL);
-    assert(buffer != NULL);
-
-    for(remaining = bsize; rc == 0 && remaining > 0; remaining -= num_written, buffer += num_written) {
-        rc = handler->writer(handler->data, buffer, remaining, &num_written);
-    }
-    return rc;
-}
-
-static
-const char *get_rc_function ( uint32_t idx )
-{
-    return RC_loc_queue [ idx & RC_LOC_QUEUE_MASK ] . function;
-}
-
-LIB_EXPORT const char * CC GetRCFunction ( void )
-{
-    return get_rc_function ( read_rc_loc_head () );
-}
-
-static
-uint32_t get_rc_lineno ( uint32_t idx )
-{
-    return RC_loc_queue [ idx & RC_LOC_QUEUE_MASK ] . lineno;
-}
-
-LIB_EXPORT uint32_t CC GetRCLineno ( void )
-{
-    return get_rc_lineno ( read_rc_loc_head () );
-}
-
-static
-rc_t get_rc_code ( uint32_t idx )
-{
-    return RC_loc_queue [ idx & RC_LOC_QUEUE_MASK ] . rc;
-}
-
-LIB_EXPORT rc_t CC SetRCFileFuncLine ( rc_t rc, const char *filename, const char *funcname, uint32_t lineno )
-{
-    /* the limit based upon last guy successfully written */
-    int32_t lim = atomic32_read ( & RC_loc_written ) + RC_LOC_QUEUE_SIZE;
-
-    /* try to reserve a slot for writing */
-    int32_t rsrv = atomic32_read_and_add_lt ( & RC_loc_reserve, 1, lim ) + 1;
-
-    /* see if we got the reservation */
-    if ( rsrv <= lim )
-    {
-        uint32_t idx = rsrv & RC_LOC_QUEUE_MASK;
-        RC_loc_queue [ idx ] . filename = filename;
-        RC_loc_queue [ idx ] . function = funcname;
-        RC_loc_queue [ idx ] . lineno = lineno;
-        RC_loc_queue [ idx ] . rc = rc;
-        /* TBD - proper release sequence */
-        atomic32_set ( & RC_loc_written, rsrv );
-    }
-
-    return rc;
-}
-
-/* GetUnreadRCInfo
- *  expected to be called after all threads are quiet
- */
-LIB_EXPORT bool CC GetUnreadRCInfo ( rc_t *rc, const char **filename, const char **funcname, uint32_t *lineno )
-{
-    int32_t last_writ;
-
-    reporting_unread = true;
-
-    /* these are not atomic, but the ordering is important */
-    last_writ = atomic32_read ( & RC_loc_written );
-    if ( last_writ > 0 )
-    {
-        /* this arrangement attempts to make the access to
-           RC_loc_read dependent upon access to RC_loc_written */
-        int32_t last_read = atomic32_read ( & RC_loc_read );
-        if ( last_read < last_writ )
-        {
-            /* check reserved slots */
-            int32_t rsrv = atomic32_read ( & RC_loc_reserve );
-
-            /* adjust last read */
-            if ( last_writ - last_read > RC_LOC_QUEUE_SIZE )
-                last_read = last_writ - RC_LOC_QUEUE_SIZE;
-
-            /* any reserved rows must be considered overwritten */
-            last_read += rsrv - last_writ;
-
-            /* these are the rows we can report */
-            if ( last_read < last_writ )
-            {
-                int32_t idx = last_read + 1;
-                atomic32_set ( & RC_loc_read, idx );
-
-                if ( filename != NULL )
-                    * filename = get_rc_filename ( idx );
-                if ( funcname != NULL )
-                    * funcname = get_rc_function ( idx );
-                if ( lineno != NULL )
-                    * lineno = get_rc_lineno ( idx );
-                if ( rc != NULL )
-                    * rc = get_rc_code ( idx );
-
-                return true;
-            }
-        }
-    }
-    reporting_unread = false;
-    return false;
-}
diff --git a/libs/kns/Makefile b/libs/kns/Makefile
deleted file mode 100644
index c1a442c..0000000
--- a/libs/kns/Makefile
+++ /dev/null
@@ -1,115 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: all
-
-TOP ?= $(abspath ../..)
-MODULE = libs/kns
-
-INT_LIBS = \
-	libkns
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES = \
-	$(KNS_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-RWORKDIR = $(TOP)/$(MODULE)
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-
-# we are building it on all platforms now, because dependency on libcurl is removed
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# kns
-#
-$(ILIBDIR)/libkns: $(addprefix $(ILIBDIR)/libkns.,$(ILIBEXT))
-
-KNS_NO_HTTP_SRC = \
-	kns_manager-ext \
-	manager \
-	buffered-stream \
-	stream \
-	stream-from-files \
-	stream-from-streams \
-	endpoint \
-	sysendpoint \
-	syssock \
-	sysstream \
-    sysmgr
-
-ifneq (win,$(OS))
-KNS_NO_HTTP_SRC += \
-	syspoll
-endif
-
-KNS_SRC = \
-	$(KNS_NO_HTTP_SRC) \
-	http-file          \
-	http-client        \
-	http-retrier       \
-	http               \
-
-KNS_OBJ = \
-	$(addsuffix .$(LOBX),$(KNS_SRC))
-
-KNS_LIB = \
-    -lkfs \
-	-dklib
-
-$(ILIBDIR)/libkns.$(LIBX): $(KNS_OBJ)
-	$(LD) --slib -o $@ $^ $(KNS_LIB)
-
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/kns/buffered-stream.c b/libs/kns/buffered-stream.c
deleted file mode 100644
index 7534117..0000000
--- a/libs/kns/buffered-stream.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-typedef struct KBufferedStream KBufferedStream;
-#define KSTREAM_IMPL KBufferedStream
-
-#include <kns/extern.h>
-#include <kns/stream.h>
-#include <kns/impl.h>
-#include <kfs/file.h>
-#include <kfs/impl.h>
-#include <klib/rc.h>
-
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "stream-priv.h"
-
-#define DEFAULT_BUFFER_SIZE ( 32 * 1024 )
-
-/* the object structure for THIS implementation */
-struct  KBufferedStream
-{
-    /* THIS MUST COME FIRST */
-    KStream dad;
-
-    const KStream * in;
-    KStream * out;
-
-    size_t buffer_size;
-
-    uint8_t * in_buffer;
-    size_t in_marker;
-    size_t in_limit;
-
-    uint8_t * out_buffer;
-    size_t out_marker;
-};
-
-
-/* the required methods */
-
-static
-rc_t CC KBufferedStreamWhack ( KBufferedStream *self )
-{
-    if ( self -> out_buffer != NULL && self -> out_marker != 0 )
-    {
-        size_t num_writ;
-        KStreamWriteAll ( self -> out, self -> out_buffer, self -> out_marker, & num_writ );
-    }
-
-    KStreamRelease ( self -> in );
-    KStreamRelease ( self -> out );
-
-    if ( self -> in_buffer != NULL )
-        free ( self -> in_buffer );
-    if ( self -> out_buffer != NULL )
-        free ( self -> out_buffer );
-
-    free ( self );
-    return 0;
-}
-
-static
-rc_t CC KBufferedStreamRead ( const KBufferedStream *cself,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    KBufferedStream * self = ( KBufferedStream * ) cself;
-
-    size_t avail = self -> in_limit - self -> in_marker;
-    if ( avail == 0 )
-    {
-        size_t limit;
-        rc_t rc = KStreamRead ( self -> in, self -> in_buffer, self -> buffer_size, & limit );
-        if ( rc != 0 )
-        {
-            * num_read = 0;
-            return rc;
-        }
-
-        self -> in_marker = 0;
-        avail = self -> in_limit = limit;
-
-        if ( limit == 0 )
-        {
-            * num_read = 0;
-            return 0;
-        }
-    }
-
-    if ( bsize > avail )
-        bsize = avail;
-
-    memcpy ( buffer, & self -> in_buffer [ self -> in_marker ], bsize );
-    self -> in_marker += bsize;
-
-    * num_read = bsize;
-    return 0;
-}
-
-static
-rc_t CC KBufferedStreamWrite ( KBufferedStream * self,
-    const void * buffer, size_t size, size_t * total_writ )
-{
-    const uint8_t * p = buffer;
-
-    size_t total, num_writ = 0;
-    for ( total = 0; total < size; total += num_writ )
-    {
-        size_t avail = self -> buffer_size - self -> out_marker;
-        if ( avail == 0 )
-        {
-            rc_t rc = KStreamWriteAll ( self -> out, self -> out_buffer, self -> out_marker, & num_writ );
-            if ( rc != 0 )
-            {
-                * total_writ = 0;
-                return rc;
-            }
-            if ( num_writ != self -> out_marker )
-            {
-                * total_writ = total;
-                return RC ( rcNS, rcStream, rcWriting, rcTransfer, rcIncomplete );
-            }
-
-            self -> out_marker = 0;
-            avail = self -> buffer_size;
-        }
-
-        num_writ = size - total;
-        if ( num_writ > avail )
-            num_writ = avail;
-
-        memcpy ( & self -> out_buffer [ self -> out_marker ], & p [ total ], num_writ );
-        self -> out_marker += num_writ;
-    }
-
-    * total_writ = total;
-    return 0;
-}
-
-/* the vtable */
-static KStream_vt_v1 vtKBufferedStream =
-{
-    1, 0,
-    KBufferedStreamWhack,
-    KBufferedStreamRead,
-    KBufferedStreamWrite
-};
-
-
-/* MakeBuffered
- *  makes a one or two-way stream buffer
- */
-LIB_EXPORT rc_t CC KStreamMakeBuffered ( KStream ** buffered,
-    const KStream * in, KStream * out, size_t buffer_size )
-{
-    rc_t rc;
-
-    if ( buffered == NULL )
-        rc = RC ( rcNS, rcStream, rcConstructing, rcParam, rcNull );
-    else
-    {
-        bool can_read = ( in == NULL ) ? false : in -> read_enabled;
-        bool can_write = ( out == NULL ) ? false : out -> write_enabled;
-
-        if ( ! can_read && ! can_write )
-            rc = RC ( rcNS, rcStream, rcConstructing, rcStream, rcNoPerm );
-        else
-        {
-            KBufferedStream * bs = calloc ( 1, sizeof * bs );
-            if ( bs == NULL )
-                rc = RC ( rcNS, rcStream, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KStreamInit ( & bs -> dad, ( const KStream_vt* ) & vtKBufferedStream, 
-                    "KBufferedStream", "adapter", can_read, can_write );
-                if ( rc == 0 )
-                {
-                    bs -> buffer_size = buffer_size ? buffer_size : DEFAULT_BUFFER_SIZE;
-                    if ( in != NULL )
-                        bs -> in_buffer = malloc ( bs -> buffer_size );
-                    if ( out != NULL )
-                        bs -> out_buffer = malloc ( bs -> buffer_size );
-                    if ( ( in != NULL && bs -> in_buffer == NULL ) ||
-                         ( out != NULL && bs -> out_buffer == NULL ) )
-                    {
-                        rc = RC ( rcNS, rcStream, rcConstructing, rcMemory, rcExhausted );
-                    }
-                    else
-                    {
-                        rc = KStreamAddRef ( in );
-                        if ( rc == 0 )
-                        {
-                            rc = KStreamAddRef ( out );
-                            if ( rc ==  0 )
-                            {
-                                bs -> in = in;
-                                bs -> out = out;
-                                * buffered = & bs -> dad;
-                                
-                                return 0;
-                            }
-                            
-                            KStreamRelease ( in );
-                        }
-                    }
-
-                    if ( bs -> in_buffer != NULL )
-                        free ( bs -> in_buffer );
-                    if ( bs -> out_buffer != NULL )
-                        free ( bs -> out_buffer );
-                }
-
-                free ( bs );
-            }
-        }
-
-        * buffered = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/kns/endpoint.c b/libs/kns/endpoint.c
deleted file mode 100644
index fb05262..0000000
--- a/libs/kns/endpoint.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kns/impl.h>
-#include <kns/endpoint.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-
-#include "stream-priv.h"
-
-#include <string.h>
-#include <assert.h>
-
-#include <sysalloc.h>
-
-
-/* InitIPv4Endpoint
- *  initialize the endpoint with an IPv4 address and port
- *
- *  "ep" [ OUT ] - address of endpoint block to be intialized
- *
- *  "ipv4" [ IN, DEFAULT 0 ] - binary IPv4 address in native integer byte order
- *   i.e. 0x7F000001 represents 127.0.0.1. if the special address 0 is given, it
- *   represents any host-local interface address.
- *
- *  "port" [ IN, DEFAULT 0 ] - binary port number in native integer byte order.
- *   if the special port number 0 is given, it represents any available port.
- */
-LIB_EXPORT 
-rc_t CC KNSManagerInitIPv4Endpoint ( struct KNSManager const *self,
-    KEndPoint *ep, uint32_t ipv4, uint16_t port )
-{
-    rc_t rc;
-
-    if ( ep == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcInitializing, rcParam, rcNull);
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcInitializing, rcSelf, rcNull );
-        else
-        {
-            ep -> type = epIPV4;
-            ep -> u . ipv4. addr = ipv4;
-            ep -> u. ipv4 . port = port;
-            return 0;
-        }
-
-        memset ( ep, 0, sizeof * ep );
-    }
-    return rc;
-}
-
-
-/* InitIPv6Endpoint
- *  initialize the endpoint with an IPv6 address and port
- *
- *  "ep" [ OUT ] - address of endpoint block to be intialized
- *
- *  "ipv6" [ IN, DEFAULT NULL ] - binary IPv6 address in native integer byte order
- *   has to point to a 16-byte long array ( = 128 bit ). The function will make
- *   a copy of this array. 0x1 represents 0:0:0:0:0:0:0:1 the loopback-device.
- *   If the special address ::0 is given, it represents any host-local interface
- *   address. ( in6addr_any is a 16-byte array with all bytes set to zero )
- *   If a NULL-pointer is passed in, the function treats it as in6addr_any.
- *
- *  "port" [ IN, DEFAULT 0 ] - binary port number in native integer byte order.
- *   if the special port number 0 is given, it represents any available port.
- */
-LIB_EXPORT
-rc_t CC KNSManagerInitIPv6Endpoint ( struct KNSManager const *self,
-    KEndPoint *ep, uint8_t *ipv6, uint16_t port )
-{
-    rc_t rc;
-
-    if ( ep == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcInitializing, rcParam, rcNull);
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcInitializing, rcSelf, rcNull );
-        else
-        {
-            ep -> type = epIPV6;
-            if ( ipv6 == NULL )
-                memset ( ep -> u . ipv6 . addr, 0, sizeof ( ep -> u . ipv6 . addr ) );
-            else
-                memcpy ( ep -> u . ipv6 . addr, ipv6, sizeof ( ep -> u . ipv6 . addr ) );
-            ep -> u. ipv6 . port = port;
-            return 0;
-        }
-
-        memset ( ep, 0, sizeof * ep );
-    }
-    return rc;
-}
-
-
-
-/* InitIPCEndpoint
- *  initialize the endpoint for interprocess communication
- *
- *  "ep" [ OUT ] - address of endpoint block to be intialized
- *
- *  "name" [ IN ] - IPC channel name (a POSIX path to a Unix socket, or a name of a Windows pipe)
- */
-LIB_EXPORT 
-rc_t CC KNSManagerInitIPCEndpoint ( struct KNSManager const *self,
-    KEndPoint *ep, struct String const * name )
-{
-    rc_t rc;
-
-    if ( ep == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcInitializing, rcParam, rcNull);
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcInitializing, rcSelf, rcNull );
-        else
-        {
-            size_t copied = string_copy(ep -> u.ipc_name, IPC_NAME_MAX - 1, name->addr, name->len);
-            if (copied != name->len)
-                rc = RC ( rcNS, rcNoTarg, rcInitializing, rcSize, rcExcessive );
-            ep -> u.ipc_name[copied] = 0;
-            ep -> type = epIPC;
-            return 0;
-        }
-
-        memset ( ep, 0, sizeof * ep );
-    }
-    return rc;
-}
diff --git a/libs/kns/http-client.c b/libs/kns/http-client.c
deleted file mode 100644
index 96c8a01..0000000
--- a/libs/kns/http-client.c
+++ /dev/null
@@ -1,3095 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ==============================================================================
-*
-*/
-#include <kns/extern.h>
-
-#define KSTREAM_IMPL KClientHttpStream
-typedef struct KClientHttpStream KClientHttpStream;
-
-#include <kns/manager.h>
-#include <kns/http.h>
-#include <kns/adapt.h>
-#include <kns/endpoint.h>
-#include <kns/socket.h>
-#include <kns/stream.h>
-#include <kns/impl.h>
-#include <vfs/path.h>
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-#ifdef ERR
-#undef ERR
-#endif
-
-#include <klib/debug.h> /* DBGMSG */
-#include <klib/text.h>
-#include <klib/container.h>
-#include <klib/out.h>
-#include <klib/log.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <klib/printf.h>
-#include <klib/vector.h>
-#include <kproc/timeout.h>
-
-#include <strtol.h>
-#include <va_copy.h>
-
-#include "mgr-priv.h"
-#include "stream-priv.h"
-
-#include <sysalloc.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-#include "http-priv.h"
-
-#if _DEBUGGING && 0
-#include <stdio.h>
-#define TRACE( x, ... ) \
-    fprintf ( stderr, "@@ %s:%d: %s: " x, __FILE__, __LINE__, __func__, __VA_ARGS__ )
-#else
-#define TRACE( x, ... ) \
-    ( ( void ) 0 )
-#endif
-
-static 
-void  KDataBufferClear ( KDataBuffer *buf )
-{
-    memset ( buf, 0, sizeof *buf );
-    buf -> elem_bits = 8;
-}
-
-#if _DEBUGGING
-static
-bool KDataBufferContainsString ( const KDataBuffer *buf, const String *str )
-{
-    return str -> addr >= ( const char* ) buf -> base &&
-        & str -> addr [ str -> size ] <= & ( ( const char* ) buf -> base ) [ buf -> elem_count ];
-}
-#endif
-
-/*--------------------------------------------------------------------------
- * KClientHttp
- *  hyper text transfer protocol 
- *  structure that will act as the 'client' for networking tasks
- */
-struct KClientHttp
-{
-    const KNSManager *mgr;
-    KStream * sock;
-
-    /* buffer for accumulating response data from "sock" */
-    KDataBuffer block_buffer;
-    size_t block_valid;         /* number of valid response bytes in buffer            */
-    size_t block_read;          /* number of bytes read out by line reader or stream   */
-    size_t body_start;          /* offset to first byte in body                        */
-
-    KDataBuffer line_buffer;    /* data accumulates for reading headers and chunk size */
-    size_t line_valid;
-
-    KDataBuffer hostname_buffer;
-    String hostname; 
-    uint32_t port;
-
-    ver_t vers;
-
-    KRefcount refcount;
-
-    int32_t read_timeout;
-    int32_t write_timeout;
-
-    KEndPoint ep;
-    bool ep_valid;
-    bool proxy_ep;
-    bool proxy_default_port;
-    
-    bool reliable;
-};
-
-
-#define KClientHttpBlockBufferIsEmpty( self ) \
-    ( ( self ) -> block_read == ( self ) -> block_valid )
-
-#define KClientHttpBlockBufferReset( self ) \
-    ( ( void ) ( ( self ) -> block_valid = ( self ) -> block_read = 0 ) )
-
-#define KClientHttpLineBufferReset( self ) \
-    ( ( void ) ( ( self ) -> line_valid = 0 ) )
-    
-void KClientHttpClose ( KClientHttp *self )
-{
-    KStreamRelease ( self -> sock );
-    self -> sock = NULL;
-
-    KClientHttpBlockBufferReset ( self );
-    KClientHttpLineBufferReset ( self );
-#if 0
-    TRACE ( "closed connection%c", '\n' );
-#endif
-}
-
-
-/* used to be in whack function, but we needed the ability
-   to clear out the http object for redirection */
-static
-rc_t KClientHttpClear ( KClientHttp *self )
-{
-    KClientHttpClose ( self );
-
-    KDataBufferWhack ( & self -> hostname_buffer );
-
-    return 0;
-}
-
-static
-rc_t KClientHttpWhack ( KClientHttp * self )
-{
-    KClientHttpClear ( self );
-    
-    KDataBufferWhack ( & self -> block_buffer );
-    KDataBufferWhack ( & self -> line_buffer );
-    KNSManagerRelease ( self -> mgr );
-    KRefcountWhack ( & self -> refcount, "KClientHttp" );
-    free ( self );
-
-    return 0;
-}
-
-static
-rc_t KClientHttpInitDNSEndpoint ( KClientHttp * self, const String * hostname, uint32_t port, uint16_t dflt_proxy_port )
-{
-    rc_t rc = 0;
-
-    const KNSManager * mgr = self -> mgr;
-
-    self -> proxy_default_port = false;
-
-    if ( dflt_proxy_port != 0 && mgr -> http_proxy_enabled && mgr -> http_proxy != NULL )
-    {
-        uint16_t proxy_port = mgr -> http_proxy_port;
-        if ( proxy_port == 0 )
-        {
-            proxy_port = dflt_proxy_port;
-            self -> proxy_default_port = true;
-        }
-
-        rc = KNSManagerInitDNSEndpoint ( mgr, & self -> ep, mgr -> http_proxy, proxy_port );
-        if ( rc == 0 )
-        {
-            self -> proxy_ep = true;
-            return 0;
-        }
-    }
-
-    self -> proxy_ep = false;
-
-    return KNSManagerInitDNSEndpoint ( mgr, & self -> ep, hostname, port );
-}
-
-rc_t KClientHttpOpen ( KClientHttp * self, const String * hostname, uint32_t port )
-{
-    rc_t rc = 0;
-    KSocket * sock;
-    const KNSManager * mgr = self -> mgr;
-
-    /* default port list MUST end with 0 to try without proxy */
-    uint32_t pp_idx;
-    static uint16_t dflt_proxy_ports [] = { 3128, 8080, 0 };
-
-    for ( pp_idx = 0; pp_idx < sizeof dflt_proxy_ports / sizeof dflt_proxy_ports [ 0 ]; ++ pp_idx )
-    {
-        /* if endpoint was not successfully opened on previous attempt */
-        if ( ! self -> ep_valid )
-        {
-            rc = KClientHttpInitDNSEndpoint ( self, hostname, port, dflt_proxy_ports [ pp_idx ] );
-            if ( rc != 0 )
-                break;
-        }
-
-        /* try to connect to endpoint */
-        rc = KNSManagerMakeTimedConnection ( mgr, & sock,
-            self -> read_timeout, self -> write_timeout, NULL, & self -> ep );
-        if ( rc == 0 )
-        {
-            /* this is a good endpoint */
-            self -> ep_valid = true;
-            break;
-        }
-
-        /* if we did not try a proxy server before, exit loop */
-        if ( self -> ep_valid || ! self -> proxy_ep )
-            break;
-    }
-
-    /* if the connection is open */
-    if ( rc == 0 )
-    {
-        rc = KSocketGetStream ( sock, & self -> sock );
-        KSocketRelease ( sock );
-
-        if ( rc == 0 )
-        {
-            self -> port = port;
-            return 0;
-        }
-    }
-
-    self -> sock = NULL;
-    return rc;
-}
-
-#if _DEBUGGING
-/* we need this hook to be able to test the re-connection logic */
-static struct KStream * (*ClientHttpReopenCallback) ( void ) = NULL;
-
-void SetClientHttpReopenCallback ( struct KStream * (*fn) ( void ) )
-{
-    ClientHttpReopenCallback = fn;
-}
-#endif
-
-rc_t KClientHttpReopen ( KClientHttp * self )
-{
-#if _DEBUGGING
-    if ( ClientHttpReopenCallback != NULL )
-    {
-        self -> sock = ClientHttpReopenCallback ();
-        return 0;
-    }
-#endif
-    
-    KClientHttpClose ( self );
-    return KClientHttpOpen ( self, & self -> hostname, self -> port );
-}
-
-/* Initialize KClientHttp object */
-static
-rc_t KClientHttpInit ( KClientHttp * http, const KDataBuffer *hostname_buffer, KStream * conn, ver_t _vers, const String * _host, uint32_t port )
-{
-    rc_t rc;
-
-    if ( port == 0 )
-        port = 80;
-
-    /* we accept a NULL connection ( from ) */
-    if ( conn == NULL )
-        rc = KClientHttpOpen ( http, _host, port );
-    else
-    {
-        rc = KStreamAddRef ( conn );
-        if ( rc == 0 )
-            http -> sock = conn;
-    }
-
-    if ( rc == 0 )
-    {
-        http -> port = port;
-        http -> vers = _vers & 0xFFFF0000; /* safety measure - limit to major.minor */
-
-
-        /* YOU NEED AN assert HERE TO ENSURE _host IS WITHIN hostname_buffer */
-        assert ( KDataBufferContainsString ( hostname_buffer, _host ) );
-
-        /* initialize hostname buffer from external buffer */
-        rc = KDataBufferSub ( hostname_buffer, &http -> hostname_buffer,
-                              ( _host -> addr - ( const char* ) hostname_buffer -> base ),
-                              _host -> size );
-        if ( rc == 0 )
-            /* Its safe to assign pointer because we know
-               that the pointer is within the buffer */
-            http -> hostname = * _host;
-    }
-    
-    return rc;
-} 
-
-
-/* MakeHttp
- *  create an HTTP protocol
- *
- *  "http" [ OUT ] - return parameter for HTTP object
- *
- *  "opt_conn" [ IN ] - previously opened stream for communications.
- *
- *  "vers" [ IN ] - http version
- *   the only legal types are 1.0 ( 0x01000000 ) and 1.1 ( 0x01010000 )
- *
- *  "host" [ IN ] - parameter to give the host dns name for the connection
- *
- *  "port" [ IN, DEFAULT ZERO ] - if zero, defaults to standard for scheme
- *   if non-zero, is taken as explicit port specification
- */
-rc_t KNSManagerMakeClientHttpInt ( const KNSManager *self, KClientHttp **_http,
-    const KDataBuffer *hostname_buffer,  KStream *opt_conn,
-    ver_t vers, int32_t readMillis, int32_t writeMillis,
-    const String *host, uint32_t port, bool reliable )
-{
-    rc_t rc;
-
-    KClientHttp * http = calloc ( 1, sizeof * http );
-    if ( http == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcAllocating, rcMemory, rcNull );
-    else
-    {
-        rc = KNSManagerAddRef ( self );
-        if ( rc == 0 )
-        {
-            char save, *text;
-
-            http -> mgr = self;
-            http -> read_timeout = readMillis;
-            http -> write_timeout = writeMillis;
-
-            /* Dont use MakeBytes because we dont need to allocate memory
-               and we only need to know that the elem size is 8 bits */
-            KDataBufferClear ( & http -> block_buffer );
-            KDataBufferClear ( & http -> line_buffer );
-
-            /* make sure address of bost is within hostname_buffer */
-            assert ( KDataBufferContainsString ( hostname_buffer, host ) );
-
-            /* SET TEXT TO POINT TO THE HOST NAME AND NUL TERMINATE IT FOR DEBUGGING
-             Its safe to modify the const char array because we allocated the buffer*/ 
-            text = ( char* ) ( host -> addr );
-            save = text [ host -> size ];
-            text [ host -> size ] = 0;
-        
-            /* initialize reference counter on object to 1 - text is now nul-terminated */
-            KRefcountInit ( & http -> refcount, 1, "KClientHttp", "make", text );
-
-            text [ host -> size ] = save;
-
-            /* init the KClientHttp object */
-            rc = KClientHttpInit ( http, hostname_buffer, opt_conn, vers, host, port );
-            if ( rc == 0 )
-            {
-                http -> reliable = reliable;
-                /* assign to OUT http param */
-                * _http = http;
-                return 0;
-            }
-
-            KNSManagerRelease ( self );
-        }
-                
-        free ( http );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KNSManagerMakeTimedClientHttp ( const KNSManager *self,
-    KClientHttp **_http, KStream *opt_conn, ver_t vers, int32_t readMillis, int32_t writeMillis,
-    const String *host, uint32_t port )
-{
-    rc_t rc;
-    
-    /* check return parameters */
-    if ( _http == NULL )
-        rc = RC ( rcNS, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        /* check input parameters */
-        if ( self == NULL )
-            rc = RC ( rcNS, rcMgr, rcConstructing, rcSelf, rcNull );
-        /* make sure we have one of the two versions supported - 1.0, 1.1 */
-        else if ( vers < 0x01000000 || vers > 0x01010000 )
-            rc = RC ( rcNS, rcMgr, rcConstructing, rcParam, rcBadVersion );
-        else if ( host == NULL )
-            rc = RC ( rcNS, rcMgr, rcConstructing, rcPath, rcNull );
-        /* make sure there is data in the host name */
-        else if ( host -> size == 0 )
-            rc = RC ( rcNS, rcMgr, rcConstructing, rcPath, rcEmpty );
-        else
-        {
-            KDataBuffer hostname_buffer;
-
-            /* create storage buffer for hostname */
-            rc = KDataBufferMakeBytes ( & hostname_buffer, host -> size + 1 );
-            if ( rc == 0 )
-            {
-                String _host;
-
-                /* copy hostname with nul termination */
-                string_copy ( hostname_buffer . base, ( size_t ) hostname_buffer . elem_count,
-                              host -> addr, host -> size );
-
-                /* create copy of host that points into new buffer */
-                StringInit ( &_host, hostname_buffer . base, host -> size, host -> len );
-
-                /* limit timeouts */
-                if ( readMillis < 0 )
-                    readMillis = -1;
-                else if ( readMillis > MAX_HTTP_READ_LIMIT )
-                    readMillis = MAX_HTTP_READ_LIMIT;
-                if ( writeMillis < 0 )
-                    writeMillis = -1;
-                else if ( writeMillis > MAX_HTTP_WRITE_LIMIT )
-                    writeMillis = MAX_HTTP_WRITE_LIMIT;
-
-                /* initialize http object - will create a new reference to hostname buffer */
-                rc = KNSManagerMakeClientHttpInt ( self, _http, & hostname_buffer,
-                    opt_conn, vers, readMillis, writeMillis, &_host, port, false );
-
-                /* release our reference to buffer */
-                KDataBufferWhack ( & hostname_buffer );
-
-                if ( rc == 0 )
-                    return 0;
-            }
-        }
-
-        * _http = NULL;
-    }
-    
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KNSManagerMakeClientHttp ( const KNSManager *self,
-    KClientHttp **http, KStream *opt_conn, ver_t vers, const String *host, uint32_t port )
-{
-    if ( self == NULL )
-    {
-        if ( http == NULL )
-            return RC ( rcNS, rcMgr, rcValidating, rcParam, rcNull );
-
-        * http = NULL;
-
-        return RC ( rcNS, rcMgr, rcValidating, rcSelf, rcNull );
-    }
-
-    return KNSManagerMakeTimedClientHttp ( self, http, opt_conn, vers,
-        self -> http_read_timeout, self -> http_write_timeout, host, port );
-}
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KClientHttpAddRef ( const KClientHttp *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KClientHttp" ) )
-        {
-        case krefLimit:
-            return RC ( rcNS, rcNoTarg, rcAttaching, rcRange, rcExcessive );
-        case krefNegative:
-            return RC ( rcNS, rcNoTarg, rcAttaching, rcSelf, rcInvalid );
-        default:
-            break;
-        }
-    }
-    
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KClientHttpRelease ( const KClientHttp *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KClientHttp" ) )
-        {
-        case krefWhack:
-            return KClientHttpWhack ( ( KClientHttp* ) self );
-        case krefNegative:
-            return RC ( rcNS, rcNoTarg, rcReleasing, rcRange, rcExcessive );
-        default:
-            break;
-        }
-    }
-    
-    return 0;
-}
-
-/* Communication Methods
- *  Read in the http response and return 1 char at a time
- */
-static
-rc_t KClientHttpGetCharFromResponse ( KClientHttp *self, char *ch, struct timeout_t *tm )
-{
-    rc_t rc;
-    char * buffer = self -> block_buffer . base;
-
-    /* check for data in buffer */
-    if ( KClientHttpBlockBufferIsEmpty ( self ) )
-    {
-        /* check to see ho many bytes are in the buffer */
-        size_t bsize = KDataBufferBytes ( & self -> block_buffer );
-
-        /* First time around, bsize will be 0 */
-        if ( bsize == 0 )
-        {
-            bsize = 64 * 1024;
-            rc = KDataBufferResize ( & self -> block_buffer, bsize );
-            if ( rc != 0 )
-                return rc;
-
-            /* re-assign new base pointer */
-            buffer = self -> block_buffer . base;
-        }
-
-        /* zero out offsets */
-        KClientHttpBlockBufferReset ( self );
-
-        /* read from the stream into the buffer, and record the bytes read
-           into block_valid */
-        /* NB - do NOT use KStreamReadAll or it will block with http 1.1 
-           because http/1.1 uses keep alive and the read will block until the server 
-           drops the connection */
-        rc = KStreamTimedRead ( self -> sock, buffer, bsize, & self -> block_valid, tm );
-        if ( rc != 0 )
-        {
-            KClientHttpClose ( self );
-            return rc;
-        }
-
-        /* if nothing was read, we have reached the end of the stream */
-        if ( self -> block_valid == 0 )
-        {
-            KClientHttpClose ( self );
-
-            /* return nul char */
-            * ch = 0;
-            return 0;
-        }
-    }
-
-    /* return the next char in the buffer */
-    * ch = buffer [ self -> block_read ++ ];
-    return 0;
-}
-
-/* Read and return entire lines ( until \r\n ) */
-static
-rc_t KClientHttpGetLine ( KClientHttp *self, struct timeout_t *tm )
-{
-    rc_t rc;
-
-    char * buffer = self -> line_buffer . base;
-    size_t bsize = KDataBufferBytes ( & self -> line_buffer );
-
-    /* num_valid bytes read starts at 0 */
-    self -> line_valid = 0;
-    while ( 1 )
-    {
-        char ch;
-
-        /* get char */
-        rc = KClientHttpGetCharFromResponse ( self, &ch, tm );
-        if ( rc != 0 )
-            break;
-
-        if ( ch == '\n' )
-        {
-            /* check that there are valid bytes read and the previous char is '\r' */
-            if ( self -> line_valid > 0 && buffer [ self -> line_valid - 1 ] == '\r' )
-            {
-                /* decrement number of valid bytes to remove '\r' */
-                -- self -> line_valid;
-            }
-            /* record end of line */
-            ch = 0;
-        }
-
-        /* check if the buffer is full */
-        if ( self -> line_valid == bsize )
-        {
-            /* I assume that the header lines will not be too large
-               so only need to increment  by small chunks */
-            bsize += 256;
-
-            /* TBD - place an upper limit on resize */
-
-            /* resize */
-            rc = KDataBufferResize ( & self -> line_buffer, bsize );
-            if ( rc != 0 )
-                return rc;
-
-            /* assign new base pointer */
-            buffer = self -> line_buffer . base;
-        }
-
-        /* buffer is not full, insert char into the buffer */
-        buffer [ self -> line_valid ] = ch;
-        
-        /* get out of loop if end of line */
-        if ( ch == 0 )
-        {
-#if _DEBUGGING
-            if ( KNSManagerIsVerbose ( self -> mgr ) ) {
-                size_t i = 0;
-                KOutMsg ( "KClientHttpGetLine: '" );
-                for (i = 0; i <= self->line_valid; ++i) {
-                    if (isprint(buffer[i])) {
-                        KOutMsg("%c", buffer[i]);
-                    }
-                    else {
-                        KOutMsg("\\%02X", buffer[i]);
-                    }
-                }
-                KOutMsg ( "'\n" );
-            }
-#endif
-            break;
-        }
-        /* not end of line - increase num of valid bytes read */
-        ++ self -> line_valid;
-    }
-
-    return rc;
-}
-
-/* AddHeaderString
- *  performs task of entering a header into BSTree
- *  or updating an existing node
- *
- * If header exists:
- *  if (add) then add "value" to "header value"
- *  else     replace "header value" with "value"
- *
- *  Headers are always made up of a name: value pair
- */
-static
-rc_t KClientHttpAddHeaderString
-( BSTree *hdrs, bool add, const String *name, const String *value )
-{
-    rc_t rc = 0;
-
-    /* if there is no name - error */
-    if ( name -> size == 0 )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcInsufficient );
-    else
-    {
-        /* test for previous existence of node by name */
-        KHttpHeader * node = ( KHttpHeader * ) BSTreeFind ( hdrs, name, KHttpHeaderCmp );
-        if ( node == NULL )
-        {
-            /* node doesnt exist - allocate memory for a new one */
-            node = calloc ( 1, sizeof * node );
-            if ( node == NULL )
-                rc = RC ( rcNS, rcNoTarg, rcAllocating, rcMemory, rcNull );
-            else
-            {
-                /* size of the KDataBuffer to store string data */
-                size_t bsize = name -> size + value ->  size + 1;
-                rc = KDataBufferMakeBytes ( & node -> value_storage, bsize );
-                if ( rc == 0 )
-                {
-                    /* copy the string data into storage */
-                    rc = string_printf ( node -> value_storage . base, bsize, NULL,
-                                         "%S%S"
-                                         , name
-                                         , value );
-                    if ( rc == 0 )
-                    {
-                        /* initialize the Strings to point into KHttpHeader node */
-                        StringInit ( & node -> name, node -> value_storage . base, name -> size, name -> len );
-                        StringInit ( & node -> value, node -> name . addr + name -> size, value -> size, value -> len );
-                        
-                        /* insert into tree, sorted by alphabetical order */
-                        BSTreeInsert ( hdrs, & node -> dad, KHttpHeaderSort );
-                        
-                        return 0;
-                    }
-                    
-                    KDataBufferWhack ( & node -> value_storage );
-                }
-                
-                free ( node );
-            }
-        }
-        
-        /* node exists
-           check that value param has data */
-        else if ( value -> size != 0 )
-        {
-          /* find the current size of the data in the node */
-          size_t cursize = node -> name . size + node -> value . size;
-          if ( add ) { /* add value to node -> value */
-            /* resize databuffer to hold the additional value data + comma + nul */
-            rc = KDataBufferResize ( & node -> value_storage, cursize + value -> size + 1 + 1 );
-            if ( rc == 0 )
-            {
-                char *buffer = node -> value_storage . base;
-
-                /* copy string data into buffer */
-                rc = string_printf ( & buffer [ cursize ], value -> size + 2, NULL,
-                                     ",%S"
-                                     , value ); 
-                if ( rc == 0 )
-                {
-                    /* update size and len of value in the node */
-                    node -> value . size += value -> size + 1;
-                    node -> value . len += value -> len + 1;
-                    return 0;
-                }
-                
-                /* In case of almost impossible error
-                   restore values to what they were */
-                KDataBufferResize ( & node -> value_storage, cursize + 1 );
-            }
-          } else { /* replace value with node -> value */
-            if ( ! StringEqual ( & node -> value, value ) )
-            /* values are not equal - need to replace */
-            {
-                /* size of the KDataBuffer to store string data */
-                size_t bsize = name -> size + value ->  size + 1;
-                if ( value -> size > node -> value . size
-                  || value -> len > node -> value . len )
-                {   /* new value is longer */
-                    KDataBufferResize ( & node -> value_storage, bsize );
-                }
-                /* copy the string data into storage */
-                rc = string_printf ( node -> value_storage . base, bsize,
-                    NULL, "%S%S", name, value );
-                if ( rc == 0 )
-                {
-                    /* initialize the Strings to point into KHttpHeader node */
-                    StringInit ( & node -> name,  node -> value_storage . base,
-                        name -> size, name -> len );
-                    StringInit ( & node -> value,
-                        node -> name . addr + name -> size,
-                        value -> size, value -> len );
-                }
-            }
-          }
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t KClientHttpVAddHeader ( BSTree *hdrs, bool add,
-    const char *_name, const char *_val, va_list args )
-{
-    rc_t rc;
-
-    size_t bsize;
-    String name, value;
-    char buf [ 4096 ];
-
-    /* initialize name string from param */
-    StringInitCString ( & name, _name );
-
-    /* copy data into buf, using va_list for value format */
-    rc = string_vprintf ( buf, sizeof buf, &bsize, _val, args );
-    if ( rc == 0 )
-    {
-        /* get length of buf */
-        size_t blen = string_len ( buf, bsize );
-
-        /* init value */
-        StringInit ( & value, buf, bsize, ( uint32_t ) blen );
-
-        rc = KClientHttpAddHeaderString ( hdrs, add, & name, & value );
-    }
-
-    return rc;
-}
-
-static
-rc_t KClientHttpAddHeader
-( BSTree *hdrs, const char *name, const char *val, ... )
-{
-    rc_t rc;
-    va_list args;
-    va_start ( args, val );
-    rc = KClientHttpVAddHeader ( hdrs, true, name, val, args );
-    va_end ( args );
-    return rc;
-}
-
-static
-rc_t KClientHttpReplaceHeader
-( BSTree *hdrs, const char *name, const char *val, ... )
-{
-    rc_t rc;
-    va_list args;
-    va_start ( args, val );
-    rc = KClientHttpVAddHeader ( hdrs, false, name, val, args );
-    va_end ( args );
-    return rc;
-}
-
-/* Capture each header line to add to BSTree */
-static
-rc_t KClientHttpGetHeaderLine ( KClientHttp *self, timeout_t *tm, BSTree *hdrs,
-    bool * blank, bool * len_zero, bool * close_connection )
-{
-    /* Starting from the second line of the response */
-    rc_t rc = KClientHttpGetLine ( self, tm );
-    if ( rc == 0 )
-    {
-        /* blank = empty line_buffer = separation between headers and body of response */
-        if ( self -> line_valid == 0 )
-            * blank = true;
-        else
-        {
-            char * sep;
-            char * buffer = self -> line_buffer . base;
-            char * end = buffer + self -> line_valid;
-
-            DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS), ("HTTP receive '%s'\n", buffer));
-
-            /* find the separation between name: value */
-            sep = string_chr ( buffer, end - buffer, ':' );
-            if ( sep == NULL )
-            {
-                rc = RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcNotFound );
-                TRACE ( "badly formed header: '%.*s'\n", ( int ) ( end - buffer ), buffer );
-            }
-            else
-            {
-                String name, value;
-                const char * last = sep;
-                
-                /* trim white space around name */
-                while ( buffer < last && isspace ( buffer [ 0 ] ) )
-                    ++ buffer;
-                while ( buffer < last && isspace ( last [ -1 ] ) )
-                    -- last;
-
-                /* assign the name data into the name string */
-                StringInit ( & name, buffer, last - buffer, ( uint32_t ) ( last - buffer ) );
-                
-                /* move the buffer forward to value */
-                buffer = sep + 1;
-                last = end;
-                
-                /* trim white space around value */
-                while ( buffer < last && isspace ( buffer [ 0 ] ) )
-                    ++ buffer;
-                while ( buffer < last && isspace ( last [ -1 ] ) )
-                    -- last;
-
-                /* assign the value data into the value string */
-                StringInit ( & value, buffer, last - buffer, ( uint32_t ) ( last - buffer ) );
-
-                switch ( name . size )
-                {
-                case sizeof "Connection" - 1:
-                    if ( value . size == sizeof "close" - 1 )
-                    {
-                        if ( tolower ( name . addr [ 0 ] ) == 'c' && tolower ( value . addr [ 0 ] ) == 'c' )
-                        {
-                            if ( strcase_cmp ( name . addr, name . size, "Connection", name . size, ( uint32_t ) name . size ) == 0 &&
-                                 strcase_cmp ( value . addr, value . size, "close", value . size, ( uint32_t ) value . size ) == 0 )
-                            {
-                                DBGMSG(DBG_VFS, DBG_FLAG(DBG_VFS),
-                                       ("*** seen connection close ***\n"));
-                                * close_connection = true;
-                            }
-                        }
-                    }
-                    break;
-                case sizeof "Content-Length" - 1:
-                    if ( value . size == sizeof "0" - 1 )
-                    {
-                        if ( tolower ( name . addr [ 0 ] ) == 'c' && value . addr [ 0 ] == '0' )
-                        {
-                            if ( strcase_cmp ( name . addr, name . size, "Content-Length", name . size, ( uint32_t ) name . size ) == 0 )
-                            {
-                                * len_zero = true;
-                            }
-                        }
-                    }
-                    break;
-                }
-                
-                rc = KClientHttpAddHeaderString
-                    ( hdrs, true, & name, & value );
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* Locate a KhttpHeader obj in BSTree */
-static
-rc_t KClientHttpFindHeader ( const BSTree *hdrs, const char *_name, char *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc = 0;
-    String name;
-    KHttpHeader * node;
-
-    StringInitCString ( &name, _name );
-
-    /* find the header */
-    node = ( KHttpHeader * ) BSTreeFind ( hdrs, &name, KHttpHeaderCmp );
-    if ( node == NULL )
-    {
-        rc = SILENT_RC ( rcNS, rcTree, rcSearching, rcName, rcNotFound );
-    }
-    else
-    {
-        /* make sure buffer is large enough */
-        if ( bsize < node -> value . size )
-        {
-            /* return the amount needed */
-            * num_read = node -> value . size;
-            
-            return RC ( rcNS, rcNoTarg, rcParsing, rcParam, rcInsufficient );
-        }
-        
-        /* copy data and return the num_read */
-        * num_read = string_copy ( buffer, bsize, node -> value . addr, node -> value . size );
-    }
-    return rc;
-}
-
-rc_t KClientHttpGetStatusLine ( KClientHttp *self, timeout_t *tm, String *msg, uint32_t *status, ver_t *version )
-{
-    /* First time reading the response */
-    rc_t rc = KClientHttpGetLine ( self, tm );
-
-    if (rc == 0 && self->line_valid == 0) {
-        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_ERR), (
-"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@2 %s empty HttpStatusLine @@@@@@@@@@@@@@@@"
-            "\n", __FILE__));
-        rc = RC(rcNS, rcNoTarg, rcReading, rcNoObj, rcIncomplete);
-    }
-
-    if ( rc == 0 )
-    {
-        char * sep;
-        char * buffer = self -> line_buffer . base;
-        char * end = buffer + self -> line_valid;
-
-        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS), ("HTTP receive '%s'\n", buffer));
-
-        /* Detect protocol
-           expect HTTP/1.[01]<sp><digit>+<sp><msg>\r\n */
-        sep = string_chr ( buffer, end - buffer, '/' );
-        if ( sep == NULL )
-        {
-            rc = RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcNotFound );
-            TRACE ( "badly formed status line: '%.*s'\n", ( int ) ( end - buffer ), buffer );
-        }
-        else
-        {
-            /* make sure it is http */
-            if ( strcase_cmp ( "http", 4, buffer, sep - buffer, 4 ) != 0 )
-                rc = RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcUnsupported );
-            else
-            {
-                /* move buffer up to version */
-                buffer = sep + 1;
-
-                /* find end of version */
-                sep = string_chr ( buffer, end - buffer, ' ' );
-                if ( sep == NULL )
-                {
-                    rc = RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcNotFound );
-                    TRACE ( "badly formed HTTP version: '%.*s'\n", ( int ) ( end - buffer ), buffer );
-                }
-                else
-                {
-                    /* must be 1.0 or 1.1 */
-                    if ( ( string_cmp ( "1.0", 3, buffer, sep - buffer, 3 ) != 0 ) &&
-                         ( string_cmp ( "1.1", 3, buffer, sep - buffer, 3 ) != 0 ) )
-                        rc = RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcUnsupported );
-                    else
-                    {
-                        /* which version was returned? */
-                        * version = string_cmp ( "1.0", 3, buffer, sep - buffer, -1 ) == 0 ? 0x01000000 : 0x01010000;
-                        
-                        /* move up to status code */
-                        buffer = sep + 1;
-
-                        /* record status as uint32 
-                         sep should point to 1 byte after end of status text */
-                        * status = strtou32 ( buffer, & sep, 10 );
-
-                        /* if at the end of buffer or sep didnt land on a space - error */
-                        if ( sep == buffer || * sep != ' ' )
-                        {
-                            rc = RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcNotFound );
-                            TRACE ( "badly formed HTTP version: '%.*s': numeral ends on '%c'\n", ( int ) ( end - buffer ), buffer, ( sep == buffer ) ? 0 : * sep );
-                        }
-                        else
-                        {
-                            /* move up to status msg */
-                            buffer = sep + 1;
-
-                            /* initialize the msg String with the proper size and length */
-                            StringInit ( msg, buffer, end - buffer, ( uint32_t ) ( end - buffer ) );
-                        }
-                    }
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-/*--------------------------------------------------------------------------
- * ClientHttpStream
- *  structure that represents the body of the response
- */
-struct KClientHttpStream
-{
-    KStream dad;
-    
-    /* content_length is the size of the chunk
-       total_read is the number of read from the chunk */
-    uint64_t content_length;
-    uint64_t total_read;
-
-    KClientHttp * http;
-
-    uint8_t state; /* keeps track of state for chunked reader */
-    bool size_unknown; /* for HTTP/1.0 dynamic */
-};
-
-enum 
-{
-    end_chunk,
-    new_chunk,
-    within_chunk,
-    end_stream,
-    error_state
-};
-
-static
-rc_t CC KClientHttpStreamWhack ( KClientHttpStream *self )
-{
-    KClientHttpRelease ( self -> http );
-    free ( self );
-    return 0;
-}
-
-/* Read from stream - either not chunked or within a chunk */
-static
-rc_t CC KClientHttpStreamTimedRead ( const KClientHttpStream *cself,
-    void *buffer, size_t bsize, size_t *num_read, struct timeout_t *tm )
-{
-    rc_t rc;
-    KClientHttpStream *self = ( KClientHttpStream * ) cself;
-    KClientHttp *http = self -> http;
-
-    /* minimum of bytes requested and bytes available in stream */
-    uint64_t num_to_read = self -> content_length - self -> total_read;
-
-    /* take the minimum of bytes avail or bytes requested */
-    if ( self -> size_unknown || bsize < num_to_read )
-        num_to_read = bsize;
-
-    /* Should be 0 because nothing has been read. Caller
-       sets its to 0 */
-    assert ( * num_read == 0 );
-    /* exit if there is nothing to read */
-    if ( num_to_read == 0 )
-        return 0;
-
-    /* read directly from stream 
-       check if the buffer is empty */
-    if ( KClientHttpBlockBufferIsEmpty ( http ) )
-    {
-        /* ReadAll blocks for 1.1. Server will drop the connection */
-        rc =  KStreamTimedRead ( http -> sock, buffer, num_to_read, num_read, tm );
-        if ( rc != 0 )
-        {
-            /* handle dropped connection - may want to reestablish */
-            KClientHttpClose ( http );
-
-            /* LOOK FOR DROPPED CONNECTION && SIZE UNKNOWN - HTTP/1.0 DYNAMIC CASE */
-            if ( self -> size_unknown )
-                rc = 0;
-        }
-
-        /* if nothing was read - end of stream */
-        else if ( * num_read == 0 )
-        {
-            KClientHttpClose ( http );
-
-            /* if the size was known, it is an incomplete transfer */
-            if ( ! self -> size_unknown )
-                rc = RC ( rcNS, rcNoTarg, rcTransfer, rcNoObj, rcIncomplete);
-        }
-    }
-    else
-    {
-        char *buf;
-
-        /* bytes available in buffer */
-        uint64_t bytes_in_buffer = http -> block_valid - http -> block_read;
-
-        /* take the minimum of bytes avail or bytes requested */
-        if ( num_to_read > bytes_in_buffer )
-            num_to_read = bytes_in_buffer;
-
-        /* capture base pointer */
-        buf = http -> block_buffer . base;
-
-        /* copy data into the user buffer from the offset of bytes not yet read */
-        memcpy ( buffer, & buf [ http -> block_read ], num_to_read );
-
-        /* update the amount read */
-        http -> block_read += num_to_read;
-
-        /* return how much was read */
-        * num_read = num_to_read;
-
-        rc = 0;
-    }
-
-    /* update the total from the stream
-       keep track of total bytes read within the chunk */
-    self -> total_read += * num_read;
-
-    return rc;
-}
-
-static
-rc_t CC KClientHttpStreamRead ( const KClientHttpStream *self,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    return KClientHttpStreamTimedRead ( self, buffer, bsize, num_read, NULL );
-}
-
-/* Uses a state machine*/
-static
-rc_t CC KClientHttpStreamTimedReadChunked ( const KClientHttpStream *cself,
-    void *buffer, size_t bsize, size_t *num_read, timeout_t *tm )
-{
-    rc_t rc;
-    char * sep;
-    KClientHttpStream *self = ( KClientHttpStream * ) cself;
-    KClientHttp * http = self -> http;
-
-    assert ( * num_read == 0 );
-
-    switch ( self -> state )
-    {
-    case end_chunk:
-        rc = KClientHttpGetLine ( http, tm );
-        if ( rc != 0 )
-        {
-            self -> state = error_state;
-            break;
-        }
-
-        /* this should be the CRLF following chunk */
-        if ( http -> line_valid != 0 )
-        {
-            KClientHttpClose ( http );
-            rc = RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcIncorrect);
-            self -> state = error_state;
-            break;
-        }
-
-        self -> state = new_chunk;
-
-        /* NO BREAK */
-
-        /* start */
-    case new_chunk:
-
-        /* Get chunk size */
-        rc = KClientHttpGetLine ( http, tm );
-        if ( rc != 0 )
-        {
-            self -> state = error_state;
-            break;
-        }
-
-        /* convert the hex number containing chunk size to uint64 
-           sep should be pointing at nul byte */
-        self -> content_length = strtou64 ( http -> line_buffer . base, & sep, 16 );
-
-        /* TBD - eat spaces here? */
-        /* check if there was no hex number, or sep isn't pointing to nul byte */
-        if ( sep == http -> line_buffer . base || ( * sep != 0 && * sep != ';' ) )
-        {
-            KClientHttpClose ( http );
-            rc = RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcIncorrect);
-            self -> state = error_state;
-            break;
-        }
-
-        /* check for end of stream */
-        if ( self -> content_length == 0 )
-        {
-            self -> state = end_stream;
-            return 0;
-        }
-
-        /* havent read anything - start at 0 */
-        self -> total_read = 0;
-
-        /* now within a chunk */
-        self -> state = within_chunk;
-
-        /* NO BREAK */
-
-    case within_chunk: 
-        /* start reading */
-        rc = KClientHttpStreamRead ( self, buffer, bsize, num_read );
-        if ( rc != 0 )
-            self -> state = error_state;
-        /* incomplete if nothing to read */
-        else if ( * num_read == 0 )
-        {
-            KClientHttpClose ( http );
-            rc = RC ( rcNS, rcNoTarg, rcTransfer, rcNoObj, rcIncomplete);
-            self -> state = error_state;
-        }
-        /* check for end of chunk */
-        else if ( self -> total_read == self -> content_length )
-            self -> state = end_chunk;
-        break;
-
-    case end_stream:
-        return 0;
-
-    case error_state:
-        rc = RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcIncorrect );
-        break;
-
-    default:
-        /* internal error */
-        rc = RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcError );
-    }
-
-    return rc;
-}
-
-static
-rc_t CC KClientHttpStreamReadChunked ( const KClientHttpStream *self,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    return KClientHttpStreamTimedReadChunked ( self, buffer, bsize, num_read, NULL );
-}
-
-/* cannot write - for now */
-static
-rc_t CC KClientHttpStreamTimedWrite ( KClientHttpStream *self,
-    const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm )
-{
-    return RC ( rcNS, rcNoTarg, rcWriting, rcFunction, rcUnsupported );
-}
-
-static
-rc_t CC KClientHttpStreamWrite ( KClientHttpStream *self,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    return RC ( rcNS, rcNoTarg, rcWriting, rcFunction, rcUnsupported );
-}
-
-static KStream_vt_v1 vtKClientHttpStream = 
-{
-    1, 1,
-    KClientHttpStreamWhack,
-    KClientHttpStreamRead,
-    KClientHttpStreamWrite,
-    KClientHttpStreamTimedRead,
-    KClientHttpStreamTimedWrite
-};
-
-static KStream_vt_v1 vtKClientHttpStreamChunked =
-{
-    1, 1,
-    KClientHttpStreamWhack,
-    KClientHttpStreamReadChunked,
-    KClientHttpStreamWrite,
-    KClientHttpStreamTimedReadChunked,
-    KClientHttpStreamTimedWrite
-};
-
-/* Make a KClientHttpStream object */
-static
-rc_t KClientHttpStreamMake ( KClientHttp *self, KStream **sp, const char *strname, size_t content_length, bool size_unknown )
-{
-    rc_t rc;
-    KClientHttpStream *s = calloc ( 1, sizeof * s );
-    if ( s == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        rc = KStreamInit ( & s -> dad, ( const KStream_vt * ) & vtKClientHttpStream, 
-                           "KClientHttpStream", strname, true, false );
-        if ( rc == 0 )
-        {                                       
-            rc = KClientHttpAddRef ( self );
-            if ( rc == 0 )
-            {
-                s -> http = self;
-                s -> content_length = content_length;
-                s -> size_unknown = size_unknown;
-                *sp = & s -> dad;
-                return 0;
-            }
-        }
-        free ( s );
-    }
-    *sp = NULL;
-
-    return rc;
-}
-
-static
-rc_t KClientHttpStreamMakeChunked ( KClientHttp *self, KStream **sp, const char *strname )
-{
-    rc_t rc;
-    KClientHttpStream *s = calloc ( 1, sizeof * s );
-    if ( s == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        rc = KStreamInit ( & s -> dad, ( const KStream_vt * ) & vtKClientHttpStreamChunked, 
-                           "KClientHttpStreamChunked", strname, true, false );
-        if ( rc == 0 )
-        {
-            rc = KClientHttpAddRef ( self );
-            if ( rc == 0 )
-            {
-                s -> http = self;
-
-                /* state should be new_chunk */
-                s -> state = new_chunk;
-
-                *sp = & s -> dad;
-                return 0;
-            }
-        }
-        free ( s );
-    }
-    *sp = NULL;
-
-    return rc;
-}
-
-/*--------------------------------------------------------------------------
- * KClientHttpResult
- *  hyper text transfer protocol
- *  Holds all the headers in a BSTree
- *  Records the status msg, status code and version of the response 
- */
-struct KClientHttpResult
-{
-    KClientHttp *http;
-    
-    BSTree hdrs;
-    
-    String msg;
-    uint32_t status;
-    ver_t version;
-
-    KRefcount refcount;
-    bool len_zero;
-    bool close_connection;
-};
-
-static
-rc_t KClientHttpResultWhack ( KClientHttpResult * self )
-{
-    BSTreeWhack ( & self -> hdrs, KHttpHeaderWhack, NULL );
-    if ( self -> close_connection )
-    {
-        DBGMSG(DBG_VFS, DBG_FLAG(DBG_VFS),
-            ("*** closing connection ***\n"));
-        KClientHttpClose ( self -> http );
-    }
-    KClientHttpRelease ( self -> http );
-    KRefcountWhack ( & self -> refcount, "KClientHttpResult" );
-    free ( self );
-    return 0;
-}
-
-
-/* Sends the request and receives the response into a KClientHttpResult obj */
-static 
-rc_t KClientHttpSendReceiveMsg ( KClientHttp *self, KClientHttpResult **rslt,
-    const char *buffer, size_t len, const KDataBuffer *body, const char *url )
-{
-    rc_t rc = 0;
-    size_t sent;
-    timeout_t tm;
-    uint32_t status;
-
-    /* TBD - may want to assert that there is an empty line in "buffer" */
-#if _DEBUGGING
-    if ( KNSManagerIsVerbose ( self -> mgr ) )
-        KOutMsg ( "KClientHttpSendReceiveMsg: '%.*s'\n", len, buffer );
-#endif
-    DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS),
-        ("HTTP send '%S' '%.*s'\n\n", &self->hostname, len, buffer));
-
-    /* reopen connection if NULL */
-    if ( self -> sock == NULL )
-        rc = KClientHttpOpen ( self, & self -> hostname, self -> port );
-
-    /* ALWAYS want to use write all when sending */
-    if ( rc == 0 )
-    {
-        TimeoutInit ( & tm, self -> write_timeout );
-        rc = KStreamTimedWriteAll ( self -> sock, buffer, len, & sent, & tm ); 
-        if ( rc != 0 )
-        {
-            rc_t rc2 = KClientHttpReopen ( self );
-            if ( rc2 == 0 )
-            {
-                TimeoutInit ( & tm, self -> write_timeout );
-                rc2 = KStreamTimedWriteAll ( self -> sock, buffer, len, & sent, & tm );
-                if ( rc2 == 0 )
-                    rc = 0;
-            }
-        }
-    }
-
-    /* check the data was completely sent */
-    if ( rc == 0 && sent != len )
-    {
-        rc = RC ( rcNS, rcNoTarg, rcWriting, rcTransfer, rcIncomplete );
-        KClientHttpClose ( self );
-    }
-    if ( rc == 0 && body != NULL  && body -> elem_count > 0 )
-    {
-        /* "body" contains bytes plus trailing NUL */
-        size_t to_send = ( size_t ) body -> elem_count - 1;
-        rc = KStreamTimedWriteAll ( self -> sock, body -> base, to_send, & sent, & tm );
-        if ( rc == 0 && sent != to_send )
-        {
-            rc = RC ( rcNS, rcNoTarg, rcWriting, rcTransfer, rcIncomplete );
-            KClientHttpClose ( self );
-        }
-    }
-
-    for ( status = 100; rc == 0 && status == 100; )
-    {
-        String msg;
-        ver_t version;
-
-        /* reinitialize the timeout for reading */
-        TimeoutInit ( & tm, self -> read_timeout );
-
-        /* we have now received a response 
-           start reading the header lines */
-        rc = KClientHttpGetStatusLine ( self, & tm, & msg, & status, & version );
-        if ( rc == 0 )
-        {
-            /* create a result object with enough space for msg string + nul */
-            KClientHttpResult *result = malloc ( sizeof * result + msg . size + 1 );
-            if ( result == NULL )
-                rc = RC ( rcNS, rcNoTarg, rcAllocating, rcMemory, rcExhausted );
-            else
-            {
-                /* zero out */
-                memset ( result, 0, sizeof * result );
-                
-                rc = KClientHttpAddRef ( self );
-                if ( rc == 0 )
-                {
-                    bool blank;
-
-                    /* treat excess allocation memory as text space */
-                    char *text = ( char* ) ( result + 1 );
-
-                    /* copy in the data to the text space */
-                    string_copy ( text, msg . size + 1, msg . addr, msg . size );
-
-                    /* initialize the result members
-                       "hdrs" is initialized via "memset" above
-                     */
-                    result -> http = self;
-                    result -> status = status;
-                    result -> version = version;
-
-                    /* correlate msg string in result to the text space */
-                    StringInit ( & result -> msg, text, msg . size, msg . len );
-
-                    /* TBD - pass in URL as instance identifier */
-                    KRefcountInit ( & result -> refcount, 1, "KClientHttpResult", "sending-msg", url );
-
-                    /* receive and parse all header lines 
-                       blank = end of headers */
-                    for ( blank = false; ! blank && rc == 0; )
-                    {
-                        rc = KClientHttpGetHeaderLine ( self, & tm, & result -> hdrs,
-                            & blank, & result -> len_zero, & result -> close_connection );
-                    }
-
-                    if ( rc == 0 && status != 100 )
-                    {
-                        /* assign to OUT result obj */
-                        * rslt = result;
-                        return 0; 
-                    }
-
-                    BSTreeWhack ( & result -> hdrs, KHttpHeaderWhack, NULL );
-                }
-
-                KClientHttpRelease ( self );
-            }
-
-            free ( result );
-        }
-    }
-
-    return rc;
-}
-
-/* test */
-void KClientHttpForceSocketClose(const KClientHttp *self)
-{
-    KStreamForceSocketClose(self->sock);
-}
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KClientHttpResultAddRef ( const KClientHttpResult *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KClientHttpResult" ) )
-        {
-        case krefLimit:
-            return RC ( rcNS, rcNoTarg, rcAttaching, rcRange, rcExcessive );
-        case krefNegative:
-            return RC ( rcNS, rcNoTarg, rcAttaching, rcSelf, rcInvalid );
-        default:
-            break;
-        }
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KClientHttpResultRelease ( const KClientHttpResult *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KClientHttpResult" ) )
-        {
-        case krefWhack:
-            return KClientHttpResultWhack ( ( KClientHttpResult* ) self );
-        case krefNegative:
-            return RC ( rcNS, rcNoTarg, rcReleasing, rcRange, rcExcessive );
-        default:
-            break;
-        }
-    }
-
-    return 0;
-}
-
-
-/* Status
- *  access the response status code
- *  and optionally the message
- *
- *  "code" [ OUT ] - return parameter for status code
- *
- *  "msg_buff" [ IN, NULL OKAY ] and "buff_size" [ IN, ZERO OKAY ] -
- *   buffer for capturing returned message. if "msg_buff" is not
- *   NULL and "buff_size" is insufficient for copying status message,
- *   the message returns rcBuffer, rcInsufficient.
- *
- *  "msg_size" [ OUT, NULL OKAY ] - size of returned message in bytes.
- *   if not NULL, returns the size of status message. if "msg_buff" is
- *   NULL, returns rcBuffer, rcNull.
- */
-LIB_EXPORT rc_t CC KClientHttpResultStatus ( const KClientHttpResult *self, uint32_t *code,
-    char *msg_buff, size_t buff_size, size_t *msg_size )
-{
-    rc_t rc;
-
-    /* check OUT parameters */
-    if ( code == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcNull );
-    else
-    {
-        /* IN parameters */
-        if ( self == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcSelf, rcNull );
-        else
-        {
-            /* capture the status code to OUT param */
-            * code = self -> status;
-            rc = 0;
-
-            /* if asking about msg size */
-            if ( msg_size != NULL )
-            {
-                /* capture the msg size */
-                * msg_size = self -> msg . size;
-
-                /* catch NULL buffer pointer */
-                if ( msg_buff == NULL )
-                    rc = RC ( rcNS, rcNoTarg, rcValidating, rcBuffer, rcNull );
-            }
-
-            /* if they apparently want the message */
-            if ( msg_buff != NULL )
-            {
-                /* check for an insufficient buffer size */
-                if ( buff_size < self -> msg . size )
-                    rc = RC ( rcNS, rcNoTarg, rcValidating, rcBuffer, rcInsufficient );
-                else
-                    /* copy out the message */
-                    string_copy ( msg_buff, buff_size, self -> msg . addr, self -> msg . size );
-            }
-
-            return rc;
-        }
-
-        * code = 0;
-    }
-
-    return rc;
-}
-
-
-/* KeepAlive
- *  retrieves keep-alive property of response
- */
-LIB_EXPORT bool CC KClientHttpResultKeepAlive ( const KClientHttpResult *self )
-{
-    rc_t rc;
-
-    if ( self != NULL )
-    {
-        /* we're requiring version 1.1 -
-           some 1.0 servers also supported it... */
-        if ( self -> version == 0x01010000 )
-        {
-            size_t num_writ;
-            char buffer [ 1024 ];
-            size_t bsize = sizeof buffer;
-
-            /* retreive the node that has the keep-alive property */
-            rc = KClientHttpResultGetHeader ( self, "Connection", buffer, bsize, & num_writ );
-            if ( rc == 0 )
-            {
-                String keep_alive, compare;
-
-                /* init strings */
-                StringInitCString ( & keep_alive, buffer );
-                CONST_STRING ( & compare, "keep-alive" );
-
-                /* compare strings for property value */
-                if ( StringCaseCompare ( & keep_alive, & compare ) == 0 )
-                    return true;
-            }
-        }
-    }
-    return false;
-}
-
-
-/* Range
- *  retrieves position and partial size for partial requests
- *
- *  "pos" [ OUT ] - offset to beginning portion of response
- *
- *  "bytes" [ OUT ] - size of range
- *
- *  HERE WE NEED TO HAVE PASSED THE RANGE REQUEST TO THE RESULT ON CREATION,
- *  AND WE WILL RESPOND TO THE HTTP "PARTIAL RESULT" OR WHATEVER RETURN CODE,
- *  AND BASICALLY UPDATE WHAT THE RANGE WAS.
- */
-static
-rc_t KClientHttpResultHandleContentRange ( const KClientHttpResult *self, uint64_t *pos, size_t *bytes )
-{
-    rc_t rc;
-    size_t num_read;
-    char buffer [ 1024 ];
-    const size_t bsize = sizeof buffer;
-
-    /* get Content-Range
-     *  expect: "bytes <first-position>-<last-position>/<total-size>"
-     */
-    rc = KClientHttpResultGetHeader ( self, "Content-Range", buffer, bsize, & num_read );
-    if ( rc == 0 )
-    {
-        char * sep;
-        char *buf = buffer;
-        const char *end = & buffer [ num_read ];
-
-        /* look for separation of 'bytes' and first position */
-        sep = string_chr ( buf, end - buf, ' ' );
-        if ( sep == NULL )
-        {
-            rc = RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcNotFound );
-            TRACE ( "badly formed Content-Range header: '%.*s': lacks a space separator\n", ( int ) ( end - buffer ), buffer );
-        }
-        else
-        {
-            uint64_t start_pos;
-                        
-            /* buf now points to value */
-            buf = sep + 1;
-
-            /* capture starting position 
-               sep should land on '-' */
-            start_pos = strtou64 ( buf, & sep, 10 );
-
-            /* check if we didnt read anything or sep didnt land on '-' */
-            if ( sep == buf || * sep != '-' )
-            {
-                rc =  RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcNotFound );
-                TRACE ( "badly formed Content-Range header: '%.*s': numeral ends on '%c'\n", ( int ) ( end - buffer ), buffer, ( sep == buffer ) ? 0 : * sep );
-            }
-            else
-            {
-                uint64_t end_pos;
-
-                buf = sep + 1;
-                end_pos = strtou64 ( buf, & sep, 10 );
-                if ( sep == buf || * sep != '/' )
-                {
-                    rc =  RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcNotFound );
-                    TRACE ( "badly formed Content-Range header: '%.*s': numeral ends on '%c'\n", ( int ) ( end - buffer ), buffer, ( sep == buffer ) ? 0 : * sep );
-                }
-                else
-                {
-                    uint64_t total;
-
-                    buf = sep +1;
-                    total = strtou64 ( buf, &sep, 10 );
-                    if ( sep == buf || * sep != 0 )
-                    {
-                        rc =  RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcNotFound );
-                        TRACE ( "badly formed Content-Range header: '%.*s': numeral ends on '%c'\n", ( int ) ( end - buffer ), buffer, ( sep == buffer ) ? 0 : * sep );
-                    }
-                    else
-                    {
-                        /* check variables */
-                        if ( total == 0 ||
-                             start_pos > total ||
-                             end_pos < start_pos ||
-                             end_pos > total )
-                        {
-                            rc = RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcNotFound );
-                            TRACE ( "badly formed Content-Range header: total=%lu, start_pos=%lu, end_pos=%lu\n", total, start_pos, end_pos );
-                            if ( total == 0 )
-                                TRACE ( "badly formed Content-Range header: total==0 : ERROR%c", '\n' );
-                            if ( start_pos > total )
-                                TRACE ( "badly formed Content-Range header: start_pos=%lu > total=%lu : ERROR\n", start_pos, total );
-                            if ( end_pos < start_pos )
-                                TRACE ( "badly formed Content-Range header: end_pos=%lu < start_pos=%lu : ERROR\n", end_pos, start_pos );
-                            if ( end_pos > total )
-                                TRACE ( "badly formed Content-Range header: end_pos=%lu > total=%lu : ERROR\n", end_pos, total );
-                        }
-                        else
-                        {
-                            uint64_t length;
-                                        
-                            /* get content-length to confirm bytes sent */
-                            rc = KClientHttpResultGetHeader ( self, "Content-Length", buffer, bsize, & num_read );
-                            if ( rc != 0 )
-                            {
-                                            
-                                /* remember that we can have chunked encoding,
-                                   so "Content-Length" may not exist. */
-                                * pos = start_pos;
-                                * bytes = end_pos - start_pos + 1; 
-                                            
-                                return 0;
-                            }
-
-                            buf = buffer;
-                            end = & buffer [ num_read ];
-                                            
-                            /* capture the length */
-                            length  = strtou64 ( buf, & sep, 10 );
-                            if ( sep == buf || * sep != 0 )
-                            {
-                                rc =  RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcNotFound );
-                                TRACE ( "badly formed Content-Length header: '%.*s': numeral ends on '%c'\n", ( int ) ( end - buffer ), buffer, ( sep == buffer ) ? 0 : * sep );
-                            }                                
-                            else 
-                            {
-                                /* finally check all the acquired information */
-                                if ( ( length != ( ( end_pos - start_pos ) + 1 ) ) ||
-                                     ( length > total ) )
-                                {
-                                    rc = RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcNotFound );
-                                    TRACE ( "badly formed Content-Length header: length=%lu, range_len=%lu, total=%lu\n", length, ( end_pos - start_pos ) + 1, total );
-                                    if ( length != ( end_pos - start_pos ) + 1 )
-                                        TRACE ( "badly formed Content-Length header: length=%lu != 0 : ERROR\n", length );
-                                    if ( start_pos > total )
-                                        TRACE ( "badly formed Content-Length header: start_pos=%lu > range_len=%lu : ERROR\n", length, ( end_pos - start_pos ) + 1 );
-                                    if ( length > total )
-                                        TRACE ( "badly formed Content-Length header: length=%lu > total=%lu : ERROR\n", length, total );
-                                }
-                                else
-                                {
-                                    /* assign to OUT params */
-                                    * pos = start_pos;
-                                    * bytes = length; 
-                                                    
-                                    return 0;
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KClientHttpResultRange ( const KClientHttpResult *self, uint64_t *pos, size_t *bytes )
-{
-    rc_t rc;
-
-    if ( pos ==  NULL || bytes == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcNull );
-    else if ( self == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcSelf, rcNull );
-    else
-    {
-        switch ( self -> status )
-        {
-        case 206:
-            /* partial content */
-            rc = KClientHttpResultHandleContentRange ( self, pos, bytes );
-            if ( rc == 0 )
-                return 0;
-
-        case 416:
-            /* unsatisfiable range */
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcError, rcIncorrect );
-            break;
-
-        default:
-            /* codes not handling right now */
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcError, rcUnsupported );
-        }
-    }
-
-    if ( pos != NULL )
-        * pos = 0;
-    if ( bytes != NULL )
-        * bytes = 0;
-
-    return rc;
-}
-
-
-/* Size
- *  retrieves overall size of entity, if known
- *
- *  "size" [ OUT ] - size in bytes of response
- *   this is the number of bytes that may be expected from the input stream
- *
- */
-LIB_EXPORT bool CC KClientHttpResultSize ( const KClientHttpResult *self, uint64_t *size )
-{
-    if ( size != NULL && self != NULL )
-    {
-        rc_t rc;
-        size_t num_read;
-        char buffer [ 1024 ];
-        const size_t bsize = sizeof buffer;
-        
-        /* check for content-length */
-        rc = KClientHttpResultGetHeader ( self, "Content-Length", buffer, bsize, & num_read );
-        if ( rc == 0 )
-        {
-            char * sep;
-            
-            /* capture length as uint64 */
-            uint64_t length = strtou64 ( buffer, & sep, 10 );
-            if ( sep == buffer || * sep != 0 )
-            {
-                rc =  RC ( rcNS, rcNoTarg, rcParsing, rcNoObj, rcNotFound );
-                TRACE ( "badly formed Content-Length header: '%.*s': numeral ends on '%c'\n", ( int ) num_read, buffer, ( sep == buffer ) ? 0 : * sep );
-            }
-            else
-            {
-                /* assign to OUT param */
-                * size = length;
-                return true;
-            }
-        }
-    }
-    return false;
-}
-
-/* AddHeader
- *  allow addition of an arbitrary HTTP header to RESPONSE
- *  this can be used to repair or normalize odd server behavior
- *
- */
-LIB_EXPORT rc_t CC KClientHttpResultAddHeader ( KClientHttpResult *self,
-    const char *name, const char *val, ... )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcSelf, rcNull );
-    else if ( name == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcNull );
-    /* have to test for empty name */
-    else if ( name [ 0 ] == 0 )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcInsufficient );
-    else if ( val == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcNull );
-    /* same for empty value fmt string */
-    else if ( val [ 0 ] == 0 )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcInsufficient );
-    else
-    {
-        va_list args;
-        va_start ( args, val );
-        
-        rc = KClientHttpVAddHeader ( & self -> hdrs, false, name, val, args );
-        
-        va_end ( args );
-    }
-    return rc;
-}
-
-
-/* GetHeader
- *  retrieve named header if present
- *  this cand potentially return a comma separated value list
- */
-LIB_EXPORT rc_t CC KClientHttpResultGetHeader ( const KClientHttpResult *self, const char *name,
-    char *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc = 0;
-
-    if ( num_read == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcNull );
-    else
-    {
-        * num_read = 0;
-
-        if ( self == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcSelf, rcNull );
-        else if ( name == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcNull );
-        else if ( buffer == NULL && bsize != 0 )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcNull );
-        else
-        {
-            rc = KClientHttpFindHeader ( & self -> hdrs, name, buffer, bsize, num_read );
-        }
-    }
-
-    return rc;
-}
-
-#if _DEBUGGING
-static
-void PrintHeaders ( BSTNode *n, void *ignore )
-{
-    KHttpHeader *node = ( KHttpHeader * ) n;
-
-    KOutMsg ( "%S: %S\n",
-              & node -> name,
-              & node -> value );
-}
-#endif
-
-/* GetInputStream
- *  access the body of response as a stream
- *  only reads are supported
- *
- *  "s" [ OUT ] - return parameter for input stream reference
- *   must be released via KStreamRelease
- */
-LIB_EXPORT rc_t CC KClientHttpResultGetInputStream ( KClientHttpResult *self, KStream ** s )
-{
-    rc_t rc;
-    
-    if ( s == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcSelf, rcNull );
-        else
-        {
-            char buffer [ 512 ];
-            size_t num_read = 0;
-            uint64_t content_length = 0;
-
-            /* find header to check for type of data being received 
-               assign bytes read from value to num_read */
-            rc = KClientHttpResultGetHeader ( self, "Transfer-Encoding", buffer, sizeof buffer, & num_read );
-            if ( rc == 0 && num_read > 0 )
-            {
-                /* check if chunked encoding */
-                if ( strcase_cmp ( "chunked", sizeof "chunked" - 1,
-                    buffer, num_read, sizeof "chunked" - 1 ) == 0 )
-                {
-                    return KClientHttpStreamMakeChunked ( self -> http, s, "KClientHttpStreamChunked" );
-                }
-                /* TBD - print actual value */
-                LOGERR ( klogSys, rc, "Transfer-Encoding does not provide a value" );
-
-            }
-            /* get the content length of the entire stream if known */
-            if ( KClientHttpResultSize ( self, & content_length ) )
-                return KClientHttpStreamMake ( self -> http, s, "KClientHttpStream", content_length, false );
-
-            /* detect connection: close or pre-HTTP/1.1 dynamic content */
-            if ( self -> close_connection || self -> version < 0x01010000 )
-                return KClientHttpStreamMake ( self -> http, s, "KClientHttpStream", 0, true );
-
-#if _DEBUGGING
-            KOutMsg ( "HTTP/%.2V %03u %S\n", self -> version, self -> status, & self -> msg );
-            BSTreeForEach ( & self -> hdrs, false, PrintHeaders, NULL );
-#endif            
-
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcMessage, rcUnsupported );
-            LOGERR ( klogInt, rc, "HTTP response does not give content length" ); 
-
-        }
-    }
-    
-    * s = NULL;
-    
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KClientHttpRequest
- *  hyper text transfer protocol
- */
-
-struct KClientHttpRequest
-{
-    KClientHttp * http;
-
-    URLBlock url_block;
-    KDataBuffer url_buffer;
-
-    KDataBuffer body;
-    
-    BSTree hdrs;
-
-    KRefcount refcount;
-    bool accept_not_modified;
-};
-
-static
-rc_t KClientHttpRequestClear ( KClientHttpRequest *self )
-{
-    KDataBufferWhack ( & self -> url_buffer );
-
-    return 0;
-}
-
-static
-rc_t KClientHttpRequestWhack ( KClientHttpRequest * self )
-{
-    KClientHttpRequestClear ( self );
-
-    KClientHttpRelease ( self -> http );
-    KDataBufferWhack ( & self -> body );
-    
-    BSTreeWhack  ( & self -> hdrs, KHttpHeaderWhack, NULL );
-    KRefcountWhack ( & self -> refcount, "KClientHttpRequest" );
-    free ( self );
-    return 0;
-}
-
-static 
-rc_t KClientHttpRequestInit ( KClientHttpRequest * req,
-    const URLBlock *b, const KDataBuffer *buf )
-{
-    rc_t rc = KDataBufferSub ( buf, & req -> url_buffer, 0, UINT64_MAX );
-    if ( rc == 0 )
-    {
-        /* assign url_block */
-        req -> url_block = * b;
-    }
-    return rc;
-}
-        
-
-/* MakeRequestInt[ernal]
- */
-rc_t KClientHttpMakeRequestInt ( const KClientHttp *self,
-    KClientHttpRequest **_req, const URLBlock *block, const KDataBuffer *buf )
-{
-    rc_t rc;
-
-    /* create the object with empty buffer */
-    KClientHttpRequest * req = calloc ( 1, sizeof * req );
-    if ( req == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcAllocating, rcMemory, rcNull );
-    else
-    {
-        rc = KClientHttpAddRef ( self );
-        if ( rc == 0 )
-        {
-            /* assign http */
-            req -> http = ( KClientHttp* ) self; 
-
-            /* initialize body to zero size */
-            KDataBufferClear ( & req -> body );
-                
-            KRefcountInit ( & req -> refcount, 1, "KClientHttpRequest", "make", buf -> base ); 
-
-            /* fill out url_buffer with URL */
-            rc = KClientHttpRequestInit ( req, block, buf );
-            if ( rc == 0 )
-            {
-                * _req = req;
-                return 0;
-            }
-
-            KClientHttpRelease ( self );
-        }
-    }
-    
-    free ( req );
-
-    return rc;
-}
-
-/* MakeRequest
- *  create a request that can be used to contact HTTP server
- *
- *  "req" [ OUT ] - return parameter for HTTP request object
- *
- *  "vers" [ IN ] - http version
- *
- *  "conn" [ IN, NULL OKAY ] - previously opened stream for communications.
- *
- *  "url" [ IN ] - full resource identifier. if "conn" is NULL,
- *   the url is parsed for remote endpoint and is opened by mgr.
- */
-LIB_EXPORT rc_t CC KClientHttpVMakeRequest ( const KClientHttp *self,
-    KClientHttpRequest **_req, const char *url, va_list args )
-{
-    rc_t rc;
-    
-    if ( _req == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcNull );
-    else
-    {
-        * _req = NULL;
-
-        if ( self == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcSelf, rcNull );
-        else if ( url ==  NULL )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcNull );
-        else if ( url [ 0 ] == 0 )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcInsufficient );
-        else
-        {
-            KDataBuffer buf;
-
-            /* make a KDataBuffer and copy in url with the va_lis */
-            /* rc = KDataBufferMakeBytes ( & buf, 4096 );*/
-            KDataBufferClear ( &buf );
-            
-            rc = KDataBufferVPrintf ( &buf, url, args );
-            if ( rc == 0 )
-            {
-                /* parse the URL */
-                URLBlock block;
-                rc = ParseUrl ( & block, buf . base, buf . elem_count - 1 );
-                if ( rc == 0 )
-                    rc = KClientHttpMakeRequestInt ( self, _req, & block, & buf );
-            }
-
-            KDataBufferWhack ( & buf );
-        }
-    }
-
-    return rc;
-}
-
-/* MakeRequest
- *  create a request that can be used to contact HTTP server
- *
- *  "req" [ OUT ] - return parameter for HTTP request object
- *
- *  "url" [ IN ] - full resource identifier. if "conn" is NULL,
- *   the url is parsed for remote endpoint and is opened by mgr.
- */
-LIB_EXPORT rc_t CC KClientHttpMakeRequest ( const KClientHttp *self,
-    KClientHttpRequest **_req, const char *url, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, url );
-    rc = KClientHttpVMakeRequest ( self, _req, url, args );
-    va_end ( args );
-
-    return rc;
-}
-
-/* MakeRequest
- *  create a request that can be used to contact HTTP server
- *
- *  "req" [ OUT ] - return parameter for HTTP request object
- *
- *  "vers" [ IN ] - http version
- *
- *  "conn" [ IN, NULL OKAY ] - previously opened stream for communications.
- *
- *  "url" [ IN ] - full resource identifier. if "conn" is NULL,
- *   the url is parsed for remote endpoint and is opened by mgr.
- */
-static
-rc_t CC KNSManagerMakeClientRequestInt ( const KNSManager *self,
-    KClientHttpRequest **req, ver_t vers, KStream *conn, bool reliable, const char *url, va_list args )
-{
-    rc_t rc;
-
-    if ( req == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcNull );
-    else
-    {
-        * req = NULL;
-
-        if ( self == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcSelf, rcNull );
-        else if ( vers < 0x01000000 || vers > 0x01010000 )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcIncorrect );
-        else if ( url == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcString, rcNull );
-        else if ( url [ 0 ] == 0 )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcString, rcEmpty );
-        else
-        {
-            KDataBuffer buf;
-            
-            KDataBufferClear ( &buf );
-                /* convert var-arg "url" to a full string */
-            rc = KDataBufferVPrintf ( & buf, url, args );
-            if ( rc == 0 )
-            {
-                /* parse the URL */
-                URLBlock block;
-                rc = ParseUrl ( & block, buf . base, buf . elem_count - 1 );
-                if ( rc == 0 )
-                {
-                    KClientHttp * http;
-                    
-                    rc = KNSManagerMakeClientHttpInt ( self, & http, & buf, conn, vers,
-                        self -> http_read_timeout, self -> http_write_timeout, & block . host, block . port, reliable );
-                    if ( rc == 0 )
-                    {
-                        rc = KClientHttpMakeRequestInt ( http, req, & block, & buf );
-                        KClientHttpRelease ( http );
-                    }
-                }
-            }
-            KDataBufferWhack ( & buf );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KNSManagerMakeClientRequest ( const KNSManager *self,
-    KClientHttpRequest **req, ver_t vers, KStream *conn, const char *url, ... )
-{
-    rc_t rc;
-    va_list args;
-    va_start ( args, url );
-    rc = KNSManagerMakeClientRequestInt ( self, req, vers, conn, false, url, args );
-    va_end ( args );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KNSManagerMakeReliableClientRequest ( const KNSManager *self,
-    KClientHttpRequest **req, ver_t vers, KStream *conn, const char *url, ... )
-{
-    rc_t rc;
-    va_list args;
-    va_start ( args, url );
-    rc = KNSManagerMakeClientRequestInt ( self, req, vers, conn, true, url, args );
-    va_end ( args );
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KClientHttpRequestAddRef ( const KClientHttpRequest *self )
-{
-        if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KClientHttpRequest" ) )
-        {
-        case krefLimit:
-            return RC ( rcNS, rcNoTarg, rcAttaching, rcRange, rcExcessive );
-        case krefNegative:
-            return RC ( rcNS, rcNoTarg, rcAttaching, rcSelf, rcInvalid );
-        default:
-            break;
-        }
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KClientHttpRequestRelease ( const KClientHttpRequest *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KClientHttpRequest" ) )
-        {
-        case krefWhack:
-            return KClientHttpRequestWhack ( ( KClientHttpRequest* ) self );
-        case krefNegative:
-            return RC ( rcNS, rcNoTarg, rcReleasing, rcRange, rcExcessive );
-        default:
-            break;
-        }
-    }
-
-    return 0;
-}
-
-
-/* Connection
- *  sets connection management headers
- *
- *  "close" [ IN ] - if "true", inform the server to close the connection
- *   after its response ( default for version 1.0 ). when "false" ( default
- *   for version 1.1 ), ask the server to keep the connection open.
- *
- * NB - the server is not required to honor the request
- */
-LIB_EXPORT rc_t CC KClientHttpRequestConnection ( KClientHttpRequest *self, bool close )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcSelf, rcNull );
-    else
-    {
-        String name, value;
-        
-        CONST_STRING ( & name, "Connection" );
-        /* if version is 1.1 and close is true, add 'close' to Connection header value. */
-        /* if version if 1.1 default is false - no action needed */
-        if ( self -> http -> vers == 0x01010000 && close == true )
-            CONST_STRING ( & value, "close" );
-        else if ( self -> http -> vers == 0x01000000 && close == false )
-            CONST_STRING ( & value, "keep-alive" );
-        else
-            return 0;
-
-        rc = KClientHttpRequestAddHeader ( self,  name . addr, value . addr );
-            
-    }
-    return rc;
-}
-
-
-/* SetNoCache
- *  guard against over-eager proxies that try to cache entire files
- *  and handle byte-ranges locally.
- */
-LIB_EXPORT rc_t CC KClientHttpRequestSetNoCache ( KClientHttpRequest *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcUpdating, rcSelf, rcNull );
-    else
-    {
-        rc = KClientHttpRequestAddHeader ( self, "Cache-Control", "no-cache, no-store, max-age=0, no-transform, must-revalidate" );
-        if ( rc == 0 )
-            rc = KClientHttpRequestAddHeader ( self, "Pragma", "no-cache" );
-        if ( rc == 0 )
-            rc = KClientHttpRequestAddHeader ( self, "Expires", "0" );
-    }
-
-    return rc;
-}
-
-
-/* ByteRange
- *  set requested byte range of response
- *
- *  "pos" [ IN ] - beginning offset within remote entity
- *
- *  "bytes" [ IN ] - the number of bytes being requested
- */
-LIB_EXPORT rc_t CC KClientHttpRequestByteRange ( KClientHttpRequest *self, uint64_t pos, size_t bytes )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcSelf, rcNull);
-    else
-    {
-        char  range [ 256 ];
-        size_t num_writ;
-        String name, value;
-        
-        CONST_STRING ( & name, "Range" );
-        rc = string_printf ( range, sizeof range, & num_writ, "bytes=%lu-%lu"
-                             , pos
-                             , pos + bytes - 1);
-        if ( rc == 0 )
-        {
-            StringInitCString ( & value, range );
-
-            rc = KClientHttpRequestAddHeader ( self, name . addr, value . addr );
-        }
-    }
-    return rc;
-}
-
-
-/* AddHeader
- *  allow addition of an arbitrary HTTP header to message
- */
-LIB_EXPORT rc_t CC KClientHttpRequestAddHeader ( KClientHttpRequest *self,
-    const char *name, const char *val, ... )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcSelf, rcNull);
-    else
-    {
-        if ( name == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcNull );
-        /* have to test for empty name, too */
-        else if ( name [ 0 ] == 0 )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcInsufficient );
-        else if ( val == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcNull );
-        /* same for empty value fmt string */
-        else if ( val [ 0 ] == 0 )
-            rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcInsufficient );
-        else
-        {
-            size_t name_size;
-            bool accept_not_modified;
-
-            va_list args;
-            va_start ( args, val );
-
-            /* disallow setting of "Host" and other headers */
-            name_size = string_size ( name );
-
-#define CSTRLEN( str ) \
-            sizeof ( str ) - 1
-#define NAMEIS( str ) \
-            strcase_cmp ( name, name_size, str, sizeof str, CSTRLEN ( str ) ) == 0
-
-            rc = 0;
-            accept_not_modified = false;
-            
-            switch ( name_size )
-            {
-            case CSTRLEN ( "Host" ):
-                if ( NAMEIS ( "Host" ) )
-                    rc = RC ( rcNS, rcNoTarg, rcComparing, rcParam, rcUnsupported );
-                break;
-            case CSTRLEN ( "Content-Length" ):
-                if ( NAMEIS ( "Content-Length" ) )
-                    rc = RC ( rcNS, rcNoTarg, rcComparing, rcParam, rcUnsupported );
-                break;
-            case CSTRLEN ( "If-None-Match" ):
-                if ( NAMEIS ( "If-None-Match" ) )
-                    accept_not_modified = true;
-                break;
-            case CSTRLEN ( "If-Modified-Since" ):
-                if ( NAMEIS ( "If-Modified-Since" ) )
-                    accept_not_modified = true;
-                break;
-            }
-
-#undef CSTRLEN
-#undef NAMEIS
-
-            if ( rc == 0 )
-            {
-                rc = KClientHttpVAddHeader
-                    ( & self -> hdrs, false, name, val, args );
-                if ( rc == 0 && accept_not_modified )
-                    self -> accept_not_modified = true;
-            }
-
-            va_end ( args );
-        }
-    }
-    return rc;
-}
-
-/* AddPostParam
- *  adds a parameter for POST
- */
-LIB_EXPORT rc_t CC KClientHttpRequestVAddPostParam ( KClientHttpRequest *self, const char *fmt, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcSelf, rcNull );
-    else if ( fmt == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcNull );
-    else if ( fmt [ 0 ] == 0 )
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcNull );
-    else
-    {
-
-        /* TBD - reject embedded newlines */
-        /* TBD - URL-encoding or at least detect need for it */
-
-        /* first param */
-        if ( self -> body . elem_count == 0 )
-            rc = KDataBufferVPrintf ( & self -> body, fmt, args );
-        else
-        {
-            /* additional param - add separator */
-            rc = KDataBufferPrintf ( & self -> body, "&" );
-            if ( rc == 0 )
-                rc = KDataBufferVPrintf ( & self -> body, fmt, args );
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KClientHttpRequestAddPostParam ( KClientHttpRequest *self, const char *fmt, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, fmt );
-    rc = KClientHttpRequestVAddPostParam ( self, fmt, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-static
-rc_t KClientHttpRequestFormatMsg ( KClientHttpRequest *self,
-    char *buffer, size_t bsize, const char *method, size_t *len )
-{
-    rc_t rc;
-    bool have_user_agent = false;
-    String user_agent_string;
-    size_t total;
-    const KHttpHeader *node;
-
-    KClientHttp *http = self -> http;
-
-    /* determine if there is a query */
-    const char *has_query = ( self -> url_block . query . size == 0 ) ? "" : "?";
-
-
-    /* there are 2 places where the can be a host name stored
-       we give preference to the one attached to the url_block, because
-       it is the most recently determined.
-       If that one is empty, we look at the http object for its
-       host name.
-       Error if both are empty */
-    String hostname = self -> url_block . host;
-    if ( hostname . size == 0 )
-    {
-        hostname = http -> hostname;
-        if ( hostname . size == 0 )
-            return RC ( rcNS, rcNoTarg, rcValidating, rcName, rcEmpty );
-    }
-
-    CONST_STRING ( &user_agent_string, "User-Agent" );
-
-    /* start building the buffer that will be sent 
-       We are inlining the host:port, instead of
-       sending it in its own header */
-
-    if ( ! http -> proxy_ep )
-    {
-        rc = string_printf ( buffer, bsize, len, 
-                             "%s %S%s%S HTTP/%.2V\r\nHost: %S\r\nAccept: */*\r\n"
-                             , method
-                             , & self -> url_block . path
-                             , has_query
-                             , & self -> url_block . query
-                             , http -> vers
-                             , & hostname
-            );
-    }
-    else if ( http -> port != 80 )
-    {
-        rc = string_printf ( buffer, bsize, len, 
-                             "%s %S://%S:%u%S%s%S HTTP/%.2V\r\nHost: %S\r\nAccept: */*\r\n"
-                             , method
-                             , & self -> url_block . scheme
-                             , & hostname
-                             , http -> port
-                             , & self -> url_block . path
-                             , has_query
-                             , & self -> url_block . query
-                             , http -> vers
-                             , & hostname
-            );
-    }
-    else
-    {
-        rc = string_printf ( buffer, bsize, len, 
-                             "%s %S://%S%S%s%S HTTP/%.2V\r\nHost: %S\r\nAccept: */*\r\n"
-                             , method
-                             , & self -> url_block . scheme
-                             , & hostname
-                             , & self -> url_block . path
-                             , has_query
-                             , & self -> url_block . query
-                             , http -> vers
-                             , & hostname
-            );
-    }
-
-    /* print all headers remaining into buffer */
-    total = * len;
-    for ( node = ( const KHttpHeader* ) BSTreeFirst ( & self -> hdrs );
-          rc == 0 && node != NULL;
-          node = ( const KHttpHeader* ) BSTNodeNext ( & node -> dad ) )
-    {
-        /* look for "User-Agent" */
-        if ( !have_user_agent && node -> name . len == 10 )
-        {
-            if ( StringCaseCompare ( & node -> name, & user_agent_string ) == 0 )
-                have_user_agent = true;
-        }
-
-        /* add header line */
-        rc = string_printf ( & buffer [ total ], bsize - total, len,
-                             "%S: %S\r\n"
-                             , & node -> name
-                             , & node -> value );
-        total += * len;
-    }
-
-    /* add an User-Agent header from the kns-manager if we did not find one already in the header tree */
-    if ( !have_user_agent )
-    {
-        const char * ua = NULL;
-        rc = KNSManagerGetUserAgent ( &ua );
-        if ( rc == 0 )
-        {
-            rc = string_printf ( & buffer [ total ], bsize - total, len, "User-Agent: %s\r\n", ua );
-            total += * len;
-        }
-    }
-
-    /* add terminating empty header line */
-    if ( rc == 0 )
-    {
-        rc = string_printf ( & buffer [ total ], bsize - total, len, "\r\n" );
-        * len += total;
-    }
-    
-    return rc;
-}
-
-static
-rc_t KClientHttpRequestHandleRedirection ( KClientHttpRequest *self, KClientHttpResult *rslt )
-{
-    rc_t rc = 0;
-    String Location;
-    KHttpHeader *loc;
-
-    /* find relocation URI */
-    CONST_STRING ( & Location, "Location" );
-    loc = ( KHttpHeader* ) BSTreeFind ( & rslt -> hdrs, & Location, KHttpHeaderCmp );
-    if ( loc == NULL )
-    {
-        LOGERR ( klogSys, rc, "Location header not found on relocate msg" );
-        return RC ( rcNS, rcNoTarg, rcValidating, rcNode, rcNull );
-    }
-
-    /* capture the new URI in loc -> value_storage */
-    if ( loc -> value . size == 0 )
-    {
-        LOGERR ( klogSys, rc, "Location does not provide a value" );
-        rc = RC ( rcNS, rcNoTarg, rcValidating, rcNode, rcIncorrect );
-    }
-    else
-    {
-        URLBlock b;
-        KDataBuffer uri;
-        /* pull out uri */
-        rc = KDataBufferSub ( &loc -> value_storage, &uri, loc -> name . size, loc -> value . size + 1 );
-        if ( rc == 0 )
-        {
-            /* parse the URI into local url_block */
-            rc = ParseUrl ( &b, uri . base, uri . elem_count - 1 );
-            if ( rc == 0 )
-            {
-                KClientHttp *http = self -> http;
-
-                /* close the open http connection and clear out all data except for the manager */
-                KClientHttpClear ( http );
-
-                /* clear the previous endpoint */
-                http -> ep_valid = false;
-
-                /* reinitialize the http from uri */
-                rc = KClientHttpInit ( http, &uri, NULL, http -> vers , &b . host, b . port );
-                if ( rc == 0 )
-                {
-                    KClientHttpRequestClear ( self );
-                    rc = KClientHttpRequestInit ( self, &b, &uri );
-                    if ( rc == 0 )
-                        KClientHttpResultRelease ( rslt );
-                }
-            }
-
-            KDataBufferWhack ( & uri );
-        }
-        
-    } 
-
-    return rc;
-}
-
-static
-rc_t KClientHttpRequestSendReceiveNoBodyInt ( KClientHttpRequest *self, KClientHttpResult **_rslt, const char *method )
-{   
-    rc_t rc = 0;
-
-    KClientHttpResult *rslt;
-
-    uint32_t i;
-    const uint32_t max_redirect = 5;
-
-    /* TBD - may want to prevent a Content-Type or other headers here */
-
-    if ( self -> body . elem_count != 0 )
-        return RC ( rcNS, rcNoTarg, rcValidating, rcNoObj, rcIncorrect );
-
-    for ( i = 0; i < max_redirect; ++ i )
-    {
-        size_t len;
-        char buffer [ 4096 ];
-
-        /* create message */
-        rc = KClientHttpRequestFormatMsg ( self, buffer, sizeof buffer, method, & len );
-        if ( rc != 0 )
-            break;
-
-        /* send the message and create a response */
-        rc = KClientHttpSendReceiveMsg ( self -> http, _rslt, buffer, len, NULL, self -> url_buffer . base );
-        if ( rc != 0 )
-        {
-            KClientHttpClose ( self -> http );
-            rc = KClientHttpSendReceiveMsg ( self -> http, _rslt, buffer, len, NULL, self -> url_buffer . base );
-            if ( rc != 0 )
-                break;
-        }
-
-        /* look at status code */
-        rslt = * _rslt;
-        switch ( rslt -> status )
-        {
-        case 200:
-        case 206:
-            return 0;
-        case 304:
-            /* check for "If-Modified-Since" or "If-None-Match" header in request and allow if present */
-            if ( self -> accept_not_modified )
-                return 0;
-            break;
-        }
-
-        TRACE ( "unusual status code: %d\n", ( int ) rslt -> status );
-        
-        switch ( rslt -> status )
-        {
-            /* TBD - need to include RFC rule for handling codes for HEAD and GET */
-        case 301: /* "moved permanently" */
-        case 302: /* "found" - okay to reissue for HEAD and GET, but not for POST */
-        case 303: /* "see other" - the response to the request can be found under another URI using a GET method */
-        case 307: /* "moved temporarily" */
-        case 308: /* "permanent redirect" */
-            break;
-
-        case 505: /* HTTP Version Not Supported */
-            if ( self -> http -> vers > 0x01000000 )
-            {
-                /* downgrade version requested */
-                self -> http -> vers -= 0x00010000;
-                /* TBD - remove any HTTP/1.1 specific headers */
-                continue;
-            }
-
-            /* NO BREAK */
-
-        default:
-
-            if ( ! rslt -> len_zero || rslt -> close_connection )
-            {
-                /* the connection is no good */
-                KClientHttpClose ( self -> http );
-            }
-            
-            /* rslt -> status may be looked at by the caller to determine actual success */
-            return 0;
-        }
-
-        /* reset connection, reset request */
-        rc = KClientHttpRequestHandleRedirection ( self, rslt );
-        if ( rc != 0 )
-            break;
-    }
-
-    if ( rc != 0 )
-        KClientHttpClose ( self -> http );
-    
-    return rc;
-}
-
-static
-rc_t KClientHttpRequestSendReceiveNoBody ( KClientHttpRequest *self, KClientHttpResult **_rslt, const char *method )
-{   
-    KHttpRetrier retrier;
-    rc_t rc = KHttpRetrierInit ( & retrier, self -> url_buffer . base, self -> http -> mgr ); 
-    
-    if ( rc == 0 )
-    {
-        while ( rc == 0 ) 
-        {
-            rc = KClientHttpRequestSendReceiveNoBodyInt ( self, _rslt, method );
-            if ( rc != 0 ) 
-            {   /* a non-HTTP problem */
-                break;
-            }
-            if ( ! self -> http -> reliable || ! KHttpRetrierWait ( & retrier, ( * _rslt ) -> status ) )
-            {   /* We are either not configured to retry, or HTTP status is not retriable, or we exhausted
-                    the max number of retries or the total wait time.
-                    rc is 0, but the caller will have to look at _rslt->status to determine success */
-                break;
-            }
-            KClientHttpResultRelease ( * _rslt );
-        }
-        
-        {
-            rc_t rc2 = KHttpRetrierDestroy ( & retrier );
-            if ( rc == 0 )
-                rc = rc2;
-        }
-    }
-    
-    return rc;
-}
-
-/* HEAD
- *  send HEAD message
- */
-LIB_EXPORT rc_t CC KClientHttpRequestHEAD ( KClientHttpRequest *self, KClientHttpResult **rslt )
-{
-    return KClientHttpRequestSendReceiveNoBody ( self, rslt, "HEAD" );
-} 
-
-/* GET
- *  send GET message
- *  all query AND post parameters are combined in URL
- */
-LIB_EXPORT rc_t CC KClientHttpRequestGET ( KClientHttpRequest *self, KClientHttpResult **rslt )
-{
-    return KClientHttpRequestSendReceiveNoBody ( self, rslt, "GET" );
-}
-
-rc_t CC KClientHttpRequestPOST_Int ( KClientHttpRequest *self, KClientHttpResult **_rslt )
-{   
-    rc_t rc = 0;
-
-    KClientHttpResult *rslt;
-
-    uint32_t i;
-    const uint32_t max_redirect = 5;
-
-    /* TBD comment - add debugging test to ensure "Content-Length" header not present */
-
-    /* fix headers for POST params */
-    if ( self -> body . elem_count > 1 )
-    {
-        /* "body" contains data plus NUL byte */
-        rc = KClientHttpReplaceHeader ( & self -> hdrs,
-            "Content-Length", "%lu", self -> body . elem_count - 1 );
-        if ( rc == 0 )
-        {
-            String Content_Type;
-            const KHttpHeader *node;
-
-            CONST_STRING ( & Content_Type, "Content-Type" );
-
-            node = ( const KHttpHeader* ) BSTreeFind ( & self -> hdrs, & Content_Type, KHttpHeaderCmp );
-            if ( node == NULL )
-            {
-                /* add content type for form parameters */
-                /* TBD - before general application, need to perform URL-encoding! */
-                rc = KClientHttpAddHeader ( & self -> hdrs, "Content-Type", "application/x-www-form-urlencoded" );
-            }
-        }
-
-        if ( rc != 0 )
-        {
-            KClientHttpClose ( self -> http );
-            return rc;
-        }
-    }
-
-    for ( i = 0; i < max_redirect; ++ i )
-    {
-        const KDataBuffer *body = & self -> body;
-        size_t len;
-        char buffer [ 4096 ];
-
-        /* create message */
-        rc = KClientHttpRequestFormatMsg ( self, buffer, sizeof buffer, "POST", & len );
-        if ( rc != 0 )
-            break;
-
-        /* Try to add body to buffer to avoid double socket write */
-        if (body != NULL && body -> base != NULL && body -> elem_count > 0 && 
-                len + body -> elem_count - 1 <= sizeof buffer) 
-        {
-            memcpy(buffer + len, body -> base, body -> elem_count - 1);
-            len += body -> elem_count - 1;
-            body = NULL;
-        }
-
-        /* send the message and create a response */
-        rc = KClientHttpSendReceiveMsg ( self -> http, _rslt, buffer, len, body, self -> url_buffer . base );
-        if ( rc != 0 )
-        {
-            KClientHttpClose ( self -> http );
-            rc = KClientHttpSendReceiveMsg ( self -> http, _rslt, buffer, len, NULL, self -> url_buffer . base );
-            if ( rc != 0 )
-                break;
-        }
-
-        /* look at status code */
-        rslt = * _rslt;
-        switch ( rslt -> status )
-        {
-        case 200:
-        case 206:
-            return 0;
-        case 304:
-            /* check for "If-Modified-Since" or "If-None-Match" header in request and allow if present */
-            if ( self -> accept_not_modified )
-                return 0;
-            break;
-        }
-
-        TRACE ( "unusual status code: %d\n", ( int ) rslt -> status );
-        
-        switch ( rslt -> status )
-        {
-            /* TBD - Add RFC rules about POST */
-        case 301: /* "moved permanently" */
-        case 307: /* "moved temporarily" */
-        case 308: /* "permanent redirect" */
-            break;
-
-        case 505: /* HTTP Version Not Supported */
-            if ( self -> http -> vers > 0x01000000 )
-            {
-                /* downgrade version requested */
-                self -> http -> vers -= 0x00010000;
-                /* TBD - remove any HTTP/1.1 specific headers */
-                continue;
-            }
-
-            /* NO BREAK */
-
-        default:
-
-            if ( ! rslt -> len_zero || rslt -> close_connection )
-            {
-                /* the connection is no good */
-                KClientHttpClose ( self -> http );
-            }
-
-            /* rslt -> status may be looked at by the caller to determine actual success */
-            return 0;
-        }
-
-        /* reset connection, reset request */
-        rc = KClientHttpRequestHandleRedirection ( self, rslt );
-        if ( rc != 0 )
-            break;
-    }
-
-    if ( rc != 0 )
-        KClientHttpClose ( self -> http );
-
-    return rc;
-}
-
-/* POST
- *  send POST message
- *  query parameters are sent in URL
- *  post parameters are sent in body
- */
-LIB_EXPORT rc_t CC KClientHttpRequestPOST ( KClientHttpRequest *self, KClientHttpResult **_rslt )
-{
-    KHttpRetrier retrier;
-    rc_t rc = KHttpRetrierInit ( & retrier, self -> url_buffer . base, self -> http -> mgr ); 
-    
-    if ( rc == 0 )
-    {
-        while ( rc == 0 ) 
-        {
-            rc = KClientHttpRequestPOST_Int ( self, _rslt );
-            if ( rc != 0 ) 
-            {   /* a non-HTTP problem */
-                break;
-            }
-            if ( ! self -> http -> reliable || ! KHttpRetrierWait ( & retrier, ( * _rslt ) -> status ) )
-            {   /* We are either not configured to retry, or HTTP status is not retriable, or we exhausted
-                    the max number of retries or the total wait time.
-                    rc is 0, but the caller will have to look at _rslt->status to determine success */
-                break;
-            }
-            KClientHttpResultRelease ( * _rslt );
-        }
-        
-        {
-            rc_t rc2 = KHttpRetrierDestroy ( & retrier );
-            if ( rc == 0 ) rc = rc2;
-        }
-    }
-    
-    return rc;
-}
diff --git a/libs/kns/http-file.c b/libs/kns/http-file.c
deleted file mode 100644
index 97ca013..0000000
--- a/libs/kns/http-file.c
+++ /dev/null
@@ -1,639 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ==============================================================================
-*
-*/
-#include <kns/extern.h>
-
-#define KFILE_IMPL KHttpFile
-typedef struct KHttpFile KHttpFile;
-#include <kfs/impl.h>
-
-#include "http-priv.h"
-#include "mgr-priv.h"
-#include "stream-priv.h"
-
-#include <kproc/lock.h>
-#include <kns/adapt.h>
-#include <kns/endpoint.h>
-#include <kns/http.h>
-#include <kns/impl.h>
-#include <kns/kns-mgr-priv.h> /* KHttpRetrier */
-#include <kns/manager.h>
-#include <kns/socket.h>
-#include <kns/stream.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-#ifdef ERR
-#undef ERR
-#endif
-
-#include <klib/container.h>
-#include <klib/debug.h> /* DBGMSG */
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <klib/refcount.h>
-#include <klib/text.h>
-#include <klib/time.h> /* KSleep */
-#include <klib/vector.h>
-
-#include <kproc/timeout.h>
-
-#include <os-native.h>
-#include <strtol.h>
-#include <va_copy.h>
-
-#include <sysalloc.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-#if _DEBUGGING && 0
-#include <stdio.h>
-#define TRACE( x, ... ) \
-    fprintf ( stderr, "@@ %s:%d: %s: " x, __FILE__, __LINE__, __func__, __VA_ARGS__ )
-#else
-#define TRACE( x, ... ) \
-    ( ( void ) 0 )
-#endif
-
-#define USE_CACHE_CONTROL 0
-#define NO_CACHE_LIMIT ( ( uint64_t ) ( 16 * 1024 * 1024 ) )
-
-
-/*--------------------------------------------------------------------------
- * KHttpFile
- */
-struct KHttpFile
-{
-    KFile dad;
-    
-    uint64_t file_size;
-
-    const KNSManager * kns;
-
-    KLock * lock;
-    KClientHttp *http;
-
-    KDataBuffer url_buffer;
-
-    bool no_cache;
-};
-
-static
-rc_t CC KHttpFileDestroy ( KHttpFile *self )
-{
-    KLockRelease ( self -> lock );
-    KNSManagerRelease ( self -> kns );
-    KClientHttpRelease ( self -> http );
-    KDataBufferWhack ( & self -> url_buffer );
-    free ( self );
-
-    return 0;
-}
-
-static
-struct KSysFile* CC KHttpFileGetSysFile ( const KHttpFile *self, uint64_t *offset )
-{
-    * offset = 0;
-    return NULL;
-}
-
-static
-rc_t CC KHttpFileRandomAccess ( const KHttpFile *self )
-{
-    /* we ensure during construction that the server accepts partial range requests */
-    return 0;
-}
-
-/* KHttpFile must have a file size to be created
-   impossible for this funciton to fail */
-static
-rc_t CC KHttpFileSize ( const KHttpFile *self, uint64_t *size )
-{
-    * size = self -> file_size;
-    return 0;
-}
-
-static
-rc_t CC KHttpFileSetSize ( KHttpFile *self, uint64_t size )
-{
-    return RC ( rcNS, rcFile, rcUpdating, rcFile, rcReadonly );
-}
-
-static
-rc_t KHttpFileTimedReadInt ( const KHttpFile *cself,
-    uint64_t aPos, void *aBuf, size_t aBsize,
-    size_t *num_read, struct timeout_t *tm, uint32_t * http_status )
-{
-    uint64_t pos = aPos;
-    rc_t rc = 0;
-    KHttpFile *self = ( KHttpFile * ) cself;
-    KClientHttp *http = self -> http;
-    
-    * http_status = 0; 
-
-    /* starting position was beyond EOF */
-    if ( pos >= self -> file_size )
-    {
-        *num_read = 0;
-        return 0;
-    }
-#if 0
-    /* position is within http header buffer */
-    else if ( KClientHttpBlockBufferContainsPos ( http, pos ) )
-    {
-
-    }
-#endif
-    /* starting position was within file but the range fell beyond EOF */
-    else 
-    {
-        KClientHttpRequest *req;
-
-/* When we call KFileRead(HttpFile, pos > 0, bsize < 256)
-  several times on the same socket,
-  the server returns HTTP headers twice and no content: See VDB-1256, SYS-185053
-*/
-        char buf [ 256 ] = "";
-        void *bPtr = aBuf;
-        size_t bsize = aBsize;
-        uint32_t proxy_retries;
-
-        /* extend buffer size to MIN_SZ */
-        if ( bsize < sizeof buf )
-        {
-            bPtr = buf;
-            bsize = sizeof buf;
-        }
-
-        /* limit request to file size */
-        if ( pos + bsize > self -> file_size )
-        {
-            bsize = self -> file_size - pos;
-            if (bsize < sizeof buf)
-            {
-                size_t d = sizeof buf - bsize;
-                if (pos >= d)
-                {
-                    bsize += d;
-                    pos -= d;
-                }
-                else { /* TODO: Downloading file with size < 256:
-need to reopen the connection now;
-otherwise we are going to hit "Apache return HTTP headers twice" bug */
-                    bsize += pos;
-                    pos = 0;
-                }
-            }
-        }
-
-        assert(bsize >= sizeof buf || (pos == 0 && bsize == self -> file_size));
-
-        for ( proxy_retries = 5; rc == 0 && proxy_retries != 0; )
-        {
-            rc = KClientHttpMakeRequest ( http, &req, self -> url_buffer . base );
-            if ( rc != 0 )
-            {
-                TRACE ( "KClientHttpMakeRequest ( http, & req, url=\"%s\" ); failed: rc=%u\n", ( const char* ) self -> url_buffer . base, rc );
-                break;
-            }
-
-#if USE_CACHE_CONTROL
-            /* tell proxies not to cache if file is above limit */
-            if ( rc == 0 && self -> no_cache )
-                rc = KClientHttpRequestSetNoCache ( req );
-#warning "using cache control"
-#endif
-            if ( rc == 0 )
-            {
-                /* request min ( bsize, file_size ) bytes */
-                rc = KClientHttpRequestByteRange ( req, pos, bsize );
-                if ( rc != 0 )
-                    TRACE ( "KClientHttpRequestByteRange ( req, pos=%lu, bsize=%lu ); failed: rc=%u\n", pos, bsize, rc );
-                else
-                {
-                    KClientHttpResult *rslt;
-                
-                    rc = KClientHttpRequestGET ( req, &rslt );
-                    if ( rc != 0 )
-                        TRACE ( "KClientHttpRequestGET ( req, & rslt ); failed: rc=%u\n", rc );
-                    else
-                    {
-                        /* dont need to know what the response message was */
-                        rc = KClientHttpResultStatus ( rslt, http_status, NULL, 0, NULL );
-                        if ( rc != 0 )
-                            TRACE ( "KClientHttpResultStatus ( rslt, & http_status, NULL, 0, NULL ); failed: rc=%u\n", rc );
-                        else
-                        {
-                            switch ( * http_status )
-                            {
-                            case 206:
-                            {
-                                uint64_t start_pos;
-                                size_t result_size;
-
-                                /* don't need retries now */
-                                proxy_retries = 0;
-
-                                /* extract actual amount being returned by server */
-                                rc = KClientHttpResultRange ( rslt, &start_pos, &result_size );
-                                if ( rc != 0 || start_pos != pos || result_size != bsize )
-                                {
-                                    if ( rc != 0 )
-                                        TRACE ( "KClientHttpResultRange ( rslt, & start_pos, & result_size ); failed: rc=%u\n", rc );
-                                    else
-                                    {
-                                        if ( start_pos != pos )
-                                            TRACE ( "KClientHttpResultRange ( rslt, & start_pos, & result_size ); failed: start_pos=%lu != pos=%lu\n", start_pos, pos );
-                                        if ( result_size != bsize )
-                                            TRACE ( "KClientHttpResultRange ( rslt, & start_pos, & result_size ); failed: result_size=%lu != bsize=%lu\n", result_size, bsize );
-                                    }
-                                }
-                                else
-                                {
-                                    KStream *response;
-                                
-                                    rc = KClientHttpResultGetInputStream ( rslt, &response );
-                                    if ( rc == 0 )
-                                    {
-                                        size_t skip = 0;
-
-                                        rc = KStreamTimedReadExactly( response, bPtr, result_size, tm );
-                                        if ( rc != 0 )
-                                        {
-                                            KStreamRelease ( response );
-                                            KClientHttpResultRelease ( rslt );
-                                            KClientHttpRequestRelease ( req );
-                                            KClientHttpClose ( http );
-                                            return ResetRCContext ( rc, rcNS, rcFile, rcReading );
-                                        }
-
-                                        if (pos != aPos)
-                                        {
-                                            assert(pos < aPos);
-                                            skip = aPos - pos;
-                                            assert(result_size >= skip);
-                                            result_size -= skip;
-                                        }
-
-                                        if (result_size > aBsize)
-                                            result_size = aBsize;
-
-                                        if (bPtr == buf)
-                                            memcpy(aBuf, buf + skip, result_size);
-                                        else if (skip > 0)
-                                        {
-                                            const void *src = ( const char * ) aBuf + skip;
-                                            memmove(aBuf, src, result_size);
-                                        }
-
-                                        * num_read = result_size;
-
-                                        KStreamRelease ( response );
-                                    }
-                                }
-                                break;
-                            }
-
-                            case 403:
-                            case 404:
-                                if ( -- proxy_retries != 0 )
-                                {
-                                    TRACE ( "KClientHttpResultStatus ( rslt, & http_status, NULL, 0, NULL ); unexpected status=%d - sleeping and retrying\n", * http_status );
-                                    KSleep ( 1 );
-                                    rc = 0;
-                                    break;
-                                }
-
-                                /* NO BREAK */
-
-                            default:
-                                rc = RC ( rcNS, rcFile, rcReading, rcData, rcUnexpected );
-                                TRACE ( "KClientHttpResultStatus ( rslt, & http_status, NULL, 0, NULL ); unexpected status=%d\n", * http_status );
-                                break;
-                            }
-                        }
-
-                        KClientHttpResultRelease ( rslt );
-                    }
-                }
-
-                KClientHttpRequestRelease ( req );
-            }
-        }
-    }
-
-    if ( rc != 0 || * num_read == 0 )
-        KClientHttpClose ( http );
-    
-    return rc;
-}
-
-static
-rc_t KHttpFileTimedReadLocked ( const KHttpFile *cself,
-    uint64_t aPos, void *aBuf, size_t aBsize,
-    size_t * num_read, struct timeout_t * tm, uint32_t * http_status )
-{
-    rc_t rc = KLockAcquire ( cself -> lock );
-    if ( rc == 0 )
-    {
-        rc = KHttpFileTimedReadInt ( cself, aPos, aBuf, aBsize, num_read, tm, http_status );
-        KLockUnlock ( cself -> lock );
-    }
-    return rc;
-}
-
-static
-rc_t CC KHttpFileTimedRead ( const KHttpFile *self,
-    uint64_t pos, void *buffer, size_t bsize,
-    size_t *num_read, struct timeout_t *tm )
-{
-    KHttpRetrier retrier;
-    rc_t rc = KHttpRetrierInit ( & retrier, self -> url_buffer . base, self -> kns );
-    
-    if ( rc == 0 )
-    {
-        DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_HTTP ), ( "KHttpFileTimedRead(pos=%lu)\n", pos ) );
-        
-        /* loop using existing KClientHttp object */
-        while ( rc == 0 ) 
-        {
-            uint32_t http_status;
-            rc = KHttpFileTimedReadLocked ( self, pos, buffer, bsize, num_read, tm, & http_status );
-            if ( rc != 0 ) 
-            {   
-                rc_t rc2=KClientHttpReopen ( self -> http );
-                DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_HTTP ), ( "KHttpFileTimedRead: KHttpFileTimedReadLocked failed, reopening\n" ) );
-                if ( rc2 == 0 )
-                {
-                    rc2 = KHttpFileTimedReadLocked ( self, pos, buffer, bsize, num_read, tm, & http_status );
-                    if ( rc2 == 0 ) 
-                    {
-                        DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_HTTP ), ( "KHttpFileTimedRead: reopened successfully\n" ) );
-                        rc= 0;
-                    }
-                    else 
-                    {
-                        DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_HTTP ), ( "KHttpFileTimedRead: reopen failed\n" ) );
-                        break;
-                    }
-                }
-            }
-            if ( ! KHttpRetrierWait ( & retrier, http_status ) )
-            {
-                break;
-            }
-            rc = KClientHttpReopen ( self -> http );
-        }
-        
-        {
-            rc_t rc2 = KHttpRetrierDestroy ( & retrier );
-            if ( rc == 0 ) rc = rc2;
-        }
-    }
-    
-    return rc;
-}
-
-static
-rc_t CC KHttpFileRead ( const KHttpFile *self, uint64_t pos,
-     void *buffer, size_t bsize, size_t *num_read )
-{
-    struct timeout_t tm;
-    TimeoutInit ( & tm, self -> kns -> http_read_timeout );
-    return KHttpFileTimedRead ( self, pos, buffer, bsize, num_read, & tm );
-}
-
-static
-rc_t CC KHttpFileWrite ( KHttpFile *self, uint64_t pos, 
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    return RC ( rcNS, rcFile, rcUpdating, rcInterface, rcUnsupported );
-}
-
-static
-rc_t CC KHttpFileTimedWrite ( KHttpFile *self, uint64_t pos, 
-    const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm )
-{
-    return RC ( rcNS, rcFile, rcUpdating, rcInterface, rcUnsupported );
-}
-
-static
-uint32_t CC KHttpFileGetType ( const KHttpFile *self )
-{
-    assert ( self != NULL );
-
-    /* the HTTP file behaves like a read-only file
-       returning kfdSocket would be imply absence of
-       random access: the HTTP protocol adds that. */
-
-    return kfdFile;
-}
-
-static KFile_vt_v1 vtKHttpFile = 
-{
-    1, 2,
-
-    KHttpFileDestroy,
-    KHttpFileGetSysFile,
-    KHttpFileRandomAccess,
-    KHttpFileSize,
-    KHttpFileSetSize,
-    KHttpFileRead,
-    KHttpFileWrite,
-    KHttpFileGetType,
-    KHttpFileTimedRead,
-    KHttpFileTimedWrite
-};
-
-static rc_t KNSManagerVMakeHttpFileInt ( const KNSManager *self,
-    const KFile **file, KStream *conn, ver_t vers, bool reliable,
-    const char *url, va_list args )
-{
-    rc_t rc;
-
-    if ( file == NULL )
-        rc = RC ( rcNS, rcFile, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC( rcNS, rcNoTarg, rcConstructing, rcParam, rcNull );
-        else if ( url == NULL )
-            rc = RC ( rcNS, rcFile, rcConstructing, rcPath, rcNull );
-        else if ( url [ 0 ] == 0 )
-            rc = RC ( rcNS, rcFile, rcConstructing, rcPath, rcInvalid );
-        else
-        {
-            KHttpFile *f;
-
-            f = calloc ( 1, sizeof *f );
-            if ( f == NULL )
-                rc = RC ( rcNS, rcFile, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KFileInit ( &f -> dad, ( const KFile_vt * ) &vtKHttpFile, "KHttpFile", url, true, false );
-                if ( rc == 0 )
-                {
-                    rc = KLockMake ( & f -> lock );
-                    if ( rc == 0 )
-                    {
-                        KDataBuffer *buf = & f -> url_buffer;
-                        buf -> elem_bits = 8;
-                        rc = KDataBufferVPrintf ( buf, url, args );
-                        if ( rc == 0 )
-                        {
-                            URLBlock block;
-                            rc = ParseUrl ( &block, buf -> base, buf -> elem_count - 1 );
-                            if ( rc == 0 ) 
-                            {
-                                KClientHttp *http;
-                          
-                                rc = KNSManagerMakeClientHttpInt ( self, & http, buf, conn, vers,
-                                    self -> http_read_timeout, self -> http_write_timeout, &block . host, block . port, reliable );
-                                if ( rc == 0 )
-                                {
-                                    KClientHttpRequest *req;
-
-                                    rc = KClientHttpMakeRequestInt ( http, &req, &block, buf );
-                                    if ( rc == 0 )
-                                    {
-                                        KClientHttpResult *rslt;
-                                        rc = KClientHttpRequestHEAD ( req, & rslt );
-                                        KClientHttpRequestRelease ( req );
-
-                                        if ( rc == 0 )
-                                        {
-                                            uint64_t size;
-                                            uint32_t status;
-
-                                            size_t num_read;
-                                            char buffer [ 64 ];
-
-                                            /* get the file size from HEAD query */
-                                            bool have_size = KClientHttpResultSize ( rslt, & size );
-
-                                            /* see if the server accepts partial content range requests */
-                                            bool accept_ranges = false;
-                                            rc = KClientHttpResultGetHeader ( rslt, "Accept-Ranges", buffer, sizeof buffer, & num_read );
-                                            if ( rc == 0 && num_read == sizeof "bytes" - 1 &&
-                                                 strcase_cmp ( buffer, num_read, "bytes", sizeof "bytes" - 1, -1 ) == 0 )
-                                            {
-                                                accept_ranges = true;
-                                            }
-
-                                            /* check the result status */
-                                            rc = KClientHttpResultStatus ( rslt, & status, NULL, 0, NULL );
-
-                                            /* done with result */
-                                            KClientHttpResultRelease ( rslt );
-
-                                            /* check for error status */
-                                            if ( rc == 0 )
-                                            {
-                                                switch ( status )
-                                                {
-                                                case 200:
-                                                    if ( ! have_size )
-                                                        rc = RC ( rcNS, rcFile, rcOpening, rcSize, rcUnknown );
-                                                    else if ( ! accept_ranges )
-                                                        rc = RC ( rcNS, rcFile, rcOpening, rcFunction, rcUnsupported );
-                                                    break;
-                                                case 403:
-                                                    rc = RC ( rcNS, rcFile, rcOpening, rcFile, rcUnauthorized );
-                                                    break;
-                                                case 404:
-                                                    rc = RC ( rcNS, rcFile, rcOpening, rcFile, rcNotFound );
-                                                    break;
-                                                default:
-                                                    rc = RC ( rcNS, rcFile, rcValidating, rcNoObj, rcEmpty );
-                                                }
-
-                                                if ( rc == 0 )
-                                                {
-                                                    rc = KNSManagerAddRef ( self );
-                                                    if ( rc == 0 )
-                                                    {
-                                                        f -> kns = self;
-                                                        f -> file_size = size;
-                                                        f -> http = http;
-                                                        f -> no_cache = size >= NO_CACHE_LIMIT;
-                                                        
-                                                        * file = & f -> dad;
-                                                        return 0;
-                                                    }
-                                                }
-                                            }
-                                        }
-                                    }
-
-                                    KClientHttpRelease ( http );
-                                }
-                            }
-                        }
-
-                        KDataBufferWhack ( buf );
-                        KLockRelease ( f -> lock );
-                    }
-                }
-                free ( f );
-            }
-        }
-
-        * file = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KNSManagerMakeHttpFile(const KNSManager *self,
-    const KFile **file, struct KStream *conn, ver_t vers, const char *url, ...)
-{
-    rc_t rc = 0;
-    va_list args;
-    va_start(args, url);
-    rc = KNSManagerVMakeHttpFileInt ( self, file, conn, vers, false, url, args);
-    va_end(args);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KNSManagerMakeReliableHttpFile(const KNSManager *self,
-    const KFile **file, struct KStream *conn, ver_t vers, const char *url, ...)
-{
-    rc_t rc = 0;
-    va_list args;
-    va_start(args, url);
-    rc = KNSManagerVMakeHttpFileInt ( self, file, conn, vers, true, url, args);
-    va_end(args);
-    return rc;
-}
-
-LIB_EXPORT bool CC KFileIsKHttpFile ( const struct KFile * self )
-{
-    return self != NULL && &self->vt->v1 == &vtKHttpFile;
-}
diff --git a/libs/kns/http-priv.h b/libs/kns/http-priv.h
deleted file mode 100644
index c9d1460..0000000
--- a/libs/kns/http-priv.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_http_priv_
-#define _h_http_priv_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-#ifndef _h_klib_data_buffer
-#include <klib/data-buffer.h>
-#endif
-
-#ifndef _h_klib_container
-#include <klib/container.h>
-#endif
-
-#ifndef MAX_HTTP_READ_LIMIT
-#define MAX_HTTP_READ_LIMIT ( 30 * 1000 )
-#endif
-
-#ifndef MAX_HTTP_WRITE_LIMIT
-#define MAX_HTTP_WRITE_LIMIT ( 15 * 1000 )
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-    
-struct KFile;
-struct KNSManager;
-struct KClientHttp;
-struct KClientHttpRequest;
-struct KStream;
-struct timeout_t;
-
-/*--------------------------------------------------------------------------
- * URLBlock
- *  RFC 3986
- */
-typedef enum 
-{
-    st_NONE,
-    st_HTTP,
-    st_S3
-} SchemeType;
-
-typedef struct URLBlock URLBlock;
-struct URLBlock
-{
-    String scheme;
-    String host;
-    String path; /* Path includes any parameter portion */
-    String query;
-    String fragment;
-
-    uint32_t port;
-
-    SchemeType scheme_type;
-};
-extern void URLBlockInit ( URLBlock *self );
-extern rc_t ParseUrl ( URLBlock * b, const char * url, size_t url_size );
-
-/*--------------------------------------------------------------------------
- * KHttpHeader
- *  node structure to place http header lines into a BSTree
- */
-typedef struct KHttpHeader KHttpHeader;
-struct KHttpHeader
-{
-    BSTNode dad;
-    String name;
-    String value;
-    KDataBuffer value_storage;
-};
-    
-extern void KHttpHeaderWhack ( BSTNode *n, void *ignore );
-extern int64_t CC KHttpHeaderSort ( const BSTNode *na, const BSTNode *nb );
-extern int64_t CC KHttpHeaderCmp ( const void *item, const BSTNode *n );
-extern rc_t KHttpGetHeaderLine ( struct KClientHttp *self, struct timeout_t *tm, BSTree *hdrs, bool *blank, bool *close_connection );
-extern rc_t KHttpGetStatusLine ( struct KClientHttp *self, struct timeout_t *tm, String *msg, uint32_t *status, ver_t *version );
-
-/* compatibility for existing code */
-#define KHttpGetHeaderLine KClientHttpGetHeaderLine
-#define KHttpGetStatusLine KClientHttpGetStatusLine
-
-/*--------------------------------------------------------------------------
- * KClientHttp
- */
-
-rc_t KClientHttpOpen ( struct KClientHttp * self, const String * hostname, uint32_t port );
-void KClientHttpClose ( struct KClientHttp * self );
-rc_t KClientHttpReopen ( struct KClientHttp * self );
-
-rc_t KNSManagerMakeClientHttpInt ( struct KNSManager const *self, struct KClientHttp **_http,
-    const KDataBuffer *hostname_buffer,  struct KStream *opt_conn,
-    ver_t vers, int32_t readMillis, int32_t writeMillis,
-    const String *host, uint32_t port, bool reliable );
-
-/* test */
-void KClientHttpForceSocketClose(const struct KClientHttp *self);
-
-/*--------------------------------------------------------------------------
- * KClientHttpRequest
- */
-rc_t KClientHttpMakeRequestInt ( struct KClientHttp const *self,
-    struct KClientHttpRequest **req, const URLBlock *block, const KDataBuffer *buf );
-
-
-/* exported private functions
-*/
-
-/* a hook to redefine KClientHttpReopen (for testing,_DEBUG only) */
-#if _DEBUGGING
-extern void SetClientHttpReopenCallback ( struct KStream * (*fn) ( void ) ); 
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kttp_priv_ */
diff --git a/libs/kns/http-retrier.c b/libs/kns/http-retrier.c
deleted file mode 100644
index e72d31f..0000000
--- a/libs/kns/http-retrier.c
+++ /dev/null
@@ -1,503 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ==============================================================================
-*
-*/
-#include <kns/extern.h>
-
-#define KFILE_IMPL KHttpFile
-typedef struct KHttpFile KHttpFile;
-#include <kfs/impl.h>
-
-#include <kns/manager.h>
-
-#include <kfg/config.h>
-
-#include <klib/log.h>
-#include <klib/time.h>
-#include <klib/rc.h>
-
-#include <sysalloc.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-
-#include "mgr-priv.h"
-
-struct HttpRetrySchedule
-{
-    uint16_t    code; // 5 for 5xx, 4 for 4xx, otherwise http status code from 400 to 599
-    uint8_t     max_retries;
-    bool        open_ended; /* true = retry with the last sleep time until global retry limit or max sleep time is reached */
-    
-    uint16_t    sleep_before_retry[1]; // actual size determined at construction
-    /*do not define anything here*/
-};
-typedef struct HttpRetrySchedule HttpRetrySchedule;
-
-static
-void AddSleepTime ( uint16_t * retries, uint16_t idx, uint16_t value )
-{   /* make sure new value is not less than the previous */
-    if ( idx == 0 || value >= retries [ idx - 1 ] )
-    {
-        retries [ idx ] = value;
-    }
-    else
-    {
-        retries [ idx ] = retries [ idx - 1 ];
-    }
-}
-
-static
-rc_t HttpRetryCodesConfig( HttpRetrySchedule** self, uint16_t code, const String* retries )
-{   /* extract body, count commas, make sure all other characters are decimals */
-
-    /* make sure only decimals and commas are used, count commas */
-    String s = *retries; 
-    uint16_t retryCount = 0;
-    uint32_t ch;
-    bool in_number = false;
-    while ( StringPopHead ( &s, &ch ) == 0 && ch != 0 )
-    {
-        if ( ch == ',' )
-        {   
-            in_number = false;
-        }
-        else if ( ch == '+' )
-        {   /* + is only allowed immediately after the last number */
-            if ( ( s.len == 0 || s.addr [ 0 ] == 0 ) 
-                 && 
-                 in_number )
-            {
-                break;
-            }
-            else
-            {
-                return RC ( rcNS, rcData, rcCreating, rcNumeral, rcInvalid );
-            }
-        }
-        else if ( isdigit ( ch ) )
-        {
-            if ( ! in_number ) 
-            {   /* first digit of a new number */
-                ++retryCount;
-            }
-            in_number = true;
-        }
-        else
-        {
-            return RC ( rcNS, rcData, rcCreating, rcNumeral, rcInvalid );
-        }
-    }
-    
-    *self = (HttpRetrySchedule*) malloc( sizeof ( HttpRetrySchedule ) + sizeof ( uint16_t ) * ( retryCount - 1 ) ); 
-    if ( *self == NULL )
-    {
-        return RC ( rcNS, rcData, rcCreating, rcMemory, rcExhausted );
-    }
-    (*self) -> code = code;
-    (*self) -> max_retries = retryCount;
-    (*self) -> open_ended = false;
-    
-    {   /* populate sleep_before_retry and open_ended */
-        uint16_t cur_value = 0;
-        uint16_t curRetry = 0;
-        s = *retries; 
-        in_number = false;
-        while ( StringPopHead ( &s, &ch ) == 0 && ch != 0 )
-        {
-            if ( ch == ',' )
-            {   
-                if ( in_number )
-                {
-                    AddSleepTime ( (*self) -> sleep_before_retry, curRetry, cur_value );
-                    ++ curRetry;
-                }
-                in_number = false;
-            }
-            else if ( ch == '+' )
-            {
-                (*self) -> open_ended = true;
-                AddSleepTime ( (*self) -> sleep_before_retry, curRetry, cur_value );
-                return 0;
-            }
-            else if ( isdigit ( ch ) )
-            {
-                if ( ! in_number ) 
-                {   /* first digit of a new number */
-                    cur_value = ch - '0';
-                }
-                else
-                {
-                    cur_value = cur_value * 10 + ch - '0';
-                }
-                in_number = true;
-            }
-            else 
-            {
-                return RC ( rcNS, rcData, rcCreating, rcNumeral, rcInvalid );
-            }
-        }
-        if ( in_number ) 
-        {
-            AddSleepTime ( (*self) -> sleep_before_retry, curRetry, cur_value );
-        }
-    }    
-    return 0;
-}
-
-static
-rc_t HttpRetryCodesDefault ( HttpRetrySchedule** self, uint16_t code )
-{
-    String def;
-    CONST_STRING(&def, "0,5,10,15,30,60");
-    return HttpRetryCodesConfig ( self, code, &def );
-}
-
-static
-rc_t HttpRetrySpecsConfigNode ( const KConfigNode* node, const char* name, HttpRetrySchedule** self, uint16_t code )
-{
-    rc_t rc;
-    rc_t rc2;
-    const KConfigNode *child;
-    rc = KConfigNodeOpenNodeRead ( node, &child, "%s", name );
-    if ( rc == 0 )
-    {
-        String * value;
-        rc = KConfigNodeReadString ( child, &value );
-        if ( rc == 0 )
-        {
-            rc = HttpRetryCodesConfig( self, code, value);
-            free(value);
-        }
-        rc2 = KConfigNodeRelease ( child );
-        if ( rc == 0 )
-        {
-            rc = rc2;
-        }
-    }
-    return rc;
-}                
-
-static
-rc_t HttpRetrySpecsFromConfig ( HttpRetrySpecs* self, const KConfigNode* node )
-{   /* retrieves only 5xx and 4xx codes */
-    uint32_t total = 0;
-    bool has4xx = false;
-    bool has5xx = false;
-    KNamelist * names;
-    uint32_t nameCount;
-    rc_t rc = KConfigNodeListChildren ( node, & names );
-    if ( rc == 0 )
-    {   /* count 4xx and 5xx */
-        uint32_t i;
-        rc = KNamelistCount ( names, & nameCount );
-        if ( rc == 0 )
-        {
-            for ( i = 0; i < nameCount; ++ i )
-            {
-                const char *name;
-                size_t size; 
-                rc = KNamelistGet ( names, i, & name );
-                if (rc != 0)
-                {
-                    KNamelistRelease ( names );
-                    break;
-                }
-                size = string_size(name);
-                if ( size == 3 )
-                {
-                    if ( string_cmp ( name, string_size(name), "4xx", 3, 3 ) == 0 )
-                    {
-                        has4xx = true;
-                        ++total;
-                    }
-                    else if ( string_cmp ( name, string_size(name), "5xx", 3, 3 ) == 0 )
-                    {
-                        has5xx = true;
-                        ++total;
-                    }
-                    else if ( name[0] == '4' || name[0] == '5' )
-                    {
-                        ++total;
-                    }
-                    else
-                    { /*LOG a bad name*/
-                    }
-                }
-                else
-                {/*LOG a bad name*/
-                }
-            }
-        }
-        /* add extra for 4xx and 5xx catch-alls if not specified */
-        if ( ! has4xx ) ++total;
-        if ( ! has5xx ) ++total;
-    }
-    
-    if (rc == 0)
-    {
-        rc_t rc2;
-        uint32_t i;
-        uint32_t cur = 0;
-        self -> count = total;
-        self -> codes = (HttpRetrySchedule**) calloc ( self -> count, sizeof * self -> codes );
-        for ( i = 0; i < nameCount; ++ i )
-        {
-            const char *name;
-            rc = KNamelistGet ( names, i, & name );  
-            
-            /* convert name to code */
-            assert ( string_size(name) == 3 );
-            if ( string_cmp ( name, 3, "4xx", 3, 3 ) == 0 )
-                rc = HttpRetrySpecsConfigNode ( node, name, & self -> codes [ cur ], 4 );
-            else if ( string_cmp ( name, 3, "5xx", 3, 3 ) == 0 )
-                rc = HttpRetrySpecsConfigNode ( node, name, & self -> codes [ cur ], 5 );
-            else if ( name[0] == '4' || name[0] == '5' )
-                rc = HttpRetrySpecsConfigNode ( node, name, & self -> codes [ cur ], ( uint16_t ) strtoul ( name, NULL, 10 ) );
-            else            
-            { /* invalid code, skip */
-                continue;
-            }
-            
-            if ( rc != 0 )
-            {
-                break;
-            }
-            ++cur;
-        }
-        
-        rc2 = KNamelistRelease ( names );
-        if ( rc == 0 )
-        {
-            rc = rc2;
-        }
-        if ( rc == 0 )
-        {
-            /* if 4xx and/or 5xx were not specified, fill in the defaults */
-            if ( ! has4xx ) 
-            {
-                rc = HttpRetryCodesDefault ( & self -> codes [cur], 4 );
-                if ( rc != 0 )
-                {
-                    free ( self -> codes );
-                    return rc;
-                }
-                ++cur;
-            }
-            if ( ! has5xx ) 
-            {
-                rc = HttpRetryCodesDefault ( & self -> codes [cur], 5 );
-                if ( rc != 0 )
-                {
-                    free ( self -> codes );
-                    return rc;
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-rc_t CC HttpRetrySpecsDestroy(HttpRetrySpecs* self)
-{
-    uint8_t i;
-    for ( i = 0; i < self -> count; ++i )
-    {
-        free ( self -> codes [ i ] );
-    }
-    free ( self -> codes );
-    return 0;
-}
-
-rc_t CC HttpRetrySpecsInit(HttpRetrySpecs* self, KConfig* kfg)
-{
-    const KConfigNode* node;
-    rc_t rc = KConfigOpenNodeRead ( kfg, &node, "http/reliable" );
-    if ( rc == 0 )
-    {   
-        rc_t rc2;
-        rc = HttpRetrySpecsFromConfig ( self, node );
-        rc2 = KConfigNodeRelease(node);
-        if ( rc == 0 )
-            rc = rc2;
-    }
-    else if ( GetRCState ( rc ) == rcNotFound )
-    {   /* set to defaults */
-        self -> count = 2;
-        self -> codes = (HttpRetrySchedule**) malloc ( ( sizeof * self -> codes ) * self -> count );
-        if ( self -> codes  == NULL )
-        {
-            return RC ( rcNS, rcData, rcCreating, rcMemory, rcExhausted );
-        }
-        
-        rc = HttpRetryCodesDefault ( & self -> codes [0], 4 );
-        if ( rc != 0 )
-        {
-            HttpRetrySpecsDestroy ( self );
-            return rc;
-        }
-        rc = HttpRetryCodesDefault ( & self -> codes [1], 5 );
-        if ( rc != 0 )
-        {
-            HttpRetrySpecsDestroy ( self );
-            return rc;
-        }
-    }   
-    
-    return rc;
-}
-
-bool HttpGetRetryCodes ( const HttpRetrySpecs* self, 
-                         uint16_t code, 
-                         uint8_t * max_retries, 
-                         const uint16_t ** sleep_before_retry, 
-                         bool * open_ended )
-{
-    int8_t catchAllIdx = -1;
-    uint8_t i;
-    
-    assert ( self );
-    assert ( max_retries );
-    assert ( sleep_before_retry );
-    assert ( open_ended );
-    
-    for ( i = 0; i < self -> count; ++i )
-    {
-        if ( self -> codes [ i ] -> code == code ) 
-        {
-            * max_retries = self -> codes [ i ] -> max_retries;
-            * sleep_before_retry = self -> codes [ i ] -> sleep_before_retry;
-            * open_ended = self -> codes [ i ] -> open_ended;
-            return true;
-        }
-        if ( catchAllIdx == -1 && self -> codes [ i ] -> code == code / 100 ) /* if more than one catch-all, use the first */
-        {
-            catchAllIdx = i;
-        }
-    }
-    
-    if ( catchAllIdx != -1 )
-    {   // code not found but there is a common setting for its group (4xx or 5xx)
-        * max_retries = self -> codes [ catchAllIdx ] -> max_retries;
-        * sleep_before_retry = self -> codes [ catchAllIdx ] -> sleep_before_retry;
-        * open_ended = self -> codes [ catchAllIdx ] -> open_ended;
-        return true;
-    }
-    
-    return false;
-}
-
-rc_t KHttpRetrierInit ( KHttpRetrier * self,    
-                        const char * url, 
-                        const struct KNSManager * kns )
-{
-    rc_t rc;
-    assert ( self );
-    assert ( kns );
-
-    memset ( self, 0, sizeof *self );
-
-    self -> url = url;
-    
-    rc = KNSManagerAddRef ( kns );
-    if ( rc != 0 )
-    {
-        return rc;
-    }
-    
-    self -> kns = kns;
-    self -> max_retries = kns -> maxNumberOfRetriesOnFailureForReliableURLs;
-    self -> max_total_wait_ms = kns -> maxTotalWaitForReliableURLs_ms;
-    
-    return 0;
-}
-
-rc_t KHttpRetrierDestroy ( KHttpRetrier * self )
-{
-    return KNSManagerRelease ( self -> kns );
-}
-
-bool KHttpRetrierWait ( KHttpRetrier * self, uint32_t status )
-{
-    assert ( self );
-    
-    if ( self -> last_status != status )
-    {
-        self -> last_status = status;
-        self -> retries_count = 0;
-        self -> total_wait_ms = 0;
-    }
-    
-    if ( self -> retries_count >= self -> max_retries || self -> total_wait_ms >= self -> max_total_wait_ms )
-    {
-        return false;
-    }
-    else
-    {
-        uint32_t to_sleep;
-        uint8_t max_retries;
-        const uint16_t * sleep_before_retry;
-        bool open_ended;
-        if ( ! HttpGetRetryCodes ( & self -> kns -> retry_specs, status, & max_retries, & sleep_before_retry, & open_ended ) )
-        {
-            return false;
-        }
-        
-        if ( self -> retries_count >= max_retries )
-        {   
-            if ( open_ended )
-            {
-                to_sleep = sleep_before_retry [ max_retries - 1 ];
-            }
-            else
-            {
-                return false;
-            }
-        }
-        else
-        {
-            to_sleep = sleep_before_retry [ self -> retries_count ];
-        }
-        
-        if ( self -> total_wait_ms + to_sleep > self -> max_total_wait_ms )
-        {
-            to_sleep = self -> max_total_wait_ms - self -> total_wait_ms;
-        }
-        self -> last_sleep = to_sleep;
-        KSleepMs( to_sleep );
-        self -> total_wait_ms += to_sleep;
-        ++ self -> retries_count;
-        
-        PLOGMSG (klogInfo, ( klogInfo, "HTTP read failure: URL=\"$(u)\" status=$(s); tried $(c)/$(m) times for $(t) milliseconds total",
-                            "u=%s,s=%d,c=%d,m=%d,t=%d", 
-                            self -> url, 
-                            status,
-                            self -> retries_count,
-                            open_ended ? self -> max_retries : max_retries, 
-                            self -> total_wait_ms ) );        
-        
-        return true;
-    }
-}
-
diff --git a/libs/kns/http.c b/libs/kns/http.c
deleted file mode 100644
index 781dd19..0000000
--- a/libs/kns/http.c
+++ /dev/null
@@ -1,324 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ==============================================================================
-*
-*/
-#include <kns/extern.h>
-
-#include <kns/manager.h>
-#include <kns/http.h>
-#include <kns/adapt.h>
-#include <kns/endpoint.h>
-#include <kns/socket.h>
-#include <kns/stream.h>
-#include <kns/impl.h>
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-#ifdef ERR
-#undef ERR
-#endif
-
-#include <klib/debug.h> /* DBGMSG */
-#include <klib/text.h>
-#include <klib/container.h>
-#include <klib/out.h>
-#include <klib/log.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <klib/printf.h>
-#include <klib/vector.h>
-#include <kproc/timeout.h>
-
-#include <os-native.h>
-#include <strtol.h>
-#include <va_copy.h>
-
-#include "mgr-priv.h"
-#include "stream-priv.h"
-
-#include <sysalloc.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-#include "http-priv.h"
-
-/*--------------------------------------------------------------------------
- * URLBlock
- *  RFC 3986
- *
- * TBD - replace with VPath
- */
-
-/* Init
- *  Initialize to default values in case portions are missing
- */
-void URLBlockInit ( URLBlock *self )
-{
-    CONST_STRING ( & self -> scheme, "http" );
-    CONST_STRING ( & self -> host, "" );
-    CONST_STRING ( & self -> path, "/" );
-    CONST_STRING ( & self -> query, "" );
-    CONST_STRING ( & self -> fragment, "" );
-
-    self -> port = 0; /* 0 = DEFAULT 80 for http */
-
-    self -> scheme_type = st_NONE;
-}
-
-/* ParseUrl
- *  accept standard, full http URL:
- *    <scheme>://<host>[:<port>]/<path>[?<query>][#<fragment>]
- *
- *  scheme can be missing, i.e.:
- *    //<host>[:<port>]/<path>[?<query>][#<fragment>]
- *
- *  we can also accept missing path[query][fragment], i.e.:
- *    <scheme>://<host>[:<port>]
- *    //<host>[:<port>]
- *
- *  finally, we can accept path without host, i.e.:
- *    /<path>[?<query>][#<fragment>]
- *
- *  patterns to reject:
- *    <scheme>:/<path>...    # scheme followed by anything other than '//'
- *    <path>...              # no leading '/'
- */
-rc_t ParseUrl ( URLBlock * b, const char * url, size_t url_size ) 
-{
-    rc_t rc;
-    char * sep;
-    const char * buf = url;
-    const char * end = buf + url_size;
-
-    bool have_host, have_scheme;
-
-    URLBlockInit ( b );
-
-    /* scheme default to false because url may be a path */
-    have_scheme = false;
-
-    /* check if url is empty
-       scheme cannot start with a forward slash - detecting an absolute path */
-    if ( buf < end && buf [ 0 ] != '/' )
-    {
-        /* here we identify the scheme by finding the ':' */
-        sep = string_chr ( url, end - buf, ':' );
-        if ( sep != NULL )
-        {
-            String http;
-            CONST_STRING ( & http, "http" );
-
-            /* here we assume the scheme will be http */
-            b -> scheme_type = st_HTTP;
-
-            /* assign scheme to the url_block */
-            StringInit ( & b -> scheme, buf, sep - buf, ( uint32_t ) ( sep - buf ) );
-
-            /* check to make sure it is 'http' */
-            if ( ! StringCaseEqual ( & b -> scheme, & http ) )
-            {
-                /* it is not http, check for s3 */
-                String s3;
-                CONST_STRING ( & s3, "s3" );
-                
-                if ( ! StringCaseEqual ( & b -> scheme, & s3 ) )
-                {
-                    b -> scheme_type = st_NONE;
-                    rc = RC ( rcNS, rcUrl, rcEvaluating, rcName, rcIncorrect );
-                    PLOGERR ( klogErr ,( klogErr, rc, "Scheme is '$(scheme)'", "scheme=%S", & b -> scheme ) );
-                    return rc;
-                }
-                b -> scheme_type = st_S3;
-            }
-
-            /* accept scheme - skip past */
-            buf = sep + 1;
-            have_scheme = true;
-        }
-    }
-    
-    /* discard fragment - not sending to server, but still record it */
-    sep = string_rchr ( buf, end - buf,  '#' );
-    if ( sep != NULL )
-    {
-        /* advance to first character in fragment */
-        const char *frag = sep + 1;
-
-        /* assign fragment to the url_block */
-        StringInit ( & b -> fragment, frag, end - frag, ( uint32_t ) ( end - frag ) );
-
-        /* remove fragment from URL */
-        end = sep;
-    }
-                         
-    /* detect host */
-    have_host = false;
-    
-    /* check for '//' in the first two elements 
-       will fail if no scheme was detected */
-    if ( string_match ( "//", 2, buf, end - buf, 2, NULL ) == 2 )
-    {
-        /* skip ahead to host spec */
-        buf += 2;
-
-        /* if we ran into the end of the string, we dont have a host */
-        if ( buf == end )
-        {
-            rc = RC ( rcNS, rcUrl, rcParsing, rcOffset, rcIncorrect );
-            PLOGERR ( klogErr ,( klogErr, rc, "expected hostspec in url '$(url)'", "url=%.*s", ( uint32_t ) url_size, url ) );
-            return rc;
-        }
-
-        have_host = true;
-    }
-
-    /* if there is a scheme but no host, error */
-    if ( have_scheme && ! have_host )
-    {
-        rc = RC ( rcNS, rcUrl, rcParsing, rcName, rcNotFound );
-        PLOGERR ( klogErr ,( klogErr, rc, "Host is '$(host)'", "host=%s", "NULL" ) );
-        return rc;
-    }
-        
-    /* find dividing line between host and path, which MUST start with '/' */
-    sep = string_chr ( buf, end - buf, '/' );
-
-    /* detect no path */
-    if ( sep == NULL )
-    {
-        /* no path and no host */
-        if ( ! have_host )
-        {
-            rc = RC ( rcNS, rcUrl, rcParsing, rcName, rcNotFound );
-            PLOGERR ( klogErr ,( klogErr, rc, "Path is '$(path)'", "path=%s", "/" ) );
-            return rc;
-        }
-        /* no path but have host 
-           default value for path is already '/' */
-        sep = ( char* ) end;
-    }
-
-    /* capture host ( could be empty - just given a file system path ) */
-    if ( have_host )
-    {
-        /* assign host to url_block */
-        StringInit ( & b -> host, buf, sep - buf, ( uint32_t ) ( sep - buf ) );
-
-        /* advance to path */
-        buf = sep;
-    }
-
-    /* detect relative path 
-       <hostname>/<path> - OK, handled above
-       /<path> - OK
-    */
-    if ( buf != sep )
-    {
-        rc = RC ( rcNS, rcPath, rcParsing, rcOffset, rcIncorrect );
-        PLOGERR ( klogErr ,( klogErr, rc, "Path is '$(path)'", "path=%s", "NULL" ) );
-        return rc;
-    }
-
-    /* if we dont have a host we must have a path
-       if we DO have a host and the path is not empty */
-    if ( ! have_host || buf != end )
-    {
-        /* check for query */
-        sep = string_chr ( buf, end - buf,  '?' );
-        if ( sep != NULL )
-        {
-            const char *query = sep + 1;
-            /* assign query to url_block */
-            StringInit ( & b -> query, query, end - query, ( uint32_t ) ( end - query ) ); 
-
-            /* advance end to sep */
-            end = sep;
-        }
-
-        /* assign path ( could also be empty ) */
-        StringInit ( & b -> path, buf, end - buf, ( uint32_t ) ( end - buf ) );
-    }
-
-    /* if we have a host, split on ':' to check for a port
-       OK if not found */
-    if ( have_host )
-    {
-        buf = b -> host . addr;
-        end = buf + b -> host . size;
-
-        /* check for port */
-        sep = string_chr ( buf, end - buf,  ':' );
-        if ( sep != NULL )
-        {
-            char *term;
-            const char * port = sep + 1;
-            /* assign port to url block converting to 32 bit int 
-             term should point to end */
-            b -> port = strtou32 ( port, & term, 10 );
-
-            /* error if 0 or term isnt at the end of the buffer */
-            if ( b -> port == 0 || ( const char* ) term != end )
-            {
-                rc = RC ( rcNS, rcUrl, rcParsing, rcNoObj, rcIncorrect );
-                PLOGERR ( klogErr ,( klogErr, rc, "Port is '$(port)'", "port=%u", b -> port ) );
-                return rc;
-            }
-
-            /* assign host to url_block */
-            StringInit ( & b -> host, buf, sep - buf, ( uint32_t ) ( sep - buf ) );
-        }
-    }
-    
-    return 0;
-}
-
-/*--------------------------------------------------------------------------
- * KHttpHeader
- *  node structure to place http header lines into a BSTree
- */
-
-void CC KHttpHeaderWhack ( BSTNode *n, void *ignore )
-{
-    KHttpHeader * self = ( KHttpHeader* ) n;
-    KDataBufferWhack ( & self -> value_storage );
-    free ( self );
-}
-
-int64_t CC KHttpHeaderSort ( const BSTNode *na, const BSTNode *nb )
-{
-    const KHttpHeader *a = ( const KHttpHeader* ) na;
-    const KHttpHeader *b = ( const KHttpHeader* ) nb;
-
-    return StringCaseCompare ( & a -> name, & b -> name );
-}
-
-int64_t CC KHttpHeaderCmp ( const void *item, const BSTNode *n )
-{
-    const String *a = item;
-    const KHttpHeader *b = ( const KHttpHeader * ) n;
-
-    return StringCaseCompare ( a, & b -> name );
-}
diff --git a/libs/kns/kns_manager-ext.c b/libs/kns/kns_manager-ext.c
deleted file mode 100644
index 83ac39c..0000000
--- a/libs/kns/kns_manager-ext.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kns/extern.h>
-
-#include <kns/manager-ext.h>
-#include <kns/http.h>
-#include <kns/stream.h>
-
-#include <klib/sra-release-version.h>
-#include <klib/data-buffer.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-
-#include <ctype.h>
-#include <string.h>
-#include <assert.h>
-
-
-/** These functions belong to Extended KNSManager **/
-
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 != 0 && rc == 0) { rc = rc2; } obj = NULL; } while (false)
-
-static rc_t CC KNSManagerNewReleaseVersionImpl(const struct KNSManager *self,
-    SraReleaseVersion *newVersion)
-{
-    rc_t rc = 0;
-    KDataBuffer result;
-    KHttpRequest *req = NULL;
-    KHttpResult *rslt = NULL;
-    if (newVersion == NULL) {
-        return RC(rcNS, rcArgv, rcAccessing, rcParam, rcNull);
-    }
-    memset(newVersion, 0, sizeof *newVersion);
-    if (self == NULL) {
-        return RC(rcNS, rcArgv, rcAccessing, rcSelf, rcNull);
-    }
-    memset(&result, 0, sizeof result);
-    if (rc == 0) {
-        rc = KNSManagerMakeRequest(self, &req, 0x01010000, NULL,
-  "http://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/current/sratoolkit.current.version"
-        );
-    }
-    if (rc == 0) {
-        rc = KHttpRequestGET(req, &rslt);
-    }
-    if (rc == 0) {
-        uint32_t code = 0;
-        rc = KHttpResultStatus(rslt, &code, NULL, 0, NULL);
-        if (rc == 0) {
-            if (code != 200) {
-                rc = RC(rcNS, rcFile, rcReading, rcFile, rcInvalid);
-            }
-        }
-    }
-    if (rc == 0) {
-        size_t total = 0;
-        KStream *response = NULL;
-        rc = KHttpResultGetInputStream(rslt, &response);
-        if (rc == 0) {
-            rc = KDataBufferMakeBytes(&result, 1024);
-        }
-        while (rc == 0) {
-            size_t num_read = 0;
-            uint8_t *base = NULL;
-            uint64_t avail = result.elem_count - total;
-            if (avail < 256) {
-                rc = KDataBufferResize(&result, result.elem_count + 1024);
-                if (rc != 0) {
-                    break;
-                }
-            }
-            base = result.base;
-            rc = KStreamRead(response, &base[total], result.elem_count - total,
-                &num_read);
-            if (num_read > 0 || rc != 0) {
-                DBGMSG(DBG_VFS, DBG_FLAG(DBG_VFS), ("KStreamRead"
-                    "(sratoolkit.current.version, %zu) = %R\n", num_read, rc));
-            }
-            if (rc != 0) {
-                /* TBD - look more closely at rc */
-                if (num_read > 0) {
-                    rc = 0;
-                }
-                else {
-                    break;
-                }
-            }
-            if (num_read == 0) {
-                break;
-            }
-            total += num_read;
-        }
-        RELEASE(KStream, response);
-        if (rc == 0) {
-            DBGMSG(DBG_VFS, DBG_FLAG(DBG_VFS),
-                ("sratoolkit.current.version (%zu)\n", total));
-            result.elem_count = total;
-        }
-    }
-
-    if (rc == 0) {
-        const char *start = (const void*)(result.base);
-        size_t size = KDataBufferBytes(&result);
-        DBGMSG(DBG_VFS, DBG_FLAG(DBG_VFS),
-            ("sratoolkit.current.version = '%.*s'\n", (uint32_t)size, start));
-        rc = SraReleaseVersionInit(newVersion, start, size);
-    }
-
-    KDataBufferWhack(&result);
-    RELEASE(KHttpResult, rslt);
-    RELEASE(KHttpRequest, req);
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KNSManagerNewReleaseVersion(const struct KNSManager *self,
-    SraReleaseVersion *newVersion)
-{
-    rc_t rc = 0;
-    int i = 0, retryOnFailure = 2;
-    for (i = 0; i < retryOnFailure; ++i) {
-        rc = KNSManagerNewReleaseVersionImpl(self, newVersion);
-        if (rc == 0) {
-            break;
-        }
-        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_ERR), (
-            "@@@@@@@@2: KNSManagerNewReleaseVersion %d/%d = %R"
-            "\n", i + 1, retryOnFailure, rc));
-    }
-    return rc;
-}
diff --git a/libs/kns/kns_manager.c b/libs/kns/kns_manager.c
deleted file mode 100644
index a0dbc2c..0000000
--- a/libs/kns/kns_manager.c
+++ /dev/null
@@ -1,346 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kns/extern.h>
-
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <kfs/dyload.h>
-#include <kfs/directory.h>
-#include <kfs/impl.h>
-
-#include "kns_mgr_priv.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-#include <sysalloc.h>
-
-static const char knsmanager_classname [] = "KNSManager";
-static struct KNSManager * kns_mgr_singleton = NULL;
-static KDylib *lib_curl_handle = NULL;
-
-
-LIB_EXPORT rc_t CC KNSManagerAddRef ( const struct KNSManager *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd( &self->refcount, knsmanager_classname ) )
-        {
-        case krefOkay:
-            break;
-        case krefZero:
-            return RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcIncorrect);
-        case krefLimit:
-            return RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcExhausted);
-        case krefNegative:
-            return RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcInvalid);
-        default:
-            return RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcUnknown);
-        }
-    }
-    return 0;
-}
-
-
-static rc_t KNSManager_Make_DlCurl( KDyld ** dl )
-{
-    rc_t rc = KDyldMake ( dl );
-#if ! WINDOWS
-    if ( rc == 0 )
-    {
-        const KDirectory * dir;
-        rc = KDyldHomeDirectory ( *dl, &dir, ( fptr_t ) KNSManager_Make_DlCurl );
-        if ( rc == 0 )
-        {
-            struct KSysDir const *sysdir = KDirectoryGetSysDir ( dir );
-            if ( sysdir != NULL )
-            {
-                char int_path[ 4096 ];
-                rc = KSysDirRealPath ( sysdir, int_path, sizeof int_path, "." );
-                if ( rc == 0 )
-                {
-                    KDyldAddSearchPath ( *dl, int_path );
-                }
-            }
-            KDirectoryRelease( dir );
-        }
-        rc = 0;
-    }
-#endif
-    return rc;
-}
-
-static rc_t KNSManagerLoadLib( struct KNSManager *self )
-{
-#ifdef HAVE_LIBCURL /* just link directly */
-    self->curl_easy_init_fkt      = &curl_easy_init;
-    self->curl_easy_cleanup_fkt   = &curl_easy_cleanup;
-    self->curl_easy_setopt_fkt    = &curl_easy_setopt;
-    self->curl_easy_perform_fkt   = &curl_easy_perform;
-    self->curl_easy_getinfo_fkt   = &curl_easy_getinfo;
-    self->curl_slist_append_fkt   = &curl_slist_append;
-    self->curl_slist_free_all_fkt = &curl_slist_free_all;
-
-    return 0;
-#else
-    KDyld *dl;
-    /* make a dynamic-library loader */
-    rc_t rc = KDyldMake ( &dl );
-    if ( rc == 0 )
-    {
-        /* load the curl-library */
-        rc = KDyldLoadLib( dl, &lib_curl_handle, LPFX "curl" SHLX );
-        if ( rc != 0 )
-        {
-            KDyldRelease ( dl );
-            rc = KNSManager_Make_DlCurl( &dl );
-            if ( rc == 0 )
-            {
-                rc = KDyldLoadLib( dl, &lib_curl_handle, LPFX "curl" SHLX );
-            }
-        }
-        if ( rc == 0 )
-        {
-            KSymAddr *sym;
-
-            /* resolve symbols */
-
-            /* curl_easy_init() */
-            rc = KDylibSymbol( lib_curl_handle, &sym, "curl_easy_init" );
-            if ( rc == 0 )
-            {
-                KSymAddrAsFunc( sym, ( fptr_t* ) &(self->curl_easy_init_fkt) );
-                KSymAddrRelease( sym );
-            }
-
-            /* curl_easy_cleanup() */
-            if ( rc == 0 )
-            {
-                rc = KDylibSymbol( lib_curl_handle, &sym, "curl_easy_cleanup" );
-                KSymAddrAsFunc( sym, ( fptr_t* ) &(self->curl_easy_cleanup_fkt) );
-                KSymAddrRelease( sym );
-            }
-
-            /* curl_easy_setopt() */
-            if ( rc == 0 )
-            {
-                rc = KDylibSymbol( lib_curl_handle, &sym, "curl_easy_setopt" );
-                KSymAddrAsFunc( sym, ( fptr_t* ) &(self->curl_easy_setopt_fkt) );
-                KSymAddrRelease( sym );
-            }
-
-            /* curl_easy_perform() */
-            if ( rc == 0 )
-            {
-                rc = KDylibSymbol( lib_curl_handle, &sym, "curl_easy_perform" );
-                KSymAddrAsFunc( sym, ( fptr_t* ) &(self->curl_easy_perform_fkt) );
-                KSymAddrRelease( sym );
-            }
-
-            /* curl_easy_getinfo() */
-            if ( rc == 0 )
-            {
-                rc = KDylibSymbol( lib_curl_handle, &sym, "curl_easy_getinfo" );
-                KSymAddrAsFunc( sym, ( fptr_t* ) &(self->curl_easy_getinfo_fkt) );
-                KSymAddrRelease( sym );
-            }
-
-            /* curl_slist_append() */
-            if ( rc == 0 )
-            {
-                rc = KDylibSymbol( lib_curl_handle, &sym, "curl_slist_append" );
-                KSymAddrAsFunc( sym, ( fptr_t* ) &(self->curl_slist_append_fkt) );
-                KSymAddrRelease( sym );
-            }
-
-            /* curl_version() */
-            if ( rc == 0 )
-            {
-                rc = KDylibSymbol( lib_curl_handle, &sym, "curl_version" );
-                KSymAddrAsFunc( sym, ( fptr_t* ) &(self->curl_version_fkt) );
-                KSymAddrRelease( sym );
-            }
-
-            /* curl_slist_free_all() */
-            if ( rc == 0 )
-            {
-                rc = KDylibSymbol( lib_curl_handle, &sym, "curl_slist_free_all" );
-                KSymAddrAsFunc( sym, ( fptr_t* ) &(self->curl_slist_free_all_fkt) );
-                KSymAddrRelease( sym );
-            }
-
-            /* bail on error */
-            if ( rc != 0 )
-            {
-                KDylibRelease ( lib_curl_handle );
-                lib_curl_handle = NULL;
-                self->curl_easy_init_fkt = NULL;
-                self->curl_easy_cleanup_fkt = NULL;
-                self->curl_easy_setopt_fkt = NULL;
-                self->curl_easy_perform_fkt = NULL;
-                self->curl_slist_append_fkt = NULL;
-                self->curl_version_fkt = NULL;
-                self->curl_easy_getinfo_fkt = NULL;
-            }
-        }
-        KDyldRelease ( dl );
-    }
-
-    return rc;
-#endif
-}
-
-
-LIB_EXPORT rc_t CC KNSManagerMake( struct KNSManager **self )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        return RC( rcNS, rcMgr, rcConstructing, rcSelf, rcNull );
-
-    *self = kns_mgr_singleton;
-    if ( kns_mgr_singleton != NULL )
-    {
-/*      fprintf(stderr, "%p KNSManagerMake(KNSManagerAddRef)\n", *self); */
-        rc = KNSManagerAddRef( kns_mgr_singleton );
-        if ( rc != 0 )
-            *self = NULL;
-    }
-    else
-    {
-        struct KNSManager *tmp;
-        tmp = calloc( 1, sizeof * tmp );
-        if ( tmp == NULL )
-            rc = RC( rcNS, rcMgr, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KNSManagerInit ( tmp );
-            if ( rc != 0 )
-            {
-                free ( tmp );
-                tmp = NULL;
-            }
-            else
-            {
-                tmp->create_rc = KNSManagerLoadLib( tmp );
-                KRefcountInit( &tmp->refcount, 1, "KNS", "make", knsmanager_classname );
-
-/*              fprintf(stderr,
-                    "%p KNSManagerLoadLib = %d\n", tmp, tmp->create_rc); */
-            }
-        }
-        *self = tmp;
-        kns_mgr_singleton = tmp;
-    }
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KNSManagerAvail( const struct KNSManager *self )
-{
-    if ( self == NULL )
-        return RC( rcNS, rcMgr, rcReading, rcSelf, rcNull );
-    return self->create_rc;
-}
-
-
-LIB_EXPORT rc_t CC KNSManagerCurlVersion( const struct KNSManager *self, const char ** version_string )
-{
-    if ( self == NULL )
-        return RC( rcNS, rcMgr, rcReading, rcSelf, rcNull );
-    if ( version_string == NULL )
-        return RC( rcNS, rcMgr, rcReading, rcParam, rcNull );
-    if ( self->create_rc != 0 )
-        return self->create_rc;
-    *version_string = self->curl_version_fkt();
-    return 0;
-}
-
-
-LIB_EXPORT void KNSManagerSetVerbose ( struct KNSManager *self, bool verbosity )
-{
-    if ( self != NULL )
-        self->verbose = verbosity;
-}
-
-
-LIB_EXPORT bool KNSManagerIsVerbose ( struct KNSManager *self )
-{
-    if ( self != NULL )
-        return self->verbose;
-    else
-        return false;
-}
-
-
-static rc_t KNSManagerDestroy( struct KNSManager *self )
-{
-    if ( self == NULL )
-        return RC( rcNS, rcFile, rcDestroying, rcSelf, rcNull );
-
-/*  fprintf(stderr, "%p KNSManagerDestroy\n", self); */
-
-    KDylibRelease ( lib_curl_handle );
-    lib_curl_handle = NULL;
-
-    KNSManagerCleanup ( self );
-
-    KRefcountWhack( &self->refcount, knsmanager_classname );
-
-    memset(self, 0, sizeof *self);
-    free( self );
-    kns_mgr_singleton = NULL;
-    
-    return 0;
-}
-
-
-LIB_EXPORT rc_t CC KNSManagerRelease( const struct KNSManager *self )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop( &self->refcount, knsmanager_classname ) )
-        {
-        case krefOkay:
-        case krefZero:
-/*        fprintf(stderr, "%p KNSManagerRelease(!KNSManagerDestroy)\n", self);*/
-            break;
-        case krefWhack:
-            rc = KNSManagerDestroy( ( struct KNSManager * )self );
-            break;
-        case krefNegative:
-            return RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcInvalid );
-        default:
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcUnknown );
-            break;            
-        }
-    }
-    return rc;
-}
diff --git a/libs/kns/linux/sysendpoint.c b/libs/kns/linux/sysendpoint.c
deleted file mode 100644
index f154b5c..0000000
--- a/libs/kns/linux/sysendpoint.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kns/impl.h>
-#include <kns/endpoint.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-
-#include "stream-priv.h"
-
-#include <string.h>
-#include <netdb.h>
-#include <arpa/inet.h>
-#include <assert.h>
-
-#include <errno.h>  /* ERANGE definition */
-
-#include <sysalloc.h>
-
-extern int h_errno;
-
-/* InitDNSEndpoint
- *  initialize the endpoint with a DNS name and a port number
- *
- *  "ep" [ OUT ] - address of endpoint block to be intialized
- *
- *  "dns" [ IN ] - textual DNS address.
- *
- *  "port" [ IN, DEFAULT 0 ] - binary port number in native integer byte order.
- *   if the special port number 0 is given, it represents any available port.
- */
-LIB_EXPORT
-rc_t CC KNSManagerInitDNSEndpoint ( struct KNSManager const *self,
-    KEndPoint *ep, struct String const *dns, uint16_t port )
-{
-    rc_t rc = 0;
-
-    if ( ep == NULL )
-        rc = RC (rcNS, rcNoTarg, rcInitializing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcInitializing, rcSelf, rcNull );
-        else if ( dns == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcInitializing, rcParam, rcNull );
-        else if ( dns -> size == 0 )
-            rc = RC ( rcNS, rcNoTarg, rcInitializing, rcSelf, rcInsufficient );
-        else
-        {
-            KDataBuffer b;
-            char buffer [ 4096 ], * hostname = buffer;
-            size_t buff_size = sizeof buffer;
-
-            if ( dns -> size >= sizeof buffer )
-            {
-                rc = KDataBufferMakeBytes ( & b, dns -> size + 1 );
-                if ( rc == 0 )
-                {
-                    hostname = b . base;
-                    buff_size = ( size_t ) b . elem_count;
-                }
-            }
-
-            if ( rc == 0 )
-            {
-                size_t size;
-                rc = string_printf ( hostname, buff_size, & size, "%S", dns );
-
-                assert ( rc == 0 );
-                assert ( size < buff_size );
-                assert ( hostname [ size ] == 0 );
-
-                if ( rc ==  0 )
-                {
-                    char BB [ 1024 ];
-                    struct hostent ret;
-                    struct hostent * remote = NULL;
-                    int h_errnop = 0;
-                    int ghbnr = 0;
-
-                    ghbnr = gethostbyname_r (
-                                        hostname,
-                                        & ret,
-                                        BB,
-                                        sizeof ( BB ),
-                                        & remote,
-                                        & h_errnop
-                                        );
-                    if ( ghbnr == 0 && remote != NULL )
-                    { 
-                        ep -> type = epIPV4;
-                        memcpy ( & ep -> u . ipv4 . addr, remote -> h_addr_list [ 0 ], sizeof ep -> u . ipv4 . addr );
-                        ep -> u . ipv4 . addr = htonl ( ep -> u . ipv4 . addr );
-                        ep -> u . ipv4 . port = ( uint16_t ) port;
-                    }
-                    else switch ( h_errnop )
-                    {
-                    case HOST_NOT_FOUND: /* The specified host is unknown */
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcNotFound );
-                        break;
-                    case NO_ADDRESS: /* The requested names valid but does not have an IP address */
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcInconsistent );
-                        break;
-#if ! defined NO_ADDRESS || ! defined NO_DATA || NO_ADDRESS != NO_DATA
-                    case NO_DATA: /* The requested name s valid but does not have an IP address */
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcEmpty );
-                        break;
-#endif
-                    case NO_RECOVERY: /* A nonrecoverable name server error occured */
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcDestroyed );
-                        break;
-                    case TRY_AGAIN: /* A temporary error occured on an authoritative name server. Try again later */
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcBusy );
-                        break;
-                    case ERANGE:
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcExhausted );
-                        break;
-                    default :
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcUnknown );
-                    }
-                }
-            }
-
-            if ( hostname != buffer )
-                KDataBufferWhack ( & b );
-        }
-
-        if ( rc != 0 )
-            memset ( ep, 0, sizeof * ep );        
-    }
-
-    return rc;
-}
diff --git a/libs/kns/linux/syspoll.c b/libs/kns/linux/syspoll.c
deleted file mode 100644
index 6e3014f..0000000
--- a/libs/kns/linux/syspoll.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-#include <kns/extern.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <kproc/timeout.h>
-#include <os-native.h>
-
-#include "poll-priv.h"
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-#include <os-native.h>
-
-#include <poll.h>
-#include <unistd.h>
-#include <errno.h>
-
-
-/* socket_wait
- *  wait for an event or a timeout
- */
-int socket_wait ( int fd, int events, timeout_t *tm )
-{
-    int i, status;
-    struct pollfd fds [ 1 ];
-        
-    /* poll for data with no delay */
-    for ( i = 0; i < 2; ++ i )
-    {
-        fds [ 0 ] . fd = fd;
-        fds [ 0 ] . events = events;
-        fds [ 0 ] . revents = 0;
-        
-        status = poll ( fds, sizeof fds / sizeof fds [ 0 ], 0 );
-        if ( status > 0 )
-            return fds [ 0 ] . revents;
-        if ( status < 0 )
-            return -1;
-    }
-
-    /* test for infinite timeout */
-    while ( tm == NULL )
-    {
-        status = poll ( fds, sizeof fds / sizeof fds [ 0 ], 1000 );
-        if ( status > 0 )
-            return fds [ 0 ] . revents;
-        if ( status < 0 )
-            return -1;
-
-        /* TBD - check for quitting event
-           this may want to be a callback on the manager
-           or on the socket */
-    }
-
-    /* no blocking */
-    if ( tm -> mS == 0 )
-        return 0;
-
-#if PPOLL_USED_A_PROPER_TIMEOUT_INSTEAD_OF_BEING_CLOWNS
-
-    /* convert to absolute time */
-    if ( ! tm -> prepared )
-        TimeoutPrepare ( tm );
-
-    /* wait until final guy */
-    status = ppoll ( fds, sizeof fds / sizeof fds [ 0 ], & tm -> ts, NULL );
-
-#elif WHY_BOTHER_WITH_PPOLL_WHEN_POLL_TAKES_A_RELATIVE_TIMEOUT_ALREADY || 1
-
-    /* wait until final guy */
-    status = poll ( fds, sizeof fds / sizeof fds [ 0 ], tm -> mS );
-
-#endif
-
-    if ( status > 0 )
-        return fds [ 0 ] . revents;
-
-    return status;
-}
diff --git a/libs/kns/mac/sysendpoint.c b/libs/kns/mac/sysendpoint.c
deleted file mode 100644
index 6023cd0..0000000
--- a/libs/kns/mac/sysendpoint.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kns/impl.h>
-#include <kns/endpoint.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-
-#include "stream-priv.h"
-
-#include <string.h>
-#include <netdb.h>
-#include <arpa/inet.h>
-#include <assert.h>
-
-#include <sysalloc.h>
-
-extern int h_errno;
-
-/* InitDNSEndpoint
- *  initialize the endpoint with a DNS name and a port number
- *
- *  "ep" [ OUT ] - address of endpoint block to be intialized
- *
- *  "dns" [ IN ] - textual DNS address.
- *
- *  "port" [ IN, DEFAULT 0 ] - binary port number in native integer byte order.
- *   if the special port number 0 is given, it represents any available port.
- */
-LIB_EXPORT
-rc_t CC KNSManagerInitDNSEndpoint ( struct KNSManager const *self,
-    KEndPoint *ep, struct String const *dns, uint16_t port )
-{
-    rc_t rc = 0;
-
-    if ( ep == NULL )
-        rc = RC (rcNS, rcNoTarg, rcInitializing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcInitializing, rcSelf, rcNull );
-        else if ( dns == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcInitializing, rcParam, rcNull );
-        else if ( dns -> size == 0 )
-            rc = RC ( rcNS, rcNoTarg, rcInitializing, rcSelf, rcInsufficient );
-        else
-        {
-            KDataBuffer b;
-            char buffer [ 4096 ], * hostname = buffer;
-            size_t buff_size = sizeof buffer;
-
-            if ( dns -> size >= sizeof buffer )
-            {
-                rc = KDataBufferMakeBytes ( & b, dns -> size + 1 );
-                if ( rc == 0 )
-                {
-                    hostname = b . base;
-                    buff_size = ( size_t ) b . elem_count;
-                }
-            }
-
-            if ( rc == 0 )
-            {
-                size_t size;
-                rc = string_printf ( hostname, buff_size, & size, "%S", dns );
-
-                assert ( rc == 0 );
-                assert ( size < buff_size );
-                assert ( hostname [ size ] == 0 );
-
-                if ( rc ==  0 )
-                {
-                    struct hostent *remote = gethostbyname ( hostname );
-                    if ( remote != NULL )
-                    { 
-                        ep -> type = epIPV4;
-                        memcpy ( & ep -> u . ipv4 . addr, remote -> h_addr_list [ 0 ], sizeof ep -> u . ipv4 . addr );
-                        ep -> u . ipv4 . addr = htonl ( ep -> u . ipv4 . addr );
-                        ep -> u . ipv4 . port = ( uint16_t ) port;
-                    }
-                    else switch ( h_errno )
-                    {
-                    case HOST_NOT_FOUND: /* The specified host is unknown */
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcNotFound );
-                        break;
-                    case NO_ADDRESS: /* The requested names valid but does not have an IP address */
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcInconsistent );
-                        break;
-#if ! defined NO_ADDRESS || ! defined NO_DATA || NO_ADDRESS != NO_DATA
-                    case NO_DATA: /* The requested name s valid but does not have an IP address */
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcEmpty );
-                        break;
-#endif
-                    case NO_RECOVERY: /* A nonrecoverable name server error occured */
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcDestroyed );
-                        break;
-                    case TRY_AGAIN: /* A temporary error occured on an authoritative name server. Try again later */
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcBusy );
-                        break;
-                    default :
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcError, rcUnknown );
-                    }
-                }
-            }
-
-            if ( hostname != buffer )
-                KDataBufferWhack ( & b );
-        }
-
-        if ( rc != 0 )
-            memset ( ep, 0, sizeof * ep );        
-    }
-
-    return rc;
-}
diff --git a/libs/kns/mac/syspoll.c b/libs/kns/mac/syspoll.c
deleted file mode 100644
index 4c41f48..0000000
--- a/libs/kns/mac/syspoll.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-#include <kns/extern.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <kproc/timeout.h>
-
-#include "poll-priv.h"
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-#include <os-native.h>
-
-#include <poll.h>
-#include <unistd.h>
-#include <errno.h>
-
-
-/* socket_wait
- *  wait for an event or a timeout
- */
-int socket_wait ( int fd, int events, timeout_t *tm )
-{
-    int i, status;
-    struct pollfd fds [ 1 ];
-        
-    /* poll for data with no delay */
-    for ( i = 0; i < 2; ++ i )
-    {
-        fds [ 0 ] . fd = fd;
-        fds [ 0 ] . events = events;
-        fds [ 0 ] . revents = 0;
-        
-        status = poll ( fds, sizeof fds / sizeof fds [ 0 ], 0 );
-        if ( status > 0 )
-            return fds [ 0 ] . revents;
-        if ( status < 0 )
-            return -1;
-    }
-
-    /* test for infinite timeout */
-    while ( tm == NULL )
-    {
-        status = poll ( fds, sizeof fds / sizeof fds [ 0 ], 1000 );
-        if ( status > 0 )
-            return fds [ 0 ] . revents;
-        if ( status < 0 )
-            return -1;
-
-        /* TBD - check for quitting event
-           this may want to be a callback on the manager
-           or on the socket */
-    }
-
-    /* no blocking */
-    if ( tm -> mS == 0 )
-        return 0;
-
-    /* Darwin doesn't appear to support ppoll,
-       so we just wait for the specified mS,
-       regardless of how long we may have waited before */
-
-    /* wait until final guy */
-    status = poll ( fds, sizeof fds / sizeof fds [ 0 ], tm -> mS );
-    if ( status > 0 )
-        return fds [ 0 ] . revents;
-
-    return status;
-}
diff --git a/libs/kns/manager.c b/libs/kns/manager.c
deleted file mode 100644
index 0f17553..0000000
--- a/libs/kns/manager.c
+++ /dev/null
@@ -1,720 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kns/extern.h>
-
-#include "http-priv.h"
-#include "mgr-priv.h"
-#include "stream-priv.h"
-#include "sysmgr.h"
-#include "../klib/release-vers.h"
-
-#include <kfg/config.h>
-
-#include <klib/printf.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-
-#include <kns/manager.h>
-#include <kns/socket.h>
-#include <kns/http.h>
-
-#include <vfs/manager.h>
-#include <vfs/path.h>
-
-#include <atomic.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifndef MAX_CONN_LIMIT
-#define MAX_CONN_LIMIT ( 10 * 60 )
-#endif
-
-#ifndef MAX_CONN_READ_LIMIT
-#define MAX_CONN_READ_LIMIT ( 10 * 60 * 1000 )
-#endif
-
-#ifndef MAX_CONN_WRITE_LIMIT
-#define MAX_CONN_WRITE_LIMIT ( 10 * 60 * 1000 )
-#endif
-
-static char kns_manager_user_agent [ 128 ] = "ncbi-vdb";
-
-#define USE_SINGLETON 1
-
-#if USE_SINGLETON
-static atomic_ptr_t kns_singleton;
-#endif
-
-static
-rc_t KNSManagerWhack ( KNSManager * self )
-{
-    rc_t rc;
-
-#if USE_SINGLETON
-    KNSManager * our_mgr = atomic_test_and_set_ptr ( & kns_singleton, NULL, NULL );
-    if ( self == our_mgr )
-        return 0;
-#endif
-
-    if ( self -> http_proxy != NULL )
-        StringWhack ( self -> http_proxy );
-
-    if ( self -> aws_access_key_id != NULL )
-        StringWhack ( self -> aws_access_key_id );
-
-    if ( self -> aws_secret_access_key != NULL )
-        StringWhack ( self -> aws_secret_access_key );
-
-    if ( self -> aws_region != NULL )
-        StringWhack ( self -> aws_region );
-
-    if ( self -> aws_output != NULL )
-        StringWhack ( self -> aws_output );
-    
-    rc = HttpRetrySpecsDestroy ( & self -> retry_specs );
-
-    free ( self );
-
-    KNSManagerCleanup ();
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KNSManagerAddRef ( const KNSManager *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd( &self->refcount, "KNSManager" ) )
-        {
-        case krefLimit:
-            return RC ( rcNS, rcMgr, rcAttaching, rcRefcount, rcExcessive );
-        case krefNegative:
-            return RC ( rcNS, rcMgr, rcAttaching, rcRefcount, rcInvalid );
-        }
-    }
-    return 0;
-}
-
-
-LIB_EXPORT rc_t CC KNSManagerRelease ( const KNSManager *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KNSManager" ) )
-        {
-        case krefWhack:
-            return KNSManagerWhack ( ( KNSManager * ) self );
-        case krefNegative:
-            return RC ( rcNS, rcMgr, rcAttaching, rcRefcount, rcInvalid );
-        }
-    }
-    return 0;
-}
-
-static
-void KNSManagerHttpProxyInit ( KNSManager * self, KConfig * kfg )
-{
-    const KConfigNode * proxy;
-    rc_t rc = KConfigOpenNodeRead ( kfg, & proxy, "http/proxy" );
-    if ( rc == 0 )
-    {
-        const KConfigNode * proxy_path;
-        rc = KConfigNodeOpenNodeRead ( proxy, & proxy_path, "path" );
-        if ( rc == 0 )
-        {
-            String * path;
-            rc = KConfigNodeReadString ( proxy_path, & path );
-            if ( rc == 0 )
-            {
-                rc = KNSManagerSetHTTPProxyPath ( self, "%S", path );
-                if ( rc == 0 )
-                {
-                    const KConfigNode * proxy_enabled;
-                    rc = KConfigNodeOpenNodeRead ( proxy, & proxy_enabled, "enabled" );
-                    if ( rc == 0 )
-                    {
-                        rc = KConfigNodeReadBool ( proxy_enabled, & self -> http_proxy_enabled );
-                        KConfigNodeRelease ( proxy_enabled );
-                    }
-                    else if ( GetRCState ( rc ) == rcNotFound )
-                    {
-                        rc = 0;
-                    }
-
-                    if ( rc != 0 )
-                    {
-                        KNSManagerSetHTTPProxyPath ( self, NULL );
-                        assert ( self -> http_proxy_enabled == false );
-                    }
-                }
-
-                StringWhack ( path );
-            }
-
-            KConfigNodeRelease ( proxy_path );
-        }
-
-        KConfigNodeRelease ( proxy );
-    }
-}
-
-
-static
-void KNSManagerLoadAWS ( struct KNSManager *self, const KConfig * kfg )
-{
-    rc_t rc;
-
-    const KConfigNode *aws_node;
-
-    if ( self == NULL )
-        return;
-
-    rc = KConfigOpenNodeRead ( kfg, &aws_node, "AWS" );
-    if ( rc == 0 )
-    {
-        do
-        {
-            String *access_key_id = NULL, *secret_access_key = NULL, *region = NULL, *output = NULL;
-            const KConfigNode *access_key_id_node, *secret_access_key_node, *region_node, *output_node;
-
-            rc = KConfigNodeOpenNodeRead ( aws_node, &access_key_id_node, "aws_access_key_id" );
-            if ( rc == 0 )
-            {
-                rc = KConfigNodeReadString ( access_key_id_node, &access_key_id );
-
-                KConfigNodeRelease ( access_key_id_node );
-
-                if( rc != 0 )
-                    break;
-            }
-
-
-            rc = KConfigNodeOpenNodeRead ( aws_node, &secret_access_key_node, "aws_secret_access_key" );
-            if ( rc == 0 )
-            {
-                rc = KConfigNodeReadString ( secret_access_key_node, &secret_access_key );
-
-                KConfigNodeRelease ( secret_access_key_node );
-
-                if ( rc != 0 )
-                    break;
-            }
-        
-            rc = KConfigNodeOpenNodeRead ( aws_node, &region_node, "region" );
-            if ( rc == 0 )
-            {
-                rc = KConfigNodeReadString ( region_node, &region );
-
-                KConfigNodeRelease ( region_node );
-
-                if ( rc != 0 )
-                    break;
-            }
-
-            rc = KConfigNodeOpenNodeRead ( aws_node, &output_node, "output" );
-            if ( rc == 0 )
-            {
-                rc = KConfigNodeReadString ( output_node, &output );
-
-                KConfigNodeRelease ( output_node );
-                
-                if ( rc != 0 )
-                    break;
-            }
-
-            self -> aws_access_key_id = access_key_id;
-            self -> aws_secret_access_key = secret_access_key;
-            self -> aws_region = region;
-            self -> aws_output = output;
-
-        } while ( 0 );
-
-        KConfigNodeRelease ( aws_node );
-    }
-}
-
-LIB_EXPORT rc_t CC KNSManagerMakeConfig ( KNSManager **mgrp, KConfig* kfg )
-{
-    rc_t rc;
-
-    if ( mgrp == NULL )
-        rc = RC ( rcNS, rcMgr, rcAllocating, rcParam, rcNull );
-    else
-    {
-        KNSManager * mgr = calloc ( 1, sizeof * mgr );
-        if ( mgr == NULL )
-            rc = RC ( rcNS, rcMgr, rcAllocating, rcMemory, rcExhausted );
-        else
-        {
-            KRefcountInit ( & mgr -> refcount, 1, "KNSManager", "init", "kns" );
-            mgr -> conn_timeout = MAX_CONN_LIMIT;
-            mgr -> conn_read_timeout = MAX_CONN_READ_LIMIT;
-            mgr -> conn_write_timeout = MAX_CONN_WRITE_LIMIT;
-            mgr -> http_read_timeout = MAX_HTTP_READ_LIMIT;
-            mgr -> http_write_timeout = MAX_HTTP_WRITE_LIMIT;
-            mgr -> maxTotalWaitForReliableURLs_ms = 10 * 60 * 1000; /* 10 min */
-            mgr -> maxNumberOfRetriesOnFailureForReliableURLs = 10;
-            mgr -> verbose = false;
-
-            rc = KNSManagerInit (); /* platform specific init in sysmgr.c ( in unix|win etc. subdir ) */
-            if ( rc == 0 )
-            {
-                /* the manager is not a proper singleton */
-                if ( kns_manager_user_agent [ 0 ] == 0 )
-                {
-                    ver_t version = RELEASE_VERS;
-                    KNSManagerSetUserAgent ( mgr, PKGNAMESTR " ncbi-vdb.%V", version );
-                }
-
-                rc = HttpRetrySpecsInit ( & mgr -> retry_specs, kfg );
-                if ( rc == 0 )
-                {
-                    KNSManagerLoadAWS ( mgr, kfg );
-                    KNSManagerHttpProxyInit ( mgr, kfg );
-                    * mgrp = mgr;
-                    return 0;
-                }
-            }
-
-            free ( mgr );
-        }
-
-        * mgrp = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KNSManagerMake ( KNSManager ** mgrp )
-{
-    rc_t rc;
-
-    if ( mgrp == NULL )
-        rc = RC ( rcNS, rcMgr, rcAllocating, rcParam, rcNull );
-    else
-    {
-        KConfig * kfg;
-        KNSManager * our_mgr;
-
-        * mgrp = NULL;
-
-#if USE_SINGLETON
-        /* grab single-shot singleton */
-        our_mgr = atomic_test_and_set_ptr ( & kns_singleton, NULL, NULL );
-        if ( our_mgr != NULL )
-        {
-            /* add a new reference and return */
-            rc = KNSManagerAddRef ( our_mgr );
-            if ( rc == 0 )
-                * mgrp = our_mgr;
-            return rc;
-        }
-#endif
-
-        /* singleton was NULL. make from scratch. */
-        rc = KConfigMake ( & kfg, NULL );
-        if ( rc == 0 )
-        {
-            rc = KNSManagerMakeConfig ( & our_mgr, kfg );
-            KConfigRelease ( kfg );
-
-            if ( rc == 0 )
-            {
-#if USE_SINGLETON
-                /* try to set single-shot ( set once, never reset ) */
-                KNSManager * new_mgr = atomic_test_and_set_ptr ( & kns_singleton, our_mgr, NULL );
-                if ( new_mgr != NULL )
-                {
-                    /* somebody else got here first - drop our version */
-                    assert ( our_mgr != new_mgr );
-                    KNSManagerRelease ( our_mgr );
-
-                    /* use the new manager, just add a reference and return */
-                    rc = KNSManagerAddRef ( new_mgr );
-                    if ( rc == 0 )
-                        * mgrp = new_mgr;
-                    return rc;
-                }
-#endif
-
-                /* return parameter */
-                * mgrp = our_mgr;
-            }
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT void KNSManagerSetVerbose ( KNSManager *self, bool verbosity )
-{
-    if ( self != NULL )
-        self -> verbose = verbosity;
-}
-
-
-LIB_EXPORT bool KNSManagerIsVerbose ( const KNSManager *self )
-{
-    return ( self != NULL ) ? self -> verbose : false;
-}
-
-
-/* MakeConnection
- *  create a connection-oriented stream
- *
- *  "conn" [ OUT ] - a stream for communication with the server
- *
- *  "from" [ IN ] - client endpoint
- *
- *  "to" [ IN ] - server endpoint 
- *
- *  both endpoints have to be of type epIP; creates a TCP connection
- */
-LIB_EXPORT rc_t CC KNSManagerMakeConnection ( const KNSManager * self,
-    struct KSocket **conn, struct KEndPoint const *from, struct KEndPoint const *to )
-{
-    if ( self == NULL )
-    {
-        if ( conn == NULL )
-            return RC ( rcNS, rcStream, rcConstructing, rcParam, rcNull );
-
-        * conn = NULL;
-
-        return RC ( rcNS, rcStream, rcConstructing, rcSelf, rcNull );
-    }
-
-    return KNSManagerMakeRetryTimedConnection ( self, conn, 
-        self -> conn_timeout, self -> conn_read_timeout, self -> conn_write_timeout, from, to );
-}
-/* MakeTimedConnection
- *  create a connection-oriented stream
- *
- *  "conn" [ OUT ] - a stream for communication with the server
- *
- *  "retryTimeout" [ IN ] - if connection is refused, retry with 1ms intervals: when negative, retry infinitely,
- *   when 0, do not retry, positive gives maximum wait time in seconds 
- *
- *  "readMillis" [ IN ] and "writeMillis" - when negative, infinite timeout
- *   when 0, return immediately, positive gives maximum wait time in mS
- *   for reads and writes respectively.
- *
- *  "from" [ IN ] - client endpoint
- *
- *  "to" [ IN ] - server endpoint 
- *
- *  both endpoints have to be of type epIP; creates a TCP connection
- */
-LIB_EXPORT rc_t CC KNSManagerMakeTimedConnection ( struct KNSManager const * self,
-    struct KSocket **conn, int32_t readMillis, int32_t writeMillis,
-    struct KEndPoint const *from, struct KEndPoint const *to )
-{
-    if ( self == NULL )
-    {
-        if ( conn == NULL )
-            return RC ( rcNS, rcStream, rcConstructing, rcParam, rcNull );
-
-        * conn = NULL;
-
-        return RC ( rcNS, rcStream, rcConstructing, rcSelf, rcNull );
-    }
-
-    return KNSManagerMakeRetryTimedConnection ( self, conn, 
-        self -> conn_timeout, readMillis, writeMillis, from, to );
-}    
-    
-/* MakeRetryConnection
- *  create a connection-oriented stream
- *
- *  "conn" [ OUT ] - a stream for communication with the server
- *
- *  "retryTimeout" [ IN ] - if connection is refused, retry with 1ms intervals: when negative, retry infinitely,
- *   when 0, do not retry, positive gives maximum wait time in seconds 
- *
- *  "from" [ IN ] - client endpoint
- *
- *  "to" [ IN ] - server endpoint 
- *
- *  both endpoints have to be of type epIP; creates a TCP connection
- */    
-LIB_EXPORT rc_t CC KNSManagerMakeRetryConnection ( struct KNSManager const * self,
-    struct KSocket **conn, int32_t retryTimeout, struct KEndPoint const *from, struct KEndPoint const *to )
-{
-    if ( self == NULL )
-    {
-        if ( conn == NULL )
-            return RC ( rcNS, rcStream, rcConstructing, rcParam, rcNull );
-
-        * conn = NULL;
-
-        return RC ( rcNS, rcStream, rcConstructing, rcSelf, rcNull );
-    }
-
-    return KNSManagerMakeRetryTimedConnection ( self, conn, 
-        retryTimeout, self -> conn_read_timeout, self -> conn_write_timeout, from, to );
-}    
-
-/* SetConnectionTimeouts
- *  sets default connect/read/write timeouts to supply to sockets
- *
- *  "connectMillis", "readMillis", "writeMillis" [ IN ] - when negative, infinite timeout
- *  when 0, return immediately, positive gives maximum wait time in sec/mS
- *  for connects, reads and writes respectively.
- */
-LIB_EXPORT rc_t CC KNSManagerSetConnectionTimeouts ( KNSManager *self,
-    int32_t connectSecs, int32_t readMillis, int32_t writeMillis )
-{
-    if ( self == NULL )
-        return RC ( rcNS, rcMgr, rcUpdating, rcSelf, rcNull );
-
-    /* limit values */
-    if ( connectSecs < 0 )
-        connectSecs = -1;
-    else if ( connectSecs > MAX_CONN_LIMIT )
-        connectSecs = MAX_CONN_LIMIT;
-        
-    if ( readMillis < 0 )
-        readMillis = -1;
-    else if ( readMillis > MAX_CONN_READ_LIMIT )
-        readMillis = MAX_CONN_READ_LIMIT;
-
-    if ( writeMillis < 0 )
-        writeMillis = -1;
-    else if ( writeMillis > MAX_CONN_WRITE_LIMIT )
-        writeMillis = MAX_CONN_WRITE_LIMIT;
-
-    self -> conn_timeout = connectSecs;
-    self -> conn_read_timeout = readMillis;
-    self -> conn_write_timeout = writeMillis;
-
-    return 0;
-}
-
-
-/* SetHTTPTimeouts
- *  sets default read/write timeouts to supply to HTTP connections
- *
- *  "readMillis" [ IN ] and "writeMillis" - when negative, infinite timeout
- *  when 0, return immediately, positive gives maximum wait time in mS
- *  for reads and writes respectively.
- */
-LIB_EXPORT rc_t CC KNSManagerSetHTTPTimeouts ( KNSManager *self,
-    int32_t readMillis, int32_t writeMillis )
-{
-    if ( self == NULL )
-        return RC ( rcNS, rcMgr, rcUpdating, rcSelf, rcNull );
-
-    /* limit values */
-    if ( readMillis < 0 )
-        readMillis = -1;
-    else if ( readMillis > MAX_HTTP_READ_LIMIT )
-        readMillis = MAX_HTTP_READ_LIMIT;
-
-    if ( writeMillis < 0 )
-        writeMillis = -1;
-    else if ( writeMillis > MAX_HTTP_WRITE_LIMIT )
-        writeMillis = MAX_HTTP_WRITE_LIMIT;
-
-    self -> http_read_timeout = readMillis;
-    self -> http_write_timeout = writeMillis;
-
-    return 0;
-}
-
-/* GetHTTPProxyPath
- *  returns path to HTTP proxy server ( if set ) or NULL.
- *  return status is 0 if the path is valid, non-zero otherwise
- */
-LIB_EXPORT rc_t CC KNSManagerGetHTTPProxyPath ( const KNSManager * self, const String ** proxy )
-{
-    rc_t rc = 0;
-
-    if ( proxy == NULL )
-        rc = RC ( rcNS, rcMgr, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcMgr, rcAccessing, rcSelf, rcNull );
-        else if ( self -> http_proxy != NULL )
-        {
-            return StringCopy ( proxy, self -> http_proxy );
-        }
-
-        * proxy = NULL;
-    }
-
-    return rc;
-}
-
-
-/* SetHTTPProxyPath
- *  sets a path to HTTP proxy server.
- *  a NULL path value removes all proxy settings.
- *
- *  the VPath passed in must still be released using VPathRelease,
- *  because KNSManager will attach a new reference to it.
- */
-LIB_EXPORT rc_t CC KNSManagerSetHTTPProxyPath ( KNSManager * self, const char * fmt, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, fmt );
-    rc = KNSManagerVSetHTTPProxyPath ( self, fmt, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KNSManagerVSetHTTPProxyPath ( KNSManager * self, const char * fmt, va_list args )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC ( rcNS, rcMgr, rcUpdating, rcSelf, rcNull );
-    else
-    {
-        uint16_t proxy_port = 0;
-        const String * proxy = NULL;
-
-        if ( fmt != NULL && fmt [ 0 ] != 0 )
-        {
-            size_t psize;
-            char path [ 4096 ];
-            rc = string_vprintf ( path, sizeof path, & psize, fmt, args );
-            if ( rc == 0 && psize != 0 )
-            {
-                char * colon = string_rchr ( path, psize, ':' );
-                if ( colon != NULL )
-                {
-                    char * end;
-                    const char * port_spec = colon + 1;
-                    /* it is true that some day we might read symbolic port names... */
-                    long port_num = strtol ( port_spec, & end, 10 );
-                    if ( port_num <= 0 || port_num >= 0x10000 || end [ 0 ] != 0 )
-                        rc = RC ( rcNS, rcMgr, rcUpdating, rcPath, rcInvalid );
-                    else
-                    {
-                        proxy_port = ( uint64_t ) port_num;
-                        psize = colon - path;
-                    }
-                }
-
-                if ( rc == 0 )
-                {
-                    String tmp;
-                    StringInit ( & tmp, path, psize, string_len ( path, psize ) );
-                    rc = StringCopy ( & proxy, & tmp );
-                }
-            }
-        }
-
-        if ( rc == 0 )
-        {
-            if ( self -> http_proxy != NULL )
-            {
-                StringWhack ( self -> http_proxy );
-                self -> http_proxy_port = 0;
-            }
-
-            self -> http_proxy = proxy;
-            self -> http_proxy_enabled = ( proxy != NULL );
-            self -> http_proxy_port = proxy_port;
-        }
-    }
-
-    return rc;
-}
-
-
-/* GetHTTPProxyEnabled
- *  returns true if a non-NULL proxy path exists and user wants to use it
- *  users indicate desire to use proxy through configuration or SetHTTPProxyEnabled
- */
-LIB_EXPORT bool CC KNSManagerGetHTTPProxyEnabled ( const KNSManager * self )
-{
-    if ( self != NULL )
-        return self -> http_proxy_enabled;
-
-    return false;
-}
-
-
-/* SetHTTPProxyEnabled
- *  sets http-proxy enabled state to supplied value
- *  returns the prior value as a convenience
- */
-LIB_EXPORT bool CC KNSManagerSetHTTPProxyEnabled ( KNSManager * self, bool enabled )
-{
-    bool prior = false;
-    if ( self != NULL )
-    {
-        prior = self -> http_proxy_enabled;
-        self -> http_proxy_enabled = enabled;
-    }
-    return prior;
-}
-
-
-LIB_EXPORT rc_t CC KNSManagerSetUserAgent ( KNSManager * self, const char * fmt, ... )
-{
-    /* 6/18/14 - don't check "self", since the current implementation
-       is actually static. Later implementations will not be... */
-
-    rc_t rc = 0;
-    if ( fmt == NULL )
-        rc = RC( rcNS, rcMgr, rcUpdating, rcParam, rcNull );
-    else
-    {
-        size_t bytes;
-        char scratch [ sizeof kns_manager_user_agent ];
-
-        va_list args;
-        va_start ( args, fmt );
-        rc = string_vprintf ( scratch, sizeof scratch, & bytes, fmt, args );
-        va_end ( args );
-
-        if ( rc == 0 )
-            string_copy ( kns_manager_user_agent, sizeof kns_manager_user_agent, scratch, bytes );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KNSManagerGetUserAgent ( const char ** user_agent )
-{
-    rc_t rc = 0;
-    if ( user_agent == NULL )
-        rc = RC( rcNS, rcMgr, rcAccessing, rcParam, rcNull );
-    else
-    {
-        ( *user_agent ) = kns_manager_user_agent;
-    }
-    return rc;
-}
diff --git a/libs/kns/mgr-priv.h b/libs/kns/mgr-priv.h
deleted file mode 100644
index e6f754f..0000000
--- a/libs/kns/mgr-priv.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_libs_kns_mgr_priv_
-#define _h_libs_kns_mgr_priv_
-
-#ifndef _h_kns_extern_
-#include <kns/extern.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifndef _h_kns_mgr_priv_
-#include <kns/kns-mgr-priv.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct String;
-struct KConfig;
-struct HttpRetrySpecs;
-
-struct KNSManager
-{
-    KRefcount refcount;
-    
-    struct String const * http_proxy;
-
-    struct String const *aws_access_key_id;
-    struct String const *aws_secret_access_key;
-    struct String const *aws_region;
-    struct String const *aws_output;
-    
-    struct HttpRetrySpecs retry_specs;
-    
-    int32_t conn_timeout;
-    int32_t conn_read_timeout;
-    int32_t conn_write_timeout;
-    int32_t http_read_timeout;
-    int32_t http_write_timeout;
-    
-    uint32_t maxTotalWaitForReliableURLs_ms;
-
-    uint16_t http_proxy_port;
-
-    uint8_t  maxNumberOfRetriesOnFailureForReliableURLs;
-
-    bool http_proxy_enabled; /* TBD - does this need to be static today? */
-    bool verbose;
-};
-
-/* test */
-struct KStream;
-void KStreamForceSocketClose ( struct KStream const * self );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_libs_kns_mgr_priv_ */
diff --git a/libs/kns/poll-priv.h b/libs/kns/poll-priv.h
deleted file mode 100644
index b0cbbe2..0000000
--- a/libs/kns/poll-priv.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_poll_priv_
-#define _h_poll_priv_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct timeout_t;
-
-
-/* socket_wait
- *  wait for an event or a timeout
- */
-int socket_wait ( int fd, int events, struct timeout_t *tm );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_poll_priv_ */
diff --git a/libs/kns/stream-from-files.c b/libs/kns/stream-from-files.c
deleted file mode 100644
index 2ac4e0b..0000000
--- a/libs/kns/stream-from-files.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-typedef struct KStreamFromFiles KStreamFromFiles;
-#define KSTREAM_IMPL KStreamFromFiles
-
-#include <kns/extern.h>
-#include <kns/stream.h>
-#include <kns/impl.h>
-#include <kfs/file.h>
-#include <kfs/impl.h>
-#include <klib/rc.h>
-
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdlib.h>
-
-#include "stream-priv.h"
-
-
-/* the object structure for THIS implementation */
-struct  KStreamFromFiles
-{
-    /* THIS MUST COME FIRST */
-    KStream dad;
-
-    uint64_t in_pos;
-    uint64_t out_pos;
-
-    const KFile *in;
-    KFile *out;
-};
-
-
-/* the required methods */
-
-static
-rc_t CC KStreamFromFilesWhack ( KStreamFromFiles *self )
-{
-    KFileRelease ( self -> in );
-    KFileRelease ( self -> out );
-    free ( self );
-    return 0;
-}
-
-static
-rc_t CC KStreamFromFilesRead ( const KStreamFromFiles *cself,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc = KFileRead ( cself -> in, cself -> in_pos, buffer, bsize, num_read );
-    if ( rc == 0 )
-    {
-        KStreamFromFiles *self = ( KStreamFromFiles* ) cself;
-        self -> in_pos += * num_read;
-    }
-
-    return rc;
-}
-
-static
-rc_t CC KStreamFromFilesWrite ( KStreamFromFiles *self,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    rc_t rc = KFileWrite ( self -> out, self -> out_pos, buffer, size, num_writ );
-    if ( rc == 0 )
-        self -> out_pos += * num_writ;
-
-    return rc;
-}
-
-/* the vtable */
-static KStream_vt_v1 vtKStreamFromFiles =
-{
-    1, 0,
-    KStreamFromFilesWhack,
-    KStreamFromFilesRead,
-    KStreamFromFilesWrite
-};
-
-
-/* FromKFilePair
- *  create a KStream from a pair of KFiles
- *  maintains a "pos" marker for input and output files
- *
- *  "strm" [ OUT ] - resultant KStream
- *
- *  "read" [ IN, NULL OKAY ] - file to use for stream reading
- *
- *  "write" [ IN, NULL OKAY ] - file to use for stream writing
- *
- * NB - EITHER "read" or "write" may be NULL, but not both.
- */
-LIB_EXPORT rc_t CC KStreamFromKFilePair ( KStream **strm,
-    const KFile *read, KFile *write )
-{
-    rc_t rc;
-
-    if ( strm == NULL )
-        rc = RC ( rcNS, rcStream, rcConstructing, rcParam, rcNull );
-    else
-    {
-        bool can_read = ( read == NULL ) ? false : read -> read_enabled;
-        bool can_write = ( write == NULL ) ? false : write -> write_enabled;
-
-        if ( ! can_read && ! can_write )
-            rc = RC ( rcNS, rcStream, rcConstructing, rcFile, rcNoPerm );
-        else
-        {
-            KStreamFromFiles *sff = calloc ( 1, sizeof *sff );
-            if ( sff == NULL )
-                rc = RC ( rcNS, rcStream, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KStreamInit ( & sff -> dad, ( const KStream_vt* ) & vtKStreamFromFiles, 
-                                   "KStreamFromFilePair", "adapter", can_read, can_write );
-                if ( rc == 0 )
-                {
-                    rc = KFileAddRef ( read );
-                    if ( rc == 0 )
-                    {
-                        rc = KFileAddRef ( write );
-                        if ( rc ==  0 )
-                        {
-                            sff -> in = read;
-                            sff -> out = write;
-                            *strm = & sff -> dad;
-
-                            return 0;
-                        }
-
-                        KFileRelease ( read );
-                    }
-                }
-
-                free ( sff );
-            }
-        }
-
-        *strm = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/kns/stream-from-streams.c b/libs/kns/stream-from-streams.c
deleted file mode 100644
index a788403..0000000
--- a/libs/kns/stream-from-streams.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-typedef struct KStreamFromStreams KStreamFromStreams;
-#define KSTREAM_IMPL KStreamFromStreams
-
-#include <kns/extern.h>
-#include <kns/stream.h>
-#include <kns/impl.h>
-#include <klib/rc.h>
-
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdlib.h>
-
-#include "stream-priv.h"
-
-/* the object structure for THIS implementation */
-struct  KStreamFromStreams
-{
-    /* THIS MUST COME FIRST */
-    KStream dad;
-
-    const KStream *in;
-    KStream *out;
-};
-
-
-/* the required methods */
-
-static
-rc_t CC KStreamFromStreamsWhack ( KStreamFromStreams *self )
-{
-    KStreamRelease ( self -> in );
-    KStreamRelease ( self -> out );
-    free ( self );
-    return 0;
-}
-
-static
-rc_t CC KStreamFromStreamsRead ( const KStreamFromStreams *self,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    return KStreamRead ( self -> in, buffer, bsize, num_read );
-}
-
-static
-rc_t CC KStreamFromStreamsWrite ( KStreamFromStreams *self,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    return KStreamWrite ( self -> out, buffer, size, num_writ );
-}
-
-/* the vtable */
-static KStream_vt_v1 vtKStreamFromStreams =
-{
-    1, 0,
-    KStreamFromStreamsWhack,
-    KStreamFromStreamsRead,
-    KStreamFromStreamsWrite
-};
-
-
-/* FromKStreamPair
- *  create a KStream from a pair of KStreams
- *
- *  "strm" [ OUT ] - resultant KStream
- *
- *  "read" [ IN, NULL OKAY ] - stream to use for input
- *
- *  "write" [ IN, NULL OKAY ] - stream to use for output
- *
- * NB - EITHER "read" or "write" may be NULL, but not both.
- */
-LIB_EXPORT rc_t CC KStreamFromKStreamPair ( KStream **strm,
-    const KStream *read, KStream *write )
-{
-    rc_t rc;
-
-    if ( strm == NULL )
-        rc = RC ( rcNS, rcStream, rcConstructing, rcParam, rcNull );
-    else
-    {
-        bool can_read = ( read == NULL ) ? false : read -> read_enabled;
-        bool can_write = ( write == NULL ) ? false : write -> write_enabled;
-
-        if ( ! can_read && ! can_write )
-            rc = RC ( rcNS, rcStream, rcConstructing, rcStream, rcNoPerm );
-        else
-        {
-            KStreamFromStreams *sfs = calloc ( 1, sizeof *sfs );
-            if ( sfs == NULL )
-                rc = RC ( rcNS, rcStream, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KStreamInit ( & sfs -> dad, ( const KStream_vt* ) & vtKStreamFromStreams, 
-                                   "KStreamFromStreamPair", "adapter", can_read, can_write );
-                if ( rc == 0 )
-                {
-                    rc = KStreamAddRef ( read );
-                    if ( rc == 0 )
-                    {
-                        rc = KStreamAddRef ( write );
-                        if ( rc ==  0 )
-                        {
-                            sfs -> in = read;
-                            sfs -> out = write;
-                            *strm = & sfs -> dad;
-
-                            return 0;
-                        }
-
-                        KStreamRelease ( read );
-                    }
-                }
-
-                free ( sfs );
-            }
-        }
-
-        *strm = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/kns/stream-priv.h b/libs/kns/stream-priv.h
deleted file mode 100644
index 12575f8..0000000
--- a/libs/kns/stream-priv.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-/* VDB.v2 is end of life, and introducing new object types is
-   dangerous. For our purposes, just call a stream a file */
-#ifndef rcStream
-#define rcStream rcFile
-#endif
-
-#ifndef rcSocket
-#define rcSocket rcFile
-#endif
-
-#ifndef rcUrl
-#define rcUrl rcPath
-#endif
diff --git a/libs/kns/stream.c b/libs/kns/stream.c
deleted file mode 100644
index e8d98b6..0000000
--- a/libs/kns/stream.c
+++ /dev/null
@@ -1,782 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kns/extern.h>
-#include <kns/impl.h>
-#include <klib/rc.h>
-#include <kproc/timeout.h>
-
-#include <os-native.h>
-
-#include <sysalloc.h>
-
-#include "stream-priv.h"
-
-#include <assert.h>
-
-/*--------------------------------------------------------------------------
- * KStream
- *  a file
- */
-
-/* Destroy
- *  destroy stream
- */
-static
-rc_t KStreamDestroy ( KStream *self )
-{
-    if ( self == NULL )
-        return RC ( rcNS, rcStream, rcDestroying, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . destroy ) ( self );
-    }
-
-    return RC ( rcNS, rcStream, rcDestroying, rcInterface, rcBadVersion );
-}
-
-/* AddRef
- *  creates a new reference
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KStreamAddRef ( const KStream *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KStream" ) )
-        {
-        case krefLimit:
-            return RC ( rcNS, rcStream, rcAttaching, rcRange, rcExcessive );
-        case krefNegative:
-            return RC ( rcNS, rcStream, rcAttaching, rcSelf, rcInvalid );
-        default:
-            break;
-        }
-    }
-    return 0;
-}
-
-/* Release
- *  discard reference to file
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KStreamRelease ( const KStream *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KStream" ) )
-        {
-        case krefWhack:
-            return KStreamDestroy ( ( KStream* ) self );
-        case krefNegative:
-            return RC ( rcNS, rcStream, rcReleasing, rcRange, rcExcessive );
-        default:
-            break;
-        }
-    }
-
-    return 0;
-}
-
-/* Read
- * TimedRead
- *  read data from stream
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - return parameter giving number of bytes
- *  actually read. when returned value is zero and return code is
- *  also zero, interpreted as end of stream.
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed reads. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-LIB_EXPORT rc_t CC KStreamRead ( const KStream *self,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    if ( num_read == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcParam, rcNull );
-
-    * num_read = 0;
-
-    if ( self == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcSelf, rcNull );
-
-    if ( ! self -> read_enabled )
-        return RC ( rcNS, rcStream, rcReading, rcStream, rcNoPerm );
-
-    if ( buffer == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcBuffer, rcNull );
-    if ( bsize == 0 )
-        return RC ( rcNS, rcStream, rcReading, rcBuffer, rcInsufficient );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . read ) ( self, buffer, bsize, num_read );
-    }
-
-    return RC ( rcNS, rcStream, rcReading, rcInterface, rcBadVersion );
-}
-
-LIB_EXPORT rc_t CC KStreamTimedRead ( const KStream *self,
-    void *buffer, size_t bsize, size_t *num_read, struct timeout_t *tm )
-{
-    if ( num_read == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcParam, rcNull );
-
-    * num_read = 0;
-
-    if ( self == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcSelf, rcNull );
-
-    if ( ! self -> read_enabled )
-        return RC ( rcNS, rcStream, rcReading, rcStream, rcNoPerm );
-
-    if ( buffer == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcBuffer, rcNull );
-    if ( bsize == 0 )
-        return RC ( rcNS, rcStream, rcReading, rcBuffer, rcInsufficient );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        if ( self -> vt -> v1 . min >= 1 )
-            return ( * self -> vt -> v1 . timed_read ) ( self, buffer, bsize, num_read, tm );
-        if ( tm == NULL )
-            return ( * self -> vt -> v1 . read ) ( self, buffer, bsize, num_read );
-        break;
-    }
-
-
-    return RC ( rcNS, rcStream, rcReading, rcInterface, rcBadVersion );
-}
-
-
-/* ReadAll
- * TimedReadAll
- *  read from stream until "bsize" bytes have been retrieved
- *  or until end-of-input
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT ] - return parameter giving number of bytes
- *  actually read. when returned value is zero and return code is
- *  also zero, interpreted as end of stream.
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed reads. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-LIB_EXPORT rc_t CC KStreamReadAll ( const KStream *self,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc;
-    uint8_t *b;
-    size_t total, count;
-
-    if ( num_read == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcParam, rcNull );
-
-    * num_read = 0;
-
-    if ( self == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcSelf, rcNull );
-
-    if ( ! self -> read_enabled )
-        return RC ( rcNS, rcStream, rcReading, rcStream, rcNoPerm );
-
-    if ( buffer == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcBuffer, rcNull );
-    if ( bsize == 0 )
-        return RC ( rcNS, rcStream, rcReading, rcBuffer, rcInsufficient );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        count = 0;
-        rc = ( * self -> vt -> v1 . read ) ( self, buffer, bsize, & count );
-        total = count;
-
-        if ( rc == 0 && count != 0 && count < bsize )
-        {
-            if ( self -> vt -> v1 . min >= 1 )
-            {
-                timeout_t no_block;
-                TimeoutInit ( & no_block, 0 );
-
-                for ( rc = 0, b = buffer; total < bsize; total += count )
-                {
-                    count = 0;
-                    rc = ( * self -> vt -> v1 . timed_read ) ( self, b + total, bsize - total, & count, & no_block );
-                    if ( rc != 0 )
-                        break;
-                    if ( count == 0 )
-                        break;
-                }
-            }
-            else
-            {
-                for ( rc = 0, b = buffer; total < bsize; total += count )
-                {
-                    count = 0;
-                    rc = ( * self -> vt -> v1 . read ) ( self, b + total, bsize - total, & count );
-                    if ( rc != 0 )
-                        break;
-                    if ( count == 0 )
-                        break;
-                }
-            }
-        }
-        break;
-
-    default:
-        return RC ( rcNS, rcStream, rcReading, rcInterface, rcBadVersion );
-    }
-
-    if ( total != 0 )
-    {
-        * num_read = total;
-        return 0;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KStreamTimedReadAll ( const KStream *self,
-    void *buffer, size_t bsize, size_t *num_read, struct timeout_t *tm )
-{
-    rc_t rc;
-    uint8_t *b;
-    size_t total, count;
-
-    if ( num_read == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcParam, rcNull );
-
-    * num_read = 0;
-
-    if ( self == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcSelf, rcNull );
-
-    if ( ! self -> read_enabled )
-        return RC ( rcNS, rcStream, rcReading, rcStream, rcNoPerm );
-
-    if ( buffer == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcBuffer, rcNull );
-    if ( bsize == 0 )
-        return RC ( rcNS, rcStream, rcReading, rcBuffer, rcInsufficient );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        if ( self -> vt -> v1 . min >= 1 )
-        {
-            count = 0;
-            rc = ( * self -> vt -> v1 . timed_read ) ( self, buffer, bsize, & count, tm );
-            total = count;
-
-            if ( rc == 0 && count != 0 && count < bsize )
-            {
-                timeout_t no_block;
-                TimeoutInit ( & no_block, 0 );
-                
-                for ( b = buffer; total < bsize; total += count )
-                {
-                    count = 0;
-                    rc = ( * self -> vt -> v1 . timed_read ) ( self, b + total, bsize - total, & count, & no_block );
-                    if ( rc != 0 )
-                        break;
-                    if ( count == 0 )
-                        break;
-                }
-            }
-            break;
-        }
-
-        if ( tm == NULL )
-        {
-            for ( rc = 0, b = buffer, total = 0; total < bsize; total += count )
-            {
-                count = 0;
-                rc = ( * self -> vt -> v1 . read ) ( self, b + total, bsize - total, & count );
-                if ( rc != 0 )
-                    break;
-                if ( count == 0 )
-                    break;
-            }
-            break;
-        }
-
-        /* no break */
-
-    default:
-        return RC ( rcNS, rcStream, rcReading, rcInterface, rcBadVersion );
-    }
-
-    if ( total != 0 )
-    {
-        * num_read = total;
-        return 0;
-    }
-
-    return rc;
-}
-
-
-/* ReadExactly
- * TimedReadExactly
- *  read from stream until "bytes" have been retrieved
- *  or return incomplete transfer
- *
- *  "buffer" [ OUT ] and "bytes" [ IN ] - return buffer for read
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed reads. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-LIB_EXPORT rc_t CC KStreamReadExactly ( const KStream *self,
-    void *buffer, size_t bytes )
-{
-    rc_t rc;
-    uint8_t *b;
-    size_t total, count;
-
-    if ( self == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcSelf, rcNull );
-
-    if ( ! self -> read_enabled )
-        return RC ( rcNS, rcStream, rcReading, rcStream, rcNoPerm );
-
-    if ( bytes == 0 )
-        return 0;
-    if ( buffer == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcBuffer, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        assert ( bytes != 0 );
-        for ( b = buffer, total = 0; total < bytes; total += count )
-        {
-            count = 0;
-            rc = ( * self -> vt -> v1 . read ) ( self, b + total, bytes - total, & count );
-            if ( rc != 0 )
-            {
-                if ( GetRCObject ( rc ) != ( enum RCObject )rcTimeout || GetRCState ( rc ) != rcExhausted )
-                    break;
-            }
-            else if ( count == 0 )
-            {
-                rc = RC ( rcNS, rcStream, rcReading, rcTransfer, rcIncomplete );
-                break;
-            }
-        }
-        break;
-
-    default:
-        return RC ( rcNS, rcStream, rcReading, rcInterface, rcBadVersion );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KStreamTimedReadExactly ( const KStream *self,
-    void *buffer, size_t bytes, struct timeout_t *tm )
-{
-    rc_t rc;
-    uint8_t *b;
-    size_t total, count;
-
-    if ( self == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcSelf, rcNull );
-
-    if ( ! self -> read_enabled )
-        return RC ( rcNS, rcStream, rcReading, rcStream, rcNoPerm );
-
-    if ( bytes == 0 )
-        return RC ( rcNS, rcStream, rcReading, rcBuffer, rcInsufficient );
-    if ( buffer == NULL )
-        return RC ( rcNS, rcStream, rcReading, rcBuffer, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        if ( self -> vt -> v1 . min >= 1 )
-        {
-            assert ( bytes != 0 );
-            for ( b = buffer, total = 0; total < bytes; total += count )
-            {
-                count = 0;
-                rc = ( * self -> vt -> v1 . timed_read ) ( self, b + total, bytes - total, & count, tm );
-                if ( rc != 0 )
-                {
-                    if ( tm != NULL )
-                        break;
-                    if ( GetRCObject ( rc ) != ( enum RCObject ) rcTimeout || GetRCState ( rc ) != rcExhausted )
-                        break;
-                }
-                else if ( count == 0 )
-                {
-                    rc = RC ( rcNS, rcStream, rcReading, rcTransfer, rcIncomplete );
-                    break;
-                }
-            }
-
-            break;
-        }
-
-        if ( tm == NULL )
-        {
-            assert ( bytes != 0 );
-            for ( b = buffer, total = 0; total < bytes; total += count )
-            {
-                count = 0;
-                rc = ( * self -> vt -> v1 . read ) ( self, b + total, bytes - total, & count );
-                if ( rc != 0 )
-                {
-                    if ( GetRCObject ( rc ) != ( enum RCObject )rcTimeout || GetRCState ( rc ) != rcExhausted )
-                        break;
-                }
-                else if ( count == 0 )
-                {
-                    rc = RC ( rcNS, rcStream, rcReading, rcTransfer, rcIncomplete );
-                    break;
-                }
-            }
-            break;
-        }
-
-        /* no break */
-
-    default:
-        return RC ( rcNS, rcStream, rcReading, rcInterface, rcBadVersion );
-    }
-
-    return rc;
-}
-
-/* Write
- * TimedWrite
- *  send data to stream
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed writes. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-LIB_EXPORT rc_t CC KStreamWrite ( KStream *self,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    size_t ignore;
-    if ( num_writ == NULL )
-        num_writ = & ignore;
-
-    * num_writ = 0;
-
-    if ( self == NULL )
-        return RC ( rcNS, rcStream, rcWriting, rcSelf, rcNull );
-
-    if ( ! self -> write_enabled )
-        return RC ( rcNS, rcStream, rcWriting, rcStream, rcNoPerm );
-
-    if ( size == 0 )
-        return 0;
-    if ( buffer == NULL )
-        return RC ( rcNS, rcStream, rcWriting, rcBuffer, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . write ) ( self, buffer, size, num_writ );
-    }
-
-    return RC ( rcNS, rcStream, rcWriting, rcInterface, rcBadVersion );
-}
-
-LIB_EXPORT rc_t CC KStreamTimedWrite ( KStream *self,
-    const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm )
-{
-    size_t ignore;
-    if ( num_writ == NULL )
-        num_writ = & ignore;
-
-    * num_writ = 0;
-
-    if ( self == NULL )
-        return RC ( rcNS, rcStream, rcWriting, rcSelf, rcNull );
-
-    if ( ! self -> write_enabled )
-        return RC ( rcNS, rcStream, rcWriting, rcStream, rcNoPerm );
-
-    if ( size == 0 )
-        return 0;
-    if ( buffer == NULL )
-        return RC ( rcNS, rcStream, rcWriting, rcBuffer, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        if ( self -> vt -> v1 . min >= 1 )
-            return ( * self -> vt -> v1 . timed_write ) ( self, buffer, size, num_writ, tm );
-        if ( tm == NULL )
-            return ( * self -> vt -> v1 . write ) ( self, buffer, size, num_writ );
-        break;
-    }
-
-    return RC ( rcNS, rcStream, rcWriting, rcInterface, rcBadVersion );
-}
-
-/* WriteAll
- * TimedWriteAll
- *  write to stream until "size" bytes have been transferred
- *  or until no further progress can be made
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- *  "tm" [ IN/OUT, NULL OKAY ] - an optional indicator of
- *  blocking behavior. not all implementations will support
- *  timed writes. a NULL timeout will block indefinitely,
- *  a value of "tm->mS == 0" will have non-blocking behavior
- *  if supported by implementation, and "tm->mS > 0" will indicate
- *  a maximum wait timeout.
- */
-LIB_EXPORT rc_t CC KStreamWriteAll ( KStream *self,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    rc_t rc;
-    const uint8_t *b;
-    size_t total, count;
-
-    size_t ignore;
-    if ( num_writ == NULL )
-        num_writ = & ignore;
-
-    * num_writ = 0;
-
-    if ( self == NULL )
-        return RC ( rcNS, rcStream, rcWriting, rcSelf, rcNull );
-
-    if ( ! self -> write_enabled )
-        return RC ( rcNS, rcStream, rcWriting, rcStream, rcNoPerm );
-
-    if ( size == 0 )
-        return 0;
-    if ( buffer == NULL )
-        return RC ( rcNS, rcStream, rcWriting, rcBuffer, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        count = 0;
-        rc = ( * self -> vt -> v1 . write ) ( self, buffer, size, & count );
-        total = count;
-
-        if ( rc == 0 && count != 0 && count < size )
-        {
-            if ( self -> vt -> v1 . min >= 1 )
-            {
-                timeout_t no_block;
-                TimeoutInit ( & no_block, 0 );
-
-                for ( b = buffer; total < size; total += count )
-                {
-                    count = 0;
-                    rc = ( * self -> vt -> v1 . timed_write ) ( self, b + total, size - total, & count, & no_block );
-                    if ( rc != 0 )
-                        break;
-                    if ( count == 0 )
-                        break;
-                }
-            }
-            else
-            {
-                for ( b = buffer; total < size; total += count )
-                {
-                    count = 0;
-                    rc = ( * self -> vt -> v1 . write ) ( self, b + total, size - total, & count );
-                    if ( rc != 0 )
-                        break;
-                    if ( count == 0 )
-                        break;
-                }
-            }
-        }
-        break;
-
-    default:
-        return RC ( rcNS, rcStream, rcWriting, rcInterface, rcBadVersion );
-    }
-
-    * num_writ = total;
-    if ( total == size )
-        return 0;
-    if ( rc == 0 )
-        return RC ( rcNS, rcStream, rcWriting, rcTransfer, rcIncomplete );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KStreamTimedWriteAll ( KStream *self,
-    const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm )
-{
-    rc_t rc;
-    const uint8_t *b;
-    size_t total, count;
-
-    size_t ignore;
-    if ( num_writ == NULL )
-        num_writ = & ignore;
-
-    * num_writ = 0;
-
-    if ( self == NULL )
-        return RC ( rcNS, rcStream, rcWriting, rcSelf, rcNull );
-
-    if ( ! self -> write_enabled )
-        return RC ( rcNS, rcStream, rcWriting, rcStream, rcNoPerm );
-
-    if ( size == 0 )
-        return 0;
-    if ( buffer == NULL )
-        return RC ( rcNS, rcStream, rcWriting, rcBuffer, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        if ( self -> vt -> v1 . min >= 1 )
-        {
-            for ( rc = 0, b = buffer, total = 0; total < size; total += count )
-            {
-                count = 0;
-                rc = ( * self -> vt -> v1 . timed_write ) ( self, b + total, size - total, & count, tm );
-                if ( rc != 0 )
-                    break;
-                if ( count == 0 )
-                    break;
-            }
-            break;
-        }
-
-        if ( tm == NULL )
-        {
-            for ( rc = 0, b = buffer, total = 0; total < size; total += count )
-            {
-                count = 0;
-                rc = ( * self -> vt -> v1 . write ) ( self, b + total, size - total, & count );
-                if ( rc != 0 )
-                    break;
-                if ( count == 0 )
-                    break;
-            }
-            break;
-        }
-
-        /* no break */
-
-    default:
-        return RC ( rcNS, rcStream, rcWriting, rcInterface, rcBadVersion );
-    }
-
-    * num_writ = total;
-    if ( total == size )
-        return 0;
-    if ( rc == 0 )
-        return RC ( rcNS, rcStream, rcWriting, rcTransfer, rcIncomplete );
-    return rc;
-}
-
-
-/* Init
- *  initialize a newly allocated stream object
- */
-LIB_EXPORT rc_t CC KStreamInit ( KStream *self, const KStream_vt *vt,
-    const char *classname, const char *strname,
-    bool read_enabled, bool write_enabled )
-{
-    if ( self == NULL )
-        return RC ( rcNS, rcStream, rcConstructing, rcSelf, rcNull );
-    if ( vt == NULL )
-        return RC ( rcNS, rcStream, rcConstructing, rcInterface, rcNull );
-    switch ( vt -> v1 . maj )
-    {
-    case 0:
-        return RC ( rcNS, rcStream, rcConstructing, rcInterface, rcInvalid );
-
-    case 1:
-        switch ( vt -> v1 . min )
-        {
-            /* ADD NEW MINOR VERSION CASES HERE */
-        case 1:
-#if _DEBUGGING
-            if ( vt -> v1 . timed_write == NULL ||
-                 vt -> v1 . timed_read == NULL )
-                return RC ( rcNS, rcStream, rcConstructing, rcInterface, rcNull );
-#endif
-        case 0:
-#if _DEBUGGING
-        if ( vt -> v1 . write == NULL         ||
-             vt -> v1 . read == NULL          ||
-             vt -> v1 . destroy == NULL )
-        return RC ( rcNS, rcStream, rcConstructing, rcInterface, rcNull );
-#endif
-            break;
-        default:
-            return RC ( rcNS, rcStream, rcConstructing, rcInterface, rcBadVersion );
-        }
-        break;
-
-    default:
-        return RC ( rcNS, rcStream, rcConstructing, rcInterface, rcBadVersion );
-    }
-
-    self -> vt = vt;
-    KRefcountInit ( & self -> refcount, 1, classname, "init", strname );
-    self -> read_enabled = ( uint8_t ) ( read_enabled != 0 );
-    self -> write_enabled = ( uint8_t ) ( write_enabled != 0 );
-
-    return 0;
-}
diff --git a/libs/kns/sysmgr.h b/libs/kns/sysmgr.h
deleted file mode 100644
index 03928c4..0000000
--- a/libs/kns/sysmgr.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sysmgr_
-#define _h_sysmgr_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-rc_t KNSManagerInit();
-void KNSManagerCleanup();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/libs/kns/unix/sysmgr.c b/libs/kns/unix/sysmgr.c
deleted file mode 100644
index ac031a9..0000000
--- a/libs/kns/unix/sysmgr.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/rc.h>
-#include "sysmgr.h"
-
-rc_t KNSManagerInit ( void )
-{
-    return 0;
-} 
-
-void KNSManagerCleanup ( void )
-{
-}
diff --git a/libs/kns/unix/syssock.c b/libs/kns/unix/syssock.c
deleted file mode 100644
index 39960d8..0000000
--- a/libs/kns/unix/syssock.c
+++ /dev/null
@@ -1,1188 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-#define KSTREAM_IMPL KSocket
-
-#include <kns/extern.h>
-#include <kns/manager.h>
-#include <kns/socket.h>
-#include <kns/impl.h>
-#include <kns/endpoint.h>
-
-#ifdef ERR
-#undef ERR
-#endif
-
-#include <klib/debug.h> /* DBGMSG */
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-
-#include <kproc/timeout.h>
-
-#include "mgr-priv.h"
-#include "stream-priv.h"
-#include "poll-priv.h"
-
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-#include <os-native.h>
-
-#include <arpa/inet.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <netinet/tcp.h>
-#include <poll.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <pwd.h>
-
-#ifndef POLLRDHUP
-#define POLLRDHUP 0
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KSocket
- *  a socket IS a stream
- *
- *  in Berkeley socket terminology, a STREAM implies a CONTINUOUS stream,
- *  which is implemented by the TCP connection. A "chunked" or discontiguous
- *  stream would be a datagram stream, implemented usually by UDP.
- *
- *  in VDB terminology, a STREAM is a fluid, moving target that is observed
- *  from a stationary point, whereas a FILE or OBJECT is a static stationary
- *  target observed from a movable window. This means that a STREAM cannot be
- *  addressed randomly, whereas a FILE or OBJECT can.
- */
-struct KSocket
-{
-    KStream dad;
-    const char * path;
-    uint32_t type;
-    int32_t read_timeout;
-    int32_t write_timeout;
-
-    int fd;
-    union {
-        struct sockaddr_in  v4;     /* for ipv4 */
-        struct sockaddr_in6 v6;     /* for ipv6 */
-    } remote_addr;
-    bool remote_addr_valid;
-};
-
-LIB_EXPORT rc_t CC KSocketAddRef( const KSocket *self )
-{
-    return KStreamAddRef ( & self -> dad );
-}
-
-LIB_EXPORT rc_t CC KSocketRelease ( const KSocket *self )
-{
-    return KStreamRelease ( & self -> dad );
-}
-
-/* GetStream
- */
-LIB_EXPORT rc_t CC KSocketGetStream ( const KSocket * self, KStream ** s )
-{
-    rc_t rc;
-
-    if ( s == NULL )
-        rc = RC ( rcNS, rcSocket, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcSocket, rcOpening, rcSelf, rcNull );
-        else
-        {
-            rc = KSocketAddRef ( self );
-            if ( rc == 0 )
-            {
-                * s = & ( ( KSocket* ) self ) -> dad;
-                return 0;
-            }
-        }
-
-        * s = NULL;
-    }
-
-    return rc;
-}
-
-
-static
-rc_t CC KSocketWhack ( KSocket *self )
-{
-    assert ( self != NULL );
-
-    shutdown ( self -> fd, SHUT_WR );
-    
-    while ( 1 ) 
-    {
-        char buffer [ 1024 ];
-        ssize_t result = recv ( self -> fd, buffer, sizeof buffer, MSG_DONTWAIT );
-        if ( result <= 0 )
-            break;
-    }
-
-    shutdown ( self -> fd, SHUT_RD );
-
-    close ( self -> fd );
-
-    if ( self -> path != NULL )
-    {
-        unlink ( self -> path );
-        free ( ( void* ) self -> path );
-    }
-        
-    free ( self );
-
-    return 0;
-}
-
-static
-rc_t HandleErrno ( const char *func_name, unsigned int lineno )
-{
-    int lerrno;
-    rc_t rc = 0;
-    
-    switch ( lerrno = errno )
-    {
-    case EACCES: /* write permission denied */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcMemory, rcUnauthorized );            
-        break;
-    case EADDRINUSE: /* address is already in use */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcMemory, rcExists );
-        break;
-    case EADDRNOTAVAIL: /* requested address was not local */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcMemory, rcNotFound );
-        break;
-    case EAGAIN: /* no more free local ports or insufficient rentries in routing cache */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcNoObj, rcExhausted );            
-        break;
-    case EAFNOSUPPORT: /* address didnt have correct address family in ss_family field */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcName, rcInvalid );            
-        break;
-    case EALREADY: /* socket is non blocking and a previous connection has not yet completed */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcUndefined );
-        break;
-    case EBADF: /* invalid sock fd */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcInvalid );
-        break;
-    case ECONNREFUSED: /* remote host refused to allow network connection */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcCanceled );
-        break;
-    case ECONNRESET: /* connection reset by peer */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcCanceled );
-        break;
-    case EDESTADDRREQ: /* socket is not connection-mode and no peer address set */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcInvalid );
-        break;
-    case EFAULT: /* buffer pointer points outside of process's adress space */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcMemory, rcOutofrange );
-        break;
-    case EINPROGRESS: /* call is in progress */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcUndefined );
-        break;
-    case EINTR: /* recv interrupted before any data available */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcCanceled );
-        break;
-    case EINVAL: /* invalid argument */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcParam, rcInvalid );
-        break;
-    case EISCONN: /* connected already */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcExists );
-        break;
-    case ELOOP: /* too many symbolic links in resolving addr */
-        rc = RC ( rcNS, rcNoTarg, rcResolving, rcLink, rcExcessive );
-        break;
-    case EMFILE: /* process file table overflow */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcProcess, rcExhausted );
-        break;
-    case EMSGSIZE: /* msg size too big */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcMessage, rcExcessive );
-        break;
-    case ENAMETOOLONG: /* addr name is too long */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcName, rcExcessive );
-        break;
-    case ENETUNREACH: /* network is unreachable */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcNotAvailable );
-        break;
-    case ENOBUFS: /* output queue for a network connection was full. 
-                     ( wont typically happen in linux. Packets are just silently dropped */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcInterrupted );
-        break;
-    case ENOENT: /* file does not exist */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcNotFound );
-        break;
-    case ENOMEM: /* Could not allocate memory */
-        rc = RC ( rcNS, rcNoTarg, rcAllocating, rcMemory, rcExhausted );
-        break;
-    case ENOTCONN: /* socket has not been connected */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcInvalid );
-        break;
-    case ENOTDIR: /* component of path is not a directory */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcDirEntry, rcInvalid );
-        break;
-    case ENOTSOCK: /* sock fd does not refer to socket */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcInvalid );
-        break;
-    case EOPNOTSUPP: /* bits in flags argument is inappropriate */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcParam, rcInvalid );
-        break;
-    case EPERM:
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcMemory, rcUnauthorized );            
-        break;
-    case EPIPE: /* local end has been shut down. Will also receive SIGPIPE or MSG_NOSIGNAL */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcCanceled );
-        break;
-    case EPROTONOSUPPORT: /* specified protocol is not supported */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcAttr, rcUnsupported );
-        break;
-    case EROFS: /* socket inode on read only file system */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcNoObj, rcReadonly );
-        break;
-    case ETIMEDOUT: /* timeout */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcNotAvailable );
-        break;
-#if ! defined EAGAIN || ! defined EWOULDBLOCK || EAGAIN != EWOULDBLOCK
-    case EWOULDBLOCK:
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcCmd, rcBusy );
-        break;
-#endif
-    default:
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcError, rcUnknown );
-        PLOGERR (klogErr,
-                 (klogErr, rc, "unknown system error '$(S)($(E))'",
-                  "S=%!,E=%d", lerrno, lerrno));
-    }
-    
-    if ( rc != 0 )
-    {
-        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%R\n", rc ) );
-    }
-
-    return rc;
-}
-
-
-static rc_t KSocketGetEndpointV6 ( const KSocket * self, KEndPoint * ep, bool remote )
-{
-    rc_t rc = 0;
-    struct sockaddr_in6 addr;
-    socklen_t l = sizeof( addr );
-    int res = 0;
-
-    if ( remote )
-    {
-        if ( self -> remote_addr_valid )
-        {
-            /* the remote part was already recorded through calling accept() */
-            memcpy ( ep -> u . ipv6 . addr,
-                     self -> remote_addr . v6 . sin6_addr . s6_addr,
-                     sizeof ( ep -> u . ipv6 . addr ) );
-            ep->u.ipv6.port = ntohs( self -> remote_addr . v6 . sin6_port );
-            ep->type = epIPV6;
-            return 0;
-        }
-        else
-            res = getpeername( self -> fd, ( struct sockaddr * )&addr, &l );
-    }
-    else
-        res = getsockname( self -> fd, ( struct sockaddr * )&addr, &l );
-
-    if ( res < 0 )
-        rc = HandleErrno ( __func__, __LINE__ );
-    else
-    {
-        memcpy ( ep -> u . ipv6 . addr,
-                 addr . sin6_addr . s6_addr,
-                 sizeof ( ep -> u . ipv6 . addr ) );
-        ep->u.ipv6.port = ntohs( addr . sin6_port );
-        ep->type = epIPV6;
-    }
-
-    return rc;
-}
-
-
-static rc_t KSocketGetEndpointV4 ( const KSocket * self, KEndPoint * ep, bool remote )
-{
-    rc_t rc = 0;
-    struct sockaddr_in addr;
-    socklen_t l = sizeof( addr );
-    int res = 0;
-
-    if ( remote )
-    {
-        if ( self -> remote_addr_valid )
-        {
-            /* the remote part was already recorded through calling accept() */
-            addr.sin_addr.s_addr = self -> remote_addr.v4.sin_addr.s_addr;
-            addr.sin_port        = self -> remote_addr.v4.sin_port;
-        }
-        else
-            res = getpeername( self -> fd, ( struct sockaddr * )&addr, &l );
-    }
-    else
-        res = getsockname( self -> fd, ( struct sockaddr * )&addr, &l );
-
-    if ( res < 0 )
-        rc = HandleErrno ( __func__, __LINE__ );
-    else
-    {
-        ep->u.ipv4.addr = ntohl( addr.sin_addr.s_addr );
-        ep->u.ipv4.port = ntohs( addr.sin_port );
-        ep->type = epIPV4;
-    }
-
-    return rc;
-}
-
-
-static rc_t KSocketGetEndpoint ( const KSocket * self, KEndPoint * ep, bool remote )
-{
-    rc_t rc = 0;
-    if ( ep == NULL )
-        rc = RC ( rcNS, rcSocket, rcEvaluating, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcSocket, rcEvaluating, rcSelf, rcNull );
-        else
-        {
-            switch( self->type )
-            {
-                case epIPV6 : rc = KSocketGetEndpointV6( self, ep, remote ); break;
-                case epIPV4 : rc = KSocketGetEndpointV4( self, ep, remote ); break;
-                default     : rc = RC ( rcNS, rcSocket, rcEvaluating, rcFunction, rcUnsupported );
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KSocketGetRemoteEndpoint ( const KSocket * self, KEndPoint * ep )
-{
-    return KSocketGetEndpoint ( self, ep, true );
-}
-
-
-LIB_EXPORT rc_t CC KSocketGetLocalEndpoint ( const KSocket * self, KEndPoint * ep )
-{
-    return KSocketGetEndpoint ( self, ep, false );
-}
-
-
-static
-rc_t CC KSocketTimedRead ( const KSocket *self,
-    void *buffer, size_t bsize, size_t *num_read, timeout_t *tm )
-{
-    rc_t rc;
-    int revents;
-    
-    assert ( self != NULL );
-    assert ( num_read != NULL );
-
-    DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketTimedRead(%d, %d)...\n", self, bsize, tm == NULL ? -1 : tm -> mS ) );
-    
-    /* wait for socket to become readable */
-    revents = socket_wait ( self -> fd
-                            , POLLIN
-                            | POLLRDNORM
-                            | POLLRDBAND
-                            | POLLPRI
-                            | POLLRDHUP
-                            , tm );
-
-    /* check for error */
-    if ( revents < 0 )
-    {
-        rc = HandleErrno ( __func__, __LINE__ );
-        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketTimedRead socket_wait returned '%s'\n", self, strerror(errno) ) );
-        return rc;
-    }
-    if ( ( revents & ( POLLERR | POLLNVAL ) ) != 0 )
-    {
-        if ( ( revents & POLLERR ) != 0)
-        {
-            int optval = 0;
-            socklen_t optlen = sizeof optval;
-            if ( ( getsockopt ( self -> fd, SOL_SOCKET, SO_ERROR, & optval, & optlen ) == 0 )
-                 && optval > 0)
-            {
-                errno = optval;
-                DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketTimedRead socket_wait/getsockopt returned '%s'\n", 
-                                                            self, strerror(optval) ) );
-                return HandleErrno(__func__, __LINE__);
-            }
-        }
-
-        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketTimedRead socket_wait returned POLLERR | POLLNVAL\n", self ) );
-        return RC ( rcNS, rcStream, rcReading, rcNoObj, rcUnknown );
-    }
-
-    /* check for read availability */
-    if ( ( revents & ( POLLRDNORM | POLLRDBAND ) ) != 0 )
-    {
-        ssize_t count = recv ( self -> fd, buffer, bsize, 0 );
-        if ( count >= 0 )
-        {
-            * num_read = count;
-            return 0;
-        }
-        rc = HandleErrno ( __func__, __LINE__ );
-        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketTimedRead recv returned count %d\n", self, count ) );
-        return rc;
-    }
-
-    /* check for broken connection */
-    if ( ( revents & ( POLLHUP | POLLRDHUP ) ) != 0 )
-    {
-        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketTimedRead broken connection\n", self ) );
-        * num_read = 0;
-        return 0;
-    }
-
-    /* anything else in revents is an error */
-    if ( ( revents & ~ POLLIN ) != 0 && errno != 0 )
-    {
-        rc = HandleErrno ( __func__, __LINE__ );
-        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketTimedRead error '%s'\n", self, strerror ( errno ) ) );
-        return rc;
-    }
-
-    /* finally, call this a timeout */
-    DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketTimedRead timeout\n", self ) );
-    return RC ( rcNS, rcStream, rcReading, rcTimeout, rcExhausted );
-}
-
-static
-rc_t CC KSocketRead ( const KSocket *self,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    timeout_t tm;
-    assert ( self != NULL );
-
-    if ( self -> read_timeout < 0 )
-        return KSocketTimedRead ( self, buffer, bsize, num_read, NULL );
-
-    TimeoutInit ( & tm, self -> read_timeout );
-    return KSocketTimedRead ( self, buffer, bsize, num_read, & tm );
-}
-
-static
-rc_t CC KSocketTimedWrite ( KSocket *self,
-    const void *buffer, size_t bsize, size_t *num_writ, timeout_t *tm )
-{
-    rc_t rc;
-    int revents;
-    ssize_t count;
-
-    assert ( self != NULL );
-    assert ( buffer != NULL );
-    assert ( bsize != 0 );
-    assert ( num_writ != NULL );
-
-    DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketTimedWrite(%d, %d)...\n", self, bsize, tm == NULL ? -1 : tm -> mS ) );
-
-    /* wait for socket to become writable */
-    revents = socket_wait ( self -> fd
-                            , POLLOUT
-                            | POLLWRNORM
-                            | POLLWRBAND
-                            , tm );
-
-    /* check for error */
-    if ( revents < 0 )
-    {
-        rc = HandleErrno ( __func__, __LINE__ );
-        assert ( rc != 0 );
-        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketTimedWrite socket_wait returned '%s'\n", self, strerror ( errno ) ) );
-        return rc;
-    }
-    if ( ( revents & ( POLLERR | POLLNVAL ) ) != 0 )
-    {
-        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketTimedWrite socket_wait returned POLLERR | POLLNVAL\n", self ) );
-        return RC ( rcNS, rcStream, rcWriting, rcNoObj, rcUnknown );
-    }
-
-    /* check for broken connection */
-    if ( ( revents & POLLHUP ) != 0 )
-    {
-        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: POLLHUP received\n", self ) );
-        * num_writ = 0;
-        return  RC ( rcNS, rcFile, rcWriting, rcTransfer, rcIncomplete );
-    }
-
-    /* check for ability to send */
-    if ( ( revents & ( POLLWRNORM | POLLWRBAND ) ) != 0 )
-    {
-        count = send ( self -> fd, buffer, bsize, 0 );
-        if ( count >= 0 )
-        {
-            DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: %d bytes written\n", self, count ) );
-            * num_writ = count;
-            return 0;
-        }
-
-        rc = HandleErrno ( __func__, __LINE__ );
-        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketTimedWrite recv returned count %d\n", self, count ) );
-        return rc;
-    }
-
-    /* anything else in revents is an error */
-    if ( ( revents & ~ POLLOUT ) != 0 && errno != 0 )
-    {
-        rc = HandleErrno ( __func__, __LINE__ );
-        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketTimedWrite error '%s'\n", self, strerror ( errno ) ) );
-        return rc;
-    }
-
-    /* finally, call this a timeout */
-    DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketTimedWrite timeout\n", self ) );
-    return RC ( rcNS, rcStream, rcWriting, rcTimeout, rcExhausted );
-}
-
-static
-rc_t CC KSocketWrite ( KSocket *self,
-    const void *buffer, size_t bsize, size_t *num_writ )
-{
-    timeout_t tm;
-    assert ( self != NULL );
-
-    if ( self -> write_timeout < 0 )
-        return KSocketTimedWrite ( self, buffer, bsize, num_writ, NULL );
-
-    TimeoutInit ( & tm, self -> write_timeout );
-    return KSocketTimedWrite ( self, buffer, bsize, num_writ, & tm );
-}
-
-static KStream_vt_v1 vtKSocket =
-{
-    1, 1,
-    KSocketWhack,
-    KSocketRead,
-    KSocketWrite,
-    KSocketTimedRead,
-    KSocketTimedWrite
-};
-
-/* for testing */
-void KStreamForceSocketClose(const struct KStream *self) {
-    assert(self);
-    close(((KSocket*)self)->fd);
-}
-
-static
-rc_t KSocketMakePath ( const char * name, char * buf, size_t buf_size )
-{
-    size_t num_writ;
-#if 0
-    struct passwd* pwd;
-    pwd = getpwuid ( geteuid () );
-    if ( pwd == NULL )
-        return HandleErrno ( __func__, __LINE__ );
-
-    return string_printf ( buf, buf_size, & num_writ, "%s/.ncbi/%s", pwd -> pw_dir, name );
-#else
-    const char *HOME = getenv ( "HOME" );
-    if ( HOME == NULL )
-        return RC ( rcNS, rcProcess, rcAccessing, rcPath, rcNotFound );
-
-    return string_printf ( buf, buf_size, & num_writ, "%s/.ncbi/%s", HOME, name );
-#endif
-}
-
-static
-rc_t KSocketConnectIPv4 ( KSocket *self, int32_t retryTimeout, const KEndPoint *from, const KEndPoint *to )
-{
-    rc_t rc = 0;
-    uint32_t retry_count = 0;
-    struct sockaddr_in ss_from, ss_to;
-
-    memset ( & ss_from, 0, sizeof ss_from );
-    if ( from != NULL )
-    {
-        ss_from . sin_family = AF_INET;
-        ss_from . sin_addr . s_addr = htonl ( from -> u . ipv4 . addr );
-        ss_from . sin_port = htons ( from -> u . ipv4 . port );
-    }
-
-    memset ( & ss_to, 0, sizeof ss_to );
-    ss_to . sin_family = AF_INET;
-    ss_to . sin_addr . s_addr = htonl ( to -> u . ipv4 . addr );
-    ss_to . sin_port = htons ( to -> u . ipv4 . port );
-
-    do 
-    {
-        /* create the OS socket */
-        self -> fd = socket ( AF_INET, SOCK_STREAM, 0 );
-        if ( self -> fd < 0 )
-            rc = HandleErrno ( __func__, __LINE__ );
-        else
-        {
-            /* disable nagle algorithm */
-            int flag = 1;
-            setsockopt ( self -> fd, IPPROTO_TCP, TCP_NODELAY, ( char* ) & flag, sizeof flag );
-
-            /* bind */
-            if ( from != NULL && bind ( self -> fd, ( struct sockaddr* ) & ss_from, sizeof ss_from ) != 0 )
-                rc = HandleErrno ( __func__, __LINE__ );
-                
-            if ( rc == 0 )
-            {
-                /* connect */
-                if ( connect ( self -> fd, ( struct sockaddr* ) & ss_to, sizeof ss_to ) == 0 )
-                {
-                    /* set non-blocking mode */
-                    flag = fcntl ( self -> fd, F_GETFL );
-                    fcntl ( self -> fd, F_SETFL, flag | O_NONBLOCK );
-                    return 0;
-                }
-                rc = HandleErrno ( __func__, __LINE__ );
-            }
-
-            /* dump socket */
-            close ( self -> fd );
-            self -> fd = -1;
-        }
-        
-        /* rc != 0 */
-        if (retryTimeout < 0 || retry_count < retryTimeout)
-        {   /* retry */
-            sleep ( 1 );
-            ++retry_count;
-            rc = 0;
-        }
-    }
-    while (rc == 0);
-    
-    DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketConnectIPv4 timed out\n", self ) );
-
-    return rc;
-}
-
-
-static
-rc_t KSocketConnectIPv6 ( KSocket *self, int32_t retryTimeout, const KEndPoint *from, const KEndPoint *to )
-{
-    rc_t rc = 0;
-    uint32_t retry_count = 0;
-    struct sockaddr_in6 ss_from, ss_to;
-
-    memset ( & ss_from, 0, sizeof ss_from );
-    if ( from != NULL )
-    {
-        ss_from . sin6_family = AF_INET6;
-        memcpy ( ss_from . sin6_addr . s6_addr,
-                 from -> u . ipv6 . addr,
-                 sizeof ( from -> u . ipv6 . addr ) );
-        ss_from . sin6_port = htons ( from -> u . ipv6 . port );
-    }
-
-    memset ( & ss_to, 0, sizeof ss_to );
-    ss_to . sin6_family = AF_INET6;
-    memcpy ( ss_to . sin6_addr . s6_addr,
-             to -> u . ipv6 . addr,
-             sizeof ( to -> u . ipv6 . addr ) );
-    ss_to . sin6_port = htons ( to -> u . ipv6 . port );
-
-    do 
-    {
-        /* create the OS socket */
-        self -> fd = socket ( AF_INET6, SOCK_STREAM, 0 );
-        if ( self -> fd < 0 )
-            rc = HandleErrno ( __func__, __LINE__ );
-        else
-        {
-            /* disable nagle algorithm */
-            int flag = 1;
-            setsockopt ( self -> fd, IPPROTO_TCP, TCP_NODELAY, ( char* ) & flag, sizeof flag );
-
-            /* bind */
-            if ( from != NULL && bind ( self -> fd, ( struct sockaddr* ) & ss_from, sizeof ss_from ) != 0 )
-                rc = HandleErrno ( __func__, __LINE__ );
-                
-            if ( rc == 0 )
-            {
-                /* connect */
-                if ( connect ( self -> fd, ( struct sockaddr* ) & ss_to, sizeof ss_to ) == 0 )
-                {
-                    /* set non-blocking mode */
-                    flag = fcntl ( self -> fd, F_GETFL );
-                    fcntl ( self -> fd, F_SETFL, flag | O_NONBLOCK );
-                    return 0;
-                }
-                rc = HandleErrno ( __func__, __LINE__ );
-            }
-
-            /* dump socket */
-            close ( self -> fd );
-            self -> fd = -1;
-        }
-        
-        /* rc != 0 */
-        if (retryTimeout < 0 || retry_count < retryTimeout)
-        {   /* retry */
-            sleep ( 1 );
-            ++retry_count;
-            rc = 0;
-        }
-    }
-    while (rc == 0);
-    
-    DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketConnectIPv6 timed out\n", self ) );
-
-    return rc;
-}
-
-
-static
-rc_t KSocketConnectIPC ( KSocket *self, int32_t retryTimeout, const KEndPoint *to )
-{
-    rc_t rc = 0;
-    uint32_t retry_count = 0;
-    struct sockaddr_un ss_to;
-
-    memset ( & ss_to, 0, sizeof ss_to );
-    ss_to . sun_family = AF_UNIX;
-    rc = KSocketMakePath ( to -> u . ipc_name, ss_to . sun_path, sizeof ss_to . sun_path );
-
-    do 
-    {
-        /* create the OS socket */
-        self -> fd = socket ( AF_UNIX, SOCK_STREAM, 0 );
-        if ( self -> fd < 0 )
-            rc = HandleErrno ( __func__, __LINE__ );
-        else
-        {
-            /* connect */
-            if ( connect ( self -> fd, ( struct sockaddr* ) & ss_to, sizeof ss_to ) == 0 )
-            {
-                return 0;
-            }
-            rc = HandleErrno ( __func__, __LINE__ );
-
-            /* dump socket */
-            close ( self -> fd );
-            self -> fd = -1;
-        }
-        
-        /* rc != 0 */
-        if (retryTimeout < 0 || retry_count < retryTimeout)
-        {   /* retry */
-            sleep ( 1 );
-            ++retry_count;
-            rc = 0;
-        }
-    }
-    while (rc == 0);
-
-    DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_SOCKET), ( "%p: KSocketConnectIPC timed out\n", self ) );            
-
-    return rc;
- }
-
-KNS_EXTERN rc_t CC KNSManagerMakeRetryTimedConnection ( struct KNSManager const * self,
-    struct KSocket **out, int32_t retryTimeout, int32_t readMillis, int32_t writeMillis,
-    struct KEndPoint const *from, struct KEndPoint const *to )
-{
-    rc_t rc;
-
-    if ( out == NULL )
-        rc = RC ( rcNS, rcStream, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcStream, rcConstructing, rcSelf, rcNull );
-        else if ( to == NULL )
-            rc = RC ( rcNS, rcStream, rcConstructing, rcParam, rcNull );
-        else if ( from != NULL && from -> type != to -> type )
-            rc = RC ( rcNS, rcStream, rcConstructing, rcParam, rcIncorrect );
-        else
-        {
-            KSocket *conn = calloc ( 1, sizeof * conn );
-            if ( conn == NULL )
-                rc = RC ( rcNS, rcStream, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                conn -> fd = -1;
-                conn -> read_timeout = readMillis;
-                conn -> write_timeout = writeMillis;
-
-                rc = KStreamInit ( & conn -> dad, ( const KStream_vt* ) & vtKSocket,
-                                   "KSocket", "", true, true );
-                if ( rc == 0 )
-                {
-                    switch ( to -> type )
-                    {
-                    case epIPV6:
-                        rc = KSocketConnectIPv6 ( conn, retryTimeout, from, to );
-                        break;
-
-                    case epIPV4:
-                        rc = KSocketConnectIPv4 ( conn, retryTimeout, from, to );
-                        break;
-
-                    case epIPC:
-                        rc = KSocketConnectIPC ( conn, retryTimeout, to );
-                        break;
-
-                    default:
-                        rc = RC ( rcNS, rcStream, rcConstructing, rcParam, rcIncorrect );
-                    }
-
-                    if ( rc == 0 )
-                    {
-                        * out = conn;
-                        return 0;
-                    }
-                }
-
-                free ( conn );
-            }
-        }
-
-        * out = NULL;
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KListener
- */
-static
-rc_t KNSManagerMakeIPv6Listener ( KSocket *listener, const KEndPoint * ep )
-{
-    rc_t rc;
-
-    listener -> fd = socket ( AF_INET6, SOCK_STREAM, 0 );
-    if ( listener -> fd < 0 )
-        rc = HandleErrno ( __func__, __LINE__ );
-    else
-    {
-        struct sockaddr_in6 ss;
-
-        int on = 1;
-        setsockopt ( listener -> fd, SOL_SOCKET, SO_REUSEADDR, ( char* ) & on, sizeof on );
-
-        memset ( & ss, 0, sizeof ss );
-        ss . sin6_family = AF_INET6;
-
-        memcpy ( ss . sin6_addr . s6_addr,
-                 ep -> u . ipv6 . addr,
-                 sizeof ( ep -> u . ipv6 . addr ) );
-
-        ss . sin6_port = htons ( ep -> u . ipv6 . port );
-
-        if ( bind ( listener -> fd, ( struct sockaddr* ) & ss, sizeof ss ) == 0 )
-            return 0;
-        rc = HandleErrno ( __func__, __LINE__ );
-
-        close ( listener -> fd );
-        listener -> fd = -1;
-    }
-
-    return rc;
-}
-
-
-static
-rc_t KNSManagerMakeIPv4Listener ( KSocket *listener, const KEndPoint * ep )
-{
-    rc_t rc;
-
-    listener -> fd = socket ( AF_INET, SOCK_STREAM, 0 );
-    if ( listener -> fd < 0 )
-        rc = HandleErrno ( __func__, __LINE__ );
-    else
-    {
-        struct sockaddr_in ss;
-
-        int on = 1;
-        setsockopt ( listener -> fd, SOL_SOCKET, SO_REUSEADDR, ( char* ) & on, sizeof on );
-
-        memset ( & ss, 0, sizeof ss );
-        ss . sin_family = AF_INET;
-        ss . sin_addr . s_addr = htonl ( ep -> u . ipv4 . addr );
-        ss . sin_port = htons ( ep -> u . ipv4 . port );
-
-        if ( bind ( listener -> fd, ( struct sockaddr* ) & ss, sizeof ss ) == 0 )
-            return 0;
-        rc = HandleErrno ( __func__, __LINE__ );
-
-        close ( listener -> fd );
-        listener -> fd = -1;
-    }
-
-    return rc;
-}
-
-static
-rc_t KNSManagerMakeIPCListener ( KSocket *listener, const KEndPoint * ep )
-{
-    rc_t rc;
-
-    listener -> fd = socket ( AF_UNIX, SOCK_STREAM, 0 );
-    if ( listener -> fd < 0 )
-        rc = HandleErrno ( __func__, __LINE__ );
-    else
-    {
-        struct sockaddr_un ss;
-        memset ( & ss, 0, sizeof ss );
-        ss.sun_family = AF_UNIX;
-        rc = KSocketMakePath ( ep -> u. ipc_name, ss . sun_path, sizeof ss . sun_path );
-        if ( rc == 0 )
-        {
-            char * path = string_dup ( ss . sun_path, string_measure ( ss . sun_path, NULL ) );
-            if ( path == NULL )
-                rc = RC ( rcNS, rcSocket, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                unlink ( ss . sun_path );
-                if ( bind ( listener -> fd, ( struct sockaddr* ) & ss, sizeof ss ) != 0 )
-                    rc = HandleErrno ( __func__, __LINE__ );
-                else
-                {
-                    listener -> path = path;
-                    return 0;
-                }
-
-                free ( path );
-            }
-        }
-
-        close ( listener -> fd );
-        listener -> fd = -1;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KNSManagerMakeListener ( const KNSManager *self,
-    KListener ** out, const KEndPoint * ep )
-{   
-    rc_t rc;
-
-    if ( out == NULL )
-        rc = RC ( rcNS, rcSocket, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcSocket, rcConstructing, rcSelf, rcNull );
-        else if ( ep == NULL )
-            rc = RC ( rcNS, rcSocket, rcConstructing, rcParam, rcNull );
-        else
-        {
-            KSocket *listener = calloc ( 1, sizeof * listener );
-            if ( listener == NULL )
-                rc = RC ( rcNS, rcSocket, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                listener -> fd = -1;
-
-                /* pass these along to accepted sockets */
-                listener -> read_timeout = self -> conn_read_timeout;
-                listener -> write_timeout = self -> conn_write_timeout;
-
-                rc = KStreamInit ( & listener -> dad, ( const KStream_vt* ) & vtKSocket,
-                                   "KSocket", "", true, true );
-                if ( rc == 0 )
-                {
-                    switch ( ep -> type )
-                    {
-                    case epIPV6:
-                        rc = KNSManagerMakeIPv6Listener ( listener, ep );
-                        break;
-
-                    case epIPV4:
-                        rc = KNSManagerMakeIPv4Listener ( listener, ep );
-                        break;
-
-                    case epIPC:
-                        rc = KNSManagerMakeIPCListener ( listener, ep );
-                        break;
-
-                    default:
-                        rc = RC ( rcNS, rcSocket, rcConstructing, rcParam, rcIncorrect );
-                    }
-
-                    if ( rc == 0 )
-                    {
-                        /* the classic 5 connection queue... ? */
-                        if ( listen ( listener -> fd, 5 ) == 0 )
-                        {
-                            * out = ( KListener* ) listener;
-                            return 0;
-                        }
-
-                        rc = HandleErrno ( __func__, __LINE__ );
-
-                        if ( listener -> path != NULL )
-                            free ( ( void* ) listener -> path );
-                    }
-                }
-
-                free ( listener );
-            }
-        }
-
-        * out = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KListenerAddRef( const KListener *self )
-{
-    return KSocketAddRef ( ( const KSocket* ) self );
-}
-
-LIB_EXPORT rc_t CC KListenerRelease ( const KListener *self )
-{
-    return KSocketRelease ( ( const KSocket* ) self );
-}
-
-static
-rc_t KListenerAcceptIPv4 ( KSocket *self, KSocket *conn )
-{
-    socklen_t len = sizeof conn->remote_addr.v4;
-    conn -> fd = accept ( self -> fd, ( struct sockaddr * ) & conn->remote_addr.v4, & len );
-    if ( conn -> fd < 0 )
-        return HandleErrno ( __func__, __LINE__ );
-    if ( len > sizeof conn->remote_addr.v4 )
-        return RC ( rcNS, rcConnection, rcWaiting, rcBuffer, rcInsufficient );
-    return 0;
-}
-
-
-static
-rc_t KListenerAcceptIPv6 ( KSocket *self, KSocket *conn )
-{
-    socklen_t len = sizeof conn->remote_addr.v6;
-    conn -> fd = accept ( self -> fd, ( struct sockaddr * ) & conn->remote_addr.v6, & len );
-    if ( conn -> fd < 0 )
-        return HandleErrno ( __func__, __LINE__ );
-    if ( len > sizeof conn->remote_addr.v6 )
-        return RC ( rcNS, rcConnection, rcWaiting, rcBuffer, rcInsufficient );
-    return 0;
-}
-
-static
-rc_t KListenerAcceptIPC ( KSocket *self, KSocket *conn )
-{
-    struct sockaddr_un remote;
-    socklen_t len = sizeof remote;
-    conn -> fd = accept ( self -> fd, ( struct sockaddr* ) & remote, & len );
-    if ( conn -> fd < 0 )
-        return HandleErrno ( __func__, __LINE__ );
-    if ( len > sizeof remote )
-        return RC ( rcNS, rcConnection, rcWaiting, rcBuffer, rcInsufficient );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KListenerAccept ( KListener *iself, struct KSocket **out )
-{
-    rc_t rc;
-    KSocket * self = ( KSocket* ) iself;
-
-
-    if ( out == NULL )
-        rc = RC ( rcNS, rcConnection, rcWaiting, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcConnection, rcWaiting, rcSelf, rcNull);
-        else
-        {
-            KSocket tmp_socket; /* we only need to populate fd and remote_addr */
-            tmp_socket . fd = -1;
-
-            switch ( self -> type )
-            {
-            case epIPV6:
-                rc = KListenerAcceptIPv6 ( self, & tmp_socket );
-                break;
-
-            case epIPV4:
-                rc = KListenerAcceptIPv4 ( self, & tmp_socket );
-                break;
-
-            case epIPC:
-                rc = KListenerAcceptIPC ( self, & tmp_socket );
-                break;
-
-            default:
-                rc = RC ( rcNS, rcSocket, rcConstructing, rcSelf, rcCorrupt );
-            }
-
-            if ( rc == 0 )
-            {
-                KSocket * new_socket = calloc ( 1, sizeof * new_socket );
-                if ( new_socket == NULL )
-                    rc = RC ( rcNS, rcConnection, rcWaiting, rcMemory, rcExhausted );
-                else
-                {
-                    new_socket -> fd                = tmp_socket . fd;
-                    new_socket -> remote_addr       = tmp_socket . remote_addr;
-                    new_socket -> read_timeout      = self -> read_timeout;
-                    new_socket -> write_timeout     = self -> write_timeout;
-                    new_socket -> remote_addr_valid = true;
-
-                    rc = KStreamInit ( & new_socket -> dad, ( const KStream_vt* ) & vtKSocket,
-                                       "KSocket", "", true, true );
-                    if ( rc == 0 )
-                    {
-                        * out = new_socket;
-                        return 0;
-                    }
-                    
-                    free ( new_socket );
-                }
-            }
-        }
-
-        * out = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/kns/unix/sysstream.c b/libs/kns/unix/sysstream.c
deleted file mode 100644
index de03f29..0000000
--- a/libs/kns/unix/sysstream.c
+++ /dev/null
@@ -1,251 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-#define KSTREAM_IMPL KStdIOStream
-typedef struct KStdIOStream KStdIOStream;
-
-#include <kns/extern.h>
-#include <kns/stream.h>
-#include <kns/impl.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <sysalloc.h>
-
-#include "stream-priv.h"
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * KStdIOStream
- *  a virtual stream
- */
-struct KStdIOStream
-{
-    KStream dad;
-    int fd;
-};
-
-static
-rc_t CC KStdIOStreamWhack ( KStdIOStream *self )
-{
-    /* we don't close self->fd because we did not open it */
-    free ( self );
-    return 0;
-}
-
-static
-rc_t CC KStdIOStreamRead ( const KStdIOStream *self,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    rc_t rc;
-    assert ( self != NULL );
-
-    while ( 1 )
-    {
-        int lerrno;
-
-        ssize_t count = read ( self -> fd, buffer, bsize );
-
-        if ( count < 0 ) switch ( lerrno = errno )
-        {
-        case ENOSPC:
-            rc = RC ( rcNS, rcStream, rcReading, rcStorage, rcExhausted );
-            LOGERR (klogSys, rc, "system device full error");
-            return rc;
-
-        case EINTR:
-            continue;
-
-        case EFBIG:
-            rc = RC ( rcNS, rcStream, rcReading, rcStream, rcExcessive );
-            LOGERR (klogErr, rc, "system file too big error");
-            return rc;
-
-        case EIO:
-            rc = RC ( rcNS, rcStream, rcReading, rcTransfer, rcUnknown );
-            LOGERR (klogErr, rc, "system I/O error - broken pipe");
-            return rc;
-            
-        case EBADF:
-            rc = RC ( rcNS, rcStream, rcReading, rcFileDesc, rcInvalid );
-            PLOGERR (klogInt,
-                     (klogInt, rc, "system bad file descriptor error fd=$(F)",
-                      "F=%d", lerrno, self->fd));
-            return rc;
-
-        case EINVAL:
-            rc = RC ( rcNS, rcStream, rcReading, rcParam, rcInvalid );
-            LOGERR (klogInt, rc, "system invalid argument error");
-            return rc;
-
-        default:
-            rc = RC ( rcNS, rcStream, rcReading, rcNoObj, rcUnknown );
-            PLOGERR (klogErr,
-                     (klogErr, rc, "unknown system error '$(S)($(E))'",
-                      "S=%!,E=%d", lerrno, lerrno));
-            return rc;
-        }
-
-        assert ( num_read != NULL );
-        * num_read = count;
-        break;
-    }
-
-    return 0;
-}
-
-static
-rc_t CC KStdIOStreamWrite ( KStdIOStream *self,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    rc_t rc;
-    assert ( self != NULL );
-
-    while ( 1 )
-    {
-        int lerrno;
-
-        ssize_t count = write ( self -> fd, buffer, size );
-
-        if ( count < 0 ) switch ( lerrno = errno )
-        {
-        case ENOSPC:
-            rc = RC ( rcNS, rcStream, rcWriting, rcStorage, rcExhausted );
-            LOGERR (klogSys, rc, "system device full error");
-            return rc;
-
-        case EINTR:
-            continue;
-
-        case EFBIG:
-            rc = RC ( rcNS, rcStream, rcWriting, rcStream, rcExcessive );
-            LOGERR (klogErr, rc, "system file too big error");
-            return rc;
-
-        case EIO:
-            rc = RC ( rcNS, rcStream, rcWriting, rcTransfer, rcUnknown );
-            LOGERR (klogErr, rc, "system I/O error - broken pipe");
-            return rc;
-            
-        case EBADF:
-            rc = RC ( rcNS, rcStream, rcWriting, rcFileDesc, rcInvalid );
-            PLOGERR (klogInt,
-                     (klogInt, rc, "system bad file descriptor error fd=$(F)",
-                      "F=%d", lerrno, self->fd));
-            return rc;
-
-        case EINVAL:
-            rc = RC ( rcNS, rcStream, rcWriting, rcParam, rcInvalid );
-            LOGERR (klogInt, rc, "system invalid argument error");
-            return rc;
-
-        default:
-            rc = RC ( rcNS, rcStream, rcWriting, rcNoObj, rcUnknown );
-            PLOGERR (klogErr,
-                     (klogErr, rc, "unknown system error '$(S)($(E))'",
-                      "S=%!,E=%d", lerrno, lerrno));
-            return rc;
-        }
-
-        assert ( num_writ != NULL );
-        * num_writ = count;
-        break;
-    }
-
-    return 0;
-}
-
-static KStream_vt_v1 vtKStdIOStream =
-{
-    1, 0,
-    KStdIOStreamWhack,
-    KStdIOStreamRead,
-    KStdIOStreamWrite
-};
-
-
-static
-rc_t KStdIOStreamMake ( KStream **sp, int fd, const char *strname,
-    bool read_enabled, bool write_enabled )
-{
-    rc_t rc;
-
-    if ( sp == NULL )
-        rc = RC ( rcNS, rcStream, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KStdIOStream *s = calloc ( sizeof *s, 1 );
-        if ( s == NULL )
-            rc = RC ( rcNS, rcStream, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KStreamInit ( & s -> dad, ( const KStream_vt* ) & vtKStdIOStream,
-                               "KStdIOStream", strname, read_enabled, write_enabled );
-            if ( rc == 0 )
-            {
-                s -> fd = fd;
-                * sp = & s -> dad;
-                return 0;
-            }
-
-            free ( s );
-        }
-
-        * sp = NULL;
-    }
-
-    return rc;
-}
-
-/* MakeStdIn
- *  creates a read-only stream on stdin
- */
-LIB_EXPORT rc_t CC KStreamMakeStdIn ( const KStream **std_in )
-{
-    return KStdIOStreamMake ( ( KStream** ) std_in, 0, "stdin", true, false );
-}
-
-/* MakeStdOut
- * MakeStdErr
- *  creates a write-only stream on stdout or stderr
- */
-LIB_EXPORT rc_t CC KStreamMakeStdOut ( KStream **std_out )
-{
-    return KStdIOStreamMake ( std_out, 1, "stdout", false, true );
-}
-
-LIB_EXPORT rc_t CC KStreamMakeStdErr ( KStream **std_err )
-{
-    return KStdIOStreamMake ( std_err, 2, "stderr", false, true );
-}
diff --git a/libs/kns/url-fetcher-curl.c b/libs/kns/url-fetcher-curl.c
deleted file mode 100644
index 12c7073..0000000
--- a/libs/kns/url-fetcher-curl.c
+++ /dev/null
@@ -1,255 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kns/extern.h>
-#include <klib/rc.h>
-#include <kns/manager.h>
-#include <kns/url-fetcher.h>
-
-/* IMPORTANT define this before including the *-impl.h !!!! */
-#define KURL_FETCHER_IMPL KUrlFetcherCurl
-#include "url-fetcher-impl.h"
-
-#include "kns_mgr_priv.h"
-
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-
-/*
-#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
-*/
-
-/*--------------------------------------------------------------------------
- * KVectorNamelist ... a generic Namelist based on a Vector
- */
-struct KUrlFetcherCurl
-{
-    KUrlFetcher dad;
-
-    struct KNSManager *kns_mgr;
-    CURL *curl_handle;
-
-    /* this buffer is passed in from read() to the callback 
-       it is owned by the caller not this class */
-    char *buff;
-    size_t buffsize;
-    size_t in_buff;
-    
-    /* this is the spill-over buffer, used by the callback
-       if the caller-provided buffer is too small */
-    char *spill_over_buff;
-    size_t spill_over_buffsize;
-};
-
-/* implementation of the the virtual KUrlFetcher-Interface for curl */
-
-static
-rc_t CC KUrlFetcherCurlDestroy ( KUrlFetcherCurl *self )
-{
-    self->kns_mgr->curl_easy_cleanup_fkt( self -> curl_handle );
-    KNSManagerRelease( self->kns_mgr );
-
-    if ( self -> spill_over_buff != NULL )
-        free( self -> spill_over_buff );
-    free ( self );
-    return 0;
-}
-
-static
-size_t CC KUrlFetcherCurlCallback( void *ptr, size_t size, size_t nmemb, void *data )
-{
-    size_t given_bytes = size * nmemb; /* calculate the size given in ptr */
-    KUrlFetcherCurl *self = ( KUrlFetcherCurl * )data;
-    if ( self != NULL )
-    {
-        if ( ( self -> in_buff + given_bytes ) > self -> buffsize )
-        {
-            /* the caller-provided buffer IS NOT enough... */
-            size_t to_copy = ( self -> buffsize - self -> in_buff );
-            if ( to_copy > 0 )
-            {
-                /* the caller-provided buffer can hold a part of it... */
-                if ( self -> buff )
-                {
-                    memcpy( &( self -> buff [ self -> in_buff ] ), ptr, given_bytes );
-                    self -> in_buff += given_bytes;
-                }
-            }
-            else
-            {
-                /* the spill-over-buffer has to take care of the rest... */
-                size_t remaining = ( given_bytes - to_copy );
-                if ( self -> spill_over_buff == NULL )
-                    self -> spill_over_buff = malloc( remaining );
-                else
-                    self -> spill_over_buff = realloc( self -> spill_over_buff,
-                                                       self -> spill_over_buffsize + remaining );
-                if ( self -> spill_over_buff != NULL )
-                {
-                    memcpy( &( self -> spill_over_buff [ self -> spill_over_buffsize ] ), ptr, remaining );
-                    self -> spill_over_buffsize += remaining;
-                }
-            }
-        }
-        else
-        {
-            /* the caller-provided buffer IS enough... */
-            if ( self -> buff )
-            {
-                memcpy( &( self -> buff [ self -> in_buff ] ), ptr, given_bytes );
-                self -> in_buff += given_bytes;
-            }
-        }
-    }
-    return given_bytes;
-}
-
-
-static
-rc_t CC KUrlFetcherCurlRead( KUrlFetcherCurl *self, const char * uri,
-                          void *dst, size_t to_read, size_t *num_read )
-{
-    CURLcode rcc;
-
-    /* the virtual interface has already checked that self is not NULL */
-    if ( uri == NULL || dst == NULL || to_read == 0 )
-        return RC ( rcApp, rcFunction, rcConstructing, rcParam, rcNull );
-
-    self -> buff = dst;
-    self -> buffsize = to_read;
-    self -> in_buff = 0;
-
-    if ( self -> spill_over_buff != NULL )
-        free( self -> spill_over_buff );
-    self -> spill_over_buff = NULL;
-    self -> spill_over_buffsize = 0;
-
-    if ( self -> curl_handle == NULL )
-        return RC ( rcApp, rcFunction, rcConstructing, rcParam, rcNull );
-
-    rcc = self->kns_mgr->curl_easy_setopt_fkt( self -> curl_handle, CURLOPT_URL, uri );
-    if ( rcc != CURLE_OK )
-    {
-        if ( num_read ) *num_read = 0;
-        return RC ( rcApp, rcFunction, rcConstructing, rcParam, rcNull );
-    }
-    else
-    {
-        rcc = self->kns_mgr->curl_easy_perform_fkt( self-> curl_handle );
-        if ( rcc != CURLE_OK )
-        {
-            if ( num_read ) *num_read = 0;
-            return RC ( rcApp, rcFunction, rcConstructing, rcParam, rcNull );
-        }
-    }
-    
-    if ( num_read )
-        *num_read = self -> in_buff;
-
-    return 0;
-}
-
-static KUrlFetcher_vt_v1 sKUrlFetcherCurl_vt =
-{
-    1, 0,
-    KUrlFetcherCurlDestroy,
-    KUrlFetcherCurlRead,
-};
-
-LIB_EXPORT rc_t CC KUrlFetcherCurlMake( KUrlFetcher **fetcher, const bool verbose )
-{
-    rc_t rc;
-
-    if ( fetcher == NULL )
-        rc = RC ( rcApp, rcFunction, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KUrlFetcherCurl * tmp;
-        *fetcher = NULL;
-        tmp = malloc( sizeof( * tmp ) );
-        if ( tmp != NULL )
-        {
-            rc = KUrlFetcherInit ( &(tmp)->dad, (const KUrlFetcher_vt*)&sKUrlFetcherCurl_vt );
-            if ( rc != 0 )
-                free( tmp );
-            else
-            {
-                tmp -> buff = NULL;
-                tmp -> buffsize = 0;
-                tmp -> in_buff = 0;
-
-                tmp -> spill_over_buff = NULL;
-                tmp -> spill_over_buffsize = 0;
-
-                rc = KNSManagerMake( &tmp->kns_mgr );
-                if ( rc == 0 )
-                {
-                    tmp -> curl_handle = tmp -> kns_mgr -> curl_easy_init_fkt();
-                    if ( tmp -> curl_handle == NULL )
-                    {
-                        KNSManagerRelease( tmp->kns_mgr );
-                        free( tmp );
-                        rc = RC ( rcApp, rcFunction, rcConstructing, rcParam, rcNull );
-                    }
-                    else
-                    {
-                        CURLcode rcc;
-                        
-                        if ( verbose )
-                            tmp -> kns_mgr -> curl_easy_setopt_fkt( tmp -> curl_handle, CURLOPT_VERBOSE , 1 );
-                        
-                        rcc = tmp -> kns_mgr -> curl_easy_setopt_fkt( tmp -> curl_handle, CURLOPT_WRITEFUNCTION, KUrlFetcherCurlCallback );
-                        if ( rcc != CURLE_OK )
-                        {
-                            KNSManagerRelease( tmp -> kns_mgr );
-                            free( tmp );
-                            rc = RC ( rcApp, rcFunction, rcConstructing, rcParam, rcNull );
-                        }
-                        else
-                        {
-                            rcc = tmp -> kns_mgr -> curl_easy_setopt_fkt( tmp -> curl_handle, CURLOPT_WRITEDATA, (void *)tmp );
-                            if ( rcc != CURLE_OK )
-                            {
-                                KNSManagerRelease( tmp -> kns_mgr );
-                                free( tmp );
-                                rc = RC ( rcApp, rcFunction, rcConstructing, rcParam, rcNull );
-                            }
-                            else
-                                *fetcher = & tmp -> dad;
-                        }
-                    }
-                }
-            }
-        }
-        else
-            rc = RC( rcApp, rcFunction, rcListing, rcParam, rcNull );
-    }
-    return rc;
-}
diff --git a/libs/kns/url-fetcher-impl.h b/libs/kns/url-fetcher-impl.h
deleted file mode 100644
index 0965bfa..0000000
--- a/libs/kns/url-fetcher-impl.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*--------------------------------------------------------------------------
- * this file contains the private parts (v-table) of a generic url-fetcher
-    the user has to provide 3 things to the fetcher:
-        (1) the url to fetch via vt->set_url()
-        (2) eventually a context pointer via vt->set_context()
-        (3) a callback function via vt->set_callback()
-    before the user can "start" the fetcher:
-        via vt->fetch()
- */
-
-#ifndef _h_url_fetcher_impl_
-#define _h_url_fetcher_impl_
-
-#ifndef _h_kns_extern_
-#include <kns/extern.h>
-#endif
-
-#ifndef _h_kfs_file_
-#include <kfs/file.h>
-#endif
-
-#ifndef _h_url_fetcher_
-#include <kns/url-fetcher.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-typedef union KUrlFetcher_vt KUrlFetcher_vt;
-
-/*--------------------------------------------------------------------------
- * KUrl_fetcher
- *  a virtual url-fetcher
- */
-struct KUrlFetcher
-{
-    const KUrlFetcher_vt *vt;
-    KRefcount refcount;
-};
-
-
-#ifndef KURL_FETCHER_IMPL
-#define KURL_FETCHER_IMPL KUrlFetcher
-#endif
-
-
-typedef struct KUrlFetcher_vt_v1 KUrlFetcher_vt_v1;
-struct KUrlFetcher_vt_v1
-{
-    /* version == 1.x */
-    uint32_t maj;
-    uint32_t min;
-
-    /* start minor version == 0 */
-    rc_t ( CC * destroy ) ( KURL_FETCHER_IMPL *self );
-    rc_t ( CC * read ) ( KURL_FETCHER_IMPL *self, const char * uri,
-                      void *dst, size_t to_read, size_t *num_read );
-    rc_t ( CC * get_size ) ( KURL_FETCHER_IMPL *self, size_t *num_size );
-    /* end minor version == 0 */
-};
-
-union KUrlFetcher_vt
-{
-    KUrlFetcher_vt_v1 v1;
-};
-
-/* Init
- */
-KNS_EXTERN rc_t CC KUrlFetcherInit ( KUrlFetcher *self, const KUrlFetcher_vt *vt );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/libs/kns/url-fetcher.c b/libs/kns/url-fetcher.c
deleted file mode 100644
index ff9e16b..0000000
--- a/libs/kns/url-fetcher.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kns/extern.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-#include "url-fetcher-impl.h"
-#include <sysalloc.h>
-
-#include <stdlib.h>
-
-/* to define the latest version of the url-fetcher in the vt */
-#define KURLFETCHER_LATEST 1
-
-static const char classname[] = "KUrlFetcher";
-
-/* AddRef
- *  creates a new reference
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KUrlFetcherAddRef ( const KUrlFetcher *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, classname ) )
-        {
-        case krefLimit:
-            return RC ( rcApp, rcFunction, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Release
- *  discard reference to list
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KUrlFetcherRelease ( const KUrlFetcher *cself )
-{
-    KUrlFetcher *self = ( KUrlFetcher* ) cself;
-    if ( cself != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, classname ) )
-        {
-        case krefWhack:
-            {
-                rc_t rc;
-                switch ( self -> vt -> v1 . maj )
-                {
-                case 1:
-                    rc = ( * self -> vt -> v1 . destroy ) ( self );
-                    break;
-
-                default:
-                    rc = RC ( rcApp, rcFunction, rcReleasing, rcInterface, rcBadVersion );
-                }
-
-                if ( rc != 0 )
-                    KRefcountInit ( & self -> refcount, 1, classname, "failed-release", "orphan" );
-                return rc;
-            }
-        case krefLimit:
-            return RC ( rcApp, rcFunction, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Read
- *  reads data from the internal buffer ...
- */
-LIB_EXPORT rc_t CC KUrlFetcherRead( KUrlFetcher *self, const char * uri,
-                      void *dst, size_t to_read, size_t *num_read )
-{
-    if ( self == NULL )
-        return RC ( rcApp, rcFunction, rcAccessing, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . read ) ( self, uri, dst, to_read, num_read );
-    }
-
-    return RC ( rcApp, rcFunction, rcAccessing, rcInterface, rcBadVersion );
-}
-
-
-/* Init
- *  polymorphic parent constructor
- */
-LIB_EXPORT rc_t CC KUrlFetcherInit ( KUrlFetcher *self, const KUrlFetcher_vt *vt )
-{
-    if ( self == NULL || vt == NULL )
-        return RC ( rcApp, rcFunction, rcConstructing, rcSelf, rcNull );
-
-    if ( vt -> v1 . maj == 0 )
-        return RC ( rcApp, rcFunction, rcConstructing, rcInterface, rcInvalid );
-
-    if ( vt -> v1 . maj > KURLFETCHER_LATEST )
-        return RC ( rcApp, rcFunction, rcConstructing, rcInterface, rcBadVersion );
-
-    self -> vt = vt;
-    KRefcountInit ( & self -> refcount, 1, classname, "initialized", "regular" );
-    return 0;
-}
diff --git a/libs/kns/win/sysendpoint.c b/libs/kns/win/sysendpoint.c
deleted file mode 100644
index acd6c20..0000000
--- a/libs/kns/win/sysendpoint.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kns/impl.h>
-#include <kns/endpoint.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-
-#include <sysalloc.h>
-#include <os-native.h>
-
-#include "stream-priv.h"
-
-#include <assert.h>
-
-/* InitDNSEndpoint
- *  initialize the endpoint with a DNS name and a port number
- *
- *  "ep" [ OUT ] - address of endpoint block to be intialized
- *
- *  "dns" [ IN ] - textual DNS address.
- *
- *  "port" [ IN, DEFAULT 0 ] - binary port number in native integer byte order.
- *   if the special port number 0 is given, it represents any available port.
- */
-LIB_EXPORT
-rc_t CC KNSManagerInitDNSEndpoint ( struct KNSManager const *self,
-    KEndPoint *ep, struct String const *dns, uint16_t port )
-{
-    rc_t rc = 0;
-
-    if ( ep == NULL )
-        rc = RC (rcNS, rcNoTarg, rcInitializing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcInitializing, rcSelf, rcNull );
-        else if ( dns == NULL )
-            rc = RC ( rcNS, rcNoTarg, rcInitializing, rcParam, rcNull );
-        else if ( dns -> size == 0 )
-            rc = RC ( rcNS, rcNoTarg, rcInitializing, rcSelf, rcInsufficient );
-        else
-        {
-            KDataBuffer b;
-            char buffer [ 4096 ], * hostname = buffer;
-            size_t buff_size = sizeof buffer;
-
-            if ( dns -> size >= sizeof buffer )
-            {
-                rc = KDataBufferMakeBytes ( & b, dns -> size + 1 );
-                if ( rc == 0 )
-                {
-                    hostname = b . base;
-                    buff_size = ( size_t ) b . elem_count;
-                }
-            }
-
-            if ( rc == 0 )
-            {
-                size_t size;
-                rc = string_printf ( hostname, buff_size, & size, "%S", dns );
-
-                assert ( rc == 0 );
-                assert ( size < buff_size );
-                assert ( hostname [ size ] == 0 );
-
-                if ( rc ==  0 )
-                {
-                    int lerrno;
-                    struct hostent *remote = gethostbyname ( hostname );
-                    if ( remote != NULL )
-                    { 
-                        ep -> type = epIPV4;
-                        memcpy ( & ep -> u . ipv4 . addr, remote -> h_addr_list [ 0 ], sizeof ep -> u . ipv4 . addr );
-                        ep -> u . ipv4 . addr = htonl ( ep -> u . ipv4 . addr );
-                        ep -> u . ipv4 . port = ( uint16_t ) port;
-                    }
-                    else switch ( lerrno = WSAGetLastError () )
-                    {
-                    case WSANOTINITIALISED: /* Must have WSAStartup call */
-                        rc = RC ( rcNS, rcNoTarg, rcInitializing, rcEnvironment, rcUndefined );
-                        break;
-                    case WSAENETDOWN:/* network subsystem failed */
-                        rc = RC ( rcNS, rcNoTarg, rcInitializing, rcNoObj, rcFailed );
-                        break;
-                    case WSAHOST_NOT_FOUND: /* Answer host not found */
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcNotFound );
-                        break;
-                    case WSATRY_AGAIN: /* host not found or server failure */
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcBusy );
-                        break;
-                    case WSANO_RECOVERY: /* non-recoverable error */
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcDestroyed );
-                        break;
-                    case WSANO_DATA: /* name is valid but no data */
-                        rc = RC ( rcNS, rcNoTarg, rcValidating, rcConnection, rcEmpty );
-                        break;
-                    case WSAEINPROGRESS: /* call is in progress */
-                        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcUndefined );
-                        break;
-                    case WSAEFAULT: /* name paremeter is not valid part of addr space */
-                        rc = RC ( rcNS, rcNoTarg, rcReading, rcMemory, rcOutofrange );
-                        break;
-                    case WSAEINTR: /* socket call was calanceled */
-                        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcCanceled );
-                        break;
-                    default:
-                        rc = RC ( rcNS, rcNoTarg, rcReading, rcError, rcUnknown );
-                    }
-                }
-            }
-
-            if ( hostname != buffer )
-                KDataBufferWhack ( & b );
-        }
-
-        if ( rc != 0 )
-            memset ( ep, 0, sizeof * ep );        
-    }
-
-    return rc;
-}
diff --git a/libs/kns/win/sysmgr.c b/libs/kns/win/sysmgr.c
deleted file mode 100644
index 6682f92..0000000
--- a/libs/kns/win/sysmgr.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/rc.h>
-#include <atomic32.h>
-
-#include "sysmgr.h"
-
-#include <os-native.h>
-
-static atomic32_t mgr_count;
-
-rc_t KNSManagerInit ( void )
-{
-    if ( atomic32_test_and_inc ( & mgr_count ) )
-    {
-        WSADATA wsaData;
-        if ( WSAStartup ( MAKEWORD ( 2, 2 ), & wsaData ) != 0 )
-        {
-            int lerrno = WSAGetLastError ();
-            switch ( lerrno )
-            {
-            case WSASYSNOTREADY:
-            case WSAVERNOTSUPPORTED:
-            case WSAEINPROGRESS:
-            case WSAEPROCLIM:
-            case WSAEFAULT:
-            default:
-                atomic32_dec ( & mgr_count );
-                return RC ( rcNS, rcMgr, rcInitializing, rcLibrary, rcNotAvailable );
-            }
-        }
-    }
-
-    return 0;
-} 
-
-void KNSManagerCleanup ( void )
-{
-    if ( atomic32_dec_and_test ( & mgr_count ) )
-        WSACleanup ();
-}
diff --git a/libs/kns/win/syssock.c b/libs/kns/win/syssock.c
deleted file mode 100644
index 3bf72f7..0000000
--- a/libs/kns/win/syssock.c
+++ /dev/null
@@ -1,1855 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-#define KSTREAM_IMPL KSocket
-typedef struct KSocket KSocket;
-
-#include <kns/extern.h>
-#include <kns/manager.h>
-#include <kns/socket.h>
-#include <kns/impl.h>
-#include <kns/endpoint.h>
-#include <klib/rc.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/printf.h>
-#include <sysalloc.h>
-#include <kproc/timeout.h>
-
-#include "mgr-priv.h"
-#include "stream-priv.h"
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-/* os-native.h includes windows.h and winsock2.h and klib/text.h !!! */
-#include <os-native.h>
-
-#define LOG
-
-#define SHUT_RD 0
-#define SHUT_WR 1
-typedef SSIZE_T ssize_t;
-
-static rc_t HandleErrnoEx ( const char *func, unsigned int lineno );
-#define HandleErrno() HandleErrnoEx ( __func__, __LINE__ )
-
-#define PIPE_NAME_LENGTH 256
-
-/*--------------------------------------------------------------------------
- * KSocket
- *  a socket IS a stream
- *
- *  in Berkeley socket terminology, a STREAM implies a CONTINUOUS stream,
- *  which is implemented by the TCP connection. A "chunked" or discontiguous
- *  stream would be a datagram stream, implemented usually by UDP.
- *
- *  in VDB terminology, a STREAM is a fluid, moving target that is observed
- *  from a stationary point, whereas a FILE or OBJECT is a static stationary
- *  target observed from a movable window. This means that a STREAM cannot be
- *  addressed randomly, whereas a FILE or OBJECT can.
- */
- 
- /*
-  * On Windows, we have 2 different mechanisms to implement KSockets, 
-  * WinSock based for Ipv4 connections and named pipes based for IPC
-  */
-
-
-struct KSocketIPv4
-{
-    SOCKET fd;
-    struct sockaddr_in  remote_addr;     /* for ipv4 addr from accept */
-    bool remote_addr_valid;
-};
-typedef struct KSocketIPv4 KSocketIPv4;
-  
-
-struct KSocketIPv6
-{
-    SOCKET fd;
-    struct sockaddr_in6 remote_addr;     /* for ipv6 addr from accept */
-    bool remote_addr_valid;
-};
-typedef struct KSocketIPv6 KSocketIPv6;
-
-
-enum { isIpcListener, isIpcPipeServer, isIpcPipeClient };
-
-struct KSocketIPC
-{
-    HANDLE pipe;
-    wchar_t pipename [ PIPE_NAME_LENGTH ];
-
-    uint8_t type;
-    HANDLE listenerPipe;            /* only used if type == isIpcListener */ 
-};
-typedef struct KSocketIPC KSocketIPC;
-
-
-struct KSocket
-{
-    /* we have only one KSocket-type with a union of the implementation specific data */
-    KStream dad;
-
-    int32_t read_timeout;
-    int32_t write_timeout;
-    uint32_t type; /* epIPV4|epIPV6|epIPC ... KEndPointType from endpoint.h */
-
-    union {
-        KSocketIPv4 ipv4_data;
-        KSocketIPv6 ipv6_data;
-        KSocketIPC  ipc_data;
-    } type_data;
-};
-
-
-static rc_t CC KIpv4SocketWhack ( KSocket * self )
-{
-    rc_t rc = 0;
-    KSocketIPv4 * data;
-
-    if ( self == NULL ) /* let's tolerate whacking NULL pointers... */
-        return rc;
-
-    if ( self->type != epIPV4 )
-        return RC ( rcNS, rcSocket, rcClosing, rcParam, rcInvalid );
-
-    data = &( self -> type_data.ipv4_data );
-    if ( shutdown ( data -> fd, SHUT_WR ) != -1 )
-    {
-        while ( 1 ) 
-        {
-            char buffer [ 1024 ];
-            ssize_t result = recv ( data -> fd, buffer, sizeof buffer, 0 );
-            if ( result <= 0 )
-                break;
-        }
-        if ( shutdown ( data -> fd, SHUT_RD ) != -1 )
-        {
-            if ( closesocket ( data -> fd ) == SOCKET_ERROR )
-                rc = RC ( rcNS, rcSocket, rcClosing, rcError, rcUnknown );
-                /* maybe report */
-        }
-        else
-            rc = HandleErrno();
-    }
-    else
-        rc = HandleErrno();
-    
-    free ( self );
-
-    return rc;
-}
-
-
-static rc_t CC KIpv4SocketTimedRead ( const KSocket * self, void * buffer, size_t bsize,
-                                      size_t * num_read, timeout_t * tm )
-{
-    /* self != NULL and self->type == epIPV4 already checked by the caller */
-
-    rc_t rc = 0;
-    const KSocketIPv4 * data = &( self -> type_data.ipv4_data );
-    struct timeval ts;
-    fd_set readFds;
-    int selectRes;
-    
-    /* convert timeout (relative time) */
-    if ( tm != NULL )
-    {
-        ts.tv_sec = tm -> mS / 1000;
-        ts.tv_usec = ( tm -> mS % 1000 ) * 1000;
-    }
-    
-    /* wait for socket to become readable */
-    FD_ZERO( &readFds );
-    FD_SET( data -> fd, &readFds );
-    selectRes = select( 0, &readFds, NULL, NULL, ( tm == NULL ) ? NULL : &ts );
-    
-    /* check for error */
-    if ( selectRes == -1 )
-    {
-        rc = HandleErrno();
-    }
-    else if ( selectRes == 0 )
-    {
-        rc = RC ( rcNS, rcSocket, rcReading, rcTimeout, rcExhausted ); /* timeout */
-    }
-    else if ( FD_ISSET( data -> fd, &readFds ) )
-    {
-        while ( rc == 0 )
-        {
-            ssize_t count = recv ( data -> fd, buffer, ( int )bsize, 0 );
-
-            if ( count >= 0 )
-            {
-                if ( num_read != NULL );
-                    * num_read = ( size_t ) count;
-                return 0;
-            }
-            if ( WSAGetLastError() != WSAEINTR )
-                rc = HandleErrno();
-            break;
-        }
-    }
-    else
-        rc = HandleErrno();
-            
-    return rc;
-}
-
-
-static rc_t CC KIpv4SocketRead ( const KSocket * self, void * buffer, size_t bsize, size_t * num_read )
-{
-    timeout_t tm;
-
-    if ( self->type != epIPV4 )
-        return RC ( rcNS, rcSocket, rcReading, rcParam, rcInvalid );
-
-    if ( self -> read_timeout < 0 )
-        return KIpv4SocketTimedRead ( self, buffer, bsize, num_read, NULL );
-
-    TimeoutInit ( & tm, self -> read_timeout );
-    return KIpv4SocketTimedRead ( self, buffer, bsize, num_read, & tm );
-}
-
-
-static rc_t CC KIpv4SocketTimedWrite ( KSocket * self, const void * buffer, size_t bsize,
-                                       size_t * num_writ, timeout_t * tm )
-{
-    /* self != NULL and self->type == epIPV4 already checked by the caller */
-
-    rc_t rc = 0;
-    KSocketIPv4 * data = &( self -> type_data.ipv4_data );
-    struct timeval ts;
-    fd_set writeFds;
-    int selectRes;
-    
-    /* convert timeout (relative time) */
-    if ( tm != NULL )
-    {
-        ts.tv_sec = tm -> mS / 1000;
-        ts.tv_usec = ( tm -> mS % 1000 ) * 1000;
-    }
-    
-    /* wait for socket to become writable */
-    FD_ZERO( &writeFds );
-    FD_SET( data -> fd, &writeFds );
-    selectRes = select( 0, NULL, &writeFds, NULL, ( tm == NULL ) ? NULL : &ts );
-    
-    /* check for error */
-    if ( selectRes == -1 )
-    {
-        rc = HandleErrno();
-    }
-    else if ( selectRes == 0 )
-    {
-        rc = RC ( rcNS, rcSocket, rcWriting, rcTimeout, rcExhausted ); /* timeout */
-    }
-    else if ( FD_ISSET( data -> fd, &writeFds ) )
-    {
-        while ( rc == 0 )
-        {
-            ssize_t count = send ( data -> fd , buffer, ( int )bsize, 0 );
-            if ( count >= 0 )
-            {
-                if ( num_writ != NULL );
-                    * num_writ = count;
-                return 0;
-            }
-            if ( WSAGetLastError() != WSAEINTR )
-                rc = HandleErrno();
-            break;        
-        }
-    }
-    else
-        rc = HandleErrno();
-
-    return rc;
-}
-
-
-static rc_t CC KIpv4SocketWrite ( KSocket *self, const void *buffer, size_t bsize, size_t *num_writ )
-{
-    timeout_t tm;
-
-    if ( self->type != epIPV4 )
-        return RC ( rcNS, rcSocket, rcReading, rcParam, rcInvalid );
-
-    if ( self -> write_timeout < 0 )
-        return KIpv4SocketTimedWrite ( self, buffer, bsize, num_writ, NULL );
-
-    TimeoutInit ( &tm, self -> write_timeout );
-    return KIpv4SocketTimedWrite ( self, buffer, bsize, num_writ, & tm );
-}
-
-static KStream_vt_v1 vtKIpv4Socket =
-{
-    1, 1,
-    KIpv4SocketWhack,
-    KIpv4SocketRead,
-    KIpv4SocketWrite,
-    KIpv4SocketTimedRead,
-    KIpv4SocketTimedWrite
-};
-
-void KStreamForceSocketClose(const struct KStream *self) {
-    assert(self);
-    closesocket(((KSocket*)self)->type_data.ipv4_data.fd);
-}
-
-/* *********************************************************************************************
-
-    IPv4 implementation :
-
-    KNSManagerMakeIPv4Connection()  ... called from KNSManagerMakeRetryTimedConnection()
-    KNSManagerMakeIPv4Listener()    ... called from KNSManagerMakeListener()
-    KListenerIPv4Accept()           ... called from KListenerAccept()
-    KSocketGetEndpointV4()          ... called from KSocketGetEndpoint()
-
-********************************************************************************************* */
-
-static rc_t KNSManagerMakeIPv4Connection ( struct KNSManager const * self,
-                                           KSocket ** out,
-                                           const KEndPoint * from,
-                                           const KEndPoint * to,
-                                           int32_t retryTimeout, 
-                                           int32_t readMillis, 
-                                           int32_t writeMillis )
-{
-    rc_t rc = 0;
-    uint32_t retry_count = 0;
-    SOCKET fd;
-
-    * out = NULL;
-
-    assert ( to != NULL );
-    assert ( to -> type == epIPV4 );
-    assert ( ( from == NULL || from -> type == to -> type ) );
-
-    do
-    {
-        fd = socket ( AF_INET, SOCK_STREAM, IPPROTO_TCP );
-        if ( fd == INVALID_SOCKET )
-            rc = HandleErrno();
-        else
-        {
-            struct sockaddr_in ss;
-            memset ( & ss, 0, sizeof ss );
-            ss . sin_family = AF_INET;
-            if ( from != NULL )
-            {
-                ss . sin_port = htons ( from -> u. ipv4 . port );
-                ss . sin_addr . s_addr = htonl ( from -> u . ipv4 . addr );
-            }
-            if ( bind ( fd, ( const struct sockaddr* )&ss, sizeof ss  ) == SOCKET_ERROR ) 
-                rc = HandleErrno();
-                
-            if ( rc == 0 )
-            {
-                ss . sin_port = htons ( to -> u . ipv4 . port );
-                ss . sin_addr . s_addr = htonl ( to -> u . ipv4 . addr );
-                
-                if ( connect ( fd, (const struct sockaddr*)&ss, sizeof ss ) != SOCKET_ERROR )
-                {   /* create the KSocket */
-                    KSocket * ksock = calloc ( sizeof * ksock, 1 );
-                    if ( ksock == NULL )
-                        rc = RC ( rcNS, rcSocket, rcAllocating, rcNoObj, rcNull ); 
-                    else
-                    {   /* initialize the KSocket */
-                        rc = KStreamInit ( & ksock -> dad, ( const KStream_vt* ) & vtKIpv4Socket,
-                                           "KSocket", "tcp", true, true );
-                        if ( rc == 0 )
-                        {
-                            KSocketIPv4 * data = &( ksock -> type_data.ipv4_data );
-                            ksock -> read_timeout  = readMillis;
-                            ksock -> write_timeout = writeMillis;
-                            ksock -> type = epIPV4;
-                            data -> fd = fd;
-                            *out = ( KSocket * )& ksock -> dad;
-                            return 0;
-                        }
-                        free( ksock );
-                    }
-                    /* we connected but then then ran out of memory or something bad like that, so no need to retry 
-                       - simply close fd and return RC */
-                    closesocket( fd );
-                    return rc;
-                }
-                else /* connect () failed */
-                    rc = HandleErrno();
-            } 
-            /* dump socket */
-            closesocket( fd );
-        }
-        
-        /* rc != 0 */
-        if ( retryTimeout < 0 || ( int32_t )retry_count < retryTimeout )
-        {   /* retry */
-            Sleep ( 1000 ); /*ms*/
-            ++retry_count;
-            rc = 0;
-        }            
-    }
-    while ( rc == 0 );
-    
-    return rc;
-}
-
-
-static rc_t KNSManagerMakeIPv4Listener ( const KNSManager *self, KSocket **out, const KEndPoint * ep )
-{
-    rc_t rc = 0;
-    KSocket * listener = calloc ( 1, sizeof * listener );
-    if ( listener == NULL )
-        rc = RC ( rcNS, rcSocket, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        /* pass these along to accepted sockets */
-        listener -> read_timeout = self -> conn_read_timeout;
-        listener -> write_timeout = self -> conn_write_timeout;
-
-        rc = KStreamInit ( & listener -> dad, ( const KStream_vt* ) & vtKIpv4Socket,
-                           "KSocket", "", true, true );
-        if ( rc == 0 )
-        {
-            KSocketIPv4 * data = &( listener -> type_data . ipv4_data );
-             data -> fd = socket ( AF_INET, SOCK_STREAM, 0 );
-            if ( data -> fd < 0 )
-                rc = HandleErrno ();
-            else
-            {
-                struct sockaddr_in ss;
-
-                int on = 1;
-                setsockopt ( data -> fd, SOL_SOCKET, SO_REUSEADDR, ( char* ) & on, sizeof on );
-
-                memset ( & ss, 0, sizeof ss );
-                ss . sin_family = AF_INET;
-                ss . sin_addr . s_addr = htonl ( ep -> u . ipv4 . addr );
-                ss . sin_port = htons ( ep -> u . ipv4 . port );
-
-                if ( bind ( data -> fd, ( struct sockaddr* ) & ss, sizeof ss ) == 0 )
-                {
-                    if ( listen ( data -> fd, 5 ) == 0 )
-                    {
-                        * out = listener;
-                        return 0;
-                    }
-                }
-                rc = HandleErrno ();
-                closesocket ( data -> fd );
-                data -> fd = -1;
-            }
-        }
-        free( listener );
-    }
-    return rc;
-}
-
-
-static rc_t KListenerIPv4Accept ( KSocket * self, struct KSocket ** out )
-{
-    rc_t rc = 0;
-    KSocket * new_socket = calloc ( 1, sizeof * new_socket );
-    if ( new_socket == NULL )
-        rc = RC ( rcNS, rcConnection, rcWaiting, rcMemory, rcExhausted );
-    else
-    {
-        new_socket -> read_timeout = self -> read_timeout;
-        new_socket -> write_timeout = self -> write_timeout;
-
-        rc = KStreamInit ( & new_socket -> dad, ( const KStream_vt* ) & vtKIpv4Socket,
-                           "KSocket", "tcp", true, true );
-        if ( rc == 0 )
-        {
-            int len;
-            KSocketIPv4 * new_data = &( new_socket -> type_data . ipv4_data );
-            KSocketIPv4 * self_data = &( self -> type_data . ipv4_data );
-
-            new_data -> remote_addr_valid = false;
-            len = sizeof new_data -> remote_addr;
-
-            new_data -> fd = accept ( self_data -> fd, ( struct sockaddr * ) & new_data -> remote_addr, & len );
-            if ( new_data -> fd < 0 )
-                rc = HandleErrno ();
-            else if ( len > sizeof new_data -> remote_addr )
-            {
-                closesocket ( new_data -> fd );
-                new_data -> fd = -1;
-                rc = RC ( rcNS, rcConnection, rcWaiting, rcBuffer, rcInsufficient );
-            }
-            else
-                new_data -> remote_addr_valid = true;
-
-            if ( rc == 0 )
-            {
-                * out = new_socket;
-                return 0;
-            }
-        }
-        free( new_socket );
-    }
-    return rc;
-}
-
-
-static rc_t KSocketGetEndpointV4 ( const KSocket * self, KEndPoint * ep, bool remote )
-{
-    rc_t rc = 0;
-    const KSocketIPv4 * data = &( self -> type_data . ipv4_data );
-    struct sockaddr_in addr;
-    int l = sizeof( addr );
-    int res = 0;
-
-    if ( remote )
-    {
-        if ( data -> remote_addr_valid )
-        {
-            /* the remote part was already recorded through calling accept() */
-            addr . sin_addr . s_addr = data -> remote_addr . sin_addr . s_addr;
-            addr . sin_port        = data -> remote_addr . sin_port;
-        }
-        else
-            res = getpeername( data -> fd, ( struct sockaddr * )&addr, &l );
-    }
-    else
-        res = getsockname( data -> fd, ( struct sockaddr * )&addr, &l );
-
-    if ( res < 0 )
-        rc = HandleErrno();
-    else
-    {
-        ep -> u . ipv4.addr = ntohl( addr . sin_addr . s_addr );
-        ep -> u . ipv4.port = ntohs( addr . sin_port );
-        ep -> type = epIPV4;
-    }
-
-    return rc;
-}
-
-
-/* *********************************************************************************************
-
-    IPv6 implementation :
-
-    KNSManagerMakeIPv6Connection()  ... called from KNSManagerMakeRetryTimedConnection()
-    KNSManagerMakeIPv6Listener()    ... called from KNSManagerMakeListener()
-    KListenerIPv6Accept()           ... called from KListenerAccept()
-    KSocketGetEndpointV6()          ... called from KSocketGetEndpoint()
-
-********************************************************************************************* */
-
-static rc_t KNSManagerMakeIPv6Connection ( struct KNSManager const * self,
-                                           KSocket ** out,
-                                           const KEndPoint * from,
-                                           const KEndPoint * to,
-                                           int32_t retryTimeout, 
-                                           int32_t readMillis, 
-                                           int32_t writeMillis )
-{
-    return RC ( rcNS, rcSocket, rcAllocating, rcFunction, rcUnsupported ); 
-}
-
-
-static rc_t KNSManagerMakeIPv6Listener ( const KNSManager *self, KSocket **out, const KEndPoint * ep )
-{
-    rc_t rc = 0;
-    KSocket * listener = calloc ( 1, sizeof * listener );
-    if ( listener == NULL )
-        rc = RC ( rcNS, rcSocket, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        /* pass these along to accepted sockets */
-        listener -> read_timeout = self -> conn_read_timeout;
-        listener -> write_timeout = self -> conn_write_timeout;
-
-        rc = KStreamInit ( & listener -> dad, ( const KStream_vt* ) & vtKIpv4Socket,
-                           "KSocket", "", true, true );
-        if ( rc == 0 )
-        {
-            KSocketIPv6 * data = &( listener -> type_data.ipv6_data );
-
-            data -> fd = socket ( AF_INET6, SOCK_STREAM, 0 );
-            if ( data -> fd < 0 )
-                rc = HandleErrno ();
-            else
-            {
-                struct sockaddr_in6 ss;
-
-                int on = 1;
-                setsockopt ( data -> fd, SOL_SOCKET, SO_REUSEADDR, ( char* ) & on, sizeof on );
-
-                memset ( & ss, 0, sizeof ss );
-                ss . sin6_family = AF_INET6;
-                memcpy ( ss . sin6_addr . s6_addr,
-                         ep -> u . ipv6 . addr,
-                         sizeof ( ep -> u . ipv6 . addr ) );
-                ss . sin6_port = htons ( ep -> u . ipv6 . port );
-
-                if ( bind ( data -> fd, ( struct sockaddr* ) & ss, sizeof ss ) == 0 )
-                {
-                    if ( listen ( data -> fd, 5 ) == 0 )
-                    {
-                        * out = listener;
-                        return 0;
-                    }
-                }
-                rc = HandleErrno ();
-                closesocket ( data -> fd );
-                data -> fd = -1;
-            }
-        }
-    }
-    return rc;
-}
-
-
-static rc_t KListenerIPv6Accept ( KSocket * self, struct KSocket ** out )
-{
-    rc_t rc = 0;
-    KSocket * new_socket = calloc ( 1, sizeof * new_socket );
-    if ( new_socket == NULL )
-        rc = RC ( rcNS, rcConnection, rcWaiting, rcMemory, rcExhausted );
-    else
-    {
-        new_socket -> read_timeout = self -> read_timeout;
-        new_socket -> write_timeout = self -> write_timeout;
-
-        rc = KStreamInit ( & new_socket -> dad, ( const KStream_vt* ) & vtKIpv4Socket,
-                           "KSocket", "tcp", true, true );
-        if ( rc == 0 )
-        {
-            int len;
-            KSocketIPv6 * new_data = &( new_socket -> type_data . ipv6_data );
-            KSocketIPv6 * self_data = &( self -> type_data . ipv6_data );
-
-            new_data -> remote_addr_valid = false;
-            len = sizeof new_data -> remote_addr;
-
-            new_data -> fd = accept ( self_data -> fd, ( struct sockaddr * ) & new_data -> remote_addr, & len );
-            if ( new_data -> fd < 0 )
-                rc = HandleErrno ();
-            else if ( len > sizeof new_data -> remote_addr )
-            {
-                closesocket ( new_data -> fd );
-                new_data -> fd = -1;
-                rc = RC ( rcNS, rcConnection, rcWaiting, rcBuffer, rcInsufficient );
-            }
-            else
-                new_data -> remote_addr_valid = true;
-
-            if ( rc == 0 )
-            {
-                * out = new_socket;
-                return 0;
-            }
-        }
-        free( new_socket );
-    }
-    return rc;
-}
-
-
-static rc_t KSocketGetEndpointV6 ( const KSocket * self, KEndPoint * ep, bool remote )
-{
-    rc_t rc = 0;
-    const KSocketIPv6 * data = &( self -> type_data.ipv6_data );
-    struct sockaddr_in6 addr;
-    int l = sizeof( addr );
-    int res = 0;
-
-    if ( remote )
-    {
-        if ( data -> remote_addr_valid )
-        {
-            /* the remote part was already recorded through calling accept() */
-            memcpy ( ep -> u . ipv6 . addr,
-                     data -> remote_addr . sin6_addr . s6_addr,
-                     sizeof ( ep -> u . ipv6 . addr ) );
-            ep->u.ipv6.port = ntohs( data -> remote_addr . sin6_port );
-            ep->type = epIPV6;
-            return 0;
-        }
-        else
-            res = getpeername( data -> fd, ( struct sockaddr * )&addr, &l );
-    }
-    else
-        res = getsockname( data -> fd, ( struct sockaddr * )&addr, &l );
-
-    if ( res < 0 )
-        rc = HandleErrno();
-    else
-    {
-        memcpy ( ep -> u . ipv6 . addr,
-                 addr . sin6_addr . s6_addr,
-                 sizeof ( ep -> u . ipv6 . addr ) );
-        ep -> u.ipv6.port = ntohs( addr . sin6_port );
-        ep -> type = epIPV6;
-    }
-
-    return rc;
-}
-
-
-/* *********************************************************************************************
-
-    IPC implementation :
-
-    static functions for vtable
-    vtable
-
-    KNSManagerMakeIPCConnection()   ... called from KNSManagerMakeRetryTimedConnection()
-    KNSManagerMakeIPCListener()     ... called from KNSManagerMakeListener()
-    KListenerIPCAccept()            ... called from KListenerAccept()
-
-********************************************************************************************* */
-
-/* helper function called by KIPCSocketWhack() = static function for IPC-implementation vtable */
-static rc_t KIPCSocketWhack_unconnected_server_side_pipe ( KSocket * self )
-{
-    rc_t rc = 0;
-    KSocketIPC * data = &( self -> type_data.ipc_data );
-
-    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: isIpcListener\n", self ) );    
-    if ( data->listenerPipe != INVALID_HANDLE_VALUE )
-    {
-        /* !!! In case there is an active call to ConnectNamedPipe()
-           on some thread, "wake" the synchronous named pipe,
-           otherwise DisconnectNamedPipe/CloseHandle will block forever */
-        HANDLE hPipe = CreateFileW( data->pipename, 
-                                    GENERIC_READ, 
-                                    FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 
-                                    NULL, 
-                                    OPEN_EXISTING, 
-                                    0, 
-                                    NULL);
-
-        if ( hPipe != INVALID_HANDLE_VALUE )
-            CloseHandle( hPipe );
-
-        /* now, Disconnect/Close the original pipe */
-        if ( !DisconnectNamedPipe( data->listenerPipe ) )
-        {
-            rc = HandleErrno();
-            DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: DisconnectNamedPipe failed\n", self ) );
-        }
-        
-        if ( !CloseHandle( data->listenerPipe ) )
-        {
-            rc = HandleErrno();
-            DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: CloseHandle failed\n", self ) );
-        }
-    }
-    return rc;
-}
-
-
-/* helper function called by KIPCSocketWhack() = static function for IPC-implementation vtable */
-static rc_t KIPCSocketWhack_server_side_pipe ( KSocket * self )
-{
-    rc_t rc = 0;
-    KSocketIPC * data = &( self -> type_data.ipc_data );
-
-    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: isIpcPipeServer\n", self ) );
-    if ( !FlushFileBuffers( data->pipe ) )
-    {
-        if ( GetLastError() != ERROR_BROKEN_PIPE )
-        {
-            rc = HandleErrno();
-            DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: FlushFileBuffers failed, err=%d\n", self, GetLastError() ) );    
-        }
-    }
-    if ( !DisconnectNamedPipe( data -> pipe ) )
-    {
-        rc = HandleErrno();
-        DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: DisconnectNamedPipe failed\n", self ) );    
-    }
-    if ( !CloseHandle( data -> pipe ) )
-    {
-        rc = HandleErrno();
-        DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: CloseHandle failed\n", self ) );
-    }
-    return rc;
-}
-
-
-/* helper function called by KIPCSocketWhack() = static function for IPC-implementation vtable */
-static rc_t KIPCSocketWhack_client_side_pipe ( KSocket * self )
-{
-    rc_t rc = 0;
-    KSocketIPC * data = &( self -> type_data.ipc_data );
-
-    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: isIpcPipeClient\n", self ) );
-    if ( !CloseHandle( data -> pipe ) )
-    {
-        rc = HandleErrno();
-        DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: CloseHandle failed\n", self ) );
-    }
-    return rc;
-}
-
-
-/* static function for IPC-implementation vtable */
-static rc_t CC KIPCSocketWhack ( KSocket * self )
-{
-    rc_t rc = 0;
-    /* we tolerate a whack on a NULL-pointer */
-    if ( self == NULL ) return rc;
-
-    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: KIPCSocketWhack()...\n", self ) ); 
-    switch ( self -> type_data.ipc_data.type )
-    {
-        case isIpcListener   : rc = KIPCSocketWhack_unconnected_server_side_pipe ( self ); break;
-
-        case isIpcPipeServer : rc = KIPCSocketWhack_server_side_pipe ( self ); break;
-
-        case isIpcPipeClient : rc = KIPCSocketWhack_client_side_pipe ( self ); break;
-    }
-    
-    free ( self );
-    return rc;
-}
-
-
-/* helper function called by KIPCSocketTimedRead() = static function for IPC-implementation vtable */
-static rc_t WaitForData( const KSocket * self, void * buffer, size_t bsize,
-                         size_t * num_read, uint32_t * tmMs, OVERLAPPED * overlap )
-{
-    /* received a ERROR_NO_DATA trying to read from a pipe; wait for the data to arrive or a time out to expire */ 
-    /* on success, will leave tmMs set to the remaining portion of timeout, if specified */
-
-    const KSocketIPC * data = &( self -> type_data.ipc_data );
-    uint32_t tm_decrement = 100; 
-
-    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), 
-            ( "%p: no data on the pipe - going into a wait loop, tm=%d\n", 
-                self, tmMs == 0 ? -1 : *tmMs ) );
-    while ( true )
-    {
-        BOOL ret;
-        DWORD count;
-    
-        if ( tmMs != NULL )
-        {
-            if ( *tmMs <= tm_decrement )
-            {
-                CloseHandle( overlap -> hEvent );
-                return RC ( rcNS, rcFile, rcReading, rcTimeout, rcExhausted );
-            }
-            *tmMs -= tm_decrement;
-        }
-
-        /* *usually* returns FALSE in asynch mode */
-        ret = ReadFile( data -> pipe, buffer, ( DWORD )bsize, &count, overlap );
-        if ( ret )
-        {
-            DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), 
-                    ( "%p: (wait loop) ReadFile completed synchronously, count=%d\n", 
-                        self, count ) );
-            assert ( num_read != NULL );
-            * num_read = ( size_t ) count;
-            CloseHandle( overlap -> hEvent );
-            return 0;
-        }
-        
-        switch ( GetLastError() )
-        {
-            case ERROR_IO_PENDING : return 0; /* the caller will wait for completion */
-            
-            case ERROR_NO_DATA :
-                DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: (wait loop) Sleep(%d)\n", self, tm_decrement ) );
-                Sleep( tm_decrement );
-                break;
-            
-            case ERROR_SUCCESS: /* not expected in asynch mode */
-                return RC ( rcNS, rcFile, rcReading, rcError, rcUnexpected);
-            
-            default:
-                return HandleErrno();
-        }
-    }
-    return 0;
-}
-
-
-/* static function for IPC-implementation vtable */
-static rc_t CC KIPCSocketTimedRead ( const KSocket * self, void * buffer, size_t bsize,
-                                     size_t * num_read, timeout_t * tm )
-{
-    rc_t rc = 0;
-    const KSocketIPC * data = &( self -> type_data.ipc_data );
-    OVERLAPPED overlap;
-    
-    if ( num_read == NULL )
-        return RC ( rcNS, rcConnection, rcReading, rcParam, rcNull );
-
-    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), 
-                ( "%p: KIPCSocketTimedRead(%d, %p, %d)... \n",
-                  self, tm == NULL ? -1 : tm -> mS, buffer, bsize ) );
-
-    /* TODO: wait for pipe to become readable? */
-    memset( &overlap, 0, sizeof( overlap ) );
-    overlap.hEvent = CreateEvent( NULL,     /* default security attribute */
-                                  TRUE,     /* manual reset event */
-                                  FALSE,    /* initial state = nonsignalled */
-                                  NULL ); 
-    if ( overlap.hEvent != NULL )
-    {
-        DWORD count;
-
-        /* *usually* returns FALSE in asynch mode */
-        BOOL ret = ReadFile( data->pipe, buffer, ( DWORD )bsize, &count, &overlap );
-        if ( ret )
-        {
-            /* done: must be synch mode */
-            DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: ReadFile completed synchronously, count=%d\n", self, count ) );
-            * num_read = ( size_t ) count;
-            CloseHandle( overlap.hEvent );
-            return 0;
-        }
-        
-        *num_read = 0;
-
-        /* asynch mode - wait for the operation to complete */
-        if ( GetLastError() == ERROR_NO_DATA ) /* 232 */
-        {
-            DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), 
-                ( "%p: ReadFile(%x) returned FALSE, GetLastError() = ERROR_NO_DATA\n", self, data -> pipe ) );
-            rc = WaitForData( self, buffer, bsize, num_read, tm == NULL ? NULL : &tm -> mS, &overlap );
-            if ( *num_read != 0 ) /* read completed*/
-            {
-                CloseHandle( overlap.hEvent );
-                return 0;
-            }
-            if ( rc != 0 )
-            {
-                CloseHandle( overlap.hEvent );
-                return rc;
-            }
-        }   
-
-        if ( GetLastError() == ERROR_IO_PENDING ) /* 997 */
-        {
-            DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), 
-                ( "%p: ReadFile(%x) returned FALSE, GetLastError() = ERROR_IO_PENDING\n",
-                        self, data -> pipe ) );
-
-            if ( tm == NULL )
-                DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: waiting forever\n", self ) );
-            else
-                DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: waiting for %d ms\n", self, tm -> mS ) );
-                
-            switch ( WaitForSingleObject( overlap.hEvent, tm == NULL ? INFINITE : tm -> mS ) )
-            {
-                case WAIT_TIMEOUT :
-                    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: timed out\n", self ) );
-                    rc = RC ( rcNS, rcFile, rcReading, rcTimeout, rcExhausted );
-                    break;
-                    
-                case WAIT_OBJECT_0 :
-                {
-                    DWORD count;
-                    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: successful\n", self ) );
-                    /* wait to complete if necessary */
-                    if ( GetOverlappedResult( data->pipe, &overlap, &count, TRUE ) )
-                    {
-                        DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: %d bytes read\n", self, count ) );
-                        * num_read = ( size_t ) count;
-                        rc = 0;
-                    }
-                    else
-                    {
-                        rc = HandleErrno();
-                        DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: GetOverlappedResult() failed\n", self ) );
-                    }
-                    break;
-                }
-                
-                default:
-                    rc = HandleErrno();
-                    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: WaitForSingleObject() failed\n", self ) );
-                    break;
-            }
-        }
-        else if ( GetLastError() == ERROR_SUCCESS )
-        {
-            DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), 
-                        ( "%p: ReadFile(%x) returned FALSE, GetLastError() = ERROR_SUCCESS\n",
-                        self, data -> pipe ) );
-            rc = RC ( rcNS, rcFile, rcReading, rcError, rcUnexpected );
-        }
-        else
-        {
-            rc = HandleErrno();
-        }
-        CloseHandle( overlap.hEvent );
-    }
-    else
-        rc = HandleErrno();
-
-    return rc;
-}
-
-
-/* static function for IPC-implementation vtable */
-static rc_t CC KIPCSocketRead ( const KSocket *self, void * buffer, size_t bsize, size_t *num_read )
-{
-    timeout_t tm;
-
-    if ( self == NULL )
-        return RC ( rcNS, rcConnection, rcReading, rcSelf, rcNull );
-
-    if ( self -> read_timeout < 0 )
-        return KIPCSocketTimedRead ( self, buffer, bsize, num_read, NULL );
-
-    TimeoutInit ( & tm, self -> read_timeout );
-    return KIPCSocketTimedRead ( self, buffer, bsize, num_read, & tm );
-}
-
-
-/* static function for IPC-implementation vtable */
-static rc_t CC KIPCSocketTimedWrite ( KSocket * self, const void * buffer, size_t bsize,
-                                      size_t * num_writ, timeout_t * tm )
-{
-    rc_t rc = 0;
-    KSocketIPC * data;
-    OVERLAPPED overlap;
-    
-    if ( self == NULL )
-        return RC ( rcNS, rcConnection, rcWriting, rcSelf, rcNull );
-
-    data = &( self -> type_data.ipc_data );
-
-    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), 
-                ( "%p: KIPCSocketTimedWrite(%d, %d)...", "b=%p,s=%d,t=%d\n",
-                self, bsize, tm == NULL ? -1 : tm -> mS ) );
-
-    memset( &overlap, 0, sizeof( overlap ) );
-
-    overlap.hEvent = CreateEvent( NULL,     /* default security attribute */
-                                  TRUE,     /* manual reset event */
-                                  FALSE,    /* initial state = nonsignalled */
-                                  NULL); 
-    if ( overlap.hEvent != NULL )
-    {
-        DWORD count;
-
-        /* returns FALSE in asynch mode */
-        BOOL ret = WriteFile( data->pipe, buffer, ( DWORD )bsize, &count, &overlap );
-        int err = GetLastError();
-        /*DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: WriteFile returned %s, GetError() = %d\n", base, ret ? "TRUE" : "FALSE", err ) ); */
-
-        /* completed synchronously; either message is so short that is went out immediately, or the pipe is full */
-        if ( ret )
-        {   
-            if ( count > 0 )
-            {
-                DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: %d bytes written\n", self, count ) );
-                if ( num_writ != NULL )
-                    * num_writ = ( size_t ) count;
-                CloseHandle( overlap.hEvent );
-                return 0;
-            }
-            else 
-            {
-                /* pipe is full - go into a wait loop */
-                uint32_t tm_left = ( tm == NULL ) ? 0 : tm -> mS;
-                uint32_t tm_decrement = 100; 
-                DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), 
-                            ( "%p: pipe full - going into a wait loop for %d ms\n", 
-                                self, ( tm == NULL ) ? -1 : tm -> mS ) );
-                while ( count == 0 )
-                {
-                    if ( tm != NULL )
-                    {
-                        if ( tm_left <= tm_decrement )
-                        {
-                            CloseHandle( overlap.hEvent );
-                            return RC ( rcNS, rcFile, rcWriting, rcTimeout, rcExhausted );
-                        }
-                        tm_left -= tm_decrement;
-                    }
-                    
-                    Sleep( 1 ); /*ms*/
-                    
-                    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: write wait loop: attempting to WriteFile\n", self ) );   
-
-                    /* returns FALSE in asynch mode */
-                    ret = WriteFile( data->pipe, buffer, ( DWORD )bsize, &count, &overlap );
-                    err = GetLastError();
-                    /* DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: WriteFile returned %s, GetError() = %d\n", base, ret ? "TRUE" : "FALSE", err ) ); */
-                    if ( !ret )
-                        break; /* and proceed to handling the asynch mode */
-                }
-            }
-        }
-        
-        /* asynch mode - wait for the operation to complete */
-        switch ( err ) /* set by the last call to WriteFile */
-        {
-        case NO_ERROR:
-        case ERROR_IO_PENDING:
-        {
-            switch ( WaitForSingleObject( overlap.hEvent, tm == NULL ? INFINITE : tm -> mS ) )
-            {
-            case WAIT_TIMEOUT:
-                DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: timed out\n", self ) );
-                CloseHandle( overlap.hEvent );
-                return RC ( rcNS, rcStream, rcWriting, rcTimeout, rcExhausted );
-
-            case WAIT_OBJECT_0:
-            {
-                DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: successful\n", self ) );
-                /* wait to complete if necessary */
-                if ( GetOverlappedResult( data->pipe, &overlap, &count, TRUE ) )
-                {
-                    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: %d bytes written\n", self, count ) );
-                    if ( num_writ != NULL )
-                        * num_writ = count;
-                    CloseHandle( overlap.hEvent );
-                    return 0;
-                }
-                rc = HandleErrno();
-                DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: GetOverlappedResult() failed\n", self ) );
-                break;
-            }
-            
-            default:
-                rc = HandleErrno();
-                DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: WaitForSingleObject() failed\n", self ) );
-                break;
-            }
-        }
-        case ERROR_NO_DATA:
-            /* the secret MS lore says when WriteFile to a pipe returns ERROR_NO_DATA, it's 
-                "Pipe was closed (normal exit path)." - see http://support.microsoft.com/kb/190351 */
-            CloseHandle( overlap.hEvent );
-            return 0;
-
-        default:
-            rc = HandleErrno();
-            DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: WriteFile() failed\n", self ) );
-            break;
-        }
-
-        CloseHandle( overlap.hEvent );
-    }
-    else
-        rc = HandleErrno();
-        
-    return rc;
-}
-
-
-/* static function for IPC-implementation vtable */
-static rc_t CC KIPCSocketWrite ( KSocket *self, const void * buffer, size_t bsize, size_t * num_writ )
-{
-    timeout_t tm;
-
-    if ( self == NULL )
-        return RC ( rcNS, rcConnection, rcWriting, rcSelf, rcNull );
-
-    if ( self -> write_timeout < 0 )
-        return KIPCSocketTimedWrite ( self, buffer, bsize, num_writ, NULL );
-
-    TimeoutInit ( & tm, self -> write_timeout );
-    return KIPCSocketTimedWrite ( self, buffer, bsize, num_writ, & tm );
-}
-
-
-static KStream_vt_v1 vtKIPCSocket =
-{
-    1, 1,
-    KIPCSocketWhack,
-    KIPCSocketRead,
-    KIPCSocketWrite,
-    KIPCSocketTimedRead,
-    KIPCSocketTimedWrite
-};
-
-
-static rc_t KNSManagerMakeIPCConnection ( struct KNSManager const *self, 
-                                          KSocket **out, 
-                                          const KEndPoint *to, 
-                                          int32_t retryTimeout, 
-                                          int32_t readMillis, 
-                                          int32_t writeMillis )
-{
-    rc_t rc = 0;
-    uint8_t retry_count = 0;
-    char pipename[ PIPE_NAME_LENGTH ];
-    wchar_t pipenameW[ PIPE_NAME_LENGTH ];
-    size_t num_writ;
-    
-    if ( self == NULL )
-        return RC ( rcNS, rcConnection, rcCreating, rcSelf, rcNull );
-    if ( out == NULL )
-        return RC ( rcNS, rcConnection, rcCreating, rcParam, rcNull );
-
-    * out = NULL;
-
-    if ( to == NULL )
-        return RC ( rcNS, rcConnection, rcCreating, rcParam, rcNull );
-    if ( to -> type != epIPC )
-        return RC ( rcNS, rcConnection, rcCreating, rcParam, rcInvalid );
-
-    /* use named pipes to implement unix domain socket - like behavior */
-    rc = string_printf( pipename, sizeof( pipename ), &num_writ, "\\\\.\\pipe\\%s", to->u.ipc_name );
-    if ( rc == 0 )
-        string_cvt_wchar_copy( pipenameW, sizeof( pipenameW ), pipename, num_writ );
-        
-    while ( rc == 0 )
-    {
-        HANDLE h = CreateFileW( pipenameW,                    /* pipe name */
-                                GENERIC_READ | GENERIC_WRITE, /* read and write access */
-                                0,                            /* no sharing */
-                                NULL,                         /* default security attributes */
-                                OPEN_EXISTING,                /* opens existing pipe  */
-                                FILE_FLAG_OVERLAPPED,         /* using overlapped IO */
-                                NULL );                      /* no template file */
-        if ( h != INVALID_HANDLE_VALUE )
-        {   /* create the KSocket */
-            /* need NOWAIT if pipe is created in asynch mode */
-            DWORD dwMode = ( PIPE_READMODE_MESSAGE | PIPE_NOWAIT );
-            if ( SetNamedPipeHandleState ( h,        /* pipe handle */
-                                           &dwMode,  /* new pipe mode */
-                                           NULL,     /* don't set maximum bytes */
-                                           NULL ) )  /* don't set maximum time */
-            {
-                KSocket* ksock = calloc ( sizeof * ksock, 1 );
-
-                if ( ksock == NULL )
-                    rc = RC ( rcNS, rcNoTarg, rcAllocating, rcNoObj, rcNull ); 
-                else
-                {   
-                    KSocketIPC * data;
-                    /* initialize the KSocket */
-                    rc = KStreamInit ( & ksock -> dad, ( const KStream_vt* ) & vtKIPCSocket,
-                                       "KSocket", "tcp", true, true );
-                    if ( rc == 0 )
-                    {
-                        DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), 
-                                ( "%p: KNSManagerMakeIPCConnection(%p,'%s')\n", 
-                                    ksock, to, pipename ) );
-                    
-                        ksock -> read_timeout  = readMillis;
-                        ksock -> write_timeout = writeMillis;
-                        ksock -> type = epIPC;
-                        data = &( ksock -> type_data.ipc_data );
-                        data -> type = isIpcPipeClient;
-                        data -> pipe = h;
-                        *out = ( KSocket * )& ksock -> dad;
-                        return 0;
-                    }
-                    free ( ksock );
-                }
-            }
-            else
-                rc = HandleErrno();
-        }
-        else /* CreateFileW failed */
-        {
-            switch ( GetLastError() )
-            {
-                case ERROR_PIPE_BUSY :
-                    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "KNSManagerMakeIPCConnection: pipe busy, retrying\n" ) );
-                    {
-                        BOOL pipeAvailable = WaitNamedPipeW( pipenameW, NMPWAIT_USE_DEFAULT_WAIT );
-                        if ( pipeAvailable )
-                        {
-                            DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "KNSManagerMakeIPCConnection: WaitNamedPipeW returned TRUE\n" ) );
-                            continue;
-                        }
-                        /* time-out, try again */
-                        rc = HandleErrno();
-                        DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "KNSManagerMakeIPCConnection: WaitNamedPipeW returned FALSE(timeout)\n" ) );
-                        if ( retryTimeout < 0 || retry_count < retryTimeout )
-                        {
-                            Sleep( 1000 ); /* ms */
-                            ++retry_count;
-                            rc = 0;
-                            continue;
-                        }
-                    }
-                    break;
-                
-                case ERROR_FILE_NOT_FOUND :
-                    if ( retryTimeout < 0 || retry_count < retryTimeout )
-                    {
-                        DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "KNSManagerMakeIPCConnection: pipe not found, retrying\n" ) );
-                        Sleep( 1000 ); /* ms */
-                        ++retry_count;
-                        rc = 0;
-                        continue;
-                    }
-                    else
-                        rc = HandleErrno();
-                    break;
-                
-                default:
-                    rc = HandleErrno();
-                    break;
-            }
-        }
-        break;
-    }
-    return rc;
-}
-
-
-static rc_t KNSManagerMakeIPCListener( struct KNSManager const *self, struct KSocket** out,
-                                       struct KEndPoint const * ep )
-{   
-    rc_t rc = 0;
-    KSocket * ksock;
-
-    if ( self == NULL )
-        return RC ( rcNS, rcConnection, rcCreating, rcSelf, rcNull );
-    if ( out == NULL )
-        return RC ( rcNS, rcConnection, rcCreating, rcParam, rcNull );
-
-    * out = NULL;
-
-    if ( ep == NULL )
-        return RC ( rcNS, rcConnection, rcCreating, rcParam, rcNull );
-    if ( ep -> type != epIPC )
-        return RC ( rcNS, rcConnection, rcCreating, rcParam, rcInvalid );
-
-    
-    /* use named pipes to implement unix domain socket - like behavior */
-    ksock = calloc ( sizeof *ksock, 1 );
-    if ( ksock == NULL )
-        rc = RC ( rcNS, rcNoTarg, rcAllocating, rcNoObj, rcNull ); 
-    else
-    {
-        ksock -> read_timeout  = self -> conn_read_timeout;
-        ksock -> write_timeout = self -> conn_write_timeout;
-
-        rc = KStreamInit ( & ksock -> dad, ( const KStream_vt* ) & vtKIPCSocket,
-                           "KSocket", "tcp", true, true );
-        if ( rc == 0 )
-        {
-            size_t num_writ;
-            char pipename[ PIPE_NAME_LENGTH ];
-            rc = string_printf( pipename, sizeof( pipename ), &num_writ, "\\\\.\\pipe\\%s", ep -> u . ipc_name );
-            if ( rc == 0 )
-            {
-                KSocketIPC * data = &( ksock -> type_data.ipc_data );
-                string_cvt_wchar_copy( data -> pipename, sizeof( data -> pipename ), pipename, num_writ );
-                
-                data -> type = isIpcListener;
-                data -> listenerPipe = INVALID_HANDLE_VALUE;
-                ksock -> type = epIPC;
-                *out = ( KSocket * )& ksock -> dad;
-                
-                DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: KNSManagerMakeIPCListener(%p,'%s')\n", 
-                            ksock, ep, pipename ) );
-                return 0;
-            }
-            KIPCSocketWhack( ksock );
-        }
-        else
-            free ( ksock );
-    }
-        
-    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: KNSManagerMakeIPCListener failed\n", ksock ) );
-    return rc;
-}
-
-
-static rc_t KListenerIPCAccept ( KSocket * self, struct KSocket ** out )
-{
-    rc_t rc = 0;
-    KSocketIPC * data = &( self -> type_data.ipc_data );
-
-    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: KSocketAccept\n", self ) );
-
-    /* make sure listener points to a KIPCSocket */
-    if ( data->type != isIpcListener )
-        return RC ( rcNS, rcNoTarg, rcValidating, rcParam, rcInvalid );
-        
-    data -> listenerPipe = CreateNamedPipeW( data -> pipename,        /* pipe name */
-                                              FILE_FLAG_OVERLAPPED |   /* using overlapped IO */
-                                              PIPE_ACCESS_DUPLEX,      /* read/write access  */
-                                              PIPE_TYPE_MESSAGE |      /* message type pipe  */
-                                              PIPE_READMODE_MESSAGE |  /* message-read mode  */
-                                              PIPE_WAIT,               /* blocking mode  */
-                                              PIPE_UNLIMITED_INSTANCES,/* max. instances   */
-                                              1024,                    /* output buffer size  */
-                                              1024,                    /* input buffer size  */
-                                              0,                       /* client time-out  */
-                                              NULL );                 /* default security attribute  */
-    if ( data -> listenerPipe != INVALID_HANDLE_VALUE )
-    {
-        OVERLAPPED overlap;
-        DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "KSocketAccept: calling CreateEvent\n" ) );
-        overlap.hEvent = CreateEvent( NULL,    /* default security attribute */
-                                      TRUE,     /* manual reset event */
-                                      FALSE,    /* initial state = nonsignalled */
-                                      NULL ); 
-        if ( overlap.hEvent != NULL )
-        {
-            BOOL connected =  ConnectNamedPipe( data -> listenerPipe, &overlap );
-            /*DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "KSocketAccept: calling ConnectNamedPipe\n") );*/
-            if ( !connected ) /* normal for asynch mode */
-            {
-                switch ( GetLastError() )
-                {
-                case ERROR_PIPE_CONNECTED: /* client connected since the call to CreateNamedPipeW */
-                    break;
-                    
-                case ERROR_IO_PENDING:
-                    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "KSocketAccept: calling WaitForSingleObject\n" ) );
-                    if ( WaitForSingleObject( overlap.hEvent, INFINITE ) != WAIT_OBJECT_0 )
-                    {
-                        rc = HandleErrno();
-                        CloseHandle( overlap.hEvent );
-                        DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "KSocketAccept: WaitForSingleObject failed\n" ) );
-                        return rc;
-                    }
-                    break;
-                    
-                default:
-                    rc = HandleErrno();
-                    CloseHandle( overlap.hEvent );
-                    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "KSocketAccept: ConnectNamedPipe failed\n" ) );
-                    return rc;
-                }
-            }
-            /* we are connected, create the socket stream */
-            {
-                KSocket * ksock = calloc ( sizeof * ksock, 1 );
-                DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "%p: KSocketAccept\n", ksock ) );
-                
-                if ( ksock == NULL )
-                {
-                    rc = RC ( rcNS, rcSocket, rcAllocating, rcNoObj, rcNull ); 
-                    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "KSocketAccept: calloc failed\n" ) );
-                }
-                else
-                {
-                    rc = KStreamInit ( & ksock -> dad, ( const KStream_vt* ) & vtKIPCSocket,
-                                       "KSocket", "tcp", true, true );
-                    if ( rc == 0 )
-                    {
-                        KSocketIPC * ksock_data = &( ksock -> type_data.ipc_data );
-                        ksock -> type = epIPC;
-                        ksock_data -> type = isIpcPipeServer;
-                        ksock_data -> pipe = data -> listenerPipe;
-                        ksock_data -> listenerPipe = INVALID_HANDLE_VALUE; /* this is only to be used while ConnectNamedPipe() is in progress */
-                        *out = ( KSocket * )& ksock -> dad;
-                        CloseHandle( overlap.hEvent );
-                        return 0;
-                    }
-                    free ( ksock );
-                    DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "KSocketAccept: KStreamInit failed\n" ) );
-                }
-                CloseHandle( overlap.hEvent );
-                return rc;
-            }
-        }
-    }
-    else
-    {
-        rc = HandleErrno();
-        DBGMSG ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), ( "KSocketAccept: CreateNamedPipeW failed\n" ) );
-    }
-    return rc;
-}   
-
-
-/* *********************************************************************************************
-
-    exported KSocket - interface :
-
-    KNSManagerMakeConnection()  ... implemented in manager.c calling KNSManagerMakeRetryTimedConnection()    
-    KNSManagerMakeTimedConnection()         ... like KNSManagerMakeConnection()
-    KNSManagerMakeRetryConnection()         ... like KNSManagerMakeConnection()
-    KNSManagerMakeRetryTimedConnection()    ... switches via endpoint.type into correct implementation specific creation
-    KSocketAddRef();                ... delegates to KStreamAddRef()
-    KSocketRelease();               ... delegates to KStreamRelease() calls correct destroy-function via vtable
-    KSocketGetStream();             ... returns the internal KStream obj, which has its vtable wired to the implementation specific functions
-    KSocketGetRemoteEndpoint();     ... delegates to KSocketGetEndpoint() which switches via socket.type into implementations specific functions
-    KSocketGetLocalEndpoint();      ... same as above
-
-********************************************************************************************* */
-
-LIB_EXPORT rc_t CC KNSManagerMakeRetryTimedConnection ( const KNSManager * self,
-                                                        KSocket **out,
-                                                        int32_t retryTimeout,
-                                                        int32_t readMillis,
-                                                        int32_t writeMillis,
-                                                        const KEndPoint *from,
-                                                        const KEndPoint *to )
-{
-    rc_t rc;
-
-    if ( out == NULL )
-        rc = RC ( rcNS, rcStream, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcStream, rcConstructing, rcSelf, rcNull );
-        else if ( to == NULL )
-            rc = RC ( rcNS, rcStream, rcConstructing, rcParam, rcNull );
-        else if ( from != NULL && from -> type != to -> type )
-            rc = RC ( rcNS, rcStream, rcConstructing, rcParam, rcIncorrect );
-        else
-        {
-            switch ( to -> type )
-            {
-            case epIPV4 :
-                rc = KNSManagerMakeIPv4Connection ( self, out, from, to, retryTimeout, readMillis, writeMillis );
-                break;
-
-            case epIPV6 :
-                rc = KNSManagerMakeIPv6Connection ( self, out, from, to, retryTimeout, readMillis, writeMillis );
-                break;
-
-            case epIPC :
-                rc = KNSManagerMakeIPCConnection ( self, out, to, retryTimeout, readMillis, writeMillis );
-                break;
-
-            default:
-                rc = RC ( rcNS, rcStream, rcConstructing, rcParam, rcIncorrect );
-            }
-
-            if ( rc == 0 )
-                return 0;
-        }
-
-        * out = NULL;
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KSocketAddRef( const KSocket *self )
-{   /* this will handle all derived types */
-    return KStreamAddRef( &self -> dad );
-}
-
-
-LIB_EXPORT rc_t CC KSocketRelease( const KSocket *self )
-{   /* this will handle all derived types, it will call the correct whack-function via VTable ! */
-    return KStreamRelease( &self -> dad );
-}
-
-
-LIB_EXPORT rc_t CC KSocketGetStream ( const KSocket * self, KStream ** s )
-{
-    rc_t rc;
-
-    if ( s == NULL )
-        rc = RC ( rcNS, rcSocket, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcSocket, rcOpening, rcSelf, rcNull );
-        else
-        {
-            rc = KSocketAddRef ( self );
-            if ( rc == 0 )
-            {
-                * s = & ( ( KSocket* ) self ) -> dad;
-                return 0;
-            }
-        }
-
-        * s = NULL;
-    }
-
-    return rc;
-}
-
-
-/* helper-function called by KSocketGetRemoteEndpoint() and KSocketGetLocalEndpoint() */
-static rc_t KSocketGetEndpoint ( const KSocket * self, KEndPoint * ep, bool remote )
-{
-    rc_t rc = 0;
-    if ( ep == NULL )
-        rc = RC ( rcNS, rcSocket, rcEvaluating, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcSocket, rcEvaluating, rcSelf, rcNull );
-        else
-        {
-            rc = RC ( rcNS, rcSocket, rcEvaluating, rcFunction, rcUnsupported );
-            switch( self->type )
-            {
-                case epIPV4 : rc = KSocketGetEndpointV4( self, ep, remote ); break;
-                case epIPV6 : rc = KSocketGetEndpointV6( self, ep, remote ); break;
-                default     : rc = RC ( rcNS, rcSocket, rcEvaluating, rcFunction, rcUnsupported );
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KSocketGetRemoteEndpoint ( const KSocket * self, KEndPoint * ep )
-{
-    return KSocketGetEndpoint ( self, ep, true );
-}
-
-
-LIB_EXPORT rc_t CC KSocketGetLocalEndpoint ( const KSocket * self, KEndPoint * ep )
-{
-    return KSocketGetEndpoint ( self, ep, false );
-}
-
-
-/* *********************************************************************************************
-
-    exported KListener - interface ( from kns/socket.h ):
-
-    KNSManagerMakeListener()    ... switches via endpoint.type into implementations
-    KListenerAddRef()           ... delegates to KSocketAddRef()
-    KListenerRelease()          ... delegates to KSocketRelease()
-    KListenerAccept()           ... switches via socket.type into implementations
-
-********************************************************************************************* */
-
-LIB_EXPORT rc_t CC KNSManagerMakeListener( struct KNSManager const *self,
-                                           struct KListener ** out,
-                                           struct KEndPoint const * ep )
-{
-    rc_t rc;
-
-    if ( out == NULL )
-        rc = RC ( rcNS, rcSocket, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcNS, rcSocket, rcConstructing, rcSelf, rcNull );
-        else if ( ep == NULL )
-            rc = RC ( rcNS, rcSocket, rcConstructing, rcParam, rcNull );
-        else
-        {
-            switch ( ep -> type )
-            {
-            case epIPV4:
-                rc = KNSManagerMakeIPv4Listener ( self, ( struct KSocket** ) out, ep );
-                break;
-
-            case epIPV6:
-                rc = KNSManagerMakeIPv6Listener ( self, ( struct KSocket** ) out, ep );
-                break;
-
-            case epIPC:
-                rc = KNSManagerMakeIPCListener ( self, ( struct KSocket** ) out, ep );
-                break;
-
-            default:
-                rc = RC ( rcNS, rcSocket, rcConstructing, rcParam, rcIncorrect );
-            }
-
-            if ( rc == 0 )
-                return 0;
-        }
-
-        * out = NULL;
-    }
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KListenerAddRef( const KListener *self )
-{
-    return KSocketAddRef ( ( const KSocket* ) self );
-}
-
-
-LIB_EXPORT rc_t CC KListenerRelease( const KListener *self )
-{
-    return KSocketRelease ( ( const KSocket* ) self );
-}
-
-
-LIB_EXPORT rc_t CC KListenerAccept ( KListener * self, struct KSocket ** out )
-{
-    rc_t rc;
-
-    if ( out == NULL )
-        rc = RC ( rcNS, rcSocket, rcConstructing, rcParam, rcNull );
-
-    * out = NULL;
-
-    if ( self == NULL )
-        rc = RC ( rcNS, rcSocket, rcConstructing, rcSelf, rcNull );
-    else
-    {
-        KSocket * listener = ( KSocket * ) self;
-        switch( listener -> type )
-        {
-            case epIPV4 : rc = KListenerIPv4Accept ( listener, out ); break;
-            case epIPV6 : rc = KListenerIPv6Accept ( listener, out ); break;
-            case epIPC  : rc = KListenerIPCAccept ( listener, out ); break;
-        }
-    }
-    return rc;
-}
-
-
-/* *********************************************************************************************
-
-    Local helpers
-
-********************************************************************************************* */
-
-static rc_t HandleErrnoEx ( const char *func_name, unsigned int lineno )
-{
-    rc_t rc;
-    int lerrno = WSAGetLastError();
-
-    switch ( lerrno )
-    {
-    case ERROR_FILE_NOT_FOUND:
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcFile, rcNotFound );            
-        break;
-    case ERROR_INVALID_HANDLE:
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcInvalid );            
-        break;
-    case ERROR_INVALID_PARAMETER:
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcParam, rcInvalid );            
-        break;
-    case ERROR_PIPE_BUSY:
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcCanceled );
-        break;
-    case ERROR_SEM_TIMEOUT:
-        rc = RC ( rcNS, rcStream, rcReading, rcTimeout, rcExhausted );
-        break;
-    case WSAEACCES: /* write permission denied */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcMemory, rcUnauthorized );            
-        break;
-    case WSAEADDRINUSE:/* address is already in use */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcMemory, rcExists );
-        break;
-    case WSAEADDRNOTAVAIL: /* requested address was not local */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcMemory, rcNotFound );
-        break;
-    case WSAEAFNOSUPPORT: /* address didnt have correct address family in ss_family field */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcName, rcInvalid );
-        break;
-    case WSAEALREADY: /* socket is non blocking and a previous connection has not yet completed */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcUndefined );
-        break;
-    case WSAECONNABORTED: /* virtual circuit terminated. Application should close socket */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcInterrupted );
-        break;
-    case WSAECONNREFUSED: /* remote host refused to allow network connection */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcCanceled );
-        break;
-    case WSAECONNRESET: /* connection reset by peer */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcCanceled );
-        break;
-    case WSAEFAULT: /* name paremeter is not valid part of addr space */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcMemory, rcOutofrange );
-        break;
-    case WSAEHOSTUNREACH: /* remote hoste cannot be reached at this time */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcNotAvailable );
-        break;
-    case WSAEINPROGRESS: /* call is in progress */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcUndefined );
-        break;
-    case WSAEINVAL: /* invalid argument */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcParam, rcInvalid );
-        break;
-    case WSAEISCONN: /* connected already */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcExists );
-        break;
-    case WSAEMSGSIZE:  /* msg size too big */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcMessage, rcExcessive );
-        break;
-    case WSAENETDOWN:/* network subsystem failed */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcNoObj, rcFailed );
-        break;
-    case WSAENETRESET: /* connection broken due to keep-alive activity that 
-                          detected a failure while in progress */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcCanceled );
-        break;
-    case WSAENETUNREACH: /* network is unreachable */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcNotAvailable );
-        break;
-    case WSAENOBUFS: /* output queue for a network connection was full. 
-                     ( wont typically happen in linux. Packets are just silently dropped */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcInterrupted );
-        break;
-    case ERROR_PIPE_NOT_CONNECTED:
-    case WSAENOTCONN: /* socket is not connected */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcInvalid );
-        break;
-    case WSANOTINITIALISED: /* Must have WSAStartup call */
-        rc = RC ( rcNS, rcNoTarg, rcInitializing, rcEnvironment, rcUndefined );
-        break;
-    case WSAENOTSOCK: /* sock fd is not a socket */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcInvalid );
-        break;
-    case WSAEOPNOTSUPP: /* socket is not stream-style such as SOCK_STREAM */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcUnsupported );
-        break;
-    case WSAEPROTONOSUPPORT: /* specified protocol is not supported */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcAttr, rcUnsupported );
-        break;
-    case WSAEPROTOTYPE: /* wrong type of protocol for this socket */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcUnsupported );
-        break;
-    case WSAEPROVIDERFAILEDINIT: /* service provider failed to initialize */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcTransfer, rcIncorrect );
-        break;
-    case ERROR_BROKEN_PIPE:
-    case WSAESHUTDOWN: /* socket had been shutdown */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcUnsupported );
-        break;
-    case WSAESOCKTNOSUPPORT: /* specified socket type is not supported */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcId, rcUnsupported );
-        break;
-    case WSAETIMEDOUT: /* connection dropped because of network failure */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcConnection, rcCanceled );
-        break;
-    case WSAEWOULDBLOCK: /* socket is marked as non-blocking but the recv operation
-                            would block */
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcCmd, rcBusy );
-        break;
-
-    case WSAEINTR: /* call was cancelled */
-    case WSAEMFILE: /* no more socket fd available */
-    default:
-        rc = RC ( rcNS, rcNoTarg, rcReading, rcError, rcUnknown );
-        PLOGERR ( klogErr, ( klogErr, rc, "unknown system error '$(S)($(E))', line=$(L)",
-                             "S=%!,E=%d,L=%d", lerrno, lerrno, lineno ) );
-    }
-    return rc;
-}
-
diff --git a/libs/kns/win/sysstream.c b/libs/kns/win/sysstream.c
deleted file mode 100644
index 55e7e87..0000000
--- a/libs/kns/win/sysstream.c
+++ /dev/null
@@ -1,232 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-#define KSTREAM_IMPL KStdIOStream
-typedef struct KStdIOStream KStdIOStream;
-
-#include <kns/extern.h>
-#include <kns/stream.h>
-#include <kns/impl.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-
-#include <sysalloc.h>
-
-#include "stream-priv.h"
-
-#include <assert.h>
-
-#include <os-native.h>
-
-/*--------------------------------------------------------------------------
- * KStdIOStream
- *  a virtual stream
- */
-struct KStdIOStream
-{
-    KStream dad;
-    HANDLE fd;
-};
-
-static
-rc_t CC KStdIOStreamWhack ( KStdIOStream *self )
-{
-    /* we don't close self->fd because we did not open it */
-    free ( self );
-    return 0;
-}
-
-static
-rc_t CC KStdIOStreamRead ( const KStdIOStream *self,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    DWORD to_read;
-
-    assert ( self != NULL );
-
-    to_read = ( DWORD ) bsize;
-    if ( ( size_t ) to_read < bsize )
-        to_read = -1;
-
-    while ( 1 )
-    {
-        rc_t rc;
-        DWORD count, lerrno;
-
-        if ( ReadFile ( self -> fd, buffer, to_read, & count, NULL ) )
-        {
-            * num_read = count;
-            break;
-        }
-
-        lerrno = GetLastError ();
-        switch ( lerrno )
-        {
-        case ERROR_HANDLE_EOF:
-            * num_read = 0;
-            break;
-        case ERROR_IO_PENDING:
-            continue;
-        default:
-            rc = RC ( rcNS, rcStream, rcReading, rcNoObj, rcUnknown );
-            PLOGERR ( klogErr,
-                      ( klogErr, rc, "unknown system error '$(S)($(E))'",
-                        "S=%!,E=%d", lerrno, lerrno ) );
-            return rc;
-        }
-        break;
-    }
-
-    return 0;
-}
-
-static
-rc_t CC KStdIOStreamWrite ( KStdIOStream *self,
-    const void *buffer, size_t size, size_t *num_writ )
-{
-    DWORD to_write;
-
-    assert ( self != NULL );
-
-    to_write = ( DWORD ) size;
-    if ( ( size_t ) to_write < size )
-        to_write = -1;
-
-    * num_writ = 0;
-
-    while ( 1 )
-    {
-        rc_t rc;
-        DWORD lerrno, count = 0;
-
-        if ( WriteFile ( self -> fd, buffer, to_write, & count, NULL ) == 0 )
-        {
-            * num_writ += count;
-            break;
-        }
-
-        lerrno = GetLastError ();
-        switch ( lerrno )
-        {
-        case ERROR_IO_PENDING:
-            if ( count != 0 )
-            {
-                buffer = & ( ( const char* ) buffer ) [ count ];
-                to_write -= count;
-                * num_writ += count;
-                if ( to_write == 0 )
-                    break;
-            }
-            Sleep ( 100 );
-            continue;
-
-        case ERROR_NOT_ENOUGH_MEMORY:
-            rc = RC ( rcNS, rcStream, rcWriting, rcStorage, rcExhausted );
-            LOGERR ( klogSys, rc, "system device full error" );
-            return rc;
-
-        default:
-            rc = RC ( rcNS, rcStream, rcWriting, rcNoObj, rcUnknown );
-            PLOGERR ( klogErr,
-                      ( klogErr, rc, "unknown system error '$(S)($(E))'",
-                        "S=%!,E=%d", lerrno, lerrno ) );
-            return rc;
-        }
-        break;
-    }
-
-    return 0;
-}
-
-static KStream_vt_v1 vtKStdIOStream =
-{
-    1, 0,
-    KStdIOStreamWhack,
-    KStdIOStreamRead,
-    KStdIOStreamWrite
-};
-
-
-static
-rc_t KStdIOStreamMake ( KStream **sp, HANDLE fd, const char *strname,
-    bool read_enabled, bool write_enabled )
-{
-    rc_t rc;
-
-    if ( sp == NULL )
-        rc = RC ( rcNS, rcStream, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KStdIOStream *s = calloc ( sizeof *s, 1 );
-        if ( s == NULL )
-            rc = RC ( rcNS, rcStream, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KStreamInit ( & s -> dad, ( const KStream_vt* ) & vtKStdIOStream,
-                               "KStdIOStream", strname, read_enabled, write_enabled );
-            if ( rc == 0 )
-            {
-                s -> fd = fd;
-                * sp = & s -> dad;
-                return 0;
-            }
-
-            free ( s );
-        }
-
-        * sp = NULL;
-    }
-
-    return rc;
-}
-
-/* MakeStdIn
- *  creates a read-only stream on stdin
- */
-LIB_EXPORT rc_t CC KStreamMakeStdIn ( const KStream **std_in )
-{
-    HANDLE fd = GetStdHandle ( STD_INPUT_HANDLE );
-    return KStdIOStreamMake ( ( KStream** ) std_in, fd, "stdin", true, false );
-}
-
-/* MakeStdOut
- * MakeStdErr
- *  creates a write-only stream on stdout or stderr
- */
-LIB_EXPORT rc_t CC KStreamMakeStdOut ( KStream **std_out )
-{
-    HANDLE fd = GetStdHandle ( STD_OUTPUT_HANDLE );
-    return KStdIOStreamMake ( std_out, fd, "stdout", false, true );
-}
-
-LIB_EXPORT rc_t CC KStreamMakeStdErr ( KStream **std_err )
-{
-    HANDLE fd = GetStdHandle ( STD_ERROR_HANDLE );
-    return KStdIOStreamMake ( std_err, fd, "stderr", false, true );
-}
diff --git a/libs/kproc/Makefile b/libs/kproc/Makefile
deleted file mode 100644
index e344aa5..0000000
--- a/libs/kproc/Makefile
+++ /dev/null
@@ -1,162 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/kproc
-
-include $(TOP)/build/Makefile.env
-
-INT_LIBS = \
-	libksproc \
-	libkproc
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES =       \
-	$(PROC_OBJ)  \
-	$(SPROC_OBJ)
-
-ifneq (win,$(OS))
-INT_LIBS += libkq
-OBJFILES += $(Q_OBJ)
-endif
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# multi-threaded process support
-#
-$(ILIBDIR)/libkproc: $(addprefix $(ILIBDIR)/libkproc.,$(ILIBEXT))
-
-PROC_CMN = \
-	task \
-	sysmgr \
-	procmgr
-
-PROC_SRC = \
-	$(PROC_CMN)
-
-ifneq (win,$(OS))
-PROC_SRC += \
-	systimeout \
-	syslock \
-	systhread \
-	syscond \
-	sem
-else
-PROC_SRC += \
-	systimeout \
-	syslock \
-	systhread \
-	syscond
-endif
-
-PROC_OBJ = \
-	$(addsuffix .$(LOBX),$(PROC_SRC))
-
-ifneq (win,$(OS))
-PROC_LIB = \
-	-dpthread
-else
-PROC_LIB = \
-	-dklib
-endif
-
-$(ILIBDIR)/libkproc.$(LIBX): $(PROC_OBJ)
-	$(LD) --slib -o $@ $^ $(PROC_LIB)
-
-
-#-------------------------------------------------------------------------------
-# single-threaded process support
-#
-$(ILIBDIR)/libksproc: $(addprefix $(ILIBDIR)/libksproc.,$(ILIBEXT))
-
-SPROC_SRC = \
-	$(PROC_CMN) \
-	sttimeout \
-	stlock \
-	stcond \
-	stsem \
-	stthread \
-	stbarrier
-
-SPROC_OBJ = \
-	$(addsuffix .$(LOBX),$(SPROC_SRC))
-
-SPROC_LIB = \
-	-dklib
-
-$(ILIBDIR)/libksproc.$(LIBX): $(SPROC_OBJ)
-	$(LD) --slib -o $@ $^ $(SPROC_LIB)
-
-
-#-------------------------------------------------------------------------------
-# cross-thread reference queue
-#
-$(ILIBDIR)/libkq: $(addprefix $(ILIBDIR)/libkq.,$(ILIBEXT))
-
-Q_SRC = \
-	queue
-
-Q_OBJ = \
-	$(addsuffix .$(LOBX),$(Q_SRC))
-
-Q_LIB = \
-	-dkproc \
-	-dklib
-
-$(ILIBDIR)/libkq.$(LIBX): $(Q_OBJ)
-	$(LD) --slib -o $@ $^ $(Q_LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/kproc/bsd/syslock-priv.h b/libs/kproc/bsd/syslock-priv.h
deleted file mode 100644
index 438888f..0000000
--- a/libs/kproc/bsd/syslock-priv.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_syslock_priv_
-#define _h_syslock_priv_
-
-#include <pthread.h>
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_atomic32_
-#include <atomic32.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * KLock
- *  a POSIX-style mutual exclusion lock
- */
-struct KLock
-{
-    pthread_mutex_t mutex;
-    atomic32_t refcount;
-};
-
-/*--------------------------------------------------------------------------
- * KTimedLock
- *  a POSIX-style mutual exclusion lock
- *  with some facilities for timed operations
- */
-struct KTimedLock
-{
-    pthread_mutex_t mutex;
-    pthread_mutex_t cond_lock;
-    pthread_cond_t cond;
-    uint32_t waiters;
-    atomic32_t refcount;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_syslock_priv_ */
diff --git a/libs/kproc/bsd/syslock.c b/libs/kproc/bsd/syslock.c
deleted file mode 100644
index c28c81e..0000000
--- a/libs/kproc/bsd/syslock.c
+++ /dev/null
@@ -1,932 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-#include "syslock-priv.h"
-#include "syscond-priv.h"
-#include <kproc/timeout.h>
-#include <kproc/lock.h>
-#include <kproc/cond.h>
-#include <os-native.h>
-#include <kproc/lock.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <errno.h>
-
-/*--------------------------------------------------------------------------
- * pthread_mutex
- */
-static
-rc_t pthread_mutex_whack ( pthread_mutex_t *mutex )
-{
-    int status = pthread_mutex_destroy ( mutex );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EBUSY:
-        return RC ( rcPS, rcLock, rcDestroying, rcLock, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcDestroying, rcLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcDestroying, rcNoObj, rcUnknown );
-    }
-    return 0;
-}
-
-static
-rc_t pthread_mutex_acquire ( pthread_mutex_t *mutex )
-{
-/*    pthread_t t = pthread_self();
-    fprintf(stdout, "pthread_mutex_lock(%p), thread=%x\n", mutex, t);*/
-    int status = pthread_mutex_lock ( mutex );
-/*fprintf(stdout, "pthread_mutex_lock, thread=%x, status = %d\n", t, status);*/
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EDEADLK:
-        return RC ( rcPS, rcLock, rcLocking, rcThread, rcDeadlock );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcLocking, rcLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcLocking, rcNoObj, rcUnknown );
-    }
-    return 0;
-}
-
-static
-int pthread_mutex_tryacquire ( pthread_mutex_t *mutex )
-{
-/*    pthread_t t = pthread_self();
-fprintf(stdout, "pthread_mutex_trylock(%p), thread=%x\n", mutex, t);*/
-    int status = pthread_mutex_trylock ( mutex );
-/*fprintf(stdout, "pthread_mutex_trylock, thread=%x, status = %d\n", t, status);*/
-    return status;
-}
-
-static
-rc_t pthread_mutex_release ( pthread_mutex_t *mutex )
-{
-/*    pthread_t t = pthread_self();
-fprintf(stdout, "pthread_mutex_unlock(%p), thread=%x\n", mutex, t);*/
-    int status = pthread_mutex_unlock ( mutex );
-/*fprintf(stdout, "pthread_mutex_unlock, thread=%x, status = %d\n", t, status);*/
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EPERM:
-        return RC ( rcPS, rcLock, rcUnlocking, rcThread, rcIncorrect );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcUnlocking, rcLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcUnlocking, rcNoObj, rcUnknown );
-    }
-    return 0;
-}
-
-/*--------------------------------------------------------------------------
- * pthread_condition
- */
-static
-rc_t pthread_condition_init ( pthread_cond_t *cond )
- {
-    int status = pthread_cond_init ( cond, NULL );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EAGAIN:
-        return RC ( rcPS, rcCondition, rcConstructing, rcCondition, rcExhausted );
-    case ENOMEM:
-        return RC ( rcPS, rcCondition, rcConstructing, rcMemory, rcExhausted );
-    case EBUSY:
-        return RC ( rcPS, rcCondition, rcConstructing, rcCondition, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcCondition, rcConstructing, rcCondition, rcInvalid );
-    default:
-        return RC ( rcPS, rcCondition, rcConstructing, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-static
-rc_t pthread_condition_whack ( pthread_cond_t *cond )
-{
-    int status = pthread_cond_destroy ( cond );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EBUSY:
-        return RC ( rcPS, rcLock, rcDestroying, rcCondition, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcDestroying, rcCondition, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcDestroying, rcNoObj, rcUnknown );
-    }
-    return 0;
-}
-
-static
-rc_t pthread_condition_wait ( pthread_cond_t *cond, pthread_mutex_t *mutex )
-{
-/*    pthread_t t = pthread_self();
-fprintf(stdout, "pthread_cond_wait(%p, %p), thread=%x\n", cond, mutex, t);*/
-    int status = pthread_cond_wait( cond, mutex );
-/*fprintf(stdout, "pthread_cond_wait, thread=%x, status = %d\n", t, status);*/
-    
-    switch ( status )
-    {
-    case 0:
-        break;
-    default:
-        return RC ( rcPS, rcLock, rcSignaling, rcCondition, rcUnknown );
-    }
-    return 0;
-}
-
-static
-rc_t pthread_condition_timedwait ( pthread_cond_t *cond, pthread_mutex_t *mutex, struct timespec *ts )
-{
-    int status = pthread_cond_timedwait ( cond, mutex, ts );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case ETIMEDOUT:
-        return RC ( rcPS, rcCondition, rcWaiting, rcTimeout, rcExhausted );
-    case EINTR:
-        return RC ( rcPS, rcCondition, rcWaiting, rcThread, rcInterrupted );
-    default:
-        return RC ( rcPS, rcCondition, rcWaiting, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-static
-rc_t pthread_condition_signal( pthread_cond_t *cond )
-{
-    int status = pthread_cond_signal ( cond );
-    switch ( status )
-    {
-    case 0:
-        break;
-    default:
-        return RC ( rcPS, rcCondition, rcSignaling, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-static
-rc_t pthread_condition_broadcast ( pthread_cond_t *cond )
-{
-    int status = pthread_cond_broadcast ( cond );
-    switch ( status )
-    {
-    case 0:
-        break;
-    default:
-        return RC ( rcPS, rcCondition, rcSignaling, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-/*--------------------------------------------------------------------------
- * KLock
- *  a POSIX-style mutual exclusion lock
- */
-
-/* Destroy
- */
-static
-rc_t KLockDestroy ( KLock *self )
-{
-    return pthread_mutex_whack ( & self -> mutex );
-}
-
-/* Whack
- */
-static
-rc_t KLockWhack ( KLock *self )
-{
-    rc_t rc = KLockDestroy ( self );
-    if ( rc == 0 )
-        free ( self );
-    return rc;
-}
-
-/* Init
- */
-static
-rc_t KLockInit ( KLock *self )
-{
-    int status = pthread_mutex_init ( & self -> mutex, NULL );
-    switch ( status )
-    {
-    case 0:
-        atomic32_set ( & self -> refcount, 1 );
-        return 0;
-    case EAGAIN:
-        return RC ( rcPS, rcLock, rcConstructing, rcResources, rcInsufficient );
-    case ENOMEM:
-        return RC ( rcPS, rcLock, rcConstructing, rcMemory, rcInsufficient );
-    }
-
-    return RC ( rcPS, rcLock, rcConstructing, rcNoObj, rcUnknown );
- }
-
-
-/* Make
- *  make a simple mutex
- */
-LIB_EXPORT rc_t CC KLockMake ( KLock **lockp )
-{
-    rc_t rc;
-    if ( lockp == NULL )
-        rc = RC ( rcPS, rcLock, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KLock *lock = malloc ( sizeof * lock );
-        if ( lock == NULL )
-            rc = RC ( rcPS, rcLock, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KLockInit ( lock );
-            if ( rc == 0 )
-            {
-                * lockp = lock;
-                return 0;
-            }
-
-            free ( lock );
-        }
-
-        * lockp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KLockAddRef ( const KLock *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KLock* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLockRelease ( const KLock *cself )
-{
-    KLock *self = ( KLock* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KLockWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* Acquire
- *  acquires lock
- */
-LIB_EXPORT rc_t CC KLockAcquire ( KLock *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcPS, rcLock, rcLocking, rcSelf, rcNull );
-    else
-    {
-        rc = pthread_mutex_acquire ( & self -> mutex );
-    }
-
-    return rc;
-}
-
-/* Unlock
- *  releases lock
- */
-LIB_EXPORT rc_t CC KLockUnlock ( KLock *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcUnlocking, rcSelf, rcNull );
-        
-    /* release the guy */
-    rc = pthread_mutex_release ( & self -> mutex );
-
-    return rc;
-}
-
-/*--------------------------------------------------------------------------
- * KTimedLock
- *  a POSIX-style mutual exclusion lock with support for timed acquire
- */
-
-/* Destroy
- */
-static
-rc_t KTimedLockDestroy ( KTimedLock *self )
-{
-    rc_t rc = pthread_mutex_whack ( & self -> mutex );
-    if ( rc == 0 )
-    {
-        pthread_mutex_whack ( & self -> cond_lock );
-        pthread_condition_whack ( & self -> cond );
-    }
-    return rc;
-}
-
-/* Whack
- */
-static
-rc_t KTimedLockWhack ( KTimedLock *self )
-{
-    rc_t rc = KTimedLockDestroy ( self );
-    if ( rc == 0 )
-        free ( self );
-    return rc;
-}
-
-/* Init
- */
-static
-rc_t KTimedLockInit ( KTimedLock *self )
-{
-    int status = pthread_mutex_init ( & self -> mutex, NULL );
-    if ( status == 0 )
-    {
-        status = pthread_mutex_init ( & self -> cond_lock, NULL );
-        if ( status == 0 )
-        {
-            status = pthread_cond_init ( & self -> cond, NULL );
-            if ( status == 0 )
-            {
-                self -> waiters = 0;
-                atomic32_set ( & self -> refcount, 1 );
-                return 0;
-            }
-
-            pthread_mutex_destroy ( & self -> cond_lock );
-        }
-
-        pthread_mutex_destroy ( & self -> mutex );
-    }
-
-    switch ( status )
-    {
-    case EAGAIN:
-        return RC ( rcPS, rcLock, rcConstructing, rcResources, rcInsufficient );
-    case ENOMEM:
-        return RC ( rcPS, rcLock, rcConstructing, rcMemory, rcInsufficient );
-    }
-
-    return RC ( rcPS, rcLock, rcConstructing, rcNoObj, rcUnknown );
- }
-
-
-/* Make
- *  make a simple mutex
- */
-LIB_EXPORT rc_t CC KTimedLockMake ( KTimedLock **lockp )
-{
-    rc_t rc;
-    if ( lockp == NULL )
-        rc = RC ( rcPS, rcLock, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KTimedLock *lock = malloc ( sizeof * lock );
-        if ( lock == NULL )
-            rc = RC ( rcPS, rcLock, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KTimedLockInit ( lock );
-            if ( rc == 0 )
-            {
-                * lockp = lock;
-                return 0;
-            }
-
-            free ( lock );
-        }
-
-        * lockp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KTimedLockAddRef ( const KTimedLock *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KTimedLock* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KTimedLockRelease ( const KTimedLock *cself )
-{
-    KTimedLock *self = ( KTimedLock* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KTimedLockWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* Acquire
- *  acquires lock
- */
-LIB_EXPORT rc_t CC KTimedLockAcquire ( KTimedLock *self, timeout_t *tm )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcLocking, rcSelf, rcNull );
-
-    if ( tm == NULL )
-        return pthread_mutex_acquire ( & self -> mutex );
-
-    /* this is ugly, but don't want to prepare inside lock */
-    if ( ! tm -> prepared )
-        TimeoutPrepare ( tm );
-
-    rc = pthread_mutex_acquire ( & self -> cond_lock );
-    if ( rc == 0 )
-    {
-        int status = pthread_mutex_tryacquire ( & self -> mutex );
-        if ( status == EBUSY )
-        {
-            while ( 1 )
-            {
-                ++ self -> waiters;
-                status = pthread_cond_timedwait ( & self -> cond, & self -> cond_lock, & tm -> ts );
-                -- self -> waiters;
-
-                if ( status == EINTR )
-                    continue;
-                if ( status != 0 )
-                    break;
-                status = pthread_mutex_tryacquire ( & self -> mutex );
-                if ( status != EBUSY )
-                    break;
-            }
-        }
-
-        pthread_mutex_release ( & self -> cond_lock );
-
-        switch ( status )
-        {
-        case 0:
-            break;
-        case ETIMEDOUT:
-            rc = RC ( rcPS, rcLock, rcLocking, rcTimeout, rcExhausted );
-            break;
-        case EBUSY:
-            rc = RC ( rcPS, rcLock, rcLocking, rcLock, rcBusy );
-            break;
-        case EINVAL:
-            rc = RC ( rcPS, rcLock, rcLocking, rcLock, rcInvalid );
-            break;
-        default:
-            rc = RC ( rcPS, rcLock, rcLocking, rcNoObj, rcUnknown );
-        }
-    }
-
-    return rc;
-}
-
-/* Unlock
- *  releases lock
- */
-LIB_EXPORT rc_t CC KTimedLockUnlock ( KTimedLock *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcUnlocking, rcSelf, rcNull );
-
-    rc = pthread_mutex_acquire ( & self -> cond_lock );
-    if ( rc == 0 )
-    {
-        /* release the guy */
-        rc = pthread_mutex_release ( & self -> mutex );
-
-        if ( self -> waiters != 0 )
-            pthread_condition_signal ( & self -> cond );
-
-        pthread_mutex_release ( & self -> cond_lock );
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * KRWLock
- *  a POSIX-style read/write lock
- */
-struct KRWLock
-{
-    KLock lock;
-    pthread_cond_t rcond;
-    pthread_cond_t wcond;
-    uint32_t rwait;
-    uint32_t wwait;
-    int32_t count;
-    atomic32_t refcount;
-    
-    /* used in KRWLockTimedAcquire */
-    pthread_mutex_t timed_lock;
-    pthread_cond_t  timed_cond;
-    uint32_t        timed_waiters;
-};
-
-
-/* Whack
- */
-static
-rc_t KRWLockWhack ( KRWLock *self )
-{
-    rc_t rc;
-    if ( self -> count || self -> rwait || self -> wwait )
-        return RC ( rcPS, rcRWLock, rcDestroying, rcRWLock, rcBusy );
-
-    rc = KLockDestroy ( & self -> lock );
-    if ( rc == 0 )
-    {
-        pthread_cond_destroy ( & self -> rcond );
-        pthread_cond_destroy ( & self -> wcond );
-       
-        pthread_cond_destroy ( & self -> timed_cond );
-        pthread_mutex_whack ( & self -> timed_lock );
-        
-        free ( self );
-    }
-
-    return rc;
-}
-
-
-/* Make
- *  make a simple read/write lock
- */
-LIB_EXPORT rc_t CC KRWLockMake ( KRWLock **lockp )
-{
-    rc_t rc;
-
-    if ( lockp == NULL )
-        rc = RC ( rcPS, rcRWLock, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KRWLock *lock = malloc ( sizeof * lock );
-        if ( lock == NULL )
-            rc = RC ( rcPS, rcRWLock, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KLockInit ( & lock -> lock );
-            if ( rc == 0 )
-            {
-                rc = pthread_condition_init ( & lock -> rcond );
-                if ( rc == 0 )
-                {
-                    rc = pthread_condition_init ( & lock -> wcond );
-                    if ( rc == 0 )
-                    {
-                        rc = pthread_condition_init ( & lock -> timed_cond );
-                        if ( rc == 0 )
-                        {
-                            int status = pthread_mutex_init ( & lock -> timed_lock, NULL );
-                            if ( status == 0 )
-                            {
-                            
-                                lock -> rwait = lock -> wwait = 0;
-                                lock -> count = 0;
-                                atomic32_set ( & lock -> refcount, 1 );
-                                lock -> timed_waiters = 0;
-                                * lockp = lock;
-                                return 0;
-                            }
-                            pthread_cond_destroy ( & lock -> timed_cond );
-                        }
-                        pthread_cond_destroy ( & lock -> wcond );
-                    }
-
-                    pthread_cond_destroy ( & lock -> rcond );
-                }
-
-                KLockDestroy ( & lock -> lock );
-            }
-
-            free ( lock );
-        }
-
-        * lockp = NULL;
-    }
-
-    return rc;
-}
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KRWLockAddRef ( const KRWLock *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KRWLock* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KRWLockRelease ( const KRWLock *cself )
-{
-    KRWLock *self = ( KRWLock* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KRWLockWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* AcquireShared
- *  acquires read ( shared ) lock
- */
-LIB_EXPORT rc_t CC KRWLockAcquireShared ( KRWLock *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    rc = KLockAcquire ( & self -> lock );
-    if ( rc == 0 )
-    {
-        ++ self -> rwait;
-        while ( self -> count < 0 || self -> wwait != 0 )
-        {
-            rc = pthread_condition_wait ( & self -> rcond, & self -> lock . mutex );
-            if ( rc != 0 )
-                break;
-        }
-        -- self -> rwait;
-
-        if ( rc == 0 )
-        {
-            ++ self -> count;
-        }
-
-        KLockUnlock ( & self -> lock );
-    }
-
-    return rc;
-}
-
-static
-rc_t KRWLockTimedAcquire( KRWLock *self, timeout_t *tm )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcLocking, rcSelf, rcNull );
-
-    if ( tm == NULL )
-        return pthread_mutex_acquire ( & self -> lock . mutex );
-
-    /* this is ugly, but don't want to prepare inside lock */
-    if ( ! tm -> prepared )
-        TimeoutPrepare ( tm );
-
-    rc = pthread_mutex_acquire ( & self -> timed_lock );
-    if ( rc == 0 )
-    {
-        int status = pthread_mutex_tryacquire ( & self -> lock . mutex );
-        if ( status == EBUSY )
-        {
-            while ( 1 )
-            {
-                ++ self -> timed_waiters;
-                status = pthread_cond_timedwait ( & self -> timed_cond, & self -> timed_lock, & tm -> ts );
-                -- self -> timed_waiters;
-
-                if ( status == EINTR )
-                    continue;
-                if ( status != 0 )
-                    break;
-                status = pthread_mutex_tryacquire ( & self -> lock . mutex );
-                if ( status != EBUSY )
-                    break;
-            }
-        }
-
-        pthread_mutex_release ( & self -> timed_lock );
-
-        switch ( status )
-        {
-        case 0:
-            break;
-        case ETIMEDOUT:
-            rc = RC ( rcPS, rcLock, rcLocking, rcTimeout, rcExhausted );
-            break;
-        case EBUSY:
-            rc = RC ( rcPS, rcLock, rcLocking, rcLock, rcBusy );
-            break;
-        case EINVAL:
-            rc = RC ( rcPS, rcLock, rcLocking, rcLock, rcInvalid );
-            break;
-        default:
-            rc = RC ( rcPS, rcLock, rcLocking, rcNoObj, rcUnknown );
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KRWLockTimedAcquireShared ( KRWLock *self, timeout_t *tm )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    rc = KRWLockTimedAcquire ( self, tm );
-    if ( rc == 0 )
-    {
-        ++ self -> rwait;
-        while ( self -> count < 0 || self -> wwait != 0 )
-        {
-            rc = pthread_condition_timedwait ( & self -> rcond, & self -> lock .  mutex, & tm -> ts );
-            if ( rc != 0 )
-            {
-                if ( GetRCState ( rc ) == rcExhausted && GetRCObject ( rc ) == rcTimeout )
-                    rc = ResetRCContext ( rc, rcPS, rcRWLock, rcLocking );
-                break;
-            }
-        }
-        -- self -> rwait;
-
-        if ( rc == 0 )
-        {
-            ++ self -> count;
-        }
-
-        KLockUnlock ( & self -> lock );
-    }
-
-    return rc;
-}
-
-/* AcquireExcl
- *  acquires write ( exclusive ) lock
- */
-LIB_EXPORT rc_t CC KRWLockAcquireExcl ( KRWLock *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    rc = KLockAcquire ( & self -> lock );
-    if ( rc == 0 )
-    {
-        ++ self -> wwait;
-        while ( self -> count != 0 )
-        {
-            rc = pthread_condition_wait ( & self -> wcond, & self -> lock . mutex );
-            if ( rc != 0 )
-                break;
-        }
-        -- self -> wwait;
-
-        if ( rc == 0 )
-        {
-            self -> count = -1;
-        }
-
-        KLockUnlock ( & self -> lock );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KRWLockTimedAcquireExcl ( KRWLock *self, timeout_t *tm )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    rc = KRWLockTimedAcquire ( self, tm );
-    if ( rc == 0 )
-    {
-        ++ self -> wwait;
-        while ( self -> count != 0 )
-        {
-            rc = pthread_condition_timedwait ( & self -> wcond, & self -> lock . mutex, & tm -> ts );
-            if ( rc != 0 )
-            {
-                if ( GetRCState ( rc ) == rcExhausted && GetRCObject ( rc ) == rcTimeout )
-                    rc = ResetRCContext ( rc, rcPS, rcRWLock, rcLocking );
-                break;
-            }
-        }
-        -- self -> wwait;
-
-        if ( rc == 0 )
-        {
-            self -> count = -1;
-        }
-
-        KLockUnlock ( & self -> lock );
-    }
-
-    return rc;
-}
-
-/* Unlock
- *  releases lock
- */
-LIB_EXPORT rc_t CC KRWLockUnlock ( KRWLock *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcUnlocking, rcSelf, rcNull );
-
-    rc = KLockAcquire ( & self -> lock );
-    if ( rc == 0 )
-    {
-        /* release the count */
-        if ( self -> count < 0 )
-            self -> count = 0;
-        else if ( self -> count > 0 )
-            -- self -> count;
-
-        /* if there are writers waiting... */
-        if ( self -> wwait != 0 )
-        {
-            /* don't bother unless the lock is free */
-            if ( self -> count == 0 )
-                pthread_condition_signal ( & self -> wcond );
-        }
-
-        /* if there are readers waiting */
-        else if ( self -> rwait != 0 )
-        {
-            /* any number of readers can come through now */
-            pthread_condition_broadcast ( & self -> rcond );
-        }
-
-        KLockUnlock ( & self -> lock );
-    }
-
-    return rc;
-}
diff --git a/libs/kproc/bsd/sysmgr.c b/libs/kproc/bsd/sysmgr.c
deleted file mode 100644
index 58345b4..0000000
--- a/libs/kproc/bsd/sysmgr.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-#include <kproc/procmgr.h>
-
-#include <pthread.h>
-
-/* OnMainThread
- *  returns true if running on main thread
- */
-LIB_EXPORT bool CC KProcMgrOnMainThread ( void )
-{
-    return pthread_main_np () != 0;
-}
diff --git a/libs/kproc/linux/sysbarrier.c b/libs/kproc/linux/sysbarrier.c
deleted file mode 100644
index 2b1ccaa..0000000
--- a/libs/kproc/linux/sysbarrier.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-#include <kproc/barrier.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <pthread.h>
-#include <stdlib.h>
-#include <errno.h>
-
-
-/*--------------------------------------------------------------------------
- * KBarrier
- *  a thread synchronization device
- *  detains all callers until the required number has been reached
- */
-struct KBarrier
-{
-    pthread_barrier_t barrier;
-    atomic32_t refcount;
-};
-
-
-/* Whack
- */
-static
-rc_t KBarrierWhack ( KBarrier *self )
-{
-    int status = pthread_barrier_destroy ( & self -> barrier );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EBUSY:
-        return RC ( rcPS, rcBarrier, rcDestroying, rcBarrier, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcBarrier, rcDestroying, rcBarrier, rcInvalid );
-    default:
-        return RC ( rcPS, rcBarrier, rcDestroying, rcNoObj, rcUnknown );
-    }
-    return 0;
-}
-
-
-/* Make
- *  create a barrier
- *
- *  "count" [ IN ] - the number of threads to block
- */
-LIB_EXPORT rc_t CC KBarrierMake ( KBarrier **bp, uint32_t count )
-{
-    rc_t rc;
-    if ( bp == NULL )
-        rc = RC ( rcPS, rcBarrier, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KBarrier *b = malloc ( sizeof * b );
-        if ( b == NULL )
-            rc = RC ( rcPS, rcBarrier, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            int status = pthread_barrier_init ( & b -> barrier, NULL, count );
-            if ( status == 0 )
-            {
-                atomic32_set ( & b -> refcount, 1 );
-                * bp = b;
-                return 0;
-            }
-
-            switch ( status )
-            {
-            case EINVAL:
-                rc = RC ( rcPS, rcBarrier, rcConstructing, rcParam, rcInvalid );
-                break;
-            case EBUSY:
-                rc = RC ( rcPS, rcBarrier, rcConstructing, rcBarrier, rcBusy );
-                break;
-            case EAGAIN:
-                rc = RC ( rcPS, rcBarrier, rcConstructing, rcBarrier, rcExhausted );
-                break;
-            case ENOMEM:
-                rc = RC ( rcPS, rcBarrier, rcConstructing, rcMemory, rcExhausted );
-                break;
-            default:
-                rc = RC ( rcPS, rcBarrier, rcConstructing, rcNoObj, rcUnknown );
-            }
-
-            free ( b );
-        }
-
-        * bp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KBarrierAddRef ( const KBarrier *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KBarrier* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KBarrierRelease ( const KBarrier *cself )
-{
-    KBarrier *self = ( KBarrier* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KBarrierWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* Wait
- *  block until the required number of callers has been reached
- */
-LIB_EXPORT rc_t CC KBarrierWait ( KBarrier *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcBarrier, rcWaiting, rcSelf, rcNull );
-
-    status = pthread_barrier_wait ( & self -> barrier );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EINVAL:
-        return RC ( rcPS, rcBarrier, rcWaiting, rcBarrier, rcInvalid );
-    default:
-        return RC ( rcPS, rcBarrier, rcWaiting, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
diff --git a/libs/kproc/linux/syslock-priv.h b/libs/kproc/linux/syslock-priv.h
deleted file mode 100644
index 1b2adff..0000000
--- a/libs/kproc/linux/syslock-priv.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_syslock_priv_
-#define _h_syslock_priv_
-
-/* BEGIN HACK to get rwlocks defined */
-#include <stdint.h>
-#include <stddef.h>
-
-#undef __USE_UNIX98
-#define __USE_UNIX98 1
-
-#undef __USE_XOPEN2K
-#define __USE_XOPEN2K 1
-/* END HACK */
-
-#include <pthread.h>
-#include <atomic32.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * KLock
- *  a POSIX-style mutual exclusion lock
- */
-struct KLock
-{
-    pthread_mutex_t mutex;
-    atomic32_t refcount;
-};
-
-struct KTimedLock
-{
-    pthread_mutex_t mutex;
-    atomic32_t refcount;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_syslock_priv_ */
diff --git a/libs/kproc/linux/syslock.c b/libs/kproc/linux/syslock.c
deleted file mode 100644
index dffd05f..0000000
--- a/libs/kproc/linux/syslock.c
+++ /dev/null
@@ -1,617 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-#include "syslock-priv.h"
-#include <os-native.h>
-#include <kproc/timeout.h>
-#include <kproc/lock.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <errno.h>
-
-/*--------------------------------------------------------------------------
- * KLock
- *  a POSIX-style mutual exclusion lock
- */
-
-/* Whack
- */
-static
-rc_t KLockWhack ( KLock *self )
-{
-    int status = pthread_mutex_destroy ( & self -> mutex );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EBUSY:
-        return RC ( rcPS, rcLock, rcDestroying, rcLock, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcDestroying, rcLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcDestroying, rcNoObj, rcUnknown );
-    }
-
-    free ( self );
-    return 0;
-}
-
-/* Make
- *  make a simple mutex
- */
-LIB_EXPORT rc_t CC KLockMake ( KLock **lockp )
-{
-    rc_t rc;
-    if ( lockp == NULL )
-        rc = RC ( rcPS, rcLock, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KLock *lock = malloc ( sizeof * lock );
-        if ( lock == NULL )
-            rc = RC ( rcPS, rcLock, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            int status = pthread_mutex_init ( & lock -> mutex, NULL );
-            if ( status == 0 )
-            {
-                atomic32_set ( & lock -> refcount, 1 );
-                * lockp = lock;
-                return 0;
-            }
-
-            /* pthread_mutex_init is documented as always returning 0 */
-            rc = RC ( rcPS, rcLock, rcConstructing, rcNoObj, rcUnknown );
-
-            free ( lock );
-        }
-
-        * lockp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KLockAddRef ( const KLock *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KLock* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLockRelease ( const KLock *cself )
-{
-    KLock *self = ( KLock* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KLockWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* Acquire
- *  acquires lock
- */
-LIB_EXPORT rc_t CC KLockAcquire ( KLock *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcLocking, rcSelf, rcNull );
-
-    status = pthread_mutex_lock ( & self -> mutex );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EDEADLK:
-        return RC ( rcPS, rcLock, rcLocking, rcThread, rcDeadlock );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcLocking, rcLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-/* Unlock
- *  releases lock
- */
-LIB_EXPORT rc_t CC KLockUnlock ( KLock *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcUnlocking, rcSelf, rcNull );
-
-    status = pthread_mutex_unlock ( & self -> mutex );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EPERM:
-        return RC ( rcPS, rcLock, rcUnlocking, rcThread, rcIncorrect );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcUnlocking, rcLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcUnlocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-/*--------------------------------------------------------------------------
- * KTimedLock
- *  a POSIX-style mutual exclusion lock with support for timed Acquire
- */
-
- /* Whack
- */
-static
-rc_t KTimedLockWhack ( KTimedLock *self )
-{
-    int status = pthread_mutex_destroy ( & self -> mutex );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EBUSY:
-        return RC ( rcPS, rcLock, rcDestroying, rcLock, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcDestroying, rcLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcDestroying, rcNoObj, rcUnknown );
-    }
-
-    free ( self );
-    return 0;
-}
-
-/* Make
- *  make a simple mutex
- */
-LIB_EXPORT rc_t CC KTimedLockMake ( KTimedLock **lockp )
-{
-    rc_t rc;
-    if ( lockp == NULL )
-        rc = RC ( rcPS, rcLock, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KTimedLock *lock = malloc ( sizeof * lock );
-        if ( lock == NULL )
-            rc = RC ( rcPS, rcLock, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            int status = pthread_mutex_init ( & lock -> mutex, NULL );
-            if ( status == 0 )
-            {
-                atomic32_set ( & lock -> refcount, 1 );
-                * lockp = lock;
-                return 0;
-            }
-
-            /* pthread_mutex_init is documented as always returning 0 */
-            rc = RC ( rcPS, rcLock, rcConstructing, rcNoObj, rcUnknown );
-
-            free ( lock );
-        }
-
-        * lockp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KTimedLockAddRef ( const KTimedLock *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KLock* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KTimedLockRelease ( const KTimedLock *cself )
-{
-    KTimedLock *self = ( KTimedLock* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KTimedLockWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* Acquire
- *  acquires lock with a timeout
- */
-LIB_EXPORT rc_t CC KTimedLockAcquire ( KTimedLock *self, timeout_t *tm )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcLocking, rcSelf, rcNull );
-
-    status = pthread_mutex_trylock ( & self -> mutex );
-    switch ( status )
-    {
-    case 0:
-        return 0;
-    case EBUSY:
-        if ( tm != NULL )
-            break;
-        return RC ( rcPS, rcLock, rcLocking, rcLock, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcLocking, rcLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    if ( ! tm -> prepared )
-        TimeoutPrepare ( tm );
-
-    status = pthread_mutex_timedlock ( & self -> mutex, & tm -> ts );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case ETIMEDOUT:
-        return RC ( rcPS, rcLock, rcLocking, rcTimeout, rcExhausted );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcLocking, rcTimeout, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-/* Unlock
- *  releases lock
- */
-LIB_EXPORT rc_t CC KTimedLockUnlock ( KTimedLock *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcUnlocking, rcSelf, rcNull );
-
-    status = pthread_mutex_unlock ( & self -> mutex );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EPERM:
-        return RC ( rcPS, rcLock, rcUnlocking, rcThread, rcIncorrect );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcUnlocking, rcLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcUnlocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-
-
-/*--------------------------------------------------------------------------
- * KRWLock
- *  a POSIX-style read/write lock
- */
-struct KRWLock
-{
-    pthread_rwlock_t lock;
-    atomic32_t refcount;
-};
-
-
-/* Whack
- */
-static
-rc_t KRWLockWhack ( KRWLock *self )
-{
-    int status = pthread_rwlock_destroy ( & self -> lock );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EBUSY:
-        return RC ( rcPS, rcRWLock, rcDestroying, rcRWLock, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcDestroying, rcRWLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcDestroying, rcNoObj, rcUnknown );
-    }
-
-    free ( self );
-    return 0;
-}
-
-
-/* Make
- *  make a simple read/write lock
- */
-LIB_EXPORT rc_t CC KRWLockMake ( KRWLock **lockp )
-{
-    rc_t rc;
-
-    if ( lockp == NULL )
-        rc = RC ( rcPS, rcRWLock, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KRWLock *lock = malloc ( sizeof * lock );
-        if ( lock == NULL )
-            rc = RC ( rcPS, rcRWLock, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            int status = pthread_rwlock_init ( & lock -> lock, NULL );
-            if ( status == 0 )
-            {
-                atomic32_set ( & lock -> refcount, 1 );
-                * lockp = lock;
-                return 0;
-            }
-
-            switch ( status )
-            {
-            case EAGAIN:
-                rc = RC ( rcPS, rcRWLock, rcConstructing, rcRWLock, rcExhausted );
-                break;
-            case ENOMEM:
-                rc = RC ( rcPS, rcRWLock, rcConstructing, rcMemory, rcExhausted );
-                break;
-            case EPERM:
-                rc = RC ( rcPS, rcRWLock, rcConstructing, rcProcess, rcUnauthorized );
-                break;
-            case EBUSY:
-                rc = RC ( rcPS, rcRWLock, rcConstructing, rcRWLock, rcBusy );
-                break;
-            default:
-                rc = RC ( rcPS, rcRWLock, rcConstructing, rcNoObj, rcUnknown );
-            }
-
-            free ( lock );
-        }
-
-        * lockp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KRWLockAddRef ( const KRWLock *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KRWLock* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KRWLockRelease ( const KRWLock *cself )
-{
-    KRWLock *self = ( KRWLock* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KRWLockWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* AcquireShared
- *  acquires read ( shared ) lock
- */
-LIB_EXPORT rc_t CC KRWLockAcquireShared ( KRWLock *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    status = pthread_rwlock_rdlock ( & self -> lock );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EDEADLK:
-        return RC ( rcPS, rcRWLock, rcLocking, rcThread, rcDeadlock );
-    case EAGAIN:
-        return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcExhausted );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KRWLockTimedAcquireShared ( KRWLock *self, timeout_t *tm )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    status = pthread_rwlock_tryrdlock ( & self -> lock );
-    switch ( status )
-    {
-    case 0:
-        return 0;
-    case EBUSY:
-        if ( tm != NULL )
-            break;
-        return RC ( rcPS, rcLock, rcLocking, rcRWLock, rcBusy );
-    case EAGAIN:
-        return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcExhausted );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    if ( ! tm -> prepared )
-        TimeoutPrepare ( tm );
-
-    status = pthread_rwlock_timedrdlock ( & self -> lock, & tm -> ts );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case ETIMEDOUT:
-        return RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcExhausted );
-    case EAGAIN:
-        return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcExhausted );
-    case EDEADLK:
-        return RC ( rcPS, rcRWLock, rcLocking, rcThread, rcDeadlock );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-
-/* AcquireExcl
- *  acquires write ( exclusive ) lock
- */
-LIB_EXPORT rc_t CC KRWLockAcquireExcl ( KRWLock *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    status = pthread_rwlock_wrlock ( & self -> lock );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EDEADLK:
-        return RC ( rcPS, rcRWLock, rcLocking, rcThread, rcDeadlock );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KRWLockTimedAcquireExcl ( KRWLock *self, timeout_t *tm )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    status = pthread_rwlock_trywrlock ( & self -> lock );
-    switch ( status )
-    {
-    case 0:
-        return 0;
-    case EBUSY:
-        if ( tm != NULL )
-            break;
-        return RC ( rcPS, rcRWLock, rcLocking, rcLock, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    if ( ! tm -> prepared )
-        TimeoutPrepare ( tm );
-
-    status = pthread_rwlock_timedwrlock ( & self -> lock, & tm -> ts );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case ETIMEDOUT:
-        return RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcExhausted );
-    case EDEADLK:
-        return RC ( rcPS, rcRWLock, rcLocking, rcThread, rcDeadlock );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-
-/* Unlock
- *  releases lock
- */
-LIB_EXPORT rc_t CC KRWLockUnlock ( KRWLock *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcUnlocking, rcSelf, rcNull );
-
-    status = pthread_rwlock_unlock ( & self -> lock );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EPERM:
-        return RC ( rcPS, rcRWLock, rcUnlocking, rcThread, rcIncorrect );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcUnlocking, rcRWLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcUnlocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
diff --git a/libs/kproc/linux/sysmgr.c b/libs/kproc/linux/sysmgr.c
deleted file mode 100644
index c3e6ff6..0000000
--- a/libs/kproc/linux/sysmgr.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-#include <kproc/procmgr.h>
-
-#include <unistd.h>
-#include <sys/syscall.h>
-
-static __thread bool have_tid, on_main_thread;
-
-static
-pid_t gettid ( void )
-{
-    return syscall ( SYS_gettid );
-}
-
-/* OnMainThread
- *  returns true if running on main thread
- */
-LIB_EXPORT bool CC KProcMgrOnMainThread ( void )
-{
-    if ( ! have_tid )
-    {
-        on_main_thread = gettid () == getpid ();
-        have_tid = true;
-    }
-    return on_main_thread;
-}
diff --git a/libs/kproc/procmgr.c b/libs/kproc/procmgr.c
deleted file mode 100644
index 6f768b3..0000000
--- a/libs/kproc/procmgr.c
+++ /dev/null
@@ -1,412 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-
-#include <kproc/procmgr.h>
-#include <kproc/task.h>
-#include <kproc/lock.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-
-#define rcTask rcCmd
-
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * KCleanupTaskQueue
- */
-typedef struct KCleanupTaskQueue KCleanupTaskQueue;
-struct KCleanupTaskQueue
-{
-    uint64_t count;
-    uint64_t capacity;
-    uint64_t start;
-    KTask *q [ 1 ];
-};
-
-
-/*--------------------------------------------------------------------------
- * KProcMgr
- */
-struct KProcMgr
-{
-    KLock *cleanup_lock;
-    KCleanupTaskQueue *cleanup;
-    KRefcount refcount;
-};
-
-static KProcMgr * s_proc_mgr;
-
-
-/* Whack
- *  tear down proc mgr
- *  runs any outstanding cleanup tasks
- *  deletes the singleton object
- *  intended to be called from an "atexit()" or similar task
- */
-LIB_EXPORT rc_t CC KProcMgrWhack ( void )
-{
-    rc_t rc = 0;
-
-    KProcMgr *self = s_proc_mgr;
-    if ( s_proc_mgr != NULL )
-    {
-        s_proc_mgr = NULL;
-
-        rc = KLockAcquire ( self -> cleanup_lock );
-        if ( rc == 0 )
-        {
-            uint64_t i;
-
-            KCleanupTaskQueue *cleanup = self -> cleanup;
-            self -> cleanup = NULL;
-            KLockUnlock ( self -> cleanup_lock );
-
-            if ( cleanup != NULL )
-            {
-                for ( i = 0; i < cleanup -> count; ++ i )
-                {
-                    KTask *task = cleanup -> q [ i ];
-                    if ( task != NULL )
-                    {
-                        rc_t task_rc = KTaskExecute ( task );
-                        if ( rc == 0 )
-                            rc = task_rc;
-
-                        cleanup -> q [ i ] = NULL;
-                        KTaskRelease ( task );
-                    }
-                }
-
-                free ( cleanup );
-            }
-        }
-
-        KLockRelease ( self -> cleanup_lock );
-        free ( self );
-    }
-
-    return rc;
-}
-
-
-/* Init
- *  initialize the proc mgr
- *  creates the singleton object
- */
-LIB_EXPORT rc_t CC KProcMgrInit ( void )
-{
-    rc_t rc = 0;
-
-    if ( s_proc_mgr == NULL )
-    {
-        KProcMgr *mgr = malloc ( sizeof * s_proc_mgr );
-        if ( mgr == NULL )
-            rc = RC ( rcPS, rcMgr, rcInitializing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KLockMake ( & mgr -> cleanup_lock );
-            if ( rc == 0 )
-            {
-                mgr -> cleanup = NULL;
-                KRefcountInit ( & mgr -> refcount, 0, "KProcMgr", "init", "process mgr" );
-
-                s_proc_mgr = mgr;
-                return 0;
-            }
-
-            free ( mgr );
-        }
-    }
-
-    return rc;
-}
-
-
-/* MakeSingleton
- *  make or access singleton process manager
- *  VDB-2 ONLY
- */
-LIB_EXPORT rc_t CC KProcMgrMakeSingleton ( KProcMgr ** mgrp )
-{
-    rc_t rc;
-
-    if ( mgrp == NULL )
-        rc = RC ( rcPS, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        * mgrp = s_proc_mgr;
-
-        if ( s_proc_mgr == NULL )
-            rc = RC ( rcPS, rcMgr, rcConstructing, rcMgr, rcNull );
-        else
-            rc = KProcMgrAddRef ( s_proc_mgr );
-    }
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KProcMgrAddRef ( const KProcMgr *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KProcMgr" ) )
-        {
-        case krefLimit:
-            return RC ( rcPS, rcMgr, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KProcMgrRelease ( const KProcMgr *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KProcMgr" ) )
-        {
-        case krefWhack:
-            return 0;
-        case krefNegative:
-            return RC ( rcPS, rcMgr, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* AddCleanupTask
- *  add a task to be performed at process exit time
- *
- *  "ticket" [ OUT ] - an id that can be used later to remove task
- *
- *  "task" [ IN ] - task object that will be executed at process
- *   exit, unless previously removed ( see RemoveCleanupTask ).
- *   NB - a new reference to "task" will be created
- */
-LIB_EXPORT rc_t CC KProcMgrAddCleanupTask ( KProcMgr *self, KTaskTicket *ticket, KTask *task )
-{
-    rc_t rc;
-
-    if ( ticket == NULL )
-        rc = RC ( rcPS, rcQueue, rcInserting, rcId, rcNull );
-    else
-    {
-        memset ( ticket, 0, sizeof * ticket );
-
-        if ( self == NULL )
-            rc = RC ( rcPS, rcQueue, rcInserting, rcSelf, rcNull );
-        else if ( self != s_proc_mgr )
-            rc = RC ( rcPS, rcQueue, rcInserting, rcSelf, rcIncorrect );
-        else if ( task == NULL )
-            rc = RC ( rcPS, rcQueue, rcInserting, rcTask, rcNull );
-        else
-        {
-            rc = KTaskAddRef ( task );
-            if ( rc == 0 )
-            {
-                rc = KLockAcquire ( self -> cleanup_lock );
-                if ( rc == 0 )
-                {
-                    const uint64_t extend = 1024;
-                    KCleanupTaskQueue *cleanup = self -> cleanup;
-
-                    /* on first insert, allocate queue */
-                    if ( self -> cleanup == NULL )
-                    {
-                        cleanup = malloc ( sizeof * cleanup - sizeof cleanup -> q
-                            + sizeof cleanup -> q [ 0 ] * extend );
-                        if ( cleanup == NULL )
-                            rc = RC ( rcPS, rcQueue, rcInserting, rcMemory, rcExhausted );
-                        else
-                        {
-                            cleanup -> count = 0;
-                            cleanup -> capacity = extend;
-                            cleanup -> start = 0;
-
-                            self -> cleanup = cleanup;
-                        }
-                    }
-
-                    /* if queue is full */
-                    else if ( cleanup -> count == cleanup -> capacity )
-                    {
-                        uint64_t empty;
-
-                        /* determine number of empty slots at start */
-                        for ( empty = 0; empty < cleanup -> count; ++ empty )
-                        {
-                            if ( cleanup -> q [ empty ] != NULL )
-                                break;
-                        }
-
-                        /* if none are empty, simply reallocate - probably bad... */
-                        if ( empty == 0 )
-                        {
-                            cleanup = realloc ( cleanup, sizeof * cleanup - sizeof cleanup -> q
-                                + sizeof cleanup -> q [ 0 ] * ( cleanup -> capacity + extend ) );
-                            if ( cleanup == NULL )
-                                rc = RC ( rcPS, rcQueue, rcInserting, rcMemory, rcExhausted );
-                            else
-                            {
-                                cleanup -> capacity += extend;
-                                self -> cleanup = cleanup;
-                            }
-                        }
-
-                        /* otherwise, rewrite to remove empty slots */
-                        else
-                        {
-                            uint64_t i;
-                            const KCleanupTaskQueue *orig = cleanup;
-
-                            /* only bother with resize if there are enough to recover */
-                            if ( empty >= 4096 )
-                            {
-                                cleanup = malloc ( sizeof * cleanup - sizeof cleanup -> q
-                                    + sizeof cleanup -> q [ 0 ] * ( orig -> capacity - empty + extend ) );
-                                if ( cleanup == NULL )
-                                    rc = RC ( rcPS, rcQueue, rcInserting, rcMemory, rcExhausted );
-                                else
-                                {
-                                    cleanup -> capacity = orig -> capacity - empty + extend;
-                                }
-                            }
-
-                            /* rewrite count to remove leading NULL entries */
-                            cleanup -> count = orig -> count - empty;
-
-                            /* accumulate NULL entries into the start offset */
-                            cleanup -> start = orig -> start + empty;
-
-                            /* copy the tasks */
-                            for ( i = 0; i < cleanup -> count; ++ i )
-                                cleanup -> q [ i ] = orig -> q [ empty + i ];
-
-                            if ( ( const KCleanupTaskQueue* ) cleanup != orig )
-                            {
-                                self -> cleanup = cleanup;
-                                free ( ( void* ) orig );
-                            }
-                        }
-                    }
-
-                    /* detect valid queue for insertion */
-                    if ( rc == 0 )
-                    {
-                        /* assert that there is space for a task */
-                        assert ( cleanup -> count < cleanup -> capacity );
-
-                        /* record reference to task */
-                        cleanup -> q [ cleanup -> count ] = task;
-
-                        /* fill out the ticket information */
-                        ticket -> info [ 0 ] =  cleanup -> start + cleanup -> count;
-                        ticket -> info [ 1 ] = ( size_t ) task;
-                        ticket -> info [ 0 ] ^= ( size_t ) self;
-                        ticket -> info [ 1 ] ^= ( size_t ) self;
-                        ticket -> info [ 0 ] ^= ( size_t ) task;
-
-                        /* account for insertion */
-                        ++ cleanup -> count;
-                    }
-
-                    KLockUnlock ( self -> cleanup_lock );
-                }
-
-                if ( rc != 0 )
-                    KTaskRelease ( task );
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/* RemoveCleanupTask
- *  remove a task from exit queue
- *  releases reference to task object
- *  returns an rcNotFound code if task no longer exists
- */
-LIB_EXPORT rc_t CC KProcMgrRemoveCleanupTask ( KProcMgr *self, const KTaskTicket *ticket )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcPS, rcQueue, rcRemoving, rcSelf, rcNull );
-    else if ( self != s_proc_mgr )
-        rc = RC ( rcPS, rcQueue, rcRemoving, rcSelf, rcIncorrect );
-    else if ( ticket == NULL )
-        rc = RC ( rcPS, rcQueue, rcRemoving, rcId, rcNull );
-    else
-    {
-        /* recover task* and idx */
-        KTask *task = ( KTask* ) ( ( size_t ) ticket -> info [ 1 ] ^ ( size_t ) self );
-        uint64_t idx = ticket -> info [ 0 ] ^ ( size_t ) task;
-        idx ^= ( size_t ) self;
-
-        /* go into queue */
-        rc = KLockAcquire ( self -> cleanup_lock );
-        if ( rc == 0 )
-        {
-            KCleanupTaskQueue *cleanup = self -> cleanup;
-            if ( self -> cleanup == NULL )
-                rc = RC ( rcPS, rcQueue, rcRemoving, rcItem, rcNotFound );
-            else if ( idx < cleanup -> start )
-                rc = RC ( rcPS, rcQueue, rcRemoving, rcItem, rcNotFound );
-            else
-            {
-                idx -= cleanup -> start;
-                if ( idx >= cleanup -> count )
-                    rc = RC ( rcPS, rcQueue, rcRemoving, rcItem, rcNotFound );
-                else if ( cleanup -> q [ idx ] != task )
-                    rc = RC ( rcPS, rcQueue, rcRemoving, rcItem, rcNotFound );
-                else
-                {
-                    cleanup -> q [ idx ] = NULL;
-                }
-            }
-
-            KLockUnlock ( self -> cleanup_lock );
-        }
-
-        if ( rc == 0 )
-            KTaskRelease ( task );
-    }
-
-    return rc;
-}
diff --git a/libs/kproc/queue.c b/libs/kproc/queue.c
deleted file mode 100644
index 205079f..0000000
--- a/libs/kproc/queue.c
+++ /dev/null
@@ -1,428 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/q-extern.h>
-#include <kproc/queue.h>
-#include <kproc/timeout.h>
-#include <kproc/lock.h>
-#include <kproc/sem.h>
-#include <klib/out.h>
-#include <klib/status.h>
-#include <klib/rc.h>
-#include <atomic32.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-
-#if _DEBUGGING && 0
-#define QMSG( msg, ... ) \
-    KOutMsg ( msg, __VA_ARGS__ )
-#else
-#define QMSG( msg, ... ) \
-    ( void ) 0
-#endif
-
-/*--------------------------------------------------------------------------
- * KQueue
- *  a simple thread-safe queue structure supporting push/pop operation
- *  makes use of semaphore objects for synchronization
- */
-struct KQueue
-{
-    KSemaphore *rc;
-    KSemaphore *wc;
-
-    KLock *rl;
-    KLock *wl;
-
-    uint32_t capacity;
-    uint32_t bmask, imask;
-    volatile uint32_t read, write;
-    atomic32_t refcount;
-    volatile bool sealed;
-    uint8_t align [ 7 ];
-    void *buffer [ 16 ];
-};
-
-
-/* Whack
- */
-static
-rc_t KQueueWhack ( KQueue *self )
-{
-    rc_t rc;
-    QMSG ( "%s: releasing write semaphore\n", __func__ );
-    rc = KSemaphoreRelease ( self -> wc );
-    if ( rc == 0 )
-    {
-        QMSG ( "%s: releasing read semaphore\n", __func__ );
-        KSemaphoreRelease ( self -> rc );
-        QMSG ( "%s: releasing write lock\n", __func__ );
-        KLockRelease ( self -> wl );
-        QMSG ( "%s: releasing read lock\n", __func__ );
-        KLockRelease ( self -> rl );
-        free ( self );
-        QMSG ( "%s: done\n", __func__ );
-    }
-    return rc;
-}
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KQueueAddRef ( const KQueue *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KQueue* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KQueueRelease ( const KQueue *cself )
-{
-    KQueue *self = ( KQueue* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-            return KQueueWhack ( self );
-    }
-    return 0;
-}
-
-/* Make
- * create an empty queue object
- *
- *  "capacity" [ IN ] - minimum queue length
- *  always expands to a power of 2, i.e. providing
- *  a length of 10 will result in a length of 16.
- */
-LIB_EXPORT rc_t CC KQueueMake ( KQueue **qp, uint32_t capacity )
-{
-    rc_t rc;
-    if ( qp == NULL )
-        rc = RC ( rcCont, rcQueue, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KQueue *q;
-
-        uint32_t cap = 1;
-        while ( cap < capacity )
-            cap += cap;
-
-        q = malloc ( sizeof * q - sizeof q -> buffer + cap * sizeof q -> buffer [ 0 ] );
-        if ( q == NULL )
-            rc = RC ( rcCont, rcQueue, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KSemaphoreMake ( & q -> rc, 0 );
-            if ( rc == 0 )
-            {
-                rc = KSemaphoreMake ( & q -> wc, cap );
-                if ( rc == 0 )
-                {
-                    rc = KLockMake ( & q -> rl );
-                    if ( rc == 0 )
-                    {
-                        rc = KLockMake ( & q -> wl );
-                        if ( rc == 0 )
-                        {
-                            q -> capacity = cap;
-                            q -> bmask = cap - 1;
-                            q -> imask = ( cap + cap ) - 1;
-                            q -> read = q -> write = 0;
-                            atomic32_set ( & q -> refcount, 1 );
-                            q -> sealed = false;
-
-                            QMSG ( "%s: created queue with capacity %u, "
-                                   "bmask %#032b, imask %#032b.\n"
-                                   , __func__, q -> capacity, q -> bmask, q -> imask
-                                );
-
-                            * qp = q;
-                            return 0;
-                        }
-
-                        KLockRelease ( q -> rl );
-                    }
-
-                    KSemaphoreRelease ( q -> wc );
-                }
-
-                KSemaphoreRelease ( q -> rc );
-            }
-            free ( q );
-        }
-        * qp = NULL;
-    }
-    return rc;
-}
-
-/* Push
- *  add an object to the queue
- *
- *  "item" [ IN, OPAQUE ] - pointer to item being queued
- *
- *  "tm" [ IN, NULL OKAY ] - pointer to system specific timeout
- *  structure. if the queue is full, wait for indicated period
- *  of time for space to become available, or return status
- *  code indicating a timeout. when NULL and queue is full,
- *  Push will time out immediately and return status code.
- */
-LIB_EXPORT rc_t CC KQueuePush ( KQueue *self, const void *item, timeout_t *tm )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcCont, rcQueue, rcInserting, rcSelf, rcNull );
-    if ( self -> sealed )
-    {
-        QMSG ( "%s: failed to insert into queue due to seal\n", __func__ );
-        return RC ( rcCont, rcQueue, rcInserting, rcQueue, rcReadonly );
-    }
-    if ( item == NULL )
-        return RC ( rcCont, rcQueue, rcInserting, rcParam, rcNull );
-
-    QMSG ( "%s: acquiring write lock ( %p )...\n", __func__, self -> wl );
-    rc = KLockAcquire ( self -> wl );
-    QMSG ( "%s: ...done, rc = %R\n", __func__, rc );
-    if ( rc == 0 )
-    {
-        QMSG ( "%s: waiting on write semaphore...\n", __func__ );
-        rc = KSemaphoreTimedWait ( self -> wc, self -> wl, tm );
-        QMSG ( "%s: ...done, rc = %R.\n", __func__, rc );
-
-        if ( rc == 0 )
-        {
-            uint32_t w;
-
-            /* re-check the seal */
-            if ( self -> sealed )
-            {
-                QMSG ( "%s: queue has been sealed\n", __func__ );
-
-                /* not a disaster if semaphore not signaled */
-                QMSG ( "%s: signaling write semaphore\n", __func__ );
-                KSemaphoreSignal ( self -> wc );
-                QMSG ( "%s: unlocking write lock\n", __func__ );
-                KLockUnlock ( self -> wl );
-
-                QMSG ( "%s: failed to insert into queue due to seal\n", __func__ );
-                return RC ( rcCont, rcQueue, rcInserting, rcQueue, rcReadonly );
-            }
-
-            /* insert item */
-            w = self -> write & self -> imask;
-            QMSG ( "%s: write index is %u, masked against 0x%x\n", __func__, w, self -> imask );
-            self -> buffer [ w & self -> bmask ] = ( void* ) item;
-            QMSG ( "%s: inserted item into buffer [ %u ], using mask 0x%x\n", __func__, w & self -> bmask, self -> bmask );
-            self -> write = w + 1;
-
-            QMSG ( "%s: unlocking write lock ( %p ).\n", __func__, self -> wl );
-            KLockUnlock ( self -> wl );
-
-            /* let listeners know about item */
-            QMSG ( "%s: acquiring read lock ( %p )\n", __func__, self -> rl );
-            if ( KLockAcquire ( self -> rl ) == 0 )
-            {
-                QMSG ( "%s: signaling read semaphore\n", __func__ );
-                KSemaphoreSignal ( self -> rc );
-                QMSG ( "%s: unlocking read lock ( %p )\n", __func__, self -> rl );
-                KLockUnlock ( self -> rl );
-            }
-        }
-        else
-        {
-            QMSG ( "%s: unlocking write lock ( %p ).\n", __func__, self -> wl );
-            KLockUnlock ( self -> wl );
-
-            if ( self -> sealed )
-            {
-                switch ( ( int ) GetRCObject ( rc ) )
-                {
-                case ( int ) rcTimeout:
-                case ( int ) rcSemaphore:
-                    rc = RC ( rcCont, rcQueue, rcInserting, rcQueue, rcReadonly );
-                    QMSG ( "%s: resetting rc to %R\n", __func__, rc );
-                    break;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* Pop
- *  pop an object from queue
- *
- *  "item" [ OUT, OPAQUE* ] - return parameter for popped item
- *
- *  "tm" [ IN, NULL OKAY ] - pointer to system specific timeout
- *  structure. if the queue is empty, wait for indicated period
- *  of time for an object to become available, or return status
- *  code indicating a timeout. when NULL and queue is empty,
- *  Pop will time out immediately and return status code.
- */
-LIB_EXPORT rc_t CC KQueuePop ( KQueue *self, void **item, timeout_t *tm )
-{
-    rc_t rc;
-
-    if ( item == NULL )
-        rc = RC ( rcCont, rcQueue, rcRemoving, rcParam, rcNull );
-    else
-    {
-        * item = NULL;
-
-        if ( self == NULL )
-            rc = RC ( rcCont, rcQueue, rcRemoving, rcSelf, rcNull );
-        else
-        {
-            QMSG ( "%s: acquiring read lock ( %p )\n", __func__, self -> rl );
-            rc = KLockAcquire ( self -> rl );
-            if ( rc == 0 )
-            {
-                QMSG ( "%s: waiting on read semaphore...\n", __func__ );
-                rc = KSemaphoreTimedWait ( self -> rc, self -> rl, self -> sealed ? NULL : tm );
-                QMSG ( "%s: ...done, rc = %R.\n", __func__, rc );
-
-                if ( rc == 0 )
-                {
-                    uint32_t r, idx;
-
-                    /* got an element */
-                    QMSG ( "%s: asserting  self -> read ( %u ) != self -> write ( %u )\n",
-                           __func__, self -> read, self -> write
-                        );
-                    assert ( self -> read != self -> write );
-
-                    /* read element */
-                    r = self -> read & self -> imask;
-                    QMSG ( "%s: read index is %u, masked against 0x%x\n", __func__, r, self -> imask );
-                    idx = r & self -> bmask;
-                    * item = self -> buffer [ idx ];
-                    QMSG ( "%s: read item from buffer [ %u ], using mask 0x%x\n", __func__, idx, self -> bmask );
-                    self -> buffer [ idx ] = NULL;
-                    self -> read = r + 1;
-
-                    QMSG ( "%s: unlocking read lock. ( %p )\n", __func__, self -> rl );
-                    KLockUnlock ( self -> rl );
-
-                    /* let write know there's a free slot available */
-                    QMSG ( "%s: acquiring write lock ( %p )\n", __func__, self -> wl );
-                    if ( KLockAcquire ( self -> wl ) == 0 )
-                    {
-                        QMSG ( "%s: signaling write semaphore\n", __func__ );
-                        KSemaphoreSignal ( self -> wc );
-                        QMSG ( "%s: unlocking write lock ( %p )\n", __func__, self -> wl );
-                        KLockUnlock ( self -> wl );
-                    }
-                }
-                else
-                {
-                    QMSG ( "%s: unlocking read lock. ( %p )\n", __func__, self -> rl );
-                    KLockUnlock ( self -> rl );
-
-                    if ( self -> sealed )
-                    {
-                        switch ( ( int ) GetRCObject ( rc ) )
-                        {
-                        case ( int ) rcTimeout:
-                        case ( int ) rcSemaphore:
-                            rc = RC ( rcCont, rcQueue, rcRemoving, rcData, rcDone );
-                            QMSG ( "%s: resetting rc to %R\n", __func__, rc );
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* Sealed
- *  ask if the queue has been closed off
- *  meaning there will be no further push operations
- *
- *  NB - if "self" is NULL, the return value is "true"
- *  since a NULL queue cannot accept items via push
- */
-LIB_EXPORT bool CC KQueueSealed ( const KQueue *self )
-{
-    QMSG ( "%s called\n", __func__ );
-    if ( self != NULL )
-        return self -> sealed;
-    return false;
-}
-
-
-/* Seal
- *  indicate that the queue has been closed off
- *  meaning there will be no further push operations
- *  if "writes" is true, and no further pop operations
- *  otherwise.
- */
-LIB_EXPORT rc_t CC KQueueSeal ( KQueue *self )
-{
-    rc_t rc = 0;
-
-    QMSG ( "%s called\n", __func__ );
-
-    if ( self == NULL )
-        return RC ( rcCont, rcQueue, rcFreezing, rcSelf, rcNull );
-
-    self -> sealed = true;
-
-#if 1
-    QMSG ( "%s: acquiring write lock ( %p )\n", __func__, self -> wl );
-    rc = KLockAcquire ( self -> wl );
-    if ( rc == 0 )
-    {
-        QMSG ( "%s: canceling write semaphore...\n", __func__ );
-        rc = KSemaphoreCancel ( self -> wc );
-        QMSG ( "%s: ...done, rc = %R.\n", __func__, rc );
-        KLockUnlock ( self -> wl );
-
-        if ( rc == 0 )
-        {
-            QMSG ( "%s: acquiring read lock ( %p )\n", __func__, self -> rl );
-            rc = KLockAcquire ( self -> rl );
-            if ( rc == 0 )
-            {
-                QMSG ( "%s: canceling read semaphore...\n", __func__ );
-                rc = KSemaphoreCancel ( self -> rc );
-                QMSG ( "%s: ...done, rc = %R.\n", __func__, rc );
-                KLockUnlock ( self -> rl );
-            }
-        }
-    }
-#endif
-
-    return rc;
-}
diff --git a/libs/kproc/sem.c b/libs/kproc/sem.c
deleted file mode 100644
index b728818..0000000
--- a/libs/kproc/sem.c
+++ /dev/null
@@ -1,472 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "syscond-priv.h"
-#include <kproc/extern.h>
-#include <kproc/sem.h>
-#include <kproc/cond.h>
-#include <klib/out.h>
-#include <klib/status.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <stdlib.h>
-
-#if _DEBUGGING && 0
-#define SMSG( msg, ... ) \
-    KOutMsg ( msg, __VA_ARGS__ )
-#else
-#define SMSG( msg, ... ) \
-    ( void ) 0
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KSemaphore
- *  a metering device
- */
-struct KSemaphore
-{
-    volatile uint64_t avail;
-    volatile uint64_t requested;
-    volatile uint64_t min_requested;
-    KCondition* cond;
-    volatile uint32_t waiting;
-    volatile bool uniform;
-    volatile bool canceled;
-};
-
-
-/* Whack
- */
-static
-rc_t KSemaphoreWhack ( KSemaphore *self )
-{
-    rc_t rc;
-
-    if ( self -> waiting != 0 )
-        return RC ( rcPS, rcSemaphore, rcDestroying, rcSemaphore, rcBusy );
-
-    rc = KConditionRelease ( self -> cond );
-    if ( rc != 0 )
-        return ResetRCContext ( rc, rcPS, rcSemaphore, rcDestroying );
-
-    free ( self );
-    return 0;
-}
-
-
-/* Make
- *
- *  "count" [ IN ] - initial count value
- */
-LIB_EXPORT rc_t CC KSemaphoreMake ( KSemaphore **semp, uint64_t count )
-{
-    rc_t rc;
-    if ( semp == NULL )
-        rc = RC ( rcPS, rcSemaphore, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KSemaphore *sem = calloc ( 1, sizeof * sem );
-        if ( sem == NULL )
-            rc = RC ( rcPS, rcSemaphore, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KConditionMake( & sem -> cond );
-            if ( rc == 0 )
-            {
-                sem -> avail = count;
-                * semp = sem;
-                return 0;
-            }
-
-            free ( sem );
-        }
-
-        * semp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KSemaphoreAddRef ( const KSemaphore *cself )
-{
-    if ( cself != NULL )
-        return KConditionAddRef ( cself -> cond );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KSemaphoreRelease ( const KSemaphore *cself )
-{
-    if ( cself != NULL )
-    {
-        if ( KConditionDropRef ( cself -> cond ) )
-            return KSemaphoreWhack ( ( KSemaphore* ) cself );
-    }
-    return 0;
-}
-
-
-/* Wait
- *  block until a count becomes available
- *
- *  "lock" [ IN ] - externally acquired lock
- */
-LIB_EXPORT rc_t CC KSemaphoreWait ( KSemaphore *self, struct KLock *lock )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcSemaphore, rcWaiting, rcSelf, rcNull );
-
-    if ( self -> avail == 0 )
-    {
-        if ( ++ self -> waiting == 1 )
-        {
-            self -> requested = self -> min_requested = 1;
-            self -> uniform = true;
-        }
-        else if ( self -> requested != 1 )
-        {
-            self -> min_requested = 1;
-            self -> uniform = false;
-        }
-
-        do
-        {
-            rc_t rc;
-
-            if ( self -> canceled )
-            {
-                SMSG ( "%s[%p]: wait was canceled - decrementing wait count\n", __func__, self );
-                -- self -> waiting;
-                return RC ( rcPS, rcSemaphore, rcWaiting, rcSemaphore, rcCanceled );
-            }
-
-            rc = KConditionWait ( self -> cond, lock );
-            if ( rc != 0 )
-            {
-                -- self -> waiting;
-                return ResetRCContext ( rc, rcPS, rcSemaphore, rcWaiting );
-            }
-        }
-        while ( self -> avail == 0 );
-
-        -- self -> waiting;
-    }
-
-    -- self -> avail;
-    return 0;
-}
-
-/* TimedWait
- *  block until a count becomes available
- *
- *  "lock" [ IN ] - externally acquired lock
- *
- *  "tm" [ IN, NULL OKAY ] - optional timeout where
- *  NULL means timeout value of 0
- */
-LIB_EXPORT rc_t CC KSemaphoreTimedWait ( KSemaphore *self,
-    struct KLock *lock, struct timeout_t *tm )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcSemaphore, rcWaiting, rcSelf, rcNull );
-
-    if ( self -> avail == 0 )
-    {
-        SMSG ( "%s[%p]: avail == 0\n", __func__, self );
-        if ( tm == NULL )
-        {
-            SMSG ( "%s[%p]: non-blocking mode - return timeout exhausted\n", __func__, self );
-            return RC ( rcPS, rcSemaphore, rcWaiting, rcTimeout, rcExhausted );
-        }
-
-        if ( ++ self -> waiting == 1 )
-        {
-            SMSG ( "%s[%p]: first waiter\n", __func__, self );
-            self -> requested = self -> min_requested = 1;
-            self -> uniform = true;
-        }
-        else if ( self -> requested != 1 )
-        {
-            SMSG ( "%s[%p]: multiple waiters ( %u )\n", __func__, self, self -> waiting );
-            self -> min_requested = 1;
-            self -> uniform = false;
-        }
-
-        do
-        {
-            rc_t rc;
-
-            if ( self -> canceled )
-            {
-                SMSG ( "%s[%p]: wait was canceled - decrementing wait count\n", __func__, self );
-                -- self -> waiting;
-                return RC ( rcPS, rcSemaphore, rcWaiting, rcSemaphore, rcCanceled );
-            }
-
-            SMSG ( "%s[%p]: wait on condition...\n", __func__, self );
-            rc = KConditionTimedWait ( self -> cond, lock, tm );
-            SMSG ( "%s[%p]:...done, rc = %R\n", __func__, self, rc );
-            if ( rc != 0 )
-            {
-                SMSG ( "%s[%p]: timed out - decrementing wait count\n", __func__, self );
-                -- self -> waiting;
-                return ResetRCContext ( rc, rcPS, rcSemaphore, rcWaiting );
-            }
-
-            SMSG ( "%s[%p]: condition signaled - avail = %lu\n", __func__, self, self -> avail );
-        }
-        while ( self -> avail == 0 );
-
-        SMSG ( "%s[%p]: finished waiting\n", __func__, self );
-        -- self -> waiting;
-    }
-
-    SMSG ( "%s[%p]: decrementing count from %lu\n", __func__, self, self -> avail );
-    -- self -> avail;
-    return 0;
-}
-
-
-/* Cancel
- *  signal that the count will never increase
- */
-LIB_EXPORT rc_t CC KSemaphoreCancel ( KSemaphore *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcSemaphore, rcSignaling, rcSelf, rcNull );
-
-    self -> canceled = true;
-
-    if ( self -> waiting != 0 )
-    {
-        SMSG ( "%s[%p]: canceling %u waiters\n", __func__, self, self -> waiting );
-        return KConditionBroadcast ( self -> cond );
-    }
-
-    SMSG ( "%s[%p]: cancel request ( no waiters )\n", __func__, self );
-    return 0;
-}
-
-
-/* Signal
- *  signal that a count has become available
- */
-LIB_EXPORT rc_t CC KSemaphoreSignal ( KSemaphore *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcSemaphore, rcSignaling, rcSelf, rcNull );
-
-    if ( self -> canceled )
-        return RC ( rcPS, rcSemaphore, rcSignaling, rcSemaphore, rcCanceled );
-
-    ++ self -> avail;
-    if ( self -> waiting != 0 && self -> avail >= self -> min_requested )
-    {
-        /* whacky logic
-           - if everyone has requested the same amount
-           - and only one request can be satisfied
-           - then signal. otherwise, broadcast */
-        if ( self -> uniform && self -> avail / self -> min_requested == 1 )
-            return KConditionSignal ( self -> cond );
-        return KConditionBroadcast ( self -> cond );
-    }
-
-    return 0;
-}
-
-
-/* Alloc
- *  allocate a count
- *  used for resource metering
- *
- *  "lock" [ IN ] - externally acquired lock
- *
- *  "count" [ IN ] - the resource count
- */
-LIB_EXPORT rc_t CC KSemaphoreAlloc ( KSemaphore *self,
-    struct KLock *lock, uint64_t count )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcSemaphore, rcWaiting, rcSelf, rcNull );
-
-    if ( self -> avail < count )
-    {
-        if ( ++ self -> waiting == 1 )
-        {
-            self -> requested = self -> min_requested = count;
-            self -> uniform = true;
-        }
-        else if ( self -> requested != count )
-        {
-            if ( self -> min_requested > count )
-                self -> min_requested = count;
-            self -> uniform = false;
-        }
-
-        do
-        {
-            rc_t rc;
-
-            if ( self -> canceled )
-            {
-                -- self -> waiting;
-                return RC ( rcPS, rcSemaphore, rcWaiting, rcSemaphore, rcCanceled );
-            }
-
-            rc = KConditionWait ( self -> cond, lock );
-            if ( rc != 0 )
-            {
-                -- self -> waiting;
-                return ResetRCContext ( rc, rcPS, rcSemaphore, rcWaiting );
-            }
-        }
-        while ( self -> avail < count );
-
-        -- self -> waiting;
-    }
-
-    self -> avail -= count;
-    return 0;
-}
-
-/* TimedAlloc
- *  allocate a count
- *  used for resource metering
- *
- *  "lock" [ IN ] - externally acquired lock
- *
- *  "count" [ IN ] - the resource count
- *
- *  "tm" [ IN, NULL OKAY ] - optional timeout where
- *  NULL means timeout value of 0
- */
-LIB_EXPORT rc_t CC KSemaphoreTimedAlloc ( KSemaphore *self,
-    struct KLock *lock, uint64_t count, struct timeout_t *tm )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcSemaphore, rcWaiting, rcSelf, rcNull );
-
-    if ( self -> avail < count )
-    {
-        if ( tm == NULL )
-            return RC ( rcPS, rcSemaphore, rcWaiting, rcTimeout, rcExhausted );
-
-        if ( ++ self -> waiting == 1 )
-        {
-            self -> requested = self -> min_requested = count;
-            self -> uniform = true;
-        }
-        else if ( self -> requested != count )
-        {
-            if ( self -> min_requested > count )
-                self -> min_requested = count;
-            self -> uniform = false;
-        }
-
-        do
-        {
-            rc_t rc;
-
-            if ( self -> canceled )
-            {
-                -- self -> waiting;
-                return RC ( rcPS, rcSemaphore, rcWaiting, rcSemaphore, rcCanceled );
-            }
-
-            rc = KConditionTimedWait ( self -> cond, lock, tm );
-            if ( rc != 0 )
-            {
-                -- self -> waiting;
-                return ResetRCContext ( rc, rcPS, rcSemaphore, rcWaiting );
-            }
-        }
-        while ( self -> avail < count );
-
-        -- self -> waiting;
-    }
-
-    self -> avail -= count;
-    return 0;
-}
-
-
-/* Free
- *  signal that resources have become available
- */
-LIB_EXPORT rc_t CC KSemaphoreFree ( KSemaphore *self, uint64_t count )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcSemaphore, rcSignaling, rcSelf, rcNull );
-
-    if ( self -> canceled )
-        return RC ( rcPS, rcSemaphore, rcSignaling, rcSemaphore, rcCanceled );
-
-    self -> avail += count;
-    if ( self -> waiting != 0 && self -> avail >= self -> min_requested )
-    {
-        /* whacky logic
-           - if everyone has requested the same amount
-           - and only one request can be satisfied
-           - then signal. otherwise, broadcast */
-        if ( self -> uniform && self -> avail / self -> min_requested == 1 )
-            return KConditionSignal ( self -> cond );
-        return KConditionBroadcast ( self -> cond );
-    }
-
-    return 0;
-}
-
-
-/* Count
- *  request the current resource usage
- *  valid only within lock
- *
- *  "count" [ OUT ] - return parameter for current count
- */
-LIB_EXPORT rc_t CC KSemaphoreCount ( const KSemaphore *self, uint64_t *count )
-{
-    rc_t rc;
-    if ( count == NULL )
-        rc = RC ( rcPS, rcSemaphore, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcPS, rcSemaphore, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * count = self -> avail;
-            return 0;
-        }
-
-        * count = 0;
-    }
-    return rc;
-}
diff --git a/libs/kproc/stbarrier.c b/libs/kproc/stbarrier.c
deleted file mode 100644
index 56b621b..0000000
--- a/libs/kproc/stbarrier.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-#include <kproc/barrier.h>
-#include <klib/rc.h>
-#include <atomic32.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-
-/*--------------------------------------------------------------------------
- * KBarrier
- *  a thread synchronization device
- *  detains all callers until the required number has been reached
- */
-struct KBarrier
-{
-    atomic32_t refcount;
-    uint32_t barrier;
-    uint32_t count;
-};
-
-
-/* Whack
- */
-static
-rc_t KBarrierWhack ( KBarrier *self )
-{
-    free ( self );
-    return 0;
-}
-
-
-/* Make
- *  create a barrier
- *
- *  "count" [ IN ] - the number of threads to block
- */
-LIB_EXPORT rc_t CC KBarrierMake ( KBarrier **bp, uint32_t count )
-{
-    rc_t rc;
-    if ( bp == NULL )
-        rc = RC ( rcPS, rcBarrier, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KBarrier *b = malloc ( sizeof * b );
-        if ( b == NULL )
-            rc = RC ( rcPS, rcBarrier, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            atomic32_set ( & b -> refcount, 1 );
-            b -> barrier = count;
-            b -> count = 0;
-            * bp = b;
-            return 0;
-        }
-
-        * bp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KBarrierAddRef ( const KBarrier *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KBarrier* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KBarrierRelease ( const KBarrier *cself )
-{
-    KBarrier *self = ( KBarrier* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KBarrierWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* Wait
- *  block until the required number of callers has been reached
- */
-LIB_EXPORT rc_t CC KBarrierWait ( KBarrier *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcBarrier, rcWaiting, rcSelf, rcNull );
-
-    if ( ++ self -> count < self -> barrier )
-    {
-        -- self -> count;
-        return RC ( rcPS, rcBarrier, rcWaiting, rcThread, rcDeadlock );
-    }
-
-    return 0;
-}
diff --git a/libs/kproc/stcond.c b/libs/kproc/stcond.c
deleted file mode 100644
index 79084bf..0000000
--- a/libs/kproc/stcond.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <kproc/extern.h>
-#include <kproc/cond.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <stdlib.h>
-
-
-/*--------------------------------------------------------------------------
- * KCondition
- *  a POSIX-style condition object
- */
-struct KCondition
-{
-    atomic32_t refcount;
-};
-
-
-/* Whack
- */
-static
-rc_t KConditionWhack ( KCondition *self )
-{
-    free ( self );
-    return 0;
-}
-
-
-/* Make
- *  create a condition
- */
-LIB_EXPORT rc_t CC KConditionMake ( KCondition **condp )
-{
-    rc_t rc;
-    if ( condp == NULL )
-        rc = RC ( rcPS, rcCondition, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KCondition *cond = malloc ( sizeof * cond );
-        if ( cond == NULL )
-            rc = RC ( rcPS, rcCondition, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            atomic32_set ( & cond -> refcount, 1 );
-            * condp = cond;
-            return 0;
-        }
-
-        * condp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KConditionAddRef ( const KCondition *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KCondition* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KConditionRelease ( const KCondition *cself )
-{
-    KCondition *self = ( KCondition* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-            return KConditionWhack ( self );
-    }
-    return 0;
-}
-
-
-/* Wait
- *  block on external lock until signaled
- */
-LIB_EXPORT rc_t CC KConditionWait ( KCondition *self, struct KLock *lock )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcCondition, rcWaiting, rcSelf, rcNull );
-    if ( lock == NULL )
-        return RC ( rcPS, rcCondition, rcWaiting, rcLock, rcNull );
-
-    return RC ( rcPS, rcCondition, rcWaiting, rcThread, rcDeadlock );
-}
-
-LIB_EXPORT rc_t CC KConditionTimedWait ( KCondition *self, struct KLock *lock, struct timeout_t *tm )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcCondition, rcWaiting, rcSelf, rcNull );
-    if ( lock == NULL )
-        return RC ( rcPS, rcCondition, rcWaiting, rcLock, rcNull );
-    if ( tm == NULL )
-        return RC ( rcPS, rcCondition, rcWaiting, rcTimeout, rcNull );
-
-    return RC ( rcPS, rcCondition, rcWaiting, rcThread, rcDeadlock );
-}
-
-
-/* Signal
- *  signal waiting threads
- *  awaken at most a single thread
- */
-LIB_EXPORT rc_t CC KConditionSignal ( KCondition *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcCondition, rcSignaling, rcSelf, rcNull );
-
-    return RC ( rcPS, rcCondition, rcSignaling, rcThread, rcDeadlock );
-}
-
-
-/* Broadcast
- *  signal waiting threads
- *  awaken all waiting thread
- */
-LIB_EXPORT rc_t CC KConditionBroadcast ( KCondition *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcCondition, rcSignaling, rcSelf, rcNull );
-
-    return RC ( rcPS, rcCondition, rcSignaling, rcThread, rcDeadlock );
-}
diff --git a/libs/kproc/stlock.c b/libs/kproc/stlock.c
deleted file mode 100644
index dc5a961..0000000
--- a/libs/kproc/stlock.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <kproc/extern.h>
-#include <kproc/lock.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <stdlib.h>
-
-/*--------------------------------------------------------------------------
- * KLock
- *  a POSIX-style mutual exclusion lock
- */
-struct KLock
-{
-    atomic32_t refcount;
-    int32_t count;
-};
-
-
-/* Whack
- */
-static
-rc_t KLockWhack ( KLock *self )
-{
-    if ( self -> count > 0 )
-        return RC ( rcPS, rcLock, rcDestroying, rcLock, rcBusy );
-
-    free ( self );
-    return 0;
-}
-
-
-/* Make
- *  make a simple mutex
- */
-LIB_EXPORT rc_t CC KLockMake ( KLock **lockp )
-{
-    rc_t rc;
-    if ( lockp == NULL )
-        rc = RC ( rcPS, rcLock, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KLock *lock = malloc ( sizeof * lock );
-        if ( lock == NULL )
-            rc = RC ( rcPS, rcLock, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            atomic32_set ( & lock -> refcount, 1 );
-            lock -> count = 0;
-            * lockp = lock;
-            return 0;
-        }
-
-        * lockp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KLockAddRef ( const KLock *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KLock* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLockRelease ( const KLock *cself )
-{
-    KLock *self = ( KLock* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KLockWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* Acquire
- *  acquires lock
- */
-LIB_EXPORT rc_t CC KLockAcquire ( KLock *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcLocking, rcSelf, rcNull );
-
-    ++ self -> count;
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLockTimedAcquire ( KLock *self, struct timeout_t *tm )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcLocking, rcSelf, rcNull );
-
-    ++ self -> count;
-
-    return 0;
-}
-
-/* Unlock
- *  releases lock
- */
-LIB_EXPORT rc_t CC KLockUnlock ( KLock *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcUnlocking, rcSelf, rcNull );
-
-    /* pthread_mutex_unlock's man page states that the only
-       unlock error we could see is that another thread tries
-       to release a lock. what if the lock is not locked? */
-    if ( self -> count <= 0 )
-        return RC ( rcPS, rcLock, rcUnlocking, rcThread, rcIncorrect );
-
-    -- self -> count;
-
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * KRWLock
- *  a POSIX-style read/write lock
- */
-struct KRWLock
-{
-    atomic32_t refcount;
-    int32_t count;
-};
-
-
-/* Whack
- */
-static
-rc_t KRWLockWhack ( KRWLock *self )
-{
-    if ( self -> count != 0 )
-        return RC ( rcPS, rcRWLock, rcDestroying, rcRWLock, rcBusy );
-
-    free ( self );
-    return 0;
-}
-
-
-/* Make
- *  make a simple read/write lock
- */
-LIB_EXPORT rc_t CC KRWLockMake ( KRWLock **lockp )
-{
-    rc_t rc;
-
-    if ( lockp == NULL )
-        rc = RC ( rcPS, rcRWLock, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KRWLock *lock = malloc ( sizeof * lock );
-        if ( lock == NULL )
-            rc = RC ( rcPS, rcRWLock, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            atomic32_set ( & lock -> refcount, 1 );
-            lock -> count = 0;
-            * lockp = lock;
-            return 0;
-        }
-
-        * lockp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KRWLockAddRef ( const KRWLock *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KRWLock* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KRWLockRelease ( const KRWLock *cself )
-{
-    KRWLock *self = ( KRWLock* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KRWLockWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* AcquireShared
- *  acquires read ( shared ) lock
- */
-LIB_EXPORT rc_t CC KRWLockAcquireShared ( KRWLock *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    if ( self -> count < 0 )
-        return RC ( rcPS, rcRWLock, rcLocking, rcThread, rcDeadlock );
-
-    ++ self -> count;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KRWLockTimedAcquireShared ( KRWLock *self, struct timeout_t *tm )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    if ( self -> count < 0 )
-    {
-        if ( tm == NULL )
-            return RC ( rcPS, rcLock, rcLocking, rcRWLock, rcBusy );
-        return RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcExhausted );
-    }
-
-    ++ self -> count;
-    return 0;
-}
-
-
-/* AcquireExcl
- *  acquires write ( exclusive ) lock
- */
-LIB_EXPORT rc_t CC KRWLockAcquireExcl ( KRWLock *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    if ( self -> count != 0 )
-        return RC ( rcPS, rcRWLock, rcLocking, rcThread, rcDeadlock );
-
-    -- self -> count;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KRWLockTimedAcquireExcl ( KRWLock *self, struct timeout_t *tm )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    if ( self -> count != 0 )
-    {
-        if ( tm == NULL )
-            return RC ( rcPS, rcLock, rcLocking, rcRWLock, rcBusy );
-        return RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcExhausted );
-    }
-
-    -- self -> count;
-    return 0;
-}
-
-
-/* Unlock
- *  releases lock
- */
-LIB_EXPORT rc_t CC KRWLockUnlock ( KRWLock *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcUnlocking, rcSelf, rcNull );
-
-    if ( self -> count < 0 )
-        self -> count = 0;
-    else if ( self -> count > 0 )
-        -- self -> count;
-    else
-        return RC ( rcPS, rcRWLock, rcUnlocking, rcThread, rcIncorrect );
-
-    return 0;
-}
diff --git a/libs/kproc/stsem.c b/libs/kproc/stsem.c
deleted file mode 100644
index 458c9ce..0000000
--- a/libs/kproc/stsem.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-#include <kproc/sem.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <stdlib.h>
-
-
-/*--------------------------------------------------------------------------
- * KSemaphore
- *  a metering device
- */
-struct KSemaphore
-{
-    uint64_t avail;
-    atomic32_t refcount;
-};
-
-
-/* Whack
- */
-static
-rc_t KSemaphoreWhack ( KSemaphore *self )
-{
-    free ( self );
-    return 0;
-}
-
-
-/* Make
- *
- *  "count" [ IN ] - initial count value
- */
-LIB_EXPORT rc_t CC KSemaphoreMake ( KSemaphore **semp, uint64_t count )
-{
-    rc_t rc;
-    if ( semp == NULL )
-        rc = RC ( rcPS, rcSemaphore, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KSemaphore *sem = malloc ( sizeof * sem );
-        if ( sem == NULL )
-            rc = RC ( rcPS, rcSemaphore, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            sem -> avail = count;
-            atomic32_set ( & sem -> refcount, 1 );
-            * semp = sem;
-            return 0;
-        }
-
-        * semp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KSemaphoreAddRef ( const KSemaphore *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KSemaphore* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KSemaphoreRelease ( const KSemaphore *cself )
-{
-    KSemaphore *self = ( KSemaphore* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-            return KSemaphoreWhack ( self );
-    }
-    return 0;
-}
-
-
-/* Wait
- *  block until a count becomes available
- *
- *  "lock" [ IN ] - externally acquired lock
- */
-LIB_EXPORT rc_t CC KSemaphoreWait ( KSemaphore *self, struct KLock *lock )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcSemaphore, rcWaiting, rcSelf, rcNull );
-
-    if ( self -> avail == 0 )
-        return RC ( rcPS, rcSemaphore, rcWaiting, rcThread, rcDeadlock );
-
-    -- self -> avail;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KSemaphoreTimedWait ( KSemaphore *self,
-    struct KLock *lock, struct timeout_t *tm )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcSemaphore, rcWaiting, rcSelf, rcNull );
-
-    if ( self -> avail == 0 )
-    {
-        if ( tm == NULL )
-            return RC ( rcPS, rcSemaphore, rcWaiting, rcTimeout, rcNull );
-
-        return RC ( rcPS, rcSemaphore, rcWaiting, rcThread, rcDeadlock );
-    }
-
-    -- self -> avail;
-    return 0;
-}
-
-
-/* Signal
- *  signal that a count has become available
- */
-LIB_EXPORT rc_t CC KSemaphoreSignal ( KSemaphore *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcSemaphore, rcSignaling, rcSelf, rcNull );
-
-    ++ self -> avail;
-    return 0;
-}
-
-
-/* Alloc
- *  allocate a count
- *  used for resource metering
- *
- *  "lock" [ IN ] - externally acquired lock
- *
- *  "count" [ IN ] - the resource count
- */
-LIB_EXPORT rc_t CC KSemaphoreAlloc ( KSemaphore *self,
-    struct KLock *lock, uint64_t count )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcSemaphore, rcWaiting, rcSelf, rcNull );
-
-    if ( self -> avail < count )
-        return RC ( rcPS, rcSemaphore, rcWaiting, rcThread, rcDeadlock );
-
-    self -> avail -= count;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KSemaphoreTimedAlloc ( KSemaphore *self,
-    struct KLock *lock, uint64_t count, struct timeout_t *tm )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcSemaphore, rcWaiting, rcSelf, rcNull );
-
-    if ( self -> avail < count )
-    {
-        if ( tm == NULL )
-            return RC ( rcPS, rcSemaphore, rcWaiting, rcTimeout, rcNull );
-
-        return RC ( rcPS, rcSemaphore, rcWaiting, rcThread, rcDeadlock );
-    }
-
-    self -> avail -= count;
-    return 0;
-}
-
-
-/* Free
- *  signal that resources have become available
- */
-LIB_EXPORT rc_t CC KSemaphoreFree ( KSemaphore *self, uint64_t count )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcSemaphore, rcSignaling, rcSelf, rcNull );
-
-    self -> avail += count;
-    return 0;
-}
-
-
-/* Count
- *  request the current resource usage
- *  valid only within lock
- *
- *  "count" [ OUT ] - return parameter for current count
- */
-LIB_EXPORT rc_t CC KSemaphoreCount ( const KSemaphore *self, uint64_t *count )
-{
-    rc_t rc;
-    if ( count == NULL )
-        rc = RC ( rcPS, rcSemaphore, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcPS, rcSemaphore, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * count = self -> avail;
-            return 0;
-        }
-
-        * count = 0;
-    }
-    return rc;
-}
diff --git a/libs/kproc/stthread.c b/libs/kproc/stthread.c
deleted file mode 100644
index 982b13b..0000000
--- a/libs/kproc/stthread.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <kproc/extern.h>
-#include <kproc/thread.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <stdlib.h>
-
-/*--------------------------------------------------------------------------
- * KThread
- *  a CPU execution thread
- */
-struct KThread
-{
-    atomic32_t refcount;
-    rc_t rc;
-};
-
-
-/* Whack
- */
-static
-rc_t KThreadWhack ( KThread *self )
-{
-    free ( self );
-    return 0;
-}
-
-
-/* Make
- *  create and run a thread
- *
- *  "run_thread" [ IN ] - thread entrypoint
- *
- *  "data" [ IN, OPAQUE ] - user-supplied thread data
- */
-LIB_EXPORT rc_t CC KThreadMake ( KThread **tp,
-    rc_t ( * run_thread ) ( const KThread*, void* ), void *data )
-{
-    rc_t rc;
-    if ( tp == NULL )
-        rc = RC ( rcPS, rcThread, rcCreating, rcParam, rcNull );
-    else
-    {
-        if ( run_thread == NULL )
-            rc = RC ( rcPS, rcThread, rcCreating, rcFunction, rcNull );
-        else
-        {
-            KThread *t = malloc ( sizeof * t );
-            if ( t == NULL )
-                rc = RC ( rcPS, rcThread, rcCreating, rcMemory, rcExhausted );
-            else
-            {
-                /* run function on current thread */
-                atomic32_set ( & t -> refcount, 1 );
-                t -> rc = ( * run_thread ) ( t, data );
-                * tp = t;
-                return 0;
-            }
-        }
-
-        * tp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KThreadAddRef ( const KThread *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KThread* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KThreadRelease ( const KThread *cself )
-{
-    KThread *self = ( KThread* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-            return KThreadWhack ( self );
-    }
-    return 0;
-}
-
-
-/* Cancel
- *  signal the thread to finish
- */
-LIB_EXPORT rc_t CC KThreadCancel ( KThread *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcThread, rcSignaling, rcSelf, rcNull );
-    return RC ( rcPS, rcThread, rcSignaling, rcThread, rcDestroyed );
-}
-
-
-/* Wait
- *  waits for a thread to exit
- *
- *  "status" [ OUT ] - return parameter for thread's exit code
- */
-LIB_EXPORT rc_t CC KThreadWait ( KThread *self, rc_t *status )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcThread, rcWaiting, rcSelf, rcNull );
-    if ( status != NULL )
-        * status = self -> rc;
-    return 0;
-}
-
-
-/* Detach
- *  allow thread to run independently of group
- */
-LIB_EXPORT rc_t CC KThreadDetach ( KThread *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcThread, rcDetaching, rcSelf, rcNull );
-    return RC ( rcPS, rcThread, rcDetaching, rcThread, rcDestroyed );
-}
diff --git a/libs/kproc/sttimeout.c b/libs/kproc/sttimeout.c
deleted file mode 100644
index 47ba6cc..0000000
--- a/libs/kproc/sttimeout.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-#include <kproc/timeout.h>
-#include <os-native.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-/*--------------------------------------------------------------------------
- * timeout_t
- *  a structure for communicating a timeout
- */
-
-/* Init
- *  initialize a timeout in milliseconds
- */
-LIB_EXPORT rc_t CC TimeoutInit ( timeout_t *tm, uint32_t msec )
-{
-    if ( tm == NULL )
-        return RC ( rcPS, rcTimeout, rcConstructing, rcSelf, rcNull );
-
-    tm -> mS = msec;
-    tm -> prepared = false;
-
-    return 0;
-}
-
-/* Prepare
- *  ensures that a timeout is prepared with an absolute value
-*/
-LIB_EXPORT rc_t CC TimeoutPrepare ( timeout_t *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcTimeout, rcUpdating, rcSelf, rcNull );
-
-    if ( ! self -> prepared )
-        self -> prepared = true;
-
-    return 0;
-}
diff --git a/libs/kproc/sun/sysbarrier.c b/libs/kproc/sun/sysbarrier.c
deleted file mode 100644
index 9fc3ddd..0000000
--- a/libs/kproc/sun/sysbarrier.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-#include <kproc/barrier.h>
-#include <klib/rc.h>
-#include <atomic32.h>
-#include <sysalloc.h>
-
-#include <pthread.h>
-#include <stdlib.h>
-#include <errno.h>
-
-
-/*--------------------------------------------------------------------------
- * KBarrier
- *  a thread synchronization device
- *  detains all callers until the required number has been reached
- */
-struct KBarrier
-{
-    pthread_barrier_t barrier;
-    atomic32_t refcount;
-};
-
-
-/* Whack
- */
-static
-rc_t KBarrierWhack ( KBarrier *self )
-{
-    int status = pthread_barrier_destroy ( & self -> barrier );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EBUSY:
-        return RC ( rcPS, rcBarrier, rcDestroying, rcBarrier, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcBarrier, rcDestroying, rcBarrier, rcInvalid );
-    default:
-        return RC ( rcPS, rcBarrier, rcDestroying, rcNoObj, rcUnknown );
-    }
-    return 0;
-}
-
-
-/* Make
- *  create a barrier
- *
- *  "count" [ IN ] - the number of threads to block
- */
-LIB_EXPORT rc_t CC KBarrierMake ( KBarrier **bp, uint32_t count )
-{
-    rc_t rc;
-    if ( bp == NULL )
-        rc = RC ( rcPS, rcBarrier, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KBarrier *b = malloc ( sizeof * b );
-        if ( b == NULL )
-            rc = RC ( rcPS, rcBarrier, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            int status = pthread_barrier_init ( & b -> barrier, NULL, count );
-            if ( status == 0 )
-            {
-                atomic32_set ( & b -> refcount, 1 );
-                * bp = b;
-                return 0;
-            }
-
-            switch ( status )
-            {
-            case EINVAL:
-                rc = RC ( rcPS, rcBarrier, rcConstructing, rcParam, rcInvalid );
-                break;
-            case EBUSY:
-                rc = RC ( rcPS, rcBarrier, rcConstructing, rcBarrier, rcBusy );
-                break;
-            case EAGAIN:
-                rc = RC ( rcPS, rcBarrier, rcConstructing, rcBarrier, rcExhausted );
-                break;
-            case ENOMEM:
-                rc = RC ( rcPS, rcBarrier, rcConstructing, rcMemory, rcExhausted );
-                break;
-            default:
-                rc = RC ( rcPS, rcBarrier, rcConstructing, rcNoObj, rcUnknown );
-            }
-
-            free ( b );
-        }
-
-        * bp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KBarrierAddRef ( const KBarrier *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KBarrier* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KBarrierRelease ( const KBarrier *cself )
-{
-    KBarrier *self = ( KBarrier* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KBarrierWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* Wait
- *  block until the required number of callers has been reached
- */
-LIB_EXPORT rc_t CC KBarrierWait ( KBarrier *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcBarrier, rcWaiting, rcSelf, rcNull );
-
-    status = pthread_barrier_wait ( & self -> barrier );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EINVAL:
-        return RC ( rcPS, rcBarrier, rcWaiting, rcBarrier, rcInvalid );
-    default:
-        return RC ( rcPS, rcBarrier, rcWaiting, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
diff --git a/libs/kproc/sun/syslock-priv.h b/libs/kproc/sun/syslock-priv.h
deleted file mode 100644
index e47d508..0000000
--- a/libs/kproc/sun/syslock-priv.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_syslock_priv_
-#define _h_syslock_priv_
-
-/* BEGIN HACK to get rwlocks defined */
-#include <stdint.h>
-#include <stddef.h>
-
-#undef __USE_UNIX98
-#define __USE_UNIX98 1
-
-#undef __USE_XOPEN2K
-#define __USE_XOPEN2K 1
-/* END HACK */
-
-#include <pthread.h>
-#include <atomic32.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * KLock
- *  a POSIX-style mutual exclusion lock
- */
-struct KLock
-{
-    pthread_mutex_t mutex;
-    atomic32_t refcount;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_syslock_priv_ */
diff --git a/libs/kproc/sun/syslock.c b/libs/kproc/sun/syslock.c
deleted file mode 100644
index 06d23ec..0000000
--- a/libs/kproc/sun/syslock.c
+++ /dev/null
@@ -1,501 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-#include "syslock-priv.h"
-#include <os-native.h>
-#include <kproc/timeout.h>
-#include <kproc/lock.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <errno.h>
-
-/*--------------------------------------------------------------------------
- * KLock
- *  a POSIX-style mutual exclusion lock
- */
-
-/* Whack
- */
-static
-rc_t KLockWhack ( KLock *self )
-{
-    int status = pthread_mutex_destroy ( & self -> mutex );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EBUSY:
-        return RC ( rcPS, rcLock, rcDestroying, rcLock, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcDestroying, rcLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcDestroying, rcNoObj, rcUnknown );
-    }
-
-    free ( self );
-    return 0;
-}
-
-
-/* Make
- *  make a simple mutex
- */
-LIB_EXPORT rc_t CC KLockMake ( KLock **lockp )
-{
-    rc_t rc;
-    if ( lockp == NULL )
-        rc = RC ( rcPS, rcLock, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KLock *lock = malloc ( sizeof * lock );
-        if ( lock == NULL )
-            rc = RC ( rcPS, rcLock, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            int status = pthread_mutex_init ( & lock -> mutex, NULL );
-            if ( status == 0 )
-            {
-                atomic32_set ( & lock -> refcount, 1 );
-                * lockp = lock;
-                return 0;
-            }
-
-            /* pthread_mutex_init is documented as always returning 0 */
-            rc = RC ( rcPS, rcLock, rcConstructing, rcNoObj, rcUnknown );
-
-            free ( lock );
-        }
-
-        * lockp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KLockAddRef ( const KLock *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KLock* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLockRelease ( const KLock *cself )
-{
-    KLock *self = ( KLock* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KLockWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* Acquire
- *  acquires lock
- */
-LIB_EXPORT rc_t CC KLockAcquire ( KLock *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcLocking, rcSelf, rcNull );
-
-    status = pthread_mutex_lock ( & self -> mutex );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EDEADLK:
-        return RC ( rcPS, rcLock, rcLocking, rcThread, rcDeadlock );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcLocking, rcLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KLockTimedAcquire ( KLock *self, timeout_t *tm )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcLocking, rcSelf, rcNull );
-
-    status = pthread_mutex_trylock ( & self -> mutex );
-    switch ( status )
-    {
-    case 0:
-        return 0;
-    case EBUSY:
-        if ( tm != NULL )
-            break;
-        return RC ( rcPS, rcLock, rcLocking, rcLock, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcLocking, rcLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    if ( ! tm -> prepared )
-        TimeoutPrepare ( tm );
-
-    status = pthread_mutex_timedlock ( & self -> mutex, & tm -> ts );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case ETIMEDOUT:
-        return RC ( rcPS, rcLock, rcLocking, rcTimeout, rcExhausted );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcLocking, rcTimeout, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-/* Unlock
- *  releases lock
- */
-LIB_EXPORT rc_t CC KLockUnlock ( KLock *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcUnlocking, rcSelf, rcNull );
-
-    status = pthread_mutex_unlock ( & self -> mutex );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EPERM:
-        return RC ( rcPS, rcLock, rcUnlocking, rcThread, rcIncorrect );
-    case EINVAL:
-        return RC ( rcPS, rcLock, rcUnlocking, rcLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcLock, rcUnlocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * KRWLock
- *  a POSIX-style read/write lock
- */
-struct KRWLock
-{
-    pthread_rwlock_t lock;
-    atomic32_t refcount;
-};
-
-
-/* Whack
- */
-static
-rc_t KRWLockWhack ( KRWLock *self )
-{
-    int status = pthread_rwlock_destroy ( & self -> lock );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EBUSY:
-        return RC ( rcPS, rcRWLock, rcDestroying, rcRWLock, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcDestroying, rcRWLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcDestroying, rcNoObj, rcUnknown );
-    }
-
-    free ( self );
-    return 0;
-}
-
-
-/* Make
- *  make a simple read/write lock
- */
-LIB_EXPORT rc_t CC KRWLockMake ( KRWLock **lockp )
-{
-    rc_t rc;
-
-    if ( lockp == NULL )
-        rc = RC ( rcPS, rcRWLock, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KRWLock *lock = malloc ( sizeof * lock );
-        if ( lock == NULL )
-            rc = RC ( rcPS, rcRWLock, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            int status = pthread_rwlock_init ( & lock -> lock, NULL );
-            if ( status == 0 )
-            {
-                atomic32_set ( & lock -> refcount, 1 );
-                * lockp = lock;
-                return 0;
-            }
-
-            switch ( status )
-            {
-            case EAGAIN:
-                rc = RC ( rcPS, rcRWLock, rcConstructing, rcRWLock, rcExhausted );
-                break;
-            case ENOMEM:
-                rc = RC ( rcPS, rcRWLock, rcConstructing, rcMemory, rcExhausted );
-                break;
-            case EPERM:
-                rc = RC ( rcPS, rcRWLock, rcConstructing, rcProcess, rcUnauthorized );
-                break;
-            case EBUSY:
-                rc = RC ( rcPS, rcRWLock, rcConstructing, rcRWLock, rcBusy );
-                break;
-            default:
-                rc = RC ( rcPS, rcRWLock, rcConstructing, rcNoObj, rcUnknown );
-            }
-
-            free ( lock );
-        }
-
-        * lockp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KRWLockAddRef ( const KRWLock *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KRWLock* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KRWLockRelease ( const KRWLock *cself )
-{
-    KRWLock *self = ( KRWLock* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KRWLockWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* AcquireShared
- *  acquires read ( shared ) lock
- */
-LIB_EXPORT rc_t CC KRWLockAcquireShared ( KRWLock *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    status = pthread_rwlock_rdlock ( & self -> lock );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EDEADLK:
-        return RC ( rcPS, rcRWLock, rcLocking, rcThread, rcDeadlock );
-    case EAGAIN:
-        return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcExhausted );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KRWLockTimedAcquireShared ( KRWLock *self, timeout_t *tm )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    status = pthread_rwlock_tryrdlock ( & self -> lock );
-    switch ( status )
-    {
-    case 0:
-        return 0;
-    case EBUSY:
-        if ( tm != NULL )
-            break;
-        return RC ( rcPS, rcLock, rcLocking, rcRWLock, rcBusy );
-    case EAGAIN:
-        return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcExhausted );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    if ( ! tm -> prepared )
-        TimeoutPrepare ( tm );
-
-    status = pthread_rwlock_timedrdlock ( & self -> lock, & tm -> ts );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case ETIMEDOUT:
-        return RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcExhausted );
-    case EAGAIN:
-        return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcExhausted );
-    case EDEADLK:
-        return RC ( rcPS, rcRWLock, rcLocking, rcThread, rcDeadlock );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-
-/* AcquireExcl
- *  acquires write ( exclusive ) lock
- */
-LIB_EXPORT rc_t CC KRWLockAcquireExcl ( KRWLock *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    status = pthread_rwlock_wrlock ( & self -> lock );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EDEADLK:
-        return RC ( rcPS, rcRWLock, rcLocking, rcThread, rcDeadlock );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KRWLockTimedAcquireExcl ( KRWLock *self, timeout_t *tm )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    status = pthread_rwlock_trywrlock ( & self -> lock );
-    switch ( status )
-    {
-    case 0:
-        return 0;
-    case EBUSY:
-        if ( tm != NULL )
-            break;
-        return RC ( rcPS, rcRWLock, rcLocking, rcLock, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    if ( ! tm -> prepared )
-        TimeoutPrepare ( tm );
-
-    status = pthread_rwlock_timedwrlock ( & self -> lock, & tm -> ts );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case ETIMEDOUT:
-        return RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcExhausted );
-    case EDEADLK:
-        return RC ( rcPS, rcRWLock, rcLocking, rcThread, rcDeadlock );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-
-/* Unlock
- *  releases lock
- */
-LIB_EXPORT rc_t CC KRWLockUnlock ( KRWLock *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcUnlocking, rcSelf, rcNull );
-
-    status = pthread_rwlock_unlock ( & self -> lock );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EPERM:
-        return RC ( rcPS, rcRWLock, rcUnlocking, rcThread, rcIncorrect );
-    case EINVAL:
-        return RC ( rcPS, rcRWLock, rcUnlocking, rcRWLock, rcInvalid );
-    default:
-        return RC ( rcPS, rcRWLock, rcUnlocking, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
diff --git a/libs/kproc/task.c b/libs/kproc/task.c
deleted file mode 100644
index 3a7fcc7..0000000
--- a/libs/kproc/task.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-
-#include <kproc/task.h>
-#include <kproc/impl.h>
-#include <klib/rc.h>
-
-#define rcTask rcCmd
-
-
-/*--------------------------------------------------------------------------
- * KTask
- *  a deferred task abstraction
- *  specific task objects are constructed with required parameters
- *  and implement the Execute method to perform their operation
- */
-
-
-/* Whack
- */
-static
-rc_t KTaskWhack ( KTask * self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcTask, rcDestroying, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . destroy ) ( self );
-    }
-
-    return RC ( rcPS, rcTask, rcDestroying, rcInterface, rcBadVersion );
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KTaskAddRef ( const KTask *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KTask" ) )
-        {
-        case krefLimit:
-            return RC ( rcPS, rcTask, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KTaskRelease ( const KTask *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "KTask" ) )
-        {
-        case krefWhack:
-            return KTaskWhack ( ( KTask* ) self );
-        case krefNegative:
-            return RC ( rcPS, rcTask, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Execute
- *  perform deferred operation
- */
-LIB_EXPORT rc_t CC KTaskExecute ( KTask *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcTask, rcExecuting, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return ( * self -> vt -> v1 . execute ) ( self );
-    }
-
-    return RC ( rcPS, rcTask, rcExecuting, rcInterface, rcBadVersion );
-}
-
-
-/* Init
- *  initialize a newly allocated task object
- */
-LIB_EXPORT rc_t CC KTaskInit ( KTask *self, const KTask_vt *vt, const char *clsname, const char *name )
-{
-    if ( self == NULL )
-        return RC ( rcFS, rcTask, rcConstructing, rcSelf, rcNull );
-    if ( vt == NULL )
-        return RC ( rcFS, rcTask, rcConstructing, rcInterface, rcNull );
-    switch ( vt -> v1 . maj )
-    {
-    case 1:
-        switch ( vt -> v1 . min )
-        {
-            /* insert new minor versions in reverse order */
-        case 0:
-#if _DEBUGGING
-            if ( vt -> v1 . destroy == NULL ||
-                 vt -> v1 . execute == NULL )
-            return RC ( rcFS, rcTask, rcConstructing, rcInterface, rcNull );
-#endif
-            break;
-        default:
-            return RC ( rcFS, rcTask, rcConstructing, rcInterface, rcInvalid );
-        }
-        break;
-    default:
-        return RC ( rcFS, rcTask, rcConstructing, rcInterface, rcInvalid );
-    }
-
-    self -> vt = vt;
-    KRefcountInit ( & self -> refcount, 1, clsname, "init", name );
-    return 0;
-}
-
-
-/* Destroy
- *  destroy task
- */
-LIB_EXPORT rc_t CC KTaskDestroy ( KTask *self, const char *clsname )
-{
-    if ( self != NULL )
-        KRefcountWhack ( & self -> refcount, clsname );
-    return 0;
-}
diff --git a/libs/kproc/unix/syscond-priv.h b/libs/kproc/unix/syscond-priv.h
deleted file mode 100644
index ba8ba01..0000000
--- a/libs/kproc/unix/syscond-priv.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_syscond_priv_
-#define _h_syscond_priv_
-
-#include <pthread.h>
-#include <atomic32.h>
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * KCondition
- *  a POSIX-style condition object
- *  ( requires an external lock object )
- *
- *  usage: the user first acquires an external lock. then, depending upon
- *  the operation, will either test for a condition or establish it, where
- *  the former involves the potential to wait for a signal and the latter
- *  to generate a signal using the external lock for blocking.
- */
-struct KCondition
-{
-    pthread_cond_t cond;
-    atomic32_t refcount;
-};
-
-/* Init
- *  initialize an inline KCondition
- */
-rc_t KConditionInit ( struct KCondition *self );
-
-/* Destroy
- *  run destructor on inline KCondition
- */
-rc_t KConditionDestroy ( struct KCondition *self );
-
-/* DropRef
- *  manipulates reference counter
- *  returns true if last ref
- */
-int KConditionDropRef ( struct KCondition const *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_syscond_priv_ */
diff --git a/libs/kproc/unix/syscond.c b/libs/kproc/unix/syscond.c
deleted file mode 100644
index 8eb008c..0000000
--- a/libs/kproc/unix/syscond.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "syslock-priv.h"
-#include "syscond-priv.h"
-
-#include <kproc/extern.h>
-#include <os-native.h>
-#include <kproc/timeout.h>
-#include <kproc/cond.h>
-#include <klib/out.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <stdlib.h>
-#include <errno.h>
-#include <assert.h>
-
-#if _DEBUGGING && 0
-#define CMSG( msg, ... ) \
-    KOutMsg ( msg, __VA_ARGS__ )
-#else
-#define CMSG( msg, ... ) \
-    ( void ) 0
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KCondition
- *  a POSIX-style condition object
- *  ( requires an external lock object )
- *
- *  usage: the user first acquires an external lock. then, depending upon
- *  the operation, will either test for a condition or establish it, where
- *  the former involves the potential to wait for a signal and the latter
- *  to generate a signal using the external lock for blocking.
- */
-
-
-/* Destroy
- */
-LIB_EXPORT rc_t CC KConditionDestroy ( KCondition *self )
-{
-    int status = pthread_cond_destroy ( & self -> cond );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EBUSY:
-        return RC ( rcPS, rcCondition, rcDestroying, rcCondition, rcBusy );
-    default:
-        return RC ( rcPS, rcCondition, rcDestroying, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-
-/* Whack
- */
-static
-rc_t KConditionWhack ( KCondition *self )
-{
-    rc_t rc = KConditionDestroy ( self );
-    if ( rc == 0 )
-        free ( self );
-    return rc;
-}
-
-/* Init
- */
-LIB_EXPORT rc_t CC KConditionInit ( KCondition *self )
-{
-    int status;
-
-    assert ( self != NULL );
-    status = pthread_cond_init ( & self -> cond, NULL );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EAGAIN:
-        return RC ( rcPS, rcCondition, rcConstructing, rcCondition, rcExhausted );
-    case ENOMEM:
-        return RC ( rcPS, rcCondition, rcConstructing, rcMemory, rcExhausted );
-    case EBUSY:
-        return RC ( rcPS, rcCondition, rcConstructing, rcCondition, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcCondition, rcConstructing, rcCondition, rcInvalid );
-    default:
-        return RC ( rcPS, rcCondition, rcConstructing, rcNoObj, rcUnknown );
-    }
-
-    atomic32_set ( & self -> refcount, 1 );
-    return 0;
-}
-
-
-/* Make
- *  create a condition
- */
-LIB_EXPORT rc_t CC KConditionMake ( KCondition **condp )
-{
-    rc_t rc;
-    if ( condp == NULL )
-        rc = RC ( rcPS, rcCondition, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KCondition *cond = malloc ( sizeof * cond );
-        if ( cond == NULL )
-            rc = RC ( rcPS, rcCondition, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KConditionInit ( cond );
-            if ( rc == 0 )
-            {
-                * condp = cond;
-                return 0;
-            }
-            
-            free ( cond );
-        }
-
-        * condp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KConditionAddRef ( const KCondition *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KCondition* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KConditionRelease ( const KCondition *cself )
-{
-    KCondition *self = ( KCondition* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_read_and_add ( & self -> refcount, -1 ) <= 1 )
-            return KConditionWhack ( self );
-    }
-    return 0;
-}
-
-/* DropRef
- *  manipulates reference counter
- *  returns true if last ref
- */
-LIB_EXPORT int CC KConditionDropRef ( const KCondition *cself )
-{
-    assert ( cself != NULL );
-    return atomic32_dec_and_test ( & ( ( KCondition* ) cself ) -> refcount );
-}
-
-
-/* Wait
- *  block on external lock until signaled
- */
-LIB_EXPORT rc_t CC KConditionWait ( KCondition *self, struct KLock *lock )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcCondition, rcWaiting, rcSelf, rcNull );
-    if ( lock == NULL )
-        return RC ( rcPS, rcCondition, rcWaiting, rcLock, rcNull );
-
-    status = pthread_cond_wait ( & self -> cond, & lock -> mutex );
-    switch ( status )
-    {
-    case 0:
-        break;
-    default:
-        return RC ( rcPS, rcCondition, rcWaiting, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KConditionTimedWait ( KCondition *self, struct KLock *lock, timeout_t *tm )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcCondition, rcWaiting, rcSelf, rcNull );
-    if ( lock == NULL )
-        return RC ( rcPS, rcCondition, rcWaiting, rcLock, rcNull );
-    if ( tm == NULL )
-        return RC ( rcPS, rcCondition, rcWaiting, rcTimeout, rcNull );
-
-    CMSG ( "%s[%p]: testing timeout structure\n", __func__, self );
-    if ( ! tm -> prepared )
-    {
-        CMSG ( "%s[%p]: preparing timeout...\n", __func__, self );
-        TimeoutPrepare ( tm );
-        CMSG ( "%s[%p]: ...done preparing timeout\n", __func__, self );
-    }
-
-#if 1
-    CMSG ( "%s[%p]: calling 'pthread_cond_timedwait ( cond = %p, mutex = %p, ts = %p )'...\n"
-           , __func__, self, & self -> cond, & lock -> mutex, & tm -> ts
-        );
-    status = pthread_cond_timedwait ( & self -> cond, & lock -> mutex, & tm -> ts );
-#else
-    CMSG ( "%s[%p]: calling 'pthread_cond_wait ( cond = %p, mutex = %p )'...\n"
-           , __func__, self, & self -> cond, & lock -> mutex, & tm -> ts
-        );
-    status = pthread_cond_wait ( & self -> cond, & lock -> mutex );
-#endif
-    CMSG ( "%s[%p]: ...done, OS status = %!\n", __func__, self, status );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case ETIMEDOUT:
-        return SILENT_RC ( rcPS, rcCondition, rcWaiting, rcTimeout, rcExhausted );
-/*
-  The pthread_cond_timedwait() function shall fail if:
-
-  ETIMEDOUT
-  The time specified by abstime to pthread_cond_timedwait() has passed.
-
-  The pthread_cond_timedwait() and pthread_cond_wait() functions may fail if:
-
-  EINVAL The value specified by cond, mutex, or abstime is invalid.
-
-  EINVAL Different mutexes were supplied for concurrent pthread_cond_timedwait()
-  or pthread_cond_wait() operations on the same condition variable.
-
-  EPERM  The mutex was not owned by the current thread at the time of the call.
-
-  *** These functions shall not return an error code of [EINTR]. ***
-
- */
-    case EINTR:
-        return RC ( rcPS, rcCondition, rcWaiting, rcThread, rcInterrupted );
-    default:
-        return RC ( rcPS, rcCondition, rcWaiting, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-
-/* Signal
- *  signal waiting threads
- *  awaken at most a single thread
- */
-LIB_EXPORT rc_t CC KConditionSignal ( KCondition *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcCondition, rcSignaling, rcSelf, rcNull );
-
-    status = pthread_cond_signal ( & self -> cond );
-    switch ( status )
-    {
-    case 0:
-        break;
-    default:
-        return RC ( rcPS, rcCondition, rcSignaling, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-
-/* Broadcast
- *  signal waiting threads
- *  awaken all waiting thread
- */
-LIB_EXPORT rc_t CC KConditionBroadcast ( KCondition *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcCondition, rcSignaling, rcSelf, rcNull );
-
-    status = pthread_cond_broadcast ( & self -> cond );
-    switch ( status )
-    {
-    case 0:
-        break;
-    default:
-        return RC ( rcPS, rcCondition, rcSignaling, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
diff --git a/libs/kproc/unix/systhread.c b/libs/kproc/unix/systhread.c
deleted file mode 100644
index 5707d41..0000000
--- a/libs/kproc/unix/systhread.c
+++ /dev/null
@@ -1,272 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-#include <kproc/thread.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <pthread.h>
-#include <stdlib.h>
-#include <errno.h>
-
-
-/*--------------------------------------------------------------------------
- * KThread
- *  a CPU execution thread
- */
-struct KThread
-{
-    /* thread entrypoint and data */
-    rc_t ( * run ) ( const KThread*, void* );
-    void *data;
-
-    pthread_t thread;
-    atomic32_t waiting;
-    atomic32_t refcount;
-    rc_t rc;
-    bool join;
-};
-
-
-/* Whack
- */
-static
-rc_t KThreadWhack ( KThread *self )
-{
-    if ( self -> join )
-    {
-        void *td;
-        pthread_join ( self -> thread, & td );
-    }
-
-    free ( self );
-    return 0;
-}
-
-
-/* Run
- */
-static
-void *KThreadRun ( void *td )
-{
-    KThread *self = td;
-
-    /* run the function */
-    self -> rc = ( * self -> run ) ( self, self -> data );
-
-    /* release thread's reference */
-    if ( atomic32_dec_and_test ( & self -> refcount ) )
-        free ( self );
-
-    return NULL;
-}
-
-
-/* Make
- *  create and run a thread
- *
- *  "run_thread" [ IN ] - thread entrypoint
- *
- *  "data" [ IN, OPAQUE ] - user-supplied thread data
- */
-LIB_EXPORT rc_t CC KThreadMake ( KThread **tp,
-    rc_t ( CC * run_thread ) ( const KThread*, void* ), void *data )
-{
-    rc_t rc;
-    if ( tp == NULL )
-        rc = RC ( rcPS, rcThread, rcCreating, rcParam, rcNull );
-    else
-    {
-        if ( run_thread == NULL )
-            rc = RC ( rcPS, rcThread, rcCreating, rcFunction, rcNull );
-        else
-        {
-            KThread *t = malloc ( sizeof * t );
-            if ( t == NULL )
-                rc = RC ( rcPS, rcThread, rcCreating, rcMemory, rcExhausted );
-            else
-            {
-                int status;
-
-                /* finish constructing thread */
-                t -> run = run_thread;
-                t -> data = data;
-                atomic32_set ( & t -> waiting, 0 );
-                atomic32_set ( & t -> refcount, 2 );
-                t -> rc = 0;
-                t -> join = true;
-
-                /* attempt to create thread */
-                status = pthread_create ( & t -> thread, 0, KThreadRun, t );
-                if ( status == 0 )
-                {
-                    * tp = t;
-                    return 0;
-                }
-
-                /* see why we failed */
-                switch ( status )
-                {
-                case EAGAIN:
-                    rc = RC ( rcPS, rcThread, rcCreating, rcThread, rcExhausted );
-                    break;
-                default:
-                    rc = RC ( rcPS, rcThread, rcCreating, rcNoObj, rcUnknown );
-                }
-
-                free ( t );
-            }
-        }
-
-        * tp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KThreadAddRef ( const KThread *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KThread* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KThreadRelease ( const KThread *cself )
-{
-    KThread *self = ( KThread* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-            return KThreadWhack ( self );
-    }
-    return 0;
-}
-
-
-/* Cancel
- *  signal the thread to finish
- */
-LIB_EXPORT rc_t CC KThreadCancel ( KThread *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcThread, rcSignaling, rcSelf, rcNull );
-
-    status = pthread_cancel ( self -> thread );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case ESRCH:
-        self -> join = false;
-        return RC ( rcPS, rcThread, rcSignaling, rcThread, rcDestroyed );
-    default:
-        return RC ( rcPS, rcThread, rcSignaling, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-
-/* Wait
- *  waits for a thread to exit
- *
- *  "status" [ OUT ] - return parameter for thread's exit code
- */
-LIB_EXPORT rc_t CC KThreadWait ( KThread *self, rc_t *out )
-{
-    void *td;
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcThread, rcWaiting, rcSelf, rcNull );
-
-    /* prevent multiple waiters */
-    if ( atomic32_test_and_set ( & self -> waiting, 0, 1 ) != 0 )
-        return RC ( rcPS, rcThread, rcWaiting, rcThread, rcBusy );
-
-    status = pthread_join ( self -> thread, & td );
-
-    /* release waiter lock */                                                                                                                                                                                   
-    atomic32_set ( & self -> waiting, 0 );
-
-    switch ( status )
-    {
-    case 0:
-        break;
-    case ESRCH:
-        return RC ( rcPS, rcThread, rcWaiting, rcThread, rcDestroyed );
-    case EINVAL:
-        return RC ( rcPS, rcThread, rcWaiting, rcThread, rcDetached );
-    case EDEADLK:
-        return RC ( rcPS, rcThread, rcWaiting, rcThread, rcDeadlock );
-    default:
-        return RC ( rcPS, rcThread, rcWaiting, rcNoObj, rcUnknown );
-    }
-
-    self -> join = false;
-
-    if ( td == PTHREAD_CANCELED )
-        self -> rc = RC ( rcPS, rcThread, rcWaiting, rcThread, rcCanceled );
-
-    if ( out != NULL )
-        * out = self -> rc;
-
-    return 0;
-}
-
-
-/* Detach
- *  allow thread to run independently of group
- */
-LIB_EXPORT rc_t CC KThreadDetach ( KThread *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcThread, rcDetaching, rcSelf, rcNull );
-
-    status = pthread_detach ( self -> thread );
-    switch ( status )
-    {
-    case 0:
-    case EINVAL:
-        break;
-    case ESRCH:
-        return RC ( rcPS, rcThread, rcDetaching, rcThread, rcDestroyed );
-    default:
-        return RC ( rcPS, rcThread, rcDetaching, rcNoObj, rcUnknown );
-    }
-
-    self -> join = false;
-    return 0;
-}
diff --git a/libs/kproc/unix/systimeout.c b/libs/kproc/unix/systimeout.c
deleted file mode 100644
index 35295b7..0000000
--- a/libs/kproc/unix/systimeout.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <sysalloc.h>
-#include <kproc/timeout.h>
-#include <os-native.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-
-
-/*--------------------------------------------------------------------------
- * timeout_t
- *  a structure for communicating a timeout
- *  which under Unix converts to an absolute time once prepared
- */
-
-
-/* Init
- *  initialize a timeout in milliseconds
- */
-LIB_EXPORT rc_t TimeoutInit ( timeout_t *tm, uint32_t msec )
-{
-    if ( tm == NULL )
-        return RC ( rcPS, rcTimeout, rcConstructing, rcSelf, rcNull );
-
-    tm -> mS = msec;
-    tm -> prepared = false;
-
-    return 0;
-}
-
-/* Prepare
- *  ensures that a timeout is prepared with an absolute value
-*/
-LIB_EXPORT rc_t TimeoutPrepare ( timeout_t *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcTimeout, rcUpdating, rcSelf, rcNull );
-
-    if ( ! self -> prepared )
-    {
-        struct timeval tv;
-        struct timezone tz;
-        int64_t abs_micros;
-
-        /* current time in seconds and uS */
-        gettimeofday ( & tv, & tz );
-    
-        /* convert to uS */
-        abs_micros = tv . tv_sec;
-        abs_micros = abs_micros * 1000 * 1000 + tv . tv_usec;
-    
-        /* add wait period for future timeout */
-        abs_micros += ( uint64_t ) self -> mS * 1000;
-    
-        /* convert to seconds and nS */
-        self -> ts . tv_sec = ( time_t ) ( abs_micros / 1000000 );
-        self -> ts . tv_nsec = ( uint32_t ) ( ( abs_micros % 1000000 ) * 1000 );
-        self -> prepared = true;
-    }
-
-    return 0;
-}
diff --git a/libs/kproc/win/syscond-priv.h b/libs/kproc/win/syscond-priv.h
deleted file mode 100644
index 509a913..0000000
--- a/libs/kproc/win/syscond-priv.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_syscond_priv_
-#define _h_syscond_priv_
-
-#if 0
-#include <pthread.h>
-#endif
-
-#include <atomic32.h>
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KCondition
- *  a POSIX-style condition object
- *  ( requires an external lock object )
- *
- *  usage: the user first acquires an external lock. then, depending upon
- *  the operation, will either test for a condition or establish it, where
- *  the former involves the potential to wait for a signal and the latter
- *  to generate a signal using the external lock for blocking.
- */
-struct KCondition;
-
-
-/* Init
- *  initialize an inline KCondition
- */
-rc_t KConditionInit ( struct KCondition *self );
-
-/* Destroy
- *  run destructor on inline KCondition
- */
-rc_t KConditionDestroy ( struct KCondition *self );
-
-/* DropRef
- *  manipulates reference counter
- *  returns true if last ref
- */
-int KConditionDropRef ( struct KCondition const *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_syscond_priv_ */
diff --git a/libs/kproc/win/syscond.c b/libs/kproc/win/syscond.c
deleted file mode 100644
index 9fb08a2..0000000
--- a/libs/kproc/win/syscond.c
+++ /dev/null
@@ -1,500 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-
-#include "syslock-priv.h"
-#include "syscond-priv.h"
-
-#include <os-native.h>
-#include <kproc/timeout.h>
-#include <kproc/cond.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <stdlib.h>
-#include <errno.h>
-#include <assert.h>
-
-#include <time.h> /* struct timespec */
-
-/* #include <stdio.h> */
-
-
-/*
-
-This Windows condition implementation is taken from 
-"Strategies for Implementing POSIX Condition Variables on Win32"
-by Douglas C. Schmidt
-( http://www.cs.wustl.edu/~schmidt/win32-cv-1.html ) :
-
-3.4. The SignalObjectAndWait Solution
-The implementation relies on the Windows NT 4.0 SignalObjectAndWait function,
-thus it is not available in Windows CE, Windows '95, or Windows NT 3.51.
-
-The code was taken from the article.
-
-The C++ source code for POSIX condition variable on Win32
-described in the article is freely available with the ACE framework
-at //www.cs.wustl.edu/~schmidt/ACE.html.
-It is possible that the latter is better.
-
-*/
-
-
-typedef struct
-{
-  int waiters_count_;
-  // Number of waiting threads.
-
-  CRITICAL_SECTION waiters_count_lock_;
-  // Serialize access to <waiters_count_>.
-
-  HANDLE sema_;
-  // Semaphore used to queue up threads waiting for the condition to
-  // become signaled. 
-
-  HANDLE waiters_done_;
-  // An auto-reset event used by the broadcast/signal thread to wait
-  // for all the waiting thread(s) to wake up and be released from the
-  // semaphore. 
-
-  size_t was_broadcast_;
-  // Keeps track of whether we were broadcasting or signaling.  This
-  // allows us to optimize the code if we're just signaling.
-} pthread_cond_t;
-
-
-/*--------------------------------------------------------------------------
- * KCondition
- *  a POSIX-style condition object
- *  ( requires an external lock object )
- *
- *  usage: the user first acquires an external lock. then, depending upon
- *  the operation, will either test for a condition or establish it, where
- *  the former involves the potential to wait for a signal and the latter
- *  to generate a signal using the external lock for blocking.
- */
-struct KCondition
-{
-    pthread_cond_t cond;
-
-    atomic32_t refcount;
-};
-
-
-typedef HANDLE pthread_mutex_t;
-typedef struct pthread_condattr_t { char dummy; } pthread_condattr_t;
-
-int 
-pthread_cond_init (pthread_cond_t *cv,
-                   const pthread_condattr_t *dummy)
-{
-  cv->waiters_count_ = 0;
-  cv->was_broadcast_ = 0;
-  cv->sema_ = CreateSemaphore (NULL,       // no security
-                                0,          // initially 0
-                                0x7fffffff, // max count
-                                NULL);      // unnamed 
-  InitializeCriticalSection (&cv->waiters_count_lock_);
-  cv->waiters_done_ = CreateEvent (NULL,  // no security
-                                   FALSE, // auto-reset
-                                   FALSE, // non-signaled initially
-                                   NULL); // unnamed
-  return 0;
-}
-
-int pthread_cond_destroy (pthread_cond_t *cv) {
-    CloseHandle(cv->sema_);
-    DeleteCriticalSection(&cv->waiters_count_lock_);
-    CloseHandle(cv->waiters_done_);
-    memset(cv, 0, sizeof *cv);
-    return 0;
-}
-
-#ifndef timespec
-typedef struct timespec
-  {
-    time_t tv_sec;            /* Seconds.  */
-    long int tv_nsec;           /* Nanoseconds.  */
-  } timespec;
-#endif
-
-int pthread_cond_waitImpl (pthread_cond_t *cv, 
-                   pthread_mutex_t *external_mutex,
-                   const struct timespec *abstime,
-                   bool infinite)
-{
-    int last_waiter;
-    DWORD dwMilliseconds = INFINITE;
-
-  // Avoid race conditions.
-  EnterCriticalSection (&cv->waiters_count_lock_);
-  cv->waiters_count_++;
-  LeaveCriticalSection (&cv->waiters_count_lock_);
-
-  // This call atomically releases the mutex and waits on the
-  // semaphore until <pthread_cond_signal> or <pthread_cond_broadcast>
-  // are called by another thread.
-  if (!infinite && abstime != NULL)
-  { dwMilliseconds = ( DWORD ) ( abstime->tv_sec * 1000 + abstime->tv_nsec / 1000000 ) ; }
-  SignalObjectAndWait (*external_mutex, cv->sema_, dwMilliseconds, FALSE);
-
-  // Reacquire lock to avoid race conditions.
-  EnterCriticalSection (&cv->waiters_count_lock_);
-
-  // We're no longer waiting...
-  cv->waiters_count_--;
-
-  // Check to see if we're the last waiter after <pthread_cond_broadcast>.
-  last_waiter = cv->was_broadcast_ && cv->waiters_count_ == 0;
-
-  LeaveCriticalSection (&cv->waiters_count_lock_);
-
-  // If we're the last waiter thread during this particular broadcast
-  // then let all the other threads proceed.
-  if (last_waiter)
-    // This call atomically signals the <waiters_done_> event and waits until
-    // it can acquire the <external_mutex>.
-    // This is required to ensure fairness.
-    SignalObjectAndWait (cv->waiters_done_, *external_mutex, INFINITE, FALSE);
-  else {
-    // Always regain the external mutex since that's the guarantee we
-    // give to our callers. 
-/*      fprintf(stderr, "%s: WaitForSingleObject...\n", __func__); */
-    WaitForSingleObject (*external_mutex, INFINITE);
-/*      fprintf(stderr, "... %s: WaitForSingleObject\n", __func__); */
-  }
-
-  return 0;
-}
-
-int pthread_cond_timedwait(pthread_cond_t *cv,
-              pthread_mutex_t *external_mutex,
-              const struct timespec *abstime)
-{
-  return pthread_cond_waitImpl(cv, external_mutex, abstime, false);
-}
-
-int
-pthread_cond_wait (pthread_cond_t *cv, 
-                   pthread_mutex_t *external_mutex)
-{
-  return pthread_cond_waitImpl(cv, external_mutex, NULL, true);
-}
-
-int
-pthread_cond_signal (pthread_cond_t *cv)
-{
-    int have_waiters;
-
-  EnterCriticalSection (&cv->waiters_count_lock_);
-  have_waiters = cv->waiters_count_ > 0;
-  LeaveCriticalSection (&cv->waiters_count_lock_);
-
-  // If there aren't any waiters, then this is a no-op.  
-  if (have_waiters)
-    ReleaseSemaphore (cv->sema_, 1, 0);
-
-  return 0;
-}
-
-int
-pthread_cond_broadcast (pthread_cond_t *cv)
-{
-  int have_waiters = 0;
-
-  // This is needed to ensure that <waiters_count_> and <was_broadcast_> are
-  // consistent relative to each other.
-  EnterCriticalSection (&cv->waiters_count_lock_);
-
-  if (cv->waiters_count_ > 0) {
-    // We are broadcasting, even if there is just one waiter...
-    // Record that we are broadcasting, which helps optimize
-    // <pthread_cond_wait> for the non-broadcast case.
-    cv->was_broadcast_ = 1;
-    have_waiters = 1;
-  }
-
-  if (have_waiters) {
-    // Wake up all the waiters atomically.
-    ReleaseSemaphore (cv->sema_, cv->waiters_count_, 0);
-
-    LeaveCriticalSection (&cv->waiters_count_lock_);
-
-    // Wait for all the awakened threads to acquire the counting
-    // semaphore. 
-    WaitForSingleObject (cv->waiters_done_, INFINITE);
-    // This assignment is okay, even without the <waiters_count_lock_> held 
-    // because no other waiter threads can wake up to access it.
-    cv->was_broadcast_ = 0;
-  }
-  else
-    LeaveCriticalSection (&cv->waiters_count_lock_);
-
-  return 0;
-}
-
-/*--------------------------------------------------------------------------
- * KCondition
- *  a POSIX-style condition object
- *  ( requires an external lock object )
- *
- *  usage: the user first acquires an external lock. then, depending upon
- *  the operation, will either test for a condition or establish it, where
- *  the former involves the potential to wait for a signal and the latter
- *  to generate a signal using the external lock for blocking.
- */
-
-/* Destroy
- */
-rc_t KConditionDestroy ( KCondition *self )
-{
-    int status = pthread_cond_destroy ( & self -> cond );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EBUSY:
-        return RC ( rcPS, rcCondition, rcDestroying, rcCondition, rcBusy );
-    default:
-        return RC ( rcPS, rcCondition, rcDestroying, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-
-/* Whack
- */
-static
-rc_t KConditionWhack ( KCondition *self )
-{
-    rc_t rc = KConditionDestroy ( self );
-    if ( rc == 0 )
-        free ( self );
-    return rc;
-}
-
-/* Init
- */
-rc_t KConditionInit ( KCondition *self )
-{
-    int status;
-
-    assert ( self != NULL );
-    status = pthread_cond_init ( & self -> cond, NULL );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case EAGAIN:
-        return RC ( rcPS, rcCondition, rcConstructing, rcCondition, rcExhausted );
-    case ENOMEM:
-        return RC ( rcPS, rcCondition, rcConstructing, rcMemory, rcExhausted );
-    case EBUSY:
-        return RC ( rcPS, rcCondition, rcConstructing, rcCondition, rcBusy );
-    case EINVAL:
-        return RC ( rcPS, rcCondition, rcConstructing, rcCondition, rcInvalid );
-    default:
-        return RC ( rcPS, rcCondition, rcConstructing, rcNoObj, rcUnknown );
-    }
-
-    atomic32_set ( & self -> refcount, 1 );
-    return 0;
-}
-
-
-/* Make
- *  create a condition
- */
-LIB_EXPORT rc_t CC KConditionMake ( KCondition **condp )
-{
-    rc_t rc;
-    if ( condp == NULL )
-        rc = RC ( rcPS, rcCondition, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KCondition *cond = malloc ( sizeof * cond );
-        if ( cond == NULL )
-            rc = RC ( rcPS, rcCondition, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KConditionInit ( cond );
-            if ( rc == 0 )
-            {
-                * condp = cond;
-                return 0;
-            }
-            
-            free ( cond );
-        }
-
-        * condp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KConditionAddRef ( const KCondition *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KCondition* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KConditionRelease ( const KCondition *cself )
-{
-    KCondition *self = ( KCondition* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-            return KConditionWhack ( self );
-    }
-    return 0;
-}
-
-/* DropRef
- *  manipulates reference counter
- *  returns true if last ref
- */
-int KConditionDropRef ( const KCondition *cself )
-{
-    assert ( cself != NULL );
-    return atomic32_dec_and_test ( & ( ( KCondition* ) cself ) -> refcount );
-}
-
-
-/* Wait
- *  block on external lock until signaled
- */
-LIB_EXPORT rc_t CC KConditionWait ( KCondition *self, struct KLock *lock )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcCondition, rcWaiting, rcSelf, rcNull );
-    if ( lock == NULL )
-        return RC ( rcPS, rcCondition, rcWaiting, rcLock, rcNull );
-
-    status = pthread_cond_wait ( & self -> cond, & lock -> mutex );
-    switch ( status )
-    {
-    case 0:
-        break;
-    default:
-        return RC ( rcPS, rcCondition, rcWaiting, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KConditionTimedWait ( KCondition *self, struct KLock *lock, timeout_t *tm )
-{
-    int status;
-    timespec ts;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcCondition, rcWaiting, rcSelf, rcNull );
-    if ( lock == NULL )
-        return RC ( rcPS, rcCondition, rcWaiting, rcLock, rcNull );
-    if ( tm == NULL )
-        return RC ( rcPS, rcCondition, rcWaiting, rcTimeout, rcNull );
-
-    if ( ! tm -> prepared )
-        TimeoutPrepare ( tm );
-
-    memset(&ts, 0, sizeof ts);
-    ts.tv_sec = tm -> mS / 1000;
-    ts.tv_nsec = ( long ) ( (tm -> mS - ts.tv_sec * 1000) * 1000000 );
-
-    status = pthread_cond_timedwait ( & self -> cond, & lock -> mutex, & ts );
-    switch ( status )
-    {
-    case 0:
-        break;
-/*  case ETIMEDOUT:
-        return RC ( rcPS, rcCondition, rcWaiting, rcTimeout, rcExhausted ); */
-    case EINTR:
-        return RC ( rcPS, rcCondition, rcWaiting, rcThread, rcInterrupted );
-    default:
-        return RC ( rcPS, rcCondition, rcWaiting, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-
-/* Signal
- *  signal waiting threads
- *  awaken at most a single thread
- */
-LIB_EXPORT rc_t CC KConditionSignal ( KCondition *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcCondition, rcSignaling, rcSelf, rcNull );
-
-    status = pthread_cond_signal ( & self -> cond );
-    switch ( status )
-    {
-    case 0:
-        break;
-    default:
-        return RC ( rcPS, rcCondition, rcSignaling, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
-
-
-/* Broadcast
- *  signal waiting threads
- *  awaken all waiting thread
- */
-LIB_EXPORT rc_t CC KConditionBroadcast ( KCondition *self )
-{
-    int status;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcCondition, rcSignaling, rcSelf, rcNull );
-
-    status = pthread_cond_broadcast ( & self -> cond );
-    switch ( status )
-    {
-    case 0:
-        break;
-    default:
-        return RC ( rcPS, rcCondition, rcSignaling, rcNoObj, rcUnknown );
-    }
-
-    return 0;
-}
diff --git a/libs/kproc/win/syslock-priv.h b/libs/kproc/win/syslock-priv.h
deleted file mode 100644
index 412cdf0..0000000
--- a/libs/kproc/win/syslock-priv.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_syslock_priv_
-#define _h_syslock_priv_
-
-#ifndef _h_os_native_
-#include <os-native.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * KLock
- *  a POSIX-style mutual exclusion lock
- */
-struct KLock
-{
-    HANDLE mutex;
-    KRefcount refcount;
-};
-
-/*--------------------------------------------------------------------------
- * KTimedLock
- *  a POSIX-style mutual exclusion lock with wupport for timed Acquire
- */
-struct KTimedLock
-{
-    HANDLE mutex;
-    KRefcount refcount;
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_syslock_priv_ */
diff --git a/libs/kproc/win/syslock.c b/libs/kproc/win/syslock.c
deleted file mode 100644
index 4aefc1c..0000000
--- a/libs/kproc/win/syslock.c
+++ /dev/null
@@ -1,725 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-
-#include "syslock-priv.h"
-#include <kproc/timeout.h>
-#include <kproc/lock.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <errno.h>
-#include <assert.h>
-
-/*--------------------------------------------------------------------------
- * KLock
- *  a mutual exclusion lock
- */
-
-/* Whack
- */
-static
-rc_t KLockWhack ( KLock *self )
-{
-    if ( CloseHandle ( self -> mutex ) )
-    {
-        free ( self );
-        return 0;
-    }
-
-    switch ( GetLastError () )
-    {
-    case ERROR_INVALID_HANDLE:
-        return RC ( rcPS, rcLock, rcDestroying, rcLock, rcInvalid );
-    }
-
-    return RC ( rcPS, rcLock, rcDestroying, rcNoObj, rcUnknown );
-}
-
-
-/* Make
- *  make a simple mutex
- */
-LIB_EXPORT rc_t CC KLockMake ( KLock **lockp )
-{
-    rc_t rc;
-    if ( lockp == NULL )
-        rc = RC ( rcPS, rcLock, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KLock *lock = malloc ( sizeof * lock );
-        if ( lock == NULL )
-            rc = RC ( rcPS, rcLock, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            lock -> mutex = CreateMutex ( NULL, false, NULL );
-            if ( lock -> mutex != NULL )
-            {
-                atomic32_set ( & lock -> refcount, 1 );
-                * lockp = lock;
-                return 0;
-            }
-
-            switch ( GetLastError () )
-            {
-            default:
-                rc = RC ( rcPS, rcLock, rcConstructing, rcNoObj, rcUnknown );
-            }
-
-            free ( lock );
-        }
-
-        * lockp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KLockAddRef ( const KLock *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KLock* ) cself ) -> refcount );
-    return 0;
-}
-
-
-LIB_EXPORT rc_t CC KLockRelease ( const KLock *cself )
-{
-    KLock *self = ( KLock* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KLockWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* Acquire
- *  acquires lock
- */
-LIB_EXPORT rc_t CC KLockAcquire ( KLock *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcLocking, rcSelf, rcNull );
-
-    switch ( WaitForSingleObject ( self -> mutex, INFINITE ) )
-    {
-    case WAIT_ABANDONED:
-    case WAIT_OBJECT_0:
-        return 0;
-    case WAIT_TIMEOUT:
-        return RC ( rcPS, rcLock, rcLocking, rcTimeout, rcExhausted );
-    }
-
-    switch ( GetLastError () )
-    {
-    case ERROR_INVALID_HANDLE:
-        return RC ( rcPS, rcLock, rcLocking, rcLock, rcInvalid );
-    }
-
-    return RC ( rcPS, rcLock, rcLocking, rcNoObj, rcUnknown );
-}
-
-/* Unlock
- *  releases lock
- */
-LIB_EXPORT rc_t CC KLockUnlock ( KLock *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcUnlocking, rcSelf, rcNull );
-
-    if ( ReleaseMutex ( self -> mutex ) )
-        return 0;
-
-    switch ( GetLastError () )
-    {
-    case ERROR_INVALID_HANDLE:
-        return RC ( rcPS, rcLock, rcUnlocking, rcLock, rcInvalid );
-    }
-
-    return RC ( rcPS, rcLock, rcUnlocking, rcNoObj, rcUnknown );
-}
-
-
-/*--------------------------------------------------------------------------
- * KTimedLock
- *  a mutual exclusion lock with support for timed Acquire
- */
-
-/* Whack
- */
-static
-rc_t KTimedLockWhack ( KTimedLock *self )
-{
-    if ( CloseHandle ( self -> mutex ) )
-    {
-        free ( self );
-        return 0;
-    }
-
-    switch ( GetLastError () )
-    {
-    case ERROR_INVALID_HANDLE:
-        return RC ( rcPS, rcLock, rcDestroying, rcLock, rcInvalid );
-    }
-
-    return RC ( rcPS, rcLock, rcDestroying, rcNoObj, rcUnknown );
-}
-
-
-/* Make
- *  make a simple mutex
- */
-LIB_EXPORT rc_t CC KTimedLockMake ( KTimedLock **lockp )
-{
-    rc_t rc;
-    if ( lockp == NULL )
-        rc = RC ( rcPS, rcLock, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KTimedLock *lock = malloc ( sizeof * lock );
-        if ( lock == NULL )
-            rc = RC ( rcPS, rcLock, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            lock -> mutex = CreateMutex ( NULL, false, NULL );
-            if ( lock -> mutex != NULL )
-            {
-                atomic32_set ( & lock -> refcount, 1 );
-                * lockp = lock;
-                return 0;
-            }
-
-            switch ( GetLastError () )
-            {
-            default:
-                rc = RC ( rcPS, rcLock, rcConstructing, rcNoObj, rcUnknown );
-            }
-
-            free ( lock );
-        }
-
-        * lockp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KTimedLockAddRef ( const KTimedLock *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KTimedLock* ) cself ) -> refcount );
-    return 0;
-}
-
-
-LIB_EXPORT rc_t CC KTimedLockRelease ( const KTimedLock *cself )
-{
-    KTimedLock *self = ( KTimedLock* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KTimedLockWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* Acquire
- *  acquires lock
- */
-LIB_EXPORT rc_t CC KTimedLockAcquire ( KTimedLock *self, timeout_t *tm )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcLocking, rcSelf, rcNull );
-
-    switch ( WaitForSingleObject( self -> mutex, tm != NULL ? tm -> mS : 0 ) )
-    {
-    case WAIT_ABANDONED:
-    case WAIT_OBJECT_0:
-        return 0;
-    case WAIT_TIMEOUT:
-        if ( tm == NULL )
-            return RC ( rcPS, rcLock, rcLocking, rcLock, rcBusy );
-        return RC ( rcPS, rcLock, rcLocking, rcTimeout, rcExhausted );
-    }
-
-    switch ( GetLastError () )
-    {
-    case ERROR_INVALID_HANDLE:
-        return RC ( rcPS, rcLock, rcLocking, rcLock, rcInvalid );
-    }
-
-    return RC ( rcPS, rcLock, rcLocking, rcNoObj, rcUnknown );
-}
-
-
-/* Unlock
- *  releases lock
- */
-LIB_EXPORT rc_t CC KTimedLockUnlock ( KTimedLock *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcLock, rcUnlocking, rcSelf, rcNull );
-
-    if ( ReleaseMutex ( self -> mutex ) )
-        return 0;
-
-    switch ( GetLastError () )
-    {
-    case ERROR_INVALID_HANDLE:
-        return RC ( rcPS, rcLock, rcUnlocking, rcLock, rcInvalid );
-    }
-
-    return RC ( rcPS, rcLock, rcUnlocking, rcNoObj, rcUnknown );
-}
-
-
-/*--------------------------------------------------------------------------
- * KRWLock
- *  a read/write lock
- */
-struct KRWLock
-{
-    HANDLE mutex;
-    HANDLE rcond;
-    HANDLE wcond;
-    HANDLE ack;
-    atomic32_t refcount;
-    uint32_t rwait;
-    uint32_t wwait;
-    int32_t busy;
-};
-
-
-/* Whack
- */
-static
-rc_t KRWLockWhack ( KRWLock *self )
-{
-    switch ( WaitForSingleObject ( self -> mutex, 0 ) )
-    {
-    case WAIT_ABANDONED:
-    case WAIT_OBJECT_0:
-        if ( self -> busy != 0 || self -> rwait != 0 || self -> wwait != 0 )
-        {
-            ReleaseMutex ( self -> mutex );
-            return RC ( rcPS, rcRWLock, rcDestroying, rcRWLock, rcBusy );
-        }
-        ReleaseMutex ( self -> mutex );
-        break;
-    case WAIT_TIMEOUT:
-        return RC ( rcPS, rcRWLock, rcDestroying, rcRWLock, rcBusy );
-    }
-
-    CloseHandle ( self -> ack );
-    CloseHandle ( self -> wcond );
-    CloseHandle ( self -> rcond );
-    CloseHandle ( self -> mutex );
-
-    free ( self );
-    return 0;
-}
-
-
-/* Make
- *  make a simple read/write lock
- */
-LIB_EXPORT rc_t CC KRWLockMake ( KRWLock **lockp )
-{
-    rc_t rc;
-
-    if ( lockp == NULL )
-        rc = RC ( rcPS, rcRWLock, rcConstructing, rcParam, rcNull );
-    else
-    {
-        KRWLock *lock = malloc ( sizeof * lock );
-        if ( lock == NULL )
-            rc = RC ( rcPS, rcRWLock, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            DWORD status;
-            lock -> mutex = CreateMutex ( NULL, false, NULL );
-            if ( lock -> mutex == NULL )
-                status = GetLastError ();
-            else
-            {
-                lock -> rcond = CreateEvent ( NULL, true, false, NULL );
-                if ( lock -> rcond == NULL )
-                    status = GetLastError ();
-                else
-                {
-                    lock -> wcond = CreateEvent ( NULL, true, false, NULL );
-                    if ( lock -> wcond == NULL )
-                        status = GetLastError ();
-                    else
-                    {
-                        lock -> ack = CreateEvent ( NULL, true, false, NULL );
-                        if ( lock -> ack != NULL )
-                        {
-                            atomic32_set ( & lock -> refcount, 1 );
-                            lock -> rwait = lock -> wwait = 0;
-                            lock -> busy = 0;
-                            * lockp = lock;
-                            return 0;
-                        }
-
-                        status = GetLastError ();
-                        CloseHandle ( lock -> wcond );
-                    }
-
-                    CloseHandle ( lock -> rcond );
-                }
-
-                CloseHandle ( lock -> mutex );
-            }
-
-            switch ( status )
-            {
-            default:
-                rc = RC ( rcPS, rcRWLock, rcConstructing, rcNoObj, rcUnknown );
-            }
-
-            free ( lock );
-        }
-
-        * lockp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KRWLockAddRef ( const KRWLock *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KRWLock* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KRWLockRelease ( const KRWLock *cself )
-{
-    KRWLock *self = ( KRWLock* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-        {
-            atomic32_set ( & self -> refcount, 1 );
-            return KRWLockWhack ( self );
-        }
-    }
-    return 0;
-}
-
-
-/* AcquireShared
- *  acquires read ( shared ) lock
- */
-static
-rc_t KRWLockAcquireSharedInt ( KRWLock *self, DWORD mS )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    /* acquire mutex */
-    switch ( WaitForSingleObject ( self -> mutex, mS ) )
-    {
-    case WAIT_ABANDONED:
-    case WAIT_OBJECT_0:
-        break;
-    case WAIT_TIMEOUT:
-        return RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcExhausted );
-    default:
-        return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    /* don't allow readers if writers are waiting */
-    if ( self -> rwait != 0 || self -> wwait != 0 || self -> busy < 0 )
-    {
-        /* indicate a waiting read lock request on our mutex */
-        ++ self -> rwait;
-
-        switch ( SignalObjectAndWait ( self -> mutex, self -> rcond, mS, false ) )
-        {
-        case WAIT_OBJECT_0:
-
-            /* drop wait count under unlock mutex */
-            -- self -> rwait;
-
-            /* release unlock and reacquire */
-            switch ( SignalObjectAndWait ( self -> ack, self -> mutex, INFINITE, false ) )
-            {
-            case WAIT_ABANDONED:
-            case WAIT_OBJECT_0:
-                break;
-            case WAIT_FAILED:
-                switch ( GetLastError () )
-                {
-                case ERROR_INVALID_HANDLE:
-                    return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcInvalid );
-                }
-            default:
-                return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-            }
-            break;
-
-        case WAIT_TIMEOUT:
-
-            /* need to drop count, but don't have mutex */
-            switch ( WaitForSingleObject ( self -> mutex, INFINITE ) )
-            {
-            case WAIT_ABANDONED:
-            case WAIT_OBJECT_0:
-                break;
-            case WAIT_FAILED:
-                switch ( GetLastError () )
-                {
-                case ERROR_INVALID_HANDLE:
-                    return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcInvalid );
-                }
-            default:
-                return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-            }
-
-            /* drop count and go */
-            -- self -> rwait;
-            ReleaseMutex ( self -> mutex );
-            return RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcExhausted );
-
-        case WAIT_FAILED:
-            switch ( GetLastError () )
-            {
-            case ERROR_INVALID_HANDLE:
-                return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcInvalid );
-            }
-
-        default:
-            return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-        }
-    }
-
-    assert ( self -> busy >= 0 );
-    ++ self -> busy;
-
-    ReleaseMutex ( self -> mutex );
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KRWLockAcquireShared ( KRWLock *self )
-{
-    return KRWLockAcquireSharedInt ( self, INFINITE );
-}
-
-LIB_EXPORT rc_t CC KRWLockTimedAcquireShared ( KRWLock *self, timeout_t *tm )
-{
-    return KRWLockAcquireSharedInt ( self, tm != NULL ? tm -> mS : 0 );
-}
-
-
-/* AcquireExcl
- *  acquires write ( exclusive ) lock
- */
-static
-rc_t KRWLockAcquireExclInt ( KRWLock *self, DWORD mS )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcLocking, rcSelf, rcNull );
-
-    /* acquire mutex */
-    switch ( WaitForSingleObject ( self -> mutex, mS ) )
-    {
-    case WAIT_ABANDONED:
-    case WAIT_OBJECT_0:
-        break;
-    case WAIT_TIMEOUT:
-        return RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcExhausted );
-    default:
-        return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-    }
-
-    if ( self -> wwait != 0 || self -> busy != 0 )
-    {
-        /* indicate a waiting write lock request on our mutex */
-        ++ self -> wwait;
-
-        switch ( SignalObjectAndWait ( self -> mutex, self -> wcond, mS, false ) )
-        {
-        case WAIT_OBJECT_0:
-
-            /* drop wait count under unlock mutex */
-            -- self -> wwait;
-
-            /* release unlock and reacquire */
-            switch ( SignalObjectAndWait ( self -> ack, self -> mutex, INFINITE, false ) )
-            {
-            case WAIT_ABANDONED:
-            case WAIT_OBJECT_0:
-                break;
-            case WAIT_FAILED:
-                switch ( GetLastError () )
-                {
-                case ERROR_INVALID_HANDLE:
-                    return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcInvalid );
-                }
-            default:
-                return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-            }
-            break;
-
-        case WAIT_TIMEOUT:
-
-            /* need to drop count, but don't have mutex */
-            switch ( WaitForSingleObject ( self -> mutex, INFINITE ) )
-            {
-            case WAIT_ABANDONED:
-            case WAIT_OBJECT_0:
-                break;
-            case WAIT_FAILED:
-                switch ( GetLastError () )
-                {
-                case ERROR_INVALID_HANDLE:
-                    return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcInvalid );
-                }
-            default:
-                return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-            }
-
-            /* drop count and go */
-            -- self -> wwait;
-            ReleaseMutex ( self -> mutex );
-            return RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcExhausted );
-
-        case WAIT_FAILED:
-            switch ( GetLastError () )
-            {
-            case ERROR_INVALID_HANDLE:
-                return RC ( rcPS, rcRWLock, rcLocking, rcRWLock, rcInvalid );
-            }
-
-        default:
-            return RC ( rcPS, rcRWLock, rcLocking, rcNoObj, rcUnknown );
-        }
-    }
-
-    assert ( self -> busy == 0 );
-    -- self -> busy;
-
-    ReleaseMutex ( self -> mutex );
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KRWLockAcquireExcl ( KRWLock *self )
-{
-    return KRWLockAcquireExclInt ( self, INFINITE );
-}
-
-LIB_EXPORT rc_t CC KRWLockTimedAcquireExcl ( KRWLock *self, timeout_t *tm )
-{
-    return KRWLockAcquireExclInt ( self, tm != NULL ? tm -> mS : 0 );
-}
-
-
-/* Unlock
- *  releases lock
- */
-LIB_EXPORT rc_t CC KRWLockUnlock ( KRWLock *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcRWLock, rcUnlocking, rcSelf, rcNull );
-
-    /* acquire mutex */
-    switch ( WaitForSingleObject ( self -> mutex, INFINITE ) )
-    {
-    case WAIT_ABANDONED:
-    case WAIT_OBJECT_0:
-        break;
-    case WAIT_TIMEOUT:
-        return RC ( rcPS, rcRWLock, rcUnlocking, rcTimeout, rcExhausted );
-    default:
-        return RC ( rcPS, rcRWLock, rcUnlocking, rcNoObj, rcUnknown );
-    }
-
-    /* adjust busy */
-    if ( self -> busy > 0 )
-        -- self -> busy;
-    else if ( self -> busy < 0 )
-    {
-        ++ self -> busy;
-        assert ( self -> busy == 0 );
-    }
-
-    /* detect a zero crossing and waiters */
-    if ( self -> busy != 0 || ( self -> wwait == 0 && self -> rwait == 0 ) )
-        rc = 0;
-    else
-    {
-        HANDLE cond = self -> wwait != 0 ? self -> wcond : self -> rcond;
-        switch ( SignalObjectAndWait ( cond, self -> ack, INFINITE, false ) )
-        {
-        case WAIT_OBJECT_0:
-            rc = 0;
-            break;
-        case WAIT_FAILED:
-            switch ( GetLastError () )
-            {
-            case ERROR_INVALID_HANDLE:
-                rc = RC ( rcPS, rcRWLock, rcUnlocking, rcRWLock, rcInvalid );
-                break;
-            default:
-                rc = RC ( rcPS, rcRWLock, rcUnlocking, rcNoObj, rcUnknown );
-            }
-            break;
-
-        default:
-            rc = RC ( rcPS, rcRWLock, rcUnlocking, rcNoObj, rcUnknown );
-        }
-    }
-
-    ReleaseMutex ( self -> mutex );
-    return rc;
-}
diff --git a/libs/kproc/win/sysmgr.c b/libs/kproc/win/sysmgr.c
deleted file mode 100644
index 02f2c32..0000000
--- a/libs/kproc/win/sysmgr.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-#include <kproc/procmgr.h>
-
-/* OnMainThread
- *  returns true if running on main thread
- */
-LIB_EXPORT bool CC KProcMgrOnMainThread ( void )
-{
-    /* don't know how to do this on Winders */
-    return false;
-}
diff --git a/libs/kproc/win/systhread.c b/libs/kproc/win/systhread.c
deleted file mode 100644
index fbef9ce..0000000
--- a/libs/kproc/win/systhread.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-#include <kproc/thread.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <stdlib.h>
-#include <errno.h>
-
-
-/*--------------------------------------------------------------------------
- * KThread
- *  a CPU execution thread
- */
-struct KThread
-{
-    /* thread entrypoint and data */
-    rc_t ( * run ) ( const KThread*, void* );
-    void *data;
-
-    HANDLE thread_handle;
-    DWORD  thread_id;
-    atomic32_t waiting;
-    atomic32_t refcount;
-    rc_t rc;
-    bool join;
-};
-
-
-/* Whack
- */
-static
-rc_t KThreadWhack ( KThread *self )
-{
-    if ( self -> join )
-    {
-        WaitForSingleObject( self->thread_handle, INFINITE );
-    }
-
-    free ( self );
-    return 0;
-}
-
-
-/* Run
- */
-
-/*
-static
-void *KThreadRun ( void *td )
-{
-    KThread *self = td;
-
-    self -> rc = ( * self -> run ) ( self, self -> data );
-
-    if ( atomic32_dec_and_test ( & self -> refcount ) )
-        free ( self );
-
-    return NULL;
-}
-*/
-
-static DWORD WINAPI int_ThreadProc( LPVOID lpParameter )
-{
-    KThread *self = ( KThread * )lpParameter;
-
-    /* run the function */
-    self -> rc = ( * self -> run ) ( self, self -> data );
-
-    /* release thread's reference */
-    if ( atomic32_dec_and_test ( & self -> refcount ) )
-        free ( self );
-
-    return 0;
-}
-
-
-/* Make
- *  create and run a thread
- *
- *  "run_thread" [ IN ] - thread entrypoint
- *
- *  "data" [ IN, OPAQUE ] - user-supplied thread data
- */
-LIB_EXPORT rc_t CC KThreadMake ( KThread **tp,
-    rc_t ( CC * run_thread ) ( const KThread*, void* ), void *data )
-{
-    rc_t rc;
-    if ( tp == NULL )
-        rc = RC ( rcPS, rcThread, rcCreating, rcParam, rcNull );
-    else
-    {
-        if ( run_thread == NULL )
-            rc = RC ( rcPS, rcThread, rcCreating, rcFunction, rcNull );
-        else
-        {
-            KThread *t = malloc ( sizeof * t );
-            if ( t == NULL )
-                rc = RC ( rcPS, rcThread, rcCreating, rcMemory, rcExhausted );
-            else
-            {
-                /* finish constructing thread */
-                t -> run = run_thread;
-                t -> data = data;
-                atomic32_set ( & t -> waiting, 0 );
-                atomic32_set ( & t -> refcount, 2 );
-                t -> rc = 0;
-                t -> join = true;
-
-                /* attempt to create thread */
-                t -> thread_handle = CreateThread(
-                    NULL,               /* default security attributes */
-                    0,                  /* use default stack size */
-                    int_ThreadProc,     /* thread function */
-                    t,                  /* argument to thread function */
-                    0,                  /* run immediately */
-                    &t->thread_id );    /* returns the thread identifier */
-
-                /* status = pthread_create ( & t -> thread, 0, KThreadRun, t ); */
-                if ( t->thread_handle != NULL )
-                {
-                    * tp = t;
-                    return 0;
-                }
-
-                rc = RC ( rcPS, rcThread, rcCreating, rcNoObj, rcUnknown );
-                /* see why we failed */
-                /*
-                switch ( status )
-                {
-                case EAGAIN:
-                    rc = RC ( rcPS, rcThread, rcCreating, rcThread, rcExhausted );
-                    break;
-                default:
-                    rc = RC ( rcPS, rcThread, rcCreating, rcNoObj, rcUnknown );
-                }
-                */
-
-                free ( t );
-            }
-        }
-
-        * tp = NULL;
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC KThreadAddRef ( const KThread *cself )
-{
-    if ( cself != NULL )
-        atomic32_inc ( & ( ( KThread* ) cself ) -> refcount );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KThreadRelease ( const KThread *cself )
-{
-    KThread *self = ( KThread* ) cself;
-    if ( cself != NULL )
-    {
-        if ( atomic32_dec_and_test ( & self -> refcount ) )
-            return KThreadWhack ( self );
-    }
-    return 0;
-}
-
-
-/* Cancel
- *  signal the thread to finish
- */
-LIB_EXPORT rc_t CC KThreadCancel ( KThread *self )
-{
-/*    int status;*/
-    bool success;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcThread, rcSignaling, rcSelf, rcNull );
-
-    success = TerminateThread( self->thread_handle, 0 );
-    if ( !success )
-        return RC ( rcPS, rcThread, rcSignaling, rcNoObj, rcUnknown );
-
-/*
-    status = pthread_cancel ( self -> thread );
-    switch ( status )
-    {
-    case 0:
-        break;
-    case ESRCH:
-        self -> join = false;
-        return RC ( rcPS, rcThread, rcSignaling, rcThread, rcDestroyed );
-    default:
-        return RC ( rcPS, rcThread, rcSignaling, rcNoObj, rcUnknown );
-    }
-*/
-
-    return 0;
-}
-
-
-/* Wait
- *  waits for a thread to exit
- *
- *  "status" [ OUT ] - return parameter for thread's exit code
- */
-LIB_EXPORT rc_t CC KThreadWait ( KThread *self, rc_t *out )
-{
-    DWORD wait_res;
-
-    if ( self == NULL )
-        return RC ( rcPS, rcThread, rcWaiting, rcSelf, rcNull );
-
-    /* prevent multiple waiters */
-    if ( atomic32_test_and_set ( & self -> waiting, 0, 1 ) != 0 )
-        return RC ( rcPS, rcThread, rcWaiting, rcThread, rcBusy );
-
-    wait_res = WaitForSingleObject( self->thread_handle, INFINITE );
-
-    /* release waiter lock */                                                                                                                                                                                   
-    atomic32_set ( & self -> waiting, 0 );
-
-    switch( wait_res )
-    {
-    case WAIT_FAILED :
-        return RC ( rcPS, rcThread, rcWaiting, rcNoObj, rcUnknown );
-    }
-/*
-    switch ( status )
-    {
-    case 0:
-        break;
-    case ESRCH:
-        return RC ( rcPS, rcThread, rcWaiting, rcThread, rcDestroyed );
-    case EINVAL:
-        return RC ( rcPS, rcThread, rcWaiting, rcThread, rcDetached );
-    case EDEADLK:
-        return RC ( rcPS, rcThread, rcWaiting, rcThread, rcDeadlock );
-    default:
-        return RC ( rcPS, rcThread, rcWaiting, rcNoObj, rcUnknown );
-    }
-*/
-
-    self -> join = false;
-
-/*
-    if ( td == PTHREAD_CANCELED )
-        self -> rc = RC ( rcPS, rcThread, rcWaiting, rcThread, rcCanceled );
-*/
-    if ( out != NULL )
-        * out = self -> rc;
-
-    return 0;
-}
-
-
-/* Detach
- *  allow thread to run independently of group
- */
-LIB_EXPORT rc_t CC KThreadDetach ( KThread *self )
-{
-    return RC ( rcPS, rcThread, rcDetaching, rcMessage, rcUnsupported );
-}
diff --git a/libs/kproc/win/systimeout.c b/libs/kproc/win/systimeout.c
deleted file mode 100644
index 36473ab..0000000
--- a/libs/kproc/win/systimeout.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kproc/extern.h>
-
-#include <os-native.h>
-#include <kproc/timeout.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <stdlib.h>
-#include <errno.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * timeout_t
- *  a structure for communicating a timeout
- *  which under Unix converts to an absolute time once prepared
- */
-
-
-/* Init
- *  initialize a timeout in milliseconds
- */
-LIB_EXPORT rc_t TimeoutInit ( timeout_t *tm, uint32_t msec )
-{
-    if ( tm == NULL )
-        return RC ( rcPS, rcTimeout, rcConstructing, rcSelf, rcNull );
-
-    tm -> mS = msec;
-    tm -> prepared = true;
-
-    return 0;
-}
-
-/* Prepare
- *  ensures that a timeout is prepared with an absolute value
-*/
-LIB_EXPORT rc_t TimeoutPrepare ( timeout_t *self )
-{
-    if ( self == NULL )
-        return RC ( rcPS, rcTimeout, rcUpdating, rcSelf, rcNull );
-
-    return 0;
-}
diff --git a/libs/krypto/.gitignore b/libs/krypto/.gitignore
deleted file mode 100644
index 4525e83..0000000
--- a/libs/krypto/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.list
-
diff --git a/libs/krypto/Makefile b/libs/krypto/Makefile
deleted file mode 100644
index 11e16ec..0000000
--- a/libs/krypto/Makefile
+++ /dev/null
@@ -1,297 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: all
-
-USE_GCC_IF_ICC = 1
-
-TOP ?= $(abspath ../..)
-MODULE = libs/krypto
-
-INT_LIBS = \
-	libkrypto
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES = \
-	$(KRYPTO_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-ifeq ($(OS),linux)
-	INT_LIBS += libkryptotest
-	OBJFILES += $(KRYPTOTEST_OBJ)
-endif
-
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-# This differs from other sister Makefiles in needing three other symbols defined
-# VEC_SUPPORTED, VECREG_SUPPORTED and AESNI_SUPPORTED
-# The successive symbols are additive
-# In order they are the compiler supports  the vector 'container' type,
-# the processor has supported vector registers
-# the processor supports the Intel AES-NI instruction set
-#
-# The prerequisite call to make compiler-test will have tried to compile objects
-# that show such support if the objec can be made
-all std: makedirs compiler-test compile
-	@ $(MAKE_CMD) \
-		VEC_SUPPORTED=$(shell if test -f $(OBJDIR)/compile-test.vec.$(LOBX) ; then echo "true"; else echo "false" ; fi) \
-		VECREG_SUPPORTED=$(shell if test -f $(OBJDIR)/compile-test.vecreg.$(LOBX) ; then echo "true"; else echo "false" ; fi) \
-		AESNI_SUPPORTED=$(shell if test -f $(OBJDIR)/compile-test.aes-ni.$(LOBX) ; then echo "true"; else echo "false" ; fi) \
-		$(TARGDIR)/std || \
-	( echo "reattempting without AES-NI instructions"; \
-	  $(MAKE_CMD) \
-		VEC_SUPPORTED=$(shell if test -f $(OBJDIR)/compile-test.vec.$(LOBX) ; then echo "true"; else echo "false" ; fi) \
-		VECREG_SUPPORTED=$(shell if test -f $(OBJDIR)/compile-test.vecreg.$(LOBX) ; then echo "true"; else echo "false" ; fi) \
-		AESNI_SUPPORTED=false \
-		$(TARGDIR)/std ) || \
-	( echo "reattempting without vector register instructions"; \
-	  $(MAKE_CMD) \
-		VEC_SUPPORTED=$(shell if test -f $(OBJDIR)/compile-test.vec.$(LOBX) ; then echo "true"; else echo "false" ; fi) \
-		VECREG_SUPPORTED=false \
-		AESNI_SUPPORTED=false \
-		$(TARGDIR)/std ) || \
-	( echo "reattempting without vector instructions"; \
-	  $(MAKE_CMD) \
-		VEC_SUPPORTED=false \
-		VECREG_SUPPORTED=false \
-		AESNI_SUPPORTED=false \
-		$(TARGDIR)/std )
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-#	@echo VEC_SUPPORTED $(VEC_SUPPORTED)
-#	@echo VECREG_SUPPORTED $(VECREG_SUPPORTED)
-#	@echo AESNI_SUPPORTED $(AESNI_SUPPORTED)
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# compiler-test
-#
-.PHONY: compiler-test $(TARGDIR)/compiler-test
-
-# Silently try to compile three objects
-compiler-test : makedirs
-	@ $(MAKE_CMD) -i $(TARGDIR)/compiler-test >/dev/null 2>/dev/null
-
-
-COMPILE_TEST_SRC = \
-	compile-test.vec \
-	compile-test.vecreg \
-	compile-test.aes-ni
-
-COMPILE_TEST_OBJ = \
-	$(addsuffix .$(LOBX),$(COMPILE_TEST_SRC))
-
-$(TARGDIR)/compiler-test : $(COMPILE_TEST_OBJ)
-	@echo VEC_SUPPORTED $(VEC_SUPPORTED)
-	@echo VECREG_SUPPORTED $(VECREG_SUPPORTED)
-	@echo AESNI_SUPPORTED $(AESNI_SUPPORTED)
-
-#-------------------------------------------------------------------------------
-# define some additional compiler flags for special object file types
-# currently only gcc is supported and it turns out only with 4.4.0 and up
-# though other compilers could also be supported
-ifeq ($(COMP),gcc)
-CC_LISTING = -Wa,-ahlms=$(<D)/$(@F).list
-_CC_AES_NI  = -funsafe-math-optimizations -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -maes -Wa,-march=generic64+aes $(CC_LISTING)
-_CC_VECREG  = -funsafe-math-optimizations -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -Wa,-march=generic64+sse4 $(CC_LISTING)
-_CC_VEC     = $(CC_LISTING)
-else
-_CC_LISTING =
-_CC_AES_NI  =
-_CC_VECREG  =
-_CC_VEC     =
-endif
-
-ifeq ($(VEC_SUPPORTED),true)
-CC_VEC = $(_CC_VEC)
-else
-CC_VEC =
-endif
-
-ifeq ($(VECREG_SUPPORTED),true)
-CC_VECREG = $(_CC_VECREG)
-else
-CC_VECREG = 
-endif
-
-ifeq ($(AESNI_SUPPORTED),true)
-CC_AES_NI = $(_CC_AES_NI)
-else
-CC_AES_NI = 
-endif
-
-# Rules for making objects using compiler vectors
-compile-test.vec.pic.o : compile-test.c
-	@ echo +++++ Making $@ using its own rule
-	@ echo $@ $(_CC_VEC)
-	$(CC) -o $@ -fPIC $(OPT) -D_LIBRARY -DUSEVEC $(_CC_VEC) $<
-
-
-%.vec.$(LOBX): %.c
-	$(CC) -o $@ -fPIC $(OPT) -D_LIBRARY -DUSEVEC $(CC_VEC) $<
-
-
-# Rules for making objects using vectors in registers
-compile-test.vecreg.pic.o : compile-test.c
-	@ echo +++++ Making $@ using its own rule
-	@ echo $@ $(_CC_VECREG)
-	$(CC) -o $@ -fPIC $(OPT) -D_LIBRARY -DUSEVEC -DUSEVECREG $(_CC_VECREG) $<
-
-%.vecreg.$(LOBX): %.c
-	$(CC) -o $@ -fPIC $(OPT) -D_LIBRARY -DUSEVEC -DUSEVECREG $(CC_VECREG) $<
-
-
-# Rules for making objects using AES-NI extensions vectors in registers
-compile-test.aes-ni.pic.o : compile-test.c
-	@ echo +++++ Making $@ using its own rule
-	@ echo $@ $(_CC_AES_NI)
-	$(CC) -o $@ -fPIC $(OPT) -D_LIBRARY -DUSEVEC -DUSEVECREG -DUSEAESNI $(_CC_AES_NI) $<
-
-%.aes-ni.$(LOBX): %.c
-	$(CC) -o $@ -fPIC $(OPT) -D_LIBRARY -DUSEVEC -DUSEVECREG -DUSEAESNI $(CC_AES_NI) $<
-
-
-
-#-------------------------------------------------------------------------------
-# krypto
-#
-$(ILIBDIR)/libkrypto: $(addprefix $(ILIBDIR)/libkrypto.,$(ILIBEXT))
-
-ALL_LIB_SRC = \
-	ciphermgr \
-	wgaencrypt \
-	encfile \
-	encfilev2 \
-	cipher \
-	aes_core \
-	aes-byte \
-	cipher-byte \
-	key \
-	reencfile
-
-LIB_SRC = \
-	no-null-ncbi
-
-TEST_LIB_SRC =  \
-	testcipher
-
-ifeq ($(VEC_SUPPORTED),true)
-ALL_LIB_SRC += \
-	cipher-vec.vec \
-	aes-ncbi.vec
-LIB_SRC += \
-	no-null-ncbi.vec
-TEST_LIB_SRC += 
-else
-ALL_LIB_SRC += \
-	cipher-no-vec.vec
-LIB_SRC += \
-	no-null-ncbi.vec
-TEST_LIB_SRC += 
-endif
-
-ifeq ($(VECREG_SUPPORTED),true)
-ALL_LIB_SRC += \
-	cipher-vec.vecreg \
-	aes-ncbi.vecreg
-LIB_SRC += \
-	no-null-ncbi.vecreg
-TEST_LIB_SRC += 
-else
-ALL_LIB_SRC += \
-	cipher-no-vec.vecreg
-LIB_SRC += \
-	no-null-ncbi.vecreg
-TEST_LIB_SRC += 
-endif
-
-ifeq ($(AESNI_SUPPORTED),true)
-ALL_LIB_SRC += \
-	cipher-vec.aes-ni \
-	aes-ncbi.aes-ni
-LIB_SRC += \
-	no-null-ncbi.aes-ni
-TEST_LIB_SRC += 
-else
-ALL_LIB_SRC += \
-	cipher-no-vec.aes-ni
-LIB_SRC += \
-	no-null-ncbi.aes-ni
-TEST_LIB_SRC += 
-endif
-
-
-KRYPTO_SRC = $(ALL_LIB_SRC) $(LIB_SRC)
-
-KRYPTO_OBJ = \
-	$(addsuffix .$(LOBX),$(KRYPTO_SRC))
-
-KRYPTO_LIB = \
-
-$(ILIBDIR)/libkrypto.$(LIBX): $(KRYPTO_OBJ)
-	$(LD) --slib -o $@ $^ $(KRYPTO_LIB)
-
-
-#-------------------------------------------------------------------------------
-# kryptotest
-#
-
-$(ILIBDIR)/libkryptotest: $(addprefix $(ILIBDIR)/libkryptotest.,$(ILIBEXT))
-
-KRYPTOTEST_SRC = $(TEST_LIB_SRC)
-
-KRYPTOTEST_OBJ = \
-	$(addsuffix .$(LOBX),$(KRYPTOTEST_SRC))
-
-KRYPTOTEST_LIB = \
-
-$(ILIBDIR)/libkryptotest.$(LIBX): $(KRYPTOTEST_OBJ)
-	$(LD) --slib -o $@ $^ $(KRYPTOTEST_LIB)
-
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/krypto/aes-byte.c b/libs/krypto/aes-byte.c
deleted file mode 100644
index 29e104b..0000000
--- a/libs/krypto/aes-byte.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-#include <krypto/extern.h>
-#include <klib/defs.h>
-
-#include "aes-priv.h"
-#include "cipher-priv.h"
-
-#include <klib/rc.h>
-
-#include <string.h>
-#include <assert.h>
-
-
-/* instantiate for class functions that use the VT */
-#define BLOCKCIPHER_BYTE_IMPL KAESBlockCipherByte
-#include "blockcipher-impl.h"
-
-static const char KAESByteBlockCipherClassName[] = "KAESCipherByte";
-
-static
-void KAESBlockCipherByteDestroy (const KAESBlockCipherByte * self)
-{
-    /* we use a constant object */
-}
-
-
-static
-uint32_t KAESBlockCipherByteBlockSize ()
-{
-    return AES_BLOCK_SIZE;
-}
-
-
-/* ----------------------------------------------------------------------
- * KeySize
- *   How large is the stored key for this cipher?  Not the user key used
- *   to create this key (key schedule)
- *
- *   This is needed by KCipher to know how large the KCipher objecr is at
- *   allocation and to know how much of a buffer each decryption/encryption is
- */
-static
-uint32_t KAESBlockCipherByteKeySize ()
-{
-    return  (uint32_t)sizeof (AES_KEY);
-}
-
-
-/* ----------------------------------------------------------------------
- * SetEncryptKey
- *   The KCipher calls this to have the block cipher build an encryption
- *   key in the KCipher object
- *
- */
-static
-rc_t KAESBlockCipherByteSetEncryptKey (void * encrypt_key,
-                                       const char * user_key,
-                                       uint32_t user_key_size)
-{
-    int iii;
-    rc_t rc;
-
-    assert (encrypt_key);
-    assert (user_key);
-    assert (user_key_size != 0);
-
-    iii = AES_set_encrypt_key((const unsigned char *)user_key,
-                              (int)user_key_size * 8,
-                              encrypt_key);
-    if (iii == 0)
-        rc = 0;
-    else
-    {
-        switch (iii)
-        {
-        default: /* not in the code when this was written */
-            rc = RC (rcKrypto, rcCipher, rcUpdating, rcEncryptionKey, rcUnknown);
-            break;
-
-        case -1: /* bad parameters */
-            rc = RC (rcKrypto, rcCipher, rcUpdating, rcParam, rcInvalid);
-            break;
-
-        case -2: /* bad bit count */
-            rc = RC (rcKrypto, rcCipher, rcUpdating, rcParam, rcIncorrect);
-            break;
-        }
-        memset (encrypt_key, 0, sizeof (AES_KEY));
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * SetDecryptKey
- *   The KCipher calls this to have the block cipher build an decryption
- *   key in the KCipher object
- *
- */
-static
-rc_t KAESBlockCipherByteSetDecryptKey (void * decrypt_key,
-                                       const char * user_key,
-                                       uint32_t user_key_size)
-{
-    int iii;
-    rc_t rc;
-
-    assert (decrypt_key);
-    assert (user_key);
-    assert (user_key_size != 0);
-
-    iii = AES_set_decrypt_key((const unsigned char *)user_key, (int)user_key_size * 8,
-                              decrypt_key);
-    if (iii == 0)
-        rc = 0;
-    else
-    {
-        switch (iii)
-        {
-        default: /* not in the code when this was written */
-            rc = RC (rcKrypto, rcCipher, rcUpdating, rcEncryptionKey, rcUnknown);
-            break;
-
-        case -1: /* bad parameters */
-            rc = RC (rcKrypto, rcCipher, rcUpdating, rcParam, rcInvalid);
-            break;
-
-        case -2: /* bad bit count */
-            rc = RC (rcKrypto, rcCipher, rcUpdating, rcParam, rcIncorrect);
-            break;
-        }
-        memset (decrypt_key, 0, sizeof (AES_KEY));
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * Encrypt
- *
- *   Perform an encryption of a single block.  Chained modes and stream
- *   cipher modes will call this multiple times.
- *
- */
-static
-void KAESBlockCipherByteEncrypt (const CipherBlock in,
-                                 CipherBlock out,
-                                 const void * key)
-{
-    assert (in);
-    assert (out);
-    assert (key);
-
-    AES_encrypt ((const uint8_t*)in, (uint8_t*)out, key);
-}
-
-
-/* ----------------------------------------------------------------------
- * Decrypt
- *
- *   Perform a decryption of a single block.  Chained modes and stream
- *   cipher modes will call this multiple times.
- *
- */
-static
-void KAESBlockCipherByteDecrypt (const CipherBlock in,
-                                 CipherBlock out,
-                                 const void * key)
-{
-    assert (in);
-    assert (out);
-    assert (key);
-
-    AES_decrypt ((const uint8_t*)in, (uint8_t*)out, key);
-}
-
-
-static const struct
-KBlockCipherByte_vt_v1 aes_vt = 
-{
-    /* .version */
-    { 1, 0 },
-
-    KAESBlockCipherByteDestroy,
-
-    KAESBlockCipherByteBlockSize,
-    KAESBlockCipherByteKeySize,
-
-    KAESBlockCipherByteSetEncryptKey,
-    KAESBlockCipherByteSetDecryptKey,
-
-    KAESBlockCipherByteEncrypt,
-    KAESBlockCipherByteDecrypt
-};
-
-
-rc_t KAESBlockCipherByteMake (KBlockCipherByte ** pobj)
-{
-    rc_t rc;
-
-    if (pobj == NULL)
-        rc = RC (rcKrypto, rcBlockCipher, rcConstructing, rcSelf, rcNull);
-
-    else
-    {
-        rc = 0;
-        *pobj = (KBlockCipherByte*)&aes_vt;
-    }
-    return rc;
-}
-
-/* EOF */
-
diff --git a/libs/krypto/aes-impl.c b/libs/krypto/aes-impl.c
deleted file mode 100644
index 328ba6d..0000000
--- a/libs/krypto/aes-impl.c
+++ /dev/null
@@ -1 +0,0 @@
-#error "Obsolete do not use"
diff --git a/libs/krypto/aes-ncbi-ni.c b/libs/krypto/aes-ncbi-ni.c
deleted file mode 100644
index a139771..0000000
--- a/libs/krypto/aes-ncbi-ni.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#error "Obsolete do not use"
-
diff --git a/libs/krypto/aes-ncbi-priv.h b/libs/krypto/aes-ncbi-priv.h
deleted file mode 100644
index 5738029..0000000
--- a/libs/krypto/aes-ncbi-priv.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#ifndef _h_krypto_aes_ncbi_priv_libs_
-#define _h_krypto_aes_ncbi_priv_libs_
-
-#include <klib/defs.h>
-#include <v128.h>
-
-#include "ncbi-priv.h"
-#include "cipher-impl.h"
-#include "blockcipher-impl.h"
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-
-/* ======================================================================
- * FIPS-197 2.1
- */
-#define AES_BLOCK_BITS (128)
-#define AES_BLOCK_BYTES (AES_BLOCK_BITS/8)
-
-
-/* ======================================================================
- * FIPS-197 3,4 - 3.5
- *
- * FIPS-197 defines Nk as number of 32-bit words in the user key
- */
-#define AES_Nk_128 (4)
-#define AES_Nk_192 (6)
-#define AES_Nk_256 (8)
-
-
-/*
- * FIPS-197 defines Nb as number of 32-bit words in the cipher block
- *
- * There is much odd naming in the document from the perspective of a software
- * engineer.
- */
-#define AES_Nb (4)
-#define AES_Nb_128 (AES_Nb)
-#define AES_Nb_192 (AES_Nb)
-#define AES_Nb_256 (AES_Nb)
-
-
-/* 
- * FIPS-197 defines Nr as the number of rounds for a cipher of a given original 
- * user key length.
- *
- * Another odd naming as it is really the zero based highest round offset
- * as 1 first round + Nr-1 middle rounds + 1 last round are performed for
- * each encrypt or decrypt block.  There are thus Nr + 1 round keys needed
- * in the encryption and decryption key schedules
- */
-#define AES_Nr_128 (10)
-#define AES_Nr_192 (12)
-#define AES_Nr_256 (14)
-#define AES_Nr_MAX (15)
-
-/* Most useful for testingg against Appendix A-C of the FIPS-197 document */
-#define DEBUG_OBJECT(msg) DBGMSG(DBG_AES,DBG_FLAG(DBG_AES_OBJECT), msg)
-#define DEBUG_KEYEXP(msg) DBGMSG(DBG_AES,DBG_FLAG(DBG_AES_KEYEXP), msg)
-#define DEBUG_CIPHER(msg) DBGMSG(DBG_AES,DBG_FLAG(DBG_AES_CIPHER), msg)
-#define DEBUG_INVKEYEXP(msg) DBGMSG(DBG_AES,DBG_FLAG(DBG_AES_INVKEYEXP), msg)
-#define DEBUG_INVCIPHER(msg) DBGMSG(DBG_AES,DBG_FLAG(DBG_AES_INVCIPHER), msg)
-
-#define DEBUG_CIPHER_MVECTOR(M,v)                                   \
-    DBGMSG(DBG_AES,DBG_FLAG(DBG_AES_CIPHER),                        \
-           ("%s:\t%0.8x %0.8x %0.8x %0.8x\n",M,                     \
-            v.columns[0],v.columns[1],v.columns[2],v.columns[3]))
-#define DEBUG_INVCIPHER_MVECTOR(M,v)                                \
-    DBGMSG(DBG_AES,DBG_FLAG(DBG_AES_INVCIPHER),                     \
-           ("%s:\t%0.8x %0.8x %0.8x %0.8x\n",M,                     \
-            v.columns[0],v.columns[1],v.columns[2],v.columns[3]))
-
-#if _DEBUGGING
-#if 1
-#define DEBUG_CIPHER_VECTOR(M,V)                        \
-    {                                                   \
-        CipherVec_AES_u v; v.state = V;                 \
-        DBGMSG(DBG_AES,DBG_FLAG(DBG_AES_CIPHER),        \
-               ("%s:\t%0.8x %0.8x %0.8x %0.8x\n", M,    \
-                bswap_32(v.columns[0]),                 \
-                bswap_32(v.columns[1]),                 \
-                bswap_32(v.columns[2]),                 \
-                bswap_32(v.columns[3])));               \
-            }
-#define DEBUG_INVCIPHER_VECTOR(M,V)                     \
-    {                                                   \
-        CipherVec_AES_u v; v.state = V;                 \
-        DBGMSG(DBG_AES,DBG_FLAG(DBG_AES_INVCIPHER),     \
-               ("%s:\t%0.8x %0.8x %0.8x %0.8x\n", M,    \
-                bswap_32(v.columns[0]),                 \
-                bswap_32(v.columns[1]),                 \
-                bswap_32(v.columns[2]),                 \
-                bswap_32(v.columns[3])));               \
-            }
-#else
-#define DEBUG_CIPHER_VECTOR(M,v)                              \
-    KOutMsg ( "%s:\t%0.8x %0.8x %0.8x %0.8x\n", M,            \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[0]), \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[1]), \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[2]), \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[3]))
-#define DEBUG_INVCIPHER_VECTOR(M,v)                           \
-    KOutMsg ( "%s:\t%0.8x %0.8x %0.8x %0.8x\n", M,            \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[0]), \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[1]), \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[2]), \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[3]))
-#endif
-#define DDEBUG_CIPHER_VECTOR(M,v)                             \
-    KOutMsg ( "%s:\t%0.8x %0.8x %0.8x %0.8x\n", M,            \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[0]), \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[1]), \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[2]), \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[3]))
-#define DDEBUG_INVCIPHER_VECTOR(M,v)                          \
-    KOutMsg ( "%s:\t%0.8x %0.8x %0.8x %0.8x\n", M,            \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[0]), \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[1]), \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[2]), \
-              bswap_32(((CipherVec_AES_u*)&(v))->columns[3]))
-
-#else
-#define DEBUG_CIPHER_VECTOR(M,V)
-#define DEBUG_INVCIPHER_VECTOR(M,V)
-#endif
-
-/* -----
- * 8 and 32 bit unsigned integers
- */
-typedef uint8_t  AESByte;
-typedef uint32_t AESWord;
-typedef union AESColumn AESColumn;
-union AESColumn
-{
-    AESWord word;
-    AESByte bytes [sizeof(AESWord)];
-};
-
-
-/* -----
- * 128 byte block in various forms
- */
-typedef AESByte AESBlock [AES_Nb*sizeof(AESWord)];
-
-typedef v128_u8_t  CipherVecByte;
-typedef v128_u32_t CipherVecWord;
-
-
-typedef struct AESKeySchedule  AESKeySchedule;
-struct AESKeySchedule
-{
-    CipherVec round_keys [AES_Nr_MAX];
-    uint32_t number_of_rounds;
-};
-
-/* ======================================================================
- * FIPS-197 3,4 - 3.5
- *
- * An AES State is the same size as the cipher block size.
- * They are eaither 4 columns of 32 bits or 16 individual bytes.
- * The columns can be accessed by their individual bytes s0
- * there are 4X32, 4X4X8 or 16X8 bits in a state.
- */
-typedef union
-{
-    CipherVec   state;
-    uint64_t    u64     [AES_Nb/2];
-    AESWord     columns [AES_Nb];
-    AESByte     bytes   [AES_Nb * sizeof (AESWord)];
-    AESByte     grid    [AES_Nb][sizeof (AESWord)];
-} CipherVec_AES_u;
-
-
-typedef union
-{
-    CipherVec   state;
-    v128_u32_t columns;
-} CipherVec_uu __attribute__ ((aligned(16)));
-
-/* 
- * KCipher with 128 bit alignment.
- */
-typedef struct CipherAes CipherAes;
-struct CipherAes
-{
-    KCipher dad;
-    AESKeySchedule e_key;
-    AESKeySchedule d_key;
-    CipherVec    e_ivec;
-    CipherVec    d_ivec;
-};
-
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif /* #ifndef _h_krypto_aes_ncbi_priv_libs_ */
-
-
diff --git a/libs/krypto/aes-ncbi.c b/libs/krypto/aes-ncbi.c
deleted file mode 100644
index 8ee5ff7..0000000
--- a/libs/krypto/aes-ncbi.c
+++ /dev/null
@@ -1,2641 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-
-#include <krypto/extern.h>
-
-#include "ncbi-priv.h"
-#include "aes-ncbi-priv.h"
-#include "cipher-priv.h"
-#include "blockcipher-priv.h"
-
-#include <klib/debug.h>
-#include <klib/out.h>
-#include <klib/rc.h>
-
-
-#include <byteswap.h>
-#include <string.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <sysalloc.h>
-
-#if USE_VEC
-#include <cpuid.h>
-#endif
-
-#if USE_VECREG
-#include <v128.h>
-#endif
-
-/*
- * This implements the AES cipher as defined by FIPS-197 from NIST
- *  
- * Notes on implmentation:
- *
- * NOTE:
- * Byte ordering in AES is not critical but unllike the original implmentation
- * bytes are not re-ordered to a big endian order upon reading them in and this
- * code will expect to run on an Intel/AMD type processor and might have issues
- * on some big endian processors.
- *
- * NOTE:
- * Many functions are written as static inline functions to
- * facilitate GCC type assembly language optimization on various processors
- *
- * NOTE:
- * This implements the Equivalent Inverse Cipher not the Inverse Cipher.  In
- * general functions will match those defined in the FIPS-197 document where they
- * do not get optimized away for Intel/AMD XMM registers and AES-NI instructions.
- *
- * NOTE:
- * C-99 types are used for specific sized types.  An unaddornded unsigned type
- * is used for many index type variables to allow the compiler choice in
- * size where size does not matter very much.  As these index variables do
- * not go above 16 any size would do but the compiler can choose the size most
- * suited for array subscripting.
- */
-
-static const
-CipherVec vec_00 =  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
-
-static const
-CipherVec vec_01 =  { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-                      0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 };
-
-static const
-CipherVec vec_0F =  { 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
-                      0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F };
-
-static const
-CipherVec vec_10 =  { 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
-                      0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 };
-
-
-
-/* ======================================================================
- * These functions implment the Advanced Encryption Standard AES as defined
- * in the FIPS (Federal Information Processing Standars Publication 197
- * Of Nevember 26, 2001.
- */
-
-/* ======================================================================
- * FIPS-197 5.1
- */
-
-/*
- * Read a blocks worth of bytes into an CipherVec
- *
- * With vector registers it is a single instruction, without them it
- * is a memmove call
- */
-static __inline__ 
-CipherVec AESBCMEMBER(StateIn) (const void * ain)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(StateIn) (const void * ain)
-{
-#if USE_VEC_REG
-
-    register CipherVec vec;
-    __asm__ (
-        "movdqu (%[a]),%[s]" : [s] "=x" (vec) : [a] "D" (ain)
-        );
-    return vec;
-
-#else
-
-    CipherVec_AES_u u;
-    memmove (&u.bytes, ain, sizeof (u));
-    return u.state;
-
-#endif
-}
-
-
-/*
- * Write a block's worth of bytes out from an CipherVec
- *
- * With vector registers it is a single instruction, without them it
- * is a memmove call
- */
-static __inline__
-void AESBCMEMBER(StateOut) (const CipherVec vec, void * rout)
-    __attribute__ ((always_inline));
-
-static __inline__
-void AESBCMEMBER(StateOut) (const CipherVec vec, void * rout)
-{
-#if USE_VEC_REG
-
-    register CipherVec rvec = vec;
-    __asm__ (
-        "movdqu %[s],(%[a])" : : [s] "x" (rvec), [a] "D" (rout)
-        );
-
-#else
-
-    memmove (rout, &vec, sizeof (vec));
-
-#endif
-}
-
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecXor) (CipherVec v1, CipherVec v2)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecXor) (CipherVec v1, CipherVec v2)
-{
-#if USE_VEC
-
-    return v1 ^ v2;
-
-#else
-
-    CipherVec_AES_u u1, u2; /* state and key not countries :) */
-    unsigned ix;
-
-    u1.state = v1;
-    u2.state = v2;
-
-    for (ix = 0; ix < AES_Nb; ++ix)
-        u1.columns[ix] ^= u2.columns[ix];
-
-    return u1.state;
-
-#endif
-}
-
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecAnd) (CipherVec v1, CipherVec v2)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecAnd) (CipherVec v1, CipherVec v2)
-{
-#if USE_VEC
-
-    return v1 & v2;
-
-#else
-
-    CipherVec_AES_u u1, u2; /* state and key not countries :) */
-    unsigned ix;
-
-    u1.state = v1;
-    u2.state = v2;
-
-    for (ix = 0; ix < AES_Nb; ++ix)
-        u1.columns[ix] &= u2.columns[ix];
-
-    return u1.state;
-
-#endif
-}
-
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecOr) (CipherVec v1, CipherVec v2)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecOr) (CipherVec v1, CipherVec v2)
-{
-#if USE_VEC
-
-    return v1 | v2;
-
-#else
-
-    CipherVec_AES_u u1, u2; /* state and key not countries :) */
-    unsigned ix;
-
-    u1.state = v1;
-    u2.state = v2;
-
-    for (ix = 0; ix < AES_Nb; ++ix)
-        u1.columns[ix] |= u2.columns[ix];
-
-    return u1.state;
-
-#endif
-}
-
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecAdd) (CipherVec v1, CipherVec v2)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecAdd) (CipherVec v1, CipherVec v2)
-{
-#if USE_VEC
-
-    return v1 + v2;
-
-#else
-
-    CipherVec_AES_u u1, u2; /* state and key not countries :) */
-    unsigned ix;
-
-    u1.state = v1;
-    u2.state = v2;
-
-    for (ix = 0; ix < AES_Nb; ++ix)
-        u1.columns[ix] += u2.columns[ix];
-
-    return u1.state;
-
-#endif
-}
-
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecSub) (CipherVec v1, CipherVec v2)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecSub) (CipherVec v1, CipherVec v2)
-{
-#if USE_VEC
-
-    return v1 - v2;
-
-#else
-
-    CipherVec_AES_u u1, u2; /* state and key not countries :) */
-    unsigned ix;
-
-    u1.state = v1;
-    u2.state = v2;
-
-    for (ix = 0; ix < AES_Nb; ++ix)
-        u1.columns[ix] -= u2.columns[ix];
-
-    return u1.state;
-
-#endif
-}
-
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecMul) (CipherVec v1, CipherVec v2)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecMul) (CipherVec v1, CipherVec v2)
-{
-#if USE_VEC
-
-    return v1 * v2;
-
-#else
-
-    CipherVec_AES_u u1, u2; /* state and key not countries :) */
-    unsigned ix;
-
-    u1.state = v1;
-    u2.state = v2;
-
-    for (ix = 0; ix < AES_Nb; ++ix)
-        u1.columns[ix] *= u2.columns[ix];
-
-    return u1.state;
-
-#endif
-}
-
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecDiv) (CipherVec v1, CipherVec v2)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecDiv) (CipherVec v1, CipherVec v2)
-{
-#if USE_VEC
-
-    return v1 / v2;
-
-#else
-
-    CipherVec_AES_u u1, u2; /* state and key not countries :) */
-    unsigned ix;
-
-    u1.state = v1;
-    u2.state = v2;
-
-    for (ix = 0; ix < AES_Nb; ++ix)
-        u1.columns[ix] /= u2.columns[ix];
-
-    return u1.state;
-
-#endif
-}
-
-static __inline__ 
-CipherVec AESBCMEMBER(PackShuffleBytes) (CipherVec dest, CipherVec mask)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(PackShuffleBytes) (CipherVec dest, CipherVec mask)
-{
-#if USE_VEC_REG
-
-    return op_PSHUFB128 (dest, mask);
-
-#else
-
-    CipherVec_AES_u out, in, gate;
-    unsigned ix;
-
-    in.state = dest;
-    gate.state = mask;
-
-    for (ix = 0; ix < sizeof dest; ++ix)
-    {
-        if (gate.bytes[ix] & 0x80)
-            out.bytes[ix] = 0;
-        else
-            out.bytes[ix] = in.bytes[gate.bytes[ix] & 0x0F];
-    }
-
-    return out.state;
-
-#endif
-}
-
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecSLLBI) (CipherVec v, const int k)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecSLLBI) (CipherVec v, const int k)
-{
-#if USE_VEC_REG
-    static const CipherVec sl_mask [9] = 
-        {
-            { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-              0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
-            { 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
-              0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE },
-            { 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
-              0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC },
-            { 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8,
-              0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8 },
-            { 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
-              0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0 },
-            { 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
-              0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0 },
-            { 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,
-              0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0 },
-            { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
-              0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 },
-            { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-              0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
-        };
-    CipherVec vv = v;
-
-    assert (k <= 8);
-    
-
-/*     DEBUG_CIPHER_VECTOR ("mask", sl_mask[k]); */
-/*     DEBUG_CIPHER_VECTOR ("v 1", vv); */
-    vv = op_PSLLDI128 (vv, k);
-/*     DEBUG_CIPHER_VECTOR ("v 2", vv); */
-    vv = AESBCMEMBER(VecAnd) (vv, sl_mask[k]);
-/*     DEBUG_CIPHER_VECTOR ("v 3", vv); */
-    return vv;
-
-#else
-
-    CipherVec_AES_u vv; /* state and key not countries :) */
-    unsigned ix;
-
-    vv.state = v;
-
-    for (ix = 0; ix < sizeof (v); ++ix)
-    {
-        KOutMsg ("SLLBI %d %x ", k, vv.bytes[ix]);
-        vv.bytes[ix] <<= k;
-        KOutMsg ("%x\n", vv.bytes[ix]);
-    }
-    return vv.state;
-
-#endif
-}
-
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecSRLBI) (CipherVec v, const int k)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(VecSRLBI) (CipherVec v, const int k)
-{
-#if USE_VEC_REG
-    static const CipherVec sr_mask [9] = 
-        {
-            { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-              0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
-            { 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-              0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F },
-            { 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
-              0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F },
-            { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,
-              0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F },
-            { 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
-              0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F },
-            { 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
-              0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07 },
-            { 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
-              0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03 },
-            { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-              0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
-            { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-              0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
-        };
-
-    v = op_PSRLDI128 (v, k);
-    v = AESBCMEMBER(VecAnd) (v, sr_mask[(k<8)?k:8]);
-    return v;
-
-#else
-
-    CipherVec_AES_u vv; /* state and key not countries :) */
-    unsigned ix;
-
-    vv.state = v;
-
-    for (ix = 0; ix < sizeof (v); ++ix)
-    {
-        KOutMsg ("SRLBI %d %x ", k, vv.bytes[ix]);
-        vv.bytes[ix] >>= k;
-        KOutMsg ("%x\n", vv.bytes[ix]);
-    }
-    return vv.state;
-
-#endif
-}
-
-
-static __inline__
-CipherVec AESBCMEMBER(SetColumn) (CipherVec state, AESWord column, const int which)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(SetColumn) (CipherVec state, AESWord column, const int which)
-{
-#if USE_VEC_REG
-    state = op_PINSRUD (state, column, which);
-#else
-    CipherVec_AES_u u;
-    u.state = state;
-    u.columns [which] = column;
-    state = u.state;
-#endif
-    return state;
-}
-
-
-/* ======================================================================
- * FIPS-197 5.1.4
- *
- * The AddRoundKey transformation is a sinple exclusive or of all 128 bits
- * in the current block against a round key.  This operation is used in all
- * Cipher and EqInvCipher rounds
- *
- * With vector types it is a single operation that with vector registers is
- * a single op-code.
- */
-static __inline__ 
-CipherVec AESBCMEMBER(AddRoundKey) (CipherVec state, CipherVec round_key)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(AddRoundKey) (CipherVec state, CipherVec round_key)
-{
-    return AESBCMEMBER(VecXor) (state, round_key);
-}
-
-
-/* ======================================================================
- * FIPS-197 5.1.2
- *
- * FIPS 197 describes the state in column major format
- * while C and assembly programmers tend to think in row major
- * The byte order is 0,1,2,3,,...F as shown in the first diagram.
- *
- *  ShiftRows() is defined as leaving this state
- * +---+---+---+---+     +---+---+---+---+
- * | 0 | 4 | 8 | C |     | 0 | 4 | 8 | C |
- * +---+---+---+---+     +---+---+---+---+
- * | 1 | 5 | 9 | D |     | 5 | 9 | D | 1 |
- * +---+---+---+---+     +---+---+---+---+
- * | 2 | 6 | A | E |     | A | E | 2 | 6 |
- * +---+---+---+---+     +---+---+---+---+
- * | 3 | 7 | B | F |     | F | 3 | 7 | B |
- * +---+---+---+---+     +---+---+---+---+
- */
-static __inline__
-CipherVec AESBCMEMBER(ShiftRows) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(ShiftRows) (CipherVec state)
-{
-static const
-    CipherVec ShiftRowTable
-    /*   0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15 */
-    = {  0,  5, 10, 15,  4,  9, 14,  3,  8, 13,  2,  7, 12,  1,  6, 11 };
-
-    state = AESBCMEMBER(PackShuffleBytes) (state, ShiftRowTable);
-    return state;
-}
-
-
-/* ======================================================================
- * FIPS-197 5.3.1
- *
- * InvShiftRows() is defined as leaving this state
- * +---+---+---+---+     +---+---+---+---+
- * | 0 | 4 | 8 | C |     | 0 | 4 | 8 | C |
- * +---+---+---+---+     +---+---+---+---+
- * | 1 | 5 | 9 | D |     | D | 1 | 5 | 9 |
- * +---+---+---+---+     +---+---+---+---+
- * | 2 | 6 | A | E |     | A | E | 2 | 6 |
- * +---+---+---+---+     +---+---+---+---+
- * | 3 | 7 | B | F |     | 7 | B | F | 3 |
- * +---+---+---+---+     +---+---+---+---+
- */
-static __inline__
-CipherVec AESBCMEMBER(InvShiftRows) (CipherVec state)
-    __attribute__ ((always_inline));
-
-
-static __inline__
-CipherVec AESBCMEMBER(InvShiftRows) (CipherVec state)
-{
-    static const CipherVecByte InvShiftRowTable
-        /*   0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15 */
-        = {  0, 13, 10,  7,  4,  1, 14, 11,  8,  5,  2, 15, 12,  9,  6,  3 };
-
-    state = AESBCMEMBER(PackShuffleBytes) (state, InvShiftRowTable);
-    return state;
-}
-
-
-/* ======================================================================
- * +---+---+---+---+     +---+---+---+---+
- * | 0 | 4 | 8 | C |     | 3 | 7 | B | F |
- * +---+---+---+---+     +---+---+---+---+
- * | 1 | 5 | 9 | D |     | 0 | 4 | 8 | C |
- * +---+---+---+---+     +---+---+---+---+
- * | 2 | 6 | A | E |     | 1 | 5 | 9 | D |
- * +---+---+---+---+     +---+---+---+---+
- * | 3 | 7 | B | F |     | 2 | 6 | A | E |
- * +---+---+---+---+     +---+---+---+---+
- */
-static __inline__
-CipherVec AESBCMEMBER(RotBytesRight) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(RotBytesRight) (CipherVec state)
-{
-static const
-    CipherVec ShiftRowTable
-    /*   0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15 */
-    = {  3,  0,  1,  2,  7,  4,  5,  6, 11,  8,  9, 10, 15, 12, 13, 14 };
-
-    state = AESBCMEMBER(PackShuffleBytes) (state, ShiftRowTable);
-    return state;
-}
-
-
-/* ======================================================================
- * +---+---+---+---+     +---+---+---+---+
- * | 0 | 4 | 8 | C |     | 1 | 5 | B | D |
- * +---+---+---+---+     +---+---+---+---+
- * | 1 | 5 | 9 | D |     | 2 | 6 | 8 | E |
- * +---+---+---+---+     +---+---+---+---+
- * | 2 | 6 | A | E |     | 3 | 7 | 9 | F |
- * +---+---+---+---+     +---+---+---+---+
- * | 3 | 7 | B | F |     | 0 | 4 | 8 | C |
- * +---+---+---+---+     +---+---+---+---+
- */
-static __inline__
-CipherVec AESBCMEMBER(RotBytesLeft) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(RotBytesLeft) (CipherVec state)
-{
-    static const CipherVec ShiftRowTable
-        /*   0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15 */
-        = {  1,  2,  3,  0,  5,  6,  7,  4,  9, 10, 11,  8, 13, 14, 15, 12 };
-
-    state = AESBCMEMBER(PackShuffleBytes) (state, ShiftRowTable);
-    return state;
-}
-
-
-/* ======================================================================
- * FIPS-197 5.1.1
- */
-
-
-/*
- * SubBytes replaces each byte in a state with a specific byte value from
- * A Rijndael Substitution box
- */
-static const 
-AESByte AESBCMEMBER(RijndaelSBox)[256] = 
-{
-/*        -0    -1    -2    -3    -4    -5    -6    -7    -8    -9    -A    -B    -C    -D    -E    -F */
-/* 0- */ 0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76,
-/* 1- */ 0xCA, 0x82, 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0, 0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0,
-/* 2- */ 0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC, 0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x31, 0x15,
-/* 3- */ 0x04, 0xC7, 0x23, 0xC3, 0x18, 0x96, 0x05, 0x9A, 0x07, 0x12, 0x80, 0xE2, 0xEB, 0x27, 0xB2, 0x75,
-/* 4- */ 0x09, 0x83, 0x2C, 0x1A, 0x1B, 0x6E, 0x5A, 0xA0, 0x52, 0x3B, 0xD6, 0xB3, 0x29, 0xE3, 0x2F, 0x84,
-/* 5- */ 0x53, 0xD1, 0x00, 0xED, 0x20, 0xFC, 0xB1, 0x5B, 0x6A, 0xCB, 0xBE, 0x39, 0x4A, 0x4C, 0x58, 0xCF,
-/* 6- */ 0xD0, 0xEF, 0xAA, 0xFB, 0x43, 0x4D, 0x33, 0x85, 0x45, 0xF9, 0x02, 0x7F, 0x50, 0x3C, 0x9F, 0xA8,
-/* 7- */ 0x51, 0xA3, 0x40, 0x8F, 0x92, 0x9D, 0x38, 0xF5, 0xBC, 0xB6, 0xDA, 0x21, 0x10, 0xFF, 0xF3, 0xD2,
-/* 8- */ 0xCD, 0x0C, 0x13, 0xEC, 0x5F, 0x97, 0x44, 0x17, 0xC4, 0xA7, 0x7E, 0x3D, 0x64, 0x5D, 0x19, 0x73,
-/* 9- */ 0x60, 0x81, 0x4F, 0xDC, 0x22, 0x2A, 0x90, 0x88, 0x46, 0xEE, 0xB8, 0x14, 0xDE, 0x5E, 0x0B, 0xDB,
-/* A- */ 0xE0, 0x32, 0x3A, 0x0A, 0x49, 0x06, 0x24, 0x5C, 0xC2, 0xD3, 0xAC, 0x62, 0x91, 0x95, 0xE4, 0x79,
-/* B- */ 0xE7, 0xC8, 0x37, 0x6D, 0x8D, 0xD5, 0x4E, 0xA9, 0x6C, 0x56, 0xF4, 0xEA, 0x65, 0x7A, 0xAE, 0x08,
-/* C- */ 0xBA, 0x78, 0x25, 0x2E, 0x1C, 0xA6, 0xB4, 0xC6, 0xE8, 0xDD, 0x74, 0x1F, 0x4B, 0xBD, 0x8B, 0x8A,
-/* D- */ 0x70, 0x3E, 0xB5, 0x66, 0x48, 0x03, 0xF6, 0x0E, 0x61, 0x35, 0x57, 0xB9, 0x86, 0xC1, 0x1D, 0x9E,
-/* E- */ 0xE1, 0xF8, 0x98, 0x11, 0x69, 0xD9, 0x8E, 0x94, 0x9B, 0x1E, 0x87, 0xE9, 0xCE, 0x55, 0x28, 0xDF,
-/* F- */ 0x8C, 0xA1, 0x89, 0x0D, 0xBF, 0xE6, 0x42, 0x68, 0x41, 0x99, 0x2D, 0x0F, 0xB0, 0x54, 0xBB, 0x16
-};
-
-
-#if 0
-static __inline__
-CipherVec AESBCMEMBER(SubBytes) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(SubBytes) (CipherVec state)
-{
-    CipherVec_AES_u u;
-    unsigned ix;
-
-    u.state = state;
-
-    for (ix = 0; ix < sizeof (u.bytes); ++ix)
-    {
-        u.bytes[ix] = AESBCMEMBER(RijndaelSBox)[u.bytes[ix]];
-    }
-
-    return u.state;
-}
-#endif
-
-/*
- * SubWord performs the same operation as SubBytes but on
- * the four bytes of a column and not a whole state
- */
-static __inline__
-AESWord AESBCMEMBER(SubWord) (AESWord w)
-    __attribute__ ((always_inline));
-
-static __inline__
-AESWord AESBCMEMBER(SubWord) (AESWord w)
-{
-    AESColumn col;
-    unsigned ix;
-
-    col.word = w;
-    for (ix = 0; ix < sizeof (col); ++ix)
-        col.bytes[ix] = AESBCMEMBER(RijndaelSBox)[(unsigned)col.bytes[ix]];
-    return col.word;
-}
-
-#if 0
-/*
- * InvSubBytes replaces each byte in a state with a specific byte value from
- * an Inversze Rijndael Substitution box.  That is InvSubBytes undoes SubBytes
- */
-static const 
-uint8_t AESBCMEMBER(RijndaelInvSBox)[256] = 
-{
-/*        -0    -1    -2    -3    -4    -5    -6    -7    -8    -9    -A    -B    -C    -D    -E    -F */
-/* 0- */ 0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5, 0x38, 0xBF, 0x40, 0xA3, 0x9E, 0x81, 0xF3, 0xD7, 0xFB,
-/* 1- */ 0x7C, 0xE3, 0x39, 0x82, 0x9B, 0x2F, 0xFF, 0x87, 0x34, 0x8E, 0x43, 0x44, 0xC4, 0xDE, 0xE9, 0xCB,
-/* 2- */ 0x54, 0x7B, 0x94, 0x32, 0xA6, 0xC2, 0x23, 0x3D, 0xEE, 0x4C, 0x95, 0x0B, 0x42, 0xFA, 0xC3, 0x4E,
-/* 3- */ 0x08, 0x2E, 0xA1, 0x66, 0x28, 0xD9, 0x24, 0xB2, 0x76, 0x5B, 0xA2, 0x49, 0x6D, 0x8B, 0xD1, 0x25,
-/* 4- */ 0x72, 0xF8, 0xF6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xD4, 0xA4, 0x5C, 0xCC, 0x5D, 0x65, 0xB6, 0x92,
-/* 5- */ 0x6C, 0x70, 0x48, 0x50, 0xFD, 0xED, 0xB9, 0xDA, 0x5E, 0x15, 0x46, 0x57, 0xA7, 0x8D, 0x9D, 0x84,
-/* 6- */ 0x90, 0xD8, 0xAB, 0x00, 0x8C, 0xBC, 0xD3, 0x0A, 0xF7, 0xE4, 0x58, 0x05, 0xB8, 0xB3, 0x45, 0x06,
-/* 7- */ 0xD0, 0x2C, 0x1E, 0x8F, 0xCA, 0x3F, 0x0F, 0x02, 0xC1, 0xAF, 0xBD, 0x03, 0x01, 0x13, 0x8A, 0x6B,
-/* 8- */ 0x3A, 0x91, 0x11, 0x41, 0x4F, 0x67, 0xDC, 0xEA, 0x97, 0xF2, 0xCF, 0xCE, 0xF0, 0xB4, 0xE6, 0x73,
-/* 9- */ 0x96, 0xAC, 0x74, 0x22, 0xE7, 0xAD, 0x35, 0x85, 0xE2, 0xF9, 0x37, 0xE8, 0x1C, 0x75, 0xDF, 0x6E,
-/* A- */ 0x47, 0xF1, 0x1A, 0x71, 0x1D, 0x29, 0xC5, 0x89, 0x6F, 0xB7, 0x62, 0x0E, 0xAA, 0x18, 0xBE, 0x1B,
-/* B- */ 0xFC, 0x56, 0x3E, 0x4B, 0xC6, 0xD2, 0x79, 0x20, 0x9A, 0xDB, 0xC0, 0xFE, 0x78, 0xCD, 0x5A, 0xF4,
-/* C- */ 0x1F, 0xDD, 0xA8, 0x33, 0x88, 0x07, 0xC7, 0x31, 0xB1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xEC, 0x5F,
-/* D- */ 0x60, 0x51, 0x7F, 0xA9, 0x19, 0xB5, 0x4A, 0x0D, 0x2D, 0xE5, 0x7A, 0x9F, 0x93, 0xC9, 0x9C, 0xEF,
-/* E- */ 0xA0, 0xE0, 0x3B, 0x4D, 0xAE, 0x2A, 0xF5, 0xB0, 0xC8, 0xEB, 0xBB, 0x3C, 0x83, 0x53, 0x99, 0x61,
-/* F- */ 0x17, 0x2B, 0x04, 0x7E, 0xBA, 0x77, 0xD6, 0x26, 0xE1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0C, 0x7D
-};
-
-
-static __inline__
-CipherVec AESBCMEMBER(InvSubBytes) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(InvSubBytes) (CipherVec state)
-{
-    CipherVec_AES_u u;
-    unsigned ix;
-
-    u.state = state;
-    for (ix = 0; ix < sizeof (u.bytes); ++ix)
-        u.bytes[ix] = AESBCMEMBER(RijndaelInvSBox)[u.bytes[ix]];
-
-    return u.state;
-}
-#endif
-
-static const
-CipherVec AESBCMEMBER(RijndaelSBoxV)[16] = 
-{
-/*     -0    -1    -2    -3    -4    -5    -6    -7    -8    -9    -A    -B    -C    -D    -E    -F */
-    { 0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76 },
-    { 0xCA, 0x82, 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0, 0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0 },
-    { 0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC, 0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x31, 0x15 },
-    { 0x04, 0xC7, 0x23, 0xC3, 0x18, 0x96, 0x05, 0x9A, 0x07, 0x12, 0x80, 0xE2, 0xEB, 0x27, 0xB2, 0x75 },
-    { 0x09, 0x83, 0x2C, 0x1A, 0x1B, 0x6E, 0x5A, 0xA0, 0x52, 0x3B, 0xD6, 0xB3, 0x29, 0xE3, 0x2F, 0x84 },
-    { 0x53, 0xD1, 0x00, 0xED, 0x20, 0xFC, 0xB1, 0x5B, 0x6A, 0xCB, 0xBE, 0x39, 0x4A, 0x4C, 0x58, 0xCF },
-    { 0xD0, 0xEF, 0xAA, 0xFB, 0x43, 0x4D, 0x33, 0x85, 0x45, 0xF9, 0x02, 0x7F, 0x50, 0x3C, 0x9F, 0xA8 },
-    { 0x51, 0xA3, 0x40, 0x8F, 0x92, 0x9D, 0x38, 0xF5, 0xBC, 0xB6, 0xDA, 0x21, 0x10, 0xFF, 0xF3, 0xD2 },
-    { 0xCD, 0x0C, 0x13, 0xEC, 0x5F, 0x97, 0x44, 0x17, 0xC4, 0xA7, 0x7E, 0x3D, 0x64, 0x5D, 0x19, 0x73 },
-    { 0x60, 0x81, 0x4F, 0xDC, 0x22, 0x2A, 0x90, 0x88, 0x46, 0xEE, 0xB8, 0x14, 0xDE, 0x5E, 0x0B, 0xDB },
-    { 0xE0, 0x32, 0x3A, 0x0A, 0x49, 0x06, 0x24, 0x5C, 0xC2, 0xD3, 0xAC, 0x62, 0x91, 0x95, 0xE4, 0x79 },
-    { 0xE7, 0xC8, 0x37, 0x6D, 0x8D, 0xD5, 0x4E, 0xA9, 0x6C, 0x56, 0xF4, 0xEA, 0x65, 0x7A, 0xAE, 0x08 },
-    { 0xBA, 0x78, 0x25, 0x2E, 0x1C, 0xA6, 0xB4, 0xC6, 0xE8, 0xDD, 0x74, 0x1F, 0x4B, 0xBD, 0x8B, 0x8A },
-    { 0x70, 0x3E, 0xB5, 0x66, 0x48, 0x03, 0xF6, 0x0E, 0x61, 0x35, 0x57, 0xB9, 0x86, 0xC1, 0x1D, 0x9E },
-    { 0xE1, 0xF8, 0x98, 0x11, 0x69, 0xD9, 0x8E, 0x94, 0x9B, 0x1E, 0x87, 0xE9, 0xCE, 0x55, 0x28, 0xDF },
-    { 0x8C, 0xA1, 0x89, 0x0D, 0xBF, 0xE6, 0x42, 0x68, 0x41, 0x99, 0x2D, 0x0F, 0xB0, 0x54, 0xBB, 0x16 }
-};
-
-static const
-CipherVec AESBCMEMBER(RijndaelInvSBoxV)[16] = 
-{
-/*     -0    -1    -2    -3    -4    -5    -6    -7    -8    -9    -A    -B    -C    -D    -E    -F */
-    { 0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5, 0x38, 0xBF, 0x40, 0xA3, 0x9E, 0x81, 0xF3, 0xD7, 0xFB },
-    { 0x7C, 0xE3, 0x39, 0x82, 0x9B, 0x2F, 0xFF, 0x87, 0x34, 0x8E, 0x43, 0x44, 0xC4, 0xDE, 0xE9, 0xCB },
-    { 0x54, 0x7B, 0x94, 0x32, 0xA6, 0xC2, 0x23, 0x3D, 0xEE, 0x4C, 0x95, 0x0B, 0x42, 0xFA, 0xC3, 0x4E },
-    { 0x08, 0x2E, 0xA1, 0x66, 0x28, 0xD9, 0x24, 0xB2, 0x76, 0x5B, 0xA2, 0x49, 0x6D, 0x8B, 0xD1, 0x25 },
-    { 0x72, 0xF8, 0xF6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xD4, 0xA4, 0x5C, 0xCC, 0x5D, 0x65, 0xB6, 0x92 },
-    { 0x6C, 0x70, 0x48, 0x50, 0xFD, 0xED, 0xB9, 0xDA, 0x5E, 0x15, 0x46, 0x57, 0xA7, 0x8D, 0x9D, 0x84 },
-    { 0x90, 0xD8, 0xAB, 0x00, 0x8C, 0xBC, 0xD3, 0x0A, 0xF7, 0xE4, 0x58, 0x05, 0xB8, 0xB3, 0x45, 0x06 },
-    { 0xD0, 0x2C, 0x1E, 0x8F, 0xCA, 0x3F, 0x0F, 0x02, 0xC1, 0xAF, 0xBD, 0x03, 0x01, 0x13, 0x8A, 0x6B },
-    { 0x3A, 0x91, 0x11, 0x41, 0x4F, 0x67, 0xDC, 0xEA, 0x97, 0xF2, 0xCF, 0xCE, 0xF0, 0xB4, 0xE6, 0x73 },
-    { 0x96, 0xAC, 0x74, 0x22, 0xE7, 0xAD, 0x35, 0x85, 0xE2, 0xF9, 0x37, 0xE8, 0x1C, 0x75, 0xDF, 0x6E },
-    { 0x47, 0xF1, 0x1A, 0x71, 0x1D, 0x29, 0xC5, 0x89, 0x6F, 0xB7, 0x62, 0x0E, 0xAA, 0x18, 0xBE, 0x1B },
-    { 0xFC, 0x56, 0x3E, 0x4B, 0xC6, 0xD2, 0x79, 0x20, 0x9A, 0xDB, 0xC0, 0xFE, 0x78, 0xCD, 0x5A, 0xF4 },
-    { 0x1F, 0xDD, 0xA8, 0x33, 0x88, 0x07, 0xC7, 0x31, 0xB1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xEC, 0x5F },
-    { 0x60, 0x51, 0x7F, 0xA9, 0x19, 0xB5, 0x4A, 0x0D, 0x2D, 0xE5, 0x7A, 0x9F, 0x93, 0xC9, 0x9C, 0xEF },
-    { 0xA0, 0xE0, 0x3B, 0x4D, 0xAE, 0x2A, 0xF5, 0xB0, 0xC8, 0xEB, 0xBB, 0x3C, 0x83, 0x53, 0x99, 0x61 },
-    { 0x17, 0x2B, 0x04, 0x7E, 0xBA, 0x77, 0xD6, 0x26, 0xE1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0C, 0x7D }
-};
-
-
-static const
-CipherVec lo_filter = { 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-                        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
-
-static __inline__
-CipherVec AESBCMEMBER(SubBytesInt) (CipherVec state, const CipherVec box [16])
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(SubBytesInt) (CipherVec state, const CipherVec box [16])
-{
-    CipherVec lo, hi, tmp, out;
-    unsigned ix;
-
-    out = vec_00;
-
-/*     DEBUG_CIPHER_VECTOR ("state", state); */
-    lo = AESBCMEMBER(VecAnd) (state, vec_0F);
-/*     DEBUG_CIPHER_VECTOR ("lo", lo); */
-#if USE_VEC_REG
-    hi = op_PSRLDI128 (state, 4);
-/*     DEBUG_CIPHER_VECTOR ("hi", hi); */
-    hi = AESBCMEMBER(VecAnd) (hi, vec_0F);
-/*     DEBUG_CIPHER_VECTOR ("hi", hi); */
-#else
-    hi = AESBCMEMBER(VecDiv) (state, vec_10);
-/*     DEBUG_CIPHER_VECTOR ("hi", hi); */
-#endif
-
-    for (ix = 0; ix < sizeof (state); ++ix)
-    {
-        tmp = AESBCMEMBER(PackShuffleBytes) (lo_filter, hi);
-/*         DEBUG_CIPHER_VECTOR ("tmp", tmp); */
-        tmp = AESBCMEMBER(VecOr) (lo, tmp);
-/*         DEBUG_CIPHER_VECTOR ("tmp", tmp); */
-        tmp = AESBCMEMBER(PackShuffleBytes) (box[ix], tmp);
-/*         DEBUG_CIPHER_VECTOR ("tmp", tmp); */
-        out = AESBCMEMBER(VecOr) (out, tmp);
-/*         DEBUG_CIPHER_VECTOR ("out", out); */
-        hi  = AESBCMEMBER(VecSub) (hi, vec_01);
-/*         DEBUG_CIPHER_VECTOR ("hi", hi); */
-        hi  = AESBCMEMBER(VecAnd) (hi, vec_0F);
-/*         DEBUG_CIPHER_VECTOR ("hi", hi); */
-    }
-/*     DEBUG_CIPHER_VECTOR ("out", out); */
-    return out;
-}
-
-
-static __inline__
-CipherVec AESBCMEMBER(SubBytes) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(SubBytes) (CipherVec state)
-{
-    return AESBCMEMBER(SubBytesInt) (state, AESBCMEMBER(RijndaelSBoxV));
-}
-
-
-static __inline__
-CipherVec AESBCMEMBER(InvSubBytes) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(InvSubBytes) (CipherVec state)
-{
-    return AESBCMEMBER(SubBytesInt) (state, AESBCMEMBER(RijndaelInvSBoxV));
-}
-
-
-/* ======================================================================
- * FIPS-197 5.1.3
- */
-
-/*
- * there are no psllb or psrlb instructions so shift words not bytes
- * and then cut off bits that would have been zeroed if there were
- * such instructions
- *
- * 
- */
-static const CipherVec FF_tab = 
-{ 0x00, 0x1B, 0x36, 0x2D, 0x6C, 0x77, 0x5A, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
-
-static __inline__
-CipherVec AESBCMEMBER(FF_mul) (register CipherVec state, const int bits)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(FF_mul) (register CipherVec state, const int bits)
-{
-    CipherVec sl, sr;
-
-    assert (bits <= 8);
-
-    DEBUG_CIPHER_VECTOR ("state", state);
-    sr = AESBCMEMBER(VecSRLBI) (state, 8 - bits);
-    DEBUG_CIPHER_VECTOR ("sr", sr);
-    sl = AESBCMEMBER(VecSLLBI) (state, bits);
-    DEBUG_CIPHER_VECTOR ("sl", sl);
-    sr = AESBCMEMBER(PackShuffleBytes) (FF_tab, sr);
-    return AESBCMEMBER(VecXor)(sl, sr);
-}
-
-
-static __inline__
-CipherVec AESBCMEMBER(FF_mul_02) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(FF_mul_02) (register CipherVec state)
-{
-    DEBUG_CIPHER_VECTOR ("state", state);
-
-    state =  AESBCMEMBER(FF_mul) (state, 1);
-    DEBUG_CIPHER_VECTOR ("state", state);
-
-    return state;
-}
-
-
-static __inline__
-CipherVec AESBCMEMBER(FF_mul_04) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(FF_mul_04) (CipherVec state)
-{
-    DEBUG_CIPHER_VECTOR ("state", state);
-
-    state =  AESBCMEMBER(FF_mul) (state, 2);
-    DEBUG_CIPHER_VECTOR ("state", state);
-
-    return state;
-}
-
-
-static __inline__
-CipherVec AESBCMEMBER(FF_mul_08) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(FF_mul_08) (CipherVec state)
-{
-    DEBUG_CIPHER_VECTOR ("state", state);
-
-    state =  AESBCMEMBER(FF_mul) (state, 3);
-    DEBUG_CIPHER_VECTOR ("state", state);
-
-    return state;
-}
-
-
-static AESByte AESBCMEMBER(FFtable)[] = { 0x00, 0x1b, 0x36, 0x2d, 0x6c, 0x77, 0x5a, 0x41 };
-
-
-static __inline__ 
-AESByte AESBCMEMBER(FFtab) (uint8_t x)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-AESByte AESBCMEMBER(FFtab) (uint8_t x)
-{
-    return AESBCMEMBER(FFtable)[x];
-}
-
-
-static __inline__ 
-AESByte AESBCMEMBER(FFmul02) (AESByte b)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-AESByte AESBCMEMBER(FFmul02) (AESByte b)
-{
-    return (b << 1) ^ AESBCMEMBER(FFtab)(b >> 7);
-}
-
-
-static __inline__ 
-AESByte AESBCMEMBER(FFmul04) (AESByte b)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-AESByte AESBCMEMBER(FFmul04) (AESByte b)
-{
-    return (b << 2) ^ AESBCMEMBER(FFtab)(b >> 6);
-}
-
-
-static __inline__ 
-AESByte AESBCMEMBER(FFmul08) (AESByte b)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-AESByte AESBCMEMBER(FFmul08) (AESByte b)
-{
-    return (b << 3) ^ AESBCMEMBER(FFtab)(b >> 5);
-}
-
-
-static __inline__
-CipherVec AESBCMEMBER(MixColumns) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(MixColumns) (CipherVec state)
-{
-    register CipherVec c0, c1, c2, c3;
-    
-    c1 = AESBCMEMBER(RotBytesLeft) (state);
-    c2 = AESBCMEMBER(RotBytesLeft) (c1);
-    c3 = AESBCMEMBER(RotBytesLeft) (c2);
-    c0 = AESBCMEMBER(VecXor) (state, c1);
-
-
-#if USE_VEC_REG
-    c0 = AESBCMEMBER(FF_mul_02) (c0);
-#else
-    {
-        CipherVec_AES_u tmp;
-        unsigned ix;
-
-        tmp.state = c0;
-    
-        for (ix = 0; ix < sizeof tmp; ++ix)
-            tmp.bytes[ix] = AESBCMEMBER(FFmul02)(tmp.bytes[ix]);
-        c0 = tmp.state;
-    }
-#endif
-    c1 = AESBCMEMBER(VecXor) (c1, c2);
-    c1 = AESBCMEMBER(VecXor) (c1, c3);
-    c1 = AESBCMEMBER(VecXor) (c1, c0);
-
-    return c1;
-/* obsoleted 
-    CipherVec_AES_u in, out;
-    unsigned ix;
-
-    in.state = state;
-
-    for (ix = 0; ix < sizeof (out.bytes); ix += 4)
-    {
-        unsigned const s0 = in.bytes[ix + 0];
-        unsigned const s1 = in.bytes[ix + 1];
-        unsigned const s2 = in.bytes[ix + 2];
-        unsigned const s3 = in.bytes[ix + 3];
-
-        out.bytes[ix + 0] =      s1 ^ s2 ^ s3 ^ AESBCMEMBER(FFmul02)(s0 ^ s1);
-        out.bytes[ix + 1] = s0      ^ s2 ^ s3 ^ AESBCMEMBER(FFmul02)(s1 ^ s2);
-        out.bytes[ix + 2] = s0 ^ s1      ^ s3 ^ AESBCMEMBER(FFmul02)(s2 ^ s3);
-        out.bytes[ix + 3] = s0 ^ s1 ^ s2      ^ AESBCMEMBER(FFmul02)(s3 ^ s0);
-    }
-    return out.state;
-*/
-}
-
-static __inline__
-CipherVec AESBCMEMBER(InvMixColumns) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(InvMixColumns) (CipherVec state)
-{
-#if USE_AES_NI
-    state = op_AESIMC (state);
-#else
-    register CipherVec r1, r2, r3, f2, f4, f8;
-
-    r1 = AESBCMEMBER(RotBytesLeft) (state);
-    r2 = AESBCMEMBER(RotBytesLeft) (r1);
-    r3 = AESBCMEMBER(RotBytesLeft) (r2);        
-
-    f4 = AESBCMEMBER(VecXor) (state, r2);
-    f2 = AESBCMEMBER(VecXor) (state, r1);
-    f8 = AESBCMEMBER(VecXor) (r2, r3);
-    state = AESBCMEMBER(VecXor) (f8, r1);
-    f8 = AESBCMEMBER(VecXor) (f8, f2);
-
-
-#if USE_VEC_REG
-    f2 = AESBCMEMBER(FF_mul) (f2,1);
-    f4 = AESBCMEMBER(FF_mul) (f4,2);
-    f8 = AESBCMEMBER(FF_mul) (f8,3);
-#else
-    {
-        CipherVec_AES_u fu2, fu4, fu8;
-        unsigned ix;
-
-        fu2.state = f2;
-        fu4.state = f4;
-        fu8.state = f8;
-
-        for (ix = 0; ix < sizeof fu2; ++ix)
-        {
-            fu2.bytes[ix] = AESBCMEMBER(FFmul02)(fu2.bytes[ix]);
-            fu4.bytes[ix] = AESBCMEMBER(FFmul04)(fu4.bytes[ix]);
-            fu8.bytes[ix] = AESBCMEMBER(FFmul08)(fu8.bytes[ix]);
-        }
-        f2 = fu2.state;
-        f4 = fu4.state;
-        f8 = fu8.state;
-    }
-#endif
-
-    state = AESBCMEMBER(VecXor) (state, f2);
-    state = AESBCMEMBER(VecXor) (state, f4);
-    state = AESBCMEMBER(VecXor) (state, f8);
-
-#endif
-
-    return state;
-/*
-    CipherVec_AES_u in, out;
-    unsigned ix;
-
-    in.state = state;
-
-    for (ix = 0; ix < sizeof (out.bytes); ix += AES_Nb)
-    {
-        AESWord s0 = in.bytes[ix + 0];
-        AESWord s1 = in.bytes[ix + 1];
-        AESWord s2 = in.bytes[ix + 2];
-        AESWord s3 = in.bytes[ix + 3];
-        AESWord p, q;
-
-        q =     AESBCMEMBER(FFmul08)(s0 ^ s1 ^ s2 ^ s3);
-        p = q ^ AESBCMEMBER(FFmul04)(s0 ^ s2);
-        q = q ^ AESBCMEMBER(FFmul04)(s1 ^ s3);
-
-        out.bytes[ix + 0] =      s1 ^ s2 ^ s3 ^ AESBCMEMBER(FFmul02)(s0 ^ s1) ^ p;
-        out.bytes[ix + 1] = s0      ^ s2 ^ s3 ^ AESBCMEMBER(FFmul02)(s1 ^ s2) ^ q;
-        out.bytes[ix + 2] = s0 ^ s1      ^ s3 ^ AESBCMEMBER(FFmul02)(s2 ^ s3) ^ p;
-        out.bytes[ix + 3] = s0 ^ s1 ^ s2      ^ AESBCMEMBER(FFmul02)(s3 ^ s0) ^ q;
-    }
-
-    return out.state;
-*/
-}
-
-
-/* ======================================================================
- * FIPS-197 5.2
- */
-static const
-AESWord AESBCMEMBER(Rcon)[] = {
-    0x00000001, 0x00000002, 0x00000004, 0x00000008,
-    0x00000010, 0x00000020, 0x00000040, 0x00000080,
-    0x0000001B, 0x00000036
-};
-
-
-static __inline__
-AESWord AESBCMEMBER(RotWord) (AESWord w)
-    __attribute__ ((always_inline));
-
-static __inline__
-AESWord AESBCMEMBER(RotWord) (AESWord w)
-{
-    return (w >> 8) | (w << 24);
-}
-
-
-static __inline__
-AESWord AESBCMEMBER(GetWord) (const AESByte * pointer)
-    __attribute__ ((always_inline));
-
-static __inline__
-AESWord AESBCMEMBER(GetWord) (const AESByte * pointer)
-{
-    /*
-     * not portable to architectures which require aligned multibyte reads
-     * but as this only runs on Intel at this point it is fine for now
-     */
-    return *(AESWord*)pointer;
-}
-
-
-
-static __inline__
-void AESBCMEMBER(KeyExpansion) (CipherVec * r, const AESByte * key, unsigned Nr, unsigned Nk)
-{
-    AESWord * w = (AESWord*)r;
-    const AESWord * pRcon;
-    unsigned ix, limit;
-    AESWord temp;
-
-
-    DEBUG_KEYEXP(("%s (w (%p), key (%p), Nr (%u) Nk (%u))\n", __func__, w, key, Nr, Nk));
-
-    for (ix = 0; ix < Nk; ++ix)
-    {
-        DEBUG_KEYEXP(("i (dec): %u\n", ix));
-        temp = AESBCMEMBER(GetWord) (key+(ix*4));
-        w[ix] = temp;
-        DEBUG_KEYEXP(("kw[%i]: %0.8x\n", ix, temp));
-    }
-
-    limit = AES_Nb * (Nr + 1);
-    pRcon = AESBCMEMBER(Rcon);
-    DEBUG_KEYEXP(("Nk (%u) Nr (%u) limit (%u)\n", Nk, Nr, limit));
-        
-    for (; ix < limit; ++ix)
-    {
-
-        DEBUG_KEYEXP(("i (dec): %u %u\n", ix, limit));
-
-        /* temp should already be set */
-        DEBUG_KEYEXP(("temp: %0.8x\n", temp));
-        if ((ix % Nk) == 0)
-        {
-            temp = AESBCMEMBER(RotWord)(temp);
-            DEBUG_KEYEXP(("after RotWord: %0.8x \n", temp));
-            temp = AESBCMEMBER(SubWord) (temp);
-            DEBUG_KEYEXP(("after SubWord: %0.8x \n", temp));
-            DEBUG_KEYEXP(("Rcon [i/Nk]: %0.8x\n", *pRcon));
-            temp ^= *pRcon++;
-            DEBUG_KEYEXP(("after XOR with Rcon: %0.8x \n", temp));
-        }
-        else if ((Nk > 6) && ((ix % Nk) == 4))
-        {
-            temp = AESBCMEMBER(SubWord) (temp);
-            DEBUG_KEYEXP(("after SubWord: %0.8x \n", temp));
-        }
-        DEBUG_KEYEXP(("w[i-Nk]: %0.8x\n", w[ix-Nk]));
-        temp ^= w [ix - Nk];
-        DEBUG_KEYEXP(("kw[ix]: %0.8x\n", temp));
-        w [ix] = temp;
-    }
-}
-
-
-static __inline__
-CipherVec AESBCMEMBER(StateShiftLeft32) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(StateShiftLeft32) (CipherVec state)
-{
-#if (USE_VEC_REG)
-    static const CipherVec mask = { 0xFF, 0xFF, 0xFF, 0xFF, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
-    return AESBCMEMBER(PackShuffleBytes) (state, mask);
-#else
-    CipherVec_AES_u temp;
-
-    temp.state = state;
-    temp.columns[3] = temp.columns[2];
-    temp.columns[2] = temp.columns[1];
-    temp.columns[1] = temp.columns[0];
-    temp.columns[0] = 0;
-    return temp.state;
-#endif
-}
-
-
-static __inline__
-CipherVec AESBCMEMBER(StateShiftRight64) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(StateShiftRight64) (CipherVec state)
-{
-#if (USE_VEC_REG)
-    static const CipherVec mask = { 8, 9, 10, 11, 12, 13, 14, 15, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
-    return AESBCMEMBER(PackShuffleBytes) (state, mask);
-#else
-    CipherVec_AES_u temp;
-
-    temp.state = state;
-    temp.columns[0] = temp.columns[2];
-    temp.columns[1] = temp.columns[3];
-    temp.columns[2] = 0;
-    temp.columns[3] = 0;
-    return temp.state;
-#endif
-}
-
-
-static __inline__
-CipherVec AESBCMEMBER(StateShiftLeft64) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(StateShiftLeft64) (CipherVec state)
-{
-#if (USE_VEC_REG)
-    static const CipherVec mask = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 1, 2, 3, 4, 5, 6, 7 };
-    return AESBCMEMBER(PackShuffleBytes) (state, mask);
-#else
-    CipherVec_AES_u temp;
-
-    temp.state = state;
-    temp.columns[3] = temp.columns[2];
-    temp.columns[2] = temp.columns[1];
-    temp.columns[1] = temp.columns[0];
-    temp.columns[0] = 0;
-    return temp.state;
-#endif
-}
-
-
-/*
- * incoming vector in words
- *     W0:W1:W2:W3
- *
- * output vector in words
- *     W3:W3:W3:W3
- */
-static __inline__
-CipherVec AESBCMEMBER(StateDupColumn3) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(StateDupColumn3) (CipherVec state)
-{
-#if (USE_VEC_REG)
-    return op_PSHUFD128 (state,0xFF);
-#else
-    CipherVec_AES_u temp;
-
-    temp.state = state;
-    temp.columns[2] = temp.columns[3];
-    temp.columns[1] = temp.columns[3];
-    temp.columns[0] = temp.columns[3];
-    return temp.state;
-#endif
-}
-
-
-/*
- * incoming vector in words
- *     W0:W1:W2:W3
- *
- * output vector in words
- *     W2:W2:W2:W2
- */
-static __inline__
-CipherVec AESBCMEMBER(StateDupColumn2) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(StateDupColumn2) (CipherVec state)
-{
-#if (USE_VEC_REG)
-    return op_PSHUFD128 (state,0xAA);
-#else
-    CipherVec_AES_u temp;
-
-    temp.state = state;
-    temp.columns[3] = temp.columns[2];
-    temp.columns[1] = temp.columns[2];
-    temp.columns[0] = temp.columns[2];
-    return temp.state;
-#endif
-}
-
-
-/*
- * incoming vector in words
- *     W0:W1:W2:W3
- *
- * output vector in words
- *     W2:W2:W2:W2
- */
-static __inline__
-CipherVec AESBCMEMBER(StateDupColumn1) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(StateDupColumn1) (CipherVec state)
-{
-#if (USE_VEC_REG)
-    return op_PSHUFD128 (state,0x55);
-#else
-    CipherVec_AES_u temp;
-
-    temp.state = state;
-    temp.columns[3] = temp.columns[1];
-    temp.columns[2] = temp.columns[1];
-    temp.columns[0] = temp.columns[1];
-    return temp.state;
-#endif
-}
-
-
-/*
- * incoming vector in words
- *     W0:W1:W2:W3
- *
- * output vector in words
- *     W0:W0:W0:W0
- */
-static __inline__
-CipherVec AESBCMEMBER(StateDupColumn0) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(StateDupColumn0) (CipherVec state)
-{
-#if (USE_VEC_REG)
-    return op_PSHUFD128 (state,0x00);
-#else
-    CipherVec_AES_u temp;
-
-    temp.state = state;
-    temp.columns[3] = temp.columns[0];
-    temp.columns[2] = temp.columns[0];
-    temp.columns[1] = temp.columns[0];
-    return temp.state;
-#endif
-}
-
-
-/*
- * incoming vector in words
- *     W0:W1:W2:W3
- *     X0:X1:X2:X3
- *
- * output vector in words
- *     W0:W1:X0:X1
- */
-static __inline__
-CipherVec AESBCMEMBER(StateMerge1) (CipherVec w, CipherVec x)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(StateMerge1) (CipherVec w, CipherVec x)
-{
-#if USE_VEC_REG
-    return op_SHUFPD (w, x, 0x00);
-#else
-    CipherVec_AES_u ww;
-    CipherVec_AES_u xx;
-
-    ww.state = w;
-    xx.state = x;
-
-    ww.columns[2] = xx.columns[0];
-    ww.columns[3] = xx.columns[1];
-
-    return ww.state;
-#endif
-}
-
-
-/*
- * incoming vector in words
- *     W0:W1:W2:W3
- *     X0:X1:X2:X3
- *
- * output vector in words
- *     X2:X3:W0:W1
- */
-static __inline__
-CipherVec AESBCMEMBER(StateMerge2) (CipherVec w, CipherVec x)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(StateMerge2) (CipherVec w, CipherVec x)
-{
-#if USE_VEC_REG
-    return op_SHUFPD (w, x, 0x01);
-#else
-    CipherVec_AES_u ww;
-    CipherVec_AES_u xx;
-
-    ww.state = w;
-    xx.state = x;
-
-    ww.columns[0] = ww.columns[2];
-    ww.columns[1] = ww.columns[3];
-    ww.columns[2] = xx.columns[0];
-    ww.columns[3] = xx.columns[1];
-
-    return ww.state;
-#endif
-}
-
-
-/*
- * incoming vector in words
- *     W0:W1:W2:W3
- *     X0:X1:X2:X3
- *
- * output vector in words
- *     X2:X3:W0:W1
- */
-static __inline__
-CipherVec AESBCMEMBER(StateMerge3) (CipherVec v0, CipherVec v1)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(StateMerge3) (CipherVec v0, CipherVec v1)
-{
-#if USE_VEC_REG
-    return op_SHUFPD (v0, v1, 0x02);
-#else
-    CipherVec_AES_u t0;
-    CipherVec_AES_u t1;
-
-    t0.state = v0;
-    t1.state = v1;
-
-    t0.columns[2] = t0.columns[0];
-    t0.columns[3] = t0.columns[1];
-    t0.columns[0] = t1.columns[2];
-    t0.columns[1] = t1.columns[3];
-
-    return t0.state;
-#endif
-}
-
-
-/*
- * incoming vector in words
- *     W0:W1:W2:W3
- *
- * output vector in words
- *     W0:W0^W1:W0^W1^W2:W0^W1^W2^W3
- */
-static __inline__
-CipherVec AESBCMEMBER(ShiftXorColumns) (CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(ShiftXorColumns) (CipherVec state)
-{
-#if USE_VEC
-    register CipherVec shift = state;
-
-    state ^= shift = AESBCMEMBER(StateShiftLeft32) (shift);
-    state ^= shift = AESBCMEMBER(StateShiftLeft32) (shift);
-    state ^= shift = AESBCMEMBER(StateShiftLeft32) (shift);
-
-    return state;
-#else
-    CipherVec_AES_u temp;
-
-    temp.state = state;
-
-    temp.columns[1] ^= temp.columns[0];
-    temp.columns[2] ^= temp.columns[1];
-    temp.columns[3] ^= temp.columns[2];
-
-    return temp.state;
-#endif
-}
-
-
-static __inline__ 
-CipherVec AESBCMEMBER(AesKeyGenAssist) (register CipherVec state, const int rcon)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(AesKeyGenAssist) (register CipherVec state, const int rcon)
-{
-#if (USE_AES_NI)
-    return op_AESKEYGENASSIST (state, rcon);
-#else
-    CipherVec_AES_u in;
-    CipherVec_AES_u out;
-    AESWord rconw;
-
-    rconw = (AESWord)(AESByte)rcon;
-    in.state = state;
-
-    out.columns[0] = AESBCMEMBER(SubWord)(in.columns[1]);
-    out.columns[1] = AESBCMEMBER(RotWord)(out.columns[0]) ^ rconw;
-    out.columns[2] = AESBCMEMBER(SubWord)(in.columns[3]);
-    out.columns[3] = AESBCMEMBER(RotWord)(out.columns[2]) ^ rconw;
-
-    return out.state;
-#endif
-}
-
-
-static __inline__ 
-CipherVec AESBCMEMBER(AesKeyGenAssistColumn1) (register CipherVec state, const int rcon)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(AesKeyGenAssistColumn1) (register CipherVec state, const int rcon)
-{
-#if (USE_AES_NI)
-    register CipherVec tmp = state;
-    tmp = op_AESKEYGENASSIST (tmp, rcon);
-    return  AESBCMEMBER(StateDupColumn1) (tmp);
-#else
-    CipherVec_AES_u u;
-    AESWord rconw;
-    AESWord temp;
-
-    rconw = (AESWord)(AESByte)rcon;
-    u.state = state;
-    temp  = AESBCMEMBER(SubWord)(u.columns[1]);
-    temp  = AESBCMEMBER(RotWord)(temp);
-    temp ^= rconw;
-
-    u.columns [0] = u.columns [1] = u.columns [2] = u.columns [3] = temp;
-    return u.state;
-#endif
-}
-
-
-static __inline__ 
-CipherVec AESBCMEMBER(AesKeyGenAssistColumn2) (register CipherVec state)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(AesKeyGenAssistColumn2) (register CipherVec state)
-{
-#if (USE_AES_NI)
-    register CipherVec tmp = state;
-    tmp = op_AESKEYGENASSIST (tmp, 0);
-    return  AESBCMEMBER(StateDupColumn2) (tmp);
-#else
-    CipherVec_AES_u u;
-    AESWord temp;
-
-    u.state = state;
-    temp  = AESBCMEMBER(SubWord)(u.columns[3]);
-
-    u.columns [0] = u.columns [1] = u.columns [2] = u.columns [3] = temp;
-    return u.state;
-#endif
-}
-
-
-static __inline__ 
-CipherVec AESBCMEMBER(AesKeyGenAssistColumn3) (register CipherVec state, const int rcon)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(AesKeyGenAssistColumn3) (register CipherVec state, const int rcon)
-{
-#if (USE_AES_NI)
-    register CipherVec tmp = state;
-    tmp = op_AESKEYGENASSIST (tmp, rcon);
-    return  AESBCMEMBER(StateDupColumn3) (tmp);
-
-#else
-    register CipherVec vrcon;
-    register CipherVec tmp;
-
-    vrcon = AESBCMEMBER(SetColumn) (vec_00, (AESWord)rcon, 3);
-    tmp = AESBCMEMBER(SubBytes) (state);
-    DEBUG_CIPHER_VECTOR ("SubBytes", tmp);
-    tmp = AESBCMEMBER(RotBytesLeft) (tmp);
-    DEBUG_CIPHER_VECTOR ("RotBytesLeft", tmp);
-    tmp = AESBCMEMBER(VecXor)(tmp, vrcon);
-    DEBUG_CIPHER_VECTOR ("VecXor", tmp);
-    tmp = AESBCMEMBER(StateDupColumn3) (tmp);
-    DEBUG_CIPHER_VECTOR ("StateDupColumn3", tmp);
-    return tmp;
-
-#endif
-/*
-#elif USE_VEC && 1
-    register CipherVec tmp;
-    CipherVec_AES_u u;
-    
-    u.columns [3] = rcon;
-
-    tmp = AESBCMEMBER(SubBytes) (state);
-    DEBUG_CIPHER_VECTOR ("SubBytes", tmp);
-    tmp = AESBCMEMBER(RotBytesLeft) (tmp);
-    DEBUG_CIPHER_VECTOR ("RotBytesLeft", tmp);
-    tmp = AESBCMEMBER(VecXor)(tmp, u.state);
-    DEBUG_CIPHER_VECTOR ("VecXor", tmp);
-    tmp = AESBCMEMBER(StateDupColumn3) (tmp);
-    DEBUG_CIPHER_VECTOR ("StateDupColumn3", tmp);
-    return tmp;
-
-#else
-    CipherVec_AES_u u;
-    AESWord rconw;
-    AESWord temp;
-
-    rconw = (AESWord)(AESByte)rcon;
-    u.state = state;
-    temp  = AESBCMEMBER(SubWord)(u.columns[3]);
-    temp  = AESBCMEMBER(RotWord)(temp);
-    temp ^= rconw;
-
-    u.columns [0] = u.columns [1] = u.columns [2] = u.columns [3] = temp;
-    return u.state;
-#endif
-*/
-}
-
-
-#if USE_VEC
-static __inline__
-void AESBCMEMBER(KeyExpansion128) (CipherVec * round_keys, const AESByte * key)
-{
-    CipherVec state;
-    CipherVec kgastate;
-
-    state = AESBCMEMBER(StateIn) (key);
-    round_keys[0] = state;
-
-#define KE128(rcon,offset) \
-    kgastate = AESBCMEMBER(AesKeyGenAssistColumn3) (state, rcon); \
-    state = AESBCMEMBER(ShiftXorColumns) (state); \
-    state ^= kgastate; \
-    round_keys[offset] = state
-
-    KE128(0x01,1);
-    KE128(0x02,2);
-    KE128(0x04,3);
-    KE128(0x08,4);
-    KE128(0x10,5);
-    KE128(0x20,6);
-    KE128(0x40,7);
-    KE128(0x80,8);
-    KE128(0x1B,9);
-    KE128(0x36,10);
-}
-#else
-static __inline__
-void AESBCMEMBER(KeyExpansion128) (CipherVec * w, const AESByte * key)
-{
-    OUTMSG(("\n\n\n%s: Not my code\n\n\n",__func__));
-    AESBCMEMBER(KeyExpansion) (w, key, AES_Nr_128, AES_Nk_128);
-}
-#endif
-
-
-#if USE_VEC
-static __inline__
-void AESBCMEMBER(KeyExpansion192) (CipherVec * round_keys, const AESByte * key)
-{
-    /* work on three blocks at a time which is two Nr worth
-     * we'll build it with 6 words in v0:v1 and 6 words in w0:w1
-     * but move them them into v0:v1:v2 before writing them to
-     * the key schedule
-     */
-
-    register CipherVec v0, v1, v2, v3, v4;
-    register CipherVec k;          /* we'll only need one of the key gen assist blocks at a time */
-
-/* pattern 0 */
-    v0  = AESBCMEMBER(StateIn) (key);              /* k0    : k1    : k2     : k3           */
-    v1  = AESBCMEMBER(StateIn) (key+8);            /* k2    : k3    : k4     : k5           */
-    v1  = AESBCMEMBER(StateShiftRight64) (v1);     /* k4    : k5    : 0      : 0            */
-
-    round_keys[0] = v0; /* K0:K1:K2:K3 */
-
-/* pattern 1 */
-/* start the working pattern with 6 ready words in v0:v1 */
-
-    k   = AESBCMEMBER(AesKeyGenAssistColumn1)
-        (k = v1, 0x01);                            /* F(k5) : F(k5) : F(k5)  : F(k5)        */
-    v3  = AESBCMEMBER(ShiftXorColumns) (v0);       /* k0    : k0^k1 :k0^k1^k2:k0^k1^k2^k3   */
-    v3 ^= k;                                       /* k6    : k7    : k8     : k9           */
-    v4  = AESBCMEMBER(ShiftXorColumns) (v1);       /* k4    : k4^k5 : k4^k5  : k4^k5        */
-    k   = AESBCMEMBER(StateDupColumn3) (k = v3);   /* k9    : k9    : k9     : k9           */
-    v4 ^= k;                                       /* k10   : k11   : k10    : k11          */
-    v1  = AESBCMEMBER(StateMerge1) (v1,v3);        /* k4    : k5    : k6     : k7           */
-    round_keys[1] = v1; /* K4:K5:K6:K7 */
-
-    v2  = AESBCMEMBER(StateMerge2) (v3,v4);        /* k8    : k9    : k10    : k11          */
-    round_keys[2] = v2; /* K8:K9:K10:K11 */
-
-/* pattern 2 */
-    v0  = AESBCMEMBER(ShiftXorColumns) (v3);       /* k6    : k6^k7 :k6^k7^k8:k6^k7^k8^k9   */
-    v1  = AESBCMEMBER(ShiftXorColumns) (v4);       /* k10   :k10^k11: k10^k11: k10^k11      */
-    k   = AESBCMEMBER(AesKeyGenAssistColumn3)
-        (k = v2,0x02);                             /* F(k11): F(k11): F(k11) : F(k11)       */
-    v0 ^= k;                                       /* k12   : k13   : k14    : k15          */
-    round_keys[3] = v0; /* K12:K13:K14:K15 */
-    k   = AESBCMEMBER(StateDupColumn3) (k = v0);   /* k15   : k15   : k15    : k15          */
-    v1 ^= k;                                       /* k16   : k17   : k16    : k17          */
-
-
-/* pattern 1 */
-/* start the working pattern with 6 ready words in v0:v1 */
-
-    k   = AESBCMEMBER(AesKeyGenAssistColumn1)
-        (k = v1,0x04);                             /* F(k17): F(k17): F(k17) : F(k17)       */
-    v3  = AESBCMEMBER(ShiftXorColumns) (v0);       /* k12   :k12^k13:k12^k13^k14:k12^k13^k14^k15 */
-    v3 ^= k;                                       /* k18   : k19   : k20    : k21          */
-    v4  = AESBCMEMBER(ShiftXorColumns) (v1);       /* k16   :k16^k17: k17    : 0            */
-    k   = AESBCMEMBER(StateDupColumn3) (k = v3);   /* k21   : k21   : k21    : k21          */
-    v4 ^= k;                                       /* k22   : k23   : x      : x            */
-    v1  = AESBCMEMBER(StateMerge1) (v1,v3);        /* k16   : k17   : k18    : k19          */
-    round_keys[4] = v1; /* K16:K17:K18:K19 */
-
-    v2  = AESBCMEMBER(StateMerge2) (v3,v4);        /* k20   : k21   : k22    : k23          */
-    round_keys[5] = v2; /* K20:K21:K22:K23 */
-
-/* pattern 2 */
-    v0  = AESBCMEMBER(ShiftXorColumns) (v3);       /* k18   :k18^k19:k18^k19^k20:k18^k19^k20^k21 */
-    v1  = AESBCMEMBER(ShiftXorColumns) (v4);       /* k22   :k22^k23: k23    : 0            */
-    k   = AESBCMEMBER(AesKeyGenAssistColumn3)
-        (k = v2,0x08);                             /* F(k23): F(k23): F(k23) : F(k23)       */
-    v0 ^= k;                                       /* k24   : k25   : k26    : k27          */
-    k   = AESBCMEMBER(StateDupColumn3) (k = v0);   /* k27   : k27   : k27    : k27          */
-    v1 ^= k;                                       /* k28   : k29   : x      : x            */
-
-    round_keys[6] = v0; /* K24:K25:K26:K27 */
-
-/* pattern 1 4-15 = 28-39 */
-/* start the working pattern with 6 ready words in v0:v1 */
-
-    k   = AESBCMEMBER(AesKeyGenAssistColumn1)
-        (k = v1,0x10);                             /* F(k29): F(k29): F(k29) : F(k29)       */
-    v3  = AESBCMEMBER(ShiftXorColumns) (v0);       /* k24   :k24^k25:k24^k25^k26:k24^k25^k26^k27 */
-    v3 ^= k;                                       /* k30   : k31   : k32    : k33          */
-    v4  = AESBCMEMBER(ShiftXorColumns) (v1);       /* k26   :k28^k29: k29    : 0            */
-    k   = AESBCMEMBER(StateDupColumn3) (k = v3);   /* k33   : k33   : k33    : k33          */
-    v4 ^= k;                                       /* k34   : k35   : x      : x            */
-    v1  = AESBCMEMBER(StateMerge1) (v1,v3);        /* k28   : k29   : k30    : k31          */
-
-    round_keys[7] = v1; /* K28:K29:K30:K31 */
-
-    v2  = AESBCMEMBER(StateMerge2) (v3,v4);        /* k32   : k33   : k34    : k35          */
-    round_keys[8] = v2; /* K32:K33:K34:K35 */
-/* pattern 2 */
-    v0  = AESBCMEMBER(ShiftXorColumns) (v3);       /* k30   :k30^k31:k30^k31^k32:k30^k31^k32^k33 */
-    v1  = AESBCMEMBER(ShiftXorColumns) (v4);       /* k26   :k26^k27: k27    : 0            */
-    k   = AESBCMEMBER(AesKeyGenAssistColumn3)
-        (k = v2,0x20);                             /* F(k35): F(k35): F(k35) : F(k35)       */
-    v0 ^= k;                                       /* k36   : k37   : k38    : k39          */
-    k   = AESBCMEMBER(StateDupColumn3) (v0);       /* k39   : k39   : k39    : k39          */
-    v1 ^= k;                                       /* k40   : k41   : x      : x            */
-
-    round_keys[9] = v0; /* K36:K37:K38:K39 */
-
-/* pattern 1 4-15 = 40-55 but we only need through 51 so we change from pattern 2 to pattern 3 */
-/* start the working pattern with 6 ready words in v0:v1 */
-
-    k   = AESBCMEMBER(AesKeyGenAssistColumn1)
-        (k = v1,0x40);                             /* F(k41): F(k41): F(k41) : F(k41)       */
-    v3  = AESBCMEMBER(ShiftXorColumns) (v0);       /* k36   :k36^k37:k36^k37^k38:k36^k37^k38^k39 */
-    v4  = AESBCMEMBER(ShiftXorColumns) (v1);       /* k40   :k40^k41: x   5  : x            */
-    v3 ^= k;                                       /* k42   : k43   : k44    : k45          */
-    k   = AESBCMEMBER(StateDupColumn3) (k = v3);   /* k45   : k45   : k45    : k45          */
-    v4 ^= k;                                       /* k46   : k47   : x      : x            */
-    v1  = AESBCMEMBER(StateMerge1) (v1,v3);        /* k40   : k41   : k42    : k43          */
-    round_keys[10] = v1; /* K40:K41:K42:K43 */
-    v2  = AESBCMEMBER(StateMerge2) (v3,v4);        /* k44   : k45   : k46    : k47          */
-    round_keys[11] = v2; /* K44:K45:K46:K47 */
-
-/* pattern 3 */
-    v0  = AESBCMEMBER(ShiftXorColumns) (v3);       /* k42   :k42^k43:k42^k43^k44:k42^k43^k44^k45  */
-    k   = AESBCMEMBER(AesKeyGenAssistColumn3)
-                                       (v2,0x80);  /* F(k47): F(k47): F(k47) : F(k47)       */
-    v0 ^= k;                                       /* k48   : k49   : k50    : k51          */
-    round_keys[12] = v0;                           /* K48:K49:K50:K51 */
-}
-#else
-static __inline__
-void AESBCMEMBER(KeyExpansion192) (CipherVec * w, const AESByte * key)
-{
-    AESBCMEMBER(KeyExpansion) (w, key, AES_Nr_192, AES_Nk_192);
-}
-#endif
-
-
-
-
-/* ----- */
-
-#if USE_VEC || 1
-static __inline__
-void AESBCMEMBER(KeyExpansion256) (CipherVec * round_keys, const AESByte * key)
-{
-    CipherVec v0, v1;
-    CipherVec k;
-
-    v0 = AESBCMEMBER (StateIn) (key);
-    v1 = AESBCMEMBER (StateIn) (key + sizeof v0);
-
-    round_keys[0] = v0; /* k0  : k1  : k2  : k3  */
-    round_keys[1] = v1; /* k4  : k5  : k6  : k7  */
-
-#define KE256_1(offset,rcon)                            \
-    k   = AESBCMEMBER(AesKeyGenAssistColumn3)(v1,rcon); \
-    v0  = AESBCMEMBER(ShiftXorColumns) (v0);            \
-    v0  = AESBCMEMBER(VecXor) (v0, k);                  \
-    round_keys[offset] = v0
-
-#define KE256_2(offset) \
-    k   = AESBCMEMBER(AesKeyGenAssistColumn2)(v0);      \
-    v1  = AESBCMEMBER(ShiftXorColumns) (v1);            \
-    v1  = AESBCMEMBER(VecXor) (v1, k);                  \
-    round_keys[offset] = v1
-
-    KE256_1(2,0x01);    /* k8  : k9  : k10 : k11 */
-    KE256_2(3);         /* k12 : k13 : k14 : k15 */
-    KE256_1(4,0x02);    /* k16 : k17 : k18 : k19 */
-    KE256_2(5);         /* k20 : k21 : k22 : k23 */
-    KE256_1(6,0x04);    /* k24 : k25 : k26 : k27 */
-    KE256_2(7);         /* k28 : k29 : k30 : k31 */
-    KE256_1(8,0x08);    /* k32 : k33 : k34 : k35 */
-    KE256_2(9);         /* k36 : k37 : k38 : k39 */
-    KE256_1(10,0x10);   /* k40 : k41 : k42 : k43 */
-    KE256_2(11);        /* k44 : k45 : k46 : k47 */
-    KE256_1(12,0x20);   /* k48 : k49 : k50 : k51 */
-    KE256_2(13);        /* k52 : k53 : k54 : k55 */
-    KE256_1(14,0x40);   /* k56 : k57 : k58 : k59 */
-}
-#else
-static __inline__
-void AESBCMEMBER(KeyExpansion256) (CipherVec * w, const AESByte * key)
-{
-    AESBCMEMBER(KeyExpansion) (w, key, AES_Nr_256, AES_Nk_256);
-}
-#endif
-
-
-static __inline__
-void AESBCMEMBER(EqInvKeyExpansion) (CipherVec * r, const CipherVec * dr, unsigned Nr)
-{
-    unsigned ix, jx;
-
-    jx = Nr;
-    ix = 0;
-    r[ix++] = dr[jx--];
-    while (jx)
-        r[ix++] = AESBCMEMBER(InvMixColumns)(dr[jx--]);
-    r[ix] = dr[jx];
-}
-
-
-static __inline__
-void AESBCMEMBER(EqInvKeyExpansion128) (CipherVec * w, const CipherVec * kw)
-{
-    AESBCMEMBER(EqInvKeyExpansion) (w, kw, AES_Nr_128);
-}
-
-
-static __inline__
-void AESBCMEMBER(EqInvKeyExpansion192) (CipherVec * w, const CipherVec * kw)
-{
-    AESBCMEMBER(EqInvKeyExpansion) (w, kw, AES_Nr_192);
-}
-
-
-static __inline__
-void AESBCMEMBER(EqInvKeyExpansion256) (CipherVec * w, const CipherVec * kw)
-{
-    AESBCMEMBER(EqInvKeyExpansion) (w, kw, AES_Nr_256);
-}
-
-
-/*
- * Cipher First Round
- */
-static __inline__ 
-CipherVec AESBCMEMBER(FirstRound) (CipherVec state, const CipherVec round_keys)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(FirstRound) (CipherVec state, const CipherVec round_keys)
-{
-    DEBUG_CIPHER_VECTOR("Start of Round", state);
-
-    DEBUG_CIPHER_VECTOR("Round Key", round_keys);
-
-    state = AESBCMEMBER(AddRoundKey) (state, round_keys);
-
-    DEBUG_CIPHER_VECTOR("End 1st Round", state);
-
-    return state;
-}
-
-
-static __inline__ 
-CipherVec AESBCMEMBER(MiddleRound) (register CipherVec state,
-                                    register const CipherVec round_keys)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(MiddleRound) (register CipherVec state,
-                                    register const CipherVec round_keys)
-{
-#if _DEBUGGING
-    CipherVec mstate;
-    mstate = state;
-
-    DEBUG_CIPHER_VECTOR("Start of Round", mstate);
-
-#endif
-
-#if USE_AES_NI
-    state = op_AESENC (state, round_keys);
-#else
-    state = AESBCMEMBER(SubBytes) (state);
-
-    DEBUG_CIPHER_VECTOR("After SubBytes", state);
-
-    state = AESBCMEMBER(ShiftRows) (state);
-
-    DEBUG_CIPHER_VECTOR("After ShiftRow", state);
-
-    state = AESBCMEMBER(MixColumns) (state);
-
-    /* ommited n on purpose */
-    DEBUG_CIPHER_VECTOR("After MixColum", state);
-
-    state = AESBCMEMBER(AddRoundKey) (state, round_keys);
-#endif
-    DEBUG_CIPHER_VECTOR("Round Key", round_keys);
-    DEBUG_CIPHER_VECTOR("End of Round", state);
-
-    return state;
-}
-
-
-static __inline__ 
-CipherVec AESBCMEMBER(LastRound) (register CipherVec state, register CipherVec round_keys)
-    __attribute__ ((always_inline));
-
-static __inline__ 
-CipherVec AESBCMEMBER(LastRound) (register CipherVec state, register CipherVec round_keys)
-{
-    DEBUG_CIPHER_VECTOR("Start of Round", state);
-
-#if USE_AES_NI
-    state = op_AESENCLAST (state, round_keys);
-#else
-    state = AESBCMEMBER(SubBytes) (state);
-
-    DEBUG_CIPHER_VECTOR("After SubBytes", state);
-
-    state = AESBCMEMBER(ShiftRows) (state);
-
-    DEBUG_CIPHER_VECTOR("After ShiftRow", state);
-
-    state = AESBCMEMBER(AddRoundKey) (state, round_keys);
-#endif
-    DEBUG_CIPHER_VECTOR("Round Key", round_keys);
-    DEBUG_CIPHER_VECTOR("End of Round", state);
-
-    return state;
-}
-
-
-/* ----------------------------------------------------------------------
- * Cipher
- */
-/*
- * 
-This implementation as stated
- * above for simplifaction broke out the three types of rounds into
- * first round, middle rounds, and last round.  This approach was taken
- * for ease of coding for optimization using smaller bytes of code
- * but inlining of the functions for efficiency
- */
-static __inline__ 
-CipherVec AESBCMEMBER(Cipher) (CipherVec state, const CipherVec * key,
-                            unsigned Nr)
-{
-    unsigned ix = 0;
-
-    state = AESBCMEMBER(FirstRound) (state, key[ix++]);
-
-    for ( ; ix < Nr; ++ix)
-        state = AESBCMEMBER(MiddleRound) (state, key[ix] );
-
-    return AESBCMEMBER(LastRound) (state, key[ix]);
-}
-
-
-/* 
- * Section 5.1 of FIPS 197
- *
- *   This set of routines implements our structured wrapping of the 
- *   FIPS-197 Section 5.3.5 Equivalent Inverse Cipher.  In particular
- *   figure 15 Pseudo Code for the Equivalent Inverse Cipher.
- *
- *   The FIPS pseudocode has a single function which we have broken out 
- *   into three kinds of rounds - first round, middle rounds and last
- *   round as we have also done with the cipher rountine.
- *
- *   The EqInvCipher operates on whole cipher blocks so the Byte and Block
- *   code is the same here until subroutines of the round functions are
- *   called.  
- */
-
-/* 
- * First round of equivalent inverse cipher is merely an XOR against the
- * round key.
- */
-static __inline__
-CipherVec AESBCMEMBER(EqInvFirstRound) (CipherVec state, CipherVec round_keys)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(EqInvFirstRound) (CipherVec state, CipherVec round_keys)
-{
-    DEBUG_INVCIPHER_VECTOR("Start of Round", state);
-
-    state =  AESBCMEMBER(AddRoundKey) (state, round_keys);
-
-    DEBUG_INVCIPHER_VECTOR("Round Key", round_keys);
-    DEBUG_INVCIPHER_VECTOR("End of Round", state);
-    return state;
-}
-
-
-/*
- * middle rounds of the equivalent inverse cipher perform four steps
- *   InvSubBytes (inverse substitute bytes
- *   InvShiftRows (inverse shift rows
- *   InvMixColumns (inverse mix columns)
- *   AddRoundKey   (xor against the round key)
- *
- * the AES-NI instruction set from until implments all four steps with 
- * a single instruction
- */
-
-static __inline__
-CipherVec AESBCMEMBER(EqInvMiddleRound) (register CipherVec state,
-                                         register CipherVec round_keys)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(EqInvMiddleRound) (register CipherVec state,
-                                         register CipherVec round_keys)
-{
-#if _DEBUGGING
-    CipherVec mstate;
-    CipherVec mround_keys;
-
-    mstate = state;
-    mround_keys = round_keys;
-#endif
-
-    DEBUG_INVCIPHER_VECTOR("Start of Round", mstate);
-
-    /* 
-     * AES-NI implmentation
-     */
-#if USE_AES_NI
-
-    state = op_AESDEC (state, round_keys);
-
-#else /* #if USE_AES_NI */
-
-    /*
-     * All other implementations
-     */
-    state = AESBCMEMBER(InvSubBytes) (state);
-
-# if _DEBUGGING
-    mstate = state;
-
-    DEBUG_INVCIPHER_VECTOR("After InvSubBy", mstate);
-# endif
-
-    state = AESBCMEMBER(InvShiftRows) (state);
-
-# if _DEBUGGING
-    mstate = state;
-
-    DEBUG_INVCIPHER_VECTOR("After InvShift", mstate);
-# endif
-
-    state = AESBCMEMBER(InvMixColumns) (state);
-
-# if _DEBUGGING
-    mstate = state;
-
-    DEBUG_INVCIPHER_VECTOR("After InvMixCo", mstate);
-# endif
-
-    state = AESBCMEMBER(AddRoundKey) (state, round_keys);
-#endif
-
-#if _DEBUGGING
-    mstate = state;
-
-    DEBUG_INVCIPHER_VECTOR("Round Key", mround_keys);
-
-    DEBUG_INVCIPHER_VECTOR("End of Round", mstate);
-#endif /* #if USE_AES_NI */
-
-    return state;
-}
-
-
-/*
- * The final round of the equivalent inverse cipher is the same as 
- * the middle rounds with the ommission of the InvMixColumns step.
- */
-static __inline__
-CipherVec AESBCMEMBER(EqInvLastRound) (register CipherVec state,
-                                       register CipherVec round_keys)
-    __attribute__ ((always_inline));
-
-static __inline__
-CipherVec AESBCMEMBER(EqInvLastRound) (register CipherVec state,
-                                       register CipherVec round_keys)
-{
-    DEBUG_INVCIPHER_VECTOR("Start of Round", state);
-
-#if USE_AES_NI
-    state = op_AESDECLAST (state, round_keys);
-#else
-
-    state = AESBCMEMBER(InvSubBytes) (state);
-
-    DEBUG_INVCIPHER_VECTOR("After InvSubBy", state);
-
-    state = AESBCMEMBER(InvShiftRows) (state);
-
-    DEBUG_INVCIPHER_VECTOR("After InvShift", state);
-
-    state = AESBCMEMBER(AddRoundKey) (state, round_keys);
-#endif
-    DEBUG_INVCIPHER_VECTOR("Round Key", round_keys);
-    DEBUG_INVCIPHER_VECTOR("End of Round", state);
-
-    return state;
-}
-
-
-/*
- * The EqInvCipher functions (is defined in Figure 15 'Pseudo Code for
- * for the Equivalent Inverse Cipher.  This implementation as stated
- * above for simplifaction broke out the three types of rounds into
- * first round, middle rounds, and last round.  This approach was taken
- * for ease of coding for optimization using smaller bytes of code
- * but inlining of the functions for efficiency
- */
-static /*__inline__*/
-CipherVec AESBCMEMBER(EqInvCipher) (CipherVec state, const CipherVec * key,
-                                    unsigned Nr)
-{
-    unsigned ix = 0;
-
-    state = AESBCMEMBER(EqInvFirstRound) (state, key[ix++]);
-
-    for ( ; ix < Nr; ++ix)
-        state = AESBCMEMBER(EqInvMiddleRound) (state, key[ix] );
-
-    return AESBCMEMBER(EqInvLastRound) (state, key[ix]);
-}
-
-
-/* ======================================================================
- * This section of the file is the use of the cipher defined above within
- * our BlockCipherObject.
- *
- * These are the functions that will be directly referenced in the vector
- * table for the block cipher.  These are not specifically derived from
- * the FIPS-197 document.
- */
-#include "blockcipher-impl.h"
-
-typedef struct AES_CLASS AES_CLASS;
-
-static const char AESBCMEMBER(aes_ncbi_name) [] = CLASS_STRING(AES_CLASS);
-
-
-/* ----------------------------------------------------------------------
- * Destroy
- *   How large is the stored key for this cipher?  Not the user key used
- *   to create this key (key schedule)
- *
- *   This is needed by KCipher to know how large the KCipher objecr is at
- *   allocation and to know how much of a buffer each decryption/encryption is
- */
-static
-void AESBCMEMBER(Destroy) (const BLOCKCIPHER_VEC_IMPL * self)
-{
-    /* we use a constant object so do nothing */
-}
-
-
-/* ----------------------------------------------------------------------
- * BlockSize
- */
-static
-uint32_t AESBCMEMBER(BlockSize) ()
-{
-    return (uint32_t) sizeof (AESBlock);
-}
-
-
-/* ----------------------------------------------------------------------
- * KeySize
- *   How large is the stored key for this cipher?  Not the user key used
- *   to create this key (key schedule)
- *
- *   This is needed by KCipher to know how large the KCipher objecr is at
- *   allocation and to know how much of a buffer each decryption/encryption is
- */
-static
-uint32_t AESBCMEMBER(KeySize) ()
-{
-    return (uint32_t) sizeof (AESKeySchedule);
-}
-
-
-/* ----------------------------------------------------------------------
- * SetEncryptKey
- *   The KCipher calls this to have the block cipher build an encryption
- *   key in the KCipher object
- *
- */
-static
-rc_t AESBCMEMBER(SetEncryptKey) (void * encrypt_key, const char * user_key,
-                                 uint32_t user_key_size)
-{
-    rc_t rc;
-    AESKeySchedule * key;
-
-    rc = 0;
-    key = encrypt_key;
-
-    switch (user_key_size)
-    {
-    case AES_Nk_128 * sizeof (AESWord):
-        key->number_of_rounds = AES_Nr_128;
-        AESBCMEMBER(KeyExpansion128) (key->round_keys, (AESByte*)user_key);
-        break;
-
-    case AES_Nk_192 * sizeof (AESWord):
-        key->number_of_rounds = AES_Nr_192;
-        AESBCMEMBER(KeyExpansion192) (key->round_keys, (AESByte*)user_key);
-        break;
-
-    case AES_Nk_256 * sizeof (AESWord):
-        key->number_of_rounds = AES_Nr_256;
-        AESBCMEMBER(KeyExpansion256) (key->round_keys, (AESByte*)user_key);
-        break;
-
-    default:
-        key->number_of_rounds = 0;
-        memset (key, 0, sizeof (*key));
-        rc = RC (rcKrypto, rcBlockCipher, rcUpdating, rcParam, rcInvalid);
-        break;
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * SetDecryptKey
- *   The KCipher calls this to have the block cipher build an decryption
- *   key in the KCipher object
- *
- */
-static
-rc_t AESBCMEMBER(SetDecryptKey) (void * decrypt_key,
-                                 const char * user_key,
-                                 uint32_t user_key_size)
-{
-    AESKeySchedule encrypt_key;
-    rc_t rc;
-
-    rc = AESBCMEMBER(SetEncryptKey) (&encrypt_key, user_key, user_key_size);
-    if (rc == 0)
-    {
-        AESKeySchedule * key;
-
-        key = decrypt_key;
-
-        switch (key->number_of_rounds = encrypt_key.number_of_rounds)
-        {
-        case AES_Nr_128:
-            AESBCMEMBER(EqInvKeyExpansion128) (key->round_keys,
-                                               encrypt_key.round_keys);
-            break;
-
-        case AES_Nr_192:
-            AESBCMEMBER(EqInvKeyExpansion192) (key->round_keys,
-                                               encrypt_key.round_keys);
-            break;
-
-        case AES_Nr_256:
-            AESBCMEMBER(EqInvKeyExpansion256) (key->round_keys,
-                                               encrypt_key.round_keys);
-            break;
-        }
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * Encrypt
- *
- *   Perform an encryption of a single block.  Chained modes and stream
- *   cipher modes will call this multiple times.
- *
- */
-static
-CipherVec AESBCMEMBER(Encrypt) (CipherVec state,
-                                const void * encrypt_key)
-{
-    const AESKeySchedule * key = encrypt_key;
-    assert (key);
-
-    switch (key->number_of_rounds)
-    {
-    default:
-        state = vec_00;
-        break;
-
-    case AES_Nr_128:
-        state = AESBCMEMBER(Cipher) (state, key->round_keys, AES_Nr_128);
-        break;
-
-    case AES_Nr_192:
-        state = AESBCMEMBER(Cipher) (state, key->round_keys, AES_Nr_192);
-        break;
-
-    case AES_Nr_256:
-        state = AESBCMEMBER(Cipher) (state, key->round_keys, AES_Nr_256);
-        break;
-    }
-
-    return state;
-}
-
-
-/* ----------------------------------------------------------------------
- * Decrypt
- *
- *   Perform a decryption of a single block.  Chained modes and stream
- *   cipher modes will call this multiple times.
- */
-static
-CipherVec AESBCMEMBER(Decrypt) (CipherVec state,
-                                const void * decrypt_key)
-{
-    const AESKeySchedule * key = decrypt_key;
-
-    assert (key);
-
-    switch (key->number_of_rounds)
-    {
-    default:
-        state = vec_00; /* for an illegal cipher key schedule just write zeroes */
-        break;
-
-    case AES_Nr_128:
-        state = AESBCMEMBER(EqInvCipher) (state, key->round_keys,
-                                          AES_Nr_128);
-        break;
-
-    case AES_Nr_192:
-        state = AESBCMEMBER(EqInvCipher) (state, key->round_keys,
-                                          AES_Nr_192);
-        break;
-
-    case AES_Nr_256:
-        state = AESBCMEMBER(EqInvCipher) (state, key->round_keys,
-                                          AES_Nr_256);
-        break;
-    }
-
-    return state;
-}
-
-
-/* ----------------------------------------------------------------------
- * MakeProcessorSupport
- *
- * Run-time check for support of this particular AES implmentation by
- * checking the flags given via the cpuid instruction.
- */
-static __inline__
-bool AESBCMEMBER(ProcessorSupport) ()
-{
-    uint32_t level = 1, a, b, c, d;
-    bool ret = true;
-
-    __get_cpuid (level, &a, &b, &c, &d);
-
-    DEBUG_OBJECT(("%s: level %x a %x, b %x c %x d %x\n",__func__, level, a,b,c,d));
-
-#if USE_AES_NI
-    /*
-     * Only one flag tells whether the AES-NI instructions
-     * are implmented in this CPU
-     */
-    if ( ! (c & bit_AES))
-    {
-        DEBUG_OBJECT(("%s: failed no AES\n",__func__));
-        ret = false;
-    } else
-#endif
-
-#if USE_VEC_REG
-    /*
-     * Several flags indicate different levels of SSE
-     * instruction implmentation
-     *
-     * we require SSE4.1
-     *
-     * that dates from 2006 so is most likely good enough
-     */
-        /* if ( ! (c & (bit_SSE4_2))
-    {
-        DEBUG_OBJECT(("%s: failed no SSSE3\n",__func__));
-        ret = false;
-    }
-
-    else */
-        if ( ! (c & bit_SSE4_1))
-    {
-        DEBUG_OBJECT(("%s: failed no SSSE3\n",__func__));
-        ret = false;
-    }
-
-    else if ( ! (c & bit_SSSE3))
-    {
-        DEBUG_OBJECT(("%s: failed no SSSE3\n",__func__));
-        ret = false;
-    }
-
-    else if ( ! (c & bit_SSE3))
-    {
-        DEBUG_OBJECT(("%s: failed no SSE3\n",__func__));
-        ret = false;
-    }
-
-    else if ( ! (d & bit_SSE2))
-    {
-        DEBUG_OBJECT(("%s: failed no SSE2\n",__func__));
-        ret = false;
-    }
-
-    else if ( ! (d & bit_SSE))
-    {
-        DEBUG_OBJECT(("%s: failed no SSE\n",__func__));
-        ret = false;
-    }
-#endif
-    DEBUG_OBJECT(("%s: passed\n",__func__));
-    return ret;
-}
-
-
-/* ----------------------------------------------------------------------
- * Init
- *
- *   Initialize the fields of this object.  The derived class will call this
- *   during it's initialization.
- *
- * self      object to initialze
- * vt        the virtual table of the derived class
- * mgr       the cipher manager that is the construction factory block cipher
- *           objects hold references to the manager while the manager merely
- *           points at the block ciphers when all block ciphers are destroyed
- *           the manager loses its references and it too can be destroyed if not
- *           held elsewhere
- * name      ASCIZ c-string the name of this class
- */
-static const
-KBlockCipherVec_vt_v1 AESBCMEMBER(_vt_) = 
-{
-    { 1, 1 },
-
-    AESBCMEMBER(Destroy),
-    AESBCMEMBER(BlockSize),
-    AESBCMEMBER(KeySize),
-    AESBCMEMBER(SetEncryptKey),
-    AESBCMEMBER(SetDecryptKey),
-    AESBCMEMBER(Encrypt),
-    AESBCMEMBER(Decrypt)
-};
-
-
-/* ----------------------------------------------------------------------
- * Make
- *
- * Create a new AES Block Cipher object.
- * The processor is checked to see if this particular version is supported on
- * this particular CPU.
- */
-rc_t AESBCMEMBER(Make) (KBlockCipher ** new_obj)
-{
-    rc_t rc;
-
-    DEBUG_OBJECT(("%s: %p\n",__func__,new_obj));
-
-    /* Check parameter first */
-    if (new_obj == NULL)
-        rc = RC (rcKrypto, rcBlockCipher, rcConstructing, rcSelf, rcNull);
-
-    else
-    {
-        *new_obj = NULL;
-
-        /* check for processor support of this flavor */
-        if ( ! AESBCMEMBER(ProcessorSupport)())
-            rc = RC (rcKrypto, rcBlockCipher, rcConstructing, rcFunction, rcUnsupported);
-
-        else
-        {
-            rc = 0;
-            *new_obj = (KBlockCipher*)&(AESBCMEMBER(_vt_));
-        }
-    }
-    return rc;
-}
-
-/* end of file lib/krypto/aes-ncbi.c */
diff --git a/libs/krypto/aes-priv.h b/libs/krypto/aes-priv.h
deleted file mode 100644
index 4ebdbb0..0000000
--- a/libs/krypto/aes-priv.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#ifndef _h_krypto_aes_priv_
-#define _h_krypto_aes_priv_
-
-/*
- * This header file was written to integrate the public domain AES code
- * with the SRA project
- */
-
-#define AES_ENCRYPT	1
-#define AES_DECRYPT	0
-
-/* Because array size can't be a const in C, the following two are macros.
-   Both sizes are in bytes. */
-#define AES_MAXNR (14)
-#define AES_BLOCK_SIZE (16)
-
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-typedef uint8_t AES_BYTE;
-typedef uint32_t AES_WORD;
-
-
-
-
-/* typedef int64_t AESState  __attribute__ ((vector_size (AES_BLOCK_SIZE))); */
-
-typedef struct AES_KEY AES_KEY;
-struct AES_KEY
-{
-    uint32_t rd_key [sizeof (AES_WORD) * (AES_MAXNR + 1)];
-    uint32_t rounds;
-};
-
-
-int AES_set_encrypt_key(const uint8_t *userKey, const uint32_t bits,
-                        AES_KEY *key);
-
-int AES_set_decrypt_key(const uint8_t *userKey, const uint32_t bits,
-                        AES_KEY *key);
-
-void AES_encrypt(const uint8_t *in, uint8_t *out,
-                 const AES_KEY *key);
-void AES_decrypt(const uint8_t *in, uint8_t *out,
-                 const AES_KEY *key);
-
-
-int AESx86_set_encrypt_key(const uint8_t *userKey, const uint32_t bits,
-                        AES_KEY *key);
-
-int AESx86_set_decrypt_key(const uint8_t *userKey, const uint32_t bits,
-                        AES_KEY *key);
-
-void AESx86_encrypt(const uint8_t *in, uint8_t *out,
-                 const AES_KEY *key);
-void AES_decrypt(const uint8_t *in, uint8_t *out,
-                 const AES_KEY *key);
-
-
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif /* #ifndef _h_krypto_aes_priv_ */
-
-
diff --git a/libs/krypto/aes.c b/libs/krypto/aes.c
deleted file mode 100644
index 328ba6d..0000000
--- a/libs/krypto/aes.c
+++ /dev/null
@@ -1 +0,0 @@
-#error "Obsolete do not use"
diff --git a/libs/krypto/aes_core.c b/libs/krypto/aes_core.c
deleted file mode 100644
index afc614b..0000000
--- a/libs/krypto/aes_core.c
+++ /dev/null
@@ -1,1181 +0,0 @@
-/*
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was modified as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *  Tweaked to match standards of the NCBI SRA project
- * We obatined this file from version 1.0.0e of OpenSSL but we have
- * eliminated the OpenSSL code where it could be identified
- *
- * We created our own header file as there was no public domain
- * header file associated with this public domain C file.
- */
-
-/**
- * rijndael-alg-fst.c
- *
- * @version 3.0 (December 2000)
- *
- * Optimised ANSI C code for the Rijndael cipher (now AES)
- *
- * @author Vincent Rijmen <vincent.rijmen at esat.kuleuven.ac.be>
- * @author Antoon Bosselaers <antoon.bosselaers at esat.kuleuven.ac.be>
- * @author Paulo Barreto <paulo.barreto at terra.com.br>
- *
- * This code is hereby placed in the public domain.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#include <krypto/extern.h>
-#include <klib/defs.h>
-
-#include "aes-priv.h"
-
-#include <assert.h>
-
-
-#define FULL_UNROLL (true)
-
-# define GETU32(pt) (((uint32_t)(pt)[0] << 24) ^ ((uint32_t)(pt)[1] << 16) ^ ((uint32_t)(pt)[2] <<  8) ^ ((uint32_t)(pt)[3]))
-# define PUTU32(ct, st) (((ct)[0] = (uint8_t)((st) >> 24)), ((ct)[1] = (uint8_t)((st) >> 16)),((ct)[2] = (uint8_t)((st) >>  8)),((ct)[3] = (uint8_t)(st)))
-
-/*
-Te0[x] = S [x].[02, 01, 01, 03];
-Te1[x] = S [x].[03, 02, 01, 01];
-Te2[x] = S [x].[01, 03, 02, 01];
-Te3[x] = S [x].[01, 01, 03, 02];
-
-Td0[x] = Si[x].[0e, 09, 0d, 0b];
-Td1[x] = Si[x].[0b, 0e, 09, 0d];
-Td2[x] = Si[x].[0d, 0b, 0e, 09];
-Td3[x] = Si[x].[09, 0d, 0b, 0e];
-Td4[x] = Si[x].[01];
-*/
-
-static const uint32_t Te0[256] = {
-    0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU,
-    0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U,
-    0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU,
-    0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU,
-    0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U,
-    0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU,
-    0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU,
-    0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU,
-    0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU,
-    0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU,
-    0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U,
-    0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU,
-    0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU,
-    0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U,
-    0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU,
-    0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU,
-    0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU,
-    0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU,
-    0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU,
-    0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U,
-    0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU,
-    0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU,
-    0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU,
-    0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU,
-    0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U,
-    0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U,
-    0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U,
-    0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U,
-    0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU,
-    0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U,
-    0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U,
-    0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU,
-    0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU,
-    0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U,
-    0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U,
-    0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U,
-    0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU,
-    0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U,
-    0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU,
-    0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U,
-    0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU,
-    0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U,
-    0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U,
-    0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU,
-    0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U,
-    0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U,
-    0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U,
-    0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U,
-    0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U,
-    0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U,
-    0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U,
-    0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U,
-    0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU,
-    0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U,
-    0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U,
-    0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U,
-    0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U,
-    0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U,
-    0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U,
-    0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU,
-    0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U,
-    0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U,
-    0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U,
-    0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU,
-};
-static const uint32_t Te1[256] = {
-    0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU,
-    0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U,
-    0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU,
-    0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U,
-    0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU,
-    0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U,
-    0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU,
-    0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U,
-    0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U,
-    0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU,
-    0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U,
-    0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U,
-    0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U,
-    0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU,
-    0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U,
-    0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U,
-    0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU,
-    0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U,
-    0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U,
-    0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U,
-    0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU,
-    0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU,
-    0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U,
-    0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU,
-    0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU,
-    0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U,
-    0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU,
-    0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U,
-    0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU,
-    0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U,
-    0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U,
-    0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U,
-    0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU,
-    0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U,
-    0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU,
-    0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U,
-    0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU,
-    0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U,
-    0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U,
-    0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU,
-    0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU,
-    0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU,
-    0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U,
-    0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U,
-    0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU,
-    0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U,
-    0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU,
-    0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U,
-    0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU,
-    0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U,
-    0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU,
-    0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU,
-    0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U,
-    0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU,
-    0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U,
-    0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU,
-    0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U,
-    0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U,
-    0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U,
-    0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU,
-    0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU,
-    0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U,
-    0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU,
-    0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U,
-};
-static const uint32_t Te2[256] = {
-    0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU,
-    0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U,
-    0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU,
-    0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U,
-    0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU,
-    0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U,
-    0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU,
-    0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U,
-    0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U,
-    0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU,
-    0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U,
-    0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U,
-    0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U,
-    0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU,
-    0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U,
-    0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U,
-    0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU,
-    0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U,
-    0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U,
-    0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U,
-    0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU,
-    0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU,
-    0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U,
-    0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU,
-    0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU,
-    0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U,
-    0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU,
-    0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U,
-    0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU,
-    0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U,
-    0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U,
-    0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U,
-    0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU,
-    0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U,
-    0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU,
-    0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U,
-    0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU,
-    0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U,
-    0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U,
-    0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU,
-    0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU,
-    0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU,
-    0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U,
-    0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U,
-    0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU,
-    0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U,
-    0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU,
-    0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U,
-    0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU,
-    0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U,
-    0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU,
-    0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU,
-    0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U,
-    0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU,
-    0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U,
-    0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU,
-    0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U,
-    0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U,
-    0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U,
-    0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU,
-    0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU,
-    0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U,
-    0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU,
-    0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U,
-};
-static const uint32_t Te3[256] = {
-    0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U,
-    0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U,
-    0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U,
-    0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU,
-    0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU,
-    0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU,
-    0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U,
-    0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU,
-    0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU,
-    0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U,
-    0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U,
-    0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU,
-    0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU,
-    0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU,
-    0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU,
-    0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU,
-    0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U,
-    0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU,
-    0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU,
-    0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U,
-    0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U,
-    0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U,
-    0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U,
-    0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U,
-    0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU,
-    0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U,
-    0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU,
-    0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU,
-    0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U,
-    0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U,
-    0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U,
-    0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU,
-    0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U,
-    0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU,
-    0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU,
-    0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U,
-    0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U,
-    0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU,
-    0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U,
-    0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU,
-    0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U,
-    0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U,
-    0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U,
-    0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U,
-    0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU,
-    0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U,
-    0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU,
-    0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U,
-    0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU,
-    0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U,
-    0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU,
-    0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU,
-    0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU,
-    0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU,
-    0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U,
-    0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U,
-    0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U,
-    0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U,
-    0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U,
-    0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U,
-    0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU,
-    0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U,
-    0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU,
-    0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU,
-};
-
-static const uint32_t Td0[256] = {
-    0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U,
-    0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U,
-    0x2030fa55U, 0xad766df6U, 0x88cc7691U, 0xf5024c25U,
-    0x4fe5d7fcU, 0xc52acbd7U, 0x26354480U, 0xb562a38fU,
-    0xdeb15a49U, 0x25ba1b67U, 0x45ea0e98U, 0x5dfec0e1U,
-    0xc32f7502U, 0x814cf012U, 0x8d4697a3U, 0x6bd3f9c6U,
-    0x038f5fe7U, 0x15929c95U, 0xbf6d7aebU, 0x955259daU,
-    0xd4be832dU, 0x587421d3U, 0x49e06929U, 0x8ec9c844U,
-    0x75c2896aU, 0xf48e7978U, 0x99583e6bU, 0x27b971ddU,
-    0xbee14fb6U, 0xf088ad17U, 0xc920ac66U, 0x7dce3ab4U,
-    0x63df4a18U, 0xe51a3182U, 0x97513360U, 0x62537f45U,
-    0xb16477e0U, 0xbb6bae84U, 0xfe81a01cU, 0xf9082b94U,
-    0x70486858U, 0x8f45fd19U, 0x94de6c87U, 0x527bf8b7U,
-    0xab73d323U, 0x724b02e2U, 0xe31f8f57U, 0x6655ab2aU,
-    0xb2eb2807U, 0x2fb5c203U, 0x86c57b9aU, 0xd33708a5U,
-    0x302887f2U, 0x23bfa5b2U, 0x02036abaU, 0xed16825cU,
-    0x8acf1c2bU, 0xa779b492U, 0xf307f2f0U, 0x4e69e2a1U,
-    0x65daf4cdU, 0x0605bed5U, 0xd134621fU, 0xc4a6fe8aU,
-    0x342e539dU, 0xa2f355a0U, 0x058ae132U, 0xa4f6eb75U,
-    0x0b83ec39U, 0x4060efaaU, 0x5e719f06U, 0xbd6e1051U,
-    0x3e218af9U, 0x96dd063dU, 0xdd3e05aeU, 0x4de6bd46U,
-    0x91548db5U, 0x71c45d05U, 0x0406d46fU, 0x605015ffU,
-    0x1998fb24U, 0xd6bde997U, 0x894043ccU, 0x67d99e77U,
-    0xb0e842bdU, 0x07898b88U, 0xe7195b38U, 0x79c8eedbU,
-    0xa17c0a47U, 0x7c420fe9U, 0xf8841ec9U, 0x00000000U,
-    0x09808683U, 0x322bed48U, 0x1e1170acU, 0x6c5a724eU,
-    0xfd0efffbU, 0x0f853856U, 0x3daed51eU, 0x362d3927U,
-    0x0a0fd964U, 0x685ca621U, 0x9b5b54d1U, 0x24362e3aU,
-    0x0c0a67b1U, 0x9357e70fU, 0xb4ee96d2U, 0x1b9b919eU,
-    0x80c0c54fU, 0x61dc20a2U, 0x5a774b69U, 0x1c121a16U,
-    0xe293ba0aU, 0xc0a02ae5U, 0x3c22e043U, 0x121b171dU,
-    0x0e090d0bU, 0xf28bc7adU, 0x2db6a8b9U, 0x141ea9c8U,
-    0x57f11985U, 0xaf75074cU, 0xee99ddbbU, 0xa37f60fdU,
-    0xf701269fU, 0x5c72f5bcU, 0x44663bc5U, 0x5bfb7e34U,
-    0x8b432976U, 0xcb23c6dcU, 0xb6edfc68U, 0xb8e4f163U,
-    0xd731dccaU, 0x42638510U, 0x13972240U, 0x84c61120U,
-    0x854a247dU, 0xd2bb3df8U, 0xaef93211U, 0xc729a16dU,
-    0x1d9e2f4bU, 0xdcb230f3U, 0x0d8652ecU, 0x77c1e3d0U,
-    0x2bb3166cU, 0xa970b999U, 0x119448faU, 0x47e96422U,
-    0xa8fc8cc4U, 0xa0f03f1aU, 0x567d2cd8U, 0x223390efU,
-    0x87494ec7U, 0xd938d1c1U, 0x8ccaa2feU, 0x98d40b36U,
-    0xa6f581cfU, 0xa57ade28U, 0xdab78e26U, 0x3fadbfa4U,
-    0x2c3a9de4U, 0x5078920dU, 0x6a5fcc9bU, 0x547e4662U,
-    0xf68d13c2U, 0x90d8b8e8U, 0x2e39f75eU, 0x82c3aff5U,
-    0x9f5d80beU, 0x69d0937cU, 0x6fd52da9U, 0xcf2512b3U,
-    0xc8ac993bU, 0x10187da7U, 0xe89c636eU, 0xdb3bbb7bU,
-    0xcd267809U, 0x6e5918f4U, 0xec9ab701U, 0x834f9aa8U,
-    0xe6956e65U, 0xaaffe67eU, 0x21bccf08U, 0xef15e8e6U,
-    0xbae79bd9U, 0x4a6f36ceU, 0xea9f09d4U, 0x29b07cd6U,
-    0x31a4b2afU, 0x2a3f2331U, 0xc6a59430U, 0x35a266c0U,
-    0x744ebc37U, 0xfc82caa6U, 0xe090d0b0U, 0x33a7d815U,
-    0xf104984aU, 0x41ecdaf7U, 0x7fcd500eU, 0x1791f62fU,
-    0x764dd68dU, 0x43efb04dU, 0xccaa4d54U, 0xe49604dfU,
-    0x9ed1b5e3U, 0x4c6a881bU, 0xc12c1fb8U, 0x4665517fU,
-    0x9d5eea04U, 0x018c355dU, 0xfa877473U, 0xfb0b412eU,
-    0xb3671d5aU, 0x92dbd252U, 0xe9105633U, 0x6dd64713U,
-    0x9ad7618cU, 0x37a10c7aU, 0x59f8148eU, 0xeb133c89U,
-    0xcea927eeU, 0xb761c935U, 0xe11ce5edU, 0x7a47b13cU,
-    0x9cd2df59U, 0x55f2733fU, 0x1814ce79U, 0x73c737bfU,
-    0x53f7cdeaU, 0x5ffdaa5bU, 0xdf3d6f14U, 0x7844db86U,
-    0xcaaff381U, 0xb968c43eU, 0x3824342cU, 0xc2a3405fU,
-    0x161dc372U, 0xbce2250cU, 0x283c498bU, 0xff0d9541U,
-    0x39a80171U, 0x080cb3deU, 0xd8b4e49cU, 0x6456c190U,
-    0x7bcb8461U, 0xd532b670U, 0x486c5c74U, 0xd0b85742U,
-};
-static const uint32_t Td1[256] = {
-    0x5051f4a7U, 0x537e4165U, 0xc31a17a4U, 0x963a275eU,
-    0xcb3bab6bU, 0xf11f9d45U, 0xabacfa58U, 0x934be303U,
-    0x552030faU, 0xf6ad766dU, 0x9188cc76U, 0x25f5024cU,
-    0xfc4fe5d7U, 0xd7c52acbU, 0x80263544U, 0x8fb562a3U,
-    0x49deb15aU, 0x6725ba1bU, 0x9845ea0eU, 0xe15dfec0U,
-    0x02c32f75U, 0x12814cf0U, 0xa38d4697U, 0xc66bd3f9U,
-    0xe7038f5fU, 0x9515929cU, 0xebbf6d7aU, 0xda955259U,
-    0x2dd4be83U, 0xd3587421U, 0x2949e069U, 0x448ec9c8U,
-    0x6a75c289U, 0x78f48e79U, 0x6b99583eU, 0xdd27b971U,
-    0xb6bee14fU, 0x17f088adU, 0x66c920acU, 0xb47dce3aU,
-    0x1863df4aU, 0x82e51a31U, 0x60975133U, 0x4562537fU,
-    0xe0b16477U, 0x84bb6baeU, 0x1cfe81a0U, 0x94f9082bU,
-    0x58704868U, 0x198f45fdU, 0x8794de6cU, 0xb7527bf8U,
-    0x23ab73d3U, 0xe2724b02U, 0x57e31f8fU, 0x2a6655abU,
-    0x07b2eb28U, 0x032fb5c2U, 0x9a86c57bU, 0xa5d33708U,
-    0xf2302887U, 0xb223bfa5U, 0xba02036aU, 0x5ced1682U,
-    0x2b8acf1cU, 0x92a779b4U, 0xf0f307f2U, 0xa14e69e2U,
-    0xcd65daf4U, 0xd50605beU, 0x1fd13462U, 0x8ac4a6feU,
-    0x9d342e53U, 0xa0a2f355U, 0x32058ae1U, 0x75a4f6ebU,
-    0x390b83ecU, 0xaa4060efU, 0x065e719fU, 0x51bd6e10U,
-    0xf93e218aU, 0x3d96dd06U, 0xaedd3e05U, 0x464de6bdU,
-    0xb591548dU, 0x0571c45dU, 0x6f0406d4U, 0xff605015U,
-    0x241998fbU, 0x97d6bde9U, 0xcc894043U, 0x7767d99eU,
-    0xbdb0e842U, 0x8807898bU, 0x38e7195bU, 0xdb79c8eeU,
-    0x47a17c0aU, 0xe97c420fU, 0xc9f8841eU, 0x00000000U,
-    0x83098086U, 0x48322bedU, 0xac1e1170U, 0x4e6c5a72U,
-    0xfbfd0effU, 0x560f8538U, 0x1e3daed5U, 0x27362d39U,
-    0x640a0fd9U, 0x21685ca6U, 0xd19b5b54U, 0x3a24362eU,
-    0xb10c0a67U, 0x0f9357e7U, 0xd2b4ee96U, 0x9e1b9b91U,
-    0x4f80c0c5U, 0xa261dc20U, 0x695a774bU, 0x161c121aU,
-    0x0ae293baU, 0xe5c0a02aU, 0x433c22e0U, 0x1d121b17U,
-    0x0b0e090dU, 0xadf28bc7U, 0xb92db6a8U, 0xc8141ea9U,
-    0x8557f119U, 0x4caf7507U, 0xbbee99ddU, 0xfda37f60U,
-    0x9ff70126U, 0xbc5c72f5U, 0xc544663bU, 0x345bfb7eU,
-    0x768b4329U, 0xdccb23c6U, 0x68b6edfcU, 0x63b8e4f1U,
-    0xcad731dcU, 0x10426385U, 0x40139722U, 0x2084c611U,
-    0x7d854a24U, 0xf8d2bb3dU, 0x11aef932U, 0x6dc729a1U,
-    0x4b1d9e2fU, 0xf3dcb230U, 0xec0d8652U, 0xd077c1e3U,
-    0x6c2bb316U, 0x99a970b9U, 0xfa119448U, 0x2247e964U,
-    0xc4a8fc8cU, 0x1aa0f03fU, 0xd8567d2cU, 0xef223390U,
-    0xc787494eU, 0xc1d938d1U, 0xfe8ccaa2U, 0x3698d40bU,
-    0xcfa6f581U, 0x28a57adeU, 0x26dab78eU, 0xa43fadbfU,
-    0xe42c3a9dU, 0x0d507892U, 0x9b6a5fccU, 0x62547e46U,
-    0xc2f68d13U, 0xe890d8b8U, 0x5e2e39f7U, 0xf582c3afU,
-    0xbe9f5d80U, 0x7c69d093U, 0xa96fd52dU, 0xb3cf2512U,
-    0x3bc8ac99U, 0xa710187dU, 0x6ee89c63U, 0x7bdb3bbbU,
-    0x09cd2678U, 0xf46e5918U, 0x01ec9ab7U, 0xa8834f9aU,
-    0x65e6956eU, 0x7eaaffe6U, 0x0821bccfU, 0xe6ef15e8U,
-    0xd9bae79bU, 0xce4a6f36U, 0xd4ea9f09U, 0xd629b07cU,
-    0xaf31a4b2U, 0x312a3f23U, 0x30c6a594U, 0xc035a266U,
-    0x37744ebcU, 0xa6fc82caU, 0xb0e090d0U, 0x1533a7d8U,
-    0x4af10498U, 0xf741ecdaU, 0x0e7fcd50U, 0x2f1791f6U,
-    0x8d764dd6U, 0x4d43efb0U, 0x54ccaa4dU, 0xdfe49604U,
-    0xe39ed1b5U, 0x1b4c6a88U, 0xb8c12c1fU, 0x7f466551U,
-    0x049d5eeaU, 0x5d018c35U, 0x73fa8774U, 0x2efb0b41U,
-    0x5ab3671dU, 0x5292dbd2U, 0x33e91056U, 0x136dd647U,
-    0x8c9ad761U, 0x7a37a10cU, 0x8e59f814U, 0x89eb133cU,
-    0xeecea927U, 0x35b761c9U, 0xede11ce5U, 0x3c7a47b1U,
-    0x599cd2dfU, 0x3f55f273U, 0x791814ceU, 0xbf73c737U,
-    0xea53f7cdU, 0x5b5ffdaaU, 0x14df3d6fU, 0x867844dbU,
-    0x81caaff3U, 0x3eb968c4U, 0x2c382434U, 0x5fc2a340U,
-    0x72161dc3U, 0x0cbce225U, 0x8b283c49U, 0x41ff0d95U,
-    0x7139a801U, 0xde080cb3U, 0x9cd8b4e4U, 0x906456c1U,
-    0x617bcb84U, 0x70d532b6U, 0x74486c5cU, 0x42d0b857U,
-};
-static const uint32_t Td2[256] = {
-    0xa75051f4U, 0x65537e41U, 0xa4c31a17U, 0x5e963a27U,
-    0x6bcb3babU, 0x45f11f9dU, 0x58abacfaU, 0x03934be3U,
-    0xfa552030U, 0x6df6ad76U, 0x769188ccU, 0x4c25f502U,
-    0xd7fc4fe5U, 0xcbd7c52aU, 0x44802635U, 0xa38fb562U,
-    0x5a49deb1U, 0x1b6725baU, 0x0e9845eaU, 0xc0e15dfeU,
-    0x7502c32fU, 0xf012814cU, 0x97a38d46U, 0xf9c66bd3U,
-    0x5fe7038fU, 0x9c951592U, 0x7aebbf6dU, 0x59da9552U,
-    0x832dd4beU, 0x21d35874U, 0x692949e0U, 0xc8448ec9U,
-    0x896a75c2U, 0x7978f48eU, 0x3e6b9958U, 0x71dd27b9U,
-    0x4fb6bee1U, 0xad17f088U, 0xac66c920U, 0x3ab47dceU,
-    0x4a1863dfU, 0x3182e51aU, 0x33609751U, 0x7f456253U,
-    0x77e0b164U, 0xae84bb6bU, 0xa01cfe81U, 0x2b94f908U,
-    0x68587048U, 0xfd198f45U, 0x6c8794deU, 0xf8b7527bU,
-    0xd323ab73U, 0x02e2724bU, 0x8f57e31fU, 0xab2a6655U,
-    0x2807b2ebU, 0xc2032fb5U, 0x7b9a86c5U, 0x08a5d337U,
-    0x87f23028U, 0xa5b223bfU, 0x6aba0203U, 0x825ced16U,
-    0x1c2b8acfU, 0xb492a779U, 0xf2f0f307U, 0xe2a14e69U,
-    0xf4cd65daU, 0xbed50605U, 0x621fd134U, 0xfe8ac4a6U,
-    0x539d342eU, 0x55a0a2f3U, 0xe132058aU, 0xeb75a4f6U,
-    0xec390b83U, 0xefaa4060U, 0x9f065e71U, 0x1051bd6eU,
-    0x8af93e21U, 0x063d96ddU, 0x05aedd3eU, 0xbd464de6U,
-    0x8db59154U, 0x5d0571c4U, 0xd46f0406U, 0x15ff6050U,
-    0xfb241998U, 0xe997d6bdU, 0x43cc8940U, 0x9e7767d9U,
-    0x42bdb0e8U, 0x8b880789U, 0x5b38e719U, 0xeedb79c8U,
-    0x0a47a17cU, 0x0fe97c42U, 0x1ec9f884U, 0x00000000U,
-    0x86830980U, 0xed48322bU, 0x70ac1e11U, 0x724e6c5aU,
-    0xfffbfd0eU, 0x38560f85U, 0xd51e3daeU, 0x3927362dU,
-    0xd9640a0fU, 0xa621685cU, 0x54d19b5bU, 0x2e3a2436U,
-    0x67b10c0aU, 0xe70f9357U, 0x96d2b4eeU, 0x919e1b9bU,
-    0xc54f80c0U, 0x20a261dcU, 0x4b695a77U, 0x1a161c12U,
-    0xba0ae293U, 0x2ae5c0a0U, 0xe0433c22U, 0x171d121bU,
-    0x0d0b0e09U, 0xc7adf28bU, 0xa8b92db6U, 0xa9c8141eU,
-    0x198557f1U, 0x074caf75U, 0xddbbee99U, 0x60fda37fU,
-    0x269ff701U, 0xf5bc5c72U, 0x3bc54466U, 0x7e345bfbU,
-    0x29768b43U, 0xc6dccb23U, 0xfc68b6edU, 0xf163b8e4U,
-    0xdccad731U, 0x85104263U, 0x22401397U, 0x112084c6U,
-    0x247d854aU, 0x3df8d2bbU, 0x3211aef9U, 0xa16dc729U,
-    0x2f4b1d9eU, 0x30f3dcb2U, 0x52ec0d86U, 0xe3d077c1U,
-    0x166c2bb3U, 0xb999a970U, 0x48fa1194U, 0x642247e9U,
-    0x8cc4a8fcU, 0x3f1aa0f0U, 0x2cd8567dU, 0x90ef2233U,
-    0x4ec78749U, 0xd1c1d938U, 0xa2fe8ccaU, 0x0b3698d4U,
-    0x81cfa6f5U, 0xde28a57aU, 0x8e26dab7U, 0xbfa43fadU,
-    0x9de42c3aU, 0x920d5078U, 0xcc9b6a5fU, 0x4662547eU,
-    0x13c2f68dU, 0xb8e890d8U, 0xf75e2e39U, 0xaff582c3U,
-    0x80be9f5dU, 0x937c69d0U, 0x2da96fd5U, 0x12b3cf25U,
-    0x993bc8acU, 0x7da71018U, 0x636ee89cU, 0xbb7bdb3bU,
-    0x7809cd26U, 0x18f46e59U, 0xb701ec9aU, 0x9aa8834fU,
-    0x6e65e695U, 0xe67eaaffU, 0xcf0821bcU, 0xe8e6ef15U,
-    0x9bd9bae7U, 0x36ce4a6fU, 0x09d4ea9fU, 0x7cd629b0U,
-    0xb2af31a4U, 0x23312a3fU, 0x9430c6a5U, 0x66c035a2U,
-    0xbc37744eU, 0xcaa6fc82U, 0xd0b0e090U, 0xd81533a7U,
-    0x984af104U, 0xdaf741ecU, 0x500e7fcdU, 0xf62f1791U,
-    0xd68d764dU, 0xb04d43efU, 0x4d54ccaaU, 0x04dfe496U,
-    0xb5e39ed1U, 0x881b4c6aU, 0x1fb8c12cU, 0x517f4665U,
-    0xea049d5eU, 0x355d018cU, 0x7473fa87U, 0x412efb0bU,
-    0x1d5ab367U, 0xd25292dbU, 0x5633e910U, 0x47136dd6U,
-    0x618c9ad7U, 0x0c7a37a1U, 0x148e59f8U, 0x3c89eb13U,
-    0x27eecea9U, 0xc935b761U, 0xe5ede11cU, 0xb13c7a47U,
-    0xdf599cd2U, 0x733f55f2U, 0xce791814U, 0x37bf73c7U,
-    0xcdea53f7U, 0xaa5b5ffdU, 0x6f14df3dU, 0xdb867844U,
-    0xf381caafU, 0xc43eb968U, 0x342c3824U, 0x405fc2a3U,
-    0xc372161dU, 0x250cbce2U, 0x498b283cU, 0x9541ff0dU,
-    0x017139a8U, 0xb3de080cU, 0xe49cd8b4U, 0xc1906456U,
-    0x84617bcbU, 0xb670d532U, 0x5c74486cU, 0x5742d0b8U,
-};
-static const uint32_t Td3[256] = {
-    0xf4a75051U, 0x4165537eU, 0x17a4c31aU, 0x275e963aU,
-    0xab6bcb3bU, 0x9d45f11fU, 0xfa58abacU, 0xe303934bU,
-    0x30fa5520U, 0x766df6adU, 0xcc769188U, 0x024c25f5U,
-    0xe5d7fc4fU, 0x2acbd7c5U, 0x35448026U, 0x62a38fb5U,
-    0xb15a49deU, 0xba1b6725U, 0xea0e9845U, 0xfec0e15dU,
-    0x2f7502c3U, 0x4cf01281U, 0x4697a38dU, 0xd3f9c66bU,
-    0x8f5fe703U, 0x929c9515U, 0x6d7aebbfU, 0x5259da95U,
-    0xbe832dd4U, 0x7421d358U, 0xe0692949U, 0xc9c8448eU,
-    0xc2896a75U, 0x8e7978f4U, 0x583e6b99U, 0xb971dd27U,
-    0xe14fb6beU, 0x88ad17f0U, 0x20ac66c9U, 0xce3ab47dU,
-    0xdf4a1863U, 0x1a3182e5U, 0x51336097U, 0x537f4562U,
-    0x6477e0b1U, 0x6bae84bbU, 0x81a01cfeU, 0x082b94f9U,
-    0x48685870U, 0x45fd198fU, 0xde6c8794U, 0x7bf8b752U,
-    0x73d323abU, 0x4b02e272U, 0x1f8f57e3U, 0x55ab2a66U,
-    0xeb2807b2U, 0xb5c2032fU, 0xc57b9a86U, 0x3708a5d3U,
-    0x2887f230U, 0xbfa5b223U, 0x036aba02U, 0x16825cedU,
-    0xcf1c2b8aU, 0x79b492a7U, 0x07f2f0f3U, 0x69e2a14eU,
-    0xdaf4cd65U, 0x05bed506U, 0x34621fd1U, 0xa6fe8ac4U,
-    0x2e539d34U, 0xf355a0a2U, 0x8ae13205U, 0xf6eb75a4U,
-    0x83ec390bU, 0x60efaa40U, 0x719f065eU, 0x6e1051bdU,
-    0x218af93eU, 0xdd063d96U, 0x3e05aeddU, 0xe6bd464dU,
-    0x548db591U, 0xc45d0571U, 0x06d46f04U, 0x5015ff60U,
-    0x98fb2419U, 0xbde997d6U, 0x4043cc89U, 0xd99e7767U,
-    0xe842bdb0U, 0x898b8807U, 0x195b38e7U, 0xc8eedb79U,
-    0x7c0a47a1U, 0x420fe97cU, 0x841ec9f8U, 0x00000000U,
-    0x80868309U, 0x2bed4832U, 0x1170ac1eU, 0x5a724e6cU,
-    0x0efffbfdU, 0x8538560fU, 0xaed51e3dU, 0x2d392736U,
-    0x0fd9640aU, 0x5ca62168U, 0x5b54d19bU, 0x362e3a24U,
-    0x0a67b10cU, 0x57e70f93U, 0xee96d2b4U, 0x9b919e1bU,
-    0xc0c54f80U, 0xdc20a261U, 0x774b695aU, 0x121a161cU,
-    0x93ba0ae2U, 0xa02ae5c0U, 0x22e0433cU, 0x1b171d12U,
-    0x090d0b0eU, 0x8bc7adf2U, 0xb6a8b92dU, 0x1ea9c814U,
-    0xf1198557U, 0x75074cafU, 0x99ddbbeeU, 0x7f60fda3U,
-    0x01269ff7U, 0x72f5bc5cU, 0x663bc544U, 0xfb7e345bU,
-    0x4329768bU, 0x23c6dccbU, 0xedfc68b6U, 0xe4f163b8U,
-    0x31dccad7U, 0x63851042U, 0x97224013U, 0xc6112084U,
-    0x4a247d85U, 0xbb3df8d2U, 0xf93211aeU, 0x29a16dc7U,
-    0x9e2f4b1dU, 0xb230f3dcU, 0x8652ec0dU, 0xc1e3d077U,
-    0xb3166c2bU, 0x70b999a9U, 0x9448fa11U, 0xe9642247U,
-    0xfc8cc4a8U, 0xf03f1aa0U, 0x7d2cd856U, 0x3390ef22U,
-    0x494ec787U, 0x38d1c1d9U, 0xcaa2fe8cU, 0xd40b3698U,
-    0xf581cfa6U, 0x7ade28a5U, 0xb78e26daU, 0xadbfa43fU,
-    0x3a9de42cU, 0x78920d50U, 0x5fcc9b6aU, 0x7e466254U,
-    0x8d13c2f6U, 0xd8b8e890U, 0x39f75e2eU, 0xc3aff582U,
-    0x5d80be9fU, 0xd0937c69U, 0xd52da96fU, 0x2512b3cfU,
-    0xac993bc8U, 0x187da710U, 0x9c636ee8U, 0x3bbb7bdbU,
-    0x267809cdU, 0x5918f46eU, 0x9ab701ecU, 0x4f9aa883U,
-    0x956e65e6U, 0xffe67eaaU, 0xbccf0821U, 0x15e8e6efU,
-    0xe79bd9baU, 0x6f36ce4aU, 0x9f09d4eaU, 0xb07cd629U,
-    0xa4b2af31U, 0x3f23312aU, 0xa59430c6U, 0xa266c035U,
-    0x4ebc3774U, 0x82caa6fcU, 0x90d0b0e0U, 0xa7d81533U,
-    0x04984af1U, 0xecdaf741U, 0xcd500e7fU, 0x91f62f17U,
-    0x4dd68d76U, 0xefb04d43U, 0xaa4d54ccU, 0x9604dfe4U,
-    0xd1b5e39eU, 0x6a881b4cU, 0x2c1fb8c1U, 0x65517f46U,
-    0x5eea049dU, 0x8c355d01U, 0x877473faU, 0x0b412efbU,
-    0x671d5ab3U, 0xdbd25292U, 0x105633e9U, 0xd647136dU,
-    0xd7618c9aU, 0xa10c7a37U, 0xf8148e59U, 0x133c89ebU,
-    0xa927eeceU, 0x61c935b7U, 0x1ce5ede1U, 0x47b13c7aU,
-    0xd2df599cU, 0xf2733f55U, 0x14ce7918U, 0xc737bf73U,
-    0xf7cdea53U, 0xfdaa5b5fU, 0x3d6f14dfU, 0x44db8678U,
-    0xaff381caU, 0x68c43eb9U, 0x24342c38U, 0xa3405fc2U,
-    0x1dc37216U, 0xe2250cbcU, 0x3c498b28U, 0x0d9541ffU,
-    0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U,
-    0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U,
-};
-static const uint8_t Td4[256] = {
-    0x52U, 0x09U, 0x6aU, 0xd5U, 0x30U, 0x36U, 0xa5U, 0x38U,
-    0xbfU, 0x40U, 0xa3U, 0x9eU, 0x81U, 0xf3U, 0xd7U, 0xfbU,
-    0x7cU, 0xe3U, 0x39U, 0x82U, 0x9bU, 0x2fU, 0xffU, 0x87U,
-    0x34U, 0x8eU, 0x43U, 0x44U, 0xc4U, 0xdeU, 0xe9U, 0xcbU,
-    0x54U, 0x7bU, 0x94U, 0x32U, 0xa6U, 0xc2U, 0x23U, 0x3dU,
-    0xeeU, 0x4cU, 0x95U, 0x0bU, 0x42U, 0xfaU, 0xc3U, 0x4eU,
-    0x08U, 0x2eU, 0xa1U, 0x66U, 0x28U, 0xd9U, 0x24U, 0xb2U,
-    0x76U, 0x5bU, 0xa2U, 0x49U, 0x6dU, 0x8bU, 0xd1U, 0x25U,
-    0x72U, 0xf8U, 0xf6U, 0x64U, 0x86U, 0x68U, 0x98U, 0x16U,
-    0xd4U, 0xa4U, 0x5cU, 0xccU, 0x5dU, 0x65U, 0xb6U, 0x92U,
-    0x6cU, 0x70U, 0x48U, 0x50U, 0xfdU, 0xedU, 0xb9U, 0xdaU,
-    0x5eU, 0x15U, 0x46U, 0x57U, 0xa7U, 0x8dU, 0x9dU, 0x84U,
-    0x90U, 0xd8U, 0xabU, 0x00U, 0x8cU, 0xbcU, 0xd3U, 0x0aU,
-    0xf7U, 0xe4U, 0x58U, 0x05U, 0xb8U, 0xb3U, 0x45U, 0x06U,
-    0xd0U, 0x2cU, 0x1eU, 0x8fU, 0xcaU, 0x3fU, 0x0fU, 0x02U,
-    0xc1U, 0xafU, 0xbdU, 0x03U, 0x01U, 0x13U, 0x8aU, 0x6bU,
-    0x3aU, 0x91U, 0x11U, 0x41U, 0x4fU, 0x67U, 0xdcU, 0xeaU,
-    0x97U, 0xf2U, 0xcfU, 0xceU, 0xf0U, 0xb4U, 0xe6U, 0x73U,
-    0x96U, 0xacU, 0x74U, 0x22U, 0xe7U, 0xadU, 0x35U, 0x85U,
-    0xe2U, 0xf9U, 0x37U, 0xe8U, 0x1cU, 0x75U, 0xdfU, 0x6eU,
-    0x47U, 0xf1U, 0x1aU, 0x71U, 0x1dU, 0x29U, 0xc5U, 0x89U,
-    0x6fU, 0xb7U, 0x62U, 0x0eU, 0xaaU, 0x18U, 0xbeU, 0x1bU,
-    0xfcU, 0x56U, 0x3eU, 0x4bU, 0xc6U, 0xd2U, 0x79U, 0x20U,
-    0x9aU, 0xdbU, 0xc0U, 0xfeU, 0x78U, 0xcdU, 0x5aU, 0xf4U,
-    0x1fU, 0xddU, 0xa8U, 0x33U, 0x88U, 0x07U, 0xc7U, 0x31U,
-    0xb1U, 0x12U, 0x10U, 0x59U, 0x27U, 0x80U, 0xecU, 0x5fU,
-    0x60U, 0x51U, 0x7fU, 0xa9U, 0x19U, 0xb5U, 0x4aU, 0x0dU,
-    0x2dU, 0xe5U, 0x7aU, 0x9fU, 0x93U, 0xc9U, 0x9cU, 0xefU,
-    0xa0U, 0xe0U, 0x3bU, 0x4dU, 0xaeU, 0x2aU, 0xf5U, 0xb0U,
-    0xc8U, 0xebU, 0xbbU, 0x3cU, 0x83U, 0x53U, 0x99U, 0x61U,
-    0x17U, 0x2bU, 0x04U, 0x7eU, 0xbaU, 0x77U, 0xd6U, 0x26U,
-    0xe1U, 0x69U, 0x14U, 0x63U, 0x55U, 0x21U, 0x0cU, 0x7dU,
-};
-static const uint32_t rcon[] = {
-	0x01000000, 0x02000000, 0x04000000, 0x08000000,
-	0x10000000, 0x20000000, 0x40000000, 0x80000000,
-	0x1B000000, 0x36000000, /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
-};
-
-/**
- * Expand the cipher key into the encryption key schedule.
- */
-int AES_set_encrypt_key(const uint8_t *userKey, const uint32_t bits,
-			AES_KEY *key) {
-
-	uint32_t *rk;
-   	int i = 0;
-	uint32_t temp;
-
-	if (!userKey || !key)
-		return -1;
-	if (bits != 128 && bits != 192 && bits != 256)
-		return -2;
-
-	rk = key->rd_key;
-
-	if (bits==128)
-		key->rounds = 10;
-	else if (bits==192)
-		key->rounds = 12;
-	else
-		key->rounds = 14;
-
-	rk[0] = GETU32(userKey     );
-	rk[1] = GETU32(userKey +  4);
-	rk[2] = GETU32(userKey +  8);
-	rk[3] = GETU32(userKey + 12);
-	if (bits == 128) {
-		while (1) {
-			temp  = rk[3];
-			rk[4] = rk[0] ^
-				(Te2[(temp >> 16) & 0xff] & 0xff000000) ^
-				(Te3[(temp >>  8) & 0xff] & 0x00ff0000) ^
-				(Te0[(temp      ) & 0xff] & 0x0000ff00) ^
-				(Te1[(temp >> 24)       ] & 0x000000ff) ^
-				rcon[i];
-			rk[5] = rk[1] ^ rk[4];
-			rk[6] = rk[2] ^ rk[5];
-			rk[7] = rk[3] ^ rk[6];
-			if (++i == 10) {
-				return 0;
-			}
-			rk += 4;
-		}
-	}
-	rk[4] = GETU32(userKey + 16);
-	rk[5] = GETU32(userKey + 20);
-	if (bits == 192) {
-		while (1) {
-			temp = rk[ 5];
-			rk[ 6] = rk[ 0] ^
-				(Te2[(temp >> 16) & 0xff] & 0xff000000) ^
-				(Te3[(temp >>  8) & 0xff] & 0x00ff0000) ^
-				(Te0[(temp      ) & 0xff] & 0x0000ff00) ^
-				(Te1[(temp >> 24)       ] & 0x000000ff) ^
-				rcon[i];
-			rk[ 7] = rk[ 1] ^ rk[ 6];
-			rk[ 8] = rk[ 2] ^ rk[ 7];
-			rk[ 9] = rk[ 3] ^ rk[ 8];
-			if (++i == 8) {
-				return 0;
-			}
-			rk[10] = rk[ 4] ^ rk[ 9];
-			rk[11] = rk[ 5] ^ rk[10];
-			rk += 6;
-		}
-	}
-	rk[6] = GETU32(userKey + 24);
-	rk[7] = GETU32(userKey + 28);
-	if (bits == 256) {
-		while (1) {
-			temp = rk[ 7];
-			rk[ 8] = rk[ 0] ^
-				(Te2[(temp >> 16) & 0xff] & 0xff000000) ^
-				(Te3[(temp >>  8) & 0xff] & 0x00ff0000) ^
-				(Te0[(temp      ) & 0xff] & 0x0000ff00) ^
-				(Te1[(temp >> 24)       ] & 0x000000ff) ^
-				rcon[i];
-			rk[ 9] = rk[ 1] ^ rk[ 8];
-			rk[10] = rk[ 2] ^ rk[ 9];
-			rk[11] = rk[ 3] ^ rk[10];
-			if (++i == 7) {
-				return 0;
-			}
-			temp = rk[11];
-			rk[12] = rk[ 4] ^
-				(Te2[(temp >> 24)       ] & 0xff000000) ^
-				(Te3[(temp >> 16) & 0xff] & 0x00ff0000) ^
-				(Te0[(temp >>  8) & 0xff] & 0x0000ff00) ^
-				(Te1[(temp      ) & 0xff] & 0x000000ff);
-			rk[13] = rk[ 5] ^ rk[12];
-			rk[14] = rk[ 6] ^ rk[13];
-			rk[15] = rk[ 7] ^ rk[14];
-
-			rk += 8;
-        	}
-	}
-	return 0;
-}
-
-/**
- * Expand the cipher key into the decryption key schedule.
- */
-int AES_set_decrypt_key(const uint8_t *userKey, const uint32_t bits,
-                        AES_KEY *key) {
-
-	int status;
-    uint32_t *rk;
-	uint32_t i, j, temp;
-
-	/* first, start with an encryption schedule */
-	status = AES_set_encrypt_key(userKey, bits, key);
-	if (status < 0)
-		return status;
-
-	rk = key->rd_key;
-
-	/* invert the order of the round keys: */
-	for (i = 0, j = 4*(key->rounds); i < j; i += 4, j -= 4) {
-		temp = rk[i    ]; rk[i    ] = rk[j    ]; rk[j    ] = temp;
-		temp = rk[i + 1]; rk[i + 1] = rk[j + 1]; rk[j + 1] = temp;
-		temp = rk[i + 2]; rk[i + 2] = rk[j + 2]; rk[j + 2] = temp;
-		temp = rk[i + 3]; rk[i + 3] = rk[j + 3]; rk[j + 3] = temp;
-	}
-	/* apply the inverse MixColumn transform to all round keys but the first and the last: */
-	for (i = 1; i < (key->rounds); i++) {
-		rk += 4;
-		rk[0] =
-			Td0[Te1[(rk[0] >> 24)       ] & 0xff] ^
-			Td1[Te1[(rk[0] >> 16) & 0xff] & 0xff] ^
-			Td2[Te1[(rk[0] >>  8) & 0xff] & 0xff] ^
-			Td3[Te1[(rk[0]      ) & 0xff] & 0xff];
-		rk[1] =
-			Td0[Te1[(rk[1] >> 24)       ] & 0xff] ^
-			Td1[Te1[(rk[1] >> 16) & 0xff] & 0xff] ^
-			Td2[Te1[(rk[1] >>  8) & 0xff] & 0xff] ^
-			Td3[Te1[(rk[1]      ) & 0xff] & 0xff];
-		rk[2] =
-			Td0[Te1[(rk[2] >> 24)       ] & 0xff] ^
-			Td1[Te1[(rk[2] >> 16) & 0xff] & 0xff] ^
-			Td2[Te1[(rk[2] >>  8) & 0xff] & 0xff] ^
-			Td3[Te1[(rk[2]      ) & 0xff] & 0xff];
-		rk[3] =
-			Td0[Te1[(rk[3] >> 24)       ] & 0xff] ^
-			Td1[Te1[(rk[3] >> 16) & 0xff] & 0xff] ^
-			Td2[Te1[(rk[3] >>  8) & 0xff] & 0xff] ^
-			Td3[Te1[(rk[3]      ) & 0xff] & 0xff];
-	}
-	return 0;
-}
-
-/*
- * Encrypt a single block
- * in and out can overlap
- */
-void AES_encrypt(const uint8_t *in, uint8_t *out,
-		 const AES_KEY *key) {
-
-	const uint32_t *rk;
-	uint32_t s0, s1, s2, s3, t0, t1, t2, t3;
-#ifndef FULL_UNROLL
-	int r;
-#endif /* ?FULL_UNROLL */
-
-	assert(in && out && key);
-	rk = key->rd_key;
-
-	/*
-	 * map byte array block to cipher state
-	 * and add initial round key:
-	 */
-	s0 = GETU32(in     ) ^ rk[0];
-	s1 = GETU32(in +  4) ^ rk[1];
-	s2 = GETU32(in +  8) ^ rk[2];
-	s3 = GETU32(in + 12) ^ rk[3];
-#ifdef FULL_UNROLL
-	/* round 1: */
-   	t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >>  8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[ 4];
-   	t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >>  8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[ 5];
-   	t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >>  8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[ 6];
-   	t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >>  8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[ 7];
-   	/* round 2: */
-   	s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >>  8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[ 8];
-   	s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >>  8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[ 9];
-   	s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >>  8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[10];
-   	s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >>  8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[11];
-	/* round 3: */
-   	t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >>  8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[12];
-   	t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >>  8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[13];
-   	t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >>  8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[14];
-   	t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >>  8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[15];
-   	/* round 4: */
-   	s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >>  8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[16];
-   	s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >>  8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[17];
-   	s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >>  8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[18];
-   	s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >>  8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[19];
-	/* round 5: */
-   	t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >>  8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[20];
-   	t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >>  8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[21];
-   	t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >>  8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[22];
-   	t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >>  8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[23];
-   	/* round 6: */
-   	s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >>  8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[24];
-   	s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >>  8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[25];
-   	s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >>  8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[26];
-   	s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >>  8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[27];
-	/* round 7: */
-   	t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >>  8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[28];
-   	t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >>  8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[29];
-   	t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >>  8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[30];
-   	t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >>  8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[31];
-   	/* round 8: */
-   	s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >>  8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[32];
-   	s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >>  8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[33];
-   	s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >>  8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[34];
-   	s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >>  8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[35];
-	/* round 9: */
-   	t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >>  8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[36];
-   	t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >>  8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[37];
-   	t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >>  8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[38];
-   	t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >>  8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[39];
-    if (key->rounds > 10) {
-        /* round 10: */
-        s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >>  8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[40];
-        s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >>  8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[41];
-        s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >>  8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[42];
-        s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >>  8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[43];
-        /* round 11: */
-        t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >>  8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[44];
-        t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >>  8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[45];
-        t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >>  8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[46];
-        t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >>  8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[47];
-        if (key->rounds > 12) {
-            /* round 12: */
-            s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >>  8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[48];
-            s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >>  8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[49];
-            s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >>  8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[50];
-            s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >>  8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[51];
-            /* round 13: */
-            t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >>  8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[52];
-            t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >>  8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[53];
-            t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >>  8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[54];
-            t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >>  8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[55];
-        }
-    }
-    rk += key->rounds << 2;
-#else  /* !FULL_UNROLL */
-    /*
-     * Nr - 1 full rounds:
-     */
-    r = key->rounds >> 1;
-    for (;;) {
-        t0 =
-            Te0[(s0 >> 24)       ] ^
-            Te1[(s1 >> 16) & 0xff] ^
-            Te2[(s2 >>  8) & 0xff] ^
-            Te3[(s3      ) & 0xff] ^
-            rk[4];
-        t1 =
-            Te0[(s1 >> 24)       ] ^
-            Te1[(s2 >> 16) & 0xff] ^
-            Te2[(s3 >>  8) & 0xff] ^
-            Te3[(s0      ) & 0xff] ^
-            rk[5];
-        t2 =
-            Te0[(s2 >> 24)       ] ^
-            Te1[(s3 >> 16) & 0xff] ^
-            Te2[(s0 >>  8) & 0xff] ^
-            Te3[(s1      ) & 0xff] ^
-            rk[6];
-        t3 =
-            Te0[(s3 >> 24)       ] ^
-            Te1[(s0 >> 16) & 0xff] ^
-            Te2[(s1 >>  8) & 0xff] ^
-            Te3[(s2      ) & 0xff] ^
-            rk[7];
-
-        rk += 8;
-        if (--r == 0) {
-            break;
-        }
-
-        s0 =
-            Te0[(t0 >> 24)       ] ^
-            Te1[(t1 >> 16) & 0xff] ^
-            Te2[(t2 >>  8) & 0xff] ^
-            Te3[(t3      ) & 0xff] ^
-            rk[0];
-        s1 =
-            Te0[(t1 >> 24)       ] ^
-            Te1[(t2 >> 16) & 0xff] ^
-            Te2[(t3 >>  8) & 0xff] ^
-            Te3[(t0      ) & 0xff] ^
-            rk[1];
-        s2 =
-            Te0[(t2 >> 24)       ] ^
-            Te1[(t3 >> 16) & 0xff] ^
-            Te2[(t0 >>  8) & 0xff] ^
-            Te3[(t1      ) & 0xff] ^
-            rk[2];
-        s3 =
-            Te0[(t3 >> 24)       ] ^
-            Te1[(t0 >> 16) & 0xff] ^
-            Te2[(t1 >>  8) & 0xff] ^
-            Te3[(t2      ) & 0xff] ^
-            rk[3];
-    }
-#endif /* ?FULL_UNROLL */
-    /*
-	 * apply last round and
-	 * map cipher state to byte array block:
-	 */
-	s0 =
-		(Te2[(t0 >> 24)       ] & 0xff000000) ^
-		(Te3[(t1 >> 16) & 0xff] & 0x00ff0000) ^
-		(Te0[(t2 >>  8) & 0xff] & 0x0000ff00) ^
-		(Te1[(t3      ) & 0xff] & 0x000000ff) ^
-		rk[0];
-	PUTU32(out     , s0);
-	s1 =
-		(Te2[(t1 >> 24)       ] & 0xff000000) ^
-		(Te3[(t2 >> 16) & 0xff] & 0x00ff0000) ^
-		(Te0[(t3 >>  8) & 0xff] & 0x0000ff00) ^
-		(Te1[(t0      ) & 0xff] & 0x000000ff) ^
-		rk[1];
-	PUTU32(out +  4, s1);
-	s2 =
-		(Te2[(t2 >> 24)       ] & 0xff000000) ^
-		(Te3[(t3 >> 16) & 0xff] & 0x00ff0000) ^
-		(Te0[(t0 >>  8) & 0xff] & 0x0000ff00) ^
-		(Te1[(t1      ) & 0xff] & 0x000000ff) ^
-		rk[2];
-	PUTU32(out +  8, s2);
-	s3 =
-		(Te2[(t3 >> 24)       ] & 0xff000000) ^
-		(Te3[(t0 >> 16) & 0xff] & 0x00ff0000) ^
-		(Te0[(t1 >>  8) & 0xff] & 0x0000ff00) ^
-		(Te1[(t2      ) & 0xff] & 0x000000ff) ^
-		rk[3];
-	PUTU32(out + 12, s3);
-}
-
-/*
- * Decrypt a single block
- * in and out can overlap
- */
-void AES_decrypt(const uint8_t *in, uint8_t *out,
-		 const AES_KEY *key) {
-
-	const uint32_t *rk;
-	uint32_t s0, s1, s2, s3, t0, t1, t2, t3;
-#ifndef FULL_UNROLL
-	int r;
-#endif /* ?FULL_UNROLL */
-
-	assert(in && out && key);
-	rk = key->rd_key;
-
-	/*
-	 * map byte array block to cipher state
-	 * and add initial round key:
-	 */
-    s0 = GETU32(in     ) ^ rk[0];
-    s1 = GETU32(in +  4) ^ rk[1];
-    s2 = GETU32(in +  8) ^ rk[2];
-    s3 = GETU32(in + 12) ^ rk[3];
-#ifdef FULL_UNROLL
-    /* round 1: */
-    t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >>  8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[ 4];
-    t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >>  8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[ 5];
-    t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >>  8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[ 6];
-    t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >>  8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[ 7];
-    /* round 2: */
-    s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >>  8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[ 8];
-    s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >>  8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[ 9];
-    s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >>  8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[10];
-    s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >>  8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[11];
-    /* round 3: */
-    t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >>  8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[12];
-    t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >>  8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[13];
-    t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >>  8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[14];
-    t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >>  8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[15];
-    /* round 4: */
-    s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >>  8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[16];
-    s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >>  8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[17];
-    s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >>  8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[18];
-    s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >>  8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[19];
-    /* round 5: */
-    t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >>  8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[20];
-    t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >>  8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[21];
-    t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >>  8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[22];
-    t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >>  8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[23];
-    /* round 6: */
-    s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >>  8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[24];
-    s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >>  8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[25];
-    s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >>  8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[26];
-    s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >>  8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[27];
-    /* round 7: */
-    t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >>  8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[28];
-    t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >>  8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[29];
-    t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >>  8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[30];
-    t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >>  8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[31];
-    /* round 8: */
-    s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >>  8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[32];
-    s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >>  8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[33];
-    s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >>  8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[34];
-    s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >>  8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[35];
-    /* round 9: */
-    t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >>  8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[36];
-    t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >>  8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[37];
-    t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >>  8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[38];
-    t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >>  8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[39];
-    if (key->rounds > 10) {
-        /* round 10: */
-        s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >>  8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[40];
-        s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >>  8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[41];
-        s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >>  8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[42];
-        s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >>  8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[43];
-        /* round 11: */
-        t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >>  8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[44];
-        t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >>  8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[45];
-        t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >>  8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[46];
-        t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >>  8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[47];
-        if (key->rounds > 12) {
-            /* round 12: */
-            s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >>  8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[48];
-            s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >>  8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[49];
-            s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >>  8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[50];
-            s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >>  8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[51];
-            /* round 13: */
-            t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >>  8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[52];
-            t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >>  8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[53];
-            t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >>  8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[54];
-            t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >>  8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[55];
-        }
-    }
-	rk += key->rounds << 2;
-#else  /* !FULL_UNROLL */
-    /*
-     * Nr - 1 full rounds:
-     */
-    r = key->rounds >> 1;
-    for (;;) {
-        t0 =
-            Td0[(s0 >> 24)       ] ^
-            Td1[(s3 >> 16) & 0xff] ^
-            Td2[(s2 >>  8) & 0xff] ^
-            Td3[(s1      ) & 0xff] ^
-            rk[4];
-        t1 =
-            Td0[(s1 >> 24)       ] ^
-            Td1[(s0 >> 16) & 0xff] ^
-            Td2[(s3 >>  8) & 0xff] ^
-            Td3[(s2      ) & 0xff] ^
-            rk[5];
-        t2 =
-            Td0[(s2 >> 24)       ] ^
-            Td1[(s1 >> 16) & 0xff] ^
-            Td2[(s0 >>  8) & 0xff] ^
-            Td3[(s3      ) & 0xff] ^
-            rk[6];
-        t3 =
-            Td0[(s3 >> 24)       ] ^
-            Td1[(s2 >> 16) & 0xff] ^
-            Td2[(s1 >>  8) & 0xff] ^
-            Td3[(s0      ) & 0xff] ^
-            rk[7];
-
-        rk += 8;
-        if (--r == 0) {
-            break;
-        }
-
-        s0 =
-            Td0[(t0 >> 24)       ] ^
-            Td1[(t3 >> 16) & 0xff] ^
-            Td2[(t2 >>  8) & 0xff] ^
-            Td3[(t1      ) & 0xff] ^
-            rk[0];
-        s1 =
-            Td0[(t1 >> 24)       ] ^
-            Td1[(t0 >> 16) & 0xff] ^
-            Td2[(t3 >>  8) & 0xff] ^
-            Td3[(t2      ) & 0xff] ^
-            rk[1];
-        s2 =
-            Td0[(t2 >> 24)       ] ^
-            Td1[(t1 >> 16) & 0xff] ^
-            Td2[(t0 >>  8) & 0xff] ^
-            Td3[(t3      ) & 0xff] ^
-            rk[2];
-        s3 =
-            Td0[(t3 >> 24)       ] ^
-            Td1[(t2 >> 16) & 0xff] ^
-            Td2[(t1 >>  8) & 0xff] ^
-            Td3[(t0      ) & 0xff] ^
-            rk[3];
-    }
-#endif /* ?FULL_UNROLL */
-    /*
-	 * apply last round and
-	 * map cipher state to byte array block:
-	 */
-   	s0 =
-   		(Td4[(t0 >> 24)       ] << 24) ^
-   		(Td4[(t3 >> 16) & 0xff] << 16) ^
-   		(Td4[(t2 >>  8) & 0xff] <<  8) ^
-   		(Td4[(t1      ) & 0xff])       ^
-   		rk[0];
-	PUTU32(out     , s0);
-   	s1 =
-   		(Td4[(t1 >> 24)       ] << 24) ^
-   		(Td4[(t0 >> 16) & 0xff] << 16) ^
-   		(Td4[(t3 >>  8) & 0xff] <<  8) ^
-   		(Td4[(t2      ) & 0xff])       ^
-   		rk[1];
-	PUTU32(out +  4, s1);
-   	s2 =
-   		(Td4[(t2 >> 24)       ] << 24) ^
-   		(Td4[(t1 >> 16) & 0xff] << 16) ^
-   		(Td4[(t0 >>  8) & 0xff] <<  8) ^
-   		(Td4[(t3      ) & 0xff])       ^
-   		rk[2];
-	PUTU32(out +  8, s2);
-   	s3 =
-   		(Td4[(t3 >> 24)       ] << 24) ^
-   		(Td4[(t2 >> 16) & 0xff] << 16) ^
-   		(Td4[(t1 >>  8) & 0xff] <<  8) ^
-   		(Td4[(t0      ) & 0xff])       ^
-   		rk[3];
-	PUTU32(out + 12, s3);
-}
-
diff --git a/libs/krypto/aes_x86core.c b/libs/krypto/aes_x86core.c
deleted file mode 100644
index a139771..0000000
--- a/libs/krypto/aes_x86core.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#error "Obsolete do not use"
-
diff --git a/libs/krypto/aesx86.c b/libs/krypto/aesx86.c
deleted file mode 100644
index d45c73b..0000000
--- a/libs/krypto/aesx86.c
+++ /dev/null
@@ -1 +0,0 @@
-#error "obsolete do not use"
diff --git a/libs/krypto/blockcipher-byte-impl.h b/libs/krypto/blockcipher-byte-impl.h
deleted file mode 100644
index 2186c98..0000000
--- a/libs/krypto/blockcipher-byte-impl.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#error "no direct includes"
-
-#ifndef _h_krypto_blockcipher_byte_impl_
-#define _h_krypto_blockcipher_byte_impl_
-
-/* 
- * NOTE:  Currently this is being written to support cipher blocks of
- * exactly 128 bits.  It will have to be amended if alternative block
- * sizes are need for other cipher blocks
- */
-
-#include <krypto/extern.h>
-#include <klib/defs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * CIPHER
- *  
- */
-#define CIPHER_BLOCK_MAX (16)
-
-typedef char CipherBlock [CIPHER_BLOCK_MAX];
-typedef struct CipherVec { CipherBlock block; } CipherVec;
-typedef union KBlockCipherByte KBlockCipherByte;
-
-#ifndef BLOCKCIPHER_BYTE_IMPL
-#define BLOCKCIPHER_BYTE_IMPL KBlockCipherByte
-#else
-typedef union KBlockCipherByte BLOCKCIPHER_BYTE_IMPL;
-#endif
-
-typedef struct KBlockCipherByte_vt KBlockCipherByte_vt;
-struct KBlockCipherByte_vt
-{
-    uint32_t maj;
-    uint32_t min;
-};
-
-
-typedef struct KBlockCipherByte_vt_v1 KBlockCipherByte_vt_v1;
-struct KBlockCipherByte_vt_v1
-{
-    KBlockCipherByte_vt version;
-
-    /* version == 1.x */
-
-    /* start minor version == 0 */
-    void        (* destroy         )(const BLOCKCIPHER_BYTE_IMPL * self);
-
-    uint32_t    (* block_size      )();
-
-    uint32_t    (* key_size        )();
-
-    rc_t        (* set_encrypt_key )(void * encrypt_key,
-                                     const char * user_key,
-                                     uint32_t user_key_bits);
-
-    rc_t        (* set_decrypt_key )(void * decrypt_key,
-                                     const char * user_key,
-                                     uint32_t user_key_bits);
-
-    void        (* encrypt         )(const CipherBlock in,
-                                     CipherBlock out,
-                                     const void * encrypt_key);
-
-    void        (* decrypt         )(const CipherBlock in,
-                                     CipherBlock out,
-                                     const void * encrypt_key);
-
-    /* end minor version == 0 */
-
-};
-
-union KBlockCipherByte
-{
-    KBlockCipherByte_vt    version;
-    KBlockCipherByte_vt_v1 v1;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_krypto_blockcipher_byte_impl_ */
diff --git a/libs/krypto/blockcipher-impl.h b/libs/krypto/blockcipher-impl.h
deleted file mode 100644
index 5d7d257..0000000
--- a/libs/krypto/blockcipher-impl.h
+++ /dev/null
@@ -1,187 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_krypto_blockcipher_impl_
-#define _h_krypto_blockcipher_impl_
-
-/* 
- * NOTE:  Currently this is being written to support cipher blocks of
- * exactly 128 bits.  It will have to be amended if alternative block
- * sizes are need for other cipher blocks
- */
-
-#include <krypto/extern.h>
-#include <klib/defs.h>
-
-/*
- * we need to know whether we are supporting vectors as 
- * XMM type registers or as structs
- */
-#include "ncbi-priv.h"
-
-
-#ifndef USE_VEC
-#error "USE_VEC most be defined true or false"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define CIPHER_BLOCK_MAX (16)
-
-typedef char CipherBlock [CIPHER_BLOCK_MAX];
-
-#if USEVEC
-#include <v128.h>
-typedef v128_u8_t CipherVec;
-#else
-typedef struct CipherVec
-{
-    CipherBlock block;
-} CipherVec;
-#endif
-
-typedef struct KBlockCipher_vt KBlockCipher_vt;
-struct KBlockCipher_vt
-{
-    uint32_t maj;
-    uint32_t min;
-};
-
-typedef uint32_t BlockCipherType;
-enum block_cipher_type
-{
-    blockcipher_type_byte,
-    blockcipher_type_vec
-};
-
-
-typedef struct KBlockCipherByte_vt_v1 KBlockCipherByte_vt_v1;
-typedef union KBlockCipherByte KBlockCipherByte;
-
-#ifndef BLOCKCIPHER_BYTE_IMPL
-#define BLOCKCIPHER_BYTE_IMPL KBlockCipherByte
-#else
-typedef union KBlockCipherByte BLOCKCIPHER_BYTE_IMPL;
-#endif
-
-
-struct KBlockCipherByte_vt_v1
-{
-    KBlockCipher_vt version;
-
-    /* version == 1.x */
-
-    /* start minor version == 0 */
-    void        (* destroy         )(const BLOCKCIPHER_BYTE_IMPL * self);
-
-    uint32_t    (* block_size      )();
-
-    uint32_t    (* key_size        )();
-
-    rc_t        (* set_encrypt_key )(void * encrypt_key,
-                                     const char * user_key,
-                                     uint32_t user_key_bits);
-
-    rc_t        (* set_decrypt_key )(void * decrypt_key,
-                                     const char * user_key,
-                                     uint32_t user_key_bits);
-
-    void        (* encrypt         )(const CipherBlock in,
-                                     CipherBlock out,
-                                     const void * encrypt_key);
-
-    void        (* decrypt         )(const CipherBlock in,
-                                     CipherBlock out,
-                                     const void * encrypt_key);
-
-    /* end minor version == 0 */
-
-};
-
-union KBlockCipherByte
-{
-    KBlockCipher_vt        version;
-    KBlockCipherByte_vt_v1 v1;
-};
-
-
-typedef struct KBlockCipherVec_vt_v1 KBlockCipherVec_vt_v1;
-typedef union KBlockCipherVec KBlockCipherVec;
-
-#ifndef BLOCKCIPHER_VEC_IMPL
-#define BLOCKCIPHER_VEC_IMPL KBlockCipherVec
-#else
-typedef union KBlockCipherVec BLOCKCIPHER_VEC_IMPL;
-#endif
-
-
-struct KBlockCipherVec_vt_v1
-{
-    KBlockCipher_vt version;
-
-    /* version == 1.x */
-
-    /* start minor version == 0 */
-    void        (* destroy         )(const BLOCKCIPHER_VEC_IMPL * self);
-
-    uint32_t    (* block_size      )();
-
-    uint32_t    (* key_size        )();
-
-    rc_t        (* set_encrypt_key )(void * encrypt_key,
-                                     const char * user_key,
-                                     uint32_t user_key_size);
-
-    rc_t        (* set_decrypt_key )(void * decrypt_key,
-                                     const char * user_key,
-                                     uint32_t user_key_size);
-
-    CipherVec   (* encrypt         )(CipherVec block,
-                                     const void * encrypt_key);
-
-    CipherVec   (* decrypt         )(CipherVec block,
-                                     const void * decrypt_key);
-
-    /* end minor version == 0 */
-
-};
-
-union KBlockCipherVec
-{
-    KBlockCipher_vt       version;
-    KBlockCipherVec_vt_v1 v1;
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-
-#endif /* _h_krypto_blockcipher_impl_ */
-
diff --git a/libs/krypto/blockcipher-priv.h b/libs/krypto/blockcipher-priv.h
deleted file mode 100644
index d812f23..0000000
--- a/libs/krypto/blockcipher-priv.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_krypto_blockcipher_priv_
-#define _h_krypto_blockcipher_priv_
-
-#include <krypto/extern.h>
-#include "cipher-impl.h"
-
-#include "blockcipher-impl.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* ======================================================================
- */
-/* typedef struct KBlockCipher KBlockCipher; */
-/*     typedef union KBlockCipher_vt KBlockCipher_vt; */
-
-/* ----------------------------------------------------------------------
- * Init
- *
- *   Initialize the fields of this object.  The derived class will call this
- *   during it's initialization.
- *
- * self      object to initialze
- * vt        the virtual table of the derived class
- * mgr       the cipher manager that is the construction factory block cipher
- *           objects hold references to the manager while the manager merely
- *           points at the block ciphers when all block ciphers are destroyed
- *           the manager loses its references and it too can be destroyed if not
- *           held elsewhere
- * name      ASCIZ c-string the name of this class
- */
-/* rc_t KBlockCipherInit (KBlockCipher * self, */
-/*                        const KBlockCipher_vt * vt, */
-/*                        const char * name); */
-
-
-typedef union KBlockCipher KBlockCipher;
-union KBlockCipher
-{
-    KBlockCipherByte byte;
-    KBlockCipherVec  vec;
-};
-
-
-rc_t KAESBlockCipherVecAesNiMake  (KBlockCipher ** vec_cipher);
-rc_t KAESBlockCipherVecRegMake    (KBlockCipher ** vec_cipher);
-rc_t KAESBlockCipherVecMake       (KBlockCipher ** vec_cipher);
-rc_t KAESBlockCipherByteMake      (KBlockCipher ** byte_cipher);
-
-rc_t KNullBlockCipherVecAesNiMake (KBlockCipher ** vec_cipher);
-rc_t KNullBlockCipherVecRegMake   (KBlockCipher ** vec_cipher);
-rc_t KNullBlockCipherVecMake      (KBlockCipher ** vec_cipher);
-rc_t KNullBlockCipherByteMake     (KBlockCipher ** byte_cipher);
-
-
-/* KRYPTO_EXTERN rc_t CC KBlockCipherAlloc (KBlockCipher ** obj, size_t z); */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* #ifndef _h_krypto_blockcipher_priv_ */
diff --git a/libs/krypto/blockcipher-vec-impl.h b/libs/krypto/blockcipher-vec-impl.h
deleted file mode 100644
index 798a643..0000000
--- a/libs/krypto/blockcipher-vec-impl.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#error "no direct includes"
-
-#ifndef _h_krypto_blockcipher_vec_impl_
-#define _h_krypto_blockcipher_vec_impl_
-
-/* 
- * NOTE:  Currently this is being written to support cipher blocks of
- * exactly 128 bits.  It will have to be amended if alternative block
- * sizes are need for other cipher blocks
- */
-
-#include <krypto/extern.h>
-#include <klib/defs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * CIPHER
- *  
- */
-#define CIPHER_BLOCK_MAX (16)
-
-#ifdef GNUC
-#include <v128.h>
-typedef v128_u8_t CipherVec;
-#else
-typedef struct CipherVec CipherVec;
-#endif
-
-
-typedef union KBlockCipherVec KBlockCipherVec;
-
-#ifndef BLOCKCIPHER_VEC_IMPL
-#define BLOCKCIPHER_VEC_IMPL KBlockCipherVec
-#else
-typedef union KBlockCipherVec BLOCKCIPHER_VEC_IMPL;
-#endif
-
-typedef struct KBlockCipherVec_vt KBlockCipherVec_vt;
-struct KBlockCipherVec_vt
-{
-    uint32_t maj;
-    uint32_t min;
-};
-
-
-typedef struct KBlockCipherVec_vt_v1 KBlockCipherVec_vt_v1;
-struct KBlockCipherVec_vt_v1
-{
-    KBlockCipherVec_vt version;
-
-    /* version == 1.x */
-
-    /* start minor version == 0 */
-    void        (* destroy         )(const BLOCKCIPHER_VEC_IMPL * self);
-
-    uint32_t    (* block_size      )();
-
-    uint32_t    (* key_size        )();
-
-    rc_t        (* set_encrypt_key )(void * encrypt_key,
-                                     const char * user_key,
-                                     uint32_t user_key_size);
-
-    rc_t        (* set_decrypt_key )(void * decrypt_key,
-                                     const char * user_key,
-                                     uint32_t user_key_size);
-
-    CipherVec   (* encrypt         )(CipherVec block,
-                                     const void * encrypt_key);
-
-    CipherVec   (* decrypt         )(CipherVec block,
-                                     const void * decrypt_key);
-
-    /* end minor version == 0 */
-
-};
-
-union KBlockCipherVec
-{
-    KBlockCipherVec_vt    version;
-    KBlockCipherVec_vt_v1 v1;
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_krypto_blockcipher_vec_impl_ */
-
diff --git a/libs/krypto/blockcipher.c b/libs/krypto/blockcipher.c
deleted file mode 100644
index 22539eb..0000000
--- a/libs/krypto/blockcipher.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#error "OBSOLETE do not use"
-
-
diff --git a/libs/krypto/cipher-byte.c b/libs/krypto/cipher-byte.c
deleted file mode 100644
index 49dcb07..0000000
--- a/libs/krypto/cipher-byte.c
+++ /dev/null
@@ -1,522 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-/*
- * KCipherByte is a byte oriented KCipher that can work on all processors
- * and be built with all compilers
- */
-#include <krypto/extern.h>
-#include <klib/defs.h>
-#include <krypto/cipher.h>
-
-#include "ncbi-priv.h"
-
-#include "blockcipher-impl.h"
-
-#include "cipher-impl.h"
-#include "cipher-priv.h"
-#include "blockcipher-priv.h"
-
-#include <klib/rc.h>
-
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-const char MEMBER(ClassName)[] = CLASS_STRING(CIPHER_IMPL);
-
-/* 
- * KCipher with unaligned data.  Byte alignment.
- */
-struct KCipherByte
-{
-    KCipher dad;
-
-    const KBlockCipherByte * block_cipher;
-};
-
-
-static rc_t MEMBER(Destroy) (KCipherByte * self)
-{
-    rc_t rc = 0;
-
-    if (self)
-    {
-        rc =  KCipherDestroy (&self->dad);
-        free (self);
-    }
-    return rc;
-}
-
-
-static rc_t MEMBER(SetEncryptKey) (KCipherByte * self,
-                                   const char * user_key,
-                                   uint32_t user_key_bits)
-{
-    rc_t rc = 0;
-
-    switch (self->block_cipher->version.maj)
-    {
-    default:
-        rc = RC (rcKrypto, rcCipher, rcUpdating, rcBlockCipher, rcBadVersion);
-        break;
-
-    case 1:
-        rc = self->block_cipher->v1.set_encrypt_key (self->dad.encrypt_key, user_key,
-                                                     user_key_bits);
-        break;
-    }
-    return rc;
-}
-
-
-static rc_t MEMBER(SetDecryptKey) (KCipherByte * self,
-                                   const char * user_key,
-                                   uint32_t user_key_bits)
-{
-    rc_t rc = 0;
-
-    switch (self->block_cipher->version.maj)
-    {
-    default:
-        rc = RC (rcKrypto, rcCipher, rcDestroying, rcBlockCipher, rcBadVersion);
-        break;
-
-    case 1:
-        rc = self->block_cipher->v1.set_decrypt_key (self->dad.decrypt_key, user_key,
-                                                     user_key_bits);
-        break;
-    }
-    return rc;
-}
-
-
-static rc_t MEMBER(SetEncryptIvec)(KCipherByte * self,
-                                   const void * ivec)
-{
-    assert (self);
-    assert (ivec);
-
-    memcpy (self->dad.encrypt_ivec, ivec, self->dad.block_size);
-
-    return 0;
-}
-
-
-static rc_t MEMBER(SetDecryptIvec)(KCipherByte * self,
-                                   const void * ivec)
-{
-    assert (self);
-    assert (ivec);
-
-    memcpy (self->dad.decrypt_ivec, ivec, self->dad.block_size);
-
-    return 0;
-}
-
-
-static rc_t MEMBER(SetEncryptCounterFunc)(KCipherByte * self,
-                                          cipher_ctr_func func)
-{
-    assert (self);
-    assert (func);
-
-    self->dad.encrypt_counter_func = func;
-
-    return 0;
-}
-
-
-static rc_t MEMBER(SetDecryptCounterFunc)(KCipherByte * self,
-                                          cipher_ctr_func func)
-{
-    assert (self);
-    assert (func);
-
-    self->dad.decrypt_counter_func = func;
-
-    return 0;
-}
-
-
-static rc_t MEMBER(Encrypt)(const KCipherByte * self,
-                            const void * in, void * out)
-{
-    rc_t rc = 0;
-
-    switch (self->block_cipher->version.maj)
-    {
-    default:
-        rc = RC (rcKrypto, rcCipher, rcEncoding, rcBlockCipher, rcBadVersion);
-        break;
-
-    case 1:
-        self->block_cipher->v1.encrypt (in, out, self->dad.encrypt_key);
-        break;
-    }
-    return rc;
-}
-
-
-static rc_t MEMBER(Decrypt)(const KCipherByte * self,
-                            const void * in, void * out)
-{
-    rc_t rc = 0;
-
-    switch (self->block_cipher->version.maj)
-    {
-    default:
-        rc = RC (rcKrypto, rcCipher, rcEncoding, rcBlockCipher, rcBadVersion);
-        break;
-
-    case 1:
-        self->block_cipher->v1.decrypt (in, out, self->dad.decrypt_key);
-        break;
-    }
-    return rc;
-}
-
-
-static rc_t MEMBER(EncryptEcb)(const KCipherByte * self,
-                               const void * in, void * out,
-                               uint32_t block_count)
-{
-    rc_t rc = 0;
-    const char * pin = in;
-    char * pout = out;
-
-    switch (self->block_cipher->version.maj)
-    {
-    default:
-        rc = RC (rcKrypto, rcCipher, rcEncoding, rcBlockCipher, rcBadVersion);
-        break;
-
-    case 1:
-        for (; block_count; --block_count)
-        {
-            self->block_cipher->v1.encrypt (pin, pout, self->dad.encrypt_key);
-
-            pin += self->dad.block_size;
-            pout += self->dad.block_size;
-        }
-        break;
-    }
-    return rc;
-}
-
-
-static rc_t MEMBER(DecryptEcb)(const KCipherByte * self,
-                               const void * in, void * out,
-                               uint32_t block_count)
-{
-    rc_t rc = 0;
-    const char * pin = in;
-    char * pout = out;
-
-    switch (self->block_cipher->version.maj)
-    {
-    default:
-        rc = RC (rcKrypto, rcCipher, rcEncoding, rcBlockCipher, rcBadVersion);
-        break;
-
-    case 1:
-        for (; block_count; --block_count)
-        {
-            self->block_cipher->v1.decrypt (pin, pout, self->dad.decrypt_key);
-
-            pin += self->dad.block_size;
-            pout += self->dad.block_size;
-        }
-        break;
-    }
-    return rc;
-}
-
-
-static rc_t MEMBER(EncryptCbc)(KCipherByte * self,
-                               const void * in, void * out,
-                               uint32_t block_count)
-{
-    rc_t rc = 0;
-    const char * pin = in;
-    char * pout = out;
-
-    switch (self->block_cipher->version.maj)
-    {
-    default:
-        rc = RC (rcKrypto, rcCipher, rcEncoding, rcBlockCipher, rcBadVersion);
-        break;
-
-    case 1:
-        if (block_count)
-        {
-            CipherBlock block;
-            unsigned ix;
-
-            memcpy (block, self->dad.encrypt_ivec, self->dad.block_size);
-
-            do
-            {
-                for (ix = 0; ix < self->dad.block_size; ++ix)
-                    block[ix] ^= pin[ix];
-
-                self->block_cipher->v1.encrypt (block, block,
-                                                self->dad.encrypt_key);
-
-                memcpy (pout, block, self->dad.block_size);
-
-                pin += self->dad.block_size;
-                pout += self->dad.block_size;
-
-            } while (--block_count);
-
-            memcpy (self->dad.encrypt_ivec, block, self->dad.block_size);
-        }
-        break;
-    }
-    return rc;
-}
-
-
-static rc_t MEMBER(DecryptCbc)(KCipherByte * self,
-                               const void * in, void * out,
-                               uint32_t block_count)
-{
-    rc_t rc = 0;
-    const char * pin = in;
-    char * pout = out;
-
-    switch (self->block_cipher->version.maj)
-    {
-    default:
-        rc = RC (rcKrypto, rcCipher, rcEncoding, rcBlockCipher, rcBadVersion);
-        break;
-
-    case 1:
-        if (block_count)
-        {
-            CipherBlock ivec;
-            CipherBlock block;
-            unsigned ix;
-
-            memcpy (ivec, self->dad.decrypt_ivec, self->dad.block_size);
-
-            do
-            {
-                self->block_cipher->v1.decrypt (pin, block,
-                                                self->dad.decrypt_key);
-
-                for (ix = 0; ix < self->dad.block_size; ++ix)
-                    pout[ix] = block[ix] ^ ivec[ix];
-
-                memcpy (ivec, pin, self->dad.block_size); 
-
-                pin += self->dad.block_size;
-                pout += self->dad.block_size;
-
-            } while (--block_count);
-
-            memcpy (self->dad.decrypt_ivec, ivec, self->dad.block_size);
-        }
-        break;
-    }
-    return rc;
-}
-
-
-static rc_t MEMBER(EncryptPcbc)(KCipherByte * self,
-                                const void * in, void * out,
-                                uint32_t block_count)
-{
-    return RC (rcKrypto, rcCipher, rcEncoding, rcFunction, rcUnsupported);
-}
-
-
-static rc_t MEMBER(DecryptPcbc)(KCipherByte * self,
-                                const void * in, void * out,
-                                uint32_t block_count)
-{
-    return RC (rcKrypto, rcCipher, rcEncoding, rcFunction, rcUnsupported);
-}
-
-
-static rc_t MEMBER(EncryptCfb)(KCipherByte * self,
-                               const void * in, void * out,
-                               uint32_t block_count)
-{
-    return RC (rcKrypto, rcCipher, rcEncoding, rcFunction, rcUnsupported);
-}
-
-
-static rc_t MEMBER(DecryptCfb)(KCipherByte * self,
-                               const void * in, void * out,
-                               uint32_t block_count)
-{
-    return RC (rcKrypto, rcCipher, rcEncoding, rcFunction, rcUnsupported);
-}
-
-
-static rc_t MEMBER(EncryptOfb)(KCipherByte * self,
-                               const void * in, void * out,
-                               uint32_t block_count)
-{
-    return RC (rcKrypto, rcCipher, rcEncoding, rcFunction, rcUnsupported);
-}
-
-
-static rc_t MEMBER(DecryptOfb)(KCipherByte * self,
-                               const void * in, void * out,
-                               uint32_t block_count)
-{
-    return RC (rcKrypto, rcCipher, rcEncoding, rcFunction, rcUnsupported);
-}
-
-
-static rc_t MEMBER(EncryptCtr)(KCipherByte * self,
-                               const void * in, void * out,
-                               uint32_t block_count)
-{
-    return RC (rcKrypto, rcCipher, rcEncoding, rcFunction, rcUnsupported);
-}
-
-
-static rc_t MEMBER(DecryptCtr)(KCipherByte * self,
-                               const void * in, void * out,
-                               uint32_t block_count)
-{
-    return RC (rcKrypto, rcCipher, rcEncoding, rcFunction, rcUnsupported);
-}
-
-
-static struct KCipher_vt_v1 MEMBER(_vt_v1) =
-{
-    { 1, 0 },
-
-    MEMBER(Destroy),
-    MEMBER(SetEncryptKey),
-    MEMBER(SetDecryptKey),
-    MEMBER(SetEncryptIvec),
-    MEMBER(SetDecryptIvec),
-    MEMBER(SetEncryptCounterFunc),
-    MEMBER(SetDecryptCounterFunc),
-    MEMBER(Encrypt),
-    MEMBER(Decrypt),
-    MEMBER(EncryptEcb),
-    MEMBER(DecryptEcb),
-    MEMBER(EncryptCbc),
-    MEMBER(DecryptCbc),
-    MEMBER(EncryptPcbc),
-    MEMBER(DecryptPcbc),
-    MEMBER(EncryptCfb),
-    MEMBER(DecryptCfb),
-    MEMBER(EncryptOfb),
-    MEMBER(DecryptOfb),
-    MEMBER(EncryptCtr),
-    MEMBER(DecryptCtr)
-};
-
-
-static __inline__ rc_t MEMBER(Alloc)(KCipherByte ** pobj,
-                                     const KBlockCipher * block_cipher)
-{
-    size_t block_size = block_cipher->byte.v1.block_size();
-    size_t key_size = block_cipher->byte.v1.key_size();
-    rc_t rc = 0;
-
-    *pobj = calloc (1, sizeof (**pobj) + 2 * key_size + 2 * block_size);
-    if (*pobj == NULL)
-        rc = RC (rcKrypto, rcCipher, rcConstructing, rcMemory, rcExhausted);
-
-    return rc;
-}
-
-
-static __inline__ rc_t MEMBER(Init)(KCipherByte * self,
-                                    const KBlockCipher * block_cipher)
-{
-    KCipher * dad = &self->dad;
-    size_t block_size = block_cipher->byte.v1.block_size();
-    size_t key_size = block_cipher->byte.v1.key_size();
-
-    KCipherInit (dad, (uint32_t) block_size,
-                 (const KCipher_vt*)&MEMBER(_vt_v1),
-                 MEMBER(ClassName));
-
-    dad->encrypt_key = (uint8_t *)(self + 1);
-    dad->decrypt_key = ((uint8_t *)dad->encrypt_key) + key_size;
-    dad->encrypt_ivec = ((uint8_t *)dad->decrypt_key) + key_size;
-    dad->decrypt_ivec = ((uint8_t *)dad->encrypt_ivec) + block_size;
-
-    self->block_cipher = &block_cipher->byte;
-
-    return 0;
-}
-
-
-rc_t MEMBER(Make) (KCipher ** new_obj, kcipher_type type)
-{
-    rc_t rc;
-    KBlockCipher * block_cipher;
-
-    if (new_obj == NULL)
-        return RC (rcKrypto, rcCipher, rcConstructing, rcSelf, rcNull);
-
-    *new_obj = NULL;
-
-    switch (type)
-    {
-    default:
-        return RC (rcKrypto, rcCipher, rcConstructing, rcParam, rcInvalid);
-
-    case kcipher_null:
-        rc = NULLBCMEMBER(Make)(&block_cipher);
-        break;
-
-    case kcipher_AES:
-        rc = AESBCMEMBER(Make)(&block_cipher);
-        break;
-    }
-
-    if (rc == 0)
-    {
-        KCipherByte * obj;
-
-        rc = MEMBER(Alloc)(&obj, block_cipher);
-        if (rc == 0)
-        {
-            rc = MEMBER(Init)(obj, block_cipher);
-            if (rc == 0)
-                *new_obj = &obj->dad;
-            else
-                free (obj);
-        }
-    }
-    return rc;
-}
-
-/* EOF */
diff --git a/libs/krypto/cipher-impl.h b/libs/krypto/cipher-impl.h
deleted file mode 100644
index fbccdb5..0000000
--- a/libs/krypto/cipher-impl.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_krypto_cipher_impl_
-#define _h_krypto_cipher_impl_
-
-#include <krypto/extern.h>
-#include <klib/defs.h>
-#include <klib/refcount.h>
-#include <krypto/cipher.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#ifndef CIPHER_IMPL
-#define CIPHER_IMPL KCipher
-#else
-struct CIPHER_IMPL;
-typedef struct CIPHER_IMPL CIPHER_IMPL;
-#endif
-
-typedef struct KCipher_vt KCipher_vt;
-struct KCipher_vt
-{
-    uint32_t maj;
-    uint32_t min;
-};
-
-
-typedef struct KCipher_vt_v1 KCipher_vt_v1;
-struct KCipher_vt_v1
-{
-    KCipher_vt version;
-
-    /* version == 1.x */
-    /* start minor version == 0 */
-    rc_t ( CC * destroy             )(CIPHER_IMPL * self);
-
-    rc_t ( CC * set_encrypt_key     )(CIPHER_IMPL * self,
-                                      const char * user_key,
-                                      uint32_t user_key_bits);
-
-    rc_t ( CC * set_decrypt_key     )(CIPHER_IMPL * self,
-                                      const char * user_key,
-                                      uint32_t user_key_bits);
-
-    rc_t ( CC * set_encrypt_ivec    )(CIPHER_IMPL * self,
-                                      const void * ivec);
-
-    rc_t ( CC * set_decrypt_ivec    )(CIPHER_IMPL * self,
-                                      const void * ivec);
-
-    rc_t ( CC * set_encrypt_ctr_func)(CIPHER_IMPL * self,
-                                      cipher_ctr_func enc_ctr_func);
-
-    rc_t ( CC * set_decrypt_ctr_func)(CIPHER_IMPL * self,
-                                      cipher_ctr_func enc_ctr_func);
-
-    /* single block encryption */
-    rc_t ( CC * encrypt             )(const CIPHER_IMPL * self,
-                                      const void * in,
-                                      void * out);
-    rc_t ( CC * decrypt             )(const CIPHER_IMPL * self,
-                                      const void * in,
-                                      void * out);
-
-    /* electronic code book */
-    rc_t ( CC * encrypt_ecb         )(const CIPHER_IMPL * self,
-                                      const void * in,
-                                      void * out,
-                                      uint32_t block_count);
-
-    rc_t ( CC * decrypt_ecb         )(const CIPHER_IMPL * self,
-                                      const void * in,
-                                      void * out,
-                                      uint32_t block_count);
-
-    /* cipher-block chaining */
-    rc_t ( CC * encrypt_cbc         )(CIPHER_IMPL * self,
-                                      const void * in,
-                                      void * out,
-                                      uint32_t block_count);
-    rc_t ( CC * decrypt_cbc         )(CIPHER_IMPL * self,
-                                      const void * in,
-                                      void * out,
-                                      uint32_t block_count);
-
-    /* propagating cipher-block chaining */
-    rc_t ( CC * encrypt_pcbc        )(CIPHER_IMPL * self, const void * in,
-                                      void * out, uint32_t block_count);
-    rc_t ( CC * decrypt_pcbc        )(CIPHER_IMPL * self, const void * in,
-                                      void * out, uint32_t block_count);
-
-    /* cipher feedback */
-    rc_t ( CC * encrypt_cfb         )(CIPHER_IMPL * self, const void * in,
-                                      void * out, uint32_t block_count);
-    rc_t ( CC * decrypt_cfb         )(CIPHER_IMPL * self, const void * in,
-                                      void * out, uint32_t block_count);
-
-    /* output feedback */
-    rc_t ( CC * encrypt_ofb         )(CIPHER_IMPL * self, const void * in,
-                                      void * out, uint32_t block_count);
-    rc_t ( CC * decrypt_ofb         )(CIPHER_IMPL * self, const void * in,
-                                      void * out, uint32_t block_count);
-
-    /* Counter */
-    rc_t ( CC * encrypt_ctr         )(CIPHER_IMPL * self, const void * in,
-                                      void * out, uint32_t block_count);
-    rc_t ( CC * decrypt_ctr         )(CIPHER_IMPL * self, const void * in,
-                                      void * out, uint32_t block_count);
-
-    /* end minor version == 0 */
-
-    /* ANY NEW ENTRIES MUST BE REFLECTED IN libs/krypto/cipher.c
-       BY BOTH THE CORRESPONDING MESSAGE DISPATCH FUNCTION(s) AND
-       VTABLE VALIDITY CHECKS IN CIPHERInit */
-};
-
-typedef union KCipher_ptr KCipher_ptr;
-union KCipher_ptr
-{
-    const KCipher_vt    * version;
-    const KCipher_vt_v1 * v1;
-};
-
-
-struct KCipher
-{
-    KRefcount refcount;
-    uint32_t block_size;
-    KCipher_ptr vt;
-    const char * name;
-    void * encrypt_key;
-    void * decrypt_key;
-    void * encrypt_ivec;
-    void * decrypt_ivec;
-    cipher_ctr_func encrypt_counter_func;
-    cipher_ctr_func decrypt_counter_func;
-};
-
-void KCipherInit (KCipher * self, uint32_t block_size,
-                  const KCipher_vt * vt, const char * name);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_krypto_cipher_impl_ */
diff --git a/libs/krypto/cipher-no-vec.c b/libs/krypto/cipher-no-vec.c
deleted file mode 100644
index 7e0eded..0000000
--- a/libs/krypto/cipher-no-vec.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-#include <krypto/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-
-#include <krypto/ciphermgr.h>
-#include "cipher-priv.h"
-#include "ncbi-priv.h"
-
-struct KCipher;
-
-rc_t CMEMBER(Make) (struct KCipher ** new_obj, kcipher_type type)
-{
-    return RC (rcKrypto, rcCipher, rcConstructing, rcFunction, rcUnsupported);
-}
-
-
-/* EOF */
diff --git a/libs/krypto/cipher-priv.h b/libs/krypto/cipher-priv.h
deleted file mode 100644
index bcc39e5..0000000
--- a/libs/krypto/cipher-priv.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#ifndef _h_krypto_cipher_priv_
-#define _h_krypto_cipher_priv_
-
-#include <krypto/extern.h>
-#include <krypto/ciphermgr.h>
-#include <krypto/cipher.h>
-
-#include <klib/refcount.h>
-
-/*
- * klib/rc.h ran out of room for new targets so we'll fake it for now
- * with a now unused target that will unfortunately leave some
- * confusing rc to english translations
- */
-#define rcBlockCipher rcRng
-#define rcCipher      rcRng
-
-/*
- * for use within krypto and krypto testing
- */
-
-enum e_aes_type
-{
-    kcipher_AES_core,     /* Rijndael aes_core.c portable */
-    kcipher_AES_ncbi_sim, /* clean AES written for NCBI specifically from the  */
-    kcipher_AES_ncbi_vec, /* xmm vector version version */
-    kcipher_AES_ncbi_ni,  /* 64 bit AES-NI version */
-    kcipher_AES_count
-};
-
-rc_t KCipherMake         (struct KCipher ** new_cipher,
-                          kcipher_type type);
-rc_t KCipherVecAesNiMake (struct KCipher ** new_cipher,
-                          kcipher_type type);
-rc_t KCipherVecRegMake   (struct KCipher ** new_cipher,
-                          kcipher_type type);
-rc_t KCipherVecMake      (struct KCipher ** new_cipher,
-                          kcipher_type type);
-rc_t KCipherByteMake     (struct KCipher ** new_cipher,
-                          kcipher_type type);
-
-/*
- * not for use outside krypto
- */
-rc_t KCipherDestroy (struct KCipher * self);
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* #ifndef _h_krypto_cipher_priv_ */
diff --git a/libs/krypto/cipher-vec.c b/libs/krypto/cipher-vec.c
deleted file mode 100644
index 6b61c9e..0000000
--- a/libs/krypto/cipher-vec.c
+++ /dev/null
@@ -1,808 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <krypto/extern.h>
-#include <klib/defs.h>
-
-/* CIPHER_IMPL and BLOCKCIPHER_IMPL are defined in this header */
-#include "ncbi-priv.h"
-/* CIPHER_IMPL is used in this header */
-#include "cipher-impl.h"
-/* BLOCKCIPHER_IMPL is used in this header */
-#include "blockcipher-impl.h"
-
-#include "aes-ncbi-priv.h"
-#include "null-ncbi-priv.h"
-#include "cipher-priv.h"
-#include "blockcipher-priv.h"
-
-#include <krypto/cipher.h>
-#include <krypto/ciphermgr.h>
-
-#include <klib/defs.h>
-#include <klib/refcount.h>
-#include <klib/out.h>
-#include <klib/rc.h>
-
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-const char CMEMBER(ClassName)[] = CLASS_STRING(CIPHER_IMPL);
-
-
-
-struct CIPHER_IMPL
-{
-    KCipher dad;
-    const KBlockCipherVec * block_cipher;
-};
-
-typedef union CipherVec_u
-{
-    CipherVec   vec;
-    CipherBlock block;
-} CipherVec_u;
-
-/*
- * Read a blocks worth of bytes into an AESState
- */
-static __inline__ CipherVec CipherVecIn (const void * cvin)
-{
-#if USE_VEC_REG
-    register CipherVec cv;
-
-    __asm__ (
-        "movdqu (%[a]),%[s]" : [s] "=x" (cv) : [a] "D" (cvin)
-        );
-
-    return cv;
-#else
-    CipherVec_u u;
-
-    memmove (&u.block, cvin, sizeof (u));
-    return u.vec;
-#endif
-}
-
-
-
-/*
- * Write a block's worth of bytes out from an AESState
- */
-static __inline__ void CipherVecOut (const CipherVec cv, void * cvout)
-{
-#if USE_VEC_REG
-    register CipherVec rcv = cv;
-
-    __asm__ (
-        "movdqu %[s],(%[a])" : : [s] "x" (rcv), [a] "D" (cvout)
-        );
-#else
-    CipherVec lcv = cv;
-    memmove (cvout, &lcv, sizeof (lcv));
-#endif
-}
-
-
-static rc_t CMEMBER(Destroy) (CIPHER_IMPL * self)
-{
-    rc_t rc = 0;
-
-    if (self)
-    {
-        rc =  KCipherDestroy (&self->dad);
-        free (self);
-    }
-    return rc;
-}
-
-
-static rc_t CMEMBER(SetEncryptKey)(CIPHER_IMPL * self,
-                                  const char * user_key,
-                                  uint32_t user_key_bits)
-{
-    rc_t rc = 0;
-
-    assert (self);
-    assert (user_key);
-    assert (user_key_bits);
-
-    switch (self->block_cipher->version.maj)
-    {
-    default:
-        rc = RC (rcKrypto, rcCipher, rcUpdating, rcBlockCipher, rcBadVersion);
-        break;
-
-    case 1:
-        self->block_cipher->v1.set_encrypt_key (self->dad.encrypt_key, user_key,
-                                                user_key_bits);
-        break;
-    }
-    return rc;
-}
-
-
-static rc_t CMEMBER(SetDecryptKey)(CIPHER_IMPL * self,
-                                  const char * user_key,
-                                  uint32_t user_key_bits)
-{
-    rc_t rc = 0;
-
-    assert (self);
-    assert (user_key);
-    assert (user_key_bits);
-
-    switch (self->block_cipher->version.maj)
-    {
-    default:
-        rc = RC (rcKrypto, rcCipher, rcUpdating, rcBlockCipher, rcBadVersion);
-        break;
-
-    case 1:
-        self->block_cipher->v1.set_decrypt_key (self->dad.decrypt_key, user_key,
-                                                    user_key_bits);
-        break;
-    }
-    return rc;
-}
-
-
-static
-rc_t CMEMBER(SetEncryptIvec) (CIPHER_IMPL * self,
-                             const void * ivec)
-{
-    assert (self);
-    assert (ivec);
-
-    memcpy (self->dad.encrypt_ivec, ivec, self->dad.block_size);
-
-    return 0;
-}
-
-
-static
-rc_t CMEMBER(SetDecryptIvec) (CIPHER_IMPL * self,
-                             const void * ivec)
-{
-    assert (self);
-    assert (ivec);
-
-    memcpy (self->dad.decrypt_ivec, ivec, self->dad.block_size);
-
-    return 0;
-}
-
-
-static
-rc_t CMEMBER(SetEncryptCounterFunc) (CIPHER_IMPL * self,
-                                    cipher_ctr_func func)
-{
-    assert (self);
-    assert (func);
-
-    self->dad.encrypt_counter_func = func;
-
-    return 0;
-}
-
-
-static
-rc_t CMEMBER(SetDecryptCounterFunc) (CIPHER_IMPL * self,
-                                    cipher_ctr_func func)
-{
-    assert (self);
-    assert (func);
-
-    self->dad.decrypt_counter_func = func;
-
-    return 0;
-}
-
-
-static __inline__ CipherVec CMEMBER(EncryptV1)(const CIPHER_IMPL * self,
-                                              register CipherVec cv)
-{
-    return self->block_cipher->v1.encrypt (cv, self->dad.encrypt_key);
-}
-
-
-static __inline__ CipherVec  CMEMBER(DecryptV1)(const CIPHER_IMPL * self,
-                                              register CipherVec cv)
-{
-    return self->block_cipher->v1.decrypt (cv, self->dad.decrypt_key);
-}
-
-
-static __inline__ rc_t CMEMBER(EncryptV1Int)(const CIPHER_IMPL * self,
-                                            const void * in, void * out)
-{
-    CipherVec cv;
-
-    cv = CipherVecIn(in);
-    cv = CMEMBER(EncryptV1)(self, cv);
-    CipherVecOut(cv, out);
-    return 0;
-}
-
-
-static __inline__ rc_t CMEMBER(DecryptV1Int)(const CIPHER_IMPL * self,
-                                            const void * in, void * out)
-{
-    CipherVec cv;
-
-    cv = CipherVecIn(in);
-    cv = CMEMBER(DecryptV1)(self, cv);
-    CipherVecOut(cv, out);
-    return 0;
-}
-
-
-static rc_t CMEMBER(Encrypt) (const CIPHER_IMPL * self, const void * in, void * out)
-{
-    rc_t rc;
-
-    switch (self->block_cipher->version.maj)
-    {
-    default:
-        rc = RC (rcKrypto, rcCipher, rcEncoding, rcBlockCipher, rcBadVersion);
-        break;
-
-    case 1:
-        rc = CMEMBER(EncryptV1Int)(self, in, out);
-        break;
-    }
-
-    return rc;
-}
-
-
-static
-rc_t CMEMBER(Decrypt) (const CIPHER_IMPL * self, const void * in, void * out)
-{
-    rc_t rc = 0;
-
-    switch (self->block_cipher->version.maj)
-    {
-    default:
-        rc = RC (rcKrypto, rcCipher, rcEncoding, rcBlockCipher, rcBadVersion);
-        break;
-
-    case 1:
-        rc = CMEMBER(DecryptV1Int)(self, in, out);
-        break;
-    }
-
-    return rc;
-}
-
-
-/* ====================
- * longer runs of multiple blocks.
- *
- * The algorithms are well defined and standard in most cases
- *
- * These aremore or elss equivalent to class functions as they do not depend upon
- * the operation of the cipher and the algorithms are independent of anything about
- * the cipher other than its block size.
- *
- * PT: plain text block
- * CT: cipher text block
- * EK: encryption key
- * DK: decryption key (might be sthe same as EK)
- * ENC: encrypt cipher function on a block using a key
- * DEC: decrypt cipher function on a block using a key
- * IV: initialization vector - used as feedback for chaining
- * N:  number used once (nonce)
- * FB: feedback is the next IV in a chained/feedback mode
- */
-
-
-/* -----
- * NOTE:
- * 'in' can be the same as 'out' but other overlaps are dangers as a block at a
- * time is written. The code does not look for overlaps at this point.
- */
-
-/* ----------
- * Electronic Code Book - simple cipher with no chaining feedback  just iterate
- * simple encrypt/decrypt with the plain, text, cipher text and key/
- *
- * CT = ENC (PT,EK)
- * PT = DEC (CT,DK)
- */
-
-/* -----
- * NOTE: currently an implmentation detail limits us to 8192 bit cipher block
- * size.  Changing MAX_BLOCK_SIZE in cipher.c can up that limit without 
- * causing any other compatibility issues. 
- *
- * Two local byte arrays are defined on the stack of 1024 bytes or 8192 bits.
- */
-static
-rc_t CMEMBER(EncryptEcb) (const CIPHER_IMPL * self, const void * in, void * out, uint32_t block_count)
-{
-    const uint8_t * pin;
-    uint8_t * pout;
-
-    for ((pin = in), (pout = out);
-         block_count --; 
-         (pin += self->dad.block_size), (pout += self->dad.block_size))
-    {
-        CMEMBER(EncryptV1Int)(self, pin, pout);
-    }
-    return 0;
-}
-
-
-static
-rc_t CMEMBER(DecryptEcb) (const CIPHER_IMPL * self, const void * in, void * out, uint32_t block_count)
-{
-    const uint8_t * pin;
-    uint8_t * pout;
-
-    for ((pin = in), (pout = out);
-         block_count --; 
-         (pin += self->dad.block_size), (pout += self->dad.block_size))
-    {
-        CMEMBER(DecryptV1Int)(self, pin, pout);
-    }
-
-    return 0;
-}
-
-
-/* ----------
- * Cipher-Block Chaining
- * CT = (FB = ENC (PT^IV, EK))
- * PT = DEC ((FB = CT), DK)
- */
-static
-rc_t CMEMBER(EncryptCbc) (CIPHER_IMPL * self, const void * in, void * out, uint32_t block_count)
-{
-    CipherVec cv;
-    CipherVec ivec;
-    const uint8_t * pin;
-    uint8_t * pout;
-
-#if 0
-    ivec = *(const CipherVec*)self->dad.encrypt_ivec;
-#else
-    ivec = CipherVecIn (self->dad.encrypt_ivec);
-#endif
-
-    for ((pin = in), (pout = out);
-         block_count --; 
-         (pin += self->dad.block_size), (pout += self->dad.block_size))
-    {
-        cv = CipherVecIn (pin);
-        cv ^= ivec;
-        ivec = CMEMBER(EncryptV1)(self, cv);
-        CipherVecOut (ivec, pout);
-    }
-
-#if 0
-    *(CipherVec*)self->dad.encrypt_ivec = ivec;
-#else
-    CipherVecOut (ivec, self->dad.encrypt_ivec);
-#endif
-
-    return 0;
-}    
-
-
-static
-rc_t CMEMBER(DecryptCbc) (CIPHER_IMPL * self, const void * in, void * out, uint32_t block_count)
-{
-    CipherVec cv;
-    CipherVec ivec;
-    const uint8_t * pin;
-    uint8_t * pout;
-
-    ivec = CipherVecIn (self->dad.decrypt_ivec);
-
-    for ((pin = in), (pout = out);
-         block_count --; 
-         (pin += self->dad.block_size), (pout += self->dad.block_size))
-    {
-        CipherVec temp;
-
-        cv = CipherVecIn (pin);
-#if 0
-        temp = cv;
-        temp = CMEMBER(DecryptV1)(self, temp);
-#else
-        temp = CMEMBER(DecryptV1)(self, cv);
-#endif
-        temp ^= ivec;
-        CipherVecOut (temp, pout);
-        ivec = cv;
-    }
-
-    *(CipherVec*)self->dad.decrypt_ivec = ivec;
-    return 0;
-}
-
-
-/* ----------
- * Propagating cipher-block chaining
- * FB = PT ^ (CT = ENC ((PT^IV), EK))
- * FB = CT ^ (PT = DEC (CT,DK) ^ IV)
- */
-static
-rc_t CMEMBER(EncryptPcbc) (CIPHER_IMPL * self, const void * in, void * out, uint32_t block_count)
-{
-#if 1
-    CipherVec cv;
-    CipherVec ivec;
-    const uint8_t * pin;
-    uint8_t * pout;
-
-    ivec = *(const CipherVec*)self->dad.encrypt_ivec;
-
-    for ((pin = in), (pout = out);
-         block_count --; 
-         (pin += self->dad.block_size), (pout += self->dad.block_size))
-    {
-        CipherVec temp;
-
-        cv = CipherVecIn (pin);
-        temp = cv ^ ivec;
-        temp = CMEMBER(EncryptV1)(self, temp); 
-        ivec = cv ^ temp;
-        CipherVecOut (temp, pout);
-    }
-
-    *(CipherVec*)self->dad.encrypt_ivec = ivec;
-
-    return 0;
-#else
-    return RC (rcKrypto, rcCipher, rcEncoding, rcFunction, rcUnsupported);
-#endif
-}
-
-
-static
-rc_t CMEMBER(DecryptPcbc) (CIPHER_IMPL * self, const void * in, void * out, uint32_t block_count)
-{
-#if 1
-    CipherVec cv;
-    CipherVec ivec;
-    const uint8_t * pin;
-    uint8_t * pout;
-
-    ivec = *(const CipherVec*)self->dad.encrypt_ivec;
-
-    for ((pin = in), (pout = out);
-         block_count --; 
-         (pin += self->dad.block_size), (pout += self->dad.block_size))
-    {
-        CipherVec temp;
-
-        cv = CipherVecIn (pin);
-        temp = CMEMBER(DecryptV1)(self, cv);
-        ivec ^= temp;
-        CipherVecOut (temp, pout);
-    }
-
-    *(CipherVec*)self->dad.encrypt_ivec = ivec;
-
-    return 0;
-#else
-    return RC (rcKrypto, rcCipher, rcEncoding, rcFunction, rcUnsupported);
-#endif
-}
-
-
-/* ----------
- * Cipher Feedback
- * CT = (FB = PT) ^ ENC (IV, EK))
- * PT = (FB = CT) ^ DEC (IV, DK)
- */
-static
-rc_t CMEMBER(EncryptCfb) (CIPHER_IMPL * self, const void * in, void * out, uint32_t block_count)
-{
-#if 1
-    CipherVec cv;
-    CipherVec ivec;
-    const uint8_t * pin;
-    uint8_t * pout;
-
-    ivec = *(const CipherVec*)self->dad.encrypt_ivec;
-
-    for ((pin = in), (pout = out);
-         block_count --; 
-         (pin += self->dad.block_size), (pout += self->dad.block_size))
-    {
-        ivec = CMEMBER(EncryptV1)(self, ivec); 
-        cv = CipherVecIn (pin);
-        ivec ^= cv;
-        CipherVecOut (ivec, pout);
-    }
-
-    *(CipherVec*)self->dad.encrypt_ivec = ivec;
-
-    return 0;
-#else
-    return RC (rcKrypto, rcCipher, rcEncoding, rcFunction, rcUnsupported);
-#endif
-}
-
-
-static
-rc_t CMEMBER(DecryptCfb) (CIPHER_IMPL * self, const void * in, void * out, uint32_t block_count)
-{
-#if 1
-    CipherVec cv;
-    CipherVec ivec;
-    const uint8_t * pin;
-    uint8_t * pout;
-
-    ivec = *(const CipherVec*)self->dad.encrypt_ivec;
-
-    for ((pin = in), (pout = out);
-         block_count --; 
-         (pin += self->dad.block_size), (pout += self->dad.block_size))
-    {
-        cv = CMEMBER(EncryptV1)(self, ivec); 
-        ivec = CipherVecIn (pin);
-        cv ^= ivec;
-        CipherVecOut (cv, pout);
-    }
-
-    *(CipherVec*)self->dad.encrypt_ivec = ivec;
-
-    return 0;
-#else
-    return RC (rcKrypto, rcCipher, rcEncoding, rcFunction, rcUnsupported);
-#endif
-}
-
-
-/* ----------
- * Output Feedback
- * CT = PT ^ (FB = ENC (IV, EK))
- * PT = CT ^ (FB = DEC (IV, DK))
- */
-static
-rc_t CMEMBER(EncryptOfb) (CIPHER_IMPL * self, const void * in, void * out, uint32_t block_count)
-{
-#if 1
-    CipherVec cv;
-    CipherVec ivec;
-    const uint8_t * pin;
-    uint8_t * pout;
-
-    ivec = *(const CipherVec*)self->dad.encrypt_ivec;
-
-    for ((pin = in), (pout = out);
-         block_count --; 
-         (pin += self->dad.block_size), (pout += self->dad.block_size))
-    {
-        ivec = CMEMBER(EncryptV1)(self, ivec); 
-        cv = CipherVecIn (pin);
-        cv ^= ivec;
-        CipherVecOut (cv, pout);
-    }
-
-    *(CipherVec*)self->dad.encrypt_ivec = ivec;
-
-    return 0;
-#else
-    return RC (rcKrypto, rcCipher, rcEncoding, rcFunction, rcUnsupported);
-#endif
-}
-
-
-static
-rc_t CMEMBER(DecryptOfb) (CIPHER_IMPL * self, const void * in, void * out, uint32_t block_count)
-{
-    return CMEMBER(EncryptOfb)(self, in, out, block_count);
-}
-
-
-/* Counter
- * IV is a nonce and not re-used as FB
- * CT = PT ^ ENC (N, EK)
- * PT = CT ^ ENC (N, DK) 
- * Note decrypt is encrypt.
- * nonce is a function that given an iv generates the next iv
- */
-static
-rc_t CMEMBER(EncryptCtr) (CIPHER_IMPL * self, const void * in, void * out, uint32_t block_count)
-{
-    return RC (rcKrypto, rcCipher, rcEncoding, rcFunction, rcUnsupported);
-}
-
-
-static
-rc_t CMEMBER(DecryptCtr) (CIPHER_IMPL * self, const void * in, void * out, uint32_t block_count)
-{
-    return RC (rcKrypto, rcCipher, rcEncoding, rcFunction, rcUnsupported);
-}
-
-static
-struct KCipher_vt_v1 CMEMBER(_vt_v1) =
-{
-    { 1, 0 },
-
-    CMEMBER(Destroy),
-    CMEMBER(SetEncryptKey),
-    CMEMBER(SetDecryptKey),
-    CMEMBER(SetEncryptIvec),
-    CMEMBER(SetDecryptIvec),
-    CMEMBER(SetEncryptCounterFunc),
-    CMEMBER(SetDecryptCounterFunc),
-    CMEMBER(Encrypt),
-    CMEMBER(Decrypt),
-    CMEMBER(EncryptEcb),
-    CMEMBER(DecryptEcb),
-    CMEMBER(EncryptCbc),
-    CMEMBER(DecryptCbc),
-    CMEMBER(EncryptPcbc),
-    CMEMBER(DecryptPcbc),
-    CMEMBER(EncryptCfb),
-    CMEMBER(DecryptCfb),
-    CMEMBER(EncryptOfb),
-    CMEMBER(DecryptOfb),
-    CMEMBER(EncryptCtr),
-    CMEMBER(DecryptCtr)
-};
-
-
-static __inline__
-rc_t CMEMBER(AllocAes)(CIPHER_IMPL ** pobj,
-                       const KBlockCipher * block_cipher)
-{
-    CipherAes * obj;
-
-    obj = calloc (1, sizeof (*obj));
-    *pobj = (CIPHER_IMPL*)obj;
-
-    return (obj ? 0 : RC (rcKrypto, rcCipher, rcConstructing, rcMemory, rcExhausted));
-}
-
-
-static __inline__
-rc_t CMEMBER(InitAes) (CIPHER_IMPL * self,
-                      const KBlockCipher * block_cipher)
-{
-    KCipher * dad = &self->dad;
-    CipherAes * aes = (struct CipherAes*)self;
-
-    KCipherInit (dad, sizeof (CipherVec),
-                 (const KCipher_vt*)&CMEMBER(_vt_v1),
-                 CMEMBER(ClassName));
-
-    dad->encrypt_key = &aes->e_key;
-    dad->decrypt_key = &aes->d_key;
-    dad->encrypt_ivec = &aes->e_ivec;
-    dad->decrypt_ivec = &aes->d_ivec;
-
-    self->block_cipher = &block_cipher->vec;
-
-    return 0;
-}
-
-
-static __inline__
-rc_t CMEMBER(AllocNull)(CIPHER_IMPL ** pobj,
-                        const KBlockCipher * block_cipher)
-{
-    CipherNull * obj;
-
-    obj = calloc (1, sizeof (*obj));
-    *pobj = (CIPHER_IMPL*)obj;
-
-    return (obj ? 0 : RC (rcKrypto, rcCipher, rcConstructing, rcMemory, rcExhausted));
-}
-
-
-static __inline__
-rc_t CMEMBER(InitNull) (CIPHER_IMPL * self,
-                        const KBlockCipher * block_cipher)
-{
-    KCipher * dad = &self->dad;
-    CipherNull * null = (CipherNull*)self;
-
-    KCipherInit (dad, sizeof (CipherVec),
-                 (const KCipher_vt*)&CMEMBER(_vt_v1),
-                 CMEMBER(ClassName));
-
-    dad->encrypt_key = &null->e_ivec;
-    dad->decrypt_key = &null->d_ivec;
-    dad->encrypt_ivec = &null->e_ivec;
-    dad->decrypt_ivec = &null->d_ivec;
-
-    self->block_cipher = &block_cipher->vec;
-
-    return 0;
-}
-
-
-rc_t CMEMBER(Make) (KCipher ** new_obj, kcipher_type type)
-{
-    rc_t rc;
-    KBlockCipher * block_cipher;
-
-    if (new_obj == NULL)
-        return RC (rcKrypto, rcCipher, rcConstructing, rcSelf, rcNull);
-
-    *new_obj = NULL;
-
-    switch (type)
-    {
-    default:
-        return RC (rcKrypto, rcCipher, rcConstructing, rcParam, rcInvalid);
-
-    case kcipher_null:
-        rc = NULLBCMEMBER(Make)(&block_cipher);
-        break;
-
-    case kcipher_AES:
-        rc = AESBCMEMBER(Make)(&block_cipher);
-        break;
-    }
-
-    if (rc == 0)
-    {
-        CIPHER_IMPL * obj;
-
-        switch (type)
-        {
-        case kcipher_null:
-            rc = CMEMBER(AllocNull) (&obj, block_cipher);
-            if (rc == 0)
-            {
-                rc = CMEMBER(InitNull) (obj, block_cipher);
-                if (rc == 0)
-                    *new_obj = (KCipher*)obj;
-                else
-                    free (obj);
-            }
-            break;
-        case kcipher_AES:
-            rc = CMEMBER(AllocAes) (&obj, block_cipher);
-            if (rc == 0)
-            {
-                rc = CMEMBER(InitAes) (obj, block_cipher);
-                if (rc == 0)
-                    *new_obj = (KCipher*)obj;
-                else
-                    free (obj);
-            }
-        default:
-            /* can't really get here */
-            break;
-        }
-    }
-    return rc;
-}
-
-
-/* EOF */
diff --git a/libs/krypto/cipher.c b/libs/krypto/cipher.c
deleted file mode 100644
index 2f5935a..0000000
--- a/libs/krypto/cipher.c
+++ /dev/null
@@ -1,543 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-#include <krypto/extern.h>
-#include <klib/defs.h>
-
-#include <krypto/cipher.h>
-#include <krypto/ciphermgr.h>
-#include <krypto/testciphermgr.h>
-#include "cipher-priv.h"
-#include "cipher-impl.h"
-
-#include <klib/rc.h>
-
-
-static const char KCipherClassName[] = "KCipherClassName";
-
-/* ----------------------------------------------------------------------
- * Init
- *
- *   Initialize the fields of this object.  The derived class will call this
- *   during it's initialization.
- *
- * self      object to initialze
- * vt        the virtual table of the derived class
- * mgr       the cipher manager that is the construction factory block cipher
- *           objects hold references to the manager while the manager merely
- *           points at the block ciphers when all block ciphers are destroyed
- *           the manager loses its references and it too can be destroyed if not
- *           held elsewhere
- * name      ASCIZ c-string the name of this class; pointer is expected to remain valid
- *           for the life of the object
- */
-void KCipherInit (KCipher * self,
-                  uint32_t block_size,
-                  const KCipher_vt * vt,
-                  const char * name)
-{
-    KRefcountInit (&self->refcount, 1, KCipherClassName, "init", name);
-    self->block_size = block_size;
-    self->vt.version = vt;
-    self->name = name;
-
-    /* the remaining fields have to be initialized in the derived object init */
-}
-
-
-/* ----------------------------------------------------------------------
- * Destroy
- *   base class destruction called during the derived class destruction
- *
- * self is the cipher object
- *
- * memory release is the repsonsibility of the derived class destructor
- */
-rc_t KCipherDestroy (KCipher * self)
-{
-    if (self)
-    {
-        KRefcountWhack (&self->refcount, self->name);
-    }
-    return 0;
-}
-
-/* ----------------------------------------------------------------------
- * AddRef
- *   add a new owner to this class.  This will mean another instance of 
- *   KCipher used this Block Cipher
- */
-KRYPTO_EXTERN
-rc_t CC KCipherAddRef (const KCipher * self)
-{
-    if (self)
-    {
-        switch (KRefcountAdd (&self->refcount, KCipherClassName))
-        {
-        case krefLimit:
-            return RC (rcKrypto, rcCipher, rcAttaching, rcRange, rcExcessive);
-        }
-    }
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * Release
- *   
- */
-static __inline__ rc_t KCipherWhack (KCipher * self)
-{
-    switch (self->vt.version->maj)
-    {
-    case 1:
-        return self->vt.v1->destroy (self);
-    }
-    return RC (rcKrypto, rcCipher, rcDestroying, rcInterface, rcBadVersion);
-}
-
-
-KRYPTO_EXTERN
-rc_t CC KCipherRelease (const KCipher * self)
-{
-    if ( self != NULL )
-    {
-        switch (KRefcountDrop ( & self -> refcount, KCipherClassName))
-        {
-        case krefWhack:
-            return KCipherWhack ((KCipher *)self);
-
-        case krefNegative:
-            return RC ( rcKrypto, rcCipher, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * Some Cipher Methods are really pass through methods to the block cipher
- *   
- */
-KRYPTO_EXTERN rc_t CC KCipherBlockSize (const KCipher * self, size_t * bytes)
-{
-    if (self == NULL)
-        return RC (rcKrypto, rcCipher, rcAccessing, rcSelf, rcNull);
-
-    if (bytes == NULL)
-        return RC (rcKrypto, rcCipher, rcAccessing, rcParam, rcNull);
-
-    *bytes = self->block_size;
-
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * 
- *   
- */
-KRYPTO_EXTERN rc_t CC KCipherSetEncryptKey (KCipher * self, const void * user_key, size_t user_key_size)
-{
-    if (self == NULL)
-        return RC (rcKrypto, rcCipher, rcAccessing, rcSelf, rcNull);
-
-    if ((user_key == NULL)||(user_key_size == 0))
-        return RC (rcKrypto, rcCipher, rcAccessing, rcParam, rcNull);
-
-    switch (self->vt.version->maj)
-    {
-    case 1:
-        return self->vt.v1->set_encrypt_key (self, user_key, (uint32_t) user_key_size);
-    }
-    return RC (rcKrypto, rcCipher, rcUpdating, rcInterface, rcBadVersion);
-}
-
-
-/* ----------------------------------------------------------------------
- * 
- *   
- */
-KRYPTO_EXTERN rc_t CC KCipherSetDecryptKey (KCipher * self, const void * user_key, size_t user_key_size)
-{
-    if (self == NULL)
-        return RC (rcKrypto, rcCipher, rcAccessing, rcSelf, rcNull);
-
-    if ((user_key == NULL)||(user_key_size == 0))
-        return RC (rcKrypto, rcCipher, rcAccessing, rcParam, rcNull);
-
-    switch (self->vt.version->maj)
-    {
-    case 1:
-        return self->vt.v1->set_decrypt_key (self, user_key, (uint32_t) user_key_size);
-    }
-    return RC (rcKrypto, rcCipher, rcUpdating, rcInterface, rcBadVersion);
-}
-
-
-
-/* ----------------------------------------------------------------------
- *  
- *
- * Set the ivec (Initialization vector or feedback) for the cipher
- *
- * the size of ivec  must match KCipherBlockSize
- *
- * the ivec is copied into the cipher not used in place
- */
-KRYPTO_EXTERN rc_t CC KCipherSetEncryptIVec (KCipher * self, const void * ivec)
-{
-    if (self == NULL)
-        return RC (rcKrypto, rcCipher, rcAccessing, rcSelf, rcNull);
-
-    if (ivec == NULL)
-        return RC (rcKrypto, rcCipher, rcAccessing, rcParam, rcNull);
-
-    switch (self->vt.version->maj)
-    {
-    case 1:
-        return self->vt.v1->set_encrypt_ivec (self, ivec);
-    }
-    return RC (rcKrypto, rcCipher, rcUpdating, rcInterface, rcBadVersion);
-}
-
-
-/* ----------------------------------------------------------------------
- * 
- *   
- */
-KRYPTO_EXTERN rc_t CC KCipherSetDecryptIVec (KCipher * self, const void * ivec)
-{
-    if (self == NULL)
-        return RC (rcKrypto, rcCipher, rcAccessing, rcSelf, rcNull);
-
-    if (ivec == NULL)
-        return RC (rcKrypto, rcCipher, rcAccessing, rcParam, rcNull);
-
-    switch (self->vt.version->maj)
-    {
-    case 1:
-        return self->vt.v1->set_decrypt_ivec (self, ivec);
-    }
-    return RC (rcKrypto, rcCipher, rcUpdating, rcInterface, rcBadVersion);
-}
-
-
-/* ----------------------------------------------------------------------
- * 
- *   
- */
-KRYPTO_EXTERN rc_t CC KCipherSetEncryptCtrFunc (KCipher * self, cipher_ctr_func func)
-{
-    if (self == NULL)
-        return RC (rcKrypto, rcCipher, rcAccessing, rcSelf, rcNull);
-
-    if (func == NULL)
-        return RC (rcKrypto, rcCipher, rcAccessing, rcParam, rcNull);
-
-    switch (self->vt.version->maj)
-    {
-    case 1:
-        return self->vt.v1->set_encrypt_ctr_func (self, func);
-    }
-    return RC (rcKrypto, rcCipher, rcUpdating, rcInterface, rcBadVersion);
-}
-
-
-/* ----------------------------------------------------------------------
- * 
- *   
- */
-KRYPTO_EXTERN rc_t CC KCipherSetDecryptCtrFunc (KCipher * self, cipher_ctr_func func)
-{
-    if (self == NULL)
-        return RC (rcKrypto, rcCipher, rcAccessing, rcSelf, rcNull);
-
-    if (func == NULL)
-        return RC (rcKrypto, rcCipher, rcAccessing, rcParam, rcNull);
-
-    switch (self->vt.version->maj)
-    {
-    case 1:
-        return self->vt.v1->set_decrypt_ctr_func (self, func);
-    }
-    return RC (rcKrypto, rcCipher, rcUpdating, rcInterface, rcBadVersion);
-}
-
-
-KRYPTO_EXTERN rc_t CC KCipherEncrypt (KCipher * self, const void * in, void * out)
-{
-    if (self == NULL)
-        return RC (rcKrypto, rcCipher, rcEncoding, rcSelf, rcNull);
-
-    if ((in == NULL) || (out == NULL))
-        return RC (rcKrypto, rcCipher, rcEncoding, rcParam, rcNull);
-
-    switch (self->vt.version->maj)
-    {
-    case 1:
-        return self->vt.v1->encrypt (self, in, out);
-    }
-    return RC (rcKrypto, rcCipher, rcAccessing, rcInterface, rcBadVersion);
-}
-
-
-KRYPTO_EXTERN rc_t CC KCipherDecrypt (KCipher * self, const void * in, void * out)
-{
-    if (self == NULL)
-        return RC (rcKrypto, rcCipher, rcEncoding, rcSelf, rcNull);
-
-    if ((in == NULL) || (out == NULL))
-        return RC (rcKrypto, rcCipher, rcEncoding, rcParam, rcNull);
-
-    switch (self->vt.version->maj)
-    {
-    case 1:
-        return self->vt.v1->decrypt (self, in, out);
-    }
-    return RC (rcKrypto, rcCipher, rcAccessing, rcInterface, rcBadVersion);
-}
-
-
-/* ====================
- * longer runs of multiple blocks.
- *
- * The algorithms are well defined and standard in most cases
- *
- * These aremore or elss equivalent to class functions as they do not depend upon
- * the operation of the cipher and the algorithms are independent of anything about
- * the cipher other than its block size.
- *
- * PT: plain text block
- * CT: cipher text block
- * EK: encryption key
- * DK: decryption key (might be sthe same as EK)
- * ENC: encrypt cipher function on a block using a key
- * DEC: decrypt cipher function on a block using a key
- * IV: initialization vector - used as feedback for chaining
- * N:  number used once (nonce)
- * FB: feedback is the next IV in a chained/feedback mode
- */
-
-/* -----
- * NOTE:
- * 'in' can be the same as 'out' but other overlaps are dangers as a block at a
- * time is written. The code does not look for overlaps at this point.
- *
- * NOTE: currently an implementation detail limits us to 8192 bit cipher block
- * size.  Changing MAX_BLOCK_SIZE in cipher.c can up that limit without 
- * causing any other compatibility issues. 
- *
- * Two local byte arrays are defined on the stack of 1024 bytes or 8192 bits.
- */
-/*
- * NOTE: if in and out overlap incorrectly this will fail
- */
-#define BLOCK_FUNC_PASTE(A,B) A##B
-#define BLOCK_FUNC(MODE,METHOD) \
-    KRYPTO_EXTERN rc_t CC BLOCK_FUNC_PASTE(KCipher,MODE)                \
-        (KCipher * self, const void * in, void * out,                   \
-         uint32_t block_count)                                          \
-    {                                                                   \
-        rc_t rc;                                                        \
-                                                                        \
-        if (self == NULL)                                               \
-            rc = RC (rcKrypto, rcCipher, rcEncoding, rcSelf, rcNull);   \
-                                                                        \
-        else if (in == NULL)                                            \
-            rc = RC (rcKrypto, rcCipher, rcEncoding, rcParam, rcNull);  \
-                                                                        \
-        else if (out == NULL)                                           \
-            rc = RC (rcKrypto, rcCipher, rcEncoding, rcParam, rcNull);  \
-                                                                        \
-        else if (block_count == 0)                                      \
-            rc = 0;                                                     \
-                                                                        \
-        else                                                            \
-        {                                                               \
-            switch (self->vt.version->maj)                              \
-            {                                                           \
-            case 1:                                                     \
-                return self->vt.v1->METHOD(self, in, out, block_count); \
-            }                                                           \
-            rc = RC (rcKrypto, rcCipher, rcAccessing, rcInterface,      \
-                     rcBadVersion);                                     \
-        }                                                               \
-                                                                        \
-        return rc;                                                      \
-    }
-
-/* ----------
- * Electronic Code Book - simple cipher with no chaining feedback  just iterate
- * simple encrypt/decrypt with the plain, text, cipher text and key/
- *
- * CT = ENC (PT,EK)
- * PT = DEC (CT,DK)
- */
-BLOCK_FUNC(EncryptECB,encrypt_ecb)
-BLOCK_FUNC(DecryptECB,decrypt_ecb)
-
-/* ----------
- * Cipher-Block Chaining
- * CT = (FB = ENC (PT^IV, EK))
- * PT = DEC ((FB = CT), DK)
- */
-BLOCK_FUNC(EncryptCBC,encrypt_cbc)
-BLOCK_FUNC(DecryptCBC,decrypt_cbc)
-
-/* ----------
- * Propagating cipher-block chaining
- * FB = PT ^ (CT = ENC ((PT^IV), EK))
- * FB = CT ^ (PT = DEC (CT,DK) ^ IV)
- */
-BLOCK_FUNC(EncryptPCBC,encrypt_pcbc)
-BLOCK_FUNC(DecryptPCBC,decrypt_pcbc)
-
-/* ----------
- * Cipher Feedback
- * CT = (FB = PT) ^ ENC (IV, EK))
- * PT = (FB = CT) ^ DEC (IV, DK)
- */
-BLOCK_FUNC(EncryptCFB,encrypt_cfb)
-BLOCK_FUNC(DecryptCFB,decrypt_cfb)
-
-/* ----------
- * Output Feedback
- * CT = PT ^ (FB = ENC (IV, EK))
- * PT = CT ^ (FB = DEC (IV, DK))
- */
-BLOCK_FUNC(EncryptOFB,encrypt_ofb)
-BLOCK_FUNC(DecryptOFB,decrypt_ofb)
-
-/* Counter
- * IV is a nonce and not re-used as FB
- * CT = PT ^ ENC (N, EK)
- * PT = CT ^ ENC (N, DK) 
- *
- * The enc_ctr_func (or dec_ctr_func) will be called to update the ivec before
- * to be the nonce (number used once) before each call to the block cipher 
- * encrypt function.  The encrypt function is used for decryption mode as well
- */
-BLOCK_FUNC(EncryptCTR,encrypt_ctr)
-BLOCK_FUNC(DecryptCTR,decrypt_ctr)
-
-
-#ifndef USE_SLOW_ONES
-#define USE_SLOW_ONES _DEBUGGING
-#endif
-
-#include <stdio.h>
-rc_t KCipherMakeInt (KCipher ** new_cipher, kcipher_type type)
-{
-    rc_t rc;
-
-    *new_cipher = NULL;
-
-#ifndef WIN32
-    rc = KCipherVecAesNiMake (new_cipher, type);
-    /*printf("KCipherVecAesNiMake %s (%u) \n", rc ? "FAILED" : "succeeded", rc);*/
-    if (rc)
-    {
-        if (GetRCState(rc) == rcUnsupported)
-        {
-#if USE_SLOW_ONES
-            rc = KCipherVecRegMake (new_cipher, type);
-            /*printf("KCipherVecRegMake %s (%u) \n", rc ? "FAILED" : "succeeded", rc);*/
-            if (rc)
-            {
-                if (GetRCState(rc) == rcUnsupported)
-                {
-                    rc = KCipherVecMake (new_cipher, type);
-                    /*printf("KCipherVecMake %s (%u) \n", rc ? "FAILED" : "succeeded", rc);*/
-                    if (GetRCState(rc) == rcUnsupported)
-                    {
-#endif
-#endif
-                        rc = KCipherByteMake (new_cipher, type);
-                        /*printf("KCipherByteMake %s (%u) \n", rc ? "FAILED" : "succeeded", rc);*/
-#ifndef WIN32
-#if USE_SLOW_ONES
-                    }
-                }
-            }
-#endif
-        }
-    }
-#endif
-    return rc;
-}
-
-kcipher_subtype KCipherSubType = ksubcipher_none;
-
-rc_t KCipherMake (KCipher ** new_cipher, kcipher_type type)
-{
-    rc_t rc;
-    if (new_cipher == NULL)
-        rc = RC (rcKrypto, rcCipher, rcConstructing, rcSelf, rcNull);
-
-    else
-    {
-        switch (type)
-        {
-        case kcipher_null:
-        case kcipher_AES:
-            switch (KCipherSubType)
-            {
-            case ksubcipher_byte:
-                rc = KCipherByteMake (new_cipher, type);
-                break;
-#ifdef USEVEC
-            case ksubcipher_vec:
-                rc = KCipherVecMake (new_cipher, type);
-                break;
-#endif
-#ifdef USEVECREG
-            case ksubcipher_vecreg:
-                rc = KCipherVecRegMake (new_cipher, type);
-                break;
-#endif
-#ifdef USEAESNI
-            case ksubcipher_accelerated:
-                rc = KCipherVecAesNiMake (new_cipher, type);
-                break;
-#endif
-            default:
-                rc = KCipherMakeInt (new_cipher, type);
-                break;
-            }
-            break;
-        default:
-            rc = RC (rcKrypto, rcCipher, rcConstructing, rcBlockCipher, rcInvalid);
-            break;
-        }
-    }
-    return rc;
-}
-
-
-
-
-
-
-/* EOF */
diff --git a/libs/krypto/ciphermgr.c b/libs/krypto/ciphermgr.c
deleted file mode 100644
index f038259..0000000
--- a/libs/krypto/ciphermgr.c
+++ /dev/null
@@ -1,295 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define USE_AES_NI false
-
-#include <krypto/extern.h>
-#include <krypto/ciphermgr.h>
-#include <krypto/cipher.h>
-
-#include "cipher-priv.h"
-
-#include <kproc/lock.h>
-
-#include <klib/rc.h>
-#include <klib/refcount.h>
-#include <klib/debug.h>
-
-#include <sysalloc.h>
-
-#include <atomic.h>
-
-#include <stdlib.h>
-#include <assert.h>
-
-#ifdef _DEBUGGING
-#define MGR_DEBUG(msg) DBGMSG(DBG_KFS,DBG_FLAG(DBG_KFS_MGR), msg)
-#else
-#define MGR_DEBUG(msg)
-#endif
-
-
-
-static const char kciphermanager_classname [] = "KCipherManager";
-
-
-/*--------------------------------------------------------------------------
- * KCipherManager
- */
-/* currently expected to be a singleton and not use a vtable but
- * be fully fleshed out here */
-static atomic_ptr_t singleton;
-/*static KCipherManager * singleton = NULL;*/
-
-struct KCipherManager
-{
-    KRefcount refcount;
-
-    KLock * lock;
-
-};
-
-
-static
-rc_t KCipherManagerAlloc (KCipherManager ** ppobj)
-{
-    KCipherManager * pobj;
-
-    assert (ppobj);
-
-    pobj = calloc (sizeof *pobj, 1);
-    if (pobj)
-    {
-        *ppobj = pobj;
-        return 0;
-    }
-
-    *ppobj = NULL;
-    return RC (rcKrypto, rcMgr, rcConstructing, rcMemory, rcExhausted);
-}
-
-
-static
-rc_t KCipherManagerInit (KCipherManager * self)
-{
-    rc_t rc;
-
-    rc = KLockMake (&self->lock);
-    if (rc == 0)
-    {
-        KRefcountInit (&self->refcount, 1, kciphermanager_classname, "init",
-                       "singleton");
-    }
-
-    return rc;
-}
-
-
-/* Destroy
- *  destroy
- */
-LIB_EXPORT rc_t CC KCipherManagerDestroy ( KCipherManager *self )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC ( rcKrypto, rcMgr, rcDestroying, rcSelf, rcNull );
-    else
-    {
-        if (self == singleton . ptr)
-        {
-            KCipherManager * reread;
-
-            reread = atomic_test_and_set_ptr (&singleton, NULL, self);
-
-            /* ignore results: just going for guaranteed atomicity though might not need it */
-            ( void ) reread;
-        }
-
-        /* no return value */
-        KRefcountWhack (&self->refcount, kciphermanager_classname);
-
-        rc = KLockRelease (self->lock);
-
-        free (self);
-    }
-    return rc;
-}
-
-
-/* AddRef
- *  creates a new reference
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KCipherManagerAddRef ( const KCipherManager *self )
-{
-    if (self != NULL)
-    {
-        switch (KRefcountAdd (&self->refcount, kciphermanager_classname))
-        {
-        case krefOkay:
-            break;
-        case krefZero:
-            return RC (rcFS, rcMgr, rcAttaching, rcRefcount, rcIncorrect);
-        case krefLimit:
-            return RC (rcFS, rcMgr, rcAttaching, rcRefcount, rcExhausted);
-        case krefNegative:
-            return RC (rcFS, rcMgr, rcAttaching, rcRefcount, rcInvalid);
-        default:
-            return RC (rcFS, rcMgr, rcAttaching, rcRefcount, rcUnknown);
-        }
-    }
-    return 0;
-}
-
-
-/* Release
- *  discard reference to manager
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC KCipherManagerRelease ( const KCipherManager *self )
-{
-    rc_t rc = 0;
-    if (self != NULL)
-    {
-        switch (KRefcountDrop (&self->refcount, kciphermanager_classname))
-        {
-        case krefOkay:
-        case krefZero:
-            break;
-        case krefWhack:
-            rc = KCipherManagerDestroy ((KCipherManager*)self);
-            break;
-        case krefNegative:
-            return RC (rcFS, rcMgr, rcAttaching, rcRefcount, rcInvalid);
-        default:
-            rc = RC (rcFS, rcMgr, rcAttaching, rcRefcount, rcUnknown);
-            break;            
-        }
-    }
-    return rc;
-}
-
-
-/* Make
- *  we have a shared singleton for the cipher manager
- *  first call actually makes the managerblo
- *  subsequent calls get added references
- */
-LIB_EXPORT rc_t CC KCipherManagerMake (KCipherManager ** mgr)
-{
-    rc_t rc = 0;
-
-    if (mgr == NULL)
-        return RC (rcKrypto, rcMgr, rcConstructing, rcSelf, rcNull);
-
-    *mgr = NULL;
-
-make_race_retry:
-
-    if (singleton . ptr)
-    {
-        rc = KCipherManagerAddRef (singleton.ptr);
-        if (rc == 0)
-        {
-            *mgr = singleton . ptr;
-            return 0;
-        }
-    }
-    else
-    {
-        KCipherManager * self;
-
-        rc = KCipherManagerAlloc (&self);
-        if (rc == 0)
-        {
-            rc = KCipherManagerInit (self);
-            if (rc == 0)
-            {
-                KCipherManager * reread;
-
-                reread = atomic_test_and_set_ptr (&singleton, self, NULL);
-
-                if (reread)
-                {
-                    KCipherManagerDestroy (self);
-                    goto make_race_retry;
-                }
-
-                *mgr = self;
-                return 0;
-            }
-            else
-            {
-                KCipherManagerDestroy (self);
-            }
-        }
-    }
-    return rc;
-}
-
-
-static __inline__
-rc_t KCipherManagerMakeCipherInt (const KCipherManager *self,
-                                  KCipher ** pcipher,
-                                  kcipher_type type)
-{
-    KCipher * pc;
-    rc_t rc;
-
-    assert (self);
-    assert (pcipher);
-
-    rc = KCipherMake (&pc, type);
-
-    *pcipher = rc ? NULL : pc;
-
-    return rc;
-}
-
-
-LIB_EXPORT
-rc_t CC KCipherManagerMakeCipher (const KCipherManager * self,
-                                  struct KCipher ** pcipher,
-                                  kcipher_type type)
-{
-    rc_t rc;
-    
-    if (self == NULL)
-        return RC (rcKrypto, rcMgr, rcConstructing, rcSelf, rcNull);
-
-    if (pcipher == NULL)
-        return RC (rcKrypto, rcMgr, rcConstructing, rcParam, rcNull);
-
-    *pcipher = NULL;
-
-    rc = KCipherManagerMakeCipherInt (self, pcipher, type);
-
-    return rc;
-}
-
-
-
diff --git a/libs/krypto/ciphertest.c b/libs/krypto/ciphertest.c
deleted file mode 100644
index 2faca1d..0000000
--- a/libs/krypto/ciphertest.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-#include <krypto/extern.h>
-#include <klib/defs.h>
-
-#include <krypto/cipher.h>
-#include "cipher-priv.h"
-
-#include <klib/rc.h>
-
-
-rc_t KCipherMakeSub (KCipher ** new_cipher, kcipher_type type, uint32_t subtype)
-{
-    rc_t rc;
-
-    if (new_cipher == NULL)
-        rc = RC (rcKrypto, rcCipher, rcConstructing, rcSelf, rcNull);
-
-    else
-    {
-        switch (type)
-        {
-        case kcipher_AES:
-            switch (subtype)
-            {
-            default:
-                rc = RC (rcKrypto, rcCipher, rcConstructing, rcBlockCipher, rcInvalid);
-                break;
-
-            case kcipher_AES_core:
-                rc = KCipherByteMake (new_cipher, type);
-                break;
-
-            case kcipher_AES_ncbi_sim:
-                rc = KCipherVecSimMake (new_cipher, type);
-                break;
-
-            case kcipher_AES_ncbi_vec:
-                rc = KCipherVecRegMake (new_cipher, type);
-                break;
-
-            case kcipher_AES_ncbi_ni:
-                rc = KCipherVecAesNiMake (new_cipher, type);
-                break;
-            }
-            break;
-        default:
-            rc = RC (rcKrypto, rcCipher, rcConstructing, rcBlockCipher, rcInvalid);
-            break;
-        }
-    }
-    return rc;
-}
-
-
-
-
-/* EOF */
diff --git a/libs/krypto/compile-test.c b/libs/krypto/compile-test.c
deleted file mode 100644
index 1d3de7a..0000000
--- a/libs/krypto/compile-test.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-
-#include <cpuid.h>
-#include <v128.h>
-
-#include "ncbi-priv.h"
-#include "blockcipher-impl.h"
-
-
-
-const
-CipherVec CMEMBER(test) (void)
-{
-#if USEVEC
-    CipherVec zero  =  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
-    CipherVec one   =  { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-                         0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 };
-#else
-    CipherVec zero  =  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
-    CipherVec one   =  { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-                         0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 };
-#endif
-    return zero + one;
-}
diff --git a/libs/krypto/csprng.c b/libs/krypto/csprng.c
deleted file mode 100644
index 4ee747b..0000000
--- a/libs/krypto/csprng.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-#include <krypto/extern.h>
-
-#include <krypto/rng.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/refcount.h>
-
-#include <sysalloc.h>
-
-#include <openssl/rand.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <assert.h>
-
-typedef KRng KCSPRng;
-
-#define KRNG_IMPL KCSPRng
-#include <krypto/rng-impl.h>
-
-
-
-static
-rc_t CC KCSPRngDestroy (KCSPRng * self)
-{
-    free (self);
-    return 0;
-}
-
-static
-rc_t CC KCSPRngSeed (KRng * self)
-{
-    rc_t rc;
-    uint8_t buff [16];
-
-    if (self == NULL)
-        return RC (rcKrypto, rcRng, rcWriting, rcSelf, rcNull);
-
-    /* get some system entropy */
-    rc = KRngSysEntropy (self, buff, sizeof (buff));
-    if (rc)
-        return rc;
-
-    RAND_seed (buff, sizeof (buff));
-
-    return 0;
-}
-
-static
-rc_t CC KCSPRngReseed (KRng * self, const void * buffer_, 
-                       size_t buff_size)
-{
-    const char * buffer;
-    rc_t rc;
-    int32_t ix;
-    uint8_t buff [256];
-
-    if (self == NULL)
-        return RC (rcKrypto, rcRng, rcUpdating, rcSelf, rcNull);
-
-    if (((buffer = buffer_) == NULL) && (buff_size != 0))
-        return RC (rcKrypto, rcRng, rcUpdating, rcParam, rcNull);
-
-    rc = KRngSysEntropy (self, buff, 16);
-    if (rc)
-        return rc;
-
-    if (buffer)
-        for (ix = (buff_size + sizeof (buff) - 1)/sizeof (buff);
-             ix > 0; 
-             (ix -= sizeof (buff)),
-                 (buff_size -= sizeof(buff)),
-                 (buffer += sizeof (buff)))
-        {
-            int32_t jx = (buff_size>sizeof (buff))?sizeof(buff):buff_size;
-            while (--jx > 0)
-                buff[jx] ^= buffer[jx];
-        }
-
-    RAND_add (buffer, buff_size, 1); /* what is that entropy supposed to do? */
-
-    return 0;
-}
-
-static
-rc_t CC KCSPRngRead (const KCSPRng * self, void * buffer, uint32_t bsize, uint32_t * num_read)
-{
-    int ret;
-
-    ret = RAND_bytes (buffer, bsize);
-    if (ret == -1)
-    {
-        *num_read = 0;
-        return RC (rcKrypto, rcRng, rcReading, rcSelf, rcInsufficient);
-    }
-    *num_read = bsize;
-    return 0;
-}
-
-static const
-KRng_vt_v1 vt = 
-{
-    1, 0,
-
-    /* start minor version == 0 */
-    KCSPRngDestroy,
-    KCSPRngSeed,
-    KCSPRngReseed,
-    KCSPRngRead
-    /* end minor version == 0 */
-};
-    
-LIB_EXPORT rc_t CC KCSPRngMake (KRng ** pself)
-{
-    KCSPRng * self;
-    rc_t rc;
-
-    if (pself == NULL)
-        return RC (rcRuntime, 0, rcConstructing, rcSelf, rcNull);
-    else
-    {
-        *pself = NULL;
-
-        self = malloc (sizeof (*self));
-        if (self == NULL)
-            return RC (rcRuntime, 0, rcConstructing, rcMemory, rcExhausted);
-
-        else
-        {
-            rc = KRngInit (self, (union KRng_vt*)&vt, "KCSPRng");
-            *pself = self;
-            return 0;
-        }
-    }
-    return rc;
-}
diff --git a/libs/krypto/encfile-priv.h b/libs/krypto/encfile-priv.h
deleted file mode 100644
index 5221226..0000000
--- a/libs/krypto/encfile-priv.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-#ifndef _h_krypto_encfile_priv_libs_
-#define _h_krypto_encfile_priv_libs_
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/* ----------------------------------------------------------------------
- * Offset conversions between encrypted file offset, decrypted file offset
- * and block ID and block offset
- */
-
-/* BlockId_to_CiphertextOffset
- *  converts zero-based block id to byte offset into ciphertext
- */
-static __inline__
-uint64_t BlockId_to_CiphertextOffset ( uint64_t block_id )
-{
-    return ( sizeof ( KEncFileHeader ) + block_id * sizeof ( KEncFileBlock ) );
-}
-
-/* BlockId_to_DecryptedPos
- *  converts zero-based block id to byte offset into plaintext
- */
-static __inline__
-uint64_t BlockId_to_PlaintextOffset ( uint64_t block_id )
-{
-    return block_id * sizeof ( KEncFileData );
-}
-
-/* PlaintextOffset_to_BlockId
- *  converts from byte offset into plaintext to a zero-based block id
- *  NB - will FAIL ( horribly ) if used with a plaintext SIZE
- */
-static __inline__
-uint64_t PlaintextOffset_to_BlockId ( uint64_t pt_offset, uint32_t * poffset )
-{
-    uint64_t block_id = pt_offset / sizeof ( KEncFileData );
-
-    if ( poffset != NULL )
-        * poffset = ( uint32_t ) ( pt_offset - BlockId_to_PlaintextOffset ( block_id ) );
-
-    return block_id;
-}
-
-static __inline__
-uint64_t PlaintextSize_to_BlockCount ( uint64_t pt_size, uint32_t * padding )
-{
-    uint64_t block_count = ( pt_size + sizeof ( KEncFileData ) - 1 ) / sizeof ( KEncFileData );
-
-    if ( padding != NULL )
-        * padding = ( uint32_t ) ( BlockId_to_PlaintextOffset ( block_count ) - pt_size );
-
-    return block_count;
-}
-
-static __inline__
-uint64_t EncryptedPos_to_BlockId (uint64_t enc_offset, uint32_t * poffset,
-                                     bool * in_block)
-{
-    uint64_t block_id;
-
-    if (enc_offset < sizeof (KEncFileHeader))
-    {
-        if (poffset)
-            *poffset = 0;
-        if (in_block)
-            *in_block = false;
-        block_id = 0;
-    }
-    else
-    {
-        uint64_t offset;
-
-        enc_offset -= sizeof (KEncFileHeader);
-        block_id = enc_offset / sizeof (KEncFileBlock);
-        offset = enc_offset % sizeof (KEncFileBlock);
-
-        if (offset <= sizeof(KEncFileKey))
-        {
-            if (poffset)
-                *poffset = 0;
-            if (in_block)
-                *in_block = false;
-        }
-        else
-        {
-            offset -= sizeof(KEncFileKey);
-
-            if (offset >= sizeof(KEncFileData))
-            {
-                if (poffset)
-                    *poffset = 0;
-                if (in_block)
-                    *in_block = false;
-            }
-            else
-            {
-                if (poffset)
-                    *poffset = (uint32_t)offset;
-                if (in_block)
-                    *in_block = true;
-            }
-        }
-    }
-    return block_id;
-}
-
-struct KFile;
-struct KKey;
-
-KRYPTO_EXTERN rc_t CC KEncFileWriteHeader (struct KFile * self);
-KRYPTO_EXTERN rc_t CC KEncFileWriteHeader_v1 (struct KFile * self);
-KRYPTO_EXTERN rc_t CC KEncFileWriteHeader_v2 (struct KFile * self);
-KRYPTO_EXTERN rc_t CC KEncFileMakeWriteBlock (struct KFile ** pself, 
-                                              struct KFile * encrypted,
-                                              const struct KKey * key);
-
-KRYPTO_EXTERN rc_t CC KEncFileMakeBlock_v2 (struct KFile ** pself,
-                                         struct KFile * encrypted,
-                                         const struct KKey * key);
-
-
-#if 0
-#if USE_UPDATE_V1
-#define KEncFileWriteHeader KEncFileWriteHeader_v1
-#else
-#define KEncFileWriteHeader KEncFileWriteHeader_v2
-#endif
-#endif
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif /* #ifndef _h_krypto_encfile_priv_libs_ */
-
-
diff --git a/libs/krypto/encfile.c b/libs/krypto/encfile.c
deleted file mode 100644
index e5b12d9..0000000
--- a/libs/krypto/encfile.c
+++ /dev/null
@@ -1,2019 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-#include <krypto/extern.h>
-#include <krypto/encfile.h>
-#include <krypto/encfile-priv.h>
-#include <krypto/key.h>
-#include <krypto/ciphermgr.h>
-#include <krypto/cipher.h>
-#include "aes-priv.h"
-#include "encfile-priv.h"
-
-#include <klib/rc.h>
-#include <klib/checksum.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/debug.h>
-#include <klib/vector.h>
-#include <klib/status.h>
-#include <kfs/file.h>
-
-#include <sysalloc.h>
-
-#include <byteswap.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-#include <klib/out.h>
-
-#define USE_READ_V1     false
-#define USE_WRITE_V1    false
-#define USE_UPDATE_V1   false
-#define USE_BLOCK_V1    false
-/* KReencFile and KEncryptFile need to use update v1 as it is different */
-#define USE_VALIDATE_V1 false
-#define USE_ISENC_V1    false
-
-#define ENABLE_V2 true
-
-
-/* ----------------------------------------------------------------------
- * KEncFileV1
- *   Base object class for the encryption, decryption and validation of
- *   the file format defined above
- */
-typedef struct KEncFileV1  KEncFileV1;
-#define KFILE_IMPL struct KEncFileV1
-#include <kfs/impl.h>
-
-
-#include "encfile-priv.h"
-
-/* ----------
- * BufferCalcMD5
- *    Generate the MD5 digest for a buffer
- */
-static
-void BufferCalcMD5 (const void * buffer, size_t size, uint8_t digest [16])
-{
-    MD5State state;
-
-    assert (buffer);
-    assert (size);
-    assert (digest);
-
-    MD5StateInit (&state);
-    MD5StateAppend (&state, buffer, size);
-    MD5StateFinish (&state, digest);
-}
-
-
-typedef struct KEncFileCiphers KEncFileCiphers;
-struct KEncFileCiphers
-{
-    KCipher * master;
-    KCipher * block;
-};
-
-typedef uint8_t KEncFileIVec [16];
-/* -----
- */
-struct KEncFileV1
-{
-    KFile dad;                  /* base class */
-    KFile * encrypted;          /* encrypted file as a KFile */
-    KEncFileCiphers ciphers;
-    KEncFileBlock block;        /* */
-    uint64_t encrypted_max;     /* highest read/written point in the encrypted file */
-    KEncFileFooter foot;        /* contains rcrchecksum and blockcount */
-#if ENABLE_V2
-    KEncFileVersion version;
-#endif
-    bool dirty;                 /* data written but not flushed */
-    bool bswap;
-    bool eof;
-    bool seekable;
-    bool written;
-    bool swarm;
-};
-
-
-/* ----------------------------------------------------------------------
- * Buffer - just some part of the encrypted file read or written
- *
- *   these functions exist to hide the potential multiple calls needed
- *   if the KFileRead or KFileWrite called on the encrypted file break up
- *   the requested amount into partial reads or writes
- */
-
-/* ----------
- * BufferRead
- *    Fill a buffer with a requested number of bytes from the encrypted file.  
- *    Read either the requested number of bytes or up through EOF.
- *    The caller has to handle an EOF shorted buffer.
- */
-static
-rc_t KEncFileV1BufferRead (const KEncFileV1 * cself, uint64_t pos, void * buffer,
-                         size_t bsize, size_t * pnum_read)
-{
-    KEncFileV1 * self;   /* for mutable fields */
-    rc_t rc;
-
-    assert (cself);
-    assert (buffer);
-    assert (pnum_read);
-
-    *pnum_read = 0;
-
-    self = (KEncFileV1*)cself; /* to hit mutable fields */
-
-    /* we want to read a full requested size if possible so keep trying if we
-     * haven't read enough yet. 
-     * We can quit early only if EOF (i.e. read 0 bytes.
-     */
-    rc = KFileReadAll (self->encrypted, pos, buffer, bsize, pnum_read);
-    if (rc)
-        PLOGERR (klogErr,
-                 (klogErr, rc,
-                  "error reading position '$(P)' in encrypted file",
-                  "P=%lu", pos));
-
-    else if (self->encrypted_max < pos)
-        self->encrypted_max = pos;
-            
-    return rc;
-}
-
-
-/* ----------
- * BufferWrite
- *    Write a buffer of requested size out to the encrypted file.
- *    return the number of bytes successfully written
- */
-static
-rc_t KEncFileV1BufferWrite (KEncFileV1 * self, uint64_t pos, const void * buffer,
-                          size_t bsize, size_t * pnum_writ)
-{
-    rc_t rc;
-
-    rc =  KFileWriteAll (self->encrypted, pos, buffer, bsize, pnum_writ);
-    if ((rc == 0) && (self->encrypted_max < pos))
-        self->encrypted_max = pos;
-
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * operations on KEncFileHeader
- *
- * The header only needs to be read and validated or written  we need not 
- * reatian within the KEncFile object any information about the header in
- * the initial version of this file format.
- */
-
-/* -----
- * the first eight bytes of the file are two four byte strings
- *  The first is a common "NCBI"
- *  The second is the format specific "nenc"
- */
-static const KEncFileSig KEncFileSignature = "NCBInenc";
-
-/* -----
- * the common constant used throughout the project to check the byte order 
- * as written by the system which created the file
- */
-/* enum fails to handle these due to integer overflow */
-
-#define eByteOrderTag     (0x05031988)
-#define eByteOrderReverse (0x88190305)
-
-/* ----
- * Not unexpectedly the first version of this file will be "1"
- */
-#if ENABLE_V2
-
-#define eCurrentVersion (0x00000002)
-#define eCurrentVersionReverse (0x02000000)
-
-static
-const KEncFileHeader const_header_v1
-= { "NCBInenc", eByteOrderTag, 0x00000001 };
-
-static
-const KEncFileHeader const_bswap_header_v1
-= { "NCBInenc", eByteOrderReverse, 0x01000000 };
-    
-#else
-
-#define eCurrentVersion (0x00000001)
-#define eCurrentVersionReverse (0x01000000)
-
-#endif
-    
-static
-const KEncFileHeader const_header
-= { "NCBInenc", eByteOrderTag, eCurrentVersion };
-
-static
-const KEncFileHeader const_bswap_header
-= { "NCBInenc", eByteOrderReverse, eCurrentVersionReverse };
-
-
-/* ----------
- * HeaderRead
- *    Read the header of an encrypted file and validate it.
- */
-static
-rc_t KEncFileV1HeaderRead (KEncFileV1 * self)
-{
-    KEncFileHeader header;
-    size_t num_read;
-    rc_t rc;
-
-    assert (self);
-
-    rc = KEncFileV1BufferRead (self, 0, &header, sizeof (header), &num_read);
-    if (rc)
-        return rc;
-
-    if (num_read != sizeof (header))
-    {
-        rc = RC (rcFS, rcFile, rcConstructing, rcHeader, rcTooShort);
-        PLOGERR (klogErr,
-                 (klogErr, rc, "error reading full header of encrypted "
-                  "file  wanted '$(S)' got '$(N); bytes read", "S=%u,N=%u",
-                  sizeof (header), num_read));
-        return rc;
-    }
-
-    /* expected is encrypted on a system of the same endianess */
-    if (memcmp (&header, &const_header, sizeof (header)) == 0)
-    {
-        self->bswap = false;
-#if ENABLE_V2
-        self->version = eCurrentVersion;
-#endif
-        return 0;
-    }
-
-    /* next most likely is encrypted on a machine of opposite endianess */
-    if (memcmp (&header, &const_bswap_header, sizeof (header)) == 0)
-    {
-        self->bswap = true;
-#if ENABLE_V2
-        self->version = eCurrentVersion;
-#endif
-        return 0;
-    }
-
-#if ENABLE_V2
-    if (memcmp (&header, &const_header_v1, sizeof (header)) == 0)
-    {
-        self->bswap = false;
-        self->version = 1;
-        return 0;
-    }
-
-    /* next most likely is encrypted on a machine of opposite endianess */
-    if (memcmp (&header, &const_bswap_header_v1, sizeof (header)) == 0)
-    {
-        self->bswap = true;
-        self->version = 1;
-        return 0;
-    }
-#endif
-
-    /* okay it's a "bad" header, so figure out why */
-    if (memcmp (&header, &const_header, sizeof (header.file_sig)) != 0)
-    {
-        rc = RC (rcKrypto, rcFile, rcReading, rcHeader, rcInvalid);
-        LOGERR (klogErr, rc, "file is not the NCBI encrypted file format");
-        /* if this fails the rest doesn't matter */
-        return rc;
-    }
-
-    switch (header.byte_order)
-    {
-    default:
-        rc = RC (rcFS, rcFile, rcConstructing, rcByteOrder, rcInvalid);
-        PLOGERR (klogErr, 
-                 (klogErr, rc, "invalid byte order flag '$(F); in "
-                  "encrypted file", "F=%X", header.byte_order));
-        /* we don't return to possibly log other version errors */
-        break;
-    case eByteOrderReverse:
-    case eByteOrderTag:
-        break;
-    }
-
-    switch (header.version)
-    {
-    default:
-        rc = RC (rcFS, rcFile, rcConstructing, rcHeader, rcBadVersion);
-        PLOGERR (klogErr, 
-                 (klogErr, rc, "can not decrypt version '$(V)'",
-                  "V=%u", header.version));
-        break;
-
-    case 1:
-#if ENABLE_V2
-    case 2:
-#endif
-        break;
-    }
-    return rc;
-}
-
-
-/* -----
- * HeaderWrite
- *
- * build a ram copy of the header and write it to the file
- */
-static
-rc_t KEncFileV1HeaderWrite (KEncFileV1 * self)
-{
-    size_t num_writ;
-    rc_t rc;
-
-    rc = KEncFileV1BufferWrite (self, 0, &const_header, sizeof (const_header),
-                              &num_writ);
-    if (rc == 0)
-    {
-        if (num_writ != sizeof (const_header))
-            rc = RC (rcFS, rcFile, rcWriting, rcHeader, rcInsufficient);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KEncFileV1WriteHeader_v1  (KFile * self)
-{
-    if (self == NULL)
-        return RC (rcKrypto, rcFile, rcWriting, rcSelf, rcNull);
-    return KEncFileV1HeaderWrite ((KEncFileV1*)self);
-}
-
-
-/* ----------------------------------------------------------------------
- * operations on KEncFileFooter
- */
-
-/* ----------
- * Validate
- * we expect to read a Footer when we expect a Block so we validate in RAM
- * without a Read
- *
- * we're just comparing the values in the footer against expected values
- */
-static
-rc_t KEncFileV1FooterValidate (const KEncFileV1 * self,
-                             uint64_t block_count, uint64_t crc_checksum)
-{
-    rc_t rc1 = 0, rc2 = 0;
-
-    if (self->foot.block_count != block_count)
-    {
-        rc2 = RC (rcKrypto, rcFile, rcValidating, rcFile, rcCorrupt);
-        LOGERR (klogErr, rc1, "bad block count in encrypted file footer");
-    }
-    if ((self->foot.crc_checksum != crc_checksum)
-#if ENABLE_V2
-        &&((crc_checksum != 0) || (self->version == 1))
-#endif
-        )
-    {
-        rc1 = RC (rcKrypto, rcFile, rcValidating, rcChecksum, rcCorrupt);
-        LOGERR (klogErr, rc2, "bad crc checksum in encrypted file footer");
-    }
-    return (rc1 ? rc1 : rc2);
-}
-
-
-/* ----------
- * Write
- * when we write a footer we write from the values in the object.  They
- * are stored in the same object format as the footer so its very simple
- */
-static
-rc_t KEncFileV1FooterWrite (KEncFileV1 * self)
-{
-    KEncFileFooter foot;
-    uint64_t offset;
-    size_t num_writ;
-    rc_t rc;
-
-    memcpy (&foot, &self->foot, sizeof (foot));
-    if (self->bswap)
-    {
-        foot.block_count = bswap_64 (foot.block_count);
-        foot.crc_checksum = bswap_64 (foot.crc_checksum);
-    }
-
-    offset = BlockId_to_CiphertextOffset ( self -> foot . block_count );
-
-/*     assert ((self->encrypted_max == offset) || */
-/*             (self->encrypted_max + sizeof(self->foot) == offset)); */
-
-    rc = KEncFileV1BufferWrite (self, offset, &foot, sizeof (foot),
-                              &num_writ);
-    if (rc == 0)
-    {
-        if (num_writ != sizeof (foot))
-            rc = RC (rcFS, rcFile, rcWriting, rcFile, rcInsufficient);
-    }
-    return rc;
-}
-
-
-/* ----------
- * IvecInit
- *    create the ivec for a given block
- *    done in a function to ensure decrypt and encrypt use the same code to
- *    generate this.  Anything used to create this has to be available to
- *    code that doesn't know the content of the data or the state of the file
- *    beyond the location of the block with in the file.
- *
- *    This is definitely over-kill using the MD5.
- */
-static
-void KEncFileV1IVecInit (const KEncFileV1 * self, KEncFileIVec ivec)
-{
-    BufferCalcMD5 (&self->block.id, sizeof self->block.id, ivec);
-}
-
- 
-/* ----------
- * BlockEncrypt
- */
-
-static
-rc_t KEncFileV1BlockEncrypt (KEncFileV1 * self, KEncFileBlock * e)
-{
-    SHA256State state;
-    uint64_t id;
-    uint16_t valid;
-    uint16_t saved_valid;
-    KEncFileCRC crc;
-    uint8_t ivec [16];
-    rc_t rc;
-
-    assert (self);
-    assert (e);
-
-    /*
-     * First we finish preparing the two ciphers by creating the block
-     * user key out of the first part of the data and the shared Initialization
-     * vector for Chained Block Cipher mode encryption out of the block id
-     * 
-     * create the initialization vector for this block
-     */
-    KEncFileV1IVecInit (self, ivec);
-
-    /*
-     * set the ivec for both the master and data block ciphers
-     */
-    rc = KCipherSetEncryptIVec (self->ciphers.master, ivec);
-    if (rc)
-        return rc;
-
-    rc = KCipherSetEncryptIVec (self->ciphers.block, ivec);
-    if (rc)
-        return rc;
-
-    /*
-     * create the block user key out of the first 4kb of data and the block id 
-     */
-    saved_valid = valid = self->block.u.valid;
-    id = self->block.id;
-
-    SHA256StateInit (&state);
-    SHA256StateAppend (&state, self->block.data, 
-                       valid > 4096 ? 4096 : valid);
-    SHA256StateAppend (&state, &id, sizeof (id));
-    SHA256StateFinish (&state, self->block.key);
-        
-    /*
-     * create the block key schedule out of the block user key
-     */
-    rc = KCipherSetEncryptKey (self->ciphers.block, self->block.key,
-                               sizeof self->block.key);
-    if (rc)
-        return rc;
-
-    /* 
-     * Salt the block using the randomish user key to randomly select
-     * data from the valid data.
-     *
-     * This will cover the data portion of the block past the last valid
-     * byte.
-     *
-     * NOTE we are accessing a byte array as a word array.
-     *
-     * NOTE we are using the array named data to access data beyond it's end.
-     */
-    {
-        uint16_t * pw;
-        unsigned int windex;
-        unsigned int rindex;
-        size_t bindex;
-
-        pw = (uint16_t*)self->block.key;
-        windex = 0;
-
-        for (bindex = valid;
-             bindex < sizeof self->block.data + sizeof self->block.u; 
-             ++ bindex)
-        {
-            /* this goes beyond the end of the data array by design */
-            rindex = (size_t)pw[windex];
-            rindex %= bindex;
-
-            self->block.data[bindex] = self->block.data[rindex];
-        
-            ++rindex;
-            if (rindex >= sizeof self->block.key / sizeof *pw)
-                rindex = 0;
-        }
-    }
-
-    /* 
-     * If we are modifying a block created on a system with a different default
-     * Endian choice we'll need to byte swap the block id and the block valid
-     * count
-     */
-    if (self->bswap)
-    {
-        id = bswap_64 (id);
-        valid = bswap_16 (valid);
-    }
-
-
-    if (saved_valid == sizeof self->block.data)
-        self->block.u.valid |= valid;
-    else
-        self->block.u.valid = valid;
-
-    e->id = id;
-
-    /* 
-     * encrypt the block user key into the buffer
-     */
-    rc = KCipherEncryptCBC (self->ciphers.master, self->block.key, e->key,
-                            sizeof (self->block.key) / sizeof (ivec));
-    if (rc)
-        return rc;
-
-    /*
-     * encrypt the data, offset and valid values
-     */
-    rc = KCipherEncryptCBC (self->ciphers.block, 
-                            self->block.data, e->data,
-                            (sizeof self->block.data + sizeof self->block.u) / sizeof (ivec));
-    if (rc)
-        return rc;
-
-    self->block.u.valid = saved_valid;
-
-    crc = CRC32 (0, e, (char*)(&e->crc)-(char*)e);
-
-    self->block.crc = crc;
-
-    if (self->bswap)
-    {
-        crc = bswap_32 (crc);
-    }
-    e->crc_copy = e->crc = crc;
-    
-    return 0;
-}
-
-
-/* ----------
- * BlockDecrypt
- *   decrypt decrypts the data from a KEncFileBlock into the KEncFileBlock
- *   in the KEncFile object
- */
-
-static
-rc_t KEncFileV1BlockDecrypt (KEncFileV1 * self, KEncFileBlock * e)
-{
-    uint8_t ivec [16];
-    rc_t rc;
-
-    assert (self);
-    assert (e);
-
-    /* create the initialization vector for this block */
-    KEncFileV1IVecInit (self, ivec);
-
-    /*
-     * set the ivec for both the master and data block ciphers
-     */
-    rc = KCipherSetDecryptIVec (self->ciphers.master, ivec);
-    if (rc)
-        return rc;
-
-    rc = KCipherSetDecryptIVec (self->ciphers.block, ivec);
-    if (rc)
-        return rc;
-
-    /* 
-     * decrypt the block key and initial vector using the user key and 
-     * the computer ivec
-     */
-    rc = KCipherDecryptCBC (self->ciphers.master, e->key, self->block.key,
-                            (sizeof e->key) / sizeof ivec);
-    if (rc)
-        return rc;
-
-    /* 
-     * now create the AES key for the block from the newly decrypted 
-     * block key
-     */
-    rc = KCipherSetDecryptKey (self->ciphers.block, self->block.key,
-                               sizeof self->block.key);
-    if (rc)
-        return rc;
-    rc = KCipherDecryptCBC (self->ciphers.block, e->data, 
-                            self->block.data, 
-                            (sizeof e->data + sizeof e->u) / sizeof ivec);
-    if (rc)
-        return rc;
-
-    if (self->bswap)
-    {
-        self->block.u.valid = bswap_16 (self->block.u.valid);
-/*         self->block.id = bswap_64 (self->block.id); */
-    }
-
-    /* we choose not to flag errors in decryption so don't validate these */
-    if (self->block.u.valid & 0x8000)
-        self->block.u.valid = 0x8000;
-
-    return rc;
-}
-
-
-/* ----------
- * BlockRead
- *    read a requested block from the encrypted file; 
- *    decryption is a separate step
- */
-static
-rc_t KEncFileV1BlockRead (const KEncFileV1 * cself, uint64_t block_id,
-                        KEncFileBlock * block, bool validate)
-{
-    KEncFileV1 * self;    /* mutable fields */
-    uint64_t pos;
-    uint64_t max;
-    size_t num_read;
-    rc_t rc;
-    KEncFileBlock e;
-
-    assert (cself);
-    assert (block);
-
-    self = (KEncFileV1*)cself;
-    pos = BlockId_to_CiphertextOffset ( block_id );
-
-    /* set aside the current maximum position within the encrypted file */
-    max = self->encrypted_max;
-
-    memset (&self->block, 0, sizeof self->block);
-    self->block.id = block_id;
-    self->block.u.valid = 0;
-    self->dirty = false;
-
-    rc = KEncFileV1BufferRead (self, pos, &e, sizeof e, &num_read);
-    if (rc)
-        PLOGERR (klogErr,
-                 (klogErr, rc,
-                  "error in reading block '$(BID)' from encrypted file",
-                  "BID=%lu", block_id));
-    else
-    {
-        uint32_t crc;
-
-        /* we'll judge the success of the read now on how many bytes read
-         * there are only three legitimate values:  
-         *   + size of a block 
-         *   + size of a footer
-         *   + zero meaning no footer yet
-         *
-         * This might have to change to handled streamed files where the 
-         * producer jsut hasn't finished yet
-         */
-        switch (num_read)
-        {
-        default: /* bad value means a truncated file most likely */
-            rc = RC (rcKrypto, rcFile, rcReading, rcFile, rcInsufficient);
-            PLOGERR (klogErr,
-                     (klogErr, rc, "wrong size reading block '$(B)' at '$(P)' "
-                      "from encrypted file - likely truncated", "B=%lu,P=%lu",
-                      block_id, pos));
-            break;
-
-        case sizeof e:
-            if (max <= pos) /* if we hadn't read this far do accounting */
-            {
-                if (self->bswap)
-                {
-                    e.crc = bswap_32 (e.crc);
-                    e.id = bswap_64 (e.id);
-                }
-
-                if (block_id != e.id)
-                {
-                    PLOGERR (klogErr,
-                             (klogErr,
-                              RC (rcKrypto, rcFile, rcValidating, rcIndex, rcIncorrect),
-                              "error validating id for block '$(BID)' is not $(C2)", 
-                              "BID=%lu,C2=%lu", block_id, e.id));
-                }
-
-                if (validate)
-                {
-                    crc = CRC32 (0, &e, (char*)(&e.crc)-(char*)&e);
-
-
-                    if (crc != e.crc)
-                    {
-                        PLOGERR (klogErr,
-                                 (klogErr,
-                                  RC (rcKrypto, rcFile, rcValidating, rcCrc, rcCorrupt),
-                                  "error validating crc for block '$(BID)' $(C1) is not $(C2)", 
-                                  "BID=%lu,C1=0x%X,C2=0x%X", block_id,
-                                  crc, e.crc));
-                    }
-                }
-
-                ++self->foot.block_count;
-/* Byte Endian problem! */
-                self->foot.crc_checksum += e.crc;
-            }
-            memcpy (block, &e, sizeof e);
-            self->eof = false;
-            break;
-
-        case sizeof (self->foot):
-            {
-                KEncFileFooter foot;
-                memmove (&foot, &e, sizeof foot);
-                if (self->bswap)
-                {
-                    foot.block_count = bswap_64 (foot.block_count);
-                    foot.crc_checksum = bswap_64 (foot.crc_checksum);
-                }
-                if (validate && !self->written)
-                {
-                    rc = KEncFileV1FooterValidate (self, foot.block_count,
-                                                 foot.crc_checksum);
-                    if (rc)
-                        break;
-                }
-            }
-            /* fall through */
-        case 0:
-            self->block.u.valid = 0;
-            self->block.crc = 0;
-            self->eof = true;
-            return 0;
-
-        }
-    }
-    return rc;
-}
-
-static
-rc_t KEncFileV1BlockWrite (KEncFileV1 * self)
-{
-    KEncFileBlock e;
-    uint64_t block_offset;
-    size_t num_writ;
-    rc_t rc;
- 
-    assert (self);
-
-    if (self->block.u.valid > sizeof self->block.data)
-        return RC (rcFS, rcFile, rcWriting, rcBuffer, rcCorrupt);
-
-    /* where in the file is this block */
-    block_offset = BlockId_to_CiphertextOffset ( self -> block . id );
-
-    /* if this is an update to a block take out the old crc value */
-    if (block_offset < self->encrypted_max)
-        self->foot.crc_checksum -= self->block.crc;
-
-    /* if it's not we need to add it as a new block in the count */
-    else
-        ++self->foot.block_count;
-
-    rc = KEncFileV1BlockEncrypt (self, &e);
-    if (rc)
-        return rc;
-
-/* Byte Endian problem */
-    self->foot.crc_checksum += self->block.crc;
-
-    /* now write the buffer to the encrypted file */
-    rc = KEncFileV1BufferWrite (self, block_offset, &e, sizeof e, &num_writ);
-
-    if ((rc == 0) && (num_writ != sizeof e))
-    {
-        rc = RC (rcFS, rcFile, rcWriting, rcFile, rcTooShort);
-        PLOGERR (klogErr,
-                 (klogErr, rc, "incomplete block write '$(B)' wanted"
-                  " '$(V)' got '$(N)'", "B=%lu,V=%u,N=%u",
-                  self->foot.block_count+1, self->block.u.valid, num_writ));
-    }
-    return rc;
-}
-
-
-static
-rc_t KEncFileV1BlockFlush (KEncFileV1 *self)
-{
-    rc_t rc = 0;
-
-    assert (self);
-    assert (self->block.u.valid);
-    assert (self->block.u.valid <= sizeof (self->block.data));
-
-    /* first do we need to deal with the file header? 
-     * if the encrypted file has not been written to we do */
-    if ((self->encrypted_max == 0) && (self->swarm == false))
-    {
-        rc = KEncFileV1HeaderWrite (self);
-        if (rc)
-            return rc;
-    }
-
-    if (self->dirty)
-    {
-        rc = KEncFileV1BlockWrite (self);
-        if (rc == 0)
-            self->dirty = false;
-    }
-    return rc;
-}
-
-
-/*
- * block_id - which block to read and decrypt
- * fill - if not false, we fill in zero blocks up through this block
- *
- */
-static
-rc_t KEncFileV1BlockSeek (KEncFileV1 * self, uint64_t block_id, bool fill, bool validate)
-{
-    KEncFileBlock b;
-    rc_t rc;
-
-    if (block_id != self->block.id)
-    {
-        if (self->dirty)
-        {
-            /* flush what we got */
-            rc = KEncFileV1BlockFlush (self);
-            if (rc)
-                return rc;
-        }
-
-        if (validate && (block_id > self->block.id))
-        {
-            uint64_t tid;
-
-            for (tid = self->block.id + 1; tid < block_id; ++tid)
-            {
-                if ( self -> encrypted_max > BlockId_to_CiphertextOffset ( block_id ) )
-                    continue;
-
-                memset (&b, 0, sizeof b);
-
-                rc = KEncFileV1BlockRead (self, tid, &b, validate);
-                if (rc)
-                    return rc;
-
-                if (self->eof)
-                {
-                    if (fill)
-                    {
-                        self->eof = false;
-                        memset (self->block.data, 0, sizeof (self->block.data));
-                        self->block.u.valid = sizeof (self->block.data);
-                        self->dirty = true;
-                        rc = KEncFileV1BlockFlush (self);
-                        if (rc)
-                            return rc;
-                    }
-                    else
-                        return 0;
-                }
-                /* in this loop a less than full block is end of file */
-                else if (fill)
-                {
-                    rc = KEncFileV1BlockDecrypt (self, &b);
-                    if (rc)
-                        return rc;
-
-                    if (self->block.u.valid < sizeof self->block.u.valid)
-                    {
-                        memset (self->block.data + self->block.u.valid, 0, 
-                                sizeof (self->block.data) - self->block.u.valid);
-                        self->dirty = true;
-                        rc = KEncFileV1BlockFlush (self);
-                        if (rc)
-                            return rc;
-                    }
-                    else
-                    {
-                        return 0;
-                    }
-                }
-            }
-        }
-    }
-    /* done with intervening blocks */
-    memset (&b, 0, sizeof b);
-
-    rc = KEncFileV1BlockRead (self, block_id, &b, validate);
-    if (rc)
-        return rc;
-
-    if (! self->eof)
-    {
-        rc = KEncFileV1BlockDecrypt (self, &b);
-    }
-    if (fill)
-    {
-        self->block.id = block_id;
-        self->block.u.valid = 0;
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * Interface Functions
- *
- * Destroy
- *
- */
-static
-rc_t CC KEncFileV1DestroyRead (KEncFileV1 *self)
-{
-    rc_t rc1 = 0;
-    rc_t rc2 = 0;
-    rc_t rc3 = 0;
-
-    if (self)
-    {
-        rc1 = KFileRelease (self->encrypted);
-        rc2 = KCipherRelease (self->ciphers.master);
-        rc3 = KCipherRelease (self->ciphers.block);
-        free (self);
-        return rc1 ?  rc1 : rc2 ? rc2 : rc3;
-    }
-    return 0;
-}
-
-
-static
-rc_t CC KEncFileV1DestroyWrite (KEncFileV1 *self)
-{
-    rc_t rc1;
-    rc_t rc2;
-
-    rc1 = (self->block.u.valid) ? KEncFileV1BlockFlush (self) : 0;
-    if ((rc1 == 0)&&(self->encrypted_max != 0))
-        rc1 = KEncFileV1FooterWrite (self);
-    rc2 = KFileRelease (self->encrypted);
-
-    return (rc1 ?  rc1 : rc2);
-}
-
-
-static
-rc_t CC KEncFileV1DestroySwarm (KEncFileV1 *self)
-{
-    rc_t rc1 = 0;
-    rc_t rc2 = 0;
-    rc_t rc3 = 0;
-
-    if (self)
-    {
-        rc1 = KFileRelease (self->encrypted);
-        rc2 = KCipherRelease (self->ciphers.master);
-        rc3 = KCipherRelease (self->ciphers.block);
-        free (self);
-        return rc1 ?  rc1 : rc2 ? rc2 : rc3;
-    }
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- *
- * We do not allow this for read, write or update as you can not memory map the 
- * unencrypted file in a meaningful way.
- */
-static
-struct KSysFile *CC KEncFileV1GetSysFileUnsupported (const KEncFileV1 *self, uint64_t *offset)
-{
-    assert (self);
-    assert (offset);
-    return NULL;
-}
-
-
-/* ----------------------------------------------------------------------
- * RandomAccess
- *
- *  returns 0 if random access, error code otherwise
- */
-static
-rc_t CC KEncFileV1RandomAccess (const KEncFileV1 *self)
-{
-    assert (self != NULL);
-    assert (self->encrypted != NULL);
-    return KFileRandomAccess (self->encrypted);
-}
-
-
-static
-rc_t CC KEncFileV1RandomAccessUnsupported (const KEncFileV1 *self)
-{
-    return RC ( rcFS, rcFile, rcUpdating, rcFunction, rcUnsupported );
-}
-
-
-/* ----------------------------------------------------------------------
- * Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KEncFileV1SizeUnsupported (const KEncFileV1 *self, uint64_t *size)
-{
-    return RC ( rcFS, rcFile, rcAccessing, rcFunction, rcUnsupported );
-}
-
-
-/* ----------------------------------------------------------------------
- * SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KEncFileV1SetSizeUnsupported (KEncFileV1 *self, uint64_t size)
-{
-    assert (self);
-    return RC ( rcFS, rcFile, rcUpdating, rcFunction, rcUnsupported );
-}
-
-
-/* ----------------------------------------------------------------------
- * Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-rc_t CC KEncFileV1ReadUnsupported (const KEncFileV1 *self,
-                                 uint64_t pos,
-                                 void *buffer,
-                                 size_t bsize,
-                                 size_t *num_read)
-{
-    return RC ( rcFS, rcFile, rcReading, rcFunction, rcUnsupported );
-}
-
-
-static
-rc_t CC KEncFileV1Read	(const KEncFileV1 *cself,
-                         uint64_t pos,
-                         void *buffer,
-                         size_t bsize,
-                         size_t *num_read)
-{
-    KEncFileV1 * self = (KEncFileV1 *)cself; /* mutable values */
-    uint64_t block_id;
-    uint32_t offset;
-    size_t to_copy;
-    rc_t rc = 0;
-
-    assert (self); /* checked in file.c KFileRead() */
-    /* pos can be 'anything' */
-    assert (buffer); /* checked in file.c KFileRead() */
-    assert (bsize); /* checked in file.c KFileRead() */
-    assert (num_read); /* checked in file.c KFileRead() */
-
-    *num_read = 0;
-
-    block_id = PlaintextOffset_to_BlockId (pos, &offset);
-
-    /*
-     * are we on the wrong block?
-     * Or are do we need to read the first block?
-     */
-    if ((block_id != self->block.id) || (self->block.u.valid == 0))
-    {
-        rc = KEncFileV1BlockSeek (self, block_id, false, false);
-        if (rc)
-            return rc;
-    }
-
-    /*
-     * if we are trying to read past the end of the file 
-     * return 0 with nothing read
-     */
-    if (self->eof || (block_id != self->block.id) ||
-        (offset >= self->block.u.valid))
-        return 0;
-
-    to_copy = self->block.u.valid - offset;
-    if (to_copy > bsize)
-        to_copy = bsize;
-
-    memmove (buffer, self->block.data + offset, to_copy);
-    *num_read = to_copy;
-
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- * Unsupported as we now treat archives as READ ONLY
- */
-static
-rc_t CC KEncFileV1WriteUnsupported (KEncFileV1 *self, uint64_t pos,
-                                  const void *buffer, size_t bsize,
-                                  size_t *num_writ)
-{
-    rc_t rc = RC (rcFS, rcFile, rcReading, rcFunction, rcUnsupported);
-    LOGERR (klogInt, rc, "KFileRead failed to filter call");
-    return rc;
-}
-
-static
-rc_t KEncFileV1WriteInt (KEncFileV1 *self, uint64_t block_id, uint32_t block_offset,
-                       const void *buffer, size_t bsize,
-                       size_t *pnum_writ, bool seek)
-{
-    const uint8_t * pb;
-    size_t tot_writ;
-    rc_t rc;
-
-    assert (self);
-    assert (self->block.u.valid <= sizeof (self->block.data));
-    assert (block_offset < sizeof (self->block.data));
-    assert (buffer);
-    assert (bsize);
-    assert (pnum_writ);
-
-    if (seek)
-    {
-        /* if we need to change blocks */
-        if (block_id != self->block.id)
-        {
-            rc = KEncFileV1BlockSeek (self, block_id, true, false);
-            if (rc)
-                return rc;
-        }
-        /* do we have to fill some of this block */
-        if (self->block.u.valid < block_id)
-        {
-            memset (self->block.data + self->block.u.valid, 0,
-                    block_offset - self->block.u.valid);
-            self->block.u.valid = block_offset;
-        }
-    }
-
-    /*
-     * is the full write within this block?
-     * doesn't matter whether we are skipping back or not
-     */
-    if ((block_offset + bsize) <= sizeof (self->block.data))
-    {
-        memmove (self->block.data + block_offset, buffer, bsize);
-        self->dirty = true;
-        if (block_offset + bsize > self->block.u.valid)
-            self->block.u.valid = (KEncFileBlockValid) ( block_offset + bsize );
-        *pnum_writ = bsize;
-        return 0;
-    }
-
-    /* we are either forcing ourselves backward or not */
-    else 
-        self->block.u.valid = block_offset;
-
-    /* by this point we are 'at' the right place in the file */
-    /* do we have an existing (possibly partial) block? */
-
-    /* change to a sized target pointer */
-    pb = buffer;
-    tot_writ = 0;
-
-    /* handle this first block with some data in it */
-    if (self->block.u.valid != 0)
-    {
-        size_t remaining;
-
-        /* how many bytes left in this block */
-        remaining = sizeof self->block.data - self->block.u.valid;
-
-        memmove (self->block.data + self->block.u.valid, buffer, remaining);
-        self->block.u.valid = sizeof self->block.data;
-
-        self->dirty = true;
-        rc = KEncFileV1BlockFlush (self);
-        if (rc)
-        {
-            LOGERR (klogErr, rc, "error flushing block in encrypt");
-            return rc;
-        }
-
-        tot_writ = remaining;
-        pb += remaining;
-        bsize -= remaining; 
-        ++block_id;
-    }
-
-    /* now loop through complete blocks to write */
-    for (; bsize >= sizeof self->block.data; bsize -= sizeof self->block.data)
-    {
-        memcpy (self->block.data, pb, sizeof self->block.data);
-
-        self->block.u.valid = sizeof self->block.data;
-        self->block.id = block_id;
-        self->dirty = true;
-        rc = KEncFileV1BlockFlush (self);
-        if (rc)
-        {
-            LOGERR (klogErr, rc, "error flushing block in encrypt");
-            return rc;
-        }
-        pb += sizeof self->block.data;
-	tot_writ += sizeof self->block.data;
-        ++block_id;
-    }
-
-    /* now any last partial block that starts at the beginning of a block */
-    if (bsize != 0)
-    {
-        KEncFileBlock b;
-
-        if ( self -> encrypted_max > BlockId_to_CiphertextOffset ( block_id ) )
-        {
-            rc = KEncFileV1BlockRead (self, block_id, &b, false);
-            if (rc)
-                return rc;
-            /* if valid is not 0 we actually read something */
-            if (b.u.valid)
-                rc = KEncFileV1BlockDecrypt (self, &b);
-        }
-        else
-        {
-            self->block.u.valid = 0;
-            self->block.id = block_id;
-        }
-
-        memmove (self->block.data, pb, bsize);
-
-        if (bsize > self->block.u.valid)
-            self->block.u.valid = (KEncFileBlockValid) bsize;
-
-        self->dirty = true;
-        tot_writ += bsize;
-    }
-    *pnum_writ = tot_writ;
-    return 0;
-}
-
-
-static
-rc_t CC KEncFileV1Write (KEncFileV1 *self, uint64_t pos,
-                       const void *buffer, size_t bsize,
-                       size_t *pnum_writ)
-{
-    uint64_t block_id;
-    uint64_t curr_block_id;
-    uint32_t block_offset;
-    uint32_t curr_block_offset;
-    rc_t rc = 0;
-
-    /* -----
-     * check for incorrect call with a seek attempt
-     * we only allow seeks on read or read/write files
-     *
-     * find our location in the encrypted file by block id
-     * and offset
-     */
-    block_id = PlaintextOffset_to_BlockId (pos, &block_offset);
-    curr_block_id = PlaintextOffset_to_BlockId
-        ( BlockId_to_PlaintextOffset ( self -> block . id ) + self -> block . u . valid,
-         &curr_block_offset);
-
-    /* are we writing to the wrong block/offset? */
-    if ((block_id != curr_block_id) || (block_offset != curr_block_offset))
-    {
-        rc = RC (rcFS, rcFile, rcWriting, rcOffset, rcIncorrect);
-        PLOGERR (klogErr, (klogErr, rc, "attempt to seek in encryption write at"
-                           " '$(O)' seek to '$(P)'", "O=%lu,P=%lu",
-                           BlockId_to_CiphertextOffset ( self -> block . id ), pos ) );
-    }
-    else
-    {
-        if ((block_id != 0) && (block_id != self->block.id))
-        {
-            rc = KEncFileV1BlockFlush (self);
-            if (rc == 0)
-            {
-                ++self->block.id;
-                self->block.u.valid = 0;
-            }
-        }
-        
-        if (rc == 0)
-            rc = KEncFileV1WriteInt (self, block_id, block_offset, buffer,
-                                       bsize, pnum_writ, false);
-    }
-    return rc;
-}
-
-
-static
-rc_t CC KEncFileV1WriteSwarm (KEncFileV1 *self, uint64_t pos,
-                            const void *buffer, size_t bsize,
-                            size_t *pnum_writ)
-{
-    uint32_t block_offset;
-    rc_t rc;
-
-    self->block.id = PlaintextOffset_to_BlockId (pos, &block_offset);
-    self->block.u.valid = 0;
-    if (bsize > sizeof self->block.data - block_offset)
-        bsize = sizeof self->block.data - block_offset;
-
-    rc = KEncFileV1WriteInt (self, self->block.id, block_offset, buffer,
-                           bsize, pnum_writ, false);
-    if (rc == 0)
-        rc = KEncFileV1BlockFlush (self);
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KEncFileV1Type (const KEncFileV1 *self)
-{
-    assert (self != NULL);
-    assert (self->encrypted != NULL);
-
-    return KFileType (self->encrypted);
-}
-
-
-/* ----------------------------------------------------------------------
- * KEncFileV1Make
- *  create a new file object
- */
-
-/* ----------
- * KeysInit
- */
-static
-rc_t KEncFileV1CiphersInit (KEncFileV1 * self, const KKey * key, bool read, bool write)
-{
-    KCipherManager * mgr;
-    size_t z;
-    rc_t rc;
-
-    switch ( key->type)
-    {
-    default:
-        return RC (rcKrypto, rcEncryptionKey, rcConstructing, rcParam, rcInvalid);
-
-    case kkeyNone:
-        return RC (rcKrypto, rcEncryptionKey, rcConstructing, rcParam, rcIncorrect);
-
-    case kkeyAES128:
-        z = 128/8; break;
-
-    case kkeyAES192:
-        z = 192/8; break;
-
-    case kkeyAES256:
-        z = 256/8; break;
-    }
-    rc = KCipherManagerMake (&mgr);
-    if (rc == 0)
-    {
-        rc = KCipherManagerMakeCipher (mgr, &self->ciphers.master, kcipher_AES);
-        if (rc == 0)
-        {
-            rc = KCipherManagerMakeCipher (mgr, &self->ciphers.block, kcipher_AES);
-            if (rc == 0)
-            {
-                rc = KCipherSetDecryptKey (self->ciphers.master, key->text, z);
-                if (rc == 0)
-                {
-                    rc = KCipherSetEncryptKey (self->ciphers.master, key->text, z);
-                    if (rc == 0)
-                        goto keep_ciphers;
-                }
-                KCipherRelease (self->ciphers.block);
-                self->ciphers.block = NULL;
-            }
-            KCipherRelease (self->ciphers.master);
-            self->ciphers.master = NULL;
-        }
-    keep_ciphers:
-        KCipherManagerRelease (mgr);
-    }
-    return rc;
-}
-
-
-
-/* ----------
- * MakeInt
- *    common make for all encryptor/decryptors
- */
-static
-rc_t KEncFileV1MakeInt (KEncFileV1 ** pself, KFile * encrypted,
-                      const KFile_vt_v1 * vt, bool r, bool w, bool v)
-{
-    KEncFileV1 * self;
-    rc_t rc;
-
-    assert (pself);
-    assert (encrypted);
-
-    /* allocate and zero out an object since we want much of it to be zeroed */
-    self = calloc (sizeof *self, 1);
-    if (self == NULL)
-    {
-        rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-        LOGERR (klogSys, rc,
-                "out of memory creating encrypter and/or decryptor");
-    }
-    else
-    {
-        /* all KFiles get this initialization */
-        rc = KFileInit (&self->dad, (const KFile_vt*)vt, "KEncFileV1", "no-name", r, w);
-        if (rc)
-            LOGERR (klogInt, rc, "failure initialize encrypted file root class");
-        else
-        {
-            rc = KFileAddRef (encrypted);
-            if (rc == 0)
-            {
-                self->encrypted = encrypted;
-                *pself = self;
-                return 0;
-            }
-        }
-        free (self);
-    }
-    return rc;
-}
-
-
-/* ----------
- * MakeCmn
- * common parameter validation for all encryptor/decryptors
- */
-static
-rc_t KEncFileV1MakeCmn (KEncFileV1 ** pself, KFile * encrypted, const KKey * key,
-                      const KFile_vt_v1 * vt, bool r, bool w)
-{
-    rc_t rc = 0;
-
-    do
-    {
-        CRC32Init();    /* likely to be called way too often */
-
-        if (pself == NULL)
-        {
-            rc = RC (rcFS, rcFile, rcConstructing, rcSelf, rcNull);
-            LOGERR (klogErr, rc,
-                    "pointer to self NULL when creating "
-                    "an encryptor/decryptor");
-            break;
-        }
-        *pself = NULL;
-
-        if (encrypted == NULL)
-        {
-            rc = RC (rcFS, rcFile, rcConstructing, rcParam, rcNull);
-            LOGERR (klogErr, rc, 
-                    "encrypted file not supplied when creating "
-                    "an encryptor/decryptor");
-            break;
-        }
-
-        if (key == NULL)
-        {
-            rc = RC (rcFS, rcFile, rcConstructing, rcParam, rcNull);
-            LOGERR (klogErr, rc, 
-                    "key not supplied when creating an encryptor/decryptor");
-            break;
-        }
-
-        switch (key->type)
-        {
-        default:
-            rc = RC (rcFS, rcFile, rcConstructing, rcParam, rcInvalid);
-            PLOGERR (klogErr,
-                     (klogErr, rc, "invalid key type '$(T)' should be "
-                      "kkeyAES128(1), kkeyAES192(2) or kkeyAES256(3)",
-                      "T=%u", key->type));
-            break;
-
-        case kkeyAES128:
-        case kkeyAES192:
-        case kkeyAES256:
-            break;
-        }
-        if (rc == 0)
-        {
-            KEncFileV1 * self;
-
-            assert (vt);
-            assert ((r == true) || (r == false));
-            assert ((w == true) || (w == false));
-
-            rc = KEncFileV1MakeInt (&self, encrypted, vt, r, w, false);
-            if (rc == 0)
-            {
-                rc = KEncFileV1CiphersInit (self, key, r, w);
-                if (rc == 0)
-                {
-                    *pself = self;
-                    return 0;
-                }
-                KFileRelease (&self->dad);
-            }
-        }
-    } while (0);
-    return rc;
-}
-
-
-
-static const KFile_vt_v1 vtKEncFileV1Read =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KEncFileV1DestroyRead,
-    KEncFileV1GetSysFileUnsupported,
-    KEncFileV1RandomAccess,
-    KEncFileV1SizeUnsupported,
-    KEncFileV1SetSizeUnsupported,
-    KEncFileV1Read,
-    KEncFileV1WriteUnsupported,
-
-    /* 1.1 */
-    KEncFileV1Type
-};
-static const KFile_vt_v1 vtKEncFileV1Write =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KEncFileV1DestroyWrite,
-    KEncFileV1GetSysFileUnsupported,
-    KEncFileV1RandomAccessUnsupported,
-    KEncFileV1SizeUnsupported,
-    KEncFileV1SetSizeUnsupported,
-    KEncFileV1ReadUnsupported,
-    KEncFileV1Write,
-
-    /* 1.1 */
-    KEncFileV1Type
-};
-static const KFile_vt_v1 vtKEncFileV1Update =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KEncFileV1DestroySwarm,
-    KEncFileV1GetSysFileUnsupported,
-    KEncFileV1RandomAccess,
-    KEncFileV1SizeUnsupported,
-    KEncFileV1SetSizeUnsupported,
-    KEncFileV1ReadUnsupported,
-    KEncFileV1WriteSwarm,
-
-    /* 1.1 */
-    KEncFileV1Type
-};
-static const KFile_vt_v1 vtKEncFileV1Validate =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KEncFileV1DestroyRead,
-    KEncFileV1GetSysFileUnsupported,
-    KEncFileV1RandomAccessUnsupported,
-    KEncFileV1SizeUnsupported,
-    KEncFileV1SetSizeUnsupported,
-    KEncFileV1ReadUnsupported,
-    KEncFileV1WriteUnsupported,
-
-    /* 1.1 */
-    KEncFileV1Type
-};
-
-
-/* ----------
- * Read mode is fully seekable if the underlying KFile is seekable some
- * integrity checking will not be performed in allowing this seeking.
- */
-LIB_EXPORT rc_t CC KEncFileMakeRead_v1 (const KFile ** pself, 
-                                        const KFile * encrypted,
-                                        const KKey * key)
-{
-    KEncFileV1 * self;
-    rc_t rc;
-    rc = KEncFileV1MakeCmn (&self, (KFile *)encrypted, key, &vtKEncFileV1Read, 
-                          true, false);
-    if (rc)
-        LOGERR (klogErr, rc, "error constructing decryptor");
-    else
-    {
-        rc = KEncFileV1HeaderRead (self);
-        if (rc)
-            LOGERR (klogErr, rc, "error reading encrypted file header");
-        else
-        {
-            *pself = &self->dad;
-            return 0;
-        }
-        KFileRelease (&self->dad);
-    }
-    return rc;
-}
-
-
-/* ----------
- * Write mode encrypted file can only be written straight through form the
- * first byte to the last.
- */
-LIB_EXPORT rc_t CC KEncFileMakeWrite_v1 (KFile ** pself, 
-                                         KFile * encrypted,
-                                         const KKey * key)
-{
-    KEncFileV1 * self;
-    rc_t rc;
-
-    rc = KFileSetSize (encrypted, 0);
-#if 0
-    if (rc)
-        LOGERR (klogWarn, rc, "error truncating output file - "
-                "corrupted file might result");
-#endif
-
-    rc = KEncFileV1MakeCmn (&self, encrypted, key, &vtKEncFileV1Write, 
-                          false, true);
-    if (rc)
-        LOGERR (klogErr, rc, "error creating encryptor");
-    else
-        *pself = &self->dad;
-    return rc;
-}
-
-
-/* ----------
- * Update mode is read/write mode where seeking within the file is allowed.
- */
-
-
-LIB_EXPORT rc_t CC KEncFileV1MakeUpdate_v1 (KFile ** pself, 
-                                          KFile * encrypted,
-                                          const KKey * key)
-{
-    KEncFileV1 * self;
-    rc_t rc;
-
-    rc = KEncFileV1MakeCmn (&self, encrypted, key, &vtKEncFileV1Update, 
-                          false, true);
-    if (rc)
-        LOGERR (klogErr, rc, "error creating encryptor");
-    else
-    {
-        self->swarm = true;
-        *pself = &self->dad;
-    }
-    return rc;
-}
-
-
-/* ----------
- * Validate mode is useful only for the KFileEncValidate function
- */
-static
-rc_t KEncFileV1MakeValidate (const KEncFileV1 ** pself, const KFile * encrypted)
-{
-    KEncFileV1 * self;
-    rc_t rc;
-
-    assert (pself);
-    assert (encrypted);
-
-    rc = KEncFileV1MakeInt (&self, (KFile*)encrypted, &vtKEncFileV1Validate, true, false, true);
-    if (rc)
-        LOGERR (klogErr, rc, "error making KEncFileV1");
-    else
-    {
-        rc = KEncFileV1HeaderRead (self);
-        if (rc)
-            LOGERR (klogErr, rc, "error reading encrypted file header");
-        else
-        {
-            *pself = self;
-            return 0;
-        }
-    }
-    *pself = NULL;
-    return rc;
-}
-
-
-/* ----------
- * Validate mode can not be read or written.
- * Upon open the whole file is read from begining to end and all CRC
- * and other integrity checks are performed immedaitely
- */
-LIB_EXPORT rc_t CC KEncFileV1Validate_v1 (const KFile * encrypted)
-{
-    const KEncFileV1 * file;
-    rc_t rc;
-
-    /* fail if a NULL parameter: can't validate all addresses */
-    if (encrypted == NULL)
-    {
-        rc = RC (rcKrypto, rcFile, rcValidating, rcParam, rcNull);
-        LOGERR (klogErr, rc, "encrypted file was null when trying to validate");
-        return rc;
-    }
-
-    /* if the parameter is already a KEncFileV1 work on the file behind it instead */
-    /* we definitely can't work on a file being written that has not been closed */
-    if (encrypted->vt == (const KFile_vt*)&vtKEncFileV1Read)
-        encrypted = (const KFile *)(((const KEncFileV1*)encrypted)->encrypted);
-
-    /* file header is validated within the call to Make Validate */
-    rc = KEncFileV1MakeValidate (&file, encrypted);
-    if (rc)
-        LOGERR (klogErr, rc,
-                "unable to validate encrypted file due to "
-                "inability to open as encrypted file");
-    else
-    {
-        uint64_t pos;             /* position within the encrypted file */
-        uint64_t block_count = 0; /* how many blocks have we read */
-
-        /* loop through all data blocks */
-        pos = sizeof (KEncFileHeader);
-        for (block_count = 0; ; ++block_count)
-        {
-            KEncFileBlock block;
-
-            STSMSG (2, ("reading block '%u' at '%lu'", block_count,
-                        BlockId_to_CiphertextOffset ( block_count ) ) );
-           
-            rc = KEncFileV1BlockRead (file, block_count, &block, true);
-            if (rc)
-            {
-                STSMSG (2, ("read error at block '%u'", block_count));
-                break;
-            }
-            if (file->eof)
-            {
-                STSMSG (2, ("block '%u' was end", block_count));
-
-                break;
-            }
-            pos += sizeof (KEncFileData);
-        }
-        KFileRelease (&file->dad);
-    }
-    return (rc);
-}
-
-
-LIB_EXPORT rc_t CC KFileIsEnc_v1 (const char * buffer, size_t buffer_size)
-{
-    const KEncFileHeader * header;
-
-    if ((buffer == NULL) || (buffer_size == 0))
-        return RC  (rcFS, rcFile, rcIdentifying, rcParam, rcNull); 
-
-    header = (const KEncFileHeader*)buffer;
-
-    if (buffer_size < sizeof header->file_sig)
-        return RC (rcFS, rcFile, rcIdentifying, rcBuffer, rcInsufficient); 
-
-    if (buffer_size > sizeof (*header))
-        buffer_size = sizeof (*header);
-
-    if ((memcmp (header, &const_header, buffer_size) == 0) ||
-        (memcmp (header, &const_bswap_header, buffer_size) == 0)
-#if ENABLE_V2
-        ||
-        (memcmp (header, &const_header_v1, buffer_size) == 0) ||
-        (memcmp (header, &const_bswap_header_v1, buffer_size) == 0)
-#endif
-        )
-        return 0;
-
-    return RC (rcFS, rcFile, rcIdentifying, rcFile, rcWrongType); 
-}
-
-
-
-/* ----------
- * Read mode is fully seekable if the underlying KFile is seekable some
- * integrity checking will not be performed in allowing this seeking.
- */
-LIB_EXPORT rc_t CC KEncFileMakeRead (const struct KFile ** pself,
-                                        const struct KFile * encrypted_input,
-                                        const struct KKey * key)
-{
-#if USE_READ_V1
-    return KEncFileV1MakeRead_v1 (pself, encrypted_input, key);
-#else
-    return KEncFileMakeRead_v2 (pself, encrypted_input, key);
-#endif
-}
-
-
-/* ----------
- * Write mode encrypted file can only be written straight through from the
- * first byte to the last.
- */
-LIB_EXPORT rc_t CC KEncFileMakeWrite (struct KFile ** pself,
-                                         struct KFile * encrypted_output,
-                                         const struct KKey * key)
-{
-#if USE_WRITE_V1
-    return KEncFileV1MakeWrite_v1 (pself, encrypted_output, key);
-#else
-    return KEncFileMakeWrite_v2 (pself, encrypted_output, key);
-#endif
-}
-
-/* ----------
- * Update mode is read/write mode where seeking within the file is allowed.
- *
- * NOTE this is in the private interface because it is not actually working
- * yet.
- */
-LIB_EXPORT rc_t CC KEncFileMakeUpdate (struct KFile ** pself, 
-                                       struct KFile * encrypted,
-                                       const struct KKey * key)
-{
-#if USE_UPDATE_V1
-    return KEncFileV1MakeUpdate_v1 (pself, encrypted, key);
-#else
-    return KEncFileMakeUpdate_v2 (pself, encrypted, key);
-#endif
-}
-LIB_EXPORT rc_t CC KEncFileMakeWriteBlock (struct KFile ** pself, 
-                                           struct KFile * encrypted,
-                                           const struct KKey * key)
-{
-#if USE_BLOCK_V1
-    return KEncFileV1MakeUpdate_v1 (pself, encrypted, key);
-#else
-    return KEncFileMakeBlock_v2 (pself, encrypted, key);
-#endif
-}
-
-
-LIB_EXPORT rc_t CC KEncFileWriteHeader  (KFile * self)
-{
-#if USE_BLOCK_V1
-    return KEncFileV1WriteHeader_v1  (self);
-#else
-    return KEncFileWriteHeader_v2  (self);
-#endif
-}
-
-
-/* ----------
- * Validate mode can not be read or written.
- * Upon open the whole file is read from begining to end and all CRC
- * and other integrity checks are performed immedaitely
- */
-LIB_EXPORT rc_t CC KEncFileValidate (const struct KFile * encrypted)
-{
-#if USE_VALIDATE_V1
-    return KEncFileV1Validate_v1 (encrypted);
-#else
-    return KEncFileValidate_v2 (encrypted);
-#endif
-}
-
-
-/* ----------
- * Identify whether a file is a KEncFile type encrypted file by the header.
- * read the header into a buffer and pass it into this function.  
- * The buffer_size needs to be at least 8 but more bytes lead to a better
- * check up to the size of the header of a KEncFile type encrypted file.
- * As the header may change in the future (in a backwards compatible way)
- * that size might change from the current 16.
- *
- * Possible returns:
- * 0:
- *      the file is an identified KEncFile type file.  False positives are
- *      possible if a file happens to match at 8 or more bytes
- *
- * RC (rcFS, rcFile, rcIdentifying, rcFile, rcWrongType)
- *      the file is definitely not a KEncFile type encrypted file.
- *     
- * RC (rcFS, rcFile, rcIdentifying, rcParam, rcNull)
- *      bad parameters in the call
- *
- * RC (rcFS, rcFile, rcIdentifying, rcBuffer, rcInsufficient)
- *      not a large enough buffer to make an identification
- */
-LIB_EXPORT rc_t CC KFileIsEnc (const char * buffer, size_t buffer_size)
-{
-#if USE_ISENC_V1
-    return KFileIsEnc_v1 (buffer, buffer_size);
-#else
-    return KFileIsEnc_v2 (buffer, buffer_size);
-#endif
-}
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-
-/* end of file encfile.c */
-
diff --git a/libs/krypto/encfilev2.c b/libs/krypto/encfilev2.c
deleted file mode 100644
index 1167dc8..0000000
--- a/libs/krypto/encfilev2.c
+++ /dev/null
@@ -1,2621 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-#include <krypto/extern.h>
-#include <krypto/encfile.h>
-#include <krypto/encfile-priv.h>
-#include "encfile-priv.h"
-#include <krypto/cipher.h>
-#include <krypto/ciphermgr.h>
-#include <krypto/key.h>
-
-/* #include "aes-priv.h" */
-
-#include <klib/rc.h>
-#include <klib/checksum.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/debug.h>
-#include <klib/status.h>
-/* #include <klib/vector.h> */
-/* #include <klib/status.h> */
-#include <kfs/file.h>
-#include <kfs/sra.h>
-#include <sysalloc.h>
-
-#include <byteswap.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-/* #include <klib/out.h> */
-
-
-/* ----------------------------------------------------------------------
- * KEncFile
- *   Base object class for the encryption, decryption and validation of
- *   the file format defined above
- */
-
-#define KFILE_IMPL struct KEncFile
-#include <kfs/impl.h>
-
-
-#include "encfile-priv.h"
-
-typedef struct KEncFileCiphers KEncFileCiphers;
-struct KEncFileCiphers
-{
-    KCipher * master;
-    KCipher * block;
-};
-
-
-typedef struct KEncFileIVec { uint8_t ivec [16]; } KEncFileIVec;
-
-/* -----
- */
-struct KEncFile
-{
-    KFile dad;                  /* base class */
-    KFile * encrypted;          /* encrypted file as a KFile */
-    KEncFileCiphers ciphers;    /* file and block ciphers */
-    KEncFileBlock block;        /* current data block */
-    KEncFileFooter foot;        /* contains crc checksum and block count */
-    uint64_t dec_size;          /* size of decrypted file */
-    uint64_t enc_size;          /* size of encrypted file */
-    bool dirty;                 /* data written but not flushed set in Write cleared in Flush*/
-    bool seekable;              /* we can seek within the encrypted file */
-    bool size_known;            /* can we know the size? Only streaming read can not know */
-    bool bswap;                 /* file created on system of opposite endianess */
-    bool changed;               /* some write has happened cleared in Make, set in BufferWrite */
-    bool sought;                /* did a seek on a read or write invalidating crc checksum */
-    bool has_header;            /* have we read or written a header? */
-    bool eof;                   
-    bool sra;                   /* we know we are encrypting an SRA/KAR archive file */
-    bool swarm;                 /* block mode for swarm mode using KReencFile or KEncryptFile */
-    KEncFileVersion version;    /* version from the header if read; or the one being written */
-};
-
-
-/* ----------
- * BufferCalcMD5
- *    Generate the MD5 digest for a buffer
- */
-static __inline__
-void BufferCalcMD5 (const void * buffer, size_t size, uint8_t digest [16])
-{
-    MD5State state;
-
-    assert (buffer);
-    assert (size);
-    assert (digest);
-
-    MD5StateInit (&state);
-    MD5StateAppend (&state, buffer, size);
-    MD5StateFinish (&state, digest);
-}
-
-
-/* -----
- * return true or false as to whether the the buffer described is all 0 bits
- */
-static __inline__
-bool BufferAllZero (const void * buffer_, size_t size)
-{
-    const uint8_t * buffer;
-    size_t count;
-    bool ret;
-
-    assert (buffer_);
-
-    buffer = buffer_;
-    ret = true;
-
-    for (count = 0; count < size; ++count)
-    {
-        if (buffer[count] != '\0')
-        {
-            ret = false;
-            break;
-        }
-    }
-    return ret;
-}
-
-
-/* ----------
- * BufferRead
- *    Read from an encrypted file and update size if warranted
- *
- * Read's aren't guaranteed to get full amount
- */
-static
-rc_t KEncFileBufferRead (KEncFile * self, uint64_t offset, void * buffer,
-                         size_t bsize, size_t * num_read)
-{
-    rc_t rc;
-
-    assert (self);
-    assert (self->encrypted);
-    assert (buffer);
-    assert (bsize > 0);
-    assert (num_read);
-
-    rc = KFileReadAll (self->encrypted, offset, buffer, bsize, num_read);
-    if (rc == 0)
-    {
-        if (self->enc_size < offset + *num_read)
-        {
-            self->enc_size = offset + *num_read;
-        }
-    }
-/* leave logging to callers? */
-    else
-        PLOGERR (klogErr, (klogErr, rc, "Error reading from encrypted file "
-                           "at '$(P)", "P=%lu", offset));
-
-    return rc;
-}
-
-
-/* ----------
- * BufferWrite
- *    write to an encrypted file, mark it as changed and update size if warranted
- */
-static
-rc_t KEncFileBufferWrite (KEncFile * self, uint64_t offset, const void * buffer,
-                          size_t bsize, size_t * num_writ)
-{
-    rc_t rc = 0;
-
-    assert (self);
-    assert (self->encrypted);
-    assert (buffer);
-    assert (bsize > 0);
-    assert (num_writ);
-
-    rc = KFileWriteAll (self->encrypted, offset, buffer, bsize, num_writ);
-    if (rc != 0)
-    {
-/* leave logging to callers? */
-        PLOGERR (klogErr, (klogErr, rc, "Error writing to encrypted file "
-                           "at '$(P)", "P=%lu", offset));
-        // make sure we don't crash later in destructor
-        if (self->enc_size > offset + *num_writ)
-        {
-            self->enc_size = offset + *num_writ;
-        }
-        return rc;
-    }
-    
-    if (bsize != *num_writ)
-    {
-/*         KOutMsg ("%s: bsize %zu *num_writ %zu\n",__func__, bsize, *num_writ); */
-        rc = RC (rcKrypto, rcFile, rcWriting, rcTransfer, rcIncomplete);
-/* leave logging to callers? */
-        PLOGERR (klogErr, (klogErr, rc, "Error writing full buffer to"
-                           " encrypted file at '$(P) wrote '$(W)'",
-                           "P=%lu,W=%zu", offset, *num_writ));
-    }
-    else if (*num_writ > 0)
-    {
-        self->changed = true;
-        if (self->enc_size < offset + *num_writ)
-        {
-            self->enc_size = offset + *num_writ;
-        }
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * operations on KEncFileHeader
- *
- * The header only needs to be read and validated or written  we need not 
- * reatian within the KEncFile object any information about the header in
- * the initial version of this file format.
- */
-
-/* -----
- * the first eight bytes of the file are two four byte strings
- *  The first is a common "NCBI"
- *  The second is the format specific "nenc"
- */
-static const KEncFileSig KEncFileSignature = "NCBInenc";
-
-
-/* -----
- * the common constant used throughout the project to check the byte order 
- * as written by the system which created the file
- */
-/* enum fails to handle these due to integer overflow */
-
-#define eEncFileByteOrderTag     (0x05031988)
-#define eEncFileByteOrderReverse (0x88190305)
-
-/* ----
- */
-#define eCurrentVersion        (0x00000002)
-#define eCurrentVersionReverse (0x02000000)
-
-
-static
-const KEncFileHeader const_header
-= { "NCBInenc", eEncFileByteOrderTag, eCurrentVersion };
-
-
-static
-const KEncFileHeader const_bswap_header
-= { "NCBInenc", eEncFileByteOrderReverse, eCurrentVersionReverse };
-
-/* skipping v1 for NCBIkenc */
-static
-const KEncFileHeader const_header_sra
-= { "NCBIsenc", eEncFileByteOrderTag, eCurrentVersion };
-
-
-static
-const KEncFileHeader const_bswap_header_sra
-= { "NCBIsenc", eEncFileByteOrderReverse, eCurrentVersionReverse };
-
-    
-/* ----------
- * HeaderRead
- *    Read the header of an encrypted file and validate it.
- *
- * We only allow a missing header for an empty file opened for update
- */
-static
-rc_t KEncFileHeaderRead (KEncFile * self)
-{
-    KEncFileHeader header;
-    size_t num_read;
-    rc_t rc;
-
-    assert (self);
-
-    rc = KEncFileBufferRead (self, 0, &header, sizeof (header), &num_read);
-    if (rc)
-        LOGERR (klogErr, rc, "error reading encrypted file header");
-
-    else if ((num_read == 0) && (self->dad.write_enabled))
-    {
-        /* only allow read to fail with zero length if opened with write */
-        self->version = eCurrentVersion;
-        self->bswap = false;
-        self->enc_size = 0; /* redundant? */
-        self->dec_size = 0; /* redundant? */
-    }
-    else if (num_read != sizeof (header))
-    {
-        rc = RC (rcFS, rcFile, rcConstructing, rcHeader, rcTooShort);
-        PLOGERR (klogErr,
-                 (klogErr, rc, "error reading full header of encrypted "
-                  "file  wanted '$(S)' got '$(N); bytes read", "S=%u,N=%u",
-                  sizeof (header), num_read));
-    }
-    else
-    {
-        rc_t orc;
-
-        if (memcmp (header.file_sig, const_header.file_sig,
-                     sizeof (header.file_sig)) == 0)
-            self->sra = false;
-        else if (memcmp (header.file_sig, const_header_sra.file_sig,
-                         sizeof (header.file_sig)) == 0)
-            self->sra = true;
-        else
-        {
-            rc = RC (rcFS, rcFile, rcConstructing, rcHeader, rcInvalid);
-            LOGERR (klogErr, rc, "file signature not correct for encrypted file");
-        }
-
-        switch (header.byte_order)
-        {
-        case eEncFileByteOrderTag:
-            self->bswap = false;
-            self->version = header.version;
-            break;
-
-        case eEncFileByteOrderReverse:
-            self->bswap = true;
-
-            /* assert for the right bswap call */
-            assert (sizeof (self->version) == 4);
-
-            self->version = bswap_32 (header.version);
-            break;
-
-        default:
-            orc = RC (rcFS, rcFile, rcConstructing, rcByteOrder, rcInvalid);
-            PLOGERR (klogErr, (klogErr, rc, "invalid byte order flag '$(F); in "
-                               "encrypted file header", "F=%X",
-                               header.byte_order));
-            if (rc == 0)
-                rc = orc;
-            break;
-        }
-
-        if ((self->version > eCurrentVersion) || (self->version == 0))
-        {
-            orc = RC (rcFS, rcFile, rcConstructing, rcHeader, rcBadVersion);
-            PLOGERR (klogErr, (klogErr, orc, "can not decrypt version '$(V)'",
-                               "V=%u", header.version));
-            if (rc == 0)
-                rc = orc;
-        }
-        if (rc == 0)
-            self->has_header = true;
-    }
-    return rc;
-}
-
-
-/* -----
- * HeaderWrite
- */
-#ifndef SENC_IS_NENC_FOR_WRITER
-#define SENC_IS_NENC_FOR_WRITER 1
-#endif
-
-static
-rc_t KEncFileHeaderWrite (KEncFile * self)
-{
-    rc_t rc;
-    size_t num_writ;
-    const KEncFileHeader * head;
-
-#if SENC_IS_NENC_FOR_WRITER
-    head = self->sra 
-        ? (self->bswap ? &const_bswap_header_sra : &const_header_sra)
-        : (self->bswap ? &const_bswap_header : &const_header);
-#else
-    head = self->bswap ? &const_bswap_header : &const_header;
-#endif
-
-    rc = KEncFileBufferWrite (self, 0, head, sizeof * head, &num_writ);
-    if (rc)
-        LOGERR (klogErr, rc, "Failed to write encrypted file header");
-
-    else
-        /* forced upgrade by writing the header */
-        self->version = eCurrentVersion;
-
-    if (rc == 0)
-        self->has_header = true;
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KEncFileWriteHeader_v2  (KFile * self)
-{
-    if (self == NULL)
-        return RC (rcKrypto, rcFile, rcWriting, rcSelf, rcNull);
-
-    return KEncFileHeaderWrite ((KEncFile*)self);
-}
-
-
-
-/* ----------------------------------------------------------------------
- * operations on KEncFileFooter
- */
-
-/* ----------
- * Validate
- * we expect to read a Footer when we expect a Block so we validate in RAM
- * without a Read
- *
- * we're just comparing the values in the footer against expected values
- */
-static
-rc_t KEncFileFooterValidate (const KEncFile * self, 
-                             const uint64_t block_count,
-                             const uint64_t crc_checksum)
-{
-    rc_t rc1 = 0, rc2 = 0;
-
-    assert (self);
-
-    if (self->foot.block_count != block_count)
-    {
-        rc1 = RC (rcKrypto, rcFile, rcValidating, rcFile, rcCorrupt);
-        LOGERR (klogErr, rc1, "bad block count in encrypted file footer");
-    }
-    /*
-     * crcs should match or the crc should be 0 and the version is 1
-     */
-    if ((self->foot.crc_checksum != crc_checksum) &&
-        ((self->version == 1) || (crc_checksum != 0)))
-    {
-        rc2 = RC (rcKrypto, rcFile, rcValidating, rcChecksum, rcCorrupt);
-        LOGERR (klogErr, rc2, "bad crc checksum in encrypted file footer");
-    }
-    return (rc1 ? rc1 : rc2);
-}
-
-
-static __inline__
-void KEncFileFooterSwap (const KEncFile * self, KEncFileFooter * foot)
-{
-    assert (self);
-    assert (foot);
-
-    if (self->bswap)
-    {
-        assert (sizeof (foot->block_count) == 8);
-        foot->block_count = bswap_64 (foot->block_count);
-
-        assert (sizeof (foot->crc_checksum) == 8);
-        foot->crc_checksum = bswap_64 (foot->crc_checksum);
-    }
-}
-
-
-/* ----------
- * Read
- * If we know where the footer is we can read it specifically
- */
-static
-rc_t KEncFileFooterRead (KEncFile * self, const uint64_t pos,
-                         const bool validate)
-{
-    union foot_plus
-    {
-        KEncFileFooter foot;
-        uint8_t bytes [sizeof (KEncFileFooter) + 1];
-    } u;
-    size_t num_read;
-    rc_t rc;
-
-    assert ((self->size_known == true) || (self->size_known == false));
-    assert (((self->size_known == true) &&
-             ((pos + sizeof (u.foot)) == self->enc_size)) ||
-            (pos == self->enc_size));
-
-    /* try to read too much just to validate nothing after the footer */
-    rc = KEncFileBufferRead (self, pos, u.bytes, sizeof u.bytes, &num_read);
-    if (rc)
-        PLOGERR (klogErr, (klogErr, rc, "failed to read encrypted file footer "
-                           "at '$(P)'", "P=%lu", pos));
-
-    else if (num_read == sizeof u.foot)
-    {
-        KEncFileFooterSwap (self, &u.foot);
-
-        if (validate)
-            rc = KEncFileFooterValidate (self, u.foot.block_count,
-                                         u.foot.crc_checksum);
-
-        if (rc == 0)
-        {
-            self->foot.block_count = u.foot.block_count;
-            self->foot.crc_checksum = u.foot.crc_checksum;
-        }
-    }
-    else if (num_read < sizeof u.foot)
-        rc = RC (rcKrypto, rcFile, rcReading, rcSize, rcInsufficient);
-
-    else
-    {
-        assert (num_read > sizeof u.foot);
-        rc = RC (rcKrypto, rcFile, rcReading, rcSize, rcExcessive);
-    }
-
-    return rc;
-}
-
-
-/* ----------
- * Write
- * when we write a footer we write from the values in the object.  They
- * are stored in the same object format as the footer so its very simple
- */
-static
-rc_t KEncFileFooterWrite (KEncFile * self)
-{
-    KEncFileFooter foot;
-    uint64_t pos;
-    size_t num_writ;
-    rc_t rc;
-
-    if (self->sought)
-    {
-        self -> foot . block_count = foot . block_count =
-            PlaintextSize_to_BlockCount ( self -> dec_size, NULL );
-        foot . crc_checksum = 0;
-    }
-    else
-    {
-        memcpy ( & foot, & self -> foot, sizeof foot );
-    }
-
-    KEncFileFooterSwap (self, &foot);
-
-    if (self->sought)
-        foot.crc_checksum = 0;
-
-    pos = BlockId_to_CiphertextOffset ( self -> foot . block_count );
-
-    assert ((self->size_known == true) || (self->size_known == false));
-
-    rc = KEncFileBufferWrite (self, pos, &foot, sizeof (foot),
-                              &num_writ);
-    if (rc == 0)
-    {
-        if (num_writ != sizeof (foot))
-        {
-            rc = RC (rcFS, rcFile, rcWriting, rcFile, rcInsufficient);
-            LOGERR (klogErr, rc, "faled to write correctly sized fotter "
-                    "for encrypted file");
-        }
-        else
-            assert ((pos + sizeof (foot)) == self->enc_size);
-    }
-    return rc;
-}
-
-
-/* ----------
- * IvecInit
- *    create the ivec for a given block
- *    done in a function to ensure decrypt and encrypt use the same code to
- *    generate this.  Anything used to create this has to be available to
- *    code that doesn't know the content of the data or the state of the file
- *    beyond the location of the block with in the file.
- *
- *    This is definitely over-kill using the MD5.
- */
-static __inline__
-void KEncFileIVecInit (const uint64_t block_id, KEncFileIVec * ivec)
-{
-    BufferCalcMD5 (&block_id, sizeof block_id, ivec->ivec);
-}
-
- 
-/* ----------
- * BlockEncrypt
- *
- * Not thread safe - use of cipher schedules ivec and block key in the ciphers
- *
- * If this function were a protected region where only one thread could be in
- * the body of this function at a time it could be made thread safe.
- */
-static
-rc_t KEncFileBlockEncrypt (KEncFile * self, KEncFileBlock * d,
-                           KEncFileBlock * e)
-{
-    SHA256State state;
-    uint64_t id;
-    uint16_t valid;
-    uint16_t saved_valid;
-    KEncFileCRC crc;
-    KEncFileIVec ivec;
-    rc_t rc;
-
-    assert (self);
-    assert (d);
-    assert (e);
-
-    /*
-     * First we finish preparing the two ciphers by creating the block
-     * user key out of the first part of the data and the shared Initialization
-     * vector for Chained Block Cipher mode encryption out of the block id
-     * 
-     * create the initialization vector for this block
-     */
-    KEncFileIVecInit (d->id, &ivec);
-
-    /*
-     * set the ivec for both the master and data block ciphers
-     */
-    rc = KCipherSetEncryptIVec (self->ciphers.master, &ivec);
-    if (rc)
-        return rc;
-
-    rc = KCipherSetEncryptIVec (self->ciphers.block, &ivec);
-    if (rc)
-        return rc;
-
-    /*
-     * create the block user key out of the first 4kb of data and the block id 
-     */
-    saved_valid = valid = d->u.valid;
-    id = d->id;
-
-    SHA256StateInit (&state);
-    SHA256StateAppend (&state, d->data, 
-                       valid > 4096 ? 4096 : valid);
-    SHA256StateAppend (&state, &id, sizeof (id));
-    SHA256StateFinish (&state, d->key);
-        
-    /*
-     * create the block key schedule out of the block user key
-     */
-    rc = KCipherSetEncryptKey (self->ciphers.block, d->key, sizeof d->key);
-    if (rc)
-        return rc;
-
-    /* 
-     * Salt the block using the randomish user key to randomly select
-     * data from the valid data.
-     *
-     * This will cover the data portion of the block past the last valid
-     * byte.
-     *
-     * NOTE we are accessing a byte array as a word array. COuld be trouble
-     *      on some archaic processors such as the MC68000 family.
-     *
-     * NOTE we are using the array named data to access data beyond it's end
-     *      based on knowledge of the structure of the KEncFileBlock.
-     */
-    {
-        uint16_t * pw;
-        unsigned int windex;
-        unsigned int rindex;
-        size_t bindex;
-
-        pw = (uint16_t*)d->key;
-        windex = 0;
-
-        for (bindex = valid;
-             bindex < sizeof d->data + sizeof d->u; 
-             ++ bindex)
-        {
-            /* this goes beyond the end of the data array by design */
-            rindex = (size_t)pw[windex];
-            rindex %= bindex;
-
-            d->data[bindex] = d->data[rindex];
-        
-            ++rindex;
-            if (rindex >= sizeof self->block.key / sizeof *pw)
-                rindex = 0;
-        }
-    }
-
-    /* 
-     * If we are modifying a block created on a system with a different default
-     * Endian choice we'll need to byte swap the block id and the block valid
-     * count
-     */
-    if (self->bswap)
-    {
-        assert (sizeof id == 8);
-        id = bswap_64 (id);
-
-        assert (sizeof (valid = 2));
-        valid = bswap_16 (valid);
-    }
-
-    /* is this a bswap problem? */
-    if (saved_valid == sizeof d->data)
-        d->u.valid |= valid;
-    else
-        d->u.valid = valid;
-
-    e->id = id;
-
-    /* 
-     * encrypt the block user key into the buffer
-     */
-#if 0
-    {
-        unsigned iii;
-        KOutMsg ("v2 decrypted key %lu\n", d->id);
-        for (iii = 0; iii < sizeof (d->key); +++ iii) 
-            KOutMsg ("%2.2x ", d->key[iii]);
-        KOutMsg ("\n");
-    }
-#endif
-    rc = KCipherEncryptCBC (self->ciphers.master, d->key, e->key,
-                            sizeof (d->key) / sizeof (ivec));
-    if (rc)
-        return rc;
-#if 0
-    {
-        unsigned iii;
-        KOutMsg ("v2 encrypted key\n");
-        for (iii = 0; iii < sizeof (e->key); +++ iii) 
-            KOutMsg ("%2.2x ", e->key[iii]);
-        KOutMsg ("\n");
-    }
-#endif
-    /*
-     * encrypt the data, offset and valid values
-     */
-    rc = KCipherEncryptCBC (self->ciphers.block, 
-                            d->data, e->data,
-                            (sizeof d->data + sizeof d->u) / sizeof (ivec));
-    if (rc)
-        return rc;
-
-    d->u.valid = saved_valid;
-
-    crc = CRC32 (0, e, (char*)(&e->crc)-(char*)e);
-
-    self->block.crc = crc;
-
-    if (self->bswap)
-    {
-        assert (sizeof crc == 4);
-        crc = bswap_32 (crc);
-    }
-    e->crc_copy = e->crc = crc;
-
-/*     KOutMsg ("%s: %lu %lu %lu ", __func__, self->foot.block_count, self->foot.crc_checksum,self->block.id); */
-    if (self->foot.block_count <= self->block.id)
-        self->foot.block_count = self->block.id + 1;
-
-    if (!self->sought)
-        self->foot.crc_checksum += crc;
-
-/*     KOutMsg ("%lu %lu\n", __func__, self->foot.block_count, self->foot.crc_checksum); */
-
-    return 0;
-}
-
-
-/* ----------
- * BlockDecrypt
- *   decrypt decrypts the data from a KEncFileBlock into the KEncFileBlock
- *   in the KEncFile object
- *
- * Not thread safe - use of cipher schedules ivec and block key in the ciphers
- *
- * If this function were a protected region where only one thread could be in
- * the body of this function at a time it could be made thread safe.
- */
-static
-rc_t KEncFileBlockDecrypt (KEncFile * self, KEncFileBlockId bid,
-                           const KEncFileBlock * e, KEncFileBlock * d)
-{
-    KEncFileIVec ivec;
-    rc_t rc;
-
-    d->id = e->id;
-
-    /* create the initialization vector for this block */
-    KEncFileIVecInit (bid, &ivec);
-
-    /*
-     * set the ivec for both the master and data block ciphers
-     */
-    rc = KCipherSetDecryptIVec (self->ciphers.master, &ivec);
-    if (rc)
-        return rc;
-
-    rc = KCipherSetDecryptIVec (self->ciphers.block, &ivec);
-    if (rc)
-        return rc;
-
-    /* 
-     * decrypt the block key and initial vector using the user key and 
-     * the computer ivec
-     */
-    rc = KCipherDecryptCBC (self->ciphers.master, e->key, d->key,
-                            (sizeof e->key) / sizeof ivec);
-    if (rc)
-        return rc;
-
-    /* 
-     * now create the AES key for the block from the newly decrypted 
-     * block key
-     */
-    rc = KCipherSetDecryptKey (self->ciphers.block, d->key,
-                               sizeof d->key);
-    if (rc)
-        return rc;
-
-    rc = KCipherDecryptCBC (self->ciphers.block, e->data, d->data,
-                            (sizeof e->data + sizeof e->u) / sizeof ivec);
-    if (rc)
-        return rc;
-
-    if (self->bswap)
-    {
-        assert (sizeof d->u.valid == 2);
-        d->u.valid = bswap_16 (d->u.valid);
-    }
-
-    if (d->u.valid >= sizeof d->data)
-        d->u.valid = sizeof d->data;
-    else
-        memset (d->data + d->u.valid, 0, sizeof d->data - d->u.valid);
-
-    return rc;
-}
-
-
-/*
- * if not decrypting block can be NULL
- */
-
-/*
-  TBD: figure out rational way to handle bad password making blocks look really weird
-  If we have one that looks like a partial but isn't the last block -what do we do?
-*/
-
-static
-rc_t KEncFileBlockRead (KEncFile * self, KEncFileBlock * block, 
-                        KEncFileBlockId block_id, bool validate)
-{
-    union
-    {
-        KEncFileBlock b;
-        KEncFileFooter f;
-    } u;
-    size_t num_read;
-    uint64_t epos, dpos;
-    rc_t vrc, rc = 0;
-    bool missing;
-
-    assert (self);
-    assert ((validate == false) || (validate == true));
-    /* we should be decrypting or validating - maybe both */
-    assert ((block != NULL) || (validate == true));
-
-    /* translate block id into both encrypted and decrypted addresses */
-    epos = BlockId_to_CiphertextOffset ( block_id );
-    dpos = BlockId_to_PlaintextOffset ( block_id );
-
-    missing = false;
-
-    /* clear out target block */
-    if (block != NULL)
-        memset (block, 0, sizeof * block);
-
-    rc = KEncFileBufferRead (self, epos, &u.b, sizeof u.b, &num_read);
-    if (rc)
-    {
-        PLOGERR (klogErr, (klogErr, rc, "Failure to read block '$(B)' at '$(E)'"
-                           " in encrypted file decrypted at '$(D)",
-                           "B=%lu,E=%lu,D=%lu", block_id, epos, dpos));
-    }
-    else
-    {
-        switch (num_read)
-        {
-        case 0:
-            self->eof = true;
-            /* ain't got no block here */
-            break;
-
-        default:
-            /* Invalid size */
-            rc = RC (rcKrypto, rcFile, rcReading, rcBuffer, rcInsufficient);
-            PLOGERR (klogErr, (klogErr, rc, "Failure to read full block '$(B)' "
-                               "at '$(E)' in encrypted file decrypted at '$(D)",
-                               "B=%lu,E=%lu,D=%lu", block_id, epos, dpos));
-            break;
-
-        case sizeof (u.f):
-            /* footer */
-            if (validate) /* validate before checking as missing */
-            {
-                KEncFileFooterSwap (self, &u.f);
-
-                if (u.f.block_count != block_id)
-                {
-                    vrc = RC (rcKrypto, rcFile, rcValidating, rcSize,
-                              rcIncorrect);
-                    PLOGERR (klogErr,  (klogErr, vrc, "read footer block count "
-                                        "'$(B)' does not match actual block "
-                                        "count '$(A)'", "B=%lu,A=%lu",
-                                        u.f.block_count, block_id));
-                    if ( rc == 0 )
-                        rc = vrc;
-                }
-                vrc = KEncFileFooterValidate (self, u.f.block_count,
-                                              u.f.crc_checksum);
-
-#if 1
-                if ( rc == 0 )
-                    rc = vrc;
-#else
-                /* what is the significance of a NULL block? */
-                if (block == NULL)
-                    rc = vrc;
-#endif
-            }
-
-            /* is it a "missing" footer? */
-            /* or if the footer appears invalid - make it "valid" */
-            if (((missing = BufferAllZero(&u.f, sizeof u.f)) == true) ||
-                (self->foot.block_count != block_id))
-            {
-/*                 self->foot.block_count = block_id; */
-                self->foot.crc_checksum = 0;
-            }
-
-            /* force some values though they might already be known */
-            self->enc_size = epos + sizeof u.f;
-            self->size_known = true;
-            self->dec_size = dpos;
-            self->eof = true;
-            break;
-
-        case sizeof (u.b):
-            /* block */
-            self->eof = false;
-            /* is it a "missing" block? */
-            if ((missing = BufferAllZero(&u.b, sizeof u.b)) == true)
-            {
-                if (validate)
-                {
-                    vrc = RC (rcKrypto, rcFile, rcValidating,
-                                   rcData, rcNull);
-
-                    PLOGERR (klogErr, (klogErr, vrc, "read missing block at "
-                                       "block number '$(I)' encrypted position "
-                                       "$(E) decrypted postion $(D)",
-                                       "I=%lu,E=%lu,D=%lu", block_id, epos,
-                                       dpos));
-                    if ( rc == 0 )
-                        rc = vrc;
-                }
-                u.b.id = block_id;
-                u.b.u.valid = sizeof u.b.data;
-
-                /* if we can only learn of the size by reading and are thus scanning
-                 * through the current decrypt position must be the current known
-                 * decrypted side size
-                 */
-                if (!self->size_known)
-                {
-                    assert (dpos == self->dec_size);
-                    self->dec_size = dpos + sizeof u.b.data;
-                }
-                /*
-                 * if we know the decrypted size and it is less than what we
-                 * read, adjust the valid.  BUT this must not be for the block read
-                 * for the last block to know the decrypted size. A chicken and egg
-                 * problem.
-                 */
-                else if ((self->dec_size >= dpos) &&
-                         (self->dec_size < dpos + sizeof u.b.data))
-                    u.b.u.valid  = (uint16_t)(self->dec_size - dpos);
-            }
-
-            /* we read a full block that wasn't all zeroes */
-            else
-            {
-                /* since we've chosen not to standardize the file format byte ordering */
-                if (self->bswap)
-                {
-                    assert (sizeof u.b.crc == 4);
-                    u.b.crc = bswap_32 (u.b.crc);
-                    u.b.crc_copy = bswap_32 (u.b.crc_copy);
-
-                    assert (sizeof u.b.id == 8);
-                    u.b.id = bswap_64 (u.b.id);
-                }
-
-                if (validate)
-                {
-                    uint32_t crc;
-
-                    if (block_id != u.b.id)
-                    {
-                        vrc = RC (rcKrypto, rcFile, rcValidating, rcIndex,
-                                  rcIncorrect);
-                        PLOGERR (klogErr, (klogErr, vrc, "error validating id "
-                                           "for block '$(BID)' is not $(C2)", 
-                                           "BID=%lu,C2=%lu", block_id, u.b.id));
-                        if ( rc == 0 )
-                            rc = vrc;
-                    }
-
-                    crc = CRC32 (0, &u.b, (char*)&u.b.crc - (char*)&u.b);
-
-                    if (crc != u.b.crc)
-                    {
-                        vrc = RC (rcKrypto, rcFile, rcValidating, rcChecksum, rcCorrupt);
-                        PLOGERR (klogErr,
-                                 (klogErr,
-                                  vrc,
-                                  "error validating crc for block '$(BID)' $(C1) is not $(C2)", 
-                                  "BID=%lu,C1=0x%X,C2=0x%X", block_id,
-                                  crc, u.b.crc));
-                        if ( rc == 0 )
-                            rc = vrc;
-                    }
-                    if (crc != u.b.crc_copy)
-                    {
-                        vrc = RC (rcKrypto, rcFile, rcValidating, rcChecksum, rcCorrupt);
-                        PLOGERR (klogErr,
-                                 (klogErr,
-                                  vrc,
-                                  "error validating crc_copy for block '$(BID)' $(C1) is not $(C2)", 
-                                  "BID=%lu,C1=0x%X,C2=0x%X", block_id,
-                                  crc, u.b.crc_copy));
-                        if ( rc == 0 )
-                            rc = vrc;
-                    }
-                }
-            }
-            if (self->sought == false)
-            {
-                if (block_id == 0)
-                {
-                    self->foot.block_count = 1;
-                    self->foot.crc_checksum = u.b.crc;
-                }
-                else
-                {
-                    ++self->foot.block_count;
-                    self->foot.crc_checksum += u.b.crc;
-                }
-            }
-
-            if (block != NULL)
-            {
-                if (missing)
-                {
-                    if (self->dad.write_enabled == false)
-                        rc = RC (rcKrypto, rcFile, rcReading, rcData, rcIncomplete);
-                    else
-                    {
-                        memcpy (block, &u.b, sizeof u.b);
-                        rc = 0;
-                    }
-                }
-                else
-                {
-                    rc = KEncFileBlockDecrypt (self, block_id, &u.b, block);
-                    if (rc == 0)
-                    {
-                        if (block_id == 0)
-                        {
-                            rc_t sra = KFileIsSRA ((const char *)block->data, block->u.valid);
-                            self->sra =  (sra == 0);
-                        }
-
-                        if (!self->size_known)
-                        {
-                            assert (dpos == self->dec_size);
-                            self->dec_size = dpos + sizeof u.b.u.valid;
-                            if (u.b.u.valid != sizeof u.b.data)
-                            {
-                                self->size_known = true;
-                                self->enc_size = epos + sizeof u.b + sizeof self->foot;
-                            }
-                        }
-                    }
-                }
-            }
-            break;
-        }
-    }
-    return rc;
-}
-
-
-/*
- * Take a dirty block, encrypt it and write it to the backing file
- */
-static
-rc_t KEncFileBlockFlush (KEncFile * self, KEncFileBlock * dec_block)
-{
-    rc_t rc = 0;
-
-    assert (self);
-    assert (dec_block);
-
-
-    if (dec_block->id == 0)
-    {
-        rc = KFileIsSRA ((const char *)(dec_block->data), sizeof (KSraHeader));
-
-        /* we wait ALL the way until we try to flush the first block before we set
-         * the sra flag for write only files.
-         * we get it when we read the first block otherwise.
-         */
-        if (self->sra != (rc == 0))
-        {
-            self->sra = (rc == 0);
-            self->has_header = false;
-        }
-    }
-    if ((dec_block->id == 0) || (self->seekable))
-    {
-        if (!self->has_header)
-        {
-            if (!self->swarm)
-            {
-                rc = KEncFileHeaderWrite (self);
-                if (rc)
-                    return rc;
-            }
-            else if (dec_block->id == 0)
-                self->enc_size = sizeof (KEncFileHeader);
-        }
-    }
-
-/*     if (self->dirty) */
-    {
-        KEncFileBlock enc_block;
-
-        rc = KEncFileBlockEncrypt (self, dec_block, &enc_block);
-        if (rc == 0)
-        {
-            KEncFileBlockId block_id;
-            uint64_t pos;
-            size_t num_writ;
-
-            block_id = dec_block->id;
-
-            pos = BlockId_to_CiphertextOffset ( block_id );
-
-            rc = KEncFileBufferWrite (self, pos, &enc_block, sizeof enc_block,
-                                      &num_writ);
-
-            if (rc)
-                PLOGERR (klogErr, (klogErr, rc,
-                                   "error writing encrypted block '$(B)'",
-                                   "B=%lu", block_id));
-
-            else if (num_writ != sizeof enc_block)
-            {
-                rc = RC (rcKrypto, rcFile, rcWriting, rcBuffer, rcInsufficient);
-                PLOGERR (klogErr, (klogErr, rc, "error writing encrypted block "
-                                   "'$(B)' wrote '$(Z)' not '$(Y)'",
-                                   "B=%lu, Z=%zu", block_id, num_writ,
-                                   sizeof enc_block));
-            }
-            else
-                self->dirty = false;
-        }
-    }
-
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * Interface Functions
- *
- * Destroy
- *
- */
-static
-rc_t CC KEncFileDestroy (KEncFile *self)
-{
-    rc_t rc1 = 0;
-    rc_t rc2 = 0;
-    rc_t rc3 = 0;
-    rc_t rc4 = 0;
-    rc_t rc5 = 0;
-    rc_t rc6 = 0;
-
-    assert (self);
-
-    if (self->dad.write_enabled)
-    {
-        /*
-         * write the header if we've written nothing to an empty file
-         * or if we've written something which will mean a change to v2
-         * of the encrypted file format
-         */
-        if ((self->dec_size == 0) || (self->seekable && self->changed) ||
-            ((self->dec_size == 0) && (!self->dad.read_enabled) && self->changed && (self->has_header == false)))
-/* SMURF IX
-            (self->has_header == false))
- */
-            rc1 = KEncFileHeaderWrite (self);
-
-        /* write any dirty block */
-        if (self->dirty)
-            rc2 = KEncFileBlockFlush (self, &self->block);
-
-        /* [re]write footer */
-        if (self->changed)
-            rc3 = KEncFileFooterWrite (self);
-    }
-    rc4 = KFileRelease (self->encrypted);
-    rc5 = KCipherRelease (self->ciphers.master);
-    rc6 = KCipherRelease (self->ciphers.block);
-
-    free (self);
-    
-    if (rc1)
-        return rc1;
-    if (rc2)
-        return rc2;
-    if (rc3)
-        return rc3;
-    if (rc4)
-        return rc4;
-    if (rc5)
-        return rc5;
-    return rc6;
-}
-
-
-/* ----------------------------------------------------------------------
- * GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- *
- * We do not allow this for read, write or update as you can not memory map the 
- * unencrypted file in a meaningful way.
- */
-static
-struct KSysFile *CC KEncFileGetSysFile (const KEncFile *self, uint64_t *offset)
-{
-    assert (self);
-    assert (offset);
-
-    return NULL;
-}
-
-
-/* ----------------------------------------------------------------------
- * RandomAccess
- *
- *  returns 0 if random access, error code otherwise
- */
-static
-rc_t CC KEncFileRandomAccess (const KEncFile *self)
-{
-    assert (self != NULL);
-    assert ((self->seekable == true) || (self->seekable == false));
-
-    /* we checked for random access in the contructor */
-    if (self->seekable)
-        return 0;
-
-    return RC (rcFS, rcFile, rcUpdating, rcFunction, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KEncFileSize (const KEncFile *self, uint64_t *size)
-{
-    if (!self->size_known)
-        return RC (rcKrypto, rcFile, rcAccessing, rcSize, rcUnsupported);
-
-    *size = self->dec_size;
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- *
- * This is the size of the decrypted payload not of the encrypted file
- */
-static
-rc_t KEncFileSetSizeBlockFull (KEncFile *self, uint64_t block_id)
-{
-    if ((self->block.id == block_id) && (self->block.u.valid != 0))
-    {
-        if (self->block.u.valid < sizeof self->block.data)
-        {
-            self->block.u.valid = sizeof self->block.data;
-            self->dirty = true;
-        }
-        else
-            assert (self->block.u.valid  == sizeof self->block.data);
-    }
-    else
-    {
-        KEncFileBlock block;
-        rc_t rc;
-
-        rc = KEncFileBlockRead (self, &block, block_id, false);
-        if (rc)
-            return rc;
-
-/*         if (self->block.u.valid  != sizeof self->block.data) */
-/*         { */
-/*             OUTMSG (("%s: %u %u\n", __func__,self->block.u.valid,sizeof self->block.data)); */
-/*             OUTMSG (("%s: %lu %lu\n", __func__,self->block.id,block_id)); */
-/*         } */
-
-        /* only change block if not "missing" */
-        if (BufferAllZero (&block, sizeof block) == false)
-        {
-            assert (block.id == block_id);
-
-            /* only change if not already full - shouldnt get here if not? */
-            if (block.u.valid < sizeof block.data)
-            {
-                self->changed = self->sought = true;
-                block.u.valid = sizeof block.data;
-
-                rc = KEncFileBlockFlush (self, &block);
-                if (rc)
-                    return rc;
-            }
-            else
-                assert (self->block.u.valid  == sizeof self->block.data);
-        }
-    }
-    return 0;
-}
-
-
-static
-rc_t KEncFileSetSizeBlockPartial (KEncFile *self, uint64_t block_id, uint32_t valid)
-{
-    if ((self->block.id == block_id) && (self->block.u.valid != 0))
-    {
-        if (self->block.u.valid != valid)
-        {
-            self->block.u.valid = valid;
-            self->dirty = true;
-        }
-    }
-    else
-    {
-        KEncFileBlock block;
-        rc_t rc;
-
-        rc = KEncFileBlockRead (self, &block, block_id, false);
-        if (rc)
-            return rc;
-
-        /* only change block if not "missing" */
-        if (BufferAllZero (&block, sizeof block) == false)
-        {
-            assert (block.id == block_id);
-
-            if (block.u.valid != valid)
-            {
-                self->changed = self->sought = true;
-                block.u.valid = valid;
-                
-                rc = KEncFileBlockFlush (self, &block);
-                if (rc)
-                    return rc;
-            }
-        }
-    }
-    return 0;
-}
-
-
-static
-rc_t KEncFileSetSizeInt (KEncFile *self, uint64_t dec_size)
-{
-    uint64_t trim_size = 0;
-    uint64_t enc_size;
-    bool do_size = true;
-
-    rc_t rc = 0;
-
-    /* should we not have been called? */
-    if ((dec_size == self->dec_size) && (self->enc_size != 0))
-        return 0;
-
-    /* if wiping out the whole file */
-    if (dec_size == 0)
-    {
-        trim_size = sizeof (KEncFileHeader);
-        enc_size = (sizeof (KEncFileHeader) + sizeof (KEncFileFooter));
-
-        /* if we did clear out the RAM structures to match */
-        memset (&self->block, 0, sizeof self->block);
-        memset (&self->foot, 0, sizeof self->foot);
-        self->dirty = false;
-        self->size_known = true;
-        self->bswap = false;
-        self->changed = true;
-        self->sought = false;
-        self->has_header = false;
-        self->version = eCurrentVersion;
-    }
-    else
-    {
-        KEncFileBlockId new_bid;    /* block id of new last block */
-        KEncFileBlockId new_fid;    /* block id of new footer / block count */
-        uint32_t        new_doff;   /* bytes into last partial block */
-
-        /*
-         * determine sizes of decrypted virtual file
-         * and encrypted 'real' file
-         */
-
-        /*
-          NB - the following code utilizes a function for converting
-          an OFFSET to a zero-based block-id. However, it passes in a size.
-          By examining new_doff, it detects the case where "dec_size" is an
-          exact multiple of plaintext block size, and takes the return to
-          be a "block-id" of the footer, and new_bid to be the last block.
-
-          in the case where "new_doff" is zero, "new_bid" will be the effective
-          id of the footer, and "new_bid" will need to be adjusted to the previous
-          full block.
-
-          in the case where "new_doff" is not zero, "new_bid" will be the
-          last data block id, and the footer will be one beyond.
-
-          although the code utilizes incorrect and misleading primitives,
-          it works.
-         */
-
-        new_fid = new_bid = PlaintextOffset_to_BlockId (dec_size, &new_doff);
-        if (new_doff == 0)
-            --new_bid; /* exactly fills a block */
-        else
-            ++new_fid;  /* leaves a partial block */
-    
-        enc_size = BlockId_to_CiphertextOffset ( new_fid ) + sizeof self->foot;
-
-        /* are we starting with an empty file? It's easy if we are */
-        if (self->dec_size == 0)
-        {
-            /* TBD - this looks incorrect... what about KEncFileHeader?
-               the code below would use BlockId_to_CiphertextOffset()
-             */
-            trim_size = sizeof (KEncFileHeader);
-
-            /* if we did clear out the RAM structures to match */
-            memset (&self->block, 0, sizeof self->block);
-            self->bswap = false;
-            self->changed = true;
-            self->version = eCurrentVersion;
-        }
-        else
-        {
-            KEncFileBlockId old_bid;    /* block id of old last block */
-            KEncFileBlockId old_fid;    /* block id of old footer / block count */
-            uint32_t        old_doff;   /* bytes into last partial block */
-
-            old_fid = old_bid = PlaintextOffset_to_BlockId (self->dec_size, &old_doff);
-            if (old_doff == 0)
-                --old_bid; /* exactly fills a block */
-            else
-                ++old_fid;  /* leaves a partial block */
-
-            /* are we only changing the last block? */
-            if (old_bid == new_bid)
-            {
-                assert ((self->dad.read_enabled == false) || (self->enc_size == enc_size));
-
-                if (new_doff == 0)
-                {
-                    /* change from partial to full last block */
-                    rc = KEncFileSetSizeBlockFull (self, new_bid);
-                }
-                else
-                {
-                    /* resize last block */
-                    rc = KEncFileSetSizeBlockPartial (self, new_bid, new_doff);
-                }
-
-                /* no need to resize underlying file */
-                do_size = false;
-            }
-            else
-            {
-
-                /* truncating the file? */
-                if (dec_size < self->dec_size)
-                {
-                    trim_size = BlockId_to_CiphertextOffset ( new_fid );
-
-                    /* do we throw away the block in the object? */
-                    if (self->block.id > new_bid)
-                    {
-                        self->dirty = false;
-                        memset (&self->block, 0, sizeof self->block);
-                    }
-
-                    /* we only change the new last block if its now partial */
-                    if ( new_doff != 0 )
-                        rc = KEncFileSetSizeBlockPartial (self, new_bid, new_doff);
-
-                }
-                /* expanding the file */
-                else
-                {
-                    assert (dec_size > self->dec_size);
-
-                    trim_size = BlockId_to_CiphertextOffset ( old_fid );
-
-                    /* make old last block a full block if it wasn't already */
-                    if ( old_doff != 0 )
-                        rc = KEncFileSetSizeBlockFull (self, old_bid);
-                }
-            }
-        }
-    }
-    if (rc == 0)
-    {
-        if (do_size)
-        {
-            /* first trim for some reason... sparse files? */
-            rc = KFileSetSize (self->encrypted, trim_size);
-            if (rc)
-                LOGERR (klogErr, rc, "failure to trim size of encrypted file");
-            else
-            {
-                /* now extend to encrypted size */
-                rc = KFileSetSize (self->encrypted, enc_size);
-                if (rc)
-                    LOGERR (klogErr, rc, "failure to file size of encrypted file");
-            }
-        }
-        if (rc == 0)
-        {
-            self->enc_size = enc_size;
-            self->dec_size = dec_size;
-        }
-    }
-    return rc;
-}
-
-
-static
-rc_t CC KEncFileSetSize (KEncFile *self, uint64_t dec_size)
-{
-    assert (self);
-    assert (self->encrypted);
-
-    if (self->dad.write_enabled == false)
-        return RC (rcKrypto, rcFile, rcResizing, rcFile, rcNoPerm);
-
-    if ((self->seekable == false) || (self->size_known == false))
-        return RC(rcKrypto, rcFile, rcAccessing, rcFunction, rcUnsupported);
-
-    /* silently ignore changes in size that don't change the size */
-    if (dec_size == self->dec_size)
-        return 0;
-
-    else
-        return KEncFileSetSizeInt (self, dec_size);
-}
-
-
-/* ----------------------------------------------------------------------
- * Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-rc_t CC KEncFileRead (const KEncFile *cself,
-                      uint64_t pos,
-                      void *buffer,
-                      size_t bsize,
-                      size_t *num_read)
-{
-    KEncFile * self = (KEncFile *)cself; /* mutable values */
-    uint64_t max_bid;
-    uint64_t block_id;
-    uint32_t offset;
-    rc_t rc = 0;
-
-    assert (self); /* checked in file.c KFileRead() */
-    /* pos can be 'anything' */
-    assert (buffer); /* checked in file.c KFileRead() */
-    assert (bsize); /* checked in file.c KFileRead() */
-    assert (num_read); /* checked in file.c KFileRead() */
-
-    assert (self->dad.read_enabled);
-    assert (self->encrypted);
-
-    /* do we have a decrypted_size? */
-
-    block_id = PlaintextOffset_to_BlockId (pos, &offset);
-
-    switch ( ( uint32_t ) self->size_known)
-    {
-    case 0:
-
-        max_bid = EncryptedPos_to_BlockId (self->enc_size, NULL, NULL);
-
-        /* if past end of file as we know it so far quick out */
-        if (max_bid <= block_id)
-            return 0;
-        break;
-
-    case 1:
-        /* if past end of file quick out */
-        if (pos > self->dec_size)
-            return 0;
-        break;
-
-    default:
-        assert (0 && self->size_known);
-        break;
-    }
-
-    /*
-     * are we on the wrong block?
-     * Or are do we need to read the first block?
-     */
-    if ((block_id != self->block.id) || (self->block.u.valid == 0))
-    {
-        if ((!self->seekable) && (self->block.id + 1 != block_id))
-        {
-            rc = RC (rcFS, rcFile, rcReading, rcOffset, rcIncorrect);
-            PLOGERR (klogErr, (klogErr, rc, "attempt to seek in encryption write at"
-                               " '$(O)' seek to '$(P)'", "O=%lu,P=%lu",
-                               BlockId_to_CiphertextOffset(self->block.id), pos));
-        }
-        else
-        {
-            /* flush any dirty block */
-            if (self->dirty)
-            {
-                assert (self->dad.write_enabled);
-                rc = KEncFileBlockFlush (self, &self->block);
-            }
-
-            /* now try to read in a new block */
-            if (rc == 0)
-                rc = KEncFileBlockRead (self, &self->block, block_id, false);
-
-            if (rc == 0)
-            {
-                uint64_t read_max;
-
-                read_max = BlockId_to_PlaintextOffset ( block_id ) + self -> block . u . valid;
-                if (self->dec_size < read_max)
-                    self->dec_size = read_max;
-            }
-        }
-    }
-
-    /*
-     * if we are trying to read past the end of the file 
-     * return 0 with nothing read
-     */
-    if ((rc == 0) &&
-        (block_id == self->block.id) &&
-        (offset < self->block.u.valid))
-    {
-        size_t to_copy;
-
-        to_copy = self->block.u.valid - offset;
-        if (to_copy > bsize)
-            to_copy = bsize;
-
-        memmove (buffer, self->block.data + offset, to_copy);
-        *num_read = to_copy;
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- */
-static
-rc_t CC KEncFileWrite (KEncFile *self, uint64_t pos,
-                       const void *buffer, size_t bsize,
-                       size_t *pnum_writ)
-{
-    rc_t rc = 0;
-
-    assert (self);
-    assert (buffer);
-    assert (bsize > 0);
-    assert (pnum_writ);
-
-    assert (self->dad.write_enabled);
-    assert (self->encrypted);
-
-/*     KOutMsg ("+++++\n%s: pos %lu\n",__func__,pos); */
-
-    if (self->dec_size != pos)
-    {
-        /* write only does not allow seeks */
-        if ((!self->dad.read_enabled) && (!self->swarm))
-        {
-            rc = RC (rcFS, rcFile, rcWriting, rcOffset, rcIncorrect);
-            PLOGERR (klogErr, (klogErr, rc, "attempt to seek in encryption write at"
-                               " '$(O)' seek to '$(P)'", "O=%lu,P=%lu",
-                               BlockId_to_CiphertextOffset(self->block.id), pos));
-        }
-        else
-            self->sought = true;
-    }
-    if (rc == 0)
-    {
-        uint64_t block_id;
-        uint32_t offset;
-        uint64_t block_max;
-        uint64_t new_size;
-
-        rc = 0;
-        /* Block Id for this write */
-        block_id = PlaintextOffset_to_BlockId (pos, &offset);
-
-        block_max = BlockId_to_PlaintextOffset ( block_id + 1 );
-
-        new_size = pos + bsize;
-        if (new_size > block_max)
-            bsize = block_max - new_size;
-
-
-        /* is the new position beyond the current file length? */
-        if ((new_size > self->dec_size) && (self->dad.read_enabled) && (!self->swarm))
-        {
-            rc = KEncFileSetSizeInt (self, new_size);
-            if (rc)
-                return rc;
-        }
-
-        /* are we going to a new block? */
-        if ((block_id != self->block.id) || (self->block.u.valid == 0))
-        {
-            /* do we have sometihng to flush first? */
-            if (self->dirty)
-            {
-                assert (self->dad.write_enabled);
-                rc = KEncFileBlockFlush (self, &self->block);
-            }
-
-            if (rc == 0)
-            {
-                /* if we are going to over write the whole block */
-                if ((!self->dad.read_enabled) ||
-                    ((offset == 0) && (bsize >= sizeof (self->block.data))))
-                {
-                    memset (&self->block, 0, sizeof self->block);
-                    self->block.id = block_id;
-                }
-                /* else try to fetch an existing block */
-                else
-                    rc = KEncFileBlockRead (self, &self->block, block_id, false);
-            }
-        }
-
-        if (rc == 0)
-        {
-            /* we are at the right block and ready to write */
-            uint32_t new_valid;
-            size_t to_copy;
-
-            /*
-             * force block id to be right even if fetch was beyond end of 
-             * existing file
-             */
-            self->block.id = block_id;
-
-/*             to_copy = sizeof self->block.data - self->block.u.valid; */
-            to_copy = sizeof self->block.data - offset;
-
-            if (to_copy > bsize)
-                to_copy = bsize;
-
-            memmove (self->block.data + offset, buffer, to_copy);
-            self->dirty = true;
-            *pnum_writ = to_copy;
-
-            new_valid = (uint32_t) ( offset + to_copy );
-            if (new_valid > self->block.u.valid)
-            {
-                uint64_t new_size;
-
-                self->block.u.valid = new_valid;
-
-                new_size = pos + to_copy;
-                if (new_size > self->dec_size)
-                    self->dec_size = new_size;
-            }
-
-            if (self->swarm)
-                rc = KEncFileBlockFlush (self, &self->block);
-
-
-        }
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- *
- * Just return what the backing file says...
- */
-static
-uint32_t CC KEncFileType (const KEncFile *self)
-{
-    assert (self != NULL);
-    assert (self->encrypted != NULL);
-
-    return KFileType (self->encrypted);
-}
-
-
-/* ----------------------------------------------------------------------
- * KEncFileMake
- *  create a new file object
- */
-
-/* ----------
- * KeysInit
- */
-static
-rc_t KEncFileCiphersInit (KEncFile * self, const KKey * key, bool read, bool write)
-{
-    KCipherManager * mgr;
-    size_t z;
-    rc_t rc;
-
-    switch ( key->type)
-    {
-    default:
-        return RC (rcKrypto, rcEncryptionKey, rcConstructing, rcParam, rcInvalid);
-
-    case kkeyNone:
-        return RC (rcKrypto, rcEncryptionKey, rcConstructing, rcParam, rcIncorrect);
-
-    case kkeyAES128:
-        z = 128/8; break;
-
-    case kkeyAES192:
-        z = 192/8; break;
-
-    case kkeyAES256:
-        z = 256/8; break;
-    }
-    rc = KCipherManagerMake (&mgr);
-    if (rc == 0)
-    {
-        rc = KCipherManagerMakeCipher (mgr, &self->ciphers.master, kcipher_AES);
-        if (rc == 0)
-        {
-            rc = KCipherManagerMakeCipher (mgr, &self->ciphers.block, kcipher_AES);
-            if (rc == 0)
-            {
-                rc = KCipherSetDecryptKey (self->ciphers.master, key->text, z);
-                if (rc == 0)
-                {
-                    rc = KCipherSetEncryptKey (self->ciphers.master, key->text, z);
-                    if (rc == 0)
-                        goto keep_ciphers;
-                }
-                KCipherRelease (self->ciphers.block);
-                self->ciphers.block = NULL;
-            }
-            KCipherRelease (self->ciphers.master);
-            self->ciphers.master = NULL;
-        }
-    keep_ciphers:
-        KCipherManagerRelease (mgr);
-    }
-    return rc;
-}
-
-
-
-static const KFile_vt_v1 vtKEncFile =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KEncFileDestroy,
-    KEncFileGetSysFile,
-    KEncFileRandomAccess,
-    KEncFileSize,
-    KEncFileSetSize,
-    KEncFileRead,
-    KEncFileWrite,
-    
-    /* 1.1 */
-    KEncFileType
-};
-
-
-static
-rc_t  KEncFileMakeIntValidSize (uint64_t enc_size, bool w)
-{
-
-    if (enc_size == 0)
-    {
-        if (w)
-            return 0;
-    }
-    else
-    {
-        uint64_t min_size = sizeof (KEncFileHeader) + sizeof (KEncFileFooter);
-        uint64_t block_count;
-
-        if (enc_size >= min_size)
-        {
-            block_count = EncryptedPos_to_BlockId (enc_size, NULL, NULL);
-
-            if (enc_size - BlockId_to_CiphertextOffset (block_count) == sizeof (KEncFileFooter))
-                return 0;
-        }
-    }
-    return RC (rcKrypto, rcFile, rcConstructing, rcSize, rcIncorrect);
-}
-
-
-/* ----------
- * MakeInt
- *    common make for all encryptor/decryptors
- */
-static
-rc_t KEncFileMakeInt (KEncFile ** pself, KFile * encrypted,
-                      bool r, bool w, bool v, bool s)
-{
-    uint64_t enc_size;
-    rc_t rc = 0, orc;
-    bool seekable;
-    bool size_known;
-
-    assert (pself);
-    assert (encrypted);
-    assert (((r == true) || (r == false)) &&
-            ((w == true) || (w == false)) &&
-            ((v == true) || (v == false)));
-
-    /* must be able to do at elast one of read and write */
-    assert (r || w);
-
-    /* expecting to validate read only right now */
-/*     assert ((v && r && !w) || (!v)); */
-
-    if (w && ! encrypted->write_enabled)
-    {
-        rc = RC (rcKrypto, rcFile, rcConstructing, rcFile, rcReadonly);
-        LOGERR (klogErr, rc, "Can not make a encryptor for a unwritable file");
-    }
-    if (r && ! encrypted->read_enabled)
-    {
-        orc = RC (rcKrypto, rcFile, rcConstructing, rcFile, rcWriteonly);
-        LOGERR (klogErr, orc, "Can not make a decryptor for an unreadable file");
-        if (rc == 0)
-            rc = orc;
-    }
-    if (rc)
-        return rc;
-
-    /* determine whether the original file can tell us the size */
-    rc = KFileSize (encrypted, &enc_size);
-    if (rc == 0)
-        size_known = true;
-
-    else if (GetRCState(rc) == rcUnsupported)
-        size_known = false;
-    
-    else
-        return rc;
-
-    if (!v && size_known)
-    {
-        rc = KEncFileMakeIntValidSize (enc_size, w);
-        if (rc)
-            return rc;
-    }
-
-    /* determine whether the original file allows seeks */
-    rc = KFileRandomAccess (encrypted);
-    if (rc == 0)
-        seekable = true;
-
-    else if (GetRCState(rc) == rcUnsupported)
-        seekable = false;
-
-    else
-    {
-        LOGERR (klogErr, rc, "error checking random access building "
-                "encrypted file");
-        return rc;
-    }
-
-    /* We are currently only supporting update on seekable and size_known original files */
-    if (r && w && ((!seekable) || (!size_known)))
-    {
-        rc = RC (rcKrypto, rcFile, rcConstructing, rcFile, rcIncorrect);
-        LOGERR (klogErr, rc, "encryptor/decryptor requires seek and size ability");
-        return rc;
-    }
-
-    rc = KFileAddRef (encrypted);
-    if (rc)
-    {
-        LOGERR (klogErr, rc, "Could not add reference to encrypted file");
-        return rc;
-    }
-    else
-    {
-        KEncFile * self;
-
-        /* allocate and zero out an object since we want much of it to be zeroed */
-        self = calloc (1, sizeof *self);
-        if (self == NULL)
-        {
-            rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-            LOGERR (klogSys, rc,
-                    "out of memory creating encryptor and/or decryptor");
-        }
-        else
-        {
-            /* all KFiles get this initialization */
-            rc = KFileInit (&self->dad, (const KFile_vt*)&vtKEncFile, "KEncFile", "no-name", r, w);
-            if (rc)
-                LOGERR (klogInt, rc, "error with init for encrypted file");
-
-            else
-            {
-                self->encrypted = encrypted;
-                self->swarm = s;
-
-                /* write only or empty updatable */
-                if ((!r) || (w && size_known && (enc_size == 0)))
-                {
-                    /* dummy size to make the SetSizeInt work */
-                    self->enc_size = enc_size;
-                    rc = KEncFileSetSizeInt (self, 0);
-                    self->seekable = r && seekable;
-                }
-                else
-                {
-                    self->enc_size = enc_size;
-                    self->seekable = seekable;
-                    self->size_known = size_known;
-                    rc = KEncFileHeaderRead (self);
-                }
-                if (rc == 0)
-                {
-                    *pself = self;
-                    return 0;
-                }
-            }
-            free (self);
-        }
-        KFileRelease (encrypted);
-    }
-    return rc;
-}
-
-
-static
-rc_t KEncFileMakeSize (KEncFile *self)
-{
-    KEncFileBlockId fid;
-    rc_t rc;
-
-    assert (self->seekable);
-
-    /*
-     * turn the encrypted size into a block/offset
-     * the offset should be 0 for a missing footer
-     * or the size of a footer
-     */
-    fid = EncryptedPos_to_BlockId (self->enc_size, NULL, NULL);
-
-    assert (BlockId_to_CiphertextOffset(fid) + sizeof (self->foot) == self->enc_size);
-
-    if (fid == 0)
-        self->dec_size = 0;
-
-    else
-    {
-        KEncFileBlockId bid = fid - 1;
-        KEncFileBlock b;
-
-        /*
-         * not calling this a seek as its not reading a data block
-         * out of order that will be modified
-         */
-        rc = KEncFileBlockRead (self, &b, bid, false);
-        if (rc)
-            return rc;
-        else
-        {
-            if (BufferAllZero(&b, sizeof b) == true)
-                self->dec_size = BlockId_to_PlaintextOffset (bid) + 
-                    sizeof self->block.data;
-
-            else
-                self->dec_size = BlockId_to_PlaintextOffset (bid) + b.u.valid;
-        }
-    }
-    self->size_known = true;
-    return 0;
-}
-
-
-/* ----------
- * MakeCmn
- * common parameter validation for all encryptor/decryptors
- */
-static
-rc_t KEncFileMakeCmn (KEncFile ** pself, KFile * encrypted, const KKey * key,
-                      bool r, bool w, bool s)
-{
-    rc_t rc = 0, orc;
-
-    assert (((r == true)||(r == false))&&((w == true)||(w == false)));
-    assert (w || r);
-
-    if (pself == NULL)
-    {
-        rc = RC (rcKrypto, rcFile, rcConstructing, rcSelf, rcNull);
-        LOGERR (klogErr, rc,
-                "pointer to self NULL when creating "
-                "an encryptor/decryptor");
-    }
-    else
-        *pself = NULL;
-
-    if (encrypted == NULL)
-    {
-        orc = RC (rcFS, rcFile, rcConstructing, rcParam, rcNull);
-        LOGERR (klogErr, orc, 
-                "encrypted file not readable when creating "
-                "an encryptor/decryptor");
-        if (rc == 0)
-            rc = orc;
-    }
-
-    if (key == NULL)
-    {
-        orc = RC (rcFS, rcFile, rcConstructing, rcParam, rcNull);
-        LOGERR (klogErr, orc, 
-                "key not supplied when creating an encryptor/decryptor");
-        if (rc == 0)
-            rc = orc;
-    }
-
-    CRC32Init();    /* likely to be called way too often */
-
-    switch (key->type)
-    {
-    default:
-        orc = RC (rcFS, rcFile, rcConstructing, rcParam, rcInvalid);
-        PLOGERR (klogErr,
-                 (klogErr, orc, "invalid key type '$(T)' should be "
-                  "kkeyAES128(1), kkeyAES192(2) or kkeyAES256(3)",
-                  "T=%u", key->type));
-        if (rc == 0)
-            rc = orc;
-        break;
-
-    case kkeyAES128:
-    case kkeyAES192:
-    case kkeyAES256:
-        break;
-    }
-    if (rc == 0)
-    {
-        KEncFile * self;
-
-        assert ((r == true) || (r == false));
-        assert ((w == true) || (w == false));
-
-        rc = KEncFileMakeInt (&self, encrypted, r, w, false, s);
-        if (rc == 0)
-        {
-            rc = KEncFileCiphersInit (self, key, r, w);
-            if (rc == 0)
-            {
-                
-                if (self->seekable && self->size_known)
-                    rc = KEncFileMakeSize (self);
-
-                if (rc == 0)
-                {
-                    *pself = self;
-                    return 0;
-                }
-            }
-            KFileRelease (&self->dad);
-        }
-    }
-    return rc;
-}
-
-
-/* ----------
- * Read mode is fully seekable if the underlying KFile is seekable some
- * integrity checking will not be performed in allowing this seeking.
- */
-LIB_EXPORT rc_t CC KEncFileMakeRead_v2 (const KFile ** pself, 
-                                        const KFile * encrypted,
-                                        const KKey * key)
-{
-    KEncFile * self;
-    rc_t rc;
-
-    /*
-     * casting encrypted dowsn't actually make it writable
-     * it just lets us use a common constructor
-     */
-    rc = KEncFileMakeCmn (&self, (KFile *)encrypted, key, true, false, false);
-    if (rc)
-        LOGERR (klogErr, rc, "error constructing decryptor");
-
-    else
-        *pself = &self->dad;
-
-    return rc;
-}
-
-
-/* ----------
- * Write mode encrypted file can only be written straight through form the
- * first byte to the last.
- *
- * Existing content is lost.
- */
-LIB_EXPORT rc_t CC KEncFileMakeWrite_v2 (KFile ** pself, 
-                                         KFile * encrypted,
-                                         const KKey * key)
-{
-    KEncFile * self;
-    rc_t rc;
-
-    rc = KEncFileMakeCmn (&self, encrypted, key, false, true, false);
-    if (rc)
-        LOGERR (klogErr, rc, "error constructing encryptor");
-
-    else
-        *pself = &self->dad;
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KEncFileMakeUpdate_v2 (KFile ** pself, 
-                                          KFile * encrypted,
-                                          const KKey * key)
-{
-    KEncFile * self;
-    rc_t rc;
-
-/*     static int count = 0; */
-
-/*     KOutMsg ("%s: %d\n",__func__,++count); */
-
-    rc = KEncFileMakeCmn (&self, (KFile *)encrypted, key, true, true, false);
-    if (rc)
-        LOGERR (klogErr, rc, "error constructing encryptor/decryptor");
-
-    else
-        *pself = &self->dad;
-
-    return rc;
-}
-
-
-/* ----------
- * Swarm mode encrypted file can be writtenout of order but the footer is not
- * handled automatically
- */
-LIB_EXPORT rc_t CC KEncFileMakeBlock_v2 (KFile ** pself, 
-                                         KFile * encrypted,
-                                         const KKey * key)
-{
-    KEncFile * self;
-    rc_t rc;
-
-/*     static int count = 0; */
-
-/*     KOutMsg ("%s: %d\n",__func__,++count); */
-
-    rc = KEncFileMakeCmn (&self, (KFile *)encrypted, key, false, true, true);
-    if (rc)
-        LOGERR (klogErr, rc, "error constructing encryptor/decryptor");
-
-    else
-        *pself = &self->dad;
-
-    return rc;
-}
-
-
-/* ----------
- * Validate mode is useful only for the KFileEncValidate function
- */
-static
-rc_t KEncFileMakeValidate (KEncFile ** pself, const KFile * encrypted)
-{
-    KEncFile * self;
-    rc_t rc;
-
-    assert (pself);
-    assert (encrypted);
-
-    rc = KEncFileMakeInt (&self, (KFile*)encrypted, true, false, true, false);
-    if (rc)
-        LOGERR (klogErr, rc, "error making KEncFile");
-    else
-    {
-        rc = KEncFileHeaderRead (self);
-        if (rc)
-            LOGERR (klogErr, rc, "error reading encrypted file header");
-        else
-        {
-            *pself = self;
-            return 0;
-        }
-    }
-    *pself = NULL;
-    return rc;
-}
-
-
-/* ======================================================================
- * Interface extensions
- */
-
-
-/* ----------
- * Validate mode can not be read or written.
- * Upon open the whole file is read from begining to end and all CRC
- * and other integrity checks are performed immedaitely
- *
- * This will fail if the file being tested is not "at position 0" and can not
- * be sought back to 0.
- */
-
-
-
-LIB_EXPORT rc_t CC KEncFileValidate_v2 (const KFile * encrypted)
-{
-    KEncFile * file;
-    rc_t rc = 0;
-
-    /* fail if a NULL parameter: can't validate all addresses */
-    if (encrypted == NULL)
-    {
-        rc = RC (rcKrypto, rcFile, rcValidating, rcParam, rcNull);
-        LOGERR (klogErr, rc, "encrypted file was null when trying to validate");
-        return rc;
-    }
-
-    /* file header is validated within the call to Make Validate */
-    rc = KEncFileMakeValidate (&file, encrypted);
-    if (rc)
-        LOGERR (klogErr, rc,
-                "unable to validate encrypted file due to "
-                "inability to open as encrypted file");
-    else
-    {
-        uint64_t pos;             /* position within the encrypted file */
-        uint64_t block_count = 0; /* how many blocks have we read */
-
-        /* loop through all data blocks */
-        pos = sizeof (KEncFileHeader);
-        for (block_count = 0; ; ++block_count)
-        {
-            rc_t vrc;
-            STSMSG (2, ("reading block '%u' at '%lu'", block_count,
-                        BlockId_to_CiphertextOffset(block_count)));
-           
-            vrc = KEncFileBlockRead (file, NULL, block_count, true);
-            if (vrc != 0)
-            {
-                if ( rc == 0 )
-                    rc = vrc;
-                if ( GetRCContext( vrc ) != rcValidating )
-                {
-                    STSMSG (2, ("read error at block '%u'", block_count));
-                    break;
-                }
-            }
-            if (file->eof)
-            {
-                STSMSG (2, ("block '%u' was end", block_count));
-                break;
-            }
-            pos += sizeof (KEncFileData);
-        }   
-        KFileRelease (&file->dad);
-    }
-    return (rc);
-}
-
-
-LIB_EXPORT rc_t CC KEncFileHeaderWrite_v2 (KFile * dad)
-{
-    rc_t rc;
-
-    if (dad->vt != (const KFile_vt*)&vtKEncFile)
-    {
-        rc = RC (rcKrypto, rcFile, rcWriting, rcType, rcIncorrect);
-        LOGERR (klogErr, rc, "file not an encryptor requested writing header");
-    }
-    else
-    {
-        KEncFile * self;
-        self = (KEncFile*)dad;
-
-        rc = KEncFileHeaderWrite (self);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KEncFileFooterWrite_v2 (KFile * dad)
-{
-    rc_t rc;
-
-    if (dad->vt != (const KFile_vt*)&vtKEncFile)
-    {
-        rc = RC (rcKrypto, rcFile, rcWriting, rcType, rcIncorrect);
-        LOGERR (klogErr, rc, "file not an encryptor requested writing footer");
-    }
-    else
-    {
-        KEncFile * self;
-        self = (KEncFile*)dad;
-
-        rc = KEncFileFooterWrite (self);
-    }
-    return rc;
-}
-
-/* ----------
- * Identify whether a file is a KEncFile type encrypted file by the header.
- * read the header into a buffer and pass it into this function.  
- * The buffer_size needs to be at least 8 but more bytes lead to a better
- * check up to the size of the header of a KEncFile type encrypted file.
- * As the header may change in the future (in a backwards compatible way)
- * that size might change from the current 16.
- *
- * Possible returns:
- * 0:
- *      the file is an identified KEncFile type file.  False positives are
- *      possible if a file happens to match at 8 or more bytes
- *
- * RC (rcFS, rcFile, rcIdentifying, rcFile, rcWrongType)
- *      the file is definitely not a KEncFile type encrypted file.
- *     
- * RC (rcFS, rcFile, rcIdentifying, rcParam, rcNull)
- *      bad parameters in the call
- *
- * RC (rcFS, rcFile, rcIdentifying, rcBuffer, rcInsufficient)
- *      not a large enough buffer to make an identification
- */
-LIB_EXPORT rc_t CC KFileIsEnc_v2 (const char * buffer, size_t buffer_size)
-{
-    KEncFileHeader header;
-    size_t count;
-    bool byte_swapped;
-
-    if ((buffer == NULL) || (buffer_size == 0))
-        return RC  (rcFS, rcFile, rcIdentifying, rcParam, rcNull); 
-
-    /* must have the signature to consider it an Encrypted file */
-    if (buffer_size < sizeof (header.file_sig))
-        return RC (rcFS, rcFile, rcIdentifying, rcBuffer, rcInsufficient); 
-
-    if ((memcmp (buffer, &const_header.file_sig, sizeof const_header.file_sig ) != 0) &&
-        (memcmp (buffer, &const_header_sra.file_sig, sizeof const_header_sra.file_sig ) != 0))
-        return SILENT_RC (rcFS, rcFile, rcIdentifying, rcFile, rcWrongType); 
-
-    /* can we also check the byte order? It's okay if we can't */
-    if (buffer_size < sizeof header.file_sig + sizeof header.byte_order)
-        return 0; 
-    
-    count = buffer_size > sizeof header ? sizeof header : buffer_size;
-
-    memcpy (&header, buffer, count);
-
-    if (header.byte_order == const_header.byte_order)
-        byte_swapped = false;
-
-    else if (header.byte_order == const_bswap_header.byte_order)
-        byte_swapped = true;
-
-    /* but if it's not we fail with a different error */
-    else
-        return RC (rcFS, rcFile, rcIdentifying, rcFile, rcOutoforder); 
-
-    /* can we check the version as well? It's okay if we can't */
-    if (buffer_size < sizeof (header))
-        return 0; 
-
-    assert (sizeof (header.version) == 4);
-    if (byte_swapped)
-        header.version = bswap_32(header.version);
-
-    /* and it's a different error if the version is not within our range */
-    if ((header.version <= 0) || (header.version > eCurrentVersion))
-        return RC (rcKrypto, rcFile, rcClassifying, rcFile, rcBadVersion);
-
-    return 0;
-}
-
-
-LIB_EXPORT rc_t CC KFileIsSraEnc (const char * buffer, size_t buffer_size)
-{
-    KEncFileHeader header;
-    size_t count;
-    bool byte_swapped;
-
-    if ((buffer == NULL) || (buffer_size == 0))
-        return RC  (rcFS, rcFile, rcIdentifying, rcParam, rcNull); 
-
-
-    if (buffer_size < sizeof (header.file_sig))
-        return RC (rcFS, rcFile, rcIdentifying, rcBuffer, rcInsufficient); 
-
-    if (memcmp (buffer, &const_header_sra.file_sig, sizeof const_header.file_sig ) != 0)
-        return RC (rcFS, rcFile, rcIdentifying, rcFile, rcWrongType); 
-
-    if (buffer_size < sizeof header.file_sig + sizeof header.byte_order)
-        return 0; 
-    
-    count = buffer_size > sizeof header ? sizeof header : buffer_size;
-
-    memcpy (&header, buffer, count);
-
-    if (header.byte_order == const_header.byte_order)
-        byte_swapped = false;
-
-    else if (header.byte_order == const_bswap_header.byte_order)
-        byte_swapped = true;
-
-    else
-        return RC (rcFS, rcFile, rcIdentifying, rcFile, rcOutoforder); 
-
-    if (buffer_size < sizeof (header))
-        return 0; 
-
-    assert (sizeof (header.version) == 4);
-    if (byte_swapped)
-        header.version = bswap_32(header.version);
-
-    if ((header.version <= 0) || (header.version > eCurrentVersion))
-        return RC (rcKrypto, rcFile, rcClassifying, rcFile, rcBadVersion);
-
-    return 0;
-}
-
-/* end of file encfile.c */
-
-
-
diff --git a/libs/krypto/key.c b/libs/krypto/key.c
deleted file mode 100644
index c57a45f..0000000
--- a/libs/krypto/key.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <krypto/extern.h>
-#include <krypto/key.h>
-#include <kapp/args.h>
-#include <klib/checksum.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <string.h>
-
-KRYPTO_EXTERN_DATA KKey KKeyEncrypt;
-KRYPTO_EXTERN_DATA KKey KKeyDecrypt;
-KRYPTO_EXTERN_DATA char WGAEncryptPassword[WGA_MAX_PASSWORD];
-KRYPTO_EXTERN_DATA char WGADecryptPassword[WGA_MAX_PASSWORD];
-
-
-static rc_t KKeyInitInt (KKey * self, KKeyType key_type, 
-                         const void * password, size_t password_size)
-{
-    if (self == NULL)
-        return RC (rcKrypto, rcEncryptionKey, rcConstructing, rcSelf, rcNull);
-
-    if (key_type >= kkeyTypeCount)
-        return RC (rcKrypto, rcEncryptionKey, rcConstructing, rcParam, rcInvalid);
-
-    if (key_type == kkeyNone)
-        return RC (rcKrypto, rcEncryptionKey, rcConstructing, rcParam, rcIncorrect);
-
-    if (password == NULL)
-        return RC (rcKrypto, rcEncryptionKey, rcConstructing, rcParam, rcNull);
-
-    if (password_size == 0)
-        return RC (rcKrypto, rcEncryptionKey, rcConstructing, rcParam, rcTooShort);
-
-    {
-        SHA256State state;
-        size_t z;
-        uint8_t digest [64];
-
-
-        SHA256StateInit (&state);
-        SHA256StateAppend (&state, password, password_size);
-        SHA256StateFinish (&state, digest);
-        
-        switch (self->type = key_type)
-        {
-        default:
-            z = 0;
-            break;
-
-        case kkeyAES128:
-            z = 128/8;
-            break;
-
-        case kkeyAES192:
-            z = 192/8;
-            break;
-
-        case kkeyAES256:
-            z = 256/8;
-            break;
-        }
-        memcpy (self->text, digest, z);
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KKeyInitRead (KKey * self, KKeyType key_type, 
-                                 const void * password, size_t password_size)
-{
-    return KKeyInitInt (self, key_type, password, password_size);
-}
-
-LIB_EXPORT rc_t CC KKeyInitUpdate (KKey * self, KKeyType key_type, 
-                                   const void * password, size_t password_size)
-{
-    if (password_size < kkeyMinimumSize)
-    {
-        rc_t rc = RC (rcKrypto, rcEncryptionKey, rcConstructing, rcParam, 
-                      rcTooShort);
-#if FAIL_SHORT_PASSWORD
-        return rc;
-#else
-        PLOGERR (klogWarn, (klogWarn, rc,
-                            "Password is shorter than recommended '$(P)' is less than '$(Q)'"
-                            , "P=%zu,Q=%u"
-                            , password_size
-                            , ( uint32_t ) kkeyMinimumSize
-                     ));
-#endif
-    }
-    return KKeyInitInt (self, key_type, password, password_size);
-}
-    
-
-
-LIB_EXPORT rc_t CC KKeyInitHex()
-{
-    return 0;
-}
-
-/* end of file encfile.c */
-
diff --git a/libs/krypto/manager.c b/libs/krypto/manager.c
deleted file mode 100644
index 8b8c766..0000000
--- a/libs/krypto/manager.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#error "obsolete do not use"
-
-
-
-
-
-
-
-
-
-
diff --git a/libs/krypto/ncbi-priv.h b/libs/krypto/ncbi-priv.h
deleted file mode 100644
index d5f692a..0000000
--- a/libs/krypto/ncbi-priv.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-#ifndef _h_krypto_ncbi_priv_
-#define _h_krypto_ncbi_priv_
-
-#include <klib/defs.h>
-
-#ifdef _GNUC_
-#include <v128.h>
-#endif
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#if defined (USEVEC)
-#if defined (USEAESNI)
-
-# if ! defined (USEVECREG)
-/*
- * AES_NI && ! VECREG
- * Illegal
- */
-#  error "Bad combination of defines"
-
-# else
-
-/*
- * AESNI && VECREG
- * use AES-NI, and SSSE3 and lower
- */
-
-# define USE_AES_NI             1
-# define USE_VEC_REG            1
-# define USE_VEC                1
-# define CMEMBER(name)          KCipherVecAesNi##name
-# define CIPHER_IMPL            KCipherVecAesNi
-# define AESBCMEMBER(name)      KAESBlockCipherVecAesNi##name
-# define AESBCIPHER_IMPL        KAESBlockCipherVecAesNi
-# define NULLBCMEMBER(name)     KNullBlockCipherVecAesNi##name
-# define NULLBCIPHER_IMPL       KNullBlockCipherVecAesNi
-# define BCIPHER_VALUE          CipherVec
-
-# endif
-#elif defined (USEVECREG)
-
-# define USE_AES_NI             0
-# define USE_VEC_REG            1
-# define USE_VEC                1
-# define CMEMBER(name)          KCipherVecReg##name
-# define CIPHER_IMPL            KCipherVecReg
-# define AESBCMEMBER(name)      KAESBlockCipherVecReg##name
-# define AESBCIPHER_IMPL        KAESBlockCipherVecReg
-# define NULLBCMEMBER(name)     KNullBlockCipherVecReg##name
-# define NULLBCIPHER_IMPL       KNullBlockCipherVecReg
-# define BCIPHER_VALUE          CipherVec
-
-#else
-
-# define USE_AES_NI             0
-# define USE_VEC_REG            0
-# define USE_VEC                1
-# define CMEMBER(name)          KCipherVec##name
-# define CIPHER_IMPL            KCipherVec
-# define AESBCMEMBER(name)      KAESBlockCipherVec##name
-# define AESBCIPHER_IMPL        KAESBlockCipherVec
-# define NULLBCMEMBER(name)     KNullBlockCipherVec##name
-# define NULLBCIPHER_IMPL       KNullBlockCipherVec
-# define BCIPHER_VALUE          CipherVec
-
-#endif
-
-#else /* ! defined (USEVEC) */
-
-
-# define USE_AES_NI             0
-# define USE_VEC_REG            0
-# define USE_VEC                0
-# define MEMBER(name)           KCipherByte##name
-# define CMEMBER(name)          KCipherByte##name
-# define CIPHER_IMPL            KCipherByte
-# define AESBCMEMBER(name)      KAESBlockCipherByte##name
-# define AESBCIPHER_IMPL        KAESBlockCipherByte
-# define NULLBCMEMBER(name)     KNullBlockCipherByte##name
-# define NULLBCIPHER_IMPL       KNullBlockCipherByte
-# define BCIPHER_VALUE          CipherBlock
-
-#endif /* defined (USEVEC) */
-
-#define CLASS_STRING(name)  #name
-
-
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif /* #ifndef _h_krypto_ncbi_priv_ */
-
-
diff --git a/libs/krypto/no-null-ncbi.c b/libs/krypto/no-null-ncbi.c
deleted file mode 100644
index 7477512..0000000
--- a/libs/krypto/no-null-ncbi.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <krypto/extern.h>
-
-#include "ncbi-priv.h"
-#include "cipher-priv.h"
-/* #include "blockcipher-priv.h" */
-
-#include <klib/rc.h>
-
-/* ----------------------------------------------------------------------
- * Make
- *
- * Create a new Null Block Cipher object.
- * The processor is checked to see if this particular version is supported on
- * this particular CPU.
- */
-struct KBlockCipher;
-rc_t NULLBCMEMBER(Make) (struct KBlockCipher ** new_obj)
-{
-    rc_t rc;
-
-    /* Check parameter first */
-    if (new_obj == NULL)
-        rc = RC (rcKrypto, rcBlockCipher, rcConstructing, rcSelf, rcNull);
-
-    else
-    {
-        *new_obj = NULL;
-
-        rc = RC (rcKrypto, rcBlockCipher, rcConstructing, rcFunction, rcUnsupported);
-    }
-    return rc;
-}
-
-/* end of file lib/krypto/aes-ncbi.c */
diff --git a/libs/krypto/null-ncbi-priv.h b/libs/krypto/null-ncbi-priv.h
deleted file mode 100644
index 1e485bd..0000000
--- a/libs/krypto/null-ncbi-priv.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#ifndef _h_krypto_null_ncbi_priv_libs_
-#define _h_krypto_null_ncbi_priv_libs_
-
-#include <klib/defs.h>
-#include <v128.h>
-
-#include "ncbi-priv.h"
-#include "cipher-impl.h"
-#include "blockcipher-impl.h"
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-
-typedef struct CipherNull CipherNull;
-struct CipherNull
-{
-    KCipher dad;
-    CipherVec    e_ivec;
-    CipherVec    d_ivec;
-};
-
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif /* #ifndef _h_krypto_null_ncbi_priv_libs_ */
-
-
diff --git a/libs/krypto/null-ncbi.c b/libs/krypto/null-ncbi.c
deleted file mode 100644
index fe5e7bc..0000000
--- a/libs/krypto/null-ncbi.c
+++ /dev/null
@@ -1,251 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <krypto/extern.h>
-
-#include "ncbi-priv.h"
-#include "cipher-priv.h"
-#include "blockcipher-priv.h"
-
-#include <klib/rc.h>
-
-
-#include <byteswap.h>
-#include <string.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <sysalloc.h>
-
-#include "blockcipher-impl.h"
-
-#if USE_VEC
-#include <cpuid.h>
-#endif
-#if USE_VECREG
-#include <v128.h>
-#endif
-
-
-#if USE_VEC
-#define BLOCKCIPHER_IMPL BLOCKCIPHER_VEC_IMPL
-#else
-#define BLOCKCIPHER_IMPL BLOCKCIPHER_BYTE_IMPL
-#endif
-
-typedef struct NULL_CLASS NULL_CLASS;
-
-static const char NULLBCMEMBER(aes_ncbi_name) [] = CLASS_STRING(AES_CLASS);
-
-
-/* ----------------------------------------------------------------------
- * Destroy
- *   How large is the stored key for this cipher?  Not the user key used
- *   to create this key (key schedule)
- *
- *   This is needed by KCipher to know how large the KCipher objecr is at
- *   allocation and to know how much of a buffer each decryption/encryption is
- */
-static
-void NULLBCMEMBER(Destroy)    (const BLOCKCIPHER_IMPL * self)
-{
-    /* we use a constant object so do nothing */
-}
-
-
-/* ----------------------------------------------------------------------
- * BlockSize
- */
-static
-uint32_t NULLBCMEMBER(BlockSize) ()
-{
-    return 16;
-}
-
-
-/* ----------------------------------------------------------------------
- * KeySize
- *   How large is the stored key for this cipher?  Not the user key used
- *   to create this key (key schedule)
- *
- *   This is needed by KCipher to know how large the KCipher objecr is at
- *   allocation and to know how much of a buffer each decryption/encryption is
- */
-static uint32_t NULLBCMEMBER(KeySize) ()
-{
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * SetEncryptKey
- *   The KCipher calls this to have the block cipher build an encryption
- *   key in the KCipher object
- *
- */
-static rc_t NULLBCMEMBER(SetEncryptKey) (void * encrypt_key, const char * user_key,
-                                         uint32_t user_key_size)
-{
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * SetDecryptKey
- *   The KCipher calls this to have the block cipher build an decryption
- *   key in the KCipher object
- *
- */
-static rc_t NULLBCMEMBER(SetDecryptKey) (void * decrypt_key,
-                                     const char * user_key,
-                                     uint32_t user_key_size)
-{
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * Encrypt
- *
- *   Perform an encryption of a single block.  Chained modes and stream
- *   cipher modes will call this multiple times.
- *
- */
-#if USE_VEC
-static CipherVec NULLBCMEMBER(Encrypt) (CipherVec state,
-                                        const void * encrypt_key)
-{
-    return state;
-}
-#else
-static void NULLBCMEMBER(Encrypt) (const CipherBlock in,
-                                   CipherBlock * out,
-                                   const void * encrypt_key)
-{
-}
-#endif
-
-
-/* ----------------------------------------------------------------------
- * Decrypt
- *
- *   Perform a decryption of a single block.  Chained modes and stream
- *   cipher modes will call this multiple times.
- */
-#if USE_VEC
-static CipherVec NULLBCMEMBER(Decrypt) (CipherVec state,
-                                        const void * decrypt_key)
-{
-    return state;
-}
-#else
-static void NULLBCMEMBER(Decrypt) (const CipherBlock in,
-                                   CipherBlock * out,
-                                   const void * encrypt_key)
-{
-}
-#endif
-
-
-/* ----------------------------------------------------------------------
- * MakeProcessorSupport
- *
- * Run-time check for support of this particular AES implementation by
- * checking the flags given via the cpuid instruction.
- */
-static __inline__
-bool NULLBCMEMBER(ProcessorSupport) ()
-{
-    return true;
-}
-
-
-/* ----------------------------------------------------------------------
- * Init
- *
- *   Initialize the fields of this object.  The derived class will call this
- *   during it's initialization.
- *
- * self      object to initialze
- * vt        the virtual table of the derived class
- * mgr       the cipher manager that is the construction factory block cipher
- *           objects hold references to the manager while the manager merely
- *           points at the block ciphers when all block ciphers are destroyed
- *           the manager loses its references and it too can be destroyed if not
- *           held elsewhere
- * name      ASCIZ c-string the name of this class
- */
-static const
-#if USE_VEC
-KBlockCipherVec_vt_v1
-#else
-KBlockCipherByte_vt_v1
-#endif
-NULLBCMEMBER(_vt_) = {
-    { 1, 1 },
-
-    NULLBCMEMBER(Destroy),
-    NULLBCMEMBER(BlockSize),
-    NULLBCMEMBER(KeySize),
-    NULLBCMEMBER(SetEncryptKey),
-    NULLBCMEMBER(SetDecryptKey),
-    NULLBCMEMBER(Encrypt),
-    NULLBCMEMBER(Decrypt)
-};
-
-
-/* ----------------------------------------------------------------------
- * Make
- *
- * Create a new Null Block Cipher object.
- * The processor is checked to see if this particular version is supported on
- * this particular CPU.
- */
-rc_t NULLBCMEMBER(Make) (KBlockCipher ** new_obj)
-{
-    rc_t rc;
-
-    /* Check parameter first */
-    if (new_obj == NULL)
-        rc = RC (rcKrypto, rcBlockCipher, rcConstructing, rcSelf, rcNull);
-
-    else
-    {
-        *new_obj = NULL;
-
-        /* check for processor support of this flavor */
-        if ( ! NULLBCMEMBER(ProcessorSupport)())
-            rc = RC (rcKrypto, rcBlockCipher, rcConstructing, rcFunction, rcUnsupported);
-
-        else
-        {
-            rc = 0;
-            *new_obj = (KBlockCipher*)&(NULLBCMEMBER(_vt_));
-        }
-    }
-    return rc;
-}
-
-/* end of file lib/krypto/aes-ncbi.c */
diff --git a/libs/krypto/reencfile.c b/libs/krypto/reencfile.c
deleted file mode 100644
index f6d55e4..0000000
--- a/libs/krypto/reencfile.c
+++ /dev/null
@@ -1,1243 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-#include <krypto/extern.h>
-#include <krypto/reencfile.h>
-#include <krypto/key.h>
-#include <krypto/encfile.h>
-#include <krypto/encfile-priv.h>
-#include "encfile-priv.h"
-
-#include <klib/rc.h>
-#include <klib/checksum.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/debug.h>
-#include <klib/vector.h>
-#include <klib/status.h>
-#include <kfs/file.h>
-#include <kfs/ramfile.h>
-
-#include <sysalloc.h>
-
-#include <byteswap.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#include <klib/out.h>
-
-#define USE_MISSING_VECTOR false
-
-/* ----------------------------------------------------------------------
- * KReencFile
- *   Base object class for the encryption, decryption and validation of
- *   the file format defined above
- */
-#define KFILE_IMPL KReencFile
-#include <kfs/impl.h>
-
-/* -----
- */
-struct KReencFile
-{
-    KFile         dad;          /* base class */
-    const KFile * encrypted;    /* encrypted file we start from */
-    const KFile * dec;          /* decryptor of the original */
-    KFile *       enc;          /* encryptor */
-    KFile *       ram;          /* a file that works from a sliding window buffer */
-
-    size_t        num_read;
-    size_t        num_writ;
-/* block id's can not max out a 64 bit number as that is a file that is 32K times too big */
-#define NO_CURRENT_BLOCK (~(uint64_t)0)
-    uint64_t      block_id;
-    uint64_t      footer_block; /* if zero, file does not have any content blocks */
-
-    uint64_t      size;         /* size as known from the original file [see known_size] */
-    bool          known_size;   /* is the size of the original file known? */
-
-    char          plain_text  [ENC_DATA_BLOCK_SIZE];
-    union
-    {
-        KEncFileBlock block;
-        char          text [sizeof (KEncFileBlock)];
-    } block;
-    union
-    {
-        KEncFileFooter foot;
-        char           text [sizeof (KEncFileFooter)];
-    } foot;
-
-};
-
-/* ----------------------------------------------------------------------
- * Interface Functions
- *
- * Destroy
- *
- */
-static
-rc_t CC KReencFileDestroy (KReencFile *self)
-{
-    if (self)
-    {
-        rc_t rc1, rc2, rc3, rc4;
-
-        rc1 = KFileRelease (self->encrypted);
-        if (rc1)
-            LOGERR (klogInt, rc1, "Re-enc failed to release encrypted file");
-
-        rc2 = KFileRelease (self->dec);
-        if (rc2)
-            LOGERR (klogInt, rc2, "Re-enc failed to release decryptor");
-
-        rc3 = KFileRelease (self->ram);
-        if (rc3)
-            LOGERR (klogInt, rc3, "Re-enc failed to release ram file");
-
-        rc4 = KFileRelease (self->enc);
-        if (rc4)
-            LOGERR (klogInt, rc4, "Re-enc failed to release encryptor");
-
-        free (self);
-
-        return (rc1 ? rc1 :
-                rc2 ? rc2 :
-                rc3 ? rc3 :
-                rc4);
-    }
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- *
- * We do not allow this for read, write or update as you can not memory map the 
- * unencrypted file in a meaningful way.
- */
-static
-struct KSysFile *CC KReencFileGetSysFileUnsupported (const KReencFile *self, uint64_t *offset)
-{
-    assert (self);
-    assert (offset);
-
-    return NULL;
-}
-
-
-/* ----------------------------------------------------------------------
- * RandomAccess
- *
- *  returns 0 if random access, error code otherwise
- */
-static
-rc_t CC KReencFileRandomAccess (const KReencFile *self)
-{
-    assert (self != NULL);
-    assert (self->encrypted != NULL);
-
-    return KFileRandomAccess (self->encrypted);
-}
-
-
-/* ----------------------------------------------------------------------
- * Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KReencFileSize (const KReencFile *self, uint64_t *size)
-{
-    assert (self != NULL);
-    assert (self->encrypted != NULL);
-
-    /* -----
-     * the re-encrypted file will be the same size as the 
-     * previously encrypted file and we have the same understanding
-     * about knowing the size
-     */
-    return KFileSize (self->encrypted, size);
-}
-
-
-static
-rc_t CC KEncryptFileSize (const KReencFile *self, uint64_t *size)
-{
-    uint64_t z;
-    rc_t rc;
-
-    assert (self != NULL);
-    assert (self->encrypted != NULL);
-
-    /* -----
-     * the re-encrypted file will be the same size as the 
-     * previously encrypted file and we have the same understanding
-     * about knowing the size
-     */
-    rc = KFileSize (self->encrypted, &z);
-
-    if (rc == 0)
-    {
-        uint64_t bid = PlaintextSize_to_BlockCount ( z, NULL );
-        *size = BlockId_to_CiphertextOffset ( bid ) + sizeof ( KEncFileFooter );
-    }
-    else
-    {
-        *size = z;
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KReencFileSetSizeUnsupported (KReencFile *self, uint64_t size)
-{
-    assert (self);
-
-    return RC ( rcFS, rcFile, rcUpdating, rcFunction, rcUnsupported );
-}
-
-
-/*
- * The next three functions do the actual Out from a KFileRead.
- * We will only out from the header, or a footer or a single
- * encrypted block rather than try to fully satisfy all of a
- * KFileRead. USe KFileReadAll to get more than one part
- *
- * For all we have an offset within the part which is the
- * position from the original read request for the header
- */
-static __inline__
-rc_t KReencFileReadHeaderOut (KReencFile * self, size_t offset, void * buffer,
-                              size_t bsize, size_t *num_read)
-{
-    assert (self);
-    assert (offset < sizeof (KEncFileHeader));
-    assert (buffer);
-    assert (bsize);
-    assert (num_read);
-
-    /* trim request if necessary */
-    if (offset + bsize > sizeof (KEncFileHeader))
-        bsize = sizeof (KEncFileHeader) - offset;
-
-    memcpy (buffer, self->block.text + offset, bsize);
-    self->block_id = NO_CURRENT_BLOCK;
-    *num_read = bsize;
-    
-    return 0;
-}
-
-
-static __inline__
-rc_t KReencFileReadBlockOut (KReencFile * self, size_t offset, void * buffer,
-                             size_t bsize, size_t * num_read)
-{
-    assert (self);
-    assert (offset < sizeof self->block);
-    assert (buffer);
-    assert (bsize);
-    assert (num_read);
-
-    if (offset + bsize > sizeof self->block)
-        bsize = sizeof self->block - offset;
-
-    memcpy (buffer, self->block.text + offset, bsize);
-    *num_read = bsize;
-
-    return 0;
-}
-
-
-static __inline__
-rc_t KReencFileReadFooterOut (KReencFile * self, size_t offset,
-                              void * buffer, size_t bsize, size_t * num_read)
-{
-    /* for the footer we will copy out from the footer in self */
-
-    assert (self);
-    assert (offset < sizeof self->foot);
-    assert (buffer);
-    assert (bsize);
-    assert (num_read);
-
-/* KOutMsg ("%s: offset '%zu' bsize '%zu'",__func__,offset,bsize); */
-    if (offset + bsize > sizeof self->foot)
-        bsize = sizeof self->foot - offset;
-
-    memcpy (buffer, self->foot.text + offset, bsize);
-    self->block_id = NO_CURRENT_BLOCK;
-    *num_read = bsize;
-
-/* KOutMsg (" *num_read '%zu'\n",bsize); */
-/* { */
-/*     size_t ix; */
-/*     char * b = buffer; */
-/*     KOutMsg ("%s:",__func__); */
-/*     for (ix = 0; ix < bsize; ++ix) */
-/*         KOutMsg (" %2.2x",b[ix]); */
-/*     KOutMsg ("\n"); */
-
-/* } */
-    return 0;
-}
-
-
-/*
- * Handle Read within the Encrypted file header
- *
- * We use a private interface into the KEncFile then 
- * the Out function below to take what we write with
- * the Encryptor and copy it to the callers read buffer.
- */
-static
-rc_t KReencFileReadHandleBlock (KReencFile *self,
-                                uint64_t pos,
-                                void *buffer,
-                                size_t bsize,
-                                size_t *num_read);
-
-static __inline__
-rc_t KReencFileReadHandleHeader (KReencFile *self,
-                                 uint64_t pos,
-                                 void *buffer,
-                                 size_t bsize,
-                                 size_t *num_read)
-{
-    rc_t rc;
-
-    assert (self);
-    assert (pos < sizeof (KEncFileHeader));
-    assert (buffer);
-    assert (bsize);
-    assert (num_read);
-
-    if ( !self->known_size || self->size != sizeof(KEncFileHeader) + sizeof(KEncFileFooter) )
-    {
-        /* added to support NCBInenc and NCBIsenc variants of KEncFile
-         * read the first block of the source file but don't write any of it
-         *
-         * If the source is stream mode only then the next block to be read is the
-         * first and this will not violate by seeking. It will just have already
-         * read the block it will want to read real soon. Likewith within a
-         * single call to KFileReadAll.
-         */
-        rc = KReencFileReadHandleBlock (self, 0, NULL, 0, NULL);
-        if (rc)
-            return rc;
-    }
-
-    /* use a private function from KEncFile to generate a header */
-    rc = KEncFileWriteHeader (self->enc);
-    if (rc)
-        LOGERR (klogErr, rc, "re-enc error generating encrypted header");
-    else
-    {
-        /*
-         * assume it worked and its the right size 
-         * copy the requested portion of the header out to finish the read
-         */
-        rc = KReencFileReadHeaderOut (self, pos, buffer, bsize, num_read);
-        if (rc)
-            LOGERR (klogErr, rc, "re-enc error filling read request");
-    }
-    return rc;
-}
-
-
-/*
- * Read the requested block form the source encrypted file
- */
-static
-rc_t KReencFileReadABlock (KReencFile * self, uint64_t block_id)
-{
-    rc_t rc;
-
-
-/*     OUTMSG (("%s: block_id %lu\n",__func__,block_id)); */
-
-    if (block_id + 1 == self->footer_block)
-        memset (self->plain_text, 0, sizeof self->plain_text);
-
-    /* -----
-     * simple call down to the decryptor to get the plain text data
-     * for this block. We will regenerate the framing when we re-encrypt
-     */
-    rc = KFileReadAll (self->dec, BlockId_to_PlaintextOffset ( block_id ),
-                       &self->plain_text, sizeof (self->plain_text),
-                       &self->num_read);
-    if (rc)
-        LOGERR (klogErr, rc, "re-enc error reading a block");
-
-    /*
-     * interpret bytes read for validity
-     *
-     * zero means we hit a premature end of file where we expected a block
-     */
-    else if (self->num_read == 0)
-    {
-        /*misleading RC? */
-        rc = RC (rcKrypto, rcFile, rcReading, rcSize, rcInsufficient);
-        LOGERR (klogErr, rc, "re-enc no block read");
-    }
-    /*
-     * less than a full block must be in the last block
-     */
-    else if (self->num_read < sizeof self->plain_text)
-    {
-/*         KOutMsg ("%s: block_id '%lu'num_read '%zu' of '%zu' last_block '%lu'\n", */
-/*                  __func__, block_id, self->num_read, sizeof self->plain_text, */
-/*                  self->footer_block); */
-
-        if (block_id + 1 != self->footer_block)
-        {
-            rc = RC (rcKrypto, rcFile, rcReading, rcSize, rcInsufficient);
-            LOGERR (klogErr, rc, "re-enc incomplete block read");
-        }
-    }
-    /*
-     * unlikely scenario, read too much
-     */
-    else if (self->num_read > sizeof self->plain_text)
-    {
-        rc = RC (rcKrypto, rcFile, rcReading, rcBuffer, rcIncorrect);
-        LOGERR (klogErr, rc, "re-enc no block read");
-    }
-    if (rc == 0)
-        self->block_id = block_id;
-    return rc;
-}
-
-
-static
-rc_t KReencFileWriteABlock (KReencFile * self, uint64_t block_id)
-{
-    rc_t rc;
-
-    /* -----
-     * simple call to encrypt an entire data section for the relevant block
-     * We send in up to 32KB of plain text which through two element KFiles will
-     * we written into a buffer back in this KFile. More data will be written
-     * to that buffer than requested here - that is the framing and also the
-     * header if the block is the first one.
-     */
-    rc = KFileWriteAll (self->enc, BlockId_to_PlaintextOffset ( block_id ),
-                         self->plain_text, self->num_read, &self->num_writ);
-
-    if (rc)
-        LOGERR (klogInt, rc, "re-enc error encrypting a block");
-
-    else if (self->num_writ != self->num_read)
-    {
-        rc = RC (rcKrypto, rcFile, rcWriting, rcFile, rcIncomplete);
-        LOGERR (klogErr, rc, "re-enc failure encrypting all of block");
-    }
-
-    /* trigger a flush */
-/*     if (rc == 0) */
-/*         rc = KFileWriteAll (self->enc, BlockId_to_DecryptedPos (block_id^1), */
-/*                          self->plain_text, self->num_read, &self->num_writ); */
-
-    return rc;
-}
-
-
-/*
- * Add the current encrypted block to the footer statistics
- */
-static __inline__
-rc_t KReencFileAddToFooter (KReencFile * self)
-{
-    assert (self);
-/*     KOutMsg ("%s: ",__func__);  */
-
-    if (self->block.block.crc != self->block.block.crc_copy)
-    {
-        rc_t rc = RC (rcKrypto, rcFile, rcReading, rcChecksum, rcInvalid);
-        LOGERR (klogInt, rc, "rc-enc block CRCs disagree");
-        return rc;
-    }
-
-    ++ self->foot.foot.block_count;
-    self->foot.foot.crc_checksum += self->block.block.crc;
-
-/*     KOutMsg ("%lu %lu %lu\n",self->foot.foot.block_count,self->block.block.crc,self->foot.foot.crc_checksum); */
-    return 0;
-}
-
-
-/*
- * Read a block from the source encrypted block and Write it which reencrypts it
- *
- * The new_block parameter says whether this is the first time we've seen this
- * block. If it is we need to add data to the footer
- */
-static
-rc_t KReencFileReencBlock (KReencFile * self, uint64_t block_id, bool new_block)
-{
-    rc_t rc;
-
-    assert (self);
-
-/*     KOutMsg ("%s: %lu %lu\n", __func__, block_id, self->footer_block); */
-    assert (block_id <= self->footer_block);
-    assert ((new_block == true) || (new_block == false));
-
-    rc = KReencFileReadABlock (self, block_id);
-    if (rc)
-        LOGERR (klogErr, rc, "re-enc failure to read a block");
-    else
-    {
-        if ((self->num_read == 0) || (self->num_read > sizeof (self->plain_text)))
-        {
-            rc = RC (rcFS, rcFile, rcReading, rcSize, rcIncorrect);
-            LOGERR (klogErr, rc, "Bad length on block read of encrypted file");
-        }
-        else
-        {
-            rc = KReencFileWriteABlock (self, block_id);
-            if (rc)
-                LOGERR (klogErr, rc, "re-enc failure to write a block");
-
-            else if (new_block)
-            {
-                rc = KReencFileAddToFooter (self);
-                if (rc)
-                    LOGERR (klogErr, rc,
-                            "re-enc failure to do block accounting");
-            }
-        }
-    }
-    return rc;
-}
-
-
-/*
- * Handle Read within the Encrypted file footer
- */
-static __inline__
-rc_t KReencFileReadHandleFooter (KReencFile *self,
-                                 uint64_t pos,
-                                 void *buffer,
-                                 size_t bsize,
-                                 size_t *num_read)
-{
-    uint64_t block_id;  /* block id for the footer gets us the start of footer */
-    size_t offset;
-    rc_t rc;
-
-/* KOutMsg ("\n\n\n%s: pos '%lu' bsize '%zu'\n",__func__,pos,bsize); */
-
-    assert (self);
-    assert (pos >= sizeof (KEncFileHeader));
-    assert (buffer);
-    assert (bsize);
-    assert (num_read);
-
-    rc = 0;
-    block_id = EncryptedPos_to_BlockId (pos, NULL, NULL);
-
-    assert (block_id == self->footer_block);
-
-    offset = pos - BlockId_to_CiphertextOffset ( block_id );
-
-    assert (offset < sizeof self->foot);
-
-    /* if we are tying to treat this as a footer but it wasn't the next
-     * expected block mark all inbetween as missing to handle in the 
-     * function just below this
-     */
-
-/* KOutMsg ("%s: self->next_block %lu\n",__func__, self->next_block); */
-
-    self->foot.foot.block_count = block_id;
-    self->foot.foot.crc_checksum = 0;
-
-    if (rc == 0)
-    {
-        uint64_t header_pos;
-
-        header_pos = BlockId_to_CiphertextOffset ( block_id );
-
-        assert (header_pos <= pos);
-        assert (pos - header_pos <= sizeof self->foot);
-
-        rc = KReencFileReadFooterOut (self, (size_t)(pos - header_pos),
-                                      buffer, bsize, num_read);
-
-/*             KOutMsg ("%s: footer '%lu' '%lx'\n",__func__, */
-/*                      self->foot.foot.block_count, */
-/*                      self->foot.foot.crc_checksum); */
-
-        if (rc)
-            LOGERR (klogInt, rc, "re-enc failed to output footer");
-    }
-    return rc;
-}
-
-
-/*
- *
- */
-static
-rc_t KReencFileReadHandleBlock (KReencFile *self,
-                                uint64_t pos,
-                                void *buffer,
-                                size_t bsize,
-                                size_t *num_read)
-{ 
-    rc_t rc = 0;            /* we have a path where we need to check this without set */
-    uint64_t block_id;      /* block id for the requeted position */
-    uint32_t offset;        /* how far into the encrypted block */
-    bool new_block;         /* is this the first time for this block */
-
-    /* -----
-     * figure out what block this corresponds to. 
-     * the header is for this purpose part of the first block
-     * when we decide what to give the reader. We only care
-     * about which block and not whether it is in the payload
-     * or framing.
-     * This block id is not to a known to exist block. It could be 
-     * to the header, the footer or past the end of the file.
-     *
-     * NOTE: This could be a pre-fetch of the first block when
-     * processing the header - it will have some funny values
-     * with just a self and all other parameters 0s.
-     * pos of zero gives block_id of 0 and the bsize of zero
-     * means we never look at the others. Thi sis to allow the 
-     * (at the time this was written) new feature of two
-     * different file-signatures for encrypted files.
-     */
-    block_id = EncryptedPos_to_BlockId (pos, NULL, NULL);
-
-    if (block_id != self->block_id)
-    {
-        new_block = true;
-
-        if (rc == 0)
-        {
-            /* read requested block */
-            rc = KReencFileReencBlock (self, block_id, new_block);
-            if (rc)
-            {
-                LOGERR (klogErr, rc,
-                        "re-enc failure re-encryptinng a requested block");
-            }
-        }
-    }
-    if ((rc == 0) && (bsize > 0))
-    {
-        /* satisfy read request
-         *
-         * if we are here we decrypted and re-encrypted the
-         * expected block
-         */
-        offset = ( uint32_t ) ( pos - BlockId_to_CiphertextOffset ( block_id ) );
-        rc = KReencFileReadBlockOut (self, offset, buffer, bsize, num_read);
-        if (rc)
-            LOGERR (klogErr, rc, "re-enc error copying out from block");
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-rc_t CC KReencFileReadUnsupported (const KReencFile *self,
-                                   uint64_t pos,
-                                   void *buffer,
-                                   size_t bsize,
-                                   size_t *num_read)
-{
-    assert (self);
-    assert (buffer);
-    assert (bsize);
-    assert (num_read);
-
-    return RC ( rcFS, rcFile, rcReading, rcFunction, rcUnsupported );
-}
-
-
-/*
- * Read will often return only a partial read.
- *
- * We take the less complex route here and return only from the header, a
- * single block or the footer, whatever is at the beginning of the requested
- * region.
- */
-static
-rc_t CC KReencFileRead (const KReencFile *self_,
-                        uint64_t pos,
-                        void *buffer,
-                        size_t bsize,
-                        size_t *num_read)
-{
-    /* make it all mutable and stop using self_ */
-    KReencFile * self = (KReencFile *)self_;
-    rc_t rc = 0;
-
-    assert (self);
-    assert (buffer);
-    assert (bsize);
-    assert (num_read);
-
-    *num_read = 0;
-
-    /* -----
-     * the size of the re-encrypted file will be the same as the size of the
-     * previously encrypted file so we can bail early if we know we can.
-     *
-     * The initial use case is that the file will just be lying out on disk
-     * and a KSysfile so that we do know the size.
-     *
-     * There are three pieces to an encrypted file:
-     * 1 Header
-     * 2 One or More Blocks
-     * 3 Footer
-     *
-     * We will only know if we are in the footer if we already know the size of
-     * the file. Else we have to find the footer by not finding a block when we
-     * try to read it. We'll thus look for the header first, then the footer else
-     * we try to find a block,
-     */
-
-    /* Header */
-    if (pos < sizeof (KEncFileHeader))
-        rc = KReencFileReadHandleHeader (self, pos, buffer, bsize, num_read);
-
-    /* if past the whole encrypted file */
-    else if (pos >= self->size)
-        rc = 0;
-
-    /* Footer */
-    else if (pos >= self->size - sizeof self->foot)
-        rc = KReencFileReadHandleFooter (self, pos, buffer, bsize, num_read);
-
-    /* Blocks */
-    else
-        rc = KReencFileReadHandleBlock (self, pos, buffer, bsize, num_read);
-
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- * Unsupported as we now treat archives as READ ONLY
- */
-static
-rc_t CC KReencFileWriteUnsupported (KReencFile *self, uint64_t pos,
-                                    const void *buffer, size_t bsize,
-                                    size_t *num_writ)
-{
-    rc_t rc = RC (rcFS, rcFile, rcReading, rcFunction, rcUnsupported);
-
-    assert (self);
-    assert (buffer);
-    assert (bsize);
-    assert (num_writ);
-
-    assert (false);
-
-    LOGERR (klogInt, rc, "KFileRead failed to filter call");
-
-    return rc;
-}
-
-static
-rc_t CC KReencFileWrite (KReencFile *self, uint64_t pos,
-                         const void *buffer, size_t bsize,
-                         size_t *num_writ)
-{
-    assert (self);
-    assert (buffer);
-    assert (bsize);
-    assert (num_writ);
-
-    assert (REENCFILE_WRITE_SUPPORTED);
-
-    /* this needs to be finished before we can support Write open */
-
-    return KReencFileWriteUnsupported (self, pos, buffer, bsize, num_writ);
-}
-
-
-/* ----------------------------------------------------------------------
- * Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KReencFileType (const KReencFile *self)
-{
-    assert (self != NULL);
-    assert (self->encrypted != NULL);
-
-    return KFileType (self->encrypted);
-}
-
-
-/* ----------------------------------------------------------------------
- * KReencFileMake
- *  create a new file object
- */
-
-
-/* ----------
- * MakeParamValidate
- * common parameter validation for both reencryptors
- */
-static
-rc_t KReencFileMakeParamValidate (const KFile ** pself, const KFile * encrypted, 
-                                  const KKey * deckey, const KKey * enckey)
-{
-    rc_t rc = 0;
-
-    do
-    {
-        if (pself == NULL)
-        {
-            rc = RC (rcFS, rcFile, rcConstructing, rcSelf, rcNull);
-            LOGERR (klogErr, rc,
-                    "pointer to self NULL when creating "
-                    "a re-encryptor");
-            break;
-        }
-
-        *pself = NULL;
-
-        if (encrypted == NULL)
-        {
-            rc = RC (rcFS, rcFile, rcConstructing, rcParam, rcNull);
-            LOGERR (klogErr, rc, 
-                    "encrypted file not supplied when creating "
-                    "an encryptor/decryptor");
-            break;
-        }
-
-        if ((enckey == NULL) || (deckey == NULL))
-        {
-            rc = RC (rcFS, rcFile, rcConstructing, rcParam, rcNull);
-            LOGERR (klogErr, rc, 
-                    "key not supplied when creating a re-encryptor");
-            break;
-        }
-
-        switch (deckey->type)
-        {
-        default:
-            rc = RC (rcFS, rcFile, rcConstructing, rcParam, rcInvalid);
-            PLOGERR (klogErr,
-                     (klogErr, rc, "invalid key type '$(T)' should be "
-                      "kkeyAES128(1), kkeyAES192(2) or kkeyAES256(3)",
-                      "T=%u", deckey->type));
-            break;
-
-        case kkeyAES128:
-        case kkeyAES192:
-        case kkeyAES256:
-            break;
-        }
-        switch (enckey->type)
-        {
-        default:
-            rc = RC (rcFS, rcFile, rcConstructing, rcParam, rcInvalid);
-            PLOGERR (klogErr,
-                     (klogErr, rc, "invalid key type '$(T)' should be "
-                      "kkeyAES128(1), kkeyAES192(2) or kkeyAES256(3)",
-                      "T=%u", enckey->type));
-            break;
-
-        case kkeyAES128:
-        case kkeyAES192:
-        case kkeyAES256:
-            break;
-        }
-    } while (0);
-    return rc;
-}
-
-
-/* ----------
- * Read mode is fully seekable if the underlying KFile is seekable some
- * integrity checking will not be performed in allowing this seeking.
- */
-static const KFile_vt_v1 vtKReencFileRead =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KReencFileDestroy,
-    KReencFileGetSysFileUnsupported,
-    KReencFileRandomAccess,
-    KReencFileSize,
-    KReencFileSetSizeUnsupported,
-    KReencFileRead,
-    KReencFileWriteUnsupported,
-
-    /* 1.1 */
-    KReencFileType
-};
-
-
-LIB_EXPORT rc_t CC KReencFileMakeRead (const KFile ** pself, 
-                                       const KFile * encrypted,
-                                       const KKey * deckey,
-                                       const KKey * enckey)
-{
-    KReencFile * self;
-    uint64_t size;
-    uint64_t block_count;
-    rc_t rc;
-
-    rc = KReencFileMakeParamValidate (pself, encrypted, deckey, enckey);
-    if (rc)
-    {
-        LOGERR (klogErr, rc, "error constructing decryptor");
-        return rc;
-    }
-
-    rc = KFileSize (encrypted, &size);
-    if (GetRCState (rc) == rcUnsupported)
-    {
-        size = 0;
-        rc = RC (rcKrypto, rcFile, rcConstructing, rcSize, rcUnsupported);
-        LOGERR (klogErr, rc, "Can't re-encrypt files that don't support KFileSize");
-        return rc;
-    }
-    
-    if (rc)
-    {
-        LOGERR (klogErr, rc, "Unable to attempt to size encrypted file for reencryption");
-        return rc;
-    }
-
-    rc = KFileAddRef (encrypted);
-    if (rc)
-    {
-        LOGERR (klogErr, rc, "Unable to add reference to encrypted file for re-encryptor");
-        return rc;
-    }
-
-    if (size == 0)
-    {
-        *pself = encrypted;
-        return rc;
-    }
-    if (size < sizeof (KEncFileHeader) + sizeof (KEncFileFooter))
-    {
-        rc = RC (rcKrypto, rcFile, rcConstructing, rcSize, rcInvalid);
-        LOGERR (klogErr, rc, "encrypted file too short to be valied for re-encryption");
-        KFileRelease (encrypted);
-        return rc;
-    }
-
-    {
-        uint64_t temp;
-
-        temp = size - (sizeof (KEncFileHeader) + sizeof (KEncFileFooter));
-        block_count = temp / sizeof (KEncFileBlock);
-        if ((block_count * sizeof (KEncFileBlock)) != temp)
-        {
-            rc = RC (rcKrypto, rcFile, rcConstructing, rcSize, rcInvalid);
-            LOGERR (klogErr, rc, "encrypted file invalid size for re-encryption");
-            KFileRelease (encrypted);
-            return rc;
-        }
-    }
-
-    self = calloc (1,sizeof (*self));
-
-    if (self == NULL)
-    {
-        rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-        LOGERR (klogSys, rc,
-                "out of memory creating encrypter and/or decryptor");
-    }
-    else
-    {
-        rc = KFileInit (&self->dad, (const KFile_vt*)&vtKReencFileRead, "KReencFile", "no-name", true, false);
-        if (rc)
-            LOGERR (klogInt, rc, "failed in initialize reenc base class");
-        else
-        {
-            self->encrypted = encrypted;
-            /* dec, enc, ram need to be Make */
-            /* num_read, num_write stay 0 */
-            self->block_id = NO_CURRENT_BLOCK;
-            /* missing needs to be Made */
-            /* next_block stays 0 */
-            /* seek_block stays 0 - obsolete */
-            self->footer_block = EncryptedPos_to_BlockId (size, NULL, NULL);
-            self->size = size;
-            self->known_size = true; /* obsolete */
-            /* plain_text and block stay 0 */
-            self->foot.foot.block_count = self->footer_block;
-
-            rc = KEncFileMakeRead (&self->dec, encrypted, deckey);
-            if (rc)
-                LOGERR (klogErr, rc, "Failed to create re-enc decryptor");
-
-            else
-            {
-                rc = KRamFileMakeUpdate (&self->ram, self->block.text, 
-                                         sizeof self->block.text);
-                if (rc)
-                    LOGERR (klogErr, rc, 
-                            "Failed to create re-enc encryptor");
-                else
-                {
-
-                    rc = KEncFileMakeWriteBlock (&self->enc, self->ram, enckey);
-                    if (rc)
-                        LOGERR (klogErr, rc,
-                                "Failed to create RAM file for reenc");
-                    else
-                    {
-                        *pself = &self->dad;
-                        return 0;
-                    }
-                    KFileRelease (self->ram);
-                }
-                KFileRelease (self->dec);
-            }
-        }
-        free (self);
-    }
-    KFileRelease (encrypted);
-    return rc;
-}
-
-
-static const KFile_vt_v1 vtKEncryptFileRead =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KReencFileDestroy,
-    KReencFileGetSysFileUnsupported,
-    KReencFileRandomAccess,
-    KEncryptFileSize,
-    KReencFileSetSizeUnsupported,
-    KReencFileRead,
-    KReencFileWriteUnsupported,
-
-    /* 1.1 */
-    KReencFileType
-};
-
-
-LIB_EXPORT rc_t CC KEncryptFileMakeRead (const KFile ** pself, 
-                                         const KFile * encrypted,
-                                         const KKey * enckey)
-{
-    KReencFile * self;
-    uint64_t rawsize;
-    uint64_t size;
-    rc_t rc;
-
-    rc = KReencFileMakeParamValidate (pself, encrypted, enckey, enckey);
-    if (rc)
-    {
-        LOGERR (klogErr, rc, "error constructing decryptor");
-        return rc;
-    }
-
-    rc = KFileSize (encrypted, &rawsize);
-    if (GetRCState (rc) == rcUnsupported)
-    {
-        size = 0;
-        rc = RC (rcKrypto, rcFile, rcConstructing, rcSize, rcUnsupported);
-        LOGERR (klogErr, rc, "Can't encrypt files that don't support KFileSize");
-        return rc;
-    }
-    
-    if (rc)
-    {
-        LOGERR (klogErr, rc, "Unable to attempt to size encrypted file for encryption");
-        return rc;
-    }
-
-    rc = KFileAddRef (encrypted);
-    if (rc)
-    {
-        LOGERR (klogErr, rc, "Unable to add reference to unencrypted file for encryptor");
-        return rc;
-    }
-
-    self = calloc (1,sizeof (*self));
-
-    if (self == NULL)
-    {
-        rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-        LOGERR (klogSys, rc,
-                "out of memory creating encrypter and/or decryptor");
-    }
-    else
-    {
-        rc = KFileInit (&self->dad, (const KFile_vt*)&vtKEncryptFileRead, "KEncryptFile", "no-path", true, false);
-        if (rc)
-            LOGERR (klogInt, rc, "failed in initialize reenc base class");
-        else
-        {
-            self->encrypted = encrypted;
-            /* dec, enc, ram need to be made below */
-            /* num_read, num_write stay 0 */
-            self->block_id = NO_CURRENT_BLOCK;
-            /* missing needs to be Made */
-            /* next_block stays 0 */
-            /* seek_block stays 0 - obsolete */
-
-            self->footer_block = PlaintextSize_to_BlockCount ( rawsize, NULL );
-            size = BlockId_to_CiphertextOffset ( self -> footer_block ) + sizeof ( KEncFileFooter );
-            self->size = size;
-            self->known_size = true; /* obsolete */
-
-            /* plain_text and block stay 0 */
-            self->foot.foot.block_count = self->footer_block;
-
-            rc = KFileAddRef (self->dec = encrypted);
-            if (rc)
-                LOGERR (klogErr, rc, "Unable to add reference to unencrypted file for encryptor");
-
-            else
-            {
-                rc = KRamFileMakeUpdate (&self->ram, self->block.text, 
-                                         sizeof self->block.text);
-                if (rc)
-                    LOGERR (klogErr, rc, 
-                            "Failed to create ram file for encryptor");
-                else
-                {
-                    
-                    rc = KEncFileMakeWriteBlock (&self->enc, self->ram, enckey);
-                    if (rc)
-                        LOGERR (klogErr, rc,
-                                "Failed to create RAM file for enc");
-                    else
-                    {
-                        *pself = &self->dad;
-                        return 0;
-                    }
-                    KFileRelease (self->ram);
-                }
-                KFileRelease (self->dec);
-            }
-        }
-        free (self);
-    }
-    KFileRelease (encrypted);
-    return rc;
-}
-
-
-/* ----------
- * Write mode re-encrypted file 
- */
-static const KFile_vt_v1 vtKReencFileWrite =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KReencFileDestroy,
-    KReencFileGetSysFileUnsupported,
-    KReencFileRandomAccess,
-    KReencFileSize,
-    KReencFileSetSizeUnsupported,
-    KReencFileReadUnsupported,
-    KReencFileWrite,
-
-    /* 1.1 */
-    KReencFileType
-};
-
-
-LIB_EXPORT rc_t CC KReencFileMakeWrite (KFile ** pself, 
-                                        KFile * encrypted,
-                                        const KKey * deckey,
-                                        const KKey * enckey)
-{
-#if REENCFILE_WRITE_SUPPORTED
-    KReencFile * self;
-    rc_t rc;
-
-    rc = KFileSetSize (encrypted, 0);
-#if 0
-    if (rc)
-        LOGERR (klogWarn, rc, "error truncating output file - "
-                "corrupted file might result");
-#endif
-
-    rc = KReencFileMakeParamValidate (&self, encrypted, deckey, enckey,
-                                      &vtKEncFileWrite, true);
-    if (rc)
-        LOGERR (klogErr, rc, "error creating encryptor");
-    else
-        *pself = &self->dad;
-    return rc;
-#else
-    return RC ( rcFS, rcFile, rcCreating, rcFunction, rcUnsupported );
-#endif
-}
-
-
-/* end of file reencfile.c */
-
-
diff --git a/libs/krypto/rng-impl.h b/libs/krypto/rng-impl.h
deleted file mode 100644
index 04b3418..0000000
--- a/libs/krypto/rng-impl.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kryptoimpl_
-#define _h_kryptoimpl_
-
-#include <klib/rc.h>
-#include <klib/refcount.h>
-#include <atomic.h>
-#include <krypto/rng.h>
-#include "rng-priv.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-
-typedef union KRng_vt KRng_vt;
-
-
-
-
-#ifndef KRNG_IMPL
-#define KRNG_IMPL KRng
-#endif
-
-typedef struct KRng_vt_v1 KRng_vt_v1;
-struct KRng_vt_v1
-{
-    /* version == 1.x */
-    uint32_t maj;
-    uint32_t min;
-
-    /* start minor version == 0 */
-    rc_t (CC * destroy) (KRNG_IMPL * self);
-    rc_t (CC * seed)    (KRNG_IMPL * self);
-    rc_t (CC * reseed)  (KRNG_IMPL * self, const void * buff, size_t buff_size);
-    rc_t (CC * read)    (const KRNG_IMPL *self, void * buff, uint32_t buff_len,
-                         uint32_t * num_read);
-    /* end minor version == 0 */
-    /* start minor version == 1 */
-    /* end minor version == 1 */
-    /* end version == 1.x */
-};
-
-union KRng_vt
-{
-    KRng_vt_v1 v1;
-};
-
-static
-rc_t KRngInit (KRng * self, union KRng_vt * vt, const char * type)
-{
-    self->vt = vt;
-    KRefcountInit (&self->refcount, 1, "KRng", "Init", type);
-    return 0;
-}
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_kryptoimpl_ */
diff --git a/libs/krypto/rng.c b/libs/krypto/rng.c
deleted file mode 100644
index f19c4f9..0000000
--- a/libs/krypto/rng.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <krypto/extern.h>
-#include <krypto/rng.h>
-#include <krypto/rng-impl.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/refcount.h>
-
-#include <stdlib.h>
-#include <assert.h>
-
-LIB_EXPORT rc_t CC KRngAddRef (const KRng * self)
-{
-    if (self) switch (KRefcountAdd (&self->refcount, "KRng"))
-    {
-    case krefLimit:
-        return RC (rcRuntime, rcNoTarg, rcAttaching, rcRange, rcExcessive);
-    }
-
-    return 0;
-}
-
-
-LIB_EXPORT rc_t CC KRngRelease (const KRng * self)
-{
-    if (self) switch (KRefcountDrop (&self->refcount, "KRng"))
-    {
-    case krefWhack:
-        switch (self->vt->v1.maj)
-        {
-        case 1:
-            return (self->vt->v1.destroy ((KRng*)self));
-        }
-        return RC (rcKrypto, rcRng, rcAccessing, rcSelf, rcBadVersion);
-    }
-    return 0;
-}
-
-
-LIB_EXPORT rc_t CC KRngSeed (KRng * self)
-{
-    if (self == NULL)
-        return RC (rcKrypto, rcRng, rcReading, rcSelf, rcNull);
-
-    switch (self->vt->v1.maj)
-    {
-    case 1:
-        return (self->vt->v1.seed (self));
-    }
-    return RC (rcKrypto, rcRng, rcAccessing, rcSelf, rcBadVersion);
-}
-
-
-LIB_EXPORT rc_t CC KRngReseed (KRng * self, void * buffer, size_t bsize)
-{
-    if (self == NULL)
-        return RC (rcKrypto, rcRng, rcReading, rcSelf, rcNull);
-    if (buffer == NULL)
-        return RC (rcKrypto, rcRng, rcReading, rcBuffer, rcNull);
-
-    switch (self->vt->v1.maj)
-    {
-    case 1:
-        return (self->vt->v1.reseed (self, buffer, bsize));
-    }
-    return RC (rcKrypto, rcRng, rcAccessing, rcSelf, rcBadVersion);
-}
-
-LIB_EXPORT rc_t CC KRngRead (const KRng * self, void * buffer, uint32_t bsize, uint32_t * num_read)
-{
-    if (num_read == NULL)
-        return RC (rcKrypto, rcRng, rcReading, rcParam, rcNull);
-    *num_read = 0;
-    if (self == NULL)
-        return RC (rcKrypto, rcRng, rcReading, rcSelf, rcNull);
-    if (buffer == NULL)
-        return RC (rcKrypto, rcRng, rcReading, rcBuffer, rcNull);
-
-    switch (self->vt->v1.maj)
-    {
-    case 1:
-        return (self->vt->v1.read (self, buffer, bsize, num_read));
-    }
-    return RC (rcKrypto, rcRng, rcAccessing, rcSelf, rcBadVersion);
-}
-
-LIB_EXPORT rc_t CC KRngInit (KRng * self, union KRng_vt * vt, const char * type)
-{
-    self->vt = vt;
-    KRefcountInit (&self->refcount, 1, "KRng", "Init", type);
-    return 0;
-}
-
-    
diff --git a/libs/krypto/testcipher.c b/libs/krypto/testcipher.c
deleted file mode 100644
index d23257f..0000000
--- a/libs/krypto/testcipher.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-#include <krypto/extern.h>
-#include <klib/defs.h>
-
-#include <krypto/cipher-test.h>
-#include "cipher-priv.h"
-#include <klib/rc.h>
-
-
-KRYPTO_EXTERN
-rc_t KCipherTestVecAesNiMake (struct KCipher ** new_cipher, kcipher_type type)
-{
-    if (new_cipher == NULL)
-        return RC (rcKrypto, rcCipher, rcConstructing, rcSelf, rcNull);
-
-    else
-        return KCipherVecAesNiMake (new_cipher, type);
-}
-
-
-KRYPTO_EXTERN
-rc_t KCipherTestVecRegMake   (struct KCipher ** new_cipher, kcipher_type type)
-{
-    if (new_cipher == NULL)
-        return RC (rcKrypto, rcCipher, rcConstructing, rcSelf, rcNull);
-
-    else
-        return KCipherVecRegMake (new_cipher, type);
-}
-
-
-KRYPTO_EXTERN
-rc_t KCipherTestVecMake      (struct KCipher ** new_cipher, kcipher_type type)
-{
-    if (new_cipher == NULL)
-        return RC (rcKrypto, rcCipher, rcConstructing, rcSelf, rcNull);
-
-    else
-        return KCipherVecMake (new_cipher, type);
-}
-
-
-KRYPTO_EXTERN
-rc_t KCipherTestByteMake     (struct KCipher ** new_cipher, kcipher_type type)
-{
-    if (new_cipher == NULL)
-        return RC (rcKrypto, rcCipher, rcConstructing, rcSelf, rcNull);
-
-    else
-        return KCipherByteMake (new_cipher, type);
-}
-
-
diff --git a/libs/krypto/unix/sysrng.c b/libs/krypto/unix/sysrng.c
deleted file mode 100644
index 8fed8b0..0000000
--- a/libs/krypto/unix/sysrng.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <krypto/extern.h>
-#include <krypto/rng.h>
-#include "rng-priv.h"
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/checksum.h>
-
-
-#include <time.h>
-
-#include <unistd.h> /* unix specific so unix specific header is ok too */
-#include <string.h>
-
-rc_t KRngSysEntropy (KRng * self, uint8_t * buffer, size_t buff_size)
-{
-    MD5State state;
-    KDirectory * dir;
-    const KFile * file;
-    uint64_t file_pos;
-    rc_t rc;
-
-    if (self == NULL)
-        return RC (rcKrypto, rcRng, rcWriting, rcSelf, rcNull);
-    if (buffer == NULL)
-        return RC (rcKrypto, rcRng, rcWriting, rcParam, rcNull);
-
-    rc = KDirectoryNativeDir (&dir);
-    if (rc == 0)
-    {
-        rc = KDirectoryOpenFileRead (dir, &file, "/dev/random");
-        if (rc)
-            file = NULL;
-    }
-
-    file_pos = 0;
-    MD5StateInit (&state);
-
-    while (buff_size > 0)
-    {
-
-        if (file)
-        {
-            size_t to_read;
-            size_t num_read;
-
-            to_read = (buff_size > 16) ? 16 : buff_size;
-
-            rc = KFileRead (file, file_pos, buffer, to_read, &num_read);
-            if (rc == 0)
-            {
-                buffer += num_read;
-                buff_size -= num_read;
-                file_pos += num_read; /* superfluous? */
-            }
-        }
-        if (buff_size > 0)
-        {
-            uint8_t digest [16];
-            char buff [1024];
-            size_t ii;
-
-            string_printf (buff, sizeof (buff), &ii,
-                           "%p%zu%lu%lu%lu%lu%s%s%lu",
-                           buffer, buff_size, (uint64_t)clock(),
-                           (uint64_t)time(NULL), (uint64_t)getpid(), 
-                           (uint64_t)getuid(), getlogin(), ttyname(0),
-                           (uint64_t)getgid());
-
-            MD5StateAppend (&state, buff, sizeof buff);
-            MD5StateFinish (&state, digest);
-
-            ii = (buff_size < sizeof (digest)) ? buff_size : sizeof (digest);
-            memcpy (buffer, digest, ii);
-            buff_size -= ii;
-            buffer += ii;
-        }
-    }
-
-    KFileRelease (file);
-    KDirectoryRelease (dir);
-    
-    return 0;
-}
diff --git a/libs/krypto/wgaencrypt.c b/libs/krypto/wgaencrypt.c
deleted file mode 100644
index 319dbf3..0000000
--- a/libs/krypto/wgaencrypt.c
+++ /dev/null
@@ -1,1254 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <krypto/extern.h>
-#include <krypto/cipher.h>
-#include <krypto/ciphermgr.h>
-
-#include <krypto/wgaencrypt.h>
-
-#include <kfs/file.h>
-#include <kfs/countfile.h>
-#include <kfs/md5.h>
-#include <kfs/buffile.h>
-#include <kfs/nullfile.h>
-
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/checksum.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-
-#include <sysalloc.h>
-
-#include <strtol.h>
-
-#include <time.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#include <os-native.h> /* strncasecmp on Windows */
-
-/* retain errors in encryption to be compatible with C++ */
-#define RETAINED_COMPATIBILTY_WITH_ERROR 1
-
-
-#define WGA_AES_BITS (256)
-#define ECB_BYTES (16)
-#define DEFAULT_BUFF_SIZE       (32*1024)
-
-
-#define DEBUG_STS(msg)     DBGMSG(DBG_KRYPTO,DBG_FLAG(DBG_KRYPTO_STS),msg)
-#define DEBUG_CFG(msg)     DBGMSG(DBG_KRYPTO,DBG_FLAG(DBG_KRYPTO_CFG_,msg)
-#define DEBUG_ENCRYPT(msg) DBGMSG(DBG_KRYPTO,DBG_FLAG(DBG_KRYPTO_ENCRYPT_,msg)
-#define DEBUG_DECRYPT(msg) DBGMSG(DBG_KRYPTO,DBG_FLAG(DBG_KRYPTO_DECRYPT_,msg)
-
-static
-void CalcMD5 (void * buffer, size_t size, char hexstr [32])
-{
-    static const char to_hex[16] = "0123456789abcdef";
-    MD5State state;
-    uint8_t digest [16];
-    uint8_t * bin;
-    char * hex;
-    int ix;
-
-    MD5StateInit (&state);
-    MD5StateAppend (&state, buffer, size);
-    MD5StateFinish (&state, digest);
-
-    bin = digest;
-    hex = hexstr;
-
-    for (ix = 0; ix < sizeof digest; ++ix)
-    {
-        uint8_t upper;
-        uint8_t lower;
-
-        upper = *bin++;
-        lower = upper & 0xF;
-        upper >>= 4;
-
-        *hex++ = to_hex [upper];
-        *hex++ = to_hex[lower];
-    }
-}
-
-
-/* ----------------------------------------------------------------------
- * KWGAEncFileMagic is extracted from 
- *      internal/WGA/access_countrol/src/wga/fuse/enc_reader.[ch]pp
- * 
- * the size 9 is not commented on but appears to be the size of ASCIZ
- * that is the 'magic' pattern including the NUL.
- *
- * There is no version number in the header and that NUL could be turned
- * into a single byte version.
- */
-typedef char KWGAEncFileMagic [9];
-static const KWGAEncFileMagic ncbi_crypt_magic = "NeCnBcIo";
-
-/* ----------------------------------------------------------------------
- * Some values are stored in the encrypted file header using an odd radix 33
- */
-#define KWGA_ENC_FILE_HEADER_RADIX      (33)
-
-static
-const char KWGAEncFileHeaderAlphabet[] = "0123456789abcdefghijklmnopqrstuvwxyz";
-
-
-/* ----------------------------------------------------------------------
- * KWGAEncFileHeader is extracted from 
- *      internal/WGA/access_countrol/src/wga/fuse/enc_reader.[ch]pp
- *
- * There is no version number in this header; see the comment about KWGAEncFileMagic
- */
-typedef uint8_t FER_ENCODING;
-enum
-{
-    fer_encDES,
-    fer_encBLF,
-    fer_encAES
-};
-
-typedef struct KWGAEncFileHeader
-{
-    char magic [9];     /* "NeCnBcIo" -- NUL could be turned into a version */          /* 00 */
-    char block_sz [8];  /* radixx33 encoded: block size in bytes / usually 4096  */     /* 09 */
-    char file_sz [16];  /* radixx33 encoded: total size of unencrypted file */          /* 11 */
-    char mtime [8];     /* radixx33 encoded: 32 bit time_t  */                          /* 21 */
-    char fer_enc;       /* see FER_ENCODING */                                          /* 29 */
-    char md5_here;      /* bool if non zero, the whole file MD5 is below */             /* 2A */
-    char md5 [32];      /* whole file MD5 is ASCII hex */                               /* 2B */
-    char md51 [32];     /* first block MD5 */                                           /* 4B */
-    char reserved [21];                                                                 /* 6B */
-} KWGAEncFileHeader;                                                                    /* 80 */
-
-/* Original definition is in internal/WGA/access_countrol/src/wga/fuse/enc_reader.hpp */
-static const int8_t header_table[sizeof (KWGAEncFileHeader)] =
-{
-    101,  -6,   -23,  5,    -93,  20,   -128, -36,      /* 00 */
-    -42,  74,   -98,  104,  42,   12,   127,  37,       /* 08 */
-    -47,  -61,  124,  54,   -124, -94,  47,   72,       /* 10 */
-    70,   17,   -10,  108,  8,    31,   37,   -38,      /* 18 */
-    104,  -6,   -117, 79,   115,  89,   33,   -93,      /* 20 */
-    -47,  -105, -87,  -38,  90,   -45,  -59,  -46,      /* 28 */
-    -96,  106,  15,   -87,  -110, -101, 106,  -117,     /* 30 */
-    39,   73,   120,  -30,  -63,  21,   127,  -32,      /* 38 */
-    98,   -104, -3,   -81,  -60,  -120, 13,   -108,     /* 40 */
-    -53,  88,   123,  7,    103,  32,   -14,  -113,     /* 48 */
-    -68,  -27,  44,   109,  -122, -7,   81,   -13,      /* 50 */
-    64,   42,   -88,  -37,  -1,   -19,  66,   -105,     /* 58 */
-    -75,  -108, -5,   -121, -86,  47,   -120, -18,      /* 60 */
-    -69,  -29,  -68,  124,  -53,  -104, -28,  42,       /* 68 */
-    120,  52,   -80,  -23,  -110, -101, 106,  -117,     /* 70 */
-    -21,  -35,  12,   -117, 9,    -122, -21,  31        /* 78 */
-};                                                      /* 80 */
-
-static const KWGAEncFileHeader header_const =
-{
-    "NeCnBcIo", /* NUL terminator is significant */
-    {0},{0},{0},/* not constant */
-    fer_encAES, /* constant as DES and Blowfish are not implmented */
-    0,{0},{0},  /* not constant */
-    {0}         /* constant */
-};
-
-/* the header is obscured by XOR against a predefined pattern */
-static
-void KWGAEncFileHeaderDecrypt (KWGAEncFileHeader * header)
-{
-    size_t ix;
-    int8_t * p = (int8_t*)header;
-
-    assert (header);
-    for (ix = 0; ix < sizeof (*header); ++ix)
-        p[ix] ^= header_table[ix];
-}
-
-KRYPTO_EXTERN rc_t CC KFileIsWGAEnc (const void * buffer, size_t buffer_size)
-{
-    const uint8_t * ph;
-    const uint8_t * pt;
-    const uint8_t * pb;
-    size_t ix;
-    size_t lim;
-
-    if ((buffer == NULL) || (buffer_size == 0))
-        return RC  (rcFS, rcFile, rcIdentifying, rcParam, rcNull); 
-
-    /* bare minimum size to identify we decide is the first 8 
-     * obsfucated ASCII bytes */
-
-    if (buffer_size < (sizeof (header_const.magic) - 1))
-        return RC (rcFS, rcFile, rcIdentifying, rcBuffer, rcInsufficient); 
-
-    /* a match is ph[X] ^ pt[X] == pb[X] at specially identified points
-     * we could have put the ^ into a constant for a tad faster operation
-     * but meh...
-     */
-    ph = (const uint8_t*)&header_const;
-    pt = (const uint8_t*)&header_table;
-    pb = (const uint8_t*)buffer;
-
-    ix = offsetof (struct KWGAEncFileHeader, magic);
-    lim = ix + sizeof (header_const.magic);
-    if (lim > buffer_size)
-        lim = buffer_size;
-    for (; (ix < lim) && (ix < buffer_size); ++ix)
-        if ((ph[ix] ^ pt[ix]) != pb[ix])
-            return SILENT_RC (rcFS, rcFile, rcIdentifying, rcFile, rcWrongType); 
-
-    if (buffer_size < offsetof (struct KWGAEncFileHeader, fer_enc))
-        return 0;
-
-    if ((ph[offsetof (struct KWGAEncFileHeader, fer_enc)] ^ pt[offsetof (struct KWGAEncFileHeader, fer_enc)])
-        != pb[offsetof (struct KWGAEncFileHeader, fer_enc)])
-        return RC (rcFS, rcFile, rcIdentifying, rcFile, rcWrongType); 
-
-
-    ix = offsetof (struct KWGAEncFileHeader, reserved);
-    if (buffer_size < ix)
-        return 0;
-
-    lim = ix + sizeof (header_const.reserved);
-
-    if (lim > buffer_size)
-        lim = buffer_size;
-    
-    for (; ix < lim; ++ix)
-        if ((ph[ix] ^ pt[ix]) != pb[ix])
-            return RC (rcFS, rcFile, rcIdentifying, rcFile, rcWrongType);
-
-    return 0;
-}
-
-
-
-
-
-
-/* ======================================================================
- * KWGAEncFile
- */
-
-/* -----
- * define the specific types to be used in the templatish/inheritancish
- * definition of vtables and their elements
- */
-typedef struct KWGAEncFile KWGAEncFile;
-#define KFILE_IMPL struct KWGAEncFile
-
-#include <kfs/impl.h>
-
-struct KWGAEncFile
-{
-    KFile dad;                  /* base class */
-    const KFile * encrypted;    /* encrypted file as a read only KFile */
-    uint64_t file_size;         /* as read from the encrypted file header */
-    KTime_t mtime;              /* as read from the encrypted file header */
-    uint32_t block_size;        /* block size is in KB  not bytes */
-    KCipher * cipher;
-
-    char inkey [32];
-    size_t inkey_size;
-
-    bool md5_here;              /* was the md5 in the header? */
-    char md5[32];            /* external md5 loaded into the header as ASCII hex */
-    char md51[32];           /* md5 of first block loaded into the header as ASCII hex */
-    struct
-    {
-        uint64_t  offset;       /* position with in the unencrypted file */
-        uint32_t  valid;        /* how much usable at data */
-        uint8_t   data [DEFAULT_BUFF_SIZE];
-    } buffer;
-};
-
-
-/* ----------------------------------------------------------------------
- * InitKey
- *
- * This method mimics the prepare_key method in the WGA C++ code including
- * what looks like programming errors.
- *
- * The goal is compatibility not 'correctness'.
- */
-static
-rc_t KWGAEncFileKeyInit (KWGAEncFile * self, const char * key, size_t key_size)
-{
-    rc_t rc;
-    char g_key [32];  /* original used 513 but no key uses that much */
-
-    /* scary! */
-    /* this is copied directly from enc_read.cpp with all the 'possibly wrong' code */
-    memset (g_key, 0, sizeof g_key);
-    if (key_size > sizeof (g_key))
-        key_size = sizeof (g_key);
-    memcpy (g_key, key, key_size);
-
-    if (key_size < 16) /* even though g_key and some cipher keys are larger than 16 */
-    {
-        size_t jx, ix;
-        for ((jx = key_size),(ix = 0); jx < 16; ++jx, ++ix)
-        {
-            g_key[jx] = self->md51[ix] | g_key[ix%(jx?jx:1)];    /* cringe? */
-        }
-    }
-
-    /* okay we'll use 32 bytes from g_key though is is highly
-     * likely we've only got 16 non-zero bytes */
-     rc = KCipherSetDecryptKey (self->cipher, g_key, WGA_AES_BITS/8);
-
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * Destroy
- *
- */
-static
-rc_t CC KWGAEncFileDestroyRead (KWGAEncFile *self)
-{
-    rc_t rc = 0;
-
-    if (self)
-    {
-        rc = KFileRelease (self->encrypted);
-        free (self);
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- *
- * We do not allow this for read, write or update as you can not memory map the 
- * unencrypted file in a meaningful way.
- */
-static
-struct KSysFile *CC KWGAEncFileGetSysFile (const KWGAEncFile *self, uint64_t *offset)
-{
-    assert (self);
-    assert (offset);
-    return NULL;
-}
-
-
-/* ----------------------------------------------------------------------
- * RandomAccess
- *
- *  returns 0 if random access, error code otherwise
- */
-static
-rc_t CC KWGAEncFileRandomAccess (const KWGAEncFile *self)
-{
-    assert (self != NULL);
-    assert (self->encrypted != NULL);
-    return KFileRandomAccess (self->encrypted);
-}
-
-
-/* ----------------------------------------------------------------------
- * Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t CC KWGAEncFileSize (const KWGAEncFile *self, uint64_t *size)
-{
-    uint64_t esize;
-    rc_t rc;
-    assert (self != NULL);
-    assert (self->encrypted != NULL);
-    assert (size != NULL);
-
-    *size = 0;
-    rc = KFileSize (self->encrypted, &esize);
-    if (rc == 0)
-        *size = esize - sizeof (KWGAEncFileHeader);
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KWGAEncFileSetSize (KWGAEncFile *self, uint64_t size)
-{
-    assert (self);
-
-    return RC ( rcFS, rcFile, rcUpdating, rcFunction, rcUnsupported );
-}
-
-
-/* ----------------------------------------------------------------------
- * Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-
-/* local fill the buffer with block or more  */
-static
-rc_t KWGAEncFileReadInt (KWGAEncFile * self, uint64_t pos, size_t bsize)
-{
-    uint64_t adjpos;
-    size_t tot_read;
-    size_t num_read;
-    rc_t rc = 0;
-
-    assert (self);
-    assert (bsize);
-    assert (bsize <= 32 * 1024);
-    assert (128%16 == 0);
-
-    memset (self->buffer.data, 0, sizeof self->buffer.data);
-    tot_read = num_read = 0;
-    adjpos = pos + sizeof (KWGAEncFileHeader);
-#if 0
-    do
-    {
-        rc = KFileRead (self->encrypted, adjpos + tot_read,
-                        self->buffer.data + tot_read, bsize - tot_read,
-                        &num_read);
-        if (rc)
-            return rc;        
-        tot_read += num_read;
-    } while ((tot_read < bsize) && (num_read > 0));
-#else
-    rc = KFileReadAll (self->encrypted, adjpos, self->buffer.data, bsize,
-                       &tot_read);
-#endif
-    self->buffer.offset = pos;
-    self->buffer.valid = (uint32_t)tot_read;
-
-    if (tot_read & 15)
-        rc = RC (rcKrypto, rcFile, rcReading, rcSize, rcInsufficient);
-    else if (tot_read > 0)
-    {
-#if 1
-
-#if RETAINED_COMPATIBILTY_WITH_ERROR
-        KCipherDecryptECB (self->cipher, self->buffer.data, self->buffer.data,
-                           (uint32_t)(tot_read / ECB_BYTES));
-#else
-/* Well this is wrong for even being wrong now */
-        KCipherDecryptECB (self->cipher, self->buffer.data, self->buffer.data,
-                           tot_read);
-#endif
-
-#else
-        uint32_t count;
-        uint32_t ix;
-
-        /* this loop can be replaced by the KCipherDecryptECB
-         * with care taken to match the error in the original
-         * C++
-         */
-
-#if RETAINED_COMPATIBILTY_WITH_ERROR
-        count = tot_read / ECB_BYTES;
-#else
-        /* do all full 16 byte blocks plus a last partial block */
-        count = (tot_read + (ECB_BYTES-1)) / ECB_BYTES;
-#endif
-        for (ix = 0; ix < count; ++ix)
-        {
-            uint8_t * pb = self->buffer.data + (ix * ECB_BYTES);
-
-            rc = KCipherDecrypt (self->cipher, pb, pb);
-            if (rc)
-                break;
-        }
-#endif
-    }
-    return rc;
-}
-
-
-static
-rc_t CC KWGAEncFileRead	(const KWGAEncFile *cself,
-                         uint64_t pos,
-                         void *buffer,
-                         size_t bsize,
-                         size_t *num_read)
-{
-    KWGAEncFile * self = (KWGAEncFile *)cself; /* mutable values */
-    rc_t rc = 0;
-
-    assert (cself);
-    assert (buffer);
-    assert (num_read);
-
-
-    *num_read = 0;
-
-    /* are we even within the file? If not just say no. Drugs are bad Mmmkay */
-    if (pos >= self->file_size)
-    {}
-    /* are we not reading from out what is already in the decrypted buffer space? */
-    else
-    {
-        if ((self->buffer.valid == 0) ||
-            (pos < self->buffer.offset) ||
-            (pos >= (self->buffer.offset + self->buffer.valid)))
-        {
-            if (pos < self->block_size) /* we'll be reading from the first 'block' */
-            {
-                rc = KWGAEncFileReadInt (self, 0, self->block_size);
-                if (rc)
-                {
-                    LOGERR (klogErr, rc, "error reading first data block of"
-                            " encrypted file");
-                    return rc;
-                }
-                if (self->buffer.valid > self->block_size)
-                {
-                    rc = RC (rcFS, rcFile, rcReading, rcBuffer, rcTooBig);
-                    LOGERR (klogInt, rc, "read wrong amount for first block");
-                    return rc;
-                }
-                else
-                {
-                    size_t md5_size;
-                    size_t nudge = 0;
-                    char md51_comp [32];
-
-                    if (self->buffer.valid & (ECB_BYTES-1))
-                        nudge = ECB_BYTES - (self->buffer.valid & (ECB_BYTES-1));
-                    if (nudge)
-                        memset (self->buffer.data + self->buffer.valid, 0, nudge);
-
-                    md5_size = self->buffer.valid + nudge;
-
-                    CalcMD5 (self->buffer.data, md5_size, md51_comp);
-
-#if 1
-                    if (strcase_cmp (self->md51, string_size(self->md51),
-                                     md51_comp, string_size(md51_comp), 32) != 0)
-#else
-                    if (strncasecmp (self->md51, md51_comp, 32) != 0)
-#endif
-                    {
-                        rc = RC (rcFS, rcFile, rcReading, rcConstraint, rcCorrupt);
-                        LOGERR (klogErr, rc, "MD5 does not match in decryption");
-                        return rc;
-                    }
-                }
-            }
-            else /* if (pos >= self->block_size) */
-            {
-                rc = KWGAEncFileReadInt (self, (pos & ~ ( uint64_t ) (16-1)),
-                                         DEFAULT_BUFF_SIZE);
-                if (rc)
-                {
-                    LOGERR (klogErr, rc, "error reading data block of"
-                            " encrypted file");
-                    return rc;
-                }
-            }  /* if (pos < self->block_size) */
-        } /* if ((self->buffer.valid == 0) || etc. */
-        /* if here we have a valid buffer and it contains the start pos requested */
-/*     assert (pos >= self->buffer.offset); */
-/*     assert (pos < (self->buffer.offset +self->buffer.valid)); */
-        {
-            size_t start;
-            size_t limit;
-
-            /* find offset of start for copy within the buffer */
-            start = (size_t)(pos - self->buffer.offset);
-            /* how many bytes available starting here */
-            limit = self->buffer.valid - start;
-
-            if (pos + limit > self->file_size)
-                limit = self->file_size - pos;
-
-            /* are we asking to read more than we have? is so trim the request */
-            if (limit < bsize)
-                bsize = limit;
-
-            memmove (buffer, self->buffer.data + start, bsize);
-            *num_read = bsize;
-        }
-    }
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- *
- * Unsupported as we now treat archives as READ ONLY
- */
-static
-rc_t CC KWGAEncFileWriteFail (KWGAEncFile *self, uint64_t pos,
-                              const void *buffer, size_t bsize,
-                              size_t *num_writ)
-{
-    assert (self);
-    return RC (rcFS, rcFile, rcReading, rcFunction, rcUnsupported);
-}
-
-
-/* ----------------------------------------------------------------------
- * Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t CC KWGAEncFileType (const KWGAEncFile *self)
-{
-    assert (self != NULL);
-    assert (self->encrypted != NULL);
-
-    return KFileType (self->encrypted);
-}
-
-
-static const KFile_vt_v1 vtKWGAEncFileRead =
-{
-    /* version */
-    1, 1,
-
-    /* 1.0 */
-    KWGAEncFileDestroyRead,
-    KWGAEncFileGetSysFile,
-    KWGAEncFileRandomAccess,
-    KWGAEncFileSize,
-    KWGAEncFileSetSize,
-    KWGAEncFileRead,
-    KWGAEncFileWriteFail,
-
-    /* 1.1 */
-    KWGAEncFileType
-};
-
-
-static
-rc_t KWGAEncFileHeaderRead (KWGAEncFile * self)
-{
-    KWGAEncFileHeader header;
-    uint8_t * pb;
-    size_t num_read;
-    size_t tot_read;
-    rc_t rc;
-
-    assert (self);
-    assert (sizeof (KWGAEncFileHeader) == 128);
-
-
-    DEBUG_STS (("s: Enter '%p'\n", __func__, self));
-    pb = (void*)&header;
-    for (num_read = tot_read = 0; tot_read < sizeof header; )
-    {
-        rc = KFileRead (self->encrypted, (uint64_t)tot_read, pb, 
-                        sizeof (header) - tot_read, &num_read);
-        if (rc)
-        {
-            LOGERR (klogErr, rc, "Error reading the header for an encrypted file");
-            return rc;
-        }
-
-        if (num_read == 0)
-        {
-            rc =  RC (rcFS, rcFile, rcReading, rcFile, rcInsufficient);
-            LOGERR (klogErr, rc, "Header incomplete for an encrypted file");
-            return rc;
-        }
-        tot_read += num_read;
-        pb += num_read;
-    }
-
-    KWGAEncFileHeaderDecrypt (&header);
-
-    if (memcmp (header.magic, ncbi_crypt_magic, sizeof ncbi_crypt_magic) != 0)
-    {
-        rc = RC (rcFS, rcFile, rcReading, rcHeader, rcCorrupt);
-        LOGERR (klogErr, rc, "Header's magic bad for encrypted file");
-        return rc;
-    }
-
-    /* so far unknown legal range */
-    self->block_size = strtou32 (header.block_sz, NULL, KWGA_ENC_FILE_HEADER_RADIX);
-
-    self->file_size = strtou64 (header.file_sz, NULL, KWGA_ENC_FILE_HEADER_RADIX);
-
-    /* file format has limiting feature of a 32 bit timestamp */
-    self->mtime = (KTime_t)strtol (header.mtime, NULL, KWGA_ENC_FILE_HEADER_RADIX);
-
-    switch ((FER_ENCODING)header.fer_enc)
-    {
-    default:
-        rc = RC (rcFS, rcFile, rcReading, rcHeader, rcOutofrange);
-        LOGERR (klogErr, rc, "Enryption type code out of range");
-        return rc;
-    case fer_encDES:
-    case fer_encBLF:
-        rc = RC (rcFS, rcFile, rcReading, rcHeader, rcIncorrect);
-        LOGERR (klogErr, rc, "Enryption type code not supported");
-        return rc;
-    case fer_encAES:
-        break;
-    }
-
-    self->md5_here = (header.md5_here != 0);
-
-    if (self->md5_here)
-        memcpy (self->md5, header.md5, sizeof (self->md5));
-
-    memcpy (self->md51, header.md51, sizeof (self->md51));
-
-    return 0; /* yeah not really checking later errors am i? */
-}
-
-/* ----------------------------------------------------------------------
- * KWGAEncFileMake
- *  create a new file object
- *
- * pself        where to put pointer to new object
- * encrypted    a readable file that is encrypted
- * cipher       a cipher object that must support AES with 256 bit key
- *              not verified except through failure to decrypt a file
- * key          bytes containing the user key - should be utf-8 but with no
- *              control characters
- * key_size     how many bytes to use from the key 
- */
-/* read only version for decrypting of existing files */
-KRYPTO_EXTERN rc_t CC KFileMakeWGAEncRead (const struct KFile ** pself, 
-                                           const struct KFile * encrypted,
-                                           const char * key,
-                                           size_t key_size)
-{
-    rc_t rc;
-
-    if (pself == NULL)
-    {
-        rc = RC (rcFS, rcFile, rcConstructing, rcSelf, rcNull);
-        LOGERR (klogErr, rc, "key parameter for WGA encrypted file is empty");
-        return rc;
-    }
-
-    *pself = NULL;
-
-    if ((encrypted == NULL)||(key == NULL))
-    {
-        rc = RC (rcFS, rcFile, rcConstructing, rcParam, rcNull);
-        LOGERR (klogErr, rc, "missing WGA encrypted file passed in to constructor");
-    }
-
-    else if (key_size == 0)
-    {
-        rc = RC (rcFS, rcFile, rcConstructing, rcParam, rcInvalid);
-        LOGERR (klogErr, rc, "missing WGA encrypted file passed in to constructor");
-    }
-
-    else if (encrypted->read_enabled == 0)
-    {
-        rc = RC (rcFS, rcFile, rcConstructing, rcParam, rcIncorrect);
-        LOGERR (klogErr, rc, "encrypted file not readable");
-    }
-    else
-    {
-        KCipherManager * cipher_mgr;
-
-        rc = KCipherManagerMake (&cipher_mgr);
-        if (rc == 0)
-        {
-            KCipher * cipher;
-
-            rc = KCipherManagerMakeCipher (cipher_mgr, &cipher, kcipher_AES);
-            if (rc == 0)
-            {
-                size_t z;
-
-                rc = KCipherBlockSize (cipher, &z);
-                if (rc)
-                {
-                    LOGERR (klogErr, rc, "unable to get block size for WGA "
-                            "encrypted file cipher passed in to constructor");
-                }
-                else
-                {
-                    if (z != ECB_BYTES)
-                    {
-                        rc = RC (rcFS, rcFile, rcConstructing, rcParam,
-                                 rcInvalid);
-                        LOGERR (klogErr, rc, "wrong block size for WGA "
-                                "encrypted file cipher passed in to "
-                                "constructor");
-                    }
-                    else
-                    {
-                        KWGAEncFile * self;
-
-                        self = calloc (sizeof (*self), sizeof (uint8_t));
-                        if (self == NULL)
-                        {
-                            rc = RC (rcFS, rcFile, rcConstructing, rcMemory,
-                                     rcExhausted);
-                            LOGERR (klogErr, rc, "out of memory while "
-                                    "constructing decryptor");
-                        }
-                        else
-                        {
-                            rc = KFileAddRef (encrypted);
-                            if (rc)
-                                LOGERR (klogErr, rc, "unable to add reference "
-                                "to encrypted file");
-                            else
-                            {
-                                /* cast to strip const */
-                                self->encrypted = encrypted;
-                                self->cipher = cipher;
-
-                                /* read the header of the encrypted file for
-                                 * details about the  decrypted file */
-                                DEBUG_STS(("%s: calling KWGAEncFileHeaderRead\n",
-                                           __func__));
-                                rc = KWGAEncFileHeaderRead (self);
-                                if (rc == 0)
-                                {
-                                    /* using the file header's stored encoding
-                                     * key build a key from the parameter key */
-                                    DEBUG_STS(("%s: calling "
-                                               "KWGAEncFileHeaderRead\n",
-                                               __func__));
-                                    rc = KWGAEncFileKeyInit (self, key,
-                                                             key_size);
-                                }
-                                if (rc == 0)
-                                {
-                                    rc = KFileInit (&self->dad, 
-                                                    (const KFile_vt*)
-                                                    &vtKWGAEncFileRead,
-                                                    "KWGAEncFile", "no-name",
-                                                    true, false);
-                                    if (rc)
-                                        LOGERR (klogInt, rc, "Failed to initialize decrypting file");
-                                    else
-                                    {
-                                        *pself = &self->dad;
-                                        self->buffer.offset = 0;
-                                        self->buffer.valid = 0;
-                                        KCipherManagerRelease (cipher_mgr);
-                                        return 0;
-                                    }
-                                }
-                                /* release of encrypted handled in destroy() */
-                            }
-                            KWGAEncFileDestroyRead (self);
-                        }
-                    }
-                }
-                KCipherRelease (cipher);
-            }           
-        }
-    }
-    return rc; 
-}
-
-static __inline__
-rc_t WGAEncValidateHeader (const KWGAEncFileHeader * header,
-                           size_t header_size)
-{
-    rc_t rc = 0;
-    unsigned ix;
-
-    if (header_size != sizeof * header)
-    {
-        rc = RC (rcKrypto, rcFile, rcValidating, rcHeader, rcInsufficient);
-        LOGERR (klogErr, rc, "incomplete header");
-        return rc;
-    }
-
-    if (memcmp (header, &header_const, sizeof header->magic) != 0)
-    {
-        rc = RC (rcKrypto, rcFile, rcValidating, rcHeader, rcInvalid);
-        LOGERR (klogErr, rc, "bad signature in encrypted file header");
-        return rc;
-    }
-
-#if 0
-    /* check block_size */
-    do
-    {
-        for (ix = 0; isspace(header->block_sz[ix]); ++ix)
-            ;
-
-        if (ix >= sizeof (header->block_sz))
-            break;
-
-        if (header->block_sz[ix] == '+')
-            ++ix;
-
-        if (ix >= sizeof (header->block_sz))
-            break;
-
-        for (; (ix < sizeof header->block_sz); ++ix)
-        {
-            if (isdigit (header->block_sz[ix]))
-                ;
-            else if ((header->block_sz[ix] >= 'a') &&
-                     (header->block_sz[ix] <= 'w'))
-                ;
-            else if ((header->block_sz[ix] >= 'A') &&
-                     (header->block_sz[ix] <= 'W'))
-                ;
-            else
-                break;
-        }
-        for (; (ix < sizeof header->block_sz); ++ix)
-        {
-            if (header->block_sz[ix] == '\0')
-                ;
-            else
-                break;
-        }
-        if (rc)
-        
-
-
-        for (ix = 0; ix < sizeof header->block_size; ++ix)
-        {
-            if ()
-                ;
-                }
-        
-            ;
-        else if (header->block_sz[ix] == '-')
-            ;
-        else
-            ;
-    }while (0);
-    /* check file_sz */
-    /* check mtime */
-#endif
-
-    if (header->fer_enc != fer_encAES)
-    {
-        rc = RC (rcKrypto, rcFile, rcValidating, rcHeader, rcInvalid);
-        LOGERR (klogErr, rc, "bad encoding flag in encrypted file header");
-        return rc;
-    }
-
-    if ((header->md5_here != true) && (header->md5_here != false))
-    {
-        rc = RC (rcKrypto, rcFile, rcValidating, rcHeader, rcInvalid);
-        LOGERR (klogErr, rc, "bad checksum flag in encrypted file header");
-        return rc;
-    }
-
-    /* check md5 */
-    /* check md51 */
-
-    for (ix = 0; ix < sizeof header->reserved; ++ix)
-    {
-        if (header->reserved[ix] != 0)
-        {
-            rc = RC (rcKrypto, rcFile, rcValidating, rcHeader, rcInvalid);
-            LOGERR (klogErr, rc, "bad reserved space in encrypted file header");
-            return rc;
-        }
-    }
-
-    return 0;
-}
-
-
-KRYPTO_EXTERN rc_t CC WGAEncValidate (const KFile * encrypted, 
-                                      const char * key,
-                                      size_t key_size)
-{
-    const KFile * buffile;
-    rc_t rc, orc;
-
-    rc = KBufFileMakeRead (&buffile, encrypted, 64*1024);
-    if (rc)
-        LOGERR (klogErr, rc, "unable to buffer encrypted file");
-
-    else
-    {
-        KWGAEncFileHeader header;
-        size_t num_read;
-
-        /* first let's disect the header */
-        rc = KFileReadAll (buffile, 0, &header, sizeof header, &num_read);
-        if (rc)
-            LOGERR (klogErr, rc, "unable to read encrypted file header");
-
-        else
-        {
-            uint64_t file_size;
-            uint64_t header_file_size;
-            char ascii_md5 [32];
-            char header_ascii_md5 [32];
-
-            KWGAEncFileHeaderDecrypt (&header);
-
-            rc = WGAEncValidateHeader (&header, num_read);
-            if (rc)
-                ;
-
-            else
-            {
-                if (key_size == 0)
-                {
-                    const KFile * countfile;
-                    rc = KFileMakeCounterRead (&countfile, encrypted, &file_size, NULL, false);
-                    if (rc)
-                    {
-                        LOGERR (klogErr, rc, "error making file size counter");
-                        file_size = 0;
-                    }
-                    else
-                    {
-                        KFileAddRef (encrypted);
-                        KFileRelease (countfile);
-
-                        file_size -= sizeof header;
-                    }
-                }
-                else
-                {
-                    union
-                    {
-                        const KFile * decrypted;
-                        const KWGAEncFile * decryptor;
-                    } u;
-
-                    rc = KFileMakeWGAEncRead (&u.decrypted, buffile, key, key_size);
-                    if (rc)
-                        LOGERR (klogErr, rc, "error making decryptor");
-
-                    else
-                    {
-                        KFile * nullfile;
-
-                        rc = KFileMakeNullUpdate (&nullfile);
-                        if (rc)
-                            LOGERR (klogInt, rc, "error making data sync");
-
-                        else
-                        {
-                            KMD5SumFmt * fmt;
-                            static const char name[] = "wgaencrypt";
-
-                            rc = KMD5SumFmtMakeUpdate (&fmt, nullfile);
-                            if (rc)
-                            {
-                                LOGERR (klogInt, rc, "error making md5sum database");
-                                KFileRelease (nullfile);
-                            }
-                            else
-                            {
-                                const KFile * md5file;
-
-                                rc = KFileMakeNewMD5Read (&md5file, u.decrypted, fmt, name);
-                                if (rc)
-                                    LOGERR (klogInt, rc, "error making MD5 calculator");
-
-                                else
-                                {
-                                    /*
-                                     * ill mannered md5file steals
-                                     * references instead of adding one
-                                     */
-                                    rc = KFileAddRef (u.decrypted);
-                                    if (rc)
-                                        LOGERR (klogInt, rc, "error adding reference to decryptor");
-
-                                    else
-                                    {
-
-                                        const KFile * countfile;
-                                        rc = KFileMakeCounterRead (&countfile,
-                                                                   md5file,
-                                                                   &file_size, NULL,
-                                                                   true);
-                                        if (rc)
-                                            LOGERR (klogErr, rc,
-                                                    "error making file size "
-                                                    "counter");
-                                        else
-                                        {
-                                            /*
-                                             * ill mannered countfile steals
-                                             * references instead of adding one
-                                             */
-                                            KFileAddRef (md5file);
-                                            rc = KFileRelease (countfile);
-                                        }
-
-                                        orc = KFileRelease (md5file);
-                                    
-                                        if (rc == 0)
-                                            rc = orc;
-
-                                        if (rc == 0)
-                                        {
-                                            uint8_t md5 [16];
-                                            bool bin;
-
-                                            rc = KMD5SumFmtFind (fmt, name, md5, &bin);
-                                            if (rc)
-                                                LOGERR (klogInt, rc, "error locating MD5");
-
-                                            else
-                                            {
-                                                size_t zz;
-                                                unsigned ix;
-                                                for (ix = 0; ix < 16; ++ix)
-                                                {
-                                                    string_printf (&ascii_md5[2*ix], 2, &zz, "%2.2x",
-                                                               (unsigned)(uint8_t)md5[ix]);
-                                                }
-                                                memcpy (header_ascii_md5,
-                                                        u.decryptor->md5,
-                                                        sizeof header_ascii_md5);
-                                            }
-                                        }
-                                    }
-                                }
-                                KMD5SumFmtRelease (fmt);
-                            }
-                        }
-                        KFileRelease (u.decrypted);
-                    }                
-                }
-            }
-            if (rc == 0)
-            {
-                uint64_t sys_file_size;
-                uint64_t pad_file_size = 0;
-                rc_t orc;
-
-                /* ccheck file size */
-
-                orc = KFileSize (encrypted, &sys_file_size);
-                if (orc == 0)
-                {
-                    pad_file_size = file_size + 15;
-                    pad_file_size &= ~ ( uint64_t ) 15;
-                    pad_file_size += sizeof (KWGAEncFileHeader);
-                }
-                header_file_size = strtou64 (header.file_sz, NULL, KWGA_ENC_FILE_HEADER_RADIX);
-
-                if (key_size == 0)
-                {
-                    header_file_size += 15;
-                    header_file_size &= ~ ( uint64_t ) 15;
-                }
-
-                if (file_size < header_file_size)
-                    rc = RC (rcKrypto, rcFile, rcValidating, rcSize, rcInsufficient);
-                
-                else if (file_size > header_file_size)
-                    rc = RC (rcKrypto, rcFile, rcValidating, rcSize, rcExcessive);
-
-                else if ((orc == 0) &&
-                         (sys_file_size > pad_file_size))
-                    rc = RC (rcKrypto, rcFile, rcValidating, rcSize, rcExcessive);
-
-                /* check md5 */
-                else if (!header.md5_here)
-                {
-                    /* rc = RC (rcKrypto, rcFile, rcValidating, rcEncryption, rcNotFound); */
-                }
-                else if (key_size == 0)
-                    rc = RC (rcKrypto, rcFile, rcValidating, rcEncryption, rcNull);
-
-                else
-                {
-                    int cmp;
-
-                    cmp = strcase_cmp (ascii_md5, sizeof ascii_md5, 
-                                       header_ascii_md5, sizeof header_ascii_md5,
-                                       sizeof ascii_md5);
-                    if (cmp)
-                    {
-                        rc = RC (rcKrypto, rcFile, rcValidating, rcChecksum,
-                                 rcInvalid);
-                        LOGERR (klogErr, rc, "Encrypted file MD5 does not match");
-                    }
-                }
-            }
-        }
-        KFileRelease (buffile);
-    }
-    return rc;
-}
-#if 0
-        /* not working as planned */
-        if (rc == 0)
-        {
-            uint32_t this_read;
-
-            /* try to read past size now obtained */
-            do
-            {
-                uint8_t throwaway [8192];
-
-                rc = KFileRead (encrypted, z + sizeof (KWGAEncFileHeader), throwaway, sizeof throwaway,
-                                &this_read);
-                if (rc)
-                {
-                    LOGERR (klogErr, rc, "Error reading file");
-                    break;
-                }
-                z += this_read;
-
-            } while (this_read);
-        }
-#endif
-
-/* end of file wgaencrypt.c */
-
diff --git a/libs/krypto/win/sysrng.c b/libs/krypto/win/sysrng.c
deleted file mode 100644
index 8f0ac62..0000000
--- a/libs/krypto/win/sysrng.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/* -----
- * this is a windows thing...  MSDN said required so it's out of our 
- * include normal order
- *
- * doing this define and include in this way brings in rand_s which is based on
- * the same RNG used in the fussy _CryptGenRandom.  But without creating the
- * files and other stuff that is suitable for full Windows based cryptography
- * but not our virtual environment to get a simple seed for our OpenSSL based 
- * cryptography.
- */
-#define _CRT_RAND_S
-#include <stdlib.h>
-
-#include <os-native.h>
-
-#include <krypto/extern.h>
-#include <krypto/rng.h>
-#include "rng-priv.h"
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/checksum.h>
-
-#include <stdio.h>
-#include <string.h>
-
-#include <time.h>
-
-
-rc_t KRngSysEntropy (KRng * self, uint8_t * buffer, size_t buff_size)
-{
-    MD5State state;
-    uint64_t ul;
-    size_t buffix;
-    int len;
-    char buff [4096];
-    char obuff [4096];
-    char digest [16];
-
-    if (self == NULL)
-        return RC (rcKrypto, rcRng, rcWriting, rcSelf, rcNull);
-    if (buffer == NULL)
-        return RC (rcKrypto, rcRng, rcWriting, rcParam, rcNull);
-
-    while (buff_size > 0)
-    {
-        for (buffix = 0; buffix < 256 ; ++buffix)
-        {
-            unsigned int ui;
-            if (rand_s (&ui))
-                break;
-            /* still paranoid about the old axiom of not using lowest 
-             * order bits in a random number */
-            buff[buffix] = (char)(ui>>4);
-        }
-
-        len = gethostname (buff + buffix, sizeof (buff) - buffix);
-        if (len == 0)
-            buffix += strlen (buff + buffix);
-        if (buffix >= sizeof (buff))
-            break;
-
-
-        _time64(&ul);
-
-        string_printf (buff + buffix, sizeof (buff) - buffix,
-                            &len, "%ld", ul);
-        if (len > 0)
-            buffix += len;
-        if (buffix >= sizeof (buff))
-            break;
-
-        ul = clock ();
-
-        string_printf (buff + buffix, sizeof (buff) - buffix,
-                        &len, "%ld", ul);
-        if (len > 0)
-            buffix += len;
-        if (buffix >= sizeof (buff))
-            break;
-
-        if (tmpnam_s(obuff, sizeof (obuff)))
-        {
-            string_printf (buff + buffix, sizeof (buff) - buffix,
-                           &len, "%s", obuff);
-            if (len > 0)
-                buffix += len;
-            if (buffix >= sizeof (buff))
-                break;
-        }
-    
-
-        MD5StateInit (&state);
-        MD5StateAppend (&state, buff, sizeof buff);
-        MD5StateFinish (&state, digest);
-
-        len = sizeof digest > buff_size ? buff_size : sizeof digest;
-        memcpy (buffer, digest, len);
-
-        buffer += len;
-        buff_size -= len;
-    }
-    
-    return 0;
-}
diff --git a/libs/ktst/Makefile b/libs/ktst/Makefile
deleted file mode 100644
index ff938ef..0000000
--- a/libs/ktst/Makefile
+++ /dev/null
@@ -1,87 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/ktst
-
-INT_LIBS = \
-    libktst
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES = \
-	$(TST_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# testing framework
-#
-$(ILIBDIR)/libktst: $(addprefix $(ILIBDIR)/libktst.,$(LIBX))
-
-TST_SRC = \
-	testenv \
-    systestenv \
-	testcase \
-	testrunner
-
-TST_OBJ = \
-	$(addsuffix .$(LOBX),$(TST_SRC))
-
-$(ILIBDIR)/libktst.$(LIBX): $(TST_OBJ)
-	$(LP) --slib -o $@ $^ $(TST_LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/ktst/testcase.cpp b/libs/ktst/testcase.cpp
deleted file mode 100644
index d9e1493..0000000
--- a/libs/ktst/testcase.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <ktst/unit_test.hpp>
-
-#include <klib/printf.h> 
-
-#include <cstring> // strlen
-#include <ctime> // time
-
-using namespace ncbi::NK;
-
-void TestCase::Init(const char* name)  { _name = name; _ec = 0; } 
-
-void TestCase::report_error(const char* msg, const char* file, int line, bool is_msg, bool isCritical)
-{
-    ncbi::NK::saveLocation(file, line);
-    ++_ec;
-    LOG(LogLevel::e_error, TestEnv::FormatLocation(file, line));
-    if (isCritical) 
-    {
-        LOG(LogLevel::e_error, "fatal ");
-    }
-    LOG(LogLevel::e_error, "error in \"" << _name << "\": ");
-    if (is_msg) 
-    {
-        LOG(LogLevel::e_error, msg);
-    }
-    else 
-    {
-        if (isCritical) 
-        {
-            LOG(LogLevel::e_error, "critical ");
-        }
-        LOG(LogLevel::e_error, "check " << msg << " failed");
-    }
-    LOG(LogLevel::e_error, std::endl);
-    if (isCritical)
-    { 
-        throw ncbi::NK::execution_aborted(); 
-    }
-}
-
-void TestCase::report_passed(const char* msg, const char* file, int line) 
-{
-    ncbi::NK::saveLocation(file, line);
-    LOG(LogLevel::e_all, file << "(" << line << "): info: " "check " << msg << " passed" << std::endl);
-}
-
-void TestCase::_REPORT_CRITICAL_ERROR_(const std::string& msg, const char* file, int line, bool is_msg)
-{ 
-    report_error( msg.c_str(), file, line, is_msg, true ); 
-}
-
-void TestCase::report_rc(rc_t rc, const char* callStr, const char* file, int line, int successExpected, bool isCritical)
-{
-    if ((successExpected && rc != 0) || (!successExpected && rc == 0))
-    {
-        const int BufSize=1024;
-        char buf[BufSize];
-        size_t num_writ=0;
-        if (0 == string_printf (buf, BufSize, &num_writ, "Unexpected return code from %s: %R\n", callStr, rc))
-        {
-            report_error(buf, file, line, true, isCritical);
-        }
-        else
-        {
-            report_error("***error message too large to print***", file, line, true, isCritical);
-        }
-    }
-    else {
-        ncbi::NK::saveLocation(file, line);
-        time_t t = time(NULL);
-        char *pp = ctime(&t);
-        size_t s = strlen(pp);
-        if (s > 0) {
-            --s;
-        }
-        pp[s] = '\0';
-        LOG(LogLevel::e_all, file << "(" << line << "): [" << pp
-            << "] info: " "check " << callStr << " "
-            << (successExpected ? "=" : "!") << "= 0 passed" << std::endl);
-    }
-}
-
diff --git a/libs/ktst/testenv.cpp b/libs/ktst/testenv.cpp
deleted file mode 100644
index 00fe506..0000000
--- a/libs/ktst/testenv.cpp
+++ /dev/null
@@ -1,518 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <ktst/unit_test.hpp>
-
-#if ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED
-
-#include <kapp/main.h> // KAppVersion
-#include <kapp/args.h> // ArgsWhack
-#include <klib/out.h> // KOutMsg
-
-#endif
-
-#include <klib/rc.h>
-#include <sstream> 
-#include <csignal>
-#include <cstdlib>
-#include <cstring>
-
-using namespace ::ncbi::NK;
-using std::string;
-
-//const int TestEnv::TEST_CASE_TIMED_OUT=14; //SIGALRM
-//const int TestEnv::TEST_CASE_FAILED=255;
-
-bool TestEnv::in_child_process = false;
-
-#if ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED
-struct Args* TestEnv::args = 0;
-#endif
-
-TestEnv::TestEnv(int argc, char* argv[], ArgsHandler* argsHandler) 
-    : catch_system_errors(true)
-    , argc2(0)
-    , argv2(NULL)
-{
-    rc_t rc = process_args(argc, argv, argsHandler);
-    if (rc != 0) {
-        throw rc;
-    }
-}
-
-TestEnv::~TestEnv ()
-{
-    if (argv2 != NULL) {
-        for (int i = 0; i < argc2; ++i) {
-            free(argv2[i]);
-            argv2[i] = NULL;
-        }
-        free(argv2);
-    }
-
-#if ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED
-    ArgsWhack(args);
-    args = NULL;
-#endif
-}
-
-string TestEnv::lastLocation;
-LogLevel::E TestEnv::verbosity = LogLevel::e_error;
-bool TestEnv::verbositySet = false;
-
-void CC TestEnv::TermHandler() 
-{
-    SigHandler(SIGTERM);
-}
-
-void CC TestEnv::SigHandler(int sig) 
-{
-    switch (sig)
-    {
-        case SIGABRT:
-            LOG(ncbi::NK::LogLevel::e_fatal_error,
-                "fatal error: signal: SIGABRT(Abort call)\n");
-            break;
-        case SIGFPE:
-            LOG(ncbi::NK::LogLevel::e_fatal_error,
-                "fatal error: signal: SIGFPE(Floating point exception)\n");
-            break;
-        case SIGILL:
-            LOG(ncbi::NK::LogLevel::e_fatal_error,
-                "fatal error: signal: SIGILL(Illegal instruction)\n");
-            break;
-        case SIGSEGV:
-            LOG(ncbi::NK::LogLevel::e_fatal_error,
-                "fatal error: signal: SIGSEGV(Segmentation fault)\n");
-            break;
-        default:
-            LOG(ncbi::NK::LogLevel::e_fatal_error,
-                "fatal error: signal: " << sig << "\n");
-            break;
-    }
-    if (!ncbi::NK::TestEnv::lastLocation.empty())
-    {
-        LOG(ncbi::NK::LogLevel::e_fatal_error,
-            ncbi::NK::TestEnv::lastLocation << ": last checkpoint\n");
-    }
-    LOG(ncbi::NK::LogLevel::e_fatal_error, "Test is aborted\n");
-    exit(sig);
-}
-
-
-#if ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED
-
-#define OPTION_DBG "verbose_cmd_line"
-#define ALIAS_DBG "a"
-static const char * dbg_usage[] = { "print command line argument processing information", NULL };
-
-#define OPTION_CSE "catch_system_errors"
-#define ALIAS_CSE "c"
-static const char * cse_usage[] = { "[yes|y|no|n] catch system errors, default is yes", NULL };
-
-#define OPTION_LOG "test_log_level"
-#define ALIAS_LOG "t"
-static const char * log_usage[] = { "test log level, one of:",
-    "'all':       report all log messages",
-    "             including the passed test notification;",
-    "'test_suite': show test suite messages;",
-    "'message':   show user messages",
-    "'warning':   report warnings issued by user;",
-    "'error':     report all error conditions (default);",
-    "'fatal_error': report user or system originated fatal errors",
-    "             (for example, memory access violation);",
-    "'nothing':   do not report any information", NULL };
-
-OptDef Options[] = {
-      { OPTION_DBG, ALIAS_DBG, NULL, dbg_usage, 1, false, false }
-    , { OPTION_CSE, ALIAS_CSE, NULL, cse_usage, 1, true , false }
-    , { OPTION_LOG, ALIAS_LOG, NULL, log_usage, 1, true , false }
-};
-
-#endif
-
-rc_t TestEnv::process_args(int argc, char* argv[], ArgsHandler* argsHandler) 
-{
-    int arg2 = 9;
-    argv2 = static_cast<char**>(calloc(arg2, sizeof *argv2));
-    if (argv2 == NULL)
-    {   return RC (rcApp, rcArgv, rcAccessing, rcMemory, rcExhausted); }
-    argv2[argc2] = strdup(argv[argc2]);
-    if (argv2[argc2] == NULL)
-    {   return RC (rcApp, rcArgv, rcAccessing, rcMemory, rcExhausted); }
-    ++argc2;
-
-#if ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED
-
-    rc_t rc = ArgsMakeAndHandle(&args, argc, argv, 1,
-        Options, sizeof Options / sizeof (OptDef));
-    if (rc)
-    {   return rc; }
-
-    bool debug = false;
-    LogLevel::E detected = LogLevel::e_undefined;
-    do {
-        uint32_t pcount = 0;
-
-        rc = ArgsOptionCount(args, OPTION_DBG, &pcount);
-        if (rc)
-        {   return rc; }
-        if (pcount) {
-            debug = true;
-            LOG(LogLevel::e_nothing, "debug: debug was set to true\n");
-        }
-
-        rc = ArgsOptionCount(args, OPTION_CSE, &pcount);
-        if (rc)
-        {   return rc; }
-        if (pcount) {
-            const char* pc = NULL;
-            rc = ArgsOptionValue(args, OPTION_CSE, 0, (const void **)&pc);
-            if (rc)
-            {   return rc; }
-            if (!strcmp(pc, "n") || !strcmp(pc, "no")) {
-                catch_system_errors = false;
-                if (debug) {
-                    LOG(LogLevel::e_nothing,
-                       "debug: arg_catch_system_errors was set to false\n");
-                }
-            }
-            else {
-                if (debug) {
-                    LOG(LogLevel::e_nothing,
-                       "debug: arg_catch_system_errors was set to true\n");
-                }
-            }
-        }
-
-        rc = ArgsOptionCount(args, OPTION_LOG, &pcount);
-        if (rc)
-        {   return rc; }
-        if (pcount) {
-            const char* a = NULL;
-            rc = ArgsOptionValue(args, OPTION_LOG, 0, (const void **)&a);
-            if (rc)
-            {   return rc; }
-            if (!strcmp(a, "test_suite"))
-            { detected = LogLevel::e_test_suite; }
-            else if (strcmp(a, "all"    ) == 0)
-            { detected = LogLevel::e_all; }
-            else if (strcmp(a, "message") == 0)
-            { detected = LogLevel::e_message; }
-            else if (strcmp(a, "warning") == 0)
-            { detected = LogLevel::e_warning; }
-            else if (strcmp(a, "error"  ) == 0)
-            { detected = LogLevel::e_error; }
-            else if (strcmp(a, "nothing") == 0)
-            { detected = LogLevel::e_nothing; }
-            else if (strcmp(a, "fatal_error") == 0)
-            { detected = LogLevel::e_fatal_error; }
-            if (detected != LogLevel::e_undefined) {
-                verbosity = detected;
-                if (debug) {
-                    LOG(LogLevel::e_nothing,
-                        "debug: log_level was set to " << a << std::endl);
-                }
-            }
-            else {
-                verbosity = LogLevel::e_error;
-                if (debug) {
-                    LOG(LogLevel::e_nothing,
-                        "debug: log_level was set to error\n");
-                }
-            }
-        }
-    } while (0);
-
-    if (verbosity == LogLevel::e_undefined) {
-        verbosity = LogLevel::e_error;
-        if (debug) {
-            LOG(LogLevel::e_nothing,
-                "debug: log_level was set to error\n");
-        }
-    }
-#else
-
-    rc_t rc = 0;
-
-    bool debug = false;
-    LogLevel::E detected = LogLevel::e_undefined;
-    char arg_catch_system_errors[] = "-catch_system_errors=";
-    char arg_log_level          [] = "-l=";
-    char arg_app_args           [] = "-app_args=";
-    for (int i = 1; i < argc; ++i)
-    {
-        if (verbositySet) {
-            break;
-        }
-        if (strncmp(argv[i], arg_log_level, strlen(arg_log_level))
-            == 0)
-        {
-            char* a = argv[i] + strlen(arg_log_level);
-            if (strcmp(a, "test_suite") == 0)
-                detected = LogLevel::e_test_suite;
-            else if (strcmp(a, "all"    ) == 0)
-                detected = LogLevel::e_all;
-            else if (strcmp(a, "message") == 0)
-                detected = LogLevel::e_message;
-            else if (strcmp(a, "warning") == 0)
-                detected = LogLevel::e_warning;
-            else if (strcmp(a, "error"  ) == 0)
-                detected = LogLevel::e_error;
-            else if (strcmp(a, "nothing") == 0)
-                detected = LogLevel::e_nothing;
-            else if (strcmp(a, "fatal_error") == 0)
-                detected = LogLevel::e_fatal_error;
-            if (detected != LogLevel::e_undefined)
-            {
-                verbosity = detected;
-                if (debug)
-                {
-                    LOG(LogLevel::e_nothing,
-                        "debug: log_level was set to " << a << std::endl);
-                }
-            }
-            else
-            {
-                verbosity = LogLevel::e_error;
-                if (debug)
-                {
-                    LOG(LogLevel::e_nothing,
-                        "debug: log_level was set to error\n");
-                }
-            }
-        }
-        else if (strncmp(argv[i], arg_catch_system_errors,
-            strlen(arg_catch_system_errors)) == 0)
-        {
-            char* a = argv[i] + strlen(arg_catch_system_errors);
-            if (strcmp(a, "n") == 0 || strcmp(a, "no") == 0)
-            {
-                catch_system_errors = false;
-                if (debug)
-                {
-                    LOG(LogLevel::e_nothing,
-                       "debug: arg_catch_system_errors was set to false\n");
-                }
-            }
-            else
-            {
-                if (debug)
-                {
-                    LOG(LogLevel::e_nothing,
-                       "debug: arg_catch_system_errors was set to true\n");
-                }
-            }
-        }
-        else if (strcmp(argv[i], "-debug") == 0)
-        {
-            debug = true;
-            LOG(LogLevel::e_nothing, "debug: debug was set to true\n");
-        }
-        else if (strcmp(argv[i], "-h") == 0)
-        {
-            if (debug)
-            {
-                LOG(LogLevel::e_nothing, "debug: help was set to true\n");
-            }
-            std::cout << "Usage:\n"
-                      << argv[0]
-                      << " [-debug] [-catch_system_errors=[yes|y|no|n]]\n"
-                         "      [-app_args='<value>'] [-l=<value>] [-h]\n"
-                "where:\n"
-                "debug              - Print recognized command line arguments\n"
-                "                     (should be specified first)\n"
-                "catch_system_errors -  Allows to switch between catching\n"
-                "                     and ignoring system errors (signals)\n"
-                "app_args           - Allows to pass command line arguments\n"
-                "                     to application handler\n"
-                "    (see unit_test.hpp/FIXTURE_TEST_SUITE_WITH_ARGS_HANDLER)\n"
-                "\n"
-                "l (log_level)       - Specifies log level\n"
-                "\tall        - report all log messages\n"
-                "\t             including the passed test notification\n"
-                "\ttest_suite - show test suite messages\n"
-                "\tmessage    - show user messages\n"
-                "\twarning    - report warnings issued by user\n"
-                "\terror      - report all error conditions (default)\n"
-                "\tfatal_error- report user or system originated fatal errors\n"
-                "\t             (for example, memory access violation)\n"
-                "\tnothing    - do not report any information\n"
-                "\n"
-                "h (help)            - this help message\n";
-            exit(0);
-        }
-        else if (strncmp(argv[i], arg_app_args, strlen(arg_app_args)) == 0)
-        {
-            char* a = argv[i] + strlen(arg_app_args);
-            if (debug)
-            {
-                LOG(LogLevel::e_nothing,
-                    string("debug: arg_app_args was detected: ") + a + "\n");
-            }
-            char* pch = strtok(a ," ");
-            while (pch != NULL) {
-                if (argc2 >= arg2) {
-                    arg2 *= 2;
-                    char** tmp = static_cast<char**>(
-                        realloc(argv2, arg2 * sizeof *argv2));
-                    if (tmp == NULL) {
-                        return RC(
-                            rcApp, rcArgv, rcAccessing, rcMemory, rcExhausted);
-                    }
-                    argv2 = tmp;
-                }
-                argv2[argc2] = strdup(pch);
-                if (argv2[argc2] == NULL) {
-                    return RC(
-                        rcApp, rcArgv, rcAccessing, rcMemory, rcExhausted);
-                }
-                ++argc2;
-                pch = strtok(NULL, " ");
-            }
-        }
-    }
-
-    if (verbosity == LogLevel::e_undefined)
-    {
-        verbosity = LogLevel::e_error;
-        if (debug)
-        {
-            LOG(LogLevel::e_nothing,
-                "debug: log_level was set to error\n");
-        }
-    }
-#endif
-
-    if (rc == 0) {
-        if (argsHandler)
-        {	rc = argsHandler(argc2, argv2); }
-    }
-
-    return rc;
-}
-
-void ::ncbi::NK::saveLocation(const char* file, int line) 
-{
-    std::ostringstream s;
-    s << file << "(" << line << ")";
-    TestEnv::lastLocation = s.str();
-}
-
-void ::ncbi::NK::_REPORT_CRITICAL_ERROR_(const string& msg, const char* file, int line, bool is_msg)
-{
-    LOG(ncbi::NK::LogLevel::e_error, file << "(" << line << "): ");
-    LOG(ncbi::NK::LogLevel::e_error, "fatal ");
-    LOG(ncbi::NK::LogLevel::e_error, "error in fixture: ");
-    if (is_msg) {
-        LOG(ncbi::NK::LogLevel::e_error, msg);
-    }
-    else {
-        LOG(ncbi::NK::LogLevel::e_error, "critical ");
-        LOG(ncbi::NK::LogLevel::e_error, "check " << msg << " failed");
-    }
-    LOG(ncbi::NK::LogLevel::e_error, std::endl);
-    throw ncbi::NK::execution_aborted();
- }
-
-ncbi::NK::TestRunner* 
-ncbi::NK::GetTestSuite(void)
-{ 
-    static ncbi::NK::TestRunner t; 
-    return &t; 
-}
-
-rc_t CC TestEnv::UsageSummary(const char* progname) {
-#if ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED
-    return KOutMsg(
-        "Usage:\n"
-        "  %s [--verbose_cmd_line] [--catch_system_errors [yes|y|no|n]] "
-        "[-t <value>] [-h] [...]\n", progname);
-#else
-    std::cout
-        << "Usage:\n"
-        << progname
-        << " [-debug] [-catch_system_errors=[yes|y|no|n]] "
-        "[-l=<value>] [-h] [...]\n";
-    return 0;
-#endif
-}
-
-#if ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED
-rc_t CC TestEnv::Usage(const Args* args)
-{
-    const char* progname = UsageDefaultName;
-    const char* fullpath = UsageDefaultName;
-
-    rc_t rc = (args == NULL) ?
-        RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull):
-        ArgsProgram(args, &fullpath, &progname);
-
-    if (rc != 0)
-        progname = fullpath = UsageDefaultName;
-
-    UsageSummary(progname);
-
-    KOutMsg("\nOptions:\n");
-    
-    HelpOptionLine(ALIAS_DBG, OPTION_DBG, NULL, dbg_usage);
-    HelpOptionLine(ALIAS_CSE, OPTION_CSE, NULL, cse_usage);
-    HelpOptionLine(ALIAS_LOG, OPTION_LOG, NULL, log_usage);
-    KOutMsg("\n");
-    HelpOptionsStandard();
-    HelpVersion(fullpath, KAppVersion());
-    
-    return rc;
-}
-#else
-rc_t CC TestEnv::Usage(const char *progname)
-{
-    UsageSummary ( progname );
-    std::cout <<
-        "where:\n"
-        "debug - Print recognized command line arguments (should be specified first)\n"
-        "catch_system_errors - "
-        "Allows to switch between catching and ignoring system errors (signals)\n"
-        "l (log_level) - Specifies log level\n"
-        "\tall        - report all log messages\n"
-        "\t             including the passed test notification\n"
-        "\ttest_suite - show test suite messages\n"
-        "\tmessage    - show user messages\n"
-        "\twarning    - report warnings issued by user\n"
-        "\terror      - report all error conditions (default)\n"
-        "\tfatal_error- report user or system originated fatal errors\n"
-        "\t             (for example, memory access violation)\n"
-        "\tnothing    - do not report any information\n"
-        "h (help) - this help message\n";
-    return 0;
-}
-#endif
-
-bool TestEnv::Sleep(unsigned int seconds)
-{
-    return TestEnv::SleepMs(seconds*1000);
-}
-
diff --git a/libs/ktst/testrunner.cpp b/libs/ktst/testrunner.cpp
deleted file mode 100644
index 0b4fbd6..0000000
--- a/libs/ktst/testrunner.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <ktst/unit_test.hpp>
-
-using namespace ncbi::NK;
-
-TestRunner::TestRunner() : argc(0), argv(NULL) {}
-
-void TestRunner::ReportTestNumber(void) 
-{
-    T::size_type sz = _cases.size();
-    if (sz == 1) {
-       LOG(LogLevel::e_fatal_error, "Running " << sz << " test case...\n");
-    } else if (sz > 1) {
-       LOG(LogLevel::e_fatal_error, "Running " << sz << " test cases...\n");
-    }
-}
-
-void TestRunner::SetArgs(int argc, char* argv[]) 
-{
-    this->argc = argc;
-    this->argv = argv;
-}
-
-void TestRunner::Add(ncbi::NK::TestInvoker* t) 
-{
-    if (t) 
-    {
-        _cases.push_back(t);
-    }
-}
-
-counter_t TestRunner::Run(void* globalFixture) const throw ()
-{
-    counter_t ec = 0;
-    for (TCI it = _cases.begin(); it != _cases.end(); ++it) 
-    {
-        ncbi::NK::TestInvoker* c = *it;
-        try {
-            LOG(LogLevel::e_test_suite,
-                "Entering test case \"" << c->GetName() << "\"\n");
-            c->Run(globalFixture);
-        } 
-        catch (...) 
-        {
-            if (c->GetErrorCounter() == 0)
-                ++ec;
-        }
-        counter_t tc = c->GetErrorCounter();
-        if (tc == 0) {
-            LOG(LogLevel::e_test_suite,
-                "Leaving test case \"" << c->GetName() << "\"\n");
-        }
-        else {
-            LOG(LogLevel::e_test_suite,
-                "Leaving failed test case \"" << c->GetName() << "\"\n");
-        }
-        ec += tc;
-    }
-    return ec;
-}
-
diff --git a/libs/ktst/unix/systestenv.cpp b/libs/ktst/unix/systestenv.cpp
deleted file mode 100644
index a41e747..0000000
--- a/libs/ktst/unix/systestenv.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <ktst/unit_test_suite.hpp>
-
-#include <sstream>
-
-#include <csignal> // sigaction, not necessarily in csignal :-/
-#include <cstdlib>
-#include <cstring>
-
-#include <time.h>
-#include <unistd.h> /* fork */
-
-#include <sys/wait.h>
-#include <sys/types.h>
-
-using namespace std;
-using namespace ncbi::NK;
-
-#undef REPORT_ERROR
-#define REPORT_ERROR(msg) _REPORT_CRITICAL_ERROR_("TestEnv::" msg, __FILE__, __LINE__, true);
-
-static void alarmHandler(int)
-{
-    cerr << "child process timed out" << endl;
-    
-    exit(TestEnv::TEST_CASE_TIMED_OUT);
-}
-
-int TestEnv::RunProcessTestCase(TestCase& obj, void(TestCase::*meth)(), int timeout)
-{
-    int pid=fork();
-    if (pid == -1)
-    {
-        REPORT_ERROR("RunProcessTestCase: fork() failed");
-    }
-    if (pid == 0)
-    {   /* child process */
-        if (timeout != 0)
-        {
-            struct sigaction act;
-            memset(&act, 0, sizeof act);
-            act.sa_handler = alarmHandler;
-            act.sa_flags = SA_RESETHAND;
-            sigaction(SIGALRM , &act, NULL);        
-            alarm(timeout);
-        }
-        try 
-        {
-            in_child_process = true;
-            (obj.*meth)();
-        }   
-        catch (const exception& ex)
-        {
-            cerr << obj.GetName() << " threw " << ex.what() << endl;
-            exit(TEST_CASE_FAILED);
-        }
-        catch (const ncbi::NK::execution_aborted&)
-        {
-            cerr << obj.GetName() << " aborted " << endl;
-            exit(TEST_CASE_FAILED);
-        }
-        catch (...)
-        {
-            cerr << obj.GetName() << " threw something " << endl;
-            exit(TEST_CASE_FAILED);  
-        }
-        exit(0);
-    }
-    /* parent process */
-    int status;
-    if (waitpid(pid, &status, 0) != pid) /* suspend until the child terminates */
-    {   
-        REPORT_ERROR("RunProcessTestCase: wait() failed");
-    }
-    if (!WIFEXITED(status)) 
-    {   
-        REPORT_ERROR("RunProcessTestCase: child exited abnormally");
-    }
-    
-    return WEXITSTATUS(status); /* exit status of the child process */
-}
-
-bool TestEnv::SleepMs(unsigned int milliseconds)
-{
-    struct timespec time = { milliseconds / 1000, (milliseconds % 1000) * 1000 * 1000 };
-    return nanosleep(&time, NULL) == 0; 
-}
-
-void TestEnv::set_handlers(void)
-{
-    struct sigaction act;
-    memset(&act, 0, sizeof act);
-    act.sa_handler = SigHandler;
-    act.sa_flags = SA_RESETHAND;
-    if (sigaction(SIGFPE , &act, NULL) != 0)    REPORT_ERROR("set_handlers: sigaction() failed");
-    if (sigaction(SIGILL , &act, NULL) != 0)    REPORT_ERROR("set_handlers: sigaction() failed");
-    if (sigaction(SIGSEGV , &act, NULL) != 0)   REPORT_ERROR("set_handlers: sigaction() failed");
-}
-
-string TestEnv::GetPidString()
-{
-    ostringstream str;
-    str << getpid();
-    return str.str();
-}
-
-string TestEnv::FormatLocation(const string& p_file, uint64_t p_line)
-{
-    ostringstream out;
-    out << p_file << ":" << p_line << ": ";
-    return out.str();
-}
diff --git a/libs/ktst/win/systestenv.cpp b/libs/ktst/win/systestenv.cpp
deleted file mode 100644
index 6886684..0000000
--- a/libs/ktst/win/systestenv.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <ktst/unit_test_suite.hpp>
-
-#include <csignal> 
-#include <sstream> 
-#include <windows.h>
-#include <process.h>
-
-using namespace std;
-using namespace ncbi::NK;
-
-#undef REPORT_ERROR
-#define REPORT_ERROR(msg) _REPORT_CRITICAL_ERROR_(string("TestEnv::") + msg, __FILE__, __LINE__, true)
-
-/* signal handlers for a single-test case thread */
-void CC SigSubHandler(int sig)
-{
-    _endthreadex(sig);
-}
-void CC TermSubHandler() 
-{
-    SigSubHandler(SIGTERM);
-}
-
-struct TestCaseCall
-{
-    TestCaseCall(TestCase& obj, void(TestCase::*meth)())
-        : object(&obj), method(meth)
-    {
-    }
-
-    TestCase* object;
-    void(TestCase::*method)();
-};
-
-void ThreadProc(void* call)
-{
-    signal(SIGABRT, SigSubHandler);
-    signal(SIGFPE, SigSubHandler);
-    signal(SIGILL, SigSubHandler);
-    signal(SIGINT, SigSubHandler);
-    signal(SIGSEGV, SigSubHandler);
-    signal(SIGTERM, SigSubHandler);
-    set_terminate(TermSubHandler);
-
-    try
-    {
-        TestCaseCall* c=(TestCaseCall*)call;
-        ((c->object)->*(c->method))();
-    }
-    catch (...)
-    {
-        _endthreadex(TestEnv::TEST_CASE_FAILED);
-    }
-    _endthreadex(0);
-}
-
-int TestEnv::RunProcessTestCase(TestCase& obj, void(TestCase::*meth)(), int timeout)
-{
-    TestCaseCall call(obj, meth);
-    TestEnv::in_child_process = true;
-    HANDLE thread = (HANDLE)_beginthread( ThreadProc, 0, &call );
-    if (thread == NULL)
-    {
-        REPORT_ERROR("TestEnv::RunProcessTestCase: failed to start a test case thread");
-    }
-
-    // make sure to restore main process's signal handlers before re-throwing an exception
-    DWORD rc=0;
-    DWORD result=WaitForSingleObject( (HANDLE)thread, timeout == 0 ? INFINITE : timeout*1000);
-    try
-    {
-        switch (result)
-        {
-        case WAIT_OBJECT_0:
-            if (GetExitCodeThread(thread, &rc) == 0)
-                REPORT_ERROR("RunProcessTestCase failed");
-            break;
-        case WAIT_TIMEOUT:
-            if (!CloseHandle(thread))
-                REPORT_ERROR("CloseHandle failed");
-            cerr << "child process timed out" << endl;            
-            rc=TEST_CASE_TIMED_OUT;
-            break;
-        default:
-            REPORT_ERROR("WaitForSingleObject failed");
-            break;
-        }
-    }
-    catch (const exception& ex)
-    {
-        REPORT_ERROR(obj.GetName() + " threw " + ex.what());
-        rc=TEST_CASE_FAILED;
-    }
-    catch (const ncbi::NK::execution_aborted&)
-    {
-        REPORT_ERROR(obj.GetName() + " aborted ");
-        rc=TEST_CASE_FAILED;
-    }
-    catch (...)
-    {
-        REPORT_ERROR(obj.GetName() + " threw something ");
-        rc=TEST_CASE_FAILED;
-        set_handlers(); 
-        throw;
-    }
-#undef CALL_FAILED
-    set_handlers(); 
-    in_child_process = false;
-    return (int)rc;
-}
-
-bool TestEnv::SleepMs(unsigned int milliseconds)
-{
-    ::Sleep((DWORD)milliseconds);
-    return true;
-}
-
-void TestEnv::set_handlers(void) 
-{
-    signal(SIGABRT, SigHandler);
-    signal(SIGFPE, SigHandler);
-    signal(SIGILL, SigHandler);
-    signal(SIGINT, SigHandler);
-    signal(SIGSEGV, SigHandler);
-    signal(SIGTERM, SigHandler);
-    set_terminate(TermHandler);
-}
-
-string TestEnv::GetPidString()
-{
-    ostringstream str;
-    str << GetCurrentProcessId();
-    return str.str();
-}
-
-string TestEnv::FormatLocation(const string& p_file, uint64_t p_line)
-{
-    ostringstream out;
-    out << p_file << "(" << p_line << "): ";
-    return out.str();
-}
diff --git a/libs/kxml/Makefile b/libs/kxml/Makefile
deleted file mode 100644
index 3635fa3..0000000
--- a/libs/kxml/Makefile
+++ /dev/null
@@ -1,117 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/kxml
-
-INT_LIBS = \
-	libkxml \
-	libkxfs
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-ifeq (1,$(HAVE_XML2))
-
-ifneq (,$(XML2_INCDIR))
-INCDIRS += $(addprefix -I,$(XML2_INCDIR))
-endif
-
-all std: makedirs
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-else
-
-all std: $(ALL_LIBS)
-
-$(INT_LIBS):
-	@ echo "NOTE - internal library $(@F) cannot be built:"         \
-	       "It requires 'libxml2' and its development headers."
-
-$(EXT_LIBS):
-	@ echo "NOTE - library $(@F) cannot be built:"                  \
-	       "It requires 'libxml2' and its development headers."
-endif
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# tiny, lightweight interface to libxml
-#
-$(ILIBDIR)/libkxml: $(addprefix $(ILIBDIR)/libkxml.,$(ILIBEXT))
-
-XML_SRC = \
-	xml
-
-XML_OBJ = \
-	$(addsuffix .$(LOBX),$(XML_SRC))
-
-XML_LIB = \
-    
-$(ILIBDIR)/libkxml.$(LIBX): $(XML_OBJ)
-	$(LD) --slib -o $@ $^ $(XML_LIB)
-
-#-------------------------------------------------------------------------------
-# kxfs
-#
-$(ILIBDIR)/libkxfs: $(addprefix $(ILIBDIR)/libkxfs.,$(ILIBEXT))
-
-KXFS_SRC = \
-	xtoc \
-	xtoc-parsexml
-
-KXFS_OBJ = \
-	$(addsuffix .$(LOBX),$(KXFS_SRC))
-
-KXFS_LIB = \
-
-$(ILIBDIR)/libkxfs.$(LIBX): $(KXFS_OBJ)
-	$(LD) --slib -o $@ $^ $(KXFS_LIB)
-
diff --git a/libs/kxml/xml.c b/libs/kxml/xml.c
deleted file mode 100644
index ce44542..0000000
--- a/libs/kxml/xml.c
+++ /dev/null
@@ -1,1705 +0,0 @@
-/*==============================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-struct s_KNodeNamelist;
-#define KNAMELIST_IMPL struct s_KNodeNamelist
-
-#include <sysalloc.h>
-#include <kxml/xml.h>
-
-#include <klib/impl.h>
-#include <kfs/file.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <klib/debug.h>
-#include <klib/text.h>
-
-#include <os-native.h> /* for strndup on mac */
-#include <strtol.h>
-
-#include <libxml/xmlreader.h>
-#include <libxml/xpath.h>
-
-#include <assert.h>
-#include <string.h>
-
-
-#define XML_DEBUG(msg) DBGMSG (DBG_XML, DBG_FLAG(DBG_XML_XML), msg)
-
-/********* XML manager ********/
-
-struct KXMLMgr {
-    atomic32_t refcount;
-};
-
-static KXMLMgr s_KXMLMgr;
-/** calls vsnprintf and converts errors into KXMLErr */
-static rc_t s_KXML_vsnprintf(char *str,
-    size_t size,
-    const char *format,
-    va_list ap)
-{
-    int printed = vsnprintf(str, size, format, ap);
-    if (printed < 0) {
-        return RC ( rcXML, rcDoc, rcConstructing, rcData, rcCorrupt );
-    }
-    if ((size_t) printed >= size) { /* buffer is too small */
-        return RC ( rcXML, rcDoc, rcConstructing, rcBuffer, rcExhausted );
-    }
-    return 0;
-}
-
-rc_t KXMLMgrMakeRead(const KXMLMgr **result)
-{
-    if (!result) {
-        return RC ( rcXML, rcMgr, rcConstructing, rcParam, rcNull );
-    }
-    if (atomic32_read_and_add(&s_KXMLMgr.refcount, 1) == 0) {
-        xmlInitParser();
-    }
-    *result = &s_KXMLMgr;
-    return 0;
-}
-
-rc_t KXMLMgrAddRef(const KXMLMgr *cself)
-{
-    if (cself) {
-        KXMLMgr *self = (KXMLMgr*) cself;
-        atomic32_inc(&self->refcount);
-    }
-    return 0;
-}
-
-rc_t KXMLMgrRelease(const KXMLMgr *cself)
-{
-    if (cself) {
-        KXMLMgr *self = (KXMLMgr*) cself;
-        if (atomic32_dec_and_test(&self->refcount)) {
-            xmlCleanupParser();
-        }
-    }
-    return 0;
-}
-
-/********* XML doucument ********/
-struct KXMLDoc {
-    const KXMLMgr* parent;
-    xmlDocPtr doc;
-    xmlXPathContextPtr xpathCtx;
-    atomic32_t refcount;
-};
-
-/*static int s_XmlInputReadCallback(void * context, 
-					 char * buffer, 
-					 int len)
-{
-    static size_t offset = 0;
-    KFile *src = (KFile*) context;
-    assert(src);
-    {
-        size_t num_read = 0;
-        rc_t rc = KFileRead(src, offset, buffer, len, &num_read);
-        if (rc)
-        {   return -1; }
-        offset += num_read;
-        return num_read;
-    }
-}*/
-
-/* SchemaValidate
- *  validates an XML source file against an XSD schema.
- * schema parameter is the path to the schema
- */
-#if 0
-rc_t KXMLMgrSchemaValidate ( const KXMLMgr *self,
-    struct KFile const *src,
-    const char *schema )
-{
-    if (!src || !schema)
-    {   return RC(rcXML, rcDoc, rcValidating, rcParam, rcNull); }
-
-    {
-        rc_t rc = 0;
-        xmlTextReaderPtr reader
-            = xmlReaderForIO(s_XmlInputReadCallback, 0, (void*)src, "/", 0, 0);
-        if (!reader)
-        {   return RC(rcXML, rcDoc, rcValidating, rcSchema, rcUnknown); }
-        {
-            int r = xmlTextReaderSchemaValidate(reader, schema);
-            if (r != 0) {
-                rc = RC(rcXML, rcDoc, rcValidating, rcSchema, rcUnknown);
-            } else {
-                do {
-                    r = xmlTextReaderRead(reader);
-                } while (r == 1);
-                if (r == -1) {
-                    rc = RC(rcXML, rcDoc, rcValidating, rcDoc, rcInvalid);
-                } else {
-                    assert(r == 0);
-                    r = xmlTextReaderIsValid(reader);
-                    if (r != 1)
-                    {   rc = RC(rcXML, rcDoc, rcValidating, rcDoc, rcInvalid); }
-                }
-            }
-        }
-        xmlTextReaderClose(reader);
-        return rc;
-    }
-}
-#endif
-
-static void s_xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED,
-    const char *msg,
-    ...)
-{
-    va_list args;
-    va_start(args, msg);
-/*  vfprintf(stderr, msg, args); */
-    va_end(args);
-}
-
-static rc_t s_XmlReadFile(const KFile *src, char** aBuffer, uint64_t* aSize)
-{
-    rc_t rc = 0;
-    bool unknownFileSize = false;
-    uint64_t size = 0;
-    uint32_t t = KFileType(src);
-    assert(aBuffer && aSize);
-    *aBuffer = NULL;
-    *aSize = 0;
-
-    /* Read KFile by KFileRead: can use mmap instead */
-    if (t == kfdFIFO) {
-        XML_DEBUG (("%s: reading stdin ?", __func__));
-        unknownFileSize = true;
-        size = 0x10000;
-    }
-    else {
-        rc = KFileSize(src, &size);
-        if (rc)
-        {   return rc; }
-        if (!size) {
-            rc = RC(rcXML, rcDoc, rcConstructing, rcFile, rcEmpty);
-            return rc;
-        }
-    }
-    {
-        size_t num_read = 0;
-        char* buffer = (char*) malloc(size);
-        if (!buffer)
-        {   return RC(rcXML, rcDoc, rcConstructing, rcMemory, rcExhausted); }
-        rc = KFileRead(src, 0, buffer, size, &num_read);
-        if (rc == 0) {
-            if (!unknownFileSize) {
-                if (num_read != size) {
-                    rc = RC(rcXML, rcDoc, rcConstructing, rcFile, rcIncomplete);
-                }
-            }
-            else {
-                if (num_read == size) {
-                    rc = RC(rcXML, rcDoc, rcConstructing, rcFile, rcTooBig);
-                }
-            }
-        }
-        if (rc) {
-            free(buffer);
-            return rc;
-        }
-        *aBuffer = buffer;
-        *aSize = size;
-    }
-
-    return rc;
-}
-
-static int s_UseDefaultErrorHandler = 0;
-
-rc_t KXMLMgrMakeDocRead(const KXMLMgr *self,
-    const KXMLDoc **result,
-    const KFile *src)
-{
-    rc_t rc = 0;
-    if (self && src) {
-        char* buffer = NULL;
-        uint64_t size = 0;
-        rc = s_XmlReadFile(src, &buffer, &size);
-        if (rc)
-        {    return rc; }
-        rc = KXMLMgrMakeDocReadFromMemory(self, result, buffer, size);
-        free(buffer);
-    }
-    else
-    {    rc = RC ( rcXML, rcDoc, rcConstructing, rcParam, rcNull ); }
-    return rc;
-}
-
-rc_t KXMLMgrMakeDocReadFromMemory(const KXMLMgr *self,
-    const KXMLDoc **result,
-    const char* buffer,
-    uint64_t size)
-{
-    rc_t rc = 0;
-    if (!s_UseDefaultErrorHandler)
-    {   xmlSetGenericErrorFunc(0, s_xmlGenericErrorDefaultFunc); }
-    if (!result)
-    {   return RC ( rcXML, rcDoc, rcConstructing, rcParam, rcNull ); }
-    *result = 0;
-    if (self && buffer && size) {
-        KXMLDoc *obj = (KXMLDoc*) malloc(sizeof(KXMLDoc));
-        if (!obj)
-        {   return RC ( rcXML, rcDoc, rcConstructing, rcMemory, rcExhausted ); }
-        atomic32_set(&obj->refcount, 1);
-        obj->parent = self;
-        KXMLMgrAddRef(obj->parent);
-        obj->doc = 0;
-        obj->xpathCtx = 0;
-
-        /* Load XML document */
-        obj->doc = xmlParseMemory(buffer, size);
-
-        if (!obj->doc) {
-            KXMLDocRelease(obj);
-            return RC ( rcXML, rcDoc, rcConstructing, rcXmlDoc, rcInvalid );
-        }
-
-        /* Create xpath evaluation context */
-        obj->xpathCtx = xmlXPathNewContext(obj->doc);
-        if (!obj->xpathCtx) {
-            KXMLDocRelease(obj);
-            return RC ( rcXML, rcDoc, rcConstructing, rcMemory, rcCorrupt );
-        }
-        *result = obj;
-        rc = 0;
-    }
-    else {
-        rc = RC ( rcXML, rcDoc, rcConstructing, rcParam, rcNull );
-    }
-    return rc;
-}
-
-rc_t KXMLDocAddRef(const KXMLDoc *cself)
-{
-    if (cself) {
-        KXMLDoc *self = (KXMLDoc*) cself;
-        atomic32_inc(&self->refcount);
-    }
-    return 0;
-}
-
-rc_t KXMLDocRelease(const KXMLDoc *cself)
-{
-    if (cself) {
-        KXMLDoc *self = (KXMLDoc*) cself;
-        if (atomic32_dec_and_test(&self->refcount)) {
-            if (self->xpathCtx) {
-                xmlXPathFreeContext(self->xpathCtx);
-                self->xpathCtx = 0;
-            }
-            if (self->doc) {
-                xmlFreeDoc(self->doc);
-                self->doc = 0;
-            }
-            KXMLMgrRelease(self->parent);
-            self->parent = 0;
-            free(self);
-        }
-    }
-    return 0;
-}
-
-/********* XML node set ********/
-
-struct KXMLNodeset {
-    atomic32_t refcount;
-    const KXMLDoc *parent;
-    char *path;
-    xmlXPathObjectPtr xpathObj;
-};
-
-/** KXMLNodeset constructor */
-static rc_t KXMLNodeset_cTor(const KXMLDoc *parent,
-    const KXMLNodeset **result,
-    const char *path)
-{
-    assert(parent && result && path && path[0]);
-    if (!parent->xpathCtx) {
-        return RC ( rcXML, rcDoc, rcConstructing, rcData, rcIncorrect );
-    }
-    {
-        size_t size;
-        KXMLNodeset *obj = (KXMLNodeset*) malloc(sizeof(KXMLNodeset));
-        if (!obj) {
-            return RC ( rcXML, rcDoc, rcConstructing, rcMemory, rcExhausted );
-        }
-        atomic32_set(&obj->refcount, 1);
-        obj->parent = parent;
-        obj->path = 0;
-        KXMLDocAddRef(obj->parent);
-        obj->xpathObj = xmlXPathEvalExpression(BAD_CAST path, parent->xpathCtx);
-        if (!obj->xpathObj) {
-            KXMLNodesetRelease(obj);
-            return RC ( rcXML, rcDoc, rcConstructing, rcData, rcCorrupt );
-        }
-        if( obj->xpathObj->type != XPATH_NODESET ) {
-            KXMLNodesetRelease(obj);
-            return RC(rcXML, rcDoc, rcConstructing, rcData, rcUnsupported );
-        }
-        obj->path = string_dup(path, string_measure(path, &size));
-        if (!obj->path) {
-            KXMLNodesetRelease(obj);
-            return RC ( rcXML, rcDoc, rcConstructing, rcMemory, rcExhausted );
-        }
-        *result = obj;
-    }
-    return 0;
-}
-
-static rc_t s_KXML_snprintf(char *str,
-    size_t size,
-    const char *format,
-    ...)
-{
-    va_list args;
-    va_start(args, format);
-    {
-        rc_t rc = s_KXML_vsnprintf(str, size, format, args);
-        va_end(args);
-        return rc;
-    }
-}
-
-#define XPATH_MAX_LEN 1001
-/** Opens a node set relative to current node */
-rc_t KXMLDocOpenNodesetRead(const KXMLDoc *self,
-    const KXMLNodeset **result,
-    const char *path,
-    ...)
-{
-    rc_t rc = 0;
-    va_list args;
-    va_start ( args, path );
-    rc = KXMLDocVOpenNodesetRead ( self, result, path, args );
-    va_end ( args );
-    return rc;
-}
-
-rc_t KXMLDocVOpenNodesetRead(const KXMLDoc *self,
-    const KXMLNodeset **result,
-    const char *path,
-    va_list args)
-{
-    rc_t rc = 0;
-
-    if (!result || !path || !path[0]) {
-        return RC ( rcXML, rcDoc, rcConstructing, rcParam, rcNull );
-    }
-
-    *result = 0;
-
-    if (self) {
-        char buffer[XPATH_MAX_LEN];
-        rc = s_KXML_vsnprintf(buffer, sizeof(buffer), path, args);
-        if (rc != 0) {
-            return rc;
-        }
-        rc = KXMLNodeset_cTor(self, result, buffer);
-    }
-    else { rc = RC ( rcXML, rcDoc, rcConstructing, rcSelf, rcNull ); }
-
-    return rc;
-}
-
-rc_t KXMLNodesetAddRef(const KXMLNodeset *cself)
-{
-    if (cself) {
-        KXMLNodeset *self = (KXMLNodeset*) cself;
-        atomic32_inc(&self->refcount);
-    }
-    return 0;
-}
-
-rc_t KXMLNodesetRelease(const KXMLNodeset *cself)
-{
-    if (cself) {
-        KXMLNodeset *self = (KXMLNodeset*) cself;
-        if (atomic32_dec_and_test(&self->refcount)) {
-            if (self->xpathObj) {
-                xmlXPathFreeObject(self->xpathObj);
-                self->xpathObj = 0;
-            }
-            KXMLDocRelease(self->parent);
-            self->parent = 0;
-            if (self->path) {
-                free(self->path);
-                self->path = 0;
-            }
-            free(self);
-        }
-    }
-    return 0;
-}
-
-rc_t KXMLNodesetCount(const KXMLNodeset *self,
-    uint32_t *result)
-{
-    if (!result)
-    { return RC ( rcXML, rcDoc, rcListing, rcParam, rcNull ); }
-
-    *result = 0;
-
-    if (self && self->xpathObj) {
-        const xmlNodeSetPtr nodes = self->xpathObj->nodesetval;
-        if (nodes)
-        { *result = nodes->nodeNr; }
-        return 0;
-    }
-    else {
-        return RC ( rcXML, rcDoc, rcAccessing, rcSelf, rcNull );
-    }
-}
-
-/********* XML node ********/
-
-struct KXMLNode {
-    const KXMLNodeset *parent;
-    /* use parent's refcount; */
-
-    /* parent and index are used to find a node within a nodeset
-    (when children == 0) */
-    int32_t idx;
-
-    /* when children != 0 then children is an XML node,
-    path is node's path relative to parent's path */
-    const struct _xmlNode *children;
-    char *path;
-};
-
-static rc_t s_KXMLNode_cTor(const KXMLNodeset *self,
-    const KXMLNode **result,
-    uint32_t idx,
-    const struct _xmlNode *children,
-    char *path)
-{
-    KXMLNode *obj = (KXMLNode*) malloc(sizeof(KXMLNode));
-    if (!obj) {
-        return RC ( rcXML, rcDoc, rcAccessing, rcMemory, rcExhausted );
-    }
-    obj->parent = self;
-    obj->path = 0;
-    obj->children = children;
-    if (children) {
-        size_t size = 0;
-        size_t path_size;
-        if (path)
-        {   size += string_measure(path, &path_size) + 1; }
-        if (children->name)
-        {   
-            size_t sz;
-            size += string_measure((char*)children->name, &sz); 
-        }
-        obj->path = (char*)malloc(size + 1);
-        if (!obj->path) {
-            free(obj);
-            return RC ( rcXML, rcDoc, rcAccessing, rcMemory, rcExhausted );
-        }
-        *obj->path = 0;
-        if (path && path[0]) {
-            string_copy(obj->path, size + 1, path, path_size);
-            strcat(obj->path, "/");
-        }
-        strcat(obj->path, (char*)children->name);
-    }
-    KXMLNodesetAddRef(obj->parent);
-    obj->idx = idx;
-    *result = obj;
-    return 0;
-}
-
-/* GetName
- */
-rc_t KXMLNodeGetName ( const KXMLNode *self, const char **name ) {
-    if (!self)
-    {   return RC ( rcXML, rcNode, rcAccessing, rcSelf, rcNull ); }
-    if (!name)
-    {   return RC ( rcXML, rcNode, rcAccessing, rcParam, rcNull ); }
-    *name = 0;
-    if (!self->children) {
-        assert(self->parent);
-        *name = self->parent->path;
-        /*TODO
-        here name if not the last node name but absolute name from xml root*/
-    } else {
-        *name = (const char*)self->children->name;
-    }
-    return 0;
-}
-
-rc_t KXMLNodeElementName ( const KXMLNode *self, const char **name )
-{
-    if( self == NULL ) {
-        return RC ( rcXML, rcNode, rcAccessing, rcSelf, rcNull );
-    }
-    if( name == NULL ) {
-        return RC ( rcXML, rcNode, rcAccessing, rcParam, rcNull );
-    }
-    *name = NULL;
-    if( self->children == NULL ) {
-        *name = (const char*)self->parent->xpathObj->nodesetval->nodeTab[self->idx]->name;
-    } else {
-        *name = (const char*)self->children->name;
-    }
-    return 0;
-}
-
-rc_t KXMLNodesetGetNodeRead(const KXMLNodeset *self,
-    const KXMLNode **result,
-    uint32_t idx)
-{
-    rc_t rc = 0;
-    uint32_t count = 0;
-
-    if (!result)
-    { return RC ( rcXML, rcNode, rcAccessing, rcParam, rcNull ); }
-
-    *result = 0;
-
-    if (self) {
-        rc = KXMLNodesetCount(self, &count);
-        if (rc == 0) {
-            assert(count >= 0);
-            if (count == 0) {
-            /* TODO: this test should be made when KXMLNodeset is created */
-                rc = RC(rcXML, rcNode, rcAccessing, rcNode, rcNotFound);
-            }
-            else if (idx < count) {
-                rc = s_KXMLNode_cTor(self, result, idx, NULL, NULL);
-            }
-            else {
-                rc = RC (rcXML, rcNode, rcAccessing, rcParam, rcIncorrect);
-            }
-        }
-    }
-    else {
-        rc = RC ( rcXML, rcDoc, rcAccessing, rcSelf, rcCorrupt );
-    }
-    return rc;
-}
-
-/** Opens a node set relative to current node */
-rc_t KXMLNodeVOpenNodesetRead ( const KXMLNode *self,
-    struct KXMLNodeset const **result, const char *path, va_list args )
-{
-    rc_t rc = 0;
-
-    if (!result || !path || !path[0])
-    { return RC ( rcXML, rcNode, rcAccessing, rcParam, rcNull ); }
-
-    *result = 0;
-
-    if (self == NULL)
-    {  return RC ( rcXML, rcNode, rcAccessing, rcSelf, rcNull );}
-
-    if (self && self->parent && self->parent->path) {
-        char *newPath = 0;
-        char buffer[XPATH_MAX_LEN];
-        char outpath[XPATH_MAX_LEN];
-        rc = s_KXML_vsnprintf(outpath, sizeof(outpath), path, args);
-        if (rc != 0)
-        { return rc; }
-
-        if (path[0] == '/')
-        { newPath = outpath; }
-        else {
-            size_t size;
-            if ((string_measure(self->parent->path, &size) + 1 + string_measure(outpath, &size) + 1 + 3)
-                > XPATH_MAX_LEN)
-            {
-                /* buffer is too small */
-                return RC
-                    ( rcXML, rcNode, rcAccessing, rcBuffer, rcExhausted );
-            }
-            if( self->parent->path[0] == '/' && self->parent->path[1] == '\0' ) {
-                /* correctly construct child path if parent path is "/" */
-                rc = s_KXML_snprintf(buffer, sizeof(buffer), "/%s", outpath);
-            } else {
-                rc = s_KXML_snprintf(buffer, sizeof(buffer), "(%s)[%d]/%s", self->parent->path, self->idx + 1, outpath);
-            }
-            newPath = buffer;
-        }
-        assert(self->parent && self->parent->parent);
-        rc = KXMLNodeset_cTor(self->parent->parent, result, newPath);
-    }
-    else { rc = RC ( rcXML, rcNode, rcAccessing, rcSelf, rcCorrupt ); }
-
-    return rc;
-}
-
-/** Opens a node set relative to current node */
-rc_t KXMLNodeOpenNodesetRead(const KXMLNode *self,
-    const KXMLNodeset **result,
-    const char *path,
-    ...)
-{
-    rc_t rc = 0;
-    va_list args;
-    va_start ( args, path );
-    rc = KXMLNodeVOpenNodesetRead ( self, result, path, args );
-    va_end ( args );
-    return rc;
-}
-
-rc_t KXMLNodeRelease(const KXMLNode *cself) {
-    if (cself) {
-        KXMLNode *self = (KXMLNode*) cself;
-        KXMLNodesetRelease(self->parent);
-        free(self->path);
-        free(self);
-    }
-    return 0;
-}
-
-/** Reads node's value.
-remaining can be NULL */
-/* Implementation:
-Iterates over all XML_TEXT_NODE children starting from firstChild.
-Uses state machine.
-
-Initial state is eNotFound.
-First it skips all nodes until their cumulative size is < offset;
-Then it copies the [part of] the first node considering offset:
-if the buffer is filled then state changes to eFilled,
-otherwise to eStarted.
-
-If the state is eStarted: node is added to buffer.
-State remains eStarted or changes to eFilled.
-
-If the state is eFilled then remaining value is added up. */
-int s_KXMLNode_readTextNode(const xmlNodePtr firstChild,
-    void *buffer,
-    size_t bsize,
-    size_t *num_read,
-    size_t *remaining,
-    size_t offset)
-{
-    enum EState {
-        eNotFound,
-        eStarted,
-        eFilled
-    } state = eNotFound;
-
-    size_t head = 0;
-    size_t copied = 0;
-    size_t remains = 0;
-    xmlNodePtr node = firstChild;
-
-    if (!firstChild)
-    {   return RC ( rcXML, rcNode, rcReading, rcParam, rcNull ); }
-
-    assert(num_read);
-
-    while (node) {
-        if (node->type == XML_TEXT_NODE) {
-            char* content = (char*) node->content;
-            size_t size;
-            size_t chunkSz = string_measure(content, &size);
-            switch (state) {
-                case eNotFound: {
-                    if (offset < head + chunkSz) {
-                        size_t chunkOffset = offset - head;
-                        size_t readySz = chunkOffset + chunkSz;
-                        size_t size = readySz;
-                        if (readySz >= (bsize - copied)) {
-                            size = bsize - copied;
-                            state = eFilled;
-                        }
-                        else {
-                            state = eStarted;
-                        }
-                        if (size) {
-                            assert(buffer);
-                            string_copy((char*) buffer + copied, bsize - copied, 
-                                content + chunkOffset, size);
-                        }
-                        copied += size;
-                        if (state == eFilled) {
-                            remains = readySz - size;
-                        }
-                    }
-                    break;
-                }
-                case eStarted: {
-                    size_t chunkOffset = 0;
-                    size_t readySz = chunkSz;
-                    size_t size = readySz;
-                    if (readySz >= (bsize - copied)) {
-                        size = bsize - copied;
-                        state = eFilled;
-                    }
-                    if (size) {
-                        assert(buffer);
-                        string_copy((char*) buffer + copied, bsize - copied,
-                            content + chunkOffset, size);
-                    }
-                    copied += size;
-                    if (state == eFilled) {
-                        remains = readySz - size;
-                    }
-                    break;
-                }
-                case eFilled:
-                    remains += chunkSz;
-                    break;
-                default:
-                    assert(0);
-                    break;
-            }
-        }
-        node = node->next;
-    }
-
-    *num_read = copied;
-
-    if (remaining)
-    { *remaining = remains; }
-
-    return 0;
-}
-
-/** Reads XML Node value
-    remaining can be NULL.
-Can have bsize parameter equal to 0:
-can be used to find out the node value length.
-*/
-rc_t KXMLNodeRead(const KXMLNode *self,
-    size_t offset,
-    void *buffer,
-    size_t bsize,
-    size_t *num_read,
-    size_t *remaining)
-{
-    rc_t rc = 0;
-
-    if (!num_read)
-    { return RC ( rcXML, rcNode, rcReading, rcParam, rcNull ); }
-    if (bsize && !buffer)
-    { return RC ( rcXML, rcNode, rcReading, rcParam, rcNull ); }
-
-    *num_read = 0;
-
-    if (remaining)
-    { *remaining = 0; }
-
-    if (self) {
-        const struct _xmlNode *children = NULL;
-        if (self->children) {
-            /*the case when (KXMLNode::children != NULL) is implemented here*/
-            if (self->children->children)
-            { children = self->children->children; }
-        }
-        else if (self->parent && self->parent->xpathObj) {
-            xmlNodePtr node = NULL;
-            int32_t idx = self->idx;
-            const xmlXPathObjectPtr xpathObj = self->parent->xpathObj;
-            assert(xpathObj->nodesetval && idx < xpathObj->nodesetval->nodeNr);
-            node = xpathObj->nodesetval->nodeTab[idx];
-            if (node && node->type == XML_ELEMENT_NODE) {
-                children = node->children;
-            }
-            rc = 0;
-        }
-        if (children != NULL) {
-            return s_KXMLNode_readTextNode( ( xmlNodePtr )
-                children, buffer, bsize, num_read, remaining, offset);
-        }
-    }
-    else { rc = RC ( rcXML, rcNode, rcReading, rcNode, rcCorrupt ); }
-
-    return rc;
-}
-
-
-#define MAX_I16      0x8000 /* 32768 */
-#define MAX_U16     0x10000
-#define MAX_I32  0x80000000
-#define MAX_U32 0x100000000
-
-static
-rc_t s_KXMLNodeReadNodeOrAttrCString(const KXMLNode *self,
-    char *buffer, size_t bsize, size_t *size, const char *attr)
-{
-    if (attr)
-    { return KXMLNodeReadAttrCString(self, attr, buffer, bsize, size); }
-    else { return KXMLNodeReadCString(self, buffer, bsize, size); }
-}
-
-static
-rc_t s_KXMLNodeReadNodeOrAttrAs_long(const KXMLNode *self, long *l,
-    const char *attr)
-{
-    rc_t rc;
-    size_t num_read;
-    char buffer [ 256 ];
-
-    assert ( l );
-
-    rc = s_KXMLNodeReadNodeOrAttrCString
-        ( self, buffer, sizeof buffer, & num_read, attr );
-
-    if ( rc == 0 )
-    {
-        char *end;
-        *l = strtol ( buffer, & end, 0 );
-        if ( end [ 0 ] != 0 )
-            rc = RC ( rcXML, rcNode, rcReading, rcType, rcIncorrect );
-    }
-
-    return rc;
-}
-
-static
-rc_t s_KXMLNodeReadNodeOrAttrAs_ulong(const KXMLNode *self, unsigned long *l,
-    const char *attr)
-{
-    rc_t rc;
-    size_t num_read;
-    char buffer [ 256 ];
-
-    assert ( l );
-
-    rc = s_KXMLNodeReadNodeOrAttrCString
-        ( self, buffer, sizeof buffer, & num_read, attr );
-
-    if ( rc == 0 )
-    {
-        char *end;
-        *l = strtoul ( buffer, & end, 0 );
-
-        if ( end [ 0 ] != 0 )
-        {
-    #if 1
-            rc = RC ( rcXML, rcNode, rcReading, rcType, rcIncorrect );
-    #else
-            if ( end [ 0 ] != '-' && end [ 0 ] != '+' )
-                rc = RC ( rcXML, rcNode, rcReading, rcType, rcIncorrect );
-            else
-            {
-                /* read signed, cast to unsigned... ? */
-            }
-    #endif
-        }
-    }
-
-    return rc;
-}
-
-/* ReadAs ( formatted )
- *  reads as integer or float value in native byte order
- *  casts smaller-sized values to desired size, e.g.
- *    uint32_t to uint64_t
- *
- *  "i" [ OUT ] - return parameter for signed integer
- *  "u" [ OUT ] - return parameter for unsigned integer
- *  "f" [ OUT ] - return parameter for double float
- */
-static
-rc_t s_KXMLNodeReadNodeOrAttrAsI16 ( const KXMLNode *self, int16_t *i,
-    const char *attr )
-{
-    rc_t rc = 0;
-    long val = 0;
-
-    if ( i == NULL )
-        return RC ( rcXML, rcNode, rcReading, rcParam, rcNull );
-
-    rc = s_KXMLNodeReadNodeOrAttrAs_long ( self, &val, attr );
-
-    if ( rc == 0 )
-    {
-        if ( val < -32768  || val >= 32768 )
-            rc = RC ( rcXML, rcNode, rcReading, rcRange, rcExcessive );
-        else
-            * i = ( int16_t ) val;
-    }
-
-    return rc;
-}
-
-rc_t KXMLNodeReadAsI16 ( const KXMLNode *self, int16_t *i )
-{ return s_KXMLNodeReadNodeOrAttrAsI16(self, i, NULL); }
-static 
-rc_t s_KXMLNodeReadNodeOrAttrAsU16 ( const KXMLNode *self, uint16_t *u,
-    const char *attr )
-{
-    rc_t rc = 0;
-    unsigned long val = 0;
-
-    if ( u == NULL )
-        return RC ( rcXML, rcNode, rcReading, rcParam, rcNull );
-
-    rc = s_KXMLNodeReadNodeOrAttrAs_ulong(self, &val, attr);
-
-    if ( rc == 0 )
-    {
-        if ( val >= 0x10000 )
-            rc = RC ( rcXML, rcNode, rcReading, rcRange, rcExcessive );
-        else
-            * u = ( uint16_t ) val;
-    }
-
-    return rc;
-}
-
-rc_t KXMLNodeReadAsU16 ( const KXMLNode *self, uint16_t *u )
-{ return s_KXMLNodeReadNodeOrAttrAsU16(self, u, NULL); }
-static
-rc_t s_KXMLNodeReadNodeOrAttrAsI32 ( const KXMLNode *self, int32_t *i,
-    const char *attr )
-{
-    rc_t rc = 0;
-    long val = 0;
-
-    if ( i == NULL )
-        return RC ( rcXML, rcNode, rcReading, rcParam, rcNull );
-
-    rc = s_KXMLNodeReadNodeOrAttrAs_long ( self, &val, attr );
-
-    if ( rc == 0 )
-    {
-        * i = ( int32_t ) val;
-        if ( ( long ) ( * i ) != val )
-            rc = RC ( rcXML, rcNode, rcReading, rcRange, rcExcessive );
-    }
-
-    return rc;
-}
-
-rc_t KXMLNodeReadAsI32 ( const KXMLNode *self, int32_t *i )
-{ return s_KXMLNodeReadNodeOrAttrAsI32(self, i, NULL); }
-rc_t s_KXMLNodeReadNodeOrAttrAsU32 ( const KXMLNode *self, uint32_t *u,
-    const char *attr )
-{
-    rc_t rc = 0;
-    unsigned long val = 0;
-
-    if ( u == NULL )
-        return RC ( rcXML, rcNode, rcReading, rcParam, rcNull );
-
-    rc = s_KXMLNodeReadNodeOrAttrAs_ulong(self, &val, attr);
-
-    if ( rc == 0 )
-    {
-        * u = ( uint32_t ) val;
-        if ( ( unsigned long ) ( * u ) != val )
-            rc = RC ( rcXML, rcNode, rcReading, rcRange, rcExcessive );
-    }
-
-    return rc;
-}
-rc_t KXMLNodeReadAsU32 ( const KXMLNode *self, uint32_t *u )
-{ return s_KXMLNodeReadNodeOrAttrAsU32(self, u, NULL); }
-static
-rc_t s_KXMLNodeReadNodeOrAttrAsI64 ( const KXMLNode *self, int64_t *i,
-    const char *attr )
-{
-    rc_t rc;
-
-    if ( i == NULL )
-        rc = RC ( rcXML, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t num_read;
-        char buffer [ 256 ];
-
-        rc = s_KXMLNodeReadNodeOrAttrCString
-            ( self, buffer, sizeof buffer, & num_read, attr );
-
-        if ( rc == 0 )
-        {
-            char *end;
-            int64_t val = strtoi64 ( buffer, & end, 0 );
-
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcXML, rcNode, rcReading, rcType, rcIncorrect );
-            else
-                * i = val;
-        }
-    }
-
-    return rc;
-}
-rc_t KXMLNodeReadAsI64 ( const KXMLNode *self, int64_t *i )
-{ return s_KXMLNodeReadNodeOrAttrAsI64(self, i, NULL); }
-
-rc_t s_KXMLNodeReadNodeOrAttrAsU64 ( const KXMLNode *self, uint64_t *u,
-    const char *attr )
-{
-    rc_t rc;
-
-    if ( u == NULL )
-        rc = RC ( rcXML, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t num_read;
-        char buffer [ 256 ];
-
-        rc = s_KXMLNodeReadNodeOrAttrCString
-            ( self, buffer, sizeof buffer, & num_read, attr );
-
-        if ( rc == 0 )
-        {
-            char *end;
-            uint64_t val = strtou64 ( buffer, & end, 0 );
-
-            if ( end [ 0 ] != 0 )
-            {
-        #if 1
-                rc = RC ( rcXML, rcNode, rcReading, rcType, rcIncorrect );
-        #else
-                if ( end [ 0 ] != '-' && end [ 0 ] != '+' )
-                    rc = RC ( rcXML, rcNode, rcReading, rcType, rcIncorrect );
-                else
-                {
-                    /* read signed, cast to unsigned... ? */
-                    /* FYI
-                       centos64: strtou64("-1") = 0xffff...
-                       errno = 1; end[0] = '\0' */
-                }
-        #endif
-            }
-            else
-                * u = val;
-        }
-    }
-
-    return rc;
-}
-
-rc_t KXMLNodeReadAsU64 ( const KXMLNode *self, uint64_t *u )
-{ return s_KXMLNodeReadNodeOrAttrAsU64(self, u, NULL); }
-rc_t s_KXMLNodeReadNodeOrAttrAsF64 ( const KXMLNode *self, double *f,
-    const char *attr )
-{
-    rc_t rc;
-
-    if ( f == NULL )
-        rc = RC ( rcXML, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t num_read;
-        char buffer [ 256 ];
-
-        rc = s_KXMLNodeReadNodeOrAttrCString
-            ( self, buffer, sizeof buffer, & num_read, attr );
-
-        if ( rc == 0 )
-        {
-            char *end;
-            * f = strtod ( buffer, & end );
-            if ( end [ 0 ] != 0 )
-                rc = RC ( rcXML, rcNode, rcReading, rcType, rcIncorrect );
-        }
-    }
-
-    return rc;
-}
-rc_t KXMLNodeReadAsF64 ( const KXMLNode *self, double *f )
-{ return s_KXMLNodeReadNodeOrAttrAsF64(self, f, NULL); }
-
-/* Read ( formatted )
- *  reads as C-string
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - output buffer for
- *  NUL terminated string.
- *
- *  "size" [ OUT ] - return parameter giving size of string
- *  not including NUL byte. the size is set both upon success
- *  and insufficient buffer space error.
- */
-rc_t KXMLNodeReadCString ( const KXMLNode *self,
-    char *buffer, size_t bsize, size_t *size )
-{
-    rc_t rc;
-
-    if ( size == NULL )
-        rc = RC ( rcXML, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t remaining;
-        rc = KXMLNodeRead ( self, 0, buffer, bsize, size, & remaining );
-        if ( rc == 0 )
-        {
-            if ( * size == bsize )
-            {
-                rc = RC ( rcXML, rcNode, rcReading, rcBuffer, rcInsufficient );
-                * size += remaining;
-            }
-            else
-            {
-                buffer [ * size ] = 0;
-            }
-        }
-    }
-
-    return rc;
-}
-
-rc_t KXMLNodeReadCStr( const KXMLNode *self, char** str, const char* default_value)
-{
-    rc_t rc = 0;
-
-    if( self == NULL || str == NULL ) {
-        rc = RC( rcXML, rcNode, rcReading, rcParam, rcNull);
-    } else { 
-        char b[10240];
-        size_t to_read = sizeof(b) - 1, nread = 0;
-        
-        *str = NULL;
-        if( (rc = KXMLNodeReadCString(self, b, to_read, &nread)) == 0 ) {
-            if( nread == 0 && default_value != NULL ) {
-                size_t size;
-                *str = string_dup(default_value, string_measure(default_value, &size));
-            } else {
-                *str = string_dup(b, nread);
-            }
-            if( *str == NULL ) {
-                rc = RC(rcXML, rcNode, rcReading, rcMemory, rcInsufficient);
-            }
-        }
-    }
-    return rc;
-}
-
-
-/** Reads XML Node attribute value
-attr: attribute name
-    remaining can be NULL.
-Can have bsize parameter equal to 0:
-can be used to find out the attribute value length.
-*/
-rc_t KXMLNodeReadAttr(const KXMLNode *self,
-     const char *attr,
-     void *buffer,
-     size_t bsize,
-     size_t *num_read,
-     size_t *remaining)
-{
-    rc_t status = 0;
-    struct _xmlAttr* properti = NULL;
-    if (!attr || !num_read) {
-        return RC ( rcXML, rcAttr, rcReading, rcParam, rcNull );
-    }
-    if (bsize && !buffer)
-    {   return RC ( rcXML, rcNode, rcReading, rcParam, rcNull ); }
-    *num_read = 0;
-    if (remaining) {
-        *remaining = 0;
-    }
-    if (!self)
-    {   return RC ( rcXML, rcAttr, rcReading, rcSelf, rcCorrupt ); }
-    if (self->children) {
-        properti = self->children->properties;
-    }
-    else if (self->parent && self->parent->xpathObj) {
-        int32_t idx = self->idx;
-        const xmlXPathObjectPtr xpathObj = self->parent->xpathObj;
-        assert(xpathObj->nodesetval && idx < xpathObj->nodesetval->nodeNr);
-        {
-            xmlNodePtr node = xpathObj->nodesetval->nodeTab[idx];
-            if (node && node->type == XML_ELEMENT_NODE)
-            {   properti = node->properties; }
-        }
-    }
-    else {
-        status = RC ( rcXML, rcAttr, rcReading, rcSelf, rcCorrupt );
-    }
-    if (properti) {
-        while (properti) {
-            if (!xmlStrcmp(BAD_CAST attr, properti->name)) {
-                return s_KXMLNode_readTextNode(properti->children,
-                    buffer, bsize, num_read, remaining, 0);
-            }
-            properti = properti->next;
-        }
-    }
-    status = RC ( rcXML, rcAttr, rcReading, rcAttr, rcNotFound );
-    return status;
-}
-
-
-/* ReadAttrAs ( formatted )
- *  reads as integer or float value in native byte order
- *  casts smaller-sized values to desired size, e.g.
- *    uint32_t to uint64_t
- *
- *  "i" [ OUT ] - return parameter for signed integer
- *  "u" [ OUT ] - return parameter for unsigned integer
- *  "f" [ OUT ] - return parameter for double float
- */
-rc_t KXMLNodeReadAttrAsI16
-    ( const KXMLNode *self, const char *attr, int16_t *i )
-{ return s_KXMLNodeReadNodeOrAttrAsI16(self, i, attr); }
-
-rc_t KXMLNodeReadAttrAsU16
-    ( const KXMLNode *self, const char *attr, uint16_t *u )
-{ return s_KXMLNodeReadNodeOrAttrAsU16(self, u, attr); }
-
-rc_t KXMLNodeReadAttrAsI32 ( const KXMLNode *self,
-    const char *attr, int32_t *i )
-{ return s_KXMLNodeReadNodeOrAttrAsI32(self, i, attr); }
-
-rc_t KXMLNodeReadAttrAsU32
-    ( const KXMLNode *self, const char *attr, uint32_t *u )
-{ return s_KXMLNodeReadNodeOrAttrAsU32(self, u, attr); }
-
-rc_t KXMLNodeReadAttrAsI64
-    ( const KXMLNode *self, const char *attr, int64_t *i )
-{ return s_KXMLNodeReadNodeOrAttrAsI64(self, i, attr); }
-
-rc_t KXMLNodeReadAttrAsU64
-    ( const KXMLNode *self, const char *attr, uint64_t *u )
-{ return s_KXMLNodeReadNodeOrAttrAsU64(self, u, attr); }
-
-rc_t KXMLNodeReadAttrAsF64 ( const KXMLNode *self, const char *attr, double *f )
-{ return s_KXMLNodeReadNodeOrAttrAsF64(self, f, attr); }
-
-
-/* ReadAttrCString ( formatted )
- *  reads as C-string
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - output buffer for
- *  NUL terminated string.
- *
- *  "size" [ OUT ] - return parameter giving size of string
- *  not including NUL byte. the size is set both upon success
- *  and insufficient buffer space error.
- */
-rc_t KXMLNodeReadAttrCString ( const KXMLNode *self, const char *attr,
-    char *buffer, size_t bsize, size_t *size )
-{
-    rc_t rc;
-
-    if ( size == NULL )
-        rc = RC ( rcXML, rcAttr, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t remaining;
-        rc = KXMLNodeReadAttr ( self, attr, buffer, bsize, size, & remaining );
-        if ( rc == 0 )
-        {
-            if ( * size == bsize )
-            {
-                rc = RC ( rcXML, rcAttr, rcReading, rcBuffer, rcInsufficient );
-                * size += remaining;
-            }
-            else
-            {
-                buffer [ * size ] = 0;
-            }
-        }
-    }
-
-    return rc;
-}
-
-rc_t KXMLNodeReadAttrCStr( const KXMLNode *self, const char *attr, char** str, const char* default_value)
-{
-    rc_t rc = 0;
-
-    if( self == NULL || attr == NULL || str == NULL ) {
-        rc = RC( rcXML, rcNode, rcReading, rcParam, rcNull);
-    } else { 
-        char b[10240];
-        size_t to_read = sizeof(b) - 1, nread = 0;
-        
-        *str = NULL;
-        if( (rc = KXMLNodeReadAttrCString(self, attr, b, to_read, &nread)) == 0 ) {
-            if( nread == 0 && default_value != NULL ) {
-                size_t size;
-                *str = string_dup(default_value, string_measure(default_value, &size));
-            } else {
-                *str = string_dup(b, nread);
-            }
-        } else if( GetRCState(rc) == rcNotFound && default_value != NULL ) {
-            size_t size;
-            *str = string_dup(default_value, string_measure(default_value, &size));
-            rc = 0;
-        }
-        if( rc == 0 && *str == NULL ) {
-            rc = RC(rcXML, rcNode, rcReading, rcMemory, rcInsufficient);
-        }
-    }
-    return rc;
-}
-
-
-struct s_KNodeNamelist {
-    KNamelist dad;
-    struct _xmlAttr* properties;
-    struct _xmlNode* children;
-};
-typedef struct s_KNodeNamelist s_KNodeNamelist;
-static rc_t KNodeNamelistDestroy (s_KNodeNamelist *self)
-{
-    free(self);
-    return 0;
-}
-
-static rc_t s_LibXmlCount(uint32_t *count,
-    const struct _xmlNode* children,
-    const struct _xmlAttr* properties)
-{
-    assert(count);
-
-    *count = 0;
-
-    /* It neither of properties nor children exists
-    then this node does not have children */
-
-    if (properties) {
-        while (properties) {
-            ++(*count);
-            properties = properties->next;
-        }
-    }
-    else if (children) {
-        while (children) {
-            if (children->type == XML_ELEMENT_NODE) {
-                ++(*count);
-            }
-            children = children->next;
-        }
-    }
-
-    return 0;
-}
-
-static rc_t KNodeNamelistCount(const s_KNodeNamelist *self,
-    uint32_t *count)
-{
-    if (!count) {
-        return RC ( rcXML, rcNamelist, rcListing, rcParam, rcNull );
-    }
-
-    return s_LibXmlCount(count, self->children, self->properties);
-}
-
-static rc_t s_LibXmlGetNode(const struct _xmlNode** result,
-    uint32_t idx,
-    const struct _xmlNode* children)
-{
-    uint32_t count = 0;
-    while (children) {
-        if (children->type == XML_ELEMENT_NODE) {
-            if (count == idx) {
-                *result = children;
-                return 0;
-            }
-            ++count;
-        }
-        children = children->next;
-    }
-    return RC ( rcXML, rcNode, rcReading, rcIndex, rcNotFound );
-}
-
-/* TODO:
-quick and dirty version: bad style and code copying: has to be refactored */
-rc_t KXMLNodeGetNodeRead ( const KXMLNode *self,
-    const KXMLNode **result,
-    uint32_t idx )
-{
-    if (!self)
-    {   return RC ( rcXML, rcNode, rcReading, rcSelf, rcNull ); }
-    if (!result)
-    {   return RC ( rcXML, rcNode, rcReading, rcParam, rcNull ); }
-
-    *result = 0;
-
-    {
-        uint32_t count = 0;
-        rc_t rc = KXMLNodeCountChildNodes(self, &count);
-        if (rc)
-        {   return rc; }
-        if (idx >= count)
-        {   return RC ( rcXML, rcNode, rcCreating, rcIndex, rcInvalid ); }
-
-        {
-            const struct _xmlNode *resultChildren = 0;
-            const struct _xmlNode *children = self->children;
-            if (children) {
-                children = children->children;
-                assert(children);
-            }
-            else {
-                if (self && self->parent && self->parent->xpathObj) {
-                    const xmlNodeSetPtr nodesetval
-                        = self->parent->xpathObj->nodesetval;
-                    if (nodesetval) {
-                        if ((nodesetval->nodeNr > 0)
-                            && nodesetval->nodeTab)
-                        {
-                            if (nodesetval->nodeNr <= self->idx) {
-                                return RC ( rcXML, rcNode, rcCreating,
-                                    rcSelf, rcCorrupt );
-                            }
-                            if (nodesetval->nodeTab[self->idx]) {
-                                children
-                                    = nodesetval->nodeTab[self->idx]->children;
-                            /*parent node for our requested parent->child[idx]*/
-                                assert(children);
-                            }
-                            else {
-                                return RC ( rcXML, rcNode, rcCreating,
-                                    rcSelf, rcCorrupt );
-                            }
-                        }
-                        else {
-                            return RC ( rcXML, rcNode, rcCreating,
-                                rcSelf, rcCorrupt );
-                        }
-                    } else {
-                        return RC(rcXML, rcNode, rcCreating, rcSelf, rcCorrupt);
-                    }
-                } else {
-                    return RC ( rcXML, rcNode, rcCreating, rcSelf, rcCorrupt );
-                }
-            }
-            rc = s_LibXmlGetNode(&resultChildren, idx, children);
-            if (rc)
-            {   return rc; }
-            rc = s_KXMLNode_cTor
-                (self->parent, result, 0, resultChildren, self->path);
-            return rc;
-        }
-    }
-}
-
-static rc_t KNodeNamelistGet(const s_KNodeNamelist *self,
-    uint32_t idx,
-    const char **name)
-{
-    uint32_t count = 0;
-    if (self->properties) {
-        struct _xmlAttr* properties = self->properties;
-        while (properties) {
-            if (count == idx) {
-                *name = (const char*)properties->name;
-                return 0;
-            }
-            ++count;
-            properties = properties->next;
-        }
-    }
-    else if (self->children) {
-        const struct _xmlNode *result = 0;
-        rc_t rc = s_LibXmlGetNode(&result, idx, self->children);
-        if (rc)
-        { return rc; }
-        *name = (const char*)result->name;
-        return 0;
-    }
-    return RC ( rcXML, rcNode, rcReading, rcIndex, rcNotFound );
-}
-
-static KNamelist_vt_v1 vtKNodeNamelist = {
-    /* version 1.0 */
-    1, 0,
-
-    /* start minor version 0 methods */
-    KNodeNamelistDestroy,
-    KNodeNamelistCount,
-    KNodeNamelistGet
-    /* end minor version 0 methods */
-};
-
-enum EKNodeNamelistType {
-    eAttr,
-    eNode
-};
-
-/** KAttrNamelist factory method */
-static int s_KXMLNode_createKNodeNamelist(const KXMLNode *self,
-    const KNamelist **list,
-    uint32_t type)
-{
-    /*TODO it seems
-    that the case when (KXMLNode::children != NULL) is not implemented*/
-    rc_t status = 0;
-    *list = 0;
-    if (self && self->parent && self->parent->xpathObj) {
-        s_KNodeNamelist* obj
-            = (s_KNodeNamelist*) malloc(sizeof(s_KNodeNamelist));
-        if (!obj) {
-            return RC ( rcXML, rcNamelist, rcCreating, rcMemory, rcExhausted );
-        }
-        status
-            = KNamelistInit(&obj->dad, (const KNamelist_vt*) &vtKNodeNamelist);
-        if (status != 0) {
-            free(obj);
-            return status;
-        }
-        obj->properties = 0;
-        obj->children = 0;
-        *list = &obj->dad;
-        if( self->children ) {
-            switch (type) {
-                case eAttr:
-                    obj->properties = self->children->properties;
-                    break;
-                case eNode:
-                    obj->children = self->children->children;
-                    break;
-                default:
-                    assert(0);
-                    break;
-            }
-        } else {
-            const xmlNodeSetPtr nodesetval = self->parent->xpathObj->nodesetval;
-            if (nodesetval) {
-                if ((nodesetval->nodeNr > 0) && nodesetval->nodeTab) {
-                    if (nodesetval->nodeNr <= self->idx) {
-                        free(obj);
-                        *list = 0;
-                        return RC
-                            (rcXML, rcNamelist, rcCreating, rcSelf, rcCorrupt);
-                    }
-                    if (nodesetval->nodeTab[self->idx]) {
-                        switch (type) {
-                            case eAttr:
-                                obj->properties =
-                                    nodesetval->nodeTab[self->idx]->properties;
-                                break;
-                            case eNode:
-                                obj->children =
-                                    nodesetval->nodeTab[self->idx]->children;
-                                break;
-                            default:
-                                assert(0);
-                                break;
-                        }
-                    }
-                }
-            }
-        }
-        status = 0;
-    }
-    else {
-        status = RC ( rcXML, rcNamelist, rcCreating, rcSelf, rcCorrupt );
-    }
-    return status;
-}
-rc_t KXMLNodeListAttr(const KXMLNode *self,
-    const KNamelist **names)
-{
-    return s_KXMLNode_createKNodeNamelist(self, names, eAttr);
-}
-
-rc_t KXMLNodeListChild(const KXMLNode *self,
-    const KNamelist **names)
-{
-    return s_KXMLNode_createKNodeNamelist(self, names, eNode);
-}
-
-rc_t KXMLNodeCountChildNodes(const KXMLNode *self,
-    uint32_t *count)
-{
-    if (!self)
-    {   return RC ( rcXML, rcNode, rcListing, rcSelf, rcNull ); }
-    if (!count)
-    {   return RC ( rcXML, rcNode, rcListing, rcParam, rcNull ); }
-    *count = 0;
-    if (self && self->parent && self->parent->xpathObj) {
-        const xmlNodeSetPtr nodesetval = self->parent->xpathObj->nodesetval;
-        if (nodesetval) {
-            if ((nodesetval->nodeNr > 0) && nodesetval->nodeTab) {
-                if (nodesetval->nodeNr <= self->idx) {
-                    return RC(rcXML, rcNamelist, rcCreating, rcSelf, rcCorrupt);
-                }
-                if (nodesetval->nodeTab[self->idx]) {
-                    if (!self->children) {
-                        return s_LibXmlCount(
-                            count, nodesetval->nodeTab[self->idx]->children, 0);
-                    } else { 
-                        /*assert(0); // not implemented*/
-                        if (!self->children->children)
-        /* 'self->children'
-         is a node that should contain its children in self->children->children.
-         If (self->children->children == NULL) then the node has no child. */
-                        {   return 0; }
-                        else {
-                            return s_LibXmlCount
-                                (count, self->children->children, 0);
-                        }
-                    }
-                }
-            }
-        }
-    }
-    return RC ( rcXML, rcNamelist, rcCreating, rcSelf, rcCorrupt );
-}
-
-/* GetFirstChildNodeRead
- *  Returns the first(with index 0) sub-node of self using path.
- *  Is equivalent to:
- *          KXMLNodeOpenNodesetRead(self, &nc, path, ...);
- *          KXMLNodesetGetNodeRead(ns, node, 0);
- */
-rc_t KXMLNodeVGetFirstChildNodeRead ( const KXMLNode *self,
-    const KXMLNode **node, const char *path, va_list args )
-{
-    rc_t rc = 0;
-
-    struct KXMLNodeset const *ns = NULL;
-
-    if (node == NULL) {
-        return RC(rcXML, rcNode, rcReading, rcParam, rcNull);
-    }
-
-    *node = NULL;
-
-    rc = KXMLNodeVOpenNodesetRead(self, &ns, path, args);
-
-    if (rc == 0) {
-        rc = KXMLNodesetGetNodeRead(ns, node, 0);
-        KXMLNodesetRelease(ns);
-    }
-
-    return rc;
-}
-
-rc_t KXMLNodeGetFirstChildNodeRead ( const KXMLNode *self,
-    const KXMLNode **node, const char *path, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start(args, path);
-    rc = KXMLNodeVGetFirstChildNodeRead(self, node, path, args);
-    va_end(args);
-
-    return rc;
-}
-
-/* EOF */
diff --git a/libs/kxml/xtoc-parsexml.c b/libs/kxml/xtoc-parsexml.c
deleted file mode 100644
index b2093d2..0000000
--- a/libs/kxml/xtoc-parsexml.c
+++ /dev/null
@@ -1,576 +0,0 @@
-/*******************************************************************************
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * =============================================================================
- */
-
-#include "xtoc-priv.h" /* XTocParseXml */
-
-#include <kxml/xml.h> /* KXMLNode */
-/* #include <klib/log.h> LOGERR */
-#include <klib/debug.h> /* DBGMSG */
-#include <klib/printf.h>
-#include <klib/out.h>
-#include <klib/rc.h> /* RC */
-
-#include "os-native.h"
-
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdio.h> /* printf */
-#include <stdlib.h> /* free */
-#include <string.h> /* memset */
-#include <time.h>      /* timegm */
-#include <os-native.h> /* timegm */
-
-typedef struct KFile KFile;
-
-/*#define DISP_RC(rc, msg) (void) ( (rc == 0) ? 0 : LOGERR(klogInt, rc, msg) )*/
-#define DISP_RC(rc, msg) (void) ( 0 )
-
-/* copy-paste from libs/kfs/md5.c */
-
-static
-int hex_to_int ( char hex )
-{
-    int i = hex - '0';
-    if ( hex > '9' )
-    {
-        if ( hex < 'a' )
-            i = hex - 'A' + 10;
-        else
-            i = hex - 'a' + 10;
-
-        if ( i > 15 )
-            return -1;
-    }
-    return i;
-}
-
-static
-rc_t MD5SumExtract(const char* str, uint8_t digest[16])
-{
-    rc_t rc = 0;
-
-    int i = 0;
-    /* parse checksum */
-    for ( i = 0; i < 16; ++ i )
-    {
-        int l, u = hex_to_int ( str [ i + i + 0 ] );
-        l = hex_to_int ( str [ i + i + 1 ] );
-        if ( u < 0 || l < 0 )
-        {
-            rc = RC ( rcFS, rcXmlDoc, rcReading, rcFormat, rcInvalid );
-            break;
-        }
-
-        digest [ i ] = ( uint8_t ) ( ( u << 4 ) | l );
-    }
-
-    return rc;
-}
-
-typedef enum NodeType {
-     eUndefined
-    ,eROOT
-    ,eArchive
-    ,eContainer
-    ,eDirectory
-    ,eFile
-    ,eSymlink
-} NodeType;
-typedef struct NodeData {
-    const char* nodeName;
-
-/* need to free */
-    char* nodeValue;
-
-/* attributes */
-    char* id;
-    char* path;
-    char* name;
-    char* mtime;
-    char* filetype;
-    char* md5;
-    char* crc32;
-    char* size;
-    char* offset;
-
-/* parsed node information */
-    NodeType nodeType;
-    uint8_t digest[16];
-    uint64_t iSize;
-    uint64_t iOffset;
-    KTime_t tMtime;
-} NodeData;
-
-static
-NodeType GetNodeType(const char* nodeName)
-{
-    NodeType t = eUndefined;
-
-    if (nodeName == NULL) {
-        t = eUndefined;
-    }
-    else if (!strcmp(nodeName, "archive")) {
-        t = eArchive;
-    }
-    else if (!strcmp(nodeName, "container")) {
-        t = eContainer;
-    }
-    else if (!strcmp(nodeName, "directory")) {
-        t = eDirectory;
-    }
-    else if (!strcmp(nodeName, "file")) {
-        t = eFile;
-    }
-    else if (!strcmp(nodeName, "symlink")) {
-        t = eSymlink;
-    }
-    else if (strstr(nodeName, "ROOT")) {
-        t = eROOT;
-    }
-
-    return t;
-}
-
-#define DEBUG_PRINT false /* true false */
-
-/* TODO: check possible errors */
-/* Reverse to KTimePrint for tools/copycat/cctree-dump.c */
-static
-rc_t CC StrToKTime(const char* str, KTime_t* t)
-{
-    rc_t rc = 0;
-
-    assert(t);
-
-    if (str) {
-        int y, m, d, hr, mn, sc;
-        struct tm gmt;
-        memset(&gmt, 0, sizeof gmt);
-        sscanf(str, "%04d-%02d-%02dT%02d:%02d:%02dZ",
-                                &y, &m, &d, &hr, &mn, &sc);
-        gmt.tm_year = y - 1900;
-        gmt.tm_mon  = m - 1;
-        gmt.tm_mday = d;
-        gmt.tm_hour = hr;
-        gmt.tm_min  = mn;
-        gmt.tm_sec  = sc;
-        *t = timegm(&gmt);
-
-        if (DEBUG_PRINT) {
-            time_t t2 = ( time_t ) * t;
-            size_t len;
-            char buffer [ 64 ];
-
-            struct tm gmt;
-#if SUN
-	    gmt = * gmtime ( & t2 );
-#else
-            gmtime_r ( & t2, & gmt );
-#endif
-            rc = string_printf ( buffer, sizeof buffer, & len
-                , "%04d-%02d-%02dT%02d:%02d:%02dZ"
-                , gmt . tm_year + 1900
-                , gmt . tm_mon + 1
-                , gmt . tm_mday
-                , gmt . tm_hour
-                , gmt . tm_min
-                , gmt . tm_sec
-            );
-            
-            OUTMSG((">> %s\n", str));
-            OUTMSG(("<< %s\n", buffer));
-        }
-    }
-
-    return rc;
-}
-
-#define READ_ATTR(NODE, V) \
-    if (rc == 0) { \
-        rc = KXMLNodeReadAttrCStr(NODE, #V, &data->V, NULL); \
-        if (rc != 0) { \
-            if (GetRCState(rc) == rcNotFound) \
-                rc = 0; \
-        } \
-    }
-/*          else if (data->nodeName) \
-                PLOGERR(klogErr, (klogErr, rc, \
-                    "while calling KXMLNodeReadAttrCStr($(name)/@$(attr))", \
-                    "name=%s,attr=%s", data->nodeName, #V)); */
-
-#define PRN_ATTR(NM, V) \
-    if (DEBUG_PRINT && data->V) OUTMSG(("%s=\"%s\" ", NM, data->V))
-
-#define GET_ATTR(NODE, V) READ_ATTR(NODE, V); PRN_ATTR(#V, V)
-
-static rc_t CC NodeDataReadAttribs(NodeData* data, const KXMLNode* node,
-    const char* parentName, uint32_t idx)
-{
-    rc_t rc = 0;
-
-    assert(node && parentName && data);
-
-    if (DEBUG_PRINT) OUTMSG(("<%s ", data->nodeName));
-
-    GET_ATTR(node, id);
-    GET_ATTR(node, path);
-    GET_ATTR(node, name);
-    GET_ATTR(node, mtime);
-    GET_ATTR(node, filetype);
-    GET_ATTR(node, md5);
-    GET_ATTR(node, crc32);
-
-    READ_ATTR(node, size);
-    READ_ATTR(node, offset);
-
-    if (rc == 0)
-    {
-/* TODO: what size is negative no error is detected */
-        char * attr = "size";
-        rc = KXMLNodeReadAttrAsU64(node, attr, &data->iSize);
-        if (rc != 0) {
-            if (GetRCState(rc) == rcNotFound) {
-                rc = 0;
-            }
-        }
-
-        attr = "offset";
-        rc = KXMLNodeReadAttrAsU64(node, attr, &data->iOffset);
-        if (rc != 0) {
-            if (GetRCState(rc) == rcNotFound) {
-                rc = 0;
-            }
-        }
-/*          else if (data->nodeName) {
-                PLOGERR(klogErr, (klogErr, rc,
-                    "while calling KXMLNodeReadAttrAsU64($(name)/@$(attr))",
-                    "name=%s,attr=%s", data->nodeName, attr));
-            }*/
-        if (DEBUG_PRINT) 
-        {
-            OUTMSG(("%s=\"%lu\" ", attr, data->iSize));
-            OUTMSG(("%s=\"%lu\" ", attr, data->iOffset));
-        }
-    }
-
-    if (DEBUG_PRINT) OUTMSG((">"));
-    if (DEBUG_PRINT && data->nodeValue) OUTMSG(("%s", data->nodeValue));
-    if (DEBUG_PRINT) OUTMSG(("</%s>\n", data->nodeName));
-
-    return rc;
-}
-
-#define FREE(V) free(data->V); data->V = NULL
-
-static
-rc_t CC NodeDataDestroy(NodeData* data)
-{
-    assert(data);
-
-    FREE(nodeValue);
-    FREE(id);
-    FREE(path);
-    FREE(name);
-    FREE(mtime);
-    FREE(filetype);
-    FREE(md5);
-    FREE(crc32);
-    FREE(size);
-    FREE(offset);
-
-    return 0;
-}
-
-static rc_t CC NodeDataInit(NodeData* data, const KXMLNode* node,
-    const char* parentName, uint32_t idx)
-{
-    rc_t rc = 0;
-
-    assert(node && parentName && data);
-
-    memset(data, 0, sizeof *data);
-
-    rc = KXMLNodeGetName(node, &data->nodeName);
-/*  if (rc != 0) {
-        PLOGERR(klogErr, (klogErr, rc,
-            "while calling KXMLNodeGetName($(parent)[$(i)]",
-            "parent=%s,i=%d", parentName, idx));
-    }*/
-
-    if (rc == 0
-        && data->nodeName && !strcmp(data->nodeName, "symlink"))
-    {
-        rc = KXMLNodeReadCStr(node, &data->nodeValue, NULL);
-/*      if (rc != 0) {
-            PLOGERR(klogErr, (klogErr, rc,
-                "while calling KXMLNodeReadCStr($(name))",
-                "name=%s", data->nodeName));
-        }*/
-    }
-
-    if (rc == 0) {
-        rc = NodeDataReadAttribs(data, node, parentName, idx);
-    }
-
-    if (rc == 0) {
-        data->nodeType = GetNodeType(data->nodeName);
-
-        if (data->md5) {
-            if (strlen(data->md5) != 32) {
-                rc = RC(rcFS, rcXmlDoc, rcReading, rcFormat, rcInvalid);
-/*              PLOGERR(klogErr, (klogErr, rc,
-                    "md5sum '$(md5)'", "md5=%s", data->md5));*/
-            }
-            else {
-                rc = MD5SumExtract(data->md5, data->digest);
-            }
-        }
-    }
-
-    if (rc == 0) {
-        rc = StrToKTime(data->mtime, &data->tMtime);
-    }
-
-    return rc;
-}
-
-static
-rc_t CC NodeDataAddToXToc(NodeData* data,
-                          struct XTocEntry* xSelf, struct XTocEntry* xContainer,
-                          struct XTocEntry** xEntry, bool *isContainer)
-{
-    rc_t rc = 0;
-
-    assert(data && xEntry && isContainer);
-
-    *isContainer = false;
-
-    switch (data->nodeType) {
-        case eUndefined:
-            rc = RC(rcFS, rcTocEntry, rcInflating, rcData, rcInvalid);
-/*          LOGERR(klogErr, rc, "undefined node type in DataXAdd");*/
-            break;
-        case eROOT: /* ignore root node */
-            *xEntry = xSelf;
-            break;
-        case eArchive:
-            *isContainer = true;
-            rc = XTocTreeAddArchive(xSelf, xEntry, xContainer,
-                data->name, data->tMtime, data->id, 
-                data->filetype, data->iSize, data->iOffset, data->digest);
-            break;
-        case eContainer:
-            *isContainer = true;
-            rc = XTocTreeAddContainer(xSelf, xEntry, xContainer,
-                data->name, data->tMtime, data->id, 
-                data->filetype, data->iSize, data->iOffset, data->digest);
-            break;
-        case eDirectory:
-            rc = XTocTreeAddDir(xSelf, xEntry, xContainer,
-                data->name, data->tMtime);
-            break;
-        case eFile:
-            rc = XTocTreeAddFile(xSelf, xEntry, xContainer,
-                data->name, data->tMtime,  data->id, 
-                data->filetype, data->iSize, data->iOffset, data->digest);
-            break;
-        case eSymlink:
-            rc = XTocTreeAddSymlink(xSelf, xEntry, xContainer,
-                data->name, data->tMtime, data->nodeValue);
-            break;
-    }
-
-    return rc;
-}
-
-static
-rc_t ProcessNode(const KXMLNode* node,
-    const char* parentName, uint32_t idx,
-    struct XTocEntry* xSelf, struct XTocEntry* xContainer)
-{
-    rc_t rc = 0;
-    uint32_t count = 0;
-    uint32_t i = 0;
-    struct XTocEntry* xEntry = NULL;
-    bool isContainer = false;
-    NodeData data;
-
-    assert(node && parentName);
-
-    if (rc == 0) {
-        rc = NodeDataInit(&data, node, parentName, idx);
-    }
-
-    if (rc == 0) {
-        DBGMSG(DBG_APP,DBG_COND_1,
-            ("%s[%i] = %s\n", parentName, idx, data.nodeName));
-        rc = NodeDataAddToXToc(&data, xSelf, xContainer, &xEntry, &isContainer);
-        if (isContainer) {
-            xContainer = xEntry;
-        }
-    }
-
-    if (rc == 0) {
-        rc = KXMLNodeCountChildNodes(node, &count);
-        if (rc != 0) {
-/*          PLOGERR(klogErr, (klogErr, rc,
-                "while calling KXMLNodeCountChildNodes($(parent)[$(i)])",
-                "parent=%s,i=%d", parentName, idx));*/
-        }
-        else {
-/*          DBGMSG(DBG_APP,DBG_COND_1,
-                ("KXMLNodeCountChildNodes(%s) = %i\n", data.nodeName, count));*/
-        }
-    }
-
-    for (i = 0; i < count && rc == 0; ++i) {
-        const KXMLNode* child = NULL;
-
-        rc = KXMLNodeGetNodeRead(node, &child, i);
-        if (rc != 0) {
-/*          PLOGERR(klogErr, (klogErr, rc,
-                "while calling KXMLNodeCountChildNodes($(parent)[$(i)][$(j)]",
-                "parent=%s,i=%d,j=%d", parentName, idx, i));*/
-        }
-        else {
-/*          DBGMSG(DBG_APP,DBG_COND_1,
-                ("KXMLNodeGetNodeRead(%s[%i])\n", data.nodeName, idx, i));*/
-            ProcessNode(child, data.nodeName, i, xEntry, xContainer);
-        }
-
-        {
-            rc_t rc2 = KXMLNodeRelease(child);
-            if (rc == 0)
-            {   rc = rc2; }
-            child = NULL;
-        }
-    }
-
-    NodeDataDestroy(&data);
-
-    return rc;
-}
-
-rc_t XTocParseXml(struct XTocEntry* xRoot, const KFile* file)
-{
-    rc_t rc = 0;
-
-    const KXMLMgr* mgr = NULL;
-    const KXMLDoc* doc = NULL;
-    const KXMLNodeset* root = NULL;
-    const char rootName[] = "/ROOT";
-
-/**** INIT ****/
-
-    if (rc == 0) {
-        rc = KXMLMgrMakeRead(&mgr);
-        DISP_RC(rc, "while calling KXMLMgrMakeRead");
-    }
-
-    if (rc == 0) {
-        KXMLMgrMakeDocRead(mgr, &doc, file);
-        DISP_RC(rc, "while calling KXMLMgrMakeDocRead");
-    }
-
-    if (rc == 0) {
-        rc = KXMLDocOpenNodesetRead(doc, &root, rootName);
-        if (rc != 0) {
-/*          PLOGERR(klogErr, (klogErr, rc,
-                "while calling KXMLDocOpenNodesetRead $(name)",
-                "name=%s", rootName));*/
-        }
-    }
-
-    if (rc == 0) {
-        uint32_t count = 0;
-        rc = KXMLNodesetCount(root, &count);
-        if (rc != 0) {
-/*          PLOGERR(klogErr, (klogErr, rc,
-                "while calling KXMLNodesetCount($(name))", "name=%s",
-                rootName));*/
-        }
-        else if (count != 1) {
-            rc = RC(rcFS, rcXmlDoc, rcReading,
-                rcTag, count ? rcExcessive : rcNotFound);
-/*          PLOGERR(klogErr, (klogErr, rc, "$(name)", "name=%s", rootName));*/
-        }
-        else if (false) {
-            DBGMSG(DBG_APP,DBG_COND_1,
-                ("KXMLNodesetCount(%s)=%d\n", rootName, count));
-        }
-    }
-
-/**** READ AND PROCESS THE ROOT XML NODE ****/
-
-    if (rc == 0) {
-        uint32_t i = 0;
-        const KXMLNode *node = NULL;
-
-        rc = KXMLNodesetGetNodeRead(root, &node, i);
-        if (rc == 0) {
-            ProcessNode(node, rootName, i, xRoot, xRoot);
-        }
-/*      else {
-*            PLOGERR(klogErr, (klogErr, rc,
-                "while calling KXMLNodesetGetNodeRead($(name), $(i))",
-                "name=%s,i=%d", rootName, i));
-        }*/
-
-        {
-            rc_t rc2 = KXMLNodeRelease(node);
-            if (rc == 0)
-            {   rc = rc2; }
-            node = NULL;
-        }
-    }
-
-/**** RELEASE ****/
-
-    {
-        rc_t rc2 = KXMLDocRelease(doc);
-        if (rc == 0)
-        {   rc = rc2; }
-        doc = NULL;
-    }
-
-    {
-        rc_t rc2 = KXMLNodesetRelease(root);
-        if (rc == 0)
-        {   rc = rc2; }
-        root = NULL;
-    }
-
-    {
-        rc_t rc2 = KXMLMgrRelease(mgr);
-        if (rc == 0)
-        {   rc = rc2; }
-        mgr = NULL;
-    }
-
-    return rc;
-}
-
-/************************************ EOF ****************** ******************/
diff --git a/libs/kxml/xtoc-priv.h b/libs/kxml/xtoc-priv.h
deleted file mode 100644
index 688ec88..0000000
--- a/libs/kxml/xtoc-priv.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_kfs_xtoc_priv_h_
-#define _h_kfs_xtoc_priv_h_
-
-#include <klib/defs.h>
-#include <klib/text.h>
-#include <klib/container.h>
-#include <stdarg.h>
-
-struct KFile;
-struct KDirectory;
-struct XToc;
-struct XTocEntry;
-struct XTocEntryDir;
-struct XTocEntryFile;
-struct XTocListing;
-
-/* ======================================================================
- * shared path routines that really should be their own class
- */
-
-rc_t XTocPathMakePath (char ** ppath, bool canon, const char * path,
-                       va_list args);
-
-/*
- * In parsing the copycat XML we add nodes stating at the root XTocEntry
- * of the XToc.
- *
- * For each node in the DOM add one entry in the XTocEntry for the containing
- * container/archive/directory
- *
- * use the id="xxx" attribute to create a symbolic link in the root.
- * we'll come up with a safe version of the name such as "id:1" using a name
- * that won't exist in the regular filename space.
- *
- *Parameters:
- *   self:      Use the inner most archive, directory, or container for self.
- *              Use the root for the entries inside of root
- *
- *   entry:     Use a local XTocEntry pointer for each new node.  Some will 
- *              remembered for a while and some won't.  It depends upon whether
- *              it has subnodes.  Do not free or release these pointers.  Just
- *              stop using them as they are not referenced counted and freed only
- *              by the KToc itself when it is Whacked.
- *
- *   container: Use the most recent containing archive or container XTocEntry for
- *              each new node.  Use root for those outside the outer most
- *              container or archive.  Do not use directory nodes for this.
- *
- *   name:      comes directly form the XML as is
- *
- *   mtime:     comes directly form the XML converted to 64 bit unsigned
- *
- *   filetype:  comes directly form the XML as is
- *
- *   md5:       comes directly form the XML converted from hex string to byte string
- *
- *   size:      comes directly form the XML converty to 64 bit unsigned
- *
- * For each directory node in the XML use XTocTreeAddDir()
- * For each archive node in the XML use XTocTreeAddArchive()
- * For each container node in the XML use XTocTreeAddContainer()
- * For each file node in the XML use XTocTreeAddFile()
- * For each symlink node in the XML use XTocTreeAddSymLink()
- *
- * For each file, container, or archive use XTocTreeAddSymLink()
- *  use the original root as self, a local pointer, name, mtime from the target and
- *  path of the file, archive or container from the XML as target
- *
- * All of these are local and in Windows build they do not get the CC needed for inter-library calls.
- */
-rc_t XTocParseXml (struct XTocEntry * root, const struct KFile * xml);
-
-rc_t XTocTreeAddFile      (struct XTocEntry * self, struct XTocEntry ** pentry,
-                           struct XTocEntry * container, const char * name,
-                           KTime_t mtime, const char * id, const char * filetype, 
-                           uint64_t size, uint64_t offset, uint8_t md5 [16]);
-
-rc_t XTocTreeAddContainer (struct XTocEntry * self, struct XTocEntry ** pentry,
-                           struct XTocEntry * container, const char * name,
-                           KTime_t mtime, const char * id, const char * filetype, 
-                           uint64_t size, uint64_t offset, uint8_t md5 [16]);
-
-rc_t XTocTreeAddArchive (struct XTocEntry * self, struct XTocEntry ** pentry,
-                         struct XTocEntry * container, const char * name,
-                         KTime_t mtime, const char * id, const char * filetype,
-                         uint64_t size, uint64_t offset, uint8_t md5 [16]);
-
-rc_t XTocTreeAddDir       (struct XTocEntry * self, struct XTocEntry ** entry,
-                           struct XTocEntry * container, const char * name,
-                           KTime_t mtime);
-
-rc_t XTocTreeAddSymlink   (struct XTocEntry * self, struct XTocEntry ** entry,
-                           struct XTocEntry * container, const char * name,
-                           KTime_t mtime, const char * target);
-
-
-#endif /* #ifndef _h_kfs_xtoc_priv_h_ */
-/* end of file */
diff --git a/libs/kxml/xtoc.c b/libs/kxml/xtoc.c
deleted file mode 100644
index 0fcfc79..0000000
--- a/libs/kxml/xtoc.c
+++ /dev/null
@@ -1,3464 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfs/extern.h>
-
-#include <kxml/xml.h>
-
-#include <klib/defs.h>
-#include <klib/container.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <klib/refcount.h>
-#include <klib/vector.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/namelist.h>
-
-#include <kfs/file.h>
-#include <kfs/bzip.h>
-#include <kfs/gzip.h>
-#include <kfs/directory.h>
-
-#include <vfs/manager.h>
-#include <vfs/path.h>
-
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-#include <assert.h>
-
-#include <klib/debug.h>
-#define DBGTOC(m)   DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_TOC), m)
-#define DBGENTRY(m) DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_TOC), m)
-#define DBGCACHE(m) DBGMSG (DBG_KFS, DBG_FLAG(DBG_KFS_TOC), m)
-
-#include "xtoc-priv.h"
-
-struct KSysFile;
-
-typedef struct XToc XToc;
-static rc_t XTocRelease (const XToc * self);
-static rc_t XTocAddRef (const XToc * self);
-
-typedef struct XTocListing XTocListing;
-typedef struct XTocEntry XTocEntry;
-typedef struct KXTocDir KXTocDir;
-typedef struct KXTocFile KXTocFile;
-typedef struct XTocCache XTocCache;
-
-
-/* ======================================================================
- * XTocEntry_t
- *   Each node in the XToc tree needs to be one of a limited number of types
- *   these relate to the KPathType for KDirectory but are more limited in
- *   number.  However the file can explicity be treated as a directory if
- *   flagged as such.
- */
-
-typedef uint32_t XTocEntry_t;
-typedef enum XTocEntry_e
-{
-    xtoce_undefined,
-    xtoce_root,
-    xtoce_id,
-    xtoce_file,
-    xtoce_dir,
-    xtoce_link
-} XTocEntry_e;
-
-#define KDIR_IMPL struct KXTocDir
-#define KFILE_IMPL struct KXTocFile
-#include <kfs/impl.h>
-
-
-#define KNAMELIST_IMPL struct XTocListing
-#include <klib/impl.h>
-
-
-/* ======================================================================
- * XTocEntry
- *
- * TBD:  More efficient use of memory might be obtained by converting
- *       the union into space allocated after the main entry
- */
-struct XTocEntry
-{
-    BSTNode     node;           /* book keeping for the tree structure */
-    String	name;           /* leaf name */
-    XTocEntry * parent;         /* directory containing this entry */
-    XTocEntry * container;      /* compressed file or archive holding this */
-    XTocEntry * root;           /* base entry of the TOC that is '/' */
-    XTocCache * cache;          /* if opened this will be non-NULL */
-    KTime_t     mtime;          /* object modified time/date from the XML */
-    BSTree      tree;           /* objects below this (inverse of parent */
-    XTocEntry_t type;           /* XTocEntry_e */
-    union utype
-    {
-        struct /* idtype - name conflict on Solaris */
-        {
-            XTocEntry * target;
-        } id;
-
-        struct dirtype
-        {
-            int ignored;        /* currently nothing is here */
-        } dir;
-
-        struct filetype
-        {
-            String   filetype;  /* string from copycat XML describing file */
-            uint64_t size;      /* size of file within archive or decompressed */
-            uint64_t offset;    /* offset with in containing file */
-            uint8_t  md5 [16];  /* md5 sum digest */
-            bool has_tree;      /* tree is meaningfull if not false: see next two */
-            bool archive;       /* set if this is an archive, has_tree also set */
-            bool container;     /* set if this is acompressed file, has_tree also set */
-        } file;
-
-        struct linktype
-        {
-            String target;      /* path of the symbolic link */
-        } link;
-    } u;
-};
-
-#if _DEBUGGING
-#define DBG_XTocEntry(p)                                                \
-    {                                                                   \
-        DBGENTRY(("XTocEntry: %p\n", p));                               \
-        if (p)                                                          \
-        {                                                               \
-            DBGENTRY(("    name:      %S\n", &(p)->name));              \
-            DBGENTRY(("    parent:    %p\n", (p)->parent));             \
-            DBGENTRY(("    container: %p\n", (p)->container));          \
-            DBGENTRY(("    root:      %p\n", (p)->root));               \
-            DBGENTRY(("    cache:     %p\n", (p)->cache));              \
-            DBGENTRY(("    tree:      %p\n", (p)->tree));               \
-            DBGENTRY(("    type:      %u\n", (p)->type));               \
-            if ((p)->type == xtoce_id)                                  \
-                DBGENTRY(("    target:      %p\n", &(p)->u.id.target)); \
-            else if ((p)->type == xtoce_link)                          \
-                DBGENTRY(("    target:      %S\n", &(p)->u.link.target)); \
-            else if((p)->type == xtoce_file)                            \
-            {                                                           \
-                DBGENTRY(("    filetype:     %S\n", &(p)->u.file.filetype)); \
-                DBGENTRY(("    size:         %lu\n", (p)->u.file.size)); \
-                DBGENTRY(("    offset:       %lu\n", (p)->u.file.offset)); \
-                DBGENTRY(("    base_tree:    %u\n", (p)->u.file.has_tree)); \
-                DBGENTRY(("    archive:      %u\n", (p)->u.file.archive)); \
-                DBGENTRY(("    container:    %u\n", (p)->u.file.container));  }}}
-#else
-#define DBG_XTocEntry(p)
-#endif
-
-/* function for BSTreeInsert or BSTreeInsertUnique */
-static
-int64_t CC XTocEntrySort (const BSTNode * item, const BSTNode * n)
-{
-    return StringCompare (&((const XTocEntry*)item)->name,
-                          &((const XTocEntry*)n)->name);
-}
-
-/* function for BSTreeFind */
-static
-int64_t CC XTocEntryCmpString (const void * item, const BSTNode * n)
-{
-    return (int)StringCompare ((const String *)item, 
-                               &((const XTocEntry*)n)->name);
-}
-
-/* forward as we have a loop in calls */
-static
-void XTocTreeWhack (BSTNode * item, void * data);
-
-/*
- * XTocEntryDestroy
- *  object destructor
- *  It recursively destroys entries in its tree
- */
-static
-void XTocEntryDestroy (XTocEntry * self)
-{
-    if (self)
-    {
-        switch (self->type)
-        {
-        case xtoce_root:
-        case xtoce_dir:
-        case xtoce_file:
-            /* delete an entries below this one */
-            BSTreeWhack (&self->tree, XTocTreeWhack, NULL);
-            break;
-        case xtoce_link:
-        case xtoce_id:
-        default:
-            break;
-        }
-        free (self);
-    }
-}
-
-/* recursive destructor call for BSTreeWhack */
-static
-void XTocTreeWhack (BSTNode * item, void * data)
-{
-    XTocEntryDestroy ((XTocEntry*)item);
-}
-
-
-rc_t XTocEntryResolvePath (const XTocEntry * self, const char * path_, bool follow_link,
-                           XTocEntry ** pnode)
-{
-    rc_t rc = 0;
-    const char * path;
-    const char * limit;
-    XTocEntry * node;
-    size_t size;
-
-    assert (self);
-    assert (path_);
-    assert (pnode);
-#if 0
-    DBGENTRY (("%s: resolve %s from %p\n", __func__, path_, self));
-#endif
-    node = (XTocEntry *)self;
-#if 0
-    DBGENTRY(("%s: node starts at %s\n", __func__, node ? node->name.addr : "NULL"));
-#endif
-    path = path_;
-#if 0
-    /* this was causing a seg fault for some reason */
-    limit = path + string_size (path);
-#else
-    limit = path + string_measure(path, &size);
-#endif
-
-    do
-    {
-        String s;
-        char * slash;
-        size_t z;
-        BSTree * t;
-#if 0
-        DBGENTRY (("%s: path %s size %lu %p - %p = %lu\n", __func__, path, string_size(path), limit, path, limit-path));
-#endif
-        while (*path == '/')
-                ++path;
-
-        z = limit - path;
-        if (z == 0)
-            break;
-#if 0
-        DBGENTRY (("%s: path %s z %lu %p - %p = %lu\n", __func__, path, z, limit, path, limit-path));
-        DBG_XTocEntry(node);
-#endif
-        switch (node->type)
-        {
-        case xtoce_link:
-        {
-            XTocEntry * nnode;
-            rc = XTocEntryResolvePath (node, node->u.link.target.addr,
-                                       follow_link, &nnode);
-#if 0
-            DBGENTRY(("%s: node becomes %s\n", __func__, node ? node->name.addr : "NULL"));
-#endif
-            if (rc)
-                return rc;
-
-            node = nnode;
-            continue;
-        }
-        case xtoce_id:
-            /* this needed to be a leaf */
-            rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid);
-            LOGERR (klogErr, rc, "bad path resolving path by id in XML FS");
-            return rc;
-        default:
-            return RC (rcFS, rcDirectory, rcResolving, rcPath, rcIncorrect);
-
-        case xtoce_file:
-            if ( ! node->u.file.has_tree)
-            {
-                /* this needed to be a leaf */
-                rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid);
-                LOGERR (klogErr, rc, "bad path resolving path by name in XML FS");
-                return rc;
-            }
-            /* fall through */
-        case xtoce_root:
-        case xtoce_dir:
-            t = &node->tree;
-            break;
-        }
-        slash = string_chr (path, z, '/');
-        if (slash)
-            z = slash - path;
-
-        StringInit (&s, path, z, string_len (path, z));
-#if 0
-        DBGENTRY (("%s: as String %S\n", __func__, &s));
-#endif
-        node = (XTocEntry*)BSTreeFind (t, &s, XTocEntryCmpString);
-#if 0
-        DBGENTRY (("%s: node is now %p\n", __func__, node));
-#endif
-        if (node == NULL)
-            return RC (rcFS, rcDirectory, rcResolving, rcPath, rcNotFound);
-
-        path += StringSize (&s);
-#if 0
-        DBGENTRY (("%s: looping at %s %p %p\n", __func__, path, path, limit-1));
-#endif
-    } while (path < limit-1);
-
-    if (rc == 0)
-    {
-        if(path[0] == '\0')
-        {
-            switch (node->type)
-            {
-            case xtoce_id:
-                node = node->u.id.target;
-                if (node == NULL)
-                    rc = RC (rcFS, rcDirectory, rcResolving, rcLink, rcCorrupt);
-                break;
-            case xtoce_link:
-                if (follow_link)
-                    return XTocEntryResolvePath (node, path, follow_link, pnode);
-            default:
-                break;
-            }
-        }
-        *pnode = node;
-    }
-#if 1
-    DBGENTRY(("%s: %R\n",__func__, rc));
-#endif
-    return rc;
-}
-
-
-KPathType XTocEntryPathType (const XTocEntry * self, const char * path)
-{
-    rc_t rc;
-    KPathType type = 0;
-    XTocEntry * node;
-
-    rc = XTocEntryResolvePath (self, path, false, &node);
-    if ((rc == 0) && (node->type == xtoce_link))
-        type = kptAlias;
-
-    rc = XTocEntryResolvePath (self, path, true, &node);
-    if (rc)
-    {
-        if (GetRCState (rc) == rcNotFound)
-            return type | kptNotFound;
-        return type | kptBadPath;
-    }
-
-    switch (node->type)
-    {
-    default:
-    case xtoce_undefined:
-        return type | kptBadPath;
-
-    case xtoce_root:
-    case xtoce_dir:
-        return type | kptDir;
-
-    case xtoce_file:
-#if 0
-    /* archives and containers are files */
-        return type | kptFile;
-#else
-    /* archives and containers are directories */
-        return type | (node->u.file.has_tree) ? kptDir : kptFile;
-#endif
-        /* not sure how we'd get here */
-    case xtoce_link:
-        return type | kptBadPath;
-    }
-}
-
-
-/* ======================================================================
- * rc_t XTocTree
- *   This set of functions is the API for building up the entries within an 
- *   XToc.
- */
-
-/*
- * XTocEntryMakeInt
- *
- *  This function creates and initializes the common part of the
- *  XTocEntry
- *
- *  extra_alloc is space set aside for string space not initialized
- *              here.  target path in links for example
- */
-static
-rc_t XTocEntryMakeInt (XTocEntry ** pself, const char * name,
-                       XTocEntry * parent, XTocEntry * container,
-                       KTime_t mtime, size_t extra_alloc)
-{
-    XTocEntry * self;
-    char * pc;
-    size_t  z;
-    rc_t rc = 0;
-
-    assert ((container != NULL) || (strcmp(name,"/") == 0));
-    assert (name);
-    assert (pself);
-
-    z = string_size (name) + 1;
-
-    if (z <= 1)
-    {
-        rc = RC (rcFS, rcTocEntry, rcConstructing, rcName, rcTooShort);
-        LOGERR (klogErr, rc, "No name for directory entry in XML TOC");
-        return rc;
-    }
-
-    /* allocate the memory for the entry node.  
-     * size of the node, space for the name and extra space requested
-     * by the caller of this intermediate function
-     */
-    self = malloc (sizeof (*self) + z + extra_alloc);
-    DBGENTRY (("%s: entry %p name %s\n",__func__,self,name));
-    if (self == NULL)
-        rc = RC (rcFS, rcToc, rcConstructing, rcMemory, rcExhausted);
-
-    else
-    {
-        /* copy the name immediately after the common section */
-        pc = (char*)(self+1);
-        string_copy (pc, z, name, z);
-        z --;
-        StringInit (&self->name, pc, z, string_len (pc, z));
-
-        self->container = container;
-        self->parent = parent;
-        self->root = container == NULL ? container : container->root;
-        self->cache = NULL;
-        self->mtime = mtime;
-        BSTreeInit (&self->tree);
-        if (parent)
-            rc = BSTreeInsert (&parent->tree, &self->node, XTocEntrySort);
-        if (rc == 0)
-        {
-            *pself = self;
-            return 0;
-        }
-        XTocEntryDestroy (self);
-    }
-    return rc;
-}
-
-static
-rc_t XTocTreeAddID (XTocEntry * self, const char * name, KTime_t mtime, 
-                    XTocEntry * target)
-{
-    XTocEntry * entry;
-    rc_t rc;
-
-    DBGENTRY(("%s: self %p name %s target %p\n", __func__, self, name, target));
-    rc = XTocEntryMakeInt (&entry, name, self, self, mtime, 0);
-    if (rc == 0)
-    {
-        entry->u.id.target = target;
-        entry->type = xtoce_id;
-        DBG_XTocEntry (entry);
-    }
-    return rc;
-}
-
-
-rc_t XTocTreeAddDir (XTocEntry * self, XTocEntry ** pentry, XTocEntry * container,
-                           const char * name, KTime_t mtime)
-{
-    rc_t rc = XTocEntryMakeInt (pentry, name, self, container, mtime, 0);
-    if (rc == 0)
-    {
-        (*pentry)->type = xtoce_dir;
-        DBG_XTocEntry (*pentry);
-    }
-    return rc;
-}
-
-
-rc_t XTocTreeAddSymlink   (XTocEntry * self, XTocEntry ** pentry, XTocEntry * container,
-                           const char * name, KTime_t mtime, const char * target)
-{
-    XTocEntry * entry;
-    size_t z = string_size (target) + 1;
-    rc_t rc = XTocEntryMakeInt (&entry, name, self, container, mtime, z);
-
-    if (rc == 0)
-    {
-        char * pc = (char *)entry->name.addr + entry->name.size + 1;
-        string_copy (pc, z, target, z);
-        z--;
-        StringInit (&entry->u.link.target, pc, z, string_len (pc, z));
-        entry->type = xtoce_link;
-        DBG_XTocEntry (entry);
-    }
-    *pentry = entry;
-    return rc;
-}
-
-
-rc_t XTocTreeAddFile      (XTocEntry * self, XTocEntry ** pentry,
-                           XTocEntry * container, const char * name,
-                           KTime_t mtime, const char * id,
-                           const char * filetype, uint64_t size,
-                           uint64_t offset, uint8_t md5 [16])
-{
-    XTocEntry * entry;
-    size_t z;
-    rc_t rc;
-
-    DBGENTRY (("%s: name %s id %s filetype %s\n", __func__, name, id, filetype));
-
-    z = string_size (filetype) + 1;
-    rc = XTocEntryMakeInt (&entry, name, self, container, mtime, z);
-    if (rc == 0)
-    {
-        char * pc;
-
-        pc = (char*)entry->name.addr + entry->name.size + 1;
-        string_copy (pc, z, filetype, z);
-        z--;
-
-        StringInit (&entry->u.file.filetype, pc, z, string_len (pc, z));
-        entry->u.file.size = size;
-        entry->u.file.offset = offset;
-        memcpy (entry->u.file.md5, md5, sizeof entry->u.file.md5);
-        entry->u.file.has_tree = false;
-        entry->u.file.archive = false;
-        entry->u.file.container = false;
-        entry->type = xtoce_file;
-
-        DBGENTRY (("%s: entry %p entry->root %p id %s\n",
-                   __func__, entry, id, entry->root));
-        rc = XTocTreeAddID (entry->root, id, mtime, entry);
-        if (rc)
-        {
-            LOGERR (klogErr, rc, "failed to create alias id - continuing");
-            rc = 0;
-        }
-        DBG_XTocEntry (entry);
-    }
-    *pentry = entry;
-    return rc;
-}
-
-
-rc_t XTocTreeAddContainer (XTocEntry * self, XTocEntry ** pentry,
-                           XTocEntry * container, const char * name,
-                           KTime_t mtime, const char * id,
-                           const char * filetype, uint64_t size,
-                           uint64_t offset, uint8_t md5 [16])
-{
-    rc_t rc = XTocTreeAddFile (self, pentry, container, name, mtime, id, 
-                               filetype, size, offset, md5);
-    if (rc == 0)
-    {
-        (*pentry)->u.file.has_tree = true;
-        (*pentry)->u.file.container = true;
-        DBG_XTocEntry ((*pentry));
-    }
-    return rc;
-}
-
-
-rc_t XTocTreeAddArchive (XTocEntry * self, XTocEntry ** pentry,
-                         XTocEntry * container, const char * name,
-                         KTime_t mtime, const char * id,
-                         const char * filetype, uint64_t size,
-                         uint64_t offset, uint8_t md5 [16])
-{
-    rc_t rc = XTocTreeAddFile (self, pentry, container, name, mtime, id, 
-                               filetype, size, offset, md5);
-    if (rc == 0)
-    {
-        (*pentry)->u.file.has_tree = true;
-        (*pentry)->u.file.archive = true;
-        DBG_XTocEntry ((*pentry));
-    }
-    return rc;
-}
-
-
-/* ======================================================================
- * XTocCache
- *
- * When an entry in the TOC is opened as either a file or a directory
- * it is recorded in the tree indexed by path.  The objects in that
- * tree are of tupe XTocCache
- */
-struct XTocCache
-{
-    BSTNode node;
-    KRefcount refcount;
-    String path;
-    XToc * toc;                 /* ref counted keep daddy alive */
-
-    /* these three references are not reference counted */
-    XTocEntry * entry;
-
-    /* these references are back pointers for "re-opens" */
-    const KXTocFile * file;
-    const KXTocDir * dir;
-};
-static const char XTocCacheClassname[] = "XTocCache";
-
-#if _DEBUGGING
-#define DBG_XTocCache(p)                                                \
-    {   DBGCACHE(("XTocCache: %p\n", (p)));                             \
-        if (p) {                                                        \
-            DBGCACHE(("    refcount: %u\n",*(unsigned*)&(p)->refcount)); \
-            DBGCACHE(("    path:     %S\n",&(p)->path));                \
-            DBGCACHE(("    toc:      %p\n",(p)->toc));                  \
-            DBGCACHE(("    entry:    %p\n",(p)->entry));                \
-            DBGCACHE(("    file:     %p\n",(p)->file));                 \
-            DBGCACHE(("    dir:      %p\n",(p)->dir));                  \
-            if ((p)->file) DBG_KXTocDir((p)->file);                     \
-            if ((p)->dir) DBG_KXTocDir((p)->dir); }}
-#else
-#define DBG_XTocCache(p)
-#endif
-
-/* Sort
- *   A sort comparitor suitable for BSTreeInsert/NSTreInsertUnique
- */
-static
-int64_t CC XTocCacheSort (const BSTNode * item, const BSTNode * n)
-{
-    return StringCompare (&((const XTocCache*)item)->path,
-                          &((const XTocCache*)n)->path);
-}
-
-
-/* 
- * Cmp
- *   A sort comparitor suitable for BSTreeFind
- */
-static
-int64_t CC XTocCacheCmp (const void * item, const BSTNode * n)
-{
-    const String * s = item;
-    const XTocCache * node = (const XTocCache *)n;
-    return StringCompare (s, &node->path);
-}
-
-
-/* 
- * Destroy
- */
-static void XTocCacheDestroy (XTocCache * self);
-
-
-/*
- * AddRef
- */
-static
-rc_t XTocCacheAddRef (const XTocCache * self)
-{
-    assert (self);
-    switch (KRefcountAdd (&self->refcount, XTocCacheClassname))
-    {
-    case krefLimit:
-        return RC (rcFS, rcToc, rcAttaching, rcRange, rcExcessive);
-    }
-    return 0;
-}
-
-
-/*
- * Release
- */
-static
-rc_t XTocCacheRelease (const XTocCache * cself)
-{
-    if (cself)
-    {
-        XTocCache * self = (XTocCache*)cself;
-        switch (KRefcountDrop (&self->refcount, XTocCacheClassname))
-        {
-        case krefWhack:
-            XTocCacheDestroy (self);
-        }
-    }
-    return 0;    
-}
-
-
-/*
- * Make
- *
- * This creates the node with one reference.  The file or directory
- * are not opened by this, nor are they initialized to non-NULL.
- */
-static
-rc_t XTocCacheMake (XTocCache ** pself, String * path,
-                         XToc * toc, XTocEntry * entry)
-{
-    XTocCache * self;
-    char * pc;
-    rc_t rc;
-
-    assert (pself);
-    assert (path);
-    assert (entry);
-
-    *pself = NULL;
-
-    rc = XTocAddRef (toc);
-    if (rc)
-        return rc;
-
-    self = calloc (sizeof (*self) + 1 + StringSize (path), 1);
-    if (self == NULL)
-        return RC (rcFS, rcTocEntry, rcConstructing, rcMemory, rcExhausted);
-
-
-    KRefcountInit (&self->refcount, 1,  XTocCacheClassname, "Init",
-                   path->addr);
-
-    self->entry = entry;
-    self->toc = toc;
-
-    pc = (char *)(self + 1);
-    string_copy (pc, StringSize (path), path->addr, StringSize (path));
-    StringInit (&self->path, pc, StringSize(path), StringLength(path));
-    *pself = self;
-    return 0;
-}
-
-
-/* ======================================================================
- * XToc
- */
-
-/* ----------------------------------------------------------------------
- * XToc
- *   The flagshop class for this is a very simple class.  It has no use 
- *   outside of NCBI at this point.
- *
- *   It maintains in debugging situations the path for the object that
- *   was opened upon creation.
- *
- *   It maintains the directory like entries created by copycat when it
- *    cataloged a submission.
- *
- *   It maintains a list of what fiels and directories within that catalog
- *   are currently open.  A request to open it again will end up just reusing
- *   the same KFile/KDirectory
- */
-
-struct XToc
-{
-    String base_path;
-    KRefcount refcount;
-    XTocEntry * root;   /* binary search tree full objects of type XTocEntry */
-    BSTree open;        /* opened entries stored in an XTocCache */
-    XTocCache * cache;  /* shortcut to "/" cache entry - not ref counted */
-};
-static char XTocClassname[] = "XToc";
-
-#if _DEBUGGING
-#define DBG_XToc(p) \
-    {   DBGTOC(("XToc: %p\n", (p))); \
-        if (p) {                                                        \
-            DBGTOC(("    base_path: %S\n", &(p)->base_path));           \
-            DBGTOC(("    refcount:  %u\n", *(unsigned*)&(p)->refcount)); \
-            DBGTOC(("    root       %p\n", (p)->root));                 \
-            DBGTOC(("    open       %p\n", *(void**)&(p)->open)); \
-            DBGTOC(("    cache      %p\n", (p)->cache)); \
-            if((p)->root) DBG_XTocEntry((p)->root); \
-            if((p)->cache) DBGXTocCache((p)->cache); }}
-#else
-#define DBG_XToc(p)
-#endif
-
-static
-rc_t XTocDestroy (XToc * self)
-{
-    XTocEntryDestroy (self->root);
-    /* the open tree will be empty for us to get here */
-    free (self);
-    return 0;
-}
-
-
-static
-rc_t XTocAddRef (const XToc * self)
-{
-    if (self)
-        switch (KRefcountAdd (&self->refcount, XTocClassname))
-        {
-        case krefLimit:
-            return RC (rcFS, rcToc, rcAttaching, rcRange, rcExcessive);
-        }
-    return 0;
-}
-
-
-static
-rc_t XTocRelease (const XToc * cself)
-{
-    if (cself)
-    {
-        XToc * self = (XToc*)cself;
-        switch (KRefcountDrop (&self->refcount, XTocClassname))
-        {
-        case krefWhack:
-            XTocDestroy (self);
-        }
-    }
-    return 0;    
-}
-
-
-static
-void XTocCacheDestroy (XTocCache * self)
-{
-    assert (self);
-    BSTreeUnlink (&self->toc->open, &self->node);
-    self->entry->cache = NULL;
-    XTocRelease (self->toc);
-    free (self);
-}
-
-
-static
-rc_t XTocMake (XToc ** pself, const String * base_path)
-{
-    XToc * self;
-    char * pc;
-    rc_t rc;
-
-    assert (pself);
-    assert (base_path);
-
-    self = malloc (sizeof (*self) + StringSize(base_path) + 1);
-    if (self == NULL)
-        return RC (rcFS, rcToc, rcConstructing, rcMemory, rcExhausted);
-
-    pc = (char*)(self+1);
-    memcpy (pc, base_path->addr, StringSize(base_path));
-    pc[StringSize(base_path)] = '\0';
-    StringInit (&self->base_path, pc, StringSize(base_path),
-                StringLength(base_path));
-
-    KRefcountInit (&self->refcount, 1, XTocClassname, "Init", base_path->addr);
-
-    rc = XTocEntryMakeInt (&self->root, "/", NULL, NULL,
-                           (KTime_t)time(NULL), 0);
-    if (rc)
-    {
-        free (self);
-        return rc;
-    }
-    self->root->type = xtoce_root;
-    self->root->container = self->root->root = self->root;
-    
-    BSTreeInit (&self->open);
-
-    *pself = self;
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * KXTocFile
- *  
- *
- * This type exists only to keep the XToc Open
- */
-struct KXTocFile
-{
-    KFile dad;
-    const KFile * base;
-    XTocCache * cache;
-    XTocEntry * entry;
-    String base_path;
-};
-#if _DEBUGGING
-#define DBG_KXTocFile(p)                             \
-    {   DBGTOC(("  KXTocFile: %p\n", (p)));                               \
-        if (p) {                                                        \
-            DBGTOC(("    dad.vt:            %p\n", (p)->dad.vt));           \
-            DBGTOC(("    dad.file:          %p\n",(p)->dad.dir));           \
-            DBGTOC(("    dad.refcount:      %u\n",*(unsigned*)&(p)->dad.refcount)); \
-            DBGTOC(("    dad.read_enabled:  %u\n",*(unsigned*)&(p)->dad.read_enabled)); \
-            DBGTOC(("    dad.write_enabled: %u\n",*(unsigned*)&(p)->dad.write_enabled)); \
-            DBGTOC(("    base:              %p\n",(p)->base));              \
-            DBGTOC(("    cache:             %p\n",(p)->cache));             \
-            DBGTOC(("    entry:             %p\n",(p)->entry));             \
-            DBGTOC(("    base_path:         %S\n",&(p)->base_path));        \
-            if ((p)->base){                                             \
-                DBGTOC(("      base->vt:            %p\n", (p)->base->vt));       \
-                DBGTOC(("      base->file:          %p\n",(p)->base->dir));       \
-                DBGTOC(("      base->refcount:      %u\n",*(unsigned*)&(p)->base->refcount)); \
-                DBGTOC(("      base->read_enabled:  %u\n",*(unsigned*)&(p)->base->read_enabled)); \
-                DBGTOC(("      base->write_enabled: %u\n",*(unsigned*)&(p)->base->write_enabled)); \
-            }}}
-#else
-#define DBG_KXTocFile(p)
-#endif
-
-/* Destroy
- */
-static
-rc_t KXTocFileDestroy ( KXTocFile *self )
-{
-    assert (self);
-    KFileRelease (self->base);
-    XTocCacheRelease (self->cache);
-    free (self);
-    return 0;
-}
-
-/* GetSysFile
- *  returns an underlying system file object
- *  and starting offset to contiguous region
- *  suitable for memory mapping, or NULL if
- *  no such file is available.
- */
-static
-struct KSysFile *KXTocFileGetSysFile ( const KXTocFile *self, uint64_t *offset )
-{
-#if 1
-    return NULL;
-#else
-    struct KSysfile * sf;
-    uint64_t loffset;
-
-    assert (self);
-    assert (offset);
-
-    sf = KFileGetSysFile (self->base, &loffset);
-    if (sf)
-        *offset = 0;
-    else
-        *offset = loffset + self->entry->u.file.offset;
-    return sf;
-#endif
-}
-
-/* RandomAccess
- *  ALMOST by definition, the file is random access
- *  certain file types ( notably compressors ) will refuse random access
- *
- *  returns 0 if random access, error code otherwise
- */
-static
-rc_t KXTocFileRandomAccess ( const KXTocFile *self )
-{
-    assert (self);
-    return KFileRandomAccess (self->base);
-}
-
-
-/* Type
- *  returns a KFileDesc
- *  not intended to be a content type,
- *  but rather an implementation class
- */
-static
-uint32_t KXTocFileType ( const KXTocFile *self )
-{
-    assert (self);
-    return KFileType (self->base);
-}
-
-
-/* Size
- *  returns size in bytes of file
- *
- *  "size" [ OUT ] - return parameter for file size
- */
-static
-rc_t KXTocFileSize ( const KXTocFile *self, uint64_t *size )
-{
-    assert (self);
-    assert (size);
-    *size = self->entry->u.file.size;
-    return 0;
-}
-
-
-/* SetSize
- *  sets size in bytes of file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t KXTocFileSetSize ( KXTocFile *self, uint64_t size )
-{
-    return RC (rcFS, rcFile, rcUpdating, rcSelf, rcUnsupported);
-}
-
-
-/* Read
- *  read file from known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
- *
- *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually read
- */
-static
-rc_t CC KXTocFileRead ( const KXTocFile *self, uint64_t pos,
-    void *buffer, size_t bsize, size_t *num_read )
-{
-    uint64_t size;
-    uint64_t limit;
-
-    assert (self);
-    assert (buffer);
-    assert (num_read);
-
-    DBG_XTocEntry(self->entry);
-
-    size = self->entry->u.file.size;    /* how big is our portion of the file */
-    if(pos >= size)  {                  /* if past end of file we're done */
-        *num_read = 0;
-        return 0;
-    }
-    limit = pos + bsize;                /* requested limit */
-    if(limit > size) {                  /* if beyond end of file trim it down */
-        limit = size;
-    }
-    return KFileRead (self->base, pos + self->entry->u.file.offset, buffer,
-                      limit - pos, num_read);
-}
-
-
-/* Write
- *  write file at known position
- *
- *  "pos" [ IN ] - starting position within file
- *
- *  "buffer" [ IN ] and "size" [ IN ] - data to be written
- *
- *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
- *  giving number of bytes actually written
- */
-static
-rc_t KXTocFileWrite ( KXTocFile *self, uint64_t pos,
-    const void *buffer, size_t size, size_t *num_writ)
-{
-    return RC (rcFS, rcFile, rcUpdating, rcSelf, rcUnsupported);
-}
-
-
-/* Make
- *  create a new file object
- *  from file descriptor
- */
-static KFile_vt_v1 vtKXTocFile =
-{
-    /* version 1.1 */
-    1, 1,
-
-    /* start minor version 0 methods */
-    KXTocFileDestroy,
-    KXTocFileGetSysFile,
-    KXTocFileRandomAccess,
-    KXTocFileSize,
-    KXTocFileSetSize,
-    KXTocFileRead,
-    KXTocFileWrite,
-    /* end minor version 0 methods */
-
-    /* start minor version == 1 */
-    KXTocFileType
-    /* end minor version == 1 */
-};
-
-
-static
- rc_t KXTocFileMake (KXTocFile **pself, const KFile * base,
-                     XTocCache * cache, XTocEntry * entry,
-                     const String *path)
-{
-    KXTocFile * self;
-    rc_t rc;
-
-    assert (pself);
-    assert (base);
-    assert (cache);
-    assert (path);
-
-    self = malloc (sizeof (*self) + 1 + StringSize (path));
-    if (self == NULL)
-        rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
-    else
-    {
-        rc = KFileInit (&self->dad, (const KFile_vt*)&vtKXTocFile, "KXTocFile", "no-name", true, false);
-        if (rc == 0)
-        {
-            rc = KFileAddRef (base);
-            if (rc == 0)
-            {
-                rc = XTocCacheAddRef (cache);
-                if (rc == 0)
-                {
-                    char * pc;
-
-                    pc = (char*)(self+1);
-                    string_copy (pc, StringSize(path), path->addr, StringSize(path));
-                    pc[StringSize(path)] = '\0';
-                    StringInit (&self->base_path, pc, StringSize (path),
-                                StringLength (path));
-                    self->base = base;
-                    self->entry = entry;
-                    self->cache = cache;
-
-                    cache -> file = self;
-
-                    * pself = self;
-                    return 0;
-                }
-
-                KFileRelease ( base );
-            }
-        }
-
-        free ( self );
-    }
-
-    PLOGERR (klogErr, 
-             (klogErr, rc,
-              "Unable to make/open $(F)",
-              "F=%S", path));
-
-    *pself = NULL;
-    return rc;
-}
-
-
-struct KXTocDir
-{
-    KDirectory dad;
-    const KDirectory * base;
-    XToc * toc;
-    XTocCache * cache;    /* owns a reference */
-    XTocEntry * entry;
-    XTocEntry * container;
-    XTocEntry * root;
-    String      base_path;
-};
-
-#if _DEBUGGING
-#define DBG_KXTocDir(p)                                                 \
-    {   if (p)                                                          \
-            DBGTOC(("KXTocDir -   %p\n"                                 \
-                    "   base_path %S\n"                                 \
-                    "   base      %p\n"                                 \
-                    "   cache     %p\n"                                 \
-                    "   entry     %p\n"                                 \
-                    "   container %p\n"                                 \
-                    "   root      %p\n",                                \
-                    p, &p->base_path, p->base, p->cache,                \
-                    p->entry, p->container, p->root));                  \
-        else DBGTOC(("KXTocDir @ NULL\n")); }
-#else
-#define DBG_KXTocDir(p)
-#endif
-/*--------------------------------------------------------------------------
- * XTocListing
- *  a directory listing
- *
- * NOTE:
- * This is nearly identical to KSysDirListing but both are currently private to
- * their compilation units.
- */
-struct XTocListing
-{
-    KNamelist dad;      /* base class */
-    Vector    list;
-    XTocEntry * entry;
-};
-
-
-
-/* ======================================================================
- * shared path routines that really should be their own class
- */
-/* ----------------------------------------------------------------------
- * KXTocDirCanonPath
- *
- * In this context CanonPath means to make the path a pure /x/y/z with no back tracking 
- * by using ~/../~ or redundant ~/./~ or ~//~ here notations.  Not exactly the usage of 
- * canonical in describing a path in other places but consistent within KFS.  It matches
- * the common meaning of canonical path as the one true path except that processing out
- * of sym links isn't done here but would normally have been.  Not processing the 
- * links means potentially more than one canonical path can reach the same target 
- * violating the usual meaning of canonical path as the one true shortest path to any
- * element.
- *
- * const KXTocDir *		self		Object oriented C; KXTocDir object for this method
- * enum RCContext 		ctx
- * char * 			path
- * size_t			psize
- */
-static
-rc_t XTocPathCanonize (char * path, size_t psize)
-{
-    char *	low;	/* a pointer to the root location in path; not changed after initialization */
-    char *	dst;	/* a target reference for compressing a path to remove . and .. references */
-    char *	last;	/* the end of the last processed facet of the path */
-    char *	end;	/* absolute end of the incoming path */
-    char * 	src;	/* the start of the current facet to be processed */
-
-    /* end is the character after the end of the incoming path */
-    end = path + psize;
-
-    /* point all other temp pointers at the root point in the incoming path */
-    last = path;
-
-    /* handle windows / / network path starter */
-    if ((last == path) && (last[0] == '/') && (last[1] == '/'))
-      last ++;
-
-    low = dst = last;
-
-    for (;;)
-    {
-
-	/* point at the first / after the most recent processed facet */
-	src = string_chr (last + 1, end-last-1, '/');
-	if (src == NULL)	/* if no '/' point to the end */
-	    src = end;
-
-	/* detect special sequences */
-	switch (src - last)
-	{
-	case 1: /* / / (with nothing between) is a superflouous / hurting us to parse later;
-		 * /. is a here reference to the same directory as the previous */
-	    if ((last[1] == '/')||(last[1] == '.'))
-	    {
-		/* skip over */
-		last = src;
-		if (src != end)
-		    continue;
-	    }
-	    break;
-	case 2: /* /./ is a "here" reference point and is omitted by not copying it over */
-	    if (last[1] == '.')
-	    {
-		/* skip over */
-		last = src;
-		if (src != end)
-		    continue;
-	    }
-	    break;
-
-	case 3: /* /../ is a up one directory and is processed by deleting the last facet copied */
-	    if (last [1] == '.' && last [2] == '.')
-	    {
-		/* remove previous leaf in path */
-		dst [ 0 ] = 0;
-		dst = string_rchr (path, end-path, '/');
-		/* can't up a directory past the root */
-		if (dst == NULL || dst < low)
-		{
-		    return RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid);
-		}
-
-		last = src;
-		if (src != end)
-		    continue;
-	    }
-	    break;
-	}
-
-	/* if rewriting, copy leaf */
-	if (dst != last)
-	{
-	    memmove (dst, last, src - last);
-	}
-
-	/* move destination ahead */
-	dst += src - last;
-        
-	/* if we're done, go */
-	if (src == end)
-	    break;
-
-	/* find next separator */
-	last = src;
-    }
-
-    /* NUL terminate if modified */
-    if (dst != end)
-	* dst = 0;
-
-    /* say we did did it with no problems */
-    return 0;
-}
-
-
-rc_t XTocMakePath (const char ** ppath, bool canon, const char * path, va_list args)
-{
-    char * b;
-    size_t bz;  /* size to allocate */
-    rc_t rc = 0;
-    bool   use_printf;
-
-    assert (ppath);
-    assert (path);
-#if 0
-    DBGTOC(("%s: make path from %s\n", __func__, path));
-#endif
-    b = NULL;
-    bz = string_size (path) + 1;  /* start assuming out is same size as in */
-
-    use_printf = (string_chr (path, bz, '%') != NULL);
-    if (use_printf)
-    {
-        char shortbuff [32];
-        int  pz = vsnprintf (shortbuff, sizeof shortbuff, path, args);
-        if (pz < 0)
-        {
-            rc = RC (rcFS, rcDirectory, rcFormatting, rcPath, rcInvalid);
-            DBGTOC(("%s: invalid path %s\n", __func__, path));
-            LOGERR(klogErr, rc, "Error building XTOC path");
-            return rc;
-        }
-        bz = pz + 1;
-    }
-
-    b = malloc (bz);
-    if (b == NULL)
-        return RC (rcFS, rcDirectory, rcFormatting, rcMemory, rcExhausted);
-
-    if (use_printf)
-    {
-        int pz = vsnprintf (b, bz, path, args);
-        if (pz < 0)
-            rc = RC (rcFS, rcDirectory, rcFormatting, rcPath, rcInvalid);
-        else
-            b[pz] = '\0';
-    }
-    else
-        string_copy (b, bz, path, bz);
-
-    if ((rc == 0) && canon)
-        rc = XTocPathCanonize (b, bz);
-
-    if (rc == 0)
-        *ppath = b;
-    else
-        free (b);
-    return 0;
-}
-
-static char * XTocEntryMakeFullPathRecur (XTocEntry * self, size_t also, 
-                                          char ** phere)
-{
-    char * path;
-    char * here;
-
-    assert (self);
-
-#if 0
-    DBGENTRY(("%s: self %p also %lu  %p\n",__func__,self,also,phere));
-    DBG_XTocEntry(self);
-#endif
-    if (self->type == xtoce_root)
-    {
-        *phere = NULL;
-        path = malloc (2 + also);
-        if (path != NULL)
-        {
-            path[0] = '/';
-            path[1] = '\0';
-            *phere = path;
-        }
-#if 0
-        DBGENTRY (("%s: path %s %p %p\n", __func__, path, path, *phere));
-#endif
-    }
-    else
-    {
-        path = XTocEntryMakeFullPathRecur (self->parent,
-                                           also + 1 + StringSize (&self->name),
-                                           &here);
-        if (path == NULL)
-        {
-            *phere = NULL;
-            return NULL;
-        }
-#if 0
-        DBGENTRY (("%s: path '%s' %p '%s' %p\n",__func__, path, path, here, here));
-#endif
-        here[0] = '/';
-        string_copy (here+1, StringSize (&self->name) + 1,
-                     self->name.addr, StringSize (&self->name));
-        *phere = here + 1 + StringSize (&self->name);
-    }
-    return path;
-}
-
-static
-rc_t XTocEntryMakeFullPath (XTocEntry * self, const char ** pfull)
-{
-    char * ignored;
-    char * full_path;
-#if 0
-    DBGENTRY(("%s: self %p pfull %p\n",__func__,self,pfull));
-#endif
-    assert (pfull);
-    *pfull = NULL;
-    full_path = XTocEntryMakeFullPathRecur (self, 0, &ignored);
-    if (full_path == NULL)
-        return RC (rcFS, rcPath, rcCreating, rcMemory, rcExhausted);
-    *pfull = full_path;
-    return 0;
-}
-
-
-
-/* ======================================================================
- */
-/* ----------------------------------------------------------------------
- * XTocListingDestroy
- * Class destructor
- *
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [INOUT] XTocListing *	self		Listing self reference: object oriented in C
- */
-static
-rc_t CC XTocListingDestroy (XTocListing *self)
-{
-    VectorWhack (&self->list, NULL, NULL);
-    free (self);
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * XTocListingCount
- *
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN]  const XTocListing *	self		Listing self reference: object oriented in C
- * [OUT] uint32_t *		count		Where to put the count of names
- */
-static rc_t CC XTocListingCount (const XTocListing *self, uint32_t *count)
-{
-    *count = VectorLength (&self->list);
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * XTocListingGet
- *
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN]  const XTocListing *	self		Listing self reference: object oriented in C
- * [IN]  uint32_t		idx		?
- * [OUT] const char **		name		Where to put the name
- */
-static rc_t CC XTocListingGet (const XTocListing *self, uint32_t idx, const char **name)
-{
-    uint32_t count;
-    rc_t rc;
-
-    rc = XTocListingCount(self, &count);
-    if (rc == 0)
-    {
-        if (idx >= count)
-            return RC (rcFS, rcNamelist, rcAccessing, rcParam, rcExcessive);
-        *name = VectorGet (&self->list, idx);
-    }
-    return 0;
-}
-
-
-/* ----------------------------------------------------------------------
- * XTocListingSort
- *
- * This function has the signature needed to use with the NameList base class for
- * XTocListings to determine the order of two names.  Matches the signature of
- * strcmp() and other functions suitable for use by qsort() and others
- *
- * [RET] int					0:  if a == b 
- *						<0: if a < b
- *						>0: if a > b
- * [IN] const void *		a
- * [IN] const void *		b
- *
- * Elements are typed as const void * to match the signature needed for 
- * a call to qsort() but they should be pointers to namelist elements
- */
-#if NOT_YET
-static int CC XTocListingSort (const void *a, const void *b, void * ignored)
-{
-    return strcmp (*(const char**)a, *(const char**)b);
-}
-#endif
-static KNamelist_vt_v1 vtXTocListing =
-{
-    /* version 1.0 */
-    1, 0,
-
-    /* start minor version 0 methods */
-    XTocListingDestroy,
-    XTocListingCount,
-    XTocListingGet
-    /* end minor version 0 methods */
-};
-
-
-/* ----------------------------------------------------------------------
- * XTocListingInit
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [INOUT] XTocListing *	self		Listing self reference: object oriented in C
- * [IN]    const char *		path		?
- * [IN]    const KDirectory *	dir		?
- * [IN]    bool (* 		f	)(const KDirectory*, const char*, void*),
- *						This is a filter function - any listing element
- *						passed to this function will generate a true ot
- *						a false.  If false that listing element is dropped.
- *						If this parameter is NULL all elements are kept.
- * [IN]	   void *		data		Ignored.  May use NULL if permitted
- *						by 'f'.
- */
-struct XTocListingInitData
-{
-    Vector * v;
-    rc_t rc;
-};
-static
-void CC XTocListingAdd (BSTNode * n_, void * data_)
-{
-    struct XTocListingInitData * data = data_;
-    const XTocEntry * n = (const XTocEntry *)n_;
-
-    if (data->rc == 0)
-    {
-        data->rc = VectorAppend (data->v, NULL, n->name.addr);
-    }
-}
-
-
-rc_t XTocListingMake (XTocListing ** pself, XTocEntry * entry,
-                      bool (CC* f) (const KDirectory*, const char*, void*),
-                      void *data)
-{
-    XTocListing * self;
-    BSTree * tree;
-    rc_t rc;
-
-    /* is self parameter possibly NULL? */
-    if (pself == NULL)
-    {
-	return  RC (rcFS, rcDirectory, rcConstructing, rcSelf, rcNull);
-    }
-    *pself = NULL;
-
-    self = malloc (sizeof (*self));
-    if (self == NULL)
-        return RC (rcFS, rcListing, rcConstructing, rcMemory, rcExhausted);
-
-    switch (entry->type)
-    {
-    default:
-        return RC (rcFS, rcDirectory, rcConstructing, rcListing, rcIncorrect);
-
-    case xtoce_file:
-    case xtoce_dir:
-        tree = &entry->tree;
-        break;
-    }
-
-    /* start with an empty name list */
-    VectorInit (&self->list, 0, 16);
-
-    /* initialize the Namelist base class */
-    if ((rc = KNamelistInit (& self -> dad,
-			     (const KNamelist_vt*)&vtXTocListing)) == 0)
-    {
-        struct XTocListingInitData data;
-
-        data.v = &self->list;
-        data.rc = 0;
-
-        BSTreeForEach (tree, false, XTocListingAdd, &data);
-
-        rc = data.rc;
-    }
-    if (rc == 0)
-        *pself = self;
-    return rc;
-}
-
-
-static
-rc_t XTocFindXTocCache (XToc * self, XTocCache ** pcache,
-                        const String * spath)
-{
-    XTocCache * cache;
-    assert (self);
-    assert (pcache);
-    assert (spath);
-
-    DBGTOC(("%s: self %p pcache %p spath %S\n",__func__,self,pcache,spath));
-    cache = (XTocCache*)BSTreeFind (&self->open, spath, XTocCacheCmp);
-    DBGTOC(("%s: found cache %p\n",__func__,cache));
-    *pcache = cache;
-    return cache ? 0 : RC (rcFS, rcToc, rcSearching, rcNode, rcNotFound);
-}
-
-
-static
-rc_t XTocMakeXTocCache (XToc * self, XTocCache ** pcache,
-                        String * path, XTocEntry * entry)
-{
-    XTocCache * cache;
-    rc_t rc;
-
-    assert (self);
-    assert (pcache);
-    assert (path);
-
-/*     DBGTOC(("%s: %S\n",path)); */
-    *pcache = NULL;
-    rc = XTocCacheMake (&cache, path, self, entry);
-    if (rc)
-        PLOGERR (klogErr,
-                 (klogErr, rc, "error creating cache entry for $(P)",
-                  "P=%S", path));
-    else
-    {
-        union
-        {
-            BSTNode * b;
-            XTocCache * x;
-        } exist;
-        DBGTOC(("%s: insert cache\n",__func__));
-        rc = BSTreeInsertUnique (&self->open, &cache->node, &exist.b, XTocCacheSort);
-        if (rc)
-            PLOGERR (klogErr,
-                     (klogErr, rc, "error inserting cache entry for $(P)",
-                      "P=%S", path));
-        else
-        {
-            *pcache = entry->cache = cache;
-            return 0;
-        }
-        XTocCacheDestroy (cache);
-    }
-    return rc;
-}
-
-
-static
-rc_t XTocDirGetCache (const KXTocDir * self, const char * path_, XTocCache ** pcache)
-{
-    const char * path;  /* absolute canonical path in ASCIZ */
-    String spath;       /* absolute canonical path as a String */
-    XTocEntry * entry;  /* toc entry for the path */
-    XTocCache * cache;  /* cache entry for the path */
-    rc_t rc;
-
-    assert (self);
-    assert (path_);
-    assert (pcache);
-
-    DBGCACHE(("%s: Get cache node for %s\n", __func__, path_));
-
-    /* assume not found or errors */
-    *pcache = NULL;
-
-    /* first resolve the path to an entry node */
-    rc = XTocEntryResolvePath (self->entry, path_, true, &entry);
-    DBGCACHE (("%s: path resolved\n",__func__));
-    if (rc)
-    {
-        PLOGERR (klogErr, 
-                 (klogErr, rc, "Unable to resolve path $(P)",
-                  "P=%s", path_));
-        return rc;
-    }
-
-    DBGCACHE(("%s: entry  %p\n",__func__,entry));
-
-    /* now create a actual canonical path from the root to the located entry
-     * the incoming path could have had symbolic links or the like so we're
-     * making it a single non-ambiguous version
-     */
-    rc = XTocEntryMakeFullPath (entry, &path);
-    if (rc)
-    {
-        PLOGERR (klogErr, 
-                 (klogErr, rc, "Unable to build full path for $(P)",
-                  "P=%s", path_));
-        return rc;
-    }
-
-    /* make a String version as that is what the cache holds */
-    StringInitCString (&spath, path);
-    DBGCACHE(("%s: made full path %S %s\n",__func__,&spath,path));
-
-    /* see if it's already open */
-
-    rc = XTocFindXTocCache (self->toc, &cache, &spath);
-    if (rc == 0)
-    {
-        DBGCACHE(("%s: found an existing cache node for %S\n",__func__,&spath));
-        XTocCacheAddRef (cache);
-    }
-    else
-    {
-        DBGCACHE(("%s: did not find an existing cache node for %S\n",__func__,&spath));
-        /* not found is not an error condition */
-        if (GetRCState(rc) == rcNotFound)
-        {
-            /* not found so make one */
-            rc = XTocMakeXTocCache (self->toc, &cache, &spath, entry);
-            DBGCACHE(("%s: made a cache node %p\n",__func__,cache));
-        }
-    }
-    /* for rc to be 0 here we either found or created a cache node
-     * we will have an ownership apassed to the caller
-     */
-    if (rc == 0)
-        *pcache = cache;
-    /* free allocated path in a buffer */
-    free ((void*)path);
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KXTocDirDestroy
- */
-static
-rc_t CC KXTocDirDestroy (KXTocDir *self)
-{
-    assert (self);
-
-    XTocCacheRelease (self->cache);
-    KDirectoryRelease (self->base);
-    free (self);
-    return 0;
-}
-
-
-
-
-/* ----------------------------------------------------------------------
- * KXTocDirList
- *  create a directory listing
- *
- *  "list" [ OUT ] - return parameter for list object
- *
- *  "path" [ IN, NULL OKAY ] - optional parameter for target
- *  directory. if NULL, interpreted to mean "."
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN]	 const KXTocDir *	self		Object oriented C; KXTocDir object for this method
- * [OUT] KNamelist **		listp,
- * [IN]  bool (* 		f	)(const KDirectory*,const char *, void *)
- * [IN]  void *			data
- * [IN]  const char *		path
- * [IN]  va_list		args
- */
-static
-rc_t CC KXTocDirList (const KXTocDir *self,
-                     KNamelist **listp,
-                     bool (CC* f) (const KDirectory *dir, const char *name, void *data),
-                     void *data,
-                     const char *path_,
-                     va_list args)
-{
-    const char * path;
-    rc_t rc;
-
-    if (path_ == NULL)
-        path_ = "/";
-
-    rc = XTocMakePath (&path, true, path_, args);
-    if (rc == 0)
-    {
-        struct XTocEntry * node;
-
-        rc = XTocEntryResolvePath (self->entry->root, path, true, &node);
-        if (rc == 0)
-        {
-            rc = XTocListingMake ((struct XTocListing **)listp, node, f, data);
-        }
-        free ((void*)path);
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KXTocDirPathType
- *  returns a KPathType
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- *
- * [RET] uint32_t
- * [IN]  const KXTocDir *	self		Object oriented C; KXTocDir object for this method
- * [IN]  const char *		path
- * [IN]  va_list		args
- */
-static KPathType CC KXTocDirPathType (const KXTocDir *self, const char *path_, va_list args)
-{
-    const char * path;
-    rc_t rc;
-    KPathType type = kptBadPath;
-
-    rc = XTocMakePath (&path, true, path_, args);
-    if (rc == 0)
-    {
-        type = XTocEntryPathType (self->cache->entry->root, path);
-        free ((void*)path);
-    }
-    return type;
-}
-
-
-/* ----------------------------------------------------------------------
- * KXTocDirRelativePath
- *
- * KXTocDirRelativePath
- *  makes "path" relative to "root"
- *  both "root" and "path" MUST be absolute
- *  both "root" and "path" MUST be canonical, i.e. have no "//", "/./" or "/../" sequences
- *
- * [RET] rc_t					0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN] const KXTocDir *		self		Object oriented C; KXTocDir object for this method
- * [IN] enum RCContext 		ctx
- * [IN] const char *		root
- * [IN] char *			path
- * [IN] size_t			path_max
- */
-#if not_USED
-static
-rc_t KXTocDirRelativePath (const KXTocDir *self, enum RCContext ctx,
-                           const char *root, char *path, size_t path_max)
-{
-#if 1
-    return -1;
-#else
-    int backup;
-    size_t bsize, psize;
-    size_t size;
-
-    const char *r = root + self -> root;
-    const char *p = path + self -> root;
-
-    assert (r != NULL && r [ 0 ] == '/');
-    assert (p != NULL && p [ 0 ] == '/');
-
-    for (; * r == * p; ++ r, ++ p)
-    {
-	/* disallow identical paths */
-	if (* r == 0)
-	    return RC (rcFS, rcDirectory, ctx, rcPath, rcInvalid);
-    }
-
-    /* paths are identical up to "r","p"
-       if "r" is within a leaf name, then no backup is needed
-       by counting every '/' from "r" to end, obtain backup count */
-    for (backup = 0; * r != 0; ++ r)
-    {
-	if (* r == '/')
-	    ++ backup;
-    }
-
-    /* the number of bytes to be inserted */
-    bsize = backup * 3;
-
-    /* align "p" to last directory separator */
-    while (p [ -1 ] != '/') -- p;
-
-    /* the size of the remaining relative path */
-    psize = string_measure(p, &size);
-
-    /* open up space if needed */
-    if ( (size_t)(p - path) < bsize )
-    {
-	/* prevent overflow */
-	if (bsize + psize >= path_max)
-	    return RC (rcFS, rcDirectory, ctx, rcPath, rcExcessive);
-	memmove (path + bsize, p, psize);
-    }
-
-    /* insert backup sequences */
-    for (bsize = 0; backup > 0; bsize += 3, -- backup)
-	memcpy (& path [ bsize ], "../", 3);
-
-    /* close gap */
-    if ( (size_t)( p - path ) > bsize )
-	{
-        size_t size;
-		string_copy (& path [ bsize ], path_max - bsize, p, measure_string(p, &size));
-	}
-
-	return 0;
-#endif
-}
-#endif
-
-/* ----------------------------------------------------------------------
- * KXTocDirVisit
- *  visit each path under designated directory,
- *  recursively if so indicated
- *
- *  "recurse" [ IN ] - if non-zero, recursively visit sub-directories
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - function to execute
- *  on each path. receives a base directory and relative path
- *  for each entry, where each path is also given the leaf name
- *  for convenience. if "f" returns non-zero, the iteration will
- *  terminate and that value will be returned. NB - "dir" will not
- *  be the same as "self".
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- */
-/* ----------------------------------------------------------------------
- * KXTocDirVisitDir
- *
- * [IN] KXTocDirVisitData *	pb
- */
-#if NOT_YET
-typedef struct KXTocDirVisitData
-{
-    int nada;
-} KXTocDirVisitData;
-static
-rc_t KXTocDirVisitDir(KXTocDirVisitData *pb)
-{
-    return -1;
-}
-#endif
-static 
-rc_t CC KXTocDirVisit (const KXTocDir *self, 
-                      bool recurse,
-                      rc_t (CC* f) (const KDirectory *, uint32_t, const char *, void *), 
-                      void *data,
-                      const char *path,
-                      va_list args)
-{
-#if 1
-    return RC (rcFS, rcDirectory, rcVisiting, rcSelf, rcUnsupported);
-#else
-    char * full_path;
-    rc_t   rc;
-
-    if (path == NULL)
-        path = "/";
-
-    /* -----
-     * First fix the path to make it useable
-     */
-    rc = KXTocDirMakePath (self, rcVisiting, true, &full_path, path, args);
-    if (rc != 0)
-    {
-	LOGERR (klogInt, rc, "failed to make path in Visit");
-    }
-    else
-    {
-	const XTocEntry * pnode;
-
-	/* -----
-	 * Now find that path as a node and validate it is a directory
-	 */
-	rc = KXTocEntryResolvePath (&self->toc->root, full_path, true, &pnode);
-	if (rc != 0)
-	{
-	    PLOGERR (klogInt, (klogInt, rc, "failed to resolve path $(P) in Visit", "P=%s", full_path));
-	}
-	else
-	{
-            switch (pnode->type)
-            {
-            case xtoce_file:
-                if (pnode->u.file.has_tree)
-                    break;
-            default:
-                rc = RC (rcFS, rcDirectory, rcVisiting, rcPath, rcInvalid);
-                break;
-            case xtoce_dir:
-                break;
-            }
-
-            if (rc == 0)
-            {
-                size_t size;
-		KXTocDir * full_dir;
-		uint32_t path_size;
-
-		/* -----
-		 * make a locally accessible private KDirectory/KXTocDir
-		 */
-		for ( path_size = (uint32_t)string_measure( full_path, &size );
-		      ( path_size > self->root ) && ( full_path[ path_size - 1 ] == '/' );
-		      -- path_size )
-		{}
-		rc = KXTocDirMake (&full_dir, 
-				  rcVisiting,
-				  self->parent,
-				  self->toc,
-				  pnode,
-				  self->archive.v,
-				  self->arctype,
-				  self->root,
-				  full_path,
-				  path_size, 
-				  true,
-				  false);
-		if (rc == 0)
-		{
-		    KXTocDirVisitData pb;
-
-		    pb.f = f;
-		    pb.data = data;
-		    pb.dir = full_dir;
-		    pb.recurse = recurse;
-/*		    pb.dir.path[--pb.dir.size] = 0; */
-
-		    rc = KXTocDirVisitDir (&pb);
-
-		    KXTocDirDestroy (full_dir);
-		}
-	    }
-	    else
-	    {
-		rc = RC (rcFS, rcDirectory, rcVisiting, rcPath, rcIncorrect);
-		LOGERR (klogInt, rc, "Type is not a directory");
-	    }
-	}
-	free (full_path);
-    }
-    return rc;
-#endif
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirVisitUpdate
- */
-static rc_t CC KXTocDirVisitUpdate (KXTocDir *self,
-                                   bool recurse,
-                                   rc_t (CC*f) (KDirectory *,uint32_t,const char *,void *),
-                                   void *data,
-                                   const char *path,
-                                   va_list args)
-{
-    return RC (rcFS, rcDirectory, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirResolvePath
- *
- *  resolves path to an absolute or directory-relative path
- *
- * [IN]  const KXTocDir *self		Objected oriented self
- * [IN]	 bool 		absolute	if non-zero, always give a path starting
- *  					with '/'. NB - if the directory is 
- *					chroot'd, the absolute path
- *					will still be relative to directory root.
- * [OUT] char *		resolved	buffer for NUL terminated result path in 
- *					directory-native character set
- * [IN]	 size_t		rsize		limiting size of resolved buffer
- * [IN]  const char *	path		NUL terminated string in directory-native
- *					character set denoting target path. 
- *					NB - need not exist.
- */
-static rc_t CC KXTocDirResolvePath (const KXTocDir *self,
-                                   bool absolute,
-                                   char *resolved,
-                                   size_t rsize,
-                                   const char *path_,
-                                   va_list args)
-{
-    rc_t rc;
-    const char * path;
-
-    KOutMsg ("+++++\n%s: absolute %d\n", __func__, absolute);
-
-    assert (self);
-    assert (resolved);
-    assert (path_);
-
-    *resolved = '\0';
-    rc = XTocMakePath (&path, false, path_, args);
-    KOutMsg ("%s: rc %R new '%s' old '%s'\n", __func__, rc, path, path_);
-    if (rc != 0)
-    {
-        PLOGERR (klogErr,
-                 (klogErr, rc, "Error building path based on $(P)", "P=%s", path_));
-    }
-    else
-    {
-        size_t path_sz = string_size(path);
-
-        if (absolute)
-        {
-            XTocEntry * entry;
-
-            rc = XTocEntryResolvePath (self->entry, path, false, &entry);
-
-            if (rc)
-                PLOGERR (klogErr,
-                         (klogErr, rc, "Error resolving path based on $(P)", "P=%s", path_));
-            else
-            {
-                free ((void*)path);
-                path = NULL;
-                rc = XTocEntryMakeFullPath (entry, &path);
-                if (rc == 0)
-                {
-                    size_t k = self->toc->base_path.size;
-                    if (k > 1)
-                    {
-                        memcpy (resolved, self->toc->base_path.addr, k);
-                        resolved += k;
-                        rsize -= k;
-                    }
-                }
-            }
-        }
-        if (rc == 0)
-        {
-            if (rsize < (path_sz - 1))
-                rc = RC(rcFS, rcDirectory, rcResolving, rcBuffer, rcInsufficient);
-            else
-                string_copy(resolved, rsize, path, path_sz);
-        }
-        if (path)
-            free ((void*)path);
-    }
-    return rc;
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirResolveAlias
- *  resolves an alias path to its immediate target
- *  NB - the resolved path may be yet another alias
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting an object presumed to be an alias.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character set
- *
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static rc_t CC KXTocDirResolveAlias (const KXTocDir * self, 
-				 bool absolute,
-				 char * resolved,
-				 size_t rsize,
-				 const char *path_,
-				 va_list args)
-{
-#if 0
-    return -1;
-#else
-    rc_t rc;
-    const char * path;
-
-    assert (self);
-    assert (resolved);
-    assert (path_);
-
-    *resolved = '\0';
-    rc = XTocMakePath (&path, false, path_, args);
-    if (rc != 0)
-    {
-        PLOGERR (klogErr,
-                 (klogErr, rc, "Error building path based on $(P)", "P=%s", path_));
-    }
-    else
-    {
-        XTocEntry * entry;
-
-        rc = XTocEntryResolvePath (self->entry, path, true , &entry);
-        if (rc)
-            PLOGERR (klogErr,
-                     (klogErr, rc, "Error resolving path based on $(P)", "P=%s", path_));
-        else
-        {
-            free ((void*)path);
-            path = NULL;
-            rc = XTocEntryMakeFullPath (entry, &path);
-        }
-    }
-
-/* THIS IS WRONG!
- * this is the absolute path not the relative one
- */
-    if (rc == 0)
-        string_copy (resolved, rsize, path, string_size (path));
-    
-    if (path)
-        free ((void*)path);
-
-    return rc;
-#endif
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirRename
- *  rename an object accessible from directory, replacing
- *  any existing target object of the same type
- *
- *  "from" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- *
- *  "to" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- */
-static
-rc_t CC KXTocDirRename (KXTocDir *self, bool force, const char *from, const char *to)
-{
-    assert (self != NULL);
-    assert (from != NULL);
-    assert (to != NULL);
-
-    return RC (rcFS, rcArc, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirRemove
- *  remove an accessible object from its directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "force" [ IN ] - if non-zero and target is a directory,
- *  remove recursively
- */
-static
-rc_t CC KXTocDirRemove (KXTocDir *self, bool force, const char *path, va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirClearDir
- *  remove all directory contents
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "force" [ IN ] - if non-zero and directory entry is a
- *  sub-directory, remove recursively
- */
-static
-rc_t CC KXTocDirClearDir (KXTocDir *self, bool force, const char *path, va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirAccess
- *  get access to object
- *
- *  "access" [ OUT ] - return parameter for Unix access mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-static rc_t CC KXTocDirVAccess (const KXTocDir *self,
-			    uint32_t *access,
-			    const char *path_,
-			    va_list args)
-{
-#if 1
-    return -1;
-#else
-    char * path;
-    rc_t rc;
-
-    if (path_ == NULL)
-        path_ = "/";
-
-    rc = KXTocDirMakePath (self, rcAccessing, true, &path, path_, args);
-    if (rc == 0)
-    {
-        XTocEntry * node;
-
-        rc = XTocEntryResolvePath (&self->toc->root, path, true, &node);
-
-
-    const KTocEntry *	entry;
-    rc_t 		rc;
-    uint32_t		acc;
-    KTocEntryType	type;
-    char * 		full;
-
-    assert (self != NULL);
-    assert (access != NULL);
-    assert (path != NULL);
-
-    /* -----
-     * by C standard the nested ifs (if A { if B { if C ... could have been if A && B && C
-     */
-    if ((rc = KXTocDirMakePath (self, rcAccessing, false, &full, path, args)) == 0)
-    {
-	if ((rc = KXTocDirResolvePathNode (self, rcAccessing, path, true, &entry, &type)) == 0)
-	{
-	    if ((rc = KTocEntryGetAccess (entry, &acc)) == 0)
-	    {
-                /*
-                 * We want to filter the access because within an Archive
-                 * a file is unwritable
-                 */
-		*access = acc & ~(S_IWRITE|S_IWGRP|S_IWOTH);
-		rc = 0;
-	    }
-	}
-    }
-    if (full != NULL)
-	free (full);
-    return rc;
-#endif
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirSetAccess
- *  set access to object a la Unix "chmod"
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "access" [ IN ] and "mask" [ IN ] - definition of change
- *  where "access" contains new bit values and "mask defines
- *  which bits should be changed.
- *
- *  "recurse" [ IN ] - if non zero and "path" is a directory,
- *  apply changes recursively.
- */
-static rc_t CC KXTocDirSetAccess (KXTocDir *self,
-			      bool recurse,
-			      uint32_t access,
-			      uint32_t mask,
-			      const char *path,
-			      va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcUpdating, rcSelf, rcUnsupported);
-}
-
-
-static	rc_t CC KXTocDirVDate		(const KXTocDir *self,
-					 KTime_t *date,
-					 const char *path_,
-					 va_list args)
-{
-    const char * path;
-    rc_t rc;
-
-    assert (self);
-    assert (date);
-    assert (path_);
-
-    *date = 0;
-    path = NULL;
-    rc = XTocMakePath (&path, false, path_, args);
-    if (rc)
-        PLOGERR (klogErr,
-                 (klogErr, rc, "Error resolving path from $(P)", "P=%s", path_));
-    else
-    {
-        XTocEntry * entry;
-        rc = XTocEntryResolvePath (self->entry, path, false, &entry);
-        if (rc)
-            PLOGERR (klogErr,
-                     (klogErr, rc, "Error resolving path from $(P)", "P=%s", path_));
-        else
-            *date = entry->mtime;
-        free ((void*)path);
-    }
-    return rc;
-}
-
-static	rc_t CC KXTocDirSetDate		(KXTocDir *self,
-					 bool recurse,
-					 KTime_t date,
-					 const char *path,
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcUpdating, rcSelf, rcUnsupported);
-}
-
-static
-struct KSysDir *CC KXTocDirGetSysDir ( const KXTocDir *self )
-{
-    return NULL;
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirCreateAlias
- *  creates a path alias according to create mode
- *
- *  "targ" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target alias
- *
- *  "access" [ IN ] - standard Unix directory access mode
- *  used when "mode" has kcmParents set and alias path does
- *  not exist.
- *
- *  "mode" [ IN ] - a creation mode (see explanation above).
- */
-static
-rc_t CC KXTocDirCreateAlias (KXTocDir *self,
-			 uint32_t access,
-			 KCreateMode mode,
-			 const char *targ,
-			 const char *alias)
-{
-    assert (self != NULL);
-    assert (targ != NULL);
-    assert (alias != NULL);
-
-    return RC (rcFS, rcArc, rcCreating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirOpenFileRead
- *  opens an existing file with read-only access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t  KXTocDirOpenFileReadInt	(const KXTocDir *self,
-                                 const KXTocFile **f,
-                                 const char *path)
-{
-    XTocCache * cache;
-    rc_t rc;
-
-    DBGTOC (("%s: Opening %s\n", __func__, path));
-    /* resolve path to a cache entry - one will be created if it did not yet exist */
-    rc = XTocDirGetCache (self, path, &cache);
-    DBGTOC(("%s: got cache %p\n",__func__,cache));
-    if (rc == 0)
-    {
-        /* if the file is already open this is easiest */
-        if (cache->file)
-        {
-            DBGTOC(("%s: found open\n",__func__));
-            rc = KFileAddRef (&cache->file->dad);
-            if (rc)
-                *f = cache->file;
-        }
-        else
-        {
-            do
-            {
-                const KFile * bfile = NULL;     /* base file for this new KXTocFile */
-                XTocEntry * entry;
-
-                entry = cache->entry;
-
-                /* next easiest is files not in a container or archive
-                 * the base file will be a KSysFile (most likely) */
-                if (entry->container == entry->root)
-                {
-                    DBGTOC(("%s: NOT in a container or archive\n",__func__));
-                    rc = KDirectoryOpenFileRead (((const KXTocDir*)self->toc->cache->dir)->base,
-                                                 &bfile, "%s", path);
-                }
-                else do
-                {
-                    /* more difficult is a file inside a compressed container
-                     * or an archive container */
-                    const KXTocFile * cfile;    /* container's KXTocFile */
-                    XTocCache * ccache;
-
-                    DBGTOC(("%s: in a container or archive\n",__func__));
-                    ccache = entry->container->cache;
-
-                    /* is the container open? */
-                    if (ccache)
-                    {
-                        /* was the container open but not the file?
-                         * not sure if this is possible */
-                        if (ccache->file == NULL)
-                        {
-                            rc = KXTocDirOpenFileReadInt (self->toc->cache->dir, 
-                                                          &cfile, 
-                                                          ccache->path.addr);
-                            if (rc)
-                                break;
-                        }
-                        else
-                            cfile = ccache->file;
-                    }
-                    /* else the container was not yet open */
-                    else
-                    {
-                        /* build the conatiner's path */
-                        const char * cpath;
-                        rc = XTocEntryMakeFullPath (entry->container, &cpath);
-                        if (rc)
-                            break;
-                        else
-                        {
-                            /* now open the container's KXTocFile */
-                            rc = KXTocDirOpenFileReadInt (self->toc->cache->dir, &cfile, cpath);
-                            free ((void*)cpath);
-                            if (rc)
-                                break;
-                        }                        
-                    }
-
-                    /* we should now have an opened container file
-                     * it might be our base file or the source for our base */
-                    DBGTOC(("%s: we have a container file %p\n", __func__, cfile));
-                    DBG_KXTocFile (cfile);
-                    
-                    if (entry->container->u.file.archive) /* extracting from an archive file */
-                    {
-                        /* base file is the container file for an archive */
-                        bfile = &cfile->dad;
-                            DBGTOC(("%s: archive file set cfile %p bfile %p\n",
-                                    __func__, cfile, bfile));
-                    }
-                    else if (entry->container->u.file.container) /* extracting from a compressed file */
-                    {
-                        /* the base file is built from the container's file via decompression */
-                        if (strcmp (entry->container->u.file.filetype.addr, "Compressed/GnuZip") == 0)
-                        {
-                            rc = KFileMakeGzipForRead (&bfile, &cfile->dad);
-                        }
-                        else if (strcmp (entry->container->u.file.filetype.addr, "Compressed/Bzip") == 0)
-                        {
-                            rc = KFileMakeBzip2ForRead (&bfile, &cfile->dad);
-                        }
-                        else
-                        {
-                            DBGTOC(("%s: unsupported %s %s\n",__func__, cfile, 
-                                    entry->container->u.file.filetype.addr));
-                            LOGERR (klogErr, rc, "Unsupported compression type");
-                            rc = RC (rcFS, rcToc, rcOpening, rcToc, rcUnsupported);
-                        }
-                        if (rc == 0)
-                        {
-                            /* release the container file leaving only the
-                             * decompressed file owning it */
-                            KFileRelease (&cfile->dad);
-                            DBGTOC(("%s: container file created cfile %p bfile %p\n",
-                                    __func__, cfile, bfile));
-                        }
-                    }
-                    else
-                        rc = RC (rcFS, rcToc, rcOpening, rcToc, rcCorrupt);
-                }  while (0);
-                if (rc == 0)
-                {
-                    /* now we have a base file for our XTocFile */
-                    String spath;
-                    KXTocFile * xfile;
-                    StringInitCString (&spath, path);
-                    rc = KXTocFileMake (&xfile, bfile, cache, entry, &spath);
-                    DBGTOC(("%s: we have a new KXTocFile file %p bfile %p)\n", __func__, xfile, bfile));
-                    DBG_KXTocFile(xfile);
-                    if (rc == 0)
-                        *f = xfile;
-                }
-                KFileRelease (bfile);
-            } while (0);
-        }
-        XTocCacheRelease (cache);
-    }
-    return rc;
-}
-
-
-static
-rc_t CC KXTocDirOpenFileRead	(const KXTocDir *self,
-                                 const KFile **f,
-                                 const char *path_,
-                                 va_list args)
-{
-    const char * path;
-    rc_t rc;
-
-    assert (self);
-    assert (f);
-    assert (path_);
-
-    DBGTOC (("%s: open %s\n", __func__, path_));
-
-    /* make sure we'll write something to the output pointer */
-    *f = NULL;
-
-    /* build path from format and arguments or just the format that is a path in and of itself */
-    rc = XTocMakePath (&path, true, path_, args);
-    if (rc)
-    {
-        PLOGERR (klogErr,
-                 (klogErr, rc, "Error opening file $(P)", "P=%s", path_));
-    }
-    else
-        rc = KXTocDirOpenFileReadInt (self, (const KXTocFile**)f, path);
-    free ((void*)path);
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KXTocDirOpenFileWrite
- *  opens an existing file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- */
-static
-rc_t CC KXTocDirOpenFileWrite	(KXTocDir *self,
-					 KFile **f,
-					 bool update,
-					 const char *path,
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (f != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcCreating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirCreateFile
- *  opens a file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "mode" [ IN ] - a creation mode (see explanation above).
- */
-static
-rc_t CC KXTocDirCreateFile	(KXTocDir *self,
-					 KFile **f,
-					 bool update,
-					 uint32_t access,
-					 KCreateMode cmode,
-					 const char *path,
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (f != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcCreating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirFileLocator
- *  returns locator in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "locator" [ OUT ] - return parameter for file locator
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t CC KXTocDirFileLocator		(const KXTocDir *self,
-					 uint64_t *locator,
-					 const char *path_,
-					 va_list args)
-{
-    const char * path;
-    rc_t rc;
-
-    assert (self);
-    assert (locator);
-    assert (path_);
-
-    *locator = 0;
-    path = NULL;
-    rc = XTocMakePath (&path, false, path_, args);
-    if (rc)
-        PLOGERR (klogErr,
-                 (klogErr, rc, "Error resolving path from $(P)", "P=%s", path_));
-    else
-    {
-        XTocEntry * entry;
-        rc = XTocEntryResolvePath (self->entry, path, false, &entry);
-        if (rc)
-            PLOGERR (klogErr,
-                     (klogErr, rc, "Error resolving path from $(P)", "P=%s", path_));
-        else if (entry->type != xtoce_file)
-            rc = RC (rcFS, rcDirectory, rcAccessing, rcPath, rcIncorrect);
-        else
-            *locator = entry->u.file.offset;
-        free ((void*)path);
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KXTocDirFileSize
- *  returns size in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "size" [ OUT ] - return parameter for file size
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t CC KXTocDirFileSize		(const KXTocDir *self,
-					 uint64_t *size,
-					 const char *path_,
-					 va_list args)
-{
-    const char * path;
-    rc_t rc;
-
-    assert (self);
-    assert (size);
-    assert (path_);
-
-    *size = 0;
-    path = NULL;
-    rc = XTocMakePath (&path, false, path_, args);
-    if (rc)
-        PLOGERR (klogErr,
-                 (klogErr, rc, "Error resolving path from $(P)", "P=%s", path_));
-    else
-    {
-        XTocEntry * entry;
-        rc = XTocEntryResolvePath (self->entry, path, false, &entry);
-        if (rc)
-            PLOGERR (klogErr,
-                     (klogErr, rc, "Error resolving path from $(P)", "P=%s", path_));
-        else if (entry->type != xtoce_file)
-            rc = RC (rcFS, rcDirectory, rcAccessing, rcPath, rcIncorrect);
-        else
-            *size = entry->u.file.size;
-        free ((void*)path);
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KXTocDirFileSize
- *  returns size in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "size" [ OUT ] - return parameter for file size
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t CC KXTocDirFilePhysicalSize        (const KXTocDir *self,
-					 uint64_t *size,
-					 const char *path_,
-					 va_list args)
-{
-    const char * path;
-    rc_t rc;
-
-    assert (self);
-    assert (size);
-    assert (path_);
-
-    *size = 0;
-    path = NULL;
-    rc = XTocMakePath (&path, false, path_, args);
-    if (rc)
-        PLOGERR (klogErr,
-                 (klogErr, rc, "Error resolving path from $(P)", "P=%s", path_));
-    else
-    {
-        XTocEntry * entry;
-        rc = XTocEntryResolvePath (self->entry, path, false, &entry);
-        if (rc)
-            PLOGERR (klogErr,
-                     (klogErr, rc, "Error resolving path from $(P)", "P=%s", path_));
-        else if (entry->type != xtoce_file)
-            rc = RC (rcFS, rcDirectory, rcAccessing, rcPath, rcIncorrect);
-        else
-            *size = entry->u.file.size;
-        free ((void*)path);
-    }
-    return rc;
-}
-
-
-/* ----------------------------------------------------------------------
- * KXTocDirSetFileSize
- *  sets size in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC KXTocDirSetFileSize	(KXTocDir *self,
-					 uint64_t size,
-					 const char *path,
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcWriting, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirOpenDirRead
- *
- *  opens a sub-directory
- *
- * [IN]  const KXTocDir *	self	Object Oriented C KXTocDir self
- * [OUT] const KDirectory **	subp	Where to put the new KDirectory/KXTocDir
- * [IN]  bool			chroot	Create a chroot cage for this new subdirectory
- * [IN]  const char *		path	Path to the directory to open
- * [IN]  va_list		args	So far the only use of args is possible additions to path
- */
-static 
-rc_t CC KXTocDirOpenDirRead	(const KXTocDir *self,
-					 const KDirectory **subp,
-					 bool chroot,
-					 const char *path,
-					 va_list args)
-{
-#if 1
-    return -1;
-#else
-    char * full;
-    rc_t rc;
-    size_t size;
-
-    assert (self != NULL);
-    assert (subp != NULL);
-    assert (path != NULL);
-
-    rc = KXTocDirMakePath (self, rcOpening, true, &full, path, args);
-    if (rc == 0)
-    {
-	const KTocEntry *	pnode;
-	KTocEntryType		type;
-	size_t path_size = string_measure (full, &size);
-
-	/* -----
-	 * get rid of any extra '/' characters at the end of path
-	 */
-	while (path_size > 0 && full [ path_size - 1 ] == '/')
-	    full [ -- path_size ] = 0;
-
-	/* -----
-	 * get the node for this path 
-	 */
-	rc = KXTocDirResolvePathNode (self, rcOpening, full, true, &pnode, &type);
-	if (rc == 0)
-	{
-            switch (type)
-            {
-            default:
-		/* fail */
-		rc = RC (rcFS, rcDirectory, rcOpening, rcPath, rcIncorrect);
-                break;
-            case ktocentrytype_dir:
-            case ktocentrytype_hardlink:
-	    {
-		KXTocDir *	sub;
-
-		rc = KXTocDirMake (&sub,
-				  rcOpening,
-				  self->parent,
-				  self->toc,
-				  pnode,
-				  self->archive.v,
-				  self->arctype,
-				  self->root,
-				  full,
-				  (uint32_t)path_size,
-				  false,
-				  chroot);
-		if (rc == 0)
-		{
-		    /* succeed */
-		    *subp = &sub->dad;
-		}
-	    }
-            }
-	}
-	free (full);
-    }
-    return rc;
-#endif
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirOpenDirUpdate
- *  opens a sub-directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "chroot" [ IN ] - if non-zero, the new directory becomes
- *  chroot'd and will interpret paths beginning with '/'
- *  relative to itself.
- */
-static
-rc_t CC KXTocDirOpenDirUpdate	(KXTocDir *self,
-					 KDirectory ** subp, 
-					 bool chroot, 
-					 const char *path, 
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (subp != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcUpdating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirCreateDir
- *  create a sub-directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "access" [ IN ] - standard Unix directory permissions
- *
- *  "mode" [ IN ] - a creation mode (see explanation above).
- */
-static
-rc_t CC KXTocDirCreateDir	(KXTocDir *self,
-					 uint32_t access,
-					 KCreateMode mode,
-					 const char *path,
-					 va_list args)
-{
-    assert (self != NULL);
-    assert (path != NULL);
-
-    return RC (rcFS, rcArc, rcCreating, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirDestroyFile
- */
-static
-rc_t CC KXTocDirDestroyFile	(KXTocDir *self,
-					 KFile * f)
-{
-    assert (self != NULL);
-    assert (f != NULL);
-
-    return RC (rcFS, rcArc, rcDestroying, rcSelf, rcUnsupported);
-}
-
-/* ----------------------------------------------------------------------
- * KXTocDirFileContiguous
- *  
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "contiguous" [ OUT ] - return parameter for file status
- */
-static
-rc_t CC KXTocDirFileContiguous		(const KXTocDir *self,
-                                         bool * contiguous,
-					 const char *path,
-                                         va_list args)
-{
-#if 1
-    return -1;
-#else
-    char *		full_path;
-    rc_t		rc;
-
-    assert (self != NULL);
-    assert (contiguous != NULL);
-    assert (path != NULL);
-
-    rc = KXTocDirMakePath (self, rcResolving, true,
-			  &full_path, path, args);
-
-    if (rc != 0)
-    {
-	/* can't "fix" path */
-	/*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-    }
-    else
-    {
-	const KTocEntry * pnode;
-	KTocEntryType     type;
-
-	rc = KXTocDirResolvePathNode (self, rcResolving, full_path, /*follow links*/true, &pnode, &type);
-
-	if (rc != 0)
-	{
-	    /* can't resolve path */
-	    /*rc = RC (rcFS, rcDirectory, rcResolving, rcPath, rcInvalid); ? or tweak it? */
-	}
-	else
-	{
-	    switch (type)
-	    {
-	    default:
-                *contiguous = false;
-		break;
-	    case ktocentrytype_emptyfile:
-	    case ktocentrytype_file:
-                *contiguous = true;
-		break;
-	    }
-	}
-	free (full_path);
-    }
-    return rc;
-#endif
-}
-/* ----------------------------------------------------------------------
- *
- */
-static KDirectory_vt_v1 vtKXTocDir =
-{
-    /* version 1.0 */
-    1, 3,
-
-    /* start minor version 0 methods*/
-    KXTocDirDestroy,
-    KXTocDirList,
-    KXTocDirVisit,
-    KXTocDirVisitUpdate,
-    KXTocDirPathType,
-    KXTocDirResolvePath,
-    KXTocDirResolveAlias,
-    KXTocDirRename,
-    KXTocDirRemove,
-    KXTocDirClearDir,
-    KXTocDirVAccess,
-    KXTocDirSetAccess,
-    KXTocDirCreateAlias,
-    KXTocDirOpenFileRead,
-    KXTocDirOpenFileWrite,
-    KXTocDirCreateFile,
-    KXTocDirFileSize,
-    KXTocDirSetFileSize,
-    KXTocDirOpenDirRead,
-    KXTocDirOpenDirUpdate,
-    KXTocDirCreateDir,
-    KXTocDirDestroyFile,
-    /* end minor version 0 methods*/
-    /* start minor version 1 methods*/
-    KXTocDirVDate,
-    KXTocDirSetDate,
-    KXTocDirGetSysDir,
-    /* end minor version 2 methods*/
-    KXTocDirFileLocator,
-    /* end minor version 2 methods*/
-    /* end minor version 3 methods*/
-    KXTocDirFilePhysicalSize,
-    KXTocDirFileContiguous
-    /* end minor version 3 methods*/
-};
-
-static
-rc_t KXTocDirMake (const KXTocDir ** pself, const KDirectory * base,
-                   XToc * toc, XTocCache * cache, XTocEntry * entry,
-                   const String * path)
-{
-    rc_t rc;
-    KXTocDir * self;
-
-    assert (pself);
-    assert (base);
-    assert (toc);
-    assert (cache);
-    assert (entry);
-    assert (path);
-
-    self = malloc (sizeof (*self) + 1 + StringSize (path));
-    if (self == NULL)
-        rc = RC (rcFS, rcDirectory, rcConstructing, rcMemory, rcExhausted);
-    else
-    {
-        char * pc;
-
-        self->base = base;        /* we take ownership of base */
-        self->toc = toc;
-        self->cache = cache;
-        self->entry = entry;
-        self->container = entry->container;
-        self->root = toc->root;
-
-        pc = (char *)(self + 1);
-        string_copy (pc, StringSize (path), path->addr, StringSize (path));
-        StringInit (&self->base_path, pc, StringSize (path), StringLength (path));
-
-        rc = KDirectoryInit (&self->dad, (const KDirectory_vt*)&vtKXTocDir,
-                             "KXTocDir", pc, false);
-        if (rc == 0)
-        {
-            *pself = self;
-            return 0;
-        }
-        free (self);
-    }
-    return rc;
-}
-
-
-static 
-rc_t KDirectoryOpenXTocDirReadInt (const KDirectory * dir,
-                                   const KDirectory ** pnew_dir,
-                                   const KFile * xml,
-                                   const String * spath)
-{
-    XToc * xtoc;
-    rc_t rc;
-
-    rc = XTocMake (&xtoc, spath);
-    if (rc)
-        LOGERR (klogErr, rc, "Error creating toc for xtc directory");
-    else
-    {
-        String sroot;
-        XTocCache * cache;
-
-        StringInitCString (&sroot, ".");
-        rc = XTocMakeXTocCache (xtoc, &cache, &sroot, xtoc->root);
-        if (rc)
-            LOGERR (klogErr, rc, 
-                    "Failed to make cache for root for "
-                    "xtoc directory");
-        else
-        {
-            const KXTocDir * xdir;
-
-            /* now that we have a cache node we should release
-             * the original reference to the xtoc */
-/* ??? */
-            XTocRelease (xtoc);
-
-            xtoc->cache = xtoc->root->cache = cache;
-
-            rc = KXTocDirMake (&xdir, dir, xtoc, cache, xtoc->root,
-                               &sroot);
-            if (rc)
-                LOGERR (klogErr, rc, "Error making xtoc directory");
-            else
-            {
-                DBG_KXTocDir((xdir));
-                cache->dir = xdir;
-
-                rc = XTocParseXml (xtoc->root, xml);
-                if (rc)
-                    LOGERR (klogErr, rc, "Error parsing copycat xml file");
-                else
-                {
-                    *pnew_dir = &xdir->dad;
-                    return 0;
-                }
-                KDirectoryRelease (&xdir->dad);
-            }                
-            XTocCacheRelease (cache);
-        }
-        XTocRelease (xtoc);
-    }
-    return rc;
-}
-
-rc_t CC KDirectoryOpenXTocDirReadDir (const KDirectory * self,
-                                                 const KDirectory ** pnew_dir,
-                                                 const KFile * xml,
-                                                 const String * spath)
-{
-    rc_t rc;
-    
-    /* loosely validate parameters */
-    if (pnew_dir == NULL)
-    {
-        rc = RC (rcFS, rcDirectory, rcOpening, rcParam, rcNull);
-        LOGERR (klogErr, rc,
-                "new directory parameter is NULL for opening XToc Directory");
-        return rc;
-    }
-    *pnew_dir = NULL;
-
-    if (self == NULL)
-    {
-        rc = RC (rcFS, rcDirectory, rcOpening, rcSelf, rcNull);
-        LOGERR (klogErr, rc, "self is NULL for opening XToc Directory");
-        return rc;
-    }
-    else if (xml == NULL)
-    {
-        rc = RC (rcFS, rcDirectory, rcOpening, rcParam, rcNull);
-        LOGERR (klogErr, rc, "xml parameter is NULL for opening XToc Directory");
-        return rc;
-    }
-    else if (spath == NULL)
-    {
-        rc = RC (rcFS, rcDirectory, rcOpening, rcParam, rcNull);
-        LOGERR (klogErr, rc, "base path parameter is NULL for opening XToc Directory");
-        return rc;
-    }
-    else
-    {
-        rc = KDirectoryOpenXTocDirReadInt (self, pnew_dir, xml, spath);
-    }
-    return rc;
-}
-
-
-rc_t CC KDirectoryVOpenXTocDirRead (const KDirectory * self,
-                                               const KDirectory ** pnew_dir,
-                                               bool chroot,
-                                               const KFile * xml,
-                                               const char * _path,
-                                               va_list args )
-{
-    rc_t rc;
-    
-    /* loosely validate parameters */
-    if (pnew_dir == NULL)
-    {
-        rc = RC (rcFS, rcDirectory, rcOpening, rcParam, rcNull);
-        LOGERR (klogErr, rc,
-                "new directory parameter is NULL for opening XToc Directory");
-        return rc;
-    }
-    *pnew_dir = NULL;
-
-    if (self == NULL)
-    {
-        rc = RC (rcFS, rcDirectory, rcOpening, rcSelf, rcNull);
-        LOGERR (klogErr, rc, "self is NULL for opening XToc Directory");
-        return rc;
-    }
-    else if (xml == NULL)
-    {
-        rc = RC (rcFS, rcDirectory, rcOpening, rcParam, rcNull);
-        LOGERR (klogErr, rc, "xml parameter is NULL for opening XToc Directory");
-        return rc;
-    }
-    else if (_path == NULL)
-    {
-        rc = RC (rcFS, rcDirectory, rcOpening, rcParam, rcNull);
-        LOGERR (klogErr, rc, "base path parameter is NULL for opening XToc Directory");
-        return rc;
-    }
-    else
-    /* okay none of our parameters are NULL; they could still be bad but let's start */
-    {
-        String spath;
-        const KDirectory * bdir;
-        KPathType type;
-        char path [8192];
-
-        rc = KDirectoryVResolvePath (self, true, path, sizeof path, _path, args);
-        if (rc)
-            return rc;
-
-        type = KDirectoryPathType (self, "%s", path);
-        switch (type & ~kptAlias)
-        {
-        case kptNotFound:
-            rc = RC (rcFS, rcDirectory, rcOpening, rcParam, rcNotFound);
-            LOGERR (klogErr, rc, "base path parameter is not found when opening XToc Directory");
-            return rc;
-
-        case kptBadPath:
-            rc = RC (rcFS, rcDirectory, rcOpening, rcParam, rcInvalid);
-            LOGERR (klogErr, rc, "base path parameter is a bad path when opening XToc Directory");
-            return rc;
-
-        case kptFile:
-        case kptCharDev:
-        case kptBlockDev:
-        case kptFIFO:
-        case kptZombieFile:
-        case kptDataset:
-        case kptDatatype:
-            KOutMsg ("%s: type '%u' path '%s'\n",type,path);
-            rc = RC (rcFS, rcDirectory, rcOpening, rcParam, rcWrongType);
-            LOGERR (klogErr, rc, "base path parameter is an unusable type when opening XToc Directory");
-            return rc;
-
-        default:
-            rc = RC (rcFS, rcDirectory, rcOpening, rcParam, rcCorrupt);
-            LOGERR (klogErr, rc, "base path parameter is not a known type when opening XToc Directory");
-            return rc;
-
-        case kptDir:
-            break;
-        }
-
-        rc = KDirectoryVOpenDirRead (self, &bdir, true, path, args);
-        if (rc)
-        {
-            LOGERR (klogErr, rc, "failed to open base directory for XToc directory");
-            return rc;
-        }
-        else
-        {
-            static const char absroot[] = "/";
-
-            if (chroot)
-                StringInitCString (&spath, absroot);
-            else
-                StringInitCString (&spath, path);
-
-            rc = KDirectoryOpenXTocDirReadInt (bdir, pnew_dir, xml, &spath);
-            if (rc == 0)
-                return 0;
-
-            KDirectoryRelease (bdir);
-        }
-    }
-    return rc;
-}
-
-
-rc_t CC KDirectoryOpenXTocDirRead (const KDirectory * self,
-                                              const KDirectory ** pnew_dir,
-                                              bool chroot,
-                                              const KFile * xml,
-                                              const char * path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start (args, path);
-    rc = KDirectoryVOpenXTocDirRead (self, pnew_dir, chroot, xml, path, args);
-    va_end (args);
-
-    return rc;
-}
-
-
-struct VFSManager;
-
-rc_t CC VFSManagerOpenXTocDirRead (const struct VFSManager * self,
-                                              const struct KDirectory ** pnew_dir,
-                                              const struct KFile * xml,
-                                              const struct VPath * path)
-{
-    rc_t rc = 0;
-
-    /* needs to be replaced with proper checking and rc returns */
-    assert (pnew_dir);
-
-    *pnew_dir = NULL;
-
-    assert (self);
-    assert (xml);
-    assert (path);
-
-    if (rc == 0)
-    {
-        const KDirectory * dir;
-
-        rc = VFSManagerOpenDirectoryRead (self, &dir, path);
-        if (rc == 0)
-        {
-            char pbuff [8192];
-            size_t z;
-
-            rc = VPathReadPath (path, pbuff, sizeof pbuff, &z);
-            if (rc == 0)
-            {
-                String string;
-
-                StringInit (&string, pbuff, z, string_len (pbuff, z));
-
-                rc = KDirectoryOpenXTocDirReadDir (dir, pnew_dir, xml, &string);
-                if (rc == 0)
-                    return 0;
-            }
-
-            KDirectoryRelease (dir);
-        }
-    }
-    return rc;
-}
-
-
-
-/* end of file */
diff --git a/libs/loader/Makefile b/libs/loader/Makefile
deleted file mode 100644
index d4fe442..0000000
--- a/libs/loader/Makefile
+++ /dev/null
@@ -1,88 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: all
-
-TOP ?= $(abspath ../..)
-MODULE = libs/loader
-
-INT_LIBS = \
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES = \
-	$(LOADER_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# libloader
-#
-$(ILIBDIR)/libloader: $(ILIBDIR)/libloader.$(LIBX)
-
-LOADER_SRC = \
-    mmarray \
-	common-reader \
-	common-writer \
-	sequence-writer \
-	reference-writer \
-	alignment-writer
-
-LOADER_OBJ = \
-	$(addsuffix .$(LOBX),$(LOADER_SRC))
-
-$(ILIBDIR)/libloader.$(LIBX): $(LOADER_OBJ)
-	$(LD) --slib -o $@ $^ $(LOADER_LIB)
-
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/loader/alignment-writer.c b/libs/loader/alignment-writer.c
deleted file mode 100644
index b865b0d..0000000
--- a/libs/loader/alignment-writer.c
+++ /dev/null
@@ -1,271 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <sysalloc.h>
-#include <klib/out.h>
-
-#include <vdb/vdb-priv.h>
-#include <klib/data-buffer.h>
-
-#include <loader/alignment-writer.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-enum e_tables {
-    tblPrimary,
-    tblSecondary,
-    tblN
-};
-
-struct AlignmentWriter {
-    VDatabase *db;
-    TableWriterAlgn const *tbl[tblN];
-    int64_t rowId;
-    int st;
-};
-
-AlignmentWriter *AlignmentMake(VDatabase *db) {
-    AlignmentWriter *self = calloc(1, sizeof(*self));
-    
-    if (self) {
-        self->db = db;
-        VDatabaseAddRef(self->db);
-    }
-    return self;
-}
-
-static rc_t SetColumnDefaults(TableWriterAlgn const *tbl)
-{
-    return 0;
-}
-
-static rc_t WritePrimaryRecord(AlignmentWriter *const self, AlignmentRecord *const data, bool expectUnsorted)
-{
-    if (self->tbl[tblPrimary] == NULL) {
-        rc_t rc = TableWriterAlgn_Make(&self->tbl[tblPrimary], self->db,
-                                       ewalgn_tabletype_PrimaryAlignment,
-                                       ewalgn_co_TMP_KEY_ID + 
-                                       (expectUnsorted ? ewalgn_co_unsorted : 0));
-        if (rc)
-            return rc;
-        rc = SetColumnDefaults(self->tbl[tblPrimary]);
-        if (rc)
-            return rc;
-    }
-    return TableWriterAlgn_Write(self->tbl[tblPrimary], &data->data, &data->alignId);
-}
-
-static rc_t WriteSecondaryRecord(AlignmentWriter *const self, AlignmentRecord *const data, bool expectUnsorted)
-{
-    if (self->tbl[tblSecondary] == NULL) {
-        rc_t rc = TableWriterAlgn_Make(&self->tbl[tblSecondary], self->db,
-                                       ewalgn_tabletype_SecondaryAlignment,
-                                       ewalgn_co_TMP_KEY_ID + 
-                                       (expectUnsorted ? ewalgn_co_unsorted : 0));
-        if (rc)
-            return rc;
-        rc = SetColumnDefaults(self->tbl[tblSecondary]);
-        if (rc)
-            return rc;
-    }
-#if 1
-    /* try to make consistent with cg-load */
-    if (data->mate_ref_pos == 0) {
-        data->data.mate_ref_orientation.elements = 0;
-    }
-#endif
-    return TableWriterAlgn_Write(self->tbl[tblSecondary], &data->data, &data->alignId);
-}
-
-rc_t AlignmentWriteRecord(AlignmentWriter *const self, AlignmentRecord *const data, bool expectUnsorted)
-{
-    return data->isPrimary ? WritePrimaryRecord(self, data, expectUnsorted) : WriteSecondaryRecord(self, data, expectUnsorted);
-}
-
-rc_t AlignmentStartUpdatingSpotIds(AlignmentWriter *const self)
-{
-    return 0;
-}
-
-rc_t AlignmentGetSpotKey(AlignmentWriter * const self, uint64_t *keyId, int64_t *alignId, bool *isPrimary)
-{
-    rc_t rc;
-    
-    switch (self->st) {
-    case 0:
-        rc = TableWriterAlgn_TmpKeyStart(self->tbl[tblPrimary]);
-        if (rc)
-            break;
-        self->rowId = 0;
-        ++self->st;
-    case 1:
-        rc = TableWriterAlgn_TmpKey(self->tbl[tblPrimary], ++self->rowId, keyId);
-        if (rc == 0) {
-            *alignId = self->rowId;
-            *isPrimary = true;
-            break;
-        }
-        ++self->st;
-        if (GetRCState(rc) != rcNotFound || GetRCObject(rc) != rcRow || self->tbl[tblSecondary] == NULL)
-            break;
-    case 2:
-        rc = TableWriterAlgn_TmpKeyStart(self->tbl[tblSecondary]);
-        if (rc)
-            break;
-        self->rowId = 0;
-        ++self->st;
-    case 3:
-        rc = TableWriterAlgn_TmpKey(self->tbl[tblSecondary], ++self->rowId, keyId);
-        if (rc == 0) {
-            *alignId = self->rowId;
-            *isPrimary = false;
-            break;
-        }
-        if (GetRCState(rc) != rcNotFound || GetRCObject(rc) != rcRow)
-            break;
-        ++self->st;
-        break;
-    default:
-        rc = RC(rcAlign, rcTable, rcUpdating, rcError, rcIgnored);
-        break;
-    }
-    return rc;
-}
-
-rc_t AlignmentGetRefPos(AlignmentWriter *const self, int64_t row, ReferenceStart *const rslt)
-{
-    switch (self->st) {
-    case 1:
-        return TableWriterAlgn_RefStart(self->tbl[tblPrimary], self->rowId, rslt);
-    case 3:
-    default:
-        return RC(rcAlign, rcTable, rcUpdating, rcSelf, rcInconsistent);
-    }
-}
-
-rc_t AlignmentUpdateInfo(AlignmentWriter * const self, int64_t const spotId, int64_t const mateId, ReferenceStart const *mateRefPos)
-{
-    switch (self->st) {
-    case 1:
-        return TableWriterAlgn_Write_SpotInfo(self->tbl[tblPrimary], self->rowId, spotId, mateId, mateRefPos);
-    case 3:
-        return TableWriterAlgn_Write_SpotInfo(self->tbl[tblSecondary], self->rowId, spotId, 0, 0);
-    default:
-        return RC(rcAlign, rcTable, rcUpdating, rcSelf, rcInconsistent);
-    }
-}
-
-rc_t AlignmentWhack(AlignmentWriter * const self, bool const commit) 
-{
-    rc_t const rc = TableWriterAlgn_Whack(self->tbl[tblPrimary], commit, NULL);
-    rc_t const rc2 = self->tbl[tblSecondary] ? TableWriterAlgn_Whack(self->tbl[tblSecondary], commit | (rc == 0), NULL) : 0;
-
-    VDatabaseRelease(self->db);
-    free(self);
-    return rc ? rc : rc2;
-}
-
-static size_t AlignmentRecordBufferSize(unsigned const readlen, bool const hasMismatchQual)
-{
-    AlignmentRecord const *const dummy = NULL;
-    size_t const elemSize = sizeof(AR_OFFSET(*dummy)[0])
-					      + sizeof(AR_OFFSET_TYPE(*dummy)[0])
-                          + sizeof(AR_HAS_MISMATCH(*dummy)[0])
-                          + sizeof(AR_HAS_OFFSET(*dummy)[0])
-                          + sizeof(AR_MISMATCH(*dummy)[0])
-                          + (hasMismatchQual ? sizeof(AR_MISMATCH_QUAL(*dummy)[0]) : 0);
-    
-    return elemSize * readlen;
-}
-
-rc_t AlignmentRecordInit(AlignmentRecord *self, unsigned readlen,
-                         bool expectUnsorted,
-                         bool hasMismatchQual
-                         )
-{
-    KDataBuffer buffer = self->buffer;
-
-    memset(self, 0, sizeof(*self));
-    buffer.elem_bits = 8;
-    {
-        size_t const need = AlignmentRecordBufferSize(readlen, hasMismatchQual);
-        rc_t const rc = KDataBufferResize(&buffer, need);
-        if (rc) return rc;
-    }
-    self->buffer = buffer;
-
-    self->data.seq_read_id.buffer = &self->read_id;
-    self->data.seq_read_id.elements = 1;
-    self->data.ref_id.buffer = &self->ref_id;
-    self->data.ref_id.elements = 1;
-    if (expectUnsorted) {
-        self->data.ref_start.buffer = &self->ref_start;
-        self->data.ref_start.elements = 1;
-    }
-    else {
-        self->data.global_ref_start.buffer = &self->global_ref_start;
-        self->data.global_ref_start.elements = 1;
-    }
-    self->data.ref_orientation.buffer = &self->ref_orientation;
-    self->data.ref_orientation.elements = 1;
-    self->data.mapq.buffer = &self->mapq;
-    self->data.mapq.elements = 1;
-    self->data.tmp_key_id.buffer = &self->tmp_key_id;
-    self->data.tmp_key_id.elements = 1;
-    
-    self->data.read_start.buffer = &self->read_start;
-    self->data.read_start.elements = 1;
-    self->data.read_len.buffer = &self->read_len;
-    self->data.read_len.elements = 1;
-    
-    self->data.mate_ref_orientation.buffer = &self->mate_ref_orientation;
-    self->data.mate_ref_orientation.elements = 1;
-    self->data.mate_ref_id.buffer = &self->mate_ref_id;
-    self->data.mate_ref_id.elements = 1;
-    self->data.mate_ref_pos.buffer = &self->mate_ref_pos;
-    self->data.mate_ref_pos.elements = 1;
-    self->data.mate_align_id.buffer = &self->mate_align_id;
-    self->data.mate_align_id.elements = 1;
-    self->data.template_len.buffer = &self->template_len;
-    self->data.template_len.elements = 1;
-    
-    self->data.ref_offset.buffer = buffer.base;
-    self->data.ref_offset_type.buffer = &AR_OFFSET(*self)[readlen];
-    self->data.has_mismatch.buffer = &AR_OFFSET_TYPE(*self)[readlen];
-    self->data.has_mismatch.elements = readlen;
-    self->data.has_ref_offset.buffer = &AR_HAS_MISMATCH(*self)[readlen];
-    self->data.has_ref_offset.elements = readlen;
-    self->data.mismatch.buffer = &AR_HAS_OFFSET(*self)[readlen];
-    
-    if (hasMismatchQual)
-        self->data.mismatch_qual.buffer = (uint8_t *)&AR_MISMATCH(*self)[readlen];
-    
-    return 0;
-}
diff --git a/libs/loader/common-writer.c b/libs/loader/common-writer.c
deleted file mode 100644
index 7a1da7d..0000000
--- a/libs/loader/common-writer.c
+++ /dev/null
@@ -1,2067 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
- 
-#include <sysalloc.h>
-#include <string.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <klib/printf.h>
-#include <klib/status.h>
-
-#include <kdb/btree.h>
-
-#include <kfs/pmem.h>
-#include <kfs/file.h>
-#include <kfs/pagefile.h>
-
-#include <kapp/progressbar.h>
-#include <kapp/main.h>
-
-#include <vdb/manager.h>
-#include <vdb/database.h>
-
-#include <loader/sequence-writer.h>
-#include <loader/alignment-writer.h>
-#include <loader/reference-writer.h>
-#include <loader/common-writer.h>
-#include <loader/common-reader-priv.h>
-
-/*--------------------------------------------------------------------------
- * ctx_value_t, FragmentInfo
- */
-typedef struct {
-    uint32_t primaryId[2];
-    uint32_t spotId;
-    uint32_t fragmentId;
-    uint16_t seqHash[2];
-    uint8_t  platform;
-    uint8_t  pId_ext[2];
-    uint8_t  spotId_ext;
-    uint8_t  alignmentCount[2]; /* 0..254; 254: saturated max; 255: special meaning "too many" */
-    uint8_t  unmated: 1,
-             pcr_dup: 1,
-             has_a_read: 1,
-             unaligned_1: 1,
-             unaligned_2: 1;
-} ctx_value_t;
-
-#define CTX_VALUE_SET_P_ID(O,N,V) do { int64_t tv = (V); (O).primaryId[N] = (uint32_t)tv; (O).pId_ext[N] = tv >> 32; } while(0);
-#define CTX_VALUE_GET_P_ID(O,N) ((((int64_t)((O).pId_ext[N])) << 32) | (O).primaryId[N])
-
-#define CTX_VALUE_SET_S_ID(O,V) do { int64_t tv = (V); (O).spotId = (uint32_t)tv; (O).spotId_ext = tv >> 32; } while(0);
-#define CTX_VALUE_GET_S_ID(O) ((((int64_t)(O).spotId_ext) << 32) | (O).spotId)
-
-typedef struct FragmentInfo {
-    uint64_t ti;
-    uint32_t readlen;
-    uint8_t  aligned;
-    uint8_t  is_bad;
-    uint8_t  orientation;
-    uint8_t  otherReadNo;
-    uint8_t  sglen;
-    uint8_t  cskey;
-} FragmentInfo;
-
-
-rc_t OpenKBTree(const CommonWriterSettings* settings, struct KBTree **const rslt, size_t const n, size_t const max)
-{
-    size_t const cacheSize = (((settings->cache_size - (settings->cache_size / 2) - (settings->cache_size / 8)) / max)
-                            + 0xFFFFF) & ~((size_t)0xFFFFF);
-    KFile *file = NULL;
-    KDirectory *dir;
-    char fname[4096];
-    rc_t rc;
-
-    rc = KDirectoryNativeDir(&dir);
-    if (rc)
-        return rc;
-    
-    rc = string_printf(fname, sizeof(fname), NULL, "%s/key2id.%u.%u", settings->tmpfs, settings->pid, n); if (rc) return rc;
-    STSMSG(1, ("Path for scratch files: %s\n", fname));
-    rc = KDirectoryCreateFile(dir, &file, true, 0600, kcmInit, "%s", fname);
-    KDirectoryRemove(dir, 0, "%s", fname);
-    KDirectoryRelease(dir);
-    if (rc == 0) {
-        rc = KBTreeMakeUpdate(rslt, file, cacheSize,
-                              false, kbtOpaqueKey,
-                              1, 255, sizeof ( uint32_t ),
-                              NULL
-                              );
-        KFileRelease(file);
-#if PERF
-        if (rc == 0) {
-            static unsigned treecount = 0;
-
-            (void)PLOGMSG(klogInfo, (klogInfo, "Number of trees: $(cnt)", "cnt=%u", ++treecount));
-        }
-#endif
-    }
-    return rc;
-}
-
-rc_t GetKeyIDOld(const CommonWriterSettings* settings, SpotAssembler* const ctx, uint64_t *const rslt, bool *const wasInserted, char const key[], char const name[], size_t const namelen)
-{
-    size_t const keylen = strlen(key);
-    rc_t rc;
-    uint64_t tmpKey;
-
-    if (ctx->key2id_count == 0) {
-        rc = OpenKBTree(settings, &ctx->key2id[0], 1, 1);
-        if (rc) return rc;
-        ctx->key2id_count = 1;
-    }
-    if (keylen == 0 || memcmp(key, name, keylen) == 0) {
-        /* qname starts with read group; no append */
-        tmpKey = ctx->idCount[0];
-        rc = KBTreeEntry(ctx->key2id[0], &tmpKey, wasInserted, name, namelen);
-    }
-    else {
-        char sbuf[4096];
-        char *buf = sbuf;
-        char *hbuf = NULL;
-        size_t bsize = sizeof(sbuf);
-        size_t actsize;
-        
-        if (keylen + namelen + 2 > bsize) {
-            hbuf = malloc(bsize = keylen + namelen + 2);
-            if (hbuf == NULL)
-                return RC(rcExe, rcName, rcAllocating, rcMemory, rcExhausted);
-            buf = hbuf;
-        }
-        rc = string_printf(buf, bsize, &actsize, "%s\t%.*s", key, (int)namelen, name);
-        
-        tmpKey = ctx->idCount[0];
-        rc = KBTreeEntry(ctx->key2id[0], &tmpKey, wasInserted, buf, actsize);
-        if (hbuf)
-            free(hbuf);
-    }
-    if (rc == 0) {
-        *rslt = tmpKey;
-        if (*wasInserted)
-            ++ctx->idCount[0];
-    }
-    return rc;
-}
-
-#if _DEBUGGING
-/*
-static char const *Print_ctx_value_t(ctx_value_t const *const self)
-{
-    static char buffer[4096];
-    uint8_t const *const flag = self->alignmentCount + 2;
-    rc_t rc = string_printf(buffer, sizeof(buffer), NULL,
-                            "pid: { %lu, %lu }, sid: %lu, fid: %u, alc: { %u, %u }, flg: %x",
-                            CTX_VALUE_GET_P_ID(*self, 0),
-                            CTX_VALUE_GET_P_ID(*self, 1),
-                            CTX_VALUE_GET_S_ID(*self),
-                            self->fragmentId,
-                            self->alignmentCount[0],
-                            self->alignmentCount[1],
-                            *flag);
-
-    if (rc)
-        return 0;
-    return buffer;
-}
-*/
-#endif
-
-static unsigned HashKey(void const *const key, size_t const keylen)
-{
-    /* There is nothing special about this hash. It was randomly generated. */
-    static const uint8_t T1[] = {
-         64, 186,  39, 203,  54, 211,  98,  32,  26,  23, 219,  94,  77,  60,  56, 184,
-        129, 242,  10,  91,  84, 192,  19, 197, 231, 133, 125, 244,  48, 176, 160, 164,
-         17,  41,  57, 137,  44, 196, 116, 146, 105,  40, 122,  47, 220, 226, 213, 212,
-        107, 191,  52, 144,   9, 145,  81, 101, 217, 206,  85, 134, 143,  58, 128,  20,
-        236, 102,  83, 149, 148, 180, 167, 163,  12, 239,  31,   0,  73, 152,   1,  15,
-         75, 200,   4, 165,   5,  66,  25, 111, 255,  70, 174, 151,  96, 126, 147,  34,
-        112, 161, 127, 181, 237,  78,  37,  74, 222, 123,  21, 132,  95,  51, 141,  45,
-         61, 131, 193,  68,  62, 249, 178,  33,   7, 195, 228,  82,  27,  46, 254,  90,
-        185, 240, 246, 124, 205, 182,  42,  22, 198,  69, 166,  92, 169, 136, 223, 245,
-        118,  97, 115,  80, 252, 209,  49,  79, 221,  38,  28,  35,  36, 208, 187, 248,
-        158, 201, 202, 168,   2,  18, 189, 119, 216, 214,  11,   6,  89,  16, 229, 109,
-        120,  43, 162, 106, 204,   8, 199, 235, 142, 210,  86, 153, 227, 230,  24, 100,
-        224, 113, 190, 243, 218, 215, 225, 173,  99, 238, 138,  59, 183, 154, 171, 232,
-        157, 247, 233,  67,  88,  50, 253, 251, 140, 104, 156, 170, 150, 103, 117, 110,
-        155,  72, 207, 250, 159, 194, 177, 130, 135,  87,  71, 175,  14,  55, 172, 121,
-        234,  13,  30, 241,  93, 188,  53, 114,  76,  29,  65,   3, 179, 108,  63, 139
-    };
-    unsigned h = 0x55;
-    size_t i = keylen;
-    
-    do { h = T1[h ^ ((uint8_t)i)]; } while ((i >>= 8) != 0);
-
-    for (i = 0; i != keylen; ++i)
-        h = T1[h ^ ((uint8_t const *)key)[i]];
-
-    return h;
-}
-
-static unsigned SeqHashKey(void const *const key, size_t const keylen)
-{
-    /* There is nothing special about this hash. It was randomly generated. */
-    static const uint8_t T1[] = {
-         64, 186,  39, 203,  54, 211,  98,  32,  26,  23, 219,  94,  77,  60,  56, 184,
-        129, 242,  10,  91,  84, 192,  19, 197, 231, 133, 125, 244,  48, 176, 160, 164,
-         17,  41,  57, 137,  44, 196, 116, 146, 105,  40, 122,  47, 220, 226, 213, 212,
-        107, 191,  52, 144,   9, 145,  81, 101, 217, 206,  85, 134, 143,  58, 128,  20,
-        236, 102,  83, 149, 148, 180, 167, 163,  12, 239,  31,   0,  73, 152,   1,  15,
-         75, 200,   4, 165,   5,  66,  25, 111, 255,  70, 174, 151,  96, 126, 147,  34,
-        112, 161, 127, 181, 237,  78,  37,  74, 222, 123,  21, 132,  95,  51, 141,  45,
-         61, 131, 193,  68,  62, 249, 178,  33,   7, 195, 228,  82,  27,  46, 254,  90,
-        185, 240, 246, 124, 205, 182,  42,  22, 198,  69, 166,  92, 169, 136, 223, 245,
-        118,  97, 115,  80, 252, 209,  49,  79, 221,  38,  28,  35,  36, 208, 187, 248,
-        158, 201, 202, 168,   2,  18, 189, 119, 216, 214,  11,   6,  89,  16, 229, 109,
-        120,  43, 162, 106, 204,   8, 199, 235, 142, 210,  86, 153, 227, 230,  24, 100,
-        224, 113, 190, 243, 218, 215, 225, 173,  99, 238, 138,  59, 183, 154, 171, 232,
-        157, 247, 233,  67,  88,  50, 253, 251, 140, 104, 156, 170, 150, 103, 117, 110,
-        155,  72, 207, 250, 159, 194, 177, 130, 135,  87,  71, 175,  14,  55, 172, 121,
-        234,  13,  30, 241,  93, 188,  53, 114,  76,  29,  65,   3, 179, 108,  63, 139
-    };
-    unsigned h1 = 0x55;
-    unsigned h2 = 0x22;
-    size_t i = keylen;
-    
-    do { h1 = T1[h1 ^ ((uint8_t)i)]; } while ((i >>= 8) != 0);
-
-    for (i = 0; i != keylen; ++i)
-    {
-        unsigned temp = ((uint8_t const *)key)[i];
-        h1 = T1[h1 ^ temp];
-        h2 = T1[h2 ^ temp];
-    }
-
-    return (h1 << 8) | h2;
-}
-
-#define USE_ILLUMINA_NAMING_POUND_NUMBER_SLASH_HACK 1
-
-static size_t GetFixedNameLength(char const name[], size_t const namelen)
-{
-#if USE_ILLUMINA_NAMING_POUND_NUMBER_SLASH_HACK
-    char const *const pound = string_chr(name, namelen, '#');
-    
-    if (pound && pound + 2u < name + namelen && pound[1] >= '0' && pound[1] <= '9' && pound[2] == '/') {
-        return (size_t)(pound - name) + 2u;
-    }
-#endif
-    return namelen;
-}
-
-rc_t GetKeyID(CommonWriterSettings *const settings,
-              SpotAssembler *const ctx,
-              uint64_t *const rslt,
-              bool *const wasInserted,
-              char const key[],
-              char const name[],
-              size_t const o_namelen)
-{
-    size_t const namelen = GetFixedNameLength(name, o_namelen);
-
-    if (ctx->key2id_max == 1)
-        return GetKeyIDOld(settings, ctx, rslt, wasInserted, key, name, namelen);
-    else {
-        size_t const keylen = strlen(key);
-        unsigned const h = HashKey(key, keylen);
-        size_t f;
-        size_t e = ctx->key2id_count;
-        uint64_t tmpKey;
-        
-        *rslt = 0;
-        {{
-            uint32_t const bucket_value = ctx->key2id_hash[h];
-            unsigned const n  = (uint8_t) bucket_value;
-            unsigned const i1 = (uint8_t)(bucket_value >>  8);
-            unsigned const i2 = (uint8_t)(bucket_value >> 16);
-            unsigned const i3 = (uint8_t)(bucket_value >> 24);
-            
-            if (n > 0 && strcmp(key, ctx->key2id_names + ctx->key2id_name[i1]) == 0) {
-                f = i1;
-                /*
-                ctx->key2id_hash[h] = (i3 << 24) | (i2 << 16) | (i1 << 8) | n;
-                 */
-                goto GET_ID;
-            }
-            if (n > 1 && strcmp(key, ctx->key2id_names + ctx->key2id_name[i2]) == 0) {
-                f = i2;
-                ctx->key2id_hash[h] = (i3 << 24) | (i1 << 16) | (i2 << 8) | n;
-                goto GET_ID;
-            }
-            if (n > 2 && strcmp(key, ctx->key2id_names + ctx->key2id_name[i3]) == 0) {
-                f = i3;
-                ctx->key2id_hash[h] = (i2 << 24) | (i1 << 16) | (i3 << 8) | n;
-                goto GET_ID;
-            }
-        }}
-        f = 0;
-        while (f < e) {
-            size_t const m = (f + e) / 2;
-            size_t const oid = ctx->key2id_oid[m];
-            int const diff = strcmp(key, ctx->key2id_names + ctx->key2id_name[oid]);
-            
-            if (diff < 0)
-                e = m;
-            else if (diff > 0)
-                f = m + 1;
-            else {
-                f = oid;
-                goto GET_ID;
-            }
-        }
-        if (ctx->key2id_count < ctx->key2id_max) {
-            size_t const name_max = ctx->key2id_name_max + keylen + 1;
-            KBTree *tree;
-            rc_t rc = OpenKBTree(settings, &tree, ctx->key2id_count + 1, 1); /* ctx->key2id_max); */
-            
-            if (rc) return rc;
-            
-            if (ctx->key2id_name_alloc < name_max) {
-                size_t alloc = ctx->key2id_name_alloc;
-                void *tmp;
-                
-                if (alloc == 0)
-                    alloc = 4096;
-                while (alloc < name_max)
-                    alloc <<= 1;
-                tmp = realloc(ctx->key2id_names, alloc);
-                if (tmp == NULL)
-                    return RC(rcExe, rcName, rcAllocating, rcMemory, rcExhausted);
-                ctx->key2id_names = tmp;
-                ctx->key2id_name_alloc = alloc;
-            }
-            if (f < ctx->key2id_count) {
-                memmove(&ctx->key2id_oid[f + 1], &ctx->key2id_oid[f], (ctx->key2id_count - f) * sizeof(ctx->key2id_oid[f]));
-            }
-            ctx->key2id_oid[f] = ctx->key2id_count;
-            ++ctx->key2id_count;
-            f = ctx->key2id_oid[f];
-            ctx->key2id_name[f] = ctx->key2id_name_max;
-            ctx->key2id_name_max = name_max;
-
-            memcpy(&ctx->key2id_names[ctx->key2id_name[f]], key, keylen + 1);
-            ctx->key2id[f] = tree;
-            ctx->idCount[f] = 0;
-            if ((uint8_t)ctx->key2id_hash[h] < 3) {
-                unsigned const n = (uint8_t)ctx->key2id_hash[h] + 1;
-                
-                ctx->key2id_hash[h] = (uint32_t)((((ctx->key2id_hash[h] & ~(0xFFu)) | f) << 8) | n);
-            }
-            else {
-                /* the hash function isn't working too well
-                 * keep the 3 mru
-                 */
-                ctx->key2id_hash[h] = (uint32_t)((((ctx->key2id_hash[h] & ~(0xFFu)) | f) << 8) | 3);
-            }
-        GET_ID:
-            tmpKey = ctx->idCount[f];
-            rc = KBTreeEntry(ctx->key2id[f], &tmpKey, wasInserted, name, namelen);
-            if (rc == 0) {
-                *rslt = (((uint64_t)f) << 32) | tmpKey;
-                if (*wasInserted)
-                    ++ctx->idCount[f];
-                assert(tmpKey < ctx->idCount[f]);
-            }
-            return rc;
-        }
-        return RC(rcExe, rcTree, rcAllocating, rcConstraint, rcViolated);
-    }
-}
-
-static rc_t OpenMMapFile(const CommonWriterSettings* settings, SpotAssembler *const ctx, KDirectory *const dir)
-{
-    KFile *file = NULL;
-    char fname[4096];
-    rc_t rc = string_printf(fname, sizeof(fname), NULL, "%s/id2value.%u", settings->tmpfs, settings->pid);
-    
-    if (rc)
-        return rc;
-    
-    rc = KDirectoryCreateFile(dir, &file, true, 0600, kcmInit, "%s", fname);
-    KDirectoryRemove(dir, 0, "%s", fname);
-    if (rc == 0)
-        rc = MMArrayMake(&ctx->id2value, file, sizeof(ctx_value_t));
-    KFileRelease(file);
-    return rc;
-}
-
-static rc_t OpenMBankFile(const CommonWriterSettings* settings, SpotAssembler *const ctx, KDirectory *const dir)
-{
-    KFile *file = NULL;
-    char fname[4096];
-    KMemBank **const mbank = &ctx->fragsBoth;
-    rc_t rc = string_printf(fname, sizeof(fname), NULL, "%s/fragments.%u", settings->tmpfs, settings->pid);
-    
-    if (rc)
-        return rc;
-    
-    rc = KDirectoryCreateFile(dir, &file, true, 0600, kcmInit, "%s", fname);
-    KDirectoryRemove(dir, 0, "%s", fname);
-    if (rc == 0) {
-        rc = KMemBankMake(mbank, 0, 0, file);
-        KFileRelease(file);
-    }
-    return rc;
-}
-
-rc_t SetupContext(const CommonWriterSettings* settings, SpotAssembler *ctx)
-{
-    rc_t rc = 0;
-
-    memset(ctx, 0, sizeof(*ctx));
-    
-    ctx->pass = 1;
-    
-    if (settings->mode == mode_Archive) {
-        KDirectory *dir;
-
-        STSMSG(1, ("Cache size: %uM\n", settings->cache_size / 1024 / 1024));
-        
-        rc = KLoadProgressbar_Make(&ctx->progress[0], 0); if (rc) return rc;
-        rc = KLoadProgressbar_Make(&ctx->progress[1], 0); if (rc) return rc;
-        rc = KLoadProgressbar_Make(&ctx->progress[2], 0); if (rc) return rc;
-        rc = KLoadProgressbar_Make(&ctx->progress[3], 0); if (rc) return rc;
-        
-        KLoadProgressbar_Append(ctx->progress[0], 100 * settings->numfiles);
-        
-        rc = KDirectoryNativeDir(&dir);
-        if (rc == 0)
-            rc = OpenMMapFile(settings, ctx, dir);
-        if (rc == 0)
-            rc = OpenMBankFile(settings, ctx, dir);
-        KDirectoryRelease(dir);
-    }
-    return rc;
-}
-
-void ContextReleaseMemBank(SpotAssembler *ctx)
-{
-    KMemBankRelease(ctx->fragsBoth);
-    ctx->fragsBoth = NULL;
-}
-
-void ContextRelease(SpotAssembler *ctx)
-{
-    KLoadProgressbar_Release(ctx->progress[0], true);
-    KLoadProgressbar_Release(ctx->progress[1], true);
-    KLoadProgressbar_Release(ctx->progress[2], true);
-    KLoadProgressbar_Release(ctx->progress[3], true);
-    MMArrayWhack(ctx->id2value);
-}
-
-static
-rc_t WriteSoloFragments(const CommonWriterSettings* settings, SpotAssembler* ctx, SequenceWriter *seq)
-{
-    uint32_t i;
-    unsigned j;
-    uint64_t idCount = 0;
-    rc_t rc;
-    KDataBuffer fragBuf;
-    SequenceRecord srec;
-    
-    ++ctx->pass;
-    memset(&srec, 0, sizeof(srec));
-    
-    rc = KDataBufferMake(&fragBuf, 8, 0);
-    if (rc) {
-        (void)LOGERR(klogErr, rc, "KDataBufferMake failed");
-        return rc;
-    }
-    for (idCount = 0, j = 0; j < ctx->key2id_count; ++j) {
-        idCount += ctx->idCount[j];
-    }
-    KLoadProgressbar_Append(ctx->progress[ctx->pass - 1], idCount);
-    
-    for (idCount = 0, j = 0; j < ctx->key2id_count; ++j) {
-        for (i = 0; i != ctx->idCount[j]; ++i, ++idCount) {
-            uint64_t const keyId = ((uint64_t)j << 32) | i;
-            ctx_value_t *value;
-            size_t rsize;
-            uint64_t id;
-            uint64_t sz;
-            unsigned readLen[2];
-            unsigned read = 0;
-            FragmentInfo const *fip;
-            uint8_t const *src;
-            KMemBank *frags = ctx->fragsBoth;
-            
-            rc = MMArrayGet(ctx->id2value, (void **)&value, keyId);
-            if (rc)
-                break;
-            KLoadProgressbar_Process(ctx->progress[ctx->pass - 1], 1, false);
-
-            id = value->fragmentId;
-            if (id == 0)
-                continue;
-            
-            rc = KMemBankSize(frags, id, &sz);
-            if (rc) {
-                (void)LOGERR(klogErr, rc, "KMemBankSize failed");
-                break;
-            }
-            rc = KDataBufferResize(&fragBuf, (size_t)sz);
-            if (rc) {
-                (void)LOGERR(klogErr, rc, "KDataBufferResize failed");
-                break;
-            }
-            rc = KMemBankRead(frags, id, 0, fragBuf.base, sz, &rsize);
-            if (rc) {
-                (void)LOGERR(klogErr, rc, "KMemBankRead failed");
-                break;
-            }
-            assert( rsize == sz );
-            fip = (FragmentInfo const *)fragBuf.base;
-            src = (uint8_t const *)&fip[1];
-            
-            readLen[0] = readLen[1] = 0;
-            if (!value->unmated && (   (fip->aligned && CTX_VALUE_GET_P_ID(*value, 0) == 0)
-                                     || (value->unaligned_2)))
-            {
-                read = 1;
-            }
-            
-            readLen[read] = fip->readlen;
-            rc = SequenceRecordInit(&srec, value->unmated ? 1 : 2, readLen);
-            if (rc) {
-                (void)LOGERR(klogErr, rc, "SequenceRecordInit failed");
-                break;
-            }
-            
-            srec.ti[read] = fip->ti;
-            srec.aligned[read] = fip->aligned;
-            srec.is_bad[read] = fip->is_bad;
-            srec.orientation[read] = fip->orientation;
-            srec.cskey[read] = fip->cskey;
-            memcpy(srec.seq + srec.readStart[read], src, srec.readLen[read]);
-            src += fip->readlen;
-            
-            memcpy(srec.qual + srec.readStart[read], src, srec.readLen[read]);
-            src += fip->readlen;
-            srec.spotGroup = (char *)src;
-            srec.spotGroupLen = fip->sglen;
-            srec.keyId = keyId;
-            
-            rc = SequenceWriteRecord(seq, &srec, ctx->isColorSpace, value->pcr_dup, value->platform, 
-                                    settings->keepMismatchQual, settings->no_real_output, settings->hasTI, settings->QualQuantizer);
-            if (rc) {
-                (void)LOGERR(klogErr, rc, "SequenceWriteRecord failed");
-                break;
-            }
-            /*rc = KMemBankFree(frags, id);*/
-            CTX_VALUE_SET_S_ID(*value, ++ctx->spotId);
-        }
-    }
-    /*printf("DONE_SOLO:\tcnt2=%d\tcnt1=%d\n",fcountBoth,fcountOne);*/
-    KDataBufferWhack(&fragBuf);
-    KDataBufferWhack(&srec.storage);
-    return rc;
-}
-
-static
-rc_t AlignmentUpdateSpotInfo(SpotAssembler *ctx, struct AlignmentWriter *align, uint64_t maxDistance)
-{
-    rc_t rc;
-    
-    ++ctx->pass;
-
-    KLoadProgressbar_Append(ctx->progress[ctx->pass - 1], ctx->alignCount);
-
-    rc = AlignmentStartUpdatingSpotIds(align);
-    while (rc == 0 && (rc = Quitting()) == 0) {
-        ctx_value_t const *value;
-        uint64_t keyId;
-        int64_t alignId;
-        bool isPrimary;
-        
-        rc = AlignmentGetSpotKey(align, &keyId, &alignId, &isPrimary);
-        if (rc) {
-            if (GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound)
-                rc = 0;
-            break;
-        }
-        assert(keyId >> 32 < ctx->key2id_count);
-        assert((uint32_t)keyId < ctx->idCount[keyId >> 32]);
-        rc = MMArrayGet(ctx->id2value, (void **)&value, keyId);
-        if (rc == 0) {
-            int64_t const spotId = CTX_VALUE_GET_S_ID(*value);
-            int64_t const id[] = {
-                CTX_VALUE_GET_P_ID(*value, 0),
-                CTX_VALUE_GET_P_ID(*value, 1)
-            };
-            int64_t mateId = 0;
-            ReferenceStart mateGlobalRefPos;
-            
-            memset(&mateGlobalRefPos, 0, sizeof(mateGlobalRefPos));
-            if (spotId == 0) {
-                assert(!isPrimary);
-                (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(id)' was never assigned a spot id, probably has no primary alignments", "id=%lx", keyId));
-                /* (void)PLOGMSG(klogWarn, (klogWarn, "Spot #$(i): { $(s) }", "i=%lu,s=%s", keyId, Print_ctx_value_t(value))); */
-            }
-            if (isPrimary) {
-                if (id[0] != 0 && id[1] != 0)
-                    mateId = alignId == id[0] ? id[1] : id[0];
-                
-                if (mateId && maxDistance && (id[0] > id[1] ? id[0] - id[1] : id[1] - id[0]) > maxDistance) {
-                    rc = AlignmentGetRefPos(align, mateId, &mateGlobalRefPos);
-                    if (rc) break;
-                }
-            }
-            rc = AlignmentUpdateInfo(align, spotId, mateId, &mateGlobalRefPos);
-        }
-        KLoadProgressbar_Process(ctx->progress[ctx->pass - 1], 1, false);
-    }
-    return rc;
-}
-
-rc_t SequenceUpdateAlignInfo(SpotAssembler *ctx, struct SequenceWriter *seq)
-{
-    rc_t rc = 0;
-    uint64_t row;
-    const ctx_value_t *value;
-    uint64_t keyId;
-    
-    ++ctx->pass;
-    KLoadProgressbar_Append(ctx->progress[ctx->pass - 1], ctx->spotId + 1);
-    
-    for (row = 1; row <= ctx->spotId; ++row) {
-        rc = SequenceReadKey(seq, row, &keyId);
-        if (rc) {
-            (void)PLOGERR(klogErr, (klogErr, rc, "Failed to get key for row $(row)", "row=%u", (unsigned)row));
-            break;
-        }
-        rc = MMArrayGet(ctx->id2value, (void **)&value, keyId);
-        if (rc) {
-            (void)PLOGERR(klogErr, (klogErr, rc, "Failed to read info for row $(row), index $(idx)", "row=%u,idx=%u", (unsigned)row, (unsigned)keyId));
-            break;
-        }
-        if (row != CTX_VALUE_GET_S_ID(*value)) {
-            rc = RC(rcApp, rcTable, rcWriting, rcData, rcUnexpected);
-            (void)PLOGMSG(klogErr, (klogErr, "Unexpected spot id $(spotId) for row $(row), index $(idx)", "spotId=%u,row=%u,idx=%u", (unsigned)CTX_VALUE_GET_S_ID(*value), (unsigned)row, (unsigned)keyId));
-            break;
-        }
-        {{
-            int64_t primaryId[2];
-            /*uint64_t const spotId = CTX_VALUE_GET_S_ID(*value);*/
-            
-            primaryId[0] = CTX_VALUE_GET_P_ID(*value, 0);
-            primaryId[1] = CTX_VALUE_GET_P_ID(*value, 1);
-            
-            rc = SequenceUpdateAlignData(seq, row, value->unmated ? 1 : 2,
-                                         primaryId,
-                                         value->alignmentCount);
-        }}
-        if (rc) {
-            (void)LOGERR(klogErr, rc, "Failed updating AlignmentWriter data in sequence table");
-            break;
-        }
-        KLoadProgressbar_Process(ctx->progress[ctx->pass - 1], 1, false);
-    }
-    return rc;
-}
-
-void EditAlignedQualities(const CommonWriterSettings* settings, uint8_t qual[], bool const hasMismatch[], unsigned readlen) /* generic */
-{
-    unsigned i;
-    
-    for (i = 0; i < readlen; ++i) {
-        uint8_t const q = hasMismatch[i] ? settings->alignedQualValue : qual[i];
-        
-        qual[i] = q;
-    }
-}
-
-void EditUnalignedQualities(uint8_t qual[], bool const hasMismatch[], unsigned readlen) /* generic */
-{
-    unsigned i;
-    
-    for (i = 0; i < readlen; ++i) {
-        uint8_t const q = (qual[i] & 0x7F) | (hasMismatch[i] ? 0x80 : 0);
-        
-        qual[i] = q;
-    }
-}
-
-bool platform_cmp(char const platform[], char const test[])
-{
-    unsigned i;
-
-    for (i = 0; ; ++i) {
-        int ch1 = test[i];
-        int ch2 = toupper(platform[i]);
-        
-        if (ch1 != ch2)
-            break;
-        if (ch1 == 0)
-            return true;
-    }
-    return false;
-}
-
-rc_t CheckLimitAndLogError(CommonWriterSettings* settings)
-{
-    ++settings->errCount;
-    if (settings->maxErrCount > 0 && settings->errCount > settings->maxErrCount) {
-        (void)PLOGERR(klogErr, (klogErr, RC(rcAlign, rcFile, rcReading, rcError, rcExcessive), 
-                                "Number of errors $(cnt) exceeds limit of $(max): Exiting", "cnt=%lu,max=%lu", 
-                                settings->errCount, settings->maxErrCount));
-        return RC(rcAlign, rcFile, rcReading, rcError, rcExcessive);
-    }
-    return 0;
-}
-
-void RecordNoMatch(const CommonWriterSettings* settings, char const readName[], char const refName[], uint32_t const refPos)
-{
-    if (settings->noMatchLog) {
-        static uint64_t lpos = 0;
-        char logbuf[256];
-        size_t len;
-        
-        if (string_printf(logbuf, sizeof(logbuf), &len, "%s\t%s\t%u\n", readName, refName, refPos) == 0) {
-            KFileWrite(settings->noMatchLog, lpos, logbuf, len, NULL);
-            lpos += len;
-        }
-    }
-}
-
-rc_t LogNoMatch(CommonWriterSettings* settings, char const readName[], char const refName[], unsigned rpos, unsigned matches)
-{
-    rc_t const rc = CheckLimitAndLogError(settings);
-    static unsigned count = 0;
-    
-    ++count;
-    if (rc) {
-        (void)PLOGMSG(klogInfo, (klogInfo, "This is the last warning; this class of warning occurred $(occurred) times",
-                                 "occurred=%u", count));
-        (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)' contains too few ($(count)) matching bases to reference '$(ref)' at $(pos)",
-                                 "name=%s,ref=%s,pos=%u,count=%u", readName, refName, rpos, matches));
-    }
-    else if (settings->maxWarnCount_NoMatch == 0 || count < settings->maxWarnCount_NoMatch)
-        (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)' contains too few ($(count)) matching bases to reference '$(ref)' at $(pos)",
-                                 "name=%s,ref=%s,pos=%u,count=%u", readName, refName, rpos, matches));
-    return rc;
-}
-
-rc_t LogDupConflict(CommonWriterSettings* settings, char const readName[])
-{
-    rc_t const rc = CheckLimitAndLogError(settings);
-    static unsigned count = 0;
-    
-    ++count;
-    if (rc) {
-        (void)PLOGMSG(klogInfo, (klogInfo, "This is the last warning; this class of warning occurred $(occurred) times",
-                                 "occurred=%u", count));
-        (void)PLOGERR(klogWarn, (klogWarn, RC(rcApp, rcFile, rcReading, rcData, rcInconsistent),
-                                 "Spot '$(name)' is both a duplicate and NOT a duplicate!",
-                                 "name=%s", readName));
-    }
-    else if (settings->maxWarnCount_DupConflict == 0 || count < settings->maxWarnCount_DupConflict)
-        (void)PLOGERR(klogWarn, (klogWarn, RC(rcApp, rcFile, rcReading, rcData, rcInconsistent),
-                                 "Spot '$(name)' is both a duplicate and NOT a duplicate!",
-                                 "name=%s", readName));
-    return rc;
-}
-
-void COPY_QUAL(uint8_t D[], uint8_t const S[], unsigned const L, bool const R)
-{
-    if (R) {
-        unsigned i;
-        unsigned j;
-        
-        for (i = 0, j = L - 1; i != L; ++i, --j)
-            D[i] = S[j];
-    }
-    else
-        memcpy(D, S, L);
-}
-
-void COPY_READ(INSDC_dna_text D[], INSDC_dna_text const S[], unsigned const L, bool const R)
-{
-    static INSDC_dna_text const compl[] = {
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 , '.',  0 , 
-        '0', '1', '2', '3',  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 , 'T', 'V', 'G', 'H',  0 ,  0 , 'C', 
-        'D',  0 ,  0 , 'M',  0 , 'K', 'N',  0 , 
-         0 ,  0 , 'Y', 'S', 'A', 'A', 'B', 'W', 
-         0 , 'R',  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 , 'T', 'V', 'G', 'H',  0 ,  0 , 'C', 
-        'D',  0 ,  0 , 'M',  0 , 'K', 'N',  0 , 
-         0 ,  0 , 'Y', 'S', 'A', 'A', 'B', 'W', 
-         0 , 'R',  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
-         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0
-    };
-    if (R) {
-        unsigned i;
-        unsigned j;
-        
-        for (i = 0, j = L - 1; i != L; ++i, --j)
-            D[i] = compl[((uint8_t const *)S)[j]];
-    }
-    else
-        memcpy(D, S, L);
-}
-
-/*--------------------------------------------------------------------------
- * ArchiveFile
- */
-static uint8_t GetMapQ(Alignment const *rec)
-{
-    uint8_t mapQ;
-    
-    AlignmentGetMapQuality(rec, &mapQ);
-    return mapQ;
-}
-
-INSDC_SRA_platform_id PlatformToId(const char* name)
-{
-    if (name != NULL)
-    {
-        switch (toupper(name[0])) {
-        case 'C':
-            if (platform_cmp(name, "COMPLETE GENOMICS") || platform_cmp(name, "COMPLETE_GENOMICS"))
-                return SRA_PLATFORM_COMPLETE_GENOMICS;
-            if (platform_cmp(name, "CAPILLARY"))
-                return SRA_PLATFORM_CAPILLARY;
-            break;
-        case 'H':
-            if (platform_cmp(name, "HELICOS"))
-                return SRA_PLATFORM_HELICOS;
-            break;
-        case 'I':
-            if (platform_cmp(name, "ILLUMINA"))
-                return SRA_PLATFORM_ILLUMINA;
-            if (platform_cmp(name, "IONTORRENT"))
-                return SRA_PLATFORM_ION_TORRENT;
-            break;
-        case 'L':
-            if (platform_cmp(name, "LS454"))
-                return SRA_PLATFORM_454;
-            break;
-        case 'N':
-            if (platform_cmp(name, "NANOPORE"))
-                return SRA_PLATFORM_OXFORD_NANOPORE;
-            break;
-        case 'O':
-            if (platform_cmp(name, "OXFORD_NANOPORE"))
-                return SRA_PLATFORM_OXFORD_NANOPORE;
-            break;
-        case 'P':
-            if (platform_cmp(name, "PACBIO"))
-                return SRA_PLATFORM_PACBIO_SMRT;
-            break;
-        case 'S':
-            if (platform_cmp(name, "SOLID"))
-                return SRA_PLATFORM_ABSOLID;
-            if (platform_cmp(name, "SANGER"))
-                return SRA_PLATFORM_CAPILLARY;
-            break;
-        default:
-            break;
-        }
-    }
-    return SRA_PLATFORM_UNDEFINED;
-}
-
-INSDC_SRA_platform_id GetINSDCPlatform(ReferenceInfo const *ref, char const name[]) {
-    if (ref != NULL && name != NULL) {
-        ReadGroup rg;
-
-        rc_t rc = ReferenceInfoGetReadGroupByName(ref, name, &rg);
-        if (rc == 0 && rg.platform) 
-            return PlatformToId(rg.platform) ;
-    }
-    return SRA_PLATFORM_UNDEFINED;
-}
-
-void ParseSpotName(char const name[], size_t* namelen)
-{ /* remove trailing #... */
-    const char* hash = string_chr(name, *namelen, '#');
-    if (hash)
-        *namelen = hash - name;
-}
-
-
-static const int8_t toPhred[] =
-{
-              0, 1, 1, 2, 2, 3, 3,
-     4, 4, 5, 5, 6, 7, 8, 9,10,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
-};
-
-static int8_t LogOddsToPhred ( int8_t logOdds )
-{ /* conversion table copied from interface/ncbi/seq.vschema */
-    if (logOdds < -6)
-        return 0;
-    if (logOdds > 40)
-        return 40;
-    return toPhred[logOdds + 6];
-}
-
-rc_t ArchiveFile(const struct ReaderFile *const reader,
-                 CommonWriterSettings *const G,
-                 struct SpotAssembler *const ctx,
-                 struct Reference *const ref,
-                 struct SequenceWriter *const seq,
-                 struct AlignmentWriter *const align,
-                 bool *const had_alignments,
-                 bool *const had_sequences)
-{
-    KDataBuffer buf;
-    KDataBuffer fragBuf;
-    KDataBuffer cigBuf;
-    rc_t rc;
-    int32_t lastRefSeqId = -1;
-    size_t rsize;
-    uint64_t keyId = 0;
-    uint64_t reccount = 0;
-    SequenceRecord srec;
-    char spotGroup[512];
-    size_t namelen;
-    unsigned progress = 0;
-    unsigned warned = 0;
-    int skipRefSeqId = -1;
-    int unmapRefSeqId = -1;
-    uint64_t recordsProcessed = 0;
-    uint64_t filterFlagConflictRecords=0; /*** counts number of conflicts between flags 'duplicate' and 'lowQuality' ***/
-#define MAX_WARNINGS_FLAG_CONFLICT 10000 /*** maximum errors to report ***/
-
-    bool isColorSpace = false;
-    bool isNotColorSpace = G->noColorSpace;
-    char alignGroup[32];
-    size_t alignGroupLen;
-    AlignmentRecord data;
-    
-    const ReferenceInfo* header = NULL;
-
-    memset(&data, 0, sizeof(data));
-    
-    rc = ReaderFileGetReferenceInfo(reader, &header);
-    if (rc)
-        return rc;
-
-    if (ctx->key2id_max == 0) {
-        if (header != NULL) {
-            uint32_t rgcount;
-            unsigned rgi;
-            
-            ReferenceInfoGetReadGroupCount(header, &rgcount);
-            if (rgcount > (sizeof(ctx->key2id)/sizeof(ctx->key2id[0]) - 1))
-                ctx->key2id_max = 1;
-            else
-                ctx->key2id_max = sizeof(ctx->key2id)/sizeof(ctx->key2id[0]);
-            
-            for (rgi = 0; rgi != rgcount; ++rgi) {
-                ReadGroup rg;
-                
-                rc_t rc2 = ReferenceInfoGetReadGroup(header, rgi, &rg);
-                if (rc2 == 0 && rg.platform && platform_cmp(rg.platform, "CAPILLARY")) {
-                    G->hasTI = true;
-                    break;
-                }
-            }
-        }
-        else
-            ctx->key2id_max = 1;        
-    }
-    
-    memset(&srec, 0, sizeof(srec));
-    
-    rc = KDataBufferMake(&cigBuf, 32, 0);
-    if (rc)
-        return rc;
-    
-    rc = KDataBufferMake(&fragBuf, 8, FRAG_CHUNK_SIZE);
-    if (rc)
-        return rc;
-    
-    rc = KDataBufferMake(&buf, 16, 0);
-    if (rc)
-        return rc;
-    
-    if (rc == 0) {
-        (void)PLOGMSG(klogInfo, (klogInfo, "Loading '$(file)'", "file=%s", ReaderFileGetPathname(reader)));
-    }
-    
-    *had_alignments = false;
-    *had_sequences = false;
-    
-    while (rc == 0 && (rc = Quitting()) == 0) {
-        bool aligned;
-        uint32_t readlen;
-        int64_t rpos=0;
-        char *seqDNA;
-        ReferenceSequence refSeq;
-        ctx_value_t *value;
-        bool wasInserted;
-        int32_t refSeqId=-1;
-        uint8_t *qual;
-        bool mated;
-        const char *name;
-        char cskey = 0;
-        bool originally_aligned;
-        bool isPrimary;
-        uint32_t opCount;
-        bool hasCG;
-        uint64_t ti = 0;
-        uint32_t csSeqLen = 0;
-        int readOrientation;
-        uint8_t rna_orient = ' ';
-        
-        const Record* record;
-        const Sequence* sequence = NULL;
-        const Alignment* alignment = NULL;
-        const CGData* cg = NULL;
-
-        rc = ReaderFileGetRecord(reader, &record);
-        if (GetRCObject(rc) == rcRow && (GetRCState(rc) == rcInvalid || GetRCState(rc) == rcEmpty)) {
-            (void)PLOGERR(klogWarn, (klogWarn, rc, "ArchiveFile: '$(file)' - row $(row)", "file=%s,row=%lu", ReaderFileGetPathname(reader), reccount + 1));
-            rc = CheckLimitAndLogError(G);
-        }
-        else if (rc || record == 0)
-            break;
-
-        {
-            const Rejected* rej;
-            rc = RecordGetRejected(record, &rej);
-            if (rc)
-            {
-                (void)LOGERR(klogErr, rc, "ArchiveFile: RecordGetSequence failed");
-                break;
-            }
-            if (rej != NULL)
-            {
-                const char* message;
-                uint64_t line;
-                uint64_t col;
-                bool fatal;
-                rc = RejectedGetError(rej, &message, &line, &col, &fatal);
-                if (rc)
-                {
-                    (void)LOGERR(klogErr, rc, "ArchiveFile: RejectedGetError failed");
-                    break;
-                }
-                (void)PLOGMSG(fatal ? klogErr : klogWarn, (fatal ? klogErr : klogWarn, 
-                              "$(file):$(l):$(c):$(msg)", "file=%s,l=%lu,c=%lu,msg=%s", 
-                              ReaderFileGetPathname(reader), line, col, message));
-                rc = CheckLimitAndLogError(G);
-                RejectedRelease(rej);
-                
-                if (fatal)
-                {
-                    rc = RC(rcExe, rcFile, rcParsing, rcFormat, rcUnsupported);
-                    break;
-                }
-                    
-                goto LOOP_END;
-            }
-        }
-        rc = RecordGetSequence(record, &sequence);
-        if (rc)
-        {
-            (void)LOGERR(klogErr, rc, "ArchiveFile: RecordGetSequence failed");
-            break;
-        }
-        rc = RecordGetAlignment(record, &alignment);
-        if (rc)
-        {
-            (void)LOGERR(klogErr, rc, "ArchiveFile: RecordGetAlignment failed");
-            break;
-        }
-        if (alignment != NULL)
-        {
-            rc = AlignmentGetCGData(alignment, &cg);      
-            if (rc)
-            {
-                (void)LOGERR(klogErr, rc, "ArchiveFile: AlignmentGetCG failed");
-                break;
-            }
-        }
-        
-        if ((unsigned)(ReaderFileGetProportionalPosition(reader) * 100.0) > progress) { 
-            unsigned new_value = ReaderFileGetProportionalPosition(reader) * 100.0;
-            KLoadProgressbar_Process(ctx->progress[0], new_value - progress, false);
-            progress = new_value;
-        }
-
-
-        /**************************************************************/
-        if (!G->noColorSpace) {
-            if (SequenceIsColorSpace(sequence)) {
-                if (isNotColorSpace) {
-                MIXED_BASE_AND_COLOR:
-                    rc = RC(rcApp, rcFile, rcReading, rcData, rcInconsistent);  
-                    (void)PLOGERR(klogErr, (klogErr, rc, "File '$(file)' contains base space and color space", "file=%s", ReaderFileGetPathname(reader)));
-                    goto LOOP_END;
-                }
-                ctx->isColorSpace = isColorSpace = true;
-            }
-            else if (isColorSpace)
-                goto MIXED_BASE_AND_COLOR;
-            else
-                isNotColorSpace = true;
-        }
-        hasCG = cg != NULL;
-        if (hasCG) {
-            AlignmentGetAlignOpCount(alignment, &opCount);
-            rc = KDataBufferResize(&cigBuf, opCount * 2 + 5);
-            if (rc) {
-                (void)LOGERR(klogErr, rc, "Failed to resize CIGAR buffer");
-                goto LOOP_END;
-            }
-            
-            rc = AlignmentRecordInit(&data, readlen = 35, G->expectUnsorted, G->compressQuality);
-            if (rc == 0)
-	            rc = KDataBufferResize(&buf, readlen);
-            if (rc) {
-                (void)LOGERR(klogErr, rc, "Failed to resize record buffer");
-                goto LOOP_END;
-            }
-            
-            seqDNA = buf.base;
-            qual = (uint8_t *)&seqDNA[readlen];
-        }
-        else {
-            if (alignment != 0)
-            {
-                uint32_t const *tmp;
-                AlignmentGetBAMCigar(alignment, &tmp, &opCount);
-                rc = KDataBufferResize(&cigBuf, opCount);
-                if (rc) {
-                    (void)LOGERR(klogErr, rc, "Failed to resize CIGAR buffer");
-                    goto LOOP_END;
-                }
-                memcpy(cigBuf.base, tmp, opCount * sizeof(uint32_t));
-            }
-            
-            SequenceGetReadLength(sequence, &readlen);
-            if (isColorSpace) {
-                SequenceGetCSReadLength(sequence, &csSeqLen);
-                if (readlen > csSeqLen) {
-                    rc = RC(rcAlign, rcRow, rcReading, rcData, rcInconsistent);
-                    (void)LOGERR(klogErr, rc, "SequenceWriter length and CS SequenceWriter length are inconsistent");
-                    goto LOOP_END;
-                }
-                else if (readlen < csSeqLen)
-                {
-                    readlen = 0; /* will be hard clipped */
-                }
-            }
-            else if (readlen == 0) {
-            }
-            rc = AlignmentRecordInit(&data, readlen | csSeqLen, G->expectUnsorted, G->compressQuality);
-            if (rc == 0)
-	            rc = KDataBufferResize(&buf, readlen | csSeqLen);
-            if (rc) {
-                (void)LOGERR(klogErr, rc, "Failed to resize record buffer");
-                goto LOOP_END;
-            }
-            
-            seqDNA = buf.base;
-            qual = (uint8_t *)&seqDNA[readlen | csSeqLen];
-        }
-        SequenceGetSpotName(sequence, &name, &namelen);
-        if (G->parseSpotName)
-            ParseSpotName(name, &namelen);
-        SequenceGetRead(sequence, seqDNA);
-        
-        {
-            int8_t const *squal;
-            uint8_t qoffset = 0;
-            int qualType=0;            
-            unsigned i;
-            
-            rc = SequenceGetQuality(sequence, &squal, &qoffset, &qualType);
-            if (rc) {
-                (void)PLOGERR(klogErr, (klogErr, rc, "Spot '$(name)': length of original quality does not match sequence", 
-                                                        "name=%.*s", (uint32_t)namelen, name));
-                rc = CheckLimitAndLogError(G);
-                goto LOOP_END;
-            }
-            else if (squal == NULL)
-                memset(qual, 30, readlen); /* SRA-2932: 30 is the preferred quality value for fasta */
-            else 
-            {  
-                if (G->useQUAL)
-                    memcpy(qual, squal, readlen);
-                else
-                {
-                    switch (qualType)
-                    {
-                    case QT_LogOdds:
-                        for (i = 0; i != readlen; ++i)
-                            qual[i] = LogOddsToPhred(squal[i] - qoffset);
-                        break;
-                        
-                    case QT_Phred:
-                        if (qoffset) {
-                            for (i = 0; i != readlen; ++i)
-                                qual[i] = squal[i] - qoffset;
-                        }
-                        else
-                            memcpy(qual, squal, readlen);
-                        break;
-                        
-                    default:
-                        memcpy(qual, squal, readlen);
-                        break;
-                    }
-                }
-            }
-        }
-        
-        if (hasCG) {
-            rc = CGDataGetSeqQual(cg, seqDNA, qual);
-            if (rc == 0)
-                rc = CGDataGetCigar(cg, cigBuf.base, cigBuf.elem_count, &opCount);
-            if (rc) {
-                (void)LOGERR(klogErr, rc, "Failed to read CG data");
-                goto LOOP_END;
-            }
-        }
-        if (G->hasTI) {
-            rc = SequenceGetTI(sequence, &ti);
-            if (rc)
-                ti = 0;
-            rc = 0;
-        }
-        data.data.align_group.buffer = alignGroup;
-        if (hasCG && CGDataGetAlignGroup(cg, alignGroup, sizeof(alignGroup), &alignGroupLen) == 0)
-            data.data.align_group.elements = alignGroupLen;
-        else
-            data.data.align_group.elements = 0;
-
-        if (alignment != 0)
-            AR_MAPQ(data) = GetMapQ(alignment);
-        {{
-            char const *rgname;
-            size_t rgnamelen;
-
-            SequenceGetSpotGroup(sequence, &rgname, &rgnamelen);
-            if (rgname)
-            {
-                string_copy(spotGroup, sizeof(spotGroup), rgname, rgnamelen);
-                spotGroup[rgnamelen] = '\0';
-            }
-            else
-                spotGroup[0] = '\0';
-        }}        
-        readOrientation = SequenceGetOrientationSelf(sequence);
-        AR_REF_ORIENT(data) = readOrientation == ReadOrientationReverse;
-        isPrimary = alignment == 0 || ! AlignmentIsSecondary(alignment);
-        if (G->noSecondary && !isPrimary)
-            goto LOOP_END;
-        originally_aligned = (alignment != 0);
-        aligned = originally_aligned && (AR_MAPQ(data) >= G->minMapQual);
-        
-        if (isColorSpace && readlen == 0)   /* detect hard clipped colorspace   */
-            aligned = false;                /* reads and make unaligned         */
-
-        if (aligned && align == NULL) {
-            rc = RC(rcApp, rcFile, rcReading, rcData, rcInconsistent);
-            (void)PLOGERR(klogErr, (klogErr, rc, "File '$(file)' contains aligned records", "file=%s", ReaderFileGetPathname(reader)));
-            goto LOOP_END;
-        }
-        if (header != NULL)
-        {
-            while (aligned) {
-                AlignmentGetPosition(alignment, &rpos);
-                AlignmentGetRefSeqId(alignment, &refSeqId);
-                if (rpos >= 0 && refSeqId >= 0) {
-                    if (refSeqId == skipRefSeqId)
-                        goto LOOP_END;
-                    if (refSeqId == unmapRefSeqId) {
-                        aligned = false;
-                        break;
-                    }
-                    if (refSeqId == lastRefSeqId)
-                        break;
-                    rc = ReferenceInfoGetRefSeq(header, refSeqId, &refSeq);
-                    if (rc != 0) {
-                        rc = RC(rcApp, rcFile, rcReading, rcData, rcInconsistent);
-                        (void)PLOGERR(klogWarn, (klogWarn, rc, "File '$(file)': Spot '$(name)' refers to an unknown Reference number $(refSeqId)", "file=%s,refSeqId=%i,name=%s", ReaderFileGetPathname(reader), (int)refSeqId, name));
-                        rc = CheckLimitAndLogError(G);
-                        goto LOOP_END;
-                    }
-                    else {
-                        bool shouldUnmap = false;
-                        
-                        if (G->refFilter && strcmp(G->refFilter, refSeq.name) != 0) {
-                            (void)PLOGMSG(klogInfo, (klogInfo, "Skipping Reference '$(name)'", "name=%s", refSeq.name));
-                            skipRefSeqId = refSeqId;
-                            goto LOOP_END;
-                        }
-                        
-                        rc = ReferenceSetFile(ref, refSeq.name, refSeq.length, refSeq.checksum, G->maxSeqLen, &shouldUnmap);
-                        if (rc == 0) {
-                            lastRefSeqId = refSeqId;
-                            if (shouldUnmap) {
-                                unmapRefSeqId = refSeqId;
-                                aligned = false;
-                            }
-                            break;
-                        }
-                        if (GetRCObject(rc) == rcConstraint && GetRCState(rc) == rcViolated) {
-                            int const level = G->limit2config ? klogWarn : klogErr;
-                            
-                            (void)PLOGMSG(level, (level, "Could not find a Reference to match { name: '$(name)', length: $(rlen) }", "name=%s,rlen=%u", refSeq.name, (unsigned)refSeq.length));
-                        }
-                        else if (!G->limit2config)
-                            (void)PLOGERR(klogErr, (klogErr, rc, "File '$(file)': Spot '$(sname)' refers to an unknown Reference '$(rname)'", "file=%s,rname=%s,sname=%s", ReaderFileGetPathname(reader), refSeq.name, name));
-                        if (G->limit2config)
-                            rc = 0;
-                        goto LOOP_END;
-                    }
-                }
-                else {
-                    (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)' was marked aligned, but reference id = $(id) and reference position = $(pos) are invalid", "name=%.*s,id=%i,pos=%i", namelen, name, refSeqId, rpos));
-                    if ((rc = CheckLimitAndLogError(G)) != 0) goto LOOP_END;
-                }
-
-                aligned = false;
-            }
-        }
-        if (!aligned && (G->refFilter != NULL || G->limit2config))
-            goto LOOP_END;
-        
-        rc = GetKeyID(G, ctx, &keyId, &wasInserted, spotGroup, name, namelen);
-        if (rc) {
-            (void)PLOGERR(klogErr, (klogErr, rc, "KBTreeEntry: failed on key '$(key)'", "key=%.*s", namelen, name));
-            goto LOOP_END;
-        }
-        rc = MMArrayGet(ctx->id2value, (void **)&value, keyId);
-        if (rc) {
-            (void)PLOGERR(klogErr, (klogErr, rc, "MMArrayGet: failed on id '$(id)'", "id=%u", keyId));
-            goto LOOP_END;
-        }
-        
-        AR_KEY(data) = keyId;
-        
-        mated = false;
-        if (SequenceWasPaired(sequence)) {
-            if (SequenceIsFirst(sequence))
-                AR_READNO(data) |= 1;
-            if (SequenceIsSecond(sequence))
-                AR_READNO(data) |= 2;
-            switch (AR_READNO(data)) {
-            case 1:
-            case 2:
-                mated = true;
-                break;
-            case 0:
-                if ((warned & 1) == 0) {
-                    (void)LOGMSG(klogWarn, "Spots without fragment info have been encountered");
-                    warned |= 1;
-                }
-                break;
-            case 3:
-                if ((warned & 2) == 0) {
-                    (void)LOGMSG(klogWarn, "Spots with more than two fragments have been encountered");
-                    warned |= 2;
-                }
-                break;
-            }
-        }
-        if (!mated)
-            AR_READNO(data) = 1;
-        
-        if (wasInserted) {
-            memset(value, 0, sizeof(*value));
-            value->unmated = !mated;
-            value->pcr_dup = SequenceIsDuplicate(sequence);
-            value->platform = GetINSDCPlatform(header, spotGroup);
-            if (value->platform == SRA_PLATFORM_UNDEFINED)
-                value->platform = G->platform;
-        }
-        else {
-            if (!G->acceptBadDups && value->pcr_dup != SequenceIsDuplicate(sequence)) {
-                rc = LogDupConflict(G, name);
-                goto LOOP_END; /* TODO: is this correct? */
-            }
-            value->pcr_dup &= SequenceIsDuplicate(sequence);
-            if (mated && value->unmated) {
-                (void)PLOGERR(klogWarn, (klogWarn, RC(rcApp, rcFile, rcReading, rcData, rcInconsistent),
-                                         "Spot '$(name)', which was first seen without mate info, now has mate info",
-                                         "name=%s", name));
-                rc = CheckLimitAndLogError(G);
-                goto LOOP_END;
-            }
-            else if (!mated && !value->unmated) {
-                (void)PLOGERR(klogWarn, (klogWarn, RC(rcApp, rcFile, rcReading, rcData, rcInconsistent),
-                                         "Spot '$(name)', which was first seen with mate info, now has no mate info",
-                                         "name=%s", name));
-                rc = CheckLimitAndLogError(G);
-                goto LOOP_END;
-            }
-        }
-        
-        ++recordsProcessed;
-
-        if (isPrimary) {
-            switch (AR_READNO(data)) {
-            case 1:
-                if (CTX_VALUE_GET_P_ID(*value, 0) != 0)
-                {
-                    isPrimary = false;
-                    if (value->seqHash[0] != SeqHashKey(seqDNA, readlen))
-                    {
-                        (void)PLOGERR(klogWarn, (klogWarn, RC(rcApp, rcFile, rcReading, rcData, rcInconsistent),
-                                                 "Read 1 of spot '$(name)', possible sequence mismatch", "name=%s", name));
-                        rc = CheckLimitAndLogError(G);
-                        goto LOOP_END;
-                    }
-                }
-                else if (aligned && value->unaligned_1) {
-                    (void)PLOGMSG(klogWarn, (klogWarn, "Read 1 of spot '$(name)', which was unmapped, is now being mapped at position $(pos) on reference '$(ref)'; this alignment will be considered as secondary", "name=%s,ref=%s,pos=%u", name, refSeq.name, rpos));
-                    isPrimary = false;
-                }
-                break;
-            case 2:
-                if (CTX_VALUE_GET_P_ID(*value, 1) != 0)
-                {
-                    isPrimary = false;
-                    if (value->seqHash[1] != SeqHashKey(seqDNA, readlen))
-                    {
-                        (void)PLOGERR(klogWarn, (klogWarn, RC(rcApp, rcFile, rcReading, rcData, rcInconsistent),
-                                                 "Read 2 of spot '$(name)', possible sequence mismatch", "name=%s", name));
-                        rc = CheckLimitAndLogError(G);
-                        goto LOOP_END;
-                    }
-                }
-                else if (aligned && value->unaligned_2) {
-                    (void)PLOGMSG(klogWarn, (klogWarn, "Read 2 of spot '$(name)', which was unmapped, is now being mapped at position $(pos) on reference '$(ref)'; this alignment will be considered as secondary", "name=%s,ref=%s,pos=%u", name, refSeq.name, rpos));
-                    isPrimary = false;
-                }
-                break;
-            default:
-                break;
-            }
-        }
-        data.isPrimary = isPrimary;
-        if (aligned) {
-            uint32_t matches = 0;
-            
-            /* TODO: get rna orientation from XS:A tag */
-            rc = ReferenceRead(ref, &data, rpos, cigBuf.base, opCount,
-                               seqDNA, readlen, rna_orient,
-                               &matches, G->acceptNoMatch, G->minMatchCount, G->maxSeqLen);
-            if (rc) {
-                aligned = false;
-                
-                if (   (GetRCState(rc) == rcViolated  && GetRCObject(rc) == rcConstraint)
-                    || (GetRCState(rc) == rcExcessive && GetRCObject(rc) == rcRange))
-                {
-                    RecordNoMatch(G, name, refSeq.name, rpos);
-                }
-                if (GetRCState(rc) == rcViolated && GetRCObject(rc) == rcConstraint) {
-                    rc = LogNoMatch(G, name, refSeq.name, (unsigned)rpos, (unsigned)matches);
-                }
-                else if (GetRCObject(rc) == (enum RCObject)rcData && GetRCState(rc) == rcInvalid) {
-                    (void)PLOGERR(klogWarn, (klogWarn, rc, "Spot '$(name)': bad alignment to reference '$(ref)' at $(pos)", "name=%s,ref=%s,pos=%u", name, refSeq.name, rpos));
-                    rc = CheckLimitAndLogError(G);
-                }
-                else if (GetRCObject(rc) == (enum RCObject)rcData) {
-                    (void)PLOGERR(klogWarn, (klogWarn, rc, "Spot '$(name)': bad alignment to reference '$(ref)' at $(pos)", "name=%s,ref=%s,pos=%u", name, refSeq.name, rpos));
-                    rc = CheckLimitAndLogError(G);
-                }
-                else {
-                    (void)PLOGERR(klogWarn, (klogWarn, rc, "Spot '$(name)': error reading reference '$(ref)' at $(pos)", "name=%s,ref=%s,pos=%u", name, refSeq.name, rpos));
-                    rc = CheckLimitAndLogError(G);
-                }
-                if (rc) goto LOOP_END;
-            }
-        }
-        if (isColorSpace) {
-            /* must be after ReferenceRead */
-            SequenceGetCSKey(sequence, &cskey);
-            SequenceGetCSRead(sequence, seqDNA);
-            if (!aligned && !G->useQUAL) {
-                int8_t const *squal;
-                uint8_t qoffset = 0;
-                int qualType=0;                
-                
-                rc = SequenceGetCSQuality(sequence, &squal, &qoffset, &qualType);
-                if (rc) {
-                    (void)PLOGERR(klogErr, (klogErr, rc, "Spot '$(name)': length of colorspace quality does not match sequence", "name=%s", name));
-                    goto LOOP_END;
-                }
-                if (qoffset) {
-                    unsigned i;
-                    
-                    for (i = 0; i < csSeqLen; ++i)
-                        qual[i] = squal[i] - qoffset;
-                }
-                else if (squal != NULL)
-                    memcpy(qual, squal, csSeqLen);
-                else
-                    memset(qual, 0, csSeqLen);
-                readlen = csSeqLen;
-            }
-        }
-        
-        if (aligned) {
-            if (G->editAlignedQual ) EditAlignedQualities  (G, qual, AR_HAS_MISMATCH(data), readlen);
-            if (G->keepMismatchQual) EditUnalignedQualities(qual, AR_HAS_MISMATCH(data), readlen);
-
-            if (AR_MISMATCH_QUAL(data) == NULL) {
-                AR_NUM_MISMATCH_QUAL(data) = 0;
-            }
-            else {
-                size_t i;
-                size_t n;
-                bool const *const has_mismatch = AR_HAS_MISMATCH(data);
-                uint8_t *const mismatch = AR_MISMATCH_QUAL(data);
-                
-                for (n = i = 0; i < readlen; ++i) {
-                    if (has_mismatch[i])
-                        mismatch[n++] = qual[i];
-                }
-                AR_NUM_MISMATCH_QUAL(data) = n;
-            }
-        }
-        else if (isPrimary) {
-            switch (AR_READNO(data)) {
-            case 1:
-                value->unaligned_1 = 1;
-                break;
-            case 2:
-                value->unaligned_2 = 1;
-                break;
-            default:
-                break;
-            }
-        }
-        if (isPrimary) {
-            switch (AR_READNO(data)) {
-            case 1:
-                if (CTX_VALUE_GET_P_ID(*value, 0) == 0 && aligned) {
-                    data.alignId = ++ctx->primaryId;
-                    CTX_VALUE_SET_P_ID(*value, 0, data.alignId);
-                }
-                break;
-            case 2:
-                if (CTX_VALUE_GET_P_ID(*value, 1) == 0 && aligned) {
-                    data.alignId = ++ctx->primaryId;
-                    CTX_VALUE_SET_P_ID(*value, 1, data.alignId);
-                }
-                break;
-            default:
-                break;
-            }
-        }
-        if (mated) {
-            if (isPrimary || !originally_aligned) {
-                if (CTX_VALUE_GET_S_ID(*value) != 0) {
-                    (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)' has already been assigned a spot id", "name=%.*s", namelen, name));
-                }
-                else if (!value->has_a_read) {
-                    /* new mated fragment - do spot assembly */
-                    unsigned sz;
-                    uint64_t    fragmentId;
-                    FragmentInfo fi;
-                    KMemBank *frags = ctx->fragsBoth;
-                    int32_t mate_refSeqId = -1;
-                    int64_t pnext = 0;
-                    
-                    value->seqHash[AR_READNO(data) - 1] = SeqHashKey(seqDNA, readlen);
-                    
-                    memset(&fi, 0, sizeof(fi));
-                    fi.aligned = aligned;
-                    fi.ti = ti;
-                    fi.orientation = readOrientation;
-                    fi.otherReadNo = AR_READNO(data);
-                    fi.sglen   = strlen(spotGroup);
-                    fi.readlen = readlen;
-                    fi.cskey = cskey;
-                    fi.is_bad = SequenceIsLowQuality(sequence);
-                    sz = sizeof(fi) + 2*fi.readlen + fi.sglen;
-                    if (align && aligned) {
-                        AlignmentGetMateRefSeqId(alignment, &mate_refSeqId);
-                        AlignmentGetMatePosition(alignment, &pnext);
-                    }
-                    rc = KMemBankAlloc(frags, &fragmentId, sz, 0);
-                    value->fragmentId = fragmentId;
-                    if (rc) {
-                        (void)LOGERR(klogErr, rc, "KMemBankAlloc failed");
-                        goto LOOP_END;
-                    }
-                    
-                    rc = KDataBufferResize(&fragBuf, sz);
-                    if (rc) {
-                        (void)LOGERR(klogErr, rc, "Failed to resize fragment buffer");
-                        goto LOOP_END;
-                    }
-                    {{
-                        uint8_t *dst = (uint8_t*) fragBuf.base;
-                        memcpy(dst,&fi,sizeof(fi));
-                        dst += sizeof(fi);
-                        COPY_READ((char *)dst, seqDNA, fi.readlen, (isColorSpace && !aligned) ? 0 : fi.orientation == ReadOrientationReverse);
-                        dst += fi.readlen;
-                        COPY_QUAL(dst, qual, fi.readlen, (isColorSpace && !aligned) ? 0 : fi.orientation == ReadOrientationReverse);
-                        dst += fi.readlen;
-                        memcpy(dst,spotGroup,fi.sglen);
-                    }}
-                    rc = KMemBankWrite(frags, fragmentId, 0, fragBuf.base, sz, &rsize);
-                    if (rc) {
-                        (void)PLOGERR(klogErr, (klogErr, rc, "KMemBankWrite failed writing fragment $(id)", "id=%u", fragmentId));
-                        goto LOOP_END;
-                    }
-                    value->has_a_read = 1;
-                }
-                else if (value->fragmentId != 0 ) {
-                    /* might be second fragment */
-                    uint64_t sz;
-                    FragmentInfo *fip;
-                    KMemBank *frags = ctx->fragsBoth;
-                    
-                    rc = KMemBankSize(frags, value->fragmentId, &sz);
-                    if (rc) {
-                        (void)PLOGERR(klogErr, (klogErr, rc, "KMemBankSize failed on fragment $(id)", "id=%u", value->fragmentId));
-                        goto LOOP_END;
-                    }
-                    rc = KDataBufferResize(&fragBuf, (size_t)sz);
-                    if (rc) {
-                        (void)PLOGERR(klogErr, (klogErr, rc, "Failed to resize fragment buffer", ""));
-                        goto LOOP_END;
-                    }
-                    rc = KMemBankRead(frags, value->fragmentId, 0, fragBuf.base, sz, &rsize);
-                    if (rc) {
-                        (void)PLOGERR(klogErr, (klogErr, rc, "KMemBankRead failed on fragment $(id)", "id=%u", value->fragmentId));
-                        goto LOOP_END;
-                    }
-                    
-                    assert( rsize == sz );
-                    fip = (FragmentInfo *) fragBuf.base;
-                    if(AR_READNO(data) != fip->otherReadNo) {
-                        /* mate found */
-                        unsigned readLen[2];
-                        unsigned read1 = 0;
-                        unsigned read2 = 1;
-                        uint8_t  *src  = (uint8_t*) fip + sizeof(*fip);
-                        
-                        value->seqHash[AR_READNO(data) - 1] = SeqHashKey(seqDNA, readlen);
-                        
-                        if (AR_READNO(data) < fip->otherReadNo) {
-                            read1 = 1;
-                            read2 = 0;
-                        }
-                        readLen[read1] = fip->readlen;
-                        readLen[read2] = readlen;
-                        rc = SequenceRecordInit(&srec, 2, readLen);
-                        if (rc) {
-                            (void)PLOGERR(klogErr, (klogErr, rc, "Failed resizing sequence record buffer", ""));
-                            goto LOOP_END;
-                        }
-                        srec.ti[read1] = fip->ti;
-                        srec.aligned[read1] = fip->aligned;
-                        srec.is_bad[read1] = fip->is_bad;
-                        srec.orientation[read1] = fip->orientation;
-                        srec.cskey[read1] = fip->cskey;
-                        memcpy(srec.seq + srec.readStart[read1], src, fip->readlen);
-                        src += fip->readlen;
-                        memcpy(srec.qual + srec.readStart[read1], src, fip->readlen);
-                        src += fip->readlen;
-                        
-                        srec.orientation[read2] = readOrientation;
-                        COPY_READ(srec.seq + srec.readStart[read2], 
-                                  seqDNA, 
-                                  srec.readLen[read2], 
-                                  (isColorSpace && !aligned) ? 0 : srec.orientation[read2] == ReadOrientationReverse);
-                        COPY_QUAL(srec.qual + srec.readStart[read2], 
-                                  qual, 
-                                  srec.readLen[read2],  
-                                  (isColorSpace && !aligned) ? 0 : srec.orientation[read2] == ReadOrientationReverse);
-
-                        srec.keyId = keyId;
-                        srec.is_bad[read2] = SequenceIsLowQuality(sequence);
-                        srec.aligned[read2] = aligned;
-                        srec.cskey[read2] = cskey;
-                        srec.ti[read2] = ti;
-                        
-                        srec.spotGroup = spotGroup;
-                        srec.spotGroupLen = strlen(spotGroup);
-                        if (value->pcr_dup && (srec.is_bad[0] || srec.is_bad[1])) {
-                            filterFlagConflictRecords++;
-                            if (filterFlagConflictRecords < MAX_WARNINGS_FLAG_CONFLICT) {
-                                (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)': both 'duplicate' and 'lowQuality' flag bits set, only 'duplicate' will be saved", "name=%s", name));
-                            }
-                            else if(filterFlagConflictRecords == MAX_WARNINGS_FLAG_CONFLICT) {
-                                (void)PLOGMSG(klogWarn, (klogWarn, "Last reported warning: Spot '$(name)': both 'duplicate' and 'lowQuality' flag bits set, only 'duplicate' will be saved", "name=%s", name));
-                            }
-                        }
-                        rc = SequenceWriteRecord(seq, &srec, isColorSpace, value->pcr_dup, value->platform, 
-                                                G->keepMismatchQual, G->no_real_output, G->hasTI, G->QualQuantizer);
-                        if (rc) {
-                            (void)LOGERR(klogErr, rc, "SequenceWriteRecord failed");
-                            goto LOOP_END;
-                        }
-                        CTX_VALUE_SET_S_ID(*value, ++ctx->spotId);
-                        rc = KMemBankFree(frags, value->fragmentId);
-                        if (rc) {
-                            (void)PLOGERR(klogErr, (klogErr, rc, "KMemBankFree failed on fragment $(id)", "id=%u", value->fragmentId));
-                            goto LOOP_END;
-                        }
-                        value->fragmentId = 0;
-                    }
-                }
-            }
-            if (!isPrimary && aligned) {
-                int32_t bam_mrid;
-                int64_t mpos;
-                int64_t mrid;
-                int64_t tlen;
-                
-                AlignmentGetMatePosition(alignment, &mpos);
-                AlignmentGetMateRefSeqId(alignment, &bam_mrid);
-                AlignmentGetInsertSize(alignment, &tlen);
-                
-                if (mpos >= 0 && bam_mrid >= 0 && tlen != 0 && header != NULL) {
-                    ReferenceSequence mref;
-                    if (ReferenceInfoGetRefSeq(header, bam_mrid, &mref) == 0) {
-                        rc_t rc_temp = ReferenceGet1stRow(ref, &mrid, mref.name);
-                        if (rc_temp == 0) {
-                            data.mate_ref_pos = mpos;
-                            data.template_len = tlen;
-                            data.mate_ref_orientation = (SequenceGetOrientationMate(sequence) == ReadOrientationReverse);
-                        }
-                        else {
-                            (void)PLOGERR(klogWarn, (klogWarn, rc_temp, "Failed to get refID for $(name)", "name=%s", mref.name));
-                            mrid = 0;
-                        }
-                        data.mate_ref_id = mrid;
-                    }
-                }
-            }
-        }
-        else if (CTX_VALUE_GET_S_ID(*value) == 0 && (isPrimary || !originally_aligned)) {
-            /* new unmated fragment - no spot assembly */
-            unsigned readLen[1];
-
-            value->seqHash[0] = SeqHashKey(seqDNA, readlen);
-            
-            readLen[0] = readlen;
-            rc = SequenceRecordInit(&srec, 1, readLen);
-            if (rc) {
-                (void)PLOGERR(klogErr, (klogErr, rc, "Failed resizing sequence record buffer", ""));
-                goto LOOP_END;
-            }
-            srec.ti[0] = ti;
-            srec.aligned[0] = aligned;
-            srec.is_bad[0] = SequenceIsLowQuality(sequence);
-            srec.orientation[0] = readOrientation;
-            srec.cskey[0] = cskey;
-            COPY_READ(srec.seq  + srec.readStart[0], seqDNA, readlen, (isColorSpace && !aligned) ? 0 : srec.orientation[0] == ReadOrientationReverse);
-            COPY_QUAL(srec.qual + srec.readStart[0], qual, readlen, (isColorSpace && !aligned) ? 0 : srec.orientation[0] == ReadOrientationReverse);
-         
-            srec.keyId = keyId;
-            
-            srec.spotGroup = spotGroup;
-            srec.spotGroupLen = strlen(spotGroup);
-            if (value->pcr_dup && srec.is_bad[0]) {
-                filterFlagConflictRecords++;
-                if (filterFlagConflictRecords < MAX_WARNINGS_FLAG_CONFLICT) {
-                    (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)': both 'duplicate' and 'lowQuality' flag bits set, only 'duplicate' will be saved", "name=%s", name));
-                }
-                else if (filterFlagConflictRecords == MAX_WARNINGS_FLAG_CONFLICT) {
-                    (void)PLOGMSG(klogWarn, (klogWarn, "Last reported warning: Spot '$(name)': both 'duplicate' and 'lowQuality' flag bits set, only 'duplicate' will be saved", "name=%s", name));
-                }
-            }
-            
-            srec.spotName = (char*)name;
-            srec.spotNameLen = namelen;
-            
-            rc = SequenceWriteRecord(seq, &srec, isColorSpace, value->pcr_dup, value->platform, 
-                                                G->keepMismatchQual, G->no_real_output, G->hasTI, G->QualQuantizer);
-            if (rc) {
-                (void)PLOGERR(klogErr, (klogErr, rc, "SequenceWriteRecord failed", ""));
-                goto LOOP_END;
-            }
-            CTX_VALUE_SET_S_ID(*value, ++ctx->spotId);
-            value->fragmentId = 0;
-        }
-        
-        if (aligned) {
-            if (value->alignmentCount[AR_READNO(data) - 1] < 254)
-                ++value->alignmentCount[AR_READNO(data) - 1];
-            ++ctx->alignCount;
-            
-            assert(keyId >> 32 < ctx->key2id_count);
-            assert((uint32_t)keyId < ctx->idCount[keyId >> 32]);
-            
-            rc = AlignmentWriteRecord(align, &data, G->expectUnsorted);
-            if (rc == 0) {
-                if (!isPrimary)
-                    data.alignId = ++ctx->secondId;
-                
-                rc = ReferenceAddAlignId(ref, data.alignId, isPrimary);
-                if (rc) {
-                    (void)PLOGERR(klogErr, (klogErr, rc, "ReferenceAddAlignId failed", ""));
-                }
-                else {
-                    *had_alignments = true;
-                }
-            }
-            else {
-                (void)PLOGERR(klogErr, (klogErr, rc, "AlignmentWriteRecord failed", ""));
-            }
-        }
-        /**************************************************************/
-        
-    LOOP_END:
-        RecordRelease(record);
-        if (sequence != NULL)
-            SequenceRelease(sequence);
-        if (alignment != NULL)
-            AlignmentRelease(alignment);
-        if (cg != NULL)
-            CGDataRelease(cg);
-        
-        ++reccount;
-        if (G->maxAlignCount > 0 && reccount >= G->maxAlignCount)
-            break;
-        if (rc == 0)
-            *had_sequences = true;
-    }
-    
-    if (header != NULL)
-        ReferenceInfoRelease(header);
-    
-    if (filterFlagConflictRecords > 0) {
-        (void)PLOGMSG(klogWarn, (klogWarn, "$(cnt1) out of $(cnt2) records contained warning : both 'duplicate' and 'lowQuality' flag bits set, only 'duplicate' will be saved", "cnt1=%lu,cnt2=%lu", filterFlagConflictRecords,recordsProcessed));
-    }
-    if (rc == 0 && recordsProcessed == 0) {
-        (void)LOGMSG(klogWarn, (G->limit2config || G->refFilter != NULL) ? 
-                     "All records from the file were filtered out" :
-                     "The file contained no records that were processed.");
-        rc = RC(rcAlign, rcFile, rcReading, rcData, rcEmpty);
-    }
-    if (rc == 0 && reccount > 0) {
-        double percentage = ((double)G->errCount) / reccount; 
-        double allowed = G->maxErrPct/ 100.0;
-        if (percentage > allowed) {
-            rc = RC(rcExe, rcTable, rcClosing, rcData, rcInvalid);
-            (void)PLOGERR(klogErr, 
-                            (klogErr, rc,
-                             "Too many bad records: "
-                                 "records: $(records), bad records: $(bad_records), "
-                                 "bad records percentage: $(percentage), "
-                                 "allowed percentage: $(allowed)",
-                             "records=%lu,bad_records=%lu,percentage=%.2f,allowed=%.2f",
-                             reccount, G->errCount, percentage, allowed));
-        }
-    }
-
-    KDataBufferWhack(&buf);
-    KDataBufferWhack(&fragBuf);
-    KDataBufferWhack(&srec.storage);
-    KDataBufferWhack(&cigBuf);
-    KDataBufferWhack(&data.buffer);
-    return rc;
-}
-
-/*--------------------------------------------------------------------------
- * CommonWriter
- */
- 
-rc_t CommonWriterInit(CommonWriter* self, struct VDBManager *mgr, struct VDatabase *db, const CommonWriterSettings* G)
-{
-    rc_t rc; 
-    assert(self);
-    assert(mgr);
-    assert(db);
-    
-    memset(self, 0, sizeof(*self));
-    if (G)
-        self->settings = *G;
-
-    self->ref = malloc(sizeof(*self->ref));
-    if (self->ref == 0)
-        return RC(rcAlign, rcArc, rcAllocating, rcMemory, rcExhausted);
-        
-    rc = ReferenceInit(self->ref, 
-                       mgr, 
-                       db, 
-                       self->settings.expectUnsorted, 
-                       self->settings.acceptHardClip, 
-                       self->settings.refXRefPath, 
-                       self->settings.inpath, 
-                       self->settings.maxSeqLen, 
-                       self->settings.refFiles);
-    if (rc == 0)
-    {
-        self->seq = malloc(sizeof(*self->seq));
-        if (self->seq == 0)
-        {
-            ReferenceWhack(self->ref, false, 0, NULL);
-            free(self->ref);
-            return RC(rcAlign, rcArc, rcAllocating, rcMemory, rcExhausted);
-        }
-        SequenceWriterInit(self->seq, db);
-        
-        self->align = AlignmentMake(db);
-        if (self->align == 0)
-        {
-            ReferenceWhack(self->ref, false, 0, NULL);
-            free(self->ref);
-            
-            SequenceWhack(self->seq, false);
-            free(self->seq);
-            
-            return RC(rcAlign, rcArc, rcAllocating, rcMemory, rcExhausted);
-        }
-        
-        rc = SetupContext(&self->settings, &self->ctx);
-        if (rc != 0)
-        {
-            ReferenceWhack(self->ref, false, 0, NULL);
-            free(self->ref);
-            
-            SequenceWhack(self->seq, false);
-            free(self->seq);
-            
-            AlignmentWhack(self->align, false);
-        }
-    }
-    if (self->settings.tmpfs == NULL)
-        self->settings.tmpfs = "/tmp";
-
-    self->commit = true;
-    
-    return rc;
-}
-
-rc_t CommonWriterArchive(CommonWriter *const self,
-                         const struct ReaderFile *const reader)
-{
-    rc_t rc;
-
-    assert(self);
-    rc = ArchiveFile(reader,
-                     &self->settings,
-                     &self->ctx,
-                     self->ref,
-                     self->seq,
-                     self->align,
-                     &self->had_alignments,
-                     &self->had_sequences);
-    if (rc)
-        self->commit = false;
-    
-    self->err_count += self->settings.errCount;
-    return rc;
-}
-
-rc_t CommonWriterComplete(CommonWriter* self, bool quitting, uint64_t maxDistance)
-{
-    rc_t rc=0;
-    /*** No longer need memory for key2id ***/
-    size_t i;
-    for (i = 0; i != self->ctx.key2id_count; ++i) {
-        KBTreeDropBacking(self->ctx.key2id[i]);
-        KBTreeRelease(self->ctx.key2id[i]);
-        self->ctx.key2id[i] = NULL;
-    }
-    free(self->ctx.key2id_names);
-    self->ctx.key2id_names = NULL;
-    /*******************/
-
-    if (self->had_sequences) {
-        if (!quitting) {
-            (void)LOGMSG(klogInfo, "Writing unpaired sequences");
-            rc = WriteSoloFragments(&self->settings, &self->ctx, self->seq);
-            ContextReleaseMemBank(&self->ctx);
-            if (rc == 0) {
-                rc = SequenceDoneWriting(self->seq);
-                if (rc == 0) {
-                    (void)LOGMSG(klogInfo, "Updating sequence alignment info");
-                    rc = SequenceUpdateAlignInfo(&self->ctx, self->seq);
-                }
-            }
-        }
-        else
-            ContextReleaseMemBank(&self->ctx);
-    }
-    
-    if (self->had_alignments && !quitting) {
-        (void)LOGMSG(klogInfo, "Writing alignment spot ids");
-        rc = AlignmentUpdateSpotInfo(&self->ctx, self->align, maxDistance);
-    }
-
-    return rc;
-}
-
-rc_t CommonWriterWhack(CommonWriter* self)
-{
-    rc_t rc = 0;
-    assert(self);
-    
-    ContextRelease(&self->ctx);
-    
-    if (self->align)
-        rc = AlignmentWhack(self->align, self->commit);
-        
-    if (self->seq)
-    {
-        SequenceWhack(self->seq, self->commit);
-        free(self->seq);
-    }
-
-    if (self->ref)
-    {
-        rc_t rc2 = ReferenceWhack(self->ref, self->commit, self->settings.maxSeqLen, Quitting);
-        if (rc == 0)
-            rc = rc2;
-        free(self->ref);
-    }
-
-    return rc;
-}
-
diff --git a/libs/loader/mmarray.c b/libs/loader/mmarray.c
deleted file mode 100644
index 9a62fd2..0000000
--- a/libs/loader/mmarray.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <loader/mmarray.h>
-
-#include <sysalloc.h>
-#include <stdlib.h>
-
-#include <klib/rc.h>
-
-#include <kfs/mmap.h>
-#include <kfs/file.h>
-
-#define MMA_NUM_CHUNKS_BITS (24u)
-#define MMA_NUM_SUBCHUNKS_BITS ((32u)-(MMA_NUM_CHUNKS_BITS))
-#define MMA_SUBCHUNK_SIZE (1u << MMA_NUM_CHUNKS_BITS)
-#define MMA_SUBCHUNK_COUNT (1u << MMA_NUM_SUBCHUNKS_BITS)
-
-typedef struct MMArray {
-    KFile *fp;
-    size_t elemSize;
-    uint64_t fsize;
-    struct mma_map_s {
-        struct mma_submap_s {
-            uint8_t *base;
-            KMMap *mmap;
-        } submap[MMA_SUBCHUNK_COUNT];
-    } map[NUM_ID_SPACES];
-} MMArray;
-
-rc_t MMArrayMake(struct MMArray **rslt, KFile *fp, uint32_t elemSize)
-{
-    MMArray *const self = calloc(1, sizeof(*self));
-
-    if (self == NULL)
-        return RC(rcExe, rcMemMap, rcConstructing, rcMemory, rcExhausted);
-    self->elemSize = (elemSize + 3) & ~(3u); /** align to 4 byte **/
-    self->fp = fp;
-    KFileAddRef(fp);
-    *rslt = self;
-    return 0;
-}
-
-#define PERF 0
-
-rc_t MMArrayGet(struct MMArray *const self, void **const value, uint64_t const element)
-{
-    unsigned const bin_no = element >> 32;
-    unsigned const subbin = ((uint32_t)element) >> MMA_NUM_CHUNKS_BITS;
-    unsigned const in_bin = (uint32_t)element & (MMA_SUBCHUNK_SIZE - 1);
-
-    if (bin_no >= sizeof(self->map)/sizeof(self->map[0]))
-        return RC(rcExe, rcMemMap, rcConstructing, rcId, rcExcessive);
-    
-    if (self->map[bin_no].submap[subbin].base == NULL) {
-        size_t const chunk = MMA_SUBCHUNK_SIZE * self->elemSize;
-        size_t const fsize = self->fsize + chunk;
-        rc_t rc = KFileSetSize(self->fp, fsize);
-        
-        if (rc == 0) {
-            KMMap *mmap;
-            
-            self->fsize = fsize;
-            rc = KMMapMakeRgnUpdate(&mmap, self->fp, self->fsize, chunk);
-            if (rc == 0) {
-                void *base;
-                
-                rc = KMMapAddrUpdate(mmap, &base);
-                if (rc == 0) {
-#if PERF
-                    static unsigned mapcount = 0;
-
-                    (void)PLOGMSG(klogInfo, (klogInfo, "Number of mmaps: $(cnt)", "cnt=%u", ++mapcount));
-#endif
-                    self->map[bin_no].submap[subbin].mmap = mmap;
-                    self->map[bin_no].submap[subbin].base = base;
-
-                    goto GET_MAP;
-                }
-                KMMapRelease(mmap);
-            }
-        }
-        return rc;
-    }
-GET_MAP:
-    *value = &self->map[bin_no].submap[subbin].base[(size_t)in_bin * self->elemSize];
-    return 0;
-}
-
-void MMArrayWhack(struct MMArray *self)
-{
-    unsigned i;
-
-    for (i = 0; i != sizeof(self->map)/sizeof(self->map[0]); ++i) {
-        unsigned j;
-        
-        for (j = 0; j != sizeof(self->map[0].submap)/sizeof(self->map[0].submap[0]); ++j) {
-            if (self->map[i].submap[j].mmap)
-                KMMapRelease(self->map[i].submap[j].mmap);
-            self->map[i].submap[j].mmap = NULL;
-            self->map[i].submap[j].base = NULL;
-        }
-    }
-    KFileRelease(self->fp);
-    free(self);
-}
-
-
diff --git a/libs/loader/reference-writer.c b/libs/loader/reference-writer.c
deleted file mode 100644
index e8efead..0000000
--- a/libs/loader/reference-writer.c
+++ /dev/null
@@ -1,483 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <kfs/file.h>
-
-#include <vdb/schema.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-
-#include <align/writer-refseq.h>
-
-#include <loader/reference-writer.h>
-
-#include <stdlib.h>
-#include <limits.h>
-#include <string.h>
-#include <assert.h>
-#include <ctype.h>
-
-#define SORTED_OPEN_TABLE_LIMIT (2)
-#define SORTED_CACHE_SIZE ((2 * 1024 * 1024)/(SORTED_OPEN_TABLE_LIMIT))
-
-#ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
-#define UNSORTED_OPEN_TABLE_LIMIT (8)
-#define UNSORTED_CACHE_SIZE ((1024 * 1024 * 1024)/(UNSORTED_OPEN_TABLE_LIMIT))
-#else
-#define UNSORTED_OPEN_TABLE_LIMIT (64)
-#define UNSORTED_CACHE_SIZE (350 * 1024 * 1024)
-#endif
-
-#if _DEBUGGING
-#define DUMP_CONFIG 1
-#endif
-
-struct overlap_s {
-    uint32_t min; /* minimum start pos of any alignment that ends in this chunk */
-    uint32_t max; /* maximum end pos of any alignment that starts before this chunk and ends in this chunk */
-};
-
-extern void ReferenceMgr_DumpConfig(ReferenceMgr const *const self);
-
-rc_t ReferenceInit(Reference *self, 
-                   const VDBManager *mgr, 
-                   VDatabase *db, 
-                   bool expectUnsorted,
-                   bool acceptHardClip,
-                   char const *refXRefPath,
-                   char const *inpath,
-                   uint32_t maxSeqLen,
-                   char const** refFiles
-                   )
-{
-    rc_t rc;
-    size_t const cache = expectUnsorted ? UNSORTED_CACHE_SIZE : SORTED_CACHE_SIZE;
-    unsigned const open_count = expectUnsorted ? UNSORTED_OPEN_TABLE_LIMIT : SORTED_OPEN_TABLE_LIMIT;
-    
-    memset(self, 0, sizeof(*self));
-    
-    self->coverage.elem_bits = self->mismatches.elem_bits = self->indels.elem_bits = 32;
-    self->pri_align.elem_bits = self->sec_align.elem_bits = 64;
-    self->pri_overlap.elem_bits = self->sec_overlap.elem_bits = sizeof(struct overlap_s) * 8;
-    
-    self->acceptHardClip = acceptHardClip;
-    
-    rc = ReferenceMgr_Make(&self->mgr, db, mgr, 
-                           ewrefmgr_co_Coverage,
-                           refXRefPath, inpath,
-                           maxSeqLen, cache, open_count);
-    if (rc == 0 && refFiles != NULL) {
-        unsigned i;
-        
-        for (i = 0; refFiles[i]; ++i) {
-            rc = ReferenceMgr_FastaPath(self->mgr, refFiles[i]);
-            if (rc) {
-                (void)PLOGERR(klogWarn, (klogWarn, rc, "fasta file '$(file)'", "file=%s", refFiles[i]));
-                break;
-            }
-        }
-#if DUMP_CONFIG
-        if (rc == 0) {
-            ReferenceMgr_DumpConfig(self->mgr);
-        }
-#endif
-    }
-    return rc;
-}
-
-static
-void Unsorted(Reference *self) {
-    bool dummy1 = false;
-    bool dummy2 = false;
-    
-    (void)LOGMSG(klogWarn, "Alignments are unsorted");
-    
-    self->out_of_order = true;
-    
-    ReferenceSeq_Release(self->rseq);
-    ReferenceMgr_SetCache(self->mgr, UNSORTED_CACHE_SIZE, UNSORTED_OPEN_TABLE_LIMIT);
-    ReferenceMgr_GetSeq(self->mgr, &self->rseq, self->last_id, &dummy1, true, &dummy2);
-    
-    KDataBufferWhack(&self->sec_align);
-    KDataBufferWhack(&self->pri_align);
-    KDataBufferWhack(&self->mismatches);
-    KDataBufferWhack(&self->indels);
-    KDataBufferWhack(&self->coverage);
-    KDataBufferWhack(&self->pri_overlap);
-    KDataBufferWhack(&self->sec_overlap);
-}
-
-#define BAIL_ON_FAIL(STMT) do { rc_t const rc__ = (STMT); if (rc__) return rc__; } while(0)
-
-static rc_t FlushBuffers(Reference *self, uint64_t upto, bool full, bool final, uint32_t maxSeqLen)
-{
-    if (!self->out_of_order && upto > 0) {
-        size_t offset = 0;
-        unsigned *const miss = (unsigned *)self->mismatches.base;
-        unsigned *const indel = (unsigned *)self->indels.base;
-        unsigned *const cov = (unsigned *)self->coverage.base;
-        struct overlap_s *const pri_overlap = (struct overlap_s *)self->pri_overlap.base;
-        struct overlap_s *const sec_overlap = (struct overlap_s *)self->sec_overlap.base;
-        unsigned chunk = 0;
-        
-        while ((self->curPos + offset + (full ? 0 : maxSeqLen)) <= upto) {
-            ReferenceSeqCoverage data;
-            uint64_t const curPos = self->curPos + offset;
-            unsigned const n = self->endPos > (curPos + maxSeqLen) ?
-                               maxSeqLen : (self->endPos - curPos);
-            unsigned const m = curPos + n > upto ? upto - curPos : n;
-            unsigned i;
-            unsigned hi;
-            unsigned lo;
-            
-            if (n == 0) break;
-            
-            memset(&data, 0, sizeof(data));
-            
-            data.ids[ewrefcov_primary_table].elements = self->pri_align.elem_count;
-            data.ids[ewrefcov_primary_table].buffer = self->pri_align.base;
-            data.overlap_ref_pos[ewrefcov_primary_table] = pri_overlap[chunk].min;
-            data.overlap_ref_len[ewrefcov_primary_table] = pri_overlap[chunk].max ? pri_overlap[chunk].max - curPos : 0;
-            
-            data.ids[ewrefcov_secondary_table].elements = self->sec_align.elem_count;
-            data.ids[ewrefcov_secondary_table].buffer = self->sec_align.base;
-            data.overlap_ref_pos[ewrefcov_secondary_table] = sec_overlap[chunk].min;
-            data.overlap_ref_len[ewrefcov_secondary_table] = sec_overlap[chunk].max ? sec_overlap[chunk].max - curPos : 0;
-            
-            for (hi = 0, lo = UINT_MAX, i = 0; i != m; ++i) {
-                unsigned const coverage = cov[offset + i];
-                
-                if (hi < coverage)
-                    hi = coverage;
-                if (lo > coverage)
-                    lo = coverage;
-            }
-            data.low  = lo > 255 ? 255 : lo;
-            data.high = hi > 255 ? 255 : hi;
-            
-            for (i = 0; i != m; ++i)
-                data.mismatches += miss[offset + i];
-
-            for (i = 0; i != m; ++i)
-                data.indels += indel[offset + i];
-            
-            {
-                rc_t rc = ReferenceSeq_AddCoverage(self->rseq, curPos, &data);
-                
-                if (rc) {
-                    Unsorted(self);
-                    return 0;
-                }
-            }
-            
-            KDataBufferResize(&self->pri_align, 0);
-            KDataBufferResize(&self->sec_align, 0);
-            offset += n;
-            ++chunk;
-        }
-        if (!final && offset > 0) {
-            unsigned const newChunkCount = self->pri_overlap.elem_count - chunk;
-            unsigned const newBaseCount = self->endPos - self->curPos - offset;
-            
-            memmove(self->pri_overlap.base, pri_overlap + chunk, newChunkCount * sizeof(pri_overlap[0]));
-            memmove(self->sec_overlap.base, sec_overlap + chunk, newChunkCount * sizeof(sec_overlap[0]));
-            memmove(self->mismatches.base, miss + offset, newBaseCount * sizeof(miss[0]));
-            memmove(self->indels.base, indel + offset, newBaseCount * sizeof(indel[0]));
-            memmove(self->coverage.base, cov + offset, newBaseCount * sizeof(cov[0]));
-
-            KDataBufferResize(&self->pri_overlap, newChunkCount);
-            KDataBufferResize(&self->sec_overlap, newChunkCount);
-            
-            self->curPos += offset;
-        }
-    }
-    return 0;
-}
-
-rc_t ReferenceSetFile(Reference *self, const char id[],
-                      uint64_t length, uint8_t const md5[16],
-                      uint32_t maxSeqLen, bool *shouldUnmap)
-{
-    ReferenceSeq const *rseq;
-    bool wasRenamed = false;
-    unsigned n;
-    
-    for (n = 0; ; ++n) {
-        if (self->last_id[n] != id[n])
-            break;
-        if (self->last_id[n] == 0 && id[n] == 0)
-            return 0;
-    }
-    while (id[n])
-        ++n;
-    if (n >= sizeof(self->last_id))
-        return RC(rcApp, rcTable, rcAccessing, rcParam, rcTooLong);
-    
-    BAIL_ON_FAIL(FlushBuffers(self, self->length, true, true, maxSeqLen));
-    BAIL_ON_FAIL(ReferenceMgr_GetSeq(self->mgr, &rseq, id, shouldUnmap, true, &wasRenamed));
-
-    if (self->rseq)
-        ReferenceSeq_Release(self->rseq);
-
-    self->rseq = rseq;
-    
-    memcpy(self->last_id, id, n + 1);
-    self->curPos = self->endPos = 0;
-    self->length = length;
-    self->lastOffset = 0;
-
-    if(!self->out_of_order) (void)PLOGMSG(klogInfo, (klogInfo, "Processing Reference '$(id)'", "id=%s", id));
-    
-    return 0;
-}
-
-rc_t ReferenceVerify(Reference const *self, char const id[], uint64_t length, uint8_t const md5[16])
-{
-    bool dummy = false;
-    return ReferenceMgr_Verify(self->mgr, id, length, md5, true, &dummy);
-}
-
-rc_t ReferenceGet1stRow(Reference const *self, int64_t *refID, char const refName[])
-{
-    ReferenceSeq const *rseq;
-    bool shouldUnmap = false;
-    bool wasRenamed = false;
-    rc_t rc = ReferenceMgr_GetSeq(self->mgr, &rseq, refName, &shouldUnmap, true, &wasRenamed);
-    if (rc == 0) {
-        assert(shouldUnmap == false);
-        rc = ReferenceSeq_Get1stRow(rseq, refID);
-        ReferenceSeq_Release(rseq);
-    }
-    return rc;
-}
-
-static
-rc_t ReferenceAddCoverage(Reference *const self,
-                          unsigned const refStart,
-                          unsigned const refLength,
-                          uint32_t const mismatches,
-                          uint32_t const indels,
-                          bool const isPrimary,
-                          uint32_t maxSeqLen
-                          )
-{
-    unsigned const refEnd = refStart + refLength;
-    
-    if (refEnd > self->endPos) {
-        unsigned const t1 = refEnd + (maxSeqLen - 1);
-        unsigned const adjust = t1 % maxSeqLen;
-        unsigned const newEndPos = t1 - adjust;
-        unsigned const baseCount = self->endPos - self->curPos;
-        unsigned const newBaseCount = newEndPos - self->curPos;
-        
-        BAIL_ON_FAIL(KDataBufferResize(&self->coverage, newBaseCount));
-        BAIL_ON_FAIL(KDataBufferResize(&self->mismatches, newBaseCount));
-        BAIL_ON_FAIL(KDataBufferResize(&self->indels, newBaseCount));
-        
-        memset(&((unsigned *)self->coverage.base)[baseCount], 0, (newBaseCount - baseCount) * sizeof(unsigned));
-        memset(&((unsigned *)self->mismatches.base)[baseCount], 0, (newBaseCount - baseCount) * sizeof(unsigned));
-        memset(&((unsigned *)self->indels.base)[baseCount], 0, (newBaseCount - baseCount) * sizeof(unsigned));
-        self->endPos = newEndPos;
-    }
-    if ((refEnd - self->curPos) / maxSeqLen >= self->pri_overlap.elem_count) {
-        unsigned const chunks = (refEnd - self->curPos) / maxSeqLen + 1;
-        unsigned const end = self->pri_overlap.elem_count;
-        
-        BAIL_ON_FAIL(KDataBufferResize(&self->pri_overlap, chunks));
-        BAIL_ON_FAIL(KDataBufferResize(&self->sec_overlap, chunks));
-        
-        memset(&((struct overlap_s *)self->pri_overlap.base)[end], 0, (chunks - end) * sizeof(struct overlap_s));
-        memset(&((struct overlap_s *)self->sec_overlap.base)[end], 0, (chunks - end) * sizeof(struct overlap_s));
-    }
-    BAIL_ON_FAIL(FlushBuffers(self, refStart, false, false, maxSeqLen));
-    if (!self->out_of_order) {
-        unsigned const startBase = refStart - self->curPos;
-        unsigned const endChunk = (startBase + refLength) / maxSeqLen;
-        KDataBuffer *const overlapBuffer = isPrimary ? &self->pri_overlap : &self->sec_overlap;
-        unsigned *const cov = &((unsigned *)self->coverage.base)[startBase];
-        unsigned i;
-        
-        ((unsigned *)self->mismatches.base)[startBase] += mismatches;
-        ((unsigned *)self->indels.base)[startBase] += indels;
-        
-        if (((struct overlap_s *)overlapBuffer->base)[endChunk].min == 0 || 
-            ((struct overlap_s *)overlapBuffer->base)[endChunk].min > refStart)
-        {
-            ((struct overlap_s *)overlapBuffer->base)[endChunk].min = refStart;
-        }
-        if (endChunk != 0 &&
-            ((struct overlap_s *)overlapBuffer->base)[endChunk].max < refStart + refLength)
-        {
-            ((struct overlap_s *)overlapBuffer->base)[endChunk].max = refStart + refLength;
-        }
-        
-        for (i = 0; i != refLength; ++i) {
-            if (cov[i] < UINT_MAX)
-                ++cov[i];
-        }
-    }
-    return 0;
-}
-
-static void GetCounts(AlignmentRecord const *data, unsigned const seqLen,
-                      unsigned *const nMatch,
-                      unsigned *const nMiss,
-                      unsigned *const nIndels)
-{
-    bool const *const has_mismatch = data->data.has_mismatch.buffer;
-    bool const *const has_offset = data->data.has_ref_offset.buffer;
-    int32_t const *const ref_offset = data->data.ref_offset.buffer;
-    uint8_t const *const ref_offset_type = data->data.ref_offset_type.buffer;
-    unsigned misses = 0;
-    unsigned matchs = 0;
-    unsigned insert = 0;
-    unsigned delete = 0;
-    unsigned j = 0;
-    unsigned i;
-    
-    for (i = 0; i < seqLen; ) {
-        if (has_offset[i]) {
-            int const offs = ref_offset[j];
-            int const type = ref_offset_type[j];
-            
-            ++j;
-            if (type == 0) {
-                if (offs < 0)
-                    ++insert;
-                else
-                    ++delete;
-            }
-            if (offs < 0) {
-                i += (unsigned)(-offs);
-                continue;
-            }
-        }
-        if (has_mismatch[i])
-            ++misses;
-        else
-            ++matchs;
-        ++i;
-    }
-    *nMatch = matchs;
-    *nMiss  = misses;
-    *nIndels = insert + delete;
-}
-
-rc_t ReferenceRead(Reference *self, AlignmentRecord *data,
-                   uint64_t const pos,
-                   uint32_t const rawCigar[], uint32_t const cigCount,
-                   char const seqDNA[], uint32_t const seqLen,
-                   uint8_t const rna_orient, uint32_t *matches,
-                   bool acceptNoMatch, unsigned minMatchCount, uint32_t maxSeqLen)
-{
-    *matches = 0;
-    BAIL_ON_FAIL(ReferenceSeq_Compress(self->rseq, 
-                                       (self->acceptHardClip ? ewrefmgr_co_AcceptHardClip : 0) + ewrefmgr_cmp_Binary, 
-                                       pos,
-                                       seqDNA, seqLen, rawCigar, cigCount, 0, NULL, 0, 0, NULL, 0, rna_orient, &data->data));
-
-    if (!acceptNoMatch && data->data.ref_len == 0)
-        return RC(rcApp, rcFile, rcReading, rcConstraint, rcViolated);
-    
-    if (!self->out_of_order && pos < self->lastOffset) {
-        Unsorted(self);
-    }
-    if (self->out_of_order)
-        return 0;
-    else {
-        unsigned nmis;
-        unsigned nmatch;
-        unsigned indels;
-
-        self->lastOffset = data->data.effective_offset;
-        GetCounts(data, seqLen, &nmatch, &nmis, &indels);
-        *matches = nmatch;
-        
-        if (acceptNoMatch || nmatch >= minMatchCount)
-            return ReferenceAddCoverage(self, data->data.effective_offset,
-                                        data->data.ref_len, nmis, indels,
-                                        data->isPrimary, maxSeqLen);
-        else
-            return RC(rcApp, rcFile, rcReading, rcConstraint, rcViolated);
-    }
-}
-
-static rc_t IdVecAppend(KDataBuffer *vec, uint64_t id)
-{
-    uint64_t const end = vec->elem_count;
-    
-    BAIL_ON_FAIL(KDataBufferResize(vec, end + 1));
-    ((uint64_t *)vec->base)[end] = id;
-    return 0;
-}
-
-rc_t ReferenceAddAlignId(Reference *self,
-                         int64_t align_id,
-                         bool is_primary
-                         )
-{
-    if (self->out_of_order)
-        return 0;
-    return IdVecAppend(is_primary ? &self->pri_align : &self->sec_align, align_id);
-}
-
-rc_t ReferenceWhack(Reference *self, bool commit, uint32_t maxSeqLen,
-                    rc_t (*const quitting)(void)
-                    )
-{
-    rc_t rc = 0;
-    
-    if (self) {
-#if DUMP_CONFIG
-        if (self->mgr)
-            ReferenceMgr_DumpConfig(self->mgr);
-#endif
-        if (commit) {
-            rc = FlushBuffers(self, self->length, true, true, maxSeqLen);
-            if (rc != 0)
-                commit = false;
-        }
-        KDataBufferWhack(&self->sec_align);
-        KDataBufferWhack(&self->pri_align);
-        KDataBufferWhack(&self->mismatches);
-        KDataBufferWhack(&self->indels);
-        KDataBufferWhack(&self->coverage);
-        KDataBufferWhack(&self->pri_overlap);
-        KDataBufferWhack(&self->sec_overlap);
-        if (self->rseq)
-            rc = ReferenceSeq_Release(self->rseq);
-        if (self->out_of_order) {
-            (void)LOGMSG(klogInfo, "Starting coverage calculation");
-            rc = ReferenceMgr_Release(self->mgr, commit, NULL, true, quitting);
-        }
-        else {
-            rc = ReferenceMgr_Release(self->mgr, commit, NULL, false, NULL);
-        }
-    }
-    return rc;
-}
diff --git a/libs/ncbi-vdb/Makefile b/libs/ncbi-vdb/Makefile
deleted file mode 100644
index b63633f..0000000
--- a/libs/ncbi-vdb/Makefile
+++ /dev/null
@@ -1,157 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/ncbi-vdb
-
-EXT_LIBS = \
-	libncbi-vdb \
-	libncbi-wvdb
-
-ALL_LIBS = \
-	$(EXT_LIBS)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(EXT_LIBS): makedirs
-	@ $(MAKE_CMD) $(LIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(LIBDIR)/,$(EXT_LIBS))
-
-.PHONY: $(TARGDIR)/all $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# virtual db library
-# made in both static and shared versions
-$(LIBDIR)/libncbi-vdb: $(addprefix $(LIBDIR)/libncbi-vdb.,$(LIBX) $(SHLX))
-
-ifeq (64,$(BITS))
-  LIBVDB_BLAST = vdb-blast
-else
-  LIBVDB_BLAST =
-endif
-
-ifeq (win,$(OS))
-LIBKQ =
-else
-LIBKQ = kq
-endif
-
-ifeq (1,$(HAVE_XML2))
-LIBKXML = kxml kxfs
-ifneq (,$(XML2_LIBDIR))
-LDFLAGS += -L$(XML2_LIBDIR)
-endif
-endif
-
-VDB_LIB_CMN =    \
-	align-access \
-	ncbi-bam     \
-	vfs          \
-	$(LIBKXML)   \
-	kns          \
-	kfg          \
-	krypto       \
-	ksrch        \
-	kfs          \
-	klib         \
-	kproc        \
-	$(LIBKQ)     \
-	kfc          \
-	bz2          \
-	z
-
-VDB_LIB_RD =              \
-	align-reader          \
-	ascp                  \
-	$(EXT_SCHEMA_MODULES) \
-	srareader             \
-	sradb                 \
-	$(LIBVDB_BLAST)       \
-	vdb                   \
-	kdb                   \
-	$(VDB_LIB_CMN)        \
-	ngs-jni               \
-	ngs-py                \
-	ngs                   \
-
-VDB_OBJ = \
-	$(addprefix $(ILIBDIR)/lib,$(addsuffix .a,$(VDB_LIB_RD)))
-
-VDB_LIB = \
-	$(addprefix -s,$(VDB_LIB_RD))
-
-$(LIBDIR)/libncbi-vdb.$(SHLX): $(VDB_OBJ)
-	echo $(SRCDIR)
-	$(LD) --dlib --vers $(SRCDIR)/libncbi-vdb.vers -o $@ $(VDB_LIB)
-
-$(LIBDIR)/libncbi-vdb.$(LIBX): $(VDB_OBJ)
-	$(LD) --slib --vers $(SRCDIR)/libncbi-vdb.vers -o $@ $(VDB_LIB)
-
-#-------------------------------------------------------------------------------
-# update version
-#
-$(LIBDIR)/libncbi-wvdb: $(addprefix $(LIBDIR)/libncbi-wvdb.,$(LIBX) $(SHLX))
-
-VDB_LIB_RDWR =                           \
-	align-writer                         \
-	$(addprefix w,$(EXT_SCHEMA_MODULES)) \
-	wsradb                               \
-	wvdb                                 \
-	wkdb                                 \
-	$(VDB_LIB_CMN)
-
-WVDB_OBJ = \
-	$(addprefix $(ILIBDIR)/lib,$(addsuffix .a,$(VDB_LIB_RDWR)))
-
-WVDB_LIB = \
-	$(addprefix -s,$(VDB_LIB_RDWR))
-
-$(LIBDIR)/libncbi-wvdb.$(SHLX): $(WVDB_OBJ)
-	$(LD) --dlib --vers $(SRCDIR)/libncbi-vdb.vers -o $@ $(WVDB_LIB)
-
-$(LIBDIR)/libncbi-wvdb.$(LIBX): $(WVDB_OBJ)
-	$(LD) --slib --vers $(SRCDIR)/libncbi-vdb.vers -o $@ $(WVDB_LIB)
diff --git a/libs/ngs-c++/Makefile b/libs/ngs-c++/Makefile
deleted file mode 100644
index bdfe614..0000000
--- a/libs/ngs-c++/Makefile
+++ /dev/null
@@ -1,103 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/ngs-c++
-
-INT_LIBS = \
-
-EXT_LIBS = \
-	libncbi-ngs-c++
-
-ALL_LIBS = \
-	$(INT_LIBS) \
-	$(EXT_LIBS)
-
-OBJFILES = \
-	$(NGS_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-INCDIRS += \
-	-I$(SRCDIR)/../ngs \
-	-I$(TOP)/../ngs/ngs-sdk
-
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs # compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-$(EXT_LIBS): makedirs
-	@ $(MAKE_CMD) $(LIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS)) \
-	$(addprefix $(LIBDIR)/,$(EXT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# ncbi-ngs-c++
-#
-$(LIBDIR)/libncbi-ngs-c++: $(addprefix $(LIBDIR)/libncbi-ngs-c++.,$(LIBX))
-
-NGS_SRC = \
-	NCBI-NGS
-
-NGS_OBJ = \
-	$(addsuffix .$(LOBX),$(NGS_SRC))
-
-NGS_LIB = \
-
-$(LIBDIR)/libncbi-ngs-c++.$(LIBX): $(NGS_OBJ)
-	$(LP) --slib --vers $(SRCDIR)/../ncbi-vdb/libncbi-vdb.vers -o $@ $^ $(NGS_LIB)
-
-
-testy-the-bear: $(TEST_BINDIR)/testy-the-ngs-bear
-
-$(TEST_BINDIR)/testy-the-ngs-bear: testy-the-bear.o
-	$(LP) --exe -o $@ $^ -lkapp -lncbi-ngs-c++ -lncbi-vdb
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/ngs-c++/NCBI-NGS.cpp b/libs/ngs-c++/NCBI-NGS.cpp
deleted file mode 100644
index 7b6959b..0000000
--- a/libs/ngs-c++/NCBI-NGS.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <ngs/ncbi/NGS.hpp>
-
-#include <kns/manager.h>
-
-#include <ngs/itf/ErrBlock.hpp>
-
-#include <ngs/itf/ReadCollectionItf.h>
-#include <ngs/itf/ReferenceSequenceItf.h>
-#include "NCBI-NGS.h"
-#include "../klib/release-vers.h"
-
-namespace ncbi
-{
-
-    static bool have_user_version_string;
-
-    /* setAppVersionString
-     *  updates User-Agent header in HTTP communications
-     *
-     *  example usage:
-     *    ncbi::NGS::setAppVersionString ( "pileup-stats.1.0.0" );
-     */
-    void NGS :: setAppVersionString ( const String & app_version )
-        throw ()
-    {
-        // get a KNSManager
-        KNSManager * kns;
-        rc_t rc = KNSManagerMake ( & kns );
-        if ( rc == 0 )
-        {
-            have_user_version_string = true;
-            KNSManagerSetUserAgent ( kns, "ncbi-ngs.%V %.*s", RELEASE_VERS, ( uint32_t ) app_version . size (), app_version . data () );
-            KNSManagerRelease ( kns );
-        }
-    }
-
-    /* open
-     *  create an object representing a named collection of reads
-     *  "spec" may be a path to an object
-     *  or may be an id, accession, or URL
-     */
-    ReadCollection NGS :: openReadCollection ( const String & spec )
-        throw ( ErrorMsg )
-    {
-        if ( ! have_user_version_string )
-            setAppVersionString ( "ncbi-ngs: unknown-application" );
-
-        // call directly into ncbi-vdb library
-        ngs :: ErrBlock err;
-        NGS_ReadCollection_v1 * ret = NCBI_NGS_OpenReadCollection ( spec . c_str (), & err );
-
-        // check for errors
-        err . Check ();
-
-        // create ReadCollection object
-        return ReadCollection ( ( ngs :: ReadCollectionRef ) ret );
-    }
-
-    /* open
-     *  create an object representing a named reference
-     *  "spec" may be a path to an object
-     *  or may be an id, accession, or URL
-     */
-    ReferenceSequence NGS :: openReferenceSequence ( const String & spec )
-        throw ( ErrorMsg )
-    {
-        if ( ! have_user_version_string )
-            setAppVersionString ( "ncbi-ngs: unknown-application" );
-
-        // call directly into ncbi-vdb library
-        ngs :: ErrBlock err;
-        NGS_ReferenceSequence_v1 * ret = NCBI_NGS_OpenReferenceSequence ( spec . c_str (), & err );
-
-        // check for errors
-        err . Check ();
-
-        // create ReferenceSequence object
-        return ReferenceSequence ( ( ngs :: ReferenceSequenceRef ) ret );
-    }
-}
diff --git a/libs/ngs-c++/testy-the-bear.cpp b/libs/ngs-c++/testy-the-bear.cpp
deleted file mode 100644
index b5abed6..0000000
--- a/libs/ngs-c++/testy-the-bear.cpp
+++ /dev/null
@@ -1,277 +0,0 @@
-#include <ngs/NCBI-NGS.hpp>
-#include <ngs/ReadCollection.hpp>
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/xcdefs.h>
-#include <kfc/except.h>
-#include <klib/printf.h>
-#include <vdb/manager.h>
-#include <vdb/vdb-priv.h>
-
-#include <kapp/args.h>
-
-#include <iostream>
-
-#include <stdarg.h>
-
-#define FAKE_CTX_RECOVER 0
-#define FAKE_CTX_ERROR 0
-#define FAKE_MAKE_VDATABASE 0
-namespace ngs
-{
-    static
-    void run ()
-    {
-#if 1
-        ReadCollection run = NCBI :: NGS :: openReadCollection ( "SRR000001" );
-#elif 1
-        ReadCollection run = NCBI :: NGS :: openReadCollection ( "SRR1063272" );
-#endif
-        ReadIterator it = run . getReads ( Read :: all );
-        
-        String run_name = run . getName ();
-
-        int i;
-        for ( i = 0;
-#if 0
-              i < 5 &&
-#endif
-              it . nextRead (); ++ i )
-        {
-            StringRef read_name = it . getReadName ();
-            StringRef bases = it . getReadBases ();
-            StringRef qual = it . getReadQualities ();
-
-            
-            std :: cout 
-                << '@'
-                << run_name
-                << '.'
-                << it . getReadId ()
-                << ' '
-                << read_name
-                << " length="
-                << bases . size ()
-                << std :: endl
-                << bases
-                << std :: endl
-                << '+'
-                << run_name
-                << '.'
-                << it . getReadId ()
-                << ' '
-                << read_name
-                << " length="
-                << qual . size ()
-                << std :: endl
-                << qual
-                << std :: endl;
-        }
-
-        std :: cerr
-            << "Read "
-            << i
-            << " spots for "
-            << run_name
-            << std :: endl
-            << "Written "
-            << i
-            << " spots for "
-            << run_name
-            << std :: endl;
-
-    }
-}
-
-extern "C"
-{
-#if FAKE_CTX_RECOVER
-    ctx_t ctx_recover ( KCtx * new_ctx, const KFuncLoc * func_loc, uint32_t rsrc_bits )
-    {
-        static KCtx fake_ctx;
-        static KRsrc fake_rsrc;
-        static bool initialized;
-
-        if ( ! initialized )
-        {
-            VDBManagerMakeRead ( ( const VDBManager** ) & fake_rsrc . vdb, NULL );
-            VDBManagerOpenKDBManagerRead ( fake_rsrc . vdb, ( const KDBManager** ) & fake_rsrc . kdb );
-            fake_ctx . rsrc = & fake_rsrc;
-            fake_ctx . loc = func_loc;
-            initialized = true;
-        }
-
-        * new_ctx = fake_ctx;
-        return new_ctx;
-    }
-#endif
-
-#if FAKE_CTX_ERROR
-    static
-    void print_stack_trace ( ctx_t ctx )
-    {
-        if ( ctx != NULL )
-        {
-            print_stack_trace ( ctx -> caller );
-            std :: cerr
-                << ctx -> loc -> src -> mod
-                << '/'
-                << ctx -> loc -> src -> file
-                << '.'
-                << ctx -> loc -> src -> ext
-                << ':'
-                << ctx -> loc -> func
-                << std :: endl
-                ;
-        }
-    }
-
-    static
-    void print_xc ( xc_t xc )
-    {
-        const XCErr * err = ( const XCErr* ) xc;
-        std :: cerr
-            << err -> name
-            << ": "
-            ;
-
-        while ( err -> dad != NULL )
-            err = err -> dad;
-
-        const XCObj * obj = err -> obj;
-        while ( obj -> dad != NULL )
-            obj = obj -> dad;
-
-        const XCState * state = err -> state;
-        while ( state -> dad != NULL )
-            state = state -> dad;
-
-        std :: cerr
-            << obj -> desc
-            << ' '
-            << state -> desc
-            << ": "
-            ;
-    }
-
-    static
-    rc_t make_rc ( rc_t rc_ctx, xc_t xc )
-    {
-        const XCErr * err = ( const XCErr* ) xc;
-        while ( err -> dad != NULL )
-            err = err -> dad;
-
-        const XCObj * obj = err -> obj;
-        while ( obj -> dad != NULL )
-            obj = obj -> dad;
-
-        const XCState * state = err -> state;
-        while ( state -> dad != NULL )
-            state = state -> dad;
-
-        return rc_ctx | ( obj -> rc_obj << 6 ) | state -> rc_state;
-    }
-
-    void ctx_error ( ctx_t ctx, uint32_t lineno, xc_sev_t sev, xc_t xc, const char *msg, ... )
-    {
-        static const char * severity_strings [ 3 ] = { "SYSTEM", "INTERNAL", "USER" };
-        char buffer [ 4096 ];
-        va_list args;
-
-        va_start ( args, msg );
-
-        print_stack_trace ( ctx -> caller );
-        std :: cerr
-            << ctx -> loc -> src -> mod
-            << '/'
-            << ctx -> loc -> src -> file
-            << '.'
-            << ctx -> loc -> src -> ext
-            << ':'
-            << ctx -> loc -> func
-            << ':'
-            << lineno
-            << ": "
-            << severity_strings [ sev ]
-            << " ERROR: "
-            ;
-
-        print_xc ( xc );
-
-        string_vprintf ( buffer, sizeof buffer, NULL, msg, args );
-
-        va_end ( args );
-
-        std :: cerr
-            << buffer
-            << std :: endl
-            ;
-
-        KCtx * mctx = const_cast < KCtx* > ( ctx );
-        mctx -> rc = make_rc ( ctx -> loc -> rc_context, xc );
-        mctx -> annotated = mctx -> error = true;
-        while ( 1 )
-        {
-            mctx = const_cast < KCtx* > ( mctx -> caller );
-            if ( mctx == 0 )
-                break;
-            if ( mctx -> error )
-            {
-                if ( ! mctx -> clear_error_stop )
-                    mctx -> clear_error_stop = true;
-                break;
-            }
-
-            assert ( ! mctx -> clear_error_stop );
-            mctx -> error = true;
-        }
-    }
-#endif
-
-#if FAKE_MAKE_VDATABASE
-    NGS_ReadCollection * NGS_ReadCollectionMakeVDatabase ( ctx_t ctx, struct VDatabase const *db, const char * spec )
-    {
-        return 0;
-    }
-#endif
-
-    ver_t CC KAppVersion ( void )
-    {
-        return 0;
-    }
-    rc_t CC UsageSummary (const char * progname)
-    {
-        return 0;
-    }
-
-    rc_t CC Usage ( const Args * args )
-    {
-        return 0;
-    }
-
-    const char UsageDefaultName[] = "testy-the-ngs-bear";    
-
-    rc_t KMain ( int argc, char * argv [] )
-    {
-        try
-        {
-            ngs :: run ();
-        }
-        catch ( ngs :: ErrorMsg & x )
-        {
-            :: std :: cerr
-                << "ngs :: Error - "
-                << x . what ()
-                << std :: endl;
-        }
-        catch ( ... )
-        {
-            :: std :: cerr
-                << "unknown error"
-                << std :: endl;
-        }
-        
-        return 0;
-    }
-}
-
diff --git a/libs/ngs-jni/.gitignore b/libs/ngs-jni/.gitignore
deleted file mode 100644
index 116806e..0000000
--- a/libs/ngs-jni/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-headers-generated
diff --git a/libs/ngs-jni/Makefile b/libs/ngs-jni/Makefile
deleted file mode 100644
index 1ba6cba..0000000
--- a/libs/ngs-jni/Makefile
+++ /dev/null
@@ -1,109 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/ngs-jni
-
-INT_LIBS = \
-	libngs-jni
-
-EXT_LIBS = \
-
-ALL_LIBS = \
-	$(INT_LIBS) \
-	$(EXT_LIBS)
-
-include $(TOP)/build/Makefile.env
-
-INCDIRS += \
-	-I$(SRCDIR)/../ngs
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs jnihdrs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-$(EXT_LIBS): makedirs jnihdrs
-	@ $(MAKE_CMD) $(LIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS)) \
-	$(addprefix $(LIBDIR)/,$(EXT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# JNI headers
-#
-jnihdrs: # headers-generated
-
-$(CLSPATH)/ngs-java.jar:
-	@ echo "don't know where $@ is"
-
-JNI_BASE =  \
-	Manager
-
-JNI_INC = \
-	$(addprefix jni_,$(addsuffix .h,$(JNI_BASE)))
-
-headers-generated: $(CLSPATH)/ngs-java.jar
-	javah -classpath $^ $(addprefix gov.nih.nlm.ncbi.ngs.,$(JNI_BASE))
-	@ echo 'for f in gov_nih_nlm_ncbi_ngs_*.h; do mv $$f jni_$${f#gov_nih_nlm_ncbi_ngs_}; done' | bash
-	@ touch $@
-
-#-------------------------------------------------------------------------------
-# ncbi-ngs-jni
-#
-$(ILIBDIR)/libngs-jni: $(addprefix $(ILIBDIR)/libngs-jni.,$(LIBX))
-
-JNI_FIXED =  \
-	String   \
-	ErrorMsg
-
-JNI_SRC = \
-	$(addprefix jni_,$(JNI_BASE) $(JNI_FIXED))
-
-JNI_OBJ = \
-	$(addsuffix .$(LOBX),$(JNI_SRC))
-
-$(ILIBDIR)/libngs-jni.$(LIBX): $(JNI_OBJ)
-	$(LD) --slib -o $@ $^
diff --git a/libs/ngs-jni/jni.h b/libs/ngs-jni/jni.h
deleted file mode 100644
index 8ed7366..0000000
--- a/libs/ngs-jni/jni.h
+++ /dev/null
@@ -1,1944 +0,0 @@
-/*
- * %W% %E%
- *
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL.  Use is subject to license terms.
- */
-
-/*
- * We used part of Netscape's Java Runtime Interface (JRI) as the starting
- * point of our design and implementation.
- */
-
-/******************************************************************************
- * Java Runtime Interface
- * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.
- *****************************************************************************/
-
-#ifndef _JAVASOFT_JNI_H_
-#define _JAVASOFT_JNI_H_
-
-#include <stdio.h>
-#include <stdarg.h>
-
-/* jni_md.h contains the machine-dependent typedefs for jbyte, jint
-   and jlong */
-
-#include "jni_md.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * JNI Types
- */
-
-#ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H
-
-typedef unsigned char	jboolean;
-typedef unsigned short	jchar;
-typedef short		jshort;
-typedef float		jfloat;
-typedef double		jdouble;
-
-typedef jint            jsize;
-
-#ifdef __cplusplus
-
-class _jobject {};
-class _jclass : public _jobject {};
-class _jthrowable : public _jobject {};
-class _jstring : public _jobject {};
-class _jarray : public _jobject {};
-class _jbooleanArray : public _jarray {};
-class _jbyteArray : public _jarray {};
-class _jcharArray : public _jarray {};
-class _jshortArray : public _jarray {};
-class _jintArray : public _jarray {};
-class _jlongArray : public _jarray {};
-class _jfloatArray : public _jarray {};
-class _jdoubleArray : public _jarray {};
-class _jobjectArray : public _jarray {};
-
-typedef _jobject *jobject;
-typedef _jclass *jclass;
-typedef _jthrowable *jthrowable;
-typedef _jstring *jstring;
-typedef _jarray *jarray;
-typedef _jbooleanArray *jbooleanArray;
-typedef _jbyteArray *jbyteArray;
-typedef _jcharArray *jcharArray;
-typedef _jshortArray *jshortArray;
-typedef _jintArray *jintArray;
-typedef _jlongArray *jlongArray;
-typedef _jfloatArray *jfloatArray;
-typedef _jdoubleArray *jdoubleArray;
-typedef _jobjectArray *jobjectArray;
-
-#else
-
-struct _jobject;
-
-typedef struct _jobject *jobject;
-typedef jobject jclass;
-typedef jobject jthrowable;
-typedef jobject jstring;
-typedef jobject jarray;
-typedef jarray jbooleanArray;
-typedef jarray jbyteArray;
-typedef jarray jcharArray;
-typedef jarray jshortArray;
-typedef jarray jintArray;
-typedef jarray jlongArray;
-typedef jarray jfloatArray;
-typedef jarray jdoubleArray;
-typedef jarray jobjectArray;
-
-#endif
-
-typedef jobject jweak;
-
-typedef union jvalue {
-    jboolean z;
-    jbyte    b;
-    jchar    c;
-    jshort   s;
-    jint     i;
-    jlong    j;
-    jfloat   f;
-    jdouble  d;
-    jobject  l;
-} jvalue;
-
-struct _jfieldID;
-typedef struct _jfieldID *jfieldID;
-
-struct _jmethodID;
-typedef struct _jmethodID *jmethodID;
-
-/* Return values from jobjectRefType */
-typedef enum _jobjectType {
-     JNIInvalidRefType    = 0,
-     JNILocalRefType      = 1,
-     JNIGlobalRefType     = 2,
-     JNIWeakGlobalRefType = 3 
-} jobjectRefType;
-
-
-#endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */
-
-/*
- * jboolean constants
- */
-
-#define JNI_FALSE 0
-#define JNI_TRUE 1
-
-/*
- * possible return values for JNI functions.
- */
-
-#define JNI_OK           0                 /* success */
-#define JNI_ERR          (-1)              /* unknown error */
-#define JNI_EDETACHED    (-2)              /* thread detached from the VM */
-#define JNI_EVERSION     (-3)              /* JNI version error */
-#define JNI_ENOMEM       (-4)              /* not enough memory */
-#define JNI_EEXIST       (-5)              /* VM already created */
-#define JNI_EINVAL       (-6)              /* invalid arguments */
-
-/*
- * used in ReleaseScalarArrayElements
- */
-
-#define JNI_COMMIT 1
-#define JNI_ABORT 2
-
-/*
- * used in RegisterNatives to describe native method name, signature,
- * and function pointer.
- */
-
-typedef struct {
-    char *name;
-    char *signature;
-    void *fnPtr;
-} JNINativeMethod;
-
-/*
- * JNI Native Method Interface.
- */
-
-struct JNINativeInterface_;
-
-struct JNIEnv_;
-
-#ifdef __cplusplus
-typedef JNIEnv_ JNIEnv;
-#else
-typedef const struct JNINativeInterface_ *JNIEnv;
-#endif
-
-/*
- * JNI Invocation Interface.
- */
-
-struct JNIInvokeInterface_;
-
-struct JavaVM_;
-
-#ifdef __cplusplus
-typedef JavaVM_ JavaVM;
-#else
-typedef const struct JNIInvokeInterface_ *JavaVM;
-#endif
-
-struct JNINativeInterface_ {
-    void *reserved0;
-    void *reserved1;
-    void *reserved2;
-
-    void *reserved3;
-    jint (JNICALL *GetVersion)(JNIEnv *env);
-
-    jclass (JNICALL *DefineClass)
-      (JNIEnv *env, const char *name, jobject loader, const jbyte *buf,
-       jsize len);
-    jclass (JNICALL *FindClass)
-      (JNIEnv *env, const char *name);
-
-    jmethodID (JNICALL *FromReflectedMethod)
-      (JNIEnv *env, jobject method);
-    jfieldID (JNICALL *FromReflectedField)
-      (JNIEnv *env, jobject field);
-
-    jobject (JNICALL *ToReflectedMethod)
-      (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic);
-
-    jclass (JNICALL *GetSuperclass)
-      (JNIEnv *env, jclass sub);
-    jboolean (JNICALL *IsAssignableFrom)
-      (JNIEnv *env, jclass sub, jclass sup);
-
-    jobject (JNICALL *ToReflectedField)
-      (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic);
-
-    jint (JNICALL *Throw)
-      (JNIEnv *env, jthrowable obj);
-    jint (JNICALL *ThrowNew)
-      (JNIEnv *env, jclass clazz, const char *msg);
-    jthrowable (JNICALL *ExceptionOccurred)
-      (JNIEnv *env);
-    void (JNICALL *ExceptionDescribe)
-      (JNIEnv *env);
-    void (JNICALL *ExceptionClear)
-      (JNIEnv *env);
-    void (JNICALL *FatalError)
-      (JNIEnv *env, const char *msg);
-
-    jint (JNICALL *PushLocalFrame)
-      (JNIEnv *env, jint capacity);
-    jobject (JNICALL *PopLocalFrame)
-      (JNIEnv *env, jobject result);
-
-    jobject (JNICALL *NewGlobalRef)
-      (JNIEnv *env, jobject lobj);
-    void (JNICALL *DeleteGlobalRef)
-      (JNIEnv *env, jobject gref);
-    void (JNICALL *DeleteLocalRef)
-      (JNIEnv *env, jobject obj);
-    jboolean (JNICALL *IsSameObject)
-      (JNIEnv *env, jobject obj1, jobject obj2);
-    jobject (JNICALL *NewLocalRef)
-      (JNIEnv *env, jobject ref);
-    jint (JNICALL *EnsureLocalCapacity)
-      (JNIEnv *env, jint capacity);
-
-    jobject (JNICALL *AllocObject)
-      (JNIEnv *env, jclass clazz);
-    jobject (JNICALL *NewObject)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jobject (JNICALL *NewObjectV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jobject (JNICALL *NewObjectA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jclass (JNICALL *GetObjectClass)
-      (JNIEnv *env, jobject obj);
-    jboolean (JNICALL *IsInstanceOf)
-      (JNIEnv *env, jobject obj, jclass clazz);
-
-    jmethodID (JNICALL *GetMethodID)
-      (JNIEnv *env, jclass clazz, const char *name, const char *sig);
-
-    jobject (JNICALL *CallObjectMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jobject (JNICALL *CallObjectMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jobject (JNICALL *CallObjectMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
-
-    jboolean (JNICALL *CallBooleanMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jboolean (JNICALL *CallBooleanMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jboolean (JNICALL *CallBooleanMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
-
-    jbyte (JNICALL *CallByteMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jbyte (JNICALL *CallByteMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jbyte (JNICALL *CallByteMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
-    jchar (JNICALL *CallCharMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jchar (JNICALL *CallCharMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jchar (JNICALL *CallCharMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
-    jshort (JNICALL *CallShortMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jshort (JNICALL *CallShortMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jshort (JNICALL *CallShortMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
-    jint (JNICALL *CallIntMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jint (JNICALL *CallIntMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jint (JNICALL *CallIntMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
-    jlong (JNICALL *CallLongMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jlong (JNICALL *CallLongMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jlong (JNICALL *CallLongMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
-    jfloat (JNICALL *CallFloatMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jfloat (JNICALL *CallFloatMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jfloat (JNICALL *CallFloatMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
-    jdouble (JNICALL *CallDoubleMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jdouble (JNICALL *CallDoubleMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jdouble (JNICALL *CallDoubleMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
-    void (JNICALL *CallVoidMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    void (JNICALL *CallVoidMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    void (JNICALL *CallVoidMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
-
-    jobject (JNICALL *CallNonvirtualObjectMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jobject (JNICALL *CallNonvirtualObjectMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jobject (JNICALL *CallNonvirtualObjectMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue * args);
-
-    jboolean (JNICALL *CallNonvirtualBooleanMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jboolean (JNICALL *CallNonvirtualBooleanMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jboolean (JNICALL *CallNonvirtualBooleanMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue * args);
-
-    jbyte (JNICALL *CallNonvirtualByteMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jbyte (JNICALL *CallNonvirtualByteMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jbyte (JNICALL *CallNonvirtualByteMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue *args);
-
-    jchar (JNICALL *CallNonvirtualCharMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jchar (JNICALL *CallNonvirtualCharMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jchar (JNICALL *CallNonvirtualCharMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue *args);
-
-    jshort (JNICALL *CallNonvirtualShortMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jshort (JNICALL *CallNonvirtualShortMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jshort (JNICALL *CallNonvirtualShortMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue *args);
-
-    jint (JNICALL *CallNonvirtualIntMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jint (JNICALL *CallNonvirtualIntMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jint (JNICALL *CallNonvirtualIntMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue *args);
-
-    jlong (JNICALL *CallNonvirtualLongMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jlong (JNICALL *CallNonvirtualLongMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jlong (JNICALL *CallNonvirtualLongMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue *args);
-
-    jfloat (JNICALL *CallNonvirtualFloatMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jfloat (JNICALL *CallNonvirtualFloatMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jfloat (JNICALL *CallNonvirtualFloatMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue *args);
-
-    jdouble (JNICALL *CallNonvirtualDoubleMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jdouble (JNICALL *CallNonvirtualDoubleMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jdouble (JNICALL *CallNonvirtualDoubleMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue *args);
-
-    void (JNICALL *CallNonvirtualVoidMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    void (JNICALL *CallNonvirtualVoidMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    void (JNICALL *CallNonvirtualVoidMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue * args);
-
-    jfieldID (JNICALL *GetFieldID)
-      (JNIEnv *env, jclass clazz, const char *name, const char *sig);
-
-    jobject (JNICALL *GetObjectField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jboolean (JNICALL *GetBooleanField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jbyte (JNICALL *GetByteField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jchar (JNICALL *GetCharField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jshort (JNICALL *GetShortField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jint (JNICALL *GetIntField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jlong (JNICALL *GetLongField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jfloat (JNICALL *GetFloatField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jdouble (JNICALL *GetDoubleField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-
-    void (JNICALL *SetObjectField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val);
-    void (JNICALL *SetBooleanField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val);
-    void (JNICALL *SetByteField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val);
-    void (JNICALL *SetCharField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val);
-    void (JNICALL *SetShortField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val);
-    void (JNICALL *SetIntField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jint val);
-    void (JNICALL *SetLongField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val);
-    void (JNICALL *SetFloatField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val);
-    void (JNICALL *SetDoubleField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val);
-
-    jmethodID (JNICALL *GetStaticMethodID)
-      (JNIEnv *env, jclass clazz, const char *name, const char *sig);
-
-    jobject (JNICALL *CallStaticObjectMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jobject (JNICALL *CallStaticObjectMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jobject (JNICALL *CallStaticObjectMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jboolean (JNICALL *CallStaticBooleanMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jboolean (JNICALL *CallStaticBooleanMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jboolean (JNICALL *CallStaticBooleanMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jbyte (JNICALL *CallStaticByteMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jbyte (JNICALL *CallStaticByteMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jbyte (JNICALL *CallStaticByteMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jchar (JNICALL *CallStaticCharMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jchar (JNICALL *CallStaticCharMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jchar (JNICALL *CallStaticCharMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jshort (JNICALL *CallStaticShortMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jshort (JNICALL *CallStaticShortMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jshort (JNICALL *CallStaticShortMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jint (JNICALL *CallStaticIntMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jint (JNICALL *CallStaticIntMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jint (JNICALL *CallStaticIntMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jlong (JNICALL *CallStaticLongMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jlong (JNICALL *CallStaticLongMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jlong (JNICALL *CallStaticLongMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jfloat (JNICALL *CallStaticFloatMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jfloat (JNICALL *CallStaticFloatMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jfloat (JNICALL *CallStaticFloatMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jdouble (JNICALL *CallStaticDoubleMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jdouble (JNICALL *CallStaticDoubleMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jdouble (JNICALL *CallStaticDoubleMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    void (JNICALL *CallStaticVoidMethod)
-      (JNIEnv *env, jclass cls, jmethodID methodID, ...);
-    void (JNICALL *CallStaticVoidMethodV)
-      (JNIEnv *env, jclass cls, jmethodID methodID, va_list args);
-    void (JNICALL *CallStaticVoidMethodA)
-      (JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args);
-
-    jfieldID (JNICALL *GetStaticFieldID)
-      (JNIEnv *env, jclass clazz, const char *name, const char *sig);
-    jobject (JNICALL *GetStaticObjectField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jboolean (JNICALL *GetStaticBooleanField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jbyte (JNICALL *GetStaticByteField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jchar (JNICALL *GetStaticCharField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jshort (JNICALL *GetStaticShortField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jint (JNICALL *GetStaticIntField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jlong (JNICALL *GetStaticLongField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jfloat (JNICALL *GetStaticFloatField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jdouble (JNICALL *GetStaticDoubleField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-
-    void (JNICALL *SetStaticObjectField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value);
-    void (JNICALL *SetStaticBooleanField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value);
-    void (JNICALL *SetStaticByteField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value);
-    void (JNICALL *SetStaticCharField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value);
-    void (JNICALL *SetStaticShortField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value);
-    void (JNICALL *SetStaticIntField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value);
-    void (JNICALL *SetStaticLongField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value);
-    void (JNICALL *SetStaticFloatField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value);
-    void (JNICALL *SetStaticDoubleField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value);
-
-    jstring (JNICALL *NewString)
-      (JNIEnv *env, const jchar *unicode, jsize len);
-    jsize (JNICALL *GetStringLength)
-      (JNIEnv *env, jstring str);
-    const jchar *(JNICALL *GetStringChars)
-      (JNIEnv *env, jstring str, jboolean *isCopy);
-    void (JNICALL *ReleaseStringChars)
-      (JNIEnv *env, jstring str, const jchar *chars);
-
-    jstring (JNICALL *NewStringUTF)
-      (JNIEnv *env, const char *utf);
-    jsize (JNICALL *GetStringUTFLength)
-      (JNIEnv *env, jstring str);
-    const char* (JNICALL *GetStringUTFChars)
-      (JNIEnv *env, jstring str, jboolean *isCopy);
-    void (JNICALL *ReleaseStringUTFChars)
-      (JNIEnv *env, jstring str, const char* chars);
-
-
-    jsize (JNICALL *GetArrayLength)
-      (JNIEnv *env, jarray array);
-
-    jobjectArray (JNICALL *NewObjectArray)
-      (JNIEnv *env, jsize len, jclass clazz, jobject init);
-    jobject (JNICALL *GetObjectArrayElement)
-      (JNIEnv *env, jobjectArray array, jsize index);
-    void (JNICALL *SetObjectArrayElement)
-      (JNIEnv *env, jobjectArray array, jsize index, jobject val);
-
-    jbooleanArray (JNICALL *NewBooleanArray)
-      (JNIEnv *env, jsize len);
-    jbyteArray (JNICALL *NewByteArray)
-      (JNIEnv *env, jsize len);
-    jcharArray (JNICALL *NewCharArray)
-      (JNIEnv *env, jsize len);
-    jshortArray (JNICALL *NewShortArray)
-      (JNIEnv *env, jsize len);
-    jintArray (JNICALL *NewIntArray)
-      (JNIEnv *env, jsize len);
-    jlongArray (JNICALL *NewLongArray)
-      (JNIEnv *env, jsize len);
-    jfloatArray (JNICALL *NewFloatArray)
-      (JNIEnv *env, jsize len);
-    jdoubleArray (JNICALL *NewDoubleArray)
-      (JNIEnv *env, jsize len);
-
-    jboolean * (JNICALL *GetBooleanArrayElements)
-      (JNIEnv *env, jbooleanArray array, jboolean *isCopy);
-    jbyte * (JNICALL *GetByteArrayElements)
-      (JNIEnv *env, jbyteArray array, jboolean *isCopy);
-    jchar * (JNICALL *GetCharArrayElements)
-      (JNIEnv *env, jcharArray array, jboolean *isCopy);
-    jshort * (JNICALL *GetShortArrayElements)
-      (JNIEnv *env, jshortArray array, jboolean *isCopy);
-    jint * (JNICALL *GetIntArrayElements)
-      (JNIEnv *env, jintArray array, jboolean *isCopy);
-    jlong * (JNICALL *GetLongArrayElements)
-      (JNIEnv *env, jlongArray array, jboolean *isCopy);
-    jfloat * (JNICALL *GetFloatArrayElements)
-      (JNIEnv *env, jfloatArray array, jboolean *isCopy);
-    jdouble * (JNICALL *GetDoubleArrayElements)
-      (JNIEnv *env, jdoubleArray array, jboolean *isCopy);
-
-    void (JNICALL *ReleaseBooleanArrayElements)
-      (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode);
-    void (JNICALL *ReleaseByteArrayElements)
-      (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode);
-    void (JNICALL *ReleaseCharArrayElements)
-      (JNIEnv *env, jcharArray array, jchar *elems, jint mode);
-    void (JNICALL *ReleaseShortArrayElements)
-      (JNIEnv *env, jshortArray array, jshort *elems, jint mode);
-    void (JNICALL *ReleaseIntArrayElements)
-      (JNIEnv *env, jintArray array, jint *elems, jint mode);
-    void (JNICALL *ReleaseLongArrayElements)
-      (JNIEnv *env, jlongArray array, jlong *elems, jint mode);
-    void (JNICALL *ReleaseFloatArrayElements)
-      (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode);
-    void (JNICALL *ReleaseDoubleArrayElements)
-      (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode);
-
-    void (JNICALL *GetBooleanArrayRegion)
-      (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
-    void (JNICALL *GetByteArrayRegion)
-      (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
-    void (JNICALL *GetCharArrayRegion)
-      (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
-    void (JNICALL *GetShortArrayRegion)
-      (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
-    void (JNICALL *GetIntArrayRegion)
-      (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
-    void (JNICALL *GetLongArrayRegion)
-      (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
-    void (JNICALL *GetFloatArrayRegion)
-      (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
-    void (JNICALL *GetDoubleArrayRegion)
-      (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
-
-    void (JNICALL *SetBooleanArrayRegion)
-      (JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf);
-    void (JNICALL *SetByteArrayRegion)
-      (JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf);
-    void (JNICALL *SetCharArrayRegion)
-      (JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf);
-    void (JNICALL *SetShortArrayRegion)
-      (JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf);
-    void (JNICALL *SetIntArrayRegion)
-      (JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf);
-    void (JNICALL *SetLongArrayRegion)
-      (JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf);
-    void (JNICALL *SetFloatArrayRegion)
-      (JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf);
-    void (JNICALL *SetDoubleArrayRegion)
-      (JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf);
-
-    jint (JNICALL *RegisterNatives)
-      (JNIEnv *env, jclass clazz, const JNINativeMethod *methods,
-       jint nMethods);
-    jint (JNICALL *UnregisterNatives)
-      (JNIEnv *env, jclass clazz);
-
-    jint (JNICALL *MonitorEnter)
-      (JNIEnv *env, jobject obj);
-    jint (JNICALL *MonitorExit)
-      (JNIEnv *env, jobject obj);
-
-    jint (JNICALL *GetJavaVM)
-      (JNIEnv *env, JavaVM **vm);
-
-    void (JNICALL *GetStringRegion)
-      (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);
-    void (JNICALL *GetStringUTFRegion)
-      (JNIEnv *env, jstring str, jsize start, jsize len, char *buf);
-
-    void * (JNICALL *GetPrimitiveArrayCritical)
-      (JNIEnv *env, jarray array, jboolean *isCopy);
-    void (JNICALL *ReleasePrimitiveArrayCritical)
-      (JNIEnv *env, jarray array, void *carray, jint mode);
-
-    const jchar * (JNICALL *GetStringCritical)
-      (JNIEnv *env, jstring string, jboolean *isCopy);
-    void (JNICALL *ReleaseStringCritical)
-      (JNIEnv *env, jstring string, const jchar *cstring);
-
-    jweak (JNICALL *NewWeakGlobalRef)
-       (JNIEnv *env, jobject obj);
-    void (JNICALL *DeleteWeakGlobalRef)
-       (JNIEnv *env, jweak ref);
-
-    jboolean (JNICALL *ExceptionCheck)
-       (JNIEnv *env);
-
-    jobject (JNICALL *NewDirectByteBuffer)
-       (JNIEnv* env, void* address, jlong capacity);
-    void* (JNICALL *GetDirectBufferAddress)
-       (JNIEnv* env, jobject buf);
-    jlong (JNICALL *GetDirectBufferCapacity)
-       (JNIEnv* env, jobject buf);
-
-    /* New JNI 1.6 Features */
-
-    jobjectRefType (JNICALL *GetObjectRefType)
-        (JNIEnv* env, jobject obj);
-};
-
-/*
- * We use inlined functions for C++ so that programmers can write:
- *
- *    env->FindClass("java/lang/String")
- *
- * in C++ rather than:
- *
- *    (*env)->FindClass(env, "java/lang/String")
- *
- * in C.
- */
-
-struct JNIEnv_ {
-    const struct JNINativeInterface_ *functions;
-#ifdef __cplusplus
-
-    jint GetVersion() {
-        return functions->GetVersion(this);
-    }
-    jclass DefineClass(const char *name, jobject loader, const jbyte *buf,
-		       jsize len) {
-        return functions->DefineClass(this, name, loader, buf, len);
-    }
-    jclass FindClass(const char *name) {
-        return functions->FindClass(this, name);
-    }
-    jmethodID FromReflectedMethod(jobject method) {
-        return functions->FromReflectedMethod(this,method);
-    }
-    jfieldID FromReflectedField(jobject field) {
-        return functions->FromReflectedField(this,field);
-    }
-
-    jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) {
-        return functions->ToReflectedMethod(this, cls, methodID, isStatic);
-    }
-
-    jclass GetSuperclass(jclass sub) {
-        return functions->GetSuperclass(this, sub);
-    }
-    jboolean IsAssignableFrom(jclass sub, jclass sup) {
-        return functions->IsAssignableFrom(this, sub, sup);
-    }
-
-    jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) {
-        return functions->ToReflectedField(this,cls,fieldID,isStatic);
-    }
-
-    jint Throw(jthrowable obj) {
-        return functions->Throw(this, obj);
-    }
-    jint ThrowNew(jclass clazz, const char *msg) {
-        return functions->ThrowNew(this, clazz, msg);
-    }
-    jthrowable ExceptionOccurred() {
-        return functions->ExceptionOccurred(this);
-    }
-    void ExceptionDescribe() {
-        functions->ExceptionDescribe(this);
-    }
-    void ExceptionClear() {
-        functions->ExceptionClear(this);
-    }
-    void FatalError(const char *msg) {
-        functions->FatalError(this, msg);
-    }
-
-    jint PushLocalFrame(jint capacity) {
-        return functions->PushLocalFrame(this,capacity);
-    }
-    jobject PopLocalFrame(jobject result) {
-        return functions->PopLocalFrame(this,result);
-    }
-
-    jobject NewGlobalRef(jobject lobj) {
-        return functions->NewGlobalRef(this,lobj);
-    }
-    void DeleteGlobalRef(jobject gref) {
-        functions->DeleteGlobalRef(this,gref);
-    }
-    void DeleteLocalRef(jobject obj) {
-        functions->DeleteLocalRef(this, obj);
-    }
-
-    jboolean IsSameObject(jobject obj1, jobject obj2) {
-        return functions->IsSameObject(this,obj1,obj2);
-    }
-
-    jobject NewLocalRef(jobject ref) {
-        return functions->NewLocalRef(this,ref);
-    }
-    jint EnsureLocalCapacity(jint capacity) {
-        return functions->EnsureLocalCapacity(this,capacity);
-    }
-
-    jobject AllocObject(jclass clazz) {
-        return functions->AllocObject(this,clazz);
-    }
-    jobject NewObject(jclass clazz, jmethodID methodID, ...) {
-        va_list args;
-	jobject result;
-	va_start(args, methodID);
-        result = functions->NewObjectV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jobject NewObjectV(jclass clazz, jmethodID methodID,
-		       va_list args) {
-        return functions->NewObjectV(this,clazz,methodID,args);
-    }
-    jobject NewObjectA(jclass clazz, jmethodID methodID,
-		       const jvalue *args) {
-        return functions->NewObjectA(this,clazz,methodID,args);
-    }
-
-    jclass GetObjectClass(jobject obj) {
-        return functions->GetObjectClass(this,obj);
-    }
-    jboolean IsInstanceOf(jobject obj, jclass clazz) {
-        return functions->IsInstanceOf(this,obj,clazz);
-    }
-
-    jmethodID GetMethodID(jclass clazz, const char *name,
-			  const char *sig) {
-        return functions->GetMethodID(this,clazz,name,sig);
-    }
-
-    jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jobject result;
-	va_start(args,methodID);
-	result = functions->CallObjectMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jobject CallObjectMethodV(jobject obj, jmethodID methodID,
-			va_list args) {
-        return functions->CallObjectMethodV(this,obj,methodID,args);
-    }
-    jobject CallObjectMethodA(jobject obj, jmethodID methodID,
-			const jvalue * args) {
-        return functions->CallObjectMethodA(this,obj,methodID,args);
-    }
-
-    jboolean CallBooleanMethod(jobject obj,
-			       jmethodID methodID, ...) {
-        va_list args;
-	jboolean result;
-	va_start(args,methodID);
-	result = functions->CallBooleanMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jboolean CallBooleanMethodV(jobject obj, jmethodID methodID,
-				va_list args) {
-        return functions->CallBooleanMethodV(this,obj,methodID,args);
-    }
-    jboolean CallBooleanMethodA(jobject obj, jmethodID methodID,
-				const jvalue * args) {
-        return functions->CallBooleanMethodA(this,obj,methodID, args);
-    }
-
-    jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jbyte result;
-	va_start(args,methodID);
-	result = functions->CallByteMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jbyte CallByteMethodV(jobject obj, jmethodID methodID,
-			  va_list args) {
-        return functions->CallByteMethodV(this,obj,methodID,args);
-    }
-    jbyte CallByteMethodA(jobject obj, jmethodID methodID,
-			  const jvalue * args) {
-        return functions->CallByteMethodA(this,obj,methodID,args);
-    }
-
-    jchar CallCharMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jchar result;
-	va_start(args,methodID);
-	result = functions->CallCharMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jchar CallCharMethodV(jobject obj, jmethodID methodID,
-			  va_list args) {
-        return functions->CallCharMethodV(this,obj,methodID,args);
-    }
-    jchar CallCharMethodA(jobject obj, jmethodID methodID,
-			  const jvalue * args) {
-        return functions->CallCharMethodA(this,obj,methodID,args);
-    }
-
-    jshort CallShortMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jshort result;
-	va_start(args,methodID);
-	result = functions->CallShortMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jshort CallShortMethodV(jobject obj, jmethodID methodID,
-			    va_list args) {
-        return functions->CallShortMethodV(this,obj,methodID,args);
-    }
-    jshort CallShortMethodA(jobject obj, jmethodID methodID,
-			    const jvalue * args) {
-        return functions->CallShortMethodA(this,obj,methodID,args);
-    }
-
-    jint CallIntMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jint result;
-	va_start(args,methodID);
-	result = functions->CallIntMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jint CallIntMethodV(jobject obj, jmethodID methodID,
-			va_list args) {
-        return functions->CallIntMethodV(this,obj,methodID,args);
-    }
-    jint CallIntMethodA(jobject obj, jmethodID methodID,
-			const jvalue * args) {
-        return functions->CallIntMethodA(this,obj,methodID,args);
-    }
-
-    jlong CallLongMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jlong result;
-	va_start(args,methodID);
-	result = functions->CallLongMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jlong CallLongMethodV(jobject obj, jmethodID methodID,
-			  va_list args) {
-        return functions->CallLongMethodV(this,obj,methodID,args);
-    }
-    jlong CallLongMethodA(jobject obj, jmethodID methodID,
-			  const jvalue * args) {
-        return functions->CallLongMethodA(this,obj,methodID,args);
-    }
-
-    jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jfloat result;
-	va_start(args,methodID);
-	result = functions->CallFloatMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jfloat CallFloatMethodV(jobject obj, jmethodID methodID,
-			    va_list args) {
-        return functions->CallFloatMethodV(this,obj,methodID,args);
-    }
-    jfloat CallFloatMethodA(jobject obj, jmethodID methodID,
-			    const jvalue * args) {
-        return functions->CallFloatMethodA(this,obj,methodID,args);
-    }
-
-    jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jdouble result;
-	va_start(args,methodID);
-	result = functions->CallDoubleMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jdouble CallDoubleMethodV(jobject obj, jmethodID methodID,
-			va_list args) {
-        return functions->CallDoubleMethodV(this,obj,methodID,args);
-    }
-    jdouble CallDoubleMethodA(jobject obj, jmethodID methodID,
-			const jvalue * args) {
-        return functions->CallDoubleMethodA(this,obj,methodID,args);
-    }
-
-    void CallVoidMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	va_start(args,methodID);
-	functions->CallVoidMethodV(this,obj,methodID,args);
-	va_end(args);
-    }
-    void CallVoidMethodV(jobject obj, jmethodID methodID,
-			 va_list args) {
-        functions->CallVoidMethodV(this,obj,methodID,args);
-    }
-    void CallVoidMethodA(jobject obj, jmethodID methodID,
-			 const jvalue * args) {
-        functions->CallVoidMethodA(this,obj,methodID,args);
-    }
-
-    jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz,
-				       jmethodID methodID, ...) {
-        va_list args;
-	jobject result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualObjectMethodV(this,obj,clazz,
-							methodID,args);
-	va_end(args);
-	return result;
-    }
-    jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz,
-					jmethodID methodID, va_list args) {
-        return functions->CallNonvirtualObjectMethodV(this,obj,clazz,
-						      methodID,args);
-    }
-    jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz,
-					jmethodID methodID, const jvalue * args) {
-        return functions->CallNonvirtualObjectMethodA(this,obj,clazz,
-						      methodID,args);
-    }
-
-    jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz,
-					 jmethodID methodID, ...) {
-        va_list args;
-	jboolean result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
-							 methodID,args);
-	va_end(args);
-	return result;
-    }
-    jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz,
-					  jmethodID methodID, va_list args) {
-        return functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
-						       methodID,args);
-    }
-    jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz,
-					  jmethodID methodID, const jvalue * args) {
-        return functions->CallNonvirtualBooleanMethodA(this,obj,clazz,
-						       methodID, args);
-    }
-
-    jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz,
-				   jmethodID methodID, ...) {
-        va_list args;
-	jbyte result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualByteMethodV(this,obj,clazz,
-						      methodID,args);
-	va_end(args);
-	return result;
-    }
-    jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz,
-				    jmethodID methodID, va_list args) {
-        return functions->CallNonvirtualByteMethodV(this,obj,clazz,
-						    methodID,args);
-    }
-    jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz,
-				    jmethodID methodID, const jvalue * args) {
-        return functions->CallNonvirtualByteMethodA(this,obj,clazz,
-						    methodID,args);
-    }
-
-    jchar CallNonvirtualCharMethod(jobject obj, jclass clazz,
-				   jmethodID methodID, ...) {
-        va_list args;
-	jchar result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualCharMethodV(this,obj,clazz,
-						      methodID,args);
-	va_end(args);
-	return result;
-    }
-    jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz,
-				    jmethodID methodID, va_list args) {
-        return functions->CallNonvirtualCharMethodV(this,obj,clazz,
-						    methodID,args);
-    }
-    jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz,
-				    jmethodID methodID, const jvalue * args) {
-        return functions->CallNonvirtualCharMethodA(this,obj,clazz,
-						    methodID,args);
-    }
-
-    jshort CallNonvirtualShortMethod(jobject obj, jclass clazz,
-				     jmethodID methodID, ...) {
-        va_list args;
-	jshort result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualShortMethodV(this,obj,clazz,
-						       methodID,args);
-	va_end(args);
-	return result;
-    }
-    jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz,
-				      jmethodID methodID, va_list args) {
-        return functions->CallNonvirtualShortMethodV(this,obj,clazz,
-						     methodID,args);
-    }
-    jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz,
-				      jmethodID methodID, const jvalue * args) {
-        return functions->CallNonvirtualShortMethodA(this,obj,clazz,
-						     methodID,args);
-    }
-
-    jint CallNonvirtualIntMethod(jobject obj, jclass clazz,
-				 jmethodID methodID, ...) {
-        va_list args;
-	jint result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualIntMethodV(this,obj,clazz,
-						     methodID,args);
-	va_end(args);
-	return result;
-    }
-    jint CallNonvirtualIntMethodV(jobject obj, jclass clazz,
-				  jmethodID methodID, va_list args) {
-        return functions->CallNonvirtualIntMethodV(this,obj,clazz,
-						   methodID,args);
-    }
-    jint CallNonvirtualIntMethodA(jobject obj, jclass clazz,
-				  jmethodID methodID, const jvalue * args) {
-        return functions->CallNonvirtualIntMethodA(this,obj,clazz,
-						   methodID,args);
-    }
-
-    jlong CallNonvirtualLongMethod(jobject obj, jclass clazz,
-				   jmethodID methodID, ...) {
-        va_list args;
-	jlong result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualLongMethodV(this,obj,clazz,
-						      methodID,args);
-	va_end(args);
-	return result;
-    }
-    jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz,
-				    jmethodID methodID, va_list args) {
-        return functions->CallNonvirtualLongMethodV(this,obj,clazz,
-						    methodID,args);
-    }
-    jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz,
-				    jmethodID methodID, const jvalue * args) {
-        return functions->CallNonvirtualLongMethodA(this,obj,clazz,
-						    methodID,args);
-    }
-
-    jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz,
-				     jmethodID methodID, ...) {
-        va_list args;
-	jfloat result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualFloatMethodV(this,obj,clazz,
-						       methodID,args);
-	va_end(args);
-	return result;
-    }
-    jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz,
-				      jmethodID methodID,
-				      va_list args) {
-        return functions->CallNonvirtualFloatMethodV(this,obj,clazz,
-						     methodID,args);
-    }
-    jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz,
-				      jmethodID methodID,
-				      const jvalue * args) {
-        return functions->CallNonvirtualFloatMethodA(this,obj,clazz,
-						     methodID,args);
-    }
-
-    jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz,
-				       jmethodID methodID, ...) {
-        va_list args;
-	jdouble result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
-							methodID,args);
-	va_end(args);
-	return result;
-    }
-    jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz,
-					jmethodID methodID,
-					va_list args) {
-        return functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
-						      methodID,args);
-    }
-    jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz,
-					jmethodID methodID,
-					const jvalue * args) {
-        return functions->CallNonvirtualDoubleMethodA(this,obj,clazz,
-						      methodID,args);
-    }
-
-    void CallNonvirtualVoidMethod(jobject obj, jclass clazz,
-				  jmethodID methodID, ...) {
-        va_list args;
-	va_start(args,methodID);
-	functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
-	va_end(args);
-    }
-    void CallNonvirtualVoidMethodV(jobject obj, jclass clazz,
-				   jmethodID methodID,
-				   va_list args) {
-        functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
-    }
-    void CallNonvirtualVoidMethodA(jobject obj, jclass clazz,
-				   jmethodID methodID,
-				   const jvalue * args) {
-        functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args);
-    }
-
-    jfieldID GetFieldID(jclass clazz, const char *name,
-			const char *sig) {
-        return functions->GetFieldID(this,clazz,name,sig);
-    }
-
-    jobject GetObjectField(jobject obj, jfieldID fieldID) {
-        return functions->GetObjectField(this,obj,fieldID);
-    }
-    jboolean GetBooleanField(jobject obj, jfieldID fieldID) {
-        return functions->GetBooleanField(this,obj,fieldID);
-    }
-    jbyte GetByteField(jobject obj, jfieldID fieldID) {
-        return functions->GetByteField(this,obj,fieldID);
-    }
-    jchar GetCharField(jobject obj, jfieldID fieldID) {
-        return functions->GetCharField(this,obj,fieldID);
-    }
-    jshort GetShortField(jobject obj, jfieldID fieldID) {
-        return functions->GetShortField(this,obj,fieldID);
-    }
-    jint GetIntField(jobject obj, jfieldID fieldID) {
-        return functions->GetIntField(this,obj,fieldID);
-    }
-    jlong GetLongField(jobject obj, jfieldID fieldID) {
-        return functions->GetLongField(this,obj,fieldID);
-    }
-    jfloat GetFloatField(jobject obj, jfieldID fieldID) {
-        return functions->GetFloatField(this,obj,fieldID);
-    }
-    jdouble GetDoubleField(jobject obj, jfieldID fieldID) {
-        return functions->GetDoubleField(this,obj,fieldID);
-    }
-
-    void SetObjectField(jobject obj, jfieldID fieldID, jobject val) {
-        functions->SetObjectField(this,obj,fieldID,val);
-    }
-    void SetBooleanField(jobject obj, jfieldID fieldID,
-			 jboolean val) {
-        functions->SetBooleanField(this,obj,fieldID,val);
-    }
-    void SetByteField(jobject obj, jfieldID fieldID,
-		      jbyte val) {
-        functions->SetByteField(this,obj,fieldID,val);
-    }
-    void SetCharField(jobject obj, jfieldID fieldID,
-		      jchar val) {
-        functions->SetCharField(this,obj,fieldID,val);
-    }
-    void SetShortField(jobject obj, jfieldID fieldID,
-		       jshort val) {
-        functions->SetShortField(this,obj,fieldID,val);
-    }
-    void SetIntField(jobject obj, jfieldID fieldID,
-		     jint val) {
-        functions->SetIntField(this,obj,fieldID,val);
-    }
-    void SetLongField(jobject obj, jfieldID fieldID,
-		      jlong val) {
-        functions->SetLongField(this,obj,fieldID,val);
-    }
-    void SetFloatField(jobject obj, jfieldID fieldID,
-		       jfloat val) {
-        functions->SetFloatField(this,obj,fieldID,val);
-    }
-    void SetDoubleField(jobject obj, jfieldID fieldID,
-			jdouble val) {
-        functions->SetDoubleField(this,obj,fieldID,val);
-    }
-
-    jmethodID GetStaticMethodID(jclass clazz, const char *name,
-				const char *sig) {
-        return functions->GetStaticMethodID(this,clazz,name,sig);
-    }
-
-    jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID,
-			     ...) {
-        va_list args;
-	jobject result;
-	va_start(args,methodID);
-	result = functions->CallStaticObjectMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID,
-			      va_list args) {
-        return functions->CallStaticObjectMethodV(this,clazz,methodID,args);
-    }
-    jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID,
-			      const jvalue *args) {
-        return functions->CallStaticObjectMethodA(this,clazz,methodID,args);
-    }
-
-    jboolean CallStaticBooleanMethod(jclass clazz,
-				     jmethodID methodID, ...) {
-        va_list args;
-	jboolean result;
-	va_start(args,methodID);
-	result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jboolean CallStaticBooleanMethodV(jclass clazz,
-				      jmethodID methodID, va_list args) {
-        return functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
-    }
-    jboolean CallStaticBooleanMethodA(jclass clazz,
-				      jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticBooleanMethodA(this,clazz,methodID,args);
-    }
-
-    jbyte CallStaticByteMethod(jclass clazz,
-			       jmethodID methodID, ...) {
-        va_list args;
-	jbyte result;
-	va_start(args,methodID);
-	result = functions->CallStaticByteMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jbyte CallStaticByteMethodV(jclass clazz,
-				jmethodID methodID, va_list args) {
-        return functions->CallStaticByteMethodV(this,clazz,methodID,args);
-    }
-    jbyte CallStaticByteMethodA(jclass clazz,
-				jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticByteMethodA(this,clazz,methodID,args);
-    }
-
-    jchar CallStaticCharMethod(jclass clazz,
-			       jmethodID methodID, ...) {
-        va_list args;
-	jchar result;
-	va_start(args,methodID);
-	result = functions->CallStaticCharMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jchar CallStaticCharMethodV(jclass clazz,
-				jmethodID methodID, va_list args) {
-        return functions->CallStaticCharMethodV(this,clazz,methodID,args);
-    }
-    jchar CallStaticCharMethodA(jclass clazz,
-				jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticCharMethodA(this,clazz,methodID,args);
-    }
-
-    jshort CallStaticShortMethod(jclass clazz,
-				 jmethodID methodID, ...) {
-        va_list args;
-	jshort result;
-	va_start(args,methodID);
-	result = functions->CallStaticShortMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jshort CallStaticShortMethodV(jclass clazz,
-				  jmethodID methodID, va_list args) {
-        return functions->CallStaticShortMethodV(this,clazz,methodID,args);
-    }
-    jshort CallStaticShortMethodA(jclass clazz,
-				  jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticShortMethodA(this,clazz,methodID,args);
-    }
-
-    jint CallStaticIntMethod(jclass clazz,
-			     jmethodID methodID, ...) {
-        va_list args;
-	jint result;
-	va_start(args,methodID);
-	result = functions->CallStaticIntMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jint CallStaticIntMethodV(jclass clazz,
-			      jmethodID methodID, va_list args) {
-        return functions->CallStaticIntMethodV(this,clazz,methodID,args);
-    }
-    jint CallStaticIntMethodA(jclass clazz,
-			      jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticIntMethodA(this,clazz,methodID,args);
-    }
-
-    jlong CallStaticLongMethod(jclass clazz,
-			       jmethodID methodID, ...) {
-        va_list args;
-	jlong result;
-	va_start(args,methodID);
-	result = functions->CallStaticLongMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jlong CallStaticLongMethodV(jclass clazz,
-				jmethodID methodID, va_list args) {
-        return functions->CallStaticLongMethodV(this,clazz,methodID,args);
-    }
-    jlong CallStaticLongMethodA(jclass clazz,
-				jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticLongMethodA(this,clazz,methodID,args);
-    }
-
-    jfloat CallStaticFloatMethod(jclass clazz,
-				 jmethodID methodID, ...) {
-        va_list args;
-	jfloat result;
-	va_start(args,methodID);
-	result = functions->CallStaticFloatMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jfloat CallStaticFloatMethodV(jclass clazz,
-				  jmethodID methodID, va_list args) {
-        return functions->CallStaticFloatMethodV(this,clazz,methodID,args);
-    }
-    jfloat CallStaticFloatMethodA(jclass clazz,
-				  jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticFloatMethodA(this,clazz,methodID,args);
-    }
-
-    jdouble CallStaticDoubleMethod(jclass clazz,
-				   jmethodID methodID, ...) {
-        va_list args;
-	jdouble result;
-	va_start(args,methodID);
-	result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jdouble CallStaticDoubleMethodV(jclass clazz,
-				    jmethodID methodID, va_list args) {
-        return functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
-    }
-    jdouble CallStaticDoubleMethodA(jclass clazz,
-				    jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticDoubleMethodA(this,clazz,methodID,args);
-    }
-
-    void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) {
-        va_list args;
-	va_start(args,methodID);
-	functions->CallStaticVoidMethodV(this,cls,methodID,args);
-	va_end(args);
-    }
-    void CallStaticVoidMethodV(jclass cls, jmethodID methodID,
-			       va_list args) {
-        functions->CallStaticVoidMethodV(this,cls,methodID,args);
-    }
-    void CallStaticVoidMethodA(jclass cls, jmethodID methodID,
-			       const jvalue * args) {
-        functions->CallStaticVoidMethodA(this,cls,methodID,args);
-    }
-
-    jfieldID GetStaticFieldID(jclass clazz, const char *name,
-			      const char *sig) {
-        return functions->GetStaticFieldID(this,clazz,name,sig);
-    }
-    jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticObjectField(this,clazz,fieldID);
-    }
-    jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticBooleanField(this,clazz,fieldID);
-    }
-    jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticByteField(this,clazz,fieldID);
-    }
-    jchar GetStaticCharField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticCharField(this,clazz,fieldID);
-    }
-    jshort GetStaticShortField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticShortField(this,clazz,fieldID);
-    }
-    jint GetStaticIntField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticIntField(this,clazz,fieldID);
-    }
-    jlong GetStaticLongField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticLongField(this,clazz,fieldID);
-    }
-    jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticFloatField(this,clazz,fieldID);
-    }
-    jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticDoubleField(this,clazz,fieldID);
-    }
-
-    void SetStaticObjectField(jclass clazz, jfieldID fieldID,
-			jobject value) {
-      functions->SetStaticObjectField(this,clazz,fieldID,value);
-    }
-    void SetStaticBooleanField(jclass clazz, jfieldID fieldID,
-			jboolean value) {
-      functions->SetStaticBooleanField(this,clazz,fieldID,value);
-    }
-    void SetStaticByteField(jclass clazz, jfieldID fieldID,
-			jbyte value) {
-      functions->SetStaticByteField(this,clazz,fieldID,value);
-    }
-    void SetStaticCharField(jclass clazz, jfieldID fieldID,
-			jchar value) {
-      functions->SetStaticCharField(this,clazz,fieldID,value);
-    }
-    void SetStaticShortField(jclass clazz, jfieldID fieldID,
-			jshort value) {
-      functions->SetStaticShortField(this,clazz,fieldID,value);
-    }
-    void SetStaticIntField(jclass clazz, jfieldID fieldID,
-			jint value) {
-      functions->SetStaticIntField(this,clazz,fieldID,value);
-    }
-    void SetStaticLongField(jclass clazz, jfieldID fieldID,
-			jlong value) {
-      functions->SetStaticLongField(this,clazz,fieldID,value);
-    }
-    void SetStaticFloatField(jclass clazz, jfieldID fieldID,
-			jfloat value) {
-      functions->SetStaticFloatField(this,clazz,fieldID,value);
-    }
-    void SetStaticDoubleField(jclass clazz, jfieldID fieldID,
-			jdouble value) {
-      functions->SetStaticDoubleField(this,clazz,fieldID,value);
-    }
-
-    jstring NewString(const jchar *unicode, jsize len) {
-        return functions->NewString(this,unicode,len);
-    }
-    jsize GetStringLength(jstring str) {
-        return functions->GetStringLength(this,str);
-    }
-    const jchar *GetStringChars(jstring str, jboolean *isCopy) {
-        return functions->GetStringChars(this,str,isCopy);
-    }
-    void ReleaseStringChars(jstring str, const jchar *chars) {
-        functions->ReleaseStringChars(this,str,chars);
-    }
-
-    jstring NewStringUTF(const char *utf) {
-        return functions->NewStringUTF(this,utf);
-    }
-    jsize GetStringUTFLength(jstring str) {
-        return functions->GetStringUTFLength(this,str);
-    }
-    const char* GetStringUTFChars(jstring str, jboolean *isCopy) {
-        return functions->GetStringUTFChars(this,str,isCopy);
-    }
-    void ReleaseStringUTFChars(jstring str, const char* chars) {
-        functions->ReleaseStringUTFChars(this,str,chars);
-    }
-
-    jsize GetArrayLength(jarray array) {
-        return functions->GetArrayLength(this,array);
-    }
-
-    jobjectArray NewObjectArray(jsize len, jclass clazz,
-				jobject init) {
-        return functions->NewObjectArray(this,len,clazz,init);
-    }
-    jobject GetObjectArrayElement(jobjectArray array, jsize index) {
-        return functions->GetObjectArrayElement(this,array,index);
-    }
-    void SetObjectArrayElement(jobjectArray array, jsize index,
-			       jobject val) {
-        functions->SetObjectArrayElement(this,array,index,val);
-    }
-
-    jbooleanArray NewBooleanArray(jsize len) {
-        return functions->NewBooleanArray(this,len);
-    }
-    jbyteArray NewByteArray(jsize len) {
-        return functions->NewByteArray(this,len);
-    }
-    jcharArray NewCharArray(jsize len) {
-        return functions->NewCharArray(this,len);
-    }
-    jshortArray NewShortArray(jsize len) {
-        return functions->NewShortArray(this,len);
-    }
-    jintArray NewIntArray(jsize len) {
-        return functions->NewIntArray(this,len);
-    }
-    jlongArray NewLongArray(jsize len) {
-        return functions->NewLongArray(this,len);
-    }
-    jfloatArray NewFloatArray(jsize len) {
-        return functions->NewFloatArray(this,len);
-    }
-    jdoubleArray NewDoubleArray(jsize len) {
-        return functions->NewDoubleArray(this,len);
-    }
-
-    jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) {
-        return functions->GetBooleanArrayElements(this,array,isCopy);
-    }
-    jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) {
-        return functions->GetByteArrayElements(this,array,isCopy);
-    }
-    jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) {
-        return functions->GetCharArrayElements(this,array,isCopy);
-    }
-    jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) {
-        return functions->GetShortArrayElements(this,array,isCopy);
-    }
-    jint * GetIntArrayElements(jintArray array, jboolean *isCopy) {
-        return functions->GetIntArrayElements(this,array,isCopy);
-    }
-    jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) {
-        return functions->GetLongArrayElements(this,array,isCopy);
-    }
-    jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) {
-        return functions->GetFloatArrayElements(this,array,isCopy);
-    }
-    jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) {
-        return functions->GetDoubleArrayElements(this,array,isCopy);
-    }
-
-    void ReleaseBooleanArrayElements(jbooleanArray array,
-				     jboolean *elems,
-				     jint mode) {
-        functions->ReleaseBooleanArrayElements(this,array,elems,mode);
-    }
-    void ReleaseByteArrayElements(jbyteArray array,
-				  jbyte *elems,
-				  jint mode) {
-        functions->ReleaseByteArrayElements(this,array,elems,mode);
-    }
-    void ReleaseCharArrayElements(jcharArray array,
-				  jchar *elems,
-				  jint mode) {
-        functions->ReleaseCharArrayElements(this,array,elems,mode);
-    }
-    void ReleaseShortArrayElements(jshortArray array,
-				   jshort *elems,
-				   jint mode) {
-        functions->ReleaseShortArrayElements(this,array,elems,mode);
-    }
-    void ReleaseIntArrayElements(jintArray array,
-				 jint *elems,
-				 jint mode) {
-        functions->ReleaseIntArrayElements(this,array,elems,mode);
-    }
-    void ReleaseLongArrayElements(jlongArray array,
-				  jlong *elems,
-				  jint mode) {
-        functions->ReleaseLongArrayElements(this,array,elems,mode);
-    }
-    void ReleaseFloatArrayElements(jfloatArray array,
-				   jfloat *elems,
-				   jint mode) {
-        functions->ReleaseFloatArrayElements(this,array,elems,mode);
-    }
-    void ReleaseDoubleArrayElements(jdoubleArray array,
-				    jdouble *elems,
-				    jint mode) {
-        functions->ReleaseDoubleArrayElements(this,array,elems,mode);
-    }
-
-    void GetBooleanArrayRegion(jbooleanArray array,
-			       jsize start, jsize len, jboolean *buf) {
-        functions->GetBooleanArrayRegion(this,array,start,len,buf);
-    }
-    void GetByteArrayRegion(jbyteArray array,
-			    jsize start, jsize len, jbyte *buf) {
-        functions->GetByteArrayRegion(this,array,start,len,buf);
-    }
-    void GetCharArrayRegion(jcharArray array,
-			    jsize start, jsize len, jchar *buf) {
-        functions->GetCharArrayRegion(this,array,start,len,buf);
-    }
-    void GetShortArrayRegion(jshortArray array,
-			     jsize start, jsize len, jshort *buf) {
-        functions->GetShortArrayRegion(this,array,start,len,buf);
-    }
-    void GetIntArrayRegion(jintArray array,
-			   jsize start, jsize len, jint *buf) {
-        functions->GetIntArrayRegion(this,array,start,len,buf);
-    }
-    void GetLongArrayRegion(jlongArray array,
-			    jsize start, jsize len, jlong *buf) {
-        functions->GetLongArrayRegion(this,array,start,len,buf);
-    }
-    void GetFloatArrayRegion(jfloatArray array,
-			     jsize start, jsize len, jfloat *buf) {
-        functions->GetFloatArrayRegion(this,array,start,len,buf);
-    }
-    void GetDoubleArrayRegion(jdoubleArray array,
-			      jsize start, jsize len, jdouble *buf) {
-        functions->GetDoubleArrayRegion(this,array,start,len,buf);
-    }
-
-    void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
-			       const jboolean *buf) {
-        functions->SetBooleanArrayRegion(this,array,start,len,buf);
-    }
-    void SetByteArrayRegion(jbyteArray array, jsize start, jsize len,
-			    const jbyte *buf) {
-        functions->SetByteArrayRegion(this,array,start,len,buf);
-    }
-    void SetCharArrayRegion(jcharArray array, jsize start, jsize len,
-			    const jchar *buf) {
-        functions->SetCharArrayRegion(this,array,start,len,buf);
-    }
-    void SetShortArrayRegion(jshortArray array, jsize start, jsize len,
-			     const jshort *buf) {
-        functions->SetShortArrayRegion(this,array,start,len,buf);
-    }
-    void SetIntArrayRegion(jintArray array, jsize start, jsize len,
-			   const jint *buf) {
-        functions->SetIntArrayRegion(this,array,start,len,buf);
-    }
-    void SetLongArrayRegion(jlongArray array, jsize start, jsize len,
-			    const jlong *buf) {
-        functions->SetLongArrayRegion(this,array,start,len,buf);
-    }
-    void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
-			     const jfloat *buf) {
-        functions->SetFloatArrayRegion(this,array,start,len,buf);
-    }
-    void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
-			      const jdouble *buf) {
-        functions->SetDoubleArrayRegion(this,array,start,len,buf);
-    }
-
-    jint RegisterNatives(jclass clazz, const JNINativeMethod *methods,
-			 jint nMethods) {
-        return functions->RegisterNatives(this,clazz,methods,nMethods);
-    }
-    jint UnregisterNatives(jclass clazz) {
-        return functions->UnregisterNatives(this,clazz);
-    }
-
-    jint MonitorEnter(jobject obj) {
-        return functions->MonitorEnter(this,obj);
-    }
-    jint MonitorExit(jobject obj) {
-        return functions->MonitorExit(this,obj);
-    }
-
-    jint GetJavaVM(JavaVM **vm) {
-        return functions->GetJavaVM(this,vm);
-    }
-
-    void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) {
-        functions->GetStringRegion(this,str,start,len,buf);
-    }
-    void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) {
-        functions->GetStringUTFRegion(this,str,start,len,buf);
-    }
-
-    void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) {
-        return functions->GetPrimitiveArrayCritical(this,array,isCopy);
-    }
-    void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) {
-        functions->ReleasePrimitiveArrayCritical(this,array,carray,mode);
-    }
-
-    const jchar * GetStringCritical(jstring string, jboolean *isCopy) {
-        return functions->GetStringCritical(this,string,isCopy);
-    }
-    void ReleaseStringCritical(jstring string, const jchar *cstring) {
-        functions->ReleaseStringCritical(this,string,cstring);
-    }
-
-    jweak NewWeakGlobalRef(jobject obj) {
-        return functions->NewWeakGlobalRef(this,obj);
-    }
-    void DeleteWeakGlobalRef(jweak ref) {
-        functions->DeleteWeakGlobalRef(this,ref);
-    }
-
-    jboolean ExceptionCheck() {
-	return functions->ExceptionCheck(this);
-    }
-
-    jobject NewDirectByteBuffer(void* address, jlong capacity) {
-        return functions->NewDirectByteBuffer(this, address, capacity);
-    }
-    void* GetDirectBufferAddress(jobject buf) {
-        return functions->GetDirectBufferAddress(this, buf);
-    }
-    jlong GetDirectBufferCapacity(jobject buf) {
-        return functions->GetDirectBufferCapacity(this, buf);
-    }
-    jobjectRefType GetObjectRefType(jobject obj) {
-        return functions->GetObjectRefType(this, obj);
-    }
-
-#endif /* __cplusplus */
-};
-
-typedef struct JavaVMOption {
-    char *optionString;
-    void *extraInfo;
-} JavaVMOption;
-
-typedef struct JavaVMInitArgs {
-    jint version;
-
-    jint nOptions;
-    JavaVMOption *options;
-    jboolean ignoreUnrecognized;
-} JavaVMInitArgs;
-
-typedef struct JavaVMAttachArgs {
-    jint version;
-
-    char *name;
-    jobject group;
-} JavaVMAttachArgs;
-
-/* These will be VM-specific. */
-
-#define JDK1_2
-#define JDK1_4
-
-/* End VM-specific. */
-
-struct JNIInvokeInterface_ {
-    void *reserved0;
-    void *reserved1;
-    void *reserved2;
-
-    jint (JNICALL *DestroyJavaVM)(JavaVM *vm);
-
-    jint (JNICALL *AttachCurrentThread)(JavaVM *vm, void **penv, void *args);
-
-    jint (JNICALL *DetachCurrentThread)(JavaVM *vm);
-
-    jint (JNICALL *GetEnv)(JavaVM *vm, void **penv, jint version);
-
-    jint (JNICALL *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args);
-};
-
-struct JavaVM_ {
-    const struct JNIInvokeInterface_ *functions;
-#ifdef __cplusplus
-
-    jint DestroyJavaVM() {
-        return functions->DestroyJavaVM(this);
-    }
-    jint AttachCurrentThread(void **penv, void *args) {
-        return functions->AttachCurrentThread(this, penv, args);
-    }
-    jint DetachCurrentThread() {
-        return functions->DetachCurrentThread(this);
-    }
-
-    jint GetEnv(void **penv, jint version) {
-        return functions->GetEnv(this, penv, version);
-    }
-    jint AttachCurrentThreadAsDaemon(void **penv, void *args) {
-        return functions->AttachCurrentThreadAsDaemon(this, penv, args);
-    }
-#endif
-};
-
-#ifdef _JNI_IMPLEMENTATION_
-#define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT
-#else
-#define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT
-#endif
-_JNI_IMPORT_OR_EXPORT_ jint JNICALL
-JNI_GetDefaultJavaVMInitArgs(void *args);
-
-_JNI_IMPORT_OR_EXPORT_ jint JNICALL
-JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args);
-
-_JNI_IMPORT_OR_EXPORT_ jint JNICALL
-JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
-
-/* Defined by native libraries. */
-JNIEXPORT jint JNICALL
-JNI_OnLoad(JavaVM *vm, void *reserved);
-
-JNIEXPORT void JNICALL
-JNI_OnUnload(JavaVM *vm, void *reserved);
-
-#define JNI_VERSION_1_1 0x00010001
-#define JNI_VERSION_1_2 0x00010002
-#define JNI_VERSION_1_4 0x00010004
-#define JNI_VERSION_1_6 0x00010006
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* !_JAVASOFT_JNI_H_ */
-
-
-
diff --git a/libs/ngs-jni/jni_ErrorMsg.c b/libs/ngs-jni/jni_ErrorMsg.c
deleted file mode 100644
index 385d4a7..0000000
--- a/libs/ngs-jni/jni_ErrorMsg.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "jni_ErrorMsg.h"
-
-/* prevent generation of static block
-   since this file doesn't participate in stack
- */
-#define SRC_LOC_DEFINED 1
-
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <klib/printf.h>
-
-#include <string.h>
-#include <stdio.h>
-#include <stdarg.h>
-
-
-/*--------------------------------------------------------------------------
- * ErrorMsg
- */
-
-/* VThrow
- */
-static
-void ErrorVThrow ( JNIEnv * jenv, jclass jexcept_cls,
-    ctx_t ctx, uint32_t lineno, const char * fmt, va_list args )
-{
-    const char * msg;
-
-    /* if the error was from C code, get message */
-    if ( FAILED () )
-        msg = WHAT ();
-    else
-    {
-        /* otherwise, use provided message */
-        rc_t rc;
-        size_t msg_size = 0;
-        char msg_buffer [ 4096 ];
-
-#if _DEBUGGING
-        size_t i;
-        const char * fname = ctx -> loc -> func;
-        assert ( fname != NULL );
-        if ( memcmp ( fname, "Java_", sizeof "Java_" - 1 ) == 0 )
-            fname += sizeof "Java_" - 1;
-        rc = string_printf ( msg_buffer, sizeof msg_buffer, & msg_size, "%s:%u ", fname, lineno );
-        for ( i = 0; i < msg_size; ++ i )
-        {
-            if ( msg_buffer [ i ] == '_' )
-                msg_buffer [ i ] = '.';
-        }
-#endif
-
-        rc = string_vprintf ( & msg_buffer [ msg_size ], sizeof msg_buffer - msg_size, NULL, fmt, args );
-        if ( rc != 0 )
-            string_printf ( & msg_buffer [ msg_size ], sizeof msg_buffer - msg_size, NULL, "** BAD MESSAGE STRING **" );
-
-        msg = msg_buffer;
-    }
-
-    /* create error object, put JVM thread into Exception state */
-    ( ( * jenv ) -> ThrowNew ) ( jenv, jexcept_cls, msg );
-
-    /* if error was from C code, pull out stack trace */
-    if ( FAILED () )
-    {
-        jthrowable x = ( * jenv ) -> ExceptionOccurred ( jenv );
-        if ( x != NULL )
-        {
-            /* get the stack depth */
-            /* allocate array of StackTraceElement */
-            /* access stack trace from C */
-            /* walk stack trace, filling in array */
-            /* set StackTraceElement on "x" */
-        }
-
-        /* don't leave exception on C thread state */
-        CLEAR ();
-    }
-}
-
-
-/* Throw
- *  throw a Java ngs.ErrorMsg object taken from the C context block
- *  may temporarily take information from point of throw
- */
-void ErrorMsgThrow ( JNIEnv * jenv, ctx_t ctx, uint32_t lineno, const char *fmt, ... )
-{
-    va_list args;
-
-    /* locate ErrorMsg class */
-    jclass jexcept_cls = ( ( * jenv ) -> FindClass ) ( jenv, "ngs/ErrorMsg" );
-    if ( jexcept_cls == NULL )
-    {
-        /* turn it into a RuntimeException */
-        jexcept_cls = ( ( * jenv ) -> FindClass ) ( jenv, "java/lang/RuntimeException" );
-    }
-
-    /* package up arguments */
-    va_start ( args, fmt );
-
-    /* throw the exception */
-    ErrorVThrow ( jenv, jexcept_cls, ctx, lineno, fmt, args );
-
-    /* probably never get here */
-    va_end ( args );
-}
-
-
-void RuntimeExceptionThrow ( JNIEnv * jenv, ctx_t ctx, uint32_t lineno, const char *fmt, ... )
-{
-    va_list args;
-
-    /* locate RuntimeException class */
-    jclass jexcept_cls = ( ( * jenv ) -> FindClass ) ( jenv, "java/lang/RuntimeException" );
-
-    /* package up arguments */
-    va_start ( args, fmt );
-
-    /* throw the exception */
-    ErrorVThrow ( jenv, jexcept_cls, ctx, lineno, fmt, args );
-
-    /* probably never get here */
-    va_end ( args );
-}
-
-
-/* AssertU32
- * AssertU64
- */
-void ErrorMsgAssertU32 ( JNIEnv * jenv, ctx_t ctx, uint32_t lineno, jint i )
-{
-    if ( i < 0 )
-    {
-        USER_ERROR ( xcIntegerOutOfBounds, "expected unsigned integer but found %d", i );
-        ErrorMsgThrow ( jenv, ctx, lineno, "integer sign violation" );
-    }
-}
-
-void ErrorMsgAssertU64 ( JNIEnv * jenv, ctx_t ctx, uint32_t lineno, jlong i )
-{
-    if ( i < 0 )
-    {
-        USER_ERROR ( xcIntegerOutOfBounds, "expected unsigned integer but found %ld", i );
-        ErrorMsgThrow ( jenv, ctx, lineno, "integer sign violation" );
-    }
-}
diff --git a/libs/ngs-jni/jni_ErrorMsg.h b/libs/ngs-jni/jni_ErrorMsg.h
deleted file mode 100644
index 2630ca9..0000000
--- a/libs/ngs-jni/jni_ErrorMsg.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_jni_ErrorMsg_
-#define _h_jni_ErrorMsg_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#include "jni.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * ErrorMsg
- */
-
-
-/* Throw
- *  throw a Java ngs.ErrorMsg object taken from the C context block
- */
-void ErrorMsgThrow ( JNIEnv * jenv, ctx_t ctx, uint32_t lineno, const char *msg, ... );
-
-
-/* AssertUnsignedInt
- */
-void ErrorMsgAssertU32 ( JNIEnv * jenv, ctx_t ctx, uint32_t lineno, jint i );
-#define ErrorMsgAssertUnsignedInt( jenv, ctx, i ) \
-    if ( ( i ) < 0 )                               \
-        ErrorMsgAssertU32 ( jenv, ctx, __LINE__, i )
-
-/* AssertUnsignedLong
- */
-void ErrorMsgAssertU64 ( JNIEnv * jenv, ctx_t ctx, uint32_t lineno, jlong i );
-#define ErrorMsgAssertUnsignedLong( jenv, ctx, i ) \
-    if ( ( i ) < 0 )                               \
-        ErrorMsgAssertU64 ( jenv, ctx, __LINE__, i )
-
-
-/*--------------------------------------------------------------------------
- * RuntimeException
- */
-
-
-/* Throw
- *  throw a Java RuntimeException object taken from the C context block
- */
-void RuntimeExceptionThrow ( JNIEnv * jenv, ctx_t ctx, uint32_t lineno, const char *msg, ... );
-
-
-/* UNIMPLEMENTED
- *  while the stubs are being brought up
- */
-#define JNI_UNIMPLEMENTED( jenv, ctx )                                  \
-    RuntimeExceptionThrow ( jenv, ctx, __LINE__, "UNIMPLEMENTED" )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_jni_ErrorMsg_ */
diff --git a/libs/ngs-jni/jni_Manager.c b/libs/ngs-jni/jni_Manager.c
deleted file mode 100644
index 55047e6..0000000
--- a/libs/ngs-jni/jni_Manager.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "jni_Manager.h"
-#include "jni_ErrorMsg.h"
-#include "jni_String.h"
-
-#include <kdb/manager.h> /* KDBManager */
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <kfc/rc.h>
-
-#include <kfc/rsrc-global.h>
-
-#include <kns/manager.h>
-#include <klib/ncbi-vdb-version.h> /* GetPackageVersion */
-
-#include <vfs/manager.h> /* VFSManager */
-#include <vfs/path.h> /* VPath */
-
-#include "NGS_ReadCollection.h"
-#include "NGS_ReferenceSequence.h"
-#include "../klib/release-vers.h"
-
-#include <assert.h>
-
-static bool have_user_version_string;
-
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    Initialize
- * Signature: ()Ljava/lang/String;
- */
-JNIEXPORT jstring JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_Initialize
-    ( JNIEnv * jenv, jclass jcls )
-{
-    DECLARE_FUNC_LOC ( rcSRA, rcMgr, rcConstructing );
-
-    KCtx local_ctx, * ctx = & local_ctx;
-    TRY ( KRsrcGlobalInit ( & local_ctx, & s_func_loc, true ) )
-    {
-        return NULL;
-    }
-
-    return JStringMake ( ctx, jenv, "KRsrcGlobalInit failed with rc = %R", local_ctx . rc );
-}
-
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    Shutdown
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_Shutdown
-    ( JNIEnv * jenv, jclass jcls )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcMgr, rcDestroying );
-    KRsrcGlobalWhack ( ctx );
-}
-
-static
-void set_app_version_string ( const char * app_version )
-{
-    // get a KNSManager
-    KNSManager * kns;
-    rc_t rc = KNSManagerMake ( & kns );
-    if ( rc == 0 )
-    {
-        have_user_version_string = true;
-        KNSManagerSetUserAgent ( kns, "ncbi-ngs.%V %s", RELEASE_VERS, app_version );
-        KNSManagerRelease ( kns );
-    }
-}
-
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    SetAppVersionString
- * Signature: (Ljava/lang/String;)V
- */
-JNIEXPORT void JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_SetAppVersionString
-    ( JNIEnv * jenv, jclass jcls, jstring japp_version )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcMgr, rcUpdating );
-
-    const char * app_version = JStringData ( japp_version, ctx, jenv );
-
-    set_app_version_string ( app_version );
-}
-
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    OpenReadCollection
- * Signature: (Ljava/lang/String;)J
- */
-JNIEXPORT jlong JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_OpenReadCollection
-    ( JNIEnv * jenv, jclass jcls, jstring jspec )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcMgr, rcConstructing );
-
-    NGS_ReadCollection * new_ref = NULL;
-    const char * spec = JStringData ( jspec, ctx, jenv );
-
-    if ( ! have_user_version_string )
-        set_app_version_string ( "ncbi-ngs: unknown-application" );
-
-    new_ref = NGS_ReadCollectionMake ( ctx, spec );
-    if ( FAILED () )
-    {
-        ErrorMsgThrow ( jenv, ctx, __LINE__, "failed to create ReadCollection from spec '%s'"
-                         , spec
-            );
-        JStringReleaseData ( jspec, ctx, jenv, spec );
-        return 0;
-    }
-
-    JStringReleaseData ( jspec, ctx, jenv, spec );
-
-    assert ( new_ref != NULL );
-    return ( jlong ) ( size_t ) new_ref;
-}
-
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    OpenReferenceSequence
- * Signature: (Ljava/lang/String;)J
- */
-JNIEXPORT jlong JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_OpenReferenceSequence
-    ( JNIEnv * jenv, jclass jcls, jstring jspec )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcMgr, rcConstructing );
-
-    NGS_ReferenceSequence* new_ref = NULL;
-    const char * spec = JStringData ( jspec, ctx, jenv );
-
-    if ( ! have_user_version_string )
-        set_app_version_string ( "ncbi-ngs: unknown-application" );
-
-    new_ref = NGS_ReferenceSequenceMake ( ctx, spec );
-    if ( FAILED () )
-    {
-        ErrorMsgThrow ( jenv, ctx, __LINE__, "failed to create ReferenceSequence from spec '%s'"
-                         , spec
-            );
-        JStringReleaseData ( jspec, ctx, jenv, spec );
-        return 0;
-    }
-
-    JStringReleaseData ( jspec, ctx, jenv, spec );
-
-    assert ( new_ref != NULL );
-    return ( jlong ) ( size_t ) new_ref;
-}
-
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    IsValid
- * Signature: (Ljava/lang/String;)Z
- */
-JNIEXPORT jboolean JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_IsValid
-  ( JNIEnv * jenv, jclass jcls, jstring jspec )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcMgr, rcAccessing );
-
-    jboolean result = false;
-
-    VFSManager * vfs = NULL;
-    rc_t rc = VFSManagerMake ( & vfs );
-
-    if ( rc == 0 ) {
-        const char * spec = JStringData ( jspec, ctx, jenv );
-
-        VPath * path = NULL;
-        rc = VFSManagerMakePath ( vfs, & path, spec );
-
-        if ( rc == 0 ) {
-            const KDBManager * kdb = NULL;
-            rc = KDBManagerMakeRead ( & kdb, NULL );
-
-            if ( rc == 0 ) {
-                KPathType t = KDBManagerPathTypeVP ( kdb, path );
-                if (t == kptDatabase || t == kptTable) {
-                    result = true;
-                }
-
-                KDBManagerRelease ( kdb );
-                kdb = NULL;
-            }
-
-            VPathRelease ( path );
-            path = NULL;
-        }
-
-        VFSManagerRelease ( vfs );
-        vfs = NULL;
-    }
-
-    return result;
-}
-
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    release
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_release
-    ( JNIEnv * jenv, jclass jcls, jlong jref )
-{
-    if ( jref != 0 )
-    {
-        HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcReleasing );
-        NGS_RefcountRelease ( ( void* ) ( size_t ) jref, ctx );
-    }
-}
-
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    Version
- * Signature: ()Ljava/lang/String;
- */
-JNIEXPORT jstring JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_Version
-  (JNIEnv *jenv, jclass jcls)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcMgr, rcAccessing );
-    return JStringMake(ctx, jenv, GetPackageVersion());
-}
diff --git a/libs/ngs-jni/jni_Manager.h b/libs/ngs-jni/jni_Manager.h
deleted file mode 100644
index b821e22..0000000
--- a/libs/ngs-jni/jni_Manager.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class gov_nih_nlm_ncbi_ngs_Manager */
-
-#ifndef _Included_gov_nih_nlm_ncbi_ngs_Manager
-#define _Included_gov_nih_nlm_ncbi_ngs_Manager
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    Version
- * Signature: ()Ljava/lang/String;
- */
-JNIEXPORT jstring JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_Version
-  (JNIEnv *, jclass);
-
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    Initialize
- * Signature: ()Ljava/lang/String;
- */
-JNIEXPORT jstring JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_Initialize
-  (JNIEnv *, jclass);
-
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    Shutdown
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_Shutdown
-  (JNIEnv *, jclass);
-
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    SetAppVersionString
- * Signature: (Ljava/lang/String;)V
- */
-JNIEXPORT void JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_SetAppVersionString
-  (JNIEnv *, jclass, jstring);
-
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    OpenReadCollection
- * Signature: (Ljava/lang/String;)J
- */
-JNIEXPORT jlong JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_OpenReadCollection
-  (JNIEnv *, jclass, jstring);
-
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    OpenReferenceSequence
- * Signature: (Ljava/lang/String;)J
- */
-JNIEXPORT jlong JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_OpenReferenceSequence
-  (JNIEnv *, jclass, jstring);
-
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    IsValid
- * Signature: (Ljava/lang/String;)Z
- */
-JNIEXPORT jboolean JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_IsValid
-  (JNIEnv *, jclass, jstring);
-
-/*
- * Class:     gov_nih_nlm_ncbi_ngs_Manager
- * Method:    release
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_gov_nih_nlm_ncbi_ngs_Manager_release
-  (JNIEnv *, jclass, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/libs/ngs-jni/jni_String.c b/libs/ngs-jni/jni_String.c
deleted file mode 100644
index 40ae772..0000000
--- a/libs/ngs-jni/jni_String.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "jni_String.h"
-#include "jni_ErrorMsg.h"
-#include "NGS_String.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-
-#include <sysalloc.h>
-
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * JString
- * NGS_String
- */
-
-
-
-/* Make
- *  make with string_printf format
- */
-jstring JStringMake ( ctx_t ctx, JNIEnv * jenv, const char * fmt, ... )
-{
-    jstring jstr;
-
-    va_list args;
-    va_start ( args, fmt );
-
-    jstr = JStringVMake ( ctx, jenv, fmt, args );
-
-    va_end ( args );
-
-    return jstr;
-}
-
-jstring JStringVMake ( ctx_t ctx, JNIEnv * jenv, const char * fmt, va_list args )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcString, rcConstructing );
-
-    rc_t rc;
-    size_t size;
-    char buffer [ 4096 ];
-
-    assert ( jenv != NULL );
-
-    /* if the format string is NULL or empty */
-    if ( fmt == NULL || fmt [ 0 ] == 0 )
-        return ( ( * jenv ) -> NewStringUTF ) ( jenv, "" );
-
-    rc = string_vprintf ( buffer, sizeof buffer, & size, fmt, args );
-    if ( rc != 0 )
-        INTERNAL_ERROR ( xcStringCreateFailed, "string_printf: rc = %R", rc );
-    else
-    {
-        return ( ( * jenv ) -> NewStringUTF ) ( jenv, buffer );
-    }
-
-    /* something is really bad with the string */
-    RuntimeExceptionThrow ( jenv, ctx, __LINE__, "failed to make a String" );
-
-    /* should never reach here */
-    return NULL;
-}
-
-
-/* Data
- *  access Java String data
- */
-const char * JStringData ( jstring jself, ctx_t ctx, JNIEnv * jenv )
-{
-    jboolean is_copy;
-    return ( ( * jenv ) -> GetStringUTFChars ) ( jenv, jself, & is_copy );
-}
-
-
-/* ReleaseData
- *  release Java String data
- */
-void JStringReleaseData ( jstring jself, ctx_t ctx, JNIEnv * jenv, const char * data )
-{
-    ( ( * jenv ) -> ReleaseStringUTFChars ) ( jenv, jself, data );
-}
-
-/* CopyToJString
- *  copy a Java String from an NGS_String
- */
-jstring NGS_StringCopyToJString ( const NGS_String * self, ctx_t ctx, JNIEnv * jenv )
-{
-    size_t size;
-
-    assert ( jenv != NULL );
-
-    /* if the NGS_String is NULL */
-    if ( self == NULL )
-        return ( ( * jenv ) -> NewStringUTF ) ( jenv, "" );
-
-    TRY ( size = NGS_StringSize ( self, ctx ) )
-    {
-        const char * data;
-
-        /* if NGS_String is empty */
-        if ( size == 0 )
-            return ( ( * jenv ) -> NewStringUTF ) ( jenv, "" );
-
-        TRY ( data = NGS_StringData ( self, ctx ) )
-        {
-            char * copy;
-
-            /* the Java gods did not see fit to provide a version
-               of NewString that takes a pointer and a length,
-               at least when it comes to UTF-8 character sets... */
-
-            /* an awful, but effective, test to see if the string
-               is already NUL terminated. */
-            if ( ( ( ( size_t ) & data [ size ] ) & 0xFFF ) != 0 )
-            {
-                /* we can read this address without fear of a seg-fault.
-                   if it's NUL, then we can send the string in directly. */
-                if ( data [ size ] == 0 )
-                    return ( ( * jenv ) -> NewStringUTF ) ( jenv, data );
-            }
-
-            /* create a copy for the benefit of our Java friends */
-            copy = malloc ( size + 1 );
-            if ( copy == NULL )
-                SYSTEM_ERROR ( xcNoMemory, "out of memory allocating a string copy to plug in a NUL byte" );
-            else
-            {
-                jstring jstr;
-
-                memcpy ( copy, data, size );
-                copy [ size ] = 0;
-
-                jstr = ( ( * jenv ) -> NewStringUTF ) ( jenv, copy );
-
-                free ( copy );
-
-                return jstr;
-            }
-        }
-    }
-
-    /* something is really bad with the string */
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcString, rcConstructing );
-        RuntimeExceptionThrow ( jenv, ctx, __LINE__, "failed to make a String" );
-    }
-
-    /* should never reach here */
-    return NULL;
-}
-
-/* ConvertToJavaString
- *  make a Java String from an NGS_String
- */
-jstring NGS_StringConvertToJString ( NGS_String * self, ctx_t ctx, JNIEnv * jenv )
-{
-    jstring jstr = NGS_StringCopyToJString ( self, ctx, jenv );
-    NGS_StringRelease ( self, ctx );
-    return jstr;
-}
diff --git a/libs/ngs-jni/jni_String.h b/libs/ngs-jni/jni_String.h
deleted file mode 100644
index 4d750a5..0000000
--- a/libs/ngs-jni/jni_String.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_jni_String_
-#define _h_jni_String_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#include "jni.h"
-
-#include <stdarg.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct NGS_String;
-
-
-/*--------------------------------------------------------------------------
- * JString
- * NGS_String
- */
-
-
-/* Make
- *  make with string_printf format
- */
-jstring JStringMake ( ctx_t ctx, JNIEnv * jenv, const char * fmt, ... );
-jstring JStringVMake ( ctx_t ctx, JNIEnv * jenv, const char * fmt, va_list args );
-
-
-/* Data
- *  access Java String data
- */
-const char * JStringData ( jstring jself, ctx_t ctx, JNIEnv * jenv );
-
-
-/* ReleaseData
- *  release Java String data
- */
-void JStringReleaseData ( jstring jself, ctx_t ctx, JNIEnv * jenv, const char * data );
-
-
-/* CopyToJString
- *  copy a Java String from an NGS_String
- */
-jstring NGS_StringCopyToJString ( struct NGS_String const * self, ctx_t ctx, JNIEnv * jenv  );
-
-
-/* ConvertToJavaString
- *  make a Java String from an NGS_String
- */
-jstring NGS_StringConvertToJString ( struct NGS_String * self, ctx_t ctx, JNIEnv * jenv );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_jni_ErrorMsg_ */
diff --git a/libs/ngs-jni/jni_md.h b/libs/ngs-jni/jni_md.h
deleted file mode 100644
index 84c392a..0000000
--- a/libs/ngs-jni/jni_md.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * %W% %E%
- *
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- */
-
-#ifndef _JAVASOFT_JNI_MD_H_
-#define _JAVASOFT_JNI_MD_H_
-
-/* TEMPORARY - THIS MAY NEED TO BE ON A PER-SYSTEM BASIS */
-#include <stdint.h>
-
-#ifdef _WIN32_WINNT
-    #define JNIEXPORT __declspec(dllexport)
-    #define JNIIMPORT __declspec(dllimport)
-    #define JNICALL __stdcall
-#else
-    #define JNIEXPORT 
-    #define JNIIMPORT 
-    #define JNICALL   
-#endif
-
-typedef int8_t jbyte;
-typedef int32_t jint;
-typedef int64_t jlong;
-
-#endif /* !_JAVASOFT_JNI_MD_H_ */
diff --git a/libs/ngs-py/Makefile b/libs/ngs-py/Makefile
deleted file mode 100644
index f0bc3c0..0000000
--- a/libs/ngs-py/Makefile
+++ /dev/null
@@ -1,87 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/ngs-py
-
-INT_LIBS = \
-	libngs-py
-
-EXT_LIBS = \
-
-ALL_LIBS = \
-	$(INT_LIBS) \
-	$(EXT_LIBS)
-
-include $(TOP)/build/Makefile.env
-
-INCDIRS += \
-	-I$(SRCDIR)/../ngs
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/all $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# ngs-py
-#
-$(ILIBDIR)/libngs-py: $(addprefix $(ILIBDIR)/libngs-py.,$(LIBX))
-
-NGS_PY_SRC = \
-	py_Manager
-
-NGS_PY_LIB = \
-
-NGS_PY_OBJ = \
-	$(addsuffix .$(LOBX),$(NGS_PY_SRC))
-
-
-$(ILIBDIR)/libngs-py.$(LIBX): $(NGS_PY_OBJ)
-	$(LD) --slib -o $@ $^
-
diff --git a/libs/ngs-py/py_Manager.c b/libs/ngs-py/py_Manager.c
deleted file mode 100644
index 182ee02..0000000
--- a/libs/ngs-py/py_Manager.c
+++ /dev/null
@@ -1,218 +0,0 @@
-#include "py_Manager.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <kfc/rc.h>
-
-#include <kfc/rsrc-global.h>
-
-#include "NGS_String.h"
-#include "NGS_ReadCollection.h"
-#include "NGS_ReferenceSequence.h"
-#include "NGS_Refcount.h"
-
-#include <kdb/manager.h> /* KDBManager */
-#include <kns/manager.h>
-#include <klib/ncbi-vdb-version.h> /* GetPackageVersion */
-#include "../klib/release-vers.h"
-
-#include <vfs/manager.h> /* VFSManager */
-#include <vfs/path.h> /* VPath */
-
-#include <assert.h>
-#include <string.h>
-
-static PY_RES_TYPE NGSErrorHandler(ctx_t ctx, char* pStrError, size_t nStrErrorBufferSize)
-{
-    char const* pszErrorDesc = WHAT();
-    assert(pStrError);
-    strncpy(pStrError, pszErrorDesc, nStrErrorBufferSize);
-    pStrError[nStrErrorBufferSize - 1] = '\n';
-    CLEAR();
-    return PY_RES_ERROR; /* TODO: return error (exception) type */
-}
-
-
-static bool have_user_version_string;
-
-static void set_app_version_string ( const char * app_version )
-{
-    // get a KNSManager
-    KNSManager * kns;
-    rc_t rc = KNSManagerMake ( & kns );
-    if ( rc == 0 )
-    {
-        have_user_version_string = true;
-        KNSManagerSetUserAgent ( kns, "ncbi-ngs.%V %s", RELEASE_VERS, app_version );
-        KNSManagerRelease ( kns );
-    }
-}
-
-LIB_EXPORT PY_RES_TYPE PY_NGS_Engine_SetAppVersionString(char const* app_version, char* pStrError, size_t nStrErrorBufferSize)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcMgr, rcUpdating );
-
-    set_app_version_string ( app_version );
-
-    if (FAILED())
-    {
-        return NGSErrorHandler(ctx, pStrError, nStrErrorBufferSize);
-    }
-
-    CLEAR();
-    return PY_RES_OK;
-}
-
-LIB_EXPORT PY_RES_TYPE PY_NGS_Engine_GetVersion(char const** pRet, char* pStrError, size_t nStrErrorBufferSize)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcMgr, rcUpdating );
-
-    char const* ret = GetPackageVersion();
-
-    if (FAILED())
-    {
-        return NGSErrorHandler(ctx, pStrError, nStrErrorBufferSize);
-    }
-
-    assert ( pRet != NULL );
-    *pRet = ret;
-
-    CLEAR();
-    return PY_RES_OK;
-}
-
-LIB_EXPORT PY_RES_TYPE PY_NGS_Engine_IsValid(char const* spec, int* pRet, char* pStrError, size_t nStrErrorBufferSize)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcMgr, rcAccessing );
-
-    int ret = false;
-
-    VFSManager * vfs = NULL;
-    rc_t rc = VFSManagerMake ( & vfs );
-
-    if ( rc == 0 )
-    {
-        VPath * path = NULL;
-        rc = VFSManagerMakePath ( vfs, & path, spec );
-
-        if ( rc == 0 )
-        {
-            const KDBManager * kdb = NULL;
-            rc = KDBManagerMakeRead ( & kdb, NULL );
-
-            if ( rc == 0 )
-            {
-                KPathType t = KDBManagerPathTypeVP ( kdb, path );
-                if (t == kptDatabase || t == kptTable)
-                {
-                    ret = true;
-                }
-
-                KDBManagerRelease ( kdb );
-                kdb = NULL;
-            }
-
-            VPathRelease ( path );
-            path = NULL;
-        }
-
-        VFSManagerRelease ( vfs );
-        vfs = NULL;
-    }
-
-    assert ( pRet != NULL );
-
-    *pRet = ret;
-
-    CLEAR();
-    return PY_RES_OK;
-}
-
-
-LIB_EXPORT PY_RES_TYPE PY_NGS_Engine_ReadCollectionMake(char const* spec, void** ppReadCollection, char* pStrError, size_t nStrErrorBufferSize)
-{
-    HYBRID_FUNC_ENTRY(rcSRA, rcMgr, rcConstructing);
-
-    void* pRet = NULL;
-
-    if ( ! have_user_version_string )
-        set_app_version_string ( "ncbi-ngs: unknown-application" );
-
-    pRet = (void*)NGS_ReadCollectionMake(ctx, spec);
-
-    if (FAILED())
-    {
-        return NGSErrorHandler(ctx, pStrError, nStrErrorBufferSize);
-    }
-
-    assert(pRet != NULL);
-    assert(ppReadCollection != NULL);
-
-    *ppReadCollection = pRet;
-
-    CLEAR();
-    return PY_RES_OK;
-}
-
-LIB_EXPORT PY_RES_TYPE PY_NGS_Engine_ReferenceSequenceMake(char const* spec, void** ppReadCollection, char* pStrError, size_t nStrErrorBufferSize)
-{
-    HYBRID_FUNC_ENTRY(rcSRA, rcMgr, rcConstructing);
-
-    void* pRet = NULL;
-
-    if ( ! have_user_version_string )
-        set_app_version_string ( "ncbi-ngs: unknown-application" );
-
-    pRet = (void*)NGS_ReferenceSequenceMake(ctx, spec);
-
-    if (FAILED())
-    {
-        return NGSErrorHandler(ctx, pStrError, nStrErrorBufferSize);
-    }
-
-    assert(pRet != NULL);
-    assert(ppReadCollection != NULL);
-
-    *ppReadCollection = pRet;
-
-    CLEAR();
-    return PY_RES_OK;
-}
-
-#if 0
-PY_RES_TYPE PY_NGS_Engine_RefcountRelease(void* pRefcount, char* pStrError, size_t nStrErrorBufferSize)
-{
-    HYBRID_FUNC_ENTRY(rcSRA, rcRefcount, rcReleasing);
-
-    NGS_RefcountRelease((NGS_Refcount*)pRefcount, ctx);
-
-    if (FAILED())
-    {
-        return NGSErrorHandler(ctx, pStrError, nStrErrorBufferSize);
-    }
-
-    CLEAR();
-    return PY_RES_OK;
-}
-
-PY_RES_TYPE PY_NGS_Engine_StringData(void const* pNGSString, char const** pRetBufPtr/* TODO: add new error return? */)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcString, rcAccessing );
-    assert(pRetBufPtr);
-    *pRetBufPtr = NGS_StringData(pNGSString, ctx);
-    return PY_RES_OK;
-}
-
-PY_RES_TYPE PY_NGS_Engine_StringSize(void const* pNGSString, size_t* pRetSize/*TODO: add new error return?*/)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcString, rcAccessing );
-    assert(pRetSize);
-    *pRetSize = NGS_StringSize(pNGSString, ctx);
-    return PY_RES_OK;
-}
-#endif
-
-
-
diff --git a/libs/ngs-py/py_Manager.h b/libs/ngs-py/py_Manager.h
deleted file mode 100644
index e0cd90c..0000000
--- a/libs/ngs-py/py_Manager.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _Included_py_ngs_ncbi_Manager
-#define _Included_py_ngs_ncbi_Manager
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "py_ngs_defs.h"
-#include <stddef.h>
-
-LIB_EXPORT PY_RES_TYPE PY_NGS_Engine_SetAppVersionString(char const* app_version, char* pStrError, size_t nStrErrorBufferSize);
-LIB_EXPORT PY_RES_TYPE PY_NGS_Engine_GetVersion(char const** pRet, char* pStrError, size_t nStrErrorBufferSize);
-LIB_EXPORT PY_RES_TYPE PY_NGS_Engine_IsValid(char const* spec, int* pRet, char* pStrError, size_t nStrErrorBufferSize);
-LIB_EXPORT PY_RES_TYPE PY_NGS_Engine_ReadCollectionMake(char const* spec, void** ppReadCollection, char* pStrError, size_t nStrErrorBufferSize);
-LIB_EXPORT PY_RES_TYPE PY_NGS_Engine_ReferenceSequenceMake(char const* spec, void** ppReadCollection, char* pStrError, size_t nStrErrorBufferSize);
-/*
-These functions are not needed:
-*We don't export yet another string from engine
-
-LIB_EXPORT PY_RES_TYPE PY_NGS_Engine_RefcountRelease(void* pRefcount, char* pStrError, size_t nStrErrorBufferSize);
-PY_RES_TYPE PY_NGS_Engine_StringData(void const* pNGSString, char const** pRetBufPtr);
-PY_RES_TYPE PY_NGS_Engine_StringSize(void const* pNGSString, size_t* pRetSize);
-*/
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/libs/ngs-py/py_ngs_defs.h b/libs/ngs-py/py_ngs_defs.h
deleted file mode 100644
index e32eec7..0000000
--- a/libs/ngs-py/py_ngs_defs.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* py_ngs_defs.h */
-
-#ifndef _h_ngs_defs_
-#define _h_ngs_defs_
-
-#define PY_RES_TYPE   int
-#define PY_RES_OK     0
-#define PY_RES_ERROR  1
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif
-
diff --git a/libs/ngs/BAM_Alignment.c b/libs/ngs/BAM_Alignment.c
deleted file mode 100644
index e85b56c..0000000
--- a/libs/ngs/BAM_Alignment.c
+++ /dev/null
@@ -1,641 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "CSRA1_Alignment.h"
-
-typedef struct BAM_Alignment BAM_Alignment;
-#define NGS_ALIGNMENT void
-
-#include "NGS_Alignment.h"
-
-#include "NGS_ReadCollection.h"
-
-#include <sysalloc.h>
-
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-
-#include <klib/printf.h>
-#include <klib/rc.h>
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include "NGS_Refcount.h"
-#include "NGS_String.h"
-
-#include <string.h>
-#include <limits.h>
-
-#include "BAM_Record.h"
-
-struct BAM_Alignment {
-    NGS_Alignment super;
-    struct BAM_Record *(*provider_f)(struct NGS_ReadCollection *, ctx_t);
-    struct NGS_ReadCollection *provider;
-    BAM_Record *cur;
-    bool primary;
-    bool secondary;
-};
-
-static void BAM_AlignmentWhack(void * const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-    
-    free(self->cur);
-    NGS_RefcountRelease(&self->provider->dad, ctx);
-}
-
-static NGS_String *BAM_AlignmentAlignmentId(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    (void)self;
-    UNIMPLEMENTED();
-    return NULL;
-}
-
-static NGS_String * BAM_AlignmentReferenceSpec(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur)
-        return NGS_StringMake(ctx, self->cur->RNAME, strlen(self->cur->RNAME));
-
-    USER_ERROR(xcRowNotFound, "no current row");
-    return NULL;
-}
-
-
-static int BAM_AlignmentMappingQuality(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur)
-        return self->cur->MAPQ;
-
-    USER_ERROR(xcRowNotFound, "no current row");
-    return 0;
-}
-
-
-static NGS_String * BAM_AlignmentReferenceBases(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    (void)self;
-    UNIMPLEMENTED();
-    return NULL;
-}
-
-
-static bool FindRG(void *const vp, ctx_t ctx, unsigned const ord, BAM_Record_Extra_Field const *const fld)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-
-    if (fld->tag[0] == 'R' && fld->tag[1] == 'G' && fld->val_type == 'Z') {
-        NGS_String **const prslt = vp;
-        
-        *prslt = NGS_StringMakeCopy(ctx, fld->value->string, fld->elemcount);
-        return false; /* done */
-    }
-    return true; /* keep going */
-}
-
-static NGS_String * BAM_AlignmentReadGroup(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur) {
-        NGS_String *rslt = NULL;
-        
-        BAM_Record_ForEachExtra(self->cur, ctx, FindRG, &rslt);
-        return rslt;
-    }
-    USER_ERROR(xcRowNotFound, "no current row");
-    return NULL;
-}
-
-
-static NGS_String * BAM_AlignmentReadId(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur)
-        return self->cur->QNAME ? NGS_StringMake(ctx, self->cur->QNAME, strlen(self->cur->QNAME)) : NULL;
-
-    USER_ERROR(xcRowNotFound, "no current row");
-    return NULL;
-}
-
-
-typedef struct {
-    unsigned start;
-    unsigned length;
-} clipped_t;
-
-static clipped_t const get_clipping(BAM_Record const *rec)
-{
-    clipped_t rslt = { 0, rec->seqlen };
-    
-    if (rec->ncigar > 0 && (rec->cigar[0] & 0x0F) == 4) {
-        unsigned const length = rec->cigar[0] >> 4;
-        
-        rslt.start += length;
-        rslt.length -= length;
-    }
-    if (rec->ncigar > 1 && (rec->cigar[rec->ncigar - 1] & 0x0F) == 4) {
-        unsigned const length = rec->cigar[rec->ncigar - 1] >> 4;
-        
-        rslt.length -= length;
-    }
-    return rslt;
-}
-
-static NGS_String * BAM_AlignmentClippedFragmentBases(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur) {
-        if (self->cur->seqlen) {
-            clipped_t const clipping = get_clipping(self->cur);
-            return NGS_StringMake(ctx, self->cur->SEQ + clipping.start, clipping.length);
-        }
-        return NULL;
-    }
-    USER_ERROR(xcRowNotFound, "no current row");
-    return NULL;
-}
-
-
-static NGS_String * BAM_AlignmentClippedFragmentQualities(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur) {
-        if (self->cur->seqlen && self->cur->QUAL[0] != -1) {
-            clipped_t const clipping = get_clipping(self->cur);
-            return NGS_StringMake(ctx, self->cur->QUAL + clipping.start, clipping.length);
-        }
-        return NULL;
-    }
-    USER_ERROR(xcRowNotFound, "no current row");
-    return NULL;
-}
-
-
-static bool BAM_AlignmentIsPrimary(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur)
-        return (self->cur->FLAG & 0x0900) == 0 ? true : false;
-    
-    USER_ERROR(xcRowNotFound, "no current row");
-    return false;
-}
-
-
-static int64_t BAM_AlignmentAlignmentPosition(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur)
-        return self->cur->POS - 1;
-    
-    USER_ERROR(xcRowNotFound, "no current row");
-    return -1;
-}
-
-
-static unsigned ComputeRefLen(size_t const count, uint32_t const cigar[])
-{
-    unsigned rslt = 0;
-    unsigned i;
-    
-    for (i = 0; i < count; ++i) {
-        uint32_t const op = cigar[i];
-        unsigned const len = op >> 4;
-        int const code = op & 0x0F;
-        
-        switch (code) {
-        case 0: /* M */
-        case 2: /* D */
-        case 3: /* N */
-        case 7: /* = */
-        case 8: /* X */
-            rslt += len;
-            break;
-        }
-    }
-    return rslt;
-}
-
-static uint64_t BAM_AlignmentAlignmentLength(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur)
-        return ComputeRefLen(self->cur->ncigar, self->cur->cigar);
-    
-    USER_ERROR(xcRowNotFound, "no current row");
-    return 0;
-}
-
-
-static bool BAM_AlignmentIsReversedOrientation(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur)
-        return (self->cur->FLAG & 0x0010) == 0 ? false : true;
-    
-    USER_ERROR(xcRowNotFound, "no current row");
-    return false;
-}
-
-
-static int BAM_AlignmentSoftClip(void *const vp, ctx_t ctx, bool left)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur) {
-        unsigned const end = left ? 0 : (self->cur->ncigar - 1);
-        uint32_t const op = self->cur->cigar[end];
-        int const code = op & 0x0F;
-        int const len = op >> 4;
-
-        return code == 4 ? len : 0;
-    }
-    USER_ERROR(xcRowNotFound, "no current row");
-    return false;
-}
-
-
-static uint64_t BAM_AlignmentTemplateLength(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur)
-        return self->cur->TLEN;
-    
-    USER_ERROR(xcRowNotFound, "no current row");
-    return 0;
-}
-
-
-static char const *FormatCIGAR(char *dst, char const OPCODE[], size_t const count, uint32_t const cigar[])
-{
-    uint32_t const *src = cigar + count;
-    unsigned i;
-    char *last_out;
-    char last_code = 0;
-    uint32_t last_len = 0;
-    
-    last_out = dst;
-    for (i = 0; i < count; ++i) {
-        uint32_t const op = *--src;
-        char const code = OPCODE[op & 0x0F];
-        uint32_t const len1 = op >> 4;
-        uint32_t len = code == last_code ? ((dst = last_out), last_len + len1) : len1;
-        
-        last_len = len;
-        last_code = code;
-        last_out = dst;
-        *--dst = code;
-        for ( ; ; ) {
-            *--dst = len % 10 + '0';
-            if ((len /= 10) == 0)
-                break;
-        }
-    }
-    return dst;
-}
-
-static NGS_String *CIGAR(ctx_t ctx, char const OPCODE[], size_t const count, uint32_t const cigar[])
-{
-    size_t const max = 10 * count;
-#if DEBUG
-    char buffer[max + 1];
-    buffer[max] = '\0';
-#else
-    char buffer[max];
-#endif
-    char *const endp = buffer + max;
-    char const *const rslt = FormatCIGAR(endp, OPCODE, count, cigar);
-    size_t const len = endp - rslt;
-    
-    return NGS_StringMakeCopy(ctx, rslt, len);
-}
-
-static NGS_String *CIGAR_clipped(ctx_t ctx, char const OPCODE[], bool const clipped, size_t const count, uint32_t const cigar[])
-{
-    if (!clipped)
-        return CIGAR(ctx, OPCODE, count, cigar);
-    else {
-        char const first = cigar[0] & 0x0F;
-        char const last  = cigar[count - 1] & 0x0F;
-        unsigned const cfirst = (first == 4 || first == 5) ? 1 : 0;
-        unsigned const clast  = (last  == 4 || last  == 5) ? 1 : 0;
-        
-        return CIGAR(ctx, OPCODE, count - cfirst - clast, &cigar[cfirst]);
-    }
-}
-
-static NGS_String * BAM_AlignmentShortCigar(void *const vp, ctx_t ctx, bool clipped)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur)
-        return CIGAR_clipped(ctx, "MIDNSHPMM???????", clipped, self->cur->ncigar, self->cur->cigar);
-
-    USER_ERROR(xcRowNotFound, "no current row");
-    return NULL;
-}
-
-
-static NGS_String * BAM_AlignmentLongCigar(void *const vp, ctx_t ctx, bool clipped)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur)
-        return CIGAR_clipped(ctx, "MIDNSHP=X???????", clipped, self->cur->ncigar, self->cur->cigar);
-
-    USER_ERROR(xcRowNotFound, "no current row");
-    return NULL;
-}
-
-
-static bool BAM_AlignmentHasMate(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur)
-        return (self->cur->FLAG & 0x0001) == 0 ? false : true;
-    
-    USER_ERROR(xcRowNotFound, "no current row");
-    return false;
-}
-
-
-static NGS_String * BAM_AlignmentMateAlignmentId(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    (void)self;
-    UNIMPLEMENTED();
-    return 0;
-}
-
-
-static void * BAM_AlignmentMateAlignment(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    (void)self;
-    UNIMPLEMENTED();
-    return NULL;
-}
-
-
-static NGS_String * BAM_AlignmentMateReferenceSpec(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur)
-        return self->cur->RNEXT ? NGS_StringMake(ctx, self->cur->RNEXT, strlen(self->cur->RNEXT)) : NULL;
-    
-    USER_ERROR(xcRowNotFound, "no current row");
-    return NULL;
-}
-
-
-static bool BAM_AlignmentMateIsReversedOrientation(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur)
-        return (self->cur->FLAG & 0x0020) == 0 ? false : true;
-    
-    USER_ERROR(xcRowNotFound, "no current row");
-    return false;
-}
-
-
-/*--------------------------------------------------------------------------
- * NGS_AlignmentIterator
- */
-
-static bool ShouldSkip(BAM_Alignment const *const self)
-{
-    if (!self->cur->RNAME) /* not aligned */
-        return true;
-    
-    if ((self->cur->FLAG & 0x0900) == 0 && !self->primary) /* is primary and don't want primary */
-        return true;
-    
-    if ((self->cur->FLAG & 0x0900) != 0 && !self->secondary) /* is secondary and don't want secondary */
-        return true;
-    
-    return false;
-}
-
-static bool BAM_AlignmentIteratorNext(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    do {
-        if (self->cur)
-            free(self->cur);
-        self->cur = self->provider_f(self->provider, ctx);
-        if (FAILED() || !self->cur)
-            break;
-    } while (ShouldSkip(self));
-
-    return self->cur != NULL;
-}
-
-
-static NGS_String * BAM_AlignmentFragmentGetId(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur) {
-        return self->cur->QNAME ? NGS_StringMake(ctx, self->cur->QNAME, strlen(self->cur->QNAME)) : NGS_StringMake(ctx, "", 0);
-    }
-    USER_ERROR(xcRowNotFound, "no current row");
-    return NULL;
-}
-
-
-static NGS_String * BAM_AlignmentFragmentGetBases(void *const vp, ctx_t ctx,
-                                                  uint64_t offset, uint64_t length)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur) {
-        if (offset + length < self->cur->seqlen) {
-            return NGS_StringMake(ctx, self->cur->SEQ + offset, length);
-        }
-        USER_ERROR(xcRowNotFound, "invalid offset or length");
-        return NULL;
-    }
-    USER_ERROR(xcRowNotFound, "no current row");
-    return NULL;
-}
-
-
-static NGS_String * BAM_AlignmentFragmentGetQualities(void *const vp, ctx_t ctx,
-                                                      uint64_t offset, uint64_t length)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    if (self->cur) {
-        if (offset + length < self->cur->seqlen) {
-            return NGS_StringMake(ctx, self->cur->QUAL + offset, length);
-        }
-        USER_ERROR(xcRowNotFound, "invalid offset or length");
-        return NULL;
-    }
-    USER_ERROR(xcRowNotFound, "no current row");
-    return NULL;
-}
-
-
-static bool BAM_AlignmentFragmentNext(void *const vp, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_Alignment *const self = (BAM_Alignment *)vp;
-
-    (void)self;
-    UNIMPLEMENTED();
-    return NULL;
-}
-
-
-
-static NGS_Alignment_vt const vt =
-{
-    {
-        {
-            /* NGS_Refcount */
-            BAM_AlignmentWhack
-        },
-
-        /* NGS_Fragment */
-        BAM_AlignmentFragmentGetId,
-        BAM_AlignmentFragmentGetBases,
-        BAM_AlignmentFragmentGetQualities,
-        BAM_AlignmentFragmentNext
-    },
-    
-    BAM_AlignmentAlignmentId,
-    BAM_AlignmentReferenceSpec,
-    BAM_AlignmentMappingQuality,
-    BAM_AlignmentReferenceBases,
-    BAM_AlignmentReadGroup,
-    BAM_AlignmentReadId,
-    BAM_AlignmentClippedFragmentBases,
-    BAM_AlignmentClippedFragmentQualities,
-    NULL,
-    BAM_AlignmentIsPrimary,
-    BAM_AlignmentAlignmentPosition,
-    BAM_AlignmentAlignmentLength,
-    BAM_AlignmentIsReversedOrientation,
-    BAM_AlignmentSoftClip,
-    BAM_AlignmentTemplateLength,
-    BAM_AlignmentShortCigar,
-    BAM_AlignmentLongCigar,
-    BAM_AlignmentHasMate,
-    BAM_AlignmentMateAlignmentId,
-    BAM_AlignmentMateAlignment,
-    BAM_AlignmentMateReferenceSpec,
-    BAM_AlignmentMateIsReversedOrientation,
-
-    /* Iterator */
-    BAM_AlignmentIteratorNext
-};
-
-static void BAM_AlignmentInit(BAM_Alignment *const self, ctx_t ctx, bool const primary, bool const secondary,
-                              struct BAM_Record *(*const provider_f)(struct NGS_ReadCollection *, ctx_t),
-                              struct NGS_ReadCollection *const provider)
-{
-    self->provider = provider;
-    self->provider_f = provider_f;
-    self->primary = primary;
-    self->secondary = secondary;
-}
-
-struct NGS_Alignment *BAM_AlignmentMake(ctx_t ctx, bool const primary, bool const secondary,
-                                        struct BAM_Record *(*const provider_f)(struct NGS_ReadCollection *, ctx_t),
-                                        struct NGS_ReadCollection *const provider,
-                                        char const name[])
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcReading);
-    void *self = calloc(1, sizeof(BAM_Alignment));
-    if (self) {
-        NGS_Alignment *const super = &((BAM_Alignment *)self)->super;
-        
-        TRY(NGS_AlignmentInit(ctx, super, &vt, "BAM_Alignment", name)) {
-            TRY(BAM_AlignmentInit(self, ctx, primary, secondary, provider_f, provider)) {
-                return self;
-            }
-        }
-        free(self);
-    }
-    else {
-        SYSTEM_ABORT(xcNoMemory, "allocating BAM_Alignment ( '%s' )", name);
-    }
-    return NULL;
-}
diff --git a/libs/ngs/BAM_Alignment.h b/libs/ngs/BAM_Alignment.h
deleted file mode 100644
index c819ade..0000000
--- a/libs/ngs/BAM_Alignment.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_csra1_alignment_
-#define _h_csra1_alignment_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-
-struct String;
-struct VCursor;
-struct NGS_Alignment;
-struct NGS_ReadCollection;
-struct BAM_Record;
-    
-extern
-struct NGS_Alignment *BAM_AlignmentMake(ctx_t, bool primary, bool secondary,
-            struct BAM_Record *(*provider)(struct NGS_ReadCollection *, ctx_t),
-            struct NGS_ReadCollection *,
-            char const name[]);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_csra1_alignment_ */
diff --git a/libs/ngs/BAM_ReadCollection.c b/libs/ngs/BAM_ReadCollection.c
deleted file mode 100644
index 7cce917..0000000
--- a/libs/ngs/BAM_ReadCollection.c
+++ /dev/null
@@ -1,1522 +0,0 @@
-/* ===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <klib/rc.h>
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <kfs/file.h>
-#include <vdb/manager.h>
-#include <vdb/schema.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <klib/sort.h>
-
-#include <strtol.h> /* for strtoi64 */
-
-#include <stddef.h>
-#include <assert.h>
-#include <string.h>
-
-#include <sysalloc.h>
-
-#include <zlib.h>
-
-#define NGS_REFCOUNT void
-
-#include "NGS_ReadCollection.h"
-#include "NGS_ReadGroup.h"
-#include "NGS_Reference.h"
-#include "NGS_Alignment.h"
-#include "NGS_Read.h"
-#include "NGS_String.h"
-
-#include "BAM_Record.h"
-
-#define IO_BLK_SIZE (1024u * 1024u)
-#define BAM_BLK_MAX (64u * 1024u)
-
-typedef struct BAM_rec BAM_rec;
-struct BAM_rec {
-    struct {
-        uint8_t
-        refID[4],
-        pos[4],
-        bin_mq_nl[4],
-        flag_nc[4],
-        l_seq[4],
-        next_refID[4],
-        next_pos[4],
-        tlen[4],
-        readname[1];
-    } const *data;
-    void *allocated;
-    uint64_t pos;
-    size_t size;
-};
-
-#define MAX_INDEX_SEQ_LEN ((1u << 29) - 1)
-#define MAX_BIN  (37449u)
-#define NUMINTV ((MAX_INDEX_SEQ_LEN + 1) >> 14)
-
-typedef struct RefIndexBinInfo RefIndexBinInfo;
-struct RefIndexBinInfo {
-    unsigned offset, count;
-};
-
-typedef struct RefIndexChunk RefIndexChunk;
-struct RefIndexChunk {
-    uint64_t first /*, last */;
-};
-
-typedef struct RefIndex RefIndex;
-struct RefIndex {
-    uint64_t off_beg, off_end, n_mapped, n_unmapped;
-    uint32_t numintv, numchnk;
-    uint64_t interval[NUMINTV];
-    RefIndexBinInfo bins[MAX_BIN];
-    RefIndexChunk chunk[1];
-};
-
-typedef struct HeaderRefInfo HeaderRefInfo;
-struct HeaderRefInfo {
-    RefIndex *index;
-    char *name;
-    int32_t length;
-    int32_t ordinal;
-};
-
-typedef struct BAM_ReferenceInfo BAM_ReferenceInfo;
-struct BAM_ReferenceInfo {
-    int32_t count;
-    HeaderRefInfo ref[1];
-};
-
-typedef struct BAM_ReadCollection BAM_ReadCollection;
-struct BAM_ReadCollection
-{
-    NGS_ReadCollection dad;
-    struct KFile const *fp;
-    char *path;                     /* path used to open the BAM file       */
-    uint8_t *iobuffer;              /* raw io buffer, compressed BAM data   */
-
-    BAM_ReferenceInfo *references;
-    char *headerText;
-
-    uint64_t cpos;                  /* file position of iobuffer  */
-    uint64_t bpos;                  /* file position of bambuffer */
-    uint64_t fpos;                  /* file position of next read */
-    z_stream zs;
-
-    /* name is substr(path, namestart, namelen) */
-    unsigned namestart;
-    unsigned namelen;
-    unsigned bam_cur;               /* current offset in bambuffer */
-    
-    uint8_t bambuffer[BAM_BLK_MAX];
-};
-
-typedef struct BAM_Reference BAM_Reference;
-struct BAM_Reference
-{
-    NGS_Reference dad;
-    BAM_ReadCollection *parent;
-    int32_t cur;
-    int state;
-};
-
-typedef struct BAM_RefIndexSlice BAM_RefIndexSlice;
-struct BAM_RefIndexSlice
-{
-    NGS_Refcount dad;
-    BAM_ReadCollection *parent;
-    uint64_t start;
-    uint64_t end;
-    int32_t chunks;
-    int32_t cur;
-    unsigned refID;
-    uint64_t chunk[1];
-};
-
-extern NGS_Alignment *BAM_AlignmentMake(ctx_t, bool, bool, struct BAM_Record *(*)(NGS_Refcount *, ctx_t), NGS_Refcount *, char const *);
-
-static void BAM_ReferenceInfoWhack(BAM_ReferenceInfo *);
-
-static void BAM_ReadCollectionWhack(void *const object, ctx_t ctx) {
-    BAM_ReadCollection *const self = (BAM_ReadCollection *)object;
-    
-    if (self->references) {
-        BAM_ReferenceInfoWhack(self->references);
-        free(self->references);
-    }
-    free(self->headerText);
-    free(self->iobuffer);
-    free(self->path);
-    KFileRelease(self->fp);
-}
-
-static NGS_String * BAM_ReadCollectionName(NGS_ReadCollection *const vp, ctx_t ctx) {
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_ReadCollection *const self = (BAM_ReadCollection *)vp;
-
-    return NGS_StringMake(ctx, self->path + self->namestart, self->namelen);
-}
-
-static NGS_ReadGroup * BAM_ReadCollectionReadGroups(NGS_ReadCollection *const vp, ctx_t ctx) {
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-
-    UNIMPLEMENTED();
-    return NULL;
-}
-
-static NGS_ReadGroup * BAM_ReadCollectionReadGroup(NGS_ReadCollection *const vp, ctx_t ctx, char const spec[]) {
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-
-    UNIMPLEMENTED();
-    return NULL;
-}
-
-static NGS_String *BAM_ReferenceGetCommonName(NGS_Reference *const base, ctx_t ctx)
-{
-    BAM_Reference *const self = (BAM_Reference *)base;
-    char const *name = self->parent->references->ref[self->cur].name;
-    
-    return NGS_StringMakeCopy(ctx, name, strlen(name));
-}
-
-static NGS_String *BAM_ReferenceGetCanonicalName(NGS_Reference *const base, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    USER_ERROR(xcFunctionUnsupported, "not supported for SAM/BAM");
-    return NULL;
-}
-
-static bool BAM_ReferenceGetIsCircular(NGS_Reference const *const base, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    USER_ERROR(xcFunctionUnsupported, "not supported for SAM/BAM");
-    return NULL;
-}
-
-static uint64_t BAM_ReferenceGetLength(NGS_Reference *const base, ctx_t ctx)
-{
-    BAM_Reference *const self = (BAM_Reference *)base;
-    
-    return self->parent->references->ref[self->cur].length;
-}
-
-static NGS_String *BAM_ReferenceGetBases(NGS_Reference *const base, ctx_t ctx, uint64_t offset, uint64_t size)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    USER_ERROR(xcFunctionUnsupported, "not supported for SAM/BAM");
-    return NULL;
-}
-
-static NGS_String *BAM_ReferenceGetChunk(NGS_Reference *const base, ctx_t ctx, uint64_t offset, uint64_t size)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    USER_ERROR(xcFunctionUnsupported, "not supported for SAM/BAM");
-    return NULL;
-}
-
-static NGS_Alignment *BAM_ReferenceGetAlignment(NGS_Reference *const base, ctx_t ctx, char const spec[])
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    USER_ERROR(xcFunctionUnsupported, "not supported for SAM/BAM");
-    return NULL;
-}
-
-static NGS_Alignment *BAM_ReferenceGetAlignments(NGS_Reference *const base, ctx_t ctx, bool wants_primary, bool wants_secondary)
-{
-    BAM_Reference *const self = (BAM_Reference *)base;
-    HeaderRefInfo const *const ref = &self->parent->references->ref[self->cur];
-    
-    if (!wants_primary || !wants_secondary || ref->index == NULL) {
-        USER_ERROR(xcFunctionUnsupported, "not supported for unindexed BAM");
-        return 0;
-    }
-    UNIMPLEMENTED();
-    return NULL;
-}
-
-static uint64_t BAM_ReferenceGetAlignmentCount(NGS_Reference const *const base, ctx_t ctx, bool wants_primary, bool wants_secondary)
-{
-    BAM_Reference const *const self = (BAM_Reference *)base;
-    HeaderRefInfo const *const ref = &self->parent->references->ref[self->cur];
-    
-    if (!wants_primary || !wants_secondary || ref->index == NULL) {
-        USER_ERROR(xcFunctionUnsupported, "not supported for unindexed BAM");
-        return 0;
-    }
-    return ref->index->n_mapped;
-}
-
-static int IndexSlice(RefIndex const *const self,
-                      uint64_t **rslt,
-                      unsigned const beg,
-                      unsigned const end);
-
-static BAM_Record *BAM_GetRecordSliced(NGS_Refcount *const self, ctx_t ctx);
-
-static void BAM_RefIndexSliceWhack(void *const object, ctx_t ctx)
-{
-    BAM_RefIndexSlice *const self = (BAM_RefIndexSlice *)object;
-    
-    NGS_RefcountRelease(&self->parent->dad.dad, ctx);
-}
-
-static NGS_Alignment *BAM_ReferenceGetAlignmentSlice(NGS_Reference *const object,
-                                                     ctx_t ctx,
-                                                     bool wants_primary,
-                                                     bool wants_secondary,
-                                                     uint64_t offset,
-                                                     uint64_t size)
-{
-    BAM_Reference *const self = (BAM_Reference *)object;
-
-    if (!wants_primary && !wants_secondary)
-EMPTY_ITERATOR: {
-        return NGS_AlignmentMakeNull(ctx, self->parent->path + self->parent->namestart, self->parent->namelen);
-    }
-    else {
-        HeaderRefInfo const *const ref = &self->parent->references->ref[self->cur];
-
-        if (ref->index == NULL) {
-            USER_ERROR(xcFunctionUnsupported, "not supported for unindexed BAM");
-            return 0;
-        }
-        if (offset > ref->length) {
-            goto EMPTY_ITERATOR;
-        }
-        if (offset + size > ref->length) {
-            size = ref->length - offset;
-        }
-        uint64_t *chunk;
-        int const chunks = IndexSlice(ref->index, &chunk, (uint32_t)offset, (uint32_t)(offset + size));
-        
-        if (chunks >= 0) {
-            BAM_RefIndexSlice *const slice = calloc(1, ((uint8_t const *)&((BAM_RefIndexSlice const *)NULL)->chunk[chunks]) - ((uint8_t const *)NULL));
-
-            if (slice) {
-                static NGS_Refcount_vt const vt = {
-                    BAM_RefIndexSliceWhack
-                };
-                
-                NGS_RefcountInit(ctx, &slice->dad, &vt, "BAM_RefIndexSlice", ref->name);
-                slice->parent = NGS_RefcountDuplicate(&self->parent->dad.dad, ctx);
-                slice->start = offset;
-                slice->end = offset + size;
-                slice->chunks = chunks;
-                slice->refID = self->cur;
-                if (chunks)
-                    memcpy(slice->chunk, chunk, chunks * sizeof(*chunk));
-
-                free(slice);
-                
-                NGS_Alignment *const rslt = BAM_AlignmentMake(ctx, wants_primary, wants_secondary, BAM_GetRecordSliced,
-                                                              NGS_RefcountDuplicate(&self->dad.dad, ctx),
-                                                              self->parent->path + self->parent->namestart);
-                
-                return rslt;
-            }
-        }
-        USER_ABORT(xcNoMemory, "out of memory allocating index slice");
-        return NULL;
-    }
-}
-
-static struct NGS_Pileup *BAM_ReferenceGetPileups(NGS_Reference *const base, ctx_t ctx, bool wants_primary, bool wants_secondary)
-{
-    USER_ERROR(xcFunctionUnsupported, "not supported for SAM/BAM");
-    return NULL;
-}
-
-static void BAM_ReferenceWhack(void *const base, ctx_t ctx)
-{
-    BAM_Reference *const self = (BAM_Reference *)base;
-    
-    NGS_RefcountRelease(&self->parent->dad.dad, ctx);
-}
-
-bool BAM_ReferenceIteratorNext(NGS_Reference *const base, ctx_t ctx)
-{
-    BAM_Reference *const self = (BAM_Reference *)base;
-    
-    switch (self->state) {
-        case 0:
-            self->state = 1;
-        case 1:
-            ++self->cur;
-            if (self->cur < self->parent->references->count)
-                return true;
-            else
-                self->state = 2;
-        case 2:
-            break;
-        case 3:
-            USER_ERROR(xcCursorExhausted, "No more rows available");
-    }
-    return false;
-}
-
-BAM_Reference *BAM_ReferenceMake(BAM_ReadCollection *parent, ctx_t ctx, char const name[])
-{
-    static NGS_Reference_vt const vt =
-    {
-        /* NGS_Refcount */
-        { BAM_ReferenceWhack },
-        
-        /* NGS_Reference */
-        BAM_ReferenceGetCommonName,
-        BAM_ReferenceGetCanonicalName,
-        BAM_ReferenceGetIsCircular,
-        BAM_ReferenceGetLength,
-        BAM_ReferenceGetBases,
-        BAM_ReferenceGetChunk,
-        BAM_ReferenceGetAlignment,
-        BAM_ReferenceGetAlignments,
-        BAM_ReferenceGetAlignmentCount,
-        BAM_ReferenceGetAlignmentSlice,
-        BAM_ReferenceGetPileups,
-        
-        /* NGS_ReferenceIterator */
-        BAM_ReferenceIteratorNext,
-    };
-    FUNC_ENTRY(ctx, rcSRA, rcCursor, rcConstructing);
-    
-    BAM_Reference *const rslt = calloc(1, sizeof(*rslt));
-    if (rslt) {
-        NGS_RefcountInit(ctx, &rslt->dad.dad, &vt.dad, "BAM_Reference", name);
-        rslt->parent = (BAM_ReadCollection *)NGS_RefcountDuplicate(&parent->dad.dad, ctx);
-    }
-    else
-        SYSTEM_ABORT(xcNoMemory, "allocating BAM_Reference %u bytes", sizeof(*rslt));
-
-    return rslt;
-}
-
-static NGS_Reference * BAM_ReadCollectionReferences(NGS_ReadCollection *const vp, ctx_t ctx) {
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_ReadCollection *const self = (BAM_ReadCollection *)vp;
-    
-    BAM_Reference *const rslt = BAM_ReferenceMake(self, ctx, self->path + self->namestart);
-
-    return &rslt->dad;
-}
-
-static int32_t FindReference(BAM_ReadCollection const *const self, char const name[])
-{
-    int32_t i;
-    int32_t const n = self->references->count;
-    size_t const nlen = strlen(name);
-    
-    for (i = 0; i < n; ++i) {
-        char const *const fnd = self->references->ref[i].name;
-        size_t const flen = strlen(fnd);
-        
-        if (flen == nlen && strcase_cmp(name, nlen, fnd, nlen, (uint32_t)nlen) == 0)
-            return i;
-    }
-    return -1;
-}
-
-static NGS_Reference * BAM_ReadCollectionReference(NGS_ReadCollection *const vp, ctx_t ctx, char const spec[]) {
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_ReadCollection *const self = (BAM_ReadCollection *)vp;
-    
-    int32_t const fnd = FindReference(self, spec);
-    if (fnd >= 0) {
-        BAM_Reference *const rslt = BAM_ReferenceMake(self, ctx, self->path + self->namestart);
-
-        if (!FAILED()) {
-            rslt->state = 3;
-            rslt->cur = fnd;
-        }
-        return &rslt->dad;
-    }
-    else {
-        USER_ERROR(xcStringNotFound, "Read Group '%s' is not found", spec);
-        return NULL;
-    }
-}
-
-static NGS_Alignment * BAM_ReadCollectionAlignments(NGS_ReadCollection *const vp, ctx_t ctx, bool const wants_primary, bool const wants_secondary) {
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-    BAM_ReadCollection *const self = (BAM_ReadCollection *)vp;
-    
-    if (!wants_primary && !wants_secondary) {
-        return NGS_AlignmentMakeNull(ctx, self->path + self->namestart, self->namelen);
-    }
-    else {
-        NGS_Alignment *const rslt = BAM_AlignmentMake(ctx, wants_primary, wants_secondary, BAM_GetRecord, NGS_RefcountDuplicate(&self->dad.dad, ctx), self->path + self->namestart);
-        
-        return rslt;
-    }
-}
-
-static NGS_Alignment * BAM_ReadCollectionAlignment(NGS_ReadCollection *const vp, ctx_t ctx, char const alignmentIdStr[]) {
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-
-    UNIMPLEMENTED();
-    return NULL;
-}
-
-static uint64_t BAM_ReadCollectionAlignmentCount(NGS_ReadCollection *const vp, ctx_t ctx, bool const wants_primary, bool const wants_secondary) {
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-
-    UNIMPLEMENTED();
-    return 0;
-}
-
-static NGS_Alignment * BAM_ReadCollectionAlignmentRange(NGS_ReadCollection *const vp, ctx_t ctx, uint64_t const first, uint64_t const count, bool const wants_primary, bool const wants_secondary) {
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-
-    UNIMPLEMENTED();
-    return NULL;
-}
-
-static struct NGS_Read * BAM_ReadCollectionReads(NGS_ReadCollection *const vp, ctx_t ctx, bool const wants_full, bool const wants_partial, bool const wants_unaligned) {
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-
-    UNIMPLEMENTED();
-    return NULL;
-}
-
-static struct NGS_Read * BAM_ReadCollectionRead(NGS_ReadCollection *const vp, ctx_t ctx, char const readIdStr[]) {
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-
-    UNIMPLEMENTED();
-    return NULL;
-}
-
-static uint64_t BAM_ReadCollectionReadCount(NGS_ReadCollection *const vp, ctx_t ctx) {
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-
-    UNIMPLEMENTED();
-    return 0;
-}
-
-static struct NGS_Read * BAM_ReadCollectionReadRange(NGS_ReadCollection *const vp, ctx_t ctx, uint64_t const first, uint64_t const count, bool const wants_full, bool const wants_partial, bool const wants_unaligned) {
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcAccessing);
-
-    UNIMPLEMENTED();
-    return NULL;
-}
-
-static void *Alloc(ctx_t ctx, size_t const size, bool const clear)
-{
-    void *const rslt = clear ? calloc(1, size) : malloc(size);
-    
-    if (rslt == NULL) {
-        SYSTEM_ABORT(xcNoMemory, "allocating %u bytes", size);
-    }
-    return rslt;
-}
-
-static bool FillBuffer(BAM_ReadCollection *const self, ctx_t ctx, uint64_t const fpos)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcReading);
-    size_t nread;
-    rc_t const rc = KFileRead(self->fp, fpos,
-                              self->iobuffer,
-                              IO_BLK_SIZE, &nread);
-    
-    if (rc == 0) {
-        self->cpos = fpos;
-        self->fpos = fpos + nread;
-        self->zs.avail_in = (uInt)nread;
-        self->zs.next_in = (Bytef *)self->iobuffer;
-        
-        return true;
-    }
-
-    SYSTEM_ABORT(xcUnexpected, "reading '%s' rc = %R", self->path, rc);
-    return false;
-}
-
-static bool ReadZlib(BAM_ReadCollection *self, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcData, rcDecoding);
-    uint64_t const bpos = (self->cpos << 16) + (self->zs.next_in ? (self->zs.next_in - self->iobuffer) : 0);
-    int zrc;
-
-    self->zs.next_out = self->bambuffer;
-    self->zs.avail_out = BAM_BLK_MAX;
-    self->zs.total_out = 0;
-    self->bam_cur = 0;
-
-    if (self->zs.avail_in == 0) {
-FILL_BUFFER:
-        FillBuffer(self, ctx, self->fpos);
-        if (self->zs.avail_in == 0) /* EOF */
-            return true;
-    }
-    zrc = inflate(&self->zs, Z_FINISH);
-    if (zrc == Z_STREAM_END) {
-        /* inflateReset clobbers this value but we want it */
-        uLong const total_out = self->zs.total_out;
-        
-        zrc = inflateReset(&self->zs);
-        assert(zrc == Z_OK);
-        self->zs.total_out = total_out;
-        self->bpos = bpos;
-        return true;
-    }
-    if (zrc != Z_OK && zrc != Z_BUF_ERROR) {
-        INTERNAL_ABORT(xcUnexpected, "reading '%s' zrc = %i, message = '%s'",
-                       self->path, zrc, self->zs.msg);
-        return false;
-    }
-    assert(self->zs.avail_in == 0);
-    goto FILL_BUFFER;
-}
-
-static void Seek(BAM_ReadCollection *self, ctx_t ctx, uint64_t const ipos)
-{
-    uint64_t const fpos = (uint64_t)(ipos / BAM_BLK_MAX);
-    unsigned const bpos = (unsigned)(ipos % BAM_BLK_MAX);
-    
-    if (fpos < self->cpos || fpos >= self->fpos || self->zs.next_in == NULL) {
-        uint64_t const fudg = fpos % IO_BLK_SIZE;
-        
-        FillBuffer(self, ctx, fpos - fudg);
-        if ((unsigned)self->zs.avail_in < fudg)
-            return;
-        self->zs.next_in += fudg;
-        self->zs.avail_in -= fudg;
-        self->zs.total_out = 0;
-    }
-    if (self->zs.total_out <= bpos)
-        ReadZlib(self, ctx);
-
-    self->bam_cur = bpos;
-}
-
-static size_t ReadN(BAM_ReadCollection *self, ctx_t ctx, size_t const N, void *Dst)
-{
-    uint8_t *const dst = Dst;
-    size_t n = 0;
-    
-    while (n < N) {
-        size_t const avail_out = N - n;
-        size_t const avail_in = self->zs.total_out - self->bam_cur;
-
-        if (avail_in) {
-            size_t const copy = avail_out < avail_in ? avail_out : avail_in;
-            
-            memcpy(dst + n, self->bambuffer + self->bam_cur, copy);
-            self->bam_cur += copy;
-            n += copy;
-            if (n == N)
-                break;
-        }
-        if (!ReadZlib(self, ctx) || self->zs.total_out == 0)
-            break;
-    }
-    return n;
-}
-
-static uint16_t LE2UInt16(void const *src)
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
-    union {
-        uint8_t ch[2];
-        uint16_t u16;
-    } u;
-    memcpy(&u, src, 2);
-    return u.u16;
-#else
-    return ((uint16_t)((uint8_t const *)src)[0]) | (((uint16_t)((uint8_t const *)src)[1]) << 8);
-#endif
-}
-
-static uint32_t LE2UInt32(void const *src)
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
-    union {
-        uint8_t ch[4];
-        uint32_t u32;
-    } u;
-    memcpy(&u, src, 4);
-    return u.u32;
-#else
-    return (uint32_t)(LE2UInt16(src)) || (((uint32_t)(LE2UInt16(((uint8_t const *)src) + 2))) << 16);
-#endif
-}
-
-static uint64_t LE2UInt64(void const *src)
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
-    union {
-        uint8_t ch[8];
-        uint64_t u64;
-    } u;
-    memcpy(&u, src, 8);
-    return u.u64;
-#else
-    return (uint64_t)(LE2UInt32(src)) || (((uint64_t)(LE2UInt32(((uint8_t const *)src) + 4))) << 32);
-#endif
-}
-
-static int16_t LE2Int16(void const *src)
-{
-    return (int16_t)LE2UInt16(src);
-}
-
-static int32_t LE2Int32(void const *src)
-{
-    return (int32_t)LE2UInt32(src);
-}
-
-static int32_t ReadI32(BAM_ReadCollection *self, ctx_t ctx)
-{
-    int8_t ch[4];
-    size_t const n = ReadN(self, ctx, 4, ch);
-    
-    if (FAILED())
-        return 0;
-    
-    if (n == 4)
-        return LE2Int32(ch);
-    
-    if (n)
-        USER_ERROR(xcUnexpected, "reading '%s'; premature end of file", self->path);
-    
-    return 0;
-}
-
-static uint32_t ReadU32(BAM_ReadCollection *self, ctx_t ctx)
-{
-    return (uint32_t)ReadI32(self, ctx);
-}
-
-static int32_t get_refID(BAM_rec const *const rec)
-{
-    return LE2Int32(rec->data->refID);
-}
-
-static int32_t get_pos(BAM_rec const *const rec)
-{
-    return LE2Int32(rec->data->pos);
-}
-
-static uint8_t get_mq(BAM_rec const *const rec)
-{
-    return rec->data->bin_mq_nl[1];
-}
-
-static uint8_t get_nl(BAM_rec const *const rec)
-{
-    return rec->data->bin_mq_nl[0];
-}
-
-static uint16_t get_flag(BAM_rec const *const rec)
-{
-    return LE2Int16(&rec->data->flag_nc[2]);
-}
-
-static uint16_t get_nc(BAM_rec const *const rec)
-{
-    return LE2Int16(&rec->data->flag_nc[0]);
-}
-
-static int32_t get_lseq(BAM_rec const *const rec)
-{
-    return LE2Int32(rec->data->l_seq);
-}
-
-static int32_t get_next_refID(BAM_rec const *const rec)
-{
-    return LE2Int32(rec->data->next_refID);
-}
-
-static int32_t get_next_pos(BAM_rec const *const rec)
-{
-    return LE2Int32(rec->data->next_pos);
-}
-
-static int32_t get_tlen(BAM_rec const *const rec)
-{
-    return LE2Int32(rec->data->tlen);
-}
-
-static bool ReadBAMRecord(BAM_ReadCollection *const self, ctx_t ctx, BAM_rec out[1])
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcOpening);
-    memset(out, 0, sizeof(out[0]));
-    TRY(int32_t const datasize = ReadI32(self, ctx)) {
-        if (datasize < 0) {
-            USER_ABORT(xcUnexpected, "reading '%s', BAM record size < 0", self->path);
-            return false;
-        }
-        if (datasize == 0)  /* EOF */
-            return false;
-
-        out[0].pos = (self->bpos << 16) | ((uint16_t)self->bam_cur - 4);
-        if (datasize <= 32) {
-            USER_ABORT(xcUnexpected, "reading '%s', BAM record too small, only %u bytes", self->path, (unsigned)datasize);
-            return false;
-        }
-        out[0].size = datasize;
-        if (self->bam_cur + datasize <= self->zs.total_out) {
-            out[0].data = (void const *)(self->bambuffer + self->bam_cur);
-            self->bam_cur += datasize;
-            return true;
-        }
-        /* this probably never happens; it might even be an error */
-        TRY(void *const tmp = Alloc(ctx, datasize, false)) {
-            if (datasize != ReadN(self, ctx, datasize, tmp) && !FAILED()) {
-                free(tmp);
-                USER_ERROR(xcUnexpected, "reading '%s'; premature end of file", self->path);
-                return false;
-            }
-            out[0].data = out[0].allocated = tmp;
-            return true;
-        }
-    }
-    return false;
-}
-
-static void CopyCIGAR(uint32_t dst[], uint32_t const src[], unsigned const count)
-{
-    unsigned i;
-    
-    for (i = 0; i < count; ++i) {
-        uint32_t const value = LE2Int32(src + i);
-        
-        dst[i] = value;
-    }
-}
-
-static void CopySEQ(char dst[], uint8_t const src[], unsigned const count)
-{
-    static char const tr[16] = "=ACMGRSVTWYHKDBN";
-    unsigned i;
-    unsigned const n = count >> 1;
-    
-    for (i = 0; i < n; ++i) {
-        uint8_t const value = src[i];
-        uint8_t const lo = value & 0x0F;
-        uint8_t const hi = value >> 4;
-        
-        dst[2 * i + 0] = tr[hi];
-        dst[2 * i + 1] = tr[lo];
-    }
-    if (count & 1) {
-        uint8_t const value = src[n];
-        uint8_t const hi = value >> 4;
-        
-        dst[count - 1] = tr[hi];
-    }
-}
-
-static void CopyQUAL(char dst[], uint8_t const src[], unsigned const n)
-{
-    unsigned i;
-    
-    for (i = 0; i < n; ++i) {
-        int const ch = src[i] + 33;
-        
-        dst[i] = ch < 0xFF ? ch : -1;
-    }
-}
-
-BAM_Record *BAM_GetRecord(NGS_Refcount *const object, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcOpening);
-    BAM_ReadCollection *const self = (BAM_ReadCollection *)object;
-    BAM_rec raw;
-    
-    if (ReadBAMRecord(self, ctx, &raw)) {
-        BAM_Record *rslt = NULL;
-        bool self_unmapped = false;
-        bool mate_unmapped = false;
-        uint16_t const flag = get_flag(&raw);
-        uint16_t const raw_nc = get_nc(&raw);
-        int32_t const refID = get_refID(&raw);
-        int32_t const pos = get_pos(&raw);
-        int32_t const next_refID = get_next_refID(&raw);
-        int32_t const next_pos = get_next_pos(&raw);
-        
-        if ((flag & 0x0004) != 0 || 0 > refID || refID >= self->references->count || pos < 0 || raw_nc == 0)
-            self_unmapped = true;
-        if ((flag & 0x0001) == 0 || (flag & 0x0008) != 0 || 0 > next_refID || next_refID >= self->references->count || next_pos < 0)
-            mate_unmapped = true;
-        {
-            uint8_t const raw_nl = get_nl(&raw);
-            unsigned const nl = raw_nl < 2 ? 0 : raw_nl;
-            unsigned const nc = self_unmapped ? 0 : raw_nc;
-            unsigned const sl = get_lseq(&raw);
-            char const *read_name = (void const *)raw.data->readname;
-            uint32_t const *cigar = (void const *)(&read_name[nl]);
-            uint8_t const *seq    = (void const *)(&cigar[nc]);
-            uint8_t const *qual   = (void const *)(&seq[(sl + 1) >> 1]);
-            uint8_t const *extra  = (void const *)(&qual[sl]);
-            size_t const extralen = &raw.data->refID[raw.size] - extra;
-            size_t const need = (uint8_t const *)&(((BAM_Record const *)NULL)->cigar[nc]) - ((uint8_t const *)NULL) + 2 * sl + nl + extralen;
-
-            rslt = Alloc(ctx, need, false);
-            rslt->seqlen   = sl;
-            rslt->ncigar   = nc;
-            rslt->extralen = (unsigned)extralen;
-            rslt->SEQ      = (void const *)&rslt->cigar[nc];
-            rslt->QUAL     = (void const *)&rslt->SEQ[sl];
-            rslt->QNAME    = (void const *)&rslt->QUAL[sl];
-            rslt->extra    = (void const *)&rslt->QNAME[nl];
-            if (nl == 0)
-                rslt->QNAME = NULL;
-            
-            rslt->TLEN = get_tlen(&raw);
-            rslt->FLAG = flag;
-            rslt->MAPQ = get_mq(&raw);
-            if (self_unmapped) {
-                rslt->POS = 0;
-                rslt->RNAME = NULL;
-                rslt->REFID = -1;
-            }
-            else {
-                rslt->POS = pos + 1;
-                rslt->REFID = refID;
-                rslt->RNAME = self->references->ref[refID].name;
-            }
-            if (mate_unmapped) {
-                rslt->PNEXT = 0;
-                rslt->RNEXT = NULL;
-            }
-            else {
-                rslt->PNEXT = next_pos + 1;
-                rslt->RNEXT = self->references->ref[next_refID].name;
-            }
-
-            memcpy((void *)rslt->extra, extra, extralen);
-            CopySEQ((void *)rslt->SEQ, seq, sl);
-            CopyQUAL((void *)rslt->QUAL, qual, sl);
-            
-            if (nl)
-                memcpy((void *)rslt->QNAME, read_name, nl);
-
-            if (!self_unmapped)
-                CopyCIGAR((void *)rslt->cigar, cigar, nc);
-        }
-        free(raw.allocated);
-        return rslt;
-    }
-    return NULL;
-}
-
-static unsigned ComputeRefLen(size_t const count, uint32_t const cigar[])
-{
-    unsigned rslt = 0;
-    unsigned i;
-    
-    for (i = 0; i < count; ++i) {
-        uint32_t const op = cigar[i];
-        unsigned const len = op >> 4;
-        int const code = op & 0x0F;
-        
-        switch (code) {
-            case 0: /* M */
-            case 2: /* D */
-            case 3: /* N */
-            case 7: /* = */
-            case 8: /* X */
-                rslt += len;
-                break;
-        }
-    }
-    return rslt;
-}
-
-static BAM_Record *BAM_GetRecordSliced(NGS_Refcount *const object, ctx_t ctx)
-{
-    BAM_RefIndexSlice *const self = (BAM_RefIndexSlice *)object;
-    
-    if (self->chunk == NULL || self->chunks == self->cur)
-        return NULL;
-    for ( ; ; ) {
-        BAM_Record *const rec = BAM_GetRecord(&self->parent->dad.dad, ctx);
-        bool done = true;
-
-        if (rec) do {
-            if (rec->POS > 0) {
-                if (rec->REFID != self->refID)
-                    break;
-                
-                uint64_t const pos = rec->POS - 1;
-                if (pos >= self->end)
-                    break;
-
-                unsigned const reflen = ComputeRefLen(rec->ncigar, rec->cigar);
-                if (pos + reflen > self->start)
-                    return rec;
-
-                if (self->cur + 1 >= self->chunks)
-                    break;
-                
-                Seek(self->parent, ctx, self->chunk[++self->cur]);
-            }
-            done = false;
-        } while (0);
-        free(rec);
-        if (done)
-            return NULL;
-    }
-}
-
-static unsigned CountWhereLess(uint64_t const max,
-                               unsigned const N,
-                               RefIndexChunk const chunk[])
-{
-    if (max) {
-        unsigned count = 0;
-        unsigned i;
-        
-        for (i = 0; i < N; ++i) {
-            if (chunk[i].first < max)
-                ++count;
-        }
-        return count;
-    }
-    else
-        return N;
-}
-
-static unsigned CopyWhereLess(uint64_t rslt[], uint64_t const max,
-                              unsigned const N, RefIndexChunk const chunk[])
-{
-    if (max) {
-        unsigned count = 0;
-        unsigned i;
-        
-        for (i = 0; i < N; ++i) {
-            uint64_t const first = chunk[i].first;
-            
-            if (first < max) {
-                rslt[count] = first;
-                ++count;
-            }
-        }
-        return count;
-    }
-    else {
-        unsigned i;
-        
-        for (i = 0; i < N; ++i)
-            rslt[i] = chunk[i].first;
-        
-        return N;
-    }
-}
-
-static void SortPositions(unsigned const N, uint64_t array[])
-{
-#define SAVE(A) uint64_t const tmp = array[A]
-#define LOAD(A) ((void)(array[A] = tmp))
-#define COPY(DST, SRC) ((void)(array[(DST)] = array[(SRC)]))
-#define LESS(A, B) (array[A] < array[B])
-    ELEMSORT(N);
-#undef SAVE
-#undef LOAD
-#undef COPY
-#undef LESS
-}
-
-static int IndexSlice(RefIndex const *const self,
-                      uint64_t **rslt,
-                      unsigned const beg,
-                      unsigned const end)
-{
-    unsigned const first[] = { 1, 9, 73, 585, 4681 };
-    unsigned const cnt = end - 1 - beg;
-    unsigned const maxintvl = (end >> 14) + 1;
-    uint64_t const maxpos = maxintvl < self->numintv ?
-                            self->interval[maxintvl] : self->off_end;
-    unsigned int_beg[5], int_cnt[5];
-    unsigned i;
-    unsigned count = CountWhereLess(maxpos, self->bins[0].count,
-                                    &self->chunk[self->bins[0].offset]);
-    
-    for (i = 0; i < 5; ++i) {
-        unsigned const shift = 14 + 3 * (4 - i);
-        
-        int_beg[i] = (beg >> shift) + first[i];
-        int_cnt[i] = (cnt >> shift) + 1;
-    }
-    for (i = 0; i < 5; ++i) {
-        unsigned const beg = int_beg[i];
-        unsigned const N = int_cnt[i];
-        unsigned j;
-        
-        for (j = 0; j < N; ++j) {
-            RefIndexBinInfo const bin = self->bins[beg + j];
-            
-            count += CountWhereLess(maxpos, bin.count, &self->chunk[bin.offset]);
-        }
-    }
-    if (count == 0)
-        return 0;
-    else {
-        uint64_t array[count];
-        unsigned j = CopyWhereLess(array, maxpos, self->bins[0].count,
-                                   &self->chunk[self->bins[0].offset]);
-
-        for (i = 0; i < 5; ++i) {
-            unsigned const beg = int_beg[i];
-            unsigned const N = int_cnt[i];
-            unsigned ii;
-            
-            for (ii = 0; ii < N; ++ii) {
-                RefIndexBinInfo const bin = self->bins[beg + ii];
-                unsigned const copied = CopyWhereLess(&array[j], maxpos,
-                                                      bin.count,
-                                                      &self->chunk[bin.offset]);
-                
-                j += copied;
-            }
-        }
-        SortPositions(count, array);
-
-        if ((*rslt = malloc(count * sizeof(array[0]))) == NULL)
-            return -1;
-
-        memcpy(*rslt, array, count * sizeof(array[0]));
-        return count;
-    }
-}
-
-static void LoadIndex_Bins(RefIndex *const self,
-                           unsigned const N, char const data[])
-{
-    unsigned i;
-    unsigned j = 0;
-    size_t offset = 0;
-    
-    for (i = 0; i < N; ++i) {
-        uint32_t const bin    = LE2UInt32(data + offset + 0);
-        int32_t  const n_chunk = LE2Int32(data + offset + 4);
-        
-        if (bin == MAX_BIN && n_chunk == 2) {
-            uint64_t const off_beg    = LE2UInt64(data + offset +  8);
-            uint64_t const off_end    = LE2UInt64(data + offset + 16);
-            uint64_t const n_mapped   = LE2UInt64(data + offset + 24);
-            uint64_t const n_unmapped = LE2UInt64(data + offset + 32);
-            
-            self->off_beg    = off_beg;
-            self->off_end    = off_end;
-            self->n_mapped   = n_mapped;
-            self->n_unmapped = n_unmapped;
-        }
-        else if (bin < MAX_BIN) {
-            unsigned ii;
-            
-            self->bins[bin].count = n_chunk;
-            self->bins[bin].offset = j;
-            for (ii = 0; ii < n_chunk; ++ii) {
-                uint64_t const beg = LE2UInt64(data + offset + 16 * ii +  8);
-             /* uint64_t const end = LE2UInt64(data + offset + 16 * ii + 16); */
-                
-                self->chunk[j + ii].first = beg;
-             /* self->chunk[j + ii].last  = end; */
-            }
-            j += n_chunk;
-        }
-        offset += 8 + 16 * n_chunk;
-    }
-    self->numchnk = j;
-}
-
-static void LoadIndex_Intervals(RefIndex *const self,
-                                unsigned const N, char const data[])
-{
-    uint64_t last = 0;
-    unsigned i;
-    
-    for (i = 0; i < N; ++i) {
-        uint64_t const intvl = LE2UInt64(data + 8 * i);
-        
-        self->interval[i] = intvl == last ? 0 : intvl;
-        last = intvl;
-    }
-    while (i > 0 && self->interval[i - 1] == 0)
-        --i;
-    self->numintv = i;
-}
-
-static size_t LoadIndex_3(HeaderRefInfo *const self, char const data[],
-                          void const *const endp)
-{
-    if ((void const *)(data + 4) < endp) {
-        int32_t const n_bin = LE2Int32(data);
-        unsigned chunks = 0;
-        size_t offset = 4;
-        unsigned i;
-        
-        if (n_bin < 0)
-            return 0;
-        
-        for (i = 0; i < n_bin; ++i) {
-            if ((void const *)(data + offset + 8) < endp) {
-                int32_t const n_chunk = LE2Int32(data + offset + 4);
-                
-                if (n_chunk < 0)
-                    return 0;
-                
-                chunks += n_chunk;
-                offset += 8 + 16 * n_chunk;
-                continue;
-            }
-            return 0;
-        }
-        if ((void const *)(data + offset + 4) < endp) {
-            int32_t const n_intv = LE2Int32(data + offset);
-            
-            if ((void const *)(data + offset + 4 + n_intv * 8) <= endp) {
-                self->index = calloc(1, ((uint8_t const *)&((RefIndex const *)NULL)->chunk[chunks])-((uint8_t const *)NULL));
-                if (self->index) {
-                    LoadIndex_Bins(self->index, n_bin, data + 4);
-                    LoadIndex_Intervals(self->index, n_intv, data + offset + 4);
-
-                    return offset + 4 + n_intv * 8;
-                }
-            }
-        }
-    }
-    return 0;
-}
-
-static void LoadIndex_2(BAM_ReadCollection *const self, ctx_t ctx,
-                        size_t const datasize, char const data[])
-{
-    void const *const endp = data + datasize;
-    
-    if (datasize >= 8 && memcmp(data, "BAI\1", 4) == 0) {
-        int32_t const n_ref = LE2Int32(data + 4);
-        
-        if (n_ref == self->references->count) {
-            size_t offset = 8;
-            unsigned i;
-            
-            for (i = 0; i < n_ref; ++i) {
-                size_t const size = LoadIndex_3(&self->references->ref[i], data + offset, endp);
-                
-                if (size == 0)
-                    goto BAD;
-                
-                offset += size;
-            }
-        }
-    }
-    return;
-    
-BAD:
-    {
-        unsigned i;
-    
-        for (i = 0; i < self->references->count; ++i) {
-            free(self->references->ref[i].index);
-            self->references->ref[i].index = NULL;
-        }
-    }
-}
-
-static rc_t OpenIndex(KFile const **const rslt, char const basename[])
-{
-    KDirectory *dir;
-    rc_t rc = KDirectoryNativeDir(&dir);
-    
-    if (rc == 0) {
-        rc = KDirectoryOpenFileRead(dir, rslt, "%s.bai", basename);
-        KDirectoryRelease(dir);
-    }
-    return rc;
-}
-
-static void LoadIndex(BAM_ReadCollection *const self, ctx_t ctx)
-{
-    KFile const *fp;
-    rc_t rc = OpenIndex(&fp, self->path);
-    
-    if (rc == 0) {
-        uint64_t fsize;
-        size_t nread;
-        char *data;
-        
-        rc = KFileSize(fp, &fsize);
-        data = malloc(fsize);
-        if (data) {
-            rc = KFileReadAll(fp, 0, data, fsize, &nread);
-            if (rc == 0 && nread == fsize) {
-                LoadIndex_2(self, ctx, fsize, data);
-            }
-            free(data);
-        }
-        KFileRelease(fp);
-    }
-}
-
-static void BAM_ReferenceInfoWhack(BAM_ReferenceInfo *const self)
-{
-    unsigned i;
-
-    for (i = 0; i < self->count; ++i) {
-        free(self->ref[i].name);
-        free(self->ref[i].index);
-    }
-}
-
-static void LoadHeaderRefs(BAM_ReadCollection *const self, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcOpening);
-    unsigned i;
-    unsigned const nrefs = self->references->count;
-    HeaderRefInfo *const ref = &self->references->ref[0];
-    
-    for (i = 0; i < nrefs; ++i) {
-        TRY(uint32_t const namelen = ReadU32(self, ctx)) {
-            if (namelen > INT32_MAX) {
-                USER_ERROR(xcUnexpected, "reading '%s', reference name length < 0", self->path);
-                break;
-            }
-            ref[i].ordinal = i;
-            ON_FAIL(ref[i].name = Alloc(ctx, namelen, false)) break;
-            ON_FAIL(ReadN(self, ctx, namelen, ref[i].name)) break;
-            ON_FAIL(ref[i].length = ReadU32(self, ctx)) break;
-        }
-        else
-            break;
-    }
-    if (FAILED()) {
-        BAM_ReferenceInfoWhack(self->references);
-    }
-}
-
-static void ReadHeaderRefs(BAM_ReadCollection *const self, ctx_t ctx, char text[], unsigned const lines, unsigned const ends[])
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcOpening);
-    TRY(uint32_t const nrefs = ReadU32(self, ctx)) {
-        if (nrefs > INT32_MAX) {
-            USER_ERROR(xcUnexpected, "reading '%s', reference count < 0", self->path);
-            return;
-        }
-        TRY(self->references = Alloc(ctx, ((uint8_t const *)&(((BAM_ReferenceInfo const *)NULL)->ref[nrefs]))-((uint8_t const *)NULL), true)) {
-            self->references->count = nrefs;
-            TRY(LoadHeaderRefs(self, ctx)) {
-                return;
-            }
-            free(self->references);
-            self->references = NULL;
-        }
-    }
-}
-
-static char *ReadHeaderText(BAM_ReadCollection *const self, ctx_t ctx, size_t *const length)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcOpening);
-    TRY(uint32_t const textlen = ReadU32(self, ctx)) {
-        if (textlen > INT32_MAX) {
-            USER_ERROR(xcUnexpected, "reading '%s', header length < 0", self->path);
-        }
-        else if (textlen > 0) {
-            TRY(char *const text = Alloc(ctx, textlen, false)) {
-                if (textlen == ReadN(self, ctx, textlen, text) && !FAILED()) {
-                    *length = textlen;
-                    return text;
-                }
-                free(text);
-            }
-        }
-    }
-    *length = 0;
-    return NULL;
-}
-
-static bool HeaderCheckSignature(BAM_ReadCollection *const self, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcOpening);
-    static char const sig[4] = "BAM\1";
-    char act[4];
-    
-    if (ReadN(self, ctx, 4, act) == 4)
-        return memcmp(sig, act, 4) == 0;
-    return false;
-}
-
-static void ReadHeader(BAM_ReadCollection *self, ctx_t ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcOpening);
-
-    if (HeaderCheckSignature(self, ctx)) {
-        size_t textlen;
-        TRY(char *const text = ReadHeaderText(self, ctx, &textlen)) {
-            self->headerText = text;
-            ReadHeaderRefs(self, ctx, NULL, 0, NULL);
-        }
-    }
-    else {
-        USER_ERROR(xcUnexpected, "reading '%s', invalid BAM signature", self->path);
-    }
-}
-
-static KDirectory *GetCWD(ctx_t ctx)
-{
-    KDirectory *dir;
-    rc_t const rc = KDirectoryNativeDir(&dir);
-    if (rc) {
-        INTERNAL_ABORT(xcUnexpected, "KDirectoryNativeDir failed rc = %R", rc);
-        return NULL;
-    }
-    return dir;
-}
-
-static KFile const *OpenRead(ctx_t ctx, char const path[])
-{
-    KFile const *fp = NULL;
-    TRY(KDirectory *const dir = GetCWD(ctx))
-    {
-        rc_t const rc = KDirectoryOpenFileRead(dir, &fp, path);
-        
-        KDirectoryRelease(dir);
-        if (rc) {
-            USER_ERROR(xcUnexpected, "'%s' failed to open for read rc = %R", path, rc);
-            return NULL;
-        }
-    }
-    return fp;
-}
-
-static void *AllocIOBuffer(ctx_t ctx)
-{
-    return Alloc(ctx, IO_BLK_SIZE, false);
-}
-
-static char *DuplicatePath(ctx_t ctx, char const path[], size_t const n)
-{
-    TRY(void *const rslt = Alloc(ctx, n + 1, false)) {
-        memcpy(rslt, path, n + 1);
-        return rslt;
-    }
-    return NULL;
-}
-
-static size_t LastPathElement(size_t const length, char const path[/* length */])
-{
-    size_t i = length;
-    
-    while (i) {
-        size_t const j = i - 1;
-        int const ch = path[j];
-        
-        if (ch == '/')
-            return i;
-
-        i = j;
-    }
-    return 0;
-}
-
-static void InflateInit(BAM_ReadCollection *const self, ctx_t ctx)
-{
-    int const zrc = inflateInit2(&self->zs, MAX_WBITS + 16);
-    
-    switch (zrc) {
-    case Z_OK:
-        break;
-    case Z_MEM_ERROR:
-        SYSTEM_ABORT(xcNoMemory, "allocating decompressor");
-        break;
-    default:
-        INTERNAL_ABORT(xcUnexpected, "allocating decompressor zlib rc = %i", zrc);
-        break;
-    }
-}
-
-static
-BAM_ReadCollection *BAM_ReadCollectionInit(BAM_ReadCollection *const self, ctx_t ctx, char const path[])
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcOpening);
-    size_t const namelen = strlen(path);
-    
-    TRY(char *const pathcopy = DuplicatePath(ctx, path, namelen)) {
-        size_t const namestart = LastPathElement(namelen, pathcopy);
-        
-        self->path = pathcopy;
-        self->namelen = (unsigned)(namelen - namestart);
-        self->namestart = (unsigned)namestart;
-        
-        TRY(self->fp = OpenRead(ctx, path)) {
-            TRY(self->iobuffer = AllocIOBuffer(ctx)) {
-                TRY(InflateInit(self, ctx)) {
-                    TRY(ReadHeader(self, ctx)) {
-                        LoadIndex(self, ctx);
-                    }
-                }
-            }
-        }
-    }
-    return self;
-}
-
-NGS_ReadCollection * NGS_ReadCollectionMakeBAM(ctx_t ctx, char const path[])
-{
-    FUNC_ENTRY(ctx, rcSRA, rcFile, rcOpening);
-    void *self = malloc(sizeof(BAM_ReadCollection));
-    if (self) {
-        static NGS_ReadCollection_vt const vt =
-        {
-            /* NGS_Refcount */
-            { BAM_ReadCollectionWhack },
-            
-            /* NGS_ReadCollection */
-            BAM_ReadCollectionName,
-            BAM_ReadCollectionReadGroups,
-            BAM_ReadCollectionReadGroup,
-            BAM_ReadCollectionReferences,
-            BAM_ReadCollectionReference,
-            BAM_ReadCollectionAlignments,
-            BAM_ReadCollectionAlignment,
-            BAM_ReadCollectionAlignmentCount,
-            BAM_ReadCollectionAlignmentRange,
-            BAM_ReadCollectionReads,
-            BAM_ReadCollectionRead,
-            BAM_ReadCollectionReadCount,
-            BAM_ReadCollectionReadRange,
-        };
-        NGS_ReadCollection *const super = &((BAM_ReadCollection *)self)->dad;
-
-        memset(self, 0, sizeof(BAM_ReadCollection));
-        TRY(NGS_ReadCollectionInit(ctx, super, &vt, "BAM_ReadCollection", path)) {
-            TRY(BAM_ReadCollectionInit(self, ctx, path)) {
-                return super;
-            }
-        }
-        free(self);
-    }
-    else {
-        SYSTEM_ABORT(xcNoMemory, "allocating BAM_ReadCollection ( '%s' )", path);
-    }
-    return NULL;
-}
diff --git a/libs/ngs/BAM_Record.c b/libs/ngs/BAM_Record.c
deleted file mode 100644
index d6c4eb0..0000000
--- a/libs/ngs/BAM_Record.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* ===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-#include <klib/rc.h>
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <stddef.h>
-#include <assert.h>
-#include <string.h>
-
-#include <sysalloc.h>
-
-#include "NGS_ReadGroup.h"
-#include "NGS_Reference.h"
-#include "NGS_Alignment.h"
-#include "NGS_Read.h"
-#include "NGS_String.h"
-
-#include "BAM_Record.h"
-
-static int GetSize(int const type)
-{
-    switch (type) {
-        case 'A':
-        case 'C':
-        case 'c':
-            return 1;
-        case 'S':
-        case 's':
-            return 2;
-        case 'F':
-        case 'I':
-        case 'i':
-            return 4;
-        default:
-            return -1;
-    }
-}
-
-static void NextArrayField(BAM_Record_Extra_Field *const rslt)
-{
-    if (rslt->fieldsize >= 8) {
-        char const *const value = rslt->value->string;
-        int const size  = GetSize(value[0]);
-        
-        if (size > 0) {
-            rslt->val_type  = value[0];
-            rslt->elemcount = (value[1] + (value[2] << 8) + (value[3] << 16) + (value[4] << 24));
-            rslt->value = (void const *)(value + 5);
-            rslt->fieldsize = size * rslt->elemcount;
-        }
-        else
-            rslt->fieldsize = -1;
-        return;
-    }
-    rslt->value = NULL;
-}
-
-static void NextStringField(BAM_Record_Extra_Field *const rslt)
-{
-    unsigned const max = rslt->fieldsize - 3;
-    for (rslt->elemcount = 0; rslt->elemcount < max; ++rslt->elemcount) {
-        if (rslt->value->string[rslt->elemcount] == '\0') {
-            rslt->fieldsize = rslt->elemcount + 1;
-            return;
-        }
-    }
-    rslt->value = NULL;
-}
-
-static void NextField(BAM_Record_Extra_Field *const rslt)
-{
-    if (rslt->fieldsize >= 4) {
-        if (rslt->val_type == 'B')
-            NextArrayField(rslt);
-        else if (rslt->val_type == 'Z' || rslt->val_type == 'H')
-            NextStringField(rslt);
-        else
-            rslt->fieldsize = GetSize(rslt->val_type);
-        return;
-    }
-    rslt->value = NULL;
-}
-
-unsigned BAM_Record_ForEachExtra(BAM_Record const *const self, ctx_t ctx,
-                                 BAM_Record_ForEachExtra_cb const cb,
-                                 void *const usr_ctx)
-{
-    FUNC_ENTRY(ctx, rcSRA, rcRow, rcReading);
-    char const *extra = (char const *)self->extra;
-    char const *const endp = extra + self->extralen;
-    unsigned cnt = 0;
-    
-    while (extra < endp) {
-        BAM_Record_Extra_Field fld = {
-            extra,
-            (void const *)(extra + 3),
-            1,
-            (int)(endp - extra),
-            extra[2]
-        };
-        
-        NextField(&fld);
-        if (fld.fieldsize <= 0) {
-            USER_WARNING(xcUnexpected, "unexpected type code '%c'", fld.val_type);
-            break;
-        }
-        extra = fld.tag + fld.fieldsize;
-        if (fld.value == NULL || extra > endp) {
-            USER_WARNING(xcUnexpected, "record is truncated");
-            break;
-        }
-        if (!cb(usr_ctx, ctx, cnt++, &fld))
-            break;
-    }
-    return cnt;
-}
diff --git a/libs/ngs/BAM_Record.h b/libs/ngs/BAM_Record.h
deleted file mode 100644
index 6b809d8..0000000
--- a/libs/ngs/BAM_Record.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* ===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- */
-
-struct BAM_ReadCollection;
-
-typedef struct BAM_Record BAM_Record;
-struct BAM_Record {
-    uint8_t const *extra;
-    char const *QNAME;
-    char const *RNAME;
-    char const *RNEXT;
-    char const *SEQ;
-    char const *QUAL;
-
-    uint32_t POS;
-    uint32_t PNEXT;
-
-    int32_t TLEN;
-    int32_t REFID;
-
-    uint32_t seqlen;
-    uint32_t ncigar;
-    uint32_t extralen;
-
-    uint16_t FLAG;
-    uint8_t MAPQ;
-    uint8_t padd;
-
-    uint32_t cigar[1];
-};
-
-typedef struct BAM_Record_Extra_Field BAM_Record_Extra_Field;
-struct BAM_Record_Extra_Field {
-    char const *tag;
-    union {
-        uint8_t   u8[4]; /* for val_type == 'C' */
-        uint16_t u16[2]; /* for val_type == 'S' */
-        uint32_t u32[1]; /* for val_type == 'I' */
-        int8_t    i8[4]; /* for val_type == 'c' */
-        int16_t  i16[2]; /* for val_type == 's' */
-        int32_t  i32[1]; /* for val_type == 'i' */
-        float    f32[1]; /* for val_type == 'f' */
-        char  string[1]; /* for val_type == 'A', 'Z', or 'H'
-                          * for 'Z' and 'H' elemcount is strlen 
-                          * but the value is still null terminated */
-    } const *value;      /* all multi-byte values are little-endian,
-                          * byte swap as needed */
-    int elemcount;
-    int fieldsize;
-    char val_type;
-};
-
-typedef bool (*BAM_Record_ForEachExtra_cb)( void *usr_ctx, ctx_t ctx,
-                                            unsigned ordinal,
-                                            BAM_Record_Extra_Field const *fld );
-
-unsigned BAM_Record_ForEachExtra(BAM_Record const *self, ctx_t ctx,
-                                 BAM_Record_ForEachExtra_cb, void *usr_ctx);
-
-BAM_Record *BAM_GetRecord(struct NGS_Refcount *const self, ctx_t ctx);
diff --git a/libs/ngs/CSRA1_Alignment.c b/libs/ngs/CSRA1_Alignment.c
deleted file mode 100644
index 92c3b9a..0000000
--- a/libs/ngs/CSRA1_Alignment.c
+++ /dev/null
@@ -1,1430 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "CSRA1_Alignment.h"
-
-typedef struct CSRA1_Alignment CSRA1_Alignment;
-#define NGS_ALIGNMENT CSRA1_Alignment
-
-#include "NGS_Alignment.h"
-#include "NGS_ReadCollection.h"
-#include "NGS_Refcount.h"
-#include "NGS_Read.h"
-
-#include "NGS_Id.h"
-#include "NGS_String.h"
-#include "NGS_Cursor.h"
-
-#include "CSRA1_ReadCollection.h"
-
-#include <sysalloc.h>
-
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-
-#include <klib/printf.h>
-#include <klib/rc.h>
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <limits.h>
-
-#ifndef min
-#   define min(a,b) ( (a) < (b) ? (a) : (b) )
-#endif
-
-/*--------------------------------------------------------------------------
- * CSRA1_Alignment
- */
-
-/* align_col_specs must be kept in sync with enum AlignmentTableColumns */
-static const char * align_col_specs [] =
-{
-    "(I32)MAPQ",
-    "(INSDC:SRA:read_filter)READ_FILTER",
-    "(ascii)CIGAR_LONG",
-    "(ascii)CIGAR_SHORT",
-    "(ascii)CLIPPED_CIGAR_LONG",
-    "(ascii)CLIPPED_CIGAR_SHORT",
-    "(INSDC:quality:phred)CLIPPED_QUALITY",
-    "(INSDC:dna:text)CLIPPED_READ",
-    "(INSDC:coord:len)LEFT_SOFT_CLIP",
-    "(INSDC:coord:len)RIGHT_SOFT_CLIP",
-    "(INSDC:quality:phred)QUALITY",
-    "(INSDC:dna:text)RAW_READ",
-    "(INSDC:dna:text)READ",
-    "(I64)REF_ID",
-    "(INSDC:coord:len)REF_LEN",
-    "(ascii)REF_SEQ_ID",	/* was REF_NAME changed March 23 2015 */
-    "(bool)REF_ORIENTATION",
-    "(INSDC:coord:zero)REF_POS",
-    "(INSDC:dna:text)REF_READ",
-    "(INSDC:coord:one)SEQ_READ_ID",
-    "(I64)SEQ_SPOT_ID",
-    "(ascii)SPOT_GROUP",
-    "(I32)TEMPLATE_LEN",
-    "(ascii)RNA_ORIENTATION",
-    "(I64)MATE_ALIGN_ID",
-    "(ascii)MATE_REF_SEQ_ID",
-    "(ascii)MATE_REF_NAME", /* to be used if MATE_REF_SEQ_ID is absent */
-    "(bool)MATE_REF_ORIENTATION",
-    "(bool)HAS_REF_OFFSET",
-    "(I32)REF_OFFSET"
-};
-/* Made changes to align_col_specs? - Make the same in enum AlignmentTableColumns! */
-
-/* enum AlignmentTableColumns must be kept in sync with align_col_specs */
-enum AlignmentTableColumns
-{
-    align_MAPQ,
-    align_READ_FILTER,
-    align_CIGAR_LONG,
-    align_CIGAR_SHORT,
-    align_CLIPPED_CIGAR_LONG,
-    align_CLIPPED_CIGAR_SHORT,
-    align_CLIPPED_QUALITY,
-    align_CLIPPED_READ,
-    align_LEFT_SOFT_CLIP,
-    align_RIGHT_SOFT_CLIP,
-    align_QUALITY,
-    align_RAW_READ,
-    align_READ,
-    align_REF_ID,
-    align_REF_LEN,
-    align_REF_SEQ_ID,
-    align_REF_ORIENTATION,
-    align_REF_POS,
-    align_REF_READ,
-    align_SEQ_READ_ID,
-    align_SEQ_SPOT_ID,
-    align_SPOT_GROUP,
-    align_TEMPLATE_LEN,
-    align_RNA_ORIENTATION,
-    align_MATE_ALIGN_ID,
-    align_MATE_REF_SEQ_ID,
-    align_MATE_REF_NAME,
-    align_MATE_REF_ORIENTATION,
-    align_HAS_REF_OFFSET,
-    align_REF_OFFSET,
-
-    align_NUM_COLS
-};
-/* Made changes to enum AlignmentTableColumns? - Make the same in align_col_specs! */
-
-
-struct NGS_Cursor const* CSRA1_AlignmentMakeDb ( ctx_t ctx,
-                                                 struct VDatabase const* db,
-                                                 struct NGS_String const* run_name,
-                                                 char const* table_name )
-{
-    return NGS_CursorMakeDb ( ctx, db, run_name, table_name, align_col_specs, align_NUM_COLS );
-}
-
-struct CSRA1_Alignment
-{
-    NGS_Refcount dad;
-    struct CSRA1_ReadCollection * coll;
-    const NGS_String * run_name;
-
-    int64_t cur_row;
-    int64_t row_max;
-
-    const NGS_Cursor * primary_curs;
-    const NGS_Cursor * secondary_curs;
-    NGS_String * col_data [ align_NUM_COLS ];
-
-	uint64_t id_offset;
-
-    bool seen_first;
-	bool in_primary;
-
-    /* for use in slices */
-	int64_t secondary_start;
-	int64_t secondary_max;
-
-    /* data to be accessed via CellData */
-    void const* cell_data [ align_NUM_COLS ];
-    uint32_t cell_len [ align_NUM_COLS ];
-};
-
-static void const* CSRA1_AlignmentGetCellData ( CSRA1_Alignment * self,
-                                                ctx_t ctx,
-                                                uint32_t col_idx
-                                                )
-{
-    if ( self -> cell_data [ col_idx ] == NULL )
-    {
-        assert ( self -> cell_len [ col_idx ] == 0 );
-
-        if ( ! self -> seen_first )
-        {
-            USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-            return NULL;
-        }
-
-        NGS_CursorCellDataDirect ( self -> in_primary ? self->primary_curs : self->secondary_curs,
-            ctx,
-            self->cur_row,
-            col_idx,
-            NULL,
-            & self -> cell_data [ col_idx ],
-            NULL,
-            & self -> cell_len [ col_idx ]
-        );
-
-        if ( FAILED() )
-        {
-            self -> cell_data [ col_idx ] = NULL;
-            self -> cell_len [ col_idx ] = 0;
-        }
-    }
-
-    return self -> cell_data [ col_idx ];
-}
-
-#define GetCursor( self ) ( self -> in_primary ? self -> primary_curs : self -> secondary_curs )
-
-/* Whack
- */
-static
-void CSRA1_AlignmentWhack ( CSRA1_Alignment * self, ctx_t ctx )
-{
-    uint32_t i;
-    for ( i = 0; i < align_NUM_COLS; ++ i )
-    {
-        NGS_StringRelease ( self -> col_data [ i ], ctx );
-        self -> col_data [ i ] = NULL;
-    }
-
-    NGS_CursorRelease ( self -> primary_curs, ctx );
-    NGS_CursorRelease ( self -> secondary_curs, ctx );
-
-    NGS_StringRelease ( self -> run_name, ctx );
-    CSRA1_ReadCollectionRelease ( self -> coll, ctx );
-}
-
-static
-void CSRA1_AlignmentInitRegion ( CSRA1_Alignment * self,
-                                 ctx_t ctx,
-                                 const NGS_Cursor * primary,
-                                 const NGS_Cursor * secondary,
-                                 int64_t start,
-                                 uint64_t count )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-/*printf("CSRA1_AlignmentInitRegion(primary=%p, secondary=%p, start=%ld, count=%lu, offset=%lu)\n",
-        (void*)primary, (void*)secondary, start, count, self -> id_offset);    */
-
-    /* split the requested region across primary/secondary table, adjust the boundaries as necessary */
-    if ( ! FAILED () )
-    {
-        if ( primary != NULL )
-        {
-            int64_t primary_start;
-            uint64_t primary_count;
-            TRY ( NGS_CursorGetRowRange ( primary, ctx, & primary_start, & primary_count ) )
-            {
-                uint64_t table_end;
-
-                if ( start < primary_start )
-                {
-                    count -= ( primary_start - start );
-                    start = primary_start;
-                }
-
-                table_end = primary_start + primary_count;
-
-                if ( start < (int64_t)table_end )
-                {
-                    self -> cur_row = start;
-                    self -> row_max = min ( table_end, (uint64_t)start + min ( count, primary_count ) );
-
-                    if ( self -> row_max == table_end )
-                    {   /* a part of the range is in the secondary; reduce the count by the number or records from primary */
-                        count -= (uint64_t) ( (int64_t)self -> row_max - self -> cur_row );
-                        start = 1; /* this will be the starting rowId in the secondary */
-                    }
-                }
-                else
-                {   /* the entire range is beyond the primary cursor;
-                       set up so that the first call to Next() will go into the secondary cursor */
-                    self -> cur_row = self -> row_max = table_end;
-                    start -= self -> id_offset; /* this will be the starting rowId in the secondary */
-                    self -> in_primary = false;
-                }
-            }
-        }
-        else
-        {   /* primary not requested */
-            if ( start <= (int64_t)self -> id_offset )
-            {   /* range overlaps the primary ID space; adjust the range to exclude primary */
-                count -= ( self -> id_offset - start + 1 );
-                start = 1;
-            }
-            else
-            {
-                start -= self -> id_offset; /* this will be the starting rowId in the secondary */
-            }
-            /* make sure the first call to Next() will switch to the secondary cursor */
-            self -> cur_row = self -> row_max = self -> id_offset + 1;
-            self -> in_primary = false;
-        }
-
-        if ( ! FAILED () && secondary != NULL )
-        {
-            int64_t  secondary_start;
-            uint64_t secondary_count;
-            TRY ( NGS_CursorGetRowRange ( secondary, ctx, & secondary_start, & secondary_count ) )
-            {
-                uint64_t table_end;
-                if ( start < secondary_start )
-                {
-                    count -= ( secondary_start - start );
-                    start = secondary_start;
-                }
-
-                table_end = secondary_start + secondary_count;
-
-                if ( start < (int64_t)table_end )
-                {
-                    self -> secondary_start = start;
-                    self -> secondary_max = min ( table_end, (uint64_t)start + min ( count, secondary_count ) );
-                }
-                else
-                {
-                    self -> secondary_start = self -> secondary_max = table_end;
-                }
-            }
-            if ( ! self -> in_primary )
-            {
-                self -> cur_row = self -> secondary_start;
-                self -> row_max = self -> secondary_max;
-            }
-        }
-/*    printf("cur_row=%ld, row_max=%lu, secondary_start=%ld, secondary_max=%lu)\n",
-            self->cur_row, self->row_max, self -> secondary_start, self -> secondary_max);    */
-    }
-}
-
-NGS_String * CSRA1_AlignmentGetAlignmentId( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return NULL;
-    }
-
-    /* if current row is valid, read data */
-    if ( self -> cur_row < self -> row_max )
-    {
-        if ( self -> in_primary )
-        {
-            return NGS_IdMake ( ctx, self -> run_name, NGSObject_PrimaryAlignment, self -> cur_row );
-        }
-        else
-        {
-            return NGS_IdMake ( ctx, self -> run_name, NGSObject_SecondaryAlignment, self -> cur_row + self -> id_offset );
-        }
-    }
-
-    USER_ERROR ( xcCursorExhausted, "No more rows available" );
-    return NULL;
-}
-
-struct NGS_String* CSRA1_AlignmentGetReferenceSpec( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return NULL;
-    }
-
-    return NGS_CursorGetString ( GetCursor ( self ), ctx, self -> cur_row, align_REF_SEQ_ID );
-}
-
-int CSRA1_AlignmentGetMappingQuality( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return 0;
-    }
-    return NGS_CursorGetInt32 ( GetCursor ( self ), ctx, self -> cur_row, align_MAPQ );
-}
-
-INSDC_read_filter CSRA1_AlignmentGetReadFilter( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return 0;
-    }
-    assert ( sizeof ( INSDC_read_filter ) == sizeof ( char ) );
-    return ( uint8_t ) NGS_CursorGetChar ( GetCursor ( self ), ctx, self -> cur_row, align_READ_FILTER );
-}
-
-struct NGS_String* CSRA1_AlignmentGetReferenceBases( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return NULL;
-    }
-    return NGS_CursorGetString ( GetCursor ( self ), ctx, self -> cur_row, align_REF_READ );
-}
-
-struct NGS_String* CSRA1_AlignmentGetReadGroup( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return NULL;
-    }
-    else
-    {
-        TRY ( NGS_String* ret = NGS_CursorGetString ( GetCursor ( self ), ctx, self -> cur_row, align_SPOT_GROUP ) )
-        {
-            return ret;
-        }
-        CATCH_ALL ()
-        {
-            CLEAR();
-        }
-        return NGS_StringMake ( ctx, "", 0 );
-    }
-}
-
-NGS_String * CSRA1_AlignmentGetReadId( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return 0;
-    }
-
-    {
-        TRY ( int64_t readId = NGS_CursorGetInt64 ( GetCursor ( self ), ctx, self -> cur_row, align_SEQ_SPOT_ID ) )
-        {
-            return NGS_IdMake ( ctx, self -> run_name, NGSObject_Read, readId );
-        }
-    }
-    return NULL;
-}
-
-struct NGS_String* CSRA1_AlignmentGetClippedFragmentBases( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return NULL;
-    }
-
-    return NGS_CursorGetString ( GetCursor ( self ), ctx, self -> cur_row, align_CLIPPED_READ );
-}
-
-struct NGS_String* CSRA1_AlignmentGetClippedFragmentQualities( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return NULL;
-    }
-
-    {
-        NGS_String* phred = NGS_CursorGetString ( GetCursor ( self ), ctx, self -> cur_row, align_CLIPPED_QUALITY );
-        /* convert to ascii-33 */
-        size_t size = NGS_StringSize ( phred, ctx );
-        char * copy = malloc ( size + 1 );
-        if ( copy == NULL )
-        {
-            SYSTEM_ERROR ( xcNoMemory,
-                           "allocating %u bytes for %s row %ld",
-                           size + 1, "CLIPPED_QUALITY", self -> cur_row );
-            NGS_StringRelease ( phred, ctx );
-            return NULL;
-        }
-        else
-        {
-            NGS_String* ret;
-            const char* orig = NGS_StringData ( phred, ctx );
-            size_t i;
-            for ( i = 0; i < size ; ++ i )
-                copy [ i ] = ( char ) ( (uint8_t)(orig [ i ]) + 33 );
-            copy [ i ] = 0;
-
-            ret = NGS_StringMakeOwned ( ctx, copy, size );
-            if ( FAILED () )
-                free ( copy );
-            NGS_StringRelease ( phred, ctx );
-            return ret;
-        }
-    }
-}
-
-struct NGS_String* CSRA1_AlignmentGetAlignedFragmentBases( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return NULL;
-    }
-
-    return NGS_CursorGetString ( GetCursor ( self ), ctx, self -> cur_row, align_READ );
-}
-
-bool CSRA1_AlignmentIsPrimary( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return false;
-    }
-
-    return self -> in_primary;
-}
-
-int64_t CSRA1_AlignmentGetAlignmentPosition( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return 0;
-    }
-
-    return NGS_CursorGetInt32 ( GetCursor ( self ), ctx, self -> cur_row, align_REF_POS);
-}
-
-uint64_t CSRA1_AlignmentGetReferencePositionProjectionRange( CSRA1_Alignment* self, ctx_t ctx, int64_t ref_pos )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    uint64_t ret;
-    bool const* HAS_REF_OFFSET;
-    int32_t const* REF_OFFSET;
-
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return (uint64_t)-1;
-    }
-
-    REF_OFFSET = CSRA1_AlignmentGetCellData ( self, ctx, align_REF_OFFSET );
-    /* Check for error, REF_OFFSET == NULL? if (  ) */
-
-    /* if there is no indels just calculate projection as (ref_pos - REF_POS) with len = 1 */
-    if ( self -> cell_len [ align_REF_OFFSET ] == 0 )
-    {
-        int32_t align_len = NGS_CursorGetInt32 ( GetCursor ( self ), ctx, self -> cur_row, align_REF_LEN);
-        ret = ref_pos - NGS_CursorGetInt32 ( GetCursor ( self ), ctx, self -> cur_row, align_REF_POS);
-
-        if ( FAILED() )
-        {
-            SYSTEM_ERROR ( xcIteratorUninitialized, "Failed to access REF_LEN or REF_POS" );
-            return (uint64_t)-1;
-        }
-        else if ( ret >= align_len )
-        {
-            /* calculated projection is out of bounds, i.e. ref_pos
-               doesn't project on the alignment
-               (it also catches ref_pos < align_REF_POS case)
-            */
-            ret = (uint64_t)-1;
-        }
-        else
-        {
-            /* ref_pos has a projection on the current alignment -
-               pack it and make its length = 1
-            */
-            ret <<= 32;
-            ret |= 1;
-        }
-    }
-    else /* we have indels */
-    {
-        int32_t read_len;
-        int32_t idx_ref, idx_HAS_REF_OFFSET = 0, idx_REF_OFFSET = 0;
-        int32_t align_pos;
-        uint32_t proj_len;
-
-        HAS_REF_OFFSET = CSRA1_AlignmentGetCellData ( self, ctx, align_HAS_REF_OFFSET );
-        /* Check for error, HAS_REF_OFFSET == NULL? if (  ) */
-
-        if ( HAS_REF_OFFSET == NULL )
-        {
-            SYSTEM_ERROR ( xcIteratorUninitialized, "Failed to access HAS_REF_OFFSET" );
-            return (uint64_t)-1;
-        }
-
-        read_len = self -> cell_len [ align_HAS_REF_OFFSET ];
-        idx_ref = NGS_CursorGetInt32 ( GetCursor ( self ), ctx, self -> cur_row, align_REF_POS);
-
-        if ( FAILED () )
-        {
-            SYSTEM_ERROR ( xcIteratorUninitialized, "Failed to access REF_POS" );
-            return (uint64_t)-1;
-        }
-
-        if ( idx_ref > ref_pos )
-        {
-            /* the alignment starts beyond given ref_pos
-                out of bounds
-            */
-            ret = (uint64_t)-1;
-        }
-        else
-        {
-            for ( align_pos = 0, proj_len = 1; idx_ref < ref_pos && align_pos < read_len ; align_pos += proj_len )
-            {
-                bool has_ref_offset = HAS_REF_OFFSET [ idx_HAS_REF_OFFSET++ ];
-                if ( has_ref_offset == 0) /* match/mismatch */
-                {
-                    ++idx_ref;
-                    proj_len = 1;
-                }
-                else /* indel */
-                {
-                    int32_t ref_offset = REF_OFFSET [ idx_REF_OFFSET++ ];
-
-                    if ( ref_offset < 0 )
-                    {
-                        /* insertion */
-                        proj_len = (uint32_t)-ref_offset;
-                        ++idx_ref;
-                    }
-                    else
-                    {
-                        /* deletion */
-                        assert ( ref_offset > 0 );
-
-                        idx_ref += ref_offset;
-                        proj_len = 0;
-                    }
-                }
-            }
-
-            /* in the case we exited from the loop at the insertion, align_pos points beyond
-               the insertion - it should be restored to point to the beginning of the insertion
-            */
-            if ( proj_len > 1 )
-                align_pos -= proj_len;
-
-            if ( align_pos >= read_len )
-            {
-                align_pos = -1;
-                proj_len = 0;
-            }
-
-            ret = ((uint64_t)align_pos << 32) | proj_len;
-        }
-    }
-
-    return ret;
-}
-
-uint64_t CSRA1_AlignmentGetAlignmentLength( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return 0;
-    }
-
-    return NGS_CursorGetInt32 ( GetCursor ( self ), ctx, self -> cur_row, align_REF_LEN);
-}
-
-bool CSRA1_AlignmentGetIsReversedOrientation( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return false;
-    }
-
-    return NGS_CursorGetBool ( GetCursor ( self ), ctx, self -> cur_row, align_REF_ORIENTATION);
-}
-
-int CSRA1_AlignmentGetSoftClip( CSRA1_Alignment* self, ctx_t ctx, bool left )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return 0;
-    }
-
-    return NGS_CursorGetInt32 ( GetCursor ( self ), ctx, self -> cur_row, left ? align_LEFT_SOFT_CLIP : align_RIGHT_SOFT_CLIP );
-}
-
-uint64_t CSRA1_AlignmentGetTemplateLength( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return 0;
-    }
-
-    return NGS_CursorGetInt32 ( GetCursor ( self ), ctx, self -> cur_row, align_TEMPLATE_LEN);
-}
-
-struct NGS_String* CSRA1_AlignmentGetShortCigar( CSRA1_Alignment* self, ctx_t ctx, bool clipped )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return NULL;
-    }
-
-    return NGS_CursorGetString ( GetCursor ( self ), ctx, self -> cur_row, clipped ? align_CLIPPED_CIGAR_SHORT: align_CIGAR_SHORT );
-}
-
-struct NGS_String* CSRA1_AlignmentGetLongCigar( CSRA1_Alignment* self, ctx_t ctx, bool clipped )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return NULL;
-    }
-
-    return NGS_CursorGetString ( GetCursor ( self ), ctx, self -> cur_row, clipped ? align_CLIPPED_CIGAR_LONG : align_CIGAR_LONG );
-}
-
-char CSRA1_AlignmentGetRNAOrientation( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-    }
-    else
-    {
-        TRY ( char ret = NGS_CursorGetChar ( GetCursor ( self ), ctx, self -> cur_row, align_RNA_ORIENTATION ) )
-        {
-            return ret;
-        }
-        CATCH_ALL ()
-        {
-            CLEAR();
-        }
-    }
-    return '?';
-}
-
-bool CSRA1_AlignmentHasMate( CSRA1_Alignment* self, ctx_t ctx )
-{
-    int64_t mate_id;
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_WARNING ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return false;
-    }
-
-    TRY ( mate_id = NGS_CursorGetInt64 ( GetCursor ( self ), ctx, self -> cur_row, align_MATE_ALIGN_ID ) )
-    {
-        int64_t mate_seq_spot_id;
-
-        if ( self -> in_primary )
-            return true;
-
-        TRY ( mate_seq_spot_id = NGS_CursorGetInt64 ( self -> secondary_curs, ctx, self -> cur_row, align_SEQ_SPOT_ID ) )
-        {
-            if ( mate_seq_spot_id > 0 )
-                return true;
-        }
-    }
-
-    CLEAR();
-
-    return false;
-}
-
-NGS_String * CSRA1_AlignmentGetMateAlignmentId( CSRA1_Alignment* self, ctx_t ctx )
-{
-    int64_t mateId;
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return 0;
-    }
-
-    TRY ( mateId = NGS_CursorGetInt64 ( GetCursor ( self ), ctx, self -> cur_row, align_MATE_ALIGN_ID ) )
-    {
-        if ( ! self -> in_primary )
-        {
-            TRY ( int64_t mate_seq_spot_id = NGS_CursorGetInt64 ( self -> secondary_curs, ctx, mateId, align_SEQ_SPOT_ID ) )
-            {
-                if ( mate_seq_spot_id <= 0 )
-                {
-                    INTERNAL_ERROR ( xcSecondaryAlignmentMissingPrimary,
-                                     "secondary mate alignment id ( %li ) missing primary within %.*s",
-                                     mateId + self -> id_offset,
-                                     NGS_StringSize ( self -> run_name, ctx ),
-                                     NGS_StringData ( self -> run_name, ctx ) );
-                }
-            }
-        }
-
-        if ( ! FAILED () )
-        {
-            return NGS_IdMake ( ctx,
-                                self -> run_name,
-                                self -> in_primary ? NGSObject_PrimaryAlignment : NGSObject_SecondaryAlignment,
-                                self -> in_primary ? mateId : mateId + self -> id_offset );
-        }
-    }
-    return NULL;
-}
-
-struct NGS_String* CSRA1_AlignmentGetMateReferenceSpec( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return NULL;
-    }
-
-    {
-        NGS_String* ret;
-        TRY ( ret = NGS_CursorGetString ( GetCursor ( self ), ctx, self -> cur_row, align_MATE_REF_SEQ_ID) )
-        {
-            return ret;
-        }
-        if ( (int)GetRCObject ( ctx -> rc ) == rcColumn && GetRCState ( ctx -> rc ) == rcNotFound )
-        {
-            CLEAR ();
-            return NGS_CursorGetString ( GetCursor ( self ), ctx, self -> cur_row, align_MATE_REF_NAME );
-        }
-    }
-    return NULL;
-}
-
-bool CSRA1_AlignmentGetMateIsReversedOrientation( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return false;
-    }
-
-    return NGS_CursorGetBool ( GetCursor ( self ), ctx, self -> cur_row, align_MATE_REF_ORIENTATION);
-}
-
-/*--------------------------------------------------------------------------
- * NGS_AlignmentIterator
- */
-static
-bool CSRA1_AlignmentIteratorNext ( CSRA1_Alignment* self, ctx_t ctx )
-{
-    assert ( self != NULL );
-
-    if ( !self -> seen_first )
-    {
-        self -> seen_first = true;
-    }
-    else
-    {
-        ++ self -> cur_row;
-    }
-
-    for ( ; self -> cur_row < self -> row_max; ++ self -> cur_row )
-    {
-        int64_t seq_spot_id;
-
-        if ( self -> in_primary )
-            return true;
-
-        TRY ( seq_spot_id = NGS_CursorGetInt64 ( self -> secondary_curs, ctx, self -> cur_row, align_SEQ_SPOT_ID ) )
-        {
-            if ( seq_spot_id > 0 )
-                return true;
-        }
-
-        CLEAR ();
-    }
-
-    /* see if we need to switch over to the next cursor */
-    if ( self -> in_primary && self -> secondary_curs != NULL )
-    {
-        self -> in_primary = false;
-
-        self -> cur_row = self -> secondary_start;
-        self -> row_max = self -> secondary_max;
-
-        // let's re-run "next" again to check SEQ_SPOT_ID
-        self -> seen_first = false;
-        return CSRA1_AlignmentIteratorNext ( self, ctx );
-    }
-
-    return false;
-}
-
-static CSRA1_Alignment* CSRA1_AlignmentGetMateAlignment( CSRA1_Alignment* self, ctx_t ctx );
-
-static
-NGS_String* CSRA1_FragmentGetId ( CSRA1_Alignment * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self != NULL );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return NULL;
-    }
-
-    {
-        TRY ( int32_t fragId = NGS_CursorGetInt32 ( GetCursor ( self ), ctx, self -> cur_row, align_SEQ_READ_ID ) )
-        {
-            return NGS_IdMakeFragment ( ctx, self -> run_name, true, self -> cur_row, fragId - 1 );
-        }
-    }
-    return NULL;
-}
-
-static
-struct NGS_String * CSRA1_FragmentGetSequence ( CSRA1_Alignment * self, ctx_t ctx, uint64_t offset, uint64_t length )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    NGS_String * seq;
-
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return NULL;
-    }
-
-    TRY ( seq = NGS_CursorGetString ( GetCursor ( self ), ctx, self -> cur_row, align_RAW_READ ) )
-    {
-        TRY ( NGS_String * sub = NGS_StringSubstrOffsetSize ( seq, ctx, offset, length ) )
-        {
-            NGS_StringRelease ( seq, ctx );
-            seq = sub;
-        }
-    }
-
-    return seq;
-}
-
-static
-struct NGS_String * CSRA1_FragmentGetQualities ( CSRA1_Alignment * self, ctx_t ctx, uint64_t offset, uint64_t length )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    NGS_String * ret = NULL;
-
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-    }
-    else
-    {
-        const void * base;
-        uint32_t elem_bits, boff, row_len;
-        TRY ( NGS_CursorCellDataDirect ( GetCursor ( self ), ctx, self -> cur_row, align_QUALITY, & elem_bits, & base, & boff, & row_len ) )
-        {
-            assert ( elem_bits == 8 );
-            assert ( boff == 0 );
-
-            if ( offset > row_len )
-            {
-                length = 0;
-            }
-            else if ( offset + length > row_len )
-            {
-                length = row_len - offset;
-            }
-
-            {   /* convert to ascii-33 */
-                char * copy = malloc ( length + 1 );
-                if ( copy == NULL )
-                    SYSTEM_ERROR ( xcNoMemory, "allocating %u bytes for QUALITY row %ld", row_len + 1, self -> cur_row );
-                else
-                {
-                    uint32_t i;
-                    const uint8_t * orig = base;
-                    for ( i = 0; i < length; ++ i )
-                    {
-                        copy [ i ] = ( char ) ( orig [ offset + i ] + 33 );
-                    }
-                    copy [ length ] = 0;
-
-                    ret = NGS_StringMakeOwned ( ctx, copy, length );
-                    if ( FAILED () )
-                    {
-                        free ( copy );
-                    }
-                }
-            }
-        }
-    }
-
-    return ret;
-}
-
-static
-bool CSRA1_FragmentIsPaired ( CSRA1_Alignment * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    int64_t id;
-    int32_t idx;
-    bool ret = false;
-
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return false;
-    }
-
-    TRY ( id = NGS_CursorGetInt64 ( GetCursor ( self ), ctx, self -> cur_row, align_MATE_ALIGN_ID ) )
-    {
-    }
-    CATCH_ALL ()
-    {
-        /* if we failed, it means that MATE_ALIGN_ID column is empty, so lets assign it to 0 and move forward */
-        CLEAR();
-        id = 0;
-    }
-
-    /* if MATE_ALIGN_ID != 0, it's paired */
-    if ( id != 0 )
-        return true;
-
-    TRY ( idx = NGS_CursorGetInt32 ( GetCursor ( self ), ctx, self -> cur_row, align_SEQ_READ_ID ) )
-    {
-        /* if SEQ_READ_ID > 1, it's paired. */
-        if ( idx > 1 )
-            return true;
-
-        TRY ( id = NGS_CursorGetInt64 ( GetCursor ( self ), ctx, self -> cur_row, align_SEQ_SPOT_ID ) )
-        {
-            NGS_String * readId;
-
-            /* otherwise, have to get spot id and consult SEQUENCE table */
-            TRY ( readId = NGS_IdMake ( ctx, self -> run_name, NGSObject_Read, id ) )
-            {
-                const char * readIdStr = NGS_StringData ( readId, ctx );
-                TRY ( NGS_Read * read = NGS_ReadCollectionGetRead ( ( NGS_ReadCollection * ) self -> coll, ctx, readIdStr ) )
-                {
-                    uint32_t numFragments = NGS_ReadNumFragments(read, ctx);
-                    ret = numFragments > 1;
-
-                    NGS_ReadRelease ( read, ctx );
-                }
-
-                NGS_StringRelease ( readId, ctx );
-            }
-        }
-    }
-
-    return ret;
-}
-
-static
-bool CSRA1_FragmentIsAligned ( CSRA1_Alignment * self, ctx_t ctx )
-{
-    assert ( self != NULL );
-    return true;
-}
-
-static
-bool CSRA1_FragmentNext ( CSRA1_Alignment * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Alignment accessed before a call to AlignmentIteratorNext()" );
-        return false;
-    }
-
-    UNIMPLEMENTED(); /* CSRA1_FragmentNext; should not be called - Alignment is not a FragmentIterator */
-
-    return false;
-}
-
-
-static NGS_Alignment_vt CSRA1_Alignment_vt_inst =
-{
-    {
-        {
-            /* NGS_Refcount */
-            CSRA1_AlignmentWhack
-        },
-
-        /* NGS_Fragment */
-        CSRA1_FragmentGetId,
-        CSRA1_FragmentGetSequence,
-        CSRA1_FragmentGetQualities,
-        CSRA1_FragmentIsPaired,
-        CSRA1_FragmentIsAligned,
-        CSRA1_FragmentNext
-    },
-
-    CSRA1_AlignmentGetAlignmentId,
-    CSRA1_AlignmentGetReferenceSpec,
-    CSRA1_AlignmentGetMappingQuality,
-    CSRA1_AlignmentGetReadFilter,
-    CSRA1_AlignmentGetReferenceBases,
-    CSRA1_AlignmentGetReadGroup,
-    CSRA1_AlignmentGetReadId,
-    CSRA1_AlignmentGetClippedFragmentBases,
-    CSRA1_AlignmentGetClippedFragmentQualities,
-    CSRA1_AlignmentGetAlignedFragmentBases,
-    CSRA1_AlignmentIsPrimary,
-    CSRA1_AlignmentGetAlignmentPosition,
-    CSRA1_AlignmentGetReferencePositionProjectionRange,
-    CSRA1_AlignmentGetAlignmentLength,
-    CSRA1_AlignmentGetIsReversedOrientation,
-    CSRA1_AlignmentGetSoftClip,
-    CSRA1_AlignmentGetTemplateLength,
-    CSRA1_AlignmentGetShortCigar,
-    CSRA1_AlignmentGetLongCigar,
-    CSRA1_AlignmentGetRNAOrientation,
-    CSRA1_AlignmentHasMate,
-    CSRA1_AlignmentGetMateAlignmentId,
-    CSRA1_AlignmentGetMateAlignment,
-    CSRA1_AlignmentGetMateReferenceSpec,
-    CSRA1_AlignmentGetMateIsReversedOrientation,
-
-    /* Iterator */
-    CSRA1_AlignmentIteratorNext
-};
-
-/* Init
- */
-static
-void CSRA1_AlignmentInit ( NGS_ALIGNMENT* ref,
-                           ctx_t ctx,
-                           struct CSRA1_ReadCollection * coll,
-                           const char *clsname,
-                           const char *instname,
-                           const char * run_name, size_t run_name_size,
-                           bool exclusive,
-                           bool primary,
-                           bool secondary,
-                           uint64_t id_offset )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    if ( ref == NULL )
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    else
-    {
-        TRY ( NGS_AlignmentInit ( ctx, ref, & CSRA1_Alignment_vt_inst, clsname, instname ) )
-        {
-            if ( primary  )
-            {
-                ON_FAIL ( ref -> primary_curs = CSRA1_ReadCollectionMakeAlignmentCursor ( coll,
-                                                                                          ctx,
-                                                                                          true,
-                                                                                          exclusive ) )
-                    return;
-                ref -> in_primary   = true;
-            }
-
-            if ( secondary )
-            {
-                ON_FAIL ( ref -> secondary_curs = CSRA1_ReadCollectionMakeAlignmentCursor ( coll,
-                                                                                            ctx,
-                                                                                            false,
-                                                                                            exclusive ) )
-                    CLEAR(); /* missing SECONDARY_ALIGNMENTS table is OK */
-            }
-
-            ref -> id_offset = id_offset;
-
-            ON_FAIL ( ref -> coll = CSRA1_ReadCollectionDuplicate ( coll, ctx ) )
-                return;
-            ON_FAIL ( ref -> run_name = NGS_StringMakeCopy ( ctx, run_name, run_name_size ) )
-                return;
-        }
-    }
-}
-
-
-static
-void SetRowId ( CSRA1_Alignment* self, ctx_t ctx, int64_t rowId, bool primary )
-{   /* validate the requested rowId */
-    if ( rowId <= 0 )
-    {
-        INTERNAL_ERROR ( xcCursorAccessFailed,
-                         "rowId ( %li ) out of range for %.*s",
-                         rowId,
-                         NGS_StringSize ( self -> run_name, ctx ),
-                         NGS_StringData ( self -> run_name, ctx ) );
-    }
-    else
-    {
-        int64_t id = rowId;
-        int64_t  start = 0;
-        uint64_t count = 0;
-
-        if ( primary )
-        {
-            if ( self -> primary_curs != NULL )
-                ON_FAIL ( NGS_CursorGetRowRange ( self -> primary_curs, ctx, & start, & count ) )
-                    return;
-        }
-        else if ( self -> secondary_curs != NULL )
-        {
-            ON_FAIL ( NGS_CursorGetRowRange ( self -> secondary_curs, ctx, & start, & count ) )
-                return;
-            id -= self -> id_offset;
-        }
-
-        if ( (uint64_t)id >= start + count )
-        {
-            INTERNAL_ERROR ( xcCursorAccessFailed,
-                             "rowId ( %li ) out of range for %.*s",
-                             rowId,
-                             NGS_StringSize ( self -> run_name, ctx ),
-                             NGS_StringData ( self -> run_name, ctx ) );
-        }
-        else
-        {
-            if ( ! primary && self -> secondary_curs != NULL )
-            {
-                TRY ( int64_t spot_id = NGS_CursorGetInt64 ( self -> secondary_curs, ctx, id, align_SEQ_SPOT_ID ) )
-                {
-                    if ( spot_id <= 0 )
-                    {
-                        INTERNAL_ERROR ( xcSecondaryAlignmentMissingPrimary,
-                                         "secondary alignment id ( %li ) missing primary within %.*s",
-                                         rowId,
-                                         NGS_StringSize ( self -> run_name, ctx ),
-                                         NGS_StringData ( self -> run_name, ctx ) );
-                    }
-                }
-            }
-
-            if ( ! FAILED () )
-            {
-                self -> cur_row = id;
-                self -> row_max = id + 1;
-            }
-        }
-    }
-}
-
-/* Make
- *  makes a common alignment from VCursor
- */
-NGS_Alignment * CSRA1_AlignmentMake ( ctx_t ctx,
-                                        struct CSRA1_ReadCollection * coll,
-                                        int64_t alignId,
-                                        char const* run_name, size_t run_name_size,
-                                        bool primary,
-                                        uint64_t id_offset )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    CSRA1_Alignment * ref;
-
-    ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory,
-                       "allocating CSRA1_Alignment(%lu) on '%.*s'",
-                       alignId,
-                       run_name_size,
-                       run_name );
-    else
-    {
-#if _DEBUGGING
-        char instname [ 256 ];
-        string_printf ( instname,
-                        sizeof instname,
-                        NULL,
-                        "%.*s(%lu)",
-                        run_name_size,
-                        run_name,
-                        alignId );
-        instname [ sizeof instname - 1 ] = 0;
-#else
-        const char *instname = "";
-#endif
-        TRY ( CSRA1_AlignmentInit ( ref, ctx, coll, "CSRA1_Alignment", instname, run_name, run_name_size, false, primary, ! primary, id_offset ) )
-        {
-            TRY ( SetRowId( ref, ctx, alignId, primary ) )
-            {
-                ref -> seen_first = true;
-                return ( NGS_Alignment * ) ref;
-            }
-            CSRA1_AlignmentWhack ( ref, ctx );
-        }
-        free ( ref );
-    }
-
-    return NULL;
-}
-
-CSRA1_Alignment* CSRA1_AlignmentGetMateAlignment( CSRA1_Alignment* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    TRY ( int64_t mate_row = NGS_CursorGetInt64 ( GetCursor ( self ), ctx, self -> cur_row, align_MATE_ALIGN_ID ) )
-    {
-        if ( ! self -> in_primary )
-        {
-            mate_row += self -> id_offset;
-        }
-
-        {
-            TRY ( NGS_String * mate_id = NGS_IdMake( ctx,
-                                                     self -> run_name,
-                                                     self -> in_primary ? NGSObject_PrimaryAlignment : NGSObject_SecondaryAlignment,
-                                                     mate_row ) )
-            {
-                CSRA1_Alignment* ret = (CSRA1_Alignment*)
-                    NGS_ReadCollectionGetAlignment ( CSRA1_ReadCollectionToNGS_ReadCollection ( self -> coll, ctx ),
-                                                     ctx,
-                                                     NGS_StringData ( mate_id, ctx ) );
-                NGS_StringRelease (mate_id, ctx );
-                return ret;
-            }
-        }
-    }
-    return NULL;
-}
-
-NGS_Alignment * CSRA1_AlignmentIteratorMake ( ctx_t ctx,
-                                              struct CSRA1_ReadCollection * coll,
-                                              bool primary,
-                                              bool secondary,
-                                              const NGS_String * run_name,
-                                              uint64_t id_offset )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    CSRA1_Alignment * ref;
-
-    ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory,
-                       "allocating NGS_AlignmentIterator on '%.*s'",
-                       NGS_StringSize ( run_name, ctx ),
-                       NGS_StringData ( run_name, ctx ) );
-    else
-    {
-#if _DEBUGGING
-        char instname [ 256 ];
-        string_printf ( instname,
-                        sizeof instname,
-                        NULL,
-                        "%.*s",
-                        NGS_StringSize ( run_name, ctx ),
-                        NGS_StringData ( run_name, ctx ) );
-        instname [ sizeof instname - 1 ] = 0;
-#else
-        const char *instname = "";
-#endif
-        TRY ( CSRA1_AlignmentInit ( ref, ctx, coll, "NGS_AlignmentIterator", instname, NGS_StringData (run_name, ctx), NGS_StringSize (run_name, ctx), true, primary, secondary, id_offset ) )
-        {
-            TRY ( CSRA1_AlignmentInitRegion ( ref, ctx, ref -> primary_curs, ref -> secondary_curs, 0, ULLONG_MAX ) )
-            {
-                return ( NGS_Alignment * ) ref;
-            }
-            CSRA1_AlignmentWhack ( ref, ctx );
-        }
-
-        free ( ref );
-    }
-
-    return NULL;
-}
-
-NGS_Alignment * CSRA1_AlignmentRangeMake ( ctx_t ctx,
-                                           struct CSRA1_ReadCollection * coll,
-                                           bool primary,
-                                           bool secondary,
-                                           const NGS_String * run_name,
-                                           uint64_t id_offset,
-                                           int64_t first,
-                                           uint64_t count)
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    CSRA1_Alignment * ref;
-
-    ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory,
-                       "allocating NGS_AlignmentRange on '%.*s'",
-                       NGS_StringSize ( run_name, ctx ),
-                       NGS_StringData ( run_name, ctx ) );
-    else
-    {
-#if _DEBUGGING
-        char instname [ 256 ];
-        string_printf ( instname,
-                        sizeof instname,
-                        NULL,
-                        "%.*s",
-                        NGS_StringSize ( run_name, ctx ),
-                        NGS_StringData ( run_name, ctx ) );
-        instname [ sizeof instname - 1 ] = 0;
-#else
-        const char *instname = "";
-#endif
-        TRY ( CSRA1_AlignmentInit ( ref, ctx, coll, "NGS_AlignmentRange", instname, NGS_StringData( run_name, ctx ), NGS_StringSize( run_name, ctx ), true, primary, secondary, id_offset ) )
-        {
-            TRY ( CSRA1_AlignmentInitRegion ( ref, ctx, ref -> primary_curs, ref -> secondary_curs, first, count ) )
-            {
-                return ( NGS_Alignment * ) ref;
-            }
-            CSRA1_AlignmentWhack ( ref, ctx );
-        }
-
-        free ( ref );
-    }
-
-    return NULL;
-}
-
diff --git a/libs/ngs/CSRA1_Alignment.h b/libs/ngs/CSRA1_Alignment.h
deleted file mode 100644
index bd0846b..0000000
--- a/libs/ngs/CSRA1_Alignment.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_csra1_alignment_
-#define _h_csra1_alignment_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-
-struct VCursor;
-struct VDatabase;
-struct NGS_String;
-struct NGS_Cursor;
-struct NGS_Alignment;
-struct CSRA1_ReadCollection;
-
-struct NGS_Cursor const* CSRA1_AlignmentMakeDb( ctx_t ctx,
-                                                struct VDatabase const* db,
-                                                struct NGS_String const* run_name,
-                                                char const* table_name );
-
-struct NGS_Alignment * CSRA1_AlignmentMake ( ctx_t ctx, 
-                                             struct CSRA1_ReadCollection * coll,
-                                             int64_t alignId, 
-                                             char const* run_name, size_t run_name_size,
-                                             bool primary, 
-                                             uint64_t id_offset );
-
-struct NGS_Alignment * CSRA1_AlignmentIteratorMake( ctx_t ctx, 
-                                                    struct CSRA1_ReadCollection * coll,
-                                                    bool primary, 
-                                                    bool secondary, 
-                                                    const struct NGS_String  * run_name, 
-                                                    uint64_t id_offset );
-
-struct NGS_Alignment * CSRA1_AlignmentRangeMake( ctx_t ctx, 
-                                                 struct CSRA1_ReadCollection * coll,
-                                                 bool primary, 
-                                                 bool secondary, 
-                                                 const struct NGS_String  * run_name, 
-                                                 uint64_t id_offset,
-                                                 int64_t first,
-                                                 uint64_t count);
-
-struct NGS_Alignment * CSRA1_AlignmentIteratorMakeEmpty( ctx_t ctx );
-                                                 
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_csra1_alignment_ */
diff --git a/libs/ngs/CSRA1_Pileup.c b/libs/ngs/CSRA1_Pileup.c
deleted file mode 100644
index f1cf19e..0000000
--- a/libs/ngs/CSRA1_Pileup.c
+++ /dev/null
@@ -1,1921 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-struct CSRA1_Pileup;
-#define NGS_PILEUP struct CSRA1_Pileup
-
-#include "CSRA1_Pileup.h"
-#include "CSRA1_PileupEvent.h"
-#include "NGS_Reference.h"
-#include "NGS_Cursor.h"
-#include "NGS_String.h"
-
-#include <vdb/blob.h>
-#include <vdb/cursor.h>
-#include <klib/refcount.h>
-#include <klib/vector.h>
-#include <klib/sort.h>
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-#include <insdc/insdc.h>
-
-#include <klib/rc.h>
-
-#if UNIX
-#include <sys/resource.h>
-#endif
-
-/* to turn off blob caching entirely, set to 0 */
-#define CACHED_BLOB_LIMIT ( 1 << 30 )
-
-/* The READ_AHEAD_LIMIT sets the total number of alignment ids to gather
-   at one time from the REFERENCE table indices. This is given as a constant,
-   although in the code it is passed as a parameter. We may want to make it
-   dependent upon detecting whether alignments are sorted. */
-#define READ_AHEAD_LIMIT 10000
-
-/* Heuristic quantity for gathering maximum projected alignment length */
-#define MIN_ALIGN_OBSERVE 100
-
-#if _DEBUGGING
-
-#define IGNORE_OVERLAP_REF_POS 0
-#define IGNORE_OVERLAP_REF_LEN 0
-#define IGNORE_SYSTEM_RLIMIT   0
-
-#include <stdio.h>
-static bool printing;
-void enable_pileup_printing ( void ) { printing = true; }
-#define PRINT( fmt, ... ) if ( printing ) fprintf ( stderr, fmt, __VA_ARGS__ )
-
-#else
-#define PRINT( fmt, ... ) ( ( void ) 0 )
-#endif
-
-
-/*--------------------------------------------------------------------------
- * CSRA1_Pileup_Entry
- */
-
-static
-void CC CSRA1_Pileup_EntryWhack ( DLNode * node, void * param )
-{
-    uint32_t i;
-    ctx_t ctx = ( ctx_t ) param;
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcDestroying );
-
-    CSRA1_Pileup_Entry * self = ( CSRA1_Pileup_Entry * ) node;
-
-    /* tear down stuff here */
-    for ( i = 0; i < sizeof self -> blob / sizeof self -> blob [ 0 ]; ++ i )
-    {
-        const VBlob * blob = self -> blob [ i ];
-        if ( blob != NULL )
-            VBlobRelease ( blob );
-    }
-
-    free ( self );
-}
-
-static
-CSRA1_Pileup_Entry * CSRA1_Pileup_EntryMake ( ctx_t ctx, int64_t row_id,
-    int64_t ref_zstart, uint64_t ref_len, bool secondary )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    CSRA1_Pileup_Entry * obj = calloc ( 1, sizeof * obj );
-    if ( obj == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating CSRA1_Pileup_Entry" );
-    else
-    {
-        obj -> row_id = row_id;
-        obj -> zstart = ref_zstart;
-        obj -> xend = ref_zstart + ref_len;
-        obj -> secondary = secondary;
-
-        obj -> status = pileup_entry_status_INITIAL;
-    }
-
-    return obj;
-}
-
-static
-int CSRA1_Pileup_EntryCmp ( const CSRA1_Pileup_Entry * a, const CSRA1_Pileup_Entry * b )
-{
-    if ( a -> zstart < b -> zstart )
-        return -1;
-    if ( a -> zstart > b -> zstart )
-        return 1;
-    if ( a -> xend > b -> xend )
-        return -1;
-    if ( a -> xend < b -> xend )
-        return 1;
-    if ( a -> secondary != b -> secondary )
-        return a -> secondary - b -> secondary;
-    if ( a -> row_id < b -> row_id )
-        return -1;
-    return a -> row_id > b -> row_id;
-}
-
-static
-void CSRA1_Pileup_EntrySort ( CSRA1_Pileup_Entry ** base, size_t count )
-{
-#define SWAP( a, b, off, size )                                                \
-    do                                                                         \
-    {                                                                          \
-        CSRA1_Pileup_Entry * tmp = * ( CSRA1_Pileup_Entry ** ) ( a );          \
-        * ( CSRA1_Pileup_Entry ** ) ( a ) = * ( CSRA1_Pileup_Entry ** ) ( b ); \
-        * ( CSRA1_Pileup_Entry ** ) ( b ) = tmp;                               \
-    }                                                                          \
-    while ( 0 )
-
-#define CMP( a, b )                                                                                 \
-    CSRA1_Pileup_EntryCmp ( * ( CSRA1_Pileup_Entry ** ) ( a ), * ( CSRA1_Pileup_Entry ** ) ( b ) )
-
-    KSORT ( base, count, sizeof * base, 0, sizeof * base );
-
-#undef SWAP
-#undef CMP
-}
-
-/*--------------------------------------------------------------------------
- * CSRA1_Pileup_AlignList
- */
-
-static
-void CSRA1_Pileup_AlignListWhack ( CSRA1_Pileup_AlignList * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcDestroying );
-    DLListWhack ( & self -> pileup, CSRA1_Pileup_EntryWhack, ( void* ) ctx );
-    DLListWhack ( & self -> waiting, CSRA1_Pileup_EntryWhack, ( void* ) ctx );
-    self -> depth = self -> avail = 0;
-}
-
-static
-void CSRA1_PileupAlignListSort ( CSRA1_Pileup_AlignList * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    if ( self -> avail > 1 )
-    {
-        CSRA1_Pileup_Entry ** a = malloc ( self -> avail * sizeof * a );
-        if ( a == NULL )
-            SYSTEM_ERROR ( xcNoMemory, "allocating CSRA1_Pileup_Entry" );
-        else
-        {
-            CSRA1_Pileup_Entry * e = ( CSRA1_Pileup_Entry * )
-                DLListHead ( & self -> waiting );
-
-            uint32_t i, count = self -> avail;
-            for ( i = 0; i < count; ++ i )
-            {
-                a [ i ] = e;
-                e = ( CSRA1_Pileup_Entry * ) DLNodeNext ( & e -> node );
-            }
-
-            CSRA1_Pileup_EntrySort ( a, count );
-
-            DLListInit ( & self -> waiting );
-            for ( i = 0; i < count; ++ i )
-            {
-                e = a [ i ];
-                DLListPushTail ( & self -> waiting, & e -> node );
-            }
-
-            free ( a );
-        }
-    }
-}
-
-static
-void CSRA1_PileupAlignListMerge ( CSRA1_Pileup_AlignList * self, DLList * pa_waiting, uint32_t pa_avail )
-{
-    DLList sa_waiting = self -> waiting;
-    CSRA1_Pileup_Entry * pe = ( CSRA1_Pileup_Entry * ) DLListHead ( pa_waiting );
-    CSRA1_Pileup_Entry * se = ( CSRA1_Pileup_Entry * ) DLListHead ( & sa_waiting );
-
-    DLListInit ( & self -> waiting );
-
-    while ( pe != NULL && se != NULL )
-    {
-        if ( CSRA1_Pileup_EntryCmp ( pe, se ) < 0 )
-        {
-            DLListUnlink ( pa_waiting, & pe -> node );
-            DLListPushTail ( & self -> waiting, & pe -> node );
-            pe = ( CSRA1_Pileup_Entry * ) DLListHead ( pa_waiting );
-        }
-        else
-        {
-            DLListUnlink ( & sa_waiting, & se -> node );
-            DLListPushTail ( & self -> waiting, & se -> node );
-            se = ( CSRA1_Pileup_Entry * ) DLListHead ( & sa_waiting );
-        }
-    }
-
-    DLListAppendList ( & self -> waiting, pa_waiting );
-    DLListAppendList ( & self -> waiting, & sa_waiting );
-
-    self -> avail += pa_avail;
-}
-
-
-/*--------------------------------------------------------------------------
- * CSRA1_Pileup_RefCursorData
- */
-
-static
-void CSRA1_Pileup_RefCursorDataWhack ( CSRA1_Pileup_RefCursorData * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    assert ( self != NULL );
-    KVectorRelease ( self -> pa_ids );
-    KVectorRelease ( self -> sa_ids );
-
-    NGS_CursorRelease ( self -> curs, ctx );
-}
-
-static
-void CSRA1_Pileup_RefCursorDataInit ( ctx_t ctx, CSRA1_Pileup_RefCursorData * obj,
-    const NGS_Cursor * curs, int64_t reference_start_id )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcDestroying );
-
-    assert ( obj != NULL );
-    assert ( curs != NULL );    
-
-    TRY ( obj -> curs = NGS_CursorDuplicate ( curs, ctx ) )
-    {
-        obj -> max_seq_len = NGS_CursorGetUInt32 ( curs, ctx, reference_start_id, reference_MAX_SEQ_LEN );
-    }
-}
-
-
-/*--------------------------------------------------------------------------
- * CSRA1_Pileup_AlignCursorData
- */
-
-static
-void CSRA1_Pileup_AlignCursorDataWhack ( CSRA1_Pileup_AlignCursorData * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcDestroying );
-
-    uint32_t i;
-    for ( i = 0; i < sizeof self -> blob / sizeof self -> blob [ 0 ]; ++ i )
-        VBlobRelease ( self -> blob [ i ] );
-
-    VCursorRelease ( self -> curs );
-}
-
-static
-void CSRA1_Pileup_AlignCursorDataGetCell ( CSRA1_Pileup_AlignCursorData * self, ctx_t ctx,
-    int64_t row_id, uint32_t col_idx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    rc_t rc;
-    uint32_t elem_bits, boff;
-
-    if ( self -> blob [ col_idx ] != NULL )
-    {
-        rc = VBlobCellData ( self -> blob [ col_idx ], row_id, & elem_bits,
-            & self -> cell_data [ col_idx ], & boff, & self -> cell_len [ col_idx ] );
-        if ( rc == 0 )
-            return;
-
-        VBlobRelease ( self -> blob [ col_idx ] );
-        self -> blob [ col_idx ] = NULL;
-    }
-
-    self -> cell_data [ col_idx ] = NULL;
-
-    rc = VCursorGetBlobDirect ( self -> curs, & self -> blob [ col_idx ], row_id, self -> col_idx [ col_idx ] );
-    if ( rc != 0 )
-        INTERNAL_ERROR ( xcStorageExhausted, "VCursorGetBlobDirect rc = %R", rc );
-    else
-    {
-        rc = VBlobCellData ( self -> blob [ col_idx ], row_id, & elem_bits,
-            & self -> cell_data [ col_idx ], & boff, & self -> cell_len [ col_idx ] );
-        if ( rc != 0 )
-            INTERNAL_ERROR ( xcStorageExhausted, "VBlobCellData rc = %R", rc );
-    }
-}
-
-static
-void CSRA1_Pileup_AlignCursorDataGetNonEmptyCell ( CSRA1_Pileup_AlignCursorData * self, ctx_t ctx,
-    int64_t row_id, uint32_t col_idx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    TRY ( CSRA1_Pileup_AlignCursorDataGetCell ( self, ctx, row_id, col_idx ) )
-    {
-        if ( self -> cell_len [ col_idx ] == 0 )
-            INTERNAL_ERROR ( xcColumnEmpty, "zero-length cell data (row_id = %ld, col_idx = %u)", row_id, col_idx );
-    }
-}
-
-/*static
-uint8_t CSRA1_Pileup_AlignCursorDataGetUInt8 ( CSRA1_Pileup_AlignCursorData * self, ctx_t ctx,
-    int64_t row_id, uint32_t col_idx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    TRY ( CSRA1_Pileup_AlignCursorDataGetNonEmptyCell ( self, ctx, row_id, col_idx ) )
-    {
-        const uint8_t * p = self -> cell_data [ col_idx ];
-        return p [ 0 ];
-    }
-
-    return 0;
-}*/
-
-static
-int32_t CSRA1_Pileup_AlignCursorDataGetInt32 ( CSRA1_Pileup_AlignCursorData * self, ctx_t ctx,
-    int64_t row_id, uint32_t col_idx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    TRY ( CSRA1_Pileup_AlignCursorDataGetNonEmptyCell ( self, ctx, row_id, col_idx ) )
-    {
-        const int32_t * p = self -> cell_data [ col_idx ];
-        return p [ 0 ];
-    }
-
-    return 0;
-}
-
-static
-uint32_t CSRA1_Pileup_AlignCursorDataGetUInt32 ( CSRA1_Pileup_AlignCursorData * self, ctx_t ctx,
-    int64_t row_id, uint32_t col_idx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    TRY ( CSRA1_Pileup_AlignCursorDataGetNonEmptyCell ( self, ctx, row_id, col_idx ) )
-    {
-        const uint32_t * p = self -> cell_data [ col_idx ];
-        return p [ 0 ];
-    }
-
-    return 0;
-}
-
-/*--------------------------------------------------------------------------
- * CSRA1_Pileup
- */
-
-enum
-{
-    /* the initial state of a pileup iterator object */
-    pileup_state_invalid,
-
-    /* the iterator needs to advance to the next position */
-    pileup_state_position,
-
-    /* the iterator needs to advance to the next chunk */
-    pileup_state_chunk,
-
-    /* the iterator needs to read alignment ids
-       and populate the alignment list */
-    pileup_state_populate,
-
-    /* the iterator has not yet had "next" called,
-       and needs to be primed for further operation */
-    pileup_state_initial,
-    pileup_state_initial_position,
-    pileup_state_initial_chunk,
-    pileup_state_initial_populate,
-
-    /* terminated states */
-    pileup_state_finished,
-    pileup_state_err,
-
-    /* object has been destroyed */
-    pileup_state_zombie
-};
-
-
-/* TBD - check these error types */
-static
-void CSRA1_PileupStateTest ( const CSRA1_Pileup * self, ctx_t ctx, uint32_t lineno )
-{
-    assert ( self != NULL );
-
-    switch ( self -> state )
-    {
-    case pileup_state_invalid:
-        ctx_event ( ctx, lineno, xc_sev_fail, xc_org_internal, xcIteratorUninitialized, "PileupIterator invalid state" );
-        break;
-    case pileup_state_position:
-    case pileup_state_chunk:
-    case pileup_state_populate:
-        break;
-    case pileup_state_initial:
-    case pileup_state_initial_position:
-    case pileup_state_initial_chunk:
-    case pileup_state_initial_populate:
-        ctx_event ( ctx, lineno, xc_sev_fail, xc_org_user, xcIteratorUninitialized,
-                    "Pileup accessed before a call to PileupIteratorNext()" );
-        break;
-    case pileup_state_finished:
-        ctx_event ( ctx, lineno, xc_sev_fail, xc_org_user, xcCursorExhausted, "No more rows available" );
-        break;
-    case pileup_state_err:
-        ctx_event ( ctx, lineno, xc_sev_fail, xc_org_user, xcIteratorUninitialized, "PileupIterator invalid state" );
-        break;
-    case pileup_state_zombie:
-        ctx_event ( ctx, lineno, xc_sev_fail, xc_org_internal, xcIteratorUninitialized, "PileupIterator accessed after destruction" );
-        break;
-    default:
-        ctx_event ( ctx, lineno, xc_sev_fail, xc_org_internal, xcIteratorUninitialized, "PileupIterator unknown state" );
-    }
-}
-
-#define CHECK_STATE( self, ctx ) \
-    CSRA1_PileupStateTest ( self, ctx, __LINE__ )
-
-
-static
-void CSRA1_PileupWhack ( CSRA1_Pileup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    self -> state = pileup_state_zombie;
-
-    /* any alignments */
-    CSRA1_Pileup_AlignListWhack ( & self -> align, ctx );
-
-    /* alignment cursors, blobs */
-    CSRA1_Pileup_AlignCursorDataWhack ( & self -> pa, ctx );
-    CSRA1_Pileup_AlignCursorDataWhack ( & self -> sa, ctx );
-
-    /* reference cursor, blobs */
-    CSRA1_Pileup_RefCursorDataWhack ( & self -> ref, ctx );
-    
-    CSRA1_PileupEventWhack ( & self -> dad, ctx );
-}
-
-static
-NGS_String * CSRA1_PileupGetReferenceSpec ( const CSRA1_Pileup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        return NGS_ReferenceGetCanonicalName ( self -> dad . dad . dad . ref, ctx );
-    }
-
-    return NULL;
-}
-
-static
-int64_t CSRA1_PileupGetReferencePosition ( const CSRA1_Pileup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        return self -> ref_zpos;
-    }
-
-    return 0;
-}
-
-static
-char CSRA1_PileupGetReferenceBase ( const CSRA1_Pileup * cself, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    CSRA1_Pileup * self = ( CSRA1_Pileup * ) cself;
-
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        if ( self -> ref_base == 0 )
-        {
-            if ( self -> ref_chunk_bases == NULL )
-            {
-                const void * base;
-                uint32_t elem_bits, boff, row_len;
-                ON_FAIL ( NGS_CursorCellDataDirect ( self -> ref . curs, ctx, self -> ref_chunk_id,
-                    reference_READ, & elem_bits, & base, & boff, & row_len ) )
-                {
-                    return 0;
-                }
-
-                self -> ref_chunk_bases = base;
-                assert ( row_len == self -> ref . max_seq_len ||
-                         self -> ref_chunk_xend - self -> ref . max_seq_len + row_len >= self -> slice_xend );
-            }
-
-            assert ( self -> ref . max_seq_len != 0 );
-            self -> ref_base = self -> ref_chunk_bases [ self -> ref_zpos % self -> ref . max_seq_len ]; 
-        }
-
-        return self -> ref_base;
-
-    }
-
-    return 0;
-}
-
-static
-unsigned int CSRA1_PileupGetDepth ( const CSRA1_Pileup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        return ( unsigned int ) self -> align . depth;
-    }
-
-    return 0;
-}
-
-static
-bool CSRA1_PileupPosition ( CSRA1_Pileup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    if ( self -> align . avail != 0 )
-    {
-
-        CSRA1_Pileup_Entry * head = ( CSRA1_Pileup_Entry * )
-            DLListHead ( & self -> align . waiting );
-
-        uint32_t avail = 0;
-        CSRA1_Pileup_Entry * prev = NULL;
-        CSRA1_Pileup_Entry * entry = head;
-
-        /* walk the waiting list, adding everything to the end of pileup list */
-        while ( entry != NULL )
-        {
-            if ( entry -> zstart > self -> ref_zpos )
-                break;
-
-PRINT ( ">>> adding alignment at refpos %ld, row-id %ld: %ld-%ld ( zero-based, half-closed )\n",
-         self -> ref_zpos, entry -> row_id, entry -> zstart, entry -> xend );
-
-            prev = entry;
-
-            ++ avail;
-
-            entry = ( CSRA1_Pileup_Entry * )
-                DLNodeNext ( & entry -> node );
-        }
-
-        /* if "entry" is NULL, then everything waiting is ready */
-        if ( entry == NULL )
-        {
-            assert ( self -> align . avail == avail );
-
-            DLListAppendList ( & self -> align . pileup, & self -> align . waiting );
-            self -> align . depth += avail;
-            self -> align . avail = 0;
-        }
-
-        /* otherwise, just take the top guys off the end */
-        else if ( prev != NULL )
-        {
-            if ( head == prev )
-            {
-                assert ( avail == 1 );
-                DLListPopHead ( & self -> align . waiting );
-                DLListPushTail ( & self -> align . pileup, & head -> node );
-                self -> align . avail -= 1;
-                self -> align . depth += 1;
-            }
-            else
-            {
-                DLList transfer;
-
-                /* TBD - add this functionality to DLList */
-
-                /* sever the ties */
-                prev -> node . next = NULL;
-                entry -> node . prev = NULL;
-
-                /* put the new guys onto transfer list */
-                transfer . head = & head -> node;
-                transfer . tail = & prev -> node;
-
-                /* update the waiting list */
-                self -> align . waiting . head = & entry -> node;
-                self -> align . avail -= avail;
-
-                /* transfer elements */
-                DLListAppendList ( & self -> align . pileup, & transfer );
-                self -> align . depth += avail;
-            }
-        }
-    }
-
-    /* update cached REFERENCE values at current position */
-    self -> ref_base = 0;
-    
-    return self -> ref_zpos< self -> slice_xend;
-}
-
-static
-bool CSRA1_PileupAdvance ( CSRA1_Pileup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    CSRA1_Pileup_Entry * entry;
-
-    /* see if advance is possible */
-    if ( ++ self -> ref_zpos >= self -> slice_xend )
-    {
-        /* should never go over */
-        assert ( self -> ref_zpos == self -> slice_xend );
-        self -> state = pileup_state_finished;
-        return false;
-    }
-
-    /* test for end of chunk */
-    if ( self -> ref_zpos == self -> ref_chunk_xend )
-    {
-        -- self -> ref_zpos;
-        self -> ref_chunk_id += 1;
-        self -> state = pileup_state_chunk;
-        return false;
-    }
-
-    /* drop everything that ends at current position */
-    entry = ( CSRA1_Pileup_Entry * )
-        DLListHead ( & self -> align . pileup );
-
-    while ( entry != NULL )
-    {
-        CSRA1_Pileup_Entry * next = ( CSRA1_Pileup_Entry * )
-            DLNodeNext ( & entry -> node );
-
-        /* test for temporarily cached data */
-        if ( entry -> temporary )
-        {
-            uint32_t i;
-#if _DEBUGGING
-            uint32_t num_flushed = 0;
-#endif
-
-            for ( i = 0; i < sizeof entry -> cell_data / sizeof entry -> cell_data [ 0 ]; ++ i )
-            {
-                if ( entry -> cell_data [ i ] != NULL && entry -> blob [ i ] == NULL )
-                {
-                    entry -> cell_data [ i ] = NULL;
-                    entry -> cell_len [ i ] = 0;
-#if _DEBUGGING
-                    ++ num_flushed;
-#endif
-                }
-            }
-
-PRINT ( ">>> flushed %u columns of temporary cell data\n", num_flushed );
-
-            entry -> temporary = false;
-        }
-
-        if ( entry -> xend == self -> ref_zpos || entry -> status == pileup_entry_status_DONE )
-        {
-PRINT ( ">>> dropping alignment at refpos %ld, row-id %ld: %ld-%ld ( zero-based, half-closed )\n",
-         self -> ref_zpos, entry -> row_id, entry -> zstart, entry -> xend );
-
-            DLListUnlink ( & self -> align . pileup, & entry -> node );
-            self -> align . depth -= 1;
-            self -> cached_blob_total -= entry -> blob_total;
-            CSRA1_Pileup_EntryWhack ( & entry -> node, ( void* ) ctx );
-        }
-
-        entry = next;
-    }
-
-    return CSRA1_PileupPosition ( self, ctx );
-}
-
-static
-void CSRA1_PileupChunk ( CSRA1_Pileup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    /* zero out any cached REFERENCE cells for current chunk */
-    self -> ref_chunk_bases = NULL;
-    self -> ref_base = 0;
-
-    /* prepare next chunk */
-    self -> ref_chunk_xend = ( self -> ref_chunk_id - self -> reference_start_id + 1 ) * self -> ref . max_seq_len;
-
-    /* detect need to populate */
-    if ( self -> ref_chunk_id >= self -> idx_chunk_id )
-        self -> state = pileup_state_populate;
-    else
-        self -> state = pileup_state_position;
-}
-
-static
-uint32_t CSRA1_PileupGatherCategoryIds ( CSRA1_Pileup * self, ctx_t ctx, const KVector * ids, uint32_t col_idx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    const void * base;
-    uint32_t elem_bits, boff, row_len = 0;
-
-    TRY ( NGS_CursorCellDataDirect ( self -> ref . curs, ctx,
-          self -> idx_chunk_id, col_idx, & elem_bits, & base, & boff, & row_len ) )
-    {
-        uint32_t i;
-        const int64_t * cell = base;
-
-        /* test for alignment */
-        assert ( ( ( size_t ) cell & ( sizeof * cell - 1 ) ) == 0 );
-
-        /* copy the row ids */
-        for ( i = 0; i < row_len; ++ i )
-        {
-            rc_t rc = KVectorSetBool ( ( KVector * ) ids, cell [ i ], true );
-            if ( rc != 0 )
-            {
-                INTERNAL_ERROR ( xcStorageExhausted, "KVectorSetBool rc = %R", rc );
-                break;
-            }
-        }
-    }
-
-    return row_len;
-}
-
-static
-uint32_t CSRA1_PileupGatherChunkIds ( CSRA1_Pileup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    uint32_t pa_ids = 0;
-    uint32_t sa_ids = 0;
-
-    if ( self -> pa . curs != NULL )
-    {
-        ON_FAIL ( pa_ids = CSRA1_PileupGatherCategoryIds ( self, ctx, self -> ref . pa_ids, reference_PRIMARY_ALIGNMENT_IDS ) )
-            return 0;
-    }
-
-    if ( self -> sa . curs != NULL )
-    {
-        ON_FAIL ( sa_ids = CSRA1_PileupGatherCategoryIds ( self, ctx, self -> ref . sa_ids, reference_SECONDARY_ALIGNMENT_IDS ) )
-            return 0;
-    }
-
-    return pa_ids + sa_ids;
-}
-
-static
-void CSRA1_PileupGatherIds ( CSRA1_Pileup * self, ctx_t ctx, uint32_t id_limit )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    rc_t rc;
-    KVector * v;
-    uint32_t total_ids;
-
-    /* create empty KVectors for each category in use */
-    if ( self -> pa . curs != NULL )
-    {
-        KVectorRelease ( self -> ref . pa_ids );
-        rc = KVectorMake ( & v );
-        self -> ref . pa_ids = v;
-        if ( rc != 0 )
-            INTERNAL_ERROR ( xcStorageExhausted, "KVectorMake rc = %R", rc );
-    }
-    if ( ! FAILED () && self -> sa . curs != NULL )
-    {
-        KVectorRelease ( self -> ref . sa_ids );
-        rc = KVectorMake ( & v );
-        self -> ref . sa_ids = v;
-        if ( rc != 0 )
-            INTERNAL_ERROR ( xcStorageExhausted, "KVectorMake rc = %R", rc );
-    }
-
-    /* set row ids appropriately */
-    self -> idx_chunk_id = self -> ref_chunk_id;
-
-    /* loop until we reach a limit */
-    total_ids = 0;
-    do
-    {
-        uint32_t align_ids;
-
-        ON_FAIL ( align_ids = CSRA1_PileupGatherChunkIds ( self, ctx ) )
-            break;
-
-        total_ids += align_ids;
-        ++ self -> idx_chunk_id;
-
-    }
-    while ( total_ids < id_limit && self -> idx_chunk_id <= self -> slice_end_id );
-}
-
-/*  Get RD_FILTER and check if it's present
-    e.g for SRR1164787 SECONDARY_ALIGNMENT row_id == 3
-    has invalid data (SEQ_ID == 0, no RD_FILTER) - 
-    we need to ignore such records
-
-    return: true - there is a valid RD_FILTER value in the db
-            false - there is no RD_FILTER in the db
-*/
-static bool CSRA1_Pileup_GetReadFilter ( CSRA1_Pileup * self, ctx_t ctx,
-    int64_t row_id, CSRA1_Pileup_AlignCursorData * cd, INSDC_read_filter* ret_val )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    TRY ( CSRA1_Pileup_AlignCursorDataGetCell ( cd, ctx, row_id, pileup_align_col_READ_FILTER ) )
-    {
-        if ( cd -> cell_len [ pileup_align_col_READ_FILTER ] == 0 )
-            return false;
-    }
-
-    * ret_val = *( (INSDC_read_filter*) cd -> cell_data [ pileup_align_col_READ_FILTER ]);
-    return true;
-}
-
-static
-bool CSRA1_PileupFilterAlignment ( CSRA1_Pileup * self, ctx_t ctx,
-    int64_t row_id, CSRA1_Pileup_AlignCursorData * cd )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    int32_t map_qual;
-    INSDC_read_filter read_filter;
-
-    if ( CSRA1_Pileup_GetReadFilter ( self, ctx, row_id, cd, & read_filter ) == true )
-    /*TRY ( read_filter = CSRA1_Pileup_AlignCursorDataGetUInt8 ( cd, ctx, row_id, pileup_align_col_READ_FILTER ) )*/
-    {
-        switch ( read_filter )
-        {
-        case READ_FILTER_PASS:
-
-            /* unless looking at mapping quality, accept */
-            if ( ( self -> filters & NGS_PileupFilterBits_map_qual ) == 0 )
-                return true;
-
-            /* look at mapping quality for alignment */
-            TRY ( map_qual = CSRA1_Pileup_AlignCursorDataGetInt32 ( cd, ctx, row_id, pileup_event_col_MAPQ ) )
-            {
-                /* generally specify a minimum mapping quality */
-                if ( ( self -> filters & NGS_PileupFilterBits_min_map_qual ) != 0 )
-                    return map_qual >= self -> map_qual;
-
-                /* but allow a maximum as well */
-                return map_qual <= self -> map_qual;
-            }
-            break;
-
-        case READ_FILTER_REJECT:
-            return ( self -> filters & NGS_PileupFilterBits_pass_bad ) != 0;
-
-        case READ_FILTER_CRITERIA:
-            return ( self -> filters & NGS_PileupFilterBits_pass_dups ) != 0;
-
-        case READ_FILTER_REDACTED:
-            /* do not include */
-            break;
-        }
-    }
-    return false;
-}
-
-static
-CSRA1_Pileup_Entry * CSRA1_PileupReadAlignment ( CSRA1_Pileup * self, ctx_t ctx,
-    int64_t row_id, CSRA1_Pileup_AlignCursorData * cd )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    bool pass;
-    uint64_t ref_len;
-    int64_t ref_zstart;
-    bool secondary = ( cd == & self -> sa );
-
-    TRY ( pass = CSRA1_PileupFilterAlignment ( self, ctx, row_id, cd ) )
-    {
-        if ( pass )
-        {
-            TRY ( ref_zstart = CSRA1_Pileup_AlignCursorDataGetUInt32 ( cd, ctx, row_id, pileup_align_col_REF_POS ) )
-            {
-                /* adjust for circular reference wrap-around.
-                   applied when gathering initial alignments whose
-                   effective starting coordinates will go negative */
-                ref_zstart += self -> effective_ref_zstart;
-
-                /* could perform early filtering here, but we want to
-                   detect the longest REF_LEN, so don't exclude */
-                TRY ( ref_len = CSRA1_Pileup_AlignCursorDataGetUInt32 ( cd, ctx, row_id, pileup_align_col_REF_LEN ) )
-                {
-                    int64_t ref_xend = ref_zstart + ref_len;
-
-                    self -> align . observed += 1;
-                    if ( ( uint32_t ) ref_len > self -> align . max_ref_len )
-                        self -> align . max_ref_len = ( uint32_t ) ref_len;
-
-                    if ( ref_zstart < self -> slice_xend && ref_xend > self -> slice_zstart )
-                    {
-                        CSRA1_Pileup_Entry * entry;
-
-                        TRY ( entry = CSRA1_Pileup_EntryMake ( ctx, row_id, ref_zstart, ref_len, secondary ) )
-                        {
-                            DLListPushTail ( & self -> align . waiting, & entry -> node );
-                            self -> align . avail += 1;
-                            return entry;
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    return NULL;
-}
-
-static
-bool CSRA1_PileupPopulateCategory ( CSRA1_Pileup * self, ctx_t ctx,
-    const KVector * ids, CSRA1_Pileup_AlignCursorData * cd )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    uint64_t cur, next;
-    bool ordered = true;
-    CSRA1_Pileup_Entry * last = NULL;
-
-    /* get first id */
-    bool ignore;
-    const char * vfunc = "First";
-    rc_t rc = KVectorGetFirstBool ( ids, & next, & ignore );
-
-    for ( cur = next; rc == 0; cur = next )
-    {
-        CSRA1_Pileup_Entry * entry;
-
-        /* "next" is our row-id */
-        ON_FAIL ( entry = CSRA1_PileupReadAlignment ( self, ctx, ( int64_t ) cur, cd ) )
-            break;
-
-        /* detect out of order alignments */
-        if ( ordered && entry != NULL )
-        {
-            if ( last != NULL && CSRA1_Pileup_EntryCmp ( entry, last ) < 0 )
-                ordered = false;
-
-            last = entry;
-        }
-
-        /* get next id */
-        vfunc = "Next";
-        rc = KVectorGetNextBool ( ids, & next, cur, & ignore );
-    }
-
-    if ( rc != 0 && GetRCState ( rc ) != rcNotFound )
-        INTERNAL_ERROR ( xcStorageExhausted, "KVectorGet%sBool rc = %R", vfunc, rc );
-
-    return ordered;
-}
-
-static
-void CSRA1_PileupPopulate ( CSRA1_Pileup * self, ctx_t ctx, uint32_t id_limit )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    /* read some ids */
-    TRY ( CSRA1_PileupGatherIds ( self, ctx, id_limit ) )
-    {
-        bool ordered = true;
-
-        /* gather primary alignments */
-        if ( self -> pa . curs != NULL )
-        {
-            TRY ( ordered = CSRA1_PileupPopulateCategory ( self, ctx, self -> ref . pa_ids, & self -> pa ) )
-            {
-                if ( ! ordered )
-                    CSRA1_PileupAlignListSort ( & self -> align, ctx );
-            }
-        }
-
-        /* gather secondary alignments */
-        if ( ! FAILED () && self -> sa . curs != NULL )
-        {
-            /* capture the waiting guys from primary alignment */
-            DLList pa_waiting = self -> align . waiting;
-            uint32_t pa_avail = self -> align . avail;
-
-            /* erase the list for secondary */
-            DLListInit ( & self -> align . waiting );
-            self -> align . avail = 0;
-
-            /* populate with secondary alignments */
-            TRY ( ordered = CSRA1_PileupPopulateCategory ( self, ctx, self -> ref . sa_ids, & self -> sa ) )
-            {
-                if ( ! ordered )
-                    CSRA1_PileupAlignListSort ( & self -> align, ctx );
-
-                if ( pa_avail != 0 )
-                    CSRA1_PileupAlignListMerge ( & self -> align, & pa_waiting, pa_avail );
-            }
-            CATCH_ALL ()
-            {
-                /* put anything that was already gathered onto list for destruction */
-                DLListPrependList ( & self -> align . waiting, & pa_waiting );
-                self -> align . avail += pa_avail;
-            }
-        }
-    }
-}
-
-static
-bool CSRA1_PileupGetOverlapPossible ( const CSRA1_Pileup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    const void * base;
-    uint32_t elem_bits, boff, row_len;
-
-#if IGNORE_OVERLAP_REF_LEN
-    return true;
-#endif
-
-    /* read OVERLAP_REF_LEN */
-    TRY ( NGS_CursorCellDataDirect ( self -> ref . curs, ctx, self -> slice_start_id,
-              reference_OVERLAP_REF_LEN, & elem_bits, & base, & boff, & row_len ) )
-    {
-        const uint32_t * OVERLAP_REF_LEN = base;
-        uint32_t slice_start = ( uint32_t ) ( self -> slice_zstart % self -> ref . max_seq_len );
-
-        assert ( ( ( size_t ) OVERLAP_REF_LEN & ( sizeof * OVERLAP_REF_LEN - 1 ) ) == 0 );
-
-        if ( self -> pa . curs != NULL )
-        {
-            if ( OVERLAP_REF_LEN [ 0 ] > slice_start )
-                return true;
-        }
-        if ( self -> sa . curs != NULL )
-        {
-            if ( OVERLAP_REF_LEN [ 1 ] > slice_start )
-                return true;
-        }
-
-        /* according to the recorded data, no overlap is possible for linear references */
-        return self -> circular;
-    }
-    CATCH_ALL ()
-    {
-        CLEAR ();
-    }
-
-    return true;
-}
-
-static
-bool CSRA1_PileupGetOverlapChunkId ( CSRA1_Pileup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    const void * base;
-    uint32_t elem_bits, boff, row_len;
-
-    /* TBD - there are cases when this may be valid even when circular */
-    if ( self -> circular )
-        return false;
-
-#if IGNORE_OVERLAP_REF_POS
-    return false;
-#endif
-
-    /* read OVERLAP_REF_POS */
-    TRY ( NGS_CursorCellDataDirect ( self -> ref . curs, ctx, self -> slice_start_id,
-              reference_OVERLAP_REF_POS, & elem_bits, & base, & boff, & row_len ) )
-    {
-        bool have_overlap_ref_pos = false;
-        const int32_t * OVERLAP_REF_POS = base;
-        int64_t new_chunk_id, ref_chunk_id = self -> ref_chunk_id;
-
-        assert ( ( ( size_t ) OVERLAP_REF_POS & ( sizeof * OVERLAP_REF_POS - 1 ) ) == 0 );
-
-        if ( self -> pa . curs != NULL && OVERLAP_REF_POS [ 0 ] > 0 )
-        {
-            new_chunk_id = ( OVERLAP_REF_POS [ 0 ] - 1 ) / self -> ref . max_seq_len + self -> reference_start_id;
-            if ( new_chunk_id < ref_chunk_id )
-                ref_chunk_id = new_chunk_id;
-            have_overlap_ref_pos = true;
-        }
-
-        if ( self -> sa . curs != NULL && OVERLAP_REF_POS [ 1 ] > 0 )
-        {
-            new_chunk_id = ( OVERLAP_REF_POS [ 1 ] - 1 ) / self -> ref . max_seq_len + self -> reference_start_id;
-            if ( new_chunk_id < ref_chunk_id )
-                ref_chunk_id = new_chunk_id;
-            have_overlap_ref_pos = true;
-        }
-
-        self -> ref_chunk_id = ref_chunk_id;
-        return have_overlap_ref_pos;
-    }
-    CATCH_ALL ()
-    {
-        CLEAR ();
-    }
-
-    return false;
-}
-
-static
-void CSRA1_PileupOverlap ( CSRA1_Pileup * self, ctx_t ctx, int64_t stop_xid )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    while ( ! FAILED () )
-    {
-        /* detect circular wrap around */
-        if ( self -> ref_chunk_id > self -> reference_last_id )
-        {
-            assert ( self -> circular );
-            assert ( self -> effective_ref_zstart != 0 );
-            self -> ref_chunk_id = self -> reference_start_id;
-            self -> effective_ref_zstart = 0;
-        }
-
-        /* exit condition #1: at end of overlap */
-        if ( self -> ref_chunk_id == stop_xid )
-            break;
-
-        /* run population from ref_chunk_id to stop_xid ( exclusive ) */
-        CSRA1_PileupPopulate ( self, ctx, 0 );
-        self -> ref_chunk_id = self -> idx_chunk_id;
-    }
-}
-
-static
-void CSRA1_PileupRevOverlap ( CSRA1_Pileup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    while ( ! FAILED () )
-    {
-        DLList waiting;
-        uint32_t avail;
-
-        /* exit condition #1: at start of non-circular reference */
-        if ( ! self -> circular && self -> ref_chunk_id == self -> reference_start_id )
-            break;
-
-        /* exit condition #2: have seen sufficient alignments to
-           obtain a maximum projected length, and have backed up
-           far enough to include this length */
-        if ( self -> align . observed >= MIN_ALIGN_OBSERVE )
-        {
-            int64_t stop_xid = self -> ref_chunk_id;
-            int64_t overlap_zstart = self -> slice_zstart - self -> align . max_ref_len;
-
-            if ( overlap_zstart >= 0 )
-                self -> ref_chunk_id = overlap_zstart / self -> ref . max_seq_len + self -> reference_start_id;
-            else if ( ! self -> circular )
-                self -> ref_chunk_id = self -> reference_start_id;
-            else
-            {
-                uint64_t ref_len = NGS_ReferenceGetLength ( self -> dad . dad . dad . ref, ctx );
-                overlap_zstart += ref_len;
-                self -> ref_chunk_id = overlap_zstart / self -> ref . max_seq_len + self -> reference_start_id;
-                self -> effective_ref_zstart -= ref_len;
-            }
-
-            CSRA1_PileupOverlap ( self, ctx, stop_xid );
-            break;
-        }
-
-        /* save previous results */
-        waiting = self -> align . waiting;
-        avail = self -> align . avail;
-
-        /* reset accumulator */
-        DLListInit ( & self -> align . waiting );
-        self -> align . avail = 0;
-
-        /* need to back up one chunk and continue */
-        if ( self -> ref_chunk_id != self -> reference_start_id )
-            self -> ref_chunk_id -= 1;
-        else
-        {
-            assert ( self -> circular );
-
-            /* this should never occur */
-            if ( self -> effective_ref_zstart != 0 )
-                break;
-
-            /* linearize circularity */
-            self -> effective_ref_zstart -= NGS_ReferenceGetLength ( self -> dad . dad . dad . ref, ctx );
-
-            /* wrap around */
-            self -> ref_chunk_id = self -> reference_last_id;
-        }
-
-        CSRA1_PileupPopulate ( self, ctx, 0 );
-
-        /* regardless of error state, merge old results back in */
-        DLListAppendList ( & self -> align . waiting, & waiting );
-        self -> align . avail += avail;
-    }
-}
-
-static
-void CSRA1_PileupFirst ( CSRA1_Pileup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    /* APPROACH
-
-       The general task here is to get all of the alignments in the
-       first chunk whose projection contains THE CURRENT POSITION,
-       in addition to all alignments within preceding chunks that also
-       contain the current position. So the process is almost exactly
-       like processing every normal chunk, with the differences that
-
-         a) we look for intersection rather than entry
-         b) we look outside ( to the left ) of the slice
-
-       Circular references with chunks 1..N may be linearized as
-
-         -N..2N
-
-       When looking to the left of the first chunk, we are limited by
-
-         a) the start of non-circular references
-         b) the maximum length of any alignment's projection, i.e.
-            only back up to current position - length of longest projection
-
-       An optimization exists that utilizes pre-calculated overlap
-       chunk row-ids. This optimization does not apply for circular
-       references.
-
-       In reality, we are interested in knowing the exact value of the
-       longest projection onto the reference of any alignment. If this is
-       not known a-priori, then a sampling of some number of alignments gives
-       a reasonable estimate. This sample count needs to be added to the
-       limitation "b" above, such that we can only know the maximum projection
-       once the sample size conditions are met.
-
-     */
-
-    /* initialize current chunk */
-    self -> ref_chunk_id = self -> slice_start_id;
-    self -> state = pileup_state_initial_populate;
-
-    /* test if there is even any possibility of overlap */
-    if ( ! CSRA1_PileupGetOverlapPossible ( self, ctx ) )
-        return;
-
-    /* process the current chunk */
-    TRY ( CSRA1_PileupPopulate ( self, ctx, READ_AHEAD_LIMIT ) )
-    {
-        /* we read ahead this far */
-        int64_t idx_chunk_id = self -> idx_chunk_id;
-
-        /* must save current avail list */
-        DLList waiting = self -> align . waiting;
-        uint32_t avail = self -> align . avail;
-
-        /* reinitialize */
-        DLListInit ( & self -> align . waiting );
-        self -> align . avail = 0;
-
-        /* look for OVERLAP_REF_POS optimization */
-        if ( CSRA1_PileupGetOverlapChunkId ( self, ctx ) )
-            CSRA1_PileupOverlap ( self, ctx, self -> slice_start_id );
-
-        /* scan backward for overlaps */
-        else
-            CSRA1_PileupRevOverlap ( self, ctx );
-
-        /* append previously saved waiting */
-        DLListAppendList ( & self -> align . waiting, & waiting );
-        self -> align . avail += avail;
-
-        /* restore to prior value */
-        self -> idx_chunk_id = idx_chunk_id;
-    }
-
-    /* restore to original value */
-    self -> ref_chunk_id = self -> slice_start_id;
-    self -> effective_ref_zstart = 0;
-    self -> state = pileup_state_initial_chunk;
-}
-
-static
-bool CSRA1_PileupIteratorGetNext ( CSRA1_Pileup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    bool pos_valid = false;
-
-    assert ( self != NULL );
-
-    while ( 1 )
-    {
-        switch ( self -> state )
-        {
-
-        case pileup_state_position:
-
-            ON_FAIL ( pos_valid = CSRA1_PileupAdvance ( self, ctx ) )
-            {
-                self -> state = pileup_state_err;
-                break;
-            }
-
-            if ( ! pos_valid )
-            {
-                assert ( self -> state != pileup_state_position );
-                continue;
-            }
-
-            break;
-
-        case pileup_state_chunk:
-
-            ON_FAIL ( CSRA1_PileupChunk ( self, ctx ) )
-            {
-                self -> state = pileup_state_err;
-                break;
-            }
-
-            assert ( self -> state != pileup_state_chunk );
-            continue;
-
-        case pileup_state_populate:
-
-            ON_FAIL ( CSRA1_PileupPopulate ( self, ctx, READ_AHEAD_LIMIT ) )
-            {
-                self -> state = pileup_state_err;
-                break;
-            }
-
-            self -> state = pileup_state_position;
-            continue;
-
-        case pileup_state_initial:
-
-            ON_FAIL ( CSRA1_PileupFirst ( self, ctx ) )
-            {
-                self -> state = pileup_state_err;
-                break;
-            }
-            continue;
-
-        case pileup_state_initial_position:
-
-            ON_FAIL ( pos_valid = CSRA1_PileupPosition ( self, ctx ) )
-            {
-                self -> state = pileup_state_err;
-                break;
-            }
-
-            if ( ! pos_valid )
-            {
-                assert ( self -> state != pileup_state_position );
-                continue;
-            }
-
-            self -> state = pileup_state_position;
-            break;
-
-        case pileup_state_initial_chunk:
-
-            ON_FAIL ( CSRA1_PileupChunk ( self, ctx ) )
-            {
-                self -> state = pileup_state_err;
-                break;
-            }
-
-            self -> state = pileup_state_initial_position;
-            continue;
-
-        case pileup_state_initial_populate:
-
-            ON_FAIL ( CSRA1_PileupPopulate ( self, ctx, READ_AHEAD_LIMIT ) )
-            {
-                self -> state = pileup_state_err;
-                break;
-            }
-
-            self -> state = pileup_state_initial_chunk;
-            continue;
-
-        case pileup_state_finished:
-
-            /* nothing to do */
-            break;
-
-        default:
-
-            /* generate exception */
-            CSRA1_PileupStateTest ( self, ctx, __LINE__ );
-        }
-
-        break;
-    }
-
-    /* partially reset the event iterator */
-    if ( ! FAILED () )
-    {
-        self -> dad . entry = ( CSRA1_Pileup_Entry * ) DLListHead ( & self -> align . pileup );
-        self -> dad . seen_first = false;
-    }
-
-    return pos_valid;
-}
-
-static NGS_Pileup_vt CSRA1_Pileup_vt =
-{
-    {
-        {
-            /* NGS_Refcount */
-            CSRA1_PileupWhack
-        },
-
-        /* NGS_PileupEvent */
-        CSRA1_PileupEventGetMappingQuality,
-        CSRA1_PileupEventGetAlignmentId,
-        CSRA1_PileupEventGetAlignmentPosition,
-        CSRA1_PileupEventGetFirstAlignmentPosition,
-        CSRA1_PileupEventGetLastAlignmentPosition,
-        CSRA1_PileupEventGetEventType,
-        CSRA1_PileupEventGetAlignmentBase,
-        CSRA1_PileupEventGetAlignmentQuality,
-        CSRA1_PileupEventGetInsertionBases,
-        CSRA1_PileupEventGetInsertionQualities,
-        CSRA1_PileupEventGetRepeatCount,
-        CSRA1_PileupEventGetIndelType,
-        CSRA1_PileupEventIteratorNext,
-        CSRA1_PileupEventIteratorReset
-    },
-
-    CSRA1_PileupGetReferenceSpec,    
-    CSRA1_PileupGetReferencePosition,
-    CSRA1_PileupGetReferenceBase,           
-    CSRA1_PileupGetDepth,            
-    CSRA1_PileupIteratorGetNext     
-};
-
-
-static
-void CSRA1_PileupPopulateAlignCurs ( ctx_t ctx, const VCursor * curs, uint32_t * col_idx, const char * tblname )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    /* use preprocessor symbol that will disable assert() macro */
-#if defined NDEBUG
-#define COL_STRUCT                                                      \
-    struct { const char * spec; bool opt; }
-#define COL_SPEC1( cast, name )                                         \
-    { cast stringize ( name ), false }
-#define COL_SPEC2( cast, name )                                         \
-    { cast stringize ( name ), true }
-#define COL_SPEC3( cast, name )                                         \
-    { cast stringize ( name ), false }
-#else
-    /* assert() macro will evaluate expression */
-#define COL_STRUCT                                                      \
-    struct { const char * spec; size_t idx; bool opt; }
-#define COL_SPEC1( cast, name )                                         \
-    { cast stringize ( name ), pileup_event_col_ ## name, false }
-#define COL_SPEC2( cast, name )                                         \
-    { cast stringize ( name ), pileup_event_col_ ## name, true }
-#define COL_SPEC3( cast, name )                                         \
-    { cast stringize ( name ), pileup_align_col_ ## name, false }
-#endif
-
-    static COL_STRUCT cols [] =
-    {
-        /* pileup-event */
-        COL_SPEC1 ( "", MAPQ ),
-        COL_SPEC1 ( "", REF_OFFSET ),
-        COL_SPEC1 ( "(bool)", HAS_REF_OFFSET ),
-        COL_SPEC1 ( "", MISMATCH ),
-        COL_SPEC1 ( "(bool)", HAS_MISMATCH ),
-        COL_SPEC1 ( "", REF_ORIENTATION ),
-        COL_SPEC1 ( "", QUALITY ),
-
-        /* optional pileup-event */
-        COL_SPEC2 ( "", REF_OFFSET_TYPE ),
-
-        /* pileup only */
-        COL_SPEC3 ( "(INSDC:coord:zero)", REF_POS ),
-        COL_SPEC3 ( "(INSDC:coord:len)", REF_LEN ),
-        COL_SPEC3 ( "(INSDC:SRA:read_filter)", READ_FILTER )
-    };
-
-    rc_t rc;
-    size_t i;
-
-    for ( i = 0; i < sizeof cols / sizeof cols [ 0 ]; ++ i )
-    {
-        assert ( i == cols [ i ] . idx );
-
-        if ( ! cols [ i ] . opt )
-        {
-            rc = VCursorAddColumn ( curs, & col_idx [ i ], "%s", cols [ i ] . spec );
-            if ( rc != 0 )
-            {
-                INTERNAL_ERROR ( xcColumnNotFound, "VCursorAddColumn '%s' rc = %R", cols [ i ] . spec, rc );
-                return;
-            }
-            assert ( col_idx [ i ] != 0 );
-        }
-    }
-
-    rc = VCursorPermitPostOpenAdd ( curs );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcCursorOpenFailed,
-                         "ERROR: VCursorPermitPostOpenAdd(%s) failed with error: 0x%08x (%u) [%R]",
-                         tblname, rc, rc, rc );
-        return;
-    }
-
-    rc = VCursorOpen ( curs );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcCursorOpenFailed,
-                         "ERROR: VCursorOpen(%s) failed with error: 0x%08x (%u) [%R]",
-                         tblname, rc, rc, rc );
-        return;
-    }
-
-    for ( i = 0; i < sizeof cols / sizeof cols [ 0 ]; ++ i )
-    {
-        assert ( i == cols [ i ] . idx );
-
-        if ( cols [ i ] . opt )
-            VCursorAddColumn ( curs, & col_idx [ i ], "%s", cols [ i ] . spec );
-    }
-}
-
-static
-void CSRA1_PileupPopulatePACurs ( CSRA1_Pileup * obj, ctx_t ctx, const char * tblname )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    const void * base;
-    uint32_t elem_bits, boff, row_len;
-    
-    /* need to ensure PRIMARY_ALIGNMENT_IDS are in ref_curs */
-    TRY ( NGS_CursorCellDataDirect ( obj -> ref . curs, ctx, obj -> reference_start_id,
-              reference_PRIMARY_ALIGNMENT_IDS, & elem_bits, & base, & boff, & row_len ) )
-    {
-        /* populate cursor with known stuff */
-        CSRA1_PileupPopulateAlignCurs ( ctx, obj -> pa . curs, obj -> pa . col_idx, tblname );
-    }
-}
-
-static
-void CSRA1_PileupPopulateSACurs ( CSRA1_Pileup * obj, ctx_t ctx, const char * tblname )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    const void * base;
-    uint32_t elem_bits, boff, row_len;
-    
-    /* need to ensure SECONDARY_ALIGNMENT_IDS are in ref_curs */
-    TRY ( NGS_CursorCellDataDirect ( obj -> ref . curs, ctx, obj -> reference_start_id,
-              reference_SECONDARY_ALIGNMENT_IDS, & elem_bits, & base, & boff, & row_len ) )
-    {
-        /* populate cursor with known stuff */
-        CSRA1_PileupPopulateAlignCurs ( ctx, obj -> sa . curs, obj -> sa . col_idx, tblname );
-    }
-}
-
-static
-void CSRA1_PileupInitAlignment ( CSRA1_Pileup * obj, ctx_t ctx,
-    const VDatabase * db, const char * tblname, const VCursor ** curs,
-    void ( * init_curs ) ( CSRA1_Pileup * obj, ctx_t ctx, const char * tblname ) )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    
-    const VTable * tbl;
-    rc_t rc = VDatabaseOpenTableRead ( db, & tbl, "%s", tblname );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcTableOpenFailed, 
-                         "ERROR: VDatabaseOpenTableRead(%s) failed with error: 0x%08x (%u) [%R]", 
-                         tblname, rc, rc, rc );
-    }
-    else
-    {
-        rc = VTableCreateCursorRead ( tbl, curs );
-        if ( rc != 0 )
-        {
-            INTERNAL_ERROR ( xcCursorCreateFailed,
-                             "ERROR: VTableCreateCursorRead(%s) failed with error: 0x%08x (%u) [%R]",
-                             tblname, rc, rc, rc);
-        }
-        else
-        {
-            ( * init_curs ) ( obj, ctx, tblname );
-        }
-
-        VTableRelease ( tbl );
-    }
-}
-
-
-static
-void CSRA1_PileupInit ( ctx_t ctx, CSRA1_Pileup * obj, const char * instname, 
-    NGS_Reference * ref, const VDatabase * db, const NGS_Cursor * ref_curs,
-    int64_t first_row_id, int64_t last_row_id, bool wants_primary, bool wants_secondary,
-    uint32_t filters, int32_t map_qual )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    
-    assert ( obj != NULL );
-    assert ( ref != NULL );
-
-    /* initialize superclass */    
-    TRY ( CSRA1_PileupEventInit ( ctx, & obj -> dad, & CSRA1_Pileup_vt, "CSRA1_Pileup", instname, ref ) ) 
-    {
-        /* capture reference cursor */
-        TRY ( CSRA1_Pileup_RefCursorDataInit ( ctx, & obj -> ref, ref_curs, first_row_id ) )
-        {
-            TRY ( obj -> slice_xend = ( int64_t ) NGS_ReferenceGetLength ( ref, ctx ) )
-            {
-                /* determine whether the reference is circular */
-                TRY ( obj -> circular = NGS_ReferenceGetIsCircular ( ref, ctx ) )
-                {
-                    /* capture row range - these are the rows within REFERENCE table
-                       that represent the actual chromosome being analyzed */
-                    obj -> reference_start_id = obj -> slice_start_id = first_row_id;
-                    obj -> reference_last_id = obj -> slice_end_id = last_row_id;
-
-                    /* record filter criteria */
-                    obj -> filters = filters;
-                    obj -> map_qual = map_qual;
-
-                    /* set cache limits */
-                    obj -> cached_blob_limit = CACHED_BLOB_LIMIT;
-#if ! IGNORE_SYSTEM_RLIMIT
-#if UNIX
-                    {
-                        struct rlimit rlim;
-                        int status = getrlimit ( RLIMIT_AS, & rlim );
-                        if ( status == 0 )
-                            obj -> cached_blob_limit = rlim . rlim_cur >> 1;
-                    }
-#endif
-#endif
-                    /* initialize against one or more alignment tables */
-                    if ( wants_primary )
-                        CSRA1_PileupInitAlignment ( obj, ctx, db, "PRIMARY_ALIGNMENT", & obj -> pa . curs, CSRA1_PileupPopulatePACurs );
-                    if ( wants_secondary && ! FAILED () )
-                    {
-                        ON_FAIL ( CSRA1_PileupInitAlignment ( obj, ctx, db, "SECONDARY_ALIGNMENT", & obj -> sa . curs, CSRA1_PileupPopulateSACurs ) )
-                        {
-                            /* TBD - need the ability to convert hard error to warning
-                               stating that we have primary, but no secondary */
-                            if ( wants_primary )
-                                CLEAR ();
-                        }
-                    }
-                }
-            }
-        }
-    }
-}
-
-NGS_Pileup * CSRA1_PileupIteratorMake ( ctx_t ctx,
-    NGS_Reference * ref, const VDatabase * db, const NGS_Cursor * curs_ref,
-    int64_t first_row_id, int64_t last_row_id, bool wants_primary, bool wants_secondary,
-    uint32_t filters, int32_t map_qual )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    CSRA1_Pileup * obj;
-
-    assert ( db != NULL );
-    assert ( curs_ref != NULL );
-    assert ( wants_primary || wants_secondary );
-
-    obj = calloc ( 1, sizeof * obj );
-    if ( obj == NULL )
-    {
-        TRY ( NGS_String * ref_spec = NGS_ReferenceGetCommonName ( ref, ctx ) )
-        {
-            SYSTEM_ERROR ( xcNoMemory, 
-                           "allocating CSRA1_Pileup on '%.*s'", 
-                           NGS_StringSize ( ref_spec, ctx ), 
-                           NGS_StringData ( ref_spec, ctx ) );
-            NGS_StringRelease ( ref_spec, ctx );
-        }
-        CATCH_ALL ()
-        {
-            CLEAR ();
-            SYSTEM_ERROR ( xcNoMemory, "allocating CSRA1_Pileup" );
-        }
-    }
-    else
-    {
-#if TRACK_REFERENCES
-        char instname [ 256 ];
-        TRY ( NGS_String * ref_spec = NGS_ReferenceGetCommonName ( ref, ctx ) )
-        {
-            string_printf ( instname, 
-                            sizeof instname, 
-                            NULL, 
-                            "%.*s", 
-                            NGS_StringSize ( ref_spec, ctx ), 
-                            NGS_StringData ( ref_spec, ctx )
-                );
-            NGS_StringRelease ( ref_spec, ctx );
-            instname [ sizeof instname - 1 ] = 0;
-        }
-        CATCH_ALL ()
-        {
-            CLEAR ();
-            string_copy_measure ( instname, sizeof instname, "unknown" );
-        }
-#else
-        const char * instname = "unknown";
-#endif
-        TRY ( CSRA1_PileupInit ( ctx, obj, instname, ref, db, curs_ref, first_row_id, last_row_id, wants_primary, wants_secondary, filters, map_qual ) )
-        {
-            obj -> state = pileup_state_initial;
-            return & obj -> dad . dad;
-        }
-
-        CSRA1_PileupWhack ( obj, ctx );
-        free ( obj );
-    }
-
-    return NULL;
-}
-
-NGS_Pileup * CSRA1_PileupIteratorMakeSlice ( ctx_t ctx,
-    NGS_Reference * ref, const VDatabase * db, const NGS_Cursor * curs_ref,
-    int64_t first_row_id, int64_t last_row_id, uint64_t slice_zstart, 
-    uint64_t slice_size, bool wants_primary, bool wants_secondary,
-    uint32_t filters, int32_t map_qual )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    uint64_t ref_len;
-
-    assert ( ref != NULL );
-
-    TRY ( ref_len = NGS_ReferenceGetLength ( ref, ctx ) )
-    {
-        if ( slice_zstart >= ref_len )
-        {
-            TRY ( NGS_String * ref_spec = NGS_ReferenceGetCommonName ( ref, ctx ) )
-            {
-                USER_ERROR ( xcParamOutOfBounds, 
-                             "slice start %lu, reference length %lu, "
-                             "allocating CSRA1_Pileup on '%.*s'", 
-                             slice_zstart,
-                             ref_len,
-                             NGS_StringSize ( ref_spec, ctx ), 
-                             NGS_StringData ( ref_spec, ctx ) );
-                NGS_StringRelease ( ref_spec, ctx );
-            }
-            CATCH_ALL ()
-            {
-                CLEAR ();
-                USER_ERROR ( xcParamOutOfBounds, "slice start %lu, reference length %lu, "
-                             "allocating CSRA1_Pileup", slice_zstart, ref_len );
-            }
-        }
-        else
-        {
-            TRY ( NGS_Pileup * obj = CSRA1_PileupIteratorMake ( ctx, ref, db, curs_ref,
-                first_row_id, last_row_id, wants_primary, wants_secondary, filters, map_qual ) )
-            {
-                CSRA1_Pileup * self = ( CSRA1_Pileup * ) obj;
-
-                /* limit slice length */
-                if ( self -> circular )
-                {
-                    /* limit to ref_len */
-                    if ( slice_size > ref_len ) 
-                        slice_size = ref_len;
-                }
-                else
-                {
-                    /* limit to end of reference */
-                    if ( slice_zstart + slice_size > ref_len )
-                        slice_size = ref_len - slice_zstart;
-                }
-
-                /* add slice boundaries */
-                self -> ref_zpos        = slice_zstart;
-                self -> slice_zstart    = slice_zstart;
-                self -> slice_xend      = slice_zstart + slice_size;
-
-                /* update slice row-ids */
-                assert ( self -> ref . max_seq_len != 0 );
-                self -> slice_start_id  = slice_zstart / self -> ref . max_seq_len + self -> reference_start_id;
-                self -> slice_end_id    = ( self -> slice_xend - 1 ) / self -> ref . max_seq_len + self -> reference_start_id;
-
-                return obj;
-            }
-        }
-    }
-
-    return NULL;
-}
-
-/* GetEntry
- */
-const void * CSRA1_PileupGetEntry ( CSRA1_Pileup * self, ctx_t ctx,
-    CSRA1_Pileup_Entry * entry, uint32_t col_idx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    rc_t rc;
-    CSRA1_Pileup_AlignCursorData * cd = entry -> secondary ? & self -> sa : & self -> pa;
-
-    assert ( entry -> blob [ col_idx ] == NULL );
-
-    ON_FAIL ( CSRA1_Pileup_AlignCursorDataGetCell ( cd, ctx, entry -> row_id, col_idx ) )
-        return NULL;
-
-    /* if the entry is not already marked as having temporary data */
-    if ( ! entry -> temporary )
-    {
-        /* get the size of the newly loaded blob */
-        size_t blob_size;
-        const VBlob * blob = cd -> blob [ col_idx ];
-        rc = VBlobSize ( blob, & blob_size );
-
-        /* a failure would generally represent an internal error */
-        if ( rc != 0 )
-        {
-PRINT ( ">>> failed to determine blob size: rc = %u\n", rc );
-            entry -> temporary = true;
-        }
-
-        /* test if caching this blob would exceed limit, and mark temporary if so */
-        else if ( self -> cached_blob_total + blob_size > self -> cached_blob_limit )
-        {
-PRINT ( ">>> marking blob caching as temporary due to limits: %lu in cache, %lu in blob, limit %lu.\n"
-        , ( unsigned long ) self -> cached_blob_total
-        , ( unsigned long ) blob_size
-        , ( unsigned long ) self -> cached_blob_limit
-    );
-
-            entry -> temporary = true;
-        }
-        else
-        {
-            /* cache the blob on entry */
-            rc = VBlobAddRef ( blob );
-            if ( rc != 0 )
-            {
-#if 1
-                /* having the ability to NOT cache, eat error */
-                entry -> temporary = true;
-#else
-                INTERNAL_ERROR ( xcRefcountOutOfBounds, "VBlob at %#p", cd -> blob [ col_idx ] );
-                return NULL;
-#endif
-            }
-            else
-            {
-                /* record the blob reference on entry */
-                entry -> blob [ col_idx ] = cd -> blob [ col_idx ];
-
-                /* accounting */
-                entry -> blob_total += blob_size;
-                self -> cached_blob_total += blob_size;
-            }
-        }
-    }
-
-    /* in all cases, record the cell data */
-    entry -> cell_len [ col_idx ] = cd -> cell_len [ col_idx ];
-    return entry -> cell_data [ col_idx ] = cd -> cell_data [ col_idx ];
-}
diff --git a/libs/ngs/CSRA1_Pileup.h b/libs/ngs/CSRA1_Pileup.h
deleted file mode 100644
index 2fd39d4..0000000
--- a/libs/ngs/CSRA1_Pileup.h
+++ /dev/null
@@ -1,341 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_csra1_pileup_
-#define _h_csra1_pileup_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_insdc_insdc_
-#include <insdc/insdc.h>
-#endif
-
-#ifndef _h_ngs_pileup_
-#include "NGS_Pileup.h"
-#endif
-
-#ifndef _h_csra1_reference_
-#include "CSRA1_Reference.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct VBlob;
-struct VTable;
-struct VCursor;
-struct KVector;
-struct VDatabase;
-struct NGS_Cursor;
-struct NGS_Reference;
-
-
-/*--------------------------------------------------------------------------
- * CSRA1_Pileup_Entry
- *  holds extracted data from an alignment record
- *  kept in a list of alignments that intersect the current pileup position
- */
-enum
-{
-    pileup_event_col_MAPQ,
-    pileup_event_col_REF_OFFSET,
-    pileup_event_col_HAS_REF_OFFSET,
-    pileup_event_col_MISMATCH,
-    pileup_event_col_HAS_MISMATCH,
-    pileup_event_col_REF_ORIENTATION,
-    pileup_event_col_QUALITY,
-
-    pileup_event_col_REF_OFFSET_TYPE,           /* OPTIONAL */
-
-    pileup_event_col_count
-};
-
-typedef struct CSRA1_Pileup_Entry_State CSRA1_Pileup_Entry_State;
-struct CSRA1_Pileup_Entry_State
-{
-    /* insertion count */
-    uint32_t ins_cnt;
-
-    /* deletion count */
-    uint32_t del_cnt;
-
-    /* offset into REF_OFFSET */
-    uint32_t ref_off_idx;
-
-    /* offset into MISMATCH */
-    uint32_t mismatch_idx;
-
-    /* offset into aligned sequence */
-    uint32_t seq_idx;
-
-    /* adjustment to "zstart" for current alignment */
-    volatile int32_t zstart_adj; /* TODO: find out why volatile or remove it */
-
-    /* set to a base or NUL if not set */
-    char mismatch;
-};
-
-enum 
-{
-    pileup_entry_status_INITIAL,
-    pileup_entry_status_VALID,
-    pileup_entry_status_DONE
-};
-
-typedef struct CSRA1_Pileup_Entry CSRA1_Pileup_Entry;
-struct CSRA1_Pileup_Entry
-{
-    /* list node */
-    DLNode node;
-
-    /* row id within the alignment table indicated by "secondary" */
-    int64_t row_id;
-
-    /* projected range upon reference */
-    int64_t zstart;
-    int64_t xend;  /* EXCLUSIVE */
-
-    /* blob cache to ensure cell-data remain valid */
-    struct VBlob const * blob [ pileup_event_col_count ];
-    size_t blob_total;
-
-    /* cell data of interest to pileup event */
-    const void * cell_data [ pileup_event_col_count ];
-    uint32_t cell_len [ pileup_event_col_count ];
-
-    /* current state of the event */
-    CSRA1_Pileup_Entry_State state_curr;
-
-    /* to properly set the current state we have to look ahead */
-    CSRA1_Pileup_Entry_State state_next;
-
-    /* true if alignment comes from secondary table */
-    bool secondary;
-
-    /* true if blobs were not entirely cached */
-    bool temporary;
-
-    /* true if event has already been seen */
-    bool seen;
-
-    /* the status of the entry: one of pileup_entry_status_* */
-    int status;
-};
-
-
-/*--------------------------------------------------------------------------
- * CSRA1_PileupEvent
- *  built-in base class iterator
- */
-struct CSRA1_PileupEvent
-{
-    NGS_Pileup dad;
-
-    /* current alignment being examined */
-    CSRA1_Pileup_Entry * entry;
-
-    /* set to true within "next" */
-    bool seen_first;
-};
-
-
-/*--------------------------------------------------------------------------
- * CSRA1_Pileup_AlignList
- *  list of alignments that intersect the current pileup position
- */
-typedef struct CSRA1_Pileup_AlignList CSRA1_Pileup_AlignList;
-struct CSRA1_Pileup_AlignList
-{
-    DLList pileup;
-    DLList waiting;
-    uint32_t depth;
-    uint32_t avail;
-    uint32_t observed;
-    uint32_t max_ref_len;
-};
-
-
-/*--------------------------------------------------------------------------
- * CSRA1_Pileup_RefCursorData
- *  cursor and cell data from REFERENCE table
- */
-typedef struct CSRA1_Pileup_RefCursorData CSRA1_Pileup_RefCursorData;
-struct CSRA1_Pileup_RefCursorData
-{
-    struct NGS_Cursor const * curs;
-    struct KVector const * pa_ids;
-    struct KVector const * sa_ids;
-    uint32_t max_seq_len;
-};
-
-
-/*--------------------------------------------------------------------------
- * CSRA1_Pileup_AlignCursorData
- *  cursor, blobs, cell data and column indices from *_ALIGNMENT table
- */
-enum
-{
-    /* pileup-align columns are in a different space from pileup-event columns */
-    pileup_align_col_REF_POS = pileup_event_col_count,
-    pileup_align_col_REF_LEN,
-    pileup_align_col_READ_FILTER,
-
-    /* total of combined columns managed by pileup */
-    pileup_align_col_total
-};
-
-typedef struct CSRA1_Pileup_AlignCursorData CSRA1_Pileup_AlignCursorData;
-struct CSRA1_Pileup_AlignCursorData
-{
-    struct VCursor const * curs;
-    struct VBlob const * blob [ pileup_align_col_total ];
-    const void * cell_data [ pileup_align_col_total ];
-    uint32_t cell_len [ pileup_align_col_total ];
-    uint32_t col_idx [ pileup_align_col_total ];
-    bool missing_REF_OFFSET_TYPE;
-};
-
-
-/*--------------------------------------------------------------------------
- * CSRA1_Pileup
- *  represents a pileup iterator
- */
-typedef struct CSRA1_Pileup CSRA1_Pileup;
-struct CSRA1_Pileup
-{
-    struct CSRA1_PileupEvent dad;   
-
-    /* rows for this chromosome: [ reference_start_id, reference_last_id ] */
-    int64_t reference_start_id;
-    int64_t reference_last_id;
-
-    /* effective reference start */
-    int64_t effective_ref_zstart; /* ZERO-BASED */
-
-    /* rows for this slice: [ slice_start_id, slice_end_id ] */
-    int64_t slice_start_id;
-    int64_t slice_end_id;
-
-    /* reference coordinate window: [ slice_start, slice_xend ) */
-    int64_t slice_zstart;    /* ZERO-BASED */
-    int64_t slice_xend;      /* EXCLUSIVE  */
-
-    /* current iterator position on reference and its chunk id */
-    int64_t ref_zpos;
-    int64_t ref_chunk_id;
-
-    /* end of current chunk */
-    int64_t ref_chunk_xend;
-
-    /* current chunk for reading alignment ids */
-    int64_t idx_chunk_id;
-
-    /* cached vblob limit and sum */
-    size_t cached_blob_limit;
-    size_t cached_blob_total;
-
-    /* pointer to bases of current reference chunk */
-    const INSDC_dna_text * ref_chunk_bases;
-
-    /* list of alignments under this position */
-    CSRA1_Pileup_AlignList align;
-
-    /* reference cursor/data */
-    CSRA1_Pileup_RefCursorData ref;
-
-    /* alignment cursor/data */
-    CSRA1_Pileup_AlignCursorData pa, sa;
-
-    /* alignment filters */
-    uint32_t filters;
-    int32_t map_qual;
-
-    /* reference base - lazily populated */
-    char ref_base;
-
-    uint8_t state;
-    bool circular;      /* true iff Reference is circular */
-};
-
-/* Make
- *  make an iterator across entire reference
- */
-struct NGS_Pileup * CSRA1_PileupIteratorMake ( ctx_t ctx, struct NGS_Reference * ref,
-    struct VDatabase const * db, struct NGS_Cursor const * curs_ref,
-    int64_t first_row_id, int64_t last_row_id, bool wants_primary, bool wants_secondary,
-    uint32_t filters, int32_t map_qual );
-
-/* MakeSlice
- *  make an iterator across a portion of reference
- */
-struct NGS_Pileup * CSRA1_PileupIteratorMakeSlice ( ctx_t ctx, struct NGS_Reference * ref,
-    struct VDatabase const * db, struct NGS_Cursor const * curs_ref,
-    int64_t first_row_id, int64_t last_row_id, uint64_t slice_start, 
-    uint64_t slice_size, bool wants_primary, bool wants_secondary,
-    uint32_t filters, int32_t map_qual );
-
-/* GetEntry
- */
-const void * CSRA1_PileupGetEntry ( CSRA1_Pileup * self, ctx_t ctx,
-    CSRA1_Pileup_Entry * entry, uint32_t col_idx );
-
-/* PileupEntry method declarations */
-void CSRA1_PileupEventWhack ( struct CSRA1_PileupEvent * self, ctx_t ctx );
-int CSRA1_PileupEventGetMappingQuality ( struct CSRA1_PileupEvent const * self, ctx_t ctx );
-struct NGS_String * CSRA1_PileupEventGetAlignmentId ( struct CSRA1_PileupEvent const * self, ctx_t ctx );
-struct NGS_Alignment * CSRA1_PileupEventGetAlignment ( struct CSRA1_PileupEvent const * self, ctx_t ctx );
-int64_t CSRA1_PileupEventGetAlignmentPosition ( struct CSRA1_PileupEvent const * self, ctx_t ctx );
-int64_t CSRA1_PileupEventGetFirstAlignmentPosition ( struct CSRA1_PileupEvent const * self, ctx_t ctx );
-int64_t CSRA1_PileupEventGetLastAlignmentPosition ( struct CSRA1_PileupEvent const * self, ctx_t ctx );
-int CSRA1_PileupEventGetEventType ( struct CSRA1_PileupEvent const * self, ctx_t ctx );
-char CSRA1_PileupEventGetAlignmentBase ( struct CSRA1_PileupEvent const * self, ctx_t ctx );
-char CSRA1_PileupEventGetAlignmentQuality ( struct CSRA1_PileupEvent const * self, ctx_t ctx );
-struct NGS_String * CSRA1_PileupEventGetInsertionBases ( struct CSRA1_PileupEvent const * self, ctx_t ctx );
-struct NGS_String * CSRA1_PileupEventGetInsertionQualities ( struct CSRA1_PileupEvent const * self, ctx_t ctx );
-unsigned int CSRA1_PileupEventGetRepeatCount ( struct CSRA1_PileupEvent const * self, ctx_t ctx );
-int CSRA1_PileupEventGetIndelType ( struct CSRA1_PileupEvent const * self, ctx_t ctx );
-bool CSRA1_PileupEventIteratorNext ( struct CSRA1_PileupEvent * self, ctx_t ctx );
-void CSRA1_PileupEventIteratorReset ( struct CSRA1_PileupEvent * self, ctx_t ctx );
-void CSRA1_PileupEventInit ( ctx_t ctx, struct CSRA1_PileupEvent * obj, const NGS_Pileup_vt * vt,
-    const char * clsname, const char * instname, struct NGS_Reference * ref );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_csra1_pileup_ */
diff --git a/libs/ngs/CSRA1_PileupEvent.c b/libs/ngs/CSRA1_PileupEvent.c
deleted file mode 100644
index c56cd82..0000000
--- a/libs/ngs/CSRA1_PileupEvent.c
+++ /dev/null
@@ -1,931 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-typedef struct CSRA1_PileupEvent CSRA1_PileupEvent;
-#define NGS_PILEUPEVENT CSRA1_PileupEvent
-#include "NGS_PileupEvent.h"
-
-#include "CSRA1_PileupEvent.h"
-#include "CSRA1_Pileup.h"
-#include "NGS_Pileup.h"
-#include "NGS_Reference.h"
-#include "NGS_ReadCollection.h"
-#include "NGS_Id.h"
-#include "NGS_String.h"
-#include "NGS_Cursor.h"
-
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <align/align.h>
-
-#include <klib/printf.h>
-
-#include "NGS_String.h"
-#include "NGS_Pileup.h"
-
-#include <sysalloc.h>
-#include <string.h> /* memset */
-
-#define CSRA1_PileupEventGetPileup( self ) \
-    ( ( CSRA1_Pileup * ) ( self ) )
-
-static
-void CSRA1_PileupEventStateTest ( const CSRA1_PileupEvent * self, ctx_t ctx, uint32_t lineno )
-{
-    assert ( self != NULL );
-
-    if ( ! self -> seen_first )
-    {
-        ctx_event ( ctx, lineno, xc_sev_fail, xc_org_user, xcIteratorUninitialized,
-                    "PileupEvent accessed before a call to PileupEventIteratorNext()" );
-    }
-    else if ( self -> entry == NULL )
-    {
-        ctx_event ( ctx, lineno, xc_sev_fail, xc_org_user, xcCursorExhausted, "No more rows available" );
-    }
-}
-
-#define CHECK_STATE( self, ctx ) \
-    CSRA1_PileupEventStateTest ( self, ctx, __LINE__ )
-
-
-void CSRA1_PileupEventWhack ( CSRA1_PileupEvent * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcDestroying );
-    NGS_PileupWhack ( & self -> dad, ctx );
-}
-
-static
-const void * CSRA1_PileupEventGetEntry ( const CSRA1_PileupEvent * self, ctx_t ctx,
-    CSRA1_Pileup_Entry * entry, uint32_t col_idx )
-{
-    if ( entry -> cell_data [ col_idx ] == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        return CSRA1_PileupGetEntry ( CSRA1_PileupEventGetPileup ( self ), ctx, entry, col_idx );
-    }
-
-    return entry -> cell_data [ col_idx ];
-}
-
-static
-const void * CSRA1_PileupEventGetNonEmptyEntry ( const CSRA1_PileupEvent * self, ctx_t ctx,
-    CSRA1_Pileup_Entry * entry, uint32_t col_idx )
-{
-    if ( entry -> cell_len [ col_idx ] == 0 )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-        if ( entry -> cell_data [ col_idx ] == NULL )
-            CSRA1_PileupGetEntry ( CSRA1_PileupEventGetPileup ( self ), ctx, entry, col_idx );
-        
-        if ( entry -> cell_len [ col_idx ] == 0 )
-        {
-            INTERNAL_ERROR ( xcColumnEmpty, "zero-length cell data (row_id = %ld, col_idx = %u)", entry->row_id, col_idx );
-            return NULL;
-        }
-    }
-    return entry -> cell_data [ col_idx ];
-}
-
-int CSRA1_PileupEventGetMappingQuality ( const CSRA1_PileupEvent * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        const int32_t * MAPQ;
-        TRY ( MAPQ = CSRA1_PileupEventGetNonEmptyEntry ( self, ctx, self -> entry, pileup_event_col_MAPQ ) )
-        {
-            return MAPQ [ 0 ];
-        }
-    }
-    return 0;
-}
-
-struct NGS_String * CSRA1_PileupEventGetAlignmentId ( const CSRA1_PileupEvent * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        NGS_ReadCollection * coll = self -> dad . dad . ref -> coll;
-        TRY ( const NGS_String * run = NGS_ReadCollectionGetName ( coll, ctx ) )
-        {
-            enum NGS_Object obj_type = self -> entry -> secondary ?
-                NGSObject_SecondaryAlignment : NGSObject_PrimaryAlignment;
-            return NGS_IdMake ( ctx, run, obj_type, self -> entry -> row_id );
-        }
-    }
-    return NULL;
-}
-
-int64_t CSRA1_PileupEventGetAlignmentPosition ( const CSRA1_PileupEvent * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        return self -> entry -> state_curr . seq_idx;
-    }
-
-    return 0;
-}
-
-int64_t CSRA1_PileupEventGetFirstAlignmentPosition ( const CSRA1_PileupEvent * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        return self -> entry -> zstart;
-    }
-
-    return 0;
-}
-
-int64_t CSRA1_PileupEventGetLastAlignmentPosition ( const CSRA1_PileupEvent * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        return self -> entry -> xend - 1;
-    }
-    return 0;
-}
-
-int CSRA1_PileupEventGetEventType ( const CSRA1_PileupEvent * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    int event_type = 0;
-
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        const bool * REF_ORIENTATION;
-
-        CSRA1_Pileup_Entry * entry = self -> entry;
-
-        /*
-          during "next" we took these steps:
-          1. if within a deletion, decrement deletion repeat && exit if ! 0
-          2. check HAS_REF_OFFSET. if not false:
-             a. a positive REF_OFFSET[ref_offset_idx] indicates a deletion
-             b. a negative REF_OFFSET[ref_offset_idx] indicates an insertion
-          3. move current offset ahead until ref_pos >= that of pileup
-          
-          so here, we first detect a deletion event
-          next, we detect a match or mismatch by checking HAS_MISMATCH.
-          if there was a prior insertion, we or that onto the event.
-          if this event starts a new alignment, or start onto event.
-          if it ends an alignment, or that onto the event.
-        */
-
-        if ( entry -> state_curr . del_cnt != 0 )
-            event_type = NGS_PileupEventType_deletion;
-        else
-        {
-            const bool * HAS_MISMATCH = entry -> cell_data [ pileup_event_col_HAS_MISMATCH ];
-            assert ( HAS_MISMATCH != NULL );
-            assert ( entry -> state_curr . seq_idx < entry -> cell_len [ pileup_event_col_HAS_MISMATCH ] );
-            event_type = HAS_MISMATCH [ entry -> state_curr . seq_idx ];
-        }
-
-        /* detect prior insertion */
-        if ( entry -> state_curr . ins_cnt != 0 )
-            event_type |= NGS_PileupEventType_insertion;
-
-        /* detect initial event */
-        if ( CSRA1_PileupEventGetPileup ( self ) -> ref_zpos == entry -> zstart )
-            event_type |= NGS_PileupEventType_start;
-
-        /* detect final event */
-        if ( CSRA1_PileupEventGetPileup ( self ) -> ref_zpos + 1 == entry -> xend ||
-            entry -> status == pileup_entry_status_DONE)
-        {
-            event_type |= NGS_PileupEventType_stop;
-        }
-
-        /* detect minus strand */
-        TRY ( REF_ORIENTATION = CSRA1_PileupEventGetEntry ( self, ctx, entry, pileup_event_col_REF_ORIENTATION ) )
-        {
-            assert ( REF_ORIENTATION != NULL );
-            assert ( entry -> cell_len [ pileup_event_col_REF_ORIENTATION ] == 1 );
-            if ( REF_ORIENTATION [ 0 ] )
-                event_type |= NGS_PileupEventType_minus_strand;
-        }
-
-    }
-    
-    return event_type;
-}
-
-char CSRA1_PileupEventGetAlignmentBase ( const CSRA1_PileupEvent * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        CSRA1_Pileup * pileup;
-        CSRA1_Pileup_Entry * entry = self -> entry;
-        const bool * HAS_MISMATCH = entry -> cell_data [ pileup_event_col_HAS_MISMATCH ];
-
-        if ( entry -> state_curr . del_cnt != 0 )
-            return '-';
-
-        assert ( HAS_MISMATCH != NULL );
-        assert ( entry -> state_curr . seq_idx < entry -> cell_len [ pileup_event_col_HAS_MISMATCH ] );
-
-        if ( HAS_MISMATCH [ entry -> state_curr . seq_idx ] )
-        {
-            if ( entry -> state_curr . mismatch == 0 )
-            {
-                const INSDC_dna_text * MISMATCH;
-                TRY ( MISMATCH = CSRA1_PileupEventGetEntry ( self, ctx, entry, pileup_event_col_MISMATCH ) )
-                {
-                    if ( entry -> state_curr . mismatch_idx < entry -> cell_len [ pileup_event_col_MISMATCH ] )
-                        entry -> state_curr . mismatch = MISMATCH [ entry -> state_curr . mismatch_idx ];
-                }
-            }
-
-            return entry -> state_curr . mismatch;
-        }
-
-        pileup = CSRA1_PileupEventGetPileup ( self );
-        if ( pileup -> ref_base == 0 )
-        {
-            if ( pileup -> ref_chunk_bases == NULL )
-            {
-                const void * base;
-                uint32_t elem_bits, boff, row_len;
-                ON_FAIL ( NGS_CursorCellDataDirect ( pileup -> ref . curs, ctx, pileup -> ref_chunk_id,
-                    reference_READ, & elem_bits, & base, & boff, & row_len ) )
-                {
-                    return 0;
-                }
-
-                pileup -> ref_chunk_bases = base;
-                assert ( row_len == pileup -> ref . max_seq_len ||
-                         pileup -> ref_chunk_xend - pileup -> ref . max_seq_len + row_len >= pileup -> slice_xend );
-            }
-
-            assert ( pileup -> ref . max_seq_len != 0 );
-            pileup -> ref_base = pileup -> ref_chunk_bases [ CSRA1_PileupEventGetPileup ( self ) -> ref_zpos % pileup -> ref . max_seq_len ]; 
-        }
-
-        return pileup -> ref_base;
-    }
-    return 0;
-}
-
-char CSRA1_PileupEventGetAlignmentQuality ( const CSRA1_PileupEvent * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        const INSDC_quality_phred * QUALITY;
-
-        CSRA1_Pileup_Entry * entry = self -> entry;
-
-        if ( entry -> state_curr . del_cnt != 0 )
-            return '!';
-        
-        TRY ( QUALITY = CSRA1_PileupEventGetEntry ( self, ctx, entry, pileup_event_col_QUALITY ) )
-        {
-            assert ( QUALITY != NULL );
-            assert ( entry -> state_curr . seq_idx < entry -> cell_len [ pileup_event_col_QUALITY ] );
-            return ( char ) ( QUALITY [ entry -> state_curr . seq_idx ] + 33 );
-        }
-    }
-    return 0;
-}
-
-struct NGS_String * CSRA1_PileupEventGetInsertionBases ( const CSRA1_PileupEvent * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        CSRA1_Pileup_Entry * entry = self -> entry;
-
-        /* handle the case where there is no insertion */
-        if ( entry -> state_curr . ins_cnt == 0 )
-        {
-            return NGS_StringMake ( ctx, "", 0 );
-        }
-        else
-        {
-            /* allocate a buffer for the NGS_String */
-            char * buffer = calloc ( 1, entry -> state_curr . ins_cnt + 1 );
-            if ( buffer == NULL )
-                SYSTEM_ERROR ( xcNoMemory, "allocating %zu bytes", entry -> state_curr . ins_cnt + 1 );
-            else
-            {
-                const INSDC_dna_text * MISMATCH;
-                const bool * HAS_MISMATCH = entry -> cell_data [ pileup_event_col_HAS_MISMATCH ];
-                assert ( HAS_MISMATCH != NULL );
-
-                /* it is "possible" but not likely that we may not need the MISMATCH cell.
-                   this would be the case if there was an insertion that exactly repeated
-                   a region of the reference, such that there were no mismatches in it.
-                   but even so, it should not be a problem to prefetch MISMATCH */
-                TRY ( MISMATCH = CSRA1_PileupEventGetEntry ( self, ctx, entry, pileup_event_col_MISMATCH ) )
-                {
-                    uint32_t ref_first = entry -> state_curr . seq_idx;
-                    uint32_t mismatch_idx = entry -> state_curr . mismatch_idx;
-                    uint32_t seq_idx, ins_start = entry -> state_curr . seq_idx - entry -> state_curr . ins_cnt;
-
-                    assert ( MISMATCH != 0 );
-
-                    /* seq_idx MUST be > ins_cnt, which is non-zero, ...
-                       for seq_idx to be == ins_cnt implies that the sequence
-                       starts with an insertion, otherwise considered a soft-clip,
-                       and not an insertion at all.
-                     */
-                    assert ( entry -> state_curr . seq_idx > entry -> state_curr . ins_cnt );
-
-                    /* fill in the buffer with each entry from mismatch */
-                    for ( seq_idx = entry -> state_curr . seq_idx - 1; seq_idx >= ins_start; -- seq_idx )
-                    {
-                        /* pull base from MISMATCH */
-                        if ( HAS_MISMATCH [ seq_idx ] )
-                            buffer [ seq_idx - ins_start ] = MISMATCH [ -- mismatch_idx ];
-
-                        /* will need to get base from reference */
-                        else
-                            ref_first = seq_idx;
-                    }
-
-                    /* if there are some to be filled from reference */
-                    if ( entry -> state_curr . mismatch_idx - mismatch_idx != entry -> state_curr . ins_cnt )
-                    {
-                        CSRA1_Pileup * pileup = CSRA1_PileupEventGetPileup ( self );
-
-                        /* a little more complex than we'd like here...
-                           chances are quite good that the matched portion of the reference
-                           is in our current chunk, but it's not guaranteed,
-                           nor is it guaranteed to be in a single chunk. */
-
-                        /* the number of characters in string that could come from reference */
-                        uint32_t str_len = entry -> state_curr . seq_idx - ref_first;
-
-                        /* offset the string buffer to the first base to be filled by reference */
-                        char * rbuffer = & buffer [ entry -> state_curr . ins_cnt - str_len ];
-
-                        /* the current chunk of reference bases or NULL */
-                        const INSDC_dna_text * READ = pileup -> ref_chunk_bases;
-
-                        /* generate range of reference positions */
-                        int64_t ins_ref_zstart = CSRA1_PileupEventGetPileup ( self ) -> ref_zpos - ( int64_t ) str_len;
-                        int64_t ins_ref_last = CSRA1_PileupEventGetPileup ( self ) -> ref_zpos - 1;
-
-                        /* generate range of reference chunk ids */
-                        int64_t ins_ref_start_id = ins_ref_zstart / pileup -> ref . max_seq_len + pileup -> reference_start_id;
-                        int64_t ins_ref_last_id = ins_ref_last / pileup -> ref . max_seq_len + pileup -> reference_start_id;
-
-                        /* the starting offset into the left-most reference chunk */
-                        uint32_t ref_off = ( uint32_t ) ( ins_ref_zstart % pileup -> ref . max_seq_len );
-
-                        /* check for error in the starting position: must be >= 0 */
-                        if ( ins_ref_zstart < 0 )
-                        {
-                            INTERNAL_ERROR ( xcParamOutOfBounds, "insertion string accessing reference at position %ld", ins_ref_zstart );
-                            free ( buffer );
-                            return NULL;
-                        }
-
-                        /* try to take advantage of the chunk that's loaded right now */
-                        if ( READ != NULL && pileup -> ref_chunk_id == ins_ref_last_id )
-                        {
-                            /* most common case - everything within this chunk */
-                            if ( ins_ref_start_id == ins_ref_last_id )
-                            {
-                                /* "seq_off" is implied 0, i.e. start of insertion sequence.
-                                   "ref_off" is calculated start of insert in reference coords modulo chunk size */
-                                for ( seq_idx = 0; seq_idx < str_len; ++ seq_idx )
-                                {
-                                    if ( rbuffer [ seq_idx ] == 0 )
-                                        rbuffer [ seq_idx ] = READ [ ref_off + seq_idx ];
-                                }
-                                goto buffer_complete;
-                            }
-                            /* less common case - share only part of this chunk */
-                            else
-                            {
-                                /* "ref_off" is implied 0, i.e. start of reference chunk which is
-                                   known to be the last but not first chunk, therefore the start is
-                                   at 0 where the insertion crosses chunk boundaries.
-                                   "seq_off" is the start of the last portion of the string to
-                                   intersect this reference chunk. */
-                                uint32_t seq_off = str_len - ( uint32_t ) ( CSRA1_PileupEventGetPileup ( self ) -> ref_zpos % pileup -> ref . max_seq_len );
-                                for ( seq_idx = seq_off; seq_idx < str_len; ++ seq_idx )
-                                {
-                                    if ( rbuffer [ seq_idx ] == 0 )
-                                        rbuffer [ seq_idx ] = READ [ seq_idx - seq_off ];
-                                }
-
-                                /* the last part of the string has been completed */
-                                str_len = seq_off;
-                                -- ins_ref_last_id;
-                            }
-                        }
-
-                        /* forget current reference chunk */
-                        pileup -> ref_chunk_bases = NULL;
-                        pileup -> ref_base = 0;
-
-                        /* set the reference offset of initial chunk */
-                        ref_off = ( uint32_t ) ( ins_ref_zstart % pileup -> ref . max_seq_len );
-
-                        /* walk from ins_ref_start_id to ins_ref_last_id */
-                        for ( seq_idx = 0; ins_ref_start_id <= ins_ref_last_id; ++ ins_ref_start_id, ref_off = 0 )
-                        {
-                            const void * base;
-                            uint32_t limit, seq_off, row_len;
-                            ON_FAIL ( NGS_CursorCellDataDirect ( pileup -> ref . curs, ctx, ins_ref_start_id,
-                                reference_READ, & limit, & base, & seq_off, & row_len ) )
-                            {
-                                READ = NULL;
-                                break;
-                            }
-
-                            READ = base;
-
-                            /* the total number of bases left in insertion string */
-                            limit = str_len - seq_idx;
-
-                            /* cannot exceed the bases available in this chunk */
-                            if ( ref_off + limit > row_len )
-                                limit = row_len - ref_off;
-
-                            /* end index within string */
-                            limit += seq_idx;
-
-                            for ( seq_off = seq_idx; seq_idx < limit; ++ seq_idx )
-                            {
-                                if ( rbuffer [ seq_idx ] == 0 )
-                                    rbuffer [ seq_idx ] = READ [ ref_off + seq_idx - seq_off ];
-                            }
-
-                            /* we stopped either due to:
-                               1. end of string, or
-                               2. end of chunk - in which case
-                                  a. must not be an end chunk, i.e. has row_len == MAX_SEQ_LEN, and
-                                  b. we must loop again
-                            */
-                            assert ( seq_idx == str_len || ( row_len == pileup -> ref . max_seq_len && ins_ref_start_id < ins_ref_last_id ) );
-                        }
-
-                        /* finally, if at this point we have cached the READ for reference
-                           and within our current chunk, save it on the pileup */
-                        if ( ins_ref_last_id == pileup -> ref_chunk_id )
-                            pileup -> ref_chunk_bases = READ;
-                    }
-
-                    if ( ! FAILED () )
-                    {
-                        NGS_String * bases;
-
-                    buffer_complete:
-
-                        TRY ( bases = NGS_StringMakeOwned ( ctx, buffer, entry -> state_curr . ins_cnt ) )
-                        {
-                            return bases;
-                        }
-                    }
-                }
-
-                free ( buffer );
-            }
-        }
-    }
-
-    return NULL;
-}
-
-struct NGS_String * CSRA1_PileupEventGetInsertionQualities ( const CSRA1_PileupEvent * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        CSRA1_Pileup_Entry * entry = self -> entry;
-
-        /* handle the case where there is no insertion */
-        if ( entry -> state_curr . ins_cnt == 0 )
-        {
-            return NGS_StringMake ( ctx, "", 0 );
-        }
-        else
-        {
-            /* allocate a buffer for the NGS_String */
-            char * buffer = calloc ( 1, entry -> state_curr . ins_cnt + 1 );
-            if ( buffer == NULL )
-                SYSTEM_ERROR ( xcNoMemory, "allocating %zu bytes", entry -> state_curr . ins_cnt + 1 );
-            else
-            {
-                const INSDC_quality_phred * QUALITY;
-                TRY ( QUALITY = CSRA1_PileupEventGetEntry ( self, ctx, entry, pileup_event_col_QUALITY ) )
-                {
-                    NGS_String * bases;
-                    uint32_t i, qstart = entry -> state_curr . seq_idx - entry -> state_curr . ins_cnt;
-
-                    assert ( QUALITY != NULL );
-                    assert ( entry -> state_curr . seq_idx <= entry -> cell_len [ pileup_event_col_QUALITY ] );
-                    assert ( entry -> state_curr . seq_idx >= entry -> state_curr . ins_cnt );
-
-                    for ( i = 0; i < entry -> state_curr . ins_cnt; ++ i )
-                        buffer [ i ] = ( char ) ( QUALITY [ qstart + i ] + 33 );
-
-                    TRY ( bases = NGS_StringMakeOwned ( ctx, buffer, entry -> state_curr . ins_cnt ) )
-                    {
-                        return bases;
-                    }
-                }
-
-                free ( buffer );
-            }
-        }
-    }
-
-    return NULL;
-}
-
-unsigned int CSRA1_PileupEventGetRepeatCount ( const CSRA1_PileupEvent * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        bool event_type;
-        uint32_t repeat, limit;
-        const bool * HAS_MISMATCH, * HAS_REF_OFFSET;
-        const CSRA1_Pileup_Entry * entry = self -> entry;
-
-        /* handle the easy part first */
-        if ( entry -> state_curr . del_cnt != 0 )
-            return entry -> state_curr . del_cnt;
-
-        /* now, count the number of repeated matches or mismatches,
-           WITHOUT any intervening insertions or deletions */
-        HAS_MISMATCH = entry -> cell_data [ pileup_event_col_HAS_MISMATCH ];
-        HAS_REF_OFFSET = entry -> cell_data [ pileup_event_col_HAS_REF_OFFSET ];
-        limit = entry -> xend - ( entry -> zstart + entry -> state_curr . zstart_adj );
-
-        /* grab the type of event we have now */
-        event_type = HAS_MISMATCH [ entry -> state_curr . seq_idx ];
-        
-        for ( repeat = 1; repeat < limit; ++ repeat )
-        {
-            if ( HAS_REF_OFFSET [ entry -> state_curr . seq_idx + repeat ] )
-                break;
-            if ( HAS_MISMATCH [ entry -> state_curr . seq_idx + repeat ] != event_type )
-                break;
-        }
-
-        return repeat;
-    }
-    return 0;
-}
-
-int CSRA1_PileupEventGetIndelType ( const CSRA1_PileupEvent * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    TRY ( CHECK_STATE ( self, ctx ) )
-    {
-        CSRA1_Pileup_Entry * entry = self -> entry;
-
-        if ( entry -> state_curr . del_cnt != 0 || entry -> state_curr . ins_cnt != 0 )
-        {
-            CSRA1_Pileup * pileup = CSRA1_PileupEventGetPileup ( self );
-            CSRA1_Pileup_AlignCursorData * cd = entry -> secondary ? & pileup -> sa : & pileup -> pa;
-            if ( ! cd -> missing_REF_OFFSET_TYPE )
-            {
-                const NCBI_align_ro_type * REF_OFFSET_TYPE;
-                TRY ( REF_OFFSET_TYPE = CSRA1_PileupEventGetEntry ( self, ctx, entry, pileup_event_col_REF_OFFSET_TYPE ) )
-                {
-                    assert ( REF_OFFSET_TYPE != NULL );
-                    assert ( entry -> state_curr . ref_off_idx > 0 );
-                    assert ( entry -> state_curr . ref_off_idx <= entry -> cell_len [ pileup_event_col_REF_OFFSET_TYPE ] );
-                    switch ( REF_OFFSET_TYPE [ entry -> state_curr . ref_off_idx - 1 ] )
-                    {
-                    case NCBI_align_ro_normal:
-                    case NCBI_align_ro_soft_clip:
-                        break;
-                    case NCBI_align_ro_intron_plus:
-                        return NGS_PileupIndelType_intron_plus;
-                    case NCBI_align_ro_intron_minus:
-                        return NGS_PileupIndelType_intron_minus;
-                    case NCBI_align_ro_intron_unknown:
-                        return NGS_PileupIndelType_intron_unknown;
-                    case NCBI_align_ro_complete_genomics:
-                        if ( entry -> state_curr . ins_cnt != 0 )
-                            return NGS_PileupIndelType_read_overlap;
-                        assert ( entry -> state_curr . del_cnt != 0 );
-                        return NGS_PileupIndelType_read_gap;
-                    }
-                }
-                CATCH_ALL ()
-                {
-                    CLEAR ();
-                    cd -> missing_REF_OFFSET_TYPE = true;
-                }
-            }
-        }
-
-        return NGS_PileupIndelType_normal;
-    }
-    return 0;
-}
-
-static
-void CSRA1_PileupEventEntryFocus ( CSRA1_PileupEvent * self, CSRA1_Pileup_Entry * entry )
-{
-    const bool * HAS_MISMATCH = entry -> cell_data [ pileup_event_col_HAS_MISMATCH ];
-    const bool * HAS_REF_OFFSET = entry -> cell_data [ pileup_event_col_HAS_REF_OFFSET ];
-    const int32_t * REF_OFFSET = entry -> cell_data [ pileup_event_col_REF_OFFSET ];
-
-    /* we need the entry to be fast-forwarded */
-    int32_t ref_zpos_adj, plus_end_pos;
-    uint32_t next_ins_cnt;
-
-advance_to_the_next_position: /* TODO: try to reorganise the function not to have this goto */
-
-    ref_zpos_adj = CSRA1_PileupEventGetPileup ( self ) -> ref_zpos - entry -> zstart;
-    plus_end_pos = entry->status == pileup_entry_status_INITIAL ? 0 : 1;
-    assert ( ref_zpos_adj >= 0 );
-
-    /* always lose any insertion, forget cached values */
-    /*entry -> state_next . ins_cnt = 0;*/
-    entry -> state_next . mismatch = 0;
-    next_ins_cnt = 0; /* this variable is needed not to erase
-                         state_curr.ins_count on the first iteration
-                         of the next while-loop */ /* TODO: advise with Kurt about the case with INITIAL - should it be reset? */
-
-    /* must advance in all but initial case */
-    assert ( ref_zpos_adj + plus_end_pos > entry -> state_next . zstart_adj || entry -> state_next . zstart_adj == 0 );
-
-    /* walk forward */
-    while ( ref_zpos_adj + plus_end_pos > entry -> state_next . zstart_adj )
-    {
-        entry -> state_curr = entry -> state_next;
-
-        /* within a deletion */
-        if ( entry -> state_next . del_cnt != 0 )
-            -- entry -> state_next . del_cnt;
-
-        else
-        {
-            uint32_t prior_seq_idx = entry -> state_next . seq_idx ++;
-
-            /* adjust mismatch_idx */
-            assert ( HAS_MISMATCH != NULL );
-            assert ( prior_seq_idx < entry -> cell_len [ pileup_event_col_HAS_MISMATCH ] );
-            entry -> state_next . mismatch_idx += HAS_MISMATCH [ prior_seq_idx ];
-
-            /* if the current sequence address is beyond end, bail */
-            if ( entry -> state_next . seq_idx >= entry -> cell_len [ pileup_event_col_HAS_REF_OFFSET ] )
-            {
-                entry -> status = pileup_entry_status_DONE;
-                entry -> state_next . ins_cnt = next_ins_cnt;
-                return;
-            }
-
-            /* retry point for merging events */
-        merge_adjacent_indel_events:
-
-            /* adjust alignment */
-            if ( HAS_REF_OFFSET [ entry -> state_next . seq_idx ] )
-            {
-                assert ( REF_OFFSET != NULL );
-                if ( REF_OFFSET [ entry -> state_next . ref_off_idx ] < 0 )
-                {
-                    /* insertion */
-                    uint32_t i, ins_cnt = - REF_OFFSET [ entry -> state_next . ref_off_idx ];
-
-                    /* clip to SEQUENCE length */
-                    if ( ( uint32_t ) ( entry -> state_next . seq_idx + ins_cnt ) > entry -> cell_len [ pileup_event_col_HAS_REF_OFFSET ] )
-                        ins_cnt = ( int32_t ) entry -> cell_len [ pileup_event_col_HAS_REF_OFFSET ] - entry -> state_next . seq_idx;
-
-                    /* combine adjacent inserts */
-                    /*entry -> state_next . ins_cnt += ins_cnt;*/
-                    next_ins_cnt += ins_cnt;
-
-                    /* scan over insertion to adjust mismatch index */
-                    for ( i = 0; i < ins_cnt; ++ i )
-                        entry -> state_next . mismatch_idx += HAS_MISMATCH [ entry -> state_next . seq_idx + i ];
-
-                    entry -> state_next . seq_idx += ins_cnt;
-                    if ( entry -> state_next . seq_idx >= entry -> cell_len [ pileup_event_col_HAS_REF_OFFSET ] )
-                    {
-                        entry -> status = pileup_entry_status_DONE;
-                        entry -> state_next . ins_cnt = next_ins_cnt;
-                        return;
-                    }
-
-                    /* NB - there may be entries in HAS_REF_OFFSET that are set
-                       within the insertion. These are used to split the insertion
-                       for preserving boundaries indicated by Complete Genomics BAM
-                       cigar encoding. for Pileup, we treat the entire subsequence as a
-                       single insertion.
-
-                       The "true" values in HAS_REF_OFFSET within an insertion do NOT
-                       represent a corresponding entry in REF_OFFSET, so they are ignored here.
-                    */
-
-                    /* detect the case of an insertion followed by a deletion */
-                    if ( entry -> state_next . seq_idx < entry -> cell_len [ pileup_event_col_HAS_REF_OFFSET ] )
-                    {
-                        ++ entry -> state_next . ref_off_idx;
-                        goto merge_adjacent_indel_events;
-                    }
-                }
-
-                else
-                {
-                    /* deletion */
-                    entry -> state_next . del_cnt += REF_OFFSET [ entry -> state_next . ref_off_idx ];
-
-                    /* clip to PROJECTION length */
-                    if ( ( int64_t ) entry -> state_next . del_cnt > entry -> xend - ( entry -> zstart + entry -> state_next . zstart_adj ) )
-                        entry -> state_next . del_cnt = ( int32_t ) ( entry -> xend - ( entry -> zstart + entry -> state_next . zstart_adj ) );
-                }
-
-                ++ entry -> state_next . ref_off_idx;
-            }
-        }
-
-        ++ entry -> state_next . zstart_adj;
-        entry -> state_next . ins_cnt = next_ins_cnt;
-
-    }
-
-    if ( entry->status == pileup_entry_status_INITIAL )
-    {
-        entry->status = pileup_entry_status_VALID;
-        goto advance_to_the_next_position;
-    }
-}
-
-static
-void CSRA1_PileupEventEntryInit ( CSRA1_PileupEvent * self, ctx_t ctx, CSRA1_Pileup_Entry * entry )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    const bool * HAS_MISMATCH;
-
-    TRY ( HAS_MISMATCH = CSRA1_PileupEventGetEntry ( self, ctx, entry, pileup_event_col_HAS_MISMATCH ) )
-    {
-        const int32_t * REF_OFFSET;
-
-        TRY ( REF_OFFSET = CSRA1_PileupEventGetEntry ( self, ctx, entry, pileup_event_col_REF_OFFSET ) )
-        {
-            const bool * HAS_REF_OFFSET;
-
-            TRY ( HAS_REF_OFFSET = CSRA1_PileupEventGetEntry ( self, ctx, entry, pileup_event_col_HAS_REF_OFFSET ) )
-            {
-                /* if there are no offsets, then there are no indels, which means
-                   that there are only match and mismatch events */
-                if ( entry -> cell_len [ pileup_event_col_REF_OFFSET ] == 0 )
-                    return;
-
-                /* check for left soft-clip */
-                while ( HAS_REF_OFFSET [ entry -> state_next . seq_idx ] && REF_OFFSET [ entry -> state_next . ref_off_idx ] < 0 )
-                {
-                    uint32_t i, end = entry -> state_next . seq_idx - REF_OFFSET [ entry -> state_next . ref_off_idx ++ ];
-
-                    /* safety check */
-                    if ( end > entry -> cell_len [ pileup_event_col_HAS_REF_OFFSET ] )
-                        end = entry -> cell_len [ pileup_event_col_HAS_REF_OFFSET ];
-
-                    /* skip over soft-clip */
-                    for ( i = entry -> state_next . seq_idx; i < end; ++ i )
-                        entry -> state_next . mismatch_idx += HAS_MISMATCH [ i ];
-
-                    entry -> state_next . seq_idx = end;
-                }
-
-                /* capture initial deletion - should never occur */
-                if ( HAS_REF_OFFSET [ entry -> state_next . seq_idx ] && REF_OFFSET [ entry -> state_next . ref_off_idx ] > 0 )
-                    entry -> state_next . del_cnt = REF_OFFSET [ entry -> state_next . ref_off_idx ];
-
-                /* TODO: maybe pileup_entry_status_VALID must be set here */
-
-                return;
-            }
-        }
-    }
-
-    self -> entry = NULL;
-}
-
-static
-void CSRA1_PileupEventRefreshEntry ( CSRA1_PileupEvent * self, ctx_t ctx, CSRA1_Pileup_Entry * entry )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    const bool * HAS_MISMATCH;
-    TRY ( HAS_MISMATCH = CSRA1_PileupEventGetEntry ( self, ctx, entry, pileup_event_col_HAS_MISMATCH ) )
-    {
-        const int32_t * REF_OFFSET;
-        TRY ( REF_OFFSET = CSRA1_PileupEventGetEntry ( self, ctx, entry, pileup_event_col_REF_OFFSET ) )
-        {
-            const bool * HAS_REF_OFFSET;
-            TRY ( HAS_REF_OFFSET = CSRA1_PileupEventGetEntry ( self, ctx, entry, pileup_event_col_HAS_REF_OFFSET ) )
-            {
-                assert ( HAS_MISMATCH != NULL );
-                assert ( HAS_REF_OFFSET != NULL );
-                assert ( REF_OFFSET != NULL );
-
-                (void)HAS_MISMATCH;
-                (void)HAS_REF_OFFSET;
-                (void)REF_OFFSET;
-            }
-        }
-    }
-}
-
-
-bool CSRA1_PileupEventIteratorNext ( CSRA1_PileupEvent * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    CSRA1_Pileup_Entry * entry;
-#if _DEBUGGING
-    CSRA1_Pileup * pileup = CSRA1_PileupEventGetPileup ( self );
-    assert ( pileup != NULL );
-#endif
-
-    /* go to next entry */
-    if ( ! self -> seen_first )
-        self -> seen_first = true;
-    else if ( self -> entry != NULL )
-        self -> entry = ( CSRA1_Pileup_Entry * ) DLNodeNext ( & self -> entry -> node );
-
-    /* detect end of pileup */
-    entry = self -> entry;
-    if ( self -> entry == NULL )
-        return false;
-
-    /* detect new entry */
-    if ( ! entry -> seen )
-    {
-        ON_FAIL ( CSRA1_PileupEventEntryInit ( self, ctx, entry ) )
-            return false;
-        entry -> seen = true;
-        assert ( self -> entry != NULL );
-    }
-    else if ( entry -> cell_data [ pileup_event_col_REF_OFFSET ] == NULL )
-    {
-        ON_FAIL ( CSRA1_PileupEventRefreshEntry ( self, ctx, entry ) )
-            return false;
-    }
-
-    /* this is an entry we've seen before */
-    CSRA1_PileupEventEntryFocus ( self, entry );
-
-    return true;
-}
-
-void CSRA1_PileupEventIteratorReset ( CSRA1_PileupEvent * self, ctx_t ctx )
-{
-    CSRA1_Pileup_Entry * entry;
-
-    CSRA1_Pileup * pileup = CSRA1_PileupEventGetPileup ( self );
-    self -> entry = ( CSRA1_Pileup_Entry * ) DLListHead ( & pileup -> align . pileup );
-    self -> seen_first = false;
-
-    for ( entry = self -> entry; entry != NULL; entry = ( CSRA1_Pileup_Entry * ) DLNodeNext ( & entry -> node ) )
-    {
-        memset ( & entry-> state_curr, 0, sizeof (entry-> state_curr) );
-        memset ( & entry-> state_next, 0, sizeof (entry-> state_next) );
-
-        /*entry -> status = pileup_entry_status_INITIAL;*/ /* TODO: remove comment */
-    }
-}
-
-void CSRA1_PileupEventInit ( ctx_t ctx, CSRA1_PileupEvent * obj, const NGS_Pileup_vt * vt,
-    const char * clsname, const char * instname, NGS_Reference * ref )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    
-    assert ( obj != NULL );
-    
-    NGS_PileupInit ( ctx, & obj -> dad, vt, clsname, instname, ref );
-}
diff --git a/libs/ngs/CSRA1_PileupEvent.h b/libs/ngs/CSRA1_PileupEvent.h
deleted file mode 100644
index d1267e6..0000000
--- a/libs/ngs/CSRA1_PileupEvent.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_csra1_pileupevent_
-#define _h_csra1_pileupevent_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct CSRA1_Pileup;
-struct NGS_PileupEvent;
-
-struct NGS_PileupEvent * CSRA1_PileupEventIteratorMake( ctx_t ctx, struct CSRA1_Pileup * pileup );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_csra1_pileupevent_ */
diff --git a/libs/ngs/CSRA1_Read.c b/libs/ngs/CSRA1_Read.c
deleted file mode 100644
index 59f6d93..0000000
--- a/libs/ngs/CSRA1_Read.c
+++ /dev/null
@@ -1,496 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "CSRA1_Read.h"
-
-#include "NGS_String.h"
-#include "NGS_Cursor.h"
-#include "NGS_Id.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/refcount.h>
-#include <vdb/cursor.h>
-#include <vdb/schema.h>
-#include <vdb/vdb-priv.h>
-#include <insdc/insdc.h>
-
-#include <stddef.h>
-#include <assert.h>
-
-#include <sysalloc.h>
-
-#ifndef min
-#   define min(a,b) ( (a) < (b) ? (a) : (b) )            
-#endif
-
-/*--------------------------------------------------------------------------
- * CSRA1_Read
- */
-struct CSRA1_Read
-{
-    SRA_Read dad;
-};
-
-static bool                CSRA1_FragmentIsAligned ( CSRA1_Read * self, ctx_t ctx );
-static bool                CSRA1_ReadFragIsAligned ( CSRA1_Read * self, ctx_t ctx, uint32_t frag_idx );
-
-static NGS_Read_vt CSRA1_Read_vt_inst =
-{
-    {
-        {
-            /* NGS_Refcount */
-            SRA_ReadWhack
-        },
-
-        /* NGS_Fragment */
-        SRA_FragmentGetId,
-        SRA_FragmentGetSequence,
-        SRA_FragmentGetQualities,
-        SRA_FragmentIsPaired,
-        CSRA1_FragmentIsAligned,
-        SRA_FragmentNext
-    },
-    
-    /* NGS_Read */
-    SRA_ReadGetId,
-    SRA_ReadGetName,
-    SRA_ReadGetReadGroup,
-    SRA_ReadGetCategory,
-    SRA_ReadGetSequence,
-    SRA_ReadGetQualities,
-    SRA_ReadNumFragments,
-    CSRA1_ReadFragIsAligned,
-    SRA_ReadIteratorNext,
-    SRA_ReadIteratorGetCount,
-}; 
-
-/* Init
- */
-static
-void CSRA1_ReadInit ( ctx_t ctx, SRA_Read * self, const char *clsname, const char *instname, const NGS_String * run_name )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    else
-    {
-        TRY ( NGS_ReadInit ( ctx, & self -> dad, & CSRA1_Read_vt_inst, clsname, instname ) )
-        {
-            TRY ( self -> run_name = NGS_StringDuplicate ( run_name, ctx ) )
-            {
-                self -> wants_full      = true;
-                self -> wants_partial   = true; 
-                self -> wants_unaligned = true;            
-            }
-        }
-    }
-}
-
-/* Whack
- */
-static
-void CSRA1_ReadIteratorInitFragment ( SRA_Read * self, ctx_t ctx )
-{
-    const void * base;
-    uint32_t elem_bits, boff, row_len;
-
-    /* read from READ_TYPE must succeed */
-    TRY ( NGS_CursorCellDataDirect ( self -> curs, ctx, self -> cur_row, seq_READ_TYPE, & elem_bits, & base, & boff, & row_len ) )
-    {
-        assert ( elem_bits == 8 );
-        assert ( boff == 0 );
-        self -> READ_TYPE = base;
-
-        TRY ( NGS_CursorCellDataDirect ( self -> curs, ctx, self -> cur_row, seq_READ_LEN, & elem_bits, & base, & boff, & row_len ) )
-        {
-            uint32_t i;
-
-            assert ( elem_bits == 32 );
-            assert ( boff == 0 );
-            self -> READ_LEN = base;
-            self -> frag_max = row_len;
-
-            /* naked hackery to quickly scan types */
-            assert ( READ_TYPE_TECHNICAL == 0 );
-            assert ( READ_TYPE_BIOLOGICAL == 1 );
-
-            /* NB - should also be taking READ_FILTER into account */
-            for ( i = 0; i < row_len; ++ i )
-                self -> bio_frags += self -> READ_TYPE [ i ] & READ_TYPE_BIOLOGICAL;
-        }
-    }
-}
-
-/* Release
- *  release reference
- */
-void CSRA1_ReadRelease ( const CSRA1_Read * self, ctx_t ctx )
-{
-    if ( self != NULL )
-    {
-        NGS_ReadRelease ( & self -> dad . dad, ctx );
-    }
-}
-
-/*--------------------------------------------------------------------------
- * NGS_ReadIterator
- */
-
-static
-void CSRA1_ReadIteratorInit ( ctx_t ctx,
-                             CSRA1_Read * cself,
-                             const char *clsname,
-                             const char *instname,
-                             const NGS_String * run_name,
-                             bool wants_full,
-                             bool wants_partial,
-                             bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    
-    if ( cself == NULL )
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    else
-    {
-        SRA_Read * self = & cself -> dad;
-        TRY ( NGS_ReadIteratorInit ( ctx, & self -> dad, & CSRA1_Read_vt_inst, clsname, instname ) )
-        {
-            TRY ( self -> run_name = NGS_StringDuplicate ( run_name, ctx ) )
-            {
-                self -> wants_full      = wants_full;
-                self -> wants_partial   = wants_partial;
-                self -> wants_unaligned = wants_unaligned;
-            }
-        }
-    }
-}
-
-/* Make
- */
-NGS_Read * CSRA1_ReadIteratorMake ( ctx_t ctx,
-                                 const NGS_Cursor * curs,
-                                 const NGS_String * run_name,
-                                 bool wants_full,
-                                 bool wants_partial,
-                                 bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    
-    CSRA1_Read * cref;
-    SRA_Read * ref;
-    
-    assert ( curs != NULL );
-    
-    cref = calloc ( 1, sizeof * cref );
-    if ( cref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating CSRA1_ReadIterator on '%.*s'", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-    else
-    {
-#if _DEBUGGING
-        char instname [ 256 ];
-        string_printf ( instname, sizeof instname, NULL, "%.*s", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-        instname [ sizeof instname - 1 ] = 0;
-#else
-        const char *instname = "";
-#endif
-        TRY ( CSRA1_ReadIteratorInit ( ctx, cref, "CSRA1_ReadIterator", instname, run_name, wants_full, wants_partial, wants_unaligned ) )
-        {
-            ref = & cref -> dad;
-            
-            ref -> curs = NGS_CursorDuplicate ( curs, ctx );
-            TRY ( NGS_CursorGetRowRange ( ref -> curs, ctx, & ref -> cur_row, & ref -> row_count ) )
-            {
-                ref -> row_max = ref -> cur_row + ref -> row_count;
-                return & ref -> dad;
-            }
-            CSRA1_ReadRelease ( cref, ctx );
-            return NULL;
-        }
-        
-        free ( cref );
-    }
-    
-    return NULL;
-}
-
-/* MakeRange
- */
-NGS_Read * CSRA1_ReadIteratorMakeRange ( ctx_t ctx,
-                                      const NGS_Cursor * curs,
-                                      const NGS_String * run_name,
-                                      uint64_t first,
-                                      uint64_t count,
-                                      bool wants_full,
-                                      bool wants_partial,
-                                      bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    
-    CSRA1_Read * cref;
-    SRA_Read * ref;
-    
-    assert ( curs != NULL );
-    
-    cref = calloc ( 1, sizeof * ref );
-    if ( cref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating CSRA1_ReadIterator on '%.*s'", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-    else
-    {
-#if _DEBUGGING
-        char instname [ 256 ];
-        string_printf ( instname, sizeof instname, NULL, "%.*s", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-        instname [ sizeof instname - 1 ] = 0;
-#else
-        const char *instname = "";
-#endif
-        TRY ( CSRA1_ReadIteratorInit ( ctx, cref, "CSRA1_ReadIterator", instname, run_name, wants_full, wants_partial, wants_unaligned ) )
-        {
-            ref = & cref -> dad;
-            
-            ref -> curs = NGS_CursorDuplicate ( curs, ctx );
-            TRY ( NGS_CursorGetRowRange ( ref -> curs, ctx, & ref -> cur_row, & ref -> row_count ) )
-            {
-                ref -> row_max = min ( first + count, ref -> cur_row + ref -> row_count );
-                ref -> cur_row = first;
-                return & ref -> dad;
-            }
-            CSRA1_ReadRelease ( cref, ctx );
-            return NULL;
-        }
-        
-        free ( cref );
-    }
-    
-    return NULL;
-}
-
-/* MakeReadGroup
- */
-NGS_Read * CSRA1_ReadIteratorMakeReadGroup ( ctx_t ctx,
-                                          const NGS_Cursor * curs,
-                                          const NGS_String * run_name,
-                                          const NGS_String * group_name,
-                                          uint64_t first,
-                                          uint64_t count,
-                                          bool wants_full,
-                                          bool wants_partial,
-                                          bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    
-    TRY ( CSRA1_Read * cref = (CSRA1_Read*) CSRA1_ReadIteratorMakeRange ( ctx,
-                                                                  curs,
-                                                                  run_name,
-                                                                  first,
-                                                                  count,
-                                                                  wants_full,
-                                                                  wants_partial,
-                                                                  wants_unaligned ) )
-    {
-        SRA_Read * ref = & cref -> dad;
-        TRY ( ref -> group_name = NGS_StringDuplicate ( group_name, ctx ) )
-        {
-            return & ref -> dad;
-        }
-
-        CSRA1_ReadRelease ( cref, ctx );
-    }
-    return NULL;
-}
-
-NGS_Read * CSRA1_ReadMake ( ctx_t ctx, const NGS_Cursor * curs, int64_t readId, const struct NGS_String * run_name )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    CSRA1_Read * cref;
-    SRA_Read * ref;
-
-    assert ( curs != NULL );
-
-    cref = calloc ( 1, sizeof * cref );
-    if ( cref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating SRA_Read(%lu) on '%.*s'", readId, NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-    else
-    {
-#if _DEBUGGING
-        char instname [ 256 ];
-        string_printf ( instname, sizeof instname, NULL, "%.*s(%lu)", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ), readId );
-        instname [ sizeof instname - 1 ] = 0;
-#else
-        const char *instname = "";
-#endif
-        ref = & cref -> dad;
-        
-        TRY ( CSRA1_ReadInit ( ctx, ref, "CSRA1_Read", instname, run_name ) )
-        {
-            uint64_t row_count = NGS_CursorGetRowCount ( curs, ctx );
-            
-            /* validate the requested rowId and seek to it */
-            if ( readId <= 0 || (uint64_t)readId > row_count )
-            {
-                INTERNAL_ERROR ( xcCursorAccessFailed, "rowId ( %li ) out of range for %.*s", readId, NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-            }                
-            else
-            {
-                ref -> curs = NGS_CursorDuplicate ( curs, ctx );
-                ref -> cur_row = readId;
-                TRY ( CSRA1_ReadIteratorInitFragment ( ref, ctx ) )
-                {
-                    ref -> row_max = readId + 1;
-                    ref -> row_count = 1;
-                    ref -> seen_first = true;
-                    return & ref -> dad;
-                }
-            }
-            
-            CSRA1_ReadRelease ( cref, ctx );
-            return NULL;
-        }
-        free ( cref );
-    }
-
-    return NULL;
-}
-
-bool CSRA1_FragmentIsAligned ( CSRA1_Read * cself, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    const SRA_Read * self;
-    
-    assert ( cself != NULL );
-    
-    self = & cself -> dad;
-    
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Read accessed before a call to nextRead()" );
-        return false;
-    }
-    
-    if ( self -> cur_row >= self -> row_max )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return false;
-    }
-    
-    if ( ! self -> seen_first_frag )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Fragment accessed before a call to nextFragment()" );
-        return false;
-    }
-    
-    if ( self -> frag_idx >= self -> frag_max )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more fragments available" );
-        return false;
-    }
-    
-    {
-        const void * base;
-        uint32_t elem_bits, boff, row_len;
-        ON_FAIL ( NGS_CursorCellDataDirect ( self -> curs, ctx, self -> cur_row, seq_PRIMARY_ALIGNMENT_ID, & elem_bits, & base, & boff, & row_len ) )
-        {
-            CLEAR();
-            return false;
-        }
-        
-        {
-            const int64_t * orig = base;
-            assert(elem_bits == 64);
-            assert(boff == 0);
-            
-            return orig[self -> frag_idx] != 0;
-        }
-    }
-    
-}
-
-bool CSRA1_ReadFragIsAligned ( CSRA1_Read * cself, ctx_t ctx, uint32_t frag_idx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    const SRA_Read * self;
-    
-    assert ( cself != NULL );
-    
-    self = & cself -> dad;
-    
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Read accessed before a call to nextRead()" );
-        return false;
-    }
-    
-    if ( self -> cur_row >= self -> row_max )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return false;
-    }
-
-    if ( frag_idx >= self -> bio_frags )
-    {
-        USER_ERROR ( xcIntegerOutOfBounds, "bad fragment index" );
-        return false;
-    }
-    
-    {
-        const void * base;
-        uint32_t elem_bits, boff, row_len;
-        TRY ( NGS_CursorCellDataDirect ( self -> curs, ctx, self -> cur_row, seq_PRIMARY_ALIGNMENT_ID, & elem_bits, & base, & boff, & row_len ) )
-        {
-            uint32_t idx, bidx;
-            const int64_t * orig = base;
-            assert ( base != NULL );
-            assert ( elem_bits == 64 );
-            assert ( boff == 0 );
-            assert ( row_len == self -> frag_max );
-
-            /* technically, we do not expect technical reads (fragments) within CSRA1,
-               but it is correct to check for this possibility */
-            if ( self -> bio_frags == self -> frag_max )
-                return orig [ frag_idx ] != 0;
-
-            for ( idx = bidx = 0; idx < row_len; ++ idx )
-            {
-                if ( ( self -> READ_TYPE [ idx ] & READ_TYPE_BIOLOGICAL ) != 0 )
-                {
-                    if ( bidx == frag_idx )
-                        return orig [ idx ] != 0;
-                    
-                    ++ bidx;
-                }
-            }
-        }
-    }
-    
-    CLEAR();
-    return false;
-}
diff --git a/libs/ngs/CSRA1_Read.h b/libs/ngs/CSRA1_Read.h
deleted file mode 100644
index cc90a69..0000000
--- a/libs/ngs/CSRA1_Read.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_csra1_read_
-#define _h_csra1_read_
-
-typedef struct CSRA1_Read CSRA1_Read;
-
-#ifndef NGS_READ
-#define NGS_READ CSRA1_Read
-#endif
-
-#ifndef _h_sra_read_
-#include "SRA_Read.h"
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-
-/*--------------------------------------------------------------------------
- * CSRA1_Read
- */
-
-/* Make
- * a single read
- */
-struct NGS_Read * CSRA1_ReadMake ( ctx_t ctx, const struct NGS_Cursor * curs, int64_t readId, const struct NGS_String * spec );
-
-/* IteratorMake
- */
-struct NGS_Read * CSRA1_ReadIteratorMake ( ctx_t ctx, 
-                                               const struct NGS_Cursor * curs, 
-                                               const struct NGS_String * run_name, 
-                                               bool wants_full, 
-                                               bool wants_partial, 
-                                               bool wants_unaligned );
-
-/* IteratorMakeRange
- * all reads in the specified range of rowIds
- */
-struct NGS_Read * CSRA1_ReadIteratorMakeRange ( ctx_t ctx, 
-                                              const struct NGS_Cursor * curs, 
-                                              const struct NGS_String * run_name, 
-                                              uint64_t first, 
-                                              uint64_t count, 
-                                              bool wants_full, 
-                                              bool wants_partial, 
-                                              bool wants_unaligned );
-
-/* IteratorMakeReadGroup
- * within the specified range of rowIds, will only return reads belonging to the specified read group (groupName)
- */
-struct NGS_Read * CSRA1_ReadIteratorMakeReadGroup ( ctx_t ctx, 
-                                                  const struct NGS_Cursor * curs, 
-                                                  const struct NGS_String * run_name, 
-                                                  const struct NGS_String * group_name, 
-                                                  uint64_t first, 
-                                                  uint64_t count, 
-                                                  bool wants_full, 
-                                                  bool wants_partial, 
-                                                  bool wants_unaligned );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_csra1_read_ */
diff --git a/libs/ngs/CSRA1_ReadCollection.c b/libs/ngs/CSRA1_ReadCollection.c
deleted file mode 100644
index a497fe1..0000000
--- a/libs/ngs/CSRA1_ReadCollection.c
+++ /dev/null
@@ -1,753 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-typedef struct CSRA1_ReadCollection CSRA1_ReadCollection;
-#define NGS_READCOLLECTION CSRA1_ReadCollection
-
-#include "NGS_ReadCollection.h"
-
-#include "CSRA1_ReadCollection.h"
-
-#include "NGS_Reference.h"
-#include "NGS_Alignment.h"
-#include "NGS_Read.h"
-#include "NGS_FragmentBlobIterator.h"
-
-#include "NGS_Cursor.h"
-#include "NGS_String.h"
-#include "NGS_Id.h"
-
-#include "CSRA1_Read.h"
-#include "SRA_Read.h"
-#include "SRA_ReadGroup.h"
-#include "SRA_ReadGroupInfo.h"
-#include "SRA_Statistics.h"
-
-#include "CSRA1_Alignment.h"
-#include "CSRA1_Reference.h"
-
-#include <klib/rc.h>
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <kdb/meta.h>
-
-#include <vdb/manager.h>
-#include <vdb/schema.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-
-#include <strtol.h> /* for strtoi64 */
-
-#include <stddef.h>
-#include <assert.h>
-
-#include <sysalloc.h>
-
-
-/*--------------------------------------------------------------------------
- * CSRA1_ReadCollection
- */
-
-struct CSRA1_ReadCollection
-{
-    NGS_ReadCollection dad;
-    const NGS_String * run_name;
-
-    const VDatabase * db;
-
-    /* shared cursors (reused for all non-iterating objects) */
-    const NGS_Cursor* reference_curs;
-    const NGS_Cursor* sequence_curs;
-    const NGS_Cursor* primary_al_curs;
-    const NGS_Cursor* secondary_al_curs;
-    bool has_secondary;
-
-    uint64_t primaryId_count;
-
-    const struct SRA_ReadGroupInfo* group_info;
-};
-
-/* REFCOUNT */
-
-struct CSRA1_ReadCollection * CSRA1_ReadCollectionDuplicate ( struct CSRA1_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    assert ( self != NULL );
-    return NGS_RefcountDuplicate ( & self -> dad . dad, ctx );
-}
-
-void CSRA1_ReadCollectionRelease ( struct CSRA1_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    assert ( self != NULL );
-    NGS_RefcountRelease( & self -> dad . dad, ctx );
-}
-
-struct NGS_ReadCollection * CSRA1_ReadCollectionToNGS_ReadCollection ( struct CSRA1_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    assert ( self != NULL );
-    return & self -> dad;
-}
-
-static
-void CSRA1_ReadCollectionWhack ( CSRA1_ReadCollection * self, ctx_t ctx )
-{
-    NGS_CursorRelease ( self -> secondary_al_curs, ctx );
-    NGS_CursorRelease ( self -> primary_al_curs, ctx );
-    NGS_CursorRelease ( self -> sequence_curs, ctx );
-    NGS_CursorRelease ( self -> reference_curs, ctx );
-    SRA_ReadGroupInfoRelease ( self -> group_info, ctx );
-    NGS_StringRelease ( self -> run_name, ctx );
-    VDatabaseRelease ( self -> db );
-}
-
-static const char * reference_col_specs [] =
-{
-    "(bool)CIRCULAR",
-    "(utf8)NAME",
-    "(ascii)SEQ_ID",
-    "(INSDC:coord:len)SEQ_LEN",
-    "(INSDC:coord:one)SEQ_START",
-    "(U32)MAX_SEQ_LEN",
-    "(ascii)READ",
-    "(I64)PRIMARY_ALIGNMENT_IDS",
-    "(I64)SECONDARY_ALIGNMENT_IDS",
-    "(INSDC:coord:len)OVERLAP_REF_LEN",
-    "(INSDC:coord:zero)OVERLAP_REF_POS"
-};
-
-const NGS_Cursor* CSRA1_ReadCollectionMakeAlignmentCursor ( CSRA1_ReadCollection * self,
-                                                            ctx_t ctx,
-                                                            bool primary,
-                                                            bool exclusive )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    assert ( self );
-
-    if ( exclusive )
-    {   /* detach and return cached cursor if its refcount == 1 */
-        if ( primary )
-        {
-            NGS_Refcount * refc = ( NGS_Refcount * ) ( self -> primary_al_curs ) ;
-            if ( self -> primary_al_curs && atomic32_read ( & refc -> refcount ) == 1 )
-            {
-                const NGS_Cursor* ret = self -> primary_al_curs;
-                self -> primary_al_curs = NULL;
-                return ret;
-            }
-        }
-        else
-        {
-            NGS_Refcount * refc = ( NGS_Refcount * ) ( self -> secondary_al_curs ) ;
-            if ( self -> secondary_al_curs && atomic32_read ( & refc -> refcount ) == 1 )
-            {
-                const NGS_Cursor* ret = self -> secondary_al_curs;
-                self -> secondary_al_curs = NULL;
-                return ret;
-            }
-        }
-        return CSRA1_AlignmentMakeDb ( ctx, self -> db, self -> run_name, primary ? "PRIMARY_ALIGNMENT" : "SECONDARY_ALIGNMENT" );
-    }
-    if ( primary )
-    {
-        if ( self -> primary_al_curs == NULL )
-        {
-            self -> primary_al_curs = CSRA1_AlignmentMakeDb ( ctx, self -> db, self -> run_name, "PRIMARY_ALIGNMENT" );
-        }
-        return NGS_CursorDuplicate ( self -> primary_al_curs, ctx );
-    }
-    else if ( self -> has_secondary )
-    {
-        if ( self -> secondary_al_curs == NULL )
-        {
-            self -> secondary_al_curs = CSRA1_AlignmentMakeDb ( ctx, self->db, self->run_name, "SECONDARY_ALIGNMENT" );
-        }
-        return NGS_CursorDuplicate ( self -> secondary_al_curs, ctx );
-    }
-    else
-    {
-        INTERNAL_ERROR ( xcCursorAccessFailed, "Secondary alignments table is missing");
-        return NULL;
-    }
-}
-
-/* READCOLLECTION */
-
-static
-NGS_String * CSRA1_ReadCollectionGetName ( CSRA1_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    return NGS_StringDuplicate ( self -> run_name, ctx );
-}
-
-static
-const struct SRA_ReadGroupInfo* GetGroupInfo ( CSRA1_ReadCollection * self, ctx_t ctx )
-{
-    if ( self -> group_info == NULL )
-    {
-        const VTable * table;
-        rc_t rc = VDatabaseOpenTableRead ( self -> db, & table, "SEQUENCE" );
-        if ( rc != 0 )
-        {
-            INTERNAL_ERROR ( xcUnexpected, "VDatabaseOpenTableRead(SEQUENCE) rc = %R", rc );
-        }
-        ON_FAIL ( self -> group_info = SRA_ReadGroupInfoMake ( ctx, table ) )
-        {
-            VTableRelease ( table );
-            return NULL;
-        }
-        VTableRelease ( table );
-    }
-    return self -> group_info;
-}
-
-static
-NGS_ReadGroup * CSRA1_ReadCollectionGetReadGroups ( CSRA1_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    TRY ( const NGS_Cursor * curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "SEQUENCE", sequence_col_specs, seq_NUM_COLS ) )
-    {
-        TRY ( GetGroupInfo ( self, ctx ) )
-        {
-            NGS_ReadGroup * ret = SRA_ReadGroupIteratorMake ( ctx, curs, self -> group_info, self -> run_name );
-            NGS_CursorRelease ( curs, ctx );
-            return ret;
-        }
-    }
-    return NULL;
-
-}
-
-static
-bool CSRA1_ReadCollectionHasReadGroup ( CSRA1_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    bool ret = false;
-
-    if ( self -> sequence_curs == NULL )
-    {
-        self -> sequence_curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "SEQUENCE", sequence_col_specs, seq_NUM_COLS );
-    }
-
-    TRY ( GetGroupInfo ( self, ctx ) )
-    {
-        TRY ( SRA_ReadGroupInfoFind ( self -> group_info, ctx, spec, string_size ( spec ) ) )
-        {
-            ret = true;
-        }
-        CATCH_ALL()
-        {
-            CLEAR();
-        }
-
-    }
-
-    return ret;
-}
-
-static
-NGS_ReadGroup * CSRA1_ReadCollectionGetReadGroup ( CSRA1_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    if ( self -> sequence_curs == NULL )
-    {
-        self -> sequence_curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "SEQUENCE", sequence_col_specs, seq_NUM_COLS );
-    }
-
-    TRY ( GetGroupInfo ( self, ctx ) )
-    {
-        NGS_ReadGroup * ret = SRA_ReadGroupMake ( ctx, self -> sequence_curs, self -> group_info, self -> run_name, spec, string_size( spec ));
-        return ret;
-    }
-
-    return NULL;
-}
-
-static
-NGS_Reference * CSRA1_ReadCollectionGetReferences ( CSRA1_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-
-    /* Iterators have their own cursors */
-    TRY ( const NGS_Cursor* curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "REFERENCE", reference_col_specs, reference_NUM_COLS ) )
-    {
-        NGS_Reference * ret = CSRA1_ReferenceIteratorMake ( ctx, & self -> dad, self -> db, curs, self -> primaryId_count );
-        NGS_CursorRelease ( curs, ctx );
-        return ret;
-    }
-
-    return NULL;
-}
-
-static
-NGS_Reference * CSRA1_ReadCollectionGetReference ( CSRA1_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-
-    const NGS_Cursor * curs;
-    NGS_Reference * ret;
-#if 0
-    if ( self -> reference_curs == NULL )
-    {
-#endif
-        ON_FAIL ( curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "REFERENCE", reference_col_specs, reference_NUM_COLS ) )
-            return NULL;
-#if 0
-        self -> reference_curs = curs;
-    }
-#endif
-
-    ret = CSRA1_ReferenceMake ( ctx, & self -> dad, self -> db, curs, spec, self -> primaryId_count );
-#if ! 0
-    // release cursor if we generate new cursor for the reference each time
-    NGS_CursorRelease ( curs, ctx );
-#endif
-
-    return ret;
-}
-
-static
-bool CSRA1_ReadCollectionHasReference ( CSRA1_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-
-    const NGS_Cursor * curs;
-    bool ret = false;
-
-    ON_FAIL ( curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "REFERENCE", reference_col_specs, reference_NUM_COLS ) )
-        return false;
-
-    ret = CSRA1_ReferenceFind ( curs, ctx, spec, NULL, NULL );
-
-    NGS_CursorRelease ( curs, ctx );
-    CLEAR ();
-
-    return ret;
-}
-
-static
-NGS_Alignment * CSRA1_ReadCollectionGetAlignments ( CSRA1_ReadCollection * self, ctx_t ctx,
-    bool wants_primary, bool wants_secondary )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-
-    return CSRA1_AlignmentIteratorMake ( ctx, self, wants_primary, wants_secondary, self -> run_name, self -> primaryId_count );
-}
-
-static
-NGS_Alignment * CSRA1_ReadCollectionGetAlignment ( CSRA1_ReadCollection * self, ctx_t ctx, const char * alignmentIdStr )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-
-    TRY ( struct NGS_Id id = NGS_IdParse ( alignmentIdStr, string_size ( alignmentIdStr ), ctx ) )
-    {
-        if ( string_cmp ( NGS_StringData ( self -> run_name, ctx ),
-            NGS_StringSize ( self -> run_name, ctx ),
-            id . run . addr,
-            id . run . size,
-            id . run . len ) != 0 )
-        {
-            INTERNAL_ERROR ( xcArcIncorrect,
-                " expected '%.*s', actual '%.*s'",
-                NGS_StringSize ( self -> run_name, ctx ),
-                NGS_StringData ( self -> run_name, ctx ),
-                id . run . size,
-                id . run . addr );
-        }
-        else if ( id . object == NGSObject_PrimaryAlignment )
-        {
-            return CSRA1_AlignmentMake ( ctx, self, id . rowId, NGS_StringData( self -> run_name, ctx ), NGS_StringSize( self->run_name, ctx ), true, 0 );
-        }
-        else if ( id . object == NGSObject_SecondaryAlignment )
-        {
-            return CSRA1_AlignmentMake ( ctx, self, id . rowId, NGS_StringData( self -> run_name, ctx ), NGS_StringSize( self -> run_name, ctx ), false, self -> primaryId_count );
-        }
-        else
-        {
-            INTERNAL_ERROR ( xcTypeIncorrect,
-                " expected alignment (%i or %i), actual %i",
-                NGSObject_PrimaryAlignment,
-                NGSObject_SecondaryAlignment,
-                id . object );
-        }
-    }
-    return NULL;
-}
-
-static
-uint64_t CSRA1_ReadCollectionGetAlignmentCount ( CSRA1_ReadCollection * self, ctx_t ctx,
-    bool wants_primary, bool wants_secondary )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-    uint64_t ret = 0;
-    if ( wants_primary )
-    {
-        ret += ( self -> primaryId_count );
-    }
-    if ( wants_secondary && self -> has_secondary )
-    {
-        if ( self -> secondary_al_curs == NULL )
-        {
-            ON_FAIL ( self -> secondary_al_curs = CSRA1_AlignmentMakeDb ( ctx,
-                                                                     self -> db,
-                                                                     self -> run_name,
-                                                                     "SECONDARY_ALIGNMENT" ) )
-                return 0;
-        }
-        ret += NGS_CursorGetRowCount ( self -> secondary_al_curs, ctx );
-    }
-    return ret;
-}
-
-static
-NGS_Alignment * CSRA1_ReadCollectionGetAlignmentRange ( CSRA1_ReadCollection * self,
-                                                        ctx_t ctx,
-                                                        uint64_t first,
-                                                        uint64_t count,
-                                                        bool wants_primary,
-                                                        bool wants_secondary )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-
-    return CSRA1_AlignmentRangeMake ( ctx, self, wants_primary, wants_secondary, self -> run_name, self -> primaryId_count, first, count );
-}
-
-struct NGS_Read * CSRA1_ReadCollectionGetReads ( CSRA1_ReadCollection * self, ctx_t ctx,
-    bool wants_full, bool wants_partial, bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    TRY ( const NGS_Cursor * curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "SEQUENCE", sequence_col_specs, seq_NUM_COLS ) )
-    {
-        TRY ( NGS_Read * ref = CSRA1_ReadIteratorMake ( ctx, curs, self -> run_name, wants_full, wants_partial, wants_unaligned ) )
-        {
-            NGS_CursorRelease ( curs, ctx );
-            return ref;
-        }
-
-        NGS_CursorRelease ( curs, ctx );
-    }
-
-    return NULL;
-}
-
-struct NGS_Read * CSRA1_ReadCollectionGetRead ( CSRA1_ReadCollection * self, ctx_t ctx, const char * readIdStr )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    TRY ( struct NGS_Id id = NGS_IdParse ( readIdStr, string_size ( readIdStr ), ctx ) )
-    {
-        if ( string_cmp ( NGS_StringData ( self -> run_name, ctx ),
-            NGS_StringSize ( self -> run_name, ctx ),
-            id . run . addr,
-            id . run . size,
-            id . run . len ) != 0 )
-        {
-            INTERNAL_ERROR ( xcArcIncorrect,
-                " expected '%.*s', actual '%.*s'",
-                NGS_StringSize ( self -> run_name, ctx ),
-                NGS_StringData ( self -> run_name, ctx ),
-                id . run . size,
-                id . run . addr );
-        }
-        else
-        {
-            /* individual reads share one iterator attached to ReadCollection */
-            if ( self -> sequence_curs == NULL )
-            {
-                ON_FAIL ( self -> sequence_curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "SEQUENCE", sequence_col_specs, seq_NUM_COLS ) )
-                    return NULL;
-            }
-            return CSRA1_ReadMake ( ctx, self -> sequence_curs, id . rowId, self -> run_name );
-        }
-    }
-    return NULL;
-}
-
-static
-uint64_t CSRA1_ReadCollectionGetReadCount ( CSRA1_ReadCollection * self, ctx_t ctx,
-    bool wants_full, bool wants_partial, bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-
-    if ( self -> sequence_curs == NULL )
-    {
-        ON_FAIL ( self -> sequence_curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "SEQUENCE", sequence_col_specs, seq_NUM_COLS ) )
-        {
-            return 0;
-        }
-    }
-
-    if ( wants_full && wants_partial && wants_unaligned )
-        return NGS_CursorGetRowCount ( self -> sequence_curs, ctx );
-
-    { /* scan the SEQUENCE table */
-        int64_t first;
-        uint64_t count;
-        TRY ( NGS_CursorGetRowRange ( self -> sequence_curs, ctx, & first, & count ) )
-        {
-            uint64_t ret = 0;
-            uint64_t count_full = 0;
-            uint64_t count_partial = 0;
-            uint64_t count_unaligned = 0;
-            uint64_t i;
-            for ( i = 0; i < count; ++i )
-            {
-                const void * base;
-                uint32_t elem_bits, boff, row_len;
-                ON_FAIL ( NGS_CursorCellDataDirect ( self -> sequence_curs, ctx, first + i, seq_PRIMARY_ALIGNMENT_ID, & elem_bits, & base, & boff, & row_len ) )
-                {   /* count as unaligned, to mirror the behavior of SRA_ReadGetCategory() (see SRA_Read.c) */
-                    CLEAR();
-                    ++ count_unaligned;
-                }
-                else
-                {
-                    uint32_t j;
-                    bool seen_aligned = false;
-                    bool seen_unaligned = false;
-                    const int64_t * orig = base;
-                    assert(elem_bits == 64);
-                    for ( j = 0; j < row_len; ++ j )
-                    {
-                        if (orig[j] == 0)
-                            seen_unaligned = true;
-                        else
-                            seen_aligned = true;
-                    }
-                    if ( seen_aligned )
-                    {
-                        if ( seen_unaligned )
-                            ++ count_partial;
-                        else
-                            ++ count_full;
-                    }
-                    else
-                        ++ count_unaligned;
-                }
-            }
-            if ( wants_full )
-                ret += count_full;
-            if ( wants_partial )
-                ret += count_partial;
-            if ( wants_unaligned )
-                ret += count_unaligned;
-            return ret;
-        }
-    }
-
-    return 0;
-}
-
-struct NGS_Read * CSRA1_ReadCollectionGetReadRange ( CSRA1_ReadCollection * self,
-                                                     ctx_t ctx,
-                                                     uint64_t first,
-                                                     uint64_t count,
-                                                     bool wants_full,
-                                                     bool wants_partial,
-                                                     bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    TRY ( const NGS_Cursor* curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "SEQUENCE", sequence_col_specs, seq_NUM_COLS ) )
-    {
-        NGS_Read * ret = CSRA1_ReadIteratorMakeRange ( ctx, curs, self -> run_name, first, count, wants_full, wants_partial, wants_unaligned );
-        NGS_CursorRelease ( curs, ctx );
-        return ret;
-    }
-    return NULL;
-}
-
-static void LoadTableStats ( CSRA1_ReadCollection * self, ctx_t ctx, const char* table_name, NGS_Statistics * stats )
-{
-    const VTable * table;
-    rc_t rc = VDatabaseOpenTableRead ( self -> db, & table, table_name );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcUnexpected, "VDatabaseOpenTableRead(%s) rc = %R", table_name, rc );
-    }
-    else
-    {
-        SRA_StatisticsLoadTableStats ( stats, ctx, table, table_name );
-        VTableRelease ( table );
-    }
-}
-
-static struct NGS_Statistics* CSRA1_ReadCollectionGetStatistics ( CSRA1_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    TRY ( NGS_Statistics * ret = SRA_StatisticsMake ( ctx ) )
-    {
-        TRY ( LoadTableStats ( self, ctx, "SEQUENCE", ret ) )
-        {
-            TRY ( LoadTableStats ( self, ctx, "REFERENCE", ret ) )
-            {
-                TRY ( LoadTableStats ( self, ctx, "PRIMARY_ALIGNMENT", ret ) )
-                {
-                    /* SECONDARY_ALIGNMENT may be missing */
-                    ON_FAIL ( LoadTableStats ( self, ctx, "SECONDARY_ALIGNMENT", ret ) ) CLEAR ();
-                    return ret;
-                }
-            }
-        }
-        NGS_StatisticsRelease ( ret, ctx );
-    }
-
-    return NULL;
-}
-
-static struct NGS_FragmentBlobIterator* CSRA1_ReadCollectionGetFragmentBlobs ( CSRA1_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    const VTable * table;
-    rc_t rc = VDatabaseOpenTableRead ( self -> db, & table, "SEQUENCE" );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcUnexpected, "VDatabaseOpenTableRead(SEQUENCE) rc = %R", rc );
-    }
-    else
-    {
-        TRY ( NGS_FragmentBlobIterator* ret = NGS_FragmentBlobIteratorMake ( ctx, self -> run_name, table ) )
-        {
-            VTableRelease ( table );
-            return ret;
-        }
-        VTableRelease ( table );
-    }
-
-    return NULL;
-}
-
-
-static NGS_ReadCollection_vt CSRA1_ReadCollection_vt =
-{
-    /* NGS_Refcount */
-    { CSRA1_ReadCollectionWhack },
-
-    /* NGS_ReadCollection */
-    CSRA1_ReadCollectionGetName,
-    CSRA1_ReadCollectionGetReadGroups,
-    CSRA1_ReadCollectionHasReadGroup,
-    CSRA1_ReadCollectionGetReadGroup,
-    CSRA1_ReadCollectionGetReferences,
-    CSRA1_ReadCollectionHasReference,
-    CSRA1_ReadCollectionGetReference,
-    CSRA1_ReadCollectionGetAlignments,
-    CSRA1_ReadCollectionGetAlignment,
-    CSRA1_ReadCollectionGetAlignmentCount,
-    CSRA1_ReadCollectionGetAlignmentRange,
-    CSRA1_ReadCollectionGetReads,
-    CSRA1_ReadCollectionGetRead,
-    CSRA1_ReadCollectionGetReadCount,
-    CSRA1_ReadCollectionGetReadRange,
-    CSRA1_ReadCollectionGetStatistics,
-    CSRA1_ReadCollectionGetFragmentBlobs
-};
-
-NGS_ReadCollection * NGS_ReadCollectionMakeCSRA ( ctx_t ctx, const VDatabase *db, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcConstructing );
-
-    size_t spec_size;
-    CSRA1_ReadCollection * ref;
-
-    assert ( db != NULL );
-
-    assert ( spec != NULL );
-    spec_size = string_size ( spec );
-    assert ( spec_size != 0 );
-
-    ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating CSRA1_ReadCollection ( '%s' )", spec );
-    else
-    {
-        TRY ( NGS_ReadCollectionInit ( ctx, & ref -> dad, & CSRA1_ReadCollection_vt, "CSRA1_ReadCollection", spec ) )
-        {
-            const char * name, * dot, * end;
-
-            ref -> db = db;
-
-            end = & spec [ spec_size ];
-
-            /* TBD - this is a hack */
-            name = string_rchr ( spec, spec_size, '/' );
-            if ( name ++ == NULL )
-                name = spec;
-
-            dot = string_rchr ( name, end - name, '.' );
-            if ( dot != NULL )
-            {
-                if ( strcase_cmp ( dot, end - dot, ".ncbi_enc", sizeof ".ncbi_enc" - 1, -1 ) == 0 )
-                {
-                    end = dot;
-                    dot = string_rchr ( name, end - name, '.' );
-                }
-                if ( dot != NULL && strcase_cmp ( dot, end - dot, ".sra", sizeof ".sra" - 1, -1 ) == 0 )
-                    end = dot;
-            }
-
-            /* initialize "run_name" */
-            TRY ( ref -> run_name = NGS_StringMakeCopy ( ctx, name, end - name ) )
-            {
-                TRY ( ref -> primary_al_curs = CSRA1_AlignmentMakeDb ( ctx, ref -> db, ref -> run_name, "PRIMARY_ALIGNMENT" ) )
-                {
-                    TRY ( ref -> primaryId_count = NGS_CursorGetRowCount ( ref -> primary_al_curs, ctx ) )
-                    {
-                        /* check for existence of SECONDARY_ALIGNMENT table */
-                        const VTable * table;
-                        if ( VDatabaseOpenTableRead ( db, & table, "SECONDARY_ALIGNMENT" ) == 0 )
-                        {
-                            ref -> has_secondary = true;
-                            VTableRelease ( table );
-                        }
-
-                        return & ref -> dad;
-                    }
-                }
-            }
-
-            CSRA1_ReadCollectionWhack ( ref, ctx );
-            return NULL;
-        }
-
-        free ( ref );
-    }
-
-    VDatabaseRelease ( db );
-
-    return NULL;
-}
diff --git a/libs/ngs/CSRA1_ReadCollection.h b/libs/ngs/CSRA1_ReadCollection.h
deleted file mode 100644
index 2fa6baa..0000000
--- a/libs/ngs/CSRA1_ReadCollection.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_csra1_readcollection_
-#define _h_csra1_readcollection_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct NGS_Cursor;
-struct CSRA1_ReadCollection;
-
-struct CSRA1_ReadCollection * CSRA1_ReadCollectionDuplicate ( struct CSRA1_ReadCollection * self, ctx_t ctx );
-void CSRA1_ReadCollectionRelease ( struct CSRA1_ReadCollection * self, ctx_t ctx );
-struct NGS_ReadCollection * CSRA1_ReadCollectionToNGS_ReadCollection ( struct CSRA1_ReadCollection * self, ctx_t ctx );
-
-const struct NGS_Cursor* CSRA1_ReadCollectionMakeAlignmentCursor ( struct CSRA1_ReadCollection * self, 
-                                                                   ctx_t ctx, 
-                                                                   bool primary, 
-                                                                   bool exclusive );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_csra1_readcollection_ */
diff --git a/libs/ngs/CSRA1_Reference.c b/libs/ngs/CSRA1_Reference.c
deleted file mode 100644
index b9611e7..0000000
--- a/libs/ngs/CSRA1_Reference.c
+++ /dev/null
@@ -1,1068 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "CSRA1_Reference.h"
-
-typedef struct CSRA1_Reference CSRA1_Reference;
-#define NGS_REFERENCE CSRA1_Reference
-#include "NGS_Reference.h"
-
-#include "NGS_ReadCollection.h"
-#include "NGS_Alignment.h"
-
-#include "NGS_String.h"
-#include "NGS_Cursor.h"
-
-#include "SRA_Statistics.h"
-
-#include "CSRA1_ReferenceWindow.h"
-#include "CSRA1_Pileup.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/refcount.h>
-
-#include <vdb/table.h>
-#include <vdb/database.h>
-#include <vdb/cursor.h>
-#include <vdb/schema.h>
-#include <vdb/vdb-priv.h>
-
-#include <stddef.h>
-#include <assert.h>
-
-#include <strtol.h>
-#include <string.h>
-
-#include <sysalloc.h>
-
-/*--------------------------------------------------------------------------
- * CSRA1_Reference
- */
-static void                     CSRA1_ReferenceWhack ( CSRA1_Reference * self, ctx_t ctx );
-static NGS_String *             CSRA1_ReferenceGetCommonName ( CSRA1_Reference * self, ctx_t ctx );
-static NGS_String *             CSRA1_ReferenceGetCanonicalName ( CSRA1_Reference * self, ctx_t ctx );
-static bool                     CSRA1_ReferenceGetIsCircular ( const CSRA1_Reference * self, ctx_t ctx );
-static uint64_t                 CSRA1_ReferenceGetLength ( CSRA1_Reference * self, ctx_t ctx );
-static struct NGS_String *      CSRA1_ReferenceGetBases ( CSRA1_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size );
-static struct NGS_String *      CSRA1_ReferenceGetChunk ( CSRA1_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size );
-static struct NGS_Alignment*    CSRA1_ReferenceGetAlignment ( CSRA1_Reference * self, ctx_t ctx, const char * alignmentId );
-static struct NGS_Alignment*    CSRA1_ReferenceGetAlignments ( CSRA1_Reference * self, ctx_t ctx, bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual );
-static uint64_t                 CSRA1_ReferenceGetAlignmentCount ( const CSRA1_Reference * self, ctx_t ctx, bool wants_primary, bool wants_secondary );
-static struct NGS_Alignment*    CSRA1_ReferenceGetAlignmentSlice ( CSRA1_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size,
-    bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual );
-static struct NGS_Pileup*       CSRA1_ReferenceGetPileups ( CSRA1_Reference * self, ctx_t ctx, bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual );
-static struct NGS_Pileup*       CSRA1_ReferenceGetPileupSlice ( CSRA1_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size, bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual );
-struct NGS_Statistics*          CSRA1_ReferenceGetStatistics ( const CSRA1_Reference * self, ctx_t ctx );
-static bool                     CSRA1_ReferenceIteratorNext ( CSRA1_Reference * self, ctx_t ctx );
-
-static NGS_Reference_vt CSRA1_Reference_vt_inst =
-{
-    /* NGS_Refcount */
-    { CSRA1_ReferenceWhack },
-    
-    /* NGS_Reference */
-    CSRA1_ReferenceGetCommonName,
-    CSRA1_ReferenceGetCanonicalName,
-    CSRA1_ReferenceGetIsCircular,
-    CSRA1_ReferenceGetLength,
-    CSRA1_ReferenceGetBases,
-    CSRA1_ReferenceGetChunk,
-    CSRA1_ReferenceGetAlignment,
-    CSRA1_ReferenceGetAlignments,
-    CSRA1_ReferenceGetAlignmentCount,
-    CSRA1_ReferenceGetAlignmentSlice,
-    CSRA1_ReferenceGetPileups,
-    CSRA1_ReferenceGetPileupSlice,
-    CSRA1_ReferenceGetStatistics,
-    
-    /* NGS_ReferenceIterator */
-    CSRA1_ReferenceIteratorNext,
-};
-
-struct CSRA1_Reference
-{
-    NGS_Reference dad;   
-    
-    uint32_t chunk_size;
-    
-    int64_t first_row;
-    int64_t last_row;  /* inclusive */
-    const struct VDatabase * db; /* pointer to the opened db, cannot be NULL */
-    const struct NGS_Cursor * curs; /* can be NULL if created for an empty iterator */
-    uint64_t align_id_offset;
-    uint64_t cur_length; /* size of current reference in bases (0 = not yet counted) */
-    
-    int64_t iteration_row_last; /* 0 = not iterating */
-    
-    bool seen_first;
-};
-
-int64_t CSRA1_Reference_GetFirstRowId ( const struct NGS_Reference * self, ctx_t ctx )
-{
-    assert ( ( void * ) self -> dad . vt == ( void * ) & CSRA1_Reference_vt_inst );
-    return ( ( CSRA1_Reference const * ) self ) -> first_row;
-}
-
-int64_t CSRA1_Reference_GetLastRowId ( const struct NGS_Reference * self, ctx_t ctx )
-{
-    assert ( ( void * ) self -> dad . vt == ( void * ) & CSRA1_Reference_vt_inst );
-    return ( ( CSRA1_Reference const * ) self ) -> last_row;
-}
-
-/* Init
- */
-static
-void CSRA1_ReferenceInit ( ctx_t ctx, 
-                           CSRA1_Reference * ref,
-                           NGS_ReadCollection * coll,
-                           const char *clsname, 
-                           const char *instname,
-                           uint64_t align_id_offset )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    if ( ref == NULL )
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    else
-    {
-        TRY ( NGS_ReferenceInit ( ctx, & ref -> dad, & CSRA1_Reference_vt_inst, clsname, instname, coll ) )
-        {
-            ref -> align_id_offset = align_id_offset;
-        }
-    }
-}
-
-/* Whack
- */
-static
-void CSRA1_ReferenceWhack ( CSRA1_Reference * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcDestroying );
-
-    NGS_CursorRelease ( self -> curs, ctx );
-
-    VDatabaseRelease ( self -> db );
-    self -> db = NULL;
-    
-    NGS_ReferenceWhack ( & self -> dad, ctx );
-}
-
-NGS_String * CSRA1_ReferenceGetCommonName ( CSRA1_Reference * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self != NULL );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Reference accessed before a call to ReferenceIteratorNext()" );
-        return NULL;        
-    }
-    
-    return NGS_CursorGetString ( self -> curs, ctx, self -> first_row, reference_NAME );
-}
-
-NGS_String * CSRA1_ReferenceGetCanonicalName ( CSRA1_Reference * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    assert ( self != NULL );
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Reference accessed before a call to ReferenceIteratorNext()" );
-        return NULL;        
-    }
-    
-    return NGS_CursorGetString ( self -> curs, ctx, self -> first_row, reference_SEQ_ID);
-}
-
-bool CSRA1_ReferenceGetIsCircular ( const CSRA1_Reference * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-   
-    if ( self -> curs == NULL )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return false;
-    }
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Reference accessed before a call to ReferenceIteratorNext()" );
-        return false;        
-    }
-    
-    /* if current row is valid, read data */
-    if ( self -> first_row <= self -> last_row )
-    {
-        return NGS_CursorGetBool ( self -> curs, ctx, self -> first_row, reference_CIRCULAR );
-    }
-
-    return false;
-}
-
-static
-uint64_t CountRows ( NGS_Cursor const * curs, ctx_t ctx, uint32_t colIdx, const void* value, uint32_t value_size, int64_t firstRow, uint64_t end_row)
-{   /* count consecutive rows having the same value in column # colIdx as in firstRow, starting from and including firstRow */
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    const void* last_value = value;
-    uint64_t cur_row = (uint64_t)firstRow + 1;
-    while (cur_row < end_row)
-    {
-        const void * base;
-        uint32_t elem_bits, boff, row_len;
-        ON_FAIL ( NGS_CursorCellDataDirect ( curs, ctx, cur_row, colIdx, & elem_bits, & base, & boff, & row_len ) )
-            return 0;
-
-        if (base != last_value)
-        {
-            if ( value_size != row_len || memcmp ( base, last_value, row_len ) != 0 )
-                break;
-
-            last_value = base;
-        }
-        
-        ++ cur_row;
-    }
-    return cur_row - firstRow;
-}
-
-uint64_t CSRA1_ReferenceGetLength ( CSRA1_Reference * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    if ( self -> curs == NULL )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return 0;
-    }
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Reference accessed before a call to ReferenceIteratorNext()" );
-        return 0;        
-    }
-    
-    if ( self -> cur_length == 0 ) /* not yet calculated */
-    {   
-        self -> cur_length =  self -> chunk_size * ( self -> last_row - self -> first_row ) + 
-                              NGS_CursorGetUInt32 ( self -> curs, 
-                                                    ctx, 
-                                                    self -> last_row, 
-                                                    reference_SEQ_LEN );
-    }
-    
-    return self -> cur_length;
-}
-
-struct NGS_String * CSRA1_ReferenceGetBases ( CSRA1_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{   
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    if ( self -> curs == NULL )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Reference accessed before a call to ReferenceIteratorNext()" );
-        return NULL;        
-    }
-    
-    {
-        uint64_t totalBases = CSRA1_ReferenceGetLength ( self, ctx );
-        if ( offset >= totalBases )
-        {
-            return NGS_StringMake ( ctx, "", 0 );
-        }
-        else
-        {   
-            uint64_t basesToReturn = totalBases - offset;
-            char* data;
-            
-            if (size != (size_t)-1 && basesToReturn > size)
-                basesToReturn = size;
-                
-            data = (char*) malloc ( basesToReturn );
-            if ( data == NULL )
-            {
-                SYSTEM_ERROR ( xcNoMemory, "allocating %lu bases", basesToReturn );
-                return NGS_StringMake ( ctx, "", 0 );
-            }
-            else
-            {
-                size_t cur_offset = 0;
-                while ( cur_offset < basesToReturn )
-                {
-                    /* we will potentially ask for more than available in the current chunk; 
-                        CSRA1_ReferenceGetChunkSize will return only as much as is available in the chunk */
-                    NGS_String* chunk = CSRA1_ReferenceGetChunk ( self, ctx, offset + cur_offset, basesToReturn - cur_offset );
-                    cur_offset += string_copy(data + cur_offset, basesToReturn - cur_offset, 
-                                              NGS_StringData ( chunk, ctx ), NGS_StringSize ( chunk, ctx ) );
-                    NGS_StringRelease ( chunk, ctx );
-                }
-                return NGS_StringMakeOwned ( ctx, data, basesToReturn );
-            }
-        }
-    }
-}
-
-struct NGS_String * CSRA1_ReferenceGetChunk ( CSRA1_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{   
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    if ( self -> curs == NULL )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Reference accessed before a call to ReferenceIteratorNext()" );
-        return NULL;        
-    }
-    
-    if ( offset >= CSRA1_ReferenceGetLength ( self, ctx ) )
-    {
-        return NGS_StringMake ( ctx, "", 0 );
-    }
-    else
-    {
-        const NGS_String* read = NGS_CursorGetString ( self -> curs, ctx, self -> first_row + offset / self -> chunk_size, reference_READ);
-        NGS_String* ret;
-        if ( size == (size_t)-1 )
-            ret = NGS_StringSubstrOffset ( read, ctx, offset % self -> chunk_size );
-        else
-            ret = NGS_StringSubstrOffsetSize ( read, ctx, offset % self -> chunk_size, size );
-        NGS_StringRelease ( read, ctx );
-        return ret;
-    }
-}
-
-struct NGS_Alignment* CSRA1_ReferenceGetAlignment ( CSRA1_Reference * self, ctx_t ctx, const char * alignmentIdStr )
-{   
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    if ( self -> curs == NULL )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Reference accessed before a call to ReferenceIteratorNext()" );
-        return NULL;        
-    }
-
-    {
-        TRY ( NGS_Alignment* ref = NGS_ReadCollectionGetAlignment ( self -> dad . coll, ctx, alignmentIdStr ) )
-        {
-            TRY ( NGS_String * spec = NGS_AlignmentGetReferenceSpec( ref, ctx ) )
-            {
-                TRY ( NGS_String * commonName = CSRA1_ReferenceGetCommonName ( self, ctx ) )
-                {
-                    if ( string_cmp( NGS_StringData ( spec, ctx ), 
-                                     NGS_StringSize ( spec, ctx ),
-                                     NGS_StringData ( commonName, ctx ), 
-                                     NGS_StringSize ( commonName, ctx ),
-                                     (uint32_t)NGS_StringSize ( spec, ctx ) ) == 0 )
-                    {
-                        NGS_StringRelease ( spec, ctx );
-                        NGS_StringRelease ( commonName, ctx );
-                        return ref;
-                    }
-                        
-                    USER_ERROR ( xcWrongReference, 
-                                "Requested alignment is on a wrong reference: reference '%.*s', alignment has '%.*s'",  
-                                NGS_StringSize ( commonName, ctx ), NGS_StringData ( commonName, ctx ),
-                                NGS_StringSize ( spec, ctx ), NGS_StringData ( spec, ctx ) );
-                    
-                    NGS_StringRelease ( commonName, ctx );
-                }
-                NGS_StringRelease ( spec, ctx );
-            }
-            NGS_AlignmentRelease ( ref, ctx );
-        }
-    }
-    return NULL;
-}
-
-struct NGS_Alignment* CSRA1_ReferenceGetAlignments ( CSRA1_Reference * self, ctx_t ctx, bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual )
-{   
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    if ( self -> curs == NULL )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Reference accessed before a call to ReferenceIteratorNext()" );
-        return NULL;        
-    }
-
-    {
-        TRY ( bool circular = CSRA1_ReferenceGetIsCircular ( self, ctx ) )
-        {
-            TRY ( uint64_t ref_len = CSRA1_ReferenceGetLength ( self, ctx ) )
-            {
-                /* wants_with_window does not matter, this is not a slice */
-                filters &= ~ NGS_AlignmentFilterBits_start_within_window;
-
-                return CSRA1_ReferenceWindowMake ( ctx, 
-                                                   self -> dad . coll, 
-                                                   self -> curs,
-                                                   circular,
-                                                   ref_len,
-                                                   self -> chunk_size,
-                                                   self -> first_row, 
-                                                   self -> first_row, 
-                                                   self -> last_row + 1, 
-                                                   0,
-                                                   0,
-                                                   wants_primary, 
-                                                   wants_secondary,
-                                                   filters, 
-                                                   map_qual,
-                                                   self -> align_id_offset );
-            }
-        }
-    }
-    
-    return NULL;
-}
-
-
-uint64_t CSRA1_ReferenceGetAlignmentCount ( const CSRA1_Reference * self, ctx_t ctx, bool wants_primary, bool wants_secondary )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    if ( self -> curs == NULL )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return 0;
-    }
-
-    {
-        uint64_t res = 0;
-        uint64_t cur_row = self -> first_row;
-
-        while ( cur_row <= self -> last_row )
-        {
-            const void * base;
-            uint32_t elem_bits, boff, row_len;
-
-            if ( wants_primary )
-            {
-                ON_FAIL ( NGS_CursorCellDataDirect ( self -> curs, ctx, cur_row, reference_PRIMARY_ALIGNMENT_IDS,
-                                                     & elem_bits, & base, & boff, & row_len ) )
-                    return res;
-
-                res += row_len;
-            }
-
-            if ( wants_secondary )
-            {
-                ON_FAIL ( NGS_CursorCellDataDirect ( self -> curs, ctx, cur_row, reference_SECONDARY_ALIGNMENT_IDS,
-                                                     & elem_bits, & base, & boff, & row_len ) )
-                    return res;
-
-                res += row_len;
-            }
-
-            cur_row ++;
-        }
-        return res;
-    }
-}
-
-/*
-    Calculate starting reference chunk to cover alignments overlapping with the slice; 
-    separately for primary and secondary alignments
-*/
-static
-void LoadOverlaps ( CSRA1_Reference * self, 
-                    ctx_t ctx, 
-                    uint32_t chunk_size,
-                    uint64_t offset, 
-                    int64_t * primary_begin, 
-                    int64_t * secondary_begin) 
-{
-    int64_t first_row = self -> first_row + offset / chunk_size;
-    uint32_t primary_len;
-    uint32_t secondary_len;
-    int32_t primary_pos;
-    int32_t secondary_pos;
-    uint32_t offset_in_chunk = offset % chunk_size;
-    
-    {   /*OVERLAP_REF_LEN*/
-        const void* base;
-        uint32_t elem_bits, boff, row_len;
-        ON_FAIL ( NGS_CursorCellDataDirect ( self -> curs, ctx, first_row, reference_OVERLAP_REF_LEN, & elem_bits, & base, & boff, & row_len ) )
-        {   /* no overlap columns, apply 10-chunk lookback */
-            CLEAR ();
-            if ( first_row > 11 ) 
-            {
-                *primary_begin = 
-                *secondary_begin = first_row - 10;
-            }
-            else
-            {
-                *primary_begin = 
-                *secondary_begin = 1;
-            }
-            return;
-        }
-        
-        assert ( elem_bits == 32 );
-        assert ( boff == 0 );
-        assert ( row_len == 3 );
-        
-        primary_len     = ( (const uint32_t*)base ) [0];
-        secondary_len   = ( (const uint32_t*)base ) [1];
-    }
-    
-    if (primary_len == 0 && secondary_len == 0)
-    {
-        *primary_begin = *secondary_begin = first_row;
-    }
-    else
-    {   /*OVERLAP_REF_POS*/
-        const void* base;
-        uint32_t elem_bits, boff, row_len;
-        ON_FAIL( NGS_CursorCellDataDirect ( self -> curs, ctx, first_row, reference_OVERLAP_REF_POS, & elem_bits, & base, & boff, & row_len ) )
-            return;
-            
-        assert ( elem_bits == 32 );
-        assert ( boff == 0 );
-        assert ( row_len == 3 );
-        
-        primary_pos     = ( (const int32_t*)base ) [0];
-        secondary_pos   = ( (const int32_t*)base ) [1];
-    
-        if ( primary_len == 0 || primary_len < offset_in_chunk )
-        {
-            * primary_begin = first_row;
-        }
-        else
-        {
-            * primary_begin = self -> first_row + primary_pos / chunk_size;
-        }
-        
-        if ( secondary_len == 0 || secondary_len < offset_in_chunk )
-        {
-            * secondary_begin = first_row;
-        }
-        else
-        {
-            * secondary_begin = self -> first_row + secondary_pos / chunk_size;
-        }
-    }
-}               
-
-struct NGS_Alignment* CSRA1_ReferenceGetAlignmentSlice ( CSRA1_Reference * self, 
-                                                         ctx_t ctx, 
-                                                         uint64_t offset, 
-                                                         uint64_t size, 
-                                                         bool wants_primary, 
-                                                         bool wants_secondary,
-                                                         uint32_t filters,
-                                                         int32_t map_qual )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading ); 
-
-    assert ( self );
-    if ( self -> curs == NULL )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Reference accessed before a call to ReferenceIteratorNext()" );
-        return NULL;        
-    }
-    
-    if ( size == 0 )
-    {
-        NGS_Alignment* ret = NGS_AlignmentMakeNull ( ctx, "", 0 );
-        return ret;
-    }
-
-    {
-        TRY ( bool circular = CSRA1_ReferenceGetIsCircular ( self, ctx ) )
-        {
-            TRY ( uint64_t ref_len = CSRA1_ReferenceGetLength ( self, ctx ) )
-            {
-                if ( circular )
-                {   /* for a circular reference, always look at the whole of it 
-                       (to account for alignments that start near the end and overlap with the first chunk) */
-                    return CSRA1_ReferenceWindowMake ( ctx, 
-                                                       self -> dad . coll, 
-                                                       self -> curs,
-                                                       true, /* circular */
-                                                       ref_len,
-                                                       self -> chunk_size,
-                                                       self->first_row, /*primary_begin*/
-                                                       self->first_row, /*secondary_begin*/
-                                                       self -> last_row + 1, 
-                                                       offset,
-                                                       size,
-                                                       wants_primary, 
-                                                       wants_secondary,
-                                                       filters,
-                                                       map_qual,
-                                                       self -> align_id_offset );
-                }
-                else
-                {   /* for non-circular references, restrict the set of chunks to go through */
-                    int64_t primary_begin   = self->first_row;
-                    int64_t secondary_begin = self->first_row;
-
-                    /* calculate the row range taking "overlaps" into account */
-                    TRY ( LoadOverlaps ( self, ctx, self -> chunk_size, offset, & primary_begin, & secondary_begin ) )
-                    {
-                        /* calculate the last chunk (same for all types of alignments) */
-                        int64_t end = self -> first_row + ( offset + size - 1 ) / self -> chunk_size + 1;
-                        if ( end > self -> last_row )
-                            end = self -> last_row + 1;
-                            
-                        return CSRA1_ReferenceWindowMake ( ctx, 
-                                                           self -> dad . coll, 
-                                                           self -> curs,
-                                                           false,
-                                                           ref_len,
-                                                           self -> chunk_size,
-                                                           primary_begin, 
-                                                           secondary_begin,
-                                                           end, 
-                                                           offset,
-                                                           size,
-                                                           wants_primary, 
-                                                           wants_secondary,
-                                                           filters,
-                                                           map_qual,
-                                                           self -> align_id_offset );
-                    }
-                }
-            }
-        }
-        return NULL;
-    }
-}                                                         
-
-struct NGS_Pileup* CSRA1_ReferenceGetPileups ( CSRA1_Reference * self, ctx_t ctx, bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual )
-{   
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    if ( self -> curs == NULL )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Reference accessed before a call to ReferenceIteratorNext()" );
-        return NULL;        
-    }
-
-    return CSRA1_PileupIteratorMake ( ctx, 
-                                      & self -> dad,
-                                      self -> db, 
-                                      self -> curs,
-                                      CSRA1_Reference_GetFirstRowId ( (NGS_Reference const*)self, ctx ),
-                                      CSRA1_Reference_GetLastRowId ( (NGS_Reference const*)self, ctx ),
-                                      wants_primary, 
-                                      wants_secondary,
-                                      filters,
-                                      map_qual );
-}
-
-static struct NGS_Pileup* CSRA1_ReferenceGetPileupSlice ( CSRA1_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size, bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    if ( self -> curs == NULL )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-    if ( ! self -> seen_first )
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Reference accessed before a call to ReferenceIteratorNext()" );
-        return NULL;        
-    }
-    
-    return CSRA1_PileupIteratorMakeSlice ( ctx, 
-                                           & self -> dad,
-                                           self -> db, 
-                                           self -> curs,
-                                           CSRA1_Reference_GetFirstRowId ( (NGS_Reference const*)self, ctx ),
-                                           CSRA1_Reference_GetLastRowId ( (NGS_Reference const*)self, ctx ),
-                                           offset,
-                                           size,
-                                           wants_primary, 
-                                           wants_secondary,
-                                           filters,
-                                           map_qual );
-}
-
-struct NGS_Statistics* CSRA1_ReferenceGetStatistics ( const CSRA1_Reference * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    /* for now, return an empty stats object */
-    return SRA_StatisticsMake ( ctx );
-}
-
-bool CSRA1_ReferenceFind ( NGS_Cursor const * curs, ctx_t ctx, const char * spec, int64_t* firstRow, uint64_t* rowCount )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    int64_t firstRow_local;
-    uint64_t rowCount_local;
-
-    if ( firstRow == NULL )
-        firstRow = & firstRow_local;
-
-    if ( rowCount == NULL )
-        rowCount = & rowCount_local;
-
-    assert ( curs != NULL );
-    assert ( spec != NULL );
-
-    {   /* use index on reference name if available */
-        TRY ( const VTable* table = NGS_CursorGetTable ( curs, ctx ) )
-        {
-            const KIndex *index;
-            rc_t rc = VTableOpenIndexRead( table, & index, "i_name" );
-            VTableRelease( table );
-            if ( rc == 0 )
-            {
-                rc = KIndexFindText ( index, spec, firstRow, rowCount, NULL, NULL );
-                KIndexRelease ( index );
-                if ( rc == 0 )
-                    return true;
-            }
-        }
-    }
-    /* index not available - do a table scan */
-    {
-        int64_t cur_row;
-        int64_t end_row;
-        uint64_t total_row_count;
-
-        size_t spec_size = string_size ( spec );
-        
-        TRY ( NGS_CursorGetRowRange ( curs, ctx, & cur_row, & total_row_count ) )
-        {
-            const void * prev_NAME_base = NULL;
-            const void * prev_SEQ_ID_base = NULL;
-            end_row = cur_row + total_row_count;
-            while ( cur_row < end_row )
-            {   
-                const void * base;
-                uint32_t elem_bits, boff, row_len;
-
-                /* try NAME */
-                ON_FAIL ( NGS_CursorCellDataDirect ( curs, ctx, cur_row, reference_NAME, & elem_bits, & base, & boff, & row_len ) )
-                    return false;
-
-                /* if the value has not changed, the base ptr will not be updated */ 
-                if ( prev_NAME_base != base )
-                {
-                    if ( ( size_t ) row_len == spec_size )
-                    {
-                        assert ( elem_bits == 8 );
-                        assert ( boff == 0 );
-
-                        if ( memcmp ( spec, base, row_len ) == 0 )
-                        {
-                            *firstRow = cur_row;
-                            *rowCount = CountRows( curs, ctx, reference_NAME, base, row_len, * firstRow, end_row );
-                            return true;
-                        }
-                    }
-
-                    prev_NAME_base = base;
-                }
-
-                /* try SEQ_ID */
-                ON_FAIL ( NGS_CursorCellDataDirect ( curs, ctx, cur_row, reference_SEQ_ID, & elem_bits, & base, & boff, & row_len ) )
-                    return false;
-
-                /* if the value has not changed, the base ptr will not be updated */ 
-                if ( prev_SEQ_ID_base != base )
-                {
-                    if ( ( size_t ) row_len == spec_size )
-                    {
-                        assert ( elem_bits == 8 );
-                        assert ( boff == 0 );
-
-                        if ( memcmp ( spec, base, row_len ) == 0 )
-                        {
-                            *firstRow = cur_row;
-                            *rowCount = CountRows( curs, ctx, reference_SEQ_ID, base, row_len, * firstRow, end_row );
-                            return true;
-                        }
-                    }
-
-                    prev_SEQ_ID_base = base;
-                }
-
-                ++cur_row;
-            }
-        }
-    }
-    
-    return false;
-}
-
-NGS_Reference * CSRA1_ReferenceMake ( ctx_t ctx, 
-                                      struct NGS_ReadCollection * coll,
-                                      const struct VDatabase * db,
-                                      const struct NGS_Cursor * curs, 
-                                      const char * spec,
-                                      uint64_t align_id_offset )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    assert ( coll != NULL );
-    assert ( curs != NULL );
-    
-    {
-        TRY ( NGS_String * collName = NGS_ReadCollectionGetName ( coll, ctx ) )
-        {
-            CSRA1_Reference * ref = calloc ( 1, sizeof * ref );
-            if ( ref == NULL )
-            {
-                SYSTEM_ERROR ( xcNoMemory, "allocating CSRA1_Reference(%s) on '%.*s'"
-                               , spec
-                               , ( uint32_t ) NGS_StringSize ( collName, ctx ), NGS_StringData ( collName, ctx )
-                    );
-            }
-            else
-            {
-#if _DEBUGGING
-                char instname [ 256 ];
-                string_printf ( instname, sizeof instname, NULL, "%.*s(%s)"
-                               , ( uint32_t ) NGS_StringSize ( collName, ctx ), NGS_StringData ( collName, ctx )
-                                , spec );
-                instname [ sizeof instname - 1 ] = 0;
-#else
-                const char *instname = "";
-#endif
-                TRY ( CSRA1_ReferenceInit ( ctx, ref, coll, "CSRA1_Reference", instname, align_id_offset ) )
-                {
-                    uint64_t rowCount;
-                    
-                    ref -> curs = NGS_CursorDuplicate ( curs, ctx );
-
-                    ref -> db = db;
-                    VDatabaseAddRef ( ref -> db );
-
-                    
-                    /* find requested name */
-                    if ( CSRA1_ReferenceFind ( ref -> curs, ctx, spec, & ref -> first_row, & rowCount ) )
-                    {
-                        TRY ( ref -> chunk_size = NGS_CursorGetUInt32 ( ref -> curs, ctx, ref -> first_row, reference_MAX_SEQ_LEN ) )
-                        {
-                            ref -> iteration_row_last = 0;
-                            ref -> last_row = ref -> first_row + rowCount - 1;
-                            ref -> seen_first = true;
-                            NGS_StringRelease ( collName, ctx );
-                            return ( NGS_Reference * ) ref;
-                        }
-                    }      
-                    
-                    INTERNAL_ERROR ( xcRowNotFound, "Reference not found ( NAME = %s )", spec );
-                    CSRA1_ReferenceWhack ( ref, ctx );
-                }
-
-                free ( ref );
-            }
-            NGS_StringRelease ( collName, ctx );
-        }
-    }
-
-    return NULL;
-}
-
-/*--------------------------------------------------------------------------
- * NGS_ReferenceIterator
- */
-
-/* Make
- */
-NGS_Reference * CSRA1_ReferenceIteratorMake ( ctx_t ctx, 
-                                                    struct NGS_ReadCollection * coll,
-                                                    const struct VDatabase * db,
-                                                    const struct NGS_Cursor * curs,
-                                                    uint64_t align_id_offset )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    assert ( coll != NULL );
-    assert ( db != NULL );
-    assert ( curs != NULL );
-    
-    {
-        TRY ( NGS_String * collName = NGS_ReadCollectionGetName ( coll, ctx ) )
-        {
-            CSRA1_Reference * ref = calloc ( 1, sizeof * ref );
-            if ( ref == NULL )
-            {
-                SYSTEM_ERROR ( xcNoMemory, "allocating CSRA1_ReferenceIterator on '%.*s'"
-                               , ( uint32_t ) NGS_StringSize ( collName, ctx ), NGS_StringData ( collName, ctx )
-                    );
-            }
-            else
-            {
-#if _DEBUGGING
-                char instname [ 256 ];
-                string_printf ( instname, sizeof instname, NULL, "%.*s"
-                               , ( uint32_t ) NGS_StringSize ( collName, ctx ), NGS_StringData ( collName, ctx )
-                    );
-                instname [ sizeof instname - 1 ] = 0;
-#else
-                const char *instname = "";
-#endif
-                TRY ( CSRA1_ReferenceInit ( ctx, ref, coll, "CSRA1_Reference", instname, align_id_offset ) )
-                {
-                    uint64_t row_count;
-                   
-                    ref -> curs = NGS_CursorDuplicate ( curs, ctx );
-
-                    ref -> db = db;
-                    VDatabaseAddRef ( ref -> db );
-                    
-                    TRY ( NGS_CursorGetRowRange ( ref -> curs, ctx, & ref -> first_row, & row_count ) )
-                    {
-                        TRY ( ref -> chunk_size = NGS_CursorGetUInt32 ( ref -> curs, ctx, ref -> first_row, reference_MAX_SEQ_LEN ) )
-                        {
-                            ref -> iteration_row_last = ref -> first_row + row_count - 1;
-                            ref -> last_row     = 0; /* will be set by CSRA1_ReferenceIteratorNext*/
-                            ref -> seen_first   = false;
-                            NGS_StringRelease ( collName, ctx );
-                            return & ref -> dad;
-                        }
-                    }
-                    CSRA1_ReferenceWhack ( ref, ctx );
-                }
-
-                free ( ref );
-            }
-            NGS_StringRelease ( collName, ctx );
-        }
-    }
-
-    return NULL;
-}
-
-/* Next
- */
-bool CSRA1_ReferenceIteratorNext ( CSRA1_Reference * self, ctx_t ctx )
-{
-    assert ( self != NULL );
-    
-    if ( self -> curs == NULL  || self -> first_row > self -> iteration_row_last)
-        return false; /* iteration over or not initialized */
-
-    self -> cur_length = 0;
-    
-    if ( self -> seen_first )
-    {   /* skip to the next reference */
-        self -> first_row = self -> last_row + 1;
-        if ( self -> first_row > self -> iteration_row_last)
-        {   /* end of iteration */
-            self -> last_row = self -> first_row;
-            return false;
-        }
-    }
-    else
-    {   /* first reference */
-        self -> seen_first = true;
-    }
-    
-    {   /* update self -> last_row */
-        const void * refNameBase = NULL;
-        uint32_t nameLength;
-
-        {   /* get the new reference's name */
-            uint32_t elem_bits, boff;
-            ON_FAIL ( NGS_CursorCellDataDirect ( self -> curs, ctx, self -> first_row, reference_NAME, 
-                                                 & elem_bits, & refNameBase, & boff, & nameLength ) )
-                return false;
-            assert ( elem_bits == 8 );
-            assert ( boff == 0 );
-        }
-    
-        {   /* use index on reference name if available */
-            uint64_t rowCount;
-            rc_t rc = 1; /* != 0 in case the following TRY fails */
-            TRY ( const VTable* table = NGS_CursorGetTable ( self -> curs, ctx ) )
-            {
-                const KIndex *index;
-                rc = VTableOpenIndexRead( table, & index, "i_name" );
-                VTableRelease( table );
-                if ( rc == 0 )
-                {
-                    char* key = string_dup ( ( const char * ) refNameBase, nameLength );
-                    int64_t firstRow;
-                    rc = KIndexFindText ( index, key, & firstRow, & rowCount, NULL, NULL );
-                    assert ( firstRow == self -> first_row );
-                    KIndexRelease ( index );
-                    free ( key );
-                }
-            }
-            
-            CLEAR();
-            
-            if ( rc != 0 )
-            {   /* index is not available, do a table scan */
-                rowCount = CountRows ( self -> curs, ctx, reference_NAME, refNameBase, nameLength, self -> first_row, self -> iteration_row_last );
-            }
-            
-            self -> last_row = self -> first_row + rowCount - 1;
-        }
-    }
-    
-    return true;
-}
diff --git a/libs/ngs/CSRA1_Reference.h b/libs/ngs/CSRA1_Reference.h
deleted file mode 100644
index 2989947..0000000
--- a/libs/ngs/CSRA1_Reference.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_csra1_reference_
-#define _h_csra1_reference_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct NGS_Cursor;
-struct NGS_ReadCollection;
-struct NGS_Reference;
-struct VDatabase;
-
-
-enum ReferenceTableColumns
-{
-    reference_CIRCULAR,
-    reference_NAME,
-    reference_SEQ_ID,
-    reference_SEQ_LEN,
-    reference_SEQ_START,
-    reference_MAX_SEQ_LEN,
-    reference_READ,
-    reference_PRIMARY_ALIGNMENT_IDS,
-    reference_SECONDARY_ALIGNMENT_IDS,
-    reference_OVERLAP_REF_LEN,
-    reference_OVERLAP_REF_POS,
-
-    reference_NUM_COLS
-};
-
-
-struct NGS_Reference * CSRA1_ReferenceMake ( ctx_t ctx, 
-                                             struct NGS_ReadCollection * coll,
-                                             const struct VDatabase * db,
-                                             const struct NGS_Cursor * curs, 
-                                             const char * spec,
-                                             uint64_t align_id_offset );
-
-struct NGS_Reference * CSRA1_ReferenceIteratorMake ( ctx_t ctx, 
-                                                     struct NGS_ReadCollection * coll,
-                                                     const struct VDatabase * db,
-                                                     const struct NGS_Cursor * curs,
-                                                     uint64_t align_id_offset );
-
-int64_t CSRA1_Reference_GetFirstRowId ( const struct NGS_Reference * self, ctx_t ctx );
-int64_t CSRA1_Reference_GetLastRowId ( const struct NGS_Reference * self, ctx_t ctx );
-
-/*
-CSRA1_ReferenceFind
-    curs - the cursor opened for table REFERENCE
-    spec - the reference name to find
-    firstRow [OUT, NULL OK] - the first row id for the reference found in the case when the function returns non-zero
-    rowCount  [OUT, NULL OK] - the number of row ids for the reference found in the case when the function returns non-zero
-
-    return: 0 (false) if the reference is not found, otherwise (true) - the reference is found
-*/
-bool CSRA1_ReferenceFind ( struct NGS_Cursor const * curs, ctx_t ctx, const char * spec, int64_t* firstRow, uint64_t* rowCount );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_csra1_reference_ */
diff --git a/libs/ngs/CSRA1_ReferenceWindow.c b/libs/ngs/CSRA1_ReferenceWindow.c
deleted file mode 100644
index 3ef6f87..0000000
--- a/libs/ngs/CSRA1_ReferenceWindow.c
+++ /dev/null
@@ -1,1049 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "CSRA1_ReferenceWindow.h"
-
-typedef struct CSRA1_ReferenceWindow CSRA1_ReferenceWindow;
-#define NGS_ALIGNMENT CSRA1_ReferenceWindow
-
-#include "NGS_Alignment.h"
-#include "NGS_ReadCollection.h"
-#include "NGS_Refcount.h"
-
-#include "NGS_Cursor.h"
-#include "NGS_String.h"
-#include "NGS_Id.h"
-
-#include "CSRA1_Reference.h"
-#include "CSRA1_Alignment.h"
-
-#include <sysalloc.h>
-
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <klib/sort.h>
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <limits.h>
-
-#ifndef min
-#   define min(a,b) ( (a) < (b) ? (a) : (b) )            
-#endif
-
-/*--------------------------------------------------------------------------
- * CSRA1_ReferenceWindow
- */
-enum
-{
-    Primary     = 0,
-    Secondary   = 1
-};
-struct AlignmentInfo
-{
-    int64_t id; 
-                        /* sort order */
-    int64_t     pos;    /* asc */
-    uint64_t    len;    /* desc */
-    int8_t      cat;    /* prim, sec */
-    int32_t     mapq;   /* desc */
-};
-typedef struct AlignmentInfo AlignmentInfo;
-
-struct CSRA1_ReferenceWindow
-{
-    NGS_Refcount dad;   
-    NGS_ReadCollection * coll;
-    
-    const NGS_Cursor * reference_curs;
-    
-    bool circular;
-    bool primary;
-    bool secondary;
-    uint32_t filters;  /* uses NGS_AlignmentFilterBits from NGS_Alignment.h */
-    int32_t map_qual;
-    
-    uint32_t chunk_size;
-    uint64_t ref_length; /* total reference length in bases */
-    uint64_t id_offset;
-    
-    /* remaining range of chunks in the reference table */
-    int64_t ref_begin;
-    int64_t ref_end;
-    
-    /* for use in a slice iterator: */
-    /* slice (0, 0) = all */
-    uint64_t slice_offset;
-    uint64_t slice_size; /* 0 = the rest of the reference */
-    /* starting chunks for primary/secondary tables */
-    int64_t ref_primary_begin;
-    int64_t ref_secondary_begin;
-    
-    /* false - not positioned on any chunk */
-    bool seen_first;
-    
-    /* alignments against current chunk, sorted in canonical order */
-    AlignmentInfo* align_info; 
-    size_t align_info_cur;
-    size_t align_info_total;
-    NGS_Alignment* cur_align; /* cached current alignment, corresponds to align_info_cur */
-};
-
-/* access to filter bits
- *  NB - the polarity of "pass-bad" and "pass-dups" has been inverted,
- *  making these same bits now mean "drop-bad" and "drop-dups". this
- *  was done so that the bits can be tested for non-zero to indicate
- *  need to apply filters.
- */
-#define CSRA1_ReferenceWindowFilterDropBad( self )                                 \
-    ( ( ( self ) -> filters & NGS_AlignmentFilterBits_pass_bad ) != 0 )
-#define CSRA1_ReferenceWindowFilterDropDups( self )                                \
-    ( ( ( self ) -> filters & NGS_AlignmentFilterBits_pass_dups ) != 0 )
-#define CSRA1_ReferenceWindowFilterMinMapQual( self )                              \
-    ( ( ( self ) -> filters & NGS_AlignmentFilterBits_min_map_qual ) != 0 )
-#define CSRA1_ReferenceWindowFilterMaxMapQual( self )                              \
-    ( ( ( self ) -> filters & NGS_AlignmentFilterBits_max_map_qual ) != 0 )
-#define CSRA1_ReferenceWindowFilterMapQual( self )                                 \
-    ( ( ( self ) -> filters & NGS_AlignmentFilterBits_map_qual ) != 0 )
-#define CSRA1_ReferenceWindowFilterNoWraparound( self )                            \
-    ( ( ( self ) -> filters & NGS_AlignmentFilterBits_no_wraparound ) != 0 )
-#define CSRA1_ReferenceWindowFilterStartWithinWindow( self )                       \
-    ( ( ( self ) -> filters & NGS_AlignmentFilterBits_start_within_window ) != 0 )
-
-#define NGS_AlignmentFilterBits_prop_mask \
-    ( NGS_AlignmentFilterBits_pass_bad | NGS_AlignmentFilterBits_pass_dups | NGS_AlignmentFilterBits_map_qual )
-
-
-/* Whack
- */
-static
-void CSRA1_ReferenceWindowWhack ( CSRA1_ReferenceWindow * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcDestroying );
-    
-    NGS_AlignmentRelease ( self -> cur_align, ctx );
-    free ( self -> align_info );
-    NGS_CursorRelease ( self -> reference_curs, ctx );
-    NGS_RefcountRelease ( & self -> coll -> dad, ctx );
-}
-
-static
-NGS_Alignment* GetAlignment ( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{    
-    if ( self -> seen_first && 
-         ( self -> circular || self -> ref_begin < self ->ref_end ) && /* for circular references, all chunks are loaded at once */
-         self -> align_info_cur < self -> align_info_total )
-    {   
-        if ( self -> cur_align == NULL )
-        {
-            TRY ( NGS_String * run_name = NGS_ReadCollectionGetName ( self -> coll, ctx ) )
-            {
-                TRY ( const NGS_String * id = NGS_IdMake ( ctx, 
-                                                           run_name, 
-                                                           self -> align_info [ self -> align_info_cur ] . cat == Primary ? 
-                                                            NGSObject_PrimaryAlignment:
-                                                            NGSObject_SecondaryAlignment, 
-                                                           self -> align_info [ self -> align_info_cur ] . id /* + self -> id_offset ? */) )
-                {
-                    self -> cur_align = NGS_ReadCollectionGetAlignment ( self -> coll, ctx, NGS_StringData ( id, ctx ) );
-                    NGS_StringRelease ( id, ctx );
-                }
-                NGS_StringRelease ( run_name, ctx );
-            }
-        }
-        return self -> cur_align;
-    }
-    USER_ERROR ( xcIteratorUninitialized, "Invalid alignment" );
-    return NULL;
-}
-
-
-static 
-NGS_String* CSRA1_FragmentGetId ( CSRA1_ReferenceWindow * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_FragmentGetId ( (NGS_Fragment*)ref, ctx );
-    }
-    return NULL;
-}
-
-static 
-struct NGS_String * CSRA1_FragmentGetSequence ( CSRA1_ReferenceWindow * self, ctx_t ctx, uint64_t offset, uint64_t length )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_FragmentGetSequence ( (NGS_Fragment*)ref, ctx, offset, length );
-    }
-    return NULL;
-}
-
-static 
-struct NGS_String * CSRA1_FragmentGetQualities ( CSRA1_ReferenceWindow * self, ctx_t ctx, uint64_t offset, uint64_t length )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_FragmentGetQualities ( (NGS_Fragment*)ref, ctx, offset, length );
-    }
-    return NULL;
-}
-
-static 
-bool CSRA1_FragmentIsPaired ( CSRA1_ReferenceWindow * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_FragmentIsPaired ( (NGS_Fragment*)ref, ctx );
-    }
-    return false;
-}
-
-static 
-bool CSRA1_FragmentIsAligned ( CSRA1_ReferenceWindow * self, ctx_t ctx )
-{
-    assert ( self != NULL );
-    return true;
-}
-
-static 
-bool CSRA1_FragmentNext ( CSRA1_ReferenceWindow * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    UNIMPLEMENTED(); /* CSRA1_FragmentNext; should not be called - Alignment is not a FragmentIterator */
-    return false;
-}
-
-static
-NGS_String * CSRA1_ReferenceWindowGetAlignmentId( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetAlignmentId ( ref, ctx );
-    }
-    return NULL;
-}
-
-static
-struct NGS_String* CSRA1_ReferenceWindowGetReferenceSpec( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetReferenceSpec ( ref, ctx );
-    }
-    return NULL;
-}
-
-static
-int CSRA1_ReferenceWindowGetMappingQuality( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetMappingQuality ( ref, ctx );
-    }
-    return 0;
-}
-
-static
-INSDC_read_filter CSRA1_ReferenceWindowGetReadFilter( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetReadFilter ( ref, ctx );
-    }
-    return 0;
-}
-
-static
-struct NGS_String* CSRA1_ReferenceWindowGetReferenceBases( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetReferenceBases ( ref, ctx );
-    }
-    return NULL;
-}
-
-static
-struct NGS_String* CSRA1_ReferenceWindowGetReadGroup( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetReadGroup ( ref, ctx );
-    }
-    return NULL;
-}
-
-static
-NGS_String * CSRA1_ReferenceWindowGetReadId( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetReadId ( ref, ctx );
-    }
-    return NULL;
-}
-
-static
-struct NGS_String* CSRA1_ReferenceWindowGetClippedFragmentBases( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetClippedFragmentBases ( ref, ctx );
-    }
-    return NULL;
-}
-
-static
-struct NGS_String* CSRA1_ReferenceWindowGetClippedFragmentQualities( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetClippedFragmentQualities ( ref, ctx );
-    }
-    return NULL;
-}
-
-static
-struct NGS_String* CSRA1_ReferenceWindowGetAlignedFragmentBases( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetAlignedFragmentBases ( ref, ctx );
-    }
-    return NULL;
-}
-
-static
-bool CSRA1_ReferenceWindowIsPrimary( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentIsPrimary ( ref, ctx );
-    }
-    return false;
-}
-
-static
-int64_t CSRA1_ReferenceWindowGetAlignmentPosition( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetAlignmentPosition ( ref, ctx );
-    }
-    return 0;
-}
-
-static
-uint64_t CSRA1_ReferenceWindowGetReferencePositionProjectionRange( CSRA1_ReferenceWindow* self, ctx_t ctx, int64_t ref_pos )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetReferencePositionProjectionRange ( ref, ctx, ref_pos );
-    }
-    return 0;
-}
-
-static
-uint64_t CSRA1_ReferenceWindowGetAlignmentLength( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetAlignmentLength ( ref, ctx );
-    }
-    return 0;
-}
-
-static
-bool CSRA1_ReferenceWindowGetIsReversedOrientation( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetIsReversedOrientation ( ref, ctx );
-    }
-    return false;
-}
-
-static
-int CSRA1_ReferenceWindowGetSoftClip( CSRA1_ReferenceWindow* self, ctx_t ctx, bool left )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetSoftClip ( ref, ctx, left );
-    }
-    return 0;
-}
-
-static
-uint64_t CSRA1_ReferenceWindowGetTemplateLength( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetTemplateLength ( ref, ctx );
-    }
-    return 0;
-}
-
-static
-struct NGS_String* CSRA1_ReferenceWindowGetShortCigar( CSRA1_ReferenceWindow* self, ctx_t ctx, bool clipped )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetShortCigar ( ref, ctx, clipped );
-    }
-    return NULL;
-}
-
-static
-struct NGS_String* CSRA1_ReferenceWindowGetLongCigar( CSRA1_ReferenceWindow* self, ctx_t ctx, bool clipped )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetLongCigar ( ref, ctx, clipped );
-    }
-    return NULL;
-}
-
-static
-char CSRA1_ReferenceWindowGetRNAOrientation( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetRNAOrientation ( ref, ctx );
-    }
-    return false;
-}
-
-static
-bool CSRA1_ReferenceWindowHasMate( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentHasMate ( ref, ctx );
-    }
-    CLEAR(); /* we do not want HasMate to ever throw, as a favor to C++/Java front ends */
-    return false;
-}
-
-static
-struct NGS_String* CSRA1_ReferenceWindowGetMateAlignmentId( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetMateAlignmentId ( ref, ctx );
-    }
-    return 0;
-}
-
-static
-CSRA1_ReferenceWindow* CSRA1_ReferenceWindowGetMateAlignment( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return ( CSRA1_ReferenceWindow * ) NGS_AlignmentGetMateAlignment( ref, ctx );
-    }
-    return NULL;
-}
-
-static
-struct NGS_String* CSRA1_ReferenceWindowGetMateReferenceSpec( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetMateReferenceSpec ( ref, ctx );
-    }
-    return NULL;
-}
-
-static
-bool CSRA1_ReferenceWindowGetMateIsReversedOrientation( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* ref = GetAlignment ( self, ctx ) )
-    {
-        return NGS_AlignmentGetMateIsReversedOrientation ( ref, ctx );
-    }
-    return false;
-}
-
-/*--------------------------------------------------------------------------
- * Iterator
- */
-static
-int64_t AlignmentSort ( const void * p_a, const void * p_b, void *data )
-{
-    const struct AlignmentInfo* a = ( const struct AlignmentInfo * ) p_a;
-    const struct AlignmentInfo* b = ( const struct AlignmentInfo * ) p_b;
-    
-    if ( a -> pos < b -> pos )
-        return -1;
-    else if ( a -> pos > b -> pos )
-        return 1;
-    
-    /* cannot use uint64_t - uint64_t because of possible overflow */
-    if ( a -> len < b -> len ) return 1;
-    if ( a -> len > b -> len ) return -1;
-    
-    if ( a -> cat != b -> cat )
-        return (int64_t) a -> cat - (int64_t) b -> cat;
-    
-    /* sort by mapq in reverse order */
-    if ( a -> mapq != b -> mapq )
-        return (int64_t) b -> mapq - (int64_t) a -> mapq;
-
-    /* use row id as the last resort, to make sorting more predictable */
-    return a -> id < b -> id ? -1 : a -> id > b -> id;
-}
-
-static
-void LoadAlignmentInfo ( CSRA1_ReferenceWindow* self, ctx_t ctx, size_t* idx, int64_t id, bool primary, int64_t offset, uint64_t size )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    TRY ( NGS_Alignment* al = CSRA1_AlignmentMake ( ctx, 
-                                                    ( struct CSRA1_ReadCollection * ) self -> coll, 
-                                                    id, 
-                                                    "", 0, 
-                                                    primary, 
-                                                    self -> id_offset ) )
-    {
-        int64_t pos = NGS_AlignmentGetAlignmentPosition ( al, ctx );
-        int64_t len = (int64_t) NGS_AlignmentGetAlignmentLength ( al, ctx );
-        
-        if ( ! CSRA1_ReferenceWindowFilterStartWithinWindow ( self ) || pos >= offset )
-        {
-            bool overlaps = true;
-            
-            if ( size > 0 )
-            {   /* a slice*/
-                int64_t end_slice =  offset + (int64_t)size;
-                if ( end_slice > (int64_t) self -> ref_length )
-                {
-                    end_slice = self -> ref_length;
-                }
-                if ( ! CSRA1_ReferenceWindowFilterStartWithinWindow ( self ) &&
-                     ! CSRA1_ReferenceWindowFilterNoWraparound ( self ) &&
-                     pos + len >= (int64_t) self -> ref_length ) 
-                {   /* account for possible carryover on a circular reference */
-                    pos -= self -> ref_length;
-                }
-                overlaps = pos < end_slice && ( pos + len > offset );                
-            }
-
-            /* use single-pass loop as a sort of sanctimonious goto mechanism */
-            while ( overlaps )
-            {
-                int32_t map_qual = 0;
-                bool have_map_qual = false;
-
-                /* test for additional filtering */
-                if ( ( self -> filters & NGS_AlignmentFilterBits_prop_mask ) != 0 )
-                {
-                    TRY ( INSDC_read_filter read_filter = NGS_AlignmentGetReadFilter ( al, ctx ) )
-                    {
-                        switch ( read_filter )
-                        {
-                        case READ_FILTER_PASS:
-                            if ( CSRA1_ReferenceWindowFilterMapQual ( self ) )
-                            {
-                                TRY ( map_qual = NGS_AlignmentGetMappingQuality ( al, ctx ) )
-                                {
-                                    have_map_qual = true;
-                                    if ( CSRA1_ReferenceWindowFilterMinMapQual ( self ) )
-                                    {
-                                        /* map_qual must be >= filter level */
-                                        if ( map_qual < self -> map_qual )
-                                            overlaps = false;
-                                    }
-                                    else
-                                    {
-                                        /* map qual must be <= filter level */
-                                        if ( map_qual > self -> map_qual )
-                                            overlaps = false;
-                                    }
-                                }
-                            }
-                            break;
-                        case READ_FILTER_REJECT:
-                            if ( CSRA1_ReferenceWindowFilterDropBad ( self ) )
-                                overlaps = false;
-                            break;
-                        case READ_FILTER_CRITERIA:
-                            if ( CSRA1_ReferenceWindowFilterDropDups ( self ) )
-                                overlaps = false;
-                            break;
-                        case READ_FILTER_REDACTED:
-                            overlaps = false;
-                            break;
-                        }
-
-                        if ( ! overlaps )
-                            break;
-                    }
-                }
-
-                /* accept record */
-
-    /*printf("%li, %li, %i, %li\n", pos, len, NGS_AlignmentGetMappingQuality ( al, ctx ), id);        */
-                self -> align_info [ *idx ] . id = id;
-                self -> align_info [ *idx ] . pos = pos;
-                self -> align_info [ *idx ] . len = len;
-                self -> align_info [ *idx ] . cat = primary ? Primary : Secondary;
-                self -> align_info [ *idx ] . mapq = have_map_qual ? map_qual : NGS_AlignmentGetMappingQuality ( al, ctx );
-                ++ ( * idx );
-
-                /* MUST break here to exit single pass */
-                break;
-            }
-        }
-        
-        NGS_AlignmentRelease ( al, ctx );
-    }
-    CATCH ( xcSecondaryAlignmentMissingPrimary )
-    {
-        CLEAR ();
-    }
-}
-
-static
-void LoadAlignmentIndex ( CSRA1_ReferenceWindow* self, ctx_t ctx, int64_t row_id, uint32_t id_col_idx, const int64_t**  p_base, uint32_t* p_length )
-{
-    const void * base;
-    uint32_t elem_bits, boff, row_len;
-    TRY ( NGS_CursorCellDataDirect ( self -> reference_curs, 
-                                     ctx,
-                                     row_id, 
-                                     id_col_idx, 
-                                     & elem_bits, 
-                                     & base, 
-                                     & boff, 
-                                     & row_len ) )
-    {
-        assert ( elem_bits == 64 );
-        assert ( boff == 0 );
-        *p_base = ( const int64_t* ) base;
-        *p_length = row_len;
-    }
-}
-
-static
-int64_t AlignmentSortCircular ( const void * p_a, const void * p_b, void *data )
-{
-    const struct AlignmentInfo* a = ( const struct AlignmentInfo * ) p_a;
-    const struct AlignmentInfo* b = ( const struct AlignmentInfo * ) p_b;
-    
-    uint64_t total = *(uint64_t*)data;
-    int64_t a_start = a -> pos;
-    int64_t b_start = b -> pos;
-    if ( ( (uint64_t)a-> pos ) + a -> len > total )
-    {
-        a_start -= total;
-    }
-    if ( ( (uint64_t)b -> pos ) + b -> len > total )
-    {
-        b_start -= total;
-    }
-    
-    if ( a_start < b_start )
-        return -1;
-    else if ( a_start > b_start )
-        return 1;
-    
-    /* cannot use uint64_t - uint64_t because of possible overflow */
-    if ( a -> len < b -> len ) return 1;
-    if ( a -> len > b -> len ) return -1;
-
-    if ( a -> cat != b -> cat )
-        return (int64_t) a -> cat - (int64_t) b -> cat;
-    
-    /* sort by mapq in reverse order */
-    if ( a -> mapq != b -> mapq )
-        return (int64_t) b -> mapq - (int64_t) a -> mapq;
-
-    /* use row id as the last resort, to make sorting more predictable */
-    return a -> id < b -> id ? -1 : a -> id > b -> id;
-}
-
-static
-void LoadAlignments ( CSRA1_ReferenceWindow* self, ctx_t ctx, int64_t chunk_row_id, int64_t offset, uint64_t size )
-{   /* append alignments for the specified chunk to self -> align_info */
-    const int64_t* primary_idx = NULL;
-    uint32_t primary_idx_end = 0;
-    const int64_t* secondary_idx = NULL;
-    uint32_t secondary_idx_end = 0;
-    uint32_t total_added = 0;
-
-    if ( self -> primary && self -> ref_primary_begin <= chunk_row_id )
-    {   
-        ON_FAIL ( LoadAlignmentIndex ( self, ctx, chunk_row_id, reference_PRIMARY_ALIGNMENT_IDS, & primary_idx, & primary_idx_end ) ) 
-            return;
-    }        
-
-    if ( self -> secondary && self -> ref_secondary_begin <= chunk_row_id )
-    {   
-        ON_FAIL ( LoadAlignmentIndex ( self, ctx, chunk_row_id, reference_SECONDARY_ALIGNMENT_IDS, & secondary_idx, & secondary_idx_end ) ) 
-        {   
-            if ( GetRCObject ( ctx -> rc ) == rcColumn && GetRCState ( ctx -> rc ) == rcNotFound )
-            {   /* SECONDARY_ALIGNMENT_IDS is missing; no problem */
-                self -> secondary = false; /* do not try anymore */
-                CLEAR();
-            }
-            else
-            {
-                return;
-            }
-        }
-    }        
-
-    total_added = primary_idx_end + secondary_idx_end;
-    if ( total_added > 0 )
-    {   
-        self -> align_info = realloc ( self -> align_info, ( self -> align_info_total + total_added ) * sizeof ( * self -> align_info ) );
-        if ( self -> align_info == NULL ) 
-        {
-            SYSTEM_ERROR ( xcNoMemory, "allocating CSRA1_ReferenceWindow chunk" );
-            return;
-        }
-        else
-        {
-            uint32_t i;
-            for ( i = 0; i < primary_idx_end; ++i )
-            {
-                ON_FAIL ( LoadAlignmentInfo( self, ctx, & self -> align_info_total, primary_idx [ i ], true, offset, size ) ) 
-                    return;
-            }
-            for ( i = 0; i < secondary_idx_end; ++i )
-            {
-                ON_FAIL ( LoadAlignmentInfo( self, ctx, & self -> align_info_total, secondary_idx [ i ] + self -> id_offset, false, offset, size ) ) 
-                    return;
-            }
-        }
-    }
-    /* now self -> align_info_total is the actual number of alignments currently loaded into self->align_info (can be less than allocated for) */
-}
-
-static
-bool LoadFirstCircular ( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{   /* load the first chunk of a circular reference (other chunks will go through LoadNextChunk) */
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    int64_t last_chunk = self -> ref_end - 1;
-    assert ( self );
-    
-    self -> align_info_total = 0;
-
-    /* for windows on circular references, self->ref_begin and and self->ref_end - 1 
-        are the rowId's of the first and last chunk of the reference, regardless of slicing */
-    if ( ! CSRA1_ReferenceWindowFilterNoWraparound ( self ) && self -> ref_begin < last_chunk )
-    {   /* load the last chunk of the reference, to cover possible overlaps into the first chunk */
-        if ( self -> slice_size == 0 )
-        {   /* loading possible overlaps with the first chunk */
-            ON_FAIL ( LoadAlignments ( self, ctx, last_chunk, 0, self -> chunk_size ) )
-                return false;
-        }
-        else if ( self -> slice_offset < self -> chunk_size )
-        {   /* loading possible overlaps with a slice inside the first chunk */ 
-            ON_FAIL ( LoadAlignments ( self, ctx, last_chunk, self -> slice_offset, self -> chunk_size - self -> slice_offset ) )
-                return false;
-        }
-        /* target slice is not in the first chunk, no need to look for overlaps from the end of the reference */
-    }
-    
-    ON_FAIL ( LoadAlignments ( self, ctx, self -> ref_begin, self -> slice_offset, self -> slice_size ) )
-        return false;
-    
-    if ( self -> align_info_total > 0 )
-    {
-        ksort ( self -> align_info, self -> align_info_total, sizeof ( * self -> align_info ), AlignmentSortCircular, & self -> ref_length );
-        self -> align_info_cur = 0;
-        return true;
-    }
-    return false;
-}
-
-static
-bool LoadNextChunk ( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    assert ( self );
-    
-    self -> align_info_total = 0;
-    while ( self -> ref_begin < self -> ref_end )
-    {
-        ON_FAIL ( LoadAlignments ( self, ctx, self -> ref_begin, self -> slice_offset, self -> slice_size ) )
-            return false;
-    
-        if ( self -> align_info_total > 0 )
-        {
-            ksort ( self -> align_info, self -> align_info_total, sizeof ( * self -> align_info ), AlignmentSort, NULL );
-            self -> align_info_cur = 0;
-        
-            return true;
-        }
-
-        /* this chunk had no alignments - move to the next one */
-        ++ self -> ref_begin;
-    }
-    
-    return false;
-} 
- 
-static
-bool CSRA1_ReferenceWindowIteratorNext ( CSRA1_ReferenceWindow* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    if ( ! self -> seen_first )
-    {   /* first call - position on the first alignment */
-        self -> seen_first = true;
-        if ( self -> circular )
-        {   
-            return LoadFirstCircular ( self, ctx );
-        }
-    }
-    else 
-    {
-        /* clear cached alignment*/
-        NGS_AlignmentRelease ( self -> cur_align, ctx );
-        self -> cur_align = NULL;
-        
-        ++ self -> align_info_cur;
-        if ( self -> align_info_cur < self -> align_info_total )
-            return true;
-            
-        ++ self -> ref_begin;
-    }
-    
-    return LoadNextChunk ( self, ctx );
-}
-
-static NGS_Alignment_vt CSRA1_ReferenceWindow_vt_inst =
-{
-    {
-        {   /* NGS_Refcount */
-            CSRA1_ReferenceWindowWhack
-        },
-
-        /* NGS_Fragment */
-        CSRA1_FragmentGetId,
-        CSRA1_FragmentGetSequence,
-        CSRA1_FragmentGetQualities,
-        CSRA1_FragmentIsPaired,
-        CSRA1_FragmentIsAligned,
-        CSRA1_FragmentNext
-    }, 
-    
-    CSRA1_ReferenceWindowGetAlignmentId,
-    CSRA1_ReferenceWindowGetReferenceSpec,
-    CSRA1_ReferenceWindowGetMappingQuality,
-    CSRA1_ReferenceWindowGetReadFilter,
-    CSRA1_ReferenceWindowGetReferenceBases,
-    CSRA1_ReferenceWindowGetReadGroup,
-    CSRA1_ReferenceWindowGetReadId,
-    CSRA1_ReferenceWindowGetClippedFragmentBases,
-    CSRA1_ReferenceWindowGetClippedFragmentQualities,
-    CSRA1_ReferenceWindowGetAlignedFragmentBases,
-    CSRA1_ReferenceWindowIsPrimary,
-    CSRA1_ReferenceWindowGetAlignmentPosition,
-    CSRA1_ReferenceWindowGetReferencePositionProjectionRange,
-    CSRA1_ReferenceWindowGetAlignmentLength,
-    CSRA1_ReferenceWindowGetIsReversedOrientation,
-    CSRA1_ReferenceWindowGetSoftClip,
-    CSRA1_ReferenceWindowGetTemplateLength,
-    CSRA1_ReferenceWindowGetShortCigar,
-    CSRA1_ReferenceWindowGetLongCigar,
-    CSRA1_ReferenceWindowGetRNAOrientation,
-    CSRA1_ReferenceWindowHasMate,
-    CSRA1_ReferenceWindowGetMateAlignmentId,
-    CSRA1_ReferenceWindowGetMateAlignment,
-    CSRA1_ReferenceWindowGetMateReferenceSpec,
-    CSRA1_ReferenceWindowGetMateIsReversedOrientation,
-
-    /* Iterator */
-    CSRA1_ReferenceWindowIteratorNext
-};
-
-static
-void CSRA1_ReferenceWindowInit ( CSRA1_ReferenceWindow * ref, 
-                                 ctx_t ctx, 
-                                 NGS_ReadCollection * coll,
-                                 const struct NGS_Cursor* curs,
-                                 bool circular,
-                                 uint64_t ref_length,
-                                 uint32_t chunk_size,
-                                 int64_t primary_begin_row,
-                                 int64_t secondary_begin_row,
-                                 int64_t end_row,
-                                 uint64_t offset,
-                                 uint64_t size, /* 0 - all remaining */
-                                 bool primary,
-                                 bool secondary,
-                                 uint32_t filters,
-                                 int32_t map_qual,
-                                 uint64_t id_offset )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    
-    TRY ( NGS_AlignmentInit ( ctx, ref, & CSRA1_ReferenceWindow_vt_inst, "CSRA1_ReferenceWindow", "" ) )
-    {
-        TRY ( ref -> coll = (NGS_ReadCollection *) NGS_RefcountDuplicate ( & coll -> dad, ctx ) )
-        {
-            ref -> reference_curs       = NGS_CursorDuplicate ( curs, ctx );
-            ref -> circular             = circular;
-            ref -> primary              = primary;
-            ref -> secondary            = secondary;
-            /* see comment above about inverting polarity of the "pass" bits to create "drop" bits */
-            ref -> filters              = filters ^ ( NGS_AlignmentFilterBits_pass_bad | NGS_AlignmentFilterBits_pass_dups );
-            ref -> map_qual             = map_qual;
-            ref -> chunk_size           = chunk_size;
-            ref -> ref_length           = ref_length;
-            ref -> id_offset            = id_offset;
-            ref -> ref_begin            = min (primary_begin_row, secondary_begin_row);
-            ref -> ref_primary_begin    = primary_begin_row;
-            ref -> ref_secondary_begin  = secondary_begin_row;
-            ref -> ref_end              = end_row;
-            ref -> slice_offset         = offset;
-            ref -> slice_size           = size;
-        }
-    }
-}                           
-
-/* MakeCommon
- *  makes a common alignment from VCursor
- */
-NGS_Alignment * CSRA1_ReferenceWindowMake ( ctx_t ctx, 
-                                            struct NGS_ReadCollection * coll,
-                                            const struct NGS_Cursor* curs,
-                                            bool circular,
-                                            uint64_t ref_length,
-                                            uint32_t chunk_size,
-                                            int64_t primary_begin_row,
-                                            int64_t secondary_begin_row,
-                                            int64_t end_row,
-                                            uint64_t offset,
-                                            uint64_t size, /* 0 - all remaining */
-                                            bool primary,
-                                            bool secondary,
-                                            uint32_t filters,
-                                            int32_t map_qual,
-                                            uint64_t id_offset )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    CSRA1_ReferenceWindow * ref;
-
-    assert ( coll != NULL );
-
-    ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating CSRA1_ReferenceWindow" );
-    else
-    {
-        TRY ( CSRA1_ReferenceWindowInit ( ref, 
-                                          ctx, 
-                                          coll, 
-                                          curs, 
-                                          circular,
-                                          ref_length,
-                                          chunk_size,
-                                          primary_begin_row,
-                                          secondary_begin_row,
-                                          end_row, 
-                                          offset,
-                                          size, 
-                                          primary, 
-                                          secondary,
-                                          filters,
-                                          map_qual,
-                                          id_offset ) ) 
-        {
-            return ( NGS_Alignment * ) ref;
-        }
-
-        free ( ref );
-    }
-
-    return NULL;
-}
diff --git a/libs/ngs/CSRA1_ReferenceWindow.h b/libs/ngs/CSRA1_ReferenceWindow.h
deleted file mode 100644
index a48658b..0000000
--- a/libs/ngs/CSRA1_ReferenceWindow.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_csra1_reference_window_
-#define _h_csra1_reference_window_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-
-struct NGS_Cursor;
-struct NGS_Alignment;
-struct NGS_ReadCollection;
-
-struct NGS_Alignment * CSRA1_ReferenceWindowMake ( ctx_t ctx, 
-                                                   struct NGS_ReadCollection * coll, 
-                                                   const struct NGS_Cursor* curs,
-                                                   bool circular,
-                                                   uint64_t ref_length,
-                                                   uint32_t chunk_size,
-                                                   int64_t primary_begin_row,
-                                                   int64_t secondary_begin_row,
-                                                   int64_t end_row,
-                                                   uint64_t offset,
-                                                   uint64_t size, /* 0 - all remaining */
-                                                   bool wants_primary, 
-                                                   bool wants_secondary,
-                                                   uint32_t filters,
-                                                   int32_t map_qual,
-                                                   uint64_t id_offset );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_csra1_alignment_ */
diff --git a/libs/ngs/EBI_ReferenceSequence.c b/libs/ngs/EBI_ReferenceSequence.c
deleted file mode 100644
index 367fc42..0000000
--- a/libs/ngs/EBI_ReferenceSequence.c
+++ /dev/null
@@ -1,408 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "EBI_ReferenceSequence.h"
-
-typedef struct EBI_ReferenceSequence EBI_ReferenceSequence;
-#define NGS_REFERENCESEQUENCE EBI_ReferenceSequence
-#include "NGS_ReferenceSequence.h"
-
-#include "NGS_String.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-#include <kns/http.h>
-#include <kns/stream.h>
-#include <kns/manager.h>
-
-#include <stddef.h>
-#include <assert.h>
-
-#include <strtol.h>
-#include <string.h>
-
-#include <sysalloc.h>
-
-/*--------------------------------------------------------------------------
- * EBI_ReferenceSequence
- */
-
-static void                EBI_ReferenceSequenceWhack ( EBI_ReferenceSequence * self, ctx_t ctx );
-static NGS_String *        EBI_ReferenceSequenceGetCanonicalName ( EBI_ReferenceSequence * self, ctx_t ctx );
-static bool                EBI_ReferenceSequenceGetIsCircular ( EBI_ReferenceSequence const* self, ctx_t ctx );
-static uint64_t            EBI_ReferenceSequenceGetLength ( EBI_ReferenceSequence * self, ctx_t ctx );
-static struct NGS_String * EBI_ReferenceSequenceGetBases ( EBI_ReferenceSequence * self, ctx_t ctx, uint64_t offset, uint64_t size );
-static struct NGS_String * EBI_ReferenceSequenceGetChunk ( EBI_ReferenceSequence * self, ctx_t ctx, uint64_t offset, uint64_t size );
-
-static NGS_ReferenceSequence_vt EBI_ReferenceSequence_vt_inst =
-{
-    /* NGS_Refcount */
-    { EBI_ReferenceSequenceWhack }
-    
-    /* NGS_ReferenceSequence */
-    ,EBI_ReferenceSequenceGetCanonicalName
-    ,EBI_ReferenceSequenceGetIsCircular
-    ,EBI_ReferenceSequenceGetLength
-    ,EBI_ReferenceSequenceGetBases
-    ,EBI_ReferenceSequenceGetChunk
-};
-
-
-struct EBI_ReferenceSequence
-{
-    NGS_ReferenceSequence dad;
-
-    uint64_t cur_length; /* size of current reference in bases (0 = not yet counted) */
-
-    char* buf_ref_data;     /* contains reference data
-                            */
-    NGS_String* ebi_ref_spec;
-};
-
-static
-void EBI_ReferenceSequenceWhack ( EBI_ReferenceSequence * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcNS, rcTable, rcClosing );
-
-    if ( self->buf_ref_data != NULL )
-    {
-        free ( self->buf_ref_data );
-        self->buf_ref_data = NULL;
-        self->cur_length = 0;
-    }
-
-    NGS_StringRelease ( self -> ebi_ref_spec, ctx );
-}
-
-/* Init
- */
-static
-void EBI_ReferenceSequenceInit ( ctx_t ctx, 
-                           EBI_ReferenceSequence * ref,
-                           const char *clsname, 
-                           const char *instname )
-{
-    FUNC_ENTRY ( ctx, rcNS, rcTable, rcOpening );
-
-    if ( ref == NULL )
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    else
-    {
-        TRY ( NGS_ReferenceSequenceInit ( ctx, & ref -> dad, & EBI_ReferenceSequence_vt_inst, clsname, instname ) )
-        {
-            /* TODO: maybe initialize more*/
-        }
-    }
-}
-
-static bool is_md5 ( const char * spec )
-{
-    size_t char_count = 32;
-    const char allowed_chars[] = "0123456789abcdefABCDEF";
-
-    size_t i;
-    for ( i = 0; spec [i] != '\0' && i < char_count; ++i )
-    {
-        if ( strchr ( allowed_chars, spec[i] ) == NULL )
-        {
-            return false;
-        }
-    }
-
-    return i == char_count;
-}
-
-static rc_t NGS_ReferenceSequenceComposeEBIUrl ( ctx_t ctx, const char * spec, bool ismd5, char* url, size_t url_size )
-{
-    char const url_templ_md5[] = "http://www.ebi.ac.uk/ena/cram/md5/%s";
-    char const url_templ_acc[] = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&rettype=fasta&id=%s";
-
-    size_t num_written = 0;
-    rc_t rc = string_printf ( url, url_size, & num_written, ismd5 ? url_templ_md5 : url_templ_acc, spec );
-
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcStorageExhausted, "insufficient url buffer for NGS_ReferenceSequenceComposeEBIUrl" );
-    }
-
-    return rc;
-}
-
-static rc_t NGS_ReferenceSequenceEBIInitReference (
-    ctx_t ctx, bool ismd5, EBI_ReferenceSequence * ref,
-    const char* ebi_data, size_t ebi_data_size)
-{
-    rc_t rc = 0;
-    ref -> buf_ref_data = malloc ( ebi_data_size );
-    if ( ref -> buf_ref_data == NULL )
-        return RC ( rcRuntime, rcBuffer, rcAllocating, rcMemory, rcExhausted );
-
-    if ( ismd5 )
-    {
-        memcpy ( ref->buf_ref_data, ebi_data, ebi_data_size );
-        ref -> cur_length = ebi_data_size;
-    }
-    else
-    {
-        size_t i, i_dst;
-
-        /* this is FASTA file - skip first line and parse out all other '\n' */
-
-        /* 1. skip 1st line */
-        for ( i = 0; i < ebi_data_size && ebi_data [i] != '\0'; ++i )
-        {
-            if ( ebi_data [i] == '\n' )
-            {
-                ++i;
-                break;
-            }
-        }
-
-        if ( i == ebi_data_size || ebi_data [i] == '\0' )
-            return RC ( rcText, rcDoc, rcParsing, rcFormat, rcInvalid );
-
-        /* copy everything except '\n' to the reference buffer */
-
-        i_dst = 0;
-        for (; i < ebi_data_size && ebi_data [i] != '\0'; ++i)
-        {
-            if ( ebi_data [i] != '\n' )
-                ref->buf_ref_data [i_dst++] = ebi_data [i];
-        }
-        ref -> cur_length = i_dst;
-    }
-
-    return rc;
-}
-
-
-#define URL_SIZE 512
-
-static rc_t NGS_ReferenceSequenceOpenEBI ( ctx_t ctx, const char * spec, EBI_ReferenceSequence * ref )
-{
-    rc_t rc = 0;
-    KDataBuffer result;
-    KHttpRequest *req = NULL;
-    KHttpResult *rslt = NULL;
-    bool ismd5 = is_md5 ( spec );
-    KNSManager * mgr;
-
-    size_t const url_size = URL_SIZE;
-    char url_request [ URL_SIZE ];
-
-    rc = KNSManagerMake ( & mgr );
-    if ( rc != 0 )
-        return rc;
-
-    memset(&result, 0, sizeof result);
-    rc = NGS_ReferenceSequenceComposeEBIUrl ( ctx, spec, ismd5, url_request, url_size );
-
-    if ( rc == 0 )
-        rc = KNSManagerMakeRequest (mgr, &req, 0x01010000, NULL,url_request);
-
-    if ( rc == 0 )
-        rc = KHttpRequestGET(req, &rslt);
-
-    if ( rc == 0 )
-    {
-        uint32_t code = 0;
-        rc = KHttpResultStatus(rslt, &code, NULL, 0, NULL);
-        if (rc == 0 && code != 200)
-            rc = RC(rcNS, rcFile, rcReading, rcFile, rcInvalid);
-    }
-
-    if ( rc == 0 )
-    {
-        size_t total = 0;
-        KStream *response = NULL;
-        rc = KHttpResultGetInputStream(rslt, &response);
-        if (rc == 0)
-            rc = KDataBufferMakeBytes(&result, 1024);
-
-        while (rc == 0)
-        {
-            size_t num_read = 0;
-            uint8_t *base = NULL;
-            uint64_t avail = result.elem_count - total;
-            if (avail < 256)
-            {
-                rc = KDataBufferResize(&result, result.elem_count + 1024);
-                if (rc != 0)
-                    break;
-            }
-            base = result.base;
-            rc = KStreamRead(response, &base[total], result.elem_count - total, &num_read);
-            if (rc != 0)
-            {
-                /* TBD - look more closely at rc */
-                if (num_read > 0)
-                    rc = 0;
-                else
-                    break;
-            }
-            if (num_read == 0)
-                break;
-
-            total += num_read;
-        }
-        KStreamRelease ( response );
-        if (rc == 0)
-        {
-            result.elem_count = total;
-        }
-    }
-
-    if ( rc == 0 )
-    {
-        const char* start = (const char*) result.base;
-        size_t size = KDataBufferBytes ( & result );
-
-        rc = NGS_ReferenceSequenceEBIInitReference ( ctx, ismd5, ref, start, size );
-        if (rc == 0)
-            ref->ebi_ref_spec = NGS_StringMakeCopy ( ctx, spec, strlen(spec) );
-    }
-
-    /* TODO: release only if they were allocated */
-    KDataBufferWhack ( &result );
-    KHttpResultRelease ( rslt );
-    KHttpRequestRelease ( req );
-
-    KNSManagerRelease ( mgr );
-
-    return rc;
-}
-
-NGS_ReferenceSequence * NGS_ReferenceSequenceMakeEBI ( ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcNS, rcTable, rcOpening );
-
-    EBI_ReferenceSequence * ref;
-
-    assert ( spec != NULL );
-    assert ( spec [0] != '\0' );
-
-    ref = calloc ( 1, sizeof *ref );
-    if ( ref == NULL )
-    {
-        SYSTEM_ERROR ( xcNoMemory, "allocating EBI_ReferenceSequence ( '%s' )", spec );
-    }
-    else
-    {
-        TRY ( EBI_ReferenceSequenceInit ( ctx, ref, "NGS_ReferenceSequence", spec ) )
-        {
-            rc_t rc = NGS_ReferenceSequenceOpenEBI ( ctx, spec, ref );
-            if ( rc != 0 )
-            {
-                INTERNAL_ERROR ( xcUnexpected, "failed to open table '%s': rc = %R", spec, rc );
-            }
-            else
-            {
-                return (NGS_ReferenceSequence*) ref;
-            }
-            EBI_ReferenceSequenceWhack ( ref , ctx );
-        }
-        free ( ref );
-    }
-    return NULL;
-}
-
-
-NGS_String * EBI_ReferenceSequenceGetCanonicalName ( EBI_ReferenceSequence * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcNS, rcDoc, rcReading );
-    
-    assert ( self != NULL );
-    
-    return NGS_StringDuplicate ( self -> ebi_ref_spec, ctx );
-}
-
-bool EBI_ReferenceSequenceGetIsCircular ( const EBI_ReferenceSequence * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcNS, rcDoc, rcReading );
-
-    assert ( self );
-   
-    return false;
-}
-
-uint64_t EBI_ReferenceSequenceGetLength ( EBI_ReferenceSequence * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcNS, rcDoc, rcReading );
-
-    assert ( self );
-
-    return self -> cur_length;
-}
-
-struct NGS_String * EBI_ReferenceSequenceGetBases ( EBI_ReferenceSequence * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{   
-    FUNC_ENTRY ( ctx, rcNS, rcDoc, rcReading );
-
-    assert ( self );
-    
-    {
-        uint64_t totalBases = EBI_ReferenceSequenceGetLength ( self, ctx );
-        if ( offset >= totalBases )
-        {
-            return NGS_StringMake ( ctx, "", 0 );
-        }
-        else
-        {   
-            uint64_t basesToReturn = totalBases - offset;
-            char* data;
-            
-            if (size != (size_t)-1 && basesToReturn > size)
-                basesToReturn = size;
-                
-            data = (char*) malloc ( basesToReturn );
-            if ( data == NULL )
-            {
-                SYSTEM_ERROR ( xcNoMemory, "allocating %lu bases", basesToReturn );
-                return NGS_StringMake ( ctx, "", 0 );
-            }
-            else
-            {
-                return NGS_StringMakeCopy ( ctx, (const char*) self -> buf_ref_data + offset, basesToReturn );
-            }
-        }
-    }
-}
-
-struct NGS_String * EBI_ReferenceSequenceGetChunk ( EBI_ReferenceSequence * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{   
-    FUNC_ENTRY ( ctx, rcNS, rcDoc, rcReading );
-
-    assert ( self );
-
-    return EBI_ReferenceSequenceGetBases ( self, ctx, offset, size );
-}
diff --git a/libs/ngs/EBI_ReferenceSequence.h b/libs/ngs/EBI_ReferenceSequence.h
deleted file mode 100644
index 09b67f2..0000000
--- a/libs/ngs/EBI_ReferenceSequence.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ebi_referencesequence_
-#define _h_ebi_referencesequence_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct NGS_ReferenceSequenceSequence;
-
-
-struct NGS_ReferenceSequence * NGS_ReferenceSequenceMakeEBI ( ctx_t ctx,
-                                             const char * spec );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ebi_referencesequence_ */
diff --git a/libs/ngs/Makefile b/libs/ngs/Makefile
deleted file mode 100644
index 72380ff..0000000
--- a/libs/ngs/Makefile
+++ /dev/null
@@ -1,128 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/ngs
-
-INT_LIBS = \
-	libngs
-
-EXT_LIBS = \
-
-ALL_LIBS = \
-	$(INT_LIBS) \
-	$(EXT_LIBS)
-
-OBJFILES = \
-	$(NGS_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-INCDIRS += -I$(TOP)/../ngs/ngs-sdk
-
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-$(EXT_LIBS): makedirs
-	@ $(MAKE_CMD) $(LIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS)) \
-	$(addprefix $(LIBDIR)/,$(EXT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# ngs
-#  will be included in ncbi-vdb
-#
-$(ILIBDIR)/libngs: $(addprefix $(ILIBDIR)/libngs.,$(ILIBEXT))
-
-NGS_SRC =                 \
-	NCBI-NGS              \
-	CSRA1_PileupEvent     \
-	CSRA1_Pileup          \
-	CSRA1_Alignment       \
-	CSRA1_ReferenceWindow \
-	CSRA1_Reference       \
-	CSRA1_ReadCollection  \
-	CSRA1_Read            \
-	EBI_ReferenceSequence \
-	SRA_Statistics        \
-	SRA_DB_ReadCollection \
-	SRA_Read              \
-	SRA_ReadGroup         \
-	SRA_ReadGroupInfo     \
-	SRA_ReadCollection    \
-	SRA_ReferenceSequence \
-	NGS_Statistics        \
-	NGS_ReadCollection    \
-	NGS_PileupEvent       \
-	NGS_Pileup            \
-	NGS_ReadGroup         \
-	NGS_Alignment         \
-	NGS_Reference         \
-	NGS_ReferenceSequence \
-	NGS_Read              \
-	NGS_Fragment          \
-	NGS_Cursor            \
-	NGS_Refcount          \
-	NGS_String            \
-	NGS_Id                \
-	NGS_ErrBlock          \
-	NGS_FragmentBlob      \
-	NGS_FragmentBlobIterator      \
-
-NGS_OBJ = \
-	$(addsuffix .$(LOBX),$(NGS_SRC))
-
-NGS_LIB = \
-
-$(ILIBDIR)/libngs.$(LIBX): $(NGS_OBJ)
-	$(LD) --slib -o $@ $^ $(NGS_LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/ngs/Model.graphml b/libs/ngs/Model.graphml
deleted file mode 100644
index 8c55c74..0000000
--- a/libs/ngs/Model.graphml
+++ /dev/null
@@ -1,661 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
-  <!--Created by yEd 3.12-->
-  <key for="graphml" id="d0" yfiles.type="resources"/>
-  <key for="port" id="d1" yfiles.type="portgraphics"/>
-  <key for="port" id="d2" yfiles.type="portgeometry"/>
-  <key for="port" id="d3" yfiles.type="portuserdata"/>
-  <key attr.name="url" attr.type="string" for="node" id="d4"/>
-  <key attr.name="description" attr.type="string" for="node" id="d5"/>
-  <key for="node" id="d6" yfiles.type="nodegraphics"/>
-  <key attr.name="Description" attr.type="string" for="graph" id="d7"/>
-  <key attr.name="url" attr.type="string" for="edge" id="d8"/>
-  <key attr.name="description" attr.type="string" for="edge" id="d9"/>
-  <key for="edge" id="d10" yfiles.type="edgegraphics"/>
-  <graph edgedefault="directed" id="G">
-    <data key="d7"/>
-    <node id="n0">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="30.0" width="205.0" x="399.0" y="360.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="115.75048828125" x="44.624755859375" y="3.0">NGS_PileupEvent<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel/>
-            <y:MethodLabel/>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n1">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="30.0" width="176.0" x="-583.0" y="-10.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="111.51025390625" x="32.244873046875" y="3.0">NGS_ReadGroup<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel/>
-            <y:MethodLabel/>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n2">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="30.0" width="205.0" x="-282.5" y="-256.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="136.20263671875" x="34.398681640625" y="3.0">SRA_ReadCollection<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel/>
-            <y:MethodLabel/>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n3">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="30.0" width="212.0" x="-14.0" y="-203.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="161.19970703125" x="25.400146484375" y="3.0">SRA_DB_ReadCollection<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel/>
-            <y:MethodLabel/>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n4">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="30.0" width="205.0" x="249.5" y="-164.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="154.03955078125" x="25.480224609375" y="3.0">CSRA1_ReadCollection<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel/>
-            <y:MethodLabel/>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n5">
-      <data key="d4"/>
-      <data key="d6">
-        <y:UMLClassNode>
-          <y:Geometry height="28.0" width="205.0" x="408.0" y="-237.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="custom" textColor="#000000" visible="true" width="181.18212890625" x="11.908935546875" y="3.0">BAM_ReadCollection (TBD)<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="-0.03703090122767855" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:UML clipContent="true" constraint="" omitDetails="false" stereotype="" use3DEffect="true">
-            <y:AttributeLabel/>
-            <y:MethodLabel/>
-          </y:UML>
-        </y:UMLClassNode>
-      </data>
-    </node>
-    <node id="n6">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="22.0" width="238.0" x="34.0" y="-401.5"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="120.671875" x="58.6640625" y="1.93359375">NGS_ReadCollection<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="parallelogram"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n7">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="238.0" x="595.0" y="-157.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="91.24609375" x="73.376953125" y="5.93359375">NGS_Reference<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="parallelogram"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n8">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="238.0" x="296.5" y="183.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="93.970703125" x="72.0146484375" y="5.93359375">NGS_Alignment<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="parallelogram"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n9">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="238.0" x="-351.5" y="68.5"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="70.041015625" x="83.9794921875" y="5.93359375">NGS_Read2<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="parallelogram"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n10">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="238.0" x="-90.0" y="283.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="96.865234375" x="70.5673828125" y="5.93359375">NGS_Fragment2<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="parallelogram"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n11">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="238.0" x="662.5" y="283.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="69.255859375" x="84.3720703125" y="5.93359375">NGS_Pileup<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="parallelogram"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n12">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="205.0" x="-73.5" y="114.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="60.783203125" x="72.1083984375" y="5.93359375">SRA_Read<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n13">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="205.0" x="468.0" y="-62.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="105.466796875" x="49.7666015625" y="5.93359375">CSRA1_Reference<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n14">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="205.0" x="161.5" y="54.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="108.19140625" x="48.404296875" y="5.93359375">CSRA1_Alignment<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n15">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="205.0" x="587.0" y="149.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="83.4765625" x="60.76171875" y="5.93359375">CSRA1_Pileup<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n16">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="176.0" x="-473.0" y="209.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="127.861328125" x="24.0693359375" y="5.93359375">NGS_ReadGroupFilter<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n17">
-      <data key="d5"/>
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="238.0" x="-361.5" y="-49.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="62.453125" x="87.7734375" y="5.93359375">NGS_Read<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n18">
-      <data key="d5"/>
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="238.0" x="-569.5" y="-213.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="89.27734375" x="74.361328125" y="5.93359375">NGS_Fragment<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <edge id="e0" source="n2" target="n6">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="dashed" width="1.0"/>
-          <y:Arrows source="none" target="white_delta"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e1" source="n3" target="n6">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="dashed" width="1.0"/>
-          <y:Arrows source="none" target="white_delta"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e2" source="n4" target="n6">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="dashed" width="1.0"/>
-          <y:Arrows source="none" target="white_delta"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e3" source="n5" target="n6">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="dashed" width="1.0"/>
-          <y:Arrows source="none" target="white_delta"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e4" source="n13" target="n7">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="dashed" width="1.0"/>
-          <y:Arrows source="none" target="white_delta"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e5" source="n12" target="n9">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="dashed" width="1.0"/>
-          <y:Arrows source="none" target="white_delta"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e6" source="n15" target="n11">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="dashed" width="1.0"/>
-          <y:Arrows source="none" target="white_delta"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e7" source="n14" target="n8">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="dashed" width="1.0"/>
-          <y:Arrows source="none" target="white_delta"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e8" source="n16" target="n9">
-      <data key="d8"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="dashed" width="1.0"/>
-          <y:Arrows source="none" target="white_delta"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e9" source="n4" target="n13">
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e10" source="n4" target="n14">
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e11" source="n9" target="n10">
-      <data key="d8"/>
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="white_delta"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e12" source="n1" target="n16">
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e13" source="n13" target="n15">
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e14" source="n13" target="n14">
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e15" source="n4" target="n12">
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e16" source="n3" target="n12">
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e17" source="n2" target="n12">
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e18" source="n15" target="n0">
-      <data key="d8"/>
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="white_delta"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e19" source="n8" target="n10">
-      <data key="d8"/>
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="white_delta"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e20" source="n12" target="n10">
-      <data key="d8"/>
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="dashed" width="1.0"/>
-          <y:Arrows source="none" target="white_delta"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e21" source="n14" target="n10">
-      <data key="d8"/>
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="dashed" width="1.0"/>
-          <y:Arrows source="none" target="white_delta"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e22" source="n3" target="n17">
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e23" source="n17" target="n18">
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e24" source="n2" target="n17">
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e25" source="n4" target="n17">
-      <data key="d9"/>
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-  </graph>
-  <data key="d0">
-    <y:Resources/>
-  </data>
-</graphml>
diff --git a/libs/ngs/NCBI-NGS.c b/libs/ngs/NCBI-NGS.c
deleted file mode 100644
index c90a6e0..0000000
--- a/libs/ngs/NCBI-NGS.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "NCBI-NGS.h"
-#include "NGS_ErrBlock.h"
-#include "NGS_ReadCollection.h"
-#include "NGS_ReferenceSequence.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-/*--------------------------------------------------------------------------
- * NCBI NGS engine
- *  link against ncbi-vdb library
- */
-
-LIB_EXPORT struct NGS_ReadCollection_v1 * NCBI_NGS_OpenReadCollection ( const char * spec, struct NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcDatabase, rcOpening );
-
-    ON_FAIL ( NGS_ReadCollection * ret = NGS_ReadCollectionMake ( ctx, spec ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_ReadCollection_v1 * ) ret;
-}
-
-LIB_EXPORT struct NGS_ReferenceSequence_v1 * NCBI_NGS_OpenReferenceSequence ( const char * spec, struct NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcTable, rcOpening );
-
-    ON_FAIL ( NGS_ReferenceSequence * ret = NGS_ReferenceSequenceMake ( ctx, spec ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_ReferenceSequence_v1 * ) ret;
-}
diff --git a/libs/ngs/NCBI-NGS.h b/libs/ngs/NCBI-NGS.h
deleted file mode 100644
index 0fe584e..0000000
--- a/libs/ngs/NCBI-NGS.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_NCBI_NGS_
-#define _h_ngs_NCBI_NGS_
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct NGS_ErrBlock_v1;
-struct NGS_ReadCollection_v1;
-struct NGS_ReferenceSequence_v1;
-
-/*--------------------------------------------------------------------------
- * NCBI NGS engine
- *  link against ncbi-vdb library
- */
-LIB_EXPORT struct NGS_ReadCollection_v1 * NCBI_NGS_OpenReadCollection ( const char * spec, struct NGS_ErrBlock_v1 * err );
-LIB_EXPORT struct NGS_ReferenceSequence_v1 * NCBI_NGS_OpenReferenceSequence ( const char * spec, struct NGS_ErrBlock_v1 * err );
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ngs_NCBI_NGS_ */
diff --git a/libs/ngs/NGS_Alignment.c b/libs/ngs/NGS_Alignment.c
deleted file mode 100644
index 2a80205..0000000
--- a/libs/ngs/NGS_Alignment.c
+++ /dev/null
@@ -1,978 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "NGS_Alignment.h"
-
-#include "NGS_ErrBlock.h"
-#include <ngs/itf/FragmentItf.h>
-#include <ngs/itf/AlignmentItf.h>
-
-#include "NGS_Refcount.h"
-#include "NGS_String.h"
-
-#include <sysalloc.h>
-
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-
-#include <klib/printf.h>
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-/*--------------------------------------------------------------------------
- * NGS_Alignment_v1
- */
-
-#define Self( obj ) \
-    ( ( NGS_Alignment* ) ( obj ) )
-    
-static NGS_String_v1 * ITF_Alignment_v1_get_id ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_AlignmentGetAlignmentId ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static NGS_String_v1 * ITF_Alignment_v1_get_ref_spec ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_AlignmentGetReferenceSpec ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static int32_t ITF_Alignment_v1_get_map_qual ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( int32_t ret = NGS_AlignmentGetMappingQuality ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static NGS_String_v1 * ITF_Alignment_v1_get_ref_bases ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_AlignmentGetReferenceBases ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static NGS_String_v1 * ITF_Alignment_v1_get_read_group ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_AlignmentGetReadGroup ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static NGS_String_v1 * ITF_Alignment_v1_get_read_id ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_AlignmentGetReadId ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static NGS_String_v1 * ITF_Alignment_v1_get_clipped_frag_bases ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_AlignmentGetClippedFragmentBases ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static NGS_String_v1 * ITF_Alignment_v1_get_clipped_frag_quals ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_AlignmentGetClippedFragmentQualities ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static NGS_String_v1 * ITF_Alignment_v1_get_aligned_frag_bases ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_AlignmentGetAlignedFragmentBases ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static bool ITF_Alignment_v1_is_primary ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( bool ret = NGS_AlignmentIsPrimary ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static int64_t ITF_Alignment_v1_get_align_pos ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( int64_t ret = NGS_AlignmentGetAlignmentPosition ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static uint64_t ITF_Alignment_v1_get_ref_pos_projection_range ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err, int64_t ref_pos )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( uint64_t ret = NGS_AlignmentGetReferencePositionProjectionRange ( Self ( self ), ctx, ref_pos ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static uint64_t ITF_Alignment_v1_get_align_length ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( uint64_t ret = NGS_AlignmentGetAlignmentLength ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static bool ITF_Alignment_v1_get_is_reversed ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( bool ret = NGS_AlignmentGetIsReversedOrientation ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static int32_t ITF_Alignment_v1_get_soft_clip ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err, uint32_t edge )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( int32_t ret = NGS_AlignmentGetSoftClip ( Self ( self ), ctx, edge == 0 ) ) /* TODO: use an enum from <ngs/itf/AlignmentItf.h> */
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static uint64_t ITF_Alignment_v1_get_template_len ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( uint64_t ret = NGS_AlignmentGetTemplateLength ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static NGS_String_v1 * ITF_Alignment_v1_get_short_cigar ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err, bool clipped )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_AlignmentGetShortCigar ( Self ( self ), ctx, clipped ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static NGS_String_v1 * ITF_Alignment_v1_get_long_cigar ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err, bool clipped )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_AlignmentGetLongCigar ( Self ( self ), ctx, clipped ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static char ITF_Alignment_v1_get_rna_orientation ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( char ret = NGS_AlignmentGetRNAOrientation ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static bool ITF_Alignment_v1_has_mate ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( bool ret = NGS_AlignmentHasMate ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static NGS_String_v1 * ITF_Alignment_v1_get_mate_id ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_AlignmentGetMateAlignmentId ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static NGS_Alignment_v1 * ITF_Alignment_v1_get_mate_alignment ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_Alignment * ret = NGS_AlignmentGetMateAlignment ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_Alignment_v1 * ) ret;
-}
-
-static NGS_String_v1 * ITF_Alignment_v1_get_mate_ref_spec ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_AlignmentGetMateReferenceSpec ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static bool ITF_Alignment_v1_get_mate_is_reversed ( const NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( bool ret = NGS_AlignmentGetMateIsReversedOrientation ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static bool ITF_Alignment_v1_next ( NGS_Alignment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( bool ret = NGS_AlignmentIteratorNext ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-#undef Self
-
-
-NGS_Alignment_v1_vt ITF_Alignment_vt =
-{
-    {
-        "NGS_Alignment",
-        "NGS_Alignment_v1",
-        2,
-        & ITF_Fragment_vt . dad
-    },
-
-    /* v1.0 */
-    ITF_Alignment_v1_get_id,
-    ITF_Alignment_v1_get_ref_spec,
-    ITF_Alignment_v1_get_map_qual,
-    ITF_Alignment_v1_get_ref_bases,
-    ITF_Alignment_v1_get_read_group,
-    ITF_Alignment_v1_get_read_id,
-    ITF_Alignment_v1_get_clipped_frag_bases,
-    ITF_Alignment_v1_get_clipped_frag_quals,
-    ITF_Alignment_v1_get_aligned_frag_bases,
-    ITF_Alignment_v1_is_primary,
-    ITF_Alignment_v1_get_align_pos,
-    ITF_Alignment_v1_get_align_length,
-    ITF_Alignment_v1_get_is_reversed,
-    ITF_Alignment_v1_get_soft_clip,
-    ITF_Alignment_v1_get_template_len,
-    ITF_Alignment_v1_get_short_cigar,
-    ITF_Alignment_v1_get_long_cigar,
-    ITF_Alignment_v1_has_mate,
-    ITF_Alignment_v1_get_mate_id,
-    ITF_Alignment_v1_get_mate_alignment,
-    ITF_Alignment_v1_get_mate_ref_spec,
-    ITF_Alignment_v1_get_mate_is_reversed,
-    ITF_Alignment_v1_next,
-
-    /* v1.1 */
-    ITF_Alignment_v1_get_rna_orientation,
-
-    /* v1.2 */
-    ITF_Alignment_v1_get_ref_pos_projection_range
-};
-
-
-#define VT( self, msg ) \
-    ( ( ( const NGS_Alignment_vt* ) ( self ) -> dad . dad . vt ) -> msg )
-
-/* Init
- */
-void NGS_AlignmentInit ( ctx_t ctx, NGS_Alignment * ref, const NGS_Alignment_vt *vt, const char *clsname, const char *instname )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    if ( ref == NULL )
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    else
-    {
-        TRY ( NGS_FragmentInit ( ctx, & ref -> dad, & ITF_Alignment_vt . dad, & vt -> dad, clsname, instname ) )
-        {
-        }
-    }
-}
-
-struct NGS_String * NGS_AlignmentGetAlignmentId( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetAlignmentId failed" );
-    }
-    else
-    {
-        return VT ( self, getId ) ( self, ctx );
-    }
-    return 0;
-}
-
-struct NGS_String* NGS_AlignmentGetReferenceSpec( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetReferenceSpec failed" );
-    }
-    else
-    {
-        return VT ( self, getReferenceSpec ) ( self, ctx );
-    }
-    return NULL;
-}
-
-int NGS_AlignmentGetMappingQuality( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetMappingQuality failed" );
-    }
-    else
-    {
-        return VT ( self, getMappingQuality ) ( self, ctx );
-    }
-    return 0;
-}
-
-INSDC_read_filter NGS_AlignmentGetReadFilter( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetReadFilter failed" );
-    }
-    else
-    {
-        return VT ( self, getReadFilter ) ( self, ctx );
-    }
-    return 0;
-}
-
-struct NGS_String* NGS_AlignmentGetReferenceBases( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetMappingQuality failed" );
-    }
-    else
-    {
-        return VT ( self, getReferenceBases ) ( self, ctx );
-    }
-    return NULL;
-}
-
-struct NGS_String* NGS_AlignmentGetReadGroup( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetMappingQuality failed" );
-    }
-    else
-    {
-        return VT ( self, getReadGroup ) ( self, ctx );
-    }
-    return NULL;
-}
-
-struct NGS_String * NGS_AlignmentGetReadId( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetReadId failed" );
-    }
-    else
-    {
-        return VT ( self, getReadId ) ( self, ctx );
-    }
-    return 0;
-}
-
-struct NGS_String* NGS_AlignmentGetClippedFragmentBases( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetFragmentBases failed" );
-    }
-    else
-    {
-        return VT ( self, getClippedFragmentBases ) ( self, ctx );
-    }
-    return NULL;
-}
-
-struct NGS_String* NGS_AlignmentGetClippedFragmentQualities( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetFragmentQualities failed" );
-    }
-    else
-    {
-        return VT ( self, getClippedFragmentQualities ) ( self, ctx );
-    }
-    return NULL;
-}
-
-struct NGS_String* NGS_AlignmentGetAlignedFragmentBases( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetAlignedFragmentBases failed" );
-    }
-    else
-    {
-        return VT ( self, getAlignedFragmentBases ) ( self, ctx );
-    }
-    return NULL;
-}
-
-bool NGS_AlignmentIsPrimary( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentIsPrimary failed" );
-    }
-    else
-    {
-        return VT ( self, isPrimary ) ( self, ctx );
-    }
-    return false;
-}
-
-int64_t NGS_AlignmentGetAlignmentPosition( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetAlignmentPosition failed" );
-    }
-    else
-    {
-        return VT ( self, getAlignmentPosition ) ( self, ctx );
-    }
-    return 0;
-}
-
-uint64_t NGS_AlignmentGetReferencePositionProjectionRange( NGS_Alignment* self, ctx_t ctx, int64_t ref_pos )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetReferencePositionProjectionRange failed" );
-    }
-    else
-    {
-        return VT ( self, getReferencePositionProjectionRange ) ( self, ctx, ref_pos );
-    }
-    return 0;
-}
-
-uint64_t NGS_AlignmentGetAlignmentLength( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetAlignmentLength failed" );
-    }
-    else
-    {
-        return VT ( self, getAlignmentLength ) ( self, ctx );
-    }
-    return 0;
-}
-
-bool NGS_AlignmentGetIsReversedOrientation( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetIsReversedOrientation failed" );
-    }
-    else
-    {
-        return VT ( self, getIsReversedOrientation ) ( self, ctx );
-    }
-    return false;
-}
-
-int NGS_AlignmentGetSoftClip( NGS_Alignment* self, ctx_t ctx, bool left )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetSoftClip failed" );
-    }
-    else
-    {
-        return VT ( self, getSoftClip ) ( self, ctx, left );
-    }
-    return 0;
-}
-
-uint64_t NGS_AlignmentGetTemplateLength( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetTemplateLength failed" );
-    }
-    else
-    {
-        return VT ( self, getTemplateLength ) ( self, ctx );
-    }
-    return 0;
-}
-
-struct NGS_String* NGS_AlignmentGetShortCigar( NGS_Alignment* self, ctx_t ctx, bool clipped )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetShortCigar failed" );
-    }
-    else
-    {
-        return VT ( self, getShortCigar ) ( self, ctx, clipped );
-    }
-    return NULL;
-}
-
-struct NGS_String* NGS_AlignmentGetLongCigar( NGS_Alignment* self, ctx_t ctx, bool clipped )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetLongCigar failed" );
-    }
-    else
-    {
-        return VT ( self, getLongCigar ) ( self, ctx, clipped );
-    }
-    return NULL;
-}
-
-char NGS_AlignmentGetRNAOrientation( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetRNAOrientation failed" );
-    }
-    else
-    {
-        return VT ( self, getRNAOrientation ) ( self, ctx );
-    }
-    return '?';
-}
-
-bool NGS_AlignmentHasMate ( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentHasMate failed" );
-    }
-    else
-    {
-        return VT ( self, hasMate ) ( self, ctx );
-    }
-    return false;
-}
-
-struct NGS_String* NGS_AlignmentGetMateAlignmentId( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetMateAlignmentId failed" );
-    }
-    else
-    {
-        return VT ( self, getMateAlignmentId ) ( self, ctx );
-    }
-    return 0;
-}
-
-NGS_Alignment* NGS_AlignmentGetMateAlignment( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetMateAlignment failed" );
-    }
-    else
-    {
-        return VT ( self, getMateAlignment ) ( self, ctx );
-    }
-    return NULL;
-}
-
-struct NGS_String* NGS_AlignmentGetMateReferenceSpec( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetMateReferenceSpec failed" );
-    }
-    else
-    {
-        return VT ( self, getMateReferenceSpec ) ( self, ctx );
-    }
-    return NULL;
-}
-
-bool NGS_AlignmentGetMateIsReversedOrientation( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "NGS_AlignmentGetMateIsReversedOrientation failed" );
-    }
-    else
-    {
-        return VT ( self, getMateIsReversedOrientation ) ( self, ctx );
-    }
-    return false;
-}
-
-/*--------------------------------------------------------------------------
- * NGS_AlignmentIterator
- */
-bool NGS_AlignmentIteratorNext( NGS_Alignment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to increment iterator" );
-    }
-    else
-    {
-        return VT ( self, next ) ( self, ctx );
-    }
-
-    return false;
-}
-
-
-/*--------------------------------------------------------------------------
- * Null_Alignment
- */
-static
-void NullAlignmentWhack ( NGS_Alignment * self, ctx_t ctx )
-{
-}
-
-static 
-struct NGS_String * NullAlignment_FragmentToString ( NGS_Alignment * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return 0;
-}
-
-static 
-struct NGS_String * NullAlignment_FragmentOffsetLenToString ( NGS_Alignment * self, ctx_t ctx, uint64_t offset, uint64_t length )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return 0;
-}
-
-static 
-bool NullAlignment_FragmentToBool ( NGS_Alignment * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return 0;
-}
-
-
-static int64_t NullAlignment_toI64 ( NGS_ALIGNMENT* self, ctx_t ctx ) 
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return 0;
-}
-
-static struct NGS_String* NullAlignment_toString ( NGS_ALIGNMENT* self, ctx_t ctx ) 
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return NULL;
-}
-
-static int NullAlignment_toInt ( NGS_ALIGNMENT* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return 0;
-}
-
-static struct NGS_String* NullAlignment_boolToString ( NGS_ALIGNMENT* self, ctx_t ctx, bool b )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return NULL;
-}
-
-static bool NullAlignment_toBool ( NGS_ALIGNMENT* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return false;
-}
-
-static uint8_t NullAlignment_toU8 ( NGS_ALIGNMENT* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return 0;
-}
-
-static uint64_t NullAlignment_toU64 ( NGS_ALIGNMENT* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return 0;
-}
-
-static int NullAlignment_boolToInt ( NGS_ALIGNMENT* self, ctx_t ctx, bool b )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return 0;
-}
-
-static NGS_ALIGNMENT* NullAlignment_toAlignment ( NGS_ALIGNMENT* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return NULL;
-}
-
-static bool NullAlignment_noNext( NGS_ALIGNMENT* self, ctx_t ctx )
-{   /* trying to advance an empty iterator - not an error */
-    return false;
-}
-
-static char NullAlignment_RNAOrientation ( NGS_ALIGNMENT * self, ctx_t ctx )
-{
-    return '?';
-}
-
-static uint64_t NullAlignment_ReferencePositionProjectionRange ( NGS_ALIGNMENT * self, ctx_t ctx, int64_t ref_pos )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return -1 ^ (uint64_t)0xffffffff;
-}
-
-static NGS_Alignment_vt NullAlignment_vt_inst =
-{
-    {
-        {
-             /* NGS_Refcount */
-            NullAlignmentWhack
-        },
-
-        /* NGS_Fragment */
-        NullAlignment_FragmentToString,
-        NullAlignment_FragmentOffsetLenToString,
-        NullAlignment_FragmentOffsetLenToString,
-        NullAlignment_FragmentToBool,
-        NullAlignment_FragmentToBool,
-        NullAlignment_FragmentToBool
-    },
-    
-    NullAlignment_toString,        /* getId                        */
-    NullAlignment_toString,        /* getReferenceSpec             */
-    NullAlignment_toInt,           /* getMappingQuality            */
-    NullAlignment_toU8,            /* getReadFilter                */
-    NullAlignment_toString,        /* getReferenceBases            */
-    NullAlignment_toString,        /* getReadGroup                 */
-    NullAlignment_toString,        /* getReadId                    */
-    NullAlignment_toString,        /* getClippedFragmentBases      */
-    NullAlignment_toString,        /* getClippedFragmentQualities  */
-    NullAlignment_toString,        /* getAlignedFragmentBases      */
-    NullAlignment_toBool,          /* isPrimary                    */
-    NullAlignment_toI64,           /* getAlignmentPosition         */
-    NullAlignment_ReferencePositionProjectionRange, /* getReferencePositionProjectionRange */
-    NullAlignment_toU64,           /* getAlignmentLength           */
-    NullAlignment_toBool,          /* getIsReversedOrientation     */
-    NullAlignment_boolToInt,       /* getSoftClip                  */
-    NullAlignment_toU64,           /* getTemplateLength            */
-    NullAlignment_boolToString,    /* getShortCigar                */
-    NullAlignment_boolToString,    /* getLongCigar                 */
-    NullAlignment_RNAOrientation,  /* getRNAOrientation            */
-    NullAlignment_toBool,          /* hasMate                      */
-    NullAlignment_toString,        /* getMateAlignmentId           */
-    NullAlignment_toAlignment,     /* getMateAlignment             */
-    NullAlignment_toString,        /* getMateReferenceSpec         */
-    NullAlignment_toBool,          /* getMateIsReversedOrientation */
-
-    /* Iterator */
-    NullAlignment_noNext           /* next                         */
-};
-
-struct NGS_Alignment * NGS_AlignmentMakeNull ( ctx_t ctx, char const * run_name, size_t run_name_size )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    NGS_Alignment * ref;
-
-    assert ( run_name != NULL );
-
-    ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating NullAlignment on '%.*s'", run_name_size, run_name );
-    else
-    {
-#if _DEBUGGING
-        char instname [ 256 ];
-        string_printf ( instname, sizeof instname, NULL, "%.*s(NULL)", run_name_size, run_name );
-        instname [ sizeof instname - 1 ] = 0;
-#else
-        const char *instname = "";
-#endif
-        TRY ( NGS_AlignmentInit ( ctx, ref, & NullAlignment_vt_inst, "NullAlignment", instname ) )
-        {
-            return ref;
-        }
-        free ( ref );
-    }
-
-    return NULL;
-}
-
-
diff --git a/libs/ngs/NGS_Alignment.h b/libs/ngs/NGS_Alignment.h
deleted file mode 100644
index 5d2c9b1..0000000
--- a/libs/ngs/NGS_Alignment.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_alignment_
-#define _h_ngs_alignment_
-
-typedef struct NGS_Alignment NGS_Alignment;
-#ifndef NGS_ALIGNMENT
-#define NGS_ALIGNMENT NGS_Alignment
-#endif
-
-#ifndef _h_ngs_fragment_
-#define NGS_FRAGMENT NGS_ALIGNMENT
-#include "NGS_Fragment.h"
-#endif
-
-#ifndef _h_insdc_sra_
-#include <insdc/sra.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-
-struct NGS_String;
-struct NGS_Fragment;
-struct NGS_Alignment_v1_vt;
-extern struct NGS_Alignment_v1_vt ITF_Alignment_vt;
-
-/*--------------------------------------------------------------------------
- * NGS_Alignment
- */
-
-enum NGS_AlignmentFilterBits
-{
-    NGS_AlignmentFilterBits_pass_bad            = 0x01,
-    NGS_AlignmentFilterBits_pass_dups           = 0x02,
-    NGS_AlignmentFilterBits_min_map_qual        = 0x04,
-    NGS_AlignmentFilterBits_max_map_qual        = 0x08,
-    NGS_AlignmentFilterBits_no_wraparound       = 0x10,
-    NGS_AlignmentFilterBits_start_within_window = 0x20,
-
-    NGS_AlignmentFilterBits_map_qual = NGS_AlignmentFilterBits_min_map_qual | NGS_AlignmentFilterBits_max_map_qual
-};
-
- /* ToRefcount
- *  inline cast that preserves const
- */
-#define NGS_AlignmentToRefcount( self ) \
-    ( NGS_FragmentToRefcount ( & ( self ) -> dad ) )
-
-
-/* Release
- *  release reference
- */
-#define NGS_AlignmentRelease( self, ctx ) \
-    NGS_RefcountRelease ( NGS_AlignmentToRefcount ( self ), ctx )
-
-/* Duplicate
- *  duplicate reference
- */
-#define NGS_AlignmentDuplicate( self, ctx ) \
-    ( ( NGS_Alignment* ) NGS_RefcountDuplicate ( NGS_AlignmentToRefcount ( self ), ctx ) )
-
-
-struct NGS_String * NGS_AlignmentGetAlignmentId( NGS_Alignment* self, ctx_t ctx );
-
-struct NGS_String * NGS_AlignmentGetReferenceSpec( NGS_Alignment* self, ctx_t ctx );
-
-int NGS_AlignmentGetMappingQuality( NGS_Alignment* self, ctx_t ctx );
-
-INSDC_read_filter NGS_AlignmentGetReadFilter ( NGS_Alignment * self, ctx_t ctx );
-
-struct NGS_String* NGS_AlignmentGetReferenceBases( NGS_Alignment* self, ctx_t ctx );
-
-struct NGS_String* NGS_AlignmentGetReadGroup( NGS_Alignment* self, ctx_t ctx );
-
-struct NGS_String * NGS_AlignmentGetReadId( NGS_Alignment* self, ctx_t ctx );
-
-struct NGS_String* NGS_AlignmentGetClippedFragmentBases( NGS_Alignment* self, ctx_t ctx );
-
-struct NGS_String* NGS_AlignmentGetClippedFragmentQualities( NGS_Alignment* self, ctx_t ctx );
-
-struct NGS_String* NGS_AlignmentGetAlignedFragmentBases( NGS_Alignment* self, ctx_t ctx );
-
-bool NGS_AlignmentIsPrimary( NGS_Alignment* self, ctx_t ctx );
-
-int64_t NGS_AlignmentGetAlignmentPosition( NGS_Alignment* self, ctx_t ctx );
-
-uint64_t NGS_AlignmentGetReferencePositionProjectionRange( NGS_Alignment* self, ctx_t ctx, int64_t ref_pos );
-
-uint64_t NGS_AlignmentGetAlignmentLength( NGS_Alignment* self, ctx_t ctx );
-
-bool NGS_AlignmentGetIsReversedOrientation( NGS_Alignment* self, ctx_t ctx );
-
-int NGS_AlignmentGetSoftClip( NGS_Alignment* self, ctx_t ctx, bool left );
-
-uint64_t NGS_AlignmentGetTemplateLength( NGS_Alignment* self, ctx_t ctx );
-
-struct NGS_String* NGS_AlignmentGetShortCigar( NGS_Alignment* self, ctx_t ctx, bool clipped );
-
-struct NGS_String* NGS_AlignmentGetLongCigar( NGS_Alignment* self, ctx_t ctx, bool clipped );
-
-char NGS_AlignmentGetRNAOrientation( NGS_Alignment* self, ctx_t ctx );
-
-bool NGS_AlignmentHasMate ( NGS_Alignment* self, ctx_t ctx );
-
-struct NGS_String* NGS_AlignmentGetMateAlignmentId( NGS_Alignment* self, ctx_t ctx );
-
-NGS_Alignment* NGS_AlignmentGetMateAlignment( NGS_Alignment* self, ctx_t ctx );
-
-struct NGS_String* NGS_AlignmentGetMateReferenceSpec( NGS_Alignment* self, ctx_t ctx );
-
-bool NGS_AlignmentGetMateIsReversedOrientation( NGS_Alignment* self, ctx_t ctx );
-
-/*--------------------------------------------------------------------------
- * NGS_AlignmentIterator
- */
- 
-bool NGS_AlignmentIteratorNext ( NGS_Alignment* self, ctx_t ctx );
-
-/*--------------------------------------------------------------------------
- * implementation details
- */
-struct NGS_Alignment
-{
-    NGS_Fragment dad;
-};
-
-typedef struct NGS_Alignment_vt NGS_Alignment_vt;
-struct NGS_Alignment_vt
-{
-    NGS_Fragment_vt dad;
-
-    /* Alignment */
-    struct NGS_String*      ( * getId )                         ( NGS_ALIGNMENT* self, ctx_t ctx );
-    struct NGS_String*      ( * getReferenceSpec )              ( NGS_ALIGNMENT* self, ctx_t ctx );
-    int                     ( * getMappingQuality )             ( NGS_ALIGNMENT* self, ctx_t ctx );
-    INSDC_read_filter       ( * getReadFilter )                 ( NGS_ALIGNMENT* self, ctx_t ctx );
-    struct NGS_String*      ( * getReferenceBases )             ( NGS_ALIGNMENT* self, ctx_t ctx );
-    struct NGS_String*      ( * getReadGroup )                  ( NGS_ALIGNMENT* self, ctx_t ctx );
-    struct NGS_String*      ( * getReadId )                     ( NGS_ALIGNMENT* self, ctx_t ctx );
-    struct NGS_String*      ( * getClippedFragmentBases )       ( NGS_ALIGNMENT* self, ctx_t ctx );
-    struct NGS_String*      ( * getClippedFragmentQualities )   ( NGS_ALIGNMENT* self, ctx_t ctx );
-    struct NGS_String*      ( * getAlignedFragmentBases )       ( NGS_ALIGNMENT* self, ctx_t ctx );
-    bool                    ( * isPrimary )                     ( NGS_ALIGNMENT* self, ctx_t ctx );
-    int64_t                 ( * getAlignmentPosition )          ( NGS_ALIGNMENT* self, ctx_t ctx );
-    uint64_t                ( * getReferencePositionProjectionRange )( NGS_ALIGNMENT* self, ctx_t ctx, int64_t ref_pos );
-    uint64_t                ( * getAlignmentLength )            ( NGS_ALIGNMENT* self, ctx_t ctx );
-    bool                    ( * getIsReversedOrientation )      ( NGS_ALIGNMENT* self, ctx_t ctx );
-    int                     ( * getSoftClip )                   ( NGS_ALIGNMENT* self, ctx_t ctx, bool left );
-    uint64_t                ( * getTemplateLength )             ( NGS_ALIGNMENT* self, ctx_t ctx );
-    struct NGS_String*      ( * getShortCigar )                 ( NGS_ALIGNMENT* self, ctx_t ctx, bool clipped );
-    struct NGS_String*      ( * getLongCigar )                  ( NGS_ALIGNMENT* self, ctx_t ctx, bool clipped );
-    char                    ( * getRNAOrientation )             ( NGS_ALIGNMENT* self, ctx_t ctx );
-    bool                    ( * hasMate )                       ( NGS_ALIGNMENT* self, ctx_t ctx );
-    struct NGS_String*      ( * getMateAlignmentId )            ( NGS_ALIGNMENT* self, ctx_t ctx );
-    NGS_ALIGNMENT*          ( * getMateAlignment )              ( NGS_ALIGNMENT* self, ctx_t ctx );
-    struct NGS_String*      ( * getMateReferenceSpec )          ( NGS_ALIGNMENT* self, ctx_t ctx );
-    bool                    ( * getMateIsReversedOrientation )  ( NGS_ALIGNMENT* self, ctx_t ctx );
-
-    /* Iterator */
-    bool                    ( * next )                          ( NGS_ALIGNMENT* self, ctx_t ctx );
-};
-
-/* Init
- */
-void NGS_AlignmentInit ( ctx_t ctx, NGS_ALIGNMENT * ref, const NGS_Alignment_vt *vt, const char *clsname, const char *instname );
-
-/* NullAlignment
- * will error out on any call; can be used as an empty alignment iterator
- */
-struct NGS_Alignment * NGS_AlignmentMakeNull ( ctx_t ctx, char const * run_name, size_t run_name_size );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ngs_alignment_ */
diff --git a/libs/ngs/NGS_Cursor.c b/libs/ngs/NGS_Cursor.c
deleted file mode 100644
index ef2c046..0000000
--- a/libs/ngs/NGS_Cursor.c
+++ /dev/null
@@ -1,575 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "NGS_Cursor.h"
-
-#include "NGS_String.h"
-#include <ngs/itf/Refcount.h>
-
-#include <sysalloc.h>
-
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-#include <vdb/table.h>
-#include <vdb/database.h>
-
-#include <klib/rc.h>
-
-/*--------------------------------------------------------------------------
- * NGS_Cursor
- *  Shareable cursor with lazy adding of columns
- *  reference counted
- */
-
-struct NGS_Cursor
-{
-    NGS_Refcount dad;
-
-    VCursor* curs;
-
-    uint32_t num_cols;
-    char ** col_specs;      /* [num_cols] */
-    uint32_t* col_idx;      /* [num_cols] */
-    NGS_String ** col_data; /* [num_cols] */
-
-    /* row range */
-    int64_t first;
-    uint64_t count;
-};
-
-void NGS_CursorWhack ( NGS_Cursor * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcConstructing );
-
-    uint32_t i;
-
-    VCursorRelease ( self -> curs );
-
-    for ( i = 0; i < self -> num_cols; ++i )
-    {
-        free ( self -> col_specs [ i ] );
-        NGS_StringRelease ( self -> col_data [ i ], ctx );
-    }
-
-    free ( self -> col_specs );
-    free ( self -> col_data );
-
-    free ( self -> col_idx );
-}
-
-static NGS_Refcount_vt NGS_Cursor_vt =
-{
-    NGS_CursorWhack
-};
-
-/* Make
- */
-const NGS_Cursor * NGS_CursorMake ( ctx_t ctx, const struct VTable* table, const char * col_specs[], uint32_t num_cols )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    NGS_Cursor* ref = calloc( 1, sizeof (*ref) );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating NGS_Cursor" );
-    else
-    {
-        TRY ( NGS_RefcountInit ( ctx, (NGS_Refcount*) & ref -> dad, & ITF_Refcount_vt . dad, & NGS_Cursor_vt, "NGS_Cursor", "" ) )
-        {
-            rc_t rc = VTableCreateCursorRead ( table, (const VCursor**) & ref -> curs );
-            if ( rc != 0 )
-            {
-                INTERNAL_ERROR ( xcCursorCreateFailed, "VTableCreateCursorRead rc = %R", rc );
-                NGS_CursorWhack ( ref, ctx );
-                free ( ref );
-                return NULL;
-            }
-
-            ref -> num_cols = num_cols;
-
-            /* make a copy of col specs */
-            ref -> col_specs = malloc ( num_cols * sizeof ( col_specs [ 0 ] ) );
-            if ( ref -> col_specs == NULL )
-            {
-                SYSTEM_ERROR ( xcNoMemory, "allocating NGS_Cursor . col_specs" );
-                NGS_CursorWhack ( ref, ctx );
-                free ( ref );
-                return NULL;
-            }
-
-            {
-                uint32_t i;
-                for ( i = 0; i < num_cols; ++i )
-                {
-                    ref -> col_specs [ i ] = string_dup ( col_specs [ i ], string_size ( col_specs [ i ] ) );
-                    if ( ref -> col_specs [ i ] == NULL )
-                    {
-                        SYSTEM_ERROR ( xcNoMemory, "populating NGS_Cursor . col_specs" );
-                        NGS_CursorWhack ( ref, ctx );
-                        free ( ref );
-                        return NULL;
-                    }
-                }
-            }
-
-            ref -> col_idx = calloc ( num_cols,  sizeof ( ref -> col_idx [ 0 ] ) );
-            if ( ref -> col_idx == NULL )
-            {
-                SYSTEM_ERROR ( xcNoMemory, "allocating NGS_Cursor . col_idx" );
-                NGS_CursorWhack ( ref, ctx );
-                free ( ref );
-                return NULL;
-            }
-
-            ref -> col_data = calloc ( num_cols,  sizeof ( ref -> col_data[ 0 ] ) );
-            if ( ref -> col_idx == NULL )
-            {
-                SYSTEM_ERROR ( xcNoMemory, "allocating NGS_Cursor . col_data" );
-                NGS_CursorWhack ( ref, ctx );
-                free ( ref );
-                return NULL;
-            }
-
-            {   /* add first column; leave other for lazy add */
-                const char * col_spec = col_specs [ 0 ];
-                rc_t rc = VCursorAddColumn ( ref -> curs, & ref -> col_idx [ 0 ], "%s", col_spec );
-                if ( rc != 0 )
-                {
-                    INTERNAL_ERROR ( xcColumnNotFound, "VCursorAddColumn %s rc = %R", col_spec, rc );
-                    NGS_CursorWhack ( ref, ctx );
-                    free ( ref );
-                    return NULL;
-                }
-
-                rc = VCursorPermitPostOpenAdd ( ref -> curs );
-                if ( rc != 0 )
-                {
-                    INTERNAL_ERROR ( xcCursorOpenFailed, "PostOpenAdd failed rc = %R", rc );
-                    NGS_CursorWhack ( ref, ctx );
-                    free ( ref );
-                    return NULL;
-                }
-
-                /* open cursor */
-                rc = VCursorOpen ( ref -> curs );
-                if ( rc != 0 )
-                {
-                    INTERNAL_ERROR ( xcCursorOpenFailed, "VCursorOpen failed rc = %R", rc );
-                    NGS_CursorWhack ( ref, ctx );
-                    free ( ref );
-                    return NULL;
-                }
-
-                rc = VCursorIdRange ( ref -> curs, 0, & ref -> first, & ref -> count );
-                if ( rc != 0 )
-                {
-                    INTERNAL_ERROR ( xcCursorOpenFailed, "VCursorIdRange failed rc = %R", rc );
-                    NGS_CursorWhack ( ref, ctx );
-                    free ( ref );
-                    return NULL;
-                }
-
-                return ref;
-            }
-        }
-    }
-
-    return NULL;
-}
-
-const NGS_Cursor* NGS_CursorMakeDb ( ctx_t ctx,
-                                     const VDatabase* db,
-                                     const NGS_String* run_name,
-                                     const char* tableName,
-                                     const char * col_specs[],
-                                     uint32_t num_cols )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcConstructing );
-
-    const VTable * table;
-    rc_t rc = VDatabaseOpenTableRead ( db, & table, "%s", tableName );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcTableOpenFailed, "%.*s.%s", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ), tableName );
-        return NULL;
-    }
-
-    {
-        const NGS_Cursor* ret = NGS_CursorMake ( ctx, table, col_specs, num_cols );
-        VTableRelease ( table );
-        return ret;
-    }
-}
-
-/* Release
- *  release reference
- */
-void NGS_CursorRelease ( const NGS_Cursor * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcDestroying );
-
-    if ( self != NULL )
-    {
-        NGS_RefcountRelease ( & self -> dad, ctx );
-    }
-}
-
-/* Duplicate
- *  duplicate reference
- */
-const NGS_Cursor * NGS_CursorDuplicate ( const NGS_Cursor * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcConstructing );
-
-    if ( self != NULL )
-    {
-        NGS_RefcountDuplicate( & self -> dad, ctx );
-    }
-    return ( NGS_Cursor* ) self;
-}
-
-static
-void
-AddColumn ( const NGS_Cursor *self, ctx_t ctx, uint32_t colIdx )
-{   /* lazy add */
-    if ( self -> col_idx [ colIdx ] == 0 )
-    {
-        const char * col_spec = self -> col_specs [ colIdx ];
-        rc_t rc = VCursorAddColumn ( self -> curs, & self -> col_idx [ colIdx ], "%s", col_spec );
-        if ( rc != 0 && GetRCState ( rc ) != rcExists )
-        {
-            INTERNAL_ERROR ( xcColumnNotFound, "VCursorAddColumn failed: '%s' rc = %R", col_spec, rc );
-        }
-    }
-}
-
-void NGS_CursorCellDataDirect ( const NGS_Cursor *self,
-                                ctx_t ctx,
-                                int64_t rowId,
-                                uint32_t colIdx,
-                                uint32_t *elem_bits,
-                                const void **base,
-                                uint32_t *boff,
-                                uint32_t *row_len )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    rc_t rc;
-
-    assert ( self != NULL );
-
-    TRY ( AddColumn ( self, ctx, colIdx ) )
-    {
-        rc = VCursorCellDataDirect ( self -> curs, rowId, self -> col_idx [ colIdx ], elem_bits, base, boff, row_len );
-        if ( rc != 0 )
-        {
-            INTERNAL_ERROR ( xcColumnNotFound, "VCursorCellDataDirect failed: '%s' [%ld] rc = %R", self -> col_specs [ colIdx ], rowId, rc );
-        }
-    }
-}
-
-/* GetRowCount
- */
-uint64_t NGS_CursorGetRowCount ( const NGS_Cursor * self, ctx_t ctx )
-{
-    assert ( self != NULL );
-
-    return self -> count;
-}
-
-/* GetRowRange
- */
-void NGS_CursorGetRowRange ( const NGS_Cursor * self, ctx_t ctx, int64_t* first, uint64_t* count )
-{
-    assert ( self != NULL );
-    assert ( first != NULL );
-    assert ( count != NULL );
-
-    *first = self -> first;
-    *count = self -> count;
-}
-
-NGS_String * NGS_CursorGetString ( const NGS_Cursor * self, ctx_t ctx, int64_t rowId, uint32_t colIdx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    assert ( self -> col_data );
-    assert ( self -> curs );
-
-    /* invalidate any outstanding string */
-    NGS_StringInvalidate ( self -> col_data [ colIdx ], ctx );
-
-    {
-        const void * base;
-        uint32_t elem_bits, boff, row_len;
-        TRY ( NGS_CursorCellDataDirect ( self, ctx, rowId, colIdx, & elem_bits, & base, & boff, & row_len ) )
-        {
-            NGS_String * new_data;
-
-            assert ( elem_bits == 8 );
-            assert ( boff == 0 );
-
-            /* create new string */
-            TRY ( new_data = NGS_StringMake ( ctx, base, row_len ) )
-            {
-                NGS_StringRelease ( self -> col_data [ colIdx ], ctx );
-                self -> col_data [ colIdx ] = new_data;
-                return NGS_StringDuplicate ( self -> col_data [ colIdx ], ctx );
-            }
-        }
-    }
-    return NULL;
-}
-
-/* GetInt64
-*/
-int64_t NGS_CursorGetInt64 ( const NGS_Cursor * self, ctx_t ctx, int64_t rowId, uint32_t colIdx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    assert ( self -> col_data );
-    assert ( self -> col_idx );
-
-    {
-        const void * base;
-        uint32_t elem_bits, boff, row_len;
-        TRY ( NGS_CursorCellDataDirect ( self, ctx, rowId, colIdx, & elem_bits, & base, & boff, & row_len ) )
-        {
-            if ( base == 0 || row_len == 0 )
-                INTERNAL_ERROR ( xcColumnReadFailed, "cell value is missing" );
-            else
-            {
-                assert ( elem_bits == 64 || elem_bits == 32 );
-                assert ( boff == 0 );
-
-                if ( elem_bits == 64 )
-                    return *(int64_t*)base;
-                else
-                    return *(int32_t*)base;
-            }
-        }
-    }
-
-    return 0;
-}
-
-/* GetUInt64
-*/
-uint64_t NGS_CursorGetUInt64 ( const NGS_Cursor * self, ctx_t ctx, int64_t rowId, uint32_t colIdx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    assert ( self -> col_data );
-    assert ( self -> col_idx );
-
-    {
-        const void * base;
-        uint32_t elem_bits, boff, row_len;
-        TRY ( NGS_CursorCellDataDirect ( self, ctx, rowId, colIdx, & elem_bits, & base, & boff, & row_len ) )
-        {
-            if ( base == 0 || row_len == 0 )
-                INTERNAL_ERROR ( xcColumnReadFailed, "cell value is missing" );
-            else
-            {
-                assert ( elem_bits == 64 || elem_bits == 32 );
-                assert ( boff == 0 );
-
-                if ( elem_bits == 64 )
-                    return *(uint64_t*)base;
-                else
-                    return *(uint32_t*)base;
-            }
-        }
-    }
-
-    return 0;
-}
-
-
-/* GetInt32
-*/
-int32_t NGS_CursorGetInt32 ( const NGS_Cursor * self, ctx_t ctx, int64_t rowId, uint32_t colIdx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    assert ( self -> col_data );
-    assert ( self -> col_idx );
-
-    {
-        const void * base;
-        uint32_t elem_bits, boff, row_len;
-        TRY ( NGS_CursorCellDataDirect ( self, ctx, rowId, colIdx, & elem_bits, & base, & boff, & row_len ) )
-        {
-            if ( base == 0 || row_len == 0 )
-                INTERNAL_ERROR ( xcColumnReadFailed, "cell value is missing" );
-            else
-            {
-                assert ( elem_bits == 32 );
-                assert ( boff == 0 );
-
-                return *(int32_t*)base;
-            }
-        }
-    }
-
-    return 0;
-}
-
-/* GetUInt32
-*/
-uint32_t NGS_CursorGetUInt32 ( const NGS_Cursor * self, ctx_t ctx, int64_t rowId, uint32_t colIdx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    assert ( self -> col_data );
-    assert ( self -> col_idx );
-
-    {
-        const void * base;
-        uint32_t elem_bits, boff, row_len;
-        TRY ( NGS_CursorCellDataDirect ( self, ctx, rowId, colIdx, & elem_bits, & base, & boff, & row_len ) )
-        {
-            if ( base == 0 || row_len == 0 )
-                INTERNAL_ERROR ( xcColumnReadFailed, "cell value is missing" );
-            else
-            {
-                assert ( elem_bits == 32 );
-                assert ( boff == 0 );
-
-                return *(uint32_t*)base;
-            }
-        }
-    }
-
-    return 0;
-}
-
-/* GetBool
-*/
-bool NGS_CursorGetBool ( const NGS_Cursor * self, ctx_t ctx, int64_t rowId, uint32_t colIdx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    assert ( self -> col_data );
-    assert ( self -> col_idx );
-
-    {
-        const void * base;
-        uint32_t elem_bits, boff, row_len;
-        TRY ( NGS_CursorCellDataDirect ( self, ctx, rowId, colIdx, & elem_bits, & base, & boff, & row_len ) )
-        {
-            if ( base == 0 || row_len == 0 )
-                INTERNAL_ERROR ( xcColumnReadFailed, "cell value is missing" );
-            else
-            {
-                assert ( elem_bits == 8 );
-                assert ( boff == 0 );
-
-                return *(bool*)base;
-            }
-        }
-    }
-
-    return false;
-}
-
-/* GetChar
-*/
-char NGS_CursorGetChar ( const NGS_Cursor * self, ctx_t ctx, int64_t rowId, uint32_t colIdx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    assert ( self -> col_data );
-    assert ( self -> col_idx );
-
-    {
-        const void * base;
-        uint32_t elem_bits, boff, row_len;
-        TRY ( NGS_CursorCellDataDirect ( self, ctx, rowId, colIdx, & elem_bits, & base, & boff, & row_len ) )
-        {
-            if ( base == 0 || row_len == 0 )
-                INTERNAL_ERROR ( xcColumnReadFailed, "cell value is missing" );
-            else
-            {
-                assert ( elem_bits == 8 );
-                assert ( boff == 0 );
-
-                return *(char*)base;
-            }
-        }
-    }
-
-    return '?';
-}
-
-
-/* GetTable
- */
-const VTable* NGS_CursorGetTable ( const NGS_Cursor * self, ctx_t ctx )
-{
-    assert ( self );
-	{
-		const VTable* tbl;
-		rc_t rc = VCursorOpenParentRead( self -> curs, &tbl );
-		if ( rc == 0 )
-		{
-			return tbl;
-		}
-		INTERNAL_ERROR ( xcCursorAccessFailed, "VCursorOpenParentRead rc = %R", rc );
-		return NULL;
-	}
-}
-
-/* GetVCursor
- */
-const VCursor* NGS_CursorGetVCursor ( const NGS_Cursor * self )
-{
-    assert ( self );
-    return self -> curs;
-}
-
-uint32_t NGS_CursorGetColumnIndex ( const NGS_Cursor * self, ctx_t ctx, uint32_t column_id )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    ON_FAIL ( AddColumn ( self, ctx, column_id ) )
-    {
-        return 0;
-    }
-    return self -> col_idx [ column_id ];
-}
-
diff --git a/libs/ngs/NGS_Cursor.h b/libs/ngs/NGS_Cursor.h
deleted file mode 100644
index 850bd88..0000000
--- a/libs/ngs/NGS_Cursor.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_cursor_
-#define _h_ngs_cursor_
-
-typedef struct NGS_Cursor NGS_Cursor;
-#ifndef _h_ngs_refcount_
-#define NGS_REFCOUNT NGS_Cursor
-#include "NGS_Refcount.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct VTable;
-struct VDatabase;
-struct NGS_String;
-
-/*--------------------------------------------------------------------------
- * NGS_Cursor
- *  Shareable cursor with lazy adding of columns
- *  reference counted
- */
-
-/* Make
- */
-const NGS_Cursor* NGS_CursorMake ( ctx_t ctx, const struct VTable* table, const char * col_specs[], uint32_t num_cols );
-const NGS_Cursor* NGS_CursorMakeDb ( ctx_t ctx, 
-                                     const struct VDatabase* db, 
-                                     const struct NGS_String* run_name, 
-                                     const char* tableName, 
-                                     const char * col_specs[], 
-                                     uint32_t num_cols );
-
-/* Release
- *  release reference
- */
-void NGS_CursorRelease ( const NGS_Cursor * self, ctx_t ctx );
-
-/* Duplicate
- *  duplicate reference
- */
-const NGS_Cursor * NGS_CursorDuplicate ( const NGS_Cursor * self, ctx_t ctx );
-
-/* CellDataDirect
- * Adds requested column if necessary and calls VCursorCellDataDirect
-*/
-void NGS_CursorCellDataDirect ( const NGS_Cursor *self, 
-                                ctx_t ctx,
-                                int64_t rowId,
-                                uint32_t colIdx, 
-                                uint32_t *elem_bits, 
-                                const void **base,
-                                uint32_t *boff, 
-                                uint32_t *row_len );
-
-/* GetString
-*/                                
-struct NGS_String * NGS_CursorGetString ( const NGS_Cursor * self, ctx_t ctx, int64_t rowId, uint32_t colIdx );
-
-/* GetInt64
-*/                                
-int64_t NGS_CursorGetInt64 ( const NGS_Cursor * self, ctx_t ctx, int64_t rowId, uint32_t colIdx );
-
-/* GetUInt64
-*/                                
-uint64_t NGS_CursorGetUInt64 ( const NGS_Cursor * self, ctx_t ctx, int64_t rowId, uint32_t colIdx );
-
-/* GetInt32
-*/                                
-int32_t NGS_CursorGetInt32 ( const NGS_Cursor * self, ctx_t ctx, int64_t rowId, uint32_t colIdx );
-
-/* GetUInt32
-*/                                
-uint32_t NGS_CursorGetUInt32 ( const NGS_Cursor * self, ctx_t ctx, int64_t rowId, uint32_t colIdx );
-
-/* GetBool
-*/                                
-bool NGS_CursorGetBool ( const NGS_Cursor * self, ctx_t ctx, int64_t rowId, uint32_t colIdx );
-
-/* GetChar
-*/                                
-char NGS_CursorGetChar ( const NGS_Cursor * self, ctx_t ctx, int64_t rowId, uint32_t colIdx );
-
-/* GetRowCount
- */
-uint64_t NGS_CursorGetRowCount ( const NGS_Cursor * self, ctx_t ctx );
-
-/* GetRowRange
- */
-void NGS_CursorGetRowRange ( const NGS_Cursor * self, ctx_t ctx, int64_t* first, uint64_t* count );
-
-/* GetTable
- */
-const struct VTable* NGS_CursorGetTable ( const NGS_Cursor * self, ctx_t ctx ); 
-
-/* GetVCursor
- */
-const struct VCursor* NGS_CursorGetVCursor ( const NGS_Cursor * self ); 
-
-/* GetColumnIndex
- */
-uint32_t NGS_CursorGetColumnIndex ( const NGS_Cursor * self, ctx_t ctx, uint32_t column_id );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ngs_cursor_ */
diff --git a/libs/ngs/NGS_ErrBlock.c b/libs/ngs/NGS_ErrBlock.c
deleted file mode 100644
index eeaa47b..0000000
--- a/libs/ngs/NGS_ErrBlock.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "NGS_ErrBlock.h"
-#include <ngs/itf/ErrBlock.h>
-
-#define SRC_LOC_DEFINED 1
-
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <klib/text.h>
-
-#include <string.h>
-
-/*--------------------------------------------------------------------------
- * NGS_ErrBlock
- */
-void NGS_ErrBlockThrow ( struct NGS_ErrBlock_v1 * self, ctx_t ctx )
-{
-    if ( FAILED () )
-    {
-        size_t size;
-
-        /* need to detect error type at some point... */
-        self -> xtype = xt_error_msg;
-
-        /* copy the message, up to max size */
-        size = string_copy_measure ( self -> msg, sizeof self -> msg, WHAT () );
-        if ( size >= sizeof self -> msg )
-            strcpy ( & self -> msg [ sizeof self -> msg - 4 ], "..." );
-
-        CLEAR ();
-    }
-}
diff --git a/libs/ngs/NGS_ErrBlock.h b/libs/ngs/NGS_ErrBlock.h
deleted file mode 100644
index ef413e7..0000000
--- a/libs/ngs/NGS_ErrBlock.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_err_block_
-#define _h_ngs_err_block_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct NGS_ErrBlock_v1;
-
-/*--------------------------------------------------------------------------
- * NGS_ErrBlock
- */
-void NGS_ErrBlockThrow ( struct NGS_ErrBlock_v1 * self, ctx_t ctx );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ngs_err_block_ */
diff --git a/libs/ngs/NGS_Fragment.c b/libs/ngs/NGS_Fragment.c
deleted file mode 100644
index 2bf0d99..0000000
--- a/libs/ngs/NGS_Fragment.c
+++ /dev/null
@@ -1,286 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "NGS_Fragment.h"
-
-#include "NGS_ErrBlock.h"
-#include <ngs/itf/Refcount.h>
-#include <ngs/itf/FragmentItf.h>
- 
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <kfc/rc.h>
-
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * NGS_Fragment_v1
- */
-
-#define Self( obj ) \
-    ( ( NGS_Fragment* ) ( obj ) )
-    
-static    
-NGS_String_v1 * ITF_Fragment_v1_get_id ( const NGS_Fragment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_String * ret = NGS_FragmentGetId ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static    
-NGS_String_v1 * ITF_Fragment_v1_get_bases ( const NGS_Fragment_v1 * self, NGS_ErrBlock_v1 * err, uint64_t offset, uint64_t length )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_String * ret = NGS_FragmentGetSequence ( Self ( self ), ctx, offset, length ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static    
-NGS_String_v1 * ITF_Fragment_v1_get_quals ( const NGS_Fragment_v1 * self, NGS_ErrBlock_v1 * err, uint64_t offset, uint64_t length )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_String * ret = NGS_FragmentGetQualities ( Self ( self ), ctx, offset, length ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static    
-bool ITF_Fragment_v1_is_paired ( const NGS_Fragment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( bool ret = NGS_FragmentIsPaired ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static    
-bool ITF_Fragment_v1_is_aligned ( const NGS_Fragment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( bool ret = NGS_FragmentIsAligned ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static    
-bool ITF_Fragment_v1_next ( NGS_Fragment_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( bool ret = NGS_FragmentIteratorNext ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-#undef Self
-
-NGS_Fragment_v1_vt ITF_Fragment_vt =
-{
-    {
-        "NGS_Fragment",
-        "NGS_Fragment_v1",
-        1,
-        & ITF_Refcount_vt . dad
-    },
-
-    ITF_Fragment_v1_get_id,
-    ITF_Fragment_v1_get_bases,
-    ITF_Fragment_v1_get_quals,
-    ITF_Fragment_v1_next,
-    ITF_Fragment_v1_is_paired,
-    ITF_Fragment_v1_is_aligned
-};
-
-
-/*--------------------------------------------------------------------------
- * NGS_Fragment
- */
-
-#define VT( self, msg ) \
-    ( ( ( const NGS_Fragment_vt* ) ( self ) -> dad . vt ) -> msg )
-
-
-/* GetId
- *  returns an unique id within the context of the entire ReadCollection
- */
-struct NGS_String * NGS_FragmentGetId ( NGS_Fragment* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcRow, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get id" );
-    }
-    else
-    {
-        return VT ( self, get_id ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-
-/* GetSequence
- *  read the Fragment sequence
- *  offset is zero based
- *  size is limited to bases available
- */
-struct NGS_String * NGS_FragmentGetSequence ( NGS_Fragment * self, ctx_t ctx, uint64_t offset, uint64_t length )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcRow, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get sequence" );
-    }
-    else
-    {
-        return VT ( self, get_sequence ) ( self, ctx, offset, length );
-    }
-
-    return NULL;
-}
-
-
-/* GetQualities
- *  read the Fragment qualities as phred-33
- *  offset is zero based
- *  size is limited to qualities available
- */
-struct NGS_String * NGS_FragmentGetQualities ( NGS_Fragment * self, ctx_t ctx, uint64_t offset, uint64_t length )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcRow, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get qualities" );
-    }
-    else
-    {
-        return VT ( self, get_qualities ) ( self, ctx, offset, length );
-    }
-
-    return NULL;
-}
-
-
-/* IsPaired
- */
-bool NGS_FragmentIsPaired ( NGS_Fragment * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcRow, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to test alignment" );
-    }
-    else
-    {
-        return VT ( self, is_paired ) ( self, ctx );
-    }
-
-    return false;
-}
-
-
-/* IsAligned
- */
-bool NGS_FragmentIsAligned ( NGS_Fragment * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcRow, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to test alignment" );
-    }
-    else
-    {
-        return VT ( self, is_aligned ) ( self, ctx );
-    }
-
-    return false;
-}
-
-
-/* Next
- *  advance to next Fragment
- *  returns false if no more Fragments are available.
- *  throws exception if more Fragments should be available,
- *  but could not be accessed.
- */
-bool NGS_FragmentIteratorNext ( NGS_Fragment * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcRow, rcSelecting );
-        INTERNAL_ERROR ( xcSelfNull, "failed to advance to next Fragment" );
-    }
-    else
-    {
-        return VT ( self, next ) ( self, ctx );
-    }
-
-    return false;
-}
-
-
-/* Init
- */
-void NGS_FragmentInit ( ctx_t ctx, NGS_Fragment * frag, const NGS_VTable * ivt, 
-    const NGS_Fragment_vt * vt, const char *clsname, const char *instname )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcRow, rcConstructing );
-
-    TRY ( NGS_RefcountInit ( ctx, & frag -> dad, ivt, & vt -> dad, clsname, instname ) )
-    {
-        assert ( vt -> get_id != NULL );
-        assert ( vt -> get_sequence != NULL );
-        assert ( vt -> get_qualities != NULL );
-    }
-}
diff --git a/libs/ngs/NGS_Fragment.h b/libs/ngs/NGS_Fragment.h
deleted file mode 100644
index 4a0c0ab..0000000
--- a/libs/ngs/NGS_Fragment.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_fragment_
-#define _h_ngs_fragment_
-
-#ifndef _h_ngs_extern_
-#include "extern.h"
-#endif
-
-typedef struct NGS_Fragment NGS_Fragment;
-#ifndef NGS_FRAGMENT
-#define NGS_FRAGMENT NGS_Fragment
-#endif
-
-#ifndef _h_ngs_refcount_
-#define NGS_REFCOUNT NGS_FRAGMENT
-#include "NGS_Refcount.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct NGS_String;
-struct NGS_Read;
-struct NGS_Fragment_v1_vt;
-extern struct NGS_Fragment_v1_vt ITF_Fragment_vt;
-
-
-/*--------------------------------------------------------------------------
- * NGS_Fragment
- */
-
-
-/* ToRefcount
- *  inline cast that preserves const
- */
-#define NGS_FragmentToRefcount( self ) \
-    ( & ( self ) -> dad )
-
-
-#if 0
-
-/* Release
- *  release reference
- */
-#define NGS_FragmentRelease( self, ctx ) \
-    NGS_RefcountRelease ( NGS_FragmentToRefcount ( self ), ctx )
-
-/* Duplicate
- *  duplicate reference
- */
-#define NGS_FragmentDuplicate( self, ctx ) \
-    ( ( NGS_Fragment* ) NGS_RefcountDuplicate ( NGS_FragmentToRefcount ( self ), ctx ) )
-
-#endif
-
-
-/* GetId
- *  returns an unique id within the context of the entire ReadCollection
- */
-NGS_EXTERN struct NGS_String * CC NGS_FragmentGetId ( NGS_Fragment* self, ctx_t ctx );
-
-
-/* GetSequence
- *  read the Fragment sequence
- *  offset is zero based
- *  size is limited to bases available
- */
-struct NGS_String * NGS_FragmentGetSequence ( NGS_Fragment * self, ctx_t ctx, uint64_t offset, uint64_t length );
-
-
-/* GetQualities
- *  read the Fragment qualities as phred-33
- *  offset is zero based
- *  size is limited to qualities available
- */
-struct NGS_String * NGS_FragmentGetQualities ( NGS_Fragment * self, ctx_t ctx, uint64_t offset, uint64_t length );
-
-
-/* IsPaired
- */
-bool NGS_FragmentIsPaired ( NGS_Fragment * self, ctx_t ctx );
-
-
-/* IsAligned
- */
-bool NGS_FragmentIsAligned ( NGS_Fragment * self, ctx_t ctx );
-
-
-/* Make [ OBSOLETE ]
- *  make a stand-alone Fragment from Read
- */
-NGS_Fragment * NGS_ReadFragmentMake ( ctx_t ctx, struct NGS_Read const* read , uint32_t idx );
-
-
-
-/*--------------------------------------------------------------------------
- * NGS_FragmentIterator
- */
-
-/* Next
- *  advance to the next Fragment
- *  for a Read, this is the next biological Fragment of the Read
- *  for any other iterator, simply returns the next Fragment
- */
-bool NGS_FragmentIteratorNext ( NGS_Fragment * self, ctx_t ctx );
-
-
-/*--------------------------------------------------------------------------
- * implementation details
- */
-struct NGS_Fragment
-{
-    NGS_Refcount dad;
-};
-
-typedef struct NGS_Fragment_vt NGS_Fragment_vt;
-struct NGS_Fragment_vt
-{
-    NGS_Refcount_vt dad;
-
-    /* Fragment interface */
-    struct NGS_String * ( * get_id ) ( NGS_FRAGMENT * self, ctx_t ctx );
-    struct NGS_String * ( * get_sequence ) ( NGS_FRAGMENT * self, ctx_t ctx, uint64_t offset, uint64_t length );
-    struct NGS_String * ( * get_qualities ) ( NGS_FRAGMENT * self, ctx_t ctx, uint64_t offset, uint64_t length );
-    bool ( * is_paired ) ( NGS_FRAGMENT * self, ctx_t ctx );
-    bool ( * is_aligned ) ( NGS_FRAGMENT * self, ctx_t ctx );
-
-    /* FragmentIterator interface */
-    bool ( * next ) ( NGS_FRAGMENT * self, ctx_t ctx );
-};
-
-/* Init
- */
-void NGS_FragmentInit ( ctx_t ctx, NGS_Fragment * frag, const struct NGS_VTable * ivt, const NGS_Fragment_vt * vt, const char *clsname, const char *instname );
-
-/* Whack
- *  needed to release the ReadCollection
- */
-void NGS_FragmentWhack ( NGS_Fragment * self, ctx_t ctx );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ngs_fragment_ */
diff --git a/libs/ngs/NGS_FragmentBlob.c b/libs/ngs/NGS_FragmentBlob.c
deleted file mode 100644
index 40f3fbc..0000000
--- a/libs/ngs/NGS_FragmentBlob.c
+++ /dev/null
@@ -1,476 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "NGS_FragmentBlob.h"
-
-#include <ngs/itf/Refcount.h>
-
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <klib/rc.h>
-
-#include <vdb/cursor.h>
-#include <vdb/blob.h>
-#include <../libs/vdb/blob-priv.h>
-#include <../libs/vdb/page-map.h>
-
-#include "NGS_String.h"
-#include "NGS_Id.h"
-#include "NGS_Cursor.h"
-#include "SRA_Read.h"
-
-struct NGS_FragmentBlob
-{
-    NGS_Refcount dad;
-
-    int64_t rowId;      /* rowId of the first row in the blob (can differ from the first row of VBlob) */
-    const void* data;   /* start of the first row */
-    uint64_t size;      /* from the start of the first row until the end of the blob */
-
-    const NGS_String* run;
-    const NGS_Cursor* curs;
-    const VBlob* blob_READ;
-    const VBlob* blob_READ_LEN;
-    const VBlob* blob_READ_TYPE;
-};
-
-
-void
-NGS_FragmentBlobWhack ( NGS_FragmentBlob * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcBlob, rcDestroying );
-    if ( self != NULL )
-    {
-        VBlobRelease ( (VBlob*) self -> blob_READ );
-        VBlobRelease ( (VBlob*) self -> blob_READ_LEN );
-        VBlobRelease ( (VBlob*) self -> blob_READ_TYPE );
-        NGS_CursorRelease ( self -> curs, ctx );
-        NGS_StringRelease ( self -> run, ctx );
-    }
-}
-
-static NGS_Refcount_vt NGS_FragmentBlob_vt =
-{
-    NGS_FragmentBlobWhack
-};
-
-NGS_FragmentBlob *
-NGS_FragmentBlobMake ( ctx_t ctx, const NGS_String* run, const struct NGS_Cursor* curs, int64_t rowId )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcBlob, rcConstructing );
-    if ( run == NULL )
-    {
-        INTERNAL_ERROR ( xcParamNull, "NULL run name" );
-    }
-    else if ( curs == NULL )
-    {
-        INTERNAL_ERROR ( xcParamNull, "NULL cursor object" );
-    }
-    else
-    {
-
-        NGS_FragmentBlob * ret = calloc ( 1, sizeof * ret );
-        if ( ret == NULL )
-        {
-            SYSTEM_ERROR ( xcNoMemory, "allocating NGS_FragmentBlob" );
-        }
-        else
-        {
-            TRY ( NGS_RefcountInit ( ctx, & ret -> dad, & ITF_Refcount_vt . dad, & NGS_FragmentBlob_vt, "NGS_FragmentBlob", "" ) )
-            {
-                TRY ( ret -> run = NGS_StringDuplicate ( run, ctx ) )
-                {
-                    const struct VCursor* vcurs = NGS_CursorGetVCursor ( curs );
-                    rc_t rc = VCursorSetRowId ( vcurs, rowId );
-                    if ( rc != 0 )
-                    {
-                        INTERNAL_ERROR ( xcUnexpected, "VCursorSetRowId() rc = %R", rc );
-                    }
-                    else
-                    {
-                        rc = VCursorOpenRow ( vcurs );
-                        if ( rc != 0 )
-                        {
-                            INTERNAL_ERROR ( xcUnexpected, "VCursorOpenRow() rc = %R", rc );
-                        }
-                        else
-                        {
-                            rc = VCursorGetBlob ( vcurs, & ret -> blob_READ, NGS_CursorGetColumnIndex ( curs, ctx, seq_READ ) );
-                            if ( rc != 0  )
-                            {
-                                VCursorCloseRow ( vcurs );
-                                INTERNAL_ERROR ( xcUnexpected, "VCursorGetBlob(READ) rc = %R", rc );
-                            }
-                            else
-                            {
-                                rc = VCursorGetBlob ( vcurs, & ret -> blob_READ_LEN, NGS_CursorGetColumnIndex ( curs, ctx, seq_READ_LEN ) );
-                                if ( rc != 0  )
-                                {
-                                    VCursorCloseRow ( vcurs );
-                                    INTERNAL_ERROR ( xcUnexpected, "VCursorGetBlob(READ_LEN) rc = %R", rc );
-                                }
-                                else
-                                {
-                                    rc = VCursorGetBlob ( vcurs, & ret -> blob_READ_TYPE, NGS_CursorGetColumnIndex ( curs, ctx, seq_READ_TYPE ) );
-                                    if ( rc != 0  )
-                                    {
-                                        VCursorCloseRow ( vcurs );
-                                        INTERNAL_ERROR ( xcUnexpected, "VCursorGetBlob(READ_TYPE) rc = %R", rc );
-                                    }
-                                    else
-                                    {
-                                        rc = VCursorCloseRow ( vcurs );
-                                        if ( rc != 0 )
-                                        {
-                                            INTERNAL_ERROR ( xcUnexpected, "VCursorCloseRow() rc = %R", rc );
-                                        }
-                                        else
-                                        {
-                                            ret -> rowId = rowId;
-                                            ret -> curs = NGS_CursorDuplicate ( curs, ctx );
-                                            {
-                                                /* calculate data/size of the blob (sub-VBlob) starting at rowId */
-                                                uint32_t frag_type_elem_bits;
-                                                const void *frag_type_base;
-                                                uint32_t frag_type_boff;
-                                                uint32_t frag_type_row_len;
-                                                rc_t rc = VBlobCellData ( ret -> blob_READ,
-                                                                        ret -> rowId,
-                                                                        & frag_type_elem_bits,
-                                                                        & frag_type_base,
-                                                                        & frag_type_boff,
-                                                                        & frag_type_row_len );
-                                                if ( rc != 0 )
-                                                {
-                                                    INTERNAL_ERROR ( xcUnexpected, "VBlobCellData() rc = %R", rc );
-                                                }
-                                                else
-                                                {
-                                                    assert( frag_type_elem_bits == 8 );
-                                                    assert( frag_type_boff == 0 );
-                                                    ret -> data = frag_type_base;
-                                                    ret -> size = BlobBufferBytes ( ret -> blob_READ ) -
-                                                                ( (const uint8_t*)( ret -> data ) - (const uint8_t*)( ret -> blob_READ -> data . base ) );
-                                                    return ret;
-                                                }
-                                            }
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-                NGS_FragmentBlobWhack ( ret, ctx );
-            }
-            free ( ret );
-        }
-    }
-
-    return NULL;
-}
-
-void
-NGS_FragmentBlobRelease ( struct NGS_FragmentBlob * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcBlob, rcAccessing );
-    if ( self != NULL )
-    {
-        NGS_RefcountRelease ( & self -> dad, ctx );
-    }
-}
-
-NGS_FragmentBlob *
-NGS_FragmentBlobDuplicate (  struct NGS_FragmentBlob * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcBlob, rcAccessing );
-    if ( self != NULL )
-    {
-        NGS_RefcountDuplicate ( & self -> dad, ctx );
-    }
-    return self;
-}
-
-void
-NGS_FragmentBlobRowRange ( const struct NGS_FragmentBlob * self, ctx_t ctx,  int64_t* p_first, uint64_t* p_count )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcBlob, rcAccessing );
-
-    if ( self == NULL )
-    {
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    }
-    else
-    {
-        int64_t first;
-        uint64_t count;
-        rc_t rc = VBlobIdRange ( self -> blob_READ, & first, & count );
-        if ( rc != 0  )
-        {
-            INTERNAL_ERROR ( xcUnexpected, "VBlobIdRange() rc = %R", rc );
-        }
-        /* 1st row of VBlob may differ from our first row */
-        assert ( first <= self -> rowId );
-        if ( p_first != NULL )
-        {
-            *p_first = self -> rowId;
-        }
-        if ( p_count != NULL )
-        {
-            *p_count = count - ( self -> rowId - first );
-        }
-    }
-}
-
-const void*
-NGS_FragmentBlobData ( const struct NGS_FragmentBlob * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcBlob, rcAccessing );
-
-    if ( self == NULL )
-    {
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    }
-    else
-    {
-        return self -> data;
-    }
-    return 0;
-}
-
-uint64_t
-NGS_FragmentBlobSize ( const struct NGS_FragmentBlob * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcBlob, rcAccessing );
-
-    if ( self == NULL )
-    {
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    }
-    else
-    {
-        return self -> size;
-    }
-    return 0;
-}
-
-static
-void
-GetFragInfo ( const NGS_FragmentBlob * self, ctx_t ctx, int64_t p_rowId, uint64_t p_offsetInRow, uint64_t* fragStart, uint64_t* baseCount, int32_t* bioNumber )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcConstructing );
-    uint32_t elem_bits;
-    const void *base;
-    uint32_t boff;
-    uint32_t row_len;
-    rc_t rc = VBlobCellData ( self -> blob_READ_LEN,
-                              p_rowId,
-                              & elem_bits,
-                              & base,
-                              & boff,
-                              & row_len );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcUnexpected, "VBlobCellData() rc = %R", rc );
-    }
-    else
-    {
-        uint32_t i = 0 ;
-        uint64_t offset = 0;
-        uint32_t bioFragNum = 0;
-        assert ( base != NULL );
-        assert ( elem_bits % 8 == 0 );
-        assert ( boff == 0 );
-
-        while ( i < row_len )
-        {
-            uint64_t frag_length;
-            switch ( elem_bits )
-            {
-                case 64:
-                {
-                    frag_length = ( (const uint64_t*)base ) [ i ];
-                    break;
-                }
-                case 32:
-                {
-                    frag_length = ( (const uint32_t*)base ) [ i ];
-                    break;
-                }
-                case 16:
-                {
-                    frag_length = ( (const uint16_t*)base ) [ i ];
-                    break;
-                }
-                case 8:
-                {
-                    frag_length = ( (const uint8_t*)base ) [ i ];
-                    break;
-                }
-                default:
-                {
-                    INTERNAL_ERROR ( xcUnexpected, "Unexpected elem_bits: %u", elem_bits );
-                    return;
-                }
-            }
-
-            {
-                uint32_t frag_type_elem_bits;
-                const void *frag_type_base;
-                uint32_t frag_type_boff;
-                uint32_t frag_type_row_len;
-                rc = VBlobCellData ( self -> blob_READ_TYPE,
-                                     p_rowId,
-                                     & frag_type_elem_bits,
-                                     & frag_type_base,
-                                     & frag_type_boff,
-                                     & frag_type_row_len );
-                if ( rc != 0 )
-                {
-                    INTERNAL_ERROR ( xcUnexpected, "VBlobCellData() rc = %R", rc );
-                }
-                else
-                {
-                    const uint8_t* frag_types = (const uint8_t*)frag_type_base;
-                    bool isBiological;
-                    assert ( frag_type_row_len == row_len );
-                    assert ( frag_type_base != NULL );
-                    assert ( frag_type_elem_bits == 8 );
-                    assert ( frag_type_boff == 0 );
-
-                    isBiological = frag_types [ i ] & READ_TYPE_BIOLOGICAL;
-                    if ( p_offsetInRow < offset + frag_length )
-                    {
-                        if ( fragStart != NULL )
-                        {
-                            * fragStart = offset;
-                        }
-                        if ( baseCount != NULL )
-                        {
-                            * baseCount = frag_length;
-                        }
-                        if ( bioNumber != NULL )
-                        {
-                            * bioNumber = isBiological ? bioFragNum : -1;
-                        }
-                        return;
-                    }
-
-                    if ( isBiological )
-                    {
-                        ++ bioFragNum;
-                    }
-                }
-            }
-            offset += frag_length;
-            ++i;
-        }
-        /* out of fragments */
-        INTERNAL_ERROR ( xcUnexpected, "fragment not found in blob: rowId=%li offset=%lu", p_rowId, p_offsetInRow );
-    }
-}
-
-void
-NGS_FragmentBlobInfoByOffset ( const struct NGS_FragmentBlob * self, ctx_t ctx,  uint64_t offsetInBases, int64_t* rowId, uint64_t* fragStart, uint64_t* baseCount, int32_t* bioNumber )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcBlob, rcAccessing );
-    if ( self == NULL )
-    {
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    }
-    else
-    {
-        int64_t first;
-        uint64_t count;
-        rc_t rc = VBlobIdRange ( self -> blob_READ, &first, &count );
-        if ( rc != 0  )
-        {
-            INTERNAL_ERROR ( xcUnexpected, "VBlobIdRange() rc = %R", rc );
-        }
-        else
-        {
-            PageMapIterator pmIt;
-            rc = PageMapNewIterator ( (const PageMap*)self->blob_READ->pm, &pmIt, 0, count );
-            if ( rc != 0 )
-            {
-                INTERNAL_ERROR ( xcUnexpected, "PageMapNewIterator() rc = %R", rc );
-            }
-            else
-            {
-                row_count_t rowInBlob = 0;
-                do
-                {
-                    elem_count_t length = PageMapIteratorDataLength ( &pmIt );
-                    elem_count_t offset = PageMapIteratorDataOffset ( &pmIt );
-                    row_count_t  repeat = PageMapIteratorRepeatCount ( &pmIt );
-
-                    if ( offsetInBases < offset + length * repeat )
-                    {
-                        while ( repeat > 1 )
-                        {
-                            if ( offsetInBases < offset + length )
-                            {
-                                break;
-                            }
-                            offset += length;
-                            ++rowInBlob;
-                        }
-                        if ( rowId != NULL )
-                        {
-                            * rowId = first + rowInBlob + ( offsetInBases - offset ) / length;
-                        }
-                        GetFragInfo ( self, ctx, *rowId, offsetInBases - offset, fragStart, baseCount, bioNumber );
-                        if ( fragStart != NULL )
-                        {
-                            * fragStart += offset;
-                        }
-                        break;
-                    }
-                    ++rowInBlob;
-                }
-                while ( PageMapIteratorNext ( &pmIt ) );
-            }
-        }
-    }
-}
-
-NGS_String*
-NGS_FragmentBlobMakeFragmentId ( const struct NGS_FragmentBlob * self, ctx_t ctx, int64_t rowId, uint32_t fragNumber )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcBlob, rcAccessing );
-
-    if ( self == NULL )
-    {
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    }
-    else
-    {
-        return NGS_IdMakeFragment ( ctx, self -> run, false, rowId, fragNumber );
-    }
-    return NULL;
-}
diff --git a/libs/ngs/NGS_FragmentBlob.h b/libs/ngs/NGS_FragmentBlob.h
deleted file mode 100644
index 613ab16..0000000
--- a/libs/ngs/NGS_FragmentBlob.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_NGS_FragmentBlob_
-#define _h_NGS_FragmentBlob_
-
-typedef struct NGS_FragmentBlob NGS_FragmentBlob;
-#ifndef _h_ngs_refcount_
-#define NGS_REFCOUNT NGS_FragmentBlob
-#include "NGS_Refcount.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct NGS_FragmentBlob;
-struct NGS_Cursor;
-struct NGS_String;
-
-/*--------------------------------------------------------------------------
- * NGS_FragmentBlob
- *  Access to blobs in a SEQUENCE.READ column
- *  reference counted
- */
-
-/* Make
- *  create a blob containing the given rowId
- *  run - accession name
- */
-struct NGS_FragmentBlob * NGS_FragmentBlobMake ( ctx_t ctx, const struct NGS_String * run, const struct NGS_Cursor* curs, int64_t rowId );
-
-/* Release
- *  release reference
- */
-void NGS_FragmentBlobRelease ( struct NGS_FragmentBlob * self, ctx_t ctx );
-
-/* Duplicate
- *  duplicate reference
- */
-NGS_FragmentBlob * NGS_FragmentBlobDuplicate (  struct NGS_FragmentBlob * self, ctx_t ctx );
-
-/* RowRange
- *  return the range of row Ids in the blob
- */
-void NGS_FragmentBlobRowRange ( const struct NGS_FragmentBlob * self, ctx_t ctx,  int64_t* first, uint64_t* count );
-
-/* Data
- *  returns the contents of the blob (concatenated bases of all fragments)
- */
-const void* NGS_FragmentBlobData ( const struct NGS_FragmentBlob * self, ctx_t ctx );
-/* Size
- *  returns the size of contents of the blob (total of bases in all fragments)
- */
-uint64_t NGS_FragmentBlobSize ( const struct NGS_FragmentBlob * self, ctx_t ctx );
-
-/* InfoByOffset
- *  retrieve fragment info by offset in the blob
- *  offsetInBases - an offset into the blob
- *  rowId [OUT, NULL OK]- rowId of the row containing the base at the offset
- *  fragStart [OUT, NULL OK] - offset to the first base of the row
- *  baseCount [OUT, NULL OK]- number of bases in the row
- *  bioNumber [OUT, NULL OK]- for a biological frament, 0-based biological fragment number inside the read; for a technical number, -1
- */
-void NGS_FragmentBlobInfoByOffset ( const struct NGS_FragmentBlob * self, ctx_t ctx,  uint64_t offsetInBases, int64_t* rowId, uint64_t* fragStart, uint64_t* baseCount, int32_t* bioNumber );
-
-
-/* ReadFragmentCount
- *  retrieve number of fragment in a read by read's rowId
- *  rowId - rowId of the read (must be inside the blob)
- *  returns number of fragments in the read
- *
- *  NOTE: implementation TBD
- */
-uint32_t NGS_FragmentBlobReadFragmentCount ( const struct NGS_FragmentBlob * self, ctx_t ctx, int64_t rowId );
-
-/* InfoByRowId
- *  retrieve fragment info by rowId and fragment number
- *  rowId - rowId of the read (must be inside the blob)
- *  fragmentNumber  - 0-based fragment number inside the read
- *  fragStart [OUT, NULL OK] - offset to the first base of the row
- *  baseCount [OUT, NULL OK]- number of bases in the row
- *  biological [OUT, NULL OK]- true if the fragment is biological, false if technical
- *
- *  NOTE: implementation TBD
- */
-void NGS_FragmentBlobInfoByRowId ( const struct NGS_FragmentBlob * self, ctx_t ctx,  int64_t rowId, uint32_t fragNumber, uint64_t* fragStart, uint64_t* baseCount, bool* biological );
-
-/* MakeFragmentId
- *  retrieve (biological) fragment Id  by rowId and fragment number
- *  rowId - rowId of the read (must be inside the blob)
- *  fragmentNumber  - 0-based biological fragment number inside the read
- *
- *  returns the ID string of the specified fragment
- */
-struct NGS_String* NGS_FragmentBlobMakeFragmentId ( const struct NGS_FragmentBlob * self, ctx_t ctx,  int64_t rowId, uint32_t fragNumber );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_NGS_FragmentBlob_ */
diff --git a/libs/ngs/NGS_FragmentBlobIterator.c b/libs/ngs/NGS_FragmentBlobIterator.c
deleted file mode 100644
index 4baa0c1..0000000
--- a/libs/ngs/NGS_FragmentBlobIterator.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "NGS_FragmentBlobIterator.h"
-
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <ngs/itf/Refcount.h>
-
-#include <vdb/cursor.h>
-
-#include "NGS_String.h"
-#include "NGS_Cursor.h"
-#include "SRA_Read.h"
-#include "NGS_FragmentBlob.h"
-
-struct NGS_FragmentBlobIterator
-{
-    NGS_Refcount dad;
-
-    const NGS_String* run;
-    const NGS_Cursor* curs;
-    int64_t last_row;
-    int64_t next_row;
-};
-
-void
-NGS_FragmentBlobIteratorWhack ( NGS_FragmentBlobIterator * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcBlob, rcDestroying );
-    if ( self != NULL )
-    {
-        NGS_CursorRelease ( self->curs, ctx );
-        NGS_StringRelease ( self->run, ctx );
-    }
-}
-
-static NGS_Refcount_vt NGS_FragmentBlobIterator_vt =
-{
-    NGS_FragmentBlobIteratorWhack
-};
-
-NGS_FragmentBlobIterator*
-NGS_FragmentBlobIteratorMake ( ctx_t ctx, const NGS_String* run, const struct VTable* tbl )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcBlob, rcConstructing );
-    if ( tbl == NULL )
-    {
-        INTERNAL_ERROR ( xcParamNull, "NULL table object" );
-    }
-    else
-    {
-        NGS_FragmentBlobIterator* ret = malloc ( sizeof * ret );
-        if ( ret == NULL )
-        {
-            SYSTEM_ERROR ( xcNoMemory, "allocating NGS_FragmentBlobIterator" );
-        }
-        else
-        {
-            TRY ( NGS_RefcountInit ( ctx, & ret -> dad, & ITF_Refcount_vt . dad, & NGS_FragmentBlobIterator_vt, "NGS_FragmentBlobIterator", "" ) )
-            {
-                TRY ( ret -> curs = NGS_CursorMake ( ctx, tbl, sequence_col_specs, seq_NUM_COLS ) )
-                {
-                    TRY ( ret -> run = NGS_StringDuplicate ( run, ctx ) )
-                    {
-                        ret -> last_row = NGS_CursorGetRowCount ( ret->curs, ctx );
-                        ret -> next_row = 1;
-                        return ret;
-                    }
-                    NGS_CursorRelease ( ret -> curs, ctx );
-                }
-            }
-            free ( ret );
-        }
-    }
-    return NULL;
-}
-
-/* Release
- *  release reference
- */
-void
-NGS_FragmentBlobIteratorRelease ( NGS_FragmentBlobIterator * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcBlob, rcReleasing );
-    if ( self != NULL )
-    {
-        NGS_RefcountRelease ( & self -> dad, ctx );
-    }
-}
-
-/* Duplicate
- *  duplicate reference
- */
-NGS_FragmentBlobIterator *
-NGS_FragmentBlobIteratorDuplicate ( NGS_FragmentBlobIterator * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcBlob, rcAccessing );
-    if ( self != NULL )
-    {
-        NGS_RefcountDuplicate( & self -> dad, ctx );
-    }
-    return ( NGS_FragmentBlobIterator* ) self;
-}
-
-/* HasMore
- *  return true if there are more blobs to iterate on
- */
-bool
-NGS_FragmentBlobIteratorHasMore ( NGS_FragmentBlobIterator * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcRow, rcSelecting );
-        INTERNAL_ERROR ( xcSelfNull, "NULL FragmentBlobIterator accessed" );
-        return false;
-    }
-    return self != NULL && self -> next_row <= self -> last_row;
-}
-
-/* Next
- *  return the next blob, to be Release()d by the caller.
- *  NULL if there are no more blobs
- */
-NGS_FragmentBlob*
-NGS_FragmentBlobIteratorNext ( NGS_FragmentBlobIterator * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcBlob, rcAccessing );
-
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcRow, rcSelecting );
-        INTERNAL_ERROR ( xcSelfNull, "NULL FragmentBlobIterator accessed" );
-    }
-    else if ( self -> next_row <= self -> last_row )
-    {
-        int64_t nextRow;
-        rc_t rc = VCursorFindNextRowIdDirect ( NGS_CursorGetVCursor ( self -> curs ),
-                                               NGS_CursorGetColumnIndex ( self -> curs, ctx, seq_READ ),
-                                               self -> next_row,
-                                               & nextRow );
-        if ( rc == 0 )
-        {
-            TRY ( NGS_FragmentBlob* ret = NGS_FragmentBlobMake ( ctx, self -> run, self -> curs, nextRow ) )
-            {
-                int64_t first;
-                uint64_t count;
-                TRY ( NGS_FragmentBlobRowRange ( ret, ctx, & first, & count ) )
-                {
-                    self -> next_row = first + count;
-                    return ret;
-                }
-                NGS_FragmentBlobRelease ( ret, ctx );
-            }
-        }
-        self -> next_row = self -> last_row + 1;
-    }
-
-    return NULL;
-}
diff --git a/libs/ngs/NGS_FragmentBlobIterator.h b/libs/ngs/NGS_FragmentBlobIterator.h
deleted file mode 100644
index dcacd83..0000000
--- a/libs/ngs/NGS_FragmentBlobIterator.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_NGS_FragmentBlobIterator_
-#define _h_NGS_FragmentBlobIterator_
-
-typedef struct NGS_FragmentBlobIterator NGS_FragmentBlobIterator;
-#ifndef _h_ngs_refcount_
-#define NGS_REFCOUNT NGS_FragmentBlobIterator
-#include "NGS_Refcount.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct VTable;
-struct NGS_String;
-struct NGS_FragmentBlob;
-
-/*--------------------------------------------------------------------------
- * NGS_FragmentBlobIterator
- *  Iteration over blobs in the SEQUENCE.READ column
- *  reference counted
- */
-
-/* Make
- */
-NGS_FragmentBlobIterator* NGS_FragmentBlobIteratorMake ( ctx_t ctx, const struct NGS_String* run, const struct VTable* sequence );
-
-/* Release
- *  release reference
- */
-void NGS_FragmentBlobIteratorRelease ( NGS_FragmentBlobIterator * self, ctx_t ctx );
-
-/* Duplicate
- *  duplicate reference
- */
-NGS_FragmentBlobIterator * NGS_FragmentBlobIteratorDuplicate ( NGS_FragmentBlobIterator * self, ctx_t ctx );
-
-/* HasMore
- *  return true if there are more blobs to iterate on
- */
-bool NGS_FragmentBlobIteratorHasMore ( NGS_FragmentBlobIterator * self, ctx_t ctx );
-
-/* Next
- *  return the next blob, to be Release()d by the caller.
- *  NULL if there are no more blobs
- */
-struct NGS_FragmentBlob* NGS_FragmentBlobIteratorNext ( NGS_FragmentBlobIterator * self, ctx_t ctx );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_NGS_FragmentBlob_ */
diff --git a/libs/ngs/NGS_Id.c b/libs/ngs/NGS_Id.c
deleted file mode 100644
index 1051f19..0000000
--- a/libs/ngs/NGS_Id.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-#include "NGS_Id.h"
-
-#include "NGS_String.h"
-
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <klib/printf.h>
-#include <klib/text.h>
-
-#include <strtol.h> /* for strtoi64 */
-#include <string.h>
-
-NGS_String * NGS_IdMake ( ctx_t ctx, const NGS_String * run, enum NGS_Object object, int64_t rowId )
-{
-    size_t num_writ;
-    char buf[265];
-    const char* obj;
-    rc_t rc;
-    
-    switch ( object )
-    {
-    case NGSObject_Read:                obj = "R"; break;
-    case NGSObject_PrimaryAlignment:    obj = "PA"; break;
-    case NGSObject_SecondaryAlignment:  obj = "SA"; break;
-    case NGSObject_ReadFragment:            
-    case NGSObject_AlignmentFragment:            
-        INTERNAL_ERROR ( xcParamUnexpected, "wrong object type NGSObject_Fragment", object);
-        return NULL;
-    default:
-        INTERNAL_ERROR ( xcParamUnexpected, "unrecognized object type %i", object);
-        return NULL;
-    }
-    
-    rc = string_printf ( buf, 
-                         sizeof ( buf ), 
-                         & num_writ, 
-                         "%.*s.%s.%li", 
-                         NGS_StringSize ( run, ctx ), 
-                         NGS_StringData ( run, ctx ), 
-                         obj, 
-                         rowId );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcUnexpected, "string_printf rc = %R", rc );
-        return NULL;
-    }
-    
-    return NGS_StringMakeCopy ( ctx, buf, num_writ );
-}
-
-struct NGS_String * NGS_IdMakeFragment ( ctx_t ctx, const NGS_String * run, bool alignment, int64_t rowId, uint32_t frag_num )
-{
-    size_t num_writ;
-    char buf[265];
-    rc_t rc = string_printf ( buf, 
-                              sizeof ( buf ), 
-                              & num_writ, 
-                              "%.*s.%s%i.%li", 
-                              NGS_StringSize ( run, ctx ), 
-                              NGS_StringData ( run, ctx ), 
-                              alignment ? "FA" : "FR", 
-                              frag_num, 
-                              rowId );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcUnexpected, "string_printf rc = %R", rc );
-        return NULL;
-    }
-    return NGS_StringMakeCopy ( ctx, buf, num_writ );
-}
-
-struct NGS_Id NGS_IdParse ( char const * self, size_t self_size, ctx_t ctx )
-{
-    struct NGS_Id ret;
-    
-    /* parse from the back using '.' as delimiters */
-    const char* start = self;
-    const char* dot = string_rchr ( start, self_size, '.' );
-    
-    memset ( & ret, 0, sizeof ( ret ) );
-    
-    if ( dot == NULL || dot == start )
-    {
-        INTERNAL_ERROR ( xcParamUnexpected, "Badly formed ID string: %.*s", self_size, self );
-        return ret;
-    }    
-
-    /* rowid*/    
-    ret . rowId = strtoi64 ( dot + 1, NULL, 10 );
-    if ( ret . rowId == 0 )
-    {
-        INTERNAL_ERROR ( xcParamUnexpected, "Badly formed ID string (rowId): %.*s", self_size, self );
-        return ret;
-    }    
-    
-    /* object type and fragment number */
-    dot = string_rchr ( start, dot - start - 1, '.' );
-    if ( dot == NULL || dot == start )
-    {
-        INTERNAL_ERROR ( xcParamUnexpected, "Badly formed ID string (object type ?): %.*s", self_size, self );
-        return ret;
-    }    
-    switch ( dot [ 1 ] )
-    {
-    case 'R': 
-        ret . object =  NGSObject_Read;
-        break;
-        
-    case 'P': 
-        if ( dot [ 2 ] == 'A' )
-            ret . object = NGSObject_PrimaryAlignment;
-        else
-        {
-            INTERNAL_ERROR ( xcParamUnexpected, "Badly formed ID string (object type P?): %.*s", self_size, self );
-            return ret;
-        }
-        break;
-        
-    case 'S': 
-        if ( dot [ 2 ] == 'A' )
-            ret . object = NGSObject_SecondaryAlignment;
-        else
-        {
-            INTERNAL_ERROR ( xcParamUnexpected, "Badly formed ID string (object type S?): %.*s", self_size, self );
-            return ret;
-        }
-        break;
-        
-    case 'F': 
-        switch ( dot [ 2 ] )
-        {
-        case 'R' : 
-            ret . object = NGSObject_ReadFragment;
-            break;
-        case 'A' : 
-            ret . object = NGSObject_AlignmentFragment;
-            break;
-        default  : 
-            INTERNAL_ERROR ( xcParamUnexpected, "Badly formed ID string (object type F?): %.*s", self_size, self );
-            return ret;
-        }
-        ret . fragId = strtoul( dot + 3, NULL, 10 ); /* even if missing/invalid, set to 0 */
-        break;
-    }    
-    
-    /* run */
-    StringInit ( & ret . run, start, dot - start, ( uint32_t )  ( dot - start ) );
-    
-    return ret;
-}
-
diff --git a/libs/ngs/NGS_Id.h b/libs/ngs/NGS_Id.h
deleted file mode 100644
index b6be68a..0000000
--- a/libs/ngs/NGS_Id.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_id_
-#define _h_ngs_id_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct NGS_String;
-
-/*--------------------------------------------------------------------------
- * NGS_Id
- *  a unique identifier of an NGS object
- * Represented with a string of the following format:
- *   <runName>.<objectType>.<rowId>
- * where 
- *   rowId is the object's row number in the corresponding table
- *   object type is one of "R" (read), 
- *                         "FR<fragId>" (fragment; rowId refers to the fragment's read, 
- *                         "FA<fragId>" (fragment; rowId refers to the fragment's alignment, 
- *                                          fragId is the fragment's 0-based number within the read; 
- *                                          only biological fragments are counted), 
- *                         "PA" (primary alignment), 
- *                         "SA" (secondary alignment)
- *   runName is the name of the accession
- */
-
-enum NGS_Object
-{
-    NGSObject_Read,
-    NGSObject_ReadFragment,
-    NGSObject_AlignmentFragment,
-    NGSObject_PrimaryAlignment,
-    NGSObject_SecondaryAlignment,
-};
-
-struct NGS_Id
-{
-    String run;
-    int64_t rowId;
-    int32_t object; /* enum NGS_Object */
-    uint32_t fragId;
-};
-
-/* Make
- * the returned NGS_String is guaranteed to be NUL-terminated
- */
-struct NGS_String* NGS_IdMake ( ctx_t ctx, const struct NGS_String * run, enum NGS_Object object, int64_t rowId );
-struct NGS_String* NGS_IdMakeFragment ( ctx_t ctx, const struct NGS_String * run, bool alignment, int64_t rowId, uint32_t frag_num );
-
-struct NGS_Id NGS_IdParse ( char const * self, size_t self_size, ctx_t ctx );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ngs_id */
diff --git a/libs/ngs/NGS_Pileup.c b/libs/ngs/NGS_Pileup.c
deleted file mode 100644
index 35b6f76..0000000
--- a/libs/ngs/NGS_Pileup.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "NGS_Pileup.h"
-
-#include "NGS_ErrBlock.h"
-#include <ngs/itf/Refcount.h>
-#include <ngs/itf/PileupItf.h>
-#include <ngs/itf/PileupEventItf.h>
-
-#include "NGS_String.h"
-#include "NGS_Reference.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-/*--------------------------------------------------------------------------
- * NGS_Pileup_v1
- */
-
-#define Self( obj ) \
-    ( ( NGS_Pileup* ) ( obj ) )
-    
-static NGS_String_v1 * NGS_Pileup_v1_get_ref_spec ( const NGS_Pileup_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcCursor, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_PileupGetReferenceSpec ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static int64_t NGS_Pileup_v1_get_ref_pos ( const NGS_Pileup_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcCursor, rcAccessing );
-    ON_FAIL ( int64_t ret = NGS_PileupGetReferencePosition ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static char NGS_Pileup_v1_get_ref_base ( const NGS_Pileup_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcCursor, rcAccessing );
-    ON_FAIL ( char ret = NGS_PileupGetReferenceBase ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static uint32_t NGS_Pileup_v1_get_pileup_depth ( const NGS_Pileup_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcCursor, rcAccessing );
-    ON_FAIL ( uint32_t ret = NGS_PileupGetPileupDepth ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static bool NGS_Pileup_v1_next ( NGS_Pileup_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcCursor, rcAccessing );
-    ON_FAIL ( bool ret = NGS_PileupIteratorNext ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-#undef Self
-
-
-NGS_Pileup_v1_vt ITF_Pileup_vt =
-{
-    {
-        "NGS_Pileup",
-        "NGS_Pileup_v1",
-        0,
-        & ITF_PileupEvent_vt . dad
-    },
-
-    NGS_Pileup_v1_get_ref_spec,
-    NGS_Pileup_v1_get_ref_pos,
-    NGS_Pileup_v1_get_ref_base,
-    NGS_Pileup_v1_get_pileup_depth,
-    NGS_Pileup_v1_next
-};
-
-/*--------------------------------------------------------------------------
- * NGS_Pileup
- */
-
-#define VT( self, msg ) \
-    ( ( ( const NGS_Pileup_vt* ) ( self ) -> dad . dad . vt ) -> msg )
-
-void NGS_PileupInit ( ctx_t ctx, 
-                      struct NGS_Pileup * obj, 
-                      const NGS_Pileup_vt * vt, 
-                      const char *clsname, 
-                      const char *instname, 
-                      struct NGS_Reference* ref )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcRow, rcConstructing );
-    
-    TRY ( NGS_PileupEventInit ( ctx, & obj -> dad, & ITF_Pileup_vt . dad, & vt -> dad, clsname, instname, ref ) )
-    {
-        assert ( vt -> get_reference_spec != NULL );
-        assert ( vt -> get_reference_position != NULL );
-        assert ( vt -> get_reference_base != NULL );
-        assert ( vt -> get_pileup_depth != NULL );
-        assert ( vt -> next != NULL );
-    }
-}
-
-/* Whack
-*/                         
-void NGS_PileupWhack ( struct NGS_Pileup * self, ctx_t ctx )
-{
-    NGS_PileupEventWhack ( & self -> dad, ctx );
-}
-    
-struct NGS_String* NGS_PileupGetReferenceSpec ( const NGS_Pileup* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get reference spec" );
-    }
-    else
-    {
-        return VT ( self, get_reference_spec ) ( self, ctx );
-    }
-
-    return NULL;
-}
-
-int64_t NGS_PileupGetReferencePosition ( const NGS_Pileup* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get reference position" );
-    }
-    else
-    {
-        return VT ( self, get_reference_position ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-char NGS_PileupGetReferenceBase ( const NGS_Pileup* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get reference base" );
-    }
-    else
-    {
-        return VT ( self, get_reference_base ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-unsigned int NGS_PileupGetPileupDepth ( const NGS_Pileup* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get pileup depth" );
-    }
-    else
-    {
-        return VT ( self, get_pileup_depth) ( self, ctx );
-    }
-
-    return 0;
-}
-
-bool NGS_PileupIteratorNext ( NGS_Pileup* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get next pileup" );
-    }
-    else
-    {
-        return VT ( self, next ) ( self, ctx );
-    }
-
-    return false;
-}
-
diff --git a/libs/ngs/NGS_Pileup.h b/libs/ngs/NGS_Pileup.h
deleted file mode 100644
index bc54c26..0000000
--- a/libs/ngs/NGS_Pileup.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_pileup_
-#define _h_ngs_pileup_
-
-typedef struct NGS_Pileup NGS_Pileup;
-#ifndef NGS_PILEUP
-#define NGS_PILEUP NGS_Pileup
-#endif
-
-#ifndef _h_ngs_refcount_
-#define NGS_REFCOUNT NGS_PILEUP
-#include "NGS_Refcount.h"
-#endif
-
-#ifndef _h_ngs_pileupevent_
-
-#ifndef NGS_PILEUPEVENT
-struct CSRA1_PileupEvent;
-#define NGS_PILEUPEVENT struct CSRA1_PileupEvent
-#endif
-
-#include "NGS_PileupEvent.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct NGS_String;
-struct NGS_PileupEvent;
-struct NGS_Reference;
-
-/*--------------------------------------------------------------------------
- * NGS_Pileup
- */
-
-enum NGS_PileupFilterBits
-{
-    NGS_PileupFilterBits_pass_bad            = 0x01,
-    NGS_PileupFilterBits_pass_dups           = 0x02,
-    NGS_PileupFilterBits_min_map_qual        = 0x04,
-    NGS_PileupFilterBits_max_map_qual        = 0x08,
-    NGS_PileupFilterBits_no_wraparound       = 0x10,
-    NGS_PileupFilterBits_start_within_window = 0x20,
-
-    NGS_PileupFilterBits_map_qual = NGS_PileupFilterBits_min_map_qual | NGS_PileupFilterBits_max_map_qual
-};
- 
-
-/* ToPileupEvent
- *  inline cast that preserves const
- */
-#define NGS_PileupToPileupEvent( self ) \
-    ( & ( self ) -> dad )
-
-/* Release
- *  release reference
- */
-#define NGS_PileupRelease( self, ctx ) \
-    NGS_PileupEventRelease ( NGS_PileupToPileupEvent ( self ), ctx )
-
-/* Duplicate
- *  duplicate reference
- */
-#define NGS_PileupDuplicate( self, ctx ) \
-    ( ( NGS_Pileup* ) NGS_PileupEventDuplicate ( NGS_PileupToPileupEvent ( self ), ctx ) )
-
-struct NGS_String* NGS_PileupGetReferenceSpec ( const NGS_Pileup* self, ctx_t ctx );
-
-int64_t NGS_PileupGetReferencePosition ( const NGS_Pileup* self, ctx_t ctx );
-
-char NGS_PileupGetReferenceBase ( const NGS_Pileup* self, ctx_t ctx );
-
-unsigned int NGS_PileupGetPileupDepth ( const NGS_Pileup* self, ctx_t ctx );
- 
-bool NGS_PileupIteratorNext ( NGS_Pileup* self, ctx_t ctx );
-
-
-/*--------------------------------------------------------------------------
- * implementation details
- */
-struct NGS_Pileup
-{
-    NGS_PileupEvent dad;
-};
-
-typedef struct NGS_Pileup_vt NGS_Pileup_vt;
-struct NGS_Pileup_vt
-{
-    NGS_PileupEvent_vt dad;
-
-    /* Pileup interface */
-    struct NGS_String *         ( * get_reference_spec )        ( const NGS_PILEUP * self, ctx_t ctx );
-    int64_t                     ( * get_reference_position )    ( const NGS_PILEUP * self, ctx_t ctx );
-    char                        ( * get_reference_base )        ( const NGS_PILEUP * self, ctx_t ctx );
-    unsigned int                ( * get_pileup_depth )          ( const NGS_PILEUP * self, ctx_t ctx );
-
-    /* PileupIterator interface */
-    bool ( * next ) ( NGS_PILEUP * self, ctx_t ctx );
-};
-
-/* Init
-*/
-void NGS_PileupInit ( ctx_t ctx, 
-                      struct NGS_Pileup * self, 
-                      const NGS_Pileup_vt * vt, 
-                      const char *clsname, 
-                      const char *instname, 
-                      struct NGS_Reference* ref );
-
-/* Whack
-*/                         
-void NGS_PileupWhack ( struct NGS_Pileup * self, ctx_t ctx );                      
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ngs_pileup_ */
diff --git a/libs/ngs/NGS_PileupEvent.c b/libs/ngs/NGS_PileupEvent.c
deleted file mode 100644
index 8826ee1..0000000
--- a/libs/ngs/NGS_PileupEvent.c
+++ /dev/null
@@ -1,493 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "NGS_PileupEvent.h"
-
-#include "NGS_ErrBlock.h"
-#include <ngs/itf/Refcount.h>
-#include <ngs/itf/PileupEventItf.h>
-
-#include "NGS_String.h"
-#include "NGS_Reference.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-/*--------------------------------------------------------------------------
- * NGS_PileupEvent_v1
- */
-
-#define Self( obj ) \
-    ( ( NGS_PileupEvent* ) ( obj ) )
-    
-static int32_t NGS_PileupEvent_v1_get_map_qual ( const NGS_PileupEvent_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( int32_t ret = NGS_PileupEventGetMappingQuality ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static NGS_String_v1 * NGS_PileupEvent_v1_get_align_id ( const NGS_PileupEvent_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_PileupEventGetAlignmentId ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static int64_t NGS_PileupEvent_v1_get_align_pos ( const NGS_PileupEvent_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( int64_t ret = NGS_PileupEventGetAlignmentPosition ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static int64_t NGS_PileupEvent_v1_get_first_align_pos ( const NGS_PileupEvent_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( int64_t ret = NGS_PileupEventGetFirstAlignmentPosition ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static int64_t NGS_PileupEvent_v1_get_last_align_pos ( const NGS_PileupEvent_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( int64_t ret = NGS_PileupEventGetLastAlignmentPosition ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static uint32_t NGS_PileupEvent_v1_get_event_type ( const NGS_PileupEvent_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( uint32_t ret = NGS_PileupEventGetEventType ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static char NGS_PileupEvent_v1_get_align_base ( const NGS_PileupEvent_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( char ret = NGS_PileupEventGetAlignmentBase ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static char NGS_PileupEvent_v1_get_align_qual ( const NGS_PileupEvent_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( char ret = NGS_PileupEventGetAlignmentQuality ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static NGS_String_v1 * NGS_PileupEvent_v1_get_ins_bases ( const NGS_PileupEvent_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_PileupEventGetInsertionBases ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static NGS_String_v1 * NGS_PileupEvent_v1_get_ins_quals ( const NGS_PileupEvent_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_PileupEventGetInsertionQualities ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static uint32_t NGS_PileupEvent_v1_get_rpt_count ( const NGS_PileupEvent_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( uint32_t ret = NGS_PileupEventGetRepeatCount ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static uint32_t NGS_PileupEvent_v1_get_indel_type ( const NGS_PileupEvent_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( uint32_t ret = NGS_PileupEventGetIndelType ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static bool NGS_PileupEvent_v1_next ( NGS_PileupEvent_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcCursor, rcAccessing );
-    ON_FAIL ( bool ret = NGS_PileupEventIteratorNext ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static void NGS_PileupEvent_v1_reset ( NGS_PileupEvent_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcCursor, rcUpdating );
-    ON_FAIL ( NGS_PileupEventIteratorReset ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-}
-
-#undef Self
-
-
-NGS_PileupEvent_v1_vt ITF_PileupEvent_vt =
-{
-    {
-        "NGS_PileupEvent",
-        "NGS_PileupEvent_v1",
-        0,
-        & ITF_Refcount_vt . dad
-    },
-
-    NGS_PileupEvent_v1_get_map_qual,
-    NGS_PileupEvent_v1_get_align_id,
-    NGS_PileupEvent_v1_get_align_pos,
-    NGS_PileupEvent_v1_get_first_align_pos,
-    NGS_PileupEvent_v1_get_last_align_pos,
-    NGS_PileupEvent_v1_get_event_type,
-    NGS_PileupEvent_v1_get_align_base,
-    NGS_PileupEvent_v1_get_align_qual,
-    NGS_PileupEvent_v1_get_ins_bases,
-    NGS_PileupEvent_v1_get_ins_quals,
-    NGS_PileupEvent_v1_get_rpt_count,
-    NGS_PileupEvent_v1_get_indel_type,
-    NGS_PileupEvent_v1_next,
-    NGS_PileupEvent_v1_reset
-};
-
-/*--------------------------------------------------------------------------
- * NGS_Pileup
- */
-
-#define VT( self, msg ) \
-    ( ( ( const NGS_PileupEvent_vt* ) ( self ) -> dad . vt ) -> msg )
-
-void NGS_PileupEventInit ( ctx_t ctx, struct NGS_PileupEvent * obj, 
-    struct NGS_VTable const * ivt, const NGS_PileupEvent_vt * vt, 
-    const char *clsname, const char *instname, struct NGS_Reference * ref )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcRow, rcConstructing );
-    
-    TRY ( NGS_RefcountInit ( ctx, & obj -> dad, ivt, & vt -> dad, clsname, instname ) )
-    {
-        assert ( vt -> get_mapping_quality != NULL );
-        assert ( vt -> get_alignment_id != NULL );
-        assert ( vt -> get_alignment_position != NULL );
-        assert ( vt -> get_first_alignment_position != NULL );
-        assert ( vt -> get_last_alignment_position != NULL );
-        assert ( vt -> get_event_type != NULL );
-        assert ( vt -> get_alignment_base != NULL );
-        assert ( vt -> get_alignment_quality != NULL );
-        assert ( vt -> get_insertion_bases != NULL );
-        assert ( vt -> get_insertion_qualities != NULL );
-        assert ( vt -> get_repeat_count != NULL );
-        assert ( vt -> get_indel_type != NULL );
-        assert ( vt -> next != NULL );
-        assert ( vt -> reset != NULL );
-    
-        assert ( ref != NULL );
-        obj -> ref = NGS_ReferenceDuplicate ( ref, ctx );
-    }
-}
-
-void NGS_PileupEventWhack( struct NGS_PileupEvent * self, ctx_t ctx )
-{
-    NGS_ReferenceRelease ( self -> ref, ctx );
-}
-    
-int NGS_PileupEventGetMappingQuality( const NGS_PileupEvent * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get mapping quality " );
-    }
-    else
-    {
-        return VT ( self, get_mapping_quality ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-struct NGS_String * NGS_PileupEventGetAlignmentId( const NGS_PileupEvent * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get alignment id" );
-    }
-    else
-    {
-        return VT ( self, get_alignment_id ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-int64_t NGS_PileupEventGetAlignmentPosition( const NGS_PileupEvent * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get alignment position " );
-    }
-    else
-    {
-        return VT ( self, get_alignment_position ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-int64_t NGS_PileupEventGetFirstAlignmentPosition( const NGS_PileupEvent * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get first alignment position " );
-    }
-    else
-    {
-        return VT ( self, get_first_alignment_position ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-int64_t NGS_PileupEventGetLastAlignmentPosition( const NGS_PileupEvent * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to last alignment position" );
-    }
-    else
-    {
-        return VT ( self, get_last_alignment_position ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-/*TODO: use uint32_t to represent all enums */
-int NGS_PileupEventGetEventType( const NGS_PileupEvent * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get event type " );
-    }
-    else
-    {
-        return VT ( self, get_event_type ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-char NGS_PileupEventGetAlignmentBase( const NGS_PileupEvent * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get alignment base" );
-    }
-    else
-    {
-        return VT ( self, get_alignment_base ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-char NGS_PileupEventGetAlignmentQuality( const NGS_PileupEvent * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get alignment quality " );
-    }
-    else
-    {
-        return VT ( self, get_alignment_quality ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-struct NGS_String * NGS_PileupEventGetInsertionBases( const NGS_PileupEvent * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get insertion bases" );
-    }
-    else
-    {
-        return VT ( self, get_insertion_bases) ( self, ctx );
-    }
-
-    return NULL;
-}
-
-struct NGS_String * NGS_PileupEventGetInsertionQualities( const NGS_PileupEvent * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get insertion qualities" );
-    }
-    else
-    {
-        return VT ( self, get_insertion_qualities) ( self, ctx );
-    }
-
-    return NULL;
-}
-
-unsigned int NGS_PileupEventGetRepeatCount( const NGS_PileupEvent * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get repeat count" );
-    }
-    else
-    {
-        return VT ( self, get_repeat_count ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-int NGS_PileupEventGetIndelType( const NGS_PileupEvent * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get indel type " );
-    }
-    else
-    {
-        return VT ( self, get_indel_type ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-/*--------------------------------------------------------------------------
- * NGS_PileupEventIterator
- */
-bool NGS_PileupEventIteratorNext ( NGS_PileupEvent* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get next pileup event" );
-    }
-    else
-    {
-        return VT ( self, next ) ( self, ctx );
-    }
-
-    return false;
-}
-
-void NGS_PileupEventIteratorReset ( NGS_PileupEvent* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to reset pileup event iterator" );
-    }
-    else
-    {
-        VT ( self, reset ) ( self, ctx );
-    }
-}
diff --git a/libs/ngs/NGS_PileupEvent.h b/libs/ngs/NGS_PileupEvent.h
deleted file mode 100644
index cfd425c..0000000
--- a/libs/ngs/NGS_PileupEvent.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_pileupevent_
-#define _h_ngs_pileupevent_
-
-typedef struct NGS_PileupEvent NGS_PileupEvent;
-#ifndef NGS_PILEUPEVENT
-#define NGS_PILEUPEVENT NGS_PileupEvent
-#endif
-
-#ifndef _h_ngs_refcount_
-#define NGS_REFCOUNT NGS_PILEUPEVENT
-#include "NGS_Refcount.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct NGS_String;
-struct NGS_Alignment;
-struct NGS_Reference;
-struct NGS_PileupEvent_v1_vt;
-extern struct NGS_PileupEvent_v1_vt ITF_PileupEvent_vt;
-
-/*--------------------------------------------------------------------------
- * NGS_PileupEvent
- */
- 
-/* ToRefcount
- *  inline cast that preserves const
- */
-#define NGS_PileupEventToRefcount( self ) \
-    ( & ( self ) -> dad )
-
-/* Release
- *  release reference
- */
-#define NGS_PileupEventRelease( self, ctx ) \
-    NGS_RefcountRelease ( NGS_PileupEventToRefcount ( self ), ctx )
-
-/* Duplicate
- *  duplicate reference
- */
-#define NGS_PileupEventDuplicate( self, ctx ) \
-    ( ( NGS_PileupEvent* ) NGS_RefcountDuplicate ( NGS_PileupEventToRefcount ( self ), ctx ) ) 
- 
-int NGS_PileupEventGetMappingQuality( const NGS_PileupEvent * self, ctx_t ctx );
-
-struct NGS_String * NGS_PileupEventGetAlignmentId( const NGS_PileupEvent * self, ctx_t ctx );
-
-int64_t NGS_PileupEventGetAlignmentPosition( const NGS_PileupEvent * self, ctx_t ctx );
-
-int64_t NGS_PileupEventGetFirstAlignmentPosition( const NGS_PileupEvent * self, ctx_t ctx );
-
-int64_t NGS_PileupEventGetLastAlignmentPosition( const NGS_PileupEvent * self, ctx_t ctx );
-
-enum NGS_PileupEventType
-{
-    /* basic event types */
-    NGS_PileupEventType_match        = 0,
-    NGS_PileupEventType_mismatch     = 1,
-    NGS_PileupEventType_deletion     = 2,
-
-    /* event modifiers */
-    NGS_PileupEventType_insertion    = 0x08,
-    NGS_PileupEventType_minus_strand = 0x20,
-    NGS_PileupEventType_stop         = 0x40,
-    NGS_PileupEventType_start        = 0x80
-};        
-int NGS_PileupEventGetEventType( const NGS_PileupEvent * self, ctx_t ctx );
-
-char NGS_PileupEventGetAlignmentBase( const NGS_PileupEvent * self, ctx_t ctx );
-
-char NGS_PileupEventGetAlignmentQuality( const NGS_PileupEvent * self, ctx_t ctx );
-
-struct NGS_String * NGS_PileupEventGetInsertionBases( const NGS_PileupEvent * self, ctx_t ctx );
-
-struct NGS_String * NGS_PileupEventGetInsertionQualities( const NGS_PileupEvent * self, ctx_t ctx );
-
-unsigned int NGS_PileupEventGetRepeatCount( const NGS_PileupEvent * self, ctx_t ctx );
-
-enum NGS_PileupIndelType
-{
-    NGS_PileupIndelType_normal         = 0,
-    NGS_PileupIndelType_intron_plus    = 1,
-    NGS_PileupIndelType_intron_minus   = 2,
-    NGS_PileupIndelType_intron_unknown = 3,
-    NGS_PileupIndelType_read_overlap   = 4,
-    NGS_PileupIndelType_read_gap       = 5
-};
-int NGS_PileupEventGetIndelType( const NGS_PileupEvent * self, ctx_t ctx );
-
-/*--------------------------------------------------------------------------
- * NGS_PileupEventIterator
- */
-
-/* Next
- */
-bool NGS_PileupEventIteratorNext ( NGS_PileupEvent * self, ctx_t ctx );
-
-/* Reset
- */
-void NGS_PileupEventIteratorReset ( NGS_PileupEvent * self, ctx_t ctx );
-
-
-/*--------------------------------------------------------------------------
- * implementation details
- */
-struct NGS_PileupEvent
-{
-    NGS_Refcount dad;
-    struct NGS_Reference * ref;
-};
-
-typedef struct NGS_PileupEvent_vt NGS_PileupEvent_vt;
-struct NGS_PileupEvent_vt
-{
-    NGS_Refcount_vt dad;
-    
-    int                     ( * get_mapping_quality )           ( const NGS_PILEUPEVENT * self, ctx_t ctx );
-    struct NGS_String *     ( * get_alignment_id )              ( const NGS_PILEUPEVENT * self, ctx_t ctx );
-    int64_t                 ( * get_alignment_position )        ( const NGS_PILEUPEVENT * self, ctx_t ctx );
-    int64_t                 ( * get_first_alignment_position )  ( const NGS_PILEUPEVENT * self, ctx_t ctx );
-    int64_t                 ( * get_last_alignment_position )   ( const NGS_PILEUPEVENT * self, ctx_t ctx );
-    int                     ( * get_event_type )                ( const NGS_PILEUPEVENT * self, ctx_t ctx );
-    char                    ( * get_alignment_base )            ( const NGS_PILEUPEVENT * self, ctx_t ctx );
-    char                    ( * get_alignment_quality )         ( const NGS_PILEUPEVENT * self, ctx_t ctx );
-    struct NGS_String *     ( * get_insertion_bases )           ( const NGS_PILEUPEVENT * self, ctx_t ctx );
-    struct NGS_String *     ( * get_insertion_qualities )       ( const NGS_PILEUPEVENT * self, ctx_t ctx );
-    unsigned int            ( * get_repeat_count )              ( const NGS_PILEUPEVENT * self, ctx_t ctx );
-    int                     ( * get_indel_type )                ( const NGS_PILEUPEVENT * self, ctx_t ctx );
-    bool                    ( * next )                          ( NGS_PILEUPEVENT * self, ctx_t ctx );    
-    void                    ( * reset )                         ( NGS_PILEUPEVENT * self, ctx_t ctx );    
-};
-
-
-/* Init
-*/
-void NGS_PileupEventInit ( ctx_t ctx, struct NGS_PileupEvent * obj, 
-    struct NGS_VTable const * ivt, const NGS_PileupEvent_vt * vt, 
-    const char *clsname, const char *instname, struct NGS_Reference * ref );
-
-/* Whack
-*/
-void NGS_PileupEventWhack ( struct NGS_PileupEvent * self, ctx_t ctx );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ngs_pileupevent_ */
diff --git a/libs/ngs/NGS_Read.c b/libs/ngs/NGS_Read.c
deleted file mode 100644
index b652141..0000000
--- a/libs/ngs/NGS_Read.c
+++ /dev/null
@@ -1,522 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-#include "NGS_Read.h"
-
-#include "NGS_String.h"
-
-#include "NGS_ErrBlock.h"
-#include <ngs/itf/FragmentItf.h>
-#include <ngs/itf/ReadItf.h>
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/refcount.h>
-#include <vdb/cursor.h>
-#include <vdb/schema.h>
-#include <vdb/vdb-priv.h>
-#include <insdc/insdc.h>
-
-#include <sysalloc.h>
-
-#include <stddef.h>
-#include <assert.h>
-
-/*--------------------------------------------------------------------------
- * NGS_Read_v1
- */
-
-#define Self( obj ) \
-    ( ( NGS_Read* ) ( obj ) )
-    
-static NGS_String_v1 * ITF_Read_v1_get_id ( const NGS_Read_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_String * ret = NGS_ReadGetReadId ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static uint32_t ITF_Read_v1_get_num_frags ( const NGS_Read_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( uint32_t ret = NGS_ReadNumFragments ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static bool ITF_Read_v1_frag_is_aligned ( const NGS_Read_v1 * self, NGS_ErrBlock_v1 * err, uint32_t frag_idx )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( bool ret = NGS_ReadFragIsAligned ( Self ( self ), ctx, frag_idx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static uint32_t ITF_Read_v1_get_category ( const NGS_Read_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( uint32_t ret = NGS_ReadGetReadCategory ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static NGS_String_v1 * ITF_Read_v1_get_read_group ( const NGS_Read_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_String * ret = NGS_ReadGetReadGroup ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static NGS_String_v1 * ITF_Read_v1_get_name ( const NGS_Read_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_String * ret = NGS_ReadGetReadName ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static NGS_String_v1 * ITF_Read_v1_get_bases ( const NGS_Read_v1 * self, NGS_ErrBlock_v1 * err, uint64_t offset, uint64_t length )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_String * ret = NGS_ReadGetReadSequence ( Self ( self ), ctx, offset, length ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static NGS_String_v1 * ITF_Read_v1_get_quals ( const NGS_Read_v1 * self, NGS_ErrBlock_v1 * err, uint64_t offset, uint64_t length )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_String * ret = NGS_ReadGetReadQualities ( Self ( self ), ctx, offset, length ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static bool ITF_Read_v1_next ( NGS_Read_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( bool ret = NGS_ReadIteratorNext ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-#undef Self
-
-
-NGS_Read_v1_vt ITF_Read_vt =
-{
-    {
-        "NGS_Read",
-        "NGS_Read_v1",
-        1,
-        & ITF_Fragment_vt . dad
-    },
-
-    ITF_Read_v1_get_id,
-    ITF_Read_v1_get_num_frags,
-    ITF_Read_v1_get_category,
-    ITF_Read_v1_get_read_group,
-    ITF_Read_v1_get_name,
-    ITF_Read_v1_get_bases,
-    ITF_Read_v1_get_quals,
-    ITF_Read_v1_next,
-
-    /* 1.1 */
-    ITF_Read_v1_frag_is_aligned
-};
-
-/*--------------------------------------------------------------------------
- * NGS_Read
- */
-#define VT( self, msg ) \
-    ( ( ( const NGS_Read_vt* ) ( self ) -> dad . dad . vt ) -> msg )
-
-NGS_String * NGS_ReadGetReadName ( NGS_Read * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read name" );
-    }
-    else
-    {
-        return VT ( self, get_name ) ( self, ctx );
-    }
-
-    return NULL;
-}
-
-NGS_String * NGS_ReadGetReadId ( NGS_Read * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read id" );
-    }
-    else
-    {
-        return VT ( self, get_id ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-NGS_String * NGS_ReadGetReadGroup ( NGS_Read * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read group" );
-    }
-    else
-    {
-        return VT ( self, get_read_group ) ( self, ctx );
-    }
-
-    return NULL;
-}
-
-enum NGS_ReadCategory NGS_ReadGetReadCategory ( const NGS_Read * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read category" );
-    }
-    else
-    {
-        return VT ( self, get_category ) ( self, ctx );
-    }
-
-    return NGS_ReadCategory_unaligned;
-}
-
-NGS_String * NGS_ReadGetReadSequence ( NGS_Read * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read sequence" );
-    }
-    else
-    {
-        return VT ( self, get_sequence ) ( self, ctx, offset, size );
-    }
-
-    return NULL;
-}
-
-NGS_String * NGS_ReadGetReadQualities( NGS_Read * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read qualities" );
-    }
-    else
-    {
-        return VT ( self, get_qualities ) ( self, ctx, offset, size );
-    }
-
-    return NULL;
-}
-
-uint32_t NGS_ReadNumFragments ( NGS_Read * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read fragment count" );
-    }
-    else
-    {
-        return VT ( self, get_num_fragments ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-bool NGS_ReadFragIsAligned ( NGS_Read * self, ctx_t ctx, uint32_t frag_idx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to test fragment alignment" );
-    }
-    else
-    {
-        return VT ( self, frag_is_aligned ) ( self, ctx, frag_idx );
-    }
-
-    return 0;
-}
-
-/*--------------------------------------------------------------------------
- * NGS_ReadIterator
- */
-
-bool NGS_ReadIteratorNext ( NGS_Read * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to advance read iterator" );
-    }
-    else
-    {
-        return VT ( self, next ) ( self, ctx );
-    }
-
-    return false;
-}
-
-uint64_t NGS_ReadIteratorGetCount ( const NGS_Read * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read iterator count" );
-    }
-    else
-    {
-        return VT ( self, get_count ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-void NGS_ReadInit ( ctx_t ctx, NGS_Read * read, const NGS_Read_vt * vt, const char *clsname, const char *instname )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcRow, rcConstructing );
-
-    TRY ( NGS_FragmentInit ( ctx, & read -> dad, & ITF_Read_vt . dad, & vt -> dad, clsname, instname ) )
-    {
-        assert ( vt -> get_id != NULL );
-        assert ( vt -> get_name != NULL );
-        assert ( vt -> get_read_group != NULL );
-        assert ( vt -> get_category != NULL );
-        assert ( vt -> get_sequence != NULL );
-        assert ( vt -> get_qualities != NULL ); 
-        assert ( vt -> get_num_fragments != NULL );
-   }
-}
-
-void NGS_ReadIteratorInit ( ctx_t ctx, NGS_Read * read, const NGS_Read_vt * vt, const char *clsname, const char *instname )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcRow, rcConstructing );
-
-    TRY ( NGS_ReadInit ( ctx, read, vt, clsname, instname ) )
-    {
-        assert ( vt -> next != NULL ); 
-        assert ( vt -> get_count != NULL );
-   }
-}
-
-/*--------------------------------------------------------------------------
- * NGS_NullRead
- */
-
-static 
-void NullRead_ReadWhack ( NGS_Read * self, ctx_t ctx )
-{
-}
-
-static 
-struct NGS_String * NullRead_FragmentToString ( NGS_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return 0;
-}
-
-static 
-struct NGS_String * NullRead_FragmentOffsetLenToString ( NGS_Read * self, ctx_t ctx, uint64_t offset, uint64_t length )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return 0;
-}
-
-static 
-bool NullRead_FragmentToBool ( NGS_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return 0;
-}
-
-static 
-struct NGS_String * NullRead_ReadToString ( NGS_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return 0;
-}
-
-static 
-enum NGS_ReadCategory NullRead_ConstReadToCategory ( const NGS_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return 0;
-}
-
-static struct NGS_String * NullRead_ReadOffsetLenToString ( NGS_Read * self, ctx_t ctx, uint64_t offset, uint64_t length )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return 0;
-}
-
-static uint32_t NullRead_ReadToU32 ( NGS_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return 0;
-}
-
-static bool NullRead_FragIsAligned ( NGS_Read * self, ctx_t ctx, uint32_t frag_idx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Alignment accessed" );
-    return false;
-}
-
-static bool NullRead_ReadToBool_NoError ( NGS_Read * self, ctx_t ctx )
-{
-    return false;
-}
-
-static uint64_t NullRead_ConstReadToU64_NoError ( const NGS_Read * self, ctx_t ctx )
-{
-    return 0;
-}
-
-static NGS_Read_vt NullRead_vt_inst =
-{
-    {
-        {
-            /* NGS_Refcount */
-            NullRead_ReadWhack
-        },
-
-        /* NGS_Fragment */
-        NullRead_FragmentToString,
-        NullRead_FragmentOffsetLenToString,
-        NullRead_FragmentOffsetLenToString,
-        NullRead_FragmentToBool,
-        NullRead_FragmentToBool
-    },
-    
-    /* NGS_Read */
-    NullRead_ReadToString,                     /* get-id          */
-    NullRead_ReadToString,                     /* get-name        */
-    NullRead_ReadToString,                     /* get-read-group  */
-    NullRead_ConstReadToCategory,              /* get-category    */
-    NullRead_ReadOffsetLenToString,            /* get-sequence    */
-    NullRead_ReadOffsetLenToString,            /* get-qualities   */
-    NullRead_ReadToU32,                        /* get-num-frags   */
-    NullRead_FragIsAligned,                    /* frag-is-aligned */
-    
-    /* NGS_ReadIterator */
-    NullRead_ReadToBool_NoError,               /* next            */
-    NullRead_ConstReadToU64_NoError,           /* get-count       */
-}; 
-
-struct NGS_Read * NGS_ReadMakeNull ( ctx_t ctx, const NGS_String * run_name )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    NGS_Read * ref;
-
-    assert ( run_name != NULL );
-
-    ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating NullRead on '%.*s'", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-    else
-    {
-#if _DEBUGGING
-        char instname [ 256 ];
-        string_printf ( instname, sizeof instname, NULL, "%.*s(NULL)", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-        instname [ sizeof instname - 1 ] = 0;
-#else
-        const char *instname = "";
-#endif
-		TRY ( NGS_ReadInit ( ctx, ref, & NullRead_vt_inst, "NullRead", instname ) )
-        {
-            return ref;
-        }
-        free ( ref );
-    }
-
-    return NULL;
-}
-
-
-
diff --git a/libs/ngs/NGS_Read.h b/libs/ngs/NGS_Read.h
deleted file mode 100644
index 53689ad..0000000
--- a/libs/ngs/NGS_Read.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_read_
-#define _h_ngs_read_
-
-typedef struct NGS_Read NGS_Read;
-
-#ifndef NGS_READ
-#define NGS_READ NGS_Read
-#endif
-
-#ifndef _h_ngs_fragment_
-#define NGS_FRAGMENT NGS_READ
-#include "NGS_Fragment.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct String;
-struct VCursor;
-struct NGS_String;
-struct NGS_Read_v1_vt;
-extern struct NGS_Read_v1_vt ITF_Read_vt;
-
-/*--------------------------------------------------------------------------
- * NGS_Read
- */
- 
-/* MakeCommon
- *  makes a common read from VCursor
- *  MAKES A STANDALONE READ - A SEPARATE IMPLEMENTATION CLASS
- *  mostly, it cannot iterate, and should throw an error when trying
- */
-NGS_Read * NGS_ReadMakeCommon ( ctx_t ctx, struct VCursor const * curs, int64_t readId, struct String const * spec );
-
-
-/* ToRefcount
- *  inline cast that preserves const
- */
-#define NGS_ReadToRefcount( self ) \
-    ( NGS_FragmentToRefcount ( & ( self ) -> dad ) )
-
-
-/* Release
- *  release reference
- */
-#define NGS_ReadRelease( self, ctx ) \
-    NGS_RefcountRelease ( NGS_ReadToRefcount ( self ), ctx )
-
-/* Duplicate
- *  duplicate reference
- */
-#define NGS_ReadDuplicate( self, ctx ) \
-    ( ( NGS_Read* ) NGS_RefcountDuplicate ( NGS_ReadToRefcount ( self ), ctx ) )
-
-
-/* GetReadName
- */
-struct NGS_String * NGS_ReadGetReadName ( NGS_Read * self, ctx_t ctx );
-
-/* GetReadId
- */
-struct NGS_String * NGS_ReadGetReadId ( NGS_Read * self, ctx_t ctx );
-
-/* GetReadGroup
- */
-struct NGS_String * NGS_ReadGetReadGroup ( NGS_Read * self, ctx_t ctx );
-
-/* GetReadCategory
- */
-enum NGS_ReadCategory
-{	/* keep in synch with ngs :: Read :: ReadCategory */
-	/* TODO: use an enum from <ngs/itf/ReadItf.h> */
-    NGS_ReadCategory_fullyAligned = 1,
-    NGS_ReadCategory_partiallyAligned = 2,
-    NGS_ReadCategory_unaligned = 4,
-};
-
-enum NGS_ReadCategory NGS_ReadGetReadCategory ( const NGS_Read * self, ctx_t ctx );
-
-/* GetReadSequence
- * GetReadSubSequence
- */
-struct NGS_String * NGS_ReadGetReadSequence ( NGS_Read * self, ctx_t ctx, uint64_t offset, uint64_t length );
-
-
-/* GetReadQualities
- * GetReadSubQualities
- */
-struct NGS_String * NGS_ReadGetReadQualities ( NGS_Read * self, ctx_t ctx, uint64_t offset, uint64_t length );
-
-
-/* NumFragments
- */
-uint32_t NGS_ReadNumFragments ( NGS_Read * self, ctx_t ctx );
-
-
-/* FragIsAligned
- */
-bool NGS_ReadFragIsAligned ( NGS_Read * self, ctx_t ctx, uint32_t frag_idx );
-
-
-/*--------------------------------------------------------------------------
- * NGS_ReadIterator
- */
-
-/* Next
- */
-bool NGS_ReadIteratorNext ( NGS_Read * self, ctx_t ctx );
-
-/* GetCount
- */
-uint64_t NGS_ReadIteratorGetCount ( const NGS_Read * self, ctx_t ctx );
-
-
-/*--------------------------------------------------------------------------
- * implementation details
- */
-struct NGS_Read
-{
-    NGS_Fragment dad;
-};
-
-typedef struct NGS_Read_vt NGS_Read_vt;
-struct NGS_Read_vt
-{
-    NGS_Fragment_vt dad;
-
-    /* Read interface */
-    struct NGS_String *     ( * get_id )            ( NGS_READ * self, ctx_t ctx );
-    struct NGS_String *     ( * get_name )          ( NGS_READ * self, ctx_t ctx );
-    struct NGS_String *     ( * get_read_group )    ( NGS_READ * self, ctx_t ctx );
-    enum NGS_ReadCategory   ( * get_category )      ( const NGS_READ * self, ctx_t ctx );
-    struct NGS_String *     ( * get_sequence )      ( NGS_READ * self, ctx_t ctx, uint64_t offset, uint64_t length );
-    struct NGS_String *     ( * get_qualities )     ( NGS_READ * self, ctx_t ctx, uint64_t offset, uint64_t length );
-    uint32_t                ( * get_num_fragments ) ( NGS_READ * self, ctx_t ctx );
-    bool                    ( * frag_is_aligned )   ( NGS_READ * self, ctx_t ctx, uint32_t frag_idx );
-
-    /* ReadIterator interface */
-    bool ( * next ) ( NGS_READ * self, ctx_t ctx );
-    uint64_t ( * get_count ) ( const NGS_READ * self, ctx_t ctx );
-    
-};
-
-/* Init
- */
-void NGS_ReadInit ( ctx_t ctx, NGS_Read * read,
-    const NGS_Read_vt * vt, const char *clsname, const char *instname );
-void NGS_ReadIteratorInit ( ctx_t ctx, NGS_Read * read,
-    const NGS_Read_vt * vt, const char *clsname, const char *instname );
-
-/* NullRead
- * will error out on any call
- */
-struct NGS_Read * NGS_ReadMakeNull ( ctx_t ctx, const struct NGS_String * spec );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ngs_read_ */
diff --git a/libs/ngs/NGS_ReadCollection.c b/libs/ngs/NGS_ReadCollection.c
deleted file mode 100644
index f563717..0000000
--- a/libs/ngs/NGS_ReadCollection.c
+++ /dev/null
@@ -1,674 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "NGS_ReadCollection.h"
-
-#include "NGS_ErrBlock.h"
-#include <ngs/itf/Refcount.h>
-#include <ngs/itf/ReadCollectionItf.h>
-
-#include "NGS_String.h"
-#include "NGS_ReadGroup.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <kfg/kfg-priv.h>
-#include <kfg/repository.h>
-
-#include <vdb/vdb-priv.h>
-#include <vdb/manager.h>
-#include <vdb/schema.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <sra/sraschema.h>
-
-#include <stddef.h>
-#include <assert.h>
-
-#include <sysalloc.h>
-
-/*--------------------------------------------------------------------------
- * NGS_ReadCollection_v1
- */
-
-#define Self( obj ) \
-    ( ( NGS_ReadCollection* ) ( obj ) )
-
-static NGS_String_v1 * NGS_ReadCollection_v1_get_name ( const NGS_ReadCollection_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_ReadCollectionGetName ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static struct NGS_ReadGroup_v1 * NGS_ReadCollection_v1_get_read_groups ( const NGS_ReadCollection_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_ReadGroup * ret = NGS_ReadCollectionGetReadGroups ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_ReadGroup_v1 * ) ret;
-}
-
-static bool NGS_ReadCollection_v1_has_read_group ( const NGS_ReadCollection_v1 * self, const char * spec )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    bool ret = NGS_ReadCollectionHasReadGroup ( Self ( self ), ctx, spec );
-    CLEAR ();
-    return ret;
-}
-
-static struct NGS_ReadGroup_v1 * NGS_ReadCollection_v1_get_read_group ( const NGS_ReadCollection_v1 * self, NGS_ErrBlock_v1 * err, const char * spec )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_ReadGroup * ret = NGS_ReadCollectionGetReadGroup ( Self ( self ), ctx, spec ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_ReadGroup_v1 * ) ret;
-}
-
-static struct NGS_Reference_v1 * NGS_ReadCollection_v1_get_references ( const NGS_ReadCollection_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_Reference * ret = NGS_ReadCollectionGetReferences ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Reference_v1 * ) ret;
-}
-
-static bool NGS_ReadCollection_v1_has_reference ( const NGS_ReadCollection_v1 * self, const char * spec )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    bool ret = NGS_ReadCollectionHasReference ( Self ( self ), ctx, spec );
-    CLEAR ();
-    return ret;
-}
-
-static struct NGS_Reference_v1 * NGS_ReadCollection_v1_get_reference ( const NGS_ReadCollection_v1 * self, NGS_ErrBlock_v1 * err, const char * spec )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_Reference * ret = NGS_ReadCollectionGetReference ( Self ( self ), ctx, spec ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Reference_v1 * ) ret;
-}
-
-static struct NGS_Alignment_v1 * NGS_ReadCollection_v1_get_alignment ( const NGS_ReadCollection_v1 * self, NGS_ErrBlock_v1 * err, const char * alignmentId )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_Alignment * ret = NGS_ReadCollectionGetAlignment ( Self ( self ), ctx, alignmentId ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Alignment_v1 * ) ret;
-}
-
-static struct NGS_Alignment_v1 * NGS_ReadCollection_v1_get_alignments ( const NGS_ReadCollection_v1 * self, NGS_ErrBlock_v1 * err, bool wants_primary, bool wants_secondary )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_Alignment * ret = NGS_ReadCollectionGetAlignments ( Self ( self ), ctx, wants_primary, wants_secondary ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Alignment_v1 * ) ret;
-}
-
-static uint64_t NGS_ReadCollection_v1_get_align_count ( const NGS_ReadCollection_v1 * self, NGS_ErrBlock_v1 * err, bool wants_primary, bool wants_secondary )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( uint64_t ret = NGS_ReadCollectionGetAlignmentCount ( Self ( self ), ctx, wants_primary, wants_secondary ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static struct NGS_Alignment_v1 * NGS_ReadCollection_v1_get_align_range ( const NGS_ReadCollection_v1 * self, NGS_ErrBlock_v1 * err, uint64_t first, uint64_t count, bool wants_primary, bool wants_secondary )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_Alignment * ret = NGS_ReadCollectionGetAlignmentRange ( Self ( self ), ctx, first, count, wants_primary, wants_secondary ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Alignment_v1 * ) ret;
-}
-
-static struct NGS_Read_v1 * NGS_ReadCollection_v1_get_read ( const NGS_ReadCollection_v1 * self, NGS_ErrBlock_v1 * err, const char * readId )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_Read * ret = NGS_ReadCollectionGetRead ( Self ( self ), ctx, readId ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Read_v1 * ) ret;
-}
-
-static struct NGS_Read_v1 * NGS_ReadCollection_v1_get_reads ( const NGS_ReadCollection_v1 * self, NGS_ErrBlock_v1 * err, bool wants_full, bool wants_partial, bool wants_unaligned )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_Read * ret = NGS_ReadCollectionGetReads ( Self ( self ), ctx, wants_full, wants_partial, wants_unaligned ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Read_v1 * ) ret;
-}
-
-static uint64_t NGS_ReadCollection_v1_get_read_count ( const NGS_ReadCollection_v1 * self, NGS_ErrBlock_v1 * err, bool wants_full, bool wants_partial, bool wants_unaligned )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( uint64_t ret = NGS_ReadCollectionGetReadCount ( Self ( self ), ctx, wants_full, wants_partial, wants_unaligned ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-struct NGS_Read_v1 * NGS_ReadCollection_v1_read_range ( const NGS_ReadCollection_v1 * self, NGS_ErrBlock_v1 * err, uint64_t first, uint64_t count, bool wants_full, bool wants_partial, bool wants_unaligned )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_Read * ret = NGS_ReadCollectionGetReadRange ( Self ( self ), ctx, first, count, wants_full, wants_partial, wants_unaligned ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Read_v1 * ) ret;
-}
-
-#undef Self
-
-
-NGS_ReadCollection_v1_vt ITF_ReadCollection_vt =
-{
-    {
-        "NGS_ReadCollection",
-        "NGS_ReadCollection_v1",
-        1,
-        & ITF_Refcount_vt . dad
-    },
-
-    /* v1.0 */
-    NGS_ReadCollection_v1_get_name,
-    NGS_ReadCollection_v1_get_read_groups,
-    NGS_ReadCollection_v1_get_read_group,
-    NGS_ReadCollection_v1_get_references,
-    NGS_ReadCollection_v1_get_reference,
-    NGS_ReadCollection_v1_get_alignment,
-    NGS_ReadCollection_v1_get_alignments,
-    NGS_ReadCollection_v1_get_align_count,
-    NGS_ReadCollection_v1_get_align_range,
-    NGS_ReadCollection_v1_get_read,
-    NGS_ReadCollection_v1_get_reads,
-    NGS_ReadCollection_v1_get_read_count,
-	NGS_ReadCollection_v1_read_range,
-
-    /* v1.1 */
-	NGS_ReadCollection_v1_has_read_group,
-	NGS_ReadCollection_v1_has_reference
-};
-
-
-/*--------------------------------------------------------------------------
- * NGS_ReadCollection
- */
-
-#define VT( self, msg ) \
-    ( ( ( const NGS_ReadCollection_vt* ) ( self ) -> dad . vt ) -> msg )
-
-/* GetName
- */
-struct NGS_String * NGS_ReadCollectionGetName ( NGS_ReadCollection * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get name" );
-    }
-    else
-    {
-        return VT ( self, get_name ) ( self, ctx );
-    }
-
-    return NULL;
-}
-
-
-/* READ GROUPS
- */
-struct NGS_ReadGroup * NGS_ReadCollectionGetReadGroups ( NGS_ReadCollection * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read group iterator" );
-    }
-    else
-    {
-        return VT ( self, get_read_groups ) ( self, ctx );
-    }
-
-    return NULL;
-}
-
-bool NGS_ReadCollectionHasReadGroup ( NGS_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    if ( self == NULL )
-        INTERNAL_WARNING ( xcSelfNull, "failed to get read group '%.128s'", spec );
-    else if ( spec == NULL )
-        INTERNAL_WARNING ( xcParamNull, "read group spec" );
-    else
-    {
-        POP_CTX ( ctx );
-        return VT ( self, has_read_group ) ( self, ctx, spec [ 0 ] == 0 ? DEFAULT_READGROUP_NAME : spec );
-    }
-
-    return false;
-}
-
-struct NGS_ReadGroup * NGS_ReadCollectionGetReadGroup ( NGS_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read group '%.128s'", spec );
-    else if ( spec == NULL )
-        INTERNAL_ERROR ( xcParamNull, "read group spec" );
-    else
-    {
-        POP_CTX ( ctx );
-        return VT ( self, get_read_group ) ( self, ctx, spec [ 0 ] == 0 ? DEFAULT_READGROUP_NAME : spec );
-    }
-
-    return NULL;
-}
-
-
-/* REFERENCES
- */
-struct NGS_Reference * NGS_ReadCollectionGetReferences ( NGS_ReadCollection * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get reference iterator" );
-    }
-    else
-    {
-        return VT ( self, get_references ) ( self, ctx );
-    }
-
-    return NULL;
-}
-
-bool NGS_ReadCollectionHasReference ( NGS_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    if ( self == NULL )
-        INTERNAL_WARNING ( xcSelfNull, "failed to get reference '%.128s'", spec );
-    else if ( spec == NULL )
-        INTERNAL_WARNING ( xcParamNull, "reference spec" );
-    else if ( spec [ 0 ] == 0 )
-        INTERNAL_WARNING ( xcStringEmpty, "reference spec" );
-    else
-    {
-        POP_CTX ( ctx );
-        return VT ( self, has_reference ) ( self, ctx, spec );
-    }
-
-    return false;
-}
-
-struct NGS_Reference * NGS_ReadCollectionGetReference ( NGS_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get reference '%.128s'", spec );
-    else if ( spec == NULL )
-        INTERNAL_ERROR ( xcParamNull, "reference spec" );
-    else if ( spec [ 0 ] == 0 )
-        INTERNAL_ERROR ( xcStringEmpty, "reference spec" );
-    else
-    {
-        POP_CTX ( ctx );
-        return VT ( self, get_reference ) ( self, ctx, spec );
-    }
-
-    return NULL;
-}
-
-
-/* ALIGNMENTS
- */
-struct NGS_Alignment * NGS_ReadCollectionGetAlignments ( NGS_ReadCollection * self, ctx_t ctx,
-    bool wants_primary, bool wants_secondary )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get alignment iterator" );
-    }
-    else
-    {
-        return VT ( self, get_alignments ) ( self, ctx, wants_primary, wants_secondary );
-    }
-
-    return NULL;
-}
-
-struct NGS_Alignment * NGS_ReadCollectionGetAlignment ( NGS_ReadCollection * self, ctx_t ctx, const char * alignmentId )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get alignment '%.128s'", alignmentId );
-    else if ( alignmentId == NULL )
-        INTERNAL_ERROR ( xcParamNull, "alignment id" );
-    else if ( alignmentId [ 0 ] == 0 )
-        INTERNAL_ERROR ( xcStringEmpty, "alignment id" );
-    else
-    {
-        return VT ( self, get_alignment ) ( self, ctx, alignmentId );
-    }
-
-    return NULL;
-}
-
-uint64_t NGS_ReadCollectionGetAlignmentCount ( NGS_ReadCollection * self, ctx_t ctx, bool wants_primary, bool wants_secondary )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get alignment count" );
-    }
-    else
-    {
-        return VT ( self, get_alignment_count ) ( self, ctx, wants_primary, wants_secondary );
-    }
-
-    return 0;
-}
-
-struct NGS_Alignment * NGS_ReadCollectionGetAlignmentRange ( NGS_ReadCollection * self, ctx_t ctx, uint64_t first, uint64_t count,
-    bool wants_primary, bool wants_secondary )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read range first = %lu count = %lu", first, count );
-    }
-    else
-    {
-        return VT ( self, get_alignment_range ) ( self, ctx, first, count, wants_primary, wants_secondary );
-    }
-
-    return NULL;
-}
-
-/* READS
- */
-struct NGS_Read * NGS_ReadCollectionGetReads ( NGS_ReadCollection * self, ctx_t ctx,
-    bool wants_full, bool wants_partial, bool wants_unaligned )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read iterator" );
-    }
-    else
-    {
-        return VT ( self, get_reads ) ( self, ctx, wants_full, wants_partial, wants_unaligned );
-    }
-
-    return NULL;
-}
-
-struct NGS_Read * NGS_ReadCollectionGetRead ( NGS_ReadCollection * self, ctx_t ctx, const char * readId )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read '%.128s'", readId );
-    else if ( readId == NULL )
-        INTERNAL_ERROR ( xcParamNull, "read id" );
-    else if ( readId [ 0 ] == 0 )
-        INTERNAL_ERROR ( xcStringEmpty, "read id" );
-    else
-    {
-        return VT ( self, get_read ) ( self, ctx, readId );
-    }
-
-    return NULL;
-}
-
-uint64_t NGS_ReadCollectionGetReadCount ( NGS_ReadCollection * self, ctx_t ctx,
-    bool wants_full, bool wants_partial, bool wants_unaligned )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read count" );
-    }
-    else
-    {
-        return VT ( self, get_read_count ) ( self, ctx, wants_full, wants_partial, wants_unaligned );
-    }
-
-    return 0;
-}
-
-struct NGS_Read * NGS_ReadCollectionGetReadRange ( NGS_ReadCollection * self, ctx_t ctx, uint64_t first, uint64_t count,
-        bool wants_full, bool wants_partial, bool wants_unaligned  )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read range first = %lu count = %lu", first, count );
-    }
-    else
-    {
-        return VT ( self, get_read_range ) ( self, ctx, first, count, wants_full, wants_partial, wants_unaligned );
-    }
-
-    return NULL;
-}
-
-struct NGS_Statistics* NGS_ReadCollectionGetStatistics ( NGS_ReadCollection * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get statistics" );
-    }
-    else
-    {
-        return VT ( self, get_statistics ) ( self, ctx );
-    }
-
-    return NULL;
-}
-
-struct NGS_FragmentBlobIterator* NGS_ReadCollectionGetFragmentBlobs ( NGS_ReadCollection * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get fragment blobs" );
-    }
-    else
-    {
-        return VT ( self, get_frag_blobs ) ( self, ctx );
-    }
-
-    return NULL;
-}
-
-
-/* Make
- *  use provided specification to create an object
- *  any error returns NULL as a result and sets error in ctx
- */
-NGS_ReadCollection * NGS_ReadCollectionMake ( ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcConstructing );
-
-    if ( spec == NULL )
-        USER_ERROR ( xcParamNull, "NULL read-collection specification string" );
-    else if ( spec [ 0 ] == 0 )
-        USER_ERROR ( xcStringEmpty, "empty read-collection specification string" );
-    else
-    {
-        rc_t rc;
-        const VDatabase *db;
-        VSchema *sra_schema;
-
-        /* the first order of work is to determine what type of object is in "spec" */
-        const VDBManager * mgr = ctx -> rsrc -> vdb;
-        assert ( mgr != NULL );
-
-        /* try as VDB database */
-        rc = VDBManagerOpenDBRead ( mgr, & db, NULL, "%s", spec );
-        if ( rc == 0 )
-        {
-            /* test for cSRA */
-            if ( VDatabaseIsCSRA ( db ) )
-                return NGS_ReadCollectionMakeCSRA ( ctx, db, spec );
-
-            /* non-aligned */
-            return NGS_ReadCollectionMakeVDatabase ( ctx, db, spec );
-        }
-
-        /* try as VDB table */
-        rc = VDBManagerMakeSRASchema ( mgr, & sra_schema );
-        if ( rc != 0 )
-            INTERNAL_ERROR ( xcUnexpected, "failed to make default SRA schema: rc = %R", rc );
-        else
-        {
-            const VTable *tbl;
-            rc = VDBManagerOpenTableRead ( mgr, & tbl, sra_schema, "%s", spec );
-            VSchemaRelease ( sra_schema );
-
-            if ( rc == 0 )
-            {   /* VDB-2641: examine the schema name to make sure this is an SRA table */
-                char ts_buff[1024];
-                rc = VTableTypespec ( tbl, ts_buff, sizeof ( ts_buff ) );
-                if ( rc != 0 )
-                {
-                    INTERNAL_ERROR ( xcUnexpected, "VTableTypespec failed: rc = %R", rc );
-                }
-                else
-                {
-                    const char SRA_PREFIX[] = "NCBI:SRA:";
-                    size_t pref_size = sizeof ( SRA_PREFIX ) - 1;
-                    if ( string_match ( SRA_PREFIX, pref_size, ts_buff, string_size ( ts_buff ), pref_size, NULL ) == pref_size )
-                    {
-                        return NGS_ReadCollectionMakeVTable ( ctx, tbl, spec );
-                    }
-                    INTERNAL_ERROR ( xcUnimplemented, "Cannot open accession '%s' as an SRA table.", spec );
-                }
-            }
-            else
-            {
-                KConfig* kfg = NULL;
-                const KRepositoryMgr* repoMgr = NULL;
-                if ( KConfigMakeLocal ( & kfg, NULL ) != 0 ||
-                     KConfigMakeRepositoryMgrRead ( kfg, & repoMgr ) != 0 ||
-                     KRepositoryMgrHasRemoteAccess ( repoMgr ) )
-                {
-                    INTERNAL_ERROR ( xcUnimplemented, "Cannot open accession '%s'.", spec );
-                }
-                else
-                {
-                    INTERNAL_ERROR ( xcUnimplemented, "Cannot open accession '%s'. Note: remote access is disabled in the configuration.", spec );
-                }
-                KRepositoryMgrRelease ( repoMgr );
-                KConfigRelease ( kfg );
-            }
-            VTableRelease ( tbl );
-        }
-    }
-
-    return NULL;
-}
-
-/* Init
- */
-void NGS_ReadCollectionInit ( ctx_t ctx, NGS_ReadCollection * ref,
-    const NGS_ReadCollection_vt *vt, const char *clsname, const char *instname )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcConstructing );
-    TRY ( NGS_RefcountInit ( ctx, & ref -> dad, & ITF_ReadCollection_vt . dad, & vt -> dad, clsname, instname ) )
-    {
-        assert ( vt -> get_name != NULL );
-        assert ( vt -> get_read_groups != NULL );
-        assert ( vt -> has_read_group != NULL );
-        assert ( vt -> get_read_group != NULL );
-        assert ( vt -> get_references != NULL );
-        assert ( vt -> has_reference != NULL );
-        assert ( vt -> get_reference != NULL );
-        assert ( vt -> get_alignments != NULL );
-        assert ( vt -> get_alignment != NULL );
-        assert ( vt -> get_alignment_count != NULL );
-        assert ( vt -> get_alignment_range != NULL );
-        assert ( vt -> get_reads != NULL );
-        assert ( vt -> get_read != NULL );
-        assert ( vt -> get_read_range != NULL );
-        assert ( vt -> get_read_count != NULL );
-        assert ( vt -> get_statistics != NULL );
-        assert ( vt -> get_frag_blobs != NULL );
-    }
-}
diff --git a/libs/ngs/NGS_ReadCollection.h b/libs/ngs/NGS_ReadCollection.h
deleted file mode 100644
index d67848b..0000000
--- a/libs/ngs/NGS_ReadCollection.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_read_collection_
-#define _h_ngs_read_collection_
-
-typedef struct NGS_ReadCollection NGS_ReadCollection;
-#ifndef NGS_READCOLLECTION
-#define NGS_READCOLLECTION NGS_ReadCollection
-#endif
-
-#ifndef _h_NGS_Refcount_
-    #ifndef NGS_REFCOUNT
-    #define NGS_REFCOUNT NGS_READCOLLECTION
-    #endif
-#include "NGS_Refcount.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct VDatabase;
-struct VTable;
-struct NGS_Read;
-struct NGS_String;
-struct NGS_ReadCollection_v1_vt;
-extern struct NGS_ReadCollection_v1_vt ITF_ReadCollection_vt;
-
-/*--------------------------------------------------------------------------
- * NGS_ReadCollection
- */
-
-/* ToRefcount
- *  inline cast that preserves const
- */
-#define NGS_ReadCollectionToRefcount( self ) \
-    ( & ( self ) -> dad )
-
-/* Release
- *  release reference
- */
-#define NGS_ReadCollectionRelease( self, ctx ) \
-    NGS_RefcountRelease ( NGS_ReadCollectionToRefcount ( self ), ctx )
-
-/* Duplicate
- *  duplicate reference
- */
-#define NGS_ReadCollectionDuplicate( self, ctx ) \
-    ( ( NGS_ReadCollection* ) NGS_RefcountDuplicate ( NGS_ReadCollectionToRefcount ( self ), ctx ) )
-
-/* Make
- *  use provided specification to create an object
- *  any error returns NULL as a result and sets error in ctx
- */
-NGS_ReadCollection * NGS_ReadCollectionMake ( ctx_t ctx, const char * spec );
-
-/* additional make functions
- *  use provided specification to create an object
- *  any error returns NULL as a result and sets error in ctx
- */
-NGS_ReadCollection * NGS_ReadCollectionMakeCSRA ( ctx_t ctx, struct VDatabase const *db, const char * spec );
-NGS_ReadCollection * NGS_ReadCollectionMakeVDatabase ( ctx_t ctx, struct VDatabase const *db, const char * spec );
-NGS_ReadCollection * NGS_ReadCollectionMakeVTable ( ctx_t ctx, struct VTable const *tbl, const char * spec );
-
-
-/* GetName
- */
-struct NGS_String * NGS_ReadCollectionGetName ( NGS_ReadCollection * self, ctx_t ctx );
-
-
-/* READ GROUPS
- */
-struct NGS_ReadGroup * NGS_ReadCollectionGetReadGroups ( NGS_ReadCollection * self, ctx_t ctx );
-bool NGS_ReadCollectionHasReadGroup ( NGS_ReadCollection * self, ctx_t ctx, const char * spec );
-struct NGS_ReadGroup * NGS_ReadCollectionGetReadGroup ( NGS_ReadCollection * self, ctx_t ctx, const char * spec );
-
-
-/* REFERENCES
- */
-struct NGS_Reference * NGS_ReadCollectionGetReferences ( NGS_ReadCollection * self, ctx_t ctx );
-bool NGS_ReadCollectionHasReference ( NGS_ReadCollection * self, ctx_t ctx, const char * spec );
-struct NGS_Reference * NGS_ReadCollectionGetReference ( NGS_ReadCollection * self, ctx_t ctx, const char * spec );
-
-
-/* ALIGNMENTS
- */
-struct NGS_Alignment * NGS_ReadCollectionGetAlignments ( NGS_ReadCollection * self, ctx_t ctx,
-    bool wants_primary, bool wants_secondary );
-struct NGS_Alignment * NGS_ReadCollectionGetAlignment ( NGS_ReadCollection * self, ctx_t ctx, const char * alignmentId );
-
-uint64_t NGS_ReadCollectionGetAlignmentCount ( NGS_ReadCollection * self, ctx_t ctx,
-    bool wants_primary, bool wants_secondary );
-
-struct NGS_Alignment * NGS_ReadCollectionGetAlignmentRange ( NGS_ReadCollection * self, ctx_t ctx, uint64_t first, uint64_t count,
-    bool wants_primary, bool wants_secondary );
-
-/* READS
- */
-struct NGS_Read * NGS_ReadCollectionGetRead ( NGS_ReadCollection * self, ctx_t ctx, const char * readId );
-struct NGS_Read * NGS_ReadCollectionGetReads ( NGS_ReadCollection * self, ctx_t ctx,
-    bool wants_full, bool wants_partial, bool wants_unaligned );
-
-uint64_t NGS_ReadCollectionGetReadCount ( NGS_ReadCollection * self, ctx_t ctx,
-    bool wants_full, bool wants_partial, bool wants_unaligned );
-
-struct NGS_Read * NGS_ReadCollectionGetReadRange ( NGS_ReadCollection * self,
-                                                   ctx_t ctx,
-                                                   uint64_t first,
-                                                   uint64_t count,
-                                                   bool wants_full,
-                                                   bool wants_partial,
-                                                   bool wants_unaligned );
-
-/* STATISTICS
- */
-struct NGS_Statistics* NGS_ReadCollectionGetStatistics ( NGS_ReadCollection * self, ctx_t ctx );
-
-/* FRAGMENT BLOBS
- */
-struct NGS_FragmentBlobIterator* NGS_ReadCollectionGetFragmentBlobs ( NGS_ReadCollection * self, ctx_t ctx );
-
-/*--------------------------------------------------------------------------
- * implementation details
- */
-struct NGS_ReadCollection
-{
-    NGS_Refcount dad;
-};
-
-typedef struct NGS_ReadCollection_vt NGS_ReadCollection_vt;
-struct NGS_ReadCollection_vt
-{
-    NGS_Refcount_vt dad;
-
-    struct NGS_String*      ( * get_name )              ( NGS_READCOLLECTION * self, ctx_t ctx );
-    struct NGS_ReadGroup*   ( * get_read_groups )       ( NGS_READCOLLECTION * self, ctx_t ctx );
-           bool             ( * has_read_group )        ( NGS_READCOLLECTION * self, ctx_t ctx, const char * spec );
-    struct NGS_ReadGroup*   ( * get_read_group )        ( NGS_READCOLLECTION * self, ctx_t ctx, const char * spec );
-    struct NGS_Reference*   ( * get_references )        ( NGS_READCOLLECTION * self, ctx_t ctx );
-           bool             ( * has_reference )         ( NGS_READCOLLECTION * self, ctx_t ctx, const char * spec );
-    struct NGS_Reference*   ( * get_reference )         ( NGS_READCOLLECTION * self, ctx_t ctx, const char * spec );
-    struct NGS_Alignment*   ( * get_alignments )        ( NGS_READCOLLECTION * self, ctx_t ctx, bool wants_primary, bool wants_secondary );
-    struct NGS_Alignment*   ( * get_alignment )         ( NGS_READCOLLECTION * self, ctx_t ctx, const char * alignmentId );
-    uint64_t                ( * get_alignment_count )   ( NGS_READCOLLECTION * self, ctx_t ctx, bool wants_primary, bool wants_secondary );
-    struct NGS_Alignment*   ( * get_alignment_range )   ( NGS_READCOLLECTION * self, ctx_t ctx, uint64_t first, uint64_t count, bool wants_primary, bool wants_secondary );
-    struct NGS_Read*        ( * get_reads )             ( NGS_READCOLLECTION * self, ctx_t ctx, bool wants_full, bool wants_partial, bool wants_unaligned );
-    struct NGS_Read*        ( * get_read )              ( NGS_READCOLLECTION * self, ctx_t ctx, const char * readId );
-    uint64_t                ( * get_read_count )        ( NGS_READCOLLECTION * self, ctx_t ctx,
-        bool wants_full, bool wants_partial, bool wants_unaligned );
-    struct NGS_Read*        ( * get_read_range )        ( NGS_READCOLLECTION * self, ctx_t ctx, uint64_t first, uint64_t count, bool wants_full, bool wants_partial, bool wants_unaligned );
-    struct NGS_Statistics*  ( * get_statistics )        ( NGS_READCOLLECTION * self, ctx_t ctx );
-
-    struct NGS_FragmentBlobIterator *  ( * get_frag_blobs ) ( NGS_READCOLLECTION * self, ctx_t ctx );
-};
-
-
-/* Init
- */
-void NGS_ReadCollectionInit ( ctx_t ctx, NGS_ReadCollection * ref,
-    const NGS_ReadCollection_vt *vt, const char *clsname, const char *instname );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ngs_read_collection_ */
diff --git a/libs/ngs/NGS_ReadGroup.c b/libs/ngs/NGS_ReadGroup.c
deleted file mode 100644
index d073503..0000000
--- a/libs/ngs/NGS_ReadGroup.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "NGS_ReadGroup.h"
-
-#include "NGS_ErrBlock.h"
-#include <ngs/itf/Refcount.h>
-#include <ngs/itf/ReadGroupItf.h>
-
-#include "NGS_String.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <klib/text.h>
-
-#include <vdb/vdb-priv.h>
-
-#include <stddef.h>
-#include <assert.h>
-#include <string.h>
-
-#include <sysalloc.h>
-
-/*--------------------------------------------------------------------------
- * NGS_ReadGroup_v1
- */
-
-#define Self( obj ) \
-    ( ( NGS_ReadGroup* ) ( obj ) )
-    
-static NGS_String_v1 * ITF_ReadGroup_v1_get_name ( const NGS_ReadGroup_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_ReadGroupGetName ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static struct NGS_Statistics_v1 * ITF_ReadGroup_v1_get_stats ( const NGS_ReadGroup_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_Statistics * ret = NGS_ReadGroupGetStatistics ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Statistics_v1 * ) ret;
-}
-
-static bool ITF_ReadGroup_v1_next ( NGS_ReadGroup_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( bool ret = NGS_ReadGroupIteratorNext ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-#undef Self
-
-
-NGS_ReadGroup_v1_vt ITF_ReadGroup_vt =
-{
-    {
-        "NGS_ReadGroup",
-        "NGS_ReadGroup_v1",
-        0,
-        & ITF_Refcount_vt . dad
-    },
-
-    ITF_ReadGroup_v1_get_name,
-    ITF_ReadGroup_v1_get_stats,
-    ITF_ReadGroup_v1_next
-};
-
-
-/*--------------------------------------------------------------------------
- * NGS_ReadGroup
- */
-
-#define VT( self, msg ) \
-    ( ( ( const NGS_ReadGroup_vt* ) ( self ) -> dad . vt ) -> msg )
-
-/* Init
-*/    
-void NGS_ReadGroupInit ( ctx_t ctx, NGS_ReadGroup * self, NGS_ReadGroup_vt * vt, const char *clsname, const char *instname )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcRow, rcConstructing );
-    
-    TRY ( NGS_RefcountInit ( ctx, & self -> dad, & ITF_ReadGroup_vt . dad, & vt -> dad, clsname, instname ) )
-    {
-        assert ( vt -> get_name != NULL );
-        assert ( vt -> get_reads != NULL );
-        assert ( vt -> get_read != NULL );
-        assert ( vt -> get_statistics != NULL );
-        assert ( vt -> get_next != NULL );
-    }
-}
-    
-/* GetName
- */
-struct NGS_String * NGS_ReadGroupGetName ( const NGS_ReadGroup * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get name" );
-    }
-    else
-    {
-        NGS_String* ret = VT ( self, get_name ) ( self, ctx );
-        if ( ret != NULL && string_cmp ( DEFAULT_READGROUP_NAME, 
-                                         strlen ( DEFAULT_READGROUP_NAME ), 
-                                         NGS_StringData ( ret, ctx ),
-                                         NGS_StringSize ( ret, ctx ),
-                                         ( uint32_t ) NGS_StringSize ( ret, ctx ) ) == 0 )
-        {
-            NGS_String* tmp = ret;
-            ret = NGS_StringSubstrOffsetSize ( ret, ctx, 0, 0 );
-            NGS_StringRelease ( tmp, ctx );
-        }
-        return ret;
-    }
-
-    return NULL;
-}
-
-#if READ_GROUP_SUPPORTS_READS
-struct NGS_Read * NGS_ReadGroupGetReads ( const NGS_ReadGroup * self, ctx_t ctx,
-    bool wants_full, bool wants_partial, bool wants_unaligned )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read iterator" );
-    }
-    else
-    {
-        return VT ( self, get_reads ) ( self, ctx, wants_full, wants_partial, wants_unaligned );
-    }
-
-    return NULL;
-}
-
-struct NGS_Read * NGS_ReadGroupGetRead ( const NGS_ReadGroup * self, ctx_t ctx, const char * readId )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get read %ld", readId );
-    }
-    else
-    {
-        return VT ( self, get_read ) ( self, ctx, readId );
-    }
-
-    return NULL;
-}
-#endif
-
-struct NGS_Statistics* NGS_ReadGroupGetStatistics ( const NGS_ReadGroup * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get statistics" );
-    }
-    else
-    {
-        return VT ( self, get_statistics ) ( self, ctx );
-    }
-
-    return NULL;
-}
-
-
-/*--------------------------------------------------------------------------
- * NGS_ReadGroupIterator
- */
-
-bool NGS_ReadGroupIteratorNext ( NGS_ReadGroup* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get next read group " );
-    }
-    else
-    {
-        return VT ( self, get_next) ( self, ctx );
-    }
-
-    return false;
-}
-
diff --git a/libs/ngs/NGS_ReadGroup.h b/libs/ngs/NGS_ReadGroup.h
deleted file mode 100644
index de4ef56..0000000
--- a/libs/ngs/NGS_ReadGroup.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_read_group_
-#define _h_ngs_read_group_
-
-typedef struct NGS_ReadGroup NGS_ReadGroup;
-#ifndef NGS_READGROUP
-#define NGS_READGROUP NGS_ReadGroup
-#endif
-
-#ifndef _h_ngs_refcount_
-#define NGS_REFCOUNT NGS_READGROUP
-#include "NGS_Refcount.h"
-#endif
-
-#define READ_GROUP_SUPPORTS_READS 0
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-
-struct NGS_String;
-struct NGS_Read;
-struct NGS_Statistics;
-struct NGS_ReadGroup_v1_vt;
-extern struct NGS_ReadGroup_v1_vt ITF_ReadGroup_vt;
-
-/*--------------------------------------------------------------------------
- * NGS_ReadGroup
- */
- 
-#define DEFAULT_READGROUP_NAME "default"
-
-/* ToRefcount
- *  inline cast that preserves const
- */
-#define NGS_ReadGroupToRefcount( self ) \
-    ( & ( self ) -> dad )
-
-/* Release
- *  release reference
- */
-#define NGS_ReadGroupRelease( self, ctx ) \
-    NGS_RefcountRelease ( NGS_ReadGroupToRefcount ( self ), ctx )
-
-/* Duplicate
- *  duplicate reference
- */
-#define NGS_ReadGroupDuplicate( self, ctx ) \
-    ( ( NGS_ReadGroup* ) NGS_RefcountDuplicate ( NGS_ReadGroupToRefcount ( self ), ctx ) )
- 
-struct NGS_String* NGS_ReadGroupGetName ( const NGS_ReadGroup * self, ctx_t ctx );
-
-#if READ_GROUP_SUPPORTS_READS
-struct NGS_Read* NGS_ReadGroupGetRead ( const NGS_ReadGroup * self, ctx_t ctx, const char * readId );
-
-struct NGS_Read* NGS_ReadGroupGetReads ( const NGS_ReadGroup * self, ctx_t ctx, bool wants_full, bool wants_partial, bool wants_unaligned );
-#endif
-
-struct NGS_Statistics* NGS_ReadGroupGetStatistics ( const NGS_ReadGroup * self, ctx_t ctx );
-
-/*--------------------------------------------------------------------------
- * NGS_ReadGroupIterator
- */
-
-/* Next
- */
-bool NGS_ReadGroupIteratorNext ( NGS_ReadGroup * self, ctx_t ctx );
-
-
-/*--------------------------------------------------------------------------
- * implementation details
- */
-struct NGS_ReadGroup
-{
-    NGS_Refcount dad;
-};
-
-typedef struct NGS_ReadGroup_vt NGS_ReadGroup_vt;
-struct NGS_ReadGroup_vt
-{
-    NGS_Refcount_vt dad;
-
-    struct NGS_String*      ( * get_name )          ( const NGS_READGROUP * self, ctx_t ctx );
-    struct NGS_Read*        ( * get_reads )         ( const NGS_READGROUP * self, ctx_t ctx, bool wants_full, bool wants_partial, bool wants_unaligned );
-    struct NGS_Read*        ( * get_read )          ( const NGS_READGROUP * self, ctx_t ctx, const char * readId );
-    struct NGS_Statistics*  ( * get_statistics )    ( const NGS_READGROUP * self, ctx_t ctx );
-    bool                    ( * get_next )          ( NGS_READGROUP * self, ctx_t ctx );
-};
-
-/* Init
-*/
-void NGS_ReadGroupInit ( ctx_t ctx, struct NGS_ReadGroup * self, NGS_ReadGroup_vt * vt, const char *clsname, const char *instname );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ngs_read_group_ */
diff --git a/libs/ngs/NGS_Refcount.c b/libs/ngs/NGS_Refcount.c
deleted file mode 100644
index 96890e0..0000000
--- a/libs/ngs/NGS_Refcount.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "NGS_Refcount.h"
-
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <klib/refcount.h>
-
-#include <ngs/itf/Refcount.h>
-#include "NGS_ErrBlock.h"
-
-#include <stdlib.h>
-#include <assert.h>
-
-#include <sysalloc.h>
-
-
-/*--------------------------------------------------------------------------
- * NGS_Refcount
- */
-
-
-/* Whack
- */
-static
-void NGS_RefcountWhack ( NGS_Refcount * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcRefcount, rcDestroying );
-
-    assert ( self -> vt != NULL );
-    assert ( self -> vt -> whack != NULL );
-
-    ( * self -> vt -> whack ) ( self, ctx );
-
-    free ( self );
-}
-
-
-/* Release
- *  release reference
- */
-void NGS_RefcountRelease ( const NGS_Refcount * self, ctx_t ctx )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "NGS_Refcount" ) )
-        {
-        case krefOkay:
-            break;
-        case krefWhack:
-            NGS_RefcountWhack ( ( NGS_Refcount* ) self, ctx );
-            break;
-        case krefNegative:
-        {
-            FUNC_ENTRY ( ctx, rcSRA, rcRefcount, rcReleasing );
-            INTERNAL_ERROR ( xcSelfZombie, "NGS object at %#p", self );
-            atomic32_set ( & ( ( NGS_Refcount* ) self ) -> refcount, 0 );
-            break;
-        }}
-    }
-}
-
-
-/* Duplicate
- *  add 1 to reference count
- *  return original pointer
- */
-void * NGS_RefcountDuplicate ( const NGS_Refcount * self, ctx_t ctx )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "NGS_Refcount" ) )
-        {
-        case krefOkay:
-            break;
-        case krefLimit:
-        {
-            FUNC_ENTRY ( ctx, rcSRA, rcRefcount, rcAttaching );
-            INTERNAL_ERROR ( xcRefcountOutOfBounds, "NGS object at %#p", self );
-            atomic32_set ( & ( ( NGS_Refcount* ) self ) -> refcount, 0 );
-            break;
-        }}
-    }
-
-    return ( void* ) self;
-}
-
-
-/* Init
- */
-void NGS_RefcountInit ( ctx_t ctx, NGS_Refcount * ref,
-    const NGS_VTable * ivt, const NGS_Refcount_vt * vt,
-    const char *clsname, const char *instname )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcRefcount, rcConstructing );
-
-    if ( ref == NULL )
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    else if ( ivt == NULL || vt == NULL )
-        INTERNAL_ERROR ( xcParamNull, "bad vt reference" );
-    else
-    {
-        assert ( vt -> whack != NULL );
-
-        ref -> ivt = ivt;
-        ref -> vt = vt;
-        KRefcountInit ( & ref -> refcount, 1, clsname, "init", instname );
-        ref -> filler = 0;
-    }
-}
-
-
-/*--------------------------------------------------------------------------
- * NGS_Refcount_v1
- */
-
-#define Self( obj ) \
-    ( ( NGS_Refcount* ) ( obj ) )
-
-static
-void ITF_Refcount_v1_release ( NGS_Refcount_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcReleasing );
-    ON_FAIL ( NGS_RefcountRelease ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-}
-
-static
-void* ITF_Refcount_v1_duplicate ( const NGS_Refcount_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcReleasing );
-    ON_FAIL ( void * ref = NGS_RefcountDuplicate ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-
-    return ref;
-}
-
-NGS_Refcount_v1_vt ITF_Refcount_vt =
-{
-    {
-        "NGS_Refcount",
-        "NGS_Refcount_v1"
-    },
-
-    ITF_Refcount_v1_release,
-    ITF_Refcount_v1_duplicate
-};
-
-#undef Self
diff --git a/libs/ngs/NGS_Refcount.h b/libs/ngs/NGS_Refcount.h
deleted file mode 100644
index 9833d8c..0000000
--- a/libs/ngs/NGS_Refcount.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_refcount_
-#define _h_ngs_refcount_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards & externs
- */
-struct NGS_VTable;
-struct NGS_Refcount_v1_vt;
-extern struct NGS_Refcount_v1_vt ITF_Refcount_vt;
-
-
-/*--------------------------------------------------------------------------
- * NGS_Refcount
- */
-typedef struct NGS_Refcount NGS_Refcount;
-
-/* Release
- *  resilient to NULL self
- */
-void NGS_RefcountRelease ( const NGS_Refcount * self, ctx_t ctx );
-
-/* Duplicate
- *  resilient to NULL self
- */
-void * NGS_RefcountDuplicate ( const NGS_Refcount * self, ctx_t ctx );
-
-
-/*--------------------------------------------------------------------------
- * implementation details
- */
-typedef struct NGS_Refcount_vt NGS_Refcount_vt;
-struct NGS_Refcount
-{
-    /* interface vtable from NGS SDK */
-    struct NGS_VTable const * ivt;
-
-    /* internal vtable for NGS polymorphism */
-    const NGS_Refcount_vt * vt;
-
-    /* the counter */
-    KRefcount refcount;
-    uint32_t filler;
-};
-
-#ifndef NGS_REFCOUNT
-#define NGS_REFCOUNT NGS_Refcount
-#endif
-
-struct NGS_Refcount_vt
-{
-    void ( * whack ) ( NGS_REFCOUNT * self, ctx_t ctx );
-};
-
-/* Init
- */
-void NGS_RefcountInit ( ctx_t ctx, NGS_Refcount * ref,
-    struct NGS_VTable const * ivt, const NGS_Refcount_vt * vt,
-    const char *clsname, const char *instname );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ngs_refcount_ */
diff --git a/libs/ngs/NGS_Reference.c b/libs/ngs/NGS_Reference.c
deleted file mode 100644
index 2fb07fe..0000000
--- a/libs/ngs/NGS_Reference.c
+++ /dev/null
@@ -1,916 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-#include "NGS_Reference.h"
-
-#include "NGS_ErrBlock.h"
-#include <ngs/itf/Refcount.h>
-#include <ngs/itf/ReferenceItf.h>
-
-#include "NGS_String.h"
-#include "NGS_ReadCollection.h"
-#include "NGS_Alignment.h"
-#include "NGS_Pileup.h"
-
-#include <sysalloc.h>
-
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-/*--------------------------------------------------------------------------
- * NGS_Reference_v1
- */
-
-#define Self( obj ) \
-    ( ( NGS_Reference* ) ( obj ) )
-    
-static NGS_String_v1 * ITF_Reference_v1_get_cmn_name ( const NGS_Reference_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_String * ret = NGS_ReferenceGetCommonName ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static NGS_String_v1 * ITF_Reference_v1_get_canon_name ( const NGS_Reference_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_String * ret = NGS_ReferenceGetCanonicalName ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static bool ITF_Reference_v1_is_circular ( const NGS_Reference_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( bool ret = NGS_ReferenceGetIsCircular ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static uint64_t ITF_Reference_v1_get_length ( const NGS_Reference_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( uint64_t ret = NGS_ReferenceGetLength ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static NGS_String_v1 * ITF_Reference_v1_get_ref_bases ( const NGS_Reference_v1 * self, NGS_ErrBlock_v1 * err, uint64_t offset, uint64_t length )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_String * ret = NGS_ReferenceGetBases ( Self ( self ), ctx, offset, length ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static NGS_String_v1 * ITF_Reference_v1_get_ref_chunk ( const NGS_Reference_v1 * self, NGS_ErrBlock_v1 * err, uint64_t offset, uint64_t length )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_String * ret = NGS_ReferenceGetChunk ( Self ( self ), ctx, offset, length ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static uint64_t ITF_Reference_v1_get_align_count ( const NGS_Reference_v1 * self, NGS_ErrBlock_v1 * err, bool wants_primary, bool wants_secondary )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( uint64_t ret = NGS_ReferenceGetAlignmentCount ( Self ( self ), ctx, wants_primary, wants_secondary ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static struct NGS_Alignment_v1 * ITF_Reference_v1_get_alignment ( const NGS_Reference_v1 * self, NGS_ErrBlock_v1 * err, const char * alignmentId )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_Alignment * ret = NGS_ReferenceGetAlignment ( Self ( self ), ctx, alignmentId ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Alignment_v1 * ) ret;
-}
-
-static struct NGS_Alignment_v1 * ITF_Reference_v1_get_alignments ( const NGS_Reference_v1 * self, NGS_ErrBlock_v1 * err, bool wants_primary, bool wants_secondary )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_Alignment * ret = NGS_ReferenceGetAlignments ( Self ( self ), ctx, wants_primary, wants_secondary ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Alignment_v1 * ) ret;
-}
-
-#if _DEBUGGING
-static
-uint32_t align_flags_to_filters ( uint32_t flags )
-{
-    static bool tested_bits;
-    if ( ! tested_bits )
-    {
-        assert ( NGS_ReferenceAlignFlags_pass_bad >> 2 == NGS_AlignmentFilterBits_pass_bad );
-        assert ( NGS_ReferenceAlignFlags_pass_dups >> 2 == NGS_AlignmentFilterBits_pass_dups );
-        assert ( NGS_ReferenceAlignFlags_min_map_qual >> 2 == NGS_AlignmentFilterBits_min_map_qual );
-        assert ( NGS_ReferenceAlignFlags_max_map_qual >> 2 == NGS_AlignmentFilterBits_max_map_qual);
-        assert ( NGS_ReferenceAlignFlags_no_wraparound >> 2 == NGS_AlignmentFilterBits_no_wraparound);
-        assert ( NGS_ReferenceAlignFlags_start_within_window >> 2 == NGS_AlignmentFilterBits_start_within_window);
-        tested_bits = true;
-    }
-    return flags >> 2;
-}
-#else
-#define align_flags_to_filters( flags ) \
-    ( ( flags ) >> 2 )
-#endif
-
-static struct NGS_Alignment_v1 * ITF_Reference_v1_get_filtered_alignments ( const NGS_Reference_v1 * self, 
-                                                                            NGS_ErrBlock_v1 * err, 
-                                                                            enum NGS_ReferenceAlignFlags flags, 
-                                                                            int32_t map_qual )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    
-    bool wants_primary = ( flags & NGS_ReferenceAlignFlags_wants_primary ) != 0;
-    bool wants_secondary = ( flags & NGS_ReferenceAlignFlags_wants_secondary ) != 0;
-    uint32_t filters = align_flags_to_filters ( flags );
-    
-    /*TODO: reject unimplemented flags */
-    ON_FAIL ( struct NGS_Alignment * ret = NGS_ReferenceGetFilteredAlignments ( Self ( self ), ctx,
-        wants_primary, wants_secondary, filters, map_qual ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Alignment_v1 * ) ret;
-}
-
-static struct NGS_Alignment_v1 * ITF_Reference_v1_get_align_slice ( const NGS_Reference_v1 * self, NGS_ErrBlock_v1 * err, int64_t start, uint64_t length, bool wants_primary, bool wants_secondary )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_Alignment * ret = NGS_ReferenceGetAlignmentSlice ( Self ( self ), ctx, start, length, wants_primary, wants_secondary ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Alignment_v1 * ) ret;
-}
-
-static struct NGS_Alignment_v1 * ITF_Reference_v1_get_filtered_align_slice ( const NGS_Reference_v1 * self, 
-                                                                             NGS_ErrBlock_v1 * err, 
-                                                                             int64_t start, 
-                                                                             uint64_t length, 
-                                                                             enum NGS_ReferenceAlignFlags flags, 
-                                                                             int32_t map_qual )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    
-    bool wants_primary = ( flags & NGS_ReferenceAlignFlags_wants_primary ) != 0;
-    bool wants_secondary = ( flags & NGS_ReferenceAlignFlags_wants_secondary ) != 0;
-    uint32_t filters = align_flags_to_filters ( flags );
-    
-    /*TODO: reject unimplemented flags */
-    ON_FAIL ( struct NGS_Alignment * ret = NGS_ReferenceGetFilteredAlignmentSlice ( Self ( self ), ctx, start, length, wants_primary, wants_secondary, filters, map_qual ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Alignment_v1 * ) ret;
-}
-
-static struct NGS_Pileup_v1 * ITF_Reference_v1_get_pileups ( const NGS_Reference_v1 * self, NGS_ErrBlock_v1 * err, bool wants_primary, bool wants_secondary )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_Pileup * ret = NGS_ReferenceGetPileups( Self ( self ), ctx, wants_primary, wants_secondary ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Pileup_v1 * ) ret;
-}
-
-static struct NGS_Pileup_v1 * ITF_Reference_v1_get_pileup_slice ( const NGS_Reference_v1 * self, NGS_ErrBlock_v1 * err, int64_t start, uint64_t length, bool wants_primary, bool wants_secondary )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_Pileup * ret = NGS_ReferenceGetPileupSlice ( Self ( self ), ctx, start, length, wants_primary, wants_secondary ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Pileup_v1 * ) ret;
-}
-
-static bool ITF_Reference_v1_next ( NGS_Reference_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( bool ret = NGS_ReferenceIteratorNext ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-#if _DEBUGGING
-static
-uint32_t pileup_flags_to_filters ( uint32_t flags )
-{
-    static bool tested_bits;
-    if ( ! tested_bits )
-    {
-        assert ( NGS_ReferenceAlignFlags_pass_bad >> 2 == NGS_PileupFilterBits_pass_bad );
-        assert ( NGS_ReferenceAlignFlags_pass_dups >> 2 == NGS_PileupFilterBits_pass_dups );
-        assert ( NGS_ReferenceAlignFlags_min_map_qual >> 2 == NGS_PileupFilterBits_min_map_qual );
-        assert ( NGS_ReferenceAlignFlags_max_map_qual >> 2 == NGS_PileupFilterBits_max_map_qual);
-        assert ( NGS_ReferenceAlignFlags_no_wraparound >> 2 == NGS_PileupFilterBits_no_wraparound);
-        assert ( NGS_ReferenceAlignFlags_start_within_window >> 2 == NGS_PileupFilterBits_start_within_window);
-        tested_bits = true;
-    }
-    return flags >> 2;
-}
-#else
-#define pileup_flags_to_filters( flags ) \
-    ( ( flags ) >> 2 )
-#endif
-
-static struct NGS_Pileup_v1 * ITF_Reference_v1_get_filtered_pileups ( const NGS_Reference_v1 * self, NGS_ErrBlock_v1 * err,
-    uint32_t flags, int32_t map_qual )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-
-    bool wants_primary = ( flags & NGS_ReferenceAlignFlags_wants_primary ) != 0;
-    bool wants_secondary = ( flags & NGS_ReferenceAlignFlags_wants_secondary ) != 0;
-    uint32_t filters = pileup_flags_to_filters ( flags );
-
-    ON_FAIL ( struct NGS_Pileup * ret = NGS_ReferenceGetFilteredPileups ( Self ( self ), ctx, wants_primary, wants_secondary, filters, map_qual ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Pileup_v1 * ) ret;
-}
-
-static struct NGS_Pileup_v1 * ITF_Reference_v1_get_filtered_pileup_slice ( const NGS_Reference_v1 * self, NGS_ErrBlock_v1 * err,
-    int64_t start, uint64_t length, uint32_t flags, int32_t map_qual )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-
-    bool wants_primary = ( flags & NGS_ReferenceAlignFlags_wants_primary ) != 0;
-    bool wants_secondary = ( flags & NGS_ReferenceAlignFlags_wants_secondary ) != 0;
-    uint32_t filters = pileup_flags_to_filters ( flags );
-
-    ON_FAIL ( struct NGS_Pileup * ret = NGS_ReferenceGetFilteredPileupSlice ( Self ( self ), ctx, start, length, wants_primary, wants_secondary, filters, map_qual ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( struct NGS_Pileup_v1 * ) ret;
-}
-
-
-#undef Self
-
-
-NGS_Reference_v1_vt ITF_Reference_vt =
-{
-    {
-        "NGS_Reference",
-        "NGS_Reference_v1",
-        3,
-        & ITF_Refcount_vt . dad
-    },
-
-    /* 1.0 */
-    ITF_Reference_v1_get_cmn_name,
-    ITF_Reference_v1_get_canon_name,
-    ITF_Reference_v1_is_circular,
-    ITF_Reference_v1_get_length,
-    ITF_Reference_v1_get_ref_bases,
-    ITF_Reference_v1_get_ref_chunk,
-    ITF_Reference_v1_get_alignment,
-    ITF_Reference_v1_get_alignments,
-    ITF_Reference_v1_get_align_slice,
-    ITF_Reference_v1_get_pileups,
-    ITF_Reference_v1_get_pileup_slice,
-    ITF_Reference_v1_next,
-
-    /* 1.1 */
-    ITF_Reference_v1_get_filtered_pileups,
-    ITF_Reference_v1_get_filtered_pileup_slice,
-
-    /* 1.2 */
-    ITF_Reference_v1_get_align_count,
-    
-    /* 1.3 */
-    ITF_Reference_v1_get_filtered_alignments,
-    ITF_Reference_v1_get_filtered_align_slice
-};
-
-
-/*--------------------------------------------------------------------------
- * NGS_Reference
- */
-#define VT( self, msg ) \
-    ( ( ( const NGS_Reference_vt* ) ( self ) -> dad . vt ) -> msg )
-    
-/* Init
-*/
-void NGS_ReferenceInit ( ctx_t ctx, 
-                         struct NGS_Reference * self, 
-                         NGS_Reference_vt * vt, 
-                         const char *clsname, 
-                         const char *instname, 
-                         struct NGS_ReadCollection * coll )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcRow, rcConstructing );
-    
-    assert ( self );
-    assert ( vt );
-    
-    TRY ( NGS_RefcountInit ( ctx, & self -> dad, & ITF_Reference_vt . dad, & vt -> dad, clsname, instname ) )
-    {
-        assert ( vt -> get_common_name    != NULL );
-        assert ( vt -> get_canonical_name != NULL );
-        assert ( vt -> get_is_circular    != NULL );
-        assert ( vt -> get_length         != NULL );
-        assert ( vt -> get_bases          != NULL );
-        assert ( vt -> get_chunk          != NULL );
-        assert ( vt -> get_alignment      != NULL );
-        assert ( vt -> get_alignments     != NULL );
-        assert ( vt -> get_count          != NULL );
-        assert ( vt -> get_slice          != NULL );
-        assert ( vt -> get_pileups        != NULL );
-        assert ( vt -> get_pileup_slice   != NULL );
-        assert ( vt -> get_statistics     != NULL );
-        assert ( vt -> next               != NULL );
-    }
-    
-    assert ( coll );
-    self -> coll = NGS_ReadCollectionDuplicate ( coll, ctx );
-}
-
-void NGS_ReferenceWhack( NGS_Reference * self, ctx_t ctx )
-{
-    NGS_ReadCollectionRelease ( self -> coll, ctx );
-}
-                         
-/*--------------------------------------------------------------------------
- * NGS_ReferenceIterator
- */
-
-struct NGS_String * NGS_ReferenceGetCommonName ( NGS_Reference * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get common name" );
-    }
-    else
-    {
-        return VT ( self, get_common_name) ( self, ctx );
-    }
-
-    return NULL;
-}
-
-/* GetCanonicalName
- */
-struct NGS_String * NGS_ReferenceGetCanonicalName ( NGS_Reference * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get canonical name" );
-    }
-    else
-    {
-        return VT ( self, get_canonical_name ) ( self, ctx );
-    }
-
-    return NULL;
-}
-
-/* GetisCircular
- */
-bool NGS_ReferenceGetIsCircular ( const NGS_Reference * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get circular" );
-    }
-    else
-    {
-        return VT ( self, get_is_circular ) ( self, ctx );
-    }
-
-    return false;
-}
-
-/* GetLength
- */
-uint64_t NGS_ReferenceGetLength ( NGS_Reference * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get reference length" );
-    }
-    else
-    {
-        return VT ( self, get_length ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-
-/* GetBases
- */
-struct NGS_String * NGS_ReferenceGetBases ( NGS_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get reference bases" );
-    }
-    else
-    {
-        return VT ( self, get_bases ) ( self, ctx, offset, size );
-    }
-
-    return NULL;
-}
-
-
-/* GetChunk
- */
-struct NGS_String * NGS_ReferenceGetChunk ( NGS_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get reference chunk" );
-    }
-    else
-    {
-        return VT ( self, get_chunk ) ( self, ctx, offset, size );
-    }
-
-    return NULL;
-}
-
-
-/* GetAlignment
- */
-struct NGS_Alignment* NGS_ReferenceGetAlignment ( NGS_Reference * self, ctx_t ctx, const char * alignmentId )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get alignment" );
-    }
-    else
-    {
-        return VT ( self, get_alignment ) ( self, ctx, alignmentId );
-    }
-
-    return NULL;
-}
-
-
-/* GetAlignments
- */
-struct NGS_Alignment* NGS_ReferenceGetAlignments ( NGS_Reference * self, ctx_t ctx, bool wants_primary, bool wants_secondary )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get alignments" );
-    }
-    else
-    {
-        // alignment iterator does not filter out bad reads and duplicates by default
-        const uint32_t filters = NGS_AlignmentFilterBits_pass_bad | NGS_AlignmentFilterBits_pass_dups;
-        return VT ( self, get_alignments ) ( self, ctx, wants_primary, wants_secondary, filters, 0 );
-    }
-
-    return NULL;
-}
-
-/* GetFilteredAlignments
- */
-struct NGS_Alignment* NGS_ReferenceGetFilteredAlignments ( NGS_Reference * self, ctx_t ctx,
-    bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get alignments" );
-    }
-    else
-    {
-        return VT ( self, get_alignments ) ( self, ctx, wants_primary, wants_secondary, filters, map_qual );
-    }
-
-    return NULL;
-}
-
-/* GetAlignmentCount
- */
-uint64_t NGS_ReferenceGetAlignmentCount ( NGS_Reference * self, ctx_t ctx, bool wants_primary, bool wants_secondary )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get alignment count" );
-    }
-    else
-    {
-        return VT ( self, get_count ) ( self, ctx, wants_primary, wants_secondary );
-    }
-
-    return 0;
-}
-
-/* GetAlignmentSlice
- */
-struct NGS_Alignment* NGS_ReferenceGetAlignmentSlice ( NGS_Reference * self, 
-                                                       ctx_t ctx, 
-                                                       uint64_t offset, 
-                                                       uint64_t size,
-                                                       bool wants_primary, 
-                                                       bool wants_secondary )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get alignment slice" );
-    }
-    else
-    {
-        // alignment iterator does not filter out bad reads and duplicates by default
-        const uint32_t filters = NGS_AlignmentFilterBits_pass_bad | NGS_AlignmentFilterBits_pass_dups;
-        return VT ( self, get_slice ) ( self, ctx, offset, size, wants_primary, wants_secondary, filters, 0 );
-    }
-
-    return NULL;
-}
-
-/* GetFilteredAlignmentSlice
- */
-struct NGS_Alignment* NGS_ReferenceGetFilteredAlignmentSlice ( NGS_Reference * self, 
-    ctx_t ctx, uint64_t offset, uint64_t size, bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get alignment slice" );
-    }
-    else
-    {
-        return VT ( self, get_slice ) ( self, ctx, offset, size, wants_primary, wants_secondary, filters, map_qual );
-    }
-
-    return NULL;
-}
-
-/* GetPileups
- */
-struct NGS_Pileup* NGS_ReferenceGetPileups ( NGS_Reference * self, ctx_t ctx, bool wants_primary, bool wants_secondary )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get pileups" );
-    }
-    else
-    {
-        // pileup filters out bad reads and duplicates by default
-        return VT ( self, get_pileups ) ( self, ctx, wants_primary, wants_secondary, 0, 0 );
-    }
-
-    return NULL;
-}
-
-/* GetFilteredPileups
- */
-struct NGS_Pileup* NGS_ReferenceGetFilteredPileups ( NGS_Reference * self, ctx_t ctx, bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get pileups" );
-    }
-    else
-    {
-        return VT ( self, get_pileups ) ( self, ctx, wants_primary, wants_secondary, filters, map_qual );
-    }
-
-    return NULL;
-}
-
-/* GetPileupSlice
- */
-struct NGS_Pileup* NGS_ReferenceGetPileupSlice ( NGS_Reference * self, 
-                                                 ctx_t ctx, 
-                                                 uint64_t offset, 
-                                                 uint64_t size,
-                                                 bool wants_primary, 
-                                                 bool wants_secondary ) 
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get pileups" );
-    }
-    else
-    {
-        return VT ( self, get_pileup_slice ) ( self, ctx, offset, size, wants_primary, wants_secondary, 0, 0 );
-    }
-
-    return NULL;
-}
-
-/* GetFilteredPileupSlice
- */
-struct NGS_Pileup* NGS_ReferenceGetFilteredPileupSlice ( NGS_Reference * self, 
-                                                         ctx_t ctx, 
-                                                         uint64_t offset, 
-                                                         uint64_t size,
-                                                         bool wants_primary, 
-                                                         bool wants_secondary,
-                                                         uint32_t filters,
-                                                         int32_t map_qual ) 
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get pileups" );
-    }
-    else
-    {
-        return VT ( self, get_pileup_slice ) ( self, ctx, offset, size, wants_primary, wants_secondary, filters, map_qual );
-    }
-
-    return NULL;
-}
-
-/* GetStatistics
- */
-struct NGS_Statistics* NGS_ReferenceGetStatistics ( const NGS_Reference * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get statistics" );
-    }
-    else
-    {
-        return VT ( self, get_statistics ) ( self, ctx );
-    }
-
-    return NULL;
-}
-
-
-/*--------------------------------------------------------------------------
- * NGS_ReferenceIterator
- */
- 
-/* Next
- */
-bool NGS_ReferenceIteratorNext ( NGS_Reference * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get next reference " );
-    }
-    else
-    {
-        return VT ( self, next ) ( self, ctx );
-    }
-
-    return false;
-}
-
- /* NullReference
- * will error out on any call
- */
-static void Null_ReferenceWhack ( NGS_Reference * self, ctx_t ctx )
-{
-    NGS_ReadCollectionRelease ( self -> coll, ctx );
-}
-
-static NGS_String * Null_ReferenceGetCommonName ( NGS_Reference * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Reference accessed" );
-    return NULL;
-}
-
-static NGS_String * Null_ReferenceGetCanonicalName ( NGS_Reference * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Reference accessed" );
-    return NULL;
-}
-
-static bool Null_ReferenceGetIsCircular ( const NGS_Reference * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Reference accessed" );
-    return false;
-}
-
-static uint64_t Null_ReferenceGetLength ( NGS_Reference * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Reference accessed" );
-    return 0;
-}
-
-static struct NGS_String * Null_ReferenceGetBases ( NGS_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Reference accessed" );
-    return NULL;
-}
-
-static struct NGS_String * Null_ReferenceGetChunk ( NGS_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Reference accessed" );
-    return NULL;
-}
-
-static struct NGS_Alignment * Null_ReferenceGetAlignment ( NGS_Reference * self, ctx_t ctx, const char * alignmentId )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Reference accessed" );
-    return NULL;
-}
-
-static struct NGS_Alignment * Null_ReferenceGetAlignments ( NGS_Reference * self, ctx_t ctx,
-    bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Reference accessed" );
-    return NULL;
-}
-
-static uint64_t Null_ReferenceGetAlignmentCount ( const NGS_Reference * self, ctx_t ctx, bool wants_primary, bool wants_secondary )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Reference accessed" );
-    return 0;
-}
-
-static struct NGS_Alignment* Null_ReferenceGetAlignmentSlice ( NGS_Reference * self, 
-                                                               ctx_t ctx, 
-                                                               uint64_t offset, 
-                                                               uint64_t size, 
-                                                               bool wants_primary, 
-                                                               bool wants_secondary,
-                                                               uint32_t filters,
-                                                               int32_t map_qual)
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Reference accessed" );
-    return NULL;
-}
-
-static struct NGS_Pileup * Null_ReferenceGetPileups ( NGS_Reference * self, ctx_t ctx, bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Reference accessed" );
-    return NULL;
-}
-
-static struct NGS_Pileup * Null_ReferenceGetPileupSlice ( NGS_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size, bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Reference accessed" );
-    return NULL;
-}
-
-struct NGS_Statistics* Null_ReferenceGetStatistics ( const NGS_Reference * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing);
-    INTERNAL_ERROR ( xcSelfNull, "NULL Reference accessed" );
-    return NULL;
-}
-
-static bool Null_ReferenceIteratorNext ( NGS_Reference * self, ctx_t ctx )
-{
-    return false;
-}
-
-
-static NGS_Reference_vt Null_Reference_vt_inst =
-{
-    /* NGS_Refcount */
-    { Null_ReferenceWhack },
-    
-    /* NGS_Reference */
-    Null_ReferenceGetCommonName,
-    Null_ReferenceGetCanonicalName,
-    Null_ReferenceGetIsCircular,
-    Null_ReferenceGetLength,
-    Null_ReferenceGetBases,
-    Null_ReferenceGetChunk,
-    Null_ReferenceGetAlignment,
-    Null_ReferenceGetAlignments,
-    Null_ReferenceGetAlignmentCount,
-    Null_ReferenceGetAlignmentSlice,
-    Null_ReferenceGetPileups,
-    Null_ReferenceGetPileupSlice,
-    Null_ReferenceGetStatistics,
-    
-    /* NGS_ReferenceIterator */
-    Null_ReferenceIteratorNext
-};
- 
-struct NGS_Reference * NGS_ReferenceMakeNull ( ctx_t ctx, struct NGS_ReadCollection * coll )
- {
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    NGS_Reference * ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating an empty NGS_ReferenceIterator" );
-    else
-    {
-        TRY ( NGS_ReferenceInit ( ctx, ref, & Null_Reference_vt_inst, "NGS_Reference", "NullReference", coll ) )
-        {
-            return ref;
-        }
-
-        free ( ref );
-    }
-
-    return NULL;
- }
diff --git a/libs/ngs/NGS_Reference.h b/libs/ngs/NGS_Reference.h
deleted file mode 100644
index 3e02e24..0000000
--- a/libs/ngs/NGS_Reference.h
+++ /dev/null
@@ -1,214 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_reference_
-#define _h_ngs_reference_
-
-typedef struct NGS_Reference NGS_Reference;
-#ifndef NGS_REFERENCE
-#define NGS_REFERENCE NGS_Reference
-#endif
-
-#ifndef _h_ngs_refcount_
-#define NGS_REFCOUNT NGS_REFERENCE
-#include "NGS_Refcount.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct VCursor;
-struct NGS_ReadCollection;
-struct NGS_Alignment;
-struct NGS_Pileup;
-struct NGS_Reference_v1_vt;
-extern struct NGS_Reference_v1_vt ITF_Reference_vt;
-
-/*--------------------------------------------------------------------------
- * NGS_Reference
- */
-
-/* ToRefcount
- *  inline cast that preserves const
- */
-#define NGS_ReferenceToRefcount( self ) \
-    ( & ( self ) -> dad )
-
-/* Release
- *  release reference
- */
-#define NGS_ReferenceRelease( self, ctx ) \
-    NGS_RefcountRelease ( NGS_ReferenceToRefcount ( self ), ctx )
-
-/* Duplicate
- *  duplicate reference
- */
-#define NGS_ReferenceDuplicate( self, ctx ) \
-    ( ( NGS_Reference* ) NGS_RefcountDuplicate ( NGS_ReferenceToRefcount ( self ), ctx ) )
-    
-/* GetCommonName
- */
-struct NGS_String * NGS_ReferenceGetCommonName ( NGS_Reference * self, ctx_t ctx );
-
-/* GetCanonicalName
- */
-struct NGS_String * NGS_ReferenceGetCanonicalName ( NGS_Reference * self, ctx_t ctx );
-
-/* GetisCircular
- */
-bool NGS_ReferenceGetIsCircular ( const NGS_Reference * self, ctx_t ctx );
-
-/* GetLength
- */
-uint64_t NGS_ReferenceGetLength ( NGS_Reference * self, ctx_t ctx );
-
-/* GetBases
- */
-struct NGS_String * NGS_ReferenceGetBases ( NGS_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size );
-
-/* GetChunk
- */
-struct NGS_String * NGS_ReferenceGetChunk ( NGS_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size );
-
-/* GetAlignment
- */
-struct NGS_Alignment* NGS_ReferenceGetAlignment ( NGS_Reference * self, ctx_t ctx, const char * alignmentId );
-
-/* GetAlignments
- */
-struct NGS_Alignment* NGS_ReferenceGetAlignments ( NGS_Reference * self, ctx_t ctx, bool wants_primary, bool wants_secondary );
-
-/* GetFilteredAlignments
- */
-struct NGS_Alignment* NGS_ReferenceGetFilteredAlignments ( NGS_Reference * self, ctx_t ctx,
-    bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual );
-
-/* GetAlignmentCount
- */
-uint64_t NGS_ReferenceGetAlignmentCount ( NGS_Reference * self, ctx_t ctx, bool wants_primary, bool wants_secondary );
-
-/* GetAlignmentSlice
- */
-struct NGS_Alignment* NGS_ReferenceGetAlignmentSlice ( NGS_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size, bool wants_primary, bool wants_secondary );
-
-/* GetFilteredAlignmentSlice
- */
-struct NGS_Alignment* NGS_ReferenceGetFilteredAlignmentSlice ( NGS_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size,
-    bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual );
-
-/* GetPileups
- */
-struct NGS_Pileup* NGS_ReferenceGetPileups ( NGS_Reference * self, ctx_t ctx, bool wants_primary, bool wants_secondary );
-
-/* GetFilteredPileups
- */
-struct NGS_Pileup* NGS_ReferenceGetFilteredPileups ( NGS_Reference * self, ctx_t ctx,
-    bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual );
-
-/* GetPileupSlice
- */
-struct NGS_Pileup* NGS_ReferenceGetPileupSlice ( NGS_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size,
-    bool wants_primary, bool wants_secondary );
-
-/* GetFilteredPileupSlice
- */
-struct NGS_Pileup* NGS_ReferenceGetFilteredPileupSlice ( NGS_Reference * self, ctx_t ctx, uint64_t offset, uint64_t size,
-    bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual );
-
-/* GetStatistics
- */
-struct NGS_Statistics* NGS_ReferenceGetStatistics ( const NGS_Reference * self, ctx_t ctx );
-
-
-/*--------------------------------------------------------------------------
- * NGS_ReferenceIterator
- */
- 
-/* Next
- */
-bool NGS_ReferenceIteratorNext ( NGS_Reference * self, ctx_t ctx );
- 
-/*--------------------------------------------------------------------------
- * implementation details
- */
-struct NGS_Reference
-{
-    NGS_Refcount dad;
-    
-    struct NGS_ReadCollection * coll;
-};
-
-typedef struct NGS_Reference_vt NGS_Reference_vt;
-struct NGS_Reference_vt
-{
-    NGS_Refcount_vt dad;
-    
-    struct NGS_String *     ( * get_common_name    ) ( NGS_REFERENCE * self, ctx_t ctx );
-    struct NGS_String *     ( * get_canonical_name ) ( NGS_REFERENCE * self, ctx_t ctx );
-    bool                    ( * get_is_circular    ) ( const NGS_REFERENCE * self, ctx_t ctx );
-    uint64_t                ( * get_length         ) ( NGS_REFERENCE * self, ctx_t ctx );
-    struct NGS_String *     ( * get_bases          ) ( NGS_REFERENCE * self, ctx_t ctx, uint64_t offset, uint64_t size );
-    struct NGS_String *     ( * get_chunk          ) ( NGS_REFERENCE * self, ctx_t ctx, uint64_t offset, uint64_t size );
-    struct NGS_Alignment*   ( * get_alignment      ) ( NGS_REFERENCE * self, ctx_t ctx, const char * alignmentId );
-    struct NGS_Alignment*   ( * get_alignments     ) ( NGS_REFERENCE * self, ctx_t ctx,
-        bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual );
-    uint64_t                ( * get_count          ) ( const NGS_REFERENCE * self, ctx_t ctx, bool wants_primary, bool wants_secondary );
-    struct NGS_Alignment*   ( * get_slice          ) ( NGS_REFERENCE * self, ctx_t ctx, uint64_t offset, uint64_t size,
-        bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual );
-    struct NGS_Pileup*      ( * get_pileups        ) ( NGS_REFERENCE * self, ctx_t ctx, bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual );
-    struct NGS_Pileup*      ( * get_pileup_slice   ) ( NGS_REFERENCE * self, ctx_t ctx, uint64_t offset, uint64_t size,
-        bool wants_primary, bool wants_secondary, uint32_t filters, int32_t map_qual );
-    struct NGS_Statistics*  ( * get_statistics     ) ( const NGS_REFERENCE * self, ctx_t ctx );
-    bool                    ( * next               ) ( NGS_REFERENCE * self, ctx_t ctx );
-};
-
-/* Init
-*/
-void NGS_ReferenceInit ( ctx_t ctx, 
-                         struct NGS_Reference * self, 
-                         NGS_Reference_vt * vt, 
-                         const char *clsname, 
-                         const char *instname, 
-                         struct NGS_ReadCollection * coll );
-                         
-/* Whack
-*/                         
-void NGS_ReferenceWhack ( NGS_Reference * self, ctx_t ctx );
-                         
-/* NullReference
- * will error out on any call
- */
-struct NGS_Reference * NGS_ReferenceMakeNull ( ctx_t ctx, struct NGS_ReadCollection * coll );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ngs_reference_ */
diff --git a/libs/ngs/NGS_ReferenceSequence.c b/libs/ngs/NGS_ReferenceSequence.c
deleted file mode 100644
index f398873..0000000
--- a/libs/ngs/NGS_ReferenceSequence.c
+++ /dev/null
@@ -1,282 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-#include "NGS_ReferenceSequence.h"
-
-#include "NGS_ErrBlock.h"
-#include <ngs/itf/Refcount.h>
-#include <ngs/itf/ReferenceSequenceItf.h>
-
-#include "NGS_String.h"
-
-#include <sysalloc.h>
-
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <klib/rc.h>
-
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-
-
-/*--------------------------------------------------------------------------
- * NGS_ReferenceSequence_v1
- */
-
-#define Self( obj ) \
-    ( ( NGS_ReferenceSequence* ) ( obj ) )
-    
-static NGS_String_v1 * ITF_ReferenceSequence_v1_get_canon_name ( const NGS_ReferenceSequence_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_String * ret = NGS_ReferenceSequenceGetCanonicalName ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static bool ITF_ReferenceSequence_v1_is_circular ( const NGS_ReferenceSequence_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( bool ret = NGS_ReferenceSequenceGetIsCircular ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static uint64_t ITF_ReferenceSequence_v1_get_length ( const NGS_ReferenceSequence_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( uint64_t ret = NGS_ReferenceSequenceGetLength ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static NGS_String_v1 * ITF_ReferenceSequence_v1_get_ref_bases ( const NGS_ReferenceSequence_v1 * self, NGS_ErrBlock_v1 * err, uint64_t offset, uint64_t length )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_String * ret = NGS_ReferenceSequenceGetBases ( Self ( self ), ctx, offset, length ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static NGS_String_v1 * ITF_ReferenceSequence_v1_get_ref_chunk ( const NGS_ReferenceSequence_v1 * self, NGS_ErrBlock_v1 * err, uint64_t offset, uint64_t length )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( struct NGS_String * ret = NGS_ReferenceSequenceGetChunk ( Self ( self ), ctx, offset, length ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-#undef Self
-
-
-NGS_ReferenceSequence_v1_vt ITF_ReferenceSequence_vt =
-{
-    {
-        "NGS_ReferenceSequence",
-        "NGS_ReferenceSequence_v1",
-        2,
-        & ITF_Refcount_vt . dad
-    },
-
-    /* 1.0 */
-    ITF_ReferenceSequence_v1_get_canon_name,
-    ITF_ReferenceSequence_v1_is_circular,
-    ITF_ReferenceSequence_v1_get_length,
-    ITF_ReferenceSequence_v1_get_ref_bases,
-    ITF_ReferenceSequence_v1_get_ref_chunk,
-};
-
-
-/*--------------------------------------------------------------------------
- * NGS_ReferenceSequence
- */
-#define VT( self, msg ) \
-    ( ( ( const NGS_ReferenceSequence_vt* ) ( self ) -> dad . vt ) -> msg )
-    
-/* Make
- *  use provided specification to create an object
- *  any error returns NULL as a result and sets error in ctx
- */
-NGS_ReferenceSequence * NGS_ReferenceSequenceMake ( ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcOpening );
-
-    if ( spec == NULL )
-        USER_ERROR ( xcParamNull, "NULL reference sequence specification string" );
-    else if ( spec [ 0 ] == 0 )
-        USER_ERROR ( xcStringEmpty, "empty reference sequence specification string" );
-    else
-    {
-        NGS_ReferenceSequence* ref = NGS_ReferenceSequenceMakeSRA ( ctx, spec );
-
-        if ( FAILED() &&
-            (GetRCState ( ctx->rc ) == rcNotFound || GetRCState ( ctx->rc ) == rcUnexpected) )
-        {
-            CLEAR();
-            assert ( ref == NULL );
-            ref = NGS_ReferenceSequenceMakeEBI ( ctx, spec );
-        }
-
-        return ref;
-    }
-
-    return NULL;
-}
-
-
-/* Init
-*/
-void NGS_ReferenceSequenceInit ( ctx_t ctx, 
-                         struct NGS_ReferenceSequence * self, 
-                         NGS_ReferenceSequence_vt * vt, 
-                         const char *clsname, 
-                         const char *instname )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcRow, rcConstructing );
-    
-    assert ( self );
-    assert ( vt );
-    
-    TRY ( NGS_RefcountInit ( ctx, & self -> dad, & ITF_ReferenceSequence_vt . dad, & vt -> dad, clsname, instname ) )
-    {
-        assert ( vt -> get_canonical_name != NULL );
-        assert ( vt -> get_is_circular    != NULL );
-        assert ( vt -> get_length         != NULL );
-        assert ( vt -> get_bases          != NULL );
-        assert ( vt -> get_chunk          != NULL );
-    }
-}
-
-
-/* GetCanonicalName
- */
-struct NGS_String * NGS_ReferenceSequenceGetCanonicalName ( NGS_ReferenceSequence * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get canonical name" );
-    }
-    else
-    {
-        return VT ( self, get_canonical_name ) ( self, ctx );
-    }
-
-    return NULL;
-}
-
-/* GetisCircular
- */
-bool NGS_ReferenceSequenceGetIsCircular ( NGS_ReferenceSequence const* self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get circular" );
-    }
-    else
-    {
-        return VT ( self, get_is_circular ) ( self, ctx );
-    }
-
-    return false;
-}
-
-/* GetLength
- */
-uint64_t NGS_ReferenceSequenceGetLength ( NGS_ReferenceSequence * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get reference length" );
-    }
-    else
-    {
-        return VT ( self, get_length ) ( self, ctx );
-    }
-
-    return 0;
-}
-
-
-/* GetBases
- */
-struct NGS_String * NGS_ReferenceSequenceGetBases ( NGS_ReferenceSequence * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get reference bases" );
-    }
-    else
-    {
-        return VT ( self, get_bases ) ( self, ctx, offset, size );
-    }
-
-    return NULL;
-}
-
-
-/* GetChunk
- */
-struct NGS_String * NGS_ReferenceSequenceGetChunk ( NGS_ReferenceSequence * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get reference chunk" );
-    }
-    else
-    {
-        return VT ( self, get_chunk ) ( self, ctx, offset, size );
-    }
-
-    return NULL;
-}
-
diff --git a/libs/ngs/NGS_ReferenceSequence.h b/libs/ngs/NGS_ReferenceSequence.h
deleted file mode 100644
index cbfe1b1..0000000
--- a/libs/ngs/NGS_ReferenceSequence.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_NGS_ReferenceSequencesequence_
-#define _h_NGS_ReferenceSequencesequence_
-
-typedef struct NGS_ReferenceSequence NGS_ReferenceSequence;
-#ifndef NGS_REFERENCESEQUENCE
-#define NGS_REFERENCESEQUENCE NGS_ReferenceSequence
-#endif
-
-#ifndef _h_ngs_refcount_
-#define NGS_REFCOUNT NGS_REFERENCESEQUENCE
-#include "NGS_Refcount.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct NGS_ReferenceSequence_v1_vt;
-extern struct NGS_ReferenceSequence_v1_vt ITF_ReferenceSequence_vt;
-
-/*--------------------------------------------------------------------------
- * NGS_ReferenceSequence
- */
-
-/* ToRefcount
- *  inline cast that preserves const
- */
-#define NGS_ReferenceSequenceToRefcount( self ) \
-    ( & ( self ) -> dad )
-
-/* Release
- *  release reference
- */
-#define NGS_ReferenceSequenceRelease( self, ctx ) \
-    NGS_RefcountRelease ( NGS_ReferenceSequenceToRefcount ( self ), ctx )
-
-/* Duplicate
- *  duplicate reference
- */
-#define NGS_ReferenceSequenceDuplicate( self, ctx ) \
-    ( ( NGS_ReferenceSequence* ) NGS_RefcountDuplicate ( NGS_ReferenceSequenceToRefcount ( self ), ctx ) )
-    
-/* GetCanonicalName
- */
-struct NGS_String * NGS_ReferenceSequenceGetCanonicalName ( NGS_ReferenceSequence* self, ctx_t ctx );
-
-/* GetisCircular
- */
-bool NGS_ReferenceSequenceGetIsCircular ( NGS_ReferenceSequence const* self, ctx_t ctx );
-
-/* GetLength
- */
-uint64_t NGS_ReferenceSequenceGetLength ( NGS_ReferenceSequence* self, ctx_t ctx );
-
-/* GetBases
- */
-struct NGS_String * NGS_ReferenceSequenceGetBases ( NGS_ReferenceSequence * self, ctx_t ctx, uint64_t offset, uint64_t size );
-
-/* GetChunk
- */
-struct NGS_String * NGS_ReferenceSequenceGetChunk ( NGS_ReferenceSequence * self, ctx_t ctx, uint64_t offset, uint64_t size );
-
-/*--------------------------------------------------------------------------
- * implementation details
- */
-struct NGS_ReferenceSequence
-{
-    NGS_Refcount dad;
-};
-
-typedef struct NGS_ReferenceSequence_vt NGS_ReferenceSequence_vt;
-struct NGS_ReferenceSequence_vt
-{
-    NGS_Refcount_vt dad;
-    
-    struct NGS_String * ( * get_canonical_name ) ( NGS_REFERENCESEQUENCE * self, ctx_t ctx );
-    bool                ( * get_is_circular    ) ( NGS_REFERENCESEQUENCE const* self, ctx_t ctx );
-    uint64_t            ( * get_length         ) ( NGS_REFERENCESEQUENCE * self, ctx_t ctx );
-    struct NGS_String * ( * get_bases          ) ( NGS_REFERENCESEQUENCE * self, ctx_t ctx, uint64_t offset, uint64_t size );
-    struct NGS_String * ( * get_chunk          ) ( NGS_REFERENCESEQUENCE * self, ctx_t ctx, uint64_t offset, uint64_t size );
-};
-
-/* Make
- *  use provided specification to create an object
- *  any error returns NULL as a result and sets error in ctx
- */
-NGS_ReferenceSequence * NGS_ReferenceSequenceMake ( ctx_t ctx, const char * spec );
-
-/* additional make functions
- *  use provided specification to create an object
- *  any error returns NULL as a result and sets error in ctx
- */
-NGS_ReferenceSequence * NGS_ReferenceSequenceMakeSRA ( ctx_t ctx, const char * spec );
-NGS_ReferenceSequence * NGS_ReferenceSequenceMakeEBI ( ctx_t ctx, const char * spec );
-
-/* Init
-*/
-void NGS_ReferenceSequenceInit ( ctx_t ctx, 
-                         struct NGS_ReferenceSequence * self, 
-                         NGS_ReferenceSequence_vt * vt, 
-                         const char *clsname, 
-                         const char *instname );
-                         
-                        
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_NGS_ReferenceSequencesequence_ */
diff --git a/libs/ngs/NGS_Statistics.c b/libs/ngs/NGS_Statistics.c
deleted file mode 100644
index fc7f796..0000000
--- a/libs/ngs/NGS_Statistics.c
+++ /dev/null
@@ -1,335 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "NGS_Statistics.h"
-
-#include "NGS_ErrBlock.h"
-#include <ngs/itf/Refcount.h>
-#include <ngs/itf/StatisticsItf.h>
-
-#include "NGS_String.h"
-
-#include <klib/text.h>
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <sysalloc.h>
-
-/*--------------------------------------------------------------------------
- * NGS_Statistics_v1
- */
-
-#define Self( obj ) \
-    ( ( NGS_Statistics* ) ( obj ) )
-    
-static
-uint32_t NGS_Statistics_v1_get_type ( const NGS_Statistics_v1 * self, NGS_ErrBlock_v1 * err, const char * path )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( uint32_t ret = NGS_StatisticsGetValueType ( Self ( self ), ctx, path ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static
-NGS_String_v1 * NGS_Statistics_v1_as_string ( const NGS_Statistics_v1 * self, NGS_ErrBlock_v1 * err, const char * path )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( NGS_String * ret = NGS_StatisticsGetAsString ( Self ( self ), ctx, path ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-static
-int64_t NGS_Statistics_v1_as_I64 ( const NGS_Statistics_v1 * self, NGS_ErrBlock_v1 * err, const char * path )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( int64_t ret = NGS_StatisticsGetAsI64( Self ( self ), ctx, path ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static
-uint64_t NGS_Statistics_v1_as_U64 ( const NGS_Statistics_v1 * self, NGS_ErrBlock_v1 * err, const char * path )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( uint64_t ret = NGS_StatisticsGetAsU64( Self ( self ), ctx, path ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static
-double NGS_Statistics_v1_as_F64 ( const NGS_Statistics_v1 * self, NGS_ErrBlock_v1 * err, const char * path )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    ON_FAIL ( double ret = NGS_StatisticsGetAsDouble( Self ( self ), ctx, path ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-    return ret;
-}
-
-static
-NGS_String_v1 * NGS_Statistics_v1_next_path ( const NGS_Statistics_v1 * self, NGS_ErrBlock_v1 * err, const char * path )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRefcount, rcAccessing );
-    NGS_String * ret;
-    const char* new_path;
-    ON_FAIL ( bool more = NGS_StatisticsNextPath( Self ( self ), ctx, path, & new_path ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-    
-    if ( more )
-    {
-        ON_FAIL ( ret = NGS_StringMakeCopy ( ctx, new_path, string_size ( new_path ) ) )
-        {
-            NGS_ErrBlockThrow ( err, ctx );
-        }
-    }
-    else
-    {
-        ON_FAIL ( ret = NGS_StringMake ( ctx, "", 0 ) )
-        {
-            NGS_ErrBlockThrow ( err, ctx );
-        }
-    }
-
-    CLEAR ();
-    return ( NGS_String_v1 * ) ret;
-}
-
-#undef Self
-
-
-NGS_Statistics_v1_vt ITF_Statistics_vt =
-{
-    {
-        "NGS_Statistics",
-        "NGS_Statistics_v1",
-        0,
-        & ITF_Refcount_vt . dad
-    },
-
-    NGS_Statistics_v1_get_type,
-    NGS_Statistics_v1_as_string,
-    NGS_Statistics_v1_as_I64,
-    NGS_Statistics_v1_as_U64,
-    NGS_Statistics_v1_as_F64,
-    NGS_Statistics_v1_next_path
-};
-
-/*--------------------------------------------------------------------------
- * NGS_Statistics
- */
-
-#define VT( self, msg ) \
-    ( ( ( const NGS_Statistics_vt* ) ( self ) -> dad . vt ) -> msg )
-    
-void NGS_StatisticsInit ( ctx_t ctx, struct NGS_Statistics * self, NGS_Statistics_vt * vt, const char *clsname, const char *instname )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcRow, rcConstructing );
-    
-    TRY ( NGS_RefcountInit ( ctx, & self -> dad, & ITF_Statistics_vt . dad, & vt -> dad, clsname, instname ) )
-    {
-        assert ( VT ( self, get_value_type ) != NULL );
-        assert ( VT ( self, get_as_string ) != NULL );
-        assert ( VT ( self, get_as_int64 ) != NULL );
-        assert ( VT ( self, get_as_uint64 ) != NULL );
-        assert ( VT ( self, get_as_double ) != NULL );
-        assert ( VT ( self, next_path ) != NULL );
-        assert ( VT ( self, add_string ) != NULL );
-        assert ( VT ( self, add_int64  ) != NULL );
-        assert ( VT ( self, add_uint64 ) != NULL );
-        assert ( VT ( self, add_double ) != NULL );
-    }
-}
-   
-
-uint32_t NGS_StatisticsGetValueType ( const NGS_Statistics * self, ctx_t ctx, const char * path )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get value type" );
-    }
-    else
-    {
-        return VT ( self, get_value_type ) ( self, ctx, path );
-    }
-
-    return NGS_StatisticValueType_Undefined;
-}
-    
-struct NGS_String* NGS_StatisticsGetAsString ( const NGS_Statistics * self, ctx_t ctx, const char * path )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get value type" );
-    }
-    else
-    {
-        return VT ( self, get_as_string ) ( self, ctx, path );
-    }
-
-    return NULL;
-}
-
-int64_t NGS_StatisticsGetAsI64 ( const NGS_Statistics * self, ctx_t ctx, const char * path )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get value as I64" );
-    }
-    else
-    {
-        return VT ( self, get_as_int64 ) ( self, ctx, path );
-    }
-
-    return 0;
-}
-
-uint64_t NGS_StatisticsGetAsU64 ( const NGS_Statistics * self, ctx_t ctx, const char * path )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get value as U64" );
-    }
-    else
-    {
-        return VT ( self, get_as_uint64) ( self, ctx, path );
-    }
-
-    return 0;
-}
-
-double NGS_StatisticsGetAsDouble ( const NGS_Statistics * self, ctx_t ctx, const char * path )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get value as Double" );
-    }
-    else
-    {
-        return VT ( self, get_as_double) ( self, ctx, path );
-    }
-
-    return 0.0;
-}
-
-bool NGS_StatisticsNextPath ( const NGS_Statistics * self, ctx_t ctx, const char * path, const char ** next )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to get next path" );
-    }
-    else
-    {
-        return VT ( self, next_path ) ( self, ctx, path, next );
-    }
-
-    return false;
-}
-
-void NGS_StatisticsAddString ( NGS_Statistics * self, ctx_t ctx, const char * path, const NGS_String * value )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to add '%s'", path );
-    }
-    else
-    {
-        VT ( self, add_string ) ( self, ctx, path, value );
-    }
-}
-
-void NGS_StatisticsAddI64 ( NGS_Statistics * self, ctx_t ctx, const char * path, int64_t value )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to add '%s'", path );
-    }
-    else
-    {
-        VT ( self, add_int64 ) ( self, ctx, path, value );
-    }
-}
-
-void NGS_StatisticsAddU64 ( NGS_Statistics * self, ctx_t ctx, const char * path, uint64_t value )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to add '%s'", path );
-    }
-    else
-    {
-        VT ( self, add_uint64 ) ( self, ctx, path, value );
-    }
-}
-
-void NGS_StatisticsAddDouble ( NGS_Statistics * self, ctx_t ctx, const char * path, double value )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "failed to add '%s'", path );
-    }
-    else
-    {
-        VT ( self, add_double ) ( self, ctx, path, value );
-    }
-}
-
-
diff --git a/libs/ngs/NGS_Statistics.h b/libs/ngs/NGS_Statistics.h
deleted file mode 100644
index 782f5f7..0000000
--- a/libs/ngs/NGS_Statistics.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_statistics_
-#define _h_ngs_statistics_
-
-typedef struct NGS_Statistics NGS_Statistics;
-#ifndef NGS_STATISTICS
-#define NGS_STATISTICS NGS_Statistics
-#endif
-
-#ifndef _h_ngs_refcount_
-#define NGS_REFCOUNT NGS_STATISTICS
-#include "NGS_Refcount.h"
-#endif
-
-#define READ_GROUP_SUPPORTS_READS 0
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-
-struct NGS_String;
-struct NGS_ReadGroup_v1_vt;
-extern struct NGS_ReadGroup_v1_vt ITF_ReadGroup_vt;
-
-/*--------------------------------------------------------------------------
- * NGS_Statistics
- */
- 
-/* ToRefcount
- *  inline cast that preserves const
- */
-#define NGS_StatisticsToRefcount( self ) \
-    ( & ( self ) -> dad )
-
-/* Release
- *  release reference
- */
-#define NGS_StatisticsRelease( self, ctx ) \
-    NGS_RefcountRelease ( NGS_StatisticsToRefcount ( self ), ctx )
-
-/* Duplicate
- *  duplicate reference
- */
-#define NGS_StatisticsDuplicate( self, ctx ) \
-    ( ( NGS_Statistics* ) NGS_RefcountDuplicate ( NGS_StatisticsToRefcount ( self ), ctx ) )
- 
-    
-uint32_t NGS_StatisticsGetValueType ( const NGS_Statistics * self, ctx_t ctx, const char * path );
-    
-struct NGS_String* NGS_StatisticsGetAsString ( const NGS_Statistics * self, ctx_t ctx, const char * path );
-
-int64_t NGS_StatisticsGetAsI64 ( const NGS_Statistics * self, ctx_t ctx, const char * path );
-
-uint64_t NGS_StatisticsGetAsU64 ( const NGS_Statistics * self, ctx_t ctx, const char * path );
-
-double NGS_StatisticsGetAsDouble ( const NGS_Statistics * self, ctx_t ctx, const char * path );
-
-bool NGS_StatisticsNextPath ( const NGS_Statistics * self, ctx_t ctx, const char * path, const char ** next );
-
-void NGS_StatisticsAddString ( NGS_Statistics * self, ctx_t ctx, const char * path, const struct NGS_String * value );
-
-void NGS_StatisticsAddI64 ( NGS_Statistics * self, ctx_t ctx, const char * path, int64_t value );
-
-void NGS_StatisticsAddU64 ( NGS_Statistics * self, ctx_t ctx, const char * path, uint64_t value );
- 
-void NGS_StatisticsAddDouble ( NGS_Statistics * self, ctx_t ctx, const char * path, double value );
-
-/*--------------------------------------------------------------------------
- * implementation details
- */
-struct NGS_Statistics
-{
-    NGS_Refcount dad;
-};
-
-enum NGS_StatisticValueType
-{
-    NGS_StatisticValueType_Undefined,
-    NGS_StatisticValueType_String,
-    /* other int types ? */
-    NGS_StatisticValueType_Int64,
-    NGS_StatisticValueType_UInt64,
-    NGS_StatisticValueType_Real
-};
-
-typedef struct NGS_Statistics_vt NGS_Statistics_vt;
-struct NGS_Statistics_vt
-{
-    NGS_Refcount_vt dad;
-    
-    uint32_t ( * get_value_type ) ( const NGS_STATISTICS * self, ctx_t ctx, const char * path ); 
-    
-    struct NGS_String * ( * get_as_string ) ( const NGS_STATISTICS * self, ctx_t ctx, const char * path ); 
-    int64_t             ( * get_as_int64 )  ( const NGS_STATISTICS * self, ctx_t ctx, const char * path ); 
-    uint64_t            ( * get_as_uint64 ) ( const NGS_STATISTICS * self, ctx_t ctx, const char * path ); 
-    double              ( * get_as_double ) ( const NGS_STATISTICS * self, ctx_t ctx, const char * path ); 
-    
-    bool ( * next_path  ) ( const NGS_STATISTICS * self, ctx_t ctx, const char * path, const char ** new_path );     
-    
-    void ( * add_string )   ( NGS_STATISTICS * self, ctx_t ctx, const char * path, const struct NGS_String * value );
-    void ( * add_int64 )    ( NGS_STATISTICS * self, ctx_t ctx, const char * path, int64_t value );
-    void ( * add_uint64 )   ( NGS_STATISTICS * self, ctx_t ctx, const char * path, uint64_t value );
-    void ( * add_double )   ( NGS_STATISTICS * self, ctx_t ctx, const char * path, double value );
-};
-
-/* Init
-*/
-void NGS_StatisticsInit ( ctx_t ctx, struct NGS_Statistics * self, NGS_Statistics_vt * vt, const char *clsname, const char *instname );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ngs_statistics_ */
diff --git a/libs/ngs/NGS_String.c b/libs/ngs/NGS_String.c
deleted file mode 100644
index 8202c76..0000000
--- a/libs/ngs/NGS_String.c
+++ /dev/null
@@ -1,413 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "NGS_String.h"
-
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/text.h>
-
-#include "NGS_ErrBlock.h"
-#include <ngs/itf/Refcount.h>
-#include <ngs/itf/StringItf.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#include <sysalloc.h>
-
-
-/*--------------------------------------------------------------------------
- * NGS_String
- *  a reference into NGS string data
- *  reference counted, temporary
- */
-struct NGS_String
-{
-    NGS_Refcount dad;   
-
-    NGS_String * orig;
-    char * owned;
-    const char * str;
-    size_t size;
-};
-
-
-/* Whack
- */
-static
-void NGS_StringWhack ( NGS_String * self, ctx_t ctx )
-{
-    if ( self -> orig != NULL )
-        NGS_StringRelease ( self -> orig, ctx );
-    if ( self -> owned != NULL )
-        free ( self -> owned );
-}
-
-
-/* Release
- *  release reference
- */
-void NGS_StringRelease ( const NGS_String * self, ctx_t ctx )
-{
-    if ( self != NULL )
-    {
-        NGS_RefcountRelease ( & self -> dad, ctx );
-    }
-}
-
-
-/* Duplicate
- *  duplicate reference
- */
-NGS_String * NGS_StringDuplicate ( const NGS_String * self, ctx_t ctx )
-{
-    if ( self != NULL )
-    {
-        NGS_RefcountDuplicate( & self -> dad, ctx );
-    }
-    return ( NGS_String* ) self;
-}
-
-
-/* Invalidate
- */
-void NGS_StringInvalidate ( NGS_String * self, ctx_t ctx )
-{
-    if ( self != NULL )
-    {
-        NGS_String * orig = self -> orig;
-        self -> size = 0;
-        self -> str = "";
-        if ( orig != NULL )
-        {
-            self -> orig = NULL;
-            NGS_StringRelease ( orig, ctx );
-        }
-    }
-}
-
-
-/* Data
- *  retrieve data pointer
- */
-const char * NGS_StringData ( const NGS_String * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcString, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "attempt to access NULL NGS_String" );
-        return NULL;
-    }
-
-    return self -> str;
-}
-
-
-/* Size
- *  retrieve data length
- */
-size_t NGS_StringSize ( const NGS_String * self, ctx_t ctx )
-{
-    if ( self == NULL )
-    {
-        FUNC_ENTRY ( ctx, rcSRA, rcString, rcAccessing );
-        INTERNAL_ERROR ( xcSelfNull, "attempt to access NULL NGS_String" );
-        return 0;
-    }
-
-    return self -> size;
-}
-
-
-/* Substr
- *  create a new allocation
- *  returns a substring, either at a simple offset
- *  or at an offset with length
- */
-NGS_String * NGS_StringSubstrOffset ( const NGS_String * self, ctx_t ctx, uint64_t offset )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcString, rcAccessing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "attempt to access NULL NGS_String" );
-    else if ( offset == 0 )
-        return NGS_StringDuplicate ( self, ctx );
-    else
-    {
-        NGS_String * dup;
-
-        if ( offset > ( uint64_t ) self -> size )
-            offset = self -> size;
-
-        TRY ( dup = NGS_StringMake ( ctx, self -> str + offset, self -> size - ( size_t ) offset ) )
-        {
-            dup -> orig = NGS_StringDuplicate ( self, ctx );
-            return dup;
-        }
-    }
-
-    return NULL;
-}
-
-NGS_String * NGS_StringSubstrOffsetSize ( const NGS_String * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcString, rcAccessing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "attempt to access NULL NGS_String" );
-    else if ( offset == 0 && size >= ( uint64_t ) self -> size )
-        return NGS_StringDuplicate ( self, ctx );
-    else
-    {
-        NGS_String * dup;
-
-        if ( offset > ( uint64_t ) self -> size )
-        {
-            offset = self -> size;
-            size = 0;
-        }
-        else
-        {
-            uint64_t remainder = ( uint64_t ) self -> size - offset;
-            if ( size > remainder )
-                size = remainder;
-        }
-
-        TRY ( dup = NGS_StringMake ( ctx, self -> str + offset, ( size_t ) size ) )
-        {
-            dup -> orig = NGS_StringDuplicate ( self, ctx );
-            return dup;
-        }
-    }
-
-    return NULL;
-}
-
-static NGS_Refcount_vt NGS_String_vt =
-{
-    NGS_StringWhack
-};
-
-
-/*--------------------------------------------------------------------------
- * NGS_String_v1
- */
-
-#define Self( obj ) \
-    ( ( NGS_String* ) ( obj ) )
-
-static
-const char* ITF_String_v1_data ( const NGS_String_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcString, rcAccessing );
-    ON_FAIL ( const char * data = NGS_StringData ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-
-    return data;
-}
-
-static
-size_t ITF_String_v1_size ( const NGS_String_v1 * self, NGS_ErrBlock_v1 * err )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcString, rcAccessing );
-    ON_FAIL ( size_t size = NGS_StringSize ( Self ( self ), ctx ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-
-    return size;
-}
-
-static
-NGS_String_v1* ITF_String_v1_substr ( const NGS_String_v1 * self, NGS_ErrBlock_v1 * err,
-    size_t offset, size_t size )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcString, rcAccessing );
-    ON_FAIL ( NGS_String * ref = NGS_StringSubstrOffsetSize ( Self ( self ), ctx, offset, size ) )
-    {
-        NGS_ErrBlockThrow ( err, ctx );
-    }
-
-    CLEAR ();
-
-    return ( NGS_String_v1* ) ref;
-}
-
-#undef Self
-
-static NGS_String_v1_vt ITF_String_vt =
-{
-    {
-        "NGS_String",
-        "NGS_String_v1",
-        0,
-        & ITF_Refcount_vt . dad
-    },
-
-    ITF_String_v1_data,
-    ITF_String_v1_size,
-    ITF_String_v1_substr
-};
-
-/*--------------------------------------------------------------------------
- * NGS_String
- */
-
-/* Make
- */
-NGS_String * NGS_StringMake ( ctx_t ctx, const char * data, size_t size )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcString, rcConstructing );
-
-    if ( data == NULL )
-        USER_ERROR ( xcParamNull, "bad input" );
-    else
-    {
-        NGS_String * ref = calloc ( 1, sizeof * ref );
-        if ( ref == NULL )
-            SYSTEM_ERROR ( xcNoMemory, "allocating %zu bytes", ( size_t ) sizeof * ref );
-        else
-        {
-            TRY ( NGS_RefcountInit ( ctx, & ref -> dad, & ITF_String_vt . dad, & NGS_String_vt, "NGS_String", "" ) )
-            {
-                ref -> str = data;
-                ref -> size = size;
-                return ref;
-            }
-
-            free ( ref );
-        }
-    }
-
-    return NULL;
-}
-
-NGS_String * NGS_StringMakeOwned ( ctx_t ctx, char * owned_data, size_t size )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcString, rcConstructing );
-
-    if ( owned_data == NULL )
-        USER_ERROR ( xcParamNull, "bad input" );
-    else
-    {
-        NGS_String * ref = calloc ( 1, sizeof * ref );
-        if ( ref == NULL )
-            SYSTEM_ERROR ( xcNoMemory, "allocating %zu bytes", ( size_t ) sizeof * ref );
-        else
-        {
-            TRY ( NGS_RefcountInit ( ctx, & ref -> dad, & ITF_String_vt . dad, & NGS_String_vt, "NGS_String", "" ) )
-            {
-                ref -> owned = owned_data;
-                ref -> str = owned_data;
-                ref -> size = size;
-                return ref;
-            }
-
-            free ( ref );
-        }
-    }
-
-    return NULL;
-}
-
-NGS_String * NGS_StringMakeCopy ( ctx_t ctx, const char * temp_data, size_t size )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcString, rcConstructing );
-
-    if ( temp_data == NULL )
-        USER_ERROR ( xcParamNull, "bad input" );
-    else
-    {
-        char * owned_data = malloc ( size + 1 );
-        if ( owned_data == NULL )
-            SYSTEM_ERROR ( xcNoMemory, "allocating %zu bytes", size + 1 );
-        else
-        {
-            memcpy ( owned_data, temp_data, size );
-            owned_data [ size ] = 0;
-            {
-                TRY ( NGS_String * ref = NGS_StringMakeOwned ( ctx, owned_data, size ) )
-                {
-                    return ref;
-                }
-            }
-
-            free ( owned_data );
-        }
-    }
-
-    return NULL;
-}
-
-NGS_String * NGS_StringFromI64 ( ctx_t ctx, int64_t i )
-{
-    size_t size;
-    char buffer [ 128 ];
-    rc_t rc = string_printf ( buffer, sizeof buffer, & size, "%ld", i );
-
-    if ( rc == 0 )
-        return NGS_StringMakeCopy ( ctx, buffer, size );
-
-    INTERNAL_ERROR ( xcStringCreateFailed, "rc = %R", rc );
-    return NULL;
-}
-
-
-/* MakeNULTerminatedString
- *  allocates a NUL-terminated version of self
- *  returned value should be disposed using "free()"
- */
-char * NGS_StringMakeNULTerminatedString ( const NGS_String * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcString, rcConstructing );
-
-    char * nul_term = NULL;
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcSelfNull, "attempt to access NULL NGS_String" );
-    else
-    {
-        size_t dst_size = self -> size + 1;
-        nul_term = malloc ( dst_size );
-        if ( nul_term == NULL )
-            SYSTEM_ERROR ( xcNoMemory, "allocating %zu bytes", dst_size );
-        else
-            string_copy ( nul_term, dst_size, self -> str, self -> size );
-    }
-
-    return nul_term;
-}
diff --git a/libs/ngs/NGS_String.h b/libs/ngs/NGS_String.h
deleted file mode 100644
index 5378b11..0000000
--- a/libs/ngs/NGS_String.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_string_
-#define _h_ngs_string_
-
-typedef struct NGS_String NGS_String;
-#ifndef NGS_STRING
-#define NGS_STRING NGS_String
-#endif
-
-#ifndef _h_ngs_refcount_
-#define NGS_REFCOUNT NGS_STRING
-#include "NGS_Refcount.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * NGS_String
- *  a reference into NGS string data
- *  reference counted, temporary
- */
-
-
-/* Make
- */
-NGS_String * NGS_StringMake ( ctx_t ctx, const char * data, size_t size );
-NGS_String * NGS_StringMakeOwned ( ctx_t ctx, char * owned_data, size_t size );
-NGS_String * NGS_StringMakeCopy ( ctx_t ctx, const char * temp_data, size_t size );
-
-/* TEMPORARY */
-NGS_String * NGS_StringFromI64 ( ctx_t ctx, int64_t i );
-
-/* Invalidate
- */
-void NGS_StringInvalidate ( NGS_String * self, ctx_t ctx );
-
-
-/* Release
- *  release reference
- */
-void NGS_StringRelease ( const NGS_String * self, ctx_t ctx );
-
-
-/* Duplicate
- *  duplicate reference
- */
-NGS_String * NGS_StringDuplicate ( const NGS_String * self, ctx_t ctx );
-
-
-/* Data
- *  retrieve data pointer
- */
-const char * NGS_StringData ( const NGS_String * self, ctx_t ctx );
-
-
-/* Size
- *  retrieve data size
- */
-size_t NGS_StringSize ( const NGS_String * self, ctx_t ctx );
-
-
-/* Substr
- *  create a new allocation
- *  returns a substring, either at a simple offset
- *  or at an offset with size
- */
-NGS_String * NGS_StringSubstrOffset ( const NGS_String * self, ctx_t ctx, uint64_t offset );
-NGS_String * NGS_StringSubstrOffsetSize ( const NGS_String * self, ctx_t ctx, uint64_t offset, uint64_t size );
-
-
-/* MakeNULTerminatedString
- *  allocates a NUL-terminated version of self
- *  returned value should be disposed using "free()"
- */
-char * NGS_StringMakeNULTerminatedString ( const NGS_String * self, ctx_t ctx );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_ngs_string_ */
diff --git a/libs/ngs/NOTES.txt b/libs/ngs/NOTES.txt
deleted file mode 100644
index 8af89a1..0000000
--- a/libs/ngs/NOTES.txt
+++ /dev/null
@@ -1,128 +0,0 @@
-NGS LIBRARY NOTES
-
-C++ Structure:
-
-The "interface" file is in interfaces/ngs/*.hpp and is named to be consistent
-with Java conventions in order to avoid potential problems with IDEs, etc. So
-for the interface class "ngs::Read", it is in its own file <ngs/Read.hpp>.
-
-C++ "interfaces" in this library are actually references, or "smart pointers".
-They must NEVER have a virtual table or be allocated, although they do support
-copy constructors and assignment operators in general. They have no inline
-methods because the interface is being proposed as a standard for several
-institutions to implement, meaning we can't imply ANYTHING about the underlying
-implementation.
-
-The implementation of the C++ interfaces is private to NCBI, and is currently
-defined in this directory. So for example, <ngs/Read.hpp> is imlemented here as
-Read.cpp.
-
-The main purpose of methods in Read.cpp is to simply dispatch the message to a
-ReadItf object, which is polymorphic. Philosophically the other job of these
-methods ( Read.cpp ) is to wrap allocations in references ( smart pointers ),
-e.g. creating a String or StringRef from a StringItf*, etc. So far, I've just
-been letting the polymorphic dispatcher class throw the exceptions.
-
-The smart pointer's reference to the opaque polymorphic interface class is
-forward declared in the <ngs/Read.hpp> as "typedef class ReadItf * ReadRef;" or
-something like that. The interface class is opened within this directory by
-ReadItf.hpp. This declaration is entirely used for type punning, so again there
-cannot be any virtual methods.
-
-The methods of the ReadItf will be happy to return pointers now, since they'll
-be wrapped by the Read class' methods. ReadItf.cpp is also responsible for
-re-dispatching, but serves the additional and important function of establishing
-thread context for the C code upon entry, and checking for C exceptions before
-returning.
-
-QUICK SUMMARY:
-  ReadItf.cpp methods
-    - establish C context
-    - redispatch to C code, casting "this" pointer to C type
-    - throw appropriate C++ exceptions upon error detection
-    - return values from C code, type-punned as appropriate
-
-  NGS_Read.c methods
-    - directly implement interface to VDB, or
-    - redispatch through C vtables
-	- provides iteration methods
-
-  ReadItf.hpp
-    - declares the main C++ wrapper methods, generally mirroring public
-      interface
-    - declare a pair of casting operators I've been calling "self()"
-    - can never be directly instantiated, so always use the macro
-      "NON_INSTANTIABLE(classname)" to prevent this.
-    - generally inherit from Refcount<classname>
-
-  NGS_Read.h
-    - forward declare C version of *Itf, e.g. NGS_Read == ReadItf
-    - the actual struct definition includes NGS_Refcount dad as first thing.
-      the structure type has to be an NGS_Refcount to inherit from Refcount<T>.
-    - sometimes will describe the C vtable
-	- also declares iteration functions, more later
-
-  Read.cpp
-    - dispatch to self, which is a ReadItf*
-	- allow exceptions to flow through from ReadItf
-	- provide type wrappers on pointers returned from ReadItf
-
-
-It's a little over-complicated, as always, but it satisfies many simultaneous
-requirements. There's a lot I'd rather put higher up in C++, such as
-polymorphism, where I'd declare ReadItf as an abstract class and put the calls
-to VDB in a C++ ReadImpl.cpp or whatever.
-
-  Read.cpp -> vt ( ReadItf ) -> <impl>.cpp -> VDB
-
-
-But doing so would leave Java native methods out of the picture, since they call
-through to C code.
-
-  Read.java -> ReadItf.java -> JNI_Read.c -+
-                                           |
-                                           +-> NGS_Read.c -> vt -> <impl>.c -> VDB
-                                           |
-  Read.cpp -> ReadItf.cpp -----------------+
-
-
-==========================
-ITERATORS
-
-The iterators are, as you have seen, sub-classes of the interface they are
-iterating upon, which removes the need to allocate objects in Java. So there is
-generally a <ngs/Read.hpp> and <ngs/ReadIterator.hpp>.
-
-For implementation, there should be ReadIterator.cpp, but the iteration methods
-are included under ReadItf.hpp (or should be). This is because sending an
-iteration message to an object is package private, so only the ReadIterator
-should be able to send such a message, and it should know that it holds an
-object capable of iterating.
-
-ReadItf is a type-punned version of NGS_Read, so the latter also should declare
-its iteration methods.
-
-An implementation that cannot iterate should mark an error in C code with
-INTERNAL_ERROR macro. The *Itf version that called it should turn this into an
-ErrorMsg or subclass thereof, because there should be no way that the message
-was ever sent.
-
-An implementation that CAN iterate but has only a single element would allow the
-first "nextRead" or whatever to succeed, but return false on all subsequent ones
-(and not throw an exception).
-
-
-=========================
-
-TODO:
-
-I left the code in a semi-catatonic state, because initially I had Read.cpp
-calling through directly to NGS_Read. Technically, we could still do that and
-maybe it'd make sense... but again I'm trying to keep some parallel between the
-Java and C++ code.
-
-So all of the stuff in interfaces needs to be reflected in the libraries. After
-getting the code together, we'll have to look at restructuring to include the C
-code into libncbi-vdb, and the C++ code in its own static and dynamic external
-libraries, versioned independently from our releases, since they will now
-reflect the API version (1.0.x).
diff --git a/libs/ngs/SRA_DB_ReadCollection.c b/libs/ngs/SRA_DB_ReadCollection.c
deleted file mode 100644
index ef0bfaa..0000000
--- a/libs/ngs/SRA_DB_ReadCollection.c
+++ /dev/null
@@ -1,456 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-typedef struct SRA_DB_ReadCollection SRA_DB_ReadCollection;
-#define NGS_READCOLLECTION SRA_DB_ReadCollection
-
-#include "NGS_ReadCollection.h"
-#include "NGS_Reference.h"
-#include "NGS_Alignment.h"
-#include "NGS_Read.h"
-#include "NGS_FragmentBlobIterator.h"
-
-#include "NGS_Cursor.h"
-#include "NGS_String.h"
-#include "NGS_Id.h"
-
-#include "SRA_Read.h"
-#include "SRA_ReadGroup.h"
-#include "SRA_ReadGroupInfo.h"
-#include "SRA_Statistics.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <vdb/manager.h>
-#include <vdb/schema.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-
-#include <strtol.h> /* strtoi64 */
-
-#include <stddef.h>
-#include <assert.h>
-
-#include <sysalloc.h>
-
-
-/*--------------------------------------------------------------------------
- * SRA_DB_ReadCollection
- */
-
-struct SRA_DB_ReadCollection
-{
-    NGS_ReadCollection dad;
-    const NGS_String * run_name;
-
-    const VDatabase * db;
-
-    const NGS_Cursor* curs; /* used for individual reads */
-    const struct SRA_ReadGroupInfo* group_info;
-};
-
-static
-void SRA_DB_ReadCollectionWhack ( SRA_DB_ReadCollection * self, ctx_t ctx )
-{
-    NGS_CursorRelease ( self -> curs, ctx );
-    SRA_ReadGroupInfoRelease ( self -> group_info, ctx );
-    VDatabaseRelease ( self -> db );
-    NGS_StringRelease ( self -> run_name, ctx );
-}
-
-static
-NGS_String * SRA_DB_ReadCollectionGetName ( SRA_DB_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    return NGS_StringDuplicate ( self -> run_name, ctx );
-}
-
-static
-void GetReadGroupInfo( SRA_DB_ReadCollection * self, ctx_t ctx )
-{
-    if ( self -> group_info == NULL )
-    {
-        const VTable * table;
-        rc_t rc = VDatabaseOpenTableRead ( self -> db, & table, "SEQUENCE" );
-        if ( rc != 0 )
-        {
-            INTERNAL_ERROR ( xcUnexpected, "VDatabaseOpenTableRead(SEQUENCE) rc = %R", rc );
-        }
-        else
-        {
-            self -> group_info = SRA_ReadGroupInfoMake ( ctx, table );
-            VTableRelease ( table );
-        }
-    }
-}
-
-static
-NGS_ReadGroup * SRA_DB_ReadCollectionGetReadGroups ( SRA_DB_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    TRY ( GetReadGroupInfo( self, ctx ) )
-    {
-        TRY ( const NGS_Cursor * curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "SEQUENCE", sequence_col_specs, seq_NUM_COLS ) )
-        {
-            NGS_ReadGroup * ret = SRA_ReadGroupIteratorMake ( ctx, curs, self -> group_info, self -> run_name );
-            NGS_CursorRelease ( curs, ctx );
-            return ret;
-        }
-    }
-    return NULL;
-}
-
-static
-bool SRA_DB_ReadCollectionHasReadGroup ( SRA_DB_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    bool ret = false;
-
-    if ( self -> curs == NULL )
-    {
-        ON_FAIL ( self -> curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "SEQUENCE", sequence_col_specs, seq_NUM_COLS ) )
-            return ret;
-    }
-    TRY ( GetReadGroupInfo( self, ctx ) )
-    {
-        TRY ( SRA_ReadGroupInfoFind ( self -> group_info, ctx, spec, string_size ( spec ) ) )
-        {
-            ret = true;
-        }
-        CATCH_ALL()
-        {
-            CLEAR();
-        }
-    }
-    return ret;
-}
-
-static
-NGS_ReadGroup * SRA_DB_ReadCollectionGetReadGroup ( SRA_DB_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    if ( self -> curs == NULL )
-    {
-        ON_FAIL ( self -> curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "SEQUENCE", sequence_col_specs, seq_NUM_COLS ) )
-            return NULL;
-    }
-    TRY ( GetReadGroupInfo( self, ctx ) )
-    {
-        NGS_ReadGroup * ret = SRA_ReadGroupMake ( ctx, self -> curs, self -> group_info, self -> run_name, spec, string_size ( spec ));
-        return ret;
-    }
-    return NULL;
-}
-
-static
-NGS_Reference * SRA_DB_ReadCollectionGetReferences ( SRA_DB_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    // create empty reference iterator
-    return NGS_ReferenceMakeNull ( ctx, & self -> dad );
-}
-
-static
-bool SRA_DB_ReadCollectionHasReference ( SRA_DB_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    return false;
-}
-
-static
-NGS_Reference * SRA_DB_ReadCollectionGetReference ( SRA_DB_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    // always fail
-    INTERNAL_ERROR ( xcRowNotFound, "Reference not found ( NAME = %s )", spec );
-    return NULL;
-}
-
-static
-NGS_Alignment * SRA_DB_ReadCollectionGetAlignments ( SRA_DB_ReadCollection * self, ctx_t ctx,
-    bool wants_primary, bool wants_secondary )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    // create empty alignment iterator
-    return NGS_AlignmentMakeNull ( ctx, NGS_StringData(self -> run_name, ctx), NGS_StringSize(self -> run_name, ctx) );
-}
-
-static
-NGS_Alignment * SRA_DB_ReadCollectionGetAlignment ( SRA_DB_ReadCollection * self, ctx_t ctx, const char * alignmentId )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    // always fail
-    INTERNAL_ERROR ( xcRowNotFound, "Aligment not found ( ID = %ld )", alignmentId );
-    return NULL;
-}
-
-static
-uint64_t SRA_DB_ReadCollectionGetAlignmentCount ( SRA_DB_ReadCollection * self, ctx_t ctx,
-    bool wants_primary, bool wants_secondary )
-{
-    return 0;
-}
-
-static
-NGS_Alignment * SRA_DB_ReadCollectionGetAlignmentRange ( SRA_DB_ReadCollection * self, ctx_t ctx, uint64_t first, uint64_t count,
-    bool wants_primary, bool wants_secondary )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    // create empty alignment iterator
-    return NGS_AlignmentMakeNull ( ctx, NGS_StringData(self -> run_name, ctx), NGS_StringSize(self -> run_name, ctx) );
-}
-
-NGS_Read * SRA_DB_ReadCollectionGetReads ( SRA_DB_ReadCollection * self, ctx_t ctx,
-    bool wants_full, bool wants_partial, bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    if ( ! wants_unaligned )
-    {
-        return NGS_ReadMakeNull ( ctx, self -> run_name );
-    }
-    else
-    {
-        TRY ( const NGS_Cursor * curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "SEQUENCE", sequence_col_specs, seq_NUM_COLS ) )
-        {
-            NGS_Read * ret =  SRA_ReadIteratorMake ( ctx, curs, self -> run_name, wants_full, wants_partial, wants_unaligned );
-            NGS_CursorRelease ( curs, ctx );
-            return ret;
-        }
-    }
-
-    return NULL;
-}
-
-NGS_Read * SRA_DB_ReadCollectionGetRead ( SRA_DB_ReadCollection * self, ctx_t ctx, const char * readIdStr )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    TRY ( struct NGS_Id id = NGS_IdParse ( readIdStr, string_size ( readIdStr ), ctx ) )
-    {
-        if ( string_cmp ( NGS_StringData ( self -> run_name, ctx ),
-            NGS_StringSize ( self -> run_name, ctx ),
-            id . run . addr,
-            id . run . size,
-            id . run . len ) != 0 )
-        {
-            INTERNAL_ERROR ( xcArcIncorrect,
-                " expected '%.*s', actual '%.*s'",
-                NGS_StringSize ( self -> run_name, ctx ),
-                NGS_StringData ( self -> run_name, ctx ),
-                id . run . size,
-                id . run . addr );
-        }
-        else
-        {
-            /* individual reads share one iterator attached to ReadCollection */
-            if ( self -> curs == NULL )
-            {
-                ON_FAIL ( self -> curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "SEQUENCE", sequence_col_specs, seq_NUM_COLS ) )
-                    return NULL;
-            }
-            return SRA_ReadMake ( ctx, self -> curs, id . rowId, self -> run_name );
-        }
-    }
-    return NULL;
-}
-
-static
-uint64_t SRA_DB_ReadCollectionGetReadCount ( SRA_DB_ReadCollection * self, ctx_t ctx, bool wants_full, bool wants_partial, bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-
-    if ( ! wants_unaligned )
-        return 0;
-
-    if ( self -> curs == NULL )
-    {
-        ON_FAIL ( self -> curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "SEQUENCE", sequence_col_specs, seq_NUM_COLS ) )
-            return 0;
-    }
-
-    return NGS_CursorGetRowCount ( self -> curs, ctx );
-}
-
-NGS_Read * SRA_DB_ReadCollectionGetReadRange ( SRA_DB_ReadCollection * self, ctx_t ctx, uint64_t first, uint64_t count,
-        bool wants_full, bool wants_partial, bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    TRY ( const NGS_Cursor * curs = NGS_CursorMakeDb ( ctx, self -> db, self -> run_name, "SEQUENCE", sequence_col_specs, seq_NUM_COLS ) )
-    {
-        NGS_Read * ret = SRA_ReadIteratorMakeRange ( ctx, curs, self -> run_name, first, count, wants_full, wants_partial, wants_unaligned );
-        NGS_CursorRelease ( curs, ctx );
-        return ret;
-    }
-    return NULL;
-}
-
-
-static struct NGS_Statistics* SRADB_ReadCollectionGetStatistics ( SRA_DB_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    const VTable * table;
-    rc_t rc = VDatabaseOpenTableRead ( self -> db, & table, "SEQUENCE" );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcUnexpected, "VDatabaseOpenTableRead(SEQUENCE) rc = %R", rc );
-        return NULL;
-    }
-    else
-    {
-        TRY ( NGS_Statistics * ret = SRA_StatisticsMake ( ctx ) )
-        {
-            TRY ( SRA_StatisticsLoadTableStats ( ret, ctx, table, "SEQUENCE" ) )
-            {
-                SRA_StatisticsLoadBamHeader ( ret, ctx, self -> db );
-                VTableRelease ( table );
-                return ret;
-            }
-            NGS_StatisticsRelease ( ret, ctx );
-        }
-        VTableRelease ( table );
-    }
-    return NULL;
-}
-
-static struct NGS_FragmentBlobIterator* SRADB_ReadCollectionGetFragmentBlobs ( SRA_DB_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    const VTable * table;
-    rc_t rc = VDatabaseOpenTableRead ( self -> db, & table, "SEQUENCE" );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcUnexpected, "VDatabaseOpenTableRead(SEQUENCE) rc = %R", rc );
-    }
-    else
-    {
-        TRY ( NGS_FragmentBlobIterator* ret = NGS_FragmentBlobIteratorMake ( ctx, self -> run_name, table ) )
-        {
-            VTableRelease ( table );
-            return ret;
-        }
-        VTableRelease ( table );
-    }
-
-    return NULL;
-}
-
-static NGS_ReadCollection_vt SRA_DB_ReadCollection_vt =
-{
-    /* NGS_Refcount */
-    { SRA_DB_ReadCollectionWhack },
-
-    /* NGS_Read_Collection */
-    SRA_DB_ReadCollectionGetName,
-    SRA_DB_ReadCollectionGetReadGroups,
-    SRA_DB_ReadCollectionHasReadGroup,
-    SRA_DB_ReadCollectionGetReadGroup,
-    SRA_DB_ReadCollectionGetReferences,
-    SRA_DB_ReadCollectionHasReference,
-    SRA_DB_ReadCollectionGetReference,
-    SRA_DB_ReadCollectionGetAlignments,
-    SRA_DB_ReadCollectionGetAlignment,
-    SRA_DB_ReadCollectionGetAlignmentCount,
-    SRA_DB_ReadCollectionGetAlignmentRange,
-    SRA_DB_ReadCollectionGetReads,
-    SRA_DB_ReadCollectionGetRead,
-    SRA_DB_ReadCollectionGetReadCount,
-    SRA_DB_ReadCollectionGetReadRange,
-    SRADB_ReadCollectionGetStatistics,
-    SRADB_ReadCollectionGetFragmentBlobs
-};
-
-NGS_ReadCollection * NGS_ReadCollectionMakeVDatabase ( ctx_t ctx, const VDatabase *db, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcConstructing );
-
-    size_t spec_size;
-    SRA_DB_ReadCollection * ref;
-
-    assert ( db != NULL );
-
-    assert ( spec != NULL );
-    spec_size = string_size ( spec );
-    assert ( spec_size != 0 );
-
-    ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating SRA_DB_ReadCollection ( '%s' )", spec );
-    else
-    {
-        TRY ( NGS_ReadCollectionInit ( ctx, & ref -> dad, & SRA_DB_ReadCollection_vt, "SRA_DB_ReadCollection", spec ) )
-        {
-            const char * name, * dot, * end;
-
-            ref -> db = db;
-
-            end = & spec [ spec_size ];
-
-            /* TBD - this is a hack */
-            name = string_rchr ( spec, spec_size, '/' );
-            if ( name ++ == NULL )
-                name = spec;
-
-            dot = string_rchr ( name, end - name, '.' );
-            if ( dot != NULL )
-            {
-                if ( strcase_cmp ( dot, end - dot, ".ncbi_enc", sizeof ".ncbi_enc" - 1, -1 ) == 0 )
-                {
-                    end = dot;
-                    dot = string_rchr ( name, end - name, '.' );
-                }
-                if ( dot != NULL && strcase_cmp ( dot, end - dot, ".sra", sizeof ".sra" - 1, -1 ) == 0 )
-                    end = dot;
-            }
-
-            /* initialize "run_name" */
-            TRY ( ref -> run_name = NGS_StringMakeCopy ( ctx, name, end - name ) )
-            {
-                return & ref -> dad;
-            }
-        }
-
-        free ( ref );
-    }
-
-    VDatabaseRelease ( db );
-
-    return NULL;
-}
diff --git a/libs/ngs/SRA_Read.c b/libs/ngs/SRA_Read.c
deleted file mode 100644
index 9671cdd..0000000
--- a/libs/ngs/SRA_Read.c
+++ /dev/null
@@ -1,936 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "SRA_Read.h"
-
-#include "NGS_String.h"
-#include "NGS_Cursor.h"
-#include "NGS_Id.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <vdb/cursor.h>
-#include <vdb/schema.h>
-#include <vdb/vdb-priv.h>
-#include <insdc/insdc.h>
-
-#include <stddef.h>
-#include <assert.h>
-
-#include <sysalloc.h>
-
-#ifndef min
-#   define min(a,b) ( (a) < (b) ? (a) : (b) )            
-#endif
-
-/*--------------------------------------------------------------------------
- * SRA_Read
- */
-
-const char * sequence_col_specs [] =
-{
-    "(INSDC:dna:text)READ",
-    "READ_TYPE",
-    "(INSDC:quality:phred)QUALITY",
-    "(INSDC:coord:len)READ_LEN",
-    "NAME",
-    "SPOT_GROUP",
-    "PRIMARY_ALIGNMENT_ID",
-    "(U64)SPOT_COUNT",
-};
-
-static NGS_Read_vt NGS_Read_vt_inst =
-{
-    {
-        {
-            /* NGS_Refcount */
-            SRA_ReadWhack
-        },
-
-        /* NGS_Fragment */
-        SRA_FragmentGetId,
-        SRA_FragmentGetSequence,
-        SRA_FragmentGetQualities,
-        SRA_FragmentIsPaired,
-        SRA_FragmentIsAligned,
-        SRA_FragmentNext
-    },
-    
-    /* NGS_Read */
-    SRA_ReadGetId,
-    SRA_ReadGetName,
-    SRA_ReadGetReadGroup,
-    SRA_ReadGetCategory,
-    SRA_ReadGetSequence,
-    SRA_ReadGetQualities,
-    SRA_ReadNumFragments,
-    SRA_ReadFragIsAligned,
-    SRA_ReadIteratorNext,
-    SRA_ReadIteratorGetCount,
-}; 
-
-/* Init
- */
-static
-void SRA_ReadInit ( ctx_t ctx, SRA_Read * self, const char *clsname, const char *instname, const NGS_String * run_name )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    else
-    {
-        TRY ( NGS_ReadInit ( ctx, & self -> dad, & NGS_Read_vt_inst, clsname, instname ) )
-        {
-            TRY ( self -> run_name = NGS_StringDuplicate ( run_name, ctx ) )
-            {
-                self -> wants_full      = true;
-                self -> wants_partial   = true; 
-                self -> wants_unaligned = true;            
-            }
-        }
-    }
-}
-
-static
-void SRA_ReadIteratorInit ( ctx_t ctx, 
-                            SRA_Read * self, 
-                            const char *clsname, 
-                            const char *instname, 
-                            const NGS_String * run_name,
-                            bool wants_full, 
-                            bool wants_partial, 
-                            bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    else
-    {
-        TRY ( NGS_ReadIteratorInit ( ctx, & self -> dad, & NGS_Read_vt_inst, clsname, instname ) )
-        {
-            TRY ( self -> run_name = NGS_StringDuplicate ( run_name, ctx ) )
-            {
-                self -> wants_full      = wants_full;
-                self -> wants_partial   = wants_partial; 
-                self -> wants_unaligned = wants_unaligned;            
-            }
-        }
-    }
-}
-
-/* Whack
- */
-void SRA_ReadWhack ( SRA_Read * self, ctx_t ctx )
-{
-    NGS_CursorRelease ( self -> curs, ctx );
-    
-    NGS_StringRelease ( self -> group_name, ctx );
-    NGS_StringRelease ( self -> run_name, ctx );
-}
-
-/* Release
- *  release reference
- */
-void SRA_ReadRelease ( const SRA_Read * self, ctx_t ctx )
-{
-    if ( self != NULL )
-    {
-        NGS_ReadRelease ( & self -> dad, ctx );
-    }
-}
-
-/* Duplicate
- *  duplicate reference
- */
-SRA_Read * SRA_ReadDuplicate ( const SRA_Read * self, ctx_t ctx )
-{
-    return NGS_RefcountDuplicate ( NGS_ReadToRefcount ( & self -> dad ), ctx );
-}
-
-static
-void SRA_ReadIteratorInitFragment ( SRA_Read * self, ctx_t ctx )
-{
-    const void * base;
-    uint32_t elem_bits, boff, row_len;
-
-    /* read from READ_TYPE must succeed */
-    TRY ( NGS_CursorCellDataDirect ( self -> curs, ctx, self -> cur_row, seq_READ_TYPE, & elem_bits, & base, & boff, & row_len ) )
-    {
-        assert ( elem_bits == 8 );
-        assert ( boff == 0 );
-        self -> READ_TYPE = base;
-
-        TRY ( NGS_CursorCellDataDirect ( self -> curs, ctx, self -> cur_row, seq_READ_LEN, & elem_bits, & base, & boff, & row_len ) )
-        {
-            uint32_t i;
-
-            assert ( elem_bits == 32 );
-            assert ( boff == 0 );
-            self -> READ_LEN = base;
-            self -> frag_max = row_len;
-
-            /* naked hackery to quickly scan types */
-            assert ( READ_TYPE_TECHNICAL == 0 );
-            assert ( READ_TYPE_BIOLOGICAL == 1 );
-
-            /* NB - should also be taking READ_FILTER into account */
-            for ( i = 0; i < row_len; ++ i )
-                self -> bio_frags += self -> READ_TYPE [ i ] & READ_TYPE_BIOLOGICAL;
-        }
-    }
-}
-
-NGS_Read * SRA_ReadMake ( ctx_t ctx, const NGS_Cursor * curs, int64_t readId, const struct NGS_String * run_name )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    SRA_Read * ref;
-
-    assert ( curs != NULL );
-
-    ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating SRA_Read(%lu) on '%.*s'", readId, NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-    else
-    {
-#if _DEBUGGING
-        char instname [ 256 ];
-        string_printf ( instname, sizeof instname, NULL, "%.*s(%lu)", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ), readId );
-        instname [ sizeof instname - 1 ] = 0;
-#else
-        const char *instname = "";
-#endif
-        TRY ( SRA_ReadInit ( ctx, ref, "SRA_Read", instname, run_name ) )
-        {
-            uint64_t row_count = NGS_CursorGetRowCount ( curs, ctx );
-            
-            /* validate the requested rowId and seek to it */
-            if ( readId <= 0 || (uint64_t)readId > row_count )
-            {
-                INTERNAL_ERROR ( xcCursorAccessFailed, "rowId ( %li ) out of range for %.*s", readId, NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-            }                
-            else
-            {
-                ref -> curs = NGS_CursorDuplicate ( curs, ctx );
-                ref -> cur_row = readId;
-                TRY ( SRA_ReadIteratorInitFragment ( ref, ctx ) )
-                {
-                    ref -> row_max = readId + 1;
-                    ref -> row_count = 1;
-                    ref -> seen_first = true;
-                    return & ref -> dad;
-                }
-            }
-            
-            SRA_ReadRelease ( ref, ctx );
-            return NULL;
-        }
-        free ( ref );
-    }
-
-    return NULL;
-}
-
-/* GetReadId
- */
-NGS_String * SRA_ReadGetId ( SRA_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    
-    assert ( self != NULL );
-    
-    if ( ! self -> seen_first ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Read accessed before a call to ReadIteratorNext()" );
-        return NULL;
-    }
-
-    /* if current row is valid, read data */
-    if ( self -> cur_row < self -> row_max )
-        return NGS_IdMake ( ctx, self -> run_name, NGSObject_Read, self -> cur_row );
-    
-    USER_ERROR ( xcCursorExhausted, "No more rows available" );
-    return NULL;
-}
-
-/* GetReadName
- */
-NGS_String * SRA_ReadGetName ( SRA_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    assert ( self != NULL );
-    
-    if ( ! self -> seen_first ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Read accessed before a call to ReadIteratorNext()" );
-        return NULL;
-    }
-    else
-    {
-        NGS_String * ret;
-        ON_FAIL ( ret = NGS_CursorGetString( self -> curs, ctx, self -> cur_row, seq_NAME ) )
-        {   
-            if ( GetRCObject ( ctx -> rc ) == rcColumn && GetRCState ( ctx -> rc ) == rcNotFound )
-            {   /* no NAME column; synthesize a read name based on run_name and row_id */
-                CLEAR ();
-                ret = NGS_IdMake ( ctx, self -> run_name, NGSObject_Read, self -> cur_row );
-            }
-        }
-        
-        return ret;
-    }
-}
-
-/* GetReadGroup
- */
-NGS_String * SRA_ReadGetReadGroup ( SRA_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    assert ( self != NULL );
-    
-    if ( ! self -> seen_first ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Read accessed before a call to ReadIteratorNext()" );
-        return NULL;
-    }
-    
-    return NGS_CursorGetString ( self -> curs, ctx, self -> cur_row, seq_GROUP );
-}
-
-enum NGS_ReadCategory SRA_ReadGetCategory ( const SRA_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    assert ( self != NULL );
-    
-    if ( ! self -> seen_first ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Read accessed before a call to ReadIteratorNext()" );
-        return NGS_ReadCategory_unaligned;
-    }
-
-    if ( self -> cur_row < self -> row_max )
-    {
-        const void * base;
-        uint32_t elem_bits, boff, row_len;
-        ON_FAIL ( NGS_CursorCellDataDirect ( self -> curs, ctx, self -> cur_row, seq_PRIMARY_ALIGNMENT_ID, & elem_bits, & base, & boff, & row_len ) )
-        {
-            CLEAR();
-            return NGS_ReadCategory_unaligned;
-        }
-            
-        {
-            uint32_t i;
-            bool seen_aligned = false;
-            bool seen_unaligned = false;
-            const int64_t * orig = base;
-            assert(elem_bits == 64);
-            for ( i = 0; i < row_len; ++ i )
-            {
-                if (orig[i] == 0)
-                {
-                    if (!seen_unaligned)
-                        seen_unaligned = true;
-                }
-                else
-                {
-                    if (!seen_aligned)
-                        seen_aligned = true;
-                }
-            }
-            if (seen_aligned)
-            {
-                return seen_unaligned ? NGS_ReadCategory_partiallyAligned : NGS_ReadCategory_fullyAligned;
-            }
-            else 
-            {   /* no aligned fragments */
-                return NGS_ReadCategory_unaligned;
-            }
-        }
-    }
-    USER_ERROR ( xcCursorExhausted, "No more rows available" );
-    return NGS_ReadCategory_unaligned;
-}
-
-/* GetReadSequence
- */
-NGS_String * SRA_ReadGetSequence ( SRA_Read * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    NGS_String * seq;
-
-    assert ( self != NULL );
-    
-    if ( ! self -> seen_first ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Read accessed before a call to ReadIteratorNext()" );
-        return NULL;
-    }
-
-    TRY ( seq = NGS_CursorGetString ( self -> curs, ctx, self -> cur_row, seq_READ ) )
-    {
-        NGS_String * sub;
-        TRY ( sub = NGS_StringSubstrOffsetSize ( seq, ctx, offset, size ) )
-        {
-            NGS_StringRelease ( seq, ctx );
-            seq = sub;
-        }
-    }
-
-    return seq;
-}
-
-/* GetReadQualities
- * GetReadSubQualities
- */
-static 
-NGS_String * GetReadQualities ( SRA_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    /* if current row is valid, read data */
-    if ( self -> cur_row < self -> row_max )
-    {
-        const void * base;
-        uint32_t elem_bits, boff, row_len;
-        TRY ( NGS_CursorCellDataDirect ( self -> curs, ctx, self -> cur_row, seq_QUALITY, & elem_bits, & base, & boff, & row_len ) )
-        {
-            NGS_String * new_data = NULL;
-
-            assert ( elem_bits == 8 );
-            assert ( boff == 0 );
-
-            {   /* convert to ascii-33 */
-                char * copy = malloc ( row_len + 1 );
-                if ( copy == NULL )
-                    SYSTEM_ERROR ( xcNoMemory, "allocating %u bytes for QUALITY row %ld", row_len + 1, self -> cur_row );
-                else
-                {
-                    uint32_t i;
-                    const uint8_t * orig = base;
-                    for ( i = 0; i < row_len; ++ i )
-                        copy [ i ] = ( char ) ( orig [ i ] + 33 );
-                    copy [ i ] = 0;
-
-                    new_data = NGS_StringMakeOwned ( ctx, copy, row_len );
-                    if ( FAILED () )
-                        free ( copy );
-                }
-            }
-            
-            if ( ! FAILED () )
-            {
-                return new_data;
-            }
-        }
-    }
-
-    return NULL;
-}
-
-NGS_String * SRA_ReadGetQualities ( SRA_Read * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    NGS_String * qual;
-    
-    assert ( self != NULL );
-    
-    if ( ! self -> seen_first ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Read accessed before a call to ReadIteratorNext()" );
-        return NULL;
-    }
-    
-    TRY ( qual = GetReadQualities ( self, ctx ) )
-    {
-        NGS_String * sub;
-        TRY ( sub = NGS_StringSubstrOffsetSize ( qual, ctx, offset, size ) )
-        {
-            NGS_StringRelease ( qual, ctx );
-            qual = sub;
-        }
-    }
-
-    return qual;
-}
-
-/* NumFragments
- */
-uint32_t SRA_ReadNumFragments ( SRA_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    assert ( self != NULL );
-    
-    if ( ! self -> seen_first ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Read accessed before a call to ReadIteratorNext()" );
-        return 0;
-    }    
-    
-    if ( self -> cur_row >= self -> row_max )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return false;
-    }
-    
-    return self -> bio_frags;
-}
-
-/* FragIsAligned
- */
-bool SRA_ReadFragIsAligned ( SRA_Read * self, ctx_t ctx, uint32_t frag_idx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    assert ( self != NULL );
-    
-    if ( ! self -> seen_first ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Read accessed before a call to ReadIteratorNext()" );
-        return 0;
-    }    
-    
-    if ( self -> cur_row >= self -> row_max )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return false;
-    }
-
-    if ( frag_idx >= self -> bio_frags )
-    {
-        USER_ERROR ( xcIntegerOutOfBounds, "bad fragment index" );
-        return false;
-    }
-    
-    return false;
-}
-
-/*--------------------------------------------------------------------------
- * NGS_ReadIterator
- */
-
-/* Make
- */
-NGS_Read * SRA_ReadIteratorMake ( ctx_t ctx, 
-                                        const NGS_Cursor * curs, 
-                                        const NGS_String * run_name, 
-                                        bool wants_full, 
-                                        bool wants_partial, 
-                                        bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    SRA_Read * ref;
-
-    assert ( curs != NULL );
-
-    ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating NGS_ReadIterator on '%.*s'", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-    else
-    {
-#if _DEBUGGING
-        char instname [ 256 ];
-        string_printf ( instname, sizeof instname, NULL, "%.*s", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-        instname [ sizeof instname - 1 ] = 0;
-#else
-        const char *instname = "";
-#endif
-        TRY ( SRA_ReadIteratorInit ( ctx, ref, "NGS_ReadIterator", instname, run_name, wants_full, wants_partial, wants_unaligned ) )
-        {
-            ref -> curs = NGS_CursorDuplicate ( curs, ctx );
-            TRY ( NGS_CursorGetRowRange ( ref -> curs, ctx, & ref -> cur_row, & ref -> row_count ) )
-            {
-                ref -> row_max = ref -> cur_row + ref -> row_count;
-                return & ref -> dad;
-            }
-            SRA_ReadRelease ( ref, ctx );
-            return NULL;
-        }
-
-        free ( ref );
-    }
-
-    return NULL;
-}
-
-/* MakeRange
- */
-NGS_Read * SRA_ReadIteratorMakeRange ( ctx_t ctx, 
-                                       const NGS_Cursor * curs, 
-                                       const NGS_String * run_name, 
-                                       uint64_t first, 
-                                       uint64_t count, 
-                                       bool wants_full, 
-                                       bool wants_partial, 
-                                       bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    SRA_Read * ref;
-
-    assert ( curs != NULL );
-
-    ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating NGS_ReadIterator on '%.*s'", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-    else
-    {
-#if _DEBUGGING
-        char instname [ 256 ];
-        string_printf ( instname, sizeof instname, NULL, "%.*s", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-        instname [ sizeof instname - 1 ] = 0;
-#else
-        const char *instname = "";
-#endif
-        TRY ( SRA_ReadIteratorInit ( ctx, ref, "NGS_ReadIterator", instname, run_name, wants_full, wants_partial, wants_unaligned ) )
-        {
-            ref -> curs = NGS_CursorDuplicate ( curs, ctx );
-            TRY ( NGS_CursorGetRowRange ( ref -> curs, ctx, & ref -> cur_row, & ref -> row_count ) )
-            {
-                ref -> row_max = min ( first + count, ref -> cur_row + ref -> row_count );
-                ref -> cur_row = first;
-                return & ref -> dad;
-            }
-            SRA_ReadRelease ( ref, ctx );
-            return NULL;
-        }
-
-        free ( ref );
-    }
-
-    return NULL;
-}
-
-/* MakeReadGroup
- */
-NGS_Read * SRA_ReadIteratorMakeReadGroup ( ctx_t ctx, 
-                                           const NGS_Cursor * curs, 
-                                           const NGS_String * run_name, 
-                                           const NGS_String * group_name, 
-                                           uint64_t first, 
-                                           uint64_t count, 
-                                           bool wants_full, 
-                                           bool wants_partial, 
-                                           bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    
-    TRY ( SRA_Read * ref = (SRA_Read*) SRA_ReadIteratorMakeRange ( ctx, 
-                                                                   curs, 
-                                                                   run_name, 
-                                                                   first, 
-                                                                   count, 
-                                                                   wants_full, 
-                                                                   wants_partial, 
-                                                                   wants_unaligned ) )
-    {
-        TRY ( ref -> group_name = NGS_StringDuplicate ( group_name, ctx ) )
-        {
-            return & ref -> dad;
-        }
-        SRA_ReadWhack ( ref, ctx );
-    }
-    return NULL;
-}
-
-/* Next
- */
-bool SRA_ReadIteratorNext ( SRA_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    assert ( self != NULL );
-
-    /* reset fragment */
-    self -> seen_first_frag = false;
-    self -> seen_last_frag = false;
-    
-    self -> cur_frag = 0;
-    self -> bio_frags = 0;
-    self -> frag_idx = 0;
-    self -> frag_max = 0;
-    self -> frag_start = 0;
-    self -> frag_len = 0;
-    
-    self -> READ_TYPE = NULL;
-    self -> READ_LEN = NULL;
-    
-    if ( self -> seen_first )
-    {   /* move to next row */
-        ++ self -> cur_row;
-    }
-    else
-    {
-        self -> seen_first = true;
-    }
-    
-    while ( self -> cur_row < self -> row_max )
-    {
-        /* work the category filter */
-        if ( ! self -> wants_full || 
-             ! self -> wants_partial ||
-             ! self -> wants_unaligned )
-        {
-            ON_FAIL ( enum NGS_ReadCategory cat = SRA_ReadGetCategory ( self, ctx ) )
-                return false;
-                
-            if ( ( cat == NGS_ReadCategory_fullyAligned && ! self -> wants_full )
-                 ||
-                 ( cat == NGS_ReadCategory_partiallyAligned && ! self -> wants_partial )
-                 ||
-                 ( cat == NGS_ReadCategory_unaligned && ! self -> wants_unaligned ) )
-            {
-                ++ self -> cur_row;
-                continue; 
-            }
-        }
-        
-        /* work the read group filter if required */
-        if ( self -> group_name != NULL )
-        {
-            uint32_t size;
-        
-            ON_FAIL ( NGS_String* group = NGS_CursorGetString ( self -> curs, ctx, self -> cur_row, seq_GROUP ) )
-                return false;
-                
-            size = ( uint32_t ) NGS_StringSize ( group, ctx );
-            if ( string_cmp ( NGS_StringData ( self -> group_name, ctx ),  
-                              NGS_StringSize ( self -> group_name, ctx ),  
-                              NGS_StringData ( group, ctx ),
-                              size,
-                              size ) != 0 )
-            {
-                NGS_StringRelease ( group, ctx );
-                ++ self -> cur_row;
-                continue;
-            }
-            NGS_StringRelease ( group, ctx );
-        }
-
-        TRY ( SRA_ReadIteratorInitFragment ( self, ctx ) )
-        {
-            return true;
-        }
-        
-        break;
-    }
-    
-    return false;
-}
-
-/* GetCount
- *  TEMPORARY
- */
-uint64_t SRA_ReadIteratorGetCount ( const SRA_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    
-    assert ( self != NULL );
-    return self -> row_count;
-}
-
-NGS_String * SRA_FragmentGetId ( SRA_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    
-    assert ( self != NULL );
-    if ( ! self -> seen_first_frag ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Fragment accessed before a call to FragmentIteratorNext()" );
-        return NULL;
-    }
-    if ( self -> seen_last_frag ) 
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-
-    return NGS_IdMakeFragment ( ctx, self -> run_name, false, self -> cur_row, self -> cur_frag );
-}
-
-static
-NGS_String * GetFragmentString ( const SRA_Read * self, ctx_t ctx, NGS_String * str )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    assert ( self != NULL );
-    if ( ! self -> seen_first_frag ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Fragment accessed before a call to FragmentIteratorNext()" );
-        return NULL;
-    }
-    if ( self -> seen_last_frag ) 
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-    
-    if ( self -> cur_row < self -> row_max )
-    {
-        TRY ( NGS_String * frag = NGS_StringSubstrOffsetSize ( str, ctx, self -> frag_start, self -> frag_len ) )
-        {
-            return frag;
-        }
-    }
-
-    return NULL;
-}
-
-struct NGS_String * SRA_FragmentGetSequence ( SRA_Read * self, ctx_t ctx, uint64_t offset, uint64_t length )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    NGS_String * ret = NULL;
-    
-    assert ( self != NULL );
-    if ( ! self -> seen_first_frag ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Fragment accessed before a call to FragmentIteratorNext()" );
-        return NULL;
-    }
-    if ( self -> seen_last_frag ) 
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }    
-    
-    {
-        TRY ( NGS_String * read = NGS_CursorGetString ( self -> curs, ctx, self -> cur_row, seq_READ ) )
-        {
-            TRY ( NGS_String * seq = GetFragmentString ( self, ctx, read ) )
-            {
-                ret = NGS_StringSubstrOffsetSize ( seq, ctx, offset, length );
-                NGS_StringRelease ( seq, ctx );
-            }
-            NGS_StringRelease ( read, ctx );
-        }
-    }
-    return ret;
-}
-
-struct NGS_String * SRA_FragmentGetQualities ( SRA_Read * self, ctx_t ctx, uint64_t offset, uint64_t length )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    NGS_String * ret = NULL;
-    
-    assert ( self != NULL );
-    if ( ! self -> seen_first_frag ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Fragment accessed before a call to FragmentIteratorNext()" );
-        return NULL;
-    }
-    if ( self -> seen_last_frag ) 
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-    
-    {
-        TRY ( NGS_String * readQual = GetReadQualities ( self, ctx ) )
-        {
-            TRY ( NGS_String * fragQual = GetFragmentString ( self, ctx, readQual ) )
-            {
-                ret = NGS_StringSubstrOffsetSize ( fragQual, ctx, offset, length );
-                NGS_StringRelease ( fragQual, ctx );
-            }
-            NGS_StringRelease ( readQual, ctx );
-        }
-    }
-    return ret;
-}
-
-bool SRA_FragmentIsPaired ( SRA_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    
-    assert ( self != NULL );
-    if ( ! self -> seen_first_frag ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Fragment accessed before a call to FragmentIteratorNext()" );
-        return false;
-    }
-    if ( self -> seen_last_frag ) 
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return false;
-    }
-
-    return self -> bio_frags > 1;
-}
-
-bool SRA_FragmentIsAligned ( SRA_Read * self, ctx_t ctx )
-{
-    assert ( self != NULL );
-    return false;
-}
-
-bool SRA_FragmentNext ( SRA_Read * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    assert ( self != NULL );
-    
-    if ( ! self -> seen_first ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "Read accessed before a call to ReadIteratorNext()" );
-        return false;
-    }
-    
-    if ( self -> seen_first_frag )
-    {   /* move to next fragment */
-        ++ self -> cur_frag;
-        ++ self -> frag_idx;
-    }
-
-    /* advance to next biological fragment */
-    for ( self -> seen_first_frag = true; self -> frag_idx < self -> frag_max; ++ self -> frag_idx )
-    {
-        /* get coordinates */
-        self -> frag_start += self -> frag_len;
-        self -> frag_len = self -> READ_LEN [ self -> frag_idx ];
-
-        /* test for biological fragment */
-        assert ( READ_TYPE_TECHNICAL == 0 );
-        assert ( READ_TYPE_BIOLOGICAL == 1 );
-        if ( ( self -> READ_TYPE [ self -> frag_idx ] & READ_TYPE_BIOLOGICAL ) != 0 )
-            return true;
-    }
-    
-    self -> seen_last_frag = true;
-    return false;
-}
-
diff --git a/libs/ngs/SRA_Read.h b/libs/ngs/SRA_Read.h
deleted file mode 100644
index d8bbc61..0000000
--- a/libs/ngs/SRA_Read.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_read_
-#define _h_sra_read_
-
-typedef struct SRA_Read SRA_Read;
-
-#ifndef NGS_READ
-#define NGS_READ SRA_Read
-#endif
-
-#ifndef _h_ngs_read_
-#include "NGS_Read.h"
-#endif
-
-#ifndef _h_insdc_insdc_
-#include <insdc/insdc.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct NGS_Cursor;
-struct NGS_String;
-
-enum SequenceTableColumn
-{   // keep in sync with sequence_col_specs in SRA_Read.c 
-    seq_READ,
-    seq_READ_TYPE,
-    seq_QUALITY,
-    seq_READ_LEN,
-    seq_NAME,
-    seq_GROUP,
-    seq_PRIMARY_ALIGNMENT_ID,
-    seq_SPOT_COUNT,
-
-    seq_NUM_COLS
-};  // keep in sync with sequence_col_specs in SRA_Read.c 
-
-extern const char * sequence_col_specs [];
-
-/*--------------------------------------------------------------------------
- * SRA_Read
- */
-struct SRA_Read
-{
-    NGS_Read dad;   
-    
-    struct NGS_String * run_name;
-    struct NGS_String * group_name; /* if not NULL, only return reads from this read group */
-    
-    int64_t cur_row;
-    int64_t row_max;
-    uint64_t row_count;
-
-    const INSDC_read_type * READ_TYPE;
-    const INSDC_coord_len * READ_LEN;
-    
-    struct NGS_Cursor const * curs;
-
-    uint32_t cur_frag;
-    uint32_t bio_frags;
-    uint32_t frag_idx;
-    uint32_t frag_max;
-    uint32_t frag_start;
-    uint32_t frag_len;
-
-    bool seen_first;
-    bool seen_first_frag;
-    bool seen_last_frag;
-
-    /* read filtering criteria */
-    bool wants_full;
-    bool wants_partial; 
-    bool wants_unaligned;
-};
-
-void                     SRA_ReadWhack ( NGS_READ * self, ctx_t ctx );
-
-struct NGS_String * SRA_FragmentGetId ( NGS_READ * self, ctx_t ctx );
-struct NGS_String * SRA_FragmentGetSequence ( NGS_READ * self, ctx_t ctx, uint64_t offset, uint64_t length );
-struct NGS_String * SRA_FragmentGetQualities ( NGS_READ * self, ctx_t ctx, uint64_t offset, uint64_t length );
-bool                SRA_FragmentIsPaired ( NGS_READ * self, ctx_t ctx );
-bool                SRA_FragmentIsAligned ( NGS_READ * self, ctx_t ctx );
-bool                SRA_FragmentNext ( NGS_READ * self, ctx_t ctx );
-
-struct NGS_String *      SRA_ReadGetId ( NGS_READ * self, ctx_t ctx );
-struct NGS_String *      SRA_ReadGetName ( NGS_READ * self, ctx_t ctx );
-struct NGS_String *      SRA_ReadGetReadGroup ( NGS_READ * self, ctx_t ctx );
-enum NGS_ReadCategory    SRA_ReadGetCategory ( const NGS_READ * self, ctx_t ctx );
-struct NGS_String *      SRA_ReadGetSequence ( NGS_READ * self, ctx_t ctx, uint64_t offset, uint64_t length );
-struct NGS_String *      SRA_ReadGetQualities ( NGS_READ * self, ctx_t ctx, uint64_t offset, uint64_t length );
-uint32_t                 SRA_ReadNumFragments ( NGS_READ * self, ctx_t ctx );
-bool                     SRA_ReadFragIsAligned ( NGS_READ * self, ctx_t ctx, uint32_t frag_idx );
-bool                     SRA_ReadIteratorNext ( NGS_READ * self, ctx_t ctx );
-uint64_t                 SRA_ReadIteratorGetCount ( const NGS_READ * self, ctx_t ctx );    
-
-/* Make
- * a single read
- */
-struct NGS_Read * SRA_ReadMake ( ctx_t ctx, const struct NGS_Cursor * curs, int64_t readId, const struct NGS_String * spec );
-
-/* IteratorMake
- */
-struct NGS_Read * SRA_ReadIteratorMake ( ctx_t ctx, 
-                                               const struct NGS_Cursor * curs, 
-                                               const struct NGS_String * run_name, 
-                                               bool wants_full, 
-                                               bool wants_partial, 
-                                               bool wants_unaligned );
-
-/* IteratorMakeRange
- * all reads in the specified range of rowIds
- */
-struct NGS_Read * SRA_ReadIteratorMakeRange ( ctx_t ctx, 
-                                              const struct NGS_Cursor * curs, 
-                                              const struct NGS_String * run_name, 
-                                              uint64_t first, 
-                                              uint64_t count, 
-                                              bool wants_full, 
-                                              bool wants_partial, 
-                                              bool wants_unaligned );
-
-/* IteratorMakeReadGroup
- * within the specified range of rowIds, will only return reads belonging to the specified read group (groupName)
- */
-struct NGS_Read * SRA_ReadIteratorMakeReadGroup ( ctx_t ctx, 
-                                                  const struct NGS_Cursor * curs, 
-                                                  const struct NGS_String * run_name, 
-                                                  const struct NGS_String * group_name, 
-                                                  uint64_t first, 
-                                                  uint64_t count, 
-                                                  bool wants_full, 
-                                                  bool wants_partial, 
-                                                  bool wants_unaligned );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_read_ */
diff --git a/libs/ngs/SRA_ReadCollection.c b/libs/ngs/SRA_ReadCollection.c
deleted file mode 100644
index 355dc71..0000000
--- a/libs/ngs/SRA_ReadCollection.c
+++ /dev/null
@@ -1,424 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-typedef struct SRA_ReadCollection SRA_ReadCollection;
-#define NGS_READCOLLECTION SRA_ReadCollection
-
-#include "NGS_ReadCollection.h"
-#include "NGS_Reference.h"
-#include "NGS_Alignment.h"
-#include "NGS_FragmentBlobIterator.h"
-
-#include "NGS_String.h"
-#include "NGS_Cursor.h"
-#include "NGS_Id.h"
-
-#include "SRA_Read.h"
-#include "SRA_ReadGroup.h"
-#include "SRA_ReadGroupInfo.h"
-#include "SRA_Statistics.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <vdb/table.h>
-#include <klib/text.h>
-
-#include <strtol.h> /* strtoi64 */
-
-#include <stddef.h>
-#include <assert.h>
-
-#include <sysalloc.h>
-
-
-/*--------------------------------------------------------------------------
- * SRA_ReadCollection
- */
-
-struct SRA_ReadCollection
-{
-    NGS_ReadCollection dad;
-    const VTable * tbl;
-    const NGS_String * run_name;
-
-    const NGS_Cursor* curs; /* used for individual reads */
-    const struct SRA_ReadGroupInfo* group_info;
-};
-
-static
-void SRA_ReadCollectionWhack ( SRA_ReadCollection * self, ctx_t ctx )
-{
-    NGS_CursorRelease ( self -> curs, ctx );
-    NGS_StringRelease ( self -> run_name, ctx );
-    SRA_ReadGroupInfoRelease ( self -> group_info, ctx );
-    VTableRelease ( self -> tbl );
-}
-
-static
-NGS_String * SRA_ReadCollectionGetName ( SRA_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-    return NGS_StringDuplicate ( self -> run_name, ctx );
-}
-
-static
-NGS_ReadGroup * SRA_ReadCollectionGetReadGroups ( SRA_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    if ( self -> group_info == NULL )
-    {
-        ON_FAIL ( self -> group_info = SRA_ReadGroupInfoMake ( ctx, self -> tbl ) )
-            return NULL;
-    }
-
-    {
-        TRY ( const NGS_Cursor * curs = NGS_CursorMake ( ctx, self -> tbl, sequence_col_specs, seq_NUM_COLS ) )
-        {
-            NGS_ReadGroup * ret = SRA_ReadGroupIteratorMake ( ctx, curs, self -> group_info, self -> run_name );
-            NGS_CursorRelease ( curs, ctx );
-            return ret;
-        }
-    }
-    return NULL;
-}
-
-static
-bool SRA_ReadCollectionHasReadGroup ( SRA_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    bool ret = false;
-
-    if ( self -> curs == NULL )
-    {
-        ON_FAIL ( self -> curs = NGS_CursorMake ( ctx, self -> tbl, sequence_col_specs, seq_NUM_COLS ) )
-            return ret;
-    }
-    if ( self -> group_info == NULL )
-    {
-        ON_FAIL ( self -> group_info = SRA_ReadGroupInfoMake ( ctx, self -> tbl ) )
-            return ret;
-    }
-    TRY ( SRA_ReadGroupInfoFind ( self -> group_info, ctx, spec, string_size ( spec ) ) )
-    {
-        ret = true;
-    }
-    CATCH_ALL()
-    {
-        CLEAR();
-    }
-    return ret;
-}
-
-static
-NGS_ReadGroup * SRA_ReadCollectionGetReadGroup ( SRA_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    if ( self -> curs == NULL )
-    {
-        ON_FAIL ( self -> curs = NGS_CursorMake ( ctx, self -> tbl, sequence_col_specs, seq_NUM_COLS ) )
-            return 0;
-    }
-    if ( self -> group_info == NULL )
-    {
-        ON_FAIL ( self -> group_info = SRA_ReadGroupInfoMake ( ctx, self -> tbl ) )
-            return NULL;
-    }
-    {
-        TRY ( NGS_ReadGroup * ret =  SRA_ReadGroupMake ( ctx, self -> curs, self -> group_info, self -> run_name, spec, string_size ( spec ) ) )
-        {
-            return ret;
-        }
-    }
-    return NULL;
-}
-
-static
-NGS_Reference * SRA_ReadCollectionGetReferences ( SRA_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    // create empty reference iterator
-    return NGS_ReferenceMakeNull ( ctx, & self -> dad );
-}
-
-static
-bool SRA_ReadCollectionHasReference ( SRA_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    return false;
-}
-
-static
-NGS_Reference * SRA_ReadCollectionGetReference ( SRA_ReadCollection * self, ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    // always fail
-    INTERNAL_ERROR ( xcRowNotFound, "Reference not found ( NAME = %s )", spec );
-    return NULL;
-}
-
-static
-NGS_Alignment * SRA_ReadCollectionGetAlignments ( SRA_ReadCollection * self, ctx_t ctx,
-    bool wants_primary, bool wants_secondary )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    // create empty alignment iterator
-    return NGS_AlignmentMakeNull ( ctx, NGS_StringData(self -> run_name, ctx), NGS_StringSize(self -> run_name, ctx) );
-}
-
-static
-NGS_Alignment * SRA_ReadCollectionGetAlignment ( SRA_ReadCollection * self, ctx_t ctx, const char * alignmentId )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    // always fail
-    INTERNAL_ERROR ( xcRowNotFound, "Aligment not found ( ID = %ld )", alignmentId );
-    return NULL;
-}
-
-static
-uint64_t SRA_ReadCollectionGetAlignmentCount ( SRA_ReadCollection * self, ctx_t ctx,
-    bool wants_primary, bool wants_secondary )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    return 0;
-}
-
-static
-NGS_Alignment * SRA_ReadCollectionGetAlignmentRange ( SRA_ReadCollection * self, ctx_t ctx, uint64_t first, uint64_t count,
-    bool wants_primary, bool wants_secondary )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    // create empty alignment iterator
-    return NGS_AlignmentMakeNull ( ctx, NGS_StringData(self -> run_name, ctx), NGS_StringSize(self -> run_name, ctx) );
-}
-
-struct NGS_Read * SRA_ReadCollectionGetReads ( SRA_ReadCollection * self, ctx_t ctx,
-    bool wants_full, bool wants_partial, bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    if ( ! wants_unaligned )
-    {
-        return NGS_ReadMakeNull ( ctx, self -> run_name );
-    }
-    else
-    {   /* iterators get their own cursors */
-        TRY ( const NGS_Cursor * curs = NGS_CursorMake ( ctx, self -> tbl, sequence_col_specs, seq_NUM_COLS ) )
-        {
-            NGS_Read * ret = SRA_ReadIteratorMake ( ctx, curs, self -> run_name, wants_full, wants_partial, wants_unaligned );
-            NGS_CursorRelease ( curs, ctx );
-            return ret;
-        }
-    }
-
-    return NULL;
-}
-
-NGS_Read * SRA_ReadCollectionGetRead ( SRA_ReadCollection * self, ctx_t ctx, const char * readIdStr )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    TRY ( struct NGS_Id id = NGS_IdParse ( readIdStr, string_size ( readIdStr ), ctx ) )
-    {
-        if ( string_cmp ( NGS_StringData ( self -> run_name, ctx ),
-            NGS_StringSize ( self -> run_name, ctx ),
-            id . run . addr,
-            id . run . size,
-            id . run . len ) != 0 )
-        {
-            INTERNAL_ERROR ( xcArcIncorrect,
-                " expected '%.*s', actual '%.*s'",
-                NGS_StringSize ( self -> run_name, ctx ),
-                NGS_StringData ( self -> run_name, ctx ),
-                id . run . size,
-                id . run . addr );
-        }
-        else
-        {
-            /* individual reads share one iterator attached to ReadCollection */
-            if ( self -> curs == NULL )
-            {
-                ON_FAIL ( self -> curs = NGS_CursorMake ( ctx, self -> tbl, sequence_col_specs, seq_NUM_COLS ) )
-                    return NULL;
-            }
-            return SRA_ReadMake ( ctx, self -> curs, id . rowId, self -> run_name );
-        }
-    }
-    return NULL;
-}
-
-static
-uint64_t SRA_ReadCollectionGetReadCount ( SRA_ReadCollection * self, ctx_t ctx, bool wants_full, bool wants_partial, bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    if ( ! wants_unaligned )
-        return 0;
-
-    if ( self -> curs == NULL )
-    {
-        ON_FAIL ( self -> curs = NGS_CursorMake ( ctx, self -> tbl, sequence_col_specs, seq_NUM_COLS ) )
-            return 0;
-    }
-
-    return NGS_CursorGetRowCount ( self -> curs, ctx );
-}
-
-NGS_Read * SRA_ReadCollectionGetReadRange ( SRA_ReadCollection * self, ctx_t ctx, uint64_t first, uint64_t count,
-        bool wants_full, bool wants_partial, bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcAccessing );
-
-    /* iterators get their own cursors */
-    TRY ( const NGS_Cursor * curs = NGS_CursorMake ( ctx, self -> tbl, sequence_col_specs, seq_NUM_COLS ) )
-    {
-        NGS_Read * ret = SRA_ReadIteratorMakeRange ( ctx, curs, self -> run_name, first, count, wants_full, wants_partial, wants_unaligned );
-        NGS_CursorRelease ( curs, ctx );
-        return ret;
-    }
-
-    return NULL;
-}
-
-static struct NGS_Statistics* SRA_ReadCollectionGetStatistics ( SRA_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    TRY ( NGS_Statistics * ret = SRA_StatisticsMake ( ctx ) )
-    {
-        TRY ( SRA_StatisticsLoadTableStats ( ret, ctx, self -> tbl, "SEQUENCE" ) )
-        {
-            return ret;
-        }
-        NGS_StatisticsRelease ( ret, ctx );
-    }
-
-    return NULL;
-}
-
-static struct NGS_FragmentBlobIterator* SRA_ReadCollectionGetFragmentBlobs ( SRA_ReadCollection * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    TRY ( NGS_FragmentBlobIterator* ret = NGS_FragmentBlobIteratorMake ( ctx, self -> run_name, self -> tbl ) )
-    {
-        return ret;
-    }
-
-    return NULL;
-}
-
-static NGS_ReadCollection_vt SRA_ReadCollection_vt =
-{
-    /* NGS_Refcount */
-    { SRA_ReadCollectionWhack },
-
-    /* NGS_Read_Collection */
-    SRA_ReadCollectionGetName,
-    SRA_ReadCollectionGetReadGroups,
-    SRA_ReadCollectionHasReadGroup,
-    SRA_ReadCollectionGetReadGroup,
-    SRA_ReadCollectionGetReferences,
-    SRA_ReadCollectionHasReference,
-    SRA_ReadCollectionGetReference,
-    SRA_ReadCollectionGetAlignments,
-    SRA_ReadCollectionGetAlignment,
-    SRA_ReadCollectionGetAlignmentCount,
-    SRA_ReadCollectionGetAlignmentRange,
-    SRA_ReadCollectionGetReads,
-    SRA_ReadCollectionGetRead,
-    SRA_ReadCollectionGetReadCount,
-    SRA_ReadCollectionGetReadRange,
-    SRA_ReadCollectionGetStatistics,
-    SRA_ReadCollectionGetFragmentBlobs
-};
-
-NGS_ReadCollection * NGS_ReadCollectionMakeVTable ( ctx_t ctx, const VTable *tbl, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcConstructing );
-
-    size_t spec_size;
-    SRA_ReadCollection * ref;
-
-    assert ( tbl != NULL );
-
-    assert ( spec != NULL );
-    spec_size = string_size ( spec );
-    assert ( spec_size != 0 );
-
-    ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating SRA_ReadCollection ( '%s' )", spec );
-    else
-    {
-        TRY ( NGS_ReadCollectionInit ( ctx, & ref -> dad, & SRA_ReadCollection_vt, "SRA_ReadCollection", spec ) )
-        {
-            const char * name, * dot, * end;
-
-            ref -> tbl = tbl;
-
-            end = & spec [ spec_size ];
-
-            /* TBD - this is a hack */
-            name = string_rchr ( spec, spec_size, '/' );
-            if ( name ++ == NULL )
-                name = spec;
-
-            dot = string_rchr ( name, end - name, '.' );
-            if ( dot != NULL )
-            {
-                if ( strcase_cmp ( dot, end - dot, ".ncbi_enc", sizeof ".ncbi_enc" - 1, -1 ) == 0 )
-                {
-                    end = dot;
-                    dot = string_rchr ( name, end - name, '.' );
-                }
-                if ( dot != NULL && strcase_cmp ( dot, end - dot, ".sra", sizeof ".sra" - 1, -1 ) == 0 )
-                    end = dot;
-            }
-
-            /* initialize "name" */
-            TRY ( ref -> run_name = NGS_StringMakeCopy ( ctx, name, end - name ) )
-            {
-                return & ref -> dad;
-            }
-        }
-
-        free ( ref );
-    }
-
-    VTableRelease ( tbl );
-
-    return NULL;
-}
diff --git a/libs/ngs/SRA_ReadGroup.c b/libs/ngs/SRA_ReadGroup.c
deleted file mode 100644
index be6a96e..0000000
--- a/libs/ngs/SRA_ReadGroup.c
+++ /dev/null
@@ -1,429 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "SRA_ReadGroup.h"
-
-#include "SRA_Read.h"
-#include "SRA_ReadGroupInfo.h"
-#include "SRA_Statistics.h"
-
-#include "NGS_String.h"
-#include "NGS_Cursor.h"
-#include "NGS_Id.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/refcount.h>
-#include <vdb/cursor.h>
-#include <vdb/schema.h>
-#include <vdb/vdb-priv.h>
-#include <insdc/insdc.h>
-
-#include <strtol.h> /* strtoi64 */
-
-#include <stddef.h>
-#include <assert.h>
-
-#include <sysalloc.h>
-
-/*--------------------------------------------------------------------------
- * SRA_Read
- */
-
-struct SRA_ReadGroup
-{
-    NGS_ReadGroup dad;   
-    
-    const NGS_String * run_name; 
-    const NGS_String * name; /* owns the char buffer */
-    
-    const NGS_Cursor * curs;
-    const SRA_ReadGroupInfo* group_info;
-    
-    bool seen_first;
-    bool iterating;
-    
-    uint32_t cur_group;
-};
-
-static void                     SRA_ReadGroupWhack ( SRA_ReadGroup * self, ctx_t ctx );
-static struct NGS_String*       SRA_ReadGroupGetName ( const SRA_ReadGroup * self, ctx_t ctx );
-static struct NGS_Read*         SRA_ReadGroupGetReads ( const SRA_ReadGroup * self, ctx_t ctx, bool wants_full, bool wants_partial, bool wants_unaligned );
-static struct NGS_Read*         SRA_ReadGroupGetRead ( const SRA_ReadGroup * self, ctx_t ctx, const char* readId );
-static struct NGS_Statistics*   SRA_ReadGroupGetStatistics ( const SRA_ReadGroup * self, ctx_t ctx );
-static bool                     SRA_ReadGroupIteratorNext ( SRA_ReadGroup * self, ctx_t ctx );
-
-static NGS_ReadGroup_vt NGS_ReadGroup_vt_inst =
-{
-    {
-        /* NGS_RefCount */
-        SRA_ReadGroupWhack
-    },
-
-    /* NGS_ReadGroup */
-    SRA_ReadGroupGetName,
-    SRA_ReadGroupGetReads,
-    SRA_ReadGroupGetRead,
-    SRA_ReadGroupGetStatistics,
-    SRA_ReadGroupIteratorNext,
-}; 
-
-/* Init
- */
-static
-void SRA_ReadGroupInit ( ctx_t ctx, 
-                         SRA_ReadGroup * self, 
-                         const char *clsname, 
-                         const char *instname, 
-                         const NGS_String* run_name, 
-                         const char* group_name, size_t group_name_size,
-                         const struct SRA_ReadGroupInfo* group_info )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    if ( self == NULL )
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    else
-    {
-        TRY ( NGS_ReadGroupInit ( ctx, & self -> dad, & NGS_ReadGroup_vt_inst, clsname, instname ) )
-        {   
-            TRY ( self -> run_name = NGS_StringDuplicate ( run_name, ctx ) )
-            {
-                TRY ( self -> name = NGS_StringMakeCopy ( ctx, group_name, group_name_size ) )
-                {
-                    self -> group_info = SRA_ReadGroupInfoDuplicate ( group_info, ctx );
-                }
-            }
-        }
-    }
-}
-
-/* Whack
- */
-static
-void SRA_ReadGroupWhack ( SRA_ReadGroup * self, ctx_t ctx )
-{
-    NGS_StringRelease ( self -> run_name, ctx );
-    NGS_StringRelease ( self -> name, ctx );
-    NGS_CursorRelease ( self -> curs, ctx );
-    SRA_ReadGroupInfoRelease ( self -> group_info, ctx );
-}
-
-struct NGS_String* SRA_ReadGroupGetName ( const SRA_ReadGroup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    
-    assert ( self != NULL );
-    
-    if ( ! self -> seen_first ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "ReadGroup accessed before a call to ReadIteratorNext()" );
-        return NULL;
-    }
-    else if ( self -> cur_group >= self -> group_info -> count )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-    
-    return NGS_StringDuplicate ( self -> name, ctx );
-}
-
-struct NGS_Read* SRA_ReadGroupGetReads ( const SRA_ReadGroup * self, ctx_t ctx, bool wants_full, bool wants_partial, bool wants_unaligned )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    
-    if ( ! self -> seen_first ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "ReadGroup accessed before a call to ReadIteratorNext()" );
-        return NULL;
-    }    
-    else if ( self -> cur_group >= self -> group_info -> count )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-    
-    {   
-        uint64_t start = self -> group_info -> groups [ self -> cur_group ] . min_row;
-        uint64_t count = self -> group_info -> groups [ self -> cur_group ] . max_row - start;
-        return SRA_ReadIteratorMakeReadGroup ( ctx,         
-                                               self -> curs, 
-                                               self -> run_name, 
-                                               self -> name, 
-                                               start, 
-                                               count, 
-                                               wants_full, 
-                                               wants_partial, 
-                                               wants_unaligned );
-    }
-}
-
-struct NGS_Read* SRA_ReadGroupGetRead ( const SRA_ReadGroup * self, ctx_t ctx, const char* readIdStr )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    
-    if ( ! self -> seen_first ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "ReadGroup accessed before a call to ReadIteratorNext()" );
-        return NULL;
-    }    
-    else if ( self -> cur_group >= self -> group_info -> count )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-    
-    {
-        TRY ( struct NGS_Id id = NGS_IdParse ( readIdStr, string_size ( readIdStr ), ctx ) )
-        {
-            if ( string_cmp ( NGS_StringData ( self -> run_name, ctx ), 
-                NGS_StringSize ( self -> run_name, ctx ),
-                id . run . addr, 
-                id . run . size, 
-                id . run . len ) != 0 ) 
-            {
-                INTERNAL_ERROR ( xcArcIncorrect, 
-                    " expected '%.*s', actual '%.*s'", 
-                    NGS_StringSize ( self -> run_name, ctx ),
-                    NGS_StringData ( self -> run_name, ctx ), 
-                    id . run . size, 
-                    id . run . addr );
-            }    
-            else
-            {   
-                /* make sure the requested read is from this read group */
-                NGS_Read* ret;
-                TRY ( ret = SRA_ReadMake ( ctx, self -> curs, id . rowId, self -> run_name ) )
-                {   
-                    TRY ( const NGS_String* readGroup = NGS_ReadGetReadGroup ( ret, ctx ) )
-                    {
-                        if ( string_cmp ( NGS_StringData ( self -> name, ctx ), 
-                            NGS_StringSize ( self -> name, ctx ),
-                            NGS_StringData ( readGroup, ctx ), 
-                            NGS_StringSize ( readGroup, ctx ),
-                            NGS_StringSize ( readGroup, ctx ) ) == 0 ) 
-                        {
-                            NGS_StringRelease ( readGroup, ctx );
-                            return ret; 
-                        }
-                        INTERNAL_ERROR ( xcWrongReadGroup, 
-                            "Requested read is from a difference read group (expected '%.*s', actual '%.s')", 
-                            NGS_StringSize ( self -> name, ctx ),
-                            NGS_StringData ( self -> name, ctx ), 
-                            NGS_StringSize ( readGroup, ctx ),                            
-                            NGS_StringData ( readGroup, ctx ) );
-                        NGS_StringRelease ( readGroup, ctx );
-                    }
-                    NGS_ReadRelease ( ret, ctx );
-                }
-            }
-        }
-    }
-    return NULL;
-}
-
-static struct NGS_Statistics* SRA_ReadGroupGetStatistics ( const SRA_ReadGroup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    
-    if ( ! self -> seen_first ) 
-    {
-        USER_ERROR ( xcIteratorUninitialized, "ReadGroup accessed before a call to ReadIteratorNext()" );
-        return NULL;
-    }    
-    else if ( self -> cur_group >= self -> group_info -> count )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-
-    {
-        const struct SRA_ReadGroupStats * group_stats = & self -> group_info -> groups [ self -> cur_group ];
-        TRY ( NGS_Statistics * ret = SRA_StatisticsMake ( ctx ) )
-        {
-            TRY ( NGS_StatisticsAddU64 ( ret, ctx, "BASE_COUNT", group_stats -> base_count ) )
-            {
-                TRY ( NGS_StatisticsAddU64 ( ret, ctx, "BIO_BASE_COUNT", group_stats -> bio_base_count ) )
-                {
-                    TRY ( NGS_StatisticsAddU64 ( ret, ctx, "SPOT_COUNT", group_stats -> row_count ) )
-                    {
-                        TRY ( NGS_StatisticsAddU64 ( ret, ctx, "SPOT_MAX", group_stats -> max_row) )
-                        {
-                            TRY ( NGS_StatisticsAddU64 ( ret, ctx, "SPOT_MIN", group_stats -> min_row) )
-                            {
-                                return ret;
-                            }
-                        }
-                    }
-                }
-            }
-            NGS_StatisticsRelease ( ret, ctx );
-        }
-    }
-    
-    return NULL;
-}
-
-struct NGS_ReadGroup * SRA_ReadGroupMake ( ctx_t ctx, 
-                                           const struct NGS_Cursor * curs, 
-                                           const struct SRA_ReadGroupInfo* group_info, 
-                                           const struct NGS_String * run_name,
-                                           const char * group_name, size_t group_name_size )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-    SRA_ReadGroup * ref;
-
-    assert ( curs != NULL );
-    assert ( run_name != NULL );
-
-    ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating NGS_ReadGroup on '%.*s'", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-    else
-    {
-#if _DEBUGGING
-        char instname [ 256 ];
-        string_printf ( instname, sizeof instname, NULL, "%.*s", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-        instname [ sizeof instname - 1 ] = 0;
-#else
-        const char *instname = "";
-#endif
-        TRY ( SRA_ReadGroupInit ( ctx, ref, "NGS_ReadGroup", instname, run_name, group_name, group_name_size, group_info ) )
-        {
-            TRY ( ref -> curs = NGS_CursorDuplicate ( curs, ctx ) )
-            {
-                TRY ( ref -> cur_group = SRA_ReadGroupInfoFind ( ref -> group_info, ctx, group_name, group_name_size ) )
-                {
-                    ref -> seen_first = true;
-                    return & ref -> dad;
-                }
-            }
-            SRA_ReadGroupWhack ( ref, ctx );
-        }
-
-        free ( ref );
-    }
-
-    return NULL;
-}                                            
-
-
-/*--------------------------------------------------------------------------
- * NGS_ReadGroupIterator
- */
- 
-/* Make
- */
-NGS_ReadGroup * SRA_ReadGroupIteratorMake ( ctx_t ctx, 
-                                                  const NGS_Cursor * curs, 
-                                                  const struct SRA_ReadGroupInfo* group_info, 
-                                                  const struct NGS_String * run_name )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    SRA_ReadGroup * ref;
-
-    assert ( curs != NULL );
-    assert ( run_name != NULL );
-
-    ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating NGS_ReadGroupIterator on '%.*s'", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-    else
-    {
-#if _DEBUGGING
-        char instname [ 256 ];
-        string_printf ( instname, sizeof instname, NULL, "%.*s", NGS_StringSize ( run_name, ctx ), NGS_StringData ( run_name, ctx ) );
-        instname [ sizeof instname - 1 ] = 0;
-#else
-        const char *instname = "";
-#endif
-        TRY ( SRA_ReadGroupInit ( ctx, ref, "NGS_ReadGroupIterator", instname, run_name, "", 0, group_info ) )
-        {
-            TRY ( ref -> curs = NGS_CursorDuplicate ( curs, ctx ) )
-            {
-                ref -> iterating = true;
-                return & ref -> dad;
-            }
-            SRA_ReadGroupWhack ( ref, ctx );
-        }
-
-        free ( ref );
-    }
-
-    return NULL;
-}
-
-/* Next
- */
-bool SRA_ReadGroupIteratorNext ( SRA_ReadGroup * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-
-    assert ( self != NULL );
-    
-    if ( ! self -> iterating )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return false;
-    }
-
-    if ( self -> seen_first )
-    {   /* move to next group */
-        ++ self -> cur_group;
-    }
-    else
-    {
-        self -> seen_first = true;
-    }
-
-    while ( self -> cur_group < self -> group_info -> count )
-    {
-        if ( self -> group_info -> groups [ self -> cur_group ] . min_row == 0 )
-        {
-           ++ self -> cur_group;
-        }
-        else
-        {
-            NGS_StringRelease ( self -> name, ctx );
-            self -> name = NULL;
-            TRY ( self -> name = NGS_StringDuplicate ( self -> group_info -> groups [ self -> cur_group ] . name, ctx ) )
-            {
-                return true;
-            }
-            /* error - make the iterator unusable */
-            self -> cur_group = self -> group_info -> count;
-            return false;
-        }
-    }
-    
-    return false;
-}
diff --git a/libs/ngs/SRA_ReadGroup.h b/libs/ngs/SRA_ReadGroup.h
deleted file mode 100644
index 60d111d..0000000
--- a/libs/ngs/SRA_ReadGroup.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_readgroup_
-#define _h_sra_readgroup_
-
-typedef struct SRA_ReadGroup SRA_ReadGroup;
-#ifndef _h_ngs_readgroup_
-#define NGS_READGROUP SRA_ReadGroup
-#include "NGS_ReadGroup.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct NGS_Cursor;
-struct SRA_ReadGroupInfo;
-struct NGS_String;
-
-/*--------------------------------------------------------------------------
- * SRA_ReadGroup
- */
-
-/* Make
-    run_name : will be used for unnamed group if name == NULL
-    group_name : NULL OK, will locate unnamed group and spec as the group's name
- */
-struct NGS_ReadGroup * SRA_ReadGroupMake ( ctx_t ctx, 
-                                                 const struct NGS_Cursor * curs, 
-                                                 const struct SRA_ReadGroupInfo* group_info, 
-                                                 const struct NGS_String * run_name,
-                                                 const char * group_name, size_t group_name_size ); 
-
-/* IteratorMake
-    run_name : will be used for unnamed group
- */
-struct NGS_ReadGroup * SRA_ReadGroupIteratorMake ( ctx_t ctx, 
-                                                         const struct NGS_Cursor * curs, 
-                                                         const struct SRA_ReadGroupInfo* group_info, 
-                                                         const struct NGS_String * run_name ); 
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_readgroup_ */
diff --git a/libs/ngs/SRA_ReadGroupInfo.c b/libs/ngs/SRA_ReadGroupInfo.c
deleted file mode 100644
index 6e7f9a0..0000000
--- a/libs/ngs/SRA_ReadGroupInfo.c
+++ /dev/null
@@ -1,333 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "SRA_ReadGroupInfo.h"
-
-#include "NGS_String.h"
-
-#include <klib/namelist.h>
-#include <klib/rc.h>
-
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-
-#include <kdb/meta.h>
-#include <kdb/namelist.h>
-
-#include <vdb/table.h>
-
-#include <sysalloc.h>
-#include <string.h>
-
-const SRA_ReadGroupInfo* SRA_ReadGroupInfoDuplicate ( const SRA_ReadGroupInfo* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "SRA_ReadGroupInfo" ) )
-        {
-        case krefOkay:
-            break;
-        case krefLimit:
-            {
-                FUNC_ENTRY ( ctx, rcSRA, rcRefcount, rcAttaching );
-                INTERNAL_ERROR ( xcRefcountOutOfBounds, "SRA_ReadGroupInfo at %#p", self );
-                atomic32_set ( & ( ( SRA_ReadGroupInfo * ) self ) -> refcount, 0 );
-                break;
-            }
-        }
-    }
-
-    return self;
-}
-
-static
-void
-SRA_ReadGroupInfoWhack( const SRA_ReadGroupInfo* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    
-    uint32_t i;
-    for ( i = 0; i < self -> count; ++i )
-    {
-        NGS_StringRelease ( self -> groups [ i ] . name, ctx );
-    }
-    
-    free ( ( void * ) self );
-}
-
-static
-uint64_t ReadU64 ( const struct KMetadata * meta, ctx_t ctx, const char* fmt, const char* name )
-{
-    uint64_t ret = 0;
-    
-    const KMDataNode * node;
-    rc_t rc = KMetadataOpenNodeRead ( meta, & node, fmt, name );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcUnexpected, "KMetadataOpenNodeRead(%s) rc = %R", name, rc );
-    }
-    else
-    {
-        rc = KMDataNodeReadAsU64 ( node, & ret );
-        if ( rc != 0 )
-        {
-            INTERNAL_ERROR ( xcUnexpected, "KMDataNodeReadAsU64(%s) rc = %R", name, rc );
-        }
-        KMDataNodeRelease ( node );
-    }
-    
-    return ret;
-}            
-
-static
-void ParseBamHeader ( struct SRA_ReadGroupStats * self, ctx_t ctx, const struct KMetadata * meta, const char* group_name )
-{
-
-}
-
-static
-void SRA_ReadGroupStatsInit( struct SRA_ReadGroupStats * self, ctx_t ctx, const struct KMetadata * meta, const char* group_name )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    
-    const KMDataNode * group_node;
-    bool skip_group = true;
-    rc_t rc;
-    
-    assert ( self );
-    assert ( meta );
-    assert ( group_name );
-
-    rc = KMetadataOpenNodeRead ( meta, & group_node, "STATS/SPOT_GROUP/%s", group_name );
-    if ( rc != 0 )
-    {
-        if ( strcmp ( group_name, "default" ) == 0 &&
-             rc == RC ( rcDB, rcMetadata, rcReading, rcTransfer, rcIncomplete ) )
-        {   /* no default read group - skip */ 
-        }
-        else
-        {
-            INTERNAL_ERROR ( xcUnexpected, "KMetadataOpenNodeRead(STATS/SPOT_GROUP/%s) rc = %R", group_name, rc );
-        }
-    }
-    
-    ON_FAIL ( self -> min_row = ReadU64 ( meta, ctx, "STATS/SPOT_GROUP/%s/SPOT_MIN", group_name ) )
-    {
-        if ( strcmp ( group_name, "default" ) == 0 )
-        {   /* default read group has no data - skip */ 
-            CLEAR ();
-        }
-        else
-        {
-            INTERNAL_ERROR ( xcUnexpected, "KMetadataOpenNodeRead(STATS/SPOT_GROUP/%s/SPOT_MIN) rc = %R", group_name, ctx -> rc );
-        }
-    }
-    else
-    {
-        TRY ( self -> max_row = ReadU64 ( meta, ctx, "STATS/SPOT_GROUP/%s/SPOT_MAX", group_name ) )
-        {
-            TRY ( self -> row_count = ReadU64 ( meta, ctx, "STATS/SPOT_GROUP/%s/SPOT_COUNT", group_name ) )
-            {
-                TRY ( self -> base_count = ReadU64 ( meta, ctx, "STATS/SPOT_GROUP/%s/BASE_COUNT", group_name ) )
-                {
-                    TRY ( self -> bio_base_count = ReadU64 ( meta, ctx, "STATS/SPOT_GROUP/%s/BIO_BASE_COUNT", group_name ) )
-                    {
-                        skip_group = false;
-                    }
-                }
-            }
-        }
-    }
-    
-    if ( skip_group )
-    {
-        self -> name = NGS_StringMake( ctx, "", 0 );
-    }
-    else
-    {
-        TRY ( ParseBamHeader ( self, ctx, meta, group_name ) )
-        {
-            /* if the node has attribute 'name', use it as the read group name, otherwise use the group node's key */
-            char buf[1024];
-            size_t size;
-            rc = KMDataNodeReadAttr ( group_node, "name", buf, sizeof ( buf ), & size );
-            if ( rc == 0 )
-            {
-                self -> name = NGS_StringMakeCopy ( ctx, buf, size );
-            }
-            else if ( GetRCState ( rc ) == rcNotFound )
-            {
-                self -> name = NGS_StringMakeCopy ( ctx, group_name, string_size ( group_name ) );
-            }
-            else
-            {
-                INTERNAL_ERROR ( xcUnexpected, "KMDataNodeReadAttr(STATS/SPOT_GROUP/%s, 'name') rc = %R", group_name, rc );
-            }
-        }
-    }
-    
-    KMDataNodeRelease ( group_node );
-}
-
-void SRA_ReadGroupInfoRelease ( const SRA_ReadGroupInfo* self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "NGS_Refcount" ) )
-        {
-        case krefOkay:
-            break;
-        case krefWhack:
-            SRA_ReadGroupInfoWhack ( self, ctx );
-            break;
-        case krefNegative:
-            {
-                FUNC_ENTRY ( ctx, rcSRA, rcRefcount, rcReleasing );
-                INTERNAL_ERROR ( xcSelfZombie, "SRA_ReadGroupInfo at %#p", self );
-                atomic32_set ( & ( ( SRA_ReadGroupInfo * ) self ) -> refcount, 0 );
-                break;
-            }
-        }
-    }
-}
-
-const SRA_ReadGroupInfo* SRA_ReadGroupInfoMake ( ctx_t ctx, const struct VTable* table )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    
-    rc_t rc = 0;
-    const struct KMetadata * meta;
-    
-    assert ( table != NULL );
-    
-    rc = VTableOpenMetadataRead ( table, & meta );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcUnexpected, "VTableOpenMetadataRead rc = %R", rc );
-    }
-    else
-    {
-        const KMDataNode * groups;
-        rc = KMetadataOpenNodeRead ( meta, & groups, "STATS/SPOT_GROUP" );
-        if ( rc != 0 )
-        {
-            INTERNAL_ERROR ( xcUnexpected, "KMetadataOpenNodeRead rc = %R", rc );
-        }
-        else
-        {
-            struct KNamelist * names;
-            rc = KMDataNodeListChildren ( groups, & names );
-            if ( rc != 0 )
-            {
-                INTERNAL_ERROR ( xcUnexpected, "KMDataNodeListChildren rc = %R", rc );
-            }
-            else
-            {
-                uint32_t count;
-                rc = KNamelistCount ( names, & count );
-                if ( rc != 0 )
-                {
-                    INTERNAL_ERROR ( xcUnexpected, "KNamelistCount rc = %R", rc );
-                }
-                else
-                {
-                    SRA_ReadGroupInfo* ref = calloc ( 1, sizeof ( * ref ) + ( count - 1 ) * sizeof ( ref -> groups [ 0 ] ) );
-                    if ( ref == NULL )
-                    {
-                        SYSTEM_ERROR ( xcNoMemory, "allocating SRA_ReadGroupInfo" );
-                    }
-                    else
-                    {
-                        uint32_t i;
-                        
-                        KRefcountInit ( & ref -> refcount, 1, "SRA_ReadGroupInfo", "Make", "" );
-                        ref -> count = count;
-                        
-                        for ( i = 0; i < count; ++i )
-                        {
-                            const char* group_name;
-                            rc = KNamelistGet ( names, i, & group_name );
-                            if ( rc != 0 )
-                                INTERNAL_ERROR ( xcUnexpected, "KNamelistGet = %R", rc );
-                            else
-                                SRA_ReadGroupStatsInit ( & ref -> groups [ i ], ctx, meta, group_name );
-                                                       
-                            if ( FAILED () )
-                                break;
-                        }
-               
-                        if ( ! FAILED () )
-                        {
-                            KNamelistRelease ( names );
-                            KMDataNodeRelease ( groups );
-                            KMetadataRelease ( meta );
-                            
-                            return ref;
-                        }
-                        
-                        SRA_ReadGroupInfoWhack ( ref, ctx );
-                    }
-                }
-                KNamelistRelease ( names );
-            }
-            KMDataNodeRelease ( groups );
-        }
-        KMetadataRelease ( meta );
-    }
-    return NULL;
-}
-
-uint32_t SRA_ReadGroupInfoFind ( const SRA_ReadGroupInfo* self, ctx_t ctx, char const* name, size_t name_size )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    
-    assert ( self != NULL );
-    assert ( name != NULL );
-
-    {
-        uint32_t i;
-        for ( i = 0; i < self -> count; ++i )
-        {
-            if ( string_cmp ( NGS_StringData ( self -> groups [ i ] . name, ctx ), 
-                              NGS_StringSize ( self -> groups [ i ] . name, ctx ), 
-                              name, 
-                              name_size, 
-                              ( uint32_t ) name_size ) == 0 )
-            {
-                return i;
-            }
-        }
-        INTERNAL_ERROR ( xcStringNotFound, "Read Group '%.*s' is not found", name_size, name );
-    }
-    return 0;
-}
-
-
diff --git a/libs/ngs/SRA_ReadGroupInfo.h b/libs/ngs/SRA_ReadGroupInfo.h
deleted file mode 100644
index af4c148..0000000
--- a/libs/ngs/SRA_ReadGroupInfo.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_readgroupinfo_
-#define _h_sra_readgroupinfo_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-typedef struct SRA_ReadGroupInfo SRA_ReadGroupInfo;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
- 
-struct VTable;
-struct NGS_String;
-
-/*--------------------------------------------------------------------------
- * SRA_ReadGroup
- */
- 
-struct SRA_ReadGroupStats
-{ 
-    const struct NGS_String* name;
-    uint64_t min_row; 
-    uint64_t max_row; 
-    uint64_t row_count; 
-    uint64_t base_count; 
-    uint64_t bio_base_count; 
-    
-    /* BAM header info */
-    const struct NGS_String* bam_LB; /* Library. */
-    const struct NGS_String* bam_SM; /* Sample. */
-};
- 
-struct SRA_ReadGroupInfo 
-{
-    KRefcount refcount;
-    
-    uint32_t count;
-    struct SRA_ReadGroupStats groups[1]; /* actual size = count */
-};
-
-const SRA_ReadGroupInfo* SRA_ReadGroupInfoMake ( ctx_t ctx, const struct VTable* table );
-
-const SRA_ReadGroupInfo* SRA_ReadGroupInfoDuplicate ( const SRA_ReadGroupInfo* self, ctx_t ctx );
-
-void SRA_ReadGroupInfoRelease ( const SRA_ReadGroupInfo* self, ctx_t ctx );
-
-uint32_t SRA_ReadGroupInfoFind ( const SRA_ReadGroupInfo* self, ctx_t ctx, char const* name, size_t name_size );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_readgroupinfo_ */
diff --git a/libs/ngs/SRA_ReferenceSequence.c b/libs/ngs/SRA_ReferenceSequence.c
deleted file mode 100644
index 699855e..0000000
--- a/libs/ngs/SRA_ReferenceSequence.c
+++ /dev/null
@@ -1,374 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "SRA_ReferenceSequence.h"
-
-typedef struct SRA_ReferenceSequence SRA_ReferenceSequence;
-#define NGS_REFERENCESEQUENCE SRA_ReferenceSequence
-#include "NGS_ReferenceSequence.h"
-
-#include "NGS_String.h"
-#include "NGS_Cursor.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/refcount.h>
-
-#include <vdb/manager.h>
-#include <vdb/table.h>
-#include <vdb/database.h>
-#include <vdb/cursor.h>
-#include <vdb/schema.h>
-#include <vdb/vdb-priv.h>
-
-#include <stddef.h>
-#include <assert.h>
-
-#include <strtol.h>
-#include <string.h>
-
-#include <sysalloc.h>
-
-/*--------------------------------------------------------------------------
- * SRA_ReferenceSequence
- */
-
-static void                SRA_ReferenceSequenceWhack ( SRA_ReferenceSequence * self, ctx_t ctx );
-static NGS_String *        SRA_ReferenceSequenceGetCanonicalName ( SRA_ReferenceSequence * self, ctx_t ctx );
-static bool                SRA_ReferenceSequenceGetIsCircular ( SRA_ReferenceSequence const* self, ctx_t ctx );
-static uint64_t            SRA_ReferenceSequenceGetLength ( SRA_ReferenceSequence * self, ctx_t ctx );
-static struct NGS_String * SRA_ReferenceSequenceGetBases ( SRA_ReferenceSequence * self, ctx_t ctx, uint64_t offset, uint64_t size );
-static struct NGS_String * SRA_ReferenceSequenceGetChunk ( SRA_ReferenceSequence * self, ctx_t ctx, uint64_t offset, uint64_t size );
-
-static NGS_ReferenceSequence_vt SRA_ReferenceSequence_vt_inst =
-{
-    /* NGS_Refcount */
-    { SRA_ReferenceSequenceWhack },
-    
-    /* NGS_ReferenceSequence */
-    SRA_ReferenceSequenceGetCanonicalName,
-    SRA_ReferenceSequenceGetIsCircular,
-    SRA_ReferenceSequenceGetLength,
-    SRA_ReferenceSequenceGetBases,
-    SRA_ReferenceSequenceGetChunk,
-};
-
-
-struct SRA_ReferenceSequence
-{
-    NGS_ReferenceSequence dad;
-
-    const VTable * tbl;
-    const struct NGS_Cursor * curs;
-
-    uint32_t chunk_size;
-    
-    int64_t first_row;
-    int64_t last_row;  /* inclusive */
-    uint64_t cur_length; /* size of current reference in bases (0 = not yet counted) */
-};
-
-static char const* g_ReferenceTableColumnNames [] =
-{
-    "(bool)CIRCULAR",
-    /*"(utf8)NAME",*/
-    "(ascii)SEQ_ID",
-    "(INSDC:coord:len)SEQ_LEN",
-    /*"(INSDC:coord:one)SEQ_START",*/
-    "(U32)MAX_SEQ_LEN",
-    "(ascii)READ",
-    /*"(I64)PRIMARY_ALIGNMENT_IDS",
-    "(I64)SECONDARY_ALIGNMENT_IDS",
-    "(INSDC:coord:len)OVERLAP_REF_LEN",
-    "(INSDC:coord:zero)OVERLAP_REF_POS"*/
-};
-
-enum g_ReferenceTableColumns
-{
-    reference_CIRCULAR,
-    /*reference_NAME,*/
-    reference_SEQ_ID,
-    reference_SEQ_LEN,
-    /*reference_SEQ_START,*/
-    reference_MAX_SEQ_LEN,
-    reference_READ,
-    /*reference_PRIMARY_ALIGNMENT_IDS,
-    reference_SECONDARY_ALIGNMENT_IDS,
-    reference_OVERLAP_REF_LEN,
-    reference_OVERLAP_REF_POS,*/
-
-    reference_NUM_COLS
-};
-
-
-static
-void SRA_ReferenceSequenceWhack ( SRA_ReferenceSequence * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcClosing );
-
-    NGS_CursorRelease ( self -> curs, ctx );
-    VTableRelease ( self -> tbl );
-
-    self -> curs = NULL;
-    self -> tbl = NULL;
-}
-
-/* Init
- */
-static
-void SRA_ReferenceSequenceInit ( ctx_t ctx, 
-                           SRA_ReferenceSequence * ref,
-                           const char *clsname, 
-                           const char *instname )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcOpening );
-
-    if ( ref == NULL )
-        INTERNAL_ERROR ( xcParamNull, "bad object reference" );
-    else
-    {
-        TRY ( NGS_ReferenceSequenceInit ( ctx, & ref -> dad, & SRA_ReferenceSequence_vt_inst, clsname, instname ) )
-        {
-            /* TODO: maybe initialize more*/
-        }
-    }
-}
-
-NGS_ReferenceSequence * NGS_ReferenceSequenceMakeSRA ( ctx_t ctx, const char * spec )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcTable, rcOpening );
-
-    SRA_ReferenceSequence * ref;
-
-    assert ( spec != NULL );
-    assert ( spec [0] != '\0' );
-
-    ref = calloc ( 1, sizeof *ref );
-    if ( ref == NULL )
-    {
-        SYSTEM_ERROR ( xcNoMemory, "allocating SRA_ReferenceSequence ( '%s' )", spec );
-    }
-    else
-    {
-        TRY ( SRA_ReferenceSequenceInit ( ctx, ref, "NGS_ReferenceSequence", spec ) )
-        {
-            rc_t rc;
-
-            const VDBManager * mgr = ctx -> rsrc -> vdb;
-            assert ( mgr != NULL );
-
-            rc = VDBManagerOpenTableRead ( mgr, & ref -> tbl, NULL, spec );
-            if ( rc != 0 )
-            {
-                INTERNAL_ERROR ( xcUnexpected, "failed to open table '%s': rc = %R", spec, rc );
-            }
-            else
-            {   /* VDB-2641: examine the schema name to make sure this is an SRA table */
-                char ts_buff[1024];
-                rc = VTableTypespec ( ref -> tbl, ts_buff, sizeof ( ts_buff ) );
-                if ( rc != 0 )
-                {
-                    INTERNAL_ERROR ( xcUnexpected, "VTableTypespec failed: rc = %R", rc );
-                }
-                else
-                {
-                    const char REF_PREFIX[] = "NCBI:refseq:";
-                    size_t pref_size = sizeof ( REF_PREFIX ) - 1;
-                    if ( string_match ( REF_PREFIX, pref_size, ts_buff, string_size ( ts_buff ), (uint32_t)pref_size, NULL ) != pref_size )
-                    {
-                        INTERNAL_ERROR ( xcUnimplemented, "Cannot open accession '%s' as a reference table.", spec );
-                    }
-                    else
-                    {
-                        ref -> curs = NGS_CursorMake ( ctx, ref -> tbl, g_ReferenceTableColumnNames, reference_NUM_COLS );
-                        if ( ref -> curs != NULL )
-                        {
-                            uint64_t row_count = 0;
-                            TRY ( NGS_CursorGetRowRange ( ref->curs, ctx, & ref -> first_row, & row_count ) )
-                            {
-                                ref -> last_row = ref -> first_row + (int64_t) row_count - 1; /* TODO: it might be incorrect in general case */
-                                TRY ( ref -> chunk_size = NGS_CursorGetUInt32 ( ref -> curs, ctx, ref -> first_row, reference_MAX_SEQ_LEN ) )
-                                {
-                                    return (NGS_ReferenceSequence*) ref;
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-            SRA_ReferenceSequenceWhack ( ref , ctx );
-        }
-        free ( ref );
-    }
-    return NULL;
-}
-
-
-int64_t SRA_ReferenceSequence_GetFirstRowId ( const struct NGS_ReferenceSequence * self, ctx_t ctx )
-{
-    assert ( ( void * ) self -> dad . vt == ( void * ) & SRA_ReferenceSequence_vt_inst );
-    return ( ( SRA_ReferenceSequence const * ) self ) -> first_row;
-}
-
-int64_t SRA_ReferenceSequence_GetLastRowId ( const struct NGS_ReferenceSequence * self, ctx_t ctx )
-{
-    assert ( ( void * ) self -> dad . vt == ( void * ) & SRA_ReferenceSequence_vt_inst );
-    return ( ( SRA_ReferenceSequence const * ) self ) -> last_row;
-}
-
-NGS_String * SRA_ReferenceSequenceGetCanonicalName ( SRA_ReferenceSequence * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-    
-    assert ( self != NULL );
-    
-    return NGS_CursorGetString ( self -> curs, ctx, self -> first_row, reference_SEQ_ID);
-}
-
-bool SRA_ReferenceSequenceGetIsCircular ( const SRA_ReferenceSequence * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-   
-    if ( self -> curs == NULL )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return false;
-    }
-
-    /* if current row is valid, read data */
-    if ( self -> first_row <= self -> last_row )
-    {
-        return NGS_CursorGetBool ( self -> curs, ctx, self -> first_row, reference_CIRCULAR );
-    }
-
-    return false;
-}
-
-uint64_t SRA_ReferenceSequenceGetLength ( SRA_ReferenceSequence * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    if ( self -> curs == NULL )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return 0;
-    }
-    
-    if ( self -> cur_length == 0 ) /* not yet calculated */
-    {   
-        self -> cur_length =  self -> chunk_size * ( self -> last_row - self -> first_row ) + 
-                              NGS_CursorGetUInt32 ( self -> curs, 
-                                                    ctx, 
-                                                    self -> last_row, 
-                                                    reference_SEQ_LEN );
-    }
-    
-    return self -> cur_length;
-}
-
-struct NGS_String * SRA_ReferenceSequenceGetBases ( SRA_ReferenceSequence * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{   
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    if ( self -> curs == NULL )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-    
-    {
-        uint64_t totalBases = SRA_ReferenceSequenceGetLength ( self, ctx );
-        if ( offset >= totalBases )
-        {
-            return NGS_StringMake ( ctx, "", 0 );
-        }
-        else
-        {   
-            uint64_t basesToReturn = totalBases - offset;
-            char* data;
-            
-            if (size != (size_t)-1 && basesToReturn > size)
-                basesToReturn = size;
-                
-            data = (char*) malloc ( basesToReturn );
-            if ( data == NULL )
-            {
-                SYSTEM_ERROR ( xcNoMemory, "allocating %lu bases", basesToReturn );
-                return NGS_StringMake ( ctx, "", 0 );
-            }
-            else
-            {
-                size_t cur_offset = 0;
-                while ( cur_offset < basesToReturn )
-                {
-                    /* we will potentially ask for more than available in the current chunk; 
-                    SRA_ReferenceSequenceGetChunkSize will return only as much as is available in the chunk */
-                    NGS_String* chunk = SRA_ReferenceSequenceGetChunk ( self, ctx, offset + cur_offset, basesToReturn - cur_offset );
-                    cur_offset += string_copy(data + cur_offset, basesToReturn - cur_offset, 
-                        NGS_StringData ( chunk, ctx ), NGS_StringSize ( chunk, ctx ) );
-                    NGS_StringRelease ( chunk, ctx );
-                }
-                return NGS_StringMakeOwned ( ctx, data, basesToReturn );
-            }
-        }
-    }
-}
-
-struct NGS_String * SRA_ReferenceSequenceGetChunk ( SRA_ReferenceSequence * self, ctx_t ctx, uint64_t offset, uint64_t size )
-{   
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcReading );
-
-    assert ( self );
-    if ( self -> curs == NULL )
-    {
-        USER_ERROR ( xcCursorExhausted, "No more rows available" );
-        return NULL;
-    }
-
-    if ( offset >= SRA_ReferenceSequenceGetLength ( self, ctx ) )
-    {
-        return NGS_StringMake ( ctx, "", 0 );
-    }
-    else
-    {
-        const NGS_String* read = NGS_CursorGetString ( self -> curs, ctx, self -> first_row + offset / self -> chunk_size, reference_READ);
-        NGS_String* ret;
-        if ( size == (size_t)-1 )
-            ret = NGS_StringSubstrOffset ( read, ctx, offset % self -> chunk_size );
-        else
-            ret = NGS_StringSubstrOffsetSize ( read, ctx, offset % self -> chunk_size, size );
-        NGS_StringRelease ( read, ctx );
-        return ret;
-    }
-}
diff --git a/libs/ngs/SRA_ReferenceSequence.h b/libs/ngs/SRA_ReferenceSequence.h
deleted file mode 100644
index 91f1d90..0000000
--- a/libs/ngs/SRA_ReferenceSequence.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_referencesequence_
-#define _h_sra_referencesequence_
-
-#ifndef _h_kfc_defs_
-#include <kfc/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct NGS_Cursor;
-struct NGS_ReferenceSequenceSequence;
-struct VDatabase;
-
-
-struct NGS_ReferenceSequence * NGS_ReferenceSequenceMakeSRA ( ctx_t ctx,
-                                             const char * spec );
-
-int64_t SRA_ReferenceSequence_GetFirstRowId ( const struct NGS_ReferenceSequence * self, ctx_t ctx );
-int64_t SRA_ReferenceSequence_GetLastRowId ( const struct NGS_ReferenceSequence * self, ctx_t ctx );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_referencesequence_ */
diff --git a/libs/ngs/SRA_Statistics.c b/libs/ngs/SRA_Statistics.c
deleted file mode 100644
index 6e62ec8..0000000
--- a/libs/ngs/SRA_Statistics.c
+++ /dev/null
@@ -1,773 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "SRA_Statistics.h"
-
-#include "NGS_String.h"
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-#include <kfc/except.h>
-#include <kfc/xc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/refcount.h>
-#include <klib/container.h>
-
-#include <kdb/meta.h>
-
-#include <vdb/table.h>
-#include <vdb/database.h>
-
-#include <sysalloc.h>
-
-#include <stddef.h>
-#include <assert.h>
-#include <limits.h>
-#include <math.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include <strtol.h>
-#include <compiler.h>
-
-/* sadly, MSVS does not define trunc */
-static double xtrunc (double x)
-{ 
-    return x < 0 ? ceil ( x ) : floor ( x );
-}
-
-/*--------------------------------------------------------------------------
- * SRA_Read
- */
-
-struct SRA_Statistics
-{
-    NGS_Statistics dad;   
-    
-    BSTree dictionary;
-};
-
-struct DictionaryEntry
-{
-    BSTNode dad;
-    
-    uint32_t type;
-    union 
-    {
-        int64_t     i64;
-        uint64_t    u64;
-        double      real;
-        NGS_String* str;
-    } value;
-    char path[1]; /* 0-terminated */
-};
-typedef struct DictionaryEntry DictionaryEntry;
-
-static void DictionaryEntryWhack ( BSTNode *n, void *data )
-{
-    ctx_t ctx = ( ctx_t ) data;
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcDestroying );
-    
-    DictionaryEntry* entry = ( DictionaryEntry * ) n;
-    
-    if ( entry -> type == NGS_StatisticValueType_String )
-    {
-        NGS_StringRelease ( entry -> value . str, ctx );
-    }
-    
-    free ( n );
-}
-
-static int64_t DictionaryEntryCompare ( const BSTNode *p_a, const BSTNode *p_b )
-{
-    DictionaryEntry* a = ( DictionaryEntry * ) p_a;
-    DictionaryEntry* b = ( DictionaryEntry * ) p_b;
-    
-    size_t a_path_size = string_size ( a -> path );
-    return string_cmp ( a -> path, a_path_size, b -> path, string_size ( b -> path ), ( uint32_t ) a_path_size );
-}
-
-static int64_t DictionaryEntryFind ( const void *p_a, const BSTNode *p_b )
-{
-    const char * a = ( const char * ) p_a;
-    DictionaryEntry* b = ( DictionaryEntry * ) p_b;
-    
-    size_t a_path_size = string_size ( a );
-    return string_cmp ( a, a_path_size, b -> path, string_size ( b -> path ), ( uint32_t ) a_path_size );
-}
-
-static void         SRA_StatisticsWhack         ( SRA_Statistics * self, ctx_t ctx );
-static uint32_t     SRA_StatisticsGetValueType  ( const SRA_Statistics * self, ctx_t ctx, const char * path );
-static NGS_String * SRA_StatisticsGetAsString   ( const SRA_Statistics * self, ctx_t ctx, const char * path );
-static int64_t      SRA_StatisticsGetAsI64      ( const SRA_Statistics * self, ctx_t ctx, const char * path );
-static uint64_t     SRA_StatisticsGetAsU64      ( const SRA_Statistics * self, ctx_t ctx, const char * path );
-static double       SRA_StatisticsGetAsDouble   ( const SRA_Statistics * self, ctx_t ctx, const char * path );
-static bool         SRA_StatisticsNextPath      ( const SRA_Statistics * self, ctx_t ctx, const char * path, const char ** next );
-static void         SRA_StatisticsAddString     ( SRA_Statistics * self, ctx_t ctx, const char * path, const NGS_String * value );
-static void         SRA_StatisticsAddI64        ( SRA_Statistics * self, ctx_t ctx, const char * path, int64_t value );
-static void         SRA_StatisticsAddU64        ( SRA_Statistics * self, ctx_t ctx, const char * path, uint64_t value );
-static void         SRA_StatisticsAddDouble     ( SRA_Statistics * self, ctx_t ctx, const char * path, double value );
-
-static NGS_Statistics_vt SRA_Statistics_vt_inst =
-{
-    {
-        /* NGS_RefCount */
-        SRA_StatisticsWhack
-    },
-
-    /* NGS_Statistics */
-    SRA_StatisticsGetValueType,
-    SRA_StatisticsGetAsString,
-    SRA_StatisticsGetAsI64,               
-    SRA_StatisticsGetAsU64,               
-    SRA_StatisticsGetAsDouble,
-    SRA_StatisticsNextPath,
-    SRA_StatisticsAddString,
-    SRA_StatisticsAddI64,
-    SRA_StatisticsAddU64,
-    SRA_StatisticsAddDouble,
-}; 
-
-void SRA_StatisticsWhack ( SRA_Statistics * self, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcDestroying );
-    
-    assert ( self );
-    
-    BSTreeWhack ( & self -> dictionary, DictionaryEntryWhack, ( void * ) ctx );
-}
-
-uint32_t SRA_StatisticsGetValueType ( const SRA_Statistics * self, ctx_t ctx, const char * path )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-	
-    assert ( self );
-    assert ( path );
-	
-	{
-		DictionaryEntry * node = ( DictionaryEntry * ) 
-			BSTreeFind ( & self -> dictionary, ( const void * ) path, DictionaryEntryFind );
-        if ( node == NULL )
-        {
-            INTERNAL_ERROR ( xcUnexpected, "dictionary item '%s' is not found", path );
-			return NGS_StatisticValueType_Undefined;
-        }
-        else
-        {
-			return node -> type;
-		}
-	}
-}
-
-NGS_String* SRA_StatisticsGetAsString ( const SRA_Statistics * self, ctx_t ctx, const char * path )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    
-    assert ( self );
-    assert ( path );
-    
-    {
-        DictionaryEntry * node = ( DictionaryEntry * ) 
-            BSTreeFind ( & self -> dictionary, ( const void * ) path, DictionaryEntryFind );
-        if ( node == NULL )
-        {
-            INTERNAL_ERROR ( xcUnexpected, "dictionary item '%s' is not found", path );
-        }
-        else
-        {
-            switch ( node -> type )
-            {
-            case NGS_StatisticValueType_UInt64: 
-                {
-                    char buf[1024];
-                    size_t num_writ;
-                    string_printf ( buf, sizeof(buf), &num_writ, "%lu", node -> value . u64 );
-                    return NGS_StringMakeCopy ( ctx, buf, num_writ );
-                }
-                break;
-                
-            case NGS_StatisticValueType_Int64:  
-                {
-                    char buf[1024];
-                    size_t num_writ;
-                    string_printf ( buf, sizeof(buf), &num_writ, "%li", node -> value . i64 );
-                    return NGS_StringMakeCopy ( ctx, buf, num_writ );
-                }
-                
-            case NGS_StatisticValueType_Real:   
-                {
-                    char buf[1024];
-                    size_t num_writ;
-                    string_printf ( buf, sizeof(buf), &num_writ, "%f", node -> value . real );
-                    return NGS_StringMakeCopy ( ctx, buf, num_writ );
-                }
-                
-            case NGS_StatisticValueType_String: 
-                return NGS_StringDuplicate ( node -> value . str, ctx );
-                
-            default :
-                INTERNAL_ERROR ( xcUnexpected, "unexpected type %u for dictionary item '%s'", node -> type, path );
-                break;
-            }
-        }
-    }
-    
-    return 0;
-}
-
-static int64_t NGS_StringToI64( const NGS_String * str, ctx_t ctx )
-{
-    /* have to guarantee NUL-termination for strtoi64/strtod */
-    char buf[4096];
-    if ( sizeof(buf) > NGS_StringSize ( str, ctx ) )
-    {
-        char* end;
-        int64_t value;
-        string_copy ( buf, sizeof(buf), 
-                      NGS_StringData ( str, ctx ), NGS_StringSize ( str, ctx ) );
-        
-        errno = 0;
-        value = strtoi64 ( buf, &end, 10 );
-        if ( *end == 0 )
-        {
-            if ( errno == 0 )   
-            {   
-                return value;
-            }
-        }
-        else
-        {   /* attempt to parse as a double */
-            double dbl;
-            errno = 0;
-            dbl = strtod ( buf, &end );
-            if ( *end == 0 && errno == 0 && dbl >= LLONG_MIN && dbl <= LLONG_MAX )
-            {
-                return ( int64_t ) xtrunc ( dbl );
-            }
-        }
-    }
-    INTERNAL_ERROR ( xcUnexpected, "cannot convert dictionary value '%.*s' from string to int64", 
-                                    NGS_StringSize ( str, ctx ), NGS_StringData ( str, ctx ) );
-    return 0;
-}
-
-int64_t SRA_StatisticsGetAsI64 ( const SRA_Statistics * self, ctx_t ctx, const char * path )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-
-    assert ( self );
-    assert ( path );
-    
-    {
-        DictionaryEntry * node = ( DictionaryEntry * ) 
-            BSTreeFind ( & self -> dictionary, ( const void * ) path, DictionaryEntryFind );
-        if ( node == NULL )
-        {
-            INTERNAL_ERROR ( xcUnexpected, "dictionary item '%s' is not found", path );
-        }
-        else
-        {
-            switch ( node -> type )
-            {
-            case NGS_StatisticValueType_Int64:  
-                return node -> value . i64;
-                
-            case NGS_StatisticValueType_UInt64: 
-                if ( node -> value . u64 > LLONG_MAX )
-                {
-                    INTERNAL_ERROR ( xcUnexpected, "cannot convert dictionary item '%s' from uin64_t to int64_t", path );
-                }
-                else
-                {
-                    return ( int64_t ) node -> value . u64;
-                }
-                break;
-                
-            case NGS_StatisticValueType_Real:   
-                if ( node -> value . real < LLONG_MIN || node -> value . real > LLONG_MAX )
-                {
-                    INTERNAL_ERROR ( xcUnexpected, "cannot convert dictionary item '%s' from double to int64_t", path );
-                }
-                else
-                {
-                    return ( int64_t ) xtrunc ( node -> value . real );
-                }
-                break;
-                
-            case NGS_StatisticValueType_String: 
-                return NGS_StringToI64 ( node -> value . str, ctx );
-                
-            default :
-                INTERNAL_ERROR ( xcUnexpected, "unexpected type %u for dictionary item '%s'", node -> type, path );
-                break;
-            }
-        }
-    }
-    
-    return 0;
-}
-
-static uint64_t NGS_StringToU64( const NGS_String * str, ctx_t ctx )
-{
-    /* have to guarantee NUL-termination for strtou64/strtod */
-    char buf[4096];
-    if ( sizeof(buf) > NGS_StringSize ( str, ctx ) )
-    {
-        char* end;
-        uint64_t value;
-        string_copy ( buf, sizeof(buf), 
-                      NGS_StringData ( str, ctx ), NGS_StringSize ( str, ctx ) );
-                      
-        errno = 0;
-        value = strtou64 ( buf, &end, 10 );
-        if ( *end == 0 ) 
-        {
-            if ( errno == 0 )   
-            {   
-                return value;
-            }
-        }
-        else
-        {   /* attempt to parse as a double */
-            double dbl;
-            errno = 0;
-            dbl = strtod ( buf, &end );
-            if ( *end == 0 && errno == 0 && dbl >= 0 && dbl <= ULLONG_MAX )
-            {
-                return ( uint64_t ) xtrunc ( dbl );
-            }
-        }
-    }
-    INTERNAL_ERROR ( xcUnexpected, "cannot convert dictionary value '%.*s' from string to uint64", 
-                                    NGS_StringSize ( str, ctx ), NGS_StringData ( str, ctx ) );
-    return 0;
-}
-
-uint64_t SRA_StatisticsGetAsU64 ( const SRA_Statistics * self, ctx_t ctx, const char * path )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    
-    assert ( self );
-    assert ( path );
-    
-    {
-        DictionaryEntry * node = ( DictionaryEntry * ) 
-            BSTreeFind ( & self -> dictionary, ( const void * ) path, DictionaryEntryFind );
-        if ( node == NULL )
-        {
-            INTERNAL_ERROR ( xcUnexpected, "dictionary item '%s' is not found", path );
-        }
-        else
-        {
-            switch ( node -> type )
-            {
-            case NGS_StatisticValueType_Int64:  
-                if ( node -> value . i64 < 0 )
-                {
-                    INTERNAL_ERROR ( xcUnexpected, "cannot convert dictionary item '%s' from in64_t to uint64_t", path );
-                }
-                else
-                {
-                    return ( uint64_t ) node -> value . i64;
-                }
-                break;
-                
-            case NGS_StatisticValueType_UInt64: 
-                return node -> value . i64; 
-            
-            case NGS_StatisticValueType_Real:   
-                if ( node -> value . real < 0 || node -> value . real > ULLONG_MAX )
-                {
-                    INTERNAL_ERROR ( xcUnexpected, "cannot convert dictionary item '%s' from double to uint64_t", path );
-                }
-                else
-                {
-                    return ( uint64_t ) xtrunc ( node -> value . real );
-                }
-                break;
-            
-            case NGS_StatisticValueType_String: 
-                return NGS_StringToU64 ( node -> value . str, ctx );
-                
-            default :
-                INTERNAL_ERROR ( xcUnexpected, "unexpected type %u for dictionary item '%s'", node -> type, path );
-                break;
-            }
-        }
-    }
-    
-    return 0;
-}
-
-static double NGS_StringToReal ( const NGS_String * str, ctx_t ctx )
-{
-    /* have to guarantee NUL-termination for strtod */
-    char buf[4096];
-    if ( sizeof(buf) > NGS_StringSize ( str, ctx ) )
-    {
-        char* end;
-        double real;
-        string_copy ( buf, sizeof(buf), 
-                      NGS_StringData ( str, ctx ), NGS_StringSize ( str, ctx ) );
-
-        errno = 0;
-        real = strtod ( buf, &end );
-        if ( *end == 0 && errno == 0 )   
-        {
-            return real;
-        }
-    }
-    INTERNAL_ERROR ( xcUnexpected, "cannot convert dictionary value '%.*s' from string to numeric", 
-                                    NGS_StringSize ( str, ctx ), NGS_StringData ( str, ctx ) );
-    return 0.0;
-}
-
-double SRA_StatisticsGetAsDouble ( const SRA_Statistics * self, ctx_t ctx, const char * path )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    
-    assert ( self );
-    assert ( path );
-    
-    {
-        DictionaryEntry * node = ( DictionaryEntry * ) 
-            BSTreeFind ( & self -> dictionary, ( const void * ) path, DictionaryEntryFind );
-        if ( node == NULL )
-        {
-            INTERNAL_ERROR ( xcUnexpected, "dictionary item '%s' is not found", path );
-        }
-        else
-        {
-            switch ( node -> type )
-            {
-            case NGS_StatisticValueType_Int64:  
-                return ( double ) node -> value . i64;
-                
-            case NGS_StatisticValueType_UInt64: 
-                return ( double ) node -> value . u64;
-                
-            case NGS_StatisticValueType_Real:   
-                return node -> value . real;
-                
-            case NGS_StatisticValueType_String: 
-                return NGS_StringToReal ( node -> value . str, ctx );
-                break;
-                
-            default :
-                INTERNAL_ERROR ( xcUnexpected, "unexpected type %u for dictionary item '%s'", node -> type, path );
-                break;
-            }
-        }
-    }
-    
-    return 0;
-}
-
-bool SRA_StatisticsNextPath ( const SRA_Statistics * self, ctx_t ctx, const char * path, const char** next )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    const DictionaryEntry * node;
-    
-    assert ( self );
-    assert ( path );
-    
-    if ( path[0] == 0 ) 
-    {
-        node = ( const DictionaryEntry * ) BSTreeFirst ( & self -> dictionary );
-    }
-    else
-    {
-        node = ( const DictionaryEntry * ) BSTreeFind ( & self -> dictionary, ( const void * ) path, DictionaryEntryFind );
-        if ( node == NULL )
-        {
-            INTERNAL_ERROR ( xcUnexpected, "dictionary item '%s' is not found", path );
-        }
-        else
-        {
-            node = ( const DictionaryEntry * ) BSTNodeNext ( & node -> dad );
-        }
-    }
-    
-    if ( node == NULL )
-    {
-        *next = NULL;
-        return false;
-    }
-    *next = node -> path;
-    return true;
-}
-
-static
-DictionaryEntry * MakeNode ( SRA_Statistics * self, ctx_t ctx, const char * path )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    
-    size_t path_size = string_size ( path );
-    DictionaryEntry * node = malloc ( sizeof ( * node ) + path_size );
-    if ( node == NULL )
-    {
-        SYSTEM_ERROR ( xcNoMemory, "allocating dictionary item" );
-    }
-    else
-    {
-        rc_t rc;
-        string_copy ( node -> path, path_size + 1, path, path_size );
-        
-        /*TODO: decide whether to allow overwriting (not allowed now) */
-        rc = BSTreeInsertUnique ( & self -> dictionary, & node -> dad, NULL, DictionaryEntryCompare );
-        if ( rc == 0 )
-        {
-            return node;
-        }
-        
-        INTERNAL_ERROR ( xcUnexpected, "inserting dictionary item '%s' rc = %R", node -> path, rc );
-        free ( node );
-    }
-    return NULL;
-}
-
-void SRA_StatisticsAddString ( SRA_Statistics * self, ctx_t ctx, const char * path, const NGS_String * value )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    
-    assert ( self );
-    assert ( path );
-    
-    {
-        TRY ( DictionaryEntry * node = MakeNode ( self, ctx, path ) )
-        {
-            node -> type = NGS_StatisticValueType_String;
-            node -> value . str = NGS_StringDuplicate ( value, ctx );
-        }
-    }
-}
-
-void SRA_StatisticsAddI64 ( SRA_Statistics * self, ctx_t ctx, const char * path, int64_t value )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    
-    assert ( self );
-    assert ( path );
-    
-    {
-        TRY ( DictionaryEntry * node = MakeNode ( self, ctx, path ) )
-        {
-            node -> type = NGS_StatisticValueType_Int64;
-            node -> value . i64 = value;
-        }
-    }
-}
-
-void SRA_StatisticsAddU64 ( SRA_Statistics * self, ctx_t ctx, const char * path, uint64_t value )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    
-    assert ( self );
-    assert ( path );
-    
-    {
-        TRY ( DictionaryEntry * node = MakeNode ( self, ctx, path ) )
-        {
-            node -> type = NGS_StatisticValueType_UInt64;
-            node -> value . u64 = value;
-        }
-    }
-}
-
-void SRA_StatisticsAddDouble ( SRA_Statistics * self, ctx_t ctx, const char * path, double value )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcDatabase, rcAccessing );
-    
-    assert ( self );
-    assert ( path );
-    
-    if ( isnan ( value ) ) 
-    {
-        INTERNAL_ERROR ( xcUnexpected, "NAN is not supported" );
-    }
-    else
-    {
-        TRY ( DictionaryEntry * node = MakeNode ( self, ctx, path ) )
-        {
-            node -> type = NGS_StatisticValueType_Real;
-            node -> value . real = value;
-        }
-    }
-}
-
-NGS_Statistics * SRA_StatisticsMake ( ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcConstructing );
-
-    SRA_Statistics * ref;
-
-    ref = calloc ( 1, sizeof * ref );
-    if ( ref == NULL )
-        SYSTEM_ERROR ( xcNoMemory, "allocating SRA_Statistics" );
-    else
-    {
-        TRY ( NGS_StatisticsInit ( ctx, & ref -> dad, & SRA_Statistics_vt_inst, "SRA_Statistics", "" ) )
-        {   
-            BSTreeInit ( & ref -> dictionary );
-            return & ref -> dad;
-        }
-        
-        free ( ref );
-    }
-
-    return NULL;
-}
-
-static
-uint64_t KMetadata_ReadU64 ( const struct KMetadata * meta, ctx_t ctx, const char* name )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    
-    uint64_t ret = 0;
-    
-    const KMDataNode * node;
-    rc_t rc = KMetadataOpenNodeRead ( meta, & node, "%s", name );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcUnexpected, "KMetadataOpenNodeRead(%s) rc = %R", name, rc );
-    }
-    else
-    {
-        rc = KMDataNodeReadAsU64 ( node, & ret );
-        if ( rc != 0 )
-        {
-            INTERNAL_ERROR ( xcUnexpected, "KMDataNodeReadAsU64(%s) rc = %R", name, rc );
-        }
-        KMDataNodeRelease ( node );
-    }
-    
-    return ret;
-}            
-
-static
-NGS_String * KMetadata_ReadString ( const struct KMetadata * meta, ctx_t ctx, const char* name )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    
-    const KMDataNode * node;
-    rc_t rc = KMetadataOpenNodeRead ( meta, & node, "%s", name );
-    if ( rc == 0 )
-    {
-        char dummy;
-        size_t num_read;
-        size_t remaining;
-        char * buf;
-        KMDataNodeRead ( node, 0, & dummy, 0, & num_read, & remaining );
-        
-        buf = malloc ( remaining );
-        if ( buf == NULL )
-        {
-            INTERNAL_ERROR ( xcUnexpected, "malloc (%u) failed", remaining );
-        }
-        else
-        {
-            rc = KMDataNodeRead ( node, 0, buf, remaining, & num_read, NULL );
-            if ( rc != 0 )
-            {
-                INTERNAL_ERROR ( xcUnexpected, "KMDataNodeRead(%s) rc = %R", name, rc );
-            }
-            else
-            {
-                NGS_String * ret = NGS_StringMakeOwned ( ctx, buf, remaining );
-                KMDataNodeRelease ( node );
-                return ret;
-            }
-            free ( buf );
-        }
-        KMDataNodeRelease ( node );
-    }
-    
-    return NULL;
-}            
-
-void AddWithPrefix( NGS_Statistics * self, ctx_t ctx, const char* prefix, const char* path, uint64_t value )
-{
-    char full_path[1024];
-    string_printf( full_path, sizeof (full_path ), NULL, "%s/%s", prefix, path );
-    NGS_StatisticsAddU64 ( self, ctx, full_path, value );
-}
-
-void SRA_StatisticsLoadTableStats ( NGS_Statistics * self, ctx_t ctx, const struct VTable* tbl, const char* prefix )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    
-    const struct KMetadata * meta;
-    
-    rc_t rc = VTableOpenMetadataRead ( tbl, & meta );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcUnexpected, "VTableOpenMetadataRead rc = %R", rc );
-    }
-    else
-    {
-        ON_FAIL ( AddWithPrefix ( self, ctx, prefix, "BASE_COUNT",
-                                  KMetadata_ReadU64 ( meta, ctx, "STATS/TABLE/BASE_COUNT" ) ) ) CLEAR ();
-        ON_FAIL ( AddWithPrefix ( self, ctx, prefix, "BIO_BASE_COUNT",   
-                                  KMetadata_ReadU64 ( meta, ctx, "STATS/TABLE/BIO_BASE_COUNT" ) ) ) CLEAR ();
-        ON_FAIL ( AddWithPrefix ( self, ctx, prefix, "CMP_BASE_COUNT",   
-                                  KMetadata_ReadU64 ( meta, ctx, "STATS/TABLE/CMP_BASE_COUNT" ) ) ) CLEAR ();
-        ON_FAIL ( AddWithPrefix ( self, ctx, prefix, "SPOT_COUNT",       
-                                  KMetadata_ReadU64 ( meta, ctx, "STATS/TABLE/SPOT_COUNT" ) ) ) CLEAR ();
-        ON_FAIL ( AddWithPrefix ( self, ctx, prefix, "SPOT_MAX",         
-                                  KMetadata_ReadU64 ( meta, ctx, "STATS/TABLE/SPOT_MAX" ) ) ) CLEAR ();
-        ON_FAIL ( AddWithPrefix ( self, ctx, prefix, "SPOT_MIN",         
-                                  KMetadata_ReadU64 ( meta, ctx, "STATS/TABLE/SPOT_MIN" ) ) ) CLEAR ();
-        
-        KMetadataRelease ( meta );
-    }
-}
-
-void SRA_StatisticsLoadBamHeader ( NGS_Statistics * self, ctx_t ctx, const struct VDatabase * db )
-{
-    FUNC_ENTRY ( ctx, rcSRA, rcCursor, rcAccessing );
-    
-    const struct KMetadata * meta;
-    
-    rc_t rc = VDatabaseOpenMetadataRead ( db, & meta );
-    if ( rc != 0 )
-    {
-        INTERNAL_ERROR ( xcUnexpected, "VDatabaseOpenMetadataRead rc = %R", rc );
-    }
-    else
-    {
-        TRY ( NGS_String * str = KMetadata_ReadString ( meta, ctx, "BAM_HEADER" ) )
-        {
-            if ( str != NULL )
-            {
-                NGS_StatisticsAddString ( self, ctx, "BAM_HEADER", str );
-                NGS_StringRelease ( str, ctx );
-            }
-        }
-        KMetadataRelease ( meta );
-    }
-}
-
diff --git a/libs/ngs/SRA_Statistics.h b/libs/ngs/SRA_Statistics.h
deleted file mode 100644
index c31bf8c..0000000
--- a/libs/ngs/SRA_Statistics.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_sra_statistics_
-#define _h_sra_statistics_
-
-typedef struct SRA_Statistics SRA_Statistics;
-#ifndef _h_ngs_statistics_
-#define NGS_STATISTICS SRA_Statistics
-#include "NGS_Statistics.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-
-struct VTable;
-struct VDatabase;
- 
-/*--------------------------------------------------------------------------
- * SRA_Statistics
- */
-
-NGS_Statistics * SRA_StatisticsMake ( ctx_t ctx ); 
-
-void SRA_StatisticsLoadTableStats ( NGS_Statistics * self, ctx_t ctx, const struct VTable* tbl, const char* prefix );
-
-void SRA_StatisticsLoadBamHeader ( NGS_Statistics * self, ctx_t ctx, const struct VDatabase * db );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_sra_statistics_ */
diff --git a/libs/ngs/extern.h b/libs/ngs/extern.h
deleted file mode 100644
index 7d545df..0000000
--- a/libs/ngs/extern.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_extern_
-#define _h_ngs_extern_
-
-#if ! defined EXPORT_LATCH && defined _LIBRARY
-#define NGS_EXTERN LIB_EXPORT
-#define EXPORT_LATCH 1
-#else
-#define NGS_EXTERN LIB_IMPORT
-#endif
-
-#ifndef _h_klib_extern_
-#include <klib/extern.h>
-#endif
-
-#endif /* _h_ngs_extern_ */
diff --git a/libs/search/Makefile b/libs/search/Makefile
deleted file mode 100644
index 4dc54c0..0000000
--- a/libs/search/Makefile
+++ /dev/null
@@ -1,98 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/search
-
-INT_LIBS = \
-	libksrch
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES = \
-	$(SEARCH_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/all $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-	@ rm -f $(addsuffix .*,$(addprefix $(ILIBDIR)/,libnucstrstr libgrep))
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# search
-#
-$(ILIBDIR)/libksrch: $(addprefix $(ILIBDIR)/libksrch.,$(ILIBEXT))
-
-SEARCH_SRC = \
-	search \
-	fgrep-dumb \
-	fgrep-boyermoore \
-	fgrep-aho \
-	agrep-wumanber \
-	agrep-myers \
-	agrep-myersunltd \
-	agrep-dp \
-	sw-search \
-	nucstrstr
-
-SEARCH_OBJ = \
-	$(addsuffix .$(LOBX),$(SEARCH_SRC))
-
-SEARCH_LIB = \
-	-dklib \
-	-dm
-
-$(ILIBDIR)/libksrch.$(LIBX): $(SEARCH_OBJ)
-	$(LD) --slib -o $@ $^ $(SEARCH_LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/search/agrep-dp.c b/libs/search/agrep-dp.c
deleted file mode 100644
index 0f0efe8..0000000
--- a/libs/search/agrep-dp.c
+++ /dev/null
@@ -1,880 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*
-  From Gene Myers, 1998, 
-  "A Fast Bit-vector Algorithm for Approxsimat String Matching
-  Based on Dynamic Programming" -- explains dp pretty well.
-
-  If we place the pattern down the left of a matrix,
-  and the scored text along the top horizontally,
-  pattern p(length m) and text t(length n),
-  we can compute the dynamic programming matrix C[0..m, 0..n] as 
-
-  C[i,j] = min{C[i-1,j-1]+(if p(i)=t(j) then 0 else 1), C[i-1,j]+1, C[i,j-1]+1}
-
-  given that C[0,j] = 0 for all j.
-  We can replace the constants with table-driven scores,
-  so that we have a match cost for (P(i),t(i)), 
-  and costs for skippings parts of the pattern (first 1) or text (second 1).
-*/
-
-#include <search/extern.h>
-#include <os-native.h>
-#include <compiler.h>
-#include <sysalloc.h>
-#include "search-priv.h"
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h> /* lroundf */
-
-#define _TRACE 0
-
-static
-void reverse_string(const char* from, int32_t len, char *to) 
-{
-    const char* p = from + len;
-    while( p != from ) {
-        *to++ = *--p;
-    }
-    *to = '\0';
-}
-
-struct DPParams {
-    char *pattern;
-    char *rpattern;
-    AgrepFlags mode;
-    int32_t plen;
-};
-
-rc_t AgrepDPMake( DPParams **self, AgrepFlags mode, const char *pattern )
-{
-    rc_t rc = 0;
-
-    if( (*self = malloc(sizeof(**self))) == NULL ) {
-        rc = RC(rcText, rcString, rcSearching, rcMemory, rcExhausted);
-    } else {
-        int32_t i;
-        (*self)->mode = mode;
-        (*self)->pattern = strdup(pattern);
-        (*self)->plen = strlen(pattern);
-        (*self)->rpattern = malloc((*self)->plen + 1);
-        if( (*self)->pattern == NULL || (*self)->rpattern == NULL ) {
-            rc = RC(rcText, rcString, rcSearching, rcMemory, rcExhausted);
-        } else if( mode & AGREP_MODE_ASCII ) {
-            if( mode & AGREP_IGNORE_CASE ) {
-                for(i = 0; i < (*self)->plen; i++) {
-                    (*self)->pattern[i] = tolower((*self)->pattern[i]);
-                }
-            }
-        }
-    }
-    if( rc != 0 ) {
-        AgrepDPFree(*self);
-    } else {
-        reverse_string((*self)->pattern, (*self)->plen, (*self)->rpattern);
-    }
-    return rc;
-}
-
-void AgrepDPFree( DPParams *self )
-{
-    if ( self != NULL )
-    {
-        if (self->pattern != NULL)
-            free(self->pattern);
-        if (self->rpattern != NULL)
-            free(self->rpattern);
-        free(self);
-    }
-}
-
-#if _TRACE
-static
-void print_col_as_row(int32_t *col, int32_t plen) 
-{
-    int32_t i;
-    for (i=0; i<=plen; i++) {
-        printf("%2d ", col[i]);
-    }
-    printf("\n");
-}
-#endif
-
-static
-void init_col(const char *p, int32_t plen, int32_t *col)
-{
-    int32_t i;
-    col[0] = 0;
-    for (i=1; i<=plen; i++) {
-        col[i] = col[i-1] + 1;
-    }  
-}
-
-bool na4_match(unsigned char p, unsigned char c)
-{
-    if( p == c )
-    {
-        return true;
-    }
-    else
-    {
-        const unsigned char* ps = IUPAC_decode[p];
-        const unsigned char* cs = IUPAC_decode[c];
-
-        if ( ps != NULL && cs != NULL )
-        {
-            size_t i_ps, i_cs;
-            for (i_ps = 0; ps[i_ps] != '\0'; ++i_ps)
-            {
-                for (i_cs = 0; cs[i_cs] != '\0'; ++i_cs)
-                {
-                    if (ps[i_ps] == cs[i_cs])
-                        return true;
-                }
-            }
-        }
-    }
-    return false;
-}
-
-#undef min
-#define min(a,b) ((a)<(b)?(a):(b))
-
-/* No longer returns a return code. */
-static
-void compute_dp_next_col(const char *p, int32_t plen, AgrepFlags mode, int32_t startcost, char t, int32_t *prev, int32_t *nxt)
-{
-    int32_t i;
-    int32_t matchscore = 0;
-    nxt[0] = startcost;
-
-    if( (mode & AGREP_TEXT_EXPANDED_2NA) && t < 5 ) {
-        t = "ACGTN"[(unsigned char)t];
-    }
-    for(i = 1; i <= plen; i++)
-    {
-        if( p[i - 1] == t )
-        {
-            matchscore = 0;
-        }
-        else if( mode & AGREP_MODE_ASCII )
-        {
-            if( mode & AGREP_IGNORE_CASE )
-                t = tolower(t);
-
-            matchscore = p[i - 1] == t ? 0 : 1;
-        }
-        else if( (mode & AGREP_PATTERN_4NA) && na4_match(p[i - 1], t) )
-        {
-            matchscore = 0;
-        }
-        else
-        {
-            matchscore = 1;
-        }
-
-        nxt[i] = min(min(prev[i-1] + matchscore,
-                         nxt[i-1] + 1),
-                     prev[i] + 1);
-    }
-}
-
-/*
-This is new functionality to support partial matches at the beginning
-or end of a sequence.
-Errors is the number of errors over the whole pattern,
-so we can assume a constant error rate, or do something more sophisticated.
-Bestpos is the last position that seems to be a match,
-and returns the number of "hits" and "misses" where a hit decreases the
-edit distance score, and a miss is everything else.
-
-The way to use this is use it in the "forward" direction to find an endpoint,
-then assume that's the end of the pattern, and do a reverse search
-compare with the (reversed) pattern to see if it really matches
-the end of the pattern.  See how it's used in the system for more hints.
-*/
-
-LIB_EXPORT void CC dp_scan_for_left_match ( char *pattern, int errors, char *buf, 
-    int buflen, int *bestpos, int *ret_hits, int *ret_misses )
-{
-    int plen = strlen(pattern);
-    int *prev = malloc(sizeof(int)*(plen+1));
-    int *nxt = malloc(sizeof(int)*(plen+1));
-    int *tmp;
-    int i;
-
-    int patlen = strlen(pattern);
-    float errrate = (float)errors / (float)patlen;
-    float play;
-
-    int hits = 0;
-    int misses = 0;
-
-    int change;
-
-    int lastscore = plen;
-
-    int cont = 1;
-
-    int lastwasmiss = 0;
-    int trailing_misses = 0;
-
-    *bestpos = -1;
-#if _TRACE
-    printf("Err rate is %f\n", errrate);
-#endif
-
-    init_col(pattern, plen, nxt);
-#if _TRACE
-    print_col_as_row(nxt, plen);
-#endif
-    for (i=0; i<buflen && cont; i++) {
-        tmp = prev; prev = nxt; nxt = tmp;
-        compute_dp_next_col(pattern, plen, 0, buf[i], i, prev, nxt);
-
-        change = lastscore - nxt[plen];
-        if (change == 1) {
-            lastwasmiss = 0;
-            trailing_misses = 0;
-            hits++;
-        } else {
-            if (lastwasmiss)
-                trailing_misses++;
-            else
-                trailing_misses = 1;
-            misses++;
-            lastwasmiss = 1;
-        }
-
-        play = errrate * (i+1);
-
-        cont = (misses < (1.0+play));
-
-#if _TRACE
-        printf("i %d char %c score %d diff %d continue %d misses %d play %f\n", 
-               i, buf[i], nxt[plen], lastscore - nxt[plen], cont, misses, play);
-#endif
-        lastscore = nxt[plen];
-
-    }
-    /* Settle up */
-    i--;
-#if _TRACE
-    printf("Total hits: %d trailing misses: %d  position: %d\n",
-           hits, trailing_misses, i);
-#endif
-    free(prev);
-    free(nxt);
-
-    *bestpos = i - trailing_misses;
-    /* Not our usual score. */
-    *ret_hits = hits;
-    *ret_misses = misses;
-}
-
-
-static
-AgrepContinueFlag dp_callback_begin(const AgrepCallArgs *args, int32_t end, int32_t forwardscore)
-{
-    AgrepFlags mode = args->self->mode;
-    char *reverse_pattern = args->self->dp->rpattern;
-    int32_t threshold = args->threshold;
-    const char *buf = args->buf;
-    AgrepMatchCallback cb = args->cb;
-    void *cbinfo = args->cbinfo;
-
-    int32_t plen = strlen(reverse_pattern);
-    int32_t *prev = malloc(sizeof(int32_t)*(plen+1));
-    int32_t *nxt = malloc(sizeof(int32_t)*(plen+1));
-    AgrepMatch match;
-    AgrepContinueFlag cont;
-    int32_t *tmp;
-    int32_t i;
-
-    int32_t curscore = 0;
-    int32_t curlast = 0;
-    int32_t continuing = 0;
-
-    int32_t limit;
-
-    init_col(reverse_pattern, plen, nxt);
-#if _TRACE
-    print_col_as_row(nxt, plen);
-#endif
-
-    limit = end - args->self->dp->plen - threshold - 1;
-    if (limit < 0)
-        limit = 0;
-    
-    for (i=end; i>=limit; i--) {
-        tmp = prev; prev = nxt; nxt = tmp;
-        /* For the reverse scan, we need to make the initial cost
-           of the column depend upon the price of skipping the
-           suffix (up to this point) of the text */
-        compute_dp_next_col(reverse_pattern, plen, mode, end-i+1,
-                            buf[i], prev, nxt);
-
-        if ((mode & AGREP_LEFT_MAINTAIN_SCORE)?
-            nxt[plen] <= forwardscore:
-            nxt[plen] <= threshold)
-        {
-            if (continuing) {
-                if (nxt[plen] < curscore) {
-                    curscore = nxt[plen];
-                    curlast = i;
-                } else if (nxt[plen] == curscore &&
-                           (mode & AGREP_EXTEND_SAME)) {
-                    curlast = i;
-                } else {
-                    continuing = 0;
-                    match.score = curscore;
-                    match.position = curlast;
-                    match.length = end - curlast + 1;
-                    cont = AGREP_CONTINUE;
-                    (*cb)(cbinfo, &match, &cont);
-                    if (cont != AGREP_CONTINUE)
-                        goto EXIT;
-                }
-            } else if ((mode & AGREP_EXTEND_SAME) ||
-                       (mode & AGREP_EXTEND_BETTER)) {
-                curscore = nxt[plen];
-                curlast = i;
-                continuing = 1;
-            } else {
-                match.score = nxt[plen];
-                match.position = i;
-                match.length = end - i + 1;
-                cont = AGREP_CONTINUE;
-                (*cb)(cbinfo, &match, &cont);
-                if (cont != AGREP_CONTINUE)
-                    goto EXIT;
-            }
-        }
-#if _TRACE
-        print_col_as_row(nxt, plen);
-#endif
-    }
-    if (continuing) {
-        continuing = 0;
-        match.score = curscore;
-        match.position = curlast;
-        match.length = end - curlast + 1;
-        cont = AGREP_CONTINUE;
-        (*cb)(cbinfo, &match, &cont);
-        goto EXIT;
-    }
-    cont = AGREP_CONTINUE;
-EXIT:
-    free(prev);
-    free(nxt);
-    return cont;
-}
-
-rc_t CC dp_end_callback( const void *cbinfo, const AgrepMatch *match, AgrepContinueFlag *flag )
-{
-    const AgrepCallArgs *cbi = cbinfo;
-    *flag = dp_callback_begin(cbi, match->position, match->score);
-    return 0;
-}
-
-
-static
-void dp_callback_end( const AgrepCallArgs *args )
-{
-    AgrepFlags mode = args->self->mode;
-    char *pattern = args->self->dp->pattern;
-    int32_t threshold = args->threshold;
-    const char *buf = args->buf;
-    int32_t buflen = args->buflen;
-
-    AgrepMatchCallback cb = dp_end_callback;
-    const void *cbinfo = args;
-
-    int32_t plen = strlen(pattern);
-    int32_t *prev = malloc(sizeof(int32_t)*(plen+1));
-    int32_t *nxt = malloc(sizeof(int32_t)*(plen+1));
-    int32_t curscore = 0;
-    int32_t curlast = 0;
-    int32_t continuing = 0;
-
-    int32_t startingcost = 0;
-    int32_t limit;
-
-    AgrepMatch match;
-    AgrepContinueFlag cont;
-    int32_t *tmp;
-    int32_t i;
-
-    init_col(pattern, plen, nxt);
-#if _TRACE
-    print_col_as_row(nxt, plen);
-#endif
-    
-    limit = buflen;
-    if (mode & AGREP_ANCHOR_LEFT) {
-        limit = args->self->dp->plen + threshold+1;
-        if (limit > buflen) {
-            limit = buflen;
-        }
-        cb = args->cb;
-        cbinfo = args->cbinfo;
-    }
-
-    for (i=0; i<limit; i++) {
-        tmp = prev; prev = nxt; nxt = tmp;
-
-        if (mode & AGREP_ANCHOR_LEFT) 
-            startingcost = i+1;
-        compute_dp_next_col(pattern, plen, mode, startingcost, 
-                            buf[i], prev, nxt);
-        if (nxt[plen] <= threshold) {
-
-            if (continuing) {
-                if (nxt[plen] < curscore &&
-                    ((mode & AGREP_EXTEND_BETTER) ||
-                     (mode & AGREP_EXTEND_SAME))) {
-                    curscore = nxt[plen];
-                    curlast = i;
-                } else if (nxt[plen] == curscore &&
-                           ((mode & AGREP_EXTEND_BETTER) ||
-                            (mode & AGREP_EXTEND_SAME))) {
-                    if (mode & AGREP_EXTEND_SAME) {
-                        curlast = i;
-                    }
-                } else {
-                    continuing = 0;
-                    match.score = curscore;
-                    if (mode & AGREP_ANCHOR_LEFT) {
-                        match.position = 0;
-                        match.length = curlast+1;
-                    } else {
-                        match.position = curlast;
-                        match.length = -1;
-                    }
-                    cont = AGREP_CONTINUE;
-                    (*cb)(cbinfo, &match, &cont);
-                    if (cont != AGREP_CONTINUE)
-                        goto EXIT;
-                }
-            } else if ((mode & AGREP_EXTEND_SAME) ||
-                       (mode & AGREP_EXTEND_BETTER)) {
-                curscore = nxt[plen];
-                curlast = i;
-                continuing = 1;
-            } else {
-                match.score = nxt[plen];
-                if (mode & AGREP_ANCHOR_LEFT) {
-                    match.position = 0;
-                    match.length = i+1;
-                } else {
-                    match.position = i;
-                    match.length = -1;
-                }
-                cont = AGREP_CONTINUE;
-                (*cb)(cbinfo, &match, &cont);
-                if (cont != AGREP_CONTINUE)
-                    goto EXIT;
-            }
-            /* If we're no longer under the threshold, we might
-               have been moving forward looking for a better match 
-            */
-        } else if (continuing) {
-            continuing = 0;
-            match.score = curscore;
-            if (mode & AGREP_ANCHOR_LEFT) {
-                match.position = 0;
-                match.length = curlast+1;
-            } else {
-                match.position = curlast;
-                match.length = -1;
-            }
-            cont = AGREP_CONTINUE;
-            (*cb)(cbinfo, &match, &cont);
-            if (cont != AGREP_CONTINUE)
-                goto EXIT;
-        }
-#if _TRACE
-        print_col_as_row(nxt, plen);
-#endif
-    }
-    if (continuing) {
-        continuing = 0;
-        match.score = curscore;
-        if (mode & AGREP_ANCHOR_LEFT) {
-            match.position = 0;
-            match.length = curlast+1;
-        } else {
-            match.position = curlast;
-            match.length = -1;
-        }
-        (*cb)(cbinfo, &match, &cont);
-    }
-EXIT:
-    free(prev);
-    free(nxt);
-}
-
-
-
-static
-uint32_t dp_find_end(const char *pattern, AgrepFlags mode, int32_t threshold, const char *buf, int32_t buflen, int32_t *bestpos, int32_t *bestscore) 
-{
-    int32_t plen = strlen(pattern);
-    int32_t *prev = malloc(sizeof(int32_t)*(plen+1));
-    int32_t *nxt = malloc(sizeof(int32_t)*(plen+1));
-    int32_t *tmp;
-    int32_t i;
-
-    int32_t foundit = 0;
-
-
-    *bestscore = 10000;
-    *bestpos = 1;
-
-    init_col(pattern, plen, nxt);
-#if _TRACE
-    print_col_as_row(nxt, plen);
-#endif
-    for (i=0; i<buflen; i++) {
-        tmp = prev; prev = nxt; nxt = tmp;
-        compute_dp_next_col(pattern, plen, mode, 0, buf[i], prev, nxt);
-        if (nxt[plen] <= threshold) {
-            if (foundit) {
-                if (nxt[plen] <= *bestscore) {
-                    *bestpos = i;
-                    *bestscore = nxt[plen];
-                } else {
-                    /* Here we'd extend even if the score was equal, maybe */
-                }
-            } else {
-                /* Ok, we have a match under threshold.
-                   Let's continue and see if we can improve on it.
-                */
-                *bestpos = i;
-                *bestscore = nxt[plen];
-                foundit = 1;
-            }
-        } else {
-            if (foundit)
-                goto EXIT;
-        }
-#if _TRACE
-        print_col_as_row(nxt, plen);
-#endif
-    }
-EXIT:
-    free(prev);
-    free(nxt);
-    if (foundit)
-        return 1;
-    return 0;
-}
-
-
-
-
-static
-uint32_t dp_find_begin(char *reverse_pattern, AgrepFlags mode, int32_t threshold, const char *buf, int32_t buflen, int32_t end, int32_t *begin) 
-{
-    int32_t plen = strlen(reverse_pattern);
-    int32_t *prev = malloc(sizeof(int32_t)*(plen+1));
-    int32_t *nxt = malloc(sizeof(int32_t)*(plen+1));
-    int32_t *tmp;
-    int32_t i;
-
-    int32_t limit;
-
-    int32_t foundit = 0;
-    /* int32_t bestscore = 10000; */
-
-    *begin = 0;
-
-    limit = end - plen - threshold - 1;
-    if (limit < 0)
-        limit = 0;
-
-    init_col(reverse_pattern, plen, nxt);
-#if _TRACE
-    print_col_as_row(nxt, plen);
-#endif
-    for (i=end; i>=limit; i--) {
-        tmp = prev; prev = nxt; nxt = tmp;
-        /* We need to make the initial cost of this column
-           reflect the cost of skipping the suffix (up to this point)
-           of the text */
-        compute_dp_next_col(reverse_pattern, plen, mode, end-i, buf[i], prev, nxt);
-
-        if (nxt[plen] <= threshold) {
-            *begin = i;
-            /* bestscore = nxt[plen]; */
-            foundit = 1;
-        } else {
-            if (foundit)
-                goto EXIT;
-        }
-#if _TRACE
-        print_col_as_row(nxt, plen);
-#endif
-    }
-EXIT:
-    free(prev);
-    free(nxt);
-    if (foundit)
-        return 1;
-    return 0;
-}
-
-
-uint32_t AgrepDPFindFirst ( const DPParams *self, int32_t threshold, AgrepFlags mode, 
-        const char *buf, int32_t buflen, AgrepMatch *match )
-{
-    int32_t begin, end;
-    int32_t score;
-    if (dp_find_end(self->pattern, mode, threshold, buf, buflen, &end, &score)) {
-        if (dp_find_begin(self->rpattern, mode, threshold, buf, buflen, end, &begin)) {
-            match->position = begin;
-            match->length = end-begin+1;
-            match->score = score;
-            return 1;
-        }
-    }
-    return 0;
-}
-
-
-void AgrepDPFindAll( const AgrepCallArgs *args )
-{
-    dp_callback_end( args );
-}
-
-
-/* Try the longest match first. */
-LIB_EXPORT uint32_t CC has_left_approx_match( char *pattern, uint32_t errors, 
-                               char *buf, size_t buflen, 
-                               uint32_t *length, uint32_t *errcnt )
-{
-    int32_t plen = strlen(pattern);
-    int32_t *prev = malloc(sizeof(int)*(plen+1));
-    int32_t *nxt = malloc(sizeof(int)*(plen+1));
-    int32_t *tmp;
-    int32_t i, j;
-    int32_t allowable;
-    char *subpattern;
-    int32_t dist;
-
-    int32_t found = 0;
-    int32_t foundpos = 0;
-    int32_t founderr = 0;
-
-    for (i=plen; i>=8; i--) {
-
-        /* See if the first i chars of the text match the last i
-           chars of the pattern with (errors) errors.
-        */
-        subpattern = pattern + (plen - i);
-        init_col(subpattern, i, nxt);
-        for (j=0; j<i; j++) {
-            tmp = prev; prev = nxt; nxt = tmp;
-            compute_dp_next_col(subpattern, i, 0, buf[j], j, prev, nxt);
-        }
-        dist = nxt[i];
-        allowable = 1+lroundf((float)i * (float)errors / (float)plen);
-        if (found) {
-            if (dist <= founderr) {
-                foundpos = i-1;
-                founderr = dist;
-            } else {
-                goto DONE;
-            }
-        } else if (dist <= allowable) {
-            /* Found a match */
-            found = 1;
-            foundpos = i-1;
-            founderr = dist;
-
-            /* Continue a bit to see if something's equally good or better */
-        }
-    }
-    DONE:
-    free(prev);
-    free(nxt);
-    if (found) {
-        *length = foundpos+1;
-        *errcnt = founderr;
-        return 1;
-    }
-    return 0;
-}
-
-
-/* Try the longest match first. */
-LIB_EXPORT uint32_t CC has_right_approx_match( char *pattern, uint32_t errors, 
-                                char *buf, size_t buflen, 
-                                uint32_t *bestpos, uint32_t *errcnt )
-{
-    uint32_t plen = strlen(pattern);
-    int32_t *prev = malloc(sizeof(int)*(plen+1));
-    int32_t *nxt = malloc(sizeof(int)*(plen+1));
-    int32_t *tmp;
-    int32_t i, j;
-    int32_t allowable;
-    char *subpattern, chBackup;
-    char *subpattern_r;
-    int32_t dist;
-
-    int32_t found = 0;
-    int32_t foundpos = 0;
-    int32_t founderr = 0;
-    int32_t bufj;
-
-    int bound = plen;
-    if (buflen < bound) {
-        bound = buflen;
-    }
-
-    subpattern = malloc(plen + 1);
-    subpattern_r = malloc(plen + 1);
-    strncpy(subpattern, pattern, plen);
-
-    for (i=bound; i>=8; i--, subpattern[i] = chBackup) {
-
-        /* See if the first i chars of the pattern match the last i
-           chars of the text with (errors) errors.
-           We match in reverse, so the initial penalty of skipping
-           the "first part" of the pattern means skipping the end
-        */
-        /* making prefix of length i out of pattern
-        (subpattern contains full copy of pattern)*/
-        chBackup = subpattern[i];
-        subpattern[i] = '\0';
-
-        reverse_string(subpattern, i, subpattern_r);
-        init_col(subpattern_r, i, nxt);
-
-        for (j=0; j<i; j++) {
-            bufj = buflen - j - 1;
-            tmp = prev; prev = nxt; nxt = tmp;
-            compute_dp_next_col(subpattern_r, i, 0, buf[bufj], j, prev, nxt);
-        }
-        dist = nxt[i];
-        allowable = 1+lroundf((float)i * (float)errors / (float)plen);
-        if (found) {
-            if (dist <= founderr) {
-                foundpos = buflen - i;
-                founderr = dist;
-            } else {
-                goto DONE;
-            }
-        } else if (dist <= allowable) {
-            /* Found a match */
-            found = 1;
-            foundpos = buflen - i;
-            founderr = dist;
-
-            /* Continue a bit to see if something's equally good or better */
-        }
-    }
-    DONE:
-    free(subpattern);
-    free(subpattern_r);
-    free(prev);
-    free(nxt);
-    if (found) {
-        *bestpos = foundpos;
-        *errcnt = founderr;
-        return 1;
-    }
-    return 0;
-}
-
-
-
-/* Try the longest match first. */
-/* Call with pattern as the text, text as pattern. */
-LIB_EXPORT uint32_t CC has_inside_approx_match( char *pattern, uint32_t plen, uint32_t errors, 
-                                 char *buf, size_t buflen, 
-                                 uint32_t *skip, uint32_t *errcnt )
-{
-    int32_t *prev = malloc(sizeof(int)*(plen+1));
-    int32_t *nxt = malloc(sizeof(int)*(plen+1));
-    int32_t *tmp;
-    int32_t j;
-    int32_t allowable;
-    int32_t dist;
-
-    int32_t found = 0;
-    int32_t foundpos = 0;
-    int32_t founderr = 0;
-
-    allowable = 1+lroundf((float)errors * plen / (float)buflen);
-
-
-    init_col(pattern, plen, nxt);
-    
-    for (j=0; j<buflen; j++) {
-        tmp = prev; prev = nxt; nxt = tmp;
-        compute_dp_next_col(pattern, plen, 0, buf[j], 0, prev, nxt);
-
-        dist = nxt[plen];
-
-        /* 
-           We still have to do this kind of thing because otherwise
-           the match will extend past the end of the text (here pattern),
-           and will match "useless" letters that just increase the score.
-           So we continue looking at smaller subsequences of the pattern
-           to see if something smaller matches better. 
-        */
-        
-        if (found) {
-            if (dist <= founderr && dist <= allowable) {
-                foundpos = j;
-                founderr = dist;
-            } else {
-                goto DONE;
-            }
-        } else if (dist <= allowable) {
-            /* Found a match */
-            found = 1;
-            foundpos = j;
-            founderr = dist;
-
-            /* Continue a bit to see if something's equally good or better */
-        }
-    }
-DONE:
-    free(prev);
-    free(nxt);
-    if (found) {
-        *skip = foundpos;
-        *errcnt = founderr;
-        return 1;
-    }
-    return 0;
-}
diff --git a/libs/search/agrep-myers.c b/libs/search/agrep-myers.c
deleted file mode 100644
index 5b2660e..0000000
--- a/libs/search/agrep-myers.c
+++ /dev/null
@@ -1,644 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <search/extern.h>
-#include <compiler.h>
-#include <os-native.h>
-#include <sysalloc.h>
-#include <assert.h>
-#include "search-priv.h"
-#include "debug.h"
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <ctype.h>
-#include <stdlib.h>
-
-#define DBG_SEARCH_METHOD DBG_SEARCH_MYERS
-
-#define UBITTYPE uint64_t
-
-struct MyersSearch {
-    AgrepFlags mode;
-    int32_t m;
-    UBITTYPE PEq[256];
-    UBITTYPE PEq_R[256];
-};
-
-static
-rc_t myers_translate(AgrepFlags mode, UBITTYPE* PEq, unsigned char p, UBITTYPE val)
-{
-    /* For now always set 2na bits */
-    set_bits_2na(PEq, p, val);
-
-    if( mode & AGREP_PATTERN_4NA ) {
-        return na4_set_bits(mode, PEq, p, val);
-    } else if( mode & AGREP_MODE_ASCII ) {
-        if( mode & AGREP_IGNORE_CASE ) {
-            PEq[tolower(p)] |= val;
-            PEq[toupper(p)] |= val;
-        } else {
-            PEq[p] |= val;
-        }
-    }
-    return 0;
-}
-
-#if _DEBUGGING
-static
-void printbits( UBITTYPE in )
-{
-    char buf[9];
-    int32_t j, k;
-    unsigned char byte;
-    buf[8] = '\0';
-    for (j=0; j<sizeof(UBITTYPE); j++) {
-        byte = in >> (8*(sizeof(UBITTYPE) - j - 1));
-        for (k=0; k<8; k++) {
-            buf[k] = "01"[1&(byte>>(7-k))];
-        }
-        SEARCH_DBGF(("%s ", buf));
-    }
-}
-#else
-#define printbits(in) ((void)0)
-#endif
-
-void AgrepMyersFree( MyersSearch *self )
-{
-    free(self);
-}
-  
-rc_t AgrepMyersMake( MyersSearch **self, AgrepFlags mode, const char *pattern )
-{
-    rc_t rc = 0;
-    uint32_t max_pattern_length = sizeof(UBITTYPE) * 8;
-    int32_t m = strlen(pattern);
-
-    *self = NULL;
-    if( m > max_pattern_length ) {
-        rc = RC(rcText, rcString, rcSearching, rcParam, rcExcessive);
-    } else if( (*self = malloc(sizeof(**self))) == NULL ) {
-        rc = RC(rcText, rcString, rcSearching, rcMemory, rcExhausted);
-    } else {            
-        int32_t j;
-        const unsigned char *upattern = (const unsigned char *)pattern;
-
-        (*self)->m = m;
-        (*self)->mode = mode;
-        memset((*self)->PEq, 0, sizeof((*self)->PEq));
-        for(j = 0; rc == 0 && j < m; j++) {
-            rc = myers_translate(mode, (*self)->PEq, upattern[j], (UBITTYPE)1 << j);
-        }
-        SEARCH_DBG("pattern '%s'", upattern);
-        for(j = 0; j < sizeof((*self)->PEq) / sizeof((*self)->PEq[0]); j++) {
-            if( (*self)->PEq[j] ) {
-                printbits((*self)->PEq[j]);
-                SEARCH_DBGF((" <- %c\n", j));
-            }
-        }
-        memset((*self)->PEq_R, 0, sizeof((*self)->PEq_R));
-        for(j = 0; rc == 0 && j < m; j++) {
-            rc = myers_translate(mode, (*self)->PEq_R, upattern[m - j - 1], (UBITTYPE)1 << j);
-        }
-        SEARCH_DBG("pattern rev '%s'", upattern);
-        for(j = 0; j < sizeof((*self)->PEq) / sizeof((*self)->PEq[0]); j++) {
-            if( (*self)->PEq[j] ) {
-                printbits((*self)->PEq[j]);
-                SEARCH_DBGF((" <- %c\n", j));
-            }
-        }
-    }
-    return rc;
-}
-
-/* 
-   This finds the first match forward in the string less than or equal
-   the threshold.  If nonzero, this will be a prefix of any exact match.
-*/
-
-uint32_t MyersFindFirst( MyersSearch *self, int32_t threshold, 
-                   const char* text, size_t n,
-                   AgrepMatch *match )
-{
-    const unsigned char *utext = (const unsigned char *)text;
-    UBITTYPE Pv;
-    UBITTYPE Mv;
-
-    int32_t m = self->m;
-    int32_t Score;
-    int32_t BestScore = m;
-    int32_t from = 0;
-    int32_t to = -1;
-
-    int32_t j;
-    UBITTYPE Eq, Xv, Xh, Ph, Mh;
-
-    Score = m;
-    Pv = (UBITTYPE)-1;
-    Mv = (UBITTYPE)0;
-    
-    for(j = 0; j < n; j++) {
-        Eq = self->PEq[utext[j]];
-        Xv = Eq | Mv;
-        Xh = (((Eq & Pv) + Pv) ^ Pv) | Eq;
-        Ph = Mv | ~ (Xh | Pv);
-        Mh = Pv & Xh;
-        if(Ph & ((UBITTYPE)1 << (m - 1))) {
-            Score++;
-        } else if(Mh & ((UBITTYPE)1 << (m - 1))) {
-            Score--;
-        }
-        Ph <<= 1;
-        Mh <<= 1;
-        Pv = Mh | ~(Xv | Ph);
-        Mv = Ph & Xv;
-        SEARCH_DBG("1st: %3d. '%c' score %d", j, utext[j], Score);
-        if (Score <= threshold) {
-            BestScore = Score;
-            to = j;
-            break;
-        }
-    }
-
-    if (BestScore <= threshold) {
-
-        /* Continue while score decreases under the threshold */
-        for(j++; j < n; j++) {
-            Eq = self->PEq[utext[j]];
-            Xv = Eq | Mv;
-            Xh = (((Eq & Pv) + Pv) ^ Pv) | Eq;
-            Ph = Mv | ~ (Xh | Pv);
-            Mh = Pv & Xh;
-            if(Ph & ((UBITTYPE)1 << (m - 1))) {
-                Score++;
-            } else if(Mh & ((UBITTYPE)1 << (m - 1))) {
-                Score--;
-            }
-            Ph <<= 1;
-            Mh <<= 1;
-            Pv = Mh | ~(Xv | Ph);
-            Mv = Ph & Xv;
-            SEARCH_DBG("2nd: %3d. '%c' score %d", j, utext[j], Score);
-            if( Score < BestScore ||
-                ( (self->mode & (AGREP_EXTEND_BETTER | AGREP_EXTEND_SAME)) && Score <= BestScore) ) {
-                BestScore = Score;
-                to = j;
-            } else {
-                break;
-            }
-        }
-    }
-
-    if (BestScore <= threshold) {
-        /* Re-initialize for next scan! */
-        Score = m;
-        Pv = (UBITTYPE)-1;
-        Mv = (UBITTYPE)0;
-        
-        for(j = to; j >= 0; j--) {
-            Eq = self->PEq_R[utext[j]];
-            Xv = Eq | Mv;
-            Xh = (((Eq & Pv) + Pv) ^ Pv) | Eq;
-            Ph = Mv | ~ (Xh | Pv);
-            Mh = Pv & Xh;
-            if(Ph & ((UBITTYPE)1 << (m - 1))) {
-                Score++;
-            } else if(Mh & ((UBITTYPE)1 << (m - 1))) {
-                Score--;
-            }
-            Ph <<= 1;
-            Mh <<= 1;
-            Pv = Mh | ~(Xv | Ph);
-            Mv = Ph & Xv;
-            SEARCH_DBG("Rvs: %3d. '%c' score %d", j, utext[j], Score);
-            if(Score <= BestScore) {
-                from = j;
-                break;
-            }
-        }
-    }
-    if (BestScore <= threshold) {
-        match->position = from;
-        match->length = to-from+1;
-        match->score = BestScore;
-        SEARCH_DBG("Hit: [%d,%d] '%.*s' score %d", match->position, match->length,
-                    match->length, &utext[match->position], match->score);
-        return 1;
-    }
-    return 0;
-}
-
-  
-
-/* 
-   Returns non-negative if something found.
-   Return value is the number of mismatches.
-*/
-LIB_EXPORT int32_t CC MyersFindBest ( MyersSearch *self, const char* text, 
-    size_t n, int32_t *pos, int32_t *len )
-{
-    const unsigned char *utext = (const unsigned char *)text;
-    UBITTYPE Pv;
-    UBITTYPE Mv;
-
-    int32_t m = self->m;
-    int32_t Score;
-    int32_t BestScore = m;
-    int32_t from = 0;
-    int32_t to = -1;
-
-    int32_t j;
-    UBITTYPE Eq, Xv, Xh, Ph, Mh;
-
-    Score = m;
-    Pv = (UBITTYPE)-1;
-    Mv = (UBITTYPE)0;
-    
-    for(j = 0; j < n; j++) {
-        Eq = self->PEq[utext[j]];
-        Xv = Eq | Mv;
-        Xh = (((Eq & Pv) + Pv) ^ Pv) | Eq;
-        Ph = Mv | ~ (Xh | Pv);
-        Mh = Pv & Xh;
-        if(Ph & ((UBITTYPE)1 << (m - 1))) {
-            Score++;
-        } else if(Mh & ((UBITTYPE)1 << (m - 1))) {
-            Score--;
-        }
-        Ph <<= 1;
-        Mh <<= 1;
-        Pv = Mh | ~(Xv | Ph);
-        Mv = Ph & Xv;
-        SEARCH_DBG("Fwd: %3d. '%c' score %d", j, utext[j], Score);
-        if( Score < BestScore ) {
-            BestScore = Score;
-            to = j;
-        }
-    }
-
-    /* Re-initialize for next scan! */
-    Score = m;
-    Pv = (UBITTYPE)-1;
-    Mv = (UBITTYPE)0;
-    
-    for(j = to; j >= 0; j--) {
-        Eq = self->PEq_R[utext[j]];
-        Xv = Eq | Mv;
-        Xh = (((Eq & Pv) + Pv) ^ Pv) | Eq;
-        Ph = Mv | ~ (Xh | Pv);
-        Mh = Pv & Xh;
-        if(Ph & ((UBITTYPE)1 << (m - 1))) {
-            Score++;
-        } else if(Mh & ((UBITTYPE)1 << (m - 1))) {
-            Score--;
-        }
-        Ph <<= 1;
-        Mh <<= 1;
-        Pv = Mh | ~(Xv | Ph);
-        Mv = Ph & Xv;
-        SEARCH_DBG("Rvs: %3d. '%c' score %d", j, utext[j], Score);
-        if(Score <= BestScore) {
-            from = j;
-            break;
-        }
-    }
-    
-    *pos = from;
-    *len = to-from+1;
-    SEARCH_DBG("Hit: [%d,%d] '%.*s' score %d", *pos, *len, *len, &utext[*pos], BestScore);
-    return BestScore;
-}
-
-/* 
-   This finds the first match forward in the string less than or equal
-   the threshold.  If nonzero, this will be a prefix of any exact match.
-*/
-
-/*
-    MyersFindAllOld is the old implementation of MyersFindAll.
-    It uses inline copy-pasted Myers core algorithm steps therefore
-    it might be faster than the new MyersFindAll (if compiler doesn't optimize it enough)
-    Also for some reason it uses unoptimized dp algorithm to find starting point of the match.
-
-    Leaving it in CVS for a while just in case (with fixed bug in "const void *cbinfo = args->cbinfo;"
-    and some minor improvements like marking data being used for read only as explicitly const)
-*/
-#if 0
-void MyersFindAllOld ( const AgrepCallArgs *args )
-{
-    AgrepFlags const mode = args->self->mode;
-    MyersSearch const* self = args->self->myers;
-    int32_t const threshold = args->threshold;
-    const unsigned char *utext = (const unsigned char *)args->buf;
-    int32_t const n = args->buflen;
-    AgrepMatchCallback cb = dp_end_callback;
-    const void *cbinfo = args->cbinfo;
-
-    AgrepMatch match;
-    AgrepContinueFlag cont;
-
-    UBITTYPE Pv;
-    UBITTYPE Mv;
-
-    int32_t const m = self->m;
-    int32_t Score;
-    int32_t BestScore;
-
-    int32_t j;
-    UBITTYPE Eq, Xv, Xh, Ph, Mh;
-
-    int32_t curscore = 0;
-    int32_t curlast = 0;
-    int32_t continuing = 0;
-    
-    BestScore = m;
-    Score = m;
-    Pv = (UBITTYPE)-1;
-    Mv = (UBITTYPE)0;
-    
-    for (j = 0; j < n; j++)
-    {
-        Eq = self->PEq[utext[j]];
-        Xv = Eq | Mv;
-        Xh = (((Eq & Pv) + Pv) ^ Pv) | Eq;
-        Ph = Mv | ~ (Xh | Pv);
-        Mh = Pv & Xh;
-
-        SEARCH_DBG("%d: Ph ", j);
-        printbits(Ph);
-        SEARCH_DBG(" %s ", "Mh");
-        printbits(Mh);
-        SEARCH_DBG("%s", "");
-
-        if(Ph & ((UBITTYPE)1 << (m - 1))) {
-            Score++;
-        } else if(Mh & ((UBITTYPE)1 << (m - 1))) {
-            Score--;
-        }
-        Ph <<= 1;
-        Mh <<= 1;
-        Pv = Mh | ~(Xv | Ph);
-        Mv = Ph & Xv;
-        SEARCH_DBG("%3d. '%c' score %d", j, utext[j], Score);
-        if (Score <= threshold) {
-            /* At this point we let the DP algorithm find the starting point. */
-            /* This just passes the end position. */
-
-            if (continuing) {
-                if (Score < curscore &&
-                    ((mode & AGREP_EXTEND_BETTER) ||
-                     (mode & AGREP_EXTEND_SAME))) {
-                    curscore = Score;
-                    curlast = j;
-                } else if (Score == curscore &&
-                           ((mode & AGREP_EXTEND_BETTER) ||
-                            (mode & AGREP_EXTEND_SAME))) {
-                    if (mode & AGREP_EXTEND_SAME) {
-                        curlast = j;
-                    }
-                } else {
-                    continuing = 0;
-                    match.score = curscore;
-                    match.position = curlast;
-                    match.length = -1;
-                    cont = AGREP_CONTINUE;
-                    (*cb)(cbinfo, &match, &cont);
-                    if (cont != AGREP_CONTINUE)
-                        return;
-                }
-            } else if ((mode & AGREP_EXTEND_SAME) ||
-                       (mode & AGREP_EXTEND_BETTER)) {
-                curscore = Score;
-                curlast = j;
-                continuing = 1;
-            } else {
-                match.score = Score;
-                match.position = j;
-                match.length = -1;
-                cont = AGREP_CONTINUE;
-                (*cb)(cbinfo, &match, &cont);
-                if (cont != AGREP_CONTINUE)
-                    return;
-            }
-            /* If we're no longer under the threshold, we might
-               have been moving forward looking for a better match 
-            */
-        } else if (continuing) {
-            continuing = 0;
-            match.score = curscore;
-            match.position = curlast;
-            match.length = -1;
-            cont = AGREP_CONTINUE;
-            (*cb)(cbinfo, &match, &cont);
-            if (cont != AGREP_CONTINUE)
-                return;
-        }
-    }
-    if (continuing) {
-        continuing = 0;
-        match.score = curscore;
-        match.position = curlast;
-        match.length = -1;
-        (*cb)(cbinfo, &match, &cont);
-    }
-}
-#endif
-
-
-/* The core of the Myers algorithm - calculation of j-th score
-    Now using for new MyersFindAll only but can be used by all other Myers-find
-    functons if there is no issues with performance because of function call with
-    so many parameters and locals
-*/
-
-#define MACRO_MYERS_CORE_STEP(ch, m, PEq, Mv, Pv, Score)\
-    Eq = PEq[ch];\
-    Xv = Eq | Mv;\
-    Xh = (((Eq & Pv) + Pv) ^ Pv) | Eq;\
-    Ph = Mv | ~ (Xh | Pv);\
-    Mh = Pv & Xh;\
-    if (Ph & ((UBITTYPE)1 << (m - 1)))\
-        ++(Score);\
-    else if (Mh & ((UBITTYPE)1 << (m - 1)))\
-        --(Score);\
-\
-    Ph <<= 1;\
-    Mh <<= 1;\
-    Pv = Mh | ~(Xv | Ph);\
-    Mv = Ph & Xv;
-
-
-static void MyersCoreStep(unsigned char ch, int32_t const m
-    ,UBITTYPE const* PEq, UBITTYPE* Mv, UBITTYPE* Pv, int32_t *Score
-)
-{
-    UBITTYPE Eq, Xv, Xh, Ph, Mh;
-
-    Eq = PEq[ch];
-    Xv = Eq | *Mv;
-    Xh = (((Eq & *Pv) + *Pv) ^ *Pv) | Eq;
-    Ph = *Mv | ~ (Xh | *Pv);
-    Mh = *Pv & Xh;
-    if (Ph & ((UBITTYPE)1 << (m - 1)))
-        ++(*Score);
-    else if (Mh & ((UBITTYPE)1 << (m - 1)))
-        --(*Score);
-
-    Ph <<= 1;
-    Mh <<= 1;
-    *Pv = Mh | ~(Xv | Ph);
-    *Mv = Ph & Xv;
-
-}
-
-/* Return start position of the match given its end position and score */
-
-
-    /*
-        Here we're guaranteed that score will be decreasing down to:
-        1) TargetScore in the case when indexEnd points to the
-            string with deletions/modifications from the pattern
-        2) 0 in the case when indexEnd points to the string with
-            insertions to the end of the pattern
-        So we need to search backwards until Score is non-increasing
-    */
-#define MACRO_MYERS_GET_MATCH_STARTING_POSITION(Mv, Pv, Score, TargetScore, indexEnd)\
-    Score = self->m;\
-    ScorePrev = self->m;\
-    Pv = (UBITTYPE)-1;\
-    Mv = (UBITTYPE)0;\
-    for (indexStart = indexEnd; indexStart >= 0; --indexStart, ScorePrev = Score)\
-    {\
-        MACRO_MYERS_CORE_STEP(utext[indexStart], m, self->PEq_R, Mv, Pv, Score)\
-        if (Score > ScorePrev && ScorePrev <= TargetScore)\
-        {\
-            ++indexStart;\
-            break;\
-        }\
-        if (indexStart == 0 && Score <= TargetScore)\
-            break;\
-    }\
-    assert(indexStart >= 0);
-
-
-static int32_t MyersGetMatchStartingPosition(AgrepCallArgs const* args
-    ,int32_t const indexEnd, int32_t const TargetScore
-)
-{
-    MyersSearch const* self = args->self->myers;
-    unsigned char const* utext = (unsigned char const*)args->buf;
-    int32_t const m = self->m;
-
-    UBITTYPE Pv;
-    UBITTYPE Mv;
-
-    int32_t Score, ScorePrev;
-
-    int32_t j;
-
-    Score = m;
-    ScorePrev = m;
-    Pv = (UBITTYPE)-1;
-    Mv = (UBITTYPE)0;
-    /*
-        Here we're guaranteed that score will be decreasing down to:
-        1) TargetScore in the case when indexEnd points to the
-            string with deletions/modifications from the pattern
-        2) 0 in the case when indexEnd points to the string with
-            insertions to the end of the pattern
-        So we need to search backwards until Score is non-increasing
-    */
-    for (j = indexEnd; j >= 0; --j, ScorePrev = Score)
-    {
-        MyersCoreStep(utext[j], m, self->PEq_R, &Mv, &Pv, &Score);
-        SEARCH_DBG("Rvs: %3d. '%c' score %d", j, utext[j], Score);
-        if (Score > ScorePrev && ScorePrev <= TargetScore)
-        {
-            ++j;
-            break;
-        }
-        if (j == 0 && Score <= TargetScore)
-            break;
-    }
-    assert(j >= 0);
-    return j;
-}
-
-void MyersFindAll(AgrepCallArgs const *args )
-{
-    MyersSearch const* self = args->self->myers;
-    int32_t const threshold = args->threshold;
-    const unsigned char *utext = (const unsigned char *)args->buf;
-    int32_t const n = args->buflen;
-    const void *cbinfo = args->cbinfo;
-
-    AgrepMatch match;
-    AgrepContinueFlag cont;
-
-    UBITTYPE Pv;
-    UBITTYPE Mv;
-
-    int32_t const m = self->m;
-    int32_t Score;
-
-    int32_t j, indexStart;
-
-    Score = m;
-    Pv = (UBITTYPE)-1;
-    Mv = (UBITTYPE)0;
-    
-    for (j = 0; j < n; ++j)
-    {
-        MyersCoreStep(utext[j], m, self->PEq, &Mv, &Pv, &Score);
-        /*MACRO_MYERS_CORE_STEP(utext[j], m, self->PEq, Mv, Pv, Score)*/
-
-        if (Score <= threshold)
-        {
-            indexStart = MyersGetMatchStartingPosition(args, j, Score);
-            /*MACRO_MYERS_GET_MATCH_STARTING_POSITION(MvRev, PvRev, ScoreRev, Score, j)*/
-
-            /* found starting point indexStart for current match ending at j with Score */
-            /* TODO:
-                the algorithm behaves suspiciously on the boundary, e.g.:
-
-                input text: CCGGGTTTTTTAAAAACCCGGAATTCAAACCCTTTCGGTTCCATGTTGAATCACTAGACCCATCATCAGAAACAATTAGCTCATCCTGATCTCGTAAACACCCAAGAATACTATTAATTTGCTCGGCTATATATCTCTCACCATTATAGCTTGCAAGACATACTGATATTTTCACTTTAATATATACTTAATTATATCTGAAGAAGAATATAGATAGTTATTGTCAAAGATAGATCTCATTAGCCTTTTACTAGGGCAAGCTTATATAGTAGTATTTCAAACGGCTTTCTTAAAAAACTTTAGGCCGGGTTTTTTAAAAACCCGGAATTCAAACCCTTTCGGTTCCA
-                should find match for GTTGGAACCGAAAGGGTTTGAATTCAAACCCTTTCGGTTCCAAC at pos=6 and pos=310 (len=38) (the same fragment TTTTTTAAAAACCCGGAATTCAAACCCTTTCGGTTCCA) with the same score
-                but in fact for pos=310 (310+38=boundary, i.e. the end of line) it finds it with score=13 and for pos=6 - with score=14
-            */
-            match.score = Score;
-            match.position = indexStart;
-            match.length = j - indexStart + 1;
-            cont = AGREP_CONTINUE;
-            (*args->cb)(cbinfo, &match, &cont);
-            if (cont != AGREP_CONTINUE)
-            {
-                return;
-            }
-        }
-    }
-}
diff --git a/libs/search/agrep-myersunltd.c b/libs/search/agrep-myersunltd.c
deleted file mode 100644
index bb47527..0000000
--- a/libs/search/agrep-myersunltd.c
+++ /dev/null
@@ -1,1039 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <search/extern.h>
-#include <compiler.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "search-priv.h"
-
-
-/* 
-   We don't use longs here because the addition means we need to keep
-   some bits in reserve to calculate carries.
-*/   
-
-typedef int32_t schunk;
-typedef uint32_t uchunk;
-
-typedef struct CHUNK {
-    int32_t size;
-    uchunk *chunks;
-} CHUNK;
-
-struct MyersUnlimitedSearch {
-    int32_t m;
-    CHUNK *PEq[256];
-    CHUNK *PEq_R[256];
-};
-
-static const char NA2KEY [] = "ACGT";
-static const char NA4KEY [] = " ACMGRSVTWYHKDBN";
-
-static
-int32_t any_non_4na_chars(const char *pattern)
-{
-    int32_t len = strlen(pattern);
-    int32_t i;
-    char *p;
-
-    for ( i=0; i<len; i++ )
-    {
-        p = strchr( NA4KEY, pattern[i] );
-        if ( p == NULL )
-            return 1;
-    }
-    return 0;
-}
-
-static
-int32_t na4key_matches(AgrepFlags mode, char na4, char acgt)
-{
-    char *p;
-    int32_t pos4, pos2;
-    p = strchr( NA4KEY, na4 );
-    if ( p == NULL )
-    {
-        p = strchr( NA4KEY, 'N' );
-    }
-    pos4 = p - NA4KEY;
-    pos2 = strchr( NA2KEY, acgt ) - NA2KEY;
-    if ( pos4 & ( 1 << pos2 ) )
-        return 1;
-    return 0;
-}
-
-
-
-
-int32_t chunksize(int32_t size) {
-    int32_t ret;
-    ret = 1 + (size / (8*sizeof(uchunk)));
-    return ret;
-}
-
-void chunk_or_in(CHUNK *chunk, CHUNK *or)
-{
-    int32_t i;
-    int32_t size = chunk->size;
-    for (i=0; i<size; i++)
-        chunk->chunks[i] |= or->chunks[i];
-}
-
-void chunk_xor_in(CHUNK *chunk, CHUNK *xor)
-{
-    int32_t i;
-    int32_t size = chunk->size;
-    for (i=0; i<size; i++)
-        chunk->chunks[i] ^= xor->chunks[i];
-}
-
-
-void chunk_and_in(CHUNK *chunk, CHUNK *and)
-{
-    int32_t i;
-    int32_t size = chunk->size;
-    for (i=0; i<size; i++)
-        chunk->chunks[i] &= and->chunks[i];
-}
-
-void chunk_add_in(CHUNK *chunk, CHUNK *add)
-{
-    int32_t i;
-    int32_t size = chunk->size;
-    uint64_t carry = 0;
-    uint64_t newcarry;
-    for (i=size-1; i>=0; i--) {
-        newcarry = 
-            ((uint64_t)chunk->chunks[i] + (uint64_t)add->chunks[i]
-             + carry)
-            >> (8*sizeof(uchunk));
-        chunk->chunks[i] += add->chunks[i] + carry;
-        carry = newcarry;
-    }
-}
-
-
-void chunk_set(CHUNK *chunk, CHUNK *copy)
-{
-    int32_t i;
-    for (i=0; i<chunk->size; i++) {
-        chunk->chunks[i] = copy->chunks[i];
-    }
-}
-
-
-int32_t chunk_isbit_set(CHUNK *chunk, int32_t bit)
-{
-    int32_t cn = chunk->size - 1 - (bit / (8*sizeof(uchunk)));
-    int32_t chunkbit = bit % (8*sizeof(uchunk));
-    return chunk->chunks[cn] & (1 << chunkbit);
-}
-
-
-void chunk_set_bit(CHUNK *chunk, int32_t bit) 
-{
-    int32_t cn = chunk->size - 1 - (bit / (8*sizeof(uchunk)));
-    int32_t chunkbit = bit % (8*sizeof(uchunk));
-    chunk->chunks[cn] |= (1 << chunkbit);
-}
-
-
-void chunk_negate(CHUNK *chunk)
-{
-    int32_t i;
-    for (i=0; i<chunk->size; i++) {
-        chunk->chunks[i] = ~chunk->chunks[i];
-    }
-}
-
-void alloc_chunk_and_zero(CHUNK *chunk, int32_t size)
-{
-    chunk->chunks = malloc(size * sizeof(uchunk));
-    memset(chunk->chunks, 0, size * sizeof(uchunk));
-}
-
-void free_chunk_parts(CHUNK *chunk)
-{
-    free(chunk->chunks);
-    chunk->chunks = NULL;
-}
-
-void free_chunk(CHUNK *chunk)
-{
-    free(chunk->chunks);
-    free(chunk);
-}
-
-
-CHUNK *alloc_chunk(int32_t size)
-{
-    CHUNK *ret;
-    ret = malloc(sizeof(CHUNK));
-    ret->size = size;
-    ret->chunks = malloc(size * sizeof(uchunk));
-    memset(ret->chunks, 0, size * sizeof(uchunk));
-    return ret;
-}
-  
-void chunk_set_minusone(CHUNK *src)
-{
-    int32_t i;
-    for (i=0; i<src->size; i++) {
-        src->chunks[i] = (uchunk)-1;
-    }
-}
-
-void chunk_zero(CHUNK *src)
-{
-    int32_t i;
-    for (i=0; i<src->size; i++) {
-        src->chunks[i] = (uchunk)0;
-    }
-}
-
-void print_chunk(CHUNK *src)
-{
-    uchunk chunk;
-    unsigned char byte;
-    char buf[9];
-    int32_t i, j, k;
-    buf[8] = '\0';
-    for (i=0; i<src->size; i++) {
-        chunk = src->chunks[i];
-        for (j=0; j<sizeof(uchunk); j++) {
-            byte = chunk >> (8*(sizeof(uchunk) - j - 1));
-            for (k=0; k<8; k++) {
-                buf[k] = "01"[1&(byte>>(7-k))];
-            }
-            printf("%s ", buf);
-        }
-    }
-    printf("\n");
-}
-
-
-/*
-  This currently does not preserve the sign bit.
-*/
-void lshift_chunk(CHUNK *dest, CHUNK *src, int32_t n)
-{
-    int32_t i, j;
-    uchunk slop;
-    int32_t chunkshift = n / (8*sizeof(uchunk));
-    int32_t rem = n % (8*sizeof(uchunk));
-    /* Assumes they're both the same size. */
-    int32_t size = src->size;
-
-
-    /* i is the destination chunk */
-    slop = 0;
-    for (i=size-1; i>=0; i--) {
-        j = i+chunkshift;
-        if (j >= size) {
-            dest->chunks[i] = 0;
-        } else {
-            dest->chunks[i] = slop | src->chunks[j] << rem;
-            slop = src->chunks[j] >> (8*sizeof(uchunk) - rem);
-        }
-    }
-}
-
-void chunk_lshift_one_inplace(CHUNK *dest)
-{
-    int32_t i;
-    uchunk slop, newslop;
-    int32_t size = dest->size;
-
-    slop = 0;
-    for (i=size-1; i>=0; i--) {
-        newslop = dest->chunks[i] >> (8*sizeof(uchunk) - 1);
-        dest->chunks[i] = slop | dest->chunks[i] << 1;
-        slop = newslop;
-    }
-}
-
-
-void chunk_lshift_one(CHUNK *dest, CHUNK *src)
-{
-    int32_t i;
-    uchunk slop;
-    int32_t size = src->size;
-
-    slop = 0;
-    for (i=size-1; i>=0; i--) {
-        dest->chunks[i] = slop | src->chunks[i] << 1;
-        slop = src->chunks[i] >> (8*sizeof(uchunk) - 1);
-    }
-}
-
-
-
-#ifdef UNUSED_MAY_NOT_WORK  
-  
-/*
- * In this, chunks are big-endian, meaning 0 is the most significant chunk.
- */
-void rshift_uchunk(CHUNK *dest, CHUNK *src, int32_t n)
-{
-    int32_t size = src->size;
-    uchunk slop;
-    int32_t chunkshift = n / (8*sizeof(uchunk));
-    int32_t rem = n % (8*sizeof(uchunk));
-    int32_t i, j;
-
-    /* i is the destination chunk */
-    slop = 0;
-    for (i=0; i<size; i++) {
-        j = i-chunkshift;
-        if (j < 0) {
-            dest->chunks[i] = 0;
-        } else {
-            dest->chunks[i] = slop | src->chunks[j] >> rem;
-            slop = src->chunks[j] << (8*sizeof(uchunk) - rem);
-        }
-    }
-}
-
-void rshift_schunk(CHUNK *dest, CHUNK *src, int32_t n)
-{
-    uchunk slop;
-    int32_t chunkshift = n / (8*sizeof(uchunk));
-    int32_t rem = n % (8*sizeof(uchunk));
-    int32_t i, j, size;
-
-    /* i is the destination chunk */
-    slop = -1;
-    for (i=0; i<size; i++) {
-        j = i-chunkshift;
-        if (j < 0) {
-            dest->chunks[i] = -1;
-        } else {
-            dest->chunks[i] = slop | src->chunks[j] >> rem;
-            slop = src->chunks[j] << (8*sizeof(uchunk) - rem);
-        }
-    }
-}
-
-#endif
-
-
-void MyersUnlimitedFree ( MyersUnlimitedSearch *self )
-{
-    int32_t j;
-    for (j=0; j<256; j++) {
-        free_chunk(self->PEq[j]);
-        free_chunk(self->PEq_R[j]);
-    }
-    free(self);
-}
-  
-
-rc_t MyersUnlimitedMake ( MyersUnlimitedSearch **self,
-        AgrepFlags mode, const char *pattern )
-{
-    const unsigned char *upattern = (const unsigned char *)pattern;
-    int32_t rc;
-    int32_t len = strlen(pattern);
-    int32_t plen = len;
-    int32_t i, j;
-    int32_t m;
-    int32_t chunks;
-
-    if (!(mode & AGREP_ANYTHING_ELSE_IS_N) &&
-        any_non_4na_chars(pattern))
-        /* This should be a return code. */
-        return RC( rcText, rcString, rcSearching, rcParam, rcUnrecognized);
-
-
-    *self = malloc(sizeof(MyersUnlimitedSearch));
-    m = (*self)->m = len;
-    chunks = chunksize(m);
-    for (j=0; j<256; j++) {
-        (*self)->PEq[j] = alloc_chunk(chunks);
-        (*self)->PEq_R[j] = alloc_chunk(chunks);
-    }
-
-    for(j = 0; j < m; j++) {
-        chunk_set_bit((*self)->PEq[upattern[j]], j);
-        if( pattern[j] == 'a' ) {
-            chunk_set_bit((*self)->PEq['t'], j); /* t == a */
-        }
-    }
-
-    for(j = 0; j < m; j++) {
-        chunk_set_bit((*self)->PEq_R[upattern[m-j-1]], j);
-        if( pattern[m-j-1] == 'a' ) {
-            chunk_set_bit((*self)->PEq_R['t'], j); /* t == a */
-        }
-    }
-
-    for (i=0; i<4; i++) {
-        unsigned char acgt = NA2KEY[i];
-        for (j=0; j<plen; j++) {
-            if (na4key_matches(mode, pattern[j], acgt)) {
-                /* bits |= (unsigned long)1<<j; */
-                chunk_set_bit((*self)->PEq[acgt], j);
-                if (mode & AGREP_TEXT_EXPANDED_2NA)
-                    chunk_set_bit((*self)->PEq[i], j);
-            }
-        }
-    }
-    for (i=0; i<4; i++) {
-        unsigned char acgt = NA2KEY[i];
-        for (j=0; j<plen; j++) {
-            if (na4key_matches(mode, pattern[plen-j-1], acgt)) {
-                chunk_set_bit((*self)->PEq_R[acgt], j);
-                if (mode & AGREP_TEXT_EXPANDED_2NA)
-                    chunk_set_bit((*self)->PEq_R[i], j);
-            }
-        }
-    }
-    return 0;
-
-    for (j=0; j<256; j++) {
-        free_chunk((*self)->PEq[j]);
-        free_chunk((*self)->PEq_R[j]);
-    }
-    free(*self);
-    *self = NULL;
-    return rc;
-
-}
-
-
-/* 
-   This finds the first match forward in the string less than or equal
-   the threshold.  If nonzero, this will be a prefix of any exact match.
-*/
-uint32_t MyersUnlimitedFindFirst ( MyersUnlimitedSearch *self, 
-        int32_t threshold, const char* text, size_t n, AgrepMatch *match )
-{
-    const unsigned char *utext = (const unsigned char *)text;
-    CHUNK *Pv;
-    CHUNK *Mv;
-    CHUNK *Xv, *Xh, *Ph, *Mh;
-
-    int32_t m = self->m;
-    int32_t csize = chunksize(m);
-    int32_t Score;
-    int32_t BestScore = m;
-    int32_t from = 0;
-    int32_t to = -1;
-
-    int32_t j;
-
-    CHUNK *Eq;
-
-    Pv = alloc_chunk(csize);
-    Mv = alloc_chunk(csize);
-    Xv = alloc_chunk(csize);
-    Xh = alloc_chunk(csize);
-    Ph = alloc_chunk(csize);
-    Mh = alloc_chunk(csize);
-
-
-    Score = m;
-    chunk_set_minusone(Pv);
-    chunk_zero(Mv);
-    
-    for(j = 0; j < n; j++) {
-#ifdef DEBUG
-        printf("%d j loop\n", j);
-#endif
-        Eq = self->PEq[utext[j]];
-#ifdef DEBUG
-        printf("Eq: "); print_chunk(Eq); printf("\n");
-#endif
-        /* Xv = Eq | Mv; */
-        chunk_set(Xv, Eq);
-        chunk_or_in(Xv, Mv);
-#ifdef DEBUG
-        printf("Xv: "); print_chunk(Xv); printf("\n");
-#endif
-        /* Xh = (((Eq & Pv) + Pv) ^ Pv) | Eq; */
-        chunk_set(Xh, Eq);
-        chunk_and_in(Xh, Pv);
-        chunk_add_in(Xh, Pv);
-        chunk_xor_in(Xh, Pv);
-        chunk_or_in(Xh, Eq);
-#ifdef DEBUG
-        printf("Xh: "); print_chunk(Xh); printf("\n");
-#endif
-        /* Ph = Mv | ~ (Xh | Pv); */
-        chunk_set(Ph, Xh);
-        chunk_or_in(Ph, Pv);
-        chunk_negate(Ph);
-        chunk_or_in(Ph, Mv);
-#ifdef DEBUG
-        printf("Ph: "); print_chunk(Ph); printf("\n");
-#endif
-        /* Mh = Pv & Xh; */
-        chunk_set(Mh, Pv);
-        chunk_and_in(Mh, Xh);
-#ifdef DEBUG
-        printf("Mh: "); print_chunk(Mh); printf("\n");
-#endif
-        /* Ph & (1 << (m - 1)) */
-        if (chunk_isbit_set(Ph, m-1)) {
-            Score++;
-            /* Mh & (1 << (m - 1)) */
-        } else if (chunk_isbit_set(Mh, m-1)) {
-            Score--;
-        }
-        /* Ph <<= 1; */
-        chunk_lshift_one_inplace(Ph);
-#ifdef DEBUG
-        printf("Ph: "); print_chunk(Ph); printf("\n");
-#endif
-        /* Mh <<= 1; */
-        chunk_lshift_one_inplace(Mh);
-#ifdef DEBUG
-        printf("Mh: "); print_chunk(Mh); printf("\n");
-#endif
-        /* Pv = Mh | ~(Xv | Ph); */
-        chunk_set(Pv, Xv);
-        chunk_or_in(Pv, Ph);
-        chunk_negate(Pv);
-        chunk_or_in(Pv, Mh);
-#ifdef DEBUG
-        printf("Pv: "); print_chunk(Pv); printf("\n");
-#endif
-        /* Mv = Ph & Xv; */
-        chunk_set(Mv, Ph);
-        chunk_and_in(Mv, Xv);
-#ifdef DEBUG
-        printf("Mv: "); print_chunk(Mv); printf("\n");
-#endif
-#ifdef DEBUG
-        printf("%3d. score %d\n", j, Score);
-#endif
-        if (Score <= threshold) {
-            BestScore = Score;
-            to = j;
-            break;
-        }
-    }
-
-    /* Continue while score decreases under the threshold */
-    for(j++; j < n; j++) {
-        Eq = self->PEq[utext[j]];
-        /* Xv = Eq | Mv; */
-        chunk_set(Xv, Eq);
-        chunk_or_in(Xv, Mv);
-        /* Xh = (((Eq & Pv) + Pv) ^ Pv) | Eq; */
-        chunk_set(Xh, Eq);
-        chunk_and_in(Xh, Pv);
-        chunk_add_in(Xh, Pv);
-        chunk_xor_in(Xh, Pv);
-        chunk_or_in(Xh, Eq);
-        /* Ph = Mv | ~ (Xh | Pv); */
-        chunk_set(Ph, Xh);
-        chunk_or_in(Ph, Pv);
-        chunk_negate(Ph);
-        chunk_or_in(Ph, Mv);
-        /* Mh = Pv & Xh; */
-        chunk_set(Mh, Pv);
-        chunk_and_in(Mh, Xh);
-        /* Ph & (1 << (m - 1)) */
-        if (chunk_isbit_set(Ph, m-1)) {
-            Score++;
-            /* Mh & (1 << (m - 1)) */
-        } else if (chunk_isbit_set(Mh, m-1)) {
-            Score--;
-        }
-        /* Ph <<= 1; */
-        chunk_lshift_one_inplace(Ph);
-        /* Mh <<= 1; */
-        chunk_lshift_one_inplace(Mh);
-        /* Pv = Mh | ~(Xv | Ph); */
-        chunk_set(Pv, Xv);
-        chunk_or_in(Pv, Ph);
-        chunk_negate(Pv);
-        chunk_or_in(Pv, Mh);
-        /* Mv = Ph & Xv; */
-        chunk_set(Mv, Ph);
-        chunk_and_in(Mv, Xv);
-
-#ifdef DEBUG	
-        printf("%3d. score %d\n", j, Score);
-#endif
-        if (Score < BestScore) {
-            BestScore = Score;
-            to = j;
-        } else {
-            break;
-        }
-    }
-
-    /* Re-initialize for next scan! */
-    Score = m;
-    chunk_set_minusone(Pv);
-    chunk_zero(Mv);
-    
-    for(j = to; j >= 0; j--) {
-        Eq = self->PEq_R[utext[j]]; 	/* This line is different. */
-        /* Xv = Eq | Mv; */
-        chunk_set(Xv, Eq);
-        chunk_or_in(Xv, Mv);
-        /* Xh = (((Eq & Pv) + Pv) ^ Pv) | Eq; */
-        chunk_set(Xh, Eq);
-        chunk_and_in(Xh, Pv);
-        chunk_add_in(Xh, Pv);
-        chunk_xor_in(Xh, Pv);
-        chunk_or_in(Xh, Eq);
-        /* Ph = Mv | ~ (Xh | Pv); */
-        chunk_set(Ph, Xh);
-        chunk_or_in(Ph, Pv);
-        chunk_negate(Ph);
-        chunk_or_in(Ph, Mv);
-        /* Mh = Pv & Xh; */
-        chunk_set(Mh, Pv);
-        chunk_and_in(Mh, Xh);
-        /* Ph & (1 << (m - 1)) */
-        if (chunk_isbit_set(Ph, m-1)) {
-            Score++;
-            /* Mh & (1 << (m - 1)) */
-        } else if (chunk_isbit_set(Mh, m-1)) {
-            Score--;
-        }
-        /* Ph <<= 1; */
-        chunk_lshift_one_inplace(Ph);
-        /* Mh <<= 1; */
-        chunk_lshift_one_inplace(Mh);
-        /* Pv = Mh | ~(Xv | Ph); */
-        chunk_set(Pv, Xv);
-        chunk_or_in(Pv, Ph);
-        chunk_negate(Pv);
-        chunk_or_in(Pv, Mh);
-        /* Mv = Ph & Xv; */
-        chunk_set(Mv, Ph);
-        chunk_and_in(Mv, Xv);
-
-#ifdef DEBUG	
-        printf("%3d. score %d\n", j, Score); 
-#endif
-        if(Score <= BestScore) {
-#ifdef DEBUG	    
-            printf("rev match at position %d\n", j);
-#endif
-            from = j;
-            break;
-        }
-    }
-
-    free_chunk(Pv);
-    free_chunk(Mv);
-    free_chunk(Xv);
-    free_chunk(Xh);
-    free_chunk(Ph);
-    free_chunk(Mh);
-    
-    if (BestScore <= threshold) {
-        match->position = from;
-        match->length = to-from+1;
-        match->score = BestScore;
-        return 1;
-    } else {
-        return 0;
-    }
-}
-
-/* 
-   This finds the first match forward in the string less than or equal
-   the threshold.  If nonzero, this will be a prefix of any exact match.
-*/
-void MyersUnlimitedFindAll ( const AgrepCallArgs *args )
-{
-    AgrepFlags mode = args->self->mode;
-    MyersUnlimitedSearch *self = args->self->myersunltd;
-    int32_t threshold = args->threshold;
-    const unsigned char *utext = (const unsigned char *)args->buf;
-    int32_t n = args->buflen;
-    AgrepMatchCallback cb = dp_end_callback;
-    const void *cbinfo = args;
-
-    AgrepMatch match;
-    AgrepContinueFlag cont;
-
-    CHUNK *Pv;
-    CHUNK *Mv;
-    CHUNK *Xv, *Xh, *Ph, *Mh;
-
-    int32_t m = self->m;
-    int32_t csize = chunksize(m);
-    int32_t Score;
-
-    int32_t curscore = 0;
-    int32_t curlast = 0;
-    int32_t continuing = 0;
-
-    int32_t j;
-
-    CHUNK *Eq;
-
-
-
-    Pv = alloc_chunk(csize);
-    Mv = alloc_chunk(csize);
-    Xv = alloc_chunk(csize);
-    Xh = alloc_chunk(csize);
-    Ph = alloc_chunk(csize);
-    Mh = alloc_chunk(csize);
-
-    Score = m;
-    chunk_set_minusone(Pv);
-    chunk_zero(Mv);
-    
-    for(j = 0; j < n; j++) {
-#ifdef DEBUG
-        printf("%d j loop\n", j);
-#endif
-        Eq = self->PEq[utext[j]];
-#ifdef DEBUG
-        printf("Eq: "); print_chunk(Eq); printf("\n");
-#endif
-        /* Xv = Eq | Mv; */
-        chunk_set(Xv, Eq);
-        chunk_or_in(Xv, Mv);
-#ifdef DEBUG
-        printf("Xv: "); print_chunk(Xv); printf("\n");
-#endif
-        /* Xh = (((Eq & Pv) + Pv) ^ Pv) | Eq; */
-        chunk_set(Xh, Eq);
-        chunk_and_in(Xh, Pv);
-        chunk_add_in(Xh, Pv);
-        chunk_xor_in(Xh, Pv);
-        chunk_or_in(Xh, Eq);
-#ifdef DEBUG
-        printf("Xh: "); print_chunk(Xh); printf("\n");
-#endif
-        /* Ph = Mv | ~ (Xh | Pv); */
-        chunk_set(Ph, Xh);
-        chunk_or_in(Ph, Pv);
-        chunk_negate(Ph);
-        chunk_or_in(Ph, Mv);
-#ifdef DEBUG
-        printf("Ph: "); print_chunk(Ph); printf("\n");
-#endif
-        /* Mh = Pv & Xh; */
-        chunk_set(Mh, Pv);
-        chunk_and_in(Mh, Xh);
-#ifdef DEBUG
-        printf("Mh: "); print_chunk(Mh); printf("\n");
-#endif
-        /* Ph & (1 << (m - 1)) */
-        if (chunk_isbit_set(Ph, m-1)) {
-            Score++;
-            /* Mh & (1 << (m - 1)) */
-        } else if (chunk_isbit_set(Mh, m-1)) {
-            Score--;
-        }
-        /* Ph <<= 1; */
-        chunk_lshift_one_inplace(Ph);
-#ifdef DEBUG
-        printf("Ph: "); print_chunk(Ph); printf("\n");
-#endif
-        /* Mh <<= 1; */
-        chunk_lshift_one_inplace(Mh);
-#ifdef DEBUG
-        printf("Mh: "); print_chunk(Mh); printf("\n");
-#endif
-        /* Pv = Mh | ~(Xv | Ph); */
-        chunk_set(Pv, Xv);
-        chunk_or_in(Pv, Ph);
-        chunk_negate(Pv);
-        chunk_or_in(Pv, Mh);
-#ifdef DEBUG
-        printf("Pv: "); print_chunk(Pv); printf("\n");
-#endif
-        /* Mv = Ph & Xv; */
-        chunk_set(Mv, Ph);
-        chunk_and_in(Mv, Xv);
-#ifdef DEBUG
-        printf("Mv: "); print_chunk(Mv); printf("\n");
-#endif
-#ifdef DEBUG
-        printf("%3d. score %d\n", j, Score);
-#endif
-        if (Score <= threshold) {
-            if (continuing) {
-                if (Score < curscore &&
-                    ((mode & AGREP_EXTEND_BETTER) ||
-                     (mode & AGREP_EXTEND_SAME))) {
-                    curscore = Score;
-                    curlast = j;
-                } else if (Score == curscore &&
-                           ((mode & AGREP_EXTEND_BETTER) ||
-                            (mode & AGREP_EXTEND_SAME))) {
-                    if (mode & AGREP_EXTEND_SAME) {
-                        curlast = j;
-                    }
-                } else {
-                    continuing = 0;
-                    match.score = curscore;
-                    match.position = curlast;
-                    match.length = -1;
-                    cont = AGREP_CONTINUE;
-                    (*cb)(cbinfo, &match, &cont);
-                    if (cont != AGREP_CONTINUE)
-                        goto EXIT;
-                }
-            } else if ((mode & AGREP_EXTEND_SAME) ||
-                       (mode & AGREP_EXTEND_BETTER)) {
-                curscore = Score;
-                curlast = j;
-                continuing = 1;
-            } else {
-                match.score = Score;
-                match.position = j;
-                match.length = -1;
-                cont = AGREP_CONTINUE;
-                (*cb)(cbinfo, &match, &cont);
-                if (cont != AGREP_CONTINUE)
-                    goto EXIT;
-            }
-            /* If we're no longer under the threshold, we might
-               have been moving forward looking for a better match 
-            */
-        } else if (continuing) {
-            continuing = 0;
-            match.score = curscore;
-            match.position = curlast;
-            match.length = -1;
-            cont = AGREP_CONTINUE;
-            (*cb)(cbinfo, &match, &cont);
-            if (cont != AGREP_CONTINUE)
-                goto EXIT;
-        }
-        /* print_col_as_row(nxt, plen); */
-    }
-    if (continuing) {
-        continuing = 0;
-        match.score = curscore;
-        match.position = curlast;
-        match.length = -1;
-        (*cb)(cbinfo, &match, &cont);
-    }
-
-EXIT:
-
-    free_chunk(Pv);
-    free_chunk(Mv);
-    free_chunk(Xv);
-    free_chunk(Xh);
-    free_chunk(Ph);
-    free_chunk(Mh);
-}
-
-
-LIB_EXPORT int32_t CC MyersUnlimitedFindBest ( MyersUnlimitedSearch *self,
-        const char* text, size_t n, int32_t *pos, int32_t *len )
-{
-    const unsigned char *utext = (const unsigned char *)text;
-    CHUNK *Pv;
-    CHUNK *Mv;
-    CHUNK *Xv, *Xh, *Ph, *Mh;
-
-    int32_t m = self->m;
-    int32_t csize = chunksize(m);
-    int32_t Score;
-    int32_t BestScore = m;
-    int32_t from = 0;
-    int32_t to = -1;
-
-    int32_t j;
-
-    CHUNK *Eq;
-
-    Pv = alloc_chunk(csize);
-    Mv = alloc_chunk(csize);
-    Xv = alloc_chunk(csize);
-    Xh = alloc_chunk(csize);
-    Ph = alloc_chunk(csize);
-    Mh = alloc_chunk(csize);
-
-
-    Score = m;
-    chunk_set_minusone(Pv);
-    chunk_zero(Mv);
-    
-    for(j = 0; j < n; j++) {
-#ifdef DEBUG
-        printf("%d j loop\n", j);
-#endif
-        Eq = self->PEq[utext[j]];
-#ifdef DEBUG
-        printf("Eq: "); print_chunk(Eq); printf("\n");
-#endif
-        /* Xv = Eq | Mv; */
-        chunk_set(Xv, Eq);
-        chunk_or_in(Xv, Mv);
-#ifdef DEBUG
-        printf("Xv: "); print_chunk(Xv); printf("\n");
-#endif
-        /* Xh = (((Eq & Pv) + Pv) ^ Pv) | Eq; */
-        chunk_set(Xh, Eq);
-        chunk_and_in(Xh, Pv);
-        chunk_add_in(Xh, Pv);
-        chunk_xor_in(Xh, Pv);
-        chunk_or_in(Xh, Eq);
-#ifdef DEBUG
-        printf("Xh: "); print_chunk(Xh); printf("\n");
-#endif
-        /* Ph = Mv | ~ (Xh | Pv); */
-        chunk_set(Ph, Xh);
-        chunk_or_in(Ph, Pv);
-        chunk_negate(Ph);
-        chunk_or_in(Ph, Mv);
-#ifdef DEBUG
-        printf("Ph: "); print_chunk(Ph); printf("\n");
-#endif
-        /* Mh = Pv & Xh; */
-        chunk_set(Mh, Pv);
-        chunk_and_in(Mh, Xh);
-#ifdef DEBUG
-        printf("Mh: "); print_chunk(Mh); printf("\n");
-#endif
-        /* Ph & (1 << (m - 1)) */
-        if (chunk_isbit_set(Ph, m-1)) {
-            Score++;
-            /* Mh & (1 << (m - 1)) */
-        } else if (chunk_isbit_set(Mh, m-1)) {
-            Score--;
-        }
-        /* Ph <<= 1; */
-        chunk_lshift_one_inplace(Ph);
-#ifdef DEBUG
-        printf("Ph: "); print_chunk(Ph); printf("\n");
-#endif
-        /* Mh <<= 1; */
-        chunk_lshift_one_inplace(Mh);
-#ifdef DEBUG
-        printf("Mh: "); print_chunk(Mh); printf("\n");
-#endif
-        /* Pv = Mh | ~(Xv | Ph); */
-        chunk_set(Pv, Xv);
-        chunk_or_in(Pv, Ph);
-        chunk_negate(Pv);
-        chunk_or_in(Pv, Mh);
-#ifdef DEBUG
-        printf("Pv: "); print_chunk(Pv); printf("\n");
-#endif
-        /* Mv = Ph & Xv; */
-        chunk_set(Mv, Ph);
-        chunk_and_in(Mv, Xv);
-#ifdef DEBUG
-        printf("Mv: "); print_chunk(Mv); printf("\n");
-#endif
-#ifdef DEBUG
-        printf("%3d. score %d\n", j, Score);
-#endif
-        if (Score < BestScore) {
-            BestScore = Score;
-            to = j;
-        }
-    }
-
-    /* Re-initialize for next scan! */
-    Score = m;
-    chunk_set_minusone(Pv);
-    chunk_zero(Mv);
-    
-    for(j = to; j >= 0; j--) {
-        Eq = self->PEq_R[utext[j]]; 	/* This line is different. */
-        /* Xv = Eq | Mv; */
-        chunk_set(Xv, Eq);
-        chunk_or_in(Xv, Mv);
-        /* Xh = (((Eq & Pv) + Pv) ^ Pv) | Eq; */
-        chunk_set(Xh, Eq);
-        chunk_and_in(Xh, Pv);
-        chunk_add_in(Xh, Pv);
-        chunk_xor_in(Xh, Pv);
-        chunk_or_in(Xh, Eq);
-        /* Ph = Mv | ~ (Xh | Pv); */
-        chunk_set(Ph, Xh);
-        chunk_or_in(Ph, Pv);
-        chunk_negate(Ph);
-        chunk_or_in(Ph, Mv);
-        /* Mh = Pv & Xh; */
-        chunk_set(Mh, Pv);
-        chunk_and_in(Mh, Xh);
-        /* Ph & (1 << (m - 1)) */
-        if (chunk_isbit_set(Ph, m-1)) {
-            Score++;
-            /* Mh & (1 << (m - 1)) */
-        } else if (chunk_isbit_set(Mh, m-1)) {
-            Score--;
-        }
-        /* Ph <<= 1; */
-        chunk_lshift_one_inplace(Ph);
-        /* Mh <<= 1; */
-        chunk_lshift_one_inplace(Mh);
-        /* Pv = Mh | ~(Xv | Ph); */
-        chunk_set(Pv, Xv);
-        chunk_or_in(Pv, Ph);
-        chunk_negate(Pv);
-        chunk_or_in(Pv, Mh);
-        /* Mv = Ph & Xv; */
-        chunk_set(Mv, Ph);
-        chunk_and_in(Mv, Xv);
-
-#ifdef DEBUG
-        printf("%3d. score %d\n", j, Score); 
-#endif
-        if(Score <= BestScore) {
-#ifdef DEBUG
-            printf("rev match at position %d\n", j);
-#endif
-            from = j;
-            break;
-        }
-    }
-
-    free_chunk(Pv);
-    free_chunk(Mv);
-    free_chunk(Xv);
-    free_chunk(Xh);
-    free_chunk(Ph);
-    free_chunk(Mh);
-    
-    *pos = from;
-    *len = to-from+1;
-
-    return BestScore;
-
-    /* printf("Found [%d,%d]\n", from, to);
-       printf("Found '%.*s'\n", to - from + 1, &text[from]); */
-}
-
diff --git a/libs/search/agrep-wumanber.c b/libs/search/agrep-wumanber.c
deleted file mode 100644
index 881b83d..0000000
--- a/libs/search/agrep-wumanber.c
+++ /dev/null
@@ -1,415 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <search/extern.h>
-#include <compiler.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "search-priv.h"
-
-static
-int32_t debug = 0;
-
-struct AgrepWuParams {
-    unsigned char* pattern;
-    int32_t len;
-    uint64_t alphabits[256];
-    uint64_t r_alphabits[256];
-    int64_t patmask; /* Actually an inverse mask (0's in the pattern positions) */
-};
-
-/* This now computes the alphabits for a 4na pattern. */
-static
-rc_t compute_alphabits_4na(AgrepWuParams *self, AgrepFlags mode)
-{
-    rc_t rc = 0;
-    int32_t i;
-
-    self->patmask = ((uint64_t) -1) << self->len;
-
-    for(i = 0; i < 256; i++) {
-        self->alphabits[i] = self->patmask;
-        self->r_alphabits[i] = self->patmask;
-    }
-    for(i = 0; rc == 0 && i < self->len; i++) {
-        if( (rc = na4_set_bits(mode, self->alphabits, self->pattern[i], (uint64_t)1<<(self->len-i-1))) == 0 ) {
-            rc = na4_set_bits(mode, self->r_alphabits, self->pattern[self->len-i-1], (uint64_t)1<<(self->len-i-1));
-        }
-    }
-    return rc;
-}
-
-static
-void compute_alphabits(AgrepWuParams *self)
-{
-    int32_t i, j;
-    uint64_t bits, patmask;
-
-    patmask = self->patmask = ((uint64_t)-1) << self->len;
- 
-    /* TBD use AGREP_IGNORE_CASE */
-    for (i=0; i<256; i++) {
-        bits = 0;
-        for (j=0; j<self->len; j++) {
-            if (self->pattern[j] == i) {
-                bits |= (uint64_t)1<<(self->len-j-1);
-            }
-        }
-        self->alphabits[i] = bits | patmask;
-    }
-    for (i=0; i<256; i++) {
-        bits = 0;
-        for (j=0; j<self->len; j++) {
-            if (self->pattern[self->len-j-1] == i) {
-                bits |= (uint64_t)1<<(self->len-j-1);
-            }
-        }
-        self->r_alphabits[i] = bits | patmask;
-    }
-}
-
-rc_t AgrepWuMake( AgrepWuParams **self, AgrepFlags mode, const char *pattern )
-{
-    rc_t rc = 0;
-
-    *self = NULL;
-    if(strlen(pattern) > 63) {
-        rc = RC( rcText, rcString, rcSearching, rcParam, rcExcessive);
-    } else if( (*self = malloc(sizeof(**self))) == NULL ) {
-        rc = RC(rcText, rcString, rcSearching, rcMemory, rcExhausted);
-    } else {
-        (*self)->pattern = (unsigned char*)strdup(pattern);
-        (*self)->len = strlen(pattern);
-        if( (*self)->pattern == NULL ) {
-            rc = RC(rcText, rcString, rcSearching, rcMemory, rcExhausted);
-        } else if(mode & AGREP_PATTERN_4NA) {
-            rc = compute_alphabits_4na(*self, mode);
-        } else {
-            compute_alphabits(*self);
-        }
-    }
-    if( rc != 0 ) {
-        AgrepWuFree(*self);
-        *self = NULL;
-    }
-    return rc;
-}
-
-void AgrepWuFree ( AgrepWuParams *self )
-{
-    if( self != NULL ) {
-        free(self->pattern);
-        free(self);
-    }
-}
-
-static
-void callback_with_end( const AgrepCallArgs *args )
-{
-    AgrepFlags mode = args->self->mode;
-    AgrepWuParams *self = args->self->wu;
-    int32_t threshold = args->threshold;
-    unsigned char *buf = (unsigned char *)args->buf;
-    int32_t buflen = args->buflen;
-    AgrepMatchCallback cb = dp_end_callback;
-    const void *cbinfo = args;
-    
-    AgrepMatch match;
-    AgrepContinueFlag cont;
-    int32_t i, k;
-    int64_t *R = malloc(sizeof(int64_t) * (threshold + 1));
-    int64_t *Rnew = malloc(sizeof(int64_t) * (threshold + 1));
-    int64_t *tmp;
-
-    int32_t Score;
-    int32_t curscore = 0;
-    int32_t curlast = 0;
-    int32_t continuing = 0;
-
-    for (k=0; k<=threshold; k++) {
-        R[k] = self->patmask>>k;
-    }
-
-    for (i=0; i<buflen; i++) {
-        /* Not with 2na, you don't! 
-        if (buf[i] == '\0')
-        break; */
-
-        uint64_t bits = self->alphabits[buf[i]];
-        Rnew[0] = (R[0] >> 1) & bits;
-        for (k=1; k<=threshold; k++) {
-            Rnew[k] = ((R[k] >> 1) & bits) | R[k-1]>>1 | Rnew[k-1]>>1 | R[k-1];
-        }
-        Score = -1;
-        for (k=0; k<=threshold; k++) {
-            if (Rnew[k] & 1) {
-                /* Found a match -- report ending position, use DP for backscan */
-                Score = k;
-                break;
-            }
-        }
-        if (Score >= 0) {
-            if (continuing) {
-                if (Score < curscore &&
-                    ((mode & AGREP_EXTEND_BETTER) ||
-                     (mode & AGREP_EXTEND_SAME))) {
-                    curscore = Score;
-                    curlast = i;
-                } else if (Score == curscore &&
-                           ((mode & AGREP_EXTEND_BETTER) ||
-                            (mode & AGREP_EXTEND_SAME))) {
-                    if (mode & AGREP_EXTEND_SAME) {
-                        curlast = i;
-                    }
-                } else {
-                    continuing = 0;
-                    match.score = curscore;
-                    match.position = curlast;
-                    match.length = -1;
-                    cont = AGREP_CONTINUE;
-                    (*cb)(cbinfo, &match, &cont);
-                    if (cont != AGREP_CONTINUE)
-                        goto EXIT;
-                }
-            } else if ((mode & AGREP_EXTEND_SAME) ||
-                       (mode & AGREP_EXTEND_BETTER)) {
-                curscore = Score;
-                curlast = i;
-                continuing = 1;
-            } else {
-                match.score = Score;
-                match.position = i;
-                match.length = -1;
-                cont = AGREP_CONTINUE;
-                (*cb)(cbinfo, &match, &cont);
-                if (cont != AGREP_CONTINUE)
-                    goto EXIT;
-            }
-            /* If we're no longer under the threshold, we might
-               have been moving forward looking for a better match 
-            */
-        } else if (continuing) {
-            continuing = 0;
-            match.score = curscore;
-            match.position = curlast;
-            match.length = -1;
-            cont = AGREP_CONTINUE;
-            (*cb)(cbinfo, &match, &cont);
-            if (cont != AGREP_CONTINUE)
-                goto EXIT;
-        }
-        tmp = R; R = Rnew; Rnew = tmp;
-    }
-    if (continuing) {
-        continuing = 0;
-        match.score = curscore;
-        match.position = curlast;
-        match.length = -1;
-        (*cb)(cbinfo, &match, &cont);
-    }
-EXIT:
-    free(R);
-    free(Rnew);
-}
-
-/* 
-   Returns -1 if no match found, otherwise returns ENDING position.
-*/
-
-static
-int32_t find_end(const AgrepWuParams *self, int32_t threshold, const char *buf, int32_t buflen, int32_t *score)
-{
-    const unsigned char *ubuf = (const unsigned char *)buf;
-    int32_t i, k;
-    int64_t *R = malloc(sizeof(int64_t) * (threshold + 1));
-    int64_t *Rnew = malloc(sizeof(int64_t) * (threshold + 1));
-    int64_t *tmp;
-    int32_t foundit = 0;
-    int32_t found = -1; /* This is the value. */
-    int32_t stillunderthreshold = 0;
-    uint64_t bits;
-
-    *score = threshold;
-
-    for (k=0; k<=threshold; k++) {
-        R[k] = self->patmask>>k;
-    }
-
-    for (i=0; i<buflen; i++) {
-
-        if (buf[i] == '\0')
-            break;
-        bits = self->alphabits[ubuf[i]];
-        Rnew[0] = (R[0] >> 1) & bits;
-        if (Rnew[0] & 1) {
-            /* Exact match */
-            *score = 0;
-            if (debug) {
-                printf("Found end match at position %d\n", i);
-            }
-            free(R);
-            free(Rnew);
-            return i;
-        }
-        stillunderthreshold = 0;
-        for (k=1; k<=threshold; k++) {
-
-            Rnew[k] = ((R[k] >> 1) & bits) | R[k-1]>>1 | Rnew[k-1]>>1 | R[k-1];
-
-            if (Rnew[k] & 1) {
-                stillunderthreshold = 1;
-                /* Approx match */
-                if (k <= *score) {
-                    *score = k;
-                    if (debug) {
-                        printf("Found approx match at position %d\n", i);
-                    }
-                    foundit = 1;
-                    found = i;
-                }
-            }
-        }
-        /* If we're here, we haven't found anything at the threshold we're looking. */
-        if (foundit && !stillunderthreshold) {
-            free(R);
-            free(Rnew);
-            return found;
-        }
-        tmp = R; R = Rnew; Rnew = tmp;
-    }
-    free(R);
-    free(Rnew);
-    if (foundit)
-        return found;
-    return -1;
-}
-
-/*
-We only need to compute up to the score we're searching for.
-
-Returns nonnegative if found, otherwise returns -1.
-*/
-static
-int32_t find_begin(const AgrepWuParams *self, const char *buf, int32_t buflen, int32_t end, int32_t score )
-{
-    const unsigned char *ubuf = (const unsigned char *)buf;
-    int32_t i, k;
-    int64_t *R = malloc(sizeof(int64_t) * (score + 1));
-    int64_t *Rnew = malloc(sizeof(int64_t) * (score + 1));
-    int64_t *tmp;
-    int32_t foundit = 0;
-    int32_t found = -1;
-
-    for (k=0; k<=score; k++) {
-        R[k] = self->patmask>>k;
-    }
-
-    for (i=end; i>=0; i--) {
-
-        uint64_t bits = self->r_alphabits[ubuf[i]];
-        Rnew[0] = (R[0] >> 1) & bits;
-        if (Rnew[0] & 1) {
-            /* Exact match */
-            if (debug) {
-                printf("Found begin match at position %d\n", i);
-            }
-            free(R);
-            free(Rnew);
-            return i;
-        }
-        for (k=1; k<=score; k++) {
-
-            Rnew[k] = ((R[k] >> 1) & bits) | R[k-1]>>1 | Rnew[k-1]>>1 | R[k-1];
-
-            if (Rnew[k] & 1) {
-                /* Approx match */
-                if (debug) {
-                    printf("Found approx begin match at position %d\n", i);
-                }
-                score = k; /* Not sure this has an effect */
-                foundit = 1;
-                found = i;
-                goto CONTINUE;
-            }
-        }
-        /* If we're here, we haven't found anything at the threshold we're looking */
-        if (foundit) {
-            free(R);
-            free(Rnew);
-            return found;
-        }
-    CONTINUE:
-        tmp = R; R = Rnew; Rnew = tmp;
-    }
-    free(R);
-    free(Rnew);
-    if (foundit)
-        return found;
-    return -1;
-}
-
-/* 
-Returns nonzero if found something.
-*/
-uint32_t AgrepWuFindFirst( const AgrepWuParams *self, 
-        int32_t threshold, const char *buf, int32_t buflen, AgrepMatch *match )
-{
-    int32_t end, begin;
-    int32_t score;
-    while (-1 != (end = find_end(self, threshold, buf, buflen, &score))) {
-        begin = find_begin(self, buf, buflen, end, threshold);
-        if (begin < 0) {
-            /* This is some kind of error condition -- when the reverse search
-               goes past the beginning.  I think I wasn't biasing the 
-               reverse search, so a "best" reverse search didn't necessarily 
-               start at the end of the matching sequence. */
-            /* printf("It happened\n"); */
-            begin = end-self->len - threshold;
-            if (begin < 0) {
-                begin = 0;
-            }
-        }
-        match->position = begin;
-        match->length = end - begin + 1;
-        match->score = score;
-        return 1;
-    }
-    return 0;
-}
-
-void AgrepWuFindAll( const AgrepCallArgs *args )
-{
-    callback_with_end( args );
-}
-    
-
diff --git a/libs/search/debug.h b/libs/search/debug.h
deleted file mode 100644
index cbbb709..0000000
--- a/libs/search/debug.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#ifndef _h_search_debug_
-#define _h_search_debug_
-
-#include <klib/debug.h>
-
-#if _DEBUGGING
-#define SEARCH_DBGF(msg) DBGMSG(DBG_SEARCH, DBG_FLAG(DBG_SEARCH_METHOD), msg)
-#define SEARCH_DBG(fmt, ...) SEARCH_DBGF(("%s:%u: " fmt "\n", __func__, __LINE__, __VA_ARGS__))
-#define SEARCH_DBGERR(rc) SEARCH_DBGF(("%s:%u: %R\n", __func__, __LINE__, rc))
-#define SEARCH_DBGERRP(fmt, rc, ...) SEARCH_DBGF(("%s:%u: %R " fmt "\n", __func__, __LINE__, rc, __VA_ARGS__))
-#else
-#define SEARCH_DBG(fmt, ...) ((void)0)
-#define SEARCH_DBGERR(rc) ((void)0)
-#define SEARCH_DBGERRP(fmt, rc, ...) ((void)0)
-#define SEARCH_DBGF(msg) ((void)0)
-#endif
-
-#endif /* _h_search_debug_ */
diff --git a/libs/search/fgrep-aho.c b/libs/search/fgrep-aho.c
deleted file mode 100644
index 9490597..0000000
--- a/libs/search/fgrep-aho.c
+++ /dev/null
@@ -1,363 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <search/extern.h>
-#include <compiler.h>
-#include <os-native.h>
-#include "search-priv.h"
-#include <sysalloc.h>
-
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-struct FgrepAhoParams {
-    struct trie *trie;
-    int32_t charskips[256];
-    int32_t minlength;
-};
-
-/*
-  Need tries for large alphabets -- maybe based on hashtable
-  of (state, char) pairs.
-  Can build alphabet-indexed trie for small alphabets.
-
-  Given a set of strings we're looking for, we have minlength.
-  We start looking at curpos + minlength.
-*/
-
-static int32_t quiet = 1;
-
-typedef struct out_s {
-    const char *s;
-    int32_t whichpattern;
-    struct out_s *nxt;
-} out_s;
-
-void push_out(out_s **where, const char *out, int32_t whichpattern)
-{
-    out_s *newout = malloc(sizeof(out_s));
-    newout->s = out;
-    newout->whichpattern = whichpattern;
-    newout->nxt = *where;
-    *where = newout;
-}
-    
-static void free_out ( out_s* self )
-{
-    if ( self != NULL )
-    {
-        out_s* next = self -> nxt;
-        free ( self );
-        free_out ( next );
-    }
-}
-
-struct trie {
-    struct trie *next[256];  
-    struct trie *fail; /* New for aho-corasick */
-    out_s *outs;
-    char *debugs;
-    int32_t depth;
-    int32_t hasmatch; /* Has match below here in the trie. */
-};
-
-static
-void print_trie_node(struct trie *self, char *car)
-{
-    out_s *outs;
-    if (!quiet) {
-        printf("%s: %s: outputs ", car, self->debugs);
-        outs = self->outs;
-        while (outs != NULL) {
-            printf("%s ", outs->s);
-            outs = outs->nxt;
-        }
-    }
-}
-
-static
-void free_trie(struct trie *self)
-{
-    int i;
-    for (i=0; i<256; i++) {
-        if (self->next[i] != NULL) {
-            free_trie(self->next[i]);
-            self->next[i] = NULL;
-        }
-    }
-    free_out ( self -> outs );
-    free ( self -> debugs );
-    free ( self );
-}
-
-static
-void print_trie(struct trie *self, char *car) 
-{
-    int32_t i;
-    char buf[2];
-    if (!quiet) {
-        for (i=0; i<self->depth; i++) 
-            printf(" ");
-        print_trie_node(self, car);
-        for (i=0; i<256; i++) {
-            if (self->next[i] != NULL) {
-                buf[0] = i;
-                buf[1] = '\0';
-                print_trie(self->next[i], buf);
-            }
-        }
-    }
-}
-
-static
-void trie_enter(struct trie *self, int32_t whichpattern, const char *s, int32_t minlen)
-{
-    struct trie *cur = self;
-    struct trie *newone = NULL;
-    int32_t len;
-    int32_t i;
-    len = strlen(s);
-    for (i=0; i<len; i++) {
-        unsigned char c = (unsigned char)s[i];
-        if (NULL != cur->next[c]) {
-            cur->hasmatch = 1;
-            cur = cur->next[c];
-        } else {
-            newone = (struct trie *)malloc(sizeof(struct trie));
-            newone->fail = NULL;
-            newone->outs = NULL;
-            newone->debugs = create_substring(s, i+1);
-            newone->depth = i+1;
-            newone->hasmatch = 1;
-            memset( newone->next, 0, sizeof( newone->next ) );
-            cur->next[c] = newone;
-            cur = newone;
-        }
-    }
-    push_out(&cur->outs, s, whichpattern);
-}
-
-static
-void trie_calc_failure_links(struct trie *self)
-{
-    struct queue_s {
-        struct trie *trie;
-        struct queue_s *nxt;
-    };
-    struct queue_s *queue = NULL;
-    struct queue_s *queueend = NULL;
-    struct queue_s *newq, *tmpqueue;
-    struct trie *r, *u, *v;
-    struct trie *trie;
-    int32_t i;
-    out_s *outs;
-
-    for (i = 0; i<256; i++) {
-        if ((trie = self->next[i]) != NULL) {
-            trie->fail = self;
-            newq = malloc(sizeof(struct queue_s));
-            newq->nxt = NULL;
-            newq->trie = trie;
-            if (queueend != NULL) {
-                queueend->nxt = newq;
-                queueend = newq;
-            } else {
-                queue = queueend = newq;
-            }
-        }
-    }
-    while (queue != NULL) {
-        r = queue->trie;
-        tmpqueue = queue;
-        queue = queue->nxt;
-        free(tmpqueue);
-        if (queueend == tmpqueue) {
-            queueend = NULL;
-        }
-
-        if (r == NULL) {
-            printf("It happened.\n");
-            continue;
-        }
-        
-        for (i = 0; i<256; i++) {
-            if ((u = r->next[i]) != NULL) {            
-                newq = malloc(sizeof(struct queue_s));
-                newq->trie = u;
-                newq->nxt = NULL;
-                if (queueend != NULL) {
-                    queueend->nxt = newq;
-                    queueend = newq;
-                } else {
-                    queue = queueend = newq;
-                }
-                /* Not sure about this stuff here. */
-                v = r->fail;
-                while (v != NULL && v->next[i] == NULL) {
-                    v = v->fail;
-                }
-                if (v != NULL && v->next[i] != NULL) {
-                    u->fail = v->next[i];
-                } else {
-                    u->fail = self;
-                }
-                outs = u->fail->outs;
-                while (outs != NULL) {
-                    push_out(&trie->outs, outs->s, outs->whichpattern);
-                    outs = outs->nxt;
-                }
-            }
-        }
-    }
-}
-
-static 
-void buildtrie(struct trie **self, const char *strings[], int32_t numstrings)
-{
-    int32_t i;
-    int32_t minlen = 1000000;
-    int32_t len;
-
-    for (i=0; i<numstrings; i++) {
-        len = strlen(strings[i]);
-        if (len < minlen) {
-            minlen = len;
-        }
-    }
-    
-    *self = (struct trie *)malloc(sizeof(struct trie));
-    for (i=0; i<256; i++) {
-        (*self)->next[i] = NULL;
-    }
-    (*self)->fail = NULL;
-    (*self)->outs = NULL;
-    (*self)->debugs = NULL;
-    (*self)->depth = 0;
-    (*self)->hasmatch = 0;
-  
-    for (i=0; i<numstrings; i++) {
-        trie_enter(*self, i, strings[i], minlen);
-    }
-    trie_calc_failure_links(*self);
-}
-
-void FgrepAhoFree( FgrepAhoParams *self )
-{
-    free_trie(self->trie);
-    free(self);
-}
-
-void FgrepAhoMake ( FgrepAhoParams **self,
-        const char *strings[], uint32_t numstrings )
-{
-    int32_t i;
-    struct trie *trie;
-    int32_t len;
-    buildtrie(&trie, strings, numstrings);
-    if (!quiet) {
-        print_trie(trie, "");
-    }
-    *self = (FgrepAhoParams *)malloc(sizeof(FgrepAhoParams));
-    (*self)->trie = trie;
-    (*self)->minlength = 10000;
-    for (i=0; i<numstrings; i++) {
-        len = strlen(strings[i]);
-        if (len < (*self)->minlength) {
-            (*self)->minlength = len;
-        }
-    }
-}
-
-
-/* 
-Returns nonzero when found something.
-*/  
-uint32_t FgrepAhoFindFirst ( FgrepAhoParams *self,
-        const char *buf, size_t len, FgrepMatch *match )
-{
-    unsigned char *ubuf = (unsigned char *)buf;
-    struct trie *trie;
-    struct trie *newtrie;
-    
-    unsigned char nxt;
-    int32_t mend = 0;
-    
-    trie = self->trie;
-    while (mend < len) {
-        nxt = ubuf[mend++];
-        newtrie = trie->next[nxt];
-        if (newtrie == NULL) {
-            newtrie = trie->fail;
-            mend--;
-        }
-        if (newtrie == NULL) {
-            trie = self->trie;
-            mend++;
-        } else if (newtrie->outs != NULL) {
-            match->position = mend - newtrie->depth;
-            match->length = newtrie->depth;
-            match->whichpattern = newtrie->outs->whichpattern;
-            return 1;
-        } else {
-            trie = newtrie;
-        }
-    }
-    return 0;
-}
-
-int32_t FgrepAhoFindAll ( FgrepAhoParams *self,
-    char *buf, int32_t len, int32_t *whichpattern )
-{
-    unsigned char *ubuf = (unsigned char *)buf;
-    struct trie *trie;
-    struct trie *newtrie;
-
-    unsigned char nxt;
-    int32_t mend = 0;
-    
-    trie = self->trie;
-    while (mend < len) {
-        nxt = ubuf[mend++];
-        newtrie = trie->next[nxt];
-        if (newtrie == NULL) {
-            newtrie = trie->fail;
-            mend--;
-        }
-        if (newtrie == NULL) {
-            trie = self->trie;
-            mend++;
-        } else if (newtrie->outs != NULL) {
-            *whichpattern = newtrie->outs->whichpattern;
-            return mend - newtrie->depth;
-        } else {
-            trie = newtrie;
-        }
-    }
-    return -1;
-}
diff --git a/libs/search/fgrep-boyermoore.c b/libs/search/fgrep-boyermoore.c
deleted file mode 100644
index 0d0fa2a..0000000
--- a/libs/search/fgrep-boyermoore.c
+++ /dev/null
@@ -1,462 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <search/extern.h>
-#include <compiler.h>
-#include <os-native.h>
-#include "search-priv.h"
-#include <sysalloc.h>
-
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-/*
-  Need tries for large alphabets -- maybe based on hashtable
-  of (state, char) pairs.
-  Can build alphabet-indexed trie for small alphabets.
-
-  Given a set of strings we're looking for, we have minlength.
-  We start looking at curpos + minlength.
-*/
-
-static
-char *reverse_string(const char *s) 
-{
-    int32_t len = strlen(s);
-    char *ret = malloc(len+1);
-    char *rp = ret;
-    const char *src = s+len;
-    while (--src >= s) {
-        *rp++ = *src;
-    }
-    *rp = '\0';
-    return ret;
-}
-
-
-struct trie {
-    struct trie *next[256];
-    char *s;
-#ifdef DEBUG
-    char *debugs;
-#endif
-    int32_t whichpattern;
-    int32_t depth;
-    int32_t hasmatch; /* Has match below here in the trie. */
-    /*
-      Used to be called "contained".  Basically we have a pattern that
-      has been matched in the text, so we either need to contain this,
-      or use a suffix of this as a prefix of our pattern.
-
-      Any prospective pattern must either have its prefix here,
-      or contain what we've seen.
-      Note: this will be less than the skip below.
-    */
-    int32_t minskip_matched; 
-
-    /* 
-       The pattern contained unmatched chars.  This used to be called prefix.
-       Basically we have some unmatched characters, so it doesn't help to 
-       contain this pattern, we need to start our string using some suffix
-       of this pattern.  Note: the whole pattern could start a match.
-
-       Any prospective pattern must have its prefix match a suffix of this.
-    */
-    int32_t minskip_unmatched; 
-};
-
-#ifdef DEBUG
-
-static
-void print_trie_node(struct trie *self, char *car)
-{
-    printf("%s: %s: %s hasmatch %d matched %d unmatched %d\n",
-           car, self->debugs, self->s, self->hasmatch, self->minskip_matched, self->minskip_unmatched);
-}
-
-static
-void print_trie(struct trie *self, char *car) 
-{
-    int32_t i;
-    char buf[2];
-    for (i=0; i<self->depth; i++) 
-        printf(" ");
-    print_trie_node(self, car);
-    for (i=0; i<256; i++) {
-        if (self->next[i] != NULL) {
-            buf[0] = i;
-            buf[1] = '\0';
-            print_trie(self->next[i], buf);
-        }
-    }
-}
-
-#endif /* DEBUG */
-
-
-static
-void free_trie(struct trie *self)
-{
-    int i;
-    for (i=0; i<256; i++) {
-        if (self->next[i] != NULL) {
-            free_trie(self->next[i]);
-            self->next[i] = NULL;
-        }
-    }
-    free(self);
-}
-
-
-static
-void trie_enter(struct trie *self, int32_t whichpattern, char *s, int32_t minlen)
-{
-    struct trie *cur = self;
-    struct trie *newone = NULL;
-    int32_t len;
-    int32_t i;
-    len = strlen(s);
-    for (i=0; i<len; i++) {
-        unsigned char c = (unsigned char)s[i];
-        if (NULL != cur->next[c]) {
-            cur->hasmatch = 1;
-            cur = cur->next[c];
-        } else {
-            newone = (struct trie *)malloc(sizeof(struct trie));
-            newone->s = NULL;
-#ifdef DEBUG
-            newone->debugs = create_substring(s, i+1);
-#endif
-            newone->depth = i+1;
-            newone->hasmatch = 1;
-            newone->minskip_matched = minlen;
-            newone->minskip_unmatched = minlen;
-            memset( newone->next, 0, sizeof( newone->next ) );
-            cur->next[c] = newone;
-            cur = newone;
-        }
-    }
-    cur->whichpattern = whichpattern;
-    cur->s = s;
-}
-
-static
-void trie_enter_suffixes(struct trie *self, char *s, int32_t minlen)
-{
-    struct trie *cur;
-    struct trie *newone;
-    int32_t suf;
-    int32_t i;
-    int32_t len;
-    len = strlen(s);
-    for (suf = 1; suf<len; suf++) {
-        cur = self;
-        for (i=0; suf+i<len; i++) {
-            unsigned char c = s[suf+i];
-            if (NULL != cur->next[c]) {
-                cur = cur->next[c];
-#ifdef NOPE
-                if (!cur->hasmatch)
-                    break;
-#endif
-            } else {
-                newone = (struct trie *)malloc(sizeof(struct trie));
-                newone->s = NULL;
-#ifdef DEBUG
-                newone->debugs = create_substring(s+suf, i+1);
-#endif
-                newone->depth = i+1;
-                newone->hasmatch = 0;
-                newone->minskip_matched = suf;
-                newone->minskip_unmatched = minlen;
-                memset( newone->next, 0, sizeof( newone->next ) );
-                cur->next[c] = newone;
-                cur = newone;
-            }
-        }
-    }
-}
-
-
-/* This recurses down the trie and sets the prefix_skip
-   based upon what's computer in trie_set_minskip for the prefix skip.
-*/
-static
-void trie_recurse_prefix_minskip(struct trie *trie, int32_t skip) 
-{
-    int32_t i;
-    if (skip < trie->minskip_unmatched) {
-#ifdef DEBUG
-        if (trie->debugs == NULL) {
-            fprintf(stderr, "Setting minskip prefix unmatched of (something) to %d\n", skip);
-        } else {
-            fprintf(stderr, "Setting minskip prefix unmatched of %s to %d\n", trie->debugs, skip);
-        }
-#endif
-        trie->minskip_unmatched = skip;
-    }
-    if (skip < trie->minskip_matched) {
-#ifdef DEBUG
-        if (trie->debugs == NULL) {
-            fprintf(stderr, "Setting minskip prefix matched of (something) to %d\n", skip);
-        } else {
-            fprintf(stderr, "Setting minskip prefix matched of %s to %d\n", trie->debugs, skip);
-        }
-#endif
-        trie->minskip_matched = skip;
-    }
-    for (i=0; i<256; i++) {
-        if (trie->next[i] != NULL) {
-            trie_recurse_prefix_minskip(trie->next[i], skip);
-        }
-    }
-}
-
-static
-void trie_set_minskip(struct trie *trie, const char *s, const char *rs)
-{
-    unsigned char *urs = (unsigned char *)rs;
-    unsigned char *us = (unsigned char *)s;
-    struct trie *cur;
-    int32_t len;
-    int32_t i;
-    int32_t skip;
-    char buf[1024];
-    int32_t prefix;
-    len = strlen(rs);
-    for (skip=1; skip<len; skip++) {
-        cur = trie->next[urs[skip]];
-        for (i=1; i<len-skip && cur != NULL; i++) {
-            if (skip < cur->minskip_matched) {
-                strncpy(buf, rs+skip, i);
-                buf[i] = '\0';
-#ifdef DEBUG
-                fprintf(stderr, "Setting minskip contained of %s to %d\n", buf, skip);
-#endif                    
-                cur->minskip_matched = skip;
-            }
-            cur = cur->next[urs[skip+i]];
-        }
-    }
-    /* Now we need to set up minskip_prefix --
-       We need to walk down the tree from any prefix of our word,
-       and set the minskip_prefix based upon (wordlen-prefix).
-       Note: non-empty prefixes, so start at 1.
-    */
-    for (prefix = 1; prefix<len; prefix++) {
-        skip = len - prefix;
-        cur = trie;
-        for (i=prefix-1; i>=0 && cur != NULL; i--) {
-            cur = cur->next[us[i]];
-        }
-        if (cur != NULL) {
-#ifdef DEBUG
-            fprintf(stderr, "Setting minskip to at most %d in:\n", skip);
-            print_trie_node(cur, s);
-#endif            
-            trie_recurse_prefix_minskip(cur, skip);
-        }
-    }
-}
-
-static    
-void buildreversetrie(struct trie **self, const char *strings[], int32_t numstrings)
-{
-    int32_t i;
-    int32_t minlen = 1000000;
-    int32_t len;
-    char *reversestrings[10000];
-
-    for (i=0; i<numstrings; i++) {
-        len = strlen(strings[i]);
-        if (len < minlen) {
-            minlen = len;
-        }
-    }
-
-    *self = (struct trie *)malloc(sizeof(struct trie));
-    for (i=0; i<256; i++) {
-        (*self)->next[i] = NULL;
-    }
-    (*self)->s = NULL;
-  
-    for (i=0; i<numstrings; i++) {
-        reversestrings[i] = reverse_string(strings[i]);
-    }
-    for (i=0; i<numstrings; i++) {
-        trie_enter(*self, i, reversestrings[i], minlen);
-    }
-    for (i=0; i<numstrings; i++) {
-        trie_enter_suffixes(*self, reversestrings[i], minlen);
-    }
-    for (i=0; i<numstrings; i++) {
-        trie_set_minskip(*self, strings[i], reversestrings[i]);
-    }
-    (*self)->minskip_matched = 1;
-    (*self)->minskip_unmatched = minlen;
-    
-    for (i=0; i<numstrings; i++) {
-        free ( reversestrings [ i ] );
-    }
-}
-
-
-
-struct FgrepBoyerParams {
-    struct trie *trie;
-    int32_t charskips[256];
-    int32_t minlength;
-};
-
-
-void FgrepBoyerSearchFree( FgrepBoyerParams *self )
-{
-    free_trie(self->trie);
-    free(self);
-}
-
-
-void FgrepBoyerSearchMake ( FgrepBoyerParams **self,
-        const char *strings[], uint32_t numstrings )
-{
-    int32_t i;
-    struct trie *trie;
-    int32_t len;
-    buildreversetrie(&trie, strings, numstrings);
-#ifdef DEBUG
-    print_trie(trie, "");
-#endif
-    *self = (FgrepBoyerParams *)malloc(sizeof(FgrepBoyerParams));
-    (*self)->trie = trie;
-    (*self)->minlength = 10000;
-    for (i=0; i<numstrings; i++) {
-        len = strlen(strings[i]);
-        if (len < (*self)->minlength) {
-            (*self)->minlength = len;
-        }
-    }
-}
-
-/*
-  Currently implementing for bytes.
-  Returns non-negative if found, -1 if not.
-*/
-uint32_t FgrepBoyerFindFirst ( FgrepBoyerParams *self,
-        const char *buf, size_t len, FgrepMatch *match )
-{
-    unsigned char *ubuf = (unsigned char *)buf;
-    struct trie *trie;
-    struct trie *newtrie;
-    unsigned char *p = ubuf;
-    unsigned char *startp;
-    unsigned char *endp = ubuf+len;
-    int32_t skips = 0;
-
-    /* fprintf(stderr, "Searching %10s... for %d chars\n", buf, len); */
-    p = ubuf + self->minlength;
-    while (1) {
-        if (p >= endp)
-            break;
-        startp = p;
-        trie = self->trie;
-    CONT:
-        if (NULL == (newtrie = trie->next[*--p])) {
-            p = startp + trie->minskip_unmatched;
-            skips += trie->minskip_unmatched;
-            continue;
-        }
-        if (!newtrie->hasmatch) {
-            while (newtrie) {
-                trie = newtrie;
-                newtrie = newtrie->next[*--p];
-            }
-            p = startp + trie->minskip_unmatched;
-            skips += trie->minskip_unmatched;
-            continue;
-        }
-        if (newtrie->s != NULL) {
-            match->position = p - ubuf;
-            match->length = newtrie->depth;
-            match->whichpattern = newtrie->whichpattern;
-            return 1;
-        }
-        trie = newtrie;
-        goto CONT;
-    }
-    return 0;
-}
-
-void FgrepBoyerFindAll ( FgrepBoyerParams *self,
-        char *buf, int32_t len, FgrepMatchCallback cb, void *cbinfo )
-{
-    unsigned char *ubuf = (unsigned char *)buf;
-    struct trie *trie;
-    struct trie *newtrie;
-    unsigned char *p = ubuf;
-    unsigned char *startp;
-    unsigned char *endp = ubuf+len;
-    int32_t skips = 0;
-    FgrepContinueFlag cont;
-    FgrepMatch match;
-
-    /* fprintf(stderr, "Searching %10s... for %d chars\n", buf, len); */
-    p = ubuf + self->minlength;
-    while (1) {
-        if (p >= endp)
-            break;
-        startp = p;
-        trie = self->trie;
-    CONT:
-        if (NULL == (newtrie = trie->next[*--p])) {
-            p = startp + trie->minskip_unmatched;
-            skips += trie->minskip_unmatched;
-            continue;
-        }
-        if (!newtrie->hasmatch) {
-            while (newtrie) {
-                trie = newtrie;
-                newtrie = newtrie->next[*--p];
-            }
-            p = startp + trie->minskip_unmatched;
-            skips += trie->minskip_unmatched;
-            continue;
-        }
-        if (newtrie->s != NULL) {
-            cont = FGREP_CONTINUE;
-            match.position = p - ubuf;
-            match.length = newtrie->depth;
-            match.whichpattern = newtrie->whichpattern;
-            (*cb)(cbinfo, &match, &cont);
-            if (cont != FGREP_CONTINUE)
-                return;
-        }
-        trie = newtrie;
-        goto CONT;
-    }
-}
diff --git a/libs/search/fgrep-dumb.c b/libs/search/fgrep-dumb.c
deleted file mode 100644
index ef546eb..0000000
--- a/libs/search/fgrep-dumb.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <search/extern.h>
-#include <compiler.h>
-#include <os-native.h>
-#include "search-priv.h"
-#include <sysalloc.h>
-
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-/*
-  Need tries for large alphabets -- maybe based on hashtable
-  of (state, char) pairs.
-  Can build alphabet-indexed trie for small alphabets.
-
-  Given a set of strings we're looking for, we have minlength.
-  We start looking at curpos + minlength.
-*/
-
-struct trie {
-    struct trie *next[256];
-    const char *s;
-#ifdef DEBUG
-    char *debugs;
-#endif
-    int32_t whichpattern;
-    int32_t depth;
-    int32_t hasmatch; /* Has match below here in the trie. */
-};
-
-struct FgrepDumbParams {
-    struct trie *trie;
-};
-
-
-#ifdef DEBUG
-
-static
-void print_trie_node(struct trie *self, char *car)
-{
-    printf("%s: %s: %s hasmatch %d\n",
-           car, self->debugs, self->s, 0);
-}
-
-static
-void print_trie(struct trie *self, char *car) 
-{
-    int32_t i;
-    char buf[2];
-    for (i=0; i<self->depth; i++) 
-        printf(" ");
-    print_trie_node(self, car);
-    for (i=0; i<256; i++) {
-        if (self->next[i] != NULL) {
-            buf[0] = i;
-            buf[1] = '\0';
-            print_trie(self->next[i], buf);
-        }
-    }
-}
-
-#endif /* DEBUG */
-
-static
-void free_trie(struct trie *self)
-{
-    int i;
-    for (i=0; i<256; i++) {
-        if (self->next[i] != NULL) {
-            free_trie(self->next[i]);
-            self->next[i] = NULL;
-        }
-    }
-    free(self);
-}
-
-static
-void trie_enter(struct trie *self, const char *s, int32_t minlen)
-{
-    struct trie *cur = self;
-    struct trie *newone = NULL;
-    int32_t len;
-    int32_t i;
-    len = strlen(s);
-    for (i=0; i<len; i++) {
-        unsigned char c = s[i];
-        if (NULL != cur->next[c]) {
-            cur->hasmatch = 1;
-            cur = cur->next[c];
-        } else {
-            newone = (struct trie *)malloc(sizeof(struct trie));
-            newone->s = NULL;
-#ifdef DEBUG
-            newone->debugs = create_substring(s, i+1);
-#endif
-            newone->depth = i+1;
-            newone->hasmatch = 1;
-            memset( newone->next, 0, sizeof( newone->next ) );
-            cur->next[c] = newone;
-            cur = newone;
-        }
-    }
-    cur->s = s;
-}
-
-
-static
-void buildtrie(struct trie **self, const char *strings[], int32_t numstrings)
-{
-    int32_t i;
-    int32_t minlen = 1000000;
-    int32_t len;
-
-    for (i=0; i<numstrings; i++) {
-        len = strlen(strings[i]);
-        if (len < minlen) {
-            minlen = len;
-        }
-    }
-
-    *self = (struct trie *)malloc(sizeof(struct trie));
-    for (i=0; i<256; i++) {
-        (*self)->next[i] = NULL;
-    }
-    (*self)->s = NULL;
-  
-    for (i=0; i<numstrings; i++) {
-        trie_enter(*self, strings[i], minlen);
-    }
-}
-
-void FgrepDumbSearchFree( FgrepDumbParams *self )
-{
-    free_trie(self->trie);
-    free(self);
-}
-
-void FgrepDumbSearchMake( FgrepDumbParams **self,
-        const char *strings[], uint32_t numstrings )
-{
-    /* int32_t i; */
-    struct trie *trie;
-    /* int32_t len; */
-    buildtrie(&trie, strings, numstrings);
-    *self = (FgrepDumbParams *)malloc(sizeof(FgrepDumbParams));
-    (*self)->trie = trie;
-    /* for (i=0; i<numstrings; i++) {
-        len = strlen(strings[i]);
-    } */
-}
-
-uint32_t FgrepDumbFindFirst( FgrepDumbParams *self,
-        const char *buf, size_t len, FgrepMatch *match )
-{
-    struct trie *trie;
-    struct trie *newtrie;
-    unsigned char *p = (unsigned char *)buf;
-    unsigned char *startp;
-    unsigned char *endp = (unsigned char *)buf+len;
-
-    for (startp = (unsigned char *)buf; startp < endp; startp++) {
-        p = startp;
-        trie = self->trie;
-        while (p < endp) {
-            newtrie = trie->next[*p++];
-            if (newtrie == NULL) {
-                break;
-            }
-            trie = newtrie;
-            if (trie->s != NULL) {
-                match->position = startp-(unsigned char *)buf;
-                match->length = trie->depth;
-                match->whichpattern = trie->whichpattern;
-                return 1;
-            }
-        }
-    }
-    return 0;
-}
-
-void FgrepDumbFindAll ( FgrepDumbParams *self,
-        char *buf, int32_t len, FgrepMatchCallback cb, void *cbinfo )
-{
-    unsigned char *ubuf = (unsigned char *)buf;
-    struct trie *trie;
-    struct trie *newtrie;
-    unsigned char *p = ubuf;
-    unsigned char *startp;
-    unsigned char *endp = ubuf+len;
-    FgrepContinueFlag cont;
-    FgrepMatch match;
-
-    for (startp = ubuf; startp < endp; startp++) {
-        p = startp;
-        trie = self->trie;
-        while (p < endp) {
-            newtrie = trie->next[*p++];
-            if (newtrie == NULL) {
-                break;
-            }
-            trie = newtrie;
-            if (trie->s != NULL) {
-                cont = FGREP_CONTINUE;
-                match.position = startp-ubuf;
-                match.length = trie->depth;
-                match.whichpattern = trie->whichpattern;
-                (*cb)(cbinfo, &match, &cont);
-                if (cont != FGREP_CONTINUE)
-                    return;
-            }
-        }
-    }
-}
-
-
-/* Try the longest match first. */
-LIB_EXPORT uint32_t CC has_left_exact_match( char *pattern, char *buf, size_t buflen, 
-                              int32_t *length )
-{
-    int32_t plen = strlen(pattern);
-    int32_t i, j;
-
-    /* Added bounds checking -- untested */
-    int32_t bound = plen;
-    if (buflen < bound)
-        bound = buflen;
-    
-    for (i=bound; i>=1; i--) {
-        for (j=0; j<i; j++) {
-            if (pattern[plen-i+j] != buf[j] &&
-                buf[j] != 'N')
-                goto CONT;
-        }
-        /* Found a match */
-        *length = i;
-        return 1;
-    CONT: {}
-    }
-    return 0;
-}
-
-LIB_EXPORT uint32_t CC has_right_exact_match( char *pattern, char *buf, size_t buflen, 
-                               int32_t *bestpos )
-{
-    int32_t plen = strlen(pattern);
-    int32_t bound = plen;
-    int32_t i, j;
-
-    if (buflen <= 0)
-        return 0;
-
-    if (buflen < bound) 
-        bound = buflen;
-
-    /* i is here the length of the prefix */
-    for (i=bound; i>=1; i--) {
-        for (j=0; j<i; j++) {
-            if (pattern[j] != buf[buflen-i+j] &&
-                buf[buflen-i+j] != 'N')
-                goto CONT;
-        }
-        /* Found a match */
-        *bestpos = buflen-i;
-        return 1;
-    CONT: {}
-    }
-    return 0;
-}
-
-
-/* Try the longest match first. */
-/* Used to assume that the text to be matched was at least as long as 
-the pattern.  No more. 
-*/
-LIB_EXPORT uint32_t CC has_inside_exact_match( char *pattern, char *buf, size_t buflen, 
-                                int32_t *skip )
-{
-    int32_t plen = strlen(pattern);
-    int32_t i, j;
-
-    if (buflen <= 0)
-        return 0;
-
-    /* i is here the start in the pattern */
-    for (i=1; i<=plen; i++) {
-        for (j=0; j<buflen; j++) {
-            if (pattern[i+j] != buf[j] &&
-                buf[j] != 'N')
-                goto CONT;
-        }
-        /* Found a match */
-        *skip = i;
-        return 1;
-    CONT: {}
-    }
-    return 0;
-}
-
diff --git a/libs/search/nucstrstr.c b/libs/search/nucstrstr.c
deleted file mode 100644
index 07af9f1..0000000
--- a/libs/search/nucstrstr.c
+++ /dev/null
@@ -1,4621 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <search/extern.h>
-#include <search/nucstrstr.h>
-#include <arch-impl.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <errno.h>
-#include <assert.h>
-#include <stdio.h>
-#include <byteswap.h>
-
-#define TRACE_OPERATIONS 0
-#define TRACE_PARSE 1
-#define TRACE_HEADER 1
-#define TRACE_RESULT 1
-#define TRACE_PATMASK 1
-
-#if __INTEL_COMPILER || defined __SSE2__
-
-#include <emmintrin.h>
-#define NEVER_MATCH 0
-#define RETURN_LOCATION 1
-#define USE_MEMALIGN 0
-
-#endif
-
-#if USE_MEMALIGN
-#include <malloc.h>
-#endif
-
-#define RELOAD_BUFFER 1
-#define NA2_LIMIT 61
-#define NA4_LIMIT 29
-typedef __m128i nucreg_t;
-typedef union
-{
-    uint8_t b [ 16 ];
-    uint16_t w [ 8 ];
-    uint32_t i [ 4 ];
-    uint64_t l [ 2 ];
-    uint128_t s;
-} nucpat_t;
-
-
-
-static int8_t fasta_2na_map [ 128 ];
-static int8_t fasta_4na_map [ 128 ];
-static uint16_t expand_2na [ 256 ] =
-   /* AAAA    AAAC    AAAG    AAAT    AACA    AACC    AACG    AACT */
-{   0x1111, 0x1112, 0x1114, 0x1118, 0x1121, 0x1122, 0x1124, 0x1128,
-   /* AAGA    AAGC    AAGG    AAGT    AATA    AATC    AATG    AATT */
-    0x1141, 0x1142, 0x1144, 0x1148, 0x1181, 0x1182, 0x1184, 0x1188,
-   /* ACAA    ACAC    ACAG    ACAT    ACCA    ACCC    ACCG    ACCT */
-    0x1211, 0x1212, 0x1214, 0x1218, 0x1221, 0x1222, 0x1224, 0x1228,
-   /* ACGA    ACGC    ACGG    ACGT    ACTA    ACTC    ACTG    ACTT */
-    0x1241, 0x1242, 0x1244, 0x1248, 0x1281, 0x1282, 0x1284, 0x1288,
-   /* AGAA    AGAC    AGAG    AGAT    AGCA    AGCC    AGCG    AGCT */
-    0x1411, 0x1412, 0x1414, 0x1418, 0x1421, 0x1422, 0x1424, 0x1428,
-   /* AGGA    AGGC    AGGG    AGGT    AGTA    AGTC    AGTG    AGTT */
-    0x1441, 0x1442, 0x1444, 0x1448, 0x1481, 0x1482, 0x1484, 0x1488,
-   /* ATAA    ATAC    ATAG    ATAT    ATCA    ATCC    ATCG    ATCT */
-    0x1811, 0x1812, 0x1814, 0x1818, 0x1821, 0x1822, 0x1824, 0x1828,
-   /* ATGA    ATGC    ATGG    ATGT    ATTA    ATTC    ATTG    ATTT */
-    0x1841, 0x1842, 0x1844, 0x1848, 0x1881, 0x1882, 0x1884, 0x1888,
-   /* CAAA    CAAC    CAAG    CAAT    CACA    CACC    CACG    CACT */
-    0x2111, 0x2112, 0x2114, 0x2118, 0x2121, 0x2122, 0x2124, 0x2128,
-   /* CAGA    CAGC    CAGG    CAGT    CATA    CATC    CATG    CATT */
-    0x2141, 0x2142, 0x2144, 0x2148, 0x2181, 0x2182, 0x2184, 0x2188,
-   /* CCAA    CCAC    CCAG    CCAT    CCCA    CCCC    CCCG    CCCT */
-    0x2211, 0x2212, 0x2214, 0x2218, 0x2221, 0x2222, 0x2224, 0x2228,
-   /* CCGA    CCGC    CCGG    CCGT    CCTA    CCTC    CCTG    CCTT */
-    0x2241, 0x2242, 0x2244, 0x2248, 0x2281, 0x2282, 0x2284, 0x2288,
-   /* CGAA    CGAC    CGAG    CGAT    CGCA    CGCC    CGCG    CGCT */
-    0x2411, 0x2412, 0x2414, 0x2418, 0x2421, 0x2422, 0x2424, 0x2428,
-   /* CGGA    CGGC    CGGG    CGGT    CGTA    CGTC    CGTG    CGTT */
-    0x2441, 0x2442, 0x2444, 0x2448, 0x2481, 0x2482, 0x2484, 0x2488,
-   /* CTAA    CTAC    CTAG    CTAT    CTCA    CTCC    CTCG    CTCT */
-    0x2811, 0x2812, 0x2814, 0x2818, 0x2821, 0x2822, 0x2824, 0x2828,
-   /* CTGA    CTGC    CTGG    CTGT    CTTA    CTTC    CTTG    CTTT */
-    0x2841, 0x2842, 0x2844, 0x2848, 0x2881, 0x2882, 0x2884, 0x2888,
-   /* GAAA    GAAC    GAAG    GAAT    GACA    GACC    GACG    GACT */
-    0x4111, 0x4112, 0x4114, 0x4118, 0x4121, 0x4122, 0x4124, 0x4128,
-   /* GAGA    GAGC    GAGG    GAGT    GATA    GATC    GATG    GATT */
-    0x4141, 0x4142, 0x4144, 0x4148, 0x4181, 0x4182, 0x4184, 0x4188,
-   /* GCAA    GCAC    GCAG    GCAT    GCCA    GCCC    GCCG    GCCT */
-    0x4211, 0x4212, 0x4214, 0x4218, 0x4221, 0x4222, 0x4224, 0x4228,
-   /* GCGA    GCGC    GCGG    GCGT    GCTA    GCTC    GCTG    GCTT */
-    0x4241, 0x4242, 0x4244, 0x4248, 0x4281, 0x4282, 0x4284, 0x4288,
-   /* GGAA    GGAC    GGAG    GGAT    GGCA    GGCC    GGCG    GGCT */
-    0x4411, 0x4412, 0x4414, 0x4418, 0x4421, 0x4422, 0x4424, 0x4428,
-   /* GGGA    GGGC    GGGG    GGGT    GGTA    GGTC    GGTG    GGTT */
-    0x4441, 0x4442, 0x4444, 0x4448, 0x4481, 0x4482, 0x4484, 0x4488,
-   /* GTAA    GTAC    GTAG    GTAT    GTCA    GTCC    GTCG    GTCT */
-    0x4811, 0x4812, 0x4814, 0x4818, 0x4821, 0x4822, 0x4824, 0x4828,
-   /* GTGA    GTGC    GTGG    GTGT    GTTA    GTTC    GTTG    GTTT */
-    0x4841, 0x4842, 0x4844, 0x4848, 0x4881, 0x4882, 0x4884, 0x4888,
-   /* TAAA    TAAC    TAAG    TAAT    TACA    TACC    TACG    TACT */
-    0x8111, 0x8112, 0x8114, 0x8118, 0x8121, 0x8122, 0x8124, 0x8128,
-   /* TAGA    TAGC    TAGG    TAGT    TATA    TATC    TATG    TATT */
-    0x8141, 0x8142, 0x8144, 0x8148, 0x8181, 0x8182, 0x8184, 0x8188,
-   /* TCAA    TCAC    TCAG    TCAT    TCCA    TCCC    TCCG    TCCT */
-    0x8211, 0x8212, 0x8214, 0x8218, 0x8221, 0x8222, 0x8224, 0x8228,
-   /* TCGA    TCGC    TCGG    TCGT    TCTA    TCTC    TCTG    TCTT */
-    0x8241, 0x8242, 0x8244, 0x8248, 0x8281, 0x8282, 0x8284, 0x8288,
-   /* TGAA    TGAC    TGAG    TGAT    TGCA    TGCC    TGCG    TGCT */
-    0x8411, 0x8412, 0x8414, 0x8418, 0x8421, 0x8422, 0x8424, 0x8428,
-   /* TGGA    TGGC    TGGG    TGGT    TGTA    TGTC    TGTG    TGTT */
-    0x8441, 0x8442, 0x8444, 0x8448, 0x8481, 0x8482, 0x8484, 0x8488,
-   /* TTAA    TTAC    TTAG    TTAT    TTCA    TTCC    TTCG    TTCT */
-    0x8811, 0x8812, 0x8814, 0x8818, 0x8821, 0x8822, 0x8824, 0x8828,
-   /* TTGA    TTGC    TTGG    TTGT    TTTA    TTTC    TTTG    TTTT */
-    0x8841, 0x8842, 0x8844, 0x8848, 0x8881, 0x8882, 0x8884, 0x8888
-};
-
-
-/*--------------------------------------------------------------------------
- * debugging printf
- */
-#if TRACE_OPERATIONS
-
-#define COPY_NUCREG( to, from ) \
-    _mm_storeu_si128 ( ( __m128i* ) ( to ) . b, ( from ) )
-
-/* sprintf_2na
- *  print 2na sequence
- */
-static
-const char *sprintf_2na ( char *str, size_t ssize, nucreg_t nr )
-{
-    int b, i, j;
-    nucpat_t np;
-    const char *ncbi2na = "ACGT";
-
-    if ( ssize <= sizeof np * 4 )
-        return "** BUFFER TOO SMALL **";
-
-    COPY_NUCREG ( np, nr );
-
-    for ( i = j = 0; i < sizeof np . b; j += 4, ++ i )
-    {
-        b = np . b [ i ];
-        str [ j + 0 ] = ncbi2na [ ( b >> 6 ) & 3 ];
-        str [ j + 1 ] = ncbi2na [ ( b >> 4 ) & 3 ];
-        str [ j + 2 ] = ncbi2na [ ( b >> 2 ) & 3 ];
-        str [ j + 3 ] = ncbi2na [ ( b >> 0 ) & 3 ];
-    }
-
-    str [ sizeof np * 4 ] = 0;
-
-    return str;
-}
-
-/* sprintf_4na
- *  print 4na sequence
- */
-static
-const char *sprintf_4na ( char *str, size_t ssize, nucreg_t nr )
-{
-    int b, i, j;
-    nucpat_t np;
-    const char *ncbi4na = "-ACMGRSVTWYHKDBN";
-
-    if ( ssize <= sizeof np * 2 )
-        return "** BUFFER TOO SMALL **";
-
-    COPY_NUCREG ( np, nr );
-
-    for ( i = j = 0; i < sizeof np . b; j += 2, ++ i )
-    {
-        b = np . b [ i ];
-        str [ j + 0 ] = ncbi4na [ ( b >> 4 ) & 15 ];
-        str [ j + 1 ] = ncbi4na [ ( b >> 0 ) & 15 ];
-    }
-
-    str [ sizeof np * 2 ] = 0;
-
-    return str;
-}
-
-/* sprintf_m2na
- *  print 2na mask
- */
-static
-const char *sprintf_m2na ( char *str, size_t ssize, nucreg_t mask )
-{
-    int b, i, j;
-    nucpat_t mp;
-    const char *amask = " ??x";
-
-    if ( ssize <= sizeof mp * 4 )
-        return "** BUFFER TOO SMALL **";
-
-    COPY_NUCREG ( mp, mask );
-
-    for ( i = j = 0; i < mp . b; j += 4, ++ i )
-    {
-        b = mp . b [ i ];
-        str [ j + 0 ] = amask [ ( b >> 6 ) & 3 ];
-        str [ j + 1 ] = amask [ ( b >> 4 ) & 3 ];
-        str [ j + 2 ] = amask [ ( b >> 2 ) & 3 ];
-        str [ j + 3 ] = amask [ ( b >> 0 ) & 3 ];
-    }
-
-    str [ sizeof mp * 4 ] = 0;
-
-    return str;
-}
-
-/* sprintf_m4na
- *  print 4na mask
- */
-static
-const char *sprintf_m4na ( char *str, size_t ssize, nucreg_t mask )
-{
-    int b, i, j;
-    nucpat_t mp;
-    const char *amask = " ??????????????x";
-
-    if ( ssize <= sizeof mp * 2 )
-        return "** BUFFER TOO SMALL **";
-
-    COPY_NUCREG ( mp, mask );
-
-    for ( i = j = 0; i < sizeof mp . b; j += 2, ++ i )
-    {
-        b = mp . b [ i ];
-        str [ j + 0 ] = amask [ ( b >> 4 ) & 15 ];
-        str [ j + 1 ] = amask [ ( b >> 0 ) & 15 ];
-    }
-
-    str [ sizeof mp * 2 ] = 0;
-
-    return str;
-}
-
-/* sprintf_a2na
- *  print 2na alignment, where buffer has source,
- *  pattern has some set of valid pattern bases,
- *  and mask defines which parts are valid
- */
-static
-const char *sprintf_a2na ( char *str, size_t ssize,
-    nucreg_t buffer, nucreg_t pattern, nucreg_t mask )
-{
-    nucpat_t bp, pp, mp;
-    int s, b, m, i, j, k, l, s_ch, b_ch;
-    const char *ncbi2na = "    ????????ACGT";
-
-    if ( ssize <= sizeof bp * 4 )
-        return "** BUFFER TOO SMALL **";
-
-    COPY_NUCREG ( bp, buffer );
-    COPY_NUCREG ( pp, pattern );
-    COPY_NUCREG ( mp, mask );
-
-    for ( i = j = 0; i < sizeof bp . b; j += 4, ++ i )
-    {
-        s = bp . b [ i ];
-        b = pp . b [ i ];
-        m = ( int ) mp . b [ i ] << 2;
-
-        for ( k = 0, l = 6; k < 4; l -= 2, ++ k )
-        {
-            s_ch = ncbi2na [ 12 | ( ( s >> l ) & 3 ) ];
-            b_ch = ncbi2na [ ( ( m >> l ) & 12 ) | ( ( b >> l ) & 3 ) ];
-            str [ j + k ] = ( s_ch == b_ch ) ? ( char ) b_ch : ( char ) tolower ( b_ch );
-        }
-    }
-
-    str [ sizeof bp * 4 ] = 0;
-
-    return str;
-}
-
-/* sprintf_a4na
- *  print 4na alignment, where buffer has source,
- *  pattern has some set of valid pattern bases,
- *  and mask defines which parts are valid
- */
-static
-const char *sprintf_a4na ( char *str, size_t ssize,
-    nucreg_t buffer, nucreg_t pattern, nucreg_t mask )
-{
-    nucpat_t bp, pp, mp;
-    int s, b, m, i, j, k, l, s_ch, b_ch;
-    const char *ncbi4na =
-        "                ????????????????????????????????????????????????"
-        "????????????????????????????????????????????????????????????????"
-        "????????????????????????????????????????????????????????????????"
-        "????????????????????????????????????????????????""-ACMGRSVTWYHKDBN";
-    /* the odd ??""- is to prevent a ??- trigraph for ~ */
-
-    if ( ssize <= sizeof bp * 2 )
-        return "** BUFFER TOO SMALL **";
-
-    COPY_NUCREG ( bp, buffer );
-    COPY_NUCREG ( pp, pattern );
-    COPY_NUCREG ( mp, mask );
-
-    for ( i = j = 0; i < sizeof bp . b; j += 2, ++ i )
-    {
-        s = bp . b [ i ];
-        b = pp . b [ i ];
-        m = ( int ) mp . b [ i ] << 4;
-
-        for ( k = 0, l = 4; k < 2; l -= 4, ++ k )
-        {
-            s_ch = ncbi4na [ ( ( m >> l ) & 0xF0 ) | ( ( s >> l ) & 15 ) ];
-            b_ch = ncbi4na [ ( ( m >> l ) & 0xF0 ) | ( ( b >> l ) & 15 ) ];
-            str [ j + k ] =
-                ( ( fasta_4na_map [ s_ch ] & fasta_4na_map [ b_ch ] ) != 0 ) ?
-                ( char ) s_ch : ( char ) tolower ( b_ch );
-        }
-    }
-
-    str [ sizeof bp * 2 ] = 0;
-
-    return str;
-}
-
-/* sprintf_r2na
- *  print results of 2na comparison
- */
-static
-const char *sprintf_r2na ( char *str, size_t ssize, nucreg_t result, nucreg_t mask )
-{
-    nucpat_t rp;
-    int b, i, j;
-    const char *amask = " ??x";
-
-    if ( ssize <= sizeof rp * 4 )
-        return "** BUFFER TOO SMALL **";
-
-    COPY_NUCREG ( rp, result );
-
-    for ( i = j = 0; i < sizeof rp . b; j += 4, ++ i )
-    {
-        b = rp . b [ i ];
-        str [ j + 0 ] = amask [ ( b >> 6 ) & 3 ];
-        str [ j + 1 ] = amask [ ( b >> 4 ) & 3 ];
-        str [ j + 2 ] = amask [ ( b >> 2 ) & 3 ];
-        str [ j + 3 ] = amask [ ( b >> 0 ) & 3 ];
-    }
-
-    str [ sizeof rp * 4 ] = 0;
-
-    return str;
-}
-
-static
-const char *sprintf_r4na ( char *str, size_t ssize, nucreg_t result, nucreg_t mask )
-{
-    int b, i, j;
-    nucpat_t rp;
-    const char *amask = " ??????????????x";
-
-    if ( ssize <= sizeof rp * 2 )
-        return "** BUFFER TOO SMALL **";
-
-    COPY_NUCREG ( rp, result );
-
-    for ( i = j = 0; i < sizeof rp . b; j += 2, ++ i )
-    {
-        b = rp . b [ i ];
-        str [ j + 0 ] = amask [ ( b >> 4 ) & 15 ];
-        str [ j + 1 ] = amask [ ( b >> 0 ) & 15 ];
-    }
-
-    str [ sizeof rp * 2 ] = 0;
-
-    return str;
-}
-
-#endif
-
-#if TRACE_OPERATIONS && TRACE_PARSE
-static
-void PARSE_2NA_PATTERN ( const char *fasta, size_t size,
-    nucpat_t pattern, nucpat_t mask )
-{
-    char str [ 65 ];
-    nucreg_t nr = _mm_loadu_si128 ( ( const __m128i* ) pattern . b );
-    nucreg_t nm = _mm_loadu_si128 ( ( const __m128i* ) mask . b );
-
-    assert ( size < sizeof str );
-    memcpy ( str, fasta, size );
-    str [ size ] = 0;
-
-    printf ( "  %s - original FASTA\n", str );
-    printf ( "  %s - pattern\n", sprintf_2na ( str, sizeof str, nr ) );
-    printf ( "  %s - mask\n", sprintf_m2na ( str, sizeof str, nm ) );
-}
-
-static
-void PARSE_4NA_PATTERN ( const char *fasta, size_t size,
-    nucpat_t pattern, nucpat_t mask )
-{
-    char str [ 33 ];
-    nucreg_t nr = _mm_loadu_si128 ( ( const __m128i* ) pattern . b );
-    nucreg_t nm = _mm_loadu_si128 ( ( const __m128i* ) mask . b );
-
-    assert ( size < sizeof str );
-    memcpy ( str, fasta, size );
-    str [ size ] = 0;
-
-    printf ( "  %s - original FASTA\n", str );
-    printf ( "  %s - pattern\n", sprintf_4na ( str, sizeof str, nr ) );
-    printf ( "  %s - mask\n", sprintf_m4na ( str, sizeof str, nm ) );
-}
-
-static
-void PARSE_2NA_SHIFT ( unsigned int idx, nucpat_t pattern, nucpat_t mask )
-{
-    char str [ 65 ];
-    nucreg_t nr = _mm_loadu_si128 ( ( const __m128i* ) pattern . b );
-    nucreg_t nm = _mm_loadu_si128 ( ( const __m128i* ) mask . b );
-
-    printf ( "  %s - pattern [ %u ]\n", sprintf_2na ( str, sizeof str, nr ), idx );
-    printf ( "  %s - mask [ %u ]\n", sprintf_m2na ( str, sizeof str, nm ), idx );
-}
-
-static
-void PARSE_4NA_SHIFT ( unsigned int idx, nucpat_t pattern, nucpat_t mask )
-{
-    char str [ 33 ];
-    nucreg_t nr = _mm_loadu_si128 ( ( const __m128i* ) pattern . b );
-    nucreg_t nm = _mm_loadu_si128 ( ( const __m128i* ) mask . b );
-
-    printf ( "  %s - pattern [ %u ]\n", sprintf_4na ( str, sizeof str, nr ), idx );
-    printf ( "  %s - mask [ %u ]\n", sprintf_m4na ( str, sizeof str, nm ), idx );
-}
-#else
-
-#define PARSE_2NA_PATTERN( fasta, size, pattern, mask ) \
-    ( void ) 0
-
-#define PARSE_4NA_PATTERN( fasta, size, pattern, mask ) \
-    ( void ) 0
-
-#define PARSE_2NA_SHIFT( idx, pattern, mask ) \
-    ( void ) 0
-
-#define PARSE_4NA_SHIFT( idx, pattern, mask ) \
-    ( void ) 0
-
-#endif
-
-#if TRACE_OPERATIONS && TRACE_HEADER
-
-static
-void ALIGN_2NA_HEADER ( nucreg_t buffer, unsigned int pos, unsigned int len )
-{
-    unsigned int i, j;
-    char str [ 65 ];
-    unsigned int end = pos + 63;
-    str [ 64 ] = 0;
-
-    /* line separator */
-    putchar ( '\n' );
-
-    /* print a position with vertical numerals */
-    if ( end >= 1000 )
-    {
-        for ( i = pos, j = 0; i <= end; ++ j, ++ i )
-            str [ j ] = '0' + ( char) ( i / 1000 );
-        printf ( "  %s\n", str );
-    }
-    if ( end >= 100 )
-    {
-        for ( i = pos, j = 0; i <= end; ++ j, ++ i )
-            str [ j ] = '0' + ( char) ( ( i / 100 ) % 10 );
-        printf ( "  %s\n", str );
-    }
-    if ( end >= 10 )
-    {
-        for ( i = pos, j = 0; i <= end; ++ j, ++ i )
-            str [ j ] = '0' + ( char) ( ( i / 10 ) % 10 );
-        printf ( "  %s\n", str );
-    }
-
-    for ( i = pos, j = 0; i <= end; ++ j, ++ i )
-        str [ j ] = '0' + ( char) ( i % 10 );
-    printf ( "  %s\n", str );
-
-    /* now dump the buffer */
-    printf ( "  %s - buffer\n", sprintf_2na ( str, sizeof str, buffer ) );
-}
-
-static
-void ALIGN_4NA_HEADER ( nucreg_t buffer, unsigned int pos, unsigned int len )
-{
-    unsigned int i, j;
-    char str [ 33 ];
-    unsigned int end = pos + 31;
-    str [ 32 ] = 0;
-
-    /* line separator */
-    putchar ( '\n' );
-
-    /* print a position with vertical numerals */
-    if ( end >= 1000 )
-    {
-        for ( i = pos, j = 0; i <= end; ++ j, ++ i )
-            str [ j ] = '0' + ( char) ( i / 1000 );
-        printf ( "  %s\n", str );
-    }
-    if ( end >= 100 )
-    {
-        for ( i = pos, j = 0; i <= end; ++ j, ++ i )
-            str [ j ] = '0' + ( char) ( ( i / 100 ) % 10 );
-        printf ( "  %s\n", str );
-    }
-    if ( end >= 10 )
-    {
-        for ( i = pos, j = 0; i <= end; ++ j, ++ i )
-            str [ j ] = '0' + ( char) ( ( i / 10 ) % 10 );
-        printf ( "  %s\n", str );
-    }
-
-    for ( i = pos, j = 0; i <= end; ++ j, ++ i )
-        str [ j ] = '0' + ( char) ( i % 10 );
-    printf ( "  %s\n", str );
-
-    /* now dump the buffer */
-    printf ( "  %s - buffer\n", sprintf_4na ( str, sizeof str, buffer ) );
-}
-
-#else
-
-#define ALIGN_2NA_HEADER( buffer, pos, len ) \
-    ( void ) 0
-
-#define ALIGN_4NA_HEADER( buffer, pos, len ) \
-    ( void ) 0
-
-#endif
-
-#if TRACE_OPERATIONS && TRACE_RESULT
-
-static
-void ALIGN_2NA_RESULT ( nucreg_t buffer, nucreg_t pat, nucreg_t mask,
-    nucreg_t cmp, int bits )
-{
-    unsigned int i;
-    char str [ 65 ];
-
-    char bstr [ 17 ];
-    for ( i = 0; i < 16; bits >>= 1, ++ i )
-        bstr [ i ] = '0' + ( bits & 1 );
-    bstr [ 16 ] = 0;
-
-#if TRACE_PATMASK
-    printf ( "  %s - pattern\n", sprintf_2na ( str, sizeof str, pat ) );
-    printf ( "  %s - mask\n", sprintf_m2na ( str, sizeof str, mask ) );
-#endif
-
-    /* dump alignment and re-compare */
-    printf ( "  %s - alignment\n", sprintf_a2na ( str, sizeof str, buffer, pat, mask ) );
-    printf ( "  %s ( 0b%s )\n", sprintf_r2na ( str, sizeof str, cmp, mask ), bstr );
-}
-
-static
-void ALIGN_4NA_RESULT ( nucreg_t buffer, nucreg_t pat, nucreg_t mask,
-    nucreg_t cmp, int bits )
-{
-    unsigned int i;
-    char str [ 33 ];
-
-    char bstr [ 17 ];
-    for ( i = 0; i < 16; bits >>= 1, ++ i )
-        bstr [ i ] = '0' + ( bits & 1 );
-    bstr [ 16 ] = 0;
-
-#if TRACE_PATMASK
-    printf ( "  %s - pattern\n", sprintf_4na ( str, sizeof str, pat ) );
-    printf ( "  %s - mask\n", sprintf_m4na ( str, sizeof str, mask ) );
-#endif
-
-    /* dump alignment and re-compare */
-    printf ( "  %s - alignment\n", sprintf_a4na ( str, sizeof str, buffer, pat, mask ) );
-    printf ( "  %s ( 0b%s )\n", sprintf_r4na ( str, sizeof str, cmp, mask ), bstr );
-}
-
-#else
-
-#define ALIGN_2NA_RESULT( buffer, pat, mask, cmp, bits ) \
-    ( void ) 0
-#define ALIGN_4NA_RESULT( buffer, pat, mask, cmp, bits ) \
-    ( void ) 0
-#endif
-
-
-/*--------------------------------------------------------------------------
- * NucStrExpr
- *  an expression
- */
-typedef NucStrstr NucStrExpr;
-
-enum
-{
-    type_2na_64,
-    type_4na_64,
-    type_2na_8,
-    type_2na_16,
-    type_2na_32,
-    type_2na_128,
-    type_4na_16,
-    type_4na_32,
-    type_4na_128,
-    type_2na_pos,
-    type_4na_pos,
-    type_OP,
-    type_EXPR,
-
-    op_NOT,
-    op_HEAD,
-    op_TAIL,
-    op_AND,
-    op_OR
-};
-
-typedef struct NucStrFastaExpr NucStrFastaExpr;
-struct NucStrFastaExpr
-{
-    int32_t type;
-    uint32_t size;
-#if ! USE_MEMALIGN
-    union
-    {
-        /* actual allocation for freeing
-           since struct pointer will be
-           16 byte aligned by code */
-        void *outer;
-        uint64_t align;
-    } u;
-#endif
-    struct
-    {
-        nucpat_t pattern;
-        nucpat_t mask;
-    } query [ 4 ];
-};
-
-#if USE_MEMALIGN
-#define NucStrFastaExprAlloc( sz ) \
-    memalign ( 16, sz )
-#else
-static
-void *NucStrFastaExprAlloc ( size_t sz )
-{
-    void *outer = malloc ( sz + 16 );
-    if ( outer != NULL )
-    {
-        NucStrFastaExpr *e = ( void* )
-            ( ( ( size_t ) outer + 15 ) & ~ ( size_t ) 15 );
-        e -> u . outer = outer;
-        assert ( ( ( size_t ) & e -> query [ 0 ] . pattern & 15 ) == 0 );
-        assert ( ( ( size_t ) & e -> query [ 0 ] . mask & 15 ) == 0 );
-        return e;
-    }
-    return NULL;
-}
-#endif
-
-typedef struct NucStrOpExpr NucStrOpExpr;
-struct NucStrOpExpr
-{
-    int32_t type;
-    int32_t op;
-    NucStrExpr *left;
-    NucStrExpr *right;
-};
-
-typedef struct NucStrSubExpr NucStrSubExpr;
-struct NucStrSubExpr
-{
-    int32_t type;
-    int32_t op;
-    NucStrExpr *expr;
-};
-
-union  NucStrstr
-{
-    NucStrFastaExpr fasta;
-    NucStrOpExpr boolean;
-    NucStrSubExpr sub;
-};
-
-/* NucStrFastaExprMake
- *  initializes for comparison based upon type
- */
-static
-int NucStrFastaExprMake2 ( NucStrExpr **expr, int positional,
-    const char *fasta, size_t size )
-{
-    size_t i;
-    NucStrExpr *e;
-    nucpat_t pattern, mask;
-
-    /* still limiting bases */
-    if ( size > NA2_LIMIT )
-        return E2BIG;
-
-    e = NucStrFastaExprAlloc ( sizeof * e );
-    if ( e == NULL )
-        return errno;
-
-    * expr = e;
-    e -> fasta . size = ( uint32_t ) size;
-
-    /* translate FASTA to 2na */
-    for ( i = 0; i < size; ++ i )
-    {
-        uint8_t base = fasta_2na_map [ ( int ) fasta [ i ] ];
-        switch ( i & 3 )
-        {
-        case 0:
-            pattern . b [ i >> 2 ] = base << 6;
-            mask . b [ i >> 2 ] = 3 << 6;
-            break;
-        case 1:
-            pattern . b [ i >> 2 ] |= base << 4;
-            mask . b [ i >> 2 ] |= 3 << 4;
-            break;
-        case 2:
-            pattern . b [ i >> 2 ] |= base << 2;
-            mask . b [ i >> 2 ] |= 3 << 2;
-            break;
-        case 3:
-            pattern . b [ i >> 2 ] |= base;
-            mask . b [ i >> 2 ] |= 3;
-            break;
-        }
-    }
-
-    /* fill trailing with zeros */
-    for ( i = ( i + 3 ) >> 2; i < 16; ++ i )
-    {
-        pattern . b [ i ] = 0;
-        mask . b [ i ] = 0;
-    }
-
-    PARSE_2NA_PATTERN ( fasta, size, pattern, mask );
-
-    /* treat positional types specially */
-    if ( positional )
-    {
-        e -> fasta . type = type_2na_pos;
-    }
-
-    /* replicate for shorter queries */
-    else if ( size < 2 )
-    {
-        pattern . b [ 1 ] = pattern . b [ 0 ];
-        pattern . w [ 1 ] = pattern . w [ 0 ];
-        pattern . i [ 1 ] = pattern . i [ 0 ];
-        pattern . l [ 1 ] = pattern . l [ 0 ];
-            
-        mask . b [ 1 ] = mask . b [ 0 ];
-        mask . w [ 1 ] = mask . w [ 0 ];
-        mask . i [ 1 ] = mask . i [ 0 ];
-        mask . l [ 1 ] = mask . l [ 0 ];
-            
-        e -> fasta . type = type_2na_8;
-    }
-    else if ( size < 6 )
-    {
-        pattern . w [ 1 ] = pattern . w [ 0 ];
-        pattern . i [ 1 ] = pattern . i [ 0 ];
-        pattern . l [ 1 ] = pattern . l [ 0 ];
-            
-        mask . w [ 1 ] = mask . w [ 0 ];
-        mask . i [ 1 ] = mask . i [ 0 ];
-        mask . l [ 1 ] = mask . l [ 0 ];
-            
-        e -> fasta . type = type_2na_16;
-    }
-    else if ( size < 14 )
-    {
-        pattern . i [ 1 ] = pattern . i [ 0 ];
-        pattern . l [ 1 ] = pattern . l [ 0 ];
-            
-        mask . i [ 1 ] = mask . i [ 0 ];
-        mask . l [ 1 ] = mask . l [ 0 ];
-            
-        e -> fasta . type = type_2na_32;
-    }
-    else if ( size < 30 )
-    {
-        pattern . l [ 1 ] = pattern . l [ 0 ];
-        mask . l [ 1 ] = mask . l [ 0 ];
-            
-        e -> fasta . type = type_2na_64;
-    }
-    else
-    {
-        e -> fasta . type = type_2na_128;
-    }
-
-    e -> fasta . query [ 0 ] . pattern = pattern;
-    e -> fasta . query [ 0 ] . mask = mask;
-
-    /* byte swap the pattern and mask */
-    uint128_bswap ( & pattern . s );
-    uint128_bswap ( & mask . s );
-
-    /* now shifts should work as imagined */
-    uint128_shr ( & pattern . s, 2 );
-    uint128_shr ( & mask . s, 2 );
-        
-    /* restore the byte order for sse */
-    uint128_bswap_copy ( & e -> fasta . query [ 1 ] . pattern . s, & pattern . s );
-    uint128_bswap_copy ( & e -> fasta . query [ 1 ] . mask . s, & mask . s );
-
-    uint128_shr ( & pattern . s, 2 );
-    uint128_shr ( & mask . s, 2 );
-        
-    uint128_bswap_copy ( & e -> fasta . query [ 2 ] . pattern . s, & pattern . s );
-    uint128_bswap_copy ( & e -> fasta . query [ 2 ] . mask . s, & mask . s );
-
-    uint128_shr ( & pattern . s, 2 );
-    uint128_shr ( & mask . s, 2 );
-        
-    uint128_bswap_copy ( & e -> fasta . query [ 3 ] . pattern . s, & pattern . s );
-    uint128_bswap_copy ( & e -> fasta . query [ 3 ] . mask . s, & mask . s );
-        
-
-    PARSE_2NA_SHIFT ( 0, e -> fasta . query [ 0 ] . pattern,
-        e -> fasta . query [ 0 ] . mask );
-    PARSE_2NA_SHIFT ( 1, e -> fasta . query [ 1 ] . pattern,
-        e -> fasta . query [ 1 ] . mask );
-    PARSE_2NA_SHIFT ( 2, e -> fasta . query [ 2 ] . pattern,
-        e -> fasta . query [ 2 ] . mask );
-    PARSE_2NA_SHIFT ( 3, e -> fasta . query [ 3 ] . pattern,
-        e -> fasta . query [ 3 ] . mask );
-
-    return 0;
-}
-
-static
-int NucStrFastaExprMake4 ( NucStrExpr **expr, int positional,
-    const char *fasta, size_t size )
-{
-    size_t i;
-    NucStrExpr *e;
-    nucpat_t pattern, mask;
-
-    /* still limiting bases */
-    if ( size > NA4_LIMIT )
-        return E2BIG;
-
-    e = NucStrFastaExprAlloc ( sizeof * e );
-    if ( e == NULL )
-        return errno;
-
-    * expr = e;
-    e -> fasta . size = ( uint32_t ) size;
-
-    /* translate FASTA to 4na */
-    for ( i = 0; i < size; ++ i )
-    {
-        uint16_t base = fasta_4na_map [ ( int ) fasta [ i ] ];
-        switch ( i & 3 )
-        {
-        case 0:
-            pattern . w [ i >> 2 ] = base << 4;
-            mask . w [ i >> 2 ] = 15 << 4;
-            break;
-        case 1:
-            pattern . w [ i >> 2 ] |= base << 0;
-            mask . w [ i >> 2 ] |= 15 << 0;
-            break;
-        case 2:
-            pattern . w [ i >> 2 ] |= base << 12;
-            mask . w [ i >> 2 ] |= 15 << 12;
-            break;
-        case 3:
-            pattern . w [ i >> 2 ] |= base << 8;
-            mask . w [ i >> 2 ] |= 15 << 8;
-            break;
-        }
-    }
-
-    /* fill trailing with zeros */
-    for ( i = ( i + 3 ) >> 2; i < 8; ++ i )
-    {
-        pattern . w [ i ] = 0;
-        mask . w [ i ] = 0;
-    }
-
-    PARSE_4NA_PATTERN ( fasta, size, pattern, mask );
-
-    if ( positional )
-    {
-        e -> fasta . type = type_4na_pos;
-    }
-    else if ( size < 2 )
-    {
-        pattern . w [ 1 ] = pattern . w [ 0 ];
-        pattern . i [ 1 ] = pattern . i [ 0 ];
-        pattern . l [ 1 ] = pattern . l [ 0 ];
-            
-        mask . w [ 1 ] = mask . w [ 0 ];
-        mask . i [ 1 ] = mask . i [ 0 ];
-        mask . l [ 1 ] = mask . l [ 0 ];
-
-        e -> fasta . type = type_4na_16;
-    }
-    else if ( size < 6 )
-    {
-        pattern . i [ 1 ] = pattern . i [ 0 ];
-        pattern . l [ 1 ] = pattern . l [ 0 ];
-            
-        mask . i [ 1 ] = mask . i [ 0 ];
-        mask . l [ 1 ] = mask . l [ 0 ];
-
-        e -> fasta . type = type_4na_32;
-    }
-    else if ( size < 14 )
-    {
-        pattern . l [ 1 ] = pattern . l [ 0 ];
-        mask . l [ 1 ] = mask . l [ 0 ];
-
-        e -> fasta . type = type_4na_64;
-    }
-    else
-    {
-        e -> fasta . type = type_4na_128;
-    }
-
-    e -> fasta . query [ 0 ] . pattern = pattern;
-    e -> fasta . query [ 0 ] . mask = mask;
-
-    /* byte swap the pattern and mask */
-    uint128_bswap ( & pattern . s );
-    uint128_bswap ( & mask . s );
-
-    /* now shifts should work as imagined */
-    uint128_shr ( & pattern . s, 4 );
-    uint128_shr ( & mask . s, 4 );
-        
-    /* restore the byte order for sse */
-    uint128_bswap_copy ( & e -> fasta . query [ 1 ] . pattern . s, & pattern . s );
-    uint128_bswap_copy ( & e -> fasta . query [ 1 ] . mask . s, & mask . s );
-
-    uint128_shr ( & pattern . s, 4 );
-    uint128_shr ( & mask . s, 4 );
-        
-    uint128_bswap_copy ( & e -> fasta . query [ 2 ] . pattern . s, & pattern . s );
-    uint128_bswap_copy ( & e -> fasta . query [ 2 ] . mask . s, & mask . s );
-
-    uint128_shr ( & pattern . s, 4 );
-    uint128_shr ( & mask . s, 4 );
-        
-    uint128_bswap_copy ( & e -> fasta . query [ 3 ] . pattern . s, & pattern . s );
-    uint128_bswap_copy ( & e -> fasta . query [ 3 ] . mask . s, & mask . s );
-
-
-    PARSE_4NA_SHIFT ( 0, e -> fasta . query [ 0 ] . pattern,
-        e -> fasta . query [ 0 ] . mask );
-    PARSE_4NA_SHIFT ( 1, e -> fasta . query [ 1 ] . pattern,
-        e -> fasta . query [ 1 ] . mask );
-    PARSE_4NA_SHIFT ( 2, e -> fasta . query [ 2 ] . pattern,
-        e -> fasta . query [ 2 ] . mask );
-    PARSE_4NA_SHIFT ( 3, e -> fasta . query [ 3 ] . pattern,
-        e -> fasta . query [ 3 ] . mask );
-
-    return 0;
-}
-
-
-/* nss_sob
- */
-static
-const char *nss_sob ( const char *p, const char *end )
-{
-    while ( p < end && isspace ( * ( const uint8_t* ) p ) )
-        ++ p;
-    return p;
-}
-
-/* nss_FASTA_expr
- */
-static
-const char *nss_FASTA_expr ( const char *p, const char *end,
-    NucStrExpr **expr, int *status, int positional )
-{
-    if ( p >= end )
-        * status = EINVAL;
-    else
-    {
-        const char *start = p;
-
-        int32_t type = type_2na_64;
-        const int8_t *map = fasta_2na_map;
-        do
-        {
-            if ( * p < 0 )
-                break;
-
-            if ( map [ * ( const uint8_t* ) p ] < 0 )
-            {
-                if ( map == fasta_4na_map )
-                    break;
-                if ( fasta_4na_map [ * ( const uint8_t* ) p ] < 0 )
-                    break;
-                type = type_4na_64;
-                map = fasta_4na_map;
-            }
-        }
-        while ( ++ p < end );
-
-        if ( p <= start )
-            * status = EINVAL;
-        else if ( type == type_2na_64 )
-            * status = NucStrFastaExprMake2 ( expr, positional, start, p - start );
-        else
-            * status = NucStrFastaExprMake4 ( expr, positional, start, p - start );
-    }
-
-    return p;
-}
-
-/* nss_fasta_expr
- */
-static
-const char *nss_fasta_expr ( const char *p, const char *end,
-    NucStrExpr **expr, int *status, int positional )
-{
-    assert ( p < end );
-    switch ( * p )
-    {
-    case '\'':
-        p = nss_FASTA_expr ( p + 1, end, expr, status, positional );
-        if ( * status == 0 && ( p == end || * p ++ != '\'' ) )
-            * status = EINVAL;
-        break;
-    case '"':
-        p = nss_FASTA_expr ( p + 1, end, expr, status, positional );
-        if ( * status == 0 && ( p == end || * p ++ != '"' ) )
-            * status = EINVAL;
-        break;
-    default:
-        return nss_FASTA_expr ( p, end, expr, status, positional );
-    }
-
-    return p;
-}
-
-/* nss_position_expr
- */
-#if ENABLE_AT_EXPR
-static
-const char *nss_position_expr ( const char *p, const char *end,
-    NucStrExpr **expr, int *status, int positional )
-{
-    assert ( p < end );
-    if ( * p == '@' )
-    {
-        p = nss_sob ( p + 1, end );
-        if ( p == end )
-        {
-            * status = EINVAL;
-            return p;
-        }
-        positional = 1;
-    }
-
-    return nss_fasta_expr ( p, end, expr, status, positional );
-}
-#else
-#define nss_position_expr( p, end, expr, status, positional ) \
-    nss_fasta_expr ( p, end, expr, status, positional )
-#endif
-
-/* forward */
-static
-const char *nss_expr ( const char *p, const char *end,
-    NucStrExpr **expr, int *status, int positional );
-
-/* nss_primary_expr
- */
-static
-const char *nss_primary_expr ( const char *p, const char *end,
-    NucStrExpr **expr, int *status, int positional )
-{
-    NucStrExpr *e;
-
-    assert ( p < end );
-    switch ( * p )
-    {
-    case '^':
-        e = malloc ( sizeof e -> sub );
-        if ( e == NULL )
-            * status = errno;
-        else
-        {
-            e -> sub . type = type_EXPR;
-            e -> sub . op = op_HEAD;
-            e -> sub . expr = NULL;
-            * expr = e;
-
-            p = nss_sob ( p + 1, end );
-            p = nss_position_expr ( p, end, & e -> sub . expr, status, positional );
-        }
-        return p;
-    case '(':
-        e = malloc ( sizeof e -> sub );
-        if ( e == NULL )
-            * status = errno;
-        else
-        {
-            e -> sub . type = type_EXPR;
-            e -> sub . op = 0;
-            * expr = e;
-
-            p = nss_expr ( p + 1, end, & e -> sub . expr, status, positional );
-            if ( * status == 0 )
-            {
-                if ( e -> sub . expr == NULL || p == end || * p ++ != ')' )
-                    * status = EINVAL;
-            }
-        }
-        return p;
-    }
-
-    p = nss_position_expr ( p, end, expr, status, positional );
-    if ( * status == 0 && p < end )
-    {
-        p = nss_sob ( p, end );
-        if ( p < end && * p == '$' )
-        {
-            ++ p;
-
-            e = malloc ( sizeof e -> sub );
-            if ( e == NULL )
-                * status = errno;
-            else
-            {
-                e -> sub . type = type_EXPR;
-                e -> sub . op = op_TAIL;
-                e -> sub . expr = * expr;
-                * expr = e;
-            }
-        }
-    }
-
-    return p;
-}
-
-/* nss_unary_expr
- */
-static
-const char *nss_unary_expr ( const char *p, const char *end,
-    NucStrExpr **expr, int *status, int positional )
-{
-    assert ( p < end );
-    if ( * p != '!' )
-        return nss_primary_expr ( p, end, expr, status, positional );
-
-#if ! ALLOW_POSITIONAL_OPERATOR_MIX
-    if ( positional )
-    {
-        * status = EINVAL;
-        return p;
-    }
-#endif
-
-    p = nss_sob ( p + 1, end );
-    if ( p == end )
-        * status = EINVAL;
-    else
-    {
-        NucStrExpr *e = malloc ( sizeof e -> sub );
-        if ( e == NULL )
-            * status = errno;
-        else
-        {
-            e -> sub . type = type_EXPR;
-            e -> sub . op = op_NOT;
-            e -> sub . expr = NULL;
-            * expr = e;
-            
-            p = nss_unary_expr ( p, end, & e -> sub . expr, status, positional );
-            assert ( * status != 0 || e -> sub . expr != NULL );
-        }
-    }
-    return p;
-}
-
-/* nss_expr
- *
- *   expr        : <unary_expr>
- *               | <unary_expr> <boolean_op> <expr>
- *
- *   boolean_op  : '&', '|', '&&', '||'
- */
-static
-const char *nss_expr ( const char *p, const char *end,
-    NucStrExpr **expr, int *status, int positional )
-{
-    * expr = NULL;
-
-    p = nss_sob ( p, end );
-    if ( p != end )
-    {
-        p = nss_unary_expr ( p, end, expr, status, positional );
-        if ( * status == 0 )
-        {
-            p = nss_sob ( p, end );
-            if ( p != end )
-            {
-                int32_t op;
-                NucStrExpr *e;
-                assert ( * expr != NULL );
-
-                switch ( * p ++ )
-                {
-                case ')':
-                    return p - 1;
-                case '&':
-                    if ( p < end && * p == '&' )
-                        ++ p;
-                    op = op_AND;
-                    break;
-                case '|':
-                    if ( p < end && * p == '|' )
-                        ++ p;
-                    op = op_OR;
-                    break;
-                default:
-                    /* unrecognized or missing operator */
-                    * status = EINVAL;
-                    return p - 1;
-                }
-
-#if ! ALLOW_POSITIONAL_OPERATOR_MIX
-                /* boolean operators do not work in positional mode */
-                if ( positional )
-                {
-                    * status = EINVAL;
-                    return p - 1;
-                }
-#endif
-
-                e = malloc ( sizeof e -> boolean );
-                if ( e == NULL )
-                {
-                    * status = errno;
-                    return p;
-                }
-
-                e -> boolean . type = type_OP;
-                e -> boolean . op = op;
-                e -> boolean . left = * expr;
-                * expr = e;
-
-                /* evaluate right-hand */
-                p = nss_expr ( p, end, & e -> boolean . right, status, positional );
-                assert ( * status != 0 || e -> boolean . right != NULL );
-            }
-        }
-    }
-
-    return p;
-}
-
-
-
-/*--------------------------------------------------------------------------
- * NucStrstr
- *  prepared handle for nucleotide k-mer strstr expression
- */
-
-/* NucStrstrInit
- */
-static
-void NucStrstrInit ( void )
-{
-    int ch;
-    unsigned int i;
-    const char *p, *ncbi2na = "ACGT";
-    const char *ncbi4na = "-ACMGRSVTWYHKDBN";
-
-    /* illegal under most conditions */
-    memset ( fasta_2na_map, -1, sizeof fasta_2na_map );
-    memset ( fasta_4na_map, -1, sizeof fasta_4na_map );
-        
-    /* legal ncbi2na alphabet */
-    for ( i = 0, p = ncbi2na; p [ 0 ] != 0; ++ i, ++ p )
-    {
-        ch = p [ 0 ];
-        fasta_2na_map [ ch ] = fasta_2na_map [ tolower ( ch ) ] = ( int8_t ) i;
-    }
-        
-    /* legal ncbi4na alphabet */
-    for ( i = 0, p = ncbi4na; p [ 0 ] != 0; ++ i, ++ p )
-    {
-        ch = p [ 0 ];
-        fasta_4na_map [ ch ] = fasta_4na_map [ tolower ( ch ) ] = ( int8_t ) i;
-    }
-
-    /* byte swap the 2na expand map */
-    for ( i = 0; i < 256; ++ i )
-        expand_2na [ i ] = bswap_16 ( expand_2na [ i ] );
-}
-
-/* NucStrstrMake
- *  prepares search by parsing expression query string
- *  returns error if conversion was not possible.
- *
- *  "nss" [ OUT ] - return parameter for one-time search handle
- *
- *  "positional" [ IN ] - if non-zero, build an expression tree
- *  to return found position rather than simply a Boolean found.
- *  see NucStrstrSearch.
- *
- *  "query" [ IN ] and "len" [ IN ] - query string expression, such that:
- *       expr           : <primary_expr>
- *                      | <primary_expr> <boolean_op> <expr>
- *       primary_expr   : FASTA
- *                      | "'" FASTA "'"
- *                      | '"' FASTA '"'
- *                      | '(' <expr> ')'
- *       boolean_op     : '&', '|', '&&', '||'
- *
- *  return values:
- *    EINVAL - invalid parameter or invalid expression
- */
-LIB_EXPORT int CC NucStrstrMake ( NucStrstr **nss, int positional,
-    const char *query, unsigned int len )
-{
-    if ( nss != NULL )
-    {
-        if ( query != NULL && len != 0 )
-        {
-            int status = 0;
-            const char *end;
-
-            if ( fasta_2na_map [ 0 ] == 0 )
-                NucStrstrInit ();
-
-            end = query + len;
-            query = nss_expr ( query, end, nss, & status, positional );
-            if ( status == 0 )
-            {
-                if ( query == end )
-                    return 0;
-
-                status = EINVAL;
-            }
-
-            NucStrstrWhack ( * nss );
-            * nss = NULL;
-            return status;
-        }
-
-        * nss = NULL;
-    }
-    return EINVAL;
-}
-
-/* NucStrstrWhack
- *  discard structure when no longer needed
- */
-LIB_EXPORT void CC NucStrstrWhack ( NucStrstr *self )
-{
-    if ( self != NULL )
-    {
-        switch ( self -> fasta . type )
-        {
-        case type_2na_64:
-        case type_4na_64:
-        case type_2na_8:
-        case type_2na_16:
-        case type_2na_32:
-        case type_2na_128:
-        case type_4na_16:
-        case type_4na_32:
-        case type_4na_128:
-        case type_2na_pos:
-        case type_4na_pos:
-#if ! USE_MEMALIGN
-            self = self -> fasta . u . outer;
-#endif
-            break;
-        case type_OP:
-            NucStrstrWhack ( self -> boolean . left );
-            NucStrstrWhack ( self -> boolean . right );
-            break;
-        case type_EXPR:
-            NucStrstrWhack ( self -> sub . expr );
-        }
-
-        free ( self );
-    }
-}
-
-
-                        
-/*--------------------------------------------------------------------------
- * expression evaluation
- */
-
-
-#if ENDLESS_BUFFER
-static __inline__
-__m128i prime_buffer_2na ( const uint8_t *src, const uint8_t *ignore )
-{
-    __m128i buffer;
-    ( void ) ignore;
-    if ( ( ( size_t ) src & 15 ) == 0 )
-        buffer = _mm_load_si128 ( ( const __m128i* ) src );
-    else
-        buffer = _mm_loadu_si128 ( ( const __m128i* ) src );
-    return buffer;
-}
-#else
-static __inline__
-__m128i prime_buffer_2na ( const uint8_t *src, const uint8_t *end )
-{
-    size_t bytes;
-    __m128i buffer;
-
-    if ( ( bytes = end - src ) >= 16 )
-    {
-        if ( ( ( size_t ) src & 15 ) == 0 )
-            buffer = _mm_load_si128 ( ( const __m128i* ) src );
-        else
-            buffer = _mm_loadu_si128 ( ( const __m128i* ) src );
-    }
-    else
-    {
-        nucpat_t tmp;
-
-        /* common for Solexa */
-        if ( bytes == 7 )
-        {
-            tmp . b [ 0 ] = src [ 0 ];
-            tmp . b [ 1 ] = src [ 1 ];
-            tmp . b [ 2 ] = src [ 2 ];
-            tmp . b [ 3 ] = src [ 3 ];
-            tmp . b [ 4 ] = src [ 4 ];
-            tmp . b [ 5 ] = src [ 5 ];
-            tmp . b [ 6 ] = src [ 6 ];
-            tmp . b [ 7 ] = 0;
-            tmp . l [ 1 ] = 0;
-        }
-
-        /* currently only seen for 454 */
-        else
-        {
-            memcpy ( tmp . b, src, bytes );
-            memset ( & tmp . b [ bytes ], 0, sizeof tmp . b - bytes );
-        }
-
-        buffer = _mm_loadu_si128 ( ( const __m128i* ) tmp . b );
-    }
-    return buffer;
-}
-#endif
-
-#define prime_registers( self ) \
-    p0 = _mm_load_si128 ( ( const __m128i* ) self -> query [ 0 ] . pattern . b ); \
-    m0 = _mm_load_si128 ( ( const __m128i* ) self -> query [ 0 ] . mask . b ); \
-    p1 = _mm_load_si128 ( ( const __m128i* ) self -> query [ 1 ] . pattern . b ); \
-    m1 = _mm_load_si128 ( ( const __m128i* ) self -> query [ 1 ] . mask . b ); \
-    p2 = _mm_load_si128 ( ( const __m128i* ) self -> query [ 2 ] . pattern . b ); \
-    m2 = _mm_load_si128 ( ( const __m128i* ) self -> query [ 2 ] . mask . b ); \
-    p3 = _mm_load_si128 ( ( const __m128i* ) self -> query [ 3 ] . pattern . b ); \
-    m3 = _mm_load_si128 ( ( const __m128i* ) self -> query [ 3 ] . mask . b )
-
-static
-int eval_2na_8 ( const NucStrFastaExpr *self,
-    const void *ncbi2na, unsigned int pos, unsigned int len )
-{
-#define qbytes 1
-#define _mm_cmpeq_epi( a, b ) \
-    _mm_cmpeq_epi8 ( a, b )
-#if NEVER_MATCH
-#define res_adj( res ) \
-    res = 0
-#else
-#define res_adj( res ) \
-    ( ( void ) 0 )
-#endif
-
-    /* SSE registers */
-    nucreg_t buffer, ri;
-    nucreg_t p0, p1, p2, p3, m0, m1, m2, m3;
-
-    /* result registers */
-    int ra, rb, rc, rd;
-
-    /* used for shifting buffer, testing exit */
-    unsigned int num_passes, stop;
-
-    /* kludge for streaming in a byte at a time
-       only needed when qbytes > 1 */
-#if qbytes > 1
-    int slam;
-    const uint8_t *p;
-#endif
-
-    const uint8_t *end, *src;
-    unsigned int qlen = self -> size;
-
-    /* this test is performed outside */
-    assert ( len >= qlen );
-
-    /* the effective length of the sequence,
-       including leading bases we'll ignore */
-    len += pos;
-
-    /* convert source pointer */
-    src = ( const uint8_t* ) ncbi2na + ( pos >> 2 );
-
-    /* stop testing when position passes this point */
-    stop = len - qlen;
-
-    /* the sequence end pointer */
-    end = ( const uint8_t* ) ncbi2na + ( ( len + 3 ) >> 2 );
-
-    /* prime the buffer */
-    buffer = prime_buffer_2na ( src, end );
-    src += 16;
-#if qbytes > 1
-    p = src;
-
-    /* pre-load slam for single byte streaming */
-    if ( src < end )
-        slam = ( int ) src [ -1 ] << 8;
-#endif
-
-    /* prime the registers */
-    prime_registers ( self );
-
-    /* enter the loop at an appropriate offset */
-    ra = rb = rc = 0;
-#if qbytes == 16
-    num_passes = ( stop - pos + 7 ) >> 2;
-#else
-    num_passes = qbytes;
-#endif
-
-    /* for reporting - give a buffer alignment */
-    ALIGN_2NA_HEADER ( buffer, pos & ~ 3, len );
-    switch ( pos & 3 )
-    {
-    default:
-
-        /* outer loop - performs whole buffer loads */
-        while ( 1 )
-        {
-            num_passes = qbytes;
-
-            /* inner loop - shifts in one byte at a time */
-            while ( 1 )
-            {
-                /* for reporting - give a buffer alignment */
-                ALIGN_2NA_HEADER ( buffer, pos, len );
-
-                /* perform comparisons */
-    case 0:
-                ri = _mm_and_si128 ( buffer, m0 );
-                ri = _mm_cmpeq_epi ( ri, p0 );
-                ra = _mm_movemask_epi8 ( ri );
-                res_adj ( ra );
-                ALIGN_2NA_RESULT ( buffer, p0, m0, ri, ra );
-    case 1:
-                ri = _mm_and_si128 ( buffer, m1 );
-                ri = _mm_cmpeq_epi ( ri, p1 );
-                rb = _mm_movemask_epi8 ( ri );
-                res_adj ( rb );
-                ALIGN_2NA_RESULT ( buffer, p1, m1, ri, rb );
-    case 2:
-                ri = _mm_and_si128 ( buffer, m2 );
-                ri = _mm_cmpeq_epi ( ri, p2 );
-                rc = _mm_movemask_epi8 ( ri );
-                res_adj ( rc );
-                ALIGN_2NA_RESULT ( buffer, p2, m2, ri, rc );
-    case 3:
-                ri = _mm_and_si128 ( buffer, m3 );
-                ri = _mm_cmpeq_epi ( ri, p3 );
-                rd = _mm_movemask_epi8 ( ri );
-                res_adj ( rd );
-                ALIGN_2NA_RESULT ( buffer, p3, m3, ri, rd );
-
-                /* adjust pos */
-                pos &= ~ 3;
-
-                /* test for any promising results */
-                if ( ( ra | rb | rc | rd ) != 0 )
-                {
-#if qbytes == 16
-                    switch ( stop - pos )
-                    {
-                    default:
-                        return 1;
-                    case 2:
-                        if ( rc != 0 ) return 1;
-                    case 1:
-                        if ( rb != 0 ) return 1;
-                    case 0:
-                        if ( ra != 0 ) return 1;
-                    }
-                    return 0;
-#else
-                    /* extract first non-zero bit from results
-                       where result is all zeros, bit will be -1 */
-                    int fa = uint16_lsbit ( ( uint16_t ) ra );
-                    int fb = uint16_lsbit ( ( uint16_t ) rb );
-                    int fc = uint16_lsbit ( ( uint16_t ) rc );
-                    int fd = uint16_lsbit ( ( uint16_t ) rd );
-
-                    /* convert bit number into number of bases
-                       from current position. undefined where
-                       bit is negative, but unimportant also */
-                    fa = ( fa << 2 ) + 0;
-                    fb = ( fb << 2 ) + 1;
-                    fc = ( fc << 2 ) + 2;
-                    fd = ( fd << 2 ) + 3;
-
-                    /* test for any case where result was non-zero
-                       and the resultant base index is within range */
-                    if ( ra != 0 && pos + fa <= stop ) return 1;
-                    if ( rb != 0 && pos + fb <= stop ) return 1;
-                    if ( rc != 0 && pos + fc <= stop ) return 1;
-                    if ( rd != 0 && pos + fd <= stop ) return 1;
-#endif
-                }
-
-                /* advance pos */
-                pos += 4;
-
-                /* if no further comparisons are possible */
-                if ( pos > stop )
-                    return 0;
-
-                /* if all shifting passes are complete */
-                if ( -- num_passes == 0 )
-                    break;
-
-#if qbytes > 1
-                /* shift buffer */
-                buffer = _mm_srli_si128 ( buffer, 1 );
-
-                /* bring in new byte */
-                if ( p < end )
-                {
-                    slam >>= 8;
-                    slam |= ( int ) p [ 0 ] << 8;
-                    buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                }
-                
-                /* always increment source */
-                ++ p;
-#endif
-            }
-
-            /* want to reload buffer */
-            if ( src >= end )
-                break;
-
-            /* advance position */
-            pos += ( 16 - qbytes ) << 2;
-            if ( pos > stop )
-                break;
-
-            /* reload buffer */
-#if RELOAD_BUFFER || qbytes == 1
-            buffer = prime_buffer_2na ( src, end );
-#elif qbytes == 16
-            assert ( 0 );
-#else
-            if ( p - src < 3 )
-                buffer = prime_buffer_2na ( src, end );
-            else
-            {
-                if ( ( ( size_t ) ( p - src ) & 1 ) != 0 )
-                {
-                    buffer = _mm_srli_si128 ( buffer, 1 );
-                    if ( p < end )
-                    {
-                        slam >>= 8;
-                        slam |= ( int ) p [ 0 ] << 8;
-                        buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                    }
-                    ++ p;
-                }
-
-                if ( src + 16 <= end ) switch ( p - src )
-                {
-                case 4:
-                    buffer = _mm_srli_si128 ( buffer, 12 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 2 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 3 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 4 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 5 ], 7 );
-                    break;
-                case 6:
-                    buffer = _mm_srli_si128 ( buffer, 10 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 3 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 4 ], 7 );
-                    break;
-                case 8:
-                    buffer = _mm_srli_si128 ( buffer, 8 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 7 );
-                    break;
-                case 10:
-                    buffer = _mm_srli_si128 ( buffer, 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 7 );
-                    break;
-                case 12:
-                    buffer = _mm_srli_si128 ( buffer, 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 7 );
-                    break;
-                case 14:
-                    buffer = _mm_srli_si128 ( buffer, 2 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 7 );
-                    break;
-                }
-
-                else for ( ; p - src < 16; p += 2 )
-                {
-                    buffer = _mm_srli_si128 ( buffer, 2 );
-                    if ( p < end )
-                    {
-                        slam = p [ 0 ];
-                        if ( p + 1 < end )
-                            slam |= ( int ) p [ 1 ] << 8;
-                        buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                    }
-                }
-            }
-#endif
-
-            /* adjust pointers */
-            src += 16;
-#if qbytes > 1
-            p = src;
-            if ( src < end )
-                slam = ( int ) src [ -1 ] << 8;
-#endif
-        }
-    }
-
-#undef qbytes
-#undef _mm_cmpeq_epi
-#undef res_adj
-
-    return 0;
-}
-
-static
-int eval_2na_16 ( const NucStrFastaExpr *self,
-    const void *ncbi2na, unsigned int pos, unsigned int len )
-{
-#define qbytes 2
-#define _mm_cmpeq_epi( a, b ) \
-    _mm_cmpeq_epi16 ( a, b )
-#if NEVER_MATCH
-#define res_adj( res ) \
-    res = 0
-#else
-#define res_adj( res ) \
-    ( ( void ) 0 )
-#endif
-
-    /* SSE registers */
-    nucreg_t buffer, ri;
-    nucreg_t p0, p1, p2, p3, m0, m1, m2, m3;
-
-    /* result registers */
-    int ra, rb, rc, rd;
-
-    /* used for shifting buffer, testing exit */
-    unsigned int num_passes, stop;
-
-    /* kludge for streaming in a byte at a time
-       only needed when qbytes > 1 */
-#if qbytes > 1
-    int slam;
-    const uint8_t *p;
-#endif
-
-    const uint8_t *end, *src;
-    unsigned int qlen = self -> size;
-
-    /* this test is performed outside */
-    assert ( len >= qlen );
-
-    /* the effective length of the sequence,
-       including leading bases we'll ignore */
-    len += pos;
-
-    /* convert source pointer */
-    src = ( const uint8_t* ) ncbi2na + ( pos >> 2 );
-
-    /* stop testing when position passes this point */
-    stop = len - qlen;
-
-    /* the sequence end pointer */
-    end = ( const uint8_t* ) ncbi2na + ( ( len + 3 ) >> 2 );
-
-    /* prime the buffer */
-    buffer = prime_buffer_2na ( src, end );
-    src += 16;
-#if qbytes > 1
-    p = src;
-
-    /* pre-load slam for single byte streaming */
-    if ( src < end )
-        slam = ( int ) src [ -1 ] << 8;
-#endif
-
-    /* prime the registers */
-    prime_registers ( self );
-
-    /* enter the loop at an appropriate offset */
-    ra = rb = rc = 0;
-#if qbytes == 16
-    num_passes = ( stop - pos + 7 ) >> 2;
-#else
-    num_passes = qbytes;
-#endif
-
-    /* for reporting - give a buffer alignment */
-    ALIGN_2NA_HEADER ( buffer, pos & ~ 3, len );
-    switch ( pos & 3 )
-    {
-    default:
-
-        /* outer loop - performs whole buffer loads */
-        while ( 1 )
-        {
-            num_passes = qbytes;
-
-            /* inner loop - shifts in one byte at a time */
-            while ( 1 )
-            {
-                /* for reporting - give a buffer alignment */
-                ALIGN_2NA_HEADER ( buffer, pos, len );
-
-                /* perform comparisons */
-    case 0:
-                ri = _mm_and_si128 ( buffer, m0 );
-                ri = _mm_cmpeq_epi ( ri, p0 );
-                ra = _mm_movemask_epi8 ( ri );
-                res_adj ( ra );
-                ALIGN_2NA_RESULT ( buffer, p0, m0, ri, ra );
-    case 1:
-                ri = _mm_and_si128 ( buffer, m1 );
-                ri = _mm_cmpeq_epi ( ri, p1 );
-                rb = _mm_movemask_epi8 ( ri );
-                res_adj ( rb );
-                ALIGN_2NA_RESULT ( buffer, p1, m1, ri, rb );
-    case 2:
-                ri = _mm_and_si128 ( buffer, m2 );
-                ri = _mm_cmpeq_epi ( ri, p2 );
-                rc = _mm_movemask_epi8 ( ri );
-                res_adj ( rc );
-                ALIGN_2NA_RESULT ( buffer, p2, m2, ri, rc );
-    case 3:
-                ri = _mm_and_si128 ( buffer, m3 );
-                ri = _mm_cmpeq_epi ( ri, p3 );
-                rd = _mm_movemask_epi8 ( ri );
-                res_adj ( rd );
-                ALIGN_2NA_RESULT ( buffer, p3, m3, ri, rd );
-
-                /* adjust pos */
-                pos &= ~ 3;
-
-                /* test for any promising results */
-                if ( ( ra | rb | rc | rd ) != 0 )
-                {
-#if qbytes == 16
-                    switch ( stop - pos )
-                    {
-                    default:
-                        return 1;
-                    case 2:
-                        if ( rc != 0 ) return 1;
-                    case 1:
-                        if ( rb != 0 ) return 1;
-                    case 0:
-                        if ( ra != 0 ) return 1;
-                    }
-                    return 0;
-#else
-                    /* extract first non-zero bit from results
-                       where result is all zeros, bit will be -1 */
-                    int fa = uint16_lsbit ( ( uint16_t ) ra );
-                    int fb = uint16_lsbit ( ( uint16_t ) rb );
-                    int fc = uint16_lsbit ( ( uint16_t ) rc );
-                    int fd = uint16_lsbit ( ( uint16_t ) rd );
-
-                    /* convert bit number into number of bases
-                       from current position. undefined where
-                       bit is negative, but unimportant also */
-                    fa = ( fa << 2 ) + 0;
-                    fb = ( fb << 2 ) + 1;
-                    fc = ( fc << 2 ) + 2;
-                    fd = ( fd << 2 ) + 3;
-
-                    /* test for any case where result was non-zero
-                       and the resultant base index is within range */
-                    if ( ra != 0 && pos + fa <= stop ) return 1;
-                    if ( rb != 0 && pos + fb <= stop ) return 1;
-                    if ( rc != 0 && pos + fc <= stop ) return 1;
-                    if ( rd != 0 && pos + fd <= stop ) return 1;
-#endif
-                }
-
-                /* advance pos */
-                pos += 4;
-
-                /* if no further comparisons are possible */
-                if ( pos > stop )
-                    return 0;
-
-                /* if all shifting passes are complete */
-                if ( -- num_passes == 0 )
-                    break;
-
-#if qbytes > 1
-                /* shift buffer */
-                buffer = _mm_srli_si128 ( buffer, 1 );
-
-                /* bring in new byte */
-                if ( p < end )
-                {
-                    slam >>= 8;
-                    slam |= ( int ) p [ 0 ] << 8;
-                    buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                }
-                
-                /* always increment source */
-                ++ p;
-#endif
-            }
-
-            /* want to reload buffer */
-            if ( src >= end )
-                break;
-
-            /* advance position */
-            pos += ( 16 - qbytes ) << 2;
-            if ( pos > stop )
-                break;
-
-            /* reload buffer */
-#if RELOAD_BUFFER || qbytes == 1
-            buffer = prime_buffer_2na ( src, end );
-#elif qbytes == 16
-            assert ( 0 );
-#else
-            if ( p - src < 3 )
-                buffer = prime_buffer_2na ( src, end );
-            else
-            {
-                if ( ( ( size_t ) ( p - src ) & 1 ) != 0 )
-                {
-                    buffer = _mm_srli_si128 ( buffer, 1 );
-                    if ( p < end )
-                    {
-                        slam >>= 8;
-                        slam |= ( int ) p [ 0 ] << 8;
-                        buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                    }
-                    ++ p;
-                }
-
-                if ( src + 16 <= end ) switch ( p - src )
-                {
-                case 4:
-                    buffer = _mm_srli_si128 ( buffer, 12 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 2 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 3 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 4 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 5 ], 7 );
-                    break;
-                case 6:
-                    buffer = _mm_srli_si128 ( buffer, 10 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 3 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 4 ], 7 );
-                    break;
-                case 8:
-                    buffer = _mm_srli_si128 ( buffer, 8 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 7 );
-                    break;
-                case 10:
-                    buffer = _mm_srli_si128 ( buffer, 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 7 );
-                    break;
-                case 12:
-                    buffer = _mm_srli_si128 ( buffer, 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 7 );
-                    break;
-                case 14:
-                    buffer = _mm_srli_si128 ( buffer, 2 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 7 );
-                    break;
-                }
-
-                else for ( ; p - src < 16; p += 2 )
-                {
-                    buffer = _mm_srli_si128 ( buffer, 2 );
-                    if ( p < end )
-                    {
-                        slam = p [ 0 ];
-                        if ( p + 1 < end )
-                            slam |= ( int ) p [ 1 ] << 8;
-                        buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                    }
-                }
-            }
-#endif
-
-            /* adjust pointers */
-            src += 16;
-#if qbytes > 1
-            p = src;
-            if ( src < end )
-                slam = ( int ) src [ -1 ] << 8;
-#endif
-        }
-    }
-
-#undef qbytes
-#undef _mm_cmpeq_epi
-#undef res_adj
-
-    return 0;
-}
-
-static
-int eval_2na_32 ( const NucStrFastaExpr *self,
-    const void *ncbi2na, unsigned int pos, unsigned int len )
-{
-#define qbytes 4
-#define _mm_cmpeq_epi( a, b ) \
-    _mm_cmpeq_epi32 ( a, b )
-#if NEVER_MATCH
-#define res_adj( res ) \
-    res = 0
-#else
-#define res_adj( res ) \
-    ( ( void ) 0 )
-#endif
-
-    /* SSE registers */
-    nucreg_t buffer, ri;
-    nucreg_t p0, p1, p2, p3, m0, m1, m2, m3;
-
-    /* result registers */
-    int ra, rb, rc, rd;
-
-    /* used for shifting buffer, testing exit */
-    unsigned int num_passes, stop;
-
-    /* kludge for streaming in a byte at a time
-       only needed when qbytes > 1 */
-#if qbytes > 1
-    int slam;
-    const uint8_t *p;
-#endif
-
-    const uint8_t *end, *src;
-    unsigned int qlen = self -> size;
-
-    /* this test is performed outside */
-    assert ( len >= qlen );
-
-    /* the effective length of the sequence,
-       including leading bases we'll ignore */
-    len += pos;
-
-    /* convert source pointer */
-    src = ( const uint8_t* ) ncbi2na + ( pos >> 2 );
-
-    /* stop testing when position passes this point */
-    stop = len - qlen;
-
-    /* the sequence end pointer */
-    end = ( const uint8_t* ) ncbi2na + ( ( len + 3 ) >> 2 );
-
-    /* prime the buffer */
-    buffer = prime_buffer_2na ( src, end );
-    src += 16;
-#if qbytes > 1
-    p = src;
-
-    /* pre-load slam for single byte streaming */
-    if ( src < end )
-        slam = ( int ) src [ -1 ] << 8;
-#endif
-
-    /* prime the registers */
-    prime_registers ( self );
-
-    /* enter the loop at an appropriate offset */
-    ra = rb = rc = 0;
-#if qbytes == 16
-    num_passes = ( stop - pos + 7 ) >> 2;
-#else
-    num_passes = qbytes;
-#endif
-
-    /* for reporting - give a buffer alignment */
-    ALIGN_2NA_HEADER ( buffer, pos & ~ 3, len );
-    switch ( pos & 3 )
-    {
-    default:
-
-        /* outer loop - performs whole buffer loads */
-        while ( 1 )
-        {
-            num_passes = qbytes;
-
-            /* inner loop - shifts in one byte at a time */
-            while ( 1 )
-            {
-                /* for reporting - give a buffer alignment */
-                ALIGN_2NA_HEADER ( buffer, pos, len );
-
-                /* perform comparisons */
-    case 0:
-                ri = _mm_and_si128 ( buffer, m0 );
-                ri = _mm_cmpeq_epi ( ri, p0 );
-                ra = _mm_movemask_epi8 ( ri );
-                res_adj ( ra );
-                ALIGN_2NA_RESULT ( buffer, p0, m0, ri, ra );
-    case 1:
-                ri = _mm_and_si128 ( buffer, m1 );
-                ri = _mm_cmpeq_epi ( ri, p1 );
-                rb = _mm_movemask_epi8 ( ri );
-                res_adj ( rb );
-                ALIGN_2NA_RESULT ( buffer, p1, m1, ri, rb );
-    case 2:
-                ri = _mm_and_si128 ( buffer, m2 );
-                ri = _mm_cmpeq_epi ( ri, p2 );
-                rc = _mm_movemask_epi8 ( ri );
-                res_adj ( rc );
-                ALIGN_2NA_RESULT ( buffer, p2, m2, ri, rc );
-    case 3:
-                ri = _mm_and_si128 ( buffer, m3 );
-                ri = _mm_cmpeq_epi ( ri, p3 );
-                rd = _mm_movemask_epi8 ( ri );
-                res_adj ( rd );
-                ALIGN_2NA_RESULT ( buffer, p3, m3, ri, rd );
-
-                /* adjust pos */
-                pos &= ~ 3;
-
-                /* test for any promising results */
-                if ( ( ra | rb | rc | rd ) != 0 )
-                {
-#if qbytes == 16
-                    switch ( stop - pos )
-                    {
-                    default:
-                        return 1;
-                    case 2:
-                        if ( rc != 0 ) return 1;
-                    case 1:
-                        if ( rb != 0 ) return 1;
-                    case 0:
-                        if ( ra != 0 ) return 1;
-                    }
-                    return 0;
-#else
-                    /* extract first non-zero bit from results
-                       where result is all zeros, bit will be -1 */
-                    int fa = uint16_lsbit ( ( uint16_t ) ra );
-                    int fb = uint16_lsbit ( ( uint16_t ) rb );
-                    int fc = uint16_lsbit ( ( uint16_t ) rc );
-                    int fd = uint16_lsbit ( ( uint16_t ) rd );
-
-                    /* convert bit number into number of bases
-                       from current position. undefined where
-                       bit is negative, but unimportant also */
-                    fa = ( fa << 2 ) + 0;
-                    fb = ( fb << 2 ) + 1;
-                    fc = ( fc << 2 ) + 2;
-                    fd = ( fd << 2 ) + 3;
-
-                    /* test for any case where result was non-zero
-                       and the resultant base index is within range */
-                    if ( ra != 0 && pos + fa <= stop ) return 1;
-                    if ( rb != 0 && pos + fb <= stop ) return 1;
-                    if ( rc != 0 && pos + fc <= stop ) return 1;
-                    if ( rd != 0 && pos + fd <= stop ) return 1;
-#endif
-                }
-
-                /* advance pos */
-                pos += 4;
-
-                /* if no further comparisons are possible */
-                if ( pos > stop )
-                    return 0;
-
-                /* if all shifting passes are complete */
-                if ( -- num_passes == 0 )
-                    break;
-
-#if qbytes > 1
-                /* shift buffer */
-                buffer = _mm_srli_si128 ( buffer, 1 );
-
-                /* bring in new byte */
-                if ( p < end )
-                {
-                    slam >>= 8;
-                    slam |= ( int ) p [ 0 ] << 8;
-                    buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                }
-                
-                /* always increment source */
-                ++ p;
-#endif
-            }
-
-            /* want to reload buffer */
-            if ( src >= end )
-                break;
-
-            /* advance position */
-            pos += ( 16 - qbytes ) << 2;
-            if ( pos > stop )
-                break;
-
-            /* reload buffer */
-#if RELOAD_BUFFER || qbytes == 1
-            buffer = prime_buffer_2na ( src, end );
-#elif qbytes == 16
-            assert ( 0 );
-#else
-            if ( p - src < 3 )
-                buffer = prime_buffer_2na ( src, end );
-            else
-            {
-                if ( ( ( size_t ) ( p - src ) & 1 ) != 0 )
-                {
-                    buffer = _mm_srli_si128 ( buffer, 1 );
-                    if ( p < end )
-                    {
-                        slam >>= 8;
-                        slam |= ( int ) p [ 0 ] << 8;
-                        buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                    }
-                    ++ p;
-                }
-
-                if ( src + 16 <= end ) switch ( p - src )
-                {
-                case 4:
-                    buffer = _mm_srli_si128 ( buffer, 12 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 2 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 3 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 4 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 5 ], 7 );
-                    break;
-                case 6:
-                    buffer = _mm_srli_si128 ( buffer, 10 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 3 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 4 ], 7 );
-                    break;
-                case 8:
-                    buffer = _mm_srli_si128 ( buffer, 8 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 7 );
-                    break;
-                case 10:
-                    buffer = _mm_srli_si128 ( buffer, 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 7 );
-                    break;
-                case 12:
-                    buffer = _mm_srli_si128 ( buffer, 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 7 );
-                    break;
-                case 14:
-                    buffer = _mm_srli_si128 ( buffer, 2 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 7 );
-                    break;
-                }
-
-                else for ( ; p - src < 16; p += 2 )
-                {
-                    buffer = _mm_srli_si128 ( buffer, 2 );
-                    if ( p < end )
-                    {
-                        slam = p [ 0 ];
-                        if ( p + 1 < end )
-                            slam |= ( int ) p [ 1 ] << 8;
-                        buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                    }
-                }
-            }
-#endif
-
-            /* adjust pointers */
-            src += 16;
-#if qbytes > 1
-            p = src;
-            if ( src < end )
-                slam = ( int ) src [ -1 ] << 8;
-#endif
-        }
-    }
-
-#undef qbytes
-#undef _mm_cmpeq_epi
-#undef res_adj
-
-    return 0;
-}
-
-static
-int eval_2na_64 ( const NucStrFastaExpr *self,
-    const void *ncbi2na, unsigned int pos, unsigned int len )
-{
-#define qbytes 8
-#define _mm_cmpeq_epi( a, b ) \
-    _mm_cmpeq_epi32 ( a, b )
-#if NEVER_MATCH
-#define res_adj( res ) \
-    res = 0
-#else
-#define res_adj( res ) \
-    ( ( res ) &= ( ( res ) & 0x0F0F ) << 4, \
-      ( res ) |= ( res ) >> 4 )
-#endif
-
-    /* SSE registers */
-    nucreg_t buffer, ri;
-    nucreg_t p0, p1, p2, p3, m0, m1, m2, m3;
-
-    /* result registers */
-    int ra, rb, rc, rd;
-
-    /* used for shifting buffer, testing exit */
-    unsigned int num_passes, stop;
-
-    /* kludge for streaming in a byte at a time
-       only needed when qbytes > 1 */
-#if qbytes > 1
-    int slam;
-    const uint8_t *p;
-#endif
-
-    const uint8_t *end, *src;
-    unsigned int qlen = self -> size;
-
-    /* this test is performed outside */
-    assert ( len >= qlen );
-
-    /* the effective length of the sequence,
-       including leading bases we'll ignore */
-    len += pos;
-
-    /* convert source pointer */
-    src = ( const uint8_t* ) ncbi2na + ( pos >> 2 );
-
-    /* stop testing when position passes this point */
-    stop = len - qlen;
-
-    /* the sequence end pointer */
-    end = ( const uint8_t* ) ncbi2na + ( ( len + 3 ) >> 2 );
-
-    /* prime the buffer */
-    buffer = prime_buffer_2na ( src, end );
-    src += 16;
-#if qbytes > 1
-    p = src;
-
-    /* pre-load slam for single byte streaming */
-    if ( src < end )
-        slam = ( int ) src [ -1 ] << 8;
-#endif
-
-    /* prime the registers */
-    prime_registers ( self );
-
-    /* enter the loop at an appropriate offset */
-    ra = rb = rc = 0;
-#if qbytes == 16
-    num_passes = ( stop - pos + 7 ) >> 2;
-#else
-    num_passes = qbytes;
-#endif
-
-    /* for reporting - give a buffer alignment */
-    ALIGN_2NA_HEADER ( buffer, pos & ~ 3, len );
-    switch ( pos & 3 )
-    {
-    default:
-
-        /* outer loop - performs whole buffer loads */
-        while ( 1 )
-        {
-            num_passes = qbytes;
-
-            /* inner loop - shifts in one byte at a time */
-            while ( 1 )
-            {
-                /* for reporting - give a buffer alignment */
-                ALIGN_2NA_HEADER ( buffer, pos, len );
-
-                /* perform comparisons */
-    case 0:
-                ri = _mm_and_si128 ( buffer, m0 );
-                ri = _mm_cmpeq_epi ( ri, p0 );
-                ra = _mm_movemask_epi8 ( ri );
-                res_adj ( ra );
-                ALIGN_2NA_RESULT ( buffer, p0, m0, ri, ra );
-    case 1:
-                ri = _mm_and_si128 ( buffer, m1 );
-                ri = _mm_cmpeq_epi ( ri, p1 );
-                rb = _mm_movemask_epi8 ( ri );
-                res_adj ( rb );
-                ALIGN_2NA_RESULT ( buffer, p1, m1, ri, rb );
-    case 2:
-                ri = _mm_and_si128 ( buffer, m2 );
-                ri = _mm_cmpeq_epi ( ri, p2 );
-                rc = _mm_movemask_epi8 ( ri );
-                res_adj ( rc );
-                ALIGN_2NA_RESULT ( buffer, p2, m2, ri, rc );
-    case 3:
-                ri = _mm_and_si128 ( buffer, m3 );
-                ri = _mm_cmpeq_epi ( ri, p3 );
-                rd = _mm_movemask_epi8 ( ri );
-                res_adj ( rd );
-                ALIGN_2NA_RESULT ( buffer, p3, m3, ri, rd );
-
-                /* adjust pos */
-                pos &= ~ 3;
-
-                /* test for any promising results */
-                if ( ( ra | rb | rc | rd ) != 0 )
-                {
-#if qbytes == 16
-                    switch ( stop - pos )
-                    {
-                    default:
-                        return 1;
-                    case 2:
-                        if ( rc != 0 ) return 1;
-                    case 1:
-                        if ( rb != 0 ) return 1;
-                    case 0:
-                        if ( ra != 0 ) return 1;
-                    }
-                    return 0;
-#else
-                    /* extract first non-zero bit from results
-                       where result is all zeros, bit will be -1 */
-                    int fa = uint16_lsbit ( ( uint16_t ) ra );
-                    int fb = uint16_lsbit ( ( uint16_t ) rb );
-                    int fc = uint16_lsbit ( ( uint16_t ) rc );
-                    int fd = uint16_lsbit ( ( uint16_t ) rd );
-
-                    /* convert bit number into number of bases
-                       from current position. undefined where
-                       bit is negative, but unimportant also */
-                    fa = ( fa << 2 ) + 0;
-                    fb = ( fb << 2 ) + 1;
-                    fc = ( fc << 2 ) + 2;
-                    fd = ( fd << 2 ) + 3;
-
-                    /* test for any case where result was non-zero
-                       and the resultant base index is within range */
-                    if ( ra != 0 && pos + fa <= stop ) return 1;
-                    if ( rb != 0 && pos + fb <= stop ) return 1;
-                    if ( rc != 0 && pos + fc <= stop ) return 1;
-                    if ( rd != 0 && pos + fd <= stop ) return 1;
-#endif
-                }
-
-                /* advance pos */
-                pos += 4;
-
-                /* if no further comparisons are possible */
-                if ( pos > stop )
-                    return 0;
-
-                /* if all shifting passes are complete */
-                if ( -- num_passes == 0 )
-                    break;
-
-#if qbytes > 1
-                /* shift buffer */
-                buffer = _mm_srli_si128 ( buffer, 1 );
-
-                /* bring in new byte */
-                if ( p < end )
-                {
-                    slam >>= 8;
-                    slam |= ( int ) p [ 0 ] << 8;
-                    buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                }
-                
-                /* always increment source */
-                ++ p;
-#endif
-            }
-
-            /* want to reload buffer */
-            if ( src >= end )
-                break;
-
-            /* advance position */
-            pos += ( 16 - qbytes ) << 2;
-            if ( pos > stop )
-                break;
-
-            /* reload buffer */
-#if RELOAD_BUFFER || qbytes == 1
-            buffer = prime_buffer_2na ( src, end );
-#elif qbytes == 16
-            assert ( 0 );
-#else
-            if ( p - src < 3 )
-                buffer = prime_buffer_2na ( src, end );
-            else
-            {
-                if ( ( ( size_t ) ( p - src ) & 1 ) != 0 )
-                {
-                    buffer = _mm_srli_si128 ( buffer, 1 );
-                    if ( p < end )
-                    {
-                        slam >>= 8;
-                        slam |= ( int ) p [ 0 ] << 8;
-                        buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                    }
-                    ++ p;
-                }
-
-                if ( src + 16 <= end ) switch ( p - src )
-                {
-                case 4:
-                    buffer = _mm_srli_si128 ( buffer, 12 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 2 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 3 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 4 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 5 ], 7 );
-                    break;
-                case 6:
-                    buffer = _mm_srli_si128 ( buffer, 10 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 3 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 4 ], 7 );
-                    break;
-                case 8:
-                    buffer = _mm_srli_si128 ( buffer, 8 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 7 );
-                    break;
-                case 10:
-                    buffer = _mm_srli_si128 ( buffer, 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 7 );
-                    break;
-                case 12:
-                    buffer = _mm_srli_si128 ( buffer, 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 7 );
-                    break;
-                case 14:
-                    buffer = _mm_srli_si128 ( buffer, 2 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 7 );
-                    break;
-                }
-
-                else for ( ; p - src < 16; p += 2 )
-                {
-                    buffer = _mm_srli_si128 ( buffer, 2 );
-                    if ( p < end )
-                    {
-                        slam = p [ 0 ];
-                        if ( p + 1 < end )
-                            slam |= ( int ) p [ 1 ] << 8;
-                        buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                    }
-                }
-            }
-#endif
-
-            /* adjust pointers */
-            src += 16;
-#if qbytes > 1
-            p = src;
-            if ( src < end )
-                slam = ( int ) src [ -1 ] << 8;
-#endif
-        }
-    }
-
-#undef qbytes
-#undef _mm_cmpeq_epi
-#undef res_adj
-
-    return 0;
-}
-
-static
-int eval_2na_128 ( const NucStrFastaExpr *self,
-    const void *ncbi2na, unsigned int pos, unsigned int len )
-{
-#define qbytes 16
-#define _mm_cmpeq_epi( a, b ) \
-    _mm_cmpeq_epi32 ( a, b )
-#if NEVER_MATCH
-#define res_adj( res ) \
-    res = 0
-#else
-#define res_adj( res ) \
-    ( ( res ) = - ( ( ( res ) + 1 ) >> 16 ) )
-#endif
-
-    /* SSE registers */
-    nucreg_t buffer, ri;
-    nucreg_t p0, p1, p2, p3, m0, m1, m2, m3;
-
-    /* result registers */
-    int ra, rb, rc, rd;
-
-    /* used for shifting buffer, testing exit */
-    unsigned int num_passes, stop;
-
-    /* kludge for streaming in a byte at a time
-       only needed when qbytes > 1 */
-#if qbytes > 1
-    int slam;
-    const uint8_t *p;
-#endif
-
-    const uint8_t *end, *src;
-    unsigned int qlen = self -> size;
-
-    /* this test is performed outside */
-    assert ( len >= qlen );
-
-    /* the effective length of the sequence,
-       including leading bases we'll ignore */
-    len += pos;
-
-    /* convert source pointer */
-    src = ( const uint8_t* ) ncbi2na + ( pos >> 2 );
-
-    /* stop testing when position passes this point */
-    stop = len - qlen;
-
-    /* the sequence end pointer */
-    end = ( const uint8_t* ) ncbi2na + ( ( len + 3 ) >> 2 );
-
-    /* prime the buffer */
-    buffer = prime_buffer_2na ( src, end );
-    src += 16;
-#if qbytes > 1
-    p = src;
-
-    /* pre-load slam for single byte streaming */
-    if ( src < end )
-        slam = ( int ) src [ -1 ] << 8;
-#endif
-
-    /* prime the registers */
-    prime_registers ( self );
-
-    /* enter the loop at an appropriate offset */
-    ra = rb = rc = 0;
-#if qbytes == 16
-    num_passes = ( stop - pos + 7 ) >> 2;
-#else
-    num_passes = qbytes;
-#endif
-
-    /* for reporting - give a buffer alignment */
-    ALIGN_2NA_HEADER ( buffer, pos & ~ 3, len );
-    switch ( pos & 3 )
-    {
-    default:
-
-        /* outer loop - performs whole buffer loads */
-        while ( 1 )
-        {
-            num_passes = qbytes;
-
-            /* inner loop - shifts in one byte at a time */
-            while ( 1 )
-            {
-                /* for reporting - give a buffer alignment */
-                ALIGN_2NA_HEADER ( buffer, pos, len );
-
-                /* perform comparisons */
-    case 0:
-                ri = _mm_and_si128 ( buffer, m0 );
-                ri = _mm_cmpeq_epi ( ri, p0 );
-                ra = _mm_movemask_epi8 ( ri );
-                res_adj ( ra );
-                ALIGN_2NA_RESULT ( buffer, p0, m0, ri, ra );
-    case 1:
-                ri = _mm_and_si128 ( buffer, m1 );
-                ri = _mm_cmpeq_epi ( ri, p1 );
-                rb = _mm_movemask_epi8 ( ri );
-                res_adj ( rb );
-                ALIGN_2NA_RESULT ( buffer, p1, m1, ri, rb );
-    case 2:
-                ri = _mm_and_si128 ( buffer, m2 );
-                ri = _mm_cmpeq_epi ( ri, p2 );
-                rc = _mm_movemask_epi8 ( ri );
-                res_adj ( rc );
-                ALIGN_2NA_RESULT ( buffer, p2, m2, ri, rc );
-    case 3:
-                ri = _mm_and_si128 ( buffer, m3 );
-                ri = _mm_cmpeq_epi ( ri, p3 );
-                rd = _mm_movemask_epi8 ( ri );
-                res_adj ( rd );
-                ALIGN_2NA_RESULT ( buffer, p3, m3, ri, rd );
-
-                /* adjust pos */
-                pos &= ~ 3;
-
-                /* test for any promising results */
-                if ( ( ra | rb | rc | rd ) != 0 )
-                {
-#if qbytes == 16
-                    switch ( stop - pos )
-                    {
-                    default:
-                        return 1;
-                    case 2:
-                        if ( rc != 0 ) return 1;
-                    case 1:
-                        if ( rb != 0 ) return 1;
-                    case 0:
-                        if ( ra != 0 ) return 1;
-                    }
-                    return 0;
-#else
-                    /* extract first non-zero bit from results
-                       where result is all zeros, bit will be -1 */
-                    int fa = uint16_lsbit ( ( uint16_t ) ra );
-                    int fb = uint16_lsbit ( ( uint16_t ) rb );
-                    int fc = uint16_lsbit ( ( uint16_t ) rc );
-                    int fd = uint16_lsbit ( ( uint16_t ) rd );
-
-                    /* convert bit number into number of bases
-                       from current position. undefined where
-                       bit is negative, but unimportant also */
-                    fa = ( fa << 2 ) + 0;
-                    fb = ( fb << 2 ) + 1;
-                    fc = ( fc << 2 ) + 2;
-                    fd = ( fd << 2 ) + 3;
-
-                    /* test for any case where result was non-zero
-                       and the resultant base index is within range */
-                    if ( ra != 0 && pos + fa <= stop ) return 1;
-                    if ( rb != 0 && pos + fb <= stop ) return 1;
-                    if ( rc != 0 && pos + fc <= stop ) return 1;
-                    if ( rd != 0 && pos + fd <= stop ) return 1;
-#endif
-                }
-
-                /* advance pos */
-                pos += 4;
-
-                /* if no further comparisons are possible */
-                if ( pos > stop )
-                    return 0;
-
-                /* if all shifting passes are complete */
-                if ( -- num_passes == 0 )
-                    break;
-
-#if qbytes > 1
-                /* shift buffer */
-                buffer = _mm_srli_si128 ( buffer, 1 );
-
-                /* bring in new byte */
-                if ( p < end )
-                {
-                    slam >>= 8;
-                    slam |= ( int ) p [ 0 ] << 8;
-                    buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                }
-                
-                /* always increment source */
-                ++ p;
-#endif
-            }
-
-            /* want to reload buffer */
-            if ( src >= end )
-                break;
-
-            /* advance position */
-            pos += ( 16 - qbytes ) << 2;
-            if ( pos > stop )
-                break;
-
-            /* reload buffer */
-#if RELOAD_BUFFER || qbytes == 1
-            buffer = prime_buffer_2na ( src, end );
-#elif qbytes == 16
-            assert ( 0 );
-#else
-            if ( p - src < 3 )
-                buffer = prime_buffer_2na ( src, end );
-            else
-            {
-                if ( ( ( size_t ) ( p - src ) & 1 ) != 0 )
-                {
-                    buffer = _mm_srli_si128 ( buffer, 1 );
-                    if ( p < end )
-                    {
-                        slam >>= 8;
-                        slam |= ( int ) p [ 0 ] << 8;
-                        buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                    }
-                    ++ p;
-                }
-
-                if ( src + 16 <= end ) switch ( p - src )
-                {
-                case 4:
-                    buffer = _mm_srli_si128 ( buffer, 12 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 2 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 3 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 4 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 5 ], 7 );
-                    break;
-                case 6:
-                    buffer = _mm_srli_si128 ( buffer, 10 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 3 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 4 ], 7 );
-                    break;
-                case 8:
-                    buffer = _mm_srli_si128 ( buffer, 8 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 7 );
-                    break;
-                case 10:
-                    buffer = _mm_srli_si128 ( buffer, 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 7 );
-                    break;
-                case 12:
-                    buffer = _mm_srli_si128 ( buffer, 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 7 );
-                    break;
-                case 14:
-                    buffer = _mm_srli_si128 ( buffer, 2 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 7 );
-                    break;
-                }
-
-                else for ( ; p - src < 16; p += 2 )
-                {
-                    buffer = _mm_srli_si128 ( buffer, 2 );
-                    if ( p < end )
-                    {
-                        slam = p [ 0 ];
-                        if ( p + 1 < end )
-                            slam |= ( int ) p [ 1 ] << 8;
-                        buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                    }
-                }
-            }
-#endif
-
-            /* adjust pointers */
-            src += 16;
-#if qbytes > 1
-            p = src;
-            if ( src < end )
-                slam = ( int ) src [ -1 ] << 8;
-#endif
-        }
-    }
-
-#undef qbytes
-#undef _mm_cmpeq_epi
-#undef res_adj
-
-    return 0;
-}
-
-static
-int eval_2na_pos ( const NucStrFastaExpr *self,
-    const void *ncbi2na, unsigned int pos, unsigned int len )
-{
-#define positional 1
-#define qbytes 16
-#define _mm_cmpeq_epi( a, b ) \
-    _mm_cmpeq_epi32 ( a, b )
-#if NEVER_MATCH
-#define res_adj( res ) \
-    res = 0
-#else
-#define res_adj( res ) \
-    ( ( res ) = - ( ( ( res ) + 1 ) >> 16 ) )
-#endif
-
-    /* SSE registers */
-    nucreg_t buffer, ri;
-    nucreg_t p0, p1, p2, p3, m0, m1, m2, m3;
-
-    /* result registers */
-    int ra, rb, rc, rd;
-
-    /* used for shifting buffer, testing exit */
-    unsigned int num_passes, stop;
-
-    /* used to hold entry position */
-#if positional
-    unsigned int start;
-#endif
-
-    /* kludge for streaming in a byte at a time
-       only needed when qbytes > 1 */
-#if qbytes > 1
-    int slam;
-    const uint8_t *p;
-#endif
-
-    const uint8_t *end, *src;
-    unsigned int qlen = self -> size;
-
-    /* this test is performed outside */
-    assert ( len >= qlen );
-
-    /* the effective length of the sequence,
-       including leading bases we'll ignore */
-    len += pos;
-
-    /* hold starting position */
-#if positional
-    start = pos;
-#endif
-
-    /* convert source pointer */
-    src = ( const uint8_t* ) ncbi2na + ( pos >> 2 );
-
-    /* stop testing when position passes this point */
-    stop = len - qlen;
-
-    /* the sequence end pointer */
-    end = ( const uint8_t* ) ncbi2na + ( ( len + 3 ) >> 2 );
-
-    /* prime the buffer */
-    buffer = prime_buffer_2na ( src, end );
-    src += 16;
-#if qbytes > 1
-    p = src;
-
-    /* pre-load slam for single byte streaming */
-    if ( src < end )
-        slam = ( int ) src [ -1 ] << 8;
-#endif
-
-    /* prime the registers */
-    prime_registers ( self );
-
-    /* enter the loop at an appropriate offset */
-    ra = rb = rc = 0;
-#if qbytes == 16
-    num_passes = ( stop - pos + 7 ) >> 2;
-#else
-    num_passes = qbytes;
-#endif
-
-    /* for reporting - give a buffer alignment */
-    ALIGN_2NA_HEADER ( buffer, pos & ~ 3, len );
-    switch ( pos & 3 )
-    {
-    default:
-
-        /* outer loop - performs whole buffer loads */
-        while ( 1 )
-        {
-            num_passes = qbytes;
-
-            /* inner loop - shifts in one byte at a time */
-            while ( 1 )
-            {
-                /* for reporting - give a buffer alignment */
-                ALIGN_2NA_HEADER ( buffer, pos, len );
-
-                /* perform comparisons */
-    case 0:
-                ri = _mm_and_si128 ( buffer, m0 );
-                ri = _mm_cmpeq_epi ( ri, p0 );
-                ra = _mm_movemask_epi8 ( ri );
-                res_adj ( ra );
-                ALIGN_2NA_RESULT ( buffer, p0, m0, ri, ra );
-    case 1:
-                ri = _mm_and_si128 ( buffer, m1 );
-                ri = _mm_cmpeq_epi ( ri, p1 );
-                rb = _mm_movemask_epi8 ( ri );
-                res_adj ( rb );
-                ALIGN_2NA_RESULT ( buffer, p1, m1, ri, rb );
-    case 2:
-                ri = _mm_and_si128 ( buffer, m2 );
-                ri = _mm_cmpeq_epi ( ri, p2 );
-                rc = _mm_movemask_epi8 ( ri );
-                res_adj ( rc );
-                ALIGN_2NA_RESULT ( buffer, p2, m2, ri, rc );
-    case 3:
-                ri = _mm_and_si128 ( buffer, m3 );
-                ri = _mm_cmpeq_epi ( ri, p3 );
-                rd = _mm_movemask_epi8 ( ri );
-                res_adj ( rd );
-                ALIGN_2NA_RESULT ( buffer, p3, m3, ri, rd );
-
-                /* adjust pos */
-                pos &= ~ 3;
-
-                /* test for any promising results */
-                if ( ( ra | rb | rc | rd ) != 0 )
-                {
-#if positional
-                    switch ( stop - pos )
-                    {
-                    case 0:
-                        if ( ra != 0 ) return pos - start + 1;
-                        break;
-                    case 1:
-                        if ( ra != 0 ) return pos - start + 1;
-                        if ( rb != 0 ) return pos - start + 2;
-                        break;
-                    case 2:
-                        if ( ra != 0 ) return pos - start + 1;
-                        if ( rb != 0 ) return pos - start + 2;
-                        if ( rc != 0 ) return pos - start + 3;
-                        break;
-                    default:
-                        if ( ra != 0 ) return pos - start + 1;
-                        if ( rb != 0 ) return pos - start + 2;
-                        if ( rc != 0 ) return pos - start + 3;
-                        if ( rd != 0 ) return pos - start + 4;
-                    }
-                    return 0;
-#elif qbytes == 16
-                    switch ( stop - pos )
-                    {
-                    default:
-                        return 1;
-                    case 2:
-                        if ( rc != 0 ) return 1;
-                    case 1:
-                        if ( rb != 0 ) return 1;
-                    case 0:
-                        if ( ra != 0 ) return 1;
-                    }
-                    return 0;
-#else
-                    /* extract first non-zero bit from results
-                       where result is all zeros, bit will be -1 */
-                    int fa = uint16_lsbit ( ( uint16_t ) ra );
-                    int fb = uint16_lsbit ( ( uint16_t ) rb );
-                    int fc = uint16_lsbit ( ( uint16_t ) rc );
-                    int fd = uint16_lsbit ( ( uint16_t ) rd );
-
-                    /* convert bit number into number of bases
-                       from current position. undefined where
-                       bit is negative, but unimportant also */
-                    fa = ( fa << 2 ) + 0;
-                    fb = ( fb << 2 ) + 1;
-                    fc = ( fc << 2 ) + 2;
-                    fd = ( fd << 2 ) + 3;
-
-                    /* test for any case where result was non-zero
-                       and the resultant base index is within range */
-                    if ( ra != 0 && pos + fa <= stop ) return 1;
-                    if ( rb != 0 && pos + fb <= stop ) return 1;
-                    if ( rc != 0 && pos + fc <= stop ) return 1;
-                    if ( rd != 0 && pos + fd <= stop ) return 1;
-#endif
-                }
-
-                /* advance pos */
-                pos += 4;
-
-                /* if no further comparisons are possible */
-                if ( pos > stop )
-                    return 0;
-
-                /* if all shifting passes are complete */
-                if ( -- num_passes == 0 )
-                    break;
-
-#if qbytes > 1
-                /* shift buffer */
-                buffer = _mm_srli_si128 ( buffer, 1 );
-
-                /* bring in new byte */
-                if ( p < end )
-                {
-                    slam >>= 8;
-                    slam |= ( int ) p [ 0 ] << 8;
-                    buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                }
-                
-                /* always increment source */
-                ++ p;
-#endif
-            }
-
-            /* want to reload buffer */
-            if ( src >= end )
-                break;
-
-            /* advance position */
-            pos += ( 16 - qbytes ) << 2;
-            if ( pos > stop )
-                break;
-
-            /* reload buffer */
-#if RELOAD_BUFFER || qbytes == 1
-            buffer = prime_buffer_2na ( src, end );
-#elif qbytes == 16
-            assert ( 0 );
-#else
-            if ( p - src < 3 )
-                buffer = prime_buffer_2na ( src, end );
-            else
-            {
-                if ( ( ( size_t ) ( p - src ) & 1 ) != 0 )
-                {
-                    buffer = _mm_srli_si128 ( buffer, 1 );
-                    if ( p < end )
-                    {
-                        slam >>= 8;
-                        slam |= ( int ) p [ 0 ] << 8;
-                        buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                    }
-                    ++ p;
-                }
-
-                if ( src + 16 <= end ) switch ( p - src )
-                {
-                case 4:
-                    buffer = _mm_srli_si128 ( buffer, 12 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 2 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 3 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 4 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 5 ], 7 );
-                    break;
-                case 6:
-                    buffer = _mm_srli_si128 ( buffer, 10 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 3 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 4 ], 7 );
-                    break;
-                case 8:
-                    buffer = _mm_srli_si128 ( buffer, 8 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 3 ], 7 );
-                    break;
-                case 10:
-                    buffer = _mm_srli_si128 ( buffer, 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 5 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 2 ], 7 );
-                    break;
-                case 12:
-                    buffer = _mm_srli_si128 ( buffer, 4 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 6 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 1 ], 7 );
-                    break;
-                case 14:
-                    buffer = _mm_srli_si128 ( buffer, 2 );
-                    buffer = _mm_insert_epi16 ( buffer, ( ( const uint16_t* ) p ) [ 0 ], 7 );
-                    break;
-                }
-
-                else for ( ; p - src < 16; p += 2 )
-                {
-                    buffer = _mm_srli_si128 ( buffer, 2 );
-                    if ( p < end )
-                    {
-                        slam = p [ 0 ];
-                        if ( p + 1 < end )
-                            slam |= ( int ) p [ 1 ] << 8;
-                        buffer = _mm_insert_epi16 ( buffer, slam, 7 );
-                    }
-                }
-            }
-#endif
-
-            /* adjust pointers */
-            src += 16;
-#if qbytes > 1
-            p = src;
-            if ( src < end )
-                slam = ( int ) src [ -1 ] << 8;
-#endif
-        }
-    }
-
-#undef positional
-#undef qbytes
-#undef _mm_cmpeq_epi
-#undef res_adj
-
-    return 0;
-}
-
-
-#if ENDLESS_BUFFER
-static __inline__
-__m128i prime_buffer_4na ( const uint8_t *src, const uint8_t *ignore )
-{
-    nucpat_t tmp;
-    __m128i buffer;
-
-    ( void ) ignore;
-
-    tmp . w [ 0 ] = expand_2na [ src [ 0 ] ];
-    tmp . w [ 1 ] = expand_2na [ src [ 1 ] ];
-    tmp . w [ 2 ] = expand_2na [ src [ 2 ] ];
-    tmp . w [ 3 ] = expand_2na [ src [ 3 ] ];
-    tmp . w [ 4 ] = expand_2na [ src [ 4 ] ];
-    tmp . w [ 5 ] = expand_2na [ src [ 5 ] ];
-    tmp . w [ 6 ] = expand_2na [ src [ 6 ] ];
-    tmp . w [ 7 ] = expand_2na [ src [ 7 ] ];
-
-    buffer = _mm_loadu_si128 ( ( const __m128i* ) tmp . b );
-    return buffer;
-}
-#else
-static __inline__
-__m128i prime_buffer_4na ( const uint8_t *src, const uint8_t *end )
-{
-    nucpat_t tmp;
-    __m128i buffer;
-
-    if ( end - src >= 8 )
-    {
-        tmp . w [ 0 ] = expand_2na [ src [ 0 ] ];
-        tmp . w [ 1 ] = expand_2na [ src [ 1 ] ];
-        tmp . w [ 2 ] = expand_2na [ src [ 2 ] ];
-        tmp . w [ 3 ] = expand_2na [ src [ 3 ] ];
-        tmp . w [ 4 ] = expand_2na [ src [ 4 ] ];
-        tmp . w [ 5 ] = expand_2na [ src [ 5 ] ];
-        tmp . w [ 6 ] = expand_2na [ src [ 6 ] ];
-        tmp . w [ 7 ] = expand_2na [ src [ 7 ] ];
-    }
-    else
-    {
-        tmp . l [ 0 ] = tmp . l [ 1 ] = 0;
-        switch ( end - src )
-        {
-        default:
-            tmp . w [ 6 ] = expand_2na [ src [ 6 ] ];
-        case 6:
-            tmp . w [ 5 ] = expand_2na [ src [ 5 ] ];
-        case 5:
-            tmp . w [ 4 ] = expand_2na [ src [ 4 ] ];
-        case 4:
-            tmp . w [ 3 ] = expand_2na [ src [ 3 ] ];
-        case 3:
-            tmp . w [ 2 ] = expand_2na [ src [ 2 ] ];
-        case 2:
-            tmp . w [ 1 ] = expand_2na [ src [ 1 ] ];
-        case 1:
-            tmp . w [ 0 ] = expand_2na [ src [ 0 ] ];
-            break;
-        }
-    }
-
-    buffer = _mm_loadu_si128 ( ( const __m128i* ) tmp . b );
-    return buffer;
-}
-#endif
-
-static
-int eval_4na_16 ( const NucStrFastaExpr *self,
-    const void *ncbi2na, unsigned int pos, unsigned int len )
-{
-#define qbytes 2
-#define _mm_cmpeq_epi( a, b ) \
-    _mm_cmpeq_epi16 ( a, b )
-#if NEVER_MATCH
-#define res_adj( res ) \
-    res = 0
-#else
-#define res_adj( res ) \
-    ( ( void ) 0 )
-#endif
-
-    /* SSE registers */
-    nucreg_t buffer, ri, rj;
-    nucreg_t p0, p1, p2, p3, m0, m1, m2, m3;
-
-    /* result registers */
-    int ra, rb, rc, rd;
-
-    /* used for shifting buffer, testing exit */
-    unsigned int num_passes, stop;
-
-#if qbytes > 2
-    const uint8_t *p;
-#endif
-    const uint8_t *end, *src;
-    unsigned int qlen = self -> size;
-
-    /* this test is performed outside */
-    assert ( len >= qlen );
-
-    /* the effective length of the sequence,
-       including leading bases we'll ignore */
-    len += pos;
-
-    /* convert source pointer */
-    src = ( const uint8_t* ) ncbi2na + ( pos >> 2 );
-
-    /* stop testing when position passes this point */
-    stop = len - qlen;
-
-    /* the sequence end pointer */
-    end = ( const uint8_t* ) ncbi2na + ( ( len + 3 ) >> 2 );
-
-    /* prime the buffer */
-    buffer = prime_buffer_4na ( src, end );
-    src += 8;
-#if qbytes > 2
-    p = src;
-#endif
-
-    /* prime the registers */
-    prime_registers ( self );
-
-    /* enter the loop at an appropriate offset */
-    ra = rb = rc = 0;
-#if qbytes == 16
-    num_passes = ( stop - pos + 7 ) >> 2;
-#elif qbytes == 1
-#error "4na requires at least 2 qbytes"
-#else
-    num_passes = qbytes / 2;
-#endif
-
-    /* for reporting - give a buffer alignment */
-    ALIGN_4NA_HEADER ( buffer, pos & ~ 3, len );
-    switch ( pos & 3 )
-    {
-    default:
-
-        /* outer loop - performs whole buffer loads */
-        while ( 1 )
-        {
-            num_passes = qbytes / 2;
-
-            /* inner loop - shifts in one byte at a time */
-            while ( 1 )
-            {
-                /* for reporting - give a buffer alignment */
-                ALIGN_4NA_HEADER ( buffer, pos, len );
-
-                /* perform comparisons */
-    case 0:
-                ri = _mm_and_si128 ( buffer, p0 );
-                rj = _mm_and_si128 ( buffer, m0 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                ra = _mm_movemask_epi8 ( ri );
-                res_adj ( ra );
-                ALIGN_4NA_RESULT ( buffer, p0, m0, ri, ra );
-    case 1:
-                ri = _mm_and_si128 ( buffer, p1 );
-                rj = _mm_and_si128 ( buffer, m1 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                rb = _mm_movemask_epi8 ( ri );
-                res_adj ( rb );
-                ALIGN_4NA_RESULT ( buffer, p1, m1, ri, rb );
-    case 2:
-                ri = _mm_and_si128 ( buffer, p2 );
-                rj = _mm_and_si128 ( buffer, m2 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                rc = _mm_movemask_epi8 ( ri );
-                res_adj ( rc );
-                ALIGN_4NA_RESULT ( buffer, p2, m2, ri, rc );
-    case 3:
-                ri = _mm_and_si128 ( buffer, p3 );
-                rj = _mm_and_si128 ( buffer, m3 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                rd = _mm_movemask_epi8 ( ri );
-                res_adj ( rd );
-                ALIGN_4NA_RESULT ( buffer, p3, m3, ri, rd );
-
-                /* adjust pos */
-                pos &= ~ 3;
-
-                /* test for any promising results */
-                if ( ( ra | rb | rc | rd ) != 0 )
-                {
-#if qbytes == 16
-                    switch ( stop - pos )
-                    {
-                    default:
-                        return 1;
-                    case 2:
-                        if ( rc != 0 ) return 1;
-                    case 1:
-                        if ( rb != 0 ) return 1;
-                    case 0:
-                        if ( ra != 0 ) return 1;
-                    }
-                    return 0;
-#else
-                    /* extract first non-zero bit from results
-                       where result is all zeros, bit will be -1 */
-                    int fa = uint16_lsbit ( ( uint16_t ) ra );
-                    int fb = uint16_lsbit ( ( uint16_t ) rb );
-                    int fc = uint16_lsbit ( ( uint16_t ) rc );
-                    int fd = uint16_lsbit ( ( uint16_t ) rd );
-
-                    /* convert bit number into number of bases
-                       from current position. undefined where
-                       bit is negative, but unimportant also */
-                    fa = ( fa << 1 ) + 0;
-                    fb = ( fb << 1 ) + 1;
-                    fc = ( fc << 1 ) + 2;
-                    fd = ( fd << 1 ) + 3;
-
-                    /* test for any case where result was non-zero
-                       and the resultant base index is within range */
-                    if ( ra != 0 && pos + fa <= stop ) return 1;
-                    if ( rb != 0 && pos + fb <= stop ) return 1;
-                    if ( rc != 0 && pos + fc <= stop ) return 1;
-                    if ( rd != 0 && pos + fd <= stop ) return 1;
-#endif
-                }
-
-                /* advance pos */
-                pos += 4;
-
-                /* if no further comparisons are possible */
-                if ( pos > stop )
-                    return 0;
-
-                /* if all shifting passes are complete */
-                if ( -- num_passes == 0 )
-                    break;
-
-#if qbytes > 2
-                /* shift buffer */
-                buffer = _mm_srli_si128 ( buffer, 2 );
-
-                /* bring in new byte */
-                if ( p < end )
-                    buffer = _mm_insert_epi16 ( buffer, expand_2na [ * p ], 7 );
-                
-                /* always increment source */
-                ++ p;
-#endif
-            }
-
-            /* want to reload buffer */
-            if ( src >= end )
-                break;
-
-            /* advance position */
-            pos += ( 8 - qbytes / 2 ) << 2;
-            if ( pos > stop )
-                break;
-
-            /* reload buffer */
-#if ENDLESS_BUFFER || qbytes == 2
-            buffer = prime_buffer_4na ( src, end );
-#elif qbytes == 16
-            assert ( 0 );
-#else
-            if ( p - src < 3 )
-                buffer = prime_buffer_4na ( src, end );
-            else for ( ; p - src < 8; ++ p )
-            {
-                buffer = _mm_srli_si128 ( buffer, 2 );
-                if ( p < end )
-                    buffer = _mm_insert_epi16 ( buffer, expand_2na [ * p ], 7 );
-            }
-#endif
-
-            /* adjust pointers */
-            src += 8;
-#if qbytes > 2
-            p = src;
-#endif
-        }
-    }
-
-#undef qbytes
-#undef _mm_cmpeq_epi
-#undef res_adj
-
-    return 0;
-}
-
-static
-int eval_4na_32 ( const NucStrFastaExpr *self,
-    const void *ncbi2na, unsigned int pos, unsigned int len )
-{
-#define qbytes 4
-#define _mm_cmpeq_epi( a, b ) \
-    _mm_cmpeq_epi32 ( a, b )
-#if NEVER_MATCH
-#define res_adj( res ) \
-    res = 0
-#else
-#define res_adj( res ) \
-    ( ( void ) 0 )
-#endif
-
-    /* SSE registers */
-    nucreg_t buffer, ri, rj;
-    nucreg_t p0, p1, p2, p3, m0, m1, m2, m3;
-
-    /* result registers */
-    int ra, rb, rc, rd;
-
-    /* used for shifting buffer, testing exit */
-    unsigned int num_passes, stop;
-
-#if qbytes > 2
-    const uint8_t *p;
-#endif
-    const uint8_t *end, *src;
-    unsigned int qlen = self -> size;
-
-    /* this test is performed outside */
-    assert ( len >= qlen );
-
-    /* the effective length of the sequence,
-       including leading bases we'll ignore */
-    len += pos;
-
-    /* convert source pointer */
-    src = ( const uint8_t* ) ncbi2na + ( pos >> 2 );
-
-    /* stop testing when position passes this point */
-    stop = len - qlen;
-
-    /* the sequence end pointer */
-    end = ( const uint8_t* ) ncbi2na + ( ( len + 3 ) >> 2 );
-
-    /* prime the buffer */
-    buffer = prime_buffer_4na ( src, end );
-    src += 8;
-#if qbytes > 2
-    p = src;
-#endif
-
-    /* prime the registers */
-    prime_registers ( self );
-
-    /* enter the loop at an appropriate offset */
-    ra = rb = rc = 0;
-#if qbytes == 16
-    num_passes = ( stop - pos + 7 ) >> 2;
-#elif qbytes == 1
-#error "4na requires at least 2 qbytes"
-#else
-    num_passes = qbytes / 2;
-#endif
-
-    /* for reporting - give a buffer alignment */
-    ALIGN_4NA_HEADER ( buffer, pos & ~ 3, len );
-    switch ( pos & 3 )
-    {
-    default:
-
-        /* outer loop - performs whole buffer loads */
-        while ( 1 )
-        {
-            num_passes = qbytes / 2;
-
-            /* inner loop - shifts in one byte at a time */
-            while ( 1 )
-            {
-                /* for reporting - give a buffer alignment */
-                ALIGN_4NA_HEADER ( buffer, pos, len );
-
-                /* perform comparisons */
-    case 0:
-                ri = _mm_and_si128 ( buffer, p0 );
-                rj = _mm_and_si128 ( buffer, m0 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                ra = _mm_movemask_epi8 ( ri );
-                res_adj ( ra );
-                ALIGN_4NA_RESULT ( buffer, p0, m0, ri, ra );
-    case 1:
-                ri = _mm_and_si128 ( buffer, p1 );
-                rj = _mm_and_si128 ( buffer, m1 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                rb = _mm_movemask_epi8 ( ri );
-                res_adj ( rb );
-                ALIGN_4NA_RESULT ( buffer, p1, m1, ri, rb );
-    case 2:
-                ri = _mm_and_si128 ( buffer, p2 );
-                rj = _mm_and_si128 ( buffer, m2 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                rc = _mm_movemask_epi8 ( ri );
-                res_adj ( rc );
-                ALIGN_4NA_RESULT ( buffer, p2, m2, ri, rc );
-    case 3:
-                ri = _mm_and_si128 ( buffer, p3 );
-                rj = _mm_and_si128 ( buffer, m3 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                rd = _mm_movemask_epi8 ( ri );
-                res_adj ( rd );
-                ALIGN_4NA_RESULT ( buffer, p3, m3, ri, rd );
-
-                /* adjust pos */
-                pos &= ~ 3;
-
-                /* test for any promising results */
-                if ( ( ra | rb | rc | rd ) != 0 )
-                {
-#if qbytes == 16
-                    switch ( stop - pos )
-                    {
-                    default:
-                        return 1;
-                    case 2:
-                        if ( rc != 0 ) return 1;
-                    case 1:
-                        if ( rb != 0 ) return 1;
-                    case 0:
-                        if ( ra != 0 ) return 1;
-                    }
-                    return 0;
-#else
-                    /* extract first non-zero bit from results
-                       where result is all zeros, bit will be -1 */
-                    int fa = uint16_lsbit ( ( uint16_t ) ra );
-                    int fb = uint16_lsbit ( ( uint16_t ) rb );
-                    int fc = uint16_lsbit ( ( uint16_t ) rc );
-                    int fd = uint16_lsbit ( ( uint16_t ) rd );
-
-                    /* convert bit number into number of bases
-                       from current position. undefined where
-                       bit is negative, but unimportant also */
-                    fa = ( fa << 1 ) + 0;
-                    fb = ( fb << 1 ) + 1;
-                    fc = ( fc << 1 ) + 2;
-                    fd = ( fd << 1 ) + 3;
-
-                    /* test for any case where result was non-zero
-                       and the resultant base index is within range */
-                    if ( ra != 0 && pos + fa <= stop ) return 1;
-                    if ( rb != 0 && pos + fb <= stop ) return 1;
-                    if ( rc != 0 && pos + fc <= stop ) return 1;
-                    if ( rd != 0 && pos + fd <= stop ) return 1;
-#endif
-                }
-
-                /* advance pos */
-                pos += 4;
-
-                /* if no further comparisons are possible */
-                if ( pos > stop )
-                    return 0;
-
-                /* if all shifting passes are complete */
-                if ( -- num_passes == 0 )
-                    break;
-
-#if qbytes > 2
-                /* shift buffer */
-                buffer = _mm_srli_si128 ( buffer, 2 );
-
-                /* bring in new byte */
-                if ( p < end )
-                    buffer = _mm_insert_epi16 ( buffer, expand_2na [ * p ], 7 );
-                
-                /* always increment source */
-                ++ p;
-#endif
-            }
-
-            /* want to reload buffer */
-            if ( src >= end )
-                break;
-
-            /* advance position */
-            pos += ( 8 - qbytes / 2 ) << 2;
-            if ( pos > stop )
-                break;
-
-            /* reload buffer */
-#if ENDLESS_BUFFER || qbytes == 2
-            buffer = prime_buffer_4na ( src, end );
-#elif qbytes == 16
-            assert ( 0 );
-#else
-            if ( p - src < 3 )
-                buffer = prime_buffer_4na ( src, end );
-            else for ( ; p - src < 8; ++ p )
-            {
-                buffer = _mm_srli_si128 ( buffer, 2 );
-                if ( p < end )
-                    buffer = _mm_insert_epi16 ( buffer, expand_2na [ * p ], 7 );
-            }
-#endif
-
-            /* adjust pointers */
-            src += 8;
-#if qbytes > 2
-            p = src;
-#endif
-        }
-    }
-
-#undef qbytes
-#undef _mm_cmpeq_epi
-#undef res_adj
-
-    return 0;
-}
-
-static
-int eval_4na_64 ( const NucStrFastaExpr *self,
-    const void *ncbi2na, unsigned int pos, unsigned int len )
-{
-#define qbytes 8
-#define _mm_cmpeq_epi( a, b ) \
-    _mm_cmpeq_epi32 ( a, b )
-#if NEVER_MATCH
-#define res_adj( res ) \
-    res = 0
-#else
-#define res_adj( res ) \
-    ( ( res ) &= ( ( res ) & 0x0F0F ) << 4, \
-      ( res ) |= ( res ) >> 4 )
-#endif
-
-    /* SSE registers */
-    nucreg_t buffer, ri, rj;
-    nucreg_t p0, p1, p2, p3, m0, m1, m2, m3;
-
-    /* result registers */
-    int ra, rb, rc, rd;
-
-    /* used for shifting buffer, testing exit */
-    unsigned int num_passes, stop;
-
-#if qbytes > 2
-    const uint8_t *p;
-#endif
-    const uint8_t *end, *src;
-    unsigned int qlen = self -> size;
-
-    /* this test is performed outside */
-    assert ( len >= qlen );
-
-    /* the effective length of the sequence,
-       including leading bases we'll ignore */
-    len += pos;
-
-    /* convert source pointer */
-    src = ( const uint8_t* ) ncbi2na + ( pos >> 2 );
-
-    /* stop testing when position passes this point */
-    stop = len - qlen;
-
-    /* the sequence end pointer */
-    end = ( const uint8_t* ) ncbi2na + ( ( len + 3 ) >> 2 );
-
-    /* prime the buffer */
-    buffer = prime_buffer_4na ( src, end );
-    src += 8;
-#if qbytes > 2
-    p = src;
-#endif
-
-    /* prime the registers */
-    prime_registers ( self );
-
-    /* enter the loop at an appropriate offset */
-    ra = rb = rc = 0;
-#if qbytes == 16
-    num_passes = ( stop - pos + 7 ) >> 2;
-#elif qbytes == 1
-#error "4na requires at least 2 qbytes"
-#else
-    num_passes = qbytes / 2;
-#endif
-
-    /* for reporting - give a buffer alignment */
-    ALIGN_4NA_HEADER ( buffer, pos & ~ 3, len );
-    switch ( pos & 3 )
-    {
-    default:
-
-        /* outer loop - performs whole buffer loads */
-        while ( 1 )
-        {
-            num_passes = qbytes / 2;
-
-            /* inner loop - shifts in one byte at a time */
-            while ( 1 )
-            {
-                /* for reporting - give a buffer alignment */
-                ALIGN_4NA_HEADER ( buffer, pos, len );
-
-                /* perform comparisons */
-    case 0:
-                ri = _mm_and_si128 ( buffer, p0 );
-                rj = _mm_and_si128 ( buffer, m0 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                ra = _mm_movemask_epi8 ( ri );
-                res_adj ( ra );
-                ALIGN_4NA_RESULT ( buffer, p0, m0, ri, ra );
-    case 1:
-                ri = _mm_and_si128 ( buffer, p1 );
-                rj = _mm_and_si128 ( buffer, m1 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                rb = _mm_movemask_epi8 ( ri );
-                res_adj ( rb );
-                ALIGN_4NA_RESULT ( buffer, p1, m1, ri, rb );
-    case 2:
-                ri = _mm_and_si128 ( buffer, p2 );
-                rj = _mm_and_si128 ( buffer, m2 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                rc = _mm_movemask_epi8 ( ri );
-                res_adj ( rc );
-                ALIGN_4NA_RESULT ( buffer, p2, m2, ri, rc );
-    case 3:
-                ri = _mm_and_si128 ( buffer, p3 );
-                rj = _mm_and_si128 ( buffer, m3 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                rd = _mm_movemask_epi8 ( ri );
-                res_adj ( rd );
-                ALIGN_4NA_RESULT ( buffer, p3, m3, ri, rd );
-
-                /* adjust pos */
-                pos &= ~ 3;
-
-                /* test for any promising results */
-                if ( ( ra | rb | rc | rd ) != 0 )
-                {
-#if qbytes == 16
-                    switch ( stop - pos )
-                    {
-                    default:
-                        return 1;
-                    case 2:
-                        if ( rc != 0 ) return 1;
-                    case 1:
-                        if ( rb != 0 ) return 1;
-                    case 0:
-                        if ( ra != 0 ) return 1;
-                    }
-                    return 0;
-#else
-                    /* extract first non-zero bit from results
-                       where result is all zeros, bit will be -1 */
-                    int fa = uint16_lsbit ( ( uint16_t ) ra );
-                    int fb = uint16_lsbit ( ( uint16_t ) rb );
-                    int fc = uint16_lsbit ( ( uint16_t ) rc );
-                    int fd = uint16_lsbit ( ( uint16_t ) rd );
-
-                    /* convert bit number into number of bases
-                       from current position. undefined where
-                       bit is negative, but unimportant also */
-                    fa = ( fa << 1 ) + 0;
-                    fb = ( fb << 1 ) + 1;
-                    fc = ( fc << 1 ) + 2;
-                    fd = ( fd << 1 ) + 3;
-
-                    /* test for any case where result was non-zero
-                       and the resultant base index is within range */
-                    if ( ra != 0 && pos + fa <= stop ) return 1;
-                    if ( rb != 0 && pos + fb <= stop ) return 1;
-                    if ( rc != 0 && pos + fc <= stop ) return 1;
-                    if ( rd != 0 && pos + fd <= stop ) return 1;
-#endif
-                }
-
-                /* advance pos */
-                pos += 4;
-
-                /* if no further comparisons are possible */
-                if ( pos > stop )
-                    return 0;
-
-                /* if all shifting passes are complete */
-                if ( -- num_passes == 0 )
-                    break;
-
-#if qbytes > 2
-                /* shift buffer */
-                buffer = _mm_srli_si128 ( buffer, 2 );
-
-                /* bring in new byte */
-                if ( p < end )
-                    buffer = _mm_insert_epi16 ( buffer, expand_2na [ * p ], 7 );
-                
-                /* always increment source */
-                ++ p;
-#endif
-            }
-
-            /* want to reload buffer */
-            if ( src >= end )
-                break;
-
-            /* advance position */
-            pos += ( 8 - qbytes / 2 ) << 2;
-            if ( pos > stop )
-                break;
-
-            /* reload buffer */
-#if ENDLESS_BUFFER || qbytes == 2
-            buffer = prime_buffer_4na ( src, end );
-#elif qbytes == 16
-            assert ( 0 );
-#else
-            if ( p - src < 3 )
-                buffer = prime_buffer_4na ( src, end );
-            else for ( ; p - src < 8; ++ p )
-            {
-                buffer = _mm_srli_si128 ( buffer, 2 );
-                if ( p < end )
-                    buffer = _mm_insert_epi16 ( buffer, expand_2na [ * p ], 7 );
-            }
-#endif
-
-            /* adjust pointers */
-            src += 8;
-#if qbytes > 2
-            p = src;
-#endif
-        }
-    }
-
-#undef qbytes
-#undef _mm_cmpeq_epi
-#undef res_adj
-
-    return 0;
-}
-
-static
-int eval_4na_128 ( const NucStrFastaExpr *self,
-    const void *ncbi2na, unsigned int pos, unsigned int len )
-{
-#define qbytes 16
-#define _mm_cmpeq_epi( a, b ) \
-    _mm_cmpeq_epi32 ( a, b )
-#if NEVER_MATCH
-#define res_adj( res ) \
-    res = 0
-#else
-#define res_adj( res ) \
-    ( ( res ) = - ( ( ( res ) + 1 ) >> 16 ) )
-#endif
-
-    /* SSE registers */
-    nucreg_t buffer, ri, rj;
-    nucreg_t p0, p1, p2, p3, m0, m1, m2, m3;
-
-    /* result registers */
-    int ra, rb, rc, rd;
-
-    /* used for shifting buffer, testing exit */
-    unsigned int num_passes, stop;
-
-#if qbytes > 2
-    const uint8_t *p;
-#endif
-    const uint8_t *end, *src;
-    unsigned int qlen = self -> size;
-
-    /* this test is performed outside */
-    assert ( len >= qlen );
-
-    /* the effective length of the sequence,
-       including leading bases we'll ignore */
-    len += pos;
-
-    /* convert source pointer */
-    src = ( const uint8_t* ) ncbi2na + ( pos >> 2 );
-
-    /* stop testing when position passes this point */
-    stop = len - qlen;
-
-    /* the sequence end pointer */
-    end = ( const uint8_t* ) ncbi2na + ( ( len + 3 ) >> 2 );
-
-    /* prime the buffer */
-    buffer = prime_buffer_4na ( src, end );
-    src += 8;
-#if qbytes > 2
-    p = src;
-#endif
-
-    /* prime the registers */
-    prime_registers ( self );
-
-    /* enter the loop at an appropriate offset */
-    ra = rb = rc = 0;
-#if qbytes == 16
-    num_passes = ( stop - pos + 7 ) >> 2;
-#elif qbytes == 1
-#error "4na requires at least 2 qbytes"
-#else
-    num_passes = qbytes / 2;
-#endif
-
-    /* for reporting - give a buffer alignment */
-    ALIGN_4NA_HEADER ( buffer, pos & ~ 3, len );
-    switch ( pos & 3 )
-    {
-    default:
-
-        /* outer loop - performs whole buffer loads */
-        while ( 1 )
-        {
-            num_passes = qbytes / 2;
-
-            /* inner loop - shifts in one byte at a time */
-            while ( 1 )
-            {
-                /* for reporting - give a buffer alignment */
-                ALIGN_4NA_HEADER ( buffer, pos, len );
-
-                /* perform comparisons */
-    case 0:
-                ri = _mm_and_si128 ( buffer, p0 );
-                rj = _mm_and_si128 ( buffer, m0 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                ra = _mm_movemask_epi8 ( ri );
-                res_adj ( ra );
-                ALIGN_4NA_RESULT ( buffer, p0, m0, ri, ra );
-    case 1:
-                ri = _mm_and_si128 ( buffer, p1 );
-                rj = _mm_and_si128 ( buffer, m1 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                rb = _mm_movemask_epi8 ( ri );
-                res_adj ( rb );
-                ALIGN_4NA_RESULT ( buffer, p1, m1, ri, rb );
-    case 2:
-                ri = _mm_and_si128 ( buffer, p2 );
-                rj = _mm_and_si128 ( buffer, m2 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                rc = _mm_movemask_epi8 ( ri );
-                res_adj ( rc );
-                ALIGN_4NA_RESULT ( buffer, p2, m2, ri, rc );
-    case 3:
-                ri = _mm_and_si128 ( buffer, p3 );
-                rj = _mm_and_si128 ( buffer, m3 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                rd = _mm_movemask_epi8 ( ri );
-                res_adj ( rd );
-                ALIGN_4NA_RESULT ( buffer, p3, m3, ri, rd );
-
-                /* adjust pos */
-                pos &= ~ 3;
-
-                /* test for any promising results */
-                if ( ( ra | rb | rc | rd ) != 0 )
-                {
-#if qbytes == 16
-                    switch ( stop - pos )
-                    {
-                    default:
-                        return 1;
-                    case 2:
-                        if ( rc != 0 ) return 1;
-                    case 1:
-                        if ( rb != 0 ) return 1;
-                    case 0:
-                        if ( ra != 0 ) return 1;
-                    }
-                    return 0;
-#else
-                    /* extract first non-zero bit from results
-                       where result is all zeros, bit will be -1 */
-                    int fa = uint16_lsbit ( ( uint16_t ) ra );
-                    int fb = uint16_lsbit ( ( uint16_t ) rb );
-                    int fc = uint16_lsbit ( ( uint16_t ) rc );
-                    int fd = uint16_lsbit ( ( uint16_t ) rd );
-
-                    /* convert bit number into number of bases
-                       from current position. undefined where
-                       bit is negative, but unimportant also */
-                    fa = ( fa << 1 ) + 0;
-                    fb = ( fb << 1 ) + 1;
-                    fc = ( fc << 1 ) + 2;
-                    fd = ( fd << 1 ) + 3;
-
-                    /* test for any case where result was non-zero
-                       and the resultant base index is within range */
-                    if ( ra != 0 && pos + fa <= stop ) return 1;
-                    if ( rb != 0 && pos + fb <= stop ) return 1;
-                    if ( rc != 0 && pos + fc <= stop ) return 1;
-                    if ( rd != 0 && pos + fd <= stop ) return 1;
-#endif
-                }
-
-                /* advance pos */
-                pos += 4;
-
-                /* if no further comparisons are possible */
-                if ( pos > stop )
-                    return 0;
-
-                /* if all shifting passes are complete */
-                if ( -- num_passes == 0 )
-                    break;
-
-#if qbytes > 2
-                /* shift buffer */
-                buffer = _mm_srli_si128 ( buffer, 2 );
-
-                /* bring in new byte */
-                if ( p < end )
-                    buffer = _mm_insert_epi16 ( buffer, expand_2na [ * p ], 7 );
-                
-                /* always increment source */
-                ++ p;
-#endif
-            }
-
-            /* want to reload buffer */
-            if ( src >= end )
-                break;
-
-            /* advance position */
-            pos += ( 8 - qbytes / 2 ) << 2;
-            if ( pos > stop )
-                break;
-
-            /* reload buffer */
-#if ENDLESS_BUFFER || qbytes == 2
-            buffer = prime_buffer_4na ( src, end );
-#elif qbytes == 16
-            assert ( 0 );
-#else
-            if ( p - src < 3 )
-                buffer = prime_buffer_4na ( src, end );
-            else for ( ; p - src < 8; ++ p )
-            {
-                buffer = _mm_srli_si128 ( buffer, 2 );
-                if ( p < end )
-                    buffer = _mm_insert_epi16 ( buffer, expand_2na [ * p ], 7 );
-            }
-#endif
-
-            /* adjust pointers */
-            src += 8;
-#if qbytes > 2
-            p = src;
-#endif
-        }
-    }
-
-#undef qbytes
-#undef _mm_cmpeq_epi
-#undef res_adj
-
-    return 0;
-}
-
-static
-int eval_4na_pos ( const NucStrFastaExpr *self,
-    const void *ncbi2na, unsigned int pos, unsigned int len )
-{
-#define positional 1
-#define qbytes 16
-#define _mm_cmpeq_epi( a, b ) \
-    _mm_cmpeq_epi32 ( a, b )
-#if NEVER_MATCH
-#define res_adj( res ) \
-    res = 0
-#else
-#define res_adj( res ) \
-    ( ( res ) = - ( ( ( res ) + 1 ) >> 16 ) )
-#endif
-
-    /* SSE registers */
-    nucreg_t buffer, ri, rj;
-    nucreg_t p0, p1, p2, p3, m0, m1, m2, m3;
-
-    /* result registers */
-    int ra, rb, rc, rd;
-
-    /* used for shifting buffer, testing exit */
-    unsigned int num_passes, stop;
-
-    /* used to hold entry position */
-#if positional
-    unsigned int start;
-#endif
-
-#if qbytes > 2
-    const uint8_t *p;
-#endif
-    const uint8_t *end, *src;
-    unsigned int qlen = self -> size;
-
-    /* this test is performed outside */
-    assert ( len >= qlen );
-
-    /* the effective length of the sequence,
-       including leading bases we'll ignore */
-    len += pos;
-
-    /* hold starting position */
-#if positional
-    start = pos;
-#endif
-
-    /* convert source pointer */
-    src = ( const uint8_t* ) ncbi2na + ( pos >> 2 );
-
-    /* stop testing when position passes this point */
-    stop = len - qlen;
-
-    /* the sequence end pointer */
-    end = ( const uint8_t* ) ncbi2na + ( ( len + 3 ) >> 2 );
-
-    /* prime the buffer */
-    buffer = prime_buffer_4na ( src, end );
-    src += 8;
-#if qbytes > 2
-    p = src;
-#endif
-
-    /* prime the registers */
-    prime_registers ( self );
-
-    /* enter the loop at an appropriate offset */
-    ra = rb = rc = 0;
-#if qbytes == 16
-    num_passes = ( stop - pos + 7 ) >> 2;
-#elif qbytes == 1
-#error "4na requires at least 2 qbytes"
-#else
-    num_passes = qbytes / 2;
-#endif
-
-    /* for reporting - give a buffer alignment */
-    ALIGN_4NA_HEADER ( buffer, pos & ~ 3, len );
-    switch ( pos & 3 )
-    {
-    default:
-
-        /* outer loop - performs whole buffer loads */
-        while ( 1 )
-        {
-            num_passes = qbytes / 2;
-
-            /* inner loop - shifts in one byte at a time */
-            while ( 1 )
-            {
-                /* for reporting - give a buffer alignment */
-                ALIGN_4NA_HEADER ( buffer, pos, len );
-
-                /* perform comparisons */
-    case 0:
-                ri = _mm_and_si128 ( buffer, p0 );
-                rj = _mm_and_si128 ( buffer, m0 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                ra = _mm_movemask_epi8 ( ri );
-                res_adj ( ra );
-                ALIGN_4NA_RESULT ( buffer, p0, m0, ri, ra );
-    case 1:
-                ri = _mm_and_si128 ( buffer, p1 );
-                rj = _mm_and_si128 ( buffer, m1 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                rb = _mm_movemask_epi8 ( ri );
-                res_adj ( rb );
-                ALIGN_4NA_RESULT ( buffer, p1, m1, ri, rb );
-    case 2:
-                ri = _mm_and_si128 ( buffer, p2 );
-                rj = _mm_and_si128 ( buffer, m2 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                rc = _mm_movemask_epi8 ( ri );
-                res_adj ( rc );
-                ALIGN_4NA_RESULT ( buffer, p2, m2, ri, rc );
-    case 3:
-                ri = _mm_and_si128 ( buffer, p3 );
-                rj = _mm_and_si128 ( buffer, m3 );
-                ri = _mm_cmpeq_epi ( ri, rj );
-                rd = _mm_movemask_epi8 ( ri );
-                res_adj ( rd );
-                ALIGN_4NA_RESULT ( buffer, p3, m3, ri, rd );
-
-                /* adjust pos */
-                pos &= ~ 3;
-
-                /* test for any promising results */
-                if ( ( ra | rb | rc | rd ) != 0 )
-                {
-#if positional
-                    switch ( stop - pos )
-                    {
-                    case 0:
-                        if ( ra != 0 ) return pos - start + 1;
-                        break;
-                    case 1:
-                        if ( ra != 0 ) return pos - start + 1;
-                        if ( rb != 0 ) return pos - start + 2;
-                        break;
-                    case 2:
-                        if ( ra != 0 ) return pos - start + 1;
-                        if ( rb != 0 ) return pos - start + 2;
-                        if ( rc != 0 ) return pos - start + 3;
-                        break;
-                    default:
-                        if ( ra != 0 ) return pos - start + 1;
-                        if ( rb != 0 ) return pos - start + 2;
-                        if ( rc != 0 ) return pos - start + 3;
-                        if ( rd != 0 ) return pos - start + 4;
-                    }
-                    return 0;
-#elif qbytes == 16
-                    switch ( stop - pos )
-                    {
-                    default:
-                        return 1;
-                    case 2:
-                        if ( rc != 0 ) return 1;
-                    case 1:
-                        if ( rb != 0 ) return 1;
-                    case 0:
-                        if ( ra != 0 ) return 1;
-                    }
-                    return 0;
-#else
-                    /* extract first non-zero bit from results
-                       where result is all zeros, bit will be -1 */
-                    int fa = uint16_lsbit ( ( uint16_t ) ra );
-                    int fb = uint16_lsbit ( ( uint16_t ) rb );
-                    int fc = uint16_lsbit ( ( uint16_t ) rc );
-                    int fd = uint16_lsbit ( ( uint16_t ) rd );
-
-                    /* convert bit number into number of bases
-                       from current position. undefined where
-                       bit is negative, but unimportant also */
-                    fa = ( fa << 1 ) + 0;
-                    fb = ( fb << 1 ) + 1;
-                    fc = ( fc << 1 ) + 2;
-                    fd = ( fd << 1 ) + 3;
-
-                    /* test for any case where result was non-zero
-                       and the resultant base index is within range */
-                    if ( ra != 0 && pos + fa <= stop ) return 1;
-                    if ( rb != 0 && pos + fb <= stop ) return 1;
-                    if ( rc != 0 && pos + fc <= stop ) return 1;
-                    if ( rd != 0 && pos + fd <= stop ) return 1;
-#endif
-                }
-
-                /* advance pos */
-                pos += 4;
-
-                /* if no further comparisons are possible */
-                if ( pos > stop )
-                    return 0;
-
-                /* if all shifting passes are complete */
-                if ( -- num_passes == 0 )
-                    break;
-
-#if qbytes > 2
-                /* shift buffer */
-                buffer = _mm_srli_si128 ( buffer, 2 );
-
-                /* bring in new byte */
-                if ( p < end )
-                    buffer = _mm_insert_epi16 ( buffer, expand_2na [ * p ], 7 );
-                
-                /* always increment source */
-                ++ p;
-#endif
-            }
-
-            /* want to reload buffer */
-            if ( src >= end )
-                break;
-
-            /* advance position */
-            pos += ( 8 - qbytes / 2 ) << 2;
-            if ( pos > stop )
-                break;
-
-            /* reload buffer */
-#if ENDLESS_BUFFER || qbytes == 2
-            buffer = prime_buffer_4na ( src, end );
-#elif qbytes == 16
-            assert ( 0 );
-#else
-            if ( p - src < 3 )
-                buffer = prime_buffer_4na ( src, end );
-            else for ( ; p - src < 8; ++ p )
-            {
-                buffer = _mm_srli_si128 ( buffer, 2 );
-                if ( p < end )
-                    buffer = _mm_insert_epi16 ( buffer, expand_2na [ * p ], 7 );
-            }
-#endif
-
-            /* adjust pointers */
-            src += 8;
-#if qbytes > 2
-            p = src;
-#endif
-        }
-    }
-
-#undef positional
-#undef qbytes
-#undef _mm_cmpeq_epi
-#undef res_adj
-
-    return 0;
-}
-
-
-/* NucStrstrSearch
- *  search buffer from starting position
- *
- *  "ncbi2na" [ IN ] - pointer to 2na data
- *
- *  "pos" [ IN ] - starting base position for search,
- *  relative to "ncbi2na". may be >= 4.
- *
- *  "len" [ IN ] - the number of bases to include in
- *  the search, relative to "pos".
- *
- *  return values:
- *    ! 0 if the pattern was found
- */
-LIB_EXPORT int CC NucStrstrSearch ( const NucStrstr *self,
-    const void *ncbi2na, unsigned int pos, unsigned int len , unsigned int * selflen )
-{
-    if ( self != NULL && ncbi2na != NULL && len != 0 )
-    {
-        int found;
-        unsigned int fasta_len;
-
-        switch ( self -> fasta . type )
-        {
-        case type_2na_64:
-            if ( len < self -> fasta . size ) return 0;
-	    if(selflen) *selflen=self -> fasta . size;
-            return eval_2na_64 ( & self -> fasta, ncbi2na, pos, len );
-        case type_4na_64:
-            if ( len < self -> fasta . size ) return 0;
-	    if(selflen) *selflen=self -> fasta . size;
-            return eval_4na_64 ( & self -> fasta, ncbi2na, pos, len );
-        case type_2na_8:
-            if ( len < self -> fasta . size ) return 0;
-	    if(selflen) *selflen=self -> fasta . size;
-            return eval_2na_8 ( & self -> fasta, ncbi2na, pos, len );
-        case type_2na_16:
-            if ( len < self -> fasta . size ) return 0;
-	    if(selflen) *selflen=self -> fasta . size;
-            return eval_2na_16 ( & self -> fasta, ncbi2na, pos, len );
-        case type_2na_32:
-            if ( len < self -> fasta . size ) return 0;
-	    if(selflen) *selflen=self -> fasta . size;
-            return eval_2na_32 ( & self -> fasta, ncbi2na, pos, len );
-        case type_2na_128:
-            if ( len < self -> fasta . size ) return 0;
-	    if(selflen) *selflen=self -> fasta . size;
-            return eval_2na_128 ( & self -> fasta, ncbi2na, pos, len );
-        case type_4na_16:
-            if ( len < self -> fasta . size ) return 0;
-	    if(selflen) *selflen=self -> fasta . size;
-            return eval_4na_16 ( & self -> fasta, ncbi2na, pos, len );
-        case type_4na_32:
-            if ( len < self -> fasta . size ) return 0;
-	    if(selflen) *selflen=self -> fasta . size;
-            return eval_4na_32 ( & self -> fasta, ncbi2na, pos, len );
-        case type_4na_128:
-            if ( len < self -> fasta . size ) return 0;
-	    if(selflen) *selflen=self -> fasta . size;
-            return eval_4na_128 ( & self -> fasta, ncbi2na, pos, len );
-        case type_2na_pos:
-            if ( len < self -> fasta . size ) return 0;
-	    if(selflen) *selflen=self -> fasta . size;
-            return eval_2na_pos ( & self -> fasta, ncbi2na, pos, len );
-        case type_4na_pos:
-            if ( len < self -> fasta . size ) return 0;
-	    if(selflen) *selflen=self -> fasta . size;
-            return eval_4na_pos ( & self -> fasta, ncbi2na, pos, len );
-        case type_OP:
-            found = NucStrstrSearch ( self -> boolean . left, ncbi2na, pos, len, selflen);
-            switch ( self -> boolean . op )
-            {
-            case op_OR:
-                if ( found != 0 )
-                    return found;
-                break;
-            case op_AND:
-                if ( found == 0 )
-                    return found;
-                break;
-            }
-            return NucStrstrSearch ( self -> boolean . right, ncbi2na, pos, len, selflen);
-        case type_EXPR:
-            switch ( self -> sub . op )
-            {
-            case 0:
-            case op_NOT:
-                found = NucStrstrSearch ( self -> sub . expr, ncbi2na, pos, len, selflen);
-                if ( self -> sub . op == 0 )
-                    return found;
-                if ( found == 0 )
-                    return 1;
-                break;
-            case op_HEAD:
-                fasta_len = self -> sub . expr -> fasta . size;
-                if ( fasta_len > len )
-                    return 0;
-                return NucStrstrSearch ( self -> sub . expr, ncbi2na, pos, fasta_len, selflen );
-            case op_TAIL:
-                fasta_len = self -> sub . expr -> fasta . size;
-                if ( fasta_len > len )
-                    return 0;
-                found = NucStrstrSearch ( self -> sub . expr, ncbi2na,
-                    pos + len - fasta_len, fasta_len, selflen );
-                if ( found != 0 )
-                    found += pos + len - fasta_len;
-                return found;
-            }
-            break;
-        }
-    }
-    return 0;
-}
diff --git a/libs/search/search-priv.h b/libs/search/search-priv.h
deleted file mode 100644
index 49f042f..0000000
--- a/libs/search/search-priv.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_search_priv_
-#define _h_search_priv_
-
-#include <search/grep.h>
-#include <klib/rc.h>
-#include <os-native.h>
-#include <compiler.h>
-#include <insdc/insdc.h>
-
-#include <stdlib.h>
-#include <string.h>
-
-#include <arch-impl.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct FgrepDumbParams FgrepDumbParams;
-typedef struct FgrepBoyerParams FgrepBoyerParams;
-typedef struct FgrepAhoParams FgrepAhoParams;
-typedef struct AgrepWuParams AgrepWuParams;
-typedef struct DPParams DPParams;
-typedef struct MyersSearch MyersSearch;
-typedef struct MyersUnlimitedSearch MyersUnlimitedSearch;
-
-void FgrepDumbSearchMake(FgrepDumbParams **self, const char *strings[], uint32_t numstrings);
-void FgrepDumbSearchFree(FgrepDumbParams *self);
-
-void FgrepBoyerSearchMake(FgrepBoyerParams **self, const char *strings[], uint32_t numstrings);
-void FgrepBoyerSearchFree(FgrepBoyerParams *self);
-
-void FgrepAhoMake(FgrepAhoParams **self, const char *strings[], uint32_t numstrings);
-void FgrepAhoFree(FgrepAhoParams *self);
-
-uint32_t FgrepDumbFindFirst(FgrepDumbParams *self, const char *buf, size_t len, FgrepMatch *match);
-uint32_t FgrepBoyerFindFirst( FgrepBoyerParams *self, const char *buf, size_t len, FgrepMatch *match);
-uint32_t FgrepAhoFindFirst( FgrepAhoParams *self, const char *buf, size_t len, FgrepMatch *match);
-
-void AgrepWuFree(AgrepWuParams *self);
-void MyersUnlimitedFree(MyersUnlimitedSearch *self);
-void AgrepDPFree(DPParams *self);
-void AgrepMyersFree(MyersSearch *self);
-
-uint32_t MyersUnlimitedFindFirst(MyersUnlimitedSearch *self, int32_t threshold, const char* text, size_t n, AgrepMatch *match);
-uint32_t MyersFindFirst(MyersSearch *self, int32_t threshold, 
-                   const char* text, size_t n,
-                       AgrepMatch *match);
-uint32_t AgrepWuFindFirst(const AgrepWuParams *self, int32_t threshold, const char *buf, int32_t buflen, AgrepMatch *match);
-uint32_t AgrepDPFindFirst(const DPParams *self, int32_t threshold, AgrepFlags mode, const char *buf, int32_t buflen, AgrepMatch *match);
-
-void AgrepDPFindAll(const AgrepCallArgs *args);
-void MyersFindAll(const AgrepCallArgs *args);
-void MyersUnlimitedFindAll(const AgrepCallArgs *args);
-void AgrepWuFindAll(const AgrepCallArgs *args);
-int32_t FgrepAhoFindAll(FgrepAhoParams *self, char *buf, int32_t len, int32_t *whichpattern);
-void FgrepBoyerFindAll(FgrepBoyerParams *self, char *buf, int32_t len, FgrepMatchCallback cb, void *cbinfo);
-void FgrepDumbFindAll(FgrepDumbParams *self, char *buf, int32_t len, 
-                      FgrepMatchCallback cb, void *cbinfo);
-
-
-rc_t AgrepDPMake(DPParams **self, AgrepFlags mode, const char *pattern);
-rc_t AgrepMyersMake(MyersSearch **self, AgrepFlags mode, const char *pattern);
-rc_t MyersUnlimitedMake(MyersUnlimitedSearch **self, AgrepFlags mode, const char *pattern);
-rc_t AgrepWuMake(AgrepWuParams **self, AgrepFlags mode, const char *pattern);
-
-
-struct Fgrep {
-    struct FgrepDumbParams *dumb;
-    struct FgrepBoyerParams *boyer;
-    struct FgrepAhoParams *aho;
-    FgrepFlags mode;
-};
-
-typedef struct Fgrep FgrepParams;
-
-/* 
-We actually need to have multiple (non-union) for Myers and DP parameters,
-since the myers code uses the DP parameters.
-Some of the others could be unioned.
-*/
-struct Agrep
-{
-    struct AgrepWuParams *wu;
-    struct MyersSearch *myers;
-    struct MyersUnlimitedSearch *myersunltd;
-    struct DPParams *dp;
-    AgrepFlags mode;
-};
-
-typedef struct Agrep AgrepParams;
-
-extern const unsigned char* IUPAC_decode[256];
-rc_t na4_set_bits(const AgrepFlags mode, uint64_t* arr, const unsigned char c, const uint64_t val);
-void set_bits_2na(uint64_t* arr, unsigned char c, uint64_t val);
-
-/* Internal definitions */
-
-rc_t CC dp_end_callback( const void *cbinfo, const AgrepMatch *match, AgrepContinueFlag *flag );
-
-static __inline__
-char *create_substring ( const char *src, uint32_t sz )
-{
-    char *ret = (char*)malloc( sz + 1 );
-    strncpy ( ret, src, sz );
-    ret [ sz ] = 0;
-    return ret;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_search_priv_ */
diff --git a/libs/search/search.c b/libs/search/search.c
deleted file mode 100644
index 394c96d..0000000
--- a/libs/search/search.c
+++ /dev/null
@@ -1,388 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <search/extern.h>
-#include <sysalloc.h>
-#include "search-priv.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-const unsigned char * IUPAC_decode [ 256 ];
-
-static
-void IUPAC_init ( void )
-{
-    static bool initialized;
-    if ( ! initialized )
-    {
-        const char ** t = ( const char** ) IUPAC_decode;
-
-        t['A'] = t['a'] = "Aa";
-        t['C'] = t['c'] = "Cc";
-        t['G'] = t['g'] = "Gg";
-        t['T'] = t['t'] = "Tt";
-        t['U'] = t['u'] = "Uu";
-        t['M'] = t['m'] = "AaCc";
-        t['R'] = t['r'] = "AaGg";
-        t['S'] = t['s'] = "CcGg";
-        t['V'] = t['v'] = "AaCcGg";
-        t['W'] = t['w'] = "AaTtUu";
-        t['Y'] = t['y'] = "CcTtUu";
-        t['K'] = t['k'] = "GgTtUu";
-        t['B'] = t['b'] = "CcGgTtUu";
-        t['D'] = t['d'] = "AaGgTtUu";
-        t['H'] = t['h'] = "AaCcTtUu";
-        t['N'] = t['n'] = t [ '.' ] = "AaCcGgTtUuNn.-";
-        initialized = true;
-    }
-}
-
-void set_bits_2na(uint64_t* arr, unsigned char c, uint64_t val)
-{
-    unsigned char const* tr;
-    for (tr = IUPAC_decode[c]; *tr != '\0'; ++tr)
-    {
-        switch(*tr)
-        {
-        case 'A':
-            arr[0] |= val;
-            break;
-        case 'C':
-            arr[1] |= val;
-            break;
-        case 'G':
-            arr[2] |= val;
-            break;
-        case 'T':
-        /*case 'U':*/
-            arr[3] |= val;
-            break;
-        /*case 'N':
-            arr[4] |= val;
-            break;*/
-        }
-    }
-}
-
-rc_t na4_set_bits(const AgrepFlags mode, uint64_t* arr, const unsigned char c, const uint64_t val)
-{
-    if( mode & AGREP_PATTERN_4NA ) {
-        const unsigned char* tr;
-        tr = IUPAC_decode[c];
-        if( tr == NULL ) {
-            if( (mode & AGREP_ANYTHING_ELSE_IS_N) && (c == '.' || c == '-') ) {
-                tr = IUPAC_decode['N'];
-            }
-            if( tr == NULL ) {
-                return RC(rcText, rcString, rcSearching, rcConstraint, rcOutofrange);
-            }
-        }
-        while( *tr != '\0' ) {
-            if( mode & AGREP_TEXT_EXPANDED_2NA ) {
-                switch(*tr) {
-                    case 'A':
-                        arr[0] |= val;
-                        break;
-                    case 'C':
-                        arr[1] |= val;
-                        break;
-                    case 'G':
-                        arr[2] |= val;
-                        break;
-                    case 'T':
-                    case 'U':
-                        arr[3] |= val;
-                        break;
-                    case 'N':
-                        arr[4] |= val;
-                        break;
-                }
-            }
-            arr[*tr++] |= val;
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT void CC FgrepFree( FgrepParams *self )
-{
-    if (self->dumb != NULL)
-        FgrepDumbSearchFree(self->dumb);
-    if (self->boyer != NULL)
-        FgrepBoyerSearchFree(self->boyer);
-    if (self->aho != NULL)
-        FgrepAhoFree(self->aho);
-    free(self);
-}
-
-
-LIB_EXPORT rc_t CC FgrepMake( FgrepParams **self, FgrepFlags mode, const char *strings[], uint32_t numstrings )
-{
-    *self = malloc(sizeof(FgrepParams));
-    memset(*self, 0, sizeof(FgrepParams));
-    (*self)->mode = mode;
-    if (mode & FGREP_ALG_DUMB) {
-        FgrepDumbSearchMake(&(*self)->dumb, strings, numstrings);
-    }
-    if (mode & FGREP_ALG_BOYERMOORE) {
-        FgrepBoyerSearchMake(&(*self)->boyer, strings, numstrings);
-    }
-    if (mode & FGREP_ALG_AHOCORASICK) {
-        FgrepAhoMake(&(*self)->aho, strings, numstrings);
-    }
-    return 0;
-}
-
-LIB_EXPORT uint32_t CC FgrepFindFirst( const FgrepParams *self, const char *buf, size_t len, FgrepMatch *match )
-{
-    if (self->mode & FGREP_ALG_DUMB) {
-        return FgrepDumbFindFirst(self->dumb, buf, len, match);
-    }
-    if (self->mode & FGREP_ALG_BOYERMOORE) {
-        return FgrepBoyerFindFirst(self->boyer, buf, len, match);
-    }
-    if (self->mode & FGREP_ALG_AHOCORASICK) {
-        return FgrepAhoFindFirst(self->aho, buf, len, match);
-    }
-    /* Should maybe return error code, not 1/0 */
-    return 0;
-}
-
-LIB_EXPORT rc_t CC AgrepMake( AgrepParams **self, AgrepFlags mode, const char *pattern )
-{
-    rc_t rc = 0;
-
-    if( self == NULL || pattern == NULL ) {
-        rc = RC(rcText, rcString, rcSearching, rcParam, rcNull);
-    } else if( (*self = malloc(sizeof(AgrepParams))) == NULL ) {
-        rc = RC(rcText, rcString, rcSearching, rcMemory, rcExhausted);
-    } else {
-        memset((*self), 0, sizeof(**self));
-        (*self)->mode = mode;
-        if( mode & AGREP_PATTERN_4NA ) {
-            size_t i, l = strlen(pattern);
-            IUPAC_init();
-            if( l == 0 ) {
-                rc = RC(rcText, rcString, rcSearching, rcParam, rcOutofrange);
-            }
-            for(i = 0; rc == 0 && i < l; i++) {
-                if( IUPAC_decode[(signed char)(pattern[i])] == NULL ) {
-                    rc = RC(rcText, rcString, rcSearching, rcParam, rcOutofrange);
-                }
-            }
-        } else if( !(mode & AGREP_MODE_ASCII) ) {
-            rc = RC(rcText, rcString, rcSearching, rcParam, rcUnsupported);
-        }
-        if( rc == 0 ) {
-            IUPAC_init(); /* TODO: this is temporary solution */
-            if(mode & AGREP_ALG_WUMANBER) {
-                if( (rc = AgrepWuMake(&(*self)->wu, mode, pattern)) == 0 ) {
-                    rc = AgrepDPMake(&(*self)->dp, mode, pattern);
-                }
-            } else if(mode & AGREP_ALG_MYERS) {
-                if( (rc = AgrepMyersMake(&(*self)->myers, mode, pattern)) == 0 ) {
-                    /*TODO: now agrep is being used without DP, so we need to turn off AgrepDPMake here*/
-                    rc = AgrepDPMake(&(*self)->dp, mode, pattern);
-                }
-            } else if(mode & AGREP_ALG_MYERS_UNLTD) {
-                if( (rc = MyersUnlimitedMake(&(*self)->myersunltd, mode, pattern)) == 0 ) {
-                    rc = AgrepDPMake(&(*self)->dp, mode, pattern);
-                }
-            } else if(mode & AGREP_ALG_DP) {
-                rc = AgrepDPMake(&(*self)->dp, mode, pattern);
-            } else {
-                rc = RC(rcText, rcString, rcSearching, rcParam, rcInvalid);
-            }
-        }
-    }
-    if( rc != 0 ) {
-        AgrepWhack(*self);
-    }
-    return rc;
-}
-
-LIB_EXPORT void CC AgrepWhack( AgrepParams *self )
-{
-    if( self != NULL ) {
-        if( self->wu ) {
-            AgrepWuFree(self->wu);
-        }
-        if( self->myers ) {
-            AgrepMyersFree(self->myers);
-        }
-        if( self->myersunltd ) {
-            MyersUnlimitedFree(self->myersunltd);
-        }
-        if( self->dp ) {
-            AgrepDPFree(self->dp);
-        }
-        free(self);
-    }
-}
-
-LIB_EXPORT void CC AgrepFindAll( const AgrepCallArgs *args )
-{
-    if( args != NULL ) {
-        const AgrepParams *self = args->self;
-
-        if(self->mode & AGREP_ALG_WUMANBER) {
-            AgrepWuFindAll(args);
-        } else if(self->mode & AGREP_ALG_MYERS) {
-            MyersFindAll(args);
-        } else if(self->mode & AGREP_ALG_MYERS_UNLTD) {
-            MyersUnlimitedFindAll(args);
-        } else if (self->mode & AGREP_ALG_DP) {
-            AgrepDPFindAll(args);
-        }
-    }
-}
-
-LIB_EXPORT uint32_t CC AgrepFindFirst( const AgrepParams *self, int32_t threshold, const char *buf, size_t len, AgrepMatch *match )
-{
-    if( self != NULL && buf != NULL && match != NULL ) {
-        if (self->mode & AGREP_ALG_WUMANBER) {
-            return AgrepWuFindFirst(self->wu, threshold, buf, (int32_t)len, match);
-        }
-        if (self->mode & AGREP_ALG_MYERS) {
-            return MyersFindFirst(self->myers, threshold, buf, len, match);
-        }
-        if (self->mode & AGREP_ALG_MYERS_UNLTD) {
-            return MyersUnlimitedFindFirst(self->myersunltd, threshold, buf, len, match);
-        }
-        if (self->mode & AGREP_ALG_DP) {
-            return AgrepDPFindFirst(self->dp, threshold, self->mode, buf, (int32_t)len, match);
-        }
-    }
-    /* Not sure this is the right thing to return. */
-    return 0;
-}
-
-static 
-rc_t CC AgrepFindBestCallback(const void *cbinfo, const AgrepMatch *matchinfo, AgrepContinueFlag *flag)
-{
-    AgrepMatch *best = (AgrepMatch *)cbinfo;
-    if (best->score == -1 || best->score > matchinfo->score) {
-        *best = *matchinfo;
-    }
-    return 0;
-}
-
-LIB_EXPORT uint32_t CC AgrepFindBest( const AgrepParams *self, int32_t threshold, const char *buf, int32_t len, AgrepMatch *match )
-{
-    if( self != NULL && buf != NULL && match != NULL ) {
-        AgrepCallArgs args;
-
-        args.self = self;
-        args.threshold = threshold;
-        args.buf = buf;
-        args.buflen = len;
-        args.cb = AgrepFindBestCallback;
-        args.cbinfo = match;
-
-        match->score = -1;
-        
-        AgrepFindAll(&args);
-        if (match->score != -1) {
-            return 1;
-        }
-    }
-    return 0;
-}
-
-
-LIB_EXPORT size_t CC FindLongestCommonSubstring(char const* pS1, char const* pS2, size_t const nLen1, size_t const nLen2, size_t* pRetStart1, size_t* pRetStart2)
-{
-/*
-    return: the length of the substring found
-    pRetStart1: ptr to return value - starting position on the substring found in the pS1, NULL is OK
-    pRetStart2: ptr to return value - starting position on the substring found in the pS2, NULL is OK
-
-    WARNING: the memory usage is optimized to store only one row (not column) of DP matrix
-    and there is hardcoded limit for the number of columns
-    so it's recommended to pass the shortest string as pS2 parameter.
-    Intended usage: pS1 - text (read), pS2 - pattern (linker, bar-code)
-
-    TODO: use suffix arrays + LCP to achieve O(n) complexity (n = nLen1 + nLen2)
-*/
-
-    size_t dpPrevRow[64]; /* this is row #(iRow-1) of DP matrix on each step of iRow-loop below*/
-
-    size_t dpCurNewCell;  /* this is cell (iRow, iCol) of DP matrix on each step inside iCol-loop below */
-    size_t dpPrevNewCell; /* this is cell (iRow, iCol-1) of DP matrix on each step inside iCol-loop below*/
-    size_t iRow, iCol;
-    size_t start_placeholder;
-    size_t nMaxLen = 0;
-
-    dpPrevNewCell = 0;
-    dpCurNewCell = 0;
-
-    assert(sizeof(dpPrevRow)/sizeof(dpPrevRow[0]) >= nLen2);
-
-    /* allow NULLs in pRetStart1 or pRetStart2 */
-    if (!pRetStart1)
-        pRetStart1 = &start_placeholder;
-    if (!pRetStart2)
-        pRetStart2 = &start_placeholder;
-
-    *pRetStart1 = *pRetStart2 = 0;
-
-    for (iRow = 0; iRow < nLen1; ++iRow)
-    {
-        for (iCol = 0; iCol < nLen2; ++iCol)
-        {
-            if (pS1[iRow] == pS2[iCol])
-            {
-                if (iRow == 0 || iCol == 0)
-                {
-                    dpPrevRow[iCol] = 1;
-                    dpCurNewCell = 1;
-                }
-                else
-                    dpCurNewCell = dpPrevRow[iCol - 1] + 1;
-
-                if (dpCurNewCell > nMaxLen)
-                {
-                    nMaxLen = dpCurNewCell;
-                    *pRetStart1 = iRow; /* now it's actually end. It's to be corrected before return */
-                    *pRetStart2 = iCol; /* now it's actually end. It's to be corrected before return */
-                }
-            }
-            else
-            {
-                dpCurNewCell = 0;
-            }
-
-            if (iCol > 0)
-                dpPrevRow[iCol - 1] = dpPrevNewCell;
-            dpPrevNewCell = dpCurNewCell;
-        }
-        dpPrevRow[iCol - 1] = dpCurNewCell;
-    }
-    *pRetStart1 = *pRetStart1 - nMaxLen + 1;
-    *pRetStart2 = *pRetStart2 - nMaxLen + 1;
-    return nMaxLen;
-}
diff --git a/libs/search/sw-search.c b/libs/search/sw-search.c
deleted file mode 100644
index 68ab731..0000000
--- a/libs/search/sw-search.c
+++ /dev/null
@@ -1,1496 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <search/ref-variation.h>
-#include <search/smith-waterman.h>
-
-#include <klib/rc.h>
-#include <klib/refcount.h>
-#include <klib/text.h>
-
-#include <insdc/insdc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#if WINDOWS
-#include <intrin.h>
-#ifndef __builtin_popcount
-#define __builtin_popcount __popcnt
-#endif
-#endif
-
-#include <sysalloc.h>
-
-#ifndef min
-#define min(x,y) ((y) < (x) ? (y) : (x))
-#endif
-
-#ifndef max
-#define max(x,y) ((y) >= (x) ? (y) : (x))
-#endif
-
-#define max4(x1, x2, x3, x4) (max( max((x1),(x2)), max((x3),(x4)) ))
-
-#define COMPARE_4NA 0
-#define CACHE_MAX_ROWS 0 /* and columns as well */
-#define GAP_SCORE_LINEAR 0
-#define SIMILARITY_MATCH 2
-#define SIMILARITY_MISMATCH -1
-#define SW_DEBUG_PRINT 0
-
-struct RefVariation
-{
-    KRefcount refcount;
-
-    INSDC_dna_text* var_buffer; /* in the case of deletion
-        it contains <ref_base_before><allele><ref_base_after>
-        otherwise it contains allele only */
-    INSDC_dna_text const* allele; /* points to allele in the var_buffer */
-    size_t allele_start;
-    size_t var_buffer_size;
-    size_t allele_size;
-    size_t allele_len_on_ref;
-};
-
-
-#if COMPARE_4NA == 1
-
-unsigned char const map_char_to_4na [256] =
-{
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 1,14, 2,13, 0, 0, 4,11, 0, 0,12, 0, 3,15, 0,
-    0, 0, 5, 6, 8, 0, 7, 9, 0,10, 0, 0, 0, 0, 0, 0,
-    0, 1,14, 2,13, 0, 0, 4,11, 0, 0,12, 0, 3,15, 0,
-    0, 0, 5, 6, 8, 0, 7, 9, 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
-};
-
-static int compare_4na ( INSDC_dna_text ch2na, INSDC_dna_text ch4na )
-{
-    unsigned char bits4na = map_char_to_4na [(unsigned char)ch4na];
-    unsigned char bits2na = map_char_to_4na [(unsigned char)ch2na];
-
-    /*return (bits2na & bits4na) != 0 ? 2 : -1;*/
-
-    unsigned char popcnt4na = (unsigned char) __builtin_popcount ( bits4na );
-
-    return (bits2na & bits4na) != 0 ? 12 / popcnt4na : -6;
-}
-#endif
-
-static int similarity_func (INSDC_dna_text ch2na, INSDC_dna_text ch4na)
-{
-#if COMPARE_4NA == 1
-    return compare_4na ( ch2na, ch4na );
-#else
-    return tolower(ch2na) == tolower(ch4na) ? SIMILARITY_MATCH : SIMILARITY_MISMATCH;
-#endif
-}
-
-static int gap_score_const ( size_t idx )
-{
-    return -1;
-}
-
-static int gap_score_linear ( size_t idx )
-{
-#if COMPARE_4NA == 1
-    return -6*(int)idx;
-#else
-    return -(int)idx;
-#endif
-}
-
-static int (*gap_score_func) (size_t ) =
-#if GAP_SCORE_LINEAR != 0
-    gap_score_linear
-#else
-    gap_score_const
-#endif
-; 
-
-typedef struct ValueIndexPair
-{
-    size_t index;
-    int value;
-} ValueIndexPair;
-
-
-static char get_char (INSDC_dna_text const* str, size_t size, size_t pos, bool reverse)
-{
-    if ( !reverse )
-        return str [pos];
-    else
-        return str [size - pos - 1];
-}
-
-rc_t calculate_similarity_matrix (
-    INSDC_dna_text const* text, size_t size_text,
-    INSDC_dna_text const* query, size_t size_query,
-    bool gap_score_constant,
-    int* matrix, bool reverse, 
-    int* max_score, size_t* max_row, size_t* max_col )
-{
-
-    size_t ROWS = size_text + 1;
-    size_t COLUMNS = size_query + 1;
-    size_t i, j;
-
-    /* arrays to store maximums for all previous rows and columns */
-#if CACHE_MAX_ROWS != 0
-
-    ValueIndexPair* vec_max_cols = NULL;
-    ValueIndexPair* vec_max_rows = NULL;
-
-    vec_max_cols = calloc ( COLUMNS, sizeof vec_max_cols [ 0 ] );
-    if ( vec_max_cols == NULL)
-        return RC(rcText, rcString, rcSearching, rcMemory, rcExhausted);
-
-    vec_max_rows = calloc ( ROWS, sizeof vec_max_rows [ 0 ] );
-    if ( vec_max_rows == NULL)
-    {
-        free (vec_max_cols);
-        return RC(rcText, rcString, rcSearching, rcMemory, rcExhausted);
-    }
-
-#endif
-    gap_score_func = gap_score_constant ? gap_score_const : gap_score_linear;
-
-    if ( max_score != NULL )
-    {
-        *max_score = 0;
-    }
-    if ( max_row != NULL )
-    {
-        *max_row = 0;
-    }
-    if ( max_col != NULL )
-    {
-        *max_col = 0;
-    }
-    // init 1st row and column with zeros
-    memset ( matrix, 0, COLUMNS * sizeof(matrix[0]) );
-    for ( i = 1; i < ROWS; ++i )
-        matrix [i * COLUMNS] = 0;
-
-    for ( i = 1; i < ROWS; ++i )
-    {
-        for ( j = 1; j < COLUMNS; ++j )
-        {
-#if CACHE_MAX_ROWS == 0
-            size_t k, l;
-#endif
-            int cur_score_del, cur_score_ins;
-            int sim = similarity_func (
-                            get_char (text, size_text, i-1, reverse),
-                            get_char (query, size_query, j-1, reverse) );
-
-#if CACHE_MAX_ROWS != 0
-            /* TODO: incorrect logic: we cache max{matrix[x,y]}
-                instead of max{matrix[x,y] + gap_score_func(v)}
-                when it's fixed we probably will need to make adjustments here
-            */
-            cur_score_del = vec_max_cols[j].value + gap_score_func(j - vec_max_cols[j].index);
-#else
-            cur_score_del = -1;
-            for ( k = 1; k < i; ++k )
-            {
-                int cur = matrix [ (i - k)*COLUMNS + j ] + gap_score_func(k);
-                if ( cur > cur_score_del )
-                    cur_score_del = cur;
-            }
-#endif
-
-#if CACHE_MAX_ROWS != 0
-            /* TODO: incorrect logic: we cache max{matrix[x,y]}
-                instead of max{matrix[x,y] + gap_score_func(v)}
-                when it's fixed we probably will need to make adjustments here
-            */
-            cur_score_ins = vec_max_rows[i].value + gap_score_func(i - vec_max_rows[i].index);;
-#else
-            
-            cur_score_ins = -1;
-            for ( l = 1; l < j; ++l )
-            {
-                int cur = matrix [ i*COLUMNS + (j - l) ] + gap_score_func(l);
-                if ( cur > cur_score_ins )
-                    cur_score_ins = cur;
-            }
-#endif
-            {
-                int score = max4 ( 0,
-                                   matrix[(i-1)*COLUMNS + j - 1] + sim,
-                                   cur_score_del,
-                                   cur_score_ins);
-                matrix[i*COLUMNS + j] = score;
-                if ( max_score != NULL && score > *max_score )
-                {
-                    *max_score = score;
-                    if ( max_row != NULL )
-                    {
-                        *max_row = i;
-                    }
-                    if ( max_col != NULL )
-                    {
-                        *max_col = j;
-                    }
-                }
-            }
-
-#if CACHE_MAX_ROWS != 0
-            /* TODO: incorrect logic: we cache max{matrix[x,y]}
-                instead of max{matrix[x,y] + gap_score_func(v)}
-            */
-            if ( matrix[i*COLUMNS + j] > vec_max_cols[j].value )
-            {
-                vec_max_cols[j].value = matrix[i*COLUMNS + j];
-                vec_max_cols[j].index = j;
-            }
-#if GAP_SCORE_LINEAR != 0
-            vec_max_cols[j].value += gap_score_func(1);
-#endif
-
-#endif
-#if CACHE_MAX_ROWS != 0
-            /* TODO: incorrect logic: we cache max{matrix[x,y]}
-                instead of max{matrix[x,y] + gap_score_func(v)}
-            */
-            if ( matrix[i*COLUMNS + j] > vec_max_rows[i].value )
-            {
-                vec_max_rows[i].value = matrix[i*COLUMNS + j];
-                vec_max_rows[i].index = i;
-            }
-#if GAP_SCORE_LINEAR != 0
-            vec_max_rows[i].value += gap_score_func(1);
-#endif
-
-#endif
-        }
-    }
-
-#if CACHE_MAX_ROWS != 0
-    free (vec_max_cols);
-    free (vec_max_rows);
-#endif
-
-    return 0;
-}
-
-void 
-sw_find_indel_box ( int* matrix, size_t ROWS, size_t COLUMNS,
-    int* ret_row_start, int* ret_row_end,
-    int* ret_col_start, int* ret_col_end )
-{
-    size_t max_row = 0, max_col = 0;
-    size_t max_i = ROWS*COLUMNS - 1;
-
-    size_t i = max_i, j;
-    int prev_indel = 0;
-    
-    max_row = max_i / COLUMNS;
-    max_col = max_i % COLUMNS;
-
-    *ret_row_start = *ret_row_end = *ret_col_start = *ret_col_end = -1;
-
-    i = max_row;
-    j = max_col;
-
-    /* traceback to (0,0)-th element of the matrix */
-    while (1)
-    {
-        if (i > 0 && j > 0)
-        {
-            /* TODO: ? strong '>' - because we want to prefer indels over matches/mismatches here
-            (expand the window of ambiguity as much as possible)*/
-            if ( matrix [(i - 1)*COLUMNS + (j - 1)] >= matrix [i*COLUMNS + (j - 1)] &&
-                matrix [(i - 1)*COLUMNS + (j - 1)] >= matrix [(i - 1)*COLUMNS + j])
-            {
-                int diag_diff = matrix [i*COLUMNS + j] - matrix [(i - 1)*COLUMNS + (j - 1)];
-                int mismatch = diag_diff == SIMILARITY_MATCH ? 0 : 1;
-
-                if (mismatch && *ret_row_end == -1 )
-                {
-                    *ret_row_end = (int)i;
-                    *ret_col_end = (int)j;
-                }
-
-                --i;
-                --j;
-
-                if (prev_indel || mismatch)
-                {
-                    *ret_row_start = (int)i;
-                    *ret_col_start = (int)j;
-                }
-
-                prev_indel = 0;
-            }
-            else if ( matrix [(i - 1)*COLUMNS + (j - 1)] < matrix [i*COLUMNS + (j - 1)] )
-            {
-                if ( *ret_row_end == -1 )
-                {
-                    *ret_row_end = (int)i;
-                    *ret_col_end = (int)j;
-                }
-                --j;
-                prev_indel = 1;
-            }
-            else
-            {
-                if ( *ret_row_end == -1 )
-                {
-                    *ret_row_end = (int)i;
-                    *ret_col_end = (int)j;
-                }
-                --i;
-                prev_indel = 1;
-            }
-        }
-        else if ( i > 0 )
-        {
-            if ( *ret_row_end == -1 )
-            {
-                *ret_row_end = (int)i;
-                *ret_col_end = 0;
-            }
-            *ret_row_start = 0;
-            *ret_col_start = 0;
-            break;
-        }
-        else if ( j > 0 )
-        {
-            if ( *ret_row_end == -1 )
-            {
-                *ret_row_end = 0;
-                *ret_col_end = (int)j;
-            }
-            *ret_row_start = 0;
-            *ret_col_start = 0;
-            break;
-        }
-        else
-        {
-            break;
-        }
-    }
-}
-
-#if SW_DEBUG_PRINT != 0
-#include <stdio.h>
-void print_matrix ( int const* matrix,
-                    char const* ref_slice, size_t ref_slice_size,
-                    char const* query, size_t query_size,
-                    bool reverse )
-{
-    size_t COLUMNS = ref_slice_size + 1;
-    size_t ROWS = query_size + 1;
-
-    int print_width = 2;
-    size_t i, j;
-
-    printf ("  %*c ", print_width, '-');
-    for (j = 1; j < COLUMNS; ++j)
-        printf ("%*c ", print_width, get_char ( ref_slice, ref_slice_size, j-1, reverse ));
-    printf ("\n");
-
-    for (i = 0; i < ROWS; ++i)
-    {
-        if ( i == 0 )
-            printf ("%c ", '-');
-        else
-            printf ("%c ", get_char (query, query_size, i-1, reverse ));
-    
-        for (j = 0; j < COLUMNS; ++j)
-        {
-            printf ("%*d ", print_width, matrix[i*COLUMNS + j]);
-        }
-        printf ("\n");
-    }
-}
-
-#endif
-
-/*
-    FindRefVariationBounds uses Smith-Waterman algorithm
-    to find theoretical bounds of the variation for
-    the given reference slice and the query (properly preapared,
-    i.e. containing sequences of bases at the beginning and
-    the end matching the reference)
-
-    ref_slice, ref_slice_size [IN] - the reference slice on which the
-                                     variation will be looked for
-    query, query_size [IN] - the query that represents the variation placed
-                             inside the reference slice
-    ref_start, ref_len [OUT, NULL OK] - the region of ambiguity on the reference
-    have_indel [OUT] - pointer to flag indication if there is an insertion or deletion
-                       (1 - there is an indel, 0 - there is match/mismatch only)
-*/
-static
-rc_t FindRefVariationBounds (
-    INSDC_dna_text const* ref_slice, size_t ref_slice_size,
-    INSDC_dna_text const* query, size_t query_size,
-    size_t* ref_start, size_t* ref_len, bool * has_indel
-    )
-{
-    /* building sw-matrix for chosen reference slice and sequence */
-
-    size_t COLUMNS = ref_slice_size + 1;
-    size_t ROWS = query_size + 1;
-    rc_t rc = 0;
-    
-    bool gap_score_constant = ( GAP_SCORE_LINEAR == 0 );
-
-    int row_start, col_start, row_end, col_end;
-    int row_start_rev, col_start_rev, row_end_rev, col_end_rev;
-    int* matrix = malloc( ROWS * COLUMNS * sizeof (int) );
-    if (matrix == NULL)
-        return RC(rcText, rcString, rcSearching, rcMemory, rcExhausted);
-    * has_indel = true;
-    
-    
-    /* forward scan */
-    rc = calculate_similarity_matrix ( query, query_size, ref_slice, ref_slice_size, gap_score_constant, matrix, false, NULL, NULL, NULL );
-    if ( rc != 0 )
-        goto free_resources;
-#if SW_DEBUG_PRINT != 0
-    print_matrix ( matrix, ref_slice, ref_slice_size, query, query_size, false );
-#endif
-
-    sw_find_indel_box ( matrix, ROWS, COLUMNS, &row_start, &row_end, &col_start, &col_end );
-    if ( row_start == -1 && row_end == -1 && col_start == -1 && col_end == -1 )
-    {
-        * has_indel = 0;
-        goto free_resources;
-    }
-#if SW_DEBUG_PRINT != 0
-    printf ("start=(%d, %d), end=(%d, %d)\n", row_start, col_start, row_end, col_end);
-#endif
-
-    /* reverse scan */
-    rc = calculate_similarity_matrix ( query, query_size, ref_slice, ref_slice_size, gap_score_constant, matrix, true, NULL, NULL, NULL );
-    if ( rc != 0 )
-        goto free_resources;
-#if SW_DEBUG_PRINT != 0
-    print_matrix ( matrix, ref_slice, ref_slice_size, query, query_size, true );
-#endif
-
-    sw_find_indel_box ( matrix, ROWS, COLUMNS, &row_start_rev, &row_end_rev, &col_start_rev, &col_end_rev );
-#if SW_DEBUG_PRINT != 0
-    printf ("start_rev=(%d, %d), end_rev=(%d, %d)\n", row_start_rev, col_start_rev, row_end_rev, col_end_rev);
-#endif
-    if ( row_start_rev != -1 || row_end_rev != -1 || col_start_rev != -1 || col_end_rev != -1 )
-    {
-        row_start = min ( (int)query_size - row_end_rev - 1, row_start );
-        row_end   = max ( (int)query_size - row_start_rev - 1, row_end );
-        col_start = min ( (int)ref_slice_size - col_end_rev - 1, col_start );
-        col_end   = max ( (int)ref_slice_size - col_start_rev - 1, col_end );
-    }
-#if SW_DEBUG_PRINT != 0
-    printf ("COMBINED: start=(%d, %d), end=(%d, %d)\n", row_start, col_start, row_end, col_end);
-#endif
-
-    if ( ref_start != NULL )
-        *ref_start = col_start + 1;
-    if ( ref_len != NULL )
-        *ref_len = col_end - col_start - 1;
-
-free_resources:
-    free (matrix);
-
-    return rc;
-}
-
-/****************************************************/
-/* yet another string helper */
-typedef struct c_string_const
-{
-    char const* str;
-    size_t size;
-} c_string_const;
-
-static void c_string_const_assign ( c_string_const* self, char const* src, size_t size )
-{
-    self -> str = src;
-    self -> size = size;
-}
-
-typedef struct c_string
-{
-    char* str;
-    size_t size;
-    size_t capacity;
-} c_string;
-
-static int c_string_make ( c_string* self, size_t capacity )
-{
-    assert ( capacity > 0 );
-    self -> str = malloc (capacity + 1);
-    if ( self -> str != NULL )
-    {
-        self -> str [0] = '\0';
-        self -> size = 0;
-        self -> capacity = capacity;
-        return 1;
-    }
-    else
-        return 0;
-}
-
-static void c_string_destruct ( c_string* self )
-{
-    if ( self->str != NULL )
-    {
-        free ( self -> str );
-        self -> str = NULL;
-        self -> size = 0;
-        self -> capacity = 0;
-    }
-}
-
-static int c_string_realloc_no_preserve ( c_string* self, size_t new_capacity )
-{
-    if ( self -> capacity < new_capacity )
-    {
-        c_string_destruct ( self );
-
-        return c_string_make ( self, new_capacity );
-    }
-    else
-    {
-        self -> str [0] = '\0';
-        self -> size = 0;
-    }
-
-    return 1;
-}
-
-static int c_string_assign ( c_string* self, char const* src, size_t src_size )
-{
-    assert ( self->capacity >= src_size );
-    if ( self->capacity < src_size && !c_string_realloc_no_preserve (self, max(self->capacity * 2, src_size)) )
-        return 0;
-
-    memcpy ( self -> str, src, src_size );
-    self -> str [src_size] = '\0';
-    self -> size = src_size;
-
-    return 1;
-}
-
-static int c_string_append ( c_string* self, char const* append, size_t append_size)
-{
-    if ( append_size != 0 )
-    {
-        size_t new_size = self->size + append_size;
-        if ( self->capacity >= new_size )
-        {
-            memcpy ( self->str + self->size, append, append_size );
-            self->size = new_size;
-            self->str [new_size] = '\0';
-        }
-        else
-        {
-            size_t new_capacity = max (new_size + 1, self->capacity * 2);
-            char* new_str = malloc ( new_capacity );
-            if (new_str == NULL)
-                return 0;
-
-            memcpy (new_str, self->str, self->size);
-            memcpy (new_str + self->size, append, append_size );
-            new_str [ new_size ] = '\0';
-
-            c_string_destruct ( self );
-        
-            self->str = new_str;
-            self->size = new_size;
-            self->capacity = new_capacity;
-        }
-    }
-
-    return 1;
-}
-
-#if 0
-static int c_string_wrap ( c_string* self,
-    char const* prefix, size_t prefix_size,
-    char const* postfix, size_t postfix_size)
-{
-    assert ( self -> str != NULL );
-    size_t new_size = self->size + prefix_size + postfix_size;
-
-    if ( new_size > self->capacity )
-    {
-        size_t new_capacity = max (new_size + 1, self->capacity * 2);
-        char* new_str = malloc ( new_capacity );
-        if (new_str == NULL)
-            return 0;
-
-        memcpy ( new_str, prefix, prefix_size );
-        memcpy ( new_str + prefix_size, self -> str, self -> size );
-        memcpy ( new_str + prefix_size + self->size, postfix, postfix_size );
-        new_str [ new_size ] = '\0';
-
-        c_string_destruct ( self );
-        
-        self->str = new_str;
-        self->size = new_size;
-        self->capacity = new_capacity;
-    }
-    else
-    {
-        memmove ( self->str + prefix_size, self->str, self->size );
-        memcpy ( self->str, prefix, prefix_size );
-        memcpy (self->str + prefix_size + self->size, postfix, postfix_size );
-        self->str [new_size] = '\0';
-    }
-    return 1;
-}
-#endif
-/************************************************/
-
-
-/*
-   returns true if a new ref_slice is selected
-   returns false if the new ref_slice is the same as the previous one passed in ref_slice
-*/
-
-static bool get_ref_slice (
-            INSDC_dna_text const* ref, size_t ref_size, size_t ref_pos_var,
-            size_t var_len_on_ref,
-            size_t slice_expand_left, size_t slice_expand_right,
-            c_string_const* ref_slice)
-{
-    size_t ref_start, ref_xend;
-    if ( ref_pos_var < slice_expand_left )
-        ref_start = 0;
-    else
-        ref_start = ref_pos_var - slice_expand_left;
-
-    if ( ref_pos_var + slice_expand_right + var_len_on_ref >= ref_size )
-        ref_xend = ref_size;
-    else
-        ref_xend = ref_pos_var + slice_expand_right + var_len_on_ref;
-
-    if ( ref_slice->str == ref + ref_start && ref_slice->size == ref_xend - ref_start)
-        return false;
-
-    c_string_const_assign ( ref_slice, ref + ref_start, ref_xend - ref_start );
-    return true;
-}
-
-#if 1
-static bool make_query ( c_string_const const* ref_slice,
-        INSDC_dna_text const* variation, size_t variation_size, size_t var_len_on_ref,
-        int64_t var_start_pos_adj, /* ref_pos adjusted to the beginning of ref_slice (in the simplest case - the middle of ref_slice) */
-        c_string* query
-    )
-{
-    if ( !c_string_realloc_no_preserve (query, variation_size + ref_slice->size - var_len_on_ref) )
-        return false;
-
-    if ( !c_string_append (query, ref_slice->str, var_start_pos_adj) ||
-         !c_string_append (query, variation, variation_size) ||
-         !c_string_append (query, ref_slice->str + var_start_pos_adj + var_len_on_ref, ref_slice->size - var_start_pos_adj - var_len_on_ref) )
-    {
-         return false;
-    }
-
-    return true;
-}
-
-static bool compose_variation ( c_string_const const* ref,
-        size_t ref_start, size_t ref_len,
-        INSDC_dna_text const* query, size_t query_len,
-        int64_t ref_pos_var, size_t var_len_on_ref,
-        c_string* variation, char const** pallele, size_t* pallele_size )
-{
-    bool ret = true;
-
-    size_t ref_end_orig = (size_t)ref_pos_var + var_len_on_ref;
-    size_t ref_end_new = ref_start + ref_len;
-
-    size_t prefix_start = ref_start, prefix_len, query_trim_l;
-    size_t postfix_start = ref_end_orig, postfix_len, query_trim_r;
-
-    size_t query_len_new, var_len;
-
-    size_t allele_expanded_l = 0, allele_expanded_r = 0;
-
-    if ((int64_t)ref_start <= ref_pos_var) /* left bound is expanded */
-    {
-        prefix_len = (size_t)ref_pos_var - ref_start;
-        query_trim_l = 0;
-
-        assert ((int64_t)prefix_len >= 0);
-    }
-    else /* left bound is shrinked */
-    {
-        prefix_len = 0;
-        query_trim_l = ref_start - (size_t)ref_pos_var;
-
-        assert ((int64_t)query_trim_l >= 0);
-    }
-
-    if (ref_end_new >= ref_end_orig) /* right bound is expanded */
-    {
-        postfix_start = ref_end_orig;
-        postfix_len = ref_end_new - ref_end_orig;
-        query_trim_r = 0;
-    }
-    else /* right bound is shrinked */
-    {
-        postfix_start = ref_end_new;
-        postfix_len = 0;
-        query_trim_r = ref_end_orig - ref_end_new;
-    }
-
-    /*
-    special case: pure match/mismatch
-    algorithm gives ref_len = 0, but in this case
-    we want to have variation = input query
-    */
-    if ( ref_len == 0 && query_len == var_len_on_ref )
-    {
-        assert ( prefix_len == 0 );
-        assert ( postfix_len == 0 );
-        assert ( query_trim_l == 0 );
-        assert ( query_trim_r > 0 );
-
-        query_trim_r = 0;
-    }
-    /*
-    special case: deletion
-    we have to create a query whis is the allele
-    expanded one base to the left and to the right
-    on the reference if possible
-    */
-    else if ( var_len_on_ref > query_len )
-    {
-        if ( prefix_start > 0 )
-        {
-            allele_expanded_l = 1;
-            prefix_start -= 1;
-            ++prefix_len;
-        }
-
-        if ( postfix_start + postfix_len + 1 < ref->size)
-        {
-            allele_expanded_r = 1;
-            ++postfix_len;
-        }
-    }
-
-    query_len_new = query_len - query_trim_l - query_trim_r;
-    assert ((int64_t)query_len_new >= 0);
-    var_len = prefix_len + query_len_new + postfix_len;
-
-    if ( var_len > 0 )
-    {
-        /* non-empty variation */
-        if ( !c_string_realloc_no_preserve( variation, var_len ) )
-            ret = false;
-
-        if ( prefix_len > 0 )
-            ret = ret && c_string_assign (variation, ref->str + prefix_start, prefix_len);
-        
-        if ( query_len_new > 0 )
-            ret = ret && c_string_append (variation, query + query_trim_l, query_len_new);
-
-        if ( postfix_len > 0 )
-            ret = ret && c_string_append (variation, ref->str + postfix_start, postfix_len);
-
-        if ( ! ret )
-            c_string_destruct ( variation );
-
-        *pallele = variation->str + allele_expanded_l;
-        *pallele_size = variation->size - allele_expanded_l - allele_expanded_r;
-    }
-    else
-    {
-        /* in this case there is no query - don't allocate anything */
-        ret = true;
-        assert ( 0 ); /* since we expand deletions,
-                      this code shall not be reached.
-                      theoretically it can be reached if 
-                      reference has length == 0 only */
-    }
-
-    return ret;
-}
-
-#endif
-
-#if 0
-static bool make_query_ (
-        INSDC_dna_text const* ref, size_t ref_size, size_t ref_pos_var,
-        INSDC_dna_text const* variation, size_t variation_size, size_t var_len_on_ref,
-        size_t slice_expand_left, size_t slice_expand_right,
-        c_string* query
-    )
-{
-    size_t ref_prefix_start, ref_prefix_len, ref_suffix_start, ref_suffix_len;
-    if ( !c_string_realloc_no_preserve (query, variation_size + slice_expand_left + slice_expand_right + var_len_on_ref) )
-        return false;
-
-    if ( ref_pos_var < slice_expand_left )
-    {
-        ref_prefix_start = 0;
-        ref_prefix_len = slice_expand_left - (ref_pos_var - 1);
-    }
-    else
-    {
-        ref_prefix_start = ref_pos_var - slice_expand_left;
-        ref_prefix_len = slice_expand_left;
-    }
-
-    ref_suffix_start = ref_pos_var + var_len_on_ref;
-
-    if ( ref_suffix_start + slice_expand_right >= ref_size )
-        ref_suffix_len = ref_size - (slice_expand_right + 1);
-    else
-        ref_suffix_len = slice_expand_right;
-
-    if ( !c_string_append (query, ref + ref_prefix_start, ref_prefix_len) ||
-         !c_string_append (query, variation, variation_size) ||
-         !c_string_append (query, ref + ref_suffix_start, ref_suffix_len) )
-    {
-         return false;
-    }
-
-    return true;
-}
-#endif
-
-/*
-    FindRefVariationRegionIUPAC_SW uses Smith-Waterman algorithm
-    to find theoretical bounds of the variation for
-    the given reference, position on the reference
-    and the raw query, or variation to look for at the given
-    reference position
-
-    ref, ref_size [IN]     - the reference on which the
-                             variation will be looked for
-    ref_pos_var [IN]       - the position on reference to look for the variation
-    variation, variation_size [IN] - the variation to look for at the ref_pos_var
-    var_len_on_ref [IN]    - the length of the variation on the reference, e.g.:
-                           - mismatch, 2 bases: variation = "XY", var_len_on_ref = 2
-                           - deletion, 3 bases: variation = "", var_len_on_ref = 3
-                           - insertion, 2 bases:  variation = "XY", var_len_on_ref = 0
-
-    p_ref_start, p_ref_len [OUT, NULL OK] - the region of ambiguity on the reference
-                                            (return values)
-*/
-
-static rc_t CC FindRefVariationRegionIUPAC_SW (
-        INSDC_dna_text const* ref, size_t ref_size, size_t ref_pos_var,
-        INSDC_dna_text const* variation, size_t variation_size, size_t var_len_on_ref,
-        size_t* p_ref_start, size_t* p_ref_len
-    )
-{
-    rc_t rc = 0;
-
-    size_t var_half_len = 1;/*variation_size / 2 + 1;*/
-
-    size_t exp_l = var_half_len;
-    size_t exp_r = var_half_len;
-
-    /* previous start and end for reference slice */
-    int64_t slice_start = -1, slice_end = -1;
-
-    c_string_const ref_slice;
-    c_string query;
-
-    size_t ref_start = 0, ref_len = 0;
-
-    ref_slice.str = NULL;
-    ref_slice.size = 0;
-
-    if ( !c_string_make ( & query, ( variation_size + 1 ) * 2 ) )
-        return RC(rcText, rcString, rcSearching, rcMemory, rcExhausted);
-
-    while ( 1 )
-    {
-        int64_t new_slice_start, new_slice_end;
-        int64_t ref_pos_adj;
-        int cont = 0;
-        bool has_indel = false;
-
-        /* get new expanded slice and check if it has not reached the bounds of ref */
-        bool slice_expanded = get_ref_slice ( ref, ref_size, ref_pos_var, var_len_on_ref, exp_l, exp_r, & ref_slice );
-        if ( !slice_expanded )
-            break;
-
-        /* get ref_pos relative to ref_slice start and new slice_start and end */
-        ref_pos_adj = (int64_t)ref_pos_var - ( ref_slice.str - ref );
-        new_slice_start = ref_slice.str - ref;
-        new_slice_end = new_slice_start + ref_slice.size;
-
-        /* compose a new query for newly extended ref slice */
-        /*if ( !make_query_( ref, ref_size, ref_pos_var, variation, variation_size, var_len_on_ref, exp_l, exp_r, & query ) )*/
-        if ( !make_query ( & ref_slice, variation, variation_size, var_len_on_ref, ref_pos_adj, & query ) )
-        {
-            rc = RC(rcText, rcString, rcSearching, rcMemory, rcExhausted);
-            goto free_resources;
-        }
-
-        rc = FindRefVariationBounds ( ref_slice.str, ref_slice.size,
-                        query.str, query.size, & ref_start, & ref_len, & has_indel );
-
-        /* if there are no indels report that there is no ambiguity
-           for the given ref_pos_var: region starting at ref_pos_var has length = 0
-           ambiguity
-        */
-        if ( !has_indel )
-        {
-            ref_start = ref_pos_adj;
-            ref_len = 0;
-        }
-
-        if ( rc != 0 )
-            goto free_resources;
-
-        /* if we've found the ambiguity window starting at the very
-           beginning of the ref slice and if we're still able to extend
-           ref slice to the left (haven't bumped into boundary) - extend to the left
-           and repeat the search
-        */
-        if ( ref_start == 0 && (slice_start == -1 || new_slice_start != slice_start ) )
-        {
-            exp_l *= 2;
-            cont = 1;
-        }
-
-        /* if we've found the ambiguity window ending at the very
-           end of the ref slice and if we're still able to extend
-           ref slice to the right (haven't bumped into boundary) - extend to the right
-           and repeat the search
-        */
-        if ( ref_start + ref_len == ref_slice.size && (slice_end == -1 || new_slice_end != slice_end) )
-        {
-            exp_r *= 2;
-            cont = 1;
-        }
-
-        if ( !cont )
-            break;
-
-        slice_start = new_slice_start;
-        slice_end = new_slice_end;
-    }
-    if ( p_ref_start != NULL )
-        *p_ref_start = ref_start + (ref_slice.str - ref);
-    if ( p_ref_len != NULL )
-        *p_ref_len = ref_len;
-
-free_resources:
-    c_string_destruct ( &query );
-
-    return rc;
-}
-
-/*
-    FindRefVariationRegionIUPAC_RA uses Rolling-bulldozer algorithm
-    to find theoretical bounds of the variation for
-    the given reference, position on the reference
-    and the raw query, or variation to look for at the given
-    reference position
-
-    ref, ref_size [IN]     - the reference on which the
-                             variation will be looked for
-    ref_pos_var [IN]       - the position on reference to look for the variation
-    variation, variation_size [IN] - the variation to look for at the ref_pos_var
-    var_len_on_ref [IN]    - the length of the variation on the reference, e.g.:
-                           - mismatch, 2 bases: variation = "XY", var_len_on_ref = 2
-                           - deletion, 3 bases: variation = "", var_len_on_ref = 3
-                           - insertion, 2 bases:  variation = "XY", var_len_on_ref = 0
-
-    p_ref_start, p_ref_len [OUT, NULL OK] - the region of ambiguity on the reference
-                                            (return values)
-*/
-
-static rc_t CC FindRefVariationRegionIUPAC_RA (
-        INSDC_dna_text const* ref, size_t ref_size, size_t ref_pos_var,
-        INSDC_dna_text const* variation, size_t variation_size, size_t var_len_on_ref,
-        size_t* p_ref_start, size_t* p_ref_len
-    )
-{
-    rc_t rc = 0;
-    size_t del_pos_start, del_pos_xend;
-    size_t ins_pos_start, ins_pos_xend;
-
-    /* Stage 1: trying to expand deletion */
-
-    /* expanding to the left */
-    if (var_len_on_ref > 0)
-    {
-        for (del_pos_start = ref_pos_var;
-            del_pos_start != 0 && ref[del_pos_start-1] == ref[del_pos_start-1 + var_len_on_ref];
-            --del_pos_start);
-
-        /* expanding to the right */
-        for (del_pos_xend = ref_pos_var + var_len_on_ref;
-            del_pos_xend < ref_size && ref[del_pos_xend] == ref[del_pos_xend - var_len_on_ref];
-            ++del_pos_xend);
-    }
-    else
-    {
-        del_pos_start = ref_pos_var;
-        del_pos_xend = ref_pos_var;
-    }
-
-    /* Stage 2: trying to expand insertion */
-
-    /* expanding to the left */
-    /* roll first repetition to the left (avoiding % operation) */
-    if (variation_size > 0)
-    {
-        if (del_pos_start > 0)
-        {
-            for (ins_pos_start = ref_pos_var; ins_pos_start != 0; --ins_pos_start)
-            {
-                size_t pos_in_var = ins_pos_start-1 - ref_pos_var + variation_size;
-                size_t pos_in_ref = ins_pos_start-1;
-                if ( (int64_t)pos_in_var == -1l || ref[pos_in_ref] != variation[pos_in_var] )
-                    break;
-            }
-            /* roll beyond first repetition (still avoiding %) - now can compare with reference rather than with variation */
-            for (; ins_pos_start != 0 && ref[ins_pos_start-1] == ref[ins_pos_start-1 + variation_size];
-                --ins_pos_start);
-        }
-        else
-            ins_pos_start = 0;
-
-        /* roll first repetition to the right (avoiding % operation) */
-        if (del_pos_xend < ref_size)
-        {
-            for (ins_pos_xend = ref_pos_var + var_len_on_ref; ins_pos_xend < ref_size; ++ins_pos_xend)
-            {
-                size_t pos_in_var = ins_pos_xend - ref_pos_var - var_len_on_ref;
-                if (pos_in_var == variation_size || ref[ins_pos_xend] != variation[pos_in_var])
-                    break;
-            }
-            /* roll beyond first repetition (still avoiding %) - now can compare with reference rather than with variation */
-            if (ins_pos_xend - ref_pos_var - var_len_on_ref == variation_size)
-            {
-                for (; ins_pos_xend < ref_size && ref[ins_pos_xend] == ref[ins_pos_xend - variation_size];
-                    ++ins_pos_xend);
-            }
-        }
-        else
-            ins_pos_xend = ref_size;
-    }
-    else
-    {
-        ins_pos_start = ref_pos_var;
-        ins_pos_xend = ref_pos_var;
-    }
-
-
-    if (del_pos_start > ins_pos_start)
-        del_pos_start = ins_pos_start;
-    if (del_pos_xend < ins_pos_xend)
-        del_pos_xend = ins_pos_xend;
-
-    if ( p_ref_start != NULL )
-        *p_ref_start = del_pos_start;
-    if ( p_ref_len != NULL )
-        *p_ref_len = del_pos_xend - del_pos_start;
-
-    return rc;
-}
-
-/*
-    FindRefVariationRegionIUPAC
-    to find theoretical bounds of the variation for
-    the given reference, position on the reference
-    and the raw query, or variation to look for at the given
-    reference position
-
-    alg                    - algorithm to use for the search (one of RefVarAlg enum)
-    ref, ref_size [IN]     - the reference on which the
-                             variation will be looked for
-    ref_pos_var [IN]       - the position on reference to look for the variation
-    variation, variation_size [IN] - the variation to look for at the ref_pos_var
-    var_len_on_ref [IN]    - the length of the variation on the reference, e.g.:
-                           - mismatch, 2 bases: variation = "XY", var_len_on_ref = 2
-                           - deletion, 3 bases: variation = "", var_len_on_ref = 3
-                           - insertion, 2 bases:  variation = "XY", var_len_on_ref = 0
-
-    p_ref_start, p_ref_len [OUT, NULL OK] - the region of ambiguity on the reference
-                                            (return values)
-*/
-
-static rc_t CC FindRefVariationRegionIUPAC (
-        RefVarAlg alg, INSDC_dna_text const* ref, size_t ref_size, size_t ref_pos_var,
-        INSDC_dna_text const* variation, size_t variation_size, size_t var_len_on_ref,
-        size_t* p_ref_start, size_t* p_ref_len
-    )
-{
-    switch (alg)
-    {
-    case refvarAlgSW:
-        return FindRefVariationRegionIUPAC_SW ( ref, ref_size, ref_pos_var, variation, variation_size, var_len_on_ref, p_ref_start, p_ref_len );
-    case refvarAlgRA:
-        return FindRefVariationRegionIUPAC_RA ( ref, ref_size, ref_pos_var, variation, variation_size, var_len_on_ref, p_ref_start, p_ref_len );
-    }
-    return RC ( rcVDB, rcExpression, rcConstructing, rcParam, rcUnrecognized );
-}
-
-rc_t CC RefVariationIUPACMake (RefVariation ** obj,
-        INSDC_dna_text const* ref, size_t ref_len,
-        size_t deletion_pos, size_t deletion_len,
-        INSDC_dna_text const* insertion, size_t insertion_len
-#if REF_VAR_ALG
-        , RefVarAlg alg
-#endif
-    )
-{
-    struct RefVariation* new_obj;
-    rc_t rc = 0;
-
-    if ( ( insertion_len == 0 && deletion_len == 0 )
-        || ref_len == 0 )
-    {
-        return RC (rcText, rcString, rcSearching, rcParam, rcEmpty);
-    }
-
-    if ( (deletion_pos + deletion_len) > ref_len )
-    {
-        return RC (rcText, rcString, rcSearching, rcParam, rcOutofrange);
-    }
-
-    assert ( obj != NULL );
-
-    new_obj = calloc ( 1, sizeof * new_obj );
-
-    if ( new_obj == NULL )
-    {
-        rc = RC ( rcVDB, rcExpression, rcConstructing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        size_t ref_window_start = 0, ref_window_len = 0;
-        rc = FindRefVariationRegionIUPAC ( alg, ref, ref_len,
-                                           deletion_pos,
-                                           insertion, insertion_len, deletion_len,
-                                           & ref_window_start, & ref_window_len );
-        if ( rc != 0 )
-        {
-            free ( new_obj );
-            new_obj = NULL;
-        }
-        else
-        {
-            size_t allele_size = 0;
-            char const* allele = NULL;
-
-            c_string_const ref_str;
-            
-            c_string var_str;
-            var_str.capacity = var_str.size = 0;
-            var_str.str = NULL;
-
-            c_string_const_assign ( & ref_str, ref, ref_len );
-
-            if ( ! compose_variation ( & ref_str,
-                                       ref_window_start, ref_window_len,
-                                       insertion, insertion_len,
-                                       deletion_pos, deletion_len, & var_str,
-                                       & allele, & allele_size ) )
-            {
-                rc = RC(rcText, rcString, rcSearching, rcMemory, rcExhausted);
-                free ( new_obj );
-                new_obj = NULL;
-            }
-            else
-            {
-                KRefcountInit ( & new_obj->refcount, 1, "RefVariation", "make", "ref-var" );
-                /* moving var_str to the object (so no need to destruct var_str */
-
-                new_obj->var_buffer = var_str.str;
-                new_obj->var_buffer_size = var_str.size;
-
-                new_obj->allele = allele;
-                new_obj->allele_size = allele_size;
-
-                new_obj->allele_start = ref_window_start;
-                new_obj->allele_len_on_ref = ref_window_len == 0 && insertion_len == deletion_len
-                    ? deletion_len : ref_window_len;
-            }
-        }
-    }
-
-    * obj = new_obj;
-
-    /* TODO: if Kurt insists, return non-zero rc if var_start == 0 or var_start + var_len == ref_size */
-    return rc;
-}
-
-
-rc_t CC RefVariationAddRef ( RefVariation const* self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "RefVariation" ) )
-        {
-        case krefLimit:
-            return RC ( rcVDB, rcExpression, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-static rc_t CC RefVariationIUPACWhack ( RefVariation* self )
-{
-    KRefcountWhack ( & self -> refcount, "RefVariation" );
-
-    assert ( self->var_buffer != NULL || self->var_buffer_size == 0 );
-    if ( self->var_buffer != NULL )
-        free ( self->var_buffer );
-
-    memset ( self, 0, sizeof * self );
-
-    free ( self );
-
-    return 0;
-}
-
-rc_t CC RefVariationRelease ( RefVariation const* self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "RefVariation" ) )
-        {
-        case krefWhack:
-            return RefVariationIUPACWhack ( ( RefVariation* ) self );
-        case krefNegative:
-            return RC ( rcVDB, rcExpression, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-rc_t CC RefVariationGetIUPACSearchQuery ( RefVariation const* self,
-    INSDC_dna_text const ** query, size_t * query_len, size_t * query_start )
-{
-    if ( self == NULL )
-        return RC ( rcVDB, rcExpression, rcAccessing, rcParam, rcNull );
-
-    if ( query != NULL )
-        * query = self->var_buffer;
-    if ( query_len != NULL )
-        * query_len = self->var_buffer_size;
-    if ( query_start != NULL )
-        * query_start = self->allele_start - (self->allele - self->var_buffer);
-
-    return 0;
-}
-
-rc_t CC RefVariationGetSearchQueryLenOnRef ( RefVariation const* self, size_t * query_len_on_ref )
-{
-    if ( self == NULL )
-        return RC ( rcVDB, rcExpression, rcAccessing, rcParam, rcNull );
-
-    if ( query_len_on_ref != NULL )
-        * query_len_on_ref = self->allele_len_on_ref + self->var_buffer_size - self->allele_size;
-
-    return 0;
-}
-
-rc_t CC RefVariationGetAllele ( RefVariation const* self,
-    INSDC_dna_text const ** allele, size_t * allele_len, size_t * allele_start )
-{
-    if ( self == NULL )
-        return RC ( rcVDB, rcExpression, rcAccessing, rcParam, rcNull );
-
-    if ( allele != NULL )
-        * allele = self->allele;
-    if ( allele_len != NULL )
-        * allele_len = self->allele_size;
-    if ( allele_start != NULL )
-        * allele_start = self->allele_start;
-
-    return 0;
-}
-
-rc_t CC RefVariationGetAlleleLenOnRef ( RefVariation const* self, size_t * allele_len_on_ref )
-{
-    if ( self == NULL )
-        return RC ( rcVDB, rcExpression, rcAccessing, rcParam, rcNull );
-
-    if ( allele_len_on_ref != NULL )
-        * allele_len_on_ref = self->allele_len_on_ref;
-
-    return 0;
-}
-
-//////////////// Search-oriented SmithWaterman+
-
-struct SmithWaterman
-{
-    char*   query;
-    size_t  query_size;
-    size_t  max_rows;  
-    int*    matrix; // originally NULL, grows as needed to hold enough memory for query_size * max_rows
-};
-
-LIB_EXPORT rc_t CC SmithWatermanMake( SmithWaterman** p_self, const char* p_query )
-{
-    rc_t rc = 0;
-
-    if( p_self != NULL && p_query != NULL ) 
-    {
-        SmithWaterman* ret = malloc ( sizeof ( SmithWaterman ) );
-        if ( ret != NULL )
-        {
-            ret -> query = string_dup_measure ( p_query, & ret -> query_size );
-            if ( ret -> query != NULL )
-            {
-                ret -> max_rows = 0;
-                ret -> matrix = NULL;
-                *p_self = ret;
-                return 0;
-            }
-            else
-            {
-                rc = RC(rcText, rcString, rcSearching, rcMemory, rcExhausted);
-            }
-            free ( ret );
-        }
-        else
-        {
-            rc = RC(rcText, rcString, rcSearching, rcMemory, rcExhausted);
-        }
-    }
-    else
-    {
-        rc = RC(rcText, rcString, rcSearching, rcParam, rcNull);
-    } 
-
-    return rc;
-}
-
-LIB_EXPORT void CC 
-SmithWatermanWhack( SmithWaterman* self )
-{
-    free ( self -> matrix  );
-    free ( self -> query );
-    free ( self );
-}
-
-LIB_EXPORT rc_t CC 
-SmithWatermanFindFirst( SmithWaterman* p_self, uint32_t p_threshold, const char* p_buf, size_t p_buf_size, SmithWatermanMatch* p_match )
-{
-    rc_t rc = 0;
-    int score;
-    size_t max_row;
-    size_t max_col;
-
-    if (p_buf_size == 0)
-    {
-        return SILENT_RC(rcText, rcString, rcSearching, rcQuery, rcNotFound);
-    }
-    
-    if ( p_buf_size > p_self -> max_rows )
-    {
-        /* calculate_similarity_matrix adds a row and a column, adjust matrix dimensions accordingly */
-        int* new_matrix = realloc ( p_self -> matrix, (p_self->query_size + 1) * (p_buf_size + 1) * sizeof(*p_self->matrix) ); 
-        if ( new_matrix == NULL )
-        {   /* p_self -> matrix is unchanged and can be reused */
-            return RC ( rcText, rcString, rcSearching, rcMemory, rcExhausted );
-        }
-        p_self -> max_rows = p_buf_size; 
-        p_self -> matrix = new_matrix;
-    }
-    /*TODO: pass threshold into calculate_similarity_matrix, have it stop as soon as the score is sufficient */
-    rc = calculate_similarity_matrix ( p_buf, p_buf_size, p_self -> query, p_self -> query_size, false, p_self -> matrix, false, &score, &max_row, &max_col );
-    if ( rc == 0 )
-    {
-        if ( p_threshold > p_self->query_size * 2 )
-        {
-            p_threshold = p_self->query_size * 2;
-        }
-        if ( score >= p_threshold )
-        {
-            if ( p_match != NULL )
-            {
-                /* walk back from the max score row */
-                const size_t Columns = p_self->query_size + 1;
-                int row = max_row;
-                int col = max_col;
-                while ( row > 0 && col > 0 )
-                {
-                    int curr = p_self -> matrix [ row*Columns + col ];
-                    if ( curr == 0 )
-                    {
-                        break;
-                    } 
-					else
-					{
-						int left = p_self -> matrix [ row * Columns + (col - 1) ];
-						int up   = p_self -> matrix [ (row - 1)*Columns + col ];
-						int diag = p_self -> matrix [ (row - 1)*Columns + (col - 1) ]; 
-						if ( diag >= left && diag >= up )
-						{
-							--row;
-							--col;
-						}
-						else if ( diag < left )
-						{
-							--col;
-						}
-						else
-						{
-							--row;
-						}
-					}
-                }
-                
-                p_match -> position = row;
-                p_match -> length = max_row - row;
-                p_match -> score = score;
-            }    
-            return 0;
-        }
-        rc = SILENT_RC ( rcText, rcString, rcSearching, rcQuery, rcNotFound );
-    }
-    
-    return rc;
-}
-
-
diff --git a/libs/sra/.gitignore b/libs/sra/.gitignore
deleted file mode 100644
index 8b13789..0000000
--- a/libs/sra/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/libs/sra/Makefile b/libs/sra/Makefile
deleted file mode 100644
index eb2333a..0000000
--- a/libs/sra/Makefile
+++ /dev/null
@@ -1,249 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-#
-# run 'make schema' to regenerate the built-in schema
-# run 'make schema std' to regenerate the built-in schema and rebuild the libraries
-#
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/sra
-
-INT_LIBS = \
-	libsraschema \
-	libwsraschema \
-	libsradb \
-	libwsradb \
-	libsrareader
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES =            \
-	$(SRADB_OBJ)      \
-	$(WSRADB_OBJ)     \
-	$(SRAREADER_OBJ)  \
-#	$(SRA_SCHEMA_OBJ) \
-	$(WSRA_SCHEMA_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-VPATH += $(OBJDIR)
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS) schema: makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS) schema
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/all $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-	@ rm -f $(ILIBDIR)/libsra-schema.* $(ILIBDIR)/libwsra-schema.* $(ILIBDIR)/sra-dflt-schema*
-	@ rm -f $(BINDIR)/libsra-schema.* $(BINDIR)/libwsra-schema.*
-
-.PHONY: clean
-
-
-#-------------------------------------------------------------------------------
-# sradb embedded schema
-#
-$(ILIBDIR)/libsraschema: $(ILIBDIR)/libsraschema.$(LIBX)
-
-$(ILIBDIR)/libwsraschema: $(ILIBDIR)/libwsraschema.$(LIBX)
-
-SRA_DFLT_SCHEMA_LIBS = \
-	-skapp \
-	-svdb \
-	$(ALWAYS_STATIC_SCHEMA_LIBS) \
-	-salign-reader \
-	-skdb \
-	-svfs \
-	-skns \
-	-sksrch \
-	-skrypto \
-	-skfg \
-	-skfs \
-	-sksproc \
-	-sklib \
-    -sjudy
-
-SRA_DFLT_SCHEMA_OS_LIBS = \
-	-ldl \
-	-sz \
-	-sbz2 \
-	-lm
-
-# set workdir for RUN_REMOTELY in rwin mode 
-RWORKDIR=$(OBJDIR)
-
-$(ILIBDIR)/sra-dflt-schema: sra-dflt-schema.$(OBJX)
-	$(LD) --exe -o $@ $^ $(SRA_DFLT_SCHEMA_LIBS) $(SRA_DFLT_SCHEMA_OS_LIBS)
-
-$(ILIBDIR)/schema: $(ILIBDIR)/sra-dflt-schema $(SRCDIR)/built-in.vschema
-	$(ILIBDIR)/sra-dflt-schema -o$(SRCDIR)/sra-schema.c -I$(TOP)/interfaces -T$(OBJDIR)/sra-schema.c.d $(SRCDIR)/built-in.vschema
-
-SRA_SCHEMA_SRC = \
-	sraschema \
-	sra-schema
-
-SRA_SCHEMA_OBJ = \
-	$(addsuffix .$(LOBX),$(SRA_SCHEMA_SRC))
-
-WSRA_SCHEMA_OBJ = \
-	$(addsuffix .$(LOBX),$(SRA_SCHEMA_SRC))
-
-SRA_SCHEMA_LIB = \
-	-dvdb \
-	-dklib
-
-WSRA_SCHEMA_LIB = \
-	-dwvdb \
-	-dklib
-
-SRASCHEMA_SRC = \
-	sraschema-stub \
-
-WSRASCHEMA_SRC = \
-	wsraschema-stub
-
-SRASCHEMA_SRC += $(SRA_SCHEMA_SRC)
-WSRASCHEMA_SRC += $(SRA_SCHEMA_SRC)
-
-SRASCHEMA_OBJ = \
-	$(addsuffix .$(LOBX),$(SRASCHEMA_SRC))
-
-WSRASCHEMA_OBJ = \
-	$(addsuffix .$(LOBX),$(WSRASCHEMA_SRC))
-
-$(ILIBDIR)/libsraschema.$(LIBX): $(SRASCHEMA_OBJ) $(SRASCHEMA_DEPS)
-	$(LD) --slib -o $@ $(SRASCHEMA_OBJ) $(SRA_SCHEMA_LIB)
-
-$(ILIBDIR)/libwsraschema.$(LIBX): $(WSRASCHEMA_OBJ) $(WSRASCHEMA_DEPS)
-	$(LD) --slib -o $@ $(WSRASCHEMA_OBJ) $(WSRA_SCHEMA_LIB)
-
-
-#-------------------------------------------------------------------------------
-# sradb library
-#
-$(ILIBDIR)/libsradb: $(addprefix $(ILIBDIR)/libsradb.,$(ILIBEXT))
-
-SRADBCMN_SRC = \
-	sramgr-cmn \
-	sratbl-cmn \
-	sracol \
-	types \
-    sracache
-
-SRADB_SRC = \
-	$(SRADBCMN_SRC) \
-	sramgr \
-	sratbl
-
-SRADB_OBJ = \
-	$(addsuffix .$(LOBX),$(SRADB_SRC))
-
-SRADB_LIB = \
-	-ssraschema \
-	-dvdb \
-	-dkdb \
-	-dvfs \
-	-dkfs \
-	-lkfg \
-	-dkproc \
-	-dklib
-
-$(ILIBDIR)/libsradb.$(LIBX): $(SRADB_OBJ)
-	$(LD) --slib -o $@ $^ $(SRADB_LIB)
-
-
-#-------------------------------------------------------------------------------
-# update version
-#
-$(ILIBDIR)/libwsradb: $(addprefix $(ILIBDIR)/libwsradb.,$(ILIBEXT))
-
-WSRADB_SRC = \
-	$(SRADBCMN_SRC) \
-	wsramgr \
-	wsratbl
-
-WSRADB_OBJ = \
-	$(addsuffix .$(LOBX),$(WSRADB_SRC))
-
-WSRADB_LIB = \
-	-swsraschema \
-	-dwvdb \
-	-dwkdb \
-	-dvfs \
-	-dkfs \
-	-lkfg \
-	-dkproc \
-	-dklib
-
-$(ILIBDIR)/libwsradb.$(LIBX): $(WSRADB_OBJ)
-	$(LD) --slib -o $@ $^ $(WSRADB_LIB)
-
-
-#-------------------------------------------------------------------------------
-# libsrareader
-#
-$(ILIBDIR)/libsrareader: $(addprefix $(ILIBDIR)/libsrareader.,$(ILIBEXT))
-
-SRAREADER_SRC = \
-	reader-cmn \
-	reader-fastq \
-	reader-sff \
-	reader-illumina \
-	reader-abi
-
-SRAREADER_OBJ = \
-	$(addsuffix .$(LOBX),$(SRAREADER_SRC))
-
-SRAREADER_LIB = \
-	-dsradb \
-	-dkdb \
-	-dklib
-
-$(ILIBDIR)/libsrareader.$(LIBX): $(SRAREADER_OBJ)
-	$(LD) --slib -o $@ $^ $(SRAREADER_LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/sra/built-in.vschema b/libs/sra/built-in.vschema
deleted file mode 100644
index 3250879..0000000
--- a/libs/sra/built-in.vschema
+++ /dev/null
@@ -1,580 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*==========================================================================
- * libsradb (and libwsradb) built-in schema
- */
-version 1;
-
-include 'ncbi/ncbi.vschema';
-include 'sra/454.vschema';
-include 'sra/illumina.vschema';
-include 'sra/abi.vschema';
-include 'sra/helicos.vschema';
-include 'sra/ion-torrent.vschema';
-
-/*--------------------------------------------------------------------------
- * functions
- */
-
-/* read_seg_from_readn
- *  reads in old READ_<N> read descriptors
- *  returns segmentation information for both reads and label in vector
- *
- *  "nreads" [ DATA ] - a per-spot value that should generally equal
- *  the number of READ_N descriptors found during function instantiation
- *
- *  "spot_len" [ DATA ] - calculated length of spot, used for dynamic
- *  read-length calculations
- */
-const U32 NCBI:SRA:readn:read_type   = 0;
-const U32 NCBI:SRA:readn:read_start  = 1;
-const U32 NCBI:SRA:readn:read_len    = 2;
-const U32 NCBI:SRA:readn:label_start = 3;
-const U32 NCBI:SRA:readn:label_len   = 4;
-
-extern function
-U32 [ 5 ] NCBI:SRA:read_seg_from_readn #1 ( U8 nreads, U32 spot_len );
-
-
-/* rewrite_spot_name
- *  given an old spotname directly from skey
- *  write according to platform rules, optionally with a prefix
- *
- *  "platform" [ CONST ] - which platform rules to use
- *
- *  "skey" [ DATA ] - skey string for row
- *
- *  "prefix" [ DATA, OPTIONAL ] - prefix for spot
- */
-extern function
-ascii NCBI:SRA:rewrite_spot_name #1 < INSDC:SRA:platform_id platform > ( ascii skey * ascii prefix );
-
-/* extract coordinates
- *  given a spotname with encoded coordinates
- *  extract them in reverse order into a vector
- *
- *  "platform" [ CONST ] - which platform rules to use
- *
- *  "skey" [ DATA ] - skey string for row
- */
-const U32 NCBI:SRA:coord:y      = 0;
-const U32 NCBI:SRA:coord:x      = 1;
-const U32 NCBI:SRA:coord:tile   = 2;
-const U32 NCBI:SRA:coord:lane   = 3;
-const U32 NCBI:SRA:coord:region = 2;
-const U32 NCBI:SRA:coord:panel  = 2;
-
-extern function
-INSDC:coord:val [ * ] NCBI:SRA:extract_coordinates #1 < INSDC:SRA:platform_id platform > ( ascii skey );
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:_454_:legacy
- *  produced by all loaders prior to v2
- */
-table NCBI:SRA:_454_:legacy #1 = NCBI:SRA:tbl:sra_nopos #1,
-    NCBI:tbl:base_space_nocol #1, NCBI:tbl:phred_quality_nocol #1,
-    NCBI:SRA:tbl:skeyname #1, NCBI:SRA:_454_:common #1
-{
-    /* COORDINATES
-     *  in addition to X and Y,
-     *  454 has REGION
-     */
-    INSDC:coord:val out_y_coord = ( INSDC:coord:val )
-        < I32 > cut < NCBI:SRA:coord:y > ( coords_from_skey );
-    INSDC:coord:val out_x_coord = ( INSDC:coord:val )
-        < I32 > cut < NCBI:SRA:coord:x > ( coords_from_skey );
-    readonly column INSDC:coord:val REGION = ( INSDC:coord:val )
-        < I32 > cut < NCBI:SRA:coord:region > ( coords_from_skey );
-    I32 [ 3 ] coords_from_skey
-        = NCBI:SRA:extract_coordinates < SRA_PLATFORM_454 > ( out_skey );
-}
-
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:_454_:tbl:v0
- *  produced by original loader before the days of schema
- */
-extern function
-__untyped NCBI:SRA:_454_:untyped_0 ();
-
-extern function U16 NCBI:SRA:decode:CLIP #1 ( opaque in );
-physical __no_header U16 NCBI:SRA:_454_:encoding:CLIP #1 =
-{ return NCBI:SRA:decode:CLIP #1 ( @ ); }
-
-extern function NCBI:SRA:pos16 NCBI:SRA:decode:POSITION #1 ( opaque in );
-physical __no_header NCBI:SRA:pos16 NCBI:SRA:_454_:encoding:POSITION #1 =
-{ return NCBI:SRA:decode:POSITION #1 ( @ ); }
-
-extern function INSDC:2na:packed NCBI:SRA:decode:READ #1 < INSDC:SRA:platform_id platform > ( opaque in );
-physical __no_header INSDC:2na:packed NCBI:SRA:_454_:encoding:READ #1 =
-{ return NCBI:SRA:decode:READ #1 < SRA_PLATFORM_454 > ( @ ); }
-
-extern function any NCBI:SRA:decode:QUALITY #1 < INSDC:SRA:platform_id platform > ( opaque in );
-physical __no_header NCBI:quality:n_encoded:phred NCBI:SRA:_454_:encoding:QUALITY #1 =
-{ return NCBI:SRA:decode:QUALITY #1 < SRA_PLATFORM_454 > ( @ ); }
-
-extern function any NCBI:SRA:decode:SIGNAL #1 < INSDC:SRA:platform_id platform > ( opaque in );
-physical __no_header NCBI:isamp1 NCBI:SRA:_454_:encoding:SIGNAL #1 =
-{ return NCBI:SRA:decode:SIGNAL #1 < SRA_PLATFORM_454 > ( @ ); }
-
-extern function
-NCBI:SRA:pos16 NCBI:SRA:_454_:process_position #1 ( U16 position,
-    * INSDC:SRA:read_filter rd_filt, NCBI:isamp1 sig );
-
-table NCBI:SRA:_454_:tbl:v0 #1 = NCBI:SRA:_454_:legacy #1
-{
-    // recognize original loader
-    __untyped = NCBI:SRA:_454_:untyped_0 ();
-
-    // platform in binary
-    INSDC:SRA:platform_id out_platform
-        = < INSDC:SRA:platform_id > echo < SRA_PLATFORM_454 > ();
-
-    // bases and quality
-    INSDC:2na:packed out_2na_packed = .READ;
-    INSDC:quality:phred out_qual_phred = .QUALITY;
-
-    // synthesized label
-    ascii out_label
-        = < ascii > exists < "AdapterMate1LinkerMate2" > ( out_linker_sequence )
-        | < ascii > echo < "AdapterFragment" > ();
-    INSDC:coord:zero out_label_start
-        = < INSDC:coord:zero > exists < [ 0, 7, 12, 18 ] > ( out_linker_sequence )
-        | < INSDC:coord:zero > echo < [ 0, 7 ] > ();
-    INSDC:coord:len out_label_len
-        = < INSDC:coord:len > exists < [ 7, 5, 6, 5 ] > ( out_linker_sequence )
-        | < INSDC:coord:len > echo < [ 7, 8 ] > ();
-
-    // special sequences
-    INSDC:dna:text out_flow_chars
-        = < INSDC:dna:text > meta:read < "MSC454_FLOW_CHARS" > ();
-    INSDC:dna:text out_key_sequence
-        = < INSDC:dna:text > meta:read < "MSC454_KEY_SEQUENCE" > ();
-    INSDC:dna:text out_linker_sequence
-        = < INSDC:dna:text > meta:read < "MSC454_LINKER_SEQUENCE" > ();
-
-    // position column may be read directly
-    NCBI:SRA:pos16 out_position16
-        = NCBI:SRA:_454_:process_position #1 ( .POSITION, .RD_FILTER, .SIGNAL )
-        | NCBI:SRA:_454_:process_position #1 ( .POSITION, .RD_FILTER )
-        | NCBI:SRA:_454_:process_position #1 ( .POSITION );
-    INSDC:position:one out_position
-        = cast ( out_position16 );
-
-
-    /* READ DESCRIPTION
-     *  this version of 454 always has a key sequence
-     *  and may or may not have a linker
-     *  in the former case, the spot is well defined
-     *  in the latter, the linker must be dynamically located
-     */
-
-    // special function to generate reads
-    U32 [ 3 ] dynamic_read_desc
-        = NCBI:SRA:_454_:dynamic_read_desc < 4 > ( out_2na_bin, out_key_sequence, out_linker_sequence )
-        | NCBI:SRA:_454_:dynamic_read_desc ( out_2na_bin, out_key_sequence );
-
-    // fabricate nreads
-    U8 out_nreads
-        = < U8 > exists < 4 > ( out_linker_sequence )
-        | < U8 > echo < 2 > ();
-
-
-    // read_type
-    U32 read_type32
-        = < U32 > cut < NCBI:SRA:_454_:dyn_read_type > ( dynamic_read_desc );
-    INSDC:SRA:read_type out_read_type = cast ( read_type32 );
-
-    // read_seg and read_len
-    U32 uread_start
-        = < U32 > cut < NCBI:SRA:_454_:dyn_read_start > ( dynamic_read_desc );
-    INSDC:coord:zero out_read_start
-        = ( INSDC:coord:zero ) uread_start;
-    INSDC:coord:len out_read_len = ( INSDC:coord:len )
-        < U32 > cut < NCBI:SRA:_454_:dyn_read_len > ( dynamic_read_desc );
-
-    // read_filter
-    INSDC:SRA:read_filter out_rd_filter
-        = .RD_FILTER
-        | < INSDC:SRA:read_filter > echo < SRA_READ_FILTER_PASS > ( dynamic_read_desc );
-
-
-    /* clips - all may be absent although CQR is expected */
-    physical column NCBI:SRA:_454_:encoding:CLIP #1 .CLIP_ADAPTER_LEFT;
-    physical column NCBI:SRA:_454_:encoding:CLIP #1 .CLIP_ADAPTER_RIGHT;
-    physical column NCBI:SRA:_454_:encoding:CLIP #1 .CLIP_QUALITY_LEFT;
-    physical column NCBI:SRA:_454_:encoding:CLIP #1 .CLIP_QUALITY_RIGHT;
-
-    /* bases */
-    physical column NCBI:SRA:_454_:encoding:READ #1 .READ;
-    physical column NCBI:SRA:_454_:encoding:QUALITY #1 .QUALITY;
-
-    /* signal and base position */
-    physical column NCBI:SRA:_454_:encoding:SIGNAL #1 .SIGNAL;
-    physical column NCBI:SRA:_454_:encoding:POSITION #1 .POSITION;
-};
-
-
-/* NCBI:SRA:_454_:tbl:v1 #1
- *  written with implicit table schema
- *  columns have stored schema
- */
-table NCBI:SRA:_454_:tbl:v1 #1 = NCBI:SRA:_454_:legacy #1, NCBI:SRA:tbl:spotdesc_nophys #1
-{
-    // platform in binary
-    INSDC:SRA:platform_id out_platform
-        = .PLATFORM
-        | < INSDC:SRA:platform_id > echo < SRA_PLATFORM_454 > ();
-
-    // bases and quality
-    INSDC:2na:packed out_2na_packed = .READ;
-    INSDC:quality:phred out_qual_phred = .QUALITY;
-
-    // special sequences
-    INSDC:dna:text out_flow_chars = .FLOW_CHARS;
-    INSDC:dna:text out_key_sequence = .KEY_SEQUENCE;
-    // linker handled by sub-table
-
-    // position needs special processing
-    NCBI:SRA:pos16 out_position16
-        = NCBI:SRA:_454_:process_position #1 ( .POSITION, .RD_FILTER, .SIGNAL )
-        | NCBI:SRA:_454_:process_position #1 ( .POSITION, .RD_FILTER )
-        | NCBI:SRA:_454_:process_position #1 ( .POSITION );
-    INSDC:position:one out_position
-        = cast ( out_position16 );
-};
-
-
-/* NCBI:SRA:_454_:tbl:v1_2 #1
- *  no stored schema
- *  linker ignored if present
- */
-extern function
-__untyped NCBI:SRA:_454_:untyped_1_2a ();
-
-table NCBI:SRA:_454_:tbl:v1_2a #1 = NCBI:SRA:_454_:tbl:v1 #1
-{
-    // single linker present
-    __untyped = NCBI:SRA:_454_:untyped_1_2a ();
-
-    INSDC:dna:text out_linker_sequence = .LINKER_SEQUENCE;
-};
-
-extern function
-__untyped NCBI:SRA:_454_:untyped_1_2b ();
-
-table NCBI:SRA:_454_:tbl:v1_2b #1 = NCBI:SRA:_454_:tbl:v1 #1
-{
-    // linker missing or empty
-    __untyped = NCBI:SRA:_454_:untyped_1_2b ();
-};
-
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:Illumina:legacy
- *  produced by all loaders prior to v2
- */
-table NCBI:SRA:Illumina:legacy #1 = NCBI:SRA:tbl:sra #1,
-    NCBI:tbl:base_space_nocol #1, NCBI:SRA:Illumina:common #1
-{
-    // signal
-    column NCBI:fsamp4 SIGNAL
-        = ( NCBI:fsamp4 ) < NCBI:SRA:swapped_fsamp4 > NCBI:SRA:swap ( out_signal, out_x2na_bin )
-        | ( NCBI:fsamp4 ) < NCBI:SRA:rotated_fsamp4 > NCBI:SRA:rotate < false > ( out_signal, out_x2na_bin );
-
-    // intensity
-    column NCBI:fsamp4 INTENSITY
-        = < NCBI:fsamp4 > NCBI:SRA:denormalize ( out_norm_intensity, out_x2na_bin );
-    NCBI:fsamp4 out_norm_intensity
-        = ( NCBI:fsamp4 ) < NCBI:SRA:swapped_fsamp4 > NCBI:SRA:swap ( out_intensity, out_x2na_bin )
-        | ( NCBI:fsamp4 ) < NCBI:SRA:rotated_fsamp4 > NCBI:SRA:rotate < false > ( out_intensity, out_x2na_bin );
-
-    // noise
-    column NCBI:fsamp4 NOISE = out_noise;
-};
-
-/* NCBI:SRA:Illumina:tbl:v0
- *  produced by original loader before the days of schema
- */
-extern function INSDC:2na:packed NCBI:SRA:decode:READ #1 < INSDC:SRA:platform_id platform > ( opaque in );
-physical __no_header INSDC:2na:packed NCBI:SRA:Illumina:encoding:READ #1 =
-{ return NCBI:SRA:decode:READ #1 < SRA_PLATFORM_ILLUMINA > ( @ ); }
-
-extern function any NCBI:SRA:decode:QUALITY #1 < INSDC:SRA:platform_id platform > ( opaque in );
-physical __no_header NCBI:SRA:rotated_qual4 NCBI:SRA:Illumina:encoding:QUALITY #1 =
-{ return NCBI:SRA:decode:QUALITY #1 < SRA_PLATFORM_ILLUMINA > ( @ ); }
-physical __no_header NCBI:qual1 NCBI:SRA:Illumina:encoding:QUALITY2 #1 =
-{ return NCBI:SRA:decode:QUALITY #1 < SRA_PLATFORM_ILLUMINA > ( @ ); }
-
-extern function any NCBI:SRA:decode:SIGNAL #1 < INSDC:SRA:platform_id platform > ( opaque in );
-physical __no_header NCBI:SRA:rotated_fsamp4 NCBI:SRA:Illumina:encoding:SIGNAL #1 =
-{ return NCBI:SRA:decode:SIGNAL #1 < SRA_PLATFORM_ILLUMINA > ( @ ); }
-
-extern function any NCBI:SRA:decode:INTENSITY #1 ( opaque in );
-physical __no_header NCBI:SRA:rotated_fsamp4 NCBI:SRA:Illumina:encoding:INTENSITY #1 =
-{ return NCBI:SRA:decode:INTENSITY #1 ( @ ); }
-
-extern function any NCBI:SRA:decode:NOISE #1 ( opaque in );
-physical __no_header NCBI:fsamp4 NCBI:SRA:Illumina:encoding:NOISE #1 =
-{ return NCBI:SRA:decode:NOISE #1 ( @ ); }
-
-table NCBI:SRA:Illumina:tbl:v0 #1 = NCBI:SRA:Illumina:legacy #1, NCBI:SRA:tbl:skeyname #1
-{
-    // platform in binary
-    INSDC:SRA:platform_id out_platform
-        = < INSDC:SRA:platform_id > echo < SRA_PLATFORM_ILLUMINA > ();
-
-    // generate rewritten spot_name
-    ascii out_slx_prefix
-        = < ascii > meta:read < 'SLX_PREFIX' > ()
-        | < ascii > echo < '' > ();
-    ascii rewritten_spot_name
-        = NCBI:SRA:rewrite_spot_name < SRA_PLATFORM_ILLUMINA > ( out_skey, out_slx_prefix );
-
-    // coordinates
-    INSDC:coord:val out_y_coord = ( INSDC:coord:val )
-        < I32 > cut < NCBI:SRA:coord:y > ( coords_from_skey );
-    INSDC:coord:val out_x_coord = ( INSDC:coord:val )
-        < I32 > cut < NCBI:SRA:coord:x > ( coords_from_skey );
-    INSDC:coord:val out_tile_coord = ( INSDC:coord:val )
-        < I32 > cut < NCBI:SRA:coord:tile > ( coords_from_skey );
-    INSDC:coord:val out_lane_coord = ( INSDC:coord:val )
-        < I32 > cut < NCBI:SRA:coord:lane > ( coords_from_skey );
-    I32 [ 4 ] coords_from_skey
-        = NCBI:SRA:extract_coordinates < SRA_PLATFORM_ILLUMINA > ( out_skey );
-
-    // bases
-    INSDC:2na:packed out_2na_packed = .READ;
-
-    // fixed_spot_len
-    INSDC:coord:len static_fixed_spot_len = spot_len;
-
-    // nreads
-    U8 out_nreads
-        = < U8 > meta:value < 'NREADS' > ()
-        | < U8 > echo < 1 > ();
-
-    // read_start, read_len
-    INSDC:coord:zero out_read_start
-        = ( INSDC:coord:zero ) < U32 > cut < NCBI:SRA:readn:read_start > ( read_seg_from_readn )
-        | < INSDC:coord:zero > echo < 0 > ();
-    INSDC:coord:len out_read_len
-        = ( INSDC:coord:len ) < U32 > cut < NCBI:SRA:readn:read_len > ( read_seg_from_readn )
-        | spot_len;
-    U32 [ 5 ] read_seg_from_readn
-        = NCBI:SRA:read_seg_from_readn ( out_nreads, spot_len );
-
-    // read_type
-    U32 read_type_from_read_seg
-        = < U32 > cut < NCBI:SRA:readn:read_type > ( read_seg_from_readn );
-    INSDC:SRA:read_type out_read_type
-        = cast ( read_type_from_read_seg )
-        | ( INSDC:SRA:read_type ) < INSDC:SRA:xread_type > echo < SRA_READ_TYPE_BIOLOGICAL > ();
-
-    NCBI:SRA:rotated_fsamp4 out_signal = .SIGNAL;
-    NCBI:SRA:rotated_fsamp4 out_intensity = .INTENSITY;
-    NCBI:fsamp4 out_noise = .NOISE;
-
-    /* bases */
-    physical column NCBI:SRA:Illumina:encoding:READ #1 .READ;
-
-    /* signal, intensity and noise */
-    physical column NCBI:SRA:Illumina:encoding:SIGNAL #1 .SIGNAL;
-    physical column NCBI:SRA:Illumina:encoding:INTENSITY #1 .INTENSITY;
-    physical column NCBI:SRA:Illumina:encoding:NOISE #1 .NOISE;
-};
-
-
-extern function
-__untyped NCBI:SRA:Illumina:untyped_0a ();
-
-table NCBI:SRA:Illumina:tbl:v0a #1 = NCBI:SRA:Illumina:tbl:v0 #1, NCBI:SRA:Illumina:qual4_nocol #1
-{
-    __untyped = NCBI:SRA:Illumina:untyped_0a ();
-
-    // quality
-    NCBI:SRA:rotated_qual4 out_qual4_rotated = .QUALITY;
-    physical column NCBI:SRA:Illumina:encoding:QUALITY #1 .QUALITY;
-
-    INSDC:quality:phred out_qual2_phred = .QUALITY2;
-    physical column NCBI:SRA:Illumina:encoding:QUALITY2 #1 .QUALITY2;
-
-	/* INSDC:SRA:tbl:spotname inherited virtual productions
-	 *  virtual out_name_fmt = 0;
-	 */
-
-	/* INSDC:SRA:tbl:spotdesc inherited virtual productions
-	 *  virtual out_label = 0;
-	 *  virtual out_label_len = 0;
-	 *  virtual out_rd_filter = 0;
-	 *  virtual out_label_start = 0;
-	 */
-};
-
-extern function
-__untyped NCBI:SRA:Illumina:untyped_0b ();
-
-table NCBI:SRA:Illumina:tbl:v0b #1 = NCBI:SRA:Illumina:tbl:v0 #1, NCBI:tbl:phred_quality_nocol #1
-{
-    __untyped = NCBI:SRA:Illumina:untyped_0b ();
-
-    // quality
-    INSDC:quality:phred out_qual_phred
-        = .QUALITY
-        | .QUALITY2;
-
-    physical column NCBI:SRA:Illumina:encoding:QUALITY2 #1 .QUALITY;
-    physical column NCBI:SRA:Illumina:encoding:QUALITY2 #1 .QUALITY2;
-
-	/* INSDC:SRA:tbl:spotname inherited virtual productions
-	 *  virtual out_name_fmt = 0;
-	 */
-
-	/* INSDC:SRA:tbl:spotdesc inherited virtual productions
-	 *  virtual out_label = 0;
-	 *  virtual out_label_len = 0;
-	 *  virtual out_rd_filter = 0;
-	 *  virtual out_label_start = 0;
-	 */
-
-	/* INSDC:SRA:tbl:stats inherited virtual productions
-	 *  virtual max_spot_id = 0;
-	 *  virtual min_spot_id = 0;
-	 *  virtual in_stats_bin = 0;
-	 *  virtual bio_base_count = 0;
-	 */
-};
-
-table NCBI:SRA:Illumina:tbl:v1 #1 = NCBI:SRA:Illumina:legacy #1,
-    NCBI:SRA:tbl:spotdesc_nophys #1, NCBI:SRA:tbl:skeyname_nocol #2
-{
-    // platform in binary
-    INSDC:SRA:platform_id out_platform
-        = .PLATFORM
-        | < INSDC:SRA:platform_id > echo < SRA_PLATFORM_ILLUMINA > ();
-
-    // coordinates
-    INSDC:coord:val out_tile_coord = ( INSDC:coord:val )
-        < I32 > cut < NCBI:SRA:coord:tile > ( coords_from_spotname );
-    INSDC:coord:val out_lane_coord = ( INSDC:coord:val )
-        < I32 > cut < NCBI:SRA:coord:lane > ( coords_from_spotname );
-    I32 [ 4 ] coords_from_spotname
-        = NCBI:SRA:extract_coordinates < SRA_PLATFORM_ILLUMINA > ( _out_name );
-
-    // bases
-    INSDC:2na:packed out_2na_packed = .READ;
-
-    // quality2
-    INSDC:quality:phred out_qual2_phred = .QUALITY2;
-
-    // fixed_spot_len
-    INSDC:coord:len static_fixed_spot_len = spot_len;
-
-    NCBI:SRA:swapped_fsamp4 out_signal = .SIGNAL;
-    NCBI:SRA:swapped_fsamp4 out_intensity = .INTENSITY;
-    NCBI:fsamp4 out_noise = .NOISE;
-
-    // stray compatibility columns
-    physical column INSDC:dna:text .FLOW_CHARS;
-    physical column INSDC:dna:text .KEY_SEQUENCE;
-    physical column INSDC:dna:text .LINKER_SEQUENCE;
-};
-
-extern function
-__untyped NCBI:SRA:Illumina:untyped_1a ();
-
-alias NCBI:SRA:encoded_qual4 NCBI:SRA:comp_qual4;
-
-extern function
-NCBI:SRA:swapped_qual4 NCBI:SRA:qual4_decompress_v1 #1 ( any in );
-
-table NCBI:SRA:Illumina:tbl:v1a #1 = NCBI:SRA:Illumina:tbl:v1 #1, NCBI:SRA:Illumina:qual4_nocol #1
-{
-    __untyped = NCBI:SRA:Illumina:untyped_1a ();
-
-    // 4-channel quality
-    NCBI:SRA:swapped_qual4 out_qual4_swapped = .QUALITY;
-};
-
-extern function
-__untyped NCBI:SRA:Illumina:untyped_1b ();
-
-table NCBI:SRA:Illumina:tbl:v1b #1 = NCBI:SRA:Illumina:tbl:v1 #1, NCBI:tbl:phred_quality_nocol #1
-{
-    __untyped = NCBI:SRA:Illumina:untyped_1b ();
-
-    // single-channel quality
-    INSDC:quality:phred out_qual_phred = .QUALITY;
-};
-
-
-/*--------------------------------------------------------------------------
- * NCBI:SRA:ABI:legacy
- *  produced by all loaders prior to v2
- */
-table NCBI:SRA:ABI:legacy #1 = NCBI:SRA:tbl:sra #1,
-    NCBI:tbl:phred_quality_nocol #1, NCBI:SRA:ABI:common #1
-{
-};
-
-extern function
-__untyped NCBI:SRA:ABI:untyped_1 ();
-
-table NCBI:SRA:ABI:tbl:v1 #1 = NCBI:SRA:ABI:legacy #1,
-    NCBI:tbl:color_space_nocol #1, NCBI:SRA:tbl:spotdesc_nophys #1,
-    NCBI:SRA:tbl:skeyname_nocol #2
-{
-    __untyped = NCBI:SRA:ABI:untyped_1 ();
-
-    // platform in binary
-    INSDC:SRA:platform_id out_platform
-        = .PLATFORM
-        | < INSDC:SRA:platform_id > echo < SRA_PLATFORM_ABSOLID > ();
-
-    // coordinates
-    INSDC:coord:val out_panel_coord = ( INSDC:coord:val )
-        < I32 > cut < NCBI:SRA:coord:panel > ( coords_from_spotname );
-    I32 [ 4 ] coords_from_spotname
-        = NCBI:SRA:extract_coordinates < SRA_PLATFORM_ABSOLID > ( out_spot_name );
-    ascii out_spot_name
-        = INSDC:SRA:format_spot_name ( out_name_fmt, out_x_coord, out_y_coord );
-
-    // bases and quality
-    INSDC:2cs:packed out_2cs_packed = .CSREAD;
-    INSDC:dna:text out_cs_key = .CS_KEY;
-    INSDC:quality:phred out_qual_phred = .QUALITY;
-
-    // fixed_spot_len
-    INSDC:coord:len static_fixed_spot_len = spot_len;
-
-    NCBI:SRA:swapped_fsamp4 out_signal_swapped = .SIGNAL;
-
-    // stray compatibility columns
-    physical column INSDC:dna:text .FLOW_CHARS;
-    physical column INSDC:dna:text .KEY_SEQUENCE;
-    physical column INSDC:dna:text .LINKER_SEQUENCE;
-};
diff --git a/libs/sra/libsra-schema.vers.h b/libs/sra/libsra-schema.vers.h
deleted file mode 100644
index 900a645..0000000
--- a/libs/sra/libsra-schema.vers.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- *============================================================================
- *
- */
-
-#define LIBVDB_VERS 0x02060004
diff --git a/libs/sra/libsradb.vers.h b/libs/sra/libsradb.vers.h
deleted file mode 100644
index 5c564cb..0000000
--- a/libs/sra/libsradb.vers.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define LIBSRADB_VERS 0x0301000D
diff --git a/libs/sra/libsrareader.vers.h b/libs/sra/libsrareader.vers.h
deleted file mode 100644
index 4def933..0000000
--- a/libs/sra/libsrareader.vers.h
+++ /dev/null
@@ -1 +0,0 @@
-#define LIBSRAREADER_VERS 0x01010006
diff --git a/libs/sra/libsraschema.vers.h b/libs/sra/libsraschema.vers.h
deleted file mode 100644
index 98a217f..0000000
--- a/libs/sra/libsraschema.vers.h
+++ /dev/null
@@ -1 +0,0 @@
-#define LIBSRASCHEMA_VERS 0x01010000
diff --git a/libs/sra/libwsradb.vers.h b/libs/sra/libwsradb.vers.h
deleted file mode 100644
index c3d917e..0000000
--- a/libs/sra/libwsradb.vers.h
+++ /dev/null
@@ -1 +0,0 @@
-#define LIBWSRADB_VERS 0x0301000D
diff --git a/libs/sra/libwsraschema.vers.h b/libs/sra/libwsraschema.vers.h
deleted file mode 100644
index 9601db1..0000000
--- a/libs/sra/libwsraschema.vers.h
+++ /dev/null
@@ -1 +0,0 @@
-#define LIBWSRASCHEMA_VERS 0x01010000
diff --git a/libs/sra/reader-abi.c b/libs/sra/reader-abi.c
deleted file mode 100644
index 3399c94..0000000
--- a/libs/sra/reader-abi.c
+++ /dev/null
@@ -1,473 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <sra/rd-extern.h>
-
-#include <klib/rc.h>
-#include <sra/types.h>
-#include <sra/abi.h>
-#include <sysalloc.h>
-#include <klib/text.h>
-
-#include "reader-cmn.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-
-typedef enum AbsolidReaderOptions_enum {
-    eOrigFormat  = 0x02,
-    eSignal      = 0x04,
-    eClipQual    = 0x08
-} AbsolidReaderOptions;
-
-/* column order is important here: see Init function below!!! */
-static
-const SRAReaderColumn AbsolidReader_master_columns_desc[] = {
-    {SRAREADER_COL_MANDATORY, "CSREAD", insdc_csfasta_t, NULL, NULL, 0},
-    {SRAREADER_COL_MANDATORY, "CS_KEY", insdc_fasta_t, NULL, NULL, 0},
-    {SRAREADER_COL_MANDATORY, "QUALITY", insdc_phred_t, NULL, NULL, 0},
-    {eClipQual, "TRIM_START", "INSDC:coord:zero", NULL, NULL, 0},
-    {eClipQual, "TRIM_LEN", "INSDC:coord:len", NULL, NULL, 0},
-    {eSignal | SRAREADER_COL_OPTIONAL, "SIGNAL", ncbi_fsamp4_t, NULL, NULL, 0},
-    {SRAREADER_COL_MANDATORY, NULL, NULL, NULL, NULL, 0} /* terminator */
-};
-
-struct AbsolidReader {
-    /* SRAReader always must be a first member! */
-    SRAReader dad;
-    uint32_t minReadLen;
-    /* current spot data shortcuts */
-    const SRAReaderColumn* csread;
-    const char** cs_key;
-    const SRAReaderColumn* qual1;
-    const INSDC_coord_zero** trim_start;
-    const INSDC_coord_len** trim_len;
-    const float** signal;
-    char prefix_buf[1024];
-    size_t prefix_sz;
-};
-
-static
-rc_t AbsolidReaderInit(const AbsolidReader* self,
-                       bool origFormat, bool noClip, uint32_t minReadLen, bool signal)
-{
-    rc_t rc = 0;
-    int options = origFormat ? eOrigFormat : 0;
-
-    CHECK_SELF(AbsolidReader);
-
-    options |= signal ? eSignal : 0;
-    options |= noClip ? 0 : eClipQual;
-    me->minReadLen = minReadLen;
-
-    if( (rc = SRAReaderInit(&self->dad, options, AbsolidReader_master_columns_desc)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &AbsolidReader_master_columns_desc[0], &me->csread, NULL)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &AbsolidReader_master_columns_desc[1], NULL, (const void***)&self->cs_key)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &AbsolidReader_master_columns_desc[2], &me->qual1, NULL)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &AbsolidReader_master_columns_desc[3], NULL, (const void***)&self->trim_start)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &AbsolidReader_master_columns_desc[4], NULL, (const void***)&self->trim_len)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &AbsolidReader_master_columns_desc[5], NULL, (const void***)&self->signal)) == 0 ) {
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC AbsolidReaderMake(const AbsolidReader** self, const SRATable* table,
-                                     const char* accession, bool origFormat,
-                                     bool noClip, uint32_t minReadLen,
-                                     spotid_t minSpotId, spotid_t maxSpotId, bool signal)
-{
-    rc_t rc = SRAReaderMake((const SRAReader**)self, sizeof **self, table, accession, minSpotId, maxSpotId);
-
-    if( rc == 0 ) {
-        rc = AbsolidReaderInit(*self, origFormat, noClip, minReadLen, signal);
-    }
-    if( rc != 0 ) {
-        AbsolidReaderWhack(*self);
-        *self = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC AbsolidReaderWhack(const AbsolidReader* self)
-{
-    return SRAReaderWhack(&self->dad);
-}
-
-LIB_EXPORT rc_t CC AbsolidReaderFirstSpot(const AbsolidReader* self)
-{
-    return SRAReaderFirstSpot(&self->dad);
-}
-
-LIB_EXPORT rc_t CC AbsolidReaderSeekSpot(const AbsolidReader* self, spotid_t spot)
-{
-    return SRAReaderSeekSpot(&self->dad, spot);
-}
-
-LIB_EXPORT rc_t CC AbsolidReaderNextSpot(const AbsolidReader* self)
-{
-    return SRAReaderNextSpot(&self->dad);
-}
-
-LIB_EXPORT rc_t CC AbsolidReaderCurrentSpot(const AbsolidReader* self, spotid_t* spot)
-{
-    return SRAReaderCurrentSpot(&self->dad, spot);
-}
-
-LIB_EXPORT rc_t CC AbsolidReader_SpotInfo(const AbsolidReader* self,
-                                          const char** spotname, size_t* spotname_sz,
-                                          uint32_t* spot_len, uint32_t* num_reads)
-{
-    rc_t rc = SRAReader_SpotInfo(&self->dad, spotname, spotname_sz, spot_len, num_reads);
-    if( rc == 0 ) {
-        if( spot_len ) {
-            if( self->dad.options & eClipQual ) {
-                *spot_len = **self->trim_len;
-            }
-            if( *spot_len < self->minReadLen ) {
-                *spot_len = 0;
-            }
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC AbsolidReaderSpotName(const AbsolidReader* self,
-                                         const char** prefix, size_t* prefix_sz,
-                                         const char** suffix, size_t* suffix_sz)
-{
-    rc_t rc = 0;
-    const char* spotname;
-    size_t spotname_sz;
-
-    CHECK_SELF(AbsolidReader);
-
-    rc = SRAReader_SpotInfo(&self->dad, &spotname, &spotname_sz, NULL, NULL);
-    if( rc == 0 ) {
-        if( !self->prefix_sz || self->prefix_sz > spotname_sz || strncmp(spotname, self->prefix_buf, self->prefix_sz) != 0 ) {
-            if( spotname_sz == 0 ) {
-                me->prefix_sz = 0;
-            } else {
-                int k = 0;
-                size_t psz = spotname_sz;
-                while( psz > 0 && k < 3 ) {
-                    /* take out PLATE_X_Y and optional label _(F|R)3 */
-                    while( psz > 0 && isdigit( *(spotname + psz - 1)) ) {
-                        psz--;
-                    }
-
-                    if( *(spotname + psz - 1) == 'F' || *(spotname + psz - 1) == 'R') {
-                        /* Discard F|R and preceding underscore */
-                        if( --psz > 0 && !isdigit(*(spotname + psz - 1)) ) {
-                            psz--;
-                        }
-                        continue;
-                    } else if( psz > 0 ) {
-                        /* Discard underscore */
-                        psz--;
-                        k++;
-                    }
-                }
-                if( psz > 0 ) {
-                    /* Add one to restore underscore at end of prefix */
-                    me->prefix_sz = psz + 1;
-                    string_copy(me->prefix_buf, sizeof(me->prefix_buf), spotname, me->prefix_sz);
-                } else {
-                    me->prefix_sz = 0;
-                }
-            }
-            me->prefix_buf[me->prefix_sz] = '\0';
-        }
-        if( suffix ) {
-            *suffix = &spotname[self->prefix_sz];
-        }
-        if( suffix_sz ) {
-            *suffix_sz = spotname_sz - self->prefix_sz;
-        }
-        if( prefix ) {
-            *prefix = self->prefix_buf;
-        }
-        if( prefix_sz ) {
-            *prefix_sz = self->prefix_sz;
-        }
-    }
-    return rc;
-
-}
-
-LIB_EXPORT rc_t CC AbsolidReader_SpotReadInfo(const AbsolidReader* self, uint32_t readId, SRAReadTypes* read_type, 
-                                              const char** read_label, INSDC_coord_len* read_label_sz,
-                                              INSDC_coord_zero* read_start, INSDC_coord_len* read_len)
-{
-    INSDC_coord_zero rs;
-    INSDC_coord_len rl;
-
-    rc_t rc = SRAReader_SpotReadInfo(&self->dad, readId, read_type, read_label, read_label_sz, &rs, &rl);
-    if( rc == 0 ) {
-        if( read_start || read_len ) {
-            if( self->dad.options & eClipQual ) {
-                INSDC_coord_zero end = rs + rl - 1;
-                INSDC_coord_zero trim_end = ((**self->trim_start) + (**self->trim_len)) - 1;
-                if( end < (**self->trim_start) || rs > trim_end ) {
-                    rl = 0;
-                } else {
-                    if( (**self->trim_start) > rs && (**self->trim_start) <= end ) {
-                        rl -= (**self->trim_start) - rs;
-                        rs = (**self->trim_start);
-                    }
-                    if( end > trim_end ) {
-                        rl = trim_end - rs + 1;
-                    }
-                }
-            }
-            if( rl < self->minReadLen ) {
-                rl = 0;
-            }
-            if( read_start ) {
-                *read_start = rl ? rs : 0;
-            }
-            if( read_len ) {
-                *read_len = rl;
-            }
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC AbsolidReaderHeader(const AbsolidReader* self, uint32_t readId, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    int ret = 0;
-
-    const char* spotname;
-    size_t x;
-    int spotname_sz;
-    INSDC_coord_len read_label_sz = 0;
-    const char* read_label;
-
-    CHECK_SELF(AbsolidReader);
-    CHECK_SPOT(self->dad);
-
-    if( (rc = AbsolidReaderSpotName(me, NULL, NULL, &spotname, &x)) != 0 ) {
-        return rc;
-    }
-    spotname_sz = (int)x;
-    if( readId > 0 ) {
-        if( (rc = AbsolidReader_SpotReadInfo(self, readId, NULL, &read_label, &read_label_sz, NULL, NULL)) != 0 ) {
-            return rc;
-        }
-    }
-    if( self->dad.options & eOrigFormat ) {
-        char tmp[1024];
-        if( spotname_sz == 0 ) {
-            spotname_sz = snprintf(tmp, sizeof(tmp) - 1, "%s.%ld", self->dad.accession, self->dad.spot);
-            if ( spotname_sz < 0 )
-                return RC ( rcSRA, rcString, rcConstructing, rcData, rcCorrupt );
-            spotname = tmp;
-        }
-        if( readId > 0 && read_label_sz > 0 ) {
-            ret = snprintf(data, dsize, ">%.*s%s%.*s", spotname_sz, spotname, spotname_sz ? "_" : "", read_label_sz, read_label);
-        } else {
-            ret = snprintf(data, dsize, ">%.*s", spotname_sz, spotname);
-        }
-    } else {
-        if( readId > 0 && read_label_sz > 0 ) {
-            ret = snprintf(data, dsize, ">%s.%ld %.*s%s%.*s",
-                self->dad.accession, self->dad.spot, spotname_sz, spotname, spotname_sz ? "_" : "", read_label_sz, read_label);
-        } else {
-            ret = snprintf(data, dsize, ">%s.%ld %.*s",
-                           self->dad.accession, self->dad.spot, spotname_sz, spotname);
-        }
-    }
-#if SNPRINTF_ACTUALLY_WORKED_THE_WAY_YOU_THINK
-    if( ret < 0 ) {
-        ret = 0;
-        rc = RC(rcSRA, rcString, rcConstructing, rcMessage, rcUnknown);
-    } else if( ret >= (int)dsize ) {
-#else
-    if( ret < 0 || ret >= (int)dsize ) {
-#endif
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-    }
-    if( written != NULL ) {
-        *written = ret;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC AbsolidReaderBase(const AbsolidReader* self, uint32_t readId, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    INSDC_coord_zero read_start = 0;
-    INSDC_coord_len read_len = 0;
-
-    CHECK_SELF(AbsolidReader);
-    CHECK_SPOT(self->dad);
-
-    if( readId > 0 ) {
-        if( (rc = AbsolidReader_SpotReadInfo(self, readId--, NULL, NULL, NULL, &read_start, &read_len)) != 0 ) {
-            return rc;
-        }
-    } else {
-        return RC(rcSRA, rcFormatter, rcConstructing, rcFormat, rcUnsupported);
-    }
-    if( read_len < self->minReadLen ) {
-        read_len = 0;
-    }
-    /* for cs_key */
-    read_len++;
-    if( written != NULL ) {
-        *written = read_len;
-    }
-    if( read_len >= dsize ) {
-        return RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-    } else {
-        const char* b = self->csread->base;
-        data[0] = (*me->cs_key)[readId];
-        memcpy(&data[1], &b[read_start], read_len - 1);
-    }
-    data[read_len] = '\0';
-    return rc;
-}
-
-LIB_EXPORT rc_t CC AbsolidReaderQuality(const AbsolidReader* self, uint32_t readId, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    INSDC_coord_zero read_start = 0;
-    INSDC_coord_len j = 0, read_len = 0;
-
-    CHECK_SELF(AbsolidReader);
-    CHECK_SPOT(self->dad);
-
-    if( readId > 0 ) {
-        if( (rc = AbsolidReader_SpotReadInfo(self, readId, NULL, NULL, NULL, &read_start, &read_len)) != 0 ) {
-            return rc;
-        }
-    } else {
-        return RC(rcSRA, rcFormatter, rcConstructing, rcFormat, rcUnsupported);
-    }
-    if( read_len >= self->minReadLen && me->qual1->size ) {
-        const int8_t* q = me->qual1->base;
-        char* d = data;
-        INSDC_coord_len i;
-
-        /* read end */
-        read_len += read_start;
-        for(i = read_start; i < read_len; i++) {
-            int x;
-            if( j + 2 > dsize ) {
-                /* do not overflow buffer in case it's too small */
-                d = data;
-            }
-            x = snprintf(d, dsize - j, "%i ", (int)(q[i]));
-            if ( x < 0 )
-                return RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-            d += x;
-            j += x;
-        }
-        j--;
-        d[j] = '\0';
-    }
-    if( written != NULL ) {
-        *written = j;
-    }
-    if( j >= dsize ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-    }
-    return rc;
-}
-
-static
-rc_t AbsolidReaderSignal(const AbsolidReader* self, uint32_t readId, int idx, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    INSDC_coord_len j = 0;
-
-    CHECK_SELF(AbsolidReader);
-    CHECK_SPOT(self->dad);
-
-    if( me->signal != NULL ) {
-        INSDC_coord_zero read_start = 0;
-        INSDC_coord_len read_len = 0;
-        if( readId > 0 ) {
-            if( (rc = AbsolidReader_SpotReadInfo(self, readId, NULL, NULL, NULL, &read_start, &read_len)) != 0 ) {
-                return rc;
-            }
-        } else {
-            return RC(rcSRA, rcFormatter, rcConstructing, rcFormat, rcUnsupported);
-        }
-        if( read_len >= self->minReadLen ) {
-            const float* s = *me->signal;
-            char* d = data;
-            INSDC_coord_len i;
-
-            /* read end */
-            read_len += read_start;
-            for(i = read_start; i < read_len; i++) {
-                int x;
-                if( j + 9 > dsize ) {
-                    /* do not overflow buffer in case it's too small */
-                    d = data;
-                }
-                x = snprintf(d, dsize - j, "%.6g ", s[i * 4 + idx]);
-                if ( x < 0 )
-                    return RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-                d += x;
-                j += x;
-            }
-            *d = '\0';
-            --j;
-        }
-    }
-    if( written != NULL ) {
-        *written = j;
-    }
-    if( j >= dsize ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-    }
-    return rc;
-
-}
-
-LIB_EXPORT rc_t CC AbsolidReaderSignalFTC(const AbsolidReader* self, uint32_t readId, char* data, size_t dsize, size_t* written)
-{
-    return AbsolidReaderSignal(self, readId, 0, data, dsize, written);
-}
-
-LIB_EXPORT rc_t CC AbsolidReaderSignalCY3(const AbsolidReader* self, uint32_t readId, char* data, size_t dsize, size_t* written)
-{
-    return AbsolidReaderSignal(self, readId, 1, data, dsize, written);
-}
-
-LIB_EXPORT rc_t CC AbsolidReaderSignalTXR(const AbsolidReader* self, uint32_t readId, char* data, size_t dsize, size_t* written)
-{
-    return AbsolidReaderSignal(self, readId, 2, data, dsize, written);
-}
-
-LIB_EXPORT rc_t CC AbsolidReaderSignalCY5(const AbsolidReader* self, uint32_t readId, char* data, size_t dsize, size_t* written)
-{
-    return AbsolidReaderSignal(self, readId, 3, data, dsize, written);
-}
diff --git a/libs/sra/reader-cmn.c b/libs/sra/reader-cmn.c
deleted file mode 100644
index dff7544..0000000
--- a/libs/sra/reader-cmn.c
+++ /dev/null
@@ -1,379 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <sra/extern.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <sra/types.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include "sra-debug.h"
-#include "reader-cmn.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-/* mandatory columns used by generic reader */
-/* column order is IMPORTANT here: see Init function below!!! */
-static
-const SRAReaderColumn SRAReader_mandatory_cols[] = {
-    {SRAREADER_COL_OPTIONAL, "NAME", "ascii", NULL, NULL, 0},
-    {SRAREADER_COL_MANDATORY, "SPOT_LEN", "INSDC:coord:len", NULL, NULL, 0},
-    {SRAREADER_COL_MANDATORY, "READ_START", "INSDC:coord:zero", NULL, NULL, 0},
-    {SRAREADER_COL_MANDATORY, "READ_LEN", "INSDC:coord:len", NULL, NULL, 0},
-    {SRAREADER_COL_MANDATORY, "READ_TYPE", sra_read_type_t, NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL, "LABEL", vdb_ascii_t, NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL, "LABEL_START", "INSDC:coord:zero", NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL, "LABEL_LEN", "INSDC:coord:len", NULL, NULL, 0},
-};
-
-static
-rc_t SRAReader_ColumnsOpen(SRAReader *self)
-{
-    rc_t rc = 0;
-    int i = 0;
-
-    while(self->cols[i].name != NULL) {
-        if( self->cols[i].opt == SRAREADER_COL_MANDATORY || (self->options & self->cols[i].opt) ) {
-            rc = SRATableOpenColumnRead(self->table, &self->cols[i].col, self->cols[i].name, self->cols[i].datatype);
-            if( rc != 0 ) {
-                if( ((self->cols[i].opt & SRAREADER_COL_OPTIONAL) && GetRCState(rc) == rcNotFound) ) {
-                    PLOGERR(klogInfo, (klogWarn, rc, "column $(c)", PLOG_S(c), self->cols[i].name));
-                    rc = 0;
-                } else if( GetRCState(rc) == rcExists ) {
-                    rc = 0;
-                } else {
-                    PLOGERR(klogInfo, (klogErr, rc, "column $(c)", PLOG_S(c), self->cols[i].name));
-                    break;
-                }
-            }
-        }
-        i++;
-    }
-    return rc;
-}
-
-static rc_t SRAReader_ColumnsRead( SRAReader * self )
-{
-    rc_t rc = 0;
-    int i = 0;
-
-    while ( self->cols[ i ].name != NULL )
-    {
-        if ( self->cols[ i ].col != NULL )
-        {
-            bitsz_t bitofs = 0;
-            rc = SRAColumnRead( self->cols[ i ].col, self->spot, &self->cols[ i ].base, &bitofs, &self->cols[ i ].size );
-            if ( rc != 0 || bitofs != 0 )
-            {
-                SRADBG (( "%s: read column %s spot %u %R\n", __func__, self->cols[i].name, self->spot, rc ));
-                break;
-            }
-        }
-        self->cols[ i ].size /= 8;
-        i++;
-    }
-    return rc;
-}
-
-static
-void SRAReader_ColumnsRelease(SRAReader *self)
-{
-    rc_t rc = 0;
-    int i = 0;
-
-    while(self->cols[i].name != NULL) {
-        if(self->cols[i].col != NULL && (rc = SRAColumnRelease(self->cols[i].col)) != 0) {
-            SRADBG (("%s: release column %s %R\n",
-                     __func__, self->cols[i].name, rc));
-        }
-        self->cols[i++].col = NULL;
-    }
-}
-
-static
-rc_t SRAReaderAlloc(SRAReader** reader, size_t size, const char* accession)
-{
-    if( reader == NULL || size < sizeof(**reader) || accession == NULL || accession[0] == '\0' ) {
-        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
-    }
-    *reader = calloc(1, size);
-    if( *reader == NULL ) {
-        return RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
-    } else {
-		(*reader)->accession = strdup(accession);
-        if( (*reader)->accession == NULL ) {
-            free(*reader);
-            *reader = NULL;
-            return RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
-        }
-    }
-    return 0;
-}
-
-rc_t SRAReaderInit(const SRAReader* self, int options, const SRAReaderColumn* const cols)
-{
-    rc_t rc = 0;
-    int i = 0, j = 0, m = sizeof(SRAReader_mandatory_cols) / sizeof(SRAReaderColumn);
-    const SRAReaderColumn* col_read_len;
-
-    CHECK_SELF(SRAReader);
-    if( cols == NULL ) {
-        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
-    }
-    me->options = SRAREADER_COL_OPTIONAL | options; /* always try to open optional cols */
-    /* copy mandatory columns */
-    memcpy(me->cols, SRAReader_mandatory_cols, sizeof(SRAReader_mandatory_cols));
-    /* copy reader specific columns */
-    for(i = 0; cols[i].name != NULL && m < 64; i++, m++) {
-        for(j = 0; j < m; j++) {
-            if( strcmp(cols[i].name, self->cols[j].name) == 0 &&
-                strcmp(cols[i].datatype, self->cols[j].datatype) == 0 ) {
-                return RC(rcSRA, rcFormatter, rcConstructing, rcData, rcDuplicate);
-            }
-        }
-        memcpy(&me->cols[m], &cols[i], sizeof(SRAReaderColumn));
-    }
-    if( (rc = SRAReader_ColumnsOpen(me)) == 0 &&
-        (rc = SRAReader_FindColData(me, &SRAReader_mandatory_cols[0], &me->spot_name, NULL)) == 0 &&
-        (rc = SRAReader_FindColData(me, &SRAReader_mandatory_cols[1], NULL, (const void***)&self->spot_len)) == 0 &&
-        (rc = SRAReader_FindColData(me, &SRAReader_mandatory_cols[2], NULL, (const void***)&self->read_start)) == 0 &&
-        (rc = SRAReader_FindColData(me, &SRAReader_mandatory_cols[3], NULL, (const void***)&self->read_len)) == 0 &&
-        (rc = SRAReader_FindColData(me, &SRAReader_mandatory_cols[3], &col_read_len, NULL)) == 0 &&
-        (rc = SRAReader_FindColData(me, &SRAReader_mandatory_cols[4], NULL, (const void***)&self->read_type)) == 0 &&
-        (rc = SRAReader_FindColData(me, &SRAReader_mandatory_cols[5], NULL, (const void***)&self->label)) == 0 &&
-        (rc = SRAReader_FindColData(me, &SRAReader_mandatory_cols[6], NULL, (const void***)&self->label_start)) == 0 &&
-        (rc = SRAReader_FindColData(me, &SRAReader_mandatory_cols[7], NULL, (const void***)&self->label_len)) == 0 ) {
-        ((SRAReader*)self)->read_len_size = &col_read_len->size;
-    }
-    return rc;
-}
-
-rc_t SRAReaderMake(const SRAReader** self, size_t size, const SRATable* table,
-                   const char* accession, spotid_t minSpotId, spotid_t maxSpotId)
-{
-    rc_t rc = 0;
-    SRAReader* me = NULL;
-
-    if( table == NULL ) {
-        rc = RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
-    } else {
-        if( (rc = SRAReaderAlloc(&me, size, accession)) == 0 ) {
-            me->table = table;
-            if( (rc = SRATableMinSpotId(me->table, &me->minSpotId)) == 0 &&
-                (rc = SRATableMaxSpotId(me->table, &me->maxSpotId)) == 0 ) {
-                if( rc == 0 && minSpotId > 0 && (rc = SRAReaderSeekSpot(me, minSpotId)) == 0 ) {
-                    me->minSpotId = minSpotId;
-                }
-                if( rc == 0 && maxSpotId > 0 && (rc = SRAReaderSeekSpot(me, maxSpotId)) == 0 ) {
-                    me->maxSpotId = maxSpotId;
-                }
-            }
-            /* reset after seekspot to initial state */
-            me->spot = 0;
-        }
-    }
-    if( rc != 0 ) {
-        SRAReaderWhack(me);
-    } else {
-        *self = me;
-    }
-    return rc;
-}
-
-rc_t SRAReaderWhack ( const SRAReader* self )
-{
-    if( self != NULL) {
-        SRAReader* me = (SRAReader*)self;
-        SRAReader_ColumnsRelease(me);
-        free(me->accession);
-        free(me);
-    }
-    return 0;
-}
-
-rc_t SRAReader_FindColData ( const SRAReader* self,
-        const SRAReaderColumn* definition, const SRAReaderColumn** col, const void*** base )
-{
-    int i;
-
-    CHECK_SELF(SRAReader);
-    if( definition == NULL || (col == NULL && base == NULL) ) {
-        return RC(rcSRA, rcFormatter, rcAccessing, rcParam, rcNull);
-    }
-    if( definition->opt != 0 && !(self->options & definition->opt) ) {
-        return 0;
-    }
-    for(i = 0; me->cols[i].name != NULL; i++) {
-        if( self->cols[i].col != NULL &&
-            strcmp(self->cols[i].name, definition->name) == 0 &&
-            strcmp(self->cols[i].datatype, definition->datatype) == 0 ) {
-            if( col != NULL ) {
-                *col = &self->cols[i];
-            } else {
-                *base = (const void**)&self->cols[i].base;
-            }
-            return 0;
-        }
-    }
-    return (definition->opt & SRAREADER_COL_OPTIONAL) ? 0 : RC(rcSRA, rcFormatter, rcAccessing, rcColumn, rcNotFound);
-}
-
-rc_t SRAReaderFirstSpot ( const SRAReader* self )
-{
-    CHECK_SELF(SRAReader);
-    return SRAReaderSeekSpot(me, self->minSpotId);
-}
-
-rc_t SRAReaderSeekSpot ( const SRAReader* self, spotid_t spot )
-{
-    rc_t rc = 0;
-
-    CHECK_SELF(SRAReader);
-
-    if( spot < self->minSpotId ) {
-        return RC(rcSRA, rcFormatter, rcAccessing, rcRow, rcTooShort);
-    }
-    if( spot > self->maxSpotId ) {
-        return RC(rcSRA, rcFormatter, rcAccessing, rcRow, rcTooBig);
-    }
-    if( me->spot != spot ) {
-        me->spot = spot;
-        if( (rc = SRAReader_ColumnsRead(me)) != 0 ) {
-            me->spot = 0;
-        }
-    }
-    return rc;
-}
-
-rc_t SRAReaderNextSpot( const SRAReader* self )
-{
-    rc_t rc = 0;
-
-    CHECK_SELF(SRAReader);
-    CHECK_SPOT(*self);
-
-    me->spot++;
-    while( me->spot <= self->maxSpotId ) {
-        if( (rc = SRAReader_ColumnsRead(me)) == 0 ) {
-            return 0;
-        }
-        if( GetRCState(rc) != rcNotFound ) {
-            me->spot = 0;
-            return rc;
-        }
-        me->spot++;
-    }
-    CHECK_SPOT(*self);
-    return 0;
-}
-
-rc_t SRAReaderCurrentSpot( const SRAReader* self, spotid_t* spot)
-{
-    CHECK_SELF(SRAReader);
-    if( spot == NULL ) {
-        return RC(rcSRA, rcFormatter, rcAccessing, rcParam, rcNull);
-    }
-    CHECK_SPOT(*self);
-    *spot = me->spot;
-    return 0;
-}
-
-rc_t SRAReader_SpotInfo( const SRAReader* self, const char** spotname, size_t* spotname_sz,
-                                                uint32_t* spot_len, uint32_t* num_reads )
-{
-    CHECK_SELF(SRAReader);
-    CHECK_SPOT(*self);
-
-    if( spotname && !spotname_sz ) {
-        return RC(rcSRA, rcFormatter, rcAccessing, rcParam, rcInvalid);
-    }
-    if( spotname ) {
-        if( me->spot_name ) {
-            *spotname = me->spot_name->base;
-            *spotname_sz = me->spot_name->size;
-	        if( *spotname && *spotname_sz && (*spotname)[*spotname_sz - 1] == '\0' ) {
-	            /* Consider zero-padded spotname */
-	            *spotname_sz = strlen(*spotname);
-	        }
-        } else {
-            *spotname = "";
-            *spotname_sz = 0;
-        }
-    }
-    if( spot_len ) {
-        *spot_len = **self->spot_len;
-    }
-    if( num_reads ) {
-        *num_reads = (*self->read_len_size) / sizeof(**self->read_len);
-    }
-    return 0;
-}
-
-rc_t SRAReader_SpotReadInfo( const SRAReader* self, uint32_t readId, SRAReadTypes* read_type,
-                             const char** read_label, INSDC_coord_len* read_label_sz,
-                             INSDC_coord_zero* read_start, INSDC_coord_len* read_len )
-{
-    CHECK_SELF(SRAReader);
-    CHECK_SPOT(*self);
-
-    if( read_label && !read_label_sz ) {
-        return RC(rcSRA, rcFormatter, rcAccessing, rcParam, rcInvalid);
-    }
-    if( readId < 1 || readId > ((*(me->read_len_size)) / sizeof(**self->read_len)) ) {
-        return RC(rcSRA, rcTable, rcReading, rcId, rcInvalid);
-    }
-    --readId;
-    if( read_start ) {
-        *read_start = (*self->read_start)[readId];
-    }
-    if( read_len ) {
-        *read_len = (*self->read_len)[readId];
-    }
-    if( read_type ) {
-        *read_type = (*self->read_type)[readId];
-    }
-    if( read_label ) {
-        if( self->label && self->label_start && self->label_len ) {
-            *read_label = &((*self->label)[(*self->label_start)[readId]]);
-            *read_label_sz = (*self->label_len)[readId];
-        } else {
-            *read_label = "";
-            *read_label_sz = 0;
-        }
-    }
-    return 0;
-}
-
-rc_t SRAReader_GetCurrentSpotData( const SRAReader* self, char *data, size_t dsize, size_t* written )
-{
-    return RC(rcSRA, rcFormatter, rcReading, rcInterface, rcIncomplete);
-}
-
-rc_t SRAReader_GetNextSpotData( const SRAReader* self, char *data, size_t dsize, size_t* written )
-{
-    return RC(rcSRA, rcFormatter, rcReading, rcInterface, rcIncomplete);
-}
diff --git a/libs/sra/reader-cmn.h b/libs/sra/reader-cmn.h
deleted file mode 100644
index 21a5b9e..0000000
--- a/libs/sra/reader-cmn.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_sra_reader_
-#define _h_sra_reader_
-
-#ifndef _h_sra_sradb_
-#include <sra/sradb.h>
-#endif
-
-#define SRAREADER_COL_MANDATORY 0x00
-#define SRAREADER_COL_OPTIONAL 0x01
-
-typedef struct SRAReaderColumn_struct {
-    uint32_t opt;
-    const char* name;
-    const char* datatype;
-    const SRAColumn* col;
-    const void* base;
-    bitsz_t size;
-} SRAReaderColumn;
-
-typedef struct SRAReader_struct {
-    char* accession;
-    const SRATable* table;
-    spotid_t minSpotId;
-    spotid_t maxSpotId;
-    uint32_t options;
-    SRAReaderColumn cols[64]; /* max of 64 columns, must be enough, last one must have NULL name */
-    /* current spot data */
-    spotid_t spot;
-    const SRAReaderColumn* spot_name;
-    const INSDC_coord_len** spot_len;
-    const INSDC_coord_zero** read_start;
-    const INSDC_coord_len** read_len;
-    const bitsz_t* read_len_size;
-    const SRAReadTypes** read_type;
-    const char** label;
-    const INSDC_coord_zero** label_start;
-    const INSDC_coord_len** label_len;
-} SRAReader;
-
-/* Common macro for self pointer and current spot state validation */
-#define CHECK_SELF(ObjType) \
-                   ObjType* me = (ObjType*)self; \
-                   if(self == NULL) { \
-                       return RC(rcSRA, rcFormatter, rcAccessing, rcSelf, rcNull); \
-                   }
-
-#define CHECK_SPOT(Obj) \
-                   if( (Obj).spot < (Obj).minSpotId ) { \
-                       return RC(rcSRA, rcFormatter, rcAccessing, rcRow, rcUnknown); \
-                   } \
-                   if( (Obj).spot > (Obj).maxSpotId ) { \
-                       return RC(rcSRA, rcFormatter, rcAccessing, rcRow, rcExhausted); \
-                   }
-
-rc_t SRAReaderMake(const SRAReader** self, size_t size, const SRATable* table,
-                   const char* accession, spotid_t minSpotId, spotid_t maxSpotId);
-
-rc_t SRAReaderInit(const SRAReader* self, int options, const SRAReaderColumn* const cols);
-
-/* Whack
- *  releases object obtained from SRAReaderMake
- *  or AddRef ( see above )
- */
-rc_t SRAReaderWhack(const SRAReader *self);
-
-/* FindColData
- * find OPENED column by it's definition and return it's base pointer or col struct
- */
-rc_t SRAReader_FindColData(const SRAReader* self, const SRAReaderColumn* definition, const SRAReaderColumn** col, const void*** base);
-
-/* FirstSpot
- *  set current spot to first in the run
- */
-rc_t SRAReaderFirstSpot(const SRAReader* self);
-
-/* SeekSpot
- *  set current spot
- * if error occured current spot position becomes 0
- */
-rc_t SRAReaderSeekSpot(const SRAReader* self, spotid_t spot);
-
-/* NextSpot
- *  Seek to next spot from current
- */
-rc_t SRAReaderNextSpot(const SRAReader* self);
-
-/* CurrentSpot
- *  Get current spot
- *  sopt [OUT] - pointer to assign value of the current spot
- * returns GetRCState(rc) == rcExhausted when out of spots
- */
-rc_t SRAReaderCurrentSpot(const SRAReader* self, spotid_t* spot);
-
-/* SpotInfo
- *  Get current spot information
- *  spotname [OUT] - pointer to assign value of the current spot name (can be NULL)
- *  spotname_sz [OUT] - pointer to assign value of the length of the spot name (can be NULL)
- *  spot_len [OUT] - pointer to assign value of the current spot length (can be NULL)
- *  num_reads[OUT] - pointer to assign value of the number of reads in current spot (can be NULL)
- */
-rc_t SRAReader_SpotInfo(const SRAReader* self, const char** spotname, size_t* spotname_sz,
-                                               uint32_t* spot_len, uint32_t* num_reads);
-
-/* SpotReadInfo
- *  Get read information for current spot
- *  readid    [IN]  - 1-based read id
- *  read_type [OUT] - pointer to assign value of the read type (can be NULL)
- *  read_label[OUT] - pointer to assign value of the read label (can be NULL)
- *  read_label_sz [OUT] - pointer to assign value of the length of the read label (can be NULL)
- *  read_start[OUT] - pointer to assign value of the read start in spot (can be NULL)
- *  read_len  [OUT] - pointer to assign value of the read length (can be NULL)
- *  if start and len is == 0 read is empty
- */
-rc_t SRAReader_SpotReadInfo(const SRAReader* self, uint32_t readId, SRAReadTypes* read_type,
-                            const char** read_label, INSDC_coord_len* read_label_sz,
-                            INSDC_coord_zero* read_start, INSDC_coord_len* read_len);
-
-/* GetCurrentSpotData
- *  retrieve current spot data as a blob
- *  data   [IN] - pointer to buffer for printing
- *  dsize  [IN] - data buffer size
- *  written [IN,OUT] - optional number of bytes occupied by buffer, may by more than dsize
- *  MUST BE SEPARATELY DEFINED for each reader format
- */
-rc_t SRAReader_GetCurrentSpotData(const SRAReader* self, char *data, size_t dsize, size_t* written);
-
-/* GetNextSpotData (streaming function)
- *  move to the next spot and retrieve current spot data as a blob
- *  data   [IN] - pointer to buffer for printing
- *  dsize  [IN] - data buffer size
- *  written [IN,OUT] - optional number of bytes occupied by buffer, may by more than dsize
- *  MUST BE SEPARATELY DEFINED for each reader format
- */
-rc_t SRAReader_GetNextSpotData(const SRAReader* self, char *data, size_t dsize, size_t* written);
-
-#endif /* _h_sra_reader_ */
diff --git a/libs/sra/reader-fastq.c b/libs/sra/reader-fastq.c
deleted file mode 100644
index 2f4b37d..0000000
--- a/libs/sra/reader-fastq.c
+++ /dev/null
@@ -1,623 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <sra/rd-extern.h>
-
-#include <klib/rc.h>
-#include <sra/types.h>
-#include <sra/fastq.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include "reader-cmn.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
-typedef enum FastqReaderOptions_enum {
-    eBaseSpace   = 0x02,
-    eColorSpace  = 0x04,
-    eOrigFormat  = 0x08,
-    ePrintLabel  = 0x10,
-    ePrintReadId = 0x20,
-    eClipQual    = 0x40,
-    eUseQual     = 0x80,
-    eSuppressQualForCSKey   = 0x100     /* added Jan 15th 2014 ( a new fastq-variation! ) */
-} FastqReaderOptions;
-
-/* column order is important here: see Init function below!!! */
-static
-const SRAReaderColumn FastqReader_master_columns_desc[] = {
-    {eBaseSpace, "READ", insdc_fasta_t, NULL, NULL, 0},
-    {eColorSpace, "CSREAD", insdc_csfasta_t, NULL, NULL, 0},
-    {eColorSpace, "CS_KEY", insdc_fasta_t, NULL, NULL, 0},
-    {eUseQual, "QUALITY", insdc_phred_t, NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL, "SPOT_GROUP", vdb_ascii_t, NULL, NULL, 0},
-    {eClipQual, "TRIM_START", "INSDC:coord:zero", NULL, NULL, 0},
-    {eClipQual, "TRIM_LEN", "INSDC:coord:len", NULL, NULL, 0},
-    {SRAREADER_COL_MANDATORY, NULL, NULL, NULL, NULL, 0} /* terminator */
-};
-
-struct FastqReader {
-    /* SRAReader always must be a first member! */
-    SRAReader dad;
-    uint32_t minReadLen;
-    int offset;
-    char csKey;
-    /* current spot data shortcuts */
-    const SRAReaderColumn* read;
-    const SRAReaderColumn* csread;
-    const char** cs_key;
-    const uint8_t** qual1;
-    const SRAReaderColumn* spot_group;
-    const INSDC_coord_zero** trim_start;
-    const INSDC_coord_len** trim_len;
-    /* quality conversion table */
-    char q2ascii[256];
-};
-
-static
-rc_t FastqReaderInit(const FastqReader* self,
-                     bool colorSpace, bool origFormat, bool fasta, bool printLabel, bool printReadId,
-                     bool noClip, bool SuppressQualForCSKey, uint32_t minReadLen, int offset, char csKey)
-{
-    rc_t rc = 0;
-    int options = colorSpace ? eColorSpace : eBaseSpace;
-
-    CHECK_SELF(FastqReader);
-
-    options |= origFormat ? eOrigFormat : 0;
-    options |= printLabel ? ePrintLabel : 0;
-    options |= printReadId ? ePrintReadId : 0;
-    options |= noClip ? 0 : eClipQual;
-    options |= fasta ? 0 : eUseQual;
-    options |= SuppressQualForCSKey ? eSuppressQualForCSKey : 0; /* added Jan 15th 2014 ( a new fastq-variation! ) */
-
-    me->minReadLen = minReadLen;
-    me->offset = offset > 0 ? offset : 33;
-    me->csKey = csKey;
-
-    if( (rc = SRAReaderInit(&self->dad, options, FastqReader_master_columns_desc)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &FastqReader_master_columns_desc[0], &me->read, NULL)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &FastqReader_master_columns_desc[1], &me->csread, NULL)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &FastqReader_master_columns_desc[2], NULL, (const void***)&self->cs_key)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &FastqReader_master_columns_desc[3], NULL, (const void***)&self->qual1)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &FastqReader_master_columns_desc[4], &me->spot_group, NULL)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &FastqReader_master_columns_desc[5], NULL, (const void***)&self->trim_start)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &FastqReader_master_columns_desc[6], NULL, (const void***)&self->trim_len)) == 0 ) {
-        memset(me->q2ascii, '~', sizeof(self->q2ascii));
-        for(options = 0; options < 256; options++) {
-            me->q2ascii[options] = options + self->offset;
-            if( self->q2ascii[options] == '~' ) {
-                break;
-            }
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC FastqReaderMake(const FastqReader** self, const SRATable* table, const char* accession,
-                                   bool colorSpace, bool origFormat, bool fasta, bool printLabel, bool printReadId,
-                                   bool noClip, bool SuppressQualForCSKey, uint32_t minReadLen, char offset, char csKey,
-                                   spotid_t minSpotId, spotid_t maxSpotId)
-{
-    rc_t rc = SRAReaderMake((const SRAReader**)self, sizeof **self, table, accession, minSpotId, maxSpotId);
-
-    if( rc == 0 ) {
-        rc = FastqReaderInit(*self, colorSpace, origFormat, fasta,
-                             printLabel, printReadId, noClip, SuppressQualForCSKey, minReadLen, offset, csKey);
-    }
-    if( rc != 0 ) {
-        FastqReaderWhack(*self);
-        *self = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC FastqReaderWhack(const FastqReader* self)
-{
-    return SRAReaderWhack(&self->dad);
-}
-
-LIB_EXPORT rc_t CC FastqReaderFirstSpot(const FastqReader* self)
-{
-    return SRAReaderFirstSpot(&self->dad);
-}
-
-LIB_EXPORT rc_t CC FastqReaderSeekSpot(const FastqReader* self, spotid_t spot)
-{
-    return SRAReaderSeekSpot(&self->dad, spot);
-}
-
-LIB_EXPORT rc_t CC FastqReaderNextSpot(const FastqReader* self)
-{
-    return SRAReaderNextSpot(&self->dad);
-}
-
-LIB_EXPORT rc_t CC FastqReaderCurrentSpot(const FastqReader* self, spotid_t* spot)
-{
-    return SRAReaderCurrentSpot(&self->dad, spot);
-}
-
-LIB_EXPORT rc_t CC FastqReader_SpotInfo(const FastqReader* self,
-                                        const char** spotname, size_t* spotname_sz,
-                                        const char** spotgroup, size_t* spotgroup_sz,
-                                        uint32_t* spot_len, uint32_t* num_reads)
-{
-    rc_t rc = SRAReader_SpotInfo(&self->dad, spotname, spotname_sz, spot_len, num_reads);
-    if( rc == 0 ) {
-        if( spotgroup && !spotgroup_sz ) {
-            return RC(rcSRA, rcFormatter, rcAccessing, rcParam, rcInvalid);
-        }
-        if( spot_len ) {
-            if( self->dad.options & eClipQual ) {
-                *spot_len = **self->trim_len;
-            }
-            if( *spot_len < self->minReadLen ) {
-                *spot_len = 0;
-            }
-        }
-        if( spotgroup ) {
-            if( self->spot_group != NULL ) {
-                *spotgroup = self->spot_group->base;
-                *spotgroup_sz = self->spot_group->size;
-                if(*spotgroup && *spotgroup_sz && (*spotgroup)[*spotgroup_sz - 1] == '\0' ) {
-                    /* Consider zero-padded spotgroup */
-                    *spotgroup_sz = strlen(*spotgroup);
-                }
-            } else {
-                *spotgroup = NULL;
-                *spotgroup_sz = 0;
-            }
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC FastqReader_SpotReadInfo(const FastqReader* self, uint32_t readId, SRAReadTypes* read_type, 
-                                            const char** read_label, INSDC_coord_len* read_label_sz,
-                                            INSDC_coord_zero* read_start, INSDC_coord_len* read_len)
-{
-    INSDC_coord_zero rs;
-    INSDC_coord_len rl;
-
-    rc_t rc = SRAReader_SpotReadInfo(&self->dad, readId, read_type, read_label, read_label_sz, &rs, &rl);
-    if( rc == 0 ) {
-        if( read_start || read_len ) {
-            if( self->dad.options & eClipQual ) {
-                INSDC_coord_zero end = rs + rl - 1;
-                INSDC_coord_zero trim_end = ((**self->trim_start) + (**self->trim_len)) - 1;
-                if( end < (**self->trim_start) || rs > trim_end ) {
-                    rl = 0;
-                } else {
-                    if( (**self->trim_start) > rs && (**self->trim_start) <= end ) {
-                        rl -= (**self->trim_start) - rs;
-                        rs = (**self->trim_start);
-                    }
-                    if( end > trim_end ) {
-                        rl = trim_end - rs + 1;
-                    }
-                }
-            }
-            if( rl < self->minReadLen ) {
-                rl = 0;
-            }
-            if( read_start ) {
-                *read_start = rl ? rs : 0;
-            }
-            if( read_len ) {
-                *read_len = rl;
-            }
-        }
-    }
-    return rc;
-}
-
-static
-rc_t FastqReader_Header(const FastqReader* self, bool* label, 
-                        char* buf, size_t maxlen, size_t* written,
-                        char prefix, int readId)
-{
-    rc_t rc = 0;
-    int ret = 0;
-
-    const char* spotname;
-    size_t x;
-    int spotname_sz;
-    uint32_t spot_len;
-    uint32_t num_reads;
-    INSDC_coord_len read_len, read_label_sz = 0;
-    const char* read_label;
-    bool addLabel = label ? *label : (self->dad.options & ePrintLabel);
-
-    if( (rc = FastqReader_SpotInfo(self, &spotname, &x, NULL, NULL, &spot_len, &num_reads)) != 0 ) {
-        return rc;
-    }
-    spotname_sz = (int)x;
-    if( readId > 0 ) {
-        if( (rc = FastqReader_SpotReadInfo(self, readId, NULL, &read_label, &read_label_sz, NULL, &read_len)) != 0 ) {
-            return rc;
-        }
-    }
-    /* do not add empty labels */
-    addLabel = read_label_sz > 0 ? addLabel : false;
-
-    if( self->dad.options & eOrigFormat ) {
-        char tmp[1024];
-        if( spotname_sz == 0 ) {
-            ret = snprintf(tmp, sizeof(tmp) - 1, "%s.%ld", self->dad.accession, self->dad.spot);
-            if ( ret < 0 )
-                return RC ( rcSRA, rcString, rcConstructing, rcData, rcCorrupt );
-            spotname = tmp;
-            spotname_sz = ret;
-        }
-        if( addLabel && readId > 0 ) {
-            ret = snprintf(buf, maxlen, "%c%.*s_%.*s", prefix, spotname_sz, spotname, read_label_sz, read_label);
-        } else {
-            ret = snprintf(buf, maxlen, "%c%.*s", prefix, spotname_sz, spotname);
-        }
-    } else {
-        const char* sep = spotname_sz ? " " : "";
-        if( addLabel && readId > 0 ) {
-            sep = spotname_sz ? "_" : "";
-            if( self->dad.options & ePrintReadId ) {
-                ret = snprintf(buf, maxlen, "%c%s.%ld.%d %.*s%s%.*s length=%d",
-                    prefix, self->dad.accession, self->dad.spot, readId, spotname_sz, spotname, sep, read_label_sz, read_label, read_len);
-            } else {
-                ret = snprintf(buf, maxlen, "%c%s.%ld %.*s%s%.*s length=%d",
-                    prefix, self->dad.accession, self->dad.spot, spotname_sz, spotname, sep, read_label_sz, read_label, read_len);
-            }
-        } else if( readId > 0 ) {
-            if( self->dad.options & ePrintReadId ) {
-                ret = snprintf(buf, maxlen, "%c%s.%ld.%d %.*s%slength=%d",
-                    prefix, self->dad.accession, self->dad.spot, readId, spotname_sz, spotname, sep, read_len);
-            } else {
-                ret = snprintf(buf, maxlen, "%c%s.%ld %.*s%slength=%d",
-                    prefix, self->dad.accession, self->dad.spot, spotname_sz, spotname, sep, read_len);
-            }
-        } else {
-            ret = snprintf(buf, maxlen, "%c%s.%ld %.*s%slength=%u",
-                prefix, self->dad.accession, self->dad.spot, spotname_sz, spotname, sep, spot_len);
-        }
-    }
-
-#if SNPRINTF_ACTUALLY_WORKED_THE_WAY_YOU_THINK
-    if( ret < 0 ) {
-        ret = 0;
-        rc = RC(rcSRA, rcString, rcConstructing, rcMessage, rcUnknown);
-    } else if( ret >= (int)maxlen ) {
-#else
-    if( ret < 0 || ret >= (int)maxlen ) {
-#endif
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-    }
-    if( written != NULL ) {
-        *written = ret;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC FastqReaderBaseName(const FastqReader* self, uint32_t readId,
-                                       bool* label, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-
-    CHECK_SELF(FastqReader);
-    CHECK_SPOT(self->dad);
-    rc = FastqReader_Header(me, label, data, dsize, written, '@', readId);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC FastqReaderQualityName(const FastqReader* self, uint32_t readId,
-                                          bool* label, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-
-    CHECK_SELF(FastqReader);
-    CHECK_SPOT(self->dad);
-    if( self->qual1 == NULL ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMode, rcNotAvailable);
-    } else {
-        rc = FastqReader_Header(me, label, data, dsize, written, '+', readId);
-    }
-    return rc;
-}
-
-/*
-#if _DEBUGGING && defined __GNUC__
-#pragma message "TBD determine if we need conversions between color spaces at all"
-#endif
-*/
-
-static
-rc_t FastqReader_CSconvert(char from, char to, char* first)
-{
-#define CSKEY2IDX(k) (k == 'A' ? 0 : (k == 'C' ? 1 : (k == 'G' ? 2 : (k == 'T' ? 3 : -1))))
-
-    const char* x[4][4] = {
-        /*   TO:      A       C       G       T   */
-        /* F: A */ {"0123", "1032", "2301", "3210"},
-        /* R: C */ {"1032", "0123", "3210", "2301"},
-        /* O: G */ {"2301", "3210", "0123", "1032"},
-        /* M: T */ {"3210", "2301", "1032", "0123"}};
-
-    if( to != '\0' && *first != '.' && toupper(*first) != 'N' ) {
-        int ifrom = CSKEY2IDX(toupper(from));
-        int ito = CSKEY2IDX(toupper(to));
-        int ifirst = *first - '0';
-
-        if( ifrom < 0 || ito < 0 || ifirst < 0 || ifirst > 3 ) {
-            return RC(rcSRA, rcString, rcConverting, rcParam, rcInvalid);
-        }
-        *first = x[ifrom][ito][ifirst];
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC FastqReaderBase(const FastqReader* self, uint32_t readId, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    uint32_t num_reads;
-    INSDC_coord_zero read_start = 0;
-    INSDC_coord_len read_len = 0;
-
-    CHECK_SELF(FastqReader);
-    CHECK_SPOT(self->dad);
-
-    if( readId > 0 ) {
-        if( (rc = FastqReader_SpotReadInfo(self, readId--, NULL, NULL, NULL, &read_start, &read_len)) != 0 ) {
-            return rc;
-        }
-    } else if( (rc = FastqReader_SpotInfo(self, NULL, NULL, NULL, NULL, &read_len, &num_reads)) != 0 ) {
-        return rc;
-    } else if( (me->dad.options & eColorSpace) && num_reads > 2 ) {
-        return RC(rcSRA, rcFormatter, rcConstructing, rcFormat, rcUnsupported);
-    }
-    if( me->dad.options & eColorSpace ) {
-        read_len++;
-    }
-    if( written != NULL ) {
-        *written = read_len;
-    }
-    if( read_len >= dsize ) {
-        return RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-    }
-    if( me->dad.options & eColorSpace ) {
-        const char* b = self->csread->base;
-        data[0] = me->csKey == '\0' ? (*self->cs_key)[readId] : me->csKey;
-        memcpy(&data[1], &b[read_start], read_len - 1);
-        if( read_len > 1 ) {
-            rc = FastqReader_CSconvert((*self->cs_key)[readId], data[0], &data[1]);
-        }
-    } else {
-        const char* b = self->read->base;
-        memcpy(data, &b[read_start], read_len);
-    }
-    data[read_len] = '\0';
-    return rc;
-}
-
-LIB_EXPORT rc_t CC FastqReaderQuality(const FastqReader* self, uint32_t readId, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    INSDC_coord_zero read_start = 0;
-    INSDC_coord_len read_len = 0;
-    bool print_quality_for_cskey = false; /* added Jan 15th 2014 ( a new fastq-variation! )*/
-
-    CHECK_SELF(FastqReader);
-    CHECK_SPOT(self->dad);
-
-    if( self->qual1 == NULL ) {
-        return RC(rcSRA, rcString, rcConstructing, rcMode, rcNotAvailable);
-    }
-    if( readId > 0 ) {
-        if( (rc = FastqReader_SpotReadInfo(self, readId, NULL, NULL, NULL, &read_start, &read_len)) != 0 ) {
-            return rc;
-        }
-    } else if( (rc = FastqReader_SpotInfo(self, NULL, NULL, NULL, NULL, &read_len, NULL)) != 0 ) {
-        return rc;
-    }
-
-    /* added Jan 15th 2014 ( a new fastq-variation! )*/
-    print_quality_for_cskey = ( ( me->dad.options & eColorSpace )&&( ( me->dad.options & eSuppressQualForCSKey ) == 0 ) );
-
-    if( read_len < self->minReadLen ) {
-        read_len = 0;
-    }
-    if( print_quality_for_cskey ) { /* changed Jan 15th 2014 ( a new fastq-variation! ) */
-        read_len++;
-    }
-    if( written != NULL ) {
-        *written = read_len;
-    }
-    if( read_len >= dsize ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-    } else {
-        const uint8_t* q = *self->qual1;
-        char* d = data;
-        INSDC_coord_len i, j;
-
-        if ( print_quality_for_cskey ) /* changed Jan 15th 2014 ( a new fastq-variation! ) */
-        {
-            *d++ = me->offset;
-            --read_len;
-        }
-        /* read end */
-        read_len += read_start;
-        for(j = 0, i = read_start; i < read_len; i++, j++) {
-            d[j] = self->q2ascii[q[i]];
-        }
-        d[j] = '\0';
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC FastqReader_GetCurrentSpotData(const FastqReader* self, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    size_t len = 0, left = dsize, w = 0;
-    char* b = data;
-
-    CHECK_SELF(FastqReader);
-    CHECK_SPOT(me->dad);
-
-    rc = FastqReaderBaseName(self, 0, NULL, b, left, &w);
-    len += ++w;
-    if( rc != 0 ) {
-        if( rc != 0 && !(GetRCObject(rc) == rcMemory && GetRCState(rc) == rcInsufficient) ) {
-            return rc;
-        }
-        b = data, left = dsize;
-    } else {
-        b[w - 1] = '\n'; b += w; left -= w;
-    }
-
-    rc = FastqReaderBase(self, 0, b, left, &w);
-    len += ++w;
-    if( rc != 0 ) {
-        if( rc != 0 && !(GetRCObject(rc) == rcMemory && GetRCState(rc) == rcInsufficient) ) {
-            return rc;
-        }
-        b = data, left = dsize;
-    } else {
-        b[w - 1] = '\n'; b += w; left -= w;
-    }
-    if( self->qual1 != NULL ) {
-        rc = FastqReaderQualityName(self, 0, NULL, b, left, &w);
-        len += ++w;
-        if( rc != 0 ) {
-            if( rc != 0 && !(GetRCObject(rc) == rcMemory && GetRCState(rc) == rcInsufficient) ) {
-                return rc;
-            }
-            b = data, left = dsize;
-        } else {
-            b[w - 1] = '\n'; b += w; left -= w;
-        }
-        rc = FastqReaderQuality(self, 0, b, left, &w);
-        len += ++w; b[w - 1] = '\n';
-        if( rc != 0 && !(GetRCObject(rc) == rcMemory && GetRCState(rc) == rcInsufficient) ) {
-            return rc;
-        }
-    }
-    if( written != NULL ) {
-        *written = len;
-    }
-    if( len > dsize ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC FastqReader_GetCurrentSpotSplitData(const FastqReader* self, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    size_t len = 0, left = dsize, w = 0;
-    char* b = data;
-    uint32_t r, num_reads;
-
-    CHECK_SELF(FastqReader);
-    CHECK_SPOT(me->dad);
-
-    if( (rc = FastqReader_SpotInfo(self, NULL, NULL, NULL, NULL, NULL, &num_reads)) != 0 ) {
-        return rc;
-    }
-    for(r = 1; r <= num_reads; r++) {
-        rc = FastqReaderBaseName(self, r, NULL, b, left, &w);
-        len += ++w;
-        if( rc != 0 ) {
-            if( rc != 0 && !(GetRCObject(rc) == rcMemory && GetRCState(rc) == rcInsufficient) ) {
-                return rc;
-            }
-            b = data, left = dsize;
-        } else {
-            b[w - 1] = '\n'; b += w; left -= w;
-        }
-        rc = FastqReaderBase(self, r, b, left, &w);
-        len += ++w;
-        if( rc != 0 ) {
-            if( rc != 0 && !(GetRCObject(rc) == rcMemory && GetRCState(rc) == rcInsufficient) ) {
-                return rc;
-            }
-            b = data, left = dsize;
-        } else {
-            b[w - 1] = '\n'; b += w; left -= w;
-        }
-        if( self->qual1 != NULL ) {
-            rc = FastqReaderQualityName(self, r, NULL, b, left, &w);
-            len += ++w;
-            if( rc != 0 ) {
-                if( rc != 0 && !(GetRCObject(rc) == rcMemory && GetRCState(rc) == rcInsufficient) ) {
-                    return rc;
-                }
-                b = data, left = dsize;
-            } else {
-                b[w - 1] = '\n'; b += w; left -= w;
-            }
-            rc = FastqReaderQuality(self, r, b, left, &w);
-            len += ++w;
-            if( rc != 0 ) {
-                if( rc != 0 && !(GetRCObject(rc) == rcMemory && GetRCState(rc) == rcInsufficient) ) {
-                    return rc;
-                }
-                b = data, left = dsize;
-            } else {
-                b[w - 1] = '\n'; b += w; left -= w;
-            }
-        }
-    }
-
-    if( written != NULL ) {
-        *written = len;
-    }
-    if( len > dsize ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC FastqReader_GetNextSpotData(const FastqReader* self, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = FastqReaderNextSpot(self);
-    if( GetRCObject(rc) == rcRow && GetRCState(rc) == rcUnknown ) {
-        rc = FastqReaderFirstSpot(self);
-    }
-    if( rc == 0 ) {
-        rc = FastqReader_GetCurrentSpotData(self, data, dsize, written);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC FastqReader_GetNextSpotSplitData(const FastqReader* self, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = FastqReaderNextSpot(self);
-    if( GetRCObject(rc) == rcRow && GetRCState(rc) == rcUnknown ) {
-        rc = FastqReaderFirstSpot(self);
-    }
-    if( rc == 0 ) {
-        rc = FastqReader_GetCurrentSpotSplitData(self, data, dsize, written);
-    }
-    return rc;
-}
diff --git a/libs/sra/reader-illumina.c b/libs/sra/reader-illumina.c
deleted file mode 100644
index 21d0785..0000000
--- a/libs/sra/reader-illumina.c
+++ /dev/null
@@ -1,567 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <sra/rd-extern.h>
-
-#include <klib/rc.h>
-#include <sra/types.h>
-#include <sra/illumina.h>
-#include <os-native.h>
-#include <sysalloc.h>
-#include <va_copy.h>
-
-#include "reader-cmn.h"
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-typedef enum IlluminaReaderOptions_enum {
-    eRead = 0x02,
-    eQual1 = 0x04,
-    eQual4 = 0x08,
-    eIntensity = 0x10,
-    eNoise = 0x20,
-    eSignal = 0x40,
-    eQSeq  = 0x80
-} IlluminaReaderOptions;
-
-/* column order is important here: see Init function below!!! */
-static
-const SRAReaderColumn IlluminaReader_master_columns_desc[] = {
-    {SRAREADER_COL_OPTIONAL, "LANE", vdb_int32_t, NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL, "TILE", vdb_int32_t, NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL, "X", vdb_int32_t, NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL, "Y", vdb_int32_t, NULL, NULL, 0},
-    {eRead | eQSeq, "READ", insdc_fasta_t, NULL, NULL, 0},
-    {eQual1 | eQSeq, "QUALITY", insdc_phred_t, NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL | eQual4, "QUALITY", ncbi_qual4_t, NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL | eSignal, "SIGNAL", ncbi_fsamp4_t, NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL | eNoise, "NOISE", ncbi_fsamp4_t, NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL | eIntensity, "INTENSITY", ncbi_fsamp4_t, NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL | eQSeq, "READ_FILTER", sra_read_filter_t, NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL | eQSeq , "SPOT_GROUP", vdb_ascii_t, NULL, NULL, 0},
-    {0, NULL, NULL, NULL, NULL, 0} /* terminator */
-};
-
-struct IlluminaReader {
-    /* SRAReader always must be a first member! */
-    SRAReader dad;
-    unsigned char phred2logodds_printable[256];
-    /* current spot data shortcuts */
-    const int32_t** lane;
-    const int32_t** tile;
-    const int32_t** x;
-    const int32_t** y;
-    const SRAReaderColumn* read;
-    const SRAReaderColumn* qual1;
-    const signed char** qual4;
-    const float** signal;
-    const float** noise;
-    const float** intensity;
-    const uint8_t** rfilter;
-    const SRAReaderColumn* spot_group;
-};
-
-static
-rc_t IlluminaReaderInit(const IlluminaReader* self, bool read, bool qual1, bool qual4, bool intensity, bool noise, bool signal, bool qseq)
-{
-    rc_t rc = 0;
-    int options = read ? eRead : 0;
-
-    CHECK_SELF(IlluminaReader);
-
-    options |= qual1 ? eQual1 : 0;
-    options |= qual4 ? eQual4 : 0;
-    options |= intensity ? eIntensity : 0;
-    options |= noise ? eNoise : 0;
-    options |= signal ? eSignal : 0;
-    options |= qseq ? eQSeq : 0;
-
-    if( (rc = SRAReaderInit(&self->dad, options, IlluminaReader_master_columns_desc)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &IlluminaReader_master_columns_desc[0], NULL, (const void***)&self->lane)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &IlluminaReader_master_columns_desc[1], NULL, (const void***)&self->tile)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &IlluminaReader_master_columns_desc[2], NULL, (const void***)&self->x)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &IlluminaReader_master_columns_desc[3], NULL, (const void***)&self->y)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &IlluminaReader_master_columns_desc[4], &me->read, NULL)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &IlluminaReader_master_columns_desc[5], &me->qual1, NULL)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &IlluminaReader_master_columns_desc[6], NULL, (const void***)&self->qual4)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &IlluminaReader_master_columns_desc[7], NULL, (const void***)&self->signal)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &IlluminaReader_master_columns_desc[8], NULL, (const void***)&self->noise)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &IlluminaReader_master_columns_desc[9], NULL, (const void***)&self->intensity)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &IlluminaReader_master_columns_desc[10], NULL, (const void***)&self->rfilter)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &IlluminaReader_master_columns_desc[11], &me->spot_group, NULL)) == 0) {
-    }
-    if( self->qual1 != NULL ) {
-        int i;
-        const float offset = (float)64.499;
-        me->phred2logodds_printable[0] = (unsigned char)offset;
-        for(i = 1; i < 256; i++) {
-            me->phred2logodds_printable[i] = (unsigned char)(10 * log(pow(10, i / 10.0) - 1) / log(10) + offset);
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC IlluminaReaderMake(const IlluminaReader** self, const SRATable* table, const char* accession,
-                          bool read, bool qual1, bool qual4, bool intensity, bool noise, bool signal, bool qseq,
-                          spotid_t minSpotId, spotid_t maxSpotId)
-{
-    rc_t rc = SRAReaderMake((const SRAReader**)self, sizeof **self, table, accession, minSpotId, maxSpotId);
-    if( rc == 0 ) {
-        rc = IlluminaReaderInit(*self, read, qual1, qual4, intensity, noise, signal, qseq);
-    }
-    if( rc != 0 ) {
-        IlluminaReaderWhack(*self);
-        *self = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC IlluminaReaderWhack(const IlluminaReader* self)
-{
-    return SRAReaderWhack( &self->dad );
-}
-
-LIB_EXPORT rc_t CC IlluminaReaderFirstSpot(const IlluminaReader* self)
-{
-    return SRAReaderFirstSpot( &self->dad );
-}
-
-LIB_EXPORT rc_t CC IlluminaReaderSeekSpot(const IlluminaReader* self, spotid_t spot)
-{
-    return SRAReaderSeekSpot( &self->dad, spot );
-}
-
-LIB_EXPORT rc_t CC IlluminaReaderNextSpot(const IlluminaReader* self)
-{
-    return SRAReaderNextSpot( &self->dad );
-}
-
-LIB_EXPORT rc_t CC IlluminaReaderCurrentSpot(const IlluminaReader* self, spotid_t* spot)
-{
-    return SRAReaderCurrentSpot( &self->dad, spot );
-}
-
-LIB_EXPORT rc_t CC IlluminaReader_SpotInfo(const IlluminaReader* self,
-                                           const char** spotname, size_t* spotname_sz,
-                                           INSDC_coord_val* lane, INSDC_coord_val* tile, 
-                                           INSDC_coord_val* x, INSDC_coord_val* y,
-                                           uint32_t* spot_len, uint32_t* num_reads)
-{
-    rc_t rc = SRAReader_SpotInfo(&self->dad, spotname, spotname_sz, spot_len, num_reads);
-    if( rc == 0 ) {
-        if( lane ) {
-            *lane = (self->lane && *self->lane) ? **self->lane : 0;
-        }
-        if( tile ) {
-            *tile = (self->tile && *self->tile) ? **self->tile : ((self->dad.spot / 10001) + 1);
-        }
-        if( x ) {
-            *x = (self->x && *self->x) ? **self->x : 0;
-        }
-        if( y ) {
-            *y = (self->y && *self->y) ? **self->y : self->dad.spot;
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC IlluminaReader_SpotReadInfo(const IlluminaReader* self, uint32_t readId, SRAReadTypes* read_type,
-                                               const char** read_label, INSDC_coord_len* read_label_sz,
-                                               INSDC_coord_zero* read_start, INSDC_coord_len* read_len)
-{
-    return SRAReader_SpotReadInfo(&self->dad, readId, read_type,
-                                  read_label, read_label_sz, read_start, read_len);
-}
-
-#if 0
-static
-int kludge_snprintf ( char *buff, size_t bsize, const char *fmt, ... )
-{
-    int status;
-    va_list args, args2;
-
-    va_start ( args, fmt );
-    va_copy ( args2, args );
-
-    status = vsnprintf ( buff, bsize, fmt, args );
-    if ( status < 0 )
-    {
-        size_t kludge_size = 64 * 1024;
-        void *kludge = malloc ( kludge_size );
-        if ( kludge != NULL )
-        {
-            status = vsnprintf ( kludge, kludge_size, fmt, args2 );
-            if ( status >= 0 )
-            {
-                memcpy ( buff, kludge, ( size_t ) status > bsize ? bsize : ( size_t ) status );
-                if ( ( size_t ) status < bsize )
-                    buff [ status ] = 0;
-            }
-            free ( kludge );
-        }
-    }
-
-    va_end ( args2 );
-    va_end ( args );
-
-    return status;
-}
-#endif
-
-LIB_EXPORT rc_t CC IlluminaReaderBase(const IlluminaReader* self, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    int sz = 0;
-    uint32_t spot_len;
-    INSDC_coord_val lane, tile, x, y;
-
-    CHECK_SELF(IlluminaReader);
-    CHECK_SPOT(me->dad);
-
-    if( data == NULL ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcNull);
-    } else if( !(self->dad.options & eRead) ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMessage, rcUnexpected);
-    } else if( (rc = IlluminaReader_SpotInfo(self, NULL, NULL, &lane, &tile, &x, &y, &spot_len, NULL)) == 0 ) {
-        sz = snprintf(data, dsize, "%d\t%d\t%d\t%d\t", lane, tile, x, y);
-        if( sz < 0 ) {
-#if SNPRINTF_ACTUALLY_WORKED_THE_WAY_YOU_THINK
-            rc = RC(rcSRA, rcString, rcConstructing, rcNoObj, rcUnknown);
-#else
-            /* both approaches are wrong - the error code is rcBuffer, rcInsufficient */
-            rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-#endif
-        } else {
-            sz += spot_len;
-            if( sz >= (int)dsize ) {
-                rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-            } else {
-                size_t len = 0;
-                sz -= spot_len;
-                while(len < spot_len) {
-                    const char* b = self->read->base;
-                    data[sz + len] = b[len];
-                    if( data[sz + len] == 'N' ) {
-                        data[sz + len] = '.';
-                    }
-                    ++len;
-                }
-                sz += spot_len;
-                data[sz] = '\0';
-            }
-        }
-    }
-    if( written != NULL ) {
-        *written = sz;
-    }
-    return rc;
-}
-
-static
-rc_t IlluminaReader_4floats(const IlluminaReader* self, const float** col_data, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    int sz = 0;
-    const float* f = NULL;
-    uint32_t i, spot_len;
-    INSDC_coord_val lane, tile, x, y;
-
-    CHECK_SELF(IlluminaReader);
-    CHECK_SPOT(me->dad);
-
-    if( data == NULL ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcNull);
-    } else if( (rc = IlluminaReader_SpotInfo(self, NULL, NULL, &lane, &tile, &x, &y, &spot_len, NULL)) == 0 ) {
-        if( col_data == NULL || *col_data == NULL ) {
-            /* optional column is missing */
-            if( written != NULL ) {
-                *written = 0;
-            }
-            data[0] = '\0';
-        } else {
-            f = *col_data;
-            sz = snprintf(data, dsize, "%d\t%d\t%d\t%d", lane, tile, x, y);
-            if( sz < 0 ) {
-#if SNPRINTF_ACTUALLY_WORKED_THE_WAY_YOU_THINK
-                rc = RC(rcSRA, rcString, rcConstructing, rcNoObj, rcUnknown);
-#else
-                rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-#endif
-            } else {
-                for(i = 0; rc == 0 && i < spot_len; i++, f += 4) {
-                    int x = sz >= (int)dsize ? 0 : sz;
-                    x = snprintf(&data[x], dsize - x, "\t%.*f %.*f %.*f %.*f", f[0] ? 1 : 0, f[0], f[1] ? 1 : 0, f[1],
-                                 f[2] ? 1 : 0,  f[2], f[3] ? 1 : 0,  f[3]);
-                    if( x < 0 ) {
-#if SNPRINTF_ACTUALLY_WORKED_THE_WAY_YOU_THINK
-                        rc = RC(rcSRA, rcString, rcConstructing, rcNoObj, rcUnknown);
-#else
-                        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-#endif
-                    }
-                    sz += x;
-                }
-                if( rc == 0 && written != NULL ) {
-                    *written = sz;
-                }
-            }
-        }
-    }
-    if( rc == 0 && sz >= (int)dsize ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC IlluminaReaderNoise(const IlluminaReader* self, char* data, size_t dsize, size_t* written)
-{
-    return IlluminaReader_4floats(self, self->noise, data, dsize, written);
-}
-
-LIB_EXPORT rc_t CC IlluminaReaderIntensity(const IlluminaReader* self, char* data, size_t dsize, size_t* written)
-{
-    return IlluminaReader_4floats(self, self->intensity, data, dsize, written);
-}
-
-LIB_EXPORT rc_t CC IlluminaReaderSignal(const IlluminaReader* self, char* data, size_t dsize, size_t* written)
-{
-    return IlluminaReader_4floats(self, self->signal, data, dsize, written);
-}
-
-LIB_EXPORT rc_t CC IlluminaReaderQuality1(const IlluminaReader* self, uint32_t readId, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    size_t sz = 0;
-    const uint8_t* p = NULL;
-
-    CHECK_SELF(IlluminaReader);
-    CHECK_SPOT(me->dad);
-
-    if( data == NULL ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcNull);
-    } else if( !(self->dad.options & eQual1) ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMessage, rcUnexpected);
-    } else if( self->qual1 == NULL || self->qual1->size == 0 ) {
-        /* empty value */
-    } else if( readId > 0 ) {
-        INSDC_coord_zero read_start;
-        INSDC_coord_len read_len;
-        if( (rc = IlluminaReader_SpotReadInfo(self, readId, NULL, NULL, NULL, &read_start, &read_len)) == 0 ) {
-            sz = read_len;
-            p = self->qual1->base;
-            p += read_start;
-        }
-    } else {
-        uint32_t spot_len;
-        if( (rc = IlluminaReader_SpotInfo(self, NULL, NULL, NULL, NULL, NULL, NULL, &spot_len, NULL)) == 0 ) {
-            sz = spot_len;
-            p = self->qual1->base;
-        }
-    }
-    if( rc == 0 ) {
-        if( sz >= dsize ) {
-            rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-        } else {
-            size_t i;
-            for(i = 0; i < sz; i++) {
-                data[i] = self->phred2logodds_printable[p[i]];
-            }
-            data[sz] = '\0';
-        }
-    }
-    if( written != NULL ) {
-        *written = sz;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC IlluminaReaderQuality4(const IlluminaReader* self, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    uint32_t spot_len;
-
-    CHECK_SELF(IlluminaReader);
-    CHECK_SPOT(me->dad);
-
-    if( data == NULL ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcNull);
-    } else if( self->qual4 == NULL ) {
-        /* optional column is missing */
-        if( written != NULL ) {
-            *written = 0;
-        }
-        data[0] = '\0';
-    } else if( (rc = IlluminaReader_SpotInfo(self, NULL, NULL, NULL, NULL, NULL, NULL, &spot_len, NULL)) == 0 ) {
-        int sz = spot_len * 20 - 1; /* no \t at line start */
-        if( written != NULL ) {
-            *written = sz;
-        }
-        if( sz >= (int)dsize ) {
-            rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-        } else {
-            const signed char* q4 = *self->qual4;
-            int x;
-            uint32_t len = 0;
-            for(sz = 0; rc == 0 && len < spot_len; len++, q4 += 4) {
-                x = snprintf(&data[sz], dsize - sz, "%s%4d %4d %4d %4d", len > 0 ? "\t" : "", q4[0], q4[1], q4[2], q4[3]);
-#if SNPRINTF_ACTUALLY_WORKED_THE_WAY_YOU_THINK
-                if( x < 0 ) {
-                    rc = RC(rcSRA, rcString, rcConstructing, rcNoObj, rcUnknown);
-#else
-                if( x < 0 || ( size_t ) sz + x >= dsize ) {
-                    rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-#endif
-                }
-                sz += x;
-            }
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC IlluminaReaderQSeq(const IlluminaReader* self, uint32_t readId, bool spot_group,
-                                      char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    const char* spotname;
-    size_t spotname_sz;
-    uint32_t nreads, spotlen;
-    INSDC_coord_val lane, tile, x, y;
-    int sz = 0;
-
-    CHECK_SELF(IlluminaReader);
-    CHECK_SPOT(me->dad);
-
-    if( data == NULL ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcNull);
-    } else if( !(self->dad.options & eQSeq) ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMessage, rcUnexpected);
-    } else if( (rc = IlluminaReader_SpotInfo(self, &spotname, &spotname_sz, &lane, &tile, &x, &y, &spotlen, &nreads)) == 0 ) {
-        INSDC_coord_zero read_start = 0;
-        INSDC_coord_len read_len = spotlen;
-        if( readId > 0 ) {
-            rc = IlluminaReader_SpotReadInfo(self, readId, NULL, NULL, NULL, &read_start, &read_len);
-        }
-        if( rc == 0 ) {
-            const char* sg = "0";
-            int sg_sz = 1;
-            const char* runid = "0";
-            size_t runid_sz = 1;
-            int i = 0;
-
-            if( spotname_sz > 0 ) {
-                const char* c = spotname + spotname_sz;
-                while( i < 4 && c != NULL ) {
-                    c = memrchr(spotname, ':', c - spotname);
-                    if( c != NULL ) {
-                        i++;
-                    }
-                }
-                if( i == 4 ) {
-                    spotname_sz = c - spotname;
-                    c = memrchr(spotname, '_', spotname_sz);
-                    if( c != NULL ) {
-                        runid = c + 1;
-                        runid_sz = spotname_sz - (c - spotname) - 1;
-                        spotname_sz = c - spotname;
-                    }
-                } else {
-                    spotname_sz = 0;
-                }
-            }
-            if( spotname_sz == 0 ) {
-                spotname = self->dad.accession;
-                spotname_sz = strlen(spotname);
-            }
-            if( spot_group && self->spot_group && self->spot_group->size > 0 ) {
-                sg = self->spot_group->base;
-                sg_sz = self->spot_group->size;
-            }
-            i = snprintf(data, dsize, "%.*s\t%.*s\t%d\t%d\t%d\t%d\t%.*s\t%d\t",
-                (int)spotname_sz, spotname, (int)runid_sz, runid, lane, tile, x, y, sg_sz, sg, readId > 0 ? readId : 1);
-#if SNPRINTF_ACTUALLY_WORKED_THE_WAY_YOU_THINK
-            if( i < 0 ) {
-                rc = RC(rcSRA, rcString, rcConstructing, rcNoObj, rcUnknown);
-#else
-            if( i < 0 || ( size_t ) i >= dsize ) {
-                rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-#endif
-            } else {
-                sz += i;
-                i = sz; /* save length of initial part */
-
-                /* precalc full line length: seq\tqual\tflt */
-                sz += 2 * (read_len + 1) + 1;
-                if( sz >= (int)dsize ) {
-                    rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-                } else {
-                    char flt = '1';
-                    const char* b = self->read->base;
-
-                    /* reverse back to initial part length */
-                    sz = i;
-                    if( *self->rfilter != NULL ) {
-                        if( readId > 0 && (*self->rfilter)[readId - 1] != SRA_READ_FILTER_PASS ) {
-                            flt = '0';
-                        } else {
-                            for(i = 0; i < nreads; i++) {
-                                if( (*self->rfilter)[i] != SRA_READ_FILTER_PASS ) {
-                                    flt = '0';
-                                    break;
-                                }
-                            }
-                        }
-                    }
-                    for(i = 0; i < read_len; i++) {
-                        data[sz + i] = b[read_start + i];
-                        if( data[sz + i] == 'N' ) {
-                            data[sz + i] = '.';
-                        }
-                    }
-                    sz += read_len;
-                    data[sz++] = '\t';
-                    if( self->qual1 && self->qual1->size ) {
-                        const uint8_t* p = self->qual1->base;
-                        for(i = 0; i < read_len; i++) {
-                            data[sz + i] = p[read_start + i] + 64;
-                        }
-                        sz += read_len;
-                    }
-                    data[sz++] = '\t';
-                    data[sz++] = flt;
-                    data[sz] = '\0';
-                }
-            }
-        }
-    }
-    if( written != NULL ) {
-        *written = sz;
-    }
-    return rc;
-}
diff --git a/libs/sra/reader-sff.c b/libs/sra/reader-sff.c
deleted file mode 100644
index d583699..0000000
--- a/libs/sra/reader-sff.c
+++ /dev/null
@@ -1,380 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <sra/rd-extern.h>
-
-#include <klib/rc.h>
-#include <sra/types.h>
-#include <sra/sff.h>
-#include <sra/sff-file.h>
-#include <sysalloc.h>
-
-#include "reader-cmn.h"
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#   include <byteswap.h>
-#else
-#   define bswap_16(x) (x)
-#   define bswap_32(x) (x)
-#endif
-#include <string.h>
-
-/* column order is important here: see Init function below!!! */
-static
-const SRAReaderColumn SFFReader_master_columns_desc[] = {
-    {SRAREADER_COL_MANDATORY, "FLOW_CHARS", insdc_fasta_t, NULL, NULL, 0},
-    {SRAREADER_COL_MANDATORY, "KEY_SEQUENCE", insdc_fasta_t, NULL, NULL, 0},
-    {SRAREADER_COL_MANDATORY, "READ", insdc_fasta_t, NULL, NULL, 0},
-    {SRAREADER_COL_MANDATORY, "QUALITY", insdc_phred_t, NULL, NULL, 0},
-    {SRAREADER_COL_MANDATORY, "SIGNAL", ncbi_isamp1_t, NULL, NULL, 0},
-    {SRAREADER_COL_MANDATORY, "POSITION", "INSDC:position:one", NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL, "CLIP_QUALITY_LEFT", "INSDC:coord:one", NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL, "CLIP_QUALITY_RIGHT", "INSDC:coord:one", NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL, "CLIP_ADAPTER_LEFT", "INSDC:coord:one", NULL, NULL, 0},
-    {SRAREADER_COL_OPTIONAL, "CLIP_ADAPTER_RIGHT", "INSDC:coord:one", NULL, NULL, 0},
-    {0, NULL, NULL, NULL, NULL, 0} /* terminator */
-};
-
-struct SFFReader {
-    /* SRAReader always must be a first member! */
-    SRAReader dad;
-    /* current spot data shortcuts */
-    const SRAReaderColumn* flow_chars;
-    const SRAReaderColumn* key_seq;
-    const SRAReaderColumn* read;
-    const SRAReaderColumn* qual1;
-    const SRAReaderColumn* signal;
-    const SRAReaderColumn* position;
-    const INSDC_coord_one** clip_q_left;
-    const INSDC_coord_one** clip_q_right;
-    const INSDC_coord_one** clip_adapter_left;
-    const INSDC_coord_one** clip_adapter_right;
-};
-
-static
-rc_t SFFReaderInit(const SFFReader* self)
-{
-    rc_t rc = 0;
-
-    CHECK_SELF(SFFReader);
-    rc = SRAReaderInit(&self->dad, 0, SFFReader_master_columns_desc);
-    if( GetRCState(rc) == rcNotFound && GetRCObject(rc) == (enum RCObject) rcColumn ) {
-        rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcUnsupported);
-    } else if( rc == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &SFFReader_master_columns_desc[0], &me->flow_chars, NULL)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &SFFReader_master_columns_desc[1], &me->key_seq, NULL)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &SFFReader_master_columns_desc[2], &me->read, NULL)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &SFFReader_master_columns_desc[3], &me->qual1, NULL)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &SFFReader_master_columns_desc[4], &me->signal, NULL)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &SFFReader_master_columns_desc[5], &me->position, NULL)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &SFFReader_master_columns_desc[6], NULL, (const void***)&self->clip_q_left)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &SFFReader_master_columns_desc[7], NULL, (const void***)&self->clip_q_right)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &SFFReader_master_columns_desc[8], NULL, (const void***)&self->clip_adapter_left)) == 0 &&
-        (rc = SRAReader_FindColData(&self->dad, &SFFReader_master_columns_desc[9], NULL, (const void***)&self->clip_adapter_right)) == 0 ) {
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SFFReaderMake(const SFFReader** self, const SRATable* table,
-                   const char* accession, spotid_t minSpotId, spotid_t maxSpotId )
-{
-    rc_t rc = SRAReaderMake((const SRAReader**)self, sizeof **self, table, accession, minSpotId, maxSpotId);
-
-    if( rc == 0 ) {
-        rc = SFFReaderInit(*self);
-    }
-    if( rc != 0 ) {
-        SFFReaderWhack(*self);
-        *self = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SFFReaderWhack(const SFFReader *self)
-{
-    return SRAReaderWhack( &self->dad );
-}
-
-LIB_EXPORT rc_t CC SFFReaderFirstSpot(const SFFReader* self)
-{
-    return SRAReaderFirstSpot( &self->dad );
-}
-
-LIB_EXPORT rc_t CC SFFReaderSeekSpot(const SFFReader* self, spotid_t spot)
-{
-    return SRAReaderSeekSpot( &self->dad, spot );
-}
-
-LIB_EXPORT rc_t CC SFFReaderNextSpot(const SFFReader* self)
-{
-    return SRAReaderNextSpot( &self->dad );
-}
-
-LIB_EXPORT rc_t CC SFFReaderCurrentSpot(const SFFReader* self, spotid_t* spot)
-{
-    return SRAReaderCurrentSpot( &self->dad, spot );
-}
-
-LIB_EXPORT rc_t CC SFFReader_SpotInfo(const SFFReader* self, const char** spotname, size_t* spotname_sz,
-                                      uint32_t* spot_len, uint32_t* num_reads)
-{
-    return SRAReader_SpotInfo( &self->dad, spotname, spotname_sz, spot_len, num_reads );
-}
-
-LIB_EXPORT rc_t CC SFFReader_SpotReadInfo(const SFFReader* self, uint32_t readId, SRAReadTypes* read_type,
-                                          const char** read_label, INSDC_coord_len* read_label_sz,
-                                          INSDC_coord_zero* read_start, INSDC_coord_len* read_len)
-{
-    return SRAReader_SpotReadInfo(&self->dad, readId, read_type,
-                                  read_label, read_label_sz, read_start, read_len);
-}
-
-LIB_EXPORT rc_t CC SFFReaderHeader(const SFFReader* self, spotid_t spots, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    SFFCommonHeader h;
-
-    CHECK_SELF(SFFReader);
-
-    /* we need to read 1st spot in order to get to flow and key seq col data */
-    if( me->dad.spot == 0 && (rc = SFFReaderSeekSpot(self, me->dad.minSpotId)) != 0 ) {
-        return rc;
-    }
-    memset(&h, 0, sizeof(SFFCommonHeader));
-    memcpy(&h, ".sff\0\0\0\1", 8);
-    h.number_of_reads = spots != 0 ? spots : (self->dad.maxSpotId - me->dad.minSpotId + 1);
-    h.key_length = (uint16_t)self->key_seq->size;
-    h.num_flows_per_read = (uint16_t)self->flow_chars->size;
-    h.flowgram_format_code = SFFFormatCodeUI16Hundreths;
-
-    h.header_length = SFFCommonHeader_size + h.key_length + h.num_flows_per_read;
-    /* 8-byte pad */
-    h.header_length += (h.header_length % 8) ? (8 - (h.header_length % 8)) : 0;
-    if( written != NULL ) {
-        *written = h.header_length;
-    }
-    if( h.header_length > dsize ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-    } else {
-        uint16_t len = h.header_length;
-
-        h.number_of_reads = bswap_32( h.number_of_reads );
-        h.header_length = bswap_16( h.header_length );
-        h.key_length = bswap_16( h.key_length );
-        h.num_flows_per_read = bswap_16( h.num_flows_per_read );
-
-        memset(data, 0, len);
-        memcpy(data, &h, SFFCommonHeader_size);
-        memcpy(&data[SFFCommonHeader_size], self->flow_chars->base, self->flow_chars->size);
-        memcpy(&data[SFFCommonHeader_size + self->flow_chars->size], self->key_seq->base, self->key_seq->size);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SFFReaderReadHeader(const SFFReader* self, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    size_t spotname_sz;
-    const char* spotname;
-    uint32_t spot_len;
-    SFFReadHeader h;
-
-    CHECK_SELF(SFFReader);
-    CHECK_SPOT(me->dad);
-
-    memset(&h, 0, sizeof(SFFReadHeader));
-
-    if( (rc = SFFReader_SpotInfo(self, &spotname, &spotname_sz, &spot_len, NULL)) != 0 ) {
-        return rc;
-    }
-    if( self->clip_q_left != NULL && *self->clip_q_left != NULL ) {
-        h.clip_quality_left = **self->clip_q_left;
-    }
-    if( self->clip_q_right != NULL && *self->clip_q_right != NULL ) {
-        h.clip_quality_right = **self->clip_q_right;
-    }
-    if( self->clip_adapter_left != NULL && *self->clip_adapter_left != NULL ) {
-        h.clip_adapter_left = **self->clip_adapter_left;
-    }
-    if( self->clip_adapter_right != NULL && *self->clip_adapter_right != NULL ) {
-        h.clip_adapter_right = **self->clip_adapter_right;
-    }
-    if( spotname_sz == 0 ) {
-        spotname = self->dad.accession;
-        spotname_sz = strlen(spotname);
-    }
-    h.name_length = (uint16_t)spotname_sz;
-    h.number_of_bases = spot_len;
-    h.header_length = (uint16_t)( SFFReadHeader_size + spotname_sz );
-    /* 8-byte pad */
-    h.header_length += (h.header_length % 8) ? (8 - (h.header_length % 8)) : 0;
-    if( written != NULL ) {
-        *written = h.header_length;
-    }
-    if( h.header_length > dsize ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-    } else {
-        uint16_t len = h.header_length;
-
-        h.header_length = bswap_16(h.header_length);
-        h.name_length = bswap_16(h.name_length);
-        h.number_of_bases = bswap_32(h.number_of_bases);
-        h.clip_quality_right = bswap_16(h.clip_quality_right);
-        h.clip_quality_left = bswap_16(h.clip_quality_left);
-        h.clip_adapter_left = bswap_16(h.clip_adapter_left);
-        h.clip_adapter_right = bswap_16(h.clip_adapter_right);
-
-        memset(data, 0, len);
-        memcpy(data, &h, SFFReadHeader_size);
-        memcpy(&data[SFFReadHeader_size], spotname, spotname_sz);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SFFReaderReadData(const SFFReader* self, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    size_t flows, len, padding;
-    uint32_t spot_len;
-    /* SFF type defining vars, not used */
-    const uint16_t sff_signal;
-    const uint8_t sff_position;
-    const char sff_bases;
-    const uint8_t sff_quality;
-
-    CHECK_SELF(SFFReader);
-    CHECK_SPOT(me->dad);
-
-    /* if for some reason READ, QUAL and POSITION rows are uneqaul in size,
-       base their length on actual READ size */
-    spot_len = self->read->size / sizeof(INSDC_dna_text);
-    /* this size if fixed across the file */
-    flows = self->flow_chars->size / sizeof(INSDC_dna_text);
-
-    /* read data section size: per SFF spec types sizes + 8-byte padding */
-    len = flows * sizeof(sff_signal) + spot_len * (sizeof(sff_position) + sizeof(sff_bases) + sizeof(sff_quality));
-    padding = (len % 8) ? (8 - (len % 8)) : 0;
-    len += padding;
-
-    if( written != NULL ) {
-        *written = len;
-    }
-    if( len > dsize ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-    } else {
-        size_t qty;
-        INSDC_position_one ppos;
-        const uint16_t* signal = self->signal->base;
-        uint16_t* dst_sig = (uint16_t*)data;
-        const INSDC_position_one* position = self->position->base;
-
-        qty = self->signal->size / sizeof(*signal);
-        if( qty > flows ) {
-            qty = flows;
-        }
-        for(len = 0; len < qty; len++) {
-            dst_sig[len] = bswap_16(signal[len]);
-        }
-        if( qty < flows ) {
-            memset(&data[qty * sizeof(sff_signal)], 0, (flows - qty) * sizeof(sff_signal));
-        }
-        data += flows * sizeof(sff_signal);
-
-        qty = self->position->size / sizeof(*position);
-        if( qty > spot_len ) {
-            qty = spot_len;
-        }
-        for(ppos = 0, len = 0; len < qty; len++) {
-            data[len] = (uint8_t)(position[len] - ppos);
-            ppos = position[len];
-        }
-        if( qty < spot_len ) {
-            memset(&data[qty], 0, (spot_len - qty) * sizeof(sff_position));
-        }
-        data += spot_len;
-
-        /* this are guaranteed above to be same length */
-        memcpy(data, self->read->base, spot_len);
-        data += spot_len;
-
-        qty = self->qual1->size / sizeof(INSDC_quality_phred);
-        if( qty > spot_len ) {
-            qty = spot_len;
-        }
-        memcpy(data, self->qual1->base, qty);
-        if( qty < spot_len ) {
-            memset(&data[qty], 0, (spot_len - qty) * sizeof(sff_quality));
-        }
-        if( padding > 0 ) {
-            memset(&data[spot_len], 0, padding);
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SFFReader_GetCurrentSpotData(const SFFReader* self, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = 0;
-    size_t len = 0, left = dsize, w = 0;
-    char* b = data;
-
-    CHECK_SELF(SFFReader);
-    CHECK_SPOT(me->dad);
-
-    rc = SFFReaderReadHeader(me, b, left, &w);
-    len += w, b += w, left -= w;
-    if( rc != 0 ) {
-        if( !(GetRCObject(rc) == rcMemory && GetRCState(rc) == rcInsufficient) ) {
-            return rc;
-        }
-        b = data, left = dsize;
-    }
-    rc = SFFReaderReadData(self, b, left, &w);
-    len += w, b += w, left -= w;
-    if( rc != 0 ) {
-        if( !(GetRCObject(rc) == rcMemory && GetRCState(rc) == rcInsufficient) ) {
-            return rc;
-        }
-    }
-    if( written != NULL ) {
-        *written = len;
-    }
-    if( len > dsize ) {
-        rc = RC(rcSRA, rcString, rcConstructing, rcMemory, rcInsufficient);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SFFReader_GetNextSpotData(const SFFReader* self, char* data, size_t dsize, size_t* written)
-{
-    rc_t rc = SFFReaderNextSpot(self);
-    if( GetRCObject(rc) == rcRow && GetRCState(rc) == rcUnknown ) {
-        rc = SFFReaderFirstSpot(self);
-    }
-    if( rc == 0 ) {
-        rc = SFFReader_GetCurrentSpotData(self, data, dsize, written);
-    }
-    return rc;
-}
diff --git a/libs/sra/sra-debug.h b/libs/sra/sra-debug.h
deleted file mode 100644
index bfb7de4..0000000
--- a/libs/sra/sra-debug.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_sra_debug_
-#define _h_sra_debug_
-
-#include <klib/debug.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SRADBG(msg) DBGMSG(DBG_SRA,DBG_FLAG(DBG_SRA_INFO),msg)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _sra_debug_ */
diff --git a/libs/sra/sra-dflt-schema.c b/libs/sra/sra-dflt-schema.c
deleted file mode 100644
index 8ca5ff1..0000000
--- a/libs/sra/sra-dflt-schema.c
+++ /dev/null
@@ -1,552 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/manager.h>
-#include <vdb/schema.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kapp/main.h>
-#include <kapp/args.h>
-#include <klib/container.h>
-#include <klib/vector.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/rc.h>
-#include <klib/namelist.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-#define WITH_DNA
-
-#define DEPENDENCY_EXTENSION "d"
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-
-
-/********************************************************************
-helper function to display failure or success message
-********************************************************************/
-static void display_rescode( const rc_t rc, const char* failure, const char* success )
-{
-    if ( rc != 0 )
-        LOGERR( klogInt, rc, failure );
-    else
-        if ( success ) LOGMSG( klogInfo, success );
-}
-
-typedef struct context
-{
-    const char *output_file;
-    char *dependency_file;
-    VNamelist *include_files;
-    VNamelist *src_files;
-} context;
-typedef context* p_context;
-
-static void context_set_str( char **dst, const char *src )
-{
-    size_t len;
-    if ( dst == NULL ) return;
-    if ( *dst != NULL ) free( *dst );
-    if ( src == NULL ) return;
-    len = strlen( src );
-    if ( len == 0 ) return;
-    *dst = (char*)malloc( len + 1 );
-    strcpy( *dst, src );
-}
-
-static bool context_init( context **ctx )
-{
-    bool res = false;
-    if ( ctx != NULL )
-    {
-        (*ctx) = malloc( sizeof( context ) );
-        if ( *ctx )
-        {
-            (*ctx)->output_file = NULL;
-            (*ctx)->dependency_file = NULL;
-            VNamelistMake( &( (*ctx)->include_files ), 5 );
-            VNamelistMake( &( (*ctx)->src_files ), 5 );
-            res = true;
-        }
-    }
-    return res;
-}
-
-static void context_destroy( p_context ctx )
-{
-    if ( ctx == NULL ) return;
-    free( (char*)ctx->output_file );
-    free( (char*)ctx->dependency_file );
-    VNamelistRelease( ctx->include_files );
-    VNamelistRelease( ctx->src_files );
-    free( ctx );
-}
-
-const char UsageDefaultName [] = "sra-dflt-schema";
-
-
-rc_t CC UsageSummary (const char * progname)
-{
-    return KOutMsg ("\n"
-                    "Usage:\n"
-                    "  %s src1 src2 -Iinclude1 -Iinclude2 -ooutput -Tdependency\n",
-                    progname);
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    rc_t rc;
-
-    if ( args == NULL )
-        rc = RC( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        const char * progname = UsageDefaultName;
-        const char * fullpath = UsageDefaultName;
-
-        rc = ArgsProgram ( args, &fullpath, &progname );
-
-        UsageSummary( progname );
-
-        KOutMsg( "%s src1 src2 -Iinclude1 -Iinclude2 -ooutput -Tdependency\n"
-                  "    src1, src2 ..........schema source-files  (mandatory))\n"
-                  " -I include1, include2 ..schema include-files (optional))\n"
-                  " -o output-file .........schema output (optional)) if none --> stdout\n"
-                  " -T dependency-file .....list of includes in make-syntax (optional))\n",
-                  progname );
-
-        HelpVersion( fullpath, KAppVersion() );
-    }
-    return rc;
-}
-
-
-/* pass the new extension without a leading dot!
-   assumes that the filename is not static, but made via malloc */
-void change_extension( char **filename, const char *new_extension )
-{
-    char *temp, *buf;
-    size_t src_len, ext_len;
-
-    if ( filename == NULL ) return;
-    if ( (*filename) == NULL ) return;
-    if ( new_extension == NULL ) return;
-    src_len = strlen( *filename );
-    if ( src_len < 1 ) return;
-    ext_len = strlen( new_extension );
-    if ( ext_len < 1 ) return;
-    buf = malloc( src_len + ext_len + 2 );
-    temp = strrchr( *filename, '.' );
-    if ( temp != NULL ) *temp = 0; /* terminate */
-    sprintf( buf, "%s.%s", *filename, new_extension );
-    temp = *filename;
-    *filename = buf;
-    free( temp );
-}
-
-#define OPTION_INCLUDE "include"
-#define OPTION_DEPENDENCY "dependency"
-#define OPTION_OUTPUT "output"
-#define ALIAS_INCLUDE "I"
-#define ALIAS_DEPENDENCY "T"
-#define ALIAS_OUTPUT "o"
-
-const char * include_usage[] = { "include schema", NULL };
-const char * dependency_usage[] = { "dependency", NULL };
-const char * output_usage[] = { "output", NULL };
-
-OptDef Options[] =
-{
-/* is their a real reason for a limit of 10? */
-    { OPTION_INCLUDE, ALIAS_INCLUDE, NULL, include_usage, 10, true, false },
-    { OPTION_DEPENDENCY, ALIAS_DEPENDENCY, NULL, dependency_usage, 1, true, false },
-    { OPTION_OUTPUT, ALIAS_OUTPUT, NULL, output_usage, 1, true, false }
-};
-
-static const char* get_str_option( const Args *my_args, const char *name )
-{
-    const char* res = NULL;
-    uint32_t count;
-    rc_t rc = ArgsOptionCount( my_args, name, &count );
-    if ( ( rc == 0 )&&( count > 0 ) )
-    {
-        ArgsOptionValue( my_args, name, 0, (const void **)&res );
-    }
-    return res;
-}
-
-static void append_str_options( const Args *my_args, const char *name, VNamelist *dst )
-{
-    uint32_t count;
-    rc_t rc = ArgsOptionCount( my_args, name, &count );
-    if ( ( rc == 0 )&&( count > 0 ) )
-    {
-        uint32_t idx;
-        for ( idx=0; idx<count; ++idx )
-        {
-            const char* s;
-            if ( ArgsOptionValue( my_args, name, idx, (const void **)&s ) == 0 )
-                VNamelistAppend( dst, s );
-        }
-    }
-}
-
-static void append_str_arguments( const Args *my_args, VNamelist *dst )
-{
-    uint32_t count;
-    rc_t rc = ArgsParamCount( my_args, &count );
-    if ( ( rc == 0 )&&( count > 0 ) )
-    {
-        uint32_t idx;
-        for ( idx=0; idx<count; ++idx )
-        {
-            const char* s;
-            if ( ArgsParamValue( my_args, idx, (const void **)&s ) == 0 )
-                VNamelistAppend( dst, s );
-        }
-    }
-}
-
-static void evaluate_options( const Args *my_args, context *ctx )
-{
-    context_set_str( (char**)&(ctx->output_file),
-                     get_str_option( my_args, OPTION_OUTPUT ) );
-    context_set_str( (char**)&(ctx->dependency_file),
-                     get_str_option( my_args, OPTION_DEPENDENCY ) );
-    append_str_options( my_args, OPTION_INCLUDE, ctx->include_files );
-    append_str_arguments( my_args, ctx->src_files );
-}
-
-static rc_t capture_arguments_and_options( Args * args, context *ctx )
-{
-    evaluate_options( args, ctx );
-    change_extension( &(ctx->dependency_file), DEPENDENCY_EXTENSION );
-
-    return 0;
-}
-
-typedef rc_t (*name_fkt)( void *data, const char *my_name );
-
-static rc_t for_each_v_name( VNamelist *names, void *data, const name_fkt f )
-{
-    KNamelist *knames;
-    uint32_t count, idx;
-    rc_t rc = VNamelistToNamelist( names, (KNamelist **)&knames );
-    display_rescode( rc, "VNamelistToNamelist failed", NULL );
-    if ( rc == 0 )
-    {
-        rc = KNamelistCount( knames, &count );
-        display_rescode( rc, "KNamelistCount failed", NULL );
-        if ( rc == 0 )
-        {
-            for ( idx=0; idx<count; ++idx )
-            {
-                const char *my_path;
-                rc = KNamelistGet( knames, idx, &my_path );
-                display_rescode( rc, "KNamelistGet failed", NULL );
-                if ( rc == 0 )
-                    rc = f( data, my_path );
-            }
-        }
-        KNamelistRelease( knames );
-    }
-    return rc;
-}
-
-static rc_t for_each_k_name( KNamelist *names, void *data, const name_fkt f )
-{
-    uint32_t count, idx;
-    rc_t rc = KNamelistCount( names, &count );
-    display_rescode( rc, "KNamelistCount failed", NULL );
-    if ( rc == 0 )
-    {
-        for ( idx=0; idx<count; ++idx )
-        {
-            const char *my_path;
-            rc = KNamelistGet( names, idx, &my_path );
-            display_rescode( rc, "KNamelistGet failed", NULL );
-            if ( rc == 0 )
-                rc = f( data, my_path );
-        }
-    }
-    return rc;
-}
-
-static uint32_t namelistcount( VNamelist *names )
-{
-    KNamelist *knames;
-    uint32_t count = 0;
-
-    if ( VNamelistToNamelist( names, (KNamelist **)&knames ) == 0 )
-        KNamelistCount( knames, &count );
-    return count;
-}
-
-static rc_t add_include( void *data, const char *my_name )
-{
-    VSchema *my_schema = (VSchema*)data;
-    rc_t rc = VSchemaAddIncludePath( my_schema, "%s", my_name );
-    display_rescode( rc, "VSchemaAddIncludePath failed", NULL );
-    return rc;
-}
-
-static rc_t add_source( void *data, const char *my_name )
-{
-    VSchema *my_schema = (VSchema*)data;
-    rc_t rc = VSchemaParseFile( my_schema, "%s", my_name );
-    display_rescode( rc, "VSchemaParseFile failed", NULL );
-    return rc;
-}
-
-struct schema_dumper_state_t {
-    FILE *fp;
-    unsigned line_pos;
-    uint32_t out_size;
-    char line_buf[255];
-};
-
-static void schema_dumper_state_write_line(struct schema_dumper_state_t *st) {
-    st->line_buf[st->line_pos] = '\n';
-    fwrite(st->line_buf, 1, st->line_pos + 1, st->fp);
-    st->line_pos = 0;
-}
-
-/********************************************************************
-helper function needed by schema-dump
-********************************************************************/
-static rc_t CC my_flush ( void *dst, const void *buffer, size_t bsize )
-{
-    struct schema_dumper_state_t *st = (struct schema_dumper_state_t *)dst;
-    size_t i;
-    
-    st->out_size += bsize;
-    for (i = 0; i != bsize; ++i) {
-        int n;
-        int c = ((const char *)buffer)[i];
-        
-        if (st->line_pos > 80)
-            schema_dumper_state_write_line(st);
-
-        if (c == '\'' || c == '\\')
-            n = sprintf(st->line_buf + st->line_pos, " '\\%c',", c);
-        else
-            n = sprintf(st->line_buf + st->line_pos, " '%c',", c);
-        st->line_pos += n;
-    }
-    return 0;
-}
-
-static rc_t Write1Dependency( void* data, const char* name )
-{
-    FILE *my_file = (FILE*)data;
-    char prefix[] = { " \\\n  " };
-    size_t to_write;
-
-    if ( my_file == NULL ) return 0;
-    if ( name == NULL ) return 0;
-    to_write = strlen( name );
-    if ( to_write == 0 ) return 0;
-    fwrite( prefix, sizeof(char), strlen(prefix), my_file );
-    fwrite( name, sizeof(char), to_write, my_file );
-    return 0;
-}
-
-static rc_t WriteDependency( VSchema *my_schema, const context *ctx )
-{
-    rc_t rc = 0;
-    FILE *my_file;
-    const KNamelist *knames;
-
-    if ( ctx->dependency_file == NULL ) return rc;
-    if ( ctx->output_file == NULL ) return rc;
-    rc = VSchemaIncludeFiles( my_schema, &knames );
-    display_rescode( rc, "VSchemaIncludeFiles failed", NULL );
-    if ( rc == 0 )
-    {
-        my_file = fopen( ctx->dependency_file, "w" );
-        if ( my_file != NULL )
-        {
-            char buf[512];
-            int len = snprintf( buf, sizeof(buf), "%s:", ctx->output_file );
-            if ( ( len < 0 )||( len >= sizeof(buf) ) )
-            {
-                rc = -1;
-            }
-            else
-            {
-                fwrite( buf, sizeof(char), len, my_file );
-                for_each_k_name( (void*)knames, my_file, Write1Dependency );
-            }
-            fclose( my_file );
-        }
-        KNamelistRelease( knames );
-    }
-    return rc;
-}
-
-static rc_t DumpSchema_to( VSchema *my_schema, const context *ctx )
-{
-    struct schema_dumper_state_t st;
-    rc_t rc = 0;
-    unsigned i;
-
-    static const char *preamble[] = {
-        "/*===========================================================================",
-        "*",
-        "*                             PUBLIC DOMAIN NOTICE",
-        "*                National Center for Biotechnology Information",
-        "*",
-        "*   This software/database is a \"United States Government Work\" under the",
-        "*   terms of the United States Copyright Act.  It was written as part of",
-        "*   the author's official duties as a United States Government employee and",
-        "*   thus cannot be copyrighted.  This software/database is freely available",
-        "*   to the public for use. The National Library of Medicine and the U.S.",
-        "*   Government have not placed any restriction on its use or reproduction.",
-        "*",
-        "*   Although all reasonable efforts have been taken to ensure the accuracy",
-        "*   and reliability of the software and data, the NLM and the U.S.",
-        "*   Government do not and cannot warrant the performance or results that",
-        "*   may be obtained by using this software or data. The NLM and the U.S.",
-        "*   Government disclaim all warranties, express or implied, including",
-        "*   warranties of performance, merchantability or fitness for any particular",
-        "*   purpose.",
-        "*",
-        "*   Please cite the author in any work or product based on this material.",
-        "*",
-        "* ===========================================================================",
-        "*",
-        "* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT",
-        "*/",
-
-        "#include \"sraschema-priv.h\"",
-        "const char sra_schema_text[] = {"
-    };
-    static const char *postamble[] = {
-        "};",
-        "const size_t sra_schema_size =",
-    };
-    
-    memset(&st, 0, sizeof(st));
-    
-    st.fp = ctx->output_file ? fopen(ctx->output_file, "w") : stdout;
-    
-    if (st.fp == NULL)
-        return RC(rcSRA, rcSchema, rcFormatting, rcFile, rcNotOpen);
-
-    for ( i = 0; i != sizeof(preamble) / sizeof(preamble[0]); ++i)
-        fprintf(st.fp, "%s\n", preamble[i]);
-    
-    rc = VSchemaDump( my_schema, sdmCompact, NULL, my_flush, &st );
-    if (rc == 0) {
-        if (st.line_pos != 0)
-            schema_dumper_state_write_line(&st);
-        fprintf(st.fp, "%s\n", postamble[0]);
-        fprintf(st.fp, "%s %u;\n", postamble[1], st.out_size);
-    }
-    if (st.fp != stdout)
-        fclose(st.fp);
-    return rc;
-}
-
-static rc_t DumpSchema( const context *ctx )
-{
-    KDirectory *my_dir;
-    rc_t rc = KDirectoryNativeDir ( &my_dir );
-    display_rescode( rc, "failed to open native dir", NULL );
-    if ( rc == 0 )
-    {
-        const VDBManager *my_manager;
-        rc = VDBManagerMakeRead ( &my_manager, my_dir );
-        display_rescode( rc, "failed to make manager", NULL );
-        if ( rc == 0 )
-        {
-            VSchema *my_schema;
-            rc = VDBManagerMakeSchema( my_manager, &my_schema );
-            display_rescode( rc, "failed to make schema", NULL );
-            if ( rc == 0 )
-            {
-                rc = for_each_v_name( ctx->include_files, my_schema, add_include );
-                if ( rc == 0 )
-                {
-                    rc = for_each_v_name( ctx->src_files, my_schema, add_source );
-                    if ( rc == 0 )
-                    {
-                        rc = DumpSchema_to( my_schema, ctx );
-                        if ( rc == 0 )
-                            rc = WriteDependency( my_schema, ctx );
-                    }
-                }
-                VSchemaRelease( my_schema );
-            }
-            VDBManagerRelease( my_manager );
-        }
-        KDirectoryRelease( my_dir );
-    }
-    return rc;
-}
-
-/****************************************************************************************
- ***************************************************************************************/
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args * my_args;
-    rc_t rc;
-
-    rc = ArgsMakeAndHandle (&my_args, argc, argv, 1, 
-                            Options, sizeof (Options) / sizeof (OptDef));
-    if (rc == 0)
-    {
-        context *ctx;
-
-        context_init( &ctx );
-
-        rc = capture_arguments_and_options( my_args, ctx );
-        if ( rc == 0 )
-        {
-            if ( namelistcount( ctx->src_files ) > 0 )
-            {
-                rc = DumpSchema( ctx );
-            }
-            else
-            {
-                MiniUsage (my_args);
-            }
-        }
-        context_destroy( ctx );
-
-        ArgsWhack( my_args );
-    }
-    return rc;
-}
diff --git a/libs/sra/sra-priv.h b/libs/sra/sra-priv.h
deleted file mode 100644
index c5798c5..0000000
--- a/libs/sra/sra-priv.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_sra_priv_
-#define _h_sra_priv_
-
-#ifndef _h_sra_sradb_
-#include <sra/sradb.h>
-#endif
-
-#ifndef _h_klib_vector_
-#include <klib/vector.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef KONST
-#define KONST const
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KMetadata;
-struct VDBManager;
-struct VSchema;
-struct VTable;
-struct VCursor;
-struct VTypedecl;
-struct VTypedef;
-struct VResolver;
-struct SRACache;
-
-#define CSRA_EXT(lite) (lite ? ".lite.sra" : ".sra")
-#define SRA_EXT(lite) (lite ? ".lite.sra" : ".sra")
-
-/*--------------------------------------------------------------------------
- * SRAMgr
- */
-struct SRAMgr
-{
-    struct VDBManager KONST *vmgr;
-    struct VSchema const *schema;
-#if OLD_SRAPATH_MGR
-    struct SRAPath volatile *_pmgr;
-#else
-    struct VResolver volatile *_pmgr;
-#endif
-    struct SRACache* cache;
-    KRefcount refcount;
-    KCreateMode mode;
-    bool read_only;
-};
-
-/* SRAMgrMake
- */
-rc_t SRAMgrMake ( SRAMgr **mgr,
-    struct VDBManager const *vmgr, struct KDirectory const *wd );
-
-/* Attach
- * Sever
- */
-SRAMgr *SRAMgrAttach ( const SRAMgr *self );
-rc_t SRAMgrSever ( const SRAMgr *self );
-
-
-/* AccessSRAPath
- *  returns a new reference to SRAPath
- *  do NOT access "pmgr" directly
- */
-struct SRAPath *SRAMgrAccessSRAPath ( const SRAMgr *self );
-
-/*--------------------------------------------------------------------------
- * SRATable
- */
-struct SRATable
-{
-    KONST SRAMgr *mgr;
-    struct VTable KONST *vtbl;
-    struct VCursor KONST *curs;
-    struct KMetadata KONST *meta;
-
-    Vector wcol;
-
-    KRefcount refcount;
-
-    uint32_t metavers;
-
-    KCreateMode mode;
-    bool curs_open;
-    bool read_only;
-
-    uint64_t spot_count;
-    uint64_t base_count;
-    int64_t min_spot_id;
-    int64_t max_spot_id;
-};
-
-/* Whack
- * Destroy
- */
-rc_t SRATableWhack ( SRATable *self );
-void SRATableDestroy ( SRATable *self );
-
-/* Attach
- * Sever
- */
-SRATable *SRATableAttach ( const SRATable *self );
-rc_t SRATableSever ( const SRATable *self );
-
-/* SRATableRead
- */
-rc_t SRATableRead ( const SRATable *self, spotid_t id,
-    uint32_t cid, const void **base, bitsz_t *offset, bitsz_t *size );
-
-/* SRATableColDatatype
- */
-rc_t SRATableColDatatype ( const SRATable *self, uint32_t idx,
-    struct VTypedecl *type, struct VTypedef *def );
-
-/* SRATableGetIdRange
- */
-rc_t SRATableGetIdRange ( const SRATable *self, uint32_t idx,
-    spotid_t id, spotid_t *pfirst, spotid_t *last );
-
-rc_t ResolveTablePath ( const SRAMgr *mgr, char *path, size_t psize, const char *spec, va_list args );
-
-rc_t SRATableFillOut ( SRATable *self, bool update );
-    
-/*--------------------------------------------------------------------------
- * SRAColumn
- */
-struct SRAColumn
-{
-    const SRATable *tbl;
-    KRefcount refcount;
-    uint32_t idx;
-    uint32_t elem_bits;
-    bool read_only;
-};
-
-
-/* Whackity whack
- */
-rc_t SRAColumnWhack ( SRAColumn *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _sra_priv_ */
diff --git a/libs/sra/sra-schema.c b/libs/sra/sra-schema.c
deleted file mode 100644
index 53531ae..0000000
--- a/libs/sra/sra-schema.c
+++ /dev/null
@@ -1,4133 +0,0 @@
-/*===========================================================================
-*
-*                             PUBLIC DOMAIN NOTICE
-*                National Center for Biotechnology Information
-*
-*   This software/database is a "United States Government Work" under the
-*   terms of the United States Copyright Act.  It was written as part of
-*   the author's official duties as a United States Government employee and
-*   thus cannot be copyrighted.  This software/database is freely available
-*   to the public for use. The National Library of Medicine and the U.S.
-*   Government have not placed any restriction on its use or reproduction.
-*
-*   Although all reasonable efforts have been taken to ensure the accuracy
-*   and reliability of the software and data, the NLM and the U.S.
-*   Government do not and cannot warrant the performance or results that
-*   may be obtained by using this software or data. The NLM and the U.S.
-*   Government disclaim all warranties, express or implied, including
-*   warranties of performance, merchantability or fitness for any particular
-*   purpose.
-*
-*   Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT
-*/
-#include "sraschema-priv.h"
-const char sra_schema_text[] = {
- 'v', 'e', 'r', 's', 'i', 'o', 'n', ' ', '1', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f',
- ' ', 'I', '6', '4', ' ', 'v', 'd', 'b', ':', 'r', 'o', 'w', '_', 'i', 'd', '_', 'r',
- 'a', 'n', 'g', 'e', '[', '2', ']', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'U',
- '1', '6', ' ', 't', 'e', 'x', 't', ':', 't', 'o', 'k', 'e', 'n', '[', '3', ']', ';',
- 'a', 'l', 'i', 'a', 's', ' ', 't', 'e', 'x', 't', ':', 't', 'o', 'k', 'e', 'n', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'p', 'o', 't', '_', 'n', 'a', 'm',
- 'e', '_', 't', 'o', 'k', 'e', 'n', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'a',
- 's', 'c', 'i', 'i', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e',
- 'x', 't', ';', 'a', 'l', 'i', 'a', 's', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n',
- 'a', ':', 't', 'e', 'x', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'f', 'a', 's', 't',
- 'a', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'U', '8', ' ', 'I', 'N', 'S', 'D',
- 'C', ':', '4', 'n', 'a', ':', 'b', 'i', 'n', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f',
- ' ', 'B', '1', ' ', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'p', 'a', 'c',
- 'k', 'e', 'd', '[', '4', ']', ';', 'a', 'l', 'i', 'a', 's', ' ', 'I', 'N', 'S', 'D',
- 'C', ':', '4', 'n', 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ', 'I', 'N', 'S', 'D',
- 'C', ':', 'd', 'n', 'a', ':', '4', 'n', 'a', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f',
- ' ', 'U', '8', ' ', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'b', 'i', 'n',
- ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'U', '8', ' ', 'I', 'N', 'S', 'D', 'C',
- ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f',
- ' ', 'B', '1', ' ', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'p', 'a', 'c',
- 'k', 'e', 'd', '[', '2', ']', ';', 'a', 'l', 'i', 'a', 's', ' ', 'I', 'N', 'S', 'D',
- 'C', ':', '2', 'n', 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ', 'I', 'N', 'S', 'D',
- 'C', ':', 'd', 'n', 'a', ':', '2', 'n', 'a', ';', 'a', 'l', 'i', 'a', 's', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ', 'N',
- 'C', 'B', 'I', ':', '2', 'n', 'a', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'a',
- 's', 'c', 'i', 'i', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'l', 'o', 'r', ':',
- 't', 'e', 'x', 't', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'U', '8', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', '2', 'c', 's', ':', 'b', 'i', 'n', ';', 't', 'y', 'p', 'e',
- 'd', 'e', 'f', ' ', 'U', '8', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's',
- ':', 'b', 'i', 'n', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'B', '1', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', '2', 'c', 's', ':', 'p', 'a', 'c', 'k', 'e', 'd', '[', '2',
- ']', ';', 'a', 'l', 'i', 'a', 's', ' ', 'I', 'N', 'S', 'D', 'C', ':', '2', 'c', 's',
- ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'l',
- 'o', 'r', ':', '2', 'c', 's', ';', 'a', 'l', 'i', 'a', 's', ' ', 'I', 'N', 'S', 'D',
- 'C', ':', '2', 'c', 's', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ', 'N', 'C', 'B', 'I',
- ':', '2', 'c', 's', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'a', 's', 'c', 'i',
- 'i', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'r', 'o', 't', 'e', 'i', 'n', ':', 't',
- 'e', 'x', 't', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'U', '8', ' ', 'I', 'N',
- 'S', 'D', 'C', ':', 'a', 'a', ':', 'b', 'i', 'n', ';', 't', 'y', 'p', 'e', 'd', 'e',
- 'f', ' ', 'U', '8', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't',
- 'y', ':', 'p', 'h', 'r', 'e', 'd', ';', 'a', 'l', 'i', 'a', 's', ' ', 'I', 'N', 'S',
- 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p', 'h', 'r', 'e', 'd', ' ',
- 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', '1', ';', 't', 'y', 'p', 'e', 'd', 'e',
- 'f', ' ', 'I', '8', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't',
- 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ';', 't', 'y', 'p', 'e', 'd', 'e',
- 'f', ' ', 'a', 's', 'c', 'i', 'i', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a',
- 'l', 'i', 't', 'y', ':', 't', 'e', 'x', 't', ':', 'p', 'h', 'r', 'e', 'd', '_', '3',
- '3', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'a', 's', 'c', 'i', 'i', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 't', 'e', 'x', 't',
- ':', 'p', 'h', 'r', 'e', 'd', '_', '6', '4', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f',
- ' ', 'a', 's', 'c', 'i', 'i', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l',
- 'i', 't', 'y', ':', 't', 'e', 'x', 't', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's',
- '_', '6', '4', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'I', '3', '2', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ';', 't', 'y',
- 'p', 'e', 'd', 'e', 'f', ' ', 'U', '3', '2', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c',
- 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ',
- 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ';', 't',
- 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'v', 'a', 'l', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd',
- ':', 'o', 'n', 'e', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'I', 'N', 'S', 'D',
- 'C', ':', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ':', 'z', 'e', 'r', 'o', ';', 't',
- 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'o', 'n', 'e', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'o', 's', 'i', 't',
- 'i', 'o', 'n', ':', 'o', 'n', 'e', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'U',
- '8', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_',
- 'f', 'i', 'l', 't', 'e', 'r', ';', 'a', 'l', 'i', 'a', 's', ' ', 'I', 'N', 'S', 'D',
- 'C', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 'f', 'i', 'l', 't', 'e', 'r',
- ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 'f', 'i',
- 'l', 't', 'e', 'r', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'U', '8', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'x', 'r', 'e', 'a', 'd', '_', 't', 'y',
- 'p', 'e', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'I', 'N', 'S', 'D', 'C', ':',
- 'S', 'R', 'A', ':', 'x', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ' ', 'I', 'N',
- 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e',
- ';', 'a', 'l', 'i', 'a', 's', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':',
- 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ';', 't', 'y', 'p', 'e', 'd',
- 'e', 'f', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':',
- 'p', 'h', 'r', 'e', 'd', ' ', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', 'i', 't',
- 'y', ':', 'n', '_', 'e', 'n', 'c', 'o', 'd', 'e', 'd', ':', 'p', 'h', 'r', 'e', 'd',
- ';', 'a', 'l', 'i', 'a', 's', ' ', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', 'i',
- 't', 'y', ':', 'n', '_', 'e', 'n', 'c', 'o', 'd', 'e', 'd', ':', 'p', 'h', 'r', 'e',
- 'd', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e', 'n', 'c', '_', 'q', 'u',
- 'a', 'l', '1', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'I', 'N', 'S', 'D', 'C',
- ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's',
- ' ', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'n', '_', 'e',
- 'n', 'c', 'o', 'd', 'e', 'd', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ';', 't',
- 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'I', '1', '6', ' ', 'N', 'C', 'B', 'I', ':', 'i',
- 's', 'a', 'm', 'p', '1', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'F', '3', '2',
- ' ', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '1', ';', 't', 'y', 'p', 'e',
- 'd', 'e', 'f', ' ', 'F', '3', '2', ' ', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm',
- 'p', '4', '[', '4', ']', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'B', '8', ' ',
- 'N', 'C', 'B', 'I', ':', 'a', 's', 'n', ':', 'b', 'i', 'n', 'a', 'r', 'y', ';', 't',
- 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'a', 's', 'c', 'i', 'i', ' ', 'N', 'C', 'B', 'I',
- ':', 'a', 's', 'n', ':', 't', 'e', 'x', 't', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f',
- ' ', 'U', '6', '4', ' ', 'N', 'C', 'B', 'I', ':', 'g', 'i', ';', 't', 'y', 'p', 'e',
- 'd', 'e', 'f', ' ', 'U', '3', '2', ' ', 'N', 'C', 'B', 'I', ':', 't', 'a', 'x', 'i',
- 'd', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'U', '3', '2', ' ', 'N', 'C', 'B',
- 'I', ':', 'g', 'b', '_', 's', 't', 'a', 't', 'e', ';', 't', 'y', 'p', 'e', 'd', 'e',
- 'f', ' ', 'U', '3', '2', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 's',
- 'p', 'o', 't', 'i', 'd', '_', 't', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'U',
- '6', '4', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 's', 'p', 'o', 't',
- '_', 'i', 'd', 's', '_', 'f', 'o', 'u', 'n', 'd', '[', '4', ']', ';', 't', 'y', 'p',
- 'e', 'd', 'e', 'f', ' ', 'U', '8', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A',
- ':', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ';', 'a', 'l', 'i', 'a',
- 's', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l', 'a', 't', 'f',
- 'o', 'r', 'm', '_', 'i', 'd', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'p',
- 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ';', 't', 'y', 'p', 'e', 'd', 'e',
- 'f', ' ', 'U', '1', '6', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'S', 'e',
- 'g', 'm', 'e', 'n', 't', '[', '2', ']', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ',
- 'B', '8', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'S', 'p', 'o', 't', 'D',
- 'e', 's', 'c', '[', '1', '6', ']', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'B',
- '8', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'R', 'e', 'a', 'd', 'D', 'e',
- 's', 'c', '[', '8', '0', ']', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'N', 'C',
- 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 'r', 'o', 't', 'a', 't', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p', '4', ';',
- 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm',
- 'p', '4', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p',
- 'e', 'd', '_', 'f', 's', 'a', 'm', 'p', '4', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f',
- ' ', 'U', '1', '6', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'p', 'o', 's',
- '1', '6', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'I', 'N', 'S', 'D', 'C', ':',
- 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ' ',
- 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', '4', '[', '4', ']', ';', 't', 'y', 'p',
- 'e', 'd', 'e', 'f', ' ', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', '4', ' ', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'r', 'o', 't', 'a', 't', 'e', 'd', '_', 'q',
- 'u', 'a', 'l', '4', ';', 't', 'y', 'p', 'e', 'd', 'e', 'f', ' ', 'N', 'C', 'B', 'I',
- ':', 'q', 'u', 'a', 'l', '4', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's',
- 'w', 'a', 'p', 'p', 'e', 'd', '_', 'q', 'u', 'a', 'l', '4', ';', 't', 'y', 'p', 'e',
- 'd', 'e', 'f', ' ', 'B', '8', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e',
- 'n', 'c', 'o', 'd', 'e', 'd', '_', 'q', 'u', 'a', 'l', '4', ';', 'a', 'l', 'i', 'a',
- 's', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e', 'n', 'c', 'o', 'd', 'e',
- 'd', '_', 'q', 'u', 'a', 'l', '4', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'c', 'o', 'm', 'p', '_', 'q', 'u', 'a', 'l', '4', ';', 't', 'y', 'p', 'e', 's', 'e',
- 't', ' ', 'i', 'n', 't', 'e', 'g', 'e', 'r', '_', 's', 'e', 't', '{', 'U', '8', ',',
- 'U', '1', '6', ',', 'U', '3', '2', ',', 'U', '6', '4', ',', 'I', '8', ',', 'I', '1',
- '6', ',', 'I', '3', '2', ',', 'I', '6', '4', '}', ';', 't', 'y', 'p', 'e', 's', 'e',
- 't', ' ', 'f', 'l', 'o', 'a', 't', '_', 's', 'e', 't', '{', 'F', '3', '2', ',', 'F',
- '6', '4', '}', ';', 't', 'y', 'p', 'e', 's', 'e', 't', ' ', 'n', 'u', 'm', 'e', 'r',
- 'i', 'c', '_', 's', 'e', 't', '{', 'U', '8', ',', 'U', '1', '6', ',', 'U', '3', '2',
- ',', 'U', '6', '4', ',', 'I', '8', ',', 'I', '1', '6', ',', 'I', '3', '2', ',', 'I',
- '6', '4', ',', 'F', '3', '2', ',', 'F', '6', '4', '}', ';', 't', 'y', 'p', 'e', 's',
- 'e', 't', ' ', 't', 'e', 'x', 't', '_', 's', 'e', 't', '{', 'u', 't', 'f', '8', ',',
- 'u', 't', 'f', '1', '6', ',', 'u', 't', 'f', '3', '2', ',', 'a', 's', 'c', 'i', 'i',
- '}', ';', 't', 'y', 'p', 'e', 's', 'e', 't', ' ', 't', 'e', 'x', 't', '8', '_', 's',
- 'e', 't', '{', 'u', 't', 'f', '8', ',', 'a', 's', 'c', 'i', 'i', '}', ';', 't', 'y',
- 'p', 'e', 's', 'e', 't', ' ', 't', 'r', 'a', 'n', 's', 'p', 'o', 's', 'e', '_', 's',
- 'e', 't', '{', 'B', '8', ',', 'B', '1', '6', ',', 'B', '3', '2', ',', 'B', '6', '4',
- '}', ';', 't', 'y', 'p', 'e', 's', 'e', 't', ' ', 'p', 'a', 'c', 'k', '_', 's', 'e',
- 't', '{', 'B', '8', ',', 'B', '1', '6', ',', 'B', '3', '2', ',', 'B', '6', '4', ',',
- 'U', '8', ',', 'U', '1', '6', ',', 'U', '3', '2', ',', 'U', '6', '4', ',', 'I', '8',
- ',', 'I', '1', '6', ',', 'I', '3', '2', ',', 'I', '6', '4', '}', ';', 't', 'y', 'p',
- 'e', 's', 'e', 't', ' ', 'i', 'z', 'i', 'p', '_', 's', 'e', 't', '{', 'U', '8', ',',
- 'U', '1', '6', ',', 'U', '3', '2', ',', 'U', '6', '4', ',', 'I', '8', ',', 'I', '1',
- '6', ',', 'I', '3', '2', ',', 'I', '6', '4', '}', ';', 't', 'y', 'p', 'e', 's', 'e',
- 't', ' ', 'f', 'z', 'i', 'p', '_', 's', 'e', 't', '{', 'F', '3', '2', '}', ';', 't',
- 'y', 'p', 'e', 's', 'e', 't', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's',
- 't', 'a', 't', 's', ':', 'q', 'u', 'a', 'l', '_', 't', 'y', 'p', 'e', '{', 'I', 'N',
- 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p', 'h', 'r', 'e', 'd',
- ',', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l', 'o',
- 'g', '_', 'o', 'd', 'd', 's', ',', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l',
- 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '[', '4', ']', '}', ';',
- 't', 'y', 'p', 'e', 's', 'e', 't', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- '_', '4', '5', '4', '_', ':', 'd', 'r', 'd', 'p', 'a', 'r', 'a', 'm', '_', 's', 'e',
- 't', '{', 'U', '8', ',', 'a', 's', 'c', 'i', 'i', ',', 'I', 'N', 'S', 'D', 'C', ':',
- '2', 'n', 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd', '}', ';', 'f', 'm', 't', 'd', 'e',
- 'f', ' ', 'm', 'e', 'r', 'g', 'e', 'd', '_', 'f', 'm', 't', ';', 'f', 'm', 't', 'd',
- 'e', 'f', ' ', 't', 'r', 'a', 'n', 's', 'p', 'o', 's', 'e', 'd', '_', 'f', 'm', 't',
- ';', 'f', 'm', 't', 'd', 'e', 'f', ' ', 'd', 'e', 'l', 't', 'a', '_', 'a', 'v', 'e',
- 'r', 'a', 'g', 'e', 'd', '_', 'f', 'm', 't', ';', 'f', 'm', 't', 'd', 'e', 'f', ' ',
- 'i', 'z', 'i', 'p', '_', 'f', 'm', 't', ';', 'f', 'm', 't', 'd', 'e', 'f', ' ', 'f',
- 'z', 'i', 'p', '_', 'f', 'm', 't', ';', 'f', 'm', 't', 'd', 'e', 'f', ' ', 'r', 'l',
- 'e', '_', 'f', 'm', 't', ';', 'f', 'm', 't', 'd', 'e', 'f', ' ', 'z', 'l', 'i', 'b',
- '_', 'f', 'm', 't', ';', 'f', 'm', 't', 'd', 'e', 'f', ' ', 'b', 'z', 'i', 'p', '2',
- '_', 'f', 'm', 't', ';', 'f', 'm', 't', 'd', 'e', 'f', ' ', 'm', 'e', 'r', 'g', 'e',
- 'd', '_', 't', ';', 'f', 'm', 't', 'd', 'e', 'f', ' ', 'f', 'p', '_', 'e', 'n', 'c',
- 'o', 'd', 'e', 'd', '_', 't', ';', 'f', 'm', 't', 'd', 'e', 'f', ' ', 'r', 'l', '_',
- 'e', 'n', 'c', 'o', 'd', 'e', 'd', '_', 't', ';', 'f', 'm', 't', 'd', 'e', 'f', ' ',
- 'N', 'C', 'B', 'I', ':', 'z', 'l', 'i', 'b', '_', 'e', 'n', 'c', 'o', 'd', 'e', 'd',
- '_', 't', ';', 'f', 'm', 't', 'd', 'e', 'f', ' ', 'N', 'C', 'B', 'I', ':', 'f', 'p',
- '_', 'e', 'n', 'c', 'o', 'd', 'e', 'd', '_', 't', ';', 'c', 'o', 'n', 's', 't', ' ',
- 'U', '8', ' ', 'A', 'L', 'I', 'G', 'N', '_', 'L', 'E', 'F', 'T', '=', '0', ';', 'c',
- 'o', 'n', 's', 't', ' ', 'U', '8', ' ', 'A', 'L', 'I', 'G', 'N', '_', 'R', 'I', 'G',
- 'H', 'T', '=', '1', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '8', ' ', 'C', 'A', 'S',
- 'E', '_', 'S', 'E', 'N', 'S', 'I', 'T', 'I', 'V', 'E', '=', '0', ';', 'c', 'o', 'n',
- 's', 't', ' ', 'U', '8', ' ', 'C', 'A', 'S', 'E', '_', 'I', 'N', 'S', 'E', 'N', 'S',
- 'I', 'T', 'I', 'V', 'E', '_', 'L', 'O', 'W', 'E', 'R', '=', '1', ';', 'c', 'o', 'n',
- 's', 't', ' ', 'U', '8', ' ', 'C', 'A', 'S', 'E', '_', 'I', 'N', 'S', 'E', 'N', 'S',
- 'I', 'T', 'I', 'V', 'E', '_', 'U', 'P', 'P', 'E', 'R', '=', '2', ';', 'c', 'o', 'n',
- 's', 't', ' ', 'I', '3', '2', ' ', 'Z', '_', 'F', 'I', 'L', 'T', 'E', 'R', 'E', 'D',
- '=', '1', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', '3', '2', ' ', 'Z', '_', 'H', 'U',
- 'F', 'F', 'M', 'A', 'N', '_', 'O', 'N', 'L', 'Y', '=', '2', ';', 'c', 'o', 'n', 's',
- 't', ' ', 'I', '3', '2', ' ', 'Z', '_', 'R', 'L', 'E', '=', '3', ';', 'c', 'o', 'n',
- 's', 't', ' ', 'I', '3', '2', ' ', 'Z', '_', 'D', 'E', 'F', 'A', 'U', 'L', 'T', '_',
- 'S', 'T', 'R', 'A', 'T', 'E', 'G', 'Y', '=', '0', ';', 'c', 'o', 'n', 's', 't', ' ',
- 'I', '3', '2', ' ', 'Z', '_', 'N', 'O', '_', 'C', 'O', 'M', 'P', 'R', 'E', 'S', 'S',
- 'I', 'O', 'N', '=', '0', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', '3', '2', ' ', 'Z',
- '_', 'B', 'E', 'S', 'T', '_', 'S', 'P', 'E', 'E', 'D', '=', '1', ';', 'c', 'o', 'n',
- 's', 't', ' ', 'I', '3', '2', ' ', 'Z', '_', 'B', 'E', 'S', 'T', '_', 'C', 'O', 'M',
- 'P', 'R', 'E', 'S', 'S', 'I', 'O', 'N', '=', '9', ';', 'c', 'o', 'n', 's', 't', ' ',
- 'I', '3', '2', ' ', 'Z', '_', 'D', 'E', 'F', 'A', 'U', 'L', 'T', '_', 'C', 'O', 'M',
- 'P', 'R', 'E', 'S', 'S', 'I', 'O', 'N', '=', '-', '1', ';', 'c', 'o', 'n', 's', 't',
- ' ', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'b', 'i', 'n', ' ', 'I', 'N',
- 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'm', 'a', 'p', ':', 'B', 'I', 'N', 'S', 'E',
- 'T', '=', '[', '0', ',', '1', ',', '2', ',', '3', ',', '4', ',', '5', ',', '6', ',',
- '7', ',', '8', ',', '9', ',', '1', '0', ',', '1', '1', ',', '1', '2', ',', '1', '3',
- ',', '1', '4', ',', '1', '5', ']', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S',
- 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'I', 'N', 'S', 'D', 'C',
- ':', '4', 'n', 'a', ':', 'm', 'a', 'p', ':', 'C', 'H', 'A', 'R', 'S', 'E', 'T', '=',
- '\'', '.', 'A', 'C', 'M', 'G', 'R', 'S', 'V', 'T', 'W', 'Y', 'H', 'K', 'D', 'B',
- 'N', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'd',
- 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a',
- ':', 'a', 'c', 'c', 'e', 'p', 't', ':', 'C', 'H', 'A', 'R', 'S', 'E', 'T', '=', '\'',
- '.', 'A', 'C', 'M', 'G', 'R', 'S', 'V', 'T', 'W', 'Y', 'H', 'K', 'D', 'B', 'N', 'a',
- 'c', 'm', 'g', 'r', 's', 'v', 't', 'w', 'y', 'h', 'k', 'd', 'b', 'n', '\'', ';',
- 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'b',
- 'i', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'm', 'a', 'p', ':',
- 'B', 'I', 'N', 'S', 'E', 'T', '=', '[', '0', ',', '1', ',', '2', ',', '3', ']', ';',
- 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't',
- 'e', 'x', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'm', 'a', 'p',
- ':', 'C', 'H', 'A', 'R', 'S', 'E', 'T', '=', '\'', 'A', 'C', 'G', 'T', '\'', ';',
- 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't',
- 'e', 'x', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'a', 'c', 'c',
- 'e', 'p', 't', ':', 'C', 'H', 'A', 'R', 'S', 'E', 'T', '=', '\'', 'A', 'C', 'G',
- 'T', 'a', 'c', 'g', 't', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S',
- 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n', ' ', 'I', 'N', 'S', 'D', 'C',
- ':', 'x', '2', 'n', 'a', ':', 'm', 'a', 'p', ':', 'B', 'I', 'N', 'S', 'E', 'T', '=',
- '[', '0', ',', '1', ',', '2', ',', '3', ',', '4', ']', ';', 'c', 'o', 'n', 's', 't',
- ' ', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'm', 'a', 'p', ':', 'C', 'H', 'A',
- 'R', 'S', 'E', 'T', '=', '\'', 'A', 'C', 'G', 'T', 'N', '\'', ';', 'c', 'o', 'n',
- 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't',
- ' ', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'a', 'c', 'c', 'e', 'p',
- 't', ':', 'C', 'H', 'A', 'R', 'S', 'E', 'T', '=', '\'', 'A', 'C', 'G', 'T', 'N',
- 'a', 'c', 'g', 't', 'n', '.', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N',
- 'S', 'D', 'C', ':', '2', 'c', 's', ':', 'b', 'i', 'n', ' ', 'I', 'N', 'S', 'D', 'C',
- ':', '2', 'c', 's', ':', 'm', 'a', 'p', ':', 'B', 'I', 'N', 'S', 'E', 'T', '=', '[',
- '0', ',', '1', ',', '2', ',', '3', ']', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N',
- 'S', 'D', 'C', ':', 'c', 'o', 'l', 'o', 'r', ':', 't', 'e', 'x', 't', ' ', 'I', 'N',
- 'S', 'D', 'C', ':', '2', 'c', 's', ':', 'm', 'a', 'p', ':', 'C', 'H', 'A', 'R', 'S',
- 'E', 'T', '=', '\'', '0', '1', '2', '3', '\'', ';', 'c', 'o', 'n', 's', 't', ' ',
- 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'l', 'o', 'r', ':', 't', 'e', 'x', 't', ' ',
- 'I', 'N', 'S', 'D', 'C', ':', '2', 'c', 's', ':', 'a', 'c', 'c', 'e', 'p', 't', ':',
- 'C', 'H', 'A', 'R', 'S', 'E', 'T', '=', '\'', '0', '1', '2', '3', '\'', ';', 'c',
- 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's', ':', 'b',
- 'i', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's', ':', 'm', 'a', 'p',
- ':', 'B', 'I', 'N', 'S', 'E', 'T', '=', '[', '0', ',', '1', ',', '2', ',', '3', ',',
- '4', ']', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o',
- 'l', 'o', 'r', ':', 't', 'e', 'x', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2',
- 'c', 's', ':', 'm', 'a', 'p', ':', 'C', 'H', 'A', 'R', 'S', 'E', 'T', '=', '\'',
- '0', '1', '2', '3', '.', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S',
- 'D', 'C', ':', 'c', 'o', 'l', 'o', 'r', ':', 't', 'e', 'x', 't', ' ', 'I', 'N', 'S',
- 'D', 'C', ':', 'x', '2', 'c', 's', ':', 'a', 'c', 'c', 'e', 'p', 't', ':', 'C', 'H',
- 'A', 'R', 'S', 'E', 'T', '=', '\'', '0', '1', '2', '3', '.', '\'', ';', 'c', 'o',
- 'n', 's', 't', ' ', 'U', '8', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'l', 'o',
- 'r', ':', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'm', 'a', 't', 'r', 'i', 'x', '=',
- '[', '0', ',', '1', ',', '2', ',', '3', ',', '4', ',', '1', ',', '0', ',', '3', ',',
- '2', ',', '4', ',', '2', ',', '3', ',', '0', ',', '1', ',', '4', ',', '3', ',', '2',
- ',', '1', ',', '0', ',', '4', ',', '4', ',', '4', ',', '4', ',', '4', ',', '4', ']',
- ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'a', 'a', ':', 'b',
- 'i', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'a', 'a', ':', 'm', 'a', 'p', ':', 'B',
- 'I', 'N', 'S', 'E', 'T', '=', '[', '1', ',', '2', ',', '3', ',', '4', ',', '5', ',',
- '6', ',', '7', ',', '8', ',', '9', ',', '1', '0', ',', '1', '1', ',', '1', '2', ',',
- '1', '3', ',', '1', '4', ',', '1', '5', ',', '1', '6', ',', '1', '7', ',', '1', '8',
- ',', '1', '9', ',', '2', '0', ',', '2', '1', ',', '2', '2', ',', '2', '3', ',', '2',
- '4', ',', '2', '5', ',', '2', '6', ',', '2', '7', ']', ';', 'c', 'o', 'n', 's', 't',
- ' ', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'r', 'o', 't', 'e', 'i', 'n', ':', 't', 'e',
- 'x', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'a', 'a', ':', 'm', 'a', 'p', ':', 'C',
- 'H', 'A', 'R', 'S', 'E', 'T', '=', '\'', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
- 'I', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'V', 'W', 'X', 'Y', 'Z', 'U', '*',
- 'O', 'J', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':',
- 'p', 'r', 'o', 't', 'e', 'i', 'n', ':', 't', 'e', 'x', 't', ' ', 'I', 'N', 'S', 'D',
- 'C', ':', 'a', 'a', ':', 'a', 'c', 'c', 'e', 'p', 't', ':', 'C', 'H', 'A', 'R', 'S',
- 'E', 'T', '=', '\'', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
- 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'V', 'W', 'X', 'Y', 'Z', 'U', '*', 'a', 'b',
- 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's',
- 't', 'v', 'w', 'x', 'y', 'z', 'u', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ' ', 'I', 'N',
- 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'm', 'i', 'n', ':', 'o', 'n', 'e',
- '=', '2', '1', '4', '7', '4', '8', '3', '6', '4', '9', ';', 'c', 'o', 'n', 's', 't',
- ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ' ',
- 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'm', 'a', 'x', ':', 'o',
- 'n', 'e', '=', '1', '0', '7', '3', '7', '4', '1', '8', '2', '3', ';', 'c', 'o', 'n',
- 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e',
- 'r', 'o', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'm', 'i',
- 'n', ':', 'z', 'e', 'r', 'o', '=', '2', '1', '4', '7', '4', '8', '3', '6', '4', '8',
- ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'z', 'e', 'r', 'o', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'm', 'a', 'x', ':', 'z', 'e', 'r', 'o', '=', '1', '0', '7', '3', '7', '4',
- '1', '8', '2', '2', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':',
- 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 'f', 'i', 'l', 't', 'e', 'r', ' ', 'S',
- 'R', 'A', '_', 'R', 'E', 'A', 'D', '_', 'F', 'I', 'L', 'T', 'E', 'R', '_', 'P', 'A',
- 'S', 'S', '=', '0', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':',
- 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 'f', 'i', 'l', 't', 'e', 'r', ' ', 'S',
- 'R', 'A', '_', 'R', 'E', 'A', 'D', '_', 'F', 'I', 'L', 'T', 'E', 'R', '_', 'R', 'E',
- 'J', 'E', 'C', 'T', '=', '1', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D',
- 'C', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 'f', 'i', 'l', 't', 'e', 'r',
- ' ', 'S', 'R', 'A', '_', 'R', 'E', 'A', 'D', '_', 'F', 'I', 'L', 'T', 'E', 'R', '_',
- 'C', 'R', 'I', 'T', 'E', 'R', 'I', 'A', '=', '2', ';', 'c', 'o', 'n', 's', 't', ' ',
- 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 'f', 'i',
- 'l', 't', 'e', 'r', ' ', 'S', 'R', 'A', '_', 'R', 'E', 'A', 'D', '_', 'F', 'I', 'L',
- 'T', 'E', 'R', '_', 'R', 'E', 'D', 'A', 'C', 'T', 'E', 'D', '=', '3', ';', 'c', 'o',
- 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'x', 'r', 'e',
- 'a', 'd', '_', 't', 'y', 'p', 'e', ' ', 'S', 'R', 'A', '_', 'R', 'E', 'A', 'D', '_',
- 'T', 'Y', 'P', 'E', '_', 'T', 'E', 'C', 'H', 'N', 'I', 'C', 'A', 'L', '=', '0', ';',
- 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'x',
- 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ' ', 'S', 'R', 'A', '_', 'R', 'E', 'A',
- 'D', '_', 'T', 'Y', 'P', 'E', '_', 'B', 'I', 'O', 'L', 'O', 'G', 'I', 'C', 'A', 'L',
- '=', '1', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R',
- 'A', ':', 'x', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ' ', 'S', 'R', 'A', '_',
- 'R', 'E', 'A', 'D', '_', 'T', 'Y', 'P', 'E', '_', 'F', 'O', 'R', 'W', 'A', 'R', 'D',
- '=', '2', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R',
- 'A', ':', 'x', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ' ', 'S', 'R', 'A', '_',
- 'R', 'E', 'A', 'D', '_', 'T', 'Y', 'P', 'E', '_', 'R', 'E', 'V', 'E', 'R', 'S', 'E',
- '=', '4', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R',
- 'A', ':', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ', 'S', 'R', 'A',
- '_', 'P', 'L', 'A', 'T', 'F', 'O', 'R', 'M', '_', 'U', 'N', 'D', 'E', 'F', 'I', 'N',
- 'E', 'D', '=', '0', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':',
- 'S', 'R', 'A', ':', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ', 'S',
- 'R', 'A', '_', 'P', 'L', 'A', 'T', 'F', 'O', 'R', 'M', '_', '4', '5', '4', '=', '1',
- ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':',
- 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ', 'S', 'R', 'A', '_', 'P',
- 'L', 'A', 'T', 'F', 'O', 'R', 'M', '_', 'I', 'L', 'L', 'U', 'M', 'I', 'N', 'A', '=',
- '2', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A',
- ':', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ', 'S', 'R', 'A', '_',
- 'P', 'L', 'A', 'T', 'F', 'O', 'R', 'M', '_', 'A', 'B', 'S', 'O', 'L', 'I', 'D', '=',
- '3', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A',
- ':', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ', 'S', 'R', 'A', '_',
- 'P', 'L', 'A', 'T', 'F', 'O', 'R', 'M', '_', 'C', 'O', 'M', 'P', 'L', 'E', 'T', 'E',
- '_', 'G', 'E', 'N', 'O', 'M', 'I', 'C', 'S', '=', '4', ';', 'c', 'o', 'n', 's', 't',
- ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l', 'a', 't', 'f', 'o',
- 'r', 'm', '_', 'i', 'd', ' ', 'S', 'R', 'A', '_', 'P', 'L', 'A', 'T', 'F', 'O', 'R',
- 'M', '_', 'H', 'E', 'L', 'I', 'C', 'O', 'S', '=', '5', ';', 'c', 'o', 'n', 's', 't',
- ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l', 'a', 't', 'f', 'o',
- 'r', 'm', '_', 'i', 'd', ' ', 'S', 'R', 'A', '_', 'P', 'L', 'A', 'T', 'F', 'O', 'R',
- 'M', '_', 'P', 'A', 'C', 'B', 'I', 'O', '_', 'S', 'M', 'R', 'T', '=', '6', ';', 'c',
- 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l',
- 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ', 'S', 'R', 'A', '_', 'P', 'L', 'A',
- 'T', 'F', 'O', 'R', 'M', '_', 'I', 'O', 'N', '_', 'T', 'O', 'R', 'R', 'E', 'N', 'T',
- '=', '7', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R',
- 'A', ':', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ', 'S', 'R', 'A',
- '_', 'P', 'L', 'A', 'T', 'F', 'O', 'R', 'M', '_', 'C', 'A', 'P', 'I', 'L', 'L', 'A',
- 'R', 'Y', '=', '8', ';', 'c', 'o', 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':',
- 'S', 'R', 'A', ':', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ', 'S',
- 'R', 'A', '_', 'P', 'L', 'A', 'T', 'F', 'O', 'R', 'M', '_', 'O', 'X', 'F', 'O', 'R',
- 'D', '_', 'N', 'A', 'N', 'O', 'P', 'O', 'R', 'E', '=', '9', ';', 'c', 'o', 'n', 's',
- 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l',
- 'o', 'g', '_', 'o', 'd', 'd', 's', ' ', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l',
- 'i', 't', 'y', ':', 'f', 'r', 'o', 'm', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's',
- '=', '[', '-', '6', ',', '-', '5', ',', '-', '4', ',', '-', '3', ',', '-', '2', ',',
- '-', '1', ',', '0', ',', '1', ',', '2', ',', '3', ',', '4', ',', '5', ',', '6', ',',
- '7', ',', '8', ',', '9', ',', '1', '0', ',', '1', '1', ',', '1', '2', ',', '1', '3',
- ',', '1', '4', ',', '1', '5', ',', '1', '6', ',', '1', '7', ',', '1', '8', ',', '1',
- '9', ',', '2', '0', ',', '2', '1', ',', '2', '2', ',', '2', '3', ',', '2', '4', ',',
- '2', '5', ',', '2', '6', ',', '2', '7', ',', '2', '8', ',', '2', '9', ',', '3', '0',
- ',', '3', '1', ',', '3', '2', ',', '3', '3', ',', '3', '4', ',', '3', '5', ',', '3',
- '6', ',', '3', '7', ',', '3', '8', ',', '3', '9', ',', '4', '0', ']', ';', 'c', 'o',
- 'n', 's', 't', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y',
- ':', 'p', 'h', 'r', 'e', 'd', ' ', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', 'i',
- 't', 'y', ':', 't', 'o', ':', 'p', 'h', 'r', 'e', 'd', '=', '[', '0', ',', '1', ',',
- '1', ',', '2', ',', '2', ',', '3', ',', '3', ',', '4', ',', '4', ',', '5', ',', '5',
- ',', '6', ',', '7', ',', '8', ',', '9', ',', '1', '0', ',', '1', '0', ',', '1', '1',
- ',', '1', '2', ',', '1', '3', ',', '1', '4', ',', '1', '5', ',', '1', '6', ',', '1',
- '7', ',', '1', '8', ',', '1', '9', ',', '2', '0', ',', '2', '1', ',', '2', '2', ',',
- '2', '3', ',', '2', '4', ',', '2', '5', ',', '2', '6', ',', '2', '7', ',', '2', '8',
- ',', '2', '9', ',', '3', '0', ',', '3', '1', ',', '3', '2', ',', '3', '3', ',', '3',
- '4', ',', '3', '5', ',', '3', '6', ',', '3', '7', ',', '3', '8', ',', '3', '9', ',',
- '4', '0', ']', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6', ' ', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', 'e', 'n', ':',
- 'u', 'n', 'r', 'e', 'c', 'o', 'g', 'n', 'i', 'z', 'e', 'd', '=', '1', ';', 'c', 'o',
- 'n', 's', 't', ' ', 'U', '1', '6', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', 'e', 'n', ':', 'r', 'e', 'c', 'o', 'g', 'n',
- 'i', 'z', 'e', 'd', '=', '2', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k',
- 'e', 'n', ':', 'Q', '=', '3', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k',
- 'e', 'n', ':', 'X', '=', '4', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k',
- 'e', 'n', ':', 'Y', '=', '5', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k',
- 'e', 'n', ':', 'T', '=', '6', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k',
- 'e', 'n', ':', 'L', '=', '7', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k',
- 'e', 'n', ':', 's', 'i', 'g', 'n', 'e', 'd', ':', 'X', '=', '8', ';', 'c', 'o', 'n',
- 's', 't', ' ', 'U', '1', '6', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n',
- 'a', 'm', 'e', '_', 't', 'o', 'k', 'e', 'n', ':', 's', 'i', 'g', 'n', 'e', 'd', ':',
- 'Y', '=', '9', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6', ' ', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', 'e', 'n', ':',
- 's', 'i', 'g', 'n', 'e', 'd', ':', 'T', '=', '1', '0', ';', 'c', 'o', 'n', 's', 't',
- ' ', 'U', '1', '6', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm',
- 'e', '_', 't', 'o', 'k', 'e', 'n', ':', 's', 'i', 'g', 'n', 'e', 'd', ':', 'L', '=',
- '1', '1', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6', ' ', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', 'e', 'n', ':', 'o',
- 'c', 't', 'a', 'l', ':', 'X', '=', '1', '2', ';', 'c', 'o', 'n', 's', 't', ' ', 'U',
- '1', '6', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_',
- 't', 'o', 'k', 'e', 'n', ':', 'o', 'c', 't', 'a', 'l', ':', 'Y', '=', '1', '3', ';',
- 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', 'e', 'n', ':', 'o', 'c', 't', 'a',
- 'l', ':', 'T', '=', '1', '4', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k',
- 'e', 'n', ':', 'o', 'c', 't', 'a', 'l', ':', 'L', '=', '1', '5', ';', 'c', 'o', 'n',
- 's', 't', ' ', 'U', '1', '6', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n',
- 'a', 'm', 'e', '_', 't', 'o', 'k', 'e', 'n', ':', 'h', 'e', 'x', ':', 'u', 'p', 'p',
- 'e', 'r', ':', 'X', '=', '1', '6', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6',
- ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o',
- 'k', 'e', 'n', ':', 'h', 'e', 'x', ':', 'u', 'p', 'p', 'e', 'r', ':', 'Y', '=', '1',
- '7', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6', ' ', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', 'e', 'n', ':', 'h', 'e',
- 'x', ':', 'u', 'p', 'p', 'e', 'r', ':', 'T', '=', '1', '8', ';', 'c', 'o', 'n', 's',
- 't', ' ', 'U', '1', '6', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a',
- 'm', 'e', '_', 't', 'o', 'k', 'e', 'n', ':', 'h', 'e', 'x', ':', 'u', 'p', 'p', 'e',
- 'r', ':', 'L', '=', '1', '9', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k',
- 'e', 'n', ':', 'h', 'e', 'x', ':', 'l', 'o', 'w', 'e', 'r', ':', 'X', '=', '2', '0',
- ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6', ' ', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', 'e', 'n', ':', 'h', 'e', 'x',
- ':', 'l', 'o', 'w', 'e', 'r', ':', 'Y', '=', '2', '1', ';', 'c', 'o', 'n', 's', 't',
- ' ', 'U', '1', '6', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm',
- 'e', '_', 't', 'o', 'k', 'e', 'n', ':', 'h', 'e', 'x', ':', 'l', 'o', 'w', 'e', 'r',
- ':', 'T', '=', '2', '2', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '1', '6', ' ', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', 'e',
- 'n', ':', 'h', 'e', 'x', ':', 'l', 'o', 'w', 'e', 'r', ':', 'L', '=', '2', '3', ';',
- 'c', 'o', 'n', 's', 't', ' ', 'a', 's', 'c', 'i', 'i', ' ', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 's', 'y', 'm', 'b', 'o', 'l', ':', 'Q',
- '=', '\'', '$', 'Q', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'a', 's', 'c', 'i',
- 'i', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 's',
- 'y', 'm', 'b', 'o', 'l', ':', 'X', '=', '\'', '$', 'X', '\'', ';', 'c', 'o', 'n',
- 's', 't', ' ', 'a', 's', 'c', 'i', 'i', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 'n', 'a', 'm', 'e', '_', 's', 'y', 'm', 'b', 'o', 'l', ':', 'Y', '=', '\'',
- '$', 'Y', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'a', 's', 'c', 'i', 'i', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 's', 'y', 'm',
- 'b', 'o', 'l', ':', 'T', '=', '\'', '$', 'T', '\'', ';', 'c', 'o', 'n', 's', 't',
- ' ', 'a', 's', 'c', 'i', 'i', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n',
- 'a', 'm', 'e', '_', 's', 'y', 'm', 'b', 'o', 'l', ':', 'L', '=', '\'', '$', 'L',
- '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'a', 's', 'c', 'i', 'i', ' ', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 's', 'y', 'm', 'b', 'o',
- 'l', ':', 'o', 'c', 't', 'a', 'l', ':', 'X', '=', '\'', '$', 'a', '\'', ';', 'c',
- 'o', 'n', 's', 't', ' ', 'a', 's', 'c', 'i', 'i', ' ', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 's', 'y', 'm', 'b', 'o', 'l', ':', 'o', 'c',
- 't', 'a', 'l', ':', 'Y', '=', '\'', '$', 'b', '\'', ';', 'c', 'o', 'n', 's', 't',
- ' ', 'a', 's', 'c', 'i', 'i', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n',
- 'a', 'm', 'e', '_', 's', 'y', 'm', 'b', 'o', 'l', ':', 'o', 'c', 't', 'a', 'l', ':',
- 'T', '=', '\'', '$', 'c', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'a', 's', 'c',
- 'i', 'i', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_',
- 's', 'y', 'm', 'b', 'o', 'l', ':', 'o', 'c', 't', 'a', 'l', ':', 'L', '=', '\'',
- '$', 'd', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'a', 's', 'c', 'i', 'i', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 's', 'y', 'm',
- 'b', 'o', 'l', ':', 'h', 'e', 'x', ':', 'u', 'p', 'p', 'e', 'r', ':', 'X', '=', '\'',
- '$', 'e', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'a', 's', 'c', 'i', 'i', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 's', 'y', 'm',
- 'b', 'o', 'l', ':', 'h', 'e', 'x', ':', 'u', 'p', 'p', 'e', 'r', ':', 'Y', '=', '\'',
- '$', 'f', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'a', 's', 'c', 'i', 'i', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 's', 'y', 'm',
- 'b', 'o', 'l', ':', 'h', 'e', 'x', ':', 'u', 'p', 'p', 'e', 'r', ':', 'T', '=', '\'',
- '$', 'g', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'a', 's', 'c', 'i', 'i', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 's', 'y', 'm',
- 'b', 'o', 'l', ':', 'h', 'e', 'x', ':', 'u', 'p', 'p', 'e', 'r', ':', 'L', '=', '\'',
- '$', 'h', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'a', 's', 'c', 'i', 'i', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 's', 'y', 'm',
- 'b', 'o', 'l', ':', 'h', 'e', 'x', ':', 'l', 'o', 'w', 'e', 'r', ':', 'X', '=', '\'',
- '$', 'x', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'a', 's', 'c', 'i', 'i', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 's', 'y', 'm',
- 'b', 'o', 'l', ':', 'h', 'e', 'x', ':', 'l', 'o', 'w', 'e', 'r', ':', 'Y', '=', '\'',
- '$', 'y', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'a', 's', 'c', 'i', 'i', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 's', 'y', 'm',
- 'b', 'o', 'l', ':', 'h', 'e', 'x', ':', 'l', 'o', 'w', 'e', 'r', ':', 'T', '=', '\'',
- '$', 't', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'a', 's', 'c', 'i', 'i', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'a', 'm', 'e', '_', 's', 'y', 'm',
- 'b', 'o', 'l', ':', 'h', 'e', 'x', ':', 'l', 'o', 'w', 'e', 'r', ':', 'L', '=', '\'',
- '$', 'l', '\'', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '3', '2', ' ', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'd', 'y', 'n', '_',
- 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', '=', '0', ';', 'c', 'o', 'n', 's', 't',
- ' ', 'U', '3', '2', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5',
- '4', '_', ':', 'd', 'y', 'n', '_', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't',
- '=', '1', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '3', '2', ' ', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'd', 'y', 'n', '_', 'r', 'e',
- 'a', 'd', '_', 'l', 'e', 'n', '=', '2', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '3',
- '2', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', 'n', ':',
- 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', '=', '0', ';', 'c', 'o', 'n', 's', 't',
- ' ', 'U', '3', '2', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a',
- 'd', 'n', ':', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', '=', '1', ';', 'c',
- 'o', 'n', 's', 't', ' ', 'U', '3', '2', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 'r', 'e', 'a', 'd', 'n', ':', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', '=', '2',
- ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '3', '2', ' ', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 'r', 'e', 'a', 'd', 'n', ':', 'l', 'a', 'b', 'e', 'l', '_', 's', 't',
- 'a', 'r', 't', '=', '3', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '3', '2', ' ', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', 'n', ':', 'l', 'a', 'b',
- 'e', 'l', '_', 'l', 'e', 'n', '=', '4', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '3',
- '2', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'y', '=', '0', ';', 'c', 'o', 'n', 's', 't', ' ', 'U', '3', '2', ' ', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 'c', 'o', 'o', 'r', 'd', ':', 'x', '=', '1', ';', 'c',
- 'o', 'n', 's', 't', ' ', 'U', '3', '2', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 'c', 'o', 'o', 'r', 'd', ':', 't', 'i', 'l', 'e', '=', '2', ';', 'c', 'o', 'n',
- 's', 't', ' ', 'U', '3', '2', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'c',
- 'o', 'o', 'r', 'd', ':', 'l', 'a', 'n', 'e', '=', '3', ';', 'c', 'o', 'n', 's', 't',
- ' ', 'U', '3', '2', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'c', 'o', 'o',
- 'r', 'd', ':', 'r', 'e', 'g', 'i', 'o', 'n', '=', '2', ';', 'c', 'o', 'n', 's', 't',
- ' ', 'U', '3', '2', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'c', 'o', 'o',
- 'r', 'd', ':', 'p', 'a', 'n', 'e', 'l', '=', '2', ';', 'e', 'x', 't', 'e', 'r', 'n',
- ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n', 'y', ' ', 'c', 'a', 's',
- 't', '#', '1', '(', 'a', 'n', 'y', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'c',
- 'a', 's', 't', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i',
- 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 'b', 'i', 't', '_',
- 'o', 'r', '#', '1', '<', 'U', '8', ' ', 'a', 'l', 'i', 'g', 'n', '>', '(', 'T', ' ',
- 'A', ',', 'T', ' ', 'B', ')', '=', 'v', 'd', 'b', ':', 'b', 'i', 't', '_', 'o', 'r',
- ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ',
- '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 't', 'r', 'i', 'm', '#', '1', '<',
- 'U', '8', ' ', 'a', 'l', 'i', 'g', 'n', ',', 'T', ' ', 'v', 'a', 'l', '>', '(', 'T',
- ' ', 'A', ')', '=', 'v', 'd', 'b', ':', 't', 'r', 'i', 'm', ';', 'e', 'x', 't', 'e',
- 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n', 'y', ' ', 'r',
- 'e', 'd', 'i', 'm', 'e', 'n', 's', 'i', 'o', 'n', '#', '1', '(', 'a', 'n', 'y', ' ',
- 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'r', 'e', 'd', 'i', 'm', 'e', 'n', 's', 'i',
- 'o', 'n', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o',
- 'n', ' ', 'I', '6', '4', ' ', 'r', 'o', 'w', '_', 'i', 'd', '#', '1', '(', ')', '=',
- 'v', 'd', 'b', ':', 'r', 'o', 'w', '_', 'i', 'd', ';', 'e', 'x', 't', 'e', 'r', 'n',
- ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'U', '3', '2', ' ', 'r', 'o', 'w',
- '_', 'l', 'e', 'n', '#', '1', '(', 'a', 'n', 'y', ' ', 'i', 'n', ')', '=', 'v', 'd',
- 'b', ':', 'r', 'o', 'w', '_', 'l', 'e', 'n', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ',
- 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'U', '3', '2', ' ', 'f', 'i', 'x', 'e',
- 'd', '_', 'r', 'o', 'w', '_', 'l', 'e', 'n', '#', '1', '(', 'a', 'n', 'y', ' ', 'i',
- 'n', ')', '=', 'v', 'd', 'b', ':', 'f', 'i', 'x', 'e', 'd', '_', 'r', 'o', 'w', '_',
- 'l', 'e', 'n', ';', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', ' ', 'f', 'u', 'n', 'c',
- 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'v', 'o', 'i', 'd',
- ' ', 'c', 'o', 'm', 'p', 'a', 'r', 'e', '#', '1', '<', '*', 'U', '3', '2', ' ', 's',
- 'i', 'g', '_', 'b', 'i', 't', 's', '>', '(', 'T', ' ', 's', 'r', 'c', ',', 'T', ' ',
- 'c', 'm', 'p', ')', '=', 'v', 'd', 'b', ':', 'c', 'o', 'm', 'p', 'a', 'r', 'e', ';',
- 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n',
- ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'v', 'o', 'i', 'd', ' ', 'n', 'o', '_',
- 'c', 'o', 'm', 'p', 'a', 'r', 'e', '#', '1', '(', 'T', ' ', 's', 'r', 'c', ',', 'T',
- ' ', 'c', 'm', 'p', ')', '=', 'v', 'd', 'b', ':', 'n', 'o', '_', 'c', 'o', 'm', 'p',
- 'a', 'r', 'e', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i',
- 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 'r', 'a', 'n', 'g',
- 'e', '_', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '#', '1', '<', 'T', ' ', 'l', 'o',
- 'w', 'e', 'r', ',', 'T', ' ', 'u', 'p', 'p', 'e', 'r', '>', '(', 'T', ' ', 'i', 'n',
- ')', '=', 'v', 'd', 'b', ':', 'r', 'a', 'n', 'g', 'e', '_', 'v', 'a', 'l', 'i', 'd',
- 'a', 't', 'e', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i',
- 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 's', 'e', 'l', 'e',
- 'c', 't', '#', '1', '(', 'T', ' ', 'f', 'i', 'r', 's', 't', ',', 'T', ' ', 's', 'e',
- 'c', 'o', 'n', 'd', ',', '.', '.', '.', ')', '=', 'v', 'd', 'b', ':', 's', 'e', 'l',
- 'e', 'c', 't', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i',
- 'o', 'n', ' ', 't', 'r', 'a', 'n', 's', 'p', 'o', 's', 'e', 'd', '_', 'f', 'm', 't',
- ' ', 't', 'r', 'a', 'n', 's', 'p', 'o', 's', 'e', '#', '1', '(', 't', 'r', 'a', 'n',
- 's', 'p', 'o', 's', 'e', '_', 's', 'e', 't', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b',
- ':', 't', 'r', 'a', 'n', 's', 'p', 'o', 's', 'e', ';', 'e', 'x', 't', 'e', 'r', 'n',
- ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 't', 'r', 'a', 'n', 's', 'p', 'o',
- 's', 'e', '_', 's', 'e', 't', ' ', 'd', 'e', 't', 'r', 'a', 'n', 's', 'p', 'o', 's',
- 'e', '#', '1', '(', 't', 'r', 'a', 'n', 's', 'p', 'o', 's', 'e', 'd', '_', 'f', 'm',
- 't', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'd', 'e', 't', 'r', 'a', 'n', 's',
- 'p', 'o', 's', 'e', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't',
- 'i', 'o', 'n', ' ', 'd', 'e', 'l', 't', 'a', '_', 'a', 'v', 'e', 'r', 'a', 'g', 'e',
- 'd', '_', 'f', 'm', 't', ' ', 'd', 'e', 'l', 't', 'a', '_', 'a', 'v', 'e', 'r', 'a',
- 'g', 'e', '#', '1', '(', 'a', 'n', 'y', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':',
- 'd', 'e', 'l', 't', 'a', '_', 'a', 'v', 'e', 'r', 'a', 'g', 'e', ';', 'e', 'x', 't',
- 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n', 'y', ' ',
- 'u', 'n', 'd', 'e', 'l', 't', 'a', '_', 'a', 'v', 'e', 'r', 'a', 'g', 'e', '#', '1',
- '(', 'd', 'e', 'l', 't', 'a', '_', 'a', 'v', 'e', 'r', 'a', 'g', 'e', 'd', '_', 'f',
- 'm', 't', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'u', 'n', 'd', 'e', 'l', 't',
- 'a', '_', 'a', 'v', 'e', 'r', 'a', 'g', 'e', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ',
- 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'm', 'e', 'r', 'g', 'e', 'd', '_', 'f',
- 'm', 't', ' ', 'm', 'e', 'r', 'g', 'e', '#', '1', '(', 'a', 'n', 'y', ' ', 'i', 'n',
- ',', '.', '.', '.', ')', '=', 'v', 'd', 'b', ':', 'm', 'e', 'r', 'g', 'e', ';', 'e',
- 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n',
- 'y', ' ', 's', 'p', 'l', 'i', 't', '#', '1', '<', 'U', '3', '2', ' ', 'i', 'd', 'x',
- '>', '(', 'm', 'e', 'r', 'g', 'e', 'd', '_', 'f', 'm', 't', ' ', 'i', 'n', ')', '=',
- 'v', 'd', 'b', ':', 's', 'p', 'l', 'i', 't', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ',
- 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>',
- 'T', ' ', 'm', 'e', 't', 'a', ':', 'r', 'e', 'a', 'd', '#', '1', '<', 'a', 's', 'c',
- 'i', 'i', ' ', 'n', 'o', 'd', 'e', '*', 'b', 'o', 'o', 'l', ' ', 'd', 'e', 't', 'e',
- 'r', 'm', 'i', 'n', 'i', 's', 't', 'i', 'c', '>', '(', ')', ';', 'e', 'x', 't', 'e',
- 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e',
- ' ', 'T', '>', 'T', ' ', 'm', 'e', 't', 'a', ':', 'v', 'a', 'l', 'u', 'e', '#', '1',
- '<', 'a', 's', 'c', 'i', 'i', ' ', 'n', 'o', 'd', 'e', '*', 'b', 'o', 'o', 'l', ' ',
- 'd', 'e', 't', 'e', 'r', 'm', 'i', 'n', 'i', 's', 't', 'i', 'c', '>', '(', ')', ';',
- 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<',
- 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 'm', 'e', 't', 'a', ':', 'w', 'r', 'i',
- 't', 'e', '#', '1', '<', 'a', 's', 'c', 'i', 'i', ' ', 'n', 'o', 'd', 'e', '>', '(',
- 'T', ' ', 'i', 'n', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c',
- 't', 'i', 'o', 'n', ' ', 'a', 's', 'c', 'i', 'i', ' ', 'm', 'e', 't', 'a', ':', 'a',
- 't', 't', 'r', ':', 'r', 'e', 'a', 'd', '#', '1', '<', 'a', 's', 'c', 'i', 'i', ' ',
- 'n', 'o', 'd', 'e', ',', 'a', 's', 'c', 'i', 'i', ' ', 'a', 't', 't', 'r', '*', 'b',
- 'o', 'o', 'l', ' ', 'd', 'e', 't', 'e', 'r', 'm', 'i', 'n', 'i', 's', 't', 'i', 'c',
- '>', '(', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i',
- 'o', 'n', ' ', 'a', 's', 'c', 'i', 'i', ' ', 'm', 'e', 't', 'a', ':', 'a', 't', 't',
- 'r', ':', 'w', 'r', 'i', 't', 'e', '#', '1', '<', 'a', 's', 'c', 'i', 'i', ' ', 'n',
- 'o', 'd', 'e', ',', 'a', 's', 'c', 'i', 'i', ' ', 'a', 't', 't', 'r', '>', '(', 'a',
- 's', 'c', 'i', 'i', ' ', 'i', 'n', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f',
- 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 't', 'e', 'x', 't', '8', '_', 's', 'e', 't',
- ' ', 'p', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', ':', 'r', 'e', 'a', 'd', '#', '1',
- '<', 'a', 's', 'c', 'i', 'i', ' ', 'n', 'a', 'm', 'e', '*', 'b', 'o', 'o', 'l', ' ',
- 'd', 'e', 't', 'e', 'r', 'm', 'i', 'n', 'i', 's', 't', 'i', 'c', '>', '(', ')', ';',
- 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 't',
- 'e', 'x', 't', '8', '_', 's', 'e', 't', ' ', 'e', 'n', 'v', 'i', 'r', 'o', 'n', 'm',
- 'e', 'n', 't', ':', 'r', 'e', 'a', 'd', '#', '1', '<', 'a', 's', 'c', 'i', 'i', ' ',
- 'n', 'a', 'm', 'e', '>', '(', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u',
- 'n', 'c', 't', 'i', 'o', 'n', ' ', 't', 'e', 'x', 't', '8', '_', 's', 'e', 't', ' ',
- 'i', 'd', 'x', ':', 't', 'e', 'x', 't', ':', 'p', 'r', 'o', 'j', 'e', 'c', 't', '#',
- '1', '.', '1', '<', 'a', 's', 'c', 'i', 'i', ' ', 'i', 'n', 'd', 'e', 'x', '_', 'n',
- 'a', 'm', 'e', '*', 'U', '8', ' ', 'c', 'a', 's', 'e', '_', 's', 'e', 'n', 's', 'i',
- 't', 'i', 'v', 'i', 't', 'y', '>', '(', '*', 't', 'e', 'x', 't', '8', '_', 's', 'e',
- 't', ' ', 's', 'u', 'b', 's', 't', 'i', 't', 'u', 't', 'e', ')', ';', 'e', 'x', 't',
- 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 't', 'e', 'x', 't',
- '8', '_', 's', 'e', 't', ' ', 'i', 'd', 'x', ':', 't', 'e', 'x', 't', ':', 'i', 'n',
- 's', 'e', 'r', 't', '#', '1', '.', '1', '<', 'a', 's', 'c', 'i', 'i', ' ', 'i', 'n',
- 'd', 'e', 'x', '_', 'n', 'a', 'm', 'e', '*', 'U', '8', ' ', 'c', 'a', 's', 'e', '_',
- 's', 'e', 'n', 's', 'i', 't', 'i', 'v', 'i', 't', 'y', '>', '(', 't', 'e', 'x', 't',
- '8', '_', 's', 'e', 't', ' ', 'k', 'e', 'y', ')', ';', 'e', 'x', 't', 'e', 'r', 'n',
- ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'v', 'd', 'b', ':', 'r', 'o', 'w',
- '_', 'i', 'd', '_', 'r', 'a', 'n', 'g', 'e', ' ', 'i', 'd', 'x', ':', 't', 'e', 'x',
- 't', ':', 'l', 'o', 'o', 'k', 'u', 'p', '#', '1', '.', '1', '<', 'a', 's', 'c', 'i',
- 'i', ' ', 'i', 'n', 'd', 'e', 'x', '_', 'n', 'a', 'm', 'e', ',', 'a', 's', 'c', 'i',
- 'i', ' ', 'q', 'u', 'e', 'r', 'y', '_', 'b', 'y', '_', 'n', 'a', 'm', 'e', '*', 'U',
- '8', ' ', 'c', 'a', 's', 'e', '_', 's', 'e', 'n', 's', 'i', 't', 'i', 'v', 'i', 't',
- 'y', '>', '(', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't',
- 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 'e', 'c', 'h',
- 'o', '#', '1', '<', 'T', ' ', 'v', 'a', 'l', '>', '(', '*', 'a', 'n', 'y', ' ', 'r',
- 'o', 'w', '_', 'l', 'e', 'n', ')', '=', 'v', 'd', 'b', ':', 'e', 'c', 'h', 'o', ';',
- 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<',
- 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 'e', 'x', 'i', 's', 't', 's', '#', '1',
- '<', '*', 'T', ' ', 'c', 'v', 'a', 'l', '>', '(', 'a', 'n', 'y', ' ', 'p', 'r', 'e',
- 'd', 'i', 'c', 'a', 't', 'e', '*', 'T', ' ', 'd', 'v', 'a', 'l', ')', '=', 'v', 'd',
- 'b', ':', 'e', 'x', 'i', 's', 't', 's', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f',
- 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'A', ',', 't',
- 'y', 'p', 'e', ' ', 'B', '>', 'B', ' ', 'm', 'a', 'p', '#', '1', '<', 'A', ' ', 'f',
- 'r', 'o', 'm', ',', 'B', ' ', 't', 'o', '>', '(', 'A', ' ', 'i', 'n', '*', 'B', ' ',
- 's', 'r', 'c', ')', '=', 'v', 'd', 'b', ':', 'm', 'a', 'p', ';', 'e', 'x', 't', 'e',
- 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e',
- ' ', 'T', '>', 'T', ' ', 'c', 'l', 'i', 'p', '#', '1', '<', 'T', ' ', 'l', 'o', 'w',
- 'e', 'r', ',', 'T', ' ', 'u', 'p', 'p', 'e', 'r', '>', '(', 'T', ' ', 'i', 'n', ')',
- '=', 'v', 'd', 'b', ':', 'c', 'l', 'i', 'p', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ',
- 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', ',',
- 'U', '3', '2', ' ', 'd', 'i', 'm', '>', 'T', '[', 'd', 'i', 'm', ']', ' ', 'v', 'c',
- 'l', 'i', 'p', '#', '1', '<', 'T', ' ', 'l', 'o', 'w', 'e', 'r', ',', 'T', ' ', 'u',
- 'p', 'p', 'e', 'r', '>', '(', 'T', '[', 'd', 'i', 'm', ']', ' ', 'i', 'n', ')', '=',
- 'v', 'd', 'b', ':', 'c', 'l', 'i', 'p', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f',
- 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'n', 'u', 'm', 'e', 'r', 'i', 'c', '_', 's',
- 'e', 't', ' ', 'c', 'e', 'i', 'l', '#', '1', '(', 'f', 'l', 'o', 'a', 't', '_', 's',
- 'e', 't', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'c', 'e', 'i', 'l', ';', 'e',
- 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'n', 'u',
- 'm', 'e', 'r', 'i', 'c', '_', 's', 'e', 't', ' ', 'f', 'l', 'o', 'o', 'r', '#', '1',
- '(', 'f', 'l', 'o', 'a', 't', '_', 's', 'e', 't', ' ', 'i', 'n', ')', '=', 'v', 'd',
- 'b', ':', 'f', 'l', 'o', 'o', 'r', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u',
- 'n', 'c', 't', 'i', 'o', 'n', ' ', 'n', 'u', 'm', 'e', 'r', 'i', 'c', '_', 's', 'e',
- 't', ' ', 'r', 'o', 'u', 'n', 'd', '#', '1', '(', 'f', 'l', 'o', 'a', 't', '_', 's',
- 'e', 't', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'r', 'o', 'u', 'n', 'd', ';',
- 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'n',
- 'u', 'm', 'e', 'r', 'i', 'c', '_', 's', 'e', 't', ' ', 't', 'r', 'u', 'n', 'c', '#',
- '1', '(', 'f', 'l', 'o', 'a', 't', '_', 's', 'e', 't', ' ', 'i', 'n', ')', '=', 'v',
- 'd', 'b', ':', 't', 'r', 'u', 'n', 'c', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f',
- 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T',
- ' ', 'm', 'i', 'n', '#', '1', '(', 'T', ' ', 'a', ',', 'T', ' ', 'b', ')', '=', 'v',
- 'd', 'b', ':', 'm', 'i', 'n', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n',
- 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 'm',
- 'a', 'x', '#', '1', '(', 'T', ' ', 'a', ',', 'T', ' ', 'b', ')', '=', 'v', 'd', 'b',
- ':', 'm', 'a', 'x', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't',
- 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 's', 'u', 'm',
- '#', '1', '<', '*', 'T', ' ', 'k', '>', '(', 'T', ' ', 'a', ',', '.', '.', '.', ')',
- '=', 'v', 'd', 'b', ':', 's', 'u', 'm', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f',
- 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T',
- ' ', 'd', 'i', 'f', 'f', '#', '1', '<', '*', 'T', ' ', 'k', '>', '(', 'T', ' ', 'a',
- '*', 'T', ' ', 'b', ')', '=', 'v', 'd', 'b', ':', 'd', 'i', 'f', 'f', ';', 'e', 'x',
- 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y',
- 'p', 'e', ' ', 'T', '>', 'T', ' ', 'd', 'e', 'r', 'i', 'v', '#', '1', '(', 'T', ' ',
- 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'd', 'e', 'r', 'i', 'v', ';', 'e', 'x', 't',
- 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p',
- 'e', ' ', 'T', '>', 'T', ' ', 'i', 'n', 't', 'e', 'g', 'r', 'a', 'l', '#', '1', '(',
- 'T', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'i', 'n', 't', 'e', 'g', 'r', 'a',
- 'l', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n',
- ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 'i', 'n', 't', 'e', 'g', 'r',
- 'a', 'l', '_', '0', '#', '1', '(', 'T', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':',
- 'i', 'n', 't', 'e', 'g', 'r', 'a', 'l', '_', '0', ';', 'e', 'x', 't', 'e', 'r', 'n',
- ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T',
- '>', 'T', ' ', 'd', 'e', 'l', 't', 'a', '#', '1', '(', 'T', ' ', 'i', 'n', ')', '=',
- 'v', 'd', 'b', ':', 'd', 'e', 'l', 't', 'a', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ',
- 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>',
- 'T', ' ', 'u', 'n', 'd', 'e', 'l', 't', 'a', '#', '1', '(', 'T', ' ', 'i', 'n', ')',
- '=', 'v', 'd', 'b', ':', 'u', 'n', 'd', 'e', 'l', 't', 'a', ';', 'e', 'x', 't', 'e',
- 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e',
- ' ', 'T', '>', 'T', ' ', 'o', 'u', 't', 'l', 'i', 'e', 'r', '_', 'e', 'n', 'c', 'o',
- 'd', 'e', '#', '1', '<', 'T', ' ', 'o', 'u', 't', 'l', 'i', 'e', 'r', '>', '(', 'T',
- ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'o', 'u', 't', 'l', 'i', 'e', 'r', '_',
- 'e', 'n', 'c', 'o', 'd', 'e', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n',
- 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 'o',
- 'u', 't', 'l', 'i', 'e', 'r', '_', 'd', 'e', 'c', 'o', 'd', 'e', '#', '1', '<', 'T',
- ' ', 'o', 'u', 't', 'l', 'i', 'e', 'r', '>', '(', 'T', ' ', 'i', 'n', ')', '=', 'v',
- 'd', 'b', ':', 'o', 'u', 't', 'l', 'i', 'e', 'r', '_', 'd', 'e', 'c', 'o', 'd', 'e',
- ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ',
- '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 'a', 'd', 'd', '_', 'r', 'o', 'w',
- '_', 'i', 'd', '#', '1', '(', 'T', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'a',
- 'd', 'd', '_', 'r', 'o', 'w', '_', 'i', 'd', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ',
- 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>',
- 'T', ' ', 's', 'u', 'b', '_', 'r', 'o', 'w', '_', 'i', 'd', '#', '1', '(', 'T', ' ',
- 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 's', 'u', 'b', '_', 'r', 'o', 'w', '_', 'i',
- 'd', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n',
- ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', '[', '*', ']', ' ', 'c', 'u', 't',
- '#', '1', '<', 'U', '3', '2', ' ', 'i', 'd', 'x', ',', '.', '.', '.', '>', '(', 'T',
- '[', '*', ']', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'c', 'u', 't', ';', 'e',
- 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't',
- 'y', 'p', 'e', ' ', 'T', '>', 'T', '[', '*', ']', ' ', 'p', 'a', 's', 't', 'e', '#',
- '1', '(', 'T', '[', '*', ']', ' ', 'i', 'n', ',', '.', '.', '.', ')', '=', 'v', 'd',
- 'b', ':', 'p', 'a', 's', 't', 'e', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u',
- 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ',
- 'v', 'e', 'c', '_', 's', 'u', 'm', '#', '1', '(', 'T', '[', '*', ']', ' ', 'i', 'n',
- ')', '=', 'v', 'd', 'b', ':', 'v', 'e', 'c', '_', 's', 'u', 'm', ';', 'e', 'x', 't',
- 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p',
- 'e', ' ', 'T', '>', 'T', ' ', 'f', 'i', 'x', 'e', 'd', '_', 'v', 'e', 'c', '_', 's',
- 'u', 'm', '#', '1', '(', 'T', '[', '*', ']', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b',
- ':', 'f', 'i', 'x', 'e', 'd', '_', 'v', 'e', 'c', '_', 's', 'u', 'm', ';', 'e', 'x',
- 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'b', 'o', 'o',
- 'l', ' ', 'c', 'h', 'e', 'c', 'k', 's', 'u', 'm', '#', '1', '<', 'a', 's', 'c', 'i',
- 'i', ' ', 'n', 'o', 'd', 'e', ',', 'a', 's', 'c', 'i', 'i', ' ', 'a', 'l', 'g', 'o',
- 'r', 'i', 't', 'h', 'm', '>', '(', 'B', '8', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b',
- ':', 'c', 'h', 'e', 'c', 'k', 's', 'u', 'm', ';', 's', 'c', 'h', 'e', 'm', 'a', ' ',
- 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'b', 'o', 'o', 'l', ' ', 'm', 'd', '5',
- 's', 'u', 'm', '#', '1', '<', 'a', 's', 'c', 'i', 'i', ' ', 'n', 'o', 'd', 'e', '>',
- '(', 'B', '8', ' ', 'i', 'n', ')', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'c', 'h',
- 'e', 'c', 'k', 's', 'u', 'm', '#', '1', '<', 'n', 'o', 'd', 'e', ',', '\'', 'm',
- 'd', '5', '\'', '>', '(', 'i', 'n', ')', ';', '}', 'e', 'x', 't', 'e', 'r', 'n',
- ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'B', '1', '[', '*', ']', ' ', 'p',
- 'a', 'c', 'k', '#', '1', '(', 'p', 'a', 'c', 'k', '_', 's', 'e', 't', ' ', 'i', 'n',
- ')', '=', 'v', 'd', 'b', ':', 'p', 'a', 'c', 'k', ';', 'e', 'x', 't', 'e', 'r', 'n',
- ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'p', 'a', 'c', 'k', '_', 's', 'e',
- 't', ' ', 'u', 'n', 'p', 'a', 'c', 'k', '#', '1', '(', 'B', '1', '[', '*', ']', ' ',
- 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'u', 'n', 'p', 'a', 'c', 'k', ';', 'e', 'x',
- 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'i', 'z', 'i',
- 'p', '_', 'f', 'm', 't', ' ', 'i', 'z', 'i', 'p', '#', '2', '.', '1', '(', 'i', 'z',
- 'i', 'p', '_', 's', 'e', 't', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'i', 'z',
- 'i', 'p', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o',
- 'n', ' ', 'i', 'z', 'i', 'p', '_', 's', 'e', 't', ' ', 'i', 'u', 'n', 'z', 'i', 'p',
- '#', '2', '.', '1', '(', 'i', 'z', 'i', 'p', '_', 'f', 'm', 't', ' ', 'i', 'n', ')',
- '=', 'v', 'd', 'b', ':', 'i', 'u', 'n', 'z', 'i', 'p', ';', 'e', 'x', 't', 'e', 'r',
- 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'f', 'z', 'i', 'p', '_', 'f',
- 'm', 't', ' ', 'f', 'z', 'i', 'p', '#', '1', '<', 'U', '3', '2', ' ', 'm', 'a', 'n',
- 't', 'i', 's', 's', 'a', '>', '(', 'f', 'z', 'i', 'p', '_', 's', 'e', 't', ' ', 'i',
- 'n', ')', '=', 'v', 'd', 'b', ':', 'f', 'z', 'i', 'p', ';', 'e', 'x', 't', 'e', 'r',
- 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'f', 'z', 'i', 'p', '_', 's',
- 'e', 't', ' ', 'f', 'u', 'n', 'z', 'i', 'p', '#', '1', '(', 'f', 'z', 'i', 'p', '_',
- 'f', 'm', 't', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'f', 'u', 'n', 'z', 'i',
- 'p', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n',
- ' ', 'r', 'l', 'e', '_', 'f', 'm', 't', ' ', 'r', 'l', 'e', 'n', 'c', 'o', 'd', 'e',
- '#', '1', '(', 'a', 'n', 'y', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'r', 'l',
- 'e', 'n', 'c', 'o', 'd', 'e', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n',
- 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n', 'y', ' ', 'r', 'l', 'd', 'e', 'c', 'o', 'd',
- 'e', '#', '1', '(', 'r', 'l', 'e', '_', 'f', 'm', 't', ' ', 'i', 'n', ')', '=', 'v',
- 'd', 'b', ':', 'r', 'l', 'd', 'e', 'c', 'o', 'd', 'e', ';', 'e', 'x', 't', 'e', 'r',
- 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'z', 'l', 'i', 'b', '_', 'f',
- 'm', 't', ' ', 'z', 'i', 'p', '#', '1', '<', '*', 'I', '3', '2', ' ', 's', 't', 'r',
- 'a', 't', 'e', 'g', 'y', ',', 'I', '3', '2', ' ', 'l', 'e', 'v', 'e', 'l', '>', '(',
- 'a', 'n', 'y', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'z', 'i', 'p', ';', 'e',
- 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n',
- 'y', ' ', 'u', 'n', 'z', 'i', 'p', '#', '1', '(', 'z', 'l', 'i', 'b', '_', 'f', 'm',
- 't', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'u', 'n', 'z', 'i', 'p', ';', 'e',
- 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'b', 'z',
- 'i', 'p', '2', '_', 'f', 'm', 't', ' ', 'b', 'z', 'i', 'p', '#', '1', '<', '*', 'U',
- '3', '2', ' ', 'b', 'l', 'o', 'c', 'k', 'S', 'i', 'z', 'e', '1', '0', '0', 'k', ',',
- 'U', '3', '2', ' ', 'w', 'o', 'r', 'k', 'F', 'a', 'c', 't', 'o', 'r', '>', '(', 'a',
- 'n', 'y', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'b', 'z', 'i', 'p', ';', 'e',
- 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n',
- 'y', ' ', 'b', 'u', 'n', 'z', 'i', 'p', '#', '1', '(', 'b', 'z', 'i', 'p', '2', '_',
- 'f', 'm', 't', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'b', 'u', 'n', 'z', 'i',
- 'p', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n',
- ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 's', 'i', 'm', 'p', 'l', 'e',
- '_', 's', 'u', 'b', '_', 's', 'e', 'l', 'e', 'c', 't', '#', '1', '<', 'a', 's', 'c',
- 'i', 'i', ' ', 't', 'b', 'l', ',', 'a', 's', 'c', 'i', 'i', ' ', 'c', 'o', 'l', '>',
- '(', 'I', '6', '4', ' ', 'r', 'o', 'w', '*', 'I', '3', '2', ' ', 'i', 'd', 'x', ')',
- '=', 'v', 'd', 'b', ':', 's', 'i', 'm', 'p', 'l', 'e', '_', 's', 'u', 'b', '_', 's',
- 'e', 'l', 'e', 'c', 't', '_', '1', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u',
- 'n', 'c', 't', 'i', 'o', 'n', ' ', 't', 'e', 'x', 't', '_', 's', 'e', 't', ' ', 'e',
- 'x', 't', 'r', 'a', 'c', 't', '_', 't', 'o', 'k', 'e', 'n', '#', '1', '<', 'U', '3',
- '2', ' ', 'i', 'd', 'x', '>', '(', 't', 'e', 'x', 't', '_', 's', 'e', 't', ' ', 's',
- 't', 'r', ',', 't', 'e', 'x', 't', ':', 't', 'o', 'k', 'e', 'n', ' ', 't', 'o', 'k',
- ')', '=', 'v', 'd', 'b', ':', 'e', 'x', 't', 'r', 'a', 'c', 't', '_', 't', 'o', 'k',
- 'e', 'n', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o',
- 'n', ' ', 'n', 'u', 'm', 'e', 'r', 'i', 'c', '_', 's', 'e', 't', ' ', 's', 't', 'r',
- 't', 'o', 'n', 'u', 'm', '#', '1', '<', '*', 'U', '3', '2', ' ', 'r', 'a', 'd', 'i',
- 'x', '>', '(', 't', 'e', 'x', 't', '_', 's', 'e', 't', ' ', 's', 't', 'r', ')', '=',
- 'v', 'd', 'b', ':', 's', 't', 'r', 't', 'o', 'n', 'u', 'm', ';', 'e', 'x', 't', 'e',
- 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 't', 'e', 'x', 't', '_',
- 's', 'e', 't', ' ', 's', 'p', 'r', 'i', 'n', 't', 'f', '#', '1', '<', 'a', 's', 'c',
- 'i', 'i', ' ', 'f', 'm', 't', '>', '(', 'a', 'n', 'y', ' ', 'p', '1', ',', '.', '.',
- '.', ')', '=', 'v', 'd', 'b', ':', 's', 'p', 'r', 'i', 'n', 't', 'f', ';', 'e', 'x',
- 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'm', 'e', 'r',
- 'g', 'e', 'd', '_', 't', ' ', 'N', 'C', 'B', 'I', ':', 'm', 'e', 'r', 'g', 'e', '#',
- '1', '(', 'a', 'n', 'y', ' ', 'i', 'n', ',', '.', '.', '.', ')', ';', 'e', 'x', 't',
- 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n', 'y', ' ',
- 'N', 'C', 'B', 'I', ':', 's', 'p', 'l', 'i', 't', '#', '1', '<', 'U', '3', '2', ' ',
- 'i', 'd', 'x', '>', '(', 'm', 'e', 'r', 'g', 'e', 'd', '_', 't', ' ', 'i', 'n', ')',
- '=', 'v', 'd', 'b', ':', 's', 'p', 'l', 'i', 't', ';', 'e', 'x', 't', 'e', 'r', 'n',
- ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n', 'y', ' ', 'N', 'C', 'B',
- 'I', ':', 'c', 'u', 't', '#', '1', '<', 'U', '3', '2', ' ', 'i', 'd', 'x', ',', '.',
- '.', '.', '>', '(', 'a', 'n', 'y', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'c',
- 'u', 't', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o',
- 'n', ' ', 'a', 'n', 'y', ' ', 'N', 'C', 'B', 'I', ':', 'p', 'a', 's', 't', 'e', '#',
- '1', '(', 'a', 'n', 'y', ' ', 'i', 'n', ',', '.', '.', '.', ')', '=', 'v', 'd', 'b',
- ':', 'p', 'a', 's', 't', 'e', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n',
- 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n', 'y', ' ', 'N', 'C', 'B', 'I', ':', 'p', 'a',
- 'c', 'k', '#', '1', '<', 'U', '3', '2', ' ', 'f', 'r', 'o', 'm', ',', 'U', '3', '2',
- ' ', 't', 'o', '>', '(', 'a', 'n', 'y', ' ', 'i', 'n', ')', ';', 'e', 'x', 't', 'e',
- 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n', 'y', ' ', 'N',
- 'C', 'B', 'I', ':', 'u', 'n', 'p', 'a', 'c', 'k', '#', '1', '<', 'U', '3', '2', ' ',
- 'f', 'r', 'o', 'm', ',', 'U', '3', '2', ' ', 't', 'o', '>', '(', 'a', 'n', 'y', ' ',
- 'i', 'n', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i',
- 'o', 'n', ' ', 'a', 'n', 'y', ' ', 'N', 'C', 'B', 'I', ':', 'f', 'p', '_', 'd', 'e',
- 'c', 'o', 'd', 'e', '#', '1', '(', 'f', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'e', 'd',
- '_', 't', ' ', 'i', 'n', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n',
- 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n', 'y', ' ', 'N', 'C', 'B', 'I', ':', 'f', 'p',
- '_', 'e', 'x', 't', 'e', 'n', 'd', '#', '1', '<', 'U', '3', '2', ' ', 'b', 'i', 't',
- 's', '>', '(', 'N', 'C', 'B', 'I', ':', 'f', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'e',
- 'd', '_', 't', ' ', 'i', 'n', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u',
- 'n', 'c', 't', 'i', 'o', 'n', ' ', 'r', 'l', '_', 'e', 'n', 'c', 'o', 'd', 'e', 'd',
- '_', 't', ' ', 'N', 'C', 'B', 'I', ':', 'r', 'u', 'n', '_', 'l', 'e', 'n', 'g', 't',
- 'h', '_', 'e', 'n', 'c', 'o', 'd', 'e', '#', '1', '(', 'a', 'n', 'y', ' ', 'i', 'n',
- ')', '=', 'v', 'd', 'b', ':', 'r', 'l', 'e', 'n', 'c', 'o', 'd', 'e', ';', 'e', 'x',
- 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n', 'y',
- ' ', 'N', 'C', 'B', 'I', ':', 'r', 'u', 'n', '_', 'l', 'e', 'n', 'g', 't', 'h', '_',
- 'd', 'e', 'c', 'o', 'd', 'e', '#', '1', '(', 'r', 'l', '_', 'e', 'n', 'c', 'o', 'd',
- 'e', 'd', '_', 't', ' ', 'i', 'n', ')', '=', 'v', 'd', 'b', ':', 'r', 'l', 'd', 'e',
- 'c', 'o', 'd', 'e', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't',
- 'i', 'o', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'z', 'l', 'i', 'b', '_', 'e', 'n', 'c',
- 'o', 'd', 'e', 'd', '_', 't', ' ', 'N', 'C', 'B', 'I', ':', 'z', 'l', 'i', 'b', '#',
- '1', '<', '*', 'I', '3', '2', ' ', 's', 't', 'r', 'a', 't', 'e', 'g', 'y', ',', 'I',
- '3', '2', ' ', 'l', 'e', 'v', 'e', 'l', '>', '(', 'a', 'n', 'y', ' ', 'i', 'n', ')',
- '=', 'v', 'd', 'b', ':', 'z', 'i', 'p', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f',
- 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n', 'y', ' ', 'N', 'C', 'B', 'I', ':',
- 'u', 'n', 'z', 'i', 'p', '#', '1', '(', 'N', 'C', 'B', 'I', ':', 'z', 'l', 'i', 'b',
- '_', 'e', 'n', 'c', 'o', 'd', 'e', 'd', '_', 't', ' ', 'i', 'n', ')', ';', 'a', 'l',
- 'i', 'a', 's', ' ', 'N', 'C', 'B', 'I', ':', 'u', 'n', 'z', 'i', 'p', ' ', 'N', 'C',
- 'B', 'I', ':', 'z', 'l', 'i', 'b', '_', 'd', 'e', 'c', 'o', 'm', 'p', 'r', 'e', 's',
- 's', ';', 's', 'c', 'h', 'e', 'm', 'a', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n',
- ' ', 'N', 'C', 'B', 'I', ':', 'z', 'l', 'i', 'b', '_', 'e', 'n', 'c', 'o', 'd', 'e',
- 'd', '_', 't', ' ', 'N', 'C', 'B', 'I', ':', 'z', 'l', 'i', 'b', '_', 'h', 'u', 'f',
- 'f', 'm', 'a', 'n', '_', 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', '#', '1', '(', 'a',
- 'n', 'y', ' ', 'i', 'n', ')', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'N', 'C', 'B',
- 'I', ':', 'z', 'l', 'i', 'b', '#', '1', '<', '3', '>', '(', 'i', 'n', ')', ';', '}',
- 's', 'c', 'h', 'e', 'm', 'a', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'N',
- 'C', 'B', 'I', ':', 'z', 'l', 'i', 'b', '_', 'e', 'n', 'c', 'o', 'd', 'e', 'd', '_',
- 't', ' ', 'N', 'C', 'B', 'I', ':', 'z', 'l', 'i', 'b', '_', 'c', 'o', 'm', 'p', 'r',
- 'e', 's', 's', '#', '1', '(', 'a', 'n', 'y', ' ', 'i', 'n', ')', '{', 'r', 'e', 't',
- 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'z', 'l', 'i', 'b', '#', '1', '<', '0',
- '>', '(', 'i', 'n', ')', ';', '}', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n',
- 'c', 't', 'i', 'o', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'b',
- 'i', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'E', 'Q', ':', 'r', 'a', 'n', 'd',
- '_', '4', 'n', 'a', '_', '2', 'n', 'a', '#', '1', '(', 'I', 'N', 'S', 'D', 'C', ':',
- '4', 'n', 'a', ':', 'b', 'i', 'n', ' ', 'r', 'd', '_', 'b', 'i', 'n', ')', ';', 'e',
- 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 's',
- 'c', 'i', 'i', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'f', 'o', 'r',
- 'm', 'a', 't', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '#', '1', '(', 'a',
- 's', 'c', 'i', 'i', ' ', 'n', 'a', 'm', 'e', '_', 'f', 'm', 't', ',', 'I', '3', '2',
- ' ', 'X', ',', 'I', '3', '2', ' ', 'Y', '*', 'a', 's', 'c', 'i', 'i', ' ', 's', 'p',
- 'o', 't', '_', 'n', 'a', 'm', 'e', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f',
- 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 's', 'c', 'i', 'i', ' ', 'I', 'N', 'S',
- 'D', 'C', ':', 'S', 'R', 'A', ':', 'f', 'o', 'r', 'm', 'a', 't', '_', 's', 'p', 'o',
- 't', '_', 'n', 'a', 'm', 'e', '_', 'n', 'o', '_', 'c', 'o', 'o', 'r', 'd', '#', '1',
- '(', 'a', 's', 'c', 'i', 'i', ' ', 'n', 'a', 'm', 'e', '_', 'f', 'm', 't', '*', 'a',
- 's', 'c', 'i', 'i', ' ', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', ')', ';', 'e',
- 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'I', 'N',
- 'S', 'D', 'C', ':', 'x', '2', 'c', 's', ':', 'b', 'i', 'n', ' ', 'N', 'C', 'B', 'I',
- ':', 'c', 'o', 'l', 'o', 'r', '_', 'f', 'r', 'o', 'm', '_', 'd', 'n', 'a', '#', '1',
- '(', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n', ' ', 'b',
- 'i', 'n', '_', 'x', '2', 'n', 'a', ',', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o',
- 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r',
- 't', ',', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n',
- ' ', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', 'd',
- 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'c', 's', '_', 'k', 'e', 'y', ',', 'U', '8',
- ' ', 'c', 'o', 'l', 'o', 'r', '_', 'm', 'a', 't', 'r', 'i', 'x', ')', ';', 'e', 'x',
- 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'I', 'N', 'S',
- 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n', ' ', 'N', 'C', 'B', 'I', ':',
- 'd', 'n', 'a', '_', 'f', 'r', 'o', 'm', '_', 'c', 'o', 'l', 'o', 'r', '#', '1', '(',
- 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's', ':', 'b', 'i', 'n', ' ', 'c', 'o',
- 'l', 'o', 'r', '_', 'b', 'i', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o',
- 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r',
- 't', ',', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n',
- ' ', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', 'd',
- 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'c', 's', '_', 'k', 'e', 'y', ',', 'U', '8',
- ' ', 'c', 'o', 'l', 'o', 'r', '_', 'm', 'a', 't', 'r', 'i', 'x', ')', ';', 's', 'c',
- 'h', 'e', 'm', 'a', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'I', 'N', 'S',
- 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p', 'h', 'r', 'e', 'd', ' ',
- 'N', 'C', 'B', 'I', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '_', 't', 'o', '_',
- 'p', 'h', 'r', 'e', 'd', '#', '1', '(', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a',
- 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ' ', 'q', 'u', 'a',
- 'l', '_', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ')', '{', 'I', 'N', 'S', 'D', 'C',
- ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's',
- ' ', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '_', 'c', 'l', 'i', 'p', '=', '<', 'I',
- 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_',
- 'o', 'd', 'd', 's', '>', 'c', 'l', 'i', 'p', '#', '1', '<', '-', '6', ',', '4', '0',
- '>', '(', 'q', 'u', 'a', 'l', '_', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ')', ';',
- 'r', 'e', 't', 'u', 'r', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a',
- 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ',', 'I', 'N', 'S',
- 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p', 'h', 'r', 'e', 'd', '>',
- 'm', 'a', 'p', '#', '1', '<', '[', '-', '6', ',', '-', '5', ',', '-', '4', ',', '-',
- '3', ',', '-', '2', ',', '-', '1', ',', '0', ',', '1', ',', '2', ',', '3', ',', '4',
- ',', '5', ',', '6', ',', '7', ',', '8', ',', '9', ',', '1', '0', ',', '1', '1', ',',
- '1', '2', ',', '1', '3', ',', '1', '4', ',', '1', '5', ',', '1', '6', ',', '1', '7',
- ',', '1', '8', ',', '1', '9', ',', '2', '0', ',', '2', '1', ',', '2', '2', ',', '2',
- '3', ',', '2', '4', ',', '2', '5', ',', '2', '6', ',', '2', '7', ',', '2', '8', ',',
- '2', '9', ',', '3', '0', ',', '3', '1', ',', '3', '2', ',', '3', '3', ',', '3', '4',
- ',', '3', '5', ',', '3', '6', ',', '3', '7', ',', '3', '8', ',', '3', '9', ',', '4',
- '0', ']', ',', '[', '0', ',', '1', ',', '1', ',', '2', ',', '2', ',', '3', ',', '3',
- ',', '4', ',', '4', ',', '5', ',', '5', ',', '6', ',', '7', ',', '8', ',', '9', ',',
- '1', '0', ',', '1', '0', ',', '1', '1', ',', '1', '2', ',', '1', '3', ',', '1', '4',
- ',', '1', '5', ',', '1', '6', ',', '1', '7', ',', '1', '8', ',', '1', '9', ',', '2',
- '0', ',', '2', '1', ',', '2', '2', ',', '2', '3', ',', '2', '4', ',', '2', '5', ',',
- '2', '6', ',', '2', '7', ',', '2', '8', ',', '2', '9', ',', '3', '0', ',', '3', '1',
- ',', '3', '2', ',', '3', '3', ',', '3', '4', ',', '3', '5', ',', '3', '6', ',', '3',
- '7', ',', '3', '8', ',', '3', '9', ',', '4', '0', ']', '>', '(', 'l', 'o', 'g', '_',
- 'o', 'd', 'd', 's', '_', 'c', 'l', 'i', 'p', ')', ';', '}', 'e', 'x', 't', 'e', 'r',
- 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 's', 'c', 'i', 'i', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e', 'x', 't', 'r', 'a', 'c', 't', '_',
- 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '#', '1', '(', 'a', 's', 'c', 'i', 'i',
- ' ', 'n', 'a', 'm', 'e', ',', 't', 'e', 'x', 't', ':', 't', 'o', 'k', 'e', 'n', ' ',
- 't', 'o', 'k', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't',
- 'i', 'o', 'n', ' ', 'a', 's', 'c', 'i', 'i', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 'e', 'x', 't', 'r', 'a', 'c', 't', '_', 'n', 'a', 'm', 'e', '_', 'f', 'm',
- 't', '#', '1', '<', 'a', 's', 'c', 'i', 'i', ' ', 'i', 'd', 'x', '>', '(', 'a', 's',
- 'c', 'i', 'i', ' ', 'n', 'a', 'm', 'e', ',', 't', 'e', 'x', 't', ':', 't', 'o', 'k',
- 'e', 'n', ' ', 't', 'o', 'k', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u',
- 'n', 'c', 't', 'i', 'o', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'v', 'a', 'l', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e', 'x',
- 't', 'r', 'a', 'c', 't', '_', 'n', 'a', 'm', 'e', '_', 'c', 'o', 'o', 'r', 'd', '#',
- '1', '<', 'U', '1', '6', ' ', 'c', 'o', 'o', 'r', 'd', '>', '(', 'a', 's', 'c', 'i',
- 'i', ' ', 'n', 'a', 'm', 'e', ',', 't', 'e', 'x', 't', ':', 't', 'o', 'k', 'e', 'n',
- ' ', 't', 'o', 'k', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c',
- 't', 'i', 'o', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 's', 'p',
- 'o', 't', '_', 'i', 'd', 's', '_', 'f', 'o', 'u', 'n', 'd', ' ', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 'l', 'o', 'o', 'k', 'u', 'p', '#', '1', '<', 'a', 's', 'c',
- 'i', 'i', ' ', 'i', 'n', 'd', 'e', 'x', '_', 'n', 'a', 'm', 'e', ',', 'a', 's', 'c',
- 'i', 'i', ' ', 'q', 'u', 'e', 'r', 'y', '_', 'b', 'y', '_', 'n', 'a', 'm', 'e', ',',
- 'U', '8', ' ', 'n', 'a', 'm', 'e', '_', 'f', 'm', 't', '_', 'v', 'e', 'r', 's', 'i',
- 'o', 'n', '>', '(', '*', 'a', 's', 'c', 'i', 'i', ' ', 'n', 'a', 'm', 'e', '_', 'p',
- 'r', 'e', 'f', 'i', 'x', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n',
- 'c', 't', 'i', 'o', 'n', ' ', 'U', '8', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 's', 't', 'a', 't', 's', '_', 't', 'r', 'i', 'g', 'g', 'e', 'r', '#', '1', '(',
- 'U', '8', ' ', 'r', 'e', 'a', 'd', '_', 'b', 'i', 'n', ',', 'U', '3', '2', ' ', 'r',
- 'e', 'a', 'd', '_', 'l', 'e', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A',
- ':', 'x', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ' ', 'r', 'e', 'a', 'd', '_',
- 't', 'y', 'p', 'e', '*', 'a', 's', 'c', 'i', 'i', ' ', 's', 'p', 'o', 't', '_', 'g',
- 'r', 'o', 'u', 'p', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c',
- 't', 'i', 'o', 'n', ' ', 'U', '8', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'c', 'm', 'p', '_', 's', 't', 'a', 't', 's', '_', 't', 'r', 'i', 'g', 'g', 'e', 'r',
- '#', '1', '(', 'B', '8', ' ', 'c', 'm', 'p', '_', 'r', 'e', 'a', 'd', '_', 'b', 'i',
- 'n', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 't', 'a', 't', 's', ':',
- 'q', 'u', 'a', 'l', '_', 't', 'y', 'p', 'e', ' ', 'q', 'u', 'a', 'l', '_', 'b', 'i',
- 'n', ',', 'U', '3', '2', ' ', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ',', 'I', 'N',
- 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'x', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p',
- 'e', ' ', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', '*', 'a', 's', 'c', 'i', 'i',
- ' ', 's', 'p', 'o', 't', '_', 'g', 'r', 'o', 'u', 'p', ')', ';', 'e', 'x', 't', 'e',
- 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'U', '8', ' ', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 'c', 'm', 'p', 'f', '_', 's', 't', 'a', 't', 's',
- '_', 't', 'r', 'i', 'g', 'g', 'e', 'r', '#', '1', '(', 'B', '8', ' ', 'c', 'm', 'p',
- '_', 'r', 'e', 'a', 'd', '_', 'b', 'i', 'n', ',', 'U', '3', '2', ' ', 's', 'p', 'o',
- 't', '_', 'l', 'e', 'n', ',', 'U', '3', '2', ' ', 'r', 'e', 'a', 'd', '_', 'l', 'e',
- 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'x', 'r', 'e', 'a', 'd',
- '_', 't', 'y', 'p', 'e', ' ', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', '*', 'a',
- 's', 'c', 'i', 'i', ' ', 's', 'p', 'o', 't', '_', 'g', 'r', 'o', 'u', 'p', ')', ';',
- 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'U',
- '8', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'p', 'h', 'r', 'e', 'd', '_',
- 's', 't', 'a', 't', 's', '_', 't', 'r', 'i', 'g', 'g', 'e', 'r', '#', '1', '(', 'I',
- 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p', 'h', 'r', 'e',
- 'd', ' ', 'q', 'u', 'a', 'l', '_', 'b', 'i', 'n', ')', ';', 'e', 'x', 't', 'e', 'r',
- 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':',
- 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 'b', 'i', 'o', '_', 's', 't', 'a', 'r', 't', '#', '1', '(', 'I', 'N',
- 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'r', 'e',
- 'a', 'd', '_', 's', 't', 'a', 'r', 't', ',', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R',
- 'A', ':', 'x', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ' ', 'r', 'e', 'a', 'd',
- '_', 't', 'y', 'p', 'e', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n',
- 'c', 't', 'i', 'o', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd',
- ':', 'z', 'e', 'r', 'o', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'b', 'i',
- 'o', '_', 'e', 'n', 'd', '#', '1', '<', 'b', 'o', 'o', 'l', ' ', 'i', 'n', 'c', 'l',
- 'u', 's', 'i', 'v', 'e', '>', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'z', 'e', 'r', 'o', ' ', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't',
- ',', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'x', 'r', 'e', 'a', 'd', '_',
- 't', 'y', 'p', 'e', ' ', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ',', 'I', 'N',
- 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 'r', 'e', 'a',
- 'd', '_', 'l', 'e', 'n', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n',
- 'c', 't', 'i', 'o', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd',
- ':', 'l', 'e', 'n', '[', '2', ']', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'f', 'i', 'x', '_', 'r', 'e', 'a', 'd', '_', 's', 'e', 'g', '#', '1', '(', 'U', '1',
- '6', '[', '2', ']', ' ', 'r', 'd', '_', 's', 'e', 'g', ',', 'I', 'N', 'S', 'D', 'C',
- ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 's', 'p', 'o', 't', '_', 'l',
- 'e', 'n', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i',
- 'o', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'S', 'p', 'o', 't', 'D',
- 'e', 's', 'c', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'm', 'a', 'k', 'e',
- '_', 's', 'p', 'o', 't', '_', 'd', 'e', 's', 'c', '#', '1', '(', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 's', 'p', 'o', 't', '_',
- 'l', 'e', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l',
- 'e', 'n', ' ', 'f', 'i', 'x', 'e', 'd', '_', 'l', 'e', 'n', ',', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 's', 'i', 'g', '_', 'l',
- 'e', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e',
- 'r', 'o', ' ', 't', 'r', 'i', 'm', '_', 's', 't', 'a', 'r', 't', ',', 'I', 'N', 'S',
- 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 't', 'r', 'i', 'm',
- '_', 'l', 'e', 'n', ',', 'U', '8', ' ', 'n', 'u', 'm', '_', 'r', 'e', 'a', 'd', 's',
- ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n',
- ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'R', 'e', 'a', 'd', 'D', 'e', 's',
- 'c', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'm', 'a', 'k', 'e', '_', 'r',
- 'e', 'a', 'd', '_', 'd', 'e', 's', 'c', '#', '1', '(', 'U', '8', ' ', 'n', 'u', 'm',
- '_', 'r', 'e', 'a', 'd', 's', ',', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'z', 'e', 'r', 'o', ' ', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't',
- ',', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ',
- 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R',
- 'A', ':', 'x', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ' ', 'r', 'e', 'a', 'd',
- '_', 't', 'y', 'p', 'e', ',', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'r',
- 'e', 'a', 'd', '_', 'f', 'i', 'l', 't', 'e', 'r', ' ', 'r', 'e', 'a', 'd', '_', 'f',
- 'i', 'l', 't', ',', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x',
- 't', ' ', 'c', 's', '_', 'k', 'e', 'y', ',', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o',
- 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'l', 'a', 'b', 'e', 'l', '_', 's', 't',
- 'a', 'r', 't', ',', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l',
- 'e', 'n', ' ', 'l', 'a', 'b', 'e', 'l', '_', 'l', 'e', 'n', ',', 'a', 's', 'c', 'i',
- 'i', ' ', 'l', 'a', 'b', 'e', 'l', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f',
- 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T',
- ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'r', 'o', 't', 'a', 't', 'e', '#',
- '1', '<', 'b', 'o', 'o', 'l', ' ', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '>', '(',
- 'T', ' ', 'i', 'n', ',', 'U', '8', ' ', 'c', 'a', 'l', 'l', 'e', 'd', ')', ';', 'e',
- 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't',
- 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 's', 'w', 'a', 'p', '#', '1', '(', 'T', ' ', 'i', 'n', ',', 'U', '8', ' ', 'c', 'a',
- 'l', 'l', 'e', 'd', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c',
- 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'o', 'r', 'm', 'a', 'l', 'i', 'z', 'e', '#',
- '1', '(', 'T', ' ', 'i', 'n', 't', 'e', 'n', 's', 'i', 't', 'y', ',', 'U', '8', ' ',
- 'c', 'a', 'l', 'l', 'e', 'd', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u',
- 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'd', 'e', 'n', 'o', 'r', 'm', 'a', 'l',
- 'i', 'z', 'e', '#', '1', '(', 'T', ' ', 'i', 'n', 't', 'e', 'n', 's', 'i', 't', 'y',
- ',', 'U', '8', ' ', 'c', 'a', 'l', 'l', 'e', 'd', ')', ';', 'e', 'x', 't', 'e', 'r',
- 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '<', 't', 'y', 'p', 'e', ' ',
- 'T', '>', 'T', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'm', 'a', 'k', 'e',
- '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '#', '1', '<', 'T', ' ', 's', 't', 'a',
- 'r', 't', '>', '(', 'a', 'n', 'y', ' ', 'b', 'a', 's', 'e', 's', ')', ';', 's', 'c',
- 'h', 'e', 'm', 'a', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a',
- 'm', 'p', '4', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'f', 's', 'a', 'm',
- 'p', '4', ':', 'd', 'e', 'c', 'o', 'd', 'e', '#', '2', '(', 'm', 'e', 'r', 'g', 'e',
- 'd', '_', 'f', 'm', 't', ' ', 'i', 'n', ')', '{', 'f', 'z', 'i', 'p', '_', 'f', 'm',
- 't', ' ', 'c', 'm', 'p', '0', '=', 's', 'p', 'l', 'i', 't', '#', '1', '<', '0', '>',
- '(', 'i', 'n', ')', ';', 'f', 'z', 'i', 'p', '_', 'f', 'm', 't', ' ', 'c', 'm', 'p',
- '1', '2', '3', '=', 's', 'p', 'l', 'i', 't', '#', '1', '<', '1', '>', '(', 'i', 'n',
- ')', ';', 'F', '3', '2', ' ', 'c', 'h', '0', '=', 'f', 'u', 'n', 'z', 'i', 'p', '#',
- '1', '(', 'c', 'm', 'p', '0', ')', ';', 'F', '3', '2', ' ', 'c', 'h', '1', '2', '3',
- 'a', '=', 'f', 'u', 'n', 'z', 'i', 'p', '#', '1', '(', 'c', 'm', 'p', '1', '2', '3',
- ')', ';', 'F', '3', '2', '[', '3', ']', ' ', 'c', 'h', '1', '2', '3', '=', 'r', 'e',
- 'd', 'i', 'm', 'e', 'n', 's', 'i', 'o', 'n', '#', '1', '(', 'c', 'h', '1', '2', '3',
- 'a', ')', ';', 'r', 'e', 't', 'u', 'r', 'n', ' ', '(', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p', '4',
- ')', '<', 'F', '3', '2', '>', 'p', 'a', 's', 't', 'e', '#', '1', '(', 'c', 'h', '0',
- ',', 'c', 'h', '1', '2', '3', ')', ';', '}', 's', 'c', 'h', 'e', 'm', 'a', ' ', 'f',
- 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'm', 'e', 'r', 'g', 'e', 'd', '_', 'f', 'm',
- 't', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'f', 's', 'a', 'm', 'p', '4',
- ':', 'e', 'n', 'c', 'o', 'd', 'e', '#', '2', '<', 'U', '3', '2', ' ', 'c', 'a', 'l',
- 'l', 'e', 'd', ',', 'U', '3', '2', ' ', 'a', 'l', 't', '>', '(', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a', 'm',
- 'p', '4', ' ', 'i', 'n', ')', '{', 'F', '3', '2', ' ', 'c', 'h', '0', '=', '<', 'F',
- '3', '2', '>', 'c', 'u', 't', '#', '1', '<', '0', '>', '(', 'i', 'n', ')', ';', 'F',
- '3', '2', '[', '3', ']', ' ', 'c', 'h', '1', '2', '3', '=', '<', 'F', '3', '2', '>',
- 'c', 'u', 't', '#', '1', '<', '1', ',', '2', ',', '3', '>', '(', 'i', 'n', ')', ';',
- 'f', 'z', 'i', 'p', '_', 'f', 'm', 't', ' ', 'c', 'm', 'p', '0', '=', 'f', 'z', 'i',
- 'p', '#', '1', '<', 'c', 'a', 'l', 'l', 'e', 'd', '>', '(', 'c', 'h', '0', ')', ';',
- 'F', '3', '2', ' ', 'c', 'h', '1', '2', '3', 'a', '=', 'r', 'e', 'd', 'i', 'm', 'e',
- 'n', 's', 'i', 'o', 'n', '#', '1', '(', 'c', 'h', '1', '2', '3', ')', ';', 'f', 'z',
- 'i', 'p', '_', 'f', 'm', 't', ' ', 'c', 'm', 'p', '1', '2', '3', '=', 'f', 'z', 'i',
- 'p', '#', '1', '<', 'a', 'l', 't', '>', '(', 'c', 'h', '1', '2', '3', 'a', ')', ';',
- 'r', 'e', 't', 'u', 'r', 'n', ' ', 'm', 'e', 'r', 'g', 'e', '#', '1', '(', 'c', 'm',
- 'p', '0', ',', 'c', 'm', 'p', '1', '2', '3', ')', ';', '}', 'e', 'x', 't', 'e', 'r',
- 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'U', '3', '2', '[', '3', ']',
- ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'd',
- 'y', 'n', 'a', 'm', 'i', 'c', '_', 'r', 'e', 'a', 'd', '_', 'd', 'e', 's', 'c', '#',
- '1', '<', '*', 'U', '3', '2', ' ', 'e', 'd', 'i', 't', '_', 'd', 'i', 's', 't', 'a',
- 'n', 'c', 'e', '>', '(', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5',
- '4', '_', ':', 'd', 'r', 'd', 'p', 'a', 'r', 'a', 'm', '_', 's', 'e', 't', ' ', 's',
- 'p', 'o', 't', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4',
- '_', ':', 'd', 'r', 'd', 'p', 'a', 'r', 'a', 'm', '_', 's', 'e', 't', ' ', 'k', 'e',
- 'y', '*', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':',
- 'd', 'r', 'd', 'p', 'a', 'r', 'a', 'm', '_', 's', 'e', 't', ' ', 'l', 'i', 'n', 'k',
- 'e', 'r', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i',
- 'o', 'n', ' ', 't', 'e', 'x', 't', ':', 't', 'o', 'k', 'e', 'n', ' ', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 't', 'o', 'k', 'e', 'n',
- 'i', 'z', 'e', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '#', '1', '(', 'a',
- 's', 'c', 'i', 'i', ' ', 'n', 'a', 'm', 'e', ')', ';', 'e', 'x', 't', 'e', 'r', 'n',
- ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 't', 'e', 'x', 't', ':', 't', 'o',
- 'k', 'e', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u',
- 'm', 'i', 'n', 'a', ':', 't', 'o', 'k', 'e', 'n', 'i', 'z', 'e', '_', 's', 'p', 'o',
- 't', '_', 'n', 'a', 'm', 'e', '#', '1', '(', 'a', 's', 'c', 'i', 'i', ' ', 'n', 'a',
- 'm', 'e', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i',
- 'o', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p',
- 'e', 'd', '_', 'q', 'u', 'a', 'l', '4', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 'q', 'u', 'a', 'l', '4', '_', 'd', 'e', 'c', 'o', 'd', 'e', '#', '1', '(', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e', 'n', 'c', 'o', 'd', 'e', 'd', '_', 'q',
- 'u', 'a', 'l', '4', ' ', 'i', 'n', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f',
- 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'e', 'n', 'c', 'o', 'd', 'e', 'd', '_', 'q', 'u', 'a', 'l', '4', ' ', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 'q', 'u', 'a', 'l', '4', '_', 'e', 'n', 'c', 'o', 'd',
- 'e', '#', '1', '(', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p',
- 'p', 'e', 'd', '_', 'q', 'u', 'a', 'l', '4', ' ', 'i', 'n', ')', ';', 'e', 'x', 't',
- 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 't', 'e', 'x', 't',
- ':', 't', 'o', 'k', 'e', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'A',
- 'B', 'I', ':', 't', 'o', 'k', 'e', 'n', 'i', 'z', 'e', '_', 's', 'p', 'o', 't', '_',
- 'n', 'a', 'm', 'e', '#', '1', '(', 'a', 's', 'c', 'i', 'i', ' ', 'n', 'a', 'm', 'e',
- ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n',
- ' ', 't', 'e', 'x', 't', ':', 't', 'o', 'k', 'e', 'n', ' ', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'H', 'e', 'l', 'i', 'c', 'o', 's', ':', 't', 'o', 'k', 'e', 'n',
- 'i', 'z', 'e', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '#', '1', '(', 'a',
- 's', 'c', 'i', 'i', ' ', 'n', 'a', 'm', 'e', ')', ';', 'e', 'x', 't', 'e', 'r', 'n',
- ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 't', 'e', 'x', 't', ':', 't', 'o',
- 'k', 'e', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'o', 'n', 'T',
- 'o', 'r', 'r', 'e', 'n', 't', ':', 't', 'o', 'k', 'e', 'n', 'i', 'z', 'e', '_', 's',
- 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '#', '1', '(', 'a', 's', 'c', 'i', 'i', ' ',
- 'n', 'a', 'm', 'e', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c',
- 't', 'i', 'o', 'n', ' ', 'U', '3', '2', '[', '5', ']', ' ', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 's', 'e', 'g', '_', 'f', 'r', 'o', 'm',
- '_', 'r', 'e', 'a', 'd', 'n', '#', '1', '(', 'U', '8', ' ', 'n', 'r', 'e', 'a', 'd',
- 's', ',', 'U', '3', '2', ' ', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', ')', ';', 'e',
- 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 's',
- 'c', 'i', 'i', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'r', 'e', 'w', 'r',
- 'i', 't', 'e', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '#', '1', '<', 'I',
- 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm',
- '_', 'i', 'd', ' ', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '>', '(', 'a', 's', 'c',
- 'i', 'i', ' ', 's', 'k', 'e', 'y', '*', 'a', 's', 'c', 'i', 'i', ' ', 'p', 'r', 'e',
- 'f', 'i', 'x', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't',
- 'i', 'o', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v',
- 'a', 'l', '[', '*', ']', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e', 'x',
- 't', 'r', 'a', 'c', 't', '_', 'c', 'o', 'o', 'r', 'd', 'i', 'n', 'a', 't', 'e', 's',
- '#', '1', '<', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l', 'a', 't',
- 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '>',
- '(', 'a', 's', 'c', 'i', 'i', ' ', 's', 'k', 'e', 'y', ')', ';', 'e', 'x', 't', 'e',
- 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '_', '_', 'u', 'n', 't',
- 'y', 'p', 'e', 'd', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5',
- '4', '_', ':', 'u', 'n', 't', 'y', 'p', 'e', 'd', '_', '0', '(', ')', ';', 'e', 'x',
- 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'U', '1', '6',
- ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'd', 'e', 'c', 'o', 'd', 'e', ':',
- 'C', 'L', 'I', 'P', '#', '1', '(', 'o', 'p', 'a', 'q', 'u', 'e', ' ', 'i', 'n', ')',
- ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'p', 'o', 's', '1', '6', ' ', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 'd', 'e', 'c', 'o', 'd', 'e', ':', 'P', 'O', 'S',
- 'I', 'T', 'I', 'O', 'N', '#', '1', '(', 'o', 'p', 'a', 'q', 'u', 'e', ' ', 'i', 'n',
- ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n',
- ' ', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd',
- ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'd', 'e', 'c', 'o', 'd', 'e', ':',
- 'R', 'E', 'A', 'D', '#', '1', '<', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':',
- 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ', 'p', 'l', 'a', 't', 'f',
- 'o', 'r', 'm', '>', '(', 'o', 'p', 'a', 'q', 'u', 'e', ' ', 'i', 'n', ')', ';', 'e',
- 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n',
- 'y', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'd', 'e', 'c', 'o', 'd', 'e',
- ':', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '#', '1', '<', 'I', 'N', 'S', 'D', 'C', ':',
- 'S', 'R', 'A', ':', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ', 'p',
- 'l', 'a', 't', 'f', 'o', 'r', 'm', '>', '(', 'o', 'p', 'a', 'q', 'u', 'e', ' ', 'i',
- 'n', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o',
- 'n', ' ', 'a', 'n', 'y', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'd', 'e',
- 'c', 'o', 'd', 'e', ':', 'S', 'I', 'G', 'N', 'A', 'L', '#', '1', '<', 'I', 'N', 'S',
- 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i',
- 'd', ' ', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '>', '(', 'o', 'p', 'a', 'q', 'u',
- 'e', ' ', 'i', 'n', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c',
- 't', 'i', 'o', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'p', 'o', 's',
- '1', '6', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_',
- ':', 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n',
- '#', '1', '(', 'U', '1', '6', ' ', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '*', 'I',
- 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 'f', 'i', 'l',
- 't', 'e', 'r', ' ', 'r', 'd', '_', 'f', 'i', 'l', 't', ',', 'N', 'C', 'B', 'I', ':',
- 'i', 's', 'a', 'm', 'p', '1', ' ', 's', 'i', 'g', ')', ';', 'e', 'x', 't', 'e', 'r',
- 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '_', '_', 'u', 'n', 't', 'y',
- 'p', 'e', 'd', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4',
- '_', ':', 'u', 'n', 't', 'y', 'p', 'e', 'd', '_', '1', '_', '2', 'a', '(', ')', ';',
- 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '_',
- '_', 'u', 'n', 't', 'y', 'p', 'e', 'd', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', '_', '4', '5', '4', '_', ':', 'u', 'n', 't', 'y', 'p', 'e', 'd', '_', '1', '_',
- '2', 'b', '(', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't',
- 'i', 'o', 'n', ' ', 'a', 'n', 'y', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'd', 'e', 'c', 'o', 'd', 'e', ':', 'I', 'N', 'T', 'E', 'N', 'S', 'I', 'T', 'Y', '#',
- '1', '(', 'o', 'p', 'a', 'q', 'u', 'e', ' ', 'i', 'n', ')', ';', 'e', 'x', 't', 'e',
- 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'a', 'n', 'y', ' ', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'd', 'e', 'c', 'o', 'd', 'e', ':', 'N', 'O',
- 'I', 'S', 'E', '#', '1', '(', 'o', 'p', 'a', 'q', 'u', 'e', ' ', 'i', 'n', ')', ';',
- 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '_',
- '_', 'u', 'n', 't', 'y', 'p', 'e', 'd', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'u', 'n', 't', 'y', 'p', 'e', 'd',
- '_', '0', 'a', '(', ')', ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c',
- 't', 'i', 'o', 'n', ' ', '_', '_', 'u', 'n', 't', 'y', 'p', 'e', 'd', ' ', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'u',
- 'n', 't', 'y', 'p', 'e', 'd', '_', '0', 'b', '(', ')', ';', 'e', 'x', 't', 'e', 'r',
- 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '_', '_', 'u', 'n', 't', 'y',
- 'p', 'e', 'd', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u',
- 'm', 'i', 'n', 'a', ':', 'u', 'n', 't', 'y', 'p', 'e', 'd', '_', '1', 'a', '(', ')',
- ';', 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_',
- 'q', 'u', 'a', 'l', '4', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'q', 'u',
- 'a', 'l', '4', '_', 'd', 'e', 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', '_', 'v', '1',
- '#', '1', '(', 'a', 'n', 'y', ' ', 'i', 'n', ')', ';', 'e', 'x', 't', 'e', 'r', 'n',
- ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '_', '_', 'u', 'n', 't', 'y', 'p',
- 'e', 'd', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm',
- 'i', 'n', 'a', ':', 'u', 'n', 't', 'y', 'p', 'e', 'd', '_', '1', 'b', '(', ')', ';',
- 'e', 'x', 't', 'e', 'r', 'n', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', '_',
- '_', 'u', 'n', 't', 'y', 'p', 'e', 'd', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 'A', 'B', 'I', ':', 'u', 'n', 't', 'y', 'p', 'e', 'd', '_', '1', '(', ')', ';',
- 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>',
- 'T', ' ', 'i', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1',
- '{', 'e', 'n', 'c', 'o', 'd', 'e', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'i', 'z',
- 'i', 'p', '#', '2', '.', '1', '(', '@', ')', ';', '}', 'd', 'e', 'c', 'o', 'd', 'e',
- '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', '(', 'T', ')', 'i', 'u', 'n', 'z', 'i', 'p',
- '#', '2', '.', '1', '(', '@', ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a',
- 'l', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 'f', 'z', 'i', 'p', '_',
- 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', '<', 'U', '3', '2', ' ', 'm', 'a',
- 'n', 't', 'i', 's', 's', 'a', '>', '{', 'e', 'n', 'c', 'o', 'd', 'e', '{', 'r', 'e',
- 't', 'u', 'r', 'n', ' ', 'f', 'z', 'i', 'p', '#', '1', '<', 'm', 'a', 'n', 't', 'i',
- 's', 's', 'a', '>', '(', '@', ')', ';', '}', 'd', 'e', 'c', 'o', 'd', 'e', '{', 'r',
- 'e', 't', 'u', 'r', 'n', ' ', 'f', 'u', 'n', 'z', 'i', 'p', '#', '1', '(', '@', ')',
- ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', '<', 't', 'y', 'p', 'e',
- ' ', 'T', '>', 'T', ' ', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g',
- '#', '1', '<', '*', 'I', '3', '2', ' ', 's', 't', 'r', 'a', 't', 'e', 'g', 'y', ',',
- 'I', '3', '2', ' ', 'l', 'e', 'v', 'e', 'l', '>', '{', 'e', 'n', 'c', 'o', 'd', 'e',
- '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'z', 'i', 'p', '#', '1', '<', 's', 't', 'r',
- 'a', 't', 'e', 'g', 'y', ',', 'l', 'e', 'v', 'e', 'l', '>', '(', '@', ')', ';', '}',
- 'd', 'e', 'c', 'o', 'd', 'e', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'u', 'n', 'z',
- 'i', 'p', '#', '1', '(', '@', ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a',
- 'l', ' ', 'b', 'o', 'o', 'l', ' ', 'b', 'o', 'o', 'l', '_', 'e', 'n', 'c', 'o', 'd',
- 'i', 'n', 'g', '#', '1', '{', 'e', 'n', 'c', 'o', 'd', 'e', '{', 'U', '8', ' ', 'l',
- 'i', 'm', '=', '<', 'U', '8', '>', 'c', 'l', 'i', 'p', '#', '1', '<', '0', ',', '1',
- '>', '(', '@', ')', ';', 'B', '1', ' ', 'b', 'i', 't', '=', 'p', 'a', 'c', 'k', '#',
- '1', '(', 'l', 'i', 'm', ')', ';', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'z', 'i', 'p',
- '#', '1', '<', '3', ',', '1', '>', '(', 'b', 'i', 't', ')', ';', '}', 'd', 'e', 'c',
- 'o', 'd', 'e', '{', 'B', '1', ' ', 'b', 'i', 't', '=', 'u', 'n', 'z', 'i', 'p', '#',
- '1', '(', '@', ')', ';', 'r', 'e', 't', 'u', 'r', 'n', ' ', '(', 'b', 'o', 'o', 'l',
- ')', 'u', 'n', 'p', 'a', 'c', 'k', '#', '1', '(', 'b', 'i', 't', ')', ';', '}', '}',
- 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>',
- 'T', ' ', 'd', 'e', 'l', 't', 'a', '_', 'i', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o',
- 'd', 'i', 'n', 'g', '#', '1', '{', 'e', 'n', 'c', 'o', 'd', 'e', '{', 'T', ' ', 'd',
- 'l', 't', '=', '<', 'T', '>', 'd', 'e', 'l', 't', 'a', '#', '1', '(', '@', ')', ';',
- 'r', 'e', 't', 'u', 'r', 'n', ' ', 'i', 'z', 'i', 'p', '#', '2', '.', '1', '(', 'd',
- 'l', 't', ')', ';', '}', 'd', 'e', 'c', 'o', 'd', 'e', '{', 'T', ' ', 'd', 'l', 't',
- '=', 'i', 'u', 'n', 'z', 'i', 'p', '#', '2', '.', '1', '(', '@', ')', ';', 'r', 'e',
- 't', 'u', 'r', 'n', ' ', '<', 'T', '>', 'u', 'n', 'd', 'e', 'l', 't', 'a', '#', '1',
- '(', 'd', 'l', 't', ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ',
- '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 'd', 'e', 'l', 't', 'a', '_', 'z',
- 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', '{', 'e', 'n', 'c',
- 'o', 'd', 'e', '{', 'T', ' ', 'd', 'l', 't', '=', '<', 'T', '>', 'd', 'e', 'l', 't',
- 'a', '#', '1', '(', '@', ')', ';', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'z', 'i', 'p',
- '#', '1', '<', '3', ',', '1', '>', '(', 'd', 'l', 't', ')', ';', '}', 'd', 'e', 'c',
- 'o', 'd', 'e', '{', 'T', ' ', 'd', 'l', 't', '=', 'u', 'n', 'z', 'i', 'p', '#', '1',
- '(', '@', ')', ';', 'r', 'e', 't', 'u', 'r', 'n', ' ', '<', 'T', '>', 'u', 'n', 'd',
- 'e', 'l', 't', 'a', '#', '1', '(', 'd', 'l', 't', ')', ';', '}', '}', 'p', 'h', 'y',
- 's', 'i', 'c', 'a', 'l', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 'd',
- 'e', 'l', 't', 'a', '_', 'a', 'v', 'e', 'r', 'a', 'g', 'e', '_', 'z', 'i', 'p', '_',
- 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', '{', 'e', 'n', 'c', 'o', 'd', 'e',
- '{', 'd', 'e', 'l', 't', 'a', '_', 'a', 'v', 'e', 'r', 'a', 'g', 'e', 'd', '_', 'f',
- 'm', 't', ' ', 't', '=', 'd', 'e', 'l', 't', 'a', '_', 'a', 'v', 'e', 'r', 'a', 'g',
- 'e', '#', '1', '(', '@', ')', ';', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'z', 'i', 'p',
- '#', '1', '<', '3', ',', '1', '>', '(', 't', ')', ';', '}', 'd', 'e', 'c', 'o', 'd',
- 'e', '{', 'd', 'e', 'l', 't', 'a', '_', 'a', 'v', 'e', 'r', 'a', 'g', 'e', 'd', '_',
- 'f', 'm', 't', ' ', 't', '=', 'u', 'n', 'z', 'i', 'p', '#', '1', '(', '@', ')', ';',
- 'r', 'e', 't', 'u', 'r', 'n', ' ', 'u', 'n', 'd', 'e', 'l', 't', 'a', '_', 'a', 'v',
- 'e', 'r', 'a', 'g', 'e', '#', '1', '(', 't', ')', ';', '}', '}', 'p', 'h', 'y', 's',
- 'i', 'c', 'a', 'l', ' ', '<', 't', 'y', 'p', 'e', ' ', 'T', '>', 'T', ' ', 'b', 'z',
- 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', '<', '*', 'U', '3',
- '2', ' ', 'b', 'l', 'o', 'c', 'k', 'S', 'i', 'z', 'e', '1', '0', '0', 'k', ',', 'U',
- '3', '2', ' ', 'w', 'o', 'r', 'k', 'F', 'a', 'c', 't', 'o', 'r', '>', '{', 'e', 'n',
- 'c', 'o', 'd', 'e', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'b', 'z', 'i', 'p', '#',
- '1', '<', 'b', 'l', 'o', 'c', 'k', 'S', 'i', 'z', 'e', '1', '0', '0', 'k', ',', 'w',
- 'o', 'r', 'k', 'F', 'a', 'c', 't', 'o', 'r', '>', '(', '@', ')', ';', '}', 'd', 'e',
- 'c', 'o', 'd', 'e', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'b', 'u', 'n', 'z', 'i',
- 'p', '#', '1', '(', '@', ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l',
- ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'e', 'n',
- 'c', 'o', 'd', 'i', 'n', 'g', ':', 'C', 'L', 'I', 'P', '#', '2', '{', 'e', 'n', 'c',
- 'o', 'd', 'e', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'i', 'z', 'i', 'p', '#', '2',
- '.', '1', '(', '@', ')', ';', '}', 'd', 'e', 'c', 'o', 'd', 'e', '{', 'r', 'e', 't',
- 'u', 'r', 'n', ' ', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'o', 'n', 'e', ')', 'i', 'u', 'n', 'z', 'i', 'p', '#', '2', '.', '1', '(', '@', ')',
- ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'N', 'C', 'B', 'I', ':',
- 'i', 's', 'a', 'm', 'p', '1', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_',
- '4', '5', '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'S', 'I', 'G',
- 'N', 'A', 'L', '#', '2', '{', 'e', 'n', 'c', 'o', 'd', 'e', '{', 'r', 'e', 't', 'u',
- 'r', 'n', ' ', 'i', 'z', 'i', 'p', '#', '2', '.', '1', '(', '@', ')', ';', '}', 'd',
- 'e', 'c', 'o', 'd', 'e', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', '(', 'N', 'C', 'B',
- 'I', ':', 'i', 's', 'a', 'm', 'p', '1', ')', 'i', 'u', 'n', 'z', 'i', 'p', '#', '2',
- '.', '1', '(', '@', ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ',
- 'I', 'N', 'S', 'D', 'C', ':', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ':', 'o', 'n',
- 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':',
- 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'P', 'O', 'S', 'I', 'T', 'I', 'O', 'N',
- '#', '2', '{', 'e', 'n', 'c', 'o', 'd', 'e', '{', 'I', '3', '2', ' ', 'p', 'o', 's',
- '_', '1', 's', 't', '_', 'd', 'e', 'r', 'i', 'v', '=', '<', 'I', '3', '2', '>', 'd',
- 'e', 'r', 'i', 'v', '#', '1', '(', '@', ')', ';', 'r', 'e', 't', 'u', 'r', 'n', ' ',
- 'i', 'z', 'i', 'p', '#', '2', '.', '1', '(', 'p', 'o', 's', '_', '1', 's', 't', '_',
- 'd', 'e', 'r', 'i', 'v', ')', ';', '}', 'd', 'e', 'c', 'o', 'd', 'e', '{', 'I', '3',
- '2', ' ', 'p', 'o', 's', '_', '1', 's', 't', '_', 'd', 'e', 'r', 'i', 'v', '=', 'i',
- 'u', 'n', 'z', 'i', 'p', '#', '2', '.', '1', '(', '@', ')', ';', 'r', 'e', 't', 'u',
- 'r', 'n', ' ', '(', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'o', 's', 'i', 't', 'i', 'o',
- 'n', ':', 'o', 'n', 'e', ')', '<', 'I', '3', '2', '>', 'i', 'n', 't', 'e', 'g', 'r',
- 'a', 'l', '#', '1', '(', 'p', 'o', 's', '_', '1', 's', 't', '_', 'd', 'e', 'r', 'i',
- 'v', ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'q', 'u', 'a',
- 'l', '4', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'q', 'u', 'a', 'l', '4',
- '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', '{', 'e', 'n', 'c', 'o', 'd',
- 'e', '{', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e', 'n', 'c', 'o', 'd', 'e',
- 'd', '_', 'q', 'u', 'a', 'l', '4', ' ', 'e', 'n', 'c', 'o', 'd', 'e', 'd', '=', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'q', 'u', 'a', 'l', '4', '_', 'e', 'n', 'c',
- 'o', 'd', 'e', '#', '1', '(', '@', ')', ';', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'z',
- 'i', 'p', '#', '1', '<', '3', ',', '1', '>', '(', 'e', 'n', 'c', 'o', 'd', 'e', 'd',
- ')', ';', '}', 'd', 'e', 'c', 'o', 'd', 'e', '{', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 'e', 'n', 'c', 'o', 'd', 'e', 'd', '_', 'q', 'u', 'a', 'l', '4', ' ', 'u',
- 'n', 'z', 'i', 'p', 'p', 'e', 'd', '=', 'u', 'n', 'z', 'i', 'p', '#', '1', '(', '@',
- ')', ';', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 'q', 'u', 'a', 'l', '4', '_', 'd', 'e', 'c', 'o', 'd', 'e', '#', '1', '(', 'u',
- 'n', 'z', 'i', 'p', 'p', 'e', 'd', ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c',
- 'a', 'l', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p',
- 'e', 'd', '_', 'f', 's', 'a', 'm', 'p', '4', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'e', 'n', 'c', 'o', 'd', 'i',
- 'n', 'g', ':', 'S', 'I', 'G', 'N', 'A', 'L', '#', '2', '{', 'e', 'n', 'c', 'o', 'd',
- 'e', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 'f', 's', 'a', 'm', 'p', '4', ':', 'e', 'n', 'c', 'o', 'd', 'e', '#', '2', '<',
- '1', '4', ',', '1', '0', '>', '(', '@', ')', ';', '}', 'd', 'e', 'c', 'o', 'd', 'e',
- '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'f', 's', 'a', 'm', 'p', '4', ':', 'd', 'e', 'c', 'o', 'd', 'e', '#', '2', '(', '@',
- ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'N', 'C', 'B', 'I',
- ':', 'f', 's', 'a', 'm', 'p', '4', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g',
- ':', 'N', 'O', 'I', 'S', 'E', '#', '2', '{', 'e', 'n', 'c', 'o', 'd', 'e', '{', 'F',
- '3', '2', ' ', 'n', 'c', 'm', 'p', '=', 'r', 'e', 'd', 'i', 'm', 'e', 'n', 's', 'i',
- 'o', 'n', '#', '1', '(', '@', ')', ';', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'f', 'z',
- 'i', 'p', '#', '1', '<', '1', '0', '>', '(', 'n', 'c', 'm', 'p', ')', ';', '}', 'd',
- 'e', 'c', 'o', 'd', 'e', '{', 'F', '3', '2', ' ', 'd', 'c', 'm', 'p', '=', 'f', 'u',
- 'n', 'z', 'i', 'p', '#', '1', '(', '@', ')', ';', 'r', 'e', 't', 'u', 'r', 'n', ' ',
- 'r', 'e', 'd', 'i', 'm', 'e', 'n', 's', 'i', 'o', 'n', '#', '1', '(', 'd', 'c', 'm',
- 'p', ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a',
- 'm', 'p', '4', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u',
- 'm', 'i', 'n', 'a', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'I', 'N', 'T',
- 'E', 'N', 'S', 'I', 'T', 'Y', '#', '2', '{', 'e', 'n', 'c', 'o', 'd', 'e', '{', 'r',
- 'e', 't', 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'f', 's',
- 'a', 'm', 'p', '4', ':', 'e', 'n', 'c', 'o', 'd', 'e', '#', '2', '<', '1', '4', ',',
- '1', '0', '>', '(', '@', ')', ';', '}', 'd', 'e', 'c', 'o', 'd', 'e', '{', 'r', 'e',
- 't', 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'f', 's', 'a',
- 'm', 'p', '4', ':', 'd', 'e', 'c', 'o', 'd', 'e', '#', '2', '(', '@', ')', ';', '}',
- '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p', '4', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'A', 'B', 'I', ':', 'e', 'n', 'c', 'o',
- 'd', 'i', 'n', 'g', ':', 'S', 'I', 'G', 'N', 'A', 'L', '#', '2', '{', 'e', 'n', 'c',
- 'o', 'd', 'e', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 'f', 's', 'a', 'm', 'p', '4', ':', 'e', 'n', 'c', 'o', 'd', 'e', '#',
- '2', '<', '1', '4', ',', '1', '0', '>', '(', '@', ')', ';', '}', 'd', 'e', 'c', 'o',
- 'd', 'e', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 'f', 's', 'a', 'm', 'p', '4', ':', 'd', 'e', 'c', 'o', 'd', 'e', '#', '2',
- '(', '@', ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'I', 'N',
- 'S', 'D', 'C', ':', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ':', 'o', 'n', 'e', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'o', 'n', 'T', 'o', 'r', 'r', 'e',
- 'n', 't', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'P', 'O', 'S', 'I', 'T',
- 'I', 'O', 'N', '#', '1', '{', 'e', 'n', 'c', 'o', 'd', 'e', '{', 'I', '3', '2', ' ',
- 'p', 'o', 's', '_', '1', 's', 't', '_', 'd', 'e', 'r', 'i', 'v', '=', '<', 'I', '3',
- '2', '>', 'd', 'e', 'r', 'i', 'v', '#', '1', '(', '@', ')', ';', 'r', 'e', 't', 'u',
- 'r', 'n', ' ', 'i', 'z', 'i', 'p', '#', '2', '.', '1', '(', 'p', 'o', 's', '_', '1',
- 's', 't', '_', 'd', 'e', 'r', 'i', 'v', ')', ';', '}', 'd', 'e', 'c', 'o', 'd', 'e',
- '{', 'I', '3', '2', ' ', 'p', 'o', 's', '_', '1', 's', 't', '_', 'd', 'e', 'r', 'i',
- 'v', '=', 'i', 'u', 'n', 'z', 'i', 'p', '#', '2', '.', '1', '(', '@', ')', ';', 'r',
- 'e', 't', 'u', 'r', 'n', ' ', '(', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'o', 's', 'i',
- 't', 'i', 'o', 'n', ':', 'o', 'n', 'e', ')', '<', 'I', '3', '2', '>', 'i', 'n', 't',
- 'e', 'g', 'r', 'a', 'l', '#', '1', '(', 'p', 'o', 's', '_', '1', 's', 't', '_', 'd',
- 'e', 'r', 'i', 'v', ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ',
- '_', '_', 'n', 'o', '_', 'h', 'e', 'a', 'd', 'e', 'r', ' ', 'U', '1', '6', ' ', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'e', 'n', 'c',
- 'o', 'd', 'i', 'n', 'g', ':', 'C', 'L', 'I', 'P', '#', '1', '{', 'd', 'e', 'c', 'o',
- 'd', 'e', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 'd', 'e', 'c', 'o', 'd', 'e', ':', 'C', 'L', 'I', 'P', '#', '1', '(', '@',
- ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', '_', '_', 'n', 'o',
- '_', 'h', 'e', 'a', 'd', 'e', 'r', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'p', 'o', 's', '1', '6', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4',
- '5', '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'P', 'O', 'S', 'I',
- 'T', 'I', 'O', 'N', '#', '1', '{', 'd', 'e', 'c', 'o', 'd', 'e', '{', 'r', 'e', 't',
- 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'd', 'e', 'c', 'o',
- 'd', 'e', ':', 'P', 'O', 'S', 'I', 'T', 'I', 'O', 'N', '#', '1', '(', '@', ')', ';',
- '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', '_', '_', 'n', 'o', '_', 'h',
- 'e', 'a', 'd', 'e', 'r', ' ', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'p',
- 'a', 'c', 'k', 'e', 'd', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4',
- '5', '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'R', 'E', 'A', 'D',
- '#', '1', '{', 'd', 'e', 'c', 'o', 'd', 'e', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'd', 'e', 'c', 'o', 'd', 'e', ':', 'R',
- 'E', 'A', 'D', '#', '1', '<', '1', '>', '(', '@', ')', ';', '}', '}', 'p', 'h', 'y',
- 's', 'i', 'c', 'a', 'l', ' ', '_', '_', 'n', 'o', '_', 'h', 'e', 'a', 'd', 'e', 'r',
- ' ', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'n', '_', 'e',
- 'n', 'c', 'o', 'd', 'e', 'd', ':', 'p', 'h', 'r', 'e', 'd', ' ', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i',
- 'n', 'g', ':', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '#', '1', '{', 'd', 'e', 'c', 'o',
- 'd', 'e', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 'd', 'e', 'c', 'o', 'd', 'e', ':', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '#',
- '1', '<', '1', '>', '(', '@', ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a',
- 'l', ' ', '_', '_', 'n', 'o', '_', 'h', 'e', 'a', 'd', 'e', 'r', ' ', 'N', 'C', 'B',
- 'I', ':', 'i', 's', 'a', 'm', 'p', '1', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', '_', '4', '5', '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'S',
- 'I', 'G', 'N', 'A', 'L', '#', '1', '{', 'd', 'e', 'c', 'o', 'd', 'e', '{', 'r', 'e',
- 't', 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'd', 'e', 'c',
- 'o', 'd', 'e', ':', 'S', 'I', 'G', 'N', 'A', 'L', '#', '1', '<', '1', '>', '(', '@',
- ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', '_', '_', 'n', 'o',
- '_', 'h', 'e', 'a', 'd', 'e', 'r', ' ', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a',
- ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g',
- ':', 'R', 'E', 'A', 'D', '#', '1', '{', 'd', 'e', 'c', 'o', 'd', 'e', '{', 'r', 'e',
- 't', 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'd', 'e', 'c',
- 'o', 'd', 'e', ':', 'R', 'E', 'A', 'D', '#', '1', '<', '2', '>', '(', '@', ')', ';',
- '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', '_', '_', 'n', 'o', '_', 'h',
- 'e', 'a', 'd', 'e', 'r', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'r', 'o',
- 't', 'a', 't', 'e', 'd', '_', 'q', 'u', 'a', 'l', '4', ' ', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'e', 'n', 'c', 'o',
- 'd', 'i', 'n', 'g', ':', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '#', '1', '{', 'd', 'e',
- 'c', 'o', 'd', 'e', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'd', 'e', 'c', 'o', 'd', 'e', ':', 'Q', 'U', 'A', 'L', 'I', 'T',
- 'Y', '#', '1', '<', '2', '>', '(', '@', ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i',
- 'c', 'a', 'l', ' ', '_', '_', 'n', 'o', '_', 'h', 'e', 'a', 'd', 'e', 'r', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p', 'h', 'r', 'e',
- 'd', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i',
- 'n', 'a', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'Q', 'U', 'A', 'L', 'I',
- 'T', 'Y', '2', '#', '1', '{', 'd', 'e', 'c', 'o', 'd', 'e', '{', 'r', 'e', 't', 'u',
- 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'd', 'e', 'c', 'o', 'd',
- 'e', ':', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '#', '1', '<', '2', '>', '(', '@', ')',
- ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', '_', '_', 'n', 'o', '_',
- 'h', 'e', 'a', 'd', 'e', 'r', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'r',
- 'o', 't', 'a', 't', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p', '4', ' ', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'e', 'n',
- 'c', 'o', 'd', 'i', 'n', 'g', ':', 'S', 'I', 'G', 'N', 'A', 'L', '#', '1', '{', 'd',
- 'e', 'c', 'o', 'd', 'e', '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 'd', 'e', 'c', 'o', 'd', 'e', ':', 'S', 'I', 'G', 'N', 'A',
- 'L', '#', '1', '<', '2', '>', '(', '@', ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i',
- 'c', 'a', 'l', ' ', '_', '_', 'n', 'o', '_', 'h', 'e', 'a', 'd', 'e', 'r', ' ', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'r', 'o', 't', 'a', 't', 'e', 'd', '_', 'f',
- 's', 'a', 'm', 'p', '4', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l',
- 'l', 'u', 'm', 'i', 'n', 'a', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'I',
- 'N', 'T', 'E', 'N', 'S', 'I', 'T', 'Y', '#', '1', '{', 'd', 'e', 'c', 'o', 'd', 'e',
- '{', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'd', 'e', 'c', 'o', 'd', 'e', ':', 'I', 'N', 'T', 'E', 'N', 'S', 'I', 'T', 'Y', '#',
- '1', '(', '@', ')', ';', '}', '}', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', '_',
- '_', 'n', 'o', '_', 'h', 'e', 'a', 'd', 'e', 'r', ' ', 'N', 'C', 'B', 'I', ':', 'f',
- 's', 'a', 'm', 'p', '4', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l',
- 'l', 'u', 'm', 'i', 'n', 'a', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'N',
- 'O', 'I', 'S', 'E', '#', '1', '{', 'd', 'e', 'c', 'o', 'd', 'e', '{', 'r', 'e', 't',
- 'u', 'r', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'd', 'e', 'c', 'o',
- 'd', 'e', ':', 'N', 'O', 'I', 'S', 'E', '#', '1', '(', '@', ')', ';', '}', '}', 't',
- 'a', 'b', 'l', 'e', ' ', 'I', 'N', 'S', 'D', 'C', ':', 't', 'b', 'l', ':', 's', 'e',
- 'q', 'u', 'e', 'n', 'c', 'e', '#', '1', '.', '0', '.', '1', '{', 'd', 'e', 'f', 'a',
- 'u', 'l', 't', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':',
- 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'R', 'E', 'A', 'D', '{', 'r', 'e', 'a',
- 'd', '=', 'o', 'u', 't', '_', 'd', 'n', 'a', '_', 't', 'e', 'x', 't', ';', 'v', 'a',
- 'l', 'i', 'd', 'a', 't', 'e', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a',
- ':', 't', 'e', 'x', 't', '>', 'c', 'o', 'm', 'p', 'a', 'r', 'e', '#', '1', '(', 'i',
- 'n', '_', 'd', 'n', 'a', '_', 't', 'e', 'x', 't', ',', 'o', 'u', 't', '_', 'd', 'n',
- 'a', '_', 't', 'e', 'x', 't', ')', ';', '}', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'b', 'i', 'n', ' ', 'R', 'E', 'A', 'D',
- ' ', '=', ' ', 'o', 'u', 't', '_', '4', 'n', 'a', '_', 'b', 'i', 'n', ';', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'p', 'a',
- 'c', 'k', 'e', 'd', ' ', 'R', 'E', 'A', 'D', ' ', '=', ' ', 'o', 'u', 't', '_', '4',
- 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e', 'd', ';', 'c', 'o', 'l', 'u', 'm', 'n', ' ',
- 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n', ' ', 'R', 'E',
- 'A', 'D', ' ', '=', ' ', 'o', 'u', 't', '_', 'x', '2', 'n', 'a', '_', 'b', 'i', 'n',
- ';', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a',
- ':', 'b', 'i', 'n', ' ', 'R', 'E', 'A', 'D', ' ', '=', ' ', 'o', 'u', 't', '_', '2',
- 'n', 'a', '_', 'b', 'i', 'n', ';', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S',
- 'D', 'C', ':', '2', 'n', 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ', 'R', 'E', 'A',
- 'D', ' ', '=', ' ', 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e',
- 'd', ';', 'd', 'e', 'f', 'a', 'u', 'l', 't', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ',
- 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'l', 'o', 'r', ':', 't', 'e', 'x', 't', ' ',
- 'C', 'S', 'R', 'E', 'A', 'D', '{', 'r', 'e', 'a', 'd', '=', 'o', 'u', 't', '_', 'c',
- 'o', 'l', 'o', 'r', '_', 't', 'e', 'x', 't', ';', 'v', 'a', 'l', 'i', 'd', 'a', 't',
- 'e', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'l', 'o', 'r', ':', 't', 'e',
- 'x', 't', '>', 'c', 'o', 'm', 'p', 'a', 'r', 'e', '#', '1', '(', 'i', 'n', '_', 'c',
- 'o', 'l', 'o', 'r', '_', 't', 'e', 'x', 't', ',', 'o', 'u', 't', '_', 'c', 'o', 'l',
- 'o', 'r', '_', 't', 'e', 'x', 't', ')', ';', '}', 'c', 'o', 'l', 'u', 'm', 'n', ' ',
- 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's', ':', 'b', 'i', 'n', ' ', 'C', 'S',
- 'R', 'E', 'A', 'D', ' ', '=', ' ', 'o', 'u', 't', '_', 'x', '2', 'c', 's', '_', 'b',
- 'i', 'n', ';', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', '2',
- 'c', 's', ':', 'b', 'i', 'n', ' ', 'C', 'S', 'R', 'E', 'A', 'D', ' ', '=', ' ', 'o',
- 'u', 't', '_', '2', 'c', 's', '_', 'b', 'i', 'n', ';', 'c', 'o', 'l', 'u', 'm', 'n',
- ' ', 'I', 'N', 'S', 'D', 'C', ':', '2', 'c', 's', ':', 'p', 'a', 'c', 'k', 'e', 'd',
- ' ', 'C', 'S', 'R', 'E', 'A', 'D', ' ', '=', ' ', 'o', 'u', 't', '_', '2', 'c', 's',
- '_', 'p', 'a', 'c', 'k', 'e', 'd', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ',
- 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'b', 'o', 'o', 'l', ' ', 'C', 'S', '_', 'N', 'A',
- 'T', 'I', 'V', 'E', ' ', '=', ' ', 'c', 's', '_', 'n', 'a', 't', 'i', 'v', 'e', ';',
- 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':',
- 't', 'e', 'x', 't', ' ', 'C', 'S', '_', 'K', 'E', 'Y', '{', 'r', 'e', 'a', 'd', '=',
- 'o', 'u', 't', '_', 'c', 's', '_', 'k', 'e', 'y', ';', 'v', 'a', 'l', 'i', 'd', 'a',
- 't', 'e', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x',
- 't', '>', 'c', 'o', 'm', 'p', 'a', 'r', 'e', '#', '1', '(', 'i', 'n', '_', 'c', 's',
- '_', 'k', 'e', 'y', ',', 'o', 'u', 't', '_', 'c', 's', '_', 'k', 'e', 'y', ')', ';',
- '}', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'U', '8', ' ', 'C', 'O', 'L', 'O', 'R', '_',
- 'M', 'A', 'T', 'R', 'I', 'X', ' ', '=', ' ', 'o', 'u', 't', '_', 'c', 'o', 'l', 'o',
- 'r', '_', 'm', 'a', 't', 'r', 'i', 'x', ';', 'd', 'e', 'f', 'a', 'u', 'l', 't', ' ',
- 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l',
- 'i', 't', 'y', ':', 'p', 'h', 'r', 'e', 'd', ' ', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y',
- ' ', '=', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'p', 'h', 'r', 'e', 'd',
- ';', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a',
- 'l', 'i', 't', 'y', ':', 't', 'e', 'x', 't', ':', 'p', 'h', 'r', 'e', 'd', '_', '3',
- '3', ' ', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ' ', '=', ' ', 'o', 'u', 't', '_', 'q',
- 'u', 'a', 'l', '_', 't', 'e', 'x', 't', '_', 'p', 'h', 'r', 'e', 'd', '_', '3', '3',
- '|', '(', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 't',
- 'e', 'x', 't', ':', 'p', 'h', 'r', 'e', 'd', '_', '3', '3', ')', '<', 'B', '8', '>',
- 's', 'u', 'm', '#', '1', '<', '3', '3', '>', '(', 'o', 'u', 't', '_', 'q', 'u', 'a',
- 'l', '_', 'p', 'h', 'r', 'e', 'd', ')', ';', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 't', 'e', 'x', 't',
- ':', 'p', 'h', 'r', 'e', 'd', '_', '6', '4', ' ', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y',
- ' ', '=', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 't', 'e', 'x', 't', '_',
- 'p', 'h', 'r', 'e', 'd', '_', '6', '4', '|', '(', 'I', 'N', 'S', 'D', 'C', ':', 'q',
- 'u', 'a', 'l', 'i', 't', 'y', ':', 't', 'e', 'x', 't', ':', 'p', 'h', 'r', 'e', 'd',
- '_', '6', '4', ')', '<', 'B', '8', '>', 's', 'u', 'm', '#', '1', '<', '6', '4', '>',
- '(', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'p', 'h', 'r', 'e', 'd', ')', ';',
- 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 's',
- 'i', 'g', 'n', 'a', 'l', '_', 'l', 'e', 'n', '=', '(', 'I', 'N', 'S', 'D', 'C', ':',
- 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ')', 'r', 'o', 'w', '_', 'l', 'e', 'n',
- '#', '1', '(', 'o', 'u', 't', '_', 's', 'i', 'g', 'n', 'a', 'l', ')', '|', '<', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', '>', 'e', 'c',
- 'h', 'o', '#', '1', '<', '0', '>', '(', ')', ';', '}', 't', 'a', 'b', 'l', 'e', ' ',
- 'I', 'N', 'S', 'D', 'C', ':', 't', 'b', 'l', ':', 'p', 'r', 'o', 't', 'e', 'i', 'n',
- '#', '1', '{', 'd', 'e', 'f', 'a', 'u', 'l', 't', ' ', 'c', 'o', 'l', 'u', 'm', 'n',
- ' ', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'r', 'o', 't', 'e', 'i', 'n', ':', 't', 'e',
- 'x', 't', ' ', 'P', 'R', 'O', 'T', 'E', 'I', 'N', '{', 'r', 'e', 'a', 'd', '=', 'o',
- 'u', 't', '_', 'p', 'r', 'o', 't', 'e', 'i', 'n', '_', 't', 'e', 'x', 't', ';', 'v',
- 'a', 'l', 'i', 'd', 'a', 't', 'e', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'r',
- 'o', 't', 'e', 'i', 'n', ':', 't', 'e', 'x', 't', '>', 'c', 'o', 'm', 'p', 'a', 'r',
- 'e', '#', '1', '(', 'i', 'n', '_', 'p', 'r', 'o', 't', 'e', 'i', 'n', '_', 't', 'e',
- 'x', 't', ',', 'o', 'u', 't', '_', 'p', 'r', 'o', 't', 'e', 'i', 'n', '_', 't', 'e',
- 'x', 't', ')', ';', '}', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C',
- ':', 'a', 'a', ':', 'b', 'i', 'n', ' ', 'P', 'R', 'O', 'T', 'E', 'I', 'N', ' ', '=',
- ' ', 'o', 'u', 't', '_', 'a', 'a', '_', 'b', 'i', 'n', ';', '}', 't', 'a', 'b', 'l',
- 'e', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's',
- 'p', 'o', 't', 'c', 'o', 'o', 'r', 'd', '#', '1', '{', 'd', 'e', 'f', 'a', 'u', 'l',
- 't', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o',
- 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'X', ' ', '=', ' ', 'o', 'u', 't', '_', 'x',
- '_', 'c', 'o', 'o', 'r', 'd', ';', 'd', 'e', 'f', 'a', 'u', 'l', 't', ' ', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'v', 'a', 'l', ' ', 'Y', ' ', '=', ' ', 'o', 'u', 't', '_', 'y', '_', 'c', 'o', 'o',
- 'r', 'd', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm',
- 'n', ' ', 'U', '1', '6', ' ', 'X', ' ', '=', ' ', 'c', 'a', 's', 't', '#', '1', '(',
- 'x', '_', 'c', 'l', 'i', 'p', '_', 'U', '1', '6', ')', ';', 'r', 'e', 'a', 'd', 'o',
- 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'U', '1', '6', ' ', 'Y', ' ',
- '=', ' ', 'c', 'a', 's', 't', '#', '1', '(', 'y', '_', 'c', 'l', 'i', 'p', '_', 'U',
- '1', '6', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v',
- 'a', 'l', ' ', 'x', '_', 'c', 'l', 'i', 'p', '_', 'U', '1', '6', '=', '<', 'I', 'N',
- 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', '>', 'c', 'l', 'i',
- 'p', '#', '1', '<', '0', ',', '6', '5', '5', '3', '5', '>', '(', 'o', 'u', 't', '_',
- 'x', '_', 'c', 'o', 'o', 'r', 'd', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o',
- 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'y', '_', 'c', 'l', 'i', 'p', '_', 'U', '1',
- '6', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a',
- 'l', '>', 'c', 'l', 'i', 'p', '#', '1', '<', '0', ',', '6', '5', '5', '3', '5', '>',
- '(', 'o', 'u', 't', '_', 'y', '_', 'c', 'o', 'o', 'r', 'd', ')', ';', '}', 't', 'a',
- 'b', 'l', 'e', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l',
- ':', 's', 'p', 'o', 't', 'n', 'a', 'm', 'e', '#', '1', '.', '0', '.', '1', '=', 'I',
- 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'p', 'o', 't',
- 'c', 'o', 'o', 'r', 'd', '#', '1', '{', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'a', 's',
- 'c', 'i', 'i', ' ', 'N', 'A', 'M', 'E', ' ', '=', ' ', '_', 'o', 'u', 't', '_', 'n',
- 'a', 'm', 'e', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u',
- 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 's', 'p', 'o', 't',
- '_', 'i', 'd', 's', '_', 'f', 'o', 'u', 'n', 'd', ' ', 'S', 'P', 'O', 'T', '_', 'I',
- 'D', 'S', '_', 'F', 'O', 'U', 'N', 'D', ' ', '=', ' ', 's', 'p', 'o', 't', '_', 'i',
- 'd', 's', '_', 'f', 'o', 'u', 'n', 'd', ';', 'a', 's', 'c', 'i', 'i', ' ', '_', 'o',
- 'u', 't', '_', 'n', 'a', 'm', 'e', '=', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A',
- ':', 'f', 'o', 'r', 'm', 'a', 't', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e',
- '#', '1', '(', 'o', 'u', 't', '_', 'n', 'a', 'm', 'e', '_', 'f', 'm', 't', ',', 'o',
- 'u', 't', '_', 'x', '_', 'c', 'o', 'o', 'r', 'd', ',', 'o', 'u', 't', '_', 'y', '_',
- 'c', 'o', 'o', 'r', 'd', ',', 'o', 'u', 't', '_', 's', 'p', 'o', 't', '_', 'n', 'a',
- 'm', 'e', ')', '|', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'f', 'o', 'r',
- 'm', 'a', 't', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '#', '1', '(', 'o',
- 'u', 't', '_', 'n', 'a', 'm', 'e', '_', 'f', 'm', 't', ',', 'o', 'u', 't', '_', 'x',
- '_', 'c', 'o', 'o', 'r', 'd', ',', 'o', 'u', 't', '_', 'y', '_', 'c', 'o', 'o', 'r',
- 'd', ')', '|', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'f', 'o', 'r', 'm',
- 'a', 't', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '_', 'n', 'o', '_', 'c',
- 'o', 'o', 'r', 'd', '#', '1', '(', 'o', 'u', 't', '_', 'n', 'a', 'm', 'e', '_', 'f',
- 'm', 't', ')', '|', 'o', 'u', 't', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e',
- ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A',
- ':', 't', 'b', 'l', ':', 's', 'p', 'o', 't', 'd', 'e', 's', 'c', '#', '1', '.', '0',
- '.', '2', '=', 'I', 'N', 'S', 'D', 'C', ':', 't', 'b', 'l', ':', 's', 'e', 'q', 'u',
- 'e', 'n', 'c', 'e', '#', '1', '.', '0', '.', '1', '{', 'c', 'o', 'l', 'u', 'm', 'n',
- ' ', 'U', '8', ' ', 'N', 'R', 'E', 'A', 'D', 'S', ' ', '=', ' ', 'o', 'u', 't', '_',
- 'n', 'r', 'e', 'a', 'd', 's', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd',
- ':', 'l', 'e', 'n', ' ', 'S', 'P', 'O', 'T', '_', 'L', 'E', 'N', ' ', '=', ' ', 's',
- 'p', 'o', 't', '_', 'l', 'e', 'n', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ',
- 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'l', 'e', 'n', ' ', 'F', 'I', 'X', 'E', 'D', '_', 'S', 'P', 'O', 'T', '_',
- 'L', 'E', 'N', ' ', '=', ' ', 'f', 'i', 'x', 'e', 'd', '_', 's', 'p', 'o', 't', '_',
- 'l', 'e', 'n', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u',
- 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e',
- 'r', 'o', ' ', 'T', 'R', 'I', 'M', '_', 'S', 'T', 'A', 'R', 'T', ' ', '=', ' ', 't',
- 'r', 'i', 'm', '_', 's', 't', 'a', 'r', 't', '|', '<', 'I', 'N', 'S', 'D', 'C', ':',
- 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', '>', 'e', 'c', 'h', 'o', '#', '1',
- '<', '0', '>', '(', ')', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'o', 'n', 'e', ' ', 'T', 'R', 'I', 'M', '_', 'S', 'T', 'A', 'R', 'T', ' ', '=', ' ',
- '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ')',
- '<', 'I', '3', '2', '>', 's', 'u', 'm', '#', '1', '<', '1', '>', '(', 't', 'r', 'i',
- 'm', '_', 's', 't', 'a', 'r', 't', ')', '|', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c',
- 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '1',
- '>', '(', ')', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u',
- 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e',
- 'n', ' ', 'T', 'R', 'I', 'M', '_', 'L', 'E', 'N', ' ', '=', ' ', 't', 'r', 'i', 'm',
- '_', 'l', 'e', 'n', '|', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', ';', 'c', 'o', 'l',
- 'u', 'm', 'n', ' ', 'a', 's', 'c', 'i', 'i', ' ', 'L', 'A', 'B', 'E', 'L', ' ', '=',
- ' ', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', ';', 'c', 'o', 'l', 'u', 'm', 'n',
- ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o',
- ' ', 'L', 'A', 'B', 'E', 'L', '_', 'S', 'T', 'A', 'R', 'T', ' ', '=', ' ', 'o', 'u',
- 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 's', 't', 'a', 'r', 't', ';', 'c', 'o', 'l',
- 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l',
- 'e', 'n', ' ', 'L', 'A', 'B', 'E', 'L', '_', 'L', 'E', 'N', ' ', '=', ' ', 'o', 'u',
- 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 'l', 'e', 'n', ';', 'r', 'e', 'a', 'd', 'o',
- 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'U', '1', '6', ' ', 'L', 'A',
- 'B', 'E', 'L', '_', 'S', 'T', 'A', 'R', 'T', ' ', '=', ' ', 'c', 'a', 's', 't', '#',
- '1', '(', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 's', 't', 'a', 'r', 't',
- ')', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n',
- ' ', 'U', '1', '6', ' ', 'L', 'A', 'B', 'E', 'L', '_', 'L', 'E', 'N', ' ', '=', ' ',
- 'c', 'a', 's', 't', '#', '1', '(', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '_',
- 'l', 'e', 'n', ')', ';', 'd', 'e', 'f', 'a', 'u', 'l', 't', ' ', 'c', 'o', 'l', 'u',
- 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'x', 'r', 'e', 'a',
- 'd', '_', 't', 'y', 'p', 'e', ' ', 'R', 'E', 'A', 'D', '_', 'T', 'Y', 'P', 'E', ' ',
- '=', ' ', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ';', 'r',
- 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N',
- 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e',
- ' ', 'R', 'E', 'A', 'D', '_', 'T', 'Y', 'P', 'E', ' ', '=', ' ', 'o', 'u', 't', '_',
- 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', '|', '<', 'I', 'N', 'S', 'D', 'C', ':',
- 'S', 'R', 'A', ':', 'x', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ',', 'I', 'N',
- 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e',
- '>', 'm', 'a', 'p', '#', '1', '<', '[', '0', ',', '1', ',', '2', ',', '3', ',', '4',
- ',', '5', ',', '6', ',', '7', ']', ',', '[', '0', ',', '1', ',', '0', ',', '1', ',',
- '0', ',', '1', ',', '0', ',', '1', ']', '>', '(', 'o', 'u', 't', '_', 'r', 'e', 'a',
- 'd', '_', 't', 'y', 'p', 'e', ')', ';', 'd', 'e', 'f', 'a', 'u', 'l', 't', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd',
- ':', 'z', 'e', 'r', 'o', ' ', 'R', 'E', 'A', 'D', '_', 'S', 'T', 'A', 'R', 'T', ' ',
- '=', ' ', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', ';',
- 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'o', 'n', 'e', ' ', 'R', 'E', 'A', 'D', '_', 'S', 'T', 'A', 'R', 'T', ' ',
- '=', ' ', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n',
- 'e', ')', '<', 'I', '3', '2', '>', 's', 'u', 'm', '#', '1', '<', '1', '>', '(', 'o',
- 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', ')', ';', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'l', 'e', 'n', ' ', 'R', 'E', 'A', 'D', '_', 'L', 'E', 'N', ' ', '=', ' ', 'o', 'u',
- 't', '_', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ';', 'r', 'e', 'a', 'd', 'o', 'n',
- 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'U', '1', '6', ' ', 'R', 'E', 'A',
- 'D', '_', 'S', 'T', 'A', 'R', 'T', ' ', '=', ' ', 'c', 'a', 's', 't', '#', '1', '(',
- 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', ')', ';', 'r',
- 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'U', '1',
- '6', ' ', 'R', 'E', 'A', 'D', '_', 'L', 'E', 'N', ' ', '=', ' ', 'c', 'a', 's', 't',
- '#', '1', '(', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ')', ';',
- 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':',
- 'r', 'e', 'a', 'd', '_', 'f', 'i', 'l', 't', 'e', 'r', ' ', 'R', 'E', 'A', 'D', '_',
- 'F', 'I', 'L', 'T', 'E', 'R', ' ', '=', ' ', 'o', 'u', 't', '_', 'r', 'd', '_', 'f',
- 'i', 'l', 't', 'e', 'r', '|', '<', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':',
- 'r', 'e', 'a', 'd', '_', 'f', 'i', 'l', 't', 'e', 'r', '>', 'e', 'c', 'h', 'o', '#',
- '1', '<', '0', '>', '(', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's', 't', 'a',
- 'r', 't', ')', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u',
- 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd',
- '_', 'f', 'i', 'l', 't', 'e', 'r', ' ', 'R', 'D', '_', 'F', 'I', 'L', 'T', 'E', 'R',
- ' ', '=', ' ', 'o', 'u', 't', '_', 'r', 'd', '_', 'f', 'i', 'l', 't', 'e', 'r', ';',
- 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'x', 'r', 'e', 'a', 'd', '_', 't',
- 'y', 'p', 'e', ' ', 'i', 'n', '_', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', '=',
- 'R', 'E', 'A', 'D', '_', 'T', 'Y', 'P', 'E', '|', '_', 'a', 'l', 't', '_', 'i', 'n',
- '_', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ';', 'I', 'N', 'S', 'D', 'C', ':',
- 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 'i', 'n', '_', 'r', 'e', 'a', 'd',
- '_', 'l', 'e', 'n', '=', 'R', 'E', 'A', 'D', '_', 'L', 'E', 'N', '|', '_', 'a', 'l',
- 't', '_', 'i', 'n', '_', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ';', 'I', 'N', 'S',
- 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 's', 'p', 'o', 't',
- '_', 'l', 'e', 'n', '=', 'b', 'a', 's', 'e', '_', 's', 'p', 'a', 'c', 'e', '_', 's',
- 'p', 'o', 't', '_', 'l', 'e', 'n', '|', 'c', 'o', 'l', 'o', 'r', '_', 's', 'p', 'a',
- 'c', 'e', '_', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', '|', 'a', 'l', 'i', 'g', 'n',
- '_', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c',
- 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 'f', 'i', 'x', 'e', 'd', '_', 's', 'p',
- 'o', 't', '_', 'l', 'e', 'n', '=', 's', 't', 'a', 't', 'i', 'c', '_', 'f', 'i', 'x',
- 'e', 'd', '_', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', '|', 'b', 'a', 's', 'e', '_',
- 's', 'p', 'a', 'c', 'e', '_', 'f', 'i', 'x', 'e', 'd', '_', 's', 'p', 'o', 't', '_',
- 'l', 'e', 'n', '|', 'c', 'o', 'l', 'o', 'r', '_', 's', 'p', 'a', 'c', 'e', '_', 'f',
- 'i', 'x', 'e', 'd', '_', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', ';', '}', 't', 'a',
- 'b', 'l', 'e', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l',
- ':', 's', 't', 'a', 't', 's', '#', '1', '.', '1', '{', 'r', 'e', 'a', 'd', 'o', 'n',
- 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S',
- 'R', 'A', ':', 's', 'p', 'o', 't', 'i', 'd', '_', 't', ' ', 'M', 'I', 'N', '_', 'S',
- 'P', 'O', 'T', '_', 'I', 'D', ' ', '=', ' ', 'm', 'i', 'n', '_', 's', 'p', 'o', 't',
- '_', 'i', 'd', '|', '<', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 's', 'p',
- 'o', 't', 'i', 'd', '_', 't', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '1', '>', '(',
- ')', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n',
- ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 's', 'p', 'o', 't', 'i', 'd',
- '_', 't', ' ', 'M', 'A', 'X', '_', 'S', 'P', 'O', 'T', '_', 'I', 'D', ' ', '=', ' ',
- 'm', 'a', 'x', '_', 's', 'p', 'o', 't', '_', 'i', 'd', '|', 'c', 'a', 's', 't', '#',
- '1', '(', 's', 'p', 'o', 't', '_', 'c', 'o', 'u', 'n', 't', ')', ';', 'r', 'e', 'a',
- 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'U', '6', '4', ' ',
- 'S', 'P', 'O', 'T', '_', 'C', 'O', 'U', 'N', 'T', ' ', '=', ' ', 's', 'p', 'o', 't',
- '_', 'c', 'o', 'u', 'n', 't', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', 'U', '6', '4', ' ', 'B', 'A', 'S', 'E', '_', 'C', 'O',
- 'U', 'N', 'T', ' ', '=', ' ', 'b', 'a', 's', 'e', '_', 'c', 'o', 'u', 'n', 't', ';',
- 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'U',
- '6', '4', ' ', 'B', 'I', 'O', '_', 'B', 'A', 'S', 'E', '_', 'C', 'O', 'U', 'N', 'T',
- ' ', '=', ' ', 'b', 'i', 'o', '_', 'b', 'a', 's', 'e', '_', 'c', 'o', 'u', 'n', 't',
- ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ',
- 'U', '6', '4', ' ', 'C', 'M', 'P', '_', 'B', 'A', 'S', 'E', '_', 'C', 'O', 'U', 'N',
- 'T', ' ', '=', ' ', 'c', 'm', 'p', '_', 'b', 'a', 's', 'e', '_', 'c', 'o', 'u', 'n',
- 't', '|', 'b', 'a', 's', 'e', '_', 'c', 'o', 'u', 'n', 't', ';', 'U', '8', ' ', 's',
- 't', 'a', 't', 's', '_', 'd', 'u', 'm', 'm', 'y', '=', 'i', 'n', '_', 's', 't', 'a',
- 't', 's', '_', 'b', 'i', 'n', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'I', 'N', 'S',
- 'D', 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'r', 'a', '#', '1', '.',
- '0', '.', '3', '=', 'I', 'N', 'S', 'D', 'C', ':', 't', 'b', 'l', ':', 's', 'e', 'q',
- 'u', 'e', 'n', 'c', 'e', '#', '1', '.', '0', '.', '1', ',', 'I', 'N', 'S', 'D', 'C',
- ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'p', 'o', 't', 'n', 'a', 'm', 'e',
- '#', '1', '.', '0', '.', '1', ',', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':',
- 't', 'b', 'l', ':', 's', 'p', 'o', 't', 'd', 'e', 's', 'c', '#', '1', '.', '0', '.',
- '2', ',', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's',
- 't', 'a', 't', 's', '#', '1', '.', '1', '{', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm',
- '_', 'i', 'd', ' ', 'P', 'L', 'A', 'T', 'F', 'O', 'R', 'M', ' ', '=', ' ', '.', 'P',
- 'L', 'A', 'T', 'F', 'O', 'R', 'M', '|', 'o', 'u', 't', '_', 'p', 'l', 'a', 't', 'f',
- 'o', 'r', 'm', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u',
- 'm', 'n', ' ', 'a', 's', 'c', 'i', 'i', ' ', 'P', 'L', 'A', 'T', 'F', 'O', 'R', 'M',
- ' ', '=', ' ', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'n', 'a', 'm', 'e', ';',
- 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':',
- 's', 'p', 'o', 't', 'i', 'd', '_', 't', ' ', 'S', 'P', 'O', 'T', '_', 'I', 'D', ' ',
- '=', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 's', 'p', 'o', 't',
- 'i', 'd', '_', 't', '>', 'a', 'd', 'd', '_', 'r', 'o', 'w', '_', 'i', 'd', '#', '1',
- '(', '.', 'S', 'P', 'O', 'T', '_', 'I', 'D', ')', '|', 'c', 'a', 's', 't', '#', '1',
- '(', 'r', 'o', 'w', 'i', 'd', '_', '6', '4', ')', ';', 'c', 'o', 'l', 'u', 'm', 'n',
- ' ', 'a', 's', 'c', 'i', 'i', ' ', 'S', 'P', 'O', 'T', '_', 'G', 'R', 'O', 'U', 'P',
- ' ', '=', ' ', 'o', 'u', 't', '_', 's', 'p', 'o', 't', '_', 'g', 'r', 'o', 'u', 'p',
- '|', '.', 'S', 'P', 'O', 'T', '_', 'G', 'R', 'O', 'U', 'P', '|', '<', 'a', 's', 'c',
- 'i', 'i', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '\'', '\'', '>', '(', ')', ';',
- 'I', '6', '4', ' ', 'r', 'o', 'w', 'i', 'd', '_', '6', '4', '=', 'r', 'o', 'w', '_',
- 'i', 'd', '#', '1', '(', ')', ';', 'a', 's', 'c', 'i', 'i', ' ', 'i', 'n', '_', 's',
- 'p', 'o', 't', '_', 'g', 'r', 'o', 'u', 'p', '=', 'S', 'P', 'O', 'T', '_', 'G', 'R',
- 'O', 'U', 'P', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u',
- 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l', 'a',
- 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', '>', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o',
- 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'P', 'L', 'A', 'T', 'F', 'O', 'R', 'M', '=',
- 'P', 'L', 'A', 'T', 'F', 'O', 'R', 'M', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l',
- ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R',
- 'A', ':', 's', 'p', 'o', 't', 'i', 'd', '_', 't', '>', 'i', 'z', 'i', 'p', '_', 'e',
- 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'S', 'P', 'O', 'T', '_', 'I',
- 'D', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 's', 'p', 'o', 't',
- 'i', 'd', '_', 't', '>', 's', 'u', 'b', '_', 'r', 'o', 'w', '_', 'i', 'd', '#', '1',
- '(', 'S', 'P', 'O', 'T', '_', 'I', 'D', ')', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a',
- 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'a', 's', 'c', 'i', 'i', '>', 'z',
- 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', '<', '0', ',', '1',
- '>', ' ', '.', 'S', 'P', 'O', 'T', '_', 'G', 'R', 'O', 'U', 'P', '=', 'i', 'n', '_',
- 's', 'p', 'o', 't', '_', 'g', 'r', 'o', 'u', 'p', ';', '}', 't', 'a', 'b', 'l', 'e',
- ' ', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'n', '_', 'e', 'n', 'c', 'o', 'd',
- 'i', 'n', 'g', '#', '1', '{', 'U', '8', ' ', 'n', '_', 'e', 'n', 'c', 'o', 'd', 'i',
- 'n', 'g', '_', 'd', 'u', 'm', 'm', 'y', '=', 'r', 'e', 'a', 'd', '_', 'u', 'n', 'p',
- 'a', 'c', 'k', '|', 'r', 'e', 'a', 'd', '_', 'n', 'd', 'e', 'c', 'o', 'd', 'e', ';',
- '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 's',
- 'e', 'q', 'l', 'o', 'c', '#', '1', '{', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'a',
- 's', 'c', 'i', 'i', '>', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g',
- '#', '1', ' ', 'S', 'E', 'Q', '_', 'I', 'D', ';', 'c', 'o', 'l', 'u', 'm', 'n', ' ',
- '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', '>',
- 'i', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', 'S',
- 'E', 'Q', '_', 'S', 'T', 'A', 'R', 'T', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y',
- ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o',
- 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'S', 'E', 'Q', '_', 'S', 'T', 'A', 'R', 'T',
- ' ', '=', ' ', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z',
- 'e', 'r', 'o', ')', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'o', 'n', 'e', '>', 'd', 'i', 'f', 'f', '#', '1', '<', '1', '>', '(', '.', 'S', 'E',
- 'Q', '_', 'S', 'T', 'A', 'R', 'T', ')', ';', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<',
- 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', '>', 'i',
- 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', 'S', 'E',
- 'Q', '_', 'L', 'E', 'N', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I',
- ':', 't', 'b', 'l', ':', 'd', 'c', 'm', 'p', '_', 'b', 'a', 's', 'e', '_', 's', 'p',
- 'a', 'c', 'e', '#', '1', '{', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't',
- 'e', 'x', 't', ' ', 'd', 'c', 'm', 'p', '_', 'v', 'i', 'r', 't', 'u', 'a', 'l', '_',
- 'p', 'r', 'o', 'd', 'u', 'c', 't', 'i', 'o', 'n', 's', '=', 'o', 'u', 't', '_', 'd',
- 'c', 'm', 'p', '_', '4', 'n', 'a', '_', 'b', 'i', 'n', '|', 'o', 'u', 't', '_', 'd',
- 'c', 'm', 'p', '_', 'x', '2', 'n', 'a', '_', 'b', 'i', 'n', '|', 'o', 'u', 't', '_',
- 'd', 'c', 'm', 'p', '_', '2', 'n', 'a', '_', 'b', 'i', 'n', '|', 'o', 'u', 't', '_',
- 'd', 'c', 'm', 'p', '_', '2', 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e', 'd', ';', '}',
- 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'b', 'a',
- 's', 'e', '_', 's', 'p', 'a', 'c', 'e', '_', 'c', 'o', 'm', 'm', 'o', 'n', '#', '1',
- '.', '0', '.', '3', '=', 'I', 'N', 'S', 'D', 'C', ':', 't', 'b', 'l', ':', 's', 'e',
- 'q', 'u', 'e', 'n', 'c', 'e', '#', '1', '.', '0', '.', '1', ',', 'I', 'N', 'S', 'D',
- 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'p', 'o', 't', 'd', 'e', 's',
- 'c', '#', '1', '.', '0', '.', '2', ',', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A',
- ':', 't', 'b', 'l', ':', 's', 't', 'a', 't', 's', '#', '1', '.', '1', ',', 'N', 'C',
- 'B', 'I', ':', 't', 'b', 'l', ':', 'd', 'c', 'm', 'p', '_', 'b', 'a', 's', 'e', '_',
- 's', 'p', 'a', 'c', 'e', '#', '1', '{', 'b', 'o', 'o', 'l', ' ', 'c', 's', '_', 'n',
- 'a', 't', 'i', 'v', 'e', '=', '<', 'b', 'o', 'o', 'l', '>', 'e', 'c', 'h', 'o', '#',
- '1', '<', 'f', 'a', 'l', 's', 'e', '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':',
- 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'o', 'u', 't', '_', 'c', 's', '_', 'k',
- 'e', 'y', '=', '.', 'C', 'S', '_', 'K', 'E', 'Y', '|', '<', 'I', 'N', 'S', 'D', 'C',
- ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', '>', 'e', 'c', 'h', 'o', '#', '1', '<',
- '\'', 'T', '\'', '>', '(', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 't', 'y',
- 'p', 'e', ')', '|', '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e',
- 'x', 't', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '\'', 'T', '\'', '>', '(', 'o',
- 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ')', '|', '<', 'I', 'N', 'S',
- 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', '>', 'e', 'c', 'h', 'o', '#',
- '1', '<', '\'', 'T', '\'', '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '2',
- 'c', 's', ':', 'b', 'i', 'n', ' ', 'o', 'u', 't', '_', '2', 'c', 's', '_', 'b', 'i',
- 'n', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's', ':', 'b', 'i', 'n',
- ',', 'I', 'N', 'S', 'D', 'C', ':', '2', 'c', 's', ':', 'b', 'i', 'n', '>', 'm', 'a',
- 'p', '#', '1', '<', '[', '0', ',', '1', ',', '2', ',', '3', ',', '4', ']', ',', '[',
- '0', ',', '1', ',', '2', ',', '3', ',', '0', ']', '>', '(', 'o', 'u', 't', '_', 'x',
- '2', 'c', 's', '_', 'b', 'i', 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n',
- 'a', ':', 'b', 'i', 'n', ' ', 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'b', 'i', 'n',
- '=', 'o', 'u', 't', '_', 'd', 'c', 'm', 'p', '_', '2', 'n', 'a', '_', 'b', 'i', 'n',
- '|', '(', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'b', 'i', 'n', ')', 'u',
- 'n', 'p', 'a', 'c', 'k', '#', '1', '(', 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'p',
- 'a', 'c', 'k', 'e', 'd', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's',
- ':', 'b', 'i', 'n', ' ', 'o', 'u', 't', '_', 'x', '2', 'c', 's', '_', 'b', 'i', 'n',
- '=', 'N', 'C', 'B', 'I', ':', 'c', 'o', 'l', 'o', 'r', '_', 'f', 'r', 'o', 'm', '_',
- 'd', 'n', 'a', '#', '1', '(', 'o', 'u', 't', '_', 'x', '2', 'n', 'a', '_', 'b', 'i',
- 'n', ',', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', ',',
- 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ',', 'o', 'u', 't', '_',
- 'c', 's', '_', 'k', 'e', 'y', ',', 'o', 'u', 't', '_', 'c', 'o', 'l', 'o', 'r', '_',
- 'm', 'a', 't', 'r', 'i', 'x', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '2', 'c', 's',
- ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ', 'o', 'u', 't', '_', '2', 'c', 's', '_', 'p',
- 'a', 'c', 'k', 'e', 'd', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', '2', 'c', 's', ':',
- 'p', 'a', 'c', 'k', 'e', 'd', ')', 'p', 'a', 'c', 'k', '#', '1', '(', 'o', 'u', 't',
- '_', '2', 'c', 's', '_', 'b', 'i', 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '4',
- 'n', 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ', 'o', 'u', 't', '_', '4', 'n', 'a',
- '_', 'p', 'a', 'c', 'k', 'e', 'd', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n',
- 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd', ')', 'p', 'a', 'c', 'k', '#', '1', '(', 'o',
- 'u', 't', '_', '4', 'n', 'a', '_', 'b', 'i', 'n', ')', ';', 'I', 'N', 'S', 'D', 'C',
- ':', 'c', 'o', 'l', 'o', 'r', ':', 't', 'e', 'x', 't', ' ', 'o', 'u', 't', '_', 'c',
- 'o', 'l', 'o', 'r', '_', 't', 'e', 'x', 't', '=', '<', 'I', 'N', 'S', 'D', 'C', ':',
- 'x', '2', 'c', 's', ':', 'b', 'i', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o',
- 'l', 'o', 'r', ':', 't', 'e', 'x', 't', '>', 'm', 'a', 'p', '#', '1', '<', '[', '0',
- ',', '1', ',', '2', ',', '3', ',', '4', ']', ',', '\'', '0', '1', '2', '3', '.',
- '\'', '>', '(', 'o', 'u', 't', '_', 'x', '2', 'c', 's', '_', 'b', 'i', 'n', ')',
- ';', 'U', '8', ' ', 'o', 'u', 't', '_', 'c', 'o', 'l', 'o', 'r', '_', 'm', 'a', 't',
- 'r', 'i', 'x', '=', '<', 'U', '8', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '[', '0',
- ',', '1', ',', '2', ',', '3', ',', '4', ',', '1', ',', '0', ',', '3', ',', '2', ',',
- '4', ',', '2', ',', '3', ',', '0', ',', '1', ',', '4', ',', '3', ',', '2', ',', '1',
- ',', '0', ',', '4', ',', '4', ',', '4', ',', '4', ',', '4', ',', '4', ']', '>', '(',
- ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n',
- ' ', 'b', 'a', 's', 'e', '_', 's', 'p', 'a', 'c', 'e', '_', 's', 'p', 'o', 't', '_',
- 'l', 'e', 'n', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'l', 'e', 'n', ')', 'r', 'o', 'w', '_', 'l', 'e', 'n', '#', '1', '(', 'o', 'u', 't',
- '_', '2', 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e', 'd', ')', ';', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 'b', 'a', 's', 'e', '_',
- 's', 'p', 'a', 'c', 'e', '_', 'f', 'i', 'x', 'e', 'd', '_', 's', 'p', 'o', 't', '_',
- 'l', 'e', 'n', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'l', 'e', 'n', ')', 'f', 'i', 'x', 'e', 'd', '_', 'r', 'o', 'w', '_', 'l', 'e', 'n',
- '#', '1', '(', 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e', 'd',
- ')', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l',
- ':', 'b', 'a', 's', 'e', '_', 's', 'p', 'a', 'c', 'e', '_', 'n', 'o', 'c', 'o', 'l',
- '#', '1', '.', '0', '.', '3', '=', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'b',
- 'a', 's', 'e', '_', 's', 'p', 'a', 'c', 'e', '_', 'c', 'o', 'm', 'm', 'o', 'n', '#',
- '1', '.', '0', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'n', '_',
- 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', '{', 'I', 'N', 'S', 'D', 'C', ':',
- 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'o', 'u', 't', '_', 'd', 'n', 'a', '_',
- 't', 'e', 'x', 't', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':',
- 'b', 'i', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x',
- 't', '>', 'm', 'a', 'p', '#', '1', '<', '[', '0', ',', '1', ',', '2', ',', '3', ',',
- '4', ']', ',', '\'', 'A', 'C', 'G', 'T', 'N', '\'', '>', '(', 'o', 'u', 't', '_',
- 'x', '2', 'n', 'a', '_', 'b', 'i', 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '4',
- 'n', 'a', ':', 'b', 'i', 'n', ' ', 'o', 'u', 't', '_', '4', 'n', 'a', '_', 'b', 'i',
- 'n', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n',
- ',', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'b', 'i', 'n', '>', 'm', 'a',
- 'p', '#', '1', '<', '[', '0', ',', '1', ',', '2', ',', '3', ',', '4', ']', ',', '[',
- '1', ',', '2', ',', '4', ',', '8', ',', '1', '5', ']', '>', '(', 'o', 'u', 't', '_',
- 'x', '2', 'n', 'a', '_', 'b', 'i', 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'x',
- '2', 'n', 'a', ':', 'b', 'i', 'n', ' ', 'o', 'u', 't', '_', 'x', '2', 'n', 'a', '_',
- 'b', 'i', 'n', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'b',
- 'i', 'n', ')', 'r', 'e', 'a', 'd', '_', 'n', 'd', 'e', 'c', 'o', 'd', 'e', ';', 'U',
- '8', ' ', 'r', 'e', 'a', 'd', '_', 'u', 'n', 'p', 'a', 'c', 'k', '=', 'o', 'u', 't',
- '_', '2', 'n', 'a', '_', 'b', 'i', 'n', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N',
- 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'b', 'a', 's', 'e', '_', 's', 'p', 'a', 'c',
- 'e', '#', '1', '.', '0', '.', '3', '=', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':',
- 'b', 'a', 's', 'e', '_', 's', 'p', 'a', 'c', 'e', '_', 'n', 'o', 'c', 'o', 'l', '#',
- '1', '.', '0', '.', '3', '{', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'p',
- 'a', 'c', 'k', 'e', 'd', ' ', 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'p', 'a', 'c',
- 'k', 'e', 'd', '=', '.', 'R', 'E', 'A', 'D', ';', '}', 't', 'a', 'b', 'l', 'e', ' ',
- 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'b', 'a', 's', 'e', '_', 's', 'p', 'a',
- 'c', 'e', '#', '2', '.', '0', '.', '3', '=', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l',
- ':', 'b', 'a', 's', 'e', '_', 's', 'p', 'a', 'c', 'e', '_', 'c', 'o', 'm', 'm', 'o',
- 'n', '#', '1', '.', '0', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':',
- 'd', 'c', 'm', 'p', '_', 'b', 'a', 's', 'e', '_', 's', 'p', 'a', 'c', 'e', '#', '1',
- '{', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'i',
- 'n', '_', 'd', 'n', 'a', '_', 't', 'e', 'x', 't', '=', '<', 'I', 'N', 'S', 'D', 'C',
- ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ',', 'I', 'N', 'S', 'D', 'C', ':', 'd',
- 'n', 'a', ':', 't', 'e', 'x', 't', '>', 'm', 'a', 'p', '#', '1', '<', '\'', '.',
- 'a', 'c', 'm', 'g', 'r', 's', 'v', 't', 'w', 'y', 'h', 'k', 'd', 'b', 'n', '\'',
- ',', '\'', 'N', 'A', 'C', 'M', 'G', 'R', 'S', 'V', 'T', 'W', 'Y', 'H', 'K', 'D',
- 'B', 'N', '\'', '>', '(', 'R', 'E', 'A', 'D', ')', ';', 'I', 'N', 'S', 'D', 'C',
- ':', '4', 'n', 'a', ':', 'b', 'i', 'n', ' ', 'i', 'n', '_', '4', 'n', 'a', '_', 'b',
- 'i', 'n', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'b', 'i', 'n',
- '>', 'r', 'a', 'n', 'g', 'e', '_', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '#', '1',
- '<', '0', ',', '1', '5', '>', '(', 'R', 'E', 'A', 'D', ')', '|', '(', 'I', 'N', 'S',
- 'D', 'C', ':', '4', 'n', 'a', ':', 'b', 'i', 'n', ')', 'u', 'n', 'p', 'a', 'c', 'k',
- '#', '1', '(', 'i', 'n', '_', '4', 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e', 'd', ')',
- '|', '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ',',
- 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'b', 'i', 'n', '>', 'm', 'a', 'p',
- '#', '1', '<', '\'', '.', 'A', 'C', 'M', 'G', 'R', 'S', 'V', 'T', 'W', 'Y', 'H',
- 'K', 'D', 'B', 'N', '\'', ',', '[', '0', ',', '1', ',', '2', ',', '3', ',', '4',
- ',', '5', ',', '6', ',', '7', ',', '8', ',', '9', ',', '1', '0', ',', '1', '1', ',',
- '1', '2', ',', '1', '3', ',', '1', '4', ',', '1', '5', ']', '>', '(', 'i', 'n', '_',
- 'd', 'n', 'a', '_', 't', 'e', 'x', 't', ')', '|', '<', 'I', 'N', 'S', 'D', 'C', ':',
- 'x', '2', 'n', 'a', ':', 'b', 'i', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n',
- 'a', ':', 'b', 'i', 'n', '>', 'm', 'a', 'p', '#', '1', '<', '[', '0', ',', '1', ',',
- '2', ',', '3', ',', '4', ']', ',', '[', '1', ',', '2', ',', '4', ',', '8', ',', '1',
- '5', ']', '>', '(', 'i', 'n', '_', 'x', '2', 'n', 'a', '_', 'b', 'i', 'n', ')', ';',
- 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ',
- 'i', 'n', '_', '4', 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e', 'd', '=', 'R', 'E', 'A',
- 'D', ';', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n', ' ',
- 'i', 'n', '_', 'x', '2', 'n', 'a', '_', 'b', 'i', 'n', '=', '<', 'I', 'N', 'S', 'D',
- 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n', '>', 'r', 'a', 'n', 'g', 'e', '_',
- 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '#', '1', '<', '0', ',', '4', '>', '(', 'R',
- 'E', 'A', 'D', ')', '|', '<', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'b',
- 'i', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n',
- '>', 'm', 'a', 'p', '#', '1', '<', '[', '0', ',', '1', ',', '2', ',', '3', ',', '4',
- ',', '5', ',', '6', ',', '7', ',', '8', ',', '9', ',', '1', '0', ',', '1', '1', ',',
- '1', '2', ',', '1', '3', ',', '1', '4', ',', '1', '5', ']', ',', '[', '4', ',', '0',
- ',', '1', ',', '4', ',', '2', ',', '4', ',', '4', ',', '4', ',', '3', ',', '4', ',',
- '4', ',', '4', ',', '4', ',', '4', ',', '4', ',', '4', ']', '>', '(', 'i', 'n', '_',
- '4', 'n', 'a', '_', 'b', 'i', 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n',
- 'a', ':', 'b', 'i', 'n', ' ', 'i', 'n', '_', '2', 'n', 'a', '_', 'b', 'i', 'n', '=',
- '<', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'b', 'i', 'n', '>', 'r', 'a',
- 'n', 'g', 'e', '_', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '#', '1', '<', '0', ',',
- '3', '>', '(', 'R', 'E', 'A', 'D', ')', '|', '(', 'I', 'N', 'S', 'D', 'C', ':', '2',
- 'n', 'a', ':', 'b', 'i', 'n', ')', 'u', 'n', 'p', 'a', 'c', 'k', '#', '1', '(', 'i',
- 'n', '_', '2', 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e', 'd', ')', '|', 'I', 'N', 'S',
- 'D', 'C', ':', 'S', 'E', 'Q', ':', 'r', 'a', 'n', 'd', '_', '4', 'n', 'a', '_', '2',
- 'n', 'a', '#', '1', '(', 'i', 'n', '_', '4', 'n', 'a', '_', 'b', 'i', 'n', ')', ';',
- 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ',
- 'i', 'n', '_', '2', 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e', 'd', '=', 'R', 'E', 'A',
- 'D', ';', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'b', 'i', 'n', ' ', 'i',
- 'n', '_', 'a', 'l', 't', '_', '4', 'n', 'a', '_', 'b', 'i', 'n', '=', '<', 'I', 'N',
- 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'b', 'i', 'n', ',', 'I', 'N', 'S', 'D', 'C',
- ':', '4', 'n', 'a', ':', 'b', 'i', 'n', '>', 'm', 'a', 'p', '#', '1', '<', '[', '0',
- ',', '1', ',', '2', ',', '3', ',', '4', ',', '5', ',', '6', ',', '7', ',', '8', ',',
- '9', ',', '1', '0', ',', '1', '1', ',', '1', '2', ',', '1', '3', ',', '1', '4', ',',
- '1', '5', ']', ',', '[', '1', '5', ',', '0', ',', '0', ',', '3', ',', '0', ',', '5',
- ',', '6', ',', '7', ',', '0', ',', '9', ',', '1', '0', ',', '1', '1', ',', '1', '2',
- ',', '1', '3', ',', '1', '4', ',', '1', '5', ']', '>', '(', 'i', 'n', '_', '4', 'n',
- 'a', '_', 'b', 'i', 'n', ')', ';', 'U', '8', ' ', 'i', 'n', '_', 's', 't', 'a', 't',
- 's', '_', 'b', 'i', 'n', '=', 'i', 'n', '_', '2', 'n', 'a', '_', 'b', 'i', 'n', ';',
- 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ',
- 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e', 'd', '=', '.', 'R',
- 'E', 'A', 'D', '|', 'o', 'u', 't', '_', 'd', 'c', 'm', 'p', '_', '2', 'n', 'a', '_',
- 'p', 'a', 'c', 'k', 'e', 'd', ';', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a',
- ':', 'b', 'i', 'n', ' ', 'o', 'u', 't', '_', 'x', '2', 'n', 'a', '_', 'b', 'i', 'n',
- '=', 'o', 'u', 't', '_', 'd', 'c', 'm', 'p', '_', 'x', '2', 'n', 'a', '_', 'b', 'i',
- 'n', '|', '<', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'b', 'i', 'n', ',',
- 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n', '>', 'm', 'a',
- 'p', '#', '1', '<', '[', '0', ',', '1', ',', '2', ',', '3', ',', '4', ',', '5', ',',
- '6', ',', '7', ',', '8', ',', '9', ',', '1', '0', ',', '1', '1', ',', '1', '2', ',',
- '1', '3', ',', '1', '4', ',', '1', '5', ']', ',', '[', '4', ',', '0', ',', '1', ',',
- '4', ',', '2', ',', '4', ',', '4', ',', '4', ',', '3', ',', '4', ',', '4', ',', '4',
- ',', '4', ',', '4', ',', '4', ',', '4', ']', '>', '(', 'o', 'u', 't', '_', '4', 'n',
- 'a', '_', 'b', 'i', 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':',
- 'b', 'i', 'n', ' ', 'o', 'u', 't', '_', '2', 'n', 'a', '_', '4', 'n', 'a', '_', 'b',
- 'i', 'n', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'b', 'i', 'n',
- ',', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'b', 'i', 'n', '>', 'm', 'a',
- 'p', '#', '1', '<', '[', '0', ',', '1', ',', '2', ',', '3', ']', ',', '[', '1', ',',
- '2', ',', '4', ',', '8', ']', '>', '(', 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'b',
- 'i', 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'b', 'i', 'n',
- ' ', 'o', 'u', 't', '_', '4', 'n', 'a', '_', 'b', 'i', 'n', '=', '<', 'I', 'N', 'S',
- 'D', 'C', ':', '4', 'n', 'a', ':', 'b', 'i', 'n', '>', 'b', 'i', 't', '_', 'o', 'r',
- '#', '1', '<', '1', '>', '(', 'o', 'u', 't', '_', '2', 'n', 'a', '_', '4', 'n', 'a',
- '_', 'b', 'i', 'n', ',', '.', 'A', 'L', 'T', 'R', 'E', 'A', 'D', ')', '|', 'o', 'u',
- 't', '_', 'd', 'c', 'm', 'p', '_', '4', 'n', 'a', '_', 'b', 'i', 'n', '|', 'o', 'u',
- 't', '_', '2', 'n', 'a', '_', '4', 'n', 'a', '_', 'b', 'i', 'n', ';', 'I', 'N', 'S',
- 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'o', 'u', 't', '_', 'd',
- 'n', 'a', '_', 't', 'e', 'x', 't', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n',
- 'a', ':', 'b', 'i', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't',
- 'e', 'x', 't', '>', 'm', 'a', 'p', '#', '1', '<', '[', '0', ',', '1', ',', '2', ',',
- '3', ',', '4', ',', '5', ',', '6', ',', '7', ',', '8', ',', '9', ',', '1', '0', ',',
- '1', '1', ',', '1', '2', ',', '1', '3', ',', '1', '4', ',', '1', '5', ']', ',', '\'',
- '.', 'A', 'C', 'M', 'G', 'R', 'S', 'V', 'T', 'W', 'Y', 'H', 'K', 'D', 'B', 'N', '\'',
- '>', '(', 'o', 'u', 't', '_', '4', 'n', 'a', '_', 'b', 'i', 'n', ')', ';', 'p', 'h',
- 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S',
- 'D', 'C', ':', '2', 'n', 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ', '.', 'R', 'E',
- 'A', 'D', '=', 'i', 'n', '_', '2', 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e', 'd', '|',
- '(', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd',
- ')', 'p', 'a', 'c', 'k', '#', '1', '(', 'i', 'n', '_', '2', 'n', 'a', '_', 'b', 'i',
- 'n', ')', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm',
- 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'b', 'i', 'n', '>',
- 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'A',
- 'L', 'T', 'R', 'E', 'A', 'D', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a',
- ':', 'b', 'i', 'n', '>', 't', 'r', 'i', 'm', '#', '1', '<', '0', ',', '0', '>', '(',
- 'i', 'n', '_', 'a', 'l', 't', '_', '4', 'n', 'a', '_', 'b', 'i', 'n', ')', ';', '}',
- 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'd', 'c',
- 'm', 'p', '_', 'c', 'o', 'l', 'o', 'r', '_', 's', 'p', 'a', 'c', 'e', '#', '1', '{',
- 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'd', 'c',
- 'm', 'p', '_', 'v', 'i', 'r', 't', 'u', 'a', 'l', '_', 'p', 'r', 'o', 'd', 'u', 'c',
- 't', 'i', 'o', 'n', 's', '=', 'o', 'u', 't', '_', 'd', 'c', 'm', 'p', '_', 'x', '2',
- 'c', 's', '_', 'b', 'i', 'n', '|', 'o', 'u', 't', '_', 'd', 'c', 'm', 'p', '_', '2',
- 'c', 's', '_', 'b', 'i', 'n', '|', 'o', 'u', 't', '_', 'd', 'c', 'm', 'p', '_', '2',
- 'c', 's', '_', 'p', 'a', 'c', 'k', 'e', 'd', ';', '}', 't', 'a', 'b', 'l', 'e', ' ',
- 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'c', 'o', 'l', 'o', 'r', '_', 's', 'p',
- 'a', 'c', 'e', '_', 'c', 'o', 'm', 'm', 'o', 'n', '#', '1', '.', '0', '.', '3', '=',
- 'I', 'N', 'S', 'D', 'C', ':', 't', 'b', 'l', ':', 's', 'e', 'q', 'u', 'e', 'n', 'c',
- 'e', '#', '1', '.', '0', '.', '1', ',', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A',
- ':', 't', 'b', 'l', ':', 's', 'p', 'o', 't', 'd', 'e', 's', 'c', '#', '1', '.', '0',
- '.', '2', ',', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':',
- 's', 't', 'a', 't', 's', '#', '1', '.', '1', ',', 'N', 'C', 'B', 'I', ':', 't', 'b',
- 'l', ':', 'd', 'c', 'm', 'p', '_', 'c', 'o', 'l', 'o', 'r', '_', 's', 'p', 'a', 'c',
- 'e', '#', '1', '{', 'b', 'o', 'o', 'l', ' ', 'c', 's', '_', 'n', 'a', 't', 'i', 'v',
- 'e', '=', '<', 'b', 'o', 'o', 'l', '>', 'e', 'c', 'h', 'o', '#', '1', '<', 't', 'r',
- 'u', 'e', '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '2', 'c', 's', ':', 'b',
- 'i', 'n', ' ', 'o', 'u', 't', '_', '2', 'c', 's', '_', 'b', 'i', 'n', '=', 'o', 'u',
- 't', '_', 'd', 'c', 'm', 'p', '_', '2', 'c', 's', '_', 'b', 'i', 'n', '|', '(', 'I',
- 'N', 'S', 'D', 'C', ':', '2', 'c', 's', ':', 'b', 'i', 'n', ')', 'u', 'n', 'p', 'a',
- 'c', 'k', '#', '1', '(', 'o', 'u', 't', '_', '2', 'c', 's', '_', 'p', 'a', 'c', 'k',
- 'e', 'd', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'b', 'i', 'n',
- ' ', 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'b', 'i', 'n', '=', '<', 'I', 'N', 'S',
- 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n', ',', 'I', 'N', 'S', 'D', 'C',
- ':', '2', 'n', 'a', ':', 'b', 'i', 'n', '>', 'm', 'a', 'p', '#', '1', '<', '[', '0',
- ',', '1', ',', '2', ',', '3', ',', '4', ']', ',', '[', '0', ',', '1', ',', '2', ',',
- '3', ',', '0', ']', '>', '(', 'o', 'u', 't', '_', 'x', '2', 'n', 'a', '_', 'b', 'i',
- 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'b', 'i', 'n', ' ',
- 'o', 'u', 't', '_', '4', 'n', 'a', '_', 'b', 'i', 'n', '=', '<', 'I', 'N', 'S', 'D',
- 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':',
- '4', 'n', 'a', ':', 'b', 'i', 'n', '>', 'm', 'a', 'p', '#', '1', '<', '[', '0', ',',
- '1', ',', '2', ',', '3', ',', '4', ']', ',', '[', '1', ',', '2', ',', '4', ',', '8',
- ',', '1', '5', ']', '>', '(', 'o', 'u', 't', '_', 'x', '2', 'n', 'a', '_', 'b', 'i',
- 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't',
- ' ', 'o', 'u', 't', '_', 'd', 'n', 'a', '_', 't', 'e', 'x', 't', '=', '<', 'I', 'N',
- 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n', ',', 'I', 'N', 'S', 'D',
- 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', '>', 'm', 'a', 'p', '#', '1', '<',
- '[', '0', ',', '1', ',', '2', ',', '3', ',', '4', ']', ',', '\'', 'A', 'C', 'G',
- 'T', 'N', '\'', '>', '(', 'o', 'u', 't', '_', 'x', '2', 'n', 'a', '_', 'b', 'i',
- 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n',
- ' ', 'o', 'u', 't', '_', 'x', '2', 'n', 'a', '_', 'b', 'i', 'n', '=', 'N', 'C', 'B',
- 'I', ':', 'd', 'n', 'a', '_', 'f', 'r', 'o', 'm', '_', 'c', 'o', 'l', 'o', 'r', '#',
- '1', '(', 'o', 'u', 't', '_', 'x', '2', 'c', 's', '_', 'b', 'i', 'n', ',', 'o', 'u',
- 't', '_', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', ',', 'o', 'u', 't', '_',
- 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ',', 'o', 'u', 't', '_', 'c', 's', '_', 'k',
- 'e', 'y', ',', 'o', 'u', 't', '_', 'c', 'o', 'l', 'o', 'r', '_', 'm', 'a', 't', 'r',
- 'i', 'x', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'p', 'a', 'c',
- 'k', 'e', 'd', ' ', 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e',
- 'd', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'p', 'a', 'c', 'k',
- 'e', 'd', ')', 'p', 'a', 'c', 'k', '#', '1', '(', 'o', 'u', 't', '_', '2', 'n', 'a',
- '_', 'b', 'i', 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'p',
- 'a', 'c', 'k', 'e', 'd', ' ', 'o', 'u', 't', '_', '4', 'n', 'a', '_', 'p', 'a', 'c',
- 'k', 'e', 'd', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', '4', 'n', 'a', ':', 'p', 'a',
- 'c', 'k', 'e', 'd', ')', 'p', 'a', 'c', 'k', '#', '1', '(', 'o', 'u', 't', '_', '4',
- 'n', 'a', '_', 'b', 'i', 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'l',
- 'o', 'r', ':', 't', 'e', 'x', 't', ' ', 'o', 'u', 't', '_', 'c', 'o', 'l', 'o', 'r',
- '_', 't', 'e', 'x', 't', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's',
- ':', 'b', 'i', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'l', 'o', 'r', ':',
- 't', 'e', 'x', 't', '>', 'm', 'a', 'p', '#', '1', '<', '[', '0', ',', '1', ',', '2',
- ',', '3', ',', '4', ']', ',', '\'', '0', '1', '2', '3', '.', '\'', '>', '(', 'o',
- 'u', 't', '_', 'x', '2', 'c', 's', '_', 'b', 'i', 'n', ')', ';', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 'c', 'o', 'l', 'o', 'r',
- '_', 's', 'p', 'a', 'c', 'e', '_', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', '=', '(',
- 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ')', 'r',
- 'o', 'w', '_', 'l', 'e', 'n', '#', '1', '(', 'o', 'u', 't', '_', '2', 'c', 's', '_',
- 'p', 'a', 'c', 'k', 'e', 'd', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o',
- 'r', 'd', ':', 'l', 'e', 'n', ' ', 'c', 'o', 'l', 'o', 'r', '_', 's', 'p', 'a', 'c',
- 'e', '_', 'f', 'i', 'x', 'e', 'd', '_', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', '=',
- '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ')',
- 'f', 'i', 'x', 'e', 'd', '_', 'r', 'o', 'w', '_', 'l', 'e', 'n', '#', '1', '(', 'o',
- 'u', 't', '_', '2', 'c', 's', '_', 'p', 'a', 'c', 'k', 'e', 'd', ')', ';', '}', 't',
- 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'c', 'o', 'l',
- 'o', 'r', '_', 's', 'p', 'a', 'c', 'e', '_', 'n', 'o', 'c', 'o', 'l', '#', '1', '.',
- '0', '.', '3', '=', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'c', 'o', 'l', 'o',
- 'r', '_', 's', 'p', 'a', 'c', 'e', '_', 'c', 'o', 'm', 'm', 'o', 'n', '#', '1', '.',
- '0', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'n', '_', 'e', 'n',
- 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', '{', 'U', '8', ' ', 'o', 'u', 't', '_', 'c',
- 'o', 'l', 'o', 'r', '_', 'm', 'a', 't', 'r', 'i', 'x', '=', '<', 'U', '8', '>', 'm',
- 'e', 't', 'a', ':', 'r', 'e', 'a', 'd', '#', '1', '<', '\'', 'C', 'O', 'L', 'O',
- 'R', '_', 'M', 'A', 'T', 'R', 'I', 'X', '\'', '>', '(', ')', '|', '<', 'U', '8',
- '>', 'e', 'c', 'h', 'o', '#', '1', '<', '[', '0', ',', '1', ',', '2', ',', '3', ',',
- '4', ',', '1', ',', '0', ',', '3', ',', '2', ',', '4', ',', '2', ',', '3', ',', '0',
- ',', '1', ',', '4', ',', '3', ',', '2', ',', '1', ',', '0', ',', '4', ',', '4', ',',
- '4', ',', '4', ',', '4', ',', '4', ']', '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C',
- ':', 'x', '2', 'c', 's', ':', 'b', 'i', 'n', ' ', 'o', 'u', 't', '_', 'x', '2', 'c',
- 's', '_', 'b', 'i', 'n', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's',
- ':', 'b', 'i', 'n', ')', 'r', 'e', 'a', 'd', '_', 'n', 'd', 'e', 'c', 'o', 'd', 'e',
- ';', 'U', '8', ' ', 'r', 'e', 'a', 'd', '_', 'u', 'n', 'p', 'a', 'c', 'k', '=', 'o',
- 'u', 't', '_', '2', 'c', 's', '_', 'b', 'i', 'n', ';', '}', 't', 'a', 'b', 'l', 'e',
- ' ', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'c', 'o', 'l', 'o', 'r', '_', 's',
- 'p', 'a', 'c', 'e', '#', '1', '.', '0', '.', '3', '=', 'N', 'C', 'B', 'I', ':', 't',
- 'b', 'l', ':', 'c', 'o', 'l', 'o', 'r', '_', 's', 'p', 'a', 'c', 'e', '_', 'n', 'o',
- 'c', 'o', 'l', '#', '1', '.', '0', '.', '3', '{', 'I', 'N', 'S', 'D', 'C', ':', 'd',
- 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'o', 'u', 't', '_', 'c', 's', '_', 'k', 'e',
- 'y', '=', '.', 'C', 'S', '_', 'K', 'E', 'Y', ';', 'I', 'N', 'S', 'D', 'C', ':', '2',
- 'c', 's', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ', 'o', 'u', 't', '_', '2', 'c', 's',
- '_', 'p', 'a', 'c', 'k', 'e', 'd', '=', '.', 'C', 'S', 'R', 'E', 'A', 'D', ';', '}',
- 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'c', 'o',
- 'l', 'o', 'r', '_', 's', 'p', 'a', 'c', 'e', '#', '2', '.', '1', '=', 'N', 'C', 'B',
- 'I', ':', 't', 'b', 'l', ':', 'c', 'o', 'l', 'o', 'r', '_', 's', 'p', 'a', 'c', 'e',
- '_', 'c', 'o', 'm', 'm', 'o', 'n', '#', '1', '.', '0', '.', '3', ',', 'N', 'C', 'B',
- 'I', ':', 't', 'b', 'l', ':', 'd', 'c', 'm', 'p', '_', 'c', 'o', 'l', 'o', 'r', '_',
- 's', 'p', 'a', 'c', 'e', '#', '1', '{', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'l',
- 'o', 'r', ':', 't', 'e', 'x', 't', ' ', 'i', 'n', '_', 'c', 'o', 'l', 'o', 'r', '_',
- 't', 'e', 'x', 't', '=', 'C', 'S', 'R', 'E', 'A', 'D', ';', 'I', 'N', 'S', 'D', 'C',
- ':', 'x', '2', 'c', 's', ':', 'b', 'i', 'n', ' ', 'i', 'n', '_', 'x', '2', 'c', 's',
- '_', 'b', 'i', 'n', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's', ':',
- 'b', 'i', 'n', '>', 'r', 'a', 'n', 'g', 'e', '_', 'v', 'a', 'l', 'i', 'd', 'a', 't',
- 'e', '#', '1', '<', '0', ',', '4', '>', '(', 'C', 'S', 'R', 'E', 'A', 'D', ')', '|',
- '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'l', 'o', 'r', ':', 't', 'e', 'x', 't',
- ',', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's', ':', 'b', 'i', 'n', '>', 'm',
- 'a', 'p', '#', '1', '<', '\'', '0', '1', '2', '3', '.', '\'', ',', '[', '0', ',',
- '1', ',', '2', ',', '3', ',', '4', ']', '>', '(', 'i', 'n', '_', 'c', 'o', 'l', 'o',
- 'r', '_', 't', 'e', 'x', 't', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '2', 'c', 's',
- ':', 'b', 'i', 'n', ' ', 'i', 'n', '_', '2', 'c', 's', '_', 'b', 'i', 'n', '=', '<',
- 'I', 'N', 'S', 'D', 'C', ':', '2', 'c', 's', ':', 'b', 'i', 'n', '>', 'r', 'a', 'n',
- 'g', 'e', '_', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '#', '1', '<', '0', ',', '3',
- '>', '(', 'C', 'S', 'R', 'E', 'A', 'D', ')', '|', '(', 'I', 'N', 'S', 'D', 'C', ':',
- '2', 'c', 's', ':', 'b', 'i', 'n', ')', 'u', 'n', 'p', 'a', 'c', 'k', '#', '1', '(',
- 'i', 'n', '_', '2', 'c', 's', '_', 'p', 'a', 'c', 'k', 'e', 'd', ')', '|', '<', 'I',
- 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's', ':', 'b', 'i', 'n', ',', 'I', 'N', 'S',
- 'D', 'C', ':', '2', 'c', 's', ':', 'b', 'i', 'n', '>', 'm', 'a', 'p', '#', '1', '<',
- '[', '0', ',', '1', ',', '2', ',', '3', ',', '4', ']', ',', '[', '0', ',', '1', ',',
- '2', ',', '3', ',', '0', ']', '>', '(', 'i', 'n', '_', 'x', '2', 'c', 's', '_', 'b',
- 'i', 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '2', 'c', 's', ':', 'p', 'a', 'c',
- 'k', 'e', 'd', ' ', 'i', 'n', '_', '2', 'c', 's', '_', 'p', 'a', 'c', 'k', 'e', 'd',
- '=', 'C', 'S', 'R', 'E', 'A', 'D', ';', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c',
- 's', ':', 'b', 'i', 'n', ' ', 'i', 'n', '_', 'a', 'l', 't', '_', 'x', '2', 'c', 's',
- '_', 'b', 'i', 'n', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's', ':',
- 'b', 'i', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's', ':', 'b', 'i',
- 'n', '>', 'm', 'a', 'p', '#', '1', '<', '[', '0', ',', '1', ',', '2', ',', '3', ',',
- '4', ']', ',', '[', '0', ',', '0', ',', '0', ',', '0', ',', '4', ']', '>', '(', 'i',
- 'n', '_', 'x', '2', 'c', 's', '_', 'b', 'i', 'n', ')', ';', 'I', 'N', 'S', 'D', 'C',
- ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'i', 'n', '_', 'c', 's', '_', 'k',
- 'e', 'y', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x',
- 't', ',', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', '>',
- 'm', 'a', 'p', '#', '1', '<', '\'', 'a', 'c', 'g', 't', '\'', ',', '\'', 'A', 'C',
- 'G', 'T', '\'', '>', '(', 'C', 'S', '_', 'K', 'E', 'Y', ')', ';', 'U', '8', ' ',
- 'i', 'n', '_', 'c', 'o', 'l', 'o', 'r', '_', 'm', 'a', 't', 'r', 'i', 'x', '=', '<',
- 'U', '8', '>', 'r', 'a', 'n', 'g', 'e', '_', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e',
- '#', '1', '<', '0', ',', '4', '>', '(', 'C', 'O', 'L', 'O', 'R', '_', 'M', 'A', 'T',
- 'R', 'I', 'X', ')', ';', 'U', '8', ' ', 'i', 'n', '_', 's', 't', 'a', 't', 's', '_',
- 'b', 'i', 'n', '=', 'i', 'n', '_', '2', 'c', 's', '_', 'b', 'i', 'n', ';', 'I', 'N',
- 'S', 'D', 'C', ':', '2', 'c', 's', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ', 'o', 'u',
- 't', '_', '2', 'c', 's', '_', 'p', 'a', 'c', 'k', 'e', 'd', '=', '.', 'C', 'S', 'R',
- 'E', 'A', 'D', '|', 'o', 'u', 't', '_', 'd', 'c', 'm', 'p', '_', '2', 'c', 's', '_',
- 'p', 'a', 'c', 'k', 'e', 'd', ';', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's',
- ':', 'b', 'i', 'n', ' ', 'o', 'u', 't', '_', 'x', '2', 'c', 's', '_', 'b', 'i', 'n',
- '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's', ':', 'b', 'i', 'n', ')',
- '<', 'U', '8', '>', 'b', 'i', 't', '_', 'o', 'r', '#', '1', '<', '1', '>', '(', 'o',
- 'u', 't', '_', '2', 'c', 's', '_', 'b', 'i', 'n', ',', '.', 'A', 'L', 'T', 'C', 'S',
- 'R', 'E', 'A', 'D', ')', '|', 'o', 'u', 't', '_', 'd', 'c', 'm', 'p', '_', 'x', '2',
- 'c', 's', '_', 'b', 'i', 'n', '|', '(', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c',
- 's', ':', 'b', 'i', 'n', ')', 'o', 'u', 't', '_', '2', 'c', 's', '_', 'b', 'i', 'n',
- ';', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'o',
- 'u', 't', '_', 'c', 's', '_', 'k', 'e', 'y', '=', '.', 'C', 'S', '_', 'K', 'E', 'Y',
- ';', 'U', '8', ' ', 'o', 'u', 't', '_', 'c', 'o', 'l', 'o', 'r', '_', 'm', 'a', 't',
- 'r', 'i', 'x', '=', '.', 'C', 'O', 'L', 'O', 'R', '_', 'M', 'A', 'T', 'R', 'I', 'X',
- '|', '<', 'U', '8', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '[', '0', ',', '1', ',',
- '2', ',', '3', ',', '4', ',', '1', ',', '0', ',', '3', ',', '2', ',', '4', ',', '2',
- ',', '3', ',', '0', ',', '1', ',', '4', ',', '3', ',', '2', ',', '1', ',', '0', ',',
- '4', ',', '4', ',', '4', ',', '4', ',', '4', ',', '4', ']', '>', '(', ')', ';', 'p',
- 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N',
- 'S', 'D', 'C', ':', '2', 'c', 's', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ', '.', 'C',
- 'S', 'R', 'E', 'A', 'D', '=', 'i', 'n', '_', '2', 'c', 's', '_', 'p', 'a', 'c', 'k',
- 'e', 'd', '|', '(', 'I', 'N', 'S', 'D', 'C', ':', '2', 'c', 's', ':', 'p', 'a', 'c',
- 'k', 'e', 'd', ')', 'p', 'a', 'c', 'k', '#', '1', '(', 'i', 'n', '_', '2', 'c', 's',
- '_', 'b', 'i', 'n', ')', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'c', 's', ':',
- 'b', 'i', 'n', '>', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#',
- '1', ' ', '.', 'A', 'L', 'T', 'C', 'S', 'R', 'E', 'A', 'D', '=', '<', 'I', 'N', 'S',
- 'D', 'C', ':', 'x', '2', 'c', 's', ':', 'b', 'i', 'n', '>', 't', 'r', 'i', 'm', '#',
- '1', '<', '0', ',', '0', '>', '(', 'i', 'n', '_', 'a', 'l', 't', '_', 'x', '2', 'c',
- 's', '_', 'b', 'i', 'n', ')', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':',
- 't', 'e', 'x', 't', '>', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g',
- '#', '1', ' ', '.', 'C', 'S', '_', 'K', 'E', 'Y', '=', 'i', 'n', '_', 'c', 's', '_',
- 'k', 'e', 'y', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u',
- 'm', 'n', ' ', '<', 'U', '8', '>', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i',
- 'n', 'g', '#', '1', ' ', '.', 'C', 'O', 'L', 'O', 'R', '_', 'M', 'A', 'T', 'R', 'I',
- 'X', '=', 'i', 'n', '_', 'c', 'o', 'l', 'o', 'r', '_', 'm', 'a', 't', 'r', 'i', 'x',
- ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':',
- 'p', 'r', 'o', 't', 'e', 'i', 'n', '#', '1', '=', 'I', 'N', 'S', 'D', 'C', ':', 't',
- 'b', 'l', ':', 'p', 'r', 'o', 't', 'e', 'i', 'n', '#', '1', '{', 'I', 'N', 'S', 'D',
- 'C', ':', 'p', 'r', 'o', 't', 'e', 'i', 'n', ':', 't', 'e', 'x', 't', ' ', 'i', 'n',
- '_', 'p', 'r', 'o', 't', 'e', 'i', 'n', '_', 't', 'e', 'x', 't', '=', '<', 'I', 'N',
- 'S', 'D', 'C', ':', 'p', 'r', 'o', 't', 'e', 'i', 'n', ':', 't', 'e', 'x', 't', ',',
- 'I', 'N', 'S', 'D', 'C', ':', 'p', 'r', 'o', 't', 'e', 'i', 'n', ':', 't', 'e', 'x',
- 't', '>', 'm', 'a', 'p', '#', '1', '<', '\'', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y',
- 'z', 'u', '\'', ',', '\'', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
- 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'V', 'W', 'X', 'Y', 'Z', 'U', '\'',
- '>', '(', 'P', 'R', 'O', 'T', 'E', 'I', 'N', ')', ';', 'I', 'N', 'S', 'D', 'C', ':',
- 'a', 'a', ':', 'b', 'i', 'n', ' ', 'i', 'n', '_', 'a', 'a', '_', 'b', 'i', 'n', '=',
- '<', 'I', 'N', 'S', 'D', 'C', ':', 'a', 'a', ':', 'b', 'i', 'n', '>', 'r', 'a', 'n',
- 'g', 'e', '_', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '#', '1', '<', '1', ',', '2',
- '7', '>', '(', 'P', 'R', 'O', 'T', 'E', 'I', 'N', ')', '|', '<', 'I', 'N', 'S', 'D',
- 'C', ':', 'p', 'r', 'o', 't', 'e', 'i', 'n', ':', 't', 'e', 'x', 't', ',', 'I', 'N',
- 'S', 'D', 'C', ':', 'a', 'a', ':', 'b', 'i', 'n', '>', 'm', 'a', 'p', '#', '1', '<',
- '\'', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'K', 'L', 'M', 'N', 'P', 'Q',
- 'R', 'S', 'T', 'V', 'W', 'X', 'Y', 'Z', 'U', '*', 'O', 'J', '\'', ',', '[', '1',
- ',', '2', ',', '3', ',', '4', ',', '5', ',', '6', ',', '7', ',', '8', ',', '9', ',',
- '1', '0', ',', '1', '1', ',', '1', '2', ',', '1', '3', ',', '1', '4', ',', '1', '5',
- ',', '1', '6', ',', '1', '7', ',', '1', '8', ',', '1', '9', ',', '2', '0', ',', '2',
- '1', ',', '2', '2', ',', '2', '3', ',', '2', '4', ',', '2', '5', ',', '2', '6', ',',
- '2', '7', ']', '>', '(', 'i', 'n', '_', 'p', 'r', 'o', 't', 'e', 'i', 'n', '_', 't',
- 'e', 'x', 't', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'a', 'a', ':', 'b', 'i', 'n',
- ' ', 'o', 'u', 't', '_', 'a', 'a', '_', 'b', 'i', 'n', '=', '.', 'P', 'R', 'O', 'T',
- 'E', 'I', 'N', ';', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'r', 'o', 't', 'e', 'i', 'n',
- ':', 't', 'e', 'x', 't', ' ', 'o', 'u', 't', '_', 'p', 'r', 'o', 't', 'e', 'i', 'n',
- '_', 't', 'e', 'x', 't', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'a', 'a', ':', 'b',
- 'i', 'n', ',', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'r', 'o', 't', 'e', 'i', 'n', ':',
- 't', 'e', 'x', 't', '>', 'm', 'a', 'p', '#', '1', '<', '[', '1', ',', '2', ',', '3',
- ',', '4', ',', '5', ',', '6', ',', '7', ',', '8', ',', '9', ',', '1', '0', ',', '1',
- '1', ',', '1', '2', ',', '1', '3', ',', '1', '4', ',', '1', '5', ',', '1', '6', ',',
- '1', '7', ',', '1', '8', ',', '1', '9', ',', '2', '0', ',', '2', '1', ',', '2', '2',
- ',', '2', '3', ',', '2', '4', ',', '2', '5', ',', '2', '6', ',', '2', '7', ']', ',',
- '\'', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'K', 'L', 'M', 'N', 'P', 'Q',
- 'R', 'S', 'T', 'V', 'W', 'X', 'Y', 'Z', 'U', '*', 'O', 'J', '\'', '>', '(', 'o',
- 'u', 't', '_', 'a', 'a', '_', 'b', 'i', 'n', ')', ';', 'p', 'h', 'y', 's', 'i', 'c',
- 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':',
- 'a', 'a', ':', 'b', 'i', 'n', '>', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i',
- 'n', 'g', '#', '1', ' ', '.', 'P', 'R', 'O', 'T', 'E', 'I', 'N', '=', 'i', 'n', '_',
- 'a', 'a', '_', 'b', 'i', 'n', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B',
- 'I', ':', 't', 'b', 'l', ':', 'p', 'h', 'r', 'e', 'd', '_', 'q', 'u', 'a', 'l', 'i',
- 't', 'y', '_', 'n', 'o', 'c', 'o', 'l', '#', '1', '.', '0', '.', '1', '=', 'I', 'N',
- 'S', 'D', 'C', ':', 't', 'b', 'l', ':', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', '#',
- '1', '.', '0', '.', '1', ',', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'n', '_',
- 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', '{', 'U', '8', ' ', 'r', 'e', 'a',
- 'd', '_', 'n', 'd', 'e', 'c', 'o', 'd', 'e', '=', '<', 'I', 'N', 'S', 'D', 'C', ':',
- 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p', 'h', 'r', 'e', 'd', ',', 'U', '8', '>',
- 'm', 'a', 'p', '#', '1', '<', '0', ',', '4', '>', '(', 'o', 'u', 't', '_', 'q', 'u',
- 'a', 'l', '_', 'p', 'h', 'r', 'e', 'd', ',', 'r', 'e', 'a', 'd', '_', 'u', 'n', 'p',
- 'a', 'c', 'k', ')', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':',
- 't', 'b', 'l', ':', 'p', 'h', 'r', 'e', 'd', '_', 'q', 'u', 'a', 'l', 'i', 't', 'y',
- '#', '1', '.', '0', '.', '1', '=', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'p',
- 'h', 'r', 'e', 'd', '_', 'q', 'u', 'a', 'l', 'i', 't', 'y', '_', 'n', 'o', 'c', 'o',
- 'l', '#', '1', '.', '0', '.', '1', '{', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l',
- 'i', 't', 'y', ':', 'n', '_', 'e', 'n', 'c', 'o', 'd', 'e', 'd', ':', 'p', 'h', 'r',
- 'e', 'd', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'p', 'h', 'r', 'e', 'd',
- '=', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ';', '}', 't', 'a', 'b', 'l', 'e', ' ',
- 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'p', 'h', 'r', 'e', 'd', '_', 'q', 'u',
- 'a', 'l', 'i', 't', 'y', '#', '2', '.', '0', '.', '4', '=', 'I', 'N', 'S', 'D', 'C',
- ':', 't', 'b', 'l', ':', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', '#', '1', '.', '0',
- '.', '1', '{', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':',
- 'p', 'h', 'r', 'e', 'd', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'p', 'h',
- 'r', 'e', 'd', '=', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ';', 'I', 'N', 'S', 'D',
- 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 't', 'e', 'x', 't', ':', 'p', 'h',
- 'r', 'e', 'd', '_', '3', '3', ' ', 'i', 'n', '_', 'q', 'u', 'a', 'l', '_', 't', 'e',
- 'x', 't', '_', 'p', 'h', 'r', 'e', 'd', '_', '3', '3', '=', 'Q', 'U', 'A', 'L', 'I',
- 'T', 'Y', ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':',
- 't', 'e', 'x', 't', ':', 'p', 'h', 'r', 'e', 'd', '_', '6', '4', ' ', 'i', 'n', '_',
- 'q', 'u', 'a', 'l', '_', 't', 'e', 'x', 't', '_', 'p', 'h', 'r', 'e', 'd', '_', '6',
- '4', '=', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ';', 'I', 'N', 'S', 'D', 'C', ':', 'q',
- 'u', 'a', 'l', 'i', 't', 'y', ':', 'p', 'h', 'r', 'e', 'd', ' ', 'i', 'n', '_', 'q',
- 'u', 'a', 'l', '_', 'p', 'h', 'r', 'e', 'd', '=', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y',
- '|', '(', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p',
- 'h', 'r', 'e', 'd', ')', '<', 'B', '8', '>', 'd', 'i', 'f', 'f', '#', '1', '<', '3',
- '3', '>', '(', 'i', 'n', '_', 'q', 'u', 'a', 'l', '_', 't', 'e', 'x', 't', '_', 'p',
- 'h', 'r', 'e', 'd', '_', '3', '3', ')', '|', '(', 'I', 'N', 'S', 'D', 'C', ':', 'q',
- 'u', 'a', 'l', 'i', 't', 'y', ':', 'p', 'h', 'r', 'e', 'd', ')', '<', 'B', '8', '>',
- 'd', 'i', 'f', 'f', '#', '1', '<', '6', '4', '>', '(', 'i', 'n', '_', 'q', 'u', 'a',
- 'l', '_', 't', 'e', 'x', 't', '_', 'p', 'h', 'r', 'e', 'd', '_', '6', '4', ')', ';',
- 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p', 'h', 'r',
- 'e', 'd', ' ', 'i', 'n', '_', 's', 't', 'a', 't', 's', '_', 'q', 'u', 'a', 'l', '=',
- 'i', 'n', '_', 'q', 'u', 'a', 'l', '_', 'p', 'h', 'r', 'e', 'd', ';', 'p', 'h', 'y',
- 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S',
- 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p', 'h', 'r', 'e', 'd', '>',
- 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'Q',
- 'U', 'A', 'L', 'I', 'T', 'Y', '=', 'i', 'n', '_', 'q', 'u', 'a', 'l', '_', 'p', 'h',
- 'r', 'e', 'd', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 't',
- 'b', 'l', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '_', 'q', 'u', 'a', 'l', 'i',
- 't', 'y', '_', 'n', 'o', 'c', 'o', 'l', '#', '1', '.', '0', '.', '1', '=', 'I', 'N',
- 'S', 'D', 'C', ':', 't', 'b', 'l', ':', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', '#',
- '1', '.', '0', '.', '1', ',', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'n', '_',
- 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', '{', 'c', 'o', 'l', 'u', 'm', 'n',
- ' ', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l', 'o',
- 'g', '_', 'o', 'd', 'd', 's', ' ', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ' ', '=', ' ',
- 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's',
- ';', 'U', '8', ' ', 'r', 'e', 'a', 'd', '_', 'n', 'd', 'e', 'c', 'o', 'd', 'e', '=',
- '<', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l', 'o',
- 'g', '_', 'o', 'd', 'd', 's', ',', 'U', '8', '>', 'm', 'a', 'p', '#', '1', '<', '-',
- '6', ',', '4', '>', '(', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'l', 'o', 'g',
- '_', 'o', 'd', 'd', 's', ',', 'r', 'e', 'a', 'd', '_', 'u', 'n', 'p', 'a', 'c', 'k',
- ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p',
- 'h', 'r', 'e', 'd', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'p', 'h', 'r',
- 'e', 'd', '=', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '2', '_', 'p', 'h', 'r', 'e',
- 'd', '|', 'N', 'C', 'B', 'I', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '_', 't',
- 'o', '_', 'p', 'h', 'r', 'e', 'd', '#', '1', '(', 'o', 'u', 't', '_', 'q', 'u', 'a',
- 'l', '_', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ')', ';', '}', 't', 'a', 'b', 'l',
- 'e', ' ', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'l', 'o', 'g', '_', 'o', 'd',
- 'd', 's', '_', 'q', 'u', 'a', 'l', 'i', 't', 'y', '#', '1', '.', '0', '.', '1', '=',
- 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's',
- '_', 'q', 'u', 'a', 'l', 'i', 't', 'y', '_', 'n', 'o', 'c', 'o', 'l', '#', '1', '.',
- '0', '.', '1', '{', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':',
- 'n', '_', 'e', 'n', 'c', 'o', 'd', 'e', 'd', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd',
- 's', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'l', 'o', 'g', '_', 'o', 'd',
- 'd', 's', '=', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ';', '}', 't', 'a', 'b', 'l',
- 'e', ' ', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'l', 'o', 'g', '_', 'o', 'd',
- 'd', 's', '_', 'q', 'u', 'a', 'l', 'i', 't', 'y', '_', 'n', 'o', 'c', 'o', 'l', '#',
- '2', '.', '1', '=', 'I', 'N', 'S', 'D', 'C', ':', 't', 'b', 'l', ':', 's', 'e', 'q',
- 'u', 'e', 'n', 'c', 'e', '#', '1', '.', '0', '.', '1', '{', 'c', 'o', 'l', 'u', 'm',
- 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l',
- 'o', 'g', '_', 'o', 'd', 'd', 's', ' ', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ' ', '=',
- ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'l', 'o', 'g', '_', 'o', 'd', 'd',
- 's', ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p',
- 'h', 'r', 'e', 'd', ' ', 'i', 'n', '_', 'q', 'u', 'a', 'l', '_', 'p', 'h', 'r', 'e',
- 'd', '=', 'N', 'C', 'B', 'I', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '_', 't',
- 'o', '_', 'p', 'h', 'r', 'e', 'd', '#', '1', '(', 'i', 'n', '_', 'q', 'u', 'a', 'l',
- '_', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ')', ';', 'I', 'N', 'S', 'D', 'C', ':',
- 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p', 'h', 'r', 'e', 'd', ' ', 'o', 'u', 't',
- '_', 'q', 'u', 'a', 'l', '_', 'p', 'h', 'r', 'e', 'd', '=', 'N', 'C', 'B', 'I', ':',
- 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '_', 't', 'o', '_', 'p', 'h', 'r', 'e', 'd',
- '#', '1', '(', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'l', 'o', 'g', '_', 'o',
- 'd', 'd', 's', ')', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':',
- 't', 'b', 'l', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '_', 'q', 'u', 'a', 'l',
- 'i', 't', 'y', '#', '2', '.', '1', '=', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':',
- 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '_', 'q', 'u', 'a', 'l', 'i', 't', 'y', '_',
- 'n', 'o', 'c', 'o', 'l', '#', '2', '.', '1', '{', 'c', 'o', 'l', 'u', 'm', 'n', ' ',
- 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 't', 'e', 'x',
- 't', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '_', '6', '4', ' ', 'Q', 'U', 'A',
- 'L', 'I', 'T', 'Y', ' ', '=', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 't',
- 'e', 'x', 't', '_', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '_', '6', '4', '|', '(',
- 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 't', 'e', 'x',
- 't', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '_', '6', '4', ')', '<', 'B', '8',
- '>', 's', 'u', 'm', '#', '1', '<', '6', '4', '>', '(', 'o', 'u', 't', '_', 'q', 'u',
- 'a', 'l', '_', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ')', ';', 'I', 'N', 'S', 'D',
- 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd',
- 's', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'l', 'o', 'g', '_', 'o', 'd',
- 'd', 's', '=', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ';', 'I', 'N', 'S', 'D', 'C',
- ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 't', 'e', 'x', 't', ':', 'l', 'o', 'g',
- '_', 'o', 'd', 'd', 's', '_', '6', '4', ' ', 'i', 'n', '_', 'q', 'u', 'a', 'l', '_',
- 't', 'e', 'x', 't', '_', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '_', '6', '4', '=',
- 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a',
- 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ' ', 'i', 'n', '_',
- 'q', 'u', 'a', 'l', '_', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '=', 'Q', 'U', 'A',
- 'L', 'I', 'T', 'Y', '|', '(', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i',
- 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ')', '<', 'B', '8', '>', 'd',
- 'i', 'f', 'f', '#', '1', '<', '6', '4', '>', '(', 'i', 'n', '_', 'q', 'u', 'a', 'l',
- '_', 't', 'e', 'x', 't', '_', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '_', '6', '4',
- ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l',
- 'o', 'g', '_', 'o', 'd', 'd', 's', ' ', 'i', 'n', '_', 's', 't', 'a', 't', 's', '_',
- 'q', 'u', 'a', 'l', '=', 'i', 'n', '_', 'q', 'u', 'a', 'l', '_', 'l', 'o', 'g', '_',
- 'o', 'd', 'd', 's', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l',
- 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't',
- 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '>', 'z', 'i', 'p', '_', 'e', 'n',
- 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y',
- '=', 'i', 'n', '_', 'q', 'u', 'a', 'l', '_', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's',
- ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 't', 'b', 'l', ':', 's', 'p', 'o', 't', 'c', 'o', 'o', 'r', 'd', '#', '1', '=', 'I',
- 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'p', 'o', 't',
- 'c', 'o', 'o', 'r', 'd', '#', '1', '{', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o',
- 'r', 'd', ':', 'v', 'a', 'l', ' ', 'o', 'u', 't', '_', 'x', '_', 'c', 'o', 'o', 'r',
- 'd', '=', '.', 'X', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'v', 'a', 'l', ' ', 'o', 'u', 't', '_', 'y', '_', 'c', 'o', 'o', 'r', 'd', '=', '.',
- 'Y', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l',
- ' ', 'o', 'u', 't', '_', 't', '_', 'c', 'o', 'o', 'r', 'd', '=', '.', 'T', ';', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'o', 'u',
- 't', '_', 'l', '_', 'c', 'o', 'o', 'r', 'd', '=', '.', 'L', ';', 'p', 'h', 'y', 's',
- 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', '>', 'i', 'z', 'i', 'p', '_',
- 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'X', '=', 'i', 'n', '_',
- 'x', '_', 'c', 'o', 'o', 'r', 'd', '|', 'i', 'n', '_', 'n', 'a', 'm', 'e', '_', 'x',
- '_', 'c', 'o', 'o', 'r', 'd', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'v', 'a', 'l', '>', 'i', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i',
- 'n', 'g', '#', '1', ' ', '.', 'Y', '=', 'i', 'n', '_', 'y', '_', 'c', 'o', 'o', 'r',
- 'd', '|', 'i', 'n', '_', 'n', 'a', 'm', 'e', '_', 'y', '_', 'c', 'o', 'o', 'r', 'd',
- ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ',
- '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', '>',
- 'i', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.',
- 'T', '=', 'i', 'n', '_', 't', '_', 'c', 'o', 'o', 'r', 'd', '|', 'i', 'n', '_', 'n',
- 'a', 'm', 'e', '_', 't', '_', 'c', 'o', 'o', 'r', 'd', ';', 'p', 'h', 'y', 's', 'i',
- 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C',
- ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', '>', 'i', 'z', 'i', 'p', '_', 'e',
- 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'L', '=', 'i', 'n', '_', 'l',
- '_', 'c', 'o', 'o', 'r', 'd', '|', 'i', 'n', '_', 'n', 'a', 'm', 'e', '_', 'l', '_',
- 'c', 'o', 'o', 'r', 'd', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'k', 'e', 'y', 'n', 'a', 'm', 'e',
- '#', '1', '.', '0', '.', '1', '=', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':',
- 't', 'b', 'l', ':', 's', 'p', 'o', 't', 'n', 'a', 'm', 'e', '#', '1', '.', '0', '.',
- '1', '{', 'a', 's', 'c', 'i', 'i', ' ', 'o', 'u', 't', '_', 's', 'k', 'e', 'y', '=',
- '(', 'a', 's', 'c', 'i', 'i', ')', 'i', 'd', 'x', ':', 't', 'e', 'x', 't', ':', 'p',
- 'r', 'o', 'j', 'e', 'c', 't', '#', '1', '<', '\'', 's', 'k', 'e', 'y', '\'', '>',
- '(', ')', ';', 'a', 's', 'c', 'i', 'i', ' ', 'o', 'u', 't', '_', 's', 'p', 'o', 't',
- '_', 'n', 'a', 'm', 'e', '=', 'r', 'e', 'w', 'r', 'i', 't', 't', 'e', 'n', '_', 's',
- 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '|', 'o', 'u', 't', '_', 's', 'k', 'e', 'y',
- ';', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 's', 'p', 'o', 't', '_', 'i',
- 'd', 's', '_', 'f', 'o', 'u', 'n', 'd', ' ', 's', 'p', 'o', 't', '_', 'i', 'd', 's',
- '_', 'f', 'o', 'u', 'n', 'd', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A',
- ':', 's', 'p', 'o', 't', '_', 'i', 'd', 's', '_', 'f', 'o', 'u', 'n', 'd', ')', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'l', 'o', 'o', 'k', 'u', 'p', '#', '1', '<',
- '\'', 's', 'k', 'e', 'y', '\'', ',', '\'', 'Q', 'U', 'E', 'R', 'Y', '_', 'B', 'Y',
- '_', 'N', 'A', 'M', 'E', '\'', ',', '1', '>', '(', 'o', 'u', 't', '_', 's', 'l',
- 'x', '_', 'p', 'r', 'e', 'f', 'i', 'x', ')', '|', '(', 'I', 'N', 'S', 'D', 'C', ':',
- 'S', 'R', 'A', ':', 's', 'p', 'o', 't', '_', 'i', 'd', 's', '_', 'f', 'o', 'u', 'n',
- 'd', ')', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'l', 'o', 'o', 'k', 'u', 'p',
- '#', '1', '<', '\'', 's', 'k', 'e', 'y', '\'', ',', '\'', 'Q', 'U', 'E', 'R', 'Y',
- '_', 'B', 'Y', '_', 'N', 'A', 'M', 'E', '\'', ',', '0', '>', '(', ')', ';', '}',
- 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b',
- 'l', ':', 's', 'k', 'e', 'y', 'n', 'a', 'm', 'e', '_', 'n', 'o', 'c', 'o', 'l', '#',
- '2', '.', '0', '.', '1', '=', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 't',
- 'b', 'l', ':', 's', 'p', 'o', 't', 'n', 'a', 'm', 'e', '#', '1', '.', '0', '.', '1',
- '{', 'a', 's', 'c', 'i', 'i', ' ', 'o', 'u', 't', '_', 'n', 'a', 'm', 'e', '_', 'f',
- 'm', 't', '=', '(', 'a', 's', 'c', 'i', 'i', ')', 'i', 'd', 'x', ':', 't', 'e', 'x',
- 't', ':', 'p', 'r', 'o', 'j', 'e', 'c', 't', '#', '1', '<', '\'', 's', 'k', 'e',
- 'y', '\'', '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':',
- 's', 'p', 'o', 't', '_', 'i', 'd', 's', '_', 'f', 'o', 'u', 'n', 'd', ' ', 's', 'p',
- 'o', 't', '_', 'i', 'd', 's', '_', 'f', 'o', 'u', 'n', 'd', '=', '(', 'I', 'N', 'S',
- 'D', 'C', ':', 'S', 'R', 'A', ':', 's', 'p', 'o', 't', '_', 'i', 'd', 's', '_', 'f',
- 'o', 'u', 'n', 'd', ')', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'l', 'o', 'o',
- 'k', 'u', 'p', '#', '1', '<', '\'', 's', 'k', 'e', 'y', '\'', ',', '\'', 'Q', 'U',
- 'E', 'R', 'Y', '_', 'B', 'Y', '_', 'N', 'A', 'M', 'E', '\'', ',', '2', '>', '(',
- 'o', 'u', 't', '_', 's', 'l', 'x', '_', 'p', 'r', 'e', 'f', 'i', 'x', ')', '|', '(',
- 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 's', 'p', 'o', 't', '_', 'i', 'd',
- 's', '_', 'f', 'o', 'u', 'n', 'd', ')', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'l', 'o', 'o', 'k', 'u', 'p', '#', '1', '<', '\'', 's', 'k', 'e', 'y', '\'', ',',
- '\'', 'Q', 'U', 'E', 'R', 'Y', '_', 'B', 'Y', '_', 'N', 'A', 'M', 'E', '\'', ',',
- '2', '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'v', 'a', 'l', ' ', 'o', 'u', 't', '_', 'x', '_', 'c', 'o', 'o', 'r', 'd', '=', 'c',
- 'a', 's', 't', '#', '1', '(', '.', 'X', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c',
- 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'o', 'u', 't', '_', 'y', '_', 'c', 'o',
- 'o', 'r', 'd', '=', 'c', 'a', 's', 't', '#', '1', '(', '.', 'Y', ')', ';', '}', 't',
- 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l',
- ':', 's', 'k', 'e', 'y', 'n', 'a', 'm', 'e', '#', '2', '.', '0', '.', '1', '=', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'k', 'e', 'y', 'n',
- 'a', 'm', 'e', '_', 'n', 'o', 'c', 'o', 'l', '#', '2', '.', '0', '.', '1', '{', 'p',
- 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', '>', 'i', 'z',
- 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'X', '=',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e', 'x', 't', 'r', 'a', 'c', 't', '_',
- 'n', 'a', 'm', 'e', '_', 'c', 'o', 'o', 'r', 'd', '#', '1', '<', '4', '>', '(', 'N',
- 'A', 'M', 'E', ',', 'i', 'n', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '_',
- 't', 'o', 'k', ')', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l',
- 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'v', 'a', 'l', '>', 'i', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g',
- '#', '1', ' ', '.', 'Y', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e', 'x',
- 't', 'r', 'a', 'c', 't', '_', 'n', 'a', 'm', 'e', '_', 'c', 'o', 'o', 'r', 'd', '#',
- '1', '<', '5', '>', '(', 'N', 'A', 'M', 'E', ',', 'i', 'n', '_', 's', 'p', 'o', 't',
- '_', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', ')', ';', '}', 't', 'a', 'b', 'l', 'e',
- ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'k', 'e',
- 'y', 'n', 'a', 'm', 'e', '#', '3', '.', '0', '.', '1', '=', 'I', 'N', 'S', 'D', 'C',
- ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'p', 'o', 't', 'n', 'a', 'm', 'e',
- '#', '1', '.', '0', '.', '1', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't',
- 'b', 'l', ':', 's', 'p', 'o', 't', 'c', 'o', 'o', 'r', 'd', '#', '1', '{', 'a', 's',
- 'c', 'i', 'i', ' ', 'o', 'u', 't', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e',
- '=', '.', 'S', 'P', 'O', 'T', '_', 'N', 'A', 'M', 'E', ';', 'a', 's', 'c', 'i', 'i',
- ' ', 'o', 'u', 't', '_', 'n', 'a', 'm', 'e', '_', 'f', 'm', 't', '=', '(', 'a', 's',
- 'c', 'i', 'i', ')', 'i', 'd', 'x', ':', 't', 'e', 'x', 't', ':', 'p', 'r', 'o', 'j',
- 'e', 'c', 't', '#', '1', '<', '\'', 's', 'k', 'e', 'y', '\'', '>', '(', '.', 'N',
- 'A', 'M', 'E', '_', 'F', 'M', 'T', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R',
- 'A', ':', 's', 'p', 'o', 't', '_', 'i', 'd', 's', '_', 'f', 'o', 'u', 'n', 'd', ' ',
- 's', 'p', 'o', 't', '_', 'i', 'd', 's', '_', 'f', 'o', 'u', 'n', 'd', '=', '(', 'I',
- 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 's', 'p', 'o', 't', '_', 'i', 'd', 's',
- '_', 'f', 'o', 'u', 'n', 'd', ')', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'l',
- 'o', 'o', 'k', 'u', 'p', '#', '1', '<', '\'', 's', 'k', 'e', 'y', '\'', ',', '\'',
- 'Q', 'U', 'E', 'R', 'Y', '_', 'B', 'Y', '_', 'N', 'A', 'M', 'E', '\'', ',', '2',
- '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v',
- 'a', 'l', ' ', 'i', 'n', '_', 'n', 'a', 'm', 'e', '_', 'x', '_', 'c', 'o', 'o', 'r',
- 'd', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e', 'x', 't', 'r', 'a', 'c',
- 't', '_', 'n', 'a', 'm', 'e', '_', 'c', 'o', 'o', 'r', 'd', '#', '1', '<', '4', '>',
- '(', 'N', 'A', 'M', 'E', ',', 'i', 'n', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm',
- 'e', '_', 't', 'o', 'k', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'v', 'a', 'l', ' ', 'i', 'n', '_', 'n', 'a', 'm', 'e', '_', 'y', '_', 'c',
- 'o', 'o', 'r', 'd', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e', 'x', 't',
- 'r', 'a', 'c', 't', '_', 'n', 'a', 'm', 'e', '_', 'c', 'o', 'o', 'r', 'd', '#', '1',
- '<', '5', '>', '(', 'N', 'A', 'M', 'E', ',', 'i', 'n', '_', 's', 'p', 'o', 't', '_',
- 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c',
- 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'i', 'n', '_', 'n', 'a', 'm', 'e', '_',
- 't', '_', 'c', 'o', 'o', 'r', 'd', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'e', 'x', 't', 'r', 'a', 'c', 't', '_', 'n', 'a', 'm', 'e', '_', 'c', 'o', 'o', 'r',
- 'd', '#', '1', '<', '6', '>', '(', 'N', 'A', 'M', 'E', ',', 'i', 'n', '_', 's', 'p',
- 'o', 't', '_', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', ')', ';', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'i', 'n', '_', 'n', 'a',
- 'm', 'e', '_', 'l', '_', 'c', 'o', 'o', 'r', 'd', '=', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 'e', 'x', 't', 'r', 'a', 'c', 't', '_', 'n', 'a', 'm', 'e', '_', 'c',
- 'o', 'o', 'r', 'd', '#', '1', '<', '7', '>', '(', 'N', 'A', 'M', 'E', ',', 'i', 'n',
- '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', ')', ';', 'p',
- 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'a',
- 's', 'c', 'i', 'i', '>', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g',
- '#', '1', ' ', '.', 'S', 'P', 'O', 'T', '_', 'N', 'A', 'M', 'E', '=', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 'e', 'x', 't', 'r', 'a', 'c', 't', '_', 's', 'p', 'o',
- 't', '_', 'n', 'a', 'm', 'e', '#', '1', '(', 'N', 'A', 'M', 'E', ',', 'i', 'n', '_',
- 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', ')', ';', 'p', 'h',
- 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'a', 's',
- 'c', 'i', 'i', '>', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#',
- '1', ' ', '.', 'N', 'A', 'M', 'E', '_', 'F', 'M', 'T', '=', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'e', 'x', 't', 'r', 'a', 'c', 't', '_', 'n', 'a', 'm', 'e', '_',
- 'f', 'm', 't', '#', '1', '<', '\'', 's', 'k', 'e', 'y', '\'', '>', '(', 'N', 'A',
- 'M', 'E', ',', 'i', 'n', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '_', 't',
- 'o', 'k', ')', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 't', 'b', 'l', ':', 's', 't', 'a', 't', 's', '#', '1', '.', '2', '=',
- 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 't', 'a',
- 't', 's', '#', '1', '.', '1', ',', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':',
- 't', 'b', 'l', ':', 's', 'r', 'a', '#', '1', '.', '0', '.', '3', '{', 'I', 'N', 'S',
- 'D', 'C', ':', 'S', 'R', 'A', ':', 's', 'p', 'o', 't', 'i', 'd', '_', 't', ' ', 'm',
- 'i', 'n', '_', 's', 'p', 'o', 't', '_', 'i', 'd', '=', '<', 'I', 'N', 'S', 'D', 'C',
- ':', 'S', 'R', 'A', ':', 's', 'p', 'o', 't', 'i', 'd', '_', 't', '>', 'm', 'e', 't',
- 'a', ':', 'v', 'a', 'l', 'u', 'e', '#', '1', '<', '\'', 'S', 'T', 'A', 'T', 'S',
- '/', 'T', 'A', 'B', 'L', 'E', '/', 'S', 'P', 'O', 'T', '_', 'M', 'I', 'N', '\'',
- '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 's', 'p', 'o',
- 't', 'i', 'd', '_', 't', ' ', 'm', 'a', 'x', '_', 's', 'p', 'o', 't', '_', 'i', 'd',
- '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 's', 'p', 'o', 't', 'i',
- 'd', '_', 't', '>', 'm', 'e', 't', 'a', ':', 'v', 'a', 'l', 'u', 'e', '#', '1', '<',
- '\'', 'S', 'T', 'A', 'T', 'S', '/', 'T', 'A', 'B', 'L', 'E', '/', 'S', 'P', 'O',
- 'T', '_', 'M', 'A', 'X', '\'', '>', '(', ')', ';', 'U', '6', '4', ' ', 's', 'p',
- 'o', 't', '_', 'c', 'o', 'u', 'n', 't', '=', '<', 'U', '6', '4', '>', 'm', 'e', 't',
- 'a', ':', 'v', 'a', 'l', 'u', 'e', '#', '1', '<', '\'', 'S', 'T', 'A', 'T', 'S',
- '/', 'T', 'A', 'B', 'L', 'E', '/', 'S', 'P', 'O', 'T', '_', 'C', 'O', 'U', 'N', 'T',
- '\'', '>', '(', ')', ';', 'U', '6', '4', ' ', 'b', 'a', 's', 'e', '_', 'c', 'o',
- 'u', 'n', 't', '=', '<', 'U', '6', '4', '>', 'm', 'e', 't', 'a', ':', 'v', 'a', 'l',
- 'u', 'e', '#', '1', '<', '\'', 'S', 'T', 'A', 'T', 'S', '/', 'T', 'A', 'B', 'L',
- 'E', '/', 'B', 'A', 'S', 'E', '_', 'C', 'O', 'U', 'N', 'T', '\'', '>', '(', ')',
- ';', 'U', '6', '4', ' ', 'b', 'i', 'o', '_', 'b', 'a', 's', 'e', '_', 'c', 'o', 'u',
- 'n', 't', '=', '<', 'U', '6', '4', '>', 'm', 'e', 't', 'a', ':', 'v', 'a', 'l', 'u',
- 'e', '#', '1', '<', '\'', 'S', 'T', 'A', 'T', 'S', '/', 'T', 'A', 'B', 'L', 'E',
- '/', 'B', 'I', 'O', '_', 'B', 'A', 'S', 'E', '_', 'C', 'O', 'U', 'N', 'T', '\'',
- '>', '(', ')', ';', 'U', '6', '4', ' ', 'c', 'm', 'p', '_', 'b', 'a', 's', 'e', '_',
- 'c', 'o', 'u', 'n', 't', '=', '<', 'U', '6', '4', '>', 'm', 'e', 't', 'a', ':', 'v',
- 'a', 'l', 'u', 'e', '#', '1', '<', '\'', 'S', 'T', 'A', 'T', 'S', '/', 'T', 'A',
- 'B', 'L', 'E', '/', 'C', 'M', 'P', '_', 'B', 'A', 'S', 'E', '_', 'C', 'O', 'U', 'N',
- 'T', '\'', '>', '(', ')', '|', 'b', 'a', 's', 'e', '_', 'c', 'o', 'u', 'n', 't',
- ';', 't', 'r', 'i', 'g', 'g', 'e', 'r', ' ', 'm', 'e', 't', 'a', '_', 's', 't', 'a',
- 't', 's', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 't', 'a', 't', 's',
- '_', 't', 'r', 'i', 'g', 'g', 'e', 'r', '#', '1', '(', 'i', 'n', '_', 's', 't', 'a',
- 't', 's', '_', 'b', 'i', 'n', ',', 'i', 'n', '_', 'r', 'e', 'a', 'd', '_', 'l', 'e',
- 'n', ',', 'i', 'n', '_', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ',', 'i', 'n',
- '_', 's', 'p', 'o', 't', '_', 'g', 'r', 'o', 'u', 'p', ')', '|', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 's', 't', 'a', 't', 's', '_', 't', 'r', 'i', 'g', 'g', 'e',
- 'r', '#', '1', '(', 'i', 'n', '_', 's', 't', 'a', 't', 's', '_', 'b', 'i', 'n', ',',
- 'i', 'n', '_', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ',', 'i', 'n', '_', 'r', 'e',
- 'a', 'd', '_', 't', 'y', 'p', 'e', ')', '|', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 'c', 'm', 'p', '_', 's', 't', 'a', 't', 's', '_', 't', 'r', 'i', 'g', 'g', 'e',
- 'r', '#', '1', '(', 'i', 'n', '_', 'c', 'm', 'p', '_', 's', 't', 'a', 't', 's', '_',
- 'b', 'i', 'n', ',', 'i', 'n', '_', 's', 't', 'a', 't', 's', '_', 'q', 'u', 'a', 'l',
- ',', 'i', 'n', '_', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ',', 'i', 'n', '_', 'r',
- 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ',', 'i', 'n', '_', 's', 'p', 'o', 't', '_',
- 'g', 'r', 'o', 'u', 'p', ')', '|', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'c',
- 'm', 'p', '_', 's', 't', 'a', 't', 's', '_', 't', 'r', 'i', 'g', 'g', 'e', 'r', '#',
- '1', '(', 'i', 'n', '_', 'c', 'm', 'p', '_', 's', 't', 'a', 't', 's', '_', 'b', 'i',
- 'n', ',', 'i', 'n', '_', 's', 't', 'a', 't', 's', '_', 'q', 'u', 'a', 'l', ',', 'i',
- 'n', '_', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ',', 'i', 'n', '_', 'r', 'e', 'a',
- 'd', '_', 't', 'y', 'p', 'e', ')', '|', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'c', 'm', 'p', 'f', '_', 's', 't', 'a', 't', 's', '_', 't', 'r', 'i', 'g', 'g', 'e',
- 'r', '#', '1', '(', 'i', 'n', '_', 'c', 'm', 'p', '_', 's', 't', 'a', 't', 's', '_',
- 'b', 'i', 'n', ',', 'i', 'n', '_', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', ',', 'i',
- 'n', '_', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ',', 'i', 'n', '_', 'r', 'e', 'a',
- 'd', '_', 't', 'y', 'p', 'e', ',', 'i', 'n', '_', 's', 'p', 'o', 't', '_', 'g', 'r',
- 'o', 'u', 'p', ')', '|', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'c', 'm', 'p',
- 'f', '_', 's', 't', 'a', 't', 's', '_', 't', 'r', 'i', 'g', 'g', 'e', 'r', '#', '1',
- '(', 'i', 'n', '_', 'c', 'm', 'p', '_', 's', 't', 'a', 't', 's', '_', 'b', 'i', 'n',
- ',', 'i', 'n', '_', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', ',', 'i', 'n', '_', 'r',
- 'e', 'a', 'd', '_', 'l', 'e', 'n', ',', 'i', 'n', '_', 'r', 'e', 'a', 'd', '_', 't',
- 'y', 'p', 'e', ')', ';', 't', 'r', 'i', 'g', 'g', 'e', 'r', ' ', 'q', 'u', 'a', 'l',
- '_', 's', 't', 'a', 't', 's', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'p',
- 'h', 'r', 'e', 'd', '_', 's', 't', 'a', 't', 's', '_', 't', 'r', 'i', 'g', 'g', 'e',
- 'r', '#', '1', '(', 'i', 'n', '_', 'q', 'u', 'a', 'l', '_', 'p', 'h', 'r', 'e', 'd',
- ')', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 't', 'b', 'l', ':', 's', 'p', 'o', 't', 'd', 'e', 's', 'c', '_', 'n', 'o', 'c',
- 'o', 'l', '#', '1', '.', '0', '.', '2', '=', 'I', 'N', 'S', 'D', 'C', ':', 't', 'b',
- 'l', ':', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', '#', '1', '.', '0', '.', '1', ',',
- 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'p', 'o',
- 't', 'd', 'e', 's', 'c', '#', '1', '.', '0', '.', '2', '{', 'r', 'e', 'a', 'd', 'o',
- 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 'S', 'e', 'g', 'm', 'e', 'n', 't', ' ', 'L', 'A', 'B', 'E', 'L', '_',
- 'S', 'E', 'G', ' ', '=', ' ', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 's',
- 'e', 'g', '|', 'c', 'a', 's', 't', '#', '1', '(', 'o', 'u', 't', '_', 'l', 'a', 'b',
- 'e', 'l', '_', 's', 'e', 'g', '3', '2', ')', '|', 'c', 'a', 's', 't', '#', '1', '(',
- '_', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 's', 'e', 'g', '3', '2', ')',
- ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'S', 'e', 'g', 'm', 'e', 'n', 't', ' ',
- 'R', 'E', 'A', 'D', '_', 'S', 'E', 'G', ' ', '=', ' ', 'o', 'u', 't', '_', 'r', 'e',
- 'a', 'd', '_', 's', 'e', 'g', '|', 'c', 'a', 's', 't', '#', '1', '(', 'o', 'u', 't',
- '_', 'r', 'e', 'a', 'd', '_', 's', 'e', 'g', '3', '2', ')', '|', 'c', 'a', 's', 't',
- '#', '1', '(', '_', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's', 'e', 'g', '3',
- '2', ')', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm',
- 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'R', 'e', 'a', 'd', 'D', 'e',
- 's', 'c', ' ', 'R', 'E', 'A', 'D', '_', 'D', 'E', 'S', 'C', ' ', '=', ' ', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 'm', 'a', 'k', 'e', '_', 'r', 'e', 'a', 'd', '_',
- 'd', 'e', 's', 'c', '#', '1', '(', 'o', 'u', 't', '_', 'n', 'r', 'e', 'a', 'd', 's',
- ',', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', ',', 'o',
- 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ',', 'o', 'u', 't', '_', 'r',
- 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ',', '_', 'o', 'u', 't', '_', 'r', 'd', '_',
- 'f', 'i', 'l', 't', 'e', 'r', ',', 'o', 'u', 't', '_', 'c', 's', '_', 'k', 'e', 'y',
- ',', '_', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 's', 't', 'a', 'r', 't',
- ',', '_', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 'l', 'e', 'n', ',', '_',
- 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', ')', ';', 'r', 'e', 'a', 'd', 'o', 'n',
- 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 'S', 'p', 'o', 't', 'D', 'e', 's', 'c', ' ', 'S', 'P', 'O', 'T', '_', 'D',
- 'E', 'S', 'C', ' ', '=', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'm', 'a',
- 'k', 'e', '_', 's', 'p', 'o', 't', '_', 'd', 'e', 's', 'c', '#', '1', '(', 's', 'p',
- 'o', 't', '_', 'l', 'e', 'n', ',', 'f', 'i', 'x', 'e', 'd', '_', 's', 'p', 'o', 't',
- '_', 'l', 'e', 'n', ',', 's', 'i', 'g', 'n', 'a', 'l', '_', 'l', 'e', 'n', ',', 't',
- 'r', 'i', 'm', '_', 's', 't', 'a', 'r', 't', ',', 't', 'r', 'i', 'm', '_', 'l', 'e',
- 'n', ',', 'o', 'u', 't', '_', 'n', 'r', 'e', 'a', 'd', 's', ')', ';', 'r', 'e', 'a',
- 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 'S', 'I', 'G', 'N', 'A',
- 'L', '_', 'L', 'E', 'N', ' ', '=', ' ', 's', 'i', 'g', 'n', 'a', 'l', '_', 'l', 'e',
- 'n', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n',
- ' ', 'U', '1', '6', ' ', 'S', 'I', 'G', 'N', 'A', 'L', '_', 'L', 'E', 'N', ' ', '=',
- ' ', 'c', 'a', 's', 't', '#', '1', '(', 's', 'i', 'g', 'n', 'a', 'l', '_', 'l', 'e',
- 'n', ')', ';', 'U', '3', '2', ' ', '_', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l',
- '_', 's', 't', 'a', 'r', 't', 'U', '3', '2', '=', '(', 'U', '3', '2', ')', 'o', 'u',
- 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 's', 't', 'a', 'r', 't', ';', 'U', '3', '2',
- '[', '2', ']', ' ', '_', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 's', 'e',
- 'g', '3', '2', '=', '<', 'U', '3', '2', '>', 'p', 'a', 's', 't', 'e', '#', '1', '(',
- '_', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 's', 't', 'a', 'r', 't', 'U',
- '3', '2', ',', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 'l', 'e', 'n', ')',
- ';', 'U', '3', '2', ' ', '_', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's', 't',
- 'a', 'r', 't', 'U', '3', '2', '=', '(', 'U', '3', '2', ')', 'o', 'u', 't', '_', 'r',
- 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', ';', 'U', '3', '2', '[', '2', ']', ' ',
- '_', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's', 'e', 'g', '3', '2', '=', '<',
- 'U', '3', '2', '>', 'p', 'a', 's', 't', 'e', '#', '1', '(', '_', 'o', 'u', 't', '_',
- 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', 'U', '3', '2', ',', 'o', 'u', 't',
- '_', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':',
- 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 'f', 'i', 'l', 't', 'e', 'r', ' ', '_',
- 'o', 'u', 't', '_', 'r', 'd', '_', 'f', 'i', 'l', 't', 'e', 'r', '=', 'o', 'u', 't',
- '_', 'r', 'd', '_', 'f', 'i', 'l', 't', 'e', 'r', '|', '<', 'I', 'N', 'S', 'D', 'C',
- ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 'f', 'i', 'l', 't', 'e', 'r', '>',
- 'e', 'c', 'h', 'o', '#', '1', '<', '0', '>', '(', 'o', 'u', 't', '_', 'r', 'e', 'a',
- 'd', '_', 's', 't', 'a', 'r', 't', ')', ';', 'a', 's', 'c', 'i', 'i', ' ', '_', 'o',
- 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '=', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e',
- 'l', '|', '<', 'a', 's', 'c', 'i', 'i', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '\'',
- '\'', '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd',
- ':', 'z', 'e', 'r', 'o', ' ', '_', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '_',
- 's', 't', 'a', 'r', 't', '=', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 's',
- 't', 'a', 'r', 't', '|', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd',
- ':', 'z', 'e', 'r', 'o', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '0', '>', '(', 'o',
- 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', ')', ';', 'I', 'N',
- 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', '_', 'o', 'u',
- 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 'l', 'e', 'n', '=', 'o', 'u', 't', '_', 'l',
- 'a', 'b', 'e', 'l', '_', 'l', 'e', 'n', '|', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c',
- 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '0',
- '>', '(', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', ')',
- ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 't', 'b', 'l', ':', 's', 'p', 'o', 't', 'd', 'e', 's', 'c', '_', 'n', 'o', 'p', 'h',
- 'y', 's', '#', '1', '.', '0', '.', '2', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 't', 'b', 'l', ':', 's', 'p', 'o', 't', 'd', 'e', 's', 'c', '_', 'n', 'o', 'c',
- 'o', 'l', '#', '1', '.', '0', '.', '2', '{', 'U', '8', ' ', 'o', 'u', 't', '_', 'n',
- 'r', 'e', 'a', 'd', 's', '=', '.', 'N', 'R', 'E', 'A', 'D', 'S', ';', 'a', 's', 'c',
- 'i', 'i', ' ', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '=', '.', 'L', 'A', 'B',
- 'E', 'L', ';', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'x', 'r', 'e', 'a',
- 'd', '_', 't', 'y', 'p', 'e', ' ', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 't',
- 'y', 'p', 'e', '=', '.', 'R', 'E', 'A', 'D', '_', 'T', 'Y', 'P', 'E', ';', 'I', 'N',
- 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 'f', 'i', 'l', 't',
- 'e', 'r', ' ', 'o', 'u', 't', '_', 'r', 'd', '_', 'f', 'i', 'l', 't', 'e', 'r', '=',
- '.', 'R', 'D', '_', 'F', 'I', 'L', 'T', 'E', 'R', ';', 'I', 'N', 'S', 'D', 'C', ':',
- 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'o', 'u', 't', '_', 'l', 'a',
- 'b', 'e', 'l', '_', 's', 't', 'a', 'r', 't', '=', '.', 'L', 'A', 'B', 'E', 'L', '_',
- 'S', 'T', 'A', 'R', 'T', '|', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'z', 'e', 'r', 'o', ')', '<', 'U', '3', '2', '>', 'c', 'u', 't', '#', '1',
- '<', '0', '>', '(', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 's', 'e', 'g',
- '3', '2', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l',
- 'e', 'n', ' ', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 'l', 'e', 'n', '=',
- '.', 'L', 'A', 'B', 'E', 'L', '_', 'L', 'E', 'N', '|', '(', 'I', 'N', 'S', 'D', 'C',
- ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ')', '<', 'U', '3', '2', '>', 'c',
- 'u', 't', '#', '1', '<', '1', '>', '(', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l',
- '_', 's', 'e', 'g', '3', '2', ')', ';', 'U', '3', '2', '[', '2', ']', ' ', 'o', 'u',
- 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 's', 'e', 'g', '3', '2', '=', 'c', 'a', 's',
- 't', '#', '1', '(', '.', 'L', 'A', 'B', 'E', 'L', '_', 'S', 'E', 'G', ')', ';', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'o',
- 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', '=', '.', 'R', 'E',
- 'A', 'D', '_', 'S', 'T', 'A', 'R', 'T', '|', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c',
- 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ')', '<', 'U', '3', '2', '>', 'c', 'u',
- 't', '#', '1', '<', '0', '>', '(', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's',
- 'e', 'g', '3', '2', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd',
- ':', 'l', 'e', 'n', ' ', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n',
- '=', '.', 'R', 'E', 'A', 'D', '_', 'L', 'E', 'N', '|', '(', 'I', 'N', 'S', 'D', 'C',
- ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ')', '<', 'U', '3', '2', '>', 'c',
- 'u', 't', '#', '1', '<', '1', '>', '(', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_',
- 's', 'e', 'g', '3', '2', ')', ';', 'U', '3', '2', '[', '2', ']', ' ', 'o', 'u', 't',
- '_', 'r', 'e', 'a', 'd', '_', 's', 'e', 'g', '3', '2', '=', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'f', 'i', 'x', '_', 'r', 'e', 'a', 'd', '_', 's', 'e', 'g', '#',
- '1', '(', '.', 'R', 'E', 'A', 'D', '_', 'S', 'E', 'G', ',', 's', 'p', 'o', 't', '_',
- 'l', 'e', 'n', ')', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'p', 'o', 't', 'd', 'e', 's', 'c', '#',
- '1', '.', '0', '.', '2', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b',
- 'l', ':', 's', 'p', 'o', 't', 'd', 'e', 's', 'c', '_', 'n', 'o', 'p', 'h', 'y', 's',
- '#', '1', '.', '0', '.', '2', '{', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', '<', 'U', '8', '>', 'z', 'i', 'p', '_', 'e', 'n', 'c',
- 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'N', 'R', 'E', 'A', 'D', 'S', '=', 'N',
- 'R', 'E', 'A', 'D', 'S', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', '<', 'a', 's', 'c', 'i', 'i', '>', 'z', 'i', 'p', '_', 'e',
- 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'L', 'A', 'B', 'E', 'L', '=',
- 'L', 'A', 'B', 'E', 'L', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd',
- ':', 'z', 'e', 'r', 'o', '>', 'i', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i',
- 'n', 'g', '#', '1', ' ', '.', 'L', 'A', 'B', 'E', 'L', '_', 'S', 'T', 'A', 'R', 'T',
- '=', 'L', 'A', 'B', 'E', 'L', '_', 'S', 'T', 'A', 'R', 'T', ';', 'p', 'h', 'y', 's',
- 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', '>', 'i', 'z', 'i', 'p', '_',
- 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'L', 'A', 'B', 'E', 'L',
- '_', 'L', 'E', 'N', '=', 'L', 'A', 'B', 'E', 'L', '_', 'L', 'E', 'N', ';', 'p', 'h',
- 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N',
- 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', '>', 'i', 'z',
- 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'R', 'E',
- 'A', 'D', '_', 'S', 'T', 'A', 'R', 'T', '=', 'R', 'E', 'A', 'D', '_', 'S', 'T', 'A',
- 'R', 'T', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm',
- 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e',
- 'n', '>', 'i', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1',
- ' ', '.', 'R', 'E', 'A', 'D', '_', 'L', 'E', 'N', '=', 'i', 'n', '_', 'r', 'e', 'a',
- 'd', '_', 'l', 'e', 'n', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'x',
- 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', '>', 'z', 'i', 'p', '_', 'e', 'n', 'c',
- 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'R', 'E', 'A', 'D', '_', 'T', 'Y', 'P',
- 'E', '=', 'i', 'n', '_', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ';', 'p', 'h',
- 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N',
- 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 'f', 'i', 'l', 't',
- 'e', 'r', '>', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1',
- ' ', '.', 'R', 'D', '_', 'F', 'I', 'L', 'T', 'E', 'R', '=', 'R', 'E', 'A', 'D', '_',
- 'F', 'I', 'L', 'T', 'E', 'R', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 'p', 'o', 's', '#', '1', '.', '0',
- '.', '1', '=', 'I', 'N', 'S', 'D', 'C', ':', 't', 'b', 'l', ':', 's', 'e', 'q', 'u',
- 'e', 'n', 'c', 'e', '#', '1', '.', '0', '.', '1', '{', 'I', 'N', 'S', 'D', 'C', ':',
- 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ':', 'o', 'n', 'e', ' ', 'o', 'u', 't', '_',
- 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'p',
- 'o', 's', 'i', 't', 'i', 'o', 'n', ':', 'o', 'n', 'e', '>', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'm', 'a', 'k', 'e', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n',
- '#', '1', '<', '1', '>', '(', 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'p', 'a', 'c',
- 'k', 'e', 'd', ')', '|', '<', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'o', 's', 'i', 't',
- 'i', 'o', 'n', ':', 'o', 'n', 'e', '>', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'm', 'a', 'k', 'e', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '#', '1', '<', '1',
- '>', '(', 'o', 'u', 't', '_', '2', 'c', 's', '_', 'p', 'a', 'c', 'k', 'e', 'd', ')',
- ';', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'p', 'o', 's', '1', '6', ' ', 'o',
- 'u', 't', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '1', '6', '=', '<', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 'p', 'o', 's', '1', '6', '>', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 'm', 'a', 'k', 'e', '_', 'p', 'o', 's', 'i', 't', 'i', 'o',
- 'n', '#', '1', '<', '1', '>', '(', 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'p', 'a',
- 'c', 'k', 'e', 'd', ')', '|', '<', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'p',
- 'o', 's', '1', '6', '>', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'm', 'a', 'k',
- 'e', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '#', '1', '<', '1', '>', '(', 'o',
- 'u', 't', '_', '2', 'c', 's', '_', 'p', 'a', 'c', 'k', 'e', 'd', ')', ';', '}', 't',
- 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l',
- ':', 's', 'r', 'a', '_', 'n', 'o', 'p', 'o', 's', '#', '1', '.', '0', '.', '3', '=',
- 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'r', 'a',
- '#', '1', '.', '0', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't',
- 'b', 'l', ':', 's', 'p', 'o', 't', 'd', 'e', 's', 'c', '_', 'n', 'o', 'c', 'o', 'l',
- '#', '1', '.', '0', '.', '2', '{', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S',
- 'D', 'C', ':', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ':', 'o', 'n', 'e', ' ', 'P',
- 'O', 'S', 'I', 'T', 'I', 'O', 'N', ' ', '=', ' ', 'o', 'u', 't', '_', 'p', 'o', 's',
- 'i', 't', 'i', 'o', 'n', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'p', 'o', 's',
- '1', '6', ' ', 'P', 'O', 'S', 'I', 'T', 'I', 'O', 'N', ' ', '=', ' ', 'o', 'u', 't',
- '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '1', '6', ';', 'r', 'e', 'a', 'd', 'o',
- 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':',
- 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ':', 'z', 'e', 'r', 'o', ' ', 'P', 'O', 'S',
- 'I', 'T', 'I', 'O', 'N', ' ', '=', ' ', '(', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'o',
- 's', 'i', 't', 'i', 'o', 'n', ':', 'z', 'e', 'r', 'o', ')', '<', 'I', '3', '2', '>',
- 'd', 'i', 'f', 'f', '#', '1', '<', '1', '>', '(', 'o', 'u', 't', '_', 'p', 'o', 's',
- 'i', 't', 'i', 'o', 'n', ')', ';', 'U', '6', '4', ' ', 'b', 'a', 's', 'e', '_', 'c',
- 'o', 'u', 'n', 't', '=', '<', 'U', '6', '4', '>', 'm', 'e', 't', 'a', ':', 'v', 'a',
- 'l', 'u', 'e', '#', '1', '<', '\'', 'B', 'A', 'S', 'E', '_', 'C', 'O', 'U', 'N',
- 'T', '\'', '>', '(', ')', ';', 'U', '6', '4', ' ', 's', 'p', 'o', 't', '_', 'c',
- 'o', 'u', 'n', 't', '=', '<', 'U', '6', '4', '>', 'm', 'e', 't', 'a', ':', 'v', 'a',
- 'l', 'u', 'e', '#', '1', '<', '\'', '.', 's', 'e', 'q', '/', 's', 'p', 'o', 't',
- '\'', '>', '(', ')', '|', '<', 'U', '6', '4', '>', 'm', 'e', 't', 'a', ':', 'v',
- 'a', 'l', 'u', 'e', '#', '1', '<', '\'', '.', 's', 'e', 'q', '\'', '>', '(', ')',
- ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 't', 'b', 'l', ':', 's', 'r', 'a', '#', '1', '.', '0', '.', '3', '=', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'r', 'a', '_', 'n', 'o', 'p',
- 'o', 's', '#', '1', '.', '0', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 't', 'b', 'l', ':', 'p', 'o', 's', '#', '1', '.', '0', '.', '1', '{', '}', 't',
- 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l',
- ':', 's', 'r', 'a', '_', 'n', 'o', 'p', 'o', 's', '#', '2', '.', '1', '.', '3', '=',
- 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'r', 'a',
- '#', '1', '.', '0', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't',
- 'b', 'l', ':', 's', 'k', 'e', 'y', 'n', 'a', 'm', 'e', '#', '3', '.', '0', '.', '1',
- ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'p', 'o',
- 't', 'd', 'e', 's', 'c', '#', '1', '.', '0', '.', '2', ',', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 't', 'a', 't', 's', '#', '1', '.', '2',
- '{', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'o', 's',
- 'i', 't', 'i', 'o', 'n', ':', 'o', 'n', 'e', ' ', 'P', 'O', 'S', 'I', 'T', 'I', 'O',
- 'N', ' ', '=', ' ', 'o', 'u', 't', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ';',
- 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'p', 'o', 's', '1', '6', ' ', 'P', 'O', 'S',
- 'I', 'T', 'I', 'O', 'N', ' ', '=', ' ', 'c', 'a', 's', 't', '#', '1', '(', '_', 'c',
- 'l', 'i', 'p', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ')', ';', 'r', 'e', 'a',
- 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D',
- 'C', ':', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ':', 'z', 'e', 'r', 'o', ' ', 'P',
- 'O', 'S', 'I', 'T', 'I', 'O', 'N', ' ', '=', ' ', '(', 'I', 'N', 'S', 'D', 'C', ':',
- 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ':', 'z', 'e', 'r', 'o', ')', '<', 'I', '3',
- '2', '>', 'd', 'i', 'f', 'f', '#', '1', '<', '1', '>', '(', 'o', 'u', 't', '_', 'p',
- 'o', 's', 'i', 't', 'i', 'o', 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R',
- 'A', ':', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ', 'o', 'u', 't',
- '_', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '=', '.', 'P', 'L', 'A', 'T', 'F', 'O',
- 'R', 'M', ';', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n',
- ':', 'o', 'n', 'e', ' ', '_', 'c', 'l', 'i', 'p', '_', 'p', 'o', 's', 'i', 't', 'i',
- 'o', 'n', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'o', 's', 'i', 't', 'i', 'o',
- 'n', ':', 'o', 'n', 'e', '>', 'c', 'l', 'i', 'p', '#', '1', '<', '0', ',', '6', '5',
- '5', '3', '5', '>', '(', 'o', 'u', 't', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n',
- ')', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 't', 'b', 'l', ':', 's', 'r', 'a', '#', '2', '.', '1', '.', '3', '=', 'I', 'N',
- 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'r', 'a', '#', '1',
- '.', '0', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l',
- ':', 's', 'k', 'e', 'y', 'n', 'a', 'm', 'e', '#', '3', '.', '0', '.', '1', ',', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'p', 'o', 't', 'd',
- 'e', 's', 'c', '#', '1', '.', '0', '.', '2', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 't', 'b', 'l', ':', 's', 't', 'a', 't', 's', '#', '1', '.', '2', ',', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 'p', 'o', 's', '#', '1',
- '.', '0', '.', '1', '{', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l',
- 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'o', 's', 'i', 't', 'i', 'o',
- 'n', ':', 'o', 'n', 'e', ' ', 'P', 'O', 'S', 'I', 'T', 'I', 'O', 'N', ' ', '=', ' ',
- 'o', 'u', 't', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ';', 'r', 'e', 'a', 'd',
- 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'p', 'o', 's', '1', '6', ' ', 'P', 'O', 'S', 'I', 'T', 'I', 'O',
- 'N', ' ', '=', ' ', 'o', 'u', 't', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '1',
- '6', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n',
- ' ', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ':', 'z',
- 'e', 'r', 'o', ' ', 'P', 'O', 'S', 'I', 'T', 'I', 'O', 'N', ' ', '=', ' ', '(', 'I',
- 'N', 'S', 'D', 'C', ':', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ':', 'z', 'e', 'r',
- 'o', ')', '<', 'I', '3', '2', '>', 'd', 'i', 'f', 'f', '#', '1', '<', '1', '>', '(',
- 'o', 'u', 't', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ')', ';', '}', 't', 'a',
- 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':',
- 'c', 'l', 'i', 'p', '#', '1', '.', '0', '.', '2', '=', 'I', 'N', 'S', 'D', 'C', ':',
- 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'p', 'o', 't', 'd', 'e', 's', 'c', '#',
- '1', '.', '0', '.', '2', '{', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ' ', 'C', 'L', 'I', 'P', '_',
- 'A', 'D', 'A', 'P', 'T', 'E', 'R', '_', 'L', 'E', 'F', 'T', ' ', '=', ' ', 'o', 'u',
- 't', '_', 'c', 'l', 'i', 'p', '_', 'a', 'd', 'a', 'p', 't', '_', 'l', 'e', 'f', 't',
- ';', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o',
- 'r', 'd', ':', 'o', 'n', 'e', ' ', 'C', 'L', 'I', 'P', '_', 'A', 'D', 'A', 'P', 'T',
- 'E', 'R', '_', 'R', 'I', 'G', 'H', 'T', ' ', '=', ' ', 'o', 'u', 't', '_', 'c', 'l',
- 'i', 'p', '_', 'a', 'd', 'a', 'p', 't', '_', 'r', 'i', 'g', 'h', 't', ';', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'o', 'n', 'e', ' ', 'C', 'L', 'I', 'P', '_', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '_',
- 'L', 'E', 'F', 'T', ' ', '=', ' ', 'o', 'u', 't', '_', 'c', 'l', 'i', 'p', '_', 'q',
- 'u', 'a', 'l', '_', 'l', 'e', 'f', 't', ';', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ' ', 'C', 'L',
- 'I', 'P', '_', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '_', 'R', 'I', 'G', 'H', 'T', ' ',
- '=', ' ', 'o', 'u', 't', '_', 'c', 'l', 'i', 'p', '_', 'q', 'u', 'a', 'l', '_', 'r',
- 'i', 'g', 'h', 't', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l',
- 'u', 'm', 'n', ' ', 'U', '1', '6', ' ', 'C', 'L', 'I', 'P', '_', 'A', 'D', 'A', 'P',
- 'T', 'E', 'R', '_', 'L', 'E', 'F', 'T', ' ', '=', ' ', '.', 'C', 'L', 'I', 'P', '_',
- 'A', 'D', 'A', 'P', 'T', 'E', 'R', '_', 'L', 'E', 'F', 'T', '|', 'c', 'a', 's', 't',
- '#', '1', '(', 'o', 'u', 't', '_', 'c', 'l', 'i', 'p', '_', 'a', 'd', 'a', 'p', 't',
- '_', 'l', 'e', 'f', 't', ')', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', 'U', '1', '6', ' ', 'C', 'L', 'I', 'P', '_', 'A', 'D',
- 'A', 'P', 'T', 'E', 'R', '_', 'R', 'I', 'G', 'H', 'T', ' ', '=', ' ', '.', 'C', 'L',
- 'I', 'P', '_', 'A', 'D', 'A', 'P', 'T', 'E', 'R', '_', 'R', 'I', 'G', 'H', 'T', '|',
- 'c', 'a', 's', 't', '#', '1', '(', 'o', 'u', 't', '_', 'c', 'l', 'i', 'p', '_', 'a',
- 'd', 'a', 'p', 't', '_', 'r', 'i', 'g', 'h', 't', ')', ';', 'r', 'e', 'a', 'd', 'o',
- 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'U', '1', '6', ' ', 'C', 'L',
- 'I', 'P', '_', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '_', 'L', 'E', 'F', 'T', ' ', '=',
- ' ', 'c', 'a', 's', 't', '#', '1', '(', 'o', 'u', 't', '_', 'c', 'l', 'i', 'p', '_',
- 'q', 'u', 'a', 'l', '_', 'l', 'e', 'f', 't', ')', ';', 'r', 'e', 'a', 'd', 'o', 'n',
- 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'U', '1', '6', ' ', 'C', 'L', 'I',
- 'P', '_', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '_', 'R', 'I', 'G', 'H', 'T', ' ', '=',
- ' ', 'c', 'a', 's', 't', '#', '1', '(', 'o', 'u', 't', '_', 'c', 'l', 'i', 'p', '_',
- 'q', 'u', 'a', 'l', '_', 'r', 'i', 'g', 'h', 't', ')', ';', 'r', 'e', 'a', 'd', 'o',
- 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':',
- 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'C', 'L', 'I', 'P', '_', 'A',
- 'D', 'A', 'P', 'T', 'E', 'R', '_', 'L', 'E', 'F', 'T', ' ', '=', ' ', '(', 'I', 'N',
- 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ')', '<', 'I',
- '3', '2', '>', 'd', 'i', 'f', 'f', '#', '1', '<', '1', '>', '(', 'l', 'i', 'm', '_',
- 'c', 'l', 'i', 'p', '_', 'a', 'd', 'a', 'p', 't', '_', 'l', 'e', 'f', 't', ')', ';',
- 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'C',
- 'L', 'I', 'P', '_', 'A', 'D', 'A', 'P', 'T', 'E', 'R', '_', 'R', 'I', 'G', 'H', 'T',
- ' ', '=', ' ', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z',
- 'e', 'r', 'o', ')', '<', 'I', '3', '2', '>', 'd', 'i', 'f', 'f', '#', '1', '<', '1',
- '>', '(', 'l', 'i', 'm', '_', 'c', 'l', 'i', 'p', '_', 'a', 'd', 'a', 'p', 't', '_',
- 'r', 'i', 'g', 'h', 't', ')', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd',
- ':', 'z', 'e', 'r', 'o', ' ', 'C', 'L', 'I', 'P', '_', 'Q', 'U', 'A', 'L', 'I', 'T',
- 'Y', '_', 'L', 'E', 'F', 'T', ' ', '=', ' ', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c',
- 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ')', '<', 'I', '3', '2', '>', 'd', 'i',
- 'f', 'f', '#', '1', '<', '1', '>', '(', 'l', 'i', 'm', '_', 'c', 'l', 'i', 'p', '_',
- 'q', 'u', 'a', 'l', '_', 'l', 'e', 'f', 't', ')', ';', 'r', 'e', 'a', 'd', 'o', 'n',
- 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c',
- 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'C', 'L', 'I', 'P', '_', 'Q', 'U',
- 'A', 'L', 'I', 'T', 'Y', '_', 'R', 'I', 'G', 'H', 'T', ' ', '=', ' ', '(', 'I', 'N',
- 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ')', '<', 'I',
- '3', '2', '>', 'd', 'i', 'f', 'f', '#', '1', '<', '1', '>', '(', 'l', 'i', 'm', '_',
- 'c', 'l', 'i', 'p', '_', 'q', 'u', 'a', 'l', '_', 'r', 'i', 'g', 'h', 't', ')', ';',
- 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ' ', 'o',
- 'u', 't', '_', 'c', 'l', 'i', 'p', '_', 'a', 'd', 'a', 'p', 't', '_', 'l', 'e', 'f',
- 't', '=', 'c', 'a', 's', 't', '#', '1', '(', '.', 'C', 'L', 'I', 'P', '_', 'A', 'D',
- 'A', 'P', 'T', 'E', 'R', '_', 'L', 'E', 'F', 'T', ')', ';', 'I', 'N', 'S', 'D', 'C',
- ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ' ', 'o', 'u', 't', '_', 'c', 'l',
- 'i', 'p', '_', 'a', 'd', 'a', 'p', 't', '_', 'r', 'i', 'g', 'h', 't', '=', 'c', 'a',
- 's', 't', '#', '1', '(', '.', 'C', 'L', 'I', 'P', '_', 'A', 'D', 'A', 'P', 'T', 'E',
- 'R', '_', 'R', 'I', 'G', 'H', 'T', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o',
- 'o', 'r', 'd', ':', 'o', 'n', 'e', ' ', 'o', 'u', 't', '_', 'c', 'l', 'i', 'p', '_',
- 'q', 'u', 'a', 'l', '_', 'l', 'e', 'f', 't', '=', 'c', 'a', 's', 't', '#', '1', '(',
- '.', 'C', 'L', 'I', 'P', '_', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '_', 'L', 'E', 'F',
- 'T', ')', '|', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o',
- 'n', 'e', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '1', '>', '(', ')', ';', 'I', 'N',
- 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ' ', 'o', 'u', 't',
- '_', 'c', 'l', 'i', 'p', '_', 'q', 'u', 'a', 'l', '_', 'r', 'i', 'g', 'h', 't', '=',
- 'c', 'a', 's', 't', '#', '1', '(', '.', 'C', 'L', 'I', 'P', '_', 'Q', 'U', 'A', 'L',
- 'I', 'T', 'Y', '_', 'R', 'I', 'G', 'H', 'T', ')', '|', 'c', 'a', 's', 't', '#', '1',
- '(', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':',
- 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ' ', 's', 'p', 'o', 't', '_', 'r', 'i',
- 'g', 'h', 't', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'o', 'n', 'e', ')', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', ';', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ' ', 'l', 'i', 'm', '_', 'c',
- 'l', 'i', 'p', '_', 'a', 'd', 'a', 'p', 't', '_', 'l', 'e', 'f', 't', '=', '<', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', '>', 'c', 'l',
- 'i', 'p', '#', '1', '<', '1', ',', '2', '1', '4', '7', '4', '8', '3', '6', '4', '7',
- '>', '(', 'o', 'u', 't', '_', 'c', 'l', 'i', 'p', '_', 'a', 'd', 'a', 'p', 't', '_',
- 'l', 'e', 'f', 't', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd',
- ':', 'o', 'n', 'e', ' ', 'm', 'a', 'x', '_', 'c', 'l', 'i', 'p', '_', 'a', 'd', 'a',
- 'p', 't', '_', 'r', 'i', 'g', 'h', 't', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c',
- 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ',', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o',
- 'o', 'r', 'd', ':', 'o', 'n', 'e', '>', 'm', 'a', 'p', '#', '1', '<', '0', ',', '2',
- '1', '4', '7', '4', '8', '3', '6', '4', '7', '>', '(', 'o', 'u', 't', '_', 'c', 'l',
- 'i', 'p', '_', 'a', 'd', 'a', 'p', 't', '_', 'r', 'i', 'g', 'h', 't', ')', ';', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ' ', 'l', 'i',
- 'm', '_', 'c', 'l', 'i', 'p', '_', 'a', 'd', 'a', 'p', 't', '_', 'r', 'i', 'g', 'h',
- 't', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n',
- 'e', '>', 'm', 'i', 'n', '#', '1', '(', 's', 'p', 'o', 't', '_', 'r', 'i', 'g', 'h',
- 't', ',', 'm', 'a', 'x', '_', 'c', 'l', 'i', 'p', '_', 'a', 'd', 'a', 'p', 't', '_',
- 'r', 'i', 'g', 'h', 't', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'o', 'n', 'e', ' ', 'l', 'i', 'm', '_', 'c', 'l', 'i', 'p', '_', 'q', 'u',
- 'a', 'l', '_', 'l', 'e', 'f', 't', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o',
- 'o', 'r', 'd', ':', 'o', 'n', 'e', '>', 'c', 'l', 'i', 'p', '#', '1', '<', '1', ',',
- '2', '1', '4', '7', '4', '8', '3', '6', '4', '7', '>', '(', 'o', 'u', 't', '_', 'c',
- 'l', 'i', 'p', '_', 'q', 'u', 'a', 'l', '_', 'l', 'e', 'f', 't', ')', ';', 'I', 'N',
- 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ' ', 'm', 'a', 'x',
- '_', 'c', 'l', 'i', 'p', '_', 'q', 'u', 'a', 'l', '_', 'r', 'i', 'g', 'h', 't', '=',
- '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ',',
- 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', '>', 'm',
- 'a', 'p', '#', '1', '<', '0', ',', '2', '1', '4', '7', '4', '8', '3', '6', '4', '7',
- '>', '(', 'o', 'u', 't', '_', 'c', 'l', 'i', 'p', '_', 'q', 'u', 'a', 'l', '_', 'r',
- 'i', 'g', 'h', 't', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd',
- ':', 'o', 'n', 'e', ' ', 'l', 'i', 'm', '_', 'c', 'l', 'i', 'p', '_', 'q', 'u', 'a',
- 'l', '_', 'r', 'i', 'g', 'h', 't', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o',
- 'o', 'r', 'd', ':', 'o', 'n', 'e', '>', 'm', 'i', 'n', '#', '1', '(', 's', 'p', 'o',
- 't', '_', 'r', 'i', 'g', 'h', 't', ',', 'm', 'a', 'x', '_', 'c', 'l', 'i', 'p', '_',
- 'q', 'u', 'a', 'l', '_', 'r', 'i', 'g', 'h', 't', ')', ';', 'I', 'N', 'S', 'D', 'C',
- ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', ' ', 'm', 'a', 'x', '_', 'c', 'l',
- 'i', 'p', '_', 'l', 'e', 'f', 't', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o',
- 'o', 'r', 'd', ':', 'o', 'n', 'e', '>', 'm', 'a', 'x', '#', '1', '(', 'l', 'i', 'm',
- '_', 'c', 'l', 'i', 'p', '_', 'a', 'd', 'a', 'p', 't', '_', 'l', 'e', 'f', 't', ',',
- 'l', 'i', 'm', '_', 'c', 'l', 'i', 'p', '_', 'q', 'u', 'a', 'l', '_', 'l', 'e', 'f',
- 't', ')', '|', 'l', 'i', 'm', '_', 'c', 'l', 'i', 'p', '_', 'a', 'd', 'a', 'p', 't',
- '_', 'l', 'e', 'f', 't', '|', 'l', 'i', 'm', '_', 'c', 'l', 'i', 'p', '_', 'q', 'u',
- 'a', 'l', '_', 'l', 'e', 'f', 't', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o',
- 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'm', 'a', 'x', '_', 'z', 'c', 'l', 'i', 'p',
- '_', 'l', 'e', 'f', 't', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'z', 'e', 'r', 'o', ')', '<', 'I', '3', '2', '>', 'd', 'i', 'f', 'f', '#',
- '1', '<', '1', '>', '(', 'm', 'a', 'x', '_', 'c', 'l', 'i', 'p', '_', 'l', 'e', 'f',
- 't', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n',
- 'e', ' ', 'm', 'i', 'n', '_', 'c', 'l', 'i', 'p', '_', 'r', 'i', 'g', 'h', 't', '=',
- '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', '>',
- 'm', 'i', 'n', '#', '1', '(', 'l', 'i', 'm', '_', 'c', 'l', 'i', 'p', '_', 'a', 'd',
- 'a', 'p', 't', '_', 'r', 'i', 'g', 'h', 't', ',', 'l', 'i', 'm', '_', 'c', 'l', 'i',
- 'p', '_', 'q', 'u', 'a', 'l', '_', 'r', 'i', 'g', 'h', 't', ')', '|', 'l', 'i', 'm',
- '_', 'c', 'l', 'i', 'p', '_', 'a', 'd', 'a', 'p', 't', '_', 'r', 'i', 'g', 'h', 't',
- '|', 'l', 'i', 'm', '_', 'c', 'l', 'i', 'p', '_', 'q', 'u', 'a', 'l', '_', 'r', 'i',
- 'g', 'h', 't', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z',
- 'e', 'r', 'o', ' ', 'b', 'i', 'o', '_', 's', 't', 'a', 'r', 't', '=', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 'b', 'i', 'o', '_', 's', 't', 'a', 'r', 't', '#', '1',
- '(', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', ',', 'o',
- 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ')', ';', 'I', 'N', 'S',
- 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 't', 'r', 'i',
- 'm', '_', 's', 't', 'a', 'r', 't', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o',
- 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', '>', 'm', 'a', 'x', '#', '1', '(', 'b', 'i',
- 'o', '_', 's', 't', 'a', 'r', 't', ',', 'm', 'a', 'x', '_', 'z', 'c', 'l', 'i', 'p',
- '_', 'l', 'e', 'f', 't', ')', '|', 'b', 'i', 'o', '_', 's', 't', 'a', 'r', 't', ';',
- 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ',
- 'b', 'i', 'o', '_', 'e', 'n', 'd', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'b', 'i', 'o', '_', 'e', 'n', 'd', '#', '1', '<', 'f', 'a', 'l', 's', 'e', '>', '(',
- 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', ',', 'o', 'u',
- 't', '_', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ',', 'o', 'u', 't', '_', 'r',
- 'e', 'a', 'd', '_', 'l', 'e', 'n', ')', ';', 'I', '3', '2', ' ', 't', 'r', 'i', 'm',
- '_', 's', 't', 'o', 'p', '=', '<', 'I', '3', '2', '>', 'm', 'a', 'x', '#', '1', '(',
- 'm', 'i', 'n', '_', 'c', 'l', 'i', 'p', '_', 'r', 'i', 'g', 'h', 't', ',', 't', 'r',
- 'i', 'm', '_', 's', 't', 'a', 'r', 't', ')', '|', 's', 'p', 'o', 't', '_', 'r', 'i',
- 'g', 'h', 't', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l',
- 'e', 'n', ' ', 't', 'r', 'i', 'm', '_', 'l', 'e', 'n', '=', '(', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ')', '<', 'I', '3', '2', '>',
- 'd', 'i', 'f', 'f', '#', '1', '(', 't', 'r', 'i', 'm', '_', 's', 't', 'o', 'p', ',',
- 't', 'r', 'i', 'm', '_', 's', 't', 'a', 'r', 't', ')', ';', '}', 't', 'a', 'b', 'l',
- 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':',
- 'c', 'o', 'm', 'm', 'o', 'n', '#', '1', '.', '0', '.', '4', '=', 'I', 'N', 'S', 'D',
- 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'r', 'a', '#', '1', '.', '0',
- '.', '3', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 'c',
- 'l', 'i', 'p', '#', '1', '.', '0', '.', '2', '{', 'c', 'o', 'l', 'u', 'm', 'n', ' ',
- 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'F', 'L',
- 'O', 'W', '_', 'C', 'H', 'A', 'R', 'S', ' ', '=', ' ', 'o', 'u', 't', '_', 'f', 'l',
- 'o', 'w', '_', 'c', 'h', 'a', 'r', 's', ';', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'K', 'E', 'Y',
- '_', 'S', 'E', 'Q', 'U', 'E', 'N', 'C', 'E', ' ', '=', ' ', 'o', 'u', 't', '_', 'k',
- 'e', 'y', '_', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', ';', 'c', 'o', 'l', 'u', 'm',
- 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ',
- 'L', 'I', 'N', 'K', 'E', 'R', '_', 'S', 'E', 'Q', 'U', 'E', 'N', 'C', 'E', ' ', '=',
- ' ', 'o', 'u', 't', '_', 'l', 'i', 'n', 'k', 'e', 'r', '_', 's', 'e', 'q', 'u', 'e',
- 'n', 'c', 'e', ';', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'i',
- 's', 'a', 'm', 'p', '1', ' ', 'S', 'I', 'G', 'N', 'A', 'L', ' ', '=', ' ', 'o', 'u',
- 't', '_', 's', 'i', 'g', 'n', 'a', 'l', ';', 'a', 's', 'c', 'i', 'i', ' ', 'p', 'l',
- 'a', 't', 'f', 'o', 'r', 'm', '_', 'n', 'a', 'm', 'e', '=', '<', 'a', 's', 'c', 'i',
- 'i', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '\'', '4', '5', '4', '\'', '>', '(',
- ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ',
- 'i', 'n', '_', 'f', 'l', 'o', 'w', '_', 'c', 'h', 'a', 'r', 's', '=', '<', 'I', 'N',
- 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ',', 'I', 'N', 'S', 'D',
- 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', '>', 'm', 'a', 'p', '#', '1', '<',
- '\'', 'a', 'c', 'g', 't', 'n', '.', '\'', ',', '\'', 'A', 'C', 'G', 'T', 'N', 'N',
- '\'', '>', '(', 'F', 'L', 'O', 'W', '_', 'C', 'H', 'A', 'R', 'S', ')', ';', 'I',
- 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'i', 'n', '_',
- 'k', 'e', 'y', '_', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', '=', '<', 'I', 'N', 'S',
- 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ',', 'I', 'N', 'S', 'D', 'C',
- ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', '>', 'm', 'a', 'p', '#', '1', '<', '\'',
- 'a', 'c', 'g', 't', 'n', '.', '\'', ',', '\'', 'A', 'C', 'G', 'T', 'N', 'N', '\'',
- '>', '(', 'K', 'E', 'Y', '_', 'S', 'E', 'Q', 'U', 'E', 'N', 'C', 'E', ')', ';', 'I',
- 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'i', 'n', '_',
- 'l', 'i', 'n', 'k', 'e', 'r', '_', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', '=', '<',
- 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ',', 'I', 'N',
- 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', '>', 'm', 'a', 'p', '#',
- '1', '<', '\'', 'a', 'c', 'g', 't', 'n', '.', '\'', ',', '\'', 'A', 'C', 'G', 'T',
- 'N', 'N', '\'', '>', '(', 'L', 'I', 'N', 'K', 'E', 'R', '_', 'S', 'E', 'Q', 'U',
- 'E', 'N', 'C', 'E', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':',
- 'b', 'i', 'n', ' ', 'o', 'u', 't', '_', 'f', 'l', 'o', 'w', '_', 'b', 'i', 'n', '=',
- '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ',', 'I',
- 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n', '>', 'm', 'a', 'p',
- '#', '1', '<', '\'', 'A', 'C', 'G', 'T', 'N', '\'', ',', '[', '0', ',', '1', ',',
- '2', ',', '3', ',', '4', ']', '>', '(', 'o', 'u', 't', '_', 'f', 'l', 'o', 'w', '_',
- 'c', 'h', 'a', 'r', 's', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a',
- ':', 'b', 'i', 'n', ' ', 'o', 'u', 't', '_', 'k', 'e', 'y', '_', 'b', 'i', 'n', '=',
- '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ',', 'I',
- 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i', 'n', '>', 'm', 'a', 'p',
- '#', '1', '<', '\'', 'A', 'C', 'G', 'T', 'N', '\'', ',', '[', '0', ',', '1', ',',
- '2', ',', '3', ',', '4', ']', '>', '(', 'o', 'u', 't', '_', 'k', 'e', 'y', '_', 's',
- 'e', 'q', 'u', 'e', 'n', 'c', 'e', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2',
- 'n', 'a', ':', 'b', 'i', 'n', ' ', 'o', 'u', 't', '_', 'l', 'i', 'n', 'k', 'e', 'r',
- '_', 'b', 'i', 'n', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't',
- 'e', 'x', 't', ',', 'I', 'N', 'S', 'D', 'C', ':', 'x', '2', 'n', 'a', ':', 'b', 'i',
- 'n', '>', 'm', 'a', 'p', '#', '1', '<', '\'', 'A', 'C', 'G', 'T', 'N', '\'', ',',
- '[', '0', ',', '1', ',', '2', ',', '3', ',', '4', ']', '>', '(', 'o', 'u', 't', '_',
- 'l', 'i', 'n', 'k', 'e', 'r', '_', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', ')', ';',
- 'N', 'C', 'B', 'I', ':', 'i', 's', 'a', 'm', 'p', '1', ' ', 'o', 'u', 't', '_', 's',
- 'i', 'g', 'n', 'a', 'l', '=', '.', 'S', 'I', 'G', 'N', 'A', 'L', ';', '}', 't', 'a',
- 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4',
- '_', ':', 't', 'b', 'l', ':', 'v', '2', '#', '1', '.', '0', '.', '7', '=', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'r', 'a', '_', 'n', 'o',
- 'p', 'o', 's', '#', '2', '.', '1', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 't', 'b',
- 'l', ':', 'b', 'a', 's', 'e', '_', 's', 'p', 'a', 'c', 'e', '#', '2', '.', '0', '.',
- '3', ',', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'p', 'h', 'r', 'e', 'd', '_',
- 'q', 'u', 'a', 'l', 'i', 't', 'y', '#', '2', '.', '0', '.', '4', ',', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'c', 'o', 'm', 'm', 'o',
- 'n', '#', '1', '.', '0', '.', '4', '{', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ',
- 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'v', 'a', 'l', ' ', 'R', 'E', 'G', 'I', 'O', 'N', ' ', '=', ' ', '(', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ')', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 'e', 'x', 't', 'r', 'a', 'c', 't', '_', 'n', 'a',
- 'm', 'e', '_', 'c', 'o', 'o', 'r', 'd', '#', '1', '<', '6', '>', '(', '_', 'o', 'u',
- 't', '_', 'n', 'a', 'm', 'e', ',', 'o', 'u', 't', '_', 's', 'p', 'o', 't', '_', 'n',
- 'a', 'm', 'e', '_', 't', 'o', 'k', ')', ';', 't', 'e', 'x', 't', ':', 't', 'o', 'k',
- 'e', 'n', ' ', 'o', 'u', 't', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '_',
- 't', 'o', 'k', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4',
- '_', ':', 't', 'o', 'k', 'e', 'n', 'i', 'z', 'e', '_', 's', 'p', 'o', 't', '_', 'n',
- 'a', 'm', 'e', '#', '1', '(', '_', 'o', 'u', 't', '_', 'n', 'a', 'm', 'e', ')', ';',
- 't', 'e', 'x', 't', ':', 't', 'o', 'k', 'e', 'n', ' ', 'i', 'n', '_', 's', 'p', 'o',
- 't', '_', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', '=', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 't', 'o', 'k', 'e', 'n', 'i', 'z', 'e',
- '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '#', '1', '(', 'N', 'A', 'M', 'E',
- ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ',
- 'o', 'u', 't', '_', 'f', 'l', 'o', 'w', '_', 'c', 'h', 'a', 'r', 's', '=', '.', 'F',
- 'L', 'O', 'W', '_', 'C', 'H', 'A', 'R', 'S', '|', '<', 'I', 'N', 'S', 'D', 'C', ':',
- 'd', 'n', 'a', ':', 't', 'e', 'x', 't', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '\'',
- 'T', 'A', 'C', 'G', '\'', '>', '(', '.', 'S', 'I', 'G', 'N', 'A', 'L', ')', '|',
- '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', '>', 'e',
- 'c', 'h', 'o', '#', '1', '<', '\'', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T',
- 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A',
- 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C',
- 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G',
- 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T',
- 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A',
- 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C',
- 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G',
- 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T',
- 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A',
- 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C',
- 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G',
- 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T',
- 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A',
- 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C',
- 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G',
- 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T',
- 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A',
- 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C',
- 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G',
- 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T',
- 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A',
- 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C',
- 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G', 'T', 'A', 'C', 'G',
- '\'', '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't',
- 'e', 'x', 't', ' ', 'o', 'u', 't', '_', 'k', 'e', 'y', '_', 's', 'e', 'q', 'u', 'e',
- 'n', 'c', 'e', '=', '.', 'K', 'E', 'Y', '_', 'S', 'E', 'Q', 'U', 'E', 'N', 'C', 'E',
- '|', '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', '>',
- 'e', 'c', 'h', 'o', '#', '1', '<', '\'', 'T', 'C', 'A', 'G', '\'', '>', '(', ')',
- ';', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'o',
- 'u', 't', '_', 'l', 'i', 'n', 'k', 'e', 'r', '_', 's', 'e', 'q', 'u', 'e', 'n', 'c',
- 'e', '=', '.', 'L', 'I', 'N', 'K', 'E', 'R', '_', 'S', 'E', 'Q', 'U', 'E', 'N', 'C',
- 'E', ';', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ':',
- 'o', 'n', 'e', ' ', 'o', 'u', 't', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '=',
- '.', 'P', 'O', 'S', 'I', 'T', 'I', 'O', 'N', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a',
- 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'd',
- 'n', 'a', ':', 't', 'e', 'x', 't', '>', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd',
- 'i', 'n', 'g', '#', '1', ' ', '.', 'F', 'L', 'O', 'W', '_', 'C', 'H', 'A', 'R', 'S',
- '=', 'i', 'n', '_', 'f', 'l', 'o', 'w', '_', 'c', 'h', 'a', 'r', 's', ';', 'p', 'h',
- 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N',
- 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', '>', 'z', 'i', 'p', '_',
- 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'K', 'E', 'Y', '_', 'S',
- 'E', 'Q', 'U', 'E', 'N', 'C', 'E', '=', 'i', 'n', '_', 'k', 'e', 'y', '_', 's', 'e',
- 'q', 'u', 'e', 'n', 'c', 'e', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':',
- 't', 'e', 'x', 't', '>', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g',
- '#', '1', ' ', '.', 'L', 'I', 'N', 'K', 'E', 'R', '_', 'S', 'E', 'Q', 'U', 'E', 'N',
- 'C', 'E', '=', 'i', 'n', '_', 'l', 'i', 'n', 'k', 'e', 'r', '_', 's', 'e', 'q', 'u',
- 'e', 'n', 'c', 'e', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l',
- 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4',
- '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'P', 'O', 'S', 'I', 'T', 'I',
- 'O', 'N', '#', '2', ' ', '.', 'P', 'O', 'S', 'I', 'T', 'I', 'O', 'N', '=', 'P', 'O',
- 'S', 'I', 'T', 'I', 'O', 'N', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4',
- '5', '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'C', 'L', 'I', 'P',
- '#', '2', ' ', '.', 'C', 'L', 'I', 'P', '_', 'A', 'D', 'A', 'P', 'T', 'E', 'R', '_',
- 'L', 'E', 'F', 'T', '=', 'C', 'L', 'I', 'P', '_', 'A', 'D', 'A', 'P', 'T', 'E', 'R',
- '_', 'L', 'E', 'F', 'T', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5',
- '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'C', 'L', 'I', 'P', '#',
- '2', ' ', '.', 'C', 'L', 'I', 'P', '_', 'A', 'D', 'A', 'P', 'T', 'E', 'R', '_', 'R',
- 'I', 'G', 'H', 'T', '=', 'C', 'L', 'I', 'P', '_', 'A', 'D', 'A', 'P', 'T', 'E', 'R',
- '_', 'R', 'I', 'G', 'H', 'T', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4',
- '5', '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'C', 'L', 'I', 'P',
- '#', '2', ' ', '.', 'C', 'L', 'I', 'P', '_', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '_',
- 'L', 'E', 'F', 'T', '=', 'C', 'L', 'I', 'P', '_', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y',
- '_', 'L', 'E', 'F', 'T', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5',
- '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'C', 'L', 'I', 'P', '#',
- '2', ' ', '.', 'C', 'L', 'I', 'P', '_', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '_', 'R',
- 'I', 'G', 'H', 'T', '=', 'C', 'L', 'I', 'P', '_', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y',
- '_', 'R', 'I', 'G', 'H', 'T', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4',
- '5', '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'S', 'I', 'G', 'N',
- 'A', 'L', '#', '2', ' ', '.', 'S', 'I', 'G', 'N', 'A', 'L', '=', 'S', 'I', 'G', 'N',
- 'A', 'L', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'q', 'u', 'a', 'l', '4', '_',
- 'n', 'o', 'c', 'o', 'l', '#', '1', '.', '0', '.', '1', '=', 'I', 'N', 'S', 'D', 'C',
- ':', 't', 'b', 'l', ':', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', '#', '1', '.', '0',
- '.', '1', ',', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'l', 'o', 'g', '_', 'o',
- 'd', 'd', 's', '_', 'q', 'u', 'a', 'l', 'i', 't', 'y', '_', 'n', 'o', 'c', 'o', 'l',
- '#', '1', '.', '0', '.', '1', '{', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', '4', ' ',
- 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ' ', '=', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a',
- 'l', '4', ';', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', '4', ' ', 'o', 'u', 't',
- '_', 'q', 'u', 'a', 'l', '4', '=', '<', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l',
- '4', '>', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', '#', '1',
- '(', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '4', '_', 's', 'w', 'a', 'p', 'p', 'e',
- 'd', ',', 'r', 'e', 'a', 'd', '_', 'u', 'n', 'p', 'a', 'c', 'k', ')', '|', '<', 'N',
- 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', '4', '>', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 'r', 'o', 't', 'a', 't', 'e', '#', '1', '<', 'f', 'a', 'l', 's', 'e', '>',
- '(', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '4', '_', 'r', 'o', 't', 'a', 't', 'e',
- 'd', ',', 'r', 'e', 'a', 'd', '_', 'u', 'n', 'p', 'a', 'c', 'k', ')', ';', 'I', 'N',
- 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o',
- 'd', 'd', 's', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '1', '_', 'c', 'h', '0',
- '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l',
- 'o', 'g', '_', 'o', 'd', 'd', 's', '>', 'c', 'u', 't', '#', '1', '<', '0', '>', '(',
- 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '4', '_', 's', 'w', 'a', 'p', 'p', 'e', 'd',
- ')', '|', '<', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':',
- 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '>', 'c', 'u', 't', '#', '1', '<', '0', '>',
- '(', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '4', '_', 'r', 'o', 't', 'a', 't', 'e',
- 'd', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':',
- 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l',
- '1', '_', 'c', 'l', 'i', 'p', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a',
- 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '>', 'c', 'l', 'i',
- 'p', '#', '1', '<', '-', '5', ',', '1', '2', '7', '>', '(', 'o', 'u', 't', '_', 'q',
- 'u', 'a', 'l', '1', '_', 'c', 'h', '0', ')', ';', 'U', '3', '2', ' ', 'o', 'u', 't',
- '_', 'q', 'u', 'a', 'l', '4', '_', '3', '2', '=', 'r', 'e', 'd', 'i', 'm', 'e', 'n',
- 's', 'i', 'o', 'n', '#', '1', '(', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '4', '_',
- 's', 'w', 'a', 'p', 'p', 'e', 'd', ')', '|', 'r', 'e', 'd', 'i', 'm', 'e', 'n', 's',
- 'i', 'o', 'n', '#', '1', '(', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '4', '_', 'r',
- 'o', 't', 'a', 't', 'e', 'd', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a',
- 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ' ', 'o', 'u', 't',
- '_', 'q', 'u', 'a', 'l', '1', '_', 'f', 'i', 'v', 'e', 's', '=', '<', 'U', '3', '2',
- ',', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l', 'o',
- 'g', '_', 'o', 'd', 'd', 's', '>', 'm', 'a', 'p', '#', '1', '<', '4', '2', '2', '7',
- '5', '9', '5', '2', '5', '9', ',', '-', '6', '>', '(', 'o', 'u', 't', '_', 'q', 'u',
- 'a', 'l', '4', '_', '3', '2', ',', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '1', '_',
- 'c', 'l', 'i', 'p', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i',
- 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ' ', 'o', 'u', 't', '_', 'q',
- 'u', 'a', 'l', '1', '_', 'n', '=', '<', 'U', '8', ',', 'I', 'N', 'S', 'D', 'C', ':',
- 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '>',
- 'm', 'a', 'p', '#', '1', '<', '[', '1', ',', '2', ',', '3', ']', ',', '[', '0', ',',
- '0', ',', '0', ']', '>', '(', 'r', 'e', 'a', 'd', '_', 'u', 'n', 'p', 'a', 'c', 'k',
- ',', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '1', '_', 'f', 'i', 'v', 'e', 's', ')',
- ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l', 'o',
- 'g', '_', 'o', 'd', 'd', 's', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'l',
- 'o', 'g', '_', 'o', 'd', 'd', 's', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u',
- 'a', 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ',', 'I', 'N',
- 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o',
- 'd', 'd', 's', '>', 'm', 'a', 'p', '#', '1', '<', '-', '6', ',', '-', '6', '>', '(',
- 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '1', '_', 'n', ',', 'o', 'u', 't', '_', 'q',
- 'u', 'a', 'l', '1', '_', 'c', 'l', 'i', 'p', ')', ';', '}', 't', 'a', 'b', 'l', 'e',
- ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n',
- 'a', ':', 'q', 'u', 'a', 'l', '4', '#', '1', '.', '0', '.', '1', '=', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'q', 'u',
- 'a', 'l', '4', '_', 'n', 'o', 'c', 'o', 'l', '#', '1', '.', '0', '.', '1', '{', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'q',
- 'u', 'a', 'l', '4', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '4', '_', 's', 'w',
- 'a', 'p', 'p', 'e', 'd', '=', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ';', '}', 't',
- 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l',
- 'u', 'm', 'i', 'n', 'a', ':', 'q', 'u', 'a', 'l', '4', '#', '2', '.', '1', '=', 'N',
- 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'b', 'a', 's', 'e', '_', 's', 'p', 'a', 'c',
- 'e', '#', '2', '.', '0', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':',
- 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '_', 'q', 'u', 'a', 'l', 'i', 't', 'y', '_',
- 'n', 'o', 'c', 'o', 'l', '#', '2', '.', '1', '{', 'c', 'o', 'l', 'u', 'm', 'n', ' ',
- 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', '4', ' ', 'Q', 'U', 'A', 'L', 'I', 'T',
- 'Y', ' ', '=', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '4', ';', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'q', 'u', 'a',
- 'l', '4', ' ', 'i', 'n', '_', 'q', 'u', 'a', 'l', '4', '=', '(', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'q', 'u', 'a', 'l',
- '4', ')', '<', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', '4', '>', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', '#', '1', '(', 'Q', 'U', 'A', 'L',
- 'I', 'T', 'Y', ',', 'i', 'n', '_', 'x', '2', 'n', 'a', '_', 'b', 'i', 'n', ')', '|',
- '(', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd',
- '_', 'q', 'u', 'a', 'l', '4', ')', '<', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l',
- '4', '>', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', '#', '1',
- '(', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ',', 'i', 'n', '_', '2', 'n', 'a', '_', 'b',
- 'i', 'n', ')', ';', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', '4', ' ', 'o', 'u',
- 't', '_', 'q', 'u', 'a', 'l', '4', '=', '<', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'q', 'u', 'a', 'l', '4', '>', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', '#', '1', '(', '.', 'Q', 'U',
- 'A', 'L', 'I', 'T', 'Y', ',', 'o', 'u', 't', '_', 'x', '2', 'n', 'a', '_', 'b', 'i',
- 'n', ')', ';', 'N', 'C', 'B', 'I', ':', 'q', 'u', 'a', 'l', '4', ' ', 'i', 'n', '_',
- 's', 't', 'a', 't', 's', '_', 'q', 'u', 'a', 'l', '=', 'i', 'n', '_', 'q', 'u', 'a',
- 'l', '4', ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':',
- 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', ' ', 'i', 'n', '_', 'q', 'u', 'a', 'l', '_',
- 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'q',
- 'u', 'a', 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '>', 'c',
- 'u', 't', '#', '1', '<', '0', '>', '(', 'i', 'n', '_', 'q', 'u', 'a', 'l', '4', ')',
- ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'l', 'o',
- 'g', '_', 'o', 'd', 'd', 's', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'l',
- 'o', 'g', '_', 'o', 'd', 'd', 's', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u',
- 'a', 'l', 'i', 't', 'y', ':', 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '>', 'c', 'u',
- 't', '#', '1', '<', '0', '>', '(', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ')', ';',
- 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'q', 'u', 'a', 'l', '4', '_', 'e', 'n', 'c',
- 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '=',
- 'i', 'n', '_', 'q', 'u', 'a', 'l', '4', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':',
- 'c', 'o', 'm', 'm', 'o', 'n', '#', '1', '.', '0', '.', '3', '=', 'I', 'N', 'S', 'D',
- 'C', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'r', 'a', '#', '1', '.', '0',
- '.', '3', '{', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm',
- 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l',
- ' ', 'L', 'A', 'N', 'E', ' ', '=', ' ', 'o', 'u', 't', '_', 'l', 'a', 'n', 'e', '_',
- 'c', 'o', 'o', 'r', 'd', ';', 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'v', 'a', 'l', ' ', 'T', 'I', 'L', 'E', ' ', '=', ' ', 'o', 'u', 't', '_', 't', 'i',
- 'l', 'e', '_', 'c', 'o', 'o', 'r', 'd', ';', 'a', 's', 'c', 'i', 'i', ' ', 'p', 'l',
- 'a', 't', 'f', 'o', 'r', 'm', '_', 'n', 'a', 'm', 'e', '=', '<', 'a', 's', 'c', 'i',
- 'i', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '\'', 'I', 'L', 'L', 'U', 'M', 'I',
- 'N', 'A', '\'', '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o',
- 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'b', 'i', 'o', '_', 's', 't', 'a', 'r', 't',
- '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'b', 'i', 'o', '_', 's', 't', 'a',
- 'r', 't', '#', '1', '(', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 's', 't', 'a',
- 'r', 't', ',', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ')',
- ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o',
- ' ', 't', 'r', 'i', 'm', '_', 's', 't', 'a', 'r', 't', '=', 'b', 'i', 'o', '_', 's',
- 't', 'a', 'r', 't', ';', 'U', '3', '2', ' ', 't', 'r', 'i', 'm', '_', 'l', 'e', 'f',
- 't', '=', '(', 'U', '3', '2', ')', 't', 'r', 'i', 'm', '_', 's', 't', 'a', 'r', 't',
- ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ',
- 't', 'r', 'i', 'm', '_', 'l', 'e', 'n', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c',
- 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ')', '<', 'U', '3', '2', '>', 'd', 'i', 'f',
- 'f', '#', '1', '(', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', ',', 't', 'r', 'i', 'm',
- '_', 'l', 'e', 'f', 't', ')', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 't', 'b',
- 'l', ':', 'v', '2', '#', '1', '.', '0', '.', '4', '=', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'r', 'a', '#', '2', '.', '1', '.', '3', ',',
- 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'b', 'a', 's', 'e', '_', 's', 'p', 'a',
- 'c', 'e', '#', '2', '.', '0', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'c', 'o', 'm', 'm', 'o', 'n', '#',
- '1', '.', '0', '.', '3', '{', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I',
- ':', 'f', 's', 'a', 'm', 'p', '4', ' ', 'S', 'I', 'G', 'N', 'A', 'L', '{', 'r', 'e',
- 'a', 'd', '=', 'o', 'u', 't', '_', 's', 'i', 'g', 'n', 'a', 'l', ';', 'v', 'a', 'l',
- 'i', 'd', 'a', 't', 'e', '=', '<', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p',
- '4', '>', 'n', 'o', '_', 'c', 'o', 'm', 'p', 'a', 'r', 'e', '#', '1', '(', 'i', 'n',
- '_', 's', 'i', 'g', 'n', 'a', 'l', ',', 'o', 'u', 't', '_', 's', 'i', 'g', 'n', 'a',
- 'l', ')', ';', '}', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'f',
- 's', 'a', 'm', 'p', '4', ' ', 'N', 'O', 'I', 'S', 'E', '{', 'r', 'e', 'a', 'd', '=',
- 'o', 'u', 't', '_', 'n', 'o', 'i', 's', 'e', ';', 'v', 'a', 'l', 'i', 'd', 'a', 't',
- 'e', '=', '<', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', '>', 'n', 'o',
- '_', 'c', 'o', 'm', 'p', 'a', 'r', 'e', '#', '1', '(', 'i', 'n', '_', 'n', 'o', 'i',
- 's', 'e', ',', 'o', 'u', 't', '_', 'n', 'o', 'i', 's', 'e', ')', ';', '}', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', ' ',
- 'I', 'N', 'T', 'E', 'N', 'S', 'I', 'T', 'Y', '{', 'r', 'e', 'a', 'd', '=', 'o', 'u',
- 't', '_', 'i', 'n', 't', 'e', 'n', 's', 'i', 't', 'y', ';', 'v', 'a', 'l', 'i', 'd',
- 'a', 't', 'e', '=', '<', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', '>',
- 'n', 'o', '_', 'c', 'o', 'm', 'p', 'a', 'r', 'e', '#', '1', '(', 'i', 'n', '_', 'i',
- 'n', 't', 'e', 'n', 's', 'i', 't', 'y', ',', 'o', 'u', 't', '_', 'i', 'n', 't', 'e',
- 'n', 's', 'i', 't', 'y', ')', ';', '}', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o',
- 'r', 'd', ':', 'v', 'a', 'l', ' ', 'o', 'u', 't', '_', 'l', 'a', 'n', 'e', '_', 'c',
- 'o', 'o', 'r', 'd', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd',
- ':', 'v', 'a', 'l', ')', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e', 'x', 't',
- 'r', 'a', 'c', 't', '_', 'n', 'a', 'm', 'e', '_', 'c', 'o', 'o', 'r', 'd', '#', '1',
- '<', '7', '>', '(', '_', 'o', 'u', 't', '_', 'n', 'a', 'm', 'e', ',', 'o', 'u', 't',
- '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', ')', ';', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'o', 'u',
- 't', '_', 't', 'i', 'l', 'e', '_', 'c', 'o', 'o', 'r', 'd', '=', '(', 'I', 'N', 'S',
- 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ')', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 'e', 'x', 't', 'r', 'a', 'c', 't', '_', 'n', 'a', 'm', 'e',
- '_', 'c', 'o', 'o', 'r', 'd', '#', '1', '<', '6', '>', '(', '_', 'o', 'u', 't', '_',
- 'n', 'a', 'm', 'e', ',', 'o', 'u', 't', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm',
- 'e', '_', 't', 'o', 'k', ')', ';', 't', 'e', 'x', 't', ':', 't', 'o', 'k', 'e', 'n',
- ' ', 'o', 'u', 't', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '_', 't', 'o',
- 'k', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i',
- 'n', 'a', ':', 't', 'o', 'k', 'e', 'n', 'i', 'z', 'e', '_', 's', 'p', 'o', 't', '_',
- 'n', 'a', 'm', 'e', '#', '1', '(', '_', 'o', 'u', 't', '_', 'n', 'a', 'm', 'e', ')',
- ';', 't', 'e', 'x', 't', ':', 't', 'o', 'k', 'e', 'n', ' ', 'i', 'n', '_', 's', 'p',
- 'o', 't', '_', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', '=', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 't', 'o', 'k', 'e',
- 'n', 'i', 'z', 'e', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '#', '1', '(',
- 'N', 'A', 'M', 'E', ')', ';', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4',
- ' ', 'i', 'n', '_', 's', 'i', 'g', 'n', 'a', 'l', '=', 'S', 'I', 'G', 'N', 'A', 'L',
- ';', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', ' ', 'o', 'u', 't', '_',
- 's', 'i', 'g', 'n', 'a', 'l', '=', '<', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p', '4', '>', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', '#', '1', '(', '.', 'S', 'I',
- 'G', 'N', 'A', 'L', ',', 'o', 'u', 't', '_', 'x', '2', 'n', 'a', '_', 'b', 'i', 'n',
- ')', ';', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', ' ', 'i', 'n', '_',
- 'n', 'o', 'i', 's', 'e', '=', 'N', 'O', 'I', 'S', 'E', ';', 'N', 'C', 'B', 'I', ':',
- 'f', 's', 'a', 'm', 'p', '4', ' ', 'o', 'u', 't', '_', 'n', 'o', 'i', 's', 'e', '=',
- '.', 'N', 'O', 'I', 'S', 'E', ';', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p',
- '4', ' ', 'i', 'n', '_', 'i', 'n', 't', 'e', 'n', 's', 'i', 't', 'y', '=', 'I', 'N',
- 'T', 'E', 'N', 'S', 'I', 'T', 'Y', ';', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm',
- 'p', '4', ' ', 'o', 'u', 't', '_', 'i', 'n', 't', 'e', 'n', 's', 'i', 't', 'y', '=',
- '<', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', '>', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 'd', 'e', 'n', 'o', 'r', 'm', 'a', 'l', 'i', 'z', 'e', '#',
- '1', '(', 'o', 'u', 't', '_', 'n', 'o', 'r', 'm', '_', 'i', 'n', 't', 'e', 'n', 's',
- 'i', 't', 'y', ',', 'o', 'u', 't', '_', 'x', '2', 'n', 'a', '_', 'b', 'i', 'n', ')',
- ';', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', ' ', 'o', 'u', 't', '_',
- 'n', 'o', 'r', 'm', '_', 'i', 'n', 't', 'e', 'n', 's', 'i', 't', 'y', '=', '(', 'N',
- 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', ')', '<', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p',
- '4', '>', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', '#', '1',
- '(', '.', 'I', 'N', 'T', 'E', 'N', 'S', 'I', 'T', 'Y', ',', 'o', 'u', 't', '_', 'x',
- '2', 'n', 'a', '_', 'b', 'i', 'n', ')', ';', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a',
- 'm', 'p', '4', ' ', 'i', 'n', '_', 'n', 'o', 'r', 'm', '_', 'i', 'n', 't', 'e', 'n',
- 's', 'i', 't', 'y', '=', '<', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4',
- '>', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'n', 'o', 'r', 'm', 'a', 'l', 'i',
- 'z', 'e', '#', '1', '(', 'i', 'n', '_', 'i', 'n', 't', 'e', 'n', 's', 'i', 't', 'y',
- ',', 'i', 'n', '_', 'x', '2', 'n', 'a', '_', 'b', 'i', 'n', ')', '|', '<', 'N', 'C',
- 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', '>', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 'n', 'o', 'r', 'm', 'a', 'l', 'i', 'z', 'e', '#', '1', '(', 'i', 'n', '_',
- 'i', 'n', 't', 'e', 'n', 's', 'i', 't', 'y', ',', 'i', 'n', '_', '2', 'n', 'a', '_',
- 'b', 'i', 'n', ')', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l',
- 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u',
- 'm', 'i', 'n', 'a', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'S', 'I', 'G',
- 'N', 'A', 'L', '#', '2', ' ', '.', 'S', 'I', 'G', 'N', 'A', 'L', '=', '(', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's',
- 'a', 'm', 'p', '4', ')', '<', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4',
- '>', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', '#', '1', '(',
- 'i', 'n', '_', 's', 'i', 'g', 'n', 'a', 'l', ',', 'i', 'n', '_', 'x', '2', 'n', 'a',
- '_', 'b', 'i', 'n', ')', '|', '(', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's',
- 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p', '4', ')', '<', 'N', 'C',
- 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', '>', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 's', 'w', 'a', 'p', '#', '1', '(', 'i', 'n', '_', 's', 'i', 'g', 'n', 'a',
- 'l', ',', 'i', 'n', '_', '2', 'n', 'a', '_', 'b', 'i', 'n', ')', ';', 'p', 'h', 'y',
- 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'e', 'n', 'c',
- 'o', 'd', 'i', 'n', 'g', ':', 'N', 'O', 'I', 'S', 'E', '#', '2', ' ', '.', 'N', 'O',
- 'I', 'S', 'E', '=', 'i', 'n', '_', 'n', 'o', 'i', 's', 'e', ';', 'p', 'h', 'y', 's',
- 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'e', 'n', 'c', 'o',
- 'd', 'i', 'n', 'g', ':', 'I', 'N', 'T', 'E', 'N', 'S', 'I', 'T', 'Y', '#', '2', ' ',
- '.', 'I', 'N', 'T', 'E', 'N', 'S', 'I', 'T', 'Y', '=', '(', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p',
- '4', ')', '<', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', '>', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', '#', '1', '(', 'i', 'n', '_',
- 'n', 'o', 'r', 'm', '_', 'i', 'n', 't', 'e', 'n', 's', 'i', 't', 'y', ',', 'i', 'n',
- '_', 'x', '2', 'n', 'a', '_', 'b', 'i', 'n', ')', '|', '(', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p',
- '4', ')', '<', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', '>', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', '#', '1', '(', 'i', 'n', '_',
- 'n', 'o', 'r', 'm', '_', 'i', 'n', 't', 'e', 'n', 's', 'i', 't', 'y', ',', 'i', 'n',
- '_', '2', 'n', 'a', '_', 'b', 'i', 'n', ')', ';', '}', 't', 'a', 'b', 'l', 'e', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a',
- ':', 't', 'b', 'l', ':', 'q', '4', ':', 'v', '2', '#', '1', '.', '1', '=', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 't',
- 'b', 'l', ':', 'v', '2', '#', '1', '.', '0', '.', '4', ',', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'q', 'u', 'a', 'l',
- '4', '#', '2', '.', '1', '{', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 't', 'b', 'l',
- ':', 'q', '1', ':', 'v', '2', '#', '1', '.', '1', '=', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 't', 'b', 'l', ':', 'v',
- '2', '#', '1', '.', '0', '.', '4', ',', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':',
- 'l', 'o', 'g', '_', 'o', 'd', 'd', 's', '_', 'q', 'u', 'a', 'l', 'i', 't', 'y', '#',
- '2', '.', '1', '{', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 't', 'b', 'l', ':', 'p',
- 'h', 'r', 'e', 'd', ':', 'v', '2', '#', '1', '.', '0', '.', '4', '=', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 't', 'b',
- 'l', ':', 'v', '2', '#', '1', '.', '0', '.', '4', ',', 'N', 'C', 'B', 'I', ':', 't',
- 'b', 'l', ':', 'p', 'h', 'r', 'e', 'd', '_', 'q', 'u', 'a', 'l', 'i', 't', 'y', '#',
- '2', '.', '0', '.', '4', '{', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 'A', 'B', 'I', ':', 'c', 'o', 'm', 'm', 'o', 'n', '#', '1',
- '.', '0', '.', '3', '=', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 't', 'b',
- 'l', ':', 's', 'r', 'a', '#', '1', '.', '0', '.', '3', '{', 'c', 'o', 'l', 'u', 'm',
- 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l',
- ' ', 'P', 'A', 'N', 'E', 'L', ' ', '=', ' ', 'o', 'u', 't', '_', 'p', 'a', 'n', 'e',
- 'l', '_', 'c', 'o', 'o', 'r', 'd', ';', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C',
- 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', ' ', 'S', 'I', 'G', 'N', 'A', 'L', ' ',
- '=', ' ', 'o', 'u', 't', '_', 's', 'i', 'g', 'n', 'a', 'l', ';', 'a', 's', 'c', 'i',
- 'i', ' ', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'n', 'a', 'm', 'e', '=', '<',
- 'a', 's', 'c', 'i', 'i', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '\'', 'A', 'B',
- 'S', 'O', 'L', 'I', 'D', '\'', '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':',
- 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'b', 'i', 'o', '_', 's', 't',
- 'a', 'r', 't', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'b', 'i', 'o', '_',
- 's', 't', 'a', 'r', 't', '#', '1', '(', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_',
- 's', 't', 'a', 'r', 't', ',', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 't', 'y',
- 'p', 'e', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z',
- 'e', 'r', 'o', ' ', 't', 'r', 'i', 'm', '_', 's', 't', 'a', 'r', 't', '=', 'b', 'i',
- 'o', '_', 's', 't', 'a', 'r', 't', ';', 'U', '3', '2', ' ', 't', 'r', 'i', 'm', '_',
- 'l', 'e', 'f', 't', '=', '(', 'U', '3', '2', ')', 't', 'r', 'i', 'm', '_', 's', 't',
- 'a', 'r', 't', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l',
- 'e', 'n', ' ', 't', 'r', 'i', 'm', '_', 'l', 'e', 'n', '=', '(', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ')', '<', 'U', '3', '2', '>',
- 'd', 'i', 'f', 'f', '#', '1', '(', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', ',', 't',
- 'r', 'i', 'm', '_', 'l', 'e', 'f', 't', ')', ';', 'N', 'C', 'B', 'I', ':', 'f', 's',
- 'a', 'm', 'p', '4', ' ', 'o', 'u', 't', '_', 's', 'i', 'g', 'n', 'a', 'l', '=', '(',
- 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', ')', '<', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a', 'm',
- 'p', '4', '>', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', '#',
- '1', '(', 'o', 'u', 't', '_', 's', 'i', 'g', 'n', 'a', 'l', '_', 's', 'w', 'a', 'p',
- 'p', 'e', 'd', ',', 'o', 'u', 't', '_', 'x', '2', 'c', 's', '_', 'b', 'i', 'n', ')',
- ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'A', 'B', 'I', ':', 't', 'b', 'l', ':', 'v', '2', '#', '1', '.', '0', '.', '4', '=',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'r', 'a', '#',
- '2', '.', '1', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'c', 'o',
- 'l', 'o', 'r', '_', 's', 'p', 'a', 'c', 'e', '#', '2', '.', '1', ',', 'N', 'C', 'B',
- 'I', ':', 't', 'b', 'l', ':', 'p', 'h', 'r', 'e', 'd', '_', 'q', 'u', 'a', 'l', 'i',
- 't', 'y', '#', '2', '.', '0', '.', '4', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 'A', 'B', 'I', ':', 'c', 'o', 'm', 'm', 'o', 'n', '#', '1', '.', '0', '.', '3',
- '{', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm',
- 'p', '1', ' ', 'F', 'T', 'C', '{', 'r', 'e', 'a', 'd', '=', 'o', 'u', 't', '_', 'f',
- 't', 'c', ';', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '=', '<', 'F', '3', '2', '>',
- 'n', 'o', '_', 'c', 'o', 'm', 'p', 'a', 'r', 'e', '#', '1', '(', 'i', 'n', '_', 'f',
- 't', 'c', ',', 'o', 'u', 't', '_', 'f', 't', 'c', ')', ';', '}', 'c', 'o', 'l', 'u',
- 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '1', ' ', 'F', 'A',
- 'M', '{', 'r', 'e', 'a', 'd', '=', 'o', 'u', 't', '_', 'f', 'a', 'm', ';', 'v', 'a',
- 'l', 'i', 'd', 'a', 't', 'e', '=', '<', 'F', '3', '2', '>', 'n', 'o', '_', 'c', 'o',
- 'm', 'p', 'a', 'r', 'e', '#', '1', '(', 'i', 'n', '_', 'f', 'a', 'm', ',', 'o', 'u',
- 't', '_', 'f', 'a', 'm', ')', ';', '}', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C',
- 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '1', ' ', 'C', 'Y', '3', '{', 'r', 'e', 'a',
- 'd', '=', 'o', 'u', 't', '_', 'c', 'y', '3', ';', 'v', 'a', 'l', 'i', 'd', 'a', 't',
- 'e', '=', '<', 'F', '3', '2', '>', 'n', 'o', '_', 'c', 'o', 'm', 'p', 'a', 'r', 'e',
- '#', '1', '(', 'i', 'n', '_', 'c', 'y', '3', ',', 'o', 'u', 't', '_', 'c', 'y', '3',
- ')', ';', '}', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'f', 's',
- 'a', 'm', 'p', '1', ' ', 'T', 'X', 'R', '{', 'r', 'e', 'a', 'd', '=', 'o', 'u', 't',
- '_', 't', 'x', 'r', ';', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '=', '<', 'F', '3',
- '2', '>', 'n', 'o', '_', 'c', 'o', 'm', 'p', 'a', 'r', 'e', '#', '1', '(', 'i', 'n',
- '_', 't', 'x', 'r', ',', 'o', 'u', 't', '_', 't', 'x', 'r', ')', ';', '}', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '1', ' ',
- 'C', 'Y', '5', '{', 'r', 'e', 'a', 'd', '=', 'o', 'u', 't', '_', 'c', 'y', '5', ';',
- 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '=', '<', 'F', '3', '2', '>', 'n', 'o', '_',
- 'c', 'o', 'm', 'p', 'a', 'r', 'e', '#', '1', '(', 'i', 'n', '_', 'c', 'y', '5', ',',
- 'o', 'u', 't', '_', 'c', 'y', '5', ')', ';', '}', 'I', 'N', 'S', 'D', 'C', ':', 'c',
- 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'o', 'u', 't', '_', 'p', 'a', 'n', 'e',
- 'l', '_', 'c', 'o', 'o', 'r', 'd', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o',
- 'o', 'r', 'd', ':', 'v', 'a', 'l', ')', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'e', 'x', 't', 'r', 'a', 'c', 't', '_', 'n', 'a', 'm', 'e', '_', 'c', 'o', 'o', 'r',
- 'd', '#', '1', '<', '6', '>', '(', '_', 'o', 'u', 't', '_', 'n', 'a', 'm', 'e', ',',
- 'o', 'u', 't', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k',
- ')', ';', 't', 'e', 'x', 't', ':', 't', 'o', 'k', 'e', 'n', ' ', 'o', 'u', 't', '_',
- 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', '=', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 'A', 'B', 'I', ':', 't', 'o', 'k', 'e', 'n', 'i', 'z',
- 'e', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '#', '1', '(', '_', 'o', 'u',
- 't', '_', 'n', 'a', 'm', 'e', ')', ';', 't', 'e', 'x', 't', ':', 't', 'o', 'k', 'e',
- 'n', ' ', 'i', 'n', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '_', 't', 'o',
- 'k', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'A', 'B', 'I', ':', 't', 'o',
- 'k', 'e', 'n', 'i', 'z', 'e', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '#',
- '1', '(', 'N', 'A', 'M', 'E', ')', ';', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm',
- 'p', '1', ' ', 'i', 'n', '_', 'f', 't', 'c', '=', 'F', 'T', 'C', ';', 'N', 'C', 'B',
- 'I', ':', 'f', 's', 'a', 'm', 'p', '1', ' ', 'o', 'u', 't', '_', 'f', 't', 'c', '=',
- '(', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '1', ')', '<', 'F', '3', '2',
- '>', 'c', 'u', 't', '#', '1', '<', '0', '>', '(', 'o', 'u', 't', '_', 's', 'i', 'g',
- 'n', 'a', 'l', ')', ';', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '1', ' ',
- 'i', 'n', '_', 'f', 'a', 'm', '=', 'F', 'A', 'M', ';', 'N', 'C', 'B', 'I', ':', 'f',
- 's', 'a', 'm', 'p', '1', ' ', 'o', 'u', 't', '_', 'f', 'a', 'm', '=', '(', 'N', 'C',
- 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '1', ')', '<', 'F', '3', '2', '>', 'c', 'u',
- 't', '#', '1', '<', '0', '>', '(', 'o', 'u', 't', '_', 's', 'i', 'g', 'n', 'a', 'l',
- ')', ';', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '1', ' ', 'i', 'n', '_',
- 'c', 'y', '3', '=', 'C', 'Y', '3', ';', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm',
- 'p', '1', ' ', 'o', 'u', 't', '_', 'c', 'y', '3', '=', '(', 'N', 'C', 'B', 'I', ':',
- 'f', 's', 'a', 'm', 'p', '1', ')', '<', 'F', '3', '2', '>', 'c', 'u', 't', '#', '1',
- '<', '1', '>', '(', 'o', 'u', 't', '_', 's', 'i', 'g', 'n', 'a', 'l', ')', ';', 'N',
- 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '1', ' ', 'i', 'n', '_', 't', 'x', 'r',
- '=', 'T', 'X', 'R', ';', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '1', ' ',
- 'o', 'u', 't', '_', 't', 'x', 'r', '=', '(', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a',
- 'm', 'p', '1', ')', '<', 'F', '3', '2', '>', 'c', 'u', 't', '#', '1', '<', '2', '>',
- '(', 'o', 'u', 't', '_', 's', 'i', 'g', 'n', 'a', 'l', ')', ';', 'N', 'C', 'B', 'I',
- ':', 'f', 's', 'a', 'm', 'p', '1', ' ', 'i', 'n', '_', 'c', 'y', '5', '=', 'C', 'Y',
- '5', ';', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '1', ' ', 'o', 'u', 't',
- '_', 'c', 'y', '5', '=', '(', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '1',
- ')', '<', 'F', '3', '2', '>', 'c', 'u', 't', '#', '1', '<', '3', '>', '(', 'o', 'u',
- 't', '_', 's', 'i', 'g', 'n', 'a', 'l', ')', ';', 'N', 'C', 'B', 'I', ':', 'f', 's',
- 'a', 'm', 'p', '4', ' ', 'i', 'n', '_', 's', 'i', 'g', 'n', 'a', 'l', '=', 'S', 'I',
- 'G', 'N', 'A', 'L', '|', '(', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4',
- ')', '<', 'F', '3', '2', '>', 'p', 'a', 's', 't', 'e', '#', '1', '(', 'i', 'n', '_',
- 'f', 't', 'c', ',', 'i', 'n', '_', 'c', 'y', '3', ',', 'i', 'n', '_', 't', 'x', 'r',
- ',', 'i', 'n', '_', 'c', 'y', '5', ')', '|', '(', 'N', 'C', 'B', 'I', ':', 'f', 's',
- 'a', 'm', 'p', '4', ')', '<', 'F', '3', '2', '>', 'p', 'a', 's', 't', 'e', '#', '1',
- '(', 'i', 'n', '_', 'f', 'a', 'm', ',', 'i', 'n', '_', 'c', 'y', '3', ',', 'i', 'n',
- '_', 't', 'x', 'r', ',', 'i', 'n', '_', 'c', 'y', '5', ')', ';', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a', 'm',
- 'p', '4', ' ', 'o', 'u', 't', '_', 's', 'i', 'g', 'n', 'a', 'l', '_', 's', 'w', 'a',
- 'p', 'p', 'e', 'd', '=', '.', 'S', 'I', 'G', 'N', 'A', 'L', ';', 'p', 'h', 'y', 's',
- 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'A', 'B', 'I', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':',
- 'S', 'I', 'G', 'N', 'A', 'L', '#', '2', ' ', '.', 'S', 'I', 'G', 'N', 'A', 'L', '=',
- '(', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd',
- '_', 'f', 's', 'a', 'm', 'p', '4', ')', '<', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a',
- 'm', 'p', '4', '>', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p',
- '#', '1', '(', 'i', 'n', '_', 's', 'i', 'g', 'n', 'a', 'l', ',', 'i', 'n', '_', 'x',
- '2', 'c', 's', '_', 'b', 'i', 'n', ')', '|', '(', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p', '4', ')',
- '<', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', '>', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', '#', '1', '(', 'i', 'n', '_', 's', 'i',
- 'g', 'n', 'a', 'l', ',', 'i', 'n', '_', '2', 'c', 's', '_', 'b', 'i', 'n', ')', ';',
- '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'H',
- 'e', 'l', 'i', 'c', 'o', 's', ':', 't', 'b', 'l', ':', 'v', '2', '#', '1', '.', '0',
- '.', '4', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's',
- 'r', 'a', '#', '2', '.', '1', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l',
- ':', 'b', 'a', 's', 'e', '_', 's', 'p', 'a', 'c', 'e', '#', '2', '.', '0', '.', '3',
- ',', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'p', 'h', 'r', 'e', 'd', '_', 'q',
- 'u', 'a', 'l', 'i', 't', 'y', '#', '2', '.', '0', '.', '4', '{', 'r', 'e', 'a', 'd',
- 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C',
- ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'C', 'H', 'A', 'N', 'N', 'E',
- 'L', ' ', '=', ' ', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'v', 'a', 'l', ')', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e', 'x', 't', 'r',
- 'a', 'c', 't', '_', 'n', 'a', 'm', 'e', '_', 'c', 'o', 'o', 'r', 'd', '#', '1', '<',
- '7', '>', '(', '_', 'o', 'u', 't', '_', 'n', 'a', 'm', 'e', ',', 'o', 'u', 't', '_',
- 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', ')', ';', 'r', 'e',
- 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S',
- 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'F', 'I', 'E', 'L',
- 'D', ' ', '=', ' ', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'v', 'a', 'l', ')', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e', 'x', 't', 'r',
- 'a', 'c', 't', '_', 'n', 'a', 'm', 'e', '_', 'c', 'o', 'o', 'r', 'd', '#', '1', '<',
- '6', '>', '(', '_', 'o', 'u', 't', '_', 'n', 'a', 'm', 'e', ',', 'o', 'u', 't', '_',
- 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', ')', ';', 'r', 'e',
- 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S',
- 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'C', 'A', 'M', 'E',
- 'R', 'A', ' ', '=', ' ', 'o', 'u', 't', '_', 'x', '_', 'c', 'o', 'o', 'r', 'd', ';',
- 'r', 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'P', 'O',
- 'S', ' ', '=', ' ', 'o', 'u', 't', '_', 'y', '_', 'c', 'o', 'o', 'r', 'd', ';', 'a',
- 's', 'c', 'i', 'i', ' ', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'n', 'a', 'm',
- 'e', '=', '<', 'a', 's', 'c', 'i', 'i', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '\'',
- 'H', 'E', 'L', 'I', 'C', 'O', 'S', '\'', '>', '(', ')', ';', 't', 'e', 'x', 't',
- ':', 't', 'o', 'k', 'e', 'n', ' ', 'o', 'u', 't', '_', 's', 'p', 'o', 't', '_', 'n',
- 'a', 'm', 'e', '_', 't', 'o', 'k', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'H', 'e', 'l', 'i', 'c', 'o', 's', ':', 't', 'o', 'k', 'e', 'n', 'i', 'z', 'e', '_',
- 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '#', '1', '(', '_', 'o', 'u', 't', '_',
- 'n', 'a', 'm', 'e', ')', ';', 't', 'e', 'x', 't', ':', 't', 'o', 'k', 'e', 'n', ' ',
- 'i', 'n', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k', '=',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'H', 'e', 'l', 'i', 'c', 'o', 's', ':',
- 't', 'o', 'k', 'e', 'n', 'i', 'z', 'e', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm',
- 'e', '#', '1', '(', 'N', 'A', 'M', 'E', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c',
- 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 't', 'r', 'i', 'm', '_', 's', 't',
- 'a', 'r', 't', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'z', 'e', 'r', 'o', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '0', '>', '(', ')', ';',
- 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 't',
- 'r', 'i', 'm', '_', 'l', 'e', 'n', '=', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', ';',
- '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I',
- 'o', 'n', 'T', 'o', 'r', 'r', 'e', 'n', 't', ':', 't', 'b', 'l', ':', 'v', '2', '#',
- '1', '.', '0', '.', '3', '=', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 't',
- 'b', 'l', ':', 's', 'r', 'a', '#', '1', '.', '0', '.', '3', ',', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'r', 'a', '_', 'n', 'o', 'p', 'o',
- 's', '#', '2', '.', '1', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':',
- 'b', 'a', 's', 'e', '_', 's', 'p', 'a', 'c', 'e', '#', '2', '.', '0', '.', '3', ',',
- 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'p', 'h', 'r', 'e', 'd', '_', 'q', 'u',
- 'a', 'l', 'i', 't', 'y', '#', '2', '.', '0', '.', '4', ',', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 'c', 'l', 'i', 'p', '#', '1', '.', '0', '.',
- '2', '{', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'd',
- 'n', 'a', ':', 't', 'e', 'x', 't', '>', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd',
- 'i', 'n', 'g', '#', '1', ' ', 'F', 'L', 'O', 'W', '_', 'C', 'H', 'A', 'R', 'S', ';',
- 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a',
- ':', 't', 'e', 'x', 't', '>', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n',
- 'g', '#', '1', ' ', 'K', 'E', 'Y', '_', 'S', 'E', 'Q', 'U', 'E', 'N', 'C', 'E', ';',
- 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'N', 'C', 'B', 'I', ':', 'i', 's', 'a', 'm',
- 'p', '1', '>', 'i', 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#',
- '1', ' ', 'S', 'I', 'G', 'N', 'A', 'L', ';', 'a', 's', 'c', 'i', 'i', ' ', 'p', 'l',
- 'a', 't', 'f', 'o', 'r', 'm', '_', 'n', 'a', 'm', 'e', '=', '<', 'a', 's', 'c', 'i',
- 'i', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '\'', 'I', 'O', 'N', '_', 'T', 'O',
- 'R', 'R', 'E', 'N', 'T', '\'', '>', '(', ')', ';', 't', 'e', 'x', 't', ':', 't',
- 'o', 'k', 'e', 'n', ' ', 'o', 'u', 't', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm',
- 'e', '_', 't', 'o', 'k', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'o',
- 'n', 'T', 'o', 'r', 'r', 'e', 'n', 't', ':', 't', 'o', 'k', 'e', 'n', 'i', 'z', 'e',
- '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '#', '1', '(', '_', 'o', 'u', 't',
- '_', 'n', 'a', 'm', 'e', ')', ';', 't', 'e', 'x', 't', ':', 't', 'o', 'k', 'e', 'n',
- ' ', 'i', 'n', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '_', 't', 'o', 'k',
- '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'o', 'n', 'T', 'o', 'r', 'r',
- 'e', 'n', 't', ':', 't', 'o', 'k', 'e', 'n', 'i', 'z', 'e', '_', 's', 'p', 'o', 't',
- '_', 'n', 'a', 'm', 'e', '#', '1', '(', 'N', 'A', 'M', 'E', ')', ';', 'I', 'N', 'S',
- 'D', 'C', ':', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ':', 'o', 'n', 'e', ' ', 'o',
- 'u', 't', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '=', '.', 'P', 'O', 'S', 'I',
- 'T', 'I', 'O', 'N', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l',
- 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'o', 'n', 'T',
- 'o', 'r', 'r', 'e', 'n', 't', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'P',
- 'O', 'S', 'I', 'T', 'I', 'O', 'N', '#', '1', ' ', '.', 'P', 'O', 'S', 'I', 'T', 'I',
- 'O', 'N', '=', 'P', 'O', 'S', 'I', 'T', 'I', 'O', 'N', ';', 'p', 'h', 'y', 's', 'i',
- 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D', 'C',
- ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', '>', 'i', 'z', 'i', 'p', '_', 'e',
- 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'C', 'L', 'I', 'P', '_', 'A',
- 'D', 'A', 'P', 'T', 'E', 'R', '_', 'L', 'E', 'F', 'T', '=', 'C', 'L', 'I', 'P', '_',
- 'A', 'D', 'A', 'P', 'T', 'E', 'R', '_', 'L', 'E', 'F', 'T', ';', 'p', 'h', 'y', 's',
- 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', '>', 'i', 'z', 'i', 'p', '_',
- 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'C', 'L', 'I', 'P', '_',
- 'A', 'D', 'A', 'P', 'T', 'E', 'R', '_', 'R', 'I', 'G', 'H', 'T', '=', 'C', 'L', 'I',
- 'P', '_', 'A', 'D', 'A', 'P', 'T', 'E', 'R', '_', 'R', 'I', 'G', 'H', 'T', ';', 'p',
- 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', '>', 'i', 'z',
- 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'C', 'L',
- 'I', 'P', '_', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '_', 'L', 'E', 'F', 'T', '=', 'C',
- 'L', 'I', 'P', '_', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '_', 'L', 'E', 'F', 'T', ';',
- 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', '<',
- 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'o', 'n', 'e', '>', 'i',
- 'z', 'i', 'p', '_', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', '#', '1', ' ', '.', 'C',
- 'L', 'I', 'P', '_', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '_', 'R', 'I', 'G', 'H', 'T',
- '=', 'C', 'L', 'I', 'P', '_', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '_', 'R', 'I', 'G',
- 'H', 'T', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', '_', '4', '5', '4', '_', ':', 'l', 'e', 'g', 'a', 'c', 'y', '#', '1', '=',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'r', 'a', '_',
- 'n', 'o', 'p', 'o', 's', '#', '1', '.', '0', '.', '3', ',', 'N', 'C', 'B', 'I', ':',
- 't', 'b', 'l', ':', 'b', 'a', 's', 'e', '_', 's', 'p', 'a', 'c', 'e', '_', 'n', 'o',
- 'c', 'o', 'l', '#', '1', '.', '0', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 't', 'b',
- 'l', ':', 'p', 'h', 'r', 'e', 'd', '_', 'q', 'u', 'a', 'l', 'i', 't', 'y', '_', 'n',
- 'o', 'c', 'o', 'l', '#', '1', '.', '0', '.', '1', ',', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'k', 'e', 'y', 'n', 'a', 'm', 'e', '#', '1',
- '.', '0', '.', '1', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5',
- '4', '_', ':', 'c', 'o', 'm', 'm', 'o', 'n', '#', '1', '.', '0', '.', '4', '{', 'r',
- 'e', 'a', 'd', 'o', 'n', 'l', 'y', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N',
- 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'R', 'E', 'G',
- 'I', 'O', 'N', ' ', '=', ' ', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'v', 'a', 'l', ')', '<', 'I', '3', '2', '>', 'c', 'u', 't', '#', '1', '<',
- '2', '>', '(', 'c', 'o', 'o', 'r', 'd', 's', '_', 'f', 'r', 'o', 'm', '_', 's', 'k',
- 'e', 'y', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v',
- 'a', 'l', ' ', 'o', 'u', 't', '_', 'y', '_', 'c', 'o', 'o', 'r', 'd', '=', '(', 'I',
- 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ')', '<', 'I',
- '3', '2', '>', 'c', 'u', 't', '#', '1', '<', '0', '>', '(', 'c', 'o', 'o', 'r', 'd',
- 's', '_', 'f', 'r', 'o', 'm', '_', 's', 'k', 'e', 'y', ')', ';', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'o', 'u', 't', '_', 'x',
- '_', 'c', 'o', 'o', 'r', 'd', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o',
- 'r', 'd', ':', 'v', 'a', 'l', ')', '<', 'I', '3', '2', '>', 'c', 'u', 't', '#', '1',
- '<', '1', '>', '(', 'c', 'o', 'o', 'r', 'd', 's', '_', 'f', 'r', 'o', 'm', '_', 's',
- 'k', 'e', 'y', ')', ';', 'I', '3', '2', '[', '3', ']', ' ', 'c', 'o', 'o', 'r', 'd',
- 's', '_', 'f', 'r', 'o', 'm', '_', 's', 'k', 'e', 'y', '=', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'e', 'x', 't', 'r', 'a', 'c', 't', '_', 'c', 'o', 'o', 'r', 'd',
- 'i', 'n', 'a', 't', 'e', 's', '#', '1', '<', '1', '>', '(', 'o', 'u', 't', '_', 's',
- 'k', 'e', 'y', ')', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 't', 'b', 'l', ':', 'v', '0', '#',
- '1', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':',
- 'l', 'e', 'g', 'a', 'c', 'y', '#', '1', '{', '_', '_', 'u', 'n', 't', 'y', 'p', 'e',
- 'd', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':',
- 'u', 'n', 't', 'y', 'p', 'e', 'd', '_', '0', '(', ')', ';', 'I', 'N', 'S', 'D', 'C',
- ':', 'S', 'R', 'A', ':', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ',
- 'o', 'u', 't', '_', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '=', '<', 'I', 'N', 'S',
- 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i',
- 'd', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '1', '>', '(', ')', ';', 'I', 'N', 'S',
- 'D', 'C', ':', '2', 'n', 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ', 'o', 'u', 't',
- '_', '2', 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e', 'd', '=', '.', 'R', 'E', 'A', 'D',
- ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p', 'h',
- 'r', 'e', 'd', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'p', 'h', 'r', 'e',
- 'd', '=', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ';', 'a', 's', 'c', 'i', 'i', ' ',
- 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '=', '<', 'a', 's', 'c', 'i', 'i', '>',
- 'e', 'x', 'i', 's', 't', 's', '#', '1', '<', '\'', 'A', 'd', 'a', 'p', 't', 'e',
- 'r', 'M', 'a', 't', 'e', '1', 'L', 'i', 'n', 'k', 'e', 'r', 'M', 'a', 't', 'e', '2',
- '\'', '>', '(', 'o', 'u', 't', '_', 'l', 'i', 'n', 'k', 'e', 'r', '_', 's', 'e',
- 'q', 'u', 'e', 'n', 'c', 'e', ')', '|', '<', 'a', 's', 'c', 'i', 'i', '>', 'e', 'c',
- 'h', 'o', '#', '1', '<', '\'', 'A', 'd', 'a', 'p', 't', 'e', 'r', 'F', 'r', 'a',
- 'g', 'm', 'e', 'n', 't', '\'', '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':',
- 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'o', 'u', 't', '_', 'l', 'a',
- 'b', 'e', 'l', '_', 's', 't', 'a', 'r', 't', '=', '<', 'I', 'N', 'S', 'D', 'C', ':',
- 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', '>', 'e', 'x', 'i', 's', 't', 's',
- '#', '1', '<', '[', '0', ',', '7', ',', '1', '2', ',', '1', '8', ']', '>', '(', 'o',
- 'u', 't', '_', 'l', 'i', 'n', 'k', 'e', 'r', '_', 's', 'e', 'q', 'u', 'e', 'n', 'c',
- 'e', ')', '|', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z',
- 'e', 'r', 'o', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '[', '0', ',', '7', ']', '>',
- '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e',
- 'n', ' ', 'o', 'u', 't', '_', 'l', 'a', 'b', 'e', 'l', '_', 'l', 'e', 'n', '=', '<',
- 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', '>', 'e',
- 'x', 'i', 's', 't', 's', '#', '1', '<', '[', '7', ',', '5', ',', '6', ',', '5', ']',
- '>', '(', 'o', 'u', 't', '_', 'l', 'i', 'n', 'k', 'e', 'r', '_', 's', 'e', 'q', 'u',
- 'e', 'n', 'c', 'e', ')', '|', '<', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'l', 'e', 'n', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '[', '7', ',', '8',
- ']', '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e',
- 'x', 't', ' ', 'o', 'u', 't', '_', 'f', 'l', 'o', 'w', '_', 'c', 'h', 'a', 'r', 's',
- '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', '>',
- 'm', 'e', 't', 'a', ':', 'r', 'e', 'a', 'd', '#', '1', '<', '\'', 'M', 'S', 'C',
- '4', '5', '4', '_', 'F', 'L', 'O', 'W', '_', 'C', 'H', 'A', 'R', 'S', '\'', '>',
- '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't',
- ' ', 'o', 'u', 't', '_', 'k', 'e', 'y', '_', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e',
- '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', '>',
- 'm', 'e', 't', 'a', ':', 'r', 'e', 'a', 'd', '#', '1', '<', '\'', 'M', 'S', 'C',
- '4', '5', '4', '_', 'K', 'E', 'Y', '_', 'S', 'E', 'Q', 'U', 'E', 'N', 'C', 'E', '\'',
- '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x',
- 't', ' ', 'o', 'u', 't', '_', 'l', 'i', 'n', 'k', 'e', 'r', '_', 's', 'e', 'q', 'u',
- 'e', 'n', 'c', 'e', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't',
- 'e', 'x', 't', '>', 'm', 'e', 't', 'a', ':', 'r', 'e', 'a', 'd', '#', '1', '<', '\'',
- 'M', 'S', 'C', '4', '5', '4', '_', 'L', 'I', 'N', 'K', 'E', 'R', '_', 'S', 'E', 'Q',
- 'U', 'E', 'N', 'C', 'E', '\'', '>', '(', ')', ';', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 'p', 'o', 's', '1', '6', ' ', 'o', 'u', 't', '_', 'p', 'o', 's', 'i',
- 't', 'i', 'o', 'n', '1', '6', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_',
- '4', '5', '4', '_', ':', 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'p', 'o', 's', 'i',
- 't', 'i', 'o', 'n', '#', '1', '(', '.', 'P', 'O', 'S', 'I', 'T', 'I', 'O', 'N', ',',
- '.', 'R', 'D', '_', 'F', 'I', 'L', 'T', 'E', 'R', ',', '.', 'S', 'I', 'G', 'N', 'A',
- 'L', ')', '|', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_',
- ':', 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n',
- '#', '1', '(', '.', 'P', 'O', 'S', 'I', 'T', 'I', 'O', 'N', ',', '.', 'R', 'D', '_',
- 'F', 'I', 'L', 'T', 'E', 'R', ')', '|', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- '_', '4', '5', '4', '_', ':', 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'p', 'o', 's',
- 'i', 't', 'i', 'o', 'n', '#', '1', '(', '.', 'P', 'O', 'S', 'I', 'T', 'I', 'O', 'N',
- ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', ':',
- 'o', 'n', 'e', ' ', 'o', 'u', 't', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '=',
- 'c', 'a', 's', 't', '#', '1', '(', 'o', 'u', 't', '_', 'p', 'o', 's', 'i', 't', 'i',
- 'o', 'n', '1', '6', ')', ';', 'U', '3', '2', '[', '3', ']', ' ', 'd', 'y', 'n', 'a',
- 'm', 'i', 'c', '_', 'r', 'e', 'a', 'd', '_', 'd', 'e', 's', 'c', '=', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'd', 'y', 'n', 'a', 'm',
- 'i', 'c', '_', 'r', 'e', 'a', 'd', '_', 'd', 'e', 's', 'c', '#', '1', '<', '4', '>',
- '(', 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'b', 'i', 'n', ',', 'o', 'u', 't', '_',
- 'k', 'e', 'y', '_', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', ',', 'o', 'u', 't', '_',
- 'l', 'i', 'n', 'k', 'e', 'r', '_', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', ')', '|',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'd', 'y',
- 'n', 'a', 'm', 'i', 'c', '_', 'r', 'e', 'a', 'd', '_', 'd', 'e', 's', 'c', '#', '1',
- '(', 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'b', 'i', 'n', ',', 'o', 'u', 't', '_',
- 'k', 'e', 'y', '_', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', ')', ';', 'U', '8', ' ',
- 'o', 'u', 't', '_', 'n', 'r', 'e', 'a', 'd', 's', '=', '<', 'U', '8', '>', 'e', 'x',
- 'i', 's', 't', 's', '#', '1', '<', '4', '>', '(', 'o', 'u', 't', '_', 'l', 'i', 'n',
- 'k', 'e', 'r', '_', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', ')', '|', '<', 'U', '8',
- '>', 'e', 'c', 'h', 'o', '#', '1', '<', '2', '>', '(', ')', ';', 'U', '3', '2', ' ',
- 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', '3', '2', '=', '<', 'U', '3', '2', '>',
- 'c', 'u', 't', '#', '1', '<', '0', '>', '(', 'd', 'y', 'n', 'a', 'm', 'i', 'c', '_',
- 'r', 'e', 'a', 'd', '_', 'd', 'e', 's', 'c', ')', ';', 'I', 'N', 'S', 'D', 'C', ':',
- 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', ' ', 'o', 'u', 't',
- '_', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', '=', 'c', 'a', 's', 't', '#', '1',
- '(', 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', '3', '2', ')', ';', 'U', '3', '2',
- ' ', 'u', 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', '=', '<', 'U', '3', '2',
- '>', 'c', 'u', 't', '#', '1', '<', '1', '>', '(', 'd', 'y', 'n', 'a', 'm', 'i', 'c',
- '_', 'r', 'e', 'a', 'd', '_', 'd', 'e', 's', 'c', ')', ';', 'I', 'N', 'S', 'D', 'C',
- ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'o', 'u', 't', '_', 'r',
- 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', '=', '(', 'I', 'N', 'S', 'D', 'C', ':',
- 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ')', 'u', 'r', 'e', 'a', 'd', '_',
- 's', 't', 'a', 'r', 't', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd',
- ':', 'l', 'e', 'n', ' ', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 'l', 'e', 'n',
- '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n',
- ')', '<', 'U', '3', '2', '>', 'c', 'u', 't', '#', '1', '<', '2', '>', '(', 'd', 'y',
- 'n', 'a', 'm', 'i', 'c', '_', 'r', 'e', 'a', 'd', '_', 'd', 'e', 's', 'c', ')', ';',
- 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 'f', 'i',
- 'l', 't', 'e', 'r', ' ', 'o', 'u', 't', '_', 'r', 'd', '_', 'f', 'i', 'l', 't', 'e',
- 'r', '=', '.', 'R', 'D', '_', 'F', 'I', 'L', 'T', 'E', 'R', '|', '<', 'I', 'N', 'S',
- 'D', 'C', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_', 'f', 'i', 'l', 't', 'e',
- 'r', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '0', '>', '(', 'd', 'y', 'n', 'a', 'm',
- 'i', 'c', '_', 'r', 'e', 'a', 'd', '_', 'd', 'e', 's', 'c', ')', ';', 'p', 'h', 'y',
- 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i',
- 'n', 'g', ':', 'C', 'L', 'I', 'P', '#', '1', ' ', '.', 'C', 'L', 'I', 'P', '_', 'A',
- 'D', 'A', 'P', 'T', 'E', 'R', '_', 'L', 'E', 'F', 'T', ';', 'p', 'h', 'y', 's', 'i',
- 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g',
- ':', 'C', 'L', 'I', 'P', '#', '1', ' ', '.', 'C', 'L', 'I', 'P', '_', 'A', 'D', 'A',
- 'P', 'T', 'E', 'R', '_', 'R', 'I', 'G', 'H', 'T', ';', 'p', 'h', 'y', 's', 'i', 'c',
- 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', '_', '4', '5', '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':',
- 'C', 'L', 'I', 'P', '#', '1', ' ', '.', 'C', 'L', 'I', 'P', '_', 'Q', 'U', 'A', 'L',
- 'I', 'T', 'Y', '_', 'L', 'E', 'F', 'T', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l',
- ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- '_', '4', '5', '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'C', 'L',
- 'I', 'P', '#', '1', ' ', '.', 'C', 'L', 'I', 'P', '_', 'Q', 'U', 'A', 'L', 'I', 'T',
- 'Y', '_', 'R', 'I', 'G', 'H', 'T', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ',
- 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_',
- '4', '5', '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'R', 'E', 'A',
- 'D', '#', '1', ' ', '.', 'R', 'E', 'A', 'D', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a',
- 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', '_', '4', '5', '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'Q',
- 'U', 'A', 'L', 'I', 'T', 'Y', '#', '1', ' ', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y',
- ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'e', 'n',
- 'c', 'o', 'd', 'i', 'n', 'g', ':', 'S', 'I', 'G', 'N', 'A', 'L', '#', '1', ' ', '.',
- 'S', 'I', 'G', 'N', 'A', 'L', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4',
- '5', '4', '_', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'P', 'O', 'S', 'I',
- 'T', 'I', 'O', 'N', '#', '1', ' ', '.', 'P', 'O', 'S', 'I', 'T', 'I', 'O', 'N', ';',
- '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_',
- '4', '5', '4', '_', ':', 't', 'b', 'l', ':', 'v', '1', '#', '1', '=', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'l', 'e', 'g', 'a', 'c',
- 'y', '#', '1', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':',
- 's', 'p', 'o', 't', 'd', 'e', 's', 'c', '_', 'n', 'o', 'p', 'h', 'y', 's', '#', '1',
- '.', '0', '.', '2', '{', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l',
- 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ', 'o', 'u', 't', '_', 'p', 'l', 'a',
- 't', 'f', 'o', 'r', 'm', '=', '.', 'P', 'L', 'A', 'T', 'F', 'O', 'R', 'M', '|', '<',
- 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l', 'a', 't', 'f', 'o', 'r',
- 'm', '_', 'i', 'd', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '1', '>', '(', ')', ';',
- 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ',
- 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e', 'd', '=', '.', 'R',
- 'E', 'A', 'D', ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y',
- ':', 'p', 'h', 'r', 'e', 'd', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'p',
- 'h', 'r', 'e', 'd', '=', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ';', 'I', 'N', 'S',
- 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', 'o', 'u', 't', '_', 'f',
- 'l', 'o', 'w', '_', 'c', 'h', 'a', 'r', 's', '=', '.', 'F', 'L', 'O', 'W', '_', 'C',
- 'H', 'A', 'R', 'S', ';', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e',
- 'x', 't', ' ', 'o', 'u', 't', '_', 'k', 'e', 'y', '_', 's', 'e', 'q', 'u', 'e', 'n',
- 'c', 'e', '=', '.', 'K', 'E', 'Y', '_', 'S', 'E', 'Q', 'U', 'E', 'N', 'C', 'E', ';',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'p', 'o', 's', '1', '6', ' ', 'o', 'u',
- 't', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '1', '6', '=', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'p', 'r', 'o', 'c', 'e', 's',
- 's', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '#', '1', '(', '.', 'P', 'O', 'S',
- 'I', 'T', 'I', 'O', 'N', ',', '.', 'R', 'D', '_', 'F', 'I', 'L', 'T', 'E', 'R', ',',
- '.', 'S', 'I', 'G', 'N', 'A', 'L', ')', '|', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', '_', '4', '5', '4', '_', ':', 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'p', 'o',
- 's', 'i', 't', 'i', 'o', 'n', '#', '1', '(', '.', 'P', 'O', 'S', 'I', 'T', 'I', 'O',
- 'N', ',', '.', 'R', 'D', '_', 'F', 'I', 'L', 'T', 'E', 'R', ')', '|', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'p', 'r', 'o', 'c', 'e',
- 's', 's', '_', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '#', '1', '(', '.', 'P', 'O',
- 'S', 'I', 'T', 'I', 'O', 'N', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'p', 'o', 's',
- 'i', 't', 'i', 'o', 'n', ':', 'o', 'n', 'e', ' ', 'o', 'u', 't', '_', 'p', 'o', 's',
- 'i', 't', 'i', 'o', 'n', '=', 'c', 'a', 's', 't', '#', '1', '(', 'o', 'u', 't', '_',
- 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '1', '6', ')', ';', '}', 't', 'a', 'b', 'l',
- 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':',
- 't', 'b', 'l', ':', 'v', '1', '_', '2', 'a', '#', '1', '=', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 't', 'b', 'l', ':', 'v', '1', '#',
- '1', '{', '_', '_', 'u', 'n', 't', 'y', 'p', 'e', 'd', '=', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 'u', 'n', 't', 'y', 'p', 'e', 'd',
- '_', '1', '_', '2', 'a', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a',
- ':', 't', 'e', 'x', 't', ' ', 'o', 'u', 't', '_', 'l', 'i', 'n', 'k', 'e', 'r', '_',
- 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', '=', '.', 'L', 'I', 'N', 'K', 'E', 'R', '_',
- 'S', 'E', 'Q', 'U', 'E', 'N', 'C', 'E', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', '_', '4', '5', '4', '_', ':', 't', 'b', 'l',
- ':', 'v', '1', '_', '2', 'b', '#', '1', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', '_', '4', '5', '4', '_', ':', 't', 'b', 'l', ':', 'v', '1', '#', '1', '{', '_',
- '_', 'u', 'n', 't', 'y', 'p', 'e', 'd', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', '_', '4', '5', '4', '_', ':', 'u', 'n', 't', 'y', 'p', 'e', 'd', '_', '1', '_',
- '2', 'b', '(', ')', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'l', 'e', 'g', 'a',
- 'c', 'y', '#', '1', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l',
- ':', 's', 'r', 'a', '#', '1', '.', '0', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 't',
- 'b', 'l', ':', 'b', 'a', 's', 'e', '_', 's', 'p', 'a', 'c', 'e', '_', 'n', 'o', 'c',
- 'o', 'l', '#', '1', '.', '0', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'c', 'o', 'm', 'm', 'o', 'n', '#',
- '1', '.', '0', '.', '3', '{', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I',
- ':', 'f', 's', 'a', 'm', 'p', '4', ' ', 'S', 'I', 'G', 'N', 'A', 'L', ' ', '=', ' ',
- '(', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', ')', '<', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a',
- 'm', 'p', '4', '>', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p',
- '#', '1', '(', 'o', 'u', 't', '_', 's', 'i', 'g', 'n', 'a', 'l', ',', 'o', 'u', 't',
- '_', 'x', '2', 'n', 'a', '_', 'b', 'i', 'n', ')', '|', '(', 'N', 'C', 'B', 'I', ':',
- 'f', 's', 'a', 'm', 'p', '4', ')', '<', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 'r', 'o', 't', 'a', 't', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p', '4', '>', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 'r', 'o', 't', 'a', 't', 'e', '#', '1', '<', 'f',
- 'a', 'l', 's', 'e', '>', '(', 'o', 'u', 't', '_', 's', 'i', 'g', 'n', 'a', 'l', ',',
- 'o', 'u', 't', '_', 'x', '2', 'n', 'a', '_', 'b', 'i', 'n', ')', ';', 'c', 'o', 'l',
- 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', ' ', 'I',
- 'N', 'T', 'E', 'N', 'S', 'I', 'T', 'Y', ' ', '=', ' ', '<', 'N', 'C', 'B', 'I', ':',
- 'f', 's', 'a', 'm', 'p', '4', '>', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'd',
- 'e', 'n', 'o', 'r', 'm', 'a', 'l', 'i', 'z', 'e', '#', '1', '(', 'o', 'u', 't', '_',
- 'n', 'o', 'r', 'm', '_', 'i', 'n', 't', 'e', 'n', 's', 'i', 't', 'y', ',', 'o', 'u',
- 't', '_', 'x', '2', 'n', 'a', '_', 'b', 'i', 'n', ')', ';', 'c', 'o', 'l', 'u', 'm',
- 'n', ' ', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', ' ', 'N', 'O', 'I',
- 'S', 'E', ' ', '=', ' ', 'o', 'u', 't', '_', 'n', 'o', 'i', 's', 'e', ';', 'N', 'C',
- 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', ' ', 'o', 'u', 't', '_', 'n', 'o', 'r',
- 'm', '_', 'i', 'n', 't', 'e', 'n', 's', 'i', 't', 'y', '=', '(', 'N', 'C', 'B', 'I',
- ':', 'f', 's', 'a', 'm', 'p', '4', ')', '<', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p', '4', '>', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', '#', '1', '(', 'o', 'u',
- 't', '_', 'i', 'n', 't', 'e', 'n', 's', 'i', 't', 'y', ',', 'o', 'u', 't', '_', 'x',
- '2', 'n', 'a', '_', 'b', 'i', 'n', ')', '|', '(', 'N', 'C', 'B', 'I', ':', 'f', 's',
- 'a', 'm', 'p', '4', ')', '<', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'r', 'o',
- 't', 'a', 't', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p', '4', '>', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 'r', 'o', 't', 'a', 't', 'e', '#', '1', '<', 'f', 'a', 'l',
- 's', 'e', '>', '(', 'o', 'u', 't', '_', 'i', 'n', 't', 'e', 'n', 's', 'i', 't', 'y',
- ',', 'o', 'u', 't', '_', 'x', '2', 'n', 'a', '_', 'b', 'i', 'n', ')', ';', '}', 't',
- 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l',
- 'u', 'm', 'i', 'n', 'a', ':', 't', 'b', 'l', ':', 'v', '0', '#', '1', '=', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'l',
- 'e', 'g', 'a', 'c', 'y', '#', '1', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 't', 'b', 'l', ':', 's', 'k', 'e', 'y', 'n', 'a', 'm', 'e', '#', '1', '.', '0', '.',
- '1', '{', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l', 'a', 't', 'f',
- 'o', 'r', 'm', '_', 'i', 'd', ' ', 'o', 'u', 't', '_', 'p', 'l', 'a', 't', 'f', 'o',
- 'r', 'm', '=', '<', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l', 'a',
- 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '2',
- '>', '(', ')', ';', 'a', 's', 'c', 'i', 'i', ' ', 'o', 'u', 't', '_', 's', 'l', 'x',
- '_', 'p', 'r', 'e', 'f', 'i', 'x', '=', '<', 'a', 's', 'c', 'i', 'i', '>', 'm', 'e',
- 't', 'a', ':', 'r', 'e', 'a', 'd', '#', '1', '<', '\'', 'S', 'L', 'X', '_', 'P',
- 'R', 'E', 'F', 'I', 'X', '\'', '>', '(', ')', '|', '<', 'a', 's', 'c', 'i', 'i',
- '>', 'e', 'c', 'h', 'o', '#', '1', '<', '\'', '\'', '>', '(', ')', ';', 'a', 's',
- 'c', 'i', 'i', ' ', 'r', 'e', 'w', 'r', 'i', 't', 't', 'e', 'n', '_', 's', 'p', 'o',
- 't', '_', 'n', 'a', 'm', 'e', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'r',
- 'e', 'w', 'r', 'i', 't', 'e', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '#',
- '1', '<', '2', '>', '(', 'o', 'u', 't', '_', 's', 'k', 'e', 'y', ',', 'o', 'u', 't',
- '_', 's', 'l', 'x', '_', 'p', 'r', 'e', 'f', 'i', 'x', ')', ';', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'o', 'u', 't', '_', 'y',
- '_', 'c', 'o', 'o', 'r', 'd', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o',
- 'r', 'd', ':', 'v', 'a', 'l', ')', '<', 'I', '3', '2', '>', 'c', 'u', 't', '#', '1',
- '<', '0', '>', '(', 'c', 'o', 'o', 'r', 'd', 's', '_', 'f', 'r', 'o', 'm', '_', 's',
- 'k', 'e', 'y', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'v', 'a', 'l', ' ', 'o', 'u', 't', '_', 'x', '_', 'c', 'o', 'o', 'r', 'd', '=', '(',
- 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ')', '<',
- 'I', '3', '2', '>', 'c', 'u', 't', '#', '1', '<', '1', '>', '(', 'c', 'o', 'o', 'r',
- 'd', 's', '_', 'f', 'r', 'o', 'm', '_', 's', 'k', 'e', 'y', ')', ';', 'I', 'N', 'S',
- 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'o', 'u', 't', '_',
- 't', 'i', 'l', 'e', '_', 'c', 'o', 'o', 'r', 'd', '=', '(', 'I', 'N', 'S', 'D', 'C',
- ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ')', '<', 'I', '3', '2', '>', 'c',
- 'u', 't', '#', '1', '<', '2', '>', '(', 'c', 'o', 'o', 'r', 'd', 's', '_', 'f', 'r',
- 'o', 'm', '_', 's', 'k', 'e', 'y', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o',
- 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'o', 'u', 't', '_', 'l', 'a', 'n', 'e', '_',
- 'c', 'o', 'o', 'r', 'd', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r',
- 'd', ':', 'v', 'a', 'l', ')', '<', 'I', '3', '2', '>', 'c', 'u', 't', '#', '1', '<',
- '3', '>', '(', 'c', 'o', 'o', 'r', 'd', 's', '_', 'f', 'r', 'o', 'm', '_', 's', 'k',
- 'e', 'y', ')', ';', 'I', '3', '2', '[', '4', ']', ' ', 'c', 'o', 'o', 'r', 'd', 's',
- '_', 'f', 'r', 'o', 'm', '_', 's', 'k', 'e', 'y', '=', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 'e', 'x', 't', 'r', 'a', 'c', 't', '_', 'c', 'o', 'o', 'r', 'd', 'i',
- 'n', 'a', 't', 'e', 's', '#', '1', '<', '2', '>', '(', 'o', 'u', 't', '_', 's', 'k',
- 'e', 'y', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'p', 'a', 'c',
- 'k', 'e', 'd', ' ', 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e',
- 'd', '=', '.', 'R', 'E', 'A', 'D', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o',
- 'r', 'd', ':', 'l', 'e', 'n', ' ', 's', 't', 'a', 't', 'i', 'c', '_', 'f', 'i', 'x',
- 'e', 'd', '_', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', '=', 's', 'p', 'o', 't', '_',
- 'l', 'e', 'n', ';', 'U', '8', ' ', 'o', 'u', 't', '_', 'n', 'r', 'e', 'a', 'd', 's',
- '=', '<', 'U', '8', '>', 'm', 'e', 't', 'a', ':', 'v', 'a', 'l', 'u', 'e', '#', '1',
- '<', '\'', 'N', 'R', 'E', 'A', 'D', 'S', '\'', '>', '(', ')', '|', '<', 'U', '8',
- '>', 'e', 'c', 'h', 'o', '#', '1', '<', '1', '>', '(', ')', ';', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ' ', 'o', 'u', 't', '_',
- 'r', 'e', 'a', 'd', '_', 's', 't', 'a', 'r', 't', '=', '(', 'I', 'N', 'S', 'D', 'C',
- ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', ')', '<', 'U', '3', '2', '>',
- 'c', 'u', 't', '#', '1', '<', '1', '>', '(', 'r', 'e', 'a', 'd', '_', 's', 'e', 'g',
- '_', 'f', 'r', 'o', 'm', '_', 'r', 'e', 'a', 'd', 'n', ')', '|', '<', 'I', 'N', 'S',
- 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'z', 'e', 'r', 'o', '>', 'e', 'c', 'h',
- 'o', '#', '1', '<', '0', '>', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o',
- 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_',
- 'l', 'e', 'n', '=', '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':',
- 'l', 'e', 'n', ')', '<', 'U', '3', '2', '>', 'c', 'u', 't', '#', '1', '<', '2', '>',
- '(', 'r', 'e', 'a', 'd', '_', 's', 'e', 'g', '_', 'f', 'r', 'o', 'm', '_', 'r', 'e',
- 'a', 'd', 'n', ')', '|', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', ';', 'U', '3', '2',
- '[', '5', ']', ' ', 'r', 'e', 'a', 'd', '_', 's', 'e', 'g', '_', 'f', 'r', 'o', 'm',
- '_', 'r', 'e', 'a', 'd', 'n', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'r',
- 'e', 'a', 'd', '_', 's', 'e', 'g', '_', 'f', 'r', 'o', 'm', '_', 'r', 'e', 'a', 'd',
- 'n', '#', '1', '(', 'o', 'u', 't', '_', 'n', 'r', 'e', 'a', 'd', 's', ',', 's', 'p',
- 'o', 't', '_', 'l', 'e', 'n', ')', ';', 'U', '3', '2', ' ', 'r', 'e', 'a', 'd', '_',
- 't', 'y', 'p', 'e', '_', 'f', 'r', 'o', 'm', '_', 'r', 'e', 'a', 'd', '_', 's', 'e',
- 'g', '=', '<', 'U', '3', '2', '>', 'c', 'u', 't', '#', '1', '<', '0', '>', '(', 'r',
- 'e', 'a', 'd', '_', 's', 'e', 'g', '_', 'f', 'r', 'o', 'm', '_', 'r', 'e', 'a', 'd',
- 'n', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd',
- '_', 't', 'y', 'p', 'e', ' ', 'o', 'u', 't', '_', 'r', 'e', 'a', 'd', '_', 't', 'y',
- 'p', 'e', '=', 'c', 'a', 's', 't', '#', '1', '(', 'r', 'e', 'a', 'd', '_', 't', 'y',
- 'p', 'e', '_', 'f', 'r', 'o', 'm', '_', 'r', 'e', 'a', 'd', '_', 's', 'e', 'g', ')',
- '|', '(', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'r', 'e', 'a', 'd', '_',
- 't', 'y', 'p', 'e', ')', '<', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'x',
- 'r', 'e', 'a', 'd', '_', 't', 'y', 'p', 'e', '>', 'e', 'c', 'h', 'o', '#', '1', '<',
- '1', '>', '(', ')', ';', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'r', 'o', 't',
- 'a', 't', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p', '4', ' ', 'o', 'u', 't', '_', 's',
- 'i', 'g', 'n', 'a', 'l', '=', '.', 'S', 'I', 'G', 'N', 'A', 'L', ';', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 'r', 'o', 't', 'a', 't', 'e', 'd', '_', 'f', 's', 'a',
- 'm', 'p', '4', ' ', 'o', 'u', 't', '_', 'i', 'n', 't', 'e', 'n', 's', 'i', 't', 'y',
- '=', '.', 'I', 'N', 'T', 'E', 'N', 'S', 'I', 'T', 'Y', ';', 'N', 'C', 'B', 'I', ':',
- 'f', 's', 'a', 'm', 'p', '4', ' ', 'o', 'u', 't', '_', 'n', 'o', 'i', 's', 'e', '=',
- '.', 'N', 'O', 'I', 'S', 'E', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l',
- 'l', 'u', 'm', 'i', 'n', 'a', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'R',
- 'E', 'A', 'D', '#', '1', ' ', '.', 'R', 'E', 'A', 'D', ';', 'p', 'h', 'y', 's', 'i',
- 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S',
- 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'e', 'n', 'c', 'o', 'd',
- 'i', 'n', 'g', ':', 'S', 'I', 'G', 'N', 'A', 'L', '#', '1', ' ', '.', 'S', 'I', 'G',
- 'N', 'A', 'L', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u',
- 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm',
- 'i', 'n', 'a', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'I', 'N', 'T', 'E',
- 'N', 'S', 'I', 'T', 'Y', '#', '1', ' ', '.', 'I', 'N', 'T', 'E', 'N', 'S', 'I', 'T',
- 'Y', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n',
- ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n',
- 'a', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'N', 'O', 'I', 'S', 'E', '#',
- '1', ' ', '.', 'N', 'O', 'I', 'S', 'E', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':',
- 't', 'b', 'l', ':', 'v', '0', 'a', '#', '1', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R',
- 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 't', 'b', 'l', ':', 'v', '0',
- '#', '1', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm',
- 'i', 'n', 'a', ':', 'q', 'u', 'a', 'l', '4', '_', 'n', 'o', 'c', 'o', 'l', '#', '1',
- '.', '0', '.', '1', '{', '_', '_', 'u', 'n', 't', 'y', 'p', 'e', 'd', '=', 'N', 'C',
- 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'u',
- 'n', 't', 'y', 'p', 'e', 'd', '_', '0', 'a', '(', ')', ';', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'r', 'o', 't', 'a', 't', 'e', 'd', '_', 'q', 'u', 'a', 'l', '4',
- ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '4', '_', 'r', 'o', 't', 'a', 't', 'e',
- 'd', '=', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ';', 'I', 'N', 'S', 'D', 'C', ':',
- 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p', 'h', 'r', 'e', 'd', ' ', 'o', 'u', 't',
- '_', 'q', 'u', 'a', 'l', '2', '_', 'p', 'h', 'r', 'e', 'd', '=', '.', 'Q', 'U', 'A',
- 'L', 'I', 'T', 'Y', '2', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o',
- 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l',
- 'u', 'm', 'i', 'n', 'a', ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'Q', 'U',
- 'A', 'L', 'I', 'T', 'Y', '#', '1', ' ', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ';',
- 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':',
- 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '2',
- '#', '1', ' ', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '2', ';', '}', 't', 'a', 'b',
- 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm',
- 'i', 'n', 'a', ':', 't', 'b', 'l', ':', 'v', '0', 'b', '#', '1', '=', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 't', 'b',
- 'l', ':', 'v', '0', '#', '1', ',', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'p',
- 'h', 'r', 'e', 'd', '_', 'q', 'u', 'a', 'l', 'i', 't', 'y', '_', 'n', 'o', 'c', 'o',
- 'l', '#', '1', '.', '0', '.', '1', '{', '_', '_', 'u', 'n', 't', 'y', 'p', 'e', 'd',
- '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n',
- 'a', ':', 'u', 'n', 't', 'y', 'p', 'e', 'd', '_', '0', 'b', '(', ')', ';', 'I', 'N',
- 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p', 'h', 'r', 'e', 'd',
- ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'p', 'h', 'r', 'e', 'd', '=', '.',
- 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '|', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '2',
- ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ',
- 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a',
- ':', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g', ':', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y',
- '2', '#', '1', ' ', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ';', 'p', 'h', 'y', 's',
- 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'N', 'C', 'B', 'I', ':',
- 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'e', 'n', 'c', 'o',
- 'd', 'i', 'n', 'g', ':', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '2', '#', '1', ' ', '.',
- 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '2', ';', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':',
- 't', 'b', 'l', ':', 'v', '1', '#', '1', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'l', 'e', 'g', 'a', 'c', 'y', '#',
- '1', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's', 'p',
- 'o', 't', 'd', 'e', 's', 'c', '_', 'n', 'o', 'p', 'h', 'y', 's', '#', '1', '.', '0',
- '.', '2', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l', ':', 's',
- 'k', 'e', 'y', 'n', 'a', 'm', 'e', '_', 'n', 'o', 'c', 'o', 'l', '#', '2', '.', '0',
- '.', '1', '{', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l', 'a', 't',
- 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ', 'o', 'u', 't', '_', 'p', 'l', 'a', 't', 'f',
- 'o', 'r', 'm', '=', '.', 'P', 'L', 'A', 'T', 'F', 'O', 'R', 'M', '|', '<', 'I', 'N',
- 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_',
- 'i', 'd', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '2', '>', '(', ')', ';', 'I', 'N',
- 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'o', 'u', 't',
- '_', 't', 'i', 'l', 'e', '_', 'c', 'o', 'o', 'r', 'd', '=', '(', 'I', 'N', 'S', 'D',
- 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ')', '<', 'I', '3', '2', '>',
- 'c', 'u', 't', '#', '1', '<', '2', '>', '(', 'c', 'o', 'o', 'r', 'd', 's', '_', 'f',
- 'r', 'o', 'm', '_', 's', 'p', 'o', 't', 'n', 'a', 'm', 'e', ')', ';', 'I', 'N', 'S',
- 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ' ', 'o', 'u', 't', '_',
- 'l', 'a', 'n', 'e', '_', 'c', 'o', 'o', 'r', 'd', '=', '(', 'I', 'N', 'S', 'D', 'C',
- ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ')', '<', 'I', '3', '2', '>', 'c',
- 'u', 't', '#', '1', '<', '3', '>', '(', 'c', 'o', 'o', 'r', 'd', 's', '_', 'f', 'r',
- 'o', 'm', '_', 's', 'p', 'o', 't', 'n', 'a', 'm', 'e', ')', ';', 'I', '3', '2', '[',
- '4', ']', ' ', 'c', 'o', 'o', 'r', 'd', 's', '_', 'f', 'r', 'o', 'm', '_', 's', 'p',
- 'o', 't', 'n', 'a', 'm', 'e', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'e',
- 'x', 't', 'r', 'a', 'c', 't', '_', 'c', 'o', 'o', 'r', 'd', 'i', 'n', 'a', 't', 'e',
- 's', '#', '1', '<', '2', '>', '(', '_', 'o', 'u', 't', '_', 'n', 'a', 'm', 'e', ')',
- ';', 'I', 'N', 'S', 'D', 'C', ':', '2', 'n', 'a', ':', 'p', 'a', 'c', 'k', 'e', 'd',
- ' ', 'o', 'u', 't', '_', '2', 'n', 'a', '_', 'p', 'a', 'c', 'k', 'e', 'd', '=', '.',
- 'R', 'E', 'A', 'D', ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't',
- 'y', ':', 'p', 'h', 'r', 'e', 'd', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '2',
- '_', 'p', 'h', 'r', 'e', 'd', '=', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', '2', ';',
- 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 's',
- 't', 'a', 't', 'i', 'c', '_', 'f', 'i', 'x', 'e', 'd', '_', 's', 'p', 'o', 't', '_',
- 'l', 'e', 'n', '=', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', ';', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a', 'm',
- 'p', '4', ' ', 'o', 'u', 't', '_', 's', 'i', 'g', 'n', 'a', 'l', '=', '.', 'S', 'I',
- 'G', 'N', 'A', 'L', ';', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a',
- 'p', 'p', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p', '4', ' ', 'o', 'u', 't', '_', 'i',
- 'n', 't', 'e', 'n', 's', 'i', 't', 'y', '=', '.', 'I', 'N', 'T', 'E', 'N', 'S', 'I',
- 'T', 'Y', ';', 'N', 'C', 'B', 'I', ':', 'f', 's', 'a', 'm', 'p', '4', ' ', 'o', 'u',
- 't', '_', 'n', 'o', 'i', 's', 'e', '=', '.', 'N', 'O', 'I', 'S', 'E', ';', 'p', 'h',
- 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S',
- 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', '.', 'F', 'L', 'O', 'W',
- '_', 'C', 'H', 'A', 'R', 'S', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c',
- 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't',
- 'e', 'x', 't', ' ', '.', 'K', 'E', 'Y', '_', 'S', 'E', 'Q', 'U', 'E', 'N', 'C', 'E',
- ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ',
- 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', '.', 'L',
- 'I', 'N', 'K', 'E', 'R', '_', 'S', 'E', 'Q', 'U', 'E', 'N', 'C', 'E', ';', '}', 't',
- 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l',
- 'u', 'm', 'i', 'n', 'a', ':', 't', 'b', 'l', ':', 'v', '1', 'a', '#', '1', '=', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':',
- 't', 'b', 'l', ':', 'v', '1', '#', '1', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A',
- ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 'q', 'u', 'a', 'l', '4', '_', 'n',
- 'o', 'c', 'o', 'l', '#', '1', '.', '0', '.', '1', '{', '_', '_', 'u', 'n', 't', 'y',
- 'p', 'e', 'd', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u',
- 'm', 'i', 'n', 'a', ':', 'u', 'n', 't', 'y', 'p', 'e', 'd', '_', '1', 'a', '(', ')',
- ';', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 's', 'w', 'a', 'p', 'p', 'e', 'd',
- '_', 'q', 'u', 'a', 'l', '4', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '4', '_',
- 's', 'w', 'a', 'p', 'p', 'e', 'd', '=', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ';',
- '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I',
- 'l', 'l', 'u', 'm', 'i', 'n', 'a', ':', 't', 'b', 'l', ':', 'v', '1', 'b', '#', '1',
- '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l', 'u', 'm', 'i', 'n',
- 'a', ':', 't', 'b', 'l', ':', 'v', '1', '#', '1', ',', 'N', 'C', 'B', 'I', ':', 't',
- 'b', 'l', ':', 'p', 'h', 'r', 'e', 'd', '_', 'q', 'u', 'a', 'l', 'i', 't', 'y', '_',
- 'n', 'o', 'c', 'o', 'l', '#', '1', '.', '0', '.', '1', '{', '_', '_', 'u', 'n', 't',
- 'y', 'p', 'e', 'd', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'I', 'l', 'l',
- 'u', 'm', 'i', 'n', 'a', ':', 'u', 'n', 't', 'y', 'p', 'e', 'd', '_', '1', 'b', '(',
- ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p',
- 'h', 'r', 'e', 'd', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'p', 'h', 'r',
- 'e', 'd', '=', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ';', '}', 't', 'a', 'b', 'l',
- 'e', ' ', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'A', 'B', 'I', ':', 'l', 'e',
- 'g', 'a', 'c', 'y', '#', '1', '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't',
- 'b', 'l', ':', 's', 'r', 'a', '#', '1', '.', '0', '.', '3', ',', 'N', 'C', 'B', 'I',
- ':', 't', 'b', 'l', ':', 'p', 'h', 'r', 'e', 'd', '_', 'q', 'u', 'a', 'l', 'i', 't',
- 'y', '_', 'n', 'o', 'c', 'o', 'l', '#', '1', '.', '0', '.', '1', ',', 'N', 'C', 'B',
- 'I', ':', 'S', 'R', 'A', ':', 'A', 'B', 'I', ':', 'c', 'o', 'm', 'm', 'o', 'n', '#',
- '1', '.', '0', '.', '3', '{', '}', 't', 'a', 'b', 'l', 'e', ' ', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 'A', 'B', 'I', ':', 't', 'b', 'l', ':', 'v', '1', '#', '1',
- '=', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'A', 'B', 'I', ':', 'l', 'e', 'g',
- 'a', 'c', 'y', '#', '1', ',', 'N', 'C', 'B', 'I', ':', 't', 'b', 'l', ':', 'c', 'o',
- 'l', 'o', 'r', '_', 's', 'p', 'a', 'c', 'e', '_', 'n', 'o', 'c', 'o', 'l', '#', '1',
- '.', '0', '.', '3', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b', 'l',
- ':', 's', 'p', 'o', 't', 'd', 'e', 's', 'c', '_', 'n', 'o', 'p', 'h', 'y', 's', '#',
- '1', '.', '0', '.', '2', ',', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 't', 'b',
- 'l', ':', 's', 'k', 'e', 'y', 'n', 'a', 'm', 'e', '_', 'n', 'o', 'c', 'o', 'l', '#',
- '2', '.', '0', '.', '1', '{', '_', '_', 'u', 'n', 't', 'y', 'p', 'e', 'd', '=', 'N',
- 'C', 'B', 'I', ':', 'S', 'R', 'A', ':', 'A', 'B', 'I', ':', 'u', 'n', 't', 'y', 'p',
- 'e', 'd', '_', '1', '(', ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':',
- 'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', '_', 'i', 'd', ' ', 'o', 'u', 't', '_', 'p',
- 'l', 'a', 't', 'f', 'o', 'r', 'm', '=', '.', 'P', 'L', 'A', 'T', 'F', 'O', 'R', 'M',
- '|', '<', 'I', 'N', 'S', 'D', 'C', ':', 'S', 'R', 'A', ':', 'p', 'l', 'a', 't', 'f',
- 'o', 'r', 'm', '_', 'i', 'd', '>', 'e', 'c', 'h', 'o', '#', '1', '<', '3', '>', '(',
- ')', ';', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l',
- ' ', 'o', 'u', 't', '_', 'p', 'a', 'n', 'e', 'l', '_', 'c', 'o', 'o', 'r', 'd', '=',
- '(', 'I', 'N', 'S', 'D', 'C', ':', 'c', 'o', 'o', 'r', 'd', ':', 'v', 'a', 'l', ')',
- '<', 'I', '3', '2', '>', 'c', 'u', 't', '#', '1', '<', '2', '>', '(', 'c', 'o', 'o',
- 'r', 'd', 's', '_', 'f', 'r', 'o', 'm', '_', 's', 'p', 'o', 't', 'n', 'a', 'm', 'e',
- ')', ';', 'I', '3', '2', '[', '4', ']', ' ', 'c', 'o', 'o', 'r', 'd', 's', '_', 'f',
- 'r', 'o', 'm', '_', 's', 'p', 'o', 't', 'n', 'a', 'm', 'e', '=', 'N', 'C', 'B', 'I',
- ':', 'S', 'R', 'A', ':', 'e', 'x', 't', 'r', 'a', 'c', 't', '_', 'c', 'o', 'o', 'r',
- 'd', 'i', 'n', 'a', 't', 'e', 's', '#', '1', '<', '3', '>', '(', 'o', 'u', 't', '_',
- 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', ')', ';', 'a', 's', 'c', 'i', 'i', ' ',
- 'o', 'u', 't', '_', 's', 'p', 'o', 't', '_', 'n', 'a', 'm', 'e', '=', 'I', 'N', 'S',
- 'D', 'C', ':', 'S', 'R', 'A', ':', 'f', 'o', 'r', 'm', 'a', 't', '_', 's', 'p', 'o',
- 't', '_', 'n', 'a', 'm', 'e', '#', '1', '(', 'o', 'u', 't', '_', 'n', 'a', 'm', 'e',
- '_', 'f', 'm', 't', ',', 'o', 'u', 't', '_', 'x', '_', 'c', 'o', 'o', 'r', 'd', ',',
- 'o', 'u', 't', '_', 'y', '_', 'c', 'o', 'o', 'r', 'd', ')', ';', 'I', 'N', 'S', 'D',
- 'C', ':', '2', 'c', 's', ':', 'p', 'a', 'c', 'k', 'e', 'd', ' ', 'o', 'u', 't', '_',
- '2', 'c', 's', '_', 'p', 'a', 'c', 'k', 'e', 'd', '=', '.', 'C', 'S', 'R', 'E', 'A',
- 'D', ';', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ',
- 'o', 'u', 't', '_', 'c', 's', '_', 'k', 'e', 'y', '=', '.', 'C', 'S', '_', 'K', 'E',
- 'Y', ';', 'I', 'N', 'S', 'D', 'C', ':', 'q', 'u', 'a', 'l', 'i', 't', 'y', ':', 'p',
- 'h', 'r', 'e', 'd', ' ', 'o', 'u', 't', '_', 'q', 'u', 'a', 'l', '_', 'p', 'h', 'r',
- 'e', 'd', '=', '.', 'Q', 'U', 'A', 'L', 'I', 'T', 'Y', ';', 'I', 'N', 'S', 'D', 'C',
- ':', 'c', 'o', 'o', 'r', 'd', ':', 'l', 'e', 'n', ' ', 's', 't', 'a', 't', 'i', 'c',
- '_', 'f', 'i', 'x', 'e', 'd', '_', 's', 'p', 'o', 't', '_', 'l', 'e', 'n', '=', 's',
- 'p', 'o', 't', '_', 'l', 'e', 'n', ';', 'N', 'C', 'B', 'I', ':', 'S', 'R', 'A', ':',
- 's', 'w', 'a', 'p', 'p', 'e', 'd', '_', 'f', 's', 'a', 'm', 'p', '4', ' ', 'o', 'u',
- 't', '_', 's', 'i', 'g', 'n', 'a', 'l', '_', 's', 'w', 'a', 'p', 'p', 'e', 'd', '=',
- '.', 'S', 'I', 'G', 'N', 'A', 'L', ';', 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ',
- 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':',
- 't', 'e', 'x', 't', ' ', '.', 'F', 'L', 'O', 'W', '_', 'C', 'H', 'A', 'R', 'S', ';',
- 'p', 'h', 'y', 's', 'i', 'c', 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I',
- 'N', 'S', 'D', 'C', ':', 'd', 'n', 'a', ':', 't', 'e', 'x', 't', ' ', '.', 'K', 'E',
- 'Y', '_', 'S', 'E', 'Q', 'U', 'E', 'N', 'C', 'E', ';', 'p', 'h', 'y', 's', 'i', 'c',
- 'a', 'l', ' ', 'c', 'o', 'l', 'u', 'm', 'n', ' ', 'I', 'N', 'S', 'D', 'C', ':', 'd',
- 'n', 'a', ':', 't', 'e', 'x', 't', ' ', '.', 'L', 'I', 'N', 'K', 'E', 'R', '_', 'S',
- 'E', 'Q', 'U', 'E', 'N', 'C', 'E', ';', '}',
-};
-const size_t sra_schema_size = 69610;
diff --git a/libs/sra/sracache.c b/libs/sra/sracache.c
deleted file mode 100644
index abee2bf..0000000
--- a/libs/sra/sracache.c
+++ /dev/null
@@ -1,560 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <sra/extern.h>
-#include <sra/sradb-priv.h>
-
-#include <klib/rc.h>
-#include <kproc/lock.h>
-#include <klib/refcount.h>
-#include <kfg/config.h>
-
-#include <sysalloc.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-
-#include <strtol.h>
-
-#include "sra-priv.h"
-
-/* some of the above #defines index on sun */
-#ifdef index
-    #undef index
-#endif
-
-/*================================== SRACacheMetrics ==================================*/
-static
-void 
-MetricsInit(SRACacheMetrics* self, const SRATable* table)
-{
-    self->bytes     = 0;/* TBD */
-    self->elements  = 1;
-    self->threads   = 0;/* TBD */
-    self->fds       = 0;/* TBD */
-}
-
-LIB_EXPORT
-bool CC
-SRACacheMetricsLessThan(const SRACacheMetrics* a, const SRACacheMetrics* b)
-{
-    if (a->bytes >= 0 && b->bytes >= 0 && a->bytes > b->bytes)
-        return false;
-    if (a->elements >= 0 && b->elements >= 0 && a->elements > b->elements)
-        return false;
-    if (a->threads >= 0 && b->threads >= 0 && a->threads > b->threads)
-        return false;
-    if (a->fds >= 0 && b->fds >= 0 && a->fds > b->fds)
-        return false;
-        
-    if (a->bytes    >= 0 && b->bytes    >= 0 && a->bytes    == b->bytes && 
-        a->elements >= 0 && b->elements >= 0 && a->elements == b->elements &&
-        a->threads  >= 0 && b->threads  >= 0 && a->threads  == b->threads &&
-        a->fds      >= 0 && b->fds      >= 0 && a->fds      == b->fds)
-        return false;
-        
-    return true;
-}
-
-static
-void 
-MetricsAdd(SRACacheMetrics* a, const SRACacheMetrics* b)
-{
-    a->bytes    += b->bytes;
-    a->elements += b->elements;
-    a->threads  += b->threads;
-    a->fds      += b->fds;
-}
-
-static
-void 
-MetricsSubtract(SRACacheMetrics* a, const SRACacheMetrics* b)
-{
-    a->bytes    -= b->bytes;
-    a->elements -= b->elements;
-    a->threads  -= b->threads;
-    a->fds      -= b->fds;
-}
-
-/*================================== SRACacheElement ==================================*/
-LIB_EXPORT rc_t CC SRACacheElementMake(SRACacheElement**        self, 
-                                       SRATable*                object, 
-                                       struct SRACacheIndex*    index, 
-                                       uint32_t                 key, 
-                                       const SRACacheMetrics*   metrics)
-{
-    rc_t rc = 0;
-    if ( self == NULL || object == NULL || index == NULL || metrics == NULL )
-        return RC( rcSRA, rcNode, rcConstructing, rcParam, rcNull );
-        
-    *self = malloc(sizeof(**self));
-    if (self == NULL)
-        rc = RC ( rcSRA, rcNode, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        (*self)->dad.next = NULL;
-        (*self)->dad.prev = NULL;
-        
-        (*self)->object = object;
-        rc = SRATableAddRef(object);
-        if ( rc != 0 )
-        {
-            free (*self);
-        }
-        else
-        {
-            (*self)->index = index;
-        
-            (*self)->key = key;
-        
-            memcpy(&(*self)->metrics, metrics, sizeof((*self)->metrics));
-        }
-    }
-        
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRACacheElementDestroy(SRACacheElement* self)
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        return RC( rcSRA, rcNode, rcDestroying, rcSelf, rcNull );
-        
-    rc = SRATableRelease(self->object);
-    
-    free(self);
-    
-    return rc;
-}
-
-/*================================== SRACacheIndex ==================================*/
-LIB_EXPORT rc_t CC SRACacheIndexMake(SRACacheIndex** self, String* prefix)
-{
-    rc_t rc = 0;
-    if ( self == NULL || prefix == NULL )
-        return RC( rcSRA, rcIndex, rcConstructing, rcParam, rcNull );
-        
-    *self = malloc(sizeof(**self));
-    if (self == NULL)
-        rc = RC ( rcSRA, rcIndex, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        memset(*self, 0, sizeof(**self));
-        rc = StringCopy((const String**)&(*self)->prefix, prefix);
-        if (rc == 0)
-        {
-            rc = KVectorMake(&(*self)->body);
-            if (rc != 0)
-                StringWhack((*self)->prefix);
-        }
-        
-        if (rc != 0)
-        {
-            free(*self);
-            *self = NULL;
-        }
-    }
-    
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRACacheIndexDestroy(SRACacheIndex* self)
-{
-    rc_t rc;
-    if ( self == NULL  )
-        return RC( rcSRA, rcIndex, rcDestroying, rcSelf, rcNull );
-        
-    rc = KVectorRelease(self->body);
-    StringWhack(self->prefix);
-    free(self);
-    return rc;
-}
-
-/*================================== SRACache ==================================*/
-static
-rc_t
-ReadValue(struct KConfig* kfg, const char* path, uint64_t* value, uint64_t dflt)
-{
-    rc_t rc = 0;
-    *value = dflt;
-    if ( kfg )
-    {   /* read configuration values */
-        const KConfigNode* node;
-        rc = KConfigOpenNodeRead( kfg, &node, "%s", path );
-        if (rc == 0)
-        {
-            uint64_t temp;
-            rc = KConfigNodeReadU64( node, &temp );
-            if (rc == 0)
-                *value = temp;
-            rc = KConfigNodeRelease ( node );
-        }
-        else if (rc == RC ( rcKFG, rcNode, rcOpening, rcPath, rcNotFound ))
-            rc = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRACacheInit(SRACache** self, struct KConfig* kfg)
-{
-    rc_t rc = 0;
-    if (self == NULL)
-        return RC( rcSRA, rcData, rcConstructing, rcSelf, rcNull );
-        
-    *self = malloc(sizeof(**self));
-    if (*self == NULL)
-        rc = RC ( rcSRA, rcData, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        uint64_t v;
-#define LOAD_VALUE(target, path, default)                       \
-        if (rc == 0)                                            \
-        {                                                       \
-            rc = ReadValue(kfg, path, &v, default);             \
-            if ( rc == 0 )                                      \
-                target = v;                                    \
-        }
-
-        LOAD_VALUE((*self)->softThreshold.bytes,    "/openserver/thresholds/soft/bytes",    SRACacheThresholdSoftBytesDefault);
-        LOAD_VALUE((*self)->softThreshold.elements, "/openserver/thresholds/soft/elements", SRACacheThresholdSoftElementsDefault);
-        LOAD_VALUE((*self)->softThreshold.threads,  "/openserver/thresholds/soft/threads",  SRACacheThresholdSoftThreadsDefault);
-        LOAD_VALUE((*self)->softThreshold.fds,      "/openserver/thresholds/soft/fds",      SRACacheThresholdSoftFdsDefault);
-            
-        LOAD_VALUE((*self)->hardThreshold.bytes,    "/openserver/thresholds/hard/bytes",    SRACacheThresholdHardBytesDefault);
-        LOAD_VALUE((*self)->hardThreshold.elements, "/openserver/thresholds/hard/elements", SRACacheThresholdHardElementsDefault);
-        LOAD_VALUE((*self)->hardThreshold.threads,  "/openserver/thresholds/hard/threads",  SRACacheThresholdHardThreadsDefault);
-        LOAD_VALUE((*self)->hardThreshold.fds,      "/openserver/thresholds/hard/fds",      SRACacheThresholdHardFdsDefault);
-#undef LOAD_VALUE
-    
-        if (rc == 0)
-        {
-            BSTreeInit( & (*self)->indexes );
-            DLListInit( & (*self)->lru );
-            
-            memset(&(*self)->current, 0, sizeof(*self)->current);
-            
-            (*self)->requests         = 0;
-            (*self)->hits             = 0;
-            (*self)->misses           = 0;
-            (*self)->busy             = 0;
-            
-            rc = KLockMake(&(*self)->mutex);
-        }
-    }        
-    
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRACacheGetSoftThreshold(SRACache* self, SRACacheMetrics* metrics)
-{
-    if (self == NULL)
-        return RC( rcSRA, rcData, rcAccessing, rcSelf, rcNull );
-    if (metrics == NULL)
-        return RC( rcSRA, rcData, rcAccessing, rcParam, rcNull );
-    memcpy(metrics, &self->softThreshold, sizeof(self->softThreshold));
-    return 0;
-}
-
-LIB_EXPORT rc_t CC SRACacheSetSoftThreshold(SRACache* self, const SRACacheMetrics* metrics)
-{
-    if (self == NULL)
-        return RC( rcSRA, rcData, rcUpdating, rcSelf, rcNull );
-    if (metrics == NULL)
-        return RC( rcSRA, rcData, rcUpdating, rcParam, rcNull );
-    memcpy(&self->softThreshold, metrics, sizeof(self->softThreshold));
-    return 0;
-}
-
-LIB_EXPORT rc_t CC SRACacheGetHardThreshold(SRACache* self, SRACacheMetrics* metrics)
-{
-    if (self == NULL)
-        return RC( rcSRA, rcData, rcAccessing, rcSelf, rcNull );
-    if (metrics == NULL)
-        return RC( rcSRA, rcData, rcAccessing, rcParam, rcNull );
-    memcpy(metrics, &self->hardThreshold, sizeof(self->hardThreshold));
-    return 0;
-}
-
-LIB_EXPORT rc_t CC SRACacheSetHardThreshold(SRACache* self, const SRACacheMetrics* metrics)
-{
-    if (self == NULL)
-        return RC( rcSRA, rcData, rcUpdating, rcSelf, rcNull );
-    if (metrics == NULL)
-        return RC( rcSRA, rcData, rcUpdating, rcParam, rcNull );
-    memcpy(&self->hardThreshold, metrics, sizeof(self->hardThreshold));
-    return 0;
-}
-
-static void CC SRACacheIndexDestructor(BSTNode *n, void *data)
-{
-    SRACacheIndexDestroy((SRACacheIndex*)n);
-}
-static void CC SRACacheElementDestructor(DLNode *n, void *data)
-{
-    SRACacheElementDestroy((SRACacheElement*)n);
-}
-
-LIB_EXPORT rc_t CC SRACacheWhack(SRACache* self)
-{
-    rc_t rc = 0;
-    if (self == NULL)
-        return RC( rcSRA, rcData, rcDestroying, rcSelf, rcNull );
-
-    BSTreeWhack(&self->indexes, SRACacheIndexDestructor, NULL);
-    DLListWhack(&self->lru, SRACacheElementDestructor, NULL);
-    
-    rc = KLockRelease(self->mutex);
-    free(self);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRACacheGetUsage(SRACache* self, SRACacheUsage* usage)
-{
-    if (self == NULL)
-        return RC( rcSRA, rcData, rcAccessing, rcSelf, rcNull );
-    if (usage == NULL)
-        return RC( rcSRA, rcData, rcAccessing, rcParam, rcNull );
-    usage->soft_threshold   = self->softThreshold.elements;
-    usage->hard_threshold   = self->hardThreshold.elements;
-    usage->elements         = self->current.elements;
-    usage->requests         = self->requests;
-    usage->hits             = self->hits;
-    usage->misses           = self->misses;
-    usage->busy             = self->busy;
-    return 0;
-}
-
-static
-int64_t CC IndexCmp (const BSTNode * item, const BSTNode * n)
-{
-    return StringCompare( ((const SRACacheIndex *)item)->prefix, ((const SRACacheIndex *)n)->prefix );
-}
-    
-static
-int64_t CC PrefixCmp (const void * item, const BSTNode * n)
-{
-    return StringCompare( (const String*)item, ((const SRACacheIndex *)n)->prefix );
-}
-    
-static
-rc_t
-AddNewIndex(BSTree* indexes, String* prefix, SRACacheIndex** newIdx)
-{
-    rc_t rc = SRACacheIndexMake(newIdx, prefix);
-    if (rc == 0)
-    {
-        rc = BSTreeInsert(indexes, &(*newIdx)->dad, IndexCmp);
-        if (rc != 0)
-            SRACacheIndexDestroy(*newIdx);
-    }
-    return rc;
-}
-
-static
-rc_t
-ParseAccessionName(const char *acc, String* prefix, uint32_t* key)
-{
-    rc_t rc = 0;
-    
-    /*  extract the alphabetic prefix from the accession's name */
-    size_t prefLen = 0;
-    while (acc[prefLen] != 0 && isalpha(acc[prefLen]))
-        ++prefLen;
-    StringInit(prefix, acc, prefLen, prefLen);
-    
-    {   /* the numeric key will be the rest of the accession's name, if fully numeric */
-        char *end;
-        *key = strtou32 ( acc + prefLen, & end, 10 );
-        if ( end [ 0 ] != 0 )
-            rc = RC( rcSRA, rcData, rcAccessing, rcName, rcInvalid );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRACacheAddTable(SRACache* self, const char* acc, SRATable* table)
-{ /* if crosses soft threshold, signal BG thread to wake up */
-    rc_t rc = 0;
-    String prefix;
-    uint32_t key;
-    
-    if (self == NULL)
-        return RC( rcSRA, rcData, rcAccessing, rcSelf, rcNull );
-    if (acc == NULL || acc[0] == 0 || table == NULL)
-        return RC( rcSRA, rcData, rcAccessing, rcParam, rcNull );
-
-    rc = ParseAccessionName(acc, &prefix, &key);
-    if (rc == 0)
-    {
-        rc = KLockAcquire(self->mutex);
-        if (rc == 0)
-        {
-            SRACacheIndex* index = (SRACacheIndex*) BSTreeFind ( &self->indexes, &prefix, PrefixCmp );
-            if (index == NULL)
-                rc = AddNewIndex( &self->indexes, &prefix, &index );
-                
-            if (rc == 0)
-            {
-                SRACacheElement* elem = NULL;
-                rc = KVectorGetPtr ( index->body, key, (void**)&elem );   
-                if (rc == 0 && elem != NULL) /* table already in cache */
-                    rc = RC( rcSRA, rcData, rcInserting, rcParam, rcExists );
-                else if (GetRCState(rc) == rcNotFound)
-                {
-                    SRACacheMetrics metrics;
-                    MetricsInit(&metrics, table);
-                    rc = SRACacheElementMake(&elem, table, index, key, &metrics);
-                    if (rc == 0)
-                    {
-                        rc = KVectorSetPtr( index->body, key, elem );
-                        if (rc != 0)
-                            SRACacheElementDestroy(elem);
-                        else
-                        {   /* success - update global usage and time-sorted list */
-                            MetricsAdd(&self->current, &metrics);
-                            DLListPushTail( &self->lru, (DLNode*)elem );
-                        }
-                    }
-                }
-            }
-                
-            {
-                rc_t rc2 = KLockUnlock(self->mutex);
-                if (rc == 0)
-                    rc = rc2;
-            }
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRACacheGetTable(SRACache* self, const char* acc, const SRATable** object)
-{
-    rc_t rc = 0;
-    String prefix;
-    uint32_t key;
-    
-    if (self == NULL)
-        return RC( rcSRA, rcData, rcAccessing, rcSelf, rcNull );
-    if (acc == NULL || acc[0] == 0 || object == NULL)
-        return RC( rcSRA, rcData, rcAccessing, rcParam, rcNull );
-
-    *object = NULL;
-    
-    rc = ParseAccessionName(acc, &prefix, &key);
-    if (rc == 0)
-    {
-        ++ self->requests;
-        
-        rc = KLockAcquire(self->mutex);
-        if (rc == 0)
-        {
-            SRACacheIndex* index = (SRACacheIndex*) BSTreeFind ( &self->indexes, &prefix, PrefixCmp );
-            if (index != NULL)
-            {
-                SRACacheElement* elem = NULL;
-                rc = KVectorGetPtr ( index->body, key, (void**)&elem );   
-                if (rc == 0 && elem != NULL) 
-                {   
-                    if (atomic32_read(&elem->object->refcount) == 1)    /* owned by cache, not used elsewhere */
-                    {
-                        ++ self->hits;
-                        
-                        /* move to the least recently used position */
-                        DLListUnlink    ( &self->lru, &elem->dad );
-                        DLListPushTail  ( &self->lru, &elem->dad );
-                        
-                        *object = elem->object;
-                        rc = SRATableAddRef(*object);
-                    }
-                    else
-                    {
-                        ++ self->busy;
-                        rc = RC( rcSRA, rcData, rcAccessing, rcParam, rcBusy);
-                    }
-                }
-                else if (GetRCState(rc) == rcNotFound || elem == NULL)
-                {
-                    ++ self->misses;
-                    rc = 0;
-                }
-            }
-            else
-                ++ self->misses;
-                
-            {
-                rc_t rc2 = KLockUnlock(self->mutex);
-                if (rc == 0)
-                {
-                    rc = rc2;
-                    if (rc != 0)
-                        SRATableRelease(*object);
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRACacheFlush(SRACache* self)
-{
-    rc_t rc = 0;
-    if (self == NULL)
-        return RC( rcSRA, rcData, rcAccessing, rcSelf, rcNull );
-        
-    rc = KLockAcquire(self->mutex);
-    if (rc == 0)
-    {
-        /* use the lower of the two thresholds */
-        const SRACacheMetrics* thr = &self->softThreshold;
-        if ( SRACacheMetricsLessThan( &self->hardThreshold, thr ) )
-            thr = &self->hardThreshold;
-            
-        while ( ! SRACacheMetricsLessThan( &self->current, thr ) )
-        {
-            SRACacheElement* toFlush = (SRACacheElement*) DLListPopHead( &self->lru );
-            if (toFlush == NULL)
-                break;
-            rc = KVectorUnset( toFlush->index->body, toFlush->key );
-            if (rc != 0)
-                break; /* something is badly wrong */
-            MetricsSubtract( &self->current, &toFlush->metrics );
-            rc = SRACacheElementDestroy(toFlush);
-            if (rc != 0)
-                break;
-        }
-        
-        {
-            rc_t rc2 = KLockUnlock(self->mutex);
-            if (rc == 0)
-                rc = rc2;
-        }
-    }
-
-    return rc;
-}
diff --git a/libs/sra/sracol.c b/libs/sra/sracol.c
deleted file mode 100644
index ed0328a..0000000
--- a/libs/sra/sracol.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <sra/extern.h>
-#include <sra/sradb.h>
-#include <sra/types.h>
-#include <vdb/schema.h>
-#include <vdb/cursor.h>
-#include <klib/refcount.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include "sra-priv.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-
-#define RC_MODULE (rcSRA)
-#define RC_TARGET (rcColumn)
-#define CLASS "SRAColumn"
-
-/* AddRef
- * Release
- *  see REFERENCE COUNTING, above
- */
-LIB_EXPORT rc_t CC SRAColumnAddRef( const SRAColumn *self ) {
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, CLASS ) )
-        {
-        case krefLimit:
-            return RC ( RC_MODULE, RC_TARGET, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-rc_t SRAColumnWhack ( SRAColumn *self )
-{
-    if ( self -> tbl != NULL )
-    {
-        rc_t rc = SRATableSever ( self -> tbl );
-        if ( ! self -> read_only )
-        {
-            self -> tbl = NULL;
-            return rc;
-        }
-    }
-
-    free ( self );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC SRAColumnRelease ( const SRAColumn *self )
-{
-    if ( self != NULL )
-    {
-        rc_t rc;
-
-        switch ( KRefcountDrop ( & self -> refcount, "SRAColumn" ) )
-        {
-        case krefWhack:
-            return SRAColumnWhack ( ( SRAColumn* ) self );
-
-        case krefNegative:
-            rc = RC ( RC_MODULE, RC_TARGET, rcDestroying, rcSelf, rcDestroyed );
-            PLOGERR (klogInt,(klogInt, rc, "Released a SRAColumn $(B) with no more references",
-                      PLOG_P(self)));
-            return rc;
-        }
-    }
-
-    return 0;
-}
-
-
-/* OpenColumnRead
- *  open a column for read
- *
- *  "col" [ OUT ] - return parameter for newly opened column
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving column name
- *
- *  "datatype" [ IN, NULL OKAY ] - optional NUL terminated typedecl
- *  string describing fully qualified column data type, or if NULL
- *  the default type for column.
- */
-LIB_EXPORT rc_t CC SRATableOpenColumnRead( const SRATable *self,
-        const SRAColumn **rslt, const char *name, const char *datatype )
-{
-    rc_t rc;
-
-    if ( rslt == NULL )
-        rc = RC(RC_MODULE, rcColumn, rcOpening, rcParam, rcNull);
-    else
-    {
-        if ( self == NULL )
-            rc = RC(RC_MODULE, rcTable, rcAccessing, rcSelf, rcNull);
-        else if ( name == NULL )
-            rc = RC(RC_MODULE, rcColumn, rcOpening, rcName, rcNull);
-        else if ( name [ 0 ] == 0 )
-            rc = RC(RC_MODULE, rcColumn, rcOpening, rcName, rcEmpty);
-        else
-        {
-            SRAColumn *col = malloc ( sizeof * col );
-            if ( col == NULL )
-                rc = RC(RC_MODULE, RC_TARGET, rcConstructing, rcMemory, rcExhausted);
-            else
-            {
-                rc = ( datatype != NULL && datatype [ 0 ] != 0 ) ?
-                    VCursorAddColumn ( self -> curs, & col -> idx, "(%s)%s", datatype, name ):
-                    VCursorAddColumn ( self -> curs, & col -> idx, "%s", name );
-                if ( rc == 0 || GetRCState ( rc ) == rcExists )
-                {
-                    KRefcountInit ( & col -> refcount, 1, CLASS, "OpenColumnRead", name );
-                    col -> tbl = SRATableAttach ( self );
-                    col -> read_only = true;
-                    *rslt = col;
-                    return 0;
-                }
-                else if ( GetRCState ( rc ) == rcUndefined )
-                {
-                    rc = RC ( rcSRA, rcTable, rcOpening, rcColumn, rcNotFound );
-                }
-
-                free ( col );
-            }
-        }
-
-        * rslt = NULL;
-    }
-
-    return rc;
-}
-
-
-/* Datatype
- *  access data type
- *
- *  "type" [ OUT, NULL OKAY ] - returns the column type declaration
- *
- *  "def" [ OUT, NULL OKAY ] - returns the definition of the type
- *  returned in "type_decl"
- *
- * NB - one of "type" and "def" must be non-NULL
- */
-LIB_EXPORT rc_t CC SRAColumnDatatype( const SRAColumn *self,
-        VTypedecl *type, VTypedef *def )
-{
-    if (self != NULL)
-        return SRATableColDatatype(self->tbl, self->idx, type, def);
-
-    if ( type != NULL )
-        memset ( type, 0, sizeof * type );
-    if ( def != NULL )
-        memset ( def, 0, sizeof * def );
-
-    return RC(RC_MODULE, RC_TARGET, rcAccessing, rcSelf, rcNull);
-}
-
-
-/* GetRange
- *  get a contiguous range around a spot id, e.g. tile for Illumina
- *
- *  "id" [ IN ] - return parameter for 1-based spot id
- *
- *  "first" [ OUT, NULL OKAY ] and "last" [ OUT, NULL OKAY ] -
- *  id range is returned in these output parameters, where
- *  at least ONE must be NOT-NULL
- */
-LIB_EXPORT rc_t CC SRAColumnGetRange( const SRAColumn *self,
-        spotid_t id, spotid_t *first, spotid_t *last )
-{
-    if (self != NULL)
-        return SRATableGetIdRange(self->tbl, self->idx, id, first, last);
-
-    if ( first != NULL )
-        * first = 0;
-    if ( last != NULL )
-        * last = 0;
-
-    return RC(RC_MODULE, RC_TARGET, rcAccessing, rcSelf, rcNull);
-}
-
-
-/* Read
- *  read row data
- *
- *  "id" [ IN ] - spot row id between 1 and max(spot id)
- *
- *  "base" [ OUT ] and "offset" [ OUT ] - pointer and bit offset
- *  to start of spot row data.
- *
- *  "size" [ OUT ] - size in bits of row data
- */
-LIB_EXPORT rc_t CC SRAColumnRead( const SRAColumn *self,
-        spotid_t id, const void **base, bitsz_t *offset, bitsz_t *size )
-{
-    if (self != NULL)
-        return SRATableRead(self->tbl, id, self->idx, base, offset, size);
-
-    if ( base != NULL )
-        * base = NULL;
-    if ( offset != NULL )
-        * offset = 0;
-    if ( size != NULL )
-        * size = 0;
-
-    return RC(RC_MODULE, RC_TARGET, rcAccessing, rcSelf, rcNull);
-}
diff --git a/libs/sra/sramgr-cmn.c b/libs/sra/sramgr-cmn.c
deleted file mode 100644
index 14d0c8b..0000000
--- a/libs/sra/sramgr-cmn.c
+++ /dev/null
@@ -1,572 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <sra/extern.h>
-
-#include <klib/namelist.h>
-#include <klib/refcount.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <kfs/directory.h>
-#include <kfg/config.h>
-#include <vfs/manager.h>
-#include <vfs/resolver.h>
-#include <vfs/path.h>
-#include <kdb/manager.h>
-#include <kdb/kdb-priv.h>
-#include <vdb/manager.h>
-#include <vdb/schema.h>
-#include <vdb/vdb-priv.h>
-#include <sra/sradb.h>
-#include <sra/sraschema.h>
-#include <sra/srapath.h>
-#include <sra/sradb-priv.h>
-#include <sysalloc.h>
-#include <atomic.h>
-
-#include "sra-priv.h"
-
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <assert.h>
-
-
-/* Whack
- *  will not refuse request, and ignores errors
- */
-static
-rc_t SRAMgrWhack ( const SRAMgr *that )
-{
-    SRAMgr *self = ( SRAMgr* ) that;
-
-    VSchemaRelease ( self -> schema );
-    VDBManagerRelease ( self -> vmgr );
-    SRACacheWhack ( self -> cache );
-    
-    /* must check here for NULL because
-       SRAPathRelease is weak-linked */
-    if ( self -> _pmgr != NULL )
-    {
-#if OLD_SRAPATH_MGR
-        SRAPathRelease ( self -> _pmgr );
-#else
-        VResolverRelease ( ( const VResolver* ) self -> _pmgr );
-#endif
-    }
-
-    free ( self );
-    return 0;
-}
-
-
-/* Release
- *  releases reference to object
- *  obtained from MakeRead, MakeUpdate,
- *  or AddRef(see above)
- */
-LIB_EXPORT rc_t CC SRAMgrRelease ( const SRAMgr *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "SRAMgr" ) )
-        {
-        case krefWhack:
-            return SRAMgrWhack ( ( SRAMgr* ) self );
-        case krefNegative:
-            return RC ( rcSRA, rcMgr, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* AddRef
- *  attach a new reference to an existing object
- *  ( see above)
- */
-LIB_EXPORT rc_t CC SRAMgrAddRef ( const SRAMgr *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "SRAMgr" ) )
-        {
-        case krefLimit:
-            return RC ( rcSRA, rcMgr, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Attach
- * Sever
- */
-SRAMgr *SRAMgrAttach ( const SRAMgr *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "SRAMgr" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( SRAMgr* ) self;
-}
-
-rc_t SRAMgrSever ( const SRAMgr *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "SRAMgr" ) )
-        {
-        case krefWhack:
-            return SRAMgrWhack ( ( SRAMgr* ) self );
-        case krefNegative:
-            return RC ( rcSRA, rcMgr, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Make
- */
-static
-rc_t SRAMgrInitPath ( SRAMgr *mgr, KConfig *kfg, const KDirectory *wd )
-{
-    VFSManager *vfs;
-    rc_t rc = VFSManagerMake ( & vfs );
-    if ( rc == 0 )
-    {
-        rc = VFSManagerMakeResolver ( vfs, ( VResolver** ) & mgr -> _pmgr, kfg );
-        VFSManagerRelease ( vfs );
-    }
-
-    if ( rc != 0 )
-        mgr -> _pmgr = NULL;
-
-    return 0;
-}
-
-rc_t SRAMgrMake ( SRAMgr **mgrp,
-    const VDBManager *vmgr, const KDirectory *wd )
-{
-    rc_t rc;
-
-    /* require sraschema object */
-    SRAMgr *mgr = malloc ( sizeof * mgr );
-    if ( mgr == NULL )
-        rc = RC ( rcSRA, rcMgr, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        VSchema *schema;
-        rc = VDBManagerMakeSRASchema ( vmgr, & schema );
-        if ( rc == 0 )
-        {
-            KConfig* kfg;
-            rc = KConfigMake ( & kfg, wd );
-            if ( rc == 0 )
-            {
-                rc = SRAMgrInitPath ( mgr, kfg, wd );
-                if ( rc == 0 )
-                {
-                    rc = SRACacheInit ( & mgr -> cache, kfg );
-                    if ( rc == 0 )
-                    {
-                        KRefcountInit ( & mgr -> refcount, 1, "SRAMgr", "SRAMgrMake", "sramgr" );
-                        mgr -> vmgr = vmgr;
-                        mgr -> schema = schema;
-                        mgr -> mode = kcmCreate; /* TBD - should this include parents? */
-                        mgr -> read_only = true;
-                        * mgrp = mgr;
-                        KConfigRelease ( kfg );
-                        return 0;
-                    }
-                }
-                KConfigRelease ( kfg );
-            }
-
-            VSchemaRelease ( schema );
-        }
-
-        free ( mgr );
-    }
-
-    * mgrp = NULL;
-    return rc;
-}
-
-
-/* Writable
- *  returns 0 if table is writable
- *  rcLocked if locked, rcReadonly if read-only
- *  other code upon error
- *
- *  "path" [ IN ] - NUL terminated table path
- */
-LIB_EXPORT rc_t CC SRAMgrVWritable ( const SRAMgr *self,
-        const char *path, va_list args )
-{
-    if ( self == NULL )
-        return RC ( rcSRA, rcMgr, rcAccessing, rcSelf, rcNull );
-    return VDBManagerVWritable ( self -> vmgr, path, args );
-}
-
-LIB_EXPORT rc_t CC SRAMgrWritable ( const SRAMgr *self,
-        const char *path, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, path );
-
-    rc = SRAMgrVWritable ( self, path, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRAMgrResolve( const SRAMgr *self, const char* acc, char* buf, size_t buf_size )
-{
-    if ( self == NULL )
-        return RC ( rcSRA, rcMgr, rcResolving, rcSelf, rcNull );
-    if ( acc == NULL || buf == NULL)
-        return RC ( rcSRA, rcMgr, rcResolving, rcParam, rcNull );
-    else
-    {
-        VFSManager *vfs;
-        rc_t rc = VFSManagerMake ( & vfs );
-        if (rc == 0)
-        {
-			rc_t rc2;
-            VPath* path;
-            rc = VFSManagerMakePath(vfs, &path, "ncbi-acc:%s", acc);
-            if (rc == 0)
-            {
-                const VPath* resolved;
-                rc = VResolverQuery ( (const struct VResolver*)self->_pmgr, eProtocolHttp, path, &resolved, NULL, NULL );
-                if (rc == 0)
-                {
-                    rc = VPathReadPath ( resolved, buf, buf_size, NULL );
-                    rc2 = VPathRelease(resolved);
-                    if (rc == 0)
-                        rc = rc2;
-                }
-                
-                rc2 = VPathRelease(path);
-                if (rc == 0)
-                    rc = rc2;
-            }
-            rc2 = VFSManagerRelease(vfs);
-            if (rc == 0)
-                rc = rc2;
-        }
-        
-        return rc;
-    }
-}
-
-LIB_EXPORT rc_t CC SRAMgrConfigReload( const SRAMgr *cself, const KDirectory *wd )
-{
-#if OLD_SRAPATH_MGR
-    SRAMgr *self = cself;
-
-    /* create a new SRAPath object */
-    SRAPath *pnew;
-    rc_t rc = SRAPathMake ( & pnew, wd );
-    if ( rc == 0 )
-    {
-        /* swap with the old guy */
-        SRAPath *pold = self -> _pmgr;
-        if ( atomic_test_and_set_ptr ( ( void *volatile* ) & self -> _pmgr, pnew, pold ) == ( void* ) pold )
-            SRAPathRelease ( pold );
-        else
-            SRAPathRelease ( pnew );
-    }
-
-    return rc;
-#else
-    return 0;
-#endif
-
-#if 0
-
-
-    /* do not reload VDBManager config for now
-       it cannot reload properly and grows in memory */
-    rc_t rc = 0;
-    /* (not thread) safely re-instanciate sra path config */
-    SRAMgr *self = (SRAMgr*)cself;
-    SRAPath* p = cself->_pmgr;
-    self->_pmgr = NULL;
-    if( (rc = SRAMgrInitPath(self, wd)) == 0 ) {
-        SRAPathRelease(p);
-    } else {
-        /* roll back */
-        self->_pmgr = p;
-    }
-    return rc;
-#endif
-
-}
-
-/* GetVDBManager
- *  returns a new reference to VDBManager used by SRAMgr
- */
-LIB_EXPORT rc_t CC SRAMgrGetVDBManagerRead ( const SRAMgr *self, const VDBManager **vmgr )
-{
-    rc_t rc;
-
-    if ( vmgr == NULL )
-        rc = RC ( rcSRA, rcMgr, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcSRA, rcMgr, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * vmgr = self -> vmgr;
-            return VDBManagerAddRef ( * vmgr );
-        }
-
-        * vmgr = NULL;
-    }
-
-    return rc;
-}
-
-/* GetKDBManager
- *  returns a new reference to KDBManager used indirectly by SRAMgr
- */
-LIB_EXPORT rc_t CC SRAMgrGetKDBManagerRead ( const SRAMgr *self,
-        struct KDBManager const **kmgr )
-{
-    rc_t rc;
-
-    if ( kmgr == NULL )
-        rc = RC ( rcSRA, rcMgr, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcSRA, rcMgr, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            return VDBManagerGetKDBManagerRead ( self -> vmgr, kmgr );
-        }
-
-        * kmgr = NULL;
-    }
-
-    return rc;
-}
-
-
-/* ModDate
- *  return a modification timestamp for table
- */
-LIB_EXPORT rc_t CC SRAMgrVGetTableModDate ( const SRAMgr *self,
-    KTime_t *mtime, const char *spec, va_list args )
-{
-    rc_t rc;
-
-    if ( mtime == NULL )
-        rc = RC ( rcSRA, rcMgr, rcAccessing, rcParam, rcNull );
-    else
-    {
-        * mtime = 0;
-        if ( self == NULL )
-            rc = RC ( rcSRA, rcMgr, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            char path[4096];
-            rc = ResolveTablePath(self, path, sizeof path, spec, args);
-            if( rc == 0 ) {
-                struct KDBManager const *kmgr;
-                rc = VDBManagerGetKDBManagerRead ( self -> vmgr, & kmgr );
-                if ( rc == 0 )
-                {
-                    rc = KDBManagerGetTableModDate(kmgr, mtime, "%s", path);
-                    KDBManagerRelease ( kmgr );
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRAMgrGetTableModDate ( const SRAMgr *self,
-    KTime_t *mtime, const char *spec, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, spec );
-    rc = SRAMgrVGetTableModDate ( self, mtime, spec, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRAMgrSingleFileArchiveExt(const SRAMgr *self, const char* spec, const bool lightweight, const char** ext)
-{
-    rc_t rc;
-
-    if( self == NULL || spec == NULL || ext == NULL ) {
-        rc = RC(rcSRA, rcFile, rcConstructing, rcParam, rcNull);
-    } else {
-        char buf[4096];
-        va_list args;
-
-        if( (rc = ResolveTablePath(self, buf, sizeof(buf), spec, args)) == 0 ) {
-            const KDBManager* kmgr;
-            if( (rc = SRAMgrGetKDBManagerRead(self, &kmgr)) == 0 ) {
-                int type = KDBManagerPathType(kmgr, "%s", buf) & ~kptAlias;
-                if( type == kptDatabase ) {
-                    *ext = CSRA_EXT(lightweight);
-                } else if( type == kptTable ) {
-                    *ext = SRA_EXT(lightweight);
-                } else {
-                    rc = RC(rcSRA, rcPath, rcResolving, rcType, rcUnknown);        
-                }
-                KDBManagerRelease(kmgr);
-            }
-        }
-    }
-    return rc;
-}
-
-/* 
- * FlushPath
- * FlushRun
- * RunBGTasks
- *  stubbed functions to manipulate a cache, if implemented
- */
-LIB_EXPORT rc_t CC SRAMgrGetCacheUsage( const SRAMgr *self, struct SRACacheUsage* stats )
-{
-    rc_t rc = 0;
-    if ( self == NULL || stats == NULL || self->cache == NULL)
-        rc = RC(rcSRA, rcMgr, rcAccessing, rcParam, rcNull);
-    else
-        rc = SRACacheGetUsage(self->cache, stats);
-    return rc;
-}
- 
-LIB_EXPORT rc_t CC SRAMgrFlush ( struct SRAMgr const *self, const struct SRACacheMetrics* thr )
-{
-    rc_t rc = 0;
-    if( self == NULL  || self->cache == NULL)
-        rc = RC(rcSRA, rcFile, rcProcessing, rcSelf, rcNull);
-    else if( thr == NULL )
-        rc = RC(rcSRA, rcFile, rcProcessing, rcParam, rcNull);
-    else 
-    {
-        SRACacheMetrics saved;
-        rc = SRACacheGetSoftThreshold(self->cache, &saved);
-        if (rc == 0)
-        {
-            rc = SRACacheSetSoftThreshold(self->cache, thr);
-            if (rc == 0)
-            {
-                rc_t rc2;
-                rc = SRACacheFlush(self->cache);
-                rc2 = SRACacheSetSoftThreshold(self->cache, &saved);
-                if (rc == 0)
-                    rc = rc2;
-            }
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRAMgrRunBGTasks ( const SRAMgr *self )
-{
-    rc_t rc;
-
-    if( self == NULL  )
-        rc = RC(rcSRA, rcMgr, rcProcessing, rcSelf, rcNull);
-        
-    rc = SRACacheFlush(self->cache);
-    
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRAMgrConfigureCache( const SRAMgr *self,  int32_t soft_threshold, int32_t hard_threshold )
-{
-    rc_t rc = 0;
-    if( self == NULL  || self->cache == NULL)
-        rc = RC(rcSRA, rcFile, rcProcessing, rcSelf, rcNull);
-    else if( soft_threshold < -1  || hard_threshold < -1 )
-        rc = RC(rcSRA, rcFile, rcProcessing, rcParam, rcNull);
-    else 
-    {
-        if ( soft_threshold > -1 )
-        {
-            SRACacheMetrics metrics;
-            memset(&metrics, 0, sizeof(metrics));
-            metrics.elements = soft_threshold;
-            rc = SRACacheSetSoftThreshold(self->cache, &metrics);
-        }
-        if ( rc == 0 && hard_threshold > -1 )
-        {
-            SRACacheMetrics metrics;
-            memset(&metrics, 0, sizeof(metrics));
-            metrics.elements = hard_threshold;
-            rc = SRACacheSetHardThreshold(self->cache, &metrics);
-        }
-        /* if a new threshold is low enough to cause a flush, do it right away */
-        rc = SRACacheFlush(self->cache);
-    }
-    return rc;
-}
-
-/*--------------------------------------------------------------------------
- * SRANamelist
- *  redirecting functions
- */
-
-
-LIB_EXPORT rc_t CC SRANamelistAddRef ( const SRANamelist *self )
-{
-    return KNamelistAddRef ( ( const KNamelist* ) self );
-}
-
-LIB_EXPORT rc_t CC SRANamelistRelease ( const SRANamelist *self )
-{
-    return KNamelistRelease ( ( const KNamelist* ) self );
-}
-
-LIB_EXPORT rc_t CC SRANamelistCount ( const SRANamelist *self, uint32_t *count )
-{
-    return KNamelistCount ( ( const KNamelist* ) self, count );
-}
-
-LIB_EXPORT rc_t CC SRANamelistGet ( const SRANamelist *self, uint32_t idx, const char **name )
-{
-    return KNamelistGet ( ( const KNamelist* ) self, idx, name );
-}
diff --git a/libs/sra/sramgr.c b/libs/sra/sramgr.c
deleted file mode 100644
index 912697d..0000000
--- a/libs/sra/sramgr.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <sra/extern.h>
-#include <sra/sradb.h>
-#include <vdb/manager.h>
-#include <vdb/schema.h>
-#include <klib/refcount.h>
-#include <klib/log.h>
-
-#include <klib/out.h>
-
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include "libsradb.vers.h"
-#include "sra-priv.h"
-
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <assert.h>
-
-
-/* MakeRead
- *  create library reference for read-only access
- *
- *  "wd" [ IN, NULL OKAY ] - optional working directory for
- *  accessing the file system. mgr will attach its own reference
- *
- *  NB - not implemented in update libary
- *  and the read-only library may not be mixed with read/write
- */
-LIB_EXPORT rc_t CC SRAMgrMakeRead ( const SRAMgr **mgr )
-{
-    return SRAMgrMakeReadWithDir ( mgr, NULL );
-}
-
-LIB_EXPORT rc_t CC SRAMgrMakeReadWithDir ( const SRAMgr **mgrp,
-        struct KDirectory const *wd )
-{
-    rc_t rc;
-
-    if ( mgrp == NULL )
-        rc = RC ( rcSRA, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        const VDBManager *vmgr;
-        rc = VDBManagerMakeRead ( & vmgr, wd );
-        if ( rc == 0 )
-        {
-            SRAMgr *mgr;
-            rc = SRAMgrMake ( & mgr, vmgr, wd );
-            if ( rc == 0 )
-            {
-                * mgrp = mgr;
-                return 0;
-            }
-
-            VDBManagerRelease ( vmgr );
-        }
-
-        * mgrp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* GetSchema
- *  get a reference to the schema used to create new tables
- *
- *  "schema" [ OUT ] - return parameter for reference to SRA schema
- *
- * NB - returns a new reference that must be released via VSchemaRelease
- */
-LIB_EXPORT rc_t CC SRAMgrGetSchemaRead ( const SRAMgr *self,
-        const VSchema **schema )
-{
-    rc_t rc;
-
-    if ( schema == NULL )
-        rc = RC ( rcSRA, rcSchema, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcSRA, rcMgr, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = VSchemaAddRef ( self -> schema );
-            if ( rc == 0 )
-            {
-                * schema = self -> schema;
-                return 0;
-            }
-        }
-
-        * schema = NULL;
-    }
-
-    return rc;
-}
-
-/* OpenDatatypes
- *  open datatype registry object for requested access
- *
- *  "dt" [ OUT ] - return parameter for datatypes object
- */
-LIB_EXPORT rc_t CC SRAMgrOpenDatatypesRead ( const SRAMgr *self,
-        struct VDatatypes const **dt )
-{
-    return SRAMgrGetSchemaRead ( self, ( const VSchema** ) dt );
-}
-
-
-/* UseSchema
- *  allows SRA schema to be entirely replaced
- *  affects creation/update of all subsequent tables
- *
- *  "schema" [ IN ] - new schema to be applied
- *
- * NB - manager will attach a new reference to schema object,
- *  you are still responsible for releasing it via VSchemaRelease
- */
-LIB_EXPORT rc_t CC SRAMgrUseSchemaRead ( const SRAMgr *self,
-        const VSchema *schema )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcSRA, rcMgr, rcUpdating, rcSelf, rcNull );
-    else if ( schema == NULL )
-        rc = RC ( rcSRA, rcMgr, rcUpdating, rcSchema, rcNull );
-    else if ( schema == self -> schema )
-        rc = 0;
-    else
-    {
-        rc = VSchemaAddRef ( schema );
-        if ( rc == 0 )
-        {
-            VSchemaRelease ( self -> schema );
-            ( ( SRAMgr* ) self ) -> schema = schema;
-        }
-    }
-
-    return rc;
-}
-
-
-/* Version
- *  returns the library version
- */
-LIB_EXPORT rc_t CC SRAMgrVersion ( const SRAMgr *self,
-        uint32_t *version )
-{
-    if ( version == NULL )
-        return RC ( rcSRA, rcMgr, rcAccessing, rcParam, rcNull );
-    if ( self == NULL )
-        return RC ( rcSRA, rcMgr, rcAccessing, rcSelf, rcNull );
-
-    * version = LIBSRADB_VERS;
-    return 0;
-}
diff --git a/libs/sra/sraschema-priv.h b/libs/sra/sraschema-priv.h
deleted file mode 100644
index aec84f9..0000000
--- a/libs/sra/sraschema-priv.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_sraschema_priv_
-#define _h_sraschema_priv_
-
-#include <stddef.h>
-
-/* schema is built-in */
-extern const char sra_schema_text [];
-extern const size_t sra_schema_size;
-
-#endif /* _h_sraschema_priv_ */
diff --git a/libs/sra/sraschema-stub.c b/libs/sra/sraschema-stub.c
deleted file mode 100644
index 2cfdc97..0000000
--- a/libs/sra/sraschema-stub.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <sra/sraschema.h>
-#include <sra/sradb-priv.h>
-#include <klib/rc.h>
-
-#include "sra-priv.h"
-
-/*--------------------------------------------------------------------------
- * SRASchema
- *  a schema object pre-loaded with default SRA schema
- */
-
-/* Make
- *  create an instance of the default SRA schema
- */
-rc_t CC VDBManagerMakeSRASchema ( struct VDBManager const *self, struct VSchema **schema )
-{
-    return SRASchemaMake ( schema, self );
-}
-
-rc_t CC SRAMgrMakeSRASchema ( const SRAMgr *self, struct VSchema **schema )
-{
-    if ( self != NULL )
-        return VDBManagerMakeSRASchema ( self -> vmgr, schema );
-    return RC ( rcSRA, rcMgr, rcAccessing, rcSelf, rcNull );
-}
diff --git a/libs/sra/sraschema.c b/libs/sra/sraschema.c
deleted file mode 100644
index 3d73cc6..0000000
--- a/libs/sra/sraschema.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <sra/sch-extern.h>
-#include <sra/sradb-priv.h>
-#include <sra/sraschema.h>
-#include <vdb/manager.h>
-#include <vdb/schema.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include "sraschema-priv.h"
-#include "sra-priv.h"
-
-
-/*--------------------------------------------------------------------------
- * SRASchema
- *  a schema object pre-loaded with default SRA schema
- */
-
-/* Make
- *  create an instance of the default SRA schema
- */
-
-LIB_EXPORT rc_t CC SRASchemaMake ( VSchema **schema, const VDBManager *mgr )
-{
-    rc_t rc;
-
-    if ( schema == NULL )
-        rc = RC ( rcVDB, rcMgr, rcCreating, rcParam, rcNull );
-    else
-    {
-        if ( mgr == NULL )
-            rc = RC ( rcVDB, rcMgr, rcCreating, rcSelf, rcNull );
-        else
-        {
-            rc = VDBManagerMakeSchema ( mgr, schema );
-            if ( rc == 0 )
-            {
-                rc = VSchemaParseText ( * schema, "sra-schema", sra_schema_text, sra_schema_size );
-                if ( rc == 0 )
-                    return 0;
-
-                VSchemaRelease ( * schema );
-            }
-        }
-
-        * schema = NULL;
-    }
-    return rc;
-}
diff --git a/libs/sra/sratbl-cmn.c b/libs/sra/sratbl-cmn.c
deleted file mode 100644
index 7f6a36e..0000000
--- a/libs/sra/sratbl-cmn.c
+++ /dev/null
@@ -1,1458 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <sra/extern.h>
-
-#include <sra/sradb.h>
-#include <sra/srapath.h>
-#include <sra/types.h>
-#include <sra/sraschema.h>
-#include <sra/sradb-priv.h>
-#include <vdb/database.h>
-#include <vdb/schema.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-#include <vdb/dependencies.h>
-#include <kdb/meta.h>
-#include <kdb/manager.h>
-#include <kdb/table.h>
-#include <kdb/database.h>
-#include <kdb/kdb-priv.h>
-#include <vfs/manager.h>
-#include <vfs/path.h>
-#include <vfs/path-priv.h>
-#include <vfs/resolver.h>
-#include <klib/refcount.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <kfs/toc.h>
-#include <kfs/file.h>
-#include <sysalloc.h>
-
-#include "sra-priv.h"
-
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <stdio.h>
-#include <assert.h>
-#include <va_copy.h>
-
-/* Destroy
- */
-static
-void CC column_release ( void *item, void *ignore )
-{
-    SRAColumn *self = item;
-    self -> tbl = NULL;
-    SRAColumnWhack ( self );
-}
-
-void SRATableDestroy ( SRATable *self )
-{
-    VectorWhack ( & self -> wcol, column_release, NULL );
-    VCursorRelease(self->curs);
-    KMetadataRelease ( self -> meta );
-    VTableRelease ( self -> vtbl );
-    SRAMgrSever ( self -> mgr );
-
-    memset(self, 0, sizeof *self);
-
-    free ( self );
-}
-
-/* AddRef
- * Release
- *  see REFERENCE COUNTING, above
- */
-LIB_EXPORT rc_t CC SRATableAddRef( const SRATable *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "SRATable" ) )
-        {
-        case krefLimit:
-            return RC ( rcSRA, rcTable, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC SRATableRelease( const SRATable *self )
-{
-    rc_t rc = 0;
-    
-    if (self)
-    {
-        switch (KRefcountDrop(&self->refcount, "SRATable"))
-        {
-        case krefWhack:
-            return SRATableWhack ( ( SRATable* ) self );
-        case krefNegative:
-            rc = RC (rcSRA, rcTable, rcDestroying, rcSelf, rcDestroyed);
-            PLOGERR (klogInt,(klogInt, rc, "Released an SRATable $(B) with no more references",
-                      PLOG_P(self)));
-            break;
-        }
-    }
-    return rc;
-}
-
-/* Attach
- * Sever
- */
-SRATable *SRATableAttach ( const SRATable *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "SRATable" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( SRATable* ) self;
-}
-
-rc_t SRATableSever ( const SRATable *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "SRATable" ) )
-        {
-        case krefWhack:
-            return SRATableWhack ( ( SRATable* ) self );
-        case krefNegative:
-            return RC ( rcSRA, rcTable, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* FillOutTableRead
- *  creates an empty cursor
- *  accesses metadata
- */
-static rc_t ReadSpotSequence_v1(SRATable *self)
-{
-    const KMDataNode *n;
-    rc_t rc = KMetadataOpenNodeRead(self->meta, &n, ".seq");
-    if (rc == 0)
-    {
-        rc = KMDataNodeReadAsU64(n, &self->spot_count);
-        KMDataNodeRelease(n);
-    }
-    return rc;
-}
-
-typedef enum {
-    eNotRead,
-    eNotFound,
-    eFailed,
-    eRead
-} EState;
-typedef struct {
-    EState state;
-    rc_t rc;
-} State;
-typedef struct {
-    uint64_t value;
-    State state;
-} U64;
-typedef struct {
-    uint32_t value;
-    State state;
-} U32;
-typedef struct {
-    U64 BASE_COUNT;
-    U32 MAX_SPOT_ID;
-    U32 MIN_SPOT_ID;
-    U64 SPOT_COUNT;
-} PseudoMeta;
-static
-rc_t VCursor_ReadPseudoMeta(rc_t rc, const VCursor *self,
-    const char *name, void *buffer, uint32_t blen, State *state)
-{
-    uint32_t idx = ~0;
-    uint32_t row_len = ~0;
-
-    assert(state);
-    state->rc = 0;
-
-    if (rc != 0)
-    {   return rc; }
-
-    state->state = eNotRead;
-
-    rc = VCursorAddColumn(self, &idx, "%s", name);
-
-    if (rc != 0) {
-        state->rc = rc;
-
-        if ( GetRCObject( rc ) == (enum RCObject)rcColumn && GetRCState( rc ) == rcNotFound ) {
-            rc = 0;
-            state->state = eNotFound;
-        }
-        else {
-            state->state = eFailed;
-        }
-    }
-
-    if (state->rc == 0) {
-        rc = VCursorReadDirect(self, 1, idx, blen * 8, buffer, blen, &row_len);
-
-        state->rc = rc;
-
-        if (rc != 0)
-        {   state->state = eFailed; }
-        else
-        {   state->state = eRead; }
-
-    }
-
-    return rc;
-}
-
-static
-rc_t VCursor_ReadPseudoMetaU32(rc_t rc, const VCursor *self,
-    const char *name, U32 *val)
-{
-    assert(val);
-    return VCursor_ReadPseudoMeta(rc, self,
-        name, &val->value, sizeof val->value, &val->state);
-}
-
-static
-rc_t VCursor_ReadPseudoMetaU64(rc_t rc, const VCursor *self,
-    const char *name, U64 *val)
-{
-    assert(val);
-    return VCursor_ReadPseudoMeta(rc, self,
-        name, &val->value, sizeof val->value, &val->state);
-}
-
-static
-rc_t PseudoMetaInit(PseudoMeta *self, const VCursor *curs,
-    bool readSpotCount, uint64_t spot_count)
-{
-    rc_t rc = 0;
-
-    assert(self);
-
-    memset(self, 0, sizeof *self);
-
-    if (readSpotCount) {
-        rc =
-         VCursor_ReadPseudoMetaU64(rc, curs, "SPOT_COUNT", &self->SPOT_COUNT);
-    }
-    else {
-        self->SPOT_COUNT.value = spot_count;
-        self->SPOT_COUNT.state.state = eRead;
-    }
-
-    rc = VCursor_ReadPseudoMetaU64(rc, curs, "BASE_COUNT", &self->BASE_COUNT);
-
-    rc = VCursor_ReadPseudoMetaU32(rc, curs, "MIN_SPOT_ID", &self->MIN_SPOT_ID); 
-
-    rc = VCursor_ReadPseudoMetaU32(rc, curs, "MAX_SPOT_ID", &self->MAX_SPOT_ID);
-
-    return rc;
-}
-
-static
-rc_t PseudoMetaFix(PseudoMeta *self)
-{
-    rc_t rc = 0;
-
-    assert(self);
-
-    if (self->MIN_SPOT_ID.state.state != eRead)
-    {   self->MIN_SPOT_ID.value = 1; }
-
-    if (self->SPOT_COUNT.state.state != eRead &&
-        self->MAX_SPOT_ID.state.state != eRead)
-    {
-        return self->SPOT_COUNT.state.rc;
-    }
-    else if (self->SPOT_COUNT.state.state == eRead) {
-        if (self->MAX_SPOT_ID.state.state != eRead) {
-            self->MAX_SPOT_ID.value
-                = self->MIN_SPOT_ID.value + self->SPOT_COUNT.value - 1;
-        }
-        else if (self->MAX_SPOT_ID.value >= self->MIN_SPOT_ID.value) {
-	    uint32_t delta = (uint32_t) (self->SPOT_COUNT.value - (self->MAX_SPOT_ID.value - self->MIN_SPOT_ID.value + 1)); /** SPOT_COUNT is 64 bit, but M*_SPOT_ID is 32; anticipate rollover **/
-            if ( delta )
-            {
-                self->SPOT_COUNT.value
-                    = self->MAX_SPOT_ID.value - self->MIN_SPOT_ID.value + 1;
-            }
-        }
-    }
-    else {
-            self->SPOT_COUNT.value
-                = self->MAX_SPOT_ID.value - self->MIN_SPOT_ID.value - 1;
-    }
-
-    return rc;
-}
-
-static
-rc_t SRATableLoadMetadata(SRATable * self)
-{
-    rc_t rc = 0;
-    PseudoMeta meta;
-    bool readSpotCount = true;
-
-    assert(self && self->curs != NULL);
-    assert(self->curs_open == true);
-
-    readSpotCount = self->metavers > 1;
-    if (!readSpotCount) {
-        rc = ReadSpotSequence_v1(self);
-        if (rc != 0)
-        {   return rc; }
-    }
-
-    rc = PseudoMetaInit(&meta, self->curs, readSpotCount, self->spot_count);
-    if (rc != 0)
-    {   return rc; }
-
-    rc = PseudoMetaFix(&meta);
-    if (rc != 0)
-    {   return rc; }
-
-    self->spot_count = meta.SPOT_COUNT.value;
-    self->base_count = meta.BASE_COUNT.value;
-    self->min_spot_id = meta.MIN_SPOT_ID.value;
-    self->max_spot_id = meta.MAX_SPOT_ID.value;
-
-    {
-	int64_t delta = self->spot_count - (self->max_spot_id-self->min_spot_id+1);
-	if(delta>0 && ((uint32_t)delta)==0){/* there was a rollover*/
-		self->max_spot_id = self->min_spot_id + self->spot_count - 1;
-	}
-    }
-
-    return rc;
-}
-
-/* detect min and max spot-id from a temp. cursor */
-static rc_t SRATableGetMinMax( SRATable * self )
-{
-    const VCursor *temp_cursor;
-    rc_t rc;
-
-    assert( self != NULL );
-    assert( self->vtbl != NULL);
-    rc = VTableCreateCursorRead( self->vtbl, &temp_cursor );
-    if ( rc == 0 )
-    {
-        uint32_t idx;
-        rc = VCursorAddColumn ( temp_cursor, &idx, "READ" );
-        if ( rc == 0 )
-        {
-            rc = VCursorOpen( temp_cursor );
-            if ( rc == 0 )
-            {
-                int64_t  first;
-                uint64_t count;
-                rc = VCursorIdRange( temp_cursor, 0, &first, &count );
-                if ( rc == 0 )
-                {
-                    self->min_spot_id = first;
-                    self->max_spot_id = first + count;
-                    self->spot_count = count;
-                }
-            }
-        }
-        VCursorRelease( temp_cursor );
-    }
-    return rc;
-}
-
-rc_t SRATableFillOut ( SRATable *self, bool update )
-{
-    rc_t rc;
-    
-    /* require these operations to succeed */
-    rc = VCursorPermitPostOpenAdd( self->curs );
-    if ( rc != 0 )
-        return rc;
-    rc = VCursorOpen( self->curs );
-    if ( rc != 0 )
-        return rc;
-    self -> curs_open = true;
-    if ( ! update )
-    {
-        rc = SRATableLoadMetadata( self );
-        if ( rc != 0 )
-            rc = SRATableGetMinMax( self );
-    }
-    return rc;
-}
-
-
-/* ResolveTablePath
- *  takes either an accession or path
- *  substitutes any arguments
- *  resolves via SRAPath mgr if present
- */
-rc_t ResolveTablePath ( const SRAMgr *mgr,
-    char *path, size_t psize, const char *spec, va_list args )
-{
-#if OLD_SRAPATH_MGR
-    int len;
-    char tblpath [ 4096 ];
-    const SRAPath *pmgr = mgr -> _pmgr;
-
-    /* if no path manager or if the spec string has embedded path separators,
-       then this can't be an accession - just print it out */
-    if ( mgr -> _pmgr == NULL || strchr( spec, '/' ) != NULL )
-    {
-        len = vsnprintf ( path, psize, spec, args );
-        if ( len < 0 || ( size_t ) len >= psize )
-            return RC ( rcSRA, rcTable, rcOpening, rcPath, rcExcessive );
-        return 0;
-    }
-
-    /* create a copy - not likely to be too large */
-    len = vsnprintf ( tblpath, sizeof tblpath, spec, args );
-    if ( len < 0 || ( size_t ) len >= sizeof tblpath )
-        return RC ( rcSRA, rcTable, rcOpening, rcPath, rcExcessive );
-
-    /* test if the path exists in current directory, i.e. with assumed dot */
-    if ( ! SRAPathTest ( pmgr, tblpath ) )
-    {
-        rc_t rc = SRAPathFind ( pmgr, tblpath, path, psize );
-        if ( rc == 0 )
-            return 0;
-    }
-
-    /* use the path given */
-    if ( ( size_t ) len >= psize )
-        return RC ( rcSRA, rcTable, rcOpening, rcBuffer, rcInsufficient );
-    strcpy ( path, tblpath );
-
-    return 0;
-#else
-    VFSManager *vfs;
-    rc_t rc = VFSManagerMake ( & vfs );
-    if ( rc == 0 )
-    {
-        VPath *accession;
-        const VPath *tblpath = NULL;
-        rc = VFSManagerVMakePath ( vfs, & accession, spec, args );
-        if ( rc == 0 )
-        {
-            rc = VResolverLocal ( ( const VResolver* ) mgr -> _pmgr, accession, & tblpath );
-            if ( rc == 0 )
-            {
-                size_t size;
-                rc = VPathReadPath ( tblpath, path, psize, & size );
-                VPathRelease ( tblpath );
-            }
-            VPathRelease ( accession );
-        }
-
-        VFSManagerRelease ( vfs );
-    }
-    return rc;
-#endif
-}
-
-/* OpenRead
- *  open an existing table
- *
- *  "tbl" [ OUT ] - return parameter for table
- *
- *  "spec" [ IN ] - NUL terminated UTF-8 string giving path
- *  to table.
- */
-static
-rc_t CC SRAMgrVOpenAltTableRead ( const SRAMgr *self,
-    const SRATable **rslt, const char *altname, const char *spec, va_list args )
-{
-    rc_t rc;
-
-    if ( rslt == NULL )
-        rc = RC ( rcSRA, rcTable, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcSRA, rcMgr, rcAccessing, rcSelf, rcNull );
-        else if ( spec == NULL )
-            rc = RC ( rcSRA, rcTable, rcOpening, rcName, rcNull );
-        else if ( spec [ 0 ] == 0 )
-            rc = RC ( rcSRA, rcTable, rcOpening, rcName, rcEmpty );
-        else
-        {
-            SRATable *tbl = calloc ( 1, sizeof *tbl );
-            if ( tbl == NULL )
-                rc = RC ( rcSRA, rcTable, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                VSchema *schema = NULL;
-
-                rc = VDBManagerMakeSRASchema(self -> vmgr, & schema);
-                if ( rc == 0 ) 
-                {
-                    va_list args_copy;
-                    va_copy ( args_copy, args );
-                    rc = VDBManagerVOpenTableRead ( self -> vmgr, & tbl -> vtbl, schema, spec, args );
-                    if ( rc != 0 && GetRCObject ( rc ) == (enum RCObject)rcTable && GetRCState ( rc ) == rcIncorrect )
-                    {
-                        const VDatabase *db;
-                        rc_t rc2 = VDBManagerVOpenDBRead ( self -> vmgr, & db, schema, spec, args_copy );
-                        if ( rc2 == 0 )
-                        {
-                            rc2 = VDatabaseOpenTableRead ( db, & tbl -> vtbl, "%s", altname );
-                            if ( rc2 == 0 )
-                                rc = 0;
-
-                            VDatabaseRelease ( db );
-                        }
-                    }
-                    va_end ( args_copy );
-
-                    VSchemaRelease(schema);
-
-                    if ( rc == 0 )
-                    {
-                        rc = VTableOpenMetadataRead ( tbl -> vtbl, & tbl -> meta );
-                        if ( rc == 0 )
-                        {
-                            rc = KMetadataVersion ( tbl -> meta, & tbl -> metavers );
-                            if ( rc == 0 )
-                            {
-                                rc = VTableCreateCursorRead ( tbl -> vtbl, & tbl -> curs );
-                                if ( rc == 0 )
-                                {
-                                    tbl -> mode = self -> mode;
-                                    tbl -> read_only = true;
-                                    KRefcountInit ( & tbl -> refcount, 1, "SRATable", "OpenTableRead", spec );
-                                        
-                                    rc = SRATableFillOut ( tbl, false );
-                                    if ( rc == 0 )
-                                    {
-                                        * rslt = tbl;
-                                        return 0;
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    
-                }
-                SRATableWhack ( tbl );
-            }
-        }
-
-        * rslt = NULL;
-    }
-    return rc;
-}
-
-/* OpenRead
- *  open an existing table
- *
- *  "tbl" [ OUT ] - return parameter for table
- *
- *  "spec" [ IN ] - NUL terminated UTF-8 string giving path
- *  to table.
- */
-LIB_EXPORT rc_t CC SRAMgrVOpenTableRead ( const SRAMgr *self,
-        const SRATable **crslt, const char *spec, va_list args )
-{
-    rc_t rc;
-    char tblpath [ 4096 ];
-    int num_writ = vsnprintf ( tblpath, sizeof tblpath, spec, args );
-    if ( num_writ < 0 || ( size_t ) num_writ >= sizeof tblpath )
-        rc = RC ( rcSRA, rcMgr, rcOpening, rcPath, rcExcessive );
-    else
-    {
-        SRATable **rslt = (SRATable **)crslt; /* to avoid "const_casts" below */
-        rc = SRACacheGetTable( self->cache, tblpath, crslt );
-        if  (rc == 0 )
-        {
-            if ( *crslt == NULL )
-            {
-                rc = SRAMgrOpenAltTableRead ( self, crslt, "SEQUENCE", tblpath );
-                if ( rc == 0 )
-                {
-                    rc = SRACacheAddTable( self->cache, tblpath, *rslt);
-                    if ( GetRCObject(rc) == rcParam && GetRCState(rc) == rcExists )
-                    {           /* the same object has appeared in the cache since our call to SRACacheGetTable above;  */
-                       rc = 0;  /* return the new object, never mind the cache */
-                    }
-                    else if ( ! SRACacheMetricsLessThan(&self->cache->current, &self->cache->hardThreshold) )
-                       rc = SRACacheFlush(self->cache);
-                }
-            }
-        }
-        else if ( (GetRCObject(rc) == rcName && GetRCState(rc) == rcInvalid) ||   /* accessions with irregular names are not cached */
-                  (GetRCObject(rc) == rcParam && GetRCState(rc) == rcBusy)    )   /* in cache but in use */
-        {    
-            rc = SRAMgrOpenAltTableRead ( self, crslt, "SEQUENCE", tblpath );
-            if (rc == 0)
-                (*rslt)->mgr = SRAMgrAttach(self);
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRAMgrOpenTableRead ( const SRAMgr *self,
-        const SRATable **tbl, const char *spec, ... )
-{
-    rc_t rc;
-    
-    va_list args;
-    va_start ( args, spec );
-
-    rc = SRAMgrVOpenTableRead ( self, tbl, spec, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* Read - PRIVATE
- *  column message sent via table
- */
-rc_t SRATableRead ( const SRATable *self, spotid_t id, uint32_t idx,
-    const void **base, bitsz_t *offset, bitsz_t *size )
-{
-    rc_t rc;
-
-    if ( base == NULL || offset == NULL || size == NULL )
-        rc = RC ( rcSRA, rcColumn, rcReading, rcParam, rcNull );
-    else if ( self == NULL )
-        rc = RC ( rcSRA, rcTable, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        rc = 0;
-
-        /* open cursor */
-        if ( ! self -> curs_open )
-        {
-            rc = VCursorOpen(self->curs);
-            if ( rc == 0 )
-                ((SRATable *)self)->curs_open = true;
-        }
-
-        if ( rc == 0 )
-        {
-            uint32_t elem_bits, elem_off, elem_cnt;
-            rc = VCursorCellDataDirect ( self -> curs, id, idx,
-                & elem_bits, base, & elem_off, & elem_cnt );
-            if ( rc == 0 )
-            {
-                * offset = elem_off * elem_bits;
-                * size   = elem_cnt * elem_bits;
-                return 0;
-            } else if( UIError(rc, NULL, self->vtbl) ) {
-                UITableLOGError(rc, self->vtbl, true);
-            }
-        }
-    }
-
-    if ( base != NULL )
-        * base = NULL;
-    if ( offset != NULL )
-        * offset = 0;
-    if ( size != NULL )
-        * size = 0;
-
-    return rc;
-}
-
-/* GetSpotId
- *  convert spot name to spot id
- *
- *  "id" [ OUT ] - return parameter for min(spot_id)-max(spot_id)
- *
- *  "spot_name" [ IN ] - external spot name string
- *  in platform canonical format.
- */
-LIB_EXPORT rc_t CC SRATableGetSpotId ( const SRATable *self,
-        spotid_t *rslt, const char *spot_name )
-{
-    rc_t rc;
-    if( self == NULL || spot_name == NULL){
-        rc=RC(rcSRA, rcTable, rcListing, rcSelf, rcName);
-    } else {
-        rc=VCursorParamsSet((struct VCursorParams*)self->curs,"QUERY_BY_NAME" ,spot_name);
-        if( rc == 0) {
-            struct {
-                uint64_t start_id;
-                uint64_t id_count;
-                int64_t x;
-                int64_t y;
-            } out;
-            uint32_t idx,len;
-            rc = VCursorAddColumn(self->curs, &idx, "SPOT_IDS_FOUND");
-            if( rc == 0 || GetRCState(rc) == rcExists){
-                rc = VCursorReadDirect(self->curs,1,idx,sizeof(out) * 8,&out, 1 , &len);
-                if ( rc == 0 ) {
-                    if(out.id_count==1) {
-                        if(rslt) *rslt=out.start_id;
-                        return 0;
-                    } else if(out.id_count > 1) { /*** doing table range scan in Name space - not relying on X and Y***/
-                        uint32_t x_idx;
-                        rc = VCursorAddColumn(self->curs, &x_idx, "X");
-                        if( rc == 0 || GetRCState(rc) == rcExists){
-                            uint32_t y_idx;
-                            rc = VCursorAddColumn(self->curs, &y_idx, "Y");
-                            if(rc == 0 || GetRCState(rc) == rcExists){
-                                spotid_t rowid;
-                                for(rowid = out.start_id; rowid < out.start_id + out.id_count; rowid ++){
-                                    int32_t x,y;
-                                    rc = VCursorReadDirect(self->curs,rowid,x_idx,32,&x,1, &len);
-                                    if(rc == 0){
-                                        rc = VCursorReadDirect(self->curs,rowid,y_idx,32,&y,1, &len);
-                                        if(rc == 0 && x==out.x && y==out.y){
-                                            if(rslt) *rslt=rowid;
-                                            return 0;
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    rc = RC ( rcSRA, rcIndex, rcSearching, rcColumn, rcNotFound );
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-
-/* ListCol
- *  returns a list of simple column names
- *  each name represents at least one typed column
- *
- *  "names" [ out ] - return parameter for names list
- */
-LIB_EXPORT rc_t CC SRATableListCol( const SRATable *self, SRANamelist **rslt ) {
-    if ( self != NULL )
-        return VTableListCol ( self -> vtbl, (KNamelist **)rslt );
-    return RC(rcSRA, rcTable, rcListing, rcSelf, rcName);
-}
-
-
-/* ColDatatypes
- *  returns list of typedecls for named column
- *
- *  "col" [ IN ] - column name
- *
- *  "dflt_idx" [ OUT, NULL OKAY ] - returns the zero-based index
- *  into "typedecls" of the default datatype for the named column
- *
- *  "typedecls" [ OUT ] - list of datatypes available for named column
- */
-LIB_EXPORT rc_t CC SRATableColDatatypes( const SRATable *self,
-        const char *col, uint32_t *dflt_idx, SRANamelist **rslt ) {
-    if ( self != NULL )
-        return VTableColumnDatatypes ( self -> vtbl, col, dflt_idx, (KNamelist **)rslt );
-    return RC(rcSRA, rcTable, rcListing, rcSelf, rcName);
-}
-
-rc_t SRATableColDatatype ( const SRATable *self,
-        uint32_t idx, VTypedecl *type, VTypedef *def )
-{
-    rc_t rc;
-    if ( type == NULL && def == NULL )
-        rc = RC ( rcSRA, rcColumn, rcAccessing, rcParam, rcNull );
-    else
-    {
-        union { VTypedecl td; VTypedef def; } dummy;
-        if ( type == NULL )
-            type = & dummy . td;
-        else if ( def == NULL )
-            def = & dummy . def;
-
-        if ( idx == 0 )
-            rc = RC ( rcSRA, rcColumn, rcAccessing, rcSelf, rcNull );
-        else if ( self == NULL )
-            rc = RC ( rcSRA, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            VTypedesc desc;
-            rc = VCursorDatatype ( self -> curs, idx, type, & desc );
-            if ( rc == 0 )
-            {
-                rc = VSchemaDescribeTypedef ( VCursorGetSchema(self -> curs), def, type -> type_id );
-                if ( rc == 0 )
-                    return 0;
-            }
-        }
-
-        memset ( type, 0, sizeof * type );
-        memset ( def, 0, sizeof * def );
-    }
-    return rc;
-}
-
-/* MetaRevision
- *  returns current revision number
- *  where 0(zero) means tip
- */
-LIB_EXPORT rc_t CC SRATableMetaRevision( const SRATable *self, uint32_t *rslt )
-{
-    if (self == NULL)
-        return RC(rcSRA, rcTable, rcAccessing, rcSelf, rcNull);
-    return KMetadataRevision (self->meta,rslt);
-}
-
-
-/* MaxRevision
- *  returns the maximum revision available
- */
-LIB_EXPORT rc_t CC SRATableMaxMetaRevision( const SRATable *self, uint32_t *rslt )
-{
-    if (self == NULL)
-        return RC(rcSRA, rcTable, rcAccessing, rcSelf, rcNull);
-    return KMetadataMaxRevision(self->meta,rslt);
-}
-
-/* UseMetaRevision
- *  opens indicated revision of metadata
- *  all non-zero revisions are read-only
- */
-LIB_EXPORT rc_t CC SRATableUseMetaRevision ( const SRATable *cself, uint32_t revision )
-{
-    rc_t rc;
-
-    if ( cself == NULL )
-        rc = RC ( rcSRA, rcTable, rcUpdating, rcSelf, rcNull );
-    else if ( cself -> read_only == false )
-        rc = RC ( rcSRA, rcTable, rcUpdating, rcMetadata, rcBusy );
-    else
-    {
-        uint32_t cur;
-        rc = KMetadataRevision ( cself -> meta, & cur );
-        if ( rc == 0 && cur != revision )
-        {
-            SRATable *self = ( SRATable* ) cself;
-            const KMetadata *meta;
-            rc = KMetadataOpenRevision ( self -> meta, & meta, revision );
-            if ( rc == 0 )
-            {
-                KMetadataRelease ( self -> meta );
-                self -> meta = meta;
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* OpenMDataNode
- *  open a metadata node
- *
- *  "node" [ OUT ] - return parameter for metadata node
- *
- *  "path" [ IN ] - simple or hierarchical NUL terminated
- *  path to node
- */
-LIB_EXPORT rc_t CC SRATableOpenMDataNodeRead( const SRATable *self, 
-        struct KMDataNode const **node, const char *path, ... ) {
-    va_list va;
-    rc_t rc;
-    
-    va_start(va, path);
-    rc = SRATableVOpenMDataNodeRead(self, node, path, va);
-    va_end(va);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRATableVOpenMDataNodeRead( const SRATable *self,
-        struct KMDataNode const **rslt, const char *path, va_list args ) {
-    if (self == NULL)
-        return RC(rcSRA, rcTable, rcAccessing, rcSelf, rcNull);
-    
-    return KMetadataVOpenNodeRead(self->meta, rslt, path, args);
-}
-
-/* private */
-rc_t SRATableGetIdRange ( const SRATable *self,
-        uint32_t idx, spotid_t id, spotid_t *pfirst, spotid_t *plast )
-{
-    rc_t rc;
-
-    if ( pfirst == NULL && plast == NULL )
-        rc = RC ( rcSRA, rcColumn, rcAccessing, rcParam, rcNull );
-    else
-    {
-        spotid_t dummy;
-        if ( pfirst == NULL )
-            pfirst = & dummy;
-        else if ( plast == NULL )
-            plast = & dummy;
-
-        if ( idx == 0 )
-            rc = RC ( rcSRA, rcColumn, rcAccessing, rcSelf, rcNull );
-        else if ( self == NULL )
-            rc = RC ( rcSRA, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            int64_t first, last;
-            rc = VCursorPageIdRange ( self -> curs, idx, id, & first, & last );
-            if ( rc == 0 )
-            {
-                * pfirst = ( spotid_t ) first;
-                * plast = ( spotid_t ) last;
-
-                if ( ( int64_t ) * pfirst == first && ( int64_t ) * plast == last )
-                    return 0;
-
-                rc = RC ( rcSRA, rcColumn, rcAccessing, rcRange, rcExcessive );
-            }
-        }
-
-        * pfirst = * plast = 0;
-    }
-
-    return rc;
-}
-
-/* semi-private for sra-dbcc */
-LIB_EXPORT rc_t CC SRATableGetVTableRead( const SRATable *self, const VTable **rslt )
-{
-    if (rslt == NULL)
-        return RC(rcSRA, rcTable, rcAccessing, rcParam, rcNull);
-    
-    if (self == NULL)
-    {
-        * rslt = NULL;
-        return RC(rcSRA, rcTable, rcAccessing, rcSelf, rcNull);
-    }
-
-    *rslt = self->vtbl;
-    return VTableAddRef(*rslt);
-}
-
-LIB_EXPORT rc_t CC SRATableGetKTableRead ( const SRATable *self, struct KTable const **ktbl )
-{
-    rc_t rc;
-
-    if ( ktbl == NULL )
-        rc = RC ( rcSRA, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcSRA, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            return VTableGetKTableRead ( self -> vtbl, ktbl );
-        }
-
-        * ktbl = NULL;
-    }
-
-    return rc;
-}
-
-/* Locked
- *  returns true if locked
- */
-LIB_EXPORT bool CC SRATableLocked( const SRATable *self )
-{
-    return self ? VTableLocked(self->vtbl) : false;
-}
-
-LIB_EXPORT struct VSchema const* CC SRATableGetSchema ( struct SRATable const *self )
-{
-        return self ? VCursorGetSchema( self->curs ) : NULL;
-}
-
-/* sfa_filter
- *  if a name is found in list, exclude it
- */
-#define DEBUG_SORT(msg) DBGMSG (DBG_SRA, DBG_FLAG(DBG_SRA_SORT), msg)
-
-/* sfa_sort
- *  reorders list
- */
-enum sfa_path_type_id
-{
-    sfa_not_set = -1,
-    sfa_exclude,
-    sfa_non_column,
-    sfa_required,
-    sfa_preferred,
-    sfa_optional
-};
-
-#if _DEBUGGING
-const char* sfa_path_type_id[] = {
-    "not_set",
-    "exclude",
-    "non_column",
-    "required",
-    "preferred",
-    "optional"
-};
-#endif
-
-typedef struct reorder_t_struct {
-    const char * path;
-    uint64_t     size;
-    enum sfa_path_type_id type_id;
-} reorder_t;
-
-typedef enum sfa_path_type_id (CC *sfa_path_type_func)( const char *path );
-
-/*
-union u_void_sfa_path_type_func
-{
-    void * func;
-    sfa_path_type_func sptf;
-};
-
-static sfa_path_type_func void_to_sfa_path_type_func( void * func )
-{
-    union u_void_sfa_path_type_func x;
-    x.func = func;
-    return x.sptf;
-}
-*/
-
-static
-bool CC sfa_filter(const KDirectory *dir, const char *leaf, void* func)
-{
-    bool ret = true;
-    sfa_path_type_func f = (sfa_path_type_func)func; /* void_to_sfa_path_type_func( func ); */
-    enum sfa_path_type_id type = f(leaf);
-
-    ret = type >= sfa_non_column;
-    DEBUG_SORT(("%s: %s %s %s\n", __func__, leaf, sfa_path_type_id[type + 1], ret ? "keep" : "drop"));
-    return ret;
-}
-
-static
-bool CC sfa_filter_light(const KDirectory *dir, const char *leaf, void* func)
-{
-    bool ret = true;
-    sfa_path_type_func f = (sfa_path_type_func)func; /* void_to_sfa_path_type_func( func ); */
-
-    enum sfa_path_type_id type = f(leaf);
-
-    ret = type >= sfa_non_column && type < sfa_optional;
-    DEBUG_SORT(("%s: %s %s %s\n", __func__, leaf, sfa_path_type_id[type + 1], ret ? "keep" : "drop"));
-    return ret;
-}
-
-#define MATCH( ptr, str ) \
-    ( (memcmp(ptr, str, sizeof(str) - 2) == 0 && \
-       ((ptr)[sizeof(str) - 2] == '\0' || (ptr)[sizeof(str) - 2] == '/')) ? \
-        (ptr) += sizeof(str) - (((ptr)[sizeof(str) - 2] == '/') ? 1 : 2) : (const char*) 0)
-
-static
-enum sfa_path_type_id CC sfa_path_type_tbl( const char *path )
-{
-    /* use first character as distinguisher for match */
-    switch ( path [ 0 ] )
-    {
-    case 'c':
-        /* perhaps it's a column */
-        if ( MATCH ( path, "col/" ) )
-        {
-            switch ( path [ 0 ] )
-            {
-            case 'D':
-                if ( MATCH ( path, "DELETION_QV/" ) )
-                    return sfa_optional;
-                if ( MATCH ( path, "DELETION_TAG/" ) )
-                    return sfa_optional;
-                break;
-            case 'H':
-                if ( MATCH ( path, "HOLE_NUMBER/" ) )
-                    return sfa_optional;
-                if ( MATCH ( path, "HOLE_STATUS/" ) )
-                    return sfa_optional;
-                break;
-            case 'I':
-                if ( MATCH ( path, "INTENSITY/" ) )
-                    return sfa_optional;
-                if ( MATCH ( path, "INSERTION_QV/" ) )
-                    return sfa_optional;
-                break;
-            case 'N':
-                if ( MATCH ( path, "NAME_FMT/" ) )
-                    return sfa_preferred;
-                if ( MATCH ( path, "NAME/" ) )
-                    return sfa_preferred;
-                if ( MATCH ( path, "NOISE/" ) )
-                    return sfa_optional;
-                if ( MATCH ( path, "NUM_PASSES/" ) )
-                    return sfa_optional;
-                break;
-            case 'P':
-                if ( MATCH ( path, "POSITION/" ) )
-                    return sfa_optional;
-                if ( MATCH ( path, "PRE_BASE_FRAMES/" ) )
-                    return sfa_optional;
-                if ( MATCH ( path, "PULSE_INDEX/" ) )
-                    return sfa_optional;
-                break;
-            case 'Q':
-                if ( MATCH ( path, "QUALITY2/" ) )
-                    return sfa_optional;
-                break;
-            case 'S':
-                if ( MATCH ( path, "SIGNAL/" ) )
-                    return sfa_optional;
-                if ( MATCH ( path, "SPOT_NAME/" ) )
-                    return sfa_preferred;
-                if ( MATCH ( path, "SUBSTITUTION_QV/" ) )
-                    return sfa_optional;
-                if ( MATCH ( path, "SUBSTITUTION_TAG/" ) )
-                    return sfa_optional;
-                break;
-            case 'W':
-                if ( MATCH ( path, "WIDTH_IN_FRAMES/" ) )
-                    return sfa_optional;
-                break;
-            case 'X':
-            case 'Y':
-                if ( path [ 1 ] == '/' )
-                    return sfa_preferred;
-                break;
-            }
-        }
-        return sfa_required;
-
-    case 'i':
-        /* look for skey index */
-        if ( MATCH ( path, "idx/skey" ) )
-            if ( path [ 0 ] == 0 || strcmp ( path, ".md5" ) == 0 )
-                return sfa_preferred;
-        if ( MATCH ( path, "idx/fuse-" ) )
-            return sfa_exclude;
-        break;
-
-    case 's':
-        /* look for old skey index */
-        if ( MATCH ( path, "skey" ) )
-            if ( path [ 0 ] == 0 || strcmp ( path, ".md5" ) == 0 )
-                return sfa_preferred;
-        break;
-    }
-    /* anything not recognized is non-column required */
-    return sfa_non_column;
-}
-
-static
-enum sfa_path_type_id CC sfa_path_type_db ( const char *path )
-{
-    /* use first character as distinguisher for match */
-    switch ( path [ 0 ] )
-    {
-    case 't':
-        /* perhaps it's a table */
-        if ( MATCH ( path, "tbl/" ) )
-        {
-            switch ( path [ 0 ] )
-            {
-            case 0:
-                return sfa_non_column;
-            case 'S':
-                if ( MATCH ( path, "SEQUENCE/" ) )
-                    return sfa_path_type_tbl(path);
-                break;
-            case 'C':
-                if ( MATCH ( path, "CONSENSUS/" ) )
-                    return sfa_path_type_tbl(path);
-                break;
-            case 'P':
-                if ( MATCH ( path, "PRIMARY_ALIGNMENT/" ) )
-                    return sfa_path_type_tbl(path);
-                break;
-            case 'R':
-                if ( MATCH ( path, "REFERENCE/" ) )
-                    return sfa_path_type_tbl(path);
-                break;
-            }
-            /* all other tables are optional */
-            return sfa_optional;
-        }
-    }
-    /* anything not recognized is non-column required */
-    return sfa_non_column;
-}
-#undef MATCH
-
-static
-int64_t CC sfa_path_cmp ( const void **_a, const void **_b, void * ignored )
-{
-    const reorder_t * a = *_a;
-    const reorder_t * b = *_b;
-    int64_t ret;
-
-    DEBUG_SORT(("%s enter\t%s %s %lu \t%s %s %lu", __func__, 
-                a->path, sfa_path_type_id[a->type_id + 1], a->size,
-                b->path, sfa_path_type_id[b->type_id + 1], b->size));
-
-    ret = a->type_id - b->type_id;
-    if (ret == 0)
-    {
-        if (a->size > b->size)
-            ret = 1;
-        else if (a->size < b->size)
-            ret = -1;
-        else
-            ret = strcmp (a->path, b->path);
-    }
-    DEBUG_SORT(("\t%d\n", ret));
-    return ret;
-}
-
-typedef
-struct to_nv_data_struct
-{
-    const KDirectory * d;
-    Vector * v;
-    rc_t rc;
-    sfa_path_type_func path_type;
-} to_nv_data;
-
-static
-void CC to_nv (void * _item, void * _data)
-{
-    const char* path = _item;
-    to_nv_data* data = _data;
-    reorder_t* obj;
-
-    if (data->rc == 0)
-    {
-        obj = malloc (sizeof (*obj));
-        if (obj == NULL)
-            data->rc = RC (rcSRA, rcVector, rcConstructing, rcMemory, rcExhausted);
-        else
-        {
-            rc_t rc = KDirectoryFileSize (data->d, &obj->size, "%s", path);
-            if (rc == 0)
-            {
-                obj->path = path;
-                obj->type_id = data->path_type(path);
-                rc = VectorAppend (data->v, NULL, obj);
-            }
-
-            if (rc)
-            {
-                free (obj);
-                data->rc = rc;
-            }
-        }
-    }
-}
-
-static
-void CC item_whack (void * item, void * ignored)
-{
-    free (item);
-}
-
-static
-rc_t CC sfa_sort( const KDirectory *dir, Vector *v, sfa_path_type_func func )
-{
-    /* assume "v" is a vector of paths - hopefully relative to "dir" */
-    Vector nv;
-    to_nv_data data;
-    uint32_t base;
-
-    DEBUG_SORT(("%s enter\n", __func__));
-
-    base = VectorStart (v);
-    VectorInit (&nv, base, VectorLength (v));
-    data.d = dir;
-    data.v = &nv;
-    data.rc = 0;
-    data.path_type = func;
-
-    VectorForEach (v, false, to_nv, &data);
-
-    if(data.rc == 0) {
-        uint32_t idx = 0;
-        uint32_t limit = VectorLength (v) + base;
-
-        VectorReorder(&nv, sfa_path_cmp, NULL);
-
-        for (idx = base; idx < limit; ++idx) {
-            const reorder_t * tmp;
-            void * ignore;
-
-            tmp = VectorGet (&nv, idx);
-            data.rc = VectorSwap (v, idx + base, tmp->path, &ignore);
-            if(data.rc) {
-                break;
-            }
-        }
-    }
-    VectorWhack (&nv, item_whack, NULL);
-    DEBUG_SORT(("%s exit %d %R\n", __func__, data.rc, data.rc));
-    return data.rc;
-}
-
-static
-rc_t CC sfa_sort_db( const KDirectory *dir, Vector *v )
-{
-    return sfa_sort(dir, v, sfa_path_type_db);
-}
-
-static
-rc_t CC sfa_sort_tbl( const KDirectory *dir, Vector *v )
-{
-    return sfa_sort(dir, v, sfa_path_type_tbl);
-}
-
-/*
-union sptd_2_void
-{
-    sfa_path_type_func func;
-    void * ptr;
-};
-
-static void * sfa_path_type_func_to_void( sfa_path_type_func func )
-{
-    union sptd_2_void u;
-    u.func = func;
-    return u.ptr;
-}
-*/
-
-/* MakeSingleFileArchive
- *  makes a single-file-archive file from an SRA table
- *
- *  contents are ordered by frequency and necessity of access
- *
- *  "lightweight" [ IN ] - when true, include only those components
- *  required for read and quality operations.
- *
- *  "ext" [OUT,NULL] - optional file name extension to use for file
- */
-LIB_EXPORT rc_t CC SRATableMakeSingleFileArchive ( const SRATable *self, const KFile **sfa, bool lightweight, const char** ext)
-{
-    rc_t rc;
-
-    if ( sfa == NULL )
-    {
-        rc = RC( rcSRA, rcFile, rcConstructing, rcParam, rcNull );
-    }
-    else
-    {
-        *sfa = NULL;
-        if ( self == NULL )
-        {
-            rc = RC( rcSRA, rcTable, rcAccessing, rcSelf, rcNull );
-        }
-        else
-        {
-            const VDatabase *db;
-            rc = VTableOpenParentRead( self->vtbl, &db );
-            if ( rc == 0 && db != NULL )
-            {
-                const KDatabase *kdb;
-                rc = VDatabaseOpenKDatabaseRead( db, &kdb );
-                if ( rc == 0 )
-                {
-                    const KDirectory *db_dir;
-                    rc = KDatabaseOpenDirectoryRead( kdb, &db_dir );
-                    if ( rc == 0 )
-                    {
-                        rc = KDirectoryOpenTocFileRead( db_dir,
-                                                        sfa,
-                                                        sraAlign4Byte,
-                                                        lightweight ? sfa_filter_light : sfa_filter,
-                                                        ( void * )sfa_path_type_db, /* sfa_path_type_func_to_void( sfa_path_type_db ), */
-                                                        sfa_sort_db );
-                        KDirectoryRelease( db_dir );
-                        if ( ext != NULL )
-                        {
-                            *ext = CSRA_EXT( lightweight );
-                        }
-                    }
-                    KDatabaseRelease( kdb );
-                }
-                VDatabaseRelease( db );
-            }
-            else
-            {
-                const KTable *ktbl;
-                rc = SRATableGetKTableRead( self, &ktbl );
-                if ( rc == 0 )
-                {
-                    const KDirectory *tbl_dir;
-                    rc = KTableGetDirectoryRead( ktbl, &tbl_dir );
-                    if ( rc == 0 )
-                    {
-                        rc = KDirectoryOpenTocFileRead( tbl_dir,
-                                                        sfa,
-                                                        sraAlign4Byte,
-                                                        lightweight ? sfa_filter_light : sfa_filter,
-                                                        ( void * )sfa_path_type_tbl, /* sfa_path_type_func_to_void( sfa_path_type_tbl ), */
-                                                        sfa_sort_tbl );
-                        KDirectoryRelease( tbl_dir );
-                        if ( ext != NULL )
-                        {
-                            *ext = SRA_EXT( lightweight );
-                        }
-                    }
-                    KTableRelease(ktbl);
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-/* OpenAltTableRead
- *  opens a table within a database structure with a specific name
- */
-SRA_EXTERN rc_t CC SRAMgrOpenAltTableRead ( const SRAMgr *self,
-    const SRATable **tbl, const char *altname, const char *spec, ... )
-{
-    rc_t rc;
-    
-    va_list args;
-    va_start ( args, spec );
-
-    if ( altname == NULL || altname [ 0 ] == 0 ) {
-        altname = "SEQUENCE";
-    }
-    rc = SRAMgrVOpenAltTableRead ( self, tbl, altname, spec, args );
-
-    va_end ( args );
-    return rc;
-}
diff --git a/libs/sra/sratbl.c b/libs/sra/sratbl.c
deleted file mode 100644
index 3f474d2..0000000
--- a/libs/sra/sratbl.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <sra/extern.h>
-#include <vdb/cursor.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include "sra-priv.h"
-
-rc_t SRATableWhack ( SRATable *self )
-{
-    SRATableDestroy ( self );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC SRATableBaseCount ( const SRATable *self, uint64_t *rslt )
-{
-    rc_t rc;
-
-    if ( rslt == NULL )
-        rc = RC ( rcSRA, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcSRA, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            *rslt = self->base_count;
-            return 0;
-        }
-        *rslt = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRATableSpotCount ( const SRATable *self, uint64_t *rslt )
-{
-    rc_t rc;
-
-    if ( rslt == NULL )
-        rc = RC ( rcSRA, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcSRA, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            *rslt = self->spot_count;
-            return 0;
-        }
-        *rslt = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRATableMinSpotId ( const SRATable *self, spotid_t *rslt )
-{
-    rc_t rc;
-
-    if ( rslt == NULL )
-        rc = RC ( rcSRA, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcSRA, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            *rslt = self->min_spot_id;
-            return 0;
-        }
-        *rslt = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRATableMaxSpotId ( const SRATable *self, spotid_t *rslt )
-{
-    rc_t rc;
-
-    if ( rslt == NULL )
-        rc = RC ( rcSRA, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcSRA, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            *rslt = self->max_spot_id;
-            return 0;
-        }
-        *rslt = 0;
-    }
-    return rc;
-}
diff --git a/libs/sra/types.c b/libs/sra/types.c
deleted file mode 100644
index a14b7d4..0000000
--- a/libs/sra/types.c
+++ /dev/null
@@ -1,298 +0,0 @@
-/*=======================================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <sra/extern.h>
-#include <klib/defs.h>
-#include <sra/types.h>
-#include <vdb/schema.h>
-#include <vdb/vdb-priv.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * VTypedef
- */
-
-
-/* Sizeof
- *  returns the bit size of declared type
- *
- *  technically, this is self -> size * self -> dim.
- */
-#ifndef VTypedefSizeof
-LIB_EXPORT bitsz_t CC VTypedefSizeof ( const VTypedef *self )
-{
-    if ( self == NULL )
-        return 0;
-    return ( bitsz_t ) self -> type_size * self -> dim;
-}
-#endif
-
-/*--------------------------------------------------------------------------
- * VDatatypes
- */
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC VDatatypesAddRef ( const VDatatypes *self )
-{
-    return VSchemaAddRef ( ( const VSchema* ) self );
-}
-
-LIB_EXPORT rc_t CC VDatatypesRelease ( const VDatatypes *self )
-{
-    return VSchemaRelease ( ( const VSchema* ) self );
-}
-
-
-/* ResolveTypedecl
- *  converts a typedecl string to type id and vector dimension
- *
- *  "resolved" [ OUT ] - resolved type declaration
- *
- *  "typedecl" [ IN ] - type declaration
- */
-LIB_EXPORT rc_t CC VDatatypesVResolveTypedecl ( const VDatatypes *self,
-    VTypedecl *resolved, const char *typedecl, va_list args )
-{
-    return VSchemaVResolveTypedecl ( ( const VSchema* ) self, resolved, typedecl, args );
-}
-
-LIB_EXPORT rc_t CC VDatatypesResolveTypedecl ( const VDatatypes *self,
-    VTypedecl *resolved, const char *typedecl, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, typedecl );
-    rc = VSchemaVResolveTypedecl ( ( const VSchema* ) self, resolved, typedecl, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-
-/* ResolveTypename
- *  convert a type id into its type definition
- *
- *  "resolved" [ OUT ] - resolved type definition
- *
- *  "typname" [ IN ] - NUL-terminated type name
- */
-LIB_EXPORT rc_t CC VDatatypesResolveTypename ( const VDatatypes *self,
-    VTypedef *resolved, const char *typname )
-{
-    rc_t rc;
-
-    if ( resolved == NULL )
-        rc = RC ( rcSRA, rcSchema, rcResolving, rcParam, rcNull );
-    else
-    {
-        VTypedecl td;
-        rc = VSchemaResolveTypedecl ( ( const VSchema* ) self, & td, "%s", typname );
-        if ( rc == 0 )
-        {
-            rc = VSchemaDescribeTypedef ( ( const VSchema* ) self, resolved, td . type_id );
-            if ( rc == 0 )
-                return rc;
-        }
-
-        memset ( resolved, 0, sizeof * resolved );
-    }
-    return rc;
-}
-
-
-/* ResolveTypeid
- *  convert a type id into its type definition
- *
- *  "resolved" [ OUT ] - resolved type definition
- *
- *  "type_id" [ IN ] - 1-based runtime type id
- */
-LIB_EXPORT rc_t CC VDatatypesResolveTypeid ( const VDatatypes *self,
-    VTypedef *resolved, uint32_t type_id )
-{
-    return VSchemaDescribeTypedef ( ( const VSchema* ) self, resolved, type_id );
-}
-
-
-/* SizeofTypedecl
- *  returns the bit size of type declaration
- */
-LIB_EXPORT rc_t CC VDatatypesSizeofTypedecl ( const VDatatypes *self,
-    bitsz_t *type_size, const VTypedecl *td )
-{
-    rc_t rc;
-    if ( type_size == NULL )
-        rc = RC ( rcSRA, rcSchema, rcAccessing, rcParam, rcNull );
-    else
-    {
-        VTypedesc desc;
-        rc = VSchemaDescribeTypedecl ( ( const VSchema* ) self, & desc, td );
-        if ( rc == 0 )
-        {
-            * type_size = VTypedescSizeof ( & desc );
-            return 0;
-        }
-
-        * type_size = 0;
-    }
-    return rc;
-}
-
-
-/* SizeofTypeid
- *  returns the bit size of typeid
- *
- *  "type_size" [ OUT ] - bit size of a type
- *
- *  "type_id" [ IN ] - numerical index of a type
- *
- *  "all_elements" [ IN ] - for multi-dimesional types
- *  return the sum of sizes, otherwise - only for a single element
- */
-LIB_EXPORT rc_t CC VDatatypesSizeofTypeid ( const VDatatypes *self,
-    bitsz_t *type_size, uint32_t type_id, bool all_elements )
-{
-    rc_t rc;
-
-    if ( type_size == NULL )
-        rc = RC ( rcVDB, rcType, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcType, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            VTypedef td;
-            rc = VDatatypesResolveTypeid ( self, & td, type_id );
-            if ( rc == 0 )
-            {
-                * type_size = td . type_size;
-                if ( all_elements )
-                    * type_size *=  td . dim;
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/* MakeTypedecl
- *  convert a VTypedecl into canonical text
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - output buffer for
- *  NUL terminated type declaration string
- *
- *  "typedecl" [ IN ] - binary representation of typedecl
- */
-LIB_EXPORT rc_t CC VDatatypesMakeTypedecl ( const VDatatypes *self,
-    char *buffer, size_t bsize, const VTypedecl *typedecl )
-{
-    return VTypedeclToText ( typedecl, ( const VSchema* ) self, buffer, bsize );
-}
-
-
-/* ToSupertype
- *  cast a typedecl to a size-equivalent supertype decl
- *  returns not-found and leaves "typedecl" unchanged
- *  if no supertype exists
- *
- *  "typedecl" [ IN, OUT ] - populated with a correct
- *  type id and vector dimension on input, will be updated
- *  to contain a supertype and equivalent dimension on
- *  output. e.g.:
- *
- *    IN -  { type_id NCBI:qual4, dim 1 }
- *    OUT - { type_id I8, dim 4 }
- */
-LIB_EXPORT rc_t CC VDatatypesToSupertype ( const VDatatypes *self, VTypedecl *typedecl )
-{
-    return VTypedeclToSupertype ( typedecl, ( const VSchema* ) self, typedecl );
-}
-
-
-/* ToIntrinsic - DEPRECATED
- *  cast a typedecl ( if necessary ) to a size-equivalent
- *  intrinsic typedecl.
- *
- *  returns not-found and leaves "typedecl" unchanged
- *  if no intrinsic supertype exists
- *
- *  leaves "typedecl" unchanged if it is already intrinsic.
- *
- *  "typedecl" [ IN, OUT ] - populated with a correct
- *  type id and vector dimension on input, will be updated
- *  to contain a supertype and equivalent dimension on
- *  output. e.g.:
- *
- *    IN -  { type_id NCBI:qual4, dim 1 }
- *    OUT - { type_id I8, dim 4 }
- */
-LIB_EXPORT rc_t CC VDatatypesToIntrinsic ( const VDatatypes *self, VTypedecl *typedecl )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcSRA, rcType, rcCasting, rcSelf, rcNull );
-    else if ( typedecl == NULL )
-        rc = RC ( rcSRA, rcType, rcCasting, rcParam, rcNull );
-    else
-    {
-        const VSchema *schema = ( const VSchema* ) self;
-        uint32_t last_intrinsic = VSchemaLastIntrinsicTypeId ( schema );
-        if ( last_intrinsic == 0 )
-            rc = RC ( rcSRA, rcType, rcCasting, rcSelf, rcInvalid );
-        else for ( rc = 0; typedecl -> type_id > last_intrinsic; )
-        {
-            if ( ! VTypedeclToSupertype ( typedecl, schema, typedecl ) )
-                break;
-        }
-    }
-
-    return rc;
-}
-
-
-/* ToAncestor
- *  cast a typedecl to a size-equivalent ancestor decl
- *  returns true if cast can be performed
- */
-LIB_EXPORT bool CC VDatatypesToAncestor ( const VDatatypes *self,
-    const VTypedecl *to, const VTypedecl *from )
-{
-    VTypedecl cast;
-    return VTypedeclToTypedecl ( from, ( const VSchema* ) self, to, & cast, NULL );
-}
diff --git a/libs/sra/wsramgr.c b/libs/sra/wsramgr.c
deleted file mode 100644
index 6c430bc..0000000
--- a/libs/sra/wsramgr.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <sra/extern.h>
-
-#include <sra/wsradb.h>
-#include <os-native.h>
-
-#define KONST
-#include "sra-priv.h"
-#include <sra/types.h>
-#include <vdb/manager.h>
-#include <vdb/schema.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-#include <kdb/manager.h>
-#include <klib/refcount.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-
-#include <stdlib.h>
-#include <sysalloc.h>
-
-#define RC_MODULE (rcSRA)
-#define RC_TARGET (rcMgr)
-#define CLASS "SRAMgr"
-
-
-/* MakeUpdate
- *  create library handle for read/write access
- *
- *  "wd" [ IN, NULL OKAY ] - optional working directory for
- *  accessing the file system. mgr will attach its own reference.
- *
- *  NB - not implemented in read-only library,
- *  and the read-only library may not be mixed with read/write
- */
-LIB_EXPORT rc_t CC SRAMgrMakeUpdate ( SRAMgr **mgrp, struct KDirectory *wd )
-{
-    rc_t rc;
-
-    if ( mgrp == NULL )
-        rc = RC ( rcSRA, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        VDBManager *vmgr;
-        rc = VDBManagerMakeUpdate ( & vmgr, wd );
-        if ( rc == 0 )
-        {
-            SRAMgr *mgr;
-            rc = SRAMgrMake ( & mgr, vmgr , NULL );
-            if ( rc == 0 )
-            {
-                mgr -> read_only = false;
-                * mgrp = mgr;
-                return 0;
-            }
-
-            VDBManagerRelease ( vmgr );
-        }
-
-        * mgrp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* Drop
- *  drop an existing table
- *
- *  "force" [ IN ] - if true, make every attempt to remove table
- *
- *  "path" [ IN ]  - NUL terminated table name
- */
-LIB_EXPORT rc_t CC SRAMgrDropTable( SRAMgr *self, bool force, const char *path, ... ) {
-    va_list va;
-    rc_t rc;
-    
-    va_start(va, path);
-    rc = SRAMgrVDropTable(self, force, path, va);
-    va_end(va);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRAMgrVDropTable( SRAMgr *self, bool force, const char *path, va_list args ) {
-    if (self == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcRemoving, rcSelf, rcNull);
-    if (path == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcRemoving, rcParam, rcNull);
-    return VDBManagerVDrop(self->vmgr, kptTable, path, args);
-}
-
-LIB_EXPORT rc_t CC SRAMgrVLock ( SRAMgr *self, const char *path, va_list args ) {
-    if (self == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcRemoving, rcSelf, rcNull);
-    if (path == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcRemoving, rcParam, rcNull);
-    return VDBManagerVLock(self->vmgr, path, args);
-}
-
-LIB_EXPORT rc_t CC SRAMgrLock ( SRAMgr *self, const char *path, ... ) {
-    va_list va;
-    rc_t rc;
-    
-    va_start(va, path);
-    rc = SRAMgrVLock(self, path, va);
-    va_end(va);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRAMgrVUnlock ( SRAMgr *self, const char *path, va_list args ) {
-    if (self == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcRemoving, rcSelf, rcNull);
-    if (path == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcRemoving, rcParam, rcNull);
-    return VDBManagerVUnlock(self->vmgr, path, args);
-}
-
-LIB_EXPORT rc_t CC SRAMgrUnlock ( SRAMgr *self, const char *path, ... ) {
-    va_list va;
-    rc_t rc;
-    
-    va_start(va, path);
-    rc = SRAMgrVUnlock(self, path, va);
-    va_end(va);
-    return rc;
-}
-
-
-/* SetMD5Mode
- *  sets default MD5 file mode for all objects
- *  opened for update under table
- */
-LIB_EXPORT rc_t CC SRAMgrSetMD5Mode( SRAMgr *self, bool useMD5 ) {
-    if (self == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcUpdating, rcSelf, rcNull);
-    self->mode = useMD5 ? (self->mode | kcmMD5) : (self->mode & ~kcmMD5);
-    return 0;
-}
diff --git a/libs/sra/wsraschema-stub.c b/libs/sra/wsraschema-stub.c
deleted file mode 100644
index 2cfdc97..0000000
--- a/libs/sra/wsraschema-stub.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <sra/sraschema.h>
-#include <sra/sradb-priv.h>
-#include <klib/rc.h>
-
-#include "sra-priv.h"
-
-/*--------------------------------------------------------------------------
- * SRASchema
- *  a schema object pre-loaded with default SRA schema
- */
-
-/* Make
- *  create an instance of the default SRA schema
- */
-rc_t CC VDBManagerMakeSRASchema ( struct VDBManager const *self, struct VSchema **schema )
-{
-    return SRASchemaMake ( schema, self );
-}
-
-rc_t CC SRAMgrMakeSRASchema ( const SRAMgr *self, struct VSchema **schema )
-{
-    if ( self != NULL )
-        return VDBManagerMakeSRASchema ( self -> vmgr, schema );
-    return RC ( rcSRA, rcMgr, rcAccessing, rcSelf, rcNull );
-}
diff --git a/libs/sra/wsratbl.c b/libs/sra/wsratbl.c
deleted file mode 100644
index f95537f..0000000
--- a/libs/sra/wsratbl.c
+++ /dev/null
@@ -1,649 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <sra/extern.h>
-#include <sra/wsradb.h>
-#include <sra/types.h>
-#include <vdb/schema.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-#include <kdb/meta.h>
-#include <klib/printf.h> /* string_vprintf */
-#include <klib/refcount.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <assert.h>
-
-#include "sra-debug.h"
-
-#define KONST
-#include "sra-priv.h"
-
-#define RC_MODULE (rcSRA)
-#define RC_TARGET (rcTable)
-#define CLASS "SRATable"
-
-/* Whack
- */
-
-rc_t SRATableWhack ( SRATable *self )
-{
-    SRATableDestroy( self );
-    return 0;
-}
-
-/* Create
- *  creates a new table
- *
- *  "tbl" [ OUT ] - return parameter for table
- *
- *  "path" [ IN ] - NUL terminated table name
- */
-LIB_EXPORT rc_t CC SRAMgrCreateTable(SRAMgr *self, SRATable **tbl, const char *typespec, const char *path, ...) {
-    va_list va;
-    rc_t rc;
-    
-    va_start(va, path);
-    rc = SRAMgrVCreateTable(self, tbl, typespec, path, va);
-    va_end(va);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRAMgrVCreateTable ( SRAMgr *self, SRATable **rslt,
-    const char *typespec, const char *spec, va_list args )
-{
-    rc_t rc;
-
-    if ( rslt == NULL )
-        rc = RC ( rcSRA, rcTable, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcSRA, rcTable, rcConstructing, rcSelf, rcNull );
-        else if ( spec == NULL )
-            rc = RC ( rcSRA, rcTable, rcConstructing, rcString, rcNull );
-        else if ( spec [ 0 ] == 0 )
-            rc = RC ( rcSRA, rcTable, rcConstructing, rcString, rcEmpty );
-        else
-        {
-            char path [ 4097 ];
-            size_t act_size = 0;
-            
-            rc = string_vprintf(path, 4097, &act_size, spec, args);
-            path[act_size] = '\0';
-            if ( rc == 0 )
-            {
-                VTable *vtbl;
-                rc = VDBManagerCreateTable ( self -> vmgr, & vtbl, self -> schema,
-                                             typespec, ( self -> mode & kcmBitMask ) | kcmCreate, "%s", path );
-                if ( rc == 0 )
-                {
-                    rc = VTableColumnCreateParams ( vtbl, kcmCreate, kcsCRC32, 0 );
-                    if ( rc == 0 )
-                    {
-                        SRATable *tbl = calloc ( 1, sizeof * tbl );
-                        if ( tbl == NULL )
-                            rc = RC ( rcSRA, rcTable, rcConstructing, rcMemory, rcExhausted );
-                        else
-                        {
-                            tbl -> vtbl = vtbl;
-
-                            rc = VTableOpenMetadataUpdate ( vtbl, & tbl -> meta );
-                            if ( rc == 0 )
-                                rc = KMetadataVersion ( tbl -> meta, & tbl -> metavers );
-                            if ( rc == 0 )
-                                rc = VTableCreateCursorWrite ( vtbl, & tbl -> curs, kcmInsert );
-                            if ( rc == 0 )
-                            {
-                                tbl -> mgr = SRAMgrAttach ( self );
-                                tbl -> mode = self -> mode;
-                                tbl -> read_only = false;
-                                KRefcountInit ( & tbl -> refcount, 1, "SRATable", "OpenTableUpdate", path );
-                                VectorInit ( & tbl -> wcol, 0, 16 );
-                                * rslt = tbl;
-                                return 0;
-                            }
-
-                            vtbl = NULL;
-                            SRATableWhack ( tbl );
-                        }
-                    }
-
-                    VTableRelease ( vtbl );
-                }
-            }
-        }
-
-        * rslt = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenUpdate
- *  open an existing table
- *
- *  "run" [ OUT ] - return parameter for table
- *
- *  "path" [ IN ] - NUL terminated table name
- */
-LIB_EXPORT rc_t CC SRAMgrOpenTableUpdate(SRAMgr *self, SRATable **tbl, const char *path, ...) {
-    va_list va;
-    rc_t rc;
-    
-    va_start(va, path);
-    rc = SRAMgrVOpenTableUpdate(self, tbl, path, va);
-    va_end(va);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRAMgrVOpenTableUpdate(SRAMgr *mgr, SRATable **rslt, const char *spec, va_list args) {
-    SRATable *self;
-    char path[4096];
-    rc_t rc;
-    
-    if (mgr == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcConstructing, rcSelf, rcNull);
-    if (spec == NULL || rslt == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcConstructing, rcParam, rcNull);
-    
-    *rslt = NULL;
-    
-    rc = ResolveTablePath(mgr, path, sizeof(path), spec, args);
-    if (rc)
-        return rc;
-    
-    self = calloc(1, sizeof(*self));
-    if (self == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcConstructing, rcMemory, rcExhausted);
-    
-    rc = VDBManagerOpenTableUpdate(mgr->vmgr, &self->vtbl, mgr->schema, "%s", path);
-    if (rc == 0) {
-        rc = VTableOpenMetadataUpdate(self->vtbl, &self->meta);
-        if (rc == 0) {
-            rc = KMetadataVersion(self->meta, &self->metavers);
-            if (rc == 0) {
-                rc = VTableCreateCursorWrite(self->vtbl, &self->curs, kcmInsert);
-                if (rc == 0) {
-                    self->mgr = SRAMgrAttach(mgr);
-                    self->mode = mgr->mode;
-                    self->read_only = false;
-                    KRefcountInit(&self->refcount, 1, "SRATable", "OpenTableUpdate", path);
-                    
-                    rc = SRATableFillOut ( self, true );
-                    if ( rc == 0 )
-                    {
-                        VectorInit ( & self -> wcol, 0, 16 );
-                    
-                        *rslt = self;
-                        return 0;
-                    }
-                }
-            }
-        }
-    }
-    SRATableWhack(self);
-    return rc;
-}
-
-/* NewSpot
- *  creates a new spot record,
- *  returning spot id.
- *
- *  "id" [ OUT ] - return parameter for id of newly created spot
- */
-LIB_EXPORT rc_t CC SRATableNewSpot( SRATable *self, spotid_t *id ) {
-    rc_t rc;
-    
-    if (self == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcInserting, rcSelf, rcNull);
-    if (id == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcInserting, rcParam, rcNull);
-    
-    if (self->curs_open == false) {
-        SRADBG(("opening cursor\n"));
-        rc = VCursorOpen(self->curs);
-        if (rc)
-            return rc;
-        self->curs_open = true;
-    }
-    
-    rc = VCursorOpenRow(self->curs);
-    if (rc == 0) {
-        int64_t rowid;
-        if( (rc = VCursorRowId(self->curs, &rowid)) == 0 ) {
-            *id = rowid;
-        }
-    }
-    return rc;
-}
-
-/* OpenSpot
- *  opens an existing spot record from id
- *
- *  "id" [ IN ] - 1-based spot id
- */
-LIB_EXPORT rc_t CC SRATableOpenSpot( SRATable *self, spotid_t id ) {
-    rc_t rc;
-    
-    if (self == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcOpening, rcSelf, rcNull);
-#if 0
-    /* TODO: translate spot id to row id */
-    rc = VCursorSetRowId(self->curs, id);
-    if (rc == 0) {
-        rc = VCursorOpenRow(self->curs);
-    }
-#else
-    rc = RC(RC_MODULE, RC_TARGET, rcOpening, rcFunction, rcUnsupported);
-#endif
-    return rc;
-}
-
-
-/* CloseSpot
- *  closes a spot opened with either NewSpot or OpenSpot
- */
-LIB_EXPORT rc_t CC SRATableCloseSpot( SRATable *self ) {
-    rc_t rc;
-    
-    if (self == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcClosing, rcSelf, rcNull);
-    
-    rc = VCursorCommitRow(self->curs);
-    if (rc == 0)
-        return VCursorCloseRow(self->curs);
-    VCursorCloseRow(self->curs);
-    return rc;
-}
-
-
-/* Commit
- *  commit all changes
- */
-LIB_EXPORT rc_t CC SRATableCommit( SRATable *self ) {
-    rc_t rc;
-    
-    if (self == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcCommitting, rcSelf, rcNull);
-    rc = VCursorCommit(self->curs);
-    VCursorRelease(self->curs);
-    self->curs = NULL;
-    if (rc == 0)
-        rc = VTableReindex(self->vtbl);
-    return rc;
-}
-
-static int64_t CC cmp_index( const void *A, const void *B ) {
-    return (int64_t)(*(const uint32_t *)A) - (int64_t)((const SRAColumn *)B)->idx;
-}
-
-static bool find_by_index(const Vector *vec, uint32_t idx, uint32_t *cndx) {
-    uint32_t found;
-    
-    if ( VectorFind(vec, &idx, &found, cmp_index ) != NULL ) {
-        *cndx = found;
-        return true;
-    }
-    return false;
-}
-
-/* OpenColumnWrite
- *  open a column for write
- *
- *  "idx" [ OUT ] - return parameter for 1-based column index.
- *
- *  "col" [ OUT, NULL OKAY ] - optional return parameter for
- *  newly opened column.
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving column name
- *
- *  "datatype" [ IN ] - NUL terminated string in ASCII
- *   describing fully qualified column data type
- */
-LIB_EXPORT rc_t CC SRATableOpenColumnWrite ( SRATable *self,
-    uint32_t *idx, SRAColumn **col, const char *name, const char *datatype )
-{
-    rc_t rc;
-    SRAColumn *rslt;
-    uint32_t ndx, cndx;
-    
-    if (self == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcOpening, rcSelf, rcNull);
-    
-    if (name == NULL || idx == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcOpening, rcParam, rcNull);
-    
-    *idx = 0;
-    
-    if (datatype && datatype[0])
-    {
-        SRADBG(("adding column (%s)%s\n", datatype, name));
-        rc = VCursorAddColumn(self->curs, &ndx, "(%s)%s", datatype, name);
-    }
-    else
-    {
-        SRADBG(("adding column %s\n", name));
-        rc = VCursorAddColumn(self->curs, &ndx, "%s", name);
-    }
-    
-    if (rc != 0)
-    {
-        /* it's okay if the column is already there
-           any other rc is a hard error */
-        if (GetRCState ( rc ) != rcExists)
-            return rc;
-        
-        if ( ! find_by_index(&self->wcol, ndx, &cndx) )
-        {
-            /* severe internal error */
-            return RC ( RC_MODULE, RC_TARGET, rcOpening, rcNoObj, rcNotFound );
-        }
-
-        /* get the uncounted reference to column from table */
-        rslt = VectorGet(&self->wcol, cndx);
-    }
-    else
-    {
-        VTypedecl type;
-        VTypedesc desc;
-        
-        rslt = malloc(sizeof *rslt );
-        if (rslt == NULL)
-            return RC(RC_MODULE, rcColumn, rcConstructing, rcMemory, rcExhausted);
-        
-        rc = VCursorDatatype(self->curs, ndx, &type, &desc);
-        if (rc == 0)
-        {
-            /* this object will sit uncounted within the table
-               when the table goes away, it will douse the columns
-               without regard to their reference count. see below */
-            KRefcountInit(&rslt->refcount, 0, "SRAColumn", "OpenColumnWrite", name);
-
-            /* the column has no reference to the table, so after this
-               there will only be an uncounted reference from table to column */
-            rslt->tbl = NULL;
-            rslt->idx = ndx;
-            rslt->read_only = false;
-            rslt->elem_bits = VTypedescSizeof(&desc);
-
-            rc = VectorAppend(&self->wcol, &cndx, rslt);
-        }
-
-        if ( rc != 0 )
-        {
-            free ( rslt );
-            return rc;
-        }
-    }
-
-    /* see if user wants a reference */
-    if ( col != NULL )
-    {
-        /* the first column reference exported will take
-           the refcount from zero to one */
-        SRAColumnAddRef ( rslt );
-
-        /* the first exported reference will need to be reflected
-           to the table. this will ensure that the table never tries
-           to whack its columns as long as they are held externally,
-           because the table itself will be kept alive. when the last
-           column reference is released, it will also release the table */
-        if ( rslt -> tbl == NULL )
-            rslt -> tbl = SRATableAttach ( self );
-
-        *col = rslt;
-    }
-
-    *idx = cndx + 1;
-    return rc;
-}
-
-static
-rc_t lookup_and_validate(SRATable *self, const SRAColumn **rslt, uint32_t idx, const void *base, bitsz_t offset, bitsz_t size) {
-    const SRAColumn *col;
-    
-    if (self == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcWriting, rcSelf, rcNull);
-    
-    col = VectorGet(&self->wcol, idx - 1);
-    if (col == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcWriting, rcParam, rcInvalid);
-    
-    if (size % col->elem_bits != 0)
-        return RC(RC_MODULE, RC_TARGET, rcWriting, rcParam, rcInvalid);
-    
-    if (offset % col->elem_bits != 0)
-        return RC(RC_MODULE, RC_TARGET, rcWriting, rcParam, rcInvalid);
-    
-    *rslt = col;
-    return 0;
-}
-
-/* SetIdxColumnDefault
- *  give a default value for column
- *
- *  if no value gets written to a column within an open spot,
- *  this value is substituted.
- *
- *  "idx" [ IN ] - 1-based column index
- *
- *  "base" [ IN ] and "offset" [ IN ] - pointer and bit offset
- *  to start of row data
- *
- *  "size" [ IN ] - size in bits of row data
- */
-LIB_EXPORT rc_t CC SRATableSetIdxColumnDefault ( SRATable *self,
-        uint32_t idx, const void *base, bitsz_t offset, bitsz_t size ) {
-    const SRAColumn *col;
-    rc_t rc;
-    
-    rc = lookup_and_validate(self, &col, idx, base, offset, size);
-    if (rc == 0)
-        rc = VCursorDefault(self->curs, col->idx, col->elem_bits, base, offset / col->elem_bits, size / col->elem_bits);
-    return rc;
-}
-
-
-/* WriteIdxColumn
- *  write row data to an indexed column
- *
- *  "idx" [ IN ] - 1-based column index
- *
- *  "base" [ IN ] and "offset" [ IN ] - pointer and bit offset
- *  to start of row data
- *
- *  "size" [ IN ] - size in bits of row data
- */
-LIB_EXPORT rc_t CC SRATableWriteIdxColumn ( SRATable *self,
-        uint32_t idx, const void *base, bitsz_t offset, bitsz_t size ) {
-    const SRAColumn *col;
-    rc_t rc;
-    
-    rc = lookup_and_validate(self, &col, idx, base, offset, size);
-    if (rc == 0)
-        rc = VCursorWrite(self->curs, col->idx, col->elem_bits, base, offset / col->elem_bits, size / col->elem_bits);
-    return rc;
-}
-
-
-/* MetaFreeze
- *  freezes current metadata revision
- *  further modification will begin on a copy
- */
-LIB_EXPORT rc_t CC SRATableMetaFreeze ( SRATable *self ) {
-    if (self == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcOpening, rcSelf, rcNull);
-    
-    return KMetadataFreeze(self->meta);
-}
-
-
-/* OpenMDataNode
- *  open a metadata node
- */
-LIB_EXPORT rc_t CC SRATableOpenMDataNodeUpdate ( SRATable *self, struct KMDataNode **node, const char *path, ... ) {
-    va_list va;
-    rc_t rc;
-    
-    va_start(va, path);
-    rc = SRATableVOpenMDataNodeUpdate(self, node, path, va);
-    va_end(va);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRATableVOpenMDataNodeUpdate ( SRATable *self, struct KMDataNode **node, const char *spec, va_list args ) {
-    rc_t rc;
-    char path[4096];
-    int n;
-    
-    if (self == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcOpening, rcSelf, rcNull);
-    if (spec == NULL)
-        return RC(RC_MODULE, RC_TARGET, rcOpening, rcParam, rcNull);
-    
-    n = vsnprintf(path, sizeof(path), spec, args);
-    if (n >= sizeof(path))
-        return RC(RC_MODULE, RC_TARGET, rcOpening, rcName, rcTooLong);
-    
-    rc = KMetadataOpenNodeUpdate(self->meta, node, "%s", path);
-    if (rc)
-    {
-        SRADBG(("failed to open table metadata node '%s' %R", path, rc));
-    }
-    return rc;
-}
-
-#define RD_COLVALUE(tbl, nm, var) \
-                SRATable_ReadColBack(tbl, nm, sizeof(var) * 8, (void*)&var, sizeof(var))
-
-static
-rc_t SRATable_ReadColBack(const VTable* tbl, const char* col_name, uint32_t elem_bits, void *buffer, uint32_t blen)
-{
-    rc_t rc = 0;
-    uint32_t idx;
-    const VCursor* curs = NULL;
-   
-    if( (rc = VTableCreateCursorRead(tbl, &curs)) == 0 &&
-        (rc = VCursorAddColumn(curs, &idx, "%s", col_name)) == 0 &&
-        (rc = VCursorOpen(curs)) == 0 ) {
-        uint32_t len;
-        rc = VCursorReadDirect(curs, 1, idx, elem_bits, buffer, blen, &len);
-    }
-    VCursorRelease(curs);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRATableBaseCount ( const SRATable *self, uint64_t *rslt )
-{
-    rc_t rc;
-
-    if ( rslt == NULL )
-        rc = RC ( rcSRA, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcSRA, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            RD_COLVALUE(self->vtbl, "BASE_COUNT", self->base_count);
-            *rslt = self->base_count;
-            return 0;
-        }
-        *rslt = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRATableSpotCount ( const SRATable *self, uint64_t *rslt )
-{
-    rc_t rc;
-
-    if ( rslt == NULL )
-        rc = RC ( rcSRA, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcSRA, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            RD_COLVALUE(self->vtbl, "SPOT_COUNT", self->spot_count);
-            *rslt = self->spot_count;
-            return 0;
-        }
-        *rslt = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRATableMinSpotId ( const SRATable *self, spotid_t *rslt )
-{
-    rc_t rc;
-
-    if ( rslt == NULL )
-        rc = RC ( rcSRA, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcSRA, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            RD_COLVALUE(self->vtbl, "MIN_SPOT_ID", self->min_spot_id);
-            *rslt = self->min_spot_id;
-            return 0;
-        }
-        *rslt = 0;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC SRATableMaxSpotId ( const SRATable *self, spotid_t *rslt )
-{
-    rc_t rc;
-
-    if ( rslt == NULL )
-        rc = RC ( rcSRA, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcSRA, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            RD_COLVALUE(self->vtbl, "MAX_SPOT_ID", self->max_spot_id);
-            *rslt = self->max_spot_id;
-            return 0;
-        }
-        *rslt = 0;
-    }
-    return rc;
-}
diff --git a/libs/sraxf/.gitignore b/libs/sraxf/.gitignore
deleted file mode 100644
index c253038..0000000
--- a/libs/sraxf/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.def
diff --git a/libs/sraxf/Makefile b/libs/sraxf/Makefile
deleted file mode 100644
index 631dca9..0000000
--- a/libs/sraxf/Makefile
+++ /dev/null
@@ -1,152 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/sraxf
-
-INT_LIBS = \
-	libsraxf \
-	libwsraxf
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES = \
-	$(SRAXF_OBJ) \
-	$(WSRAXF_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(ALL_LIBS): makedirs
-	@ $(MAKE_CMD) $(TARGDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(TARGDIR)/,$(ALL_LIBS))
-
-.PHONY: $(TARGDIR)/all $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# sra transform library
-#
-$(TARGDIR)/libsraxf: $(addprefix $(ILIBDIR)/libsraxf.,$(ILIBEXT))
-
-SRAXF_SRC = \
-	untyped \
-	v0-decompress-init \
-	v0-decompress \
-	v0-funcs \
-	bio-start \
-	dynamic-454-read-descriptor \
-	format-spot-name \
-	extract-name_coord \
-	tokenize-spot_name-454 \
-	tokenize-spot_name-illumina \
-	tokenize-spot_name-abi \
-	tokenize-spot_name-helicos \
-	tokenize-spot_name-ion-torrent \
-	tokenize-spot_name-generic-fastq \
-	color-from-dna \
-	dna-from-color \
-	spot-desc \
-	read-desc \
-	rotate \
-	swap \
-	denormalize \
-	normalize \
-	qual4_decode \
-	read-seg-from-readn \
-	rewrite-spot-name \
-	make-position \
-	process-position \
-	extract-coordinates \
-	fpcodec \
-	index_lookup \
-	varloc
-
-SRAXF_OBJ = \
-	$(addsuffix .$(LOBX),$(SRAXF_SRC))
-
-SRAXF_LIB = \
-	-dksrch \
-	-dvdb \
-	-dkdb \
-	-dklib \
-	-dm \
-	-dz
-
-$(ILIBDIR)/libsraxf.$(LIBX): $(SRAXF_OBJ)
-	$(LD) --slib -o $@ $^ $(SRAXF_LIB)
-
-
-#-------------------------------------------------------------------------------
-# sra transform update library
-#
-$(TARGDIR)/libwsraxf: $(addprefix $(ILIBDIR)/libwsraxf.,$(ILIBEXT))
-
-WSRAXF_SRC = \
-	$(SRAXF_SRC) \
-	extract-name_fmt \
-	extract-spot_name \
-	stats \
-	stats_quality \
-	qual4_encode
-
-WSRAXF_OBJ = \
-	$(addsuffix .$(LOBX),$(WSRAXF_SRC))
-
-WSRAXF_LIB = \
-	-dwvdb \
-	-dwkdb \
-	-dksrch \
-	-dklib \
-	-dm \
-	-dz
-
-$(ILIBDIR)/libwsraxf.$(LIBX): $(WSRAXF_OBJ)
-	$(LD) --slib -o $@ $^ $(WSRAXF_LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/sraxf/bio-start.c b/libs/sraxf/bio-start.c
deleted file mode 100644
index 6d563bd..0000000
--- a/libs/sraxf/bio-start.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-
-typedef struct self_t {
-    bool inclusive;
-} self_t;
-
-static
-void CC sraxf_bio_start_free_wrapper( void *ptr )
-{
-    free( ptr );
-}
-
-/* INSDC:coord:zero NCBI:SRA:bio_start #1
- *   ( INSDC:coord:zero read_start, INSDC:SRA:xread_type read_type );
- *
- *  searches through read_type vector
- *  returns the 0-based starting coordinate of first biological read
- *
- *  "read_start" [ DATA ] - vector of read start coordinates
- *
- *  "read_type" [ DATA ] - vector of read types
- */
-static
-rc_t CC sra_bio_start ( void *self, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    const uint8_t *src = argv [ 1 ] . u . data . base;
-    uint32_t i;
-    uint64_t count = argv [ 1 ] . u . data . elem_count;
-    for ( i = 0, src += argv [ 1 ] . u . data . first_elem; i < count; ++ i )
-    {
-        if ( ( src [ i ] & SRA_READ_TYPE_BIOLOGICAL ) != 0 )
-        {
-            rc_t rc;
-            int32_t bio_start;
-            KDataBuffer *dst = rslt -> data;
-
-            assert ( argv [ 0 ] . u . data . elem_count == argv [ 1 ] . u . data . elem_count );
-            assert ( argv [ 0 ] . u . data . elem_bits == sizeof bio_start * 8 );
-            bio_start = ( ( const int32_t* ) argv [ 0 ] . u . data . base )
-                [ argv [ 0 ] . u . data . first_elem + i ];
-
-            if ( dst -> elem_bits != sizeof bio_start * 8 )
-            {
-                rc = KDataBufferCast ( dst, dst, sizeof bio_start * 8, true );
-                if ( rc != 0 )
-                    return rc;
-            }
-
-            if ( dst -> elem_count != 1 )
-            {
-                rc = KDataBufferResize ( dst, 1 );
-                if ( rc != 0 )
-                    return rc;
-            }
-
-            * ( int32_t* ) dst -> base = bio_start;
-            rslt -> elem_count = 1;
-            return 0;
-        }
-    }
-
-    return RC ( rcSRA, rcFunction, rcSearching, rcData, rcNotFound );
-}
-
-VTRANSFACT_IMPL( NCBI_SRA_bio_start, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt -> u . rf = sra_bio_start;
-    rslt -> variant = vftRow;
-    return 0;
-}
-
-/* INSDC:coord:zero NCBI:SRA:bio_end #1 < bool inclusive >
- *    ( INSDC:coord:zero read_start, INSDC:SRA:xread_type read_type, INSDC:coord:len read_len );
- *
- *  searcehes through read_type vector
- *  returns the 0 based ending coording (either inclusive or exclusive) of last
- *  biological read
- *
- *  "read_start" [ DATA ] - vector of read start coordinates
- *
- *  "read_type" [ DATA ] - vector of read types
- *
- *  "read_len" [ DATA ] - vector of read lengths
- */
-static
-rc_t CC sra_bio_end ( void *Self, const VXformInfo *info, int64_t row_id,
-                       VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    const uint8_t *src = argv [ 1 ] . u . data . base;
-    int64_t i;
-    uint64_t count = argv [ 1 ] . u . data . elem_count;
-    const self_t *self = (const self_t *)Self;
-    bool inclusive = self->inclusive;
-    
-    for ( i = count - 1, src += argv [ 1 ] . u . data . first_elem; i >= 0; -- i )
-    {
-        int32_t read_len = ( ( const int32_t* ) argv [ 2 ] . u . data . base )
-            [ argv [ 2 ] . u . data . first_elem + i ];
-        
-        if ( read_len > 0 && ( src [ i ] & SRA_READ_TYPE_BIOLOGICAL ) != 0 )
-        {
-            rc_t rc;
-            int32_t bio_end;
-            KDataBuffer *dst = rslt -> data;
-            
-            assert ( argv [ 0 ] . u . data . elem_count == argv [ 1 ] . u . data . elem_count );
-            assert ( argv [ 0 ] . u . data . elem_count == argv [ 2 ] . u . data . elem_count );
-            assert ( argv [ 0 ] . u . data . elem_bits == sizeof bio_end * 8 );
-            assert ( argv [ 0 ] . u . data . elem_bits == argv [ 2 ] . u . data . elem_bits );
-            
-            bio_end = ( ( const int32_t* ) argv [ 0 ] . u . data . base )
-                [ argv [ 0 ] . u . data . first_elem + i ];
-            bio_end += read_len;
-            
-            if ( dst -> elem_bits != sizeof bio_end * 8 )
-            {
-                rc = KDataBufferCast ( dst, dst, sizeof bio_end * 8, true );
-                if ( rc != 0 )
-                    return rc;
-            }
-            
-            if ( dst -> elem_count != 1 )
-            {
-                rc = KDataBufferResize ( dst, 1 );
-                if ( rc != 0 )
-                    return rc;
-            }
-            
-            * ( int32_t* ) dst -> base = inclusive ? (bio_end - 1) : bio_end;
-            rslt -> elem_count = 1;
-            return 0;
-        }
-    }
-    
-    return RC ( rcSRA, rcFunction, rcSearching, rcData, rcNotFound );
-}
-
-VTRANSFACT_IMPL( NCBI_SRA_bio_end, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-                                                VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    self_t *self;
-    bool inclusive;
-    
-    assert ( cp->argc == 1 );
-    assert ( cp->argv[0].desc.domain == vtdBool );
-    assert ( cp->argv[0].count == 1 );
-    inclusive = cp->argv[0].data.b[0];
-    
-    self = malloc ( sizeof ( *self ));
-    if ( !self )
-    {
-        return RC ( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    }
-    
-    self -> inclusive = inclusive;
-    
-    rslt -> self = self;
-    rslt -> whack = sraxf_bio_start_free_wrapper;
-    rslt -> u . rf = sra_bio_end;
-    rslt -> variant = vftRow;
-    return 0;
-}
diff --git a/libs/sraxf/color-from-dna.c b/libs/sraxf/color-from-dna.c
deleted file mode 100644
index 435985c..0000000
--- a/libs/sraxf/color-from-dna.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-static
-void color_from_dna(uint8_t csbin[], const uint8_t dnabin[], size_t n, uint8_t primer, const uint8_t conversion_matrix[]) {
-    uint8_t st;
-    size_t i;
-	
-    switch (primer) {
-    case 'A':
-        st = 0;
-        break;
-    case 'C':
-        st = 1;
-        break;
-    case 'G':
-        st = 2;
-        break;
-    case 'T':
-        st = 3;
-        break;
-    default:
-        st = 4;
-        break;
-    }
-	
-    for (i = 0; i != n; ++i) {
-        uint8_t tr = dnabin[i];
-		
-        csbin[i] = conversion_matrix[st * 5 + tr];
-        st = tr;
-    }
-}
-
-static
-rc_t CC color_from_dna_drvr ( void *self, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    uint8_t *csbin;
-
-    uint32_t i;
-    uint64_t row_len = argv [ 0 ] . u . data . elem_count;
-    uint64_t out_len, nreads = argv [ 1 ] . u . data . elem_count;
-
-    const uint8_t *dnabin = argv [ 0 ] . u . data . base;
-    const uint32_t *read_start = argv [ 1 ] . u . data . base;
-    const uint32_t *read_len = argv [ 2 ] . u . data . base;
-    const uint8_t *cskey = argv [ 3 ] . u . data . base;
-    const uint8_t *cmatrx = argv [ 4 ] . u . data . base;
-    
-    assert(argv[0].u.data.elem_bits == 8);
-    assert(argv[1].u.data.elem_bits == 32);
-    assert(argv[2].u.data.elem_bits == 32);
-    assert(argv[3].u.data.elem_bits == 8);
-    assert(argv[4].u.data.elem_bits == 8);
-
-    assert(argv[2].u.data.elem_count == nreads);
-    assert(argv[3].u.data.elem_count == nreads);
-
-    dnabin += argv [ 0 ] . u . data . first_elem;
-    read_start += argv [ 1 ] . u . data . first_elem;
-    read_len += argv [ 2 ] . u . data . first_elem;
-    cskey += argv [ 3 ] . u . data . first_elem;
-    cmatrx += argv [ 4 ] . u . data . first_elem;
-
-    /* safety check that read structure is within bounds */
-    for ( i = 0, out_len = 0; i < nreads; ++i )
-    {
-        if ( read_start [ i ] + read_len [ i ] > row_len )
-            return RC ( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-        out_len += read_len [ i ];
-    }
-    
-    /* resize output row for the total number of reads */    
-    rslt -> data -> elem_bits = 8;
-    rc = KDataBufferResize ( rslt -> data, out_len );
-    if ( rc != 0 )
-        return rc;
-
-    /* huh? */
-    rslt -> data -> bit_offset = 0;
-
-    rslt -> elem_count = out_len;
-    csbin = rslt -> data -> base;
-
-    for ( i = 0, out_len = 0; i < nreads; ++i )
-    {
-        color_from_dna ( & csbin [ out_len ],
-            & dnabin [ read_start [ i ] ], read_len [ i ],
-            cskey [ i ], cmatrx );
-
-        out_len += read_len [ i ];
-    }
-    
-    return 0;
-}
-
-/* 
- * function
- * INSDC:color:bin NCBI:color_from_dna #1 ( INSDC:dna:bin dna_bin,
- *     INSDC:coord:zero read_start, U32 read_len,
- *     INSDC:dna:text cs_key, U8 color_matrix )
- */
-VTRANSFACT_IMPL ( NCBI_color_from_dna, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = color_from_dna_drvr;
-    rslt->variant = vftRow;
-    
-    return 0;
-}
diff --git a/libs/sraxf/denormalize.c b/libs/sraxf/denormalize.c
deleted file mode 100644
index 68acb2a..0000000
--- a/libs/sraxf/denormalize.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-typedef void (*denorm_f)(void *dst, const void *src, const void *Cntrl, uint64_t vec_count);
-typedef struct self_t {
-    denorm_f f;
-} self_t;
-
-#define DENORM_0(A, B) do { (A).data[0] = (B).data[0]; (A).data[1] = (B).data[0] + (B).data[1]; (A).data[2] = (B).data[2]; (A).data[3] = (B).data[3]; } while (0)
-#define DENORM_1(A, B) A = B
-#define DENORM_2(A, B) do { (A).data[0] = (B).data[0]; (A).data[1] = (B).data[1]; (A).data[2] = (B).data[2]; (A).data[3] = (B).data[2] + (B).data[3]; } while (0)
-#define DENORM_3(A, B) A = B
-
-#define FUNC(VALTYPE) F_ ## VALTYPE
-
-#define FUNC_DEF(VALTYPE) \
-static void FUNC(VALTYPE)(void *Dst, const void *Src, const void *Cntrl, uint64_t count) { \
-    typedef struct { VALTYPE data[4]; } data4_t; \
-    data4_t *dst = (data4_t *)Dst; \
-    const data4_t *src = (const data4_t *)Src; \
-    const uint8_t *cntrl = (const uint8_t *)Cntrl; \
-    uint64_t i; \
-    \
-    for (i = 0; i != count; ++i) { \
-        switch(cntrl[i]) { \
-        default: \
-        case 0: \
-            DENORM_0(dst[i], src[i]); \
-            break; \
-        case 1: \
-            DENORM_1(dst[i], src[i]); \
-            break; \
-        case 2: \
-            DENORM_2(dst[i], src[i]); \
-            break; \
-        case 3: \
-            DENORM_3(dst[i], src[i]); \
-            break; \
-        }\
-    } \
-}
-
-FUNC_DEF(float)
-FUNC_DEF(double)
-FUNC_DEF(uint8_t)
-FUNC_DEF(uint16_t)
-FUNC_DEF(uint32_t)
-FUNC_DEF(uint64_t)
-FUNC_DEF(int8_t)
-FUNC_DEF(int16_t)
-FUNC_DEF(int32_t)
-FUNC_DEF(int64_t)
-
-static
-rc_t CC denormal_drvr (
-                void *Self,
-                const VXformInfo *info,
-                int64_t row_id,
-                VRowResult *rslt,
-                uint32_t argc,
-                const VRowData argv []
-) {
-    rc_t rc = 0;
-    const void *src;
-    const void *cntrl;
-    const self_t *self = (const self_t *)Self;
-    
-    assert(argv[0].u.data.elem_bits % 8 == 0);
-    assert(argv[1].u.data.elem_bits % 8 == 0);
-    
-    src   = &((const uint8_t *)argv[0].u.data.base)[(argv[0].u.data.first_elem * argv[0].u.data.elem_bits) / 8];
-    cntrl = &((const uint8_t *)argv[1].u.data.base)[(argv[1].u.data.first_elem * argv[1].u.data.elem_bits) / 8];
-    
-    rslt->elem_bits = rslt->data->elem_bits = argv[0].u.data.elem_bits;
-    rc = KDataBufferResize(rslt->data, argv[0].u.data.elem_count);
-    if (rc)
-        return rc;
-    rslt->elem_count = rslt->data->elem_count;
-    rslt->data->bit_offset = 0;
-    
-    self->f(rslt->data->base, src, cntrl, rslt->elem_count);
-    
-    return 0;
-}
-
-static
-void CC sraxf_denormalize_free_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-/* 
- * function < type T > T [ 4 ] NCBI:SRA:denormalize #1 ( T [ 4 ] intensities, U8 called );
- */
-VTRANSFACT_IMPL ( NCBI_SRA_denormalize, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    self_t *self;
-    
-    switch (info->fdesc.desc.domain) {
-    case vtdInt:
-    case vtdUint:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 8:
-        case 16:
-        case 32:
-        case 64:
-            break;
-        default:
-            return RC(rcXF, rcFunction, rcConstructing, rcType, rcInvalid);
-            break;
-        }
-        break;
-    case vtdFloat:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 32:
-        case 64:
-            break;
-        default:
-            return RC(rcXF, rcFunction, rcConstructing, rcType, rcInvalid);
-            break;
-        }
-        break;
-    default:
-        return RC(rcXF, rcFunction, rcConstructing, rcType, rcInvalid);
-        break;
-    }
-    
-    self = malloc(sizeof(*self));
-    if (self) {
-        switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 8:
-                self->f = FUNC(int8_t);
-                break;
-            case 16:
-                self->f = FUNC(int16_t);
-                break;
-            case 32:
-                self->f = FUNC(int32_t);
-                break;
-            case 64:
-                self->f = FUNC(int64_t);
-                break;
-            default:
-                break;
-            }
-            break;
-        case vtdUint:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 8:
-                self->f = FUNC(uint8_t);
-                break;
-            case 16:
-                self->f = FUNC(uint16_t);
-                break;
-            case 32:
-                self->f = FUNC(uint32_t);
-                break;
-            case 64:
-                self->f = FUNC(uint64_t);
-                break;
-            default:
-                break;
-            }
-            break;
-        case vtdFloat:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 32:
-                self->f = FUNC(float);
-                break;
-            case 64:
-                self->f = FUNC(double);
-                break;
-            default:
-                break;
-            }
-            break;
-        default:
-            break;
-        }
-        
-        rslt->self = self;
-        rslt->whack = sraxf_denormalize_free_wrapper;
-        rslt->u.rf = denormal_drvr;
-        rslt->variant = vftRow;
-        
-        return 0;
-    }
-    return RC(rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted);
-}
diff --git a/libs/sraxf/dna-from-color.c b/libs/sraxf/dna-from-color.c
deleted file mode 100644
index 7caee94..0000000
--- a/libs/sraxf/dna-from-color.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-static
-void dna_from_color(uint8_t dnabin[], const uint8_t csbin[], size_t n, uint8_t primer, const uint8_t conversion_matrix[]) {
-    uint8_t st;
-    size_t i;
-	
-    switch (primer) {
-    case 'A':
-        st = 0;
-        break;
-    case 'C':
-        st = 1;
-        break;
-    case 'G':
-        st = 2;
-        break;
-    case 'T':
-        st = 3;
-        break;
-    default:
-        st = 4;
-        break;
-    }
-	
-    for (i = 0; i != n && st !=4; ++i) { /*** interrupt translation after the first ambiguity in color space ***/
-        uint8_t tr = csbin[i];
-		
-        st = dnabin[i] = conversion_matrix[st * 5 + tr];
-    }
-    if(i<n) memset(dnabin+i,4,n-i); /*** translation was interrupted - the remainder is ambiguity in base space ***/
-}
-
-static
-rc_t CC dna_from_color_drvr ( void *self, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    uint8_t *dnabin;
-
-    uint32_t i, row_len = argv [ 0 ] . u . data . elem_count;
-    uint32_t out_len, nreads = argv [ 1 ] . u . data . elem_count;
-
-    const uint8_t *csbin = argv [ 0 ] . u . data . base;
-    const uint32_t *read_start = argv [ 1 ] . u . data . base;
-    const uint32_t *read_len = argv [ 2 ] . u . data . base;
-    const uint8_t *cskey = argv [ 3 ] . u . data . base;
-    const uint8_t *cmatrx = argv [ 4 ] . u . data . base;
-    
-    assert(argv[0].u.data.elem_bits == 8);
-    assert(argv[1].u.data.elem_bits == 32);
-    assert(argv[2].u.data.elem_bits == 32);
-    assert(argv[3].u.data.elem_bits == 8);
-    assert(argv[4].u.data.elem_bits == 8);
-
-    assert(argv[2].u.data.elem_count == nreads);
-    assert(argv[3].u.data.elem_count == nreads);
-
-    csbin += argv [ 0 ] . u . data . first_elem;
-    read_start += argv [ 1 ] . u . data . first_elem;
-    read_len += argv [ 2 ] . u . data . first_elem;
-    cskey += argv [ 3 ] . u . data . first_elem;
-    cmatrx += argv [ 4 ] . u . data . first_elem;
-
-    /* safety check that read structure is within bounds */
-    for ( i = out_len = 0; i < nreads; ++i )
-    {
-        if ( read_start [ i ] + read_len [ i ] > row_len )
-            return RC ( rcXF, rcFunction, rcExecuting, rcData, rcInvalid );
-        out_len += read_len [ i ];
-    }
-    
-    /* resize output row for the total number of reads */    
-    rslt -> data -> elem_bits = 8;
-    rc = KDataBufferResize ( rslt -> data, out_len );
-    if ( rc != 0 )
-        return rc;
-
-    /* huh? */
-    rslt -> data -> bit_offset = 0;
-
-    rslt -> elem_count = out_len;
-    dnabin = rslt -> data -> base;
-
-    for ( i = out_len = 0; i < nreads; ++i )
-    {
-        dna_from_color ( & dnabin [ out_len ],
-            & csbin [ read_start [ i ] ], read_len [ i ],
-            cskey [ i ], cmatrx );
-
-        out_len += read_len [ i ];
-    }
-    
-    return 0;
-}
-
-/* 
- * function
- * INSDC:color:bin NCBI:dna_from_color #1 ( INSDC:dna:bin dna_bin,
- *     INSDC:coord:zero read_start, U32 read_len,
- *     INSDC:dna:text cs_key, U8 color_matrix )
- */
-VTRANSFACT_IMPL ( NCBI_dna_from_color, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = dna_from_color_drvr;
-    rslt->variant = vftRow;
-    
-    return 0;
-}
diff --git a/libs/sraxf/dynamic-454-read-descriptor.c b/libs/sraxf/dynamic-454-read-descriptor.c
deleted file mode 100644
index 2520eed..0000000
--- a/libs/sraxf/dynamic-454-read-descriptor.c
+++ /dev/null
@@ -1,303 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <kdb/index.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <search/grep.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-/* dynamic_read_desc
- *  uses inputs to determine read type and segmentation
- *
- *  "spot" [ DATA ] - bases for entire spot
- *
- *  "key" [ DATA, CONTROL ] - bases for key sequence. for version 1,
- *  the first base following key is taken as biological start
- *
- *  "linker" [ DATA, CONTROL, OPTIONAL ] - if present, is used to separate
- *  all bases following "key" into mate pair biological reads
- *
- *  returns a trio for each identified read, with read type, start and length
- */
-enum { dyn_read_type, dyn_read_start, dyn_read_len };
-
-typedef uint32_t dynamic_read_desc [ 3 ];
-
-static
-rc_t CC dynamic_read_desc_static ( void *self, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    dynamic_read_desc *p;
-    KDataBuffer *dst = rslt -> data;
-
-    /* severe error if adapter is longer than spot */
-    if ( argv [ 0 ] . u . data . elem_count < argv [ 1 ] . u . data . elem_count )
-        return RC ( rcSRA, rcFunction, rcExecuting, rcData, rcCorrupt );
-
-    /* the buffer should have already been given the correct element size */
-    if ( dst -> elem_bits != 32 * 3 )
-    {
-        rc = KDataBufferCast ( dst, dst, 32 * 3, true );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* we always produce 2 reads */
-    if ( dst -> elem_count != 2 )
-    {
-        rc = KDataBufferResize ( dst, 2 );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    p = dst -> base;
-
-    /* adapter */
-    p [ 0 ] [ dyn_read_type ] = SRA_READ_TYPE_TECHNICAL;
-    p [ 0 ] [ dyn_read_start ] = 0;
-    assert(argv [ 1 ] . u . data . elem_count >> 32 == 0);
-    p [ 0 ] [ dyn_read_len ] = (uint32_t)argv [ 1 ] . u . data . elem_count;
-
-    /* fragment */
-    p [ 1 ] [ dyn_read_type ] = SRA_READ_TYPE_BIOLOGICAL;
-    p [ 1 ] [ dyn_read_start ] = p [ 0 ] [ dyn_read_len ];
-    assert(argv [ 0 ] . u . data . elem_count >> 32 == 0);
-    p [ 1 ] [ dyn_read_len ] = (uint32_t)(argv [ 0 ] . u . data . elem_count) - p [ 0 ] [ dyn_read_len ];
-
-    rslt -> elem_count = 2;
-    return 0;
-}
-
-
-/* dynamic_read_desc_with_linker
- */
-typedef struct linker_agrep linker_agrep;
-struct linker_agrep
-{
-    /* I suspect this should be unsigned... */
-    int32_t edit_distance;
-};
-
-int32_t debug_callback(void *cbinfo, AgrepMatch *match, AgrepContinueFlag *cont)
-{
-    printf("Match: pos %d len %d score %d\n", match->position, match->length,
-           match->score);
-    return 0;
-}
-
-
-static
-rc_t CC dynamic_read_desc_with_linker ( void *xself, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    dynamic_read_desc *p;
-    KDataBuffer *dst = rslt -> data;
-    const linker_agrep *self = ( const void* ) xself;
-
-    AgrepMatch match;
-    int32_t found;
-    AgrepFlags agrepflags;
-    Agrep *agrep;
-    /* AgrepCallArgs args; */
-    
-    const char *agreppattern;
-    char buf[4096];
-    const char *text;
-    uint32_t textlen;
-
-    /* severe error if adapter is longer than spot */
-    if ( argv [ 0 ] . u . data . elem_count < argv [ 1 ] . u . data . elem_count )
-        return RC ( rcSRA, rcFunction, rcExecuting, rcData, rcCorrupt );
-
-    /* the buffer should have already been given the correct element size */
-    if ( dst -> elem_bits != 32 * 3 )
-    {
-        rc = KDataBufferCast ( dst, dst, 32 * 3, true );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* we always produce 4 reads for when the linker is present */
-    if ( dst -> elem_count != 4 )
-    {
-        rc = KDataBufferResize ( dst, 4 );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* TBD - a mechanism for detecting when this has not changed
-       since typically it will be identical for every row in a table
-       but not necessarily so */
-    agreppattern = argv[2].u.data.base;
-    agreppattern += argv[2].u.data.first_elem; 
-    textlen = (uint32_t)string_copy(buf, sizeof buf, agreppattern, argv[2].u.data.elem_count);
-    if ( textlen >= sizeof buf )
-        return RC ( rcSRA, rcFunction, rcExecuting, rcData, rcExcessive );
-
-    text = argv[0].u.data.base;
-    text += argv[0].u.data.first_elem;
-
-    assert(argv[0].u.data.elem_count >> 32 == 0);
-    textlen = (uint32_t)argv[0].u.data.elem_count;
-
-    text += argv[1].u.data.elem_count;
-    textlen -= argv[1].u.data.elem_count;
-
-    agrepflags = AGREP_TEXT_EXPANDED_2NA 
-        | AGREP_PATTERN_4NA
-        | AGREP_EXTEND_BETTER
-        | AGREP_LEFT_MAINTAIN_SCORE
-        | AGREP_ANYTHING_ELSE_IS_N;
-
-    /* This might fail due to size restrictions. */
-    rc = AgrepMake(&agrep, agrepflags | AGREP_ALG_MYERS, buf);
-    if (rc == 0) {
-        /* fprintf(stderr, "Using myers.\n"); */
-    } else {
-        rc = AgrepMake(&agrep, agrepflags | AGREP_ALG_MYERS_UNLTD, buf);
-        /* Try one more time. */
-        if (rc) {
-            rc = AgrepMake(&agrep, agrepflags | AGREP_ALG_DP, buf);
-        }
-        if (rc)
-            return rc;
-    }
-
-    found = AgrepFindBest(agrep, self->edit_distance, text, textlen, &match);
-
-    if (found) {
-
-        p = dst -> base;
-        
-        /* adapter */
-        p [ 0 ] [ dyn_read_type ] = SRA_READ_TYPE_TECHNICAL;
-        p [ 0 ] [ dyn_read_start ] = 0;
-        assert(argv [ 1 ] . u . data . elem_count >> 32 == 0);
-        p [ 0 ] [ dyn_read_len ] = (uint32_t)argv [ 1 ] . u . data . elem_count;
-        
-        /* fragment */
-        p [ 1 ] [ dyn_read_type ] = SRA_READ_TYPE_BIOLOGICAL;
-        p [ 1 ] [ dyn_read_start ] = (uint32_t)argv [ 1 ] . u . data . elem_count;
-        p [ 1 ] [ dyn_read_len ] = match.position;
-
-        /* linker */
-        p [ 2 ] [ dyn_read_type ] = SRA_READ_TYPE_TECHNICAL;
-        p [ 2 ] [ dyn_read_start ] = match.position + (uint32_t)argv[1].u.data.elem_count;
-        p [ 2 ] [ dyn_read_len ] = match.length;
-        
-        /* fragment */
-        p [ 3 ] [ dyn_read_type ] = SRA_READ_TYPE_BIOLOGICAL;
-        p [ 3 ] [ dyn_read_start ] = match.position + match.length + (uint32_t)argv[1].u.data.elem_count;
-        p [ 3 ] [ dyn_read_len ] = (uint32_t)argv [ 0 ] . u . data . elem_count - match.position - match.length - (uint32_t)argv[1].u.data.elem_count;
-        
-        rslt -> elem_count = 4;
-
-    } else {
-
-        
-        p = dst -> base;
-        
-        /* adapter */
-        p [ 0 ] [ dyn_read_type ] = SRA_READ_TYPE_TECHNICAL;
-        p [ 0 ] [ dyn_read_start ] = 0;
-        assert(argv [ 1 ] . u . data . elem_count >> 32 == 0);
-        p [ 0 ] [ dyn_read_len ] = (uint32_t)argv [ 1 ] . u . data . elem_count;
-        
-        /* fragment */
-        p [ 1 ] [ dyn_read_type ] = SRA_READ_TYPE_BIOLOGICAL;
-        p [ 1 ] [ dyn_read_start ] = (uint32_t)argv [ 1 ] . u . data . elem_count;
-        p [ 1 ] [ dyn_read_len ] = (uint32_t)argv [ 0 ] . u . data . elem_count - (uint32_t)argv [ 1 ] . u . data . elem_count;
-
-        /* linker */
-        p [ 2 ] [ dyn_read_type ] = SRA_READ_TYPE_TECHNICAL;
-        p [ 2 ] [ dyn_read_start ] = (uint32_t)argv [ 0 ] . u . data . elem_count;
-        p [ 2 ] [ dyn_read_len ] = 0;
-        
-        /* fragment */
-        p [ 3 ] [ dyn_read_type ] = SRA_READ_TYPE_BIOLOGICAL;
-        p [ 3 ] [ dyn_read_start ] = (uint32_t)argv [ 0 ] . u . data . elem_count;
-        p [ 3 ] [ dyn_read_len ] = 0;
-
-        rslt -> elem_count = 4;
-
-    }
-
-    AgrepWhack(agrep);
-
-    return 0;
-}
-
-static
-void CC dyn_454_read_desc_free_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-/*
- extern function U32 [ 3 ] NCBI:SRA:_454_:dynamic_read_desc #1 < * U32 edit_distance >
-    ( NCBI:SRA:_454_:drdparam_set spot, NCBI:SRA:_454_:drdparam_set key * NCBI:SRA:_454_:drdparam_set linker );
- */
-VTRANSFACT_IMPL ( NCBI_SRA__454__dynamic_read_desc, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    linker_agrep *xself;
-
-    if ( dp -> argc == 2 )
-    {
-        rslt -> u . ndf = dynamic_read_desc_static;
-        rslt -> variant = vftNonDetRow;
-        return 0;
-    }
-
-    xself = malloc ( sizeof * xself );
-    if ( xself == NULL )
-        return RC ( rcSRA, rcFunction, rcConstructing, rcMemory, rcExhausted );
-
-    /* NB - this should be changed to unsigned */
-    xself -> edit_distance = 5;
-    if ( cp -> argc == 1 )
-        xself -> edit_distance = cp -> argv [ 0 ] . data . i32 [ 0 ];
-
-    rslt -> self = xself;
-    rslt -> whack = dyn_454_read_desc_free_wrapper;
-    rslt -> u . rf = dynamic_read_desc_with_linker;
-    rslt -> variant = vftRow;
-    return 0;
-}
diff --git a/libs/sraxf/extract-coordinates.c b/libs/sraxf/extract-coordinates.c
deleted file mode 100644
index 40d4a17..0000000
--- a/libs/sraxf/extract-coordinates.c
+++ /dev/null
@@ -1,354 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-
-#define SLX_COORD_LEN 10
-
-static
-int non_braindead_atoi ( const char *start, const char *end )
-{
-    int val = start [ 0 ] - '0';
-    uint32_t i, count = (uint32_t)( end - start );
-    for ( i = 1; i < count; ++ i )
-    {
-        val *= 10;
-        val += start [ i ] - '0';
-    }
-    return val;
-}
-
-static
-int scan_hex ( const char *str, int count )
-{
-    int i, val = str [ 0 ] - '0';
-    if ( val > 9 )
-        val = toupper ( str [ 0 ] ) - 'A' + 10;
-    for ( i = 1; i < count; ++ i )
-    {
-        int d = str [ i ] - '0';
-        if ( d > 9 )
-            d = toupper ( str [ i ] ) - 'A' + 10;
-        val = val << 4 | d;
-    }
-    return val;
-}
-
-static
-void common_extract_coordinates ( const char *skey, uint32_t slen, uint32_t coords [ 4 ] )
-{
-    unsigned int a, b, c, d;
-    uint32_t i, j, count = slen;
-
-    /* scan hex digits */
-    for ( i = count; i > 0; )
-    {
-        if ( ! isxdigit ( skey [ -- i ] ) )
-            break;
-    }
-
-    /* detect newer format */
-    if ( count - i < ( SLX_COORD_LEN - 1 ) )
-    {
-        const char *end = skey + count;
-
-        /* new format */
-        for ( d = 0, j = 0, i = count; i > 0; )
-        {
-            if ( ! isdigit ( skey [ -- i ] ) )
-            {
-                j = i + 1;
-                break;
-            }
-        }
-        d = non_braindead_atoi ( & skey [ j ], end );
-        for ( c = 0, j = 0; i > 0; )
-        {
-            if ( ! isdigit ( skey [ -- i ] ) )
-            {
-                j = i + 1;
-                break;
-            }
-        }
-        c = atoi ( & skey [ j ] );
-        for ( b = 0, j = 0; i > 0; )
-        {
-            if ( ! isdigit ( skey [ -- i ] ) )
-            {
-                j = i + 1;
-                break;
-            }
-        }
-        b = atoi ( & skey [ j ] );
-        for ( a = 0, j = 0; i > 0; )
-        {
-            if ( ! isdigit ( skey [ -- i ] ) )
-            {
-                j = i + 1;
-                break;
-            }
-        }
-        a = atoi ( & skey [ j ] );
-        if ( j > 0 )
-        {
-            if ( i > 0 )
-                -- i;
-            while ( isalpha ( skey [ i ] ) )
-                ++ i;
-        }
-    }
-    else
-    {
-        /* original format */
-        a = scan_hex ( skey, 1 );
-        b = scan_hex ( & skey [ 1 ], 3 );
-        c = scan_hex ( & skey [ 4 ], 3 );
-        d = scan_hex ( & skey [ 7 ], 3 );
-        if ( count > SLX_COORD_LEN )
-        {
-            i = count - SLX_COORD_LEN;
-        }
-    }
-
-    coords [ 3 ] = a;
-    coords [ 2 ] = b;
-    coords [ 1 ] = c;
-    coords [ 0 ] = d;
-}
-
-static
-rc_t CC illumina_extract_coordinates ( void *self, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    uint32_t *out;
-    KDataBuffer *dst = rslt -> data;
-
-    uint32_t coords [ 4 ];
-
-    const char *skey = argv [ 0 ] . u . data . base;
-    uint32_t i, count = argv [ 0 ] . u . data . elem_count;
-    skey += argv [ 0 ] . u . data . first_elem;
-
-    common_extract_coordinates ( skey, count, coords );
-
-    /* count the number of output coordinates */
-    count = ( uint32_t ) ( size_t ) self;
-
-    /* produce however many elements are requested */
-    dst -> elem_bits = 32 * count;
-    rc = KDataBufferResize ( dst, 1 );
-    if ( rc != 0 )
-        return rc;
-
-    out = dst -> base;
-    switch ( count )
-    {
-    default:
-        for ( i = 4; i < count; ++ i )
-            out [ i ] = 0;
-    case 4:
-        out [ 3 ] = coords [ 3 ];
-    case 3:
-        out [ 2 ] = coords [ 2 ];
-    case 2:
-        out [ 1 ] = coords [ 1 ];
-    case 1:
-        out [ 0 ] = coords [ 0 ];
-    case 0:
-        break;
-    }
-
-    rslt -> elem_count = 1;
-
-    return 0;
-}
-
-static
-rc_t CC abi_extract_coordinates ( void *self, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    uint32_t *out;
-    KDataBuffer *dst = rslt -> data;
-
-    uint32_t coords [ 4 ];
-
-    const char *skey = argv [ 0 ] . u . data . base;
-    uint32_t i, count = argv [ 0 ] . u . data . elem_count;
-    skey += argv [ 0 ] . u . data . first_elem;
-
-    common_extract_coordinates ( skey, count, coords );
-
-    /* count the number of output coordinates */
-    count = ( uint32_t ) ( size_t ) self;
-
-    /* produce however many elements are requested */
-    dst -> elem_bits = 32 * count;
-    rc = KDataBufferResize ( dst, 1 );
-    if ( rc != 0 )
-        return rc;
-
-    out = dst -> base;
-    switch ( count )
-    {
-    default:
-        for ( i = 3; i < count; ++ i )
-            out [ i ] = 0;
-    case 3:
-        out [ 2 ] = coords [ 2 ];
-    case 2:
-        out [ 1 ] = coords [ 1 ];
-    case 1:
-        out [ 0 ] = coords [ 0 ];
-    case 0:
-        break;
-    }
-
-    rslt -> elem_count = 1;
-
-    return 0;
-}
-
-static
-rc_t CC _454_extract_coordinates ( void *self, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    uint32_t *out;
-    unsigned int a, b, c;
-    KDataBuffer *dst = rslt -> data;
-
-    const char *skey = argv [ 0 ] . u . data . base;
-    uint32_t i, count = argv [ 0 ] . u . data . elem_count;
-    skey += argv [ 0 ] . u . data . first_elem;
-
-    /* advance skey to coordinates */
-    if ( count < 7 )
-        return RC ( rcSRA, rcName, rcParsing, rcString, rcInsufficient );
-    skey += count - 7;
-
-    /* get region */
-    if ( ! isdigit ( skey [ 0 ] ) || ! isdigit ( skey [ 1 ] ) )
-        return RC ( rcSRA, rcName, rcParsing, rcString, rcCorrupt );
-    a = ( skey [ 0 ] - '0' ) * 10 + ( skey [ 1 ] - '0' );
-
-    /* get 'Q' - base-36 encoded x/y */
-    for ( c = 0, i = 2; i < 7; ++ i )
-    {
-        c *= 36;
-        if ( isdigit ( skey [ i ] ) )
-            c += skey [ i ] - '0' + 26;
-        else if ( ! isalpha ( skey [ i ] ) )
-            return RC ( rcSRA, rcName, rcParsing, rcString, rcCorrupt );
-        else
-        {
-            /* yes, the alphabetic symbols come BEFORE the numeric */
-            c += toupper ( skey [ i ] ) - 'A';
-        }
-    }
-
-    /* convert 'Q' to x and y */
-    b = c >> 12;
-    c &= 0xFFF;
-
-    /* count the number of output coordinates */
-    count = ( uint32_t ) ( size_t ) self;
-
-    /* produce however many elements are requested */
-    dst -> elem_bits = 32 * count;
-    rc = KDataBufferResize ( dst, 1 );
-    if ( rc != 0 )
-        return rc;
-
-    out = dst -> base;
-    switch ( count )
-    {
-    default:
-        for ( i = 3; i < count; ++ i )
-            out [ i ] = 0;
-    case 3:
-        out [ 2 ] = a;
-    case 2:
-        out [ 1 ] = b;
-    case 1:
-        out [ 0 ] = c;
-    case 0:
-        break;
-    }
-
-    rslt -> elem_count = 1;
-
-    return 0;
-}
-
-/* extract coordinates
- *  given a spotname with encoded coordinates
- *  extract them in reverse order into a vector
- *
- *  "platform" [ CONST ] - which platform rules to use
- *
- *  "skey" [ DATA ] - skey string for row
- */
-VTRANSFACT_IMPL ( NCBI_SRA_extract_coordinates, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    const uint8_t *platform = cp -> argv [ 0 ] . data . u8;
-    switch ( platform [ 0 ] )
-    {
-    case SRA_PLATFORM_454:
-        rslt -> u . rf = _454_extract_coordinates;
-        break;
-    case SRA_PLATFORM_ILLUMINA:
-    case SRA_PLATFORM_HELICOS:
-        rslt -> u . rf = illumina_extract_coordinates;
-        break;
-    case SRA_PLATFORM_ABSOLID:
-        rslt -> u . rf = abi_extract_coordinates;
-        break;
-    default:
-        return RC ( rcSRA, rcFunction, rcConstructing, rcType, rcUnsupported );
-    }
-
-    assert ( info -> fdesc . desc . intrinsic_bits == 32 );
-    rslt -> self = ( void* ) ( size_t ) info -> fdesc . desc . intrinsic_dim;
-    rslt -> variant = vftRow;
-    return 0;
-}
diff --git a/libs/sraxf/extract-name_coord.c b/libs/sraxf/extract-name_coord.c
deleted file mode 100644
index eff59f0..0000000
--- a/libs/sraxf/extract-name_coord.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include "name-tokenizer.h"
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-
-/* extract_name_coord
- *  generates inputs to .X and .Y and possibly other columns
- *
- *  if no tokens match "coord" constant, produces an empty row
- *  otherwise, produces binary coordinate value
- *  if multiple tokens match criteria, all values must be equivalent
- *  because only a single value will be output per row
- *
- *  "coord" [ CONST ] - either NCBI:SRA:name_token:X or NCBI:SRA:name_token:Y
- *  both of these values also match the token NCBI:SRA:name_token:Q and extract
- *  contents appropriately.
- *
- *  "name" [ DATA ] - raw spot names from NAME column
- *
- *  "tok" [ DATA ] - delimiting tokens produced by sub-table
-function INSDC:coord:zero
-    NCBI:SRA:extract_name_coord #1 < U16 coord > ( ascii name, NCBI:SRA:spot_name_token tok );
-*/
-
-typedef struct self_t {
-    uint16_t coordinate;
-    int position;
-} self_t;
-
-/* return 0...failed, 1...success */
-
-MOD_EXPORT uint32_t CC parse_decimal ( int32_t* base, const char* src, const uint32_t length )
-{
-    /* coordinates are normally unsigned */
-    bool negate = false;
-
-    /* fetch initial character */
-    int32_t val = src [ 0 ];
-
-    /* assume loop starts with following character */
-    uint32_t i = 1;
-
-    /* detect explicit sign */
-    switch ( val )
-    {
-    case '-':
-        negate = true;
-    case '+':
-        val = src [ 1 ];
-        i = 2;
-        break;
-    }
-
-    if ( ! isdigit ( val ) )
-        return 0;
-
-    for ( val -= '0'; i < length; ++ i )
-    {
-        val *= 10;
-        if ( ! isdigit ( src [ i ] ) )
-            return 0;
-        val += src [ i ] - '0';
-    }
-
-    * base = negate ? - val : val;
-
-    return 1;
-}
-
-MOD_EXPORT uint32_t CC parse_Q ( uint32_t* base, const char* src,
-    const uint32_t length, const uint16_t what )
-{
-    uint32_t xy, i;
-    
-    if( length != 5 ) {
-        return 0;
-    }
-    for( xy = i = 0; i < length; ++ i )
-    {
-        char n = src[i];
-        xy *= 36;
-        if( isdigit ( n ) )
-        {
-            xy += n - '0' + 26;
-        }
-        else if ( isalpha ( n ) )
-        {
-            xy += toupper ( n ) - 'A';
-        } 
-        else
-        {
-            return 0;
-        }
-    }
-    if ( what == nt_X )
-    {
-        *base = xy >> 12;
-        return 1;
-    }
-    if ( what == nt_Y )
-    {
-        *base = xy & 0xFFF;
-        return 1;
-    }
-
-    return 0;
-}
- 
-static
-rc_t CC extract_name_coordinate ( void *Self, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    uint32_t i, j;
-    self_t* self = Self;
-
-    const char *name;
-    const spot_name_token_t* token;
-    uint32_t name_len, num_tokens;
-
-    assert( argc == 2 );
-
-    /* name string */
-    name = argv [ 0 ] . u . data . base;
-    name_len = argv [ 0 ] . u . data . elem_count;
-    name += argv [ 0 ] . u . data . first_elem;
-
-    /* tokens */
-    token = argv [ 1 ] . u . data . base;
-    num_tokens = argv [ 1 ] . u . data . elem_count;
-    token += argv [ 1 ] . u . data . first_elem;
-
-    for ( i = j = 0; i < num_tokens; ++ i )
-    {
-        if ( token [ i ] . s . token_type != self -> coordinate )
-        {
-            if ( token [ i ] . s . token_type != nt_Q )
-                continue;
-            switch ( self -> coordinate )
-            {
-            case nt_X:
-            case nt_Y:
-                break;
-            default:
-                continue;
-            }
-        }
-
-        if ( ++ j == self->position )
-        {
-            /* check bounds */
-            if ( (uint32_t)( token [ i ] . s . position + token [ i ] . s . length ) > name_len )
-                return 0;
-
-            /* convert token */
-            rc = KDataBufferResize( rslt->data, 1 );
-            if ( rc )
-                return rc;
-
-            switch ( token [ i ] . s . token_type )
-            {
-            case nt_X:
-            case nt_Y:
-            case nt_T:
-            case nt_L:
-                rslt->elem_count = parse_decimal ( rslt -> data -> base,
-                    name + token [ i ] . s . position, token [ i ] . s . length );
-                return 0;
-            case nt_Q : rslt->elem_count = parse_Q ( rslt -> data -> base,
-                    name + token [ i ] . s . position, token [ i ] . s . length,
-                    self -> coordinate );
-                return 0;
-            }
-        }
-    }
-
-    rslt->elem_count = 0;
-    return 0;
-}
-
-static
-void CC sraxf_extract_name_coord_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-VTRANSFACT_IMPL ( NCBI_SRA_extract_name_coord, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    self_t* Self;
-
-    assert( cp->argc >= 1 );
-
-    Self = malloc( sizeof( self_t ) );
-    if ( Self == NULL ) return RC( rcSRA, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    Self->coordinate = cp->argv[0].data.u16[0];
-    Self->position = 1;
-    rslt->self = Self;
-    rslt->whack = sraxf_extract_name_coord_wrapper;
-
-    rslt->variant = vftRow;
-    rslt->u.rf = extract_name_coordinate;
-
-    return 0;
-}
diff --git a/libs/sraxf/extract-name_fmt.c b/libs/sraxf/extract-name_fmt.c
deleted file mode 100644
index b32a54a..0000000
--- a/libs/sraxf/extract-name_fmt.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <kdb/index.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include "name-tokenizer.h"
-
-#include <string.h>
-
-/* extract_name_fmt
- *  generates input to .NAME_FMT column and/or updates skey index
- *
- *  on NCBI:SRA:name_token:unrecognized, produces an empty row
- *  otherwise, it creates a temporary "name_fmt" string from name row
- *
- *  an attempt is made to insert name_fmt into indicated text index
- *  ( normally 'skey' ). if the insert succeeds, i.e. associates "name_fmt"
- *  with a row_id, then the output for the row is empty.
- *
- *  if the insert fails due to key duplication, an attempt is made to
- *  extend the id range of associated rows. depending upon the type of index,
- *  this may succeed or fail, e.g. if the existing row range for "name_fmt" is
- *  n..m where m = row_id - 1, the range can be extended to n..row_id and
- *  the update succeeds. if the index supports discontiguous id ranges, the
- *  update will also succeed. upon any success updating the index, the output
- *  row will be empty.
- *
- *  finally, if the temporary "name_fmt" cannot be inserted into the index
- *  nor the existing id range updated, the output for the row will be "name_fmt".
- *
- *  "name" [ DATA ] - raw spot names from NAME column
- *
- *  "tok" [ DATA ] - delimiting tokens produced by sub-table
-function ascii
-    NCBI:SRA:extract_name_fmt #1 < ascii skey > ( ascii name, NCBI:SRA:spot_name_token tok );
- */
-
-static
-rc_t extract_name_fmt_2 (KIndex *ndx, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, const char *name, uint32_t namelen, const spot_name_token_t *tokens, uint32_t N )
-{
-    rc_t rc;
-    bool recognized;
-    uint32_t i, j, toksize, fmtsize, numtok;
-    char sbuf[4096], *name_fmt = sbuf;
-
-    for ( recognized = false, i = j = numtok = toksize = 0; i != N; ++i)
-    {
-        switch (tokens[i].s.token_type)
-        {
-        case nt_unrecognized:
-            /* should be a single token, but in any event we don't care */
-            return 0;
-        case nt_recognized:
-            /* should be a single token, but we'll check below */
-            recognized = true;
-            break;
-	case nt_Q:
-	case nt_X:
-	case nt_Y:
-            /* we should recognize the token */
-            if ( tokens [ i ] . s . token_type >= nt_max_token )
-                return RC ( rcSRA, rcToken, rcPositioning, rcName, rcOutofrange );
-
-            /* enforce serial order of tokens */
-            if ( tokens [ i ] . s . position < j )
-                return RC ( rcSRA, rcToken, rcPositioning, rcName, rcInvalid );
-            j = tokens [ i ] . s . position + tokens [ i ] . s . length;
-
-            /* accumulate total size to be removed */
-            toksize += tokens [ i ] . s . length;
-	    numtok++;
-
-            /* enforce that no token extends beyond end of name */
-            if ( j > namelen )
-                return RC ( rcSRA, rcToken, rcPositioning, rcName, rcOutofrange );
-	    break;
-        default: /*** exclude from computation ***/
-		break;
-        }
-    }
-
-    /* token stream cannot contain BOTH recognized and coordinates */
-    if ( recognized && toksize != 0 )
-        return RC ( rcSRA, rcToken, rcPositioning, rcName, rcInvalid );
-
-    /* token stream must contain at least recognized or a non-empty coordinate */
-    if ( ! recognized && toksize == 0 )
-        return RC ( rcSRA, rcToken, rcPositioning, rcName, rcInvalid );
-
-    /* calculate name_fmt buffer size */
-    fmtsize = ( recognized ? namelen : namelen - toksize + numtok + numtok ) + 1;
-
-    /* if local buffer is insufficient, allocate directly in output KDataBuffer */
-    rslt -> data -> elem_bits = 8;
-    if ( fmtsize > sizeof sbuf )
-    {
-        rc = KDataBufferResize ( rslt -> data, fmtsize );
-        if ( rc != 0 )
-            return rc;
-        name_fmt = rslt -> data -> base;
-    }
-
-    /* create NUL-terminated formatted string */
-    if ( recognized )
-        string_copy ( name_fmt, fmtsize --, name, namelen );
-    else
-    {
-        uint32_t total;
-        for ( i = j = total = 0; i < N; ++i )
-        {
-            switch( tokens[i].s.token_type ) {
-                case nt_Q:
-                case nt_X:
-                case nt_Y:
-                    {{
-                    uint32_t pos = tokens [ i ] . s . position;
-                    toksize = tokens [ i ] . s . length;
-
-                    /* detect unrecognized tokens to left */
-                    if ( pos > j )
-                    {
-                        /* copy them in, NUL-terminating */
-                        total += (uint32_t)string_copy ( & name_fmt [ total ],
-                            fmtsize - total, & name [ j ], pos - j );
-                    }
-
-                    /* move marker along */
-                    j = pos + toksize;
-
-                    /* insert symbol */
-                    name_fmt[total + 0] = '$';
-                    name_fmt[total + 1] = TOK_ALPHABET[tokens[i].s.token_type];
-                    name_fmt[total + 2] = 0;
-                    total += 2;
-                    }}
-                    break;
-                default:
-                    break;
-            }
-        }
-
-        /* detect unrecognized tokens to right */
-        if ( j < namelen )
-        {
-            string_copy ( & name_fmt [ total ],
-                fmtsize - total, & name [ j ], namelen - j );
-        }
-    }
-
-    /* attempt to insert into index */
-    rc = KIndexInsertText ( ndx, false, name_fmt, row_id );
-    if ( rc != 0 )
-    {
-        /* insert failed for whatever reason - return name_fmt */
-        fmtsize = strlen(name_fmt);
-        if ( name_fmt == sbuf )
-        {
-            rc = KDataBufferResize ( rslt -> data, fmtsize );
-            if ( rc != 0 )
-                return rc;
-            memcpy ( rslt -> data -> base, name_fmt, fmtsize );
-        }
-
-        rslt -> elem_count = fmtsize;
-    }
-
-    return 0;
-}
-
-static
-rc_t CC extract_name_fmt( void *self, const VXformInfo *info, int64_t row_id,
-                       VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    const char *name;
-    uint32_t num_tokens, name_len;
-    const spot_name_token_t *tokens;
-
-    tokens = argv [ 1 ] . u . data . base;
-    num_tokens = argv [ 1 ] . u . data . elem_count;
-    tokens += argv [ 1 ] . u . data . first_elem;
-
-    rslt -> elem_count = 0;
-    if ( num_tokens == 0 )
-        return 0;
-
-    name = argv [ 0 ] . u . data . base;
-    name_len = argv [ 0 ] . u . data . elem_count;
-    name += argv [ 0 ] . u . data . first_elem;
-
-    return extract_name_fmt_2(self, info, row_id, rslt,
-        name, name_len, tokens, num_tokens);
-}    
-
-VTRANSFACT_IMPL ( NCBI_SRA_extract_name_fmt, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    KIndex *ndx;
-    
-    rc = VTableCreateIndex ( ( VTable* ) info -> tbl, &ndx, kitText | kitProj, kcmOpen,
-                             "%.*s", cp->argv[0].count, cp->argv[0].data.ascii );
-    if( rc == 0 ) {
-        rslt->self = ndx;
-        rslt->whack = ( void ( CC * ) ( void* ) ) KIndexRelease;
-        rslt->variant = vftNonDetRow;
-        rslt->u.ndf = extract_name_fmt;
-    }    
-    return rc;
-}
diff --git a/libs/sraxf/extract-spot_name.c b/libs/sraxf/extract-spot_name.c
deleted file mode 100644
index 9e53524..0000000
--- a/libs/sraxf/extract-spot_name.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include "name-tokenizer.h"
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-
-/* extract_spot_name
- *  generates input to .SPOT_NAME column
- *
- *  on NCBI:SRA:name_token:unrecognized, produces the entire spot name row
- *  otherwise, produces an empty row
- *
- *  "name" [ DATA ] - raw spot names from NAME column
- *
- *  "tok" [ DATA ] - delimiting tokens produced by sub-table
-function ascii
-    NCBI:SRA:extract_spot_name #1 ( ascii name, NCBI:SRA:spot_name_token tok );
- */
-
-#define NAM 0
-#define TOK 1
-
-static
-rc_t CC extract_spot_name ( void *self, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    uint32_t i;
-    bool name_copy;
-
-    const spot_name_token_t *token = argv [ TOK ] . u . data . base;
-    uint32_t num_tokens = argv [ TOK ] . u . data . elem_count;
-    token += argv [ TOK ] . u . data . first_elem;
-
-    for ( name_copy = false, i = 0; i < num_tokens; ++ i )
-    {
-        if ( token [ i ] . s . token_type == nt_unrecognized )
-        {
-            name_copy = true;
-            break;
-        }
-    }
-
-    rslt -> elem_count = 0;
-    rslt -> data -> elem_bits = 8;
-
-    if ( name_copy || num_tokens == 0 )
-    {
-        const char *name = argv [ NAM ] . u . data . base;
-        uint32_t name_len = argv [ NAM ] . u . data . elem_count;
-
-        rc_t rc = KDataBufferResize ( rslt -> data, name_len );
-        if ( rc != 0 )
-            return rc;
-
-        memcpy ( rslt -> data -> base, name += argv [ NAM ] . u . data . first_elem, name_len );
-        rslt -> elem_count = name_len;
-    }
-
-    return 0;
-}
-
-VTRANSFACT_IMPL ( NCBI_SRA_extract_spot_name, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftRow;
-    rslt->u.rf = extract_spot_name;
-    
-    return 0;
-}
diff --git a/libs/sraxf/fix_read_seg_impl.h b/libs/sraxf/fix_read_seg_impl.h
deleted file mode 100644
index 977485f..0000000
--- a/libs/sraxf/fix_read_seg_impl.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/* READ_SEG was engineered to be capable of holding
-   any sort of read description, including out-of-order,
-   non-contiguous, gapped or overlapped segments.
-
-   This property was never used, and READ_SEG is by now
-   obsolete, so we can count on it being used as a sort
-   of READ_LEN where the starts represent an integration
-   of the lengths, i.e. all segments are in order and
-   contiguous. */
-#define READ_SEGS_ALWAYS_CONTIGUOUS 1
-
-static void fix_read_seg_impl(const uint16_t *rs_src, uint32_t nreads,
-    uint32_t spot_len, uint32_t * rs_dst)
-{
-    const uint32_t nreads2 = nreads + nreads;
-        uint32_t i, total;
-
-        assert(rs_src && rs_dst);
-
-#if READ_SEGS_ALWAYS_CONTIGUOUS
-        /* first, check the stated bases within the read-seg */
-        for ( i = 1, total = 0; i < nreads2; i += 2 )
-            total += rs_src [ i ];
-
-        /* if there are no bases reported, just divide the
-           spot_len by the number of reads and rewrite */
-        if ( total == 0 )
-        {
-            /* if there is a single read, fix it */
-            if ( nreads == 1 )
-            {
-                rs_dst [ 0 ] = 0;
-                rs_dst [ 1 ] = spot_len;
-            }
-            else
-            {
-                double fstart = 0;
-                double flen = ( double ) spot_len / nreads;
-                for ( i = total = 0; i < nreads2; fstart += flen, i += 2 )
-                {
-                    long int start = lround ( fstart );
-                    long int end = lround ( fstart + flen );
-                    if ( start >= ( long int ) spot_len )
-                    {
-                        rs_dst [ i ] = spot_len;
-                        rs_dst [ i + 1 ] = 0;
-                    }
-                    else
-                    {
-                        if ( end > ( long int ) spot_len )
-                            end = ( long int ) spot_len - start;
-                        else
-                            end -= start;
-
-                        rs_dst [ i ] = ( uint32_t ) start;
-                        rs_dst [ i + 1 ] = ( uint32_t ) end;
-                    }
-
-                    total += rs_dst [ i + 1 ];
-                }
-
-                assert ( total == spot_len );
-            }
-        }
-
-        /* have the right number of bases - just rewrite starts */
-        else if ( total == spot_len )
-        {
-            for ( i = total = 0; i < nreads2; i += 2 )
-            {
-                rs_dst [ i ] = total;
-                total += ( rs_dst [ i + 1 ] = rs_src [ i + 1 ] );
-            }
-        }
-
-        /* have too many bases - trust all up to limit */
-        else if ( total > spot_len )
-        {
-            for ( i = total = 0; i < nreads2; i += 2 )
-            {
-                rs_dst [ i ] = total;
-                total += ( rs_dst [ i + 1 ] = rs_src [ i + 1 ] );
-                if ( total > spot_len )
-                {
-                    total = spot_len;
-                    rs_dst [ i + 1 ] = total - rs_dst [ i ];
-                }
-            }
-        }
-
-        /* too few bases - trust all but last */
-        else
-        {
-            for ( i = 0; i < nreads2; i += 2 )
-                rs_dst [ i + 1 ] = rs_src [ i + 1 ];
-
-            for ( ; total < spot_len && i != 0; )
-            {
-                uint32_t remaining = spot_len - total;
-                i -= 2;
-                rs_dst [ i + 1 ] += remaining;
-                total += remaining;
-            }
-
-            for ( i = 0, total = 0; i < nreads2; i += 2 )
-            {
-                rs_dst [ i ] = total;
-                total += rs_dst [ i + 1 ];
-            }
-        }
-#else
-        /* loop increments by 2
-           where the read start is even, read length odd */
-        for ( i = total = 0; i < nreads2; i += 2 )
-        {
-            /* is start greater than max? */
-            if ( rs_src [ i ] >= spot_len )
-            {
-                /* clip start to end */
-                rs_dst [ i ] = spot_len;
-                /* zero length read */
-                rs_dst [ i + 1 ] = 0;
-            }
-            /* is end greater than max? */
-            else if ( rs_src [ i ] + rs_src [ i + 1 ] > spot_len )
-            {
-                /* keep start */
-                rs_dst [ i ] = rs_src [ i ];
-                /* clip length to end */
-                rs_dst [ i + 1 ] = spot_len - rs_src [ i ];
-            }
-            else
-            {
-                /* copy existing segment */
-                rs_dst [ i ]   = rs_src [ i ];
-                rs_dst [ i + 1 ] = rs_src [ i + 1 ];
-            }
-
-            /* sum total length */
-            total += rs_src [ i + 1 ];
-        }
-#endif
-}
diff --git a/libs/sraxf/format-spot-name.c b/libs/sraxf/format-spot-name.c
deleted file mode 100644
index bb7d6c3..0000000
--- a/libs/sraxf/format-spot-name.c
+++ /dev/null
@@ -1,333 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <vdb/xform.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include "name-tokenizer.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <ctype.h>
-#include <os-native.h>
-
-/* format_spot_name ( ascii name_fmt, I32 X, I32 Y * ascii spot_name );
- *  given a name format string, X, and Y
- *  produce a reconstructed spot name string
- *
- *  "name_fmt" [ DATA ] - name format string ( see format explanation below )
- *
- *  "X" [ DATA ] - X coordinate for spot
- *
- *  "Y" [ DATA ] - Y coordinate for spot
- *
- *  "spot_name" [ DATA, OPTIONAL ] - potential source of unformatted names
- *
- * SYNOPSIS:
- *  "name_fmt" may have any ASCII characters
- *  the special character '$' is an escape symbol
- *  when followed by a recognized format character,
- *  both the '$' and its format character will be
- *  replaced with a numeral generated from X and/or Y.
- *
- *  when "spot_name" is present and the "name_fmt" row is empty,
- *  output is taken verbatim from "spot_name"
- *
- * FORMAT:
- *  'X' ( or 'x' ) = substitute with a decimal representation for X
- *  'Y' ( or 'y' ) = substitute with a decimal representation for Y
- *  'Q' ( or 'q' ) = calculate 454-style base-36 representation
- *                   for both X and Y
- */
-static
-rc_t CC format_spot_name ( void *self,
-    const VXformInfo *info, int64_t row_id, VRowResult *rslt,
-    uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    char *name;
-    uint32_t elem_count;
-    KDataBuffer *dst = rslt -> data;
-
-    if ( dst -> elem_bits != 8 )
-    {
-        rc = KDataBufferCast ( dst, dst, 8, true );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* check for NAME_FMT */
-    if ( argv [ 0 ] . u. data . elem_count != 0 )
-    {
-        size_t num_writ;
-        char sname[1024]; /** name on stack **/
-        const char *name_fmt = ((char*)argv[0].u.data.base) + argv[0].u.data.first_elem;
-        uint32_t i, j, x, y;
-        const uint32_t fmt_size = argv [ 0 ] . u . data . elem_count;
-
-        /* the coordinates to substitute */
-        x = ( ( const int32_t* ) argv [ 1 ] . u . data . base )
-            [ argv [ 1 ] . u . data . first_elem ];
-        y = ( ( const int32_t* ) argv [ 2 ] . u . data . base )
-            [ argv [ 2 ] . u . data . first_elem ];
-
-        for ( i=j=0; i < fmt_size -1;){
-            if( name_fmt [ i ] == '$' ){
-                switch( name_fmt [ i+1 ]){
-                case 'x': case 'X':
-                    if( j > sizeof(sname) - 11){
-    					return RC ( rcXF, rcFunction, rcDecoding, rcBuffer, rcInsufficient );
-                    } else {
-                        i+=2;
-                        if( i < fmt_size -1 && name_fmt [ i ] == '%' && isdigit(name_fmt [ i+1 ])) {
-                            x += 24*1024*(name_fmt [ i+1 ]-'0');
-                            i+=2;
-                        }
-                        j+=sprintf(sname+j,"%d",x);
-                    }
-                    break;
-                case 'y': case 'Y':
-                    if( j > sizeof(sname) - 11){
-    					return RC ( rcXF, rcFunction, rcDecoding, rcBuffer, rcInsufficient );
-                    } else {
-                        i+=2;
-                        if( i < fmt_size -1 && name_fmt [ i ] == '%' && isdigit(name_fmt [ i+1 ])) {
-                            y += 24*1024*(name_fmt [ i+1 ]-'0');
-                            i+=2;
-                        }
-                        j+=sprintf(sname+j,"%d",y);
-                    }
-                    break;
-                case 'q': case 'Q':
-                    if( j > sizeof(sname) - 5) {
-    					return RC ( rcXF, rcFunction, rcDecoding, rcBuffer, rcInsufficient );
-                    } else if( y > 0xFFF) {
-                        return RC ( rcXF, rcFunction, rcDecoding, rcRange, rcTooBig);
-                    } else {
-                        uint32_t q= x << 12 | y;
-                        sname[j+4]=Q_ALPHABET[q % 36]; q /= 36;
-                        sname[j+3]=Q_ALPHABET[q % 36]; q /= 36;
-                        sname[j+2]=Q_ALPHABET[q % 36]; q /= 36;
-                        sname[j+1]=Q_ALPHABET[q % 36]; q /= 36;
-                        sname[j]  =Q_ALPHABET[q];
-                        j+=5;
-                        i+=2;
-                    }
-                    break;
-		 case 'r': case 'R':
-            rc = string_printf ( & sname [ j ], sizeof sname - j, & num_writ, "%ld", row_id );
-            assert ( rc == 0 );
-            j += ( uint32_t ) num_writ;
-		    i+=2;
-		    break;
-                default:
-                    sname[j++]=name_fmt[i++];
-                    break;
-                }
-            } else {
-                if(j < sizeof(sname)){
-                    sname[j++]=name_fmt[i++];
-                } else {
-                    return RC ( rcXF, rcFunction, rcDecoding, rcBuffer, rcInsufficient );
-                }
-            }
-            if( j > sizeof(sname)-1){	
-                return RC ( rcXF, rcFunction, rcDecoding, rcBuffer, rcInsufficient );
-            }
-        }
-        if(i==fmt_size -1) {
-            if(j < sizeof(sname)){
-                sname[j++]=name_fmt[i++];
-            } else {
-                return RC ( rcXF, rcFunction, rcDecoding, rcBuffer, rcInsufficient );
-            }
-        }
-        
-        /* j is our new element count **/
-        elem_count = j;
-
-        /* resize output */
-        if ( dst -> elem_count <= elem_count )
-        {
-            rc = KDataBufferResize ( dst, elem_count);
-            if ( rc != 0 )
-                return rc;
-        }
-        
-        /* the output name */
-        name = dst -> base;
-        
-        memcpy ( name, sname, elem_count );
-        rslt -> elem_count = elem_count;
-        return 0;
-    }
-
-    /* check for NAME */
-    if( argc == 4 && argv[3].u.data.elem_count != 0 ) {
-        const char *sname = ((char*)argv[3].u.data.base) + argv[3].u.data.first_elem;
-        /* output size */
-        elem_count = argv[3].u.data.elem_count;
-
-        /* resize output */
-        if( dst -> elem_count <= elem_count ) {
-            rc = KDataBufferResize( dst, elem_count + 1 );
-            if( rc != 0 )
-                return rc;
-        }
-        name = dst->base;
-        memcpy(dst->base, sname, elem_count);
-        rslt->elem_count = elem_count;
-        name[elem_count] = 0;
-        return 0;
-    }
-
-    /* spot has no name */
-    return RC ( rcSRA, rcColumn, rcReading, rcRow, rcNull );
-}
-static
-rc_t CC format_spot_name_no_coord ( void *self,
-    const VXformInfo *info, int64_t row_id, VRowResult *rslt,
-    uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    char *name;
-    uint32_t elem_count;
-    KDataBuffer *dst = rslt -> data;
-
-    if ( dst -> elem_bits != 8 )
-    {
-        rc = KDataBufferCast ( dst, dst, 8, true );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* check for NAME_FMT */
-    if ( argv [ 0 ] . u. data . elem_count != 0 )
-    {
-        size_t num_writ;
-        char sname[1024]; /** name on stack **/
-        const char *name_fmt = ((char*)argv[0].u.data.base) + argv[0].u.data.first_elem;
-        uint32_t i, j;
-        const uint32_t fmt_size = argv [ 0 ] . u . data . elem_count;
-
-        for ( i=j=0; i < fmt_size -1;){
-            if( name_fmt [ i ] == '$' ){
-                switch( name_fmt [ i+1 ]){
-		 case 'r': case 'R':
-            rc = string_printf ( & sname [ j ], sizeof sname - j, & num_writ, "%ld", row_id );
-            assert ( rc == 0 );
-		    j += ( uint32_t ) num_writ;
-		    i+=2;
-		    break;
-                default:
-                    sname[j++]=name_fmt[i++];
-                    break;
-                }
-            } else {
-                if(j < sizeof(sname)){
-                    sname[j++]=name_fmt[i++];
-                } else {
-                    return RC ( rcXF, rcFunction, rcDecoding, rcBuffer, rcInsufficient );
-                }
-            }
-            if( j > sizeof(sname)-1){	
-                return RC ( rcXF, rcFunction, rcDecoding, rcBuffer, rcInsufficient );
-            }
-        }
-        if(i==fmt_size -1) {
-            if(j < sizeof(sname)){
-                sname[j++]=name_fmt[i++];
-            } else {
-                return RC ( rcXF, rcFunction, rcDecoding, rcBuffer, rcInsufficient );
-            }
-        }
-        
-        /* j is our new element count **/
-        elem_count = j;
-
-        /* resize output */
-        if ( dst -> elem_count <= elem_count )
-        {
-            rc = KDataBufferResize ( dst, elem_count);
-            if ( rc != 0 )
-                return rc;
-        }
-        
-        /* the output name */
-        name = dst -> base;
-        
-        memcpy ( name, sname, elem_count );
-        rslt -> elem_count = elem_count;
-        return 0;
-    }
-
-    /* check for NAME */
-    if( argc == 2 && argv[1].u.data.elem_count != 0 ) {
-        const char *sname = ((char*)argv[1].u.data.base) + argv[1].u.data.first_elem;
-        /* output size */
-        elem_count = argv[1].u.data.elem_count;
-
-        /* resize output */
-        if( dst -> elem_count <= elem_count ) {
-            rc = KDataBufferResize( dst, elem_count + 1 );
-            if( rc != 0 )
-                return rc;
-        }
-        name = dst->base;
-        memcpy(dst->base, sname, elem_count);
-        rslt->elem_count = elem_count;
-        name[elem_count] = 0;
-        return 0;
-    }
-
-    /* spot has no name */
-    return RC ( rcSRA, rcColumn, rcReading, rcRow, rcNull );
-}
-/*
- * extern function ascii INSDC:SRA:format_spot_name #1 ( ascii name_fmt, I32 X, I32 Y * ascii spot_name );
- */
-VTRANSFACT_IMPL ( INSDC_SRA_format_spot_name, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt -> u . rf = format_spot_name;
-    rslt -> variant = vftRow;
-    return 0;
-}
-
-
-VTRANSFACT_IMPL ( INSDC_SRA_format_spot_name_no_coord, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt -> u . rf = format_spot_name_no_coord;
-    rslt -> variant = vftRow;
-    return 0;
-}
-
diff --git a/libs/sraxf/fpcodec.c b/libs/sraxf/fpcodec.c
deleted file mode 100644
index 8cd643a..0000000
--- a/libs/sraxf/fpcodec.c
+++ /dev/null
@@ -1,267 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <vdb/vdb-priv.h>
-#include <klib/data-buffer.h>
-#include <klib/pack.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <endian.h>
-#include <byteswap.h>
-#include <string.h>
-#include <zlib.h>
-#include <assert.h>
-#include <math.h>
-
-static
-rc_t
-hufDecodeBytes_zlib(void *dst, size_t dsize, bitsz_t *psize, const void *src, bitsz_t ssize)
-{
-    int result;
-    rc_t rc;
-	z_stream c_stream; /* decompression stream */
-
-	memset(&c_stream,0,sizeof(c_stream));
-
-	c_stream.next_in   = (Bytef*)src;
-	c_stream.next_out  = (Bytef*)dst;
-	c_stream.avail_in  = (uInt)( ( ssize + 7 ) >> 3 );
-	c_stream.avail_out = (uInt)dsize;
-
-	if (psize)
-        *psize = 0;
-
-    result = inflateInit(&c_stream);
-    switch (result)
-    {
-    case Z_OK:
-            
-        result = inflate ( & c_stream, Z_FINISH );
-        switch (result)
-        {
-        case Z_STREAM_END:
-                
-            result = inflateEnd ( & c_stream );
-            if ( result == Z_OK )
-            {
-                if ( psize != NULL )
-                    * psize = c_stream.total_out << 3;
-                return 0;
-            }
-            return RC ( rcXF, rcFunction, rcDecoding, rcParam, rcInvalid );
-                
-        case Z_OK:
-        case Z_BUF_ERROR:
-            rc = RC (rcXF, rcFunction, rcDecoding, rcBuffer, rcInsufficient );
-            break;
-
-        case Z_NEED_DICT:
-        case Z_DATA_ERROR:
-            rc = RC (rcXF, rcFunction, rcDecoding, rcData, rcCorrupt);
-            break;
-        
-        case Z_MEM_ERROR:
-            rc = RC(rcXF, rcFunction, rcDecoding, rcMemory, rcExhausted);
-            break;
-        
-        case Z_STREAM_ERROR:
-        default:
-            rc = RC (rcXF, rcFunction, rcDecoding, rcNoObj, rcUnexpected);
-            break;
-        }
-
-        inflateEnd ( & c_stream );
-        break;
-            
-    case Z_MEM_ERROR:
-        rc = RC(rcXF, rcFunction, rcDecoding, rcMemory, rcExhausted);
-        break;
-            
-    case Z_VERSION_ERROR:
-    default:
-        rc = RC (rcXF, rcFunction, rcDecoding, rcNoObj, rcUnexpected);
-        break;
-    }
-
-    return rc;
-}
-
-
-typedef struct {
-	uint8_t 	mbits;/* mantissa bits to keep */
-	uint8_t		sign; /* if set then mantissa is signed */
-	uint8_t		version;
-    uint8_t     exp_not_compressed;
-} fp_trunc_key;
-
-typedef struct {
-	uint32_t	count;
-	fp_trunc_key cmn;
-} fp_trunc_key_v0;
-
-typedef struct {
-	uint64_t	count;
-	fp_trunc_key cmn;
-} fp_trunc_key_v1;
-
-static
-rc_t CC fp_extend ( void *self, const VXformInfo *info,
-    VLegacyBlobResult *rslt, const KDataBuffer *in )
-{
-    rc_t rc;
-    bitsz_t bsize;
-    uint64_t i, count;
-    uint32_t count32;
-    size_t tmpsize, psize;
-
-    int32_t *dst;
-    int8_t  *dexp;
-
-    KDataBuffer *out = rslt -> dst;
-    uint32_t keep = ( uint32_t ) ( size_t ) self;
-
-    fp_trunc_key tkey;
-    size_t ssize = KDataBufferBytes ( in );
-    const uint8_t *src = in -> base;
-
-    if(ssize < sizeof(tkey))
-        return RC(rcXF, rcFunction, rcUnpacking, rcData, rcUnexpected);
-    ssize -= sizeof(tkey); 
-    memcpy(&tkey,src+ssize,sizeof(tkey));
-
-    if(tkey.mbits > 24 || tkey.mbits > keep) 
-        return RC(rcXF, rcFunction, rcUnpacking, rcData, rcUnexpected);
-
-    switch ( tkey . version )
-    {
-    case 0:
-        if ( ssize < sizeof count32 )
-            return RC(rcXF, rcFunction, rcUnpacking, rcData, rcUnexpected);
-        ssize -= sizeof count32;
-        memcpy ( & count32, src+ssize, sizeof count32 );
-        count = count32;
-        break;
-    case 1:
-        if ( ssize < sizeof count )
-            return RC(rcXF, rcFunction, rcUnpacking, rcData, rcUnexpected);
-        ssize -= sizeof count;
-        memcpy ( & count, src+ssize, sizeof count );
-        break;
-    default:
-        return RC ( rcXF, rcFunction, rcUnpacking, rcBlob, rcBadVersion );
-    }
-
-    psize = ( ( (size_t)count * tkey.mbits + 7 ) >> 3 );
-    if(psize > ssize)
-        return RC(rcXF, rcFunction, rcUnpacking, rcData, rcUnexpected);
-
-    out -> elem_bits = 32;
-    rc = KDataBufferResize ( out, (uint32_t)count );
-    if ( rc != 0 )
-        return rc;
-
-    dst = out -> base;    
-
-    /* unpack mantissa */
-    rc = Unpack ( tkey.mbits, 32, src, 0, (bitsz_t)( count * tkey.mbits ), 
-		          NULL, dst, KDataBufferBytes ( out ), & tmpsize );
-    if ( rc != 0 )
-        return rc;
-
-    assert ( KDataBufferBytes ( out ) == tmpsize );
-
-    rslt -> byte_order = vboNative;
-    ssize -= psize;
-        
-    dexp = malloc( (size_t)count );
-    if(dexp==NULL)
-        return RC(rcXF, rcFunction, rcUnpacking, rcMemory, rcExhausted);
-
-    if ( tkey.exp_not_compressed )
-        memcpy( dexp, src+psize, (size_t)count );
-    else
-        /*** uncompress the exponent ***/
-        rc = hufDecodeBytes_zlib( dexp, (size_t)count, &bsize, src+psize, ssize << 3 );
-
-    if(rc == 0)
-    {
-        float *fdst;
-
-        /* combine mantissa and exponent */
-        if(tkey.sign==0)
-        {
-            for (fdst=(float*)dst, i = 0; i < count; ++ i )
-                fdst[i]=ldexpf(dst[i],dexp[i]-tkey.mbits);/*** the highest bit is not a sign ***/
-        }
-        else
-        {
-            uint32_t sign_extend= ~((1<<(tkey.mbits-1))-1);
-            for (fdst=(float*)dst, i = 0; i < count; ++ i )
-            {
-                if(dst[i]&sign_extend)
-                {
-                    float m=(float)(int)(dst[i]|sign_extend);
-                    fdst[i]=ldexpf(m,dexp[i]-tkey.mbits+1);
-                }
-                else
-                {
-                    float m=(float)dst[i];
-                    fdst[i]=ldexpf(m,dexp[i]-tkey.mbits+1);
-                }
-            }
-        }
-    }
-
-    free(dexp);
-    
-    return rc;
-}
-
-/* F32 NCBI:fp_extend #1.0 < U32 bits > ( NCBI:fp_encoded_t in );
- */
-VTRANSFACT_IMPL ( NCBI_fp_extend, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    VNoHdrBlobFunc f = fp_extend;
-
-    /* test bit range */
-    uint32_t bits = cp -> argv [ 0 ] . data . u32 [ 0 ];
-    if ( bits < 1 || bits > 23 )
-        return RC ( rcVDB, rcFunction, rcConstructing, rcRange, rcIncorrect );
-
-    /* pass bits to function */
-    rslt -> self = ( void* ) ( size_t ) bits;
-    rslt -> u . bf = ( VBlobFunc ) f;
-    rslt -> variant = vftLegacyBlob;
-
-    return 0;
-}
diff --git a/libs/sraxf/index_lookup.c b/libs/sraxf/index_lookup.c
deleted file mode 100644
index 5a4b305..0000000
--- a/libs/sraxf/index_lookup.c
+++ /dev/null
@@ -1,270 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <vdb/vdb-priv.h>
-#include <kdb/index.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/pbstree.h>
-#include <klib/log.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-
-#include <assert.h>
-
-typedef struct tag_self_t {
-    const       KIndex *ndx;
-    char        query_key[1024];
-    uint32_t    query_key_len;
-    uint8_t     name_fmt_version;
-    const struct VCursorParams * parms;
-    uint32_t    elem_bits;
-} self_t;
-
-static void CC self_whack( void *Self )
-{
-    self_t *self = Self;
-    
-    KIndexRelease( self->ndx );
-    free( self );
-}
-
-typedef struct FindFmtDataXtra{
-        int32_t x;
-        int32_t y;
-}FindFmtDataXtra;
-
-static int CC SRAPTNodeFindFmt ( const void *item, const struct PBSTNode *n, void *data )
-{
-    int i,j;
-    FindFmtDataXtra *u=(FindFmtDataXtra *)data;
-    /* compare the remainder of the key */
-    const String *rem = item;
-    const char* q=rem->addr; /** query **/
-    const char* db=n->data.addr; /** database **/
-
-    for(i=j=0;q[i]!=0 && db[j]!= 0;){
-        if(q[i] == db[j]){
-                i++;j++;
-        } else if(db[j] == '$'){
-                switch(db[j+1]){
-		 case 'q':
-                 case 'Q':
-		 {
-			int k;
-			uint32_t xy=0;
-			j+=2;
-			for(k=0;k<5 && q[i]!=0;k++,i++){
-				xy *= 36;
-				if(isdigit(q[i])){
-					xy += q[i] - '0' + 26;
-				} else if(isalpha(q[i])){
-					xy += toupper(q[i]) - 'A';
-				}
-			}
-			if(u){
-				u->x = xy >> 12;
-				u->y = xy &0xFFF;
-			}
-	       		break;
-		 }
-                 case 'x':
-                 case 'X':
-                        if(u) u->x=atoi(q+i);
-                        j+=2;
-                        while(isdigit(q[i]))i++;
-			if(q[i]=='%' && isdigit(q[i+1])){
-				u->x += 24*1024*(q[i+1]-'0');
-				j+=2;
-			}
-                        break;
-                 case 'y':
-                 case 'Y':
-                        if(u) u->y=atoi(q+i);
-                        j+=2;
-                        while(isdigit(q[i]))i++;
-			if(q[i]=='%' && isdigit(q[i+1])){
-				u->y += 24*1024*(q[i+1]-'0');
-				j+=2;
-			}
-                        break;
-                 default:
-                        return  q[i]-db[j];
-                        break;
-                }
-        } else {
-                break;
-        }
-    }
-    return  q[i]-db[j];
-}
-
-
-static
-rc_t CC index_lookup_impl(
-                          void *Self,
-                          const VXformInfo *info,
-                          int64_t row_id,
-                          VRowResult *rslt,
-                          uint32_t argc,
-                          const VRowData argv[]
-                          )
-{
-    rc_t rc;
-    const self_t *self = Self;
-    KDataBuffer *query_buf=NULL;
-    char	query[1024];
-    uint64_t id_count;
-    int64_t start_id;
-    FindFmtDataXtra fxdata={0,0};
-    struct {
-        uint64_t start_id;
-        uint64_t id_count;
-        uint64_t x;
-        uint64_t y;
-    } out;
-    
-    rc = VCursorParamsGet(self->parms,self->query_key,&query_buf);
-    if (GetRCState(rc) == rcNotFound && GetRCObject(rc) == rcName) {
-	rslt->elem_count = 0;
-	rslt->no_cache = 1;
-	return 0;
-    }
-    if(rc == 0){
-        char    *qptr=((char*)query_buf->base)+(query_buf->bit_offset >>3);
-        uint32_t qlen=query_buf->elem_count;
-        
-        if(argc > 0){
-            char *   pptr=((char*)argv[0].u.data.base) + argv[0].u.data.first_elem;
-            uint32_t plen=argv[0].u.data.elem_count;
-            while(plen > 0 &&  qlen > 0 && *pptr == *qptr){
-                pptr++;
-                qptr++;
-                plen--;
-                qlen--;
-            }
-            if(plen > 0) rc = RC ( rcVDB,rcIndex,rcSearching,rcData,rcNotFound);
-        }
-        if( rc == 0){
-            memcpy(query,qptr,qlen);
-            query[query_buf->elem_count]='\0';
-            if( self -> name_fmt_version == 1){ /*** this is a strange slx format name - very first implementation ***/
-                int lane=-1,tile=-1,x=-1,y=-1;
-                qptr=query;
-                if(*qptr == ':'){ qptr++;qlen--;}
-                sscanf(qptr,"%d:%d:%d:%d",&lane,&tile,&x,&y);
-                if(lane < 0 || lane > 0xF || tile < 0 || tile > 0xFFF || x < 0 || x > 0xFFF || y < 0 || y > 0xFFF){
-                    rc = RC ( rcVDB,rcIndex,rcSearching,rcData,rcNotFound);
-                } else {
-                    sprintf(query,"%1X%03X%03X%03X",lane,tile,x,y);
-                }
-            }
-            if(rc == 0 ) {
-                if( self -> name_fmt_version  >= 2) /*** X and Y are present ***/
-                    rc = KIndexFindText(self->ndx, query, &start_id, &id_count,SRAPTNodeFindFmt,&fxdata);
-                else
-                    rc = KIndexFindText(self->ndx, query, &start_id, &id_count,NULL,NULL);
-                if(rc == 0){
-                    KDataBuffer *dst = rslt -> data;
-                    rc = KDataBufferResize ( dst, 1 );
-                    if( rc == 0) {
-                        out.start_id = start_id;
-                        out.id_count = id_count;
-                        out.x        = fxdata.x;
-                        out.y        = fxdata.y;
-                        memcpy(dst -> base,&out,sizeof(out));
-                        rslt -> elem_count = 1;
-                        rslt -> no_cache = 1; /***** This row should never be cached **/
-                    }
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-VTRANSFACT_IMPL(NCBI_SRA_lookup, 1, 0, 0) (
-                                           const void *Self,
-                                           const VXfactInfo *info,
-                                           VFuncDesc *rslt,
-                                           const VFactoryParams *cp,
-                                           const VFunctionParams *dp
-) {
-    rc_t rc;
-    const KIndex *ndx;
-    KIdxType type;
-    
-    rc = VTableOpenIndexRead(info->tbl, &ndx, "%.*s", (int)cp->argv[0].count, cp->argv[0].data.ascii);
-    if ( rc != 0 )
-    {
-        if ( GetRCState ( rc ) != rcNotFound )
-            PLOGERR (klogErr, (klogErr, rc, "Failed to open index '$(index)'", "index=%.*s", (int)cp->argv[0].count, cp->argv[0].data.ascii));
-        return rc;
-    }
-    
-    rc = KIndexType(ndx, &type);
-    if (rc == 0) {
-        if (type == kitProj + kitText) {
-            self_t *self;
-            
-            self = malloc(sizeof(*self));
-            if (self) {
-                self->ndx = ndx;
-                self->elem_bits = VTypedescSizeof(&info->fdesc.desc);
-		memcpy(self->query_key,cp->argv[1].data.ascii,cp->argv[1].count);
-		self->query_key_len = cp->argv[1].count;
-		self->query_key[self->query_key_len]='\0';
-		self->parms=info->parms;
-		self->name_fmt_version = *cp->argv[2].data.u8;
-/*** testing::: VCursorParamsSet(self->parms,"QUERY_BY_NAME" ,"EM7LVYS01C1LWG");***/
-		
-                rslt->self = self;
-                rslt->whack = self_whack;
-                rslt->variant = vftNonDetRow;
-                rslt->u.ndf = index_lookup_impl;
-                return 0;
-            }
-            rc = RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-        }
-        else
-            rc = RC(rcVDB, rcFunction, rcConstructing, rcIndex, rcIncorrect);
-    }
-    KIndexRelease(ndx);
-    return rc;
-}
diff --git a/libs/sraxf/make-position.c b/libs/sraxf/make-position.c
deleted file mode 100644
index 4159911..0000000
--- a/libs/sraxf/make-position.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-
-/* make_position
- *  return a synthesized position row with 1-1 correspondence
- *
- *  "T" [ TYPE ] - position type being generated
- *
- *  "start" [ CONST ] - either 0 or 1, depending upon the coordinate system
- *
- *  "read" [ DATA ] - the actual row of bases. the output row
- *  will be the same length, but with synthesized data
- */
-static
-rc_t CC make_position ( void *self, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt,  uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    KDataBuffer *dst = self;
-
-    if ( argv [ 0 ] . u . data . elem_count > dst -> elem_count )
-    {
-        uint32_t old = dst -> elem_count;
-        rc = KDataBufferResize ( dst, argv [ 0 ] . u . data . elem_count );
-        if ( rc != 0 )
-            return rc;
-        if ( dst -> elem_bits == 16 )
-        {
-            uint16_t i, *p = dst -> base;
-            uint16_t offset = p [ 0 ];
-            for ( i = old; i < dst -> elem_count; ++ i )
-                p [ i ] = i + offset;
-        }
-        else
-        {
-            int32_t i, *p = dst -> base;
-            int32_t offset = p [ 0 ];
-            for ( i = old; i < (int32_t)dst -> elem_count; ++ i )
-                p [ i ] = i + offset;
-        }
-    }
-
-    KDataBufferWhack ( rslt -> data );
-    rc = KDataBufferSub ( dst, rslt -> data, 0, argv [ 0 ] . u . data . elem_count );
-    if ( rc == 0 )
-        rslt -> elem_count = argv [ 0 ] . u . data . elem_count;
-
-    return rc;
-}
-
-static
-void CC whack_data_buffer ( void *data )
-{
-    KDataBufferWhack ( data );
-    free ( data );
-}
-
-VTRANSFACT_IMPL( NCBI_SRA_make_position, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    KDataBuffer *b = malloc ( sizeof * b );
-    if ( b == NULL )
-        return RC ( rcSRA, rcFunction, rcConstructing, rcMemory, rcExhausted );
-
-    rc = KDataBufferMake ( b, info -> fdesc . desc . intrinsic_bits, 4096 );
-    if ( rc != 0 )
-    {
-        free ( b );
-        return rc;
-    }
-
-    if ( info -> fdesc . desc . intrinsic_bits == 16 )
-    {
-        uint16_t i, *dst = b -> base;
-        uint16_t offset = cp -> argv [ 0 ] . data . u16 [ 0 ];
-        for ( i = 0; i < 4096; ++ i )
-            dst [ i ] = i + offset;
-    }
-    else if ( info -> fdesc . desc . intrinsic_bits == 32 )
-    {
-        int32_t i, *dst = b -> base;
-        int32_t offset = cp -> argv [ 0 ] . data . i32 [ 0 ];
-        for ( i = 0; i < 4096; ++ i )
-            dst [ i ] = i + offset;
-    }
-    else
-    {
-        /* this shouldn't really be needed */
-        whack_data_buffer ( b );
-        return RC ( rcSRA, rcFunction, rcConstructing, rcType, rcUnsupported );
-    }
-
-    rslt -> self = b;
-    rslt -> whack = whack_data_buffer;
-    rslt -> u . rf = make_position;
-    rslt -> variant = vftRow;
-
-    return 0;
-}
diff --git a/libs/sraxf/name-tokenizer.h b/libs/sraxf/name-tokenizer.h
deleted file mode 100644
index dcebc27..0000000
--- a/libs/sraxf/name-tokenizer.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_name_tokenizer_
-#define _h_name_tokenizer_
-
-/* spot_name_token_t
- *  represents a single token
- *  the tokenizer should emit a row of zero or more of these
- */
-typedef union spot_name_token_t spot_name_token_t;
-union spot_name_token_t
-{
-    struct
-    {
-        uint16_t token_type;
-        uint16_t position;
-        uint16_t length;
-    } s;
-    uint16_t raw [ 3 ];
-};
-
-/* name_token
- *  token ids
- */
-enum name_token
-{
-    nt_unrecognized = 1,
-    nt_recognized,
-
-    nt_Q,
-
-    nt_X,
-    nt_Y,
-    nt_T,
-    nt_L,
-
-    nt_signed_X,
-    nt_signed_Y,
-    nt_signed_T,
-    nt_signed_L,
-
-    nt_octal_X,
-    nt_octal_Y,
-    nt_octal_T,
-    nt_octal_L,
-
-    nt_hex_upper_X,
-    nt_hex_upper_Y,
-    nt_hex_upper_T,
-    nt_hex_upper_L,
-
-    nt_hex_lower_X,
-    nt_hex_lower_Y,
-    nt_hex_lower_T,
-    nt_hex_lower_L,
-
-    nt_max_token
-};
-
-/* token_symbol
- *  substitution symbols
- */
-#define TOK_ALPHABET ("---QXYTLXYTLabcdefghxytl")
-
-enum token_symbol
-{
-    ts_Q          = 'Q',
-
-    ts_X          = 'X',
-    ts_Y          = 'Y',
-    ts_T          = 'T',
-    ts_L          = 'L',
-
-    ts_signed_X   = 'X',
-    ts_signed_Y   = 'Y',
-    ts_signed_T   = 'T',
-    ts_signed_L   = 'L',
-
-    ts_oct_X      = 'a',
-    ts_oct_Y      = 'b',
-    ts_oct_T      = 'c',
-    ts_oct_L      = 'd',
-
-    ts_hex_upr_X  = 'e',
-    ts_hex_upr_Y  = 'f',
-    ts_hex_upr_T  = 'g',
-    ts_hex_upr_L  = 'h',
-
-    ts_hex_lwr_X  = 'x',
-    ts_hex_lwr_Y  = 'y',
-    ts_hex_lwr_T  = 't',
-    ts_hex_lwr_L  = 'l'
-};
-
-#define Q_ALPHABET ("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
-
-#endif /* _h_name_tokenizer_ */
diff --git a/libs/sraxf/normalize.c b/libs/sraxf/normalize.c
deleted file mode 100644
index 8c40dc1..0000000
--- a/libs/sraxf/normalize.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <sysalloc.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-typedef void (*norm_f)(void *dst, const void *src, const void *Cntrl, uint32_t vec_count);
-typedef struct self_t {
-    norm_f f;
-} self_t;
-
-#define NORM_0(A, B) do { \
-                            (A).data[0] = (B).data[0]; \
-                            (A).data[1] = (B).data[1] - (B).data[0]; \
-                            (A).data[2] = (B).data[2]; \
-                            (A).data[3] = (B).data[3]; \
-                        } while (0)
-#define NORM_1(A, B) A = B
-#define NORM_2(A, B) do { \
-                            (A).data[0] = (B).data[0]; \
-                            (A).data[1] = (B).data[1]; \
-                            (A).data[2] = (B).data[2]; \
-                            (A).data[3] = (B).data[3] - (B).data[2]; \
-                        } while (0)
-#define NORM_3(A, B) A = B
-
-#define FUNC(VALTYPE) F_ ## VALTYPE
-
-#define FUNC_DEF(VALTYPE) \
-static void FUNC(VALTYPE)(void *Dst, const void *Src, const void *Cntrl, uint32_t count) { \
-    typedef struct { VALTYPE data[4]; } data4_t; \
-    data4_t *dst = (data4_t *)Dst; \
-    const data4_t *src = (const data4_t *)Src; \
-    const uint8_t *cntrl = (const uint8_t *)Cntrl; \
-    uint32_t i; \
-    \
-    for (i = 0; i != count; ++i) { \
-        switch(cntrl[i]) { \
-        default: \
-        case 0: \
-            NORM_0(dst[i], src[i]); \
-            break; \
-        case 1: \
-            NORM_1(dst[i], src[i]); \
-            break; \
-        case 2: \
-            NORM_2(dst[i], src[i]); \
-            break; \
-        case 3: \
-            NORM_3(dst[i], src[i]); \
-            break; \
-        }\
-    } \
-}
-
-FUNC_DEF(float)
-FUNC_DEF(double)
-FUNC_DEF(uint8_t)
-FUNC_DEF(uint16_t)
-FUNC_DEF(uint32_t)
-FUNC_DEF(uint64_t)
-FUNC_DEF(int8_t)
-FUNC_DEF(int16_t)
-FUNC_DEF(int32_t)
-FUNC_DEF(int64_t)
-
-static
-rc_t CC normal_drvr (
-                void *Self,
-                const VXformInfo *info,
-                int64_t row_id,
-                VRowResult *rslt,
-                uint32_t argc,
-                const VRowData argv []
-) {
-    rc_t rc = 0;
-    const void *src;
-    const void *cntrl;
-    const self_t *self = (const self_t *)Self;
-    
-    assert(argv[0].u.data.elem_bits % 8 == 0);
-    assert(argv[1].u.data.elem_bits % 8 == 0);
-    
-    src   = &((const uint8_t *)argv[0].u.data.base)[(argv[0].u.data.first_elem * argv[0].u.data.elem_bits) / 8];
-    cntrl = &((const uint8_t *)argv[1].u.data.base)[(argv[1].u.data.first_elem * argv[1].u.data.elem_bits) / 8];
-    
-    rslt->elem_bits = rslt->data->elem_bits = argv[0].u.data.elem_bits;
-    rc = KDataBufferResize(rslt->data, argv[0].u.data.elem_count);
-    if (rc)
-        return rc;
-    rslt->elem_count = rslt->data->elem_count;
-    rslt->data->bit_offset = 0;
-    
-    self->f(rslt->data->base, src, cntrl, rslt->elem_count);
-    
-    return 0;
-}
-
-static
-void CC sraxf_normalize_free_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-/* 
- * function < type T > T [ 4 ] NCBI:SRA:normalize #1 ( T [ 4 ] intensities, U8 called );
- */
-VTRANSFACT_IMPL ( NCBI_SRA_normalize, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    self_t *self;
-    
-    switch (info->fdesc.desc.domain) {
-    case vtdInt:
-    case vtdUint:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 8:
-        case 16:
-        case 32:
-        case 64:
-            break;
-        default:
-            return RC(rcXF, rcFunction, rcConstructing, rcType, rcInvalid);
-            break;
-        }
-        break;
-    case vtdFloat:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 32:
-        case 64:
-            break;
-        default:
-            return RC(rcXF, rcFunction, rcConstructing, rcType, rcInvalid);
-            break;
-        }
-        break;
-    default:
-        return RC(rcXF, rcFunction, rcConstructing, rcType, rcInvalid);
-        break;
-    }
-    
-    self = malloc(sizeof(*self));
-    if (self) {
-        switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 8:
-                self->f = FUNC(int8_t);
-                break;
-            case 16:
-                self->f = FUNC(int16_t);
-                break;
-            case 32:
-                self->f = FUNC(int32_t);
-                break;
-            case 64:
-                self->f = FUNC(int64_t);
-                break;
-            default:
-                break;
-            }
-            break;
-        case vtdUint:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 8:
-                self->f = FUNC(uint8_t);
-                break;
-            case 16:
-                self->f = FUNC(uint16_t);
-                break;
-            case 32:
-                self->f = FUNC(uint32_t);
-                break;
-            case 64:
-                self->f = FUNC(uint64_t);
-                break;
-            default:
-                break;
-            }
-            break;
-        case vtdFloat:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 32:
-                self->f = FUNC(float);
-                break;
-            case 64:
-                self->f = FUNC(double);
-                break;
-            default:
-                break;
-            }
-            break;
-        default:
-            break;
-        }
-        
-        rslt->self = self;
-        rslt->whack = sraxf_normalize_free_wrapper;
-        rslt->u.rf = normal_drvr;
-        rslt->variant = vftRow;
-        
-        return 0;
-    }
-    return RC(rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted);
-}
diff --git a/libs/sraxf/prefix-tree-to-name.c b/libs/sraxf/prefix-tree-to-name.c
deleted file mode 100644
index 06a2e1b..0000000
--- a/libs/sraxf/prefix-tree-to-name.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <sysalloc.h>
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <kdb/index.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-
-#include <string.h>
-#include <assert.h>
-
-/* ascii NCBI:SRA:prefix_tree_to_name #1 < ascii idx > ( * ascii name );
- *  use prefix tree index data in reverse lookup
- *  as a substitute for physical NAME column
- *
- *  "idx" [ CONST ] - name of prefix-tree text index
- *
- *  "name" [ DATA, OPTIONAL ] - source of unindexed names
- *  when a reverse lookup on "idx" fails and this input is
- *  present, its row is returned.
- */
-static
-rc_t prefix_tree_to_name ( void *self, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    const KIndex *idx = ( const void* ) self;
-    KDataBuffer *dst = rslt -> data;
-
-    /* the buffer should have already been given the correct element size */
-    if ( dst -> elem_bits != 8 )
-    {
-        rc = KDataBufferCast ( dst, dst, 8, true );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* the actual size depends upon whether the buffer is new or was resized very small */
-    if ( dst -> elem_count < 8 )
-    {
-        rc = KDataBufferResize ( dst, 4 * 1024 );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* try to get the text with current size */
-    rc = KIndexProjectText ( idx, row_id, NULL, NULL, dst -> base, dst -> elem_count, NULL );
-    if ( GetRCState ( rc ) == rcInsufficient && GetRCObject ( rc ) == rcBuffer )
-    {
-        /* go to 4K buffer - should never fail */
-        rc = KDataBufferResize ( dst, 4 * 1024 );
-        if ( rc == 0 )
-        {
-            rc = KIndexProjectText ( idx, row_id, NULL, NULL, dst -> base, dst -> elem_count, NULL );
-            if ( GetRCState ( rc ) == rcInsufficient && GetRCObject ( rc ) == rcBuffer )
-            {
-                /* go to 16K buffer - this is absurd */
-                rc = KDataBufferResize ( dst, 16 * 1024 );
-                if ( rc == 0 )
-                {
-                    rc = KIndexProjectText ( idx, row_id, NULL, NULL, dst -> base, dst -> elem_count, NULL );
-                    if ( GetRCState ( rc ) == rcInsufficient && GetRCObject ( rc ) == rcBuffer )
-
-                        /* reject this name, it is likely garbage */
-                        rc = RC ( rcSRA, rcIndex, rcProjecting, rcName, rcExcessive );
-                }
-            }
-        }
-    }
-
-    /* test to see if we got the name */
-    if ( rc == 0 )
-    {
-        rslt -> elem_count = (uint32_t)strlen ( ( const char* ) dst -> base );
-        return 0;
-    }
-
-    /* if id was not found, check for alternate input */
-    if ( GetRCState ( rc ) == rcNotFound && argc == 1 && argv [ 0 ] . u . data . elem_count != 0 )
-    {
-        if ( dst -> elem_count < argv [ 0 ] . u . data . elem_count )
-        {
-            rc = KDataBufferResize ( dst, argv [ 0 ] . u . data . elem_count );
-            if ( rc != 0 )
-                return rc;
-        }
-
-        rc = 0;
-
-        string_copy ( dst -> base, dst -> elem_count,
-            argv [ 0 ] . u . data . base, argv [ 0 ] . u . data . elem_count );
-    }
-
-    return rc;
-}
-
-static
-void release_prefix_tree ( void *item )
-{
-    KIndexRelease ( ( const void* ) item );
-}
-
-VTRANSFACT_IMPL( NCBI_SRA_prefix_tree_to_name, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    /* the first thing to do is to open the prefix tree */
-    const KIndex *idx;
-    rc_t rc = VTableOpenIndexRead ( info -> tbl, & idx, "%.*s",
-        ( int ) cp -> argv [ 0 ] . count, cp -> argv [ 0 ] . data . ascii );
-    if ( rc == 0 )
-    {
-        KIdxType type;
-        rc = KIndexType ( idx, & type );
-        if ( rc == 0 )
-        {
-            if ( type == ( kitText | kitProj ) )
-            {
-                rslt -> self = ( void* ) idx;
-                rslt -> whack = release_prefix_tree;
-                rslt -> u . rf = prefix_tree_to_name;
-                rslt -> variant = vftRow;
-                return 0;
-            }
-
-            rc = RC ( rcSRA, rcFunction, rcConstructing, rcIndex, rcIncorrect );
-        }
-
-        KIndexRelease ( idx );
-    }
-    else {
-        OUTMSG("VTableOpenIndexRead failed: %R", rc);
-    }
-
-    return rc;
-}
diff --git a/libs/sraxf/process-position.c b/libs/sraxf/process-position.c
deleted file mode 100644
index e135ab7..0000000
--- a/libs/sraxf/process-position.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <sysalloc.h>
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-static
-void process_position ( uint16_t *dst, const uint16_t *src, uint32_t count )
-{
-    uint32_t i, cur, prev;
-
-    for ( prev = i = 0; i < count; prev = cur, ++ i )
-    {
-        cur = src [ i ];
-        if ( cur > 0x7FFF )
-            cur = ( uint8_t ) cur;
-        while ( prev > cur )
-            cur += 256;
-        dst [ i ] = cur;
-    }
-}
-
-static
-rc_t CC process_position1 ( void *self, const VXformInfo *info,
-    int64_t row_id, const VFixedRowResult *rslt,
-    uint32_t argc, const VRowData argv [] )
-{
-    uint16_t *dst = rslt -> base;
-    const uint16_t *src = argv [ 0 ] . u . data . base;
-    uint32_t count = argv [ 0 ] . u . data . elem_count;
-
-    dst += rslt -> first_elem;
-    src += argv [ 0 ] . u . data . first_elem;
-
-    process_position ( dst, src, count );
-
-    return 0;
-}
-
-static
-rc_t CC process_position2 ( void *self, const VXformInfo *info,
-    int64_t row_id, VRowResult *rslt,
-    uint32_t argc, const VRowData argv [] )
-{
-    /* position row data */
-    const uint16_t *src = argv [ 0 ] . u . data . base;
-    uint32_t count = argv [ 0 ] . u . data . elem_count;
-
-    /* filter row data */
-    const SRAReadFilter *rd_filt = argv [ 1 ] . u . data . base;
-    uint32_t i, nreads = argv [ 1 ] . u . data . elem_count;
-
-    /* output buffer */
-    uint16_t *dst;
-    rc_t rc = KDataBufferCast ( rslt -> data, rslt -> data, 16, true );
-    if ( rc == 0 )
-        rc = KDataBufferResize ( rslt -> data, count );
-    if ( rc != 0 )
-        return rc;
-
-    /* adjust all pointers to start of row */
-    src += argv [ 0 ] . u . data . first_elem;
-    rd_filt += argv [ 1 ] . u . data . first_elem;
-    dst = rslt -> data -> base;
-
-    /* set output size */
-    rslt -> elem_count = count;
-    rslt -> elem_bits = 16;
-
-    /* walk input */
-    for ( i = 0; i < nreads; ++ i )
-    {
-        if ( rd_filt [ i ] == SRA_READ_FILTER_REDACTED )
-        {
-            memset ( dst, 0, count * sizeof * dst );
-            return 0;
-        }
-    }
-
-    process_position ( dst, src, count );
-
-    return 0;
-}
-
-static
-rc_t CC process_position3 ( void *self, const VXformInfo *info,
-    int64_t row_id, VRowResult *rslt,
-    uint32_t argc, const VRowData argv [] )
-{
-    /* position row data */
-    const uint16_t *src = argv [ 0 ] . u . data . base;
-    uint32_t count = argv [ 0 ] . u . data . elem_count;
-
-    /* filter row data */
-    const SRAReadFilter *rd_filt = argv [ 1 ] . u . data . base;
-    uint32_t i, nreads = argv [ 1 ] . u . data . elem_count;
-
-    /* signal row data */
-    const uint16_t *sig = argv [ 2 ] . u . data . base;
-
-    /* output buffer */
-    uint16_t *dst;
-    rc_t rc = KDataBufferCast ( rslt -> data, rslt -> data, 16, true );
-    if ( rc == 0 )
-        rc = KDataBufferResize ( rslt -> data, count );
-    if ( rc != 0 )
-        return rc;
-
-    /* adjust all pointers to start of row */
-    src += argv [ 0 ] . u . data . first_elem;
-    rd_filt += argv [ 1 ] . u . data . first_elem;
-    sig += argv [ 2 ] . u . data . first_elem;
-    dst = rslt -> data -> base;
-
-    /* set output size */
-    rslt -> elem_count = count;
-    rslt -> elem_bits = 16;
-
-    /* walk input */
-    for ( i = 0; i < nreads; ++ i )
-    {
-        if ( rd_filt [ i ] == SRA_READ_FILTER_REDACTED )
-        {
-            uint32_t scount = argv [ 2 ] . u . data . elem_count;
-            for ( i = 0; i < scount; ++ i )
-            {
-                if ( sig [ i ] != 0 )
-                    break;
-            }
-            if ( i == scount )
-            {
-                memset ( dst, 0, count * sizeof * dst );
-                return 0;
-            }
-            break;
-        }
-    }
-
-    process_position ( dst, src, count );
-
-    return 0;
-}
-
-
-/* process_position
- *  convert 8 bit integration into 16 bit
- */
-VTRANSFACT_IMPL ( NCBI_SRA__454__process_position, 1, 0, 0 ) ( const void *fself, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    if ( dp -> argc == 3 )
-    {
-        rslt -> u . rf = process_position3;
-        rslt -> variant = vftRow;
-        return 0;
-    }
-
-    if ( dp -> argc == 2 )
-    {
-        rslt -> u . rf = process_position2;
-        rslt -> variant = vftRow;
-        return 0;
-    }
-
-    rslt -> u . pf = process_position1;
-    rslt -> variant = vftFixedRow;
-    return 0;
-}
diff --git a/libs/sraxf/qstat-trigger.c b/libs/sraxf/qstat-trigger.c
deleted file mode 100644
index b1b815d..0000000
--- a/libs/sraxf/qstat-trigger.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <kdb/meta.h>
-#include <sysalloc.h>
-
-#include "stat_mod.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-typedef struct self_s self_t;
-struct self_s {
-    VDatabase *db;
-    statistic stats;
-    bool alignMode;
-};
-
-static
-rc_t CC qstats_trigger_impl(void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv[])
-{
-    self_t *self = data;
-    unsigned const nreads = argv[2].u.data.elem_count;
-    unsigned nrofs = 0;
-    unsigned i;
-    unsigned start;
-    rc_t rc = 0;
-    
-    uint8_t              const *read = argv[0].u.data.base;
-    uint8_t              const *qual = argv[1].u.data.base;
-    uint32_t             const *rlen = argv[2].u.data.base;
-    INSDC_SRA_xread_type const *rtyp = argv[3].u.data.base;
-    char                 const *sgrp = argv[4].u.data.base;
-    bool                 const *hmis = NULL;
-    bool                 const *hrof = NULL;
-    int32_t              const *rofs = NULL;
-    
-    read += argv[0].u.data.first_elem;
-    qual += argv[1].u.data.first_elem;
-    rlen += argv[2].u.data.first_elem;
-    rtyp += argv[3].u.data.first_elem;
-    sgrp += argv[4].u.data.first_elem;
-    
-    if (argc > 5) {
-        hmis = argv[5].u.data.base;
-        hmis += argv[5].u.data.first_elem;
-
-        hrof = argv[6].u.data.base;
-        hrof += argv[6].u.data.first_elem;
-        
-        rofs = argv[7].u.data.base;
-        rofs += argv[7].u.data.first_elem;
-        
-        nrofs = argv[7].u.data.elem_count;
-    }
-    for (start = i = 0; i < nreads && rc == 0; ++i) {
-        row_input row;
-        unsigned const len = rlen[i];
-        
-        memset(&row, 0, sizeof(row));
-        
-        row.spotgroup = sgrp;
-        row.spotgroup_len = argv[4].u.data.elem_count;
-        
-        row.read = &read[start];
-        row.quality = &qual[start];
-        row.read_len = row.quality_len = len;
-        
-        row.reversed = (rtyp[i] & SRA_READ_TYPE_REVERSE) != 0;
-        row.base_pos_offset = start;
-        
-        start += len;
-        
-        if (hmis) {
-            row.has_mismatch = hmis;
-            row.has_roffs = hrof;
-            row.roffs = rofs;
-            
-            row.has_mismatch_len = row.has_roffs_len = len;
-            row.roffs_len = nrofs;
-        }
-        rc = extract_statistic_from_row(&self->stats, &row);
-    }
-    return rc;
-}
-
-static char const *column_name[] = {
-    "SPOT_GROUP",
-    "(U32)DIMER_OFFSET",
-    "DIMER",
-    "(U8)HPRUN",
-    "(U8)GC_CONTENT",
-    "QUALITY",
-    "(U32)TOTAL_COUNT",
-    "(U32)MISMATCH_COUNT",
-    "(U32)INSERT_COUNT",
-    "(U32)DELETE_COUNT"
-};
-
-typedef struct writer_ctx_s writer_ctx_t;
-struct writer_ctx_s {
-    VCursor *curs;
-    rc_t rc;
-    bool alignMode;
-    uint32_t cid[10];
-};
-
-static bool CC qstats_write(stat_row const *row, void *ctx)
-{
-    writer_ctx_t *self = ctx;
-    rc_t rc = VCursorOpenRow(self->curs);
-    
-    while (rc == 0) {
-        rc = VCursorWrite(self->curs, self->cid[0],  8,  row->spotgroup,  0, strlen(row->spotgroup)); if (rc) break;
-        rc = VCursorWrite(self->curs, self->cid[1], 32, &row->base_pos,   0, 1);                      if (rc) break;
-        rc = VCursorWrite(self->curs, self->cid[2],  8,  row->dimer,      0, 2);                      if (rc) break;
-        rc = VCursorWrite(self->curs, self->cid[3],  8, &row->hp_run,     0, 1);                      if (rc) break;
-        rc = VCursorWrite(self->curs, self->cid[4],  8, &row->gc_content, 0, 1);                      if (rc) break;
-        rc = VCursorWrite(self->curs, self->cid[5],  8, &row->quality,    0, 1);                      if (rc) break;
-        rc = VCursorWrite(self->curs, self->cid[6], 32, &row->count,      0, 1);                      if (rc) break;
-        
-        if (self->alignMode) {
-            rc = VCursorWrite(self->curs, self->cid[7], 32, &row->mismatch_count, 0, 1); if (rc) break;
-            rc = VCursorWrite(self->curs, self->cid[8], 32, &row->insert_count,   0, 1); if (rc) break;
-            rc = VCursorWrite(self->curs, self->cid[9], 32, &row->delete_count,   0, 1); if (rc) break;
-        }
-        rc = VCursorCommitRow(self->curs); if (rc) break;
-        rc = VCursorCloseRow(self->curs);
-    }
-    return rc == 0;
-}
-
-static rc_t OpenTableAndCursor(VDatabase *db, VTable **ptbl, VCursor **pcurs, uint32_t cid[], unsigned ncols)
-{
-    rc_t rc = VDatabaseCreateTable(db, ptbl, "READ_STATS",
-                                   kcmCreate | kcmMD5, "READ_STATS");
-    
-    if (rc == 0) {
-        rc = VTableColumnCreateParams(*ptbl, kcmCreate, kcsCRC32, 0);
-        if (rc == 0) {
-            rc = VTableCreateCursorWrite(*ptbl, &pcurs, kcmInsert);
-            if (rc == 0) {
-                unsigned i;
-                
-                for (i = 0; i < ncols && rc == 0; ++i) {
-                    rc = VCursorAddColumn(*pcurs, &cid[i], "%s", column_name[i]);
-                }
-                if (rc == 0) {
-                    rc = VCursorOpen(*pcurs);
-                    if (rc == 0)
-                        return 0;
-                }
-                VCursorRelease(*pcurs);
-            }
-        }
-        VTableRelease(*ptbl);
-    }
-    *pcurs = NULL;
-    *ptbl = NULL;
-    return rc;
-}
-
-static void CC qstats_whack(void *vp)
-{
-    self_t *self = vp;
-    VTable *tbl;
-    writer_ctx_t ctx;
-    
-    memset(&ctx, 0, sizeof(ctx));
-    ctx.alignMode = self->alignMode;
-    
-    ctx.rc = OpenTableAndCursor(self->db, &tbl, &ctx.curs, self->alignMode ? 10 : 7);
-    VDatabaseRelease(self->db);
-    if (ctx.rc == 0) {
-        foreach_statistic(&self->stat, qstats_write, self);
-        VCursorRelease(ctx.curs);
-        if (ctx.rc == 0)
-            VTableReindex(tbl);
-        VTableRelease(tbl);
-    }
-    whack_statistic(&self->stat);
-    free(self);
-}
-
-static rc_t qstats_trigger_make(const void *Self, const VXfactInfo *info, VFuncDesc *rslt,
-                 const VFactoryParams *cp, const VFunctionParams *dp, bool alignMode)
-{
-    rc_t rc = 0;
-    self_t *self = malloc(sizeof(*self));
-    
-    if (self == NULL)
-        return RC(rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted);
-    self->alignMode = no_algn_info;
-    rc = VTableOpenParentUpdate(info->tbl, &self->db);
-    if (rc == 0) {
-        rc = make_statistic(&self->stat, 7, no_algn_info);
-        if (rc == 0) {
-            rslt->self = self;
-            rslt->variant = vftIdDepRow;
-            rslt->whack = qstats_whack;
-            rslt->u.rf = qstats_trigger_impl;
-            
-            return 0;
-        }
-        VDatabaseRelease(self->db);
-    }
-    return rc;
-}
-
-VTRANSFACT_IMPL ( NCBI_seq_stats_trigger, 1, 0, 0 )
-    ( const void *self, const VXfactInfo *info, VFuncDesc *rslt,
-      const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    return qstats_trigger_make(self, info, rslt, cp, dp, false);
-}
-
-VTRANSFACT_IMPL ( NCBI_align_stats_trigger, 1, 0, 0 )
-    ( const void *self, const VXfactInfo *info, VFuncDesc *rslt,
-      const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    return qstats_trigger_make(self, info, rslt, cp, dp, true);
-}
diff --git a/libs/sraxf/qual4_codec.h b/libs/sraxf/qual4_codec.h
deleted file mode 100644
index 9d2fd3f..0000000
--- a/libs/sraxf/qual4_codec.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-typedef int8_t qual4[4];
-
-enum code_book {
-	known_bad = 81,
-	known_good,
-	pattern_a_1, /* val, -val, min, min */
-	pattern_a_2, /* val, min, -val, min */
-	pattern_a_3, /* val, min, min, -val */
-	pattern_b_1, /* val, -val + 1, min, min */
-	pattern_b_2, /* val, min, -val + 1, min */
-	pattern_b_3, /* val, min, min, -val + 1 */
-	pattern_c_1, /* val, -val - 1, min, min */
-	pattern_c_2, /* val, min, -val - 1, min */
-	pattern_c_3, /* val, min, min, -val - 1 */
-	cb_last
-};
-
diff --git a/libs/sraxf/qual4_decode.c b/libs/sraxf/qual4_decode.c
deleted file mode 100644
index b2ee301..0000000
--- a/libs/sraxf/qual4_decode.c
+++ /dev/null
@@ -1,257 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <vdb/vdb-priv.h>
-#include <klib/data-buffer.h>
-#include "qual4_codec.h"
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <endian.h>
-#include <byteswap.h>
-
-#include <assert.h>
-
-static size_t qual4_decode(
-                           qual4 *dst,
-                           size_t dcount,
-                           const uint8_t *src,
-                           size_t ssize,
-                           const int8_t qmin,
-                           const int8_t qmax
-) {
-	int st;
-	int st2;
-    size_t i;
-    size_t j;
-
-	static const qual4 all_bad = { -5,  -5,  -5,  -5 };
-
-    qual4 is_good;
-    is_good [ 0 ] = qmax;
-    is_good [ 1 ] = qmin;
-    is_good [ 2 ] = qmin;
-    is_good [ 3 ] = qmin;
-	
-	for (st = st2 = 0, j = i = 0; i != ssize && j < dcount; ++i) {
-        int val = src[i] - 40;
-        
-		switch (st) {
-		case 0:
-            if (src[i] < known_bad) {
-                dst[j][0] = val;
-                st = 1;
-            }
-            else if (src[i] == known_bad)
-                memcpy(&dst[j][0], all_bad, 4);
-            else if (src[i] == known_good)
-                memcpy(&dst[j][0], is_good, 4);
-            else {
-                st2 = src[i];
-                st = 4;
-            }
-			break;
-		case 1:
-			dst[j][1] = val;
-			++st;
-			break;
-		case 2:
-			dst[j][2] = val;
-			++st;
-			break;
-		case 3:
-			dst[j][3] = val;
-			st = 0;
-			break;
-        case 4:
-            switch (st2) {
-            case pattern_a_1:
-                dst[j][0] = val;
-				dst[j][1] = -val;
-				dst[j][2] = qmin;
-				dst[j][3] = qmin;
-                break;
-            case pattern_a_2:
-                dst[j][0] = val;
-				dst[j][1] = qmin;
-				dst[j][2] = -val;
-				dst[j][3] = qmin;
-                break;
-            case pattern_a_3:
-                dst[j][0] = val;
-				dst[j][1] = qmin;
-				dst[j][2] = qmin;
-				dst[j][3] = -val;
-                break;
-            case pattern_b_1:
-                dst[j][0] = val;
-				dst[j][1] = -val + 1;
-				dst[j][2] = qmin;
-				dst[j][3] = qmin;
-                break;
-            case pattern_b_2:
-                dst[j][0] = val;
-				dst[j][1] = qmin;
-				dst[j][2] = -val + 1;
-				dst[j][3] = qmin;
-                break;
-            case pattern_b_3:
-                dst[j][0] = val;
-				dst[j][1] = qmin;
-				dst[j][2] = qmin;
-				dst[j][3] = -val + 1;
-                break;
-            case pattern_c_1:
-                dst[j][0] = val;
-				dst[j][1] = -val - 1;
-				dst[j][2] = qmin;
-				dst[j][3] = qmin;
-                break;
-            case pattern_c_2:
-                dst[j][0] = val;
-				dst[j][1] = qmin;
-				dst[j][2] = -val - 1;
-				dst[j][3] = qmin;
-                break;
-            case pattern_c_3:
-                dst[j][0] = val;
-				dst[j][1] = qmin;
-				dst[j][2] = qmin;
-				dst[j][3] = -val - 1;
-                break;
-            default:
-                return 0;
-            }
-            st = 0;
-            break;
-		}
-        if (st == 0)
-            ++j;
-	}
-	return j;
-}
-
-static
-rc_t CC qual4_decode_func(
-                       void *Self,
-                       const VXformInfo *info,
-                       VBlobResult *dst,
-                       const VBlobData *src,
-                       VBlobHeader *hdr
-) {
-    size_t rcount;
-    int qmin = -40;
-    int qmax = 40;
-    
-    if (hdr) {
-        rc_t rc;
-        uint8_t val;
-        
-        rc = VBlobHeaderOpPopHead(hdr, &val);
-        if (rc == 0) {
-            qmin = val - 40;
-            rc = VBlobHeaderOpPopHead(hdr, &val);
-            if (rc == 0) {
-                qmax = val - 40;
-            }
-        }
-    }
-    
-    rcount = qual4_decode( dst->data, dst->elem_count,
-                           src->data, 
-						   ( ( (size_t)src->elem_count * src->elem_bits + 7 ) >> 3 ),
-                           qmin, qmax );
-    
-    if (rcount == dst->elem_count) {
-        dst->byte_order = vboNone;
-        return 0;
-    }
-    return RC(rcSRA, rcFunction, rcExecuting, rcData, rcInvalid);
-}
-
-/*
- * function NCBI:SRA:swapped_qual4 NCBI:SRA:qual4_decode ( NCBI:SRA:encoded_qual4 in );
- */
-VTRANSFACT_IMPL(NCBI_SRA_qual4_decode, 1, 0, 0) (const void *self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftBlob;
-    rslt->u.bf = qual4_decode_func;
-
-    return 0;
-}
-
-static
-rc_t CC legacy_qual4_decode_func ( void *self, const VXformInfo *info, VLegacyBlobResult *rslt, const KDataBuffer *src )
-{
-    unsigned dbytes = *(uint32_t *)src->base;
-    
-#if __BYTE_ORDER == __BIG_ENDIAN
-    dbytes = bswap_32 (dbytes);
-#endif
-    if ((dbytes & 3) == 0) {
-        rc_t rc;
-        unsigned rcount;
-        
-        rslt->dst->elem_bits = 32;
-        rc = KDataBufferResize(rslt->dst, dbytes >> 2);
-        if (rc)
-            return rc;
-
-        rcount = (unsigned int)qual4_decode( rslt->dst->base, rslt->dst->elem_count,
-                               ( ( const uint8_t * )src->base ) + 4, 
-							   (unsigned int)( KDataBufferBytes( src ) - 4 ),
-                               -40, 40);
-        if (rcount == rslt->dst->elem_count) {
-            rslt->byte_order = vboNone;
-            return 0;
-        }
-    }
-    return RC(rcSRA, rcFunction, rcExecuting, rcData, rcInvalid);
-}
-
-VTRANSFACT_IMPL ( NCBI_SRA_qual4_decompress_v1, 1, 0, 0) (const void *self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    VNoHdrBlobFunc f = legacy_qual4_decode_func;
-    rslt->variant = vftLegacyBlob;
-    rslt->u.bf = ( VBlobFunc ) f;
-
-    return 0;
-}
-
-#if TESTING
-int test_decode(const uint8_t src[], unsigned ssize, int8_t Y[], unsigned N) {
-    size_t n = qual4_decode(Y, N / 4, src, ssize, -40, 40);
-    
-    return 0;
-}
-#endif
diff --git a/libs/sraxf/qual4_encode.c b/libs/sraxf/qual4_encode.c
deleted file mode 100644
index 14fa16a..0000000
--- a/libs/sraxf/qual4_encode.c
+++ /dev/null
@@ -1,232 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <vdb/vdb-priv.h>
-#include <klib/data-buffer.h>
-#include "qual4_codec.h"
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <endian.h>
-#include <byteswap.h>
-
-#include <assert.h>
-
-static size_t qual4_encode(
-						   uint8_t *Dst,
-                           size_t dsize,
-						   const qual4 src [],
-						   size_t count,
-                           int8_t qmin,
-                           int8_t qmax
-                           )
-{
-	static const qual4 all_bad = { -5, -5, -5, -5 };
-	uint8_t *dst = Dst;
-    const uint8_t * const dend = & ( ( uint8_t* ) Dst ) [ dsize ];
-	int i;
-	qual4 
-        pat_a_1, pat_a_2, pat_a_3,
-        pat_b_1, pat_b_2, pat_b_3,
-        pat_c_1, pat_c_2, pat_c_3;
-    qual4 is_good;
-
-    is_good[0] = qmax;
-    is_good[1] = is_good[2] = is_good[3] = qmin;
-	
-	pat_a_1[2] = pat_a_1[3] = pat_a_2[1] = pat_a_2[3] = pat_a_3[1] = pat_a_3[2] = qmin;
-	pat_b_1[2] = pat_b_1[3] = pat_b_2[1] = pat_b_2[3] = pat_b_3[1] = pat_b_3[2] = qmin;
-	pat_c_1[2] = pat_c_1[3] = pat_c_2[1] = pat_c_2[3] = pat_c_3[1] = pat_c_3[2] = qmin;
-	
-	for (i = 0; i != count; ++i) {
-		qual4 in_val;
-		qual4 out_val;
-		int codes;
-		
-        memcpy(in_val, src + i, 4);
-		if (in_val[0] > qmax || in_val[0] < qmin ||
-            in_val[1] > qmax || in_val[1] < qmin ||
-            in_val[2] > qmax || in_val[2] < qmin ||
-            in_val[3] > qmax || in_val[3] < qmin)
-        {
-			if (in_val[0] + 40 < 0 || in_val[0] + 40 >= cb_last)
-				goto IS_BAD;
-			else
-				goto QUOTE_IT;
-		}
-		
-		do {
-			if (*(uint32_t *)in_val == *(uint32_t *)all_bad) {
-			IS_BAD:
-				codes = 1;
-				out_val[0] = known_bad;
-				break;
-			}
-			if (*(uint32_t *)in_val == *(uint32_t *)is_good) {
-				codes = 1;
-				out_val[0] = known_good;
-				break;
-			}
-			
-			codes = 2;
-			out_val[1] = in_val[0] + 40;
-			
-			pat_a_3[3] = pat_a_2[2] = pat_a_1[1] = -(pat_a_1[0] = pat_a_2[0] = pat_a_3[0] = in_val[0]);
-			if (*(uint32_t *)in_val == *(uint32_t *)pat_a_1) {
-				out_val[0] = pattern_a_1;
-				break;
-			}
-			if (*(uint32_t *)in_val == *(uint32_t *)pat_a_2) {
-				out_val[0] = pattern_a_2;
-				break;
-			}
-			if (*(uint32_t *)in_val == *(uint32_t *)pat_a_3) {
-				out_val[0] = pattern_a_3;
-				break;
-			}
-			
-			pat_b_3[3] = pat_b_2[2] = pat_b_1[1] = -(pat_b_1[0] = pat_b_2[0] = pat_b_3[0] = in_val[0]) + 1;
-			if (*(uint32_t *)in_val == *(uint32_t *)pat_b_1) {
-				out_val[0] = pattern_b_1;
-				break;
-			}
-			if (*(uint32_t *)in_val == *(uint32_t *)pat_b_2) {
-				out_val[0] = pattern_b_2;
-				break;
-			}
-			if (*(uint32_t *)in_val == *(uint32_t *)pat_b_3) {
-				out_val[0] = pattern_b_3;
-				break;
-			}
-			
-			pat_c_3[3] = pat_c_2[2] = pat_c_1[1] = -(pat_c_1[0] = pat_c_2[0] = pat_c_3[0] = in_val[0]) - 1;
-			if (*(uint32_t *)in_val == *(uint32_t *)pat_c_1) {
-				out_val[0] = pattern_c_1;
-				break;
-			}
-			if (*(uint32_t *)in_val == *(uint32_t *)pat_c_2) {
-				out_val[0] = pattern_c_2;
-				break;
-			}
-			if (*(uint32_t *)in_val == *(uint32_t *)pat_c_3) {
-				out_val[0] = pattern_c_3;
-				break;
-			}
-		QUOTE_IT:
-			codes = 4;
-			out_val[0] = in_val[0] + 40;
-			out_val[1] = in_val[1] + 40;
-			out_val[2] = in_val[2] + 40;
-			out_val[3] = in_val[3] + 40;
-		} while (0);
-        
-        if (dst + codes > dend)
-            return dst + codes - Dst;
-        
-        memcpy(dst, out_val, codes);
-		dst += codes;
-	}
-	return dst - Dst;
-}
-
-static
-rc_t CC qual4_encode_func(
-                       void *Self,
-                       const VXformInfo *info,
-                       VBlobResult *dst,
-                       const VBlobData *Src,
-                       VBlobHeader *hdr
-) {
-    size_t n;
-    unsigned i;
-    const int8_t *src = Src->data;
-    int qmin = src[0];
-    int qmax = src[0];
-    rc_t rc;
-    
-    n = ((size_t)Src->elem_count * Src->elem_bits + 7) >> 3;
-    for (i = 1; i < n; ++i) {
-        int val = src[i];
-        
-        if (val < -40 || val > 40)
-            continue;
-        
-        if (qmax < val)
-            qmax = val;
-        if (qmin > val)
-            qmin = val;
-    }
-    if (qmax > 40)
-        qmax = 40;
-    if (qmin < -40)
-        qmin = -40;
-    
-    rc = VBlobHeaderOpPushTail(hdr, qmin + 40);
-    if (rc == 0) {
-        rc = VBlobHeaderOpPushTail(hdr, qmax + 40);
-        if (rc == 0) {
-            n = qual4_encode(dst->data, (dst->elem_count * dst->elem_bits + 7) >> 3,
-                             (const qual4 *)src, 
-                             n / 4,
-                             qmin, qmax );
-            
-            if (n > (dst->elem_count * dst->elem_bits + 7) >> 3)
-                return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-
-            dst->elem_count = n * 8 / dst->elem_bits;
-            dst->byte_order = vboNone;
-            
-            return 0;
-        }
-    }
-    return rc;
-}
-
-/*
- * function NCBI:SRA:encoded_qual4 NCBI:SRA:qual4_encode #1 ( NCBI:SRA:swapped_qual4 in )
- */
-VTRANSFACT_IMPL(NCBI_SRA_qual4_encode, 1, 0, 0) (const void *self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftBlob;
-    rslt->u.bf = qual4_encode_func;
-
-    return 0;
-}
-
-#if TESTING
-int test_encode(const int8_t Y[], unsigned N, uint8_t dst[], unsigned dsize) {
-    size_t n = qual4_encode(dst, dsize, Y, N / 4, -40, 40);
-
-    return n <= N ? n : 0;
-}
-#endif
diff --git a/libs/sraxf/read-desc.c b/libs/sraxf/read-desc.c
deleted file mode 100644
index d3ce922..0000000
--- a/libs/sraxf/read-desc.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <string.h>
-
-static
-rc_t CC make_read_desc ( void *self, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    SRAReadDesc *dst;
-
-    const uint8_t *num_reads              = argv[0].u.data.base;
-    const INSDC_coord_zero *read_start    = argv[1].u.data.base;
-    const INSDC_coord_len *read_len       = argv[2].u.data.base;
-    const INSDC_SRA_xread_type *read_type = argv[3].u.data.base;
-    const INSDC_SRA_read_filter *read_flt = argv[4].u.data.base;
-    const INSDC_dna_text *cs_key          = argv[5].u.data.base;
-    const INSDC_coord_zero *lbl_start     = argv[6].u.data.base;
-    const INSDC_coord_len *lbl_len        = argv[7].u.data.base;
-    const char *label                     = argv[8].u.data.base;
-    uint32_t label_max                    = argv[8].u.data.elem_count;
-
-    num_reads += argv[0].u.data.first_elem; /* valid for argv[0].u.data.elem_count */
-    assert( argv[0].u.data.elem_bits == (sizeof( *num_reads ) * 8 ) );
-
-    read_start += argv[1].u.data.first_elem; /* valid for argv[1].u.data.elem_count */
-    assert( argv[1].u.data.elem_bits == (sizeof( *read_start ) * 8 ) );
-    assert( argv[1].u.data.elem_count >= *num_reads ); /*** some old bug overspecified metadata **/
-
-    read_len += argv[2].u.data.first_elem; /* valid for argv[2].u.data.elem_count */
-    assert( argv[2].u.data.elem_bits == (sizeof( *read_len ) * 8 ) );
-    assert( argv[2].u.data.elem_count >= *num_reads );  /*** some old bug overspecified metadata **/
-
-    read_type += argv[3].u.data.first_elem; /* valid for argv[3].u.data.elem_count */
-    assert( argv[3].u.data.elem_bits == (sizeof( *read_type ) * 8 ) );
-    assert( argv[3].u.data.elem_count >= *num_reads );  /*** some old bug overspecified metadata **/
-
-    read_flt += argv[4].u.data.first_elem; /* valid for argv[4].u.data.elem_count */
-    assert( argv[4].u.data.elem_bits == (sizeof( *read_flt ) * 8 ) );
-    assert( argv[4].u.data.elem_count >= *num_reads );
-
-    cs_key += argv[5].u.data.first_elem; /* valid for argv[5].u.data.elem_count */
-    assert( argv[5].u.data.elem_bits == (sizeof( *cs_key ) * 8 ) );
-    assert( argv[5].u.data.elem_count >= *num_reads );
-
-    lbl_start += argv[6].u.data.first_elem; /* valid for argv[6].u.data.elem_count */
-    assert( argv[6].u.data.elem_bits == (sizeof( *lbl_start ) * 8 ) );
-    assert( argv[6].u.data.elem_count >= *num_reads );
-
-    lbl_len += argv[7].u.data.first_elem; /* valid for argv[7].u.data.elem_count */
-    assert( argv[7].u.data.elem_bits == (sizeof( *lbl_len ) * 8 ) );
-    assert( argv[7].u.data.elem_count >= *num_reads );
-
-    label += argv[8].u.data.first_elem; /* valid for argv[8].u.data.elem_count */
-    assert( argv[8].u.data.elem_bits >= (sizeof( *label ) * 8 ) );
-
-    rslt->data->elem_bits = sizeof(*dst) * 8;
-
-    rc = KDataBufferResize( rslt->data, *num_reads );
-    if ( rc == 0 )
-    {
-        uint32_t idx;
-        dst = rslt->data->base;
-        for ( idx = 0; idx < *num_reads; ++idx )
-        {
-            uint32_t label_start = lbl_start [ idx ];
-            uint32_t label_len = lbl_len [ idx ];
-            size_t   label_used;
-            if ( label_start + label_len > label_max )
-            {
-                if ( label_start > label_max )
-                    label_start = label_len = 0;
-                else
-                    label_len = label_max - label_start;
-            }
-
-            dst[idx].seg.start = (uint16_t)read_start[idx];
-            dst[idx].seg.len = (uint16_t)read_len[idx];
-            dst[idx].type = read_type[idx] & SRA_READ_TYPE_BIOLOGICAL;
-            dst[idx].cs_key = cs_key[idx];
-
-            label_used = string_copy( dst[idx].label, sizeof(dst[idx].label), 
-                                      & label [ label_start ], label_len );
-            /* Pad with NULs so that bitcmp sees fully initialized data */
-            memset( dst[idx].label + label_used, '\0',
-                    sizeof(dst[idx].label) - label_used );        
-        }
-
-        rslt->elem_bits = sizeof(*dst) * 8;
-        rslt->elem_count = *num_reads;
-
-    }
-
-    return rc;
-}
-
-/*
- * function NCBI:SRA:ReadDesc NCBI:SRA:make_read_desc #1.0 ( U8 num_reads,
-    INSDC:coord:zero read_start, U32 read_len, INSDC:SRA:read_type read_type,
-    INSDC:SRA:read_filter read_filt, INSDC:dna:text cs_key,
-    INSDC:coord:zero label_start, U32 label_len, ascii label );
-
- */
-VTRANSFACT_IMPL( NCBI_SRA_make_read_desc, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt -> u . rf = make_read_desc;
-    rslt -> variant = vftRow;
-    return 0;
-}
diff --git a/libs/sraxf/read-seg-from-readn.c b/libs/sraxf/read-seg-from-readn.c
deleted file mode 100644
index 99bdf68..0000000
--- a/libs/sraxf/read-seg-from-readn.c
+++ /dev/null
@@ -1,361 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-#include <assert.h>
-
-#include "fix_read_seg_impl.h"
-
-/* readn_read_desc
- *  "nreads" [ DATA ] - bases for entire spot
- */
-typedef struct readn_read_desc readn_read_desc;
-struct readn_read_desc
-{
-    uint32_t read_type;
-    uint32_t read_start;
-    uint32_t read_len;
-    uint32_t label_start;
-    uint32_t label_len;
-};
-
-static
-rc_t CC equal_reads_from_spot ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    uint32_t i, end;
-    readn_read_desc *rdesc;
-    KDataBuffer *dst = rslt -> data;
-
-    const uint8_t *nreads = argv [ 0 ] . u . data . base;
-    const uint32_t *spot_len = argv [ 1 ] . u . data . base;
-    nreads += argv [ 0 ] . u . data . first_elem;
-    spot_len += argv [ 1 ] . u . data . first_elem;
-
-    dst -> elem_bits = sizeof * rdesc * 8;
-    rc = KDataBufferResize ( dst, * nreads );
-    if ( rc != 0 )
-        return rc;
-
-    rdesc = dst -> base;
-
-    assert ( * spot_len > 0 );
-    assert ( * nreads != 0 );
-
-    for ( i = end = 0; i < * nreads; ++ i )
-    {
-        uint32_t rem = * nreads - i;
-        uint32_t len = ( * spot_len - end + rem - 1 ) / rem;
-
-        rdesc [ i ] . read_type = SRA_READ_TYPE_BIOLOGICAL;
-        rdesc [ i ] . read_start = end;
-        rdesc [ i ] . read_len = len;
-        rdesc [ i ] . label_start = 0;
-        rdesc [ i ] . label_len = 0;
-
-        end += len;
-    }
-
-    rslt -> elem_count = * nreads;
-
-    return 0;
-}
-
-static
-rc_t CC read_seg_from_meta ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    uint8_t nreads;	
-    uint32_t spot_len;
-    const KDataBuffer *self = ( const void* ) data;
-    const readn_read_desc *rd_src = self->base;
-    KDataBuffer *dst = rslt -> data;
-    readn_read_desc *rd_dst;;
-
-    nreads   = ((uint8_t*) argv[0].u.data.base)[argv[0].u.data.first_elem];
-    spot_len = ((uint32_t*)argv[1].u.data.base)[argv[1].u.data.first_elem];
-    assert ( spot_len > 0 );
-    assert ( nreads > 0 );
-
-    rc = KDataBufferResize ( dst, nreads );
-    if(rc != 0)
-        return rc;
-
-    rd_dst = dst->base;
-
-    memcpy(rd_dst,rd_src,nreads*sizeof(*rd_dst));
-
-    /*** if not covered by equal_reads_from_spot() - valid for illumina consisting of bio reads only **/
-    if ( rd_dst[nreads-1].read_start+rd_dst[nreads-1].read_len==0)
-    {
-        int i;
-        rd_dst[0].read_start=0;
-        rd_dst[0].read_len=spot_len;
-        for(i=1;i<nreads;i++)
-        {
-            rd_dst[i].read_start=spot_len;
-            rd_dst[i].read_len=0;
-        }
-    }
-    /*** illumina stop reads before reaching designed cycles ***/
-    else if(rd_dst[nreads-1].read_start+rd_dst[nreads-1].read_len > spot_len)
-    {
-        int i;
-        for(i=0;i<nreads;i++)
-        {
-            if(rd_dst[i].read_start > spot_len)
-            {
-                rd_dst[i].read_start = spot_len;
-                rd_dst[i].read_len = 0;
-            }
-            else if(rd_dst[i].read_start + rd_dst[i].read_len > spot_len)
-            {
-                rd_dst[i].read_len = spot_len - rd_dst[i].read_start;
-            }
-        }
-    }
-    rslt -> elem_count = nreads;
-    return 0;
-}
-
-static
-rc_t parse_read_structure ( uint32_t idx, char *buf_val, readn_read_desc *rdesc )
-{
-    char    *rtype;
-    char    *pos;
-    int     fseqlen=0;
-    char    *ptr;
-    rc_t     rc;
-
-    memset(rdesc,0,sizeof(*rdesc));
-
-    pos = buf_val;
-
-    rtype = strsep( &pos, "|" );
-    if ( pos == NULL )
-    {
-        rc = RC ( rcSRA, rcTable, rcOpening, rcMetadata, rcCorrupt );
-        PLOGERR ( klogErr, ( klogErr, rc, "bad read struct '$(name)' = '$(value)'",
-                             "name=READ_%u,value=%s", idx, buf_val ));
-        return rc;
-    }
-
-    rdesc -> read_len = atoi ( pos );
-    strsep(&pos,"|");
-    if ( pos == NULL )
-    {
-        rc = RC ( rcSRA, rcTable, rcOpening, rcMetadata, rcCorrupt );
-        PLOGERR ( klogErr, ( klogErr, rc, "bad read struct '$(name)' = '$(value)'",
-                             "name=READ_%u,value=%s", idx, buf_val ));
-        return rc;
-    }
-
-    fseqlen = (int)strlen( pos );
-    if(fseqlen > 0)
-    {
-        if(pos[fseqlen-1]=='|') fseqlen--;
-        /* linker sequence is here */
-    }
-
-    switch ( rtype [ 0 ] )
-    {
-    case 'B':
-        rdesc -> read_type = SRA_READ_TYPE_BIOLOGICAL;
-        break;
-    case 'T':
-        rdesc -> read_type = SRA_READ_TYPE_TECHNICAL;
-        break;
-    default:
-        rc = RC ( rcSRA, rcTable, rcOpening, rcMetadata, rcCorrupt );
-        PLOGERR ( klogErr, ( klogErr, rc, "bad read struct '$(name)' = '$(value)'",
-                             "name=READ_%u,value=%s", idx, buf_val ));
-        return rc;
-    }
-    
-    pos=rtype;
-    ptr=strsep(&pos,":");
-    if( pos != NULL )
-    {
-        ptr=strsep(&pos,":");
-        /* label text is in ptr */
-        rdesc -> label_len = (uint32_t)strlen ( ptr );
-    }
-
-    return 0;
-}
-
-static
-void CC whack_data_buffer ( void *data )
-{
-    KDataBufferWhack ( data );
-    free ( data );
-}
-
-VTRANSFACT_IMPL ( NCBI_SRA_read_seg_from_readn, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    const KMetadata *meta;
-    rc_t rc = VTableOpenMetadataRead ( info -> tbl, & meta );
-    if ( rc == 0 )
-    {
-        KDataBuffer *fself;
-        readn_read_desc rd [ 16 ];
-        int32_t i, last, tech_read_cnt;
-
-        /* scan all metadata READ_N nodes */
-        for ( last = -1, i = 0; i < sizeof rd / sizeof rd [ 0 ] && rc ==0; ++ i )
-        {
-            const KMDataNode *node;
-
-            /* look for metadata descriptor */
-            rc = KMetadataOpenNodeRead ( meta, & node, "READ_%u", i );
-            if ( rc == 0 )
-            {
-                size_t bytes;
-                char str [ 4096 ];
-                rc = KMDataNodeReadCString ( node, str, sizeof str, & bytes );
-                KMDataNodeRelease ( node );
-                if ( rc == 0 )
-                {
-                    rc = parse_read_structure ( i, str, & rd [ i ] );
-                    if ( rc != 0 )
-                        break;
-                    last = i;
-                }
-            }
-
-        }
-
-        /* ignore all other errors */
-        rc = 0;
-
-        KMetadataRelease ( meta );
-
-        /* initial starts are always at 0 */
-        rd [ 0 ] . read_start = 0;
-        rd [ 0 ] . label_start = 0;
-
-        /* handle case when none-exist */
-        if ( last < 0 )
-        {
-            rslt -> u . ndf = equal_reads_from_spot;
-            rslt -> variant = vftNonDetRow;
-            return 0;
-        }
-
-        /* integrate lengths and count technical reads*/
-        for ( i = tech_read_cnt = 0; i < last; ++ i )
-        {
-            if ( rd [ i ] . read_type == SRA_READ_TYPE_TECHNICAL)
-                ++ tech_read_cnt;
-
-            rd [ i + 1 ] . read_start = rd [ i ] . read_start + rd [ i ] . read_len;
-            rd [ i + 1 ] . label_start = rd [ i ] . label_start + rd [ i ] . label_len;
-        }
-
-        /* temporary for cases where no read length has been given */
-        if ( tech_read_cnt == 0 && rd [ last ] . read_start + rd [ last ] . read_len == 0 )
-        {
-            rslt -> u . ndf = equal_reads_from_spot;
-            rslt -> variant = vftNonDetRow;
-            return 0;
-        }
-
-        /* now produce a static row */
-        fself = malloc ( sizeof * fself );
-        if ( fself == NULL )
-            rc = RC ( rcSRA, rcFunction, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KDataBufferMake ( fself, sizeof rd [ 0 ] * 8, ++ last );
-            if ( rc == 0 )
-            {
-                memcpy ( fself -> base, rd, last * sizeof rd [ 0 ] );
-                rslt -> self = fself;
-                rslt -> whack = whack_data_buffer;
-                rslt -> u . ndf = read_seg_from_meta;
-                rslt -> variant = vftNonDetRow;
-                return 0;
-            }
-
-            free ( fself );
-        }
-    }
-
-    return rc;
-}
-
-
-static
-rc_t CC fix_read_seg ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-
-    const uint16_t *rs_src = argv [ 0 ] . u . data . base;
-    const uint32_t nreads = argv [ 0 ] . u . data . elem_count;
-    const uint32_t *spot_lenp = argv [ 1 ] . u . data . base;
-    const uint32_t spot_len = spot_lenp [ argv [ 1 ] . u . data . first_elem ];
-
-    rs_src += argv [ 0 ] . u . data . first_elem;
-
-    assert ( spot_len > 0 );
-    assert ( nreads > 0);
-    
-    rc = KDataBufferResize ( rslt -> data, nreads );
-    if ( rc == 0 )
-    {
-        uint32_t * rs_dst = rslt -> data -> base;
-        fix_read_seg_impl(rs_src, nreads, spot_len, rs_dst);
-        rslt -> elem_count = nreads;
-    }
-    return rc;
-}
-
-VTRANSFACT_IMPL ( NCBI_SRA_fix_read_seg, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt -> variant = vftRow;
-    rslt -> u . rf = fix_read_seg;
-    return 0;
-}
diff --git a/libs/sraxf/rewrite-spot-name.c b/libs/sraxf/rewrite-spot-name.c
deleted file mode 100644
index 9af749e..0000000
--- a/libs/sraxf/rewrite-spot-name.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-
-#define SLX_COORD_LEN 10
-
-static
-int non_braindead_atoi ( const char *start, const char *end )
-{
-    int val = start [ 0 ] - '0';
-    uint32_t i, count = (uint32_t)( end - start );
-    for ( i = 1; i < count; ++ i )
-    {
-        val *= 10;
-        val += start [ i ] - '0';
-    }
-    return val;
-}
-
-static
-int scan_hex ( const char *str, int count )
-{
-    int i, val = str [ 0 ] - '0';
-    if ( val > 9 )
-        val = toupper ( str [ 0 ] ) - 'A' + 10;
-    for ( i = 1; i < count; ++ i )
-    {
-        int d = str [ i ] - '0';
-        if ( d > 9 )
-            d = toupper ( str [ i ] ) - 'A' + 10;
-        val = val << 4 | d;
-    }
-    return val;
-}
-
-static
-rc_t CC illumina_rewrite_spot_name ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    char buffer [ 64];
-    uint32_t coord_len;
-    uint32_t prefix_len;
-    unsigned int a, b, c, d;
-    KDataBuffer *dst = rslt -> data;
-
-    const char *prefix;
-    const char *skey = argv [ 0 ] . u . data . base;
-    uint64_t i, j, count = argv [ 0 ] . u . data . elem_count;
-    
-    skey += argv [ 0 ] . u . data . first_elem;
-
-    /* find last hex portion */
-    for ( i = count; i > 0; )
-    {
-        if ( ! isxdigit ( skey [ -- i ] ) )
-            break;
-    }
-
-    if ( count - i < ( SLX_COORD_LEN - 1 ) )
-    {
-        const char *end = skey + count;
-
-        /* new format */
-        for ( d = 0, j = 0, i = count; i > 0; )
-        {
-            if ( ! isdigit ( skey [ -- i ] ) )
-            {
-                j = i + 1;
-                break;
-            }
-        }
-        d = non_braindead_atoi ( & skey [ j ], end );
-        for ( c = 0, j = 0; i > 0; )
-        {
-            if ( ! isdigit ( skey [ -- i ] ) )
-            {
-                j = i + 1;
-                break;
-            }
-        }
-        c = atoi ( & skey [ j ] );
-        for ( b = 0, j = 0; i > 0; )
-        {
-            if ( ! isdigit ( skey [ -- i ] ) )
-            {
-                j = i + 1;
-                break;
-            }
-        }
-        b = atoi ( & skey [ j ] );
-        for ( a = 0, j = 0; i > 0; )
-        {
-            if ( ! isdigit ( skey [ -- i ] ) )
-            {
-                j = i + 1;
-                break;
-            }
-        }
-        a = atoi ( & skey [ j ] );
-        if ( j > 0 )
-        {
-            if ( i > 0 )
-                -- i;
-            while ( isalpha ( skey [ i ] ) )
-                ++ i;
-        }
-    }
-    else
-    {
-        a = scan_hex ( skey, 1 );
-        b = scan_hex ( & skey [ 1 ], 3 );
-        c = scan_hex ( & skey [ 4 ], 3 );
-        d = scan_hex ( & skey [ 7 ], 3 );
-        if ( count > SLX_COORD_LEN )
-        {
-            i = count - SLX_COORD_LEN;
-        }
-    }
-
-    /* generate coordinates */
-    coord_len = sprintf ( buffer, ":%d:%d:%d:%d", a, b, c, d );
-
-    /* get size of prefix */
-    if ( argc == 1 )
-    {
-        prefix = "";
-        prefix_len = 0;
-    }
-    else
-    {
-        prefix = argv [ 1 ] . u . data . base;
-        assert(argv [ 1 ] . u . data . elem_count >> 32 == 0);
-        prefix_len = (uint32_t)argv [ 1 ] . u . data . elem_count;
-        prefix += argv [ 1 ] . u . data . first_elem;
-    }
-
-    /* resize output buffer for prefix, name stuff, coordinates */
-    if ( dst -> elem_bits != 8 )
-    {
-        rc = KDataBufferCast ( dst, dst, 8, true );
-        if ( rc != 0 )
-            return rc;
-    }
-    rc = KDataBufferResize ( dst, prefix_len + i + coord_len + 1 );
-    if ( rc != 0 )
-        return rc;
-
-    /* copy in prefix, name prefix, coordinates */
-    rslt -> elem_count = sprintf ( dst -> base, "%.*s%.*s%s"
-        , ( int ) prefix_len, prefix
-        , ( int ) i, skey
-        , buffer );
-
-    return 0;
-}
-
-/* rewrite_spot_name
- *  given an old spotname directly from skey
- *  write according to platform rules, optionally with a prefix
- *
- *  "platform" [ CONST ] - which platform rules to use
- *
- *  "skey" [ DATA ] - skey string for row
- *
- *  "prefix" [ DATA, OPTIONAL ] - prefix for spot
- */
-VTRANSFACT_IMPL ( NCBI_SRA_rewrite_spot_name, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    const uint8_t *platform = cp -> argv [ 0 ] . data . u8;
-    switch ( platform [ 0 ] )
-    {
-    case SRA_PLATFORM_ILLUMINA:
-        break;
-    default:
-        return RC ( rcSRA, rcFunction, rcConstructing, rcType, rcUnsupported );
-    }
-
-    rslt -> u . ndf = illumina_rewrite_spot_name;
-    rslt -> variant = vftNonDetRow;
-    return 0;
-}
diff --git a/libs/sraxf/rotate.c b/libs/sraxf/rotate.c
deleted file mode 100644
index bf9e0a7..0000000
--- a/libs/sraxf/rotate.c
+++ /dev/null
@@ -1,271 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-
-typedef void (*rotate_f)(void *dst, uint64_t offset, const void *src, const void *Cntrl, uint64_t vec_count);
-typedef struct self_t {
-    rotate_f f;
-} self_t;
-
-#define ROT_0(A, B) A = B
-#define ROT_1(A, B) do { (A).data[0] = (B).data[1]; (A).data[1] = (B).data[2]; (A).data[2] = (B).data[3]; (A).data[3] = (B).data[0]; } while (0)
-#define ROT_2(A, B) do { (A).data[0] = (B).data[2]; (A).data[1] = (B).data[3]; (A).data[2] = (B).data[0]; (A).data[3] = (B).data[1]; } while (0)
-#define ROT_3(A, B) do { (A).data[0] = (B).data[3]; (A).data[1] = (B).data[0]; (A).data[2] = (B).data[1]; (A).data[3] = (B).data[2]; } while (0)
-
-#define UNFUNC(VALTYPE) UNF_ ## VALTYPE
-
-#define UNFUNC_DEF(VALTYPE) \
-static void UNFUNC(VALTYPE)(void *Dst, uint64_t offset, const void *Src, const void *Cntrl, uint64_t count) { \
-    typedef struct { VALTYPE data[4]; } data4_t; \
-    data4_t *dst = (data4_t *)Dst; \
-    const data4_t *src = (const data4_t *)Src; \
-    const uint8_t *cntrl = (const uint8_t *)Cntrl; \
-    uint64_t i; \
-    dst += offset; \
-    for (i = 0; i != count; ++i) { \
-        switch(cntrl[i]) { \
-        default: \
-        case 0: \
-            ROT_0(dst[i], src[i]); \
-            break; \
-        case 1: \
-            ROT_3(dst[i], src[i]); \
-            break; \
-        case 2: \
-            ROT_2(dst[i], src[i]); \
-            break; \
-        case 3: \
-            ROT_1(dst[i], src[i]); \
-            break; \
-        }\
-    } \
-}
-
-#define FUNC(VALTYPE) F_ ## VALTYPE
-
-#define FUNC_DEF(VALTYPE) \
-static void FUNC(VALTYPE)(void *Dst, uint64_t offset, const void *Src, const void *Cntrl, uint64_t count) { \
-    typedef struct { VALTYPE data[4]; } data4_t; \
-    data4_t *dst = (data4_t *)Dst; \
-    const data4_t *src = (const data4_t *)Src; \
-    const uint8_t *cntrl = (const uint8_t *)Cntrl; \
-    uint64_t i; \
-    dst += offset; \
-    for (i = 0; i != count; ++i) { \
-        switch(cntrl[i]) { \
-        default: \
-        case 0: \
-            ROT_0(dst[i], src[i]); \
-            break; \
-        case 1: \
-            ROT_1(dst[i], src[i]); \
-            break; \
-        case 2: \
-            ROT_2(dst[i], src[i]); \
-            break; \
-        case 3: \
-            ROT_3(dst[i], src[i]); \
-            break; \
-        }\
-    } \
-}
-
-FUNC_DEF(float)
-FUNC_DEF(double)
-FUNC_DEF(uint8_t)
-FUNC_DEF(uint16_t)
-FUNC_DEF(uint32_t)
-FUNC_DEF(uint64_t)
-FUNC_DEF(int8_t)
-FUNC_DEF(int16_t)
-FUNC_DEF(int32_t)
-FUNC_DEF(int64_t)
-
-UNFUNC_DEF(float)
-UNFUNC_DEF(double)
-UNFUNC_DEF(uint8_t)
-UNFUNC_DEF(uint16_t)
-UNFUNC_DEF(uint32_t)
-UNFUNC_DEF(uint64_t)
-UNFUNC_DEF(int8_t)
-UNFUNC_DEF(int16_t)
-UNFUNC_DEF(int32_t)
-UNFUNC_DEF(int64_t)
-
-static
-rc_t CC rotate_drvr (
-                     void *Self,
-                     const VXformInfo *info,
-                     int64_t row_id,
-                     const VFixedRowResult *rslt,
-                     uint32_t argc,
-                     const VRowData argv []
-                     )
-{
-    const void *src;
-    const void *cntrl;
-    const self_t *self = (const self_t *)Self;
-    
-    assert(argv[0].u.data.elem_bits % 8 == 0);
-    assert(argv[1].u.data.elem_bits % 8 == 0);
-    
-    src   = &((const uint8_t *)argv[0].u.data.base)[(argv[0].u.data.first_elem * argv[0].u.data.elem_bits) / 8];
-    cntrl = &((const uint8_t *)argv[1].u.data.base)[(argv[1].u.data.first_elem * argv[1].u.data.elem_bits) / 8];
-    
-    self->f(rslt->base, rslt->first_elem, src, cntrl, rslt->elem_count);
-    
-    return 0;
-}
-
-static
-void CC sraxf_rotate_free_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-/* 
- * function < type T > T [ 4 ] NCBI:SRA:rotate #1 < bool encode > ( T [ 4 ] in, U8 called );
- */
-VTRANSFACT_IMPL ( NCBI_SRA_rotate, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    self_t *self;
-    bool encode;
-    
-    assert(cp->argc == 1);
-    assert(cp->argv[0].desc.domain == vtdBool);
-    assert(cp->argv[0].count == 1);
-    encode = cp->argv[0].data.b[0];
-    
-    switch (info->fdesc.desc.domain) {
-    case vtdInt:
-    case vtdUint:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 8:
-        case 16:
-        case 32:
-        case 64:
-            break;
-        default:
-            return RC(rcXF, rcFunction, rcConstructing, rcType, rcInvalid);
-            break;
-        }
-        break;
-    case vtdFloat:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 32:
-        case 64:
-            break;
-        default:
-            return RC(rcXF, rcFunction, rcConstructing, rcType, rcInvalid);
-            break;
-        }
-        break;
-    default:
-        return RC(rcXF, rcFunction, rcConstructing, rcType, rcInvalid);
-        break;
-    }
-    
-    self = malloc(sizeof(*self));
-    if (self) {
-        switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 8:
-                self->f = encode ? FUNC(int8_t) : UNFUNC(int8_t);
-                break;
-            case 16:
-                self->f = encode ? FUNC(int16_t) : UNFUNC(int16_t);
-                break;
-            case 32:
-                self->f = encode ? FUNC(int32_t) : UNFUNC(int32_t);
-                break;
-            case 64:
-                self->f = encode ? FUNC(int64_t) : UNFUNC(int64_t);
-                break;
-            default:
-                break;
-            }
-            break;
-        case vtdUint:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 8:
-                self->f = encode ? FUNC(uint8_t) : UNFUNC(uint8_t);
-                break;
-            case 16:
-                self->f = encode ? FUNC(uint16_t) : UNFUNC(uint16_t);
-                break;
-            case 32:
-                self->f = encode ? FUNC(uint32_t) : UNFUNC(uint32_t);
-                break;
-            case 64:
-                self->f = encode ? FUNC(uint64_t) : UNFUNC(uint64_t);
-                break;
-            default:
-                break;
-            }
-            break;
-        case vtdFloat:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 32:
-                self->f = encode ? FUNC(float) : UNFUNC(float);
-                break;
-            case 64:
-                self->f = encode ? FUNC(double) : UNFUNC(double);
-                break;
-            default:
-                break;
-            }
-            break;
-        default:
-            break;
-        }
-        
-        rslt->self = self;
-        rslt->whack = sraxf_rotate_free_wrapper;
-        rslt->u.pf = rotate_drvr;
-        rslt->variant = vftFixedRow;
-        
-        return 0;
-    }
-    return RC(rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted);
-}
diff --git a/libs/sraxf/spot-desc.c b/libs/sraxf/spot-desc.c
deleted file mode 100644
index 9a98fd0..0000000
--- a/libs/sraxf/spot-desc.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <string.h>
-#include <assert.h>
-
-static
-rc_t CC make_spot_desc ( void *self, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    const uint32_t *spot_len   = argv[0].u.data.base;
-    const uint32_t *fixed_len  = argv[1].u.data.base;
-    const uint32_t *sig_len    = argv[2].u.data.base;
-    const int32_t *trim_start  = argv[3].u.data.base;
-    const uint32_t *trim_len   = argv[4].u.data.base;
-    const uint8_t *num_reads   = argv[5].u.data.base;
-
-    SRASpotDesc *dst;
-
-    num_reads += argv[5].u.data.first_elem; /* valid for argv[0].u.data.elem_count */
-    assert( argv[5].u.data.elem_bits == (sizeof( *num_reads ) * 8 ) );
-
-    spot_len += argv[0].u.data.first_elem;
-    assert( argv[0].u.data.elem_bits == (sizeof( *spot_len ) * 8 ) );
-
-    fixed_len += argv[1].u.data.first_elem;
-    assert( argv[1].u.data.elem_bits == (sizeof( *fixed_len ) * 8 ) );
-
-    sig_len += argv[2].u.data.first_elem;
-    assert( argv[2].u.data.elem_bits == (sizeof( *sig_len ) * 8 ) );
-
-    trim_start += argv[3].u.data.first_elem;
-    assert( argv[3].u.data.elem_bits == (sizeof( *trim_start ) * 8 ) );
-
-    trim_len += argv[4].u.data.first_elem;
-    assert( argv[4].u.data.elem_bits == (sizeof( *trim_len ) * 8 ) );
-
-    rslt->data->elem_bits = sizeof(*dst) * 8;
-
-    rc = KDataBufferResize( rslt->data, 1 );
-    if ( rc == 0 )
-    {
-        dst = rslt->data->base;
-        dst->spot_len = (uint16_t)spot_len[0];
-        dst->fixed_len = (uint16_t)fixed_len[0];
-        dst->signal_len = (uint16_t)sig_len[0];
-        dst->clip_qual_right = (uint16_t)( trim_start[0]+trim_len[0] );
-        dst->num_reads = num_reads[0];
-
-        memset( dst->align, 0, sizeof( dst->align ) );
-        
-        rslt->elem_bits = sizeof(*dst) * 8;
-        rslt->elem_count = 1;
-    }
-
-    return rc;
-}
-
-/*
-  function NCBI:SRA:SpotDesc NCBI:SRA:make_spot_desc
-       ( U32 spot_len, U32 fixed_len,  U32 sig_len,
-        INSDC:coord:zero trim_start, U32 trim_len, U8 num_reads )
-
- */
-VTRANSFACT_IMPL( NCBI_SRA_make_spot_desc, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt -> u . rf = make_spot_desc;
-    rslt -> variant = vftRow;
-    return 0;
-}
diff --git a/libs/sraxf/stat_mod.c b/libs/sraxf/stat_mod.c
deleted file mode 100644
index b87ae3f..0000000
--- a/libs/sraxf/stat_mod.c
+++ /dev/null
@@ -1,392 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <klib/text.h>
-
-#include <sysalloc.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#include "stat_mod.h"
-
-#define N_QUAL_VALUES 41
-#define N_DIMER_VALUES 17
-#define N_GC_VALUES 16
-#define N_HP_VALUES 25
-#define COUNTER_BLOCK_SIZE 100
-
-#define CASE_MATCH      0
-#define CASE_IGNORE     1
-#define CASE_MISMATCH   2
-#define CASE_INSERT     4
-#define CASE_DELETE     8
-
-typedef struct counter
-{
-    uint32_t count;
-} counter;
-
-
-typedef struct counter_vector
-{
-    counter *v;
-    uint32_t n_counters;
-} counter_vector;
-
-
-typedef struct spotgrp
-{
-    BSTNode node;
-    const String *name;
-    counter_vector cnv[ N_DIMER_VALUES ][ N_GC_VALUES ][ N_HP_VALUES ][ N_QUAL_VALUES ];
-} spotgrp;
-
-/******************************************************************************
-    for the spot-group ( tree-node ), contains a tree of counter's
-******************************************************************************/
-static void CC whack_spotgroup( BSTNode *n, void *data )
-{
-    spotgrp * sg = ( spotgrp * )n;
-    uint32_t idx, count;
-    count = ( ( sizeof sg->cnv ) / sizeof( sg->cnv[0] ) );
-    for ( idx = 0; idx < count; ++idx )
-    {
-        counter_vector * cv = (counter_vector *)&( sg->cnv[ idx ] );
-        if ( cv->v != NULL )
-        {
-            free( cv->v );
-        }
-    }
-    if ( sg->name != NULL )
-        StringWhack ( sg->name );
-    free( n );
-}
-
-
-static spotgrp * make_spotgrp( const char *src, const size_t len )
-{
-    spotgrp * sg = calloc( 1, sizeof sg[ 0 ] );
-    if ( sg != NULL )
-    {
-        String s;
-        StringInit( &s, src, len, len );
-        if ( StringCopy ( &sg->name, &s ) != 0 )
-        {
-            free( sg );
-            sg = NULL;
-        }
-    }
-    return sg;
-}
-
-
-static int64_t CC spotgroup_find( const void *item, const BSTNode *n )
-{
-    spotgrp * sg = ( spotgrp* ) n;
-    return StringCompare ( ( String* ) item, sg->name );
-}
-
-
-static spotgrp * find_spotgroup( statistic *self, const char *src, const size_t len )
-{
-    String s;
-    BSTNode *node;
-
-    StringInit( &s, src, len, len );
-    if ( self->last_used_spotgroup != NULL )
-    {
-        spotgrp * sg = ( spotgrp* )self->last_used_spotgroup;
-        if ( StringCompare ( &s, sg->name ) == 0 )
-            return sg;
-    }
-
-    node = BSTreeFind ( &self->spotgroups, &s, spotgroup_find );
-    if ( node == NULL )
-        return NULL;
-    else
-    {
-        self->last_used_spotgroup = node;
-        return ( spotgrp *) node;
-    }
-}
-
-
-static rc_t spotgroup_enter_values( spotgrp * spotgroup,
-                                    uint8_t const quality,
-                                    uint8_t const dimer_code,
-                                    uint8_t const gc_content,
-                                    uint8_t const hp_run,
-                                    uint32_t const cycle,
-                                    uint8_t const rd_case)
-{
-    uint8_t q = quality;
-    uint8_t d = dimer_code;
-    uint8_t g = gc_content;
-    uint8_t h = hp_run;
-    counter_vector * cv;
-
-    if ( q >= N_QUAL_VALUES ) q = ( N_QUAL_VALUES - 1 );
-    if ( d >= N_DIMER_VALUES ) d = ( N_DIMER_VALUES - 1 );
-    if ( g >= N_GC_VALUES ) g = ( N_GC_VALUES - 1 );
-    if ( h >= N_HP_VALUES ) h = ( N_HP_VALUES - 1 );
-    cv = &( spotgroup->cnv[ d ][ g ][ h ][ q ] );
-
-    if ( cv->v ==  NULL )
-    {
-        /* the counter-block was not used before at all */
-        cv->n_counters = ( ( cycle / COUNTER_BLOCK_SIZE ) + 1 ) * COUNTER_BLOCK_SIZE;
-        cv->v = calloc( cv->n_counters, sizeof cv->v[0] );
-        if ( cv->v == NULL )
-            return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted );
-    }
-    else
-    {
-        if ( cycle >= cv->n_counters )
-        {
-            /* the counter-block has to be extended */
-            void * tmp;
-            uint32_t org_len = cv->n_counters;
-            counter *to_zero_out;
-            
-            cv->n_counters = ( ( cycle / COUNTER_BLOCK_SIZE ) + 1 ) * COUNTER_BLOCK_SIZE;
-            /* prevent from leaking memory by capturing the new pointer in temp. var. */
-            tmp = realloc( cv->v, cv->n_counters * ( sizeof cv->v[0] ) );
-            if ( tmp == NULL )
-	            return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted );
-
-			/* the added part has to be set to zero */
-			to_zero_out = tmp;
-			to_zero_out += org_len;
-			memset( to_zero_out, 0, ( cv->n_counters - org_len ) * ( sizeof *to_zero_out ) );
-			cv->v = tmp;
-        }
-    }
-    assert( cycle < cv->n_counters );
-
-    {
-        counter * cnt = &( cv->v[ cycle ] );
-        
-        ++cnt->count;
-    }
-    return 0;
-}
-
-
-static int64_t CC spotgroup_sort( const BSTNode *item, const BSTNode *n )
-{
-    spotgrp * sg1 = ( spotgrp* ) item;
-    spotgrp * sg2 = ( spotgrp* ) n;
-    return StringCompare ( sg1->name, sg2->name );
-}
-
-
-/******************************************************************************
-    for the statistic ( tree-node ), contains a tree of spot-groups's
-******************************************************************************/
-
-
-rc_t make_statistic( statistic *self,
-                     uint32_t gc_window,
-                     bool has_alignments )
-{
-    memset( self, 0, sizeof *self );
-    
-    BSTreeInit( &self->spotgroups );
-    self->last_used_spotgroup = NULL;
-    self->gc_window = gc_window > N_GC_VALUES ? N_GC_VALUES : gc_window;
-    
-    return 0;
-}
-
-
-void whack_statistic( statistic *self )
-{
-    BSTreeWhack ( &self->spotgroups, whack_spotgroup, NULL );
-}
-
-static rc_t validate_row_data(statistic const *self, 
-                              row_input const *row_data)
-{
-    rc_t rc = RC(rcXF, rcFunction, rcExecuting, rcData, rcInvalid);
-    unsigned const n_bases = row_data->read_len;
-    
-    if (row_data->read == NULL || row_data->quality == NULL) {
-        return rc;
-    }
-    if (n_bases != row_data->quality_len) {
-        return rc;
-    }
-    return 0;
-}
-
-rc_t extract_statistic_from_row(statistic *self, 
-                                row_input const *data)
-{
-    rc_t rc = 0;
-    spotgrp *sg;
-    char const *spotgrp_base;
-    uint32_t spotgrp_len;
-    unsigned i;
-    uint8_t lb = 4;
-    unsigned hpr = 0;
-    unsigned gcc = 0;
-    
-    if (data == NULL) {
-        return RC(rcXF, rcFunction, rcExecuting, rcParam, rcNull);
-    }
-    if (self == NULL) {
-        return RC(rcXF, rcFunction, rcExecuting, rcSelf, rcNull);
-    }
-    rc = validate_row_data(self, data);
-    if (rc)
-        return rc;
-    
-    spotgrp_base = data->spotgroup;
-    spotgrp_len = data->spotgroup_len;
-    
-    if (spotgrp_base == NULL || spotgrp_len == 0) {
-        spotgrp_base = "";
-        spotgrp_len = 0;
-    }
-
-    sg = find_spotgroup( self, spotgrp_base, spotgrp_len );
-    if ( sg == NULL )
-    {
-        sg = make_spotgrp( spotgrp_base, spotgrp_len );
-        if ( sg == NULL )
-        {
-            return RC( rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted );
-        }
-        else
-        {
-            rc = BSTreeInsert ( &self->spotgroups, (BSTNode *)sg, spotgroup_sort );
-            if (rc)
-                return rc;
-        }
-    }
-    for (i = 0; i < data->read_len && rc == 0; ++i) {
-        unsigned const base = data->read[i];
-        unsigned dimer;
-
-        if (base > 3) {
-            dimer = 16;
-            hpr = 0;
-        }
-        else {
-            dimer = (lb > 3) ? 16 : ((lb << 2) | base);
-            if (lb == base)
-                ++hpr;
-            else
-                hpr = 0;
-        }
-        if (i > 0)
-            rc = spotgroup_enter_values(sg, data->quality[i], dimer, gcc, hpr, data->base_pos_offset + i, CASE_MATCH);
-
-        if (base == 1 || base == 2)
-            ++gcc;
-        if (i >= self->gc_window) {
-            unsigned const out = data->read[i - self->gc_window];
-            
-            if (out == 1 || out == 2)
-                --gcc;
-        }
-        lb = base;
-	}
-    return rc;
-}
-
-
-typedef struct iter_ctx
-{
-    bool ( CC * f ) ( stat_row const * row, void *data );
-    void * data;
-    const char * name;
-    bool run;
-    stat_row row;
-    uint64_t n;
-} iter_ctx;
-
-
-static bool CC spotgroup_iter( BSTNode *n, void *data )
-{
-    spotgrp *sg = ( spotgrp * ) n;
-    iter_ctx *ctx = ( iter_ctx * )data;
-    static char const *dimer_chars[] = {
-        "AA", "AC", "AG", "AT",
-        "CA", "CC", "CG", "CT",
-        "GA", "GC", "GG", "GT",
-        "TA", "TC", "TG", "TT",
-        "NN"
-    };
-
-    ctx->row.spotgroup = (char *)sg->name->addr;
-    for ( ctx->row.quality = 0; ctx->row.quality < N_QUAL_VALUES && ctx->run; ++ctx->row.quality )
-    {
-        uint8_t dimer_nr;
-        for ( dimer_nr = 0; dimer_nr < N_DIMER_VALUES && ctx->run; ++dimer_nr )
-        {
-            ctx->row.dimer = dimer_chars[dimer_nr];
-            for( ctx->row.gc_content = 0; ctx->row.gc_content < N_GC_VALUES; ++ctx->row.gc_content )
-            {
-                for ( ctx->row.hp_run = 0; ctx->row.hp_run < N_HP_VALUES && ctx->run; ++ctx->row.hp_run )
-                {
-                    uint32_t pos;
-                    counter_vector * cv = &sg->cnv[ dimer_nr ][ ctx->row.gc_content ][ ctx->row.hp_run ][ ctx->row.quality ];
-                    for ( pos = 0; pos < cv->n_counters; ++pos )
-                    {
-                        counter * c = &cv->v[ pos ];
-                        if ( c->count > 0 )
-                        {
-                            ctx->row.base_pos = pos;
-                            ctx->row.count = c->count;
-
-                            ctx->run = ctx->f( &ctx->row, ctx->data );
-                            ctx->n++;
-                         }
-                    }
-                }
-            }
-        }
-    }
-    return( !ctx->run );
-}
-
-
-uint64_t foreach_statistic( statistic * self,
-    bool ( CC * f ) ( stat_row const * row, void * f_data ), void *f_data )
-{
-    iter_ctx ctx;
-    ctx.f = f;
-    ctx.data = f_data;
-    ctx.run = true;
-    ctx.n = 0;
-    BSTreeDoUntil ( &self->spotgroups, false, spotgroup_iter, &ctx );
-    return ctx.n;
-}
diff --git a/libs/sraxf/stat_mod.h b/libs/sraxf/stat_mod.h
deleted file mode 100644
index 879d99f..0000000
--- a/libs/sraxf/stat_mod.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/defs.h>
-#include <klib/container.h>
-#include <klib/data-buffer.h>
-
-#define COUNT_INDELS 0
-
-typedef struct row_input
-{
-    char const * spotgroup;
-    uint32_t spotgroup_len;
-
-    uint8_t const * read;
-    uint32_t read_len;
-
-    uint8_t const * quality;
-    uint32_t quality_len;
-
-    uint32_t base_pos_offset;
-} row_input;
-
-
-typedef struct stat_row
-{
-    char const *spotgroup;
-    char const *dimer;
-    uint32_t base_pos;
-    uint32_t count;
-    uint8_t quality;
-    uint8_t hp_run;
-    uint8_t gc_content;
-} stat_row;
-
-
-typedef struct statistic
-{
-    void * last_used_spotgroup;
-    uint32_t gc_window;
-    BSTree spotgroups;      /* the tree contains 'spotgrp'-node, it collects the statistic */
-} statistic;
-
-
-/*************** the STATISTIC GATHERER ***************/
-rc_t make_statistic( statistic *data,
-                     uint32_t gc_window,
-                     bool ignore_mismatches );
-
-
-rc_t extract_statistic_from_row( statistic * data, 
-                                 row_input const *row_data);
-
-uint64_t foreach_statistic( statistic * data,
-    bool ( CC * f ) ( stat_row const * row, void * f_data ), void *f_data );
-
-void whack_statistic( statistic *data );
diff --git a/libs/sraxf/stats.c b/libs/sraxf/stats.c
deleted file mode 100644
index 6877a18..0000000
--- a/libs/sraxf/stats.c
+++ /dev/null
@@ -1,764 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <kdb/meta.h>
-#include <os-native.h> /* strncasecmp */
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-#define MAX_GROUP_COUNT (30000u)
-#define STATS_NODE_NAME_ATTR "name"
-
-static int string_buffer_add(KDataBuffer *const self,
-                             unsigned const len, char const name[/* len */])
-{
-    size_t const rslt = self->elem_count;
-    size_t const newsize = rslt + len;
-    
-    if (KDataBufferResize(self, newsize) != 0)
-        return -1;
-    
-#if 1
-    PLOGMSG(klogInfo, (klogInfo, "New spot group '$(NAME)'", "NAME=%.*s", (int)len, name));
-#endif
-    
-    memcpy(((char *)self->base) + rslt, name, len);
-    
-    return (int)rslt;
-}
-
-typedef uint64_t count_t;
-typedef int64_t spot_t;
-#define MAX_SPOT_ID INT64_MAX
-#define MIN_SPOT_ID INT64_MIN
-
-typedef struct group_stats_s group_stats_t;
-typedef struct stats_data_s stats_data_t;
-
-struct group_stats_s {
-    count_t spot_count;
-    count_t base_count;
-    count_t bio_base_count;
-    count_t cmp_base_count;
-    spot_t  spot_min;
-    spot_t  spot_max;
-    unsigned name_offset;
-    unsigned name_len;
-    unsigned node_name;
-};
-
-static void group_stats_init(group_stats_t *const self,
-                             unsigned const offset,
-                             unsigned const length,
-                             unsigned const node_name)
-{
-    memset(self, 0, sizeof(*self));
-    self->name_offset = offset;
-    self->name_len = length;
-    self->node_name = node_name;
-    self->spot_min = MAX_SPOT_ID;
-    self->spot_max = MIN_SPOT_ID;
-}
-
-#define STATS_DATA_MRU_COUNT 3
-struct stats_data_s {
-    rc_t (*update)(stats_data_t *self,
-                   int64_t spot_id,
-                   uint32_t spot_len,
-                   uint32_t bio_spot_len,
-                   uint32_t cmp_spot_len,
-                   const char *grp,
-                   uint64_t grp_len);
-    rc_t (*write)(group_stats_t const *const self, KMDataNode *const node);
-    rc_t (*write_all)(stats_data_t *const self);
-    KMetadata *meta;
-    KDataBuffer names;
-    KDataBuffer group;
-    unsigned count;
-    group_stats_t *mru[STATS_DATA_MRU_COUNT];
-    group_stats_t table;
-    group_stats_t deflt;
-};
-
-static char *get_name(stats_data_t *const self, unsigned const idx)
-{
-    return ((char *)self->names.base) + idx;
-}
-
-static group_stats_t *get_group(stats_data_t *const self, unsigned const idx)
-{
-    return ((group_stats_t *)self->group.base) + idx;
-}
-
-static void stats_data_invald_mru(stats_data_t *const self) {
-    memset(self->mru, 0, sizeof(self->mru));
-}
-
-static void stats_data_update_mru(stats_data_t *const self, group_stats_t *const mru)
-{
-    if (self->mru[0] != mru) {
-        group_stats_t *newmru[STATS_DATA_MRU_COUNT];
-        unsigned di;
-        unsigned si;
-        
-        memset(newmru, 0, sizeof(self->mru));
-        newmru[0] = mru;
-        for (di = 1, si = 0; di < STATS_DATA_MRU_COUNT && si < STATS_DATA_MRU_COUNT; ++si) {
-            group_stats_t *const u = self->mru[si];
-            
-            if (u != mru) {
-                newmru[di] = u;
-                ++di;
-            }
-        }
-        memcpy(self->mru, newmru, sizeof(newmru));
-    }
-}
-
-static int stats_data_name_cmp(stats_data_t *const self,
-                               group_stats_t const *const B,
-                               unsigned const Alen,
-                               char const Aname[])
-{
-    unsigned const Blen = B->name_len;
-    char const *const Bname = get_name(self, B->name_offset);
-    unsigned Ai;
-    unsigned Bi;
-    
-    for (Ai = Bi = 0; Ai < Alen && Bi < Blen; ++Ai, ++Bi) {
-        int const a = toupper(Aname[Ai]);
-        int const b = toupper(Bname[Bi]);
-        int const diff = a - b;
-        
-        if (diff != 0)
-            return diff;
-    }
-    return Alen - Blen;
-}
-
-static int stats_data_name_cmp_idx(stats_data_t *const self,
-                                   unsigned const idx,
-                                   unsigned const Alen,
-                                   char const Aname[])
-{
-    group_stats_t const *const B = get_group(self, idx);
-    return stats_data_name_cmp(self, B, Alen, Aname);
-}
-
-/* the return value is either where name was found or where it should go */
-static unsigned stats_data_search(stats_data_t *const self,
-                                        unsigned const len,
-                                        char const name[])
-{
-    unsigned f = 0;
-    unsigned e = self->count;
-    
-    while (f < e) {
-        unsigned const m = f + (e - f) / 2;
-        int const diff = stats_data_name_cmp_idx(self, m, len, name);
-        
-        if (diff < 0)
-            e = m;
-        else if (diff > 0)
-            f = m + 1;
-        else
-            return m;
-    }
-    return f;
-}
-
-static group_stats_t *stats_data_get_group(stats_data_t *const self,
-                                           unsigned const len,
-                                           char const name[])
-{
-    unsigned i;
-    unsigned which;
-    group_stats_t *fnd;
-    
-    for (i = 0; i < STATS_DATA_MRU_COUNT && i < self->count; ++i) {
-        group_stats_t *const k = self->mru[i];
-        
-        if (k && stats_data_name_cmp(self, k, len, name) == 0) {
-            fnd = k;
-            goto UPDATE_MRU;
-        }
-    }
-    which = stats_data_search(self, len, name);
-    if (which < self->count && stats_data_name_cmp_idx(self, which, len, name) == 0)
-        fnd = get_group(self, which);
-    else {
-        int const offset = string_buffer_add(&self->names, len, name);
-        unsigned const move = self->count - which;
-        
-        if (offset < 0)
-            return NULL;
-        
-        if (++self->count > MAX_GROUP_COUNT)
-            return get_group(self, MAX_GROUP_COUNT);
-        
-        if (KDataBufferResize(&self->group, self->count) != 0)
-            return NULL;
-        
-        fnd = get_group(self, which);
-        assert(fnd + move + 1 <= get_group(self, self->count) || move == 0);
-        memmove(fnd + 1, fnd, move * sizeof(*fnd));
-        
-        group_stats_init(fnd, offset, len, self->count);
-        stats_data_invald_mru(self);
-    }
-UPDATE_MRU:
-    stats_data_update_mru(self, fnd);
-    return fnd;
-}
-
-static rc_t group_stats_write_node(KMDataNode *const node,
-                                   char const name[],
-                                   void const *const value)
-{
-    KMDataNode *subnode;
-    rc_t rc = KMDataNodeOpenNodeUpdate(node, &subnode, "%s", name);
-    if (rc == 0) {
-        rc = KMDataNodeWriteB64(subnode, value);
-        KMDataNodeRelease(subnode);
-    }
-    return rc;
-}
-
-static rc_t group_stats_write_name(KMDataNode *const node,
-                                   unsigned const namelen,
-                                   char const name[/* namelen */])
-{
-    char        sbuf[4096];
-    char *const hbuf   = (namelen + 1) < sizeof(sbuf) ? NULL : malloc(namelen + 1);
-    char *const buffer = (namelen + 1) < sizeof(sbuf) ? sbuf : hbuf;
-    
-    if (buffer == NULL)
-        return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-
-    memcpy(buffer, name, namelen);
-    buffer[namelen] = '\0';
-    {
-        rc_t const rc = KMDataNodeWriteAttr(node, STATS_NODE_NAME_ATTR, buffer);
-            
-        free(hbuf);
-        return rc;
-    }
-}
-
-#define RC_THROW(STMT) do { rc_t const rc = (STMT); if (rc) return rc; } while(0)
-
-static rc_t group_stats_write_no_compressed(group_stats_t const *const self,
-                                            KMDataNode *const node)
-{
-    RC_THROW(group_stats_write_node(node, "SPOT_COUNT"    , &self->spot_count    ));
-    RC_THROW(group_stats_write_node(node, "BASE_COUNT"    , &self->base_count    ));
-    RC_THROW(group_stats_write_node(node, "BIO_BASE_COUNT", &self->bio_base_count));
-    RC_THROW(group_stats_write_node(node, "SPOT_MIN"      , &self->spot_min      ));
-    RC_THROW(group_stats_write_node(node, "SPOT_MAX"      , &self->spot_max      ));
-    
-    return 0;
-}
-
-static rc_t group_stats_write_compressed(group_stats_t const *const self,
-                                         KMDataNode *const node)
-{
-    RC_THROW(group_stats_write_no_compressed(self, node));
-    RC_THROW(group_stats_write_node(node, "CMP_BASE_COUNT", &self->cmp_base_count));
-    
-    return 0;
-}
-
-static rc_t group_stats_write_1(group_stats_t const *const self,
-                                stats_data_t const *const parent,
-                                unsigned const namelen,
-                                char const name[/* namelen */],
-                                KMDataNode *const node)
-{
-    RC_THROW(group_stats_write_name(node, namelen, name));
-    RC_THROW(parent->write(self, node));
-
-    return 0;
-}
-
-static rc_t group_stats_write(group_stats_t const *const self,
-                              stats_data_t const *const parent,
-                              char const strings[])
-{
-    static char const namebase[] = "STATS/SPOT_GROUP/";
-    char namepath[sizeof(namebase) + 3]; /* sizeof(namebase) includes terminator */
-    char *const name = namepath + sizeof(namebase) - 1;
-    unsigned nodeid = self->node_name - 1;
-    KMDataNode *node;
-    rc_t rc;
-
-    memcpy(namepath, namebase, sizeof(namebase));
-    name[4] = '\0';
-    name[3] = nodeid % 26 + 'A'; nodeid /= 26;
-    name[2] = nodeid % 26 + 'A'; nodeid /= 26;
-    name[1] = nodeid % 26 + 'A'; nodeid /= 26;
-    name[0] = nodeid % 26 + 'A'; nodeid /= 26;
-    
-    RC_THROW(KMetadataOpenNodeUpdate(parent->meta, &node, "%s", namepath));
-
-    rc = group_stats_write_1(self, parent,
-                             self->name_len,
-                             strings + self->name_offset,
-                             node);
-    KMDataNodeRelease(node);
-    
-    return rc;
-}
-
-static rc_t group_stats_write_default(group_stats_t const *const self,
-                                      stats_data_t const *const parent)
-{
-    KMDataNode *node;
-    rc_t rc;
-    
-    RC_THROW(KMetadataOpenNodeUpdate(parent->meta, &node, "STATS/SPOT_GROUP/default"));
-
-    rc = parent->write(self, node);
-    KMDataNodeRelease(node);
-    
-    return rc;
-}
-
-static rc_t group_stats_write_table(group_stats_t const *const self,
-                                    stats_data_t const *const parent)
-{
-    KMDataNode *node;
-    rc_t rc;
-    
-    RC_THROW(KMetadataOpenNodeUpdate(parent->meta, &node, "STATS/TABLE"));
-
-    rc = parent->write(self, node);
-    KMDataNodeRelease(node);
-    
-    return rc;
-}
-
-static rc_t stats_data_write_table(stats_data_t *const self)
-{
-    RC_THROW(group_stats_write_table(&self->table, self));
-    return 0;
-}
-
-static rc_t stats_data_write_all(stats_data_t *const self)
-{
-    unsigned i;
-
-    RC_THROW(stats_data_write_table(self));
-    if (self->count <= MAX_GROUP_COUNT) {
-        if (self->deflt.spot_count != 0)
-            RC_THROW(group_stats_write_default(&self->deflt, self));
-        RC_THROW(group_stats_write_table(&self->table, self));
-        for (i = 0; i < self->count; ++i) {
-            RC_THROW(group_stats_write(get_group(self, i), self, self->names.base));
-        }
-    }
-    return 0;
-}
-
-static
-void CC stats_data_whack(void *const data)
-{
-    stats_data_t *const self = data;
-    
-    self->write_all(self);
-    KDataBufferWhack(&self->group);
-    KDataBufferWhack(&self->names);
-    KMetadataRelease(self->meta);
-    free(self);
-}
-
-static void group_stats_update(group_stats_t *const self,
-                               spot_t const spot_id,
-                               INSDC_coord_len const spot_len,
-                               INSDC_coord_len const bio_spot_len,
-                               INSDC_coord_len const cmp_spot_len
-                               )
-{
-    if (spot_id) {
-        ++self->spot_count;
-        if (self->spot_max < spot_id)
-            self->spot_max = spot_id;
-        if (self->spot_min > spot_id)
-            self->spot_min = spot_id;
-    }
-    self->base_count     += spot_len;
-    self->bio_base_count += bio_spot_len;
-    self->cmp_base_count += cmp_spot_len;
-}
-
-static
-rc_t stats_data_update_table(stats_data_t *self,
-                             int64_t spot_id,
-                             uint32_t spot_len,
-                             uint32_t bio_spot_len,
-                             uint32_t cmp_spot_len,
-                             char const grp[],
-                             uint64_t grp_len);
-
-static
-rc_t stats_data_update_all(stats_data_t *self,
-                           int64_t spot_id,
-                           uint32_t spot_len,
-                           uint32_t bio_spot_len,
-                           uint32_t cmp_spot_len,
-                           char const grp[],
-                           uint64_t grp_len);
-
-static void stats_data_init_funcs(stats_data_t *const self, bool has_spot_groups)
-{
-    self->update    = has_spot_groups ? stats_data_update_all : stats_data_update_table;
-    self->write_all = has_spot_groups ? stats_data_write_all  : stats_data_write_table;
-}
-
-static
-rc_t stats_data_update_table(stats_data_t *self,
-                             int64_t spot_id,
-                             uint32_t spot_len,
-                             uint32_t bio_spot_len,
-                             uint32_t cmp_spot_len,
-                             char const grp[],
-                             uint64_t grp_len)
-{
-    group_stats_update(&self->table, spot_id, spot_len, bio_spot_len, cmp_spot_len);
-    return 0;
-}
-
-static
-rc_t stats_data_update_group(stats_data_t *self,
-                             int64_t spot_id,
-                             uint32_t spot_len,
-                             uint32_t bio_spot_len,
-                             uint32_t cmp_spot_len,
-                             char const grp[],
-                             uint64_t grp_len)
-{
-    if (grp_len == 0 || grp == NULL || grp[0] == '\0' ||
-        (grp_len == 7 && strncasecmp("default", grp, 7) == 0))
-    {
-        group_stats_update(&self->deflt, spot_id, spot_len, bio_spot_len, cmp_spot_len);
-    }
-    else
-    {
-        group_stats_t *const fnd = stats_data_get_group(self, (unsigned)grp_len, grp);
-        
-        if (fnd == NULL)
-            return RC(rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted);
-        
-        if (fnd - get_group(self, 0) < MAX_GROUP_COUNT)
-            group_stats_update(fnd, spot_id, spot_len, bio_spot_len, cmp_spot_len);
-        else {
-            KDataBufferWhack(&self->group);
-            KDataBufferWhack(&self->names);
-            stats_data_init_funcs(self, false);
-            (void)PLOGMSG(klogWarn, (klogWarn, "Too many spot groups ($(count)); dropping group stats", "count=%u", (unsigned)(self->count)));
-        }
-    }
-    return 0;
-}
-
-static
-rc_t stats_data_update_all(stats_data_t *self,
-                           int64_t spot_id,
-                           uint32_t spot_len,
-                           uint32_t bio_spot_len,
-                           uint32_t cmp_spot_len,
-                           const char *grp,
-                           uint64_t grp_len)
-{
-    stats_data_update_table(self, spot_id, spot_len, bio_spot_len, cmp_spot_len, 0, 0);
-    return stats_data_update_group(self, spot_id, spot_len, bio_spot_len, cmp_spot_len, grp, grp_len);
-}
-
-static rc_t stats_data_init(stats_data_t *const self,
-                            VTable *const tbl,
-                            bool has_spot_group,
-                            bool compressed)
-{
-    stats_data_init_funcs(self, has_spot_group);
-    self->write  = compressed ? group_stats_write_compressed : group_stats_write_no_compressed;
-    
-    group_stats_init(&self->table, 0, 0, 0);
-    group_stats_init(&self->deflt, 0, 0, 0);
-
-    RC_THROW(VTableOpenMetadataUpdate(tbl, &self->meta));
-    if (has_spot_group) {
-        RC_THROW(KDataBufferMakeBytes(&self->names, 0));
-        RC_THROW(KDataBufferMake(&self->group, sizeof(group_stats_t) * 8, 0));
-    }
-    return 0;
-}
-
-static
-rc_t stats_data_make(stats_data_t **const pself,
-                     VTable *const tbl,
-                     bool has_spot_group,
-                     bool compressed)
-{
-    rc_t rc = 0;
-    stats_data_t *const self = calloc(1, sizeof(*self));
-    
-    if (self) {
-        rc = stats_data_init(self, tbl, has_spot_group, compressed);
-        if (rc == 0) {
-            *pself = self;
-            return 0;
-        }
-        KMetadataRelease(self->meta);
-        free(self);
-    }
-    return RC(rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted);
-}
-
-static
-rc_t CC stats_data_update(stats_data_t* self,
-    const int64_t spot_id, const uint32_t spot_len,
-    const uint32_t bio_spot_len, const uint32_t cmp_spot_len,
-    bool has_grp, const char* grp, uint64_t grp_len)
-{
-    return self->update(self, spot_id, spot_len, bio_spot_len, cmp_spot_len, grp, grp_len);
-}
-
-static
-rc_t CC stats_data_trigger(void *data, const VXformInfo *info, int64_t row_id,
-                               VRowResult *rslt, uint32_t argc, const VRowData argv[])
-{
-    uint32_t i, bio_spot_len;
-    const char* grp = NULL;
-    uint64_t len = 0;
-
-    uint32_t spot_len = argv[0].u.data.elem_count;
-    /* take nreads from read_len */
-    uint32_t nreads = argv[1].u.data.elem_count;
-    /* get read_len and read_type */
-    const INSDC_coord_len *read_len = argv[1].u.data.base;
-    const INSDC_SRA_xread_type *read_type = argv[2].u.data.base;
-    read_len += argv[1].u.data.first_elem;
-    read_type += argv[2].u.data.first_elem;
-
-    assert(argc >= 3 && argc <= 4);
-    assert(nreads == argv[2].u.data.elem_count);
-
-    for(i = bio_spot_len = 0; i < nreads; i++) {
-        if( (read_type[i] & SRA_READ_TYPE_BIOLOGICAL) != 0 ) {
-            bio_spot_len += read_len[i];
-        }
-    }
-    if( argc == 4 ) {
-        /* get group name and length */
-        grp = argv[3].u.data.base;
-        len = argv[3].u.data.elem_count;
-        grp += argv[3].u.data.first_elem;
-    }
-    return stats_data_update(data, row_id, spot_len, bio_spot_len, 0, argc == 4, grp, len);
-}
-
-static
-rc_t CC stats_data_cmp_trigger(void *data, const VXformInfo *info, int64_t row_id,
-                                   VRowResult *rslt, uint32_t argc, const VRowData argv[])
-{
-    uint32_t i, bio_spot_len;
-    const char* grp = NULL;
-    uint64_t len = 0;
-
-    uint32_t cmp_spot_len = argv[0].u.data.elem_count;
-    uint32_t spot_len = argv[1].u.data.elem_count;
-    /* take nreads from read_len */
-    uint32_t nreads = argv[2].u.data.elem_count;
-    /* get read_len and read_type */
-    const INSDC_coord_len *read_len = argv[2].u.data.base;
-    const INSDC_SRA_xread_type *read_type = argv[3].u.data.base;
-    read_len += argv[2].u.data.first_elem;
-    read_type += argv[3].u.data.first_elem;
-
-    assert(data != NULL);
-    assert(argc >= 4 && argc <= 5);
-    assert(nreads == argv[3].u.data.elem_count);
-
-    for(i = bio_spot_len = 0; i < nreads; i++) {
-        if( (read_type[i] & SRA_READ_TYPE_BIOLOGICAL) != 0 ) {
-            bio_spot_len += read_len[i];
-        }
-    }
-    if( argc == 5 ) {
-        /* get group name and length */
-        grp = argv[4].u.data.base;
-        len = argv[4].u.data.elem_count;
-        grp += argv[4].u.data.first_elem;
-    }
-    return stats_data_update(data, row_id, spot_len, bio_spot_len, cmp_spot_len, argc == 5, grp, len);
-}
-
-static
-rc_t CC stats_data_cmpf_trigger(void *data, const VXformInfo *info, int64_t row_id,
-                                   VRowResult *rslt, uint32_t argc, const VRowData argv[])
-{
-    uint32_t i, bio_spot_len;
-    const char* grp = NULL;
-    uint64_t len = 0;
-
-    uint32_t cmp_spot_len = argv[0].u.data.elem_count;
-    const uint32_t* spot_len = argv[1].u.data.base;
-    /* take nreads from read_len */
-    uint32_t nreads = argv[2].u.data.elem_count;
-    /* get read_len and read_type */
-    const INSDC_coord_len *read_len = argv[2].u.data.base;
-    const INSDC_SRA_xread_type *read_type = argv[3].u.data.base;
-    spot_len += argv[1].u.data.first_elem;
-    read_len += argv[2].u.data.first_elem;
-    read_type += argv[3].u.data.first_elem;
-
-    assert(data != NULL);
-    assert(argc >= 4 && argc <= 5);
-    assert(nreads == argv[3].u.data.elem_count);
-
-    for(i = bio_spot_len = 0; i < nreads; i++) {
-        if( (read_type[i] & SRA_READ_TYPE_BIOLOGICAL) != 0 ) {
-            bio_spot_len += read_len[i];
-        }
-    }
-    if( argc == 5 ) {
-        /* get group name and length */
-        grp = argv[4].u.data.base;
-        len = argv[4].u.data.elem_count;
-        grp += argv[4].u.data.first_elem;
-    }
-    return stats_data_update(data, row_id, *spot_len, bio_spot_len, cmp_spot_len, argc == 5, grp, len);
-}
-
-static
-rc_t CC stats_data_csra2_trigger(void *data, const VXformInfo *info, int64_t row_id,
-                                 VRowResult *rslt, uint32_t argc, const VRowData argv[])
-{
-    uint32_t bio_spot_len;
-    const char* grp = NULL;
-    uint64_t len = 0;
-    
-    uint32_t read_len = argv[0].u.data.elem_count;
-    bio_spot_len = read_len;
-    
-    assert(argc >= 1 && argc <= 2);
-    
-    if( argc == 2 ) {
-        assert(1 == argv[1].u.data.elem_count);
-        
-        /* get group name and length */
-        grp = argv[1].u.data.base;
-        len = argv[1].u.data.elem_count;
-        grp += argv[1].u.data.first_elem;
-    }
-    return stats_data_update(data, row_id, read_len, bio_spot_len, 0, argc == 2, grp, len);
-}
-
-
-VTRANSFACT_IMPL ( NCBI_SRA_stats_trigger, 1, 0, 0 )
-    ( const void *self, const VXfactInfo *info, VFuncDesc *rslt,
-      const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    stats_data_t *data;
-
-    assert(dp->argc >= 3 && dp->argc <= 4);
-
-    if( (rc = stats_data_make(&data, (VTable*)info->tbl, dp->argc > 3, false)) == 0 ) {
-        rslt->self = data;
-        rslt->whack = stats_data_whack;
-        rslt->variant = vftNonDetRow;
-        rslt->u.rf = stats_data_trigger;
-    }
-    return rc;
-}
-
-VTRANSFACT_IMPL ( NCBI_SRA_cmp_stats_trigger, 1, 0, 0 )
-    ( const void *self, const VXfactInfo *info, VFuncDesc *rslt,
-      const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    stats_data_t *data;
-
-    assert(dp->argc >= 4 && dp->argc <= 5);
-
-    if( (rc = stats_data_make(&data, (VTable*)info->tbl, dp->argc > 4, true)) == 0 ) {
-        rslt->self = data;
-        rslt->whack = stats_data_whack;
-        rslt->variant = vftNonDetRow;
-        rslt->u.rf = stats_data_cmp_trigger;
-    }
-    return rc;
-}
-
-VTRANSFACT_IMPL ( NCBI_SRA_cmpf_stats_trigger, 1, 0, 0 )
-    ( const void *self, const VXfactInfo *info, VFuncDesc *rslt,
-      const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    stats_data_t *data;
-
-    assert(dp->argc >= 4 && dp->argc <= 5);
-
-    if( (rc = stats_data_make(&data, (VTable*)info->tbl, dp->argc > 4, true)) == 0 ) {
-        rslt->self = data;
-        rslt->whack = stats_data_whack;
-        rslt->variant = vftNonDetRow;
-        rslt->u.rf = stats_data_cmpf_trigger;
-    }
-    return rc;
-}
-
-VTRANSFACT_IMPL ( NCBI_csra2_stats_trigger, 1, 0, 0 )
-    ( const void * self, const VXfactInfo *info, VFuncDesc *rslt,
-      const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    stats_data_t *data;
-    
-    assert(dp->argc >= 1 && dp->argc <= 2);
-    
-    if( (rc = stats_data_make(&data, (VTable*)info->tbl, dp->argc > 1, false)) == 0 ) {
-        rslt->self = data;
-        rslt->whack = stats_data_whack;
-        rslt->variant = vftNonDetRow;
-        rslt->u.rf = stats_data_csra2_trigger;
-    }
-    return rc;
-}
diff --git a/libs/sraxf/stats_quality.c b/libs/sraxf/stats_quality.c
deleted file mode 100644
index ddc42a3..0000000
--- a/libs/sraxf/stats_quality.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <kdb/meta.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-#define MAX_QUALITY (256)
-
-typedef struct phred_stats_data_struct {
-    KMetadata* meta;
-    KMDataNode* root;
-    uint64_t count[MAX_QUALITY];
-} phred_stats_data;
-
-static
-void CC phred_stats_whack( void *data )
-{
-    uint32_t i;
-    phred_stats_data* self = data;
-
-    for(i = 0; i < MAX_QUALITY; i++) {
-        if( self->count[i] > 0 ) {
-            KMDataNode* node;
-            if( KMDataNodeOpenNodeUpdate(self->root, &node, "PHRED_%u", i) == 0 ) {
-                KMDataNodeWriteB64(node, &self->count[i]);
-                KMDataNodeRelease(node);
-            }
-        }
-    }
-    KMDataNodeRelease(self->root);
-    KMetadataRelease(self->meta);
-    free(self);
-}
-
-static
-rc_t phred_stats_make(phred_stats_data** self, VTable* vtbl)
-{
-    rc_t rc = 0;
-    phred_stats_data* data = calloc(1, sizeof(*data));
-
-    assert(self != NULL && vtbl != NULL);
-
-    if( data == NULL ) {
-        rc = RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-    } else if( (rc = VTableOpenMetadataUpdate(vtbl, &data->meta)) == 0 ) {
-        rc = KMetadataOpenNodeUpdate(data->meta, &data->root, "STATS/QUALITY");
-    }
-    if( rc == 0 ) {
-        *self = data;
-    } else {
-        phred_stats_whack(data);
-    }
-    return rc;
-}
-
-static
-rc_t CC phred_stats_trigger(void *data, const VXformInfo *info, int64_t row_id,
-                              VRowResult *rslt, uint32_t argc, const VRowData argv[])
-{
-    rc_t rc = 0;
-    phred_stats_data* self = data;
-    uint64_t len;
-
-    assert(self != NULL);
-    assert(argc == 1);
-    assert(argv[0].u.data.elem_bits == (sizeof(INSDC_quality_phred) * 8));
-
-    len = argv[0].u.data.elem_count;
-    if( len > 0 ) {
-        const INSDC_quality_phred* q = argv[0].u.data.base;
-        assert(argv[0].u.data.base != NULL);
-        q += argv[0].u.data.first_elem;
-        do {
-            self->count[q[--len]]++;
-        } while( len > 0 );
-    }
-    return rc;
-}
-
-VTRANSFACT_IMPL ( NCBI_SRA_phred_stats_trigger, 1, 0, 0 )
-    ( const void *self, const VXfactInfo *info, VFuncDesc *rslt,
-      const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    phred_stats_data *data;
-
-    assert(dp->argc == 1);
-
-    if( (rc = phred_stats_make(&data, (VTable*)info->tbl)) == 0 ) {
-        rslt->self = data;
-        rslt->whack = phred_stats_whack;
-        rslt->variant = vftNonDetRow;
-        rslt->u.rf = phred_stats_trigger;
-    }
-    return rc;
-}
diff --git a/libs/sraxf/swap.c b/libs/sraxf/swap.c
deleted file mode 100644
index 221c195..0000000
--- a/libs/sraxf/swap.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-
-typedef void (*swap_f)(void *dst, uint64_t offset, const void *src, const void *Cntrl, uint64_t vec_count);
-typedef struct self_t {
-    swap_f f;
-} self_t;
-
-#define SWAP_0(A, B) A = B
-#define SWAP_1(A, B) do { (A).data[0] = (B).data[1]; (A).data[1] = (B).data[0]; (A).data[2] = (B).data[2]; (A).data[3] = (B).data[3]; } while (0)
-#define SWAP_2(A, B) do { (A).data[0] = (B).data[2]; (A).data[1] = (B).data[1]; (A).data[2] = (B).data[0]; (A).data[3] = (B).data[3]; } while (0)
-#define SWAP_3(A, B) do { (A).data[0] = (B).data[3]; (A).data[1] = (B).data[1]; (A).data[2] = (B).data[2]; (A).data[3] = (B).data[0]; } while (0)
-
-#define FUNC(VALTYPE) F_ ## VALTYPE
-
-#define FUNC_DEF(VALTYPE)                                               \
-    static void FUNC(VALTYPE)(void *Dst, uint64_t offset, const void *Src, const void *Cntrl, uint64_t count) { \
-        typedef struct { VALTYPE data[4]; } data4_t;                    \
-        data4_t *dst = (data4_t *)Dst;                                  \
-        const data4_t *src = (const data4_t *)Src;                      \
-        const uint8_t *cntrl = (const uint8_t *)Cntrl;                  \
-        uint64_t i;                                                     \
-                                                                        \
-        dst += offset;                                                  \
-        for (i = 0; i != count; ++i) {                                  \
-            switch(cntrl[i]) {                                          \
-            default:                                                    \
-            case 0:                                                     \
-                SWAP_0(dst[i], src[i]);                                 \
-                break;                                                  \
-            case 1:                                                     \
-                SWAP_1(dst[i], src[i]);                                 \
-                break;                                                  \
-            case 2:                                                     \
-                SWAP_2(dst[i], src[i]);                                 \
-                break;                                                  \
-            case 3:                                                     \
-                SWAP_3(dst[i], src[i]);                                 \
-                break;                                                  \
-            }                                                           \
-        }                                                               \
-    }
-
-FUNC_DEF(float)
-FUNC_DEF(double)
-FUNC_DEF(uint8_t)
-FUNC_DEF(uint16_t)
-FUNC_DEF(uint32_t)
-FUNC_DEF(uint64_t)
-FUNC_DEF(int8_t)
-FUNC_DEF(int16_t)
-FUNC_DEF(int32_t)
-FUNC_DEF(int64_t)
-
-static
-rc_t CC swap_drvr (
-                void *Self,
-                const VXformInfo *info,
-                int64_t row_id,
-                const VFixedRowResult *rslt,
-                uint32_t argc,
-                const VRowData argv []
-) {
-    const uint8_t *src;
-    const uint8_t *cntrl;
-    const self_t *self = (const self_t *)Self;
-    
-    assert(argv[0].u.data.elem_bits % 8 == 0);
-    assert(argv[1].u.data.elem_bits % 8 == 0);
-    
-    src    = argv[0].u.data.base;
-    src   += (argv[0].u.data.first_elem * argv[0].u.data.elem_bits) / 8;
-
-    cntrl  = argv[1].u.data.base;
-    cntrl += (argv[1].u.data.first_elem * argv[1].u.data.elem_bits) / 8;
-    
-    self->f(rslt->base, rslt->first_elem, src, cntrl, rslt->elem_count);
-    
-    return 0;
-}
-
-static
-void CC sraxf_swap_free_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-/* 
- * function < type T > T [ 4 ] NCBI:SRA:swap #1 ( T [ 4 ] in, U8 called );
- */
-VTRANSFACT_IMPL ( NCBI_SRA_swap, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    self_t *self;
-    
-    switch (info->fdesc.desc.domain) {
-    case vtdInt:
-    case vtdUint:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 8:
-        case 16:
-        case 32:
-        case 64:
-            break;
-        default:
-            return RC(rcXF, rcFunction, rcConstructing, rcType, rcInvalid);
-            break;
-        }
-        break;
-    case vtdFloat:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 32:
-        case 64:
-            break;
-        default:
-            return RC(rcXF, rcFunction, rcConstructing, rcType, rcInvalid);
-            break;
-        }
-        break;
-    default:
-        return RC(rcXF, rcFunction, rcConstructing, rcType, rcInvalid);
-        break;
-    }
-    
-    self = malloc(sizeof(*self));
-    if (self) {
-        switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 8:
-                self->f = FUNC(int8_t);
-                break;
-            case 16:
-                self->f = FUNC(int16_t);
-                break;
-            case 32:
-                self->f = FUNC(int32_t);
-                break;
-            case 64:
-                self->f = FUNC(int64_t);
-                break;
-            default:
-                break;
-            }
-            break;
-        case vtdUint:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 8:
-                self->f = FUNC(uint8_t);
-                break;
-            case 16:
-                self->f = FUNC(uint16_t);
-                break;
-            case 32:
-                self->f = FUNC(uint32_t);
-                break;
-            case 64:
-                self->f = FUNC(uint64_t);
-                break;
-            default:
-                break;
-            }
-            break;
-        case vtdFloat:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 32:
-                self->f = FUNC(float);
-                break;
-            case 64:
-                self->f = FUNC(double);
-                break;
-            default:
-                break;
-            }
-            break;
-        default:
-            break;
-        }
-        
-        rslt->self = self;
-        rslt->whack = sraxf_swap_free_wrapper;
-        rslt->u.pf = swap_drvr;
-        rslt->variant = vftFixedRow;
-        
-        return 0;
-    }
-    return RC(rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted);
-}
diff --git a/libs/sraxf/tokenize-spot_name-454.c b/libs/sraxf/tokenize-spot_name-454.c
deleted file mode 100644
index a801272..0000000
--- a/libs/sraxf/tokenize-spot_name-454.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-#include "name-tokenizer.h"
-
-static
-rc_t CC tokenize_spot_name_454 ( void *self, const VXformInfo *info, int64_t row_id,
-                              VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    const char *name;
-    unsigned region_start;
-    unsigned q_start;
-    unsigned i;
-    spot_name_token_t *spot_name_tok;
-    const int EXPECTED_NUMBER_OF_TOKENS = 2;
-    
-    assert(rslt->elem_bits == sizeof(spot_name_tok[0]) * 8);
-    rslt->data->elem_bits = sizeof(spot_name_tok[0]) * 8;
-    if( (rc = KDataBufferResize(rslt->data, EXPECTED_NUMBER_OF_TOKENS)) != 0 ) {
-        return rc;
-    }
-    
-    spot_name_tok = rslt->data->base;
-    
-    spot_name_tok[0].s.token_type = nt_unrecognized;
-    spot_name_tok[0].s.position = 0;
-    spot_name_tok[0].s.length = argv[0].u.data.elem_count;
-    rslt->elem_count = 1;
-    
-    /* /^(.{7})([0-9]{2})([A-Z0-9]{5})$/ = (name, region, XY_q) = ($1, $2, $3); */
-    if (argv[0].u.data.elem_count != 14 ) {
-        return 0;
-    }
-    
-    name = &((const char *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-    q_start = argv[0].u.data.elem_count - 5;
-    region_start = q_start - 2;
-    
-    /* validate that XY_q =~ /[A-Z0-9]{5}/ */
-    for(i = 0; i != 5; i++) {
-        if(!((name[i + q_start] >= 'A' && name[i + q_start] <= 'Z') || (name[i + q_start] >= '0' && name[i + q_start] <= '9'))) {
-            return 0;
-        }
-    }
-    /* validate that region =~ /[0-9]{2}/ */
-    if( !(name[region_start] >= '0' && name[region_start] <= '9') ||
-        !(name[region_start + 1] >= '0' && name[region_start + 1] <= '9') ) {
-        return 0;
-    }
-    spot_name_tok[0].s.token_type = nt_T;
-    spot_name_tok[0].s.position = region_start;
-    spot_name_tok[0].s.length = 2;
-    
-    spot_name_tok[1].s.token_type = nt_Q;
-    spot_name_tok[1].s.position = q_start;
-    spot_name_tok[1].s.length = 5;
-
-    rslt->elem_count = EXPECTED_NUMBER_OF_TOKENS;
-    return 0;
-}
-
-/* tokenize_spot_name
- *  scans name on input
- *  tokenizes into parts
-
-typedef U16 NCBI:SRA:spot_name_token [ 3 ];
-const U16 NCBI:SRA:name_token:unrecognized = 1;
-const U16 NCBI:SRA:name_token:X            = 2;
-const U16 NCBI:SRA:name_token:Y            = 3;
-const U16 NCBI:SRA:name_token:Q            = 4;
-const U16 NCBI:SRA:name_token:T            = 5;
-const U16 NCBI:SRA:name_token:L            = 6;
-
-extern function NCBI:SRA:spot_name_token
-    NCBI:SRA:_454_:tokenize_spot_name #1 ( ascii name );
- */
-VTRANSFACT_IMPL ( NCBI_SRA__454__tokenize_spot_name, 1, 0, 0 ) ( const void *self,
-                  const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftRow;
-    rslt->u.rf = tokenize_spot_name_454;
-    
-    return 0;
-}
diff --git a/libs/sraxf/tokenize-spot_name-abi.c b/libs/sraxf/tokenize-spot_name-abi.c
deleted file mode 100644
index 54f40a4..0000000
--- a/libs/sraxf/tokenize-spot_name-abi.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-#include "name-tokenizer.h"
-
-static
-rc_t CC tokenize_spot_name_ABI ( void *self, const VXformInfo *info, int64_t row_id,
-                              VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    const char *name, *end;
-    spot_name_token_t *spot_name_tok;
-    const int EXPECTED_NUMBER_OF_TOKENS = 3;
-    int tok = EXPECTED_NUMBER_OF_TOKENS;
-    const uint16_t types[3] = {nt_T, nt_X, nt_Y};
-    
-    assert(rslt->elem_bits == sizeof(spot_name_tok[0]) * 8);
-    rslt->data->elem_bits = sizeof(spot_name_tok[0]) * 8;
-    if( (rc = KDataBufferResize(rslt->data, EXPECTED_NUMBER_OF_TOKENS)) != 0 ) {
-        return rc;
-    }
-    
-    spot_name_tok = rslt->data->base;
-    
-    /* reverse line parse by format:
-     Dig is -> [-+0-9]
-       /^(.*+)(Dig+)!Dig+(Dig+)!Dig+(Dig+)$/ = (run_name, panel, x, y) = ($1, $2, $3, $4)
-    */
-#define is_signum(a) (isdigit(a) || a == '-' || a == '+')
-
-    name = &((const char *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-    end = name + argv[0].u.data.elem_count;
-    while(rc == 0 && end > name && tok > 0) {
-        const char* c, *last_end;
-        do {
-            last_end = end--;
-        } while( tok != EXPECTED_NUMBER_OF_TOKENS && end != name && !is_signum(*end) );
-        while( end != name && is_signum(*end) ) {
-            end--;
-        }
-        c = end;
-        if( !is_signum(*c) ) {
-            c++;
-        }
-        if( c >= last_end ) {
-            /* empty token */
-            break;
-        } else if( *c == '-' ) {
-            /* keep explicit - '-000' */
-            if( last_end - c >= 2 && *(c + 1) == '0' ) {
-                c++;
-                while( *c == '0' && (c + 1) < last_end ) { c++; }
-                if( *c != '0' ) {
-                    /* cannot tokenize -0004 */
-                    break;
-                }
-            }
-        } else {
-            if( *c == '+' ) {
-                /* keep explicit + */
-                c++;
-            }
-            /* keep leading zeroes */
-            while(*c == '0' && (c + 1) < last_end ) { c++; }
-        }
-        tok--;
-        spot_name_tok[tok].s.token_type = types[tok];
-        spot_name_tok[tok].s.position = c - name;
-        spot_name_tok[tok].s.length = last_end - c;
-        if( spot_name_tok[tok].s.length == 0 ) {
-            rc = RC(rcSRA, rcFormatter, rcReading, rcName, rcInvalid);
-        }
-        while(rc == 0 && c < last_end) {
-            if( *c < '0' || *c > '9' ) {
-                rc = RC(rcSRA, rcFormatter, rcReading, rcId, rcOutofrange);
-            }
-            c++;
-        }
-    }
-    if( rc == 0 && tok != 0 ) {
-        rc = RC(rcSRA, rcFormatter, rcReading, rcName, rcInvalid);
-    }
-    if( rc != 0 ) {
-        spot_name_tok[0].s.token_type = nt_unrecognized;
-        spot_name_tok[0].s.position = 0;
-        spot_name_tok[0].s.length = argv[0].u.data.elem_count;
-        rslt->elem_count = 1;
-    } else {
-        rslt->elem_count = EXPECTED_NUMBER_OF_TOKENS;
-    }
-    return 0;
-}
-
-/* tokenize_spot_name
- *  scans name on input
- *  tokenizes into parts
-
- extern function NCBI:SRA:spot_name_token
-    NCBI:SRA:ABI:tokenize_spot_name #1 ( ascii name );
- */
-VTRANSFACT_IMPL ( NCBI_SRA_ABI_tokenize_spot_name, 1, 0, 0 ) ( const void *self,
-                  const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftRow;
-    rslt->u.rf = tokenize_spot_name_ABI;
-    
-    return 0;
-}
diff --git a/libs/sraxf/tokenize-spot_name-generic-fastq.c b/libs/sraxf/tokenize-spot_name-generic-fastq.c
deleted file mode 100644
index 90cac76..0000000
--- a/libs/sraxf/tokenize-spot_name-generic-fastq.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-#include "name-tokenizer.h"
-
-static
-rc_t CC tokenize_spot_name_genericFastq ( void *self, const VXformInfo *info, int64_t row_id,
-										  VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    const char *name;
-    spot_name_token_t *spot_name_tok;
-    const int EXPECTED_NUMBER_OF_TOKENS = 1;
-    
-    assert(rslt->elem_bits == sizeof(spot_name_tok[0]) * 8);
-    rslt->data->elem_bits = sizeof(spot_name_tok[0]) * 8;
-    if( (rc = KDataBufferResize(rslt->data, EXPECTED_NUMBER_OF_TOKENS)) != 0 ) {
-        return rc;
-    }
-    
-    spot_name_tok = rslt->data->base;
-    
-    spot_name_tok[0].s.token_type = nt_recognized;
-    spot_name_tok[0].s.position = 0;
-    spot_name_tok[0].s.length = argv[0].u.data.elem_count;
-    rslt->elem_count = 1;
-    
-	return 0;
-}
-
-/* tokenize_spot_name
- *  scans name on input
- *  tokenizes into parts
-
-extern function NCBI:SRA:spot_name_token
-    NCBI:SRA:GenericFastq:tokenize_spot_name #1 ( ascii name );
- */
-VTRANSFACT_IMPL ( NCBI_SRA_GenericFastq_tokenize_spot_name, 1, 0, 0 ) ( const void *self,
-                  const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftRow;
-    rslt->u.rf = tokenize_spot_name_genericFastq;
-    
-    return 0;
-}
diff --git a/libs/sraxf/tokenize-spot_name-helicos.c b/libs/sraxf/tokenize-spot_name-helicos.c
deleted file mode 100644
index e42d3c1..0000000
--- a/libs/sraxf/tokenize-spot_name-helicos.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-#include "name-tokenizer.h"
-
-static
-rc_t CC tokenize_spot_name_Helicos( void *self, const VXformInfo *info, int64_t row_id,
-                                    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    const char *name, *end;
-    spot_name_token_t *spot_name_tok;
-    const int EXPECTED_NUMBER_OF_TOKENS = 4;
-    int tok = EXPECTED_NUMBER_OF_TOKENS;
-    const uint16_t types[4] = {nt_L, nt_T, nt_X, nt_Y };
-    
-    assert(rslt->elem_bits == sizeof(spot_name_tok[0]) * 8);
-    rslt->data->elem_bits = sizeof(spot_name_tok[0]) * 8;
-    if( (rc = KDataBufferResize(rslt->data, EXPECTED_NUMBER_OF_TOKENS)) != 0 ) {
-        return rc;
-    }
-    
-    spot_name_tok = rslt->data->base;
-    
-    /* reverse line parse by format:
-       /^(.+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)$/ = 
-        (name, channel, field, camera, position) = ($1, $2, $3, $4, $5)
-    */
-    name = &((const char *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-    end = name + argv[0].u.data.elem_count;
-
-    while(rc == 0 && end > name && tok > 0 ) {
-        size_t l = 0;
-        while( isdigit(*--end) && end > name ) {
-            l++;
-        }
-        if( *end != '-' || l == 0 ) {
-            rc = RC(rcSRA, rcFormatter, rcReading, rcName, rcUnrecognized);
-        } else {
-            tok--;
-            spot_name_tok[tok].s.token_type = types[tok];
-            spot_name_tok[tok].s.position = end - name + 1;
-            spot_name_tok[tok].s.length = l;
-        }
-    }
-    if( rc == 0 && tok != 0 ) {
-        rc = RC(rcSRA, rcFormatter, rcReading, rcName, rcInvalid);
-    }
-    if( rc != 0 ) {
-        spot_name_tok[0].s.token_type = nt_unrecognized;
-        spot_name_tok[0].s.position = 0;
-        spot_name_tok[0].s.length = argv[0].u.data.elem_count;
-        rslt->elem_count = 1;
-    } else {
-        rslt->elem_count = EXPECTED_NUMBER_OF_TOKENS;
-    }
-    return 0;
-}
-
-/* tokenize_spot_name
- *  scans name on input
- *  tokenizes into parts
-
- extern function NCBI:SRA:spot_name_token
-    NCBI:SRA:Helicos:tokenize_spot_name #1 ( ascii name );
- */
-VTRANSFACT_IMPL ( NCBI_SRA_Helicos_tokenize_spot_name, 1, 0, 0 ) ( const void *self,
-                  const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftRow;
-    rslt->u.rf = tokenize_spot_name_Helicos;
-    
-    return 0;
-}
diff --git a/libs/sraxf/tokenize-spot_name-illumina.c b/libs/sraxf/tokenize-spot_name-illumina.c
deleted file mode 100644
index 2311611..0000000
--- a/libs/sraxf/tokenize-spot_name-illumina.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-#include "name-tokenizer.h"
-
-static
-rc_t CC tokenize_spot_name_Illumina ( void *self, const VXformInfo *info, int64_t row_id,
-                                   VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    const char *name, *end;
-    spot_name_token_t *spot_name_tok;
-    bool saw_end_float = false;
-    const int EXPECTED_NUMBER_OF_TOKENS = 4;
-    int tok = EXPECTED_NUMBER_OF_TOKENS;
-    const uint16_t types[4] = {nt_L, nt_T, nt_X, nt_Y };
-    
-    assert(rslt->elem_bits == sizeof(spot_name_tok[0]) * 8);
-    rslt->data->elem_bits = sizeof(spot_name_tok[0]) * 8;
-    if( (rc = KDataBufferResize(rslt->data, EXPECTED_NUMBER_OF_TOKENS)) != 0 ) {
-        return rc;
-    }
-    
-    spot_name_tok = rslt->data->base;
-    
-    /* reverse line parse by format:
-       /^(.+)[_:|]([0-9]+)[_:|]([0-9]+)[_:|]([+-0-9]+)[_:|]([+-0-9]+)([_:|][0-9]+?\.[0-9]+)?$/ = 
-        (name, lane, tile, x, y, float?) = ($1, $2, $3, $4, $5, $6?)
-    */
-    name = &((const char *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-    end = name + argv[0].u.data.elem_count;
-    while(rc == 0 && end > name && tok > 0 ) {
-        const char* last_end = end--;
-        bool not_numeric = false;
-        char has_sign = 0;
-        while( end >= name && strchr(":|_", *end) == NULL ) {
-            if( !isdigit(*end) ) {
-                not_numeric = true;
-                if( (*end == '-' || *end == '+') && !has_sign ) {
-                    has_sign = *end;
-                    not_numeric = false;
-                }
-            }
-            end--;
-        }
-        end++;
-        if( not_numeric ) {
-            if( !saw_end_float ) {
-                /* skip optional trailing not integer number */
-                saw_end_float = true;
-            } else {
-                rc = RC(rcSRA, rcFormatter, rcReading, rcName, rcInvalid);
-            }
-        } else {
-            const char* c = end;
-            if( *c == '-' ) {
-                /* keep explicit - '-000' */
-                if( last_end - c >= 2 && *(c + 1) == '0' ) {
-                    c++;
-                    while( *c == '0' && (c + 1) < last_end ) { c++; }
-                    if( *c != '0' ) {
-                        /* cannot tokenize -0004 */
-                        break;
-                    }
-                }
-            } else {
-                if( *c == '+' ) {
-                    /* keep explicit + */
-                    c++;
-                }
-                /* keep leading zeroes */
-                while(*c == '0' && (c + 1) < last_end ) { c++; }
-            }
-            tok--;
-            spot_name_tok[tok].s.token_type = types[tok];
-            spot_name_tok[tok].s.position = c - name;
-            spot_name_tok[tok].s.length = last_end - c;
-            if( spot_name_tok[tok].s.length == 0 ) {
-                rc = RC(rcSRA, rcFormatter, rcReading, rcName, rcInvalid);
-            }
-        }
-        /* back up to separator */
-        end--;
-    }
-    if( rc == 0 && tok != 0 ) {
-        rc = RC(rcSRA, rcFormatter, rcReading, rcName, rcInvalid);
-    }
-    if( rc != 0 ) {
-        spot_name_tok[0].s.token_type = nt_unrecognized;
-        spot_name_tok[0].s.position = 0;
-        spot_name_tok[0].s.length = argv[0].u.data.elem_count;
-        rslt->elem_count = 1;
-    } else {
-        rslt->elem_count = EXPECTED_NUMBER_OF_TOKENS;
-    }
-    return 0;
-}
-
-/* tokenize_spot_name
- *  scans name on input
- *  tokenizes into parts
-
- extern function NCBI:SRA:spot_name_token
-    NCBI:SRA:Illumina:tokenize_spot_name #1 ( ascii name );
- */
-VTRANSFACT_IMPL ( NCBI_SRA_Illumina_tokenize_spot_name, 1, 0, 0 ) ( const void *self,
-                  const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftRow;
-    rslt->u.rf = tokenize_spot_name_Illumina;
-    
-    return 0;
-}
diff --git a/libs/sraxf/tokenize-spot_name-ion-torrent.c b/libs/sraxf/tokenize-spot_name-ion-torrent.c
deleted file mode 100644
index 444bdd3..0000000
--- a/libs/sraxf/tokenize-spot_name-ion-torrent.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-#include "name-tokenizer.h"
-
-static
-rc_t CC tokenize_spot_name_IonTorrent( void *self, const VXformInfo *info, int64_t row_id,
-                                       VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    const char *name, *end;
-    spot_name_token_t *spot_name_tok;
-    const int EXPECTED_NUMBER_OF_TOKENS = 2;
-    int tok = EXPECTED_NUMBER_OF_TOKENS;
-    const uint16_t types[4] = {nt_X, nt_Y};
-    
-    assert(rslt->elem_bits == sizeof(spot_name_tok[0]) * 8);
-    rslt->data->elem_bits = sizeof(spot_name_tok[0]) * 8;
-    rc = KDataBufferResize(rslt->data, EXPECTED_NUMBER_OF_TOKENS);
-    if( rc != 0 )
-        return rc;
-    
-    spot_name_tok = rslt->data->base;
-    
-    /* reverse line parse by format:
-       /^(.+):([0-9]+):([0-9]+)$/ = (name, x, x) = ($1, $2, $3)
-    */
-    name = argv[0].u.data.base;
-    name += argv[0].u.data.first_elem;
-    end = name + argv[0].u.data.elem_count;
-
-    while ( end > name && tok > 0 )
-    {
-        const char *num_start, *num_end = end;
-
-        /* examine least significant digit */
-        -- end;
-        if ( ! isdigit ( * end ) )
-            break;
-
-        /* any digit 0-9 is okay as least significant */
-        num_start = end;
-
-        /* examine remaining digits */
-        while ( end > name )
-        {
-            /* require 0-9 to stay within parse */
-            -- end;
-            if ( ! isdigit ( * end ) )
-                break;
-
-            /* only reset numeric start if not 0 */
-            if ( * end != '0' )
-                num_start = end;
-        }
-
-        /* should have stopped on ':' */
-        if ( *end != ':' )
-            break;
-
-        /* we have a numeric token
-           due to oddities, exclude leading zeros from numeral */
-        -- tok;
-        spot_name_tok[tok].s.token_type = types[tok];
-        spot_name_tok[tok].s.position = num_start - name;
-        spot_name_tok[tok].s.length = num_end - num_start;
-    }
-
-    /* if all tokens were seen, the parse was good */
-    if( tok == 0 )
-        rslt->elem_count = EXPECTED_NUMBER_OF_TOKENS;
-    else
-    {
-        /* otherwise, treat entire string as unrecognized */
-        spot_name_tok[0].s.token_type = nt_unrecognized;
-        spot_name_tok[0].s.position = 0;
-        spot_name_tok[0].s.length = argv[0].u.data.elem_count;
-        rslt->elem_count = 1;
-    }
-
-    return 0;
-}
-
-/* tokenize_spot_name
- *  scans name on input
- *  tokenizes into parts
-
- extern function NCBI:SRA:spot_name_token
-    NCBI:SRA:IonTorrent:tokenize_spot_name #1 ( ascii name );
- */
-VTRANSFACT_IMPL ( NCBI_SRA_IonTorrent_tokenize_spot_name, 1, 0, 0 ) ( const void *self,
-                  const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftRow;
-    rslt->u.rf = tokenize_spot_name_IonTorrent;
-    
-    return 0;
-}
diff --git a/libs/sraxf/untyped-priv.h b/libs/sraxf/untyped-priv.h
deleted file mode 100644
index d0c9ea2..0000000
--- a/libs/sraxf/untyped-priv.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_untyped_priv
-#define _h_untyped_priv
-
-/* 454_untyped_0
- *  recognizes all runs produced with v0 loader
- */
-bool NCBI_SRA__454__untyped_0 ( const KTable *tbl, const KMetadata *meta );
-
-
-/* 454_untyped_1_2a
- *  recognizes runs produced with v1.2 loader
- *  where the linker is present
- *  and a physical READ_SEG is present
- */
-bool NCBI_SRA__454__untyped_1_2a ( const KTable *tbl, const KMetadata *meta );
-
-
-/* 454_untyped_1_2b
- *  recognizes runs produced with v1.2 loader
- *  where the linker is missing or empty
- *  and a physical READ_SEG is present
- */
-bool NCBI_SRA__454__untyped_1_2b ( const KTable *tbl, const KMetadata *meta );
-
-
-/* Illumina_untyped_0a
- *  recognizes runs produced with v0 loader with 4-channel QUALITY
- */
-bool NCBI_SRA_Illumina_untyped_0a ( const KTable *tbl, const KMetadata *meta );
-
-
-/* Illumina_untyped_0b
- *  recognizes runs produced with v0 loader with single-channel QUALITY or QUALITY2
- */
-bool NCBI_SRA_Illumina_untyped_0b ( const KTable *tbl, const KMetadata *meta );
-
-
-/* Illumina_untyped_1a
- *  recognizes runs produced with v1 srf and native loaders
- *  having 4-channel qualities
- */
-bool NCBI_SRA_Illumina_untyped_1a ( const KTable *tbl, const KMetadata *meta );
-
-
-/* Illumina_untyped_1b
- *  recognizes runs produced with all v1 loaders
- *  having single-channel qualities
- */
-bool NCBI_SRA_Illumina_untyped_1b ( const KTable *tbl, const KMetadata *meta );
-
-
-/* ABI_untyped_1
- *  recognizes runs produced with all v1 loaders
- */
-bool NCBI_SRA_ABI_untyped_1 ( const KTable *tbl, const KMetadata *meta );
-
-#endif
diff --git a/libs/sraxf/untyped.c b/libs/sraxf/untyped.c
deleted file mode 100644
index c956636..0000000
--- a/libs/sraxf/untyped.c
+++ /dev/null
@@ -1,378 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <vdb/vdb-priv.h>
-#include <kdb/manager.h>
-#include <kdb/table.h>
-#include <kdb/column.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-static
-bool KMetadataStrEqual ( const KMetadata *meta, const char *path, const char *str )
-{
-    const KMDataNode *node;
-    rc_t rc = KMetadataOpenNodeRead ( meta, & node, "%s", path );
-    if ( rc == 0 )
-    {
-        size_t num_read;
-        char buff [ 4096 ];
-        rc = KMDataNodeReadCString ( node, buff, sizeof buff, & num_read );
-        KMDataNodeRelease ( node );
-        if ( rc == 0 )
-        {
-            if ( strcmp ( buff, str ) == 0 )
-                return true;
-        }
-    }
-
-    return false;
-}
-
-static
-bool KMetadataNumEqual ( const KMetadata *meta, const char *path, int64_t num )
-{
-    const KMDataNode *node;
-    rc_t rc = KMetadataOpenNodeRead ( meta, & node, "%s", path );
-    if ( rc == 0 )
-    {
-        int64_t i;
-        rc = KMDataNodeReadAsI64 ( node, & i );
-        KMDataNodeRelease ( node );
-        if ( rc == 0 )
-        {
-            if ( i == num )
-                return true;
-        }
-    }
-
-    return false;
-}
-
-static
-bool KMetadataVersEqual ( const KMetadata *meta, const char *name, const char *vers )
-{
-    bool equal = false;
-    const KMDataNode *node;
-    rc_t rc = KMetadataOpenNodeRead ( meta, & node, "SOFTWARE/loader" );
-    if ( rc == 0 )
-    {
-        size_t num_read;
-        char attr [ 256 ];
-        rc = KMDataNodeReadAttr ( node, "name", attr, sizeof attr, & num_read );
-        if ( rc == 0 )
-        {
-            if ( memcmp ( attr, name, strlen ( name ) ) == 0 )
-            {
-                if ( vers == NULL || vers [ 0 ] == 0 )
-                    equal = true;
-                else
-                {
-                    rc = KMDataNodeReadAttr ( node, "vers", attr, sizeof attr, & num_read );
-                    if ( rc == 0 )
-                    {
-                        if ( memcmp ( attr, vers, strlen ( vers ) ) == 0 )
-                            equal = true;
-                    }
-                }
-            }
-        }
-
-        KMDataNodeRelease ( node );
-    }
-
-    return equal;
-}
-
-static
-bool KMetadataExists ( const KMetadata *meta, const char *path )
-{
-    const KMDataNode *node;
-    rc_t rc = KMetadataOpenNodeRead ( meta, & node, "%s", path );
-    if ( rc != 0 )
-        return false;
-    KMDataNodeRelease ( node );
-    return true;
-}
-
-static
-bool KMetadataEmpty ( const KMetadata *meta, const char *path )
-{
-    size_t num_read, remaining;
-    const KMDataNode *node;
-    rc_t rc = KMetadataOpenNodeRead ( meta, & node, "%s", path );
-    if ( rc != 0 )
-        return true;
-    rc = KMDataNodeRead ( node, 0, & num_read, 0, & num_read, & remaining );
-    KMDataNodeRelease ( node );
-    if ( rc == 0 && remaining != 0 )
-        return false;
-    return true;
-}
-
-static
-bool KColumnTypeEqual ( const KTable *tbl, const char *col, const char *type )
-{
-    /* TBD - this operation is expensive
-       should be addressed either by caching opened columns on table
-       or by introducing a path to open column metadata from table */
-    const KColumn *kcol;
-    rc_t rc = KTableOpenColumnRead ( tbl, & kcol, "%s", col );
-    if ( rc == 0 )
-    {
-        const KMetadata *meta;
-        rc = KColumnOpenMetadataRead ( kcol, & meta );
-        KColumnRelease ( kcol );
-        if ( rc == 0 )
-        {
-            /* this is a expected to be a v1 column
-               open its decoding node */
-            const KMDataNode *node;
-            rc = KMetadataOpenNodeRead ( meta, & node, "decoding" );
-            KMetadataRelease ( meta );
-            if ( rc == 0 )
-            {
-                /* read its type */
-                size_t size;
-                char type_expr [ 256 ];
-                rc = KMDataNodeReadAttr ( node, "type",
-                    type_expr, sizeof type_expr, & size );
-                KMDataNodeRelease ( node );
-                if ( rc == 0 )
-                {
-                    if ( memcmp ( type_expr, type, strlen ( type ) ) == 0 )
-                        return true;
-                }
-            }
-        }
-    }
-    return false;
-}
-
-
-/* accept_untyped
- *  recognizes any table at all
- *  used by admin to correct corrupt tables
- */
-MOD_EXPORT
-bool CC NCBI_SRA_accept_untyped ( const KTable *tbl, const KMetadata *meta )
-{
-    return true;
-}
-
-
-/* 454_untyped_0
- *  recognizes all runs produced with v0 loader
- */
-MOD_EXPORT
-bool CC NCBI_SRA__454__untyped_0 ( const KTable *tbl, const KMetadata *meta )
-{
-    if ( KMetadataStrEqual ( meta, "PLATFORM", "454" ) )
-    {
-        if ( ! KMetadataExists ( meta, "SOFTWARE" ) )
-        {
-            if ( KMetadataExists ( meta, "MSC454_FLOW_CHARS" ) &&
-                 KMetadataExists ( meta, "MSC454_KEY_SEQUENCE" ) )
-            {
-                /* don't bother looking at columns */
-                return true;
-            }
-        }
-    }
-    return false;
-}
-
-
-/* 454_untyped_1_2a
- *  recognizes runs produced with v1.2 loader
- *  where the linker is present
- *  and a physical READ_SEG is present
- */
-MOD_EXPORT
-bool CC NCBI_SRA__454__untyped_1_2a ( const KTable *tbl, const KMetadata *meta )
-{
-    if ( KMetadataVersEqual ( meta, "sff-load", "1" ) ||
-         KMetadataVersEqual ( meta, "sff-load", "0" ) )
-    {
-        if ( KMetadataExists ( meta, "col/NREADS" ) )
-        {
-            if ( ! KMetadataEmpty ( meta, "col/LINKER_SEQUENCE/row" ) )
-                return KTableExists ( tbl, kptColumn, "READ_SEG" );
-        }
-    }
-    return false;
-}
-
-
-/* 454_untyped_1_2b
- *  recognizes runs produced with v1.2 loader
- *  where the linker is missing or empty
- *  and a physical READ_SEG is present
- */
-MOD_EXPORT
-bool CC NCBI_SRA__454__untyped_1_2b ( const KTable *tbl, const KMetadata *meta )
-{
-    if ( KMetadataVersEqual ( meta, "sff-load", "1" ) ||
-         KMetadataVersEqual ( meta, "sff-load", "0" ) )
-    {
-        if ( KMetadataExists ( meta, "col/NREADS" ) )
-        {
-            if ( KMetadataEmpty ( meta, "col/LINKER_SEQUENCE/row" ) )
-                return KTableExists ( tbl, kptColumn, "READ_SEG" );
-        }
-    }
-    return false;
-}
-
-
-/* Illumina_untyped_0a
- *  recognizes runs produced with v0 loader with 4-channel QUALITY
- */
-MOD_EXPORT
-bool CC NCBI_SRA_Illumina_untyped_0a ( const KTable *tbl, const KMetadata *meta )
-{
-    if ( KMetadataStrEqual ( meta, "PLATFORM", "SOLEXA" ) )
-    {
-        if ( ! KMetadataExists ( meta, "SOFTWARE" ) )
-        {
-            if ( KMetadataNumEqual ( meta, "NUMBER_PRB_CHANNELS", 4 ) ||
-                 KMetadataNumEqual ( meta, "NUMBER_PRB_CHANNELS_1", 4 ) )
-            {
-                return true;
-            }
-        }
-    }
-    return false;
-}
-
-
-/* Illumina_untyped_0b
- *  recognizes runs produced with v0 loader with single-channel QUALITY or QUALITY2
- */
-MOD_EXPORT
-bool CC NCBI_SRA_Illumina_untyped_0b ( const KTable *tbl, const KMetadata *meta )
-{
-    if ( KMetadataStrEqual ( meta, "PLATFORM", "SOLEXA" ) )
-    {
-        if ( ! KMetadataExists ( meta, "SOFTWARE" ) )
-        {
-            if ( KMetadataNumEqual ( meta, "NUMBER_PRB_CHANNELS", 1 ) ||
-                 KMetadataNumEqual ( meta, "NUMBER_PRB_CHANNELS_1", 1 ) ||
-                 KMetadataNumEqual ( meta, "NUMBER_PRB_CHANNELS_2", 1 ) )
-            {
-                return true;
-            }
-        }
-    }
-    return false;
-}
-
-
-/* Illumina_untyped_1a
- *  recognizes runs produced with v1 srf and native loaders
- *  having 4-channel qualities
- */
-MOD_EXPORT
-bool CC NCBI_SRA_Illumina_untyped_1a ( const KTable *tbl, const KMetadata *meta )
-{
-    if ( KMetadataStrEqual ( meta, "PLATFORM", "ILLUMINA" ) )
-    {
-        if ( KMetadataVersEqual ( meta, "illumina-load", "1" ) ||
-             KMetadataVersEqual ( meta, "srf-load", "1" ) )
-        {
-            return KColumnTypeEqual ( tbl, "QUALITY", "NCBI:SRA:swapped_qual4" );
-        }
-    }
-    return false;
-}
-
-
-/* Illumina_untyped_1b
- *  recognizes runs produced with all v1 loaders
- *  having single-channel qualities
- */
-MOD_EXPORT
-bool CC NCBI_SRA_Illumina_untyped_1b ( const KTable *tbl, const KMetadata *meta )
-{
-    if ( KMetadataStrEqual ( meta, "PLATFORM", "ILLUMINA" ) )
-    {
-        if ( KMetadataVersEqual ( meta, "fastq-load", "1" ) ||
-             KMetadataVersEqual ( meta, "fastq-load", "0" ) )
-            return true;
-        if ( KMetadataVersEqual ( meta, "illumina-load", "1" ) ||
-             KMetadataVersEqual ( meta, "srf-load", "1" ) )
-        {
-            return ! KColumnTypeEqual ( tbl, "QUALITY", "NCBI:SRA:swapped_qual4" );
-        }
-    }
-    return false;
-}
-
-
-/* ABI_untyped_1
- *  recognizes runs produced with all v1 loaders
- */
-MOD_EXPORT
-bool CC NCBI_SRA_ABI_untyped_1 ( const KTable *tbl, const KMetadata *meta )
-{
-    if ( KMetadataStrEqual ( meta, "PLATFORM", "ABSOLID" ) )
-    {
-        if ( ! KMetadataExists ( meta, "SOFTWARE" ) ||
-             KMetadataVersEqual ( meta, "abi-load", "1" ) ||
-             KMetadataVersEqual ( meta, "srf-load", "1" ) )
-        {
-            return true;
-        }
-    }
-    return false;
-}
-
-
-/* this is here simply to force the compiler to check
-   the function signatures listed above against a
-   typedef for the function used by vdb. */
-#if _DEBUGGING
-VUntypedFunc test_signature [] =
-{
-    NCBI_SRA__454__untyped_0,
-    NCBI_SRA__454__untyped_1_2a,
-    NCBI_SRA__454__untyped_1_2b,
-    NCBI_SRA_Illumina_untyped_0a,
-    NCBI_SRA_Illumina_untyped_0b,
-    NCBI_SRA_Illumina_untyped_1a,
-    NCBI_SRA_Illumina_untyped_1b,
-    NCBI_SRA_ABI_untyped_1
-};
-#endif
diff --git a/libs/sraxf/v0-decompress-init.c b/libs/sraxf/v0-decompress-init.c
deleted file mode 100644
index 93f4399..0000000
--- a/libs/sraxf/v0-decompress-init.c
+++ /dev/null
@@ -1,2838 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include "v0-decompress.h"
-#include "v0-decompress-local.h"
-#include <sra/sradb.h> /* SRA_PLATFORM_... */
-#include <klib/sort.h>
-#include <sysalloc.h>
-
-/* globals
- */
-extern SRALocal     gv_local;
-extern SRALookup_t  gp_lookup;
-
-/* local prototypes
- */
-
-static void _s_init_sig_454_default (void);
-static void _s_init_prb_454_default (void);
-static void _s_init_pos_454_default (void);
-
-static void _s_init_seq_default     (void);
-
-static void _s_init_sig_slx_default (void);
-static void _s_init_int_slx_default (void);
-static void _s_init_nse_slx_default (void);
-static void _s_init_prb_slx_default (void);
-
-static void _s_init_slx_convqs4to1_default (void);
-
-
-/* initialize tables with default values
- */
-void sra_decompress_init (void)
-{ 
-  memset (&gv_local, 0, sizeof(struct SRALocal));
-
-  _s_init_sig_454_default (); 
-  _s_init_prb_454_default ();
-  _s_init_pos_454_default ();
-
-  _s_init_seq_default     ();
-
-  _s_init_sig_slx_default ();
-  _s_init_int_slx_default ();
-  _s_init_nse_slx_default ();
-  _s_init_prb_slx_default ();
-
-  _s_init_slx_convqs4to1_default ();
-}   
-
-/* local routines
- */
-static int64_t CC _s_cmp_indexes (const void* a1, const void* a2, void *data)
-{
-  SRALookup_t plook = data;
-  uint32_t bits1    = plook[*(uint16_t*)a1].bits;
-  uint32_t bits2    = plook[*(uint16_t*)a2].bits;
-
-  return (int64_t)bits1 - (int64_t)bits2;
-}
-/*
- */
-static void _s_sort_lookup (const SRALookup_t plook, uint16_t* idx, uint16_t size)
-{
-  uint16_t i;
-  for (i=0; i<size; i++) *(idx+i) = i;
-
-  /* make sure it will sort a corect table
-   */
-  ksort ( idx, size, sizeof(uint16_t), _s_cmp_indexes, plook );
-}
-/*
- */
-/*
- */
-static void _s_init_slx_convqs4to1_default (void)
-{
-  gv_local.convqs4to1 [ 0] =  0;  gv_local.convqs4to1 [ 1] =  0;
-  gv_local.convqs4to1 [ 2] =  0;  gv_local.convqs4to1 [ 3] =  0;
-  gv_local.convqs4to1 [ 4] =  0;  gv_local.convqs4to1 [ 5] =  0;
-  gv_local.convqs4to1 [ 6] =  0;  gv_local.convqs4to1 [ 7] =  0;
-  gv_local.convqs4to1 [ 8] =  0;  gv_local.convqs4to1 [ 9] =  0;
-  gv_local.convqs4to1 [10] =  0;  gv_local.convqs4to1 [11] =  0;
-  gv_local.convqs4to1 [12] =  0;  gv_local.convqs4to1 [13] =  0;
-  gv_local.convqs4to1 [14] =  0;  gv_local.convqs4to1 [15] =  0;
-  gv_local.convqs4to1 [16] =  0;  gv_local.convqs4to1 [17] =  0;
-  gv_local.convqs4to1 [18] =  0;  gv_local.convqs4to1 [19] =  0;
-  gv_local.convqs4to1 [20] =  0;  gv_local.convqs4to1 [21] =  0;
-  gv_local.convqs4to1 [22] =  0;  gv_local.convqs4to1 [23] =  0;
-  gv_local.convqs4to1 [24] =  0;  gv_local.convqs4to1 [25] =  0;
-  gv_local.convqs4to1 [26] =  0;  gv_local.convqs4to1 [27] =  0;
-  gv_local.convqs4to1 [28] =  0;  gv_local.convqs4to1 [29] =  0;
-  gv_local.convqs4to1 [30] =  0;  gv_local.convqs4to1 [31] =  1;
-  gv_local.convqs4to1 [32] =  1;  gv_local.convqs4to1 [33] =  1;
-  gv_local.convqs4to1 [34] =  1;  gv_local.convqs4to1 [35] =  1;
-  gv_local.convqs4to1 [36] =  1;  gv_local.convqs4to1 [37] =  2;
-  gv_local.convqs4to1 [38] =  2;  gv_local.convqs4to1 [39] =  3;
-  gv_local.convqs4to1 [40] =  3;  gv_local.convqs4to1 [41] =  4;
-  gv_local.convqs4to1 [42] =  4;  gv_local.convqs4to1 [43] =  5;
-  gv_local.convqs4to1 [44] =  5;  gv_local.convqs4to1 [45] =  6;
-  gv_local.convqs4to1 [46] =  7;  gv_local.convqs4to1 [47] =  8;
-  gv_local.convqs4to1 [48] =  9;  gv_local.convqs4to1 [49] = 10;
-  gv_local.convqs4to1 [50] = 10;  gv_local.convqs4to1 [51] = 11;
-  gv_local.convqs4to1 [52] = 12;  gv_local.convqs4to1 [53] = 13;
-  gv_local.convqs4to1 [54] = 14;  gv_local.convqs4to1 [55] = 15;
-  gv_local.convqs4to1 [56] = 16;  gv_local.convqs4to1 [57] = 17;
-  gv_local.convqs4to1 [58] = 18;  gv_local.convqs4to1 [59] = 19;
-  gv_local.convqs4to1 [60] = 20;  gv_local.convqs4to1 [61] = 21;
-  gv_local.convqs4to1 [62] = 22;  gv_local.convqs4to1 [63] = 23;
-  gv_local.convqs4to1 [64] = 24;  gv_local.convqs4to1 [65] = 25;
-  gv_local.convqs4to1 [66] = 26;  gv_local.convqs4to1 [67] = 27;
-  gv_local.convqs4to1 [68] = 28;  gv_local.convqs4to1 [69] = 29;
-  gv_local.convqs4to1 [70] = 30;  gv_local.convqs4to1 [71] = 31;
-  gv_local.convqs4to1 [72] = 32;  gv_local.convqs4to1 [73] = 33;
-  gv_local.convqs4to1 [74] = 34;  gv_local.convqs4to1 [75] = 35;
-  gv_local.convqs4to1 [76] = 36;  gv_local.convqs4to1 [77] = 37;
-  gv_local.convqs4to1 [78] = 38;  gv_local.convqs4to1 [79] = 39;
-  gv_local.convqs4to1 [80] = 40;
-}
-/*
- */
-static void _s_init_prb_slx_default (void)
-{
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  int      i, j;
-  uchar_t  val;
-#endif
-
-  memset (gv_local.lookup_slx_prb, 0, sizeof(SRALookup)*PRB_SLX_HUFF_TREESIZE);
-
-  /*
-  // each bit is represented by two slashes or backslashes
-  //
-  // where / is 0
-  //      /
-  //
-  // and  \  is 1
-  //       \
-  //             1                   0 - 0000
-  //              \  /\              1 - 0100
-  //               \/  \    6        4 - 1000
-  //               /   /\  /         5 - 1010
-  //              /   /  \/   14     6 - 1100
-  //             0   /\   \  /      14 - 1110
-  //                /  \   \/       15 - 1111
-  //               4    5   \
-  //                         \
-  //                         15
-  //
-  */
-
-  gv_local.lookup_slx_prb[0].nbits = 2; gv_local.lookup_slx_prb[0].bits = 0x00000000;  /* 0: m_qmax  m_qmin  m_qmin m_qmin */
-  gv_local.lookup_slx_prb[1].nbits = 2; gv_local.lookup_slx_prb[1].bits = 0x40000000;  /* 1:     -5      -5      -5     -5 */
-  gv_local.lookup_slx_prb[2].nbits = 3; gv_local.lookup_slx_prb[2].bits = 0x80000000;  /* 2:      A      -A  m_qmin m_qmin */
-  gv_local.lookup_slx_prb[3].nbits = 3; gv_local.lookup_slx_prb[3].bits = 0xA0000000;  /* 3:      A  m_qmin      -A m_qmin */
-  gv_local.lookup_slx_prb[4].nbits = 3; gv_local.lookup_slx_prb[4].bits = 0xC0000000;  /* 4:      A  m_qmin  m_qmin     -A */
-  gv_local.lookup_slx_prb[5].nbits = 4; gv_local.lookup_slx_prb[5].bits = 0xE0000000;  /* 5: escape                        */
-  gv_local.lookup_slx_prb[6].nbits = 4; gv_local.lookup_slx_prb[6].bits = 0xF0000000;  /* 6: UNUSED                        */
-
-   _s_sort_lookup (gv_local.lookup_slx_prb, gv_local.idx_slx_prb, PRB_SLX_HUFF_TREESIZE);
-
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  /* reverse huffman lookup table
-   */
-  memset (gv_local.rlookup_slx_prb, 0, sizeof(uchar_t)*REV_HUFF_TREESIZE_08);
-
-  for (i=0; i<PRB_SLX_HUFF_TREESIZE; i++)
-  {
-    val = gv_local.lookup_slx_prb[i].bits >> 24;
-    gv_local.rlookup_slx_prb [val] = (uchar_t) i;
-
-    for (j=1; j<=(0xFF>>gv_local.lookup_slx_prb[i].nbits); j++)
-      gv_local.rlookup_slx_prb [val+j] = (uchar_t) i;
-  }
-#endif
-
-  gv_local.lookup_slx_prb_initialized = 1;
-}
-/*
- */
-static void _s_init_sig_slx_default (void)
-{
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  int      i, j;
-  uint16_t val;
-#endif
-
-  memset (gv_local.lookup_slx_sig,  0, sizeof(SRALookup)*SIG_HUFF_TREESIZE);
-
-  gv_local.lookup_slx_sig[  0].nbits = 13; gv_local.lookup_slx_sig[  0].bits = 0xB5180000;
-  gv_local.lookup_slx_sig[  1].nbits = 13; gv_local.lookup_slx_sig[  1].bits = 0x3D680000;
-  gv_local.lookup_slx_sig[  2].nbits = 13; gv_local.lookup_slx_sig[  2].bits = 0xBAA00000;
-  gv_local.lookup_slx_sig[  3].nbits = 13; gv_local.lookup_slx_sig[  3].bits = 0xB7D80000;
-  gv_local.lookup_slx_sig[  4].nbits = 13; gv_local.lookup_slx_sig[  4].bits = 0x59500000;
-  gv_local.lookup_slx_sig[  5].nbits = 13; gv_local.lookup_slx_sig[  5].bits = 0xB7080000;
-  gv_local.lookup_slx_sig[  6].nbits = 13; gv_local.lookup_slx_sig[  6].bits = 0xB8180000;
-  gv_local.lookup_slx_sig[  7].nbits = 13; gv_local.lookup_slx_sig[  7].bits = 0x8B980000;
-  gv_local.lookup_slx_sig[  8].nbits = 13; gv_local.lookup_slx_sig[  8].bits = 0xB7880000;
-  gv_local.lookup_slx_sig[  9].nbits = 13; gv_local.lookup_slx_sig[  9].bits = 0x5EE80000;
-  gv_local.lookup_slx_sig[ 10].nbits = 13; gv_local.lookup_slx_sig[ 10].bits = 0xC0A00000;
-  gv_local.lookup_slx_sig[ 11].nbits = 13; gv_local.lookup_slx_sig[ 11].bits = 0xB7980000;
-  gv_local.lookup_slx_sig[ 12].nbits = 13; gv_local.lookup_slx_sig[ 12].bits = 0x8B880000;
-  gv_local.lookup_slx_sig[ 13].nbits = 13; gv_local.lookup_slx_sig[ 13].bits = 0x8B900000;
-  gv_local.lookup_slx_sig[ 14].nbits = 13; gv_local.lookup_slx_sig[ 14].bits = 0xB7900000;
-  gv_local.lookup_slx_sig[ 15].nbits = 13; gv_local.lookup_slx_sig[ 15].bits = 0xC4400000;
-  gv_local.lookup_slx_sig[ 16].nbits = 13; gv_local.lookup_slx_sig[ 16].bits = 0xBA480000;
-  gv_local.lookup_slx_sig[ 17].nbits = 13; gv_local.lookup_slx_sig[ 17].bits = 0xC0A80000;
-  gv_local.lookup_slx_sig[ 18].nbits = 13; gv_local.lookup_slx_sig[ 18].bits = 0xBD700000;
-  gv_local.lookup_slx_sig[ 19].nbits = 13; gv_local.lookup_slx_sig[ 19].bits = 0xB8100000;
-  gv_local.lookup_slx_sig[ 20].nbits = 13; gv_local.lookup_slx_sig[ 20].bits = 0xC1A00000;
-  gv_local.lookup_slx_sig[ 21].nbits = 13; gv_local.lookup_slx_sig[ 21].bits = 0xBC700000;
-  gv_local.lookup_slx_sig[ 22].nbits = 13; gv_local.lookup_slx_sig[ 22].bits = 0xC4500000;
-  gv_local.lookup_slx_sig[ 23].nbits = 13; gv_local.lookup_slx_sig[ 23].bits = 0xC5200000;
-  gv_local.lookup_slx_sig[ 24].nbits = 13; gv_local.lookup_slx_sig[ 24].bits = 0xC5780000;
-  gv_local.lookup_slx_sig[ 25].nbits = 13; gv_local.lookup_slx_sig[ 25].bits = 0xC5380000;
-  gv_local.lookup_slx_sig[ 26].nbits = 13; gv_local.lookup_slx_sig[ 26].bits = 0xC9A00000;
-  gv_local.lookup_slx_sig[ 27].nbits = 13; gv_local.lookup_slx_sig[ 27].bits = 0xCBA00000;
-  gv_local.lookup_slx_sig[ 28].nbits = 13; gv_local.lookup_slx_sig[ 28].bits = 0xC5300000;
-  gv_local.lookup_slx_sig[ 29].nbits = 13; gv_local.lookup_slx_sig[ 29].bits = 0xC0B80000;
-  gv_local.lookup_slx_sig[ 30].nbits = 13; gv_local.lookup_slx_sig[ 30].bits = 0xC5700000;
-  gv_local.lookup_slx_sig[ 31].nbits = 13; gv_local.lookup_slx_sig[ 31].bits = 0xD6280000;
-  gv_local.lookup_slx_sig[ 32].nbits = 13; gv_local.lookup_slx_sig[ 32].bits = 0xC4480000;
-  gv_local.lookup_slx_sig[ 33].nbits = 13; gv_local.lookup_slx_sig[ 33].bits = 0xD6180000;
-  gv_local.lookup_slx_sig[ 34].nbits = 13; gv_local.lookup_slx_sig[ 34].bits = 0xC9C00000;
-  gv_local.lookup_slx_sig[ 35].nbits = 13; gv_local.lookup_slx_sig[ 35].bits = 0xCA680000;
-  gv_local.lookup_slx_sig[ 36].nbits = 13; gv_local.lookup_slx_sig[ 36].bits = 0xCEF80000;
-  gv_local.lookup_slx_sig[ 37].nbits = 13; gv_local.lookup_slx_sig[ 37].bits = 0xCCD00000;
-  gv_local.lookup_slx_sig[ 38].nbits = 12; gv_local.lookup_slx_sig[ 38].bits = 0x1AA00000;
-  gv_local.lookup_slx_sig[ 39].nbits = 12; gv_local.lookup_slx_sig[ 39].bits = 0x18800000;
-  gv_local.lookup_slx_sig[ 40].nbits = 13; gv_local.lookup_slx_sig[ 40].bits = 0xD6300000;
-  gv_local.lookup_slx_sig[ 41].nbits = 12; gv_local.lookup_slx_sig[ 41].bits = 0x18900000;
-  gv_local.lookup_slx_sig[ 42].nbits = 13; gv_local.lookup_slx_sig[ 42].bits = 0xCBA80000;
-  gv_local.lookup_slx_sig[ 43].nbits = 13; gv_local.lookup_slx_sig[ 43].bits = 0xD7E80000;
-  gv_local.lookup_slx_sig[ 44].nbits = 13; gv_local.lookup_slx_sig[ 44].bits = 0xC9C80000;
-  gv_local.lookup_slx_sig[ 45].nbits = 13; gv_local.lookup_slx_sig[ 45].bits = 0xD4F80000;
-  gv_local.lookup_slx_sig[ 46].nbits = 12; gv_local.lookup_slx_sig[ 46].bits = 0x1AB00000;
-  gv_local.lookup_slx_sig[ 47].nbits = 12; gv_local.lookup_slx_sig[ 47].bits = 0x2A800000;
-  gv_local.lookup_slx_sig[ 48].nbits = 12; gv_local.lookup_slx_sig[ 48].bits = 0x2F100000;
-  gv_local.lookup_slx_sig[ 49].nbits = 12; gv_local.lookup_slx_sig[ 49].bits = 0x1B600000;
-  gv_local.lookup_slx_sig[ 50].nbits = 12; gv_local.lookup_slx_sig[ 50].bits = 0x1C500000;
-  gv_local.lookup_slx_sig[ 51].nbits = 12; gv_local.lookup_slx_sig[ 51].bits = 0x29D00000;
-  gv_local.lookup_slx_sig[ 52].nbits = 12; gv_local.lookup_slx_sig[ 52].bits = 0x2A200000;
-  gv_local.lookup_slx_sig[ 53].nbits = 12; gv_local.lookup_slx_sig[ 53].bits = 0x39400000;
-  gv_local.lookup_slx_sig[ 54].nbits = 12; gv_local.lookup_slx_sig[ 54].bits = 0x33100000;
-  gv_local.lookup_slx_sig[ 55].nbits = 12; gv_local.lookup_slx_sig[ 55].bits = 0x29C00000;
-  gv_local.lookup_slx_sig[ 56].nbits = 12; gv_local.lookup_slx_sig[ 56].bits = 0x28700000;
-  gv_local.lookup_slx_sig[ 57].nbits = 12; gv_local.lookup_slx_sig[ 57].bits = 0x32200000;
-  gv_local.lookup_slx_sig[ 58].nbits = 12; gv_local.lookup_slx_sig[ 58].bits = 0x39700000;
-  gv_local.lookup_slx_sig[ 59].nbits = 12; gv_local.lookup_slx_sig[ 59].bits = 0x39500000;
-  gv_local.lookup_slx_sig[ 60].nbits = 12; gv_local.lookup_slx_sig[ 60].bits = 0x32800000;
-  gv_local.lookup_slx_sig[ 61].nbits = 12; gv_local.lookup_slx_sig[ 61].bits = 0x34300000;
-  gv_local.lookup_slx_sig[ 62].nbits = 12; gv_local.lookup_slx_sig[ 62].bits = 0x32300000;
-  gv_local.lookup_slx_sig[ 63].nbits = 12; gv_local.lookup_slx_sig[ 63].bits = 0x2A900000;
-  gv_local.lookup_slx_sig[ 64].nbits = 12; gv_local.lookup_slx_sig[ 64].bits = 0x3FA00000;
-  gv_local.lookup_slx_sig[ 65].nbits = 12; gv_local.lookup_slx_sig[ 65].bits = 0x39B00000;
-  gv_local.lookup_slx_sig[ 66].nbits = 12; gv_local.lookup_slx_sig[ 66].bits = 0x3F900000;
-  gv_local.lookup_slx_sig[ 67].nbits = 12; gv_local.lookup_slx_sig[ 67].bits = 0x3C300000;
-  gv_local.lookup_slx_sig[ 68].nbits = 12; gv_local.lookup_slx_sig[ 68].bits = 0x5E300000;
-  gv_local.lookup_slx_sig[ 69].nbits = 12; gv_local.lookup_slx_sig[ 69].bits = 0x3E800000;
-  gv_local.lookup_slx_sig[ 70].nbits = 12; gv_local.lookup_slx_sig[ 70].bits = 0x39E00000;
-  gv_local.lookup_slx_sig[ 71].nbits = 12; gv_local.lookup_slx_sig[ 71].bits = 0x3E500000;
-  gv_local.lookup_slx_sig[ 72].nbits = 12; gv_local.lookup_slx_sig[ 72].bits = 0x88F00000;
-  gv_local.lookup_slx_sig[ 73].nbits = 12; gv_local.lookup_slx_sig[ 73].bits = 0x88000000;
-  gv_local.lookup_slx_sig[ 74].nbits = 12; gv_local.lookup_slx_sig[ 74].bits = 0x88D00000;
-  gv_local.lookup_slx_sig[ 75].nbits = 12; gv_local.lookup_slx_sig[ 75].bits = 0x5EB00000;
-  gv_local.lookup_slx_sig[ 76].nbits = 12; gv_local.lookup_slx_sig[ 76].bits = 0x3FB00000;
-  gv_local.lookup_slx_sig[ 77].nbits = 12; gv_local.lookup_slx_sig[ 77].bits = 0x59100000;
-  gv_local.lookup_slx_sig[ 78].nbits = 12; gv_local.lookup_slx_sig[ 78].bits = 0x88C00000;
-  gv_local.lookup_slx_sig[ 79].nbits = 12; gv_local.lookup_slx_sig[ 79].bits = 0x88E00000;
-  gv_local.lookup_slx_sig[ 80].nbits = 12; gv_local.lookup_slx_sig[ 80].bits = 0x88100000;
-  gv_local.lookup_slx_sig[ 81].nbits = 12; gv_local.lookup_slx_sig[ 81].bits = 0xB6800000;
-  gv_local.lookup_slx_sig[ 82].nbits = 12; gv_local.lookup_slx_sig[ 82].bits = 0xB5200000;
-  gv_local.lookup_slx_sig[ 83].nbits = 12; gv_local.lookup_slx_sig[ 83].bits = 0x5E200000;
-  gv_local.lookup_slx_sig[ 84].nbits = 12; gv_local.lookup_slx_sig[ 84].bits = 0xB7C00000;
-  gv_local.lookup_slx_sig[ 85].nbits = 12; gv_local.lookup_slx_sig[ 85].bits = 0xB8000000;
-  gv_local.lookup_slx_sig[ 86].nbits = 12; gv_local.lookup_slx_sig[ 86].bits = 0xB9200000;
-  gv_local.lookup_slx_sig[ 87].nbits = 12; gv_local.lookup_slx_sig[ 87].bits = 0xB7300000;
-  gv_local.lookup_slx_sig[ 88].nbits = 12; gv_local.lookup_slx_sig[ 88].bits = 0xC1100000;
-  gv_local.lookup_slx_sig[ 89].nbits = 12; gv_local.lookup_slx_sig[ 89].bits = 0xBA500000;
-  gv_local.lookup_slx_sig[ 90].nbits = 12; gv_local.lookup_slx_sig[ 90].bits = 0xC0900000;
-  gv_local.lookup_slx_sig[ 91].nbits = 12; gv_local.lookup_slx_sig[ 91].bits = 0xC1900000;
-  gv_local.lookup_slx_sig[ 92].nbits = 12; gv_local.lookup_slx_sig[ 92].bits = 0xB8500000;
-  gv_local.lookup_slx_sig[ 93].nbits = 12; gv_local.lookup_slx_sig[ 93].bits = 0xC1800000;
-  gv_local.lookup_slx_sig[ 94].nbits = 12; gv_local.lookup_slx_sig[ 94].bits = 0xBAE00000;
-  gv_local.lookup_slx_sig[ 95].nbits = 12; gv_local.lookup_slx_sig[ 95].bits = 0xC9B00000;
-  gv_local.lookup_slx_sig[ 96].nbits = 12; gv_local.lookup_slx_sig[ 96].bits = 0xC0800000;
-  gv_local.lookup_slx_sig[ 97].nbits = 12; gv_local.lookup_slx_sig[ 97].bits = 0xC5D00000;
-  gv_local.lookup_slx_sig[ 98].nbits = 12; gv_local.lookup_slx_sig[ 98].bits = 0xC1000000;
-  gv_local.lookup_slx_sig[ 99].nbits = 12; gv_local.lookup_slx_sig[ 99].bits = 0xC0500000;
-  gv_local.lookup_slx_sig[100].nbits = 12; gv_local.lookup_slx_sig[100].bits = 0xC8100000;
-  gv_local.lookup_slx_sig[101].nbits = 12; gv_local.lookup_slx_sig[101].bits = 0xC1C00000;
-  gv_local.lookup_slx_sig[102].nbits = 12; gv_local.lookup_slx_sig[102].bits = 0xC8600000;
-  gv_local.lookup_slx_sig[103].nbits = 12; gv_local.lookup_slx_sig[103].bits = 0xCED00000;
-  gv_local.lookup_slx_sig[104].nbits = 12; gv_local.lookup_slx_sig[104].bits = 0xCC900000;
-  gv_local.lookup_slx_sig[105].nbits = 12; gv_local.lookup_slx_sig[105].bits = 0xCE400000;
-  gv_local.lookup_slx_sig[106].nbits = 12; gv_local.lookup_slx_sig[106].bits = 0xCC500000;
-  gv_local.lookup_slx_sig[107].nbits = 12; gv_local.lookup_slx_sig[107].bits = 0xCC400000;
-  gv_local.lookup_slx_sig[108].nbits = 12; gv_local.lookup_slx_sig[108].bits = 0xCBB00000;
-  gv_local.lookup_slx_sig[109].nbits = 12; gv_local.lookup_slx_sig[109].bits = 0xCA700000;
-  gv_local.lookup_slx_sig[110].nbits = 12; gv_local.lookup_slx_sig[110].bits = 0xD6000000;
-  gv_local.lookup_slx_sig[111].nbits = 12; gv_local.lookup_slx_sig[111].bits = 0xD5D00000;
-  gv_local.lookup_slx_sig[112].nbits = 12; gv_local.lookup_slx_sig[112].bits = 0xD4E00000;
-  gv_local.lookup_slx_sig[113].nbits = 12; gv_local.lookup_slx_sig[113].bits = 0xD5C00000;
-  gv_local.lookup_slx_sig[114].nbits = 12; gv_local.lookup_slx_sig[114].bits = 0xC9E00000;
-  gv_local.lookup_slx_sig[115].nbits = 12; gv_local.lookup_slx_sig[115].bits = 0xD5700000;
-  gv_local.lookup_slx_sig[116].nbits = 11; gv_local.lookup_slx_sig[116].bits = 0x1B400000;
-  gv_local.lookup_slx_sig[117].nbits = 12; gv_local.lookup_slx_sig[117].bits = 0xD7F00000;
-  gv_local.lookup_slx_sig[118].nbits = 11; gv_local.lookup_slx_sig[118].bits = 0x1CC00000;
-  gv_local.lookup_slx_sig[119].nbits = 11; gv_local.lookup_slx_sig[119].bits = 0x18A00000;
-  gv_local.lookup_slx_sig[120].nbits = 11; gv_local.lookup_slx_sig[120].bits = 0x19000000;
-  gv_local.lookup_slx_sig[121].nbits = 11; gv_local.lookup_slx_sig[121].bits = 0x1C600000;
-  gv_local.lookup_slx_sig[122].nbits = 11; gv_local.lookup_slx_sig[122].bits = 0x1E000000;
-  gv_local.lookup_slx_sig[123].nbits = 11; gv_local.lookup_slx_sig[123].bits = 0x1E200000;
-  gv_local.lookup_slx_sig[124].nbits = 11; gv_local.lookup_slx_sig[124].bits = 0x32A00000;
-  gv_local.lookup_slx_sig[125].nbits = 11; gv_local.lookup_slx_sig[125].bits = 0x32E00000;
-  gv_local.lookup_slx_sig[126].nbits = 11; gv_local.lookup_slx_sig[126].bits = 0x33400000;
-  gv_local.lookup_slx_sig[127].nbits = 11; gv_local.lookup_slx_sig[127].bits = 0x2E200000;
-  gv_local.lookup_slx_sig[128].nbits = 11; gv_local.lookup_slx_sig[128].bits = 0x2F200000;
-  gv_local.lookup_slx_sig[129].nbits = 11; gv_local.lookup_slx_sig[129].bits = 0x2E400000;
-  gv_local.lookup_slx_sig[130].nbits = 11; gv_local.lookup_slx_sig[130].bits = 0x2F400000;
-  gv_local.lookup_slx_sig[131].nbits = 11; gv_local.lookup_slx_sig[131].bits = 0x35A00000;
-  gv_local.lookup_slx_sig[132].nbits = 11; gv_local.lookup_slx_sig[132].bits = 0x3B400000;
-  gv_local.lookup_slx_sig[133].nbits = 11; gv_local.lookup_slx_sig[133].bits = 0x33200000;
-  gv_local.lookup_slx_sig[134].nbits = 11; gv_local.lookup_slx_sig[134].bits = 0x34A00000;
-  gv_local.lookup_slx_sig[135].nbits = 11; gv_local.lookup_slx_sig[135].bits = 0x33A00000;
-  gv_local.lookup_slx_sig[136].nbits = 11; gv_local.lookup_slx_sig[136].bits = 0x35C00000;
-  gv_local.lookup_slx_sig[137].nbits = 11; gv_local.lookup_slx_sig[137].bits = 0x3DA00000;
-  gv_local.lookup_slx_sig[138].nbits = 11; gv_local.lookup_slx_sig[138].bits = 0x39800000;
-  gv_local.lookup_slx_sig[139].nbits = 11; gv_local.lookup_slx_sig[139].bits = 0x3E600000;
-  gv_local.lookup_slx_sig[140].nbits = 11; gv_local.lookup_slx_sig[140].bits = 0x3F000000;
-  gv_local.lookup_slx_sig[141].nbits = 11; gv_local.lookup_slx_sig[141].bits = 0x3D000000;
-  gv_local.lookup_slx_sig[142].nbits = 11; gv_local.lookup_slx_sig[142].bits = 0x59200000;
-  gv_local.lookup_slx_sig[143].nbits = 11; gv_local.lookup_slx_sig[143].bits = 0x3D400000;
-  gv_local.lookup_slx_sig[144].nbits = 11; gv_local.lookup_slx_sig[144].bits = 0x88200000;
-  gv_local.lookup_slx_sig[145].nbits = 11; gv_local.lookup_slx_sig[145].bits = 0x5E000000;
-  gv_local.lookup_slx_sig[146].nbits = 11; gv_local.lookup_slx_sig[146].bits = 0x5E800000;
-  gv_local.lookup_slx_sig[147].nbits = 11; gv_local.lookup_slx_sig[147].bits = 0x8BA00000;
-  gv_local.lookup_slx_sig[148].nbits = 11; gv_local.lookup_slx_sig[148].bits = 0x5EC00000;
-  gv_local.lookup_slx_sig[149].nbits = 11; gv_local.lookup_slx_sig[149].bits = 0x5F400000;
-  gv_local.lookup_slx_sig[150].nbits = 11; gv_local.lookup_slx_sig[150].bits = 0x5E600000;
-  gv_local.lookup_slx_sig[151].nbits = 11; gv_local.lookup_slx_sig[151].bits = 0x5F600000;
-  gv_local.lookup_slx_sig[152].nbits = 11; gv_local.lookup_slx_sig[152].bits = 0xB6C00000;
-  gv_local.lookup_slx_sig[153].nbits = 11; gv_local.lookup_slx_sig[153].bits = 0xB6400000;
-  gv_local.lookup_slx_sig[154].nbits = 11; gv_local.lookup_slx_sig[154].bits = 0xB8200000;
-  gv_local.lookup_slx_sig[155].nbits = 11; gv_local.lookup_slx_sig[155].bits = 0xB6600000;
-  gv_local.lookup_slx_sig[156].nbits = 11; gv_local.lookup_slx_sig[156].bits = 0xBAC00000;
-  gv_local.lookup_slx_sig[157].nbits = 11; gv_local.lookup_slx_sig[157].bits = 0xBA600000;
-  gv_local.lookup_slx_sig[158].nbits = 11; gv_local.lookup_slx_sig[158].bits = 0xBCA00000;
-  gv_local.lookup_slx_sig[159].nbits = 11; gv_local.lookup_slx_sig[159].bits = 0xC0600000;
-  gv_local.lookup_slx_sig[160].nbits = 11; gv_local.lookup_slx_sig[160].bits = 0xC0200000;
-  gv_local.lookup_slx_sig[161].nbits = 11; gv_local.lookup_slx_sig[161].bits = 0xBD400000;
-  gv_local.lookup_slx_sig[162].nbits = 11; gv_local.lookup_slx_sig[162].bits = 0xC1200000;
-  gv_local.lookup_slx_sig[163].nbits = 11; gv_local.lookup_slx_sig[163].bits = 0xBBC00000;
-  gv_local.lookup_slx_sig[164].nbits = 11; gv_local.lookup_slx_sig[164].bits = 0xC1600000;
-  gv_local.lookup_slx_sig[165].nbits = 11; gv_local.lookup_slx_sig[165].bits = 0xC0000000;
-  gv_local.lookup_slx_sig[166].nbits = 11; gv_local.lookup_slx_sig[166].bits = 0xC5000000;
-  gv_local.lookup_slx_sig[167].nbits = 11; gv_local.lookup_slx_sig[167].bits = 0xC4600000;
-  gv_local.lookup_slx_sig[168].nbits = 11; gv_local.lookup_slx_sig[168].bits = 0xBCE00000;
-  gv_local.lookup_slx_sig[169].nbits = 11; gv_local.lookup_slx_sig[169].bits = 0xC0E00000;
-  gv_local.lookup_slx_sig[170].nbits = 11; gv_local.lookup_slx_sig[170].bits = 0xC5E00000;
-  gv_local.lookup_slx_sig[171].nbits = 11; gv_local.lookup_slx_sig[171].bits = 0xC9600000;
-  gv_local.lookup_slx_sig[172].nbits = 11; gv_local.lookup_slx_sig[172].bits = 0xC8400000;
-  gv_local.lookup_slx_sig[173].nbits = 11; gv_local.lookup_slx_sig[173].bits = 0xC9800000;
-  gv_local.lookup_slx_sig[174].nbits = 11; gv_local.lookup_slx_sig[174].bits = 0xCC600000;
-  gv_local.lookup_slx_sig[175].nbits = 11; gv_local.lookup_slx_sig[175].bits = 0xCB000000;
-  gv_local.lookup_slx_sig[176].nbits = 11; gv_local.lookup_slx_sig[176].bits = 0xCA400000;
-  gv_local.lookup_slx_sig[177].nbits = 11; gv_local.lookup_slx_sig[177].bits = 0xD4C00000;
-  gv_local.lookup_slx_sig[178].nbits = 11; gv_local.lookup_slx_sig[178].bits = 0xCCA00000;
-  gv_local.lookup_slx_sig[179].nbits = 11; gv_local.lookup_slx_sig[179].bits = 0xD5400000;
-  gv_local.lookup_slx_sig[180].nbits = 11; gv_local.lookup_slx_sig[180].bits = 0xD4800000;
-  gv_local.lookup_slx_sig[181].nbits = 11; gv_local.lookup_slx_sig[181].bits = 0xD5200000;
-  gv_local.lookup_slx_sig[182].nbits = 11; gv_local.lookup_slx_sig[182].bits = 0xD7600000;
-  gv_local.lookup_slx_sig[183].nbits = 10; gv_local.lookup_slx_sig[183].bits = 0x18400000;
-  gv_local.lookup_slx_sig[184].nbits = 11; gv_local.lookup_slx_sig[184].bits = 0xD5800000;
-  gv_local.lookup_slx_sig[185].nbits = 11; gv_local.lookup_slx_sig[185].bits = 0xD5E00000;
-  gv_local.lookup_slx_sig[186].nbits = 11; gv_local.lookup_slx_sig[186].bits = 0xD7C00000;
-  gv_local.lookup_slx_sig[187].nbits = 10; gv_local.lookup_slx_sig[187].bits = 0x1C000000;
-  gv_local.lookup_slx_sig[188].nbits = 10; gv_local.lookup_slx_sig[188].bits = 0x18C00000;
-  gv_local.lookup_slx_sig[189].nbits = 10; gv_local.lookup_slx_sig[189].bits = 0x1A400000;
-  gv_local.lookup_slx_sig[190].nbits = 10; gv_local.lookup_slx_sig[190].bits = 0x1B000000;
-  gv_local.lookup_slx_sig[191].nbits = 10; gv_local.lookup_slx_sig[191].bits = 0x28000000;
-  gv_local.lookup_slx_sig[192].nbits = 10; gv_local.lookup_slx_sig[192].bits = 0x29400000;
-  gv_local.lookup_slx_sig[193].nbits = 10; gv_local.lookup_slx_sig[193].bits = 0x29000000;
-  gv_local.lookup_slx_sig[194].nbits = 10; gv_local.lookup_slx_sig[194].bits = 0x1F400000;
-  gv_local.lookup_slx_sig[195].nbits = 10; gv_local.lookup_slx_sig[195].bits = 0x2EC00000;
-  gv_local.lookup_slx_sig[196].nbits = 10; gv_local.lookup_slx_sig[196].bits = 0x1F000000;
-  gv_local.lookup_slx_sig[197].nbits = 10; gv_local.lookup_slx_sig[197].bits = 0x29800000;
-  gv_local.lookup_slx_sig[198].nbits = 10; gv_local.lookup_slx_sig[198].bits = 0x32400000;
-  gv_local.lookup_slx_sig[199].nbits = 10; gv_local.lookup_slx_sig[199].bits = 0x33C00000;
-  gv_local.lookup_slx_sig[200].nbits = 10; gv_local.lookup_slx_sig[200].bits = 0x2E800000;
-  gv_local.lookup_slx_sig[201].nbits = 10; gv_local.lookup_slx_sig[201].bits = 0x34C00000;
-  gv_local.lookup_slx_sig[202].nbits = 10; gv_local.lookup_slx_sig[202].bits = 0x37C00000;
-  gv_local.lookup_slx_sig[203].nbits = 10; gv_local.lookup_slx_sig[203].bits = 0x37800000;
-  gv_local.lookup_slx_sig[204].nbits = 10; gv_local.lookup_slx_sig[204].bits = 0x37400000;
-  gv_local.lookup_slx_sig[205].nbits = 10; gv_local.lookup_slx_sig[205].bits = 0x39000000;
-  gv_local.lookup_slx_sig[206].nbits = 10; gv_local.lookup_slx_sig[206].bits = 0x3C400000;
-  gv_local.lookup_slx_sig[207].nbits = 10; gv_local.lookup_slx_sig[207].bits = 0x3FC00000;
-  gv_local.lookup_slx_sig[208].nbits = 10; gv_local.lookup_slx_sig[208].bits = 0x58400000;
-  gv_local.lookup_slx_sig[209].nbits = 10; gv_local.lookup_slx_sig[209].bits = 0x3EC00000;
-  gv_local.lookup_slx_sig[210].nbits = 10; gv_local.lookup_slx_sig[210].bits = 0x3E000000;
-  gv_local.lookup_slx_sig[211].nbits = 10; gv_local.lookup_slx_sig[211].bits = 0x3F400000;
-  gv_local.lookup_slx_sig[212].nbits = 10; gv_local.lookup_slx_sig[212].bits = 0x59800000;
-  gv_local.lookup_slx_sig[213].nbits = 10; gv_local.lookup_slx_sig[213].bits = 0x59C00000;
-  gv_local.lookup_slx_sig[214].nbits = 10; gv_local.lookup_slx_sig[214].bits = 0x8B400000;
-  gv_local.lookup_slx_sig[215].nbits = 10; gv_local.lookup_slx_sig[215].bits = 0x88400000;
-  gv_local.lookup_slx_sig[216].nbits = 10; gv_local.lookup_slx_sig[216].bits = 0xB4000000;
-  gv_local.lookup_slx_sig[217].nbits = 10; gv_local.lookup_slx_sig[217].bits = 0xB6000000;
-  gv_local.lookup_slx_sig[218].nbits = 10; gv_local.lookup_slx_sig[218].bits = 0xB9800000;
-  gv_local.lookup_slx_sig[219].nbits = 10; gv_local.lookup_slx_sig[219].bits = 0xB9C00000;
-  gv_local.lookup_slx_sig[220].nbits = 10; gv_local.lookup_slx_sig[220].bits = 0xBC000000;
-  gv_local.lookup_slx_sig[221].nbits = 10; gv_local.lookup_slx_sig[221].bits = 0xBDC00000;
-  gv_local.lookup_slx_sig[222].nbits = 10; gv_local.lookup_slx_sig[222].bits = 0xBD000000;
-  gv_local.lookup_slx_sig[223].nbits = 10; gv_local.lookup_slx_sig[223].bits = 0xC9000000;
-  gv_local.lookup_slx_sig[224].nbits = 10; gv_local.lookup_slx_sig[224].bits = 0xC5800000;
-  gv_local.lookup_slx_sig[225].nbits = 10; gv_local.lookup_slx_sig[225].bits = 0xCA000000;
-  gv_local.lookup_slx_sig[226].nbits = 10; gv_local.lookup_slx_sig[226].bits = 0xCB400000;
-  gv_local.lookup_slx_sig[227].nbits = 10; gv_local.lookup_slx_sig[227].bits = 0xCE000000;
-  gv_local.lookup_slx_sig[228].nbits = 10; gv_local.lookup_slx_sig[228].bits = 0xD7000000;
-  gv_local.lookup_slx_sig[229].nbits =  9; gv_local.lookup_slx_sig[229].bits = 0x1B800000;
-  gv_local.lookup_slx_sig[230].nbits =  9; gv_local.lookup_slx_sig[230].bits = 0x28800000;
-  gv_local.lookup_slx_sig[231].nbits =  9; gv_local.lookup_slx_sig[231].bits = 0x2F800000;
-  gv_local.lookup_slx_sig[232].nbits =  9; gv_local.lookup_slx_sig[232].bits = 0x36000000;
-  gv_local.lookup_slx_sig[233].nbits =  9; gv_local.lookup_slx_sig[233].bits = 0x3C800000;
-  gv_local.lookup_slx_sig[234].nbits =  9; gv_local.lookup_slx_sig[234].bits = 0x58800000;
-  gv_local.lookup_slx_sig[235].nbits =  9; gv_local.lookup_slx_sig[235].bits = 0xB4800000;
-  gv_local.lookup_slx_sig[236].nbits =  9; gv_local.lookup_slx_sig[236].bits = 0xB8800000;
-  gv_local.lookup_slx_sig[237].nbits =  9; gv_local.lookup_slx_sig[237].bits = 0xC4800000;
-  gv_local.lookup_slx_sig[238].nbits =  9; gv_local.lookup_slx_sig[238].bits = 0xCA800000;
-  gv_local.lookup_slx_sig[239].nbits =  9; gv_local.lookup_slx_sig[239].bits = 0xD6800000;
-  gv_local.lookup_slx_sig[240].nbits =  8; gv_local.lookup_slx_sig[240].bits = 0x2B000000;
-  gv_local.lookup_slx_sig[241].nbits =  8; gv_local.lookup_slx_sig[241].bits = 0x3A000000;
-  gv_local.lookup_slx_sig[242].nbits =  8; gv_local.lookup_slx_sig[242].bits = 0x8A000000;
-  gv_local.lookup_slx_sig[243].nbits =  8; gv_local.lookup_slx_sig[243].bits = 0xBE000000;
-  gv_local.lookup_slx_sig[244].nbits =  8; gv_local.lookup_slx_sig[244].bits = 0xCF000000;
-  gv_local.lookup_slx_sig[245].nbits =  7; gv_local.lookup_slx_sig[245].bits = 0x30000000;
-  gv_local.lookup_slx_sig[246].nbits =  7; gv_local.lookup_slx_sig[246].bits = 0x5A000000;
-  gv_local.lookup_slx_sig[247].nbits =  7; gv_local.lookup_slx_sig[247].bits = 0xC2000000;
-  gv_local.lookup_slx_sig[248].nbits =  6; gv_local.lookup_slx_sig[248].bits = 0x20000000;
-  gv_local.lookup_slx_sig[249].nbits =  6; gv_local.lookup_slx_sig[249].bits = 0x8C000000;
-  gv_local.lookup_slx_sig[250].nbits =  6; gv_local.lookup_slx_sig[250].bits = 0xD0000000;
-  gv_local.lookup_slx_sig[251].nbits =  5; gv_local.lookup_slx_sig[251].bits = 0x50000000;
-  gv_local.lookup_slx_sig[252].nbits =  5; gv_local.lookup_slx_sig[252].bits = 0xD8000000;
-  gv_local.lookup_slx_sig[253].nbits =  4; gv_local.lookup_slx_sig[253].bits = 0x90000000;
-  gv_local.lookup_slx_sig[254].nbits =  4; gv_local.lookup_slx_sig[254].bits = 0xF0000000;
-  gv_local.lookup_slx_sig[255].nbits =  3; gv_local.lookup_slx_sig[255].bits = 0x60000000;
-  gv_local.lookup_slx_sig[256].nbits =  4; gv_local.lookup_slx_sig[256].bits = 0xE0000000;
-  gv_local.lookup_slx_sig[257].nbits =  4; gv_local.lookup_slx_sig[257].bits = 0xA0000000;
-  gv_local.lookup_slx_sig[258].nbits =  4; gv_local.lookup_slx_sig[258].bits = 0x00000000;
-  gv_local.lookup_slx_sig[259].nbits =  5; gv_local.lookup_slx_sig[259].bits = 0x80000000;
-  gv_local.lookup_slx_sig[260].nbits =  5; gv_local.lookup_slx_sig[260].bits = 0x10000000;
-  gv_local.lookup_slx_sig[261].nbits =  6; gv_local.lookup_slx_sig[261].bits = 0xB0000000;
-  gv_local.lookup_slx_sig[262].nbits =  6; gv_local.lookup_slx_sig[262].bits = 0x24000000;
-  gv_local.lookup_slx_sig[263].nbits =  7; gv_local.lookup_slx_sig[263].bits = 0xC6000000;
-  gv_local.lookup_slx_sig[264].nbits =  7; gv_local.lookup_slx_sig[264].bits = 0x5C000000;
-  gv_local.lookup_slx_sig[265].nbits =  7; gv_local.lookup_slx_sig[265].bits = 0x2C000000;
-  gv_local.lookup_slx_sig[266].nbits =  8; gv_local.lookup_slx_sig[266].bits = 0xCD000000;
-  gv_local.lookup_slx_sig[267].nbits =  8; gv_local.lookup_slx_sig[267].bits = 0xBF000000;
-  gv_local.lookup_slx_sig[268].nbits =  8; gv_local.lookup_slx_sig[268].bits = 0x89000000;
-  gv_local.lookup_slx_sig[269].nbits =  8; gv_local.lookup_slx_sig[269].bits = 0x38000000;
-  gv_local.lookup_slx_sig[270].nbits =  8; gv_local.lookup_slx_sig[270].bits = 0x1D000000;
-  gv_local.lookup_slx_sig[271].nbits =  9; gv_local.lookup_slx_sig[271].bits = 0xD4000000;
-  gv_local.lookup_slx_sig[272].nbits =  9; gv_local.lookup_slx_sig[272].bits = 0xC8800000;
-  gv_local.lookup_slx_sig[273].nbits =  9; gv_local.lookup_slx_sig[273].bits = 0xBB000000;
-  gv_local.lookup_slx_sig[274].nbits =  9; gv_local.lookup_slx_sig[274].bits = 0xB5800000;
-  gv_local.lookup_slx_sig[275].nbits =  9; gv_local.lookup_slx_sig[275].bits = 0x5F800000;
-  gv_local.lookup_slx_sig[276].nbits =  9; gv_local.lookup_slx_sig[276].bits = 0x3B800000;
-  gv_local.lookup_slx_sig[277].nbits =  9; gv_local.lookup_slx_sig[277].bits = 0x35000000;
-  gv_local.lookup_slx_sig[278].nbits =  9; gv_local.lookup_slx_sig[278].bits = 0x1F800000;
-  gv_local.lookup_slx_sig[279].nbits =  9; gv_local.lookup_slx_sig[279].bits = 0x19800000;
-  gv_local.lookup_slx_sig[280].nbits = 10; gv_local.lookup_slx_sig[280].bits = 0xD6400000;
-  gv_local.lookup_slx_sig[281].nbits = 10; gv_local.lookup_slx_sig[281].bits = 0xCE800000;
-  gv_local.lookup_slx_sig[282].nbits = 10; gv_local.lookup_slx_sig[282].bits = 0xCBC00000;
-  gv_local.lookup_slx_sig[283].nbits = 10; gv_local.lookup_slx_sig[283].bits = 0xC4000000;
-  gv_local.lookup_slx_sig[284].nbits = 10; gv_local.lookup_slx_sig[284].bits = 0xBD800000;
-  gv_local.lookup_slx_sig[285].nbits = 10; gv_local.lookup_slx_sig[285].bits = 0xBB800000;
-  gv_local.lookup_slx_sig[286].nbits = 10; gv_local.lookup_slx_sig[286].bits = 0xB9400000;
-  gv_local.lookup_slx_sig[287].nbits = 10; gv_local.lookup_slx_sig[287].bits = 0xB5400000;
-  gv_local.lookup_slx_sig[288].nbits = 10; gv_local.lookup_slx_sig[288].bits = 0x88800000;
-  gv_local.lookup_slx_sig[289].nbits = 10; gv_local.lookup_slx_sig[289].bits = 0x5F000000;
-  gv_local.lookup_slx_sig[290].nbits = 10; gv_local.lookup_slx_sig[290].bits = 0x3DC00000;
-  gv_local.lookup_slx_sig[291].nbits = 10; gv_local.lookup_slx_sig[291].bits = 0x3B000000;
-  gv_local.lookup_slx_sig[292].nbits = 10; gv_local.lookup_slx_sig[292].bits = 0x36C00000;
-  gv_local.lookup_slx_sig[293].nbits = 10; gv_local.lookup_slx_sig[293].bits = 0x34400000;
-  gv_local.lookup_slx_sig[294].nbits = 10; gv_local.lookup_slx_sig[294].bits = 0x36800000;
-  gv_local.lookup_slx_sig[295].nbits = 10; gv_local.lookup_slx_sig[295].bits = 0x2A400000;
-  gv_local.lookup_slx_sig[296].nbits = 10; gv_local.lookup_slx_sig[296].bits = 0x1EC00000;
-  gv_local.lookup_slx_sig[297].nbits = 10; gv_local.lookup_slx_sig[297].bits = 0x2AC00000;
-  gv_local.lookup_slx_sig[298].nbits = 10; gv_local.lookup_slx_sig[298].bits = 0x1AC00000;
-  gv_local.lookup_slx_sig[299].nbits = 10; gv_local.lookup_slx_sig[299].bits = 0x1E400000;
-  gv_local.lookup_slx_sig[300].nbits = 11; gv_local.lookup_slx_sig[300].bits = 0xD7400000;
-  gv_local.lookup_slx_sig[301].nbits = 11; gv_local.lookup_slx_sig[301].bits = 0xD5A00000;
-  gv_local.lookup_slx_sig[302].nbits = 11; gv_local.lookup_slx_sig[302].bits = 0xD7A00000;
-  gv_local.lookup_slx_sig[303].nbits = 10; gv_local.lookup_slx_sig[303].bits = 0x18000000;
-  gv_local.lookup_slx_sig[304].nbits = 11; gv_local.lookup_slx_sig[304].bits = 0xCCE00000;
-  gv_local.lookup_slx_sig[305].nbits = 11; gv_local.lookup_slx_sig[305].bits = 0xC9400000;
-  gv_local.lookup_slx_sig[306].nbits = 11; gv_local.lookup_slx_sig[306].bits = 0xCB800000;
-  gv_local.lookup_slx_sig[307].nbits = 11; gv_local.lookup_slx_sig[307].bits = 0xCC200000;
-  gv_local.lookup_slx_sig[308].nbits = 11; gv_local.lookup_slx_sig[308].bits = 0xCC000000;
-  gv_local.lookup_slx_sig[309].nbits = 11; gv_local.lookup_slx_sig[309].bits = 0xC8200000;
-  gv_local.lookup_slx_sig[310].nbits = 11; gv_local.lookup_slx_sig[310].bits = 0xC5400000;
-  gv_local.lookup_slx_sig[311].nbits = 11; gv_local.lookup_slx_sig[311].bits = 0xC0C00000;
-  gv_local.lookup_slx_sig[312].nbits = 11; gv_local.lookup_slx_sig[312].bits = 0xC1E00000;
-  gv_local.lookup_slx_sig[313].nbits = 11; gv_local.lookup_slx_sig[313].bits = 0xBA800000;
-  gv_local.lookup_slx_sig[314].nbits = 11; gv_local.lookup_slx_sig[314].bits = 0xBCC00000;
-  gv_local.lookup_slx_sig[315].nbits = 11; gv_local.lookup_slx_sig[315].bits = 0xBC400000;
-  gv_local.lookup_slx_sig[316].nbits = 11; gv_local.lookup_slx_sig[316].bits = 0xBC800000;
-  gv_local.lookup_slx_sig[317].nbits = 11; gv_local.lookup_slx_sig[317].bits = 0xB9000000;
-  gv_local.lookup_slx_sig[318].nbits = 11; gv_local.lookup_slx_sig[318].bits = 0xB8600000;
-  gv_local.lookup_slx_sig[319].nbits = 11; gv_local.lookup_slx_sig[319].bits = 0xB7E00000;
-  gv_local.lookup_slx_sig[320].nbits = 11; gv_local.lookup_slx_sig[320].bits = 0xBA200000;
-  gv_local.lookup_slx_sig[321].nbits = 11; gv_local.lookup_slx_sig[321].bits = 0xB7600000;
-  gv_local.lookup_slx_sig[322].nbits = 11; gv_local.lookup_slx_sig[322].bits = 0xB7400000;
-  gv_local.lookup_slx_sig[323].nbits = 11; gv_local.lookup_slx_sig[323].bits = 0xB4600000;
-  gv_local.lookup_slx_sig[324].nbits = 11; gv_local.lookup_slx_sig[324].bits = 0x8BC00000;
-  gv_local.lookup_slx_sig[325].nbits = 11; gv_local.lookup_slx_sig[325].bits = 0xB6E00000;
-  gv_local.lookup_slx_sig[326].nbits = 11; gv_local.lookup_slx_sig[326].bits = 0xB4400000;
-  gv_local.lookup_slx_sig[327].nbits = 11; gv_local.lookup_slx_sig[327].bits = 0x8BE00000;
-  gv_local.lookup_slx_sig[328].nbits = 11; gv_local.lookup_slx_sig[328].bits = 0x58000000;
-  gv_local.lookup_slx_sig[329].nbits = 11; gv_local.lookup_slx_sig[329].bits = 0x58200000;
-  gv_local.lookup_slx_sig[330].nbits = 11; gv_local.lookup_slx_sig[330].bits = 0x3D800000;
-  gv_local.lookup_slx_sig[331].nbits = 11; gv_local.lookup_slx_sig[331].bits = 0x3EA00000;
-  gv_local.lookup_slx_sig[332].nbits = 11; gv_local.lookup_slx_sig[332].bits = 0x3F200000;
-  gv_local.lookup_slx_sig[333].nbits = 11; gv_local.lookup_slx_sig[333].bits = 0x59600000;
-  gv_local.lookup_slx_sig[334].nbits = 11; gv_local.lookup_slx_sig[334].bits = 0x37000000;
-  gv_local.lookup_slx_sig[335].nbits = 11; gv_local.lookup_slx_sig[335].bits = 0x3D200000;
-  gv_local.lookup_slx_sig[336].nbits = 11; gv_local.lookup_slx_sig[336].bits = 0x33800000;
-  gv_local.lookup_slx_sig[337].nbits = 11; gv_local.lookup_slx_sig[337].bits = 0x2E000000;
-  gv_local.lookup_slx_sig[338].nbits = 11; gv_local.lookup_slx_sig[338].bits = 0x3C000000;
-  gv_local.lookup_slx_sig[339].nbits = 11; gv_local.lookup_slx_sig[339].bits = 0x2AA00000;
-  gv_local.lookup_slx_sig[340].nbits = 11; gv_local.lookup_slx_sig[340].bits = 0x34800000;
-  gv_local.lookup_slx_sig[341].nbits = 11; gv_local.lookup_slx_sig[341].bits = 0x32C00000;
-  gv_local.lookup_slx_sig[342].nbits = 11; gv_local.lookup_slx_sig[342].bits = 0x34000000;
-  gv_local.lookup_slx_sig[343].nbits = 11; gv_local.lookup_slx_sig[343].bits = 0x2E600000;
-  gv_local.lookup_slx_sig[344].nbits = 11; gv_local.lookup_slx_sig[344].bits = 0x35E00000;
-  gv_local.lookup_slx_sig[345].nbits = 11; gv_local.lookup_slx_sig[345].bits = 0x32000000;
-  gv_local.lookup_slx_sig[346].nbits = 11; gv_local.lookup_slx_sig[346].bits = 0x2A000000;
-  gv_local.lookup_slx_sig[347].nbits = 11; gv_local.lookup_slx_sig[347].bits = 0x29E00000;
-  gv_local.lookup_slx_sig[348].nbits = 11; gv_local.lookup_slx_sig[348].bits = 0x1CA00000;
-  gv_local.lookup_slx_sig[349].nbits = 11; gv_local.lookup_slx_sig[349].bits = 0x1A200000;
-  gv_local.lookup_slx_sig[350].nbits = 11; gv_local.lookup_slx_sig[350].bits = 0x19400000;
-  gv_local.lookup_slx_sig[351].nbits = 12; gv_local.lookup_slx_sig[351].bits = 0xD5100000;
-  gv_local.lookup_slx_sig[352].nbits = 11; gv_local.lookup_slx_sig[352].bits = 0x1C800000;
-  gv_local.lookup_slx_sig[353].nbits = 11; gv_local.lookup_slx_sig[353].bits = 0x19600000;
-  gv_local.lookup_slx_sig[354].nbits = 12; gv_local.lookup_slx_sig[354].bits = 0xD7900000;
-  gv_local.lookup_slx_sig[355].nbits = 12; gv_local.lookup_slx_sig[355].bits = 0xD7800000;
-  gv_local.lookup_slx_sig[356].nbits = 12; gv_local.lookup_slx_sig[356].bits = 0xCEE00000;
-  gv_local.lookup_slx_sig[357].nbits = 12; gv_local.lookup_slx_sig[357].bits = 0xD5000000;
-  gv_local.lookup_slx_sig[358].nbits = 12; gv_local.lookup_slx_sig[358].bits = 0xCC800000;
-  gv_local.lookup_slx_sig[359].nbits = 12; gv_local.lookup_slx_sig[359].bits = 0xD4A00000;
-  gv_local.lookup_slx_sig[360].nbits = 12; gv_local.lookup_slx_sig[360].bits = 0xCB300000;
-  gv_local.lookup_slx_sig[361].nbits = 12; gv_local.lookup_slx_sig[361].bits = 0xCE700000;
-  gv_local.lookup_slx_sig[362].nbits = 12; gv_local.lookup_slx_sig[362].bits = 0xCE600000;
-  gv_local.lookup_slx_sig[363].nbits = 12; gv_local.lookup_slx_sig[363].bits = 0xCCC00000;
-  gv_local.lookup_slx_sig[364].nbits = 12; gv_local.lookup_slx_sig[364].bits = 0xC1D00000;
-  gv_local.lookup_slx_sig[365].nbits = 12; gv_local.lookup_slx_sig[365].bits = 0xC5600000;
-  gv_local.lookup_slx_sig[366].nbits = 12; gv_local.lookup_slx_sig[366].bits = 0xC8000000;
-  gv_local.lookup_slx_sig[367].nbits = 12; gv_local.lookup_slx_sig[367].bits = 0xC9F00000;
-  gv_local.lookup_slx_sig[368].nbits = 12; gv_local.lookup_slx_sig[368].bits = 0xC9D00000;
-  gv_local.lookup_slx_sig[369].nbits = 12; gv_local.lookup_slx_sig[369].bits = 0xC5C00000;
-  gv_local.lookup_slx_sig[370].nbits = 12; gv_local.lookup_slx_sig[370].bits = 0xBC600000;
-  gv_local.lookup_slx_sig[371].nbits = 12; gv_local.lookup_slx_sig[371].bits = 0xC1B00000;
-  gv_local.lookup_slx_sig[372].nbits = 12; gv_local.lookup_slx_sig[372].bits = 0xBBE00000;
-  gv_local.lookup_slx_sig[373].nbits = 12; gv_local.lookup_slx_sig[373].bits = 0xC1500000;
-  gv_local.lookup_slx_sig[374].nbits = 12; gv_local.lookup_slx_sig[374].bits = 0xBAB00000;
-  gv_local.lookup_slx_sig[375].nbits = 12; gv_local.lookup_slx_sig[375].bits = 0xC1400000;
-  gv_local.lookup_slx_sig[376].nbits = 12; gv_local.lookup_slx_sig[376].bits = 0xB8400000;
-  gv_local.lookup_slx_sig[377].nbits = 12; gv_local.lookup_slx_sig[377].bits = 0xBA000000;
-  gv_local.lookup_slx_sig[378].nbits = 12; gv_local.lookup_slx_sig[378].bits = 0xB7B00000;
-  gv_local.lookup_slx_sig[379].nbits = 12; gv_local.lookup_slx_sig[379].bits = 0xC0400000;
-  gv_local.lookup_slx_sig[380].nbits = 12; gv_local.lookup_slx_sig[380].bits = 0x59400000;
-  gv_local.lookup_slx_sig[381].nbits = 12; gv_local.lookup_slx_sig[381].bits = 0x8B300000;
-  gv_local.lookup_slx_sig[382].nbits = 12; gv_local.lookup_slx_sig[382].bits = 0xB6B00000;
-  gv_local.lookup_slx_sig[383].nbits = 12; gv_local.lookup_slx_sig[383].bits = 0xBA100000;
-  gv_local.lookup_slx_sig[384].nbits = 12; gv_local.lookup_slx_sig[384].bits = 0x5EF00000;
-  gv_local.lookup_slx_sig[385].nbits = 12; gv_local.lookup_slx_sig[385].bits = 0xB5000000;
-  gv_local.lookup_slx_sig[386].nbits = 12; gv_local.lookup_slx_sig[386].bits = 0xB7200000;
-  gv_local.lookup_slx_sig[387].nbits = 12; gv_local.lookup_slx_sig[387].bits = 0xB7A00000;
-  gv_local.lookup_slx_sig[388].nbits = 12; gv_local.lookup_slx_sig[388].bits = 0x8B200000;
-  gv_local.lookup_slx_sig[389].nbits = 12; gv_local.lookup_slx_sig[389].bits = 0x3F800000;
-  gv_local.lookup_slx_sig[390].nbits = 12; gv_local.lookup_slx_sig[390].bits = 0xB7100000;
-  gv_local.lookup_slx_sig[391].nbits = 12; gv_local.lookup_slx_sig[391].bits = 0x3E400000;
-  gv_local.lookup_slx_sig[392].nbits = 12; gv_local.lookup_slx_sig[392].bits = 0x5EA00000;
-  gv_local.lookup_slx_sig[393].nbits = 12; gv_local.lookup_slx_sig[393].bits = 0xB6A00000;
-  gv_local.lookup_slx_sig[394].nbits = 12; gv_local.lookup_slx_sig[394].bits = 0x39C00000;
-  gv_local.lookup_slx_sig[395].nbits = 12; gv_local.lookup_slx_sig[395].bits = 0x3E900000;
-  gv_local.lookup_slx_sig[396].nbits = 12; gv_local.lookup_slx_sig[396].bits = 0x8B100000;
-  gv_local.lookup_slx_sig[397].nbits = 12; gv_local.lookup_slx_sig[397].bits = 0x39D00000;
-  gv_local.lookup_slx_sig[398].nbits = 12; gv_local.lookup_slx_sig[398].bits = 0x3B600000;
-  gv_local.lookup_slx_sig[399].nbits = 12; gv_local.lookup_slx_sig[399].bits = 0x3C200000;
-  gv_local.lookup_slx_sig[400].nbits = 12; gv_local.lookup_slx_sig[400].bits = 0x39600000;
-  gv_local.lookup_slx_sig[401].nbits = 12; gv_local.lookup_slx_sig[401].bits = 0x3D700000;
-  gv_local.lookup_slx_sig[402].nbits = 12; gv_local.lookup_slx_sig[402].bits = 0x35900000;
-  gv_local.lookup_slx_sig[403].nbits = 12; gv_local.lookup_slx_sig[403].bits = 0x1E900000;
-  gv_local.lookup_slx_sig[404].nbits = 12; gv_local.lookup_slx_sig[404].bits = 0x34200000;
-  gv_local.lookup_slx_sig[405].nbits = 12; gv_local.lookup_slx_sig[405].bits = 0x2F700000;
-  gv_local.lookup_slx_sig[406].nbits = 12; gv_local.lookup_slx_sig[406].bits = 0x33700000;
-  gv_local.lookup_slx_sig[407].nbits = 12; gv_local.lookup_slx_sig[407].bits = 0x33000000;
-  gv_local.lookup_slx_sig[408].nbits = 12; gv_local.lookup_slx_sig[408].bits = 0x2F000000;
-  gv_local.lookup_slx_sig[409].nbits = 12; gv_local.lookup_slx_sig[409].bits = 0x37200000;
-  gv_local.lookup_slx_sig[410].nbits = 12; gv_local.lookup_slx_sig[410].bits = 0x1C400000;
-  gv_local.lookup_slx_sig[411].nbits = 12; gv_local.lookup_slx_sig[411].bits = 0x28500000;
-  gv_local.lookup_slx_sig[412].nbits = 12; gv_local.lookup_slx_sig[412].bits = 0x1CE00000;
-  gv_local.lookup_slx_sig[413].nbits = 12; gv_local.lookup_slx_sig[413].bits = 0x1A800000;
-  gv_local.lookup_slx_sig[414].nbits = 12; gv_local.lookup_slx_sig[414].bits = 0x1EB00000;
-  gv_local.lookup_slx_sig[415].nbits = 13; gv_local.lookup_slx_sig[415].bits = 0xCEC80000;
-  gv_local.lookup_slx_sig[416].nbits = 13; gv_local.lookup_slx_sig[416].bits = 0xD6100000;
-  gv_local.lookup_slx_sig[417].nbits = 13; gv_local.lookup_slx_sig[417].bits = 0xD7E00000;
-  gv_local.lookup_slx_sig[418].nbits = 12; gv_local.lookup_slx_sig[418].bits = 0x1A100000;
-  gv_local.lookup_slx_sig[419].nbits = 12; gv_local.lookup_slx_sig[419].bits = 0x19300000;
-  gv_local.lookup_slx_sig[420].nbits = 12; gv_local.lookup_slx_sig[420].bits = 0x1CF00000;
-  gv_local.lookup_slx_sig[421].nbits = 12; gv_local.lookup_slx_sig[421].bits = 0x2A300000;
-  gv_local.lookup_slx_sig[422].nbits = 13; gv_local.lookup_slx_sig[422].bits = 0xD4B00000;
-  gv_local.lookup_slx_sig[423].nbits = 13; gv_local.lookup_slx_sig[423].bits = 0xD6380000;
-  gv_local.lookup_slx_sig[424].nbits = 12; gv_local.lookup_slx_sig[424].bits = 0x1A000000;
-  gv_local.lookup_slx_sig[425].nbits = 13; gv_local.lookup_slx_sig[425].bits = 0xCB280000;
-  gv_local.lookup_slx_sig[426].nbits = 13; gv_local.lookup_slx_sig[426].bits = 0xD4F00000;
-  gv_local.lookup_slx_sig[427].nbits = 13; gv_local.lookup_slx_sig[427].bits = 0xD4B80000;
-  gv_local.lookup_slx_sig[428].nbits = 12; gv_local.lookup_slx_sig[428].bits = 0x1B700000;
-  gv_local.lookup_slx_sig[429].nbits = 13; gv_local.lookup_slx_sig[429].bits = 0xD5680000;
-  gv_local.lookup_slx_sig[430].nbits = 13; gv_local.lookup_slx_sig[430].bits = 0xCCD80000;
-  gv_local.lookup_slx_sig[431].nbits = 13; gv_local.lookup_slx_sig[431].bits = 0xCE500000;
-  gv_local.lookup_slx_sig[432].nbits = 13; gv_local.lookup_slx_sig[432].bits = 0xCEC00000;
-  gv_local.lookup_slx_sig[433].nbits = 13; gv_local.lookup_slx_sig[433].bits = 0xC9A80000;
-  gv_local.lookup_slx_sig[434].nbits = 13; gv_local.lookup_slx_sig[434].bits = 0xCB200000;
-  gv_local.lookup_slx_sig[435].nbits = 13; gv_local.lookup_slx_sig[435].bits = 0xBD780000;
-  gv_local.lookup_slx_sig[436].nbits = 13; gv_local.lookup_slx_sig[436].bits = 0xC8780000;
-  gv_local.lookup_slx_sig[437].nbits = 13; gv_local.lookup_slx_sig[437].bits = 0xBBF00000;
-  gv_local.lookup_slx_sig[438].nbits = 13; gv_local.lookup_slx_sig[438].bits = 0xBD600000;
-  gv_local.lookup_slx_sig[439].nbits = 13; gv_local.lookup_slx_sig[439].bits = 0xC8700000;
-  gv_local.lookup_slx_sig[440].nbits = 13; gv_local.lookup_slx_sig[440].bits = 0xB7D00000;
-  gv_local.lookup_slx_sig[441].nbits = 13; gv_local.lookup_slx_sig[441].bits = 0xC4580000;
-  gv_local.lookup_slx_sig[442].nbits = 13; gv_local.lookup_slx_sig[442].bits = 0xC5280000;
-  gv_local.lookup_slx_sig[443].nbits = 13; gv_local.lookup_slx_sig[443].bits = 0xC0B00000;
-  gv_local.lookup_slx_sig[444].nbits = 13; gv_local.lookup_slx_sig[444].bits = 0xB9300000;
-  gv_local.lookup_slx_sig[445].nbits = 13; gv_local.lookup_slx_sig[445].bits = 0xBC780000;
-  gv_local.lookup_slx_sig[446].nbits = 13; gv_local.lookup_slx_sig[446].bits = 0xB7000000;
-  gv_local.lookup_slx_sig[447].nbits = 13; gv_local.lookup_slx_sig[447].bits = 0xBD680000;
-  gv_local.lookup_slx_sig[448].nbits = 13; gv_local.lookup_slx_sig[448].bits = 0xC1A80000;
-  gv_local.lookup_slx_sig[449].nbits = 13; gv_local.lookup_slx_sig[449].bits = 0xBAA80000;
-  gv_local.lookup_slx_sig[450].nbits = 13; gv_local.lookup_slx_sig[450].bits = 0xB7800000;
-  gv_local.lookup_slx_sig[451].nbits = 13; gv_local.lookup_slx_sig[451].bits = 0xB9380000;
-  gv_local.lookup_slx_sig[452].nbits = 13; gv_local.lookup_slx_sig[452].bits = 0x5E480000;
-  gv_local.lookup_slx_sig[453].nbits = 13; gv_local.lookup_slx_sig[453].bits = 0xB6980000;
-  gv_local.lookup_slx_sig[454].nbits = 13; gv_local.lookup_slx_sig[454].bits = 0xBBF80000;
-  gv_local.lookup_slx_sig[455].nbits = 13; gv_local.lookup_slx_sig[455].bits = 0x8B000000;
-  gv_local.lookup_slx_sig[456].nbits = 13; gv_local.lookup_slx_sig[456].bits = 0xB6900000;
-  gv_local.lookup_slx_sig[457].nbits = 13; gv_local.lookup_slx_sig[457].bits = 0x8B800000;
-  gv_local.lookup_slx_sig[458].nbits = 13; gv_local.lookup_slx_sig[458].bits = 0x5E400000;
-  gv_local.lookup_slx_sig[459].nbits = 13; gv_local.lookup_slx_sig[459].bits = 0xB5100000;
-  gv_local.lookup_slx_sig[460].nbits = 13; gv_local.lookup_slx_sig[460].bits = 0xB5380000;
-  gv_local.lookup_slx_sig[461].nbits = 13; gv_local.lookup_slx_sig[461].bits = 0xBA400000;
-  gv_local.lookup_slx_sig[462].nbits = 13; gv_local.lookup_slx_sig[462].bits = 0xBAF00000;
-  gv_local.lookup_slx_sig[463].nbits = 13; gv_local.lookup_slx_sig[463].bits = 0xB5300000;
-  gv_local.lookup_slx_sig[464].nbits = 13; gv_local.lookup_slx_sig[464].bits = 0x3B700000;
-  gv_local.lookup_slx_sig[465].nbits = 13; gv_local.lookup_slx_sig[465].bits = 0xBAF80000;
-  gv_local.lookup_slx_sig[466].nbits = 13; gv_local.lookup_slx_sig[466].bits = 0x8B080000;
-  gv_local.lookup_slx_sig[467].nbits = 13; gv_local.lookup_slx_sig[467].bits = 0x5EE00000;
-  gv_local.lookup_slx_sig[468].nbits = 13; gv_local.lookup_slx_sig[468].bits = 0x59580000;
-  gv_local.lookup_slx_sig[469].nbits = 13; gv_local.lookup_slx_sig[469].bits = 0x5E580000;
-  gv_local.lookup_slx_sig[470].nbits = 13; gv_local.lookup_slx_sig[470].bits = 0x59080000;
-  gv_local.lookup_slx_sig[471].nbits = 13; gv_local.lookup_slx_sig[471].bits = 0x39A00000;
-  gv_local.lookup_slx_sig[472].nbits = 13; gv_local.lookup_slx_sig[472].bits = 0x39F00000;
-  gv_local.lookup_slx_sig[473].nbits = 13; gv_local.lookup_slx_sig[473].bits = 0x37300000;
-  gv_local.lookup_slx_sig[474].nbits = 13; gv_local.lookup_slx_sig[474].bits = 0x3D600000;
-  gv_local.lookup_slx_sig[475].nbits = 13; gv_local.lookup_slx_sig[475].bits = 0x39F80000;
-  gv_local.lookup_slx_sig[476].nbits = 13; gv_local.lookup_slx_sig[476].bits = 0x28480000;
-  gv_local.lookup_slx_sig[477].nbits = 13; gv_local.lookup_slx_sig[477].bits = 0x5E500000;
-  gv_local.lookup_slx_sig[478].nbits = 13; gv_local.lookup_slx_sig[478].bits = 0x28680000;
-  gv_local.lookup_slx_sig[479].nbits = 13; gv_local.lookup_slx_sig[479].bits = 0x3B780000;
-  gv_local.lookup_slx_sig[480].nbits = 13; gv_local.lookup_slx_sig[480].bits = 0x32980000;
-  gv_local.lookup_slx_sig[481].nbits = 13; gv_local.lookup_slx_sig[481].bits = 0x2F600000;
-  gv_local.lookup_slx_sig[482].nbits = 13; gv_local.lookup_slx_sig[482].bits = 0x37380000;
-  gv_local.lookup_slx_sig[483].nbits = 13; gv_local.lookup_slx_sig[483].bits = 0x39A80000;
-  gv_local.lookup_slx_sig[484].nbits = 13; gv_local.lookup_slx_sig[484].bits = 0x35880000;
-  gv_local.lookup_slx_sig[485].nbits = 13; gv_local.lookup_slx_sig[485].bits = 0x35800000;
-  gv_local.lookup_slx_sig[486].nbits = 13; gv_local.lookup_slx_sig[486].bits = 0x1E800000;
-  gv_local.lookup_slx_sig[487].nbits = 13; gv_local.lookup_slx_sig[487].bits = 0x1EA80000;
-  gv_local.lookup_slx_sig[488].nbits = 13; gv_local.lookup_slx_sig[488].bits = 0x33680000;
-  gv_local.lookup_slx_sig[489].nbits = 13; gv_local.lookup_slx_sig[489].bits = 0x1E880000;
-  gv_local.lookup_slx_sig[490].nbits = 13; gv_local.lookup_slx_sig[490].bits = 0x2F680000;
-  gv_local.lookup_slx_sig[491].nbits = 13; gv_local.lookup_slx_sig[491].bits = 0x33600000;
-  gv_local.lookup_slx_sig[492].nbits = 14; gv_local.lookup_slx_sig[492].bits = 0xCEF40000;
-  gv_local.lookup_slx_sig[493].nbits = 13; gv_local.lookup_slx_sig[493].bits = 0x59000000;
-  gv_local.lookup_slx_sig[494].nbits = 13; gv_local.lookup_slx_sig[494].bits = 0x19200000;
-  gv_local.lookup_slx_sig[495].nbits = 13; gv_local.lookup_slx_sig[495].bits = 0x1EA00000;
-  gv_local.lookup_slx_sig[496].nbits = 13; gv_local.lookup_slx_sig[496].bits = 0x1A900000;
-  gv_local.lookup_slx_sig[497].nbits = 13; gv_local.lookup_slx_sig[497].bits = 0x32900000;
-  gv_local.lookup_slx_sig[498].nbits = 13; gv_local.lookup_slx_sig[498].bits = 0x28600000;
-  gv_local.lookup_slx_sig[499].nbits = 14; gv_local.lookup_slx_sig[499].bits = 0xCE580000;
-  gv_local.lookup_slx_sig[500].nbits = 13; gv_local.lookup_slx_sig[500].bits = 0x1A980000;
-  gv_local.lookup_slx_sig[501].nbits = 14; gv_local.lookup_slx_sig[501].bits = 0xCA640000;
-  gv_local.lookup_slx_sig[502].nbits = 13; gv_local.lookup_slx_sig[502].bits = 0x19280000;
-  gv_local.lookup_slx_sig[503].nbits = 14; gv_local.lookup_slx_sig[503].bits = 0xD6240000;
-  gv_local.lookup_slx_sig[504].nbits = 14; gv_local.lookup_slx_sig[504].bits = 0xD5600000;
-  gv_local.lookup_slx_sig[505].nbits = 13; gv_local.lookup_slx_sig[505].bits = 0x28400000;
-  gv_local.lookup_slx_sig[506].nbits = 14; gv_local.lookup_slx_sig[506].bits = 0xD6200000;
-  gv_local.lookup_slx_sig[507].nbits = 14; gv_local.lookup_slx_sig[507].bits = 0xCE5C0000;
-  gv_local.lookup_slx_sig[508].nbits = 14; gv_local.lookup_slx_sig[508].bits = 0xD5640000;
-  gv_local.lookup_slx_sig[509].nbits = 14; gv_local.lookup_slx_sig[509].bits = 0xCEF00000;
-  gv_local.lookup_slx_sig[510].nbits = 14; gv_local.lookup_slx_sig[510].bits = 0xCA600000;
-  gv_local.lookup_slx_sig[511].nbits =  4; gv_local.lookup_slx_sig[511].bits = 0x40000000;
-
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  /* reverse huffman lookup table
-   */
-  memset (gv_local.rlookup_slx_sig, 0, sizeof(uint16_t)*REV_HUFF_TREESIZE_16);
-
-  for (i=0; i<SIG_HUFF_TREESIZE; i++)
-  {
-    val = gv_local.lookup_slx_sig[i].bits >> 16;
-    gv_local.rlookup_slx_sig [val] = (uint16_t) i;
-    for (j=1; j<=(0xFFFF>>gv_local.lookup_slx_sig[i].nbits); j++)
-      gv_local.rlookup_slx_sig [val+j] = (uint16_t) i;
-  }
-#endif
-
-  _s_sort_lookup (gv_local.lookup_slx_sig, gv_local.idx_slx_sig, SIG_HUFF_TREESIZE);
-
-  gv_local.lookup_slx_sig_initialized = 1;
-}
-/*
- */
-static void _s_init_int_slx_default (void)
-{
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  int      i, j;
-  uint16_t val;
-#endif
-
-  memset (gv_local.lookup_slx_int,  0, sizeof(SRALookup)*INT_HUFF_TREESIZE);
-
-  gv_local.lookup_slx_int[   0].nbits = 13; gv_local.lookup_slx_int[   0].bits = 0x9DF80000;
-  gv_local.lookup_slx_int[   1].nbits = 13; gv_local.lookup_slx_int[   1].bits = 0x9DF00000;
-  gv_local.lookup_slx_int[   2].nbits = 13; gv_local.lookup_slx_int[   2].bits = 0xA4A00000;
-  gv_local.lookup_slx_int[   3].nbits = 13; gv_local.lookup_slx_int[   3].bits = 0xA7C00000;
-  gv_local.lookup_slx_int[   4].nbits = 13; gv_local.lookup_slx_int[   4].bits = 0xA4A80000;
-  gv_local.lookup_slx_int[   5].nbits = 13; gv_local.lookup_slx_int[   5].bits = 0xA7C80000;
-  gv_local.lookup_slx_int[   6].nbits = 13; gv_local.lookup_slx_int[   6].bits = 0xB6000000;
-  gv_local.lookup_slx_int[   7].nbits = 13; gv_local.lookup_slx_int[   7].bits = 0xAF600000;
-  gv_local.lookup_slx_int[   8].nbits = 13; gv_local.lookup_slx_int[   8].bits = 0xAF680000;
-  gv_local.lookup_slx_int[   9].nbits = 13; gv_local.lookup_slx_int[   9].bits = 0xBBA00000;
-  gv_local.lookup_slx_int[  10].nbits = 13; gv_local.lookup_slx_int[  10].bits = 0xB6080000;
-  gv_local.lookup_slx_int[  11].nbits = 13; gv_local.lookup_slx_int[  11].bits = 0xBBA80000;
-  gv_local.lookup_slx_int[  12].nbits = 13; gv_local.lookup_slx_int[  12].bits = 0xBDC80000;
-  gv_local.lookup_slx_int[  13].nbits = 13; gv_local.lookup_slx_int[  13].bits = 0xBDC00000;
-  gv_local.lookup_slx_int[  14].nbits = 13; gv_local.lookup_slx_int[  14].bits = 0xCA400000;
-  gv_local.lookup_slx_int[  15].nbits = 13; gv_local.lookup_slx_int[  15].bits = 0xC1F80000;
-  gv_local.lookup_slx_int[  16].nbits = 13; gv_local.lookup_slx_int[  16].bits = 0xC1F00000;
-  gv_local.lookup_slx_int[  17].nbits = 13; gv_local.lookup_slx_int[  17].bits = 0xCA480000;
-  gv_local.lookup_slx_int[  18].nbits = 13; gv_local.lookup_slx_int[  18].bits = 0xCF600000;
-  gv_local.lookup_slx_int[  19].nbits = 13; gv_local.lookup_slx_int[  19].bits = 0xD2C00000;
-  gv_local.lookup_slx_int[  20].nbits = 13; gv_local.lookup_slx_int[  20].bits = 0xCF680000;
-  gv_local.lookup_slx_int[  21].nbits = 13; gv_local.lookup_slx_int[  21].bits = 0xD2C80000;
-  gv_local.lookup_slx_int[  22].nbits = 13; gv_local.lookup_slx_int[  22].bits = 0xDA200000;
-  gv_local.lookup_slx_int[  23].nbits = 13; gv_local.lookup_slx_int[  23].bits = 0xDE900000;
-  gv_local.lookup_slx_int[  24].nbits = 13; gv_local.lookup_slx_int[  24].bits = 0xDA280000;
-  gv_local.lookup_slx_int[  25].nbits = 12; gv_local.lookup_slx_int[  25].bits = 0x02C00000;
-  gv_local.lookup_slx_int[  26].nbits = 13; gv_local.lookup_slx_int[  26].bits = 0xDE980000;
-  gv_local.lookup_slx_int[  27].nbits = 12; gv_local.lookup_slx_int[  27].bits = 0x02D00000;
-  gv_local.lookup_slx_int[  28].nbits = 12; gv_local.lookup_slx_int[  28].bits = 0x0C400000;
-  gv_local.lookup_slx_int[  29].nbits = 12; gv_local.lookup_slx_int[  29].bits = 0x0C500000;
-  gv_local.lookup_slx_int[  30].nbits = 12; gv_local.lookup_slx_int[  30].bits = 0x1A800000;
-  gv_local.lookup_slx_int[  31].nbits = 12; gv_local.lookup_slx_int[  31].bits = 0x1A900000;
-  gv_local.lookup_slx_int[  32].nbits = 12; gv_local.lookup_slx_int[  32].bits = 0x21300000;
-  gv_local.lookup_slx_int[  33].nbits = 12; gv_local.lookup_slx_int[  33].bits = 0x21100000;
-  gv_local.lookup_slx_int[  34].nbits = 12; gv_local.lookup_slx_int[  34].bits = 0x29900000;
-  gv_local.lookup_slx_int[  35].nbits = 12; gv_local.lookup_slx_int[  35].bits = 0x3C200000;
-  gv_local.lookup_slx_int[  36].nbits = 12; gv_local.lookup_slx_int[  36].bits = 0x3C000000;
-  gv_local.lookup_slx_int[  37].nbits = 12; gv_local.lookup_slx_int[  37].bits = 0x3E600000;
-  gv_local.lookup_slx_int[  38].nbits = 12; gv_local.lookup_slx_int[  38].bits = 0x4C000000;
-  gv_local.lookup_slx_int[  39].nbits = 12; gv_local.lookup_slx_int[  39].bits = 0x4F000000;
-  gv_local.lookup_slx_int[  40].nbits = 12; gv_local.lookup_slx_int[  40].bits = 0x4C400000;
-  gv_local.lookup_slx_int[  41].nbits = 12; gv_local.lookup_slx_int[  41].bits = 0x4F300000;
-  gv_local.lookup_slx_int[  42].nbits = 12; gv_local.lookup_slx_int[  42].bits = 0x58D00000;
-  gv_local.lookup_slx_int[  43].nbits = 12; gv_local.lookup_slx_int[  43].bits = 0x4F100000;
-  gv_local.lookup_slx_int[  44].nbits = 12; gv_local.lookup_slx_int[  44].bits = 0x5BA00000;
-  gv_local.lookup_slx_int[  45].nbits = 12; gv_local.lookup_slx_int[  45].bits = 0x6D000000;
-  gv_local.lookup_slx_int[  46].nbits = 12; gv_local.lookup_slx_int[  46].bits = 0x6F200000;
-  gv_local.lookup_slx_int[  47].nbits = 12; gv_local.lookup_slx_int[  47].bits = 0x7D800000;
-  gv_local.lookup_slx_int[  48].nbits = 12; gv_local.lookup_slx_int[  48].bits = 0x84800000;
-  gv_local.lookup_slx_int[  49].nbits = 12; gv_local.lookup_slx_int[  49].bits = 0x86600000;
-  gv_local.lookup_slx_int[  50].nbits = 12; gv_local.lookup_slx_int[  50].bits = 0x8DC00000;
-  gv_local.lookup_slx_int[  51].nbits = 12; gv_local.lookup_slx_int[  51].bits = 0x8DD00000;
-  gv_local.lookup_slx_int[  52].nbits = 12; gv_local.lookup_slx_int[  52].bits = 0x91100000;
-  gv_local.lookup_slx_int[  53].nbits = 12; gv_local.lookup_slx_int[  53].bits = 0x95000000;
-  gv_local.lookup_slx_int[  54].nbits = 12; gv_local.lookup_slx_int[  54].bits = 0x9CA00000;
-  gv_local.lookup_slx_int[  55].nbits = 12; gv_local.lookup_slx_int[  55].bits = 0x9DE00000;
-  gv_local.lookup_slx_int[  56].nbits = 12; gv_local.lookup_slx_int[  56].bits = 0x9CB00000;
-  gv_local.lookup_slx_int[  57].nbits = 12; gv_local.lookup_slx_int[  57].bits = 0xA3200000;
-  gv_local.lookup_slx_int[  58].nbits = 12; gv_local.lookup_slx_int[  58].bits = 0xA5E00000;
-  gv_local.lookup_slx_int[  59].nbits = 12; gv_local.lookup_slx_int[  59].bits = 0xA9500000;
-  gv_local.lookup_slx_int[  60].nbits = 12; gv_local.lookup_slx_int[  60].bits = 0xAF400000;
-  gv_local.lookup_slx_int[  61].nbits = 12; gv_local.lookup_slx_int[  61].bits = 0xAF700000;
-  gv_local.lookup_slx_int[  62].nbits = 12; gv_local.lookup_slx_int[  62].bits = 0xB6900000;
-  gv_local.lookup_slx_int[  63].nbits = 12; gv_local.lookup_slx_int[  63].bits = 0xB6100000;
-  gv_local.lookup_slx_int[  64].nbits = 12; gv_local.lookup_slx_int[  64].bits = 0xBBB00000;
-  gv_local.lookup_slx_int[  65].nbits = 12; gv_local.lookup_slx_int[  65].bits = 0xBD900000;
-  gv_local.lookup_slx_int[  66].nbits = 12; gv_local.lookup_slx_int[  66].bits = 0xC1A00000;
-  gv_local.lookup_slx_int[  67].nbits = 12; gv_local.lookup_slx_int[  67].bits = 0xC1E00000;
-  gv_local.lookup_slx_int[  68].nbits = 12; gv_local.lookup_slx_int[  68].bits = 0xC9400000;
-  gv_local.lookup_slx_int[  69].nbits = 12; gv_local.lookup_slx_int[  69].bits = 0xCA500000;
-  gv_local.lookup_slx_int[  70].nbits = 12; gv_local.lookup_slx_int[  70].bits = 0xCB600000;
-  gv_local.lookup_slx_int[  71].nbits = 12; gv_local.lookup_slx_int[  71].bits = 0xCB700000;
-  gv_local.lookup_slx_int[  72].nbits = 12; gv_local.lookup_slx_int[  72].bits = 0xCFF00000;
-  gv_local.lookup_slx_int[  73].nbits = 12; gv_local.lookup_slx_int[  73].bits = 0xD9900000;
-  gv_local.lookup_slx_int[  74].nbits = 12; gv_local.lookup_slx_int[  74].bits = 0xD9800000;
-  gv_local.lookup_slx_int[  75].nbits = 12; gv_local.lookup_slx_int[  75].bits = 0xDA300000;
-  gv_local.lookup_slx_int[  76].nbits = 11; gv_local.lookup_slx_int[  76].bits = 0x02800000;
-  gv_local.lookup_slx_int[  77].nbits = 11; gv_local.lookup_slx_int[  77].bits = 0x02A00000;
-  gv_local.lookup_slx_int[  78].nbits = 11; gv_local.lookup_slx_int[  78].bits = 0x0C600000;
-  gv_local.lookup_slx_int[  79].nbits = 11; gv_local.lookup_slx_int[  79].bits = 0x09800000;
-  gv_local.lookup_slx_int[  80].nbits = 11; gv_local.lookup_slx_int[  80].bits = 0x0D600000;
-  gv_local.lookup_slx_int[  81].nbits = 11; gv_local.lookup_slx_int[  81].bits = 0x11200000;
-  gv_local.lookup_slx_int[  82].nbits = 11; gv_local.lookup_slx_int[  82].bits = 0x1AA00000;
-  gv_local.lookup_slx_int[  83].nbits = 11; gv_local.lookup_slx_int[  83].bits = 0x27800000;
-  gv_local.lookup_slx_int[  84].nbits = 11; gv_local.lookup_slx_int[  84].bits = 0x29400000;
-  gv_local.lookup_slx_int[  85].nbits = 11; gv_local.lookup_slx_int[  85].bits = 0x29A00000;
-  gv_local.lookup_slx_int[  86].nbits = 11; gv_local.lookup_slx_int[  86].bits = 0x32800000;
-  gv_local.lookup_slx_int[  87].nbits = 11; gv_local.lookup_slx_int[  87].bits = 0x3C600000;
-  gv_local.lookup_slx_int[  88].nbits = 11; gv_local.lookup_slx_int[  88].bits = 0x42000000;
-  gv_local.lookup_slx_int[  89].nbits = 11; gv_local.lookup_slx_int[  89].bits = 0x42E00000;
-  gv_local.lookup_slx_int[  90].nbits = 11; gv_local.lookup_slx_int[  90].bits = 0x4C200000;
-  gv_local.lookup_slx_int[  91].nbits = 11; gv_local.lookup_slx_int[  91].bits = 0x4E400000;
-  gv_local.lookup_slx_int[  92].nbits = 11; gv_local.lookup_slx_int[  92].bits = 0x58600000;
-  gv_local.lookup_slx_int[  93].nbits = 11; gv_local.lookup_slx_int[  93].bits = 0x58400000;
-  gv_local.lookup_slx_int[  94].nbits = 11; gv_local.lookup_slx_int[  94].bits = 0x58A00000;
-  gv_local.lookup_slx_int[  95].nbits = 11; gv_local.lookup_slx_int[  95].bits = 0x63E00000;
-  gv_local.lookup_slx_int[  96].nbits = 11; gv_local.lookup_slx_int[  96].bits = 0x65800000;
-  gv_local.lookup_slx_int[  97].nbits = 11; gv_local.lookup_slx_int[  97].bits = 0x6D200000;
-  gv_local.lookup_slx_int[  98].nbits = 11; gv_local.lookup_slx_int[  98].bits = 0x6D400000;
-  gv_local.lookup_slx_int[  99].nbits = 11; gv_local.lookup_slx_int[  99].bits = 0x75C00000;
-  gv_local.lookup_slx_int[ 100].nbits = 11; gv_local.lookup_slx_int[ 100].bits = 0x75E00000;
-  gv_local.lookup_slx_int[ 101].nbits = 11; gv_local.lookup_slx_int[ 101].bits = 0x84A00000;
-  gv_local.lookup_slx_int[ 102].nbits = 11; gv_local.lookup_slx_int[ 102].bits = 0x87200000;
-  gv_local.lookup_slx_int[ 103].nbits = 11; gv_local.lookup_slx_int[ 103].bits = 0x87E00000;
-  gv_local.lookup_slx_int[ 104].nbits = 11; gv_local.lookup_slx_int[ 104].bits = 0x8DE00000;
-  gv_local.lookup_slx_int[ 105].nbits = 11; gv_local.lookup_slx_int[ 105].bits = 0x90400000;
-  gv_local.lookup_slx_int[ 106].nbits = 11; gv_local.lookup_slx_int[ 106].bits = 0x91E00000;
-  gv_local.lookup_slx_int[ 107].nbits = 11; gv_local.lookup_slx_int[ 107].bits = 0x9CC00000;
-  gv_local.lookup_slx_int[ 108].nbits = 11; gv_local.lookup_slx_int[ 108].bits = 0x9CE00000;
-  gv_local.lookup_slx_int[ 109].nbits = 11; gv_local.lookup_slx_int[ 109].bits = 0xA3000000;
-  gv_local.lookup_slx_int[ 110].nbits = 11; gv_local.lookup_slx_int[ 110].bits = 0xA3A00000;
-  gv_local.lookup_slx_int[ 111].nbits = 11; gv_local.lookup_slx_int[ 111].bits = 0xA4800000;
-  gv_local.lookup_slx_int[ 112].nbits = 11; gv_local.lookup_slx_int[ 112].bits = 0xA4E00000;
-  gv_local.lookup_slx_int[ 113].nbits = 11; gv_local.lookup_slx_int[ 113].bits = 0xA7E00000;
-  gv_local.lookup_slx_int[ 114].nbits = 11; gv_local.lookup_slx_int[ 114].bits = 0xAE000000;
-  gv_local.lookup_slx_int[ 115].nbits = 11; gv_local.lookup_slx_int[ 115].bits = 0xB1A00000;
-  gv_local.lookup_slx_int[ 116].nbits = 11; gv_local.lookup_slx_int[ 116].bits = 0xB3A00000;
-  gv_local.lookup_slx_int[ 117].nbits = 11; gv_local.lookup_slx_int[ 117].bits = 0xB6A00000;
-  gv_local.lookup_slx_int[ 118].nbits = 11; gv_local.lookup_slx_int[ 118].bits = 0xBD000000;
-  gv_local.lookup_slx_int[ 119].nbits = 11; gv_local.lookup_slx_int[ 119].bits = 0xBA600000;
-  gv_local.lookup_slx_int[ 120].nbits = 11; gv_local.lookup_slx_int[ 120].bits = 0xBF000000;
-  gv_local.lookup_slx_int[ 121].nbits = 11; gv_local.lookup_slx_int[ 121].bits = 0xBF200000;
-  gv_local.lookup_slx_int[ 122].nbits = 11; gv_local.lookup_slx_int[ 122].bits = 0xC1800000;
-  gv_local.lookup_slx_int[ 123].nbits = 11; gv_local.lookup_slx_int[ 123].bits = 0xC1C00000;
-  gv_local.lookup_slx_int[ 124].nbits = 11; gv_local.lookup_slx_int[ 124].bits = 0xC9600000;
-  gv_local.lookup_slx_int[ 125].nbits = 11; gv_local.lookup_slx_int[ 125].bits = 0xCA600000;
-  gv_local.lookup_slx_int[ 126].nbits = 11; gv_local.lookup_slx_int[ 126].bits = 0xCD000000;
-  gv_local.lookup_slx_int[ 127].nbits = 11; gv_local.lookup_slx_int[ 127].bits = 0xCF800000;
-  gv_local.lookup_slx_int[ 128].nbits = 11; gv_local.lookup_slx_int[ 128].bits = 0xCF400000;
-  gv_local.lookup_slx_int[ 129].nbits = 11; gv_local.lookup_slx_int[ 129].bits = 0xD2200000;
-  gv_local.lookup_slx_int[ 130].nbits = 11; gv_local.lookup_slx_int[ 130].bits = 0xD6800000;
-  gv_local.lookup_slx_int[ 131].nbits = 11; gv_local.lookup_slx_int[ 131].bits = 0xD6A00000;
-  gv_local.lookup_slx_int[ 132].nbits = 11; gv_local.lookup_slx_int[ 132].bits = 0xD9A00000;
-  gv_local.lookup_slx_int[ 133].nbits = 11; gv_local.lookup_slx_int[ 133].bits = 0xDBA00000;
-  gv_local.lookup_slx_int[ 134].nbits = 11; gv_local.lookup_slx_int[ 134].bits = 0xDBE00000;
-  gv_local.lookup_slx_int[ 135].nbits = 10; gv_local.lookup_slx_int[ 135].bits = 0x08400000;
-  gv_local.lookup_slx_int[ 136].nbits = 10; gv_local.lookup_slx_int[ 136].bits = 0x08C00000;
-  gv_local.lookup_slx_int[ 137].nbits = 10; gv_local.lookup_slx_int[ 137].bits = 0x0A000000;
-  gv_local.lookup_slx_int[ 138].nbits = 10; gv_local.lookup_slx_int[ 138].bits = 0x0C000000;
-  gv_local.lookup_slx_int[ 139].nbits = 10; gv_local.lookup_slx_int[ 139].bits = 0x0D000000;
-  gv_local.lookup_slx_int[ 140].nbits = 10; gv_local.lookup_slx_int[ 140].bits = 0x18000000;
-  gv_local.lookup_slx_int[ 141].nbits = 10; gv_local.lookup_slx_int[ 141].bits = 0x1AC00000;
-  gv_local.lookup_slx_int[ 142].nbits = 10; gv_local.lookup_slx_int[ 142].bits = 0x21400000;
-  gv_local.lookup_slx_int[ 143].nbits = 10; gv_local.lookup_slx_int[ 143].bits = 0x21800000;
-  gv_local.lookup_slx_int[ 144].nbits = 10; gv_local.lookup_slx_int[ 144].bits = 0x26000000;
-  gv_local.lookup_slx_int[ 145].nbits = 10; gv_local.lookup_slx_int[ 145].bits = 0x2B800000;
-  gv_local.lookup_slx_int[ 146].nbits = 10; gv_local.lookup_slx_int[ 146].bits = 0x32C00000;
-  gv_local.lookup_slx_int[ 147].nbits = 10; gv_local.lookup_slx_int[ 147].bits = 0x34800000;
-  gv_local.lookup_slx_int[ 148].nbits = 10; gv_local.lookup_slx_int[ 148].bits = 0x3CC00000;
-  gv_local.lookup_slx_int[ 149].nbits = 10; gv_local.lookup_slx_int[ 149].bits = 0x3E800000;
-  gv_local.lookup_slx_int[ 150].nbits = 10; gv_local.lookup_slx_int[ 150].bits = 0x49C00000;
-  gv_local.lookup_slx_int[ 151].nbits = 10; gv_local.lookup_slx_int[ 151].bits = 0x48C00000;
-  gv_local.lookup_slx_int[ 152].nbits = 10; gv_local.lookup_slx_int[ 152].bits = 0x49800000;
-  gv_local.lookup_slx_int[ 153].nbits = 10; gv_local.lookup_slx_int[ 153].bits = 0x4E800000;
-  gv_local.lookup_slx_int[ 154].nbits = 10; gv_local.lookup_slx_int[ 154].bits = 0x56400000;
-  gv_local.lookup_slx_int[ 155].nbits = 10; gv_local.lookup_slx_int[ 155].bits = 0x5BC00000;
-  gv_local.lookup_slx_int[ 156].nbits = 10; gv_local.lookup_slx_int[ 156].bits = 0x59400000;
-  gv_local.lookup_slx_int[ 157].nbits = 10; gv_local.lookup_slx_int[ 157].bits = 0x63800000;
-  gv_local.lookup_slx_int[ 158].nbits = 10; gv_local.lookup_slx_int[ 158].bits = 0x64C00000;
-  gv_local.lookup_slx_int[ 159].nbits = 10; gv_local.lookup_slx_int[ 159].bits = 0x6F400000;
-  gv_local.lookup_slx_int[ 160].nbits = 10; gv_local.lookup_slx_int[ 160].bits = 0x6FC00000;
-  gv_local.lookup_slx_int[ 161].nbits = 10; gv_local.lookup_slx_int[ 161].bits = 0x75400000;
-  gv_local.lookup_slx_int[ 162].nbits = 10; gv_local.lookup_slx_int[ 162].bits = 0x84C00000;
-  gv_local.lookup_slx_int[ 163].nbits = 10; gv_local.lookup_slx_int[ 163].bits = 0x86800000;
-  gv_local.lookup_slx_int[ 164].nbits = 10; gv_local.lookup_slx_int[ 164].bits = 0x87400000;
-  gv_local.lookup_slx_int[ 165].nbits = 10; gv_local.lookup_slx_int[ 165].bits = 0x87800000;
-  gv_local.lookup_slx_int[ 166].nbits = 10; gv_local.lookup_slx_int[ 166].bits = 0x8D800000;
-  gv_local.lookup_slx_int[ 167].nbits = 10; gv_local.lookup_slx_int[ 167].bits = 0x93C00000;
-  gv_local.lookup_slx_int[ 168].nbits = 10; gv_local.lookup_slx_int[ 168].bits = 0x95400000;
-  gv_local.lookup_slx_int[ 169].nbits = 10; gv_local.lookup_slx_int[ 169].bits = 0x9C000000;
-  gv_local.lookup_slx_int[ 170].nbits = 10; gv_local.lookup_slx_int[ 170].bits = 0xA2400000;
-  gv_local.lookup_slx_int[ 171].nbits = 10; gv_local.lookup_slx_int[ 171].bits = 0xA3C00000;
-  gv_local.lookup_slx_int[ 172].nbits = 10; gv_local.lookup_slx_int[ 172].bits = 0xA5000000;
-  gv_local.lookup_slx_int[ 173].nbits = 10; gv_local.lookup_slx_int[ 173].bits = 0xA7800000;
-  gv_local.lookup_slx_int[ 174].nbits = 10; gv_local.lookup_slx_int[ 174].bits = 0xAF000000;
-  gv_local.lookup_slx_int[ 175].nbits = 10; gv_local.lookup_slx_int[ 175].bits = 0xAF800000;
-  gv_local.lookup_slx_int[ 176].nbits = 10; gv_local.lookup_slx_int[ 176].bits = 0xB3C00000;
-  gv_local.lookup_slx_int[ 177].nbits = 10; gv_local.lookup_slx_int[ 177].bits = 0xB6C00000;
-  gv_local.lookup_slx_int[ 178].nbits = 10; gv_local.lookup_slx_int[ 178].bits = 0xBA000000;
-  gv_local.lookup_slx_int[ 179].nbits = 10; gv_local.lookup_slx_int[ 179].bits = 0xBF400000;
-  gv_local.lookup_slx_int[ 180].nbits = 10; gv_local.lookup_slx_int[ 180].bits = 0xC1000000;
-  gv_local.lookup_slx_int[ 181].nbits = 10; gv_local.lookup_slx_int[ 181].bits = 0xC5000000;
-  gv_local.lookup_slx_int[ 182].nbits = 10; gv_local.lookup_slx_int[ 182].bits = 0xCA000000;
-  gv_local.lookup_slx_int[ 183].nbits = 10; gv_local.lookup_slx_int[ 183].bits = 0xCB000000;
-  gv_local.lookup_slx_int[ 184].nbits = 10; gv_local.lookup_slx_int[ 184].bits = 0xD2400000;
-  gv_local.lookup_slx_int[ 185].nbits = 10; gv_local.lookup_slx_int[ 185].bits = 0xD3800000;
-  gv_local.lookup_slx_int[ 186].nbits = 10; gv_local.lookup_slx_int[ 186].bits = 0xD6C00000;
-  gv_local.lookup_slx_int[ 187].nbits = 10; gv_local.lookup_slx_int[ 187].bits = 0xDB000000;
-  gv_local.lookup_slx_int[ 188].nbits = 10; gv_local.lookup_slx_int[ 188].bits = 0xDEC00000;
-  gv_local.lookup_slx_int[ 189].nbits =  9; gv_local.lookup_slx_int[ 189].bits = 0x09000000;
-  gv_local.lookup_slx_int[ 190].nbits =  9; gv_local.lookup_slx_int[ 190].bits = 0x0C800000;
-  gv_local.lookup_slx_int[ 191].nbits =  9; gv_local.lookup_slx_int[ 191].bits = 0x18800000;
-  gv_local.lookup_slx_int[ 192].nbits =  9; gv_local.lookup_slx_int[ 192].bits = 0x1B800000;
-  gv_local.lookup_slx_int[ 193].nbits =  9; gv_local.lookup_slx_int[ 193].bits = 0x27000000;
-  gv_local.lookup_slx_int[ 194].nbits =  9; gv_local.lookup_slx_int[ 194].bits = 0x32000000;
-  gv_local.lookup_slx_int[ 195].nbits =  9; gv_local.lookup_slx_int[ 195].bits = 0x3D000000;
-  gv_local.lookup_slx_int[ 196].nbits =  9; gv_local.lookup_slx_int[ 196].bits = 0x49000000;
-  gv_local.lookup_slx_int[ 197].nbits =  9; gv_local.lookup_slx_int[ 197].bits = 0x4C800000;
-  gv_local.lookup_slx_int[ 198].nbits =  9; gv_local.lookup_slx_int[ 198].bits = 0x56800000;
-  gv_local.lookup_slx_int[ 199].nbits =  9; gv_local.lookup_slx_int[ 199].bits = 0x5B000000;
-  gv_local.lookup_slx_int[ 200].nbits =  9; gv_local.lookup_slx_int[ 200].bits = 0x64000000;
-  gv_local.lookup_slx_int[ 201].nbits =  9; gv_local.lookup_slx_int[ 201].bits = 0x74800000;
-  gv_local.lookup_slx_int[ 202].nbits =  9; gv_local.lookup_slx_int[ 202].bits = 0x7D000000;
-  gv_local.lookup_slx_int[ 203].nbits =  9; gv_local.lookup_slx_int[ 203].bits = 0x89000000;
-  gv_local.lookup_slx_int[ 204].nbits =  9; gv_local.lookup_slx_int[ 204].bits = 0x90800000;
-  gv_local.lookup_slx_int[ 205].nbits =  9; gv_local.lookup_slx_int[ 205].bits = 0x95800000;
-  gv_local.lookup_slx_int[ 206].nbits =  9; gv_local.lookup_slx_int[ 206].bits = 0xA2800000;
-  gv_local.lookup_slx_int[ 207].nbits =  9; gv_local.lookup_slx_int[ 207].bits = 0xA7000000;
-  gv_local.lookup_slx_int[ 208].nbits =  9; gv_local.lookup_slx_int[ 208].bits = 0xAE800000;
-  gv_local.lookup_slx_int[ 209].nbits =  9; gv_local.lookup_slx_int[ 209].bits = 0xB3000000;
-  gv_local.lookup_slx_int[ 210].nbits =  9; gv_local.lookup_slx_int[ 210].bits = 0xBB000000;
-  gv_local.lookup_slx_int[ 211].nbits =  9; gv_local.lookup_slx_int[ 211].bits = 0xBF800000;
-  gv_local.lookup_slx_int[ 212].nbits =  9; gv_local.lookup_slx_int[ 212].bits = 0xC5800000;
-  gv_local.lookup_slx_int[ 213].nbits =  9; gv_local.lookup_slx_int[ 213].bits = 0xCB800000;
-  gv_local.lookup_slx_int[ 214].nbits =  9; gv_local.lookup_slx_int[ 214].bits = 0xD3000000;
-  gv_local.lookup_slx_int[ 215].nbits =  9; gv_local.lookup_slx_int[ 215].bits = 0xD9000000;
-  gv_local.lookup_slx_int[ 216].nbits =  9; gv_local.lookup_slx_int[ 216].bits = 0xDE000000;
-  gv_local.lookup_slx_int[ 217].nbits =  8; gv_local.lookup_slx_int[ 217].bits = 0x0B000000;
-  gv_local.lookup_slx_int[ 218].nbits =  8; gv_local.lookup_slx_int[ 218].bits = 0x19000000;
-  gv_local.lookup_slx_int[ 219].nbits =  8; gv_local.lookup_slx_int[ 219].bits = 0x28000000;
-  gv_local.lookup_slx_int[ 220].nbits =  8; gv_local.lookup_slx_int[ 220].bits = 0x33000000;
-  gv_local.lookup_slx_int[ 221].nbits =  8; gv_local.lookup_slx_int[ 221].bits = 0x3F000000;
-  gv_local.lookup_slx_int[ 222].nbits =  8; gv_local.lookup_slx_int[ 222].bits = 0x4D000000;
-  gv_local.lookup_slx_int[ 223].nbits =  8; gv_local.lookup_slx_int[ 223].bits = 0x5A000000;
-  gv_local.lookup_slx_int[ 224].nbits =  8; gv_local.lookup_slx_int[ 224].bits = 0x6C000000;
-  gv_local.lookup_slx_int[ 225].nbits =  8; gv_local.lookup_slx_int[ 225].bits = 0x7C000000;
-  gv_local.lookup_slx_int[ 226].nbits =  8; gv_local.lookup_slx_int[ 226].bits = 0x88000000;
-  gv_local.lookup_slx_int[ 227].nbits =  8; gv_local.lookup_slx_int[ 227].bits = 0x94000000;
-  gv_local.lookup_slx_int[ 228].nbits =  8; gv_local.lookup_slx_int[ 228].bits = 0xA1000000;
-  gv_local.lookup_slx_int[ 229].nbits =  8; gv_local.lookup_slx_int[ 229].bits = 0xA8000000;
-  gv_local.lookup_slx_int[ 230].nbits =  8; gv_local.lookup_slx_int[ 230].bits = 0xB2000000;
-  gv_local.lookup_slx_int[ 231].nbits =  8; gv_local.lookup_slx_int[ 231].bits = 0xBC000000;
-  gv_local.lookup_slx_int[ 232].nbits =  8; gv_local.lookup_slx_int[ 232].bits = 0xC4000000;
-  gv_local.lookup_slx_int[ 233].nbits =  8; gv_local.lookup_slx_int[ 233].bits = 0xCC000000;
-  gv_local.lookup_slx_int[ 234].nbits =  8; gv_local.lookup_slx_int[ 234].bits = 0xD7000000;
-  gv_local.lookup_slx_int[ 235].nbits =  7; gv_local.lookup_slx_int[ 235].bits = 0x00000000;
-  gv_local.lookup_slx_int[ 236].nbits =  7; gv_local.lookup_slx_int[ 236].bits = 0x12000000;
-  gv_local.lookup_slx_int[ 237].nbits =  7; gv_local.lookup_slx_int[ 237].bits = 0x24000000;
-  gv_local.lookup_slx_int[ 238].nbits =  7; gv_local.lookup_slx_int[ 238].bits = 0x36000000;
-  gv_local.lookup_slx_int[ 239].nbits =  7; gv_local.lookup_slx_int[ 239].bits = 0x4A000000;
-  gv_local.lookup_slx_int[ 240].nbits =  7; gv_local.lookup_slx_int[ 240].bits = 0x60000000;
-  gv_local.lookup_slx_int[ 241].nbits =  7; gv_local.lookup_slx_int[ 241].bits = 0x76000000;
-  gv_local.lookup_slx_int[ 242].nbits =  7; gv_local.lookup_slx_int[ 242].bits = 0x8A000000;
-  gv_local.lookup_slx_int[ 243].nbits =  7; gv_local.lookup_slx_int[ 243].bits = 0x96000000;
-  gv_local.lookup_slx_int[ 244].nbits =  7; gv_local.lookup_slx_int[ 244].bits = 0xAA000000;
-  gv_local.lookup_slx_int[ 245].nbits =  7; gv_local.lookup_slx_int[ 245].bits = 0xB4000000;
-  gv_local.lookup_slx_int[ 246].nbits =  7; gv_local.lookup_slx_int[ 246].bits = 0xC2000000;
-  gv_local.lookup_slx_int[ 247].nbits =  7; gv_local.lookup_slx_int[ 247].bits = 0xD0000000;
-  gv_local.lookup_slx_int[ 248].nbits =  7; gv_local.lookup_slx_int[ 248].bits = 0xDC000000;
-  gv_local.lookup_slx_int[ 249].nbits =  6; gv_local.lookup_slx_int[ 249].bits = 0x14000000;
-  gv_local.lookup_slx_int[ 250].nbits =  6; gv_local.lookup_slx_int[ 250].bits = 0x2C000000;
-  gv_local.lookup_slx_int[ 251].nbits =  6; gv_local.lookup_slx_int[ 251].bits = 0x44000000;
-  gv_local.lookup_slx_int[ 252].nbits =  6; gv_local.lookup_slx_int[ 252].bits = 0x5C000000;
-  gv_local.lookup_slx_int[ 253].nbits =  6; gv_local.lookup_slx_int[ 253].bits = 0x70000000;
-  gv_local.lookup_slx_int[ 254].nbits =  6; gv_local.lookup_slx_int[ 254].bits = 0x80000000;
-  gv_local.lookup_slx_int[ 255].nbits =  6; gv_local.lookup_slx_int[ 255].bits = 0x98000000;
-  gv_local.lookup_slx_int[ 256].nbits =  6; gv_local.lookup_slx_int[ 256].bits = 0x78000000;
-  gv_local.lookup_slx_int[ 257].nbits =  6; gv_local.lookup_slx_int[ 257].bits = 0x68000000;
-  gv_local.lookup_slx_int[ 258].nbits =  6; gv_local.lookup_slx_int[ 258].bits = 0x50000000;
-  gv_local.lookup_slx_int[ 259].nbits =  6; gv_local.lookup_slx_int[ 259].bits = 0x38000000;
-  gv_local.lookup_slx_int[ 260].nbits =  6; gv_local.lookup_slx_int[ 260].bits = 0x1C000000;
-  gv_local.lookup_slx_int[ 261].nbits =  6; gv_local.lookup_slx_int[ 261].bits = 0x04000000;
-  gv_local.lookup_slx_int[ 262].nbits =  7; gv_local.lookup_slx_int[ 262].bits = 0xD4000000;
-  gv_local.lookup_slx_int[ 263].nbits =  7; gv_local.lookup_slx_int[ 263].bits = 0xC6000000;
-  gv_local.lookup_slx_int[ 264].nbits =  7; gv_local.lookup_slx_int[ 264].bits = 0xB8000000;
-  gv_local.lookup_slx_int[ 265].nbits =  7; gv_local.lookup_slx_int[ 265].bits = 0xAC000000;
-  gv_local.lookup_slx_int[ 266].nbits =  7; gv_local.lookup_slx_int[ 266].bits = 0x9E000000;
-  gv_local.lookup_slx_int[ 267].nbits =  7; gv_local.lookup_slx_int[ 267].bits = 0x8E000000;
-  gv_local.lookup_slx_int[ 268].nbits =  7; gv_local.lookup_slx_int[ 268].bits = 0x7E000000;
-  gv_local.lookup_slx_int[ 269].nbits =  7; gv_local.lookup_slx_int[ 269].bits = 0x66000000;
-  gv_local.lookup_slx_int[ 270].nbits =  7; gv_local.lookup_slx_int[ 270].bits = 0x54000000;
-  gv_local.lookup_slx_int[ 271].nbits =  7; gv_local.lookup_slx_int[ 271].bits = 0x40000000;
-  gv_local.lookup_slx_int[ 272].nbits =  7; gv_local.lookup_slx_int[ 272].bits = 0x30000000;
-  gv_local.lookup_slx_int[ 273].nbits =  7; gv_local.lookup_slx_int[ 273].bits = 0x22000000;
-  gv_local.lookup_slx_int[ 274].nbits =  7; gv_local.lookup_slx_int[ 274].bits = 0x0E000000;
-  gv_local.lookup_slx_int[ 275].nbits =  8; gv_local.lookup_slx_int[ 275].bits = 0xDF000000;
-  gv_local.lookup_slx_int[ 276].nbits =  8; gv_local.lookup_slx_int[ 276].bits = 0xD8000000;
-  gv_local.lookup_slx_int[ 277].nbits =  8; gv_local.lookup_slx_int[ 277].bits = 0xCE000000;
-  gv_local.lookup_slx_int[ 278].nbits =  8; gv_local.lookup_slx_int[ 278].bits = 0xC8000000;
-  gv_local.lookup_slx_int[ 279].nbits =  8; gv_local.lookup_slx_int[ 279].bits = 0xBE000000;
-  gv_local.lookup_slx_int[ 280].nbits =  8; gv_local.lookup_slx_int[ 280].bits = 0xB7000000;
-  gv_local.lookup_slx_int[ 281].nbits =  8; gv_local.lookup_slx_int[ 281].bits = 0xB0000000;
-  gv_local.lookup_slx_int[ 282].nbits =  8; gv_local.lookup_slx_int[ 282].bits = 0xA6000000;
-  gv_local.lookup_slx_int[ 283].nbits =  8; gv_local.lookup_slx_int[ 283].bits = 0xA0000000;
-  gv_local.lookup_slx_int[ 284].nbits =  8; gv_local.lookup_slx_int[ 284].bits = 0x92000000;
-  gv_local.lookup_slx_int[ 285].nbits =  8; gv_local.lookup_slx_int[ 285].bits = 0x8C000000;
-  gv_local.lookup_slx_int[ 286].nbits =  8; gv_local.lookup_slx_int[ 286].bits = 0x85000000;
-  gv_local.lookup_slx_int[ 287].nbits =  8; gv_local.lookup_slx_int[ 287].bits = 0x6E000000;
-  gv_local.lookup_slx_int[ 288].nbits =  8; gv_local.lookup_slx_int[ 288].bits = 0x62000000;
-  gv_local.lookup_slx_int[ 289].nbits =  8; gv_local.lookup_slx_int[ 289].bits = 0x57000000;
-  gv_local.lookup_slx_int[ 290].nbits =  8; gv_local.lookup_slx_int[ 290].bits = 0x43000000;
-  gv_local.lookup_slx_int[ 291].nbits =  8; gv_local.lookup_slx_int[ 291].bits = 0x35000000;
-  gv_local.lookup_slx_int[ 292].nbits =  8; gv_local.lookup_slx_int[ 292].bits = 0x2A000000;
-  gv_local.lookup_slx_int[ 293].nbits =  8; gv_local.lookup_slx_int[ 293].bits = 0x20000000;
-  gv_local.lookup_slx_int[ 294].nbits =  8; gv_local.lookup_slx_int[ 294].bits = 0x10000000;
-  gv_local.lookup_slx_int[ 295].nbits =  8; gv_local.lookup_slx_int[ 295].bits = 0x03000000;
-  gv_local.lookup_slx_int[ 296].nbits =  9; gv_local.lookup_slx_int[ 296].bits = 0xDA800000;
-  gv_local.lookup_slx_int[ 297].nbits =  9; gv_local.lookup_slx_int[ 297].bits = 0xD6000000;
-  gv_local.lookup_slx_int[ 298].nbits =  9; gv_local.lookup_slx_int[ 298].bits = 0xCD800000;
-  gv_local.lookup_slx_int[ 299].nbits =  9; gv_local.lookup_slx_int[ 299].bits = 0xC9800000;
-  gv_local.lookup_slx_int[ 300].nbits =  9; gv_local.lookup_slx_int[ 300].bits = 0xC0800000;
-  gv_local.lookup_slx_int[ 301].nbits =  9; gv_local.lookup_slx_int[ 301].bits = 0xBA800000;
-  gv_local.lookup_slx_int[ 302].nbits =  9; gv_local.lookup_slx_int[ 302].bits = 0xB1000000;
-  gv_local.lookup_slx_int[ 303].nbits =  9; gv_local.lookup_slx_int[ 303].bits = 0xA9800000;
-  gv_local.lookup_slx_int[ 304].nbits =  9; gv_local.lookup_slx_int[ 304].bits = 0xA4000000;
-  gv_local.lookup_slx_int[ 305].nbits =  9; gv_local.lookup_slx_int[ 305].bits = 0x9D000000;
-  gv_local.lookup_slx_int[ 306].nbits =  9; gv_local.lookup_slx_int[ 306].bits = 0x93000000;
-  gv_local.lookup_slx_int[ 307].nbits =  9; gv_local.lookup_slx_int[ 307].bits = 0x8D000000;
-  gv_local.lookup_slx_int[ 308].nbits =  9; gv_local.lookup_slx_int[ 308].bits = 0x84000000;
-  gv_local.lookup_slx_int[ 309].nbits =  9; gv_local.lookup_slx_int[ 309].bits = 0x74000000;
-  gv_local.lookup_slx_int[ 310].nbits =  9; gv_local.lookup_slx_int[ 310].bits = 0x65000000;
-  gv_local.lookup_slx_int[ 311].nbits =  9; gv_local.lookup_slx_int[ 311].bits = 0x59800000;
-  gv_local.lookup_slx_int[ 312].nbits =  9; gv_local.lookup_slx_int[ 312].bits = 0x4F800000;
-  gv_local.lookup_slx_int[ 313].nbits =  9; gv_local.lookup_slx_int[ 313].bits = 0x48000000;
-  gv_local.lookup_slx_int[ 314].nbits =  9; gv_local.lookup_slx_int[ 314].bits = 0x3D800000;
-  gv_local.lookup_slx_int[ 315].nbits =  9; gv_local.lookup_slx_int[ 315].bits = 0x34000000;
-  gv_local.lookup_slx_int[ 316].nbits =  9; gv_local.lookup_slx_int[ 316].bits = 0x26800000;
-  gv_local.lookup_slx_int[ 317].nbits =  9; gv_local.lookup_slx_int[ 317].bits = 0x1B000000;
-  gv_local.lookup_slx_int[ 318].nbits =  9; gv_local.lookup_slx_int[ 318].bits = 0x11800000;
-  gv_local.lookup_slx_int[ 319].nbits =  9; gv_local.lookup_slx_int[ 319].bits = 0x0A800000;
-  gv_local.lookup_slx_int[ 320].nbits =  9; gv_local.lookup_slx_int[ 320].bits = 0x02000000;
-  gv_local.lookup_slx_int[ 321].nbits = 10; gv_local.lookup_slx_int[ 321].bits = 0xDB400000;
-  gv_local.lookup_slx_int[ 322].nbits = 10; gv_local.lookup_slx_int[ 322].bits = 0xD9C00000;
-  gv_local.lookup_slx_int[ 323].nbits = 10; gv_local.lookup_slx_int[ 323].bits = 0xD2800000;
-  gv_local.lookup_slx_int[ 324].nbits = 10; gv_local.lookup_slx_int[ 324].bits = 0xCF000000;
-  gv_local.lookup_slx_int[ 325].nbits = 10; gv_local.lookup_slx_int[ 325].bits = 0xCD400000;
-  gv_local.lookup_slx_int[ 326].nbits = 10; gv_local.lookup_slx_int[ 326].bits = 0xCA800000;
-  gv_local.lookup_slx_int[ 327].nbits = 10; gv_local.lookup_slx_int[ 327].bits = 0xC5400000;
-  gv_local.lookup_slx_int[ 328].nbits = 10; gv_local.lookup_slx_int[ 328].bits = 0xC0000000;
-  gv_local.lookup_slx_int[ 329].nbits = 10; gv_local.lookup_slx_int[ 329].bits = 0xBD400000;
-  gv_local.lookup_slx_int[ 330].nbits = 10; gv_local.lookup_slx_int[ 330].bits = 0xBBC00000;
-  gv_local.lookup_slx_int[ 331].nbits = 10; gv_local.lookup_slx_int[ 331].bits = 0xB6400000;
-  gv_local.lookup_slx_int[ 332].nbits = 10; gv_local.lookup_slx_int[ 332].bits = 0xB1C00000;
-  gv_local.lookup_slx_int[ 333].nbits = 10; gv_local.lookup_slx_int[ 333].bits = 0xAFC00000;
-  gv_local.lookup_slx_int[ 334].nbits = 10; gv_local.lookup_slx_int[ 334].bits = 0xAE400000;
-  gv_local.lookup_slx_int[ 335].nbits = 10; gv_local.lookup_slx_int[ 335].bits = 0xA9000000;
-  gv_local.lookup_slx_int[ 336].nbits = 10; gv_local.lookup_slx_int[ 336].bits = 0xA5800000;
-  gv_local.lookup_slx_int[ 337].nbits = 10; gv_local.lookup_slx_int[ 337].bits = 0xA3400000;
-  gv_local.lookup_slx_int[ 338].nbits = 10; gv_local.lookup_slx_int[ 338].bits = 0xA2000000;
-  gv_local.lookup_slx_int[ 339].nbits = 10; gv_local.lookup_slx_int[ 339].bits = 0x9C400000;
-  gv_local.lookup_slx_int[ 340].nbits = 10; gv_local.lookup_slx_int[ 340].bits = 0x93800000;
-  gv_local.lookup_slx_int[ 341].nbits = 10; gv_local.lookup_slx_int[ 341].bits = 0x91800000;
-  gv_local.lookup_slx_int[ 342].nbits = 10; gv_local.lookup_slx_int[ 342].bits = 0x91400000;
-  gv_local.lookup_slx_int[ 343].nbits = 10; gv_local.lookup_slx_int[ 343].bits = 0x90000000;
-  gv_local.lookup_slx_int[ 344].nbits = 10; gv_local.lookup_slx_int[ 344].bits = 0x89800000;
-  gv_local.lookup_slx_int[ 345].nbits = 10; gv_local.lookup_slx_int[ 345].bits = 0x86C00000;
-  gv_local.lookup_slx_int[ 346].nbits = 10; gv_local.lookup_slx_int[ 346].bits = 0x86000000;
-  gv_local.lookup_slx_int[ 347].nbits = 10; gv_local.lookup_slx_int[ 347].bits = 0x7DC00000;
-  gv_local.lookup_slx_int[ 348].nbits = 10; gv_local.lookup_slx_int[ 348].bits = 0x75000000;
-  gv_local.lookup_slx_int[ 349].nbits = 10; gv_local.lookup_slx_int[ 349].bits = 0x6F800000;
-  gv_local.lookup_slx_int[ 350].nbits = 10; gv_local.lookup_slx_int[ 350].bits = 0x6DC00000;
-  gv_local.lookup_slx_int[ 351].nbits = 10; gv_local.lookup_slx_int[ 351].bits = 0x6D800000;
-  gv_local.lookup_slx_int[ 352].nbits = 10; gv_local.lookup_slx_int[ 352].bits = 0x65C00000;
-  gv_local.lookup_slx_int[ 353].nbits = 10; gv_local.lookup_slx_int[ 353].bits = 0x64800000;
-  gv_local.lookup_slx_int[ 354].nbits = 10; gv_local.lookup_slx_int[ 354].bits = 0x63000000;
-  gv_local.lookup_slx_int[ 355].nbits = 10; gv_local.lookup_slx_int[ 355].bits = 0x59000000;
-  gv_local.lookup_slx_int[ 356].nbits = 10; gv_local.lookup_slx_int[ 356].bits = 0x58000000;
-  gv_local.lookup_slx_int[ 357].nbits = 10; gv_local.lookup_slx_int[ 357].bits = 0x4F400000;
-  gv_local.lookup_slx_int[ 358].nbits = 10; gv_local.lookup_slx_int[ 358].bits = 0x4EC00000;
-  gv_local.lookup_slx_int[ 359].nbits = 10; gv_local.lookup_slx_int[ 359].bits = 0x56000000;
-  gv_local.lookup_slx_int[ 360].nbits = 10; gv_local.lookup_slx_int[ 360].bits = 0x4E000000;
-  gv_local.lookup_slx_int[ 361].nbits = 10; gv_local.lookup_slx_int[ 361].bits = 0x42800000;
-  gv_local.lookup_slx_int[ 362].nbits = 10; gv_local.lookup_slx_int[ 362].bits = 0x42400000;
-  gv_local.lookup_slx_int[ 363].nbits = 10; gv_local.lookup_slx_int[ 363].bits = 0x3EC00000;
-  gv_local.lookup_slx_int[ 364].nbits = 10; gv_local.lookup_slx_int[ 364].bits = 0x3E000000;
-  gv_local.lookup_slx_int[ 365].nbits = 10; gv_local.lookup_slx_int[ 365].bits = 0x3C800000;
-  gv_local.lookup_slx_int[ 366].nbits = 10; gv_local.lookup_slx_int[ 366].bits = 0x34C00000;
-  gv_local.lookup_slx_int[ 367].nbits = 10; gv_local.lookup_slx_int[ 367].bits = 0x2BC00000;
-  gv_local.lookup_slx_int[ 368].nbits = 10; gv_local.lookup_slx_int[ 368].bits = 0x2B400000;
-  gv_local.lookup_slx_int[ 369].nbits = 10; gv_local.lookup_slx_int[ 369].bits = 0x29000000;
-  gv_local.lookup_slx_int[ 370].nbits = 10; gv_local.lookup_slx_int[ 370].bits = 0x26400000;
-  gv_local.lookup_slx_int[ 371].nbits = 10; gv_local.lookup_slx_int[ 371].bits = 0x27C00000;
-  gv_local.lookup_slx_int[ 372].nbits = 10; gv_local.lookup_slx_int[ 372].bits = 0x21C00000;
-  gv_local.lookup_slx_int[ 373].nbits = 10; gv_local.lookup_slx_int[ 373].bits = 0x18400000;
-  gv_local.lookup_slx_int[ 374].nbits = 10; gv_local.lookup_slx_int[ 374].bits = 0x1A000000;
-  gv_local.lookup_slx_int[ 375].nbits = 10; gv_local.lookup_slx_int[ 375].bits = 0x11400000;
-  gv_local.lookup_slx_int[ 376].nbits = 10; gv_local.lookup_slx_int[ 376].bits = 0x0DC00000;
-  gv_local.lookup_slx_int[ 377].nbits = 10; gv_local.lookup_slx_int[ 377].bits = 0x0D800000;
-  gv_local.lookup_slx_int[ 378].nbits = 10; gv_local.lookup_slx_int[ 378].bits = 0x0A400000;
-  gv_local.lookup_slx_int[ 379].nbits = 10; gv_local.lookup_slx_int[ 379].bits = 0x09C00000;
-  gv_local.lookup_slx_int[ 380].nbits = 10; gv_local.lookup_slx_int[ 380].bits = 0x08800000;
-  gv_local.lookup_slx_int[ 381].nbits = 10; gv_local.lookup_slx_int[ 381].bits = 0x08000000;
-  gv_local.lookup_slx_int[ 382].nbits = 11; gv_local.lookup_slx_int[ 382].bits = 0xDEA00000;
-  gv_local.lookup_slx_int[ 383].nbits = 11; gv_local.lookup_slx_int[ 383].bits = 0xDBC00000;
-  gv_local.lookup_slx_int[ 384].nbits = 11; gv_local.lookup_slx_int[ 384].bits = 0xDA400000;
-  gv_local.lookup_slx_int[ 385].nbits = 11; gv_local.lookup_slx_int[ 385].bits = 0xDA600000;
-  gv_local.lookup_slx_int[ 386].nbits = 11; gv_local.lookup_slx_int[ 386].bits = 0xDA000000;
-  gv_local.lookup_slx_int[ 387].nbits = 11; gv_local.lookup_slx_int[ 387].bits = 0xD3C00000;
-  gv_local.lookup_slx_int[ 388].nbits = 11; gv_local.lookup_slx_int[ 388].bits = 0xD2E00000;
-  gv_local.lookup_slx_int[ 389].nbits = 11; gv_local.lookup_slx_int[ 389].bits = 0xD2000000;
-  gv_local.lookup_slx_int[ 390].nbits = 11; gv_local.lookup_slx_int[ 390].bits = 0xCFC00000;
-  gv_local.lookup_slx_int[ 391].nbits = 11; gv_local.lookup_slx_int[ 391].bits = 0xCD200000;
-  gv_local.lookup_slx_int[ 392].nbits = 11; gv_local.lookup_slx_int[ 392].bits = 0xCFA00000;
-  gv_local.lookup_slx_int[ 393].nbits = 11; gv_local.lookup_slx_int[ 393].bits = 0xCB400000;
-  gv_local.lookup_slx_int[ 394].nbits = 11; gv_local.lookup_slx_int[ 394].bits = 0xCAC00000;
-  gv_local.lookup_slx_int[ 395].nbits = 11; gv_local.lookup_slx_int[ 395].bits = 0xC9000000;
-  gv_local.lookup_slx_int[ 396].nbits = 11; gv_local.lookup_slx_int[ 396].bits = 0xC9200000;
-  gv_local.lookup_slx_int[ 397].nbits = 11; gv_local.lookup_slx_int[ 397].bits = 0xC1600000;
-  gv_local.lookup_slx_int[ 398].nbits = 11; gv_local.lookup_slx_int[ 398].bits = 0xC1400000;
-  gv_local.lookup_slx_int[ 399].nbits = 11; gv_local.lookup_slx_int[ 399].bits = 0xC0600000;
-  gv_local.lookup_slx_int[ 400].nbits = 11; gv_local.lookup_slx_int[ 400].bits = 0xBDE00000;
-  gv_local.lookup_slx_int[ 401].nbits = 11; gv_local.lookup_slx_int[ 401].bits = 0xBDA00000;
-  gv_local.lookup_slx_int[ 402].nbits = 11; gv_local.lookup_slx_int[ 402].bits = 0xBD200000;
-  gv_local.lookup_slx_int[ 403].nbits = 11; gv_local.lookup_slx_int[ 403].bits = 0xBB800000;
-  gv_local.lookup_slx_int[ 404].nbits = 11; gv_local.lookup_slx_int[ 404].bits = 0xBA400000;
-  gv_local.lookup_slx_int[ 405].nbits = 11; gv_local.lookup_slx_int[ 405].bits = 0xB3800000;
-  gv_local.lookup_slx_int[ 406].nbits = 11; gv_local.lookup_slx_int[ 406].bits = 0xB1800000;
-  gv_local.lookup_slx_int[ 407].nbits = 11; gv_local.lookup_slx_int[ 407].bits = 0xAE200000;
-  gv_local.lookup_slx_int[ 408].nbits = 11; gv_local.lookup_slx_int[ 408].bits = 0xA9600000;
-  gv_local.lookup_slx_int[ 409].nbits = 11; gv_local.lookup_slx_int[ 409].bits = 0xA5400000;
-  gv_local.lookup_slx_int[ 410].nbits = 11; gv_local.lookup_slx_int[ 410].bits = 0xA5C00000;
-  gv_local.lookup_slx_int[ 411].nbits = 11; gv_local.lookup_slx_int[ 411].bits = 0xA5600000;
-  gv_local.lookup_slx_int[ 412].nbits = 11; gv_local.lookup_slx_int[ 412].bits = 0xA4C00000;
-  gv_local.lookup_slx_int[ 413].nbits = 11; gv_local.lookup_slx_int[ 413].bits = 0xA3800000;
-  gv_local.lookup_slx_int[ 414].nbits = 11; gv_local.lookup_slx_int[ 414].bits = 0x9DA00000;
-  gv_local.lookup_slx_int[ 415].nbits = 11; gv_local.lookup_slx_int[ 415].bits = 0x9D800000;
-  gv_local.lookup_slx_int[ 416].nbits = 11; gv_local.lookup_slx_int[ 416].bits = 0x95200000;
-  gv_local.lookup_slx_int[ 417].nbits = 11; gv_local.lookup_slx_int[ 417].bits = 0x9C800000;
-  gv_local.lookup_slx_int[ 418].nbits = 11; gv_local.lookup_slx_int[ 418].bits = 0x90600000;
-  gv_local.lookup_slx_int[ 419].nbits = 11; gv_local.lookup_slx_int[ 419].bits = 0x91C00000;
-  gv_local.lookup_slx_int[ 420].nbits = 11; gv_local.lookup_slx_int[ 420].bits = 0x89E00000;
-  gv_local.lookup_slx_int[ 421].nbits = 11; gv_local.lookup_slx_int[ 421].bits = 0x89C00000;
-  gv_local.lookup_slx_int[ 422].nbits = 11; gv_local.lookup_slx_int[ 422].bits = 0x87000000;
-  gv_local.lookup_slx_int[ 423].nbits = 11; gv_local.lookup_slx_int[ 423].bits = 0x86400000;
-  gv_local.lookup_slx_int[ 424].nbits = 11; gv_local.lookup_slx_int[ 424].bits = 0x7DA00000;
-  gv_local.lookup_slx_int[ 425].nbits = 11; gv_local.lookup_slx_int[ 425].bits = 0x75A00000;
-  gv_local.lookup_slx_int[ 426].nbits = 11; gv_local.lookup_slx_int[ 426].bits = 0x75800000;
-  gv_local.lookup_slx_int[ 427].nbits = 11; gv_local.lookup_slx_int[ 427].bits = 0x6F000000;
-  gv_local.lookup_slx_int[ 428].nbits = 11; gv_local.lookup_slx_int[ 428].bits = 0x65A00000;
-  gv_local.lookup_slx_int[ 429].nbits = 11; gv_local.lookup_slx_int[ 429].bits = 0x63600000;
-  gv_local.lookup_slx_int[ 430].nbits = 11; gv_local.lookup_slx_int[ 430].bits = 0x63C00000;
-  gv_local.lookup_slx_int[ 431].nbits = 11; gv_local.lookup_slx_int[ 431].bits = 0x5B800000;
-  gv_local.lookup_slx_int[ 432].nbits = 11; gv_local.lookup_slx_int[ 432].bits = 0x58E00000;
-  gv_local.lookup_slx_int[ 433].nbits = 11; gv_local.lookup_slx_int[ 433].bits = 0x58800000;
-  gv_local.lookup_slx_int[ 434].nbits = 11; gv_local.lookup_slx_int[ 434].bits = 0x4E600000;
-  gv_local.lookup_slx_int[ 435].nbits = 11; gv_local.lookup_slx_int[ 435].bits = 0x4C600000;
-  gv_local.lookup_slx_int[ 436].nbits = 11; gv_local.lookup_slx_int[ 436].bits = 0x48A00000;
-  gv_local.lookup_slx_int[ 437].nbits = 11; gv_local.lookup_slx_int[ 437].bits = 0x42200000;
-  gv_local.lookup_slx_int[ 438].nbits = 11; gv_local.lookup_slx_int[ 438].bits = 0x42C00000;
-  gv_local.lookup_slx_int[ 439].nbits = 11; gv_local.lookup_slx_int[ 439].bits = 0x3E400000;
-  gv_local.lookup_slx_int[ 440].nbits = 11; gv_local.lookup_slx_int[ 440].bits = 0x3C400000;
-  gv_local.lookup_slx_int[ 441].nbits = 11; gv_local.lookup_slx_int[ 441].bits = 0x32A00000;
-  gv_local.lookup_slx_int[ 442].nbits = 11; gv_local.lookup_slx_int[ 442].bits = 0x29E00000;
-  gv_local.lookup_slx_int[ 443].nbits = 11; gv_local.lookup_slx_int[ 443].bits = 0x29C00000;
-  gv_local.lookup_slx_int[ 444].nbits = 11; gv_local.lookup_slx_int[ 444].bits = 0x29600000;
-  gv_local.lookup_slx_int[ 445].nbits = 11; gv_local.lookup_slx_int[ 445].bits = 0x27A00000;
-  gv_local.lookup_slx_int[ 446].nbits = 11; gv_local.lookup_slx_int[ 446].bits = 0x1A600000;
-  gv_local.lookup_slx_int[ 447].nbits = 11; gv_local.lookup_slx_int[ 447].bits = 0x1A400000;
-  gv_local.lookup_slx_int[ 448].nbits = 11; gv_local.lookup_slx_int[ 448].bits = 0x11000000;
-  gv_local.lookup_slx_int[ 449].nbits = 11; gv_local.lookup_slx_int[ 449].bits = 0x0D400000;
-  gv_local.lookup_slx_int[ 450].nbits = 11; gv_local.lookup_slx_int[ 450].bits = 0x09A00000;
-  gv_local.lookup_slx_int[ 451].nbits = 11; gv_local.lookup_slx_int[ 451].bits = 0x02E00000;
-  gv_local.lookup_slx_int[ 452].nbits = 12; gv_local.lookup_slx_int[ 452].bits = 0xDE800000;
-  gv_local.lookup_slx_int[ 453].nbits = 12; gv_local.lookup_slx_int[ 453].bits = 0xDB900000;
-  gv_local.lookup_slx_int[ 454].nbits = 12; gv_local.lookup_slx_int[ 454].bits = 0xDB800000;
-  gv_local.lookup_slx_int[ 455].nbits = 12; gv_local.lookup_slx_int[ 455].bits = 0xD3E00000;
-  gv_local.lookup_slx_int[ 456].nbits = 12; gv_local.lookup_slx_int[ 456].bits = 0xD3F00000;
-  gv_local.lookup_slx_int[ 457].nbits = 12; gv_local.lookup_slx_int[ 457].bits = 0xCFE00000;
-  gv_local.lookup_slx_int[ 458].nbits = 12; gv_local.lookup_slx_int[ 458].bits = 0xD2D00000;
-  gv_local.lookup_slx_int[ 459].nbits = 12; gv_local.lookup_slx_int[ 459].bits = 0xCF700000;
-  gv_local.lookup_slx_int[ 460].nbits = 12; gv_local.lookup_slx_int[ 460].bits = 0xCAF00000;
-  gv_local.lookup_slx_int[ 461].nbits = 12; gv_local.lookup_slx_int[ 461].bits = 0xCAE00000;
-  gv_local.lookup_slx_int[ 462].nbits = 12; gv_local.lookup_slx_int[ 462].bits = 0xC9500000;
-  gv_local.lookup_slx_int[ 463].nbits = 12; gv_local.lookup_slx_int[ 463].bits = 0xC1B00000;
-  gv_local.lookup_slx_int[ 464].nbits = 12; gv_local.lookup_slx_int[ 464].bits = 0xC0500000;
-  gv_local.lookup_slx_int[ 465].nbits = 12; gv_local.lookup_slx_int[ 465].bits = 0xC0400000;
-  gv_local.lookup_slx_int[ 466].nbits = 12; gv_local.lookup_slx_int[ 466].bits = 0xBDD00000;
-  gv_local.lookup_slx_int[ 467].nbits = 12; gv_local.lookup_slx_int[ 467].bits = 0xBD800000;
-  gv_local.lookup_slx_int[ 468].nbits = 12; gv_local.lookup_slx_int[ 468].bits = 0xB6800000;
-  gv_local.lookup_slx_int[ 469].nbits = 12; gv_local.lookup_slx_int[ 469].bits = 0xB6300000;
-  gv_local.lookup_slx_int[ 470].nbits = 12; gv_local.lookup_slx_int[ 470].bits = 0xB6200000;
-  gv_local.lookup_slx_int[ 471].nbits = 12; gv_local.lookup_slx_int[ 471].bits = 0xAF500000;
-  gv_local.lookup_slx_int[ 472].nbits = 12; gv_local.lookup_slx_int[ 472].bits = 0xA7D00000;
-  gv_local.lookup_slx_int[ 473].nbits = 12; gv_local.lookup_slx_int[ 473].bits = 0xA5F00000;
-  gv_local.lookup_slx_int[ 474].nbits = 12; gv_local.lookup_slx_int[ 474].bits = 0xA9400000;
-  gv_local.lookup_slx_int[ 475].nbits = 12; gv_local.lookup_slx_int[ 475].bits = 0xA4B00000;
-  gv_local.lookup_slx_int[ 476].nbits = 12; gv_local.lookup_slx_int[ 476].bits = 0xA3300000;
-  gv_local.lookup_slx_int[ 477].nbits = 12; gv_local.lookup_slx_int[ 477].bits = 0x9DD00000;
-  gv_local.lookup_slx_int[ 478].nbits = 12; gv_local.lookup_slx_int[ 478].bits = 0x9DC00000;
-  gv_local.lookup_slx_int[ 479].nbits = 12; gv_local.lookup_slx_int[ 479].bits = 0x95100000;
-  gv_local.lookup_slx_int[ 480].nbits = 12; gv_local.lookup_slx_int[ 480].bits = 0x91300000;
-  gv_local.lookup_slx_int[ 481].nbits = 12; gv_local.lookup_slx_int[ 481].bits = 0x91000000;
-  gv_local.lookup_slx_int[ 482].nbits = 12; gv_local.lookup_slx_int[ 482].bits = 0x91200000;
-  gv_local.lookup_slx_int[ 483].nbits = 12; gv_local.lookup_slx_int[ 483].bits = 0x87D00000;
-  gv_local.lookup_slx_int[ 484].nbits = 12; gv_local.lookup_slx_int[ 484].bits = 0x87C00000;
-  gv_local.lookup_slx_int[ 485].nbits = 12; gv_local.lookup_slx_int[ 485].bits = 0x86700000;
-  gv_local.lookup_slx_int[ 486].nbits = 12; gv_local.lookup_slx_int[ 486].bits = 0x7D900000;
-  gv_local.lookup_slx_int[ 487].nbits = 12; gv_local.lookup_slx_int[ 487].bits = 0x84900000;
-  gv_local.lookup_slx_int[ 488].nbits = 12; gv_local.lookup_slx_int[ 488].bits = 0x6F300000;
-  gv_local.lookup_slx_int[ 489].nbits = 12; gv_local.lookup_slx_int[ 489].bits = 0x6D700000;
-  gv_local.lookup_slx_int[ 490].nbits = 12; gv_local.lookup_slx_int[ 490].bits = 0x6D100000;
-  gv_local.lookup_slx_int[ 491].nbits = 12; gv_local.lookup_slx_int[ 491].bits = 0x6D600000;
-  gv_local.lookup_slx_int[ 492].nbits = 12; gv_local.lookup_slx_int[ 492].bits = 0x5BB00000;
-  gv_local.lookup_slx_int[ 493].nbits = 12; gv_local.lookup_slx_int[ 493].bits = 0x63500000;
-  gv_local.lookup_slx_int[ 494].nbits = 12; gv_local.lookup_slx_int[ 494].bits = 0x63400000;
-  gv_local.lookup_slx_int[ 495].nbits = 12; gv_local.lookup_slx_int[ 495].bits = 0x4C500000;
-  gv_local.lookup_slx_int[ 496].nbits = 12; gv_local.lookup_slx_int[ 496].bits = 0x58C00000;
-  gv_local.lookup_slx_int[ 497].nbits = 12; gv_local.lookup_slx_int[ 497].bits = 0x4F200000;
-  gv_local.lookup_slx_int[ 498].nbits = 12; gv_local.lookup_slx_int[ 498].bits = 0x48900000;
-  gv_local.lookup_slx_int[ 499].nbits = 12; gv_local.lookup_slx_int[ 499].bits = 0x48800000;
-  gv_local.lookup_slx_int[ 500].nbits = 12; gv_local.lookup_slx_int[ 500].bits = 0x3E700000;
-  gv_local.lookup_slx_int[ 501].nbits = 12; gv_local.lookup_slx_int[ 501].bits = 0x4C100000;
-  gv_local.lookup_slx_int[ 502].nbits = 12; gv_local.lookup_slx_int[ 502].bits = 0x3C100000;
-  gv_local.lookup_slx_int[ 503].nbits = 12; gv_local.lookup_slx_int[ 503].bits = 0x2B200000;
-  gv_local.lookup_slx_int[ 504].nbits = 12; gv_local.lookup_slx_int[ 504].bits = 0x3C300000;
-  gv_local.lookup_slx_int[ 505].nbits = 12; gv_local.lookup_slx_int[ 505].bits = 0x2B300000;
-  gv_local.lookup_slx_int[ 506].nbits = 12; gv_local.lookup_slx_int[ 506].bits = 0x2B000000;
-  gv_local.lookup_slx_int[ 507].nbits = 12; gv_local.lookup_slx_int[ 507].bits = 0x2B100000;
-  gv_local.lookup_slx_int[ 508].nbits = 12; gv_local.lookup_slx_int[ 508].bits = 0x29800000;
-  gv_local.lookup_slx_int[ 509].nbits = 12; gv_local.lookup_slx_int[ 509].bits = 0x21000000;
-  gv_local.lookup_slx_int[ 510].nbits = 12; gv_local.lookup_slx_int[ 510].bits = 0x21200000;
-  gv_local.lookup_slx_int[ 511].nbits =  3; gv_local.lookup_slx_int[ 511].bits = 0xE0000000;
-
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  /* reverse huffman lookup table
-   */
-  memset (gv_local.rlookup_slx_int, 0, sizeof(uint16_t)*REV_HUFF_TREESIZE_16);
-
-  for (i=0; i<INT_HUFF_TREESIZE; i++)
-  {
-    val = gv_local.lookup_slx_int[i].bits >> 16;
-    gv_local.rlookup_slx_int [val] = (uint16_t) i;
-    for (j=1; j<=(0xFFFF>>gv_local.lookup_slx_int[i].nbits); j++)
-      gv_local.rlookup_slx_int [val+j] = (uint16_t) i;
-  }
-#endif
-
-  _s_sort_lookup (gv_local.lookup_slx_int, gv_local.idx_slx_int, INT_HUFF_TREESIZE);
-
-  gv_local.lookup_slx_int_initialized = 1;
-}
-/*
- */
-static void _s_init_nse_slx_default (void)
-{
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  int      i, j;
-  uint16_t val;
-#endif
-
-  memset (gv_local.lookup_slx_nse,  0, sizeof(SRALookup)*NSE_HUFF_TREESIZE);
-
-  gv_local.lookup_slx_nse[   0].nbits = 11; gv_local.lookup_slx_nse[   0].bits = 0x6FE00000;
-  gv_local.lookup_slx_nse[   1].nbits = 11; gv_local.lookup_slx_nse[   1].bits = 0x7AC00000;
-  gv_local.lookup_slx_nse[   2].nbits = 11; gv_local.lookup_slx_nse[   2].bits = 0x6FC00000;
-  gv_local.lookup_slx_nse[   3].nbits = 11; gv_local.lookup_slx_nse[   3].bits = 0x7AE00000;
-  gv_local.lookup_slx_nse[   4].nbits = 11; gv_local.lookup_slx_nse[   4].bits = 0xC6A00000;
-  gv_local.lookup_slx_nse[   5].nbits = 11; gv_local.lookup_slx_nse[   5].bits = 0xDFC00000;
-  gv_local.lookup_slx_nse[   6].nbits = 11; gv_local.lookup_slx_nse[   6].bits = 0xD7200000;
-  gv_local.lookup_slx_nse[   7].nbits = 11; gv_local.lookup_slx_nse[   7].bits = 0xE4E00000;
-  gv_local.lookup_slx_nse[   8].nbits = 11; gv_local.lookup_slx_nse[   8].bits = 0xDA000000;
-  gv_local.lookup_slx_nse[   9].nbits = 11; gv_local.lookup_slx_nse[   9].bits = 0xD0000000;
-  gv_local.lookup_slx_nse[  10].nbits = 11; gv_local.lookup_slx_nse[  10].bits = 0xE8000000;
-  gv_local.lookup_slx_nse[  11].nbits = 11; gv_local.lookup_slx_nse[  11].bits = 0xCE400000;
-  gv_local.lookup_slx_nse[  12].nbits = 11; gv_local.lookup_slx_nse[  12].bits = 0xD7000000;
-  gv_local.lookup_slx_nse[  13].nbits = 11; gv_local.lookup_slx_nse[  13].bits = 0xD5000000;
-  gv_local.lookup_slx_nse[  14].nbits = 11; gv_local.lookup_slx_nse[  14].bits = 0xDDE00000;
-  gv_local.lookup_slx_nse[  15].nbits = 11; gv_local.lookup_slx_nse[  15].bits = 0xF2C00000;
-  gv_local.lookup_slx_nse[  16].nbits = 11; gv_local.lookup_slx_nse[  16].bits = 0xF6600000;
-  gv_local.lookup_slx_nse[  17].nbits = 11; gv_local.lookup_slx_nse[  17].bits = 0xEE400000;
-  gv_local.lookup_slx_nse[  18].nbits = 11; gv_local.lookup_slx_nse[  18].bits = 0xE4C00000;
-  gv_local.lookup_slx_nse[  19].nbits = 10; gv_local.lookup_slx_nse[  19].bits = 0x0F000000;
-  gv_local.lookup_slx_nse[  20].nbits = 11; gv_local.lookup_slx_nse[  20].bits = 0xEBC00000;
-  gv_local.lookup_slx_nse[  21].nbits = 11; gv_local.lookup_slx_nse[  21].bits = 0xF7E00000;
-  gv_local.lookup_slx_nse[  22].nbits = 11; gv_local.lookup_slx_nse[  22].bits = 0xF7C00000;
-  gv_local.lookup_slx_nse[  23].nbits = 10; gv_local.lookup_slx_nse[  23].bits = 0x18000000;
-  gv_local.lookup_slx_nse[  24].nbits = 10; gv_local.lookup_slx_nse[  24].bits = 0x22800000;
-  gv_local.lookup_slx_nse[  25].nbits = 10; gv_local.lookup_slx_nse[  25].bits = 0x0A000000;
-  gv_local.lookup_slx_nse[  26].nbits = 10; gv_local.lookup_slx_nse[  26].bits = 0x0F400000;
-  gv_local.lookup_slx_nse[  27].nbits = 10; gv_local.lookup_slx_nse[  27].bits = 0x18400000;
-  gv_local.lookup_slx_nse[  28].nbits = 10; gv_local.lookup_slx_nse[  28].bits = 0x1D800000;
-  gv_local.lookup_slx_nse[  29].nbits = 10; gv_local.lookup_slx_nse[  29].bits = 0x3CC00000;
-  gv_local.lookup_slx_nse[  30].nbits = 10; gv_local.lookup_slx_nse[  30].bits = 0x46C00000;
-  gv_local.lookup_slx_nse[  31].nbits = 10; gv_local.lookup_slx_nse[  31].bits = 0x1DC00000;
-  gv_local.lookup_slx_nse[  32].nbits = 10; gv_local.lookup_slx_nse[  32].bits = 0x42C00000;
-  gv_local.lookup_slx_nse[  33].nbits = 10; gv_local.lookup_slx_nse[  33].bits = 0x3F800000;
-  gv_local.lookup_slx_nse[  34].nbits = 10; gv_local.lookup_slx_nse[  34].bits = 0x3FC00000;
-  gv_local.lookup_slx_nse[  35].nbits = 10; gv_local.lookup_slx_nse[  35].bits = 0x4B800000;
-  gv_local.lookup_slx_nse[  36].nbits = 10; gv_local.lookup_slx_nse[  36].bits = 0x4BC00000;
-  gv_local.lookup_slx_nse[  37].nbits = 10; gv_local.lookup_slx_nse[  37].bits = 0x27C00000;
-  gv_local.lookup_slx_nse[  38].nbits = 10; gv_local.lookup_slx_nse[  38].bits = 0x46400000;
-  gv_local.lookup_slx_nse[  39].nbits = 10; gv_local.lookup_slx_nse[  39].bits = 0x52000000;
-  gv_local.lookup_slx_nse[  40].nbits = 10; gv_local.lookup_slx_nse[  40].bits = 0x58400000;
-  gv_local.lookup_slx_nse[  41].nbits = 10; gv_local.lookup_slx_nse[  41].bits = 0x50800000;
-  gv_local.lookup_slx_nse[  42].nbits = 10; gv_local.lookup_slx_nse[  42].bits = 0x56800000;
-  gv_local.lookup_slx_nse[  43].nbits = 10; gv_local.lookup_slx_nse[  43].bits = 0x56000000;
-  gv_local.lookup_slx_nse[  44].nbits = 10; gv_local.lookup_slx_nse[  44].bits = 0x57000000;
-  gv_local.lookup_slx_nse[  45].nbits = 10; gv_local.lookup_slx_nse[  45].bits = 0x62400000;
-  gv_local.lookup_slx_nse[  46].nbits = 10; gv_local.lookup_slx_nse[  46].bits = 0x56C00000;
-  gv_local.lookup_slx_nse[  47].nbits = 10; gv_local.lookup_slx_nse[  47].bits = 0x57400000;
-  gv_local.lookup_slx_nse[  48].nbits = 10; gv_local.lookup_slx_nse[  48].bits = 0x63800000;
-  gv_local.lookup_slx_nse[  49].nbits = 10; gv_local.lookup_slx_nse[  49].bits = 0x62000000;
-  gv_local.lookup_slx_nse[  50].nbits = 10; gv_local.lookup_slx_nse[  50].bits = 0x5C000000;
-  gv_local.lookup_slx_nse[  51].nbits = 10; gv_local.lookup_slx_nse[  51].bits = 0x60800000;
-  gv_local.lookup_slx_nse[  52].nbits = 10; gv_local.lookup_slx_nse[  52].bits = 0x6B000000;
-  gv_local.lookup_slx_nse[  53].nbits = 10; gv_local.lookup_slx_nse[  53].bits = 0x6B400000;
-  gv_local.lookup_slx_nse[  54].nbits = 10; gv_local.lookup_slx_nse[  54].bits = 0x67C00000;
-  gv_local.lookup_slx_nse[  55].nbits = 10; gv_local.lookup_slx_nse[  55].bits = 0x66400000;
-  gv_local.lookup_slx_nse[  56].nbits = 10; gv_local.lookup_slx_nse[  56].bits = 0x6A400000;
-  gv_local.lookup_slx_nse[  57].nbits = 10; gv_local.lookup_slx_nse[  57].bits = 0x6F800000;
-  gv_local.lookup_slx_nse[  58].nbits = 10; gv_local.lookup_slx_nse[  58].bits = 0x77000000;
-  gv_local.lookup_slx_nse[  59].nbits = 10; gv_local.lookup_slx_nse[  59].bits = 0x76400000;
-  gv_local.lookup_slx_nse[  60].nbits = 10; gv_local.lookup_slx_nse[  60].bits = 0x69800000;
-  gv_local.lookup_slx_nse[  61].nbits = 10; gv_local.lookup_slx_nse[  61].bits = 0x70000000;
-  gv_local.lookup_slx_nse[  62].nbits = 10; gv_local.lookup_slx_nse[  62].bits = 0x6A000000;
-  gv_local.lookup_slx_nse[  63].nbits = 10; gv_local.lookup_slx_nse[  63].bits = 0x76000000;
-  gv_local.lookup_slx_nse[  64].nbits = 10; gv_local.lookup_slx_nse[  64].bits = 0x79400000;
-  gv_local.lookup_slx_nse[  65].nbits = 10; gv_local.lookup_slx_nse[  65].bits = 0x7CC00000;
-  gv_local.lookup_slx_nse[  66].nbits = 10; gv_local.lookup_slx_nse[  66].bits = 0x74800000;
-  gv_local.lookup_slx_nse[  67].nbits = 10; gv_local.lookup_slx_nse[  67].bits = 0x78C00000;
-  gv_local.lookup_slx_nse[  68].nbits = 10; gv_local.lookup_slx_nse[  68].bits = 0x7B000000;
-  gv_local.lookup_slx_nse[  69].nbits = 10; gv_local.lookup_slx_nse[  69].bits = 0x6C000000;
-  gv_local.lookup_slx_nse[  70].nbits = 10; gv_local.lookup_slx_nse[  70].bits = 0xC2000000;
-  gv_local.lookup_slx_nse[  71].nbits = 10; gv_local.lookup_slx_nse[  71].bits = 0x79000000;
-  gv_local.lookup_slx_nse[  72].nbits = 10; gv_local.lookup_slx_nse[  72].bits = 0x77800000;
-  gv_local.lookup_slx_nse[  73].nbits = 10; gv_local.lookup_slx_nse[  73].bits = 0xC4C00000;
-  gv_local.lookup_slx_nse[  74].nbits = 10; gv_local.lookup_slx_nse[  74].bits = 0x78800000;
-  gv_local.lookup_slx_nse[  75].nbits = 10; gv_local.lookup_slx_nse[  75].bits = 0x7C400000;
-  gv_local.lookup_slx_nse[  76].nbits = 10; gv_local.lookup_slx_nse[  76].bits = 0xC7C00000;
-  gv_local.lookup_slx_nse[  77].nbits = 10; gv_local.lookup_slx_nse[  77].bits = 0x7A800000;
-  gv_local.lookup_slx_nse[  78].nbits = 10; gv_local.lookup_slx_nse[  78].bits = 0xC1400000;
-  gv_local.lookup_slx_nse[  79].nbits = 10; gv_local.lookup_slx_nse[  79].bits = 0x7F400000;
-  gv_local.lookup_slx_nse[  80].nbits = 10; gv_local.lookup_slx_nse[  80].bits = 0xC9C00000;
-  gv_local.lookup_slx_nse[  81].nbits = 10; gv_local.lookup_slx_nse[  81].bits = 0xCC800000;
-  gv_local.lookup_slx_nse[  82].nbits = 10; gv_local.lookup_slx_nse[  82].bits = 0xC6C00000;
-  gv_local.lookup_slx_nse[  83].nbits = 10; gv_local.lookup_slx_nse[  83].bits = 0xC0C00000;
-  gv_local.lookup_slx_nse[  84].nbits = 10; gv_local.lookup_slx_nse[  84].bits = 0xC9000000;
-  gv_local.lookup_slx_nse[  85].nbits = 10; gv_local.lookup_slx_nse[  85].bits = 0xD2800000;
-  gv_local.lookup_slx_nse[  86].nbits = 10; gv_local.lookup_slx_nse[  86].bits = 0xD0C00000;
-  gv_local.lookup_slx_nse[  87].nbits = 10; gv_local.lookup_slx_nse[  87].bits = 0xC6400000;
-  gv_local.lookup_slx_nse[  88].nbits = 10; gv_local.lookup_slx_nse[  88].bits = 0xC1800000;
-  gv_local.lookup_slx_nse[  89].nbits = 10; gv_local.lookup_slx_nse[  89].bits = 0xCE000000;
-  gv_local.lookup_slx_nse[  90].nbits = 10; gv_local.lookup_slx_nse[  90].bits = 0xC3800000;
-  gv_local.lookup_slx_nse[  91].nbits = 10; gv_local.lookup_slx_nse[  91].bits = 0xCD400000;
-  gv_local.lookup_slx_nse[  92].nbits = 10; gv_local.lookup_slx_nse[  92].bits = 0xD3000000;
-  gv_local.lookup_slx_nse[  93].nbits = 10; gv_local.lookup_slx_nse[  93].bits = 0xD7800000;
-  gv_local.lookup_slx_nse[  94].nbits = 10; gv_local.lookup_slx_nse[  94].bits = 0xD8800000;
-  gv_local.lookup_slx_nse[  95].nbits = 10; gv_local.lookup_slx_nse[  95].bits = 0xCB400000;
-  gv_local.lookup_slx_nse[  96].nbits = 10; gv_local.lookup_slx_nse[  96].bits = 0xCE800000;
-  gv_local.lookup_slx_nse[  97].nbits = 10; gv_local.lookup_slx_nse[  97].bits = 0xCB800000;
-  gv_local.lookup_slx_nse[  98].nbits = 10; gv_local.lookup_slx_nse[  98].bits = 0xE1400000;
-  gv_local.lookup_slx_nse[  99].nbits = 10; gv_local.lookup_slx_nse[  99].bits = 0xD8400000;
-  gv_local.lookup_slx_nse[ 100].nbits = 10; gv_local.lookup_slx_nse[ 100].bits = 0xE1800000;
-  gv_local.lookup_slx_nse[ 101].nbits = 10; gv_local.lookup_slx_nse[ 101].bits = 0xDD400000;
-  gv_local.lookup_slx_nse[ 102].nbits = 10; gv_local.lookup_slx_nse[ 102].bits = 0xDF400000;
-  gv_local.lookup_slx_nse[ 103].nbits = 10; gv_local.lookup_slx_nse[ 103].bits = 0xCEC00000;
-  gv_local.lookup_slx_nse[ 104].nbits = 10; gv_local.lookup_slx_nse[ 104].bits = 0xDA800000;
-  gv_local.lookup_slx_nse[ 105].nbits = 10; gv_local.lookup_slx_nse[ 105].bits = 0xD7C00000;
-  gv_local.lookup_slx_nse[ 106].nbits = 10; gv_local.lookup_slx_nse[ 106].bits = 0xE3800000;
-  gv_local.lookup_slx_nse[ 107].nbits = 10; gv_local.lookup_slx_nse[ 107].bits = 0xDB000000;
-  gv_local.lookup_slx_nse[ 108].nbits = 10; gv_local.lookup_slx_nse[ 108].bits = 0xE0400000;
-  gv_local.lookup_slx_nse[ 109].nbits = 10; gv_local.lookup_slx_nse[ 109].bits = 0xE3C00000;
-  gv_local.lookup_slx_nse[ 110].nbits = 10; gv_local.lookup_slx_nse[ 110].bits = 0xDF800000;
-  gv_local.lookup_slx_nse[ 111].nbits = 10; gv_local.lookup_slx_nse[ 111].bits = 0xD9800000;
-  gv_local.lookup_slx_nse[ 112].nbits = 10; gv_local.lookup_slx_nse[ 112].bits = 0xDE000000;
-  gv_local.lookup_slx_nse[ 113].nbits = 10; gv_local.lookup_slx_nse[ 113].bits = 0xE5800000;
-  gv_local.lookup_slx_nse[ 114].nbits = 10; gv_local.lookup_slx_nse[ 114].bits = 0xD2C00000;
-  gv_local.lookup_slx_nse[ 115].nbits = 10; gv_local.lookup_slx_nse[ 115].bits = 0xED400000;
-  gv_local.lookup_slx_nse[ 116].nbits = 10; gv_local.lookup_slx_nse[ 116].bits = 0xE7C00000;
-  gv_local.lookup_slx_nse[ 117].nbits = 10; gv_local.lookup_slx_nse[ 117].bits = 0xD3800000;
-  gv_local.lookup_slx_nse[ 118].nbits = 10; gv_local.lookup_slx_nse[ 118].bits = 0xE9800000;
-  gv_local.lookup_slx_nse[ 119].nbits = 10; gv_local.lookup_slx_nse[ 119].bits = 0xDBC00000;
-  gv_local.lookup_slx_nse[ 120].nbits = 10; gv_local.lookup_slx_nse[ 120].bits = 0xEC800000;
-  gv_local.lookup_slx_nse[ 121].nbits = 10; gv_local.lookup_slx_nse[ 121].bits = 0xED000000;
-  gv_local.lookup_slx_nse[ 122].nbits = 10; gv_local.lookup_slx_nse[ 122].bits = 0xEF800000;
-  gv_local.lookup_slx_nse[ 123].nbits = 10; gv_local.lookup_slx_nse[ 123].bits = 0xEC000000;
-  gv_local.lookup_slx_nse[ 124].nbits = 10; gv_local.lookup_slx_nse[ 124].bits = 0xF0400000;
-  gv_local.lookup_slx_nse[ 125].nbits = 10; gv_local.lookup_slx_nse[ 125].bits = 0xE1000000;
-  gv_local.lookup_slx_nse[ 126].nbits = 10; gv_local.lookup_slx_nse[ 126].bits = 0xEE000000;
-  gv_local.lookup_slx_nse[ 127].nbits = 10; gv_local.lookup_slx_nse[ 127].bits = 0xEAC00000;
-  gv_local.lookup_slx_nse[ 128].nbits = 10; gv_local.lookup_slx_nse[ 128].bits = 0xF8800000;
-  gv_local.lookup_slx_nse[ 129].nbits = 10; gv_local.lookup_slx_nse[ 129].bits = 0xE6800000;
-  gv_local.lookup_slx_nse[ 130].nbits = 10; gv_local.lookup_slx_nse[ 130].bits = 0xE6C00000;
-  gv_local.lookup_slx_nse[ 131].nbits = 10; gv_local.lookup_slx_nse[ 131].bits = 0xEB800000;
-  gv_local.lookup_slx_nse[ 132].nbits = 10; gv_local.lookup_slx_nse[ 132].bits = 0xECC00000;
-  gv_local.lookup_slx_nse[ 133].nbits = 10; gv_local.lookup_slx_nse[ 133].bits = 0xF2400000;
-  gv_local.lookup_slx_nse[ 134].nbits = 10; gv_local.lookup_slx_nse[ 134].bits = 0xF0000000;
-  gv_local.lookup_slx_nse[ 135].nbits = 10; gv_local.lookup_slx_nse[ 135].bits = 0xF5C00000;
-  gv_local.lookup_slx_nse[ 136].nbits = 10; gv_local.lookup_slx_nse[ 136].bits = 0xF7000000;
-  gv_local.lookup_slx_nse[ 137].nbits = 10; gv_local.lookup_slx_nse[ 137].bits = 0xEDC00000;
-  gv_local.lookup_slx_nse[ 138].nbits = 10; gv_local.lookup_slx_nse[ 138].bits = 0xF2800000;
-  gv_local.lookup_slx_nse[ 139].nbits = 10; gv_local.lookup_slx_nse[ 139].bits = 0xE9000000;
-  gv_local.lookup_slx_nse[ 140].nbits = 10; gv_local.lookup_slx_nse[ 140].bits = 0xF9400000;
-  gv_local.lookup_slx_nse[ 141].nbits = 10; gv_local.lookup_slx_nse[ 141].bits = 0xFF400000;
-  gv_local.lookup_slx_nse[ 142].nbits = 10; gv_local.lookup_slx_nse[ 142].bits = 0xFA800000;
-  gv_local.lookup_slx_nse[ 143].nbits = 10; gv_local.lookup_slx_nse[ 143].bits = 0xF8400000;
-  gv_local.lookup_slx_nse[ 144].nbits = 10; gv_local.lookup_slx_nse[ 144].bits = 0xEFC00000;
-  gv_local.lookup_slx_nse[ 145].nbits = 10; gv_local.lookup_slx_nse[ 145].bits = 0xEF400000;
-  gv_local.lookup_slx_nse[ 146].nbits = 10; gv_local.lookup_slx_nse[ 146].bits = 0xF9000000;
-  gv_local.lookup_slx_nse[ 147].nbits =  9; gv_local.lookup_slx_nse[ 147].bits = 0x07000000;
-  gv_local.lookup_slx_nse[ 148].nbits = 10; gv_local.lookup_slx_nse[ 148].bits = 0xF7800000;
-  gv_local.lookup_slx_nse[ 149].nbits = 10; gv_local.lookup_slx_nse[ 149].bits = 0xFF000000;
-  gv_local.lookup_slx_nse[ 150].nbits =  9; gv_local.lookup_slx_nse[ 150].bits = 0x04800000;
-  gv_local.lookup_slx_nse[ 151].nbits =  9; gv_local.lookup_slx_nse[ 151].bits = 0x08800000;
-  gv_local.lookup_slx_nse[ 152].nbits = 10; gv_local.lookup_slx_nse[ 152].bits = 0xFEC00000;
-  gv_local.lookup_slx_nse[ 153].nbits = 10; gv_local.lookup_slx_nse[ 153].bits = 0xFC000000;
-  gv_local.lookup_slx_nse[ 154].nbits =  9; gv_local.lookup_slx_nse[ 154].bits = 0x16000000;
-  gv_local.lookup_slx_nse[ 155].nbits = 10; gv_local.lookup_slx_nse[ 155].bits = 0xFB400000;
-  gv_local.lookup_slx_nse[ 156].nbits =  9; gv_local.lookup_slx_nse[ 156].bits = 0x01000000;
-  gv_local.lookup_slx_nse[ 157].nbits =  9; gv_local.lookup_slx_nse[ 157].bits = 0x08000000;
-  gv_local.lookup_slx_nse[ 158].nbits =  9; gv_local.lookup_slx_nse[ 158].bits = 0x18800000;
-  gv_local.lookup_slx_nse[ 159].nbits =  9; gv_local.lookup_slx_nse[ 159].bits = 0x0C000000;
-  gv_local.lookup_slx_nse[ 160].nbits =  9; gv_local.lookup_slx_nse[ 160].bits = 0x10800000;
-  gv_local.lookup_slx_nse[ 161].nbits =  9; gv_local.lookup_slx_nse[ 161].bits = 0x15000000;
-  gv_local.lookup_slx_nse[ 162].nbits =  9; gv_local.lookup_slx_nse[ 162].bits = 0x0A800000;
-  gv_local.lookup_slx_nse[ 163].nbits =  9; gv_local.lookup_slx_nse[ 163].bits = 0x04000000;
-  gv_local.lookup_slx_nse[ 164].nbits =  9; gv_local.lookup_slx_nse[ 164].bits = 0x22000000;
-  gv_local.lookup_slx_nse[ 165].nbits =  9; gv_local.lookup_slx_nse[ 165].bits = 0x17000000;
-  gv_local.lookup_slx_nse[ 166].nbits =  9; gv_local.lookup_slx_nse[ 166].bits = 0x1E800000;
-  gv_local.lookup_slx_nse[ 167].nbits =  9; gv_local.lookup_slx_nse[ 167].bits = 0x26000000;
-  gv_local.lookup_slx_nse[ 168].nbits =  9; gv_local.lookup_slx_nse[ 168].bits = 0x0D800000;
-  gv_local.lookup_slx_nse[ 169].nbits =  9; gv_local.lookup_slx_nse[ 169].bits = 0x10000000;
-  gv_local.lookup_slx_nse[ 170].nbits =  9; gv_local.lookup_slx_nse[ 170].bits = 0x31800000;
-  gv_local.lookup_slx_nse[ 171].nbits =  9; gv_local.lookup_slx_nse[ 171].bits = 0x29000000;
-  gv_local.lookup_slx_nse[ 172].nbits =  9; gv_local.lookup_slx_nse[ 172].bits = 0x15800000;
-  gv_local.lookup_slx_nse[ 173].nbits =  9; gv_local.lookup_slx_nse[ 173].bits = 0x29800000;
-  gv_local.lookup_slx_nse[ 174].nbits =  9; gv_local.lookup_slx_nse[ 174].bits = 0x26800000;
-  gv_local.lookup_slx_nse[ 175].nbits =  9; gv_local.lookup_slx_nse[ 175].bits = 0x1F800000;
-  gv_local.lookup_slx_nse[ 176].nbits =  9; gv_local.lookup_slx_nse[ 176].bits = 0x2E800000;
-  gv_local.lookup_slx_nse[ 177].nbits =  9; gv_local.lookup_slx_nse[ 177].bits = 0x3E000000;
-  gv_local.lookup_slx_nse[ 178].nbits =  9; gv_local.lookup_slx_nse[ 178].bits = 0x1F000000;
-  gv_local.lookup_slx_nse[ 179].nbits =  9; gv_local.lookup_slx_nse[ 179].bits = 0x34000000;
-  gv_local.lookup_slx_nse[ 180].nbits =  9; gv_local.lookup_slx_nse[ 180].bits = 0x2E000000;
-  gv_local.lookup_slx_nse[ 181].nbits =  9; gv_local.lookup_slx_nse[ 181].bits = 0x40800000;
-  gv_local.lookup_slx_nse[ 182].nbits =  9; gv_local.lookup_slx_nse[ 182].bits = 0x28000000;
-  gv_local.lookup_slx_nse[ 183].nbits =  9; gv_local.lookup_slx_nse[ 183].bits = 0x49800000;
-  gv_local.lookup_slx_nse[ 184].nbits =  9; gv_local.lookup_slx_nse[ 184].bits = 0x4A000000;
-  gv_local.lookup_slx_nse[ 185].nbits =  9; gv_local.lookup_slx_nse[ 185].bits = 0x4A800000;
-  gv_local.lookup_slx_nse[ 186].nbits =  9; gv_local.lookup_slx_nse[ 186].bits = 0x45000000;
-  gv_local.lookup_slx_nse[ 187].nbits =  9; gv_local.lookup_slx_nse[ 187].bits = 0x51000000;
-  gv_local.lookup_slx_nse[ 188].nbits =  9; gv_local.lookup_slx_nse[ 188].bits = 0x48000000;
-  gv_local.lookup_slx_nse[ 189].nbits =  9; gv_local.lookup_slx_nse[ 189].bits = 0x49000000;
-  gv_local.lookup_slx_nse[ 190].nbits =  9; gv_local.lookup_slx_nse[ 190].bits = 0x4E000000;
-  gv_local.lookup_slx_nse[ 191].nbits =  9; gv_local.lookup_slx_nse[ 191].bits = 0x4E800000;
-  gv_local.lookup_slx_nse[ 192].nbits =  9; gv_local.lookup_slx_nse[ 192].bits = 0x53000000;
-  gv_local.lookup_slx_nse[ 193].nbits =  9; gv_local.lookup_slx_nse[ 193].bits = 0x4C800000;
-  gv_local.lookup_slx_nse[ 194].nbits =  9; gv_local.lookup_slx_nse[ 194].bits = 0x57800000;
-  gv_local.lookup_slx_nse[ 195].nbits =  9; gv_local.lookup_slx_nse[ 195].bits = 0x4F800000;
-  gv_local.lookup_slx_nse[ 196].nbits =  9; gv_local.lookup_slx_nse[ 196].bits = 0x54800000;
-  gv_local.lookup_slx_nse[ 197].nbits =  9; gv_local.lookup_slx_nse[ 197].bits = 0x52800000;
-  gv_local.lookup_slx_nse[ 198].nbits =  9; gv_local.lookup_slx_nse[ 198].bits = 0x59800000;
-  gv_local.lookup_slx_nse[ 199].nbits =  9; gv_local.lookup_slx_nse[ 199].bits = 0x5A000000;
-  gv_local.lookup_slx_nse[ 200].nbits =  9; gv_local.lookup_slx_nse[ 200].bits = 0x58800000;
-  gv_local.lookup_slx_nse[ 201].nbits =  9; gv_local.lookup_slx_nse[ 201].bits = 0x5E000000;
-  gv_local.lookup_slx_nse[ 202].nbits =  9; gv_local.lookup_slx_nse[ 202].bits = 0x5E800000;
-  gv_local.lookup_slx_nse[ 203].nbits =  9; gv_local.lookup_slx_nse[ 203].bits = 0x61800000;
-  gv_local.lookup_slx_nse[ 204].nbits =  9; gv_local.lookup_slx_nse[ 204].bits = 0x6A800000;
-  gv_local.lookup_slx_nse[ 205].nbits =  9; gv_local.lookup_slx_nse[ 205].bits = 0x65800000;
-  gv_local.lookup_slx_nse[ 206].nbits =  9; gv_local.lookup_slx_nse[ 206].bits = 0x68000000;
-  gv_local.lookup_slx_nse[ 207].nbits =  9; gv_local.lookup_slx_nse[ 207].bits = 0x64000000;
-  gv_local.lookup_slx_nse[ 208].nbits =  9; gv_local.lookup_slx_nse[ 208].bits = 0x5D800000;
-  gv_local.lookup_slx_nse[ 209].nbits =  9; gv_local.lookup_slx_nse[ 209].bits = 0x6F000000;
-  gv_local.lookup_slx_nse[ 210].nbits =  9; gv_local.lookup_slx_nse[ 210].bits = 0x6D000000;
-  gv_local.lookup_slx_nse[ 211].nbits =  9; gv_local.lookup_slx_nse[ 211].bits = 0x6D800000;
-  gv_local.lookup_slx_nse[ 212].nbits =  9; gv_local.lookup_slx_nse[ 212].bits = 0x71000000;
-  gv_local.lookup_slx_nse[ 213].nbits =  9; gv_local.lookup_slx_nse[ 213].bits = 0x76800000;
-  gv_local.lookup_slx_nse[ 214].nbits =  9; gv_local.lookup_slx_nse[ 214].bits = 0x74000000;
-  gv_local.lookup_slx_nse[ 215].nbits =  9; gv_local.lookup_slx_nse[ 215].bits = 0x72000000;
-  gv_local.lookup_slx_nse[ 216].nbits =  9; gv_local.lookup_slx_nse[ 216].bits = 0x78000000;
-  gv_local.lookup_slx_nse[ 217].nbits =  9; gv_local.lookup_slx_nse[ 217].bits = 0x7D800000;
-  gv_local.lookup_slx_nse[ 218].nbits =  9; gv_local.lookup_slx_nse[ 218].bits = 0x7E800000;
-  gv_local.lookup_slx_nse[ 219].nbits =  9; gv_local.lookup_slx_nse[ 219].bits = 0xC2800000;
-  gv_local.lookup_slx_nse[ 220].nbits =  9; gv_local.lookup_slx_nse[ 220].bits = 0x7D000000;
-  gv_local.lookup_slx_nse[ 221].nbits =  9; gv_local.lookup_slx_nse[ 221].bits = 0xC4000000;
-  gv_local.lookup_slx_nse[ 222].nbits =  9; gv_local.lookup_slx_nse[ 222].bits = 0xC3000000;
-  gv_local.lookup_slx_nse[ 223].nbits =  9; gv_local.lookup_slx_nse[ 223].bits = 0xCD800000;
-  gv_local.lookup_slx_nse[ 224].nbits =  9; gv_local.lookup_slx_nse[ 224].bits = 0xE2000000;
-  gv_local.lookup_slx_nse[ 225].nbits =  9; gv_local.lookup_slx_nse[ 225].bits = 0xD4000000;
-  gv_local.lookup_slx_nse[ 226].nbits =  9; gv_local.lookup_slx_nse[ 226].bits = 0xDC800000;
-  gv_local.lookup_slx_nse[ 227].nbits =  9; gv_local.lookup_slx_nse[ 227].bits = 0xD6000000;
-  gv_local.lookup_slx_nse[ 228].nbits =  9; gv_local.lookup_slx_nse[ 228].bits = 0xDE800000;
-  gv_local.lookup_slx_nse[ 229].nbits =  9; gv_local.lookup_slx_nse[ 229].bits = 0xE2800000;
-  gv_local.lookup_slx_nse[ 230].nbits =  9; gv_local.lookup_slx_nse[ 230].bits = 0xE0800000;
-  gv_local.lookup_slx_nse[ 231].nbits =  9; gv_local.lookup_slx_nse[ 231].bits = 0xE7000000;
-  gv_local.lookup_slx_nse[ 232].nbits =  9; gv_local.lookup_slx_nse[ 232].bits = 0xEB000000;
-  gv_local.lookup_slx_nse[ 233].nbits =  9; gv_local.lookup_slx_nse[ 233].bits = 0xF3000000;
-  gv_local.lookup_slx_nse[ 234].nbits =  9; gv_local.lookup_slx_nse[ 234].bits = 0xF5000000;
-  gv_local.lookup_slx_nse[ 235].nbits =  9; gv_local.lookup_slx_nse[ 235].bits = 0xF0800000;
-  gv_local.lookup_slx_nse[ 236].nbits =  9; gv_local.lookup_slx_nse[ 236].bits = 0xFA000000;
-  gv_local.lookup_slx_nse[ 237].nbits =  9; gv_local.lookup_slx_nse[ 237].bits = 0xF4000000;
-  gv_local.lookup_slx_nse[ 238].nbits =  9; gv_local.lookup_slx_nse[ 238].bits = 0xFF800000;
-  gv_local.lookup_slx_nse[ 239].nbits =  9; gv_local.lookup_slx_nse[ 239].bits = 0xFC800000;
-  gv_local.lookup_slx_nse[ 240].nbits =  8; gv_local.lookup_slx_nse[ 240].bits = 0x03000000;
-  gv_local.lookup_slx_nse[ 241].nbits =  8; gv_local.lookup_slx_nse[ 241].bits = 0x0E000000;
-  gv_local.lookup_slx_nse[ 242].nbits =  8; gv_local.lookup_slx_nse[ 242].bits = 0x11000000;
-  gv_local.lookup_slx_nse[ 243].nbits =  8; gv_local.lookup_slx_nse[ 243].bits = 0x1B000000;
-  gv_local.lookup_slx_nse[ 244].nbits =  8; gv_local.lookup_slx_nse[ 244].bits = 0x1A000000;
-  gv_local.lookup_slx_nse[ 245].nbits =  8; gv_local.lookup_slx_nse[ 245].bits = 0x19000000;
-  gv_local.lookup_slx_nse[ 246].nbits =  8; gv_local.lookup_slx_nse[ 246].bits = 0x2C000000;
-  gv_local.lookup_slx_nse[ 247].nbits =  8; gv_local.lookup_slx_nse[ 247].bits = 0x35000000;
-  gv_local.lookup_slx_nse[ 248].nbits =  8; gv_local.lookup_slx_nse[ 248].bits = 0x37000000;
-  gv_local.lookup_slx_nse[ 249].nbits =  8; gv_local.lookup_slx_nse[ 249].bits = 0x32000000;
-  gv_local.lookup_slx_nse[ 250].nbits =  8; gv_local.lookup_slx_nse[ 250].bits = 0x39000000;
-  gv_local.lookup_slx_nse[ 251].nbits =  8; gv_local.lookup_slx_nse[ 251].bits = 0x47000000;
-  gv_local.lookup_slx_nse[ 252].nbits =  8; gv_local.lookup_slx_nse[ 252].bits = 0x2F000000;
-  gv_local.lookup_slx_nse[ 253].nbits =  8; gv_local.lookup_slx_nse[ 253].bits = 0x3D000000;
-  gv_local.lookup_slx_nse[ 254].nbits =  8; gv_local.lookup_slx_nse[ 254].bits = 0x21000000;
-  gv_local.lookup_slx_nse[ 255].nbits =  8; gv_local.lookup_slx_nse[ 255].bits = 0xD1000000;
-  gv_local.lookup_slx_nse[ 256].nbits =  8; gv_local.lookup_slx_nse[ 256].bits = 0x25000000;
-  gv_local.lookup_slx_nse[ 257].nbits =  8; gv_local.lookup_slx_nse[ 257].bits = 0x2D000000;
-  gv_local.lookup_slx_nse[ 258].nbits =  8; gv_local.lookup_slx_nse[ 258].bits = 0x30000000;
-  gv_local.lookup_slx_nse[ 259].nbits =  8; gv_local.lookup_slx_nse[ 259].bits = 0x36000000;
-  gv_local.lookup_slx_nse[ 260].nbits =  8; gv_local.lookup_slx_nse[ 260].bits = 0x33000000;
-  gv_local.lookup_slx_nse[ 261].nbits =  8; gv_local.lookup_slx_nse[ 261].bits = 0x41000000;
-  gv_local.lookup_slx_nse[ 262].nbits =  8; gv_local.lookup_slx_nse[ 262].bits = 0x2B000000;
-  gv_local.lookup_slx_nse[ 263].nbits =  8; gv_local.lookup_slx_nse[ 263].bits = 0x43000000;
-  gv_local.lookup_slx_nse[ 264].nbits =  8; gv_local.lookup_slx_nse[ 264].bits = 0x3B000000;
-  gv_local.lookup_slx_nse[ 265].nbits =  8; gv_local.lookup_slx_nse[ 265].bits = 0x2A000000;
-  gv_local.lookup_slx_nse[ 266].nbits =  8; gv_local.lookup_slx_nse[ 266].bits = 0x38000000;
-  gv_local.lookup_slx_nse[ 267].nbits =  8; gv_local.lookup_slx_nse[ 267].bits = 0x20000000;
-  gv_local.lookup_slx_nse[ 268].nbits =  8; gv_local.lookup_slx_nse[ 268].bits = 0x24000000;
-  gv_local.lookup_slx_nse[ 269].nbits =  8; gv_local.lookup_slx_nse[ 269].bits = 0x09000000;
-  gv_local.lookup_slx_nse[ 270].nbits =  8; gv_local.lookup_slx_nse[ 270].bits = 0x13000000;
-  gv_local.lookup_slx_nse[ 271].nbits =  8; gv_local.lookup_slx_nse[ 271].bits = 0x02000000;
-  gv_local.lookup_slx_nse[ 272].nbits =  8; gv_local.lookup_slx_nse[ 272].bits = 0x12000000;
-  gv_local.lookup_slx_nse[ 273].nbits =  8; gv_local.lookup_slx_nse[ 273].bits = 0x1C000000;
-  gv_local.lookup_slx_nse[ 274].nbits =  8; gv_local.lookup_slx_nse[ 274].bits = 0x05000000;
-  gv_local.lookup_slx_nse[ 275].nbits =  8; gv_local.lookup_slx_nse[ 275].bits = 0x06000000;
-  gv_local.lookup_slx_nse[ 276].nbits =  9; gv_local.lookup_slx_nse[ 276].bits = 0xFD000000;
-  gv_local.lookup_slx_nse[ 277].nbits =  8; gv_local.lookup_slx_nse[ 277].bits = 0x00000000;
-  gv_local.lookup_slx_nse[ 278].nbits =  9; gv_local.lookup_slx_nse[ 278].bits = 0xFB800000;
-  gv_local.lookup_slx_nse[ 279].nbits =  9; gv_local.lookup_slx_nse[ 279].bits = 0xF9800000;
-  gv_local.lookup_slx_nse[ 280].nbits =  9; gv_local.lookup_slx_nse[ 280].bits = 0xF6800000;
-  gv_local.lookup_slx_nse[ 281].nbits =  9; gv_local.lookup_slx_nse[ 281].bits = 0xEE800000;
-  gv_local.lookup_slx_nse[ 282].nbits =  9; gv_local.lookup_slx_nse[ 282].bits = 0xF4800000;
-  gv_local.lookup_slx_nse[ 283].nbits =  9; gv_local.lookup_slx_nse[ 283].bits = 0xE5000000;
-  gv_local.lookup_slx_nse[ 284].nbits =  9; gv_local.lookup_slx_nse[ 284].bits = 0xEA000000;
-  gv_local.lookup_slx_nse[ 285].nbits =  9; gv_local.lookup_slx_nse[ 285].bits = 0xE4000000;
-  gv_local.lookup_slx_nse[ 286].nbits =  9; gv_local.lookup_slx_nse[ 286].bits = 0xE6000000;
-  gv_local.lookup_slx_nse[ 287].nbits =  9; gv_local.lookup_slx_nse[ 287].bits = 0xDC000000;
-  gv_local.lookup_slx_nse[ 288].nbits =  9; gv_local.lookup_slx_nse[ 288].bits = 0xD5800000;
-  gv_local.lookup_slx_nse[ 289].nbits =  9; gv_local.lookup_slx_nse[ 289].bits = 0xD4800000;
-  gv_local.lookup_slx_nse[ 290].nbits =  9; gv_local.lookup_slx_nse[ 290].bits = 0xC8800000;
-  gv_local.lookup_slx_nse[ 291].nbits =  9; gv_local.lookup_slx_nse[ 291].bits = 0xCA800000;
-  gv_local.lookup_slx_nse[ 292].nbits =  9; gv_local.lookup_slx_nse[ 292].bits = 0xCA000000;
-  gv_local.lookup_slx_nse[ 293].nbits =  9; gv_local.lookup_slx_nse[ 293].bits = 0xCF000000;
-  gv_local.lookup_slx_nse[ 294].nbits =  9; gv_local.lookup_slx_nse[ 294].bits = 0xC7000000;
-  gv_local.lookup_slx_nse[ 295].nbits =  9; gv_local.lookup_slx_nse[ 295].bits = 0xC0000000;
-  gv_local.lookup_slx_nse[ 296].nbits =  9; gv_local.lookup_slx_nse[ 296].bits = 0x7F800000;
-  gv_local.lookup_slx_nse[ 297].nbits =  9; gv_local.lookup_slx_nse[ 297].bits = 0x7B800000;
-  gv_local.lookup_slx_nse[ 298].nbits =  9; gv_local.lookup_slx_nse[ 298].bits = 0x75800000;
-  gv_local.lookup_slx_nse[ 299].nbits =  9; gv_local.lookup_slx_nse[ 299].bits = 0x75000000;
-  gv_local.lookup_slx_nse[ 300].nbits =  9; gv_local.lookup_slx_nse[ 300].bits = 0x79800000;
-  gv_local.lookup_slx_nse[ 301].nbits =  9; gv_local.lookup_slx_nse[ 301].bits = 0x70800000;
-  gv_local.lookup_slx_nse[ 302].nbits =  9; gv_local.lookup_slx_nse[ 302].bits = 0x73800000;
-  gv_local.lookup_slx_nse[ 303].nbits =  9; gv_local.lookup_slx_nse[ 303].bits = 0x72800000;
-  gv_local.lookup_slx_nse[ 304].nbits =  9; gv_local.lookup_slx_nse[ 304].bits = 0x64800000;
-  gv_local.lookup_slx_nse[ 305].nbits =  9; gv_local.lookup_slx_nse[ 305].bits = 0x6C800000;
-  gv_local.lookup_slx_nse[ 306].nbits =  9; gv_local.lookup_slx_nse[ 306].bits = 0x6B800000;
-  gv_local.lookup_slx_nse[ 307].nbits =  9; gv_local.lookup_slx_nse[ 307].bits = 0x6E000000;
-  gv_local.lookup_slx_nse[ 308].nbits =  9; gv_local.lookup_slx_nse[ 308].bits = 0x67000000;
-  gv_local.lookup_slx_nse[ 309].nbits =  9; gv_local.lookup_slx_nse[ 309].bits = 0x69000000;
-  gv_local.lookup_slx_nse[ 310].nbits =  9; gv_local.lookup_slx_nse[ 310].bits = 0x5F800000;
-  gv_local.lookup_slx_nse[ 311].nbits =  9; gv_local.lookup_slx_nse[ 311].bits = 0x61000000;
-  gv_local.lookup_slx_nse[ 312].nbits =  9; gv_local.lookup_slx_nse[ 312].bits = 0x62800000;
-  gv_local.lookup_slx_nse[ 313].nbits =  9; gv_local.lookup_slx_nse[ 313].bits = 0x66800000;
-  gv_local.lookup_slx_nse[ 314].nbits =  9; gv_local.lookup_slx_nse[ 314].bits = 0x60000000;
-  gv_local.lookup_slx_nse[ 315].nbits =  9; gv_local.lookup_slx_nse[ 315].bits = 0x5F000000;
-  gv_local.lookup_slx_nse[ 316].nbits =  9; gv_local.lookup_slx_nse[ 316].bits = 0x5C800000;
-  gv_local.lookup_slx_nse[ 317].nbits =  9; gv_local.lookup_slx_nse[ 317].bits = 0x5D000000;
-  gv_local.lookup_slx_nse[ 318].nbits =  9; gv_local.lookup_slx_nse[ 318].bits = 0x5B800000;
-  gv_local.lookup_slx_nse[ 319].nbits =  9; gv_local.lookup_slx_nse[ 319].bits = 0x5B000000;
-  gv_local.lookup_slx_nse[ 320].nbits =  9; gv_local.lookup_slx_nse[ 320].bits = 0x55800000;
-  gv_local.lookup_slx_nse[ 321].nbits =  9; gv_local.lookup_slx_nse[ 321].bits = 0x59000000;
-  gv_local.lookup_slx_nse[ 322].nbits =  9; gv_local.lookup_slx_nse[ 322].bits = 0x54000000;
-  gv_local.lookup_slx_nse[ 323].nbits =  9; gv_local.lookup_slx_nse[ 323].bits = 0x50000000;
-  gv_local.lookup_slx_nse[ 324].nbits =  9; gv_local.lookup_slx_nse[ 324].bits = 0x4F000000;
-  gv_local.lookup_slx_nse[ 325].nbits =  9; gv_local.lookup_slx_nse[ 325].bits = 0x51800000;
-  gv_local.lookup_slx_nse[ 326].nbits =  9; gv_local.lookup_slx_nse[ 326].bits = 0x53800000;
-  gv_local.lookup_slx_nse[ 327].nbits =  9; gv_local.lookup_slx_nse[ 327].bits = 0x4D800000;
-  gv_local.lookup_slx_nse[ 328].nbits =  9; gv_local.lookup_slx_nse[ 328].bits = 0x45800000;
-  gv_local.lookup_slx_nse[ 329].nbits =  9; gv_local.lookup_slx_nse[ 329].bits = 0x48800000;
-  gv_local.lookup_slx_nse[ 330].nbits =  9; gv_local.lookup_slx_nse[ 330].bits = 0x4B000000;
-  gv_local.lookup_slx_nse[ 331].nbits =  9; gv_local.lookup_slx_nse[ 331].bits = 0x3E800000;
-  gv_local.lookup_slx_nse[ 332].nbits =  9; gv_local.lookup_slx_nse[ 332].bits = 0x44000000;
-  gv_local.lookup_slx_nse[ 333].nbits =  9; gv_local.lookup_slx_nse[ 333].bits = 0x3A800000;
-  gv_local.lookup_slx_nse[ 334].nbits =  9; gv_local.lookup_slx_nse[ 334].bits = 0x40000000;
-  gv_local.lookup_slx_nse[ 335].nbits =  9; gv_local.lookup_slx_nse[ 335].bits = 0x3C000000;
-  gv_local.lookup_slx_nse[ 336].nbits =  9; gv_local.lookup_slx_nse[ 336].bits = 0x27000000;
-  gv_local.lookup_slx_nse[ 337].nbits =  9; gv_local.lookup_slx_nse[ 337].bits = 0x3F000000;
-  gv_local.lookup_slx_nse[ 338].nbits =  9; gv_local.lookup_slx_nse[ 338].bits = 0x1E000000;
-  gv_local.lookup_slx_nse[ 339].nbits =  9; gv_local.lookup_slx_nse[ 339].bits = 0x3A000000;
-  gv_local.lookup_slx_nse[ 340].nbits =  9; gv_local.lookup_slx_nse[ 340].bits = 0x31000000;
-  gv_local.lookup_slx_nse[ 341].nbits =  9; gv_local.lookup_slx_nse[ 341].bits = 0x28800000;
-  gv_local.lookup_slx_nse[ 342].nbits =  9; gv_local.lookup_slx_nse[ 342].bits = 0x1D000000;
-  gv_local.lookup_slx_nse[ 343].nbits =  9; gv_local.lookup_slx_nse[ 343].bits = 0x34800000;
-  gv_local.lookup_slx_nse[ 344].nbits =  9; gv_local.lookup_slx_nse[ 344].bits = 0x14000000;
-  gv_local.lookup_slx_nse[ 345].nbits =  9; gv_local.lookup_slx_nse[ 345].bits = 0x23000000;
-  gv_local.lookup_slx_nse[ 346].nbits =  9; gv_local.lookup_slx_nse[ 346].bits = 0x23800000;
-  gv_local.lookup_slx_nse[ 347].nbits =  9; gv_local.lookup_slx_nse[ 347].bits = 0x0F800000;
-  gv_local.lookup_slx_nse[ 348].nbits =  9; gv_local.lookup_slx_nse[ 348].bits = 0x0B000000;
-  gv_local.lookup_slx_nse[ 349].nbits =  9; gv_local.lookup_slx_nse[ 349].bits = 0x0D000000;
-  gv_local.lookup_slx_nse[ 350].nbits = 10; gv_local.lookup_slx_nse[ 350].bits = 0xFE400000;
-  gv_local.lookup_slx_nse[ 351].nbits = 10; gv_local.lookup_slx_nse[ 351].bits = 0xFD800000;
-  gv_local.lookup_slx_nse[ 352].nbits =  9; gv_local.lookup_slx_nse[ 352].bits = 0x16800000;
-  gv_local.lookup_slx_nse[ 353].nbits =  9; gv_local.lookup_slx_nse[ 353].bits = 0x17800000;
-  gv_local.lookup_slx_nse[ 354].nbits = 10; gv_local.lookup_slx_nse[ 354].bits = 0xF7400000;
-  gv_local.lookup_slx_nse[ 355].nbits =  9; gv_local.lookup_slx_nse[ 355].bits = 0x0C800000;
-  gv_local.lookup_slx_nse[ 356].nbits =  9; gv_local.lookup_slx_nse[ 356].bits = 0x07800000;
-  gv_local.lookup_slx_nse[ 357].nbits = 10; gv_local.lookup_slx_nse[ 357].bits = 0xFB000000;
-  gv_local.lookup_slx_nse[ 358].nbits = 10; gv_local.lookup_slx_nse[ 358].bits = 0xFC400000;
-  gv_local.lookup_slx_nse[ 359].nbits =  9; gv_local.lookup_slx_nse[ 359].bits = 0x0B800000;
-  gv_local.lookup_slx_nse[ 360].nbits = 10; gv_local.lookup_slx_nse[ 360].bits = 0xFAC00000;
-  gv_local.lookup_slx_nse[ 361].nbits = 10; gv_local.lookup_slx_nse[ 361].bits = 0xFE800000;
-  gv_local.lookup_slx_nse[ 362].nbits = 10; gv_local.lookup_slx_nse[ 362].bits = 0xF3800000;
-  gv_local.lookup_slx_nse[ 363].nbits = 10; gv_local.lookup_slx_nse[ 363].bits = 0xF5800000;
-  gv_local.lookup_slx_nse[ 364].nbits = 10; gv_local.lookup_slx_nse[ 364].bits = 0xF3C00000;
-  gv_local.lookup_slx_nse[ 365].nbits = 10; gv_local.lookup_slx_nse[ 365].bits = 0xF1400000;
-  gv_local.lookup_slx_nse[ 366].nbits = 10; gv_local.lookup_slx_nse[ 366].bits = 0xF8C00000;
-  gv_local.lookup_slx_nse[ 367].nbits = 10; gv_local.lookup_slx_nse[ 367].bits = 0xF8000000;
-  gv_local.lookup_slx_nse[ 368].nbits = 10; gv_local.lookup_slx_nse[ 368].bits = 0xF2000000;
-  gv_local.lookup_slx_nse[ 369].nbits = 10; gv_local.lookup_slx_nse[ 369].bits = 0xED800000;
-  gv_local.lookup_slx_nse[ 370].nbits = 10; gv_local.lookup_slx_nse[ 370].bits = 0xF1C00000;
-  gv_local.lookup_slx_nse[ 371].nbits = 10; gv_local.lookup_slx_nse[ 371].bits = 0xF1800000;
-  gv_local.lookup_slx_nse[ 372].nbits = 10; gv_local.lookup_slx_nse[ 372].bits = 0xEC400000;
-  gv_local.lookup_slx_nse[ 373].nbits = 10; gv_local.lookup_slx_nse[ 373].bits = 0xDE400000;
-  gv_local.lookup_slx_nse[ 374].nbits = 10; gv_local.lookup_slx_nse[ 374].bits = 0xF1000000;
-  gv_local.lookup_slx_nse[ 375].nbits = 10; gv_local.lookup_slx_nse[ 375].bits = 0xE9400000;
-  gv_local.lookup_slx_nse[ 376].nbits = 10; gv_local.lookup_slx_nse[ 376].bits = 0xE8800000;
-  gv_local.lookup_slx_nse[ 377].nbits = 10; gv_local.lookup_slx_nse[ 377].bits = 0xEA800000;
-  gv_local.lookup_slx_nse[ 378].nbits = 10; gv_local.lookup_slx_nse[ 378].bits = 0xEF000000;
-  gv_local.lookup_slx_nse[ 379].nbits = 10; gv_local.lookup_slx_nse[ 379].bits = 0xE1C00000;
-  gv_local.lookup_slx_nse[ 380].nbits = 10; gv_local.lookup_slx_nse[ 380].bits = 0xE8C00000;
-  gv_local.lookup_slx_nse[ 381].nbits = 10; gv_local.lookup_slx_nse[ 381].bits = 0xE7800000;
-  gv_local.lookup_slx_nse[ 382].nbits = 10; gv_local.lookup_slx_nse[ 382].bits = 0xF6000000;
-  gv_local.lookup_slx_nse[ 383].nbits = 10; gv_local.lookup_slx_nse[ 383].bits = 0xDB800000;
-  gv_local.lookup_slx_nse[ 384].nbits = 10; gv_local.lookup_slx_nse[ 384].bits = 0xDAC00000;
-  gv_local.lookup_slx_nse[ 385].nbits = 10; gv_local.lookup_slx_nse[ 385].bits = 0xD9C00000;
-  gv_local.lookup_slx_nse[ 386].nbits = 10; gv_local.lookup_slx_nse[ 386].bits = 0xDD000000;
-  gv_local.lookup_slx_nse[ 387].nbits = 10; gv_local.lookup_slx_nse[ 387].bits = 0xE8400000;
-  gv_local.lookup_slx_nse[ 388].nbits = 10; gv_local.lookup_slx_nse[ 388].bits = 0xE5C00000;
-  gv_local.lookup_slx_nse[ 389].nbits = 10; gv_local.lookup_slx_nse[ 389].bits = 0xE0000000;
-  gv_local.lookup_slx_nse[ 390].nbits = 10; gv_local.lookup_slx_nse[ 390].bits = 0xE3000000;
-  gv_local.lookup_slx_nse[ 391].nbits = 10; gv_local.lookup_slx_nse[ 391].bits = 0xD8C00000;
-  gv_local.lookup_slx_nse[ 392].nbits = 10; gv_local.lookup_slx_nse[ 392].bits = 0xCCC00000;
-  gv_local.lookup_slx_nse[ 393].nbits = 10; gv_local.lookup_slx_nse[ 393].bits = 0xD9000000;
-  gv_local.lookup_slx_nse[ 394].nbits = 10; gv_local.lookup_slx_nse[ 394].bits = 0xE4800000;
-  gv_local.lookup_slx_nse[ 395].nbits = 10; gv_local.lookup_slx_nse[ 395].bits = 0xE9C00000;
-  gv_local.lookup_slx_nse[ 396].nbits = 10; gv_local.lookup_slx_nse[ 396].bits = 0xE3400000;
-  gv_local.lookup_slx_nse[ 397].nbits = 10; gv_local.lookup_slx_nse[ 397].bits = 0xD7400000;
-  gv_local.lookup_slx_nse[ 398].nbits = 10; gv_local.lookup_slx_nse[ 398].bits = 0xD6800000;
-  gv_local.lookup_slx_nse[ 399].nbits = 10; gv_local.lookup_slx_nse[ 399].bits = 0xC9800000;
-  gv_local.lookup_slx_nse[ 400].nbits = 10; gv_local.lookup_slx_nse[ 400].bits = 0xCF800000;
-  gv_local.lookup_slx_nse[ 401].nbits = 10; gv_local.lookup_slx_nse[ 401].bits = 0xD0400000;
-  gv_local.lookup_slx_nse[ 402].nbits = 10; gv_local.lookup_slx_nse[ 402].bits = 0xD5400000;
-  gv_local.lookup_slx_nse[ 403].nbits = 10; gv_local.lookup_slx_nse[ 403].bits = 0xD0800000;
-  gv_local.lookup_slx_nse[ 404].nbits = 10; gv_local.lookup_slx_nse[ 404].bits = 0xDA400000;
-  gv_local.lookup_slx_nse[ 405].nbits = 10; gv_local.lookup_slx_nse[ 405].bits = 0xD2000000;
-  gv_local.lookup_slx_nse[ 406].nbits = 10; gv_local.lookup_slx_nse[ 406].bits = 0xD3400000;
-  gv_local.lookup_slx_nse[ 407].nbits = 10; gv_local.lookup_slx_nse[ 407].bits = 0xD3C00000;
-  gv_local.lookup_slx_nse[ 408].nbits = 10; gv_local.lookup_slx_nse[ 408].bits = 0xD8000000;
-  gv_local.lookup_slx_nse[ 409].nbits = 10; gv_local.lookup_slx_nse[ 409].bits = 0xC5000000;
-  gv_local.lookup_slx_nse[ 410].nbits = 10; gv_local.lookup_slx_nse[ 410].bits = 0xC9400000;
-  gv_local.lookup_slx_nse[ 411].nbits = 10; gv_local.lookup_slx_nse[ 411].bits = 0xD6C00000;
-  gv_local.lookup_slx_nse[ 412].nbits = 10; gv_local.lookup_slx_nse[ 412].bits = 0xCD000000;
-  gv_local.lookup_slx_nse[ 413].nbits = 10; gv_local.lookup_slx_nse[ 413].bits = 0xDF000000;
-  gv_local.lookup_slx_nse[ 414].nbits = 10; gv_local.lookup_slx_nse[ 414].bits = 0xC8400000;
-  gv_local.lookup_slx_nse[ 415].nbits = 10; gv_local.lookup_slx_nse[ 415].bits = 0xC4800000;
-  gv_local.lookup_slx_nse[ 416].nbits = 10; gv_local.lookup_slx_nse[ 416].bits = 0xD2400000;
-  gv_local.lookup_slx_nse[ 417].nbits = 10; gv_local.lookup_slx_nse[ 417].bits = 0xCC400000;
-  gv_local.lookup_slx_nse[ 418].nbits = 10; gv_local.lookup_slx_nse[ 418].bits = 0xC5800000;
-  gv_local.lookup_slx_nse[ 419].nbits = 10; gv_local.lookup_slx_nse[ 419].bits = 0xDD800000;
-  gv_local.lookup_slx_nse[ 420].nbits = 10; gv_local.lookup_slx_nse[ 420].bits = 0xC8000000;
-  gv_local.lookup_slx_nse[ 421].nbits = 10; gv_local.lookup_slx_nse[ 421].bits = 0xCFC00000;
-  gv_local.lookup_slx_nse[ 422].nbits = 10; gv_local.lookup_slx_nse[ 422].bits = 0xC3C00000;
-  gv_local.lookup_slx_nse[ 423].nbits = 10; gv_local.lookup_slx_nse[ 423].bits = 0xC6000000;
-  gv_local.lookup_slx_nse[ 424].nbits = 10; gv_local.lookup_slx_nse[ 424].bits = 0xD9400000;
-  gv_local.lookup_slx_nse[ 425].nbits = 10; gv_local.lookup_slx_nse[ 425].bits = 0xCB000000;
-  gv_local.lookup_slx_nse[ 426].nbits = 10; gv_local.lookup_slx_nse[ 426].bits = 0xCC000000;
-  gv_local.lookup_slx_nse[ 427].nbits = 10; gv_local.lookup_slx_nse[ 427].bits = 0x7C000000;
-  gv_local.lookup_slx_nse[ 428].nbits = 10; gv_local.lookup_slx_nse[ 428].bits = 0xCBC00000;
-  gv_local.lookup_slx_nse[ 429].nbits = 10; gv_local.lookup_slx_nse[ 429].bits = 0x77400000;
-  gv_local.lookup_slx_nse[ 430].nbits = 10; gv_local.lookup_slx_nse[ 430].bits = 0xC2400000;
-  gv_local.lookup_slx_nse[ 431].nbits = 10; gv_local.lookup_slx_nse[ 431].bits = 0xC7800000;
-  gv_local.lookup_slx_nse[ 432].nbits = 10; gv_local.lookup_slx_nse[ 432].bits = 0xC1C00000;
-  gv_local.lookup_slx_nse[ 433].nbits = 10; gv_local.lookup_slx_nse[ 433].bits = 0xC0800000;
-  gv_local.lookup_slx_nse[ 434].nbits = 10; gv_local.lookup_slx_nse[ 434].bits = 0xC5400000;
-  gv_local.lookup_slx_nse[ 435].nbits = 10; gv_local.lookup_slx_nse[ 435].bits = 0x7E400000;
-  gv_local.lookup_slx_nse[ 436].nbits = 10; gv_local.lookup_slx_nse[ 436].bits = 0x7E000000;
-  gv_local.lookup_slx_nse[ 437].nbits = 10; gv_local.lookup_slx_nse[ 437].bits = 0xC1000000;
-  gv_local.lookup_slx_nse[ 438].nbits = 10; gv_local.lookup_slx_nse[ 438].bits = 0xC5C00000;
-  gv_local.lookup_slx_nse[ 439].nbits = 10; gv_local.lookup_slx_nse[ 439].bits = 0x7A400000;
-  gv_local.lookup_slx_nse[ 440].nbits = 10; gv_local.lookup_slx_nse[ 440].bits = 0x7A000000;
-  gv_local.lookup_slx_nse[ 441].nbits = 10; gv_local.lookup_slx_nse[ 441].bits = 0x70400000;
-  gv_local.lookup_slx_nse[ 442].nbits = 10; gv_local.lookup_slx_nse[ 442].bits = 0x7F000000;
-  gv_local.lookup_slx_nse[ 443].nbits = 10; gv_local.lookup_slx_nse[ 443].bits = 0x73400000;
-  gv_local.lookup_slx_nse[ 444].nbits = 10; gv_local.lookup_slx_nse[ 444].bits = 0x7C800000;
-  gv_local.lookup_slx_nse[ 445].nbits = 10; gv_local.lookup_slx_nse[ 445].bits = 0x7B400000;
-  gv_local.lookup_slx_nse[ 446].nbits = 10; gv_local.lookup_slx_nse[ 446].bits = 0x74C00000;
-  gv_local.lookup_slx_nse[ 447].nbits = 10; gv_local.lookup_slx_nse[ 447].bits = 0x6E800000;
-  gv_local.lookup_slx_nse[ 448].nbits = 10; gv_local.lookup_slx_nse[ 448].bits = 0x77C00000;
-  gv_local.lookup_slx_nse[ 449].nbits = 10; gv_local.lookup_slx_nse[ 449].bits = 0x73000000;
-  gv_local.lookup_slx_nse[ 450].nbits = 10; gv_local.lookup_slx_nse[ 450].bits = 0x71800000;
-  gv_local.lookup_slx_nse[ 451].nbits = 10; gv_local.lookup_slx_nse[ 451].bits = 0x6C400000;
-  gv_local.lookup_slx_nse[ 452].nbits = 10; gv_local.lookup_slx_nse[ 452].bits = 0x68C00000;
-  gv_local.lookup_slx_nse[ 453].nbits = 10; gv_local.lookup_slx_nse[ 453].bits = 0x71C00000;
-  gv_local.lookup_slx_nse[ 454].nbits = 10; gv_local.lookup_slx_nse[ 454].bits = 0x68800000;
-  gv_local.lookup_slx_nse[ 455].nbits = 10; gv_local.lookup_slx_nse[ 455].bits = 0x69C00000;
-  gv_local.lookup_slx_nse[ 456].nbits = 10; gv_local.lookup_slx_nse[ 456].bits = 0x6EC00000;
-  gv_local.lookup_slx_nse[ 457].nbits = 10; gv_local.lookup_slx_nse[ 457].bits = 0x65000000;
-  gv_local.lookup_slx_nse[ 458].nbits = 10; gv_local.lookup_slx_nse[ 458].bits = 0x67800000;
-  gv_local.lookup_slx_nse[ 459].nbits = 10; gv_local.lookup_slx_nse[ 459].bits = 0x5C400000;
-  gv_local.lookup_slx_nse[ 460].nbits = 10; gv_local.lookup_slx_nse[ 460].bits = 0x56400000;
-  gv_local.lookup_slx_nse[ 461].nbits = 10; gv_local.lookup_slx_nse[ 461].bits = 0x63400000;
-  gv_local.lookup_slx_nse[ 462].nbits = 10; gv_local.lookup_slx_nse[ 462].bits = 0x60C00000;
-  gv_local.lookup_slx_nse[ 463].nbits = 10; gv_local.lookup_slx_nse[ 463].bits = 0x65400000;
-  gv_local.lookup_slx_nse[ 464].nbits = 10; gv_local.lookup_slx_nse[ 464].bits = 0x66000000;
-  gv_local.lookup_slx_nse[ 465].nbits = 10; gv_local.lookup_slx_nse[ 465].bits = 0x63C00000;
-  gv_local.lookup_slx_nse[ 466].nbits = 10; gv_local.lookup_slx_nse[ 466].bits = 0x5AC00000;
-  gv_local.lookup_slx_nse[ 467].nbits = 10; gv_local.lookup_slx_nse[ 467].bits = 0x55400000;
-  gv_local.lookup_slx_nse[ 468].nbits = 10; gv_local.lookup_slx_nse[ 468].bits = 0x63000000;
-  gv_local.lookup_slx_nse[ 469].nbits = 10; gv_local.lookup_slx_nse[ 469].bits = 0x5A800000;
-  gv_local.lookup_slx_nse[ 470].nbits = 10; gv_local.lookup_slx_nse[ 470].bits = 0x55000000;
-  gv_local.lookup_slx_nse[ 471].nbits = 10; gv_local.lookup_slx_nse[ 471].bits = 0x58000000;
-  gv_local.lookup_slx_nse[ 472].nbits = 10; gv_local.lookup_slx_nse[ 472].bits = 0x4D000000;
-  gv_local.lookup_slx_nse[ 473].nbits = 10; gv_local.lookup_slx_nse[ 473].bits = 0x50C00000;
-  gv_local.lookup_slx_nse[ 474].nbits = 10; gv_local.lookup_slx_nse[ 474].bits = 0x46800000;
-  gv_local.lookup_slx_nse[ 475].nbits = 10; gv_local.lookup_slx_nse[ 475].bits = 0x44800000;
-  gv_local.lookup_slx_nse[ 476].nbits = 10; gv_local.lookup_slx_nse[ 476].bits = 0x4C000000;
-  gv_local.lookup_slx_nse[ 477].nbits = 10; gv_local.lookup_slx_nse[ 477].bits = 0x52400000;
-  gv_local.lookup_slx_nse[ 478].nbits = 10; gv_local.lookup_slx_nse[ 478].bits = 0x4D400000;
-  gv_local.lookup_slx_nse[ 479].nbits = 10; gv_local.lookup_slx_nse[ 479].bits = 0x42400000;
-  gv_local.lookup_slx_nse[ 480].nbits = 10; gv_local.lookup_slx_nse[ 480].bits = 0x42000000;
-  gv_local.lookup_slx_nse[ 481].nbits = 10; gv_local.lookup_slx_nse[ 481].bits = 0x42800000;
-  gv_local.lookup_slx_nse[ 482].nbits = 10; gv_local.lookup_slx_nse[ 482].bits = 0x27800000;
-  gv_local.lookup_slx_nse[ 483].nbits = 10; gv_local.lookup_slx_nse[ 483].bits = 0x46000000;
-  gv_local.lookup_slx_nse[ 484].nbits = 10; gv_local.lookup_slx_nse[ 484].bits = 0x44C00000;
-  gv_local.lookup_slx_nse[ 485].nbits = 10; gv_local.lookup_slx_nse[ 485].bits = 0x3C800000;
-  gv_local.lookup_slx_nse[ 486].nbits = 10; gv_local.lookup_slx_nse[ 486].bits = 0x4C400000;
-  gv_local.lookup_slx_nse[ 487].nbits = 10; gv_local.lookup_slx_nse[ 487].bits = 0x14800000;
-  gv_local.lookup_slx_nse[ 488].nbits = 10; gv_local.lookup_slx_nse[ 488].bits = 0x22C00000;
-  gv_local.lookup_slx_nse[ 489].nbits = 11; gv_local.lookup_slx_nse[ 489].bits = 0xFE000000;
-  gv_local.lookup_slx_nse[ 490].nbits = 10; gv_local.lookup_slx_nse[ 490].bits = 0x0A400000;
-  gv_local.lookup_slx_nse[ 491].nbits = 11; gv_local.lookup_slx_nse[ 491].bits = 0xFDC00000;
-  gv_local.lookup_slx_nse[ 492].nbits = 10; gv_local.lookup_slx_nse[ 492].bits = 0x14C00000;
-  gv_local.lookup_slx_nse[ 493].nbits = 10; gv_local.lookup_slx_nse[ 493].bits = 0x01C00000;
-  gv_local.lookup_slx_nse[ 494].nbits = 11; gv_local.lookup_slx_nse[ 494].bits = 0xFE200000;
-  gv_local.lookup_slx_nse[ 495].nbits = 11; gv_local.lookup_slx_nse[ 495].bits = 0xFDE00000;
-  gv_local.lookup_slx_nse[ 496].nbits = 10; gv_local.lookup_slx_nse[ 496].bits = 0x01800000;
-  gv_local.lookup_slx_nse[ 497].nbits = 11; gv_local.lookup_slx_nse[ 497].bits = 0xF6400000;
-  gv_local.lookup_slx_nse[ 498].nbits = 11; gv_local.lookup_slx_nse[ 498].bits = 0xF2E00000;
-  gv_local.lookup_slx_nse[ 499].nbits = 11; gv_local.lookup_slx_nse[ 499].bits = 0xEE600000;
-  gv_local.lookup_slx_nse[ 500].nbits = 11; gv_local.lookup_slx_nse[ 500].bits = 0xEBE00000;
-  gv_local.lookup_slx_nse[ 501].nbits = 11; gv_local.lookup_slx_nse[ 501].bits = 0xCE600000;
-  gv_local.lookup_slx_nse[ 502].nbits = 11; gv_local.lookup_slx_nse[ 502].bits = 0xE8200000;
-  gv_local.lookup_slx_nse[ 503].nbits = 11; gv_local.lookup_slx_nse[ 503].bits = 0xDA200000;
-  gv_local.lookup_slx_nse[ 504].nbits = 11; gv_local.lookup_slx_nse[ 504].bits = 0xD0200000;
-  gv_local.lookup_slx_nse[ 505].nbits = 11; gv_local.lookup_slx_nse[ 505].bits = 0xDFE00000;
-  gv_local.lookup_slx_nse[ 506].nbits = 11; gv_local.lookup_slx_nse[ 506].bits = 0xDB600000;
-  gv_local.lookup_slx_nse[ 507].nbits = 11; gv_local.lookup_slx_nse[ 507].bits = 0xD5200000;
-  gv_local.lookup_slx_nse[ 508].nbits = 11; gv_local.lookup_slx_nse[ 508].bits = 0xDB400000;
-  gv_local.lookup_slx_nse[ 509].nbits = 11; gv_local.lookup_slx_nse[ 509].bits = 0xDDC00000;
-  gv_local.lookup_slx_nse[ 510].nbits = 11; gv_local.lookup_slx_nse[ 510].bits = 0xC6800000;
-  gv_local.lookup_slx_nse[ 511].nbits =  2; gv_local.lookup_slx_nse[ 511].bits = 0x80000000;
-
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  /* reverse huffman lookup table
-   */
-  memset (gv_local.rlookup_slx_nse, 0, sizeof(uint16_t)*REV_HUFF_TREESIZE_16);
-
-  for (i=0; i<NSE_HUFF_TREESIZE; i++)
-  {
-    val = gv_local.lookup_slx_nse[i].bits >> 16;
-    gv_local.rlookup_slx_nse [val] = (uint16_t) i;
-    for (j=1; j<=(0xFFFF>>gv_local.lookup_slx_nse[i].nbits); j++)
-      gv_local.rlookup_slx_nse [val+j] = (uint16_t) i;
-  }
-#endif
-
-  _s_sort_lookup (gv_local.lookup_slx_nse, gv_local.idx_slx_nse, NSE_HUFF_TREESIZE);
-
-  gv_local.lookup_slx_nse_initialized = 1;
-}
-
-/*
- */
-static void _s_init_seq_default (void)
-{
-  memcpy (gv_local.conv2to4na[  0], "AAAA", 4);  memcpy (gv_local.conv2to4na[  1], "AAAC", 4);
-  memcpy (gv_local.conv2to4na[  2], "AAAG", 4);  memcpy (gv_local.conv2to4na[  3], "AAAT", 4);
-  memcpy (gv_local.conv2to4na[  4], "AACA", 4);  memcpy (gv_local.conv2to4na[  5], "AACC", 4);
-  memcpy (gv_local.conv2to4na[  6], "AACG", 4);  memcpy (gv_local.conv2to4na[  7], "AACT", 4);
-  memcpy (gv_local.conv2to4na[  8], "AAGA", 4);  memcpy (gv_local.conv2to4na[  9], "AAGC", 4);
-  memcpy (gv_local.conv2to4na[ 10], "AAGG", 4);  memcpy (gv_local.conv2to4na[ 11], "AAGT", 4);
-  memcpy (gv_local.conv2to4na[ 12], "AATA", 4);  memcpy (gv_local.conv2to4na[ 13], "AATC", 4);
-  memcpy (gv_local.conv2to4na[ 14], "AATG", 4);  memcpy (gv_local.conv2to4na[ 15], "AATT", 4);
-  memcpy (gv_local.conv2to4na[ 16], "ACAA", 4);  memcpy (gv_local.conv2to4na[ 17], "ACAC", 4);
-  memcpy (gv_local.conv2to4na[ 18], "ACAG", 4);  memcpy (gv_local.conv2to4na[ 19], "ACAT", 4);
-  memcpy (gv_local.conv2to4na[ 20], "ACCA", 4);  memcpy (gv_local.conv2to4na[ 21], "ACCC", 4);
-  memcpy (gv_local.conv2to4na[ 22], "ACCG", 4);  memcpy (gv_local.conv2to4na[ 23], "ACCT", 4);
-  memcpy (gv_local.conv2to4na[ 24], "ACGA", 4);  memcpy (gv_local.conv2to4na[ 25], "ACGC", 4);
-  memcpy (gv_local.conv2to4na[ 26], "ACGG", 4);  memcpy (gv_local.conv2to4na[ 27], "ACGT", 4);
-  memcpy (gv_local.conv2to4na[ 28], "ACTA", 4);  memcpy (gv_local.conv2to4na[ 29], "ACTC", 4);
-  memcpy (gv_local.conv2to4na[ 30], "ACTG", 4);  memcpy (gv_local.conv2to4na[ 31], "ACTT", 4);
-  memcpy (gv_local.conv2to4na[ 32], "AGAA", 4);  memcpy (gv_local.conv2to4na[ 33], "AGAC", 4);
-  memcpy (gv_local.conv2to4na[ 34], "AGAG", 4);  memcpy (gv_local.conv2to4na[ 35], "AGAT", 4);
-  memcpy (gv_local.conv2to4na[ 36], "AGCA", 4);  memcpy (gv_local.conv2to4na[ 37], "AGCC", 4);
-  memcpy (gv_local.conv2to4na[ 38], "AGCG", 4);  memcpy (gv_local.conv2to4na[ 39], "AGCT", 4);
-  memcpy (gv_local.conv2to4na[ 40], "AGGA", 4);  memcpy (gv_local.conv2to4na[ 41], "AGGC", 4);
-  memcpy (gv_local.conv2to4na[ 42], "AGGG", 4);  memcpy (gv_local.conv2to4na[ 43], "AGGT", 4);
-  memcpy (gv_local.conv2to4na[ 44], "AGTA", 4);  memcpy (gv_local.conv2to4na[ 45], "AGTC", 4);
-  memcpy (gv_local.conv2to4na[ 46], "AGTG", 4);  memcpy (gv_local.conv2to4na[ 47], "AGTT", 4);
-  memcpy (gv_local.conv2to4na[ 48], "ATAA", 4);  memcpy (gv_local.conv2to4na[ 49], "ATAC", 4);
-  memcpy (gv_local.conv2to4na[ 50], "ATAG", 4);  memcpy (gv_local.conv2to4na[ 51], "ATAT", 4);
-  memcpy (gv_local.conv2to4na[ 52], "ATCA", 4);  memcpy (gv_local.conv2to4na[ 53], "ATCC", 4);
-  memcpy (gv_local.conv2to4na[ 54], "ATCG", 4);  memcpy (gv_local.conv2to4na[ 55], "ATCT", 4);
-  memcpy (gv_local.conv2to4na[ 56], "ATGA", 4);  memcpy (gv_local.conv2to4na[ 57], "ATGC", 4);
-  memcpy (gv_local.conv2to4na[ 58], "ATGG", 4);  memcpy (gv_local.conv2to4na[ 59], "ATGT", 4);
-  memcpy (gv_local.conv2to4na[ 60], "ATTA", 4);  memcpy (gv_local.conv2to4na[ 61], "ATTC", 4);
-  memcpy (gv_local.conv2to4na[ 62], "ATTG", 4);  memcpy (gv_local.conv2to4na[ 63], "ATTT", 4);
-  memcpy (gv_local.conv2to4na[ 64], "CAAA", 4);  memcpy (gv_local.conv2to4na[ 65], "CAAC", 4);
-  memcpy (gv_local.conv2to4na[ 66], "CAAG", 4);  memcpy (gv_local.conv2to4na[ 67], "CAAT", 4);
-  memcpy (gv_local.conv2to4na[ 68], "CACA", 4);  memcpy (gv_local.conv2to4na[ 69], "CACC", 4);
-  memcpy (gv_local.conv2to4na[ 70], "CACG", 4);  memcpy (gv_local.conv2to4na[ 71], "CACT", 4);
-  memcpy (gv_local.conv2to4na[ 72], "CAGA", 4);  memcpy (gv_local.conv2to4na[ 73], "CAGC", 4);
-  memcpy (gv_local.conv2to4na[ 74], "CAGG", 4);  memcpy (gv_local.conv2to4na[ 75], "CAGT", 4);
-  memcpy (gv_local.conv2to4na[ 76], "CATA", 4);  memcpy (gv_local.conv2to4na[ 77], "CATC", 4);
-  memcpy (gv_local.conv2to4na[ 78], "CATG", 4);  memcpy (gv_local.conv2to4na[ 79], "CATT", 4);
-  memcpy (gv_local.conv2to4na[ 80], "CCAA", 4);  memcpy (gv_local.conv2to4na[ 81], "CCAC", 4);
-  memcpy (gv_local.conv2to4na[ 82], "CCAG", 4);  memcpy (gv_local.conv2to4na[ 83], "CCAT", 4);
-  memcpy (gv_local.conv2to4na[ 84], "CCCA", 4);  memcpy (gv_local.conv2to4na[ 85], "CCCC", 4);
-  memcpy (gv_local.conv2to4na[ 86], "CCCG", 4);  memcpy (gv_local.conv2to4na[ 87], "CCCT", 4);
-  memcpy (gv_local.conv2to4na[ 88], "CCGA", 4);  memcpy (gv_local.conv2to4na[ 89], "CCGC", 4);
-  memcpy (gv_local.conv2to4na[ 90], "CCGG", 4);  memcpy (gv_local.conv2to4na[ 91], "CCGT", 4);
-  memcpy (gv_local.conv2to4na[ 92], "CCTA", 4);  memcpy (gv_local.conv2to4na[ 93], "CCTC", 4);
-  memcpy (gv_local.conv2to4na[ 94], "CCTG", 4);  memcpy (gv_local.conv2to4na[ 95], "CCTT", 4);
-  memcpy (gv_local.conv2to4na[ 96], "CGAA", 4);  memcpy (gv_local.conv2to4na[ 97], "CGAC", 4);
-  memcpy (gv_local.conv2to4na[ 98], "CGAG", 4);  memcpy (gv_local.conv2to4na[ 99], "CGAT", 4);
-  memcpy (gv_local.conv2to4na[100], "CGCA", 4);  memcpy (gv_local.conv2to4na[101], "CGCC", 4);
-  memcpy (gv_local.conv2to4na[102], "CGCG", 4);  memcpy (gv_local.conv2to4na[103], "CGCT", 4);
-  memcpy (gv_local.conv2to4na[104], "CGGA", 4);  memcpy (gv_local.conv2to4na[105], "CGGC", 4);
-  memcpy (gv_local.conv2to4na[106], "CGGG", 4);  memcpy (gv_local.conv2to4na[107], "CGGT", 4);
-  memcpy (gv_local.conv2to4na[108], "CGTA", 4);  memcpy (gv_local.conv2to4na[109], "CGTC", 4);
-  memcpy (gv_local.conv2to4na[110], "CGTG", 4);  memcpy (gv_local.conv2to4na[111], "CGTT", 4);
-  memcpy (gv_local.conv2to4na[112], "CTAA", 4);  memcpy (gv_local.conv2to4na[113], "CTAC", 4);
-  memcpy (gv_local.conv2to4na[114], "CTAG", 4);  memcpy (gv_local.conv2to4na[115], "CTAT", 4);
-  memcpy (gv_local.conv2to4na[116], "CTCA", 4);  memcpy (gv_local.conv2to4na[117], "CTCC", 4);
-  memcpy (gv_local.conv2to4na[118], "CTCG", 4);  memcpy (gv_local.conv2to4na[119], "CTCT", 4);
-  memcpy (gv_local.conv2to4na[120], "CTGA", 4);  memcpy (gv_local.conv2to4na[121], "CTGC", 4);
-  memcpy (gv_local.conv2to4na[122], "CTGG", 4);  memcpy (gv_local.conv2to4na[123], "CTGT", 4);
-  memcpy (gv_local.conv2to4na[124], "CTTA", 4);  memcpy (gv_local.conv2to4na[125], "CTTC", 4);
-  memcpy (gv_local.conv2to4na[126], "CTTG", 4);  memcpy (gv_local.conv2to4na[127], "CTTT", 4);
-  memcpy (gv_local.conv2to4na[128], "GAAA", 4);  memcpy (gv_local.conv2to4na[129], "GAAC", 4);
-  memcpy (gv_local.conv2to4na[130], "GAAG", 4);  memcpy (gv_local.conv2to4na[131], "GAAT", 4);
-  memcpy (gv_local.conv2to4na[132], "GACA", 4);  memcpy (gv_local.conv2to4na[133], "GACC", 4);
-  memcpy (gv_local.conv2to4na[134], "GACG", 4);  memcpy (gv_local.conv2to4na[135], "GACT", 4);
-  memcpy (gv_local.conv2to4na[136], "GAGA", 4);  memcpy (gv_local.conv2to4na[137], "GAGC", 4);
-  memcpy (gv_local.conv2to4na[138], "GAGG", 4);  memcpy (gv_local.conv2to4na[139], "GAGT", 4);
-  memcpy (gv_local.conv2to4na[140], "GATA", 4);  memcpy (gv_local.conv2to4na[141], "GATC", 4);
-  memcpy (gv_local.conv2to4na[142], "GATG", 4);  memcpy (gv_local.conv2to4na[143], "GATT", 4);
-  memcpy (gv_local.conv2to4na[144], "GCAA", 4);  memcpy (gv_local.conv2to4na[145], "GCAC", 4);
-  memcpy (gv_local.conv2to4na[146], "GCAG", 4);  memcpy (gv_local.conv2to4na[147], "GCAT", 4);
-  memcpy (gv_local.conv2to4na[148], "GCCA", 4);  memcpy (gv_local.conv2to4na[149], "GCCC", 4);
-  memcpy (gv_local.conv2to4na[150], "GCCG", 4);  memcpy (gv_local.conv2to4na[151], "GCCT", 4);
-  memcpy (gv_local.conv2to4na[152], "GCGA", 4);  memcpy (gv_local.conv2to4na[153], "GCGC", 4);
-  memcpy (gv_local.conv2to4na[154], "GCGG", 4);  memcpy (gv_local.conv2to4na[155], "GCGT", 4);
-  memcpy (gv_local.conv2to4na[156], "GCTA", 4);  memcpy (gv_local.conv2to4na[157], "GCTC", 4);
-  memcpy (gv_local.conv2to4na[158], "GCTG", 4);  memcpy (gv_local.conv2to4na[159], "GCTT", 4);
-  memcpy (gv_local.conv2to4na[160], "GGAA", 4);  memcpy (gv_local.conv2to4na[161], "GGAC", 4);
-  memcpy (gv_local.conv2to4na[162], "GGAG", 4);  memcpy (gv_local.conv2to4na[163], "GGAT", 4);
-  memcpy (gv_local.conv2to4na[164], "GGCA", 4);  memcpy (gv_local.conv2to4na[165], "GGCC", 4);
-  memcpy (gv_local.conv2to4na[166], "GGCG", 4);  memcpy (gv_local.conv2to4na[167], "GGCT", 4);
-  memcpy (gv_local.conv2to4na[168], "GGGA", 4);  memcpy (gv_local.conv2to4na[169], "GGGC", 4);
-  memcpy (gv_local.conv2to4na[170], "GGGG", 4);  memcpy (gv_local.conv2to4na[171], "GGGT", 4);
-  memcpy (gv_local.conv2to4na[172], "GGTA", 4);  memcpy (gv_local.conv2to4na[173], "GGTC", 4);
-  memcpy (gv_local.conv2to4na[174], "GGTG", 4);  memcpy (gv_local.conv2to4na[175], "GGTT", 4);
-  memcpy (gv_local.conv2to4na[176], "GTAA", 4);  memcpy (gv_local.conv2to4na[177], "GTAC", 4);
-  memcpy (gv_local.conv2to4na[178], "GTAG", 4);  memcpy (gv_local.conv2to4na[179], "GTAT", 4);
-  memcpy (gv_local.conv2to4na[180], "GTCA", 4);  memcpy (gv_local.conv2to4na[181], "GTCC", 4);
-  memcpy (gv_local.conv2to4na[182], "GTCG", 4);  memcpy (gv_local.conv2to4na[183], "GTCT", 4);
-  memcpy (gv_local.conv2to4na[184], "GTGA", 4);  memcpy (gv_local.conv2to4na[185], "GTGC", 4);
-  memcpy (gv_local.conv2to4na[186], "GTGG", 4);  memcpy (gv_local.conv2to4na[187], "GTGT", 4);
-  memcpy (gv_local.conv2to4na[188], "GTTA", 4);  memcpy (gv_local.conv2to4na[189], "GTTC", 4);
-  memcpy (gv_local.conv2to4na[190], "GTTG", 4);  memcpy (gv_local.conv2to4na[191], "GTTT", 4);
-  memcpy (gv_local.conv2to4na[192], "TAAA", 4);  memcpy (gv_local.conv2to4na[193], "TAAC", 4);
-  memcpy (gv_local.conv2to4na[194], "TAAG", 4);  memcpy (gv_local.conv2to4na[195], "TAAT", 4);
-  memcpy (gv_local.conv2to4na[196], "TACA", 4);  memcpy (gv_local.conv2to4na[197], "TACC", 4);
-  memcpy (gv_local.conv2to4na[198], "TACG", 4);  memcpy (gv_local.conv2to4na[199], "TACT", 4);
-  memcpy (gv_local.conv2to4na[200], "TAGA", 4);  memcpy (gv_local.conv2to4na[201], "TAGC", 4);
-  memcpy (gv_local.conv2to4na[202], "TAGG", 4);  memcpy (gv_local.conv2to4na[203], "TAGT", 4);
-  memcpy (gv_local.conv2to4na[204], "TATA", 4);  memcpy (gv_local.conv2to4na[205], "TATC", 4);
-  memcpy (gv_local.conv2to4na[206], "TATG", 4);  memcpy (gv_local.conv2to4na[207], "TATT", 4);
-  memcpy (gv_local.conv2to4na[208], "TCAA", 4);  memcpy (gv_local.conv2to4na[209], "TCAC", 4);
-  memcpy (gv_local.conv2to4na[210], "TCAG", 4);  memcpy (gv_local.conv2to4na[211], "TCAT", 4);
-  memcpy (gv_local.conv2to4na[212], "TCCA", 4);  memcpy (gv_local.conv2to4na[213], "TCCC", 4);
-  memcpy (gv_local.conv2to4na[214], "TCCG", 4);  memcpy (gv_local.conv2to4na[215], "TCCT", 4);
-  memcpy (gv_local.conv2to4na[216], "TCGA", 4);  memcpy (gv_local.conv2to4na[217], "TCGC", 4);
-  memcpy (gv_local.conv2to4na[218], "TCGG", 4);  memcpy (gv_local.conv2to4na[219], "TCGT", 4);
-  memcpy (gv_local.conv2to4na[220], "TCTA", 4);  memcpy (gv_local.conv2to4na[221], "TCTC", 4);
-  memcpy (gv_local.conv2to4na[222], "TCTG", 4);  memcpy (gv_local.conv2to4na[223], "TCTT", 4);
-  memcpy (gv_local.conv2to4na[224], "TGAA", 4);  memcpy (gv_local.conv2to4na[225], "TGAC", 4);
-  memcpy (gv_local.conv2to4na[226], "TGAG", 4);  memcpy (gv_local.conv2to4na[227], "TGAT", 4);
-  memcpy (gv_local.conv2to4na[228], "TGCA", 4);  memcpy (gv_local.conv2to4na[229], "TGCC", 4);
-  memcpy (gv_local.conv2to4na[230], "TGCG", 4);  memcpy (gv_local.conv2to4na[231], "TGCT", 4);
-  memcpy (gv_local.conv2to4na[232], "TGGA", 4);  memcpy (gv_local.conv2to4na[233], "TGGC", 4);
-  memcpy (gv_local.conv2to4na[234], "TGGG", 4);  memcpy (gv_local.conv2to4na[235], "TGGT", 4);
-  memcpy (gv_local.conv2to4na[236], "TGTA", 4);  memcpy (gv_local.conv2to4na[237], "TGTC", 4);
-  memcpy (gv_local.conv2to4na[238], "TGTG", 4);  memcpy (gv_local.conv2to4na[239], "TGTT", 4);
-  memcpy (gv_local.conv2to4na[240], "TTAA", 4);  memcpy (gv_local.conv2to4na[241], "TTAC", 4);
-  memcpy (gv_local.conv2to4na[242], "TTAG", 4);  memcpy (gv_local.conv2to4na[243], "TTAT", 4);
-  memcpy (gv_local.conv2to4na[244], "TTCA", 4);  memcpy (gv_local.conv2to4na[245], "TTCC", 4);
-  memcpy (gv_local.conv2to4na[246], "TTCG", 4);  memcpy (gv_local.conv2to4na[247], "TTCT", 4);
-  memcpy (gv_local.conv2to4na[248], "TTGA", 4);  memcpy (gv_local.conv2to4na[249], "TTGC", 4);
-  memcpy (gv_local.conv2to4na[250], "TTGG", 4);  memcpy (gv_local.conv2to4na[251], "TTGT", 4);
-  memcpy (gv_local.conv2to4na[252], "TTTA", 4);  memcpy (gv_local.conv2to4na[253], "TTTC", 4);
-  memcpy (gv_local.conv2to4na[254], "TTTG", 4);  memcpy (gv_local.conv2to4na[255], "TTTT", 4);
-
-  memcpy (gv_local.conv2to4cs[  0], "0000", 4);  memcpy (gv_local.conv2to4cs[  1], "0001", 4);
-  memcpy (gv_local.conv2to4cs[  2], "0002", 4);  memcpy (gv_local.conv2to4cs[  3], "0003", 4);
-  memcpy (gv_local.conv2to4cs[  4], "0010", 4);  memcpy (gv_local.conv2to4cs[  5], "0011", 4);
-  memcpy (gv_local.conv2to4cs[  6], "0012", 4);  memcpy (gv_local.conv2to4cs[  7], "0013", 4);
-  memcpy (gv_local.conv2to4cs[  8], "0020", 4);  memcpy (gv_local.conv2to4cs[  9], "0021", 4);
-  memcpy (gv_local.conv2to4cs[ 10], "0022", 4);  memcpy (gv_local.conv2to4cs[ 11], "0023", 4);
-  memcpy (gv_local.conv2to4cs[ 12], "0030", 4);  memcpy (gv_local.conv2to4cs[ 13], "0031", 4);
-  memcpy (gv_local.conv2to4cs[ 14], "0032", 4);  memcpy (gv_local.conv2to4cs[ 15], "0033", 4);
-  memcpy (gv_local.conv2to4cs[ 16], "0100", 4);  memcpy (gv_local.conv2to4cs[ 17], "0101", 4);
-  memcpy (gv_local.conv2to4cs[ 18], "0102", 4);  memcpy (gv_local.conv2to4cs[ 19], "0103", 4);
-  memcpy (gv_local.conv2to4cs[ 20], "0110", 4);  memcpy (gv_local.conv2to4cs[ 21], "0111", 4);
-  memcpy (gv_local.conv2to4cs[ 22], "0112", 4);  memcpy (gv_local.conv2to4cs[ 23], "0113", 4);
-  memcpy (gv_local.conv2to4cs[ 24], "0120", 4);  memcpy (gv_local.conv2to4cs[ 25], "0121", 4);
-  memcpy (gv_local.conv2to4cs[ 26], "0122", 4);  memcpy (gv_local.conv2to4cs[ 27], "0123", 4);
-  memcpy (gv_local.conv2to4cs[ 28], "0130", 4);  memcpy (gv_local.conv2to4cs[ 29], "0131", 4);
-  memcpy (gv_local.conv2to4cs[ 30], "0132", 4);  memcpy (gv_local.conv2to4cs[ 31], "0133", 4);
-  memcpy (gv_local.conv2to4cs[ 32], "0200", 4);  memcpy (gv_local.conv2to4cs[ 33], "0201", 4);
-  memcpy (gv_local.conv2to4cs[ 34], "0202", 4);  memcpy (gv_local.conv2to4cs[ 35], "0203", 4);
-  memcpy (gv_local.conv2to4cs[ 36], "0210", 4);  memcpy (gv_local.conv2to4cs[ 37], "0211", 4);
-  memcpy (gv_local.conv2to4cs[ 38], "0212", 4);  memcpy (gv_local.conv2to4cs[ 39], "0213", 4);
-  memcpy (gv_local.conv2to4cs[ 40], "0220", 4);  memcpy (gv_local.conv2to4cs[ 41], "0221", 4);
-  memcpy (gv_local.conv2to4cs[ 42], "0222", 4);  memcpy (gv_local.conv2to4cs[ 43], "0223", 4);
-  memcpy (gv_local.conv2to4cs[ 44], "0230", 4);  memcpy (gv_local.conv2to4cs[ 45], "0231", 4);
-  memcpy (gv_local.conv2to4cs[ 46], "0232", 4);  memcpy (gv_local.conv2to4cs[ 47], "0233", 4);
-  memcpy (gv_local.conv2to4cs[ 48], "0300", 4);  memcpy (gv_local.conv2to4cs[ 49], "0301", 4);
-  memcpy (gv_local.conv2to4cs[ 50], "0302", 4);  memcpy (gv_local.conv2to4cs[ 51], "0303", 4);
-  memcpy (gv_local.conv2to4cs[ 52], "0310", 4);  memcpy (gv_local.conv2to4cs[ 53], "0311", 4);
-  memcpy (gv_local.conv2to4cs[ 54], "0312", 4);  memcpy (gv_local.conv2to4cs[ 55], "0313", 4);
-  memcpy (gv_local.conv2to4cs[ 56], "0320", 4);  memcpy (gv_local.conv2to4cs[ 57], "0321", 4);
-  memcpy (gv_local.conv2to4cs[ 58], "0322", 4);  memcpy (gv_local.conv2to4cs[ 59], "0323", 4);
-  memcpy (gv_local.conv2to4cs[ 60], "0330", 4);  memcpy (gv_local.conv2to4cs[ 61], "0331", 4);
-  memcpy (gv_local.conv2to4cs[ 62], "0332", 4);  memcpy (gv_local.conv2to4cs[ 63], "0333", 4);
-  memcpy (gv_local.conv2to4cs[ 64], "1000", 4);  memcpy (gv_local.conv2to4cs[ 65], "1001", 4);
-  memcpy (gv_local.conv2to4cs[ 66], "1002", 4);  memcpy (gv_local.conv2to4cs[ 67], "1003", 4);
-  memcpy (gv_local.conv2to4cs[ 68], "1010", 4);  memcpy (gv_local.conv2to4cs[ 69], "1011", 4);
-  memcpy (gv_local.conv2to4cs[ 70], "1012", 4);  memcpy (gv_local.conv2to4cs[ 71], "1013", 4);
-  memcpy (gv_local.conv2to4cs[ 72], "1020", 4);  memcpy (gv_local.conv2to4cs[ 73], "1021", 4);
-  memcpy (gv_local.conv2to4cs[ 74], "1022", 4);  memcpy (gv_local.conv2to4cs[ 75], "1023", 4);
-  memcpy (gv_local.conv2to4cs[ 76], "1030", 4);  memcpy (gv_local.conv2to4cs[ 77], "1031", 4);
-  memcpy (gv_local.conv2to4cs[ 78], "1032", 4);  memcpy (gv_local.conv2to4cs[ 79], "1033", 4);
-  memcpy (gv_local.conv2to4cs[ 80], "1100", 4);  memcpy (gv_local.conv2to4cs[ 81], "1101", 4);
-  memcpy (gv_local.conv2to4cs[ 82], "1102", 4);  memcpy (gv_local.conv2to4cs[ 83], "1103", 4);
-  memcpy (gv_local.conv2to4cs[ 84], "1110", 4);  memcpy (gv_local.conv2to4cs[ 85], "1111", 4);
-  memcpy (gv_local.conv2to4cs[ 86], "1112", 4);  memcpy (gv_local.conv2to4cs[ 87], "1113", 4);
-  memcpy (gv_local.conv2to4cs[ 88], "1120", 4);  memcpy (gv_local.conv2to4cs[ 89], "1121", 4);
-  memcpy (gv_local.conv2to4cs[ 90], "1122", 4);  memcpy (gv_local.conv2to4cs[ 91], "1123", 4);
-  memcpy (gv_local.conv2to4cs[ 92], "1130", 4);  memcpy (gv_local.conv2to4cs[ 93], "1131", 4);
-  memcpy (gv_local.conv2to4cs[ 94], "1132", 4);  memcpy (gv_local.conv2to4cs[ 95], "1133", 4);
-  memcpy (gv_local.conv2to4cs[ 96], "1200", 4);  memcpy (gv_local.conv2to4cs[ 97], "1201", 4);
-  memcpy (gv_local.conv2to4cs[ 98], "1202", 4);  memcpy (gv_local.conv2to4cs[ 99], "1203", 4);
-  memcpy (gv_local.conv2to4cs[100], "1210", 4);  memcpy (gv_local.conv2to4cs[101], "1211", 4);
-  memcpy (gv_local.conv2to4cs[102], "1212", 4);  memcpy (gv_local.conv2to4cs[103], "1213", 4);
-  memcpy (gv_local.conv2to4cs[104], "1220", 4);  memcpy (gv_local.conv2to4cs[105], "1221", 4);
-  memcpy (gv_local.conv2to4cs[106], "1222", 4);  memcpy (gv_local.conv2to4cs[107], "1223", 4);
-  memcpy (gv_local.conv2to4cs[108], "1230", 4);  memcpy (gv_local.conv2to4cs[109], "1231", 4);
-  memcpy (gv_local.conv2to4cs[110], "1232", 4);  memcpy (gv_local.conv2to4cs[111], "1233", 4);
-  memcpy (gv_local.conv2to4cs[112], "1300", 4);  memcpy (gv_local.conv2to4cs[113], "1301", 4);
-  memcpy (gv_local.conv2to4cs[114], "1302", 4);  memcpy (gv_local.conv2to4cs[115], "1303", 4);
-  memcpy (gv_local.conv2to4cs[116], "1310", 4);  memcpy (gv_local.conv2to4cs[117], "1311", 4);
-  memcpy (gv_local.conv2to4cs[118], "1312", 4);  memcpy (gv_local.conv2to4cs[119], "1313", 4);
-  memcpy (gv_local.conv2to4cs[120], "1320", 4);  memcpy (gv_local.conv2to4cs[121], "1321", 4);
-  memcpy (gv_local.conv2to4cs[122], "1322", 4);  memcpy (gv_local.conv2to4cs[123], "1323", 4);
-  memcpy (gv_local.conv2to4cs[124], "1330", 4);  memcpy (gv_local.conv2to4cs[125], "1331", 4);
-  memcpy (gv_local.conv2to4cs[126], "1332", 4);  memcpy (gv_local.conv2to4cs[127], "1333", 4);
-  memcpy (gv_local.conv2to4cs[128], "2000", 4);  memcpy (gv_local.conv2to4cs[129], "2001", 4);
-  memcpy (gv_local.conv2to4cs[130], "2002", 4);  memcpy (gv_local.conv2to4cs[131], "2003", 4);
-  memcpy (gv_local.conv2to4cs[132], "2010", 4);  memcpy (gv_local.conv2to4cs[133], "2011", 4);
-  memcpy (gv_local.conv2to4cs[134], "2012", 4);  memcpy (gv_local.conv2to4cs[135], "2013", 4);
-  memcpy (gv_local.conv2to4cs[136], "2020", 4);  memcpy (gv_local.conv2to4cs[137], "2021", 4);
-  memcpy (gv_local.conv2to4cs[138], "2022", 4);  memcpy (gv_local.conv2to4cs[139], "2023", 4);
-  memcpy (gv_local.conv2to4cs[140], "2030", 4);  memcpy (gv_local.conv2to4cs[141], "2031", 4);
-  memcpy (gv_local.conv2to4cs[142], "2032", 4);  memcpy (gv_local.conv2to4cs[143], "2033", 4);
-  memcpy (gv_local.conv2to4cs[144], "2100", 4);  memcpy (gv_local.conv2to4cs[145], "2101", 4);
-  memcpy (gv_local.conv2to4cs[146], "2102", 4);  memcpy (gv_local.conv2to4cs[147], "2103", 4);
-  memcpy (gv_local.conv2to4cs[148], "2110", 4);  memcpy (gv_local.conv2to4cs[149], "2111", 4);
-  memcpy (gv_local.conv2to4cs[150], "2112", 4);  memcpy (gv_local.conv2to4cs[151], "2113", 4);
-  memcpy (gv_local.conv2to4cs[152], "2120", 4);  memcpy (gv_local.conv2to4cs[153], "2121", 4);
-  memcpy (gv_local.conv2to4cs[154], "2122", 4);  memcpy (gv_local.conv2to4cs[155], "2123", 4);
-  memcpy (gv_local.conv2to4cs[156], "2130", 4);  memcpy (gv_local.conv2to4cs[157], "2131", 4);
-  memcpy (gv_local.conv2to4cs[158], "2132", 4);  memcpy (gv_local.conv2to4cs[159], "2133", 4);
-  memcpy (gv_local.conv2to4cs[160], "2200", 4);  memcpy (gv_local.conv2to4cs[161], "2201", 4);
-  memcpy (gv_local.conv2to4cs[162], "2202", 4);  memcpy (gv_local.conv2to4cs[163], "2203", 4);
-  memcpy (gv_local.conv2to4cs[164], "2210", 4);  memcpy (gv_local.conv2to4cs[165], "2211", 4);
-  memcpy (gv_local.conv2to4cs[166], "2212", 4);  memcpy (gv_local.conv2to4cs[167], "2213", 4);
-  memcpy (gv_local.conv2to4cs[168], "2220", 4);  memcpy (gv_local.conv2to4cs[169], "2221", 4);
-  memcpy (gv_local.conv2to4cs[170], "2222", 4);  memcpy (gv_local.conv2to4cs[171], "2223", 4);
-  memcpy (gv_local.conv2to4cs[172], "2230", 4);  memcpy (gv_local.conv2to4cs[173], "2231", 4);
-  memcpy (gv_local.conv2to4cs[174], "2232", 4);  memcpy (gv_local.conv2to4cs[175], "2233", 4);
-  memcpy (gv_local.conv2to4cs[176], "2300", 4);  memcpy (gv_local.conv2to4cs[177], "2301", 4);
-  memcpy (gv_local.conv2to4cs[178], "2302", 4);  memcpy (gv_local.conv2to4cs[179], "2303", 4);
-  memcpy (gv_local.conv2to4cs[180], "2310", 4);  memcpy (gv_local.conv2to4cs[181], "2311", 4);
-  memcpy (gv_local.conv2to4cs[182], "2312", 4);  memcpy (gv_local.conv2to4cs[183], "2313", 4);
-  memcpy (gv_local.conv2to4cs[184], "2320", 4);  memcpy (gv_local.conv2to4cs[185], "2321", 4);
-  memcpy (gv_local.conv2to4cs[186], "2322", 4);  memcpy (gv_local.conv2to4cs[187], "2323", 4);
-  memcpy (gv_local.conv2to4cs[188], "2330", 4);  memcpy (gv_local.conv2to4cs[189], "2331", 4);
-  memcpy (gv_local.conv2to4cs[190], "2332", 4);  memcpy (gv_local.conv2to4cs[191], "2333", 4);
-  memcpy (gv_local.conv2to4cs[192], "3000", 4);  memcpy (gv_local.conv2to4cs[193], "3001", 4);
-  memcpy (gv_local.conv2to4cs[194], "3002", 4);  memcpy (gv_local.conv2to4cs[195], "3003", 4);
-  memcpy (gv_local.conv2to4cs[196], "3010", 4);  memcpy (gv_local.conv2to4cs[197], "3011", 4);
-  memcpy (gv_local.conv2to4cs[198], "3012", 4);  memcpy (gv_local.conv2to4cs[199], "3013", 4);
-  memcpy (gv_local.conv2to4cs[200], "3020", 4);  memcpy (gv_local.conv2to4cs[201], "3021", 4);
-  memcpy (gv_local.conv2to4cs[202], "3022", 4);  memcpy (gv_local.conv2to4cs[203], "3023", 4);
-  memcpy (gv_local.conv2to4cs[204], "3030", 4);  memcpy (gv_local.conv2to4cs[205], "3031", 4);
-  memcpy (gv_local.conv2to4cs[206], "3032", 4);  memcpy (gv_local.conv2to4cs[207], "3033", 4);
-  memcpy (gv_local.conv2to4cs[208], "3100", 4);  memcpy (gv_local.conv2to4cs[209], "3101", 4);
-  memcpy (gv_local.conv2to4cs[210], "3102", 4);  memcpy (gv_local.conv2to4cs[211], "3103", 4);
-  memcpy (gv_local.conv2to4cs[212], "3110", 4);  memcpy (gv_local.conv2to4cs[213], "3111", 4);
-  memcpy (gv_local.conv2to4cs[214], "3112", 4);  memcpy (gv_local.conv2to4cs[215], "3113", 4);
-  memcpy (gv_local.conv2to4cs[216], "3120", 4);  memcpy (gv_local.conv2to4cs[217], "3121", 4);
-  memcpy (gv_local.conv2to4cs[218], "3122", 4);  memcpy (gv_local.conv2to4cs[219], "3123", 4);
-  memcpy (gv_local.conv2to4cs[220], "3130", 4);  memcpy (gv_local.conv2to4cs[221], "3131", 4);
-  memcpy (gv_local.conv2to4cs[222], "3132", 4);  memcpy (gv_local.conv2to4cs[223], "3133", 4);
-  memcpy (gv_local.conv2to4cs[224], "3200", 4);  memcpy (gv_local.conv2to4cs[225], "3201", 4);
-  memcpy (gv_local.conv2to4cs[226], "3202", 4);  memcpy (gv_local.conv2to4cs[227], "3203", 4);
-  memcpy (gv_local.conv2to4cs[228], "3210", 4);  memcpy (gv_local.conv2to4cs[229], "3211", 4);
-  memcpy (gv_local.conv2to4cs[230], "3212", 4);  memcpy (gv_local.conv2to4cs[231], "3213", 4);
-  memcpy (gv_local.conv2to4cs[232], "3220", 4);  memcpy (gv_local.conv2to4cs[233], "3221", 4);
-  memcpy (gv_local.conv2to4cs[234], "3222", 4);  memcpy (gv_local.conv2to4cs[235], "3223", 4);
-  memcpy (gv_local.conv2to4cs[236], "3230", 4);  memcpy (gv_local.conv2to4cs[237], "3231", 4);
-  memcpy (gv_local.conv2to4cs[238], "3232", 4);  memcpy (gv_local.conv2to4cs[239], "3233", 4);
-  memcpy (gv_local.conv2to4cs[240], "3300", 4);  memcpy (gv_local.conv2to4cs[241], "3301", 4);
-  memcpy (gv_local.conv2to4cs[242], "3302", 4);  memcpy (gv_local.conv2to4cs[243], "3303", 4);
-  memcpy (gv_local.conv2to4cs[244], "3310", 4);  memcpy (gv_local.conv2to4cs[245], "3311", 4);
-  memcpy (gv_local.conv2to4cs[246], "3312", 4);  memcpy (gv_local.conv2to4cs[247], "3313", 4);
-  memcpy (gv_local.conv2to4cs[248], "3320", 4);  memcpy (gv_local.conv2to4cs[249], "3321", 4);
-  memcpy (gv_local.conv2to4cs[250], "3322", 4);  memcpy (gv_local.conv2to4cs[251], "3323", 4);
-  memcpy (gv_local.conv2to4cs[252], "3330", 4);  memcpy (gv_local.conv2to4cs[253], "3331", 4);
-  memcpy (gv_local.conv2to4cs[254], "3332", 4);  memcpy (gv_local.conv2to4cs[255], "3333", 4);
-  gv_local.lookup_454_seq_initialized = 1;
-}
-/*
- */
-static void _s_init_pos_454_default (void)
-{
-  memset (gv_local.lookup_454_pos, 0, sizeof(SRALookup)*POS_454_HUFF_TREESIZE);
-
-  gv_local.lookup_454_pos[  0].nbits =  2; gv_local.lookup_454_pos[  0].bits = 0xC0000000;
-  gv_local.lookup_454_pos[  1].nbits =  3; gv_local.lookup_454_pos[  1].bits = 0x20000000;
-  gv_local.lookup_454_pos[  2].nbits =  2; gv_local.lookup_454_pos[  2].bits = 0x40000000;
-  gv_local.lookup_454_pos[  3].nbits =  2; gv_local.lookup_454_pos[  3].bits = 0x80000000;
-  gv_local.lookup_454_pos[  4].nbits =  4; gv_local.lookup_454_pos[  4].bits = 0x10000000;
-  gv_local.lookup_454_pos[  5].nbits =  6; gv_local.lookup_454_pos[  5].bits = 0x04000000;
-  gv_local.lookup_454_pos[  6].nbits = 11; gv_local.lookup_454_pos[  6].bits = 0x0E400000;
-  gv_local.lookup_454_pos[  7].nbits =  8; gv_local.lookup_454_pos[  7].bits = 0x0F000000;
-  gv_local.lookup_454_pos[  8].nbits =  7; gv_local.lookup_454_pos[  8].bits = 0x0C000000;
-  gv_local.lookup_454_pos[  9].nbits =  9; gv_local.lookup_454_pos[  9].bits = 0x08800000;
-  gv_local.lookup_454_pos[ 10].nbits = 12; gv_local.lookup_454_pos[ 10].bits = 0x0A000000;
-  gv_local.lookup_454_pos[ 11].nbits =  6; gv_local.lookup_454_pos[ 11].bits = 0x00000000;
-  gv_local.lookup_454_pos[ 12].nbits =  8; gv_local.lookup_454_pos[ 12].bits = 0x09000000;
-  gv_local.lookup_454_pos[ 13].nbits = 11; gv_local.lookup_454_pos[ 13].bits = 0x0AC00000;
-  gv_local.lookup_454_pos[ 14].nbits = 14; gv_local.lookup_454_pos[ 14].bits = 0x0E240000;
-  gv_local.lookup_454_pos[ 15].nbits =  9; gv_local.lookup_454_pos[ 15].bits = 0x0E800000;
-  gv_local.lookup_454_pos[ 16].nbits =  9; gv_local.lookup_454_pos[ 16].bits = 0x0B000000;
-  gv_local.lookup_454_pos[ 17].nbits = 12; gv_local.lookup_454_pos[ 17].bits = 0x0A300000;
-  gv_local.lookup_454_pos[ 18].nbits = 13; gv_local.lookup_454_pos[ 18].bits = 0x08580000;
-  gv_local.lookup_454_pos[ 19].nbits = 12; gv_local.lookup_454_pos[ 19].bits = 0x0E600000;
-  gv_local.lookup_454_pos[ 20].nbits = 10; gv_local.lookup_454_pos[ 20].bits = 0x0B800000;
-  gv_local.lookup_454_pos[ 21].nbits = 13; gv_local.lookup_454_pos[ 21].bits = 0x08400000;
-  gv_local.lookup_454_pos[ 22].nbits = 14; gv_local.lookup_454_pos[ 22].bits = 0x08540000;
-  gv_local.lookup_454_pos[ 23].nbits = 13; gv_local.lookup_454_pos[ 23].bits = 0x0E280000;
-  gv_local.lookup_454_pos[ 24].nbits = 10; gv_local.lookup_454_pos[ 24].bits = 0x0A400000;
-  gv_local.lookup_454_pos[ 25].nbits = 13; gv_local.lookup_454_pos[ 25].bits = 0x0E000000;
-  gv_local.lookup_454_pos[ 26].nbits = 14; gv_local.lookup_454_pos[ 26].bits = 0x0E180000;
-  gv_local.lookup_454_pos[ 27].nbits = 13; gv_local.lookup_454_pos[ 27].bits = 0x0E380000;
-  gv_local.lookup_454_pos[ 28].nbits = 10; gv_local.lookup_454_pos[ 28].bits = 0x08000000;
-  gv_local.lookup_454_pos[ 29].nbits = 14; gv_local.lookup_454_pos[ 29].bits = 0x0E0C0000;
-  gv_local.lookup_454_pos[ 30].nbits = 15; gv_local.lookup_454_pos[ 30].bits = 0x0AB40000;
-  gv_local.lookup_454_pos[ 31].nbits = 13; gv_local.lookup_454_pos[ 31].bits = 0x0AA00000;
-  gv_local.lookup_454_pos[ 32].nbits = 11; gv_local.lookup_454_pos[ 32].bits = 0x0A800000;
-  gv_local.lookup_454_pos[ 33].nbits = 14; gv_local.lookup_454_pos[ 33].bits = 0x084C0000;
-  gv_local.lookup_454_pos[ 34].nbits = 16; gv_local.lookup_454_pos[ 34].bits = 0x0AB60000;
-  gv_local.lookup_454_pos[ 35].nbits = 14; gv_local.lookup_454_pos[ 35].bits = 0x0E200000;
-  gv_local.lookup_454_pos[ 36].nbits = 12; gv_local.lookup_454_pos[ 36].bits = 0x0E700000;
-  gv_local.lookup_454_pos[ 37].nbits = 14; gv_local.lookup_454_pos[ 37].bits = 0x0ABC0000;
-  gv_local.lookup_454_pos[ 38].nbits = 15; gv_local.lookup_454_pos[ 38].bits = 0x0E080000;
-  gv_local.lookup_454_pos[ 39].nbits = 13; gv_local.lookup_454_pos[ 39].bits = 0x0AA80000;
-  gv_local.lookup_454_pos[ 40].nbits = 11; gv_local.lookup_454_pos[ 40].bits = 0x08600000;
-  gv_local.lookup_454_pos[ 41].nbits = 14; gv_local.lookup_454_pos[ 41].bits = 0x0AB00000;
-  gv_local.lookup_454_pos[ 42].nbits = 16; gv_local.lookup_454_pos[ 42].bits = 0x0E1E0000;
-  gv_local.lookup_454_pos[ 43].nbits = 14; gv_local.lookup_454_pos[ 43].bits = 0x08500000;
-  gv_local.lookup_454_pos[ 44].nbits = 12; gv_local.lookup_454_pos[ 44].bits = 0x0AF00000;
-  gv_local.lookup_454_pos[ 45].nbits = 14; gv_local.lookup_454_pos[ 45].bits = 0x0A1C0000;
-  gv_local.lookup_454_pos[ 46].nbits = 14; gv_local.lookup_454_pos[ 46].bits = 0x08480000;
-  gv_local.lookup_454_pos[ 47].nbits = 13; gv_local.lookup_454_pos[ 47].bits = 0x0E300000;
-  gv_local.lookup_454_pos[ 48].nbits = 12; gv_local.lookup_454_pos[ 48].bits = 0x0AE00000;
-  gv_local.lookup_454_pos[ 49].nbits = 14; gv_local.lookup_454_pos[ 49].bits = 0x0AB80000;
-  gv_local.lookup_454_pos[ 50].nbits = 16; gv_local.lookup_454_pos[ 50].bits = 0x0A1B0000;
-  gv_local.lookup_454_pos[ 51].nbits = 15; gv_local.lookup_454_pos[ 51].bits = 0x0A180000;
-  gv_local.lookup_454_pos[ 52].nbits = 12; gv_local.lookup_454_pos[ 52].bits = 0x0A200000;
-  gv_local.lookup_454_pos[ 53].nbits = 15; gv_local.lookup_454_pos[ 53].bits = 0x0E1C0000;
-  gv_local.lookup_454_pos[ 54].nbits = 16; gv_local.lookup_454_pos[ 54].bits = 0x0A1A0000;
-  gv_local.lookup_454_pos[ 55].nbits = 16; gv_local.lookup_454_pos[ 55].bits = 0x0E1F0000;
-  gv_local.lookup_454_pos[ 56].nbits = 13; gv_local.lookup_454_pos[ 56].bits = 0x0E100000;
-  gv_local.lookup_454_pos[ 57].nbits = 17; gv_local.lookup_454_pos[ 57].bits = 0x0AB78000;
-  gv_local.lookup_454_pos[ 58].nbits = 18; gv_local.lookup_454_pos[ 58].bits = 0x0AB70000;
-  gv_local.lookup_454_pos[ 59].nbits = 15; gv_local.lookup_454_pos[ 59].bits = 0x0E0A0000;
-  gv_local.lookup_454_pos[ 60].nbits = 13; gv_local.lookup_454_pos[ 60].bits = 0x0A100000;
-  gv_local.lookup_454_pos[ 61].nbits = 19; gv_local.lookup_454_pos[ 61].bits = 0x0AB76000;
-  gv_local.lookup_454_pos[ 62].nbits = 19; gv_local.lookup_454_pos[ 62].bits = 0x0AB74000;
-  gv_local.lookup_454_pos[ 63].nbits = 10; gv_local.lookup_454_pos[ 63].bits = 0x0BC00000;
-
-  _s_sort_lookup (gv_local.lookup_454_pos, gv_local.idx_454_pos, POS_454_HUFF_TREESIZE);
-
-  gv_local.lookup_454_pos_initialized = 1;
-}
-/*
- */
-static void _s_init_prb_454_default (void)
-{
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  int      i, j;
-  uint16_t val;
-#endif
-
-  memset (gv_local.lookup_454_prb, 0, sizeof(SRALookup)*PRB_454_HUFF_TREESIZE);
-  
-  gv_local.lookup_454_prb[  0].nbits = 10; gv_local.lookup_454_prb[  0].bits = 0xA0400000;
-  gv_local.lookup_454_prb[  1].nbits =  9; gv_local.lookup_454_prb[  1].bits = 0xA0800000;
-  gv_local.lookup_454_prb[  2].nbits =  9; gv_local.lookup_454_prb[  2].bits = 0xA8800000;
-  gv_local.lookup_454_prb[  3].nbits =  9; gv_local.lookup_454_prb[  3].bits = 0xA8000000;
-  gv_local.lookup_454_prb[  4].nbits =  9; gv_local.lookup_454_prb[  4].bits = 0xDA000000;
-  gv_local.lookup_454_prb[  5].nbits =  9; gv_local.lookup_454_prb[  5].bits = 0xDA800000;
-  gv_local.lookup_454_prb[  6].nbits =  8; gv_local.lookup_454_prb[  6].bits = 0xA4000000;
-  gv_local.lookup_454_prb[  7].nbits =  8; gv_local.lookup_454_prb[  7].bits = 0xBA000000;
-  gv_local.lookup_454_prb[  8].nbits =  8; gv_local.lookup_454_prb[  8].bits = 0xA5000000;
-  gv_local.lookup_454_prb[  9].nbits =  8; gv_local.lookup_454_prb[  9].bits = 0xD4000000;
-  gv_local.lookup_454_prb[ 10].nbits =  8; gv_local.lookup_454_prb[ 10].bits = 0xA9000000;
-  gv_local.lookup_454_prb[ 11].nbits =  8; gv_local.lookup_454_prb[ 11].bits = 0xBB000000;
-  gv_local.lookup_454_prb[ 12].nbits =  8; gv_local.lookup_454_prb[ 12].bits = 0xDB000000;
-  gv_local.lookup_454_prb[ 13].nbits =  8; gv_local.lookup_454_prb[ 13].bits = 0xD5000000;
-  gv_local.lookup_454_prb[ 14].nbits =  7; gv_local.lookup_454_prb[ 14].bits = 0x2A000000;
-  gv_local.lookup_454_prb[ 15].nbits =  7; gv_local.lookup_454_prb[ 15].bits = 0xD0000000;
-  gv_local.lookup_454_prb[ 16].nbits =  7; gv_local.lookup_454_prb[ 16].bits = 0xD6000000;
-  gv_local.lookup_454_prb[ 17].nbits =  6; gv_local.lookup_454_prb[ 17].bits = 0xAC000000;
-  gv_local.lookup_454_prb[ 18].nbits =  7; gv_local.lookup_454_prb[ 18].bits = 0xAA000000;
-  gv_local.lookup_454_prb[ 19].nbits =  7; gv_local.lookup_454_prb[ 19].bits = 0xA2000000;
-  gv_local.lookup_454_prb[ 20].nbits =  6; gv_local.lookup_454_prb[ 20].bits = 0x80000000;
-  gv_local.lookup_454_prb[ 21].nbits =  6; gv_local.lookup_454_prb[ 21].bits = 0x84000000;
-  gv_local.lookup_454_prb[ 22].nbits =  6; gv_local.lookup_454_prb[ 22].bits = 0xBC000000;
-  gv_local.lookup_454_prb[ 23].nbits =  5; gv_local.lookup_454_prb[ 23].bits = 0x88000000;
-  gv_local.lookup_454_prb[ 24].nbits =  5; gv_local.lookup_454_prb[ 24].bits = 0xB0000000;
-  gv_local.lookup_454_prb[ 25].nbits =  4; gv_local.lookup_454_prb[ 25].bits = 0x90000000;
-  gv_local.lookup_454_prb[ 26].nbits =  3; gv_local.lookup_454_prb[ 26].bits = 0x00000000;
-  gv_local.lookup_454_prb[ 27].nbits =  2; gv_local.lookup_454_prb[ 27].bits = 0x40000000;
-  gv_local.lookup_454_prb[ 28].nbits =  3; gv_local.lookup_454_prb[ 28].bits = 0xE0000000;
-  gv_local.lookup_454_prb[ 29].nbits =  8; gv_local.lookup_454_prb[ 29].bits = 0xA1000000;
-  gv_local.lookup_454_prb[ 30].nbits =  7; gv_local.lookup_454_prb[ 30].bits = 0xD2000000;
-  gv_local.lookup_454_prb[ 31].nbits =  6; gv_local.lookup_454_prb[ 31].bits = 0x2C000000;
-  gv_local.lookup_454_prb[ 32].nbits =  5; gv_local.lookup_454_prb[ 32].bits = 0x20000000;
-  gv_local.lookup_454_prb[ 33].nbits =  4; gv_local.lookup_454_prb[ 33].bits = 0x30000000;
-  gv_local.lookup_454_prb[ 34].nbits =  4; gv_local.lookup_454_prb[ 34].bits = 0xC0000000;
-  gv_local.lookup_454_prb[ 35].nbits =  7; gv_local.lookup_454_prb[ 35].bits = 0xD8000000;
-  gv_local.lookup_454_prb[ 36].nbits =  7; gv_local.lookup_454_prb[ 36].bits = 0xB8000000;
-  gv_local.lookup_454_prb[ 37].nbits =  6; gv_local.lookup_454_prb[ 37].bits = 0xDC000000;
-  gv_local.lookup_454_prb[ 38].nbits =  7; gv_local.lookup_454_prb[ 38].bits = 0x28000000;
-  gv_local.lookup_454_prb[ 39].nbits =  7; gv_local.lookup_454_prb[ 39].bits = 0xA6000000;
-  gv_local.lookup_454_prb[ 40].nbits = 15; gv_local.lookup_454_prb[ 40].bits = 0xA0000000;
-  gv_local.lookup_454_prb[ 41].nbits = 14; gv_local.lookup_454_prb[ 41].bits = 0xA03C0000;
-  gv_local.lookup_454_prb[ 42].nbits = 16; gv_local.lookup_454_prb[ 42].bits = 0xA0030000;
-  gv_local.lookup_454_prb[ 43].nbits = 16; gv_local.lookup_454_prb[ 43].bits = 0xA0020000;
-  gv_local.lookup_454_prb[ 44].nbits = 16; gv_local.lookup_454_prb[ 44].bits = 0xA0390000;
-  gv_local.lookup_454_prb[ 45].nbits = 16; gv_local.lookup_454_prb[ 45].bits = 0xA0380000;
-  gv_local.lookup_454_prb[ 46].nbits = 16; gv_local.lookup_454_prb[ 46].bits = 0xA03B0000;
-  gv_local.lookup_454_prb[ 47].nbits = 16; gv_local.lookup_454_prb[ 47].bits = 0xA03A0000;
-  gv_local.lookup_454_prb[ 48].nbits = 16; gv_local.lookup_454_prb[ 48].bits = 0xA00D0000;
-  gv_local.lookup_454_prb[ 49].nbits = 16; gv_local.lookup_454_prb[ 49].bits = 0xA00C0000;
-  gv_local.lookup_454_prb[ 50].nbits = 16; gv_local.lookup_454_prb[ 50].bits = 0xA00F0000;
-  gv_local.lookup_454_prb[ 51].nbits = 16; gv_local.lookup_454_prb[ 51].bits = 0xA00E0000;
-  gv_local.lookup_454_prb[ 52].nbits = 16; gv_local.lookup_454_prb[ 52].bits = 0xA0090000;
-  gv_local.lookup_454_prb[ 53].nbits = 16; gv_local.lookup_454_prb[ 53].bits = 0xA0080000;
-  gv_local.lookup_454_prb[ 54].nbits = 16; gv_local.lookup_454_prb[ 54].bits = 0xA00B0000;
-  gv_local.lookup_454_prb[ 55].nbits = 16; gv_local.lookup_454_prb[ 55].bits = 0xA00A0000;
-  gv_local.lookup_454_prb[ 56].nbits = 16; gv_local.lookup_454_prb[ 56].bits = 0xA0250000;
-  gv_local.lookup_454_prb[ 57].nbits = 16; gv_local.lookup_454_prb[ 57].bits = 0xA0240000;
-  gv_local.lookup_454_prb[ 58].nbits = 16; gv_local.lookup_454_prb[ 58].bits = 0xA0270000;
-  gv_local.lookup_454_prb[ 59].nbits = 16; gv_local.lookup_454_prb[ 59].bits = 0xA0260000;
-  gv_local.lookup_454_prb[ 60].nbits = 16; gv_local.lookup_454_prb[ 60].bits = 0xA0210000;
-  gv_local.lookup_454_prb[ 61].nbits = 16; gv_local.lookup_454_prb[ 61].bits = 0xA0200000;
-  gv_local.lookup_454_prb[ 62].nbits = 16; gv_local.lookup_454_prb[ 62].bits = 0xA0230000;
-  gv_local.lookup_454_prb[ 63].nbits = 16; gv_local.lookup_454_prb[ 63].bits = 0xA0220000;
-  gv_local.lookup_454_prb[ 64].nbits = 16; gv_local.lookup_454_prb[ 64].bits = 0xA02D0000;
-  gv_local.lookup_454_prb[ 65].nbits = 16; gv_local.lookup_454_prb[ 65].bits = 0xA02C0000;
-  gv_local.lookup_454_prb[ 66].nbits = 16; gv_local.lookup_454_prb[ 66].bits = 0xA02F0000;
-  gv_local.lookup_454_prb[ 67].nbits = 16; gv_local.lookup_454_prb[ 67].bits = 0xA02E0000;
-  gv_local.lookup_454_prb[ 68].nbits = 16; gv_local.lookup_454_prb[ 68].bits = 0xA0290000;
-  gv_local.lookup_454_prb[ 69].nbits = 16; gv_local.lookup_454_prb[ 69].bits = 0xA0280000;
-  gv_local.lookup_454_prb[ 70].nbits = 16; gv_local.lookup_454_prb[ 70].bits = 0xA02B0000;
-  gv_local.lookup_454_prb[ 71].nbits = 16; gv_local.lookup_454_prb[ 71].bits = 0xA02A0000;
-  gv_local.lookup_454_prb[ 72].nbits = 16; gv_local.lookup_454_prb[ 72].bits = 0xA0150000;
-  gv_local.lookup_454_prb[ 73].nbits = 16; gv_local.lookup_454_prb[ 73].bits = 0xA0140000;
-  gv_local.lookup_454_prb[ 74].nbits = 16; gv_local.lookup_454_prb[ 74].bits = 0xA0170000;
-  gv_local.lookup_454_prb[ 75].nbits = 16; gv_local.lookup_454_prb[ 75].bits = 0xA0160000;
-  gv_local.lookup_454_prb[ 76].nbits = 16; gv_local.lookup_454_prb[ 76].bits = 0xA0110000;
-  gv_local.lookup_454_prb[ 77].nbits = 16; gv_local.lookup_454_prb[ 77].bits = 0xA0100000;
-  gv_local.lookup_454_prb[ 78].nbits = 16; gv_local.lookup_454_prb[ 78].bits = 0xA0130000;
-  gv_local.lookup_454_prb[ 79].nbits = 16; gv_local.lookup_454_prb[ 79].bits = 0xA0120000;
-  gv_local.lookup_454_prb[ 80].nbits = 16; gv_local.lookup_454_prb[ 80].bits = 0xA01D0000;
-  gv_local.lookup_454_prb[ 81].nbits = 16; gv_local.lookup_454_prb[ 81].bits = 0xA01C0000;
-  gv_local.lookup_454_prb[ 82].nbits = 16; gv_local.lookup_454_prb[ 82].bits = 0xA01F0000;
-  gv_local.lookup_454_prb[ 83].nbits = 16; gv_local.lookup_454_prb[ 83].bits = 0xA01E0000;
-  gv_local.lookup_454_prb[ 84].nbits = 16; gv_local.lookup_454_prb[ 84].bits = 0xA0190000;
-  gv_local.lookup_454_prb[ 85].nbits = 16; gv_local.lookup_454_prb[ 85].bits = 0xA0180000;
-  gv_local.lookup_454_prb[ 86].nbits = 16; gv_local.lookup_454_prb[ 86].bits = 0xA01B0000;
-  gv_local.lookup_454_prb[ 87].nbits = 16; gv_local.lookup_454_prb[ 87].bits = 0xA01A0000;
-  gv_local.lookup_454_prb[ 88].nbits = 16; gv_local.lookup_454_prb[ 88].bits = 0xA0350000;
-  gv_local.lookup_454_prb[ 89].nbits = 16; gv_local.lookup_454_prb[ 89].bits = 0xA0340000;
-  gv_local.lookup_454_prb[ 90].nbits = 16; gv_local.lookup_454_prb[ 90].bits = 0xA0370000;
-  gv_local.lookup_454_prb[ 91].nbits = 16; gv_local.lookup_454_prb[ 91].bits = 0xA0360000;
-  gv_local.lookup_454_prb[ 92].nbits = 16; gv_local.lookup_454_prb[ 92].bits = 0xA0310000;
-  gv_local.lookup_454_prb[ 93].nbits = 16; gv_local.lookup_454_prb[ 93].bits = 0xA0300000;
-  gv_local.lookup_454_prb[ 94].nbits = 16; gv_local.lookup_454_prb[ 94].bits = 0xA0330000;
-  gv_local.lookup_454_prb[ 95].nbits = 16; gv_local.lookup_454_prb[ 95].bits = 0xA0320000;
-  gv_local.lookup_454_prb[ 96].nbits = 16; gv_local.lookup_454_prb[ 96].bits = 0xA0050000;
-  gv_local.lookup_454_prb[ 97].nbits = 16; gv_local.lookup_454_prb[ 97].bits = 0xA0040000;
-  gv_local.lookup_454_prb[ 98].nbits = 16; gv_local.lookup_454_prb[ 98].bits = 0xA0070000;
-  gv_local.lookup_454_prb[ 99].nbits = 16; gv_local.lookup_454_prb[ 99].bits = 0xA0060000;
-
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  /* reverse huffman lookup table
-   */
-  memset (gv_local.rlookup_454_prb, 0, sizeof(uint16_t)*REV_HUFF_TREESIZE_16);
-
-  for (i=0; i<PRB_454_HUFF_TREESIZE; i++)
-  {
-    val = gv_local.lookup_454_prb[i].bits >> 16;
-    gv_local.rlookup_454_prb [val] = (uint16_t) i;
-    for (j=1; j<=(0xFFFF>>gv_local.lookup_454_prb[i].nbits); j++)
-      gv_local.rlookup_454_prb [val+j] = (uint16_t) i;
-  }
-#endif
-  _s_sort_lookup (gv_local.lookup_454_prb, gv_local.idx_454_prb, PRB_454_HUFF_TREESIZE);
-
-  gv_local.lookup_454_prb_initialized = 1;
-}
-/*
- */
-static void _s_init_sig_454_default (void)
-{
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  int      i, j;
-  uint16_t val;
-#endif
-
-  memset (gv_local.lookup_454_sig, 0, sizeof(SRALookup)*SIG_HUFF_TREESIZE);
-
-  gv_local.lookup_454_sig[  0].nbits =  7; gv_local.lookup_454_sig[  0].bits = 0x8C000000;
-  gv_local.lookup_454_sig[  1].nbits =  8; gv_local.lookup_454_sig[  1].bits = 0x65000000;
-  gv_local.lookup_454_sig[  2].nbits =  8; gv_local.lookup_454_sig[  2].bits = 0xCA000000;
-  gv_local.lookup_454_sig[  3].nbits =  7; gv_local.lookup_454_sig[  3].bits = 0x5A000000;
-  gv_local.lookup_454_sig[  4].nbits =  7; gv_local.lookup_454_sig[  4].bits = 0xBC000000;
-  gv_local.lookup_454_sig[  5].nbits =  6; gv_local.lookup_454_sig[  5].bits = 0x48000000;
-  gv_local.lookup_454_sig[  6].nbits =  6; gv_local.lookup_454_sig[  6].bits = 0x98000000;
-  gv_local.lookup_454_sig[  7].nbits =  6; gv_local.lookup_454_sig[  7].bits = 0xFC000000;
-  gv_local.lookup_454_sig[  8].nbits =  5; gv_local.lookup_454_sig[  8].bits = 0x68000000;
-  gv_local.lookup_454_sig[  9].nbits =  5; gv_local.lookup_454_sig[  9].bits = 0xA8000000;
-  gv_local.lookup_454_sig[ 10].nbits =  5; gv_local.lookup_454_sig[ 10].bits = 0xE0000000;
-  gv_local.lookup_454_sig[ 11].nbits =  4; gv_local.lookup_454_sig[ 11].bits = 0x00000000;
-  gv_local.lookup_454_sig[ 12].nbits =  4; gv_local.lookup_454_sig[ 12].bits = 0x10000000;
-  gv_local.lookup_454_sig[ 13].nbits =  5; gv_local.lookup_454_sig[ 13].bits = 0xE8000000;
-  gv_local.lookup_454_sig[ 14].nbits =  5; gv_local.lookup_454_sig[ 14].bits = 0xC0000000;
-  gv_local.lookup_454_sig[ 15].nbits =  5; gv_local.lookup_454_sig[ 15].bits = 0x78000000;
-  gv_local.lookup_454_sig[ 16].nbits =  5; gv_local.lookup_454_sig[ 16].bits = 0x38000000;
-  gv_local.lookup_454_sig[ 17].nbits =  6; gv_local.lookup_454_sig[ 17].bits = 0xCC000000;
-  gv_local.lookup_454_sig[ 18].nbits =  6; gv_local.lookup_454_sig[ 18].bits = 0x80000000;
-  gv_local.lookup_454_sig[ 19].nbits =  6; gv_local.lookup_454_sig[ 19].bits = 0x4C000000;
-  gv_local.lookup_454_sig[ 20].nbits =  7; gv_local.lookup_454_sig[ 20].bits = 0xDE000000;
-  gv_local.lookup_454_sig[ 21].nbits =  7; gv_local.lookup_454_sig[ 21].bits = 0xB0000000;
-  gv_local.lookup_454_sig[ 22].nbits =  7; gv_local.lookup_454_sig[ 22].bits = 0x76000000;
-  gv_local.lookup_454_sig[ 23].nbits =  7; gv_local.lookup_454_sig[ 23].bits = 0x52000000;
-  gv_local.lookup_454_sig[ 24].nbits =  8; gv_local.lookup_454_sig[ 24].bits = 0xF4000000;
-  gv_local.lookup_454_sig[ 25].nbits =  8; gv_local.lookup_454_sig[ 25].bits = 0xBB000000;
-  gv_local.lookup_454_sig[ 26].nbits =  8; gv_local.lookup_454_sig[ 26].bits = 0x8F000000;
-  gv_local.lookup_454_sig[ 27].nbits =  8; gv_local.lookup_454_sig[ 27].bits = 0x64000000;
-  gv_local.lookup_454_sig[ 28].nbits =  8; gv_local.lookup_454_sig[ 28].bits = 0x31000000;
-  gv_local.lookup_454_sig[ 29].nbits =  9; gv_local.lookup_454_sig[ 29].bits = 0xDD000000;
-  gv_local.lookup_454_sig[ 30].nbits =  9; gv_local.lookup_454_sig[ 30].bits = 0xC8000000;
-  gv_local.lookup_454_sig[ 31].nbits =  9; gv_local.lookup_454_sig[ 31].bits = 0x95000000;
-  gv_local.lookup_454_sig[ 32].nbits =  9; gv_local.lookup_454_sig[ 32].bits = 0x74800000;
-  gv_local.lookup_454_sig[ 33].nbits =  9; gv_local.lookup_454_sig[ 33].bits = 0x57800000;
-  gv_local.lookup_454_sig[ 34].nbits =  9; gv_local.lookup_454_sig[ 34].bits = 0x30000000;
-  gv_local.lookup_454_sig[ 35].nbits = 10; gv_local.lookup_454_sig[ 35].bits = 0xF0C00000;
-  gv_local.lookup_454_sig[ 36].nbits = 10; gv_local.lookup_454_sig[ 36].bits = 0xCB000000;
-  gv_local.lookup_454_sig[ 37].nbits = 10; gv_local.lookup_454_sig[ 37].bits = 0xA5400000;
-  gv_local.lookup_454_sig[ 38].nbits = 10; gv_local.lookup_454_sig[ 38].bits = 0x8E000000;
-  gv_local.lookup_454_sig[ 39].nbits = 10; gv_local.lookup_454_sig[ 39].bits = 0x70C00000;
-  gv_local.lookup_454_sig[ 40].nbits = 10; gv_local.lookup_454_sig[ 40].bits = 0x56400000;
-  gv_local.lookup_454_sig[ 41].nbits = 10; gv_local.lookup_454_sig[ 41].bits = 0x30C00000;
-  gv_local.lookup_454_sig[ 42].nbits = 11; gv_local.lookup_454_sig[ 42].bits = 0xF5400000;
-  gv_local.lookup_454_sig[ 43].nbits = 11; gv_local.lookup_454_sig[ 43].bits = 0xD0600000;
-  gv_local.lookup_454_sig[ 44].nbits = 11; gv_local.lookup_454_sig[ 44].bits = 0xB3800000;
-  gv_local.lookup_454_sig[ 45].nbits = 11; gv_local.lookup_454_sig[ 45].bits = 0x97400000;
-  gv_local.lookup_454_sig[ 46].nbits = 11; gv_local.lookup_454_sig[ 46].bits = 0x86200000;
-  gv_local.lookup_454_sig[ 47].nbits = 11; gv_local.lookup_454_sig[ 47].bits = 0x70600000;
-  gv_local.lookup_454_sig[ 48].nbits = 11; gv_local.lookup_454_sig[ 48].bits = 0x66400000;
-  gv_local.lookup_454_sig[ 49].nbits = 11; gv_local.lookup_454_sig[ 49].bits = 0x5DE00000;
-  gv_local.lookup_454_sig[ 50].nbits = 12; gv_local.lookup_454_sig[ 50].bits = 0xF0000000;
-  gv_local.lookup_454_sig[ 51].nbits = 12; gv_local.lookup_454_sig[ 51].bits = 0x75000000;
-  gv_local.lookup_454_sig[ 52].nbits = 12; gv_local.lookup_454_sig[ 52].bits = 0x74500000;
-  gv_local.lookup_454_sig[ 53].nbits = 12; gv_local.lookup_454_sig[ 53].bits = 0x74200000;
-  gv_local.lookup_454_sig[ 54].nbits = 12; gv_local.lookup_454_sig[ 54].bits = 0x70A00000;
-  gv_local.lookup_454_sig[ 55].nbits = 12; gv_local.lookup_454_sig[ 55].bits = 0x70500000;
-  gv_local.lookup_454_sig[ 56].nbits = 12; gv_local.lookup_454_sig[ 56].bits = 0x66700000;
-  gv_local.lookup_454_sig[ 57].nbits = 12; gv_local.lookup_454_sig[ 57].bits = 0x66100000;
-  gv_local.lookup_454_sig[ 58].nbits = 12; gv_local.lookup_454_sig[ 58].bits = 0x5DB00000;
-  gv_local.lookup_454_sig[ 59].nbits = 12; gv_local.lookup_454_sig[ 59].bits = 0x5D400000;
-  gv_local.lookup_454_sig[ 60].nbits = 12; gv_local.lookup_454_sig[ 60].bits = 0x5D100000;
-  gv_local.lookup_454_sig[ 61].nbits = 12; gv_local.lookup_454_sig[ 61].bits = 0x58600000;
-  gv_local.lookup_454_sig[ 62].nbits = 12; gv_local.lookup_454_sig[ 62].bits = 0x58300000;
-  gv_local.lookup_454_sig[ 63].nbits = 12; gv_local.lookup_454_sig[ 63].bits = 0x58700000;
-  gv_local.lookup_454_sig[ 64].nbits = 12; gv_local.lookup_454_sig[ 64].bits = 0x59800000;
-  gv_local.lookup_454_sig[ 65].nbits = 12; gv_local.lookup_454_sig[ 65].bits = 0x5D900000;
-  gv_local.lookup_454_sig[ 66].nbits = 12; gv_local.lookup_454_sig[ 66].bits = 0x70400000;
-  gv_local.lookup_454_sig[ 67].nbits = 12; gv_local.lookup_454_sig[ 67].bits = 0x84100000;
-  gv_local.lookup_454_sig[ 68].nbits = 12; gv_local.lookup_454_sig[ 68].bits = 0x94C00000;
-  gv_local.lookup_454_sig[ 69].nbits = 12; gv_local.lookup_454_sig[ 69].bits = 0xB3F00000;
-  gv_local.lookup_454_sig[ 70].nbits = 12; gv_local.lookup_454_sig[ 70].bits = 0xDBD00000;
-  gv_local.lookup_454_sig[ 71].nbits = 11; gv_local.lookup_454_sig[ 71].bits = 0x2A400000;
-  gv_local.lookup_454_sig[ 72].nbits = 11; gv_local.lookup_454_sig[ 72].bits = 0x5D600000;
-  gv_local.lookup_454_sig[ 73].nbits = 11; gv_local.lookup_454_sig[ 73].bits = 0x87200000;
-  gv_local.lookup_454_sig[ 74].nbits = 11; gv_local.lookup_454_sig[ 74].bits = 0xB2E00000;
-  gv_local.lookup_454_sig[ 75].nbits = 11; gv_local.lookup_454_sig[ 75].bits = 0xDA400000;
-  gv_local.lookup_454_sig[ 76].nbits = 10; gv_local.lookup_454_sig[ 76].bits = 0x28C00000;
-  gv_local.lookup_454_sig[ 77].nbits = 10; gv_local.lookup_454_sig[ 77].bits = 0x59C00000;
-  gv_local.lookup_454_sig[ 78].nbits = 10; gv_local.lookup_454_sig[ 78].bits = 0x84400000;
-  gv_local.lookup_454_sig[ 79].nbits = 10; gv_local.lookup_454_sig[ 79].bits = 0xB2800000;
-  gv_local.lookup_454_sig[ 80].nbits = 10; gv_local.lookup_454_sig[ 80].bits = 0xDA000000;
-  gv_local.lookup_454_sig[ 81].nbits =  9; gv_local.lookup_454_sig[ 81].bits = 0x28000000;
-  gv_local.lookup_454_sig[ 82].nbits =  9; gv_local.lookup_454_sig[ 82].bits = 0x59000000;
-  gv_local.lookup_454_sig[ 83].nbits =  9; gv_local.lookup_454_sig[ 83].bits = 0x84800000;
-  gv_local.lookup_454_sig[ 84].nbits =  9; gv_local.lookup_454_sig[ 84].bits = 0xA7800000;
-  gv_local.lookup_454_sig[ 85].nbits =  9; gv_local.lookup_454_sig[ 85].bits = 0xDA800000;
-  gv_local.lookup_454_sig[ 86].nbits =  8; gv_local.lookup_454_sig[ 86].bits = 0x29000000;
-  gv_local.lookup_454_sig[ 87].nbits =  8; gv_local.lookup_454_sig[ 87].bits = 0x5C000000;
-  gv_local.lookup_454_sig[ 88].nbits =  8; gv_local.lookup_454_sig[ 88].bits = 0x85000000;
-  gv_local.lookup_454_sig[ 89].nbits =  8; gv_local.lookup_454_sig[ 89].bits = 0xA6000000;
-  gv_local.lookup_454_sig[ 90].nbits =  8; gv_local.lookup_454_sig[ 90].bits = 0xD3000000;
-  gv_local.lookup_454_sig[ 91].nbits =  7; gv_local.lookup_454_sig[ 91].bits = 0x22000000;
-  gv_local.lookup_454_sig[ 92].nbits =  7; gv_local.lookup_454_sig[ 92].bits = 0x54000000;
-  gv_local.lookup_454_sig[ 93].nbits =  7; gv_local.lookup_454_sig[ 93].bits = 0x72000000;
-  gv_local.lookup_454_sig[ 94].nbits =  7; gv_local.lookup_454_sig[ 94].bits = 0x92000000;
-  gv_local.lookup_454_sig[ 95].nbits =  7; gv_local.lookup_454_sig[ 95].bits = 0xB8000000;
-  gv_local.lookup_454_sig[ 96].nbits =  7; gv_local.lookup_454_sig[ 96].bits = 0xD8000000;
-  gv_local.lookup_454_sig[ 97].nbits =  7; gv_local.lookup_454_sig[ 97].bits = 0xF6000000;
-  gv_local.lookup_454_sig[ 98].nbits =  6; gv_local.lookup_454_sig[ 98].bits = 0x2C000000;
-  gv_local.lookup_454_sig[ 99].nbits =  6; gv_local.lookup_454_sig[ 99].bits = 0x44000000;
-  gv_local.lookup_454_sig[100].nbits =  6; gv_local.lookup_454_sig[100].bits = 0xA0000000;
-  gv_local.lookup_454_sig[101].nbits =  6; gv_local.lookup_454_sig[101].bits = 0xF8000000;
-  gv_local.lookup_454_sig[102].nbits =  6; gv_local.lookup_454_sig[102].bits = 0xD4000000;
-  gv_local.lookup_454_sig[103].nbits =  6; gv_local.lookup_454_sig[103].bits = 0xB4000000;
-  gv_local.lookup_454_sig[104].nbits =  6; gv_local.lookup_454_sig[104].bits = 0x9C000000;
-  gv_local.lookup_454_sig[105].nbits =  6; gv_local.lookup_454_sig[105].bits = 0x88000000;
-  gv_local.lookup_454_sig[106].nbits =  6; gv_local.lookup_454_sig[106].bits = 0x60000000;
-  gv_local.lookup_454_sig[107].nbits =  6; gv_local.lookup_454_sig[107].bits = 0x40000000;
-  gv_local.lookup_454_sig[108].nbits =  7; gv_local.lookup_454_sig[108].bits = 0xF2000000;
-  gv_local.lookup_454_sig[109].nbits =  7; gv_local.lookup_454_sig[109].bits = 0xBE000000;
-  gv_local.lookup_454_sig[110].nbits =  7; gv_local.lookup_454_sig[110].bits = 0x90000000;
-  gv_local.lookup_454_sig[111].nbits =  7; gv_local.lookup_454_sig[111].bits = 0x5E000000;
-  gv_local.lookup_454_sig[112].nbits =  7; gv_local.lookup_454_sig[112].bits = 0x26000000;
-  gv_local.lookup_454_sig[113].nbits =  8; gv_local.lookup_454_sig[113].bits = 0xD1000000;
-  gv_local.lookup_454_sig[114].nbits =  8; gv_local.lookup_454_sig[114].bits = 0x96000000;
-  gv_local.lookup_454_sig[115].nbits =  8; gv_local.lookup_454_sig[115].bits = 0x67000000;
-  gv_local.lookup_454_sig[116].nbits =  8; gv_local.lookup_454_sig[116].bits = 0x34000000;
-  gv_local.lookup_454_sig[117].nbits =  9; gv_local.lookup_454_sig[117].bits = 0xDC000000;
-  gv_local.lookup_454_sig[118].nbits =  9; gv_local.lookup_454_sig[118].bits = 0xA5800000;
-  gv_local.lookup_454_sig[119].nbits =  9; gv_local.lookup_454_sig[119].bits = 0x75800000;
-  gv_local.lookup_454_sig[120].nbits =  9; gv_local.lookup_454_sig[120].bits = 0x51000000;
-  gv_local.lookup_454_sig[121].nbits = 10; gv_local.lookup_454_sig[121].bits = 0xF5800000;
-  gv_local.lookup_454_sig[122].nbits = 10; gv_local.lookup_454_sig[122].bits = 0xBA000000;
-  gv_local.lookup_454_sig[123].nbits = 10; gv_local.lookup_454_sig[123].bits = 0x86400000;
-  gv_local.lookup_454_sig[124].nbits = 10; gv_local.lookup_454_sig[124].bits = 0x56000000;
-  gv_local.lookup_454_sig[125].nbits = 11; gv_local.lookup_454_sig[125].bits = 0xF5200000;
-  gv_local.lookup_454_sig[126].nbits = 11; gv_local.lookup_454_sig[126].bits = 0xB3400000;
-  gv_local.lookup_454_sig[127].nbits = 11; gv_local.lookup_454_sig[127].bits = 0x87000000;
-  gv_local.lookup_454_sig[128].nbits = 11; gv_local.lookup_454_sig[128].bits = 0x58400000;
-  gv_local.lookup_454_sig[129].nbits = 11; gv_local.lookup_454_sig[129].bits = 0x2AA00000;
-  gv_local.lookup_454_sig[130].nbits = 12; gv_local.lookup_454_sig[130].bits = 0xF1800000;
-  gv_local.lookup_454_sig[131].nbits = 12; gv_local.lookup_454_sig[131].bits = 0xDBB00000;
-  gv_local.lookup_454_sig[132].nbits = 12; gv_local.lookup_454_sig[132].bits = 0xCBA00000;
-  gv_local.lookup_454_sig[133].nbits = 12; gv_local.lookup_454_sig[133].bits = 0xC9900000;
-  gv_local.lookup_454_sig[134].nbits = 12; gv_local.lookup_454_sig[134].bits = 0xB3700000;
-  gv_local.lookup_454_sig[135].nbits = 12; gv_local.lookup_454_sig[135].bits = 0xA5000000;
-  gv_local.lookup_454_sig[136].nbits = 12; gv_local.lookup_454_sig[136].bits = 0x94500000;
-  gv_local.lookup_454_sig[137].nbits = 12; gv_local.lookup_454_sig[137].bits = 0x8E500000;
-  gv_local.lookup_454_sig[138].nbits = 12; gv_local.lookup_454_sig[138].bits = 0x75700000;
-  gv_local.lookup_454_sig[139].nbits = 12; gv_local.lookup_454_sig[139].bits = 0x70B00000;
-  gv_local.lookup_454_sig[140].nbits = 12; gv_local.lookup_454_sig[140].bits = 0x66D00000;
-  gv_local.lookup_454_sig[141].nbits = 12; gv_local.lookup_454_sig[141].bits = 0x5D300000;
-  gv_local.lookup_454_sig[142].nbits = 12; gv_local.lookup_454_sig[142].bits = 0x51F00000;
-  gv_local.lookup_454_sig[143].nbits = 12; gv_local.lookup_454_sig[143].bits = 0x36B00000;
-  gv_local.lookup_454_sig[144].nbits = 12; gv_local.lookup_454_sig[144].bits = 0x33A00000;
-  gv_local.lookup_454_sig[145].nbits = 12; gv_local.lookup_454_sig[145].bits = 0x2A700000;
-  gv_local.lookup_454_sig[146].nbits = 12; gv_local.lookup_454_sig[146].bits = 0x24D00000;
-  gv_local.lookup_454_sig[147].nbits = 13; gv_local.lookup_454_sig[147].bits = 0xF5D00000;
-  gv_local.lookup_454_sig[148].nbits = 13; gv_local.lookup_454_sig[148].bits = 0xF1980000;
-  gv_local.lookup_454_sig[149].nbits = 13; gv_local.lookup_454_sig[149].bits = 0xF0600000;
-  gv_local.lookup_454_sig[150].nbits = 13; gv_local.lookup_454_sig[150].bits = 0xCB480000;
-  gv_local.lookup_454_sig[151].nbits = 13; gv_local.lookup_454_sig[151].bits = 0xA5300000;
-  gv_local.lookup_454_sig[152].nbits = 13; gv_local.lookup_454_sig[152].bits = 0xA7600000;
-  gv_local.lookup_454_sig[153].nbits = 13; gv_local.lookup_454_sig[153].bits = 0xA7680000;
-  gv_local.lookup_454_sig[154].nbits = 13; gv_local.lookup_454_sig[154].bits = 0xB3600000;
-  gv_local.lookup_454_sig[155].nbits = 13; gv_local.lookup_454_sig[155].bits = 0xA7700000;
-  gv_local.lookup_454_sig[156].nbits = 13; gv_local.lookup_454_sig[156].bits = 0xB3E00000;
-  gv_local.lookup_454_sig[157].nbits = 13; gv_local.lookup_454_sig[157].bits = 0xC9800000;
-  gv_local.lookup_454_sig[158].nbits = 13; gv_local.lookup_454_sig[158].bits = 0xC9E80000;
-  gv_local.lookup_454_sig[159].nbits = 13; gv_local.lookup_454_sig[159].bits = 0xCBB00000;
-  gv_local.lookup_454_sig[160].nbits = 13; gv_local.lookup_454_sig[160].bits = 0xDA680000;
-  gv_local.lookup_454_sig[161].nbits = 13; gv_local.lookup_454_sig[161].bits = 0xF0680000;
-  gv_local.lookup_454_sig[162].nbits = 13; gv_local.lookup_454_sig[162].bits = 0xF5E80000;
-  gv_local.lookup_454_sig[163].nbits = 12; gv_local.lookup_454_sig[163].bits = 0x28B00000;
-  gv_local.lookup_454_sig[164].nbits = 12; gv_local.lookup_454_sig[164].bits = 0x33B00000;
-  gv_local.lookup_454_sig[165].nbits = 12; gv_local.lookup_454_sig[165].bits = 0x51C00000;
-  gv_local.lookup_454_sig[166].nbits = 12; gv_local.lookup_454_sig[166].bits = 0x5DA00000;
-  gv_local.lookup_454_sig[167].nbits = 12; gv_local.lookup_454_sig[167].bits = 0x74600000;
-  gv_local.lookup_454_sig[168].nbits = 12; gv_local.lookup_454_sig[168].bits = 0x94000000;
-  gv_local.lookup_454_sig[169].nbits = 12; gv_local.lookup_454_sig[169].bits = 0x97700000;
-  gv_local.lookup_454_sig[170].nbits = 12; gv_local.lookup_454_sig[170].bits = 0xB3C00000;
-  gv_local.lookup_454_sig[171].nbits = 12; gv_local.lookup_454_sig[171].bits = 0xD0400000;
-  gv_local.lookup_454_sig[172].nbits = 12; gv_local.lookup_454_sig[172].bits = 0xF0200000;
-  gv_local.lookup_454_sig[173].nbits = 11; gv_local.lookup_454_sig[173].bits = 0x24E00000;
-  gv_local.lookup_454_sig[174].nbits = 11; gv_local.lookup_454_sig[174].bits = 0x36C00000;
-  gv_local.lookup_454_sig[175].nbits = 11; gv_local.lookup_454_sig[175].bits = 0x5DC00000;
-  gv_local.lookup_454_sig[176].nbits = 11; gv_local.lookup_454_sig[176].bits = 0x75400000;
-  gv_local.lookup_454_sig[177].nbits = 11; gv_local.lookup_454_sig[177].bits = 0x94A00000;
-  gv_local.lookup_454_sig[178].nbits = 11; gv_local.lookup_454_sig[178].bits = 0xB3200000;
-  gv_local.lookup_454_sig[179].nbits = 11; gv_local.lookup_454_sig[179].bits = 0xD0200000;
-  gv_local.lookup_454_sig[180].nbits = 11; gv_local.lookup_454_sig[180].bits = 0xF5000000;
-  gv_local.lookup_454_sig[181].nbits = 10; gv_local.lookup_454_sig[181].bits = 0x2AC00000;
-  gv_local.lookup_454_sig[182].nbits = 10; gv_local.lookup_454_sig[182].bits = 0x56800000;
-  gv_local.lookup_454_sig[183].nbits = 10; gv_local.lookup_454_sig[183].bits = 0x70000000;
-  gv_local.lookup_454_sig[184].nbits = 10; gv_local.lookup_454_sig[184].bits = 0x87800000;
-  gv_local.lookup_454_sig[185].nbits = 10; gv_local.lookup_454_sig[185].bits = 0xA4400000;
-  gv_local.lookup_454_sig[186].nbits = 10; gv_local.lookup_454_sig[186].bits = 0xC8C00000;
-  gv_local.lookup_454_sig[187].nbits = 10; gv_local.lookup_454_sig[187].bits = 0xDB400000;
-  gv_local.lookup_454_sig[188].nbits =  9; gv_local.lookup_454_sig[188].bits = 0x24000000;
-  gv_local.lookup_454_sig[189].nbits =  9; gv_local.lookup_454_sig[189].bits = 0x36000000;
-  gv_local.lookup_454_sig[190].nbits =  9; gv_local.lookup_454_sig[190].bits = 0x58800000;
-  gv_local.lookup_454_sig[191].nbits =  9; gv_local.lookup_454_sig[191].bits = 0x71000000;
-  gv_local.lookup_454_sig[192].nbits =  9; gv_local.lookup_454_sig[192].bits = 0x86800000;
-  gv_local.lookup_454_sig[193].nbits =  9; gv_local.lookup_454_sig[193].bits = 0x95800000;
-  gv_local.lookup_454_sig[194].nbits =  9; gv_local.lookup_454_sig[194].bits = 0xB2000000;
-  gv_local.lookup_454_sig[195].nbits =  9; gv_local.lookup_454_sig[195].bits = 0xC9000000;
-  gv_local.lookup_454_sig[196].nbits =  9; gv_local.lookup_454_sig[196].bits = 0xD2000000;
-  gv_local.lookup_454_sig[197].nbits =  9; gv_local.lookup_454_sig[197].bits = 0xDC800000;
-  gv_local.lookup_454_sig[198].nbits =  9; gv_local.lookup_454_sig[198].bits = 0xF1000000;
-  gv_local.lookup_454_sig[199].nbits =  8; gv_local.lookup_454_sig[199].bits = 0x20000000;
-  gv_local.lookup_454_sig[200].nbits =  8; gv_local.lookup_454_sig[200].bits = 0x2B000000;
-  gv_local.lookup_454_sig[201].nbits =  8; gv_local.lookup_454_sig[201].bits = 0x37000000;
-  gv_local.lookup_454_sig[202].nbits =  8; gv_local.lookup_454_sig[202].bits = 0x50000000;
-  gv_local.lookup_454_sig[203].nbits =  8; gv_local.lookup_454_sig[203].bits = 0x35000000;
-  gv_local.lookup_454_sig[204].nbits =  8; gv_local.lookup_454_sig[204].bits = 0x32000000;
-  gv_local.lookup_454_sig[205].nbits =  8; gv_local.lookup_454_sig[205].bits = 0x25000000;
-  gv_local.lookup_454_sig[206].nbits =  8; gv_local.lookup_454_sig[206].bits = 0x21000000;
-  gv_local.lookup_454_sig[207].nbits =  9; gv_local.lookup_454_sig[207].bits = 0xDD800000;
-  gv_local.lookup_454_sig[208].nbits =  9; gv_local.lookup_454_sig[208].bits = 0xD0800000;
-  gv_local.lookup_454_sig[209].nbits =  9; gv_local.lookup_454_sig[209].bits = 0xBA800000;
-  gv_local.lookup_454_sig[210].nbits =  9; gv_local.lookup_454_sig[210].bits = 0xA4800000;
-  gv_local.lookup_454_sig[211].nbits =  9; gv_local.lookup_454_sig[211].bits = 0x8E800000;
-  gv_local.lookup_454_sig[212].nbits =  9; gv_local.lookup_454_sig[212].bits = 0x71800000;
-  gv_local.lookup_454_sig[213].nbits =  9; gv_local.lookup_454_sig[213].bits = 0x57000000;
-  gv_local.lookup_454_sig[214].nbits =  9; gv_local.lookup_454_sig[214].bits = 0x33000000;
-  gv_local.lookup_454_sig[215].nbits = 10; gv_local.lookup_454_sig[215].bits = 0xF1C00000;
-  gv_local.lookup_454_sig[216].nbits = 10; gv_local.lookup_454_sig[216].bits = 0xCBC00000;
-  gv_local.lookup_454_sig[217].nbits = 10; gv_local.lookup_454_sig[217].bits = 0xA7000000;
-  gv_local.lookup_454_sig[218].nbits = 10; gv_local.lookup_454_sig[218].bits = 0x87C00000;
-  gv_local.lookup_454_sig[219].nbits = 10; gv_local.lookup_454_sig[219].bits = 0x66800000;
-  gv_local.lookup_454_sig[220].nbits = 10; gv_local.lookup_454_sig[220].bits = 0x51800000;
-  gv_local.lookup_454_sig[221].nbits = 10; gv_local.lookup_454_sig[221].bits = 0x24800000;
-  gv_local.lookup_454_sig[222].nbits = 11; gv_local.lookup_454_sig[222].bits = 0xD2E00000;
-  gv_local.lookup_454_sig[223].nbits = 11; gv_local.lookup_454_sig[223].bits = 0xB3A00000;
-  gv_local.lookup_454_sig[224].nbits = 11; gv_local.lookup_454_sig[224].bits = 0x94600000;
-  gv_local.lookup_454_sig[225].nbits = 11; gv_local.lookup_454_sig[225].bits = 0x74000000;
-  gv_local.lookup_454_sig[226].nbits = 11; gv_local.lookup_454_sig[226].bits = 0x56E00000;
-  gv_local.lookup_454_sig[227].nbits = 11; gv_local.lookup_454_sig[227].bits = 0x2A800000;
-  gv_local.lookup_454_sig[228].nbits = 12; gv_local.lookup_454_sig[228].bits = 0xF0700000;
-  gv_local.lookup_454_sig[229].nbits = 12; gv_local.lookup_454_sig[229].bits = 0xCB800000;
-  gv_local.lookup_454_sig[230].nbits = 12; gv_local.lookup_454_sig[230].bits = 0xA5100000;
-  gv_local.lookup_454_sig[231].nbits = 12; gv_local.lookup_454_sig[231].bits = 0x8E600000;
-  gv_local.lookup_454_sig[232].nbits = 12; gv_local.lookup_454_sig[232].bits = 0x70900000;
-  gv_local.lookup_454_sig[233].nbits = 12; gv_local.lookup_454_sig[233].bits = 0x58200000;
-  gv_local.lookup_454_sig[234].nbits = 12; gv_local.lookup_454_sig[234].bits = 0x30A00000;
-  gv_local.lookup_454_sig[235].nbits = 13; gv_local.lookup_454_sig[235].bits = 0xF5D80000;
-  gv_local.lookup_454_sig[236].nbits = 13; gv_local.lookup_454_sig[236].bits = 0xDA600000;
-  gv_local.lookup_454_sig[237].nbits = 13; gv_local.lookup_454_sig[237].bits = 0xC8980000;
-  gv_local.lookup_454_sig[238].nbits = 13; gv_local.lookup_454_sig[238].bits = 0xA4200000;
-  gv_local.lookup_454_sig[239].nbits = 13; gv_local.lookup_454_sig[239].bits = 0x8E480000;
-  gv_local.lookup_454_sig[240].nbits = 13; gv_local.lookup_454_sig[240].bits = 0x75600000;
-  gv_local.lookup_454_sig[241].nbits = 13; gv_local.lookup_454_sig[241].bits = 0x5D200000;
-  gv_local.lookup_454_sig[242].nbits = 13; gv_local.lookup_454_sig[242].bits = 0x36F00000;
-  gv_local.lookup_454_sig[243].nbits = 13; gv_local.lookup_454_sig[243].bits = 0x30880000;
-  gv_local.lookup_454_sig[244].nbits = 13; gv_local.lookup_454_sig[244].bits = 0x28800000;
-  gv_local.lookup_454_sig[245].nbits = 14; gv_local.lookup_454_sig[245].bits = 0xF5780000;
-  gv_local.lookup_454_sig[246].nbits = 14; gv_local.lookup_454_sig[246].bits = 0xF1900000;
-  gv_local.lookup_454_sig[247].nbits = 14; gv_local.lookup_454_sig[247].bits = 0xDA700000;
-  gv_local.lookup_454_sig[248].nbits = 14; gv_local.lookup_454_sig[248].bits = 0xDA780000;
-  gv_local.lookup_454_sig[249].nbits = 14; gv_local.lookup_454_sig[249].bits = 0xD2C80000;
-  gv_local.lookup_454_sig[250].nbits = 14; gv_local.lookup_454_sig[250].bits = 0xCB9C0000;
-  gv_local.lookup_454_sig[251].nbits = 14; gv_local.lookup_454_sig[251].bits = 0xC8B80000;
-  gv_local.lookup_454_sig[252].nbits = 14; gv_local.lookup_454_sig[252].bits = 0xCB500000;
-  gv_local.lookup_454_sig[253].nbits = 14; gv_local.lookup_454_sig[253].bits = 0xC9E40000;
-  gv_local.lookup_454_sig[254].nbits = 14; gv_local.lookup_454_sig[254].bits = 0xC8BC0000;
-  gv_local.lookup_454_sig[255].nbits = 14; gv_local.lookup_454_sig[255].bits = 0xCB740000;
-  gv_local.lookup_454_sig[256].nbits = 14; gv_local.lookup_454_sig[256].bits = 0xD0540000;
-  gv_local.lookup_454_sig[257].nbits = 14; gv_local.lookup_454_sig[257].bits = 0xD2C40000;
-  gv_local.lookup_454_sig[258].nbits = 14; gv_local.lookup_454_sig[258].bits = 0xDA7C0000;
-  gv_local.lookup_454_sig[259].nbits = 14; gv_local.lookup_454_sig[259].bits = 0xF0380000;
-  gv_local.lookup_454_sig[260].nbits = 14; gv_local.lookup_454_sig[260].bits = 0xF5700000;
-  gv_local.lookup_454_sig[261].nbits = 14; gv_local.lookup_454_sig[261].bits = 0xF5F00000;
-  gv_local.lookup_454_sig[262].nbits = 13; gv_local.lookup_454_sig[262].bits = 0x2A680000;
-  gv_local.lookup_454_sig[263].nbits = 13; gv_local.lookup_454_sig[263].bits = 0x33C00000;
-  gv_local.lookup_454_sig[264].nbits = 13; gv_local.lookup_454_sig[264].bits = 0x36F80000;
-  gv_local.lookup_454_sig[265].nbits = 13; gv_local.lookup_454_sig[265].bits = 0x5D280000;
-  gv_local.lookup_454_sig[266].nbits = 13; gv_local.lookup_454_sig[266].bits = 0x66680000;
-  gv_local.lookup_454_sig[267].nbits = 13; gv_local.lookup_454_sig[267].bits = 0x75100000;
-  gv_local.lookup_454_sig[268].nbits = 13; gv_local.lookup_454_sig[268].bits = 0x86180000;
-  gv_local.lookup_454_sig[269].nbits = 13; gv_local.lookup_454_sig[269].bits = 0x97200000;
-  gv_local.lookup_454_sig[270].nbits = 13; gv_local.lookup_454_sig[270].bits = 0xA7780000;
-  gv_local.lookup_454_sig[271].nbits = 13; gv_local.lookup_454_sig[271].bits = 0xB3E80000;
-  gv_local.lookup_454_sig[272].nbits = 13; gv_local.lookup_454_sig[272].bits = 0xCBB80000;
-  gv_local.lookup_454_sig[273].nbits = 13; gv_local.lookup_454_sig[273].bits = 0xF0100000;
-  gv_local.lookup_454_sig[274].nbits = 13; gv_local.lookup_454_sig[274].bits = 0xF5F80000;
-  gv_local.lookup_454_sig[275].nbits = 12; gv_local.lookup_454_sig[275].bits = 0x30B00000;
-  gv_local.lookup_454_sig[276].nbits = 12; gv_local.lookup_454_sig[276].bits = 0x51E00000;
-  gv_local.lookup_454_sig[277].nbits = 12; gv_local.lookup_454_sig[277].bits = 0x5D800000;
-  gv_local.lookup_454_sig[278].nbits = 12; gv_local.lookup_454_sig[278].bits = 0x74400000;
-  gv_local.lookup_454_sig[279].nbits = 12; gv_local.lookup_454_sig[279].bits = 0x87700000;
-  gv_local.lookup_454_sig[280].nbits = 12; gv_local.lookup_454_sig[280].bits = 0x97600000;
-  gv_local.lookup_454_sig[281].nbits = 12; gv_local.lookup_454_sig[281].bits = 0xB3100000;
-  gv_local.lookup_454_sig[282].nbits = 12; gv_local.lookup_454_sig[282].bits = 0xC9F00000;
-  gv_local.lookup_454_sig[283].nbits = 12; gv_local.lookup_454_sig[283].bits = 0xDBA00000;
-  gv_local.lookup_454_sig[284].nbits = 12; gv_local.lookup_454_sig[284].bits = 0xF5600000;
-  gv_local.lookup_454_sig[285].nbits = 11; gv_local.lookup_454_sig[285].bits = 0x2A200000;
-  gv_local.lookup_454_sig[286].nbits = 11; gv_local.lookup_454_sig[286].bits = 0x33E00000;
-  gv_local.lookup_454_sig[287].nbits = 11; gv_local.lookup_454_sig[287].bits = 0x58000000;
-  gv_local.lookup_454_sig[288].nbits = 11; gv_local.lookup_454_sig[288].bits = 0x66200000;
-  gv_local.lookup_454_sig[289].nbits = 11; gv_local.lookup_454_sig[289].bits = 0x75200000;
-  gv_local.lookup_454_sig[290].nbits = 11; gv_local.lookup_454_sig[290].bits = 0x87400000;
-  gv_local.lookup_454_sig[291].nbits = 11; gv_local.lookup_454_sig[291].bits = 0x94800000;
-  gv_local.lookup_454_sig[292].nbits = 11; gv_local.lookup_454_sig[292].bits = 0xA4000000;
-  gv_local.lookup_454_sig[293].nbits = 11; gv_local.lookup_454_sig[293].bits = 0xA7400000;
-  gv_local.lookup_454_sig[294].nbits = 11; gv_local.lookup_454_sig[294].bits = 0xBA600000;
-  gv_local.lookup_454_sig[295].nbits = 11; gv_local.lookup_454_sig[295].bits = 0xC9A00000;
-  gv_local.lookup_454_sig[296].nbits = 11; gv_local.lookup_454_sig[296].bits = 0xD0000000;
-  gv_local.lookup_454_sig[297].nbits = 11; gv_local.lookup_454_sig[297].bits = 0xD2A00000;
-  gv_local.lookup_454_sig[298].nbits = 11; gv_local.lookup_454_sig[298].bits = 0xDB000000;
-  gv_local.lookup_454_sig[299].nbits = 11; gv_local.lookup_454_sig[299].bits = 0xDB800000;
-  gv_local.lookup_454_sig[300].nbits = 11; gv_local.lookup_454_sig[300].bits = 0xF0400000;
-  gv_local.lookup_454_sig[301].nbits = 11; gv_local.lookup_454_sig[301].bits = 0xF1A00000;
-  gv_local.lookup_454_sig[302].nbits = 11; gv_local.lookup_454_sig[302].bits = 0xF0A00000;
-  gv_local.lookup_454_sig[303].nbits = 11; gv_local.lookup_454_sig[303].bits = 0xF0800000;
-  gv_local.lookup_454_sig[304].nbits = 11; gv_local.lookup_454_sig[304].bits = 0xDBE00000;
-  gv_local.lookup_454_sig[305].nbits = 11; gv_local.lookup_454_sig[305].bits = 0xDB200000;
-  gv_local.lookup_454_sig[306].nbits = 11; gv_local.lookup_454_sig[306].bits = 0xD2800000;
-  gv_local.lookup_454_sig[307].nbits = 11; gv_local.lookup_454_sig[307].bits = 0xC9C00000;
-  gv_local.lookup_454_sig[308].nbits = 11; gv_local.lookup_454_sig[308].bits = 0xBA400000;
-  gv_local.lookup_454_sig[309].nbits = 11; gv_local.lookup_454_sig[309].bits = 0xB2C00000;
-  gv_local.lookup_454_sig[310].nbits = 11; gv_local.lookup_454_sig[310].bits = 0x97000000;
-  gv_local.lookup_454_sig[311].nbits = 11; gv_local.lookup_454_sig[311].bits = 0x94200000;
-  gv_local.lookup_454_sig[312].nbits = 11; gv_local.lookup_454_sig[312].bits = 0x84200000;
-  gv_local.lookup_454_sig[313].nbits = 11; gv_local.lookup_454_sig[313].bits = 0x66E00000;
-  gv_local.lookup_454_sig[314].nbits = 11; gv_local.lookup_454_sig[314].bits = 0x59A00000;
-  gv_local.lookup_454_sig[315].nbits = 11; gv_local.lookup_454_sig[315].bits = 0x36800000;
-  gv_local.lookup_454_sig[316].nbits = 11; gv_local.lookup_454_sig[316].bits = 0x2A000000;
-  gv_local.lookup_454_sig[317].nbits = 12; gv_local.lookup_454_sig[317].bits = 0xF5C00000;
-  gv_local.lookup_454_sig[318].nbits = 12; gv_local.lookup_454_sig[318].bits = 0xD2D00000;
-  gv_local.lookup_454_sig[319].nbits = 12; gv_local.lookup_454_sig[319].bits = 0xC8800000;
-  gv_local.lookup_454_sig[320].nbits = 12; gv_local.lookup_454_sig[320].bits = 0xA4300000;
-  gv_local.lookup_454_sig[321].nbits = 12; gv_local.lookup_454_sig[321].bits = 0x8E700000;
-  gv_local.lookup_454_sig[322].nbits = 12; gv_local.lookup_454_sig[322].bits = 0x74700000;
-  gv_local.lookup_454_sig[323].nbits = 12; gv_local.lookup_454_sig[323].bits = 0x5D000000;
-  gv_local.lookup_454_sig[324].nbits = 12; gv_local.lookup_454_sig[324].bits = 0x33D00000;
-  gv_local.lookup_454_sig[325].nbits = 12; gv_local.lookup_454_sig[325].bits = 0x24C00000;
-  gv_local.lookup_454_sig[326].nbits = 13; gv_local.lookup_454_sig[326].bits = 0xF0300000;
-  gv_local.lookup_454_sig[327].nbits = 13; gv_local.lookup_454_sig[327].bits = 0xCB400000;
-  gv_local.lookup_454_sig[328].nbits = 13; gv_local.lookup_454_sig[328].bits = 0xA5280000;
-  gv_local.lookup_454_sig[329].nbits = 13; gv_local.lookup_454_sig[329].bits = 0x94E80000;
-  gv_local.lookup_454_sig[330].nbits = 13; gv_local.lookup_454_sig[330].bits = 0x84080000;
-  gv_local.lookup_454_sig[331].nbits = 13; gv_local.lookup_454_sig[331].bits = 0x66600000;
-  gv_local.lookup_454_sig[332].nbits = 13; gv_local.lookup_454_sig[332].bits = 0x51D80000;
-  gv_local.lookup_454_sig[333].nbits = 13; gv_local.lookup_454_sig[333].bits = 0x33900000;
-  gv_local.lookup_454_sig[334].nbits = 14; gv_local.lookup_454_sig[334].bits = 0xF5E40000;
-  gv_local.lookup_454_sig[335].nbits = 14; gv_local.lookup_454_sig[335].bits = 0xD2CC0000;
-  gv_local.lookup_454_sig[336].nbits = 14; gv_local.lookup_454_sig[336].bits = 0xC98C0000;
-  gv_local.lookup_454_sig[337].nbits = 14; gv_local.lookup_454_sig[337].bits = 0xB3000000;
-  gv_local.lookup_454_sig[338].nbits = 14; gv_local.lookup_454_sig[338].bits = 0x94F00000;
-  gv_local.lookup_454_sig[339].nbits = 14; gv_local.lookup_454_sig[339].bits = 0x87600000;
-  gv_local.lookup_454_sig[340].nbits = 14; gv_local.lookup_454_sig[340].bits = 0x66080000;
-  gv_local.lookup_454_sig[341].nbits = 14; gv_local.lookup_454_sig[341].bits = 0x66040000;
-  gv_local.lookup_454_sig[342].nbits = 14; gv_local.lookup_454_sig[342].bits = 0x51D40000;
-  gv_local.lookup_454_sig[343].nbits = 14; gv_local.lookup_454_sig[343].bits = 0x33CC0000;
-  gv_local.lookup_454_sig[344].nbits = 14; gv_local.lookup_454_sig[344].bits = 0x28AC0000;
-  gv_local.lookup_454_sig[345].nbits = 14; gv_local.lookup_454_sig[345].bits = 0x28A00000;
-  gv_local.lookup_454_sig[346].nbits = 15; gv_local.lookup_454_sig[346].bits = 0xF03E0000;
-  gv_local.lookup_454_sig[347].nbits = 15; gv_local.lookup_454_sig[347].bits = 0xF1940000;
-  gv_local.lookup_454_sig[348].nbits = 15; gv_local.lookup_454_sig[348].bits = 0xDBCA0000;
-  gv_local.lookup_454_sig[349].nbits = 15; gv_local.lookup_454_sig[349].bits = 0xDBC00000;
-  gv_local.lookup_454_sig[350].nbits = 15; gv_local.lookup_454_sig[350].bits = 0xC9E20000;
-  gv_local.lookup_454_sig[351].nbits = 15; gv_local.lookup_454_sig[351].bits = 0xA42C0000;
-  gv_local.lookup_454_sig[352].nbits = 15; gv_local.lookup_454_sig[352].bits = 0xA42A0000;
-  gv_local.lookup_454_sig[353].nbits = 15; gv_local.lookup_454_sig[353].bits = 0xA53E0000;
-  gv_local.lookup_454_sig[354].nbits = 15; gv_local.lookup_454_sig[354].bits = 0xB3D80000;
-  gv_local.lookup_454_sig[355].nbits = 15; gv_local.lookup_454_sig[355].bits = 0xA53C0000;
-  gv_local.lookup_454_sig[356].nbits = 15; gv_local.lookup_454_sig[356].bits = 0xC8900000;
-  gv_local.lookup_454_sig[357].nbits = 15; gv_local.lookup_454_sig[357].bits = 0xC9880000;
-  gv_local.lookup_454_sig[358].nbits = 15; gv_local.lookup_454_sig[358].bits = 0xC8A80000;
-  gv_local.lookup_454_sig[359].nbits = 15; gv_local.lookup_454_sig[359].bits = 0xCB700000;
-  gv_local.lookup_454_sig[360].nbits = 15; gv_local.lookup_454_sig[360].bits = 0xD2C00000;
-  gv_local.lookup_454_sig[361].nbits = 15; gv_local.lookup_454_sig[361].bits = 0xD2C20000;
-  gv_local.lookup_454_sig[362].nbits = 15; gv_local.lookup_454_sig[362].bits = 0xF01E0000;
-  gv_local.lookup_454_sig[363].nbits = 15; gv_local.lookup_454_sig[363].bits = 0xF01A0000;
-  gv_local.lookup_454_sig[364].nbits = 15; gv_local.lookup_454_sig[364].bits = 0xF5E00000;
-  gv_local.lookup_454_sig[365].nbits = 14; gv_local.lookup_454_sig[365].bits = 0x28A40000;
-  gv_local.lookup_454_sig[366].nbits = 14; gv_local.lookup_454_sig[366].bits = 0x33800000;
-  gv_local.lookup_454_sig[367].nbits = 14; gv_local.lookup_454_sig[367].bits = 0x36EC0000;
-  gv_local.lookup_454_sig[368].nbits = 14; gv_local.lookup_454_sig[368].bits = 0x51D00000;
-  gv_local.lookup_454_sig[369].nbits = 14; gv_local.lookup_454_sig[369].bits = 0x56D40000;
-  gv_local.lookup_454_sig[370].nbits = 14; gv_local.lookup_454_sig[370].bits = 0x5D540000;
-  gv_local.lookup_454_sig[371].nbits = 14; gv_local.lookup_454_sig[371].bits = 0x70840000;
-  gv_local.lookup_454_sig[372].nbits = 14; gv_local.lookup_454_sig[372].bits = 0x86080000;
-  gv_local.lookup_454_sig[373].nbits = 14; gv_local.lookup_454_sig[373].bits = 0x87640000;
-  gv_local.lookup_454_sig[374].nbits = 14; gv_local.lookup_454_sig[374].bits = 0x94180000;
-  gv_local.lookup_454_sig[375].nbits = 14; gv_local.lookup_454_sig[375].bits = 0x972C0000;
-  gv_local.lookup_454_sig[376].nbits = 14; gv_local.lookup_454_sig[376].bits = 0xB3040000;
-  gv_local.lookup_454_sig[377].nbits = 14; gv_local.lookup_454_sig[377].bits = 0xC8940000;
-  gv_local.lookup_454_sig[378].nbits = 14; gv_local.lookup_454_sig[378].bits = 0xCB980000;
-  gv_local.lookup_454_sig[379].nbits = 14; gv_local.lookup_454_sig[379].bits = 0xDA740000;
-  gv_local.lookup_454_sig[380].nbits = 14; gv_local.lookup_454_sig[380].bits = 0xDBC40000;
-  gv_local.lookup_454_sig[381].nbits = 14; gv_local.lookup_454_sig[381].bits = 0xF57C0000;
-  gv_local.lookup_454_sig[382].nbits = 13; gv_local.lookup_454_sig[382].bits = 0x28900000;
-  gv_local.lookup_454_sig[383].nbits = 13; gv_local.lookup_454_sig[383].bits = 0x28880000;
-  gv_local.lookup_454_sig[384].nbits = 13; gv_local.lookup_454_sig[384].bits = 0x30900000;
-  gv_local.lookup_454_sig[385].nbits = 13; gv_local.lookup_454_sig[385].bits = 0x36E00000;
-  gv_local.lookup_454_sig[386].nbits = 13; gv_local.lookup_454_sig[386].bits = 0x56C00000;
-  gv_local.lookup_454_sig[387].nbits = 13; gv_local.lookup_454_sig[387].bits = 0x56D80000;
-  gv_local.lookup_454_sig[388].nbits = 13; gv_local.lookup_454_sig[388].bits = 0x5D580000;
-  gv_local.lookup_454_sig[389].nbits = 13; gv_local.lookup_454_sig[389].bits = 0x66C00000;
-  gv_local.lookup_454_sig[390].nbits = 13; gv_local.lookup_454_sig[390].bits = 0x70880000;
-  gv_local.lookup_454_sig[391].nbits = 13; gv_local.lookup_454_sig[391].bits = 0x75680000;
-  gv_local.lookup_454_sig[392].nbits = 13; gv_local.lookup_454_sig[392].bits = 0x84000000;
-  gv_local.lookup_454_sig[393].nbits = 13; gv_local.lookup_454_sig[393].bits = 0x86100000;
-  gv_local.lookup_454_sig[394].nbits = 13; gv_local.lookup_454_sig[394].bits = 0x8E400000;
-  gv_local.lookup_454_sig[395].nbits = 13; gv_local.lookup_454_sig[395].bits = 0x94400000;
-  gv_local.lookup_454_sig[396].nbits = 13; gv_local.lookup_454_sig[396].bits = 0x94E00000;
-  gv_local.lookup_454_sig[397].nbits = 13; gv_local.lookup_454_sig[397].bits = 0x94F80000;
-  gv_local.lookup_454_sig[398].nbits = 13; gv_local.lookup_454_sig[398].bits = 0x94480000;
-  gv_local.lookup_454_sig[399].nbits = 13; gv_local.lookup_454_sig[399].bits = 0x97300000;
-  gv_local.lookup_454_sig[400].nbits = 13; gv_local.lookup_454_sig[400].bits = 0xB3D00000;
-  gv_local.lookup_454_sig[401].nbits = 13; gv_local.lookup_454_sig[401].bits = 0xD0580000;
-  gv_local.lookup_454_sig[402].nbits = 13; gv_local.lookup_454_sig[402].bits = 0xCB900000;
-  gv_local.lookup_454_sig[403].nbits = 13; gv_local.lookup_454_sig[403].bits = 0xCB680000;
-  gv_local.lookup_454_sig[404].nbits = 13; gv_local.lookup_454_sig[404].bits = 0xCB780000;
-  gv_local.lookup_454_sig[405].nbits = 13; gv_local.lookup_454_sig[405].bits = 0xCB580000;
-  gv_local.lookup_454_sig[406].nbits = 13; gv_local.lookup_454_sig[406].bits = 0xCB600000;
-  gv_local.lookup_454_sig[407].nbits = 13; gv_local.lookup_454_sig[407].bits = 0xC8B00000;
-  gv_local.lookup_454_sig[408].nbits = 13; gv_local.lookup_454_sig[408].bits = 0xC8A00000;
-  gv_local.lookup_454_sig[409].nbits = 13; gv_local.lookup_454_sig[409].bits = 0xB3680000;
-  gv_local.lookup_454_sig[410].nbits = 13; gv_local.lookup_454_sig[410].bits = 0xB3080000;
-  gv_local.lookup_454_sig[411].nbits = 13; gv_local.lookup_454_sig[411].bits = 0xA5200000;
-  gv_local.lookup_454_sig[412].nbits = 13; gv_local.lookup_454_sig[412].bits = 0x97380000;
-  gv_local.lookup_454_sig[413].nbits = 13; gv_local.lookup_454_sig[413].bits = 0x94D80000;
-  gv_local.lookup_454_sig[414].nbits = 13; gv_local.lookup_454_sig[414].bits = 0x94100000;
-  gv_local.lookup_454_sig[415].nbits = 13; gv_local.lookup_454_sig[415].bits = 0x86000000;
-  gv_local.lookup_454_sig[416].nbits = 13; gv_local.lookup_454_sig[416].bits = 0x74380000;
-  gv_local.lookup_454_sig[417].nbits = 13; gv_local.lookup_454_sig[417].bits = 0x66C80000;
-  gv_local.lookup_454_sig[418].nbits = 13; gv_local.lookup_454_sig[418].bits = 0x59980000;
-  gv_local.lookup_454_sig[419].nbits = 13; gv_local.lookup_454_sig[419].bits = 0x56C80000;
-  gv_local.lookup_454_sig[420].nbits = 13; gv_local.lookup_454_sig[420].bits = 0x36A00000;
-  gv_local.lookup_454_sig[421].nbits = 13; gv_local.lookup_454_sig[421].bits = 0x30800000;
-  gv_local.lookup_454_sig[422].nbits = 13; gv_local.lookup_454_sig[422].bits = 0x28980000;
-  gv_local.lookup_454_sig[423].nbits = 14; gv_local.lookup_454_sig[423].bits = 0xF5740000;
-  gv_local.lookup_454_sig[424].nbits = 14; gv_local.lookup_454_sig[424].bits = 0xDBCC0000;
-  gv_local.lookup_454_sig[425].nbits = 14; gv_local.lookup_454_sig[425].bits = 0xCB540000;
-  gv_local.lookup_454_sig[426].nbits = 14; gv_local.lookup_454_sig[426].bits = 0xB3DC0000;
-  gv_local.lookup_454_sig[427].nbits = 14; gv_local.lookup_454_sig[427].bits = 0xA5380000;
-  gv_local.lookup_454_sig[428].nbits = 14; gv_local.lookup_454_sig[428].bits = 0x97280000;
-  gv_local.lookup_454_sig[429].nbits = 14; gv_local.lookup_454_sig[429].bits = 0x876C0000;
-  gv_local.lookup_454_sig[430].nbits = 14; gv_local.lookup_454_sig[430].bits = 0x74340000;
-  gv_local.lookup_454_sig[431].nbits = 14; gv_local.lookup_454_sig[431].bits = 0x74300000;
-  gv_local.lookup_454_sig[432].nbits = 14; gv_local.lookup_454_sig[432].bits = 0x59900000;
-  gv_local.lookup_454_sig[433].nbits = 14; gv_local.lookup_454_sig[433].bits = 0x36A80000;
-  gv_local.lookup_454_sig[434].nbits = 14; gv_local.lookup_454_sig[434].bits = 0x30980000;
-  gv_local.lookup_454_sig[435].nbits = 15; gv_local.lookup_454_sig[435].bits = 0xF5F40000;
-  gv_local.lookup_454_sig[436].nbits = 15; gv_local.lookup_454_sig[436].bits = 0xF03C0000;
-  gv_local.lookup_454_sig[437].nbits = 15; gv_local.lookup_454_sig[437].bits = 0xF0180000;
-  gv_local.lookup_454_sig[438].nbits = 15; gv_local.lookup_454_sig[438].bits = 0xD0500000;
-  gv_local.lookup_454_sig[439].nbits = 15; gv_local.lookup_454_sig[439].bits = 0xC8AA0000;
-  gv_local.lookup_454_sig[440].nbits = 15; gv_local.lookup_454_sig[440].bits = 0xA4280000;
-  gv_local.lookup_454_sig[441].nbits = 15; gv_local.lookup_454_sig[441].bits = 0x94D20000;
-  gv_local.lookup_454_sig[442].nbits = 15; gv_local.lookup_454_sig[442].bits = 0x94D00000;
-  gv_local.lookup_454_sig[443].nbits = 15; gv_local.lookup_454_sig[443].bits = 0x860E0000;
-  gv_local.lookup_454_sig[444].nbits = 15; gv_local.lookup_454_sig[444].bits = 0x751A0000;
-  gv_local.lookup_454_sig[445].nbits = 15; gv_local.lookup_454_sig[445].bits = 0x70820000;
-  gv_local.lookup_454_sig[446].nbits = 15; gv_local.lookup_454_sig[446].bits = 0x660C0000;
-  gv_local.lookup_454_sig[447].nbits = 15; gv_local.lookup_454_sig[447].bits = 0x59940000;
-  gv_local.lookup_454_sig[448].nbits = 15; gv_local.lookup_454_sig[448].bits = 0x56D20000;
-  gv_local.lookup_454_sig[449].nbits = 15; gv_local.lookup_454_sig[449].bits = 0x36E80000;
-  gv_local.lookup_454_sig[450].nbits = 16; gv_local.lookup_454_sig[450].bits = 0xF1970000;
-  gv_local.lookup_454_sig[451].nbits = 16; gv_local.lookup_454_sig[451].bits = 0xD0520000;
-  gv_local.lookup_454_sig[452].nbits = 16; gv_local.lookup_454_sig[452].bits = 0xC8AC0000;
-  gv_local.lookup_454_sig[453].nbits = 16; gv_local.lookup_454_sig[453].bits = 0xC8930000;
-  gv_local.lookup_454_sig[454].nbits = 16; gv_local.lookup_454_sig[454].bits = 0xC9E00000;
-  gv_local.lookup_454_sig[455].nbits = 16; gv_local.lookup_454_sig[455].bits = 0xC98A0000;
-  gv_local.lookup_454_sig[456].nbits = 16; gv_local.lookup_454_sig[456].bits = 0xC8AE0000;
-  gv_local.lookup_454_sig[457].nbits = 16; gv_local.lookup_454_sig[457].bits = 0xC8920000;
-  gv_local.lookup_454_sig[458].nbits = 16; gv_local.lookup_454_sig[458].bits = 0xC8AD0000;
-  gv_local.lookup_454_sig[459].nbits = 16; gv_local.lookup_454_sig[459].bits = 0xC8AF0000;
-  gv_local.lookup_454_sig[460].nbits = 16; gv_local.lookup_454_sig[460].bits = 0xC98B0000;
-  gv_local.lookup_454_sig[461].nbits = 16; gv_local.lookup_454_sig[461].bits = 0xB3DA0000;
-  gv_local.lookup_454_sig[462].nbits = 16; gv_local.lookup_454_sig[462].bits = 0xCB720000;
-  gv_local.lookup_454_sig[463].nbits = 16; gv_local.lookup_454_sig[463].bits = 0xC9E10000;
-  gv_local.lookup_454_sig[464].nbits = 16; gv_local.lookup_454_sig[464].bits = 0xD0530000;
-  gv_local.lookup_454_sig[465].nbits = 16; gv_local.lookup_454_sig[465].bits = 0xB3DB0000;
-  gv_local.lookup_454_sig[466].nbits = 16; gv_local.lookup_454_sig[466].bits = 0xDBC80000;
-  gv_local.lookup_454_sig[467].nbits = 16; gv_local.lookup_454_sig[467].bits = 0xCB730000;
-  gv_local.lookup_454_sig[468].nbits = 16; gv_local.lookup_454_sig[468].bits = 0xDBC90000;
-  gv_local.lookup_454_sig[469].nbits = 16; gv_local.lookup_454_sig[469].bits = 0xF01D0000;
-  gv_local.lookup_454_sig[470].nbits = 16; gv_local.lookup_454_sig[470].bits = 0xF01C0000;
-  gv_local.lookup_454_sig[471].nbits = 16; gv_local.lookup_454_sig[471].bits = 0xF5E20000;
-  gv_local.lookup_454_sig[472].nbits = 16; gv_local.lookup_454_sig[472].bits = 0xF1960000;
-  gv_local.lookup_454_sig[473].nbits = 16; gv_local.lookup_454_sig[473].bits = 0xF5E30000;
-  gv_local.lookup_454_sig[474].nbits = 15; gv_local.lookup_454_sig[474].bits = 0x2A600000;
-  gv_local.lookup_454_sig[475].nbits = 15; gv_local.lookup_454_sig[475].bits = 0x309C0000;
-  gv_local.lookup_454_sig[476].nbits = 15; gv_local.lookup_454_sig[476].bits = 0x309E0000;
-  gv_local.lookup_454_sig[477].nbits = 15; gv_local.lookup_454_sig[477].bits = 0x2A620000;
-  gv_local.lookup_454_sig[478].nbits = 15; gv_local.lookup_454_sig[478].bits = 0x36EA0000;
-  gv_local.lookup_454_sig[479].nbits = 15; gv_local.lookup_454_sig[479].bits = 0x56D00000;
-  gv_local.lookup_454_sig[480].nbits = 15; gv_local.lookup_454_sig[480].bits = 0x59960000;
-  gv_local.lookup_454_sig[481].nbits = 15; gv_local.lookup_454_sig[481].bits = 0x5D520000;
-  gv_local.lookup_454_sig[482].nbits = 15; gv_local.lookup_454_sig[482].bits = 0x5D500000;
-  gv_local.lookup_454_sig[483].nbits = 15; gv_local.lookup_454_sig[483].bits = 0x66000000;
-  gv_local.lookup_454_sig[484].nbits = 15; gv_local.lookup_454_sig[484].bits = 0x66020000;
-  gv_local.lookup_454_sig[485].nbits = 15; gv_local.lookup_454_sig[485].bits = 0x660E0000;
-  gv_local.lookup_454_sig[486].nbits = 15; gv_local.lookup_454_sig[486].bits = 0x75180000;
-  gv_local.lookup_454_sig[487].nbits = 15; gv_local.lookup_454_sig[487].bits = 0x70800000;
-  gv_local.lookup_454_sig[488].nbits = 15; gv_local.lookup_454_sig[488].bits = 0x751C0000;
-  gv_local.lookup_454_sig[489].nbits = 15; gv_local.lookup_454_sig[489].bits = 0x860C0000;
-  gv_local.lookup_454_sig[490].nbits = 15; gv_local.lookup_454_sig[490].bits = 0x751E0000;
-  gv_local.lookup_454_sig[491].nbits = 15; gv_local.lookup_454_sig[491].bits = 0x876A0000;
-  gv_local.lookup_454_sig[492].nbits = 15; gv_local.lookup_454_sig[492].bits = 0x87680000;
-  gv_local.lookup_454_sig[493].nbits = 15; gv_local.lookup_454_sig[493].bits = 0x941C0000;
-  gv_local.lookup_454_sig[494].nbits = 15; gv_local.lookup_454_sig[494].bits = 0x94D60000;
-  gv_local.lookup_454_sig[495].nbits = 15; gv_local.lookup_454_sig[495].bits = 0x941E0000;
-  gv_local.lookup_454_sig[496].nbits = 15; gv_local.lookup_454_sig[496].bits = 0x94F60000;
-  gv_local.lookup_454_sig[497].nbits = 15; gv_local.lookup_454_sig[497].bits = 0x94F40000;
-  gv_local.lookup_454_sig[498].nbits = 15; gv_local.lookup_454_sig[498].bits = 0x94D40000;
-  gv_local.lookup_454_sig[499].nbits = 15; gv_local.lookup_454_sig[499].bits = 0xA42E0000;
-  gv_local.lookup_454_sig[500].nbits = 15; gv_local.lookup_454_sig[500].bits = 0xDBC20000;
-  gv_local.lookup_454_sig[501].nbits = 14; gv_local.lookup_454_sig[501].bits = 0x36AC0000;
-  gv_local.lookup_454_sig[502].nbits = 14; gv_local.lookup_454_sig[502].bits = 0x339C0000;
-  gv_local.lookup_454_sig[503].nbits = 14; gv_local.lookup_454_sig[503].bits = 0x33980000;
-  gv_local.lookup_454_sig[504].nbits = 14; gv_local.lookup_454_sig[504].bits = 0x33C80000;
-  gv_local.lookup_454_sig[505].nbits = 14; gv_local.lookup_454_sig[505].bits = 0x33840000;
-  gv_local.lookup_454_sig[506].nbits = 14; gv_local.lookup_454_sig[506].bits = 0x33880000;
-  gv_local.lookup_454_sig[507].nbits = 14; gv_local.lookup_454_sig[507].bits = 0x2A640000;
-  gv_local.lookup_454_sig[508].nbits = 14; gv_local.lookup_454_sig[508].bits = 0x338C0000;
-  gv_local.lookup_454_sig[509].nbits = 14; gv_local.lookup_454_sig[509].bits = 0x28A80000;
-  gv_local.lookup_454_sig[510].nbits = 15; gv_local.lookup_454_sig[510].bits = 0xF5F60000;
-  gv_local.lookup_454_sig[511].nbits =  9; gv_local.lookup_454_sig[511].bits = 0x97800000;
-
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  /* reverse huffman lookup table
-   */
-  memset (gv_local.rlookup_454_sig, 0, sizeof(uint16_t)*REV_HUFF_TREESIZE_16);
-
-  for (i=0; i<SIG_HUFF_TREESIZE; i++)
-  {
-    val = gv_local.lookup_454_sig[i].bits >> 16;
-    gv_local.rlookup_454_sig [val] = (uint16_t) i;
-    for (j=1; j<=(0xFFFF>>gv_local.lookup_454_sig[i].nbits); j++)
-      gv_local.rlookup_454_sig [val+j] = (uint16_t) i;
-  }
-#endif
-  _s_sort_lookup (gv_local.lookup_454_sig, gv_local.idx_454_sig, SIG_HUFF_TREESIZE);
-
-  gv_local.lookup_454_sig_initialized = 1;
-}
diff --git a/libs/sraxf/v0-decompress-local.h b/libs/sraxf/v0-decompress-local.h
deleted file mode 100644
index afffcdb..0000000
--- a/libs/sraxf/v0-decompress-local.h
+++ /dev/null
@@ -1,368 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _SRA_DECOMPRESS_LOCAL_HEADER
-#define _SRA_DECOMPRESS_LOCAL_HEADER
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SRA_DECOMPRESS_USE_REVERSE_LOOKUP 1
-
-#include <assert.h>
-#include <byteswap.h>
-#include <limits.h>
-#include <math.h> 
-/*#include <netinet/in.h>*/
-#include <search.h> 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-/*#include <unistd.h>*/
-#include <zlib.h>
-#include <stdint.h>
-
-#define SIG_HUFF_TREESIZE         512
-#define INT_HUFF_TREESIZE         512
-#define NSE_HUFF_TREESIZE         512
-#define PRB_SLX_HUFF_TREESIZE       7
-#define PRB_SLX_SPAN               81
-#define PRB_SLX_MIN                40
- 
-#define PRB_454_HUFF_TREESIZE     100
-#define POS_454_HUFF_TREESIZE      64
-
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-#define REV_HUFF_TREESIZE_16    65536
-#define REV_HUFF_TREESIZE_08      256
-#endif
-
-#define SIG_MID_POINT            (SIG_HUFF_TREESIZE/2-1)
-#define SIG_MAX_POINT            (SIG_HUFF_TREESIZE-1)
-#define INT_MID_POINT            (INT_HUFF_TREESIZE/2-1)
-#define INT_MAX_POINT            (INT_HUFF_TREESIZE-1)
-#define NSE_MID_POINT            (NSE_HUFF_TREESIZE/2-1)
-#define NSE_MAX_POINT            (NSE_HUFF_TREESIZE-1)
-#define PRB_SLX_MAX_POINT        (PRB_SLX_HUFF_TREESIZE-1)
-#define PRB_454_MAX_POINT        (PRB_454_HUFF_TREESIZE-1)
-#define POS_454_MAX_POINT        (POS_454_HUFF_TREESIZE-1) 
-
-#define LOG_MAIN_MULTIPLIER     2048
-#define LOG_SUB_MULTIPLIER       256
-
-#ifndef _UCHAR_DEFINED
-#define _UCHAR_DEFINED
-typedef unsigned char  uchar_t;
-#endif
-
-/* clearing malloc
- *  NB - in all cases, clearing memory before use
- *  is unnecessary, since the buffers are allocated
- *  to exact sizes and completely overwritten.
- */
-void* sra_zalloc (unsigned int);
-#define sra_zalloc( bytes ) \
-    malloc ( bytes )
-
-/*
- */
-struct SRALookup;
-struct SRALocal;
-
-typedef struct SRALookup* SRALookup_t;
-typedef struct SRALocal*  SRALocal_t;
-
-/* huffman lookup table
- */
-typedef struct SRALookup
-{
-  uchar_t   nbits; /* number of bits for an entry */
-  uint32_t  bits;  /* actual bits */
-} SRALookup;
-
-/* local data storage
- */
-typedef struct SRALocal
-{
-  SRALookup    lookup_slx_sig [SIG_HUFF_TREESIZE];
-  SRALookup    lookup_slx_int [INT_HUFF_TREESIZE];
-  SRALookup    lookup_slx_nse [NSE_HUFF_TREESIZE];
-  SRALookup    lookup_slx_prb [PRB_SLX_HUFF_TREESIZE];
-
-  SRALookup    lookup_454_sig [SIG_HUFF_TREESIZE];
-  SRALookup    lookup_454_prb [PRB_454_HUFF_TREESIZE];
-  SRALookup    lookup_454_pos [POS_454_HUFF_TREESIZE];
-
-  uint16_t     idx_454_sig [SIG_HUFF_TREESIZE];
-  uint16_t     idx_454_prb [PRB_454_HUFF_TREESIZE];
-  uint16_t     idx_454_pos [POS_454_HUFF_TREESIZE];
-
-  uint16_t     idx_slx_sig [SIG_HUFF_TREESIZE];
-  uint16_t     idx_slx_int [INT_HUFF_TREESIZE];
-  uint16_t     idx_slx_nse [NSE_HUFF_TREESIZE];
-  uint16_t     idx_slx_prb [PRB_SLX_HUFF_TREESIZE];
-
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  uint16_t     rlookup_slx_sig [REV_HUFF_TREESIZE_16];
-  uint16_t     rlookup_slx_int [REV_HUFF_TREESIZE_16];
-  uint16_t     rlookup_slx_nse [REV_HUFF_TREESIZE_16];
-  uchar_t      rlookup_slx_prb [REV_HUFF_TREESIZE_08];
-
-  uint16_t     rlookup_454_sig [REV_HUFF_TREESIZE_16];
-  uint16_t     rlookup_454_prb [REV_HUFF_TREESIZE_16];
-#endif
-
-  /* sequence encoding/decoding tables
-   */
-  uchar_t      conv2to4na [256][4];  /* backward conversion to nucleotides */
-  uchar_t      conv2to4cs [256][4];  /* backward conversion to color space */
-  uchar_t      convqs4to1 [PRB_SLX_SPAN];
-
-  int          lookup_slx_sig_initialized;
-  int          lookup_slx_int_initialized;
-  int          lookup_slx_nse_initialized;
-  int          lookup_slx_prb_initialized;
-
-  int          lookup_454_sig_initialized;
-  int          lookup_454_prb_initialized;
-  int          lookup_454_pos_initialized;
-  int          lookup_454_seq_initialized;
-} SRALocal;
-
-
-/* some useful macros
- *
- */
-#define _put_short(data, dst, shift, bitpos) \
-  do { \
-    unsigned int   _shift =*(shift); \
-    unsigned int   _bitpos= (bitpos); \
-    unsigned char* _dst   = (unsigned char*)(dst); \
-    unsigned char  _byte; \
-    if(_bitpos) \
-    { \
-      _byte = (unsigned char)((data) >> 8); \
-      *(_dst+_shift)   |= (_byte >> _bitpos); \
-      *(_dst+_shift+1) |= (_byte << (8-_bitpos)); \
-      _byte = (unsigned char)((data) & 0xFF); \
-      *(_dst+_shift+1) |= (_byte >> _bitpos); \
-      *(_dst+_shift+2) |= (_byte << (8-_bitpos)); \
-    } \
-    else \
-    { \
-      _byte = (unsigned char)((data) >> 8); \
-      *(_dst+_shift)   = _byte; \
-      _byte = (unsigned char)((data) & 0xFF); \
-      *(_dst+_shift+1) = _byte; \
-    } \
-    *(shift)=_shift+2; \
-  } while(0)
-/*      
- */   
-#define _get_byte(src, shift, bitpos, byte, update) \
-  do { \
-    unsigned int _shift=*(shift); \
-    *(byte) = 0; \
-    if(bitpos) \
-    { \
-      *(byte)  = *((src)+_shift)<<(bitpos); \
-      *(byte) |= *((src)+_shift+1)>>(8-(bitpos)); \
-    } \
-    else *(byte) = *((src)+_shift); \
-    if(update) *(shift)=_shift+1; \
-  } while(0)
-
-/*
- */
-#define _get_short(src, shift, bitpos, data, update) \
-  do { \
-    unsigned int   _shift=*(shift); \
-    unsigned short _data =0; \
-    if(bitpos) \
-    { \
-      _data  = ((*((src)+_shift)<<(bitpos))<<8); \
-      _data |= ((*((src)+_shift+1)>>(8-(bitpos)))<<8); \
-      _data |= ((*((src)+_shift+1)<<(bitpos))); \
-      _data |= ((*((src)+_shift+2)>>(8-(bitpos)))); \
-    } \
-    else \
-    { \
-      _data  = (*((src)+_shift)<<8); \
-      _data |= (*((src)+_shift+1) & 0xFF); \
-    } \
-    *(data) = _data; \
-    if(update) *(shift)=_shift+2; \
-  } while(0)
-    
-/*
- */
-#if _DEBUGGING
-#define _get_long(src, nbits, shift, bitpos, ldata, update, max_bits)	\
-    do {								\
-        unsigned int   _shift =*(shift);				\
-        unsigned int   _bitpos=*(bitpos);				\
-        unsigned char* _src=(unsigned char*)(src);                      \
-        uint32_t _l = 0;						\
-        int _bits_done = 0;						\
-        int _nbits = nbits;						\
-                                                                        \
-        if (_bitpos + _nbits + (_shift << 3) > max_bits) {              \
-            fprintf(stderr, "legacy code trying to read %u bits beyond end of data at %s, line %d.\n", _bitpos + _nbits + (_shift << 3) - max_bits, __FILE__, __LINE__); \
-            _nbits = max_bits - (_bitpos + (_shift << 3));              \
-        }                                                               \
-        while (_nbits > 0) {                                            \
-            unsigned _bits;						\
-            int _bitsl;                                                 \
-                                                                        \
-            _bits = _src[_shift];					\
-            _bitsl = 8;                                                 \
-                                                                        \
-            if (_bitpos) {                                              \
-                _bits &= 0xFFu >> _bitpos;                              \
-                _bitsl = 8 - _bitpos;                                   \
-            }                                                           \
-                                                                        \
-            if (_bitsl > _nbits) {                                      \
-                _bits >>= _bitsl - _nbits;                              \
-                _bitsl = _nbits;                                        \
-            }                                                           \
-                                                                        \
-            _bitpos += _bitsl;                                          \
-                                                                        \
-            if (_bitpos == 8) {                                         \
-                _bitpos = 0;                                            \
-                _shift++;                                               \
-            }                                                           \
-                                                                        \
-            _l |= _bits << (32 - (_bits_done + _bitsl));		\
-                                                                        \
-            _bits_done += _bitsl;					\
-                                                                        \
-            _nbits -= _bitsl;                                           \
-        }								\
-                                                                        \
-        *ldata = _l;                                                    \
-                                                                        \
-        if(update) {                                                    \
-            *(shift) =_shift;                                           \
-            *(bitpos)=_bitpos;                                          \
-        }								\
-    } while(0)
-#else
-#define _get_long(src, nbits, shift, bitpos, ldata, update, max_bits)	\
-    do {								\
-        unsigned int   _shift =*(shift);				\
-        unsigned int   _bitpos=*(bitpos);				\
-        unsigned char* _src=(unsigned char*)(src);                      \
-        uint32_t _l = 0;						\
-        int _bits_done = 0;						\
-        int _nbits = nbits;						\
-                                                                        \
-        if (_bitpos + _nbits + (_shift << 3) > max_bits) {              \
-            _nbits = max_bits - (_bitpos + (_shift << 3));              \
-        }                                                               \
-        while (_nbits > 0) {                                            \
-            unsigned _bits;						\
-            int _bitsl;                                                 \
-                                                                        \
-            _bits = _src[_shift];					\
-            _bitsl = 8;                                                 \
-                                                                        \
-            if (_bitpos) {                                              \
-                _bits &= 0xFFu >> _bitpos;                              \
-                _bitsl = 8 - _bitpos;                                   \
-            }                                                           \
-                                                                        \
-            if (_bitsl > _nbits) {                                      \
-                _bits >>= _bitsl - _nbits;                              \
-                _bitsl = _nbits;                                        \
-            }                                                           \
-                                                                        \
-            _bitpos += _bitsl;                                          \
-                                                                        \
-            if (_bitpos == 8) {                                         \
-                _bitpos = 0;                                            \
-                _shift++;                                               \
-            }                                                           \
-                                                                        \
-            _l |= _bits << (32 - (_bits_done + _bitsl));		\
-                                                                        \
-            _bits_done += _bitsl;					\
-                                                                        \
-            _nbits -= _bitsl;                                           \
-        }								\
-                                                                        \
-        *ldata = _l;                                                    \
-                                                                        \
-        if(update) {                                                    \
-            *(shift) =_shift;                                           \
-            *(bitpos)=_bitpos;                                          \
-        }								\
-    } while(0)
-#endif
-
-/* various rotation routines
- */
-#define _rotate_1(type,array) \
-  do { \
-    type* _ptr = (type*)(array); \
-    type  _val = *(_ptr+0); \
-    *(_ptr+0) = *(_ptr+1); *(_ptr+1) = *(_ptr+2); \
-    *(_ptr+2) = *(_ptr+3); *(_ptr+3) = _val; \
-  } while(0)
-/*
- */
-#define _rotate_2(type,array) \
-  do { \
-    type* _ptr = (type*)(array); \
-    type  _val = *(_ptr+0); \
-    *(_ptr+0) = *(_ptr+2); *(_ptr+2) = _val; \
-    _val = *(_ptr+1); \
-    *(_ptr+1) = *(_ptr+3); *(_ptr+3) = _val; \
-  } while(0)
-/*
- */
-#define _rotate_3(type,array) \
-  do { \
-    type* _ptr = (type*)(array); \
-    type  _val = *(_ptr+3); \
-    *(_ptr+3) = *(_ptr+2); *(_ptr+2) = *(_ptr+1); \
-    *(_ptr+1) = *(_ptr+0); *(_ptr+0) = _val; \
-  } while(0)
-
-/*
- */
-#define _cmpbits(src1, src2, size, result) \
-  do { \
-    unsigned int _mask=0xFFFFFFFFL<<(32-(size)); \
-    if (((unsigned int)(src1)&_mask)^((unsigned int)(src2)&_mask)) *(result)=0; else *(result)=1; \
-  } while(0)
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/libs/sraxf/v0-decompress.c b/libs/sraxf/v0-decompress.c
deleted file mode 100644
index c294d10..0000000
--- a/libs/sraxf/v0-decompress.c
+++ /dev/null
@@ -1,1093 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include "v0-decompress.h"
-#include "v0-decompress-local.h"
-#include <klib/data-buffer.h>
-#include <klib/sort.h>
-#include <sysalloc.h>
-
-#include <math.h>
-
-/* local data
- */
-SRALocal     gv_local;
-
-static
-void *sra_alloc ( KDataBuffer *dst, KDataBuffer *alt, size_t bytes )
-{
-    rc_t rc;
-
-    /* whatever was in dst, put it in alt */
-    KDataBufferWhack ( alt );
-#if 0
-    *alt = *dst;
-#else
-    KDataBufferSub ( dst, alt, 0, UINT64_MAX );
-    KDataBufferWhack(dst);
-#endif
-
-    /* allocate a new space */
-    rc = (uint32_t)KDataBufferMakeBytes ( dst, (uint32_t)bytes );
-    if ( rc != 0 )
-        return NULL;
-
-#if 1
-#define BZERO_SIZE 256
-    if (bytes > BZERO_SIZE)
-        memset(&((char *)dst->base)[bytes-BZERO_SIZE], 0, BZERO_SIZE);
-    else
-        memset(dst->base, 0, bytes);
-#undef BZERO_SIZE
-#endif
-    
-    /* return a pointer to it just like malloc */
-    return dst -> base;
-}
-
-/*
- */
-static void _s_undelta_4_channel (int slen, int tlen, void* src, int ssize)
-{
-  int     i, j;
-  char*   cptr = (char*)src;
-  short*  sptr = (short*)src;
-  int*    iptr = (int*)src;
-
-  assert (tlen);
-  assert ((ssize&3) == 0); /* make sure we have all 4 channels in it */
-
-  for (i=0, j=0; i<ssize/tlen; i+=4, j++)
-  {
-    /* after each slen the actual data is stored as is,
-     * this shift happens at the begining as well
-     */
-    if (j%slen == 0) { i += 4; j++; }
-
-    switch (tlen)
-    {
-      case 4: *(iptr+i+0) += *(iptr+i-4);
-              *(iptr+i+1) += *(iptr+i-3);
-              *(iptr+i+2) += *(iptr+i-2);
-              *(iptr+i+3) += *(iptr+i-1);
-              break;
-
-      case 2: *(sptr+i+0) += *(sptr+i-4);
-              *(sptr+i+1) += *(sptr+i-3);
-              *(sptr+i+2) += *(sptr+i-2);
-              *(sptr+i+3) += *(sptr+i-1);
-              break;
-
-      default:
-      case 1: *(cptr+i+0) += *(cptr+i-4);
-              *(cptr+i+1) += *(cptr+i-3);
-              *(cptr+i+2) += *(cptr+i-2);
-              *(cptr+i+3) += *(cptr+i-1);
-              break;
-    }
-  }
-}
-
-/*
- */
-static void _s_exponent_4_channel (int slen, void* dst, int dsize, const void* src, int ssize, float sim, float snm)
-{
-  int     i;
-  float*  fptr = (float*)dst;
-  short*  sptr = (short*)src;
-
-  assert ((ssize&3) == 0); /* make sure we have all 4 channels in it */
-  assert (ssize*2 == dsize);
-
-  for (i=0; i<ssize>>1; i+=4) /* the source buffer is full of short values, therefore ssize>>1 */
-  {
-    *(fptr+i+0) = expf ((float)*(sptr+i+0)/LOG_MAIN_MULTIPLIER)/10 + sim;
-    *(fptr+i+1) = expf ((float)*(sptr+i+1)/LOG_SUB_MULTIPLIER )/10 + snm;
-    *(fptr+i+2) = expf ((float)*(sptr+i+2)/LOG_SUB_MULTIPLIER )/10 + snm;
-    *(fptr+i+3) = expf ((float)*(sptr+i+3)/LOG_SUB_MULTIPLIER )/10 + snm;
-  }
-}
-
-/*
- */
-static int _s_decompress_zlib ( void* dst, const void* src, int dsize, int ssize )
-{
-    z_stream c_stream; /* decompression stream */
-    
-    memset( &c_stream, 0, sizeof( c_stream ) );
-    c_stream.next_in   = ( Bytef* )src;
-    c_stream.next_out  = ( Bytef* )dst;
-    c_stream.avail_in  = ( uInt )ssize;
-    c_stream.avail_out = ( uInt )dsize;
-    
-    if ( Z_OK != inflateInit ( &c_stream ) )
-    {
-        inflateEnd ( &c_stream );
-        return 1; 
-    }
-    
-    if ( Z_STREAM_END != inflate ( &c_stream, Z_FINISH ) &&
-         Z_OK != inflateSync( &c_stream ) )
-    {
-        inflateEnd ( &c_stream );
-        return 1; 
-    }
-    
-    if ( Z_OK != inflateEnd ( &c_stream ) )
-    {
-        return 1;
-    }
-    
-    return 0;
-}
-
-/*
- */
-static int64_t CC _s_cmp_key (const void* keyptr, const void* idxptr, void *data)
-{
-  SRALookup_t plook = data;
-  static uint32_t mask [33] = {0x00000000, 0x80000000, 0xC0000000, 0xE0000000,
-                               0xF0000000, 0xF8000000, 0xFC000000, 0xFE000000,
-                               0xFF000000, 0xFF800000, 0xFFC00000, 0xFFE00000,
-                               0xFFF00000, 0xFFF80000, 0xFFFC0000, 0xFFFE0000,
-                               0xFFFF0000, 0xFFFF8000, 0xFFFFC000, 0xFFFFE000,
-                               0xFFFFF000, 0xFFFFF800, 0xFFFFFC00, 0xFFFFFE00,
-                               0xFFFFFF00, 0xFFFFFF80, 0xFFFFFFC0, 0xFFFFFFE0,
-                               0xFFFFFFF0, 0xFFFFFFF8, 0xFFFFFFFC, 0xFFFFFFFE,
-                               0xFFFFFFFF};
-
-  uint16_t   index      = *(uint16_t*)idxptr;
-  uint32_t   keyBits    = *(uint32_t*)keyptr & mask[plook[index].nbits];
-  uint32_t   lookupBits = plook[index].bits;
-
-  return (int64_t)keyBits - (int64_t)lookupBits;
-}
-
-/*
- * decompresses positions for 454 platform, and restores their actual values
- *
- */
-int sra_decompress_pos ( KDataBuffer *dst, KDataBuffer *alt, const void* src, int ssize )
-{
-  uchar_t        magic;              /* compression type magic */
-  const uchar_t* pepos;              /* ptr to encoded positions */
-  uchar_t*       popos;              /* ptr to output positions */
-  uint16_t*      pspos;              /* ptr to short values after restoration */
-  uchar_t*       iptr;               /* ptr to index in lookup table */
-  uchar_t        indx;               /* actual index */
-  uint16_t       offset, shift, osize, pos, rbpos, nbits, i;
-  uint32_t       lval;               /* _get_long reads into it */
-
-  assert (gv_local.lookup_454_pos_initialized);
-
-  rbpos  = 0;
-  offset = 0;
-  pepos  = src;
-
-  /* get magic and size of data
-   */
-  _get_byte  (pepos, &offset, rbpos, &magic, 1);
-  _get_short (pepos, &offset, rbpos, &osize, 1);
-
-  assert (magic == SRA_CT_ZLIB || magic == SRA_CT_HUFFMAN);
-
-  /* decompress zlib
-   */
-  if (magic == SRA_CT_ZLIB) /* it is always applied on top of huffman */
-  {
-    shift = 3; /* magic + length */
-    popos = sra_alloc ( dst, alt, osize + 100 ); /* generosity */
-
-    if (_s_decompress_zlib(popos, pepos+shift, (int)osize + 100, ssize-shift))
-      return 1;
-
-    rbpos  = 0; /* read bit position */
-    offset = 0;
-    ssize  = osize;
-    pepos  = popos;
-    _get_byte  (pepos, &offset, rbpos, &magic, 1);
-    _get_short (pepos, &offset, rbpos, &osize, 1);
-    assert (magic == SRA_CT_HUFFMAN);
-    magic = SRA_CT_ZLIB; /* to make sure an extra allocated buffer will be destroyed */
-  }
-
-  popos = sra_alloc (dst, alt, osize );
-
-
-  /* decompress huffman
-   */
-  pos = 0;
-  while (pos < osize)
-  {
-    if (ssize-offset > 4) nbits = 32;
-    else                  nbits = ((ssize-offset)==4?32:((ssize-offset)==3?24:((ssize-offset)==2?16:8)))-rbpos;
-
-    _get_long ( pepos, nbits, &offset, &rbpos, &lval, 0, (ssize << 3) );
-
-    iptr = (uchar_t*) kbsearch ( &lval, gv_local.idx_454_pos,
-                                 POS_454_HUFF_TREESIZE, sizeof(uint16_t), _s_cmp_key, gv_local.lookup_454_pos );
-    assert (iptr);
-    indx = *iptr;
-
-    offset += ((rbpos+(uint16_t)gv_local.lookup_454_pos[indx].nbits) >> 3);
-    rbpos   = ((rbpos+(uint16_t)gv_local.lookup_454_pos[indx].nbits) &  7);
-
-    if (indx < POS_454_MAX_POINT)
-      *(popos+pos) = indx;
-    else
-    {
-      uchar_t val;
-      _get_byte (pepos, &offset, rbpos, &val, 1);
-      *(popos+pos) = val;
-    }
-    pos++;
-  }
-
-  /* undelta
-   */
-  pspos = sra_alloc ( dst, alt, (osize*sizeof(uint16_t)+3)&~3); /** align to 4-byte **/
-  assert (pspos);
-
-  *(pspos+0) = *(popos+0);
-  for (i=1; i<osize; i++)
-    *(pspos+i) = *(pspos+i-1) + *(popos+i);
-
-  /* set element size to 16 bits */
-  KDataBufferCast ( dst, dst, 16, true );
-
-  /* crop size to osize */
-  assert ( osize <= dst -> elem_count );
-  KDataBufferResize ( dst, osize );
-
-  return 0;
-}
-
-
-int sra_decompress_prb_454 ( KDataBuffer *dst, KDataBuffer *alt, const void* src, int ssize )
-{
-  uchar_t        magic;
-  const uchar_t* peprb;
-  uchar_t*       poprb;
-#if !SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  uint16_t*      iptr;
-#endif
-  uint16_t       offset, shift, osize, pos, rbpos, nbits;
-  uchar_t        indx;
-  uint32_t       lval;
-
-  assert (gv_local.lookup_454_prb_initialized);
-
-  rbpos  = 0; /* read bit position */
-  offset = 0;
-  peprb  = src;
-
-  /* get magic and size of data
-   */
-  _get_byte  (peprb, &offset, rbpos, &magic, 1);
-  _get_short (peprb, &offset, rbpos, &osize, 1);
-
-  assert (magic == SRA_CT_ZLIB || magic == SRA_CT_HUFFMAN);
-
-  /* decompress zlib
-   */
-  if (magic == SRA_CT_ZLIB)
-  {
-    shift = 3; /* magic + length */
-/****  HACK: in some runs osize was truncated/corrupted????  Giving it some more space *****/
-    poprb = sra_alloc ( dst, alt, osize+200 );
-
-    if (_s_decompress_zlib(poprb, peprb+shift, (int)osize + 200, ssize-shift))
-      return 1;
-
-    rbpos  = 0; /* read bit position */
-    offset = 0;
-    ssize  = osize;
-    peprb  = poprb;
-    _get_byte  (peprb, &offset, rbpos, &magic, 1);
-    _get_short (peprb, &offset, rbpos, &osize, 1);
-    assert (magic == SRA_CT_HUFFMAN);
-  }
-
-  poprb = sra_alloc (dst, alt, (osize+3)&~3); /** align to 4-byte boundary **/
-
-
-  /* decompress huffman
-   */
-  pos = 0;
-  while (pos < osize)
-  {
-    if (ssize-offset > 4) nbits = 32;
-    else                  nbits = ((ssize-offset)==4?32:((ssize-offset)==3?24:((ssize-offset)==2?16:8)))-rbpos;
-
-    if ((offset > (uint32_t)ssize) || (nbits == 0))
-      return 1;
-
-    _get_long (peprb, nbits, &offset, &rbpos, &lval, 0, (ssize << 3));
-
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-    indx = gv_local.rlookup_454_prb [lval>>16];
-#else
-    iptr = (uint16_t*) kbsearch (&lval, gv_local.idx_454_prb,
-                                PRB_454_HUFF_TREESIZE, sizeof(uint16_t), _s_cmp_key, gv_local.lookup_454_prb);
-    assert (iptr);
-    indx = *iptr;
-#endif
-
-    offset += ((rbpos+(uint16_t)gv_local.lookup_454_prb[indx].nbits) >> 3);
-    rbpos   = ((rbpos+(uint16_t)gv_local.lookup_454_prb[indx].nbits) &  7);
-
-    if (indx < PRB_454_MAX_POINT)
-      *(poprb+pos) = indx;
-    else
-    {
-      uchar_t val;
-      _get_byte (peprb, &offset, rbpos, &val, 1);
-      *(poprb+pos) = val;
-    }
-    pos++;
-  }
-
-  /* crop size to osize */
-  assert ( osize <= dst -> elem_count );
-  KDataBufferResize ( dst, osize );
-
-  return 0;
-}
-
-int sra_decompress_clp  ( KDataBuffer *dst, KDataBuffer *alt, const void* src, int ssize )
-{
-  uchar_t        magic;
-  const uchar_t* peclp;
-  uchar_t*       poclp;
-  uint32_t       osize, offset;
-  uint16_t       rbpos, shift;
-
-  rbpos  = 0;
-  offset = 0;
-  peclp  = src;
-
-  /* get magic and size of data
-   */
-  _get_byte  (peclp,     &offset,  rbpos, &magic, 1);
-  _get_long  (peclp, 32, &offset, &rbpos, &osize, 1, (ssize << 3));
-
-  assert (magic == SRA_CT_ZLIB);
-
-  shift = 5; /* magic + length */
-  poclp = sra_alloc ( dst, alt, osize + 100 );
-
-  if (_s_decompress_zlib(poclp, peclp+shift, (int)osize + 100, ssize-shift))
-    return 1;
-
-  /* crop size to osize */
-  assert ( osize <= dst -> elem_count );
-  KDataBufferResize ( dst, osize );
-
-  return 0;
-}
-
-int sra_decompress_sig_454 ( KDataBuffer *dst, KDataBuffer *alt, const void* src, int ssize )
-{
-  uchar_t        magic;
-  const uchar_t* pesig;
-  uchar_t*       posig;
-#if !SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  uint16_t*      iptr;
-#endif
-  uint16_t       offset, shift, osize, pos, rbpos, wbpos, indx, nbits;
-  uint32_t       lval;
-
-  assert (gv_local.lookup_454_sig_initialized);
-
-  rbpos  = 0;
-  offset = 0;
-  pesig  = src;
-
-  /* get magic and size of data
-   */
-  _get_byte  (pesig, &offset, rbpos, &magic, 1);
-  _get_short (pesig, &offset, rbpos, &osize, 1);
-
-  assert (magic == SRA_CT_ZLIB || magic == SRA_CT_HUFFMAN);
-
-  /* decompress zlib
-   */
-  if (magic == SRA_CT_ZLIB)
-  {
-    shift = 3; /* magic + length */
-    posig = sra_alloc ( dst, alt, osize + 100 );
-
-    if (_s_decompress_zlib(posig, pesig+shift, (int)osize + 100, ssize-shift))
-      return 1;
-
-    rbpos  = 0; /* read bit position */
-    offset = 0;
-    ssize  = osize;
-    pesig  = posig;
-    _get_byte  (pesig, &offset, rbpos, &magic, 1);
-    _get_short (pesig, &offset, rbpos, &osize, 1);
-    assert (magic == SRA_CT_HUFFMAN);
-  }
- 
-  posig = sra_alloc ( dst, alt, osize );
-
-  /* decompress huffman
-   */
-  pos   = 0;
-  wbpos = 0; /* write bit position */
-  while (pos < osize)
-  {
-    if (ssize-offset > 4) nbits = 32;
-    else                  nbits = ((ssize-offset)==4?32:((ssize-offset)==3?24:((ssize-offset)==2?16:8)))-rbpos;
-
-    _get_long (pesig, nbits, &offset, &rbpos, &lval, 0, (ssize << 3));
-
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-    indx = gv_local.rlookup_454_sig [lval>>16];
-#else
-    iptr = (uint16_t*) kbsearch (&lval, gv_local.idx_454_sig,
-                                SIG_HUFF_TREESIZE, sizeof(uint16_t), _s_cmp_key, gv_local.lookup_454_sig);
-    assert (iptr);
-    indx = *iptr;
-#endif
-
-    offset += ((rbpos+(uint16_t)gv_local.lookup_454_sig[indx].nbits) >> 3);
-    rbpos   = ((rbpos+(uint16_t)gv_local.lookup_454_sig[indx].nbits) &  7);
-
-    if (indx < SIG_MAX_POINT)
-    {
-      indx = bswap_16 (indx);
-      _put_short (indx, posig, &pos, wbpos);
-    }
-    else
-    {
-      uint16_t val;
-      if ((int)nbits - (int)gv_local.lookup_454_sig[indx].nbits >= 16)
-      {
-        val = (uint16_t)((lval >> (16-gv_local.lookup_454_sig[indx].nbits)) & 0xFFFF);
-        offset += 2;
-      }
-      else
-        _get_short (pesig, &offset, rbpos, &val, 1);
-
-      val = bswap_16 (val);
-      _put_short (val, posig, &pos, wbpos);
-    }
-  }
-
-  /* crop size to osize */
-  assert ( osize <= dst -> elem_count );
-  KDataBufferResize ( dst, osize );
-
-  return 0;
-}
-
-int sra_decompress_prb_slx ( KDataBuffer *dst, KDataBuffer *alt, const void* src, int ssize )
-{
-  uchar_t        magic;
-  char           byte;
-  char           qmin, qmax;
-  const uchar_t* peprb;
-  uchar_t*       poprb;
-  uint32_t       osize, offset, rbpos, pos;
-  uint16_t       fix_seq_len, shift;
-
-  assert (gv_local.lookup_slx_prb_initialized);
-
-  rbpos  = 0;
-  offset = 0;
-  peprb  = src;
-
-  /* get magic and size of data
-   */
-  _get_byte  (peprb,     &offset,  rbpos, &magic, 1);
-  _get_long  (peprb, 32, &offset, &rbpos, &osize, 1, (ssize << 3));
-    
-  assert (magic == SRA_CT_ZLIB || magic == SRA_CT_HUFFMAN || magic == SRA_CT_UNCOMPRESSED);
-
-  /* decompress zlib
-   */
-  if (magic == SRA_CT_ZLIB)
-  {
-    shift = 5; /* magic + length */
-    poprb = sra_alloc ( dst, alt, osize + 100);
-    if (_s_decompress_zlib(poprb, peprb+shift, (int)osize + 100, ssize-shift))
-      return 1;
-
-    rbpos  = 0;
-    offset = 0;
-    ssize  = osize;
-    peprb  = poprb;
-    _get_byte  (peprb,     &offset,  rbpos, &magic, 1);
-    _get_long  (peprb, 32, &offset, &rbpos, &osize, 1, (ssize << 3));
-
-    assert (magic == SRA_CT_HUFFMAN || magic == SRA_CT_UNCOMPRESSED);
-  }
-    
-  _get_byte  (peprb, &offset,  rbpos, &qmin,        1);
-  _get_byte  (peprb, &offset,  rbpos, &qmax,        1);
-  _get_short (peprb, &offset,  rbpos, &fix_seq_len, 1);
-
-  poprb = sra_alloc (dst, alt, osize+100); /** huffman decode can read too much ***/
-
-  /* decompress huffman
-   */
-  if (magic ==  SRA_CT_HUFFMAN)
-  {
-#if !SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-    uchar_t*   iptr;
-#endif
-    uchar_t    indx;
-    union      { char c[4]; uint32_t val; } uval;
-    uint32_t   lval;
-
-
-    pos = 0;
-    while (pos < osize)
-    {
-      if (offset > (uint32_t)ssize)
-        return 1;
-
-      _get_long (peprb, 4, &offset, &rbpos, &lval, 0, (ssize << 3));
-
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-      indx = gv_local.rlookup_slx_prb [lval>>24];
-#else
-      iptr = (uchar_t*) kbsearch (&lval, gv_local.idx_slx_prb,
-                                 PRB_SLX_HUFF_TREESIZE, sizeof(uint16_t), _s_cmp_key, gv_local.lookup_slx_prb);
-      assert (iptr);
-      indx = *iptr;
-#endif
-
-      offset += ((rbpos+(uint16_t)gv_local.lookup_slx_prb[indx].nbits) >> 3);
-      rbpos   = ((rbpos+(uint16_t)gv_local.lookup_slx_prb[indx].nbits) &  7);
-
-      switch (indx)
-      {
-        case 0: /* max min min min */
-          uval.c[3] = uval.c[2] = uval.c[1] = qmin; uval.c[0] = qmax;
-          break;
-
-        case 1: /* -5 -5 -5 -5 */
-          uval.c[3] = uval.c[2] = uval.c[1] = uval.c[0] = -5;
-          break;
-
-        case 2: /* val -val min min */
-          _get_long (peprb, 6, &offset, &rbpos, &lval, 1, (ssize << 3));
-          byte = (char)(lval >> 26); /* only 6 bits are needed */
-          uval.c[3] = uval.c[2] = qmin; uval.c[1] = -byte; uval.c[0] = byte;
-          break;
-
-        case 3: /* val min -val min */
-          _get_long (peprb, 6, &offset, &rbpos, &lval, 1, (ssize << 3));
-          byte = (char)(lval >> 26); /* only 6 bits are needed */
-          uval.c[3] = uval.c[1] = qmin; uval.c[2] = -byte; uval.c[0] = byte;
-          break;
-
-        case 4: /* val min min -val */
-          _get_long (peprb, 6, &offset, &rbpos, &lval, 1, (ssize << 3));
-          byte = (char)(lval >> 26); /* only 6 bits are needed */
-          uval.c[2] = uval.c[1] = qmin; uval.c[3] = -byte; uval.c[0] = byte;
-          break;
-
-        case 5:
-        default:
-          _get_long (peprb, 32, &offset, &rbpos, (uint32_t *)&uval.c[0], 1, (ssize << 3));
-          /*uval.val = lval*/;
-          break;
-      }
-      memcpy (poprb+pos, &uval.c[0], sizeof(uint32_t));
-      pos += 4;
-    }
-  }
-  else
-  if (magic == SRA_CT_UNCOMPRESSED)
-  {
-      memcpy (poprb, peprb+9, osize);
-  }
-
-  assert ( osize <= dst -> elem_count );
-  KDataBufferResize ( dst, osize );
-
-  return 0;
-}
-
-static void _s_decode_slx (uchar_t magic, const uchar_t* pesig, uchar_t* posig, uint32_t osize, uint32_t offset, uint32_t rbpos, int ssize)
-{
-  uint32_t pos = 0;
-  uint16_t fix_seq_len;
-
-  if (magic == SRA_CT_UNCOMPRESSED || magic == SRA_CT_BASELINED)
-  {
-    int32_t  baseline = 0;
-    float    fval;
-    uint16_t uval;
-
-    _get_short (pesig,     &offset,  rbpos, &fix_seq_len,  1);
-    _get_long  (pesig, 32, &offset, &rbpos, &baseline,     1, (ssize << 3));
-
-    rbpos = 0; /* read bit position */
-
-
-    while (pos < osize)
-    {
-      uval = 0;
-      _get_short (pesig, &offset, rbpos, &uval, 1);
-      fval =     (float) (uval-baseline);
-      memcpy     (posig+pos, &fval, sizeof(float));
-      pos += sizeof(float);
-    }
-  }
-  else
-  if (magic == SRA_CT_NORMALIZED)
-  {
-    union  { float fval; uint32_t uval; } uf;
-    float  fval;
-    float  fmin;
-    short  sval;
-
-    _get_short (pesig,     &offset,  rbpos, &fix_seq_len,  1);
-    _get_short (pesig,     &offset,  rbpos, &sval,         1);
-    _get_long  (pesig, 32, &offset, &rbpos, &uf.uval,      1, (ssize << 3));
-
-    fmin = (float) sval;
-    rbpos = 0; /* read bit position */
-
-
-    while (pos < osize)
-    {
-      sval = 0;
-      fval = uf.fval;
-      _get_short (pesig, &offset, rbpos, &sval, 1);
-      fval *= sval; fval += fmin;
-      memcpy     (posig+pos, &fval, sizeof(float));
-      pos += sizeof(float);
-    }
-  }
-}
-
-int sra_decompress_sig_slx ( KDataBuffer *dst, KDataBuffer *alt, const void* src, int ssize )
-{
-  uchar_t        magic;
-  const uchar_t* pesig;
-  uchar_t*       posig;
-#if !SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  uint16_t*      iptr;
-#endif
-  uint16_t       indx, fix_seq_len, shift;
-  uint32_t       pos, rbpos, wbpos, nbits;
-  uint32_t       offset, osize, lval;
-  union { float fval; uint32_t uval; } sim, snm; /* minimum level of signal and noise */
-
-  assert (gv_local.lookup_slx_sig_initialized);
-
-  rbpos  = 0;
-  offset = 0;
-  pesig  = src;
-
-  /* get magic and size of data
-   */
-  _get_byte  (pesig,     &offset,  rbpos, &magic, 1);
-  _get_long  (pesig, 32, &offset, &rbpos, &osize, 1, (ssize << 3));
-
-  assert (magic == SRA_CT_ZLIB         || magic == SRA_CT_HUFFMAN ||
-          magic == SRA_CT_UNCOMPRESSED || magic == SRA_CT_NORMALIZED ||
-          magic == SRA_CT_BASELINED);
-
-  /* decompress zlib
-   */
-  if (magic == SRA_CT_ZLIB)
-  {
-    shift = 5; /* magic + length */
-    posig = sra_alloc ( dst, alt, osize + 100 );
-
-    if (_s_decompress_zlib(posig, pesig+shift, (int)osize + 100, ssize-shift))
-      return 1;
-
-    rbpos  = 0; /* read bit position */
-    offset = 0;
-    ssize  = osize;
-    pesig  = posig;
-    _get_byte  (pesig,     &offset,  rbpos, &magic, 1);
-    _get_long  (pesig, 32, &offset, &rbpos, &osize, 1, (ssize << 3));
-
-    assert (magic == SRA_CT_HUFFMAN    || magic == SRA_CT_UNCOMPRESSED ||
-            magic == SRA_CT_NORMALIZED || magic == SRA_CT_BASELINED);
-  }
-
-  /* decompress huffman
-   */
-  if (magic == SRA_CT_HUFFMAN)
-  {
-    _get_short (pesig,     &offset,  rbpos, &fix_seq_len, 1);
-    _get_long  (pesig, 32, &offset, &rbpos, &sim.uval,    1, (ssize << 3));
-    _get_long  (pesig, 32, &offset, &rbpos, &snm.uval,    1, (ssize << 3));
-
-    assert ((osize&3) == 0); /* make shure it can be devided by 4 */
-
-    posig = sra_alloc (dst, alt, osize);
-
-    pos   = 0;
-    wbpos = 0; /* write bit position */
-
-    while (pos < osize)
-    {
-      if (ssize-offset > 4) nbits = 32;
-      else                  nbits = ((ssize-offset)==4?32:((ssize-offset)==3?24:((ssize-offset)==2?16:8)))-rbpos;
-
-      if (offset > (uint32_t)ssize)
-        return 1;
-
-      _get_long (pesig, nbits, &offset, &rbpos, &lval, 0, (ssize << 3));
-
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-      indx = gv_local.rlookup_slx_sig [lval>>16];
-#else
-      iptr = (uint16_t*) kbsearch (&lval, gv_local.idx_slx_sig,
-                                  SIG_HUFF_TREESIZE, sizeof(uint16_t), _s_cmp_key, gv_local.lookup_slx_sig);
-      assert (iptr);
-      indx = *iptr;
-#endif
-
-      offset += ((rbpos+(uint32_t)gv_local.lookup_slx_sig[indx].nbits) >> 3);
-      rbpos   = ((rbpos+(uint32_t)gv_local.lookup_slx_sig[indx].nbits)  & 7);
-
-      if (indx < SIG_MAX_POINT)
-      {
-        indx = bswap_16 ((uint16_t)(indx-SIG_MID_POINT));
-        _put_short (indx, posig, &pos, wbpos);
-      }
-      else
-      {
-        uint16_t val;
-        if ((int)nbits - (int)gv_local.lookup_slx_sig[indx].nbits >= 16)
-        {
-          val = (short)((lval >> (16-gv_local.lookup_slx_sig[indx].nbits)) & 0xFFFF);
-          offset += 2;
-        }
-        else
-          _get_short (pesig, &offset, rbpos, &val, 1);
-
-        val = bswap_16 (val);
-        _put_short (val, posig, &pos, wbpos);
-      }
-    }
-
-    _s_undelta_4_channel (fix_seq_len, sizeof(uint16_t), posig, osize);
-
-    pesig = posig;
-    ssize = osize;
-    osize = osize << 1;
-    posig = sra_alloc ( dst, alt, osize );
-
-    _s_exponent_4_channel (fix_seq_len, posig, osize, pesig, ssize, sim.fval, snm.fval);
-  }
-  else
-  if (magic == SRA_CT_UNCOMPRESSED || magic == SRA_CT_NORMALIZED || magic == SRA_CT_BASELINED)
-  {
-    assert ((osize&3) == 0); /* make shure it can be devided by 4 */
-    osize *= 2;              /* desination size is 4 bytes per channel, but the original is 2 */
-
-    posig = sra_alloc ( dst, alt, osize );
-
-    _s_decode_slx (magic, pesig, posig, osize, offset, rbpos, ssize);
-  }
-
-  assert ( osize <= dst -> elem_count );
-  KDataBufferResize ( dst, osize );
-
-  return 0;
-}
-
-int sra_decompress_int ( KDataBuffer *dst, KDataBuffer *alt, const void* src, int ssize )
-{
-  uchar_t        magic;
-  const uchar_t* pesig;
-  uchar_t*       posig;
-#if !SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  uint16_t*      iptr;
-#endif
-  uint16_t       indx, fix_seq_len, shift;
-  uint32_t       pos, rbpos, wbpos, nbits;
-  uint32_t       offset, osize, lval;
-  union { float fval; uint32_t uval; } sim, snm; /* minimum level of signal and noise */
-
-  assert (gv_local.lookup_slx_int_initialized);
-
-  rbpos  = 0;
-  offset = 0;
-  pesig  = src;
-
-  /* get magic and size of data
-   */
-  _get_byte  (pesig,     &offset,  rbpos, &magic, 1);
-  _get_long  (pesig, 32, &offset, &rbpos, &osize, 1, (ssize << 3));
-
-  assert (magic == SRA_CT_ZLIB         || magic == SRA_CT_HUFFMAN ||
-          magic == SRA_CT_UNCOMPRESSED || magic == SRA_CT_NORMALIZED ||
-          magic == SRA_CT_BASELINED);
-
-  /* decompress zlib
-   */
-  if (magic == SRA_CT_ZLIB)
-  {
-    shift = 5; /* magic + length */
-    posig = sra_alloc ( dst, alt, osize + 100 );
-
-    if (_s_decompress_zlib(posig, pesig+shift, (int)osize + 100, ssize-shift))
-      return 1;
-
-    rbpos  = 0; /* read bit position */
-    offset = 0;
-    ssize  = osize;
-    pesig  = posig;
-    _get_byte  (pesig,     &offset,  rbpos, &magic, 1);
-    _get_long  (pesig, 32, &offset, &rbpos, &osize, 1, (ssize << 3));
-
-    assert (magic == SRA_CT_HUFFMAN    || magic == SRA_CT_UNCOMPRESSED ||
-            magic == SRA_CT_NORMALIZED || magic == SRA_CT_BASELINED);
-  }
-
-  /* decompress huffman
-   */
-  if (magic == SRA_CT_HUFFMAN)
-  {
-    _get_short (pesig,     &offset,  rbpos, &fix_seq_len, 1);
-    _get_long  (pesig, 32, &offset, &rbpos, &sim.uval,    1, (ssize << 3));
-    _get_long  (pesig, 32, &offset, &rbpos, &snm.uval,    1, (ssize << 3));
-
-    assert ((osize&3) == 0); /* make shure it can be devided by 4 */
-
-    posig = sra_alloc (dst, alt, osize);
-
-    pos   = 0;
-    wbpos = 0; /* write bit position */
-
-    while (pos < osize)
-    {
-      if (ssize-offset > 4) nbits = 32;
-      else                  nbits = ((ssize-offset)==4?32:((ssize-offset)==3?24:((ssize-offset)==2?16:8)))-rbpos;
-
-      if (offset > (uint32_t)ssize)
-        return 1;
-
-      _get_long (pesig, nbits, &offset, &rbpos, &lval, 0, (ssize << 3));
-
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-      indx = gv_local.rlookup_slx_int [lval>>16];
-#else
-      iptr = (uint16_t*) kbsearch (&lval, gv_local.idx_slx_int,
-                                  INT_HUFF_TREESIZE, sizeof(uint16_t), _s_cmp_key, gv_local.lookup_slx_int);
-      assert (iptr);
-      indx = *iptr;
-#endif
-
-      offset += ((rbpos+(uint32_t)gv_local.lookup_slx_int[indx].nbits) >> 3);
-      rbpos   = ((rbpos+(uint32_t)gv_local.lookup_slx_int[indx].nbits)  & 7);
-
-      if (indx < INT_MAX_POINT)
-      {
-        indx = bswap_16 ((uint16_t)(indx-INT_MID_POINT));
-        _put_short (indx, posig, &pos, wbpos);
-      }
-      else
-      {
-        uint16_t val;
-        if ((int)nbits - (int)gv_local.lookup_slx_int[indx].nbits >= 16)
-        {
-          val = (short)((lval >> (16-gv_local.lookup_slx_int[indx].nbits)) & 0xFFFF);
-          offset += 2;
-        }
-        else
-          _get_short (pesig, &offset, rbpos, &val, 1);
-
-        val = bswap_16 (val);
-        _put_short (val, posig, &pos, wbpos);
-      }
-    }
-
-    _s_undelta_4_channel (fix_seq_len, sizeof(uint16_t), posig, osize);
-
-    pesig = posig;
-    ssize = osize;
-    osize = osize << 1;
-    posig = sra_alloc (dst, alt, osize);
-
-    _s_exponent_4_channel (fix_seq_len, posig, osize, pesig, ssize, sim.fval, snm.fval);
-  }
-  else
-  if (magic == SRA_CT_UNCOMPRESSED || magic == SRA_CT_NORMALIZED || magic == SRA_CT_BASELINED)
-  {
-    assert ((osize&3) == 0); /* make shure it can be devided by 4 */
-    osize *= 2;              /* desination size is 4 bytes per channel, but the original is 2 */
-
-    posig = sra_alloc (dst, alt, osize);
-
-    _s_decode_slx (magic, pesig, posig, osize, offset, rbpos, ssize);
-  }
-
-  assert ( osize <= dst -> elem_count );
-  KDataBufferResize ( dst, osize );
-
-  return 0;
-}
-
-int sra_decompress_nse ( KDataBuffer *dst, KDataBuffer *alt, const void* src, int ssize )
-{
-  uchar_t        magic;
-  const uchar_t* pesig;
-  uchar_t*       posig;
-#if !SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-  uint16_t*      iptr;
-#endif
-  uint16_t       indx, fix_seq_len, shift;
-  uint32_t       pos, rbpos, wbpos, nbits;
-  uint32_t       offset, osize, lval;
-  union { float fval; uint32_t uval; } sim, snm; /* minimum level of signal and noise */
-
-  assert (gv_local.lookup_slx_nse_initialized);
-
-  rbpos  = 0;
-  offset = 0;
-  pesig  = src;
-
-  /* get magic and size of data
-   */
-  _get_byte  (pesig,     &offset,  rbpos, &magic, 1);
-  _get_long  (pesig, 32, &offset, &rbpos, &osize, 1, (ssize << 3));
-
-  assert (magic == SRA_CT_ZLIB         || magic == SRA_CT_HUFFMAN ||
-          magic == SRA_CT_UNCOMPRESSED || magic == SRA_CT_NORMALIZED ||
-          magic == SRA_CT_BASELINED);
-
-  /* decompress zlib
-   */
-  if (magic == SRA_CT_ZLIB)
-  {
-    shift = 5; /* magic + length */
-    posig = sra_alloc ( dst, alt, osize + 100 );
-
-    if (_s_decompress_zlib(posig, pesig+shift, (int)osize + 100, ssize-shift))
-      return 1;
-
-    rbpos  = 0; /* read bit position */
-    offset = 0;
-    ssize  = osize;
-    pesig  = posig;
-    _get_byte  (pesig,     &offset,  rbpos, &magic, 1);
-    _get_long  (pesig, 32, &offset, &rbpos, &osize, 1, (ssize << 3));
-
-    assert (magic == SRA_CT_HUFFMAN    || magic == SRA_CT_UNCOMPRESSED ||
-            magic == SRA_CT_NORMALIZED || magic == SRA_CT_BASELINED);
-  }
-
-  /* decompress huffman
-   */
-  if (magic == SRA_CT_HUFFMAN)
-  {
-    _get_short (pesig,     &offset,  rbpos, &fix_seq_len, 1);
-    _get_long  (pesig, 32, &offset, &rbpos, &sim.uval,    1, (ssize << 3));
-    _get_long  (pesig, 32, &offset, &rbpos, &snm.uval,    1, (ssize << 3));
-
-    assert ((osize&3) == 0); /* make shure it can be devided by 4 */
-
-    posig = sra_alloc (dst, alt, osize);
-
-    /* decompress huffman
-     */
-    pos   = 0;
-    wbpos = 0; /* write bit position */
-
-    while (pos < osize)
-    {
-      if (ssize-offset > 4) nbits = 32;
-      else                  nbits = ((ssize-offset)==4?32:((ssize-offset)==3?24:((ssize-offset)==2?16:8)))-rbpos;
-
-      if (offset > (uint32_t)ssize)
-        return 1;
-
-      _get_long (pesig, nbits, &offset, &rbpos, &lval, 0, (ssize << 3));
-
-#if SRA_DECOMPRESS_USE_REVERSE_LOOKUP
-      indx = gv_local.rlookup_slx_nse [lval>>16];
-#else
-      iptr = (uint16_t*) kbsearch (&lval, gv_local.idx_slx_nse,
-                                  NSE_HUFF_TREESIZE, sizeof(uint16_t), _s_cmp_key, gv_local.lookup_slx_nse);
-      assert (iptr);
-      indx = *iptr;
-#endif
-
-      offset += ((rbpos+(uint32_t)gv_local.lookup_slx_nse[indx].nbits) >> 3);
-      rbpos   = ((rbpos+(uint32_t)gv_local.lookup_slx_nse[indx].nbits)  & 7);
-
-      if (indx < NSE_MAX_POINT)
-      {
-        indx = bswap_16 ((uint16_t)(indx-NSE_MID_POINT));
-        _put_short (indx, posig, &pos, wbpos);
-      }
-      else
-      {
-        uint16_t val;
-        if ((int)nbits - (int)gv_local.lookup_slx_int[indx].nbits >= 16)
-        {
-          val = (short)((lval >> (16-gv_local.lookup_slx_nse[indx].nbits)) & 0xFFFF);
-          offset += 2;
-        }
-        else
-          _get_short (pesig, &offset, rbpos, &val, 1);
-
-        val = bswap_16 (val);
-        _put_short (val, posig, &pos, wbpos);
-      }
-    }
-
-    _s_undelta_4_channel (fix_seq_len, sizeof(uint16_t), posig, osize);
-
-    pesig = posig;
-    ssize = osize;
-    osize = osize << 1;
-    posig = sra_alloc (dst, alt, osize);
-
-    _s_exponent_4_channel (fix_seq_len, posig, osize, pesig, ssize, sim.fval, snm.fval);
-  }
-  else
-  if (magic == SRA_CT_UNCOMPRESSED || magic == SRA_CT_NORMALIZED || magic == SRA_CT_BASELINED)
-  {
-    assert ((osize&3) == 0); /* make shure it can be devided by 4 */
-    osize *= 2;              /* desination size is 4 bytes per channel, but the original is 2 */
-
-    posig = sra_alloc (dst, alt, osize);
-
-    _s_decode_slx (magic, pesig, posig, osize, offset, rbpos, ssize);
-  }
-
-  assert ( osize <= dst -> elem_count );
-  KDataBufferResize ( dst, osize );
-
-  return 0;
-}
-
diff --git a/libs/sraxf/v0-decompress.h b/libs/sraxf/v0-decompress.h
deleted file mode 100644
index c144ce4..0000000
--- a/libs/sraxf/v0-decompress.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _SRA_DECOMPRESS_HEADER
-#define _SRA_DECOMPRESS_HEADER
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* sra compression types
- */
-#define SRA_CT_UNCOMPRESSED      0
-#define SRA_CT_HUFFMAN           1
-#define SRA_CT_ZLIB              2
-#define SRA_CT_NCBI2NA           3
-#define SRA_CT_NORMALIZED        4
-#define SRA_CT_BASELINED         5
-#define SRA_CT_PACKED            6
-#define SRA_CT_TRUNCATED         7
-#define SRA_CT_EXP10             8
-#define SRA_CT_TRANSLATE         9
-
-
-/* forward of KDataBuffer */
-struct KDataBuffer;
-
-
-/* blob header pseudo descriptions
- *  NB - all structs are single-byte aligned
- *
-struct HDR_454_POSITION
-{
-    uint8_t type;
-    uint16_t osize; -- double compressed, 2 headers total
-};
-
-struct HDR_454_READ
-{
-    uint8_t type;
-    uint16_t osize; -- 1 byte per base, i.e. row-length
-};
-
-struct HDR_454_QUALITY
-{
-    uint8_t type;
-    uint16_t osize; -- double compressed
-};
-
-struct HDR_454_CLIP
-{
-    uint8_t type;
-    uint32_t osize; -- zlib compressed
-};
-
-struct HDR_454_SIGNAL
-{
-    uint8_t type;
-    uint16_t osize; -- double compressed
-};
-
-struct HDR_SLX_ZLIB
-{
-    uint8_t type;
-    uint32_t osize; -- double compressed
-};
-
-struct HDR_SLX_QUALITY
-{
-    uint8_t type;
-    uint32_t osize;
-    uint8_t qmin;
-    uint8_t qmax;
-    uint16_t fixed_len;
-};
-
-struct HDR_SLX_READ
-{
-    uint8_t type;
-    uint32_t osize;
-    uint16_t fixed_len;
-};
-
-struct HDR_SLX_SIG_HUFFMAN
-{
-    uint8_t type;
-    uint32_t osize;
-    uint16_t fixed_len;
-    float sim;
-    float snm;
-};
-
-struct HDR_SLX_SIG_BASELINE -- or uncompressed
-{
-    uint8_t type;
-    uint32_t osize;
-    uint16_t fixed_len;
-    uint32_t baseline;
-};
-
-struct HDR_SLX_SIG_NORMALIZED
-{
-    uint8_t type;
-    uint32_t osize;
-    uint16_t fixed_len;
-    uint16_t min;
-    float scale;
-};
-
-*/
-
-/* decompression routines:
- * return a pointer to an allocated memory buffer and the size of the buffer in bytes
- * you would need to free(*dst) after its use
- *
- * parameters:
- *   platform = 1 (454), 2 (solexa)
- *   dst    - a pointer to a buffer into which an uncompressed data is written
- *   dsize  - the size of the incompressed data
- *   src    - compressed data source
- *   ssize  - size of compressed data
- *
- * return values: 0 - OK, 1 - error
- */
-void sra_decompress_init  (void);
-
-/* SIGNAL */
-int sra_decompress_sig_454(struct KDataBuffer *dst, struct KDataBuffer *alt, const void* src, int ssize);
-int sra_decompress_sig_slx(struct KDataBuffer *dst, struct KDataBuffer *alt, const void* src, int ssize);
-/* INTENSITY */
-int sra_decompress_int(struct KDataBuffer *dst, struct KDataBuffer *alt, const void* src, int ssize);
-/* NOISE */
-int sra_decompress_nse(struct KDataBuffer *dst, struct KDataBuffer *alt, const void* src, int ssize);
-/* QUALITY */
-int sra_decompress_prb_454(struct KDataBuffer *dst, struct KDataBuffer *alt, const void* src, int ssize);
-int sra_decompress_prb_slx(struct KDataBuffer *dst, struct KDataBuffer *alt, const void* src, int ssize);
-/* POSITION */
-int sra_decompress_pos(struct KDataBuffer *dst, struct KDataBuffer *alt, const void* src, int ssize);
-/* CLIP_QUALITY_ */
-int sra_decompress_clp(struct KDataBuffer *dst, struct KDataBuffer *alt, const void* src, int ssize);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/libs/sraxf/v0-funcs.c b/libs/sraxf/v0-funcs.c
deleted file mode 100644
index 61b4a5b..0000000
--- a/libs/sraxf/v0-funcs.c
+++ /dev/null
@@ -1,337 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <vdb/vdb-priv.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <limits.h>
-
-#include <endian.h>
-#include <byteswap.h>
-
-#ifdef HTONL
-#undef HTONL
-#endif
-
-#ifdef HTONS
-#undef HTONS
-#endif
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define HTONL( x ) bswap_32 ( x )
-#define HTONS( x ) bswap_16 ( x )
-#else
-#define HTONL( x ) ( x )
-#define HTONS( x ) ( x )
-#endif
-
-#include "v0-decompress.h"
-
-static
-rc_t CC sra_read_decompress_454 ( void *self, const VXformInfo *info,
-    VLegacyBlobResult *rslt, const KDataBuffer *src )
-{
-    rc_t rc;
-    KDataBuffer *dst = rslt -> dst;
-    const uint8_t *p = src -> base;
-
-    uint32_t num_bases = HTONS ( * ( const uint16_t* ) & p [ 1 ] );
-    uint32_t hdr_size = 3;
-
-    /* make sub-buffer from input */
-    KDataBuffer tmp;
-    rc = KDataBufferCast ( src, & tmp, 8, false );
-    if ( rc == 0 )
-    {
-        KDataBufferWhack ( dst );
-        rc = KDataBufferSub ( & tmp, dst, hdr_size, UINT64_MAX );
-        if ( rc == 0 )
-        {
-            /* cast to 2na */
-            rc = KDataBufferCast ( dst, dst, 2, true );
-            if ( rc == 0 )
-            {
-                /* resize to actual number of bases */
-                assert ( num_bases <= dst -> elem_count );
-                rc = KDataBufferResize ( dst, num_bases );
-            }
-        }
-
-        KDataBufferWhack ( & tmp );
-    }
-
-    return rc;
-}
-
-static
-rc_t CC sra_read_decompress_slx ( void *self, const VXformInfo *info,
-    VLegacyBlobResult *rslt, const KDataBuffer *src )
-{
-    rc_t rc;
-    KDataBuffer tmp;
-    uint32_t hdr_size;
-    KDataBuffer *dst = rslt -> dst;
-    const uint8_t *p = src -> base;
-
-    uint32_t num_bases = HTONL ( * ( const uint32_t* ) & p [ 1 ] );
-    uint32_t row_len = HTONS ( * ( const uint16_t* ) & p [ 5 ] );
-    assert ( row_len != 0 );
-    assert ( num_bases % row_len == 0 );
-    hdr_size = 7;
-
-    /* make sub-buffer from input */
-    rc = KDataBufferCast ( src, & tmp, 8, false );
-    if ( rc == 0 )
-    {
-        KDataBufferWhack ( dst );
-        rc = KDataBufferSub ( & tmp, dst, hdr_size, UINT64_MAX );
-        if ( rc == 0 )
-        {
-            /* cast to 2na */
-            rc = KDataBufferCast ( dst, dst, 2, true );
-            if ( rc == 0 )
-            {
-                /* resize to actual number of bases */
-                assert ( num_bases <= dst -> elem_count );
-                rc = KDataBufferResize ( dst, num_bases );
-            }
-        }
-
-        KDataBufferWhack ( & tmp );
-    }
-
-    return rc;
-}
-
-VTRANSFACT_IMPL ( NCBI_SRA_decode_READ, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    VNoHdrBlobFunc f;
-    rslt -> variant = vftLegacyBlob;
-
-    /* the discriminator */
-    switch ( cp -> argv [ 0 ] . data . u8 [ 0 ] )
-    {
-    case SRA_PLATFORM_454:
-        f = sra_read_decompress_454;
-        break;
-    case SRA_PLATFORM_ILLUMINA:
-        f = sra_read_decompress_slx;
-        break;
-    default:
-        return RC ( rcSRA, rcFunction, rcConstructing, rcParam, rcInvalid );
-    }
-
-    /* DO NOT CHANGE ASSIGNMENT FROM "f"
-       we want the compiler to catch type mismatches */
-    rslt -> u . bf = ( VBlobFunc ) f;
-
-    return 0;
-}
-
-/* all of the functions have this prototype */
-typedef int ( * legacy_decompress_func ) ( KDataBuffer*, KDataBuffer*, const void*, int );
-
-/* function ids */
-enum
-{
-    sra_prb_454,
-    sra_prb_slx,
-    sra_sig_454,
-    sra_sig_slx,
-    sra_int,
-    sra_nse,
-    sra_clip,
-    sra_pos
-};
-
-static
-legacy_decompress_func funcs [] =
-{
-    sra_decompress_prb_454,
-    sra_decompress_prb_slx,
-    sra_decompress_sig_454,
-    sra_decompress_sig_slx,
-    sra_decompress_int,
-    sra_decompress_nse,
-    sra_decompress_clp,
-    sra_decompress_pos
-};
-
-static
-rc_t CC sra_legacy_decompress ( void *self, const VXformInfo *info,
-    VLegacyBlobResult *rslt, const KDataBuffer *src )
-{
-    int failed;
-    KDataBuffer *dst = rslt -> dst;
-
-    /* an initially empty buffer */
-    KDataBuffer alt;
-    KDataBufferMakeBytes ( & alt, 0 );
-
-    assert(KDataBufferBytes ( src ) < INT_MAX);
-    /* invoke the decompression function */
-    failed = funcs [ ( size_t ) self ] ( dst, & alt, src -> base, (int)KDataBufferBytes ( src ) );
-
-    /* whack any double buffer */
-    KDataBufferWhack ( & alt );
-
-    /* return non-descript status */
-    if ( failed )
-        return RC ( rcSRA, rcBlob, rcUnpacking, rcNoObj, rcUnknown );
-    return 0;
-}
-
-static
-rc_t sra_legacy_init ( void )
-{
-    static bool done;
-    if ( ! done )
-    {
-        sra_decompress_init ();
-        done = true;
-    }
-
-    return 0;
-}
-
-VTRANSFACT_IMPL ( NCBI_SRA_decode_QUALITY, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    /* DO NOT REMOVE THIS ASSIGNMENT
-       we want the compiler to catch type mismatches */
-    VNoHdrBlobFunc f = sra_legacy_decompress;
-    rslt -> u . bf = ( VBlobFunc ) f;
-    rslt -> variant = vftLegacyBlob;
-
-    /* the discriminator */
-    switch ( cp -> argv [ 0 ] . data . u8 [ 0 ] )
-    {
-    case SRA_PLATFORM_454:
-        rslt -> self = ( void* ) sra_prb_454;
-        break;
-    case SRA_PLATFORM_ILLUMINA:
-        rslt -> self = ( void* ) sra_prb_slx;
-        break;
-    default:
-        return RC ( rcSRA, rcFunction, rcConstructing, rcParam, rcInvalid );
-    }
-
-    return sra_legacy_init ();
-}
-
-VTRANSFACT_IMPL ( NCBI_SRA_decode_SIGNAL, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    /* DO NOT REMOVE THIS ASSIGNMENT
-       we want the compiler to catch type mismatches */
-    VNoHdrBlobFunc f = sra_legacy_decompress;
-    rslt -> u . bf = ( VBlobFunc ) f;
-    rslt -> variant = vftLegacyBlob;
-
-    /* the discriminator */
-    switch ( cp -> argv [ 0 ] . data . u8 [ 0 ] )
-    {
-    case SRA_PLATFORM_454:
-        rslt -> self = ( void* ) sra_sig_454;
-        break;
-    case SRA_PLATFORM_ILLUMINA:
-        rslt -> self = ( void* ) sra_sig_slx;
-        break;
-    default:
-        return RC ( rcSRA, rcFunction, rcConstructing, rcParam, rcInvalid );
-    }
-
-    return sra_legacy_init ();
-}
-
-VTRANSFACT_IMPL ( NCBI_SRA_decode_INTENSITY, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    /* DO NOT REMOVE THIS ASSIGNMENT
-       we want the compiler to catch type mismatches */
-    VNoHdrBlobFunc f = sra_legacy_decompress;
-    rslt -> u . bf = ( VBlobFunc ) f;
-    rslt -> variant = vftLegacyBlob;
-
-    /* the discriminator */
-    rslt -> self = ( void* ) sra_int;
-
-    return sra_legacy_init ();
-}
-
-VTRANSFACT_IMPL ( NCBI_SRA_decode_NOISE, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    /* DO NOT REMOVE THIS ASSIGNMENT
-       we want the compiler to catch type mismatches */
-    VNoHdrBlobFunc f = sra_legacy_decompress;
-    rslt -> u . bf = ( VBlobFunc ) f;
-    rslt -> variant = vftLegacyBlob;
-
-    /* the discriminator */
-    rslt -> self = ( void* ) sra_nse;
-
-    return sra_legacy_init ();
-}
-
-VTRANSFACT_IMPL ( NCBI_SRA_decode_CLIP, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    /* DO NOT REMOVE THIS ASSIGNMENT
-       we want the compiler to catch type mismatches */
-    VNoHdrBlobFunc f = sra_legacy_decompress;
-    rslt -> u . bf = ( VBlobFunc ) f;
-    rslt -> variant = vftLegacyBlob;
-
-    /* the discriminator */
-    rslt -> self = ( void* ) sra_clip;
-
-    return sra_legacy_init ();
-}
-
-VTRANSFACT_IMPL ( NCBI_SRA_decode_POSITION, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    /* DO NOT REMOVE THIS ASSIGNMENT
-       we want the compiler to catch type mismatches */
-    VNoHdrBlobFunc f = sra_legacy_decompress;
-    rslt -> u . bf = ( VBlobFunc ) f;
-    rslt -> variant = vftLegacyBlob;
-
-    /* the discriminator */
-    rslt -> self = ( void* ) sra_pos;
-
-    return sra_legacy_init ();
-}
diff --git a/libs/sraxf/varloc.c b/libs/sraxf/varloc.c
deleted file mode 100644
index 2698110..0000000
--- a/libs/sraxf/varloc.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <insdc/insdc.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-
-/****************************** tokenize_var_id *******************************/
-/* typedef uint16_t text_token [ 3 ]; */
-
-static
-rc_t CC tokenize_var_id ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc = 0;
-    int pos = 0;
-    unsigned const var_id_len = argv[0].u.data.elem_count;
-    struct
-    {
-        uint16_t token_type;
-        uint16_t position;
-        uint16_t length;
-    } *dst;
-    const char *var_id	= argv[0].u.data.base;
-    var_id += argv[0].u.data.first_elem;
-    
-    rslt->data->elem_bits = sizeof(dst[0]) * 8;
-    rc = KDataBufferResize( rslt -> data, 2 );
-    if ( rc != 0 ) return rc;
-    rslt -> elem_count = 2;
-    dst = rslt -> data -> base;
-    memset(dst, 0, 2 * sizeof *dst);
- 
-    /* ([A-Za-z]*)(\d*) */
-    if (var_id_len > 0) {
-        for (pos = var_id_len - 1; pos >= 0; --pos) {
-            if (var_id[pos] < '0' || var_id[pos] > '9') {
-                ++pos;
-                break;
-            }
-            if (pos == 0) { /* all numbers */
-                break;
-            }
-        }
-    }
-    dst [ 1 ] . position = pos;
-    dst [ 1 ] . length = var_id_len - pos;
-    dst [ 0 ] . length = var_id_len - dst [ 1 ] . length;
-
-    return rc;
-}
-
-/* 
- * tokenize_var_id
- *   splits into 2 tokens
- *   0 - prefix
- *   1 - suffix
- *
- * extern function
- * text:token NCBI:var:tokenize_var_id #1 ( ascii var_id );
- */
-VTRANSFACT_IMPL ( NCBI_var_tokenize_var_id, 1, 0, 0 ) ( const void *Self,
-    const VXfactInfo *info, VFuncDesc *rslt,
-    const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->u.rf = tokenize_var_id;
-    rslt->variant = vftRow;
-    return 0;
-}
diff --git a/libs/svdb/Makefile b/libs/svdb/Makefile
deleted file mode 100644
index f09159c..0000000
--- a/libs/svdb/Makefile
+++ /dev/null
@@ -1,95 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/svdb
-
-INT_LIBS = \
-
-EXT_LIBS = \
-	libsvdb
-
-ALL_LIBS = \
-	$(INT_LIBS) \
-	$(EXT_LIBS)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-$(EXT_LIBS): makedirs
-	@ $(MAKE_CMD) $(LIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS)) \
-	$(addprefix $(LIBDIR)/,$(EXT_LIBS))
-
-.PHONY: $(TARGDIR)/all $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# virtual db library
-#
-$(LIBDIR)/libsvdb: $(addprefix $(LIBDIR)/libsvdb.,$(LIBEXT))
-
-SVDB_SRC = \
-	svdb
-
-SVDB_OBJ = \
-	$(addsuffix .$(LOBX),$(SVDB_SRC))
-
-SVDB_LIB = \
-	-lncbi-vdb \
-	-lm
-
-#ifeq (win,$(OS))
-#	SVDB_LIB += -lShell32
-#endif
-
-$(LIBDIR)/libsvdb.$(SHLX): $(SVDB_OBJ)
-	$(LD) --dlib --vers $(SRCDIR)/../ncbi-vdb/libncbi-vdb.vers -o $@ $^ $(SVDB_LIB)
-
-$(LIBDIR)/libsvdb.$(LIBX): $(SVDB_OBJ)
-	$(LD) --slib --vers $(SRCDIR)/../ncbi-vdb/libncbi-vdb.vers -o $@ $^ $(SVDB_LIB)
diff --git a/libs/svdb/svdb.c b/libs/svdb/svdb.c
deleted file mode 100644
index 44e46be..0000000
--- a/libs/svdb/svdb.c
+++ /dev/null
@@ -1,3215 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <svdb/extern.h>
-#include <svdb/svdb.h>
-
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/debug.h>
-#include <klib/text.h>
-#include <klib/vector.h>
-#include <klib/pack.h>
-#include <klib/printf.h>
-
-#include <kfs/directory.h>
-
-#include <kdb/meta.h>
-#include <kdb/namelist.h>
-
-#include <vdb/manager.h>
-#include <vdb/schema.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-
-#include <sra/sraschema.h>
-#include <sra/sradb.h>
-#include <sra/pacbio.h>
-
-#include <vfs/manager.h>
-#include <vfs/resolver.h>
-#include <vfs/path.h>
-
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <string.h>
-#include <bitstr.h>
-
-#define NTABS 8
-#define NCOLUMNS 8
-#define NMETACHILDS 4
-#define NTYPES 8
-#define DEF_ELEM_SEPARATOR ","
-#define DEF_DIM_SEPARATOR "[]"
-#define INVALID_COL 0xFFFFFFFF
-#define INVALID_ROW 0xFFFFFFFFFFFFFFFF
-
-
-bool print_err = false;
-char last_err[ 1024 ];
-
-/* forward decl's */
-struct svdb_conn;
-typedef struct svdb_conn* p_svdb_conn;
-
-struct svdb_tab;
-typedef struct svdb_tab* p_svdb_tab;
-
-struct svdb_col;
-typedef struct svdb_col* p_svdb_col;
-
-struct svdb_type;
-typedef struct svdb_type* p_svdb_type;
-
-struct svdb_meta;
-typedef struct svdb_meta* p_svdb_meta;
-
-
-typedef const char * (*value_trans_func_t)( const uint32_t id );
-typedef char * (*dim_trans_func_t)( const uint8_t *src );
-
-
-typedef struct print_ctx
-{
-    char * buf;
-    int buf_len;
-    int needed;
-    int printed;
-} print_ctx;
-typedef print_ctx* p_print_ctx;
-
-
-typedef struct data_src
-{
-    uint32_t elem_bits;
-    uint32_t boff;
-    uint32_t row_len;
-    uint32_t elem_idx;
-    const void * base;
-} data_src;
-typedef data_src* p_data_src;
-
-
-typedef struct svdb_type
-{
-    const char * name;
-    VTypedecl typedecl;
-    VTypedesc typedesc;
-    p_svdb_col col;
-} svdb_type;
-
-
-typedef struct svdb_col
-{
-    const char * name;
-    const char * cast;
-    const char * elem_separator;
-    const char * dim_separator;
-    const char * cur_typedecl;
-    p_svdb_tab tab;
-    uint32_t cur_idx;
-    int enabled;
-    int open;
-    int visible;
-    Vector types;
-    uint32_t dflt_type_idx;
-    VTypedecl cursor_typedecl;
-    VTypedesc cursor_typedesc;
-    value_trans_func_t value_trans;
-    dim_trans_func_t dim_trans;
-} svdb_col;
-
-
-typedef struct svdb_meta
-{
-    Vector childs;
-    int id;
-    const char * name;
-    const void * value;
-    int value_len;
-} svdb_meta;
-
-
-typedef struct svdb_tab
-{
-    const VTable * tab;
-    const VCursor * cursor;
-    const char * name;
-    p_svdb_meta meta;
-    uint64_t range;
-    int64_t first;
-    int meta_id;
-    p_svdb_conn conn;
-    Vector all_columns;
-    Vector static_columns;
-    Vector non_static_columns;
-    Vector visible_columns;
-    Vector non_visible_columns;
-} svdb_tab;
-
-
-typedef struct svdb_conn
-{
-    char * path;
-    KDirectory * dir;
-    const VDBManager * mgr;
-    VSchema * schema;
-    const VDatabase * db;
-    int is_db;
-    Vector tables;
-} svdb_conn;
-
-
-/* special translations of SRA-types into clear text */
-const char SRA_PB_HS_0[] = { "SRA_PACBIO_HOLE_SEQUENCING" };
-const char SRA_PB_HS_1[] = { "SRA_PACBIO_HOLE_ANTIHOLE" };
-const char SRA_PB_HS_2[] = { "SRA_PACBIO_HOLE_FIDUCIAL" };
-const char SRA_PB_HS_3[] = { "SRA_PACBIO_HOLE_SUSPECT" };
-const char SRA_PB_HS_4[] = { "SRA_PACBIO_HOLE_ANTIMIRROR" };
-const char SRA_PB_HS_5[] = { "SRA_PACBIO_HOLE_FDZMW" };
-const char SRA_PB_HS_6[] = { "SRA_PACBIO_HOLE_FBZMW" };
-const char SRA_PB_HS_7[] = { "SRA_PACBIO_HOLE_ANTIBEAMLET" };
-const char SRA_PB_HS_8[] = { "SRA_PACBIO_HOLE_OUTSIDEFOV" };
-const char SRA_PB_HS_9[] = { "unknown hole-status" };
-
-static const char *sra_trans_hole_status( const uint32_t id )
-{
-    switch( id )
-    {
-        case SRA_PACBIO_HOLE_SEQUENCING     : return( SRA_PB_HS_0 ); break;
-        case SRA_PACBIO_HOLE_ANTIHOLE       : return( SRA_PB_HS_1 ); break;
-        case SRA_PACBIO_HOLE_FIDUCIAL       : return( SRA_PB_HS_2 ); break;
-        case SRA_PACBIO_HOLE_SUSPECT        : return( SRA_PB_HS_3 ); break;
-        case SRA_PACBIO_HOLE_ANTIMIRROR     : return( SRA_PB_HS_4 ); break;
-        case SRA_PACBIO_HOLE_FDZMW          : return( SRA_PB_HS_5 ); break;
-        case SRA_PACBIO_HOLE_FBZMW          : return( SRA_PB_HS_6 ); break;
-        case SRA_PACBIO_HOLE_ANTIBEAMLET    : return( SRA_PB_HS_7 ); break;
-        case SRA_PACBIO_HOLE_OUTSIDEFOV     : return( SRA_PB_HS_8 ); break;
-    }
-    return( SRA_PB_HS_9 );
-}
-
-const char SRA_PF_0[] = { "SRA_PLATFORM_UNDEFINED" };
-const char SRA_PF_1[] = { "SRA_PLATFORM_454" };
-const char SRA_PF_2[] = { "SRA_PLATFORM_ILLUMINA" };
-const char SRA_PF_3[] = { "SRA_PLATFORM_ABSOLID" };
-const char SRA_PF_4[] = { "SRA_PLATFORM_COMPLETE_GENOMICS" };
-const char SRA_PF_5[] = { "SRA_PLATFORM_HELICOS" };
-const char SRA_PF_6[] = { "SRA_PLATFORM_PACBIO_SMRT" };
-const char SRA_PF_7[] = { "SRA_PLATFORM_ION_TORRENT" };
-const char SRA_PF_8[] = { "SRA_PLATFORM_CAPILLARY" };
-const char SRA_PF_9[] = { "SRA_PLATFORM_OXFORD_NANOPORE" };
-const char SRA_PF_N[] = { "unknown platform" };
-
-static const char *sra_trans_platform( const uint32_t id )
-{
-    switch( id )
-    {
-        case 0  : return( SRA_PF_0 ); break;
-        case 1  : return( SRA_PF_1 ); break;
-        case 2  : return( SRA_PF_2 ); break;
-        case 3  : return( SRA_PF_3 ); break;
-        case 4  : return( SRA_PF_4 ); break;
-        case 5  : return( SRA_PF_5 ); break;
-        case 6  : return( SRA_PF_6 ); break;
-        case 7  : return( SRA_PF_7 ); break;
-        case 8  : return( SRA_PF_8 ); break;
-        case 9  : return( SRA_PF_9 ); break;		
-    }
-    return( SRA_PF_N );
-}
-
-
-const char SRA_RT_0[] = { "SRA_READ_TYPE_TECHNICAL" };
-const char SRA_RT_1[] = { "SRA_READ_TYPE_BIOLOGICAL" };
-const char SRA_RT_2[] = { "SRA_READ_TYPE_TECHNICAL|SRA_READ_TYPE_FORWARD" };
-const char SRA_RT_3[] = { "SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD" };
-const char SRA_RT_4[] = { "SRA_READ_TYPE_TECHNICAL|SRA_READ_TYPE_REVERSE" };
-const char SRA_RT_5[] = { "SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_REVERSE" };
-const char SRA_RT_6[] = { "unknown read-type" };
-
-static const char *sra_trans_read_type( const uint32_t id )
-{
-    switch( id )
-    {
-        case 0 : return( SRA_RT_0 ); break;
-        case 1 : return( SRA_RT_1 ); break;
-        case 2 : return( SRA_RT_2 ); break;
-        case 3 : return( SRA_RT_3 ); break;
-        case 4 : return( SRA_RT_4 ); break;
-        case 5 : return( SRA_RT_5 ); break;
-    }
-    return( SRA_RT_6 );
-}
-
-
-const char SRA_FT_0[] = { "SRA_READ_FILTER_PASS" };
-const char SRA_FT_1[] = { "SRA_READ_FILTER_REJECT" };
-const char SRA_FT_2[] = { "SRA_READ_FILTER_CRITERIA" };
-const char SRA_FT_3[] = { "SRA_READ_FILTER_REDACTED" };
-const char SRA_FT_4[] = { "unknown read-filter" };
-
-static const char *sra_trans_read_filter( const uint32_t id )
-{
-    switch( id )
-    {
-        case 0 : return( SRA_FT_0 ); break;
-        case 1 : return( SRA_FT_1 ); break;
-        case 2 : return( SRA_FT_2 ); break;
-        case 3 : return( SRA_FT_3 ); break;
-    }
-    return( SRA_FT_4 );
-}
-
-
-/* hardcoded values taken from asm-trace/interface/sra/sradb.h */
-#define SRA_KEY_PLATFORM_ID "INSDC:SRA:platform_id"
-#define SRA_KEY_XREAD_TYPE "INSDC:SRA:xread_type"
-#define SRA_KEY_READ_TYPE "INSDC:SRA:read_type"
-#define SRA_KEY_READ_FILTER "INSDC:SRA:read_filter"
-#define SRA_PACBIO_HOLE_STATUS "PacBio:hole:status"
-
-static bool vdcd_type_cmp( const VSchema *my_schema, VTypedecl * typedecl, const char * to_check )
-{
-    VTypedecl type_to_check;
-    rc_t rc = VSchemaResolveTypedecl ( my_schema, &type_to_check, "%s", to_check );
-    if ( rc == 0 )
-    {
-        return VTypedeclToTypedecl ( typedecl, my_schema, &type_to_check, NULL, NULL );
-    }
-    return false;
-}
-
-static value_trans_func_t sra_get_value_trans_func( const VSchema *my_schema, VTypedecl * typedecl )
-{
-    value_trans_func_t res = NULL;
-
-    if ( my_schema == NULL ) return res;
-    if ( typedecl == NULL ) return res;
-
-    if ( vdcd_type_cmp( my_schema, typedecl, SRA_KEY_PLATFORM_ID ) )
-    {
-        res = sra_trans_platform;
-    }
-    else if ( vdcd_type_cmp( my_schema, typedecl, SRA_KEY_XREAD_TYPE ) )
-    {
-        res = sra_trans_read_type;
-    }
-    else if ( vdcd_type_cmp( my_schema, typedecl, SRA_KEY_READ_TYPE ) )
-    {
-        res = sra_trans_read_type;
-    }
-    else if ( vdcd_type_cmp( my_schema, typedecl, SRA_KEY_READ_FILTER ) )
-    {
-        res = sra_trans_read_filter;
-    }
-    else if ( vdcd_type_cmp( my_schema, typedecl, SRA_PACBIO_HOLE_STATUS ) )
-    {
-        res = sra_trans_hole_status;
-    }
-    return res;
-}
-
-
-/* implementation of the dimension-translation-functions */
-static char * sra_read_desc( const uint8_t * src )
-{
-    char *res = calloc( 1, 120 );
-    SRAReadDesc desc;
-    memmove( &desc, src, sizeof( desc ) );
-    string_printf ( res, 119, NULL,
-              "seg.start=%u, seg.len=%u, type=%u, cs_key=%u, label=%s",
-              desc.seg.start, desc.seg.len, desc.type,
-              desc.cs_key, desc.label );
-    return res;
-}
-
-
-static char * sra_spot_desc( const uint8_t *src )
-{
-    char *res = calloc( 1, 120 );
-    SRASpotDesc desc;
-    memmove( &desc, src, sizeof( desc ) );
-    string_printf ( res, 119, NULL,
-              "spot_len=%u, fixed_len=%u, signal_len=%u, clip_qual_right=%u, num_reads=%u",
-              desc.spot_len, desc.fixed_len, desc.signal_len,
-              desc.clip_qual_right, desc.num_reads );
-    return res;
-}
-
-/* hardcoded values taken from asm-trace/interface/sra/sradb.h */
-#define SRA_KEY_READ_DESC "NCBI:SRA:ReadDesc"
-#define SRA_KEY_SPOT_DESC "NCBI:SRA:SpotDesc"
-
-static dim_trans_func_t sra_get_dim_trans_func( const VSchema *my_schema, VTypedecl * typedecl )
-{
-    dim_trans_func_t res = NULL;
-
-    if ( my_schema == NULL ) return res;
-    if ( typedecl == NULL ) return res;
-
-    if ( vdcd_type_cmp( my_schema, typedecl, SRA_KEY_READ_DESC ) )
-    {
-        res = sra_read_desc;
-    }
-    else if ( vdcd_type_cmp( my_schema, typedecl, SRA_KEY_SPOT_DESC ) )
-    {
-        res = sra_spot_desc;
-    }
-    return res;
-}
-
-
-static void svdb_init_print_ctx( p_print_ctx ctx, char * buf, int buf_len )
-{
-    ctx->buf = buf;
-    ctx->buf_len = buf_len;
-    ctx->needed = 0;
-    ctx->printed = 0;
-}
-
-
-KLIB_EXTERN int CC string_cmp ( const char *a, size_t asize,
-    const char *b, size_t bsize, uint32_t max_chars );
-
-static int svdb_strcmp( const char *a, const char *b )
-{
-    size_t sa = string_size ( a );
-    size_t sb = string_size ( b );
-    uint32_t max_chars = ( sa > sb ) ? (uint32_t)sa : (uint32_t)sb;
-    return string_cmp ( a, sa, b, sb, max_chars );
-}
-
-
-static void svdb_set_last_err( const char * s )
-{
-    string_copy_measure ( last_err, sizeof last_err, s );
-}
-
-
-const char ACC_NOT_FOUND[] = { "accession not found" };
-char accession_2_path_buffer[ 1024 ];
-
-
-static void log_and_err( rc_t rc, const char * s )
-{
-    if ( print_err ) LOGERR( klogInt, rc, s );
-    svdb_set_last_err( s );
-}
-
-
-MOD_EXPORT const char * CC svdb_accession_2_path( const char * accession )
-{
-    const char * res = NULL;
-    if ( accession != NULL && accession[0] != 0 )
-    {
-        if ( strchr ( accession, '/' ) == NULL )
-        {
-            VFSManager * vfs_mgr;
-            rc_t rc = VFSManagerMake ( &vfs_mgr );
-            if ( rc != 0 )
-                log_and_err( rc, "VFSManagerMake() failed in svdb_accession_2_path()" );
-            else
-            {
-                VResolver * resolver;
-
-                rc = VFSManagerGetResolver ( vfs_mgr, &resolver );
-                if ( rc != 0 )
-                    log_and_err( rc, "VFSManagerGetResolver() failed in svdb_accession_2_path()" );
-                else
-                {
-                    VPath * vpath;
-                    rc = VFSManagerMakeSysPath ( vfs_mgr, &vpath, accession );
-                    if ( rc != 0 )
-                        log_and_err( rc, "VFSManagerMakeSysPath() failed in svdb_accession_2_path()" );
-                    else
-                    {
-                        const VPath * local;
-                        rc = VResolverQuery ( resolver, eProtocolHttp, vpath, &local, NULL, NULL );
-                        if ( rc != 0 )
-                            log_and_err( rc, "VResolverQuery() failed in svdb_accession_2_path()" );
-                        else
-                        {
-                            const String * str;
-                            rc = VPathMakeString ( local, &str );
-                            if ( rc != 0 )
-                                log_and_err( rc, "VPathMakeString() failed in svdb_accession_2_path()" );
-                            else
-                            {
-                                res = string_dup ( str->addr, str->size );
-                                StringWhack ( str );
-                            }
-
-                            VPathRelease ( local );
-                        }
-                        VPathRelease ( vpath );
-                    }
-                    VResolverRelease ( resolver );
-                }
-                VFSManagerRelease ( vfs_mgr );
-            }
-
-        }
-    }
-    return res;
-}
-
-
-static p_svdb_type svdb_make_type( p_svdb_col col, const char * name )
-{
-    rc_t rc;
-    p_svdb_type res = calloc( 1, sizeof( svdb_type ) );
-    if ( res == NULL )
-    {
-        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-        LOGERR( klogInt, rc, "calloc() failed in svdb_make_type()" );
-    }
-    else
-    {
-        res->col = col;
-        res->name = string_dup_measure ( name, NULL );
-        rc = VSchemaResolveTypedecl ( col->tab->conn->schema, &res->typedecl, "%s", name );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "VSchemaResolveTypedecl() failed in svdb_make_type()" );
-        }
-        else
-        {
-            rc = VSchemaDescribeTypedecl ( col->tab->conn->schema, &res->typedesc, &res->typedecl );
-            if ( rc != 0 )
-            {
-                LOGERR( klogInt, rc, "VSchemaDescribeTypedecl() failed in svdb_make_type()" );
-            }
-        }
-    }
-    return res;
-}
-
-
-static void CC svdb_free_type( void * item, void * data )
-{
-    p_svdb_type t = (p_svdb_type)item;
-    if ( t != NULL )
-    {
-        if ( t->name != NULL )
-        {
-            free( ( void * )t->name );
-        }
-        free( item );
-    }
-}
-
-
-static rc_t svdb_discover_types( p_svdb_col col )
-{
-    KNamelist *type_names;
-    uint32_t dflt_idx;
-    rc_t rc = VTableColumnDatatypes ( col->tab->tab, col->name, &dflt_idx, &type_names );
-    if ( rc == 0 )
-    {
-        uint32_t n;
-        col->dflt_type_idx = dflt_idx;
-        rc = KNamelistCount( type_names, &n );
-        if ( rc == 0 )
-        {
-            uint32_t i;
-            for ( i = 0; i < n && rc == 0; ++i )
-            {
-                const char *type_name;
-                rc = KNamelistGet( type_names, i, &type_name );
-                if ( rc == 0 )
-                {
-                    p_svdb_type type = svdb_make_type( col, type_name );
-                    if ( type == NULL )
-                    {
-                        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-                    }
-                    else
-                    {
-                        rc = VectorAppend ( &col->types, NULL, type );
-                        if ( rc != 0 )
-                        {
-                            LOGERR( klogInt, rc, "VectorAppend() failed in svdb_discover_types()" );
-                            svdb_free_type( type, NULL );
-                        }
-                    }
-                }
-            }
-        }
-        KNamelistRelease( type_names );
-    }
-    return rc;
-}
-
-
-static p_svdb_col svdb_make_col( p_svdb_tab tab, const char * name )
-{
-    rc_t rc;
-    p_svdb_col res = calloc( 1, sizeof( svdb_col ) );
-    if ( res == NULL )
-    {
-        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-        LOGERR( klogInt, rc, "calloc() failed in svdb_make_col()" );
-    }
-    else
-    {
-        
-        VectorInit ( &res->types, 0, NTYPES );
-        res->tab = tab;
-        res->name = string_dup_measure ( name, NULL );
-        res->elem_separator = string_dup_measure ( DEF_ELEM_SEPARATOR, NULL );
-        res->dim_separator = string_dup_measure ( DEF_DIM_SEPARATOR, NULL );
-        res->visible = 1;
-        rc = svdb_discover_types( res );
-        if ( rc != 0 )
-        {
-            VectorWhack ( &res->types, svdb_free_type, NULL );
-            free( ( void* )res->name );
-            res = NULL;
-        }
-    }
-    return res;
-}
-
-
-static void free_if_not_null( const char * s )
-{
-    if ( s != NULL )
-    {
-        free( ( void * ) s );
-    }
-}
-
-
-static void CC svdb_free_col( void * item, void * data )
-{
-    p_svdb_col c = (p_svdb_col)item;
-    if ( c != NULL )
-    {
-        VectorWhack ( &c->types, svdb_free_type, NULL );
-        free_if_not_null( c->elem_separator );
-        free_if_not_null( c->dim_separator );
-        free_if_not_null( c->cur_typedecl );
-        free_if_not_null( c->cast );
-        free_if_not_null( c->name );
-        free( item );
-    }
-}
-
-
-static rc_t svdb_discover_columns( p_svdb_tab table )
-{
-    KNamelist *col_names;
-    rc_t rc = VTableListReadableColumns ( table->tab, &col_names );
-    if ( rc == 0 )
-    {
-        uint32_t n;
-        rc = KNamelistCount( col_names, &n );
-        if ( rc == 0 )
-        {
-            uint32_t i;
-            for ( i = 0; i < n && rc == 0; ++i )
-            {
-                const char *col_name;
-                rc = KNamelistGet( col_names, i, &col_name );
-                if ( rc == 0 )
-                {
-                    p_svdb_col col = svdb_make_col( table, col_name );
-                    if ( col == NULL )
-                    {
-                        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-                    }
-                    else
-                    {
-                        rc = VectorAppend ( &table->all_columns, NULL, col );
-                        if ( rc != 0 )
-                        {
-                            LOGERR( klogInt, rc, "VectorAppend() failed in svdb_discover_columns()" );
-                            svdb_free_col( col, NULL );
-                        }
-                        else
-                        {
-                            VectorAppend ( &table->visible_columns, NULL, col );
-                        }
-                    }
-                }
-            }
-        }
-        KNamelistRelease( col_names );
-    }
-    return rc;
-}
-
-
-static void svdb_whack_meta( p_svdb_meta meta )
-{
-    if ( meta != NULL )
-    {
-        int i, n = VectorLength( &meta->childs );
-        for ( i = 0; i < n; ++i )
-        {
-            p_svdb_meta child = VectorGet ( &meta->childs, i );
-            if ( child != NULL )
-            {
-                svdb_whack_meta( child ); /* recursion here !!! */
-            }
-        }
-        VectorWhack( &meta->childs, NULL, NULL );
-        free_if_not_null( meta->name );
-        free_if_not_null( meta->value );
-        free( meta );
-    }
-}
-
-
-static void svdb_read_meta_value( p_svdb_meta m, const KMDataNode *node )
-{
-    char buffer[ 8 ];
-    size_t num_read, remaining;
-
-    /* first try to detect how big the node-value is */
-    rc_t rc = KMDataNodeRead ( node, 0, buffer, sizeof buffer, &num_read, &remaining );
-    if ( rc == 0 )
-    {
-        size_t count = num_read + remaining;
-        if ( count > 0 )
-        {
-            m->value = malloc( count );
-            if ( m->value != NULL )
-            {
-                /* 2nd try to read it really now */
-                rc = KMDataNodeRead ( node, 0, (void *)m->value, count, &num_read, &remaining );
-                if ( rc == 0 )
-                {
-                    m->value_len = (uint32_t)count;
-                }
-                else
-                {
-                    free( (void *)m->value );
-                    m->value = NULL;
-                }
-            }
-        }
-    }
-}
-
-
-static p_svdb_meta svdb_init_meta( p_svdb_tab tab, const KMDataNode *node, const char * name )
-{
-    p_svdb_meta res = calloc( 1, sizeof( svdb_meta )  );
-    if ( res != NULL )
-    {
-        VectorInit ( &res->childs, 0, NMETACHILDS );
-        res->id = ( tab->meta_id )++;
-        res->name = string_dup_measure ( name, NULL );
-        svdb_read_meta_value( res, node );
-
-        if ( node != NULL )
-        {
-            KNamelist *names;
-            rc_t rc = KMDataNodeListChild ( node, &names );
-            if ( rc == 0 )
-            {
-                uint32_t i, count;
-                rc = KNamelistCount ( names, & count );
-                for ( i = 0; rc == 0 && i < count; ++ i )
-                {
-                    const char *node_path;
-                    rc = KNamelistGet ( names, i, & node_path );
-                    if ( rc == 0 )
-                    {
-                        const KMDataNode *child_node;
-                        rc = KMDataNodeOpenNodeRead ( node, &child_node, "%s", node_path );
-                        if ( rc == 0 )
-                        {
-                            p_svdb_meta child = svdb_init_meta( tab, child_node, node_path );
-                            if ( child != NULL )
-                            {
-                                rc = VectorAppend ( &res->childs, NULL, child );
-                                if ( rc != 0 )
-                                {
-                                    svdb_whack_meta( child );
-                                }
-                            }
-                            KMDataNodeRelease ( child_node );
-                        }
-                    }
-                }
-                KNamelistRelease( names );
-            }
-        }
-    }
-    return res;
-}
-
-
-static p_svdb_meta svdb_find_meta( p_svdb_meta meta, const int id )
-{
-    p_svdb_meta res = NULL;
-    if ( meta->id == id )
-    {
-        res = meta;
-    }
-    else
-    {
-        int i, n = VectorLength( &meta->childs );
-        for ( i = 0; i < n && res == NULL; ++i )
-        {
-            p_svdb_meta child = VectorGet ( &meta->childs, i );
-            if ( child != NULL )
-            {
-                res = svdb_find_meta( child, id );
-            }
-        }
-    }
-    return res;
-}
-
-
-static rc_t svdb_discover_meta( p_svdb_tab tab )
-{
-    const KMetadata *src_meta;
-    rc_t rc = VTableOpenMetadataRead ( tab->tab, &src_meta );
-    if ( rc == 0 )
-    {
-        const KMDataNode *root;
-        rc = KMetadataOpenNodeRead ( src_meta, &root, NULL );
-        if ( rc == 0 )
-        {
-            tab->meta = svdb_init_meta( tab, root, "/" );
-            KMDataNodeRelease ( root );
-        }
-        KMetadataRelease ( src_meta );
-    }
-    return rc;
-}
-
-
-static p_svdb_tab svdb_make_tab( p_svdb_conn pself, const VTable * tab,
-            const char * name )
-{
-    p_svdb_tab res = calloc( 1, sizeof( svdb_tab ) );
-    if ( res == NULL )
-    {
-        rc_t rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-        LOGERR( klogInt, rc, "calloc() failed in svdb_make_tab()" );
-    }
-    else
-    {
-        rc_t rc;
-
-        res->conn = pself;
-        res->tab = tab;
-        VectorInit ( &res->all_columns, 0, NCOLUMNS );
-        VectorInit ( &res->static_columns, 0, NCOLUMNS );
-        VectorInit ( &res->non_static_columns, 0, NCOLUMNS );
-        VectorInit ( &res->visible_columns, 0, NCOLUMNS );
-        VectorInit ( &res->non_visible_columns, 0, NCOLUMNS );
-
-        rc = svdb_discover_columns( res );
-        if ( rc == 0 )
-        {
-            rc = svdb_discover_meta( res );
-            if ( rc == 0 )
-            {
-                res->name = string_dup_measure ( name, NULL );
-            }
-        }
-
-        if ( rc != 0 )
-        {
-            VectorWhack ( &res->static_columns, NULL, NULL );
-            VectorWhack ( &res->non_static_columns, NULL, NULL );
-            VectorWhack ( &res->visible_columns, NULL, NULL );
-            VectorWhack ( &res->non_visible_columns, NULL, NULL );
-            VectorWhack ( &res->all_columns, svdb_free_col, NULL );
-            svdb_whack_meta( res->meta );
-            free( res );
-            res = NULL;
-        }
-    }
-    return res;
-}
-
-
-static void CC svdb_free_table( void * item, void * data )
-{
-    p_svdb_tab t = (p_svdb_tab)item;
-    if ( t != NULL )
-    {
-        rc_t rc;
-        if ( t->cursor != NULL )
-        {
-            rc = VCursorRelease ( t->cursor );
-            if ( rc != 0 )
-            {
-                LOGERR( klogInt, rc, "VCursorRelease() failed in svdb_close_table()" );
-            }
-        }
-        if ( t->tab != NULL ) 
-        {
-            rc = VTableRelease( t->tab );
-            if ( rc != 0 )
-            {
-                LOGERR( klogInt, rc, "VTableRelease() failed in svdb_close_table()" );
-            }
-        }
-        VectorWhack ( &t->static_columns, NULL, NULL );
-        VectorWhack ( &t->non_static_columns, NULL, NULL );
-        VectorWhack ( &t->visible_columns, NULL, NULL );
-        VectorWhack ( &t->non_visible_columns, NULL, NULL );
-        VectorWhack ( &t->all_columns, svdb_free_col, NULL );
-        svdb_whack_meta( t->meta );
-
-        free_if_not_null( t->name );
-        free( item );
-    }
-}
-
-
-static void svdb_clear_vector( Vector * v )
-{
-    while ( VectorLength( v ) > 0 )
-    {
-        void * removed;
-        VectorRemove ( v, 0, &removed );
-    }
-}
-
-
-static Vector * svdb_get_column_vector( p_svdb_tab table, const int selection )
-{
-    Vector * res = &table->all_columns;
-    switch( selection )
-    {
-        case STATIC_COLUMNS      : res = &table->static_columns; break;
-        case NON_STATIC_COLUMNS  : res = &table->non_static_columns; break;
-        case VISIBLE_COLUMNS     : res = &table->visible_columns; break;
-        case NON_VISIBLE_COLUMNS : res = &table->non_visible_columns; break;
-    }
-    return res;
-}
-
-
-MOD_EXPORT void CC svdb_close( void * self )
-{
-    p_svdb_conn pself = (p_svdb_conn)self;
-    if ( pself != NULL )
-    {
-        rc_t rc;
-        VectorWhack ( &pself->tables, svdb_free_table, NULL );
-        rc = VDatabaseRelease( pself->db );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "VDatabaseRelease() failed in svdb_close()" );
-        }
-        rc = VSchemaRelease( pself->schema );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "VSchemaRelease() failed in svdb_close()" );
-        }
-        rc = VDBManagerRelease( pself->mgr );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "VDBManagerRelease() failed in svdb_close()" );
-        }
-        rc = KDirectoryRelease( pself->dir );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "KDirectoryRelease() failed in svdb_close()" );
-        }
-        free_if_not_null( pself->path );
-        free( self );
-    }
-}
-
-
-static rc_t svdb_append_tab( p_svdb_conn pself, const VTable * tab,
-            const char * name )
-{
-    rc_t rc = 0;
-    p_svdb_tab t = svdb_make_tab( pself, tab, name );
-    if ( t == NULL )
-    {
-        rc = VTableRelease( tab );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "VTableRelease() failed in svdb_open()" );
-        }
-        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        rc = VectorAppend ( &pself->tables, NULL, t );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "VectorAppend() failed in svdb_open()" );
-            svdb_free_table( t, NULL );
-        }
-    }
-    return rc;
-}
-
-
-static const char * svdb_filename( const char * path )
-{
-    const char * res = NULL;
-    if ( path != NULL && path[0] != 0 )
-    {
-        res = strrchr( path, '/' );
-        if ( res == NULL )
-        {
-            res = strrchr( path, '\\' );
-        }
-        if ( res == NULL )
-        {
-            res = path;
-        }
-        else
-        {
-            res++;
-        }
-    }
-    return res;
-}
-
-
-static rc_t svdb_open_subtables( p_svdb_conn pself )
-{
-    KNamelist *tbl_names;
-    rc_t rc = VDatabaseListTbl( pself->db, &tbl_names );
-    if ( rc == 0 )
-    {
-        uint32_t n;
-        rc = KNamelistCount( tbl_names, &n );
-        if ( rc == 0 )
-        {
-            uint32_t i;
-            for ( i = 0; i < n && rc == 0; ++i )
-            {
-                const char *tbl_name;
-                rc = KNamelistGet( tbl_names, i, &tbl_name );
-                if ( rc == 0 )
-                {
-                    const VTable * tab;
-                    rc = VDatabaseOpenTableRead( pself->db, &tab, "%s", tbl_name );
-                    if ( rc == 0 )
-                    {
-                        rc = svdb_append_tab( pself, tab, tbl_name );
-                    }
-                }
-            }
-        }
-        KNamelistRelease( tbl_names );
-    }
-    return rc;
-}
-
-
-MOD_EXPORT void * CC svdb_open_path( const char * path  )
-{
-    p_svdb_conn pself = NULL;
-   if ( path != NULL && path[0] != 0 )
-    {
-        rc_t rc;
-        pself = calloc( 1, sizeof( svdb_conn ) );
-        if ( pself == NULL )
-        {
-            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-            LOGERR( klogInt, rc, "calloc() failed in svdb_open()" );
-            svdb_set_last_err( "calloc() failed in svdb_open()" );
-        }
-        else
-        {
-            VectorInit ( &pself->tables, 0, NTABS );
-            rc = KDirectoryNativeDir( &pself->dir );
-            if ( rc != 0 )
-            {
-                LOGERR( klogInt, rc, "KDirectoryNativeDir() failed in svdb_open()" );
-                svdb_set_last_err( "KDirectoryNativeDir() failed in svdb_open()" );
-            }
-            else
-            {
-                rc = VDBManagerMakeRead ( &pself->mgr, pself->dir );
-                if ( rc != 0 )
-                {
-                    LOGERR( klogInt, rc, "VDBManagerMakeRead() failed in svdb_open()" );
-                    svdb_set_last_err( "VDBManagerMakeRead() failed in svdb_open()" );
-                }
-            }
-            if ( rc == 0 )
-            {
-                rc = VDBManagerMakeSRASchema( pself->mgr, &pself->schema );
-                if ( rc != 0 )
-                {
-                    LOGERR( klogInt, rc, "VDBManagerMakeSRASchema() failed in svdb_open()" );
-                    svdb_set_last_err( "VDBManagerMakeSRASchema() failed in svdb_open()" );
-                }
-                else
-                {
-                    /* it is OK if these fail, we have no valid path then... */
-                    rc = VDBManagerOpenDBRead( pself->mgr, &pself->db, pself->schema, "%s", path );
-                    if ( rc == 0 )
-                    {
-                        pself->is_db = 1;
-                        rc = svdb_open_subtables( pself );
-                    }
-                    else
-                    {
-                        const VTable * tab;
-                        rc = VDBManagerOpenTableRead( pself->mgr, &tab, pself->schema, "%s", path );
-                        if ( rc == 0 )
-                        {
-                            rc = svdb_append_tab( pself, tab, svdb_filename( path ) );
-                            if ( rc != 0 )
-                            {
-                                svdb_set_last_err( "svdb_append_tab() failed in svdb_open()" );
-                            }
-                        }
-                        else
-                        {
-                            string_printf ( last_err, sizeof last_err, NULL,
-                                            "VDBManagerOpenTableRead('%s')->'%R' failed",
-                                            path, rc );
-/*                            svdb_set_last_err( "VDBManagerOpenTableRead() failed in svdb_open()" ); */
-                        }
-                    }
-                }
-            }
-
-            if ( rc == 0 )
-            {
-                pself->path = string_dup_measure ( path, NULL );
-                svdb_set_last_err( "OK" );
-            }
-            else
-            {
-                svdb_close( pself );
-                pself = NULL;
-            }
-        }
-    }
-    else
-    {
-        svdb_set_last_err( "path empty in svdb_open()" );
-    }
-    return pself;
-}
-
-
-MOD_EXPORT const char * CC svdb_last_err( void )
-{
-    return last_err;
-}
-
-
-MOD_EXPORT int CC svdb_is_db( void * self )
-{
-    int res = 0;
-    if ( self != NULL )
-    {
-        p_svdb_conn pself = self;
-        res = pself->is_db;
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_count_tabs( void * self )
-{
-    int res = 0;
-    if ( self != NULL )
-    {
-        p_svdb_conn pself = self;
-        res = VectorLength( &pself->tables );
-    }
-    return res;
-}
-
-
-static p_svdb_tab svdb_get_tab( void * self, const int tab_id )
-{
-    p_svdb_tab res = NULL;
-    if ( self != NULL )
-    {
-        p_svdb_conn pself = self;
-        res = VectorGet ( &pself->tables, tab_id );
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_tab_meta_root( void * self, const int tab_id )
-{
-    int res = -1;
-    p_svdb_tab t = svdb_get_tab( self, tab_id );
-    if ( t != NULL )
-    {
-        if ( t->meta != NULL )
-        {
-            res = t->meta->id;
-        }
-    }
-    return res;
-}
-
-
-static p_svdb_meta svdb_get_meta_node( void * self, const int tab_id, const int meta_id )
-{
-    p_svdb_meta m = NULL;
-    p_svdb_tab t = svdb_get_tab( self, tab_id );
-    if ( t != NULL )
-    {
-        if ( t->meta != NULL )
-        {
-            m = svdb_find_meta( t->meta, meta_id );
-        }
-    }
-    return m;
-}
-
-
-static int svdb_check_printable( const void * ptr, const int len )
-{
-    int res = 0;
-    if ( ptr != NULL && len > 0 )
-    {
-        int i, j = 0;
-        const char * cp = ptr;
-        for ( i = 0; i < len; ++i )
-        {
-            if ( !isprint ( cp[ i ] ) )
-                j++;
-        }
-        if ( j == 0 )
-            res = 1;
-        else
-            res = 0;
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_tab_meta_value_printable( void * self, const int tab_id, const int meta_id )
-{
-    int res = -1;
-    p_svdb_meta m = svdb_get_meta_node( self, tab_id, meta_id );
-    if ( m != NULL )
-    {
-        res = svdb_check_printable( m->value, m->value_len );
-    }
-    return res;
-
-}
-
-
-MOD_EXPORT int CC svdb_tab_meta_value_len( void * self, const int tab_id, const int meta_id )
-{
-    int res = -1;
-    p_svdb_meta m = svdb_get_meta_node( self, tab_id, meta_id );
-    if ( m != NULL && m->value != NULL && m->value_len )
-    {
-        res = m->value_len;
-    }
-    return res;
-}
-
-
-MOD_EXPORT const char * CC svdb_tab_meta_value_ptr( void * self, const int tab_id,
-                                              const int meta_id )
-{
-    const char * res = NULL;
-    p_svdb_meta m = svdb_get_meta_node( self, tab_id, meta_id );
-    if ( m != NULL && m->value != NULL && m->value_len )
-    {
-        res = ( char * )m->value;
-    }
-    return res;
-}
-
-
-static rc_t svdb_print_hex( char * dst, size_t dstlen, char * src, size_t srclen,
-                            size_t trim, size_t * num_writ )
-{
-    rc_t rc = 0;
-    bool periods = true;
-    size_t writ, i, n = ( dstlen / 3 );
-
-    *num_writ = 0;
-    if ( n >= srclen )
-    {
-        n = srclen;
-        periods = false;
-    }
-    if ( periods )
-        n--;
-    for ( i = 0; i < n && rc == 0; ++i )
-    {
-        unsigned char x = src[i];
-        if ( i > 0 )
-            rc = string_printf ( dst, dstlen, &writ, "-%02X", x );
-        else
-            rc = string_printf ( dst, dstlen, &writ, "%02X", x );
-        if ( rc == 0 )
-        {
-            dst += writ;
-            *num_writ += writ;
-            dstlen -= writ;
-        }
-    }
-    if ( rc == 0 && periods )
-    {
-        rc = string_printf ( dst, dstlen, &writ, "..." );
-        *num_writ += writ;
-    }
-    return rc;
-}
-
-
-MOD_EXPORT int CC svdb_tab_meta_value( void * self, const int tab_id, const int meta_id,
-                                       char * buf, int buflen, int trim )
-{
-    int res = -1;
-    p_svdb_meta m = svdb_get_meta_node( self, tab_id, meta_id );
-    if ( m != NULL && m->value != NULL && m->value_len )
-    {
-        rc_t rc;
-        size_t num_writ;
-        if ( svdb_check_printable( m->value, m->value_len ) )
-        {
-            if ( trim == 0 || trim >= m->value_len )
-                rc = string_printf ( buf, buflen, &num_writ, "%.*s", m->value_len, m->value );
-            else
-                rc = string_printf ( buf, buflen, &num_writ, "%.*s...", trim, m->value );
-        }
-        else
-        {
-            rc = svdb_print_hex( buf, buflen, (char *)m->value, m->value_len, trim, &num_writ );
-        }
-
-        if ( rc == 0 )
-            res = ( int )num_writ;
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_tab_meta_name( void * self, const int tab_id, const int meta_id,
-                                      char * buf, int buflen )
-{
-    int res = -1;
-    p_svdb_meta m = svdb_get_meta_node( self, tab_id, meta_id );
-    if ( m != NULL )
-    {
-        size_t num_writ;
-        rc_t rc = string_printf ( buf, buflen, &num_writ, "%s", m->name );
-        if ( rc == 0 )
-        {
-            res = ( int )num_writ;
-        }
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_tab_meta_child_count( void * self, const int tab_id,
-        const int meta_id )
-{
-    int res = -1;
-    p_svdb_meta m = svdb_get_meta_node( self, tab_id, meta_id );
-    if ( m != NULL )
-    {
-        res = VectorLength( &m->childs );
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_tab_meta_child_id( void * self, const int tab_id,
-        const int meta_id, const int child_idx )
-{
-    int res = -1;
-    p_svdb_meta m = svdb_get_meta_node( self, tab_id, meta_id );
-    if ( m != NULL )
-    {
-        p_svdb_meta c = VectorGet( &m->childs, child_idx );
-        if ( c != NULL )
-        {
-            res = c->id;
-        }
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_tab_idx( void * self, const char * name )
-{
-    int res = -1;
-    if ( self != NULL )
-    {
-        p_svdb_conn pself = self;
-        int i, n = VectorLength( &pself->tables );
-        for ( i = 0; i < n && res < 0; ++i )
-        {
-            p_svdb_tab tab = VectorGet ( &pself->tables, i );
-            if ( tab != NULL )
-            {
-                if ( svdb_strcmp( tab->name, name ) == 0 )
-                {
-                    res = i;
-                }
-            }
-        }   
-    }
-    return res;
-}
-
-
-static p_svdb_col svdb_get_col( void * self, const int tab_id,
-            const int selection, const int col_id )
-{
-    p_svdb_col res = NULL;
-    p_svdb_tab tab = svdb_get_tab( self, tab_id );
-    if ( tab != NULL )
-    {
-        Vector * v = svdb_get_column_vector( tab, selection );
-        res = VectorGet ( v, col_id );
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_set_column_visibility( void * self, const int tab_id,
-            const int selection, const int col_id, const int visible )
-{
-    int res = 0;
-    p_svdb_col col = svdb_get_col ( self, tab_id, selection, col_id );
-    if ( col != NULL )
-    {
-        int vis = visible;
-        if ( vis != 0 )
-        {
-            vis = 1;
-        }
-        if ( col->visible != vis )
-        {
-            int i, n;
-            p_svdb_tab tab = svdb_get_tab( self, tab_id );
-            col->visible = vis;
-            /* clear the visible and invisible vector */
-            VectorWhack ( &tab->visible_columns, NULL, NULL );
-            VectorWhack ( &tab->non_visible_columns, NULL, NULL );
-
-            VectorInit ( &tab->visible_columns, 0, NCOLUMNS );
-            VectorInit ( &tab->non_visible_columns, 0, NCOLUMNS );
-
-            /* loop through all columns an redistibute them new
-               ( to preserve the original order ) */
-            n = VectorLength( &tab->all_columns );
-            for ( i = 0; i < n; ++i )
-            {
-                col = VectorGet ( &tab->all_columns, i );
-                if ( col != NULL )
-                {
-                    if ( col->visible != 0 )
-                    {
-                        VectorAppend( &tab->visible_columns, NULL, col );
-                    }
-                    else
-                    {
-                        VectorAppend( &tab->non_visible_columns, NULL, col );
-                    }
-                }
-            }   
-            res = 1;
-        }
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_col_idx( void * self, const int tab_id,
-            const int selection, const char * name )
-{
-    int res = -1;
-    p_svdb_tab tab = svdb_get_tab( self, tab_id );
-    if ( tab != NULL )
-    {
-        Vector * v = svdb_get_column_vector( tab, selection );
-        int i, n = VectorLength( v );
-        for ( i = 0; i < n && res < 0; ++i )
-        {
-            p_svdb_col col = VectorGet ( v, i );
-            if ( col != NULL )
-            {
-                if ( svdb_strcmp( col->name, name ) == 0 )
-                {
-                    res = i;
-                }
-            }
-        }   
-    }
-    return res;
-}
-
-
-MOD_EXPORT const char * CC svdb_tabname( void * self, const int tab_id )
-{
-    const char * res = NULL;
-    p_svdb_tab tab = svdb_get_tab( self, tab_id );
-    if ( tab != NULL )
-    {
-        res = tab->name;
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_count_cols( void * self, const int tab_id, const int selection )
-{
-    int res = 0;
-    p_svdb_tab tab = svdb_get_tab( self, tab_id );
-    if ( tab != NULL )
-    {
-        Vector * v = svdb_get_column_vector( tab, selection );
-        res = VectorLength( v );
-    }
-    return res;
-}
-
-
-MOD_EXPORT const char * CC svdb_colname( void * self, const int tab_id,
-            const int selection, const int col_id )
-{
-    const char * res = NULL;
-    p_svdb_col col = svdb_get_col( self, tab_id, selection, col_id );
-    if ( col != NULL )
-    {
-        res = col->name;
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_dflt_type_idx( void * self, const int tab_id,
-            const int selection, const int col_id )
-{
-    int res = -1;
-    p_svdb_col col = svdb_get_col( self, tab_id, selection, col_id );
-    if ( col != NULL )
-    {
-        res = col->dflt_type_idx;
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_count_types( void * self, const int tab_id,
-            const int selection, const int col_id )
-{
-    int res = 0;
-    p_svdb_col col = svdb_get_col( self, tab_id, selection, col_id );
-    if ( col != NULL )
-    {
-        res = VectorLength( &col->types );
-    }
-    return res;
-}
-
-
-static p_svdb_type svdb_get_type( void * self, const int tab_id,
-            const int selection, const int col_id, const int type_id )
-{
-    p_svdb_type res = NULL;
-    p_svdb_col col = svdb_get_col( self, tab_id, selection, col_id );
-    if ( col != NULL )
-    {
-        res = VectorGet ( &col->types, type_id );
-    }
-    return res;
-}
-
-
-MOD_EXPORT const char * CC svdb_typename( void * self, const int tab_id,
-            const int selection, const int col_id, const int type_id )
-{
-    const char * res = NULL;
-    p_svdb_type type = svdb_get_type( self, tab_id, selection, col_id, type_id );
-    if ( type != NULL )
-    {
-        res = type->name;
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_type_idx( void * self, const int tab_id,
-            const int selection, const int col_id, const char * name )
-{
-    int res = -1;
-    p_svdb_col col = svdb_get_col( self, tab_id, selection, col_id );
-    if ( col != NULL )
-    {
-        int i, n = VectorLength( &col->types );
-        for ( i = 0; i < n && res < 0; ++i )
-        {
-            p_svdb_type type = VectorGet ( &col->types, i );
-            if ( type != NULL )
-            {
-                if ( svdb_strcmp( type->name, name ) == 0 )
-                {
-                    res = i;
-                }
-            }
-        }   
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_typedomain( void * self, const int tab_id,
-            const int selection, const int col_id, const int type_id )
-{
-    int res = -1;
-    p_svdb_type type = svdb_get_type( self, tab_id, selection, col_id, type_id );
-    if ( type != NULL )
-    {
-        res = type->typedesc.domain;
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_typebits( void * self, const int tab_id,
-            const int selection, const int col_id, const int type_id )
-{
-    int res = -1;
-    p_svdb_type type = svdb_get_type( self, tab_id, selection, col_id, type_id );
-    if ( type != NULL )
-    {
-        res = type->typedesc.intrinsic_bits;
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_typedim( void * self, const int tab_id,
-            const int selection, const int col_id, const int type_id )
-{
-    int res = -1;
-    p_svdb_type type = svdb_get_type( self, tab_id, selection, col_id, type_id );
-    if ( type != NULL )
-    {
-        res = type->typedesc.intrinsic_dim;
-    }
-    return res;
-}
-
-
-static void svdb_replace_string( const char **dst, const char * s )
-{
-    free_if_not_null( *dst );
-    *dst = string_dup_measure ( s, NULL );
-}
-
-
-static void svdb_set_tab_elem_separator( p_svdb_tab tab,
-            const int selection, const int col_id, const char * s )
-{
-    Vector * v = svdb_get_column_vector( tab, selection );
-    if ( col_id >= 0 )
-    {
-        p_svdb_col col = VectorGet ( v, col_id );
-        if ( col != NULL )
-        {
-            svdb_replace_string( &col->elem_separator, s );
-        }
-    }
-    else
-    {
-        int i, n = VectorLength( v );
-        for ( i = 0; i < n; ++ i )
-        {
-            p_svdb_col col = VectorGet ( v, i );
-            if ( col != NULL )
-            {
-                svdb_replace_string( &col->elem_separator, s );
-            }
-        }
-    }
-}
-
-
-MOD_EXPORT void CC svdb_set_elem_separator( void * self,
-            const int tab_id, const int selection, const int col_id,
-            const char * s )
-{
-    if ( self != NULL && s != NULL && s[0] != 0 )
-    {
-        p_svdb_conn pself = self;
-        if ( tab_id >= 0 )
-        {
-            p_svdb_tab tab = VectorGet ( &pself->tables, tab_id );
-            if ( tab != NULL )
-            {
-                svdb_set_tab_elem_separator( tab, selection, col_id, s );
-            }
-        }
-        else
-        {
-            int i, n = VectorLength( &pself->tables );
-            for ( i = 0; i < n; ++ i )
-            {
-                p_svdb_tab tab = VectorGet ( &pself->tables, i );
-                if ( tab != NULL )
-                {
-                    svdb_set_tab_elem_separator( tab, selection, col_id, s );
-                }
-            }
-        }
-    }
-}
-
-
-static void svdb_set_tab_dim_separator( p_svdb_tab tab,
-            const int selection, const int col_id, const char * s )
-{
-    Vector * v = svdb_get_column_vector( tab, selection );
-    if ( col_id >= 0 )
-    {
-        p_svdb_col col = VectorGet ( v, col_id );
-        if ( col != NULL )
-        {
-            svdb_replace_string( &col->dim_separator, s );
-        }
-    }
-    else
-    {
-        int i, n = VectorLength( v );
-        for ( i = 0; i < n; ++ i )
-        {
-            p_svdb_col col = VectorGet ( v, i );
-            if ( col != NULL )
-            {
-                svdb_replace_string( &col->dim_separator, s );
-            }
-        }
-    }
-}
-
-
-MOD_EXPORT void CC svdb_set_dim_separator( void * self,
-            const int tab_id, const int selection, const int col_id,
-            const char * s )
-{
-    if ( self != NULL && s != NULL && s[0] != 0 )
-    {
-        p_svdb_conn pself = self;
-        if ( tab_id >= 0 )
-        {
-            p_svdb_tab tab = VectorGet ( &pself->tables, tab_id );
-            if ( tab != NULL )
-            {
-                svdb_set_tab_dim_separator( tab, selection, col_id, s );
-            }
-        }
-        else
-        {
-            int i, n = VectorLength( &pself->tables );
-            for ( i = 0; i < n; ++ i )
-            {
-                p_svdb_tab tab = VectorGet ( &pself->tables, i );
-                if ( tab != NULL )
-                {
-                    svdb_set_tab_dim_separator( tab, selection, col_id, s );
-                }
-            }
-        }
-    }
-}
-
-
-MOD_EXPORT int CC svdb_is_enabled( void * self, const int tab_id,
-            const int selection, const int col_id )
-{
-    int res = 0;
-    p_svdb_col col = svdb_get_col( self, tab_id, selection, col_id );
-    if ( col != NULL )
-    {
-        res = col->enabled;
-    }
-    return res;
-}
-
-
-static void svdb_set_columns_usage( p_svdb_tab tab, int enabled )
-{
-    Vector * v = svdb_get_column_vector( tab, 0 );
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n; ++i )
-    {
-        p_svdb_col col = VectorGet ( v, i );
-        if ( col != NULL )
-        {
-            col->enabled = enabled;
-            col->open = 0;
-            free_if_not_null( col->cast );
-            col->cast = NULL;
-        }
-    }
-}
-
-
-static p_svdb_col svdb_find_col( p_svdb_tab tab, const char *name )
-{
-    p_svdb_col res = NULL;
-    Vector * v = svdb_get_column_vector( tab, 0 );
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n && res == NULL; ++i )
-    {
-        p_svdb_col col = VectorGet ( v, i );
-        if ( col != NULL )
-        {
-            if ( svdb_strcmp( col->name, name ) == 0 )
-            {
-                res = col;
-            }
-        }
-    }
-    return res;
-}
-
-
-static void svdb_trim( char * s )
-{
-    int i, l = string_measure( s, NULL );
-    for ( i = 0; i < l; ++i )
-    {
-        if ( s[ i ] == ' ' )
-        {
-            s[ i ] = 0;
-        }
-    }
-    while( s[ 0 ] == 0 )
-    {
-        memmove( s, &s[1], l );
-    }
-}
-
-static void svdb_enable_col( p_svdb_tab tab, const char *defline,
-                             int start_cast, int end_cast, int start_name, int end_name )
-{
-    char * cast = NULL;
-    char * name = NULL;
-    int l = ( end_cast - start_cast );
-    if ( l > 1 )
-    {
-        cast = calloc( 1, l );
-        if ( cast != NULL )
-        {
-            memcpy( cast, &defline[ start_cast + 1 ], l-1 );
-            svdb_trim( cast );
-        }
-    }
-
-    l = ( end_name - start_name );
-    if ( l > 0 )
-    {
-        name = calloc( 1, l + 1 );
-        if ( name != NULL )
-        {
-            memcpy( name, &defline[ start_name ], l );
-            svdb_trim( name );
-        }
-    }
-
-    if ( name != NULL )
-    {
-        p_svdb_col col = svdb_find_col( tab, name );
-        if ( col != NULL )
-        {
-            col->enabled = true;
-            free_if_not_null( col->cast );
-            if ( cast != NULL )
-            {
-                col->cast = string_dup_measure ( cast, NULL );
-            }
-        }
-    }
-
-    free_if_not_null( cast );
-    free_if_not_null( name );
-}
-
-
-static void svdb_defline( p_svdb_tab tab, const char *defline )
-{
-    if ( defline == NULL || defline[0] == 0 )
-    {
-        /* if defline is empty, enable all columns without a cast */
-        svdb_set_columns_usage( tab, 1 );
-    }
-    else
-    {
-        int start_cast = -1;
-        int end_cast = -1;
-        int start_name = 0;
-        int i, l = string_measure ( defline, NULL );
-
-        /* disable all columns first, clear all casts */
-        svdb_set_columns_usage( tab, 0 );
-        /* enable only what is in the defline "(CAST1)NAME1,(CAST2)NAME2,NAME3"*/
-        for ( i = 0; i < l; ++i )
-        {
-            switch ( defline[ i ] )
-            {
-            case '(' : start_cast = i; break;
-            case ')' : end_cast = i; start_name = i+1; break;
-            case ',' : svdb_enable_col( tab, defline, start_cast, end_cast, start_name, i );
-                       start_cast = end_cast = -1;
-                       start_name = i+1;
-                       break;
-            }
-        }
-        svdb_enable_col( tab, defline, start_cast, end_cast, start_name, l );
-    }
-}
-
-
-static int svdb_add_to_cursor( p_svdb_tab tab )
-{
-    int res = 0;
-    rc_t rc = 0;
-    Vector * v = svdb_get_column_vector( tab, 0 );
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n && rc == 0; ++i )
-    {
-        p_svdb_col col = VectorGet ( v, i );
-        if ( col != NULL && col->enabled )
-        {
-            if ( col->cast != NULL )
-            {
-                rc = VCursorAddColumn ( tab->cursor, &col->cur_idx, "(%s)%s", col->cast, col->name );
-            }
-            else
-            {
-                rc = VCursorAddColumn ( tab->cursor, &col->cur_idx, "%s", col->name );
-            }
-            if ( rc != 0 )
-            {
-                LOGERR( klogInt, rc, "VCursorAddColumn() failed in svdb_add_to_cursor()" );
-            }
-            else
-            {
-                col->open = 1;
-                ++res;
-            }
-        }
-    }
-    return res;
-}
-
-
-static void svdb_read_cursor_data_types( p_svdb_tab tab )
-{
-    Vector * v = svdb_get_column_vector( tab, 0 );
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n; ++i )
-    {
-        p_svdb_col col = VectorGet ( v, i );
-        if ( col != NULL && col->open )
-        {
-            rc_t rc = VCursorDatatype ( tab->cursor, col->cur_idx,
-                              &col->cursor_typedecl, &col->cursor_typedesc );
-            free_if_not_null( col->cur_typedecl );
-            if ( rc == 0 )
-            {
-                char buf[ 64 ];
-                rc = VTypedeclToText( &col->cursor_typedecl, tab->conn->schema,
-                                      buf, sizeof( buf ) );
-                if ( rc == 0 )
-                {
-                    col->cur_typedecl = string_dup_measure ( buf, NULL );
-                    col->value_trans = sra_get_value_trans_func( tab->conn->schema, &col->cursor_typedecl );
-                    col->dim_trans = sra_get_dim_trans_func( tab->conn->schema, &col->cursor_typedecl );
-                }
-            }
-        }
-    }
-}
-
-
-static void svdb_discover_static_columns( p_svdb_tab tab )
-{
-    Vector * v = svdb_get_column_vector( tab, ALL_COLUMNS );
-    uint32_t idx, i, n = VectorLength( v );
-    int64_t first;
-    uint64_t range;
-
-    tab->first = 0;
-    tab->range = 0;
-    for ( i = 0; i < n; ++i )
-    {
-        p_svdb_col col = VectorGet ( v, i );
-        if ( col != NULL && col->open )
-        {
-            rc_t rc = VCursorIdRange ( tab->cursor, col->cur_idx, &first, &range );
-            if ( rc == 0 )
-            {
-                if ( range == 0 )
-                {
-                    VectorAppend ( &tab->static_columns, &idx, col );
-                }
-                else
-                {
-                    VectorAppend ( &tab->non_static_columns, &idx, col );
-                    if ( tab->range == 0 )
-                    {
-                        tab->first = first;
-                        tab->range = range;
-                    }
-                }
-            }
-        }
-    }
-}
-
-
-MOD_EXPORT int CC svdb_open_table( void * self, const int tab_id,
-            const char *defline )
-{
-    int res = -1;
-    p_svdb_tab tab = svdb_get_tab( self, tab_id );
-    if ( tab != NULL )
-    {
-        rc_t rc;
-        svdb_clear_vector( &tab->static_columns );
-        svdb_clear_vector( &tab->non_static_columns );
-        svdb_defline( tab, defline );
-        if ( tab->cursor != NULL )
-        {
-            rc = VCursorRelease( tab->cursor );
-            if ( rc != 0 )
-            {
-                LOGERR( klogInt, rc, "VCursorRelease() failed in svdb_open_table()" );
-            }
-        }
-        rc = VTableCreateCursorRead ( tab->tab, &tab->cursor );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "VTableCreateCursorRead() failed in svdb_open_table()" );
-        }
-        else
-        {
-            res = svdb_add_to_cursor( tab );
-            if ( res > 0 )
-            {
-                rc = VCursorOpen ( tab->cursor );
-                if ( rc == 0 )
-                {
-                    svdb_read_cursor_data_types( tab );
-                    svdb_discover_static_columns( tab );
-                }
-                else
-                {
-                    LOGERR( klogInt, rc, "VCursorOpen() failed in svdb_open_table()" );
-                    res = -1;
-                }
-            }
-        }
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_max_colname_length( void * self,
-            const int tab_id, const int selection )
-{
-    int res = 0;
-    p_svdb_tab tab = svdb_get_tab( self, tab_id );
-    if ( tab != NULL )
-    {
-        Vector * v = svdb_get_column_vector( tab, selection );
-        uint32_t i, n = VectorLength( v );
-        for ( i = 0; i < n; ++i )
-        {
-            p_svdb_col col = VectorGet ( v, i );
-            if ( col != NULL && col->enabled )
-            {
-                int l = string_measure ( col->name, NULL );
-                if ( l > res )
-                {
-                    res = l;
-                }
-            }
-        }
-    }
-    return res;
-}
-
-
-MOD_EXPORT unsigned long long int CC svdb_row_range( void * self,
-            const int tab_id )
-{
-    unsigned long long int res = 0;
-    p_svdb_tab tab = svdb_get_tab( self, tab_id );
-    if ( tab != NULL )
-    {
-        res = tab->range;
-    }
-    return res;
-}
-
-
-MOD_EXPORT signed long long int CC svdb_first_row( void * self,
-            const int tab_id )
-{
-    signed long long int res = 0;
-    p_svdb_tab tab = svdb_get_tab( self, tab_id );
-    if ( tab != NULL )
-    {
-        res = tab->first;
-    }
-    return res;
-}
-
-static void svdb_print_char( p_print_ctx dst, const char c )
-{
-    if ( dst->printed < dst->buf_len )
-    {
-        dst->buf[ ( dst->printed )++ ] = c;
-    }
-    ( dst->needed )++;
-}
-
-
-static void svdb_print_str( p_print_ctx dst, const char * s )
-{
-    while( *s > 0 )
-    {
-        svdb_print_char( dst, *(s++) );
-    }
-}
-
-
-#define BYTE_OFFSET(VALUE)  ( (VALUE) >> 3 )
-#define BIT_OFFSET(VALUE)   ( (VALUE) & 0x7 )
-
-uint8_t BitLength2Bytes[65] =
-{
-         /* 0  1  2  3  4  5  6  7  8  9*/
-   /* 0 */  0, 1, 1, 1, 1, 1, 1, 1, 1, 2,
-   /* 1 */  2, 2, 2, 2, 2, 2, 2, 3, 3, 3,
-   /* 2 */  3, 3, 3, 3, 3, 4, 4, 4, 4, 4,
-   /* 3 */  4, 4, 4, 5, 5, 5, 5, 5, 5, 5,
-   /* 4 */  5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
-   /* 5 */  7, 7, 7, 7, 7, 7, 7, 8, 8, 8,
-   /* 6 */  8, 8, 8, 8, 8
-};
-
-/*************************************************************************************
-n_bits   [IN] ... number of bits
-
-calculates the number of bytes that have to be copied to contain the given
-number of bits
-*************************************************************************************/
-static uint16_t bitlength_2_bytes( const size_t n_bits )
-{
-    if ( n_bits > 64 )
-        return 8;
-    else
-        return BitLength2Bytes[ n_bits ];
-}
-
-uint64_t BitLength2Mask[33] =
-{
-   /* 0 */ 0x00,
-   /* 1 ..  4 */  0x1,                0x3,                0x7,                0xF,
-   /* 5 ..  8 */  0x1F,               0x3F,               0x7F,               0xFF,
-   /* 9 .. 12 */  0x1FF,              0x3FF,              0x7FF,              0xFFF,
-   /*13 .. 16 */  0x1FFF,             0x3FFF,             0x7FFF,             0xFFFF,
-   /*17 .. 20 */  0x1FFFF,            0x3FFFF,            0x7FFFF,            0xFFFFF,
-   /*21 .. 24 */  0x1FFFFF,           0x3FFFFF,           0x7FFFFF,           0xFFFFFF,
-   /*25 .. 28 */  0x1FFFFFF,          0x3FFFFFF,          0x7FFFFFF,          0xFFFFFFF,
-   /*29 .. 32 */  0x1FFFFFFF,         0x3FFFFFFF,         0x7FFFFFFF,         0xFFFFFFFF
- };
-
-/*************************************************************************************
-n_bits   [IN] ... number of bits
-
-creates a bitmask to mask exactly the given number of bits from a longer value
-*************************************************************************************/
-static uint64_t bitlength_2_mask( const size_t n_bits )
-{
-    uint64_t res;
-    if ( n_bits < 33 )
-        res = BitLength2Mask[ n_bits ];
-    else
-    {
-        if ( n_bits < 65 )
-            res = BitLength2Mask[ n_bits-32 ];
-        else
-            res = 0xFFFFFFFF;
-        res <<= 32;
-        res |= 0xFFFFFFFF;
-    }
-    return res;
-}
-
-
-static void move_to_value( void * dst, p_data_src src )
-{
-    int ofs = ( src->boff + ( src->elem_bits * src->elem_idx ) );
-    char *src_ptr = ( char* )src->base + BYTE_OFFSET( ofs );
-    if ( BIT_OFFSET( ofs ) == 0 )
-    {
-        memmove( dst, src_ptr, bitlength_2_bytes( src->elem_bits ) );
-    }
-    else
-    {
-        bitcpy ( dst, 0, src_ptr, BIT_OFFSET( ofs ), src->elem_bits );
-    }
-}
-
-
-static uint64_t move_to_uint64( p_data_src src )
-{
-    uint64_t value = 0;
-    move_to_value( &value, src );
-    if ( src->elem_bits & 7 )
-    {
-        size_t unpacked = 0;
-        Unpack( src->elem_bits, sizeof( value ), &value, 0, src->elem_bits,
-                NULL, &value, sizeof(value), &unpacked );
-    }
-    value &= bitlength_2_mask( src->elem_bits );
-    return value;
-}
-
-
-static void print_boolean_element( p_svdb_col col, p_print_ctx dst, p_data_src src )
-{
-    uint64_t value = move_to_uint64( src );
-    if ( value == 0 )
-        svdb_print_char( dst, '0' );
-    else
-        svdb_print_char( dst, '1' );
-}
-
-
-static void print_uint_element( p_svdb_col col, p_print_ctx dst, p_data_src src )
-{
-    uint64_t value = move_to_uint64( src );
-    if ( src->elem_idx > 0 )
-    {
-        svdb_print_str( dst, col->elem_separator );
-    }
-    if ( col->value_trans != NULL )
-    {
-
-        const char * s = col->value_trans( (uint32_t)value );
-        if ( s != NULL )
-        {
-            svdb_print_str( dst, s );
-        }
-    }
-    else
-    {
-        char buf[ 32 ];
-        size_t num_writ;
-        if ( string_printf ( buf, sizeof( buf ), &num_writ, "%u", value ) == 0 )
-        {
-            svdb_print_str( dst, buf );
-        }
-    }
-}
-
-
-static void print_int_element( p_svdb_col col, p_print_ctx dst, p_data_src src )
-{
-    int64_t value = (int64_t)move_to_uint64( src );
-    if ( src->elem_idx > 0 )
-    {
-        svdb_print_str( dst, col->elem_separator );
-    }
-    if ( col->value_trans != NULL )
-    {
-        const char * s = col->value_trans( (uint32_t)value );
-        if ( s != NULL )
-        {
-            svdb_print_str( dst, s );
-        }
-    }
-    else
-    {
-        rc_t rc;
-        char buf[ 32 ];
-        size_t num_writ;
-        switch ( src->elem_bits )
-        {
-            case  8 : {
-                        int8_t temp = (int8_t)value;
-                        rc = string_printf ( buf, sizeof( buf ), &num_writ, "%d", temp );
-                      }
-                      break;
-            case 16 : {
-                        int16_t temp = (int16_t)value;
-                        rc = string_printf ( buf, sizeof( buf ), &num_writ, "%d", temp );
-                      }
-                      break;
-            case 32 : { 
-                        int32_t temp = (int32_t)value;
-                        rc = string_printf ( buf, sizeof( buf ), &num_writ, "%d", temp );
-                      }
-                      break;
-            case 64 : { 
-                        rc = string_printf ( buf, sizeof( buf ), &num_writ, "%ld", value );
-                      }
-                      break;
-            default : {
-                        rc = string_printf ( buf, sizeof( buf ), &num_writ, "?" );
-                      }
-        }
-        if ( rc == 0 )
-        {
-            svdb_print_str( dst, buf );
-        }
-    }
-}
-
-
-#define MAX_CHARS_FOR_DOUBLE 26
-#define BITSIZE_OF_FLOAT ( sizeof(float) * 8 )
-#define BITSIZE_OF_DOUBLE ( sizeof(double) * 8 )
-static void print_float_element( p_svdb_col col, p_print_ctx dst, p_data_src src )
-{
-    rc_t rc;
-    char buf[ 32 ];
-    size_t num_writ;
-    if ( src->elem_bits == BITSIZE_OF_FLOAT )
-    {
-        float value;
-        move_to_value( &value, src );
-        rc = string_printf ( buf, sizeof( buf ), &num_writ, "%e", value );
-    }
-    else if ( src->elem_bits == BITSIZE_OF_DOUBLE )
-    {
-        double value;
-        move_to_value( &value, src );
-        rc = string_printf ( buf, sizeof( buf ), &num_writ, "%e", value );
-    }
-    else
-    {
-        rc = string_printf ( buf, sizeof( buf ), &num_writ, "unknown float-type" );
-    }
-    if ( rc == 0 )
-    {
-        if ( src->elem_idx > 0 )
-        {
-            svdb_print_str( dst, col->elem_separator );
-        }
-        svdb_print_str( dst, buf );
-    }
-}
-
-
-static void print_ascii_element( p_svdb_col col, p_print_ctx dst, p_data_src src )
-{
-    int ofs = ( src->elem_bits * src->elem_idx );
-    char * src_ptr = (char*)src->base + BYTE_OFFSET( src->boff + ofs );
-    svdb_print_char( dst, *src_ptr );
-}
-
-
-static void print_unicode_element( p_svdb_col col, p_print_ctx dst, p_data_src src )
-{
-    print_ascii_element( col, dst, src );
-}
-
-
-static void svdb_print_domain( p_svdb_col col, p_print_ctx dst, p_data_src src )
-{
-    switch ( col->cursor_typedesc.domain )
-    {
-        case vtdBool    : print_boolean_element( col, dst, src ); break;
-        case vtdUint    : print_uint_element( col, dst, src ); break;
-        case vtdInt     : print_int_element( col, dst, src ); break;
-        case vtdFloat   : print_float_element( col, dst, src ); break;
-        case vtdAscii   : print_ascii_element( col, dst, src ); break;
-        case vtdUnicode : print_unicode_element( col, dst, src ); break;
-    }
-}
-
-
-static void svdb_print_elem( p_svdb_col col, p_print_ctx dst, p_data_src src )
-{
-    uint32_t dim = col->cursor_typedesc.intrinsic_dim;
-
-    if ( dim == 1 )
-    {
-        for ( src->elem_idx = 0; src->elem_idx < src->row_len; ++(src->elem_idx) )
-        {
-            svdb_print_domain( col, dst, src );
-        }
-    }
-    else
-    {
-        data_src sub_src;
-        sub_src.base = src->base;
-        sub_src.boff = src->boff;
-        sub_src.elem_bits = ( src->elem_bits / dim );
-        for ( src->elem_idx = 0; src->elem_idx < src->row_len; ++(src->elem_idx ) )
-        {
-            char sep = col->dim_separator[0];
-            svdb_print_char( dst, sep );
-
-            if ( col->dim_trans != NULL )
-            {
-                char * s;
-                const uint8_t *src_ptr = sub_src.base;
-                src_ptr += BYTE_OFFSET( sub_src.boff );
-                s = col->dim_trans( src_ptr );
-                if ( s != NULL )
-                {
-                    svdb_print_str( dst, s );
-                }
-            }
-            else
-            {
-                for ( sub_src.elem_idx = 0; sub_src.elem_idx < dim; ++sub_src.elem_idx )
-                {
-                    svdb_print_domain( col, dst, &sub_src );
-                }
-            }
-
-            sep = col->dim_separator[1];
-            if ( sep == 0 )
-            {
-                sep = col->dim_separator[0];
-            }
-            svdb_print_char( dst, sep );
-            sub_src.boff += src->elem_bits;
-        }
-    }
-}
-
-
-MOD_EXPORT int CC svdb_element_count( void * self,
-            const int tab_id, const int selection, const int col_id,
-            const unsigned long long int row )
-{
-    int res = 0;
-    p_svdb_col col = svdb_get_col( self, tab_id, selection, col_id );
-    if ( col != NULL && row < col->tab->range && col->open )
-    {
-        data_src data;
-        int64_t row_id = col->tab->first + row;
-        rc_t rc = VCursorCellDataDirect ( col->tab->cursor, row_id, col->cur_idx,
-                     &data.elem_bits, &data.base, &data.boff, &data.row_len );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "VCursorCellDataDirect() failed in element_count()" );
-        }
-        else
-        {
-            if ( data.row_len > 0 )
-            {
-                res = data.row_len;
-            }
-        }
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_element( void * self, char * buf, int buflen,
-            const int tab_id, const int selection, const int col_id, const int elem_id,
-            const unsigned long long int row )
-{
-    int res = 0;
-    p_svdb_col col;
-    buf[ 0 ] = 0;
-    col = svdb_get_col( self, tab_id, selection, col_id );
-    if ( col != NULL && row < col->tab->range && col->open )
-    {
-        rc_t rc;
-        data_src data;
-        print_ctx dst;
-        int64_t row_id = col->tab->first + row;
-
-        svdb_init_print_ctx( &dst, buf, buflen - 1 );
-        rc = VCursorCellDataDirect ( col->tab->cursor, row_id, col->cur_idx,
-                &data.elem_bits, &data.base, &data.boff, &data.row_len );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "VCursorCellDataDirect() failed in svdb_element()" );
-        }
-        else
-        {
-/*
-            if ( data.row_len > 0 && elem_id < data.row_len )
-            {
-
-            }
-*/
-        }
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_cell( void * self, char * buf, int buflen,
-           const int tab_id, const int selection, const int col_id,
-           const unsigned long long int row )
-{
-    int res = 0;
-    p_svdb_col col;
-    buf[ 0 ] = 0;
-    col = svdb_get_col( self, tab_id, selection, col_id );
-    if ( col != NULL && row < col->tab->range && col->open )
-    {
-        data_src data;
-        int64_t row_id = col->tab->first + row;
-        rc_t rc = VCursorCellDataDirect ( col->tab->cursor, row_id, col->cur_idx,
-                         &data.elem_bits, &data.base, &data.boff, &data.row_len );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "VCursorCellDataDirect() failed in svdb_cell()" );
-        }
-        else
-        {
-            if ( data.row_len > 0 )
-            {
-                print_ctx dst;
-
-                svdb_init_print_ctx( &dst, buf, buflen - 1 );
-                svdb_print_elem( col, &dst, &data ); /* <--- */
-                dst.buf[ dst.printed ] = 0;
-                res = dst.needed;
-            }
-        }
-    }
-    return res;
-}
-
-
-static int svdb_find_bufsize( p_svdb_col col, data_src *data )
-{
-    char buf[ 8 ];
-    print_ctx dst;
-
-    svdb_init_print_ctx( &dst, buf, sizeof buf );
-    svdb_print_elem( col, &dst, data ); /* <--- */
-    return dst.needed + 1;
-}
-
-
-MOD_EXPORT unsigned long long int CC svdb_find_fwd( void * self, const int tab_id,
-            const int selection, const int col_id, const unsigned long long int row,
-            const int chunksize, const char * pattern )
-{
-    unsigned long long int res = INVALID_ROW;
-    p_svdb_col col = svdb_get_col( self, tab_id, selection, col_id );
-    if ( col != NULL && row < col->tab->range && col->open && pattern != NULL )
-    {
-        int64_t search_row = row;
-        rc_t rc = 0;
-        int buf_size = 0;
-        int chunk = 0;
-        char * buf = NULL;
-
-        while( ( rc == 0 ) && 
-                ( res == INVALID_ROW ) &&
-                ( (uint64_t)search_row < col->tab->range ) &&
-                ( chunk < chunksize ) )
-        {
-            data_src data;
-            int64_t row_id = col->tab->first + search_row;
-            rc = VCursorCellDataDirect ( col->tab->cursor, row_id, col->cur_idx,
-                         &data.elem_bits, &data.base, &data.boff, &data.row_len );
-            if ( rc == 0 )
-            {
-                int this_size = svdb_find_bufsize( col, &data );
-                ++chunk;
-                if ( this_size > buf_size )
-                {
-                    buf_size = this_size;
-                    if ( buf != NULL )
-                    {
-                        char * newbuf = realloc( buf, buf_size );
-                        if ( newbuf != NULL )
-                            buf = newbuf;
-                        else
-                        {
-                            free( buf );
-                            buf = NULL;
-                        }
-                    }
-                    else
-                        buf = malloc( buf_size );
-                }
-                if ( buf != NULL )
-                {
-                    print_ctx dst;
-                    svdb_init_print_ctx( &dst, buf, buf_size - 1 );
-                    svdb_print_elem( col, &dst, &data ); /* <--- */
-                    dst.buf[ dst.printed ] = 0;
-                    if ( strstr ( buf, pattern ) != NULL )
-                    {
-                        res = search_row;
-                    }
-                }
-                search_row++;
-            }
-        }
-        if ( ( chunk == chunksize )&&( res == INVALID_ROW ) )
-        {
-            res = 0xFFFFFFFFFFFFFFFE;
-        }
-        if ( buf != NULL )
-            free( buf );
-    }
-    return res;
-}
-
-
-MOD_EXPORT unsigned long long int CC svdb_find_bwd( void * self, const int tab_id,
-            const int selection, const int col_id, const unsigned long long int row,
-            const int chunksize, const char * pattern )
-{
-    unsigned long long int res = INVALID_ROW;
-    p_svdb_col col;
-    col = svdb_get_col( self, tab_id, selection, col_id );
-    if ( col != NULL && row < col->tab->range && col->open && pattern != NULL )
-    {
-        int64_t search_row = row;
-        rc_t rc = 0;
-        int buf_size = 0;
-        int chunk = 0;
-        char * buf = NULL;
-
-        while( ( rc == 0 ) && ( res == INVALID_ROW ) &&
-               ( search_row >= 0 ) && ( chunk < chunksize ) )
-        {
-            data_src data;
-            int64_t row_id = col->tab->first + search_row;
-            rc = VCursorCellDataDirect ( col->tab->cursor, row_id, col->cur_idx,
-                         &data.elem_bits, &data.base, &data.boff, &data.row_len );
-            if ( rc == 0 )
-            {
-                int this_size = svdb_find_bufsize( col, &data );
-                ++chunk;
-                if ( this_size > buf_size )
-                {
-                    buf_size = this_size;
-                    if ( buf != NULL )
-                    {
-                        char * newbuf = realloc( buf, buf_size );
-                        if ( newbuf != NULL )
-                            buf = newbuf;
-                        else
-                        {
-                            free( buf );
-                            buf = NULL;
-                        }
-                    }
-                    else
-                        buf = malloc( buf_size );
-                }
-                if ( buf != NULL )
-                {
-                    print_ctx dst;
-                    svdb_init_print_ctx( &dst, buf, buf_size - 1 );
-                    svdb_print_elem( col, &dst, &data ); /* <--- */
-                    dst.buf[ dst.printed ] = 0;
-                    if ( strstr ( buf, pattern ) != NULL )
-                    {
-                        res = search_row;
-                    }
-                }
-                search_row--;
-            }
-        }
-        if ( ( chunk == chunksize )&&( res == INVALID_ROW ) )
-        {
-            res = 0xFFFFFFFFFFFFFFFE;
-        }
-        if ( buf != NULL )
-            free( buf );
-    }
-    return res;
-}
-
-
-/* **************************************************************************************************************** */
-
-struct svdb_fastq;
-typedef struct svdb_fastq* p_svdb_fastq;
-
-typedef struct svdb_fastq
-{
-    char * path;
-    KDirectory * dir;
-    const VDBManager * mgr;
-    VSchema * schema;
-    const VDatabase * db;
-    const VTable * sequence;
-    const VCursor * cursor;
-    int is_db;
-
-    uint32_t read_idx;
-    uint32_t qual_idx;
-    uint32_t start_idx;
-    uint32_t len_idx;
-    uint32_t name_idx;
-    uint32_t rd_type_idx;
-    uint32_t rd_filter_idx;
-
-} svdb_fastq;
-
-
-MOD_EXPORT void CC svdb_close_fastq( void * self )
-{
-    p_svdb_fastq pself = ( p_svdb_fastq )self;
-    if ( pself != NULL )
-    {
-        rc_t rc = VCursorRelease( pself->cursor );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "VCursorRelease() failed in svdb_close_fastq()" );
-        }
-        rc = VTableRelease( pself->sequence );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "VTableRelease() failed in svdb_close_fastq()" );
-        }
-        rc = VDatabaseRelease( pself->db );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "VDatabaseRelease() failed in svdb_close_fastq()" );
-        }
-        rc = VSchemaRelease( pself->schema );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "VSchemaRelease() failed in svdb_close_fastq()" );
-        }
-        rc = VDBManagerRelease( pself->mgr );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "VDBManagerRelease() failed in svdb_close_fastq()" );
-        }
-        rc = KDirectoryRelease( pself->dir );
-        if ( rc != 0 )
-        {
-            LOGERR( klogInt, rc, "KDirectoryRelease() failed in svdb_close_fastq()" );
-        }
-        free_if_not_null( pself->path );
-        free( self );
-    }
-}
-
-
-static bool svdb_KNamelist_contains( const KNamelist * nl, const char * to_find )
-{
-    bool res = false;
-    uint32_t n;
-    rc_t rc = KNamelistCount( nl, &n );
-    if ( rc == 0 && n > 0 )
-    {
-        uint32_t i;
-        for ( i = 0; i < n && !res && rc == 0; ++i )
-        {
-            const char * name;
-            rc = KNamelistGet ( nl, i, &name );
-            if ( rc == 0 && name != NULL )
-                res = ( svdb_strcmp( name, to_find ) == 0 );
-        }
-    }
-    return res;
-}
-
-
-static rc_t svdb_discover_fastq_columns( p_svdb_fastq pself )
-{
-    KNamelist *col_names;
-    rc_t rc = VTableListReadableColumns ( pself->sequence, &col_names );
-    if ( rc == 0 )
-    {
-        pself->read_idx     = INVALID_COL;
-        pself->qual_idx     = INVALID_COL;
-        pself->start_idx    = INVALID_COL;
-        pself->len_idx      = INVALID_COL;
-        pself->name_idx     = INVALID_COL;
-        pself->rd_type_idx  = INVALID_COL;
-        pself->rd_filter_idx= INVALID_COL;
-
-        if ( svdb_KNamelist_contains( col_names, "READ" ) )
-        {
-            rc = VCursorAddColumn ( pself->cursor, &pself->read_idx, "(INSDC:dna:text)READ" );
-            if ( rc != 0 )
-                log_and_err( rc, "VCursorAddColumn( READ ) failed" );
-        }
-
-        if ( rc == 0 && svdb_KNamelist_contains( col_names, "QUALITY" ) )
-        {
-            rc = VCursorAddColumn ( pself->cursor, &pself->qual_idx, "(INSDC:quality:text:phred_33)QUALITY" );
-            if ( rc != 0 )
-                log_and_err( rc, "VCursorAddColumn( QUALITY ) failed" );
-        }
-
-        if ( rc == 0 && svdb_KNamelist_contains( col_names, "READ_START" ) )
-        {
-            rc = VCursorAddColumn ( pself->cursor, &pself->start_idx, "(INSDC:coord:zero)READ_START" );
-            if ( rc != 0 )
-                log_and_err( rc, "VCursorAddColumn( READ_START ) failed" );
-        }
-
-        if ( rc == 0 && svdb_KNamelist_contains( col_names, "READ_LEN" ) )
-        {
-            rc = VCursorAddColumn ( pself->cursor, &pself->len_idx, "(INSDC:coord:len)READ_LEN" );
-            if ( rc != 0 )
-                log_and_err( rc, "VCursorAddColumn( READ_LEN ) failed" );
-        }
-
-        if ( rc == 0 && svdb_KNamelist_contains( col_names, "NAME" ) )
-        {
-            rc = VCursorAddColumn ( pself->cursor, &pself->name_idx, "(ascii)NAME" );
-            if ( rc != 0 )
-                log_and_err( rc, "VCursorAddColumn( NAME ) failed" );
-        }
-
-        if ( rc == 0 && svdb_KNamelist_contains( col_names, "READ_TYPE" ) )
-        {
-            rc = VCursorAddColumn ( pself->cursor, &pself->rd_type_idx, "(INSDC:SRA:xread_type)READ_TYPE" );
-            if ( rc != 0 )
-                log_and_err( rc, "VCursorAddColumn( READ_TYPE ) failed" );
-        }
-
-        if ( rc == 0 && svdb_KNamelist_contains( col_names, "READ_FILTER" ) )
-        {
-            rc = VCursorAddColumn ( pself->cursor, &pself->rd_filter_idx, "(INSDC:SRA:read_filter)READ_FILTER" );
-            if ( rc != 0 )
-                log_and_err( rc, "VCursorAddColumn( READ_FILTER ) failed" );
-        }
-
-        KNamelistRelease( col_names );
-    }
-    return rc;
-}
-
-
-MOD_EXPORT void * CC svdb_open_fastq( const char * path )
-{
-    p_svdb_fastq pself = NULL;
-   if ( path != NULL && path[0] != 0 )
-    {
-        rc_t rc;
-        pself = calloc( 1, sizeof( svdb_fastq ) );
-        if ( pself == NULL )
-        {
-            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-            log_and_err( rc, "calloc() failed in svdb_open_fastq()" );
-        }
-        else
-        {
-            rc = KDirectoryNativeDir( &pself->dir );
-            if ( rc != 0 )
-                log_and_err( rc, "KDirectoryNativeDir() failed in svdb_open_fastq()" );
-
-            if ( rc == 0 )
-            {
-                rc = VDBManagerMakeRead ( &pself->mgr, pself->dir );
-                if ( rc != 0 )
-                    log_and_err( rc, "VDBManagerMakeRead() failed in svdb_open_fastq()" );
-            }
-
-            if ( rc == 0 )
-            {
-                rc = VDBManagerMakeSRASchema( pself->mgr, &pself->schema );
-                if ( rc != 0 )
-                    log_and_err( rc, "VDBManagerMakeSRASchema() failed in svdb_open_fastq()" );
-            }
-
-            if ( rc == 0 )
-            {
-                rc = VDBManagerOpenDBRead( pself->mgr, &pself->db, pself->schema, "%s", path );
-                if ( rc == 0 )
-                {
-                    pself->is_db = 1;
-                    rc = VDatabaseOpenTableRead( pself->db, &pself->sequence, "SEQUENCE" );
-                    if ( rc != 0 )
-                    {
-                        string_printf ( last_err, sizeof last_err, NULL,
-                                        "VDatabaseOpenTableRead('%s')->'%R' failed in svdb_open_fastq()",
-                                        path, rc );
-                        svdb_set_last_err( "VDatabaseOpenTableRead() failed in svdb_open_fastq()" );
-
-                    }
-                }
-                else
-                {
-                    rc = VDBManagerOpenTableRead( pself->mgr, &pself->sequence, pself->schema, "%s", path );
-                    if ( rc != 0 )
-                    {
-                        string_printf ( last_err, sizeof last_err, NULL,
-                                        "VDBManagerOpenTableRead('%s')->'%R' failed in svdb_open_fastq()",
-                                        path, rc );
-                        svdb_set_last_err( "VDBManagerOpenTableRead() failed in svdb_open_fastq()" );
-                    }
-                }
-            }
-
-            if ( rc == 0 )
-            {
-                rc = VTableCreateCursorRead ( pself->sequence, &pself->cursor );
-                if ( rc != 0 )
-                    log_and_err( rc, "VTableCreateCursorRead() failed in svdb_open_fastq()" );
-            }
-
-            if ( rc == 0 )
-                rc = svdb_discover_fastq_columns( pself );
-
-            if ( rc == 0 )
-            {
-                rc = VCursorOpen( pself->cursor );
-                if ( rc != 0 )
-                    log_and_err( rc, "VCursorOpen() failed in svdb_open_fastq()" );
-            }
-    
-            if ( rc == 0 )
-            {
-                pself->path = string_dup_measure ( path, NULL );
-                svdb_set_last_err( "OK" );
-            }
-            else
-            {
-                svdb_close_fastq( pself );
-                pself = NULL;
-            }
-        }
-    }
-    else
-    {
-        svdb_set_last_err( "path empty in svdb_open_fastq()" );
-    }
-    return pself;
-
-}
-
-
-/*
-    returns what the fastq-obj can produce
-    0 ... nothing, handle invalid
-    1 ... only READ ( that means fasta )
-    2 ... READ and QUALITY ( but not spot splitting )
-    3 ... READ, QUALITY and READ_START/READ_LEN ( splitted spots )
-*/
-MOD_EXPORT int CC svdb_fastq_scope( void * self )
-{
-    int res = 0;
-    if ( self != NULL )
-    {
-        p_svdb_fastq pself = self;
-        if ( pself->read_idx != INVALID_COL )
-        {
-            if ( pself->qual_idx != INVALID_COL )
-            {
-                if ( pself->start_idx != INVALID_COL &&
-                     pself->len_idx != INVALID_COL )
-                    res = 3;
-                else
-                    res = 2;
-            }
-            else res = 1;
-        }
-    }
-    return res;
-}
-
-
-static int svdb_fastq_without_name_col( p_svdb_fastq pself, char * buf, int buflen,
-                                        int seq, const unsigned long long int row )
-{
-    int res = 0;
-    uint32_t elem_bits, boff, data_len;
-    const char * data = NULL;
-
-    rc_t rc = VCursorCellDataDirect( pself->cursor, row, pself->read_idx, &elem_bits,
-                            (const void**)&data, &boff, &data_len );
-    if ( rc == 0 )
-    {
-        size_t num_writ;
-        if ( seq > 0 )
-            rc = string_printf ( buf, buflen, &num_writ, "%s.%li length=%u/%u",
-                                 pself->path, row, data_len, seq );
-        else
-            rc = string_printf ( buf, buflen, &num_writ, "%s.%li length=%u",
-                                 pself->path, row, data_len );
-        if ( rc == 0 )
-            res = (int)num_writ;
-    }
-
-    return res;
-}
-
-
-static int svdb_fastq_with_name_col( p_svdb_fastq pself, char * buf, int buflen,
-                                     int seq, const unsigned long long int row )
-{
-    int res = 0;
-    uint32_t elem_bits, boff, name_len;
-    const char * name = NULL;
-
-    rc_t rc = VCursorCellDataDirect( pself->cursor, row, pself->name_idx, &elem_bits,
-                                (const void**)&name, &boff, &name_len );
-    if ( rc == 0 )
-    {
-        uint32_t data_len;
-        size_t num_writ;
-        if ( seq > 0 )
-        {
-            uint32_t * data = NULL;
-            rc = VCursorCellDataDirect( pself->cursor, row, pself->len_idx, &elem_bits,
-                                    (const void**)&data, &boff, &data_len );
-            if ( rc == 0 )
-                rc = string_printf ( buf, buflen, &num_writ, "%s.%li %.*s length=%u/%u",
-                                     pself->path, row, name_len, name, data[ seq - 1 ], seq );
-        }
-        else
-        {
-            const char * data = NULL;
-            rc = VCursorCellDataDirect( pself->cursor, row, pself->read_idx, &elem_bits,
-                                    (const void**)&data, &boff, &data_len );
-            if ( rc == 0 )
-                rc = string_printf ( buf, buflen, &num_writ, "%s.%li %.*s length=%u",
-                                     pself->path, row, name_len, name, data_len );
-
-        }
-        if ( rc == 0 ) res = (int)num_writ;
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_fastq_name( void * self, char * buf, int buflen,
-                                   int seq, const unsigned long long int row )
-{
-    int res = 0;
-    if ( self != NULL )
-    {
-        p_svdb_fastq pself = self;
-        if ( pself->name_idx != INVALID_COL )
-            res = svdb_fastq_with_name_col( pself, buf, buflen, seq, row );
-        else
-            res = svdb_fastq_without_name_col( pself, buf, buflen, seq, row );
-    }
-    return res;
-}
-
-
-static int svdb_fastq_data_ptr( p_svdb_fastq pself, const char ** buf, uint32_t src_idx,
-                                int seq, const unsigned long long int row )
-{ 
-    int res = 0;
-    uint32_t elem_bits, boff, data_len;
-    const char * data = NULL;
-    rc_t rc = VCursorCellDataDirect( pself->cursor, row, src_idx, &elem_bits,
-                            (const void**)&data, &boff, &data_len );
-    if ( rc == 0 )
-    {
-        if ( seq > 0 )
-        {
-            uint32_t read_start_len, read_len_len;
-            uint32_t * read_start = NULL;
-            uint32_t * read_len = NULL;
-            rc = VCursorCellDataDirect( pself->cursor, row, pself->start_idx, &elem_bits,
-                                        (const void**)&read_start, &boff, &read_start_len );
-            if ( rc == 0 )
-                rc = VCursorCellDataDirect( pself->cursor, row, pself->len_idx, &elem_bits,
-                                            (const void**)&read_len, &boff, &read_len_len );
-            if ( rc == 0 && seq <= (int)read_start_len && seq <= (int)read_len_len )
-            {
-                uint32_t start  = read_start[ seq - 1 ];
-                res = read_len[ seq - 1 ];
-                *buf = &data[ start ];
-            }
-        }
-        else
-        {
-            *buf = data;
-            res = data_len;
-        }
-    }
-    return res;
-}
-
-
-static int svdb_fastq_data( p_svdb_fastq pself, char * buf, int buflen, uint32_t src_idx,
-                            int seq, const unsigned long long int row )
-{ 
-    const char * src = NULL;
-    int res = svdb_fastq_data_ptr( pself, &src, src_idx, seq, row );
-    if ( res > 0 && src != NULL )
-    {
-        size_t num_writ;
-        rc_t rc = string_printf ( buf, buflen, &num_writ, "%.*s", res, src );
-        if ( rc == 0 ) res = (int)num_writ;
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_fastq_readcount( void * self, const unsigned long long int row )
-{
-    int res = 0;
-    if ( self != NULL )
-    {
-        uint32_t elem_bits, boff, data_len;
-        const char * data = NULL;
-        p_svdb_fastq pself = self;
-        rc_t rc = VCursorCellDataDirect( pself->cursor, row, pself->start_idx, &elem_bits,
-                                         (const void**)&data, &boff, &data_len );
-        if ( rc == 0 )
-            res = data_len;
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_fastq_sequence( void * self, char * buf, int buflen,
-                                       int seq, const unsigned long long int row )
-{
-    int res = 0;
-    if ( self != NULL )
-    {
-        p_svdb_fastq pself = self;
-        res = svdb_fastq_data( pself, buf, buflen, pself->read_idx, seq, row );
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_fastq_quality( void * self, char * buf, int buflen,
-                                      int seq, const unsigned long long int row )
-{
-    int res = 0;
-    if ( self != NULL )
-    {
-        p_svdb_fastq pself = self;
-        res = svdb_fastq_data( pself, buf, buflen, pself->qual_idx, seq, row );
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_fastq_rd_type_available( void * self )
-{
-    int res = 0;
-    if ( self != NULL )
-    {
-        p_svdb_fastq pself = self;
-        if ( pself->rd_type_idx != INVALID_COL ) res = 1;
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_fastq_rd_filter_available( void * self )
-{
-    int res = 0;
-    if ( self != NULL )
-    {
-        p_svdb_fastq pself = self;
-        if ( pself->rd_filter_idx != INVALID_COL ) res = 1;
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_fastq_read_type_is_bio( void * self, int seq, const unsigned long long int row )
-{
-    int res = 0;
-    if ( self != NULL && seq > 0 )
-    {
-        p_svdb_fastq pself = self;
-        if ( pself->rd_type_idx != INVALID_COL )
-        {
-            uint32_t elem_bits, boff, data_len;
-            const uint8_t * data = NULL;
-            rc_t rc = VCursorCellDataDirect( pself->cursor, row, pself->rd_type_idx, &elem_bits,
-                                             (const void**)&data, &boff, &data_len );
-            if ( rc == 0 && seq <= (int)data_len )
-            {
-                if ( data[ seq - 1 ] & 0x01 ) res = 1;
-            }
-        }
-    }
-    return res;
-}
-
-
-MOD_EXPORT int CC svdb_fastq_read_filter_is_pass( void * self, int seq, const unsigned long long int row )
-{
-    int res = 0;
-    if ( self != NULL && seq > 0 )
-    {
-        p_svdb_fastq pself = self;
-        if ( pself->rd_filter_idx != INVALID_COL )
-        {
-            uint32_t elem_bits, boff, data_len;
-            const uint8_t * data = NULL;
-            rc_t rc = VCursorCellDataDirect( pself->cursor, row, pself->rd_filter_idx, &elem_bits,
-                                             (const void**)&data, &boff, &data_len );
-            if ( rc == 0 && seq <= (int)data_len )
-            {
-                if ( data[ seq - 1 ] == 0 ) res = 1;
-            }
-        }
-    }
-    return res;
-}
-
-
-MOD_EXPORT unsigned long long int CC svdb_fastq_row_count( void * self )
-{
-    unsigned long long int res = 0;
-    if ( self != NULL )
-    {
-        int64_t first;
-        uint64_t range;
-        p_svdb_fastq pself = self;
-        rc_t rc = VCursorIdRange ( pself->cursor, pself->read_idx, &first, &range );
-        if ( rc == 0 )
-            res = range;
-    }
-    return res;
-}
diff --git a/libs/tui/Makefile b/libs/tui/Makefile
deleted file mode 100644
index 5bb4d38..0000000
--- a/libs/tui/Makefile
+++ /dev/null
@@ -1,137 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-# tui = Text User Interface ( different from GUI ... )
-
-default: all
-
-TOP ?= $(abspath ../..)
-MODULE = libs/tui
-
-INT_LIBS = \
-	libtui \
-	libtui_cpp
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES =        \
-	$(TUI_OBJ)    \
-	$(TUI_CPP_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-
-#-------------------------------------------------------------------------------
-# tui
-#
-$(ILIBDIR)/libtui: $(addprefix $(ILIBDIR)/libtui.,$(ILIBEXT))
-
-TUI_SRC = \
-	systui \
-	screen \
-	string_cache \
-	eventring \
-	tui \
-	line_policy \
-	tui_palette \
-	tui_widget \
-	tui_widget_label \
-	tui_widget_button \
-	tui_widget_checkbox \
-	tui_widget_inputline \
-	tui_widget_radiobox \
-	tui_widget_string_list \
-	tui_widget_progress \
-	tui_widget_spin_edit \
-	tui_widget_grid \
-	tui_menu \
-	tui_dlg_helper \
-	tui_dlg \
-	dir_dlg \
-	file_dlg \
-	tui_std_dlg
-
-TUI_OBJ = \
-	$(addsuffix .$(LOBX),$(TUI_SRC))
-
-TUI_LIB = \
-	-lklib \
-	-lkfs \
-	-ldl
-
-$(ILIBDIR)/libtui.$(LIBX): $(TUI_OBJ)
-	$(LD) --slib -o $@ $^ $(TUI_LIB)
-
-
-#-------------------------------------------------------------------------------
-# tui_cpp
-#
-$(ILIBDIR)/libtui_cpp: $(addprefix $(ILIBDIR)/libtui_cpp.,$(ILIBEXT))
-
-TUI_CPP_SRC = \
-    tui_cpp
-
-TUI_CPP_OBJ = \
-	$(addsuffix .$(LOBX),$(TUI_CPP_SRC))
-
-TUI_CPP_LIB = \
-	-lklib \
-	-lkfs \
-	-ltui \
-	-ldl
-
-$(ILIBDIR)/libtui_cpp.$(LIBX): $(TUI_CPP_OBJ)
-	$(LD) --slib -o $@ $^ $(TUI_CPP_LIB)
-
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/tui/bsd/systui.c b/libs/tui/bsd/systui.c
deleted file mode 100644
index 498afc4..0000000
--- a/libs/tui/bsd/systui.c
+++ /dev/null
@@ -1,619 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*--------------------------------------------------------------------------
- * KTUI = Text User Interface ( different from GUI ... )
- *  platform specific code ... this one for BSD
- */
-
-#include <tui/extern.h>
-#include <tui/tui.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <sysalloc.h>
-
-#include "../tui-priv.h"
-
-#include <unistd.h>
-#include <sys/ioctl.h>
-#include <termios.h>
-#include <signal.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <stdlib.h>
-#include <errno.h>
-#include <assert.h>
-
-typedef uint32_t es_states;
-enum
-{
-    es_normal,
-    es_ESC,
-
-    es_ESC_91,
-    es_ESC_91_49,
-    es_ESC_91_49_49,
-    es_ESC_91_49_50,
-    es_ESC_91_49_51,
-    es_ESC_91_49_52,
-    es_ESC_91_49_53,
-    es_ESC_91_49_55,
-    es_ESC_91_49_56,
-    es_ESC_91_49_57,
-
-    es_ESC_91_50,
-    es_ESC_91_50_48,
-    es_ESC_91_50_49,
-    es_ESC_91_50_51,
-    es_ESC_91_50_52,
-
-    es_ESC_91_51,
-    es_ESC_91_52,
-    es_ESC_91_53,
-    es_ESC_91_54,
-
-    es_ESC_91_77_B,
-    es_ESC_91_77_X,
-    es_ESC_91_77_Y,
-
-    es_ESC_79
-};
-
-
-/**********************************************************************************/
-
-static int color_2_ansi( KTUI_color c )
-{
-    int res = 0;
-    switch( c )
-    {
-        case KTUI_c_black           : res = 0;  break;
-        case KTUI_c_gray            : res = 8;  break;
-
-        case KTUI_c_dark_red        : res = 1;  break;    
-        case KTUI_c_red             : res = 9;  break;
-
-        case KTUI_c_green           : res = 10;  break;
-        case KTUI_c_dark_green      : res = 2; break;
-
-        case KTUI_c_brown           : res = 3;  break;
-        case KTUI_c_yellow          : res = 11; break;
-
-        case KTUI_c_dark_blue       : res = 4;  break;
-        case KTUI_c_blue            : res = 12; break;
-
-        case KTUI_c_dark_magenta    : res = 5;  break;
-        case KTUI_c_magenta         : res = 13; break;
-
-        case KTUI_c_dark_cyan       : res = 6;  break;
-        case KTUI_c_cyan            : res = 14; break;
-
-        case KTUI_c_light_gray      : res = 7;  break;
-        case KTUI_c_white           : res = 15; break;
-    }
-    return res;
-}
-
-
-/**********************************************************************************/
-
-
-static void set_tui_attrib( tui_ac * curr, KTUI_attrib attr )
-{
-    if ( curr->attr != attr )
-    {
-        printf( "\033[0m" ); /* reset attribute, that means also color is default now! */
-        curr->fg = -1;       /* because of that we have to force the re-emission of color */
-        curr->bg = -1;
-
-        if ( attr & KTUI_a_bold )
-            printf( "\033[1m" );
-        if ( attr & KTUI_a_underline )
-            printf( "\033[4m" );
-        if ( attr & KTUI_a_blink )
-            printf( "\033[5m" );
-        if ( attr & KTUI_a_inverse )
-            printf( "\033[7m" );
-
-        curr->attr = attr;
-    }
-}
-
-
-static void set_tui_fg_color( tui_ac * curr, KTUI_color color )
-{
-    if ( curr->fg != color )
-    {
-        printf( "\033[38;5;%dm", color_2_ansi( color ) );
-        curr->fg = color;
-    }
-}
-
-
-static void set_tui_bg_color( tui_ac * curr, KTUI_color color )
-{
-    if ( curr->bg != color )
-    {
-        printf( "\033[48;5;%dm", color_2_ansi( color ) );
-        curr->bg = color;
-    }
-}
-
-
-void CC tui_send_strip( int x, int y, int count, tui_ac * curr, tui_ac * v,
-                        const char * s )
-{
-    set_tui_attrib( curr, v->attr );
-    set_tui_fg_color( curr, v->fg );
-    set_tui_bg_color( curr, v->bg );
-    printf( "\033[%d;%dH%.*s",  y + 1, x + 1, count, s );
-    fflush( stdout );
-}
-
-
-/**********************************************************************************/
-
-typedef struct KTUI_pf
-{
-/*    struct termios stored_settings; */
-    struct termios stored_settings;
-    struct sigaction sa_saved;
-    es_states es;
-    unsigned int mouse_event, mouse_x;
-} KTUI_pf;
-
-
-static struct KTUI * sig_self = NULL;
-
-
-static void get_lines_cols( int * cols, int * lines )
-{
-    struct winsize ws;
-    ioctl( STDIN_FILENO, TIOCGWINSZ, &ws );
-    if ( lines != NULL )
-        *lines = ws.ws_row;
-    if ( cols != NULL )
-        *cols = ws.ws_col;
-}
-
-
-static void sigwinchHandler( int sig )
-{
-    if ( sig_self != NULL )
-    {
-        get_lines_cols( &sig_self->cols, &sig_self->lines );
-        put_window_event( sig_self, sig_self->cols, sig_self->lines );
-    }
-}
-
-
-static void set_kb_raw_mode( struct termios * stored_settings )
-{
-    struct termios new_settings;
-    ioctl( STDIN_FILENO, TIOCGETA, stored_settings );
-    memcpy ( &new_settings, stored_settings, sizeof new_settings );
-    new_settings.c_lflag &= ( ~ICANON );    /* exit canonical mode, enter raw mode */
-    new_settings.c_lflag &= ( ~ECHO );      /* don't echo the character */
-    new_settings.c_lflag &= ( ~IEXTEN );    /* don't enable extended input character processing */
-    new_settings.c_lflag &= ( ~ISIG );      /* don't automatically handle control-C */
-    new_settings.c_cc[ VTIME ] = 1;         /* timeout (tenths of a second) */
-    new_settings.c_cc[ VMIN ] = 0;          /* minimum number of characters */
-    ioctl( STDIN_FILENO, TIOCSETA, &new_settings ); /* apply the new settings */
-}
-
-
-static void restore_kb_mode( const struct termios * stored_settings )
-{
-    /* applies the terminal settings supplied as the argument */
-    ioctl( STDIN_FILENO, TIOCSETA, stored_settings );
-}
-
-
-rc_t CC KTUI_Init_platform( KTUI * self )
-{
-    rc_t rc = 0;
-    struct KTUI_pf * pf = malloc( sizeof * pf );
-    if ( pf == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcMemory, rcExhausted );
-    else
-    {
-        struct sigaction sa_new;
-
-        set_kb_raw_mode( &pf->stored_settings );
-        sa_new.sa_flags = 0;
-        sa_new.sa_handler = sigwinchHandler;
-        sigaction( SIGWINCH, &sa_new, &pf->sa_saved );
-        get_lines_cols( &self->cols, &self->lines );
-        pf->es = es_normal;
-
-        printf( "\033[2J" );        /* clrscr */
-        printf( "\033[?25l" );      /* cursor off */
-
-        /* printf( "\033[?9h" );     mouse tracking on ( SET_X10_MOUSE ): mouse-down events, does not work with putty */
-		
-		printf( "\033[?1000h" );     /* mouse tracking on ( SET_VT200_MOUSE ): mouse-up/down events, does work with putty */
-		printf( "\033[?1002h" );     /* mouse tracking on ( SET_BTN_EVENT_MOUSE ): mouse-up/down/move events, does work with putty */
-		/*printf( "\033[?1003h" );      mouse tracking on ( SET_ANY_EVENT_MOUSE ): ??? */
-		
-        fflush( stdout );
-
-        sig_self = self;
-        self->pf = pf;
-    }
-    return rc;
-}
-
-
-rc_t CC KTUI_Destroy_platform ( struct KTUI_pf * pf )
-{
-    if ( pf != NULL )
-    {
-        restore_kb_mode( &pf->stored_settings );
-        sigaction( SIGWINCH, &pf->sa_saved, NULL );
-        free( ( void * ) pf );
-    }
-
-    sig_self = NULL;
-    printf( "\033[0;39;49m" );  /* reset colors */
-    printf( "\033[H" );         /* home */
-    printf( "\033[2J" );        /* clrscr */
-    printf( "\033[?25h" );      /* cursor off */
-
-    /*printf( "\033[?9l" );       mouse tracking X10-style off */
-	printf( "\033[?1000l" );       /* mouse tracking off */	
-	printf( "\033[?1002l" );       /* mouse tracking off */		
-	/*printf( "\033[?1003l" );    mouse tracking off */	
-    fflush( stdout );
-
-    return 0;
-}
-
-
-static void put_kb_event_u( struct KTUI * self, int key, KTUI_key code )
-{
-    if ( self->pf != NULL ) self->pf->es = es_normal;
-    put_kb_event( self, key, code );
-}
-
-
-static void put_kb_alpha( struct KTUI * self, int key )
-{
-    put_kb_event_u( self, key, ktui_alpha );
-}
-
-static void put_kb_alpha_3( struct KTUI * self, int key1, int key2, int key3 )
-{
-    put_kb_alpha( self, key1 );
-    put_kb_alpha( self, key2 );
-    put_kb_alpha( self, key3 );
-}
-
-static void put_kb_alpha_4( struct KTUI * self, int key1, int key2, int key3, int key4 )
-{
-    put_kb_alpha( self, key1 );
-    put_kb_alpha( self, key2 );
-    put_kb_alpha( self, key3 );
-    put_kb_alpha( self, key4 );
-}
-
-static void put_kb_alpha_5( struct KTUI * self, int key1, int key2, int key3, int key4, int key5 )
-{
-    put_kb_alpha( self, key1 );
-    put_kb_alpha( self, key2 );
-    put_kb_alpha( self, key3 );
-    put_kb_alpha( self, key4 );
-    put_kb_alpha( self, key5 );
-}
-
-
-/* -------------------------------------------------------------------------------------
-
-mouse_event	7 6 5 4 3 2 1 0
-						B B
-						0 0 ... left mouse button
-						0 1 ... middle mouse button
-						1 0 ... right mouse button
-						1 1 ... button up ( don't know which one )
-                      S ....... status of Shift key						0x04
-                    M ......... status of Meta key ( Alt )				0x08
-                  C ........... status of Ctrl key						0x10 (16)
-			  0 0 ............. unknown									0x00
-              0 1 ............. button event ( down, up )				0x20
-              1 0 ............. move event ( + button )					0x40
-              1 1 ............. scroll event ( + button )				0x60
-			  
-------------------------------------------------------------------------------------- */
-static void put_mouse_event_u( struct KTUI * self, unsigned int y )
-{
-    if ( self->pf != NULL )
-    {
-		unsigned int ev = self->pf->mouse_event;
-		KTUI_mouse_button b = ktui_mouse_button_none;
-		KTUI_mouse_action a = ktui_mouse_action_none;
-
-		switch( ev & 0x03 )
-		{
-			case 0x00 : b = ktui_mouse_button_left; break;
-			case 0x01 : b = ktui_mouse_button_middle; break;
-			case 0x02 : b = ktui_mouse_button_right; break;
-			case 0x03 : b = ktui_mouse_button_up; break;
-		}
-		
-		switch ( ev & 0x60 )
-		{
-			case 0x20 : a = ktui_mouse_action_button; break;
-			case 0x40 : a = ktui_mouse_action_move; break;
-			case 0x60 : a = ktui_mouse_action_scroll; break;
-		}
-
-		put_mouse_event( self, self->pf->mouse_x, y, b, a, ev );
-        self->pf->es = es_normal;
-    }
-}
-
-static void statemachine( struct KTUI * self, unsigned int x )
-{
-    if ( self->pf != NULL ) switch( self->pf->es )
-    {
-        case es_normal : switch( x )
-                        {
-                            case 10 : put_kb_event_u( self, x, ktui_enter ); break;
-                            case 8  : put_kb_event_u( self, x, ktui_bksp ); break;
-                            case 9  : put_kb_event_u( self, x, ktui_tab ); break;
-                            case 127 : put_kb_event_u( self, x, ktui_bksp ); break;
-                            case 27 : self->pf->es = es_ESC; break;
-                            default : put_kb_alpha( self, x ); break;
-                        } break;
-
-        case es_ESC : switch( x )
-                        {
-                            case 91 : self->pf->es = es_ESC_91; break;
-                            case 79 : self->pf->es = es_ESC_79; break;
-                            default : put_kb_alpha( self, x ); break;
-                        } break;
-
-        case es_ESC_91 : switch( x )
-                        {
-                            case 65 : put_kb_event_u( self, x, ktui_up ); break;
-                            case 66 : put_kb_event_u( self, x, ktui_down ); break;
-                            case 67 : put_kb_event_u( self, x, ktui_right ); break;
-                            case 68 : put_kb_event_u( self, x, ktui_left ); break;
-                            case 69 : put_kb_alpha( self, '5' ); break;
-                            case 70 : put_kb_event_u( self, x, ktui_end ); break;
-                            case 72 : put_kb_event_u( self, x, ktui_home ); break;
-
-                            case 49 : self->pf->es = es_ESC_91_49; break;
-                            case 50 : self->pf->es = es_ESC_91_50; break;
-                            case 51 : self->pf->es = es_ESC_91_51; break;
-                            case 52 : self->pf->es = es_ESC_91_52; break;
-                            case 53 : self->pf->es = es_ESC_91_53; break;
-                            case 54 : self->pf->es = es_ESC_91_54; break;
-
-                            case 77 : self->pf->es = es_ESC_91_77_B; break;   /* mouse reporting */
-
-                            case 90 : put_kb_event_u( self, x, ktui_shift_tab ); break; /* shift tab */
-
-                            default : put_kb_alpha_3( self, 27, 91, x ); break;
-                        } break;
-
-        case es_ESC_91_49 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_home ); break;
-                            case 49  : self->pf->es = es_ESC_91_49_49; break;
-                            case 50  : self->pf->es = es_ESC_91_49_50; break;
-                            case 51  : self->pf->es = es_ESC_91_49_51; break;
-                            case 52  : self->pf->es = es_ESC_91_49_52; break;
-                            case 53  : self->pf->es = es_ESC_91_49_53; break;
-                            case 55  : self->pf->es = es_ESC_91_49_55; break;
-                            case 56  : self->pf->es = es_ESC_91_49_56; break;
-                            case 57  : self->pf->es = es_ESC_91_49_57; break;
-                            default : put_kb_alpha_4( self, 27, 91, 49, x ); break;
-                        } break;
-
-        case es_ESC_91_49_49 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F1 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 49, x ); break;
-                        } break;
-
-        case es_ESC_91_49_50 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F2 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 50, x ); break;
-                        } break;
-
-        case es_ESC_91_49_51 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F3 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 51, x ); break;
-                        } break;
-
-        case es_ESC_91_49_52 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F4 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 52, x ); break;
-                        } break;
-
-        case es_ESC_91_49_53 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F5 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 53, x ); break;
-                        } break;
-
-        case es_ESC_91_49_55 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F6 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 55, x ); break;
-                        } break;
-
-        case es_ESC_91_49_56 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F7 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 56, x ); break;
-                        } break;
-
-        case es_ESC_91_49_57 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F8 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 57, x ); break;
-                        } break;
-
-        case es_ESC_91_50 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_ins ); break;
-                            case 48 : self->pf->es = es_ESC_91_50_48; break;
-                            case 49 : self->pf->es = es_ESC_91_50_49; break;
-                            case 51 : self->pf->es = es_ESC_91_50_51; break;
-                            case 52 : self->pf->es = es_ESC_91_50_52; break;
-                            default : put_kb_alpha_4( self, 27, 91, 50, x ); break;
-                        } break;
-
-        case es_ESC_91_50_48 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F9 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 50, 48, x ); break;
-                        } break;
-
-        case es_ESC_91_50_49 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F10 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 50, 49, x ); break;
-                        } break;
-
-        case es_ESC_91_50_51 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F11 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 50, 51, x ); break;
-                        } break;
-
-        case es_ESC_91_50_52 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F12 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 50, 52, x ); break;
-                        } break;
-
-        case es_ESC_91_51 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_del ); break;
-                            default : put_kb_alpha_4( self, 27, 91, 51, x ); break;
-                        } break;
-
-        case es_ESC_91_52 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_end ); break;
-                            default : put_kb_alpha_4( self, 27, 91, 52, x ); break;
-                        } break;
-
-        case es_ESC_91_53 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_pgup ); break;
-                            default : put_kb_alpha_4( self, 27, 91, 53, x ); break;
-                        } break;
-
-        case es_ESC_91_54 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_pgdn ); break;
-                            default : put_kb_alpha_4( self, 27, 91, 54, x ); break;
-                        } break;
-
-        case es_ESC_79 : switch( x )
-                        {
-                            case 80 : put_kb_event_u( self, x, ktui_F1 ); break;
-                            case 81 : put_kb_event_u( self, x, ktui_F2 ); break;
-                            case 82 : put_kb_event_u( self, x, ktui_F3 ); break;
-                            case 83 : put_kb_event_u( self, x, ktui_F4 ); break;
-                            case 77 : put_kb_event_u( self, x, ktui_enter ); break;
-                            case 65 : put_kb_event_u( self, x, ktui_up ); break;
-                            case 66 : put_kb_event_u( self, x, ktui_down ); break;
-                            case 67 : put_kb_event_u( self, x, ktui_right ); break;
-                            case 68 : put_kb_event_u( self, x, ktui_left ); break;
-
-                            case 70 : put_kb_event_u( self, x, ktui_end ); break;
-                            case 72 : put_kb_event_u( self, x, ktui_home ); break;
-
-                            case 119 : put_kb_alpha( self, '7' ); break;
-                            case 120 : put_kb_alpha( self, '8' ); break;
-                            case 121 : put_kb_alpha( self, '9' ); break;
-                            case 116 : put_kb_alpha( self, '4' ); break;
-                            case 117 : put_kb_alpha( self, '5' ); break;
-                            case 118 : put_kb_alpha( self, '6' ); break;
-                            case 113 : put_kb_alpha( self, '1' ); break;
-                            case 114 : put_kb_alpha( self, '2' ); break;
-                            case 115 : put_kb_alpha( self, '3' ); break;
-                            case 112 : put_kb_alpha( self, '0' ); break;
-                            case 110 : put_kb_alpha( self, '.' ); break;
-
-                            default : put_kb_alpha_3( self, 27, 79, x ); break;
-                        } break;
-
-        case es_ESC_91_77_B :   self->pf->mouse_event = x;
-                                self->pf->es = es_ESC_91_77_X;
-                                break;
-
-        case es_ESC_91_77_X :   self->pf->mouse_x = x - 33;
-                                self->pf->es = es_ESC_91_77_Y;
-                                break;
-
-        case es_ESC_91_77_Y :  put_mouse_event_u( self, x - 33 ); break;
-
-        default : self->pf->es = es_normal; break;
-    }
-
-}
-
-void CC read_from_stdin( struct KTUI * self, uint32_t timeout )
-{
-    fd_set rfds;
-    struct timeval tv;
-    int select_res;
-
-    FD_ZERO( &rfds );
-    FD_SET ( STDIN_FILENO, &rfds );
-    tv.tv_sec  = 0;
-    tv.tv_usec = timeout;
-
-    select_res = select( 1, &rfds, NULL, NULL, &tv );
-    if ( select_res < 0 )
-    {
-        /* error ... */
-    }
-    else if ( select_res == 0 )
-    {
-        /* no input during timeout... */
-    }
-    else
-    {
-        unsigned char in_buffer[ 32 ];
-        int i, n = read( STDIN_FILENO, in_buffer, sizeof in_buffer );
-        for ( i = 0; i < n; ++i )
-        {
-            unsigned int x = ( unsigned int ) in_buffer[ i ];
-            statemachine( self, x );
-        }
-    }
-}
diff --git a/libs/tui/dir_dlg.c b/libs/tui/dir_dlg.c
deleted file mode 100644
index ab5bdbe..0000000
--- a/libs/tui/dir_dlg.c
+++ /dev/null
@@ -1,470 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <tui/extern.h>
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <kfs/directory.h>
-
-#include <vfs/manager.h>
-#include <vfs/path.h>
-
-#include <tui/tui_dlg.h>
-#include "tui-priv.h"
-
-#include <sysalloc.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-
-typedef struct dir_dlg_data
-{
-    uint32_t dlg_w, dlg_h;
-
-    /* for the inputline */
-    char current_dir_internal[ 4096 ];
-    char parent_dir_internal[ 4096 ];
-	
-    /* a VFS-Manager to do a path-conversion */
-    VFSManager * vfs_mgr;
-
-	/* a native KDirectory to fill the path-list */
-	KDirectory * dir;
-
-    KTUI_color bg1;
-    KTUI_color bg2;
-	
-    bool in_root;
-    bool ok_pressed;
-    bool done;
-    bool allow_dir_create;
-
-} dir_dlg_data;
-
-
-enum
-{
-    ID_CURR = 100,
-    ID_LABEL1,
-    ID_DIRS,
-    ID_B_OK,
-    ID_B_CANCEL,
-    ID_B_CREATE,
-    ID_B_GOTO
-};
-
-
-static void init_dlg_data( dir_dlg_data * data, uint32_t dlg_w, uint32_t dlg_h,
-                           char * path, KTUI_color bg1, KTUI_color bg2, bool allow_dir_create )
-{
-    size_t written;
-
-    data->dlg_w = dlg_w;
-    data->dlg_h = dlg_h;
-
-    VFSManagerMake ( &data->vfs_mgr );
-	KDirectoryNativeDir ( &data->dir );
-
-    native_to_internal( data->vfs_mgr, path, data->current_dir_internal, sizeof data->current_dir_internal, &written );
-
-	data->in_root = ( ( data->current_dir_internal[ 0 ] == '/' ) && ( data->current_dir_internal[ 1 ] == 0 ) );
-	data->parent_dir_internal[ 0 ] = 0;
-    data->done = false;
-    data->ok_pressed = false;
-    data->bg1 = bg1;
-    data->bg2 = bg2;
-    data->allow_dir_create = allow_dir_create;
-}
-
-
-static void destroy_dlg_data( dir_dlg_data * data )
-{
-    if ( data->vfs_mgr != NULL )
-    {
-        VFSManagerRelease ( data->vfs_mgr );
-        data->vfs_mgr = NULL;
-    }
-	if ( data->dir != NULL )
-	{
-		KDirectoryRelease ( data->dir );
-		data->dir = NULL;
-	}
-}
-
-
-static bool create_allowed( dir_dlg_data * data )
-{
-#ifdef WINDOWS
-    return !data->in_root;
-#else
-    return true;
-#endif
-}
-
-static rc_t PopulateDirDlg ( struct KTUIDlg * dlg, dir_dlg_data * data )
-{
-    uint32_t x;
-    rc_t rc = KTUIDlgAddLabel2( dlg, ID_CURR, 1, 2, data->dlg_w - 2, "" );
-
-    if ( rc == 0 )
-        rc = KTUIDlgAddLabel2( dlg, ID_LABEL1, 1, 4, data->dlg_w - 2, "directories:" );
-
-    if ( rc == 0 )
-    {
-        tui_rect r;
-        set_rect( &r, 1, 5, data->dlg_w - 2, data->dlg_h - 8 );
-        rc = KTUIDlgAddList ( dlg, ID_DIRS, &r );
-    }
-
-    x = 1;
-    if ( rc == 0 )
-        rc = KTUIDlgAddBtn2( dlg, ID_B_OK, x, data->dlg_h - 2, 12, "OK" );
-    x += ( 12 + 1 );
-
-    if ( rc == 0 )
-        rc = KTUIDlgAddBtn2( dlg, ID_B_CANCEL, x, data->dlg_h - 2, 22, "Cancel (ESC-ESC)" );
-    x += ( 22 + 1 );
-
-    if ( rc == 0 )
-        rc = KTUIDlgAddBtn2( dlg, ID_B_GOTO, x, data->dlg_h - 2, 12, "Goto" );
-    x += ( 12 + 1 );
-
-    if ( rc == 0 && data->allow_dir_create )
-    {
-        rc = KTUIDlgAddBtn2( dlg, ID_B_CREATE, x, data->dlg_h - 2, 18, "Create Dir" );
-        if ( rc == 0 )
-            rc = KTUIDlgSetWidgetVisible ( dlg, ID_B_CREATE, create_allowed( data ) );
-    }
-
-	if ( rc == 0 )
-		rc = set_native_caption( dlg, data->vfs_mgr, ID_CURR, data->current_dir_internal );
-		
-    if ( rc == 0 )
-        rc = fill_widget_with_dirs( dlg, data->dir, ID_DIRS, data->current_dir_internal, data->parent_dir_internal );
-
-    if ( rc == 0 )
-        rc = KTUIDlgSetFocus( dlg, ID_DIRS );
-    return rc;
-}
-
-
-static void DirDlg_Goto_Parent ( dir_dlg_data * data )
-{
-	char * right_slash = string_rchr ( data->current_dir_internal, string_size ( data->current_dir_internal ), '/' );
-	if ( right_slash != NULL )
-	{
-		size_t written;
-
-		data->in_root = ( right_slash == data->current_dir_internal );
-		if ( data->in_root )
-			data->current_dir_internal[ 1 ] = 0;
-		else
-			*right_slash = 0;
-			
-		string_printf( data->parent_dir_internal, sizeof data->parent_dir_internal, &written, "%s", right_slash + 1 );
-	}
-}
-
-
-static rc_t DirDlg_Goto_Child ( struct KTUIDlg * dlg, dir_dlg_data * data, uint32_t selection )
-{
-	rc_t rc = 0;
-	/* we are goint one directory forward in the tree: */
-	const char * s = KTUIDlgGetWidgetStringByIdx ( dlg, ID_DIRS, selection );
-	if ( s != NULL )
-	{
-		/* add path segment from selection */
-		char temp[ 4096 ];
-		size_t written;
-		
-		if ( data->in_root )
-#ifdef WINDOWS
-			rc = string_printf ( temp, sizeof temp, &written, "/%c", s[ 0 ] );
-#else
-			rc = string_printf ( temp, sizeof temp, &written, "/%s", s );
-#endif
-		else
-			rc = string_printf ( temp, sizeof temp, &written, "%s/%s", data->current_dir_internal, s );
-		
-		if ( rc == 0 )
-			string_copy_measure ( data->current_dir_internal, sizeof data->current_dir_internal, temp );
-
-		data->parent_dir_internal[ 0 ] = 0;
-		data->in_root = false;
-	}
-	return rc;
-}
-
-
-static rc_t DirDlgDirectoryChanged ( struct KTUIDlg * dlg, dir_dlg_data * data, uint32_t selection )
-{
-    rc_t rc = 0;
-
-    if ( selection == 0 && !data->in_root )
-		DirDlg_Goto_Parent ( data );
-    else
-		rc = DirDlg_Goto_Child ( dlg, data, selection );
-
-	if ( rc == 0 )
-		rc = set_native_caption( dlg, data->vfs_mgr, ID_CURR, data->current_dir_internal );	
-	
-    if ( rc == 0 )
-        rc = fill_widget_with_dirs( dlg, data->dir, ID_DIRS, data->current_dir_internal, data->parent_dir_internal );
-
-    if ( rc == 0 )
-        rc = KTUIDlgSetWidgetVisible ( dlg, ID_B_CREATE, create_allowed( data ) );
-
-    if ( rc == 0 )
-        rc = KTUIDlgDraw( dlg, false );
-
-	return rc;
-}
-
-
-static rc_t Present_Input ( struct KTUIDlg * dlg, dir_dlg_data * data, const char * caption,
-                            char * buffer, size_t buffer_size, bool * selected )
-{
-    tui_rect r;
-    rc_t rc = KTUIDlgGetRect ( dlg, &r );
-    *selected = false;
-    if ( rc == 0 )
-    {
-        uint32_t w = 40, h = 6;
-        uint32_t x = ( r.w - w ) / 2;
-        uint32_t y = ( r.h - h ) / 2;
-        struct KTUI * tui = KTUIDlgGetTui( dlg );
-
-        rc = TUI_EditBuffer( tui, dlg, caption, buffer, buffer_size, x, y, w, selected, data->bg1, data->bg2 );
-
-        /* redraw in any case, even creating a directory failed, because we have to erase the sub-dialog from the screen */
-        KTUIDlgDraw( dlg, false );
-    }
-    return rc;
-}
-
-static rc_t DirDlgCreate ( struct KTUIDlg * dlg, dir_dlg_data * data )
-{
-    rc_t rc = 0;
-    if ( create_allowed( data ) )
-    {
-        char leafname[ 1024 ];
-        bool selected;
-
-        leafname[ 0 ] = 0;
-        rc = Present_Input ( dlg, data, "new sub-directory", leafname, sizeof leafname, &selected );
-        if ( rc == 0 )
-        {
-            if ( rc == 0 && selected && leafname[ 0 ] != 0 )
-            {
-                rc = KDirectoryCreateDir ( data->dir, 0775, kcmCreate | kcmParents,
-                                           "%s/%s", data->current_dir_internal, leafname );
-                if ( rc == 0 )
-                    rc = fill_widget_with_dirs( dlg, data->dir, ID_DIRS, data->current_dir_internal, leafname );
-                if ( rc == 0 )
-                    rc = KTUIDlgDraw( dlg, false );
-            }
-            /* set the focus to the directory-list */
-            KTUIDlgSetFocus( dlg, ID_DIRS );
-        }
-    }
-    return rc;
-}
-
-
-static rc_t DirDlgGotoDir ( struct KTUIDlg * dlg, dir_dlg_data * data )
-{
-    char new_path[ 1024 ];
-    size_t written;
-    rc_t rc = internal_to_native( data->vfs_mgr, data->current_dir_internal, new_path, sizeof new_path, &written );
-    if ( rc == 0 )
-    {
-        bool selected;
-        rc = Present_Input ( dlg, data, "goto path", new_path, sizeof new_path, &selected );
-        if ( rc == 0 && selected )
-        {
-            rc = native_to_internal( data->vfs_mgr, new_path, data->current_dir_internal,
-                                     sizeof data->current_dir_internal, &written );
-            if ( rc == 0 )
-                rc = fill_widget_with_dirs( dlg, data->dir, ID_DIRS, data->current_dir_internal, NULL );
-            if ( rc == 0 )
-                rc = set_native_caption( dlg, data->vfs_mgr, ID_CURR, data->current_dir_internal );	
-
-            KTUIDlgSetFocus( dlg, ID_DIRS );
-        }
-    }
-    return rc;
-}
-
-
-static rc_t DirDlgEvent ( struct KTUIDlg * dlg, tuidlg_event * dev, dir_dlg_data * data )
-{
-    rc_t rc = 0;
-    if ( dev->event_type == ktuidlg_event_select )
-    {
-        switch ( dev->widget_id )
-        {
-            case ID_DIRS     : rc = DirDlgDirectoryChanged( dlg, data, ( uint32_t )dev->value_1 ); break;
-            case ID_B_OK     : data->ok_pressed = data->done = true; break;
-            case ID_B_CANCEL : data->done = true; break;
-            case ID_B_CREATE : rc = DirDlgCreate( dlg, data ); break;
-            case ID_B_GOTO   : rc = DirDlgGotoDir( dlg, data ); break;
-        }
-    }
-    return rc;
-}
-
-
-static rc_t DirDlgTuiEvent( struct KTUIDlg * dlg, dir_dlg_data * data, tui_event * ev, bool * handled )
-{
-    rc_t rc = 0;
-    *handled = false;
-    if ( ev->event_type == ktui_event_kb )
-    {
-        switch( ev->data.kb_data.code )
-        {
-            case ktui_F7 : rc = DirDlgCreate ( dlg, data ); *handled = true; break;
-            case ktui_F3 : rc = DirDlgGotoDir ( dlg, data ); *handled = true; break;
-            case ktui_F2 : data->ok_pressed = data->done = true; *handled = true; break;
-            case ktui_alpha : switch ( ev->data.kb_data.key )
-                               {
-                                    case 'c' :
-                                    case 'C' : rc = DirDlgCreate ( dlg, data ); *handled = true; break;
-                                    case 'g' :
-                                    case 'G' : rc = DirDlgGotoDir ( dlg, data ); *handled = true; break;
-                               }
-                               break;
-        }
-    }
-    return rc;
-}
-
-
-static rc_t DirDlgLoop ( struct KTUIDlg * dlg, dir_dlg_data * data )
-{
-    rc_t rc;
-    tui_event event;
-    struct KTUI * tui = KTUIDlgGetTui( dlg );
-
-    KTUIDlgDraw( dlg, false );  /* draw this dialog */
-    do
-    {
-        rc = KTUIGet ( tui, &event );
-        if ( rc == 0 )
-        {
-            bool handled = false;
-            rc = DirDlgTuiEvent( dlg, data, &event, &handled );
-            if ( rc == 0 && !handled )
-            {
-                rc = KTUIDlgHandleEvent( dlg, &event );
-                if ( rc == 0 )
-                {
-                    tuidlg_event dev;
-                    do
-                    {
-                        rc = KTUIDlgGet ( dlg, &dev );
-                        if ( rc == 0 && dev.event_type != ktuidlg_event_none )
-                            rc = DirDlgEvent( dlg, &dev, data );
-                    } while ( rc == 0 && dev.event_type != ktuidlg_event_none );
-                }
-            }
-        }
-    } while ( rc == 0 && !is_alpha_key( &event, 27 ) && !data->done );
-    return rc;
-}
-
-
-static rc_t make_dlg_with_bg( struct KTUIDlg ** dlg,
-                              struct KTUIPalette ** pal,
-                              struct KTUI * tui_,
-                              struct KTUIDlg * parent,
-                              tui_rect * r,
-                              KTUI_color bg1,
-                              KTUI_color bg2 )
-{
-    rc_t rc;
-    struct KTUI * tui = tui_;
-    if ( tui == NULL )
-        tui = KTUIDlgGetTui( parent );
-    if ( tui == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcNull );
-    else
-    {
-        rc = KTUIPaletteMake ( pal );
-        if ( rc == 0 )
-        {
-            KTUIPaletteSet_bg ( *pal, ktuipa_dlg, bg1 );
-            KTUIPaletteSet_bg ( *pal, ktuipa_dlg_caption, bg2 );
-            rc = KTUIDlgMake ( tui, dlg, parent, *pal, r );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC DirDlg ( struct KTUI * tui,
-                            struct KTUIDlg * parent,
-                            char * buffer,             /* if empty ... local path */
-                            uint32_t buffer_size,
-                            bool * done,               /* user has selected a directory */
-                            tui_rect * r,              /* rectangle for dialog */
-                            KTUI_color bg1,
-                            KTUI_color bg2,
-                            bool allow_dir_create )
-{
-    struct KTUIPalette * pal;
-    struct KTUIDlg * dlg;
-    rc_t rc = make_dlg_with_bg( &dlg, &pal, tui, parent, r, bg1, bg2 );
-    if ( rc == 0 )
-    {
-        rc = KTUIDlgSetCaption ( dlg, "select directory" );
-        if ( rc == 0 )
-        {
-            dir_dlg_data data;
-
-            init_dlg_data( &data, r->w, r->h, buffer, bg1, bg2, allow_dir_create );
-            rc = PopulateDirDlg ( dlg, &data );
-            if ( rc == 0 )
-                DirDlgLoop( dlg, &data );
-
-            if ( done != NULL )
-                *done = data.ok_pressed;
-
-            if ( data.ok_pressed )
-            {
-                size_t written;
-                internal_to_native( data.vfs_mgr, data.current_dir_internal, buffer, buffer_size, &written );
-            }
-
-            destroy_dlg_data( &data );
-        }
-        KTUIDlgRelease ( dlg );
-        KTUIPaletteRelease ( pal );
-    }
-    return rc;
-}
diff --git a/libs/tui/eventring.c b/libs/tui/eventring.c
deleted file mode 100644
index d87123c..0000000
--- a/libs/tui/eventring.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "eventring.h"
-
-#include <sysalloc.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-
-void event_ring_init( Event_Ring * ring )
-{
-    SLListInit( &ring->events );
-    SLListInit( &ring->stock );
-}
-
-static void CC event_ring_whack( SLNode *n, void *data )
-{
-    void * event = ( void * )n;
-    if ( event != NULL ) free( event );
-}
-
-
-void event_ring_destroy( Event_Ring * ring )
-{
-    SLListWhack ( &ring->events, event_ring_whack, NULL );
-    SLListWhack ( &ring->stock, event_ring_whack, NULL );
-}
-
-
-/* ****************************************************************************************** */
-
-
-tui_event * event_ring_get_from_stock_or_make( Event_Ring * ring )
-{
-    tui_event * event = ( tui_event * ) SLListPopHead ( &ring->stock );
-    if ( event == NULL )
-        event = malloc( sizeof * event );
-    return event;
-}
-
-
-void event_ring_put( Event_Ring * ring, tui_event * event )
-{
-    SLListPushTail ( &ring->events, ( SLNode * )event );
-}
-
-
-tui_event * event_ring_get( Event_Ring * ring )
-{
-    return ( tui_event * ) SLListPopHead ( &ring->events );
-}
-
-
-void event_ring_put_to_stock( Event_Ring * ring, tui_event * event )
-{
-    SLListPushTail ( &ring->stock, ( SLNode * )event );
-}
-
-
-void copy_event( tui_event * src, tui_event * dst )
-{
-    dst->event_type = src->event_type;
-    switch( src->event_type )
-    {
-        case ktui_event_none	: break;
-        case ktui_event_kb		: dst->data.kb_data = src->data.kb_data; break;
-        case ktui_event_mouse	: dst->data.mouse_data = src->data.mouse_data; break;
-        case ktui_event_window	: dst->data.win_data = src->data.win_data; break;
-    }
-}
-
-
-/* ****************************************************************************************** */
-
-tuidlg_event * dlg_event_ring_get_from_stock_or_make( Event_Ring * ring )
-{
-    tuidlg_event * event = ( tuidlg_event * ) SLListPopHead ( &ring->stock );
-    if ( event == NULL )
-        event = malloc( sizeof * event );
-    return event;
-}
-
-
-void dlg_event_ring_put( Event_Ring * ring, tuidlg_event * event )
-{
-    SLListPushTail ( &ring->events, ( SLNode * )event );
-}
-
-
-tuidlg_event * dlg_event_ring_get( Event_Ring * ring )
-{
-    return ( tuidlg_event * ) SLListPopHead ( &ring->events );
-}
-
-
-void dlg_event_ring_put_to_stock( Event_Ring * ring, tuidlg_event * event )
-{
-    SLListPushTail ( &ring->stock, ( SLNode * )event );
-}
-
-
-void copy_dlg_event( tuidlg_event * src, tuidlg_event * dst )
-{
-    dst->event_type = src->event_type;
-    dst->widget_id = src->widget_id;
-    dst->value_1 = src->value_1;
-    dst->value_2 = src->value_2;
-    dst->ptr_0 = src->ptr_0;
-}
diff --git a/libs/tui/eventring.h b/libs/tui/eventring.h
deleted file mode 100644
index 71581f2..0000000
--- a/libs/tui/eventring.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_eventring_
-#define _h_eventring_
-
-#ifndef _h_tui_extern_
-#include <tui/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <tui/tui.h>
-#include <tui/tui_dlg.h>
-
-#define EVENT_RING_SIZE 128
-
-typedef struct Event_Ring
-{
-    SLList events;
-    SLList stock;
-} Event_Ring;
-
-void event_ring_init( Event_Ring * ring );
-void event_ring_destroy( Event_Ring * ring );
-
-tui_event * event_ring_get_from_stock_or_make( Event_Ring * ring );
-void event_ring_put( Event_Ring * ring, tui_event * event );
-tui_event * event_ring_get( Event_Ring * ring );
-void event_ring_put_to_stock( Event_Ring * ring, tui_event * event );
-void copy_event( tui_event * src, tui_event * dst );
-
-
-tuidlg_event * dlg_event_ring_get_from_stock_or_make( Event_Ring * ring );
-void dlg_event_ring_put( Event_Ring * ring, tuidlg_event * event );
-tuidlg_event * dlg_event_ring_get( Event_Ring * ring );
-void dlg_event_ring_put_to_stock( Event_Ring * ring, tuidlg_event * event );
-void copy_dlg_event( tuidlg_event * src, tuidlg_event * dst );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_eventring */
diff --git a/libs/tui/file_dlg.c b/libs/tui/file_dlg.c
deleted file mode 100644
index 7e190c6..0000000
--- a/libs/tui/file_dlg.c
+++ /dev/null
@@ -1,380 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <tui/extern.h>
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <kfs/directory.h>
-
-#include <vfs/manager.h>
-#include <vfs/path.h>
-
-#include <tui/tui_dlg.h>
-#include "tui-priv.h"
-
-#include <sysalloc.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-
-typedef struct file_dlg_data
-{
-    uint32_t dlg_w, dlg_h, dir_h;
-
-    /* for the inputline */
-    char current_dir_internal[ 4096 ];
-	char parent_dir_internal[ 4096 ];
-
-    /* which extension... */
-    char * extension;
-
-    /* a VFS-Manager to do a path-conversion */
-    VFSManager * vfs_mgr;
-	
-    /* a KDirectory to fill widgets with directories/files */
-	KDirectory * dir;
-
-	bool in_root;
-    bool selected;
-	bool done;
-} file_dlg_data;
-
-
-static void init_dlg_data( file_dlg_data * data, uint32_t dlg_w, uint32_t dlg_h, uint32_t dir_h,
-    char * path, const char * extension )
-{
-    size_t written;
-
-    data->dlg_w = dlg_w;
-    data->dlg_h = dlg_h;
-    data->dir_h = dir_h;
-
-    VFSManagerMake ( &data->vfs_mgr );
-	KDirectoryNativeDir ( &data->dir );
-	
-    native_to_internal( data->vfs_mgr, path, data->current_dir_internal, sizeof data->current_dir_internal, &written );
-	
-	data->in_root = ( ( data->current_dir_internal[ 0 ] == '/' ) && ( data->current_dir_internal[ 1 ] == 0 ) );
-	data->parent_dir_internal[ 0 ] = 0;
-    data->selected = false;
-	data->done = false;
-    if ( extension != NULL )
-        data->extension = string_dup_measure ( extension, NULL );
-    else
-        data->extension = NULL;
-}
-
-static void destroy_dlg_data( file_dlg_data * data )
-{
-    /* we only have to destroy the Namelist's... */
-    if ( data->extension != NULL )
-    {
-        free( ( void * ) data->extension );
-        data->extension = NULL;
-    }
-
-    if ( data->vfs_mgr != NULL )
-    {
-        VFSManagerRelease ( data->vfs_mgr );
-        data->vfs_mgr = NULL;
-    }
-
-    if ( data->dir != NULL )
-    {
-        KDirectoryRelease ( data->dir );
-        data->dir = NULL;
-    }
-}
-
-
-enum
-{
-    ID_CURR = 100,
-    ID_LABEL1,
-    ID_DIRS,
-    ID_LABEL2,
-    ID_FILES,
-    ID_B_OK,
-    ID_B_CANCEL
-};
-
-
-static rc_t PopulateFileDlg ( struct KTUIDlg * dlg, file_dlg_data * data )
-{
-	rc_t rc = KTUIDlgAddLabel2( dlg, ID_CURR, 1, 2, data->dlg_w - 2, "" );
-
-	if ( rc == 0 )
-		rc = KTUIDlgAddLabel2( dlg, ID_LABEL1, 1, 4, data->dlg_w - 2, "directories:" );
-
-	if ( rc == 0 )
-	{
-		tui_rect r;
-		set_rect( &r, 1, 5, data->dlg_w - 2, data->dir_h );
-		rc = KTUIDlgAddList ( dlg, ID_DIRS, &r );
-	}
-
-	if ( rc == 0 )
-		rc = KTUIDlgAddLabel2( dlg, ID_LABEL2, 1, data->dir_h + 6, data->dlg_w - 2, "files:" );
-
-	if ( rc == 0 )
-	{
-		tui_rect r;
-		set_rect( &r, 1, data->dir_h + 7, data->dlg_w - 2, data->dlg_h - ( data->dir_h + 10 )  );
-		rc = KTUIDlgAddList ( dlg, ID_FILES, &r );
-	}
-
-	if ( rc == 0 )
-		rc = KTUIDlgAddBtn2( dlg, ID_B_OK, 1, data->dlg_h - 2, 12, "OK" );
-
-	if ( rc == 0 )
-		rc = KTUIDlgAddBtn2( dlg, ID_B_CANCEL, 14, data->dlg_h - 2, 22, "Cancel (ESC-ESC)" );
-
-	if ( rc == 0 )
-		rc = set_native_caption( dlg, data->vfs_mgr, ID_CURR, data->current_dir_internal );
-	
-	if ( rc == 0 )
-		rc = fill_widget_with_dirs( dlg, data->dir, ID_DIRS, data->current_dir_internal, NULL );
-
-	if ( rc == 0 )
-		rc = fill_widget_with_files( dlg, data->dir, ID_FILES, data->current_dir_internal, data->extension );
-
-	if ( rc == 0 )
-		rc = KTUIDlgSetFocus( dlg, ID_DIRS );
-
-    return rc;
-}
-
-
-static void FileDlg_Goto_Parent ( file_dlg_data * data )
-{
-	char * right_slash = string_rchr ( data->current_dir_internal, string_size ( data->current_dir_internal ), '/' );
-	if ( right_slash != NULL )
-	{
-		size_t written;
-		
-		data->in_root = ( right_slash == data->current_dir_internal );
-		if ( data->in_root )
-			data->current_dir_internal[ 1 ] = 0;
-		else
-			*right_slash = 0;
-			
-		string_printf( data->parent_dir_internal, sizeof data->parent_dir_internal, &written, "%s", right_slash + 1 );
-	}
-}
-
-
-static rc_t FileDlg_Goto_Child ( struct KTUIDlg * dlg, file_dlg_data * data, uint32_t selection )
-{
-	rc_t rc = 0;
-	/* we are goint one directory forward in the tree: */
-	const char * s = KTUIDlgGetWidgetStringByIdx ( dlg, ID_DIRS, selection );
-	if ( s != NULL )
-	{
-		/* add path segment from selection */
-		char temp[ 4096 ];
-		size_t written;
-		if ( data->in_root )
-#ifdef WINDOWS
-			rc = string_printf ( temp, sizeof temp, &written, "/%c", s[ 0 ] );
-#else
-			rc = string_printf ( temp, sizeof temp, &written, "/%s", s );
-#endif
-		else
-			rc = string_printf ( temp, sizeof temp, &written, "%s/%s", data->current_dir_internal, s );
-		if ( rc == 0 )
-			string_copy_measure ( data->current_dir_internal, sizeof data->current_dir_internal, temp );
-			
-		data->parent_dir_internal[ 0 ] = 0;
-		data->in_root = false;
-	}
-	return rc;
-}
-
-
-static rc_t FileDlgDirectoryChanged ( struct KTUIDlg * dlg, file_dlg_data * data, uint32_t selection )
-{
-    rc_t rc = 0;
-
-    if ( selection == 0 && !data->in_root )
-		FileDlg_Goto_Parent ( data );
-    else
-		rc = FileDlg_Goto_Child ( dlg, data, selection );
-
-    if ( rc == 0 )
-		rc = set_native_caption( dlg, data->vfs_mgr, ID_CURR, data->current_dir_internal );
-
-	if ( rc == 0 )
-		rc = fill_widget_with_dirs( dlg, data->dir, ID_DIRS, data->current_dir_internal, data->parent_dir_internal );
-
-	if ( rc == 0 )
-		rc = fill_widget_with_files( dlg, data->dir, ID_FILES, data->current_dir_internal, data->extension );	
-
-    if ( rc == 0 )
-        rc = KTUIDlgDraw( dlg, false );
-
-    return rc;
-}
-
-
-static rc_t FileDlgFileSelected ( struct KTUIDlg * dlg, file_dlg_data * data, uint32_t selection )
-{
-    rc_t rc = 0;
-    const char * s = KTUIDlgGetWidgetStringByIdx ( dlg, ID_FILES, selection );
-    if ( s != NULL )
-    {
-        /* add path segment from selection */
-        char temp[ 4096 ];
-        size_t written;
-        rc = string_printf ( temp, sizeof temp, &written, "%s/%s", data->current_dir_internal, s );
-        if ( rc == 0 )
-            string_copy_measure ( data->current_dir_internal, sizeof data->current_dir_internal, temp );
-        data->selected = true;
-		data->done = true;
-    }
-    return rc;
-}
-
-
-static rc_t FileDlgEvent ( struct KTUIDlg * dlg, tuidlg_event * dev, file_dlg_data * data )
-{
-    rc_t rc = 0;
-    if ( dev->event_type == ktuidlg_event_select )
-    {
-        switch ( dev->widget_id )
-        {
-            case ID_DIRS     : rc = FileDlgDirectoryChanged( dlg, data, (uint32_t)dev->value_1 ); break;
-            case ID_FILES    : rc = FileDlgFileSelected( dlg, data, (uint32_t)dev->value_1 ); break;
-			
-			case ID_B_OK     : rc = FileDlgFileSelected( dlg, data, KTUIDlgGetWidgetSelectedString( dlg, ID_FILES ) ); break;
-            case ID_B_CANCEL : data->done = true; break;
-        }
-    }
-    return rc;
-}
-
-
-static rc_t FileDlgLoop ( struct KTUIDlg * dlg, file_dlg_data * data )
-{
-    rc_t rc;
-    tui_event event;
-    struct KTUI * tui = KTUIDlgGetTui( dlg );
-
-    KTUIDlgDraw( dlg, false );  /* draw this dialog */
-    do
-    {
-        rc = KTUIGet ( tui, &event );
-        if ( rc == 0 )
-        {
-            rc = KTUIDlgHandleEvent( dlg, &event );
-            if ( rc == 0 )
-            {
-                tuidlg_event dev;
-                do
-                {
-                    rc = KTUIDlgGet ( dlg, &dev );
-                    if ( rc == 0 && dev.event_type != ktuidlg_event_none )
-                        rc = FileDlgEvent( dlg, &dev, data );
-                } while ( rc == 0 && dev.event_type != ktuidlg_event_none );
-            }
-        }
-    } while ( rc == 0 && !is_alpha_key( &event, 27 ) && !data->done );
-    return rc;
-}
-
-
-static rc_t make_dlg_with_bg( struct KTUIDlg ** dlg,
-                              struct KTUIPalette ** pal,
-                              struct KTUI * tui_,
-                              struct KTUIDlg * parent,
-                              tui_rect * r,
-                              KTUI_color bg1,
-                              KTUI_color bg2 )
-{
-    rc_t rc;
-    struct KTUI * tui = tui_;
-    if ( tui == NULL )
-        tui = KTUIDlgGetTui( parent );
-    if ( tui == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcNull );
-    else
-    {
-        rc = KTUIPaletteMake ( pal );
-        if ( rc == 0 )
-        {
-            KTUIPaletteSet_bg ( *pal, ktuipa_dlg, bg1 );
-            KTUIPaletteSet_bg ( *pal, ktuipa_dlg_caption, bg2 );
-            rc = KTUIDlgMake ( tui, dlg, parent, *pal, r );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC FileDlg ( struct KTUI * tui,
-                             struct KTUIDlg * parent,
-                             char * buffer,             /* if empty ... local path */
-                             uint32_t buffer_size,
-                             const char * extension,    /* empty ... all files, "c" ... *.c */
-                             bool * done,               /* user has selected a file */
-                             tui_rect * r,              /* rectangle for dialog */
-                             uint32_t dir_h,            /* how many lines for the directory part */
-                             KTUI_color bg1,
-                             KTUI_color bg2 )
-{
-    struct KTUIPalette * pal;
-    struct KTUIDlg * dlg;
-    rc_t rc = make_dlg_with_bg( &dlg, &pal, tui, parent, r, bg1, bg2 );
-    if ( rc == 0 )
-    {
-        rc = KTUIDlgSetCaption ( dlg, "select file" );
-        if ( rc == 0 )
-        {
-            file_dlg_data data;
-
-            init_dlg_data( &data, r->w, r->h, dir_h, buffer, extension );
-            rc = PopulateFileDlg ( dlg, &data );
-            if ( rc == 0 )
-                FileDlgLoop( dlg, &data );
-
-            if ( done != NULL )
-                *done = data.selected;
-
-            if ( data.selected )
-            {
-                size_t written;
-                internal_to_native( data.vfs_mgr, data.current_dir_internal, buffer, buffer_size, &written );
-            }
-
-            destroy_dlg_data( &data );
-        }
-        KTUIDlgRelease ( dlg );
-        KTUIPaletteRelease ( pal );
-    }
-    return rc;
-}
diff --git a/libs/tui/line_policy.c b/libs/tui/line_policy.c
deleted file mode 100644
index af3e082..0000000
--- a/libs/tui/line_policy.c
+++ /dev/null
@@ -1,379 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-
-#include <tui/tui.h>
-#include "line_policy.h"
-
-#include <sysalloc.h>
-#include <stdlib.h>
-
-
-static void lp_adjust( lp_context * lp )
-{
-    if ( *lp->cur_pos < *lp->offset )
-        *lp->offset = *lp->cur_pos;
-    else if ( *lp->cur_pos >= ( *lp->offset + lp->visible ) )
-        *lp->offset = ( *lp->cur_pos - lp->visible ) + 1;
-    else if ( lp->len == 0 && ( *lp->cur_pos > 0 ) )
-        *lp->cur_pos = 0;
-}
-
-
-static bool lp_alpha( lp_context * lp, char c )
-{
-    bool res = ( lp->len < ( lp->max_len - 1 ) && ( c != 27 ) );
-    if ( res )
-    {
-        if ( *lp->cur_pos < lp->len )
-        {
-            if ( *lp->mode == 0 )
-            {
-                uint64_t idx;
-                lp->line[ lp->len + 1 ] = 0;
-                for ( idx = lp->len; idx > *lp->cur_pos; --idx )
-                lp->line[ idx ] = lp->line[ idx - 1 ];
-            }
-            lp->line[ ( *lp->cur_pos )++ ] = c;
-        }
-        else
-        {
-            lp->line[ ( *lp->cur_pos )++ ] = c;
-            lp->line[ *lp->cur_pos ] = 0;
-            lp->len = string_measure ( lp->line, NULL );
-        }
-        lp_adjust( lp );
-        lp->content_changed = true;
-    }
-    return res;
-}
-
-
-static bool lp_home( lp_context * lp )
-{
-    bool res = ( *lp->cur_pos > 0 );
-    if ( res )
-    {
-        *lp->cur_pos = 0;
-        *lp->offset = 0;
-    }
-    return res;
-}
-
-
-static bool lp_end( lp_context * lp )
-{
-    bool res = ( *lp->cur_pos != lp->len );
-    if ( res )
-    {
-        *lp->cur_pos = lp->len;
-        lp_adjust( lp );
-    }
-    return res;
-}
-
-
-static bool lp_right( lp_context * lp )
-{
-    bool res = ( *lp->cur_pos < lp->len );
-    if ( res )
-    {
-        ( *lp->cur_pos )++;
-        lp_adjust( lp );
-    }
-    return res;
-}
-
-
-static bool lp_left( lp_context * lp )
-{
-    bool res = ( *lp->cur_pos > 0 );
-    if ( res )
-    {
-        ( *lp->cur_pos )--;
-        lp_adjust( lp );
-    }
-    return res;
-}
-
-
-static bool lp_bksp( lp_context * lp )
-{
-    bool res = ( *lp->cur_pos > 0 );
-    if ( res )
-    {
-        if ( *lp->cur_pos < lp->len  )
-        {
-            uint64_t idx;
-            for ( idx = *lp->cur_pos - 1; idx < lp->len; ++idx )
-                lp->line[ idx ] = lp->line[ idx + 1 ];
-            ( *lp->cur_pos )--;
-        }
-        else
-            lp->line[ --( *lp->cur_pos ) ] = 0;
-        lp_adjust( lp );
-        lp->content_changed = true;
-    }
-    return res;
-}
-
-
-static bool lp_del( lp_context * lp )
-{
-    bool res = ( *lp->cur_pos < lp->len  );
-    if ( res  )
-    {
-        uint64_t idx;
-        for ( idx = *lp->cur_pos; idx < lp->len; ++idx )
-            lp->line[ idx ] = lp->line[ idx + 1 ];
-        lp_adjust( lp );
-        lp->content_changed = true;
-    }
-    return res;
-}
-
-
-static bool lp_ins( lp_context * lp )
-{
-    if ( *lp->mode == 0 )
-        *lp->mode = 1;
-    else
-        *lp->mode = 0;
-    return true;
-}
-
-
-bool lp_handle_event( lp_context * lp, tui_event * event )
-{
-    bool res = false;
-    lp->len = string_measure ( lp->line, NULL );
-    if ( event->event_type == ktui_event_kb )
-    {
-        switch( event->data.kb_data.code )
-        {
-            case ktui_home  : res = lp_home( lp ); break;
-            case ktui_end   : res = lp_end( lp ); break;
-            case ktui_left  : res = lp_left( lp ); break;
-            case ktui_right : res = lp_right( lp ); break;
-            case ktui_bksp  : res = lp_bksp( lp ); break;
-            case ktui_del   : res = lp_del( lp ); break;
-            case ktui_ins   : res = lp_ins( lp ); break;
-            case ktui_alpha : res = lp_alpha( lp, event->data.kb_data.key ); break;
-        }
-    }
-    else if ( event->event_type == ktui_event_mouse )
-    {
-        *lp->cur_pos = *lp->offset + event->data.mouse_data.x - 1;
-        lp_adjust( lp );
-        res = true;
-    }
-    return res;
-}
-
-
-/* ****************************************************************************************** */
-
-static void gen_adjust( gen_context * ctx )
-{
-    if ( *ctx->curr >= ctx->count )
-        *ctx->curr = ctx->count - 1;
-
-    if ( *ctx->curr < *ctx->offset )
-        *ctx->offset = *ctx->curr;
-    else if ( *ctx->curr >= ( *ctx->offset + ctx->visible ) )
-        *ctx->offset = *ctx->curr - ctx->visible + 1;
-}
-
-
-static bool gen_home( gen_context * ctx )
-{
-    bool res = ( *ctx->curr > 0 );
-    if ( res )
-    {
-        *ctx->curr = 0;
-        *ctx->offset = 0;
-    }
-    return res;
-}
-
-
-static bool gen_end( gen_context * ctx )
-{
-    bool res = ( *ctx->curr < ctx->count );
-    if ( res )
-    {
-        *ctx->curr = ctx->count - 1;
-        gen_adjust( ctx );
-    }
-    return res;
-}
-
-
-static bool gen_move( gen_context * ctx, int32_t by )
-{
-    bool res = false;
-
-    if ( by < 0 )
-    {
-        res = ( *ctx->curr > 0 );
-        if ( res )
-        {
-            uint32_t dist = -by;
-            if ( *ctx->curr >= dist )
-                *ctx->curr -= dist;
-            else
-                *ctx->curr = 0;
-        }
-    }
-    else if ( by > 0 )
-    {
-        res = ( *ctx->curr < ( ctx->count - 1 ) );
-        if ( res )
-            *ctx->curr += by;
-    }
-
-    if ( res )
-        gen_adjust( ctx );
-    return res;
-}
-
-
-static bool gen_set( gen_context * ctx, uint64_t value )
-{
-    bool res = ( *ctx->curr != value );
-    if ( res )
-    {
-        *ctx->curr = value;
-        gen_adjust( ctx );
-    }
-    return res;
-}
-
-/* ****************************************************************************************** */
-
-
-bool list_handle_event( gen_context * ctx, tui_event * event, uint32_t x_max )
-{
-    bool res = false;
-    if ( event->event_type == ktui_event_kb )
-    {
-        switch( event->data.kb_data.code )
-        {
-            case ktui_home  : res = gen_home( ctx ); break;
-            case ktui_end   : res = gen_end( ctx ); break;
-            case ktui_up    : res = gen_move( ctx, -1 ); break;
-            case ktui_down  : res = gen_move( ctx, 1 ); break;
-            case ktui_pgup  : res = gen_move( ctx, -7 ); break;
-            case ktui_pgdn  : res = gen_move( ctx, 7 ); break;
-        }
-    }
-    else if ( event->event_type == ktui_event_mouse )
-    {
-        uint32_t x = event->data.mouse_data.x;
-        bool flag = ( x_max > 0 ) ? ( x > 0 && x < x_max ) : true;
-        if ( flag )
-        {
-            *ctx->curr = *ctx->offset + event->data.mouse_data.y;
-            res = true;
-        }
-    }
-    return res;
-}
-
-
-/* ****************************************************************************************** */
-
-static bool grid_handle_width( grid_context * gp, tui_event * event, int32_t by )
-{
-    bool res = false;
-    if ( gp->on_get_width != NULL && gp->on_set_width != NULL )
-    {
-        uint64_t col = *( gp->col.curr );
-        int32_t width = gp->on_get_width( col, gp->data );
-        if ( by > 0 )
-        {
-            gp->on_set_width( col, width + by, gp->data );
-            res = true;
-        }
-        else if ( by < 0 )
-        {
-            if ( ( width - 1 ) > ( -by ) )
-            {
-                gp->on_set_width( col, width + by, gp->data );
-                res = true;
-            }
-        }
-    }
-    return res;
-}
-
-static bool grid_handle_alpha( grid_context * gp, tui_event * event )
-{
-    bool res = false;
-    switch( event->data.kb_data.key )
-    {
-        case '+' : res = grid_handle_width( gp, event, +1 ); break;
-        case '-' : res = grid_handle_width( gp, event, -1 ); break;
-    }
-    return res;
-}
-
-bool grid_handle_event( grid_context * gp, tui_event * event )
-{
-    bool res = false;
-
-    if ( event->event_type == ktui_event_kb )
-    {
-        switch( event->data.kb_data.code )
-        {
-            case ktui_home  : res = gen_home( &gp->row ); break;
-            case ktui_end   : res = gen_end( &gp->row ); break;
-            case ktui_up    : res = gen_move( &gp->row, -1 ); break;
-            case ktui_down  : res = gen_move( &gp->row, 1 ); break;
-            case ktui_left  : res = gen_move( &gp->col, -1 ); break;
-            case ktui_right : res = gen_move( &gp->col, 1 ); break;
-            case ktui_pgup  : res = gen_move( &gp->row, -7 ); break;
-            case ktui_pgdn  : res = gen_move( &gp->row, 7 ); break;
-            case ktui_alpha : res = grid_handle_alpha( gp, event ); break;
-        }
-    }
-
-    return res;
-}
-
-
-bool grid_handle_set_col( grid_context * gp, uint64_t col )
-{
-    return gen_set( &gp->col, col );
-}
-
-bool grid_handle_set_row( grid_context * gp, uint64_t row )
-{
-    return gen_set( &gp->row, row );
-}
diff --git a/libs/tui/line_policy.h b/libs/tui/line_policy.h
deleted file mode 100644
index e7efe28..0000000
--- a/libs/tui/line_policy.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_line_policy_
-#define _h_line_policy_
-
-#include <tui/tui.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-typedef struct lp_context
-{
-    char * line;
-    uint64_t len, max_len, visible;
-    uint64_t * cur_pos;
-    uint64_t * offset;
-    uint64_t * mode;
-    bool content_changed;
-} lp_context;
-
-
-bool lp_handle_event( lp_context * lp, tui_event * event );
-
-
-typedef struct gen_context
-{
-    uint64_t count, visible;
-    uint64_t * curr;
-    uint64_t * offset;
-} gen_context;
-
-
-bool list_handle_event( gen_context * ctx, tui_event * event, uint32_t x_max );
-
-
-typedef uint32_t ( CC * grid_ctx_get_width ) ( uint64_t col, void * data );
-typedef void ( CC * grid_ctx_set_width ) ( uint64_t col, uint32_t value, void * data );
-
-typedef struct grid_context
-{
-    void * data;
-    grid_ctx_get_width on_get_width;
-    grid_ctx_set_width on_set_width;
-
-    gen_context row;
-    gen_context col;
-} grid_context;
-
-
-bool grid_handle_event( grid_context * gp, tui_event * event );
-
-bool grid_handle_set_col( grid_context * gp, uint64_t col );
-bool grid_handle_set_row( grid_context * gp, uint64_t row );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_line_policy_ */
diff --git a/libs/tui/linux/systui.c b/libs/tui/linux/systui.c
deleted file mode 100644
index 1b29124..0000000
--- a/libs/tui/linux/systui.c
+++ /dev/null
@@ -1,624 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*--------------------------------------------------------------------------
- * KTUI = Text User Interface ( different from GUI ... )
- *  platform specific code ... this one for linux
- */
-
-#include <tui/extern.h>
-#include <tui/tui.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <sysalloc.h>
-
-
-#ifndef __USE_UNIX98
-#define __USE_UNIX98 1
-#endif
-
-#include "../tui-priv.h"
-
-#include <unistd.h>
-#include <sys/ioctl.h>
-#include <termios.h>
-#include <signal.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <stdlib.h>
-#include <errno.h>
-#include <assert.h>
-
-typedef uint32_t es_states;
-enum
-{
-    es_normal,
-    es_ESC,
-
-    es_ESC_91,
-    es_ESC_91_49,
-    es_ESC_91_49_49,
-    es_ESC_91_49_50,
-    es_ESC_91_49_51,
-    es_ESC_91_49_52,
-    es_ESC_91_49_53,
-    es_ESC_91_49_55,
-    es_ESC_91_49_56,
-    es_ESC_91_49_57,
-
-    es_ESC_91_50,
-    es_ESC_91_50_48,
-    es_ESC_91_50_49,
-    es_ESC_91_50_51,
-    es_ESC_91_50_52,
-
-    es_ESC_91_51,
-    es_ESC_91_52,
-    es_ESC_91_53,
-    es_ESC_91_54,
-
-    es_ESC_91_77_B,
-    es_ESC_91_77_X,
-    es_ESC_91_77_Y,
-
-    es_ESC_79
-};
-
-
-/**********************************************************************************/
-
-static int color_2_ansi( KTUI_color c )
-{
-    int res = 0;
-    switch( c )
-    {
-        case KTUI_c_black           : res = 0;  break;
-        case KTUI_c_gray            : res = 8;  break;
-
-        case KTUI_c_dark_red        : res = 1;  break;    
-        case KTUI_c_red             : res = 9;  break;
-
-        case KTUI_c_green           : res = 10;  break;
-        case KTUI_c_dark_green      : res = 2; break;
-
-        case KTUI_c_brown           : res = 3;  break;
-        case KTUI_c_yellow          : res = 11; break;
-
-        case KTUI_c_dark_blue       : res = 4;  break;
-        case KTUI_c_blue            : res = 12; break;
-
-        case KTUI_c_dark_magenta    : res = 5;  break;
-        case KTUI_c_magenta         : res = 13; break;
-
-        case KTUI_c_dark_cyan       : res = 6;  break;
-        case KTUI_c_cyan            : res = 14; break;
-
-        case KTUI_c_light_gray      : res = 7;  break;
-        case KTUI_c_white           : res = 15; break;
-    }
-    return res;
-}
-
-
-/**********************************************************************************/
-
-
-static void set_tui_attrib( tui_ac * curr, KTUI_attrib attr )
-{
-    if ( curr->attr != attr )
-    {
-        printf( "\033[0m" ); /* reset attribute, that means also color is default now! */
-        curr->fg = -1;       /* because of that we have to force the re-emission of color */
-        curr->bg = -1;
-
-        if ( attr & KTUI_a_bold )
-            printf( "\033[1m" );
-        if ( attr & KTUI_a_underline )
-            printf( "\033[4m" );
-        if ( attr & KTUI_a_blink )
-            printf( "\033[5m" );
-        if ( attr & KTUI_a_inverse )
-            printf( "\033[7m" );
-
-        curr->attr = attr;
-    }
-}
-
-
-static void set_tui_fg_color( tui_ac * curr, KTUI_color color )
-{
-    if ( curr->fg != color )
-    {
-        printf( "\033[38;5;%dm", color_2_ansi( color ) );
-        curr->fg = color;
-    }
-}
-
-
-static void set_tui_bg_color( tui_ac * curr, KTUI_color color )
-{
-    if ( curr->bg != color )
-    {
-        printf( "\033[48;5;%dm", color_2_ansi( color ) );
-        curr->bg = color;
-    }
-}
-
-
-void CC tui_send_strip( int x, int y, int count, tui_ac * curr, tui_ac * v,
-                        const char * s )
-{
-    set_tui_attrib( curr, v->attr );
-    set_tui_fg_color( curr, v->fg );
-    set_tui_bg_color( curr, v->bg );
-    printf( "\033[%d;%dH%.*s",  y + 1, x + 1, count, s );
-    fflush( stdout );
-}
-
-
-/**********************************************************************************/
-
-typedef struct KTUI_pf
-{
-/*    struct termios stored_settings; */
-    struct termio stored_settings;
-    struct sigaction sa_saved;
-    es_states es;
-    unsigned int mouse_event, mouse_x;
-} KTUI_pf;
-
-
-static struct KTUI * sig_self = NULL;
-
-
-static void get_lines_cols( int * cols, int * lines )
-{
-    struct winsize ws;
-    ioctl( STDIN_FILENO, TIOCGWINSZ, &ws );
-    if ( lines != NULL )
-        *lines = ws.ws_row;
-    if ( cols != NULL )
-        *cols = ws.ws_col;
-}
-
-
-static void sigwinchHandler( int sig )
-{
-    if ( sig_self != NULL )
-    {
-        get_lines_cols( &sig_self->cols, &sig_self->lines );
-        put_window_event( sig_self, sig_self->cols, sig_self->lines );
-    }
-}
-
-
-static void set_kb_raw_mode( struct termio * stored_settings )
-{
-    struct termio new_settings;
-    ioctl( STDIN_FILENO, TCGETA, stored_settings );
-    memcpy ( &new_settings, stored_settings, sizeof new_settings );
-    new_settings.c_lflag &= ( ~ICANON );    /* exit canonical mode, enter raw mode */
-    new_settings.c_lflag &= ( ~ECHO );      /* don't echo the character */
-    new_settings.c_lflag &= ( ~IEXTEN );    /* don't enable extended input character processing */
-    new_settings.c_lflag &= ( ~ISIG );      /* don't automatically handle control-C */
-    new_settings.c_cc[ VTIME ] = 1;         /* timeout (tenths of a second) */
-    new_settings.c_cc[ VMIN ] = 0;          /* minimum number of characters */
-    ioctl( STDIN_FILENO, TCSETA, &new_settings ); /* apply the new settings */
-}
-
-
-static void restore_kb_mode( const struct termio * stored_settings )
-{
-    /* applies the terminal settings supplied as the argument */
-    ioctl( STDIN_FILENO, TCSETA, stored_settings );
-}
-
-
-rc_t CC KTUI_Init_platform( KTUI * self )
-{
-    rc_t rc = 0;
-    struct KTUI_pf * pf = malloc( sizeof * pf );
-    if ( pf == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcMemory, rcExhausted );
-    else
-    {
-        struct sigaction sa_new;
-
-        set_kb_raw_mode( &pf->stored_settings );
-        sa_new.sa_flags = 0;
-        sa_new.sa_handler = sigwinchHandler;
-        sigaction( SIGWINCH, &sa_new, &pf->sa_saved );
-        get_lines_cols( &self->cols, &self->lines );
-        pf->es = es_normal;
-
-        printf( "\033[2J" );        /* clrscr */
-        printf( "\033[?25l" );      /* cursor off */
-
-        /* printf( "\033[?9h" );     mouse tracking on ( SET_X10_MOUSE ): mouse-down events, does not work with putty */
-		
-		printf( "\033[?1000h" );     /* mouse tracking on ( SET_VT200_MOUSE ): mouse-up/down events, does work with putty */
-		printf( "\033[?1002h" );     /* mouse tracking on ( SET_BTN_EVENT_MOUSE ): mouse-up/down/move events, does work with putty */
-		/*printf( "\033[?1003h" );   mouse tracking on ( SET_ANY_EVENT_MOUSE ): ??? */
-		
-        fflush( stdout );
-
-        sig_self = self;
-        self->pf = pf;
-    }
-    return rc;
-}
-
-
-rc_t CC KTUI_Destroy_platform ( struct KTUI_pf * pf )
-{
-    if ( pf != NULL )
-    {
-        restore_kb_mode( &pf->stored_settings );
-        sigaction( SIGWINCH, &pf->sa_saved, NULL );
-        free( ( void * ) pf );
-    }
-
-    sig_self = NULL;
-    printf( "\033[0;39;49m" );  /* reset colors */
-    printf( "\033[H" );         /* home */
-    printf( "\033[2J" );        /* clrscr */
-    printf( "\033[?25h" );      /* cursor off */
-
-    /*printf( "\033[?9l" );       mouse tracking X10-style off */
-	printf( "\033[?1000l" );       /* mouse tracking off */	
-	printf( "\033[?1002l" );       /* mouse tracking off */		
-	/*printf( "\033[?1003l" );    mouse tracking off */	
-    fflush( stdout );
-
-    return 0;
-}
-
-
-static void put_kb_event_u( struct KTUI * self, int key, KTUI_key code )
-{
-    if ( self->pf != NULL ) self->pf->es = es_normal;
-    put_kb_event( self, key, code );
-}
-
-
-static void put_kb_alpha( struct KTUI * self, int key )
-{
-    put_kb_event_u( self, key, ktui_alpha );
-}
-
-static void put_kb_alpha_3( struct KTUI * self, int key1, int key2, int key3 )
-{
-    put_kb_alpha( self, key1 );
-    put_kb_alpha( self, key2 );
-    put_kb_alpha( self, key3 );
-}
-
-static void put_kb_alpha_4( struct KTUI * self, int key1, int key2, int key3, int key4 )
-{
-    put_kb_alpha( self, key1 );
-    put_kb_alpha( self, key2 );
-    put_kb_alpha( self, key3 );
-    put_kb_alpha( self, key4 );
-}
-
-static void put_kb_alpha_5( struct KTUI * self, int key1, int key2, int key3, int key4, int key5 )
-{
-    put_kb_alpha( self, key1 );
-    put_kb_alpha( self, key2 );
-    put_kb_alpha( self, key3 );
-    put_kb_alpha( self, key4 );
-    put_kb_alpha( self, key5 );
-}
-
-
-/* -------------------------------------------------------------------------------------
-
-mouse_event	7 6 5 4 3 2 1 0
-						B B
-						0 0 ... left mouse button
-						0 1 ... middle mouse button
-						1 0 ... right mouse button
-						1 1 ... button up ( don't know which one )
-                      S ....... status of Shift key						0x04
-                    M ......... status of Meta key ( Alt )				0x08
-                  C ........... status of Ctrl key						0x10 (16)
-			  0 0 ............. unknown									0x00
-              0 1 ............. button event ( down, up )				0x20
-              1 0 ............. move event ( + button )					0x40
-              1 1 ............. scroll event ( + button )				0x60
-			  
-------------------------------------------------------------------------------------- */
-static void put_mouse_event_u( struct KTUI * self, unsigned int y )
-{
-    if ( self->pf != NULL )
-    {
-		unsigned int ev = self->pf->mouse_event;
-		KTUI_mouse_button b = ktui_mouse_button_none;
-		KTUI_mouse_action a = ktui_mouse_action_none;
-
-		switch( ev & 0x03 )
-		{
-			case 0x00 : b = ktui_mouse_button_left; break;
-			case 0x01 : b = ktui_mouse_button_middle; break;
-			case 0x02 : b = ktui_mouse_button_right; break;
-			case 0x03 : b = ktui_mouse_button_up; break;
-		}
-		
-		switch ( ev & 0x60 )
-		{
-			case 0x20 : a = ktui_mouse_action_button; break;
-			case 0x40 : a = ktui_mouse_action_move; break;
-			case 0x60 : a = ktui_mouse_action_scroll; break;
-		}
-
-		put_mouse_event( self, self->pf->mouse_x, y, b, a, ev );
-        self->pf->es = es_normal;
-    }
-}
-
-static void statemachine( struct KTUI * self, unsigned int x )
-{
-    if ( self->pf != NULL ) switch( self->pf->es )
-    {
-        case es_normal : switch( x )
-                        {
-                            case 10 : put_kb_event_u( self, x, ktui_enter ); break;
-                            case 8  : put_kb_event_u( self, x, ktui_bksp ); break;
-                            case 9  : put_kb_event_u( self, x, ktui_tab ); break;
-                            case 127 : put_kb_event_u( self, x, ktui_bksp ); break;
-                            case 27 : self->pf->es = es_ESC; break;
-                            default : put_kb_alpha( self, x ); break;
-                        } break;
-
-        case es_ESC : switch( x )
-                        {
-                            case 91 : self->pf->es = es_ESC_91; break;
-                            case 79 : self->pf->es = es_ESC_79; break;
-                            default : put_kb_alpha( self, x ); break;
-                        } break;
-
-        case es_ESC_91 : switch( x )
-                        {
-                            case 65 : put_kb_event_u( self, x, ktui_up ); break;
-                            case 66 : put_kb_event_u( self, x, ktui_down ); break;
-                            case 67 : put_kb_event_u( self, x, ktui_right ); break;
-                            case 68 : put_kb_event_u( self, x, ktui_left ); break;
-                            case 69 : put_kb_alpha( self, '5' ); break;
-                            case 70 : put_kb_event_u( self, x, ktui_end ); break;
-                            case 72 : put_kb_event_u( self, x, ktui_home ); break;
-
-                            case 49 : self->pf->es = es_ESC_91_49; break;
-                            case 50 : self->pf->es = es_ESC_91_50; break;
-                            case 51 : self->pf->es = es_ESC_91_51; break;
-                            case 52 : self->pf->es = es_ESC_91_52; break;
-                            case 53 : self->pf->es = es_ESC_91_53; break;
-                            case 54 : self->pf->es = es_ESC_91_54; break;
-
-                            case 77 : self->pf->es = es_ESC_91_77_B; break;   /* mouse reporting */
-
-                            case 90 : put_kb_event_u( self, x, ktui_shift_tab ); break; /* shift tab */
-
-                            default : put_kb_alpha_3( self, 27, 91, x ); break;
-                        } break;
-
-        case es_ESC_91_49 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_home ); break;
-                            case 49  : self->pf->es = es_ESC_91_49_49; break;
-                            case 50  : self->pf->es = es_ESC_91_49_50; break;
-                            case 51  : self->pf->es = es_ESC_91_49_51; break;
-                            case 52  : self->pf->es = es_ESC_91_49_52; break;
-                            case 53  : self->pf->es = es_ESC_91_49_53; break;
-                            case 55  : self->pf->es = es_ESC_91_49_55; break;
-                            case 56  : self->pf->es = es_ESC_91_49_56; break;
-                            case 57  : self->pf->es = es_ESC_91_49_57; break;
-                            default : put_kb_alpha_4( self, 27, 91, 49, x ); break;
-                        } break;
-
-        case es_ESC_91_49_49 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F1 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 49, x ); break;
-                        } break;
-
-        case es_ESC_91_49_50 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F2 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 50, x ); break;
-                        } break;
-
-        case es_ESC_91_49_51 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F3 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 51, x ); break;
-                        } break;
-
-        case es_ESC_91_49_52 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F4 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 52, x ); break;
-                        } break;
-
-        case es_ESC_91_49_53 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F5 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 53, x ); break;
-                        } break;
-
-        case es_ESC_91_49_55 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F6 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 55, x ); break;
-                        } break;
-
-        case es_ESC_91_49_56 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F7 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 56, x ); break;
-                        } break;
-
-        case es_ESC_91_49_57 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F8 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 49, 57, x ); break;
-                        } break;
-
-        case es_ESC_91_50 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_ins ); break;
-                            case 48 : self->pf->es = es_ESC_91_50_48; break;
-                            case 49 : self->pf->es = es_ESC_91_50_49; break;
-                            case 51 : self->pf->es = es_ESC_91_50_51; break;
-                            case 52 : self->pf->es = es_ESC_91_50_52; break;
-                            default : put_kb_alpha_4( self, 27, 91, 50, x ); break;
-                        } break;
-
-        case es_ESC_91_50_48 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F9 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 50, 48, x ); break;
-                        } break;
-
-        case es_ESC_91_50_49 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F10 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 50, 49, x ); break;
-                        } break;
-
-        case es_ESC_91_50_51 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F11 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 50, 51, x ); break;
-                        } break;
-
-        case es_ESC_91_50_52 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_F12 ); break;
-                            default : put_kb_alpha_5( self, 27, 91, 50, 52, x ); break;
-                        } break;
-
-        case es_ESC_91_51 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_del ); break;
-                            default : put_kb_alpha_4( self, 27, 91, 51, x ); break;
-                        } break;
-
-        case es_ESC_91_52 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_end ); break;
-                            default : put_kb_alpha_4( self, 27, 91, 52, x ); break;
-                        } break;
-
-        case es_ESC_91_53 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_pgup ); break;
-                            default : put_kb_alpha_4( self, 27, 91, 53, x ); break;
-                        } break;
-
-        case es_ESC_91_54 : switch( x )
-                        {
-                            case 126 : put_kb_event_u( self, x, ktui_pgdn ); break;
-                            default : put_kb_alpha_4( self, 27, 91, 54, x ); break;
-                        } break;
-
-        case es_ESC_79 : switch( x )
-                        {
-                            case 80 : put_kb_event_u( self, x, ktui_F1 ); break;
-                            case 81 : put_kb_event_u( self, x, ktui_F2 ); break;
-                            case 82 : put_kb_event_u( self, x, ktui_F3 ); break;
-                            case 83 : put_kb_event_u( self, x, ktui_F4 ); break;
-                            case 77 : put_kb_event_u( self, x, ktui_enter ); break;
-                            case 65 : put_kb_event_u( self, x, ktui_up ); break;
-                            case 66 : put_kb_event_u( self, x, ktui_down ); break;
-                            case 67 : put_kb_event_u( self, x, ktui_right ); break;
-                            case 68 : put_kb_event_u( self, x, ktui_left ); break;
-
-                            case 70 : put_kb_event_u( self, x, ktui_end ); break;
-                            case 72 : put_kb_event_u( self, x, ktui_home ); break;
-
-                            case 119 : put_kb_alpha( self, '7' ); break;
-                            case 120 : put_kb_alpha( self, '8' ); break;
-                            case 121 : put_kb_alpha( self, '9' ); break;
-                            case 116 : put_kb_alpha( self, '4' ); break;
-                            case 117 : put_kb_alpha( self, '5' ); break;
-                            case 118 : put_kb_alpha( self, '6' ); break;
-                            case 113 : put_kb_alpha( self, '1' ); break;
-                            case 114 : put_kb_alpha( self, '2' ); break;
-                            case 115 : put_kb_alpha( self, '3' ); break;
-                            case 112 : put_kb_alpha( self, '0' ); break;
-                            case 110 : put_kb_alpha( self, '.' ); break;
-
-                            default : put_kb_alpha_3( self, 27, 79, x ); break;
-                        } break;
-
-        case es_ESC_91_77_B :   self->pf->mouse_event = x;
-                                self->pf->es = es_ESC_91_77_X;
-                                break;
-
-        case es_ESC_91_77_X :   self->pf->mouse_x = x - 33;
-                                self->pf->es = es_ESC_91_77_Y;
-                                break;
-
-        case es_ESC_91_77_Y :  put_mouse_event_u( self, x - 33 ); break;
-
-        default : self->pf->es = es_normal; break;
-    }
-
-}
-
-void CC read_from_stdin( struct KTUI * self, uint32_t timeout )
-{
-    fd_set rfds;
-    struct timeval tv;
-    int select_res;
-
-    FD_ZERO( &rfds );
-    FD_SET ( STDIN_FILENO, &rfds );
-    tv.tv_sec  = 0;
-    tv.tv_usec = timeout;
-
-    select_res = select( 1, &rfds, NULL, NULL, &tv );
-    if ( select_res < 0 )
-    {
-        /* error ... */
-    }
-    else if ( select_res == 0 )
-    {
-        /* no input during timeout... */
-    }
-    else
-    {
-        unsigned char in_buffer[ 32 ];
-        int i, n = read( STDIN_FILENO, in_buffer, sizeof in_buffer );
-        for ( i = 0; i < n; ++i )
-        {
-            unsigned int x = ( unsigned int ) in_buffer[ i ];
-            statemachine( self, x );
-        }
-    }
-}
diff --git a/libs/tui/screen.c b/libs/tui/screen.c
deleted file mode 100644
index d7b38a4..0000000
--- a/libs/tui/screen.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "screen.h"
-#include "tui-priv.h"
-#include <tui/tui.h>
-#include <sysalloc.h>
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-
-void CC clr_tui_screen( tui_screen * screen, const tui_ac * v, bool dirty )
-{
-    int line_idx;
-    for ( line_idx = 0; line_idx < LINES_PER_SCREEN; ++line_idx )
-    {
-        int column;
-        tui_line * line = &screen->lines[ line_idx ];
-        memset( &line->chars[ 0 ], ' ', CHR_PER_LINE );
-        for ( column = 0; column < CHR_PER_LINE; ++column )
-        {
-            tui_ac * ac = &line->ac[ column ];
-            ac->fg = v->fg;
-            ac->bg = v->bg;
-            ac->attr = v->attr;
-            line->dirty[ column ] = dirty;
-        }
-        line->line_dirty = dirty;
-    }
-    screen->dirty = dirty;
-}
-
-
-void CC print_into_screen( tui_screen * screen, int x, int y, const tui_ac * v,
-                           const char * s, uint32_t l )
-{
-    if ( y < LINES_PER_SCREEN && x < CHR_PER_LINE )
-    {
-        tui_line * line = &screen->lines[ y ];
-        uint32_t column, idx, sl = string_measure ( s, NULL );
-        bool any_chars_dirty = false;
-        if ( l > CHR_PER_LINE ) l =CHR_PER_LINE;
-        if ( x + l > CHR_PER_LINE ) l = ( CHR_PER_LINE - x );
-        if ( sl > l ) sl = l;
-        if ( x + sl > CHR_PER_LINE ) sl = ( CHR_PER_LINE - x );
-
-        for ( column = x, idx = 0; idx < sl; ++column, ++idx )
-        {
-            tui_ac * ac = &line->ac[ column ];
-            if ( ac->attr != v->attr ||
-                 ac->fg != v->fg ||
-                 ac->bg != v->bg ||
-                 line->chars[ column ] != s[ idx ] )
-            {
-                ac->attr = v->attr;
-                ac->fg = v->fg;
-                ac->bg = v->bg;
-                line->chars[ column ] = s[ idx ];
-                line->dirty[ column ] = true;
-                any_chars_dirty = true;
-            }
-        }
-
-        if ( sl < l )
-        {
-            for ( column = x + sl, idx = sl; idx < l; ++column, ++idx )
-            {
-                tui_ac * ac = &line->ac[ column ];
-                if ( ac->attr != v->attr ||
-                     ac->fg != v->fg ||
-                     ac->bg != v->bg ||
-                     line->chars[ column ] != ' ' )
-                {
-                    ac->attr = v->attr;
-                    ac->fg = v->fg;
-                    ac->bg = v->bg;
-                    line->chars[ column ] = ' ';
-                    line->dirty[ column ] = true;
-                    any_chars_dirty = true;
-                }
-            }
-        }
-
-        if ( any_chars_dirty )
-        {
-            line->line_dirty = true;
-            screen->dirty = true;
-        }
-    }
-}
-
-
-void CC paint_into_screen( tui_screen * screen, const tui_rect * r,
-                           const tui_ac * v, const char c )
-{
-    int x = r->top_left.x;
-    int y = r->top_left.y;
-    if ( y < LINES_PER_SCREEN && x < CHR_PER_LINE )
-    {
-        int line_idx, h1 = r->h;
-        if ( ( y + r->h ) > LINES_PER_SCREEN ) h1 = ( LINES_PER_SCREEN - y );
-        for ( line_idx = 0; line_idx < h1; ++line_idx )
-        {
-            int column, w1 = r->w;
-            tui_line * line = &screen->lines[ y + line_idx ];
-            if ( ( x + r->w ) > CHR_PER_LINE ) w1 = ( CHR_PER_LINE - x );
-            for ( column = 0; column < w1; ++column )
-            {
-                int col_idx = x + column;
-                tui_ac * ac = &line->ac[ col_idx ];
-                if ( ac->attr != v->attr ||
-                     ac->fg != v->fg ||
-                     ac->bg != v->bg ||
-                     line->chars[ col_idx ] != c )
-                {
-                    ac->attr = v->attr;
-                    ac->fg = v->fg;
-                    ac->bg = v->bg;
-                    line->chars[ col_idx ] = c;
-                    line->dirty[ col_idx ] = true;
-                }
-            }
-            line->line_dirty = true;
-        }
-        screen->dirty = true;
-    }
-}
-
-
-void CC send_tui_screen( tui_screen * screen, int n_lines, int n_cols )
-{
-    if ( screen->dirty )
-    {
-        int line_idx;
-        for ( line_idx = 0; line_idx < n_lines; ++line_idx )
-        {
-            tui_line * line = &screen->lines[ line_idx ];
-            if ( line->line_dirty )
-            {
-                tui_ac curr = { -1, -1, -1 };
-                int column, start = -1;
-                for ( column = 0; column < n_cols; ++column )
-                {
-                    if ( start < 0 )
-                    {
-                        if ( line->dirty[ column ] )
-                            start = column;
-                    }
-                    else
-                    {
-                        tui_ac * ac = &line->ac[ start ];
-                        tui_ac * cc = &line->ac[ column ];
-                        if ( !line->dirty[ column ] ||
-                              ac->fg != cc->fg ||
-                              ac->bg != cc->bg || 
-                              ac->attr != cc->attr )
-                        {
-                            int count = ( column - start );
-                            /* in systui.c ==> platform specific */
-                            tui_send_strip( start, line_idx, count,
-                                            &curr, ac, &line->chars[ start ] );
-
-                            if ( line->dirty[ column ] )
-                                start = column;
-                            else
-                                start = -1;
-                        }
-                    }
-                    line->dirty[ column ] = false;
-                }
-
-                if ( start >= 0 )
-                {
-                    int count = ( n_cols - start );
-                    /* in systui.c ==> platform specific */
-                    tui_send_strip( start, line_idx, count,
-                                    &curr, &line->ac[ start ], &line->chars[ start ] );
-                }
-                line->line_dirty = false;
-            }
-        }
-        screen->dirty = false;
-    }
-}
diff --git a/libs/tui/screen.h b/libs/tui/screen.h
deleted file mode 100644
index 547d29e..0000000
--- a/libs/tui/screen.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_screen_
-#define _h_screen_
-
-#ifndef _h_tui_extern_
-#include <tui/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <tui/tui.h>
-
-#define CHR_PER_LINE 1000
-
-typedef struct tui_line
-{
-    char chars[ CHR_PER_LINE ];
-    tui_ac ac[ CHR_PER_LINE ];  /* attrib and color */
-    bool dirty[ CHR_PER_LINE ];
-    bool line_dirty;
-} tui_line;
-
-#define LINES_PER_SCREEN 200
-
-typedef struct tui_screen
-{
-    tui_line lines[ LINES_PER_SCREEN ];
-    bool dirty;
-} tui_screen;
-
-
-void CC clr_tui_screen( tui_screen * screen, const tui_ac * v, bool dirty );
-
-void CC print_into_screen( tui_screen * screen, int x, int y, const tui_ac * v, const char * s, uint32_t l );
-
-void CC paint_into_screen( tui_screen * screen, const tui_rect * r, const tui_ac * v, const char c );
-
-void CC send_tui_screen( tui_screen * screen, int n_lines, int n_cols );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_screen */
diff --git a/libs/tui/string_cache.c b/libs/tui/string_cache.c
deleted file mode 100644
index c30f85c..0000000
--- a/libs/tui/string_cache.c
+++ /dev/null
@@ -1,378 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "string_cache.h"
-#include <klib/text.h>
-
-#include <sysalloc.h>
-
-typedef struct cache_row
-{
-    char ** cells;
-    int * cell_idx;
-    int cell_count;
-    int nxt_free_ptr;
-} cache_row;
-
-
-static cache_row * make_cache_row( int count )
-{
-    cache_row * res = malloc( sizeof *res );
-    if ( res != NULL )
-    {
-        res->cells = calloc( sizeof( char * ), count );
-        if ( res->cells != NULL )
-        {
-            res->cell_idx = malloc( sizeof( int ) * count );
-            if ( res->cell_idx != NULL )
-            {
-                int i;
-                for ( i = 0; i < count; ++i ) res->cell_idx[ i ] = -1;
-                res->cell_count = count;
-                res->nxt_free_ptr = 0;
-            }
-            else
-            {
-                free( res->cells );
-                free( res );
-                res = NULL;
-            }
-        }
-        else
-        {
-            free( res );
-            res = NULL;
-        }
-    }
-    return res;
-}
-
-
-static void release_cache_row( cache_row * cr )
-{
-    if ( cr != NULL )
-    {
-        if ( cr->cells != NULL )
-        {
-            int i;
-            for ( i = 0; i < cr->cell_count; ++i )
-            {
-                char * s = cr->cells[ i ];
-                if ( s != NULL ) free( s );
-            }
-            free( cr->cells );
-        }
-        if ( cr->cell_idx != NULL ) free( cr->cell_idx );
-        free( cr );
-    }
-}
-
-
-static const char * get_cell_from_cache_row( cache_row * cr, int idx )
-{
-    const char * res = NULL;
-    if ( cr != NULL )
-    {
-        if ( idx < cr->cell_count )
-        {
-            int ptr_idx = cr->cell_idx[ idx ];
-            if ( ptr_idx >= 0 && ptr_idx < cr->cell_count )
-                res = cr->cells[ ptr_idx ];
-        }
-    }
-    return res;
-}
-
-
-static int put_cell_to_cache_row( cache_row * cr, int idx, const char * s )
-{
-    int res = 0;
-    if ( cr != NULL )
-    {
-        if ( idx < cr->cell_count )
-        {
-            int ptr_idx = cr->cell_idx[ idx ];
-            if ( ptr_idx >= 0 )
-            {
-                /* cell is already used... */
-                char * s_ = cr->cells[ ptr_idx ];
-                if ( s_ != NULL ) free( s_ );
-                cr->cells[ ptr_idx ] = ( s != NULL ) ? string_dup_measure ( s, NULL ) : NULL;
-                res++;
-            }
-            else if ( cr->nxt_free_ptr < cr->cell_count )
-            {
-                /* cell is not already used, get the next free space */
-                
-                ptr_idx = cr->nxt_free_ptr++;
-                cr->cells[ ptr_idx ] = ( s != NULL ) ? string_dup_measure ( s, NULL ) : NULL;
-                cr->cell_idx[ idx ] = ptr_idx;
-                res++;
-            }
-        }
-    }
-    return res;
-}
-
-
-static void clear_cache_row( cache_row * cr )
-{
-    if ( cr != NULL )
-    {
-        int i;
-        for ( i = 0; i < cr->cell_count; ++i )
-        {
-            if ( cr->cells[ i ] != NULL ) free( cr->cells[ i ] );
-            cr->cells[ i ] = NULL;
-            cr->cell_idx[ i ] = -1;
-        }
-        cr->nxt_free_ptr = 0;
-    }
-}
-
-
-/* ----------------------------------------------------------------------------------------------------- */
-
-
-typedef struct string_cache
-{
-    cache_row ** rows;
-    long long int row_offset;
-    int row_count;
-} string_cache;
-
-
-static void release_string_cache_rows( cache_row ** rows, int count )
-{
-    int i;
-    for ( i = 0; i < count; ++i )
-    {
-        if ( rows[ i ] != NULL )
-            release_cache_row( rows[ i ] ); 
-    }
-    free( rows );
-}
-
-
-string_cache * make_string_cache( int row_count, int col_count )
-{
-    string_cache * res = malloc( sizeof *res );
-    if ( res != NULL )
-    {
-        res->rows = calloc( sizeof( *res->rows ), row_count );
-        if ( res->rows != NULL )
-        {
-            int i, ok;
-            for ( i = 0, ok = 1; i < row_count && ok; ++i )
-            {
-                res->rows[ i ] = make_cache_row( col_count );
-                if ( res->rows[ i ] == NULL )
-                    ok = 0;
-            }
-            if ( ok )
-            {
-                res->row_count = row_count;
-                res->row_offset = 0;
-            }
-            else
-            {
-                release_string_cache_rows( res->rows, row_count );
-                free( res );
-                res = NULL;
-            }
-        }
-        else
-        {
-            free( res );
-            res = NULL;
-        }
-    }
-    return res;
-}
-
-
-void release_string_cache( string_cache * sc )
-{
-    if ( sc != NULL )
-    {
-        if ( sc->rows != NULL )
-            release_string_cache_rows( sc->rows, sc->row_count );
-        free( sc );
-    }
-}
-
-
-int get_string_cache_rowcount( const string_cache * sc )
-{
-    if ( sc != NULL )
-        return sc->row_count;
-    else
-        return 0;
-}
-
-
-long long int get_string_cache_start( const string_cache * sc )
-{
-    if ( sc != NULL )
-        return sc->row_offset;
-    else
-        return 0;
-}
-
-
-const char * get_cell_from_string_cache( const string_cache * sc, long long int row, int col )
-{
-    const char * res = NULL;
-    if ( sc != NULL )
-    {
-        long long int temp_idx = ( row - sc->row_offset );
-        if ( temp_idx >= 0 && temp_idx < sc->row_count )
-            res = get_cell_from_cache_row( sc->rows[ temp_idx ], col );
-    }
-    return res;
-}
-
-
-static void invalidate_string_cache_from_to( string_cache * sc, int from, int count )
-{
-    if ( sc != NULL )
-        if ( sc->rows != NULL )
-        {
-            int i;
-            for ( i = 0; i < count; ++i )
-                clear_cache_row( sc->rows[ i + from ] );
-        }
-}
-
-
-static void reverse_cache_rows( cache_row ** rows, int start, int count )
-{
-    int end = start + count - 1;
-    while ( start < end )
-    {
-        cache_row * temp = rows[ start ];
-        rows[ start ] = rows[ end ];
-        rows[ end ] = temp;
-        start++;
-        end--;
-    }
-}
-
-
-static void rotate_cache_rows_up( cache_row ** rows, int pivot, int count )
-{
-    reverse_cache_rows( rows, 0, count );
-    reverse_cache_rows( rows, 0, pivot );
-    reverse_cache_rows( rows, pivot, count - pivot );
-}
-
-
-static void rotate_cache_rows_down( cache_row ** rows, int pivot, int count )
-{
-    reverse_cache_rows( rows, 0, pivot );
-    reverse_cache_rows( rows, pivot, count - pivot );
-    reverse_cache_rows( rows, 0, count );
-}
-
-
-void invalidate_string_cache( string_cache * sc )
-{
-    invalidate_string_cache_from_to( sc, 0, sc->row_count );
-}
-
-
-int put_cell_to_string_cache( string_cache * sc, long long int row, int col, const char * s )
-{
-    int res = 0;
-    if ( sc != NULL )
-    {
-        if ( row < sc->row_offset && row >= 0 )
-        {
-            /* ====================================================================================== */
-            /* access is before the current window: decide if we can shift or need a full invalidation */
-
-            long long int distance = ( sc->row_offset - row );
-            /* printf( "-- before window ( distance = %lld ) --\n", distance ); */
-            if ( distance >= sc->row_count )
-            {
-                /* ===> */
-                /* jumping out of the cache content: full invalidation */
-                /* printf( "-- full invalidation of cache --\n" ); */
-
-                invalidate_string_cache_from_to( sc, 0, sc->row_count );
-                sc->row_offset = row;
-                res = put_cell_to_cache_row( sc->rows[ 0 ], col, s );
-            }
-            else
-            {
-                /* ===> */
-                /* some content can still be used: rotate and partial invalidation */
-                /* printf( "-- rotate by %lld rows up and partial invalidation of cache --\n", distance ); */
-
-                rotate_cache_rows_up( sc->rows, (int)distance, sc->row_count );
-                invalidate_string_cache_from_to( sc, 0, (int)distance );
-                sc->row_offset = row;
-                res = put_cell_to_cache_row( sc->rows[ 0 ], col, s );
-            }
-        }
-        else if ( row >= ( sc->row_offset + sc->row_count ) )
-        {
-            /* ====================================================================================== */
-            /* acess is after the current window: decide if we can shift or need a full invalidation */
-            long long int distance = ( row - ( sc->row_offset + sc->row_count ) ) + 1;
-            /* printf( "-- after window ( distance = %lld ) --\n", distance ); */
-            if ( distance >= sc->row_count )
-            {
-                /* ===> */
-                /* jumping out of the cache content: full invalidation */
-                /* printf( "-- full invalidation of cache --\n" ); */
-
-                invalidate_string_cache_from_to( sc, 0, sc->row_count );
-                sc->row_offset = row;
-                res = put_cell_to_cache_row( sc->rows[ 0 ], col, s );
-            }
-            else
-            {
-                /* ===> */
-                /* some content can still be used: rotate and partial invalidation */
-                /* printf( "-- rotate by %lld rows down and partial invalidation of cache --\n", distance ); */
-                rotate_cache_rows_down( sc->rows, (int)distance, sc->row_count );
-                invalidate_string_cache_from_to( sc, ( sc->row_count - (int)distance ), (int)distance );
-                sc->row_offset += distance;
-                res = put_cell_to_cache_row( sc->rows[ sc->row_count - 1 ], col, s );
-            }
-        }
-        else if ( row >= 0 )
-        {
-            /* ====================================================================================== */
-            /* access is in the current window: no need to shift or invalidate the rows */
-            long long int rel_row = ( row - sc->row_offset );
-            /* printf( "-- in window ( rel. row = %lld ) --\n", rel_row ); */
-            res = put_cell_to_cache_row( sc->rows[ rel_row ], col, s );
-        }
-    }
-    return res;
-}
diff --git a/libs/tui/string_cache.h b/libs/tui/string_cache.h
deleted file mode 100644
index 1aaac1d..0000000
--- a/libs/tui/string_cache.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_string_cache_
-#define _h_string_cache_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct string_cache;
-
-struct string_cache * make_string_cache( int row_count, int col_count );
-void release_string_cache( struct string_cache * sc );
-
-int get_string_cache_rowcount( const struct string_cache * sc );
-long long int get_string_cache_start( const struct string_cache * sc );
-
-const char * get_cell_from_string_cache( const struct string_cache * sc, long long int row, int col );
-void invalidate_string_cache( struct string_cache * sc );
-int put_cell_to_string_cache( struct string_cache * sc, long long int row, int col, const char * s );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_string_cache_ */
diff --git a/libs/tui/tui-priv.h b/libs/tui/tui-priv.h
deleted file mode 100644
index 39898b3..0000000
--- a/libs/tui/tui-priv.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_tui_priv_
-#define _h_tui_priv_
-
-#ifndef _h_tui_extern_
-#include <tui/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <klib/refcount.h>
-#include <tui/tui.h>
-#include <kfs/directory.h>
-#include <vfs/manager.h>
-
-#include "eventring.h"
-#include "screen.h"
-
-struct KTUI_pf;
-
-typedef struct KTUI
-{
-    KRefcount refcount;
-    const KTUIMgr * mgr;
-    Event_Ring ev_ring;
-    tui_screen screen;
-    int lines, cols;
-    uint32_t timeout;
-
-    struct KTUI_pf * pf;
-} KTUI;
-
-
-void CC put_window_event( struct KTUI * self, int lines, int cols );
-void CC put_kb_event( struct KTUI * self, int key, KTUI_key code );
-void CC put_mouse_event( struct KTUI * self, unsigned int x, unsigned int y, 
-                         KTUI_mouse_button button, KTUI_mouse_action action, uint32_t raw_event );
-
-void CC read_from_stdin( struct KTUI * self, uint32_t timeout );
-void CC tui_send_strip( int x, int y, int count, tui_ac * curr, tui_ac * v,
-                        const char * s );
-
-rc_t CC KTUI_Init_platform( KTUI * self );
-rc_t CC KTUI_Destroy_platform ( struct KTUI_pf * pf );
-
-rc_t native_to_internal( VFSManager * vfs_mgr, const char * native, char * buffer, uint32_t buffer_size, size_t * written );
-rc_t internal_to_native( VFSManager * vfs_mgr, const char * internal, char * buffer, uint32_t buffer_size, size_t * written );
-rc_t set_native_caption( struct KTUIDlg * dlg, VFSManager * vfs_mgr, uint32_t id, const char * internal_path );
-rc_t fill_widget_with_dirs( struct KTUIDlg * dlg, KDirectory * dir, uint32_t id, const char * path, const char * to_focus );
-rc_t fill_widget_with_files( struct KTUIDlg * dlg, KDirectory * dir, uint32_t id, const char * path, const char * extension );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_tui_priv */
diff --git a/libs/tui/tui.c b/libs/tui/tui.c
deleted file mode 100644
index 854508f..0000000
--- a/libs/tui/tui.c
+++ /dev/null
@@ -1,380 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <tui/extern.h>
-#include <tui/tui.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-
-#include "eventring.h"
-#include "screen.h"
-#include "tui-priv.h"
-
-#include <sysalloc.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-/* this is the generic - not platform specific code of KTUI */
-
-static const char tuimanager_classname [] = "TUIManager";
-static const char tui_classname [] = "TUI_Implementation";
-
-LIB_EXPORT rc_t CC KTUIMake ( const KTUIMgr * mgr, struct KTUI ** self, uint32_t timeout )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        KTUI * tui = malloc( sizeof * tui );
-        if ( tui == NULL )
-            rc = RC( rcApp, rcAttr, rcCreating, rcMemory, rcExhausted );
-        else
-        {
-            tui_ac v = { KTUI_a_none, KTUI_c_black, KTUI_c_green };
-            event_ring_init( &tui->ev_ring );
-
-            clr_tui_screen( &tui->screen, &v, false );
-
-            rc = KTUI_Init_platform( tui ); /* call the platform specific init */
-            if ( rc == 0 )
-            {
-                tui->mgr = mgr;
-                tui->timeout = timeout;
-                if ( rc == 0 )
-                    KRefcountInit( &tui->refcount, 1, "TUI", "make", tui_classname );
-            }
-            if ( rc != 0 )
-                free( ( void * ) tui );
-            else
-                ( * self ) = tui;
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIAddRef ( const struct KTUI * self )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd( &self->refcount, tui_classname ) )
-        {
-        case krefOkay :
-            break;
-        case krefZero :
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcIncorrect );
-        case krefLimit :
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcExhausted );
-        case krefNegative :
-            rc =  RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcInvalid );
-        default :
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcUnknown );
-        }
-    }
-    return rc;
-}
-
-
-static rc_t CC KTUIDestroy ( struct KTUI * self )
-{
-    KTUI_Destroy_platform( self->pf );
-
-    event_ring_destroy( &self->ev_ring );
-    KRefcountWhack( &self->refcount, tui_classname );
-    free( self );
-    return 0;
-}
-
-
-/* not platform specific */
-LIB_EXPORT rc_t CC KTUIRelease ( const struct KTUI * self )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop( &self->refcount, tui_classname ) )
-        {
-        case krefOkay :
-        case krefZero :
-            break;
-        case krefWhack :
-            rc = KTUIDestroy( ( struct KTUI * )self );
-            break;
-        case krefNegative:
-            return RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcInvalid );
-        default:
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcUnknown );
-            break;            
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUISetTimeout ( struct KTUI * self, uint32_t timeout )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-        self->timeout = timeout;
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIPrint( struct KTUI * self, const tui_point * p,
-                              const tui_ac * ac, const char * s, uint32_t l )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else if ( ac == NULL || p == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcNull );
-    else
-        /* in screen.c */
-        print_into_screen( &self->screen, p->x, p->y, ac, s, l );
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIRect ( struct KTUI * self, const tui_rect * r,
-                              const tui_ac * ac, const char c )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else if ( ac == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcNull );
-    else
-    {
-        if ( r != NULL )
-            paint_into_screen( &self->screen, r, ac, c );
-        else
-            clr_tui_screen( &self->screen, ac, true );
-    }
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIFlush ( struct KTUI * self, bool forced )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        if ( forced )
-        {
-            tui_ac ac;
-            set_ac( &ac, KTUI_a_none, KTUI_c_white, KTUI_c_white );
-            clr_tui_screen( &self->screen, &ac, true );
-        }
-		
-		/* this is platform specific! in systui.c */
-        send_tui_screen( &self->screen, self->lines, self->cols );
-    }
-
-    return rc;
-}
-
-
-/* not platform specific, except the call to platform specific read_from_stdin() */
-LIB_EXPORT rc_t CC KTUIGet ( struct KTUI * self, tui_event * event )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else if ( event == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcNull );
-    else
-    {
-        tui_event * ev;
-        read_from_stdin( self, self->timeout ); /* that is the platform specific state-machine */
-        ev = event_ring_get( &self->ev_ring );
-        if ( ev == NULL )
-        {
-            event->event_type = ktui_event_none;
-        }
-        else
-        {
-            copy_event( ev, event );
-            event_ring_put_to_stock( &self->ev_ring, ev );
-        }
-    }
-    return rc;
-}
-
-
-/* not platform specific, just returns values from self-struct */
-LIB_EXPORT rc_t CC KTUIGetExtent ( struct KTUI * self, int * cols, int * lines )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else if ( lines == NULL || cols == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcNull );
-    else
-    {
-        *lines = self->lines;
-        *cols = self->cols;
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIClrScr( struct KTUI * self, KTUI_color bg )
-{
-    tui_ac ac;
-    set_ac( &ac, KTUI_a_none, bg, bg );
-    clr_tui_screen( &self->screen, &ac, true );
-    return 0;
-}
-
-
-LIB_EXPORT void set_ac( tui_ac * dst, KTUI_attrib attr, KTUI_color fg, KTUI_color bg )
-{
-    if ( dst != NULL )
-    {
-        dst->attr = attr;
-        dst->fg = fg;
-        dst->bg = bg;
-    }
-}
-
-
-LIB_EXPORT void copy_ac( tui_ac * dst, const tui_ac * src )
-{
-    if ( dst != NULL && src != NULL )
-    {
-        dst->attr = src->attr;
-        dst->fg = src->fg;
-        dst->bg = src->bg;
-    }
-}
-
-
-LIB_EXPORT void inverse_ac( tui_ac * dst, const tui_ac * src )
-{
-    if ( dst != NULL && src != NULL )
-    {
-        dst->attr = src->attr;
-        dst->fg = src->bg;
-        dst->bg = src->fg;
-    }
-}
-
-
-LIB_EXPORT void set_rect( tui_rect * dst, int x, int y, int w, int h )
-{
-    if ( dst != NULL )
-    {
-        dst->top_left.x = x;
-        dst->top_left.y = y;
-        dst->w = w;
-        dst->h = h;
-    }
-}
-
-
-LIB_EXPORT void copy_rect( tui_rect * dst, const tui_rect * src )
-{
-    if ( dst != NULL && src != NULL )
-    {
-        dst->top_left.x = src->top_left.x;
-        dst->top_left.y = src->top_left.y;
-        dst->w = src->w;
-        dst->h = src->h;
-    }
-}
-
-void CC put_window_event( struct KTUI * self, int cols, int lines )
-{
-    tui_event * event = event_ring_get_from_stock_or_make( &self->ev_ring );
-    if ( event != NULL )
-    {
-        event->event_type = ktui_event_window;
-        event->data.win_data.w = cols;
-        event->data.win_data.h = lines;
-        event_ring_put( &self->ev_ring, event );
-    }
-}
-
-
-void CC put_kb_event( struct KTUI * self, int key, KTUI_key code )
-{
-    tui_event * event = event_ring_get_from_stock_or_make( &self->ev_ring );
-    if ( event != NULL )
-    {
-        event->event_type = ktui_event_kb;
-        event->data.kb_data.key = key;
-        event->data.kb_data.code = code;
-        event_ring_put( &self->ev_ring, event );
-    }
-}
-
-void CC put_mouse_event( struct KTUI * self, unsigned int x, unsigned int y, 
-                         KTUI_mouse_button button, KTUI_mouse_action action, uint32_t raw_event )
-{
-    tui_event * event = event_ring_get_from_stock_or_make( &self->ev_ring );
-    if ( event != NULL )
-    {
-        event->event_type = ktui_event_mouse;
-        event->data.mouse_data.button = button;
-        event->data.mouse_data.action = action;	
-        event->data.mouse_data.x = x;
-        event->data.mouse_data.y = y;
-		event->data.mouse_data.raw_event = raw_event;
-        event_ring_put( &self->ev_ring, event );
-    }
-}
-
-
-LIB_EXPORT bool CC is_alpha_key( tui_event * event, char c )
-{
-    return ( event != NULL &&
-              event->event_type == ktui_event_kb &&
-              event->data.kb_data.code == ktui_alpha &&
-              event->data.kb_data.key == c );
-}
-
-
-LIB_EXPORT bool CC is_key_code( tui_event * event, KTUI_key k )
-{
-    return ( event != NULL &&
-              event->event_type == ktui_event_kb &&
-              event->data.kb_data.code == k );
-}
diff --git a/libs/tui/tui_cpp.cpp b/libs/tui/tui_cpp.cpp
deleted file mode 100644
index 7138be9..0000000
--- a/libs/tui/tui_cpp.cpp
+++ /dev/null
@@ -1,226 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <iostream>
-#include <string>
-
-#include <klib/printf.h>
-
-#include <tui/tui.hpp>
-
-namespace tui {
-
-    Tui * Tui::instance = NULL;
-
-    Tui * Tui::getInstance( void )
-    { 
-        if ( !instance ) instance = new Tui();
-        return instance;
-    };
-
-    void Tui::clean_up( void )
-    {
-        if ( instance ) delete instance;
-        instance = NULL;
-    }
-
-    
-    bool Tui_Event::get_from_tui( void )
-    {
-        Tui * t = Tui::getInstance();
-        rc_t rc = KTUIGet ( t->tui_, &ev_ );
-        return ( rc == 0 && !empty() );
-    }
-
-
-    Grid::Grid( void * data )
-    {
-        memset( &grid_data_, 0, sizeof grid_data_ );
-        grid_data_.instance = this;
-        grid_data_.cb_str = static_str_cb;
-        grid_data_.cb_int = static_int_cb;
-        grid_data_.data = data;
-    };
-
-
-    bool Dlg::Resize( Tui_Rect const &r )
-    {
-        bool res = Draw( true );
-        if ( res ) res = SetRect( r, false );
-        if ( res ) res = Draw( false );
-        return res;
-    }
-
-    bool Dlg::SetCaptionF( const char * fmt, ... )
-    {
-        va_list args;
-        va_start ( args, fmt );
-        char buffer[ 1042 ];
-        rc_t rc = string_vprintf ( buffer, sizeof buffer, NULL, fmt, args );
-        if ( rc == 0 )
-            return SetCaption( buffer );
-        else
-            return false;
-    }
-
-    bool Dlg::SetWidgetCaptionF( tui_id id, const char * fmt, ... )
-    {
-        va_list args;
-        va_start ( args, fmt );
-        char buffer[ 1042 ];
-        rc_t rc = string_vprintf ( buffer, sizeof buffer, NULL, fmt, args );
-        if ( rc == 0 )
-            return SetWidgetCaption( id, buffer );
-        else
-            return false;
-    }
-
-    bool Dlg::SetWidgetTextF( tui_id id, const char * fmt, ... )
-    {
-        va_list args;
-        va_start ( args, fmt );
-        char buffer[ 1042 ];
-        rc_t rc = string_vprintf ( buffer, sizeof buffer, NULL, fmt, args );
-        if ( rc == 0 )
-            return SetWidgetText( id, buffer );
-        else
-            return false;
-    }
-
-    bool Dlg::AddWidgetStringN( tui_id id, int n, ... )
-    {
-        bool res = true;
-        va_list args;
-        va_start ( args, n );
-        for ( int i = 0; i < n && res; i++ )
-            res = AddWidgetString( id, va_arg ( args, const char * ) );
-        va_end ( args );
-        return res;
-    }
-
-
-    bool Dlg::AddWidgetStringF( tui_id id, const char * fmt, ... )
-    {
-        va_list args;
-        va_start ( args, fmt );
-        char buffer[ 1042 ];
-        size_t num_writ;
-        rc_t rc = string_vprintf ( buffer, sizeof buffer, &num_writ, fmt, args );
-        if ( rc == 0 )
-            return AddWidgetString( id, buffer );
-        else
-            return false;
-    }
-
-
-    bool Dlg_Runner::handle_tui_event( Tui_Event &ev )
-    {
-        bool res = false;
-        switch( ev.get_type() )
-        {
-            case ktui_event_kb : {
-                                    KTUI_key key_type = ev.get_key_type();
-                                    if ( key_type == ktui_alpha )
-                                    {
-                                        int code = ev.get_key();
-                                        res = on_kb_alpha( dlg_, data_, code );
-                                        if ( !res )
-                                        {
-                                           /* safety-net: ESC always closes the dialog */
-                                           res = ( code == 27 );
-                                           if ( res ) dlg_.SetDone( true );
-                                        }
-                                    }
-                                    else
-                                        res = on_kb_special_key( dlg_, data_, key_type );
-                                  }
-                                    break;
-
-            case ktui_event_mouse : res = on_mouse( dlg_, data_,
-                                                     ev.get_mouse_x(),
-                                                     ev.get_mouse_y(),
-                                                     ev.get_mouse_button() );
-                                    break;
-
-            case ktui_event_window : res = on_win( dlg_, data_,
-                                                    ev.get_window_width(),
-                                                    ev.get_window_height() );
-                                      break;
-        }
-        return res;
-    };
-
-
-    bool Dlg_Runner::handle_dlg_event_loop( void )
-    {
-        bool done = false;
-        bool res = false;
-        while ( !done )
-        {
-            Tui_Dlg_Event dev;
-            if ( dlg_.GetDlgEvent( &dev.ev_ ) )
-            {
-                switch( dev.get_type() )
-                {
-                    case ktuidlg_event_none         : done = true; break;
-                    case ktuidlg_event_focus        : res = on_focus( dlg_, data_, dev ); break;
-                    case ktuidlg_event_focus_lost   : res = on_focus_lost( dlg_, data_, dev ); break;
-                    case ktuidlg_event_select       : res = on_select( dlg_, data_, dev ); break;
-                    case ktuidlg_event_changed      : res = on_changed( dlg_, data_, dev ); break;
-                    case ktuidlg_event_menu         : res = on_menu( dlg_, data_, dev ); break;
-                }
-            }
-        }
-        return res;
-    }
-
-
-    bool Dlg_Runner::handle_dlg_event( Tui_Event &ev )
-    {
-        bool res = false;
-        if ( dlg_.HandleEvent( ev ) )
-            res = handle_dlg_event_loop();
-        return res;
-    };
-
-
-    void Dlg_Runner::run( void )
-    {
-        dlg_.Draw();
-        while ( !dlg_.IsDone() )
-        {
-            Tui_Event ev;
-            if ( ev.get_from_tui() )
-            {
-                if ( !handle_dlg_event( ev ) )
-                    handle_tui_event( ev );
-            }
-            else
-                handle_dlg_event_loop();
-        }
-    };
-
-}
\ No newline at end of file
diff --git a/libs/tui/tui_dlg.c b/libs/tui/tui_dlg.c
deleted file mode 100644
index dfaa50a..0000000
--- a/libs/tui/tui_dlg.c
+++ /dev/null
@@ -1,1291 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <tui/extern.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <klib/vector.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-
-#include <tui/tui_dlg.h>
-#include "tui_widget.h"
-#include "eventring.h"
-#include "line_policy.h"
-#include "tui_menu.h"
-
-#include <sysalloc.h>
-#include <stdlib.h>
-
-
-/* ******************************************************************************************
-
-    prototypes of all the concrete widget types ( aka 2 callbacks each )
-
-   ****************************************************************************************** */
-
-/* from tui_widget_label.c */
-void draw_label( struct KTUIWidget * w );
-
-/* from tui_widget_button.c */
-void draw_button( struct KTUIWidget * w );
-bool event_button( struct KTUIWidget * w, tui_event * event );
-
-/* from tui_widget_checkbox.c */
-void draw_checkbox( struct KTUIWidget * w );
-bool event_checkbox( struct KTUIWidget * w, tui_event * event );
-
-/* from tui_widget_inputline.c */
-void init_inputline( struct KTUIWidget * w );
-void draw_inputline( struct KTUIWidget * w );
-bool event_inputline( struct KTUIWidget * w, tui_event * event );
-
-/* from tui_widget_radiobox.c */
-void draw_radiobox( struct KTUIWidget * w );
-bool event_radiobox( struct KTUIWidget * w, tui_event * event );
-
-/* from tui_widget_string_list.c */
-void draw_list( struct KTUIWidget * w );
-bool event_list( struct KTUIWidget * w, tui_event * event );
-
-/* from tui_widget_progress.c */
-void draw_progress( struct KTUIWidget * w );
-
-/* from tui_widget_spin_edit.c */
-void draw_spinedit( struct KTUIWidget * w );
-bool event_spinedit( struct KTUIWidget * w, tui_event * event );
-
-/* from tui_widget_grid.c */
-void draw_grid( struct KTUIWidget * w );
-bool event_grid( struct KTUIWidget * w, tui_event * event );
-uint64_t get_grid_col( struct KTUIWidget * w );
-bool set_grid_col( struct KTUIWidget * w, uint64_t col );
-uint64_t get_grid_row( struct KTUIWidget * w );
-bool set_grid_row( struct KTUIWidget * w, uint64_t row );
-
-
-/* ****************************************************************************************** */
-
-
-typedef struct KTUIDlg
-{
-    KRefcount refcount;
-
-    struct KTUI * tui;
-    struct KTUIDlg * parent;
-    struct KTUIPalette * palette;
-    struct KTUI_Menu * menu;
-    char * caption;
-    void * data;
-
-    Event_Ring events;
-    Vector widgets;
-    tui_rect r;
-    uint32_t focused;
-    bool menu_active, changed, done;
-
-} KTUIDlg;
-
-
-static const char tuidlg_classname [] = "TUIDlg_Implementation";
-
-
-static rc_t KTUIDlgDestroy ( struct KTUIDlg * self )
-{
-    uint32_t i, n;
-    KTUIRelease ( self->tui );
-
-    n = VectorLength( &self->widgets );
-    for ( i = 0; i < n; ++i )
-    {
-        KTUIWidget * w = VectorGet ( &self->widgets, i );
-        if ( w != NULL )
-            TUI_DestroyWidget( w );
-    }
-
-    if ( self->caption != NULL )
-        free( ( void * )self->caption );
-
-    if ( self->menu != NULL )
-        KTUI_Menu_Release ( self->menu );
-
-    KTUIPaletteRelease ( self->palette );
-    event_ring_destroy( &self->events );
-
-    free( ( void * )self );
-    return 0;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgMake ( struct KTUI * tui, struct KTUIDlg ** self, struct KTUIDlg * parent,
-                    struct KTUIPalette * palette, tui_rect * r )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        KTUIDlg * td = malloc( sizeof * td );
-        if ( td == NULL )
-            rc = RC( rcApp, rcAttr, rcCreating, rcMemory, rcExhausted );
-        else
-        {
-            rc = KTUIAddRef ( tui );
-            if ( rc == 0 )
-            {
-                td->tui = tui;
-                td->parent = parent;
-
-                if ( palette == NULL )
-                {
-                    if ( parent == NULL )
-                        rc = KTUIPaletteMake ( &td->palette );
-                    else
-                    {
-                        rc = KTUIPaletteAddRef ( parent->palette );
-                        if ( rc == 0 )
-                            td->palette = parent->palette;
-                    }
-                }
-                else
-                {
-                    rc = KTUIPaletteAddRef ( palette );
-                    if ( rc == 0 )
-                        td->palette = palette;
-                }
-
-                if ( rc == 0 )
-                {
-                    KRefcountInit( &td->refcount, 1, "TUIDlg", "make", tuidlg_classname );
-                    VectorInit ( &td->widgets, 0, 16 );
-                    event_ring_init( &td->events );
-                    td->caption = NULL;
-                    td->focused = 0;
-                    td->menu = NULL;
-                    td->menu_active = td->done = td->changed = false;
-                    td->data = NULL;
-
-                    if ( r != NULL )
-                    {
-                        copy_rect( &td->r, r );
-                        /*
-                        if ( parent == NULL )
-                            copy_rect( &td->r, r );
-                        else
-                        {
-                            tui_rect pr;
-                            rc = KTUIDlgGetRect ( parent, &pr );
-                            if ( rc == 0 )
-                            {
-                                td->r.top_left.x = pr.top_left.x + r->top_left.x;
-                                td->r.top_left.y = pr.top_left.y + r->top_left.y;
-                                td->r.w = r->w;
-                                td->r.h = r->h;
-                            }
-                        }
-                        */
-                    }
-                    else
-                    {
-                        int w, h;
-                        rc = KTUIGetExtent ( tui, &w, &h );
-                        if ( rc == 0 )
-                            set_rect( &td->r, 0, 0, w, h );
-                    }
-                }
-            }
-
-            if ( rc == 0 )
-                ( * self ) = td;
-            else
-                KTUIDlgDestroy ( td );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgAddRef ( const struct KTUIDlg * self )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        switch ( KRefcountAdd( &self->refcount, tuidlg_classname ) )
-        {
-        case krefOkay :
-            break;
-        case krefZero :
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcIncorrect );
-        case krefLimit :
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcExhausted );
-        case krefNegative :
-            rc =  RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcInvalid );
-        default :
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcUnknown );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgRelease ( const struct KTUIDlg * self )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop( &self->refcount, tuidlg_classname ) )
-        {
-        case krefOkay :
-        case krefZero :
-            break;
-        case krefWhack :
-            rc = KTUIDlgDestroy( ( struct KTUIDlg * )self );
-            break;
-        case krefNegative:
-            return RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcInvalid );
-        default:
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcUnknown );
-            break;            
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT void CC KTUIDlgSetData ( struct KTUIDlg * self, void * data )
-{
-    if ( self != NULL )
-        self->data = data;
-}
-
-
-LIB_EXPORT void * CC KTUIDlgGetData ( struct KTUIDlg * self )
-{
-    if ( self != NULL )
-        return self->data;
-    else
-        return NULL;
-}
-
-
-LIB_EXPORT void CC KTUIDlgSetDone ( struct KTUIDlg * self, bool done )
-{
-    if ( self != NULL )
-        self->done = done;
-}
-
-
-LIB_EXPORT bool CC KTUIDlgGetDone ( struct KTUIDlg * self )
-{
-    if ( self != NULL )
-        return self->done;
-    return false;
-}
-
-
-LIB_EXPORT void CC KTUIDlgSetChanged ( struct KTUIDlg * self )
-{
-    if ( self != NULL )
-        self->changed = true;
-}
-
-
-LIB_EXPORT void CC KTUIDlgClearChanged ( struct KTUIDlg * self )
-{
-    if ( self != NULL )
-    {
-        uint32_t i, n;
-        n = VectorLength( &self->widgets );
-        for ( i = 0; i < n; ++i )
-        {
-            KTUIWidget * w = VectorGet ( &self->widgets, i );
-            if ( w != NULL )
-                w->changed = false;
-        }
-        self->changed = false;
-    }
-}
-
-
-LIB_EXPORT bool CC KTUIDlgGetChanged ( struct KTUIDlg * self )
-{
-    if ( self != NULL )
-        return self->changed;
-    return false;
-}
-
-
-LIB_EXPORT struct KTUI * CC KTUIDlgGetTui ( struct KTUIDlg * self )
-{
-    if ( self != NULL )
-        return self->tui;
-    else
-        return NULL;
-}
-
-
-LIB_EXPORT struct KTUIPalette * CC KTUIDlgGetPalette ( struct KTUIDlg * self )
-{
-    if ( self != NULL )
-        return self->palette;
-    else
-        return NULL;
-}
-
-
-LIB_EXPORT struct KTUIDlg * CC KTUIDlgGetParent ( struct KTUIDlg * self )
-{
-    if ( self != NULL )
-        return self->parent;
-    else
-        return NULL;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgSetCaption ( struct KTUIDlg * self, const char * caption )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        if ( self->caption != NULL )
-            free( ( void * ) self->caption );
-        
-        if ( caption != NULL )
-            self->caption = string_dup_measure ( caption, NULL );
-        else
-            self->caption = NULL;
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgGetRect ( struct KTUIDlg * self, tui_rect * r )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcSelecting, rcSelf, rcNull );
-    else if ( r == NULL )
-        rc = RC( rcApp, rcAttr, rcSelecting, rcParam, rcNull );
-    else
-        copy_rect( r, &self->r );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgSetRect ( struct KTUIDlg * self, const tui_rect * r, bool redraw )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcSelecting, rcSelf, rcNull );
-    else if ( r == NULL )
-        rc = RC( rcApp, rcAttr, rcSelecting, rcParam, rcNull );
-    else
-    {
-        copy_rect( &self->r, r );
-        if ( redraw )
-            rc = KTUIDlgDraw( self, true );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT bool CC KTUIDlgGetMenuActive ( const struct KTUIDlg * self )
-{
-    bool res = false;
-    if ( self != NULL )
-        res = self->menu_active;
-    return res;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgSetMenuActive ( struct KTUIDlg * self, bool active )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcSelecting, rcSelf, rcNull );
-    else if ( self->menu == NULL )
-        rc = RC( rcApp, rcAttr, rcSelecting, rcItem, rcInvalid );
-    else
-    {
-        self->menu_active = active;
-        rc = KTUIDlgDraw( self, false );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgSetMenu ( struct KTUIDlg * self, struct KTUI_Menu * menu )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcSelecting, rcSelf, rcNull );
-    else if ( menu == NULL )
-        rc = RC( rcApp, rcAttr, rcSelecting, rcParam, rcNull );
-    else
-    {
-        if ( self->menu != NULL )
-            KTUI_Menu_Release ( self->menu );
-        self->menu = menu;
-    }
-    return rc;
-}
-
-
-/* ****************************************************************************************** */
-
-LIB_EXPORT void KTUIDlgPushEvent( struct KTUIDlg * self,
-                       KTUIDlg_event_type event_type, uint32_t widget_id,
-                       uint64_t value_1, uint64_t value_2, void * ptr_0 )
-{
-    tuidlg_event * ev = dlg_event_ring_get_from_stock_or_make( &self->events );
-    if ( ev != NULL )
-    {
-        ev->event_type = event_type;
-        ev->widget_id = widget_id;
-        ev->value_1 = value_1;
-        ev->value_2 = value_2;
-        ev->ptr_0 = ptr_0;
-        dlg_event_ring_put( &self->events, ev );
-    }
-}
-
-
-static void KTUIDlgAbsolutePoint( struct KTUIDlg * self, tui_point * p )
-{
-    p->x += self->r.top_left.x;
-    p->y += self->r.top_left.y;
-    if ( self->parent != NULL )
-        KTUIDlgAbsolutePoint( self->parent, p );    /* recursion ! */
-}
-
-
-static void KTUIDlgRelativePoint( struct KTUIDlg * self, tui_point * p )
-{
-    p->x -= self->r.top_left.x;
-    p->y -= self->r.top_left.y;
-    if ( self->parent != NULL )
-        KTUIDlgRelativePoint( self->parent, p );    /* recursion ! */
-}
-
-
-static void KTUIDlgAbsoluteDlgRect( struct KTUIDlg * self, tui_rect * dst, tui_rect * src )
-{
-    dst->top_left.x = 0;
-    dst->top_left.y = 0;
-    KTUIDlgAbsolutePoint( self, &dst->top_left );
-    dst->w = src->w;
-    dst->h = src->h;
-}
-
-LIB_EXPORT rc_t KTUIDlgAbsoluteRect ( struct KTUIDlg * self, tui_rect * dst, tui_rect * src )
-{
-    dst->top_left.x = src->top_left.x;
-    dst->top_left.y = src->top_left.y;
-    KTUIDlgAbsolutePoint( self, &dst->top_left );
-    dst->w = src->w;
-    dst->h = src->h;
-    return 0;
-}
-
-
-/* ****************************************************************************************** */
-
-
-static KTUIWidget * KTUIDlgGetWidgetById( struct KTUIDlg * self, uint32_t id )
-{
-    KTUIWidget * res = NULL;
-
-    uint32_t i, n = VectorLength( &self->widgets );
-    for ( i = 0; i < n && res == NULL; ++i )
-    {
-        KTUIWidget * w = VectorGet ( &self->widgets, i );
-        if ( w != NULL )
-        {
-            if ( w->id == id ) res = w;
-        }
-    }
-    return res;
-}
-
-
-/* ****************************************************************************************** */
-
-
-static rc_t KTUIDlgAddWidget( struct KTUIDlg * self, uint32_t id, KTUI_Widget_type wtype, const tui_rect * r,
-                              draw_cb on_draw, event_cb on_event, init_cb on_init )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        KTUIWidget * w;
-        rc = TUI_MakeWidget ( &w, self, id, wtype, r, on_draw, on_event );
-        if ( rc == 0 )
-        {
-            if ( on_init != NULL )
-                on_init( w );
-            VectorAppend ( &self->widgets, &w->vector_idx, w );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgAddLabel( struct KTUIDlg * self, uint32_t id, const tui_rect * r, const char * caption )
-{
-    rc_t rc = KTUIDlgAddWidget( self, id, KTUIW_label, r, draw_label, NULL, NULL );
-    if ( rc == 0 )
-        rc = KTUIDlgSetWidgetCanFocus( self, id, false );
-    if ( rc == 0 && caption != NULL )
-        rc = KTUIDlgSetWidgetCaption ( self, id, caption );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgAddLabel2( struct KTUIDlg * self, uint32_t id,
-                                     uint32_t x, uint32_t y, uint32_t w, const char * caption )
-{
-    tui_rect r;
-    set_rect( &r, x, y, w, 1 );
-    return KTUIDlgAddLabel( self, id, &r, caption );
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgAddBtn ( struct KTUIDlg * self, uint32_t id, const tui_rect * r, const char * caption )
-{
-    rc_t rc = KTUIDlgAddWidget( self, id, KTUIW_button, r, draw_button, event_button, NULL );
-    if ( rc == 0 && caption != NULL )
-        rc = KTUIDlgSetWidgetCaption ( self, id, caption );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgAddBtn2 ( struct KTUIDlg * self, uint32_t id,
-                                    uint32_t x, uint32_t y, uint32_t w, const char * caption )
-{
-    tui_rect r;
-    set_rect( &r, x, y, w, 1 );
-    return KTUIDlgAddBtn ( self, id, &r, caption );
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgAddCheckBox ( struct KTUIDlg * self, uint32_t id, const tui_rect * r, const char * caption )
-{
-    rc_t rc = KTUIDlgAddWidget( self, id, KTUIW_checkbox, r, draw_checkbox, event_checkbox, NULL );
-    if ( rc == 0 && caption != NULL )
-        rc = KTUIDlgSetWidgetCaption ( self, id, caption );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgAddInput ( struct KTUIDlg * self, uint32_t id, const tui_rect * r, const char * txt, size_t length )
-{
-    rc_t rc = KTUIDlgAddWidget( self, id, KTUIW_input, r, draw_inputline, event_inputline, init_inputline );
-    if ( rc == 0 )
-        rc = KTUIDlgSetWidgetTextLength ( self, id, length );
-    if ( rc == 0 )
-        rc = KTUIDlgSetWidgetText ( self, id, txt );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgAddRadioBox ( struct KTUIDlg * self, uint32_t id, const tui_rect * r )
-{
-    return KTUIDlgAddWidget( self, id, KTUIW_radiobox, r, draw_radiobox, event_radiobox, NULL );
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgAddList ( struct KTUIDlg * self, uint32_t id, const tui_rect * r )
-{
-    return KTUIDlgAddWidget( self, id, KTUIW_list, r, draw_list, event_list, NULL );
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgSetHScroll ( struct KTUIDlg * self, uint32_t id, bool enabled )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        KTUIWidget *w = KTUIDlgGetWidgetById( self, id );
-        if ( w != NULL )
-        {
-            if ( w->wtype == KTUIW_list )
-            {
-                w->ints[ 2 ] = enabled ? 1 : 0;
-                w->ints[ 1 ] = 0;
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgAddProgress ( struct KTUIDlg * self, uint32_t id,
-                                        const tui_rect * r, int32_t percent, int32_t precision )
-{
-    rc_t rc = KTUIDlgAddWidget( self, id, KTUIW_progress, r, draw_progress, NULL, NULL );
-    if ( rc == 0 )
-        rc = KTUIDlgSetWidgetCanFocus( self, id, false );
-    if ( rc == 0 )
-        rc = KTUIDlgSetWidgetPrecision ( self, id, precision );
-    if ( rc == 0 )
-        rc = KTUIDlgSetWidgetPercent ( self, id, percent );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgAddSpinEdit ( struct KTUIDlg * self, uint32_t id,
-                                        const tui_rect * r, int64_t value, int64_t min, int64_t max )
-{
-    rc_t rc = KTUIDlgAddWidget( self, id, KTUIW_spinedit, r, draw_spinedit, event_spinedit, NULL );
-    if ( rc == 0 )
-        rc = KTUIDlgSetWidgetInt64Min ( self, id, min );
-    if ( rc == 0 )
-        rc = KTUIDlgSetWidgetInt64Max ( self, id, max );
-    if ( rc == 0 )
-        rc = KTUIDlgSetWidgetInt64Value ( self, id, value );
-
-    return rc;
-}
-
-
-/* ****************************************************************************************** */
-
-
-LIB_EXPORT rc_t CC KTUIDlgAddGrid ( struct KTUIDlg * self, uint32_t id,
-                                    const tui_rect * r, TUIWGrid_data * grid_data, bool cached )
-{
-    rc_t rc = KTUIDlgAddWidget( self, id, KTUIW_grid, r, draw_grid, event_grid, NULL );
-    if ( rc == 0 )
-        rc = KTUIDlgSetWidgetGridData( self, id, grid_data, cached );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgGetGridCol( struct KTUIDlg * self, uint32_t id, uint64_t *col )
-{
-    rc_t rc = 0;
-    if ( col == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcNull );
-    else
-    {
-        KTUIWidget * w = KTUIDlgGetWidgetById( self, id );
-        if ( w != NULL && w->wtype == KTUIW_grid )
-            *col = get_grid_col( w );
-        else
-            rc = RC( rcApp, rcAttr, rcSelecting, rcId, rcInvalid );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgSetGridCol( struct KTUIDlg * self, uint32_t id, uint64_t col )
-{
-    rc_t rc = 0;
-    KTUIWidget * w = KTUIDlgGetWidgetById( self, id );
-    if ( w != NULL && w->wtype == KTUIW_grid )
-        set_grid_col( w, col );
-    else
-        rc = RC( rcApp, rcAttr, rcSelecting, rcId, rcInvalid );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgGetGridRow( struct KTUIDlg * self, uint32_t id, uint64_t *row )
-{
-    rc_t rc = 0;
-    if ( row == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcNull );
-    else
-    {
-        KTUIWidget * w = KTUIDlgGetWidgetById( self, id );
-        if ( w != NULL && w->wtype == KTUIW_grid )
-            *row = get_grid_row( w );
-        else
-            rc = RC( rcApp, rcAttr, rcSelecting, rcId, rcInvalid );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgSetGridRow( struct KTUIDlg * self, uint32_t id, uint64_t row )
-{
-    rc_t rc = 0;
-    KTUIWidget * w = KTUIDlgGetWidgetById( self, id );
-    if ( w != NULL && w->wtype == KTUIW_grid )
-        set_grid_row( w, row );
-    else
-        rc = RC( rcApp, rcAttr, rcSelecting, rcId, rcInvalid );
-    return rc;
-}
-
-
-/* ****************************************************************************************** */
-
-
-static void KTUIDlgVectorReIndex ( struct KTUIDlg * self )
-{
-    uint32_t i, n = VectorLength( &self->widgets );
-    for ( i = 0; i < n; ++i )
-    {
-        KTUIWidget * w = VectorGet ( &self->widgets, i );
-        if ( w != NULL )
-            w->vector_idx = i;
-    }
-}
-
-LIB_EXPORT rc_t CC KTUIDlgRemove ( struct KTUIDlg * self, uint32_t id )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        KTUIWidget * w = KTUIDlgGetWidgetById( self, id );
-        if ( w != NULL )
-        {
-            void * removed = NULL;
-            rc = VectorRemove ( &self->widgets, w->vector_idx, &removed );
-            if ( rc == 0 )
-            {
-                if ( w != NULL ) TUI_DestroyWidget( w );
-                KTUIDlgVectorReIndex ( self );
-                rc = KTUIDlgDraw( self, false );
-            }
-        }
-        else
-            rc = RC( rcApp, rcAttr, rcSelecting, rcId, rcInvalid );
-    }
-    return rc;
-}
-
-
-
-/* ****************************************************************************************** */
-static rc_t draw_caption( struct KTUI * tui, const tui_ac * capt_ac, const tui_rect * r, const char * caption )
-{
-    rc_t rc = DlgPaint( tui, r->top_left.x, r->top_left.y, r->w, 1, capt_ac->bg );
-    if ( rc == 0 && caption != NULL )
-    {
-        rc = DlgWrite( tui, r->top_left.x + 5, r->top_left.y, capt_ac, caption, r->w - 10 );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC KTUIDlgDrawCaption( struct KTUIDlg * self )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else if ( self->caption != NULL )
-    {
-        tui_rect abs;
-        const tui_ac * capt_ac = KTUIPaletteGet ( self->palette, ktuipa_dlg_caption );
-        KTUIDlgAbsoluteDlgRect( self, &abs, &self->r );
-        rc = draw_caption( self->tui, capt_ac, &abs, self->caption );
-    }
-    if ( rc == 0 )
-        rc = KTUIFlush ( self->tui, false );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgDraw( struct KTUIDlg * self, bool forced )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        uint32_t i, n;
-
-        /* draw the background... */
-        tui_rect abs;
-        const tui_ac * dlg_ac = KTUIPaletteGet ( self->palette, ktuipa_dlg );
-        KTUIDlgAbsoluteDlgRect( self, &abs, &self->r );
-
-        rc = DlgPaint( self->tui, abs.top_left.x, abs.top_left.y, abs.w, abs.h, dlg_ac->bg );
-
-        /* draw the caption... */
-        if ( rc == 0 && self->caption != NULL )
-        {
-            const tui_ac * capt_ac = KTUIPaletteGet ( self->palette, ktuipa_dlg_caption );
-            rc = draw_caption( self->tui, capt_ac, &abs, self->caption );
-        }
-
-        /* draw the widgets */
-        n = VectorLength( &self->widgets );
-        for ( i = 0; i < n; ++i )
-        {
-            KTUIWidget * w = VectorGet ( &self->widgets, i );
-            if ( w != NULL )
-                if ( w->on_draw != NULL && w->visible )
-                    w->on_draw( w );
-        }
-
-        /* if the menu is activated... */
-        if ( self->menu_active && self->menu != NULL )
-            KTUI_Menu_Draw( self->menu, self );
-
-        /* flush it all out... */
-        rc = KTUIFlush ( self->tui, forced );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgDrawWidget( struct KTUIDlg * self, uint32_t id )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        KTUIWidget * w = KTUIDlgGetWidgetById( self, id );
-        if ( w != NULL && w->visible )
-            rc = RedrawWidget( w );
-    }
-    return rc;
-}
-
-
-/* ****************************************************************************************** */
-
-
-LIB_EXPORT const char * CC KTUIDlgGetWidgetCaption ( struct KTUIDlg * self, uint32_t id )
-{   return GetWidgetCaption ( KTUIDlgGetWidgetById( self, id ) );   }
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetCaption ( struct KTUIDlg * self, uint32_t id, const char * caption )
-{   return SetWidgetCaption ( KTUIDlgGetWidgetById( self, id ), caption );  }
-
-
-LIB_EXPORT struct KTUIPalette * CC KTUIDlgNewWidgetPalette ( struct KTUIDlg * self, uint32_t id )
-{   return CopyWidgetPalette( KTUIDlgGetWidgetById( self, id ) );   }
-LIB_EXPORT rc_t CC KTUIDlgReleaseWidgetPalette ( struct KTUIDlg * self, uint32_t id )
-{   return ReleaseWidgetPalette( KTUIDlgGetWidgetById( self, id ) );    }
-
-
-LIB_EXPORT rc_t CC KTUIDlgGetWidgetRect ( struct KTUIDlg * self, uint32_t id, tui_rect * r )
-{   return GetWidgetRect( KTUIDlgGetWidgetById( self, id ), r );    }
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetRect ( struct KTUIDlg * self, uint32_t id, const tui_rect * r, bool redraw )
-{   return SetWidgetRect( KTUIDlgGetWidgetById( self, id ), r, redraw );    }
-
-
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetCanFocus ( struct KTUIDlg * self, uint32_t id, bool can_focus )
-{   return SetWidgetCanFocus( KTUIDlgGetWidgetById( self, id ), can_focus );    }
-
-
-LIB_EXPORT bool KTUIDlgGetWidgetVisible ( struct KTUIDlg * self, uint32_t id )
-{   return GetWidgetVisible ( KTUIDlgGetWidgetById( self, id ) );   }
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetVisible ( struct KTUIDlg * self, uint32_t id, bool visible )
-{
-    bool redraw = false;
-    rc_t rc = SetWidgetVisible ( KTUIDlgGetWidgetById( self, id ), visible, &redraw );
-    if ( redraw ) rc = KTUIDlgDraw( self, false );
-    return rc;
-}
-
-
-LIB_EXPORT bool CC KTUIDlgGetWidgetChanged ( struct KTUIDlg * self, uint32_t id )
-{   return GetWidgetChanged ( KTUIDlgGetWidgetById( self, id ) );   }
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetChanged ( struct KTUIDlg * self, uint32_t id, bool changed )
-{   return SetWidgetChanged ( KTUIDlgGetWidgetById( self, id ), changed );  }
-
-
-LIB_EXPORT bool CC KTUIDlgGetWidgetBoolValue ( struct KTUIDlg * self, uint32_t id )
-{   return GetWidgetBoolValue ( KTUIDlgGetWidgetById( self, id ) ); }
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetBoolValue ( struct KTUIDlg * self, uint32_t id, bool value )
-{   return SetWidgetBoolValue ( KTUIDlgGetWidgetById( self, id ), value );  }
-
-
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetBg ( struct KTUIDlg * self, uint32_t id, KTUI_color value )
-{   return SetWidgetBg ( KTUIDlgGetWidgetById( self, id ), value );  }
-LIB_EXPORT rc_t CC KTUIDlgReleaseWidgetBg ( struct KTUIDlg * self, uint32_t id )
-{   return ReleaseWidgetBg ( KTUIDlgGetWidgetById( self, id ) );  }
-
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetFg ( struct KTUIDlg * self, uint32_t id, KTUI_color value )
-{   return SetWidgetFg ( KTUIDlgGetWidgetById( self, id ), value );  }
-LIB_EXPORT rc_t CC KTUIDlgReleaseWidgetFg ( struct KTUIDlg * self, uint32_t id )
-{   return ReleaseWidgetFg ( KTUIDlgGetWidgetById( self, id ) );  }
-
-LIB_EXPORT int64_t CC KTUIDlgGetWidgetInt64Value ( struct KTUIDlg * self, uint32_t id )
-{   return GetWidgetInt64Value ( KTUIDlgGetWidgetById( self, id ) );    }
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetInt64Value ( struct KTUIDlg * self, uint32_t id, int64_t value )
-{   return SetWidgetInt64Value ( KTUIDlgGetWidgetById( self, id ), value ); }
-
-
-LIB_EXPORT int64_t CC KTUIDlgGetWidgetInt64Min ( struct KTUIDlg * self, uint32_t id )
-{   return GetWidgetInt64Min ( KTUIDlgGetWidgetById( self, id ) );  }
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetInt64Min ( struct KTUIDlg * self, uint32_t id, int64_t value )
-{   return SetWidgetInt64Min ( KTUIDlgGetWidgetById( self, id ), value ); }
-
-
-LIB_EXPORT int64_t CC KTUIDlgGetWidgetInt64Max ( struct KTUIDlg * self, uint32_t id )
-{   return GetWidgetInt64Max ( KTUIDlgGetWidgetById( self, id ) );  }
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetInt64Max ( struct KTUIDlg * self, uint32_t id, int64_t value )
-{   return SetWidgetInt64Max ( KTUIDlgGetWidgetById( self, id ), value ); }
-
-
-LIB_EXPORT int32_t CC KTUIDlgGetWidgetPercent ( struct KTUIDlg * self, uint32_t id )
-{   return GetWidgetPercent ( KTUIDlgGetWidgetById( self, id ) );  }
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetPercent ( struct KTUIDlg * self, uint32_t id, int32_t value )
-{   return SetWidgetPercent ( KTUIDlgGetWidgetById( self, id ), value ); }
-
-LIB_EXPORT int32_t CC KTUIDlgGetWidgetPrecision ( struct KTUIDlg * self, uint32_t id )
-{   return GetWidgetPrecision ( KTUIDlgGetWidgetById( self, id ) );  }
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetPrecision( struct KTUIDlg * self, uint32_t id, int32_t value )
-{   return SetWidgetPrecision ( KTUIDlgGetWidgetById( self, id ), value ); }
-
-LIB_EXPORT int32_t CC KTUIDlgCalcPercent ( int64_t value, int64_t max, uint32_t precision )
-{   return CalcWidgetPercent( value, max, precision ); }
-
-
-LIB_EXPORT const char * CC KTUIDlgGetWidgetText( struct KTUIDlg * self, uint32_t id )
-{   return GetWidgetText ( KTUIDlgGetWidgetById( self, id ) );  }
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetText ( struct KTUIDlg * self, uint32_t id, const char * value )
-{   return SetWidgetText ( KTUIDlgGetWidgetById( self, id ), value ); }
-LIB_EXPORT size_t CC KTUIDlgGetWidgetTextLenght( struct KTUIDlg * self, uint32_t id )
-{   return GetWidgetTextLength ( KTUIDlgGetWidgetById( self, id ) );  }
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetTextLength ( struct KTUIDlg * self, uint32_t id, size_t value )
-{   return SetWidgetTextLength ( KTUIDlgGetWidgetById( self, id ), value ); }
-
-
-LIB_EXPORT rc_t CC KTUIDlgAddWidgetString ( struct KTUIDlg * self, uint32_t id, const char * txt )
-{   return AddWidgetString ( KTUIDlgGetWidgetById( self, id ), txt );  }
-LIB_EXPORT rc_t CC KTUIDlgAddWidgetStrings ( struct KTUIDlg * self, uint32_t id, VNamelist * src )
-{   return AddWidgetStrings ( KTUIDlgGetWidgetById( self, id ), src );  }
-LIB_EXPORT const char * CC KTUIDlgGetWidgetStringByIdx ( struct KTUIDlg * self, uint32_t id, uint32_t idx )
-{   return GetWidgetStringByIdx ( KTUIDlgGetWidgetById( self, id ), idx );  }
-LIB_EXPORT rc_t CC KTUIDlgRemoveWidgetStringByIdx ( struct KTUIDlg * self, uint32_t id, uint32_t idx )
-{   return RemoveWidgetStringByIdx ( KTUIDlgGetWidgetById( self, id ), idx );  }
-LIB_EXPORT rc_t CC KTUIDlgRemoveAllWidgetStrings ( struct KTUIDlg * self, uint32_t id )
-{   return RemoveAllWidgetStrings ( KTUIDlgGetWidgetById( self, id ) );  }
-LIB_EXPORT uint32_t CC KTUIDlgGetWidgetStringCount ( struct KTUIDlg * self, uint32_t id )
-{   return GetWidgetStringCount ( KTUIDlgGetWidgetById( self, id ) );  }
-LIB_EXPORT uint32_t CC KTUIDlgHasWidgetString( struct KTUIDlg * self, uint32_t id, const char * txt )
-{   return HasWidgetString ( KTUIDlgGetWidgetById( self, id ), txt );  }
-LIB_EXPORT uint32_t CC KTUIDlgGetWidgetSelectedString( struct KTUIDlg * self, uint32_t id )
-{   return GetWidgetSelectedString ( KTUIDlgGetWidgetById( self, id ) );  }
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetSelectedString ( struct KTUIDlg * self, uint32_t id, uint32_t selection )
-{   return SetWidgetSelectedString ( KTUIDlgGetWidgetById( self, id ), selection );  }
-
-LIB_EXPORT bool CC KTUIDlgHasWidget ( struct KTUIDlg * self, uint32_t id )
-{   return ( KTUIDlgGetWidgetById( self, id ) != NULL );  }
-
-LIB_EXPORT TUIWGrid_data * CC KTUIDlgGetWidgetGridData( struct KTUIDlg * self, uint32_t id )
-{   return GetWidgetGridData ( KTUIDlgGetWidgetById( self, id ) );  }
-LIB_EXPORT rc_t CC KTUIDlgSetWidgetGridData( struct KTUIDlg * self, uint32_t id, TUIWGrid_data * grid_data, bool cached )
-{   return SetWidgetGridData ( KTUIDlgGetWidgetById( self, id ), grid_data, cached );  }
-
-
-
-/* ****************************************************************************************** */
-
-
-static int32_t KTUIDlgFirstFocus( struct KTUIDlg * self )
-{
-    int32_t res = -1;
-    uint32_t i, n = VectorLength( &self->widgets );
-    for ( i = 0; i < n && res < 0; ++i )
-    {
-        KTUIWidget * w = VectorGet ( &self->widgets, i );
-        if ( w != NULL )
-        {
-            if ( w->can_focus ) res = w->id;
-        }
-    }
-    return res;
-}
-
-
-static int32_t KTUIDlgLastFocus( struct KTUIDlg * self )
-{
-    int32_t res = -1;
-    uint32_t i, n = VectorLength( &self->widgets );
-    for ( i = n-1; i > 0 && res < 0; --i )
-    {
-        KTUIWidget * w = VectorGet ( &self->widgets, i );
-        if ( w != NULL )
-        {
-            if ( w->can_focus ) res = w->id;
-        }
-    }
-    return res;
-}
-
-
-static rc_t KTUIDlgSetFocusTo( struct KTUIDlg * self, KTUIWidget * w )
-{
-    rc_t rc = 0;
-    if ( w->can_focus && !w->focused )
-    {
-        KTUIWidget * has_focus  = KTUIDlgGetWidgetById( self, self->focused );
-        if ( has_focus != NULL )
-        {
-            has_focus->focused = false;
-            if ( has_focus->on_draw != NULL )
-                has_focus->on_draw( has_focus );
-            KTUIDlgPushEvent( self, ktuidlg_event_focus_lost, has_focus->id, 0, 0, NULL );
-        }
-
-        w->focused = true;
-        if ( w->on_draw != NULL )
-            w->on_draw( w );
-        self->focused = w->id;
-        KTUIDlgPushEvent( self, ktuidlg_event_focus, w->id, 0, 0, NULL );
-
-        /* flush it all out... */
-        rc = KTUIFlush ( self->tui, false );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgSetFocus( struct KTUIDlg * self, uint32_t id )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        if ( id == 0 )
-            id = KTUIDlgFirstFocus( self );
-        if ( id > 0 )
-        {
-            KTUIWidget * gets_focus = KTUIDlgGetWidgetById( self, id );
-            if ( gets_focus != NULL )
-                rc = KTUIDlgSetFocusTo( self, gets_focus );
-        }
-    }
-    return rc;
-}
-
-
-static uint32_t KTUIDlgGetNextWidget( struct KTUIDlg * self, uint32_t id, bool forward )
-{
-    uint32_t res = 0;
-    KTUIWidget * w = KTUIDlgGetWidgetById( self, id );
-    if ( w != NULL )
-    {
-        uint32_t n = VectorLength( &self->widgets );
-
-        int32_t vidx = w->vector_idx;
-        if ( forward )
-        {
-            while( ( uint32_t )vidx < n && res == 0 )
-            {
-                vidx++;
-                w = VectorGet ( &self->widgets, vidx );
-                if ( w != NULL && w->can_focus )
-                    res = w->id;
-            }
-            if ( res == 0 )
-                res = KTUIDlgFirstFocus( self );
-        }
-        else
-        {
-            while( vidx > 0 && res == 0 )
-            {
-                vidx--;
-                w = VectorGet ( &self->widgets, vidx );
-                if ( w != NULL && w->can_focus )
-                    res = w->id;
-            }
-            if ( res == 0 )
-                res = KTUIDlgLastFocus( self );
-        }
-    }
-    return res;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgMoveFocus( struct KTUIDlg * self, bool forward )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        uint32_t to_focus = KTUIDlgGetNextWidget( self, self->focused, forward );
-        rc = KTUIDlgSetFocus( self, to_focus );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT bool CC KTUIDlgFocusValid( struct KTUIDlg * self )
-{
-    if ( self == NULL )
-        return false;
-    else
-        return ( KTUIDlgGetWidgetById( self, self->focused ) != NULL );
-}
-
-
-LIB_EXPORT uint32_t CC KTUIDlgGetFocusId( struct KTUIDlg * self )
-{
-    if ( self == NULL )
-        return 0;
-    else
-        return self->focused;
-}
-
-static KTUIWidget * KTUIDlgWidgetAtPoint( struct KTUIDlg * self, tui_point * relative_point )
-{
-    KTUIWidget * res = NULL;
-    uint32_t i, n = VectorLength( &self->widgets );
-    for ( i = 0; i < n && res == NULL; ++i )
-    {
-        KTUIWidget * w = VectorGet ( &self->widgets, i );
-        if ( w != NULL )
-        {
-            uint32_t x_left  = w->r.top_left.x;
-            uint32_t x_right = w->r.top_left.x + w->r.w;
-            if ( relative_point->x >= x_left && relative_point->x < x_right )
-            {
-                uint32_t y_top    = w->r.top_left.y;
-                uint32_t y_bottom = w->r.top_left.y + w->r.h;
-                if ( relative_point->y >= y_top && relative_point->y < y_bottom )
-                    res = w;
-            }
-        }
-    }
-    return res;
-}
-
-
-/* ****************************************************************************************** */
-
-
-static rc_t DlgEventHandler( struct KTUIDlg * self, tui_event * event )
-{
-    rc_t rc = 0;
-    if ( event->event_type == ktui_event_kb )
-    {
-        switch( event->data.kb_data.code )
-        {
-            case ktui_tab   : ;
-            case ktui_down  : ;
-            case ktui_right : rc = KTUIDlgMoveFocus( self, true ); break;
-
-            case ktui_shift_tab : ;
-            case ktui_up    : ;
-            case ktui_left  : rc = KTUIDlgMoveFocus( self, false ); break;
-        }
-    }
-    else if ( event->event_type == ktui_event_mouse )
-    {
-        tui_point p;
-        KTUIWidget * w;
-
-        p.x = event->data.mouse_data.x;
-        p.y = event->data.mouse_data.y;
-        KTUIDlgRelativePoint( self, &p );
-        w = KTUIDlgWidgetAtPoint( self, &p );
-        if ( w != NULL )
-        {
-            rc = KTUIDlgSetFocusTo( self, w );
-            if ( rc == 0 && w->on_event != 0 )
-            {
-                /* now send the mouse-event with coordinates relative to the widget
-                   to this widget */
-
-                tui_event m_event;
-                m_event.event_type = ktui_event_mouse;
-                m_event.data.mouse_data.x = ( p.x - w->r.top_left.x );
-                m_event.data.mouse_data.y = ( p.y - w->r.top_left.y );
-                m_event.data.mouse_data.button = event->data.mouse_data.button;
-                w->on_event( w, &m_event );
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgHandleEvent( struct KTUIDlg * self, tui_event * event )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else if ( event == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcNull );
-    {
-        if ( self->menu_active )
-        {
-            bool redraw = KTUI_Menu_Event( self->menu, self, event );
-            if ( redraw )
-                rc = KTUIDlgDraw( self, false );
-        }
-        else
-        {
-            bool handled = false;
-
-            KTUIWidget * w = KTUIDlgGetWidgetById( self, self->focused );
-            if ( w != NULL &&
-                 w->on_event != NULL &&
-                 event->event_type == ktui_event_kb )
-            {
-                handled = w->on_event( w, event );
-                if ( handled )
-                    event->event_type = ktui_event_none;
-            }
-
-            if ( !handled )
-                rc = DlgEventHandler( self, event );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIDlgGet ( struct KTUIDlg * self, tuidlg_event * event )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else if ( event == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcNull );
-    {
-        tuidlg_event * ev = dlg_event_ring_get( &self->events );
-        if ( ev == NULL )
-        {
-            event->event_type = ktuidlg_event_none;
-        }
-        else
-        {
-            copy_dlg_event( ev, event );
-            dlg_event_ring_put_to_stock( &self->events, ev );
-        }
-    }
-    return rc;
-}
diff --git a/libs/tui/tui_dlg_helper.c b/libs/tui/tui_dlg_helper.c
deleted file mode 100644
index 8553ae8..0000000
--- a/libs/tui/tui_dlg_helper.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <tui/extern.h>
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <kfs/directory.h>
-
-#include <vfs/manager.h>
-#include <vfs/path.h>
-
-#include <tui/tui_dlg.h>
-
-#include <sysalloc.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-
-rc_t native_to_internal( VFSManager * vfs_mgr, const char * native, char * buffer, uint32_t buffer_size, size_t * written )
-{
-    VPath * temp_v_path;
-    rc_t rc = VFSManagerMakeSysPath ( vfs_mgr, &temp_v_path, native );
-    if ( rc == 0 )
-    {
-        rc = VPathReadPath ( temp_v_path, buffer, buffer_size, written );
-        VPathRelease ( temp_v_path );
-    }
-    return rc;
-}
-
-
-rc_t internal_to_native( VFSManager * vfs_mgr, const char * internal, char * buffer, uint32_t buffer_size, size_t * written )
-{
-	rc_t rc = 0;
-	if ( internal[ 0 ] == '/' && internal[ 1 ] == 0 )
-	{
-		buffer[ 0 ] = '/'; buffer[ 1 ] = 0; *written = 1;
-	}
-	else
-	{
-		VPath * temp_v_path;
-		rc = VFSManagerMakePath ( vfs_mgr, &temp_v_path, "%s", internal );
-		if ( rc == 0 )
-		{
-			rc = VPathReadSysPath ( temp_v_path, buffer, buffer_size, written );
-			VPathRelease ( temp_v_path );
-		}
-	}
-    return rc;
-}
-
-
-rc_t set_native_caption( struct KTUIDlg * dlg, VFSManager * vfs_mgr, uint32_t id, const char * internal_path )
-{
-	tui_rect r;
-	rc_t rc = KTUIDlgGetWidgetRect ( dlg, id, &r );
-	if ( rc == 0 )
-	{
-		size_t written = 0;
-		char native[ 4096 ] = "";
-		rc = internal_to_native( vfs_mgr, internal_path, native, sizeof native, &written );
-		if ( rc == 0 )
-		{
-			if ( written <= ( r.w - 2 ) )
-				rc = KTUIDlgSetWidgetCaption ( dlg, id, native );
-			else
-			{
-				size_t written_2;
-				char temp[ 4096 ];
-				uint32_t part = ( r.w - 3 ) / 2;
-				rc = string_printf ( temp, sizeof temp, &written_2,
-						"%.*s ... %s", part, native, &native[ ( written - part ) - 1 ] );
-				if ( rc == 0 )
-					rc = KTUIDlgSetWidgetCaption ( dlg, id, temp );
-			}
-		}
-	}
-	return rc;
-}
-
-
-typedef struct dir_callback_ctx
-{
-	struct KTUIDlg * dlg;
-	const char * str_to_focus;
-	uint32_t widget_id;
-	uint32_t string_id;
-	uint32_t to_focus;
-    bool in_root;
-} dir_callback_ctx;
-
-
-static rc_t add_str_to_listbox( dir_callback_ctx * dctx, const char * name )
-{
-    rc_t rc = 0;
-    if ( dctx->in_root )
-    {
-#ifdef WINDOWS
-        size_t written;
-        char buffer[ 16 ];
-        rc = string_printf( buffer, sizeof buffer, &written, "%s:\\", name );
-        if ( rc == 0 && written > 0 )
-            rc = KTUIDlgAddWidgetString ( dctx->dlg, dctx->widget_id, buffer );
-#else
-        rc = KTUIDlgAddWidgetString ( dctx->dlg, dctx->widget_id, name );
-#endif        
-    }
-    else
-        rc = KTUIDlgAddWidgetString ( dctx->dlg, dctx->widget_id, name );
-    return rc;
-}
-
-
-static rc_t CC on_dir_entry( const KDirectory *dir, uint32_t type, const char * name, void * data )
-{
-    rc_t rc = 0;
-    if ( name != NULL && data != NULL && name[ 0 ] != 0 && name[ 0 ] != '.' )
-    {
-        dir_callback_ctx * dctx = data;
-        if ( ( type & ~kptAlias ) == kptDir )
-		{
-			rc = add_str_to_listbox( dctx, name );
-			if ( rc == 0 )
-			{
-				if ( dctx->str_to_focus != NULL )
-				{
-					int cmp = string_cmp ( name, string_size( name ),
-										   dctx->str_to_focus, string_size( dctx->str_to_focus ), 4096 );
-					if ( cmp == 0 )
-						dctx->to_focus = dctx->string_id;
-				}
-				dctx->string_id++;
-			}
-		}
-    }
-    return rc;
-}
-
-
-rc_t fill_widget_with_dirs( struct KTUIDlg * dlg, KDirectory * dir, uint32_t id, const char * path, const char * to_focus )
-{
-	rc_t rc;
-	
-	dir_callback_ctx dctx;
-	dctx.string_id = 0;
-	dctx.to_focus = 0;
-	dctx.str_to_focus = to_focus;
-	dctx.in_root = ( ( path[ 0 ] == '/' )&&( path[ 1 ] == 0 ) );
-
-	rc = KTUIDlgRemoveAllWidgetStrings ( dlg, id );
-	if ( rc == 0 )
-	{
-		if ( !dctx.in_root )
-		{
-			rc = KTUIDlgAddWidgetString ( dlg, id, "[ .. ]" );
-			dctx.string_id++;
-		}
-	}
-
-	if ( rc == 0 )
-	{
-		dctx.dlg = dlg;
-		dctx.widget_id = id;
-
-		/* we allow it to fail... */
-		KDirectoryVisit ( dir, false, on_dir_entry, &dctx, "%s", path );
-	}
-
-	if ( rc == 0 && dctx.to_focus > 0 )
-		rc = KTUIDlgSetWidgetSelectedString ( dlg, id, dctx.to_focus );
-
-    return rc;
-}
-
-
-typedef struct file_callback_ctx
-{
-    struct KTUIDlg * dlg;
-    const char * extension;
-	uint32_t id;
-} file_callback_ctx;
-
-
-static rc_t CC on_file_entry( const KDirectory *dir, uint32_t type, const char * name, void * data )
-{
-    rc_t rc = 0;
-    if ( name != NULL && data != NULL && name[ 0 ] != 0 && name[ 0 ] != '.' )
-    {
-        file_callback_ctx * fctx = data;
-        if ( ( type & ~kptAlias ) == kptFile )
-        {
-            bool add = ( fctx->extension == NULL );
-            if ( !add )
-            {
-                size_t name_size = string_size ( name );
-                size_t ext_size = string_size ( fctx->extension );
-                if ( name_size > ext_size )
-                {
-                    int cmp = string_cmp ( &name[ name_size - ext_size ], ext_size,
-                                           fctx->extension, ext_size, (uint32_t)ext_size );
-                    add = ( cmp == 0 );
-                }
-            }
-            if ( add )
-				rc = KTUIDlgAddWidgetString ( fctx->dlg, fctx->id, name );
-        }
-    }
-    return rc;
-}
-
-
-rc_t fill_widget_with_files( struct KTUIDlg * dlg, KDirectory * dir, uint32_t id, const char * path, const char * extension )
-{
-	rc_t rc = KTUIDlgRemoveAllWidgetStrings ( dlg, id );
-	if ( rc == 0 )
-    {
-        file_callback_ctx fctx;
-        fctx.extension = extension;
-		fctx.dlg = dlg;
-		fctx.id = id;
-        rc = KDirectoryVisit ( dir, false, on_file_entry, &fctx, "%s", path );
-    }
-    return rc;
-}
diff --git a/libs/tui/tui_menu.c b/libs/tui/tui_menu.c
deleted file mode 100644
index 95d5ce1..0000000
--- a/libs/tui/tui_menu.c
+++ /dev/null
@@ -1,913 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <tui/extern.h>
-
-#include <klib/refcount.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/vector.h>
-#include <klib/namelist.h>
-#include <klib/out.h>
-
-#include <tui/tui.h>
-#include <tui/tui_dlg.h>
-#include "tui_menu.h"
-#include "tui_widget.h"
-
-#include <sysalloc.h>
-#include <stdlib.h>
-
-/* a menu is a tree-structure of nodes,
-   each node has a text and a integer element and a vector of child-nodes
-*/
-
-static const char tuimenu_classname [] = "KTUIMenu";
-
-typedef struct KTUI_Menu_Node
-{
-    Vector children;
-    const char * name;
-    uint32_t id, selected, name_len, max_child_name_len;
-    bool expanded;
-    char shortcut;
-} KTUI_Menu_Node;
-
-
-typedef struct KTUI_Menu
-{
-    KRefcount refcount;
-    KTUI_Menu_Node * root;
-} KTUI_Menu;
-
-
-typedef struct menu_ac
-{
-    const tui_ac * dflt;
-    const tui_ac * select;
-    const tui_ac * high;
-} menu_ac;
-
-
-static void destroy_node( struct KTUI_Menu_Node * node );
-
-static void CC destroy_node_callback ( void *item, void *data )
-{
-    destroy_node( ( KTUI_Menu_Node * ) item );
-}
-
-static void destroy_node( struct KTUI_Menu_Node * node )
-{
-    VectorWhack ( &node->children, destroy_node_callback, NULL );
-    free( ( void * ) node->name );
-    free( node );
-}
-
-static void destroy_menu( struct KTUI_Menu * self )
-{
-    destroy_node( self->root );
-    free( self );
-}
-
-
-static KTUI_Menu_Node * make_node ( KTUI_Menu_Node * parent, const char * name, uint32_t id, char shortcut )
-{
-    KTUI_Menu_Node * res = malloc( sizeof * res );
-    if ( res != NULL )
-    {
-        size_t l;
-        res->name = string_dup_measure ( name, &l );
-        res->name_len = ( uint32_t )l;
-        res->id = id;
-        res->shortcut = shortcut;
-        res->selected = 0;
-        res->max_child_name_len = 0;
-        VectorInit ( &res->children, 0, 12 );
-        if ( parent != NULL )
-        {
-            VectorAppend ( &parent->children, NULL, res );
-            if ( res->name_len > parent->max_child_name_len )
-                parent->max_child_name_len = res->name_len;
-        }
-    }
-    return res;
-}
-
-
-static int nlt_strcmp( const char* s1, const char* s2 )
-{
-    size_t n1 = string_size ( s1 );
-    size_t n2 = string_size ( s2 );
-    uint32_t maxchar = ( n1 < n2 ) ? ( uint32_t )n2 : ( uint32_t )n1;
-    return string_cmp ( s1, n1, s2, n2, maxchar );
-}
-
-
-static KTUI_Menu_Node * find_node_by_name_flat ( KTUI_Menu_Node * root, const char * name )
-{
-    KTUI_Menu_Node * res = NULL;
-    if ( root != NULL && name != NULL && name[ 0 ] != 0 )
-    {
-        uint32_t count = VectorLength( &root->children );
-        if ( count > 0 )
-        {
-            uint32_t idx;
-            for ( idx = VectorStart( &root->children ); idx < count && res == NULL; ++idx )
-            {
-                KTUI_Menu_Node * node = VectorGet ( &root->children, idx );
-                if ( nlt_strcmp( node->name, name ) == 0 )
-                    res = node;
-            }
-        }
-    }
-    return res;
-}
-
-
-#if 0
-static KTUI_Menu_Node * find_node_by_name ( KTUI_Menu_Node * root, const char * name )
-{
-    KTUI_Menu_Node * res = NULL;
-    if ( root != NULL && name != NULL && name[ 0 ] != 0 )
-    {
-        if ( nlt_strcmp( root->name, name ) == 0 )
-            res = root;
-        else
-        {
-            uint32_t count = VectorLength( &root->children );
-            if ( count > 0 )
-            {
-                uint32_t idx;
-                for ( idx = VectorStart( &root->children ); idx < count && res == NULL; ++idx )
-                {
-                    KTUI_Menu_Node * node = VectorGet ( &root->children, idx );
-                    res = find_node_by_name ( node, name ); /* recursion */
-                }
-            }
-        }
-    }
-    return res;
-}
-#endif
-
-static bool find_node_by_id ( KTUI_Menu_Node * node, uint32_t id, KTUI_Menu_Node ** found, KTUI_Menu_Node ** parent )
-{
-    bool res = false;
-    *found = NULL;
-    *parent = NULL;
-    if ( node != NULL )
-    {
-        if ( node->id == id )
-            *found = node;
-        else
-        {
-            uint32_t count = VectorLength( &node->children );
-            if ( count > 0 )
-            {
-                uint32_t idx;
-                for ( idx = VectorStart( &node->children ); idx < count && !res; ++idx )
-                {
-                    KTUI_Menu_Node * sub = VectorGet ( &node->children, idx );
-                    res = ( sub->id == id );
-                    if ( res )
-                    {
-                        *found = sub;
-                        *parent = node;
-                    }
-                    else
-                        res = find_node_by_id ( sub, id, found, parent ); /* recursion */
-                }
-            }
-        }
-    }
-    return res;
-}
-
-
-LIB_EXPORT rc_t CC KTUI_Menu_Make ( struct KTUI_Menu ** self )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        KTUI_Menu * m = malloc( sizeof * m );
-        if ( m == NULL )
-            rc = RC( rcApp, rcAttr, rcCreating, rcMemory, rcExhausted );
-        else
-        {
-            KRefcountInit( &m->refcount, 1, "KTUI_Menu", "make", tuimenu_classname );
-            m->root = make_node ( NULL, "root", 0, ' ' );
-            m->root->expanded = true;
-            ( * self ) = m;
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUI_Menu_AddRef ( const struct KTUI_Menu * self )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        switch ( KRefcountAdd( &self->refcount, tuimenu_classname ) )
-        {
-        case krefOkay :
-            break;
-        case krefZero :
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcIncorrect );
-        case krefLimit :
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcExhausted );
-        case krefNegative :
-            rc =  RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcInvalid );
-        default :
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcUnknown );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUI_Menu_Release ( struct KTUI_Menu * self )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop( &self->refcount, tuimenu_classname ) )
-        {
-        case krefOkay :
-        case krefZero :
-            break;
-        case krefWhack : destroy_menu( ( struct KTUI_Menu * ) self ); break;
-            break;
-        case krefNegative:
-            return RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcInvalid );
-        default:
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcUnknown );
-            break;            
-        }
-    }
-    return rc;
-}
-
-
-static rc_t append_segment( const char * path, VNamelist * segments, uint32_t start, uint32_t end )
-{
-    String S;
-    uint32_t l = ( end-start ) + 1;
-    StringInit( &S, &path[ start ], l, l );
-    return VNamelistAppendString ( segments, &S );
-}
-
-
-static rc_t decompose_path( const char * path, VNamelist * segments )
-{
-    rc_t rc = 0;
-    uint32_t len = string_measure ( path, NULL );
-    if ( len > 1 && path[ 0 ] == '/' )
-    {
-        uint32_t i, start = 1, end = 1;
-        for ( i = 1; i < len && rc == 0; ++ i )
-        {
-            if ( path[ i ] == '/' )
-            {
-                if ( end > start )
-                {
-                    rc = append_segment( path, segments, start, end );
-                    start = end = i + 1;
-                }
-                else
-                    rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcInvalid );
-            }
-            else
-                end = i;
-        }
-        if ( rc == 0 && ( end > start ) )
-            rc = append_segment( path, segments, start, end );
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcInvalid );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUI_Menu_Add ( struct KTUI_Menu * self, const char * path, uint32_t id, char shortcut )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else if ( path == NULL || path[ 0 ] == 0 )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcNull );
-    {
-        /* take the path apart into a VNamelist with '/' as separator */
-        VNamelist * segments;
-        rc = VNamelistMake ( &segments, 5 );
-        if ( rc == 0 )
-        {
-            rc = decompose_path( path, segments );
-            if ( rc == 0 )
-            {
-                uint32_t count;
-                rc = VNameListCount ( segments, &count );
-                if ( rc == 0 && count > 0 )
-                {
-                    uint32_t i;
-                    KTUI_Menu_Node * node = self->root;
-                    for ( i = 0; i < count && node != NULL && rc == 0; ++i )
-                    {
-                        const char * segment;
-                        rc = VNameListGet ( segments, i, &segment );
-                        if ( rc == 0 && segment != NULL )
-                        {
-                            KTUI_Menu_Node * sub = find_node_by_name_flat ( node, segment );
-                            if ( sub == NULL )
-                            {
-                                if ( i == ( count - 1 ) )
-                                    sub = make_node ( node, segment, id, shortcut );
-                                else
-                                    sub = make_node ( node, segment, 0, 0 );
-                            }
-                            node = sub;
-                        }
-                    }
-                }
-            }
-            VNamelistRelease ( segments );
-        }
-    }
-    return rc;
-}
-
-
-static bool find_index_of_child( KTUI_Menu_Node * node, uint32_t child_id, uint32_t * idx )
-{
-    bool res = false;
-    uint32_t count = VectorLength( &node->children );
-    if ( count > 0 )
-    {
-        uint32_t i;
-        for ( i = VectorStart( &node->children ); i < count && !res; ++i )
-        {
-            KTUI_Menu_Node * child = VectorGet ( &node->children, i );
-            res = ( child->id == child_id );
-        }
-    }
-    return res;
-}
-
-
-LIB_EXPORT rc_t CC KTUI_Menu_Remove_Id ( struct KTUI_Menu * self, uint32_t id )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcRemoving, rcSelf, rcNull );
-    else
-    {
-        KTUI_Menu_Node * node;
-        KTUI_Menu_Node * parent;
-        bool found = find_node_by_id ( self->root, id, &node, &parent );
-        if ( !found )
-            rc = RC( rcApp, rcAttr, rcRemoving, rcItem, rcNotFound );
-        else
-        {
-            /* find out which index the node has in it's parents list */
-            uint32_t idx;
-            found = find_index_of_child( parent, id, &idx );
-            if ( !found )
-                rc = RC( rcApp, rcAttr, rcRemoving, rcItem, rcInvalid ); /* something is wrong ! */
-            else
-            {
-                void * removed;
-                rc = VectorRemove ( &parent->children, idx, &removed );
-                if ( rc == 0 )
-                    destroy_node( ( KTUI_Menu_Node * ) removed );
-            }
-        }
-    }
-    return rc;
-}
-
-
-void KTUI_Menu_Report_Node ( KTUI_Menu_Node * node, uint32_t depth )
-{
-    uint32_t count = VectorLength( &node->children );
-    KOutMsg( "%*s [ %.03d ] %s ( %d children )\n", depth + 1, "-", node->id, node->name, count );
-    if ( count > 0 )
-    {
-        uint32_t i;
-        for ( i = VectorStart( &node->children ); i < count; ++i )
-        {
-            KTUI_Menu_Node * child = VectorGet ( &node->children, i );
-            if ( child != NULL )
-                KTUI_Menu_Report_Node ( child, depth + 1 ); /* recursion! */
-        }
-    }
-}
-
-
-void KTUI_Menu_Report ( struct KTUI_Menu * self )
-{
-    if ( self == NULL )
-        KOutMsg( "KTUI_Menu_Report: self == NULL" );
-    else if ( self->root == NULL )
-        KOutMsg( "KTUI_Menu_Report: self->root == NULL" );
-    else
-        KTUI_Menu_Report_Node ( self->root, 0 );
-}
-
-
-
-static void draw_node_txt( struct KTUI * tui, tui_point * p, menu_ac * m_ac,
-                           const char * txt, char shortcut, bool selected )
-{
-    size_t txt_size;
-    uint32_t txt_len = string_measure ( txt, &txt_size );
-    const tui_ac * ac = selected ? m_ac->select : m_ac->dflt;
-    DlgWrite( tui, p->x + 1, p->y, ac, txt, txt_len );
-    if ( shortcut != 0 )
-    {
-        char * sptr = string_chr ( txt, txt_size, shortcut );
-        if ( sptr != NULL )
-        {
-            tui_ac ach;
-            copy_ac( &ach, ac );
-            ach.fg = m_ac->high->fg;
-            DlgWrite( tui, p->x + 1 + ( uint32_t )( sptr - txt ), p->y, &ach, sptr, 1 );
-        }
-    }
-}
-
-
-static void draw_node_v( KTUI_Menu_Node * node, struct KTUI * tui, tui_point * p, menu_ac * m_ac )
-{
-    if ( node != NULL )
-    {
-        uint32_t count = VectorLength( &node->children );
-        if ( count > 0 )
-        {
-            uint32_t i, w = node->max_child_name_len + 2;
-            draw_background( tui, false, p, w, count, m_ac->dflt->bg );
-
-            for ( i = VectorStart( &node->children ); i < count; ++i )
-            {
-                KTUI_Menu_Node * child = VectorGet ( &node->children, i );
-                if ( child != NULL )
-                {
-                    bool selected = ( node->selected == i );
-                    draw_node_txt( tui, p, m_ac, child->name, child->shortcut, selected );
-                    if ( child->expanded && selected )
-                    {
-                        tui_point p_sub;
-                        p_sub.x = p->x + w;
-                        p_sub.y = p->y;
-                        draw_node_v( child, tui, &p_sub, m_ac ); /* recursion here ! */
-                    }
-                    p->y++;
-                }
-            }
-        }
-    }
-}
-
-
-static void draw_node_h( KTUI_Menu_Node * node, struct KTUI * tui,
-                         const tui_rect * r, menu_ac * m_ac )
-{
-    if ( node != NULL )
-    {
-        uint32_t count = VectorLength( &node->children );
-        if ( count > 0 )
-        {
-            uint32_t i, x;
-            for ( x = r->top_left.x, i = VectorStart( &node->children ); i < count; ++i )
-            {
-                KTUI_Menu_Node * child = VectorGet ( &node->children, i );
-                if ( child != NULL )
-                {
-                    tui_point p;
-                    bool selected = ( node->selected == i );
-                    p.x = x + 1;
-                    p.y = r->top_left.y;
-                    draw_node_txt( tui, &p, m_ac, child->name, child->shortcut, selected && !child->expanded );
-                    if ( selected && child->expanded )
-                    {
-                        p.x = x + 1;
-                        p.y = r->top_left.y + 1;
-                        draw_node_v( child, tui, &p, m_ac );
-                    }
-                    x += ( child->name_len + 2 );
-                }
-            }
-        }
-    }
-}
-
-
-static rc_t get_abs_dlg_rect( struct KTUIDlg * dlg, tui_rect * r )
-{
-    tui_rect rr;
-    rc_t rc = KTUIDlgGetRect ( dlg, &rr );
-    if ( rc == 0 )
-        rc = KTUIDlgAbsoluteRect ( dlg, r, &rr );
-    return rc;
-}
-
-
-void KTUI_Menu_Draw( struct KTUI_Menu * self, struct KTUIDlg * dlg )
-{
-    tui_rect r;
-    rc_t rc = get_abs_dlg_rect( dlg, &r );
-    if ( rc == 0 )
-    {
-        const struct KTUIPalette * pa = KTUIDlgGetPalette ( dlg );
-        if ( pa != NULL )
-        {
-            menu_ac m_ac;
-            m_ac.dflt   = KTUIPaletteGet ( pa, ktuipa_menu );
-            m_ac.select = KTUIPaletteGet ( pa, ktuipa_menu_sel );
-            m_ac.high   = KTUIPaletteGet ( pa, ktuipa_menu_hi );
-            if ( m_ac.dflt != NULL && m_ac.select != NULL && m_ac.high != NULL )
-            {
-                struct KTUI * tui = KTUIDlgGetTui ( dlg );
-                if ( tui != NULL )
-                {
-                    rc_t rc = draw_background( tui, false, ( tui_point * )&r.top_left, r.w, 1, m_ac.dflt->bg );
-                    if ( rc == 0 )
-                        draw_node_h( self->root, tui, &r, &m_ac );
-                }
-            }
-        }
-    }
-}
-
-
-static KTUI_Menu_Node * get_sub_node( KTUI_Menu_Node * node, uint32_t idx )
-{
-    if ( node != NULL )
-        return VectorGet ( &node->children, idx );
-    else
-        return NULL;
-}
-
-
-static bool shift_node_selection( KTUI_Menu_Node * node, int32_t by )
-{
-    bool res = false;
-    uint32_t count = VectorLength( &node->children );
-    if ( count > 0 )
-    {
-        int32_t selected = node->selected;
-        selected += by;
-        while ( selected < 0 )
-            selected += count;
-        while ( ( uint32_t )selected >= count )
-            selected -= count;
-        res = ( node->selected != selected );
-        if ( res ) node->selected = selected;
-    }
-    return res;
-}
-
-
-static bool menu_select_h( struct KTUI_Menu * self, int32_t by )
-{
-    bool res = false;
-    KTUI_Menu_Node * node = self->root;
-    if ( node != NULL )
-        res = shift_node_selection( node, by );
-    return res;
-}
-
-static KTUI_Menu_Node * menu_get_expanded_node( struct KTUI_Menu * self )
-{
-    KTUI_Menu_Node * node = self->root;
-    if ( node != NULL )
-        node = get_sub_node( node, node->selected );
-    while ( node != NULL && node->expanded )
-        node = get_sub_node( node, node->selected );
-    return node;
-}
-
-
-static bool selected_node_expanded( KTUI_Menu_Node * node )
-{
-    bool res = false;
-    KTUI_Menu_Node * sub_node = get_sub_node( node, node->selected );
-    if ( sub_node != NULL )
-        res = sub_node->expanded;
-    return res;
-}
-
-
-static bool menu_select_v( struct KTUI_Menu * self, int32_t by )
-{
-    bool res = false;
-
-    KTUI_Menu_Node * node = self->root;
-    if ( node != NULL )
-        node = get_sub_node( node, node->selected );
-    while ( node != NULL && selected_node_expanded( node ) )
-        node = get_sub_node( node, node->selected );
-
-    if ( node != NULL )
-    {
-        if ( !node->expanded && ( VectorLength( &node->children ) > 0 ) )
-        {
-            node->expanded = true;
-            res = true;
-        }
-        else
-        {
-            if ( node->selected == 0 && by < 0 )
-            {
-                node->expanded = false;
-                res = true;
-            }
-            else
-                res = shift_node_selection( node, by );
-        }
-    }
-    return res;
-}
-
-
-static bool menu_select( struct KTUI_Menu * self, struct KTUIDlg * dlg )
-{
-    bool res = false;
-    KTUI_Menu_Node * node = menu_get_expanded_node( self );
-    if ( node != NULL )
-    {
-        uint32_t count = VectorLength( &node->children );
-        if ( count == 0 )
-            KTUIDlgPushEvent( dlg, ktuidlg_event_menu, node->id, 0, 0, NULL );
-        else
-        {
-            node->expanded = !node->expanded;
-            res = true;
-        }
-    }
-    return res;
-}
-
-
-static KTUI_Menu_Node * x_coordinate_to_top_node( KTUI_Menu_Node * node, uint32_t x, uint32_t * idx )
-{
-    KTUI_Menu_Node * res = NULL;
-    if ( node != NULL )
-    {
-        uint32_t count = VectorLength( &node->children );
-        if ( count > 0 )
-        {
-            uint32_t i, x1;
-            for ( x1 = 0, i = VectorStart( &node->children ); i < count && res == NULL; ++i )
-            {
-                KTUI_Menu_Node * child = VectorGet ( &node->children, i );
-                if ( child != NULL )
-                {
-                    uint32_t w = child->name_len + 2;
-                    if ( x >= x1 && x <= x1 + w )
-                    {
-                        res = child;
-                        *idx = i;
-                    }
-                    else
-                        x1 += w;
-                }
-            }
-        }
-    }
-    return res;
-}
-
-
-static bool on_mouse( struct KTUI_Menu * self, struct KTUIDlg * dlg, tui_rect * r, uint32_t x, uint32_t y )
-{
-    bool res = false;
-    if ( y >= r->top_left.y )
-    {
-        /* the mouse was not left of the windows */
-        uint32_t idx;
-        KTUI_Menu_Node * top_node = x_coordinate_to_top_node( self->root, x - r->top_left.x, &idx );
-        if ( top_node != NULL )
-        {
-            int32_t h_idx = y;
-            h_idx -= r->top_left.y;
-            if ( h_idx == 0 )
-            {
-                /* the mouse is in the top menu-line */
-                res = ( self->root->selected != idx || !top_node->expanded );
-                if ( res )
-                {
-                    top_node->expanded = true;
-                    self->root->selected = idx;
-                }
-            }
-            else
-            {
-                /* the mouse is not in the top menu-line */
-                res = ( self->root->selected == idx && top_node->expanded && ( h_idx > 0 ) );
-                if ( res )
-                {
-                    /* the mouse is below the the top menu-line and the menu is expanded and selected */
-                    uint32_t count = VectorLength( &top_node->children );
-                    h_idx--;
-                    res = ( ( uint32_t )h_idx < count );
-                    if ( res )
-                    {
-                        KTUI_Menu_Node * sub_node = get_sub_node( top_node, h_idx );
-                        top_node->selected = h_idx;
-                        if ( sub_node != NULL )
-                        {
-                            count = VectorLength( &sub_node->children );
-                            if ( count == 0 )
-                                KTUIDlgPushEvent( dlg, ktuidlg_event_menu, sub_node->id, 0, 0, NULL );
-                            else
-                            {
-
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-    return res;
-}
-
-
-static bool menu_all_shortcut( KTUI_Menu_Node * node, KTUI_Menu_Node * parent, uint32_t node_id, struct KTUIDlg * dlg, char key )
-{
-    bool res = false;
-    if ( node != NULL )
-    {
-        uint32_t idx, count = VectorLength( &node->children );
-        res = ( node->shortcut == key );
-        if ( res )
-        {
-            /* we have found a node with the requested shortcut */
-            if ( count == 0 )
-            {
-                /* the node has no sub-nodes: we have found what we were looking for! */
-                KTUIDlgPushEvent( dlg, ktuidlg_event_menu, node->id, 0, 0, NULL );
-            }
-            else
-            {
-                /* the node has sub-nodes: we have to dig deeper */
-                if ( !node->expanded )
-                {
-                    /* the node is not expanded: let's expand it, do not examime it's sub-nodes */
-                    node->expanded = true;
-                }
-                else
-                {
-                    if ( parent != NULL && parent->selected == node_id )
-                    {
-                        bool sub_res = false;
-                        /* the node is expanded: lets dig deeper into it's subnodes */
-                        for ( idx = 0; idx < count && !sub_res; ++idx )
-                            sub_res = menu_all_shortcut( VectorGet ( &node->children, idx ), node, idx, dlg, key ); /* recursion */
-                    }
-                }
-                /* in any case we have an expanded subnode now, select it too now */
-                if ( parent != NULL )
-                    parent->selected = node_id;
-            }
-        }
-        else
-        {
-            /* the node does not match the requested shortcut, let's inspect it's subnodes */
-            for ( idx = 0; idx < count && !res; ++idx )
-                res = menu_all_shortcut( VectorGet ( &node->children, idx ), node, idx, dlg, key ); /* recursion */
-        }
-    }
-    return res;
-}
-
-
-/* try to find the key in the expanded path */
-static bool menu_path_shortcut( KTUI_Menu_Node * node, struct KTUIDlg * dlg, char key )
-{
-    bool res = false;
-    if ( node != NULL )
-    {
-        uint32_t count = VectorLength( &node->children );
-        res = ( node->shortcut == key && count == 0 );
-        if ( res )
-            KTUIDlgPushEvent( dlg, ktuidlg_event_menu, node->id, 0, 0, NULL );
-        else
-            res = menu_path_shortcut( VectorGet ( &node->children, node->selected ), dlg, key ); /* recursion here */
-    }
-    return res;
-}
-
-
-/* try to find the key in the child-vector of root ( does expand/un-expand top-level drop-down menus ) */
-static bool menu_root_shortcut( KTUI_Menu_Node * root, struct KTUIDlg * dlg, char key )
-{
-    bool res = false;
-    if ( root != NULL )
-    {
-        uint32_t idx, count = VectorLength( &root->children );
-        for ( idx = 0; idx < count && !res; ++idx )
-        {
-            KTUI_Menu_Node * node = VectorGet ( &root->children, idx );
-            res = ( node != NULL && node->shortcut == key );
-            if ( res )
-            {
-                uint32_t c_count = VectorLength( &node->children );
-                if ( c_count == 0 )
-                    KTUIDlgPushEvent( dlg, ktuidlg_event_menu, node->id, 0, 0, NULL );
-                else
-                {
-                    if ( root->selected == idx )
-                        node->expanded = !node->expanded;
-                    else
-                    {
-                        node->expanded = true;
-                        root->selected = idx;
-                    }
-                }
-            }
-        }
-    }
-    return res;
-}
-
-
-/*
-static bool is_the_selected_node_expanded( KTUI_Menu_Node * node )
-{
-    bool res = false;
-    if ( node != NULL && node->expanded )
-    {
-        KTUI_Menu_Node * sub = VectorGet ( &node->children, node->selected );
-        if ( sub != NULL )
-            res = sub->expanded;
-    }
-    return res;
-}
-*/
-
-static bool menu_shortcut( struct KTUI_Menu * self, struct KTUIDlg * dlg, tui_event * event )
-{
-    char key = event->data.kb_data.key;
-    bool res = menu_path_shortcut( self->root, dlg, key );
-    if ( !res )
-        res = menu_root_shortcut( self->root, dlg, key );
-    if ( !res )
-        res = menu_all_shortcut( self->root, NULL, 0, dlg, key );
-    return res;
-}
-
-
-bool KTUI_Menu_Event( struct KTUI_Menu * self, struct KTUIDlg * dlg, tui_event * event )
-{
-    bool res = false;
-    if ( event->event_type == ktui_event_kb )
-    {
-        switch( event->data.kb_data.code )
-        {
-            case ktui_left  : res = menu_select_h( self, -1 ); break;
-            case ktui_right : res = menu_select_h( self, +1 ); break;
-            case ktui_up    : res = menu_select_v( self, -1 ); break;
-            case ktui_down  : res = menu_select_v( self, +1 ); break;
-            case ktui_enter : res = menu_select( self, dlg ); break;
-            case ktui_alpha : res = menu_shortcut( self, dlg, event ); break;
-        }
-    }
-    else if ( event->event_type == ktui_event_mouse )
-    {
-        tui_rect r;
-        rc_t rc = get_abs_dlg_rect( dlg, &r );
-        if ( rc == 0 )
-            res = on_mouse( self, dlg, &r, event->data.mouse_data.x, event->data.mouse_data.y );
-    }
-    return res;
-}
diff --git a/libs/tui/tui_menu.h b/libs/tui/tui_menu.h
deleted file mode 100644
index bdf0499..0000000
--- a/libs/tui/tui_menu.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_tui_menu_
-#define _h_tui_menu_
-
-#include <tui/tui.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-struct KTUI_Menu;
-
-void KTUI_Menu_Report ( struct KTUI_Menu * self );
-
-void KTUI_Menu_Draw( struct KTUI_Menu * self, struct KTUIDlg * dlg );
-
-bool KTUI_Menu_Event( struct KTUI_Menu * self, struct KTUIDlg * dlg, tui_event * event );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_tui_menu_ */
diff --git a/libs/tui/tui_palette.c b/libs/tui/tui_palette.c
deleted file mode 100644
index 0c75d18..0000000
--- a/libs/tui/tui_palette.c
+++ /dev/null
@@ -1,304 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <tui/extern.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-
-#include <tui/tui.h>
-#include <tui/tui_dlg.h>
-
-#include <sysalloc.h>
-#include <stdlib.h>
-
-typedef struct KTUIPalette
-{
-    KRefcount refcount;
-    tui_ac entry[ ktuipa_last ];
-} KTUIPalette;
-
-static const char tuipa_classname [] = "KTUIPalette";
-
-/* the hardcoded default values... */
-#define INVALID_ATTR KTUI_a_none
-#define INVALID_FG KTUI_c_white
-#define INVALID_BG KTUI_c_gray
-
-#define DFL_DLG_ATTR KTUI_a_none
-#define DFL_DLG_FG KTUI_c_white
-#define DFL_DLG_BG KTUI_c_light_gray
-
-#define DFL_DLG_CAPTION_ATTR KTUI_a_none
-#define DFL_DLG_CAPTION_FG KTUI_c_white
-#define DFL_DLG_CAPTION_BG KTUI_c_gray
-
-#define DFL_DLG_FOCUS_ATTR KTUI_a_none
-#define DFL_DLG_FOCUS_FG KTUI_c_white
-#define DFL_DLG_FOCUS_BG KTUI_c_red
-
-#define DFL_LABEL_ATTR KTUI_a_none
-#define DFL_LABEL_FG KTUI_c_white
-#define DFL_LABEL_BG KTUI_c_gray
-
-#define DFL_BUTTON_ATTR KTUI_a_none
-#define DFL_BUTTON_FG KTUI_c_white
-#define DFL_BUTTON_BG KTUI_c_gray
-
-#define DFL_CHECKBOX_ATTR KTUI_a_none
-#define DFL_CHECKBOX_FG KTUI_c_white
-#define DFL_CHECKBOX_BG KTUI_c_gray
-
-#define DFL_INPUT_ATTR KTUI_a_none
-#define DFL_INPUT_FG KTUI_c_black
-#define DFL_INPUT_BG KTUI_c_white
-
-#define DFL_INPUT_HINT_ATTR KTUI_a_none
-#define DFL_INPUT_HINT_FG KTUI_c_black
-#define DFL_INPUT_HINT_BG KTUI_c_red
-
-#define DFL_RADIOBOX_ATTR KTUI_a_none
-#define DFL_RADIOBOX_FG KTUI_c_white
-#define DFL_RADIOBOX_BG KTUI_c_gray
-
-#define DFL_LIST_ATTR KTUI_a_none
-#define DFL_LIST_FG KTUI_c_white
-#define DFL_LIST_BG KTUI_c_gray
-
-#define DFL_PROGRESS_ATTR KTUI_a_none
-#define DFL_PROGRESS_FG KTUI_c_white
-#define DFL_PROGRESS_BG KTUI_c_gray
-
-#define DFL_SPINEDIT_ATTR KTUI_a_none
-#define DFL_SPINEDIT_FG KTUI_c_white
-#define DFL_SPINEDIT_BG KTUI_c_gray
-
-#define DFL_GRID_ATTR KTUI_a_none
-#define DFL_GRID_FG KTUI_c_black
-#define DFL_GRID_BG KTUI_c_gray
-
-#define DFL_GRID_COL_HDR_ATTR KTUI_a_none
-#define DFL_GRID_COL_HDR_FG KTUI_c_black
-#define DFL_GRID_COL_HDR_BG KTUI_c_white
-
-#define DFL_GRID_ROW_HDR_ATTR KTUI_a_none
-#define DFL_GRID_ROW_HDR_FG KTUI_c_black
-#define DFL_GRID_ROW_HDR_BG KTUI_c_white
-
-#define DFL_GRID_CURSOR_ATTR KTUI_a_none
-#define DFL_GRID_CURSOR_FG KTUI_c_yellow
-#define DFL_GRID_CURSOR_BG KTUI_c_black
-
-#define DFL_MENU_ATTR KTUI_a_none
-#define DFL_MENU_FG KTUI_c_gray
-#define DFL_MENU_BG KTUI_c_dark_blue
-
-#define DFL_MENU_SEL_ATTR KTUI_a_bold
-#define DFL_MENU_SEL_FG KTUI_c_white
-#define DFL_MENU_SEL_BG KTUI_c_dark_blue
-
-#define DFL_MENU_HI_ATTR KTUI_a_none
-#define DFL_MENU_HI_FG KTUI_c_cyan
-#define DFL_MENU_HI_BG KTUI_c_dark_blue
-
-
-static void write_default_values ( struct KTUIPalette * self )
-{
-    set_ac( &self->entry[ ktuipa_dlg ], DFL_DLG_ATTR, DFL_DLG_FG, DFL_DLG_BG );
-    set_ac( &self->entry[ ktuipa_dlg_caption ], DFL_DLG_CAPTION_ATTR, DFL_DLG_CAPTION_FG, DFL_DLG_CAPTION_BG );
-    set_ac( &self->entry[ ktuipa_dlg_focus ], DFL_DLG_FOCUS_ATTR, DFL_DLG_FOCUS_FG, DFL_DLG_FOCUS_BG );
-
-    set_ac( &self->entry[ ktuipa_label ], DFL_LABEL_ATTR, DFL_LABEL_FG, DFL_LABEL_BG );
-    set_ac( &self->entry[ ktuipa_button ], DFL_BUTTON_ATTR, DFL_BUTTON_FG, DFL_BUTTON_BG );
-    set_ac( &self->entry[ ktuipa_checkbox ], DFL_CHECKBOX_ATTR, DFL_CHECKBOX_FG, DFL_CHECKBOX_BG );
-    set_ac( &self->entry[ ktuipa_input ], DFL_INPUT_ATTR, DFL_INPUT_FG, DFL_INPUT_BG );
-    set_ac( &self->entry[ ktuipa_input_hint ], DFL_INPUT_HINT_ATTR, DFL_INPUT_HINT_FG, DFL_INPUT_HINT_BG );
-    set_ac( &self->entry[ ktuipa_radiobox ], DFL_RADIOBOX_ATTR, DFL_RADIOBOX_FG, DFL_RADIOBOX_BG );
-    set_ac( &self->entry[ ktuipa_list ], DFL_LIST_ATTR, DFL_LIST_FG, DFL_LIST_BG );
-    set_ac( &self->entry[ ktuipa_progress ], DFL_PROGRESS_ATTR, DFL_PROGRESS_FG, DFL_PROGRESS_BG );
-    set_ac( &self->entry[ ktuipa_spinedit ], DFL_SPINEDIT_ATTR, DFL_SPINEDIT_FG, DFL_SPINEDIT_BG );
-    set_ac( &self->entry[ ktuipa_grid ], DFL_GRID_ATTR, DFL_GRID_FG, DFL_GRID_BG );
-
-    set_ac( &self->entry[ ktuipa_grid_col_hdr ], DFL_GRID_COL_HDR_ATTR, DFL_GRID_COL_HDR_FG, DFL_GRID_COL_HDR_BG );
-    set_ac( &self->entry[ ktuipa_grid_row_hdr ], DFL_GRID_ROW_HDR_ATTR, DFL_GRID_ROW_HDR_FG, DFL_GRID_ROW_HDR_BG );
-    set_ac( &self->entry[ ktuipa_grid_cursor ], DFL_GRID_CURSOR_ATTR, DFL_GRID_CURSOR_FG, DFL_GRID_CURSOR_BG );
-
-    set_ac( &self->entry[ ktuipa_menu ], DFL_MENU_ATTR, DFL_MENU_FG, DFL_MENU_BG );
-    set_ac( &self->entry[ ktuipa_menu_sel ], DFL_MENU_SEL_ATTR, DFL_MENU_SEL_FG, DFL_MENU_SEL_BG );
-    set_ac( &self->entry[ ktuipa_menu_hi ], DFL_MENU_HI_ATTR, DFL_MENU_HI_FG, DFL_MENU_HI_BG );
-}
-
-
-LIB_EXPORT rc_t CC KTUIPaletteMake ( struct KTUIPalette ** self )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        KTUIPalette * pa = malloc( sizeof * pa );
-        if ( pa == NULL )
-            rc = RC( rcApp, rcAttr, rcCreating, rcMemory, rcExhausted );
-        else
-        {
-            KRefcountInit( &pa->refcount, 1, "KTUIPalette", "make", tuipa_classname );
-            write_default_values ( pa );
-            ( * self ) = pa;
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIPaletteAddRef ( const struct KTUIPalette * self )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        switch ( KRefcountAdd( &self->refcount, tuipa_classname ) )
-        {
-        case krefOkay :
-            break;
-        case krefZero :
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcIncorrect );
-        case krefLimit :
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcExhausted );
-        case krefNegative :
-            rc =  RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcInvalid );
-        default :
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcUnknown );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIPaletteRelease ( const struct KTUIPalette * self )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop( &self->refcount, tuipa_classname ) )
-        {
-        case krefOkay :
-        case krefZero :
-            break;
-        case krefWhack :
-            free( ( void * ) self );
-            break;
-        case krefNegative:
-            return RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcInvalid );
-        default:
-            rc = RC( rcNS, rcMgr, rcAttaching, rcRefcount, rcUnknown );
-            break;            
-        }
-    }
-    return rc;
-}
-
-
-static tui_ac invalid_entry = { INVALID_ATTR, INVALID_FG, INVALID_BG };
-
-
-LIB_EXPORT const tui_ac * CC KTUIPaletteGet ( const struct KTUIPalette * self, KTUIPa_entry what )
-{
-    if ( self != NULL && what >= ktuipa_dlg && what < ktuipa_last )
-        return &self->entry[ what ];
-    else 
-        return &invalid_entry;
-}
-
-
-LIB_EXPORT rc_t CC KTUIPaletteSet ( struct KTUIPalette * self, KTUIPa_entry what, const tui_ac * ac )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else if ( ac == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcNull );
-    else if ( what < ktuipa_dlg || what >= ktuipa_last )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcInvalid );
-    else
-        copy_ac( &self->entry[ what ], ac );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIPaletteSet_fg ( struct KTUIPalette * self, KTUIPa_entry what, KTUI_color fg )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else if ( what < ktuipa_dlg || what >= ktuipa_last )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcInvalid );
-    else
-        self->entry[ what ].fg = fg;
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIPaletteSet_bg ( struct KTUIPalette * self, KTUIPa_entry what, KTUI_color bg )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else if ( what < ktuipa_dlg || what >= ktuipa_last )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcInvalid );
-    else
-        self->entry[ what ].bg = bg;
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIPaletteDefault ( struct KTUIPalette * self )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-        write_default_values ( self );
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC KTUIPaletteCopy ( struct KTUIPalette * dst, const struct KTUIPalette * src )
-{
-    rc_t rc = 0;
-    if ( dst == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else if ( src == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcNull );
-    else
-    {
-        uint32_t i;
-        for ( i = ktuipa_dlg; i < ktuipa_last; ++ i )
-            copy_ac( &dst->entry[ i ], &src->entry[ i ] );
-    }
-    return rc;
-}
diff --git a/libs/tui/tui_std_dlg.c b/libs/tui/tui_std_dlg.c
deleted file mode 100644
index 64045bc..0000000
--- a/libs/tui/tui_std_dlg.c
+++ /dev/null
@@ -1,355 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <tui/extern.h>
-
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <klib/printf.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/filetools.h>
-
-#include <tui/tui_dlg.h>
-
-#include <sysalloc.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-
-static rc_t Std_Dlg_Loop ( struct KTUIDlg * dlg, uint32_t * selection, bool * selected )
-{
-    rc_t rc = KTUIDlgDraw( dlg, false );
-    if ( selected != NULL ) * selected = false;
-    if ( rc == 0 )
-    {
-        struct KTUI * tui = KTUIDlgGetTui( dlg );
-        KTUIDlgSetFocus( dlg, 0 );
-        do
-        {
-            tui_event event;
-            rc = KTUIGet ( tui, &event );
-            if ( rc == 0 )
-            {
-                rc = KTUIDlgHandleEvent( dlg, &event );
-                if ( rc == 0 )
-                {
-                    tuidlg_event dev;
-                    do
-                    {
-                        rc = KTUIDlgGet ( dlg, &dev );
-                        if ( rc == 0 && dev.event_type == ktuidlg_event_select )
-                        {
-                            if ( selection != NULL )
-                                *selection = dev.widget_id;
-                            KTUIDlgSetDone ( dlg, true );
-                            if ( selected != NULL ) *selected = true;
-                        }
-                    } while ( rc == 0 && dev.event_type != ktuidlg_event_none && !KTUIDlgGetDone( dlg ) );
-                }
-                if ( is_alpha_key( &event, 27 ) ) 
-                    KTUIDlgSetDone ( dlg, true );
-            }
-        } while ( rc == 0 && !KTUIDlgGetDone( dlg ) );
-    }
-    return rc;
-}
-
-
-/* ****************************************************************************************** */
-
-
-static rc_t make_dlg_with_bg( struct KTUIDlg ** dlg,
-                              struct KTUIPalette ** pal,
-                              struct KTUI * tui_,
-                              struct KTUIDlg * parent,
-                              tui_rect * r,
-                              KTUI_color bg1,
-                              KTUI_color bg2 )
-{
-    rc_t rc;
-    struct KTUI * tui = tui_;
-    if ( tui == NULL )
-        tui = KTUIDlgGetTui( parent );
-    if ( tui == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcNull );
-    else
-    {
-        rc = KTUIPaletteMake ( pal );
-        if ( rc == 0 )
-        {
-            KTUIPaletteSet_bg ( *pal, ktuipa_dlg, bg1 );
-            KTUIPaletteSet_bg ( *pal, ktuipa_dlg_caption, bg2 );
-            rc = KTUIDlgMake ( tui, dlg, parent, *pal, r );
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC TUI_ShowMessage ( struct KTUI * tui, struct KTUIDlg * parent, const char * caption,
-                       const char * txt, uint32_t x, uint32_t y, uint32_t w, KTUI_color bg1, KTUI_color bg2 )
-{
-    rc_t rc;
-    struct KTUIPalette * pal;
-    struct KTUIDlg * dlg;
-    tui_rect r;
-
-    set_rect( &r, x, y, w, 6 );
-    rc = make_dlg_with_bg( &dlg, &pal, tui, parent, &r, bg1, bg2 );
-    if ( rc == 0 )
-    {
-        uint32_t y1 = 1;
-        r.w -= 2;
-
-        if ( caption != NULL )
-        {
-            rc = KTUIDlgSetCaption ( dlg, caption );
-            y1++;
-        }
-
-        if ( rc == 0 )
-            rc = KTUIDlgAddLabel2( dlg, 100, 1, y1, r.w, txt );
-        y1 += 2;
-
-        if ( rc == 0 )
-            rc = KTUIDlgAddBtn2( dlg, 101, 1, y1, 6, "OK" );
-
-        if ( rc == 0 )
-            rc = Std_Dlg_Loop ( dlg, NULL, NULL );
-
-        KTUIDlgRelease ( dlg );
-        KTUIPaletteRelease ( pal );
-    }
-    return rc;
-}
-
-
-/* ****************************************************************************************** */
-
-
-LIB_EXPORT rc_t CC TUI_YesNoDlg ( struct KTUI * tui, struct KTUIDlg * parent, const char * caption,
-                    const char * question, uint32_t x, uint32_t y, uint32_t w, bool * yes, KTUI_color bg1, KTUI_color bg2 )
-{
-    rc_t rc;
-    struct KTUIPalette * pal;
-    struct KTUIDlg * dlg;
-    tui_rect r;
-
-    set_rect( &r, x, y, w, 6 );
-    rc = make_dlg_with_bg( &dlg, &pal, tui, parent, &r, bg1, bg2 );
-    if ( rc == 0 )
-    {
-        if ( caption != NULL )
-            rc = KTUIDlgSetCaption ( dlg, caption );
-
-        if ( rc == 0 )
-            rc = KTUIDlgAddLabel2( dlg, 100, 1, 2, r.w - 2, question );
-
-        if ( rc == 0 )
-            rc = KTUIDlgAddBtn2( dlg, 101, 1, 4, 10, "Yes" );
-
-        if ( rc == 0 )
-            rc = KTUIDlgAddBtn2( dlg, 102, 12, 4, 10, "No" );
-
-        if ( rc == 0 )
-        {
-            uint32_t selection;
-            rc = Std_Dlg_Loop ( dlg, &selection, NULL );
-            if ( yes != NULL )
-                *yes = ( selection == 101 );
-        }
-
-        KTUIDlgRelease ( dlg );
-        KTUIPaletteRelease ( pal );
-    }
-    return rc;
-}
-
-
-/* ****************************************************************************************** */
-
-
-LIB_EXPORT rc_t CC TUI_ShowFile( struct KTUI * tui, struct KTUIDlg * parent, const char * caption,
-                   const char * filename, tui_rect *r, KTUI_color bg1, KTUI_color bg2 )
-{
-    struct KTUIPalette * pal;
-    struct KTUIDlg * dlg;
-    rc_t rc = make_dlg_with_bg( &dlg, &pal, tui, parent, r, bg1, bg2 );
-    if ( rc == 0 )
-    {
-        VNamelist * list = NULL;
-
-        if ( caption != NULL )
-            rc = KTUIDlgSetCaption ( dlg, caption );
-
-        if ( rc == 0 )
-            rc = VNamelistMake ( &list, 100 );
-
-        if ( rc == 0 )
-            rc = LoadFileByNameToNameList( list, filename );
-
-        if ( rc == 0 )
-        {
-            tui_rect r1;
-
-            set_rect( &r1, 0, 1, r->w, r->h - 2 );
-            rc = KTUIDlgAddList ( dlg, 100, &r1 );
-            if ( rc == 0 )
-                rc = KTUIDlgAddWidgetStrings ( dlg, 100, list );
-        }
-
-        if ( rc == 0 )
-            rc = KTUIDlgAddBtn2( dlg, 101, 0, r->h - 1, r->w, "OK" );
-
-        if ( rc == 0 )
-            rc = Std_Dlg_Loop ( dlg, NULL, NULL );
-
-        VNamelistRelease( list );
-        KTUIDlgRelease ( dlg );
-        KTUIPaletteRelease ( pal );
-    }
-    return rc;
-}
-
-
-/* ****************************************************************************************** */
-
-
-LIB_EXPORT rc_t CC TUI_EditBuffer( struct KTUI * tui, struct KTUIDlg * parent, const char * caption,
-                     char * buffer, size_t buflen, uint32_t x, uint32_t y, uint32_t w, bool * selected, 
-                     KTUI_color bg1, KTUI_color bg2 )
-{
-    rc_t rc;
-    struct KTUIPalette * pal;
-    struct KTUIDlg * dlg;
-    tui_rect r;
-
-    if ( selected != NULL ) *selected = false;
-    set_rect( &r, x, y, w, 6 );
-    rc = make_dlg_with_bg( &dlg, &pal, tui, parent, &r, bg1, bg2 );
-    if ( rc == 0 )
-    {
-        uint32_t y1 = 1;
-        uint32_t selected_id = 0;
-
-        if ( caption != NULL )
-        {
-            rc = KTUIDlgSetCaption ( dlg, caption );
-            y1++;
-        }
-
-        if ( rc == 0 )
-        {
-            tui_rect r1;
-            set_rect( &r1, 1, y1, r.w - 2, 1 );
-            rc = KTUIDlgAddInput ( dlg, 100, &r1, buffer, buflen );
-        }
-
-        y1 += 2;
-
-        if ( rc == 0 )
-            rc = KTUIDlgAddBtn2( dlg, 101, 1, y1, 12, "OK" );
-
-        if ( rc == 0 )
-            rc = KTUIDlgAddBtn2( dlg, 102, 14, y1, 22, "Cancel (ESC-ESC)" );
-
-        if ( rc == 0 )
-            rc = Std_Dlg_Loop ( dlg, &selected_id, selected );
-
-        if ( rc == 0 && ( selected_id == 101 || selected_id == 100 ) )
-        {
-            const char * s = KTUIDlgGetWidgetText( dlg, 100 );
-            if ( s != NULL )
-                string_copy ( buffer, buflen, s, string_size ( s ) );
-        }
-        else
-        {
-            if ( selected != NULL )
-                *selected = false;
-        }
-
-        KTUIDlgRelease ( dlg );
-        KTUIPaletteRelease ( pal );
-    }
-    return rc;
-}
-
-
-/* ****************************************************************************************** */
-
-LIB_EXPORT rc_t CC TUI_PickFromList( struct KTUI * tui, struct KTUIDlg * parent, const char * caption,
-        const VNamelist * list, uint32_t * selection, tui_rect * r, bool * selected,
-        KTUI_color bg1, KTUI_color bg2 )
-{
-    struct KTUIPalette * pal;
-    struct KTUIDlg * dlg;
-    rc_t rc = make_dlg_with_bg( &dlg, &pal, tui, parent, r, bg1, bg2 );
-    if ( selected != NULL ) *selected = false;
-    if ( rc == 0 )
-    {
-        uint32_t y = 1;
-        uint32_t w = r->w - 2;
-
-        if ( caption != NULL )
-        {
-            rc = KTUIDlgSetCaption ( dlg, caption );
-            y++;
-        }
-
-        if ( rc == 0 )
-        {
-            tui_rect r1;
-            set_rect( &r1, 1, y, w, r->h - 3 );
-            rc = KTUIDlgAddRadioBox ( dlg, 100, &r1 );
-            if ( rc == 0 )
-            {
-                uint32_t count, idx;
-                rc = VNameListCount ( list, &count );
-                for ( idx = 0; rc == 0 && idx < count; ++idx )
-                {
-                    const char * s;
-                    rc = VNameListGet ( list, idx, &s );
-                    if ( rc == 0 && s != NULL )
-                        rc = KTUIDlgAddWidgetString ( dlg, 100, s );
-                }
-                if ( rc == 0 && selection != NULL )
-                    rc = KTUIDlgSetWidgetSelectedString ( dlg, 100, *selection );
-            }
-        }
-
-        if ( rc == 0 )
-            rc = Std_Dlg_Loop ( dlg, NULL, selected );
-
-        if ( rc == 0 && *selected && selection != NULL )
-            *selection = KTUIDlgGetWidgetSelectedString( dlg, 100 );
-
-        KTUIDlgRelease ( dlg );
-        KTUIPaletteRelease ( pal );
-    }
-    return rc;
-}
diff --git a/libs/tui/tui_widget.c b/libs/tui/tui_widget.c
deleted file mode 100644
index c55d139..0000000
--- a/libs/tui/tui_widget.c
+++ /dev/null
@@ -1,1079 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include "tui_widget.h"
-#include "string_cache.h"
-
-#include <sysalloc.h>
-#include <math.h>
-
-rc_t DlgPaint( struct KTUI * tui, int x, int y, int w, int h, KTUI_color c )
-{
-    tui_rect r;
-    tui_ac ac;
-
-    r.top_left.x = x;
-    r.top_left.y = y;
-    r.w = w;
-    r.h = h;
-    set_ac( &ac, KTUI_a_none, c, c );
-
-    return KTUIRect ( tui, &r, &ac, ' ' );
-}
-
-
-rc_t DlgWrite( struct KTUI * tui, int x, int y, const tui_ac * ac, const char * s, uint32_t l )
-{
-    tui_point p;
-
-    p.x = x;
-    p.y = y;
-
-    return KTUIPrint( tui, &p, ac, s, l );
-}
-
-
-static rc_t hl( struct KTUI * tui, uint32_t x, uint32_t y, const tui_ac * ac, const char * c )
-{
-    tui_ac inv;
-    inverse_ac( &inv, ac );
-    return DlgWrite( tui, x, y, &inv, c, 1 );
-}
-
-
-static rc_t draw_hl_label( struct KTUI * tui, uint32_t x, uint32_t y, uint32_t w, tui_ac * ac, size_t offset, const char * caption )
-{
-    rc_t rc = 0;
-    if ( offset == 0 )
-    {
-        rc = DlgWrite( tui, x, y, ac, caption + 1, w );
-        if ( rc == 0 )
-            rc = hl( tui, x, y, ac, caption + 1 );
-    }
-    else if ( offset < w )
-    {
-        rc = DlgWrite( tui, x, y, ac, caption, offset );
-        if ( rc == 0 )
-        {
-            rc = DlgWrite( tui, x + offset, y, ac, caption + offset + 1, w - offset );
-            if ( rc == 0 )
-                rc = hl( tui, x + offset, y, ac, caption + offset + 1 );
-        }
-    }
-    else
-        rc = DlgWrite( tui, x, y, ac, caption, w );
-    return rc;
-}
-
-
-rc_t draw_highlighted( struct KTUI * tui, uint32_t x, uint32_t y, uint32_t w, tui_ac * ac, const char * caption )
-{
-    rc_t rc = 0;
-    size_t s_cap;
-    uint32_t l_cap = string_measure( caption, &s_cap );
-    if ( l_cap > 0 )
-    {
-        char * ampersand = string_chr ( caption, s_cap, '&' );
-        if ( ampersand != NULL )
-            rc = draw_hl_label( tui, x, y, w, ac, ( ampersand - caption ), caption );
-        else
-            rc = DlgWrite( tui, x, y, ac, caption, w );
-    }
-    return rc;
-}
-
-
-rc_t DrawVScroll( struct KTUI * tui, tui_rect * r, uint64_t count, uint64_t value,
-                  KTUI_color c_bar, KTUI_color c_sel )
-{
-    uint32_t x = r->top_left.x + r->w - 1;
-    rc_t rc = DlgPaint( tui, x, r->top_left.y, 1, r->h, c_bar );
-    if ( rc == 0 && count > 0 )
-    {
-        uint64_t v = ( r->h * value ) / count;
-        uint32_t y = r->top_left.y + (uint32_t)v;
-        rc = DlgPaint( tui, x, y, 1, 1, c_sel );
-    }
-    return rc;
-}
-
-
-rc_t DrawHScroll( struct KTUI * tui, tui_rect * r, uint64_t count, uint64_t value,
-                  KTUI_color c_bar, KTUI_color c_sel )
-{
-    uint32_t x = r->top_left.x + 1;
-    uint32_t y = r->top_left.y + r->h - 1;
-    uint32_t w = r->w - 3;
-    rc_t rc = DlgPaint( tui, x, y, w, 1, c_bar );
-    if ( rc == 0 && count > 0 )
-    {
-        uint64_t v = ( w * value ) / count;
-        rc = DlgPaint( tui, x + (uint32_t)v, y, 1, 1, c_sel );
-    }
-    return rc;
-}
-
-
-rc_t draw_background( struct KTUI * tui, bool focused, tui_point * p,
-                      int w, int h, KTUI_color bg )
-{
-    rc_t rc;
-    if ( focused )
-    {
-        rc = DlgPaint( tui, p->x, p->y, 1, h, KTUI_c_red );
-        if ( rc == 0 )
-            rc = DlgPaint( tui, p->x + 1, p->y, w - 1, h, bg );
-    }
-    else
-        rc = DlgPaint( tui, p->x, p->y, w, h, bg );
-    return rc;
-}
-
-
-/* ****************************************************************************************** */
-
-
-static void init_widget( KTUIWidget * w, uint32_t id, KTUI_Widget_type wtype, const tui_rect * r )
-{
-    copy_rect( &w->r, r );
-
-    w->caption = NULL;
-    w->can_focus = true;
-    w->visible = true;
-    w->focused = false;
-    w->id = id;
-    w->wtype = wtype;
-    w->ints[ 0 ] = 0;   /* widget_string_list.DL_V_OFFSET */
-    w->ints[ 1 ] = 0;   /* widget_string_list.DL_H_OFFSET */
-    w->ints[ 2 ] = 0;
-    w->ints[ 3 ] = 0;
-    w->changed = false;
-    w->bool_value = false;
-    w->bg_override_flag = false;
-    w->fg_override_flag = false;
-
-    w->txt = NULL;
-    w->txt_length = 0;
-    w->strings = NULL;
-    w->selected_string = 0;
-}
-
-
-rc_t TUI_MakeWidget ( KTUIWidget ** self, struct KTUIDlg * dlg, uint32_t id, KTUI_Widget_type wtype,
-                      const tui_rect * r, draw_cb on_draw, event_cb on_event )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcSelf, rcNull );
-    else
-    {
-        *self = NULL;
-        if ( dlg == NULL )
-            rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcNull );
-        else
-        {
-            struct KTUIPalette * pal = KTUIDlgGetPalette ( dlg );
-            if ( pal == NULL )
-                rc = RC( rcApp, rcAttr, rcCreating, rcParam, rcInvalid );
-            else
-            {
-                rc = KTUIPaletteAddRef ( pal );
-                if ( rc == 0 )
-                {
-                    KTUIWidget * w = malloc( sizeof * w );
-                    if ( w == NULL )
-                        rc = RC( rcApp, rcAttr, rcCreating, rcMemory, rcExhausted );
-                    else
-                    {
-                        w->dlg = dlg;
-                        w->tui = KTUIDlgGetTui ( dlg );
-                        w->palette = pal;
-
-                        init_widget( w, id, wtype, r );
-                        w->on_draw = on_draw;
-                        w->on_event = on_event;
-
-                        ( * self ) = w;
-                    }
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-
-void TUI_DestroyWidget( struct KTUIWidget * self )
-{
-    if ( self != NULL )
-    {
-        if ( self->caption != NULL )
-            free( ( void * ) self->caption );
-        if ( self->txt != NULL )
-            free( ( void * ) self->txt );
-        if ( self->strings != NULL )
-            VNamelistRelease ( self->strings );
-
-        KTUIPaletteRelease ( self->palette );
-
-        free( ( void * ) self );
-    }
-}
-
-
-const tui_ac * GetWidgetPaletteEntry ( struct KTUIWidget * self, KTUIPa_entry what )
-{
-    return KTUIPaletteGet ( self->palette, what );
-}
-
-
-struct KTUIPalette * CopyWidgetPalette( struct KTUIWidget * self )
-{
-    struct KTUIPalette * res = NULL;
-    if ( self != NULL )
-    {
-        rc_t rc = KTUIPaletteMake ( &res );
-        if ( rc == 0 )
-        {
-            rc = KTUIPaletteCopy ( res, self->palette );
-            if ( rc == 0 )
-            {
-                KTUIPaletteRelease ( self->palette );
-                self->palette = res;
-            }
-        }
-    }
-    return res;
-}
-
-
-rc_t ReleaseWidgetPalette( struct KTUIWidget * self )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        KTUIPaletteRelease ( self->palette );
-        self->palette = KTUIDlgGetPalette ( self->dlg );
-        KTUIPaletteAddRef ( self->palette );
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcSelf, rcNull );
-    return rc;
-}
-
-
-rc_t GetWidgetAc( struct KTUIWidget * self, KTUIPa_entry pa_entry, tui_ac * ac )
-{
-    rc_t rc = 0;
-    if ( self != NULL && ac != NULL )
-    {
-        copy_ac( ac, GetWidgetPaletteEntry ( self, pa_entry ) );
-        if ( self->bg_override_flag )
-            ac->bg = self->bg_override;
-        if ( self->fg_override_flag )
-            ac->fg = self->fg_override;
-
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcSelf, rcNull );
-    return rc;
-   
-}
-
-
-rc_t RedrawWidget( KTUIWidget * w )
-{
-    rc_t rc = 0;
-    if ( w->on_draw != NULL )
-    {
-        w->on_draw( w );
-
-        /* flush it out... */
-        rc = KTUIFlush ( w->tui, false );
-    }
-    return rc;
-}
-
-
-rc_t RedrawWidgetAndPushEvent( KTUIWidget * w,
-           KTUIDlg_event_type ev_type, uint64_t value_1, uint64_t value_2, void * ptr_0 )
-{
-    rc_t rc = RedrawWidget( w );
-    if ( rc == 0 )
-        KTUIDlgPushEvent( w->dlg, ev_type, w->id, value_1, value_2, ptr_0 );
-    return rc;
-}
-
-
-/* ---------------------------------------------------------------------------------------------- */
-
-
-rc_t GetWidgetRect ( struct KTUIWidget * self, tui_rect * r )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcSelecting, rcSelf, rcNull );
-    else if ( r == NULL )
-        rc = RC( rcApp, rcAttr, rcSelecting, rcParam, rcNull );
-    else
-        copy_rect( r, &self->r );
-    return rc;
-}
-
-
-rc_t SetWidgetRect ( struct KTUIWidget * self, const tui_rect * r, bool redraw )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC( rcApp, rcAttr, rcUpdating, rcSelf, rcNull );
-    else if ( r == NULL )
-        rc = RC( rcApp, rcAttr, rcUpdating, rcParam, rcNull );
-    else
-    {
-        if ( redraw )
-        {
-            struct KTUIPalette * dlg_palette = KTUIDlgGetPalette ( self->dlg );
-            const tui_ac * dlg_ac = KTUIPaletteGet ( dlg_palette, ktuipa_dlg );
-            rc = DlgPaint( self->tui, self->r.top_left.x, self->r.top_left.y,
-                            self->r.w, self->r.h, dlg_ac->bg );
-        }
-        if ( rc == 0 )
-        {
-            copy_rect( &self->r, r );
-            if ( redraw )
-                rc = RedrawWidget( self );
-        }
-    }
-    return rc;
-}
-
-/* ---------------------------------------------------------------------------------------------- */
-
-
-const char * GetWidgetCaption ( struct KTUIWidget * self )
-{
-    if ( self != NULL )
-        return self->caption;
-    else
-        return NULL;
-}
-
-
-rc_t SetWidgetCaption ( struct KTUIWidget * self, const char * caption )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        if ( self->caption != NULL )
-            free( ( void * ) self->caption );
-            
-        if ( caption != NULL )
-            self->caption = string_dup_measure ( caption, NULL );
-        else
-            self->caption = NULL;
-
-        rc = RedrawWidget( self );
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcSelf, rcNull );
-    return rc;
-}
-
-
-/* ---------------------------------------------------------------------------------------------- */
-
-
-
-rc_t SetWidgetCanFocus( struct KTUIWidget * self, bool can_focus )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-        self->can_focus = can_focus;   
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcSelf, rcNull );
-    return rc;
-
-}
-
-
-/* ---------------------------------------------------------------------------------------------- */
-
-
-bool GetWidgetVisible ( struct KTUIWidget * self )
-{
-    if ( self != NULL )
-        return self->visible;
-    else
-        return false;
-}
-
-
-rc_t SetWidgetVisible ( struct KTUIWidget * self, bool visible, bool * redraw )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        *redraw = ( self->visible != visible );
-        self->visible = visible;
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcSelf, rcNull );
-    return rc;
-}
-
-
-/* ---------------------------------------------------------------------------------------------- */
-
-
-bool GetWidgetChanged ( struct KTUIWidget * self )
-{
-    if ( self != NULL )
-        return self->changed;
-    else
-        return false;
-}
-
-
-rc_t SetWidgetChanged ( struct KTUIWidget * self, bool changed )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        self->changed = changed;
-        if ( changed )
-            KTUIDlgSetChanged ( self->dlg );
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcSelf, rcNull );
-    return rc;
-}
-
-
-/* called if the value of a widged has changed */
-static rc_t Widget_Value_Changed( struct KTUIWidget * self )
-{
-    self->changed = true;
-    return RedrawWidget( self );
-}
-
-
-/* ---------------------------------------------------------------------------------------------- */
-
-
-rc_t SetWidgetBg ( struct KTUIWidget * self, KTUI_color value )
-{
-    rc_t rc;
-    if ( self != NULL )
-    {
-        self->bg_override = value;
-        self->bg_override_flag = true;
-        rc = RedrawWidget( self );
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-
-rc_t ReleaseWidgetBg ( struct KTUIWidget * self )
-{
-    rc_t rc;
-    if ( self != NULL )
-    {
-        self->bg_override_flag = false;
-        rc = RedrawWidget( self );
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-
-rc_t SetWidgetFg ( struct KTUIWidget * self, KTUI_color value )
-{
-    rc_t rc;
-    if ( self != NULL )
-    {
-        self->fg_override = value;
-        self->fg_override_flag = true;
-        rc = RedrawWidget( self );
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-
-rc_t ReleaseWidgetFg ( struct KTUIWidget * self )
-{
-    rc_t rc;
-    if ( self != NULL )
-    {
-        self->fg_override_flag = false;
-        rc = RedrawWidget( self );
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-/* ---------------------------------------------------------------------------------------------- */
-
-
-bool GetWidgetBoolValue ( struct KTUIWidget * self )
-{
-    if ( self != NULL )
-        return self->bool_value;
-    else
-        return false;
-}
-
-
-rc_t SetWidgetBoolValue ( struct KTUIWidget * self, bool value )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        if ( self->bool_value != value )
-        {
-            self->bool_value = value;
-            rc = Widget_Value_Changed( self );
-        }
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-
-/* ---------------------------------------------------------------------------------------------- */
-
-
-int64_t GetWidgetInt64Value ( struct KTUIWidget * self )
-{
-    if ( self != NULL )
-        return self->int64_value;
-    else
-        return 0;
-}
-
-
-rc_t SetWidgetInt64Value ( struct KTUIWidget * self, int64_t value )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        if ( self->int64_value != value )
-        {
-            int64_t prev = self->int64_value;
-            if ( value < self->int64_min )
-                self->int64_value = self->int64_min;
-            else if ( value > self->int64_max )
-                self->int64_value = self->int64_max;
-            else
-                self->int64_value = value;
-
-            if ( prev != self->int64_value )
-                rc = Widget_Value_Changed( self );
-        }
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-
-/* ---------------------------------------------------------------------------------------------- */
-
-
-int64_t GetWidgetInt64Min ( struct KTUIWidget * self )
-{
-    if ( self != NULL )
-        return self->int64_min;
-    else
-        return 0;
-}
-
-
-rc_t SetWidgetInt64Min ( struct KTUIWidget * self, int64_t value )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        if ( self->int64_min != value )
-        {
-            self->int64_min = value;
-            if ( self->int64_value < value )
-                rc = SetWidgetInt64Value ( self, value );
-        }
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-
-/* ---------------------------------------------------------------------------------------------- */
-
-
-int64_t GetWidgetInt64Max ( struct KTUIWidget * self )
-{
-    if ( self != NULL )
-        return self->int64_max;
-    else
-        return 0;
-}
-
-
-rc_t SetWidgetInt64Max ( struct KTUIWidget * self, int64_t value )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        if ( self->int64_max != value )
-        {
-            self->int64_max = value;
-            if ( self->int64_value > value )
-                rc = SetWidgetInt64Value ( self, value );
-        }
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-
-/* ---------------------------------------------------------------------------------------------- */
-
-
-int32_t GetWidgetPercent ( struct KTUIWidget * self )
-{
-    if ( self != NULL )
-        return self->percent;
-    else
-        return 0;
-}
-
-
-int32_t CalcWidgetPercent( int64_t value, int64_t max, uint32_t precision );
-
-rc_t SetWidgetPercent ( struct KTUIWidget * self, int32_t value )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        if ( self->percent != value )
-        {
-            if ( value >= 0 && value <= CalcWidgetPercent( 100, 100, self->precision ) )
-            {
-                self->percent = value;
-                rc = Widget_Value_Changed( self );
-            }
-        }
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-
-/* ---------------------------------------------------------------------------------------------- */
-
-
-int32_t GetWidgetPrecision ( struct KTUIWidget * self )
-{
-    if ( self != NULL )
-        return self->precision;
-    else
-        return 0;
-}
-
-
-rc_t SetWidgetPrecision ( struct KTUIWidget * self, int32_t value )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        if ( self->precision != value )
-        {
-            if ( value >= 0 && value < 5 )
-            {
-                self->precision = value;
-                rc = RedrawWidget( self );
-            }
-        }
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-/*
-    
-    result      %           precision
-    50          50%         0
-    515         51.5%       1
-    5274        52.74%      2
-    53112       53.112%     3
-    540072      54.0072%    4   ( max. precision )
-*/
-
-int32_t CalcWidgetPercent( int64_t value, int64_t max, uint32_t precision )
-{
-    int32_t res = 0;
-    if ( precision > 4 ) precision = 4;
-    if ( max > 0 && value > 0 && value <= max )
-    {
-        double x = (uint32_t)value;
-        switch( precision )
-        {
-            case 0 : x *= 100.0; break;
-            case 1 : x *= 1000.0; break;
-            case 2 : x *= 10000.0; break;
-            case 3 : x *= 100000.0; break;
-            case 4 : x *= 1000000.0; break;
-            default: x *= 100.0; break;
-        }
-        x /= max;
-        res = ( int32_t )floor( x );
-    }
-    return res;
-}
-
-
-/* ---------------------------------------------------------------------------------------------- */
-
-
-const char * GetWidgetText ( struct KTUIWidget * self )
-{
-    if ( self != NULL )
-        return self->txt;
-    else
-        return 0;
-}
-
-
-rc_t SetWidgetText ( struct KTUIWidget * self, const char * txt )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        if ( self->txt != NULL )
-        {
-            if ( txt != NULL )
-            {
-                size_t l = string_size ( txt );
-                if ( l >= self->txt_length )
-                    rc = SetWidgetTextLength ( self, l + 1 );
-                if ( rc == 0 )
-                    string_copy ( self->txt, self->txt_length, txt, l );
-            }
-            else
-                self->txt[ 0 ] = 0;
-            if ( rc == 0 )
-                rc = Widget_Value_Changed( self );
-        }
-        else
-        {
-            if ( txt != NULL )
-            {
-                size_t l = string_size ( txt );
-                rc = SetWidgetTextLength ( self, l + 1 );
-                if ( rc == 0 )
-                    rc = string_copy ( self->txt, self->txt_length, txt, l );
-                if ( rc == 0 )
-                    rc = Widget_Value_Changed( self );
-            }
-        }
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-
-size_t GetWidgetTextLength ( struct KTUIWidget * self )
-{
-    if ( self != NULL )
-        return self->txt_length;
-    else
-        return 0;
-}
-
-
-rc_t SetWidgetTextLength ( struct KTUIWidget * self, size_t new_length )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        if ( self->txt != NULL )
-        {
-            if ( self->txt_length != new_length )
-            {
-                char * tmp = malloc( new_length );
-                if ( tmp != NULL )
-                {
-                    string_copy ( tmp, new_length, self->txt, string_size ( self->txt ) );
-                    free( ( void * )self->txt );
-                    self->txt = tmp;
-                    if ( new_length < self->txt_length )
-                    {
-                        self->txt_length = new_length;
-                        rc = Widget_Value_Changed( self );
-                    }
-                    else
-                        self->txt_length = new_length;
-                }
-                else
-                    rc = RC( rcApp, rcAttr, rcUpdating, rcMemory, rcExhausted );
-            }
-        }
-        else
-        {
-            self->txt = malloc( new_length );
-            if ( self->txt != NULL )
-            {
-                self->txt_length = new_length;
-                self->txt[ 0 ] = 0;
-            }
-            else
-            {
-                self->txt_length = 0;
-                rc = RC( rcApp, rcAttr, rcUpdating, rcMemory, rcExhausted );
-            }
-        }
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-
-/* ---------------------------------------------------------------------------------------------- */
-
-
-rc_t AddWidgetString ( struct KTUIWidget * self, const char * txt )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        if ( self->strings == NULL )
-            rc = VNamelistMake ( &self->strings, 32 );
-        if ( rc == 0 )
-        {
-            rc = VNamelistAppend ( self->strings, txt );
-            if ( rc == 0 )
-                rc = Widget_Value_Changed( self );
-        }
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-
-rc_t AddWidgetStrings ( struct KTUIWidget * self, VNamelist * src )
-{
-    rc_t rc = 0;
-    if ( self != NULL && src != NULL )
-    {
-        if ( self->strings == NULL )
-            rc = VNamelistMake ( &self->strings, 32 );
-        if ( rc == 0 )
-        {
-            uint32_t count, idx;
-            rc = VNameListCount ( src, &count );
-            for ( idx = 0; rc == 0 && idx < count; ++idx )
-            {
-                const char * s;
-                rc = VNameListGet ( src, idx, &s );
-                if ( rc == 0 && s != NULL )
-                    rc = VNamelistAppend ( self->strings, s );
-            }
-            if ( rc == 0 && count > 0 )
-                rc = Widget_Value_Changed( self );
-        }
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-
-const char * GetWidgetStringByIdx ( struct KTUIWidget * self, uint32_t idx )
-{
-    const char * res = NULL;
-    if ( self != NULL && self->strings != NULL )
-        VNameListGet ( self->strings, idx, &res );
-    return res;
-}
-
-
-rc_t RemoveWidgetStringByIdx ( struct KTUIWidget * self, uint32_t idx )
-{
-    rc_t rc;
-    if ( self != NULL )
-    {
-        if ( self->strings != NULL )
-        {
-            rc = VNamelistRemoveIdx( self->strings, idx );
-            if ( rc == 0 )
-            {
-                uint32_t count;
-                rc = VNameListCount ( self->strings, &count );
-                if ( rc == 0 )
-                {
-                    if ( count > 0 )
-                    {
-                        if ( self->selected_string >= count )
-                            self->selected_string = count - 1;
-                    }
-                    else
-                        self->selected_string = 0;
-                    rc = Widget_Value_Changed( self );
-                }
-            }
-        }
-        else
-            rc = RC( rcApp, rcAttr, rcUpdating, rcItem, rcInvalid );
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-
-rc_t RemoveAllWidgetStrings ( struct KTUIWidget * self )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        if ( self->strings != NULL )
-        {
-            rc = VNamelistRemoveAll( self->strings );
-            if ( rc == 0 )
-            {
-                self->selected_string = 0;
-                self->ints[ 0 ] = 0;   /* widget_string_list.DL_V_OFFSET */
-                self->ints[ 1 ] = 0;   /* widget_string_list.DL_H_OFFSET */
-                rc = Widget_Value_Changed( self );
-            }
-        }
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-
-}
-
-
-uint32_t GetWidgetStringCount ( struct KTUIWidget * self )
-{
-    uint32_t res = 0;
-    if ( self != NULL && self->strings != NULL )
-        VNameListCount ( self->strings, &res );
-    return res;
-}
-
-
-uint32_t HasWidgetString( struct KTUIWidget * self, const char * txt )
-{
-    uint32_t res = 0xFFFFFFFF;
-    if ( self != NULL && self->strings != NULL )
-        VNamelistIndexOf( self->strings, txt, &res );
-    return res;
-}
-
-
-uint32_t GetWidgetSelectedString( struct KTUIWidget * self )
-{
-    uint32_t res = 0;
-    if ( self != NULL )
-        res = (uint32_t)self->selected_string;
-    return res;
-}
-
-
-rc_t SetWidgetSelectedString ( struct KTUIWidget * self, uint32_t selection )
-{
-    rc_t rc = 0;
-    if ( self != NULL && self->strings != NULL )
-    {
-        uint32_t count;
-        rc = VNameListCount ( self->strings, &count );
-        if ( rc == 0 )
-        {
-            uint32_t prev = (uint32_t)self->selected_string;
-            if ( count > 0 )
-            {
-                if ( selection >= count )
-                    self->selected_string = count - 1;
-                else
-                    self->selected_string = selection;
-                /* here we have to adjust self->ints[ 0 ] ... the vertical offset ! */
-            }
-            else
-                self->selected_string = 0; 
-            if ( prev != self->selected_string )
-                rc = Widget_Value_Changed( self );
-        }
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
-
-
-/* ---------------------------------------------------------------------------------------------- */
-
-
-TUIWGrid_data * GetWidgetGridData( struct KTUIWidget * self )
-{
-    TUIWGrid_data * res = NULL;
-    if ( self != NULL )
-        res = self->grid_data;
-    return res;
-}
-
-
-rc_t SetWidgetGridData( struct KTUIWidget * self, TUIWGrid_data * grid_data, bool cached )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        if ( grid_data != NULL )
-        {
-            grid_data->int_string_cache = make_string_cache( 200, 128 );
-            grid_data->row_offset_changed = true;
-        }
-        self->grid_data = grid_data;
-    }
-    else
-        rc = RC( rcApp, rcAttr, rcUpdating, rcId, rcInvalid );
-    return rc;
-}
diff --git a/libs/tui/tui_widget.h b/libs/tui/tui_widget.h
deleted file mode 100644
index 8aded74..0000000
--- a/libs/tui/tui_widget.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#ifndef _h_tui_widget_
-#define _h_tui_widget_
-
-#include <tui/tui.h>
-#include <tui/tui_dlg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define MAX_GRID_COLS 256
-#define MAX_GRID_ROWS 128
-
-rc_t draw_highlighted( struct KTUI * tui, uint32_t x, uint32_t y, uint32_t w, tui_ac * ac, const char * caption );
-
-rc_t DlgPaint( struct KTUI * tui, int x, int y, int w, int h, KTUI_color c );
-rc_t DlgWrite( struct KTUI * tui, int x, int y, const tui_ac * ac, const char * s, uint32_t l );
-
-rc_t DrawVScroll( struct KTUI * tui, tui_rect * r, uint64_t count, uint64_t value,
-                  KTUI_color c_bar, KTUI_color c_sel );
-rc_t DrawHScroll( struct KTUI * tui, tui_rect * r, uint64_t count, uint64_t value,
-                  KTUI_color c_bar, KTUI_color c_sel );
-
-rc_t draw_background( struct KTUI * tui, bool focused, tui_point * p,
-                      int w, int h, KTUI_color bg );
-
-
-/* ****************************************************************************************** */
-
-typedef uint32_t KTUI_Widget_type;
-enum
-{
-    KTUIW_label = 0,
-    KTUIW_button,
-    KTUIW_checkbox,
-    KTUIW_input,
-    KTUIW_radiobox,
-    KTUIW_list,
-    KTUIW_progress,
-    KTUIW_spinedit,
-    KTUIW_grid
-};
-
-
-struct KTUIWidget;
-struct KTUIDlg;
-
-typedef void ( * draw_cb ) ( struct KTUIWidget * w );
-typedef void ( * init_cb ) ( struct KTUIWidget * w );
-typedef bool ( * event_cb ) ( struct KTUIWidget * w, tui_event * event );
-
-typedef struct KTUIWidget
-{
-    struct KTUIDlg * dlg;   /* pointer to dialog they belong to */
-    struct KTUI * tui;      /* pointer to the hw-specific layer */
-    struct KTUIPalette * palette;   /* where the colors come from */
-    uint32_t id;            /* a unique id... */
-    KTUI_Widget_type wtype; /* what type of widget it is... */
-    uint32_t vector_idx;    /* where in the vector it is inserted */
-    tui_rect r;             /*  - a rect where it appears */
-
-    KTUI_color bg_override; /* the color if the background is different from palette */
-    bool bg_override_flag;
-
-    KTUI_color fg_override; /* the color if the forground is different from palette */
-    bool fg_override_flag;
-
-    char * caption;         /*  - a caption */
-
-    draw_cb on_draw;        /* know how to draw itself */
-    event_cb on_event;      /* know how to handle events */
-    uint64_t ints[ 8 ];     /* 8 internal 'state' integers */
-
-    bool can_focus;         /* can it be focused */
-    bool focused;           /* does it have focus... */
-    bool visible;           /* is it visible */
-    bool changed;           /* has the widget changed */
-
-    /* different value types, according to the widget type one is used: */
-
-    /* in case of a checkbox */
-    bool bool_value;
-
-    /* in case of a spin-edit */
-    int64_t int64_value;
-    int64_t int64_min;
-    int64_t int64_max;
-
-    /* in case of a percent-bar */
-    int32_t percent;
-    int32_t precision;
-
-    /* for the input-string */
-    char * txt;
-    size_t txt_length;
-
-    /* for Radio-Box / ListBox */
-    VNamelist * strings;
-    uint64_t selected_string;
-
-    /* for Grid */
-    TUIWGrid_data * grid_data;
-
-} KTUIWidget;
-
-
-rc_t TUI_MakeWidget ( KTUIWidget ** self, struct KTUIDlg * dlg, uint32_t id, KTUI_Widget_type wtype,
-                      const tui_rect * r, draw_cb on_draw, event_cb on_event );
-
-void TUI_DestroyWidget( struct KTUIWidget * self );
-
-const tui_ac * GetWidgetPaletteEntry ( struct KTUIWidget * self, KTUIPa_entry what );
-struct KTUIPalette * CopyWidgetPalette( struct KTUIWidget * self );
-rc_t  ReleaseWidgetPalette( struct KTUIWidget * self );
-
-rc_t RedrawWidget( KTUIWidget * w );
-
-rc_t RedrawWidgetAndPushEvent( KTUIWidget * w,
-           KTUIDlg_event_type ev_type, uint64_t value_1, uint64_t value_2, void * ptr_0 );
-
-rc_t GetWidgetRect ( struct KTUIWidget * self, tui_rect * r );
-rc_t SetWidgetRect ( struct KTUIWidget * self, const tui_rect * r, bool redraw );
-
-rc_t SetWidgetCanFocus( struct KTUIWidget * self, bool can_focus );
-rc_t GetWidgetAc( struct KTUIWidget * self, KTUIPa_entry pa_entry, tui_ac * ac );
-
-const char * GetWidgetCaption ( struct KTUIWidget * self );
-rc_t SetWidgetCaption ( struct KTUIWidget * self, const char * caption );
-
-bool GetWidgetVisible ( struct KTUIWidget * self );
-rc_t SetWidgetVisible ( struct KTUIWidget * self, bool visible, bool * redraw );
-
-bool GetWidgetChanged ( struct KTUIWidget * self );
-rc_t SetWidgetChanged ( struct KTUIWidget * self, bool changed );
-
-bool GetWidgetBoolValue ( struct KTUIWidget * self );
-rc_t SetWidgetBoolValue ( struct KTUIWidget * self, bool value );
-
-rc_t SetWidgetBg ( struct KTUIWidget * self, KTUI_color value );
-rc_t ReleaseWidgetBg ( struct KTUIWidget * self );
-
-rc_t SetWidgetFg ( struct KTUIWidget * self, KTUI_color value );
-rc_t ReleaseWidgetFg ( struct KTUIWidget * self );
-
-int64_t GetWidgetInt64Value ( struct KTUIWidget * self );
-rc_t SetWidgetInt64Value ( struct KTUIWidget * self, int64_t value );
-
-int64_t GetWidgetInt64Min ( struct KTUIWidget * self );
-rc_t SetWidgetInt64Min ( struct KTUIWidget * self, int64_t value );
-
-int64_t GetWidgetInt64Max ( struct KTUIWidget * self );
-rc_t SetWidgetInt64Max ( struct KTUIWidget * self, int64_t value );
-
-int32_t GetWidgetPercent ( struct KTUIWidget * self );
-rc_t SetWidgetPercent ( struct KTUIWidget * self, int32_t value );
-
-int32_t GetWidgetPrecision ( struct KTUIWidget * self );
-rc_t SetWidgetPrecision ( struct KTUIWidget * self, int32_t value );
-
-int32_t CalcWidgetPercent( int64_t value, int64_t max, uint32_t precision );
-
-const char * GetWidgetText ( struct KTUIWidget * self );
-rc_t SetWidgetText ( struct KTUIWidget * self, const char * txt );
-
-size_t GetWidgetTextLength ( struct KTUIWidget * self );
-rc_t SetWidgetTextLength ( struct KTUIWidget * self, size_t new_length );
-
-rc_t AddWidgetString ( struct KTUIWidget * self, const char * txt );
-rc_t AddWidgetStrings ( struct KTUIWidget * self, VNamelist * src );
-const char * GetWidgetStringByIdx ( struct KTUIWidget * self, uint32_t idx );
-rc_t RemoveWidgetStringByIdx ( struct KTUIWidget * self, uint32_t idx );
-rc_t RemoveAllWidgetStrings ( struct KTUIWidget * self );
-uint32_t GetWidgetStringCount ( struct KTUIWidget * self );
-uint32_t HasWidgetString( struct KTUIWidget * self, const char * txt );
-uint32_t GetWidgetSelectedString( struct KTUIWidget * self );
-rc_t SetWidgetSelectedString ( struct KTUIWidget * self, uint32_t selection );
-
-TUIWGrid_data * GetWidgetGridData( struct KTUIWidget * self );
-rc_t SetWidgetGridData( struct KTUIWidget * self, TUIWGrid_data * grid_data, bool cached );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_tui_widget_ */
diff --git a/libs/tui/tui_widget_button.c b/libs/tui/tui_widget_button.c
deleted file mode 100644
index 2bb08fd..0000000
--- a/libs/tui/tui_widget_button.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <tui/tui_dlg.h>
-#include "tui_widget.h"
-
-void draw_button( struct KTUIWidget * w )
-{
-    tui_rect r;
-    rc_t rc = KTUIDlgAbsoluteRect ( w->dlg, &r, &w->r );
-    if ( rc == 0 )
-    {
-        tui_ac ac;
-        rc = GetWidgetAc( w, ktuipa_button, &ac );
-        if ( rc == 0 )
-        {
-            struct KTUI * tui = w->tui;
-            uint32_t ofs_y = r.h / 2;
-            uint32_t x = r.top_left.x;
-            uint32_t y = r.top_left.y + ofs_y;
-            uint32_t w1 = r.w;
-
-            rc = draw_background( tui, w->focused, &r.top_left, w1, r.h, ac.bg );
-
-            if ( rc == 0 && w->caption != NULL )
-            {
-                uint32_t x_txt = x + 2;
-                uint32_t w_txt = w1 - 4;
-                uint32_t l_cap = string_measure( w->caption, NULL );
-                if ( l_cap < w_txt )
-                {
-                    x_txt += ( ( w_txt - l_cap ) / 2 );
-                    w_txt = l_cap;
-                }
-                rc = draw_highlighted( tui, x_txt, y, w_txt, &ac, w->caption );
-            }
-
-            if ( rc == 0 )
-                rc = DlgWrite( tui, x + 1, y, &ac, "[", 1 );
-            if ( rc == 0 )
-                rc = DlgWrite( tui, x + w1 - 2, y, &ac, "]", 1 );
-        }
-    }
-}
-
-
-bool event_button( struct KTUIWidget * w, tui_event * event )
-{
-    bool res = false;
-    if ( event->event_type == ktui_event_kb )
-    {
-        switch( event->data.kb_data.code )
-        {
-            case ktui_enter : res = true; break;
-            case ktui_alpha : res = ( event->data.kb_data.key == ' ' ); break;
-        }
-    }
-
-    if ( res )
-        KTUIDlgPushEvent( w->dlg, ktuidlg_event_select, w->id, 0, 0, NULL );
-    return res;
-}
diff --git a/libs/tui/tui_widget_checkbox.c b/libs/tui/tui_widget_checkbox.c
deleted file mode 100644
index 779a7d4..0000000
--- a/libs/tui/tui_widget_checkbox.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <tui/tui_dlg.h>
-#include "tui_widget.h"
-
-void draw_checkbox( struct KTUIWidget * w )
-{
-    tui_rect r;
-    rc_t rc = KTUIDlgAbsoluteRect ( w->dlg, &r, &w->r );
-    if ( rc == 0 )
-    {
-        tui_ac ac;
-        rc = GetWidgetAc( w, ktuipa_checkbox, &ac );
-        if ( rc == 0 )
-        {
-            struct KTUI * tui = w->tui;
-            rc = draw_background( tui, w->focused, &r.top_left, r.w, r.h, ac.bg );
-            if ( rc == 0 && w->caption != NULL )
-            {
-                char txt[ 265 ];
-                size_t num_writ;
-
-                if ( w->bool_value )
-                    rc = string_printf ( txt, sizeof txt, &num_writ, "[X] %s", w->caption );
-                else
-                    rc = string_printf ( txt, sizeof txt, &num_writ, "[ ] %s", w->caption );
-
-                if ( rc == 0 )
-                {
-                    uint32_t x = r.top_left.x + 1;
-                    uint32_t y = r.top_left.y;
-                    uint32_t w = r.w - 2;
-                    draw_highlighted( tui, x, y, w, &ac, txt );
-                }
-            }
-        }
-    }
-}
-
-
-bool event_checkbox( struct KTUIWidget * w, tui_event * event )
-{
-    bool res = false;
-    if ( event->event_type == ktui_event_kb )
-    {
-        switch( event->data.kb_data.code )
-        {
-            case ktui_enter : res = true; break;
-            case ktui_alpha : res = ( event->data.kb_data.key == ' ' ); break;
-        }
-    }
-
-    if ( res )
-    {
-        w->bool_value = !w->bool_value;
-        SetWidgetChanged ( w, true );
-        RedrawWidgetAndPushEvent( w, ktuidlg_event_select, w->bool_value ? 1 : 0, 0, NULL );
-    }
-    return res;
-}
diff --git a/libs/tui/tui_widget_grid.c b/libs/tui/tui_widget_grid.c
deleted file mode 100644
index 369fa58..0000000
--- a/libs/tui/tui_widget_grid.c
+++ /dev/null
@@ -1,488 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <tui/tui_dlg.h>
-#include "tui_widget.h"
-#include "line_policy.h"
-#include "string_cache.h"
-
-typedef struct draw_ctx
-{
-    tui_rect r;
-    uint32_t y, vis_col, colcount;
-    uint64_t rowcount;
-    uint32_t col_width[ MAX_GRID_COLS ];
-} draw_ctx;
-
-
-static const char * grid_get_str( TUIWGrid_data * gd, TUIWGridStr what, uint64_t col, uint64_t row, uint32_t col_width )
-{
-    const char * res = NULL;
-    if ( gd->cb_str != NULL )
-    {
-        struct string_cache * sc = gd->int_string_cache;
-        if ( ( sc != NULL ) && ( what == kGrid_Cell ) )
-        {
-            res = get_cell_from_string_cache( sc, row, (int)col );
-            if ( res == NULL )
-            {
-                gd->cb_str( what, col, row, col_width, &res, gd->data, gd->instance );
-                put_cell_to_string_cache( sc, row, (int)col, res );
-            }
-        }
-        else
-        {
-            gd->cb_str( what, col, row, col_width, &res, gd->data, gd->instance );
-        }
-    }
-    return res;
-}
-
-
-static uint32_t get_grid_colwidth( struct KTUIWidget * w, TUIWGrid_data * gd, uint64_t col )
-{
-    uint32_t res = gd->default_col_width;
-    if ( gd->cb_int != NULL )
-    {
-        uint64_t value;
-        gd->cb_int( kGrid_Get_Width, col, w->r.w, &value, gd->data, gd->instance );
-        res = ( uint32_t )( value & 0xFFFFFFFF );
-    }
-    return res;
-}
-
-
-static uint32_t get_grid_colcount( struct KTUIWidget * w, TUIWGrid_data * gd )
-{
-    uint32_t res = 0;
-    if ( gd->cb_int != NULL )
-    {
-        uint64_t value;
-        gd->cb_int( kGrid_Get_ColCount, 0, w->r.w, &value, gd->data, gd->instance );
-        res = ( uint32_t )( value & 0xFFFFFFFF );
-    }
-    return res;
-}
-
-
-static uint64_t get_grid_rowcount( struct KTUIWidget * w, TUIWGrid_data * gd )
-{
-    uint64_t res = 0;
-    if ( gd->cb_int != NULL )
-        gd->cb_int( kGrid_Get_RowCount, 0, w->r.w, &res, gd->data, gd->instance );
-    return res;
-}
-
-
-static void set_grid_colwidth( struct KTUIWidget * w, TUIWGrid_data * gd, uint64_t col, uint32_t value )
-{
-    if ( gd->cb_int != NULL )
-    {
-        uint64_t cb_value = value;
-        gd->cb_int( kGrid_Set_Width, col, w->r.w, &cb_value, gd->data, gd->instance );
-    }
-}
-
-
-static void prepare_page( TUIWGrid_data * gd, uint64_t abs_row, uint32_t rows_per_page )
-{
-    if ( gd->cb_int != NULL && gd->row_offset_changed )
-    {
-        uint64_t cb_value;
-        gd->cb_int( kGrid_Prepare_Page, abs_row, rows_per_page, &cb_value, gd->data, gd->instance );
-    }
-}
-
-
-static void next_row( TUIWGrid_data * gd, uint64_t abs_row )
-{
-    if ( gd->cb_int != NULL && gd->row_offset_changed )
-    {
-        uint64_t cb_value;
-        gd->cb_int( kGrid_Next_Row, abs_row, 0, &cb_value, gd->data, gd->instance );
-    }
-}
-
-
-static rc_t draw_header_cell( struct KTUIWidget * w, TUIWGrid_data * gd, draw_ctx * dctx,
-                              uint32_t * x, uint64_t abs_col,  uint32_t left, uint32_t ww,
-                              const tui_ac * ac )
-{
-    rc_t rc = 0;
-    uint32_t width = dctx->col_width[ abs_col ];
-    if ( width > 0 )
-    {
-        const char * s;
-        if ( *x + width > ww ) width = ww - *x;     /* clip if cell reaches beyond the widget-width */
-        s = grid_get_str( gd, kGrid_Col, abs_col, 0, width );
-        if ( s != NULL )
-            rc = DlgWrite( w->tui, left + *x, dctx->y, ac, s, width - 1 );
-    }
-    *x += width;
-    return rc;
-}
-
-
-static rc_t draw_header( struct KTUIWidget * w, TUIWGrid_data * gd, draw_ctx * dctx )
-{
-    rc_t rc = 0;
-    uint64_t abs_col, cidx;
-    uint32_t left = dctx->r.top_left.x + gd->row_hdr_width;
-    uint32_t ww = dctx->r.w - gd->row_hdr_width;
-    uint32_t x = 0;
-    const tui_ac * ac_col_hdr = GetWidgetPaletteEntry ( w, ktuipa_grid_col_hdr );
-    const tui_ac * ac_cursor  = GetWidgetPaletteEntry ( w, ktuipa_grid_cursor );
-
-    for ( abs_col = gd->col_offset, cidx = 0;
-          x < ww && cidx < dctx->vis_col && abs_col < dctx->colcount && rc == 0;
-          ++abs_col, ++cidx )
-    {
-        if ( abs_col == gd->col )
-            rc = draw_header_cell( w, gd, dctx, &x, abs_col, left, ww, ac_cursor );
-        else
-            rc = draw_header_cell( w, gd, dctx, &x, abs_col, left, ww, ac_col_hdr );
-    }
-    dctx->y++;
-    return rc;
-}
-
-
-static rc_t draw_row( struct KTUIWidget * w, TUIWGrid_data * gd, draw_ctx * dctx, const tui_ac * ac, uint64_t row )
-{
-    rc_t rc = 0;
-    uint32_t left = dctx->r.top_left.x;
-    uint32_t x = 0;
-    const tui_ac * ac2;
-
-    if ( gd->show_row_header )
-    {
-        const char * s = grid_get_str( gd, kGrid_Row, 0, row, gd->row_hdr_width );
-        if ( s != NULL )
-        {
-            if ( row == gd->row )
-                ac2 = GetWidgetPaletteEntry ( w, ktuipa_grid_cursor );
-            else
-                ac2 = GetWidgetPaletteEntry ( w, ktuipa_grid_row_hdr );
-            if ( gd->row_hdr_width > 0 )
-                rc = DlgWrite( w->tui, left, dctx->y, ac2, s, gd->row_hdr_width - 1 );
-        }
-        x += gd->row_hdr_width;
-    }
-
-    if ( rc == 0 )
-    {
-        uint64_t col, cidx;
-        for ( col = gd->col_offset, cidx = 0;
-              x < dctx->r.w && cidx < dctx->vis_col && col < dctx->colcount && rc == 0;
-              ++col, ++cidx )
-        {
-            uint32_t width = dctx->col_width[ col ];
-            const char * s = grid_get_str( gd, kGrid_Cell, col, row, width );
-            /* uint32_t width = get_grid_colwidth( w, gd, col ); */
-            if ( s != NULL && width > 0 )
-            {
-                if ( row == gd->row && col == gd->col )
-                    ac2 = GetWidgetPaletteEntry ( w, ktuipa_grid_cursor );
-                else
-                    ac2 = ac;
-                if ( x + width > dctx->r.w ) width = dctx->r.w - x;
-                rc = DlgWrite( w->tui, left + x, dctx->y, ac2, s, width - 1 );
-            }
-            x += width;
-        }
-    }
-    return rc;
-}
-
-
-static uint32_t visible_cols_1( uint32_t width, TUIWGrid_data * gd, draw_ctx * dctx )
-{
-    uint32_t n = 0, ww = width;
-    uint64_t col = gd->col_offset;
-
-    if ( gd->show_row_header )
-        ww -= gd->row_hdr_width;
-
-    while( ww > 0 )
-    {
-        uint32_t cw = dctx->col_width[ col++ ];
-        ww = ( ww >= cw ) ? ww - cw : 0;
-        n++;
-    }
-    return n;
-}
-
-
-static uint32_t visible_cols_2( uint32_t width, TUIWGrid_data * gd, struct KTUIWidget * w )
-{
-    uint32_t n = 0, ww = width;
-    uint64_t col = gd->col_offset;
-
-    if ( gd->show_row_header )
-        ww -= gd->row_hdr_width;
-
-    while( ww > 0 )
-    {
-        uint32_t cw = get_grid_colwidth( w, gd, col++ );
-        ww = ( ww >= cw ) ? ww - cw : 0;
-        n++;
-    }
-    return n;
-}
-
-
-void enter_col_widths( struct KTUIWidget * w, TUIWGrid_data * gd, draw_ctx * dctx )
-{
-    uint32_t i;
-
-    dctx->colcount = get_grid_colcount( w, gd );
-    dctx->rowcount = get_grid_rowcount( w, gd );
-
-    for( i = 0; i < dctx->colcount; ++ i )
-        dctx->col_width[ i ] = get_grid_colwidth( w, gd, i );
-
-    dctx->vis_col = visible_cols_1( dctx->r.w, gd, dctx );
-}
-
-
-void draw_grid( struct KTUIWidget * w )
-{
-    draw_ctx dctx;
-    rc_t rc = KTUIDlgAbsoluteRect ( w->dlg, &dctx.r, &w->r );
-    if ( rc == 0 )
-    {
-        tui_ac ac;
-        rc = GetWidgetAc( w, ktuipa_grid, &ac );
-        if ( rc == 0 )
-            rc = draw_background( w->tui, w->focused, &dctx.r.top_left, dctx.r.w, dctx.r.h, ac.bg );
-        if ( rc == 0 )
-        {
-            TUIWGrid_data * gd = w->grid_data;
-            dctx.y = dctx.r.top_left.y;
-
-
-            enter_col_widths( w, gd, &dctx );
-
-            /* render the fixed row-line */
-            if ( gd->show_header )
-                rc = draw_header( w, gd, &dctx );
-
-
-            /* render the fixed cells and row-header */
-            if ( rc == 0 )
-            {
-                uint64_t row, ridx = ( gd->show_header ) ? 1 : 0;
-                uint64_t nrow = w->r.h;
-                if ( gd->show_h_scroll && dctx.colcount > dctx.vis_col ) nrow--;
-                prepare_page( gd, gd->row_offset, (uint32_t)nrow );   /* give the client a hint what comes... */
-                for ( row = gd->row_offset;
-                       ridx < nrow && row < dctx.rowcount && rc == 0;
-                       ++row, ++ridx, dctx.y++ )
-                {
-                    rc = draw_row( w, gd, &dctx, &ac, row );
-                    next_row( gd, row );    /* give the client the opportunity to advance an iterator... */
-                }
-            }
-
-            /* render the scrollbars */
-            if ( rc == 0 && gd->show_v_scroll && dctx.rowcount > dctx.r.h )
-                rc = DrawVScroll( w->tui, &dctx.r, dctx.rowcount, gd->row, KTUI_c_gray, ac.fg );
-
-            if ( rc == 0 && gd->show_h_scroll && dctx.colcount > dctx.vis_col )
-                rc = DrawHScroll( w->tui, &dctx.r, dctx.colcount, gd->col, KTUI_c_gray, ac.fg );
-
-        }
-    }
-}
-
-
-static uint32_t convert_x_to_abs_col( struct KTUIWidget * w, TUIWGrid_data * gd, uint32_t x )
-{
-    uint32_t i = 0, res = 0, start = 0;
-    bool done = false;
-    draw_ctx dctx;
-
-    enter_col_widths( w, gd, &dctx );
-    if ( gd->show_header )
-        start += gd->row_hdr_width;
-
-    do
-    {
-        uint32_t ww = dctx.col_width[ i ];
-        if ( x >= start && x < ( start + ww ) )
-        {
-            res = i;
-            done = true;
-        }
-        else
-        {
-            if ( i > dctx.vis_col )
-                done = true;
-            else
-            {
-                start += ww;
-                i++;
-            }
-        }
-    } while ( !done );
-
-    res += ( uint32_t )gd->col_offset;
-    return res;
-}
-
-
-typedef struct grid_cb_ctx
-{
-    struct KTUIDlg * dlg;
-    struct KTUIWidget * w;
-    TUIWGrid_data * gd;
-} grid_cb_ctx;
-
-
-static uint32_t CC grid_get_width ( uint64_t col, void * data )
-{
-    grid_cb_ctx * cb_ctx = data;
-    return get_grid_colwidth( cb_ctx->w, cb_ctx->gd, col );
-}
-
-
-static void CC grid_set_width ( uint64_t col, uint32_t value, void * data )
-{
-    grid_cb_ctx * cb_ctx = data;
-    set_grid_colwidth( cb_ctx->w, cb_ctx->gd, col, value );
-}
-
-
-static bool prepare_grid_context( struct KTUIWidget * w, grid_cb_ctx * cb_ctx, grid_context * gc )
-{
-    bool res = false;
-    TUIWGrid_data * gd = w->grid_data;
-
-    if ( gd != NULL )
-    {
-        cb_ctx->dlg = w->dlg;
-        cb_ctx->w = w;
-        cb_ctx->gd = gd;
-
-        gc->data = cb_ctx;
-        gc->on_get_width = grid_get_width;
-        gc->on_set_width = grid_set_width;
-
-        gc->col.count = get_grid_colcount( w, gd );
-        gc->col.offset = &gd->col_offset;
-        gc->col.curr = &gd->col;
-        gc->col.visible = visible_cols_2( w->r.w, gd, w );
-        if ( gd->show_row_header ) gc->col.visible--;
-
-        gc->row.count = get_grid_rowcount( w, gd );
-        gc->row.offset = &gd->row_offset;
-        gc->row.curr = &gd->row;
-        gc->row.visible = gd->show_header ? w->r.h -1 : w->r.h;
-        if ( gd->show_h_scroll && gc->col.count > gc->col.visible ) gc->row.visible--;
-        res = true;
-    }
-    return res;
-}
-
-
-bool event_grid( struct KTUIWidget * w, tui_event * event )
-{
-    bool changed = false;
-    TUIWGrid_data * gd = w->grid_data;
-    if ( gd != NULL )
-    {
-        gd->row_offset_changed = false;
-        if ( event->event_type == ktui_event_mouse )
-        {
-            gd->row = ( gd->row_offset + event->data.mouse_data.y ) - 1;
-            gd->col = convert_x_to_abs_col( w, gd, event->data.mouse_data.x );
-            changed = true;
-        }
-        else
-        {
-            grid_cb_ctx cb_ctx;
-            grid_context gc;
-            changed = prepare_grid_context( w, &cb_ctx, &gc );
-            if ( changed )
-            {
-                uint64_t offset_before = gd->row_offset;
-                changed = grid_handle_event( &gc, event ); /* in line_policy.c */
-                if ( changed )
-                    gd->row_offset_changed = ( offset_before != gd->row_offset );
-            }
-        }
-
-        if ( changed )
-            RedrawWidgetAndPushEvent( w, ktuidlg_event_changed, gd->col, gd->row, NULL );
-    }
-    return changed;
-}
-
-
-uint64_t get_grid_col( struct KTUIWidget * w )
-{
-    if ( w->grid_data != NULL )
-        return w->grid_data->col;
-    else
-        return 0;
-}
-
-
-bool set_grid_col( struct KTUIWidget * w, uint64_t col )
-{
-    grid_cb_ctx cb_ctx;
-    grid_context gc;
-    bool res = prepare_grid_context( w, &cb_ctx, &gc );
-    if ( res )
-        res = grid_handle_set_col( &gc, col ); /* in line_policy.c */
-    if ( res )
-        RedrawWidgetAndPushEvent( w, ktuidlg_event_changed, cb_ctx.gd->col, cb_ctx.gd->row, NULL );
-    return res;
-}
-
-
-uint64_t get_grid_row( struct KTUIWidget * w )
-{
-    if ( w->grid_data != NULL )
-        return w->grid_data->row;
-    else
-        return 0;
-}
-
-bool set_grid_row( struct KTUIWidget * w, uint64_t row )
-{
-    grid_cb_ctx cb_ctx;
-    grid_context gc;
-    bool res = prepare_grid_context( w, &cb_ctx, &gc );
-    if ( res )
-        res = grid_handle_set_row( &gc, row ); /* in line_policy.c */
-    if ( res )
-        RedrawWidgetAndPushEvent( w, ktuidlg_event_changed, cb_ctx.gd->col, cb_ctx.gd->row, NULL );
-    return res;
-}
diff --git a/libs/tui/tui_widget_inputline.c b/libs/tui/tui_widget_inputline.c
deleted file mode 100644
index 43f0a42..0000000
--- a/libs/tui/tui_widget_inputline.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <tui/tui_dlg.h>
-
-#include "tui_widget.h"
-#include "line_policy.h"
-
-#define  IL_CUR_POS 0
-#define  IL_OFFSET 1
-#define  IL_MODE 2
-
-
-void init_inputline( struct KTUIWidget * w )
-{
-    if ( w->txt != NULL )
-    {
-        w->ints[ IL_CUR_POS ] = string_measure ( w->txt, NULL ); /* cursor at the end of it... */
-        if ( w->ints[ IL_CUR_POS ] > ( w->r.w - 2 ) )
-            w->ints[ IL_OFFSET ] = ( w->ints[ IL_CUR_POS ] - ( w->r.w - 2 ) + 1 );
-        else
-            w->ints[ IL_OFFSET ] = 0;
-    }
-    w->ints[ IL_MODE ] = 0;
-}
-
-
-static rc_t draw_inputline_focused( struct KTUI * tui, tui_rect * r, const tui_ac * ac, const tui_ac * hint_ac,
-                                    const char * s, uint32_t cursor_pos, uint32_t offset, uint32_t mode )
-{
-    const char * txt = &( s[ offset ] );
-    uint32_t l = string_measure ( s, NULL );
-    /* draw the visible part of the string */
-    rc_t rc = DlgWrite( tui, r->top_left.x + 1, r->top_left.y, ac, txt, r->w - 2 );
-    if ( rc == 0 )
-    {
-        /* draw the cursor */
-        uint32_t x = r->top_left.x + 1 + cursor_pos - offset;
-        if ( x < ( r->top_left.x + ( r->w - 1 ) ) && x >= r->top_left.x )
-        {
-            if ( cursor_pos >= l )
-                rc = DlgWrite( tui, x, r->top_left.y, ac, "_", 1 );
-            else
-            {
-                char tmp[ 2 ];
-                tui_ac ac2;
-
-                tmp[ 0 ] = s[ cursor_pos ];
-                tmp[ 1 ] = 0;
-                copy_ac( &ac2, ac );
-                ac2.attr |= KTUI_a_underline;
-                if ( mode != 0 )
-                    ac2.attr |= KTUI_a_inverse;
-                rc = DlgWrite( tui, x, r->top_left.y, &ac2, tmp, 1 );
-            }
-        }
-    }
-
-    /* draw the hints that the content is longer than the visible part */
-    if ( rc == 0 && ( l > ( r->w - 2 ) ) )
-    {
-        if ( offset > 0 )
-            rc = DlgWrite( tui, r->top_left.x, r->top_left.y, hint_ac, "<", 1 );
-        if ( rc == 0 && ( l - offset ) > ( r->w - 2 ) )
-            rc = DlgWrite( tui, r->top_left.x + r->w - 1, r->top_left.y, hint_ac, ">", 1 );
-    }
-    return rc;
-}
-
-
-static rc_t draw_inputline_normal( struct KTUI * tui, tui_rect * r, const tui_ac * ac,
-                                   const char * s, uint32_t offset )
-{
-    const char * txt = &( s[ offset ] );
-    return DlgWrite( tui, r->top_left.x + 1, r->top_left.y, ac, txt, r->w - 2 );
-}
-
-
-void draw_inputline( struct KTUIWidget * w )
-{
-    tui_rect r;
-    rc_t rc = KTUIDlgAbsoluteRect ( w->dlg, &r, &w->r );
-    if ( rc == 0 )
-    {
-        tui_ac ac;
-        rc = GetWidgetAc( w, ktuipa_input, &ac );
-        if ( rc == 0 )
-        {
-            rc = draw_background( w->tui, w->focused, &r.top_left, r.w, r.h, ac.bg );
-            if ( rc == 0 && w->txt != NULL )
-            {
-                if ( w->focused )
-                {
-                    const tui_ac * ac_hint = GetWidgetPaletteEntry ( w, ktuipa_input_hint );
-                    rc = draw_inputline_focused( w->tui, &r, &ac, ac_hint, w->txt,
-                                            (uint32_t) w->ints[ IL_CUR_POS ],
-                                            (uint32_t) w->ints[ IL_OFFSET ],
-                                            (uint32_t) w->ints[ IL_MODE ] );
-                }
-                else
-                    rc = draw_inputline_normal( w->tui, &r, &ac, w->txt, (uint32_t) w->ints[ IL_OFFSET ] );
-            }
-        }
-    }
-}
-
-
-static bool always_handle_these_keys( tui_event * event )
-{
-	bool res = false;
-	if ( event->event_type == ktui_event_kb )
-	{
-		switch( event->data.kb_data.code )
-		{
-			case ktui_left : ;
-			case ktui_right : ;
-			case ktui_up : ;
-			case ktui_down : res = true; break;
-		}
-	}
-	return res;
-}
-
-
-bool event_inputline( struct KTUIWidget * w, tui_event * event )
-{
-    bool res;
-
-    lp_context lp;
-    lp.line = w->txt;
-    lp.max_len = w->txt_length;
-    lp.visible = ( w->r.w - 2 );
-    lp.cur_pos = &w->ints[ IL_CUR_POS ];
-    lp.offset = &w->ints[ IL_OFFSET ];
-    lp.mode = &w->ints[ IL_MODE ];
-    lp.content_changed = false;
-    res = lp_handle_event( &lp, event );
-
-    if ( res )
-    {
-        if ( lp.content_changed )
-            SetWidgetChanged ( w, true );
-        RedrawWidgetAndPushEvent( w, ktuidlg_event_changed, w->ints[ IL_CUR_POS ], 0, NULL );
-    }
-    else if ( event->event_type == ktui_event_kb && event->data.kb_data.code == ktui_enter )
-    {
-        KTUIDlgPushEvent( w->dlg, ktuidlg_event_select, w->id, 0, 0, NULL );
-        res = true;
-    }
-
-	if ( !res )
-		res = always_handle_these_keys( event );
-
-    return res;
-}
diff --git a/libs/tui/tui_widget_label.c b/libs/tui/tui_widget_label.c
deleted file mode 100644
index 24e109a..0000000
--- a/libs/tui/tui_widget_label.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/rc.h>
-#include <tui/tui_dlg.h>
-#include "tui_widget.h"
-
-
-void draw_label( struct KTUIWidget * w )
-{
-    tui_rect r;
-    rc_t rc = KTUIDlgAbsoluteRect ( w->dlg, &r, &w->r );
-    if ( rc == 0 )
-    {
-        tui_ac ac;
-        rc = GetWidgetAc( w, ktuipa_label, &ac );
-        if ( rc == 0 )
-        {
-            struct KTUI * tui = w->tui;
-            if ( tui != NULL )
-            {
-                uint32_t x = r.top_left.x;
-                uint32_t y = r.top_left.y;
-                rc = DlgPaint( tui, x, y, r.w, r.h, ac.bg );
-                if ( rc == 0 && w->caption != NULL )
-                    draw_highlighted( tui, x + 1, y, r.w - 2, &ac, w->caption );
-            }
-        }
-    }
-}
diff --git a/libs/tui/tui_widget_progress.c b/libs/tui/tui_widget_progress.c
deleted file mode 100644
index b0b1f47..0000000
--- a/libs/tui/tui_widget_progress.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <tui/tui_dlg.h>
-#include "tui_widget.h"
-
-#include <math.h>
-
-#if 0
-static void calc_percent( struct KTUIWidget * w )
-{
-    uint64_t curr = *( ( uint64_t * )w->data_0 );
-    uint64_t max  = *( ( uint64_t * )w->data_1 );
-    w->ints[ 0 ] = 0;   /* int-part of result */
-    w->ints[ 1 ] = 0;   /* fract-part of result ( in 1/1000 )*/
-    if ( max > 0 && curr > 0 && curr <= max )
-    {
-        double fractpart, intpart;
-        double x = (double)curr;
-        x *= 100.0;
-        x /= max;
-        fractpart = modf ( x, &intpart );
-        w->ints[ 0 ] = ( uint64_t )floor( intpart );
-        fractpart *= 1000;
-        w->ints[ 1 ] = ( uint64_t )floor( fractpart );
-    }
-}
-#endif
-
-void draw_progress( struct KTUIWidget * w )
-{
-    tui_rect r;
-    rc_t rc = KTUIDlgAbsoluteRect ( w->dlg, &r, &w->r );
-    if ( rc == 0 )
-    {
-        tui_ac ac;
-        rc = GetWidgetAc( w, ktuipa_progress, &ac );
-        if ( rc == 0 )
-            rc = draw_background( w->tui, false, &r.top_left, r.w, r.h, ac.bg );
-        if ( rc == 0 )
-        {
-            char txt[ 32 ];
-            size_t num_writ;
-            tui_ac ac2;
-            int64_t xf = 0, x = w->percent;
-            
-            switch( w->precision )
-            {
-                case 1 :    xf = x % 10;
-                            x /= 10;
-                            string_printf ( txt, sizeof txt, &num_writ, " %u.%.01u %%", x, xf );
-                            break;
-
-                case 2 :    xf = x % 100;
-                            x /= 100;
-                            string_printf ( txt, sizeof txt, &num_writ, " %u.%.02u %%", x, xf );
-                            break;
-
-                case 3 :    xf = x % 1000;
-                            x /= 1000;
-                            string_printf ( txt, sizeof txt, &num_writ, " %u.%.03u %%", x, xf );
-                            break;
-
-                case 4 :    xf = x % 10000;
-                            x /= 10000;
-                            string_printf ( txt, sizeof txt, &num_writ, " %u.%.04u %%", x, xf );
-                            break;
-
-                default : string_printf ( txt, sizeof txt, &num_writ, " %u %%", x ); break;
-            }
-
-            x *= w->r.w;
-            x /= 100;
-
-            copy_ac( &ac2, &ac );
-            ac2.attr = KTUI_a_inverse;
-
-            if ( x >= num_writ )
-            {
-                rc = DlgWrite( w->tui, r.top_left.x, r.top_left.y, &ac2, txt, ( uint32_t )num_writ );
-                if ( rc == 0 && x > num_writ )
-                    rc = DlgPaint( w->tui, r.top_left.x + ( uint32_t )num_writ, r.top_left.y,
-                                   ( uint32_t )( x - num_writ ), r.h, ac.fg );
-            }
-            else
-            {
-                rc = DlgWrite( w->tui, r.top_left.x, r.top_left.y, &ac2, txt, ( uint32_t )x );
-                if ( rc == 0 )
-                    rc = DlgWrite( w->tui, r.top_left.x + ( uint32_t )x, r.top_left.y,
-                                   &ac, &txt[ x ], ( uint32_t )( num_writ - x ) );
-            }
-        }
-    }
-}
diff --git a/libs/tui/tui_widget_radiobox.c b/libs/tui/tui_widget_radiobox.c
deleted file mode 100644
index 51f917e..0000000
--- a/libs/tui/tui_widget_radiobox.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/namelist.h>
-#include <tui/tui_dlg.h>
-#include "tui_widget.h"
-#include "line_policy.h"
-
-void draw_radiobox( struct KTUIWidget * w )
-{
-    tui_rect r;
-    rc_t rc = KTUIDlgAbsoluteRect ( w->dlg, &r, &w->r );
-    if ( rc == 0 )
-    {
-        tui_ac ac;
-        rc = GetWidgetAc( w, ktuipa_radiobox, &ac );
-        if ( rc == 0 )
-            rc = draw_background( w->tui, w->focused, &r.top_left, r.w, r.h, ac.bg );
-        if ( rc == 0 && w->strings != NULL )
-        {
-            uint32_t count;
-            rc = VNameListCount ( w->strings, &count );
-            if ( rc == 0 )
-            {
-                uint32_t idx, offset = (uint32_t)w->ints[ 0 ];
-                for ( idx = 0; idx < w->r.h; ++idx )
-                {
-                    uint32_t nl_idx = offset + idx;
-                    if ( nl_idx < count )
-                    {
-                        const char * s;
-                        rc = VNameListGet ( w->strings, nl_idx, &s );
-                        if ( rc == 0 && s != NULL )
-                        {
-                            size_t num_writ;
-                            char txt[ 265 ];
-                            if ( nl_idx == w->selected_string )
-                                rc = string_printf ( txt, sizeof txt, &num_writ, "(*) %s", s );
-                            else
-                                rc = string_printf ( txt, sizeof txt, &num_writ, "( ) %s", s );
-                            if ( rc == 0 )
-                                rc = DlgWrite( w->tui, r.top_left.x + 1, r.top_left.y + idx,
-                                               &ac, txt, r.w - 2 );
-                        }
-                    }
-                }
-
-                /* draw the scrollbar on the right of the list */
-                if ( rc == 0 && count > r.h )
-                {
-                    rc = DlgPaint( w->tui, r.top_left.x + r.w - 1,
-                                   r.top_left.y, 1, r.h, KTUI_c_gray );
-                    if ( rc == 0 && count > 0 )
-                    {
-                        uint32_t y = r.top_left.y + ( ( ( uint32_t )w->selected_string * r.h ) / count );
-                        rc = DlgPaint( w->tui, r.top_left.x + r.w - 1,
-                                       y, 1, 1, ac.fg );
-                    }
-                }
-            }
-        }
-    }
-}
-
-
-bool event_radiobox( struct KTUIWidget * w, tui_event * event )
-{
-    bool res = false;
-
-    if ( w->strings != NULL )
-    {
-        uint32_t count;
-        rc_t rc = VNameListCount ( w->strings, &count );
-        if ( rc == 0 )
-        {
-            gen_context ctx;
-            ctx.count = count;
-            ctx.visible = w->r.h;
-            ctx.curr = &w->selected_string;
-            ctx.offset = &( w->ints[ 0 ] );
-
-            res = list_handle_event( &ctx, event, 4 );
-            if ( res )
-            {
-                SetWidgetChanged ( w, true );
-                RedrawWidgetAndPushEvent( w, ktuidlg_event_changed, *ctx.curr, 0, ( void * )w->strings );
-            }
-            else if ( event->event_type == ktui_event_kb )
-            {
-                switch( event->data.kb_data.code )
-                {
-                    case ktui_enter : res = true; break;
-                    case ktui_alpha : res = ( event->data.kb_data.key == ' ' ); break;
-                }
-                if ( res )
-                {
-                    SetWidgetChanged ( w, true );
-                    RedrawWidgetAndPushEvent( w, ktuidlg_event_select, *ctx.curr, 0, ( void * )w->strings );
-                }
-            }
-        }
-    }
-    return res;
-}
diff --git a/libs/tui/tui_widget_spin_edit.c b/libs/tui/tui_widget_spin_edit.c
deleted file mode 100644
index 84e6d9a..0000000
--- a/libs/tui/tui_widget_spin_edit.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <tui/tui_dlg.h>
-#include "tui_widget.h"
-
-void draw_spinedit( struct KTUIWidget * w )
-{
-    tui_rect r;
-    rc_t rc = KTUIDlgAbsoluteRect ( w->dlg, &r, &w->r );
-    if ( rc == 0 )
-    {
-        tui_ac ac;
-        rc = GetWidgetAc( w, ktuipa_spinedit, &ac );
-        if ( rc == 0 )
-        {
-            tui_ac ac2;
-            set_ac( &ac2, ac.attr, ac.bg, ac.fg );   /* reverse the colors */
-
-            if ( w->focused )
-            {
-                rc = DlgPaint( w->tui, r.top_left.x, r.top_left.y, 1, r.h, KTUI_c_red );
-                r.top_left.x += 1;
-                r.w -= 1;
-            }
-
-            if ( rc == 0 )
-                rc = DlgWrite( w->tui, r.top_left.x, r.top_left.y, &ac2, " + ", 3 );
-            if ( rc == 0 )
-                rc = DlgWrite( w->tui, r.top_left.x + r.w - 3, r.top_left.y, &ac2, " - ", 3 );
-
-            if ( rc == 0 )
-            {
-                char txt[ 32 ];
-                size_t num_writ;
-                string_printf ( txt, sizeof txt, &num_writ, " %ld", w->int64_value );
-                rc = DlgWrite( w->tui, r.top_left.x + 3, r.top_left.y, &ac, txt, r.w - 6 );
-            }
-        }
-    }
-}
-
-
-static bool spinedit_inc_dec( struct KTUIWidget * w, int64_t by )
-{
-    SetWidgetInt64Value ( w, GetWidgetInt64Value ( w ) + by );
-    return true;
-}
-
-
-static bool spinedit_set( struct KTUIWidget * w, int64_t v )
-{
-    SetWidgetInt64Value ( w, v );
-    return true;
-}
-
-
-bool event_spinedit( struct KTUIWidget * w, tui_event * event )
-{
-    bool res = false;
-
-    if ( event->event_type == ktui_event_kb )
-    {
-        switch( event->data.kb_data.code )
-        {
-            case ktui_home  : res = spinedit_set( w, w->int64_min ); break;
-            case ktui_end   : res = spinedit_set( w, w->int64_max ); break;
-            case ktui_up    : res = spinedit_inc_dec( w, +1 ); break;
-            case ktui_down  : res = spinedit_inc_dec( w, -1 ); break;
-            case ktui_pgup  : res = spinedit_inc_dec( w, +10 ); break;
-            case ktui_pgdn  : res = spinedit_inc_dec( w, -10 ); break;
-            case ktui_alpha : switch( event->data.kb_data.key )
-                                {
-                                    case '+' : res = spinedit_inc_dec( w, +1 ); break;
-                                    case '-' : res = spinedit_inc_dec( w, -1 ); break;
-                                }
-        }
-    }
-    else if ( event->event_type == ktui_event_mouse )
-    {
-        uint32_t x = event->data.mouse_data.x;
-        if ( x < 4 )
-            res = spinedit_inc_dec( w, +1 );
-        else if ( x > ( w->r.w - 4 ) ) 
-            res = spinedit_inc_dec( w, -1 );
-    }
-
-    if ( res )
-        RedrawWidgetAndPushEvent( w, ktuidlg_event_changed, w->int64_value, 0, NULL );
-
-    return res;
-}
diff --git a/libs/tui/tui_widget_string_list.c b/libs/tui/tui_widget_string_list.c
deleted file mode 100644
index 4e9e0b0..0000000
--- a/libs/tui/tui_widget_string_list.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/namelist.h>
-#include <tui/tui_dlg.h>
-#include "tui_widget.h"
-#include "line_policy.h"
-
-#define DL_V_OFFSET 0
-#define DL_H_OFFSET 1
-
-void draw_list( struct KTUIWidget * w )
-{
-    tui_rect r;
-    rc_t rc = KTUIDlgAbsoluteRect ( w->dlg, &r, &w->r );
-    if ( rc == 0 )
-    {
-        tui_ac ac;
-        rc = GetWidgetAc( w, ktuipa_list, &ac );
-        if ( rc == 0 )
-            rc = draw_background( w->tui, w->focused, &r.top_left, r.w, r.h, ac.bg );
-        if ( rc == 0 && w->strings != NULL )
-        {
-            uint32_t count;
-            rc = VNameListCount ( w->strings, &count );
-            if ( rc == 0 )
-            {
-                uint32_t idx, offset = ( uint32_t )w->ints[ DL_V_OFFSET ];
-                for ( idx = 0; idx < w->r.h; ++idx )
-                {
-                    uint32_t nl_idx = offset + idx;
-                    if ( nl_idx < count )
-                    {
-                        const char * s;
-                        rc = VNameListGet ( w->strings, nl_idx, &s );
-                        if ( rc == 0 && s != NULL )
-                        {
-                            uint32_t length = string_measure ( s, NULL );
-                            if ( w->ints[ DL_H_OFFSET ] < length )
-                                s += w->ints[ DL_H_OFFSET ];
-                            else
-                                s = " ";
-                            if ( nl_idx == w->selected_string )
-                            {
-                                tui_ac ac2;
-                                copy_ac( &ac2, &ac );
-                                ac2.attr = KTUI_a_inverse;
-                                rc = DlgWrite( w->tui, r.top_left.x + 1, r.top_left.y + idx,
-                                               &ac2, s, r.w - 2 );
-                            }
-                            else
-                                rc = DlgWrite( w->tui, r.top_left.x + 1, r.top_left.y + idx,
-                                               &ac, s, r.w - 2 );
-                        }
-                    }
-                }
-
-                /* draw the scrollbar on the right of the list */
-                if ( rc == 0 && count > r.h )
-                    rc = DrawVScroll( w->tui, &r, count, w->selected_string, KTUI_c_gray, ac.fg );
-            }
-        }
-    }
-}
-
-
-static uint32_t longest_string( VNamelist * list, uint32_t count )
-{
-	rc_t rc = 0;
-	uint32_t idx, res = 0;
-	for ( idx = 0; idx < count && rc == 0; ++idx )
-	{
-		const char * s;
-		rc = VNameListGet ( list, idx, &s );
-		if ( rc == 0 && s != NULL )
-		{
-			uint32_t length = string_measure ( s, NULL );
-			if ( length > res ) res = length;
-		}
-	}
-	return res;
-}
-
-
-static bool always_handle_these_keys( tui_event * event )
-{
-	bool res = false;
-	if ( event->event_type == ktui_event_kb )
-	{
-		switch( event->data.kb_data.code )
-		{
-			case ktui_left : ;
-			case ktui_right : ;
-			case ktui_up : ;
-			case ktui_down : res = true; break;
-		}
-	}
-	return res;
-}
-
-
-bool event_list( struct KTUIWidget * w, tui_event * event )
-{
-    bool res = false;
-    if ( w->strings != NULL )
-    {
-        uint32_t count;
-        rc_t rc = VNameListCount ( w->strings, &count );
-        if ( rc == 0 )
-        {
-            gen_context ctx;
-            uint64_t prev_selection;
-            ctx.count = count;
-            ctx.visible = w->r.h;
-            ctx.curr = &w->selected_string;
-            ctx.offset = &( w->ints[ DL_V_OFFSET ] );
-
-            prev_selection = *ctx.curr;
-            res = list_handle_event( &ctx, event, 0 );
-            if ( res )
-			{
-                RedrawWidgetAndPushEvent( w, ktuidlg_event_changed, *ctx.curr, prev_selection, (void *)w->strings );
-			}
-            else if ( event->event_type == ktui_event_kb )
-            {
-                switch( event->data.kb_data.code )
-                {
-                    case ktui_enter :  RedrawWidgetAndPushEvent( w, ktuidlg_event_select, *ctx.curr, 0, (void *)w->strings );
-										res = true;
-                                        break;
-
-                    case ktui_left :   if ( w->ints[ DL_H_OFFSET ] > 0 )
-                                        {
-                                            w->ints[ DL_H_OFFSET ]--;
-                                            RedrawWidget( w );
-                                        }
-										res = true;
-                                        break;
-
-                    case ktui_right :  if ( longest_string( w->strings, count ) > w->r.w )
-										{
-											w->ints[ DL_H_OFFSET ]++;
-											RedrawWidget( w );
-										}
-										res = true;
-                                        break;
-
-                }
-            }
-        }
-    }
-
-	if ( !res )
-		res = always_handle_these_keys( event );
-
-    return res;
-}
diff --git a/libs/tui/unix/systui.c b/libs/tui/unix/systui.c
deleted file mode 100644
index 92d6a17..0000000
--- a/libs/tui/unix/systui.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/*--------------------------------------------------------------------------
- * empty, because the code is now in libs/tui/linux/systui.c
- */
diff --git a/libs/tui/win/systui.c b/libs/tui/win/systui.c
deleted file mode 100644
index 1fd934e..0000000
--- a/libs/tui/win/systui.c
+++ /dev/null
@@ -1,590 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <tui/extern.h>
-#include <tui/tui.h>
-#include "../tui-priv.h"
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <windows.h>
-#include <assert.h>
-
-
-/**********************************************************************************/
-
-static WORD tui_color_to_win_fg( KTUI_color c)
-{
-    switch ( c )
-    {
-        case KTUI_c_light_gray      : return FOREGROUND_BLUE|FOREGROUND_GREEN|FOREGROUND_RED;
-        case KTUI_c_gray            : return FOREGROUND_INTENSITY;
-        case KTUI_c_white           : return FOREGROUND_BLUE|FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_INTENSITY;
-
-        case KTUI_c_dark_red        : return FOREGROUND_RED;
-        case KTUI_c_red             : return FOREGROUND_RED|FOREGROUND_INTENSITY;
-
-        case KTUI_c_dark_green      : return FOREGROUND_GREEN;
-        case KTUI_c_green           : return FOREGROUND_GREEN|FOREGROUND_INTENSITY;
-
-        case KTUI_c_brown           : return FOREGROUND_RED|FOREGROUND_GREEN;
-        case KTUI_c_yellow          : return FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_INTENSITY;
-
-        case KTUI_c_dark_blue       : return FOREGROUND_BLUE;
-        case KTUI_c_blue            : return FOREGROUND_BLUE|FOREGROUND_INTENSITY;
-
-        case KTUI_c_dark_magenta    : return FOREGROUND_RED|FOREGROUND_BLUE;
-        case KTUI_c_magenta         : return FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_INTENSITY;
-
-        case KTUI_c_dark_cyan       : return FOREGROUND_GREEN|FOREGROUND_BLUE;
-        case KTUI_c_cyan            : return FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_INTENSITY;
-
-
-        case KTUI_c_black           :
-        default                     : return 0;
-    }
-}
-
-
-static WORD tui_color_to_win_bg( KTUI_color c )
-{
-    switch ( c )
-    {
-        case KTUI_c_light_gray      : return BACKGROUND_BLUE|BACKGROUND_GREEN|BACKGROUND_RED;
-        case KTUI_c_gray            : return BACKGROUND_INTENSITY;
-        case KTUI_c_white           : return BACKGROUND_BLUE|BACKGROUND_GREEN|BACKGROUND_RED|BACKGROUND_INTENSITY;
-
-        case KTUI_c_dark_red        : return BACKGROUND_RED;
-        case KTUI_c_red             : return BACKGROUND_RED|BACKGROUND_INTENSITY;
-
-        case KTUI_c_dark_green      : return BACKGROUND_GREEN;
-        case KTUI_c_green           : return BACKGROUND_GREEN|BACKGROUND_INTENSITY;
-
-        case KTUI_c_brown           : return BACKGROUND_RED|BACKGROUND_GREEN;
-        case KTUI_c_yellow          : return BACKGROUND_RED|BACKGROUND_GREEN|BACKGROUND_INTENSITY;
-
-        case KTUI_c_dark_blue       : return BACKGROUND_BLUE;
-        case KTUI_c_blue            : return BACKGROUND_BLUE|BACKGROUND_INTENSITY;
-
-        case KTUI_c_dark_magenta    : return BACKGROUND_RED|BACKGROUND_BLUE;
-        case KTUI_c_magenta         : return BACKGROUND_RED|BACKGROUND_BLUE|BACKGROUND_INTENSITY;
-
-        case KTUI_c_dark_cyan       : return BACKGROUND_GREEN|BACKGROUND_BLUE;
-        case KTUI_c_cyan            : return BACKGROUND_GREEN|BACKGROUND_BLUE|BACKGROUND_INTENSITY;
-
-
-        case KTUI_c_black           :
-        default                     : return 0;
-    }
-}
-
-
-static void set_tui_attrib_and_colors( HANDLE h, tui_ac * curr,
-                                       KTUI_attrib attr,
-                                       KTUI_color color_fg,
-                                       KTUI_color color_bg )
-{
-    if ( curr->attr != attr || curr->fg != color_fg || curr->bg != color_bg )
-    {
-        bool reverse = ( attr & KTUI_a_underline ) || ( attr & KTUI_a_inverse );
-
-        if ( reverse )
-            SetConsoleTextAttribute( h,  tui_color_to_win_fg( color_bg ) | 
-                                         tui_color_to_win_bg( color_fg ) );
-        else
-            SetConsoleTextAttribute( h,  tui_color_to_win_fg( color_fg ) | 
-                                         tui_color_to_win_bg( color_bg ) );
-
-        curr->attr = attr;
-        curr->fg = color_fg;
-        curr->bg = color_bg;
-    }
-}
-
-
-void CC tui_send_strip( int x, int y, int count, tui_ac * curr, tui_ac * v,
-                        const char * s )
-{
-    HANDLE h = GetStdHandle( STD_OUTPUT_HANDLE );
-    if ( h != INVALID_HANDLE_VALUE )
-    {
-        DWORD nBytesWritten;
-        COORD curpos = { (SHORT)x, (SHORT)y };
-
-        set_tui_attrib_and_colors( h, curr, v->attr, v->fg, v->bg );
-        SetConsoleCursorPosition( h, curpos );
-        WriteConsoleA( h, s, ( DWORD )count, &nBytesWritten, NULL );
-    }
-}
-
-
-/**********************************************************************************/
-
-
-typedef struct KTUI_pf
-{
-    CONSOLE_SCREEN_BUFFER_INFO  sbinfo;
-    CONSOLE_CURSOR_INFO         curinfo;
-    DWORD                       bitsConsoleInputMode;
-    int                         esc_count;
-
-	int							prev_x, prev_y;
-    KTUI_mouse_button			prev_button;
-	KTUI_mouse_action			prev_action;
-} KTUI_pf;
-
-
-static void store_mouse_event( struct KTUI_pf * pf, int x, int y, KTUI_mouse_button b, KTUI_mouse_action a )
-{
-	pf -> prev_x = x;
-	pf -> prev_y = y;
-	pf -> prev_button = b;
-	pf -> prev_action = a;
-}
-
-static bool different_mouse_event( struct KTUI_pf * pf, int x, int y, KTUI_mouse_button b, KTUI_mouse_action a )
-{
-	return ( pf -> prev_x != x ||
-			 pf -> prev_y != y ||
-			 pf -> prev_button != b ||
-			 pf -> prev_action != a );
-}
-
-
-static KTUI_key g_VirtualCodeTable[ 256 ]; /* if max VK_* constant value is greater than 0xFF, then this code must be revised */
-
-
-static void InitTableRange( int* table, size_t offset_first, size_t offset_last, int val )
-{
-    size_t i;
-    assert( offset_first < 256 );
-    assert( offset_last < 256 );
-
-    for ( i = offset_first; i <= offset_last; ++i )
-        table[ i ] = val;
-}
-
-
-static void InitVKTable( KTUI_key* table, size_t size )
-{
-    /*
-        the table is supposed to be used in a "white-list approach",
-        so it initializes every code that is supposed to be processed
-    */
-    size_t i;
-    for ( i = 0; i < size; ++i )
-        table[ i ] = ktui_none;
-
-    /* special key virtual codes */
-    table[VK_DOWN]   = ktui_down;
-    table[VK_UP]     = ktui_up;
-    table[VK_LEFT]   = ktui_left;
-    table[VK_RIGHT]  = ktui_right;
-    table[VK_HOME]   = ktui_home;
-    table[VK_END]    = ktui_end;
-    table[VK_BACK]   = ktui_bksp;
-    table[VK_F1]     = ktui_F1;
-    table[VK_F2]     = ktui_F2;
-    table[VK_F3]     = ktui_F3;
-    table[VK_F4]     = ktui_F4;
-    table[VK_F5]     = ktui_F5;
-    table[VK_F6]     = ktui_F6;
-    table[VK_F7]     = ktui_F7;
-    table[VK_F8]     = ktui_F8;
-    table[VK_F9]     = ktui_F9;
-    table[VK_F10]    = ktui_F10;
-    table[VK_F11]    = ktui_F11;
-    table[VK_F12]    = ktui_F12;
-    table[VK_DELETE] = ktui_del;
-    table[VK_INSERT] = ktui_ins;
-    table[VK_NEXT]   = ktui_pgdn; 
-    table[VK_PRIOR]  = ktui_pgup; 
-    table[VK_RETURN] = ktui_enter;
-    table[VK_TAB]    = ktui_tab;
-    /*
-        for the numpad windows reports the same ascii characters
-        as for standart number keys, so treat them as ktui_alpha
-    */
-    table[VK_NUMPAD0]  = ktui_alpha;
-    table[VK_NUMPAD1]  = ktui_alpha;
-    table[VK_NUMPAD2]  = ktui_alpha;
-    table[VK_NUMPAD3]  = ktui_alpha;
-    table[VK_NUMPAD4]  = ktui_alpha;
-    table[VK_NUMPAD5]  = ktui_alpha;
-    table[VK_NUMPAD6]  = ktui_alpha;
-    table[VK_NUMPAD7]  = ktui_alpha;
-    table[VK_NUMPAD8]  = ktui_alpha;
-    table[VK_NUMPAD9]  = ktui_alpha;
-    table[VK_MULTIPLY] = ktui_alpha;
-    table[VK_ADD]      = ktui_alpha;
-    table[VK_SUBTRACT] = ktui_alpha;
-    table[VK_DECIMAL]  = ktui_alpha;
-    table[VK_DIVIDE]   = ktui_alpha;
-
-    /* some other keys translated to ASCII */
-    table[VK_SPACE]      = ktui_alpha;
-    table[VK_OEM_1]      = ktui_alpha;
-    table[VK_OEM_PLUS]   = ktui_alpha;
-    table[VK_OEM_COMMA]  = ktui_alpha;
-    table[VK_OEM_MINUS]  = ktui_alpha;
-    table[VK_OEM_PERIOD] = ktui_alpha;
-    table[VK_OEM_2]      = ktui_alpha;
-    table[VK_OEM_3]      = ktui_alpha;
-    table[VK_OEM_4]      = ktui_alpha;
-    table[VK_OEM_5]      = ktui_alpha;
-    table[VK_OEM_6]      = ktui_alpha;
-    table[VK_OEM_7]      = ktui_alpha;
-    table[VK_OEM_8]      = ktui_alpha;
-    table[VK_OEM_102]    = ktui_alpha;
-    table[VK_OEM_CLEAR]  = ktui_alpha;
-    table[VK_ESCAPE]     = ktui_alpha;
-
-    /* keys */
-    InitTableRange( table, 0x30, 0x39, ktui_alpha );
-    InitTableRange( table, 0x41, 0x5A, ktui_alpha );
-}
-
-
-static KTUI_key TranslateVKtoKTUI( WORD wVirtualKeyCode )
-{
-	KTUI_key res;
-    if ( wVirtualKeyCode < _countof( g_VirtualCodeTable ) )
-        res = g_VirtualCodeTable[ wVirtualKeyCode ];
-    else
-        res = ktui_none;
-	return res;
-}
-
-
-static void save_current_console_settings( HANDLE hStdOut, HANDLE hStdIn, KTUI_pf * pWinSettings, KTUI * pCommonSettings )
-{
-    GetConsoleScreenBufferInfo( hStdOut, &pWinSettings->sbinfo );
-    GetConsoleCursorInfo( hStdOut, &pWinSettings->curinfo );
-    GetConsoleMode( hStdIn, &pWinSettings->bitsConsoleInputMode );
-
-    pCommonSettings->lines = ( pWinSettings->sbinfo.srWindow.Bottom - pWinSettings->sbinfo.srWindow.Top );
-    pCommonSettings->cols  = ( pWinSettings->sbinfo.srWindow.Right - pWinSettings->sbinfo.srWindow.Left );
-}
-
-
-static void set_tui_settings( HANDLE hStdOut, HANDLE hStdIn, KTUI_pf const * pWinSettings )
-{
-    DWORD bitsMode = pWinSettings->bitsConsoleInputMode; /* use mostly default windows settings */
-    CONSOLE_CURSOR_INFO curinfo = { 1, FALSE };
-
-    bitsMode &= ~ENABLE_ECHO_INPUT;      /* disable echo */
-    bitsMode &= ~ENABLE_LINE_INPUT;      /* something like raw mode? TODO: ask Wolfgang */
-    bitsMode &= ~ENABLE_PROCESSED_INPUT; /* capture Ctrl-C by application rather than system, shold be reset along with ENABLE_LINE_INPUT */
-
-    bitsMode |= ENABLE_MOUSE_INPUT;      /* explicitly enabling mouse for the case when it was disabled in windows */
-    /*bitsMode |= ENABLE_QUICK_EDIT_MODE;  /* explicitly enabling user to use the mouse for text selection and editing*/
-    bitsMode |= ENABLE_WINDOW_INPUT;     /* process console screen buffer changes (?)*/
-
-    SetConsoleMode( hStdIn, bitsMode );
-    SetConsoleCursorInfo( hStdOut, &curinfo );   /* cursor off */
-}
-
-
-static void restore_console_settings( HANDLE hStdOut, HANDLE hStdIn, KTUI_pf const * pWinSettings )
-{
-    SetConsoleMode( hStdIn, pWinSettings->bitsConsoleInputMode );
-
-    SetConsoleCursorPosition( hStdOut, pWinSettings->sbinfo.dwCursorPosition );
-    SetConsoleCursorInfo( hStdOut, &pWinSettings->curinfo );
-    SetConsoleTextAttribute( hStdOut, pWinSettings->sbinfo.wAttributes );
-    SetConsoleMode( hStdIn, pWinSettings->bitsConsoleInputMode );
-}
-
-
-/* This is from MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682022%28v=vs.85%29.aspx */
-void cls( HANDLE hConsole )
-{
-   COORD coordScreen = { 0, 0 };    // home for the cursor 
-   DWORD cCharsWritten;
-   CONSOLE_SCREEN_BUFFER_INFO csbi; 
-   DWORD dwConSize;
-
-/* Get the number of character cells in the current buffer. */
-
-   if( !GetConsoleScreenBufferInfo( hConsole, &csbi ))
-   {
-      return;
-   }
-
-   dwConSize = csbi.dwSize.X * csbi.dwSize.Y;
-
-   /* Fill the entire screen with blanks. */
-
-   if( !FillConsoleOutputCharacter( hConsole,        /* Handle to console screen buffer */
-                                    (TCHAR) ' ',     /* Character to write to the buffer */
-                                    dwConSize,       /* Number of cells to write */
-                                    coordScreen,     /* Coordinates of first cell */
-                                    &cCharsWritten ))/* Receive number of characters written */
-   {
-      return;
-   }
-
-   /* Get the current text attribute. */
-
-   if( !GetConsoleScreenBufferInfo( hConsole, &csbi ))
-   {
-      return;
-   }
-
-   /* Set the buffer's attributes accordingly. */
-
-   if( !FillConsoleOutputAttribute( hConsole,         /* Handle to console screen buffer */
-                                    csbi.wAttributes, /* Character attributes to use */
-                                    dwConSize,        /* Number of cells to set attribute */
-                                    coordScreen,      /* Coordinates of first cell */
-                                    &cCharsWritten )) /* Receive number of characters written */
-   {
-      return;
-   }
-
-   /* Put the cursor at its home coordinates. */
-
-   SetConsoleCursorPosition( hConsole, coordScreen );
-}
-
-
-rc_t CC KTUI_Init_platform( KTUI * self )
-{
-    HANDLE hStdOut = INVALID_HANDLE_VALUE;
-    HANDLE hStdIn  = INVALID_HANDLE_VALUE;
-    rc_t rc = 0;
-    struct KTUI_pf * pf = malloc( sizeof(*pf) );
-    if ( pf == NULL )
-        rc = RC( rcApp, rcAttr, rcCreating, rcMemory, rcExhausted );
-    else
-    {
-        memset( pf, 0, sizeof( *pf ) );
-        hStdOut = GetStdHandle( STD_OUTPUT_HANDLE );
-        hStdIn  = GetStdHandle( STD_INPUT_HANDLE );
-        if ( hStdOut != INVALID_HANDLE_VALUE && hStdIn != INVALID_HANDLE_VALUE )
-        {
-            save_current_console_settings( hStdOut, hStdIn, pf, self );
-            set_tui_settings( hStdOut, hStdIn, pf );
-        }
-
-        self->pf = pf;
-        InitVKTable( g_VirtualCodeTable, _countof( g_VirtualCodeTable ) );
-		store_mouse_event( pf, 0, 0, ktui_mouse_button_none, ktui_mouse_action_none );
-    }
-    return rc;
-}
-
-
-rc_t CC KTUI_Destroy_platform ( struct KTUI_pf * pf )
-{
-    HANDLE hStdOut = INVALID_HANDLE_VALUE;
-    HANDLE hStdIn  = INVALID_HANDLE_VALUE;
-
-    if ( pf != NULL )
-    {
-        hStdOut = GetStdHandle( STD_OUTPUT_HANDLE );
-        hStdIn  = GetStdHandle( STD_INPUT_HANDLE );
-        if ( hStdOut != INVALID_HANDLE_VALUE && hStdIn != INVALID_HANDLE_VALUE )
-        {
-            restore_console_settings( hStdOut, hStdIn, pf );
-            cls( hStdOut );
-        }
-        free( ( void * ) pf );
-    }
-
-    return 0;
-}
-
-
-static BOOL KeyEventProc( KEY_EVENT_RECORD const* pEvent, struct KTUI * self )
-{
-    BOOL ret = FALSE;
-    if ( pEvent->bKeyDown )
-    {
-        struct KTUI_pf * pf = ( self->pf );
-        int key = 0;
-
-        KTUI_key code = TranslateVKtoKTUI( pEvent->wVirtualKeyCode );
-
-        if ( code == ktui_alpha )
-        {
-            key = ( int )( pEvent->uChar.AsciiChar );
-
-            /* we artificially let the user press ESC twice to make it do the same as a posix console */
-            if ( key == 27 )
-            {
-                if ( pf->esc_count == 0 )
-                {
-                    code = ktui_none;
-                    pf->esc_count = 1;
-                }
-                else
-                    pf->esc_count = 0;
-            }
-            else
-                pf->esc_count = 0;
-        }
-        else
-            pf->esc_count = 0;
-
-        if ( code == ktui_tab && ( ( pEvent->dwControlKeyState & SHIFT_PRESSED ) == SHIFT_PRESSED ) )
-            code = ktui_shift_tab;
-        
-        if ( code != ktui_none )
-        {
-            size_t i;
-            for ( i = 0; i < pEvent->wRepeatCount; ++i )
-            {
-                put_kb_event( self, key, code );
-                ret = TRUE;
-            }
-        }
-    }
-    return ret;
-}
-
-
-static KTUI_mouse_button get_button( DWORD btn_flags )
-{
-	KTUI_mouse_button res = ktui_mouse_button_none;
-	switch( btn_flags )
-	{
-        case FROM_LEFT_1ST_BUTTON_PRESSED : res = ktui_mouse_button_left; break;
-        case FROM_LEFT_2ND_BUTTON_PRESSED : res = ktui_mouse_button_middle; break;
-        case RIGHTMOST_BUTTON_PRESSED     : res = ktui_mouse_button_right; break;
-		case 0 : res = ktui_mouse_button_up; break;
-	}
-	return res;
-}
-
-static KTUI_mouse_action get_action( DWORD ev_flags, KTUI_mouse_button button )
-{
-	KTUI_mouse_action res = ktui_mouse_action_none;
-
-	if ( ev_flags == 0 || ( ( ev_flags & DOUBLE_CLICK ) == DOUBLE_CLICK ) )
-	{
-		res = ktui_mouse_action_button;
-	}
-	else if ( ( ev_flags & MOUSE_MOVED ) == MOUSE_MOVED )
-	{
-		/* to make the behavior the same as on posix:
-		   if not mouse-buttons is pressed, do not report a move action... */
-		if ( button != ktui_mouse_button_up )
-			res = ktui_mouse_action_move;
-	}
-	else if ( ( ev_flags & MOUSE_WHEELED ) == MOUSE_WHEELED )
-	{
-		res = ktui_mouse_action_scroll;
-	}
-	return res;
-}
-
-static void MouseEventProc( MOUSE_EVENT_RECORD const* pEvent, struct KTUI* self )
-{
-    KTUI_mouse_button button = get_button( pEvent->dwButtonState );
-	KTUI_mouse_action action = get_action( pEvent->dwEventFlags, button );
-
-	if ( button != ktui_mouse_button_none && action != ktui_mouse_action_none )
-	{
-		int x = pEvent->dwMousePosition.X;
-		int y = pEvent->dwMousePosition.Y;
-		if ( different_mouse_event( self->pf, x, y, button, action ) )
-		{
-			put_mouse_event( self, x, y, button, action,
-						    ( uint32_t )( pEvent->dwEventFlags & 0xFFFFFFFF ) );
-			store_mouse_event( self->pf, x, y, button, action );
-		}
-	}
-}
-
-
-static void WindowBufferSizeEventProc( WINDOW_BUFFER_SIZE_RECORD const* pEvent, struct KTUI* self )
-{
-    put_window_event( self, pEvent->dwSize.Y, pEvent->dwSize.X );
-}
-
-
-#define INPUT_EVENT_BUF_SIZE 10
-
-static BOOL ReadAndProcessEvents( struct KTUI * self, HANDLE h )
-{
-    DWORD nEventsRead;
-    INPUT_RECORD arrInputEvents[ INPUT_EVENT_BUF_SIZE ];
-    PINPUT_RECORD pInputEvents = arrInputEvents;
-	BOOL res = ReadConsoleInput( h, pInputEvents, INPUT_EVENT_BUF_SIZE, &nEventsRead );
-    if ( res )
-	{
-		DWORD i;
-		for ( i = 0; i < nEventsRead; ++i )
-		{
-			switch ( pInputEvents[ i ].EventType )
-			{
-				case KEY_EVENT					: KeyEventProc( &pInputEvents[ i ].Event.KeyEvent, self ); break;
-				case MOUSE_EVENT				: MouseEventProc( &pInputEvents[ i ].Event.MouseEvent, self ); break;
-				case WINDOW_BUFFER_SIZE_EVENT	: WindowBufferSizeEventProc( &pInputEvents[ i ].Event.WindowBufferSizeEvent, self ); break;
-			}
-		}
-    }
-    return res;
-}
-
-
-void CC read_from_stdin( struct KTUI * self, uint32_t timeout )
-{
-    BOOL resEventProc;
-    DWORD dwStartedWaitingTime, dwEffectiveTimeout, dwTimeElapsed, dwWaitRes;
-    HANDLE h = INVALID_HANDLE_VALUE;
-    DWORD const dwMinimumTimeout = 10;
-
-    h = GetStdHandle( STD_INPUT_HANDLE );
-    if ( h == INVALID_HANDLE_VALUE )
-        return;
-
-    /* blocking waiting with the timeout */
-    dwEffectiveTimeout = min( ( DWORD )( timeout / 1000 ), dwMinimumTimeout );
-    dwStartedWaitingTime = GetTickCount();
-    dwTimeElapsed = 0;
-    for ( ; ; )
-    {
-        dwWaitRes = WaitForSingleObject( h, dwEffectiveTimeout - dwTimeElapsed );
-        if ( dwWaitRes == WAIT_OBJECT_0 )
-        {
-            resEventProc = ReadAndProcessEvents( self, h );
-            if ( resEventProc )
-                break;
-            /*continue waiting for the remaining time */
-            dwTimeElapsed = GetTickCount() - dwStartedWaitingTime;
-            if ( dwTimeElapsed >= dwEffectiveTimeout )
-                break;
-        }
-        else /* timeout, error */
-        {
-            break;
-        }
-    }
-}
diff --git a/libs/vdb/.gitignore b/libs/vdb/.gitignore
deleted file mode 100644
index c253038..0000000
--- a/libs/vdb/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.def
diff --git a/libs/vdb/Makefile b/libs/vdb/Makefile
deleted file mode 100644
index 4fe5ceb..0000000
--- a/libs/vdb/Makefile
+++ /dev/null
@@ -1,188 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/vdb
-
-INT_LIBS = \
-	libvdb \
-	libwvdb
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES =     \
-	$(VDB_OBJ) \
-	$(WVDB_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/all $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# virtual db library
-#
-$(ILIBDIR)/libvdb: $(addprefix $(ILIBDIR)/libvdb.,$(ILIBEXT))
-
-VDBCMN_SRC = \
-	dbmgr-cmn \
-	schema-tok \
-	schema-parse \
-	schema-type \
-	schema-func \
-	schema-prod \
-	schema-expr \
-	schema-eval \
-	schema-tbl \
-	schema-db \
-	schema-dump \
-	schema-int \
-	schema \
-	linker-int \
-	linker-cmn \
-	database-cmn \
-	database-depend \
-	database-load \
-	table-cmn \
-	table-load \
-	cursor-cmn \
-	column-cmn \
-	prod-cmn \
-	prod-expr \
-	prod-func \
-	phys-cmn \
-	phys-load \
-	blob \
-	blob-headers \
-	page-map \
-	row-id \
-	row-len \
-	fixed-row-len \
-	merge \
-	split \
-	compare \
-	meta-read \
-	meta-value \
-	meta-attr-read \
-	cast \
-	range-validate \
-	parameter-read \
-	redimension \
-	index_project \
-	index_lookup \
-	transpose \
-	delta_average \
-	report-vdb
-
-VDB_SRC = \
-	$(VDBCMN_SRC) \
-	dbmgr \
-	linker \
-	database \
-	table \
-	cursor \
-	column \
-	prod \
-	phys
-
-VDB_OBJ = \
-	$(addsuffix .$(LOBX),$(VDB_SRC))
-
-VDB_LIB = \
-	-dkdb \
-	-dvfs \
-	-dkfg \
-	-dkfs \
-	-dkproc \
-	-dklib \
-	-dz
-
-$(ILIBDIR)/libvdb.$(LIBX): $(VDB_OBJ)
-	$(LD) --slib -o $@ $^ $(VDB_LIB)
-
-#-------------------------------------------------------------------------------
-# update version
-#
-$(ILIBDIR)/libwvdb: $(addprefix $(ILIBDIR)/libwvdb.,$(ILIBEXT))
-
-WVDB_SRC = \
-	$(VDBCMN_SRC) \
-	wdbmgr \
-	wlinker \
-	wdatabase \
-	wtable \
-	wcursor \
-	wcolumn \
-	wprod \
-	wphys \
-	meta-write \
-	meta-attr-write \
-	meta-append \
-	index_insert
-
-WVDB_OBJ = \
-	$(addsuffix .$(LOBX),$(WVDB_SRC))
-
-WVDB_LIB = \
-	-dwkdb \
-	-dvfs \
-	-dkfg \
-	-dkfs \
-	-dkproc \
-	-dklib \
-	-dz
-
-$(ILIBDIR)/libwvdb.$(LIBX): $(WVDB_OBJ)
-	$(LD) --slib -o $@ $^ $(WVDB_LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/vdb/blob-headers.c b/libs/vdb/blob-headers.c
deleted file mode 100644
index a05b0a8..0000000
--- a/libs/vdb/blob-headers.c
+++ /dev/null
@@ -1,726 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vdb/extern.h>
-#include <klib/rc.h>
-#include <klib/vlen-encode.h>
-#include <klib/data-buffer.h>
-#include "blob-headers.h"
-#include <vdb/xform.h>
-#include <atomic32.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stddef.h>
-#include <assert.h>
-
-struct VBlobHeaderData {
-    int64_t *args;
-    uint8_t *ops;
-    atomic32_t refcount;
-    uint32_t op_count;
-    uint32_t arg_count;
-    uint64_t osize;
-    uint8_t flags;
-    uint8_t version;
-    uint32_t fmt;
-    bool read_only;
-    bool args_alloc;
-    bool ops_alloc;
-};
-
-struct VBlobHeaderVT {
-    void ( * destroy )( struct VBlobHeader * );
-};
-
-struct VBlobHeader {
-    const struct VBlobHeaderVT *vt;
-    const struct BlobHeaders *parent;
-    const struct VBlobHeaderData *owned;
-    atomic32_t refcount;
-    int32_t op_head;
-    int32_t op_tail;
-    int32_t op_cap;
-    int32_t arg_head;
-    int32_t arg_tail;
-    int32_t arg_cap;
-};
-
-struct BlobHeaders {
-    struct VBlobHeaderData *data;
-    const BlobHeaders *link;
-    atomic32_t refcount;
-};
-
-struct BlobHeaderDummy {
-    struct VBlobHeader hdr;
-    struct BlobHeaders dummy;
-    struct VBlobHeaderData data;
-};
-
-static void VBlobHeaderDestroy( struct VBlobHeader * );
-static void VBlobHeaderDummyDestroy( struct VBlobHeader * );
-static const struct VBlobHeaderVT VBlobHeader_vt[] = { { VBlobHeaderDestroy }, { VBlobHeaderDummyDestroy } };
-
-static void VBlobHeaderDataWhack( struct VBlobHeaderData *that )
-{
-    if (that)
-    {
-        if (that->args_alloc)
-            free(that->args);
-        if (that->ops_alloc)
-            free(that->ops);
-        free(that);
-    }
-}
-
-static rc_t VBlobHeaderDataDestroy( struct VBlobHeaderData *that ) {
-    VBlobHeaderDataWhack(that);
-    return 0;
-}
-
-static rc_t VBlobHeaderDataRelease( const struct VBlobHeaderData *self ) {
-    if (self && atomic32_dec_and_test(&(((struct VBlobHeaderData *)self)->refcount)))
-        return VBlobHeaderDataDestroy((struct VBlobHeaderData *)self);
-    return 0;
-}
-
-#if 0
-static rc_t VBlobHeaderDataAddRef ( const struct VBlobHeaderData *self ) {
-    if (self)
-        atomic32_inc(&(((struct VBlobHeaderData *)self)->refcount));
-    return 0;
-}
-#endif
-
-static int VBlobHeaderDataGetExclusiveOwnership( struct VBlobHeaderData *self ) {
-    if (atomic32_read_and_add(&self->refcount, 1) == 1)
-        return 1;
-    return 0;    
-}
-
-static void BlobHeadersWhack( BlobHeaders *that ) {
-    free( that );
-}
-
-static rc_t BlobHeadersDestroy( BlobHeaders *that ) {
-    const BlobHeaders *link = that->link;
-    
-    VBlobHeaderDataRelease(that->data);
-    BlobHeadersWhack(that);
-    BlobHeadersRelease(link);
-    return 0;
-}
-
-rc_t BlobHeadersAddRef ( const BlobHeaders *self ) {
-    if (self)
-        atomic32_inc(&(((BlobHeaders *)self)->refcount));
-    return 0;
-}
-
-rc_t BlobHeadersRelease ( const BlobHeaders *self ) {
-    if (self && atomic32_dec_and_test(&(((BlobHeaders *)self)->refcount)))
-        return BlobHeadersDestroy((BlobHeaders *)self);
-    return 0;
-}
-
-#if 0
-static int BlobHeadersGetExclusiveOwnership( BlobHeaders *self ) {
-    if (atomic32_read_and_add(&self->refcount, 1) == 1)
-        return 1;
-    return 0;    
-}
-#endif
-
-static rc_t BlobHeadersCreateInternal ( BlobHeaders **lhs, unsigned ops, unsigned args ) {
-    BlobHeaders *y = calloc(1, sizeof *y);
-
-    *lhs = NULL;
-    if (y) {
-        atomic32_set(&y->refcount, 1);
-        y->data = calloc(1, sizeof(*y->data) + args * sizeof(y->data->args[0]) + ops);
-        if (y->data) {
-            atomic32_set(&y->data->refcount, 1);
-            if (args) {
-                y->data->args = (void *)(&y->data[1]);
-                if (ops) {
-                    y->data->ops = (void *)(&y->data->args[args]);
-                    y->data->op_count = ops;
-                }
-                y->data->arg_count = args;
-            }
-            else if (ops) {
-                y->data->ops = (void *)(&y->data[1]);
-                y->data->op_count = ops;
-            }
-            *lhs = y;
-            
-            return 0;
-        }
-        free(y);
-    }
-    return RC(rcVDB, rcHeader, rcConstructing, rcMemory, rcExhausted);
-}
-
-rc_t BlobHeadersCreate( BlobHeaders **lhs )
-{
-    return BlobHeadersCreateInternal( lhs, 0, 0 );
-}
-
-uint32_t BlobHeadersGetMaxBufferSize ( const BlobHeaders *self )
-{
-    uint32_t y = 1;
-    const BlobHeaders *x = self;
-    const uint32_t per_header = 25;
-    
-    while (x) {
-        y += per_header + ( x->data ? (x->data->op_count + x->data->arg_count * 10) : 0 );
-        x = x->link;
-    }
-    return y;
-}
-
-static rc_t deserialize_v0(BlobHeaders **dst, const uint8_t *src, uint64_t ssize);
-
-rc_t BlobHeadersCreateFromData ( BlobHeaders **lhs, const uint8_t *src, uint64_t ssize )
-{
-    rc_t rc;
-    BlobHeaders *y;
-    
-    if (src == NULL)
-        return RC(rcVDB, rcHeader, rcConstructing, rcParam, rcNull);
-    if (ssize < 1)
-        return RC(rcVDB, rcHeader, rcConstructing, rcData, rcInsufficient);
-    
-    switch (*src) {
-    case 0:
-        rc = deserialize_v0(&y, src + 1, ssize - 1);
-        if (rc == 0)
-            *lhs = y;
-        break;
-    default:
-        rc = RC(rcVDB, rcHeader, rcConstructing, rcData, rcBadVersion);
-        break;
-    }
-    return rc;
-}
-
-static rc_t serialize1( const BlobHeaders *self, KDataBuffer *buffer, uint64_t offset, uint64_t *size ) {
-    uint8_t flags = 0;
-    uint8_t version = 0;
-    uint32_t fmt = 0;
-    uint64_t osize = 0;
-    uint32_t op_count = 0;
-    uint32_t arg_count = 0;
-    rc_t rc;
-    uint64_t sz;
-    uint8_t *dst;
-    uint64_t dsize;
-
-    if (self->data) {
-        version = self->data->version;
-        flags = self->data->flags;
-        fmt = self->data->fmt;
-        osize = self->data->osize;
-        op_count = self->data->op_count;
-        arg_count = self->data->arg_count;
-    }
-    sz = 2 + 4 * 5 + op_count + arg_count * 10;
-    rc = KDataBufferResize(buffer, sz + offset);
-    if (rc)
-        return rc;
-
-    dst = buffer->base;
-    dst += offset;
-    dsize = buffer->elem_count - offset;
-    
-    *dst++ = flags; --dsize;
-    *dst++ = version; --dsize;
-    
-    rc = vlen_encode1(dst, dsize, &sz, fmt);
-    if (rc)
-        return rc;
-    dst += sz; dsize -= sz;
-    
-    rc = vlen_encode1(dst, dsize, &sz, osize);
-    if (rc)
-        return rc;
-    dst += sz; dsize -= sz;
-    
-    rc = vlen_encode1(dst, dsize, &sz, op_count);
-    if (rc)
-        return rc;
-    dst += sz; dsize -= sz;
-    
-    rc = vlen_encode1(dst, dsize, &sz, arg_count);
-    if (rc)
-        return rc;
-    dst += sz; dsize -= sz;
-    
-    if (op_count > 0) {
-        memcpy(dst, self->data->ops, op_count);
-        dst += op_count;
-        dsize -= op_count;
-    }
-    if (arg_count > 0) {
-        rc = vlen_encode(dst, dsize, &sz, self->data->args, arg_count);
-        if (rc)
-            return rc;
-        dst += sz; /* dsize -= sz */;
-    }
-    *size = (uint64_t)( dst - (uint8_t *)buffer->base );
-    return 0;
-}
-
-static rc_t deserialize_v0( BlobHeaders **dst, const uint8_t *src, uint64_t ssize ) {
-    uint8_t flags;
-    uint8_t version;
-    uint32_t fmt;
-    uint64_t osize;
-    volatile uint32_t op_count;
-    volatile uint32_t arg_count;
-    int64_t x;
-    uint64_t sz;
-    rc_t rc;
-    BlobHeaders *y;
-
-    *dst = NULL;
-    
-    if (ssize < 2)
-        return RC(rcVDB, rcHeader, rcConstructing, rcData, rcInsufficient);
-
-    flags = *src++; --ssize;
-    version = *src++; --ssize;
-    
-    rc = vlen_decode1(&x, src, ssize, &sz);
-    if (rc)
-        return ResetRCContext(rc, rcVDB, rcHeader, rcConstructing);
-    src += sz; 
-	ssize -= sz;
-    fmt = (uint32_t)x;
-    
-    rc = vlen_decode1(&x, src, ssize, &sz);
-    if (rc)
-        return ResetRCContext(rc, rcVDB, rcHeader, rcConstructing);
-    src += sz; 
-	ssize -= sz;
-    osize = (uint32_t)x;
-    
-    rc = vlen_decode1(&x, src, ssize, &sz);
-    if (rc)
-        return ResetRCContext(rc, rcVDB, rcHeader, rcConstructing);
-    src += sz; 
-	ssize -= sz;
-    op_count = (uint32_t)x;
-    
-    rc = vlen_decode1(&x, src, ssize, &sz);
-    if (rc)
-        return ResetRCContext(rc, rcVDB, rcHeader, rcConstructing);
-    src += sz; 
-	ssize -= sz;
-    arg_count = (uint32_t)x;
-
-    rc = BlobHeadersCreateInternal(&y, op_count, arg_count);
-    if (rc)
-        return rc;
-    
-    y->data->flags = flags;
-    y->data->version = version;
-    y->data->fmt = fmt;
-    y->data->osize = osize;
-    y->data->read_only = true;
-
-    if (op_count > 0) {
-        if (ssize < op_count) {
-            BlobHeadersRelease(y);
-            return RC(rcVDB, rcHeader, rcConstructing, rcData, rcInsufficient);
-        }
-        memcpy(y->data->ops, src, op_count);
-        src += op_count; ssize -= op_count;
-    }        
-    if (arg_count > 0) {
-        rc = vlen_decode(y->data->args, arg_count, src, ssize, &sz);
-        if (rc) {
-            BlobHeadersRelease(y);
-            return ResetRCContext(rc, rcVDB, rcHeader, rcConstructing);
-        }
-        src += sz; ssize -= sz;
-    }
-    if (ssize) {
-        BlobHeaders *link;
-        
-        rc = deserialize_v0(&link, src, ssize);
-        if (rc) {
-            BlobHeadersRelease(y);
-            return rc;
-        }
-        y->link = link;
-    }
-    *dst = y;
-    return 0;
-}
-
-static rc_t serialize( const BlobHeaders *self, KDataBuffer *buffer, uint64_t offset, uint64_t *sz ) {
-    rc_t rc;
-
-    rc = serialize1(self, buffer, offset, sz);
-    if (rc == 0 && self->link)
-        rc = serialize(self->link, buffer, *sz, sz);
-    return rc;
-}
-
-rc_t BlobHeadersSerialize ( BlobHeaders *self, KDataBuffer *buffer,
-        uint64_t offset, uint64_t *psz )
-{
-    rc_t rc;
-    uint64_t sz = 0;
-    
-    assert(buffer->elem_bits == 8);
-    assert(buffer->bit_offset == 0);
-    
-    rc = KDataBufferResize(buffer, 1);
-    if (rc)
-        return rc;
-    ((uint8_t *)(buffer->base))[offset] = 0;
-    rc = serialize(self, buffer, offset + 1, &sz);
-    *psz = sz - offset;
-    return rc;
-}
-
-rc_t BlobHeadersCreateChild ( BlobHeaders *self, BlobHeaders **new_hdr ) 
-{
-    BlobHeaders *y;
-    rc_t rc;
-
-    *new_hdr = NULL;
-    rc = BlobHeadersCreate(&y);
-    if (rc == 0) {
-        y->link = self;
-        BlobHeadersAddRef(y->link);
-        *new_hdr = y;
-        return 0;
-    }
-    return rc;
-}
-
-VBlobHeader *BlobHeadersCreateDummyHeader ( uint8_t version, uint32_t fmt, uint8_t flags, uint64_t size )
-{
-    struct BlobHeaderDummy *y;
-    
-    y = calloc(1, sizeof(*y));
-    if (y) {
-        y->data.fmt = fmt;
-        y->data.version = version;
-        y->data.osize = size;
-        y->data.flags = flags;
-        atomic32_set(&y->data.refcount, 1);
-
-        y->dummy.data = &y->data;
-        atomic32_set(&y->dummy.refcount, 1);
-        
-        y->hdr.vt = &VBlobHeader_vt[1];
-        y->hdr.parent = &y->dummy;
-        atomic32_set(&y->hdr.refcount, 1);
-        
-        return &y->hdr;
-    }
-    return 0;
-}
-
-const BlobHeaders *BlobHeadersGetNextFrame( const BlobHeaders *cself ) {
-    return cself ? cself->link : 0;
-}
-
-const BlobHeaders *BlobHeadersPop( const BlobHeaders *cself ) {
-    const BlobHeaders *y = BlobHeadersGetNextFrame(cself);
-    BlobHeadersAddRef(y);
-    BlobHeadersRelease(cself);
-    return y;
-}
-
-VBlobHeader *BlobHeadersGetHeader ( const BlobHeaders *self )
-{
-    VBlobHeader *y = calloc(1, sizeof(*y));
-    
-    if (y) {
-        y->vt = &VBlobHeader_vt[0];
-        atomic32_set(&y->refcount, 1);
-        y->parent = self;
-        BlobHeadersAddRef(y->parent);
-        if (self->data) {
-            y->op_tail = self->data->op_count;
-            y->arg_tail = self->data->arg_count;
-        }
-    }
-    return y;
-}
-
-VBlobHeader *BlobHeadersGetHdrWrite ( BlobHeaders *self ) {
-    VBlobHeader *y = BlobHeadersGetHeader(self);
-    
-    if (y) {
-        if (self->data && !self->data->read_only) {
-            if (VBlobHeaderDataGetExclusiveOwnership(self->data)) {
-                y->owned = self->data;
-                return y;
-            }
-        }
-        VBlobHeaderRelease(y);
-    }
-    return NULL;
-}
-
-static void VBlobHeaderDummyDestroy( VBlobHeader *that ) {
-    free(that);
-}
-
-static void VBlobHeaderDestroy( VBlobHeader *that ) {
-    VBlobHeaderDataRelease(that->owned);
-    BlobHeadersRelease(that->parent);
-    free(that);
-}
-
-LIB_EXPORT rc_t CC VBlobHeaderRelease ( const VBlobHeader *cself ) {
-    VBlobHeader *self = (VBlobHeader *)cself;
-    
-    if (self && atomic32_dec_and_test(&self->refcount))
-        self->vt->destroy(self);
-    return 0;
-}
-
-rc_t VBlobHeaderAddRef ( const VBlobHeader *self ) {
-    if (self)
-        atomic32_inc(&(((VBlobHeader *)self)->refcount));
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VBlobHeaderCreateFork ( const VBlobHeader *self, VBlobHeader **rslt ) {
-    if (self == NULL)
-        return RC(rcVDB, rcHeader, rcCopying, rcSelf, rcNull);
-    
-    if (self->parent == NULL)
-        return RC(rcVDB, rcHeader, rcCopying, rcSelf, rcInvalid);
-    
-    if (rslt == NULL)
-        return RC(rcVDB, rcHeader, rcCopying, rcParam, rcNull);
-    
-    *rslt = BlobHeadersCreateDummyHeader(self->parent->data->version, self->parent->data->fmt, 0, self->parent->data->osize);
-    if (*rslt)
-        return 0;
-    return RC(rcVDB, rcHeader, rcCopying, rcMemory, rcInsufficient);
-}
-
-rc_t VBlobHeaderReplace( VBlobHeader *targ, const VBlobHeader *src ) {
-    BlobHeaders *parent;
-    struct VBlobHeaderData *data;
-    atomic32_t temp;
-    
-    if (src == NULL || targ == NULL)
-        return RC(rcVDB, rcHeader, rcCopying, rcParam, rcNull);
-
-    if (src->vt != &VBlobHeader_vt[1] || targ->vt != &VBlobHeader_vt[0])
-        return RC(rcVDB, rcHeader, rcCopying, rcParam, rcInvalid);
-    
-    if (atomic32_read(&targ->refcount) != 1)
-        return RC(rcVDB, rcHeader, rcCopying, rcParam, rcInvalid);
-    
-    data = calloc(1, sizeof(*data));
-    if (data == NULL)
-        return RC(rcVDB, rcHeader, rcCopying, rcMemory, rcExhausted);
-
-    *data = *src->parent->data;
-    atomic32_set(&data->refcount, 1);
-    
-    parent = (BlobHeaders *)targ->parent;
-    VBlobHeaderDataRelease(parent->data);
-    parent->data = data;
-    
-    atomic32_set(&temp, atomic32_read(&src->refcount));
-    *targ = *src;
-    atomic32_set(&targ->refcount, atomic32_read(&temp));
-    targ->parent = parent;
-    targ->vt = &VBlobHeader_vt[0];
-    
-    return 0;
-}
-
-rc_t VBlobHeaderOpPushHead ( VBlobHeader *self, uint8_t op )
-{
-    return RC(rcVDB, rcHeader, rcWriting, rcInterface, rcUnsupported);
-}
-
-rc_t VBlobHeaderArgPushHead ( VBlobHeader *self, int64_t arg )
-{
-    return RC(rcVDB, rcHeader, rcWriting, rcInterface, rcUnsupported);
-}
-
-#define MIN_ALLOC 16
-
-LIB_EXPORT rc_t CC VBlobHeaderOpPushTail ( VBlobHeader *self, uint8_t op )
-{
-    struct VBlobHeaderData *data;
-    
-    assert(self);
-    assert(self->parent);
-    data = self->parent->data;
-    assert(data);
-    assert(!data->read_only);
-    
-    if (data->ops == NULL) {
-        data->ops = malloc(MIN_ALLOC);
-        if (data->ops == NULL)
-            return RC(rcVDB, rcHeader, rcWriting, rcMemory, rcExhausted);
-        self->op_cap = MIN_ALLOC;
-    }
-    
-    assert(self->op_tail <= self->op_cap);
-    
-    if (self->op_tail == self->op_cap) {
-        uint32_t size = self->op_cap;
-        void *temp = realloc(data->ops, size += size);
-        
-        if (temp == NULL)
-            return RC(rcVDB, rcHeader, rcWriting, rcMemory, rcExhausted);
-        data->ops = temp;
-        self->op_cap = size;
-    }
-    data->ops[self->op_tail++] = op;
-    ++data->op_count;
-    data->ops_alloc = true;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VBlobHeaderArgPushTail ( VBlobHeader *self, int64_t arg )
-{
-    struct VBlobHeaderData *data;
-    
-    assert(self);
-    assert(self->parent);
-    data = self->parent->data;
-    assert(data);
-    assert(!data->read_only);
-    
-    if (data->args == NULL) {
-        data->args = malloc(MIN_ALLOC * sizeof(data->args[0]));
-        if (data->args == NULL)
-            return RC(rcVDB, rcHeader, rcWriting, rcMemory, rcExhausted);
-        self->arg_cap = MIN_ALLOC;
-    }
-    
-    assert(self->arg_tail <= self->arg_cap);
-    
-    if (self->arg_tail == self->arg_cap) {
-        uint32_t size = self->arg_cap;
-        void *temp = realloc(data->args, (size += size) * sizeof(data->args[0]));
-        
-        if (temp == NULL)
-            return RC(rcVDB, rcHeader, rcWriting, rcMemory, rcExhausted);
-        data->args = temp;
-        self->arg_cap = size;
-    }
-    data->args[self->arg_tail++] = arg;
-    ++data->arg_count;
-    data->args_alloc = true;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VBlobHeaderOpPopHead ( const VBlobHeader *self, uint8_t *op )
-{
-    if (self->op_head >= self->op_tail || self->op_head >= (int32_t)self->parent->data->op_count)
-        return RC(rcVDB, rcHeader, rcReading, rcData, rcExhausted);
-    *op = self->parent->data->ops[self->op_head];
-    ++((VBlobHeader *)self)->op_head;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VBlobHeaderOpPopTail ( const VBlobHeader *self, uint8_t *op )
-{
-    if (self->op_tail < self->op_head || self->op_tail < 0)
-        return RC(rcVDB, rcHeader, rcReading, rcData, rcExhausted);
-    *op = self->parent->data->ops[self->op_tail];
-    --((VBlobHeader *)self)->op_tail;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VBlobHeaderArgPopHead ( const VBlobHeader *self, int64_t *arg )
-{
-    if (self->arg_head >= self->arg_tail || self->arg_head >= (int32_t)self->parent->data->arg_count || self->parent->data->args == NULL)
-        return RC(rcVDB, rcHeader, rcReading, rcData, rcExhausted);
-    *arg = self->parent->data->args[self->arg_head];
-    ++((VBlobHeader *)self)->arg_head;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VBlobHeaderArgPopTail ( const VBlobHeader *self, int64_t *arg )
-{
-    if (self->arg_tail < self->arg_head || self->arg_tail < 0 || self->parent->data->args == NULL)
-        return RC(rcVDB, rcHeader, rcReading, rcData, rcExhausted);
-    *(uint64_t *)arg = self->parent->data->args[self->arg_tail];
-    --((VBlobHeader *)self)->arg_tail;
-    return 0;
-}
-
-LIB_EXPORT uint8_t CC VBlobHeaderVersion ( const VBlobHeader *self )
-{
-    return self->parent->data->version;
-}
-
-LIB_EXPORT void CC VBlobHeaderSetVersion ( VBlobHeader *self, uint8_t version )
-{
-    self->parent->data->version = version;
-}
-
-uint8_t VBlobHeaderFlags ( const VBlobHeader *self )
-{
-    return self->parent->data->flags & 0x7F;
-}
-
-void VBlobHeaderSetFlags ( VBlobHeader *self, uint8_t flags )
-{
-    self->parent->data->flags = (self->parent->data->flags & 0x80) | (flags & 0x7F);
-}
-
-uint32_t VBlobHeaderFormat ( const VBlobHeader *self )
-{
-    return self->parent->data->fmt;
-}
-
-void VBlobHeaderSetFormat ( VBlobHeader *self, uint32_t fmt )
-{
-    self->parent->data->fmt = fmt;
-}
-
-uint64_t VBlobHeaderSourceSize ( const VBlobHeader *self )
-{
-    return self->parent->data->osize;
-}
-
-void VBlobHeaderSetSourceSize ( VBlobHeader *self, uint64_t ssize )
-{
-    self->parent->data->osize = ssize;
-}
diff --git a/libs/vdb/blob-headers.h b/libs/vdb/blob-headers.h
deleted file mode 100644
index 110bb4a..0000000
--- a/libs/vdb/blob-headers.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-struct KDataBuffer;
-typedef struct BlobHeaders BlobHeaders;
-
-/* add ref and release */
-rc_t BlobHeadersAddRef( const BlobHeaders *self );
-rc_t BlobHeadersRelease( const BlobHeaders *self );
-
-/* constructors */
-
-/* create a new header stack */
-rc_t BlobHeadersCreate( BlobHeaders **lhs );
-
-/* add a new header frame to the stack */
-rc_t BlobHeadersCreateChild( BlobHeaders *self, BlobHeaders **child );
-
-/* create header stack from serialization */
-rc_t BlobHeadersCreateFromData( BlobHeaders **lhs, const uint8_t *src, uint64_t ssize );
-
-/* move down the header stack
- * you will need to AddRef the result pointer
- * before releasing the argument pointer
- */
-const BlobHeaders *BlobHeadersGetNextFrame( const BlobHeaders *cself );
-
-/* this is a convenience function to
- * pop the current frame off the stack
- * returns the new current frame
- *  get next frame
- *  addref next frame
- *  release current frame
- *  return next frame
- *
- * The idea is to do
- *  headers = BlobHeadersPop(headers);
- */
-const BlobHeaders *BlobHeadersPop( const BlobHeaders *cself );
-
-/* a worst-case estimate of how many bytes
- * the serialization will take
- */
-uint32_t BlobHeadersGetMaxBufferSize( const BlobHeaders *self );
-
-/* serialize the whole stack
- *
- * Params:
- *  self: (in) top of the stack
- *  buffer: (in/out) the data buffer to write into
- *  offset: (in) number of bytes into buffer to start writing at
- */
-rc_t BlobHeadersSerialize( BlobHeaders *self, struct KDataBuffer *buffer, uint64_t offset, uint64_t *sz );
-
-/* get the header in the current frame */
-/* for read */
-struct VBlobHeader *BlobHeadersGetHeader( const BlobHeaders *self );
-struct VBlobHeader *BlobHeadersGetHdrWrite( BlobHeaders *self );
-struct VBlobHeader *BlobHeadersCreateDummyHeader( uint8_t version, uint32_t fmt, uint8_t flags, uint64_t size );
-
-
-/* VBlobHeader stuff */
-rc_t VBlobHeaderAddRef ( struct VBlobHeader const *self );
-
-#if NOT_DEFINED_IN_VDB_XFORM_H
-uint8_t VBlobHeaderVersion( const struct VBlobHeader *self );
-void VBlobHeaderSetVersion( struct VBlobHeader *self, uint8_t version );
-#endif
-
-uint8_t VBlobHeaderFlags( const struct VBlobHeader *self );
-void VBlobHeaderSetFlags( struct VBlobHeader *self, uint8_t flags );
-
-uint32_t VBlobHeaderFormatId( const struct VBlobHeader *self );
-void VBlobHeaderSetFormat( struct VBlobHeader *self, uint32_t fmt );
-
-uint64_t VBlobHeaderSourceSize( const struct VBlobHeader *self );
-void VBlobHeaderSetSourceSize( struct VBlobHeader *self, uint64_t ssize );
-
-
-/* Replace
- *  replace contents of "self" with the contents of "src"
- *
- *  after running multiple processes in parallel, one header must
- *  be chosen to associate with the output blob. use this function
- *  to set ...
- */
-rc_t VBlobHeaderReplace ( struct VBlobHeader *self, struct VBlobHeader const *src );
diff --git a/libs/vdb/blob-priv.h b/libs/vdb/blob-priv.h
deleted file mode 100644
index 2593d19..0000000
--- a/libs/vdb/blob-priv.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_blob_priv_
-#define _h_blob_priv_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_vdb_blob_
-#include <vdb/blob.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifndef _h_klib_data_buffer_
-#include <klib/data-buffer.h>
-#endif
-
-#ifndef _h_vdb_xform_
-#include <vdb/xform.h>
-#endif
-
-#define TRACKING_BLOBS 0
-#if TRACKING_BLOBS
-#include <stdio.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-    
-#if _DEBUGGING
-#define VBLOG_HAS_NAME 1
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct PageMap;
-struct BlobHeaders;
-struct VProduction;
-struct VBlobPageMapCache;
-
-typedef struct PageMapProcessRequest{
-    struct PageMap *pm;        /**** deserialized form **/
-    KDataBuffer data;   /**** serialized   form **/
-    uint32_t    row_count;
-    uint64_t    elem_count;
-    rc_t rc;            /**** results **/
-
-    volatile enum {
-        ePMPR_STATE_NONE=0,
-        ePMPR_STATE_SERIALIZE_REQUESTED,
-        ePMPR_STATE_DESERIALIZE_REQUESTED,
-        ePMPR_STATE_SERIALIZE_DONE,
-        ePMPR_STATE_DESERIALIZE_DONE,
-	ePMPR_STATE_EXIT
-    } state;            /**** request state      **/
-    struct KLock      *lock;
-    struct KCondition *cond;
-} PageMapProcessRequest;
-
-
-/*--------------------------------------------------------------------------
- * VBlob
- */
-struct VBlob
-{
-    int64_t start_id;
-    int64_t stop_id;
-    
-    struct PageMap *pm;
-    struct BlobHeaders *headers;
-    struct VBlobPageMapCache *spmc; /* cache for split */
-    KDataBuffer data;
-    KRefcount refcount;
-
-/*    uint32_t row_count; */ /* == stop_id + 1 - start_id */
-    bool no_cache;
-    VByteOrder byte_order;
-#if VBLOG_HAS_NAME
-    const char name[32];
-#endif
-};
-
-struct VBlobPageMapCache {
-    int n;
-    struct PageMap *pm[1];
-};
-
-#define BlobBufferBits(BLOB) ((uint64_t)KDataBufferBits(&(BLOB)->data))
-#define BlobBufferBytes(BLOB) ((size_t)(KDataBufferBytes(&(BLOB)->data)))
-#define BlobRowCount(BLOB) ((uint32_t)( (uint64_t)((BLOB)->stop_id - (BLOB)->start_id) == UINT64_MAX ? UINT32_MAX : (BLOB)->stop_id + 1 - (BLOB)->start_id ))
-
-#if TRACKING_BLOBS
-/* #define TRACK_BLOB(f,p) fprintf(stderr, "%s %p %d %s:%d:%s\n",#f,(void*)p,*(int*)(&p->refcount),__FILE__,__LINE__,__func__) */
-#define TRACK_BLOB(f,p) fprintf(stderr, "+++++ %s %p %d %s:%d\n",#f,(void*)(p),p?*(int*)(&(p)->refcount):0,__func__,__LINE__)
-#else
-#define TRACK_BLOB(f,p)
-#endif
-
-rc_t VBlobNew( VBlob **lhs, int64_t start_id, int64_t stop_id, const char *name );
-
-/* use inline-able addref and release on blobs
-   within the library for efficiency */
-#if 1
-#define VBlobAddRef( self ) \
-    ( ( ( self ) == NULL ) ? \
-      0 : ( atomic32_inc ( & ( self ) -> refcount ), 0 ) )
-#define VBlobRelease( self ) \
-    ( ( ( self ) == NULL || atomic32_read_and_add_gt ( & ( self ) -> refcount, -1, 1 ) > 1 ) ? \
-      0 : VBlobRelease ( self ) )
-#endif
-
-#if _DEBUGGING
-void VBlobCheckIntegrity ( const VBlob *self );
-#else
-#define VBlobCheckIntegrity( self ) \
-  ( void ) 0
-#endif
-
-rc_t VBlobCreateFromData(
-                         struct VBlob **lhs,
-                         int64_t start_id, int64_t stop_id,
-                         const KDataBuffer *src,
-                         uint32_t elem_bits,
-			 PageMapProcessRequest const *pmpr
-);
-
-rc_t VBlobCreateFromSingleRow(
-                              struct VBlob **lhs,
-                              int64_t start_id, int64_t stop_id,
-                              const KDataBuffer *src,
-                              VByteOrder byte_order
-);
-/*** VBlob as a new array; meaning fixed len,data_run(..)=1 **/
-rc_t VBlobNewAsArray(struct VBlob **lhs, int64_t start_id, int64_t stop_id, uint32_t rowlen, uint32_t elem_bits); 
-    
-rc_t VBlobSerialize( const VBlob *self, KDataBuffer *result );
-
-bool VBlobIsSingleRow( const VBlob *self );
-
-uint32_t VBlobFixedRowLength( const struct VBlob *self );
-
-rc_t VBlobAppend( struct VBlob *self, const struct VBlob *other );
-/**** finds start_id in a blob and builds sub-blob for the number or repetitions ***/
-rc_t VBlobSubblob( const struct VBlob *self,struct VBlob **sub, int64_t start_id );
-
-void VBlobPageMapOptimize( struct VBlob **self );
-
-#define LAST_BLOB_CACHE_SIZE 256
-
-
-typedef struct VBlobMRUCache VBlobMRUCache; /** forward declaration **/
-typedef  struct VBlobMRUCacheCursorContext {  /** to be used to pass cache context down to production level ***/
-	VBlobMRUCache * cache;
-	uint32_t	col_idx;
-} VBlobMRUCacheCursorContext;
-
-VBlobMRUCache * VBlobMRUCacheMake(uint64_t capacity );
-void VBlobMRUCacheDestroy( VBlobMRUCache *self );
-const VBlob* VBlobMRUCacheFind(const VBlobMRUCache *cself, uint32_t col_idx, int64_t row_id);
-rc_t VBlobMRUCacheSave(const VBlobMRUCache *cself, uint32_t col_idx, const VBlob *blob);
-
-uint64_t VBlobMRUCacheGetCapacity(const VBlobMRUCache *cself);
-uint64_t VBlobMRUCacheSetCapacity(VBlobMRUCache *self,uint64_t capacity );
-
-void VBlobMRUCacheSuspendFlush(VBlobMRUCache *self);
-void VBlobMRUCacheResumeFlush (VBlobMRUCache *self);
-
-
-rc_t PageMapProcessGetPagemap(const PageMapProcessRequest *self,struct PageMap **pm);
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _h_blob_priv_ */
diff --git a/libs/vdb/blob.c b/libs/vdb/blob.c
deleted file mode 100644
index c480e17..0000000
--- a/libs/vdb/blob.c
+++ /dev/null
@@ -1,1690 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vdb/extern.h>
- 
-#define TRACK_REFERENCES 0
-
-#include "page-map.h"
-#include "blob-headers.h"
-#include "blob.h"
-#include "blob-priv.h"
-#include <klib/rc.h>
-#include <klib/defs.h>
-#include <byteswap.h>
-#include <klib/data-buffer.h>
-#include <klib/container.h>
-#include <klib/vlen-encode.h>
-#include <klib/vector.h>
-#include <kdb/btree.h>
-#include <vdb/schema.h>
-#include <vdb/xform.h>
-#include <klib/log.h>
-#include <sysalloc.h>
-#include <bitstr.h>
-
-#include <kproc/timeout.h>
-#include <kproc/lock.h>
-#include <kproc/cond.h>
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include <os-native.h>
-
-#include <stdio.h> /* temp for debugging */
-#define PHYSPROD_INDEX_OFFSET 1000000000
-#if _DEBUGGING
-void VBlobCheckIntegrity ( const VBlob *self )
-{
-    if ( self != NULL )
-    {
-        rc_t rc = KDataBufferCheckIntegrity ( & self -> data );
-        if ( rc != 0 )
-        {
-            fprintf ( stderr, "AAAAAH!\n" );
-        }
-    }
-}
-#endif
-
-rc_t VBlobNew ( VBlob **lhs, int64_t start_id, int64_t stop_id, const char *name ) {
-    VBlob *y;
-    
-    if ( name == NULL )
-        name = "";
-#if VBLOG_HAS_NAME
-    *lhs = y = malloc(sizeof(*y) + strlen(name));
-#else
-    *lhs = y = calloc(1, sizeof(*y));
-#endif
-    if (y) {
-        KRefcountInit(&y->refcount, 1, "VBlob", "new", name);
-        y->start_id = start_id;
-        y->stop_id = stop_id;
-        y->data.elem_bits = 1;
-        y->byte_order = vboNative;
-#if VBLOG_HAS_NAME
-        y->pm = NULL;
-        y->headers = NULL;
-        y->spmc = NULL;
-        memset(&y->data, 0, sizeof(y->data));
-        y->no_cache = 0;
-        strcpy(&(((char *)y->name)[0]), name);
-#endif
-        
-        return 0;
-    }
-    return RC(rcVDB, rcBlob, rcConstructing, rcMemory, rcExhausted);
-}
-rc_t VBlobNewAsArray(struct VBlob **lhs, int64_t start_id, int64_t stop_id, uint32_t rowlen, uint32_t elem_bits)
-{
-	VBlob *y;
-	rc_t rc = VBlobNew(&y,start_id,stop_id,NULL);
-	if(rc == 0){
-		rc = KDataBufferMake(&y->data,elem_bits,rowlen*(stop_id-start_id+1));
-		if(rc == 0){
-			rc=PageMapNewFixedRowLength(&y->pm,stop_id-start_id+1,rowlen);
-			if(rc == 0){
-				*lhs = y;
-				return 0;
-			}
-			PageMapRelease(y->pm);
-		}
-		VBlobRelease(y);
-	}
-	return rc;
-}
-
-static rc_t VBlobDestroy( VBlob *that ) {
-    if (that->spmc) {
-        int i;
-        
-        for (i = 0; i != that->spmc->n; ++i)
-            PageMapRelease(that->spmc->pm[i]);
-        free(that->spmc);
-    }
-    KDataBufferWhack(&that->data);
-    BlobHeadersRelease(that->headers);
-    PageMapRelease(that->pm);
-    free(that);
-    return 0;
-}
-
-static rc_t decode_header_byte_v2(
-                                  uint8_t header_byte,
-                                  uint8_t *variant,
-                                  uint8_t *adjust,
-                                  VByteOrder *byte_order
-) {
-    *adjust = (8 - (header_byte & 7)) & 7; header_byte >>= 3;
-    *byte_order = (header_byte & 1) ? vboBigEndian : vboLittleEndian;
-    header_byte >>= 1;
-    *variant = header_byte & 3;
-    header_byte >>= 2;
-    return header_byte == 2 ? 0 : RC(rcVDB, rcBlob, rcReading, rcData, rcBadVersion);
-}
-
-static rc_t decode_header_v2_0(
-                               const uint8_t *src,
-                               uint64_t ssize,
-                               uint32_t *hdr_size,
-                               uint32_t *map_size,
-                               uint32_t *offset
-) {
-    *offset = 3;
-    if (ssize < *offset)
-        return RC(rcVDB, rcBlob, rcConstructing, rcData, rcInsufficient);
-    
-    *hdr_size = src[1];
-    *map_size = src[2];
-    return 0;
-}
-
-static rc_t decode_header_v2_1(
-                               const uint8_t *src,
-                               uint64_t ssize,
-                               uint32_t *hdr_size,
-                               uint32_t *map_size,
-                               uint32_t *offset
-) {
-    *offset = 4;
-    if (ssize < *offset)
-        return RC(rcVDB, rcBlob, rcConstructing, rcData, rcInsufficient);
-    
-    *hdr_size = src[1];
-    *map_size = (uint32_t)src[2] | ((uint32_t)src[3] << 8);
-    return 0;
-}
-
-static rc_t decode_header_v2_2(
-                               const uint8_t *src,
-                               uint64_t ssize,
-                               uint32_t *hdr_size,
-                               uint32_t *map_size,
-                               uint32_t *offset
-) {
-    *offset = 6;
-    if (ssize < *offset)
-        return RC(rcVDB, rcBlob, rcConstructing, rcData, rcInsufficient);
-    
-    *hdr_size = src[1];
-    *map_size = (uint32_t)src[2] | ((uint32_t)src[3] << 8) | ((uint32_t)src[4] << 16) | ((uint32_t)src[5] << 24);
-    return 0;
-}
-
-static rc_t decode_header_v2_3(
-                               const uint8_t *src,
-                               uint64_t ssize,
-                               uint32_t *hdr_size,
-                               uint32_t *map_size,
-                               uint32_t *offset
-) {
-    *offset = 9;
-    if (ssize < *offset)
-        return RC(rcVDB, rcBlob, rcConstructing, rcData, rcInsufficient);
-    
-    *hdr_size = (uint32_t)src[1] | ((uint32_t)src[2] << 8) | ((uint32_t)src[3] << 16) | ((uint32_t)src[4] << 24);
-    *map_size = (uint32_t)src[5] | ((uint32_t)src[6] << 8) | ((uint32_t)src[7] << 16) | ((uint32_t)src[8] << 24);
-    return 0;
-}
-
-static rc_t decode_header_v2(
-                             const uint8_t *src,
-                             uint64_t ssize,
-                             uint32_t *hdr_size,
-                             uint32_t *map_size,
-                             uint32_t *offset,
-                             uint8_t *adjust,
-                             VByteOrder *byte_order
-) {
-    rc_t rc;
-    uint8_t variant;
-    
-    if (ssize == 0)
-        return RC(rcVDB, rcBlob, rcConstructing, rcData, rcInsufficient);
-
-    rc = decode_header_byte_v2(src[0], &variant, adjust, byte_order);
-    if (rc)
-        return rc;
-
-    switch (variant) {
-    case 0:
-        return decode_header_v2_0(src, ssize, hdr_size, map_size, offset);
-    case 1:
-        return decode_header_v2_1(src, ssize, hdr_size, map_size, offset);
-    case 2:
-        return decode_header_v2_2(src, ssize, hdr_size, map_size, offset);
-    case 3:
-        return decode_header_v2_3(src, ssize, hdr_size, map_size, offset);
-    default:
-        return RC(rcVDB, rcBlob, rcConstructing, rcData, rcBadVersion);
-    }
-}
-
-static rc_t encode_header_v1(
-                             uint8_t *dst,
-                             uint64_t dsize,
-                             uint64_t *used,
-                             uint32_t row_length,
-                             bitsz_t data_size,
-                             VByteOrder byte_order
-) {
-    /* byte-order goes in bits 0..1 */
-    uint8_t header_byte = byte_order & 3;
-    if ( header_byte == vboNative )
-    {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-        header_byte = ( uint8_t) vboLittleEndian;
-#else
-        header_byte = ( uint8_t) vboBigEndian;
-#endif
-    }
-
-    /* blob size adjust goes in bits 2..4 */
-    header_byte |= ( ( 8 - ( data_size & 7 ) ) & 7 ) << 2;
-    
-    /* row-length code goes in bits 5..6 */
-    if ( row_length == 1 ) {
-        header_byte |= 3 << 5;
-        * used = 1;
-        if ( dsize < * used )
-            return RC(rcVDB, rcBlob, rcConstructing, rcBuffer, rcInsufficient);
-        dst[0] = header_byte;
-    }
-    else if (row_length < 0x100) {
-        *used = 2;
-        if (dsize < *used)
-            return RC(rcVDB, rcBlob, rcConstructing, rcBuffer, rcInsufficient);
-        dst[0] = header_byte;
-        dst[1] = ( uint8_t ) row_length;
-    }
-    else if (row_length < 0x10000) {
-        header_byte |= 1 << 5;
-        *used = 3;
-        if (dsize < *used)
-            return RC(rcVDB, rcBlob, rcConstructing, rcBuffer, rcInsufficient);
-        dst[0] = header_byte;
-        dst[1] = ( uint8_t ) row_length;
-        dst[2] = ( uint8_t ) ( row_length >> 8 );
-    }
-    else {
-        header_byte |= 2 << 5;
-        *used = 5;
-        if (dsize < *used)
-            return RC(rcVDB, rcBlob, rcConstructing, rcBuffer, rcInsufficient);
-        dst[0] = header_byte;
-        dst[1] = ( uint8_t ) row_length;
-        dst[2] = ( uint8_t ) ( row_length >> 8 );
-        dst[3] = ( uint8_t ) ( row_length >> 16 );
-        dst[4] = ( uint8_t ) ( row_length >> 24 );
-    }
-    return 0;
-}
-
-static rc_t encode_header_v2(
-                             uint8_t *dst,
-                             uint64_t dsize,
-                             uint64_t *used,
-                             uint64_t hdr_size,
-                             uint64_t map_size,
-                             bitsz_t data_size
-) {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-    uint8_t header_byte = 0x80 | ( (uint8_t)data_size & 7 );
-#else
-    uint8_t header_byte = 0x88 | ( (uint8_t)data_size & 7 );
-#endif
-    
-    assert(hdr_size >> 32 == 0);
-    assert(map_size >> 32 == 0);
-    
-    if ((hdr_size >> 8) == 0) {
-        if ((map_size >> 8) == 0) {
-            *used = 3;
-            if (dsize < *used)
-                return RC(rcVDB, rcBlob, rcConstructing, rcBuffer, rcInsufficient);
-            
-            dst[0] = header_byte;
-            dst[1] = hdr_size;
-            dst[2] = map_size;
-        }
-        else if ((map_size >> 16) == 0) {
-            *used = 4;
-            if (dsize < *used)
-                return RC(rcVDB, rcBlob, rcConstructing, rcBuffer, rcInsufficient);
-            
-            dst[0] = header_byte | 0x10;
-            dst[1] = hdr_size;
-            dst[2] = map_size;
-            dst[3] = map_size >> 8;
-        }
-        else {
-            *used = 6;
-            if (dsize < *used)
-                return RC(rcVDB, rcBlob, rcConstructing, rcBuffer, rcInsufficient);
-
-            dst[0] = header_byte | 0x20;
-            dst[1] = hdr_size;
-            dst[2] = map_size;
-            dst[3] = map_size >> 8;
-            dst[4] = map_size >> 16;
-            dst[5] = map_size >> 24;
-        }
-    }
-    else {
-        *used = 9;
-        if (dsize < *used)
-            return RC(rcVDB, rcBlob, rcConstructing, rcBuffer, rcInsufficient);
-
-        dst[0] = header_byte | 0x30;
-
-        dst[1] = hdr_size;
-        dst[2] = hdr_size >> 8;
-        dst[3] = hdr_size >> 16;
-        dst[4] = hdr_size >> 24;
-
-        dst[5] = map_size;
-        dst[6] = map_size >> 8;
-        dst[7] = map_size >> 16;
-        dst[8] = map_size >> 24;
-    }
-    return 0;
-}
-
-static
-    rc_t PageMapProcessRequestLock(PageMapProcessRequest *self)
-{
-    rc_t rc = 0;
-    if(self)
-    {
-        /*** no plans to wait here the thread should be released by now ****/
-        rc = KLockAcquire(self->lock);
-        if(rc == 0){
-            if(self->state != ePMPR_STATE_NONE){ /*** thread is not released yet **/
-                assert(0); /** should not happen ***/
-                KLockUnlock(self->lock);
-                rc=RC(rcVDB, rcPagemap, rcConstructing, rcThread, rcBusy);
-            }
-        }
-    }
-    else
-        rc = RC(rcVDB,rcPagemap, rcConstructing, rcSelf, rcNull);
-
-    return rc;
-}
-
-static
-void PageMapProcessRequestLaunch(PageMapProcessRequest *self)
-{
-	KConditionSignal ( self -> cond );
-	KLockUnlock(self -> lock);
-}
-
-rc_t PageMapProcessGetPagemap(const PageMapProcessRequest *cself,struct PageMap **pm)
-{
-	rc_t rc=RC(rcVDB,rcPagemap, rcConstructing, rcSelf, rcNull);
-        if(cself){
-	    PageMapProcessRequest *self=(PageMapProcessRequest*)cself;
-	    if(self->lock == NULL){
-		/** NOT LOCKABLE **/
-		rc=0;
-	    } else if((rc = KLockAcquire ( self->lock ))==0){
-CHECK_AGAIN:
-		switch(self->state){
-		 case ePMPR_STATE_DESERIALIZE_REQUESTED:
-			/*fprintf(stderr,"Waiting for pagemap %p\n",cself->lock);*/
-			rc = KConditionWait ( self -> cond, self -> lock );
-                        goto CHECK_AGAIN;
-		 case ePMPR_STATE_DESERIALIZE_DONE:
-			assert(self->pm);
-			/*fprintf(stderr,"Pagemap %p Used R:%6d|DR:%d|LR:%d\n",self->lock, self->pm->row_count,self->pm->data_recs,self->pm->leng_recs);*/
-			*pm=self->pm;
-			self->pm = NULL;
-			KDataBufferWhack(&self->data);
-			self->row_count = 0;
-			self->state = ePMPR_STATE_NONE;
-			KConditionSignal(self->cond);
-			KLockUnlock(self -> lock);
-			break;
-		case ePMPR_STATE_NONE: /* not requested */
-			KLockUnlock(self -> lock);
-		    rc = 0;
-		    break;
-		 default: /** should never happen ***/
-			assert(0);
-			KLockUnlock(self -> lock);
-			return RC(rcVDB, rcPagemap, rcConverting, rcParam, rcInvalid );
-		}
-	    }
-        }
-        return rc;
-}
-
-
-static
-rc_t VBlobCreateFromData_v2(
-                            VBlob **lhs,
-                            const KDataBuffer *data,
-                            int64_t start_id, int64_t stop_id,
-                            uint32_t elem_bits, PageMapProcessRequest *pmpr
-) {
-    uint64_t ssize = data->elem_count;
-    uint32_t hsize;
-    uint32_t msize;
-    uint32_t offset;
-    VByteOrder byte_order;
-    uint8_t adjust;
-    VBlob *y;
-    uint32_t data_offset;
-    uint32_t pagemap_offset;
-    bitsz_t databits;
-    uint32_t elem_count;
-    uint8_t *src = data->base;
-    rc_t rc;
-    
-    rc = decode_header_v2(src, ssize, &hsize, &msize, &offset, &adjust, &byte_order);
-    if (rc)
-        return rc;
-
-    if (ssize < offset + hsize + msize)
-        return RC(rcVDB, rcBlob, rcConstructing, rcData, rcInsufficient);
-    
-    pagemap_offset = offset + hsize;
-    data_offset = pagemap_offset + msize;
-    assert(data_offset <= ssize);
-    ssize -= data_offset;
-    databits = (ssize << 3) - adjust;
-    assert(databits % elem_bits == 0);
-    elem_count = (uint32_t)( databits / elem_bits );
-
-    rc = VBlobNew(&y, start_id, stop_id, NULL);
-    TRACK_BLOB (VBlobNew, y);
-    if (rc == 0) {
-        if (hsize)
-            rc = BlobHeadersCreateFromData(&y->headers, src+offset , hsize);
-        if (rc == 0) {
-            if (msize > 0) {
-                if(pmpr != NULL && PageMapProcessRequestLock(pmpr)==0) {
-                    KDataBufferSub(data, &pmpr->data, pagemap_offset, msize);
-                    pmpr->row_count = BlobRowCount(y);
-                    pmpr->state = ePMPR_STATE_DESERIALIZE_REQUESTED;
-                    /*fprintf(stderr,"Pagemap %p Requested R:%6d|SZ:%d|%ld:%ld\n",pmpr->lock, pmpr->row_count,msize,start_id, stop_id);*/
-                    PageMapProcessRequestLaunch(pmpr);
-                }
-                else {
-                    KDataBuffer tdata;
-                    KDataBufferSub(data, &tdata, pagemap_offset, msize);
-                    rc = PageMapDeserialize(&y->pm, tdata.base,tdata.elem_count, BlobRowCount(y));
-                    KDataBufferWhack(&tdata);
-                }
-            }
-            if (rc == 0) {
-                KDataBufferSub(data, &y->data, data_offset, ssize);
-                y->data.elem_bits = elem_bits;
-                y->data.elem_count = elem_count;
-                y->byte_order = byte_order;
-                *lhs = y;
-                return 0;
-            }
-        }
-        (void)VBlobRelease(y);
-        TRACK_BLOB (VBlobRelease, y);
-    }
-    return rc;
-}
-
-static
-rc_t VBlobCreateFromData_v1(
-                            VBlob **lhs,
-                            const KDataBuffer *data,
-                            int64_t start_id, int64_t stop_id,
-                            uint32_t elem_bits
-) {
-    const uint8_t *src = data->base;
-    uint64_t ssize = data->elem_count;
-    uint8_t header;
-    rc_t rc;
-    VBlob *y;
-    VByteOrder byte_order;
-    uint32_t offset;
-    int adjust;
-    int rls; /* row length size */
-    uint64_t row_len;
-    bitsz_t databits;
-    
-    if (ssize == 0)
-        return RC(rcVDB, rcBlob, rcConstructing, rcData, rcInsufficient);
-    
-    header = *src;
-    byte_order = header & 3; header >>= 2;
-    adjust = header & 7;
-    header >>= 3;
-    rls = header & 3;
-    
-    /* convert rls from a code to an actual length */
-    rls = "\x01\x02\x04\x00" [ rls ];
-
-    /* adjust offset */
-    offset = rls + 1;
-
-    /* handle special code where row length is implicitly 1 */
-    if ( rls == 0 )
-        row_len = 1;
-
-    /* ensure sufficient header bytes */
-    else if ( ssize < offset )
-        return RC(rcVDB, rcBlob, rcConstructing, rcData, rcInsufficient);
-    else
-    {
-        /* produce little-endian 64-bit row-length */
-        row_len = 0;
-        memcpy ( & row_len, & src [ 1 ], rls );
-
-#if __BYTE_ORDER != __LITTLE_ENDIAN
-        /* correct for big-endian */
-        row_len = bswap_64 ( row_len );
-#endif
-    }
-
-    ssize -= offset;
-    databits = (ssize << 3) - adjust;
-    assert(databits % elem_bits == 0);
-
-    rc = VBlobNew(&y, start_id, stop_id, NULL);
-    TRACK_BLOB (VBLobNew, y);
-    if (rc == 0) {
-
-        uint64_t row_count = BlobRowCount ( y );
-
-        /* test for badly formed row-length */
-        if ( rls == 4 )
-        {
-            assert ( row_len != 0 );
-            if ( row_len * row_count != databits / elem_bits )
-            {
-                /* we can fix a length if we know the count */
-                if ( row_count != 0 )
-                    row_len = ( databits / elem_bits ) / row_count;
-                else
-                {
-                    /* rely on code to handle legacy blobs in prod-cmn.c:VFunctionProdCallByteswap */
-                    row_len = 0;
-                }
-            }
-        }
-
-        if ( row_len != 0 )
-            rc = PageMapNewFixedRowLength( &y->pm, row_count, row_len );
-        if (rc == 0) {
-            KDataBufferSub(data, &y->data, offset, ssize);
-            y->data.elem_bits = elem_bits;
-            y->data.elem_count = (uint32_t)( databits / elem_bits );
-            y->byte_order = byte_order;
-			
-            *lhs = y;
-            return 0;
-        }
-        /* like a call to VBlobRelease (y); */
-        TRACK_BLOB (VBlobRelease-free, y);
-        free(y);
-    }
-    return rc;
-}
-
-static void VBlobOptimize_UnRLE_uint8_t(VBlob **vblobp)
-{
-	VBlob   *sblob  = *vblobp;
-	VBlob *vblob;
-	rc_t rc = VBlobNewAsArray(&vblob,sblob -> start_id, sblob -> stop_id,sblob->pm->length[0],sblob->data.elem_bits);
-	if( rc == 0){
-		uint32_t i,j;
-		uint8_t *src=sblob->data.base;
-		uint8_t *dst=vblob->data.base;
-		for(i=j=0;i<sblob->pm->data_recs;i++){
-			row_count_t data_len=sblob->pm->data_run[i];
-			while(data_len > 0){
-				assert(j < sblob->pm->row_count);
-				dst[j++] = src[i];
-				data_len--;
-			}
-		}
-		vblob->pm->optimized = eBlobPageMapOptimizedSucceeded;
-		VBlobRelease(sblob);
-		(*vblobp) = vblob;
-	}
-}
-static void VBlobOptimize_UnRLE_uint16_t(VBlob **vblobp)
-{
-	VBlob   *sblob  = *vblobp;
-	VBlob *vblob;
-	rc_t rc = VBlobNewAsArray(&vblob,sblob -> start_id, sblob -> stop_id,sblob->pm->length[0],sblob->data.elem_bits);
-	if( rc == 0) {
-		uint32_t i,j;
-		uint16_t *src=sblob->data.base;
-		uint16_t *dst=vblob->data.base;
-		for(i=j=0;i<sblob->pm->data_recs;i++){
-			row_count_t data_len=sblob->pm->data_run[i];
-			while(data_len > 0){
-				assert(j < sblob->pm->row_count);
-				dst[j++] = src[i];
-				data_len--;
-			}
-		}
-		vblob->pm->optimized = eBlobPageMapOptimizedSucceeded;
-		VBlobRelease(sblob);
-		(*vblobp) = vblob;
-	}
-}
-static void VBlobOptimize_UnRLE_uint32_t(VBlob **vblobp)
-{
-	VBlob   *sblob  = *vblobp;
-	VBlob *vblob;
-	rc_t rc = VBlobNewAsArray(&vblob,sblob -> start_id, sblob -> stop_id,sblob->pm->length[0],sblob->data.elem_bits);
-	if( rc == 0) {
-		uint32_t i,j;
-		uint32_t *src=sblob->data.base;
-		uint32_t *dst=vblob->data.base;
-		for(i=j=0;i<sblob->pm->data_recs;i++){
-			row_count_t data_len=sblob->pm->data_run[i];
-			while(data_len > 0){
-				assert(j < sblob->pm->row_count);
-				dst[j++] = src[i];
-				data_len--;
-			}
-		}
-		vblob->pm->optimized = eBlobPageMapOptimizedSucceeded;
-		VBlobRelease(sblob);
-		(*vblobp) = vblob;
-	}
-}
-static void VBlobOptimize_UnRLE_uint64_t(VBlob **vblobp)
-{
-	VBlob   *sblob  = *vblobp;
-	VBlob *vblob;
-	rc_t rc = VBlobNewAsArray(&vblob,sblob -> start_id, sblob -> stop_id,sblob->pm->length[0],sblob->data.elem_bits);
-	if( rc == 0) {
-		uint32_t i,j;
-		uint64_t *src=sblob->data.base;
-		uint64_t *dst=vblob->data.base;
-		for(i=j=0;i<sblob->pm->data_recs;i++){
-			row_count_t data_len=sblob->pm->data_run[i];
-			while(data_len > 0){
-				assert(j < sblob->pm->row_count);
-				dst[j++] = src[i];
-				data_len--;
-			}
-		}
-		vblob->pm->optimized = eBlobPageMapOptimizedSucceeded;
-		VBlobRelease(sblob);
-		(*vblobp) = vblob;
-	}
-}
-
-
-void VBlobPageMapOptimize ( VBlob **vblobp)
-{
-	VBlob   *sblob  = *vblobp;
-	PageMap *pm     = sblob->pm;
-	if(pm->optimized != eBlobPageMapOptimizedNone) return; /* do not optimize previously optimized blobs */
-	pm->optimized = eBlobPageMapOptimizedFailed; /*** prevent future optimization if none of the algorithms succeeds ***/
-
-	if(pm->leng_recs == 1)
-    {
-		if( pm->length[0] * sblob->data.elem_bits == 8 /** 1 byte data ***/
-		    &&  pm->data_recs < pm->row_count       /** rle was used ***/
-		    &&  pm->data_recs * 6 > pm->row_count){ /** but not super efficiently **/
-			/*printf("OPTIMIZATION: UnRLE(8)\n");*/
-			VBlobOptimize_UnRLE_uint8_t(vblobp); 
-			return;
-		}
-		if( pm->length[0] * sblob->data.elem_bits == 16 /** 2 byte data ***/
-		    &&  pm->data_recs < pm->row_count       /** rle was used ***/
-		    &&  pm->data_recs * 2 > pm->row_count){ /** but not super efficiently **/
-			/*printf("OPTIMIZATION: UnRLE(16)\n");*/
-			VBlobOptimize_UnRLE_uint16_t(vblobp);
-			return;
-		}
-		if( pm->length[0] * sblob->data.elem_bits == 32 /** 4 byte data ***/
-		    &&  pm->data_recs < pm->row_count       /** rle was used ***/
-		    &&  pm->data_recs * 15 > pm->row_count * 10 ){ /** but not super efficiently **/
-			/*printf("OPTIMIZATION: UnRLE(32)\n");*/
-			VBlobOptimize_UnRLE_uint32_t(vblobp);
-			return;
-		}
-		if( pm->length[0] * sblob->data.elem_bits == 64 /** 8 byte data ***/
-		    &&  pm->data_recs < pm->row_count       /** rle was used ***/
-		    &&  pm->data_recs * 11 > pm->row_count * 10 ){ /** but not super efficiently **/
-			/*printf("OPTIMIZATION: UnRLE(64)\n");*/
-			VBlobOptimize_UnRLE_uint64_t(vblobp);
-			return;
-		}
-
-	}
-
-	if(pm->row_count > 1024 && (sblob->data.elem_bits & 7) == 0)
-    {
-		elem_count_t	minlen,maxlen;
-		elem_count_t	elem_sz = sblob->data.elem_bits/8;
-		rc_t rc = PageMapRowLengthRange(pm, &minlen,&maxlen);
-		if( rc == 0  && maxlen*elem_sz > 2 && maxlen*elem_sz <= 2048 /* do not optimize super large entries */){ 
-		/******* TRY dictionary **/
-			int64_t		limit_vocab_size;
-			uint32_t	vocab_cnt=0;
-			KBTree		*vocab_key2id = NULL;
-			bool		valid_data_run = (pm->row_count != pm->data_recs);
-			uint32_t	*data_offset = NULL;
-			KDataBuffer     new_data;
-
-			rc=KDataBufferMake(&new_data,sblob->data.elem_bits,0); /** no allocation - shoulf not fail at all **/
-			assert(rc==0);
-/*******************
-* another formula
-* the savings should not be less than the waste on pointers into data vocabulary
-* it is assumed that the data offsets will cost us not more than 2 bytes on disk
-* the nasty left part is the average number of bytes in a row
-* limit_vocab_size = ((int64_t)sblob->data.elem_count*elem_sz - 2*pm->row_count) * sblob->data.elem_count / pm->data_recs / elem_sz;
-****************/
-			limit_vocab_size = ((int64_t)sblob->data.elem_count*elem_sz +(valid_data_run?pm->data_recs*2:0) -  2*pm->row_count)
-					   * pm->data_recs / (int64_t)sblob->data.elem_count / elem_sz;
-			
-
-			if(limit_vocab_size <=1 ){
-				rc = RC(rcVDB, rcBlob, rcConstructing, rcId, rcOutofrange);
-			}
-			if(limit_vocab_size > pm->data_recs/4){
-				limit_vocab_size = pm->data_recs/4;  /* to limit the amount of work **/
-			}
-#define MAX_VOCAB_SIZE 2048
-			if(limit_vocab_size > MAX_VOCAB_SIZE) limit_vocab_size=MAX_VOCAB_SIZE;
-			if(rc == 0)
-				rc=KBTreeMakeUpdate(&vocab_key2id, NULL, 256*1024*1024,
-				      false, kbtOpaqueKey,
-				      minlen?minlen*elem_sz:1,maxlen*elem_sz, sizeof ( uint32_t ), NULL);
-			if(rc == 0){
-				uint32_t i,j;
-				uint8_t  *src;
-				uint32_t dst_offset;
-				uint32_t vocab_arr[MAX_VOCAB_SIZE];
-				data_offset = malloc(pm->data_recs * sizeof(*data_offset));
-				if(data_offset == NULL){
-					rc = RC(rcVDB, rcBlob, rcConstructing, rcMemory, rcExhausted);
-				}
-				for(i=j=0,src = sblob->data.base,dst_offset=0;i<pm->leng_recs && rc == 0 ;i++){
-					row_count_t leng_run = pm->leng_run[i];
-					if(pm->length[i] == 0){/*** trivial case, can point anywhere - no vocabulary**/
-						for(;leng_run > 0;j++){
-							row_count_t data_run = valid_data_run?pm->data_run[j]:1;
-							assert(leng_run >= data_run);
-							data_offset[j] = 0; /**  point to offset=0 **/
-							leng_run -=data_run;
-						}
-					} else for(;leng_run > 0 && rc == 0;j++){
-						row_count_t data_run = valid_data_run?pm->data_run[j]:1;
-						bool wasInserted;
-						uint64_t tmp_id = vocab_cnt;
-						assert(leng_run >= data_run);
-						leng_run -=data_run;
-						rc = KBTreeEntry(vocab_key2id, &tmp_id, &wasInserted, src, pm->length[i]*elem_sz);
-						if(rc == 0){
-							if(wasInserted){
-								vocab_cnt++;
-								if(vocab_cnt == limit_vocab_size) {
-									rc = RC(rcVDB, rcBlob, rcConstructing, rcId, rcTooBig);
-								} else {
-									vocab_arr[tmp_id] = dst_offset; /** save offset */
-									data_offset[j]    = dst_offset;
-									rc = KDataBufferResize(&new_data,dst_offset+pm->length[i]);
-									if(rc == 0){
-										memcpy((uint8_t*)new_data.base+dst_offset*elem_sz,src,pm->length[i]*elem_sz);
-										dst_offset += pm->length[i];
-									}
-								}
-							} else {
-								assert(vocab_arr[tmp_id] <= dst_offset);
-								data_offset[j] = vocab_arr[tmp_id]; /** retrieve offset **/
-							}
-						}
-						src +=pm->length[i]*elem_sz;
-						assert(src - (uint8_t*)sblob->data.base <= sblob->data.elem_count * elem_sz);
-					}
-				}
-				if(rc == 0 ){
-					PageMap *new_pm;
-					/*printf("OPTIMIZATION LEVEL REACHED: vocab:%d,rows:%d,data_recs:%d\n",vocab_cnt ,pm->row_count,pm->data_recs);*/
-					rc=PageMapToRandomAccess(&new_pm,pm,data_offset); 
-					if(rc == 0){
-						/** DONE ***/
-						VBlob *vblob;
-						rc=VBlobNew(&vblob, sblob->start_id, sblob->stop_id, NULL);
-						if(rc==0){
-							vblob->pm = new_pm;
-							vblob->pm->optimized = eBlobPageMapOptimizedSucceeded;
-							vblob->data = new_data;
-							VBlobRelease(sblob);
-							*vblobp=vblob;
-							free(data_offset);
-							KBTreeRelease(vocab_key2id);
-							return;
-						}
-						PageMapRelease(new_pm);
-						
-					}
-				} else {
-					/*printf("NO OPTIMIZATION: vocab:%d,rows:%d,data_recs:%d\n",vocab_cnt ,pm->row_count,pm->data_recs);*/
-				}
-				if(data_offset) free(data_offset);
-				if(vocab_key2id) KBTreeRelease  ( vocab_key2id );
-			}
-            KDataBufferWhack(&new_data);
-		}
-	}
-
-}
-
-
-rc_t VBlobSerialize ( const VBlob *self, KDataBuffer *result ) {
-    uint64_t sz;
-    rc_t rc;
-    bitsz_t data_bits = KDataBufferBits(&self->data);
-    uint64_t data_bytes = KDataBufferBytes(&self->data);
-    uint32_t row_length;
-    
-    if (self->headers == NULL && (row_length = PageMapHasSimpleStructure(self->pm)) != 0) {
-        rc = KDataBufferResize(result, 5 + data_bytes);
-        if (rc == 0) {
-
-#if _DEBUGGING && 1
-            /* temporary assert that we are setting byte_order properly
-               in the future, we may allow some functions to issue other
-               byte orders, although there is no conceivable reason to do so */
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-            assert ( self -> byte_order == vboNative || self -> byte_order == vboLittleEndian );
-#else
-            assert ( self -> byte_order == vboNative || self -> byte_order == vboBigEndian );
-#endif
-#endif
-            rc = encode_header_v1(result->base, result->elem_count, &sz, row_length, data_bits, self->byte_order);
-            if (rc == 0) {
-                memcpy(&((uint8_t *)result->base)[sz], self->data.base, data_bytes);
-                result->elem_count = sz + data_bytes;
-            }
-        }
-    }
-    else {
-        KDataBuffer headers;
-        KDataBuffer pagemap;
-        
-        rc = KDataBufferMakeBytes(&headers, 0);
-        if (rc == 0) {
-            if (self->headers)
-                rc = BlobHeadersSerialize(self->headers, &headers, 0, &sz);
-            else
-                sz = 0;
-            if (rc == 0) {
-                headers.elem_count = sz;
-                rc = KDataBufferMakeBytes(&pagemap, 0);
-                if (rc == 0) {
-                    if (self->pm)
-                        rc = PageMapSerialize(self->pm, &pagemap, 0, &sz);
-                    else
-                        sz = 0;
-                    if (rc == 0) {
-                        pagemap.elem_count = sz;
-                        rc = KDataBufferResize(result, 9 + data_bytes + headers.elem_count + pagemap.elem_count);
-                        if (rc == 0) {
-                            rc = encode_header_v2(result->base, result->elem_count, &sz, headers.elem_count, pagemap.elem_count, data_bits);
-                            if (rc == 0) {
-                                memcpy(&((uint8_t *)result->base)[sz], headers.base, headers.elem_count);
-                                sz += headers.elem_count;
-                                memcpy(&((uint8_t *)result->base)[sz], pagemap.base, pagemap.elem_count);
-                                sz += pagemap.elem_count;
-                                memcpy(&((uint8_t *)result->base)[sz], self->data.base, data_bytes);
-                                result->elem_count = sz + data_bytes;
-                            }
-                        }
-                    }
-                    KDataBufferWhack(&pagemap);
-                }
-            }
-        }
-        KDataBufferWhack(&headers);
-    }
-    
-    return rc;
-}
-
-rc_t VBlobCreateFromData ( struct VBlob **lhs,
-                         int64_t start_id, int64_t stop_id,
-                         const KDataBuffer *src,
-                         uint32_t elem_bits , PageMapProcessRequest const *pmpr)
-{
-    VBlob *y = NULL;
-    rc_t rc;
-    
-    assert(lhs);
-    assert(src);
-    assert(src->elem_bits == 8);
-    assert(src->bit_offset == 0);
-
-    *lhs = 0;
-
-    if ((((const uint8_t *)src->base)[0] & 0x80) == 0)
-        rc = VBlobCreateFromData_v1(&y, src, start_id, stop_id, elem_bits);
-    else
-        rc = VBlobCreateFromData_v2(&y, src, start_id, stop_id, elem_bits, (PageMapProcessRequest*)pmpr);
-
-    if (rc == 0)
-        *lhs = y;
-
-    return rc;
-}
-
-rc_t VBlobCreateFromSingleRow (
-			      struct VBlob **lhs,
-			      int64_t start_id, int64_t stop_id,
-			      const KDataBuffer *src,
-			      VByteOrder byte_order )
-{
-    VBlob *y;
-    rc_t rc;
-    
-    rc = VBlobNew(&y, start_id, stop_id, NULL);
-    TRACK_BLOB (VBlobNew, y);
-    if (rc == 0) {
-        assert(src->elem_count >> 32 == 0);
-        rc = PageMapNewSingle(&y->pm, BlobRowCount(y), (uint32_t)src->elem_count);
-        if (rc == 0) {
-            rc = KDataBufferSub(src, &y->data, 0, UINT64_MAX);
-            if (rc == 0) {
-                y->byte_order = byte_order;
-                *lhs = y;
-                return 0;
-            }
-        }
-        /* should add a release/free? */
-    }
-    return rc;
-}
-
-bool VBlobIsSingleRow( const struct VBlob *self ) {
-    return (self->pm && self->pm->data_recs==1) ? true : false;
-}
-
-uint32_t VBlobFixedRowLength( const struct VBlob *self ) {
-    return self->pm ? PageMapFixedRowLength(self->pm) : 0;
-}
-
-#define COMPARE(FORCE, BITS, DBASE, DOFF, SBASE, SOFF, LENGTH) \
-    (((FORCE == 0) || (BITS & 7) != 0) ? ( \
-        bitcmp(DBASE, DOFF * BITS + FORCE, SBASE, SOFF * BITS, LENGTH * BITS)) : ( \
-        memcmp(((const char *)DBASE)+((DOFF * BITS) >> 3), \
-               ((const char *)SBASE)+((SOFF * BITS) >> 3), \
-               ((LENGTH * BITS) >> 3))))
-
-#define COPY(FORCE, BITS, DBASE, DOFF, SBASE, SOFF, LENGTH) \
-    (((FORCE == 0) || (BITS & 7) != 0) ? ( \
-        bitcpy(DBASE, DOFF * BITS + FORCE, SBASE, SOFF * BITS, LENGTH * BITS)) : ( \
-        (void)memcpy(((      char *)DBASE)+((DOFF * BITS) >> 3), \
-               ((const char *)SBASE)+((SOFF * BITS) >> 3), \
-               ((LENGTH * BITS) >> 3))))
-
-rc_t VBlobAppendRow(VBlob *self,
-                    elem_count_t *last_offset,
-                    elem_count_t *last_length,
-                    const KDataBuffer *src,
-                    elem_count_t offset,
-                    elem_count_t length,
-                    row_count_t repeat_count
-                    )
-{
-    rc_t rc;
-    
-    if (!PageMapHasRows(self->pm) || length != *last_length ||
-        COMPARE(self->data.bit_offset, self->data.elem_bits,
-                self->data.base, *last_offset,
-                src->base, offset,
-                length) != 0
-        )
-    {
-        *last_offset = self->data.elem_count;
-        rc = KDataBufferResize(&self->data, *last_offset + length);
-        if (rc == 0) {
-            COPY(self->data.bit_offset, self->data.elem_bits,
-                 self->data.base, *last_offset,
-                 src->base, offset, length);
-            rc = PageMapAppendRows(self->pm, length, repeat_count, false);
-        }
-        *last_length = length;
-    }
-    else
-        rc = PageMapAppendRows(self->pm, length, repeat_count, true);
-    
-    return rc;
-}
-
-static rc_t VBlobGetLastRow(VBlob *self, elem_count_t *offset, elem_count_t *length) {
-    
-    *length = PageMapLastLength(self->pm);
-    *offset = self->data.elem_count - *length;
-
-    return 0;
-}
-
-rc_t VBlobAppend(VBlob *self, const VBlob *other) {
-    rc_t rc;
-    row_count_t offset;
-    row_count_t length;
-    
-    if (self->headers)
-        return RC(rcVDB, rcBlob, rcConcatenating, rcSelf, rcInconsistent);
-    if (other->headers)
-        return RC(rcVDB, rcBlob, rcConcatenating, rcParam, rcInvalid);
-
-    if (self->stop_id + 1 != other->start_id)
-        return RC(rcVDB, rcBlob, rcConcatenating, rcId, rcOutofrange);
-
-    if (other->data.elem_bits != self->data.elem_bits)
-        return RC(rcVDB, rcBlob, rcConcatenating, rcData, rcInvalid);
-
-#if 0
-    fprintf(stderr, "appending %u(%u) (length: %u) to %u(%u) (length: %u) %s\n",
-            (unsigned)other->start_id, (unsigned)BlobRowCount(other),
-            (unsigned)other->data.elem_count,
-            (unsigned)self->start_id, (unsigned)BlobRowCount(self),
-            (unsigned)self->data.elem_count,
-            self->name);
-#endif
-    
-    rc = VBlobGetLastRow(self, &offset, &length);
-    if (rc == 0) {
-        PageMapIterator iter;
-        
-        rc = PageMapNewIterator(other->pm, &iter, 0, -1);
-        if (rc == 0) {
-            KDataBuffer orig;
-            
-            rc = KDataBufferMakeWritable(&self->data , &orig);
-            if (rc == 0) {
-                row_count_t row_count;
-                KDataBufferWhack(&self->data);
-                self->data = orig;
-                do {
-                    row_count = PageMapIteratorRepeatCount(&iter);
-                    rc = VBlobAppendRow(self, &offset, &length, &other->data,
-                                        PageMapIteratorDataOffset(&iter),
-                                        PageMapIteratorDataLength(&iter),
-                                        row_count);
-                } while (rc == 0 && PageMapIteratorAdvance(&iter, row_count));
-                if (rc == 0) {
-                    self->stop_id = other->stop_id;
-                    self->no_cache |= other->no_cache;
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-rc_t VBlobSubblob( const struct VBlob *self,struct VBlob **sub, int64_t start_id )
-{
-    rc_t rc;
-    KDataBuffer  kd;
-    PageMapIterator pmi;
-    
-    if (start_id < self->start_id || start_id > self->stop_id)
-        return RC(rcVDB, rcBlob, rcConverting, rcId, rcOutofrange);
-    
-    rc=PageMapNewIterator(self->pm,&pmi, 0, -1);
-    if(rc == 0){
-        if(PageMapIteratorAdvance(&pmi,start_id-self->start_id)){
-            row_count_t numrep = PageMapIteratorRepeatCount(&pmi);
-            elem_count_t offset = PageMapIteratorDataOffset(&pmi);
-            elem_count_t length = PageMapIteratorDataLength(&pmi);
-            
-#if 0
-            fprintf(stderr, "splitting %u(%u) (offset: %u, length: %u) from %s\n",
-                    (unsigned)start_id, (unsigned)numrep,
-                    (unsigned)offset, (unsigned)length,
-                    self->name);
-#endif
-            if (numrep == 0){
-                return RC(rcVDB, rcBlob, rcConverting, rcRow, rcEmpty);
-            }
-            
-            rc = KDataBufferSub(&self->data, &kd, offset, length);
-            if(rc == 0){
-                int64_t	stop_id;
-
-                stop_id = start_id + numrep - 1;
-
-                rc = VBlobCreateFromSingleRow(sub, start_id, stop_id, &kd, self->byte_order);
-                KDataBufferWhack(&kd);
-            }
-        } else {
-            rc = RC(rcVDB, rcBlob, rcConverting, rcId, rcOutofrange);
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VBlobIdRange ( const VBlob *self,
-    int64_t *first, uint64_t *count )
-{
-    rc_t rc;
-
-    if ( first == NULL && count == NULL )
-        rc = RC ( rcVDB, rcBlob, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcBlob, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            if ( first != NULL )
-                * first = self -> start_id;
-            if ( count != NULL )
-                * count = self -> stop_id + 1 - self -> start_id;
-            return 0;
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VBlobCellData ( const VBlob *self, int64_t row_id,
-    uint32_t *elem_bits, const void **base, uint32_t *boff, uint32_t *row_len )
-{
-    rc_t rc;
-    uint32_t dummy [ 3 ];
-
-    if ( elem_bits == NULL )
-        elem_bits = & dummy [ 0 ];
-    if ( boff == NULL )
-        boff = & dummy [ 1 ];
-    if ( row_len == NULL )
-        row_len = & dummy [ 2 ];
-
-    if ( base == NULL )
-        rc = RC ( rcVDB, rcBlob, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcBlob, rcAccessing, rcSelf, rcNull );
-        else if ( row_id < self -> start_id || self -> stop_id < row_id )
-            rc = RC ( rcVDB, rcBlob, rcAccessing, rcRange, rcInvalid );
-        else
-        {
-            uint64_t start;
-
-            /* TBD - this may be wrong */
-            * elem_bits = self -> data . elem_bits;
-            * row_len = PageMapGetIdxRowInfo ( self -> pm, ( uint32_t ) ( row_id - self -> start_id ), boff, NULL );
-            start = ( uint64_t ) boff [ 0 ] * elem_bits [ 0 ];
-            * base = ( uint8_t* ) self -> data . base + ( start >> 3 );
-            * boff = ( uint32_t ) start & 7;
-
-            return 0;
-        }
-
-        * base = NULL;
-    }
-
-    * elem_bits = * boff = * row_len = 0;
-
-    return rc;
-}
-
-/* a copy of VCursorRead() */
-LIB_EXPORT rc_t CC VBlobRead ( const VBlob *self, int64_t row_id,
-    uint32_t elem_bits, void *buffer, uint32_t blen, uint32_t *row_len )
-{
-    rc_t rc = 0;
-    const void* base = NULL;
-    uint32_t boff = 0;
-    uint32_t elem_size = 0;
-    uint64_t to_read = 0;
-    uint64_t bsize = 0;
-
-    if ( self == NULL )
-    {   return RC ( rcVDB, rcBlob, rcReading, rcSelf, rcNull ); }
-
-    if ( buffer == NULL || row_len == NULL )
-    {   return RC ( rcVDB, rcBlob, rcReading, rcParam, rcNull ); }
-
-    if ( elem_bits == 0 || ( elem_bits & 7 ) != 0 )
-    {   return RC ( rcVDB, rcCursor, rcReading, rcParam, rcInvalid ); }
-
-    rc = VBlobCellData ( self, row_id, &elem_size, &base, &boff, row_len );
-    if ( rc != 0 )
-    {   return rc; }
-    if ( elem_size < elem_bits && elem_bits % elem_size != 0 )
-    {   return RC ( rcVDB, rcCursor, rcReading, rcType, rcInconsistent ); }
-    if ( elem_size > elem_bits && elem_size % elem_bits != 0 )
-    {   return RC ( rcVDB, rcCursor, rcReading, rcType, rcInconsistent ); }
-    if ( * row_len == 0 )
-    {   return 0; }
-    if ( blen == 0 )
-    {   return RC ( rcVDB, rcCursor, rcReading, rcBuffer, rcInsufficient ); }
-
-    to_read = * row_len * elem_size;
-    bsize = blen * elem_bits;
-
-    /* always return the required buffer size */
-    * row_len = ( uint32_t ) ( to_read / elem_bits );
-
-    /* detect buffer too small */
-    if ( to_read > bsize ) {
-        rc = RC ( rcVDB, rcCursor, rcReading, rcBuffer, rcInsufficient );
-        to_read = bsize;
-    }
-
-    /* copy out data up to limit */
-    assert ( boff == 0 );
-    memcpy ( buffer, base, ( size_t ) ( to_read >> 3 ) );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VBlobReadBits ( const VBlob *self, int64_t row_id,
-    uint32_t elem_bits, uint32_t start, void *buffer, uint32_t off,
-    uint32_t blen, uint32_t *num_read, uint32_t *remaining )
-{
-    rc_t rc = 0;
-    const void* base = NULL;
-    uint32_t boff = 0;
-    uint32_t elem_size = 0;
-    uint64_t to_read = 0;
-    uint64_t bsize = 0;
-    uint32_t row_len = 0;
-    uint32_t dummy;
-    if ( remaining == NULL )
-    {   remaining = & dummy; }
-
-    if ( self == NULL )
-    {   return RC ( rcVDB, rcBlob, rcReading, rcSelf, rcNull ); }
-
-    if ( buffer == NULL || num_read == NULL )
-    {   return RC ( rcVDB, rcBlob, rcReading, rcParam, rcNull ); }
-
-    if ( elem_bits == 0 || ( elem_bits & 7 ) != 0  )
-    {   return RC ( rcVDB, rcBlob, rcReading, rcParam, rcInvalid ); }
-
-    rc = VBlobCellData ( self, row_id, &elem_size, &base, &boff, &row_len );
-    if ( rc != 0 )
-    {   return rc; }
-    if ( elem_size < elem_bits && elem_bits % elem_size != 0 )
-    {   return RC ( rcVDB, rcCursor, rcReading, rcType, rcInconsistent ); }
-    if ( elem_size > elem_bits && elem_size % elem_bits != 0 )
-    {   return RC ( rcVDB, rcCursor, rcReading, rcType, rcInconsistent ); }
-    if ( row_len == 0 ) {
-        * num_read = * remaining = 0;
-        return 0;
-    }
-    if ( * num_read == 0 )
-    {   return 0; }
-    to_read = row_len * elem_size;
-    bsize = blen * elem_bits;
-
-    if ( blen == 0 ) {
-        * num_read = 0;
-        * remaining = ( uint32_t ) ( to_read / elem_bits );
-        return 0;
-    }
-    bsize = blen * elem_size;
-    if ( to_read <= bsize )
-    {   * remaining = 0; }
-    else {
-        * remaining = (uint32_t)( ( to_read - bsize ) / elem_bits );
-        to_read = bsize;
-    }
-    bitcpy ( buffer, off, base, boff, ( bitsz_t ) to_read );
-    * num_read = ( uint32_t ) ( to_read / elem_bits );
-
-    return rc;
-}
-
-#undef VBlobAddRef
-#undef VBlobRelease
-
-LIB_EXPORT rc_t CC VBlobAddRef ( const VBlob *self )
-{
-    if ( self != NULL )
-        KRefcountAdd(&self->refcount, "VBlob");
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VBlobRelease ( const VBlob *self )
-{
-    rc_t rc = 0;
-
-    if ( self != 0 )
-    {
-        switch ( KRefcountDrop(&self->refcount, "VBlob") )
-        {
-        case krefWhack:
-            return VBlobDestroy ( (VBlob*) self );
-        case krefNegative:
-            rc = RC (rcVDB, rcBlob, rcDestroying, rcBlob, rcExcessive);
-            PLOGERR ( klogInt, (klogInt, rc, "Released a blob $(B) with no more references",
-                      PLOG_P(self)));
-            break;
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VBlobSize ( const VBlob * self, size_t * bytes )
-{
-    rc_t rc;
-
-    if ( bytes == NULL )
-        rc = RC ( rcVDB, rcBlob, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcBlob, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            const PageMap * pm = self -> pm;
-            size_t blob_size = sizeof * self + KDataBufferBytes ( & self -> data );
-            if ( self -> pm != NULL )
-            {
-                blob_size += KDataBufferBytes ( & pm -> cstorage )
-                          +  KDataBufferBytes ( & pm -> dstorage )
-                          +  KDataBufferBytes ( & pm -> istorage )
-                          ;
-            }
-
-            * bytes = blob_size;
-            return 0;
-        }
-
-        * bytes = 0;
-    }
-
-    return rc;
-}
-
-/*--------------------------------------------------------------------------
- * VBlobCache
- */
-typedef struct VBlobCache VBlobCache;
-struct VBlobCache
-{
-    DLNode ln;
-    size_t size;
-    const VBlob *blob;
-    uint32_t col_idx;
-};
-
-static
-rc_t VBlobCacheWhack (uint64_t start_id, const void *n, void *ignore )
-{
-    VBlobCache *self = ( VBlobCache* ) n;
-    assert(start_id == self->blob->start_id); 
-    VBlobRelease ( ( VBlob* ) self -> blob );
-    free ( self );
-    return 0;
-}
-
-static
-rc_t VBlobCacheMake ( VBlobCache **bcp, const VBlob *blob, uint32_t col_idx, size_t blob_size )
-{
-    VBlobCache *bc = malloc ( sizeof * bc );
-    if ( bc == NULL )
-        return RC ( rcVDB, rcCursor, rcReading, rcMemory, rcExhausted );
-
-    bc -> size = blob_size;
-    bc -> blob = blob;
-    bc -> col_idx = col_idx;
-    VBlobAddRef(blob);
-    * bcp = bc;
-    return 0;
-}
-
-typedef struct VBlobLast {
-	const VBlob *b1;
-	const VBlob *b2;
-} VBlobLast;
-
-struct VBlobMRUCache { /* read-only blob cache */
-    Vector v_cache; /*** cache VDB columns ***/
-    Vector p_cache; /*** cache physical columns ***/
-    DLList lru;
-    size_t capacity;
-    size_t contents;
-    /* last blob cache */
-    VBlobLast v_last[LAST_BLOB_CACHE_SIZE]; /** last blob to be cached per given col_idx, limiting col_idx  **/
-    VBlobLast p_last[LAST_BLOB_CACHE_SIZE]; /** last physical blob to be cached per given col_idx, limiting col_idx  **/
-	bool suspend_flush;
-};
-
-
-VBlobMRUCache * VBlobMRUCacheMake(uint64_t capacity )
-{
-    VBlobMRUCache *self = NULL;
-    if(capacity > 0){
-	self = malloc(sizeof(*self));
-        if(self){
-		VectorInit ( & self -> v_cache, 1, 16);
-		VectorInit ( & self -> p_cache, 1, 16);
-		DLListInit ( & self -> lru );
-		memset(self -> v_last,0,LAST_BLOB_CACHE_SIZE*sizeof(*self -> v_last));
-		memset(self -> p_last,0,LAST_BLOB_CACHE_SIZE*sizeof(*self -> p_last));
-		self->capacity = capacity;
-		self->contents = 0;
-		self->suspend_flush = false;
-	}
-   }
-   return self;
-}
-
-void VBlobMRUCacheItemDestroy( void *item, void *data )
-{
-    if ( item != NULL ) {
-	KVectorVisitPtr (item, false, VBlobCacheWhack, data );
-	KVectorRelease(item);
-    }
-}
-
-
-void VBlobMRUCacheDestroy( VBlobMRUCache *self )
-{
-    if(self){
-	int i;
-	VectorWhack ( & self -> v_cache, VBlobMRUCacheItemDestroy, NULL );
-	VectorWhack ( & self -> p_cache, VBlobMRUCacheItemDestroy, NULL );
-	DLListInit ( & self -> lru );
-	for(i=0;i<LAST_BLOB_CACHE_SIZE;i++){
-	    VBlobRelease(self -> p_last[i].b1);
-	    VBlobRelease(self -> p_last[i].b2);
-	    VBlobRelease(self -> v_last[i].b1);
-	    VBlobRelease(self -> v_last[i].b2);
-	}
-	free(self);
-    }
-}
-
-static VBlobCache * find_in_kvector(const KVector *cself,int64_t id)
-{
-	VBlobCache *bc;
-	int64_t     id_prev;
-	rc_t rc=KVectorGetPrevPtr(cself,(uint64_t*)&id_prev,(uint64_t)id+1,(void**)&bc);
-	if(rc == 0 && bc){
-		assert(bc->blob->start_id == id_prev );
-		assert(bc->blob->start_id <= id);
-		if( id >= bc->blob->start_id && id <= bc->blob->stop_id){
-			return bc;
-		}
-	} 
-	return NULL;
-}
-
-const VBlob* VBlobMRUCacheFind(const VBlobMRUCache *cself, uint32_t col_idx, int64_t row_id)
-{
-    VBlobMRUCache *self = (VBlobMRUCache*)cself;
-    const VBlob* blob;
-    KVector  *cache;
-    bool    is_phys=false;
-    VBlobLast   *last_blobs;
-
-    if(col_idx > PHYSPROD_INDEX_OFFSET){
-	is_phys=true;
-	last_blobs = self->p_last;
-	col_idx -= PHYSPROD_INDEX_OFFSET;
-    } else {
-	is_phys=false;
-	last_blobs = self->v_last;
-    } 
-
-    if(col_idx <= LAST_BLOB_CACHE_SIZE){
-	blob = last_blobs[col_idx-1].b1;
-	if(blob && row_id >= blob->start_id && row_id <= blob->stop_id){
-		return blob;
-	}
-	blob = last_blobs[col_idx-1].b2;
-	if(blob && row_id >= blob->start_id && row_id <= blob->stop_id){
-		last_blobs[col_idx-1].b2 = last_blobs[col_idx-1].b1;
-		last_blobs[col_idx-1].b1 = blob;
-		return blob;
-	}
-    }
-    cache = is_phys?VectorGet(&cself->p_cache,col_idx):VectorGet(&cself->v_cache,col_idx);
-    if(cache) {
-	    /* check cache for entry */
-	    VBlobCache *bc = find_in_kvector ( cache, row_id );
-	    if ( bc != NULL )
-	    {
-		/* save in MRU */
-		if(col_idx <= LAST_BLOB_CACHE_SIZE) {
-			if(last_blobs[col_idx-1].b2) VBlobRelease(last_blobs[col_idx-1].b2);
-			last_blobs[col_idx-1].b2 = last_blobs[col_idx-1].b1;
-			last_blobs[col_idx-1].b1 = bc->blob;
-			if(VBlobAddRef ((VBlob*)bc->blob)!=0)
-				return NULL;
-		}
-		/* maintain LRU */
-		DLListUnlink  (&self->lru,&bc->ln);
-		DLListPushHead(&self->lru,&bc->ln);
-		/* ask column to read from blob */
-		return bc->blob;
-	    }
-    }
-    return NULL;
-}
-
-static rc_t  insert_unique_into_kvector(VBlobMRUCache *self,KVector *cache,int64_t id, const VBlobCache *bc, VBlobCache **existing)
-{
-	rc_t rc=KVectorGetPtr(cache,id,(void**)existing);
-	if(rc == 0 && *existing){ /*found*/
-
-		assert(existing[0]->blob->start_id == bc->blob->start_id);
-		if(existing[0]->blob->stop_id < bc->blob->stop_id){/** new blob is bigger - replace with ned blob **/
-			DLListUnlink  (&self->lru,&(existing[0]->ln));
-			VBlobCacheWhack (existing[0]->blob->start_id, existing[0], NULL );
-		} else {
-			return RC ( rcVDB, rcVector, rcInserting, rcBlob, rcExists );
-		}
-	}
-        return KVectorSetPtr(cache,id,bc);
-}
-
-
-rc_t VBlobMRUCacheSave(const VBlobMRUCache *cself, uint32_t col_idx, const VBlob *blob)
-{
-    rc_t   rc;
-    size_t blob_size =sizeof(VBlobCache) + sizeof(VBlob);
-    VBlobCache *bc=NULL;
-    VBlobMRUCache *self = (VBlobMRUCache*)cself;
-
-    if(blob->no_cache) return 0;
-
-    blob_size  += KDataBufferBytes(&blob->data);
-    if (blob->pm != NULL) {
-        blob_size += 
-                  KDataBufferBytes(&blob->pm->cstorage)
-                + KDataBufferBytes(&blob->pm->dstorage)
-                + KDataBufferBytes(&blob->pm->istorage);
-    }
-    /** auto-raise capacity for large blob **/
-    if(blob_size > self -> capacity) self -> capacity = blob_size;
-
-    
-
-    /* now cache the blob */
-    rc = VBlobCacheMake ( & bc, blob, col_idx, blob_size );
-    if ( rc == 0 ) {
-        /* attempt a unique insertion */
-        VBlobCache *existing;
-        KVector *cache;
-        VBlobLast   *last_blobs;
-
-	if(col_idx > PHYSPROD_INDEX_OFFSET){
-		last_blobs = self->p_last;
-		col_idx -= PHYSPROD_INDEX_OFFSET;
-		cache = VectorGet(&cself->p_cache,col_idx);
-		if(cache==NULL){
-			KVectorMake(&cache);
-			VectorSet(&self->p_cache,col_idx,cache);
-		}
-	} else {
-		last_blobs = self->v_last;
-		cache = VectorGet(&cself->v_cache,col_idx);
-		if(cache==NULL){
-			KVectorMake(&cache);
-			VectorSet(&self->v_cache,col_idx,cache);
-		}
-	}
-	
-        rc = insert_unique_into_kvector(self,cache,bc->blob->start_id,bc,&existing);
-        if ( rc != 0 ){
-            VBlobCacheWhack (bc->blob->start_id, bc, NULL );
-			rc = 0;
-		} else {
-				/* remember as last used  **/
-			if(col_idx <= LAST_BLOB_CACHE_SIZE) {
-				if(last_blobs[col_idx-1].b2) VBlobRelease(last_blobs[col_idx-1].b2);
-				last_blobs[col_idx-1].b2 = last_blobs[col_idx-1].b1;
-				last_blobs[col_idx-1].b1 = bc->blob;
-				rc = VBlobAddRef ((VBlob*)bc->blob);
-				if(rc != 0)
-				   return rc;
-			}
-			/* perform accounting */
-			self -> contents += blob_size;
-			if(!self->suspend_flush) while ( self -> contents > self -> capacity )
-			{
-				/* get least recently used */
-				DLNode *last = DLListPopTail ( & self -> lru );
-				if ( last == NULL )
-						break;
-				/* drop blob */
-				existing = ( VBlobCache* ) last;
-				if(existing->col_idx > PHYSPROD_INDEX_OFFSET){
-					cache = VectorGet(&cself->p_cache,existing->col_idx-PHYSPROD_INDEX_OFFSET);
-				} else {
-					cache = VectorGet(&cself->v_cache,existing->col_idx);
-				}
-				KVectorUnset(cache,existing->blob->start_id);
-				self -> contents -= existing -> size;
-				VBlobCacheWhack (existing->blob->start_id,existing,NULL);
-			}
-			/* insert at head of list */
-			DLListPushHead ( & self -> lru, & bc -> ln ); 
-		}
-    }
-    return 0;
-}
-
-uint64_t VBlobMRUCacheGetCapacity(const VBlobMRUCache *cself)
-{
-	if(cself){
-		return cself->capacity;
-	}
-	return 0;
-}
-uint64_t VBlobMRUCacheSetCapacity(VBlobMRUCache *self,uint64_t capacity )
-{
-	uint64_t old_capacity=0;
-	if(self){
-		old_capacity = self->capacity;
-		self->capacity=capacity;
-	}
-	return old_capacity;
-}
-void VBlobMRUCacheSuspendFlush(VBlobMRUCache *self)
-{
-	self->suspend_flush=true;
-}
-	
-void VBlobMRUCacheResumeFlush(VBlobMRUCache *self)
-{
-	self->suspend_flush=false;
-}
-
diff --git a/libs/vdb/blob.h b/libs/vdb/blob.h
deleted file mode 100644
index 860e7c8..0000000
--- a/libs/vdb/blob.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_blob_
-#define _h_blob_
-
-#ifndef _h_vdb_extern_
- #include <vdb/extern.h>
-#endif
-
-#ifndef _h_blob_priv_
- #include "blob-priv.h"
-#endif
-
-struct VBlobBuffer;
-struct VRowBuffer;
-
-enum VBlobVariant_t {
-    vbvBlobbed,
-    vbvRowBuffer,
-    vbvSingleRow
-};
-
-
-/* Write the row lengths for the rows from start_id thru stop_id, inclusive
- */
-rc_t VBlobWritePageMap( VBlob *self, int64_t start_id, int64_t stop_id, const uint32_t row_length[] );
-
-/* Read (copy out) the row lengths for the rows from start_id thru stop_id, inclusive
- */
-rc_t VBlobReadPageMap( const VBlob *self, int64_t start_id, int64_t stop_id, uint32_t row_length[] );
-
-/* Change the shape of the databuffer.
- *
- * This function does not resize the buffer; it changes how it is
- * interpreted, i.e. it is a typecast.
- * The quantity ((bits per element) * (# elements)) remains the same.
- *
- * new bits = bits * bits_mult / bits_div
- * new #elements = #elements * bits_div / bits_mult
- * 
- */
-rc_t VBlobBufferReshape( struct VBlobBuffer *self, int bits_mult, int bits_div );
-
-/* Turn a raw blob into a page buffer
- *
- * This is essentially a type-cast.
- */
-rc_t VBlobMakeRowBuffer( struct VRowBuffer **lhs,
-                         const VBlob *cself
-);
-
-/* Serialize
- *
- * Get a blob serialized into a new data buffer.
- * Whack this when done with it.
- */
-rc_t VBlobSerialize(const VBlob *cself, KDataBuffer *result);
-
-
-#endif /* _h_blob_ */
diff --git a/libs/vdb/cast.c b/libs/vdb/cast.c
deleted file mode 100644
index 0718ec9..0000000
--- a/libs/vdb/cast.c
+++ /dev/null
@@ -1,583 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vdb/extern.h> 
-
-#include "xform-priv.h"
-#include "blob-priv.h"
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <arch-impl.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <float.h>
-#include <string.h>
-#include <assert.h>
-
-/* copy
- *  just perform an addref on input blob
- */
-static
-rc_t CC copy ( void *self, const VXformInfo *info, int64_t row_id,
-    VBlob **rslt, uint32_t argc, const VBlob *argv [] )
-{
-    * rslt = ( VBlob* ) argv [ 0 ];
-    (void)VBlobAddRef (*rslt );
-    return 0;
-}
-
-/* casting object
- *  uses a three-step process for converting:
- *  1. read source into canonical fmt
- *  2. convert domains as required
- *  3. write from canonical fmt to dest
- */
-typedef struct Cast Cast;
-struct Cast
-{
-    /* read source to canonical fmt */
-    union
-    {
-        int ( * num ) ( const void *src, void *dst );
-        int ( * chr ) ( uint32_t *ch, const void *begin, const void *end );
-    } read;
-
-    /* transform from one domain to another */
-    union
-    {
-        rc_t ( * num ) ( const void *src, void *dst );
-    } convert;
-
-    /* write from canonical fmt to destination */
-    union
-    {
-        int ( * num ) ( const void *src,  void *dst );
-        int ( * chr ) ( void *begin, void *end, uint32_t ch );
-    } write;
-
-    /* intrinsic dim of source */
-    uint32_t intrinsic_dim;
-
-    /* intrinsic sizes of src and dst */
-    uint32_t src_bits, dst_bits;
-};
-
-static
-rc_t CC cast_num ( void *data, const VXformInfo *info,
-    void *dst, const void *src, uint64_t elem_count )
-{
-    const Cast *self = ( const void* ) data;
-
-    /* since we are performing intrinsic-level operations,
-       convert the array length into intrinsic count */
-    uint32_t i;
-    uint64_t count = elem_count * self -> intrinsic_dim;
-
-    /* treat source and destination as byte pointers */
-    int bytes;
-    uint8_t *dp = dst;
-    const uint8_t *sp = src;
-
-    /* read and conversion buffers */
-    union { int64_t i64; uint64_t u64; double f64; } buff [ 2 ];
-
-    /* loop without conversion */
-    if ( self -> convert . num == NULL )
-    {
-        for ( i = 0; i < count; ++ i )
-        {
-            /* read into canonical fmt */
-            bytes = ( * self -> read . num ) ( sp, & buff [ 0 ] );
-            sp += bytes;
-
-            /* write into destination fmt */
-            bytes = ( * self -> write . num ) ( & buff [ 0 ], dp );
-            if ( bytes < 0 )
-                return RC ( rcVDB, rcType, rcCasting, rcRange, rcExcessive );
-            dp += bytes;
-        }
-    }
-
-    /* loop with conversion */
-    else
-    {
-        for ( i = 0; i < count; ++ i )
-        {
-            rc_t rc;
-
-            /* read into canonical fmt */
-            bytes = ( * self -> read . num ) ( sp, & buff [ 0 ] );
-            sp += bytes;
-
-            /* convert domains */
-            rc = ( * self -> convert . num ) ( & buff [ 0 ], & buff [ 1 ] );
-            if ( rc != 0 )
-                return rc;
-
-            /* write into destination fmt */
-            bytes = ( * self -> write . num ) ( & buff [ 1 ], dp );
-            if ( bytes < 0 )
-                return RC ( rcVDB, rcType, rcCasting, rcRange, rcExcessive );
-            dp += bytes;
-        }
-    }
-
-    return 0;
-}
-
-static
-rc_t resize_dst ( KDataBuffer *dst, uint8_t **dpos, uint8_t **dend,
-    const uint8_t *sbase, const uint8_t *spos, const uint8_t *send )
-{
-    size_t offset = * dpos - ( uint8_t* ) dst -> base;
-    double expand = ( double ) ( send - sbase ) / ( spos - sbase );
-    rc_t rc = KDataBufferResize ( dst, ( uint32_t ) ( expand * offset ) + 32 );
-    if ( rc == 0 )
-    {
-        * dpos = & ( ( uint8_t* ) dst -> base ) [ offset ];
-        * dend = & ( ( uint8_t* ) dst -> base ) [ dst -> elem_count ];
-    }
-    return rc;
-}
-
-static
-rc_t CC cast_chr ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    const Cast *self = ( const void* ) data;
-
-    int bytes;
-    uint32_t buff [ 2 ];
-    uint8_t *dpos, *dend;
-    const uint8_t *sbase, *spos, *send;
-
-    /* determine source boundaries */
-    sbase = argv [ 0 ] . u . data . base;
-    sbase += (size_t)argv [ 0 ] . u . data . first_elem *
-        argv [ 0 ] . u . data . elem_bits >> 3;
-    send = & sbase [ (size_t)argv [ 0 ] . u . data . elem_count *
-        argv [ 0 ] . u . data . elem_bits >> 3 ];
-    spos = sbase;
-
-    /* resize the destination blob */
-    rc = KDataBufferCast ( rslt -> data, rslt -> data, 8, true );
-    if ( rc == 0 )
-        rc = KDataBufferResize ( rslt -> data, (uint32_t)( send - sbase ) );
-    if ( rc != 0 )
-        return rc;
-
-    /* get the destination boundaries */
-    dpos = rslt -> data -> base;
-    dend = dpos + rslt -> data -> elem_count;
-    assert ( rslt -> data -> bit_offset == 0 );
-
-    while ( spos < send )
-    {
-        /* read into utf32 */
-        bytes = ( * self -> read . chr ) ( & buff [ 0 ], spos, send );
-        if ( bytes <= 0 )
-            return RC ( rcVDB, rcType, rcCasting, rcData, rcCorrupt );
-        spos += bytes;
-
-        /* write into destination */
-        bytes = ( * self -> write . chr ) ( dpos, dend, buff [ 0 ] );
-        if ( bytes <= 0 )
-        {
-            if ( bytes < 0 )
-                return RC ( rcVDB, rcType, rcCasting, rcData, rcCorrupt );
-            rc = resize_dst ( rslt -> data, & dpos, & dend, sbase, spos, send );
-            if ( rc != 0 )
-                return rc;
-        }
-        dpos += bytes;
-    }
-
-    /* return the number of elements and reset the data buffer */
-    rslt -> elem_count = ( uint32_t ) ( dpos - ( uint8_t* ) rslt -> data -> base );
-    if ( rslt -> elem_bits > 8 )
-        rslt -> elem_count /= rslt -> elem_bits >> 3;
-
-    return 0;
-}
-
-/* read_num
- *  numeric readers convert size
- */
-#define READ_NUM( S, D ) \
-static int read_ ## S ( const void *src, void *dst ) \
-{ * ( D* ) dst = * ( const S* ) src; return sizeof ( S ); }
-
-READ_NUM ( int8_t, int64_t )
-READ_NUM ( int16_t, int64_t )
-READ_NUM ( int32_t, int64_t )
-READ_NUM ( int64_t, int64_t )
-
-READ_NUM ( uint8_t, uint64_t )
-READ_NUM ( uint16_t, uint64_t )
-READ_NUM ( uint32_t, uint64_t )
-READ_NUM ( uint64_t, uint64_t )
-
-READ_NUM ( float, double )
-READ_NUM ( double, double )
-
-typedef int ( * read_num_func ) ( const void*, void* );
-static read_num_func read_num_tbl [] =
-{
-    read_uint8_t, read_uint16_t, read_uint32_t, read_uint64_t,
-    read_int8_t, read_int16_t, read_int32_t, read_int64_t,
-    NULL, NULL, read_float, read_double
-};
-
-/* write_num
- *  numeric writers convert size and check limit
- */
-#define WRITE_NUM( S, D ) \
-static int write_ ## D ( const void *src, void *dst ) \
-{ * ( D* ) dst = * ( const S* ) src; return sizeof ( D ); }
-
-#define WRITE_SNUM( S, D, PLIM, NLIM ) \
-static int write_ ## D ( const void *src, void *dst ) \
-{ \
-    S s = * ( const S* ) src; \
-    if ( s > PLIM || s < NLIM ) \
-        return -1; \
-    * ( D* ) dst = ( D )s; \
-    return sizeof ( D ); \
-}
-
-#define WRITE_UNUM( S, D, LIM ) \
-static int write_ ## D ( const void *src, void *dst ) \
-{ \
-    S s = * ( const S* ) src; \
-    if ( s > LIM ) \
-        return -1; \
-    * ( D* ) dst = ( D )s; \
-    return sizeof ( D ); \
-}
-
-WRITE_SNUM ( int64_t, int8_t, INT8_MAX, INT8_MIN )
-WRITE_SNUM ( int64_t, int16_t, INT16_MAX, INT16_MIN )
-WRITE_SNUM ( int64_t, int32_t, INT32_MAX, INT32_MIN )
-WRITE_NUM ( int64_t, int64_t )
-
-WRITE_UNUM ( uint64_t, uint8_t, UINT8_MAX )
-WRITE_UNUM ( uint64_t, uint16_t, UINT16_MAX )
-WRITE_UNUM ( uint64_t, uint32_t, UINT32_MAX )
-WRITE_NUM ( uint64_t, uint64_t )
-
-WRITE_SNUM ( double, float, FLT_MAX, FLT_MIN )
-WRITE_NUM ( double, double )
-
-typedef int ( * write_num_func ) ( const void*, void* );
-static write_num_func write_num_tbl [] =
-{
-    write_uint8_t, write_uint16_t, write_uint32_t, write_uint64_t,
-    write_int8_t, write_int16_t, write_int32_t, write_int64_t,
-    NULL, NULL, write_float, write_double
-};
-
-/* convert_num
- */
-static
-rc_t convert_int ( const void *src, void *dst )
-{
-    if ( ( * ( int64_t* ) dst = * ( const int64_t* ) src ) < 0 )
-        return RC ( rcVDB, rcType, rcCasting, rcRange, rcExcessive );
-    return 0;
-}
-
-static
-rc_t convert_int_float ( const void *src, void *dst )
-{ * ( double* ) dst = * ( const int64_t* ) src; return 0; }
-
-static
-rc_t convert_uint_float ( const void *src, void *dst )
-{ * ( double* ) dst = * ( const uint64_t* ) src; return 0; }
-
-static
-rc_t convert_float_int ( const void *src, void *dst )
-{
-    double d = * ( const double* ) src;
-    if ( d > INT64_MAX || d < INT64_MIN )
-        return RC ( rcVDB, rcType, rcCasting, rcRange, rcExcessive );
-    * ( int64_t* ) dst = ( int64_t ) d;
-    return 0;
-}
-
-static
-rc_t convert_float_uint ( const void *src, void *dst )
-{
-    double d = * ( const double* ) src;
-    if ( d > UINT64_MAX )
-        return RC ( rcVDB, rcType, rcCasting, rcRange, rcExcessive );
-    * ( uint64_t* ) dst = ( uint64_t ) d;
-    return 0;
-}
-
-typedef rc_t ( * convert_num_func ) ( const void*, void* );
-static convert_num_func convert_num_tbl [] =
-{
-    /* unsigned integer conversion */
-    NULL, convert_int, convert_uint_float,
-    /* signed integer conversion */
-    convert_int, NULL, convert_int_float,
-    /* floating point conversion */
-    convert_float_int, convert_float_uint, NULL
-};
-
-
-/* read_chr
- *  characters readers convert size and encoding
- */
-static int read_ascii ( uint32_t *ch,  const void *begin, const void *end )
-{
-    char s;
-    if ( ( const char* ) begin >= ( const char* ) end )
-        return 0;
-    s = * ( const char* ) begin;
-    if ( s < 0 )
-        return -1;
-    * ch = s;
-    return 1;
-}
-
-#define read_utf8 \
-    ( int ( * ) ( uint32_t*, const void*, const void* ) ) utf8_utf32
-
-static int read_utf16 ( uint32_t *ch, const void *begin, const void *end )
-{
-    if ( ( const uint16_t* ) begin >= ( const uint16_t* ) end )
-        return 0;
-    /* yes, I know this is wrong - but don't blame me
-       that the UNICODE folks can't produce a uni-code
-       character with 16 bits... ( GO, KLINGON! ) */
-    * ch = * ( const uint16_t* ) begin;
-    return 2;
-}
-
-static int read_utf32 ( uint32_t *ch, const void *begin, const void *end )
-{
-    if ( ( const uint32_t* ) begin >= ( const uint32_t* ) end )
-        return 0;
-    * ch = * ( const uint32_t* ) begin;
-    return 4;
-}
-
-typedef int ( * read_chr_func ) ( uint32_t*, const void*, const void* );
-static read_chr_func read_chr_tbl [] =
-{
-    /* ascii reads */
-    read_ascii, NULL, NULL,
-    /* unicode reads */
-    read_utf8, read_utf16, read_utf32
-};
-
-/* write_chr
- *  character writers convert size and encoding
- */
-static int write_ascii ( void *begin, void *end, uint32_t ch )
-{
-    if ( ( char* ) begin >= ( char* ) end )
-        return 0;
-    * ( char* ) begin = ( ch >= 128 ) ? '.' : ( char ) ch;
-    return 1;
-}
-
-#define write_utf8 \
-    ( int ( * ) ( void*, void*, uint32_t ) ) utf32_utf8
-
-static int write_utf16 ( void *begin, void *end, uint32_t ch )
-{
-    if ( ( uint16_t* ) begin >= ( uint16_t* ) end )
-        return 0;
-    if ( ch >= 0x10000 )
-        return -1;
-    * ( uint16_t* ) begin = ( uint16_t ) ch;
-    return 2;
-}
-
-static int write_utf32 ( void *begin, void *end, uint32_t ch )
-{
-    if ( ( uint32_t* ) begin >= ( uint32_t* ) end )
-        return 0;
-    * ( uint32_t* ) begin = ch;
-    return 4;
-}
-
-typedef int ( * write_chr_func ) ( void*, void*, uint32_t );
-static write_chr_func write_chr_tbl [] =
-{
-    /* ascii writes */
-    write_ascii, NULL, NULL,
-    /* unicode writes */
-    write_utf8, write_utf16, write_utf32
-};
-
-
-/* cast
- *  this operation is equivalent to a C forced cast, as it allows
- *  reinterpretation of data both in size and type, although
- *  it does not convert text to integer or vice-versa...
- */
-static
-rc_t make_self ( VFuncDesc *rslt, Cast **fself )
-{
-    * fself = calloc ( 1, sizeof ** fself );
-    if ( * fself == NULL )
-        return RC ( rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted );
-
-    rslt -> self = * fself;
-    rslt -> whack = free;
-    return 0;
-}
-
-VTRANSFACT_BUILTIN_IMPL ( vdb_cast, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    Cast *fself;
-    int32_t src_size_idx, dst_size_idx;
-
-    /* cast cannot change intrinsic dimension. it is tempting to
-       consider the ability to cast B1[8] to U8[1], but then what
-       would it mean to cast B1[1] to U8[1] or B1[8] to U8[8] ? */
-    if ( info -> fdesc . desc . intrinsic_dim != dp -> argv [ 0 ] . desc . intrinsic_dim )
-        return RC ( rcVDB, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-    /* cast is often used to ensure a source has a given type
-       meaning that in many cases no cast is required */
-    if ( info -> fdesc . desc . domain == dp -> argv [ 0 ] . desc . domain )
-    {
-        if ( info -> fdesc . desc . intrinsic_bits == dp -> argv [ 0 ] . desc . intrinsic_bits )
-        {
-            /* input and output are already binary compatible */
-            rslt -> variant = vftBlobN;
-            VFUNCDESC_INTERNAL_FUNCS(rslt)->bfN = copy;
-            return 0;
-        }
-    }
-
-    src_size_idx = uint32_lsbit ( dp -> argv [ 0 ] . desc . intrinsic_bits );
-    dst_size_idx = uint32_lsbit ( info -> fdesc . desc . intrinsic_bits );
-
-    /* numeric <-> numeric casts are supported */
-    if ( info -> fdesc . desc . domain >= vtdUint &&
-         info -> fdesc . desc . domain <= vtdFloat &&
-         dp -> argv [ 0 ] . desc . domain >= vtdUint &&
-         dp -> argv [ 0 ] . desc . domain <= vtdFloat )
-    {
-
-        /* byte-aligned offsets will be values 3..6
-           values < 3 are not byte-aligned
-           values > 6 are >= 128 bits and not handled */
-        if ( src_size_idx >= 3 && src_size_idx <= 6 &&
-             dst_size_idx >= 3 && dst_size_idx <= 6 )
-        {
-            rc = make_self ( rslt, & fself );
-            if ( rc != 0 )
-                return rc;
-
-            /* get reader */
-            fself -> read . num = read_num_tbl
-                [ ( dp -> argv [ 0 ] . desc . domain - vtdUint ) * 4 + src_size_idx - 3 ];
-            if ( fself -> read . num != NULL )
-            {
-                /* get writer */
-                fself -> write . num = write_num_tbl
-                    [ ( info -> fdesc . desc . domain - vtdUint ) * 4 + dst_size_idx - 3 ];
-                if ( fself -> write . num != NULL )
-                {
-                    /* get optional converter */
-                    fself -> convert . num = convert_num_tbl
-                        [ ( dp -> argv [ 0 ] . desc . domain - vtdUint ) * ( vtdFloat - vtdUint + 1 ) +
-                          info -> fdesc . desc . domain - vtdUint ];
-
-                    /* set intrinsic dimension */
-                    fself -> intrinsic_dim = info -> fdesc . desc . intrinsic_dim;
-
-                    /* done */
-                    rslt -> u . af = cast_num;
-                    rslt -> variant = vftArray;
-                    return 0;
-                }
-            }
-
-            free ( fself );
-            rslt -> whack = NULL;
-        }
-    }
-
-    /* text <-> text casts are supported */
-    if ( info -> fdesc . desc . domain >= vtdAscii &&
-         info -> fdesc . desc . domain <= vtdUnicode &&
-         dp -> argv [ 0 ] . desc . domain >= vtdAscii &&
-         dp -> argv [ 0 ] . desc . domain <= vtdUnicode )
-    {
-        if ( src_size_idx >= 3 && src_size_idx <= 5 &&
-             dst_size_idx >= 3 && dst_size_idx <= 5 )
-        {
-            rc = make_self ( rslt, & fself );
-            if ( rc != 0 )
-                return rc;
-
-            /* get reader */
-            fself -> read . chr = read_chr_tbl
-                [ ( dp -> argv [ 0 ] . desc . domain - vtdAscii ) * 3 + src_size_idx - 3 ];
-            if ( fself -> read . chr != NULL )
-            {
-                /* get writer */
-                fself -> write . chr = write_chr_tbl
-                    [ ( info -> fdesc . desc . domain - vtdAscii ) * 4 + dst_size_idx - 3 ];
-                if ( fself -> write . chr != NULL )
-                {
-                    /* set source and dest sizes */
-                    fself -> src_bits = 1 << src_size_idx;
-                    fself -> dst_bits = 1 << dst_size_idx;
-
-                    /* done */
-                    rslt -> u . rf = cast_chr;
-                    rslt -> variant = vftRow;
-                    return 0;
-                }
-            }
-
-            free ( fself );
-            rslt -> whack = NULL;
-        }
-    }
-
-    /* everything else is unsupported */
-    return RC ( rcVDB, rcFunction, rcConstructing, rcFunction, rcUnsupported );
-}
diff --git a/libs/vdb/column-cmn.c b/libs/vdb/column-cmn.c
deleted file mode 100644
index 85677bc..0000000
--- a/libs/vdb/column-cmn.c
+++ /dev/null
@@ -1,356 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-
-#define USE_KURT 1
-
-
-#include <vdb/extern.h>
-
-#define KONST const
-#include "column-priv.h"
-#include "dbmgr-priv.h"
-#include "schema-priv.h"
-#include "prod-priv.h"
-#include "blob-priv.h"
-#include "page-map.h"
-#undef KONST
-
-#include <vdb/manager.h>
-#include <kdb/column.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * VColumn
- */
-
-/* Whack
- */
-void VColumnDestroy ( VColumn *self )
-{
-#if PROD_REFCOUNT && ! PROD_ALL_IN_CURSOR
-    PROD_TRACK_REFCOUNT (VProductionRelease,self->in);
-    VProductionRelease ( self -> in, NULL ); 
-#endif
-#if USE_KURT
-    VBlobRelease ( self -> cache );
-#endif
-    VSchemaSever ( self -> schema );
-}
-
-
-/* Cmp
- * Sort
- */
-int CC VColumnCmp ( const void *item, const void *n )
-{
-    const VColumn *b = n;
-    return SColumnSort ( item, b -> scol );
-}
-
-int CC VColumnSort ( const void *item, const void *n )
-{
-    const VColumn *a = item;
-    const VColumn *b = n;
-    return SColumnSort ( a -> scol, b -> scol );
-}
-
-
-/* IdRange
- *  returns id range for column or page
- */
-rc_t VColumnIdRangeRead ( const VColumn *self, int64_t *first, int64_t *last )
-{
-    rc_t rc;
-
-    assert ( self != NULL );
-    assert ( first != NULL && last != NULL );
-
-    if ( self -> in == NULL )
-        rc = RC ( rcVDB, rcColumn, rcAccessing, rcRange, rcNotOpen );
-    else
-    {
-        /* a little silly, but set max range in 64-bit
-           without complaints from 32-bit compilers */
-        * first = 1;
-        * first <<= 63;
-        * last = ~ * first;
-
-        /* now intersect this range with all physical sources */
-        rc = VProductionColumnIdRange ( self -> in, first, last );
-        if ( rc == 0 )
-            return 0;
-    }
-
-    * first = * last = 0;
-
-    return rc;
-}
-
-rc_t VColumnPageIdRange ( const VColumn *self, int64_t id, int64_t *first, int64_t *last )
-{
-    rc_t rc;
-
-    assert ( self != NULL );
-    assert ( first != NULL && last != NULL );
-
-    if ( self -> in == NULL )
-        rc = RC ( rcVDB, rcColumn, rcAccessing, rcRange, rcNotOpen );
-    else
-    {
-        /* try to find page and get its range */
-        rc = VProductionPageIdRange ( self -> in, id, first, last );
-        if ( rc == 0 )
-            return 0;
-    }
-
-    * first = * last = 0;
-
-    return rc;
-}
-
-
-/* Datatype
- *  returns typedecl and/or typedef for column data
- *
- *  "type" [ OUT, NULL OKAY ] - returns the column type declaration
- *
- *  "def" [ OUT, NULL OKAY ] - returns the definition of the type
- *  returned in "type_decl"
- *
- * NB - one of "type" and "def" must be non-NULL
- */
-rc_t VColumnDatatype ( const VColumn *self, VTypedecl *type, VTypedesc *desc )
-{
-    assert ( self != NULL );
-    assert ( type != NULL || desc != NULL );
-
-    if ( type != NULL )
-        * type = self -> td;
-
-    if ( desc != NULL )
-        * desc = self -> desc;
-
-    return 0;
-}
-
-/* Init - PRIVATE
- */
-rc_t VColumnInit ( VColumn *self, const VSchema *schema, const SColumn *scol )
-{
-    rc_t rc = VSchemaDescribeTypedecl ( schema, & self -> desc, & scol -> td );
-    if ( rc == 0 )
-    {
-        self -> schema = VSchemaAttach ( schema );
-        self -> scol = scol;
-        self -> td = scol -> td;
-        self -> read_only = scol -> read_only;
-    }
-    return rc;
-}
-
-
-/* Make - PRIVATE
- *  make a read column
- */
-rc_t VColumnMake ( VColumn **colp, const VSchema *schema, const SColumn *scol )
-{
-    rc_t rc;
-    VColumn *col;
-
-    assert ( colp != NULL );
-    assert ( schema != NULL );
-
-    col = calloc ( 1, sizeof * col );
-    if ( col == NULL )
-        rc = RC ( rcVDB, rcColumn, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        rc = VColumnInit ( col, schema, scol );
-        if ( rc == 0 )
-        {
-            col -> read_only = true;
-            * colp = col;
-            return 0;
-        }
-
-        free ( col );
-    }
-
-    * colp = NULL;
-    return rc;
-}
-
-rc_t VColumnReadCachedBlob ( const VColumn *self, const VBlob *vblob, int64_t row_id,
-    uint32_t *elem_bits, const void **base, uint32_t *boff, uint32_t *row_len, uint32_t *repeat_count )
-{
-    uint64_t start;
-
-    * elem_bits = VTypedescSizeof ( & self -> desc );
-    * row_len = PageMapGetIdxRowInfo ( vblob -> pm, ( uint32_t ) ( row_id - vblob -> start_id ), boff, repeat_count );
-    start = ( uint64_t ) boff [ 0 ] * elem_bits [ 0 ];
-    * base = ( uint8_t* ) vblob -> data . base + ( start >> 3 );
-    * boff = ( uint32_t ) start & 7;
-
-    return 0;
-}
-
-rc_t VColumnReadBlob ( const VColumn *cself, const VBlob **vblobp, int64_t row_id,
-   uint32_t *elem_bits, const void **base, uint32_t *boff, uint32_t *row_len, uint32_t * repeat_count, VBlobMRUCacheCursorContext *cctx )
-{
-    rc_t rc;
-
-    if ( cself -> in == NULL )
-        rc = RC ( rcVDB, rcColumn, rcReading, rcColumn, rcNotOpen );
-    else
-    {
-        VBlob *vblob;
-        rc = VProductionReadBlob ( cself -> in, & vblob, row_id, 1, cctx );
-        if ( rc == 0 )
-        {
-            VColumn *self = ( VColumn* ) cself;
-            VColumnReadCachedBlob ( self, vblob, row_id, elem_bits, base, boff, row_len, repeat_count );
-
-#if USE_KURT
-            TRACK_BLOB ( VBlobRelease, self -> cache );
-            ( void ) VBlobRelease ( self -> cache );
-
-            if ( VBlobAddRef ( vblob ) != 0 )
-                self -> cache = NULL;
-            else
-                self -> cache = vblob;
-#endif
-
-            * vblobp = vblob;
-        }
-    }
-
-    return rc;
-}
-
-rc_t VColumnRead ( const VColumn *cself, int64_t row_id,
-    uint32_t *elem_bits, const void **base, uint32_t *boff, uint32_t *row_len,
-    VBlob ** vblob)
-{
-    rc_t rc;
-
-    VBlob * dummy;
-    if ( vblob == NULL )
-    {
-        dummy = NULL;
-        vblob = & dummy;
-    }
-
-    if ( cself -> in == NULL )
-        rc = RC ( rcVDB, rcColumn, rcReading, rcColumn, rcNotOpen );
-    else
-    {
-        rc = VProductionReadBlob ( cself -> in, vblob, row_id, 1, NULL );
-        if ( rc == 0 )
-        {
-            VColumn *self = ( VColumn* ) cself;
-            VColumnReadCachedBlob ( self, *vblob, row_id, elem_bits, base, boff, row_len, NULL );
-
-#if USE_KURT
-            TRACK_BLOB ( VBlobRelease, self -> cache );
-            ( void ) VBlobRelease ( self -> cache );
-            self -> cache = *vblob;
-#else
-            TRACK_BLOB ( VBlobRelease, *vblob );
-            ( void ) VBlobRelease ( *vblob );
-            *vblob = NULL;
-#endif
-        }
-    }
-
-    return rc;
-}
-
-/* IsStatic
- *  answers question: "does this column have the same value for every cell?"
- */
-rc_t VColumnIsStatic ( const VColumn *self, bool *is_static )
-{
-    rc_t rc;
-
-    if ( is_static == NULL )
-        rc = RC ( rcVDB, rcColumn, rcAccessing, rcParam, rcNull );
-    else
-    {
-        * is_static = false;
-
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcColumn, rcAccessing, rcSelf, rcNull );
-        else if ( self -> in == NULL )
-            rc = RC ( rcVDB, rcColumn, rcAccessing, rcColumn, rcNotOpen );
-        else
-        {
-            return VProductionIsStatic ( self -> in, is_static );
-        }
-    }
-
-    return rc;
-}
-
-/* GetKColumn
- *  drills down to physical production to get a KColumn,
- *  and if that fails, indicate whether the column is static
- */
-rc_t VColumnGetKColumn ( const VColumn * self, struct KColumn ** kcol, bool * is_static )
-{
-    rc_t rc;
-
-    bool dummy = false;
-
-    if ( is_static == NULL )
-        is_static = & dummy;
-
-    if ( kcol == NULL )
-        rc = RC ( rcVDB, rcColumn, rcAccessing, rcParam, rcNull );
-    else
-    {
-        * kcol = NULL;
-        * is_static = false;
-
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcColumn, rcAccessing, rcSelf, rcNull );
-        else if ( self -> in == NULL )
-            rc = RC ( rcVDB, rcColumn, rcAccessing, rcColumn, rcNotOpen );
-        else
-        {
-            return VProductionGetKColumn ( self -> in, kcol, is_static );
-        }
-    }
-
-    return rc;
-}
diff --git a/libs/vdb/column-priv.h b/libs/vdb/column-priv.h
deleted file mode 100644
index 3d002ef..0000000
--- a/libs/vdb/column-priv.h
+++ /dev/null
@@ -1,304 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_column_priv_
-#define _h_column_priv_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_vdb_xform_
-#include <vdb/xform.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_klib_data_buffer_
-#include <klib/data-buffer.h>
-#endif
-
-#include <os-native.h>
-
-#ifndef KONST
-#define KONST
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct Vector;
-struct KColumn;
-struct VDBManager;
-struct VSchema;
-struct SColumn;
-struct SExpression;
-struct VProduction;
-struct VBlob;
-struct VBlobMRUCacheCursorContext;
-
-
-/*--------------------------------------------------------------------------
- * VColumn
- *  externally visible column object
- */
-typedef struct VColumn VColumn;
-struct VColumn
-{
-    /* for type queries */
-    struct VSchema const *schema;
-
-    /* typed column */
-    struct SColumn const *scol;
-
-    /* read production */
-    struct VProduction *in;
-
-    /* cached output */
-    struct VBlob *cache;
-
-    /* type information */
-    VTypedecl td;
-    VTypedesc desc;
-
-    /* vector ids */
-    uint32_t ord;
-
-    bool read_only;
-    uint8_t align [ 3 ];
-};
-
-void CC VColumnWhack ( void *item, void *curs );
-void VColumnDestroy ( VColumn *self );
-rc_t VColumnInit ( VColumn *self,
-    struct VSchema const *schema, struct SColumn const *scol );
-
-int CC VColumnCmp ( const void *item, const void *n );
-int CC VColumnSort ( const void *item, const void *n );
-
-rc_t VColumnMake ( VColumn **col,
-    struct VSchema const *schema, struct SColumn const *scol );
-
-rc_t VColumnIdRange ( const VColumn *self,
-    int64_t *first, int64_t *last );
-rc_t VColumnIdRangeRead ( const VColumn *self,
-    int64_t *first, int64_t *last );
-rc_t VColumnPageIdRange ( const VColumn *self,
-    int64_t id, int64_t *first, int64_t *last );
-
-rc_t VColumnDatatype ( const VColumn *self,
-    struct VTypedecl *type, struct VTypedesc *desc );
-
-rc_t VColumnRead ( const VColumn *self, int64_t row_id,
-   uint32_t *elem_bits, const void **base, uint32_t *boff, uint32_t *row_len,
-   struct VBlob **vblob );
-
-rc_t VColumnReadBlob ( const VColumn *self, struct VBlob const **blob, int64_t row_id,
-   uint32_t *elem_bits, const void **base, uint32_t *boff, uint32_t *row_len, uint32_t *repeat_count,
-   struct VBlobMRUCacheCursorContext *cctx);
-
-rc_t VColumnReadCachedBlob ( const VColumn *self, struct VBlob const *blob, int64_t row_id,
-   uint32_t *elem_bits, const void **base, uint32_t *boff, uint32_t *row_len, uint32_t *repeat_count );
-
-rc_t VColumnIsStatic ( const VColumn *self, bool *is_static );
-
-rc_t VColumnGetKColumn ( const VColumn * self, struct KColumn ** kcol, bool * is_static );
-
-/*--------------------------------------------------------------------------
- * WColumn
- *  column with input buffer
- */
-typedef struct WColumn WColumn;
-struct WColumn
-{
-    VColumn dad;
-
-    /* half-closed range of buffered rows */
-    int64_t start_id, end_id;
-
-    /* half-closed id for page cutoff */
-    int64_t cutoff_id;
-
-    /* alternate read production */
-    struct VProduction *alt;
-
-    /* validate production */
-    struct VProduction *val;
-
-    /* write production */
-    struct VProduction *out;
-
-    /* output page */
-    struct VBlob *page;
-
-    /* default row data */
-    KDataBuffer dflt;
-
-    /* accumulators */
-    KDataBuffer data, rowmap;
-
-    /* peak byte size history of data accumulator */
-    size_t data_peak_hist [ 16 ];
-    size_t data_peak;
-
-    /* total committed bits in buffer */
-    bitsz_t bits_in_buffer;
-
-    /* number of uncommitted bits in buffer */
-    bitsz_t row_len;
-
-    /* size ( in bytes ) to trigger page commit */
-    size_t trigger;
-
-    /* number of committed rows in buffer */
-    size_t num_rows;
-
-    /* peak history index */
-    uint8_t peak_hist_idx;
-
-    /* true if there is a default value */
-    bool have_dflt;
-
-    /* set upon any successful write */
-    bool row_written;
-
-    /* set if the last row written was default */
-    bool dflt_last;
-
-    /* set upon row commit */
-    bool row_committed;
-};
-
-/* WColumnRowMap
- */
-typedef struct WColumnRowMap WColumnRowMap;
-struct WColumnRowMap
-{
-    int64_t start_id;
-    uint64_t len, cnt;
-};
-
-rc_t WColumnMake ( VColumn **col, struct VSchema const *schema,
-    struct SColumn const *scol, struct SExpression const *dflt_limit,
-    struct VDBManager *mgr, struct Vector *cx_bind );
-
-rc_t WColumnSetDefault ( VColumn *self,
-    bitsz_t elem_bits, const void *buffer, bitsz_t boff, uint64_t len );
-rc_t WColumnWrite ( VColumn *self,
-    bitsz_t elem_bits, const void *buffer, bitsz_t boff, uint64_t len );
-
-/* OpenRow
- *  update state
- *
- *  "const_row_id" [ IN, CONST ] - id of row being opened. useful
- *  only on initial open when no other rows are buffered.
- */
-void CC WColumnOpenRow ( void *self, void *const_row_id );
-
-/* RowDefaults
- *  if a row has not been written but has a default value,
- *  that value is written to the row. if no default exists,
- *  an error is generated.
- *
- *  "rc" [ OUT, DEFAULT ZERO ] - preset to 0
- *
- *  returns true if any error occurs ( i.e. "*rc != 0" )
- */
-bool CC WColumnRowDefaults ( void *self, void *rc );
-
-/* CommitRow
- *  closes the row to further writes and accepts
- *  all data written so far as complete. if the accumulated
- *  page data trigger a flush, the flush parameter is set.
- *
- *  "end_id" [ IN/OUT ] - used to calculate the minimum
- *  end_id for pages. if the column decides that it has too
- *  much data in its buffer and wants a cutoff < current
- *  value, it can lower the id.
- *
- *  returns true if there was a memory error.
- */
-bool CC WColumnCommitRow ( void *self, void *end_id );
-
-/* RepeatRow
- *  go into the last row entry
- *  extend the count by count
- *  data points to this structure
- */
-typedef struct WColumnRepeatRowData WColumnRepeatRowData;
-struct WColumnRepeatRowData
-{
-    uint64_t count;
-    int64_t row_id;
-    int64_t end_id;
-};
-void CC WColumnRepeatRow ( void *self, void *data );
-
-/* CloseRow
- *  discards uncommitted data
- *  update state
- */
-void CC WColumnCloseRow ( void *self, void *ignore );
-
-/* BufferPage
- *  captures page range
- *
- *  "end_id" [ IN, CONST ] - half-closed id of buffered range end
- *  column should capture this information for creating page
- *  id range either on demand, or pre-prepared.
- *
- *  returns true if there was a memory error.
- */
-bool CC WColumnBufferPage ( void *self, void *const_end_id );
-
-/* DropPage
- *  drops all rows associated with committed page
- */
-void CC WColumnDropPage ( void *self, void *ignore );
-
-/* ReadBlob
- *  reads an input blob
- *  returns a blob with all rows in commit range
- *
- *  "vblob" [ OUT ] - page to return
- *
- *  "id" [ IN ] - an id that must be within page range
- *  returns rcNotFound and NULL blob if id is not within range
- */
-rc_t WColumnReadBlob ( WColumn *self, struct VBlob **vblob, int64_t id );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_column_priv_ */
diff --git a/libs/vdb/column.c b/libs/vdb/column.c
deleted file mode 100644
index 4c4c741..0000000
--- a/libs/vdb/column.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define KONST const
-#include "column-priv.h"
-#include "dbmgr-priv.h"
-#include "schema-priv.h"
-#include "cursor-priv.h"
-#undef KONST
-
-#include <vdb/manager.h>
-#include <vdb/cursor.h>
-#include <kdb/column.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-
-/*--------------------------------------------------------------------------
- * VColumn
- */
-
-
-/* Whack
- *  perform read-only cleanup
- */
-void CC VColumnWhack ( void *item, void *data )
-{
-    VColumn *self = item;
-    VCursor *curs = data;
-
-    /* remove from cursor */
-    if ( curs != NULL )
-    {
-        VectorSwap ( & curs -> row, self -> ord, NULL, & item );
-        VCursorCacheSwap ( & curs -> col, & self -> scol -> cid, NULL, & item );
-    }
-
-    VColumnDestroy ( self );
-    free ( self );
-}
-
-
-/* IdRange
- *  returns id range for column or page
- */
-rc_t VColumnIdRange ( const VColumn *self, int64_t *first, int64_t *last )
-{
-    return VColumnIdRangeRead ( self, first, last );
-}
diff --git a/libs/vdb/compare.c b/libs/vdb/compare.c
deleted file mode 100644
index e72f374..0000000
--- a/libs/vdb/compare.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include "blob.h"
-#include "blob-headers.h"
-#include "page-map.h"
-#include "blob-priv.h"
-#include "xform-priv.h"
-#include "prod-priv.h"
-
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/debug.h>
-#include <atomic32.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <assert.h>
-
-#define RC_NOT_SAME RC(rcVDB, rcBlob, rcValidating, rcData, rcCorrupt)
-
-typedef struct float_compare_t {
-    unsigned sig_bits;
-} float_compare_t;
-
-static
-rc_t CC blob_compare(
-                  void *self,
-                  const VRowData *orig,
-                  const VRowData *test
-) {
-    const bitsz_t o_ofs = (size_t)orig->u.data.first_elem * orig->u.data.elem_bits;
-    const bitsz_t t_ofs = (size_t)test->u.data.first_elem * orig->u.data.elem_bits;
-    const bitsz_t bits = (size_t)orig->u.data.elem_count * orig->u.data.elem_bits;
-    int cmp;
-
-    if (orig->u.data.elem_bits % 8 == 0) {
-        cmp = memcmp(
-                   &((const char *)orig->u.data.base)[o_ofs >> 3],
-                   &((const char *)test->u.data.base)[t_ofs >> 3],
-                   bits >> 3
-            );
-    }
-    else {
-        cmp = bitcmp(orig->u.data.base, o_ofs, test->u.data.base, t_ofs, bits);
-    }
-    if(cmp)
-	return RC_NOT_SAME;
-    return 0;
-
-}
-static bool equal_f32( const float A[], const float B[], uint64_t elem_count, unsigned sig_bits ) {
-    unsigned i;
-    const int shift = 24 - sig_bits;
-    
-    assert(shift > 0);
-    
-    for (i = 0; i != elem_count; ++i) {
-        int expa;
-        int expb;
-        uint32_t mana;
-        uint32_t manb;
-        float a = A[i];
-        float b = B[i];
-        int diff;
-        
-        if (a < 0) {
-            a = -a;
-            b = -b;
-            if (b < 0)
-                return false;
-        }
-
-        a = frexpf(a, &expa);
-        b = frexpf(b, &expb);
-        
-        if (expa < expb) {
-            ++expa;
-            a /= 2.0;
-        }
-        else if (expb < expa) {
-            ++expb;
-            b /= 2.0;
-        }
-        if (expa != expb)
-            return false;
-        
-        mana = (uint32_t)ldexpf( a, 24 );
-        manb = (uint32_t)ldexpf( b, 24 );
-        
-        diff = (mana >> shift) - (manb >> shift);
-
-        if (-1 > diff || diff > 1)
-            return false;
-    }
-    return true;
-}
-
-static
-rc_t CC blob_compare_f32(
-                      void *Self,
-                      const VRowData *orig,
-                      const VRowData *test
-) {
-    float_compare_t *self = Self;
-    
-    if (!equal_f32(
-                   &((const float *)orig->u.data.base)[orig->u.data.first_elem],
-                   &((const float *)test->u.data.base)[test->u.data.first_elem],
-                   orig->u.data.elem_count,
-                   self->sig_bits
-               ))
-    {
-        return RC_NOT_SAME;
-    }
-    
-    return 0;
-}
-
-static
-void CC vfunc_free ( void * self )
-{
-    free (self);
-}
-
-VTRANSFACT_BUILTIN_IMPL(vdb_compare, 1, 0, 0) (
-                                       const void *self,
-                                       const VXfactInfo *info,
-                                       VFuncDesc *rslt,
-                                       const VFactoryParams *cp,
-                                       const VFunctionParams *dp
-) 
-{
-    VTypedesc type;
-    assert ( dp->argc == 2 );
-
-    rslt->variant = prodFuncBuiltInCompare;
-    
-#if 0
-    if (dp->argv[0].desc.domain != dp->argv[1].desc.domain ||
-        dp->argv[0].desc.intrinsic_dim != dp->argv[1].desc.intrinsic_dim ||
-        dp->argv[0].desc.intrinsic_bits != dp->argv[1].desc.intrinsic_bits
-    ) {
-        return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-    }
-#endif
-    type = dp->argv[0].desc;
-    
-    if (type.domain == vtdFloat) {
-        if (cp->argc > 0) {
-            unsigned sig_bits = cp->argv[0].data.u32[0];
-
-            if (sig_bits == 0) {
-                return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            }
-            switch (type.intrinsic_bits) {
-            case 32:
-                if (sig_bits < 24)
-                    VFUNCDESC_INTERNAL_FUNCS(rslt)->cf = blob_compare_f32;
-                break;
-            case 64:
-#if 0
-                if (sig_bits < 52)
-                    VFUNCDESC_INTERNAL_FUNCS(rslt)->cf = blob_compare_f64;
-#endif
-                break;
-            default:
-                break;
-            }
-            if (VFUNCDESC_INTERNAL_FUNCS(rslt)->cf) {
-                float_compare_t *Self;
-            
-                Self = malloc(sizeof *Self);
-                if (Self == NULL)
-                    return RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-
-                Self->sig_bits = sig_bits;
-            
-                rslt->self = Self;
-                rslt->whack = vfunc_free;
-                return 0;
-            }
-        }
-        else {
-            VDB_DEBUG (("warning: using identity compare for floating point types won't work if using fzip\n"));
-        }
-    }
-    VFUNCDESC_INTERNAL_FUNCS(rslt)->cf = blob_compare;
-    return 0;
-}
-
-static
-rc_t CC true_func(
-                  void *self,
-                  const VRowData *orig,
-                  const VRowData *test
-) {
-    return 0;
-}
-
-VTRANSFACT_BUILTIN_IMPL(vdb_no_compare, 1, 0, 0) (
-                                       const void *self,
-                                       const VXfactInfo *info,
-                                       VFuncDesc *rslt,
-                                       const VFactoryParams *cp,
-                                       const VFunctionParams *dp
-) 
-{
-    rslt->variant = prodFuncBuiltInCompare;
-    VFUNCDESC_INTERNAL_FUNCS(rslt)->cf = true_func;
-    return 0;
-}
diff --git a/libs/vdb/cursor-cmn.c b/libs/vdb/cursor-cmn.c
deleted file mode 100644
index 2c82623..0000000
--- a/libs/vdb/cursor-cmn.c
+++ /dev/null
@@ -1,2910 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include <va_copy.h>
-
-#define TRACK_REFERENCES 0
-
-#define KONST const
-#define SKONST
-#include "cursor-priv.h"
-#include "dbmgr-priv.h"
-#include "linker-priv.h"
-#include "table-priv.h"
-#include "schema-priv.h"
-#include "schema-parse.h"
-#include "column-priv.h"
-#include "phys-priv.h"
-#include "prod-priv.h"
-#include "prod-expr.h"
-#undef KONST
-#undef SKONST
-#include "blob-priv.h"
-#include "page-map.h"
-
-#include <vdb/cursor.h>
-#include <vdb/table.h>
-#include <vdb/vdb-priv.h>
-#include <kdb/table.h>
-#include <kdb/column.h>
-#include <kdb/meta.h>
-#include <kdb/namelist.h>
-#include <kfs/dyload.h>
-#include <klib/symbol.h>
-#include <klib/symtab.h>
-#include <klib/namelist.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <klib/printf.h>
-#include <klib/sort.h>
-#include <bitstr.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <kproc/lock.h>
-#include <kproc/cond.h>
-#include <kproc/thread.h>
-
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-
-#define PERMIT_POST_OPEN_ADD 1
-#if _ARCH_BITS == 32
-#define DISABLE_READ_CACHE 1
-#else
-#define DISABLE_READ_CACHE 0
-#endif
-
-/* normally false
-   can be set for certain applications using VDBManagerDisablePagemapThread
-*/
-static bool s_disable_pagemap_thread;
-
-
-/*--------------------------------------------------------------------------
- * VCursorCache
- */
-
-/* Whack
- */
-void VCursorCacheWhack ( VCursorCache *self,
-    void ( CC * whack ) ( void *item, void *data ), void *data )
-{
-    uint32_t i = VectorStart ( & self -> cache );
-    uint32_t end = VectorLength ( & self -> cache );
-    for ( end += i; i < end; ++ i )
-    {
-        Vector *ctx;
-        rc_t rc = VectorSwap ( & self -> cache, i, NULL, ( void** ) & ctx );
-        if ( rc == 0 && ctx != NULL )
-        {
-            VectorWhack ( ctx, whack, data );
-            free ( ctx );
-        }
-    }
-
-    VectorWhack ( & self -> cache, NULL, NULL );
-}
-
-
-/* Get
- *  retrieve object by cid
- */
-void *VCursorCacheGet ( const VCursorCache *self, const VCtxId *cid )
-{
-    const Vector *ctx = ( const void* ) VectorGet ( & self -> cache, cid -> ctx );
-    return VectorGet ( ctx, cid -> id );
-}
-
-/* Set
- *  set object by cid
- */
-rc_t VCursorCacheSet ( VCursorCache *self, const VCtxId *cid, const void *item )
-{
-    Vector *ctx = VectorGet ( & self -> cache, cid -> ctx );
-    if ( ctx == NULL )
-    {
-        rc_t rc;
-
-        ctx = malloc ( sizeof * ctx );
-        if ( ctx == NULL )
-            return RC ( rcVDB, rcVector, rcConstructing, rcMemory, rcExhausted );
-
-        rc = VectorSet ( & self -> cache, cid -> ctx, ctx );
-        if ( rc != 0 )
-        {
-            free ( ctx );
-            return rc;
-        }
-
-        VectorInit ( ctx, 0, 16 );
-    }
-
-    return VectorSet ( ctx, cid -> id, item );
-}
-
-/* Swap
- *  swap object by cid
- */
-rc_t VCursorCacheSwap ( VCursorCache *self, const VCtxId *cid, const void *item, void **prior )
-{
-    Vector *ctx = VectorGet ( & self -> cache, cid -> ctx );
-    if ( ctx == NULL )
-    {
-        * prior = NULL;
-        return VCursorCacheSet ( self, cid, item );
-    }
-    return VectorSwap ( ctx, cid -> id, item, prior );
-}
-
-
-/*--------------------------------------------------------------------------
- * NamedParamNode
- */
-
-typedef struct NamedParamNode NamedParamNode;
-struct NamedParamNode
-{
-    BSTNode n;
-    String name;
-    KDataBuffer value;
-};
-
-static
-void CC NamedParamNodeWhack ( BSTNode *n, void *ignore )
-{
-    NamedParamNode *self = ( NamedParamNode* ) n;
-    KDataBufferWhack ( & self -> value );
-    free ( self );
-}
-
-static
-int64_t CC NamedParamComp ( const void *item, const BSTNode *n )
-{
-    const String *name = item;
-    const NamedParamNode *node = ( const NamedParamNode* ) n;
-
-    return StringOrderNoNullCheck ( name, & node -> name );
-}
-
-static
-int64_t CC NamedParamNodeComp ( const BSTNode *A, const BSTNode *B )
-{
-    const NamedParamNode *a = (const NamedParamNode *) A;
-    const NamedParamNode *b = (const NamedParamNode *) B;
-
-    return StringOrderNoNullCheck ( & a -> name, & b -> name );
-}
-/*--------------------------------------------------------------------------
- * LinkedCursorNode
- */
-
-typedef struct LinkedCursorNode LinkedCursorNode;
-struct LinkedCursorNode
-{
-    BSTNode n;
-    char tbl[64];
-    VCursor *curs;
-};
-
-static
-void CC LinkedCursorNodeWhack ( BSTNode *n, void *ignore )
-{
-    LinkedCursorNode *self = ( LinkedCursorNode* ) n;
-    VCursorRelease (  self -> curs );
-    free ( self );
-}
-
-static
-int64_t CC LinkedCursorComp ( const void *item, const BSTNode *n )
-{
-    const char *tbl = item;
-    const LinkedCursorNode *node = ( const LinkedCursorNode* ) n;
-
-    return strncmp ( tbl, node -> tbl, sizeof(node -> tbl) );
-}
-
-static
-int64_t CC LinkedCursorNodeComp ( const BSTNode *A, const BSTNode *B )
-{
-    const LinkedCursorNode *a = (const LinkedCursorNode *) A;
-    const LinkedCursorNode *b = (const LinkedCursorNode *) B;
-
-    return strncmp ( a -> tbl, b -> tbl,sizeof(a->tbl) );
-}
-
-
-
-/*--------------------------------------------------------------------------
- * VCursor
- *  a row cursor onto a VTable
- */
-
-static void CC VCursorVColumnWhack_checked( void *item, void *data )
-{
-    if ( item != NULL )
-        VColumnWhack( item, data );
-}
-
-/* Whack
- */
-rc_t VCursorDestroy ( VCursor *self )
-{
-    KRefcountWhack ( & self -> refcount, "VCursor" );
-    if(self->cache_curs) VCursorDestroy((VCursor*)self->cache_curs);
-    VBlobMRUCacheDestroy ( self->blob_mru_cache);
-
-    if ( self -> user_whack != NULL )
-        ( * self -> user_whack ) ( self -> user );
-    BSTreeWhack ( & self -> named_params, NamedParamNodeWhack, NULL );
-    BSTreeWhack ( & self -> linked_cursors, LinkedCursorNodeWhack, NULL );
-    VCursorCacheWhack ( & self -> col, NULL, NULL );
-    VCursorCacheWhack ( & self -> phys, VPhysicalWhack, NULL );
-    VCursorCacheWhack ( & self -> prod, NULL, NULL );
-    VectorWhack ( & self -> owned, VProductionWhack, NULL );
-    VectorWhack ( & self -> trig, NULL, NULL );
-    VectorWhack ( & self -> row, VCursorVColumnWhack_checked, NULL );
-    VectorWhack ( & self -> v_cache_curs, NULL, NULL );
-    VectorWhack ( & self -> v_cache_cidx, NULL, NULL );
-
-    VSchemaRelease ( self -> schema );
-
-    VTableSever ( self -> tbl );
-
-    free ( self );
-
-    return 0;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC VCursorAddRef ( const VCursor *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "VCursor" ) )
-        {
-        case krefLimit:
-            return RC ( rcVDB, rcCursor, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VCursorRelease ( const VCursor *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "VCursor" ) )
-        {
-        case krefWhack:
-            return VCursorWhack ( ( VCursor* ) self );
-        case krefNegative:
-            return RC ( rcVDB, rcCursor, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Make - PRIVATE
- */
-rc_t VCursorMake ( VCursor **cursp, const VTable *tbl )
-{
-    rc_t rc;
-    VCursor *curs;
-
-    /* must have return param */
-    assert ( cursp != NULL );
-
-    /* must have parent tbl */
-    assert ( tbl != NULL );
-
-    /* create a structure */
-    curs = calloc ( 1, sizeof * curs );
-    if ( curs == NULL )
-        rc = RC ( rcVDB, rcCursor, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        /* create a separate schema object */
-        rc = VSchemaMake ( & curs -> schema, tbl -> schema );
-        if ( rc == 0 )
-        {
-            /* extend table schema to populate with implicits */
-            rc = STableCloneExtend ( tbl -> stbl, & curs -> stbl, curs -> schema );
-            if ( rc == 0 )
-            {
-                curs -> tbl = VTableAttach ( tbl );
-                VectorInit ( & curs -> row, 1, 16 );
-                VectorInit ( & curs -> v_cache_curs, 1, 16 );
-                VectorInit ( & curs -> v_cache_cidx, 1, 16 );
-                VCursorCacheInit ( & curs -> col, 0, 16 );
-                VCursorCacheInit ( & curs -> phys, 0, 16 );
-                VCursorCacheInit ( & curs -> prod, 0, 16 );
-                VectorInit ( & curs -> owned, 0, 64 );
-                VectorInit ( & curs -> trig, 0, 64 );
-                KRefcountInit ( & curs -> refcount, 1, "VCursor", "make", "vcurs" );
-                curs -> state = vcConstruct;
-                curs -> permit_add_column = true;
-                curs -> suspend_triggers  = false;
-                * cursp = curs;
-                return 0;
-            }
-
-            VSchemaRelease ( curs -> schema );
-        }
-
-        free ( curs );
-    }
-
-    * cursp = NULL;
-
-    return rc;
-}
-
-/* SupplementSchema
- *  scan table for physical column names
- *  create transparent yet incomplete (untyped) columns for unknown names
- *  create incomplete (untyped) physical columns for forwarded names
- *  repeat process on static columns, except create complete (fully typed) objects
- */
-static
-rc_t VCursorSupplementName ( const KSymTable *tbl,
-    STable *stbl, const VTypedecl *td, const char *name )
-{
-    rc_t rc = 0;
-    char buffer [ 256 ];
-
-    /* create physical name string */
-    int len = snprintf ( buffer, sizeof buffer, ".%s", name );
-    if ( len < 0 || len >= sizeof buffer )
-        rc = RC ( rcVDB, rcCursor, rcConstructing, rcName, rcExcessive );
-    else
-    {
-        KSymbol *sym;
-
-        String pname, cname;
-        StringInit ( & pname, buffer, len, string_len ( buffer, len ) );
-
-        /* if physical name is known */
-        sym = KSymTableFind ( tbl, & pname );
-        if ( sym != NULL )
-        {
-            /* if it is being implemented here */
-            if ( sym -> type == eVirtual )
-                rc = STableImplicitPhysMember ( stbl, td, sym, & pname );
-            return rc;
-        }
-
-        /* if simple name is unknown, add implicit */
-        sym = KSymTableFind ( tbl, StringSubstr ( & pname, & cname, 1, 0 ) );
-        if ( sym == NULL )
-        {
-            /* create implicit physical */
-            rc = STableImplicitPhysMember ( stbl, td, sym, & pname );
-            if ( rc == 0 )
-                rc = STableImplicitColMember ( stbl, & cname, & pname );
-        }
-    }
-    return rc;
-}
-
-static
-rc_t VCursorSupplementPhysical ( const KSymTable *tbl, const VCursor *self )
-{
-    KNamelist *names;
-    rc_t rc = KTableListCol ( self -> tbl -> ktbl, & names );
-    if ( rc == 0 )
-    {
-        uint32_t i, count;
-        rc = KNamelistCount ( names, & count );
-        for ( i = 0; rc == 0 && i < count; ++ i )
-        {
-            const char *name;
-            rc = KNamelistGet ( names, i, & name );
-            if ( rc == 0 )
-                rc = VCursorSupplementName ( tbl, self -> stbl, NULL, name );
-        }
-        KNamelistRelease ( names );
-    }
-    return rc;
-}
-
-static
-rc_t VCursorSupplementStatic ( const KSymTable *tbl, const VCursor *self )
-{
-    rc_t rc;
-    KNamelist *names;
-
-    const KMDataNode *root = self -> tbl -> col_node;
-    if ( root == NULL )
-        return 0;
-
-    rc = KMDataNodeListChild ( root, & names );
-    if ( rc == 0 )
-    {
-        uint32_t i, count;
-        rc = KNamelistCount ( names, & count );
-        for ( i = 0; rc == 0 && i < count; ++ i )
-        {
-            const char *name;
-            rc = KNamelistGet ( names, i, & name );
-            if ( rc == 0 )
-            {
-                const KMDataNode *node;
-                rc = KMDataNodeOpenNodeRead ( root, & node, "%s", name );
-                if ( rc == 0 )
-                {
-                    size_t size;
-                    char typedecl [ 256 ];
-                    rc = KMDataNodeReadAttr ( node, "type", typedecl, sizeof typedecl, & size );
-                    if ( rc == 0 && size != 0 )
-                    {
-                        VTypedecl td;
-                        rc = VSchemaResolveTypedecl ( self -> schema, & td, "%s", typedecl );
-                        if ( rc == 0 )
-                            rc = VCursorSupplementName ( tbl, self -> stbl, & td, name );
-
-                        rc = 0; /*** don't care if name is not in the schema ***/
-		
-                    }
-
-                    KMDataNodeRelease ( node );
-                }
-            }
-        }
-
-        KNamelistRelease ( names );
-    }
-
-    return rc;
-}
-
-rc_t VCursorSupplementSchema ( const VCursor *self )
-{
-    KSymTable tbl;
-    rc_t rc = init_tbl_symtab ( & tbl, self -> schema, self -> stbl );
-    if ( rc == 0 )
-    {
-        rc = VCursorSupplementPhysical ( & tbl, self );
-        if ( rc == 0 )
-            rc = VCursorSupplementStatic ( & tbl, self );
-        KSymTableWhack ( & tbl );
-    }
-    return rc;
-}
-
-
-/* CreateCachedCursorRead
- *  creates a read cursor object onto table with a cache limit in bytes
- *
- *  AVAILABILITY: version 2.1
- *
- *  "curs" [ OUT ] - return parameter for newly created cursor
- *
- *  "capacity" [ IN ] - the maximum bytes to cache on the cursor before
- *  dropping least recently used blobs
- */
-static rc_t VTableCreateCachedCursorReadImpl ( const VTable *self,
-    const VCursor **cursp, size_t capacity, bool create_pagemap_thread  )
-{
-    rc_t rc;
-#if DISABLE_READ_CACHE
-    capacity = 0;
-#endif
-    if ( cursp == NULL )
-        rc = RC ( rcVDB, rcTable, rcOpening, rcParam, rcNull );
-    else {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcOpening, rcSelf, rcNull );
-        else {
-            VCursor *curs;
-#if LAZY_OPEN_COL_NODE
-            if ( self -> col_node == NULL )
-                KMetadataOpenNodeRead ( self -> meta, & ( ( VTable* ) self ) -> col_node, "col" );
-#endif
-            rc = VCursorMake ( & curs, self );
-            if ( rc == 0 ) {
-                curs -> blob_mru_cache = VBlobMRUCacheMake(capacity);
-                curs -> read_only = true;
-                rc = VCursorSupplementSchema ( curs );
-               
-#if 0  
-                if ( create_pagemap_thread && capacity > 0 && rc == 0 )
-                {
-                    rc = VCursorLaunchPagemapThread ( curs );
-                    if ( rc != 0 )
-                    {
-                        if ( GetRCState( rc ) == rcNotAvailable )
-                            rc = 0;
-                    }
-                }   
-#endif
-                if ( rc == 0 )
-                {
-                    if(capacity > 0)
-                        curs->launch_cnt = 5;
-                    else
-                        curs->launch_cnt=200;
-                    * cursp = curs;
-                    if(rc==0 && self->cache_tbl){
-			rc_t rc2;
-			const VCursor * cache_curs;
-			rc2 = VTableCreateCachedCursorReadImpl(self->cache_tbl,&cache_curs,64*1024*1024,create_pagemap_thread);
-			DBGMSG(DBG_VDB, DBG_FLAG(DBG_VDB_VDB), ("VTableCreateCachedCursorReadImpl(vdbcache) = %d\n", rc2));
-			if(rc2 == 0){
-				((VCursor*) (*cursp)) -> cache_curs = cache_curs;
-			}
-		    }
-                    return 0;
-                }
-                VCursorRelease ( curs );
-            }
-        }
-        * cursp = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableCreateCachedCursorRead ( const VTable *self,
-    const VCursor **cursp, size_t capacity )
-{
-	return VTableCreateCachedCursorReadImpl(self,cursp,capacity,true);
-}
-
-/**
-*** VTableCreateCursorReadInternal is only visible in vdb and needed for schema resolutions
-****/
-rc_t  VTableCreateCursorReadInternal(const VTable *self, const VCursor **cursp)
-{
-	return VTableCreateCachedCursorReadImpl(self,cursp,0,false);
-}
-
-/* CreateCursor
- *  creates a cursor object onto table
- *  multiple read cursors are allowed
- *  only a single write cursor is allowed
- *
- *  "curs" [ OUT ] - return parameter for newly created cursor
- */
-LIB_EXPORT rc_t CC VTableCreateCursorRead ( const VTable *self, const VCursor **curs )
-{
-    /* will be deprecated in the future */
-    return VTableCreateCachedCursorRead ( self, curs, 0 );
-}
-
-/* PermitPostOpenAdd
- *  allows columns to be added to open cursor
- *  for write cursor, the effect lasts until the first row commit
- */
-LIB_EXPORT rc_t CC VCursorPermitPostOpenAdd ( const VCursor *cself )
-{
-    rc_t rc;
-    VCursor *self = ( VCursor* ) cself;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcCursor, rcUpdating, rcSelf, rcNull );
-    else if ( self -> state == vcFailed )
-        rc = RC ( rcVDB, rcCursor, rcUpdating, rcCursor, rcInvalid );
-    else if ( self -> state != vcConstruct )
-        rc = RC ( rcVDB, rcCursor, rcUpdating, rcCursor, rcOpen );
-    else
-    {
-        self -> permit_post_open_add = true;
-        rc = 0;
-    }
-    if(self->cache_curs){
-	VCursorPermitPostOpenAdd(self->cache_curs);
-    }
-
-    return rc;
-}
-/*  SuspendTriggers
- *  blocks resolution of schema-based triggers
- *  
- */
-LIB_EXPORT rc_t CC VCursorSuspendTriggers ( const VCursor *cself )
-{
-    rc_t rc;
-    VCursor *self = ( VCursor* ) cself;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcCursor, rcUpdating, rcSelf, rcNull );
-    else
-    {
-        self -> suspend_triggers = true;
-        rc = 0;
-    }
-
-    return rc;
-}
-
-
-/* AddSColumn
- */
-static
-rc_t VCursorAddSColumn ( VCursor *self, uint32_t *idx,
-    const SColumn *scol, const VTypedecl *cast, Vector *cx_bind )
-{
-    rc_t rc;
-    VColumn *col;
-
-    if ( self -> read_only )
-    {
-        /* must be readable */
-        if ( scol -> read == NULL )
-            return RC ( rcVDB, rcCursor, rcUpdating, rcColumn, rcWriteonly );
-    }
-    else
-    {
-        /* must be writable */
-        if ( scol -> read_only || ( scol -> read == NULL && scol -> validate == NULL ) )
-            return RC ( rcVDB, rcCursor, rcUpdating, rcColumn, rcReadonly );
-    }
-
-    /* must not already be there - benign error */
-    col = VCursorCacheGet ( & self -> col, & scol -> cid );
-    if ( col != NULL )
-    {
-        * idx = col -> ord;
-        return RC ( rcVDB, rcCursor, rcUpdating, rcColumn, rcExists );
-    }
-
-    /* make object */
-    rc = VCursorMakeColumn ( self, & col, scol, cx_bind );
-    if ( rc == 0 )
-    {
-        /* insert it into vectors */
-        rc = VectorAppend ( & self -> row, & col -> ord, col );
-        if ( rc == 0 )
-        {
-            void *ignore;
-            rc = VCursorCacheSet ( & self -> col, & scol -> cid, col );
-            if ( rc == 0 )
-            {
-                /* open column if cursor open or type unknown */
-                if ( self -> state >= vcReady || scol -> td . type_id == 0 )
-                {
-                    rc = VCursorPostOpenAdd ( self, col );
-                    assert ( rc != 0 || scol -> td . type_id != 0 );
-                }
-                if ( rc == 0 )
-                {
-                    /* check cast of SColumn against requested type
-                       this is to handle the case where the column
-                       was created incomplete, i.e. with unknown type */
-                    if ( cast == NULL || VTypedeclToTypedecl ( & scol -> td,
-                             self -> schema, cast, & col -> td, NULL ) )
-                    {
-                        /* has been entered */
-                        * idx = col -> ord;
-                        return 0;
-                    }
-                }
-
-                /* bail out */
-                VCursorCacheSwap ( & self -> col, & scol -> cid, NULL, & ignore );
-            }
-
-            VectorSwap ( & self -> row, col -> ord, NULL, & ignore );
-        }
-
-        VColumnWhack ( col, NULL );
-    }
-
-    return rc;
-}
-
-
-/* AddColspec
- *  a "colspec" is either a simple column name or a typed name expression
- *  uses STable to evaluate colspec and find an SColumn
- */
-static
-rc_t VCursorAddColspec ( VCursor *self, uint32_t *idx, const char *colspec )
-{
-    rc_t rc;
-
-    /* find an appropriate column in schema */
-    uint32_t type;
-    VTypedecl cast;
-    const SNameOverload *name;
-    const SColumn *scol = STableFind ( self -> tbl -> stbl, self -> schema,
-        & cast, & name, & type, colspec, "VCursorAddColspec", true );
-    if ( scol == NULL || type != eColumn )
-        rc = SILENT_RC ( rcVDB, rcCursor, rcUpdating, rcColumn, rcNotFound );
-    else
-    {
-        Vector cx_bind;
-        VectorInit ( & cx_bind, 1, self -> schema -> num_indirect );
-        rc = VCursorAddSColumn ( self, idx, scol, & cast, & cx_bind );
-        VectorWhack ( & cx_bind, NULL, NULL );
-	if(rc == 0){
-		char ccolspec[1024];
-		size_t n;
-		rc_t rc2=string_printf(ccolspec,sizeof(ccolspec),&n,"%s_CACHE",colspec);
-
-		VectorSet(&self->v_cache_curs,*idx,NULL);
-		VectorSet(&self->v_cache_cidx,*idx,(const void*)0);
-		if(rc2==0){
-			uint32_t cidx;
-			rc2=VCursorAddColumn(self,&cidx,ccolspec); /** see if column exists in the same table **/
-			DBGMSG(DBG_VDB, DBG_FLAG(DBG_VDB_VDB), ("VCursorAddColspec(%s,vdbcache,sametable) = %d\n", ccolspec,rc2));
-			if(rc2==0 || GetRCState ( rc2 ) == rcExists ){
-				VectorSet(&self->v_cache_curs,*idx,self);
-				VectorSet(&self->v_cache_cidx,*idx,(const void*)(uint64_t)cidx);
-			} else if(self->cache_curs){
-				rc2=VCursorAddColumn(self->cache_curs,&cidx,ccolspec); /** see if column exists in external table **/
-			        DBGMSG(DBG_VDB, DBG_FLAG(DBG_VDB_VDB), ("VCursorAddColspec(%s,vdbcache,remotetable) = %d\n", ccolspec,rc2));
-				if(rc2==0 || GetRCState ( rc2 ) == rcExists ){
-					VectorSet(&self->v_cache_curs,*idx,self->cache_curs);
-					VectorSet(&self->v_cache_cidx,*idx,(const void*)(uint64_t)cidx);
-				}
-			}
-		}
-	}
-    }
-
-    return rc;
-}
-
-
-/* AddColumn
- *  add a column to an unopened cursor
- *
- *  "idx" [ OUT ] - return parameter for column index
- *
- *  "name" [ IN ] - NUL terminated column name spec.
- *  to identify a column by name, provide the column name
- *  by itself. if there are multiple types available under
- *  that name, the default type for that column will be
- *  selected. to select a specific type, the name may
- *  be cast to that type using a cast expression, e.g.
- *    "( type ) name"
- *  the special name "*" may be added to a read cursor.
- */
-LIB_EXPORT rc_t CC VCursorVAddColumn ( const VCursor *cself,
-    uint32_t *idx, const char *name, va_list args )
-{
-    rc_t rc;
-    VCursor *self = ( VCursor* ) cself;
-
-    if ( idx == NULL )
-        rc = RC ( rcVDB, rcCursor, rcUpdating, rcParam, rcNull );
-    else
-    {
-        * idx = 0;
-
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcUpdating, rcSelf, rcNull );
-        else if ( name == NULL )
-            rc = RC ( rcVDB, rcCursor, rcUpdating, rcName, rcNull );
-        else if ( name [ 0 ] == 0 )
-            rc = RC ( rcVDB, rcCursor, rcUpdating, rcName, rcEmpty );
-        else if ( self -> state == vcFailed )
-            rc = RC ( rcVDB, rcCursor, rcUpdating, rcCursor, rcInvalid );
-        else if ( self -> state != vcConstruct && ! self -> permit_add_column )
-            rc = RC ( rcVDB, rcCursor, rcUpdating, rcCursor, rcLocked );
-        else
-        {
-            char colspec [ 1024 ];
-            int len = vsnprintf ( colspec, sizeof colspec, name, args );
-            if ( len < 0 || len >= sizeof colspec )
-                rc = RC ( rcVDB, rcCursor, rcUpdating, rcName, rcExcessive );
-            else
-            {
-                rc = VCursorAddColspec ( self, idx, colspec );
-                if ( rc == 0 || GetRCState ( rc ) == rcExists )
-                    return rc;
-            }
-
-            if ( ! self -> permit_add_column )
-            {
-                PLOGERR ( klogErr, ( klogErr, rc, "failed to add column '$(spec)' to cursor",
-                                     "spec=%s", colspec ));
-            }
-
-            return rc;
-        }
-    }
-
-    LOGERR ( klogErr, rc, "failed to add column" );
-
-    return rc;
-}
-
-
-/* AddColumn
- *  add a column to an unopened cursor
- *
- *  "idx" [ OUT ] - return parameter for column index
- *
- *  "name" [ IN ] - NUL terminated column name spec.
- *  to identify a column by name, provide the column name
- *  by itself. if there are multiple types available under
- *  that name, the default type for that column will be
- *  selected. to select a specific type, the name may
- *  be cast to that type using a cast expression, e.g.
- *    "( type ) name"
- *  the special name "*" may be added to a read cursor.
- */
-LIB_EXPORT rc_t CC VCursorAddColumn ( const VCursor *self,
-    uint32_t *idx, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VCursorVAddColumn ( self, idx, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* GetColspec
- *  a "colspec" is either a simple column name or a typed name expression
- *  uses STable to evaluate colspec and find an SColumn
- */
-static
-rc_t VCursorGetColspec ( const VCursor *self, uint32_t *idx, const char *colspec )
-{
-    rc_t rc;
-
-    /* find an appropriate column in schema */
-    uint32_t type;
-    VTypedecl cast;
-    const SNameOverload *name;
-    const SColumn *scol = STableFind ( self -> tbl -> stbl, self -> schema,
-        & cast, & name, & type, colspec, "VCursorGetColspec", true );
-    if ( scol == NULL || type != eColumn )
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcColumn, rcNotFound );
-    else
-    {
-        /* if the column-spec gave us the exact column, return it */
-        VColumn *col = VCursorCacheGet ( & self -> col, & scol -> cid );
-        if ( col != NULL )
-        {
-            * idx = col -> ord;
-            return 0;
-        }
-
-        /* prepare for failure */
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcColumn, rcNotFound );
-
-        /* there should be a name overload object */
-        if ( name != NULL )
-        {
-            uint32_t count, i = VectorStart ( & name -> items );
-            uint32_t end = VectorLength ( & name -> items );
-            for ( end += i, count = 0; i < end; ++ i )
-            {
-                scol = ( const void* ) VectorGet ( & name -> items, i );
-                if ( scol != NULL )
-                {
-                    col = VCursorCacheGet ( & self -> col, & scol -> cid );
-                    if ( col != NULL )
-                    {
-                        * idx = col -> ord;
-                        ++ count;
-                    }
-                }
-            }
-
-            if ( count == 1 )
-                return 0;
-            if ( count != 0 )
-                return RC ( rcVDB, rcCursor, rcAccessing, rcColumn, rcAmbiguous );
-        }
-    }
-
-    return rc;
-}
-
-
-/* GetColumnIdx
- *  retrieve column index by name spec
- *
- *  "idx" [ OUT ] - return parameter for column index
- *
- *  "name" [ IN ] - NUL terminated column name spec.
- */
-LIB_EXPORT rc_t CC VCursorVGetColumnIdx ( const VCursor *self,
-    uint32_t *idx, const char *name, va_list args )
-{
-    rc_t rc;
-
-    if ( idx == NULL )
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcParam, rcNull );
-    else
-    {
-        * idx = 0;
-
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcSelf, rcNull );
-        else if ( name == NULL )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcName, rcNull );
-        else if ( name [ 0 ] == 0 )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcName, rcEmpty );
-        else if ( self -> state == vcFailed )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcCursor, rcInvalid );
-        else
-        {
-            char colspec [ 1024 ];
-            int len = vsnprintf ( colspec, sizeof colspec, name, args );
-            if ( len < 0 || len >= sizeof colspec )
-                rc = RC ( rcVDB, rcCursor, rcAccessing, rcName, rcExcessive );
-            else
-            {
-                rc = VCursorGetColspec ( self, idx, colspec );
-            }
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VCursorGetColumnIdx ( const VCursor *self, uint32_t *idx, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VCursorVGetColumnIdx ( self, idx, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* Datatype
- *  returns typedecl and/or typedef for column data
- *
- *  "idx" [ IN ] - column index
- *
- *  "type" [ OUT, NULL OKAY ] - returns the column type declaration
- *
- *  "def" [ OUT, NULL OKAY ] - returns the definition of the type
- *  returned in "type_decl"
- *
- * NB - one of "type" and "def" must be non-NULL
- */
-LIB_EXPORT rc_t CC VCursorDatatype ( const VCursor *self, uint32_t idx,
-    struct VTypedecl *type, struct VTypedesc *desc )
-{
-    rc_t rc;
-
-    if ( type == NULL && desc == NULL )
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            const VColumn *vcol = ( const VColumn* ) VectorGet ( & self -> row, idx );
-            if ( vcol == NULL )
-                rc = RC ( rcVDB, rcCursor, rcAccessing, rcColumn, rcNotFound );
-            else
-                return VColumnDatatype ( vcol, type, desc );
-        }
-
-        if ( type != NULL )
-            memset ( type, 0, sizeof * type );
-        if ( desc != NULL )
-            memset ( desc, 0, sizeof * desc );
-    }
-
-    return rc;
-}
-
-
-/* IdRange
- *  returns id range for column
- *
- *  "idx" [ IN ] - column index
- *
- *  "id" [ IN ] - page containing this row id is target
- *
- *  "first" [ OUT, NULL OKAY ] and "last" [ OUT, NULL OKAY ] -
- *  id range is returned in these output parameters, where
- *  at least ONE must be NOT-NULL
- */
-typedef struct VCursorIdRangeData VCursorIdRangeData;
-struct VCursorIdRangeData
-{
-    int64_t first, last;
-    rc_t rc;
-};
-
-static
-bool CC column_id_range ( void *item, void *data )
-{
-    if ( ( size_t ) item > 8 )
-    {
-        int64_t first, last;
-        VCursorIdRangeData *pb = data;
-
-        rc_t rc = VColumnIdRange ( ( const void* ) item, & first, & last );
-
-        if ( GetRCState ( rc ) == rcEmpty )
-            return false;
-
-        if ( ( pb -> rc = rc ) != 0 )
-            return true;
-
-        if ( first < pb -> first )
-            pb -> first = first;
-        if ( last > pb -> last )
-            pb -> last = last;
-    }
-
-    return false;
-}
-
-LIB_EXPORT rc_t CC VCursorIdRange ( const VCursor *self, uint32_t idx,
-    int64_t *first, uint64_t *count )
-{
-    rc_t rc;
-
-    if ( first == NULL && count == NULL )
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcParam, rcNull );
-    else
-    {
-        int64_t dummy;
-        uint64_t dummy_count;
-
-        if ( first == NULL )
-            first = & dummy;
-        else if ( count == NULL )
-            count = & dummy_count;
-
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcSelf, rcNull );
-        else if ( self -> state < vcReady )
-        {
-            if ( self -> state == vcFailed )
-                rc = RC ( rcVDB, rcCursor, rcAccessing, rcCursor, rcInvalid );
-            else
-                rc = RC ( rcVDB, rcCursor, rcAccessing, rcCursor, rcNotOpen );
-        }
-        else if ( idx == 0 )
-        {
-            VCursorIdRangeData pb;
-
-            pb . first = INT64_MAX;
-            pb . last = INT64_MIN;
-            pb . rc = SILENT_RC ( rcVDB, rcCursor, rcAccessing, rcRange, rcEmpty );
-
-            if ( ! VectorDoUntil ( & self -> row, false, column_id_range, & pb ) )
-            {
-                * first = pb . first;
-                * count = pb . last >= pb . first ? pb . last + 1 - pb . first : 0;
-                return pb . rc;
-            }
-
-            rc = pb . rc;
-        }
-        else
-        {
-            const VColumn *vcol = ( const VColumn* ) VectorGet ( & self -> row, idx );
-            if ( vcol == NULL )
-                rc = RC ( rcVDB, rcCursor, rcAccessing, rcColumn, rcNotFound );
-            else {
-                int64_t last;
-
-                rc = VColumnIdRange ( vcol, first, &last );
-                if (rc == 0)
-                    *count = last + 1 - *first;
-                return rc;
-            }
-        }
-
-        * first = * count = 0;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VCursorPageIdRange ( struct VCursor const *self,
-    uint32_t idx, int64_t id, int64_t *first, int64_t *last )
-{
-    rc_t rc;
-
-    if ( first == NULL && last == NULL )
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcParam, rcNull );
-    else
-    {
-        int64_t dummy;
-        if ( first == NULL )
-            first = & dummy;
-        else if ( last == NULL )
-            last = & dummy;
-
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            const VColumn *vcol = ( const VColumn* ) VectorGet ( & self -> row, idx );
-            if ( vcol == NULL )
-                rc = RC ( rcVDB, rcCursor, rcAccessing, rcColumn, rcNotFound );
-            else
-                return VColumnPageIdRange ( vcol, id, first, last );
-        }
-
-        * first = * last = 0;
-    }
-
-    return rc;
-}
-
-
-/* Open
- *  open cursor, resolving schema
- *  for the set of opened columns
- *
- *  NB - there is no corresponding "Close"
- *  use "Release" instead.
- */
-typedef struct VProdResolveData VProdResolveData;
-struct VProdResolveData
-{
-    VProdResolve pr;
-    rc_t rc;
-};
-
-
-static
-bool CC VCursorResolveColumn ( void *item, void *data )
-{
-    if ( item != NULL )
-    {
-        void *ignore;
-        VCursor *self;
-
-        VColumn *col = item;
-        VProdResolveData *pb = data;
-        SColumn *scol = ( SColumn* ) col -> scol;
-
-        VProduction *src = NULL;
-        pb -> rc = VProdResolveColumnRoot ( & pb -> pr, & src, scol );
-        if ( pb -> rc == 0 )
-        {
-            if ( src > FAILED_PRODUCTION )
-            {
-                /* repair for incomplete implicit column decl */
-                if ( scol -> td . type_id == 0 )
-                    scol -> td = src -> fd . td;
-
-                return false;
-            }
-
-            pb -> rc = RC ( rcVDB, rcCursor, rcOpening, rcColumn, rcUndefined );
-        }
-
-        /* check for tolerance */
-        self = pb -> pr . curs;
-        if ( ! pb -> pr . ignore_column_errors )
-        {
-            if ( ! self -> permit_post_open_add )
-            {
-                PLOGERR ( klogErr, ( klogErr, pb -> rc, "failed to resolve column '$(name)' idx '$(idx)'",
-                                     "name=%.*s,idx=%u"
-                                     , ( int ) scol -> name -> name . size
-                                     , scol -> name -> name . addr
-                                     , col -> ord ));
-            }
-
-            return true;
-        }
-
-        /* remove from row and cache */
-        VectorSwap ( & self -> row, col -> ord, NULL, & ignore );
-        VCursorCacheSwap ( & self -> col, & scol -> cid, NULL, & ignore );
-
-        /* dump the VColumn */
-        VColumnWhack ( col, NULL );
-
-        /* return no-error */
-        pb -> rc = 0;
-    }
-
-    return false;
-}
-
-static
-rc_t VCursorOpenColumn ( const VCursor *cself, VColumn *col )
-{
-    KDlset *libs;
-    VCursor *self = ( VCursor* ) cself;
-
-    Vector cx_bind;
-    VProdResolveData pb;
-    pb . pr . schema = self -> schema;
-    pb . pr . ld = self -> tbl -> linker;
-    pb . pr . stbl = self -> stbl;
-    pb . pr . curs = self;
-    pb . pr . cache = & self -> prod;
-    pb . pr . owned = & self -> owned;
-    pb . pr . cx_bind = & cx_bind;
-    pb . pr . chain = chainDecoding;
-    pb . pr . blobbing = false;
-    pb . pr . ignore_column_errors = false;
-    pb . pr . discover_writable_columns = false;
-
-    VectorInit ( & cx_bind, 1, self -> schema -> num_indirect );
-
-    pb . rc = VLinkerOpen ( pb . pr . ld, & libs );
-    if ( pb . rc == 0 )
-    {
-        pb . pr . libs = libs;
-        VCursorResolveColumn ( col, & pb );
-        KDlsetRelease ( libs );
-    }
-
-    VectorWhack ( & cx_bind, NULL, NULL );
-
-    return pb . rc;
-}
-
-/* PostOpenAdd
- *  handle opening of a column after the cursor is opened
- */
-rc_t VCursorPostOpenAddRead ( VCursor *self, VColumn *col )
-{
-    return VCursorOpenColumn ( self, col );
-}
-
-
-static
-rc_t VCursorResolveColumnProductions ( VCursor *self,
-    const KDlset *libs, bool ignore_failures )
-{
-    Vector cx_bind;
-    VProdResolveData pb;
-    pb . pr . schema = self -> schema;
-    pb . pr . ld = self -> tbl -> linker;
-    pb . pr . libs = libs;
-    pb . pr . stbl = self -> stbl;
-    pb . pr . curs = self;
-    pb . pr . cache = & self -> prod;
-    pb . pr . owned = & self -> owned;
-    pb . pr . cx_bind = & cx_bind;
-    pb . pr . chain = chainDecoding;
-    pb . pr . blobbing = false;
-    pb . pr . ignore_column_errors = ignore_failures;
-    pb . pr . discover_writable_columns = false;
-    pb . rc = 0;
-
-    VectorInit ( & cx_bind, 1, self -> schema -> num_indirect );
-
-    if ( ! VectorDoUntil ( & self -> row, false, VCursorResolveColumn, & pb ) )
-        pb . rc = 0;
-
-    VectorWhack ( & cx_bind, NULL, NULL );
-
-    return pb . rc;
-}
-
-rc_t VCursorOpenRead ( VCursor *self, const KDlset *libs )
-{
-    rc_t rc;
-
-    if ( self -> state >= vcReady )
-        rc = 0;
-    else if ( self -> state == vcFailed )
-        rc = RC ( rcVDB, rcCursor, rcOpening, rcCursor, rcInvalid );
-    else
-    {
-        rc = VCursorResolveColumnProductions ( self, libs, false );
-        if ( rc == 0 )
-        {
-            self -> row_id = self -> start_id = self -> end_id = 1;
-            self -> state = vcReady;
-            if( self -> cache_curs )
-            {
-                VCursorOpenRead( (VCursor*)self -> cache_curs, libs );
-            }
-            return rc;
-        }
-        else
-        {
-            /* in case the column is not defined ( rcColumn, rcUndefined )
-                we want to check if the table is empty, and report that instead
-            */
-            if ( GetRCState( rc ) == rcUndefined && 
-                 GetRCObject( rc ) == ( enum RCObject )rcColumn )
-            {
-                bool empty;
-                if ( ( VTableIsEmpty ( self -> tbl, &empty ) == 0 ) && empty )
-                {
-                    rc = RC ( rcVDB, rcCursor, rcOpening, rcTable, rcEmpty );        
-                }
-            }
-        }
-        self -> state = vcFailed;
-    }
-
-    return rc;
-}
-
-static
-rc_t VCursorOpenForListing ( const VCursor *cself )
-{
-    rc_t rc;
-    VCursor *self = ( VCursor* ) cself;
-
-    VLinker *ld = self -> tbl -> linker;
-
-    KDlset *libs;
-    rc = VLinkerOpen ( ld, & libs );
-    if ( rc == 0 )
-    {
-        rc = VCursorResolveColumnProductions ( self, libs, true );
-        KDlsetRelease ( libs );
-    }
-    return rc;
-}
-
-
-
-/* RowId
- *  return id from row cursor within open blob
- *
- *  "id" [ OUT ] - current row id
- */
-LIB_EXPORT rc_t CC VCursorRowId ( const VCursor *self, int64_t *id )
-{
-    rc_t rc;
-    if ( id == NULL )
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * id = self -> row_id;
-            return 0;
-        }
-
-        * id = 0;
-    }
-
-    return rc;
-}
-
-
-/* SetRowIdRead - PRIVATE
- *  seek to given row id
- *
- *  "row_id" [ IN ] - row id to select
- */
-rc_t VCursorSetRowIdRead ( VCursor *self, int64_t row_id )
-{
-    assert ( self != NULL );
-
-    self -> row_id = row_id;
-    return 0;
-}
-
-
-/* OpenRowRead
- * CloseRowRead
- */
-rc_t VCursorOpenRowRead ( VCursor *self )
-{
-    assert ( self != NULL );
-
-    self -> state = vcRowOpen;
-    return 0;
-}
-
-rc_t VCursorCloseRowRead ( VCursor *self )
-{
-    assert ( self != NULL );
-
-    ++ self -> row_id;
-    self -> state = vcReady;
-    return 0;
-}
-
-
-/* Read
- *  read entire single row of byte-aligned data into a buffer
- *
- *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
- *
- *  "elem_bits" [ IN ] - expected element size in bits, required
- *  to be compatible with the actual element size, and be a multiple
- *  of 8 ( byte-aligned ). for non-byte-aligned data, see ReadBits
- *
- *  "buffer" [ OUT ] and "blen" [ IN ] - return buffer for row data
- *  where "blen" gives buffer capacity in elements. the total buffer
- *  size in bytes == ( "elem_bits" * "blen" + 7 ) / 8.
- *
- *  "row_len" [ OUT ] - return parameter for the number of elements
- *  in the requested row.
- *
- *  when the return code is 0, "row_len" will contain the number of
- *  elements read into buffer. if the return code indicates that the
- *  buffer is too small, "row_len" will give the required buffer length.
- */
-static
-rc_t VCursorReadColumnDirectInt ( const VCursor *cself, int64_t row_id, uint32_t col_idx,
-    uint32_t *elem_bits, const void **base, uint32_t *boff, uint32_t *row_len, uint32_t *repeat_count,
-    const VBlob **rslt )
-{
-    rc_t rc,rc_cache=0;
-    const VColumn *col;
-    const VBlob *blob;
-
-    col = ( const void* ) VectorGet ( & cself -> row, col_idx );
-    if ( col == NULL )
-        return RC ( rcVDB, rcCursor, rcReading, rcColumn, rcInvalid );
-
-    /* 2.0 behavior if not caching */
-    if ( cself -> blob_mru_cache == NULL )
-        return VColumnRead ( col, row_id, elem_bits, base, boff, row_len, (VBlob**) rslt );
-
-    /* check MRU blob */
-    blob = VBlobMRUCacheFind(cself->blob_mru_cache,col_idx,row_id);
-    if(blob){
-        assert(row_id >= blob->start_id && row_id <= blob->stop_id);
-        /* if the caller wants the blob back... */
-        if ( rslt != NULL )
-                * rslt = blob;
-        /* ask column to read from blob */
-        return VColumnReadCachedBlob ( col, blob, row_id, elem_bits, base, boff, row_len, repeat_count);
-    }
-    { /* ask column to produce a blob to be cached */
-	VBlobMRUCacheCursorContext cctx;
-	cctx.cache=cself -> blob_mru_cache;
-	cctx.col_idx = col_idx;
-	rc = VColumnReadBlob(col,&blob,row_id,elem_bits,base,boff,row_len,repeat_count,&cctx);
-    }
-    if ( rc != 0 || blob == NULL ){
-        if(rslt) *rslt = NULL;
-        return rc;
-    }
-    if(blob->stop_id > blob->start_id + 4)
-	    rc_cache=VBlobMRUCacheSave(cself->blob_mru_cache, col_idx, blob);
-    if(rslt==NULL){ /** user does not care about the blob ***/
-        if( rc_cache == 0){
-            VBlobRelease((VBlob*)blob);
-        } /** else the memory will leak **/
-    } else {
-        *rslt=blob;
-    }
-    return 0;
-}
-
-/* GetBlob
- *  retrieve a blob of data containing the current row id
- * GetBlobDirect
- *  retrieve a blob of data containing the requested row id
- *
- *  "blob" [ OUT ] - return parameter for a new reference
- *  to VBlob containing requested cell. NB - must be released
- *  via VBlobRelease when no longer needed.
- *
- *  "row_id" [ IN ] - allows ReadDirect random access to any cell
- *  in column
- *
- *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
- */
-LIB_EXPORT rc_t CC VCursorGetBlob ( const VCursor *self,
-    const VBlob **blob, uint32_t col_idx )
-{
-    rc_t rc;
-
-    if ( blob == NULL )
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcSelf, rcNull );
-        else if ( ! self -> read_only )
-            rc = RC ( rcVDB, rcCursor, rcReading, rcCursor, rcWriteonly );
-        else
-        {
-            const void *base;
-            uint32_t elem_bits, boff, row_len;
-
-            switch ( self -> state )
-            {
-            case vcConstruct:
-                rc = RC ( rcVDB, rcCursor, rcReading, rcCursor, rcNotOpen );
-                break;
-            case vcReady:
-                rc = RC ( rcVDB, rcCursor, rcReading, rcRow, rcNotOpen );
-                break;
-            case vcRowOpen:
-                rc = VCursorReadColumnDirectInt( self, self -> row_id, col_idx, &elem_bits, &base, &boff, &row_len, NULL, blob );
-                if ( rc == 0 )
-                {
-                    rc = VBlobAddRef ( ( VBlob* ) *blob );
-                    if ( rc == 0 )
-                        return 0;
-                }
-                break;
-            default:
-                rc = RC ( rcVDB, rcCursor, rcReading, rcCursor, rcInvalid );
-            }
-        }
-
-        * blob = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VCursorGetBlobDirect ( const VCursor *self,
-    const VBlob **blob, int64_t row_id, uint32_t col_idx )
-{
-    rc_t rc;
-
-    if ( blob == NULL )
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcSelf, rcNull );
-        else if ( ! self -> read_only )
-            rc = RC ( rcVDB, rcCursor, rcReading, rcCursor, rcWriteonly );
-        else
-        {
-            const void *base;
-            uint32_t elem_bits, boff, row_len;
-
-            switch ( self -> state )
-            {
-            case vcConstruct:
-                rc = RC ( rcVDB, rcCursor, rcReading, rcCursor, rcNotOpen );
-                break;
-            case vcReady:
-            case vcRowOpen:
-                rc = VCursorReadColumnDirectInt ( self, row_id, col_idx, &elem_bits, &base, &boff, &row_len, NULL, blob );
-                if ( rc == 0 )
-                {
-                    rc = VBlobAddRef ( ( VBlob* ) *blob );
-                    if ( rc == 0 )
-                        return 0;
-                }
-                break;
-            default:
-                rc = RC ( rcVDB, rcCursor, rcReading, rcCursor, rcInvalid );
-            }
-        }
-
-        * blob = NULL;
-    }
-    return rc;
-}
-
-static
-rc_t VCursorReadColumnDirect ( const VCursor *self, int64_t row_id, uint32_t col_idx,
-    uint32_t *elem_bits, const void **base, uint32_t *boff, uint32_t *row_len )
-{
-    bool cache_col_active_save;
-    if ( ! self -> read_only )
-        return RC ( rcVDB, rcCursor, rcReading, rcCursor, rcWriteonly );
-
-    switch ( self -> state )
-    {
-		case vcConstruct : return RC ( rcVDB, rcCursor, rcReading, rcCursor, rcNotOpen );
-		case vcReady :
-		case vcRowOpen :  break;
-		default : return RC ( rcVDB, rcCursor, rcReading, rcCursor, rcInvalid );
-    }
-	
-    cache_col_active_save = self->cache_col_active;
-    ( ( VCursor* ) self )->cache_col_active = false;
-    if ( self->cache_curs != NULL )
-	{
-		const VCursor *curs = VectorGet( &self->v_cache_curs, col_idx );
-		if ( curs != NULL )
-		{
-			( ( VCursor* ) self )->cache_col_active = true;
-			if ( self->cache_empty_start == 0 ||
-			     row_id < self->cache_empty_start ||
-				 row_id > self->cache_empty_end )
-			{
-				uint32_t repeat_count;
-				uint32_t cidx = ( uint32_t )( uint64_t )VectorGet( &self->v_cache_cidx, col_idx );
-				rc_t rc2 = VCursorReadColumnDirectInt( curs, row_id, cidx, elem_bits, base, boff, row_len, &repeat_count, NULL );
-				if ( rc2 == 0 )
-				{
-					if ( *row_len > 0 )
-					{
-						( ( VCursor* )self )->cache_col_active = cache_col_active_save;
-						return 0;
-					}
-					else
-					{
-						/*** save window where cache is useless */
-						( ( VCursor* )self )->cache_empty_start = row_id;
-						( ( VCursor* )self )->cache_empty_end = row_id + repeat_count - 1;
-					}
-				}
-			}	
-		}
-	}
-	
-    {
-		rc_t rc = VCursorReadColumnDirectInt( self, row_id, col_idx, elem_bits, base, boff, row_len, NULL, NULL );
-		( ( VCursor* )self )->cache_col_active = cache_col_active_save;
-		return rc;
-    }
-}
-
-
-static
-rc_t VCursorReadColumn ( const VCursor *self, uint32_t col_idx,
-    uint32_t *elem_bits, const void **base, uint32_t *boff, uint32_t *row_len )
-{
-    rc_t rc = 0;
-    int64_t row_id = self->row_id;
-    bool cache_col_active_save;
-    if ( ! self -> read_only )
-        return RC ( rcVDB, rcCursor, rcReading, rcCursor, rcWriteonly );
-
-    switch ( self -> state )
-    {
-    case vcConstruct:
-        return RC ( rcVDB, rcCursor, rcReading, rcCursor, rcNotOpen );
-    case vcReady:
-        return RC ( rcVDB, rcCursor, rcReading, rcRow, rcNotOpen );
-    case vcRowOpen:
-        break;
-    default:
-        return RC ( rcVDB, rcCursor, rcReading, rcCursor, rcInvalid );
-    }
-    cache_col_active_save = self->cache_col_active;
-    ((VCursor*)self)->cache_col_active=false;
-    if(self->cache_curs)
-    {
-        const VCursor *curs=VectorGet(&self->v_cache_curs,col_idx);
-        if(curs)
-        {
-            ((VCursor*)self)->cache_col_active=true;
-            if(self->cache_empty_start == 0 ||  row_id < self->cache_empty_start || row_id > self->cache_empty_end)
-            {
-                uint32_t repeat_count;
-                uint32_t cidx =  (uint32_t)(uint64_t)VectorGet(&self->v_cache_cidx,col_idx);
-                rc_t rc2 = VCursorReadColumnDirectInt(curs,row_id, cidx, elem_bits, base, boff, row_len, &repeat_count,NULL );
-                if(rc2==0)
-                {
-                    if(*row_len > 0)
-                    {
-                        ((VCursor*)self)->cache_col_active=cache_col_active_save;
-                        return 0;
-                    }
-                    else
-                    {
-                        /*** save window where cache is useless */
-                        ((VCursor*)self)->cache_empty_start = row_id;
-                        ((VCursor*)self)->cache_empty_end = row_id + repeat_count -1;
-                    }
-                }
-            }
-        }
-    }
-
-    rc=VCursorReadColumnDirectInt ( self, row_id, col_idx, elem_bits, base, boff, row_len, NULL, NULL );
-    ((VCursor*)self)->cache_col_active=cache_col_active_save;
-    return rc;
-}
-
-static __inline__
-bool bad_elem_bits ( uint32_t elem_size, uint32_t elem_bits )
-{
-    if ( elem_size != elem_bits )
-    {
-        if ( elem_size < elem_bits && elem_bits % elem_size != 0 )
-            return true;
-        return ( elem_size % elem_bits != 0 );
-    }
-    return false;
-}
-
-LIB_EXPORT rc_t CC VCursorRead ( const VCursor *self, uint32_t col_idx,
-    uint32_t elem_bits, void *buffer, uint32_t blen, uint32_t *row_len )
-{
-    rc_t rc;
-
-    if ( row_len == NULL )
-        rc = RC ( rcVDB, rcCursor, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcReading, rcSelf, rcNull );
-        else if ( elem_bits == 0 || ( elem_bits & 7 ) != 0 )
-            rc = RC ( rcVDB, rcCursor, rcReading, rcParam, rcInvalid );
-        else
-        {
-            uint32_t elem_size; const void *base; uint32_t boff;
-            rc = VCursorReadColumn ( self, col_idx, & elem_size,
-                & base, & boff, row_len );
-            if ( rc == 0 )
-            {
-                if ( bad_elem_bits ( elem_size, elem_bits ) )
-                    rc = RC ( rcVDB, rcCursor, rcReading, rcType, rcInconsistent );
-                else if ( * row_len != 0 )
-                {
-                    if ( blen == 0 )
-                        return RC ( rcVDB, rcCursor, rcReading, rcBuffer, rcInsufficient );
-                    if ( buffer == NULL )
-                        rc = RC ( rcVDB, rcCursor, rcReading, rcParam, rcNull );
-                    else
-                    {
-                        uint64_t to_read = * row_len * elem_size;
-                        uint64_t bsize = blen * elem_bits;
-
-                        /* always return the required buffer size */
-                        * row_len = ( uint32_t ) ( to_read / elem_bits );
-
-                        /* detect buffer too small */
-                        if ( to_read > bsize )
-                        {
-                            rc = RC ( rcVDB, rcCursor, rcReading, rcBuffer, rcInsufficient );
-                            to_read = bsize;
-                        }
-
-                        /* copy out data up to limit */
-                        assert ( boff == 0 );
-                        memcpy ( buffer, base, ( size_t ) ( to_read >> 3 ) );
-
-                        return rc;
-                    }
-                }
-            }
-        }
-
-        * row_len = 0;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VCursorReadDirect ( const VCursor *self, int64_t row_id, uint32_t col_idx,
-    uint32_t elem_bits, void *buffer, uint32_t blen, uint32_t *row_len )
-{
-    rc_t rc;
-
-    if ( row_len == NULL )
-        rc = RC ( rcVDB, rcCursor, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcReading, rcSelf, rcNull );
-        else if ( elem_bits == 0 || ( elem_bits & 7 ) != 0 )
-            rc = RC ( rcVDB, rcCursor, rcReading, rcParam, rcInvalid );
-        else
-        {
-            uint32_t elem_size; const void *base; uint32_t boff;
-            rc = VCursorReadColumnDirect ( self, row_id, col_idx,
-                & elem_size, & base, & boff, row_len );
-            if ( rc == 0 )
-            {
-                if ( bad_elem_bits ( elem_size, elem_bits ) )
-                    rc = RC ( rcVDB, rcCursor, rcReading, rcType, rcInconsistent );
-                else if ( * row_len != 0 )
-                {
-                    if ( blen == 0 )
-                        return RC ( rcVDB, rcCursor, rcReading, rcBuffer, rcInsufficient );
-                    if ( buffer == NULL )
-                        rc = RC ( rcVDB, rcCursor, rcReading, rcParam, rcNull );
-                    else
-                    {
-                        uint64_t to_read = * row_len * elem_size;
-                        uint64_t bsize = blen * elem_bits;
-
-                        /* always return the required buffer size */
-                        * row_len = ( uint32_t ) ( to_read / elem_bits );
-
-                        /* detect buffer too small */
-                        if ( to_read > bsize )
-                        {
-                            rc = RC ( rcVDB, rcCursor, rcReading, rcBuffer, rcInsufficient );
-                            to_read = bsize;
-                        }
-
-                        /* copy out data up to limit */
-                        assert ( boff == 0 );
-                        memcpy ( buffer, base, ( size_t ) ( to_read >> 3 ) );
-
-                        return rc;
-                    }
-                }
-            }
-        }
-
-        * row_len = 0;
-    }
-
-    return rc;
-}
-
-
-/* ReadBits
- *  read single row of potentially bit-aligned column data into a buffer
- *
- *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
- *
- *  "elem_bits" [ IN ] - expected element size in bits, required to be
- *  compatible with the actual element size, and may ( or may not ) be
- *  a multiple of 8 ( byte aligned ).
- *
- *  "start" [ IN ] - zero-based starting index to first element,
- *  valid from 0 .. row_len - 1
- *
- *  "buffer" [ IN ], "boff" [ IN ] and "blen" [ IN ] -
- *  return buffer for row data, where "boff" is in BITS
- *  and "blen" is in ELEMENTS.
- *
- *  "num_read" [ OUT ] - return parameter for the number of elements
- *  read, which is <= "blen"
- *
- *  "remaining" [ OUT, NULL OKAY ] - optional return parameter for
- *  the number of elements remaining to be read. specifically,
- *  "start" + "num_read" + "remaining" == row length, assuming that
- *  "start" <= row length.
- */
-LIB_EXPORT rc_t CC VCursorReadBits ( const VCursor *self, uint32_t col_idx,
-    uint32_t elem_bits, uint32_t start, void *buffer, uint32_t off,
-    uint32_t blen, uint32_t *num_read, uint32_t *remaining )
-{
-    rc_t rc;
-
-    uint32_t dummy;
-    if ( remaining == NULL )
-        remaining = & dummy;
-
-    if ( num_read == NULL )
-        rc = RC ( rcVDB, rcCursor, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcReading, rcSelf, rcNull );
-        else if ( elem_bits == 0 )
-            rc = RC ( rcVDB, rcCursor, rcReading, rcParam, rcInvalid );
-        else
-        {
-            uint32_t elem_size; const void *base; uint32_t boff;
-            rc = VCursorReadColumn ( self, col_idx, & elem_size,
-                & base, & boff, num_read );
-            if ( rc == 0 )
-            {
-                if ( bad_elem_bits ( elem_size, elem_bits ) )
-                    rc = RC ( rcVDB, rcCursor, rcReading, rcType, rcInconsistent );
-                else if ( * num_read != 0 )
-                {
-                    uint64_t to_read = * num_read * elem_size;
-                    uint64_t doff = start * elem_bits;
-                    to_read = to_read > doff ? to_read - doff : 0;
-                    if ( blen == 0 )
-                    {
-                        * num_read = 0;
-                        * remaining = ( uint32_t ) ( to_read / elem_bits );
-                        return 0;
-                    }
-
-                    if ( buffer == NULL )
-                        rc = RC ( rcVDB, rcCursor, rcReading, rcParam, rcNull );
-                    else
-                    {
-                        uint64_t bsize = blen * elem_size;
-                        if ( to_read <= bsize )
-                            * remaining = 0;
-                        else
-                        {
-                            * remaining = (uint32_t)( ( to_read - bsize ) / elem_bits );
-                            to_read = bsize;
-                        }
-                        bitcpy ( buffer, off, base, boff + doff, ( bitsz_t ) to_read );
-                        * num_read = ( uint32_t ) ( to_read / elem_bits );
-                        return 0;
-                    }
-                }
-            }
-        }
-
-        * num_read = 0;
-    }
-
-    * remaining = 0;
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VCursorReadBitsDirect ( const VCursor *self, int64_t row_id, uint32_t col_idx,
-    uint32_t elem_bits, uint32_t start, void *buffer, uint32_t off,
-    uint32_t blen, uint32_t *num_read, uint32_t *remaining )
-{
-    rc_t rc;
-
-    uint32_t dummy;
-    if ( remaining == NULL )
-        remaining = & dummy;
-
-    if ( num_read == NULL )
-        rc = RC ( rcVDB, rcCursor, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcReading, rcSelf, rcNull );
-        else if ( elem_bits == 0 )
-            rc = RC ( rcVDB, rcCursor, rcReading, rcParam, rcInvalid );
-        else
-        {
-            uint32_t elem_size; const void *base; uint32_t boff;
-            rc = VCursorReadColumnDirect ( self, row_id, col_idx,
-                & elem_size, & base, & boff, num_read );
-            if ( rc == 0 )
-            {
-                if ( bad_elem_bits ( elem_size, elem_bits ) )
-                    rc = RC ( rcVDB, rcCursor, rcReading, rcType, rcInconsistent );
-                else if ( * num_read != 0 )
-                {
-                    uint64_t to_read = * num_read * elem_size;
-                    uint64_t doff = start * elem_bits;
-                    to_read = to_read > doff ? to_read - doff : 0;
-                    if ( blen == 0 )
-                    {
-                        * num_read = 0;
-                        * remaining = ( uint32_t ) ( to_read / elem_bits );
-                        return 0;
-                    }
-
-                    if ( buffer == NULL )
-                        rc = RC ( rcVDB, rcCursor, rcReading, rcParam, rcNull );
-                    else
-                    {
-                        uint64_t bsize = blen * elem_size;
-                        if ( to_read <= bsize )
-                            * remaining = 0;
-                        else
-                        {
-                            * remaining = (uint32_t)( ( to_read - bsize ) / elem_bits );
-                            to_read = bsize;
-                        }
-                        bitcpy ( buffer, off, base, boff + doff, ( bitsz_t ) to_read );
-                        * num_read = ( uint32_t ) ( to_read / elem_bits );
-                        return 0;
-                    }
-                }
-            }
-        }
-
-        * num_read = 0;
-    }
-
-    * remaining = 0;
-
-    return rc;
-}
-
-
-/* CellData
- *  access pointer to single cell of potentially bit-aligned column data
- *
- *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
- *
- *  "elem_bits" [ OUT, NULL OKAY ] - optional return parameter for
- *  element size in bits
- *
- *  "base" [ OUT ] and "boff" [ OUT, NULL OKAY ] -
- *  compound return parameter for pointer to row starting bit
- *  where "boff" is in BITS
- *
- *  "row_len" [ OUT, NULL OKAY ] - the number of elements in row
- */
-LIB_EXPORT rc_t CC VCursorCellData ( const VCursor *self, uint32_t col_idx,
-    uint32_t *elem_bits, const void **base, uint32_t *boff, uint32_t *row_len )
-{
-    rc_t rc;
-
-    uint32_t dummy [ 3 ];
-    if ( row_len == NULL )
-        row_len = & dummy [ 0 ];
-    if ( boff == NULL )
-        boff = & dummy [ 1 ];
-    if ( elem_bits == NULL )
-        elem_bits = & dummy [ 2 ];
-
-    if ( base == NULL )
-        rc = RC ( rcVDB, rcCursor, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcReading, rcSelf, rcNull );
-        else
-        {
-            rc = VCursorReadColumn ( self, col_idx,
-                elem_bits, base, boff, row_len );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        * base = NULL;
-    }
-
-    * elem_bits = 0;
-    * boff = 0;
-    * row_len = 0;
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VCursorCellDataDirect ( const VCursor *self, int64_t row_id, uint32_t col_idx,
-    uint32_t *elem_bits, const void **base, uint32_t *boff, uint32_t *row_len )
-{
-    rc_t rc;
-
-    uint32_t dummy [ 3 ];
-    if ( row_len == NULL )
-        row_len = & dummy[ 0 ];
-    if ( boff == NULL )
-        boff = & dummy [ 1 ];
-    if ( elem_bits == NULL )
-        elem_bits = & dummy [ 2 ];
-
-    if ( base == NULL )
-        rc = RC ( rcVDB, rcCursor, rcReading, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcReading, rcSelf, rcNull );
-        else
-        {
-            rc = VCursorReadColumnDirect ( self, row_id, col_idx,
-                elem_bits, base, boff, row_len );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        * base = NULL;
-    }
-
-    * elem_bits = 0;
-    * boff = 0;
-    * row_len = 0;
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VCursorDataPrefetch( const VCursor *cself,
-										const int64_t *row_ids,
-										uint32_t col_idx,
-										uint32_t num_rows,
-										int64_t min_valid_row_id,
-										int64_t max_valid_row_id,
-										bool continue_on_error )
-{
-	rc_t rc=0;
-	const VColumn *col = ( const void* ) VectorGet ( & cself -> row, col_idx );
-	if ( col == NULL )
-	{
-		return RC ( rcVDB, rcCursor, rcReading, rcColumn, rcInvalid );
-	}
-	
-	if ( cself->blob_mru_cache && num_rows > 0 )
-	{
-		int64_t *row_ids_sorted = malloc( num_rows * sizeof( *row_ids_sorted ) );
-		if ( row_ids_sorted != NULL )
-		{
-			uint32_t i, num_rows_sorted;
-			for( i = 0, num_rows_sorted = 0; i < num_rows; i++ )
-			{
-				int64_t row_id = row_ids[ i ];
-				if ( row_id >= min_valid_row_id && row_id <= max_valid_row_id )
-				{
-					row_ids_sorted[ num_rows_sorted++ ] = row_id;
-				}
-			}
-			if ( num_rows_sorted > 0 )
-			{
-				int64_t last_cached_row_id = INT64_MIN;
-				bool first_time = true;
-				ksort_int64_t( row_ids_sorted, num_rows_sorted );
-				for	( i = 0; rc==0 && i < num_rows_sorted; i++ )
-				{
-					int64_t row_id = row_ids_sorted[ i ];
-					if ( last_cached_row_id < row_id )
-					{
-						VBlob * blob = ( VBlob* )VBlobMRUCacheFind( cself->blob_mru_cache, col_idx, row_id );
-						if ( blob != NULL )
-						{
-							last_cached_row_id = blob->stop_id;
-						}
-						else
-						{ 
-							/* prefetch it **/
-							/** ask production for the blob **/
-							VBlobMRUCacheCursorContext cctx;
-
-							cctx.cache = cself -> blob_mru_cache;
-							cctx.col_idx = col_idx;
-							rc = VProductionReadBlob ( col->in, & blob, row_id, 1, &cctx );
-							if ( rc == 0 )
-							{
-								rc_t rc_cache;
-								/** always cache prefetch requests **/
-								if ( first_time )
-								{ 
-									VBlobMRUCacheResumeFlush( cself->blob_mru_cache ); /** next call will clean cache if too big **/
-									rc_cache = VBlobMRUCacheSave( cself->blob_mru_cache, col_idx, blob );
-									VBlobMRUCacheSuspendFlush( cself->blob_mru_cache ); /** suspending for the rest **/
-									first_time = false;
-								}
-								else
-								{
-									rc_cache = VBlobMRUCacheSave( cself->blob_mru_cache, col_idx, blob );
-								}
-								
-								if ( rc_cache == 0 )
-								{
-									VBlobRelease( blob );
-									last_cached_row_id = blob->stop_id;
-								}
-							}
-							else if ( continue_on_error )
-							{
-								rc = 0; /** reset failed row ***/
-								last_cached_row_id = row_id; /*** and skip it **/
-							}
-						}
-					}
-				}
-			}
-			free( row_ids_sorted );
-		}
-		else
-		{
-			rc= RC( rcVDB, rcCursor, rcReading, rcMemory, rcExhausted );
-		}
-	}
-	return rc;
-}
-
-
-/* OpenParent
- *  duplicate reference to parent table
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC VCursorOpenParentRead ( const VCursor *self, const VTable **tbl )
-{
-    rc_t rc;
-
-    if ( tbl == NULL )
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = VTableAddRef ( self -> tbl );
-            if ( rc == 0 )
-            {
-                * tbl = self -> tbl;
-                return 0;
-            }
-        }
-
-        * tbl = NULL;
-    }
-
-    return rc;
-}
-
-struct insert_overloaded_pb
-{
-    VCursor *curs;
-    Vector *cx_bind;
-};
-
-static
-void CC insert_overloaded_scolumns ( void *item, void *data )
-{
-    struct insert_overloaded_pb *pb = data;
-    const SColumn *scol = ( const void* ) item;
-
-    uint32_t ignore;
-    VCursorAddSColumn ( pb -> curs, & ignore, scol, NULL, pb -> cx_bind );
-}
-
-static
-void VCursorListCol_walk_through_columns_and_add_to_cursor ( VCursor *self )
-{
-    uint32_t idx = VectorStart ( & self -> stbl -> cname );
-    uint32_t end = VectorLength ( & self -> stbl -> cname );
-
-    Vector cx_bind;
-    struct insert_overloaded_pb pb;
-    pb . curs = self;
-    pb . cx_bind = & cx_bind;
-    VectorInit ( & cx_bind, 1, self -> schema -> num_indirect );
-
-    for ( end += idx; idx < end; ++idx )
-    {
-        /* look at the table column name guy */
-        const SNameOverload* ol_entry = ( const SNameOverload* ) VectorGet ( & self -> stbl -> cname, idx );
-        if ( ol_entry != NULL )
-            VectorForEach ( & ol_entry -> items, false, insert_overloaded_scolumns, & pb );
-    }
-
-    VectorWhack ( & cx_bind, NULL, NULL );
-}
-
-static
-rc_t VCursorListCol_consolidate_and_insert( const VCursor *self, BSTree *columns )
-{
-    rc_t rc = VCursorOpenForListing ( self );
-    if ( rc == 0 )
-    {
-        uint32_t idx = VectorStart ( & self -> row );
-        uint32_t end = VectorLength ( & self -> row );
-
-        for ( end += idx; idx < end; ++idx )
-        {
-            const VColumn* vcol = ( const VColumn* ) VectorGet ( & self -> row, idx );
-            if ( vcol != NULL )
-            {
-                VColumnRef *cref;
-                rc = VColumnRefMake ( & cref, self -> schema, vcol -> scol );
-                if ( rc != 0 )
-                    break;
-
-                rc = BSTreeInsert ( columns, & cref -> n, VColumnRefSort );
-                assert ( rc == 0 );
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/* ListReadableColumns
- *  performs an insert of '*' to cursor
- *  attempts to resolve all read rules
- *  records all SColumns that successfully resolved
- *  populates BTree with VColumnRef objects
- */
-rc_t VCursorListReadableColumns ( VCursor *self, BSTree *columns )
-{
-    /* add '*' to cursor */
-    VCursorListCol_walk_through_columns_and_add_to_cursor ( self );
-
-    /* insert all columns into tree */
-    return VCursorListCol_consolidate_and_insert ( self, columns );
-}
-
-
-/* GetUserData
- *  store/retrieve an opaque pointer to user data
- *
- *  "data" [ OUT ] - return parameter for getting data
- */
-LIB_EXPORT rc_t CC VCursorGetUserData ( const VCursor *self, void **data )
-{
-    rc_t rc;
-
-    if ( data == NULL )
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * data = self -> user;
-            return 0;
-        }
-
-        * data = NULL;
-    }
-
-    return rc;
-}
-
-/* SetUserData
- *  store/retrieve an opaque pointer to user data
- *
- *  "data" [ IN ] - parameter for setting data
- *
- *  "destroy" [ IN, NULL OKAY ] - optional destructor param
- *  invoked from destructor of "self"
- */
-LIB_EXPORT rc_t CC VCursorSetUserData ( const VCursor *cself,
-    void *data, void ( CC * destroy ) ( void *data ) )
-{
-    VCursor *self = ( VCursor* ) cself;
-
-    if ( self == NULL )
-        return RC ( rcVDB, rcCursor, rcUpdating, rcSelf, rcNull );
-
-    self -> user = data;
-    self -> user_whack = destroy;
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VCursorLinkedCursorGet(const VCursor *cself,const char *tbl,VCursor const **curs)
-{
-    rc_t rc;
-
-    if ( curs == NULL )
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( cself == NULL )
-            rc = RC(rcVDB, rcCursor, rcAccessing, rcSelf, rcNull);
-        else if ( tbl == NULL )
-            rc = RC(rcVDB, rcCursor, rcAccessing, rcName, rcNull);
-        else if ( tbl [ 0 ] == 0 )
-            rc = RC(rcVDB, rcCursor, rcAccessing, rcName, rcEmpty);
-        else
-        {
-            LinkedCursorNode *node = (LinkedCursorNode *)
-                BSTreeFind(&cself->linked_cursors, tbl, LinkedCursorComp);
-
-            if (node == NULL)
-                rc = RC(rcVDB, rcCursor, rcAccessing, rcName, rcNotFound);
-            else
-            {
-                rc = VCursorAddRef ( node -> curs );
-                if ( rc == 0 )
-                {
-                    * curs = node -> curs;
-                    return 0;
-                }
-            }
-        }
-
-        * curs = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VCursorLinkedCursorSet(const VCursor *cself,const char *tbl,VCursor const *curs)
-{
-    rc_t rc;
-    VCursor *self = (VCursor *)cself;
-
-    if(cself == NULL)
-        rc = RC(rcVDB, rcCursor, rcAccessing, rcSelf, rcNull);
-    else if(tbl == NULL)
-        rc = RC(rcVDB, rcCursor, rcAccessing, rcName, rcNull);
-    else if(tbl[0] == '\0')
-        rc = RC(rcVDB, rcCursor, rcAccessing, rcName, rcEmpty);
-    else
-    {
-        rc = VCursorAddRef ( curs );
-        if ( rc == 0 )
-        {
-            LinkedCursorNode *node = malloc ( sizeof * node );
-            if (node == NULL)
-                rc = RC(rcVDB, rcCursor, rcAccessing, rcMemory, rcExhausted);
-            else
-            {
-                strncpy ( node->tbl, tbl, sizeof node->tbl );
-                node->curs = (VCursor*) curs;
-                rc = BSTreeInsertUnique(&self->linked_cursors, (BSTNode *)node, NULL, LinkedCursorNodeComp);
-                if ( rc == 0 )
-                {
-                    ((VCursor*)curs)->is_sub_cursor = true;
-                    return 0;
-                }
-
-                free ( node );
-            }
-
-            VCursorRelease ( curs );
-        }
-    }
-
-    return rc;
-}
-
-
-/* private */
-LIB_EXPORT rc_t CC VCursorParamsGet( struct VCursorParams const *cself,
-    const char *Name, KDataBuffer **value )
-{
-    NamedParamNode *node;
-    String name;
-    VCursor *self = (VCursor *)cself;
-    
-    if (cself == NULL)
-        return RC(rcVDB, rcCursor, rcAccessing, rcSelf, rcNull);
-    
-    if (Name == NULL)
-        return RC(rcVDB, rcCursor, rcAccessing, rcName, rcNull);
-    
-    if (Name[0] == '\0')
-        return RC(rcVDB, rcCursor, rcAccessing, rcName, rcEmpty);
-    
-    StringInitCString(&name, Name);
-    node = (NamedParamNode *)BSTreeFind(&self->named_params, &name, NamedParamComp);
-    if (node == NULL)
-        return RC(rcVDB, rcCursor, rcAccessing, rcName, rcNotFound);
-        
-    *value = &node->value;
-    return 0;
-}
-
-/* private */
-static rc_t VCursorParamsLookupOrCreate(struct VCursorParams const *cself,
-                         const char *Name, KDataBuffer **value)
-{
-    NamedParamNode *node;
-    String name;
-    VCursor *self = (VCursor *)cself;
-    rc_t rc;
-    
-    StringInitCString(&name, Name);
-    node = (NamedParamNode *)BSTreeFind(&self->named_params, &name, NamedParamComp);
-    if (node == NULL) {
-        node = malloc(sizeof(*node) + StringSize(&name) + 1);
-        if (node == NULL)
-            return RC(rcVDB, rcCursor, rcAccessing, rcMemory, rcExhausted);
-        
-        strcpy((char *)(&node[1]), Name);
-        StringInit ( & node -> name, (const char *)(&node[1]), name . size, name . len );
-        
-        memset ( & node -> value, 0, sizeof node -> value );
-        node -> value . elem_bits = 8;
-        
-        rc = BSTreeInsertUnique(&self->named_params, (BSTNode *)node, NULL, NamedParamNodeComp);
-        assert(rc == 0);
-    }
-    *value = &node->value;
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VCursorParamsVSet(struct VCursorParams const *cself, 
-    const char *Name, const char *fmt, va_list args )
-{
-    KDataBuffer *value;
-    rc_t rc;
-
-    if (cself == NULL)
-        return RC(rcVDB, rcCursor, rcAccessing, rcSelf, rcNull);
-
-    if (Name == NULL)
-        return RC(rcVDB, rcCursor, rcAccessing, rcName, rcNull);
-
-    if (Name[0] == '\0')
-        return RC(rcVDB, rcCursor, rcAccessing, rcName, rcEmpty);
-
-    rc = VCursorParamsLookupOrCreate(cself, Name, &value);
-    if (rc == 0) {
-        int n;
-        char dummy[1], * buffer = dummy;
-        size_t bsize = sizeof dummy;
-
-        va_list copy;
-        va_copy(copy, args);
-
-        if ( value -> base != NULL )
-        {
-            buffer = value -> base;
-            bsize = KDataBufferBytes ( value );
-        }        
-
-        /* optimistic printf */
-        n = vsnprintf ( buffer, bsize, fmt, copy );
-        va_end(copy);
-
-        if ( n < 0 || ( size_t ) n >= bsize )
-        {
-            rc = KDataBufferResize ( value, ( n < 0 ) ? 4096 : n + 1 );
-            if (rc == 0)
-            {
-                bsize = KDataBufferBytes ( value );
-                n = vsnprintf(value->base, bsize, fmt, args);
-                if ( n < 0 || ( size_t ) n >= bsize )
-                {
-                    rc = RC ( rcVDB, rcCursor, rcUpdating, rcParam, rcInvalid );
-                    KDataBufferWhack ( value );
-                }
-            }
-        }
-
-        if ( rc == 0 )
-            value -> elem_count = n;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VCursorParamsSet( struct VCursorParams const *cself, 
-    const char *name, const char *fmt, ... )
-{
-    va_list va;
-    rc_t rc;
-
-    va_start(va, fmt);
-    rc = VCursorParamsVSet(cself, name, fmt, va);
-    va_end(va);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VCursorParamsUnset( struct VCursorParams const *cself, const char *Name ) {
-    KDataBuffer *value;
-    rc_t rc;
-
-    if (cself == NULL)
-        return RC(rcVDB, rcCursor, rcAccessing, rcSelf, rcNull);
-
-    if (Name == NULL)
-        return RC(rcVDB, rcCursor, rcAccessing, rcParam, rcNull);
-
-    if (Name[0] == '\0')
-        return RC(rcVDB, rcCursor, rcAccessing, rcParam, rcInvalid);
-
-    rc = VCursorParamsGet(cself, Name, &value);
-    if (rc == 0)
-        KDataBufferWhack(value);
-
-    return rc;
-}
-
-/*  VCursorGetSchema
- *  returns current schema of the open cursor
- */
-LIB_EXPORT struct VSchema const * CC VCursorGetSchema ( struct VCursor const *self )
-{
-    return self ? self->schema : NULL;
-}
-
-
-static rc_t run_pagemap_thread ( const KThread *t, void *data )
-{
-    rc_t rc;
-    VCursor *self = data;
-    /* acquire lock */
-    MTCURSOR_DBG (( "run_pagemap_thread: acquiring lock\n" ));
-    while((rc = KLockAcquire ( self -> pmpr.lock ))==0){
-CHECK_AGAIN:
-	switch(self->pmpr.state){
-	 case ePMPR_STATE_NONE: 		/* wait for new request */
-	 case ePMPR_STATE_SERIALIZE_DONE: 	/* wait for result pickup **/
-	 case ePMPR_STATE_DESERIALIZE_DONE:	/* wait for result pickup **/
-		MTCURSOR_DBG (( "run_pagemap_thread: waiting for new request\n" ));
-		rc = KConditionWait ( self -> pmpr.cond, self -> pmpr.lock );
-		goto CHECK_AGAIN;
-	 case ePMPR_STATE_EXIT: /** exit requested ***/
-		MTCURSOR_DBG (( "run_pagemap_thread: exit by request\n" ));
-		KLockUnlock(self -> pmpr.lock);
-		return 0;
-	 case ePMPR_STATE_DESERIALIZE_REQUESTED:
-		MTCURSOR_DBG (( "run_pagemap_thread: request to deserialize\n" ));
-		self->pmpr.rc = PageMapDeserialize(&self->pmpr.pm,self->pmpr.data.base,self->pmpr.data.elem_count,self->pmpr.row_count);
-		if(self->pmpr.rc == 0){
-			self->pmpr.rc=PageMapExpandFull(self->pmpr.pm);
-			/*self->pmpr.rc=PageMapExpand(self->pmpr.pm,self->pmpr.row_count<2048?self->pmpr.row_count-1:2048);*/
-			assert(self->pmpr.rc == 0);
-		}
-		self->pmpr.state = ePMPR_STATE_DESERIALIZE_DONE;
-		/*fprintf(stderr,"Pagemap %p Done R:%6d|DR:%d|LR:%d\n",self->pmpr.lock, self->pmpr.pm->row_count,self->pmpr.pm->data_recs,self->pmpr.pm->leng_recs);*/
-		KConditionSignal ( self -> pmpr.cond );
-		KLockUnlock(self -> pmpr.lock);
-		break;
-	 case ePMPR_STATE_SERIALIZE_REQUESTED:
-		MTCURSOR_DBG (( "run_pagemap_thread: request to serialize\n" ));
-		self->pmpr.rc = PageMapSerialize(self->pmpr.pm,&self->pmpr.data,0,&self->pmpr.elem_count);
-		self->pmpr.state = ePMPR_STATE_SERIALIZE_DONE;
-		KConditionSignal ( self -> pmpr.cond );
-		KLockUnlock(self -> pmpr.lock);
-		break;
-	 default:
-		assert(0);
-		KLockUnlock(self -> pmpr.lock);
-		return RC(rcVDB, rcPagemap, rcConverting, rcParam, rcInvalid );
-	 
-	}
-    }
-    MTCURSOR_DBG (( "run_pagemap_thread: exit\n" ));
-    return rc;
-}
-
-rc_t VCursorLaunchPagemapThread(VCursor *curs)
-{
-	rc_t rc;
-
-    assert ( curs != NULL );
-	curs -> pagemap_thread = NULL; /** if fails - will not use **/
-
-    if ( s_disable_pagemap_thread )
-        return RC ( rcVDB, rcCursor, rcExecuting, rcThread, rcNotAvailable );
-
-	rc = KLockMake ( & curs -> pmpr.lock );
-	if(rc == 0)
-    {
-		rc = KConditionMake ( & curs -> pmpr.cond );
-        if(rc == 0)
-        {
-            rc = KThreadMake ( & curs -> pagemap_thread, run_pagemap_thread, curs );
-            if ( rc == 0 )
-                return 0;
-
-            KConditionRelease ( curs -> pmpr . cond );
-            curs -> pmpr . cond = NULL;
-        }
-
-        KLockRelease ( curs -> pmpr . lock );
-        curs -> pmpr . lock = NULL;
-    }
-
-	return rc;
-}
-
-rc_t VCursorTerminatePagemapThread(VCursor *self)
-{
-	rc_t rc=0;
-
-    assert ( self != NULL );
-
-	if(self -> pagemap_thread != NULL)
-    {
-		rc = KLockAcquire ( self -> pmpr.lock );
-		if ( rc == 0 )
-        {
-			self -> pmpr.state = ePMPR_STATE_EXIT;
-			KConditionSignal ( self -> pmpr.cond );
-			KLockUnlock ( self -> pmpr.lock );
-		}
-		KThreadWait ( self -> pagemap_thread, NULL );
-	}
-
-	KThreadRelease ( self -> pagemap_thread );
-	KConditionRelease ( self -> pmpr.cond );
-	KLockRelease ( self -> pmpr.lock );
-
-    self -> pagemap_thread = NULL;
-    self -> pmpr . cond = NULL;
-    self -> pmpr . lock = NULL;
-
-	return rc;
-}
-
-/* DisablePagemapThread
- *  this can cause difficulties for some clients
- */
-LIB_EXPORT rc_t CC VDBManagerDisablePagemapThread ( struct VDBManager const *self )
-{
-    if ( self == NULL )
-        return RC ( rcVDB, rcMgr, rcUpdating, rcSelf, rcNull );
-    s_disable_pagemap_thread = true;
-    return 0;
-}
-
-
-/* IsStaticColumn
- *  answers question: "does this column have the same value for every cell?"
- */
-LIB_EXPORT rc_t CC VCursorIsStaticColumn ( const VCursor *self, uint32_t col_idx, bool *is_static )
-{
-    rc_t rc;
-
-    if ( is_static == NULL )
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            uint32_t start = VectorStart ( & self -> row );
-            uint32_t end = start + VectorLength ( & self -> row );
-            if ( col_idx < start || col_idx >= end )
-                rc = RC ( rcVDB, rcCursor, rcSelecting, rcId, rcInvalid );
-            else
-            {
-                VColumn *col = VectorGet ( & self -> row, col_idx );
-                return VColumnIsStatic ( col, is_static );
-            }
-        }
-
-        * is_static = false;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT uint64_t CC VCursorSetCacheCapacity(VCursor *self,uint64_t capacity)
-{
-	if(self) return VBlobMRUCacheSetCapacity(self->blob_mru_cache,capacity);
-        return 0;
-}
-LIB_EXPORT uint64_t CC VCursorGetCacheCapacity(const VCursor *self)
-{
-	if(self) return VBlobMRUCacheGetCapacity(self->blob_mru_cache);
-	return 0;
-}
-
-
-/* FindNextRowId
- *  finds the id of the next row having valid ( non-null ) cell data
- *  "*next" may contain any row id > "VCursorRowId()".
- *  returns rcNotFound if none can be located.
- *
- *  "idx" [ IN, DEFAULT ZERO ] - single column index or
- *  zero to indicate the range for all columns in cursor.
- *  in the latter case ( idx == 0 ), we find the first row having
- *  ANY valid cell data.
- *
- *  "next" [ OUT ] - return parameter for next valid row id
- *
- * FindNextRowIdDirect
- *  "start_id" [ IN ] - starting id for search, such that "*next"
- *  could contain any id >= start_id upon successful return
- */
-static
-rc_t VCursorFindNextRowIdInt ( const VCursor * self, uint32_t idx, int64_t start_id, int64_t * next )
-{
-    uint32_t i;
-    int64_t best = INT64_MAX;
-    rc_t rc = SILENT_RC ( rcVDB, rcCursor, rcSelecting, rcCursor, rcEmpty );
-
-    uint32_t start, end;
-
-    /* for walking across the open columns */
-    assert ( self != NULL );
-    start = VectorStart ( & self -> row );
-    end = start + VectorLength ( & self -> row );
-
-    /* if using a specific column, ensure the index is proper */
-    if ( idx != 0 )
-    {
-        if ( idx < start || idx >= end )
-            return RC ( rcVDB, rcCursor, rcSelecting, rcId, rcInvalid );
-
-        /* set the range to be just this column */
-        start = idx;
-        end = idx + 1;
-    }
-
-    /* walk across all columns */
-    for ( i = start; i < end; ++ i )
-    {
-        /* retrieve the column */
-        const VColumn * vcol = ( const VColumn * ) VectorGet ( & self -> row, i );
-
-        /* could assert that vcol != NULL, because it should never be so.
-           but the purpose of this function is not so much to insist on
-           this property but to discover the next row id */
-        if ( vcol != NULL )
-        {
-            /* assume the column is physical */
-            bool is_static = false;
-            KColumn * kcol = NULL;
-            rc = VColumnGetKColumn ( vcol, & kcol, & is_static );
-            if ( rc == 0 )
-            {
-                /* we have a physical column - ask kdb what the next id is */
-                assert ( kcol != NULL );
-                rc = KColumnFindFirstRowId ( kcol, next, start_id );
-                KColumnRelease ( kcol );
-                if ( rc == 0 )
-                {
-                    /* there can be no better than the supplied id */
-                    if ( * next == start_id )
-                        break;
-
-                    /* record the best of all columns */
-                    if ( * next < best )
-                        best = * next;
-                }
-
-                /* if this column has no more ids, try next column */
-                else if ( GetRCState ( rc ) != rcNotFound )
-                    break;
-            }
-            else if ( is_static )
-            {
-                /* we have a static column, meaning a contiguous range of row ids */
-                int64_t sfirst, slast;
-                rc = VColumnIdRange ( vcol, & sfirst, & slast );
-                if ( rc != 0 )
-                    break;
-                if ( sfirst >= slast || start_id > slast )
-                {
-                    rc = RC ( rcVDB, rcCursor, rcSelecting, rcRow, rcNotFound );
-                    break;
-                }
-                if ( start_id >= sfirst )
-                {
-                    * next = start_id;
-                    rc = 0;
-                    break;
-                }
-                if ( sfirst < best )
-                    best = sfirst;
-
-            }
-
-            * next = best;
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VCursorFindNextRowId ( const VCursor *self, uint32_t idx, int64_t *next )
-{
-    rc_t rc = 0;
-
-    if ( next == NULL )
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            return VCursorFindNextRowIdInt ( self, idx, self -> row_id + 1, next );
-        }
-
-        * next = 0;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VCursorFindNextRowIdDirect ( const VCursor *self, uint32_t idx, int64_t start_id, int64_t *next )
-{
-    rc_t rc = 0;
-
-    if ( next == NULL )
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            return VCursorFindNextRowIdInt ( self, idx, start_id, next );
-        }
-
-        * next = 0;
-    }
-
-    return rc;
-}
diff --git a/libs/vdb/cursor-priv.h b/libs/vdb/cursor-priv.h
deleted file mode 100644
index 62802b1..0000000
--- a/libs/vdb/cursor-priv.h
+++ /dev/null
@@ -1,322 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_cursor_priv_
-#define _h_cursor_priv_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_klib_vector_
-#include <klib/vector.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifndef KONST
-#define KONST
-#endif
-
-#ifndef SKONST
-#define SKONST const
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "blob-priv.h"
-
-#define MTCURSOR_DBG( msg ) DBGMSG ( DBG_VDB, DBG_FLAG ( DBG_VDB_MTCURSOR ), msg )
-
-
-
-#define VCURSOR_WRITE_MODES_SUPPORTED 0
-
-/* temporary - until the full kproc for Windows is operational */
-#if defined(WINDOWS) || defined(_WIN32) || defined(NCBI_WITHOUT_MT)
-#define VCURSOR_FLUSH_THREAD 0
-#else
-#define VCURSOR_FLUSH_THREAD 1
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KLock;
-struct KCondition;
-struct KThread;
-struct KNamelist;
-struct KDlset;
-struct VTable;
-struct VCtxId;
-struct VSchema;
-struct SColumn;
-struct VColumn;
-struct VPhysical;
-
-
-/*--------------------------------------------------------------------------
- * VCursorCache
- *  a dual-level vector
- */
-typedef struct VCursorCache VCursorCache;
-struct VCursorCache
-{
-    Vector cache;
-};
-
-
-/* Init
- */
-#define VCursorCacheInit( self, start, block ) \
-    VectorInit ( & ( self ) -> cache, start, block )
-
-/* Whack
- */
-void VCursorCacheWhack ( VCursorCache *self,
-    void ( CC * whack ) ( void *item, void *data ), void *data );
-
-/* Get
- *  retrieve object by cid
- */
-void *VCursorCacheGet ( const VCursorCache *self, struct VCtxId const *cid );
-
-/* Set
- *  set object by cid
- */
-rc_t VCursorCacheSet ( VCursorCache *self,
-    struct VCtxId const *cid, const void *item );
-
-/* Swap
- *  swap object by cid
- */
-rc_t VCursorCacheSwap ( VCursorCache *self,
-    struct VCtxId const *cid, const void *item, void **prior );
-
-
-/*--------------------------------------------------------------------------
- * VCursor
- */
-enum
-{
-    vcConstruct,
-    vcFailed,
-    vcReady,
-    vcRowOpen,
-    vcRowCommitted,
-    vcPageCommit
-};
-
-enum
-{
-    vfReady,
-    vfBusy,
-    vfFgErr,
-    vfBgErr,
-    vfExit
-};
-
-
-struct VCursor
-{
-    /* row id */
-    int64_t row_id;
-
-    /* half-closed page range */
-    int64_t start_id, end_id;
-
-    /* starting id for flush */
-    volatile int64_t flush_id;
-
-    /* attached reference to table */
-    struct VTable KONST *tbl;
-
-    /* cursor-specific schema and table */
-    struct VSchema SKONST *schema;
-    struct STable SKONST *stbl;
-
-    /* background flush thread objects */
-    int64_t launch_cnt;
-    struct KThread *flush_thread;
-    struct KLock *flush_lock;
-    struct KCondition *flush_cond;
-
-    /* background pagemap conversion objects */
-    struct KThread *pagemap_thread;
-    PageMapProcessRequest pmpr;
-
-    /* user data */
-    void *user;
-    void ( CC * user_whack ) ( void *data );
-
-    /* external named cursor parameters */    
-    BSTree named_params;
-
-    /* linked cursors */
-    BSTree linked_cursors;
-
-    /* read-only blob cache */
-    VBlobMRUCache *blob_mru_cache;
-
-    /* external row of VColumn* by ord ( owned ) */
-    Vector row;
-    
-    Vector v_cache_curs;
-    Vector v_cache_cidx;
-    /** trying to prevent forward prefetch on rows which are cached ***/
-    bool    cache_col_active;
-    int64_t cache_empty_start; /** first rowid where cache is detected to be empty **/
-    int64_t cache_empty_end;   /** last  rowid  **/ 
-
-    /* column objects by cid ( not-owned ) */
-    VCursorCache col;
-
-    /* physical columns by cid ( owned ) */
-    VCursorCache phys;
-    uint32_t phys_cnt;
-
-    /* productions by cid ( not-owned ) */
-    VCursorCache prod;
-
-    /* intermediate productions ( owned ) */
-    Vector owned;
-
-    /* trigger productions ( not-owned ) */
-    Vector trig;
-
-    KRefcount refcount;
-
-    volatile uint32_t flush_cnt;
-
-    /* foreground state */
-    uint8_t state;
-
-    /* flush_state */
-    volatile uint8_t flush_state;
-
-    bool read_only;
-
-    /* support for sradb-v1 API */
-    bool permit_add_column;
-    bool permit_post_open_add;
-    /* support suspension of schema-declared triggers **/
-    bool suspend_triggers;
-    /* cursor used in sub-selects */
-    bool is_sub_cursor; 
-    /* cursor for VDB columns located in separate db.tbl ***/
-    const struct VCursor* cache_curs;
-};
-
-
-/* Make
- */
-rc_t VCursorMake ( struct VCursor **cursp, struct VTable const *tbl );
-
-rc_t VTableCreateCursorWriteInt ( struct VTable *self, struct VCursor **cursp, KCreateMode mode, bool create_thread );
-
-/* Whack
- * Destroy
- */
-rc_t VCursorWhack ( struct VCursor *self );
-rc_t VCursorDestroy ( struct VCursor *self );
-
-/* SupplementSchema
- *  scan table for physical column names
- *  create transparent yet incomplete (untyped) columns for unknown names
- *  create incomplete (untyped) physical columns for forwarded names
- *  repeat process on static columns, except create complete (fully typed) objects
- */
-rc_t VCursorSupplementSchema ( struct VCursor const *self );
-
-/* MakeColumn
- */
-rc_t VCursorMakeColumn ( struct VCursor *self,
-    struct VColumn **col, struct SColumn const *scol, Vector *cx_bind );
-
-/* SetRowIdRead - PRIVATE
- *  seek to given row id
- *
- *  "row_id" [ IN ] - row id to select
- */
-rc_t VCursorSetRowIdRead ( struct VCursor *self, int64_t row_id );
-
-/* Open
- */
-rc_t VCursorOpenRead ( struct VCursor *self, struct KDlset const *libs );
-/**
-*** VTableCreateCursorReadInternal is only visible in vdb and needed for schema resolutions
-****/
-rc_t  VTableCreateCursorReadInternal(const struct VTable *self, const struct VCursor **cursp);
-
-
-/* ListReadableColumns
- *  performs an insert of '*' to cursor
- *  attempts to resolve all read rules
- *  records all SColumns that successfully resolved
- *  populates BTree with VColumnRef objects
- */
-rc_t VCursorListReadableColumns ( struct VCursor *self, BSTree *columns );
-
-/* ListWritableColumns
- *  walks list of SPhysicals and trigger SProductions
- *  attempts to resolve all write rules
- *  records any SColumn that can be reached
- *  populates BTree with VColumnRef objects
- */
-rc_t VCursorListWritableColumns ( struct VCursor *self, BSTree *columns );
-rc_t VCursorListSeededWritableColumns ( struct VCursor *self, BSTree *columns, struct KNamelist const *seed );
-
-/* PostOpenAdd
- *  handle opening of a column after the cursor is opened
- */
-rc_t VCursorPostOpenAdd ( struct VCursor *self, struct VColumn *col );
-rc_t VCursorPostOpenAddRead ( struct VCursor *self, struct VColumn *col );
-
-/* OpenRowRead
- * CloseRowRead
- */
-rc_t VCursorOpenRowRead ( struct VCursor *self );
-rc_t VCursorCloseRowRead ( struct VCursor *self );
-
-
-/** pagemap supporting thread **/
-rc_t VCursorLaunchPagemapThread(struct VCursor *self);
-rc_t VCursorTerminatePagemapThread(struct VCursor *self);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_cursor_priv_ */
diff --git a/libs/vdb/cursor.c b/libs/vdb/cursor.c
deleted file mode 100644
index 63adbc3..0000000
--- a/libs/vdb/cursor.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define TRACK_REFERENCES 0
-
-#define KONST const
-#include "cursor-priv.h"
-#include "dbmgr-priv.h"
-#include "linker-priv.h"
-#include "schema-priv.h"
-#include "table-priv.h"
-#include "column-priv.h"
-#undef KONST
-
-#include <vdb/cursor.h>
-#include <vdb/table.h>
-#include <kfs/dyload.h>
-#include <klib/symbol.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * VCursor
- *  a row cursor onto a VTable
- */
-
-
-/* Whack
- */
-rc_t VCursorWhack ( VCursor *self )
-{
-    VCursorTerminatePagemapThread(self);
-    return VCursorDestroy ( self );
-}
-
-
-/* MakeColumn
- */
-rc_t VCursorMakeColumn ( VCursor *self, VColumn **col, const SColumn *scol, Vector *cx_bind )
-{
-    return VColumnMake ( col, self -> schema, scol );
-}
-
-/* PostOpenAdd
- *  handle opening of a column after the cursor is opened
- */
-rc_t VCursorPostOpenAdd ( VCursor *self, VColumn *col )
-{
-    return VCursorPostOpenAddRead ( self, col );
-}
-
-/* Open
- *  open cursor, resolving schema
- *  for the set of opened columns
- *
- *  NB - there is no corresponding "Close"
- *  use "Release" instead.
- */
-LIB_EXPORT rc_t CC VCursorOpen ( const VCursor *cself )
-{
-    rc_t rc;
-    VCursor *self = ( VCursor* ) cself;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcCursor, rcOpening, rcSelf, rcNull );
-    else
-    {
-        VLinker *ld = self -> tbl -> linker;
-
-        KDlset *libs;
-        rc = VLinkerOpen ( ld, & libs );
-        if ( rc == 0 )
-        {
-            rc = VCursorOpenRead ( self, libs );
-            if ( rc == 0 )
-            {
-                int64_t first;
-                uint64_t count;
-                
-                rc = VCursorIdRange ( self, 0, & first, & count );
-                if ( rc != 0 )
-                {
-                    /* permit empty open when run from sradb */
-                    if ( GetRCState ( rc ) == rcEmpty && GetRCObject ( rc ) == rcRange &&
-                         self -> permit_add_column && VectorLength ( & self -> row ) == 0 )
-                    {
-                        rc = 0;
-                    }
-                }
-                else if ( count != 0 )
-                {
-                    /* set initial row id to starting row */
-                    self -> start_id = self -> end_id = self -> row_id = first;
-                }
-
-                if ( rc != 0 )
-                    self -> state = vcFailed;
-            }
-
-            KDlsetRelease ( libs );
-        }
-    }
-
-    return rc;
-}
-
-
-/* SetRowId
- *  seek to given row id
- *
- *  "row_id" [ IN ] - row id to select
- */
-LIB_EXPORT rc_t CC VCursorSetRowId ( const VCursor *cself, int64_t row_id )
-{
-    rc_t rc;
-    VCursor *self = ( VCursor* ) cself;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcCursor, rcPositioning, rcSelf, rcNull );
-    else if ( self -> state > vcReady )
-        rc = RC ( rcVDB, rcCursor, rcPositioning, rcCursor, rcBusy );
-    else
-        rc = VCursorSetRowIdRead ( self, row_id );
-
-    return rc;
-}
-
-
-/* OpenRow
- *  open currently closed row indicated by row id
- */
-LIB_EXPORT rc_t CC VCursorOpenRow ( const VCursor *cself )
-{
-    rc_t rc;
-    VCursor *self = ( VCursor* ) cself;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcCursor, rcOpening, rcSelf, rcNull );
-    else if ( self -> state < vcReady )
-        rc = RC ( rcVDB, rcCursor, rcOpening, rcRow, rcIncomplete );
-    else if ( self -> state > vcReady )
-        rc = 0;
-    else
-        rc = VCursorOpenRowRead ( self );
-
-    return rc;
-}
-
-/* CloseRow
- *  balances OpenRow message
- *  if there are uncommitted modifications,
- *  discard all changes. otherwise,
- *  advance to next row
- */
-LIB_EXPORT rc_t CC VCursorCloseRow ( const VCursor *cself )
-{
-    rc_t rc;
-    VCursor *self = ( VCursor* ) cself;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcCursor, rcClosing, rcSelf, rcNull );
-    else if ( self -> state < vcRowOpen )
-        rc = 0;
-    else
-        rc = VCursorCloseRowRead ( self );
-
-    return rc;
-}
diff --git a/libs/vdb/database-cmn.c b/libs/vdb/database-cmn.c
deleted file mode 100644
index 0823127..0000000
--- a/libs/vdb/database-cmn.c
+++ /dev/null
@@ -1,928 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define KONST const
-#include "database-priv.h"
-#include "dbmgr-priv.h"
-#undef KONST
-
-#include "schema-priv.h"
-#include "linker-priv.h"
-
-#include <vdb/manager.h>
-#include <vdb/database.h>
-#include <kdb/kdb-priv.h>
-#include <kdb/manager.h>
-#include <kdb/database.h>
-#include <kdb/meta.h>
-#include <kdb/namelist.h>
-#include <vfs/manager.h>
-#include <vfs/resolver.h>
-#include <vfs/path.h>
-#include <klib/debug.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <klib/namelist.h>
-#include <klib/log.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * VDatabase
- *  opaque connection to a database within file system
- */
-
-
-/* Whack
- */
-rc_t CC VDatabaseWhack ( VDatabase *self )
-{
-    rc_t rc = 0;
-
-    KRefcountWhack ( & self -> refcount, "VDatabase" );
-
-    /* release user data */
-    if ( self -> user != NULL && self -> user_whack != NULL )
-    {
-        ( * self -> user_whack ) ( self -> user );
-        self -> user = NULL;
-        self -> user_whack = NULL;
-    }
-
-    /* release dad */
-    if ( self -> dad != NULL )
-    {
-        rc = VDatabaseSever ( self -> dad );
-        if ( rc == 0 )
-            self -> dad = NULL;
-    }
-    /* release cache_db */
-    if ( self -> cache_db != NULL)
-    {
-	rc = VDatabaseRelease ( self -> cache_db );
-	if ( rc == 0 )
-		self -> cache_db = NULL;
-    }
-
-    /* remove from mgr */
-    if ( rc == 0 )
-        rc = VDBManagerSever ( self -> mgr );
-
-    if ( rc == 0 )
-    {
-        /* complete */
-        KMetadataRelease ( self -> meta );
-        KDatabaseRelease ( self -> kdb );
-        VSchemaRelease ( self -> schema );
-
-        free ( self );
-        return 0;
-    }
-
-    KRefcountInit ( & self -> refcount, 1, "VDatabase", "whack", "vdb" );
-    return rc;
-}
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC VDatabaseAddRef ( const VDatabase *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "VDatabase" ) )
-        {
-        case krefLimit:
-            return RC ( rcVDB, rcDatabase, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VDatabaseRelease ( const VDatabase *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "VDatabase" ) )
-        {
-        case krefWhack:
-            return VDatabaseWhack ( ( VDatabase* ) self );
-        case krefNegative:
-            return RC ( rcVDB, rcDatabase, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Attach
- * Sever
- *  internal reference management
- */
-VDatabase *VDatabaseAttach ( const VDatabase *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "VDatabase" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( VDatabase* ) self;
-}
-
-rc_t VDatabaseSever ( const VDatabase *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "VDatabase" ) )
-        {
-        case krefWhack:
-            return VDatabaseWhack ( ( VDatabase* ) self );
-        case krefNegative:
-            return RC ( rcVDB, rcDatabase, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Make - PRIVATE
- *  creates an initialized database object
- *  expects a mgr and optionally a parent db,
- *  enforces schema validity according to some rules,
- */
-rc_t VDatabaseMake ( VDatabase **dbp,
-    const VDBManager *mgr, const VDatabase *dad, const VSchema *schema )
-{
-    rc_t rc;
-
-    /* create a structure */
-    VDatabase *db = calloc ( 1, sizeof * db );
-    if ( db == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        /* create a modifiable schema */
-        rc = VSchemaMake ( ( VSchema** ) & db -> schema, schema );
-        if ( rc == 0 )
-        {
-            db -> mgr = VDBManagerAttach ( mgr );
-            db -> dad = VDatabaseAttach ( dad );
-            KRefcountInit ( & db -> refcount, 1, "VDatabase", "make", "vdb" );
-
-            * dbp = db;
-            return 0;
-        }
-
-        VDatabaseWhack ( db );
-    }
-
-    * dbp = NULL;
-
-    return rc;
-}
-
-
-/* OpenRead
- *  finish opening a db for read
- */
-static
-rc_t CC VDatabaseOpenRead ( VDatabase *self )
-{
-    /* open metadata */
-    rc_t rc = KDatabaseOpenMetadataRead ( self -> kdb, & self -> meta );
-    if ( rc == 0 )
-    {
-        /* fetch stored schema */
-        rc = VDatabaseLoadSchema ( self );
-        if ( rc == 0 && self -> sdb == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcOpening, rcSchema, rcNotFound );
-    }
-
-    DBGMSG(DBG_VDB, DBG_FLAG(DBG_VDB_VDB), ("VDatabaseOpenRead = %d\n", rc));
-
-    return rc;
-}
-
-
-/* OpenDBRead
- * VOpenDBRead
- *  open a database for read
- *
- *  "db" [ OUT ] - return parameter for newly opened database
- *
- *  "schema" [ IN, NULL OKAY ] - schema object containg database
- *  declaration to be used in creating db.
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to database
- */
-static
-rc_t VDBManagerVPathOpenLocalDBRead ( const VDBManager *self,
-    const VDatabase **dbp, const VSchema *schema, const VPath * path )
-{
-    rc_t rc;
-    VDatabase * db;
-
-    if ( schema == NULL )
-        schema = self -> schema;
-
-    rc = VDatabaseMake ( & db, self, NULL, schema );
-    if ( rc == 0 )
-    {
-        db -> read_only = true;
-
-        rc = KDBManagerVPathOpenLocalDBRead ( self -> kmgr, & db -> kdb, path );
-        if ( rc == 0 )
-        {
-            rc = VDatabaseOpenRead ( db );
-            if ( rc == 0 )
-            {
-                * dbp = db;
-                return 0;
-            }
-        }
-        
-        VDatabaseWhack ( db );
-    }
-
-    return rc;
-}
-
-static
-rc_t VDBManagerVPathOpenRemoteDBRead ( const VDBManager *self,
-    const VDatabase **dbp, const VSchema *schema, const VPath * remote, const VPath * cache )
-{
-    rc_t rc;
-    VDatabase * db;
-
-    if ( schema == NULL )
-        schema = self -> schema;
-
-    rc = VDatabaseMake ( & db, self, NULL, schema );
-    if ( rc == 0 )
-    {
-        db -> read_only = true;
-
-        rc = KDBManagerVPathOpenRemoteDBRead ( self -> kmgr, & db -> kdb, remote, cache );
-        if ( rc == 0 )
-        {
-            rc = VDatabaseOpenRead ( db );
-            if ( rc == 0 )
-            {
-                * dbp = db;
-                return 0;
-            }
-        }
-        
-        VDatabaseWhack ( db );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDBManagerVOpenDBRead ( const VDBManager *self,
-    const VDatabase ** dbp, const VSchema *schema,
-    const char * path_fmt, va_list args )
-{
-    rc_t rc;
-
-    if ( dbp == NULL )
-        rc = RC ( rcVDB, rcMgr, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcMgr, rcOpening, rcSelf, rcNull );
-        else
-        {
-            /* need VFS manager to make a path */
-            VFSManager * vfs;
-            rc = KDBManagerGetVFSManager ( self -> kmgr, & vfs );
-            if ( rc == 0 )
-            {
-                /* get a reference to its pre-built resolver */
-                VResolver * resolver;
-                rc = VFSManagerGetResolver ( vfs, & resolver );
-                if ( rc == 0 )
-                {
-                    /* turn spec in "path_fmt" + "args" into VPath "orig" */
-                    VPath * orig;
-                    rc = VFSManagerVMakePath ( vfs, & orig, path_fmt, args );
-                    if ( rc == 0 )
-                    {
-                        /* the original VPath may get resolved into other paths */
-                        const VPath * plocal = NULL, * premote = NULL, * pcache = NULL;
-                        
-                        /* check whether we were given a path or accession */
-                        bool is_accession = VPathIsAccessionOrOID ( orig );
-
-                        /* if the original is not an accession */
-                        if ( ! is_accession )
-                        {
-                            /* just create a new reference to original */
-                            rc = VPathAddRef ( orig );
-                            if ( rc == 0 )
-                                plocal = orig;
-                        }
-                        else
-                        {
-                            /* otherwise, ask resolver to find a local path,
-                               or get a remote path and optional place to cache data */
-                            rc = VResolverQuery ( resolver, eProtocolHttp, orig, & plocal, & premote, & pcache );
-                            if ( rc != 0 && GetRCState ( rc ) == rcNotFound )
-                            {
-                                rc = VPathAddRef ( orig );
-                                if ( rc == 0 )
-                                {
-                                    plocal = orig;
-                                }
-
-                            }
-                        }
-                        if ( rc == 0 )
-                        {
-                            /* now open the principal database */
-                            if ( plocal != NULL )
-                                rc = VDBManagerVPathOpenLocalDBRead ( self, dbp, schema, plocal );
-                            else if ( premote != NULL )
-                                rc = VDBManagerVPathOpenRemoteDBRead ( self, dbp, schema, premote, pcache );
-                            else
-                            {
-                                /* resolver was unable to resolve this, so perhaps it was
-                                   not an accession or OID, but a simple file name */
-                                rc = VPathAddRef ( orig );
-                                if ( rc == 0 )
-                                {
-                                    plocal = orig;
-                                    rc = VDBManagerVPathOpenLocalDBRead ( self, dbp, schema, plocal );
-                                }
-                            }
-                            if ( rc == 0 )
-                            {
-                                rc_t rc2;
-                                const VDatabase * db = * dbp;
-                                if ( VDatabaseIsCSRA ( db ) )
-                                {
-                                    /* CSRA databases may have an associated "vdbcache" */
-                                    const VDatabase * vdbcache = NULL;
-                                    VPath * clocal = NULL, * cremote = NULL, * ccache = NULL;
-
-                                    /* if principal was local */
-                                    if ( plocal != NULL )
-                                    {
-                                        rc2 = VFSManagerMakePathWithExtension ( vfs, & clocal, plocal, ".vdbcache" );
-                                        if ( rc2 == 0 )
-                                        {
-                                            rc2 = VDBManagerVPathOpenLocalDBRead ( self, & vdbcache, schema, clocal );
-                                            if ( rc2 != 0 )
-                                            {
-                                                rc2 = 0;
-                                                if ( ! is_accession )
-                                                {
-                                                    VPath * acc;
-                                                    rc2 = VFSManagerExtractAccessionOrOID ( vfs, & acc, orig );
-                                                    if ( rc2 == 0 )
-                                                    {
-                                                        VPathRelease ( orig );
-                                                        orig = acc;
-                                                    }
-                                                }
-
-                                                /* was not found locally - try to get one remotely */
-                                                if ( rc2 == 0 )
-                                                {
-                                                        /* We need suppress error message in the 
-                                                         * case if here any error happened
-                                                         */
-                                                    KLogLevel lvl = KLogLevelGet ();
-                                                    KLogLevelSet ( klogFatal );
-                                                    assert ( premote == NULL );
-                                                    assert ( pcache == NULL );
-                                                    rc2 = VResolverQuery ( resolver, eProtocolHttp, orig, NULL, & premote, & pcache );
-                                                    assert ( ( rc2 == 0 ) ||
-                                                        ( rc2 != 0 && premote == NULL ) );
-
-                                                        /* Here we are restoring log level
-                                                         */
-                                                    KLogLevelSet ( lvl );
-                                                }
-                                            }
-                                        }
-                                    }
-
-                                    /* if principal was remote, or attempting remote vdbcache */
-                                    if ( premote != NULL )
-                                    {
-                                        rc2 = VFSManagerMakePathWithExtension ( vfs, & cremote, premote, ".vdbcache" );
-                                        if ( rc2 == 0 && pcache != NULL )
-                                            rc2 = VFSManagerMakePathWithExtension ( vfs, & ccache, pcache, ".vdbcache" );
-                                        if ( rc2 == 0 )
-                                            rc2 = VDBManagerVPathOpenRemoteDBRead ( self, & vdbcache, schema, cremote, ccache );
-                                    }
-
-                                    VPathRelease ( clocal );
-                                    VPathRelease ( cremote );
-                                    VPathRelease ( ccache );
-
-                                    /* if "vdbcache" is anything but NULL, we got the cache */
-                                    ( ( VDatabase* ) db ) -> cache_db = vdbcache;
-                                }
-                            }
-
-                            VPathRelease ( plocal );
-                            VPathRelease ( premote );
-                            VPathRelease ( pcache );
-                        }
-                        
-                        VPathRelease ( orig );
-                    }
-
-                    VResolverRelease ( resolver );
-                }
-
-                VFSManagerRelease ( vfs );
-            }
-        }
-
-        if ( rc != 0 )
-            * dbp = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDBManagerOpenDBRead ( const VDBManager *self,
-    const VDatabase **db, const VSchema *schema,
-    const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = VDBManagerVOpenDBRead ( self, db, schema, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseVOpenDBRead ( const VDatabase *self,
-    const VDatabase **dbp, const char *name, va_list args )
-{
-    rc_t rc;
-
-    if ( dbp == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcOpening, rcSelf, rcNull );
-        else
-        {
-            VDatabase *db;
-            rc = VDatabaseMake ( & db, self -> mgr, self, self -> schema );
-            if ( rc == 0 )
-            {
-                db -> read_only = true;
-
-                rc = KDatabaseVOpenDBRead ( self -> kdb, & db -> kdb, name, args );
-                if ( rc == 0 )
-                {
-                    rc = VDatabaseOpenRead ( db );
-                    if ( rc == 0 )
-                    {
-                        * dbp = db;
-                        return 0;
-                    }
-                }
-
-                VDatabaseWhack ( db );
-            }
-        }
-
-        * dbp = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseOpenDBRead ( const VDatabase *self,
-    const VDatabase **db, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VDatabaseVOpenDBRead ( self, db, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* Locked
- *  returns true if locked
- */
-LIB_EXPORT bool CC VDatabaseLocked ( const VDatabase *self )
-{
-    /* TBD - no concept of virtual database locking
-       other than physical database locking */
-    if ( self != NULL )
-        return KDatabaseLocked ( self -> kdb );
-    return false;
-}
-
-
-/* IsAlias
- *  returns true if object name is an alias
- *  returns path to fundamental name if it was aliased
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - optional output buffer
- *  for fundamenta object name if "alias" is not a fundamental name, 
- *
- *  "name" [ IN ] - NUL terminated object name
- */
-LIB_EXPORT bool CC VDatabaseIsAlias ( const VDatabase *self, uint32_t type,
-    char *resolved, size_t rsize, const char *name )
-{
-    if ( self != NULL )
-        return KDatabaseIsAlias ( self -> kdb, type, resolved, rsize, name );
-
-    if ( resolved != NULL && rsize != 0 )
-        * resolved = 0;
-
-    return false;
-}
-
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC VDatabaseVWritable ( const VDatabase *self, uint32_t type, 
-        const char *name, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-    else
-        rc = KDatabaseVWritable ( self -> kdb, type, name, args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseWritable ( const VDatabase *self, uint32_t type, const char *name, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, name );
-
-    rc = VDatabaseVWritable ( self, type, name, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-/* OpenMetadataRead
- *  opens metadata for read
- *
- *  "meta" [ OUT ] - return parameter for metadata
- */
-LIB_EXPORT rc_t CC VDatabaseOpenMetadataRead ( const VDatabase *self, const KMetadata **meta )
-{
-    rc_t rc;
-    if ( meta == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        * meta = NULL;
-
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            /* we operate under the notion of
-               single-threaded operation, so hand out
-               read or update capable object */
-            rc = KMetadataAddRef ( self -> meta );
-            if ( rc == 0 )
-                * meta = self -> meta;
-        }
-    }
-
-    return rc;
-}
-
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC VDatabaseOpenManagerRead ( const VDatabase *self, const VDBManager **mgr )
-{
-    rc_t rc;
-
-    if ( mgr == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = VDBManagerAddRef ( self -> mgr );
-            if ( rc == 0 )
-            {
-                * mgr = self -> mgr;
-                return 0;
-            }
-        }
-
-        * mgr = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenParent
- *  duplicate reference to parent database
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC VDatabaseOpenParentRead ( const VDatabase *self, const VDatabase **par )
-{
-    rc_t rc;
-
-    if ( par == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = VDatabaseAddRef ( self -> dad );
-            if ( rc == 0 )
-            {
-                * par = self -> dad;
-                return 0;
-            }
-        }
-
-        * par = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenSchema
- *  duplicate reference to table schema
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC VDatabaseOpenSchema ( const VDatabase *self, const VSchema **schema )
-{
-    rc_t rc;
-
-    if ( schema == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = VSchemaAddRef ( self -> schema );
-            if ( rc == 0 )
-            {
-                * schema = self -> schema;
-                return 0;
-            }
-        }
-
-        * schema = NULL;
-    }
-
-    return rc;
-}
-
-
-/* lists the tables of the database
- * 
- * "names" [ OUT ] - return parameter for tables 
- */
-LIB_EXPORT rc_t CC VDatabaseListTbl ( const VDatabase *self, KNamelist **names )
-{
-    rc_t rc;
-
-    if ( names == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcListing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcListing, rcSelf, rcNull );
-        else
-        {
-            if ( self->kdb == NULL )
-                rc = RC ( rcVDB, rcDatabase, rcListing, rcParam, rcNull );
-            else
-            {
-                return KDatabaseListTbl ( self->kdb, names );
-            }
-        }
-        *names = NULL;
-    }
-    return rc;
-}
-
-/* lists the sub-databases of the database
- * 
- * "names" [ OUT ] - return parameter for databases 
- */
-LIB_EXPORT rc_t CC VDatabaseListDB ( const VDatabase *self, KNamelist **names )
-{
-    rc_t rc;
-
-    if ( names == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcListing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcListing, rcSelf, rcNull );
-        else
-        {
-            if ( self->kdb == NULL )
-                rc = RC ( rcVDB, rcDatabase, rcListing, rcParam, rcNull );
-            else
-            {
-                return KDatabaseListDB ( self->kdb, names );
-            }
-        }
-        *names = NULL;
-    }
-    return rc;
-}
-
-/* GetUserData
- * SetUserData
- *  store/retrieve an opaque pointer to user data
- */
-LIB_EXPORT rc_t CC VDatabaseGetUserData ( const VDatabase *self, void **data )
-{
-    rc_t rc;
-
-    if ( data == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * data = self -> user;
-            return 0;
-        }
-
-        * data = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseSetUserData ( const VDatabase *cself,
-    void *data, void ( CC * destroy ) ( void *data ) )
-{
-    VDatabase *self = ( VDatabase* ) cself;
-    if ( cself == NULL )
-        return RC ( rcVDB, rcDatabase, rcUpdating, rcSelf, rcNull );
-
-    self -> user = data;
-    self -> user_whack = destroy;
-
-    return 0;
-}
-
-
-/* OpenKDatabase
- *  returns a new reference to underlying KDatabase
- */
-LIB_EXPORT rc_t CC VDatabaseOpenKDatabaseRead ( const VDatabase *self, const KDatabase **kdb )
-{
-    rc_t rc;
-
-    if ( kdb == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDatabaseAddRef ( self -> kdb );
-            if ( rc == 0 )
-            {
-                * kdb = self -> kdb;
-                return 0;
-            }
-        }
-
-        * kdb = NULL;
-    }
-
-    return rc;
-}
-
-
-
-/* Typespec
- *  retrieve db typespec
- *
- *  AVAILABILITY: version 2.2
- *
- *  "ts_buff" [ IN ] and "ts_size" [ IN ] - buffer for return of NUL-terminated
- *  db typespec, e.g. 'NCBI:db:abc#1.1'
- */
-LIB_EXPORT rc_t CC VDatabaseTypespec ( const VDatabase *self, char *ts_buff, size_t ts_size )
-{
-    rc_t rc;
-
-    if ( ts_size == 0 )
-        rc = RC ( rcVDB, rcDatabase, rcAccessing, rcBuffer, rcInsufficient );
-    else if ( ts_buff == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcAccessing, rcBuffer, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc_t rc2;
-            rc2 = string_printf ( ts_buff, ts_size, NULL, "%N#%V", self -> sdb -> name, self -> sdb -> version );
-            if ( rc2 == 0 )
-                return 0;
-            rc = rc2;
-        }
-
-        ts_buff [ 0 ] = 0;
-    }
-
-    return rc;
-}
-
-
-/* IsCSRA
- *  ask an open database if it conforms to cSRA schema
- */
-LIB_EXPORT bool CC VDatabaseIsCSRA ( const VDatabase *self )
-{
-    if ( self != NULL )
-    {
-        if ( KDatabaseExists ( self -> kdb, kptTable, "PRIMARY_ALIGNMENT" ) )
-        {
-            return KDatabaseExists ( self -> kdb, kptTable, "SEQUENCE" );
-        }
-    }
-
-    return false;
-}
diff --git a/libs/vdb/database-depend.c b/libs/vdb/database-depend.c
deleted file mode 100644
index 72e8cfc..0000000
--- a/libs/vdb/database-depend.c
+++ /dev/null
@@ -1,1807 +0,0 @@
-/*==============================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include <vdb/vdb-priv.h> /* VDBManagerGetKDBManagerRead */
-#include <vdb/manager.h> /* VDBManagerRelease */
-#include <vdb/cursor.h>
-#include <vdb/table.h>
-#include <vdb/database.h>
-#include <vdb/dependencies.h>
-
-#include <kdb/kdb-priv.h> /* KDBManagerGetVFSManager */
-#include <kdb/manager.h>
-
-#include <vfs/manager.h> /* VFSManager */
-#include <vfs/resolver.h> /* VResolver */
-#include <vfs/path.h>
-
-#include <kfg/config.h>
-
-#include <klib/container.h>
-#include <klib/debug.h> /* DBG_VDB */
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/printf.h> /* string_printf */
-#include <klib/rc.h>
-#include <klib/text.h>
-
-#include <sysalloc.h>
-
-#include "cursor-priv.h"
-
-/* missing macros/function from klib/rc.h
- */
-#define GetRCSTATE( rc ) \
-    ( ( rc ) & 0x00003FFF )
-#define RC_STATE( obj, state)                         \
-    ( rc_t ) ( ( ( rc_t ) ( obj ) << 6 ) |            \
-               ( ( rc_t ) ( state ) ) )
-
-#include <assert.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifndef PATH_MAX
-#define PATH_MAX 4096
-#endif
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
-
-static bool OLD = true;
-
-typedef struct {
-    /* deprecated way */
-    char ref[PATH_MAX + 1];
-
-    /* new way */
-    const String *local;
-    const String *remote;
-    const String *cache;
-
-    uint32_t count;
-    rc_t rc;
-} Resolved;
-typedef struct {
-    BSTNode n;
-
-    bool circular;
-    char* name;
-    uint32_t readLen;
-    char* seqId;
-    bool local;
-
-    Resolved resolved;
-} RefNode;
-static rc_t _ResolvedRelease(Resolved *self) {
-    rc_t rc = 0;
-
-    assert(self);
-
-    free((void*)self->local);
-    free((void*)self->cache);
-    free((void*)self->remote);
-
-    memset(self, 0, sizeof *self);
-
-    return rc;
-}
-
-
-static void CC bstWhack( BSTNode* n, void* ignore )
-{
-    RefNode* sn = (RefNode*) n;
-
-    assert( sn );
-
-    free( sn->name );
-
-    free( sn->seqId );
-
-    _ResolvedRelease( &sn->resolved );
-
-    memset( sn, 0, sizeof *sn );
-
-    free( sn );
-}
-
-static
-int64_t CC bstCmpBySeqId(const void* item, const BSTNode* n)
-{
-    const char* s1 = item;
-    const RefNode* sn = (const RefNode*) n;
-
-    assert(s1 && sn);
-
-    return strcmp(s1, sn->seqId);
-}
-
-static int64_t CC bstCmpByRemote(const void* item, const BSTNode* n)
-{
-    const String* s1 = item;
-    const RefNode* sn = (const RefNode*) n;
-
-    assert(sn);
-
-    if (s1 == NULL) {
-        return sn->resolved.remote != NULL;
-    }
-    else {
-        size_t min = s1->size < sn->resolved.remote->size
-            ? s1->size : sn->resolved.remote->size;
-        return strncmp(s1->addr, sn->resolved.remote->addr, min);
-    }
-}
-
-static
-int64_t CC bstSortBySeqId(const BSTNode* item, const BSTNode* n)
-{
-    const RefNode* sn = (const RefNode*) item;
-
-    return bstCmpBySeqId(sn->seqId, n);
-}
-
-static
-int64_t CC bstSortByRemote(const BSTNode* item, const BSTNode* n)
-{
-    const RefNode* sn = (const RefNode*) item;
-
-    return bstCmpByRemote(sn->resolved.remote, n);
-}
-
-typedef struct Column {
-    uint32_t idx;
-    const char* name;
-    uint32_t expected;
-    uint32_t elem_bits;
-} Column;
-
-static
-rc_t AddColumn(rc_t rc, const VCursor* curs, Column* col)
-{
-    if (rc == 0) {
-        assert(curs && col);
-
-        rc = VCursorAddColumn(curs, &col->idx, "%s", col->name);
-        if (rc != 0) {
-            DBGMSG(DBG_VDB, DBG_FLAG(DBG_VDB),
-                ("Cannot Add Column %s", col->name));
-        }
-    }
-
-    return rc;
-}
-
-/* Read a column data from a Cursor */
-static
-rc_t CursorRead(rc_t rc, const VCursor* curs, int64_t row_id,
-    const Column* col, void* buffer, uint32_t blen, uint32_t* row_len)
-{
-    assert(curs);
-
-    if (rc == 0) {
-        uint32_t elem_bits = col->elem_bits;
-        uint32_t expected = col->expected;
-        assert(col);
-
-        if (blen == 0) {
-            assert(buffer == NULL);
-            ++blen;
-        }
-
-        rc = VCursorReadDirect
-            (curs, row_id, col->idx, elem_bits, buffer, blen - 1, row_len);
-
-        if (rc != 0) {
-            if (buffer == NULL &&
-                rc == RC(rcVDB, rcCursor, rcReading, rcBuffer, rcInsufficient))
-            {
-                rc = 0;
-            }
-        }
-        else {
-            if (expected > 0 && *row_len != expected) {
-                rc = RC(rcVDB, rcCursor, rcReading, rcData, rcUnexpected);
-            }
-            if (buffer != NULL && expected == 0)
-            {   ((char*)buffer)[*row_len] = '\0'; }
-        }
-    }
-
-    return rc;
-}
-
-#if 0
-/* Read a String from Configuration into "value" buffer */
-static rc_t ReadCfgStr
-(const KConfig* kfg, const char* path, char* value, size_t value_sz)
-{
-    rc_t rc = 0;
-    const KConfigNode *node = NULL;
-
-    rc = KConfigOpenNodeRead(kfg, &node, "%s", path);
-    if (rc == 0) {
-        size_t num_read = 0;
-        size_t remaining = 0;
-        rc = KConfigNodeRead
-            (node, 0, value, value_sz - 1, &num_read, &remaining);
-        if (rc == 0) {
-            if (remaining != 0)
-            {   rc = RC(rcVDB, rcString, rcReading, rcSize, rcExcessive); }
-/* TODO: make sure check value[num_read] assignment is valid
-         when remaining == 0 */
-            else { value[num_read] = '\0'; }
-        }
-    }
-
-    RELEASE(KConfigNode, node);
-
-    return rc;
-}
-#endif
-
-#define SIZE 4096
-
-/* Ctx struct is used to find a file using KConfig "refseq" parameters */
-typedef struct {
-    KDirectory* dir;
-
-    char servers[SIZE];
-    char volumes[SIZE];
-    char paths[SIZE];
-
-    VResolver* resolver;
-
-    const Resolved* last;
-    bool hasDuplicates;
-} Ctx;
-static rc_t CtxInit(Ctx* self, const VDatabase *db) {
-    rc_t rc = 0;
-    KConfig* cfg = NULL;
-
-    assert(self && db);
-
-    memset(self, 0, sizeof *self);
-
-    if (rc == 0) {
-        rc = KConfigMake(&cfg, NULL);
-        if (rc == 0) {
-            const KConfigNode *node = NULL;
-            rc = KConfigOpenNodeRead(cfg, &node, "repository");
-            if (rc == 0) {
-                OLD = false;
-                LOGMSG(klogInfo, "KConfig(repository) found: using VResolver");
-            }
-            else {
-                OLD = true;
-                LOGMSG(klogInfo,
-                    "KConfig(repository) not found: not using VResolver");
-            }
-            RELEASE(KConfigNode, node);
-        }
-    }
-
-#if 0
-    if (OLD) {
-        if (self->dir != NULL) {
-            return rc;
-        }
-
-        rc = KDirectoryNativeDir(&self->dir);
-
-        if (rc == 0) {
-            const char path[] = "refseq/servers";
-            rc = ReadCfgStr(cfg, path, self->servers, sizeof self->servers);
-            if (rc != 0) {
-                if (GetRCState(rc) == rcNotFound)
-                {   rc = 0; }
-            }
-            else {
-                const char path[] = "refseq/volumes";
-                rc = ReadCfgStr(cfg, path, self->volumes, sizeof self->volumes);
-                if (rc != 0) {
-                    if (GetRCState(rc) == rcNotFound)
-                    {   rc = 0; }
-                }
-            }
-
-            if (rc == 0) {
-                const char path[] = "refseq/paths";
-                rc = ReadCfgStr(cfg, path, self->paths, sizeof self->paths);
-                if (rc != 0) {
-                    if (GetRCState(rc) == rcNotFound)
-                    {   rc = 0; }
-                }
-            }
-        }
-    }
-    else
-#endif
-    {
-        VFSManager* vfsmgr = NULL;
-        const KDBManager* kmgr = NULL;
-        const VDBManager *mgr = NULL;
-
-        if (rc == 0) {
-            rc = VDatabaseOpenManagerRead(db, &mgr);
-        }
-
-        if (rc == 0) {
-            rc = VDBManagerGetKDBManagerRead(mgr, &kmgr);
-        }
-
-        if (rc == 0) {
-            rc = KDBManagerGetVFSManager(kmgr, &vfsmgr);
-        }
-
-        if (rc == 0) {
-            rc = VFSManagerGetResolver(vfsmgr, &self->resolver);
-        }
-
-        RELEASE(VFSManager, vfsmgr);
-        RELEASE(KDBManager, kmgr);
-        RELEASE(VDBManager, mgr);
-    }
-
-    RELEASE(KConfig, cfg);
-
-    return rc;
-}
-
-static rc_t CtxDestroy(Ctx* self) {
-    rc_t rc = 0;
-
-    assert(self);
-
-    RELEASE(KDirectory, self->dir);
-    RELEASE(VResolver, self->resolver);
-
-    memset(self, 0, sizeof *self);
-
-    return rc;
-}
-
-typedef struct {
-    const char* file;
-    bool found;
-} FindRefseq;
-#if 0
-static rc_t CC is_file_in_dir(const KDirectory* dir,
-    uint32_t type, const char* name, void* data)
-{
-    rc_t rc = 0;
-
-    FindRefseq* t = data;
-
-    assert(dir && name && data && t->file);
-
-    if (strcmp(t->file, name) == 0) {
-        uint64_t size = 0;
-        rc = KDirectoryFileSize(dir, &size, "%s", name);
-        if (rc == 0 && size > 0) {
-            /* compensate configuration-assistant.perl behavior:
-               it used to create an empty refseq file
-               when failed to download it */
-            t->found = true;
-        }
-    }
-
-    return rc;
-}
-/* Find file within srv/vol. If found then copy complete path to buf.
- * Return true if found
- */
-static bool FindInDir(rc_t* aRc, const KDirectory* native, const char* srv,
-    const char* vol, const char* file, char* buf, size_t blen)
-{
-    rc_t rc = 0;
-
-    const KDirectory* dir = NULL;
-
-    FindRefseq t;
-
-    assert(aRc && native && srv && file && buf && blen);
-
-    rc = *aRc;
-
-    if (rc != 0)
-    {   return false; }
-
-    if (vol)
-    {   rc = KDirectoryOpenDirRead(native, &dir, false, "%s/%s", srv, vol); }
-    else
-    {   rc = KDirectoryOpenDirRead(native, &dir, false, "%s", srv); }
-
-    if (rc == 0) {
-        memset(&t, 0, sizeof t);
-        t.file = file;
-        rc = KDirectoryVVisit(dir, false, is_file_in_dir, &t, ".", NULL);
-        if (GetRCObject(rc) == rcDirectory && GetRCState(rc) == rcUnauthorized)
-        {   rc = 0; }
-
-        if (rc == 0 && t.found) {
-            if (vol) {
-                rc = KDirectoryResolvePath(native,
-                    true, buf, blen, "%s/%s/%s", srv, vol, file);
-            }
-            else {
-                rc = KDirectoryResolvePath(native,
-                    true, buf, blen, "%s/%s", srv, file);
-            }
-        }
-    }
-    else if (rc == SILENT_RC(rcFS,
-        rcDirectory, rcOpening, rcPath, rcIncorrect))
-    {
-        /* ignored nonexistent directory */
-        rc = 0;
-    }
-
-    RELEASE(KDirectory, dir);
-
-    *aRc = rc;
-
-    return t.found;
-}
-#endif
-#define rcResolver   rcTree
-static bool NotFoundByResolver(rc_t rc) {
-    if (GetRCModule(rc) == rcVFS) {
-        if (GetRCTarget(rc) == rcResolver) {
-            if (GetRCContext(rc) == rcResolving) {
-                if (GetRCState(rc) == rcNotFound) {
-                    return true;
-                }
-            }
-        }
-    }
-    return false;
-}
-
-/* find remote reference using VResolver */
-static rc_t FindRef(Ctx* ctx, const char* seqId, Resolved* resolved,
-    int cacheState)
-{
-    rc_t rc = 0;
-
-    VPath* acc = NULL;
-    const VPath *remote = NULL;
-    size_t num_writ = 0;
-    char ncbiAcc[512] = "";
-
-    assert(ctx && resolved);
-
-    if (cacheState != -1) {
-        VResolverCacheEnable(ctx->resolver, cacheState);
-    }
-
-    if (rc == 0) {
-        rc = string_printf(ncbiAcc, sizeof ncbiAcc, &num_writ,
-            "ncbi-acc:%s?vdb-ctx=refseq", seqId);
-        if (rc == 0 && num_writ > sizeof ncbiAcc) {
-            return RC(rcExe, rcFile, rcCopying, rcBuffer, rcInsufficient);
-        }
-    }
-
-    if (rc == 0)
-    {
-        VFSManager *mgr;
-        rc = VFSManagerMake ( & mgr );
-        if ( rc == 0 )
-        {
-            rc = VFSManagerMakePath ( mgr, &acc, "%s", ncbiAcc);
-            VFSManagerRelease ( mgr );
-        }
-    }
-
-    if (rc == 0) {
-        bool remoteNotFound = false;
-        const VPath *local = NULL;
-        rc = VResolverLocal(ctx->resolver, acc, &local);
-        if (rc == 0) {
-            rc = VPathMakeString(local, &resolved->local);
-            RELEASE(VPath, local);
-        }
-        else if (NotFoundByResolver(rc)) {
-            rc = 0;
-        }
-
-        if (rc == 0) {
-            rc = VResolverRemote(ctx->resolver, eProtocolHttp, acc, &remote);
-            if (rc == 0) {
-                rc = VPathMakeString(remote, &resolved->remote);
-                if (rc == 0) {
-                    char *fragment = string_chr(resolved->remote->addr,
-                        resolved->remote->size, '#');
-                    if (fragment != NULL) {
-                        *fragment = '\0';
-                    }
-                }
-            }
-            else if (NotFoundByResolver(rc)) {
-                remoteNotFound = true;
-                rc = 0;
-            }
-        }
-
-        if (rc == 0 && !remoteNotFound) {
-            uint64_t file_size = 0;
-            const VPath *cache = NULL;
-            rc = VResolverCache(ctx->resolver, remote, &cache, file_size);
-            if (rc == 0) {
-                rc = VPathMakeString(cache, &resolved->cache);
-            }
-            else if (NotFoundByResolver(rc)) {
-                rc = 0;
-            }
-            RELEASE(VPath, cache);
-        }
-
-        if (rc == 0) {
-            if (ctx->last == NULL) {
-                ctx->last = resolved;
-            }
-            else {
-                const String *last = ctx->last->remote;
-                const String *crnt = resolved->remote;
-                if (last != NULL && crnt != NULL &&
-                    last->addr != NULL && crnt->addr != NULL)
-                {
-                    int min = crnt->size < last->size ? crnt->size : last->size;
-                    if (strncmp(last->addr, crnt->addr, min) == 0) {
-                        ctx->hasDuplicates = true;
-                    }
-                }
-            }
-        }
-    }
-
-    RELEASE(VPath, remote);
-    RELEASE(VPath, acc);
-
-    if (cacheState != -1) {
-        VResolverCacheEnable(ctx->resolver, vrAlwaysDisable);
-    }
-
-    return rc;
-}
-#if 0
-/* find remote reference using KConfig values */
-static
-rc_t DeprecatedFindRef(Ctx* ctx, const char* seqId, Resolved* resolved)
-{
-    rc_t rc = 0;
-    bool found = false;
-
-    int i = ~0;
-
-    char* buf = NULL;
-    size_t blen = 0;
-
-    assert(ctx && seqId && resolved);
-
-    memset(resolved, 0, sizeof *resolved);
-    buf = resolved->ref;
-    blen = sizeof resolved->ref;
-
-    for (i = 0; i < 2 && !found; ++i) {
-        char prefix[7] = "";
-        if (i > 0) {
-            if (strlen(seqId) > 6) {
-                strncpy(prefix, seqId, 6);
-                prefix[6] = '\0';
-                seqId = prefix;
-            }
-            else {
-                break;
-            }
-        }
-        if (rc == 0 && ctx->dir != NULL) {
-            if (FindInDir(&rc, ctx->dir, ".", NULL, seqId, buf, blen)) {
-                found = true;
-            }
-            else {
-                if (ctx->paths[0]) {
-                    char paths[SIZE];
-                    char* path_rem = paths;
-                    char* path_sep = NULL;
-                    strcpy(paths, ctx->paths);
-                    do {
-                        char const* path = path_rem;
-                        path_sep = strchr(path, ':');
-                        if (path_sep) {
-                            path_rem = path_sep + 1;
-                            *path_sep = 0;
-                        }
-                        if (FindInDir(&rc, ctx->dir, path, NULL,
-                            seqId, buf, blen))
-                        {
-                            found = true;
-                            break;
-                        }
-                    } while(path_sep && rc == 0);
-                }
-                if (!found && ctx->servers[0] && ctx->volumes[0]) {
-                    char server[SIZE];
-                    char vol[SIZE];
-                    char* srv_sep = NULL;
-                    char* srv_rem = server;
-                    strcpy(server, ctx->servers);
-    /* TODO check for multiple servers/volumes */
-                    do {
-                        char* vol_rem = vol;
-                        char* vol_sep = NULL;
-                        strcpy(vol, ctx->volumes);
-                        srv_sep = strchr(server, ':');
-                        if (srv_sep) {
-                            srv_rem = srv_sep + 1;
-                            *srv_sep = '\0';
-                        }
-                        do {
-                            char const* volume = vol_rem;
-                            vol_sep = strchr(volume, ':');
-                            if (vol_sep) {
-                                vol_rem = vol_sep + 1;
-                                *vol_sep = 0;
-                            }
-                            if (FindInDir(&rc, ctx->dir, server, volume,
-                                seqId, buf, blen))
-                            {
-                                found = true;
-                                break;
-                            }
-                        } while (vol_sep && rc == 0);
-                    } while (!found && srv_sep && rc == 0);
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-#endif
-typedef struct {
-/* row values */
-    uint32_t readLen;
-    char circular[8];
-    char name[256];
-    char seqId[256];
-
-/* we do not read CMP_READ value, just its row_len */
-    uint32_t row_lenCMP_READ;
-} Row;
-/* Add a REFERENCE table Row to BSTree */
-static
-rc_t AddRow(BSTree* tr, Row* data, Ctx* ctx, int cacheState)
-{
-    rc_t rc = 0;
-    bool newRemote = false;
-    RefNode* sn = NULL;
-
-    assert(tr && data && ctx);
-
-    sn = (RefNode*) BSTreeFind(tr, data->seqId, bstCmpBySeqId);
-    if (sn == NULL) {
-        sn = calloc(1, sizeof *sn);
-        if (sn == NULL) {
-            return RC
-                (rcVDB, rcStorage, rcAllocating, rcMemory, rcExhausted);
-        }
-        sn->seqId = string_dup_measure(data->seqId, NULL);
-        if (sn->seqId == NULL) {
-            bstWhack((BSTNode*) sn, NULL);
-            sn = NULL;
-            return RC
-                (rcVDB, rcStorage, rcAllocating, rcMemory, rcExhausted);
-        }
-
-        sn->name = string_dup_measure(data->name, NULL);
-        if (sn->name == NULL) {
-            bstWhack((BSTNode*) sn, NULL);
-            sn = NULL;
-            return RC
-                (rcVDB, rcStorage, rcAllocating, rcMemory, rcExhausted);
-        }
-
-        sn->circular = data->circular[0];
-        sn->readLen = data->readLen;
-        sn->local = (data->row_lenCMP_READ != 0);
-        newRemote = ! sn->local;
-
-        BSTreeInsert(tr, (BSTNode*)sn, bstSortBySeqId);
-    }
-    else {
-        if (data->row_lenCMP_READ != 0) {
-            sn->local = true;
-        }
-        if (strcmp(sn->name, data->name) || sn->circular != data->circular[0]) {
-            return RC(rcVDB, rcCursor, rcReading, rcData, rcInconsistent);
-        }
-        sn->readLen += data->readLen;
-    }
-
-    if (rc == 0 && newRemote) {
-/*      if (OLD) {
-            rc = DeprecatedFindRef(ctx, sn->seqId, &sn->resolved);
-        }
-        else { */
-            rc = FindRef(ctx, sn->seqId, &sn->resolved, cacheState);
-/*      } */
-    }
-
-    return rc;
-}
-
-struct VDBDependencies {
-    uint32_t count;
-    RefNode** dependencies;
-
-    BSTree* tr;
-
-    /* open references */
-    KRefcount refcount;
-};
-typedef struct Initializer {
-    bool all;            /* IN: when false: process just missed */
-    bool fill;           /* IN:
-                          false: count(fill count); true: fill dep(use count) */
-    uint32_t count;      /* IO: all/missed count */
-    VDBDependencies* dep;/* OUT: to be filled */
-    uint32_t i;          /* PRIVATE: index in dep */
-    rc_t rc;             /* OUT */
-} Initializer;
-/* Work function to process dependencies tree
- * Input parameters are in Initializer:
- *  all (true: all dependencies, false: just missing)
- *  fill(false: count dependencies, true: fill dependencies array
- */
-static void CC bstProcess(BSTNode* n, void* data) {
-    RefNode* elm = (RefNode*) n;
-    Initializer* obj = (Initializer*) data;
-    bool go = false;
-
-    assert(elm && obj);
-
- /* remore reference && refseq table not found */
-    if (obj->all) {
-        go = true;
-    }
-    else if (!elm->local) {
-        if (OLD) {
-            if (elm->resolved.ref[0] == '\0') {
-                go = true;
-            }
-        }
-        else {
-            if (elm->resolved.local == NULL) {
-                go = true;
-            }
-        }
-    }
-
-    if (!go) {
-        return;
-    }
-
-    if (!obj->fill) {
-        ++obj->count;
-    }
-    else {
-        if (obj->dep == NULL || obj->dep->dependencies == NULL) {
-            return;
-        }
-        if (obj->i < obj->count) {
-            *(obj->dep->dependencies + ((obj->i)++)) = elm;
-        }
-        else {
-            obj->rc = RC(rcVDB, rcDatabase, rcAccessing, rcSelf, rcCorrupt);
-        }
-    }
-}
-
-/* Read REFERENCE table; fill in BSTree */
-static
-rc_t CC VDatabaseDependencies(const VDatabase *self, BSTree* tr,
-    bool* has_no_REFERENCE, bool* hasDuplicates, bool disableCaching)
-{
-    rc_t rc = 0;
-
-    int64_t i = 0;
-    int64_t firstId = 0;
-    int64_t lastId = 0;
-
-    Column CIRCULAR = { 0, "CIRCULAR", 1,  8 };
-    Column CMP_READ = { 0, "CMP_READ", 0,  8 };
-    Column NAME     = { 0, "NAME"    , 0,  8 };
-    Column READ_LEN = { 0, "READ_LEN", 1, 32 };
-    Column SEQ_ID   = { 0, "SEQ_ID",   0,  8 };
-
-    const VTable* tbl = NULL;
-    const VCursor* curs = NULL;
-
-    int cacheState = -1;
-
-    Ctx ctx;
-
-    assert(self && tr && has_no_REFERENCE);
-
-    *has_no_REFERENCE = false;
-
-    if (rc == 0) {
-        rc = CtxInit(&ctx, self);
-    }
-
-    if (rc == 0 && disableCaching) {
-        cacheState = VResolverCacheEnable(ctx.resolver, vrAlwaysDisable);
-    }
-
-
-    if (rc == 0) {
-        rc = VDatabaseOpenTableRead(self, &tbl, "REFERENCE");
-        if (GetRCState(rc) == rcNotFound) {
-            *has_no_REFERENCE = true;
-        }
-    }
-    if (rc == 0) {
-        rc = VTableCreateCursorReadInternal(tbl, &curs);
-    }
-
-    rc = AddColumn(rc, curs, &CIRCULAR);
-    rc = AddColumn(rc, curs, &CMP_READ);
-    rc = AddColumn(rc, curs, &NAME    );
-    rc = AddColumn(rc, curs, &READ_LEN);
-    rc = AddColumn(rc, curs, &SEQ_ID  );
-
-    if (rc == 0) {
-        rc = VCursorOpen(curs);
-    }
-    if (rc == 0) {
-        uint64_t count = 0;
-        rc = VCursorIdRange(curs, 0, &firstId, &count);
-        lastId = firstId + count - 1;
-    }
-
-    for (i = firstId; i <= lastId && rc == 0; ++i) {
-        uint32_t row_len = 0;
-        Row data;
-        if (rc == 0) {
-            rc = CursorRead(rc, curs, i, &CIRCULAR,
-                data.circular, sizeof data.circular, &row_len);
-            if (rc != 0) {
-                PLOGERR(klogErr, (klogErr, rc,
-                    "failed to read cursor(col='CIRCULAR', spot='$(id)')",
-                    "id=%ld", i));
-            }
-        }
-        if (rc == 0) {
-            rc = CursorRead(rc, curs, i, &CMP_READ,
-                NULL, 0, &data.row_lenCMP_READ);
-            if (rc != 0) {
-                PLOGERR(klogErr, (klogErr, rc,
-                    "failed to read cursor(col='CMP_READ', spot='$(id)')",
-                    "id=%ld", i));
-            }
-        }
-        if (rc == 0) {
-            rc = CursorRead(rc, curs, i, &NAME,
-                data.name, sizeof data.name, &row_len);
-            if (rc != 0) {
-                PLOGERR(klogErr, (klogErr, rc,
-                    "failed to read cursor(col='NAME', spot='$(id)')",
-                    "id=%ld", i));
-            }
-        }
-        if (rc == 0) {
-            rc = CursorRead(rc, curs, i, &READ_LEN,
-                &data.readLen, sizeof data.readLen, &row_len);
-            if (rc != 0) {
-                PLOGERR(klogErr, (klogErr, rc,
-                    "failed to read cursor(col='READ_LEN', spot='$(id)')",
-                    "id=%ld", i));
-            }
-        }
-        if (rc == 0) {
-            rc = CursorRead(rc, curs, i, &SEQ_ID,
-                data.seqId, sizeof data.seqId, &row_len);
-            if (rc != 0) {
-                PLOGERR(klogErr, (klogErr, rc,
-                    "failed to read cursor(col='SEQ_ID', spot='$(id)')",
-                    "id=%ld", i));
-            }
-        }
-        if (rc == 0) {
-            rc = AddRow(tr, &data, &ctx, cacheState);
-        }
-    }
-
-    if (rc == 0 && hasDuplicates != NULL) {
-        *hasDuplicates = ctx.hasDuplicates;
-    }
-
-    if (*has_no_REFERENCE) {
-        rc = 0;
-    }
-
-    if (cacheState != -1) {
-        VResolverCacheEnable(ctx.resolver, cacheState);
-    }
-
-    {
-        rc_t rc2 = CtxDestroy(&ctx);
-        if (rc == 0 && rc2 != 0) {
-            rc = rc2;
-        }
-    }
-
-    RELEASE(VCursor, curs);
-    RELEASE(VTable, tbl);
-
-    return rc;
-}
-
-/* Get dependency number "idx" */
-static
-rc_t VDBDependenciesGet(const VDBDependencies* self,
-    RefNode** dep, uint32_t idx)
-{
-    rc_t rc = 0;
-
-    assert(dep);
-
-    if (self == NULL) {
-        return RC(rcVDB, rcDatabase, rcAccessing, rcSelf, rcNull);
-    }
-
-    if (idx >= self->count) {
-        return RC(rcVDB, rcDatabase, rcAccessing, rcParam, rcExcessive);
-    }
-
-    *dep = *(self->dependencies + idx);
-    if (*dep == NULL) {
-        return RC(rcVDB, rcDatabase, rcAccessing, rcSelf, rcCorrupt);
-    }
-
-    return rc;
-}
-
-/* Count
- *  retrieve the number of dependencies
- *
- *  "count" [ OUT ] - return parameter for dependencies count
- */
-LIB_EXPORT rc_t CC VDBDependenciesCount(const VDBDependencies* self,
-    uint32_t* count)
-{
-    if (self == NULL) {
-        return RC(rcVDB, rcDatabase, rcAccessing, rcSelf, rcNull);
-    }
-
-    if (count == NULL) {
-        return RC(rcVDB, rcDatabase, rcAccessing, rcParam, rcNull);
-    }
-
-    *count = self->count;
-
-    return 0;
-}
-
-/* Circular */
-LIB_EXPORT rc_t CC VDBDependenciesCircular(const VDBDependencies* self,
-    bool* circular, uint32_t idx)
-{
-    rc_t rc = 0;
-    RefNode* dep = NULL;
-
-    if (circular == NULL) {
-        return RC(rcVDB, rcDatabase, rcAccessing, rcParam, rcNull);
-    }
-
-    rc = VDBDependenciesGet(self, &dep, idx);
-
-    if (rc == 0) {
-        *circular = dep->circular;
-    }
-
-    return rc;
-}
-
-/* Local
- *  retrieve local property
- *
- *  "local" [ OUT ] - true if object is stored internally
- *
- *  "idx" [ IN ] - zero-based index of dependency
- */
-LIB_EXPORT rc_t CC VDBDependenciesLocal(const VDBDependencies* self,
-    bool* local, uint32_t idx)
-{
-    rc_t rc = 0;
-    RefNode* dep = NULL;
-
-    if (local == NULL) {
-        return RC(rcVDB, rcDatabase, rcAccessing, rcParam, rcNull);
-    }
-
-    rc = VDBDependenciesGet(self, &dep, idx);
-
-    if (rc == 0) {
-        *local = dep->local;
-    }
-
-    return rc;
-}
-
-/* Name
- *
- * "name" [ OUT ] - returned pointed should not be released.
- *                  it becomes invalid after VDBDependenciesRelease
- */
-LIB_EXPORT rc_t CC VDBDependenciesName(const VDBDependencies* self,
-    const char** name, uint32_t idx)
-{
-    rc_t rc = 0;
-    RefNode* dep = NULL;
-
-    if (name == NULL) {
-        return RC(rcVDB, rcDatabase, rcAccessing, rcParam, rcNull);
-    }
-
-    rc = VDBDependenciesGet(self, &dep, idx);
-
-    if (rc == 0) {
-        *name = dep->name;
-    }
-
-    return rc;
-}
-
-static rc_t VDBDependencyGetPath(const String* from, const char** to) {
-    assert(to);
-
-    *to = NULL;
-
-    if (OLD) {
-        return 0;
-    }
-
-    if (from == NULL) {
-        return 0;
-    }
-
-    if (from->addr != NULL && from->size > 0 &&
-        from->addr[from->size - 1] != '\0' &&
-        from->addr[from->size] != '\0')
-    {
-        return RC(rcVDB, rcString, rcValidating, rcChar, rcInvalid);
-    }
-
-    *to = from->addr;
-    return 0;
-}
-
-/* Path
- *  for remote dependencies: returns:
- *                              path for resolved dependency,
- *                              NULL for missing dependency.
- *  returns NULL for local dependencies
- *
- * "path" [ OUT ] - returned pointed should not be released.
- *                  it becomes invalid after VDBDependenciesRelease
- */
-LIB_EXPORT rc_t CC VDBDependenciesPath(const VDBDependencies* self,
-    const char** path, uint32_t idx)
-{
-    rc_t rc = 0;
-    RefNode* dep = NULL;
-
-    if (path == NULL) {
-        return RC(rcVDB, rcDatabase, rcAccessing, rcParam, rcNull);
-    }
-
-    rc = VDBDependenciesGet(self, &dep, idx);
-
-    if (rc == 0) {
-        if (dep->local) {
-            *path = NULL;
-        }
-        else {
-            if (OLD) {
-                *path = dep->resolved.ref;
-            }
-            else {
-                rc = VDBDependencyGetPath(dep->resolved.local, path);
-            }
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDBDependenciesPathRemote(const VDBDependencies* self,
-    const char** path, uint32_t idx)
-{
-    rc_t rc = 0;
-    RefNode* dep = NULL;
-
-    if (path == NULL) {
-        return RC(rcVDB, rcDatabase, rcAccessing, rcParam, rcNull);
-    }
-
-    rc = VDBDependenciesGet(self, &dep, idx);
-
-    if (rc == 0) {
-        rc = VDBDependencyGetPath(dep->resolved.remote, path);
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDBDependenciesPathCache(const VDBDependencies* self,
-    const char** path, uint32_t idx)
-{
-    rc_t rc = 0;
-    RefNode* dep = NULL;
-
-    if (path == NULL) {
-        return RC(rcVDB, rcDatabase, rcAccessing, rcParam, rcNull);
-    }
-
-    rc = VDBDependenciesGet(self, &dep, idx);
-
-    if (rc == 0) {
-        rc = VDBDependencyGetPath(dep->resolved.cache, path);
-    }
-
-    return rc;
-}
-
-/* SeqId
- *
- * "seq_id" [ OUT ] - returned pointed should not be released.
- *                    it becomes invalid after VDBDependenciesRelease
- */
-LIB_EXPORT rc_t CC VDBDependenciesSeqId(const VDBDependencies* self,
-    const char** seq_id, uint32_t idx)
-{
-    rc_t rc = 0;
-    RefNode* dep = NULL;
-
-    if (seq_id == NULL) {
-        return RC(rcVDB, rcDatabase, rcAccessing, rcParam, rcNull);
-    }
-
-    rc = VDBDependenciesGet(self, &dep, idx);
-
-    if (rc == 0) {
-        *seq_id = dep->seqId;
-    }
-
-    return rc;
-}
-
-/* Type
- *
- * "type" [ OUT ] - a KDBPathType from kdb/manager.h
- */
-LIB_EXPORT rc_t CC VDBDependenciesType(const VDBDependencies* self,
-    uint32_t* type, uint32_t idx)
-{
-    rc_t rc = 0;
-    RefNode* dep = NULL;
-
-    if (type == NULL) {
-        return RC(rcVDB, rcDatabase, rcAccessing, rcParam, rcNull);
-    }
-
-    rc = VDBDependenciesGet(self, &dep, idx);
-
-    if (rc == 0) {
-        *type = kptTable;
-    }
-
-    return rc;
-}
-
-#define CLSNAME "VDBDependencies"
-
-VDB_EXTERN rc_t CC VDBDependenciesAddRef(const VDBDependencies* self ) {
-    if (self != NULL) {
-        switch (KRefcountAdd(&self->refcount, CLSNAME)) {
-            case krefLimit:
-                return RC(rcVDB, rcDatabase, rcAttaching, rcRange, rcExcessive);
-        }
-    }
-
-    return 0;
-}
-
-static rc_t VDBDependenciesWhack(VDBDependencies* self) {
-    if (self == NULL) {
-        return 0;
-    }
-
-    KRefcountWhack(&self->refcount, CLSNAME);
-
-    BSTreeWhack(self->tr, bstWhack, NULL);
-    free(self->tr);
-
-    free(self->dependencies);
-
-    memset(self, 0, sizeof *self);
-
-    free(self);
-
-    return 0;
-}
-
-/* Release
- *  (objects ARE NOT reference counted)
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC VDBDependenciesRelease(const VDBDependencies* self) {
-    if (self != NULL) {
-        switch (KRefcountDrop(&self->refcount, CLSNAME)) {
-        case krefWhack:
-            return VDBDependenciesWhack((VDBDependencies*)self);
-        case krefNegative:
-            return RC(rcVDB, rcDatabase, rcReleasing, rcRange, rcExcessive);
-        }
-    }
-
-    return 0;
-}
-
-typedef struct {
-    BSTree* tr;
-    int count;
-    bool all;
-} SBstCopy;
-static void CC bstCopy(BSTNode* n, void* data) {
-    RefNode* sn = NULL;
-    RefNode* elm = (RefNode*) n;
-    SBstCopy* x = (SBstCopy*)data;
-    BSTree* tr = x->tr;
-    bool go = false;
-    assert(elm && tr);
-
-    if (x->all) {
-        go = true;
-    } else if (!elm->local) {
-        assert(!OLD);
-        if (elm->resolved.local == NULL) {
-            go = true;
-        }
-    }
-
-    if (!go) {
-        return;
-    }
-
-    sn = (RefNode*) BSTreeFind(tr, elm->resolved.remote, bstCmpByRemote);
-    if (sn == NULL) {
-        sn = calloc(1, sizeof *sn);
-        if (sn == NULL) {
-/* TODO: generate error message */
-            return;
-        }
-
-        sn->seqId = string_dup_measure(elm->seqId, NULL);
-        if (sn->seqId == NULL) {
-            bstWhack((BSTNode*) sn, NULL);
-            return;
-        }
-
-        sn->name = string_dup_measure(elm->name, NULL);
-        if (sn->name == NULL) {
-            bstWhack((BSTNode*) sn, NULL);
-            return;
-        }
-
-        sn->circular = elm->circular;
-        sn->readLen = elm->readLen;
-        sn->local = elm->local;
-
-        sn->resolved.count = 1;
-
-        sn->resolved.local = elm->resolved.local;
-        elm->resolved.local = NULL;
-
-        sn->resolved.remote = elm->resolved.remote;
-        elm->resolved.remote = NULL;
-
-        sn->resolved.cache = elm->resolved.cache;
-        elm->resolved.cache = NULL;
-
-        BSTreeInsert(tr, (BSTNode*)sn, bstSortByRemote);
-        ++x->count;
-    }
-    else {
-        bool archived = false;
-        if (sn->resolved.rc != 0) {
-            return;
-        }
-        else if (sn->circular != elm->circular) {
-            sn->resolved.rc
-                = RC(rcVDB, rcNumeral, rcComparing, rcData, rcInvalid);
-        }
-        else if ((sn->name == NULL && elm->name != NULL)
-            || (sn->name != NULL && elm->name == NULL))
-        {
-            sn->resolved.rc
-                = RC(rcVDB, rcString, rcComparing, rcData, rcInvalid);
-        }
-        else if (strcmp(sn->name, elm->name) != 0) {
-            if (strncmp(sn->name, elm->name, 6) == 0) {
-                archived = true;
-            }
-            else {
-                sn->resolved.rc
-                    = RC(rcVDB, rcString, rcComparing, rcData, rcInvalid);
-            }
-        }
-
-        if (sn->resolved.rc != 0) {
-        }
-        else if (sn->readLen != elm->readLen && !archived) {
-            sn->resolved.rc
-                = RC(rcVDB, rcNumeral, rcComparing, rcData, rcInvalid);
-        }
-        else if (sn->seqId == NULL || elm->seqId == NULL) {
-            sn->resolved.rc
-                = RC(rcVDB, rcString, rcComparing, rcData, rcInvalid);
-        }
-        else if (sn->local != elm->local) {
-            sn->resolved.rc
-                = RC(rcVDB, rcNumeral, rcComparing, rcData, rcInvalid);
-        }
-        else if (sn->resolved.ref[0] != '\0' || elm->resolved.ref[0] != '\0') {
-            sn->resolved.rc
-                = RC(rcVDB, rcString, rcComparing, rcData, rcInvalid);
-        }
-        else if (sn->resolved.local != NULL || elm->resolved.local != NULL) {
-            sn->resolved.rc
-                = RC(rcVDB, rcString, rcComparing, rcData, rcInvalid);
-        }
-        else if (StringCompare(sn->resolved.remote, elm->resolved.remote) != 0)
-        {
-            int min = sn->resolved.remote->size < elm->resolved.remote->size
-                ? sn->resolved.remote->size : elm->resolved.remote->size;
-            if (!archived || strncmp(sn->resolved.remote->addr,
-                                elm->resolved.remote->addr, min) != 0)
-            {
-                sn->resolved.rc
-                    = RC(rcVDB, rcString, rcComparing, rcData, rcInvalid);
-            }
-        }
-
-        if (sn->resolved.rc != 0) {
-        }
-        else if (StringCompare(sn->resolved.cache, elm->resolved.cache) != 0)
-        {
-            sn->resolved.rc
-                = RC(rcVDB, rcString, rcComparing, rcData, rcInvalid);
-        }
-        else {
-            if (archived) {
-                int i = 0;
-                bool tail = false;
-                for (;;++i) {
-                    char* c1 = &sn->seqId[i];
-                    const char c2 = elm->seqId[i];
-                    if (*c1 == '\0') {
-                        break;
-                    }
-                    if (!tail && (c2 == '\0' || *c1 != c2)) {
-                        tail = true;
-                    }
-                    if (tail) {
-     /* incorrect:
-        we keep at least one seqid for archived refseqs to be able to resolve them
-                        *c1 = '.'; */
-                    }
-                }
-            }
-            ++sn->resolved.count;
-        }
-    }
-}
-
-/* ListDependencies
- *  create a dependencies object: list all dependencies
- *
- *  "dep" [ OUT ] - return for VDBDependencies object
- *
- *  "missing" [ IN ] - if true, list only missing dependencies
- *  otherwise, list all dependencies
- *
- * N.B. If missing == true then
- *     just one refseq dependency will be returned for 'container' Refseq files.
- */
-static rc_t VDatabaseListDependenciesImpl(const VDatabase* self,
-    const VDBDependencies** dep, bool missing, bool disableCaching)
-{
-    rc_t rc = 0;
-    VDBDependencies* obj = NULL;
-    bool all = ! missing;
-    bool has_no_REFERENCE = false;
-    bool hasDuplicates = false;
-
-    if (self == NULL) {
-        return RC(rcVDB, rcDatabase, rcAccessing, rcSelf, rcNull);
-    }
-    if (dep == NULL) {
-        return RC(rcVDB, rcDatabase, rcAccessing, rcParam, rcNull);
-    }
-
-    obj = calloc(1, sizeof *obj);
-    if (obj == NULL) {
-        return RC(rcVDB, rcStorage, rcAllocating, rcMemory, rcExhausted);
-    }
-
-    obj->tr = malloc(sizeof *obj->tr);
-    if (obj->tr == NULL) {
-        free(obj);
-        return RC(rcVDB, rcStorage, rcAllocating, rcMemory, rcExhausted);
-    }
-    BSTreeInit(obj->tr);
-
-    /* initialize dependencie tree */
-    rc = VDatabaseDependencies(self, obj->tr,
-        &has_no_REFERENCE, &hasDuplicates, disableCaching);
-    if (rc == 0 && has_no_REFERENCE) {
-        KRefcountInit(&obj->refcount, 1, CLSNAME, "make", "nodep");
-        *dep = obj;
-        return rc;
-    }
-
-    if (rc == 0) {
-        Initializer init;
-        memset(&init, 0, sizeof init);
-
-        /* count all/missing dependencies */
-        init.all = all;
-        init.fill = false;
-        BSTreeForEach(obj->tr, false, bstProcess, &init);
-     /* now init.count = number of (all == true ? 'all' : 'missed') references*/
-
-        rc = init.rc;
-        if (rc == 0) {
-            obj->count = init.count;
-        }
-
-        if (rc == 0 && missing && hasDuplicates) {
-            /* references have duplicates. e.g. AAAB01... */
-            SBstCopy x;
-            BSTree* tr = malloc(sizeof *tr);
-            if (tr == NULL) {
-                rc = RC(rcVDB, rcStorage, rcAllocating, rcMemory, rcExhausted);
-                return rc;
-            }
-            BSTreeInit(tr);
-            x.count = 0;
-            x.tr = tr;
-            x.all = all;
-
-         /* compact obj->tr into tr, skip duplicates
-            x.count is the number of all references from obj.tr */
-            BSTreeForEach(obj->tr, false, bstCopy, &x);
-            BSTreeWhack(obj->tr, bstWhack, NULL);
-            free(obj->tr);
-            obj->tr = tr;
-            obj->count = init.count = x.count;
-        }
-
-        if (rc == 0) {
-            /* initialize dependencies array with pointers to tree values */
-            if (obj->count > 0) {
-                obj->dependencies
-                    = calloc(obj->count, sizeof obj->dependencies);
-                if (obj->dependencies == NULL) {
-                    free(obj);
-                    return RC
-                        (rcVDB, rcStorage, rcAllocating, rcMemory, rcExhausted);
-                }
-                init.fill = true;
-                init.dep = obj;
-                BSTreeForEach(obj->tr, false, bstProcess, &init);
-                rc = init.rc;
-                if (rc == 0 && init.i != init.count) {
-                    rc = RC(rcVDB, rcDatabase, rcAccessing, rcSelf, rcCorrupt);
-                }
-            }
-        }
-    }
-
-    if (rc == 0) {
-        KRefcountInit(&obj->refcount, 1, CLSNAME, "make", "dep");
-        *dep = obj;
-    }
-    else {
-        VDBDependenciesRelease(obj);
-    }
-
-    return rc;
-}
-
-
-/* ListDependencies
- *  create a dependencies object: list all dependencies
- *
- *  "dep" [ OUT ] - return for VDBDependencies object
- *
- *  "missing" [ IN ] - if true, list only missing dependencies
- *  otherwise, list all dependencies
- *
- * N.B. If missing == true then
- *     just one refseq dependency will be returned for 'container' Refseq files.
- */
-LIB_EXPORT rc_t CC VDatabaseListDependencies(const VDatabase* self,
-    const VDBDependencies** dep, bool missing)
-{
-    return VDatabaseListDependenciesImpl(self, dep, missing, false);
-}
-
-
-/* ListDependenciesWithCaching
- *  create dependencies object: list dependencies
- *
- *  Call VResolverCacheEnable(cacheState) before reading VDatabase.
- *  It allows to control cache update inside the function.
- *
- *  "dep" [ OUT ] - return for VDBDependencies object
- *
- *  "missing" [ IN ] - if true, list only missing dependencies
- *  otherwise, list all dependencies
- *
- *  "disableCaching" [ IN ] - if true, disable caching inside of the function
- *  otherwise, do not change the caching state
- */
-LIB_EXPORT rc_t CC VDatabaseListDependenciesWithCaching (
-    struct VDatabase const *self,
-    const VDBDependencies **dep, bool missing,
-    bool disableCaching )
-{
-    return VDatabaseListDependenciesImpl(self, dep, missing, disableCaching);
-}
-
-
-static bool DependenciesError(rc_t rc) {
-    return GetRCModule(rc) == rcAlign && GetRCObject(rc) == (enum RCObject)rcTable
-          && GetRCState(rc) == rcNotFound;
-}
-
-typedef enum ErrType {
-    eUnknown,
-    eNoEncInKfg,
-    ePwdFileNotFound,
-    eBadPwdFile,
-    eBadEncKey
-} ErrType;
-static ErrType DependenciesType(rc_t rc) {
-    if (GetRCTarget(rc) == rcEncryptionKey)
-    {
-        switch (GetRCSTATE(rc))
-        {
-            /* no configuration or environment */
-        case RC_STATE(rcFile, rcUnknown):
-            return eNoEncInKfg;
-
-            /* no file where told to look */
-        case RC_STATE(rcFile, rcNotFound):
-            return ePwdFileNotFound;
-
-            /* after decryption the file wasn't a database object */
-        case RC_STATE(rcEncryption, rcIncorrect):
-            return eBadEncKey;
-
-        default:
-            break;
-        }
-    }
-    else if (GetRCTarget(rc) == rcMgr)
-    {
-        switch (GetRCSTATE(rc))
-        {
-        case RC_STATE(rcEncryptionKey, rcTooShort): /* too short */
-        case RC_STATE(rcEncryptionKey, rcTooLong): /* too long */
-            return eBadPwdFile;
-
-        default:
-            break;
-        }
-    }
-    return eUnknown;
-}
-
-LIB_EXPORT bool CC UIError( rc_t rc,
-    const VDatabase* db, const VTable* table)
-{
-    bool retval = false;
-    if( db != NULL || table != NULL ) {
-      if( DependenciesError(rc) ) {
-        if( db != NULL ) {
-            VDatabaseAddRef(db);
-        } else if( VTableOpenParentRead(table, &db) != 0 ) {
-            db = NULL;
-        }
-        if( db != NULL ) {
-            const VTable* ref;
-            if( VDatabaseOpenTableRead(db, &ref, "REFERENCE") == 0 ) {
-                const VCursor* c;
-                if( VTableCreateCachedCursorRead(ref, &c, 0) == 0 ) {
-                    uint32_t i;
-                    retval = VCursorAddColumn(c, &i, "CIRCULAR") == 0
-                        && VCursorOpen(c) == 0;
-                    VCursorRelease(c);
-                }
-                VTableRelease(ref);
-            }
-            VDatabaseRelease(db);
-        }
-      }
-    }
-    else if (db == NULL && table == NULL) {
-        ErrType type = DependenciesType(rc);
-        if (type != eUnknown) {
-            retval = true;
-        }
-    }
-    return retval;
-}
-
-static
-void CC VDBDependenciesLOGMissing( rc_t rc,
-    const VDatabase* db, bool log_list )
-{
-    static bool once = false;
-    if( !once ) {
-      KWrtHandler handler;
-
-      once = true;
-
-      handler.writer = KOutWriterGet();
-      handler.data = KOutDataGet();
-      KOutHandlerSetStdErr();
-
-      if (DependenciesError(rc)) {
-        OUTMSG(("This operation requires access to external"
-            " reference sequence(s) that could not be located\n"));
-        if (db && log_list) {
-            const VDBDependencies* dep = NULL;
-            uint32_t i, count = 0;
-            if( VDatabaseListDependencies(db, &dep, true) == 0 &&
-                VDBDependenciesCount(dep, &count) == 0 ) {
-                for(i = 0; i < count; i++) {
-                    const char* name = NULL, *seqId = NULL;
-                    if (VDBDependenciesName(dep, &name, i) == 0
-                            && VDBDependenciesSeqId(dep, &seqId, i) == 0)
-                    {
-                        OUTMSG(("Reference sequence %s %s was not found\n",
-                                seqId, name));
-                    }
-                }
-                VDBDependenciesRelease(dep);
-            }
-        }
-        OUTMSG((
-              "Please run \"perl configuration-assistant.perl\" and try again\n"
-            ));
-      }
-      else {
-        switch (DependenciesType(rc)) {
-            case eNoEncInKfg:
-                OUTMSG((
-"The file you are trying to open is encrypted,\n"
-"but no decryption password could be located.\n"
-"To set up a password,\n"
-"run the 'configuration-assistant.perl' script provided with the toolkit.\n"));
-                break;
-            case ePwdFileNotFound:
-                OUTMSG((
-"The file you are trying to open is encrypted,\n"
-"but no decryption password could be obtained\n"
-"from the path given in configuration.\n"
-"To set up or change a password,\n"
-"run the 'configuration-assistant.perl' script provided with the toolkit.\n"));
-                break;
-            case eBadEncKey:
-                OUTMSG((
-"The file you are trying to open is encrypted, but could not be opened.\n"
-"Either your password is incorrect or the downloaded file is corrupt.\n"
-"To set up or change a password,\n"
-"run the 'configuration-assistant.perl' script provided with the toolkit.\n"
-"To test the file for corruption,\n"
-"run the 'nencvalid' tool provided with the toolkit.\n"));
-                break;
-        case eBadPwdFile:
-                OUTMSG((
-"The file you are trying to open is encrypted, but could not be opened.\n"
-"The password in the password file in unusable either from being 0 bytes\n"
-"or more than 4096 bytes long. The password starts at the beginning of\n"
-"the file and ends with the first CR (\\r) pr LF (\\n) or at the end of\n"
-"the file.\n"
-"To set up or change a password,\n"
-"run the 'configuration-assistant.perl' script provided with the toolkit.\n"));
-                break;
-            default:
-                assert(0);
-        }
-      }
-
-      OUTMSG(("\n"));
-      KOutHandlerSet(handler.writer, handler.data);
-    }
-}
-
-LIB_EXPORT const char* CC UIDatabaseGetErrorString(rc_t rc)
-{
-    if (DependenciesError(rc)) {
-        return "This operation requires access to external"
-            " reference sequence(s) that could not be located";
-    }
-    else {
-        switch (DependenciesType(rc)) {
-            case eNoEncInKfg:
-                return "The file is encrypted, "
-                    "but no decryption password could be located";
-            case ePwdFileNotFound:
-                return "The file is encrypted, "
-                    "but no decryption password could be obtained "
-                    "from the path given in configuration";
-            case eBadEncKey:
-                return "The file is encrypted, but could not be opened. "
-                    "Either the password is incorrect or the file is corrupt";
-            case eBadPwdFile:
-                return "The file is encrypted, but could not be opened. "
-                    "The password in the password file in unusable";
-            default:
-                assert(0);
-                return "Unexpected Dependency Type";
-        }
-    }
-}
-
-LIB_EXPORT void CC UIDatabaseLOGError( rc_t rc,
-    const VDatabase* db, bool log_list )
-{
-    VDBDependenciesLOGMissing(rc, db, log_list);
-}
-
-LIB_EXPORT void CC UITableLOGError( rc_t rc,
-    const VTable* table, bool log_list )
-{
-    const VDatabase* db;
-    if( table == NULL ) {
-        VDBDependenciesLOGMissing(rc, NULL, log_list);
-    }
-    else if( VTableOpenParentRead(table, &db) == 0 && db != NULL ) {
-        VDBDependenciesLOGMissing(rc, db, log_list);
-        VDatabaseRelease(db);
-    }
-}
diff --git a/libs/vdb/database-load.c b/libs/vdb/database-load.c
deleted file mode 100644
index c36975e..0000000
--- a/libs/vdb/database-load.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define KONST const
-#define SKONST
-
-#include "database-priv.h"
-#include "dbmgr-priv.h"
-#include "schema-parse.h"
-
-#undef KONST
-#undef SKONST
-
-#include "schema-priv.h"
-#include "linker-priv.h"
-
-#include <vdb/manager.h>
-#include <vdb/database.h>
-#include <kdb/manager.h>
-#include <kdb/database.h>
-#include <kdb/meta.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * VDatabase
- *  opaque connection to a database within file system
- */
-
-
-/* LoadSchema
- */
-
-rc_t VDatabaseLoadSchema ( VDatabase *self )
-{
-    /* try to get schema text */
-    const KMDataNode *node;
-    rc_t rc = KMetadataOpenNodeRead ( self -> meta, & node, "schema" );
-    if ( rc == 0 )
-    {
-        /* the node is probably within our 4K buffer,
-           but by using the callback mechanism we don't
-           have buffer or allocation issues. */
-        KMDataNodeSchemaFillData pb;
-        pb . node = node;
-        pb . pos = 0;
-        pb . add_v0 = false;
-
-        /* add in schema text. it is not mandatory, but it is
-           the design of the system to store object schema with
-           the object so that it is capable of standing alone */
-        rc = VSchemaParseTextCallback ( self -> schema,
-            "VDatabaseLoadSchema", KMDataNodeFillSchema, & pb );
-        if ( rc == 0 )
-        {
-            /* determine database type */
-            rc = KMDataNodeReadAttr ( node, "name",
-                pb . buff, sizeof pb . buff, & pb . pos );
-            if ( rc == 0 )
-            {
-                uint32_t type;
-                const SNameOverload *name;
-
-                /* find the sdb if possible */
-                self -> sdb = VSchemaFind ( self -> schema,
-                    & name, & type, pb . buff, "VDatabaseLoadSchema", false );
-
-                /* the schema must be found in this case */
-                if ( self -> sdb == NULL || type != eDatabase )
-                {
-                    self -> sdb = NULL;
-                    rc = RC ( rcVDB, rcDatabase, rcLoading, rcSchema, rcCorrupt );
-                    PLOGERR ( klogInt, ( klogInt, rc, "failed to establish database type from '$(expr)'",
-                                         "expr=%s", pb . buff ));
-                }
-            }
-        }
-
-        KMDataNodeRelease ( node );
-    }
-    else if ( GetRCState ( rc ) == rcNotFound )
-    {
-        /* the database may be under creation */
-        if ( ! self -> read_only )
-            rc = 0;
-    }
-
-    return rc;
-}
diff --git a/libs/vdb/database-priv.h b/libs/vdb/database-priv.h
deleted file mode 100644
index ea40c06..0000000
--- a/libs/vdb/database-priv.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_database_priv_
-#define _h_database_priv_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_vdb_database_
-#include <vdb/database.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifndef KONST
-#define KONST
-#endif
-
-#ifndef SKONST
-#define SKONST const
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct VSchema;
-struct KDatabase;
-struct SDatabase;
-struct KMetadata;
-struct VDBManager;
-
-/*--------------------------------------------------------------------------
- * VDatabase
- *  interface to physical database
- */
-struct VDatabase
-{
-    /* creating manager */
-    struct VDBManager KONST *mgr;
-
-    /* enclosing database - NULL OKAY */
-    KONST VDatabase *dad;
-
-    /* schema and db description */
-    struct VSchema SKONST *schema;
-    struct SDatabase const *sdb;
-
-    /* underlying physical layer database */
-    struct KDatabase KONST *kdb;
-
-    /* open database metadata */
-    struct KMetadata KONST *meta;
-
-    /* user data */
-    void *user;
-    void ( CC * user_whack ) ( void *data );
-#if 0
-    /* externally visible names */
-    BSTree scope;
-#endif
-    /* page size for creating columns */
-    size_t pgsize;
-
-    /* open references */
-    KRefcount refcount;
-
-    /* open mode */
-    bool read_only;
-
-    /* cache database id any */
-    KONST VDatabase *cache_db;
-};
-
-
-/* Whack
- */
-rc_t CC VDatabaseWhack ( VDatabase *self );
-
-
-/* Attach
- * Sever
- *  internal reference management
- */
-VDatabase *VDatabaseAttach ( const VDatabase *self );
-rc_t VDatabaseSever ( const VDatabase *self );
-
-
-/* Make
- *  creates an initialized database object
- *  expects either a mgr or a parent db,
- *  enforces schema validity according to some rules,
- */
-rc_t VDatabaseMake ( VDatabase **db,
-    struct VDBManager const *mgr,
-    const VDatabase *dad,
-    struct VSchema const *schema );
-
-
-/* LoadSchema
- *  looks in metadata for stored schema
- */
-rc_t VDatabaseLoadSchema ( VDatabase *self );
-
-/* StoreSchema
- *  stores schema definition in metadata
- */
-rc_t VDatabaseStoreSchema ( VDatabase *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_database_priv_ */
diff --git a/libs/vdb/database.c b/libs/vdb/database.c
deleted file mode 100644
index 1e52034..0000000
--- a/libs/vdb/database.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define KONST const
-#include "database-priv.h"
-#undef KONST
diff --git a/libs/vdb/dbmgr-cmn.c b/libs/vdb/dbmgr-cmn.c
deleted file mode 100644
index a423566..0000000
--- a/libs/vdb/dbmgr-cmn.c
+++ /dev/null
@@ -1,917 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define TRACK_REFERENCES 0
-/* should match dbmgr.c and/or wdbmgr.c */
-
-#define KONST const
-#include "dbmgr-priv.h"
-#undef KONST
-
-#include "schema-priv.h"
-#include "linker-priv.h"
-
-#include <vdb/manager.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/vdb-priv.h>
-
-#include <vfs/manager.h> /* VFSManager */
-#include <vfs/manager-priv.h> /* VFSManagerSetResolver */
-
-#include <kdb/manager.h>
-#include <kdb/database.h>
-#include <kdb/kdb-priv.h> /* KDBManagerGetVFSManager */
-#include <kdb/table.h>
-#include <kdb/meta.h>
-
-#include <kfg/config.h>
-#include <kfs/directory.h>
-#include <kfs/dyload.h>
-#include <klib/log.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-#if 1
-#define DEBUG_PRINT( fmt, ... ) ( void ) 0
-#else
-#define DEBUG_PRINT(fmt, ...) fprintf(stderr, "%s - " fmt "\n", __func__, __VA_ARGS__)
-#endif
-
-/*--------------------------------------------------------------------------
- * VDBManager
- *  opaque handle to library
- */
-
-/* Whack
- */
-static
-rc_t VDBManagerWhack ( VDBManager *self )
-{
-    rc_t rc;
-
-    KRefcountWhack ( & self -> refcount, "VDBManager" );
-
-    rc = KDBManagerRelease ( self -> kmgr );
-    if ( rc == 0 )
-    {
-        /* release user data */
-        if ( self -> user != NULL && self -> user_whack != NULL )
-        {
-            ( * self -> user_whack ) ( self -> user );
-            self -> user = NULL;
-            self -> user_whack = NULL;
-        }
-
-        VSchemaRelease ( self -> schema );
-        VLinkerRelease ( self -> linker );
-        free ( self );
-        return 0;
-    }
-
-    KRefcountInit ( & self -> refcount, 1, "VDBManager", "whack", "vmgr" );
-    return rc;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC VDBManagerAddRef ( const VDBManager *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "VDBManager" ) )
-        {
-        case krefLimit:
-            return RC ( rcVDB, rcMgr, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VDBManagerRelease ( const VDBManager *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "VDBManager" ) )
-        {
-        case krefWhack:
-            return VDBManagerWhack ( ( VDBManager* ) self );
-        case krefNegative:
-            return RC ( rcVDB, rcMgr, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Attach
- * Sever
- *  internal reference management
- */
-VDBManager *VDBManagerAttach ( const VDBManager *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "VDBManager" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( VDBManager* ) self;
-}
-
-rc_t VDBManagerSever ( const VDBManager *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "VDBManager" ) )
-        {
-        case krefWhack:
-            return VDBManagerWhack ( ( VDBManager* ) self );
-        case krefNegative:
-            return RC ( rcVDB, rcMgr, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC VDBManagerVWritable ( const VDBManager *self, const char *path, va_list args )
-{
-    if ( self == NULL )
-        return RC ( rcVDB, rcMgr, rcAccessing, rcSelf, rcNull );
-    return KDBManagerVWritable ( self -> kmgr, path, args );
-}
-
-LIB_EXPORT rc_t CC VDBManagerWritable ( const VDBManager *self, const char *path, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, path );
-
-    rc = VDBManagerVWritable ( self, path, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* AddSchemaIncludePath
- *  add an include path to schema for locating input files
- */
-LIB_EXPORT rc_t CC VDBManagerVAddSchemaIncludePath ( const VDBManager *self, const char *path, va_list args )
-{
-    if ( self != NULL )
-        return VSchemaVAddIncludePath ( self -> schema, path, args );
-
-    return RC ( rcVDB, rcMgr, rcUpdating, rcSelf, rcNull );
-}
-
-LIB_EXPORT rc_t CC VDBManagerAddSchemaIncludePath ( const VDBManager *self, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = VDBManagerVAddSchemaIncludePath ( self, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* AddLoadLibraryPath
- *  add a path[s] to loader for locating dynamic libraries
- */
-LIB_EXPORT rc_t CC VDBManagerVAddLoadLibraryPath ( const VDBManager *self, const char *path, va_list args )
-{
-    if ( self != NULL )
-        return VLinkerVAddLoadLibraryPath ( self -> linker, path, args );
-
-    return RC ( rcVDB, rcMgr, rcUpdating, rcSelf, rcNull );
-}
-
-LIB_EXPORT rc_t CC VDBManagerAddLoadLibraryPath ( const VDBManager *self, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = VDBManagerVAddLoadLibraryPath ( self, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* ConfigFromKfg
- */
-static
-rc_t VDBManagerGetKfgPath ( const KConfig *kfg, const char *path, char *value, size_t value_size, size_t *num_read )
-{
-    /* open node */
-    const KConfigNode *node;
-    rc_t rc = KConfigOpenNodeRead ( kfg, & node, "%s", path );
-    if ( rc == 0 )
-    {
-        size_t remaining;
-        rc = KConfigNodeRead ( node, 0, value, value_size - 1, num_read, & remaining );
-        if ( rc == 0 )
-        {
-            if ( remaining != 0 )
-                rc = RC ( rcVDB, rcMgr, rcConstructing, rcPath, rcExcessive );
-            else if ( string_chr ( value, * num_read, '%' ) != NULL )
-                rc = RC ( rcVDB, rcMgr, rcConstructing, rcPath, rcInvalid );
-            else
-                value[*num_read] = '\0';
-        }
-
-        KConfigNodeRelease ( node );
-    }
-    return rc;
-}
-
-static
-rc_t VDBManagerConfigFromKfg ( VDBManager *self, bool update )
-{
-    size_t num_read;
-    char full [ 4096 ];
-
-    /* open configuration manager */
-    KConfig *kfg;
-    rc_t rc = KConfigMake ( & kfg, NULL );
-    if ( rc != 0 )
-        rc = 0;
-    else
-    {
-        /* look for load library paths */
-        rc = VDBManagerGetKfgPath ( kfg, update ?
-            "vdb/wmodule/paths": "vdb/module/paths",
-            full, sizeof full, & num_read );
-        if ( rc != 0 )
-            rc = 0;
-        else
-        {
-            /* split by ':' */
-            const char * path = full;
-            const char *colon = string_chr ( full, num_read, ':' );
-            while ( colon != NULL )
-            {
-                /* add path between "path" and "colon" */
-                rc = VDBManagerAddLoadLibraryPath ( self, "%.*s", ( int ) ( colon - path ), path );
-                if ( rc != 0 )
-                    break;
-                num_read -= ( colon - path ) - 1;
-                path = colon + 1;
-                colon = string_chr ( path, num_read, ':' );
-            }
-
-            /* add in last portion */
-            if ( rc == 0 && num_read != 0 )
-                rc = VDBManagerAddLoadLibraryPath ( self, "%.*s", ( int ) ( num_read ), path );
-        }
-
-        /* look for schema paths */
-        if ( rc == 0 )
-            rc = VDBManagerGetKfgPath ( kfg, "vdb/schema/paths", full, sizeof full, & num_read );
-        if ( rc != 0 )
-            rc = 0;
-        else
-        {
-            /* split by ':' */
-            const char * path = full;
-            const char *colon = string_chr ( full, num_read, ':' );
-            while ( colon != NULL )
-            {
-                /* add path between "path" and "colon" */
-                rc = VDBManagerAddSchemaIncludePath ( self, "%.*s", ( int ) ( colon - path ), path );
-                if ( rc != 0 )
-                {
-                    PLOGERR ( klogWarn, ( klogWarn, rc, "schema path '$(path)' was rejected",
-                                          "path=%.*s", ( int ) ( colon - path ), path ) );
-                    rc = 0;
-                }
-                num_read -= colon - path + 1;
-                path = colon + 1;
-                colon = string_chr ( path, num_read, ':' );
-            }
-
-            /* add in last portion */
-            if ( rc == 0 && num_read != 0 )
-            {
-                rc = VDBManagerAddSchemaIncludePath ( self, "%.*s", ( int ) ( num_read ), path );
-                if ( rc != 0 )
-                {
-                    PLOGERR ( klogWarn, ( klogWarn, rc, "schema path '$(path)' was rejected",
-                                          "path=%.*s", ( int ) num_read, path ) );
-                    rc = 0;
-                }
-            }
-        }
-
-        KConfigRelease ( kfg );
-    }
-
-    return rc;
-}
-
-/* ConfigFromLibPath
- *  trace this library back to file system
- *  attempt to locate relative paths
- *  add them to library and schema path lists
- */
-static
-rc_t VDBManagerConfigFromLibPath ( VDBManager *self, bool update )
-{
-    KDyld *dlmgr;
-    rc_t rc = KDyldMake ( & dlmgr );
-    if ( rc == 0 )
-    {
-        const KDirectory *home;
-        rc = KDyldHomeDirectory ( dlmgr, & home, ( fptr_t ) VDBManagerConfigPaths );
-        if ( rc == 0 )
-        {
-            char full [ 4096 ];
-
-            /* paths to modules */
-            const char *mod_paths [] =
-            {
-                "ncbi/mod",
-                "vdb/mod",
-                "../mod"
-            };
-            const char *wmod_paths [] =
-            {
-                "ncbi/wmod",
-                "vdb/wmod",
-                "../wmod"
-            };
-
-            /* paths to schema */
-            const char *schema_paths [] =
-            {
-                "ncbi/schema",
-                "vdb/schema",
-                "../schema"
-            };
-
-            /* test for a few possible module paths */
-            uint32_t i;
-            const char **paths = update ? wmod_paths : mod_paths;
-            for ( i = 0; rc == 0 && i < sizeof mod_paths / sizeof mod_paths [ 0 ]; ++ i )
-            {
-                uint32_t type = KDirectoryPathType ( home, "%s%u", paths [ i ], sizeof ( void* ) * 8 );
-                if ( ( type & ~ kptAlias ) == kptDir )
-                {
-                    /* add full path */
-                    rc = KDirectoryResolvePath ( home, true, full, sizeof full, "%s%u", paths [ i ], sizeof ( void* ) * 8 );
-                    if ( rc == 0 )
-                        rc = VDBManagerAddLoadLibraryPath ( self, "%s", full );
-                }
-            }
-
-            for ( i = 0; rc == 0 && i < sizeof mod_paths / sizeof mod_paths [ 0 ]; ++ i )
-            {
-                uint32_t type = KDirectoryPathType ( home, "%s", paths [ i ] );
-                if ( ( type & ~ kptAlias ) == kptDir )
-                {
-                    /* add full path */
-                    rc = KDirectoryResolvePath ( home, true, full, sizeof full, "%s", paths [ i ] );
-                    if ( rc == 0 )
-                        rc = VDBManagerAddLoadLibraryPath ( self, "%s", full );
-                }
-            }
-
-            for ( i = 0; rc == 0 && i < sizeof schema_paths / sizeof schema_paths [ 0 ]; ++ i )
-            {
-                uint32_t type = KDirectoryPathType ( home, "%s", schema_paths [ i ] );
-                if ( ( type & ~ kptAlias ) == kptDir )
-                {
-                    /* add full path */
-                    rc = KDirectoryResolvePath ( home, true, full, sizeof full, "%s", schema_paths [ i ] );
-                    if ( rc == 0 )
-                        rc = VDBManagerAddSchemaIncludePath ( self, "%s", full );
-                }
-            }
-
-            KDirectoryRelease ( home );
-        }
-
-        KDyldRelease ( dlmgr );
-    }
-    return rc;
-}
-
-/* ConfigPaths
- *  looks for configuration information to set
- *  include paths for schema parser and
- *  load paths for linker
- */
-rc_t VDBManagerConfigPaths ( VDBManager *self, bool update )
-{
-    rc_t rc = VDBManagerConfigFromKfg ( self, update );
-    if ( rc == 0 )
-        rc = VDBManagerConfigFromLibPath ( self, update );
-    return rc;
-}
-
-
-/* GetUserData
- * SetUserData
- *  store/retrieve an opaque pointer to user data
- */
-LIB_EXPORT rc_t CC VDBManagerGetUserData ( const VDBManager *self, void **data )
-{
-    rc_t rc;
-
-    if ( data == NULL )
-        rc = RC ( rcVDB, rcMgr, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcMgr, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * data = self -> user;
-            return 0;
-        }
-
-        * data = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDBManagerSetUserData ( const VDBManager *cself,
-    void *data, void ( CC * destroy ) ( void *data ) )
-{
-    VDBManager *self = ( VDBManager* ) cself;
-    if ( cself == NULL )
-        return RC ( rcVDB, rcMgr, rcUpdating, rcSelf, rcNull );
-
-    self -> user = data;
-    self -> user_whack = destroy;
-
-    return 0;
-}
-
-/* OpenKDBManager
- *  returns a new reference to KDBManager used by VDBManager
- */
-LIB_EXPORT rc_t CC VDBManagerOpenKDBManagerRead ( const VDBManager *self, const KDBManager **kmgr )
-{
-    rc_t rc;
-
-    if ( kmgr == NULL )
-        rc = RC ( rcVDB, rcMgr, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcMgr, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDBManagerAddRef ( self -> kmgr );
-            if ( rc == 0 )
-            {
-                * kmgr = self -> kmgr;
-                return 0;
-            }
-        }
-
-        * kmgr = NULL;
-    }
-
-    return rc;
-}
-
-
-static
-ver_t VDBManagerGetLoaderVersFromMeta ( const KMetadata * meta )
-{
-    const KMDataNode *node = NULL;
-    rc_t rc = KMetadataOpenNodeRead ( meta, & node, "SOFTWARE/loader" );
-    KMDataNodeRelease ( node );
-    if ( rc == 0 )
-    {
-        size_t num_read;
-        char vers_string [ 64 ];
-        rc = KMDataNodeReadAttr ( node, "vers", vers_string, sizeof vers_string, & num_read );
-        if ( rc == 0 )
-        {
-            char *end, *start = vers_string;
-            unsigned long maj = strtoul ( start, & end, 10 );
-
-            KMDataNodeRelease ( node );
-
-            if ( end > start && end [ 0 ] == '.' )
-            {
-                unsigned long min = strtoul ( start = end + 1, & end, 10 );
-                if ( end > start && end [ 0 ] == '.' )
-                {
-                    unsigned long rel = strtoul ( start = end + 1, & end, 10 );
-                    if ( end > start )
-                        return ( maj << 24 ) | ( min << 16 ) | rel;
-                }
-            }
-        }
-    }
-    return 0;
-}
-
-
-/* VDBManagerGetVersFromMeta
- *  helper-function for VDBManagerGetObjVersion
- */
-static
-ver_t VDBManagerGetVersFromMeta ( const KMetadata * meta, bool is_db )
-{
-    rc_t rc = 0;
-    uint32_t meta_vers;
-    const KMDataNode *node;
-
-    /* look for loader version as first clue */
-    ver_t version = VDBManagerGetLoaderVersFromMeta ( meta );
-    if ( VersionGetMajor ( version ) >= 2 ) {
-        return version;
-    }
-
-    /* was the run vdb-copied? */
-    rc = KMetadataOpenNodeRead ( meta, & node, "SOFTWARE/update" );
-    if ( rc == 0 ) {
-        KMDataNodeRelease ( node );
-        return 0x2000000;
-    }
-
-    /* If SOFTWARE/loader/@vers exists but SOFTWARE/update does not
-     * then return the former */
-    if ( version != 0 ) {
-        return version;
-    }
-
-    /* THE PRINCIPAL DESCRIPTION OF SOFTWARE VERSION
-       WAS NOT FOUND. USE HEURISTICS TO DETERMINE VERSION
-       FROM THIS POINT FORWARD. */
-
-    /* look at the version of the metadata file itself
-       metdata version 1 means pre-vdb, i.e. v0 */
-    rc = KMetadataVersion ( meta, & meta_vers );
-    if ( rc == 0 && meta_vers < 2 )
-        return 0;
-
-    /* assume all databases are v2 */
-    if ( is_db )
-        return 0x2000000;
-
-
-    /* AT THIS POINT, WE KNOW WE MUST HAVE A TABLE,
-       BUT WE DON'T HAVE PERFECT EVIDENCE OF VERSION,
-       SINCE THE SOFTWARE NODE IS NOT MANDATORY. */
-
-    /* if "schema" exists, it's v2 */
-    rc = KMetadataOpenNodeRead ( meta, & node, "schema" );
-    if ( rc == 0 )
-    {
-        KMDataNodeRelease ( node );
-        return 0x2000000;
-    }
-
-    /* if "col" exists, it's v1 */
-    rc = KMetadataOpenNodeRead ( meta, &node, "col" );
-    if ( rc == 0 )
-    {
-        KMDataNodeRelease ( node );
-        return 0x1000000;
-    }
-
-    /* appears to be v0 */
-    return 0;
-}
-
-
-/* VDBManagerGetObjVersion
- *  returns the vdb-version of the given object
- */
-LIB_EXPORT rc_t CC VDBManagerGetObjVersion ( const VDBManager *self, ver_t * version, const char *path )
-{
-    rc_t rc;
-
-    if ( version == NULL )
-        rc = RC ( rcVDB, rcMgr, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcMgr, rcAccessing, rcSelf, rcNull );
-        else if ( path == NULL )
-            rc = RC ( rcVDB, rcMgr, rcAccessing, rcPath, rcNull );
-        else if ( path [ 0 ] == 0 )
-            rc = RC ( rcVDB, rcMgr, rcAccessing, rcPath, rcEmpty );
-        else
-        {
-            const KTable *tbl;
-            const KDatabase *db;
-            const KMetadata *meta;
-
-            int path_type = KDBManagerPathType ( self -> kmgr, "%s", path ) & ~ kptAlias;
-            switch ( path_type )
-            {
-            case kptDatabase:
-                rc = KDBManagerOpenDBRead ( self -> kmgr, & db, "%s", path );
-                if ( rc == 0 )
-                {
-                    rc = KDatabaseOpenMetadataRead ( db, & meta );
-                    KDatabaseRelease ( db );
-                }
-                break;
-            case kptTable:
-                rc = KDBManagerOpenTableRead ( self -> kmgr, & tbl, "%s", path );
-                if ( rc == 0 )
-                {
-                    rc = KTableOpenMetadataRead ( tbl, & meta );
-                    KTableRelease ( tbl );
-                }
-                break;
-
-            case kptPrereleaseTbl:
-                * version = 0;
-                return 0;
-
-            default:
-                rc = RC ( rcVDB, rcMgr, rcAccessing, rcPath, rcIncorrect );
-            }
-
-            if ( rc == 0 )
-            {
-                * version = VDBManagerGetVersFromMeta ( meta, path_type == kptDatabase );
-                KMetadataRelease ( meta );
-                return 0;
-            }
-        }
-
-        * version = 0;
-    }
-
-    return rc;
-}
-
-/* VDBManagerGetObjModDate
- *  returns the load/modification timestamp of the given object
- */
-LIB_EXPORT rc_t CC VDBManagerGetObjModDate ( const VDBManager *self, KTime_t *timestamp, const char *path )
-{
-    rc_t rc;
-
-    if ( timestamp == NULL )
-        rc = RC ( rcVDB, rcMgr, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcMgr, rcAccessing, rcSelf, rcNull );
-        else if ( path == NULL )
-            rc = RC ( rcVDB, rcMgr, rcAccessing, rcPath, rcNull );
-        else if ( path [ 0 ] == 0 )
-            rc = RC ( rcVDB, rcMgr, rcAccessing, rcPath, rcEmpty );
-        else
-        {
-            const KTable *tbl;
-            const KDatabase *db;
-            const KMetadata *meta;
-
-            int path_type = KDBManagerPathType ( self -> kmgr, "%s", path ) & ~ kptAlias;
-            switch ( path_type )
-            {
-            case kptDatabase:
-                rc = KDBManagerOpenDBRead ( self -> kmgr, & db, "%s", path );
-                if ( rc == 0 )
-                {
-                    rc = KDatabaseOpenMetadataRead ( db, & meta );
-                    KDatabaseRelease ( db );
-                }
-                break;
-            case kptTable:
-                rc = KDBManagerOpenTableRead ( self -> kmgr, & tbl, "%s", path );
-                if ( rc == 0 )
-                {
-                    rc = KTableOpenMetadataRead ( tbl, & meta );
-                    KTableRelease ( tbl );
-                }
-                break;
-
-            case kptPrereleaseTbl:
-                rc = 0;
-                * timestamp = 0;
-                meta = NULL;
-                break;
-
-            default:
-                rc = RC ( rcVDB, rcMgr, rcAccessing, rcPath, rcIncorrect );
-            }
-
-            if ( rc == 0 )
-            {
-                if ( meta != NULL )
-                {
-                    const KMDataNode *node;
-                    rc = KMetadataOpenNodeRead ( meta, & node, "LOAD/timestamp" );
-                    KMetadataRelease ( meta );
-                    if ( rc == 0 )
-                    {
-                        rc = KMDataNodeReadAsI64 ( node, timestamp );
-                        KMDataNodeRelease ( node );
-                        if ( rc == 0 )
-                            return 0;
-                    }
-                }
-
-                /* TBD - at this point our recourse is to check for
-                   the object's timestamp in the filesystem */
-            }
-        }
-
-        * timestamp = 0;
-    }
-
-    return rc;
-}
-
-/* ListExternalSchemaModules
- */
-LIB_EXPORT rc_t CC VDBManagerListExternalSchemaModules ( const VDBManager *self, KNamelist **listp )
-{
-    rc_t rc;
-
-    if ( listp == NULL )
-        rc = RC ( rcVDB, rcMgr, rcListing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcMgr, rcListing, rcSelf, rcNull );
-        else
-        {
-            rc = VLinkerListExternalSchemaModules ( self -> linker, listp );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        * listp = NULL;
-    }
-
-    return rc;
-}
-
-
-/* PathType
- *  check the path type of an object/directory path.
- *
- *  this is an extension of the KDirectoryPathType ( see <kdb/manager.h> )
- *  and will return the KDirectory values if a path type is not specifically
- *  a VDB or KDB object.
- */
-LIB_EXPORT int CC VDBManagerPathType ( const VDBManager * self,
-    const char *path, ... )
-{
-    int type;
-
-    va_list args;
-    va_start ( args, path );
-
-    type = VDBManagerVPathType ( self, path, args );
-
-    va_end ( args );
-
-    return type;
-}
-
-LIB_EXPORT int CC VDBManagerVPathType ( const VDBManager * self,
-    const char *path, va_list args )
-{
-    if ( self != NULL )
-        return KDBManagerVPathType ( self -> kmgr, path, args );
-
-    return kptBadPath;
-}
-
-/** Reset VResolver to set protected repository context */
-LIB_EXPORT rc_t CC VDBManagerSetResolver
-    ( const VDBManager * self, struct VResolver * resolver )
-{
-    const KDBManager * kbd = NULL;
-    rc_t rc = VDBManagerGetKDBManagerRead ( self, & kbd );
-    if (rc == 0) {
-        VFSManager * vfs = NULL;
-        rc = KDBManagerGetVFSManager ( kbd, & vfs );
-        if (rc == 0) {
-            rc = VFSManagerSetResolver ( vfs, resolver );
-
-            VFSManagerRelease ( vfs );
-            vfs = NULL;
-        }
-
-        KDBManagerRelease ( kbd );
-        kbd = NULL;
-    }
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VDBManagerGetCacheRoot ( const struct VDBManager * self,
-    struct VPath const ** path )
-{
-    rc_t rc;
-    if ( path == NULL )
-        rc = RC ( rcVDB, rcMgr, rcListing, rcParam, rcNull );
-    else
-    {
-        * path = NULL;
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcMgr, rcListing, rcSelf, rcNull );
-        else
-        {
-            const KDBManager * kbd = NULL;
-            rc = VDBManagerGetKDBManagerRead ( self, & kbd );
-            if ( rc == 0 )
-            {
-                VFSManager * vfs = NULL;
-                rc = KDBManagerGetVFSManager ( kbd, & vfs );
-                if ( rc == 0 )
-                {
-                    rc = VFSManagerGetCacheRoot ( vfs, path );
-                    VFSManagerRelease ( vfs );
-                }
-                KDBManagerRelease ( kbd );
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VDBManagerSetCacheRoot ( const struct VDBManager * self,
-    struct VPath const * path )
-{
-    rc_t rc;
-    if ( path == NULL )
-        rc = RC ( rcVDB, rcMgr, rcSelecting, rcParam, rcNull );
-    else if ( self == NULL )
-        rc = RC ( rcVDB, rcMgr, rcSelecting, rcSelf, rcNull );
-    else
-    {
-        const KDBManager * kbd = NULL;
-        rc = VDBManagerGetKDBManagerRead ( self, & kbd );
-        if ( rc == 0 )
-        {
-            VFSManager * vfs = NULL;
-            rc = KDBManagerGetVFSManager ( kbd, & vfs );
-            if ( rc == 0 )
-            {
-                rc = VFSManagerSetCacheRoot ( vfs, path );
-                VFSManagerRelease ( vfs );
-            }
-            KDBManagerRelease ( kbd );
-        }
-    }
-    return rc;
-}
diff --git a/libs/vdb/dbmgr-priv.h b/libs/vdb/dbmgr-priv.h
deleted file mode 100644
index aa1b36b..0000000
--- a/libs/vdb/dbmgr-priv.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_dbmgr_priv_
-#define _h_dbmgr_priv_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_vdb_manager_
-#include <vdb/manager.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifndef KONST
-#define KONST
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KDBManager;
-struct VSchema;
-struct VLinker;
-
-
-/*--------------------------------------------------------------------------
- * VDBManager
- *  handle to library
- */
-struct VDBManager
-{
-    /* underlying physical layer manager */
-    struct KDBManager KONST *kmgr;
-
-    /* intrinsic schema elements */
-    struct VSchema *schema;
-
-    /* intrinsic functions */
-    struct VLinker *linker;
-
-    /* user data */
-    void *user;
-    void ( CC * user_whack ) ( void *data );
-
-    /* open references */
-    KRefcount refcount;
-};
-
-/* Attach
- * Sever
- *  internal reference management
- */
-VDBManager *VDBManagerAttach ( const VDBManager *self );
-rc_t VDBManagerSever ( const VDBManager *self );
-
-
-/* ConfigPaths
- *  looks for configuration information to set
- *  include paths for schema parser and
- *  load paths for linker
- */
-rc_t VDBManagerConfigPaths ( VDBManager *self, bool update );
-
-
-/*--------------------------------------------------------------------------
- * generic whackers
- */
-void CC VectMbrWhack ( void *item, void *ignore );
-void CC BSTreeMbrWhack ( BSTNode *n, void *ignore );
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_dbmgr_priv_ */
diff --git a/libs/vdb/dbmgr.c b/libs/vdb/dbmgr.c
deleted file mode 100644
index 8ccb123..0000000
--- a/libs/vdb/dbmgr.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define TRACK_REFERENCES 0
-/* should match dbmgr-cmn.c */
-
-#include "libvdb.vers.h"
-
-#define KONST const
-#include "dbmgr-priv.h"
-#undef KONST
-
-#include "schema-priv.h"
-#include "linker-priv.h"
-
-#include <vdb/manager.h>
-#include <vdb/schema.h>
-#include <kdb/kdb-priv.h> /* KDBManagerMakeReadWithVFSManager */
-#include <kdb/manager.h>
-#include <kfs/directory.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <assert.h>
-
-/*--------------------------------------------------------------------------
- * VDBManager
- *  opaque handle to library
- */
-
-
-/* MakeRead
- * MakeReadWithVFSManager
- *  create library handle for specific use
- *  NB - only one of the functions will be implemented
- *
- *  "wd" [ IN, NULL OKAY ] - optional working directory for
- *  accessing the file system. mgr will attach its own reference.
- */
-LIB_EXPORT rc_t CC VDBManagerMakeRead ( const VDBManager **mgrp, const KDirectory *wd )
-{
-    return VDBManagerMakeReadWithVFSManager(mgrp, wd, NULL);
-}
-
-LIB_EXPORT rc_t CC VDBManagerMakeReadWithVFSManager ( const VDBManager ** mgrp,
-    const KDirectory *wd, struct VFSManager *vmgr )
-{
-    rc_t rc;
-
-    if ( mgrp == NULL )
-        rc = RC ( rcVDB, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        VDBManager *mgr = malloc ( sizeof * mgr );
-        if ( mgr == NULL )
-            rc = RC ( rcVDB, rcMgr, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KDBManagerMakeReadWithVFSManager ( & mgr -> kmgr, wd, vmgr );
-            if ( rc == 0 )
-            {
-                rc = VSchemaMakeIntrinsic ( & mgr -> schema );
-                if ( rc == 0 )
-                {
-                    rc = VLinkerMakeIntrinsic ( & mgr -> linker );
-                    if ( rc == 0 )
-                    {
-                        rc = VDBManagerConfigPaths ( mgr, false );
-                        if ( rc == 0 )
-                        {
-                            mgr -> user = NULL;
-                            mgr -> user_whack = NULL;
-                            KRefcountInit ( & mgr -> refcount, 1, "VDBManager", "make-read", "vmgr" );
-                            * mgrp = mgr;
-                            return 0;
-                        }
-
-                        VLinkerRelease ( mgr -> linker );
-                    }
-
-                    VSchemaRelease ( mgr -> schema );
-                }
-
-                KDBManagerRelease ( mgr -> kmgr );
-            }
-
-            free ( mgr );
-        }
-
-        * mgrp = NULL;
-    }
-    return rc;
-}
-
-
-/* MakeRsrc
- *  common make, regardless of library
- */
-LIB_EXPORT rc_t CC VDBManagerMakeRsrc ( VDBManager ** mgr, struct VFSManager * vfs )
-{
-    return VDBManagerMakeReadWithVFSManager ( ( const VDBManager** ) mgr, NULL, vfs );
-}
-
-
-/* Version
- *  returns the library version
- */
-LIB_EXPORT rc_t CC VDBManagerVersion ( const VDBManager *self, uint32_t *version )
-{
-    if ( version == NULL )
-        return RC ( rcVDB, rcMgr, rcAccessing, rcParam, rcNull );
-    if ( self == NULL )
-        return RC ( rcVDB, rcMgr, rcAccessing, rcSelf, rcNull );
-
-    * version = LIBVDB_VERS;
-    return 0;
-}
-
-
-/* RunPeriodicTasks
- *  executes periodic tasks, such as cache flushing
- */
-LIB_EXPORT rc_t CC VDBManagerRunPeriodicTasks ( const VDBManager *self )
-{
-    if ( self != NULL )
-        return KDBManagerRunPeriodicTasks ( self -> kmgr );
-
-    return RC ( rcVDB, rcMgr, rcExecuting, rcSelf, rcNull );
-}
diff --git a/libs/vdb/delta_average.c b/libs/vdb/delta_average.c
deleted file mode 100644
index 9905ba2..0000000
--- a/libs/vdb/delta_average.c
+++ /dev/null
@@ -1,298 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include <vdb/xform.h>
-#include <klib/rc.h>
-
-#include "xform-priv.h"
-#include "blob-priv.h"
-#include "blob-headers.h"
-#include "blob.h"
-#include "page-map.h"
-
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdlib.h>
-
-
-/* Create
- *
- * Create a new blob.  A new data buffer is sized to
- * 'element_count' * sizeof datatype; its contents are
- * uninitialized.
- */
-static
-rc_t VBlobCreateEncode ( VBlob **blobp, const VBlob *in, uint32_t max_rl_bytes,uint8_t *avg, uint32_t elem_bytes )
-{
-    rc_t rc = VBlobNew ( blobp, in -> start_id, in -> stop_id, "delta_average" );
-    if ( rc == 0 )
-    {
-        VBlob *blob = * blobp;
-        rc = PageMapAddRef ( in -> pm );
-	if(rc == 0) {
-		blob->pm = in -> pm ;
-		if(max_rl_bytes > 0){
-			rc = KDataBufferMake ( & blob -> data, in -> data . elem_bits, in -> data . elem_count );
-		} else {
-			rc = KDataBufferSub(&in->data, &blob->data, 0, UINT64_MAX);
-		}
-		if ( rc == 0 ){
-			rc = BlobHeadersCreateChild(in->headers, &blob->headers);
-			if ( rc == 0) {
-				VBlobHeader *hdr = BlobHeadersGetHdrWrite(blob->headers);
-				assert(hdr!=NULL);
-				if(hdr != 0){
-					int i;
-					VBlobHeaderSetVersion (hdr, 1);
-					rc = VBlobHeaderArgPushTail(hdr, max_rl_bytes);
-					assert(rc == 0);
-					rc = VBlobHeaderArgPushTail(hdr, elem_bytes);
-                                        assert(rc == 0);
-					for(i=0; i< max_rl_bytes; i++){
-						rc = VBlobHeaderOpPushTail(hdr,avg[i]);
-						assert(rc==0);
-					}
-					blob -> byte_order = in -> byte_order;
-					VBlobHeaderRelease(hdr);
-					return 0;
-				}
-			}
-		}
-		PageMapRelease( blob->pm);
-        }
-	VBlobRelease ( blob );
-        * blobp = NULL;
-    }
-    return rc;
-}
-
-static
-rc_t VBlobCreateDecode ( VBlob **blobp, const VBlob *in, uint32_t *max_rl_bytes,uint8_t **avg, uint32_t *elem_bytes)
-{
-    rc_t rc = VBlobNew ( blobp, in -> start_id, in -> stop_id, "undelta_average" );
-    if ( rc == 0 )
-    {
-        VBlob *blob = * blobp;
-        rc = PageMapAddRef ( in -> pm );
-	if(rc == 0) {
-		VBlobHeader *hdr;
-		blob->pm = in -> pm ;
-                blob->headers = (BlobHeaders *)BlobHeadersGetNextFrame(in->headers);
-		BlobHeadersAddRef(blob->headers);
-		hdr = BlobHeadersGetHeader(in->headers);
-		if(hdr || VBlobHeaderVersion(hdr)!=1) {
-			int64_t len;
-			int64_t eb;
-			rc = VBlobHeaderArgPopHead(hdr, &len);
-			if( rc == 0)
-				rc = VBlobHeaderArgPopHead(hdr, &eb);
-			if( rc == 0){
-				*max_rl_bytes=len;
-				*elem_bytes = eb;
-				if(len > 0){
-					rc = KDataBufferMake ( & blob -> data, in -> data . elem_bits, in -> data . elem_count );
-					if ( rc == 0){
-						*avg=malloc(len);
-						if(*avg){
-							int i;
-							for(i=0;i<len && rc == 0;i++){
-								rc = VBlobHeaderOpPopHead(hdr,(*avg)+i);
-							}
-							if(rc == 0){
-								VBlobHeaderRelease(hdr);
-								return 0;
-							} else {
-								rc =  RC(rcVDB, rcFunction, rcExecuting, rcHeader, rcCorrupt) ;
-							}
-						} else {
-							rc =  RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted) ;
-						}
-					}
-				} else {
-					rc = KDataBufferSub(&in->data, &blob->data, 0, UINT64_MAX);
-					if(rc == 0){
-						VBlobHeaderRelease(hdr);
-						return 0;
-					}
-				}
-				VBlobHeaderRelease(hdr);
-			} else {
-				rc =  RC(rcVDB, rcFunction, rcExecuting, rcHeader, rcCorrupt) ;
-			}
-		} else {
-			rc =  RC(rcVDB, rcFunction, rcExecuting, rcHeader, rcCorrupt) ;
-		}
-		PageMapRelease( blob->pm);
-        }
-	VBlobRelease ( blob );
-        * blobp = NULL;
-    }
-    return rc;
-}
-
-static
-rc_t CC undelta_average ( void *self, const VXformInfo *info, int64_t row_id,
-    VBlob **rslt, uint32_t argc, const VBlob *argv [] )
-{
-    uint32_t  max_rl_bytes = 0;
-    uint8_t   *avg = NULL;
-    uint32_t elem_bytes = 0;
-    /* input blob - schema assures us that it is ready to go */
-    const VBlob *in = argv [ 0 ];
-  /* allocate output blob of same size */
-    rc_t rc = VBlobCreateDecode ( rslt, in,&max_rl_bytes,&avg,&elem_bytes );
-    if(rc == 0 && max_rl_bytes > 0){
-	uint8_t *dst = (*rslt)->data.base; /** destination pointer **/
-	uint8_t *src = in -> data.base;
-	int	i,j,k;
-	PageMap *pm  = in->pm;
-
-	for(i=j=0,src = in -> data.base;i<pm->leng_recs;i++){
-                row_count_t leng_run=pm->leng_run[i];
-                elem_count_t len = pm->length[i];
-                assert(len<=max_rl_bytes);
-                while(leng_run > 0){
-                        for(k=0;k<len*elem_bytes;k++,src++,dst++){
-                                dst[0] = avg[k] - src[0]; /** symmetrical to encode **/
-                        }
-                        assert(leng_run >= (pm->data_run?pm->data_run[j]:1));
-                        leng_run -= pm->data_run?pm->data_run[j]:1;
-			j++;
-                }
-        }
-
-    }
-    if(avg) free(avg);
-    return rc;
-}
-
-VTRANSFACT_BUILTIN_IMPL ( vdb_undelta_average, 1, 0, 0 )
-    ( const void *self, const VXfactInfo *info, VFuncDesc *rslt,
-      const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    VFUNCDESC_INTERNAL_FUNCS ( rslt ) -> bfN = undelta_average;
-    rslt -> variant = vftBlobN;
-    return 0;
-}
-
-static
-rc_t CC delta_average ( void *self, const VXformInfo *info, int64_t row_id,
-    VBlob **rslt, uint32_t argc, const VBlob *argv [] )
-{
-    rc_t rc;
-    /* input blob - schema assures us that it is ready to go */
-    const VBlob *in = argv [ 0 ];
-    const PageMap *pm = in->pm; 
-    uint8_t     *src;
-    elem_count_t   min_row_len,max_row_len;
-    uint64_t	/*min_rl_bytes,*/ max_rl_bytes;
-    uint32_t    *cnts;
-    uint32_t    elem_bytes;
-    int         i,j,k;
-    uint8_t	*avg=NULL;
-    uint64_t    sum_rle;
-    uint8_t	last;
-
-    if(pm->row_count < 256 || (in->data.elem_bits & 7)!=0){
-	return VBlobCreateEncode ( rslt, in, 0,NULL,0 );
-    }
-    elem_bytes = in->data.elem_bits >> 3;
-    PageMapRowLengthRange(pm,&min_row_len,&max_row_len);
-    if(max_row_len > 1024){
-	return VBlobCreateEncode ( rslt, in, 0,NULL,0 );
-    }
-
-    /*** rescale to bytes **/
-    /* min_rl_bytes = (min_row_len * in->data.elem_bits) >> 3; */
-    max_rl_bytes = (max_row_len * in->data.elem_bits) >> 3;
-
-    cnts=calloc(sizeof(*cnts),256*max_rl_bytes); /** computing counts of values **/
-    avg=malloc(max_rl_bytes);
-
-    /** collect sums and averages ***/
-    /** using tight loop instead of iterators **/
-    for(i=j=0,src = in -> data.base, sum_rle=0,last=0;i<pm->leng_recs;i++){
-	row_count_t leng_run=pm->leng_run[i];
-	elem_count_t len = pm->length[i];
-	assert(len<=max_rl_bytes);
-	while(leng_run > 0){
-		for(k=0;k<len*elem_bytes;k++,src++){
-			if(last==src[0]) sum_rle++;
-			cnts[256*k+src[0]]++;
-			last=src[0];
-		}
-		assert(leng_run >= (pm->data_run?pm->data_run[j]:1));
-		leng_run -= pm->data_run?pm->data_run[j]:1;
-		j++;
-	}
-    }
-    if(sum_rle * 10 > elem_bytes * in->data.elem_count * 3){/** total number of repetitions is high - leave it for zlib RLE ***/
-        free(cnts);
-        free(avg);
-        return VBlobCreateEncode(rslt,in,0,NULL,0);
-    }
-
-    for(i=0;i<max_rl_bytes;i++){
-	avg[i] = 0;
-	for(j=1;j<256;j++){
-		if(cnts[256*i+j] > cnts[256*i+avg[i]]){
-			avg[i]=j; 
-		}
-	}
-    }
-    rc = VBlobCreateEncode ( rslt, in, max_rl_bytes,avg,elem_bytes );
-    if (rc == 0 ){
-	uint8_t *dst = (*rslt)->data.base; /** destination pointer **/
-	for(i=j=0,src = in -> data.base;i<pm->leng_recs;i++){
-		row_count_t leng_run=pm->leng_run[i];
-		elem_count_t len = pm->length[i];
-		assert(len<=max_rl_bytes);
-		while(leng_run > 0){
-			for(k=0;k < len*elem_bytes;k++,src++,dst++){
-				dst[0] = avg[k] - src[0]; /** will do it in this direction **/
-			}
-			assert(leng_run >= (pm->data_run?pm->data_run[j]:1));
-			leng_run -= pm->data_run?pm->data_run[j]:1;
-			j++;
-		}
-	}
-     }
-    if(cnts) free(cnts);
-    if(avg)  free(avg);
-    return rc;
-}
-
-VTRANSFACT_BUILTIN_IMPL ( vdb_delta_average, 1, 0, 0 )
-    ( const void *self, const VXfactInfo *info, VFuncDesc *rslt,
-      const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    VFUNCDESC_INTERNAL_FUNCS ( rslt ) -> bfN = delta_average;
-    rslt -> variant = vftBlobN;
-    return 0;
-}
diff --git a/libs/vdb/environment-read.c b/libs/vdb/environment-read.c
deleted file mode 100644
index 6809da2..0000000
--- a/libs/vdb/environment-read.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <vdb/vdb-priv.h>
-#include <sysalloc.h>
-
-#include "xform-priv.h"
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-static
-rc_t CC environment_read_func(
-                         void *Self,
-                         const VXformInfo *info,
-                         int64_t row_id,
-                         VRowResult *rslt,
-                         uint32_t argc,
-                         const VRowData argv[]
-) {
-    const KDataBuffer *value = Self;
-    rc_t rc = 0;
-    
-    rslt->data->elem_bits = value->elem_bits;
-    rslt->data->elem_count = 0;
-    rc = KDataBufferResize(rslt->data, value->elem_count);
-    if (rc == 0) {
-        memcpy(rslt->data->base, value->base, KDataBufferBytes(value));
-        rc = KDataBufferCast(rslt->data, rslt->data, rslt->elem_bits, true);
-        if (rc == 0)
-            rslt->elem_count = rslt->data->elem_count;
-    }
-    return rc;
-}
-
-static rc_t CC get_databuffer( KDataBuffer **rslt, const char *Name, size_t len ) {
-    char name[4096];
-    char *x;
-    rc_t rc;
-    
-    if (len >= sizeof(name))
-        return RC(rcVDB, rcFunction, rcConstructing, rcName, rcTooLong);
-    
-    memcpy(name, Name, len);
-    name[len] = '\0';
-    
-    x = getenv(name);
-    rc = KDataBufferMake( *rslt, 8, (uint32_t)( len = strlen( x ) ) );
-    if (rc)
-        return rc;
-    memcpy((**rslt).base, x, len);
-    return 0;
-}
-
-/* 
- function utf8 environment:read #1.0 < ascii name > ();
- */
-VTRANSFACT_BUILTIN_IMPL(environment_read, 1, 0, 0)
-    (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp
-) {
-    rc_t rc;
-    KDataBuffer *value;
-            
-    rc = get_databuffer(&value, cp->argv[0].data.ascii, cp->argv[0].count);
-    if (rc == 0) {
-        rslt->self = value;
-        rslt->whack = (void (*)(void *))KDataBufferWhack;
-        
-        rslt->variant = vftRow;
-        rslt->u.rf = environment_read_func;
-    }
-
-	return rc;
-}
diff --git a/libs/vdb/fixed-row-len.c b/libs/vdb/fixed-row-len.c
deleted file mode 100644
index 440a10c..0000000
--- a/libs/vdb/fixed-row-len.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-
-#include "prod-priv.h"
-#include "xform-priv.h"
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-
-static
-rc_t CC fixed_row_len_func ( void *self, const VXformInfo *info,
-    int64_t row_id, VRowResult *rslt, uint32_t argc, const VRowData in[] )
-{
-    assert ( rslt -> data -> elem_bits == 32 );
-    if ( rslt -> data -> elem_count == 0 )
-    {
-        rc_t rc = KDataBufferResize ( rslt -> data, 1 );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    * ( uint32_t* ) rslt -> data -> base = VProductionFixedRowLength ( info -> prod, row_id, true );
-    rslt -> elem_count = 1;
-
-    return 0;
-}
-
-VTRANSFACT_BUILTIN_IMPL ( vdb_fixed_row_len, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt -> variant = vftRow;
-    rslt -> u . rf = fixed_row_len_func;
-    return 0;
-}
diff --git a/libs/vdb/gen-cast.pl b/libs/vdb/gen-cast.pl
deleted file mode 100644
index 56b8fb8..0000000
--- a/libs/vdb/gen-cast.pl
+++ /dev/null
@@ -1,480 +0,0 @@
-#!perl -w
-#/*===========================================================================
-#*
-#*                            PUBLIC DOMAIN NOTICE
-#*               National Center for Biotechnology Information
-#*
-#*  This software/database is a "United States Government Work" under the
-#*  terms of the United States Copyright Act.  It was written as part of
-#*  the author's official duties as a United States Government employee and
-#*  thus cannot be copyrighted.  This software/database is freely available
-#*  to the public for use. The National Library of Medicine and the U.S.
-#*  Government have not placed any restriction on its use or reproduction.
-#*
-#*  Although all reasonable efforts have been taken to ensure the accuracy
-#*  and reliability of the software and data, the NLM and the U.S.
-#*  Government do not and cannot warrant the performance or results that
-#*  may be obtained by using this software or data. The NLM and the U.S.
-#*  Government disclaim all warranties, express or implied, including
-#*  warranties of performance, merchantability or fitness for any particular
-#*  purpose.
-#*
-#*  Please cite the author in any work or product based on this material.
-#*
-#* ===========================================================================
-#*
-#*/
-# gen-cast.pl
-
-my $type = [
-    { size =>  8, integer => 1, signed => 1, ctype => 'int8_t', minimum => 'INT8_MIN', maximum => 'INT8_MAX' },
-    { size => 16, integer => 1, signed => 1, ctype => 'int16_t', minimum => 'INT16_MIN', maximum => 'INT16_MAX' },
-    { size => 32, integer => 1, signed => 1, ctype => 'int32_t', minimum => 'INT32_MIN', maximum => 'INT32_MAX' },
-    { size => 64, integer => 1, signed => 1, ctype => 'int64_t', minimum => 'INT64_MIN', maximum => 'INT64_MAX' },
-    { size =>  8, integer => 1, signed => 0, ctype => 'uint8_t', minimum => '0', maximum => 'UINT8_MAX' },
-    { size => 16, integer => 1, signed => 0, ctype => 'uint16_t', minimum => '0', maximum => 'UINT16_MAX' },
-    { size => 32, integer => 1, signed => 0, ctype => 'uint32_t', minimum => '0', maximum => 'UINT32_MAX' },
-    { size => 64, integer => 1, signed => 0, ctype => 'uint64_t', minimum => '0', maximum => 'UINT64_MAX' },
-    { size => 32, integer => 0, signed => 1, ctype => 'float', minimum => '(-FLT_MAX)', maximum => 'FLT_MAX' },
-    { size => 64, integer => 0, signed => 1, ctype => 'double', minimum => '(-DBL_MAX)', maximum => 'DBL_MAX' },
-];
-
-sub type_name {
-    my $i = shift;
-    
-    return ($type->[$i]{'integer'} ? ($type->[$i]{'signed'} ? 'I' : 'U') : 'F') . $type->[$i]{'size'};
-}
-
-sub func_name {
-    my ($i, $j) = (shift, shift);
-    
-    return $i == $j ? 'copy' : 'cast_' . type_name($i) . '_to_' . type_name($j);
-}
-
-print <<EOD;
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <vdb/types.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-
-#include <limits.h>
-#include <float.h>
-#include <string.h>
-
-#include <assert.h>
-
-typedef struct self_t {
-    VTypedesc src;
-    VTypedesc dst;
-} self_t;
-
-static rc_t copy(
-    void *Self,
-    const VXformInfo *info,
-    void *dst,
-    const void *src,
-    uint32_t num_elements
-) {
-    const self_t *self = Self;
-    memcpy(dst, src, ((size_t)num_elements * self->src.intrinsic_bits * self->src.intrinsic_dim + 7) >> 3);
-    return 0;
-}
-
-EOD
-
-for (my $i = 0; $i != scalar(@$type); ++$i) {
-    for (my $j = 0; $j != scalar(@$type); ++$j) {
-        my $name;
-        my $stype = $type->[$i]{'ctype'}; # source c type
-        my $dtype = $type->[$j]{'ctype'}; # dest. c type
-        my $intrm = $stype;
-        my $lbc; # lower bounds check
-        my $ubc; # upper bounds check
-        
-        next if ($j == $i);
-        $name = func_name($i, $j);
-
-        if ($type->[$i]{'integer'} == $type->[$j]{'integer'}) {
-            if ($type->[$i]{'signed'} == $type->[$j]{'signed'}) {
-                if ($type->[$i]{'size'} > $type->[$j]{'size'}) {
-                    $lbc = "(($intrm)($type->[$j]{'minimum'}))" if ($type->[$i]{'signed'});
-                    $ubc = "(($intrm)($type->[$j]{'maximum'}))";
-                }
-                goto PRINT_FUNC;
-            }
-            if ($type->[$i]{'signed'}) {
-                # signed to unsigned
-                $lbc = ' 0';
-                $ubc = "(($intrm)($type->[$j]{'maximum'}))" if ($type->[$i]{'size'} > $type->[$j]{'size'});
-                goto PRINT_FUNC;
-            }
-            # unsigned to signed
-            $ubc = "(($intrm)($type->[$j]{'maximum'}))" if ($type->[$i]{'size'} >= $type->[$j]{'size'});
-            goto PRINT_FUNC;
-        }
-        if ($type->[$i]{'integer'}) {
-            #int -> float
-            goto PRINT_FUNC if ($type->[$i]{'size'} < 64);
-            if ($type->[$j]{'size'} < 64) {
-                $intrm = 'double';
-                $lbc = "(($intrm)($type->[$j]{'minimum'}))";
-                $ubc = "(($intrm)($type->[$j]{'maximum'}))";
-            }
-            goto PRINT_FUNC;
-        }
-        $lbc = $type->[$j]{'signed'} ? "(($intrm)($type->[$j]{'minimum'}))" : ' 0.0';
-        $ubc = "(($intrm)($type->[$j]{'maximum'}))";
-        goto PRINT_FUNC if ($type->[$j]{'size'} < 64);
-        $intrm = 'double';
-        $lbc = $type->[$j]{'signed'} ? "(($intrm)($type->[$j]{'minimum'}))" : ' 0.0';
-        $ubc = "(($intrm)($type->[$j]{'maximum'}))";
-        
-PRINT_FUNC:
-        if ($lbc || $ubc) {
-            if ($lbc && $ubc) {
-                print <<EOD;
-static rc_t $name(
-    void *Self,
-    const VXformInfo *info,
-    void *Dst,
-    const void *Src,
-    uint32_t num_elements
-) {
-    const self_t *self = Self;
-    const unsigned N = num_elements * self->src.intrinsic_dim;
-    const $stype *src = Src;
-    $dtype *dst = Dst;
-    unsigned i;
-    
-    for (i = 0; i != N; ++i) {
-        $intrm y = src[i];
-        
-        if ($lbc > y || y > $ubc)
-            return RC(rcVDB, rcFunction, rcExecuting, rcRange, rcExcessive);
-
-        dst[i] = y;
-    }
-    return 0;
-}
-
-EOD
-            }
-            else {
-                if ($lbc) {
-                    print <<EOD;
-static rc_t $name(
-    void *Self,
-    const VXformInfo *info,
-    void *Dst,
-    const void *Src,
-    uint32_t num_elements
-) {
-    const self_t *self = Self;
-    const unsigned N = num_elements * self->src.intrinsic_dim;
-    const $stype *src = Src;
-    $dtype *dst = Dst;
-    unsigned i;
-    
-    for (i = 0; i != N; ++i) {
-        $intrm y = src[i];
-        
-        if ($lbc > y)
-            return RC(rcVDB, rcFunction, rcExecuting, rcRange, rcExcessive);
-
-        dst[i] = y;
-    }
-    return 0;
-}
-
-EOD
-                }
-                else {
-                    print <<EOD;
-static rc_t $name(
-    void *Self,
-    const VXformInfo *info,
-    void *Dst,
-    const void *Src,
-    uint32_t num_elements
-) {
-    const self_t *self = Self;
-    const unsigned N = num_elements * self->src.intrinsic_dim;
-    const $stype *src = Src;
-    $dtype *dst = Dst;
-    unsigned i;
-    
-    for (i = 0; i != N; ++i) {
-        $intrm y = src[i];
-        
-        if (y > $ubc)
-            return RC(rcVDB, rcFunction, rcExecuting, rcRange, rcExcessive);
-
-        dst[i] = y;
-    }
-    return 0;
-}
-
-EOD
-                }
-            }
-        }
-        else {
-            print <<EOD;
-static rc_t $name(
-    void *Self,
-    const VXformInfo *info,
-    void *Dst,
-    const void *Src,
-    uint32_t num_elements
-) {
-    const self_t *self = Self;
-    const unsigned N = num_elements * self->src.intrinsic_dim;
-    const $stype *src = Src;
-    $dtype *dst = Dst;
-    unsigned i;
-    
-    for (i = 0; i != N; ++i)
-        dst[i] = src[i];
-
-    return 0;
-}
-
-EOD
-        }
-    }
-}
-
-print 'static const VArrayFunc funcs[' . scalar(@$type) . '][' . scalar(@$type) . '] = {' . "\n";
-for (my $i = 0; $i != scalar(@$type); ++$i) {
-    my @x;
-    
-    for (my $j = 0; $j != scalar(@$type); ++$j) {
-        push @x, func_name($i, $j);
-    }
-    print "\t{ " . join(', ', @x) . "},\n";
-}
-print <<EOD;
-};
-
-static int desc_to_number(const VTypedesc *desc) {
-    switch (desc->domain) {
-    case vtdInt:
-        switch (desc->intrinsic_bits) {
-        case 8:
-            return 0;
-        case 16:
-            return 1;
-        case 32:
-            return 2;
-        case 64:
-            return 3;
-        }
-        break;
-    case vtdUint:
-        switch (desc->intrinsic_bits) {
-        case 8:
-            return 4;
-        case 16:
-            return 5;
-        case 32:
-            return 6;
-        case 64:
-            return 7;
-        }
-        break;
-    case vtdFloat:
-        switch (desc->intrinsic_bits) {
-        case 32:
-            return 8;
-        case 64:
-            return 9;
-        }
-        break;
-    }
-    return -1;
-}
-
-static rc_t cast_to_ascii(
-    void *Self,
-    const VXformInfo *info,
-    int64_t row_id,
-    VRowResult *rslt,
-    uint32_t argc,
-    const VRowData argv[]
-) {
-    const self_t *self = Self;
-    rc_t rc;
-    uint32_t intrm;
-    unsigned i;
-    int j;
-    unsigned k;
-    
-    rc = KDataBufferResize(rslt->data, argv[0].u.data.element_count);
-    if (rc)
-        return rc;
-    
-    for (i = 0, k = 0; k != argv[0].u.data.element_count && i < argv[0].u.data.element_count; ++k) {
-        j = 1;
-        switch (self->src.intrinsic_bits) {
-        case 8:
-            j = utf8_utf32(&intrm, ((const char *)argv[0].u.data.base) + i, ((const char *)argv[0].u.data.base) + argv[0].u.data.element_count);
-            if (j == 0)
-                return RC(rcVDB, rcFunction, rcExecuting, rcData, rcInsufficient);
-            if (j < 0)
-                return RC(rcVDB, rcFunction, rcExecuting, rcData, rcInvalid);
-            break;
-        case 16:
-            intrm = ((const uint16_t *)argv[0].u.data.base)[i];
-            break;
-        case 32:
-            intrm = ((const uint32_t *)argv[0].u.data.base)[i];
-            break;
-        }
-        ((char *)rslt->data->base)[k] = intrm < 128 ? (char)intrm : '.';
-        i += j;
-    }
-    rslt->element_count = k;
-    return 0;
-}
-
-
-static rc_t cast_to_unicode(
-    void *Self,
-    const VXformInfo *info,
-    int64_t row_id,
-    VRowResult *rslt,
-    uint32_t argc,
-    const VRowData argv[]
-) {
-    const self_t *self = Self;
-    rc_t rc;
-    uint32_t intrm;
-    unsigned i;
-    int j;
-    unsigned k;
-    
-    rc = KDataBufferResize(rslt->data, argv[0].u.data.element_count + 8);
-    if (rc)
-        return rc;
-    
-    for (i = 0, k = 0; i != argv[0].u.data.element_count; ) {
-        if (k + 8 >= rslt->data->elem_count) {
-            rc = KDataBufferResize(rslt->data, rslt->data->elem_count << 1);
-            if (rc)
-                return rc;
-        }
-        j = 1;
-        switch (self->src.intrinsic_bits) {
-        case 8:
-            if (self->src.domain == vtdAscii)
-                intrm = ((const char *)argv[0].u.data.base)[i];
-            else {
-                j = utf8_utf32(&intrm, ((const char *)argv[0].u.data.base) + i, ((const char *)argv[0].u.data.base) + argv[0].u.data.element_count);
-                if (j == 0)
-                    return RC(rcVDB, rcFunction, rcExecuting, rcData, rcInsufficient);
-                if (j < 0)
-                    return RC(rcVDB, rcFunction, rcExecuting, rcData, rcInvalid);
-            }
-            break;
-        case 16:
-            intrm = ((const uint16_t *)argv[0].u.data.base)[i];
-            break;
-        case 32:
-            intrm = ((const uint32_t *)argv[0].u.data.base)[i];
-            break;
-        }
-        i += j;
-        j = 1;
-        switch (self->dst.intrinsic_bits) {
-        case 8:
-            j = utf32_utf8(((char *)rslt->data->base) + k, ((char *)rslt->data->base) + k + 8, intrm);
-            assert(j > 0);
-            break;
-        case 16:
-            ((uint16_t *)rslt->data->base)[k] = intrm < 0x10000 ? intrm : '.';
-            break;
-        case 32:
-            ((uint32_t *)rslt->data->base)[k] = intrm;
-            break;
-        }
-        k += j;
-    }
-    rslt->element_count = k;    
-    return 0;
-}
-
-/* 
- */
-VTRANSFACT_IMPL(vdb_cast, 1, 0, 0) (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc = 0;
-    self_t *self;
-    
-    self = malloc(sizeof(self_t));
-    if (self) {
-        int i = 0;
-        int j = 0;
-        
-        rslt->self = self;
-        rslt->whack = free;
-        
-        self->src = dp->argv[0].desc;
-        self->dst = info->fdesc.desc;
-        
-        i = desc_to_number(&self->src);
-        j = desc_to_number(&self->dst);
-        
-        if (i >= 0 && j >= 0) {
-            rslt->variant = vftArray;
-            rslt->u.af = funcs[i][j];
-            
-            return 0;
-        }
-        if ((self->dst.domain == vtdAscii || self->dst.domain == vtdUnicode) && (self->src.domain == vtdAscii || self->src.domain == vtdUnicode)) {
-            rslt->variant = vftRow;
-            rslt->u.rf = self->dst.domain == vtdAscii ? cast_to_ascii : cast_to_unicode;
-            
-            return 0;
-        }
-        rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-        free(self);
-    }
-    else
-        rc = RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-    return rc;
-}
-EOD
-
-__END__
diff --git a/libs/vdb/index_insert.c b/libs/vdb/index_insert.c
deleted file mode 100644
index e715dcb..0000000
--- a/libs/vdb/index_insert.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#include <sra/sradb.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <vdb/vdb.h>
-#include <kdb/index.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-struct self_t {
-    KIndex *ndx;
-    char *key_buf;
-    size_t key_buf_size;
-    uint8_t case_sensitivity;
-};
-
-/*
- function utf8 idx:text:insert #1.1 < ascii index_name, * U8 case_sensitivity > ( utf8 key );
- */
-
-static
-rc_t CC index_insert( void *Self, const VXformInfo *info, int64_t row_id,
-                       VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    struct self_t *self = Self;
-    rc_t rc;
-    const char *x;
-    char skey[4096];
-    char *key = skey;
-    uint32_t key_len;
-    bool return_key = false;
-
-    rslt -> elem_count = 0;
-
-    x = argv [ 0 ] . u . data . base;
-    key_len = argv [ 0 ] . u . data . elem_count;
-    x += argv [ 0 ] . u . data . first_elem;
-    
-    if (key_len + 1 >= sizeof(skey)) {
-        if (key_len + 1 >= self->key_buf_size) {
-            void *temp = realloc(self->key_buf, key_len + 1);
-            if (temp == NULL)
-                return RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-            self->key_buf = temp;
-            self->key_buf_size = key_len + 1;
-        }
-        key = self->key_buf;
-    }
-    switch (self->case_sensitivity) {
-        case CASE_SENSITIVE:
-            memcpy(key, x, key_len);
-            break;
-        case CASE_INSENSITIVE_LOWER:
-            tolower_copy(key, sizeof skey, x, key_len);
-            return_key = string_cmp(key, key_len, x, key_len, key_len) != 0;
-            break;
-        case CASE_INSENSITIVE_UPPER:
-            toupper_copy(key, sizeof skey, x, key_len);
-            return_key = string_cmp(key, key_len, x, key_len, key_len) != 0;
-            break;
-        default:
-            assert(false);
-    }
-    key[key_len] = 0;
-
-    /* attempt to insert into index */
-    rc = KIndexInsertText ( self->ndx, false, key, row_id );
-    if ( rc != 0 || return_key )
-    {
-        /* insert failed for whatever reason - return key */
-        rc = KDataBufferResize ( rslt -> data, key_len );
-        if ( rc != 0 )
-            return rc;
-        memcpy ( rslt -> data -> base, x, key_len );
-        
-        rslt -> elem_count = key_len;
-    }
-    
-    return 0;
-}    
-
-static void CC self_whack(void *Self) {
-    struct self_t *self = Self;
-    KIndexRelease(self->ndx);
-    if (self->key_buf)
-        free(self->key_buf);
-    free(Self);
-}
-
-VTRANSFACT_IMPL ( idx_text_insert, 1, 1, 0 ) ( const void *Self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    struct self_t *self;
-    
-    self = malloc(sizeof(*self));
-    if (self) {
-        rc_t rc;
-        
-        rc = VTableCreateIndex ( ( VTable* ) info -> tbl, &self->ndx, kitText | kitProj, kcmOpen,
-                                "%.*s", cp->argv[0].count, cp->argv[0].data.ascii );
-        if( rc == 0 ) {
-            rslt->self = self;
-            rslt->whack = self_whack;
-            rslt->variant = vftNonDetRow;
-            rslt->u.ndf = index_insert;
-            self->key_buf = NULL;
-            self->key_buf_size = 0;
-            self->case_sensitivity = cp->argc >= 2 ? *cp->argv[1].data.u8 : CASE_SENSITIVE;
-            return 0;
-        }
-        free(self);
-        return rc;
-    }
-    else
-        return RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-}
diff --git a/libs/vdb/index_lookup.c b/libs/vdb/index_lookup.c
deleted file mode 100644
index 85b2095..0000000
--- a/libs/vdb/index_lookup.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include "blob.h"
-#include "blob-headers.h"
-#include "page-map.h"
-#include "blob-priv.h"
-#include "xform-priv.h"
-
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <vdb/vdb-priv.h>
-#include <vdb/vdb.h>
-#include <kdb/index.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/pbstree.h>
-#include <klib/log.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
-#include <assert.h>
-
-typedef struct tag_self_t {
-    const       KIndex *ndx;
-    char        query_key[1024];
-    uint32_t    query_key_len;
-    const struct VCursorParams * parms;
-    uint32_t    elem_bits;
-    uint8_t     case_sensitivity;
-} self_t;
-
-static void CC self_whack( void *Self )
-{
-    self_t *self = Self;
-    
-    KIndexRelease( self->ndx );
-    free( self );
-}
-
-
-static
-rc_t CC index_lookup_impl(
-                          void *Self,
-                          const VXformInfo *info,
-                          int64_t row_id,
-                          VRowResult *rslt,
-                          uint32_t argc,
-                          const VRowData argv[]
-                          )
-{
-    rc_t rc;
-    const self_t *self = Self;
-    KDataBuffer *query_buf = NULL;
-    
-    rslt->elem_count = 0;
-    rslt->no_cache = 1;
-    
-    rc = VCursorParamsGet(self->parms, self->query_key, &query_buf);
-    if (GetRCState(rc) == rcNotFound && GetRCObject(rc) == rcName) {
-        rc = KDataBufferResize(rslt->data, 0);
-        return rc;
-    }
-    if (rc == 0) {
-        char  squery[4096];
-        char *hquery = NULL;
-        char *query = squery;
-        uint64_t id_count;
-        int64_t start_id;
-        
-        if (query_buf->elem_count >= sizeof(squery)) {
-            hquery = malloc(query_buf->elem_count + 1);
-            if (hquery == NULL)
-                return RC(rcVDB, rcIndex, rcReading, rcMemory, rcExhausted);
-            query = hquery;
-        }
-        switch (self->case_sensitivity) {
-            case CASE_SENSITIVE:
-                memcpy(query, query_buf->base, query_buf->elem_count);
-                break;
-            case CASE_INSENSITIVE_LOWER:
-                tolower_copy(query, sizeof squery, query_buf->base, query_buf->elem_count);
-                break;
-            case CASE_INSENSITIVE_UPPER:
-                toupper_copy(query, sizeof squery, query_buf->base, query_buf->elem_count);
-                break;
-            default:
-                assert(false);
-        }
-        query[query_buf->elem_count] = '\0';
-        rc = KIndexFindText(self->ndx, query, &start_id, &id_count,NULL,NULL);
-        if (hquery)
-            free(hquery);
-        if (rc == 0) {
-            rc = KDataBufferResize ( rslt -> data, 1 );
-            if( rc == 0) {
-                int64_t *out = rslt -> data->base;
-                
-                out[0] = start_id;
-                out[1] = start_id + id_count - 1;
-
-                rslt -> elem_count = 1;
-                rslt -> no_cache = 1; /***** This row should never be cached **/
-            }
-        }
-    }
-    return rc;
-}
-
-/*
- * function vdb:row_id_range  idx:text:lookup #1.1 < ascii index_name , ascii query_by_name, * U8 case_sensitivity > ();
- */
-VTRANSFACT_BUILTIN_IMPL(idx_text_lookup, 1, 1, 0) (
-                                           const void *Self,
-                                           const VXfactInfo *info,
-                                           VFuncDesc *rslt,
-                                           const VFactoryParams *cp,
-                                           const VFunctionParams *dp
-) {
-    rc_t rc;
-    const KIndex *ndx;
-    KIdxType type;
-    
-    rc = VTableOpenIndexRead(info->tbl, &ndx, "%.*s", (int)cp->argv[0].count, cp->argv[0].data.ascii);
-    if ( rc != 0 )
-    {
-        if ( GetRCState ( rc ) != rcNotFound )
-            PLOGERR (klogErr, (klogErr, rc, "Failed to open index '$(index)'", "index=%.*s", (int)cp->argv[0].count, cp->argv[0].data.ascii));
-        return rc;
-    }
-    
-    rc = KIndexType(ndx, &type);
-    if (rc == 0) {
-        if (type == kitProj + kitText) {
-            self_t *self;
-            
-            self = malloc(sizeof(*self));
-            if (self) {
-                self->ndx = ndx;
-                self->elem_bits = VTypedescSizeof(&info->fdesc.desc);
-                memcpy(self->query_key,cp->argv[1].data.ascii,cp->argv[1].count);
-                self->query_key_len = cp->argv[1].count;
-                self->query_key[self->query_key_len] = '\0';
-                self->parms = info->parms;
-                self->case_sensitivity = cp->argc >= 3 ? *cp->argv[2].data.u8 : CASE_SENSITIVE;
-                
-                rslt->self = self;
-                rslt->whack = self_whack;
-                rslt->variant = vftNonDetRow;
-                rslt->u.ndf = index_lookup_impl;
-                return 0;
-            }
-            rc = RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-        }
-        else
-            rc = RC(rcVDB, rcFunction, rcConstructing, rcIndex, rcIncorrect);
-    }
-    KIndexRelease(ndx);
-    return rc;
-}
diff --git a/libs/vdb/index_project.c b/libs/vdb/index_project.c
deleted file mode 100644
index 422f386..0000000
--- a/libs/vdb/index_project.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include "blob.h"
-#include "blob-headers.h"
-#include "page-map.h"
-#include "blob-priv.h"
-#include "xform-priv.h"
-
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <vdb/vdb.h>
-#include <kdb/index.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <assert.h>
-
-typedef struct tag_self_t {
-    const KIndex *ndx;
-    uint32_t elem_bits;
-    uint8_t case_sensitivity;
-} self_t;
-
-static void CC self_whack( void *Self )
-{
-    self_t *self = Self;
-    
-    KIndexRelease( self->ndx );
-    free( self );
-}
-
-#include <stdio.h>
-
-static
-rc_t CC index_project_impl(
-                            void *Self,
-                            const VXformInfo *info,
-                            int64_t row_id,
-                            VBlob **rslt,
-                            uint32_t argc, const VBlob *argv[]
-) {
-    rc_t rc;
-    const self_t *self = Self;
-    KDataBuffer temp_buff;
-    uint64_t id_count;
-    int64_t start_id;
-    int64_t empty_row_id_start = -1;
-    int64_t empty_row_id_count = -1;
-    size_t sz = 1023;
-    bool attached_to_col = argc > 0 && argv[0] != NULL;
-    
-    /* first try to load value from the column. if returned blob is empty or row is not found, go to index */
-    if ( attached_to_col ) {
-        /*** this types of blobs may have holes in them ***/
-        rc = VBlobSubblob(argv[0],rslt,row_id );
-        if (rc != 0) {
-            if (GetRCState(rc) == rcEmpty && GetRCObject(rc) == rcRow) {
-                empty_row_id_start = row_id;
-                empty_row_id_count = 1;
-            }
-            else {
-                return rc;
-            }
-        }
-        else if ((*rslt)->data.elem_count > 0) {
-            return rc;
-        }
-        else {
-            empty_row_id_start = (*rslt)->start_id;
-            empty_row_id_count = (*rslt)->stop_id - (*rslt)->start_id + 1;
-            
-            TRACK_BLOB( VBlobRelease, *rslt );
-            (void)VBlobRelease( *rslt );
-        }
-
-        assert(empty_row_id_count >= 1);
-    }
-
-    rc = KDataBufferMakeBytes( &temp_buff, sz + 1 );
-    if ( rc != 0 )
-        return rc;
-
-    for ( ; ; ) {
-        rc = KIndexProjectText(self->ndx, row_id, &start_id, &id_count, temp_buff.base, temp_buff.elem_count, &sz);
-        if ((GetRCState(rc) == rcNotFound && GetRCObject(rc) == rcId) || sz==0 ){
-            if ( !attached_to_col )
-                rc = RC(rcVDB, rcFunction, rcExecuting, rcRow, rcNotFound);
-            else
-            {
-                // return an empty row, but we don't know how many empty rows
-                // are there, since even row_id+1 may have a key stored in index
-                rc = 0;
-                sz = 0;
-                start_id = row_id;
-                id_count = 1;
-            }
-
-            break;
-        }
-        if ( GetRCState( rc ) == rcInsufficient && GetRCObject( rc ) == (enum RCObject)rcBuffer )
-        {
-            rc = KDataBufferResize ( &temp_buff, (uint32_t)( sz + 1 ) );
-            if (rc == 0) {
-                continue;
-            }
-        }
-        
-        // When in case_sensitivity mode is case insensitive, index does not accurately represent actual values,
-        // as we still store key in a column when it differs from what we inserted into index
-        if (self->case_sensitivity != CASE_SENSITIVE && attached_to_col)
-        {
-            if ( start_id < empty_row_id_start )
-            {
-                id_count -= empty_row_id_start - start_id;
-                start_id = empty_row_id_start;
-            }
-
-            if ( start_id + id_count > empty_row_id_start + empty_row_id_count )
-            {
-                id_count = empty_row_id_start + empty_row_id_count - start_id;
-            }
-        }
-        break;
-    }
-
-    if ( rc == 0 )
-    {
-        /* it seems old index returns length including \0 so we have to adjust */
-        while (sz > 0 && ((char *)temp_buff.base)[sz - 1] == '\0')
-            --sz;
-
-        // now we know real size of the data, lets set in data buffer too
-        assert ( temp_buff.elem_count >= sz );
-        if ( temp_buff.elem_count != sz )
-            rc = KDataBufferResize ( &temp_buff, (uint32_t)( sz ) );
-    }
-
-    if (rc == 0)
-    {
-        rc = VBlobCreateFromSingleRow ( rslt, start_id, start_id + id_count - 1, &temp_buff, vboNative );
-    }
-
-    KDataBufferWhack(&temp_buff);
-    return rc;
-}
-
-VTRANSFACT_BUILTIN_IMPL(idx_text_project, 1, 1, 1) (
-                                           const void *Self,
-                                           const VXfactInfo *info,
-                                           VFuncDesc *rslt,
-                                           const VFactoryParams *cp,
-                                           const VFunctionParams *dp
-) {
-    rc_t rc;
-    const KIndex *ndx;
-    KIdxType type;
-    
-    rc = VTableOpenIndexRead(info->tbl, &ndx, "%.*s", (int)cp->argv[0].count, cp->argv[0].data.ascii);
-    if ( rc != 0 )
-    {
-        if ( GetRCState ( rc ) != rcNotFound )
-            PLOGERR (klogErr, (klogErr, rc, "Failed to open index '$(index)'", "index=%.*s", (int)cp->argv[0].count, cp->argv[0].data.ascii));
-        return rc;
-    }
-    
-    rc = KIndexType(ndx, &type);
-    if (rc == 0) {
-        if (type == kitProj + kitText) {
-            self_t *self;
-            
-            self = malloc(sizeof(*self));
-            if (self) {
-                self->ndx = ndx;
-                self->elem_bits = VTypedescSizeof(&info->fdesc.desc);
-                self->case_sensitivity = cp->argc >= 2 ? *cp->argv[1].data.u8 : CASE_SENSITIVE;
-                rslt->self = self;
-                rslt->whack = self_whack;
-                rslt->variant = vftBlobN;
-                VFUNCDESC_INTERNAL_FUNCS(rslt)->bfN = index_project_impl;
-                return 0;
-            }
-            rc = RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-        }
-        else
-            rc = RC(rcVDB, rcFunction, rcConstructing, rcIndex, rcIncorrect);
-    }
-    KIndexRelease(ndx);
-    return rc;
-}
diff --git a/libs/vdb/libvdb.vers.h b/libs/vdb/libvdb.vers.h
deleted file mode 100644
index 28af961..0000000
--- a/libs/vdb/libvdb.vers.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define LIBVDB_VERS 0x02070014
diff --git a/libs/vdb/linker-cmn.c b/libs/vdb/linker-cmn.c
deleted file mode 100644
index 728a51a..0000000
--- a/libs/vdb/linker-cmn.c
+++ /dev/null
@@ -1,656 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define TRACK_REFERENCES 0
-
-#include "linker-priv.h"
-#include "schema-priv.h"
-#include "dbmgr-priv.h"
-
-#include <kfs/directory.h>
-#include <kfs/dyload.h>
-#include <kfs/kfs-priv.h>
-#include <klib/symbol.h>
-#include <klib/symtab.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * LFactory
- *  describes an external C function factory
- */
-
-/* Whack
- */
-void CC LFactoryWhack ( void *item, void *ignore )
-{
-    LFactory *self = item;
-
-    /* whack the guy's factory object */
-    if ( self -> desc . whack != NULL )
-        ( * self -> desc . whack ) ( self -> desc . fself );
-
-    /* douse the dynamic library */
-    KSymAddrRelease ( self -> addr );
-
-    /* gone */
-    free ( self );
-}
-
-
-/*--------------------------------------------------------------------------
- * LSpecial
- *  describes an external C table recognition function
- */
-
-/* Whack
- */
-void CC LSpecialWhack ( void *item, void *ignore )
-{
-    LSpecial *self = item;
-    KSymAddrRelease ( self -> addr );
-    free ( self );
-}
-
-
-/*--------------------------------------------------------------------------
- * VLinker
- */
-
-/* Whack
- */
-static
-rc_t CC VLinkerWhack ( VLinker *self )
-{
-    KRefcountWhack ( & self -> refcount, "VLinker" );
-
-    VectorWhack ( & self -> fact, LFactoryWhack, NULL );
-    VectorWhack ( & self -> special, LSpecialWhack, NULL );
-    BSTreeWhack ( & self -> scope, KSymbolWhack, NULL );
-
-    KDyldRelease ( self -> dl );
-    VLinkerSever ( self -> dad );
-
-    free ( self );
-
-    return 0;
-}
-
-
-/* StartIdx
- *  returns starting index
- */
-#define VLinkerStartIdx( dad, vect, starting ) \
-    ( ( ( dad ) == NULL ) ? ( starting ) : \
-      ( VectorStart ( & ( dad ) -> vect ) + \
-        VectorLength ( & ( dad ) -> vect ) ) )
-
-/* VectorInit
- *  performs vector initialization
- */
-#define VLinkerVectorInit( linker, dad, vect, starting, block ) \
-    VectorInit ( & ( linker ) -> vect, VLinkerStartIdx ( dad, vect, starting ), block )
-
-/* Make
- *  creates an empty linker
- */
-rc_t VLinkerMake ( VLinker **lp, const VLinker *dad, struct KDyld *dl )
-{
-    rc_t rc;
-
-    VLinker *linker = malloc ( sizeof * linker );
-    if ( linker == NULL )
-        return RC ( rcVDB, rcMgr, rcConstructing, rcMemory, rcExhausted );
-
-    rc = KDyldAddRef ( linker -> dl = dl );
-    if ( rc == 0 )
-    {
-        linker -> dad = VLinkerAttach ( dad );
-        BSTreeInit ( & linker -> scope );
-
-        VLinkerVectorInit ( linker, dad, fact, 1, 64 );
-        VLinkerVectorInit ( linker, dad, special, 1, 8 );
-
-        KRefcountInit ( & linker -> refcount, 1, "VLinker", "make", "vld" );
-    
-        * lp = linker;
-        return 0;
-    }
-
-    free ( linker );
-    return rc;
-}
-
-/* Release
- */
-rc_t VLinkerRelease ( const VLinker *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "VLinker" ) )
-        {
-        case krefWhack:
-            return VLinkerWhack ( ( VLinker* ) self );
-        case krefNegative:
-            return RC ( rcVDB, rcMgr, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Attach
- * Sever
- */
-VLinker *VLinkerAttach ( const VLinker *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "VLinker" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( VLinker* ) self;
-}
-
-rc_t VLinkerSever ( const VLinker *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "VLinker" ) )
-        {
-        case krefWhack:
-            return VLinkerWhack ( ( VLinker* ) self );
-        case krefNegative:
-            return RC ( rcVDB, rcMgr, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* AddLoadLibraryPath
- *  add a path[s] to loader for locating dynamic libraries
- */
-rc_t VLinkerVAddLoadLibraryPath ( const VLinker *self, const char *path, va_list args )
-{
-    if ( self != NULL )
-        return KDyldVAddSearchPath ( self -> dl, path, args );
-
-    return RC ( rcVDB, rcMgr, rcUpdating, rcSelf, rcNull );
-}
-
-
-/* Open
- *  opens libraries for search
- */
-rc_t VLinkerOpen ( const VLinker *self, struct KDlset **libs )
-{
-    rc_t rc = KDyldMakeSet ( self -> dl, libs );
-    if ( rc == 0 )
-    {
-        KDlset *set = * libs;
-
-        rc = KDlsetAddAll ( set );
-        if ( rc == 0 )
-            return 0;
-
-        KDlsetRelease ( set );
-        * libs = NULL;
-    }
-    return rc;
-}
-
-
-/* EnterIntoScope
- *  pushes linker symbol tables into scope
- */
-static
-rc_t CC VLinkerEnterIntoScope ( const VLinker *self, KSymTable *tbl )
-{
-    rc_t rc;
-
-    if ( self -> dad == NULL )
-        rc = KSymTableInit ( tbl, NULL );
-    else
-        rc = VLinkerEnterIntoScope ( self -> dad, tbl );
-
-    if ( rc == 0 )
-        rc = KSymTablePushScope ( tbl, & ( ( VLinker* ) self ) -> scope );
-
-    return rc;
-}
-
-
-/* MakeFQN
- */
-static
-size_t CC VLinkerMakeFQN ( char *buffer, size_t bsize, const KSymbol *name )
-{
-    size_t sz = 0;
-
-    if ( name -> dad != NULL )
-    {
-        sz = VLinkerMakeFQN ( buffer, bsize, name -> dad );
-        if ( sz < bsize )
-            buffer [ sz ++ ] = '_';
-    }
-
-    if ( sz < bsize )
-    {
-        sz += string_copy ( & buffer [ sz ], bsize - sz,
-            name -> name . addr, name -> name . size );
-    }
-
-    return sz;
-}
-
-/* ScanFactory
- *  scans code modules for all named entrypoints
- *  compares version numbers, retaining the highest
- *  that satisfies stated functional interface
- */
-typedef struct VLinkerFactoryMatchData VLinkerFactoryMatchData;
-struct VLinkerFactoryMatchData
-{
-    VTransDesc desc;
-    uint32_t version;
-};
-
-static
-bool CC VLinkerBestMatch ( const KSymAddr *sym, void *data )
-{
-    VLinkerFactoryMatchData *pb = data;
-
-    rc_t rc;
-    VTransDesc desc;
-
-    rc_t ( CC * f ) ( VTransDesc* );
-    KSymAddrAsFunc ( sym, ( fptr_t* ) & f );
-
-    memset ( & desc, 0, sizeof desc );
-    rc = ( * f ) ( & desc );
-    if ( rc == 0 )
-    {
-        /* we don't actually expect to see two versions
-           of a factory at all, much less with the same
-           major interface version */
-        uint32_t maj = desc . itf_version >> 24;
-        if ( maj != 0 && maj == ( pb -> desc . itf_version >> 24 ) )
-        {
-            /* TBD - issue warning */
-        }
-
-        /* prototype should have been declared with a version,
-           but if not, then any version will do */
-        if ( pb -> version == 0 ||
-             ( maj == ( pb -> version >> 24 ) &&
-               desc . itf_version >= pb -> version ) )
-        {
-            /* accept latest version */
-            if ( desc . itf_version > pb -> desc . itf_version )
-            {
-                pb -> desc = desc;
-                return true;
-            }
-        }
-    }
-    return false;
-}
-
-static
-rc_t VLinkerScanFactory ( VLinker *self, const KDlset *libs,
-    KSymTable *tbl, const KSymbol **symp, const KSymbol *name,
-    uint32_t version )
-{
-    rc_t rc;
-
-    /* convert schema fqn into legal C identifier */
-    char fqn [ 1024 ];
-    size_t sz = VLinkerMakeFQN ( fqn, sizeof fqn, name );
-    if ( sz >= sizeof fqn )
-        rc = RC ( rcVDB, rcMgr, rcResolving, rcName, rcExcessive );
-    else
-    {
-        KSymAddr *entrypoint;
-        VLinkerFactoryMatchData pb;
-        memset ( & pb, 0, sizeof pb );
-        pb . version = version;
-
-        /* ask loader to locate fqn in library search path */
-        rc = KDlsetLastSymbol ( libs, & entrypoint,
-            fqn, VLinkerBestMatch, & pb );
-        if ( rc == 0 )
-        {
-            /* allocate factory object */
-            LFactory *fact = malloc ( sizeof * fact );
-            if ( fact == NULL )
-                rc = RC ( rcVDB, rcMgr, rcResolving, rcMemory, rcExhausted );
-            else
-            {
-                /* give it the exact schema name */
-                rc = KSymTableDupSymbol ( tbl,
-                    ( KSymbol** ) & fact -> name, name, ltFactory, fact );
-                if ( rc == 0 )
-                {
-                    /* finally, insert the symbol into our vector */
-                    rc = VectorAppend ( & self -> fact, & fact -> id, fact );
-                    if ( rc == 0 )
-                    {
-                        /* done */
-                        fact -> addr = entrypoint;
-                        fact -> desc = pb . desc;
-                        fact -> external = true;
-                        * symp = fact -> name;
-                        return 0;
-                    }
-
-                    KSymTableRemoveSymbol ( tbl, fact -> name );
-                }
-
-                free ( fact );
-            }
-
-            KSymAddrRelease ( entrypoint );
-        }
-    }
-
-    return rc;
-}
-
-/* ScanSpecial
- *  scans code modules for the first named entrypoint
- */
-static
-rc_t CC VLinkerScanSpecial ( VLinker *self, const KDlset *libs,
-    KSymTable *tbl, const KSymbol **symp, const KSymbol *name, uint32_t type )
-{
-    rc_t rc;
-
-    /* convert schema fqn into legal C identifier */
-    char fqn [ 1024 ];
-    size_t sz = VLinkerMakeFQN ( fqn, sizeof fqn, name );
-    if ( sz >= sizeof fqn )
-        rc = RC ( rcVDB, rcMgr, rcResolving, rcName, rcExcessive );
-    else
-    {
-        /* ask loader to locate fqn in open library set */
-        KSymAddr *entrypoint;
-        rc = KDlsetSymbol ( libs, & entrypoint, fqn );
-        if ( rc == 0 )
-        {
-            /* allocate special function object */
-            LSpecial *special = malloc ( sizeof * special );
-            if ( special == NULL )
-                rc = RC ( rcVDB, rcMgr, rcResolving, rcMemory, rcExhausted );
-            else
-            {
-                special -> func = NULL;
-
-                /* give it the exact schema name */
-                rc = KSymTableDupSymbol ( tbl,
-                    ( KSymbol** ) & special -> name, name, type, special );
-                if ( rc == 0 )
-                {
-                    /* finally, insert the symbol into our vector */
-                    rc = VectorAppend ( & self -> special, & special -> id, special );
-                    if ( rc == 0 )
-                    {
-                        /* done */
-                        special -> addr = entrypoint;
-                        * symp = special -> name;
-                        return 0;
-                    }
-
-                    KSymTableRemoveSymbol ( tbl, special -> name );
-                }
-
-                free ( special );
-            }
-
-            KSymAddrRelease ( entrypoint );
-        }
-    }
-
-    return rc;
-}
-
-/* Find
- *  find a named symbol
- *
- *  "func" [ OUT ] - return parameter for func pointer
- *
- *  "proto" [ IN ] - function prototype from schema
- *  "min_version" [ IN ] - minimum version to accept
- *
- *  "external" [ OUT ] - tells whether factory is built-in or external
- */
-rc_t VLinkerFindFactory ( VLinker *self, const KDlset *libs,
-    VTransDesc *desc, const SFunction *proto, uint32_t min_version, bool *external )
-{
-    KSymTable tbl;
-    rc_t rc = VLinkerEnterIntoScope ( self, & tbl );
-    if ( rc == 0 )
-    {
-        /* factory name if explicit */
-        const KSymbol *sym, *name = proto -> u . ext . fact;
-
-        /* use simple function name as implicit factory name */
-        if ( name == NULL )
-            name = proto -> name;
-
-        /* look for the symbol by name -
-           factory names do not support version overloading */
-        sym = KSymTableFindSymbol ( & tbl, name );
-
-        /* if not found, search for best match */
-        if ( sym == NULL )
-        {
-            rc = VLinkerScanFactory ( self, libs, & tbl, & sym, name, proto -> version );
-            if ( rc != 0 && min_version != proto -> version )
-                rc = VLinkerScanFactory ( self, libs, & tbl, & sym, name, min_version );
-        }
-
-        /* otherwise ensure the found name is in fact a factory */
-        else if ( sym -> type != ltFactory )
-            rc = RC ( rcVDB, rcMgr, rcResolving, rcName, rcIncorrect );
-
-        /* examine results */
-        if ( rc == 0 )
-        {
-            const LFactory *fact = sym -> u . obj;
-
-            /* test for incompatible version */
-            if ( ( fact -> desc . itf_version >> 24 ) != ( min_version >> 24 ) )
-                rc = RC ( rcVDB, rcMgr, rcResolving, rcInterface, rcIncorrect );
-            else if ( fact -> desc . itf_version < min_version )
-                rc = RC ( rcVDB, rcMgr, rcResolving, rcInterface, rcIncorrect );
-            else
-            {
-                * desc = fact -> desc;
-                * external = fact -> external;
-            }
-        }
-
-        KSymTableWhack ( & tbl );
-    }
-    return rc;
-}
-
-static
-void CC VLinkerNameWhackSymbol ( KSymbol *sym )
-{
-    if ( sym != NULL )
-    {
-        VLinkerNameWhackSymbol ( sym -> dad );
-        free ( sym );
-    }
-}
-
-static
-KSymbol *VLinkerNameToSymbol ( String *name )
-{
-    KSymbol *sym, *dad = NULL;
-    const char *end = string_rchr ( name -> addr, name -> size, ':' );
-    if ( end != 0 )
-    {
-        String sub;
-        StringSubstr ( name, & sub, 0, string_len ( name -> addr, end - name -> addr ) );
-        dad = VLinkerNameToSymbol ( & sub );
-        if ( dad == NULL )
-            return NULL;
-
-        BSTreeInit ( & dad -> u . scope );
-
-        name -> addr += sub . size + 1;
-        name -> size -= sub . size + 1;
-        name -> len -= sub . len + 1;
-    }
-
-    sym = malloc ( sizeof * sym );
-    if ( sym == NULL )
-    {
-        VLinkerNameWhackSymbol ( dad );
-        return NULL;
-    }
-
-    sym -> u . obj = NULL;
-    sym -> dad = dad;
-    sym -> name = * name;
-    sym -> type = 0;
-
-    if ( dad != NULL )
-        BSTreeInsert ( & dad -> u . scope, & sym -> n, KSymbolSort );
-
-    return sym;
-}
-
-rc_t VLinkerFindNamedFactory ( VLinker *self, const KDlset *libs,
-    VTransDesc *desc, const char *fact_name )
-{
-    KSymTable tbl;
-    rc_t rc = VLinkerEnterIntoScope ( self, & tbl );
-    if ( rc == 0 )
-    {
-        KSymbol *name;
-        const KSymbol *sym;
-
-        String str;
-        StringInitCString ( & str, fact_name );
-        name = VLinkerNameToSymbol ( & str );
-
-        /* look for the symbol by name -
-           factory names do not support version overloading */
-        sym = KSymTableFindSymbol ( & tbl, name );
-        
-        /* if not found, search for best match */
-        if ( sym == NULL )
-            rc = VLinkerScanFactory ( self, libs, & tbl, & sym, name, 0 );
-
-        /* otherwise ensure the found name is in fact a factory */
-        else if ( sym -> type != ltFactory )
-            rc = RC ( rcVDB, rcMgr, rcResolving, rcName, rcIncorrect );
-
-        VLinkerNameWhackSymbol ( name );
-
-        /* examine results */
-        if ( rc == 0 )
-        {
-            const LFactory *fact = sym -> u . obj;
-            * desc = fact -> desc;
-        }
-
-        KSymTableWhack ( & tbl );
-    }
-    return rc;
-}
-
-
-rc_t VLinkerFindUntyped ( VLinker *self, const KDlset *libs,
-    VUntypedTableTest *func, const SFunction *proto )
-{
-    KSymTable tbl;
-    rc_t rc = VLinkerEnterIntoScope ( self, & tbl );
-    if ( rc == 0 )
-    {
-        /* untyped functions do not have factories */
-        const KSymbol *sym = KSymTableFindSymbol ( & tbl, proto -> name );
-
-        /* if not found, search for it */
-        if ( sym == NULL )
-            rc = VLinkerScanSpecial ( self, libs, & tbl, & sym, proto -> name, ltUntyped );
-
-        /* otherwise ensure the found name is in fact untyped */
-        else if ( sym -> type != ltUntyped )
-            rc = RC ( rcVDB, rcMgr, rcResolving, rcName, rcIncorrect );
-
-        /* return results */
-        if ( rc == 0 )
-        {
-            const LSpecial *untyped = sym -> u . obj;
-            if ( untyped -> addr == NULL )
-                * func = untyped -> func;
-            else
-                KSymAddrAsFunc ( untyped -> addr, ( fptr_t* ) func );
-        }
-
-        KSymTableWhack ( & tbl );
-    }
-    return rc;
-}
-
-
-/* ListExternalSchemaModules
- */
-rc_t VLinkerListExternalSchemaModules ( const VLinker *self, struct KNamelist **listp )
-{
-    rc_t rc;
-
-    assert ( listp != NULL );
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcDylib, rcListing, rcSelf, rcNull );
-    else
-    {
-        KDlset *libs;
-        rc = VLinkerOpen ( self, & libs );
-        if ( rc == 0 )
-        {
-            rc = KDlsetList ( libs, listp );
-            KDlsetRelease ( libs );
-        }
-    }
-
-    return rc;
-}
diff --git a/libs/vdb/linker-int.c b/libs/vdb/linker-int.c
deleted file mode 100644
index 48672f2..0000000
--- a/libs/vdb/linker-int.c
+++ /dev/null
@@ -1,679 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include "linker-priv.h"
-#include "schema-parse.h"
-#include "xform-priv.h"
-
-#include <kfs/dyload.h>
-#include <klib/token.h>
-#include <klib/symtab.h>
-#include <klib/symbol.h>
-#include <klib/out.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <byteswap.h>
-#include <assert.h>
-
-extern VTRANSFACT_DECL ( vdb_cast );
-extern VTRANSFACT_DECL ( vdb_redimension );
-extern VTRANSFACT_DECL ( vdb_row_id );
-extern VTRANSFACT_DECL ( vdb_row_len );
-extern VTRANSFACT_DECL ( vdb_fixed_row_len );
-extern VTRANSFACT_DECL ( vdb_compare );
-extern VTRANSFACT_DECL ( vdb_no_compare );
-extern VTRANSFACT_DECL ( vdb_range_validate );
-extern VTRANSFACT_DECL ( vdb_merge );
-extern VTRANSFACT_DECL ( vdb_split );
-extern VTRANSFACT_DECL ( vdb_transpose );
-extern VTRANSFACT_DECL ( vdb_detranspose );
-extern VTRANSFACT_DECL ( vdb_delta_average );
-extern VTRANSFACT_DECL ( vdb_undelta_average );
-extern VTRANSFACT_DECL ( meta_read );
-extern VTRANSFACT_DECL ( meta_value );
-extern VTRANSFACT_DECL ( meta_attr_read );
-extern VTRANSFACT_DECL ( idx_text_project );
-extern VTRANSFACT_DECL ( idx_text_lookup );
-extern VTRANSFACT_DECL ( parameter_read );
-extern VTRANSFACT_DECL ( environment_read );
-
-/* newly imported things */
-extern VTRANSFACT_DECL ( ALIGN_align_restore_read );
-extern VTRANSFACT_DECL ( ALIGN_cigar );
-extern VTRANSFACT_DECL ( ALIGN_cigar_2 );
-extern VTRANSFACT_DECL ( ALIGN_generate_has_mismatch );
-extern VTRANSFACT_DECL ( ALIGN_generate_mismatch );
-extern VTRANSFACT_DECL ( ALIGN_generate_mismatch_qual );
-extern VTRANSFACT_DECL ( ALIGN_project_from_sequence );
-extern VTRANSFACT_DECL ( ALIGN_raw_restore_read );
-extern VTRANSFACT_DECL ( ALIGN_ref_restore_read );
-extern VTRANSFACT_DECL ( ALIGN_ref_sub_select );
-extern VTRANSFACT_DECL ( ALIGN_seq_restore_read );
-extern VTRANSFACT_DECL ( ALIGN_seq_restore_linkage_group );
-extern VTRANSFACT_DECL ( INSDC_SEQ_rand_4na_2na );
-extern VTRANSFACT_DECL ( INSDC_SRA_format_spot_name );
-extern VTRANSFACT_DECL ( INSDC_SRA_format_spot_name_no_coord );
-extern VTRANSFACT_DECL ( NCBI_SRA_ABI_tokenize_spot_name );
-extern VTRANSFACT_DECL ( NCBI_SRA_Helicos_tokenize_spot_name );
-extern VTRANSFACT_DECL ( NCBI_SRA_Illumina_tokenize_spot_name );
-extern VTRANSFACT_DECL ( NCBI_SRA_IonTorrent_tokenize_spot_name );
-extern VTRANSFACT_DECL ( NCBI_SRA_GenericFastq_tokenize_spot_name );
-extern VTRANSFACT_DECL ( NCBI_SRA__454__dynamic_read_desc );
-extern VTRANSFACT_DECL ( NCBI_SRA__454__process_position );
-extern VTRANSFACT_DECL ( NCBI_SRA__454__tokenize_spot_name );
-extern VTRANSFACT_DECL ( NCBI_SRA_bio_start );
-extern VTRANSFACT_DECL ( NCBI_SRA_bio_end );
-extern VTRANSFACT_DECL ( NCBI_SRA_decode_CLIP );
-extern VTRANSFACT_DECL ( NCBI_SRA_decode_INTENSITY );
-extern VTRANSFACT_DECL ( NCBI_SRA_decode_NOISE );
-extern VTRANSFACT_DECL ( NCBI_SRA_decode_POSITION );
-extern VTRANSFACT_DECL ( NCBI_SRA_decode_QUALITY );
-extern VTRANSFACT_DECL ( NCBI_SRA_decode_READ );
-extern VTRANSFACT_DECL ( NCBI_SRA_decode_SIGNAL );
-extern VTRANSFACT_DECL ( NCBI_SRA_denormalize );
-extern VTRANSFACT_DECL ( NCBI_SRA_extract_coordinates );
-extern VTRANSFACT_DECL ( NCBI_SRA_extract_name_coord );
-extern VTRANSFACT_DECL ( NCBI_SRA_fix_read_seg );
-extern VTRANSFACT_DECL ( NCBI_SRA_linker_from_readn );
-extern VTRANSFACT_DECL ( NCBI_SRA_lookup );
-extern VTRANSFACT_DECL ( NCBI_SRA_make_position );
-extern VTRANSFACT_DECL ( NCBI_SRA_make_read_desc );
-extern VTRANSFACT_DECL ( NCBI_SRA_make_spot_desc );
-extern VTRANSFACT_DECL ( NCBI_SRA_normalize );
-#if HAVE_PREFIX_TREE_TO_NAME
-extern VTRANSFACT_DECL ( NCBI_SRA_prefix_tree_to_name );
-#endif
-extern VTRANSFACT_DECL ( NCBI_SRA_qual4_decode );
-extern VTRANSFACT_DECL ( NCBI_SRA_qual4_decompress_v1 );
-#if HAVE_READ_LEN_FROM_NREADS
-extern VTRANSFACT_DECL ( NCBI_SRA_read_len_from_nreads );
-extern VTRANSFACT_DECL ( NCBI_SRA_read_start_from_nreads );
-#endif
-extern VTRANSFACT_DECL ( NCBI_SRA_read_seg_from_readn );
-extern VTRANSFACT_DECL ( NCBI_SRA_rewrite_spot_name );
-extern VTRANSFACT_DECL ( NCBI_SRA_rotate );
-extern VTRANSFACT_DECL ( NCBI_SRA_swap );
-extern VTRANSFACT_DECL ( NCBI_WGS_build_read_type );
-extern VTRANSFACT_DECL ( NCBI_WGS_build_scaffold_qual );
-extern VTRANSFACT_DECL ( NCBI_WGS_build_scaffold_read );
-extern VTRANSFACT_DECL ( NCBI_WGS_tokenize_nuc_accession );
-extern VTRANSFACT_DECL ( NCBI_WGS_tokenize_prot_accession );
-extern VTRANSFACT_DECL ( NCBI_align_clip );
-extern VTRANSFACT_DECL ( NCBI_align_clip_2 );
-extern VTRANSFACT_DECL ( NCBI_align_compress_quality );
-extern VTRANSFACT_DECL ( NCBI_align_decompress_quality );
-extern VTRANSFACT_DECL ( NCBI_align_edit_distance );
-extern VTRANSFACT_DECL ( NCBI_align_edit_distance_2 );
-extern VTRANSFACT_DECL ( NCBI_align_edit_distance_3 );
-extern VTRANSFACT_DECL ( NCBI_align_generate_mismatch_qual_2 );
-extern VTRANSFACT_DECL ( NCBI_align_generate_preserve_qual );
-extern VTRANSFACT_DECL ( NCBI_align_get_clipped_cigar );
-extern VTRANSFACT_DECL ( NCBI_align_get_clipped_cigar_2 );
-extern VTRANSFACT_DECL ( NCBI_align_get_clipped_ref_offset );
-extern VTRANSFACT_DECL ( NCBI_align_get_left_soft_clip );
-extern VTRANSFACT_DECL ( NCBI_align_get_left_soft_clip_2 );
-extern VTRANSFACT_DECL ( NCBI_align_get_mate_align_id );
-extern VTRANSFACT_DECL ( NCBI_align_get_mismatch_read );
-extern VTRANSFACT_DECL ( NCBI_align_get_ref_delete );
-extern VTRANSFACT_DECL ( NCBI_align_get_ref_insert );
-extern VTRANSFACT_DECL ( NCBI_align_get_ref_len );
-extern VTRANSFACT_DECL ( NCBI_align_get_ref_len_2 );
-extern VTRANSFACT_DECL ( NCBI_align_get_ref_mismatch );
-extern VTRANSFACT_DECL ( NCBI_align_get_ref_preserve_qual );
-extern VTRANSFACT_DECL ( NCBI_align_get_right_soft_clip );
-extern VTRANSFACT_DECL ( NCBI_align_get_right_soft_clip_2 );
-extern VTRANSFACT_DECL ( NCBI_align_get_right_soft_clip_3 );
-extern VTRANSFACT_DECL ( NCBI_align_get_right_soft_clip_4 );
-extern VTRANSFACT_DECL ( NCBI_align_get_right_soft_clip_5 );
-extern VTRANSFACT_DECL ( NCBI_align_get_sam_flags );
-extern VTRANSFACT_DECL ( NCBI_align_get_sam_flags_2 );
-extern VTRANSFACT_DECL ( NCBI_align_get_seq_preserve_qual );
-extern VTRANSFACT_DECL ( NCBI_align_local_ref_id );
-extern VTRANSFACT_DECL ( NCBI_align_local_ref_start );
-extern VTRANSFACT_DECL ( NCBI_align_make_cmp_read_desc );
-extern VTRANSFACT_DECL ( NCBI_align_make_read_start );
-extern VTRANSFACT_DECL ( NCBI_align_mismatch_restore_qual );
-extern VTRANSFACT_DECL ( NCBI_align_not_my_row );
-extern VTRANSFACT_DECL ( NCBI_align_raw_restore_qual );
-extern VTRANSFACT_DECL ( NCBI_align_ref_name );
-extern VTRANSFACT_DECL ( NCBI_align_ref_pos );
-extern VTRANSFACT_DECL ( NCBI_align_ref_seq_id );
-extern VTRANSFACT_DECL ( NCBI_align_ref_sub_select_preserve_qual );
-extern VTRANSFACT_DECL ( NCBI_align_rna_orientation );
-extern VTRANSFACT_DECL ( NCBI_align_seq_construct_read );
-extern VTRANSFACT_DECL ( NCBI_align_template_len );
-extern VTRANSFACT_DECL ( NCBI_color_from_dna );
-extern VTRANSFACT_DECL ( NCBI_dna_from_color );
-extern VTRANSFACT_DECL ( NCBI_fp_extend );
-extern VTRANSFACT_DECL ( NCBI_lower_case_tech_reads );
-extern VTRANSFACT_DECL ( NCBI_unpack );
-extern VTRANSFACT_DECL ( NCBI_unzip );
-extern VTRANSFACT_DECL ( NCBI_var_tokenize_var_id );
-extern VTRANSFACT_DECL ( vdb_add_row_id );
-extern VTRANSFACT_DECL ( vdb_bit_or );
-extern VTRANSFACT_DECL ( vdb_bunzip );
-extern VTRANSFACT_DECL ( vdb_ceil );
-extern VTRANSFACT_DECL ( vdb_clip );
-extern VTRANSFACT_DECL ( vdb_cut );
-extern VTRANSFACT_DECL ( vdb_delta );
-extern VTRANSFACT_DECL ( vdb_deriv );
-extern VTRANSFACT_DECL ( vdb_diff );
-extern VTRANSFACT_DECL ( vdb_echo );
-extern VTRANSFACT_DECL ( vdb_exists );
-extern VTRANSFACT_DECL ( vdb_extract_token );
-extern VTRANSFACT_DECL ( vdb_fixed_vec_sum );
-extern VTRANSFACT_DECL ( vdb_floor );
-extern VTRANSFACT_DECL ( vdb_funzip );
-extern VTRANSFACT_DECL ( vdb_integral );
-extern VTRANSFACT_DECL ( vdb_integral_0 );
-extern VTRANSFACT_DECL ( vdb_iunzip );
-extern VTRANSFACT_DECL ( vdb_izip );
-extern VTRANSFACT_DECL ( vdb_map );
-extern VTRANSFACT_DECL ( vdb_max );
-extern VTRANSFACT_DECL ( vdb_min );
-extern VTRANSFACT_DECL ( vdb_outlier_decode );
-extern VTRANSFACT_DECL ( vdb_outlier_encode );
-extern VTRANSFACT_DECL ( vdb_pack );
-extern VTRANSFACT_DECL ( vdb_paste );
-extern VTRANSFACT_DECL ( vdb_rldecode );
-extern VTRANSFACT_DECL ( vdb_round );
-extern VTRANSFACT_DECL ( vdb_simple_sub_select );
-extern VTRANSFACT_DECL ( vdb_simple_sub_select_1 );
-extern VTRANSFACT_DECL ( vdb_sprintf );
-extern VTRANSFACT_DECL ( vdb_strtonum );
-extern VTRANSFACT_DECL ( vdb_subtract_row_id );
-extern VTRANSFACT_DECL ( vdb_sum );
-extern VTRANSFACT_DECL ( vdb_trim );
-extern VTRANSFACT_DECL ( vdb_trunc );
-extern VTRANSFACT_DECL ( vdb_undelta );
-extern VTRANSFACT_DECL ( vdb_unpack );
-extern VTRANSFACT_DECL ( vdb_unzip );
-extern VTRANSFACT_DECL ( vdb_vec_sum );
-
-struct KTable;
-struct KMetadata;
-extern bool CC NCBI_SRA_accept_untyped ( struct KTable const *tbl, struct KMetadata const *meta );
-extern bool CC NCBI_SRA__454__untyped_0 ( struct KTable const *tbl, struct KMetadata const *meta );
-extern bool CC NCBI_SRA__454__untyped_1_2a ( struct KTable const *tbl, struct KMetadata const *meta );
-extern bool CC NCBI_SRA__454__untyped_1_2b ( struct KTable const *tbl, struct KMetadata const *meta );
-extern bool CC NCBI_SRA_Illumina_untyped_0a ( struct KTable const *tbl, struct KMetadata const *meta );
-extern bool CC NCBI_SRA_Illumina_untyped_0b ( struct KTable const *tbl, struct KMetadata const *meta );
-extern bool CC NCBI_SRA_Illumina_untyped_1a ( struct KTable const *tbl, struct KMetadata const *meta );
-extern bool CC NCBI_SRA_Illumina_untyped_1b ( struct KTable const *tbl, struct KMetadata const *meta );
-extern bool CC NCBI_SRA_ABI_untyped_1 ( struct KTable const *tbl, struct KMetadata const *meta );
-
-
-/* select is REALLY internal */
-static
-rc_t CC select_func ( void *self, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    return 0;
-}
-
-VTRANSFACT_BUILTIN_IMPL ( vdb_select, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    /* set function pointer to non-NULL */
-    rslt -> u . rf = select_func;
-    rslt -> variant = vftSelect;
-    return 0;
-}
-
-/* temporary silly stuff
- */
-
-static
-rc_t CC hello_func ( void *self, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    char *func_hello = self;
-    OUTMSG (( "%s - row id %ld\n", func_hello, row_id ));
-    return 0;
-}
-
-VTRANSFACT_BUILTIN_IMPL ( vdb_hello, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    const char *fact_hello = "vdb:hello factory";
-    const char *func_hello = "vdb:hello function";
-
-    if ( cp -> argc > 0 )
-    {
-        fact_hello = cp -> argv [ 0 ] . data . ascii;
-        if ( cp -> argc > 1 )
-            func_hello = cp -> argv [ 1 ] . data . ascii;
-    }
-
-    rslt -> self = malloc ( strlen ( func_hello ) + 1 );
-    if ( rslt -> self == NULL )
-        return RC ( rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    strcpy ( rslt -> self, func_hello );
-    rslt -> whack = free;
-    rslt -> u . rf = hello_func;
-    rslt -> variant = vftRow;
-
-    OUTMSG (( "%s - %u factory params, %u function params\n", fact_hello, cp -> argc, dp -> argc ));
-    return 0;
-}
-
-/* InitFactories
- */
-static
-rc_t CC VLinkerEnterFactory ( KSymTable *tbl, const SchemaEnv *env,
-    LFactory *lfact, const char *name )
-{
-    rc_t rc;
-
-    KTokenSource src;
-    KTokenText tt;
-    KToken t;
-
-    KTokenTextInitCString ( & tt, name, "VLinkerEnterFactory" );
-    KTokenSourceInit ( & src, & tt );
-    next_token ( tbl, & src, & t );
-
-    rc = create_fqn ( tbl, & src, & t, env, ltFactory, lfact );
-    if ( rc == 0 )
-        lfact -> name = t . sym;
-
-    return rc;
-}
-
-
-rc_t VLinkerAddFactories ( VLinker *self,
-    const VLinkerIntFactory *fact, uint32_t count,
-    KSymTable *tbl, const SchemaEnv *env )
-{
-    uint32_t i;
-    for ( i = 0; i < count; ++ i )
-    {
-        rc_t rc;
-        LFactory *lfact = malloc ( sizeof * lfact );
-        if ( lfact == NULL )
-            return RC ( rcVDB, rcFunction, rcRegistering, rcMemory, rcExhausted );
-
-        /* invoke factory to get description */
-        rc = ( * fact [ i ] . f ) ( & lfact -> desc );
-        if ( rc != 0 )
-        {
-            free ( lfact );
-            return rc;
-        }
-
-        /* I am intrinsic and have no dl symbol */
-        lfact -> addr = NULL;
-        lfact -> name = NULL;
-        lfact -> external = false;
-
-        /* add to linker */
-        rc = VectorAppend ( & self -> fact, & lfact -> id, lfact );
-        if ( rc != 0 )
-        {
-            LFactoryWhack ( lfact, NULL );
-            return rc;
-        }
-
-        /* create name */
-        rc = VLinkerEnterFactory ( tbl, env, lfact, fact [ i ] . name );
-        if ( rc != 0 )
-        {
-            void *ignore;
-            VectorSwap ( & self -> fact, lfact -> id, NULL, & ignore );
-            LFactoryWhack ( lfact, NULL );
-            return rc;
-        }
-    }
-
-    return 0;
-}
-
-
-static
-rc_t CC VLinkerEnterSpecial ( KSymTable *tbl, const SchemaEnv *env,
-    LSpecial *lspec, const char *name )
-{
-    rc_t rc;
-
-    KTokenSource src;
-    KTokenText tt;
-    KToken t;
-
-    KTokenTextInitCString ( & tt, name, "VLinkerEnterSpecial" );
-    KTokenSourceInit ( & src, & tt );
-    next_token ( tbl, & src, & t );
-
-    rc = create_fqn ( tbl, & src, & t, env, ltUntyped, lspec );
-    if ( rc == 0 )
-        lspec -> name = t . sym;
-
-    return rc;
-}
-
-typedef struct VLinkerIntSpecial VLinkerIntSpecial;
-struct VLinkerIntSpecial
-{
-    bool ( CC * f ) ( struct KTable const *tbl, struct KMetadata const *meta );
-    const char *name;
-};
-
-static
-rc_t VLinkerAddUntyped ( VLinker *self,
-    const VLinkerIntSpecial *special, uint32_t count,
-    KSymTable *tbl, const SchemaEnv *env )
-{
-    uint32_t i;
-    for ( i = 0; i < count; ++ i )
-    {
-        rc_t rc;
-        LSpecial *lspec = malloc ( sizeof * lspec );
-        if ( lspec == NULL )
-            return RC ( rcVDB, rcFunction, rcRegistering, rcMemory, rcExhausted );
-
-        /* I am intrinsic and have no dl symbol */
-        lspec -> addr = NULL;
-        lspec -> name = NULL;
-        lspec -> func = special [ i ] . f;
-
-        /* add to linker */
-        rc = VectorAppend ( & self -> special, & lspec -> id, lspec );
-        if ( rc != 0 )
-        {
-            LSpecialWhack ( lspec, NULL );
-            return rc;
-        }
-
-        /* create name */
-        rc = VLinkerEnterSpecial ( tbl, env, lspec, special [ i ] . name );
-        if ( rc != 0 )
-        {
-            void *ignore;
-            VectorSwap ( & self -> special, lspec -> id, NULL, & ignore );
-            LSpecialWhack ( lspec, NULL );
-            return rc;
-        }
-    }
-
-    return 0;
-}
-
-/* InitFactories
- */
-rc_t VLinkerInitFactoriesRead ( VLinker *self,  KSymTable *tbl, const SchemaEnv *env )
-{
-    static VLinkerIntFactory fact [] =
-    {
-        { vdb_cast, "vdb:cast" },
-        { vdb_redimension, "vdb:redimension" },
-        { vdb_row_id, "vdb:row_id" },
-        { vdb_row_len, "vdb:row_len" },
-        { vdb_fixed_row_len, "vdb:fixed_row_len" },
-        { vdb_select, "vdb:select" },
-        { vdb_compare, "vdb:compare" },
-        { vdb_no_compare, "vdb:no_compare" },
-        { vdb_range_validate, "vdb:range_validate" },
-        { vdb_merge, "vdb:merge" },
-        { vdb_split, "vdb:split" },
-        { vdb_transpose, "vdb:transpose" },
-        { vdb_detranspose, "vdb:detranspose" },
-        { vdb_delta_average, "vdb:delta_average" },
-        { vdb_undelta_average, "vdb:undelta_average" },
-        { meta_read, "meta:read" },
-        { meta_value, "meta:value" },
-        { meta_attr_read, "meta:attr:read" },
-        { idx_text_project, "idx:text:project" },
-        { idx_text_lookup, "idx:text:lookup" },
-        { parameter_read, "parameter:read" },
-/*        { environment_read, "environment:read" }, */
-
-        { ALIGN_align_restore_read, "ALIGN:align_restore_read" },
-        { ALIGN_cigar, "ALIGN:cigar" },
-        { ALIGN_cigar_2, "ALIGN:cigar_2" },
-        { ALIGN_generate_has_mismatch, "ALIGN:generate_has_mismatch" },
-        { ALIGN_generate_mismatch, "ALIGN:generate_mismatch" },
-        { ALIGN_generate_mismatch_qual, "ALIGN:generate_mismatch_qual" },
-        { ALIGN_project_from_sequence, "ALIGN:project_from_sequence" },
-        { ALIGN_raw_restore_read, "ALIGN:raw_restore_read" },
-        { ALIGN_ref_restore_read, "ALIGN:ref_restore_read" },
-        { ALIGN_ref_sub_select, "ALIGN:ref_sub_select" },
-        { ALIGN_seq_restore_read, "ALIGN:seq_restore_read" },
-        { ALIGN_seq_restore_linkage_group, "ALIGN:seq_restore_linkage_group" },
-        { INSDC_SEQ_rand_4na_2na, "INSDC:SEQ:rand_4na_2na" },
-        { INSDC_SRA_format_spot_name, "INSDC:SRA:format_spot_name" },
-        { INSDC_SRA_format_spot_name_no_coord, "INSDC:SRA:format_spot_name_no_coord" },
-        { NCBI_SRA_ABI_tokenize_spot_name, "NCBI:SRA:ABI:tokenize_spot_name" },
-        { NCBI_SRA_Helicos_tokenize_spot_name, "NCBI:SRA:Helicos:tokenize_spot_name" },
-        { NCBI_SRA_Illumina_tokenize_spot_name, "NCBI:SRA:Illumina:tokenize_spot_name" },
-        { NCBI_SRA_IonTorrent_tokenize_spot_name, "NCBI:SRA:IonTorrent:tokenize_spot_name" },
-        { NCBI_SRA_GenericFastq_tokenize_spot_name, "NCBI:SRA:GenericFastq:tokenize_spot_name" },
-        { NCBI_SRA__454__dynamic_read_desc, "NCBI:SRA:_454_:dynamic_read_desc" },
-        { NCBI_SRA__454__process_position, "NCBI:SRA:_454_:process_position" },
-        { NCBI_SRA__454__tokenize_spot_name, "NCBI:SRA:_454_:tokenize_spot_name" },
-        { NCBI_SRA_bio_start, "NCBI:SRA:bio_start" },
-        { NCBI_SRA_bio_end, "NCBI:SRA:bio_end" },
-        { NCBI_SRA_decode_CLIP, "NCBI:SRA:decode:CLIP" },
-        { NCBI_SRA_decode_INTENSITY, "NCBI:SRA:decode:INTENSITY" },
-        { NCBI_SRA_decode_NOISE, "NCBI:SRA:decode:NOISE" },
-        { NCBI_SRA_decode_POSITION, "NCBI:SRA:decode:POSITION" },
-        { NCBI_SRA_decode_QUALITY, "NCBI:SRA:decode:QUALITY" },
-        { NCBI_SRA_decode_READ, "NCBI:SRA:decode:READ" },
-        { NCBI_SRA_decode_SIGNAL, "NCBI:SRA:decode:SIGNAL" },
-        { NCBI_SRA_denormalize, "NCBI:SRA:denormalize" },
-        { NCBI_SRA_extract_coordinates, "NCBI:SRA:extract_coordinates" },
-        { NCBI_SRA_extract_name_coord, "NCBI:SRA:extract_name_coord" },
-        { NCBI_SRA_fix_read_seg, "NCBI:SRA:fix_read_seg" },
-#if HAVE_LINKER_FROM_READN
-        { NCBI_SRA_linker_from_readn, "NCBI:SRA:linker_from_readn" },
-#endif
-        { NCBI_SRA_lookup, "NCBI:SRA:lookup" },
-        { NCBI_SRA_make_position, "NCBI:SRA:make_position" },
-        { NCBI_SRA_make_read_desc, "NCBI:SRA:make_read_desc" },
-        { NCBI_SRA_make_spot_desc, "NCBI:SRA:make_spot_desc" },
-        { NCBI_SRA_normalize, "NCBI:SRA:normalize" },
-#if HAVE_PREFIX_TREE_TO_NAME
-        { NCBI_SRA_prefix_tree_to_name, "NCBI:SRA:prefix_tree_to_name" },
-#endif
-        { NCBI_SRA_qual4_decode, "NCBI:SRA:qual4_decode" },
-        { NCBI_SRA_qual4_decompress_v1, "NCBI:SRA:qual4_decompress_v1" },
-#if HAVE_READ_LEN_FROM_NREADS
-        { NCBI_SRA_read_len_from_nreads, "NCBI:SRA:read_len_from_nreads" },
-        { NCBI_SRA_read_start_from_nreads, "NCBI:SRA:read_start_from_nreads" },
-#endif
-        { NCBI_SRA_read_seg_from_readn, "NCBI:SRA:read_seg_from_readn" },
-        { NCBI_SRA_rewrite_spot_name, "NCBI:SRA:rewrite_spot_name" },
-        { NCBI_SRA_rotate, "NCBI:SRA:rotate" },
-        { NCBI_SRA_swap, "NCBI:SRA:swap" },
-        { NCBI_WGS_build_read_type, "NCBI:WGS:build_read_type" },
-        { NCBI_WGS_build_scaffold_qual, "NCBI:WGS:build_scaffold_qual" },
-        { NCBI_WGS_build_scaffold_read, "NCBI:WGS:build_scaffold_read" },
-        { NCBI_WGS_tokenize_nuc_accession, "NCBI:WGS:tokenize_nuc_accession" },
-        { NCBI_WGS_tokenize_prot_accession, "NCBI:WGS:tokenize_prot_accession" },
-        { NCBI_align_clip, "NCBI:align:clip" },
-        { NCBI_align_clip_2, "NCBI:align:clip_2" },
-        { NCBI_align_compress_quality, "NCBI:align:compress_quality" },
-        { NCBI_align_decompress_quality, "NCBI:align:decompress_quality" },
-        { NCBI_align_edit_distance, "NCBI:align:edit_distance" },
-        { NCBI_align_edit_distance_2, "NCBI:align:edit_distance_2" },
-        { NCBI_align_edit_distance_3, "NCBI:align:edit_distance_3" },
-        { NCBI_align_generate_mismatch_qual_2, "NCBI:align:generate_mismatch_qual_2" },
-        { NCBI_align_generate_preserve_qual, "NCBI:align:generate_preserve_qual" },
-        { NCBI_align_get_clipped_cigar, "NCBI:align:get_clipped_cigar" },
-        { NCBI_align_get_clipped_cigar_2, "NCBI:align:get_clipped_cigar_2" },
-        { NCBI_align_get_clipped_ref_offset, "NCBI:align:get_clipped_ref_offset" },
-        { NCBI_align_get_left_soft_clip, "NCBI:align:get_left_soft_clip" },
-        { NCBI_align_get_left_soft_clip_2, "NCBI:align:get_left_soft_clip_2" },
-        { NCBI_align_get_mate_align_id, "NCBI:align:get_mate_align_id" },
-        { NCBI_align_get_mismatch_read, "NCBI:align:get_mismatch_read" },
-        { NCBI_align_get_ref_delete, "NCBI:align:get_ref_delete" },
-        { NCBI_align_get_ref_insert, "NCBI:align:get_ref_insert" },
-        { NCBI_align_get_ref_len, "NCBI:align:get_ref_len" },
-        { NCBI_align_get_ref_len_2, "NCBI:align:get_ref_len_2" },
-        { NCBI_align_get_ref_mismatch, "NCBI:align:get_ref_mismatch" },
-        { NCBI_align_get_ref_preserve_qual, "NCBI:align:get_ref_preserve_qual" },
-        { NCBI_align_get_seq_preserve_qual, "NCBI:align:get_seq_preserve_qual" },
-        { NCBI_align_get_right_soft_clip, "NCBI:align:get_right_soft_clip" },
-        { NCBI_align_get_right_soft_clip_2, "NCBI:align:get_right_soft_clip_2" },
-        { NCBI_align_get_right_soft_clip_3, "NCBI:align:get_right_soft_clip_3" },
-        { NCBI_align_get_right_soft_clip_4, "NCBI:align:get_right_soft_clip_4" },
-        { NCBI_align_get_right_soft_clip_5, "NCBI:align:get_right_soft_clip_5" },
-        { NCBI_align_get_sam_flags, "NCBI:align:get_sam_flags" },
-        { NCBI_align_get_sam_flags_2, "NCBI:align:get_sam_flags_2" },
-        { NCBI_align_local_ref_id, "NCBI:align:local_ref_id" },
-        { NCBI_align_local_ref_start, "NCBI:align:local_ref_start" },
-        { NCBI_align_make_cmp_read_desc, "NCBI:align:make_cmp_read_desc" },
-        { NCBI_align_make_read_start, "NCBI:align:make_read_start" },
-        { NCBI_align_mismatch_restore_qual, "NCBI:align:mismatch_restore_qual" },
-        { NCBI_align_not_my_row, "NCBI:align:not_my_row" },
-        { NCBI_align_raw_restore_qual, "NCBI:align:raw_restore_qual" },
-        { NCBI_align_ref_name, "NCBI:align:ref_name" },
-        { NCBI_align_ref_pos, "NCBI:align:ref_pos" },
-        { NCBI_align_ref_seq_id, "NCBI:align:ref_seq_id" },
-        { NCBI_align_ref_sub_select_preserve_qual, "NCBI:align:ref_sub_select_preserve_qual" },
-        { NCBI_align_rna_orientation, "NCBI:align:rna_orientation" },
-        { NCBI_align_seq_construct_read, "NCBI:align:seq_construct_read" },
-        { NCBI_align_template_len, "NCBI:align:template_len" },
-        { NCBI_color_from_dna, "NCBI:color_from_dna" },
-        { NCBI_dna_from_color, "NCBI:dna_from_color" },
-        { NCBI_fp_extend, "NCBI:fp_extend" },
-        { NCBI_lower_case_tech_reads, "NCBI:lower_case_tech_reads" },
-        { NCBI_unpack, "NCBI:unpack" },
-        { NCBI_unzip, "NCBI:unzip" },
-        { NCBI_var_tokenize_var_id, "NCBI:var:tokenize_var_id" },
-        { vdb_add_row_id, "vdb:add_row_id" },
-        { vdb_bit_or, "vdb:bit_or" },
-        { vdb_bunzip, "vdb:bunzip" },
-        { vdb_ceil, "vdb:ceil" },
-        { vdb_clip, "vdb:clip" },
-        { vdb_cut, "vdb:cut" },
-        { vdb_delta, "vdb:delta" },
-        { vdb_deriv, "vdb:deriv" },
-        { vdb_diff, "vdb:diff" },
-        { vdb_echo, "vdb:echo" },
-        { vdb_exists, "vdb:exists" },
-        { vdb_extract_token, "vdb:extract_token" },
-        { vdb_fixed_vec_sum, "vdb:fixed_vec_sum" },
-        { vdb_floor, "vdb:floor" },
-        { vdb_funzip, "vdb:funzip" },
-        { vdb_integral, "vdb:integral" },
-        { vdb_integral_0, "vdb:integral_0" },
-        { vdb_iunzip, "vdb:iunzip" },
-        { vdb_izip, "vdb:izip" },
-        { vdb_map, "vdb:map" },
-        { vdb_max, "vdb:max" },
-        { vdb_min, "vdb:min" },
-        { vdb_outlier_decode, "vdb:outlier_decode" },
-        { vdb_outlier_encode, "vdb:outlier_encode" },
-        { vdb_pack, "vdb:pack" },
-        { vdb_paste, "vdb:paste" },
-        { vdb_rldecode, "vdb:rldecode" },
-        { vdb_round, "vdb:round" },
-        { vdb_simple_sub_select_1, "vdb:simple_sub_select_1" },
-        { vdb_sprintf, "vdb:sprintf" },
-        { vdb_strtonum, "vdb:strtonum" },
-        { vdb_subtract_row_id, "vdb:subtract_row_id" },
-        { vdb_sum, "vdb:sum" },
-        { vdb_trim, "vdb:trim" },
-        { vdb_trunc, "vdb:trunc" },
-        { vdb_undelta, "vdb:undelta" },
-        { vdb_unpack, "vdb:unpack" },
-        { vdb_unzip, "vdb:unzip" },
-        { vdb_vec_sum, "vdb:vec_sum" },
-
-        { vdb_hello, "vdb:hello" }
-    };
-
-    static VLinkerIntSpecial special [] =
-    {
-        { NCBI_SRA_accept_untyped, "NCBI:SRA:accept_untyped" },
-        { NCBI_SRA__454__untyped_0, "NCBI:SRA:_454_:untyped_0" },
-        { NCBI_SRA__454__untyped_1_2a, "NCBI:SRA:_454_:untyped_1_2a" },
-        { NCBI_SRA__454__untyped_1_2b, "NCBI:SRA:_454_:untyped_1_2b" },
-        { NCBI_SRA_Illumina_untyped_0a, "NCBI:SRA:Illumina:untyped_0a" },
-        { NCBI_SRA_Illumina_untyped_0b, "NCBI:SRA:Illumina:untyped_0b" },
-        { NCBI_SRA_Illumina_untyped_1a, "NCBI:SRA:Illumina:untyped_1a" },
-        { NCBI_SRA_Illumina_untyped_1b, "NCBI:SRA:Illumina:untyped_1b" },
-        { NCBI_SRA_ABI_untyped_1, "NCBI:SRA:ABI:untyped_1" }
-    };
-
-    rc_t rc = VLinkerAddFactories ( self, fact, sizeof fact / sizeof fact [ 0 ], tbl, env );
-    if ( rc == 0 )
-        rc = VLinkerAddUntyped ( self, special, sizeof special / sizeof special [ 0 ], tbl, env );
-    return rc;
-}
-
-
-/* MakeIntrinsic
- *  creates an initial, intrinsic linker
- *  pre-loaded with intrinsic factories
- */
-rc_t VLinkerMakeIntrinsic ( VLinker **lp )
-{
-    KDyld *dl;
-    rc_t rc = KDyldMake ( & dl );
-    if ( rc == 0 )
-    {
-        rc = VLinkerMake ( lp, NULL, dl );
-        KDyldRelease ( dl );
-
-        if ( rc == 0 )
-        {
-            KSymTable tbl;
-            VLinker *self = * lp;
-
-            /* create symbol table with no intrinsic scope */
-            rc = KSymTableInit ( & tbl, NULL );
-            if ( rc == 0 )
-            {
-                SchemaEnv env;
-                SchemaEnvInit ( & env, EXT_SCHEMA_LANG_VERSION );
-
-                /* make intrinsic scope modifiable */
-                KSymTablePushScope ( & tbl, & self -> scope );
-
-                /* add intrinsic functions */
-                rc = VLinkerInitFactories ( self, & tbl, & env );
-                if ( rc == 0 )
-                {
-                    KSymTableWhack ( & tbl );
-                    return 0;
-                }
-
-                KSymTableWhack ( & tbl );
-            }
-
-            VLinkerRelease ( self );
-        }
-    }
-
-    * lp = NULL;
-
-    return rc;
-}
diff --git a/libs/vdb/linker-priv.h b/libs/vdb/linker-priv.h
deleted file mode 100644
index 71a86dc..0000000
--- a/libs/vdb/linker-priv.h
+++ /dev/null
@@ -1,272 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_linker_priv_
-#define _h_linker_priv_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_klib_token_
-#include <klib/token.h>
-#endif
-
-#ifndef _h_vdb_xform_
-#include <vdb/xform.h>
-#endif
-
-#ifndef _h_vdb_vdb_priv_
-#include <vdb/vdb-priv.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_klib_vector_
-#include <klib/vector.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KSymbol;
-struct KSymTable;
-struct KNamelist;
-struct KDyld;
-struct KDlset;
-struct KSymAddr;
-struct SFunction;
-struct SchemaEnv;
-struct VTransDesc;
-
-
-/*--------------------------------------------------------------------------
- * linker symbol types
- */
-enum
-{
-    ltFactory = eNumSymtabIDs,
-    ltUntyped
-};
-
-
-/*--------------------------------------------------------------------------
- * VLinker
- *  responsible for performing runtime schema resolution
- *  and C factory/function management
- *
- *  a schema will be declared with conditional productions and
- *  references to C functions. at load time, all schema expressions
- *  will be evaluated, unused conditional productions pruned,
- *  function references resolved, function objects created,
- *  and all paths rejected due to errors of any sort eliminated,
- *  leaving the final runtime schema.
- *
- *  the current implementation
- */
-typedef struct VLinker VLinker;
-struct VLinker
-{
-    /* dynamic loader */
-    struct KDyld *dl;
-
-    /* parent loader */
-    const VLinker *dad;
-
-    /* global scope for functions */
-    BSTree scope;
-
-    /* factory objects */
-    Vector fact;
-
-    /* special funcs */
-    Vector special;
-
-    KRefcount refcount;
-};
-
-
-/* Make
- *  creates an empty linker
- */
-rc_t VLinkerMake ( VLinker **lp, const VLinker *dad, struct KDyld *dl );
-
-/* MakeIntrinsic
- *  creates an initial, intrinsic linker
- *  pre-loaded with intrinsic factories
- */
-rc_t VLinkerMakeIntrinsic ( VLinker **intrinsic );
-
-/* InitFactories
- *  initialize intrinsic factories
- *
- *  "tbl" [ IN ] - linker-scope symbol table
- *
- *  "env" [ IN ] - default schema parser environment
- */
-rc_t VLinkerInitFactories ( VLinker *self,
-    struct KSymTable *tbl, struct SchemaEnv const *env );
-rc_t VLinkerInitFactoriesRead ( VLinker *self,
-    struct KSymTable *tbl, struct SchemaEnv const *env );
-
-/* AddFactories
- *  add a list of intrinsic factories
- *
- *  "fact" [ IN ] and "count" [ IN ] - list of intrinsic factories to register
- *
- *  "tbl" [ IN ] - linker-scope symbol table
- *
- *  "env" [ IN ] - default schema parser environment
- */
-typedef struct VLinkerIntFactory VLinkerIntFactory;
-struct VLinkerIntFactory
-{
-    rc_t ( CC * f ) ( struct VTransDesc *desc );
-    const char *name;
-};
-
-rc_t VLinkerAddFactories ( VLinker *self,
-    const VLinkerIntFactory *fact, uint32_t count,
-    struct KSymTable *tbl, struct SchemaEnv const *env );
-
-
-/* Release
- */
-rc_t VLinkerRelease ( const VLinker *self );
-
-/* Attach
- * Sever
- */
-VLinker *VLinkerAttach ( const VLinker *self );
-rc_t VLinkerSever ( const VLinker *self );
-
-
-/* AddLoadLibraryPath
- *  add a path[s] to loader for locating dynamic libraries
- */
-rc_t VLinkerVAddLoadLibraryPath ( const VLinker *self,
-    const char *path, va_list args );
-
-
-/* Open
- *  opens libraries for search
- */
-rc_t VLinkerOpen ( const VLinker *self, struct KDlset **libs );
-
-
-/* Find
- *  find a named symbol
- *
- *  "libs" [ IN ] - set of open libraries to search
- *
- *  "desc" [ OUT ] - transform factory description
- *  "func" [ OUT ] - return parameter for func pointer
- *
- *  "proto" [ IN ] - function prototype from schema
- *  "min_version" [ IN ] - minimum version to accept
- *
- *  "external" [ OUT ] - true if function is not built-in
- */
-rc_t VLinkerFindFactory ( VLinker *self, struct KDlset const *libs,
-    VTransDesc *desc, struct SFunction const *proto, uint32_t min_version, bool *external );
-rc_t VLinkerFindNamedFactory ( VLinker *self, struct KDlset const *libs,
-    VTransDesc *desc, const char *fact_name );
-rc_t VLinkerFindUntyped ( VLinker *self, struct KDlset const *libs,
-    VUntypedTableTest *func, struct SFunction const *proto );
-
-
-/* ListExternalSchemaModules
- */
-rc_t VLinkerListExternalSchemaModules ( const VLinker *self,
-    struct KNamelist **list );
-
-
-/*--------------------------------------------------------------------------
- * LFactory
- *  describes an external C function factory
- */
-typedef struct LFactory LFactory;
-struct LFactory
-{
-    /* factory function address */
-    struct KSymAddr const *addr;
-
-    /* factory name */
-    struct KSymbol const *name;
-
-    /* factory description */
-    VTransDesc desc;
-
-    /* factory id */
-    uint32_t id;
-
-    /* externally supplied factory */
-    bool external;
-};
-
-/* Whack
- */
-void CC LFactoryWhack ( void *item, void *ignore );
-
-
-/*--------------------------------------------------------------------------
- * LSpecial
- *  describes an external C table recognition function
- *  or a row-length function
- */
-typedef struct LSpecial LSpecial;
-struct LSpecial
-{
-    /* function address */
-    struct KSymAddr const *addr;
-
-    /* func name */
-    struct KSymbol const *name;
-
-    /* for built-in address */
-    VUntypedFunc func;
-
-    /* func id */
-    uint32_t id;
-};
-
-/* Whack
- */
-void CC LSpecialWhack ( void *item, void *ignore );
-
-
-#endif /* _h_linker_priv_ */
diff --git a/libs/vdb/linker.c b/libs/vdb/linker.c
deleted file mode 100644
index 1351a61..0000000
--- a/libs/vdb/linker.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define TRACK_REFERENCES 0
-
-#include "linker-priv.h"
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-/* InitFactories
- */
-rc_t VLinkerInitFactories ( VLinker *self, struct KSymTable *tbl, struct SchemaEnv const *env )
-{
-    return VLinkerInitFactoriesRead ( self, tbl, env );
-}
diff --git a/libs/vdb/merge.c b/libs/vdb/merge.c
deleted file mode 100644
index 918f24f..0000000
--- a/libs/vdb/merge.c
+++ /dev/null
@@ -1,215 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include "blob.h"
-
-#include "blob-headers.h"
-#include "page-map.h"
-#include "blob-priv.h"
-#include "xform-priv.h"
-
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <atomic32.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-static unsigned uniq_list( unsigned dst[], void **list, unsigned N ) {
-    unsigned i;
-    unsigned j;
-    unsigned n;
-    void *on_stack[16];
-    void **uniq = on_stack;
-    void **on_heap = 0;
-    
-    if (N > sizeof(on_stack) / sizeof(on_stack[0])) {
-        on_heap = malloc(N * sizeof(on_heap[0]));
-        uniq = on_heap;
-    }
-    for (i = 0, n = 0; i != N; ++i) {
-        for (j = 0; j != n; ++j) {
-            if (uniq[j] == list[i])
-                break;
-        }
-        dst[i] = j;
-        if (j == n) {
-            uniq[j] = list[i];
-            ++n;
-        }
-    }
-    memcpy(list, uniq, n * sizeof(list[0]));
-    if (on_heap)
-        free(on_heap);
-    return n;
-}
-
-static
-rc_t CC VBlobCreateMerged( VBlob **lhs, uint32_t num_inputs, const VBlob *input[] ) {
-    unsigned i;
-    KDataBuffer buffer;
-    BlobHeaders *headers;
-    VBlobHeader *hdr;
-    rc_t rc;
-    uint64_t sz = 0;
-    uint32_t bsize;
-    
-/*
-     headers:
-         args:
-             num_inputs
-             num_row_maps
-             row_map_number[num_inputs]
-             length(row_map)[num_row_maps]
-             length(header)[num_inputs]
-             length(data_blob)[num_inputs]
-     data:
-         row_map[num_row_maps]
-         header[num_inputs]
-         data_blob[num_inputs]
- */
-    
-    for (i = 1; i != num_inputs; ++i) {
-        if (input[0]->start_id != input[i]->start_id || input[0]->stop_id != input[i]->stop_id)
-            return RC(rcVDB, rcBlob, rcConstructing, rcParam, rcInvalid);
-    }
-    
-    rc = BlobHeadersCreate(&headers);
-    if (rc)
-        return rc;
-    
-    hdr = BlobHeadersGetHdrWrite(headers);
-    if (hdr == NULL) {
-        BlobHeadersRelease(headers);
-        return RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    }
-    rc = KDataBufferMakeBytes(&buffer, bsize = 0);
-    if (rc) {
-        VBlobHeaderRelease(hdr);
-        BlobHeadersRelease(headers);
-        return rc;
-    }
-    VBlobHeaderSetFormat(hdr, 0); /* TBD: set format id to correct value for merged or do it in caller */
-    VBlobHeaderSetVersion(hdr, 1);
-    
-    VBlobHeaderArgPushTail(hdr, num_inputs);
-    
-    {
-        unsigned *v;
-        PageMap **pm;
-        unsigned n;
-		
-        v = malloc(num_inputs * sizeof(*v));
-        pm = malloc(num_inputs * sizeof(*pm));
-        for (i = 0; i != num_inputs; ++i) {
-            pm[i] = input[i]->pm;
-        }
-        n = uniq_list(v, (void **)pm, num_inputs);
-        VBlobHeaderArgPushTail(hdr, n);
-        for (i = 0; i != num_inputs; ++i)
-            VBlobHeaderArgPushTail(hdr, v[i]);
-        free(v);
-        for (i = 0; rc == 0 && i != n; ++i) {
-            rc = PageMapSerialize(pm[i], &buffer, bsize, &sz);
-            VBlobHeaderArgPushTail(hdr, sz);
-            bsize += sz;
-        }
-        free(pm);
-    }
-    
-    for (i = 0; rc == 0 && i != num_inputs; ++i) {
-        if (input[i]->headers) {
-            rc = BlobHeadersSerialize(input[i]->headers, &buffer, bsize, &sz);
-            VBlobHeaderArgPushTail(hdr, sz);
-            bsize += sz;
-        }
-        else
-            VBlobHeaderArgPushTail(hdr, 0);
-    }
-    
-    for (i = 0; rc == 0 && i != num_inputs; ++i) {
-        const VBlob *o = input[i];
-        
-        sz = (uint32_t)BlobBufferBits( o );
-        rc = VBlobHeaderArgPushTail( hdr, sz );
-        sz = (sz + 7) >> 3;
-        if (rc == 0) {
-            rc = KDataBufferResize(&buffer, bsize + sz);
-            if (rc == 0) {
-                memcpy((uint8_t *)buffer.base + bsize, o->data.base, sz);
-                bsize += sz;
-            }
-        }
-    }
-    VBlobHeaderRelease(hdr);
-    if (rc == 0) {
-        VBlob *y;
-        
-        rc = VBlobNew(&y, input[0]->start_id, input[0]->stop_id, "merge");
-        if (rc == 0) {
-            y->headers = headers;
-            KDataBufferSub(&buffer, &y->data, 0, UINT64_MAX);
-            
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-            y->byte_order = vboLittleEndian;
-#else
-            y->byte_order = vboBigEndian;
-#endif
-            *lhs = y;
-	    KDataBufferWhack(&buffer);
-            return 0;
-        }
-        rc = RC(rcVDB, rcBlob, rcConstructing, rcMemory, rcExhausted);
-    }
-    KDataBufferWhack(&buffer);
-    BlobHeadersRelease(headers);
-    
-    return rc;
-}
-
-static
-rc_t CC vdb_merge_impl(
-                    void *self,
-                    const VXformInfo *info,
-                    int64_t row_id,
-                    VBlob **rslt,
-                    uint32_t argc, const VBlob *argv[]
-) {
-	return VBlobCreateMerged(rslt, argc, argv);
-}
-
-VTRANSFACT_BUILTIN_IMPL(vdb_merge, 1, 0, 0) (const void *self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-	rslt->variant = vftBlobN;
-    VFUNCDESC_INTERNAL_FUNCS(rslt)->bfN = vdb_merge_impl;
-	return 0;
-}
diff --git a/libs/vdb/meta-append.c b/libs/vdb/meta-append.c
deleted file mode 100644
index 2ab5588..0000000
--- a/libs/vdb/meta-append.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include "schema-priv.h"
-#include "xform-priv.h"
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-typedef struct self_t {
-    KMDataNode *node;
-    void ( * byte_swap ) ( void *dst, const void *src, uint64_t count );    
-} self_t;
-
-static void CC self_whack( void *vp ) {
-    self_t *self = vp;
-    
-    KMDataNodeRelease( self->node );
-    free( vp );
-}
-
-static
-rc_t CC meta_append_func(
-                     void *Self,
-                     const VXformInfo *info,
-                     int64_t row_id,
-                     VRowResult *rslt,
-                     uint32_t argc,
-                     const VRowData argv[]
-) {
-    self_t *self = Self;
-    char sbuf[1024];
-    void *buf = sbuf;
-    void *hbuf = 0;
-    bitsz_t offset = (argv[0].u.data.first_elem * argv[0].u.data.elem_bits);
-    bitsz_t blen = argv[0].u.data.elem_count * argv[0].u.data.elem_bits;
-    size_t length = (blen + 7) >> 3;
-    rc_t rc = 0;
-    
-    if (length > sizeof(sbuf)) {
-        hbuf = malloc(length);
-        if (hbuf == NULL)
-            return RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-        buf = hbuf;
-    }
-    
-    if (self->byte_swap)
-        self->byte_swap(buf, ((const uint8_t *)argv[0].u.data.base) + offset, argv[0].u.data.elem_count);
-    else {
-        memset(buf, 0, length);
-        bitcpy(buf, 0, argv[0].u.data.base, offset, blen);
-    }
-    
-    rc = KMDataNodeAppend(self->node, buf, length);
-    if (hbuf)
-        free(hbuf);
-    
-    if (rc == 0) {
-        rslt->elem_count = argv[0].u.data.elem_count;
-        rslt->elem_bits = argv[0].u.data.elem_bits;
-        assert(rslt->data->elem_bits == rslt->elem_bits);
-        rc = KDataBufferResize(rslt->data, rslt->elem_count);
-        if (rc == 0)
-            bitcpy(rslt->data->base, 0, argv[0].u.data.base, offset, blen);
-    }
-    return rc;
-}
-
-/* 
- */
-VTRANSFACT_BUILTIN_IMPL(meta_append, 1, 0, 0) (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc = 0;
-    self_t *self;
-    SDatatype *sdt;
-    bool need_byte_swap;
-    
-    sdt = VSchemaFindTypeid(info->schema, info->fdesc.fd.td.type_id);
-    assert(sdt != NULL);
-    
-	self = calloc(1, sizeof(self_t));
-	if (self) {
-        KMetadata *meta;
-        
-        rc = VTableOpenMetadataUpdate((VTable *)info->tbl, &meta);
-        if (rc == 0) {
-            rc = KMetadataOpenNodeUpdate(meta, &self->node, "%s", cp->argv[0].data.ascii);
-            KMetadataRelease(meta);
-            if (rc == 0) {
-                KMDataNodeByteOrder(self->node, &need_byte_swap);
-                if (need_byte_swap)
-                    self->byte_swap = sdt->byte_swap;
-                
-                rslt->self = self;
-                rslt->whack = self_whack;
-                
-                rslt->variant = vftNonDetRow;
-                rslt->u.ndf = meta_append_func;
-                
-                return 0;
-            }
-        }
-        self_whack(self);
-	}
-	else
-		rc = RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-        return rc;
-}
diff --git a/libs/vdb/meta-attr-read.c b/libs/vdb/meta-attr-read.c
deleted file mode 100644
index cb0324f..0000000
--- a/libs/vdb/meta-attr-read.c
+++ /dev/null
@@ -1,448 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <sysalloc.h>
-#include "xform-priv.h"
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-typedef struct self_t {
-    const KMDataNode *node;
-    char *name;
-    KDataBuffer value;
-} self_t;
-
-static void CC self_whack( void *vp ) {
-    self_t *self = vp;
-    
-    KDataBufferWhack( &self->value );
-    free( self->name );
-    KMDataNodeRelease( self->node );
-    free( vp );
-}
-
-static
-rc_t CC meta_attr_read_cstring(
-                            void *Self,
-                            const VXformInfo *info,
-                            int64_t row_id,
-                            VRowResult *rslt,
-                            uint32_t argc,
-                            const VRowData argv[]
-) {
-    self_t *self = Self;
-    size_t length;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAttr(self->node, self->name, 0, 0, &length);
-    if (rc)
-        return rc;
-    rc = KDataBufferResize( &self->value, (uint32_t)( length + 1 ) );
-    if (rc)
-        return rc;
-    rc = KMDataNodeReadAttr( self->node, self->name, self->value.base, self->value.elem_count, &length );
-    if (rc)
-        return rc;
-    KDataBufferWhack( rslt->data );
-    KDataBufferSub( &self->value, rslt->data, 0, (uint32_t)length );
-    rslt->elem_count = (uint32_t)length;
-	return 0;
-}
-
-static
-rc_t CC meta_attr_read_bool(
-                       void *Self,
-                       const VXformInfo *info,
-                       int64_t row_id,
-                       VRowResult *rslt,
-                       uint32_t argc,
-                       const VRowData argv[]
-) {
-    const self_t *self = Self;
-    int16_t value;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAttrAsI16(self->node, self->name, &value);
-    if (rc)
-        return rc;
-    *(bool *)self->value.base = value == 0 ? false : true;
-    KDataBufferWhack(rslt->data);
-    KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    rslt->elem_count = 1;
-	return 0;
-}
-
-static
-rc_t CC meta_attr_read_I8(
-                        void *Self,
-                        const VXformInfo *info,
-                        int64_t row_id,
-                        VRowResult *rslt,
-                        uint32_t argc,
-                        const VRowData argv[]
-) {
-    const self_t *self = Self;
-    int16_t value;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAttrAsI16(self->node, self->name, &value);
-    if (rc)
-        return rc;
-    *(int8_t *)self->value.base = (int8_t)value;
-    KDataBufferWhack(rslt->data);
-    KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    rslt->elem_count = 1;
-	return 0;
-}
-
-static
-rc_t CC meta_attr_read_U8(
-                        void *Self,
-                        const VXformInfo *info,
-                        int64_t row_id,
-                        VRowResult *rslt,
-                        uint32_t argc,
-                        const VRowData argv[]
-) {
-    const self_t *self = Self;
-    uint16_t value;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAttrAsU16(self->node, self->name, &value);
-    if (rc)
-        return rc;
-    *(uint8_t *)self->value.base = (int8_t)value;
-    KDataBufferWhack(rslt->data);
-    KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    rslt->elem_count = 1;
-	return 0;
-}
-
-static
-rc_t CC meta_attr_read_I16(
-                        void *Self,
-                        const VXformInfo *info,
-                        int64_t row_id,
-                        VRowResult *rslt,
-                        uint32_t argc,
-                        const VRowData argv[]
-) {
-    const self_t *self = Self;
-    int16_t *value = self->value.base;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAttrAsI16(self->node, self->name, value);
-    if (rc)
-        return rc;
-    KDataBufferWhack(rslt->data);
-    KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    rslt->elem_count = 1;
-	return 0;
-}
-
-static
-rc_t CC meta_attr_read_U16(
-                        void *Self,
-                        const VXformInfo *info,
-                        int64_t row_id,
-                        VRowResult *rslt,
-                        uint32_t argc,
-                        const VRowData argv[]
-) {
-    const self_t *self = Self;
-    uint16_t *value = self->value.base;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAttrAsU16(self->node, self->name, value);
-    if (rc)
-        return rc;
-    KDataBufferWhack(rslt->data);
-    KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    rslt->elem_count = 1;
-	return 0;
-}
-
-static
-rc_t CC meta_attr_read_I32(
-                        void *Self,
-                        const VXformInfo *info,
-                        int64_t row_id,
-                        VRowResult *rslt,
-                        uint32_t argc,
-                        const VRowData argv[]
-) {
-    const self_t *self = Self;
-    int32_t *value = self->value.base;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAttrAsI32(self->node, self->name, value);
-    if (rc)
-        return rc;
-    KDataBufferWhack(rslt->data);
-    KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    rslt->elem_count = 1;
-	return 0;
-}
-
-static
-rc_t CC meta_attr_read_U32(
-                        void *Self,
-                        const VXformInfo *info,
-                        int64_t row_id,
-                        VRowResult *rslt,
-                        uint32_t argc,
-                        const VRowData argv[]
-) {
-    const self_t *self = Self;
-    uint32_t *value = self->value.base;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAttrAsU32(self->node, self->name, value);
-    if (rc)
-        return rc;
-    KDataBufferWhack(rslt->data);
-    KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    rslt->elem_count = 1;
-	return 0;
-}
-
-static
-rc_t CC meta_attr_read_I64(
-                        void *Self,
-                        const VXformInfo *info,
-                        int64_t row_id,
-                        VRowResult *rslt,
-                        uint32_t argc,
-                        const VRowData argv[]
-) {
-    const self_t *self = Self;
-    int64_t *value = self->value.base;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAttrAsI64(self->node, self->name, value);
-    if (rc)
-        return rc;
-    KDataBufferWhack(rslt->data);
-    KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    rslt->elem_count = 1;
-	return 0;
-}
-
-static
-rc_t CC meta_attr_read_U64(
-                        void *Self,
-                        const VXformInfo *info,
-                        int64_t row_id,
-                        VRowResult *rslt,
-                        uint32_t argc,
-                        const VRowData argv[]
-) {
-    const self_t *self = Self;
-    uint64_t *value = self->value.base;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAttrAsU64(self->node, self->name, value);
-    if (rc)
-        return rc;
-    KDataBufferWhack(rslt->data);
-    KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    rslt->elem_count = 1;
-	return 0;
-}
-
-static
-rc_t CC meta_attr_read_F32(
-                        void *Self,
-                        const VXformInfo *info,
-                        int64_t row_id,
-                        VRowResult *rslt,
-                        uint32_t argc,
-                        const VRowData argv[]
-) {
-    const self_t *self = Self;
-    double value;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAttrAsF64(self->node, self->name, &value);
-    if (rc)
-        return rc;
-    *(float *)self->value.base = (float)value;
-    KDataBufferWhack(rslt->data);
-    KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    rslt->elem_count = 1;
-	return 0;
-}
-
-static
-rc_t CC meta_attr_read_F64(
-                        void *Self,
-                        const VXformInfo *info,
-                        int64_t row_id,
-                        VRowResult *rslt,
-                        uint32_t argc,
-                        const VRowData argv[]
-) {
-    const self_t *self = Self;
-    double *value = self->value.base;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAttrAsF64(self->node, self->name, value);
-    if (rc)
-        return rc;
-    KDataBufferWhack(rslt->data);
-    KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    rslt->elem_count = 1;
-	return 0;
-}
-
-/* 
- function ascii meta:attr:read #1.0 < ascii node, ascii attr, * bool deterministic > ();
- */
-VTRANSFACT_BUILTIN_IMPL(meta_attr_read, 1, 0, 0) (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc = 0;
-    self_t *self;
-    bool variable = false;
-    rc_t ( CC * var_row_func )(
-                         void *Self,
-                         const VXformInfo *info,
-                         int64_t row_id,
-                         VRowResult *rslt,
-                         uint32_t argc,
-                         const VRowData argv[]
-                         );
-    bool deterministic = true;
-    
-    if (cp->argc > 2)
-        deterministic = cp->argv[2].data.b[0];
-    
-    switch (info->fdesc.desc.domain) {
-    case vtdBool:
-        var_row_func = meta_attr_read_bool;
-        break;
-    case vtdInt:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 8:
-            var_row_func = meta_attr_read_I8;
-            break;
-        case 16:
-            var_row_func = meta_attr_read_I16;
-            break;
-        case 32:
-            var_row_func = meta_attr_read_I32;
-            break;
-        case 64:
-            var_row_func = meta_attr_read_I64;
-            break;
-        default:
-            return RC(rcVDB, rcFunction, rcConstructing, rcType, rcInvalid);
-        }
-        break;
-    case vtdUint:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 8:
-            var_row_func = meta_attr_read_U8;
-            break;
-        case 16:
-            var_row_func = meta_attr_read_U16;
-            break;
-        case 32:
-            var_row_func = meta_attr_read_U32;
-            break;
-        case 64:
-            var_row_func = meta_attr_read_U64;
-            break;
-        default:
-            return RC(rcVDB, rcFunction, rcConstructing, rcType, rcInvalid);
-        }
-        break;
-    case vtdFloat:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 32:
-            var_row_func = meta_attr_read_F32;
-            break;
-        case 64:
-            var_row_func = meta_attr_read_F64;
-            break;
-        default:
-            return RC(rcVDB, rcFunction, rcConstructing, rcType, rcInvalid);
-        }
-        break;
-    case vtdAscii:
-        variable = true;
-        var_row_func = meta_attr_read_cstring;
-        break;
-    default:
-        return RC(rcVDB, rcFunction, rcConstructing, rcType, rcInvalid);
-    }
-    
-	self = calloc(1, sizeof(self_t));
-	if (self) {
-        self->name = malloc(cp->argv[1].count + 1);
-        if (self->name) {
-            string_copy(self->name, cp->argv[1].count + 1, cp->argv[1].data.ascii,cp->argv[1].count);
-            if (!variable)
-                rc = KDataBufferMake(&self->value, info->fdesc.desc.intrinsic_bits, 1);
-            else
-                self->value.elem_bits = 8;
-            if (rc == 0) {
-                const KMetadata *meta;
-                
-                rc = VTableOpenMetadataRead(info->tbl, &meta);
-                if (rc == 0) {
-                    rc = KMetadataOpenNodeRead(meta, &self->node, "*.*s", cp->argv[0].count, cp->argv[0].data.ascii);
-                    KMetadataRelease(meta);
-                    if (rc == 0) {
-                        rslt->self = self;
-                        rslt->whack = self_whack;
-                        
-                        rslt->variant = deterministic ? vftRow : vftNonDetRow;
-                        rslt->u.ndf = var_row_func;
-                        
-                        return 0;
-                    }
-                }
-            }
-        }
-        self_whack(self);
-	}
-	else
-		rc = RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-	return rc;
-}
diff --git a/libs/vdb/meta-attr-write.c b/libs/vdb/meta-attr-write.c
deleted file mode 100644
index 16f869c..0000000
--- a/libs/vdb/meta-attr-write.c
+++ /dev/null
@@ -1,529 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <sysalloc.h>
-#include "xform-priv.h"
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdio.h>
-
-typedef struct self_t {
-    KMDataNode *node;
-    char name[1];
-} self_t;
-
-static void CC self_whack( void *vp ) {
-    self_t *self = vp;
-    
-    KMDataNodeRelease( self->node );
-    free( vp );
-}
-
-static rc_t meta_attr_write_fmt( self_t *self, const char *fmt, ... )
-{
-    rc_t rc;
-    size_t n;
-    char sbuf[4096];
-
-    va_list va;
-    va_start(va, fmt);
-    rc = string_vprintf(sbuf, sizeof(sbuf), & n, fmt, va);
-    va_end(va);
-    
-    if ( rc == 0 )
-        rc = KMDataNodeWriteAttr(self->node, self->name, sbuf);
-
-    return rc;
-}
-
-static
-rc_t CC meta_attr_write_ascii(
-                             void *Self,
-                             const VXformInfo *info,
-                             int64_t row_id,
-                             VRowResult *rslt,
-                             uint32_t argc,
-                             const VRowData argv[]
-) {
-    self_t *self = Self;
-
-    char *value;
-    size_t length = argv[0].u.data.elem_count;
-
-    const char *src = argv[0].u.data.base;
-    
-    rc_t rc = KDataBufferResize( rslt->data, (uint32_t)( length + 1 ) );
-    if (rc)
-        return rc;
-    
-    value = rslt->data->base;
-    memcpy(value, & src [ argv[0].u.data.first_elem ], length);
-    value[length] = '\0';
-
-    rc = KMDataNodeWriteAttr(self->node, self->name, value);
-    if (rc)
-        return rc;
-
-    rslt->elem_count = (uint32_t)length;
-	return 0;
-}
-
-static
-rc_t CC meta_attr_write_bool(
-                          void *Self,
-                          const VXformInfo *info,
-                          int64_t row_id,
-                          VRowResult *rslt,
-                          uint32_t argc,
-                          const VRowData argv[]                          
-) {
-    rc_t rc;
-    self_t *self = Self;
-    uint8_t value = ((const uint8_t *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-
-    /* TBD -this is not dependent upon C code, but upon schema.
-       we probably want a warning here rather than an assert */
-    assert(argv[0].u.data.elem_count == 1);
-
-    rc = KDataBufferResize(rslt -> data, 1);
-    if (rc)
-        return rc;
-
-    *(uint8_t *)rslt->data->base = value ? true : false;
-    rc = meta_attr_write_fmt(self, "%s", value ? "true" : "false");
-    if (rc)
-        return rc;
-
-    rslt->elem_count = 1;
-	return 0;
-}
-
-static
-rc_t CC meta_attr_write_I8(
-                        void *Self,
-                        const VXformInfo *info,
-                        int64_t row_id,
-                        VRowResult *rslt,
-                        uint32_t argc,
-                        const VRowData argv[]
-) {
-    self_t *self = Self;
-    int8_t value = ((const int8_t *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-    rc_t rc = 0;
-    
-    assert(argv[0].u.data.elem_count == 1);
-    
-    rc = KDataBufferResize(rslt->data, 1);
-    if (rc)
-        return rc;
-    
-    *(int8_t *)rslt->data ->base = value;
-    rc = meta_attr_write_fmt(self, "%d", (int)value);
-    if (rc)
-        return rc;
-    
-    rslt->elem_count = 1;
-    
-	return 0;
-}
-
-static
-rc_t CC meta_attr_write_U8(
-                        void *Self,
-                        const VXformInfo *info,
-                        int64_t row_id,
-                        VRowResult *rslt,
-                        uint32_t argc,
-                        const VRowData argv[]
-) {
-    self_t *self = Self;
-    uint8_t value = ((const uint8_t *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-    rc_t rc = 0;
-    
-    assert(argv[0].u.data.elem_count == 1);
-    
-    rc = KDataBufferResize(rslt->data, 1);
-    if (rc)
-        return rc;
-    
-    *(uint8_t *)rslt->data->base = value;
-    rc = meta_attr_write_fmt(self, "%u", (int)value);
-    if (rc)
-        return rc;
-    
-    rslt->elem_count = 1;
-    
-	return 0;
-}
-
-static
-rc_t CC meta_attr_write_I16(
-                         void *Self,
-                         const VXformInfo *info,
-                         int64_t row_id,
-                         VRowResult *rslt,
-                         uint32_t argc,
-                         const VRowData argv[]
-) {
-    self_t *self = Self;
-    int16_t value = ((const int16_t *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-    rc_t rc = 0;
-    
-    assert(argv[0].u.data.elem_count == 1);
-    
-    rc = KDataBufferResize(rslt->data, 1);
-    if (rc)
-        return rc;
-    
-    *(int16_t *)rslt->data->base = value;
-    rc = meta_attr_write_fmt(self, "%d", (int)value);
-    if (rc)
-        return rc;
-    
-    rslt->elem_count = 1;
-    
-	return 0;
-}
-
-static
-rc_t CC meta_attr_write_U16(
-                         void *Self,
-                         const VXformInfo *info,
-                         int64_t row_id,
-                         VRowResult *rslt,
-                         uint32_t argc,
-                         const VRowData argv[]
-) {
-    self_t *self = Self;
-    uint16_t value = ((const uint16_t *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-    rc_t rc = 0;
-    
-    assert(argv[0].u.data.elem_count == 1);
-    
-    rc = KDataBufferResize(rslt->data, 1);
-    if (rc)
-        return rc;
-    
-    *(uint16_t *)rslt->data->base = value;
-    rc = meta_attr_write_fmt(self, "%u", (int)value);
-    if (rc)
-        return rc;
-    
-    rslt->elem_count = 1;
-    
-	return 0;
-}
-
-static
-rc_t CC meta_attr_write_I32(
-                         void *Self,
-                         const VXformInfo *info,
-                         int64_t row_id,
-                         VRowResult *rslt,
-                         uint32_t argc,
-                         const VRowData argv[]
-) {
-    self_t *self = Self;
-    int32_t value = ((const int32_t *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-    rc_t rc = 0;
-    
-    assert(argv[0].u.data.elem_count == 1);
-    
-    rc = KDataBufferResize(rslt->data, 1);
-    if (rc)
-        return rc;
-    
-    *(int32_t *)rslt->data->base = value;
-    rc = meta_attr_write_fmt(self, "%d", value);
-    if (rc)
-        return rc;
-    
-    rslt->elem_count = 1;
-    
-	return 0;
-}
-
-static
-rc_t CC meta_attr_write_U32(
-                         void *Self,
-                         const VXformInfo *info,
-                         int64_t row_id,
-                         VRowResult *rslt,
-                         uint32_t argc,
-                         const VRowData argv[]
-) {
-    self_t *self = Self;
-    uint32_t value = ((const uint32_t *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-    rc_t rc = 0;
-    
-    assert(argv[0].u.data.elem_count == 1);
-    
-    rc = KDataBufferResize(rslt->data, 1);
-    if (rc)
-        return rc;
-    
-    *(uint32_t *)rslt->data->base = value;
-    rc = meta_attr_write_fmt(self, "%u", value);
-    if (rc)
-        return rc;
-    
-    rslt->elem_count = 1;
-    
-	return 0;
-}
-
-static
-rc_t CC meta_attr_write_I64(
-                         void *Self,
-                         const VXformInfo *info,
-                         int64_t row_id,
-                         VRowResult *rslt,
-                         uint32_t argc,
-                         const VRowData argv[]
-) {
-    self_t *self = Self;
-    int64_t value = ((const int64_t *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-    rc_t rc = 0;
-    
-    assert(argv[0].u.data.elem_count == 1);
-    
-    rc = KDataBufferResize(rslt->data, 1);
-    if (rc)
-        return rc;
-    
-    *(int64_t *)rslt->data->base = value;
-    rc = meta_attr_write_fmt(self, "%ld", value);
-    if (rc)
-        return rc;
-    
-    rslt->elem_count = 1;
-    
-	return 0;
-}
-
-static
-rc_t CC meta_attr_write_U64(
-                         void *Self,
-                         const VXformInfo *info,
-                         int64_t row_id,
-                         VRowResult *rslt,
-                         uint32_t argc,
-                         const VRowData argv[]
-) {
-    self_t *self = Self;
-    uint64_t value = ((const uint64_t *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-    rc_t rc = 0;
-    
-    assert(argv[0].u.data.elem_count == 1);
-    
-    rc = KDataBufferResize(rslt->data, 1);
-    if (rc)
-        return rc;
-    
-    *(uint64_t *)rslt->data->base = value;
-    rc = meta_attr_write_fmt(self, "%lu", value);
-    if (rc)
-        return rc;
-    
-    rslt->elem_count = 1;
-    
-	return 0;
-}
-
-static
-rc_t CC meta_attr_write_F32(
-                         void *Self,
-                         const VXformInfo *info,
-                         int64_t row_id,
-                         VRowResult *rslt,
-                         uint32_t argc,
-                         const VRowData argv[]
-) {
-    self_t *self = Self;
-    float value = ((const float *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-    rc_t rc = 0;
-    
-    assert(argv[0].u.data.elem_count == 1);
-    
-    rc = KDataBufferResize(rslt->data, 1);
-    if (rc)
-        return rc;
-    
-    *(float *)rslt->data->base = value;
-    rc = meta_attr_write_fmt(self, "%.8e", value);
-    if (rc)
-        return rc;
-    
-    rslt->elem_count = 1;
-    
-	return 0;
-}
-
-static
-rc_t CC CC meta_attr_write_F64(
-                         void *Self,
-                         const VXformInfo *info,
-                         int64_t row_id,
-                         VRowResult *rslt,
-                         uint32_t argc,
-                         const VRowData argv[]
-) {
-    self_t *self = Self;
-    double value = ((const double *)argv[0].u.data.base)[argv[0].u.data.first_elem];
-    rc_t rc = 0;
-    
-    assert(argv[0].u.data.elem_count == 1);
-    
-    rc = KDataBufferResize(rslt->data, 1);
-    if (rc)
-        return rc;
-    
-    *(double *)rslt->data->base = value;
-    rc = meta_attr_write_fmt(self, "%.16e", value);
-    if (rc)
-        return rc;
-    
-    rslt->elem_count = 1;
-    
-	return 0;
-}
-
-/* 
- */
-VTRANSFACT_BUILTIN_IMPL(meta_attr_write, 1, 0, 0) (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc = 0;
-    self_t *self;
-    /* bool variable = false; */
-    rc_t ( CC * var_row_func )(
-                         void *Self,
-                         const VXformInfo *info,
-                         int64_t row_id,
-                         VRowResult *rslt,
-                         uint32_t argc,
-                         const VRowData argv[]
-                         );
-    
-    switch (dp->argv[0].desc.domain) {
-    case vtdBool:
-        var_row_func = meta_attr_write_bool;
-        break;
-    case vtdInt:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 8:
-            var_row_func = meta_attr_write_I8;
-            break;
-        case 16:
-            var_row_func = meta_attr_write_I16;
-            break;
-        case 32:
-            var_row_func = meta_attr_write_I32;
-            break;
-        case 64:
-            var_row_func = meta_attr_write_I64;
-            break;
-        default:
-            return RC(rcVDB, rcFunction, rcConstructing, rcType, rcInvalid);
-        }
-        break;
-    case vtdUint:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 8:
-            var_row_func = meta_attr_write_U8;
-            break;
-        case 16:
-            var_row_func = meta_attr_write_U16;
-            break;
-        case 32:
-            var_row_func = meta_attr_write_U32;
-            break;
-        case 64:
-            var_row_func = meta_attr_write_U64;
-            break;
-        default:
-            return RC(rcVDB, rcFunction, rcConstructing, rcType, rcInvalid);
-        }
-        break;
-    case vtdFloat:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 32:
-            var_row_func = meta_attr_write_F32;
-            break;
-        case 64:
-            var_row_func = meta_attr_write_F64;
-            break;
-        default:
-            return RC(rcVDB, rcFunction, rcConstructing, rcType, rcInvalid);
-        }
-        break;
-    case vtdAscii:
-        /* variable = true; */
-        var_row_func = meta_attr_write_ascii;
-        break;
-    default:
-        return RC(rcVDB, rcFunction, rcConstructing, rcType, rcInvalid);
-    }
-    
-	self = calloc(1, sizeof *self + cp->argv[1].count);
-	if (self == NULL)
-		rc = RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-    else
-    {
-        KMetadata *meta;
-        strcpy(self->name, cp->argv[1].data.ascii);
-        rc = VTableOpenMetadataUpdate((VTable *)info->tbl, &meta);
-        if (rc == 0) {
-            rc = KMetadataOpenNodeUpdate(meta, &self->node, "%s", cp->argv[0].data.ascii);
-            KMetadataRelease(meta);
-            if (rc == 0) {
-                rslt->self = self;
-                rslt->whack = self_whack;
-                        
-                rslt->variant = vftNonDetRow;
-                rslt->u.ndf = var_row_func;
-                        
-                return 0;
-            }
-        }
-        self_whack(self);
-	}
-
-	return rc;
-}
diff --git a/libs/vdb/meta-read.c b/libs/vdb/meta-read.c
deleted file mode 100644
index 6876d13..0000000
--- a/libs/vdb/meta-read.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include "schema-priv.h"
-#include "xform-priv.h"
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-typedef struct self_t {
-    const KMDataNode *node;
-    void ( * byte_swap ) ( void *dst, const void *src, uint64_t count );
-} self_t;
-
-static void CC self_whack( void *vp ) {
-    self_t *self = vp;
-    
-    KMDataNodeRelease( self->node );
-    free( vp );
-}
-
-static
-rc_t CC meta_read_func(
-                     void *Self,
-                     const VXformInfo *info,
-                     int64_t row_id,
-                     VRowResult *rslt,
-                     uint32_t argc,
-                     const VRowData argv[]
-) {
-    self_t *self = Self;
-    size_t length;
-    size_t read;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeRead(self->node, 0, 0, 0, &read, &length);
-    if (rc == 0) {
-        rslt->data->elem_bits = 8;
-        rslt->data->elem_count = 0; /* no usable data */
-        rc = KDataBufferResize( rslt->data, length );
-        if (rc)
-            return rc;
-        
-        rc = KMDataNodeRead( self->node, 0, rslt->data->base, length, &length, 0 );
-        if (rc == 0) {
-            rc = KDataBufferCast(rslt->data, rslt->data, rslt->elem_bits, true);
-            if (rc == 0) {
-                if (self->byte_swap)
-                    self->byte_swap(rslt->data->base, rslt->data->base, rslt->data->elem_count);
-                rslt->elem_count = rslt->data->elem_count;
-            }
-        }
-    }
-    return rc;
-}
-
-/* 
- function < type T > T meta:read #1.0 < ascii node, * bool deterministic > ();
- */
-VTRANSFACT_BUILTIN_IMPL ( meta_read, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc = 0;
-    self_t *self;
-    SDatatype *sdt;
-    bool need_byte_swap;
-    bool deterministic = true;
-    
-    if (cp->argc > 1)
-        deterministic = cp->argv[1].data.b[0];
-        
-    sdt = VSchemaFindTypeid(info->schema, info->fdesc.fd.td.type_id);
-    assert(sdt != NULL);
-    
-	self = calloc(1, sizeof(self_t));
-	if (self == NULL)
-		rc = RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-    else
-    {
-        const KMetadata *meta;
-        
-        rc = VTableOpenMetadataRead(info->tbl, &meta);
-        if (rc == 0) {
-            rc = KMetadataOpenNodeRead(meta, &self->node, "%.*s", cp->argv[0].count, cp->argv[0].data.ascii);
-            KMetadataRelease(meta);
-            if (rc == 0) {
-                KMDataNodeByteOrder(self->node, &need_byte_swap);
-                if (need_byte_swap)
-                    self->byte_swap = sdt->byte_swap;
-                
-                rslt->self = self;
-                rslt->whack = self_whack;
-                
-                rslt->variant = deterministic ? vftRow : vftNonDetRow;
-                rslt->u.ndf = meta_read_func;
-                
-                return 0;
-            }
-        }
-        self_whack(self);
-	}
-    return rc;
-}
diff --git a/libs/vdb/meta-value.c b/libs/vdb/meta-value.c
deleted file mode 100644
index c511b74..0000000
--- a/libs/vdb/meta-value.c
+++ /dev/null
@@ -1,381 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-#include "xform-priv.h"
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-typedef struct self_t {
-    const KMDataNode *node;
-    KDataBuffer value;
-} self_t;
-
-static void CC self_whack( void *vp ) {
-    self_t *self = vp;
-    
-    KMDataNodeRelease( self->node );
-    KDataBufferWhack( &self->value );
-    free( vp );
-}
-
-static
-rc_t CC meta_value_U8(
-                   void *Self,
-                   const VXformInfo *info,
-                   int64_t row_id,
-                   VRowResult *rslt,
-                   uint32_t argc,
-                   const VRowData argv[]
-) {
-    self_t *self = Self;
-    uint64_t value;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAsU64(self->node, &value);
-    if (rc == 0) {
-        ((uint8_t *)self->value.base)[0] = (uint8_t)value;
-        rslt->elem_bits = 8;
-        rslt->elem_count = 1;
-        KDataBufferWhack(rslt->data);
-        rc = KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    }
-    return rc;
-}
-
-static
-rc_t CC meta_value_U16(
-                   void *Self,
-                   const VXformInfo *info,
-                   int64_t row_id,
-                   VRowResult *rslt,
-                   uint32_t argc,
-                   const VRowData argv[]
-) {
-    self_t *self = Self;
-    uint64_t value;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAsU64(self->node, &value);
-    if (rc == 0) {
-        ((uint16_t *)self->value.base)[0] = (uint16_t)value;
-        rslt->elem_bits = 16;
-        rslt->elem_count = 1;
-        KDataBufferWhack(rslt->data);
-        rc = KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    }
-    return rc;
-}
-
-static
-rc_t CC meta_value_U32(
-                   void *Self,
-                   const VXformInfo *info,
-                   int64_t row_id,
-                   VRowResult *rslt,
-                   uint32_t argc,
-                   const VRowData argv[]
-) {
-    self_t *self = Self;
-    uint64_t value;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAsU64(self->node, &value);
-    if (rc == 0) {
-        ((uint32_t *)self->value.base)[0] = (uint32_t)value;
-        rslt->elem_bits = 32;
-        rslt->elem_count = 1;
-        KDataBufferWhack(rslt->data);
-        rc = KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    }
-    return rc;
-}
-
-static
-rc_t CC meta_value_U64(
-                   void *Self,
-                   const VXformInfo *info,
-                   int64_t row_id,
-                   VRowResult *rslt,
-                   uint32_t argc,
-                   const VRowData argv[]
-) {
-    self_t *self = Self;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAsU64(self->node, (uint64_t *)self->value.base);
-    if (rc == 0) {
-        rslt->elem_bits = 64;
-        rslt->elem_count = 1;
-        KDataBufferWhack(rslt->data);
-        rc = KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    }
-    return rc;
-}
-
-
-static
-rc_t CC meta_value_I8(
-                   void *Self,
-                   const VXformInfo *info,
-                   int64_t row_id,
-                   VRowResult *rslt,
-                   uint32_t argc,
-                   const VRowData argv[]
-) {
-    self_t *self = Self;
-    int64_t value;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAsI64(self->node, &value);
-    if (rc == 0) {
-        ((int8_t *)self->value.base)[0] = (int8_t)value;
-        rslt->elem_bits = 8;
-        rslt->elem_count = 1;
-        KDataBufferWhack(rslt->data);
-        rc = KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    }
-    return rc;
-}
-
-static
-rc_t CC meta_value_I16(
-                    void *Self,
-                    const VXformInfo *info,
-                    int64_t row_id,
-                    VRowResult *rslt,
-                    uint32_t argc,
-                    const VRowData argv[]
-) {
-    self_t *self = Self;
-    int64_t value;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAsI64(self->node, &value);
-    if (rc == 0) {
-        ((int16_t *)self->value.base)[0] = (int16_t)value;
-        rslt->elem_bits = 16;
-        rslt->elem_count = 1;
-        KDataBufferWhack(rslt->data);
-        rc = KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    }
-    return rc;
-}
-
-static
-rc_t CC meta_value_I32(
-                    void *Self,
-                    const VXformInfo *info,
-                    int64_t row_id,
-                    VRowResult *rslt,
-                    uint32_t argc,
-                    const VRowData argv[]
-) {
-    self_t *self = Self;
-    int64_t value;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAsI64(self->node, &value);
-    if (rc == 0) {
-        ((int32_t *)self->value.base)[0] = (int32_t)value;
-        rslt->elem_bits = 32;
-        rslt->elem_count = 1;
-        KDataBufferWhack(rslt->data);
-        rc = KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    }
-    return rc;
-}
-
-static
-rc_t CC meta_value_I64(
-                    void *Self,
-                    const VXformInfo *info,
-                    int64_t row_id,
-                    VRowResult *rslt,
-                    uint32_t argc,
-                    const VRowData argv[]
-) {
-    self_t *self = Self;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAsI64(self->node, (int64_t *)self->value.base);
-    if (rc == 0) {
-        rslt->elem_bits = 64;
-        rslt->elem_count = 1;
-        KDataBufferWhack(rslt->data);
-        rc = KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    }
-    return rc;
-}
-
-static
-rc_t CC meta_value_F32(
-                    void *Self,
-                    const VXformInfo *info,
-                    int64_t row_id,
-                    VRowResult *rslt,
-                    uint32_t argc,
-                    const VRowData argv[]
-) {
-    self_t *self = Self;
-    double value;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAsF64(self->node, &value);
-    if (rc == 0) {
-        ((float *)self->value.base)[0] = (float)value;
-        rslt->elem_bits = 32;
-        rslt->elem_count = 1;
-        KDataBufferWhack(rslt->data);
-        rc = KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    }
-    return rc;
-}
-
-static
-rc_t CC meta_value_F64(
-                    void *Self,
-                    const VXformInfo *info,
-                    int64_t row_id,
-                    VRowResult *rslt,
-                    uint32_t argc,
-                    const VRowData argv[]
-) {
-    self_t *self = Self;
-    rc_t rc = 0;
-    
-    rc = KMDataNodeReadAsF64(self->node, (double *)self->value.base);
-    if (rc == 0) {
-        rslt->elem_bits = 64;
-        rslt->elem_count = 1;
-        KDataBufferWhack(rslt->data);
-        rc = KDataBufferSub(&self->value, rslt->data, 0, UINT64_MAX);
-    }
-    return rc;
-}
-
-/* 
- function < type T > T meta:value #1.0 < ascii node, * bool deterministic > ();
- */
-VTRANSFACT_BUILTIN_IMPL(meta_value, 1, 0, 0) (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc = 0;
-    self_t *self;
-    bool deterministic = true;
-    
-    if (cp->argc > 1)
-        deterministic = cp->argv[1].data.b[0];
-
-    self = calloc(1, sizeof(self_t));
-	if (self) {
-        rc = KDataBufferMake(&self->value, info->fdesc.desc.intrinsic_bits, 1);
-        if (rc == 0) {
-            const KMetadata *meta;
-            
-            rc = VTableOpenMetadataRead(info->tbl, &meta);
-            if (rc == 0) {
-                rc = KMetadataOpenNodeRead(meta, &self->node, "%.*s", cp->argv[0].count, cp->argv[0].data.ascii);
-                KMetadataRelease(meta);
-                if (rc == 0) {
-                    rslt->self = self;
-                    rslt->whack = self_whack;
-                    
-                    rslt->variant = deterministic ? vftRow : vftNonDetRow;
-                    switch (info->fdesc.desc.domain) {
-                    case vtdFloat:
-                        switch (info->fdesc.desc.intrinsic_bits) {
-                        case 32:
-                            rslt->u.ndf = meta_value_F32;
-                            return 0;
-                        case 64:
-                            rslt->u.ndf = meta_value_F64;
-                            return 0;
-                        default:
-                            break;
-                        }
-                        break;
-                    case vtdInt:
-                        switch (info->fdesc.desc.intrinsic_bits) {
-                        case 8:
-                            rslt->u.ndf = meta_value_I8;
-                            return 0;
-                        case 16:
-                            rslt->u.ndf = meta_value_I16;
-                            return 0;
-                        case 32:
-                            rslt->u.ndf = meta_value_I32;
-                            return 0;
-                        case 64:
-                            rslt->u.ndf = meta_value_I64;
-                            return 0;
-                        default:
-                            break;
-                        }
-                        break;
-                    case vtdUint:
-                        switch (info->fdesc.desc.intrinsic_bits) {
-                        case 8:
-                            rslt->u.ndf = meta_value_U8;
-                            return 0;
-                        case 16:
-                            rslt->u.ndf = meta_value_U16;
-                            return 0;
-                        case 32:
-                            rslt->u.ndf = meta_value_U32;
-                            return 0;
-                        case 64:
-                            rslt->u.ndf = meta_value_U64;
-                            return 0;
-                        default:
-                            break;
-                        }
-                        break;
-                    default:
-                        break;
-                    }
-                    rc = RC(rcVDB, rcFunction, rcConstructing, rcType, rcInvalid);
-                }
-            }
-        }
-        self_whack(self);
-	}
-	else
-		rc = RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-    return rc;
-}
diff --git a/libs/vdb/meta-write.c b/libs/vdb/meta-write.c
deleted file mode 100644
index a2fa663..0000000
--- a/libs/vdb/meta-write.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-#include "schema-priv.h"
-#include "xform-priv.h"
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-typedef struct self_t {
-    KMDataNode *node;
-    void ( * byte_swap ) ( void *dst, const void *src, uint64_t count );
-} self_t;
-
-static void CC self_whack( void *vp ) {
-    self_t *self = vp;
-    
-    KMDataNodeRelease( self->node );
-    free( vp );
-}
-
-static
-rc_t CC meta_write_func(
-                     void *Self,
-                     const VXformInfo *info,
-                     int64_t row_id,
-                     VRowResult *rslt,
-                     uint32_t argc,
-                     const VRowData argv[]
-) {
-    self_t *self = Self;
-
-    /* pointer to input page */
-    const uint8_t *sbuf = argv [ 0 ] . u . data . base;
-
-    /* bit offset to first element in row */
-    bitsz_t offset = (argv[0].u.data.first_elem * argv[0].u.data.elem_bits);
-
-    /* the number of bits in this row */
-    bitsz_t blen = argv[0].u.data.elem_count * argv[0].u.data.elem_bits;
-
-    /* row length in bytes */
-    size_t length = (blen + 7) >> 3;
-
-    /* set output buffer size */
-    rc_t rc = KDataBufferCast ( rslt -> data, rslt -> data, rslt -> elem_bits, true );
-    if ( rc == 0 )
-        rc = KDataBufferResize ( rslt -> data, (uint32_t)( blen / rslt -> elem_bits ) );
-    if ( rc != 0 )
-        return rc;
-
-    /* copy data: if byte-swapping, then data are at least 16-bit aligned */
-    if ( ( blen & 7 ) != 0 )
-    {
-        /* ensure trailing bits of buffer are zero */
-        ( ( uint8_t* ) rslt -> data -> base ) [ length - 1 ] = 0;
-        bitcpy ( rslt -> data -> base, 0, sbuf, offset, blen );
-    }
-    else if ( self -> byte_swap != NULL )
-    {
-        ( * self -> byte_swap ) ( rslt -> data -> base,
-            & sbuf [ offset >> 3 ], argv[0].u.data.elem_count );
-    }
-    else
-    {
-        memcpy ( rslt -> data -> base, & sbuf [ offset >> 3 ], length );
-    }
-
-    /* write row to metadata-node */
-    rc = KMDataNodeWrite ( self -> node, rslt -> data -> base, length );
-    if ( rc == 0 )
-        rslt -> elem_count = rslt -> data -> elem_count;
-
-    return rc;
-}
-
-/* meta:write
- */
-VTRANSFACT_BUILTIN_IMPL(meta_write, 1, 0, 0) (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    self_t *self;
-    bool need_byte_swap;
-    
-    SDatatype *sdt = VSchemaFindTypeid(info->schema, dp->argv[0].fd.td.type_id);
-    assert(sdt != NULL);
-    
-	self = calloc(1, sizeof(self_t));
-	if (self == NULL)
-		rc = RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-    else
-    {
-        KMetadata *meta;
-
-        /* even if we cast away const on the table,
-           kdb will still prevent us from doing so if
-           it's actually read-only */
-        rc = VTableOpenMetadataUpdate((VTable *)info->tbl, &meta);
-        if (rc == 0) {
-            rc = KMetadataOpenNodeUpdate(meta, &self->node, "%s", cp->argv[0].data.ascii);
-            KMetadataRelease(meta);
-            if (rc == 0) {
-                KMDataNodeByteOrder(self->node, &need_byte_swap);
-                if (need_byte_swap)
-                    self->byte_swap = sdt->byte_swap;
-                
-                rslt->self = self;
-                rslt->whack = self_whack;
-                
-                rslt->variant = vftNonDetRow;
-                rslt->u.ndf = meta_write_func;
-                
-                return 0;
-            }
-        }
-        self_whack(self);
-	}
-
-	return rc;
-}
diff --git a/libs/vdb/page-map.c b/libs/vdb/page-map.c
deleted file mode 100644
index a943bde..0000000
--- a/libs/vdb/page-map.c
+++ /dev/null
@@ -1,1734 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#define TRACK_REFERENCES 0
-
-#include <vdb/extern.h>
-#include <klib/rc.h>
-#include <atomic.h>
-
-#include <bitstr.h>
-
-#include <klib/pack.h>
-#include <klib/vlen-encode.h>
-#include <sysalloc.h>
-#include "page-map.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <stdio.h>
-
-#include <zlib.h>
-
-/* Page maps describe the layout of rows within a blob.
- * The data within a page map is run-length encoded.
- * I.e. if two identical rows are stored sequentially 
- */
-
-
-
-#define VALIDATE_PAGEMAPS 0
-#define PAGEMAP_STATISTICS 0
-#if PAGEMAP_STATISTICS
-static struct {
-    size_t currentFootprint;
-    size_t maxFootprint;
-    size_t currentWaste;
-    size_t maxWaste;
-    unsigned alive;
-    unsigned maxAlive;
-    unsigned create;
-    unsigned createStatic;
-    unsigned createFixedRow;
-    unsigned createSingle;
-    unsigned grows;
-    unsigned expands;
-    unsigned expandCalls;
-    unsigned appends;
-} pm_stats;
-#endif
-
-elem_count_t PageMapLastLength(const PageMap *cself) {
-    return cself->leng_recs > 0 ? cself->length[cself->leng_recs - 1] : 0;
-}
-
-
-
-static rc_t PageMapRegionExpand(PageMap *self,pm_expand_region_type_t TYPE,row_count_t numrows,elem_count_t length,elem_count_t data_offset)
-{
-	rc_t rc;
-	if(   self->exp_rgn_last == 0           /** not started **/
-	   || self->exp_rgn_last->type != TYPE 	/** another type **/
-           || (TYPE == PM_REGION_EXPAND_SAMEDATA && self->exp_rgn_last->data_offset != data_offset)  /** not the same data */
-           || (TYPE!=PM_REGION_EXPAND_FULL && self->exp_rgn_last->length != length) /** all non-full types are length-dependant**/
-		){ /** New region **/
-		self->exp_rgn_cnt++;
-		rc = KDataBufferResize(&self->istorage, self->exp_rgn_cnt);
-		if(rc) return rc;
-
-		self->exp_rgn_last = (PageMapRegion *)self->istorage.base + self->exp_rgn_cnt -1;
-		self->exp_rgn_last->type=TYPE;
-		self->exp_rgn_last->start_row=self->exp_row_last;
-		self->exp_rgn_last->data_offset = data_offset;
-		self->exp_rgn_last->length = length;
-		self->exp_rgn_last->numrows = numrows;
-		self->exp_rgn_last->expanded = false;
- 	} else { /** continue with existing region **/
-		if(TYPE == PM_REGION_EXPAND_FULL){
-			row_count_t i;
-			elem_count_t *base;
-			uint64_t old_cnt = self->dstorage.elem_count;
-			uint64_t new_cnt = old_cnt + 2*numrows;
-			if(!self->exp_rgn_last->expanded){/*** need to start expansion ***/
-				new_cnt += 2*self->exp_rgn_last->numrows; /*** need to catch up **/
-				rc = KDataBufferResize(&self->dstorage, new_cnt);
-				if(rc) return rc;
-				base = (elem_count_t *)self->dstorage.base + old_cnt;
-				for(i=0;i<self->exp_rgn_last->numrows;i++){
-					base[2*i] = self->exp_rgn_last->length;
-					base[2*i+1] = self->exp_rgn_last->data_offset;
-				}
-				self->exp_rgn_last->data_offset = old_cnt;
-				self->exp_rgn_last->expanded=true;
-			} else {
-				rc = KDataBufferResize(&self->dstorage, new_cnt);
-				if(rc) return rc;
-				base = (elem_count_t *)self->dstorage.base + self->exp_rgn_last->data_offset;
-			}
-			base += 2*self->exp_rgn_last->numrows;
-			for(i=0;i<numrows;i++){
-				base[2*i]   = length;
-				base[2*i+1] = data_offset;
-			}
-		} else if(TYPE == PM_REGION_EXPAND_SAMELEN){
-			 row_count_t i;
-                        elem_count_t *base;
-                        uint64_t old_cnt = self->dstorage.elem_count;
-                        uint64_t new_cnt = old_cnt + numrows;
-                        if(!self->exp_rgn_last->expanded){/*** need to start expansion ***/
-                                new_cnt += self->exp_rgn_last->numrows; /*** need to catch up **/
-                                rc = KDataBufferResize(&self->dstorage, new_cnt);
-                                if(rc) return rc;
-                                base = (elem_count_t *)self->dstorage.base + old_cnt;
-                                for(i=0;i<self->exp_rgn_last->numrows;i++){
-                                        base[i] = self->exp_rgn_last->data_offset;
-                                }
-                                self->exp_rgn_last->data_offset = old_cnt;
-				self->exp_rgn_last->expanded=true;
-                        } else {
-				rc = KDataBufferResize(&self->dstorage, new_cnt);
-				if(rc) return rc;
-                                base = (elem_count_t *)self->dstorage.base + self->exp_rgn_last->data_offset;
-                        }
-			base += self->exp_rgn_last->numrows;
-                        for(i=0;i<numrows;i++){
-                                base[i]   = data_offset;
-                        }
-		}
-		self->exp_rgn_last->numrows += numrows;
-	}
-	return 0;
-}
-
-rc_t PageMapPreExpandFull(const PageMap *cself, row_count_t upto) /*** mostly for use as a temporary pagemap ***/
-{
-	rc_t    rc=0;
-	if(upto > 0){
-		PageMap *self = (PageMap *)cself;
-		assert(self->exp_rgn_last == 0);
-		rc = KDataBufferResize(&self->istorage, 1); /** one and only one pagemap **/
-		if(rc) return rc;
-		
-		self->exp_rgn_last = (PageMapRegion *)self->istorage.base + self->exp_rgn_cnt;
-		self->exp_rgn_cnt = ++self->exp_dr_last;
-
-		self->exp_rgn_last->data_offset = 0;
-		rc=KDataBufferResize(&self->dstorage, upto*2);
-		if(rc) return rc;
-		self->exp_rgn_last->start_row   = 0;
-		self->exp_rgn_last->numrows = 0;
-		self->exp_rgn_last->type = PM_REGION_EXPAND_FULL;
-		self->exp_rgn_last->expanded = true;
-		self->pre_exp_row_count = upto;
-	}
-	return rc;
-}
-
-rc_t PageMapExpandFull(const PageMap *cself)
-{
-	rc_t rc;
-	PageMap *self = (PageMap *)cself;
-	if(self->leng_recs == 1){ 
-		if(   self->data_recs == 1  /* static */
-                   || self->random_access ){ 
-			return 0;
-		} else if(self->data_recs == self->row_count && !self->random_access){ /** equidistant **/
-			rc=PageMapRegionExpand(self,PM_REGION_EXPAND_EQUIDISTANT,self->row_count,self->length[0],0);
-			if(rc) return rc;
-			self->exp_data_offset_last += self->row_count*self->length[0];
-			self->exp_row_last = self->row_count ;
-			self->exp_dr_last =  self->row_count;
-			self->exp_lr_last =  1;
-			self->exp_lr_used =  self->row_count;
-			return  0;
-		}
-        }
-	return 0;
-/*** OTHER VARIANTS  ***
-	return PageMapExpand(cself, cself->row_count);
-	return PageMapExpand(cself, cself->row_count < 1024?cself->row_count:1024);
-******************/
-}
-
-rc_t PageMapExpand(const PageMap *cself, row_count_t upto)
-{
-	rc_t	rc;
-        PageMap *self = (PageMap *)cself;
-#define LENG_RUN_TRIGGER 8
-#define DATA_RUN_TRIGGER 8
-#define EQUI_RUN_TRIGGER 8
-	if( self->leng_recs == 1 && self->row_count > self->data_recs*12/10 && !self->random_access){ /*** Shortcut to make tight loop ***/
-
-		if(self->exp_rgn_last == 0){
-			rc = KDataBufferResize(&self->istorage, self->data_recs);
-			if(rc) return rc;
-		}
-		self->exp_rgn_last = (PageMapRegion *)self->istorage.base + self->exp_rgn_cnt;
-		while(self->exp_dr_last < self->data_recs && self->exp_row_last <= upto + 128){
-			self->exp_rgn_last->start_row   = self->exp_row_last;
-			self->exp_rgn_last->data_offset = self->length[0]*self->exp_dr_last;
-			self->exp_rgn_last->numrows = self->data_run?self->data_run[self->exp_dr_last]:1;
-			self->exp_row_last += self->data_run?self->data_run[self->exp_dr_last]:1;
-			self->exp_rgn_last->type = PM_REGION_EXPAND_SAMEDATA;
-			self->exp_rgn_last->length      = self->length[0];
-			self->exp_rgn_last->expanded = false;
-			self->exp_dr_last  ++;
-			self->exp_rgn_last ++;
-		}
-		self->exp_rgn_cnt = self->exp_dr_last;
-	} else for(;self->exp_lr_last < self->leng_recs && self->exp_dr_last < self->data_recs && self->exp_row_last <= upto + 128;){
-		row_count_t leng_run=self->leng_run[self->exp_lr_last] - self->exp_lr_used;
-		elem_count_t length =self->length[self->exp_lr_last];
-		if(leng_run == 0) {
-			self->exp_lr_last++;
-			self->exp_lr_used=0;
-			continue;
-		}
-		if(leng_run >= LENG_RUN_TRIGGER && !self->random_access){
-			while(leng_run > 0 && self->exp_row_last <= upto + 128){
-				row_count_t data_run=self->data_run?self->data_run[self->exp_dr_last]:1;
-				assert(leng_run >= data_run);/** data runs should have the same lengths **/
-				assert(data_run > 0);
-				if(data_run >= DATA_RUN_TRIGGER){
-					rc=PageMapRegionExpand(self,PM_REGION_EXPAND_SAMEDATA,data_run, length,self->exp_data_offset_last);
-					if(rc) return rc;
-					assert(leng_run >= data_run);
-					leng_run -= data_run;
-					self->exp_lr_used += data_run;
-					self->exp_row_last+= data_run; 
-					self->exp_dr_last++;
-					self->exp_data_offset_last += length;
-				} else if( /**** quick check if all remaining rows are equidistant ****/
-					     self->exp_lr_last == self->leng_recs - 1 /*** last leng_run ***/
-					  && self->row_count - self->exp_row_last == self->data_recs - self->exp_dr_last /*** all remaining data_runs are 1 ***/
-					  && self->row_count - self->exp_row_last > EQUI_RUN_TRIGGER){ 
-						assert( leng_run == self->row_count - self->exp_row_last);
-						assert(data_run == 1);
-						rc=PageMapRegionExpand(self,PM_REGION_EXPAND_EQUIDISTANT,leng_run, length,self->exp_data_offset_last);
-						if(rc) return rc;
-						self->exp_data_offset_last += leng_run*length;
-						self->exp_row_last = self->row_count ;
-						self->exp_dr_last =  self->data_recs;
-						self->exp_lr_last = self->leng_recs;
-						self->exp_lr_used += leng_run;
-						leng_run = 0;
-						
-				} else {
-					if( data_run == 1){
-						row_count_t data_run_unique;
-						for( data_run_unique =0;
-						     data_run_unique < leng_run && ((self->data_run==NULL)||self->data_run[self->exp_dr_last+data_run_unique]==1);
-						     data_run_unique++){}
-						if(data_run_unique >= EQUI_RUN_TRIGGER){
-							rc=PageMapRegionExpand(self,PM_REGION_EXPAND_EQUIDISTANT,data_run_unique,length,self->exp_data_offset_last);
-							self->exp_dr_last += data_run_unique;
-							self->exp_data_offset_last += data_run_unique*length;
-							assert(leng_run >= data_run_unique);
-							leng_run -= data_run_unique;
-						        self->exp_lr_used  += data_run_unique;
-							self->exp_row_last += data_run_unique;
-						} else while(data_run_unique){
-							rc=PageMapRegionExpand(self,PM_REGION_EXPAND_SAMELEN,data_run,length,self->exp_data_offset_last);
-							if(rc) return rc;
-							assert(leng_run > 0);
-							leng_run --;
-							self->exp_lr_used ++;
-							self->exp_row_last++;
-							self->exp_dr_last++;
-							self->exp_data_offset_last += length;
-							data_run_unique--;
-						}
-					} else {
-						rc=PageMapRegionExpand(self,PM_REGION_EXPAND_SAMELEN,data_run,length,self->exp_data_offset_last);
-						if(rc) return rc;
-						assert(leng_run >= data_run);
-						leng_run -= data_run;
-						self->exp_lr_used += data_run;
-						self->exp_row_last+= data_run;
-						self->exp_dr_last++;
-						self->exp_data_offset_last += length;
-					}
-				}
-			}
-			assert(self->exp_row_last <= self->row_count);
-		} else {
-			while(leng_run > 0){
-				row_count_t data_run=cself->data_run?cself->data_run[self->exp_dr_last]:1;
-				assert(leng_run >= data_run);/** data runs should have the same lengths **/
-				if(self->random_access){
-					rc=PageMapRegionExpand(self,PM_REGION_EXPAND_FULL,data_run,length,self->data_offset[self->exp_row_last]);
-					self->exp_data_offset_last  = self->data_offset[self->exp_row_last] + length;
-				} else {
-					rc=PageMapRegionExpand(self,PM_REGION_EXPAND_FULL,data_run,length,self->exp_data_offset_last);
-					self->exp_data_offset_last += length;
-				}
-				if(rc) return rc;
-				self->exp_row_last += data_run;
-				assert(leng_run >= data_run);
-				leng_run -= data_run;
-				self->exp_lr_used += data_run;
-				self->exp_dr_last++;
-			}
-		}
-	}
-	return 0;
-}
-
-static rc_t PageMapFindRegion(const PageMap *cself,uint64_t row,PageMapRegion **pmr)
-{
-	/*** in PageMap rows are 0-based **/
-	rc_t	rc;
-	pm_size_t left,right,i_rgn;
-	if(row >= cself->row_count )
-		return  RC (rcVDB, rcPagemap, rcSearching, rcRow, rcNotFound );
-	if(cself -> exp_row_last <= row){
-		rc=PageMapExpand(cself,row);
-		if(rc) return rc;
-	}
-
-	if(cself->exp_rgn_cnt > 1){
-		i_rgn = cself->i_rgn_last;
-		left = 0;
-		right = cself->exp_rgn_cnt - 1;
-		while(right > left){
-			PageMapRegion*  rgn=  (PageMapRegion*)cself->istorage.base + i_rgn;
-			assert(i_rgn < cself->exp_rgn_cnt);
-			if(row < rgn->start_row){
-				right = i_rgn-1;
-				i_rgn  = (left + right) / 2;
-			} else if(row == rgn->start_row + rgn->numrows){ /*** special case for positive sequentual scans ***/
-				i_rgn++;
-			} else if(row > rgn->start_row + rgn->numrows){
-				left = i_rgn+1;
-				i_rgn =  (left + right + 1) / 2;
-			} else {
-				break;
-			}
-		}
-	} else {
-		i_rgn = 0;
-	}
-	{
-		PageMap *self = (PageMap *)cself;
-		self->i_rgn_last = i_rgn;
-		self->rgn_last = (PageMapRegion*)self->istorage.base+cself->i_rgn_last;
-	}
-	assert(cself->rgn_last->start_row <= row);
-	assert(cself->rgn_last->start_row + cself->rgn_last->numrows > row);
-	if(pmr) *pmr=(PageMapRegion*)cself->istorage.base + i_rgn;
-	return 0;
-}
-
-static rc_t PageMapRegionGetData(const PageMapRegion *cself,const elem_count_t *exp_base,uint64_t row,uint32_t * data_offset,uint32_t * data_length,uint32_t * repeat_count)
-{
-	if(row < cself->start_row || row >= cself->start_row + cself->numrows)
-		return  RC (rcVDB, rcPagemap, rcSearching, rcRow, rcNotFound );
-
-	if(data_offset != NULL || data_length != NULL || repeat_count != NULL){
-		if(!cself->expanded){
-			if(data_length) *data_length=cself->length;
-			if(data_offset){
-				*data_offset=cself->data_offset;
-				if(cself->type == PM_REGION_EXPAND_EQUIDISTANT){
-					*data_offset += cself->length * (row - cself->start_row);
-				}
-			}
-			if(repeat_count) {
-				if(cself->type == PM_REGION_EXPAND_EQUIDISTANT) *repeat_count=1;
-				else *repeat_count = cself->numrows + cself->start_row - row;
-			}
-		} else switch(cself->type){
-			case PM_REGION_EXPAND_FULL:
-				{
-					row_count_t  i = row - cself->start_row;
-					exp_base += cself->data_offset;
-					if(data_length)  *data_length = exp_base[2*i];
-					if(data_offset)  *data_offset = exp_base[2*i+1];
-					if(repeat_count){
-						int j;
-						for(j=i+1;   j<cself->numrows
-							  && exp_base[2*i]   == exp_base[2*j]
-							  && exp_base[2*i+1] == exp_base[2*j+1];j++){}
-						*repeat_count = j-i;
-					}
-				}
-				break;
-			case PM_REGION_EXPAND_SAMELEN:
-				if(data_length) *data_length=cself->length;
-				if(data_offset || repeat_count){
-					row_count_t  i = row - cself->start_row;
-					exp_base += cself->data_offset;
-					if(data_offset) *data_offset = exp_base[i];
-					if(repeat_count){
-						int j;
-						for(j=i+1;j<cself->numrows && exp_base[i] == exp_base[j];j++){}
-						*repeat_count = j-i;
-					}
-				}
-				break;
-			default: /*** should not happen to anything but 2 above **/
-				return RC (rcVDB, rcPagemap, rcSearching, rcData, rcInconsistent ); 
-		}
-	}
-	return 0;
-}
-
-/*** This is a heavy-weight function which gets data by integration all the time - useful for debugging ****/
-#if _HEAVY_PAGEMAP_DEBUGGING
-static rc_t PageMapGetData_HW(const PageMap *cself,uint64_t row,uint32_t * data_offset,uint32_t * data_length,uint32_t * repeat_count)
-{
-	if(row >= cself->row_count)
-		return  RC (rcVDB, rcPagemap, rcSearching, rcRow, rcNotFound );
-	if(data_offset != NULL || data_length != NULL || repeat_count != NULL){
-		uint64_t i,j,r;
-		uint32_t dto,dtl,dtr;
-		uint32_t leng_run,data_run;
-		r=dto=i=j=0;
-		leng_run=cself->leng_run[0];
-		while(1){
-			dtl  = cself->length[i];
-			data_run=cself->data_run?cself->data_run[j]:1;
-			j++;
-			r+= data_run;
-			if(r > row){
-				dtr = r - row;
-				 break;
-			}
-			dto += dtl;
-			leng_run -= data_run;
-			if(leng_run == 0){
-				i++;
-				leng_run=cself->leng_run[i];
-			}
-		}
-		if(data_length)   *data_length=dtl;
-		if(data_offset)   *data_offset=dto;
-		if(repeat_count)  *repeat_count=dtr;
-	}
-	return 0;
-}
-#endif
-
-/*** another function to help debugging ***/
-#if 0
-static int DEBUG_PageMapPrintSum(const PageMap *pm, uint32_t row)
-{
-	int i,r;
-	for(i=0,r=row; i < pm->data_recs && r > 0;r-=pm->data_run?pm->data_run[i]:1,i++){}
-	printf("Data recs= <%d>, rows_left = <%d>\n",i,r);
-	for(i=0,r=row; i < pm->leng_recs && r >0;r-=pm->leng_run[i++]){}
-	printf("Leng recs= <%d>, rows_left = <%d>\n",i,r);
-	return 0;
-}
-#endif
-
-rc_t PageMapFindRow(const PageMap *cself,uint64_t row,uint32_t * data_offset,uint32_t * data_length,uint32_t * repeat_count)
-{
-	rc_t	rc=0;
-	PageMapRegion *pmr;
-
-	if(cself->data_recs == 1){ /** static **/
-		if(repeat_count) *repeat_count = UINT32_MAX;
-		if(data_offset)  *data_offset = 0;
-		if(data_length)  *data_length = cself->length[0];
-		return 0;
-        }
-	if(cself->random_access && cself->leng_recs == 1){
-		if(row >= cself->data_recs)
-			return RC(rcVDB, rcPagemap, rcAccessing, rcRow, rcOutofrange);
-		if(data_length)  *data_length = cself->length[0];
-		if(data_offset)  *data_offset =  cself->data_offset[row];
-		if(repeat_count){
-			uint64_t i;
-			for( i=row+1, repeat_count[0]=1; i < cself->data_recs &&  cself->data_offset[i] == cself->data_offset[row]; i++, repeat_count[0]++ ){}
-		}
-		return 0;
-	}
-
-	rc = PageMapFindRegion(cself,row,&pmr);
-	if(rc) return rc;
-
-        rc = PageMapRegionGetData(pmr,cself->dstorage.base,row,data_offset,data_length,repeat_count);
-	if(rc) return rc;
-
-#if _HEAVY_PAGEMAP_DEBUGGING
-	{
-		uint32_t dto,dtl,dtr;
-		rc = PageMapGetData_HW(cself,row,&dto,&dtl,&dtr);
-		assert(rc == 0);
-		if(data_length) assert(dtl==*data_length);
-		if(data_offset) assert(dto==*data_offset);
-		if(repeat_count)  assert(dtr==*repeat_count);
-	}
-#endif
-	return 0;
-}
-
-LIB_EXPORT rc_t PageMapNewIterator(const PageMap *self, PageMapIterator *lhs, uint64_t first_row, uint64_t num_rows)
-{
-    rc_t rc;
-
-    if (first_row + num_rows > self->row_count)
-        num_rows = self->row_count - first_row;
-
-#if _DEBUGGING
-    if (self->data_recs > 1) {
-        assert(first_row == (row_count_t)first_row);
-        assert(num_rows == (row_count_t)num_rows);
-        assert(first_row + num_rows == (row_count_t)(first_row + num_rows));
-    }
-#endif
-    
-    memset(lhs, 0, sizeof(*lhs));
-
-#if _HEAVY_PAGEMAP_DEBUGGING
-    lhs->parent = self;
-#endif
-
-    lhs->last_row = first_row + num_rows;
-    lhs->cur_row = first_row;
-    if(self->data_recs == 1){
-	lhs->repeat_count  = (num_rows < UINT32_MAX)?num_rows:UINT32_MAX;
-	lhs->static_datalen = self->length[0];
-	return 0;
-    }
-    if(self->random_access && self->leng_recs == 1 && first_row < self->row_count){ /** simple random access - no explosion needed **/
-	lhs->static_datalen = self->length[0];
-	lhs->exp_base = ( elem_count_t ** )&self->data_offset;
-	if(lhs->last_row > self->row_count) lhs->last_row = self->row_count;
-	return 0;
-    }
-    if( self->exp_row_last < lhs->last_row){
-	    rc = PageMapExpand(self,lhs->last_row-1);
-	    if(rc) return rc;
-    }
-    rc = PageMapFindRow(self,first_row,NULL,NULL,NULL);
-    if(rc) return rc;
-    lhs->rgns    = (PageMapRegion**) &self->istorage.base;
-    lhs->exp_base = (elem_count_t**) &self->dstorage.base;
-    lhs->cur_rgn  = self->i_rgn_last;
-    lhs->cur_rgn_row = lhs->cur_row - (*lhs->rgns)[self->i_rgn_last].start_row;
-    assert(lhs->cur_rgn_row < (*lhs->rgns)[self->i_rgn_last].numrows);
-    return  0;
-}
-
-static PageMap *new_PageMap(void) {
-
-    PageMap *y;
-    y = malloc(sizeof(*y));
-    if (y) {
-	memset(y,0,sizeof(*y));
-        KRefcountInit(&y->refcount, 1, "PageMap", "new", "");
-	y->istorage.elem_bits = sizeof(PageMapRegion)*8;
-	y->dstorage.elem_bits = sizeof(elem_count_t)*8;
-    }
-    return y;
-}
-
-static PageMap *new_StaticPageMap(unsigned length, unsigned data) {
-    union {
-        PageMap pm;
-        row_count_t rcnt;
-        elem_count_t ecnt;
-    } *y;
-    size_t const sz = sizeof(*y)
-                    + sizeof(y->pm.length[0]) * length
-                    + sizeof(y->pm.leng_run[0]) * length
-                    + sizeof(y->pm.data_run[0]) * data;
-    
-    y = malloc(sz);
-    if (y) {
-#if PAGEMAP_STATISTICS
-        ++pm_stats.createStatic;
-        ++pm_stats.alive;
-        if (pm_stats.maxAlive < pm_stats.alive)
-            pm_stats.maxAlive = pm_stats.alive;
-        pm_stats.currentFootprint += sz;
-        if (pm_stats.maxFootprint < pm_stats.currentFootprint)
-            pm_stats.maxFootprint = pm_stats.currentFootprint;
-#endif
-        memset(&y->pm, 0, sizeof(y->pm));
-        KRefcountInit(&y->pm.refcount, 1, "PageMap", "new_Static", "");
-        y->pm.length = (elem_count_t *)&y[1];
-        y->pm.leng_run = (row_count_t *)&y->pm.length[length];
-        y->pm.data_run = &y->pm.leng_run[length];
-        y->pm.reserve_leng = length;
-        y->pm.reserve_data = data;
-	y->pm.istorage.elem_bits = sizeof(PageMapRegion)*8;
-	y->pm.dstorage.elem_bits = sizeof(elem_count_t)*8;
-    }
-    return &y->pm;
-}
-
-static
-rc_t PageMapGrow(PageMap *self, uint32_t new_reserve_leng, uint32_t new_reserve_data) {
-    uint32_t sz;
-    PageMap temp = *self;
-    uint32_t reserve_data = self->reserve_data;
-    uint32_t reserve_leng = self->reserve_leng;
-    rc_t rc;
-
-#if PAGEMAP_STATISTICS
-    ++pm_stats.grows;
-#endif
-    if (new_reserve_leng > (1UL << 31) || new_reserve_data > (1UL << 31))
-        return RC(rcVDB, rcPagemap, rcAllocating, rcParam, rcExcessive);
-    
-    if (reserve_leng == 0)
-        reserve_leng = 1;
-    if (reserve_data == 0)
-        reserve_data = 1;
-#define MIN_KBUF_RESERVE_SIZE 256  
-    while (reserve_leng < new_reserve_leng)
-        reserve_leng <<= 1;
-    if (reserve_leng < MIN_KBUF_RESERVE_SIZE) reserve_leng = MIN_KBUF_RESERVE_SIZE;
-    while (reserve_data < new_reserve_data)
-        reserve_data <<= 1;
-    if (reserve_data < MIN_KBUF_RESERVE_SIZE) reserve_data = MIN_KBUF_RESERVE_SIZE;
-
-    sz = reserve_leng * 2 + reserve_data;
-#if PAGEMAP_STATISTICS
-    pm_stats.currentFootprint -= KDataBufferMemorySize(&self->estorage);
-#endif
-    {
-        KDataBuffer new_buffer;
-        
-        rc = KDataBufferMake(&new_buffer, 8 * sizeof(uint32_t), sz);
-        if (rc)
-            return rc;
-#if PAGEMAP_STATISTICS
-        pm_stats.currentFootprint += KDataBufferMemorySize(&self->estorage);
-        if (pm_stats.maxFootprint < pm_stats.currentFootprint)
-            pm_stats.maxFootprint = pm_stats.currentFootprint;
-#endif
-        self->cstorage = new_buffer;
-    }
-    self->length = self->cstorage.base;
-    self->leng_run = self->length + reserve_leng;
-    self->data_run = self->leng_run + reserve_leng;
-    self->start_valid = 0;
-    
-    if (self->leng_recs > 0 && temp.length != NULL) {
-        memcpy(self->length  , temp.length  , self->reserve_leng * sizeof(uint32_t));
-        memcpy(self->leng_run, temp.leng_run, self->reserve_leng * sizeof(uint32_t));
-    }
-    if (self->data_recs > 0 && temp.data_run != NULL)
-        memcpy(self->data_run, temp.data_run, self->reserve_data * sizeof(uint32_t));
-
-    self->reserve_leng = reserve_leng;
-    self->reserve_data = reserve_data;
-#if PAGEMAP_STATISTICS
-    pm_stats.currentWaste += (self->reserve_data - self->data_recs) * sizeof(self->data_run[0]) +
-                             (self->reserve_leng - self->leng_recs) * (sizeof(self->leng_run[0]) + sizeof(self->length[0]));
-    if (pm_stats.maxWaste < pm_stats.currentWaste)
-        pm_stats.maxWaste = pm_stats.currentWaste;
-#endif
-    KDataBufferWhack(&temp.cstorage);
-
-    return 0;
-}
-
-rc_t PageMapNew(PageMap **lhs, uint32_t reserve) {
-    PageMap *y = new_PageMap();
-
-    if (y == NULL)
-        return RC(rcVDB, rcPagemap, rcConstructing, rcMemory, rcExhausted);
-
-    if (reserve > 0) {
-        rc_t rc = PageMapGrow(y, reserve, reserve);
-        if (rc) {
-            free(y);
-            return rc;
-        }
-#if PAGEMAP_STATISTICS
-        --pm_stats.grows;
-#endif
-    }
-    *lhs = y;
-#if PAGEMAP_STATISTICS
-    ++pm_stats.create;
-    ++pm_stats.alive;
-    if (pm_stats.maxAlive < pm_stats.alive)
-        pm_stats.maxAlive = pm_stats.alive;
-    pm_stats.currentFootprint += sizeof(*y);
-    if (pm_stats.maxFootprint < pm_stats.currentFootprint)
-        pm_stats.maxFootprint = pm_stats.currentFootprint;
-#endif
-    return 0;
-}
-
-rc_t PageMapToRandomAccess(PageMap **rslt, PageMap * src,uint32_t *data_offset) /** data_offset should have dimension of data_run ***/
-{
-	rc_t rc;
-	bool simple = (src->row_count == src->data_recs);
-	PageMap *dst;
-	assert(src->row_count >= src->leng_recs);
-	rc = PageMapNew(&dst, 0);
-	if(rc == 0){
-		dst->leng_recs=src->leng_recs;
-		dst->row_count=src->row_count;
-		rc = KDataBufferMake(&dst->cstorage, 8 * sizeof(uint32_t), 2*dst->leng_recs+(data_offset?dst->row_count:0));
-		if(rc == 0){
-			dst->length = dst->cstorage.base;
-			dst->leng_run    = dst->length   + dst->leng_recs;
-			dst->data_recs = src->row_count;
-			memcpy(dst->length,  src->length,  sizeof(uint32_t)*dst->leng_recs);
-			memcpy(dst->leng_run,src->leng_run,sizeof(uint32_t)*dst->leng_recs);
-			if(data_offset){
-				dst->data_offset = dst->leng_run + dst->leng_recs;
-				if(simple){
-					memcpy(dst->data_offset,data_offset,sizeof(uint32_t)*dst->row_count);
-				} else {
-					uint32_t i,j;
-					for(i=j=0;i<src->data_recs;i++){
-						elem_count_t data_len=src->data_run[i];
-						while(data_len > 0){
-							assert(j < src->row_count);
-							dst->data_offset[j++] = data_offset[i];
-							data_len--;
-						}
-					}
-				}
-				dst->random_access=true;
-			} 
-			dst->reserve_leng = dst->leng_recs;
-			dst->reserve_data = dst->row_count;
-			dst->start_valid = dst->row_count;
-			*rslt = dst;
-			return 0;
-		}
-		PageMapRelease(dst);
-	}
-	return rc;
-}
-
-
-rc_t PageMapNewFixedRowLength(PageMap **lhs, uint64_t row_count, uint64_t row_len) {
-    PageMap *y;
-    rc_t rc;
-
-    if (row_count >> 32 != 0 || row_len >> 32 != 0)
-        return RC(rcVDB, rcPagemap, rcConstructing, rcParam, rcTooBig);
-    
-    rc = PageMapNew(&y, 0);
-#if PAGEMAP_STATISTICS
-    ++pm_stats.createFixedRow;
-    --pm_stats.create;
-#endif
-    if (rc)
-        return rc;
-    rc = PageMapGrow(y, 1, (uint32_t)row_count);
-#if PAGEMAP_STATISTICS
-    --pm_stats.grows;
-#endif
-    if (rc == 0) {
-	int i;
-        *lhs = y;
-        y->length[0] = (uint32_t)row_len;
-        y->leng_run[0] = (uint32_t)row_count;
-        y->leng_recs = 1;
-        y->data_recs = (uint32_t)row_count;
-        y->row_count = (uint32_t)row_count;
-        for (i = 0; i != (uint32_t)row_count; ++i) {
-            y->data_run[i] = 1;
-        }
-
-    }
-    if (rc)
-        PageMapRelease(y);
-    return rc;
-}
-
-rc_t PageMapNewSingle(PageMap **lhs, uint64_t row_count, uint64_t row_len) {
-    PageMap *y;
-    rc_t rc;
-    
-    if (row_count >> 32 != 0)
-        return RC(rcVDB, rcPagemap, rcConstructing, rcParam, rcTooBig);
-    
-    rc = PageMapNewFixedRowLength(&y, 1, row_len);
-    if (rc == 0) {
-#if PAGEMAP_STATISTICS
-        ++pm_stats.createSingle;
-        --pm_stats.createFixedRow;
-#endif
-        y->row_count = y->data_run[0] = y->leng_run[0] = (uint32_t)row_count;
-        *lhs = y;
-    }
-    return rc;
-}
-
-bool PageMapHasRows(const PageMap *self) {
-    return self->data_recs > 0;
-}
-
-uint32_t PageMapFixedRowLength (const PageMap *self) {
-    uint32_t rslt = 0;
-    
-    if (self->leng_recs == 1)
-        rslt = self->length[0];
-    return rslt;
-}
-
-rc_t PageMapRowLengthRange (const PageMap *self,elem_count_t *min,elem_count_t *max)
-{
-    int i;
-    *min = *max = self->length[0];
-    for(i=1;i<self->leng_recs;i++){
-	if      (self->length[i] < *min) *min = self->length[i];
-	else if (self->length[i] > *max) *max = self->length[i];
-    }
-    return 0;
-}
-
-
-uint32_t PageMapHasSimpleStructure(const PageMap *self) {
-    uint32_t rslt = PageMapFixedRowLength(self);
-    
-    if (rslt == 0)
-        return rslt;
-
-    if(self->data_recs != self->row_count) return 0;
-
-    return rslt;
-}
-
-#if 0
-static bool PageMapValidate(const PageMap *cself) {
-    unsigned i;
-    uint32_t n;
-    uint32_t m;
-        
-    for (m = 0, i = 0; i != cself->leng_recs; ++i) m += cself->leng_run[i];
-    for (n = 0, i = 0; i != cself->data_recs; ++i) n += cself->data_run[i];
-
-    return m == n ? true : false;
-}
-
-static
-rc_t PageMapAppendRun(PageMap *self, uint32_t run_length, uint32_t row_length) {
-    return -1;
-}
-#endif
-
-rc_t PageMapAppendRows(PageMap *self, uint64_t row_length, uint64_t run_length, bool same_data) {
-    rc_t rc;
-    uint32_t leng_cur = self->leng_recs - 1;
-    uint32_t data_cur = self->data_recs - 1;
-    
-    if ((uint32_t)row_length != row_length)
-        return RC(rcVDB, rcPagemap, rcConstructing, rcParam, rcTooBig);
-    
-    if ((uint32_t)run_length != run_length)
-        return RC(rcVDB, rcPagemap, rcConstructing, rcParam, rcTooBig);
-    
-    if (self->leng_recs && row_length == self->length[leng_cur])
-        self->leng_run[leng_cur] += run_length;
-    else {
-        same_data = false;
-        leng_cur = self->leng_recs;
-        ++self->leng_recs;
-
-#if PAGEMAP_STATISTICS
-        pm_stats.currentWaste -= sizeof(self->leng_run[0]) + sizeof(self->length[0]);
-#endif
-        
-        if (self->leng_recs >= self->reserve_leng) {
-            rc = PageMapGrow(self, self->leng_recs, 0);
-            if (rc)
-                return rc;
-        }
-        self->leng_run[leng_cur] = run_length;
-        self->length[leng_cur] = (uint32_t)row_length;
-    }
-    if (self->data_recs && same_data)
-        self->data_run[data_cur] += run_length;
-    else {
-        data_cur = self->data_recs;
-        ++self->data_recs;
-        
-#if PAGEMAP_STATISTICS
-        pm_stats.currentWaste -= sizeof(self->data_run[0]);
-#endif
-        
-        if (self->data_recs >= self->reserve_data) {
-            rc = PageMapGrow(self, 0, self->data_recs);
-            if (rc)
-                return rc;
-        }
-        self->data_run[data_cur] = run_length;
-    }
-    if(self->row_count < self->pre_exp_row_count){
-	int i;
-	elem_count_t *exp_base = self->dstorage.base;
-	elem_count_t data_offset;
-	if(same_data){
-		if(self->row_count == 0){
-			data_offset = 0;
-		} else {
-			data_offset = exp_base[2*self->row_count-1];
-		}
-	} else {
-		data_offset = self->exp_data_offset_last;
-		self->exp_data_offset_last += row_length;
-	}
-	for(i=self->row_count;i<run_length+self->row_count;i++){
-		exp_base[2*i]  =  row_length;
-		exp_base[2*i+1]=  data_offset;
-	}
-	self->exp_row_last += run_length;
-	self->exp_rgn_last->numrows += run_length;
-	
-    }
-    self->row_count += run_length;
-    return 0;
-}
-
-static rc_t serialize_lengths(
-                              KDataBuffer *Dst,
-                              uint64_t offset, 
-                              const uint32_t run[],
-                              unsigned runs,
-                              uint64_t *consumed
-) {
-    rc_t rc;
-    unsigned i;
-    uint64_t j;
-    uint64_t n;
-    uint8_t *dst = Dst->base;
-    
-    dst += offset;
-    *consumed = 0;
-    for (i = 0, j = 0, n = 0, rc = 0; rc == 0 && i != runs; ++i, j += n)
-        rc = vlen_encodeU1(dst + j, 5, &n, run[i]);
-    
-    if (rc == 0)
-        *consumed = j;
-    
-    return rc;
-}
-
-#if 0
-
-static rc_t deserialize_lengths(
-                                uint32_t run[],
-                                unsigned runs,
-                                uint8_t const src[],
-                                unsigned ssize,
-                                uint64_t *consumed
-) {
-    unsigned i;
-    unsigned j;
-    uint64_t n;
-    
-    *consumed = 0;
-    for (i = 0, j = 0; i != runs; ++i, j += (unsigned)n) {
-        uint64_t val;
-        rc_t rc = vlen_decodeU1(&val, src + j, ssize - j, &n);
-        
-        if (rc) return rc;
-        run[i] = (uint32_t)val;
-    }
-    *consumed = j;
-    return 0;
-}
-#else
-
-#if _ARCH_BITS == 32
-#define FLAG_64 0x8080808080808080ULL
-#define VAL_64  0x7F7F7F7F7F7F7F7FULL
-#else
-#define FLAG_64 0x8080808080808080UL
-#define VAL_64  0x7F7F7F7F7F7F7F7FUL
-#endif
-
-static rc_t deserialize_lengths(
-                                uint32_t run[],
-                                unsigned runs,
-                                uint8_t const src[],
-                                unsigned ssize,
-                                uint64_t *consumed
-) {
-    uint8_t	to_align = 16 - (((long)src)&15);/** alignmentto 16 bytes will make optimizer and cpu happy. don't care about loss in cast - we need the lowest byte **/
-    int		si=0;/**source index **/
-    int		di=0;/** destination index **/
-    int		pcnt = (ssize - to_align )/8; 
-
-    memset(run,0,runs*sizeof(*run));
-    if(pcnt){ /** does it make sense at all ***/
-	uint64_t    *ptr=(uint64_t*) (src + to_align);
-	int         pi;
-	
-	for(;si<to_align && di < runs ;si++){ /** align the pointer first **/
-		if(((int8_t)src[si]) < 0) {
-			run[di] += src[si] & 0x7F;
-			run[di] <<= 7;
-		} else {
-			run[di++] += src[si];
-		}
-	}	
-	assert((((long)ptr)&15) == 0);
-	for(pi = 0; pi < pcnt && di < runs; pi++){ /** do bulk staff **/
-		uint64_t flag = ptr[pi] & FLAG_64;
-		uint64_t  val = ptr[pi] & VAL_64;
-		int  i;
-		int8_t     *cf = (int8_t*)&flag;
-		uint8_t	   *cv = (uint8_t*)&val;
-		for(i=0;i<8 && di < runs;i++){ /** no endian problem - casting of ptr matches casting of flag & val **/
-			si++;
-			run[di] += cv[i];
-			if(cf[i] < 0){
-				run[di] <<= 7;
-			} else {
-				di++;
-			}
-		}
-	}
-    }
-   
-    for(;si < ssize && di < runs;si++){/** deal with tails **/
-	if(((int8_t)src[si]) < 0) {
-		run[di] += src[si] & 0x7F;
-		run[di] <<= 7;
-	} else {
-		run[di++] += src[si];
-	}
-    }
-    *consumed = si;
-    return 0;
-}
-
-#endif
-
-static
-rc_t serialize(const PageMap *self, KDataBuffer *buffer, uint64_t *size) {
-/*
- variant 0: fixed row length, data_run[..] == 1
-    vlencode(row_length)
- version 2: same as 0 but random access
-    adds serialize(data_offset)
-
- variant 1: fixed row length, variable data_run
-    vlencode(row_length)
-    vlencode(data_recs)
-    serialize(data_run)
-
- variant 2: variable row length, data_run[..] == 1
-    vlencode(leng_recs)
-    serialize(length)
-    serialize(leng_run)
- versuion 2: same as 2 but random access
-    adds serialize(data_offset)
- 
- variant 3: variable row length, variable data_run
-    vlencode(leng_recs)
-    vlencode(data_recs)
-    serialize(length)
-    serialize(leng_run)
-    serialize(data_run)
-
-  
-
- */
-    uint8_t version = self->random_access?2:1;
-    uint8_t variant = 0;
-    uint8_t header;
-    rc_t rc = 0;
-    uint64_t sz;
-    KDataBuffer compress;
-
-
-
-    memset(&compress, 0, sizeof(compress));
-
-    variant = ( (self->data_recs == self->row_count)? 0 : 1) | ((self->leng_recs == 1 ? 0 : 1) << 1);
-    header = (version << 2) | variant;
-    switch (variant) {
-    case 0:
-        rc = KDataBufferResize(buffer, 6);
-        if (rc == 0) {
-            ((uint8_t *)buffer->base)[0] = header;
-            vlen_encodeU1(((uint8_t *)buffer->base) + 1, 5, &sz, self->length[0]);
-	    buffer->elem_count = sz + 1;
-	    if(self->random_access){
-		rc = KDataBufferMakeBytes(&compress, 5*self->row_count);
-		if(rc == 0){
-			rc = serialize_lengths(&compress, 0, self->data_offset, self->row_count, &sz);
-			compress.elem_count = sz;
-		}
-	    }
-        }
-        break;
-    case 1:
-        rc = KDataBufferResize(buffer, 11);
-        if (rc == 0) {
-            rc = KDataBufferMakeBytes(&compress, 5 * self->data_recs);
-            if (rc == 0) {
-                ((uint8_t *)buffer->base)[0] = header;
-                vlen_encodeU1(((uint8_t *)buffer->base) + 1, 5, &sz, self->length[0]);
-                buffer->elem_count = sz + 1;
-                vlen_encodeU1(((uint8_t *)buffer->base) + 1 + sz, 5, &sz, self->data_recs);
-                buffer->elem_count += sz;
-                
-                rc = serialize_lengths(&compress, 0, self->data_run, self->data_recs, &sz);
-                compress.elem_count = sz;
-            }
-        }
-        break;
-    case 2:
-        rc = KDataBufferResize(buffer, 6);
-        if (rc == 0) {
-            rc = KDataBufferMakeBytes(&compress, 10 * self->leng_recs + (self->random_access?5*self->row_count:0));
-            if (rc == 0) {
-                ((uint8_t *)buffer->base)[0] = header;
-                vlen_encodeU1(((uint8_t *)buffer->base) + 1, 5, &sz, self->leng_recs);
-                buffer->elem_count = sz + 1;
-
-                rc = serialize_lengths(&compress, 0, self->length, self->leng_recs, &sz);
-                compress.elem_count = sz;
-                if (rc == 0) {
-                    rc = serialize_lengths(&compress, compress.elem_count, self->leng_run, self->leng_recs, &sz);
-                    compress.elem_count += sz;
-		    if(self->random_access && rc == 0) {
-                        rc = serialize_lengths(&compress, compress.elem_count, self->data_offset, self->row_count, &sz);
-                        compress.elem_count += sz;
-		    }
-                }
-            }
-        }
-	break;
-    case 3:
-        rc = KDataBufferResize(buffer, 11);
-        if (rc == 0) {
-            rc = KDataBufferMakeBytes(&compress, 10 * self->leng_recs + 5 * self->data_recs);
-            if (rc == 0) {
-                ((uint8_t *)buffer->base)[0] = header;
-                vlen_encodeU1(((uint8_t *)buffer->base) + 1, 5, &sz, self->leng_recs);
-                buffer->elem_count = sz + 1;
-                vlen_encodeU1(((uint8_t *)buffer->base) + 1 + sz, 5, &sz, self->data_recs);
-                buffer->elem_count += sz;
-                
-                rc = serialize_lengths(&compress, 0, self->length, self->leng_recs, &sz);
-                compress.elem_count = sz;
-                if (rc == 0) {
-                    rc = serialize_lengths(&compress, compress.elem_count, self->leng_run, self->leng_recs, &sz);
-                    compress.elem_count += sz;
-                    if (rc == 0) {
-                        rc = serialize_lengths(&compress, compress.elem_count, self->data_run, self->data_recs, &sz);
-                        compress.elem_count += sz;
-                    }
-                }
-            }
-        }
-        break;
-    }
-    if (rc == 0 && compress.base) {
-        uint64_t hsize = buffer->elem_count;
-        
-        rc = KDataBufferResize(buffer, hsize + compress.elem_count);
-        if (rc == 0) {
-            if (version == 0)
-                memcpy(((uint8_t *)buffer->base) + hsize, compress.base, compress.elem_count);
-            else {
-                z_stream zs;
-                int zr;
-                
-                memset(&zs, 0, sizeof(zs));
-                
-                assert(compress.elem_count >> 32 == 0);
-                
-                zs.next_out = ((Bytef *)buffer->base) + hsize;
-                zs.avail_out = (uInt)compress.elem_count;
-                
-                zs.next_in = compress.base;
-                zs.avail_in = (uInt)compress.elem_count;
-                
-                zr = deflateInit2(&zs, Z_BEST_SPEED, Z_DEFLATED, -15, 9, Z_DEFAULT_STRATEGY);
-                switch (zr) {
-                case Z_OK:
-                    for (; ;) {
-                        zr = deflate(&zs, Z_FINISH);
-                        if (zr == Z_OK) {
-                            unsigned const offset = (unsigned)(zs.next_out - (Bytef *)buffer->base);
-                            rc = KDataBufferResize(buffer, buffer->elem_count * 2);
-                            if (rc)
-                                break;
-                            zs.next_out = ((Bytef *)buffer->base) + offset;
-                            zs.avail_out = (uInt)(buffer->elem_count - offset);
-                        }
-                        else if (zr == Z_STREAM_END) {
-                            KDataBufferResize(buffer, zs.total_out + hsize);
-                            break;
-                        }
-                        else {
-                            rc = RC(rcVDB, rcPagemap, rcWriting, rcParam, rcInvalid);
-                            break;
-                        }
-                    }
-                    deflateEnd(&zs);
-                    break;
-                case Z_MEM_ERROR:
-                    rc = RC(rcVDB, rcPagemap, rcWriting, rcMemory, rcExhausted);
-                    break;
-                default:
-                    rc = RC(rcVDB, rcPagemap, rcWriting, rcParam, rcInvalid);
-                }
-            }
-        }
-    }
-    KDataBufferWhack(&compress);
-    if (rc == 0)
-        *size = buffer->elem_count;
-    
-    return rc;
-}
-
-rc_t PageMapSerialize (const PageMap *self, KDataBuffer *buffer, uint64_t offset, uint64_t *size) {
-    rc_t rc;
-    KDataBuffer temp;
-
-    assert(buffer->elem_bits == 8);
-    assert(buffer->bit_offset == 0);
-    
-    rc = KDataBufferMakeBytes(&temp, 0);
-    if (rc == 0) {
-        uint64_t sz;
-        
-        rc = serialize(self, &temp, &sz);
-        if (rc == 0) {
-            rc = KDataBufferResize(buffer, offset + sz);
-            if (rc == 0)
-                memcpy(&((char *)buffer->base)[offset], temp.base, sz);
-            *size = sz;
-        }
-        KDataBufferWhack(&temp);
-    }
-    return rc;
-}
-
-static
-rc_t PageMapDeserialize_v0(PageMap **lhs, uint8_t const src[], unsigned ssize, row_count_t row_count) {
-    uint8_t variant = src[0] & 3;
-    uint8_t version =src[0] >> 2;
-    unsigned cur = 1;
-    uint64_t row_len;
-    uint64_t data_recs;
-    uint64_t leng_recs;
-    uint64_t sz;
-    bool     random_access=(version==2?true:false);
-    rc_t rc = 0;
-    
-    switch (variant) {
-    case 0:
-        /*
-         variant 0: fixed row length, data_run[..] == 1
-         vlencode(row_length)
-         */
-        rc = vlen_decodeU1(&row_len, &src[cur], ssize - cur, &sz); if (rc) return rc;
-	cur += sz;
-        
-        *lhs = new_StaticPageMap(1, random_access?row_count:1);
-        if (*lhs == NULL)
-            return RC(rcVDB, rcPagemap, rcConstructing, rcMemory, rcExhausted);
-        
-        (**lhs).data_recs = row_count;
-        (**lhs).leng_recs = 1;
-        
-        (**lhs).length[0] = (elem_count_t)row_len;
-        (**lhs).leng_run[0] = row_count;
-
-	if(random_access){
-		(**lhs).data_offset= (**lhs).data_run;
-		rc = deserialize_lengths((**lhs).data_offset, (unsigned)row_count, &src[cur], ssize - cur, &sz);
-	}
-	(**lhs).data_run = 0;
-        break;
-    case 1:
-        /*
-         variant 1: fixed row length, variable data_run
-         vlencode(row_length)
-         vlencode(data_recs)
-         serialize(data_run)
-         */
-        rc = vlen_decodeU1(&row_len, &src[cur], ssize - cur, &sz); if (rc) return rc;
-        cur += sz;
-        
-        rc = vlen_decodeU1(&data_recs, &src[cur], ssize - cur, &sz); if (rc) return rc;
-        cur += sz;
-        
-        *lhs = new_StaticPageMap(1, data_recs);
-        if (*lhs == NULL)
-            return RC(rcVDB, rcPagemap, rcConstructing, rcMemory, rcExhausted);
-        
-        (**lhs).data_recs = data_recs;
-        (**lhs).leng_recs = 1;
-        
-        (**lhs).length[0] = (elem_count_t)row_len;
-        (**lhs).leng_run[0] = row_count;
-        
-        rc = deserialize_lengths((**lhs).data_run, (unsigned)data_recs, &src[cur], ssize - cur, &sz);
-        break;
-    case 2:
-        /*
-         variant 2: variable row length, data_run[..] == 1
-         vlencode(leng_recs)
-         serialize(length)
-         serialize(leng_run)
-         */
-        rc = vlen_decodeU1(&leng_recs, &src[cur], ssize - cur, &sz); if (rc) return rc;
-        cur += sz;
-        
-        *lhs = new_StaticPageMap((unsigned)leng_recs, random_access?row_count:1);
-        if (*lhs == NULL)
-            return RC(rcVDB, rcPagemap, rcConstructing, rcMemory, rcExhausted);
-        
-        (**lhs).data_recs = row_count;
-        (**lhs).leng_recs = leng_recs;
-        
-#if 0  
-        rc = deserialize_lengths((**lhs).length, (unsigned)leng_recs, &src[cur], ssize - cur, &sz);
-        if (rc == 0) {
-            cur += sz;
-            rc = deserialize_lengths((**lhs).leng_run, (unsigned)leng_recs, &src[cur], ssize - cur, &sz);
-        }
-#else /** can use the fact that both length and leng_run a sequentually allocated ***/
-	rc = deserialize_lengths((**lhs).length, (unsigned)(2*leng_recs), &src[cur], ssize - cur, &sz);
-	if(rc == 0 && random_access){
-		cur+=sz;
-		(**lhs).data_offset= (**lhs).data_run;
-		rc = deserialize_lengths((**lhs).data_offset, (unsigned)row_count, &src[cur], ssize - cur, &sz);
-	}
-	(**lhs).data_run = 0;
-		
-#endif
-        break;
-    case 3:
-        /*
-         variant 3: variable row length, variable data_run
-         vlencode(leng_recs)
-         vlencode(data_recs)
-         serialize(length)
-         serialize(leng_run)
-         serialize(data_run)
-         */
-        rc = vlen_decodeU1(&leng_recs, &src[cur], ssize - cur, &sz);  if (rc) return rc;
-        cur += sz;
-        
-        rc = vlen_decodeU1(&data_recs, &src[cur], ssize - cur, &sz);  if (rc) return rc;
-        cur += sz;
-        
-        *lhs = new_StaticPageMap(leng_recs, data_recs);
-        if (*lhs == NULL)
-            return RC(rcVDB, rcPagemap, rcConstructing, rcMemory, rcExhausted);
-        
-        (**lhs).data_recs = data_recs;
-        (**lhs).leng_recs = leng_recs;
-#if 0   
-        rc = deserialize_lengths((**lhs).length, leng_recs, &src[cur], ssize - cur, &sz);
-        if (rc == 0) {
-            cur += sz;
-            rc = deserialize_lengths((**lhs).leng_run, leng_recs, &src[cur], ssize - cur, &sz);
-            if (rc == 0) {
-                cur += sz;
-                rc = deserialize_lengths((*lhs)->data_run, data_recs, &src[cur], ssize - cur, &sz);
-            }
-        }
-#else /** can use the fact that both length and leng_run a sequentually allocated ***/
-	rc = deserialize_lengths((**lhs).length, (unsigned)(2*leng_recs+data_recs), &src[cur], ssize - cur, &sz);
-#endif
-        break;
-     default:
-	rc = RC(rcVDB, rcPagemap, rcConstructing, rcFormat, rcUnrecognized);
-    }
-    (**lhs).random_access = random_access;
-    return rc;
-}
-
-static
-rc_t PageMapDeserialize_v1(PageMap **lhs, const uint8_t *Src, uint64_t ssize, uint32_t row_count) {
-    const uint8_t *src = Src;
-    const uint8_t * const endp = src + ssize;
-    uint8_t variant = *src & 3;
-    uint64_t bsize;
-    uint64_t hsize;
-    uint64_t val;
-    uint64_t sz;
-    rc_t rc = 0;
-    KDataBuffer decompress;
-    z_stream zs;
-    int zr;
-    bool random_access = ((src[0]>>2)==2);
-    
-    switch (variant) {
-    case 0:
-	if(!random_access)
-		return PageMapDeserialize_v0(lhs, src, ssize, row_count);
-	++src;
-	rc = vlen_decodeU1(&val, src, endp - src, &sz);
-	if( rc == 0){
-		src += sz;
-		hsize = src - Src;
-		bsize = 5 * row_count;
-	}
-	break;
-    case 1:
-        ++src;
-        rc = vlen_decodeU1(&val, src, endp - src, &sz);
-        if (rc == 0) {
-            src += sz;
-            rc = vlen_decodeU1(&val, src, endp - src, &sz);
-            if (rc == 0) {
-                src += sz;
-                hsize = src - Src;
-                bsize = 5 * val;
-            }
-        }
-        break;
-    case 2:
-        ++src;
-        rc = vlen_decodeU1(&val, src, endp - src, &sz);
-        if (rc == 0) {
-            src += sz;
-            hsize = src - Src;
-            bsize = 10 * val;
-	    if(random_access){
-		bsize +=  5 * row_count;
-	    }
-        }
-        break;
-    case 3:
-        ++src;
-        rc = vlen_decodeU1(&val, src, endp - src, &sz);
-        if (rc == 0) {
-            src += sz;
-            bsize = 10 * val;
-            rc = vlen_decodeU1(&val, src, endp - src, &sz);
-            if (rc == 0) {
-                src += sz;
-                hsize = src - Src;
-                bsize += 5 * val;
-            }
-        }
-        break;
-    default:
-        return RC(rcVDB, rcPagemap, rcConstructing, rcData, rcInvalid);
-    }
-    if (rc)
-        return rc;
-    
-    rc = KDataBufferMakeBytes(&decompress, hsize + bsize);
-    if (rc)
-        return rc;
-
-    memcpy(decompress.base, Src, hsize);
-    memset(&zs, 0, sizeof(zs));
-    
-    zs.next_in = (Bytef *)src;
-    assert((endp - src) == (uInt)(endp - src));
-    zs.avail_in = (uInt)(endp - src);
-    
-    zs.next_out = ((Bytef *)decompress.base) + hsize;
-    assert(bsize == (uInt)(bsize));
-    zs.avail_out = (uInt)bsize;
-    
-    zr = inflateInit2(&zs, -15);
-    if (zr == Z_OK) {
-        zr = inflate(&zs, Z_FINISH);
-        if (zr != Z_STREAM_END)
-            rc = RC(rcVDB, rcPagemap, rcConstructing, rcData, rcInvalid);
-        inflateEnd(&zs);
-    }
-    else
-        rc = RC(rcVDB, rcPagemap, rcConstructing, rcMemory, rcExhausted);
-    
-    if (rc == 0)
-        rc = PageMapDeserialize_v0(lhs, decompress.base, hsize + zs.total_out, row_count);
-    KDataBufferWhack(&decompress);
-    return rc;
-}
-
-rc_t PageMapDeserialize (PageMap **lhs, const void *src, uint64_t ssize, uint64_t row_count) {
-    rc_t rc;
-
-    if ((uint32_t)row_count != row_count)
-        return RC(rcVDB, rcPagemap, rcConstructing, rcParam, rcTooBig);
-        
-    if (lhs == NULL)
-        return RC(rcVDB, rcPagemap, rcConstructing, rcParam, rcNull);
-    
-    *lhs = NULL;
-    if (src == NULL || ssize == 0)
-        return 0;
-
-    switch (*(const uint8_t *)src >> 2) {
-    case 0:
-        rc = PageMapDeserialize_v0(lhs, src, ssize, (uint32_t)row_count);
-        break;
-    case 1:
-    case 2:
-        rc = PageMapDeserialize_v1(lhs, src, ssize, (uint32_t)row_count);
-        break;
-    default:
-        return RC(rcVDB, rcPagemap, rcConstructing, rcData, rcBadVersion);
-    }
-    if (rc == 0)
-        (**lhs).row_count = (uint32_t)row_count;
-    else
-        PageMapRelease(*lhs);
-    return rc;
-}
-
-static
-rc_t PageMapDestroy(PageMap *that)
-{
-#if PAGEMAP_STATISTICS
-    pm_stats.currentWaste -= (that->reserve_data - that->data_recs) * sizeof(that->data_run[0]) +
-                             (that->reserve_leng - that->leng_recs) * (sizeof(that->leng_run[0]) + sizeof(that->length[0]));
-    pm_stats.currentFootprint -= sizeof(*that) + that->reserve_data * sizeof(that->data_run[0]) +
-                                 that->reserve_leng * (sizeof(that->leng_run[0]) + sizeof(that->length[0]));
-    --pm_stats.alive;
-    if (pm_stats.alive == 0) {
-        fprintf(stderr, 
-                "PM Stats:\n"
-                "Footprint (cur/max): %u/%u\n"
-                "Waste (cur/max): %u/%u\n"
-                "Alive (cur/max): %u/%u\n"
-                "Created (static/fixed/single/total): %u/%u/%u/%u\n"
-                "Grows: %u\n"
-                "Expands (act/calls): %u/%u\n"
-                "Appends: %u\n\n",
-                (unsigned)pm_stats.currentFootprint,
-                (unsigned)pm_stats.maxFootprint,
-                (unsigned)pm_stats.currentWaste,
-                (unsigned)pm_stats.maxWaste,
-                pm_stats.alive,
-                pm_stats.maxAlive,
-                pm_stats.createStatic,
-                pm_stats.createFixedRow,
-                pm_stats.createSingle,
-                pm_stats.create + pm_stats.createStatic + pm_stats.createFixedRow + pm_stats.createSingle,
-                pm_stats.grows,
-                pm_stats.expands,
-                pm_stats.expandCalls,
-                pm_stats.appends
-                );
-    }
-#endif
-    KDataBufferWhack(&that->istorage);
-    KDataBufferWhack(&that->dstorage);
-    KDataBufferWhack(&that->cstorage);
-    free(that);
-    return 0;
-}
-
-rc_t PageMapRelease (const PageMap *self) {
-    if (self) {
-        if (KRefcountDrop(&self->refcount, "PageMap") == krefWhack)
-          return PageMapDestroy((PageMap *)self);
-    }
-    return 0;
-}
-
-rc_t PageMapAddRef (const PageMap *self) {
-    if (self)
-        KRefcountAdd(&self->refcount, "PageMap");
-    return 0;
-}
-
-uint32_t PageMapGetIdxRowInfo (const PageMap *cself, uint32_t idx, uint32_t *starting_element,uint32_t *repeat_count)
-{
-	rc_t rc=0;
-	elem_count_t len;
-    row_count_t data_run = cself->data_run ? cself->data_run[0] : 1;
-    
-	if (idx  < data_run || cself->data_recs == 1) {
-		if (starting_element)
-            *starting_element = 0;
-		if (cself->leng_recs == 0)
-            len = 0;
-		else
-            len = cself->length[0];
-		if (repeat_count)
-            *repeat_count = data_run;
-		return len;
-	} else {
-		rc = PageMapFindRow(cself, idx, starting_element, &len, repeat_count);
-		if (rc)
-            len = 0;
-	}
-	return len;
-}
-
-int PageMapCompare(const PageMap *a, const PageMap *b) {
-    unsigned ai;
-    unsigned bi;
-    unsigned ar; /* runs in a */
-    unsigned br; /* runs in b */
-    
-    if (
-        a == b || (
-        a->leng_recs == b->leng_recs &&
-        a->data_recs == b->data_recs &&
-        memcmp(a->length, b->length, sizeof(a->length[0]) * a->leng_recs) == 0 &&
-        memcmp(a->leng_run, b->leng_run, sizeof(a->leng_run[0]) * a->leng_recs) == 0 &&
-        memcmp(a->data_run, b->data_run, sizeof(a->data_run[0]) * a->data_recs) == 0
-    ))
-        return 2;
-    
-    ai = bi = 0;
-    ar = a->leng_run[0];
-    br = b->leng_run[0];
-    
-    while (ai < a->leng_recs && bi < b->leng_recs) {
-        if (a->length[ai] != b->length[bi])
-            return 0;
-        if (ar < br) {
-            br -= ar;
-            ar = a->leng_run[++ai];
-        }
-        else if (ar == br) {
-            ar = a->leng_run[++ai];
-            br = b->leng_run[++bi];
-        }
-        else {
-            ar -= br;
-            br = b->leng_run[++bi];
-        }
-    }
-    if (ai != a->leng_recs || bi != b->leng_recs)
-        return -1;
-    else
-        return 1;
-}
-
-int PageMapCompareStatic (const PageMap *a, const PageMap *b) {
-    if (
-	  a->data_recs != 1 ||
-	  a->leng_recs != 1 ||
-	  a->leng_run[0] != a->data_run[0]
-    )
-        return -1; /* *a is not static */
-    
-    if (a == b)
-        return 2; /* static and identical */
-
-    if (
-	  b->data_recs != 1 ||
-	  b->leng_recs != 1 ||
-	  b->leng_run[0] != b->data_run[0]
-    )
-        return -1; /* *b is not static */
-    
-    if (a->length[0] == b->length[0] && a->leng_run[0] <= b->leng_run[0])
-        /* static and compatible, but we want to prevent deeper inspection
-         * so we're lying and saying that they are identical */
-        return 2;
-
-    return 0;  /* not same */
-}
-
-rc_t PageMapAppend(PageMap *self, const PageMap *other) {
-    KDataBuffer cstorage;
-    rc_t rc;
-    
-    rc = KDataBufferMake(&cstorage, sizeof(self->length[0]) * 8, (self->leng_recs + other->leng_recs) * 2 + self->data_recs + other->data_recs);
-    if (rc == 0) {
-        uint32_t *const length = cstorage.base;
-        uint32_t *const leng_run = length + self->leng_recs + other->leng_recs;
-        uint32_t *const data_run = leng_run + self->leng_recs + other->leng_recs;
-        
-#if PAGEMAP_STATISTICS
-        ++pm_stats.appends;
-        pm_stats.currentWaste -= (self->reserve_data - self->data_recs) * sizeof(self->data_run[0]) +
-                                 (self->reserve_leng - self->leng_recs) * (sizeof(self->leng_run[0]) + sizeof(self->length[0]));
-        pm_stats.currentFootprint -= self->reserve_data * sizeof(self->data_run[0]) +
-                                     self->reserve_leng * (sizeof(self->leng_run[0]) + sizeof(self->length[0]));
-#endif
-        memcpy(length                  , self->length , self->leng_recs  * sizeof(length[0]));
-        memcpy(length + self->leng_recs, other->length, other->leng_recs * sizeof(length[0]));
-
-        memcpy(leng_run                  , self->leng_run , self->leng_recs  * sizeof(leng_run[0]));
-        memcpy(leng_run + self->leng_recs, other->leng_run, other->leng_recs * sizeof(leng_run[0]));
-        
-        memcpy(data_run                  , self->data_run , self->data_recs  * sizeof(data_run[0]));
-        memcpy(data_run + self->data_recs, other->data_run, other->data_recs * sizeof(data_run[0]));
-        
-        KDataBufferWhack(&self->cstorage);
-        self->cstorage = cstorage;
-
-        self->length = length;
-        self->leng_run = leng_run;
-        self->data_run = data_run;
-        
-        self->leng_recs += other->leng_recs;
-        self->data_recs += other->data_recs;
-        self->row_count += other->row_count;
-        self->reserve_leng = self->leng_recs;
-        self->reserve_data = self->data_recs;
-        
-#if PAGEMAP_STATISTICS
-        pm_stats.currentWaste += (self->reserve_data - self->data_recs) * sizeof(self->data_run[0]) +
-                                 (self->reserve_leng - self->leng_recs) * (sizeof(self->leng_run[0]) + sizeof(self->length[0]));
-        pm_stats.currentFootprint += self->reserve_data * sizeof(self->data_run[0]) +
-                                     self->reserve_leng * (sizeof(self->leng_run[0]) + sizeof(self->length[0]));
-        if (pm_stats.maxFootprint < pm_stats.currentFootprint)
-            pm_stats.maxFootprint = pm_stats.currentFootprint;
-#endif
-        return 0;
-    }
-    return rc;
-}
diff --git a/libs/vdb/page-map.h b/libs/vdb/page-map.h
deleted file mode 100644
index 5b1a739..0000000
--- a/libs/vdb/page-map.h
+++ /dev/null
@@ -1,386 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_page_map_
-#define _h_page_map_
-
-#include <assert.h>
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <klib/data-buffer.h>
-#include <klib/refcount.h>
-
-#if _DEBUGGING
-#define _HEAVY_PAGEMAP_DEBUGGING 0
-#endif
-
-struct KDataBuffer;
-
-typedef uint32_t pm_size_t;
-typedef uint32_t row_count_t;
-typedef uint32_t elem_count_t;
-
-typedef enum {  PM_REGION_EXPAND_UNKNOWN=0,     /** notset **/
-                PM_REGION_EXPAND_FULL,          /** full expansion     - 2 arrays: offset,length**/
-                PM_REGION_EXPAND_SAMELEN,       /** partial expansion  - 1 array: offset **/
-                PM_REGION_EXPAND_EQUIDISTANT,   /** data have same length and always unique - no expansion needed **/
-                PM_REGION_EXPAND_SAMEDATA       /** same data - no expansion needed ***/
-} pm_expand_region_type_t;
-
-typedef struct PageMapRegion {
-	row_count_t	start_row;
-	row_count_t	numrows;
-	elem_count_t	data_offset;/** for unexpanded regions first direct offset into data**/
-				    /** for expanded regions - offset into expanded storage **/
-	elem_count_t	length;	    /** first length of the region ***/
-	uint8_t		type;       /** one of the types from pm_expand_region_type_t*/
-	bool		expanded;   /** if expandable storage is being used ***/
-} PageMapRegion;
-
-
-
-
-typedef struct PageMap {
-    /* memory allocation object for length[], leng_run[], data_run[] */
-    KDataBuffer cstorage;
-
-    /* array of row lengths
-     * has leng_recs elements
-     * is sized to reserve_leng elements
-     * == storage.base
-     */
-    bool   random_access;
-    enum { eBlobPageMapOptimizedNone, eBlobPageMapOptimizedSucceeded, eBlobPageMapOptimizedFailed}  optimized;
-    elem_count_t *length;
-
-    /* array of run lengths of row lengths
-     * has leng_recs elements
-     * is sized to reserve_leng elements
-     * == length + reserve_leng
-     */
-    row_count_t *leng_run;
-
-    /* array of repeat counts of data
-     * has data_recs elements
-     * is sized to reserve_data elements
-     * == leng_run + reserve_leng
-     * OPTIONAL
-     */
-    row_count_t *data_run;
-    /** expanded offsets into data - needed for random access ***/
-    /** only valid when random_access is true **/
-    elem_count_t *data_offset;
-
-/******* DYNAMIC EXPANSION CONTROL *****************/
-    PageMapRegion		*exp_rgn_last;
-    row_count_t			exp_row_last;   /* last row analyzed for region expansion */
-    row_count_t			exp_lr_used;    /* how much leng_run was used from the */
-    pm_size_t			exp_lr_last;	/* index of last leng_run expanded */
-    pm_size_t			exp_dr_last;	/* index of last data_run expanded */
-    pm_size_t			exp_rgn_cnt;    /* current number of expanded regions */
-    elem_count_t		exp_data_offset_last;/* last offset into data */
-    
-
-    KDataBuffer			istorage;	/* binary searchable storage for expansion regions */
-    KDataBuffer			dstorage;	/* storage for expanded data */
-/** LAST SEARCH CONTROL *****/
-    pm_size_t			i_rgn_last; 	/* region index found in previous lookup **/
-    PageMapRegion*		rgn_last; 	/* redundant - region found in previous lookup **/
-
-/****************************/
-
-    pm_size_t leng_recs;     /* number of valid elements in length[] and leng_run[] */
-    pm_size_t data_recs;     /* number of valid elements in data_run[] */
-    pm_size_t reserve_leng;  /* number of allocated elements in length[] and leng_run[] */
-    pm_size_t reserve_data;  /* number of allocated elements in data_run[] */
-    pm_size_t start_valid;   /* the expanded array contains valid data upto start_valid */
-    row_count_t row_count;   /* total number of rows in page map */
-    row_count_t pre_exp_row_count; /* number of rows pre-expanded */
-    KRefcount refcount;
-} PageMap;
-
-
-/* a pessimistic estimate - actual size will *always* be less than or equal */
-size_t PageMapGetMaxBufferSize(const PageMap *self);
-
-rc_t PageMapSerialize(const PageMap *self, struct KDataBuffer *buffer, uint64_t byte_offset, uint64_t *actual_bytes);
-
-rc_t PageMapDeserialize(PageMap **lhs, const void *src, uint64_t src_bytes, uint64_t row_count);
-
-rc_t PageMapRelease(const PageMap *self);
-
-rc_t PageMapAddRef(const PageMap *self);
-
-/*  PageMapGetIdxRowInfo
- *
- *  Get row length and starting element number for a row.
- *  This is a potentially expensive operation; the first time
- *  it is called for any page map, the memory used by the page
- *  map nearly doubles and an index is built on the row length
- *  runs and the data runs.  Subsequent calls are O(N log N).
- *  However, asking for the information about the first row
- *  (i.e. idx = 0) never causes allocation or indexing and is
- *  always O(1).
- *
- *  Params:
- *      self: [IN] the page map
- *      idx:  the row number starting from 0
- *      starting_element: [OUT, OPTIONAL]
- *
- *  Returns:
- *      the length of the row
- *      or 0 if not found
- *      repeat_count - how may times this row is repeated from idx
- */
-uint32_t PageMapGetIdxRowInfo(const PageMap *self, uint32_t idx, uint32_t *starting_element, uint32_t * repeat_count);
-
-rc_t PageMapNew(PageMap **lhs, uint32_t reserve);
-
-rc_t PageMapNewSingle(PageMap **lhs, uint64_t row_count, uint64_t row_length);
-
-rc_t PageMapNewFixedRowLength(PageMap **lhs, uint64_t row_count, uint64_t row_len);
-
-rc_t PageMapToRandomAccess(PageMap **rslt, PageMap * src,uint32_t *data_offset);
-
-uint32_t PageMapFixedRowLength(const PageMap *self);
-
-rc_t	PageMapRowLengthRange(const PageMap *self, elem_count_t *min,elem_count_t *max);
-
-uint32_t PageMapHasSimpleStructure(const PageMap *self);
-
-rc_t PageMapAppendRows(PageMap *self, uint64_t row_length, uint64_t run_length, bool same_data);
-
-#define PageMapAppendRow(SELF, ROW_LENGTH, SAME_DATA) (PageMapAppendRows((SELF), (ROW_LENGTH), 1, SAME_DATA))
-
-/* append some rows of the same data */
-#define PageMapAppendSomeRows(SELF, ROW_LENGTH, RUN_LENGTH) (PageMapAppendRows((SELF), (ROW_LENGTH), (RUN_LENGTH), false))
-
-/* concatenate two page maps */
-rc_t PageMapAppend(PageMap *self, const PageMap *other);
-
-/** Find data using pagemap ***/
-rc_t PageMapFindRow(const PageMap *cself,uint64_t row,uint32_t * data_offset,uint32_t * data_length,uint32_t * repeat_count);
-
-
-/*
- -1: error
- 0: not same
- 1: compatible (i.e. all rows same length)
- else: identical
- */
-int PageMapCompare(const PageMap *a, const PageMap *b);
-/* same but static columns */
-int PageMapCompareStatic(const PageMap *a, const PageMap *b);
-
-typedef struct PageMapIterator PageMapIterator;
-struct PageMapIterator {
-    row_count_t		last_row;
-    row_count_t		cur_row;
-    PageMapRegion**	rgns;	  /** all regions from the pagemap **/
-    pm_size_t		cur_rgn;  /** offset of the current region **/
-    row_count_t 	cur_rgn_row; /** row relative to offset of the region **/
-    elem_count_t	**exp_base; /*** exp buffer ***/
-    row_count_t		repeat_count; /** remaining repeat count **/
-    elem_count_t	static_datalen;
-#if _HEAVY_PAGEMAP_DEBUGGING
-    PageMap *parent;
-#endif
-};
-
-VDB_EXTERN rc_t PageMapNewIterator(const PageMap *self, PageMapIterator *lhs, uint64_t first_row, uint64_t num_rows);
-
-static __inline__ bool PageMapIteratorAdvance(PageMapIterator *self, row_count_t rows)
-{
-    if (self->cur_row + rows < self->last_row) {
-	self->cur_row += rows;
-	self->cur_rgn_row += rows;
-	if(self->repeat_count > rows) self->repeat_count-= rows;
-	else self->repeat_count = 0;
-	if(self->rgns){/** non-static, non simple random access**/
-		while((*self->rgns)[self->cur_rgn].numrows <= self->cur_rgn_row){
-			self->cur_rgn_row -= (*self->rgns)[self->cur_rgn].numrows;
-			self->cur_rgn++;
-		}
-        }
-        return true;
-    }
-    return false;
-}
-
-#define PageMapIteratorNext(SELF) PageMapIteratorAdvance(SELF, 1)
-
-static __inline__ elem_count_t PageMapIteratorDataLength(const PageMapIterator *self)
-{
-    elem_count_t datalen=0;
-    if(self->rgns == NULL) {/* static or simple random-access*/
-	return  self->static_datalen;
-    }
-    switch ((*self->rgns)[self->cur_rgn].type){
-	case PM_REGION_EXPAND_FULL:
-		if((*self->rgns)[self->cur_rgn].expanded){
-			datalen = (*self->exp_base)[(*self->rgns)[self->cur_rgn].data_offset + 2*self->cur_rgn_row];
-		} else {
-			datalen = (*self->rgns)[self->cur_rgn].length;
-		}
-                break;
-	case PM_REGION_EXPAND_SAMELEN:
-	case PM_REGION_EXPAND_EQUIDISTANT:
-	case PM_REGION_EXPAND_SAMEDATA:
-		datalen = (*self->rgns)[self->cur_rgn].length;
-		break;
-	default:
-		assert(0);
-		break;
-   }
-#if _HEAVY_PAGEMAP_DEBUGGING
-   {
-	elem_count_t dtl,dto,dtr;
-	PageMapFindRow(self->parent,self->cur_row,&dto,&dtl,&dtr);
-	assert(dtl==datalen);
-   }
-#endif
-   /*printf("DATA_LEN=%d\n",datalen);*/
-   return datalen;
-}
-
-static __inline__ elem_count_t PageMapIteratorDataOffset(const PageMapIterator *self)
-{
-    elem_count_t dataoff=0;
-    if(self->rgns == NULL){ /** static or simple random **/
-	if(self->exp_base != NULL)  /** simple random access */
-		dataoff= (*self->exp_base)[self->cur_row];
-	return dataoff;
-    }
-    switch ((*self->rgns)[self->cur_rgn].type){
-        case PM_REGION_EXPAND_FULL:
-                if((*self->rgns)[self->cur_rgn].expanded){
-                        dataoff = (*self->exp_base)[(*self->rgns)[self->cur_rgn].data_offset + 2*self->cur_rgn_row + 1];
-                } else {
-                        dataoff = (*self->rgns)[self->cur_rgn].data_offset;
-                }
-                break;
-        case PM_REGION_EXPAND_SAMELEN:
-		if((*self->rgns)[self->cur_rgn].expanded){
-                        dataoff = (*self->exp_base)[(*self->rgns)[self->cur_rgn].data_offset + self->cur_rgn_row];
-                } else {
-                        dataoff = (*self->rgns)[self->cur_rgn].data_offset;
-                }
-                break;
-        case PM_REGION_EXPAND_EQUIDISTANT:
-		dataoff = (*self->rgns)[self->cur_rgn].data_offset + (*self->rgns)[self->cur_rgn].length * self->cur_rgn_row;
-		break;
-        case PM_REGION_EXPAND_SAMEDATA:
-                dataoff = (*self->rgns)[self->cur_rgn].data_offset;
-                break;
-        default:
-                assert(0);
-                break;
-    }
-#if _HEAVY_PAGEMAP_DEBUGGING
-   {
-        elem_count_t dtl,dto,dtr;
-        PageMapFindRow(self->parent,self->cur_row,&dto,&dtl,&dtr);
-        assert(dto==dataoff);
-   }
-#endif
-    return dataoff;
-}
-
-static __inline__ row_count_t PageMapIteratorRepeatCount(const PageMapIterator *cself)
-{
-    assert( cself );
-    if(cself->repeat_count==0){
-	PageMapIterator *self = (PageMapIterator*) cself;
-	if(self->rgns==NULL){ /** must be simple random access **/
-		uint64_t i;
-        assert( ( ( self->exp_base == NULL ) || ( *self->exp_base == NULL ) ) ? self->cur_row+1 >= self->last_row : true );
-		for(i=self->cur_row+1,self->repeat_count=1;
-                    i< self->last_row && (*self->exp_base)[i]==(*self->exp_base)[self->cur_row];
-                    i++,self->repeat_count++){}
-	} else {
-		switch ((*self->rgns)[self->cur_rgn].type){
-		 case PM_REGION_EXPAND_FULL:
-			if((*self->rgns)[self->cur_rgn].expanded){
-				row_count_t i;
-				elem_count_t* base = (*self->exp_base) + (*self->rgns)[self->cur_rgn].data_offset;
-				self->repeat_count = 1;
-				for(i=self->cur_rgn_row+1;i<(*self->rgns)[self->cur_rgn].numrows;i++){
-					if(base[2*self->cur_rgn_row]== base[2*i] && base[2*self->cur_rgn_row+1]== base[2*i+1]) self->repeat_count++;
-					else break;
-				}
-			} else {
-				self->repeat_count =  (*self->rgns)[self->cur_rgn].numrows - self->cur_rgn_row;
-			}
-			break;
-		 case PM_REGION_EXPAND_SAMELEN:
-			if((*self->rgns)[self->cur_rgn].expanded){
-				row_count_t i;
-				elem_count_t* base = (*self->exp_base) + (*self->rgns)[self->cur_rgn].data_offset;
-				self->repeat_count = 1;
-				for(i=self->cur_rgn_row+1;i<(*self->rgns)[self->cur_rgn].numrows;i++){
-					if(base[self->cur_rgn_row] == base[i]) self->repeat_count++;
-					else break;
-				}
-			} else {
-				self->repeat_count = (*self->rgns)[self->cur_rgn].numrows - self->cur_rgn_row;
-			}
-			break;
-		 case PM_REGION_EXPAND_EQUIDISTANT:
-			self->repeat_count = 1;
-			break;
-		 case PM_REGION_EXPAND_SAMEDATA:
-			self->repeat_count =  (*self->rgns)[self->cur_rgn].numrows - self->cur_rgn_row;
-			break;
-		 default:
-			assert(0);
-			break;
-		}
-	}
-    }
-#if _HEAVY_PAGEMAP_DEBUGGING
-   {
-        elem_count_t dtl,dto,dtr;
-        PageMapFindRow(cself->parent,cself->cur_row,&dto,&dtl,&dtr);
-        assert(dtr==cself->repeat_count);
-   }
-#endif
-    return cself->repeat_count;
-}
-
-elem_count_t PageMapLastLength(const PageMap *cself);
-bool PageMapHasRows(const PageMap *self);
-rc_t PageMapExpand(const PageMap *cself, row_count_t upto);
-rc_t PageMapExpandFull(const PageMap *cself);
-rc_t PageMapPreExpandFull(const PageMap *cself, row_count_t upto);
-
-#endif /* _h_page_map_ */
diff --git a/libs/vdb/parameter-read.c b/libs/vdb/parameter-read.c
deleted file mode 100644
index af9621c..0000000
--- a/libs/vdb/parameter-read.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-#include "xform-priv.h"
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/table.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <vdb/vdb-priv.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-static
-rc_t CC parameter_read_func(
-                         void *Self,
-                         const VXformInfo *info,
-                         int64_t row_id,
-                         VRowResult *rslt,
-                         uint32_t argc,
-                         const VRowData argv[]
-) {
-    const KDataBuffer *value = Self;
-    rc_t rc = 0;
-    
-    rslt->data->elem_bits = value->elem_bits;
-    rslt->data->elem_count = 0;
-    rc = KDataBufferResize(rslt->data, value->elem_count);
-    if (rc == 0) {
-        memcpy(rslt->data->base, value->base, KDataBufferBytes(value));
-        rc = KDataBufferCast(rslt->data, rslt->data, rslt->elem_bits, true);
-        if (rc == 0)
-            rslt->elem_count = rslt->data->elem_count;
-    }
-	return rc;
-}
-
-static rc_t get_databuffer( KDataBuffer **rslt, struct VCursorParams const *params, const char *Name, size_t len ) {
-    char name[4096];
-    
-    if (len >= sizeof(name))
-        return RC(rcVDB, rcFunction, rcConstructing, rcName, rcTooLong);
-    
-    memcpy(name, Name, len);
-    name[len] = '\0';
-    
-    return VCursorParamsGet(params, name, rslt);
-}
-
-/* 
- function utf8 parameter:read #1.0 < ascii name, * bool deterministic > ();
- */
-VTRANSFACT_BUILTIN_IMPL(parameter_read, 1, 0, 0)
-    (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp
-) {
-    rc_t rc;
-    KDataBuffer *value;
-    bool deterministic = true;
-    
-    if (cp->argc > 1)
-        deterministic = cp->argv[1].data.b[0];
-
-    rc = get_databuffer(&value, info->parms, cp->argv[0].data.ascii, cp->argv[0].count);
-    if (rc == 0) {
-        rslt->self = value;
-        
-        rslt->variant = deterministic ? vftRow : vftNonDetRow;
-        rslt->u.ndf = parameter_read_func;
-    }
-
-	return rc;
-}
diff --git a/libs/vdb/phys-cmn.c b/libs/vdb/phys-cmn.c
deleted file mode 100644
index e074ed7..0000000
--- a/libs/vdb/phys-cmn.c
+++ /dev/null
@@ -1,784 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define KONST const
-#include "phys-priv.h"
-#include "schema-parse.h"
-#include "schema-priv.h"
-#include "schema-expr.h"
-#include "table-priv.h"
-#include "cursor-priv.h"
-#include "prod-priv.h"
-#include "blob-priv.h"
-#undef KONST
-
-#include <vdb/cursor.h>
-#include <kdb/column.h>
-#include <kdb/meta.h>
-#include <klib/symbol.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <endian.h>
-
-
-#define BLOB_VALIDATION 1
-
-/*--------------------------------------------------------------------------
- * KMDataNode
- */
-
-
-/* Addr
- *  reach into node and get address
- *  returns raw pointer and node size
- */
-rc_t CC KMDataNodeAddr ( const KMDataNode *self,
-    const void **addr, size_t *size );
-
-
-/*--------------------------------------------------------------------------
- * VPhysical
- */
-
-/* Destroy
- */
-void VPhysicalDestroy ( VPhysical *self )
-{
-
-#if PROD_REFCOUNT && ! PROD_ALL_IN_CURSOR
-    PROD_TRACK_REFCOUNT(VProductionRelease, self->out);
-    VProductionRelease ( self -> out, NULL );
-    PROD_TRACK_REFCOUNT(VProductionRelease, self->b2p);
-    VProductionRelease ( self -> b2p, NULL );
-    PROD_TRACK_REFCOUNT(VProductionRelease, self->b2s);
-    VProductionRelease ( self -> b2s, NULL ); 
-    PROD_TRACK_REFCOUNT(VProductionRelease, self->in);
-    VProductionRelease ( self -> in, NULL );
-#endif
-
-    KDataBufferWhack ( & self -> srow );
-
-    SExpressionWhack ( self -> enc );
-
-    KMDataNodeRelease ( self -> knode );
-
-    KMetadataRelease ( self -> meta );
-    KColumnRelease ( self -> kcol );
-    
-    free ( self );
-}
-
-/* Make
- */
-rc_t VPhysicalMake ( VPhysical **physp, const VCursor *curs, const SPhysMember *smbr )
-{
-    VPhysical *phys = calloc ( 1, sizeof * phys );
-
-    if ( phys == NULL )
-        return RC ( rcVDB, rcColumn, rcConstructing, rcMemory, rcExhausted );
-
-    phys -> curs = curs;
-    phys -> smbr = smbr;
-
-    * physp = phys;
-    return 0;
-}
-
-/* FinishKColumn
- */
-
-#if 0
-#include <stdio.h>
-static
-rc_t pstdout ( void *ignore, const void *buffer, size_t bsize )
-{
-    fwrite ( buffer, 1, bsize, stdout );
-    return 0;
-}
-#endif
-
-static rc_t VPhysicalLazySetRange(VPhysical *self)
-{
-    if(self->kstart_id < 0 || self -> kstop_id < self -> kstart_id) {
-	uint64_t count;
-	rc_t rc = KColumnIdRange ( self -> kcol, & self -> kstart_id, & count );
-	self -> kstop_id = self -> kstart_id + count - 1;
-	return rc;
-    }
-    return 0;
-}
-
-rc_t VPhysicalFinishKColumn ( VPhysical *self, VSchema *schema, const SPhysMember *smbr )
-{
-    rc_t rc = 0;
-
-    /* lazy settings .. to be set when needed */
-    self -> kstart_id = 1;
-    self -> kstop_id  = 0;
-
-    if ( self -> meta == NULL )
-    {
-        /* bring over "no_hdr" from SPhysical */
-        self -> no_hdr = ( ( const SPhysEncExpr* ) smbr -> type ) -> phys -> no_hdr;
-    }
-    else
-    {
-        /* read in metadata */
-        VTypedecl td;
-        rc = VPhysicalLoadMetadata ( self, & td, schema );
-        /*VSchemaDump ( schema, sdmPrint, NULL, pstdout, NULL );*/
-        if ( rc == 0 )
-        {
-            /* if member type is unknown, reset to actual type */
-            if ( smbr -> td . type_id == 0 )
-            {
-                /* this member was introduced into cursor schema
-                   by the function VCursorSupplementPhysical with
-                   an unknown type - i.e. the schema compiler will
-                   not recognize "any" as a member type. essentially
-                   the member type setting was delayed until now */
-                ( ( SPhysMember* ) smbr ) -> td = td;
-            }
-
-            /* validate that the physical column matches
-               the schema member declaration type */
-            else if ( ! VTypedeclCommonAncestor ( & td, schema, & smbr -> td, NULL, NULL ) )
-            {
-                rc = RC ( rcVDB, rcColumn, rcLoading, rcType, rcInconsistent );
-                PLOGERR ( klogInt, ( klogInt, rc, "inconsistent schema and actual types for column '$(name)'"
-                                     , "name=%.*s"
-                                     , ( int ) smbr -> name -> name . size
-                                     , smbr -> name -> name . addr ));
-            }
-        }
-    }
-
-    return rc;
- }
-
-/* FinishStatic
- */
-rc_t VPhysicalFinishStatic ( VPhysical *self, const VSchema *schema, const SPhysMember *smbr )
-{
-    /* see if data node actually exists */
-    const KMDataNode *node;
-    rc_t rc = KMDataNodeOpenNodeRead ( self -> knode, & node, "row" );
-    if ( rc  != 0 )
-        return rc;
-
-    KMDataNodeRelease ( node );
-
-    /* determine id range */
-    rc = KMDataNodeOpenNodeRead ( self -> knode, & node, "start_id" );
-    if ( rc == 0 )
-    {
-        /* modern static column */
-        rc = KMDataNodeReadAsI64 ( node, & self -> sstart_id );
-        KMDataNodeRelease ( node );
-        if ( rc == 0 )
-        {
-            rc = KMDataNodeOpenNodeRead ( self -> knode, & node, "row_count" );
-            if ( rc == 0 )
-            {
-                uint64_t row_count;
-                
-                rc = KMDataNodeReadAsU64 ( node, & row_count );
-                KMDataNodeRelease ( node );
-                assert(row_count != 0);
-                self -> sstop_id = self -> sstart_id + row_count - 1;
-            }
-        }
-    }
-    else if ( GetRCState ( rc ) == rcNotFound )
-    {
-        /* get the table metadata */
-        const KMetadata *tmeta = self -> curs -> tbl -> meta;
-
-        /* original static column with no range */
-        self -> sstart_id = 1;
-
-        /* work a little harder to correct this problem */
-        rc = KMetadataGetSequence ( tmeta, "spot", & self -> sstop_id );
-        if ( rc != 0 )
-            rc = KMetadataGetSequence ( tmeta, ".", & self -> sstop_id );
-        if ( rc != 0 )
-        {
-#if 0
-            /* set to infinite range */
-            self -> sstart_id <<= 63;
-            self -> sstop_id = ~ self -> sstart_id;
-#else
-            /* set to single row */
-            self -> sstart_id = 1;
-            self -> sstop_id = 1;
-#endif
-            rc = 0;
-        }
-    }
-
-    if ( rc == 0 )
-    {
-        size_t size;
-        char type_expr [ 256 ];
-
-        /* read column type */
-        rc = KMDataNodeReadAttr ( self -> knode, "type",
-            type_expr, sizeof type_expr, & size );
-        if ( rc == 0 )
-        {
-            VTypedecl td;
-
-            /* resolve type */
-            rc = VSchemaResolveTypedecl ( schema, & td, "%s", type_expr );
-            if ( rc == 0 )
-            {
-                /* if member type is unknown, reset to actual type */
-                if ( smbr -> td . type_id == 0 )
-                {
-                    /* this member was introduced into cursor schema
-                       by the function VCursorSupplementPhysical with
-                       an unknown type - i.e. the schema compiler will
-                       not recognize "any" as a member type. essentially
-                       the member type setting was delayed until now */
-                    ( ( SPhysMember* ) smbr ) -> td = td;
-                }
-
-                /* validate that the physical column matches
-                   the schema member declaration type */
-                else if ( ! VTypedeclCommonAncestor ( & td, schema, & smbr -> td, NULL, NULL ) )
-                {
-                    rc = RC ( rcVDB, rcColumn, rcLoading, rcType, rcInconsistent );
-                    PLOGERR ( klogInt, ( klogInt, rc, "inconsistent schema and actual types for static column '$(name)'"
-                               , "name=%.*s"
-                               , ( int ) smbr -> name -> name . size
-                               , smbr -> name -> name . addr ));
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/* Open
- *  open existing columns
- *  load schema definitions
- */
-rc_t VPhysicalOpenRead ( VPhysical *self, VSchema *schema, const VTable *tbl )
-{
-    rc_t rc;
-
-    /* physical member name from schema */
-    const SPhysMember *smbr = self -> smbr;
-    const KSymbol *name = smbr -> name;
-
-    /* mark physical as read-only */
-    self -> read_only = true;
-
-    /* open column for update */
-    rc = KTableOpenColumnRead ( tbl -> ktbl, & self -> kcol,
-        "%.*s", ( int ) name -> name . size - 1, name -> name . addr + 1 );
-    if ( rc == 0 )
-    { 
-        /* open its metadata */
-        rc = KColumnOpenMetadataRead ( self -> kcol, & self -> meta );
-        if ( rc == 0 || GetRCState ( rc ) == rcNotFound )
-        {
-            /* finish off common initialization */
-            rc = VPhysicalFinishKColumn ( self, schema, smbr );
-        }
-    }
-
-    /* it's okay if a column doesn't exist - it may exist as a static */
-    else if ( GetRCState ( rc ) == rcNotFound )
-    {
-        rc = 0;
-    }
-
-    if ( rc == 0 && self -> kcol == NULL )
-    {
-        /* must have static col parent node */
-        if ( tbl -> col_node == NULL )
-            rc = RC ( rcVDB, rcTable, rcOpening, rcColumn, rcNotFound );
-        else
-        {
-            /* look for static */
-            const KMDataNode *node;
-            rc = KMDataNodeOpenNodeRead ( tbl -> col_node, & node,
-                "%.*s", ( int ) name -> name . size - 1, name -> name . addr + 1 );
-            if ( rc == 0 )
-            {
-                self -> knode = node;
-
-                /* finish off common initialization */
-                rc = VPhysicalFinishStatic ( self, schema, smbr );
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* ReadKColumn
- *  read a raw blob from kcolumn
- */
-static
-rc_t VPhysicalReadKColumn ( VPhysical *self, VBlob **vblob, int64_t id, uint32_t elem_bits )
-{
-    rc_t rc;
-    VBlob *blob;
-    const KColumnBlob *kblob;
-
-    rc = VPhysicalLazySetRange(self);
-    if( rc) return rc;
-    /* check id against column contents */
-    if ( self -> kcol == NULL ||
-         id < self -> kstart_id || id > self -> kstop_id )
-    {
-        * vblob = NULL;
-        return RC ( rcVDB, rcColumn, rcReading, rcRow, rcNotFound );
-    }
-
-#if PROD_CACHE
-    /* check for recently written cache contents */
-    if ( self -> b2s != NULL && self -> b2s -> cache [ 0 ] != NULL )
-    {
-        VProduction *b2s = self -> b2s;
-
-        int i;
-        for ( i = 0; i < PROD_CACHE; ++ i )
-        {
-            blob = b2s -> cache [ i ];
-            if ( id >= blob -> start_id && id <= blob -> stop_id )
-            {
-                * vblob = blob;
-                rc = VBlobAddRef ( blob );
-                if ( rc != 0 )
-                    return rc;
-
-                TRACK_BLOB ( VBlobAddRef, blob );
-#if PROD_CACHE > 1
-                /* MRU cache */
-                if ( i > 0 )
-                {
-                    do
-                        b2s -> cache [ i ] = b2s -> cache [ i - 1 ];
-                    while ( -- i > 0 );
-                    b2s -> cache [ 0 ] = blob;
-                }
-#endif
-                return 0;
-            }
-        }
-    }
-#endif
-
-    /* find blob in KColumn
-       TBD - handle potential merge/update later */
-    rc = KColumnOpenBlobRead ( self -> kcol, & kblob, id );
-    if ( rc == 0 )
-    {
-        /* get blob id range */
-        uint32_t count;
-        int64_t start_id;
-
-        rc = KColumnBlobIdRange ( kblob, & start_id, & count );
-        if ( rc == 0 )
-        {
-            /* get blob size */
-            size_t num_read, remaining;
-
-#if BLOB_VALIDATION
-            KDataBuffer whole_blob;
-            KColumnBlobCSData cs_data;
-            bool validate_this_blob = self -> curs -> tbl -> blob_validation;
-
-            if ( rc == 0 && validate_this_blob )
-            {
-                rc = KColumnBlobReadAll ( kblob, & whole_blob, & cs_data, sizeof cs_data );
-                /* simulate the results of next read */
-                num_read = 0;
-                remaining = KDataBufferBytes ( & whole_blob );
-            }
-            else if ( rc == 0 && !validate_this_blob )
-#endif
-                rc = KColumnBlobRead ( kblob, 0, NULL, 0, & num_read, & remaining );
-
-            if ( rc == 0 )
-#if BLOB_VALIDATION
-                if ( validate_this_blob )
-                    rc = KColumnBlobValidateBuffer ( kblob, & whole_blob, & cs_data, sizeof cs_data );
-            if ( rc == 0 )
-#endif
-
-            {
-                KDataBuffer buffer;
-
-                /* fabricate "stop_id" */
-                int64_t stop_id = start_id + count - 1;
-
-                /* if the encoding was marked __no_header */
-                if ( self -> no_hdr )
-                    num_read = 2;
-
-#if BLOB_VALIDATION
-                /* if already have a header, just steal the buffer */
-                else if ( validate_this_blob )
-                {
-                    buffer = whole_blob;
-                    memset ( & whole_blob, 0, sizeof whole_blob );
-                }
-
-                /* test again to see if the buffer should be made */
-                if ( self -> no_hdr || !validate_this_blob )
-#endif
-                /* create data buffer */
-                rc = KDataBufferMakeBytes ( & buffer, num_read + remaining );
-                if ( rc == 0 )
-                {
-                    /* read entire blob */
-                    uint8_t *p = buffer . base;
-#if BLOB_VALIDATION
-                    if ( validate_this_blob )
-                    {
-                        if ( self -> no_hdr )
-                            memcpy ( & p [ num_read ], whole_blob . base, remaining );
-                    }
-                    else
-#endif
-                    rc = KColumnBlobRead ( kblob, 0,
-                        & p [ num_read ], remaining, & num_read, & remaining );
-
-                    if ( rc == 0 )
-                    {
-                        if ( self -> no_hdr )
-                        {
-                            /* create fake v1 header byte with fixed row-length:
-                               000ooobb where "o" is offset ( 0 ), and
-                               "b" is byte order ( always little-endian ) */
-                            p [ 0 ] = ( uint8_t ) vboLittleEndian;
-                            p [ 1 ] = 0;
-                        }
-
-                        /* create a proper blob */
-                        rc = VBlobNew ( vblob, start_id, stop_id, "readkcolumn" );
-                        TRACK_BLOB (VBlobNew, *vblob);
-                        if ( rc == 0 )
-                        {
-                            rc = KDataBufferSub ( & buffer, & ( * vblob ) -> data, 0, UINT64_MAX );
-                            assert ( rc == 0 );
-                        }
-                    }
-
-                    KDataBufferWhack ( & buffer );
-                }
-            }
-
-#if BLOB_VALIDATION
-            if ( validate_this_blob )
-                KDataBufferWhack ( & whole_blob );
-#endif
-        }
-
-        KColumnBlobRelease ( kblob );
-    }
-
-    return rc;
-}
-
-/* Read
- *  read a blob from static data or decoding chain
- */
-static
-rc_t VPhysicalReadStatic ( VPhysical *self, VBlob **vblob, int64_t id, uint32_t elem_bits )
-{
-    bool reversed;
-    rc_t rc = KMDataNodeByteOrder ( self -> knode, & reversed );
-    if ( rc == 0 )
-    {
-        const KMDataNode *row;
-
-        /* detect non-native byte-order */
-        VByteOrder byte_order = vboNative;
-        if ( reversed )
-        {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-            byte_order = vboBigEndian;
-#else
-            byte_order = vboLittleEndian;
-#endif
-        }
-
-        /* open sub-node for row */
-        rc = KMDataNodeOpenNodeRead ( self -> knode, & row, "row" );
-        if ( rc == 0 )
-        {
-            /* get raw pointer and size in bytes */
-            size_t bytes;
-            const void *base;
-            rc = KMDataNodeAddr ( row, & base, & bytes );
-            if ( rc == 0 )
-            {
-                uint64_t row_bits;
-
-                /* if there's a "size" node, read size in bits */
-                const KMDataNode *size;
-                rc = KMDataNodeOpenNodeRead ( self -> knode, & size, "size" );
-                if ( rc == 0 )
-                {
-                    rc = KMDataNodeReadAsU64 ( size, & row_bits );
-                    KMDataNodeRelease ( size );
-                }
-                else if ( GetRCState ( rc ) == rcNotFound )
-                {
-                    row_bits = bytes << 3;
-                    rc = 0;
-                }
-
-                /* check that the row length is an integral number of elements */
-                assert ( elem_bits != 0 );
-                if ( rc == 0 && row_bits % elem_bits != 0 )
-                    rc = RC ( rcVDB, rcColumn, rcReading, rcRow, rcCorrupt );
-
-                /* go forth */
-                if ( rc == 0 )
-                {
-                    KDataBuffer buffer;
-                    rc = KDataBufferMake ( & buffer, elem_bits, ( uint32_t ) ( row_bits / elem_bits ) );
-                    if ( rc == 0 )
-                    {
-                        int64_t sstart_id = self -> sstart_id;
-                        int64_t sstop_id = self -> sstop_id;
-
-                        /* copy out single row */
-                        memcpy ( buffer . base, base, bytes );
-                        self->fixed_len = buffer.elem_count;
-
-                        /* limit row range */
-                        if ( ( ( sstop_id - sstart_id ) >> 30 ) != 0 )
-                        {
-                            sstart_id  =   ((id-1) &  ~0x1fffffffUL ) + 1;  /** Truncate to the nearest 1/2 billion; making sure that id is in the middle of 1 billion max window**/
-                            if ( ( ( sstop_id - sstart_id ) >> 30 ) != 0 ) /** still not enough ***/
-                                sstop_id = sstart_id + 0x40000000UL ; /** leave only 1 billion */
-                        }
-
-                        rc = VBlobCreateFromSingleRow ( vblob,
-                            sstart_id, sstop_id, & buffer, byte_order );
-                        KDataBufferWhack( &buffer );
-                    }
-                }
-            }
-
-            KMDataNodeRelease ( row );
-        }
-    }
-
-    return rc;
-}
-
-rc_t VPhysicalReadBlob ( VPhysical *self, VBlob **vblob, int64_t id, uint32_t elem_bits )
-{
-    rc_t rc;
-
-    /* check for hit on static guy */
-    if ( self -> knode != NULL &&
-         id >= self -> sstart_id && id <= self -> sstop_id )
-    {
-        return VPhysicalReadStatic ( self, vblob, id, elem_bits );
-    }
-
-    /* need to read from kcolumn path */
-    rc = VProductionReadBlob ( self -> b2p, vblob, id , 1, NULL);
-	if ( rc == 0 )
-    {
-	    if((*vblob)->pm==NULL)
-        {
-            rc = PageMapProcessGetPagemap(&self->curs->pmpr,&(*vblob)->pm);
-	    }
-    }
-
-	return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * VPhysicalProd
- */
-
-rc_t VPhysicalProdMake ( VProduction **prodp, Vector *owned,
-    struct VCursor *curs, VPhysical *phys, int sub, const char *name,
-    const VFormatdecl *fd, const VTypedesc *desc )
-{
-#define PHYSPROD_INDEX_OFFSET 1000000000
-    VPhysicalProd *prod;
-    rc_t rc = VProductionMake ( prodp, owned, sizeof * prod,
-        prodPhysical, sub, name, fd, desc, NULL, chainDecoding );
-    if ( rc == 0 )
-    {
-        prod = ( VPhysicalProd* ) * prodp;
-
-        /* this class only knows how to redirect messages to VPhysical */
-        prod -> phys = phys;
-	if(sub == prodPhysicalOut){
-		(*prodp) -> cctx.cache   = curs->blob_mru_cache;
-		(*prodp) -> cctx.col_idx = PHYSPROD_INDEX_OFFSET + (++curs -> phys_cnt);
-	}
-    }
-    return rc;
-}
-
-
-void VPhysicalProdDestroy ( VPhysicalProd *self )
-{
-}
-
-
-/* Read
- */
-rc_t VPhysicalProdRead ( VPhysicalProd *self, VBlob **vblob, int64_t id, uint32_t cnt )
-{
-    uint32_t elem_bits;
-
-    if ( self == NULL )
-        return RC ( rcVDB, rcProduction, rcReading, rcSelf, rcNull );
-    if ( self -> phys == NULL )
-        return RC ( rcVDB, rcColumn, rcReading, rcSelf, rcNull );
-
-    elem_bits = VTypedescSizeof ( & self -> dad . desc );
-
-    switch ( self -> dad . sub )
-    {
-    case prodPhysicalOut:
-        return VPhysicalRead ( self -> phys, vblob, id, cnt, elem_bits );
-    case prodPhysicalKCol:
-        return VPhysicalReadKColumn ( self -> phys, vblob, id, elem_bits );
-    }
-
-    return RC ( rcVDB, rcProduction, rcReading, rcType, rcInvalid );
-}
-
-uint32_t VPhysicalProdFixedRowLength ( const VPhysicalProd *Self, int64_t row_id ) {
-    const VPhysical *self;
-    
-    if ( Self == NULL )
-        return 0;
-    self = Self->phys;
-    if ( self == NULL )
-        return 0;
-    return self->fixed_len;
-}
-
-rc_t VPhysicalProdColumnIdRange ( const VPhysicalProd *Self,
-                               int64_t *first, int64_t *last )
-{
-    const VPhysical *self;
-    
-    if ( Self == NULL )
-        return RC ( rcVDB, rcProduction, rcReading, rcSelf, rcNull );
-
-    self = Self->phys;
-    if ( self == NULL )
-        return RC ( rcVDB, rcColumn, rcReading, rcSelf, rcNull );
-    
-    if ( self -> knode != NULL )
-    {
-        *first = self->sstart_id;
-        *last  = self->sstop_id;
-        return 0;
-    }
-
-    if ( self -> kcol != NULL )
-    {
-        rc_t rc = VPhysicalLazySetRange ( ( VPhysical * ) self );
-        if ( rc == 0 )
-        {
-            *first = self->kstart_id;
-            *last  = self->kstop_id;
-        }
-        return rc;
-    }
-
-    return RC ( rcVDB, rcColumn, rcReading, rcRange, rcEmpty );
-}
-
-
-/* IsStatic
- *  is this a static column
- */
-rc_t VPhysicalIsStatic ( const VPhysical *self, bool *is_static )
-{
-    assert ( is_static != NULL );
-
-    if ( self == NULL )
-    {
-        * is_static = false;
-        return RC ( rcVDB, rcColumn, rcAccessing, rcSelf, rcNull );
-    }
-
-    * is_static = self -> knode != NULL;
-    return 0;
-}
-
-/* GetKColumn
- *  try to get a KColumn,
- *  and if that fails, indicate whether the column is static
- */
-rc_t VPhysicalGetKColumn ( const VPhysical * self, struct KColumn ** kcol, bool * is_static )
-{
-    assert ( kcol != NULL );
-    assert ( is_static != NULL );
-
-    if ( self == NULL )
-    {
-        * kcol = NULL;
-        * is_static = false;
-        return RC ( rcVDB, rcColumn, rcAccessing, rcSelf, rcNull );
-    }
-
-    if ( self -> kcol != NULL )
-    {
-        rc_t rc = KColumnAddRef ( self -> kcol );
-        if ( rc == 0 )
-            * kcol = ( KColumn * ) self -> kcol;
-        return rc;
-    }
-
-    if ( self -> knode != NULL )
-    {
-        * is_static = true;
-        return SILENT_RC ( rcVDB, rcColumn, rcAccessing, rcType, rcIncorrect );
-    }
-
-    return RC ( rcVDB, rcColumn, rcAccessing, rcColumn, rcNotOpen );
-}
diff --git a/libs/vdb/phys-load.c b/libs/vdb/phys-load.c
deleted file mode 100644
index 2f22cb4..0000000
--- a/libs/vdb/phys-load.c
+++ /dev/null
@@ -1,330 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-
-#define KONST const
-#include "phys-priv.h"
-#include "schema-parse.h"
-#include "schema-priv.h"
-#include "schema-expr.h"
-#include "cursor-priv.h"
-#include "prod-priv.h"
-#undef KONST
-
-#include <vdb/cursor.h>
-#include <kdb/column.h>
-#include <kdb/meta.h>
-#include <klib/symbol.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-#define ALLOW_V1_UPDATE 0
-
-/*--------------------------------------------------------------------------
- * VPhysical
- */
-
-/* LoadSchema
- *  looks in metadata for stored schema
- */
-static
-rc_t CC VPhysicalLoadV1Schema ( VPhysical *self,
-    VTypedecl *td, VSchema *schema, const KMDataNode *node )
-{
-    rc_t rc;
-
-    KMDataNodeSchemaFillData pb;
-    pb . node = node;
-    pb . pos = 0;
-    pb . add_v0 = true;
-
-    /* add stored declaration to cursor schema */
-    rc = VSchemaParseTextCallback ( schema,
-        "VPhysicalLoadV1Schema", KMDataNodeFillSchema, & pb );
-   if ( rc == 0 )
-    {
-        size_t size;
-        char type_expr [ 256 ];
-
-        /* retrieve and resolve "type" attribute */
-        rc = KMDataNodeReadAttr ( node, "type",
-            type_expr, sizeof type_expr, & size );
-        if ( rc == 0 )
-            rc = VSchemaResolveTypedecl ( schema, td, "%s", type_expr );
-
-        /* if a decoding schema exists */
-        if ( rc == 0 && pb . pos != 0 )
-        {
-            char sphysical_name [ 512 ];
-
-            /* preserve schema function expression */
-            size_t decoding_xsize;
-            char decoding_expr [ 256 ];
-            rc = KMDataNodeReadAttr ( node, "schema",
-                decoding_expr, sizeof decoding_expr, & decoding_xsize );
-            if ( rc == 0 )
-            {
-                /* look for "encoding" */
-                const KMDataNode *enc;
-                rc = KMetadataOpenNodeRead ( self -> meta, & enc, "encoding" );
-                if ( rc == 0 )
-                {
-#if ALLOW_V1_UPDATE
-                    if ( ! self -> read_only )
-                    {
-                        /* add stored declaration to cursor schema */
-                        pb . node = enc;
-                        pb . pos = 0;
-                        pb . add_v0 = true;
-                        rc = VSchemaParseTextCallback ( schema,
-                            "VPhysicalLoadV1Schema", KMDataNodeFillSchema, & pb );
-                    }
-                    if ( rc == 0 )
-#endif
-                    {
-                        /* preserve schema function expression */
-                        size_t encoding_xsize;
-                        char encoding_expr [ 256 ], enc_type [ 256 ];
-                        rc = KMDataNodeReadAttr ( enc, "schema",
-                            encoding_expr, sizeof encoding_expr, & encoding_xsize );
-                        if ( rc == 0 )
-                        {
-                            rc = KMDataNodeReadAttr ( enc, "type",
-                                enc_type, sizeof enc_type, & size );
-                        }
-                        if ( rc == 0 )
-                        {
-#if ALLOW_V1_UPDATE
-                            if ( self -> read_only )
-                            {
-#endif
-                                /* build sphysical name */
-                                sprintf ( sphysical_name, "%s_only", decoding_expr );
-
-                                /* build physical decl */
-                                pb . pos = sprintf ( pb . buff, "version 1;"
-                                                     "physical %s %s:phys#1"
-                                                     "{decode{%s k=@;return %s(k);}}"
-                                                     , type_expr
-                                                     , sphysical_name
-                                                     , enc_type
-                                                     , decoding_expr
-                                    );
-#if ALLOW_V1_UPDATE
-                            }
-                            else
-                            {
-                                /* strip off common namespace */
-                                size_t i, ns_size;
-                                string_match ( decoding_expr, decoding_xsize,
-                                    encoding_expr, encoding_xsize, -1, & ns_size );
-                                if ( ns_size != 0 )
-                                {
-                                    char *p = string_rchr ( decoding_expr, ns_size, ':' );
-                                    ns_size = ( p == NULL ) ? 0U : ( uint32_t ) ( p - decoding_expr ) + 1U;
-                                }
-
-                                /* build sphysical name */
-                                sprintf ( sphysical_name, "%s_%s", decoding_expr, & encoding_expr [ ns_size ] );
-                                for ( i = ns_size; sphysical_name [ i ] != 0; ++ i )
-                                {
-                                    if ( sphysical_name [ i ] == ':' )
-                                        sphysical_name [ i ] = '_';
-                                }
-
-                                /* build physical decl */
-                                pb . pos = sprintf ( pb . buff, "version 1;"
-                                                     "physical %s %s:phys#1"
-                                                     "{encode{return %s(@);}"
-                                                     "decode{%s k=@;return %s(k);}}"
-                                                     , type_expr
-                                                     , sphysical_name
-                                                     , encoding_expr
-                                                     , enc_type
-                                                     , decoding_expr
-                                    );
-                            }
-#endif
-                        }
-                    }
-
-                    KMDataNodeRelease ( enc );
-                }
-                else if ( GetRCState ( rc ) == rcNotFound )
-                {
-                    /* build sphysical name */
-                    sprintf ( sphysical_name, "%s_only", decoding_expr );
-
-                    /* build decode-only physical decl */
-                    pb . pos = sprintf ( pb . buff, "version 1;"
-                                         "physical %s %s:phys#1"
-                                         "{decode{opaque k=@;return %s(k);}}"
-                                         , type_expr
-                                         , sphysical_name
-                                         , decoding_expr
-                        );
-                    rc = 0;
-                }
-                if ( rc == 0 )
-                {
-                    /* parse synthesized schema into cursor VSchema */
-                    rc = VSchemaParseText ( schema,
-                        "VPhysicalLoadV1Schema", pb . buff, pb . pos );
-                    if ( rc == 0 )
-                    {
-                        VTypedecl etd;
-
-                        /* create a new expression object */
-                        sprintf ( pb . buff, "%s:phys#1", sphysical_name );
-                        rc = VSchemaImplicitPhysEncExpr ( schema, & etd,
-                            & self -> enc, pb . buff, "VPhysicalLoadV1Schema" );
-                        if ( rc != 0 )
-                        {
-                            PLOGERR ( klogInt, ( klogInt, rc, "failed to establish column type from '$(expr)'",
-                                       "expr=%s", pb . buff ));
-                        }
-                        else if ( self -> smbr != NULL && self -> smbr -> type == NULL )
-                        {
-                            /* back-patch schema */
-                            ( ( SPhysMember* ) self -> smbr ) -> type = self -> enc;
-                            atomic32_inc ( & ( ( SExpression* ) self -> enc ) -> refcount );
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    KMDataNodeRelease ( node );
-    return rc;
-}
-
-static
-rc_t CC VPhysicalLoadSchema ( VPhysical *self,
-    VTypedecl *td, VSchema *schema, const KMDataNode *node )
-{
-    rc_t rc;
-
-    KMDataNodeSchemaFillData pb;
-    pb . node = node;
-    pb . pos = 0;
-    pb . add_v0 = false;
-
-    /* add stored declaration to cursor schema */
-    rc = VSchemaParseTextCallback ( schema,
-        "VPhysicalLoadSchema", KMDataNodeFillSchema, & pb );
-    if ( rc == 0 )
-    {
-        /* retrieve fully-resolved type attribute */
-        rc = KMDataNodeReadAttr ( node, "type",
-            pb . buff, sizeof pb . buff, & pb . pos );
-        if ( rc == 0 )
-            rc = VSchemaResolveTypedecl ( schema, td, "%s", pb . buff );
-        if ( rc == 0 )
-        {
-            /* get encoding expression */
-            rc = KMDataNodeReadAttr ( node, "expr",
-                pb . buff, sizeof pb . buff, & pb . pos );
-            if ( rc == 0 )
-            {
-                VTypedecl etd;
-
-                /* create a new expression object */
-                rc = VSchemaImplicitPhysEncExpr ( schema, & etd,
-                    & self -> enc, pb . buff, "VPhysicalLoadSchema" );
-                if ( rc != 0 )
-                {
-                    PLOGERR ( klogInt, ( klogInt, rc, "failed to establish column type from '$(expr)'",
-                               "expr=%s", pb . buff ));
-                }
-
-                /* match SPhysical type against stated type */
-                else if ( ! VTypedeclToTypedecl ( & etd, schema, td, NULL, NULL ) )
-                {
-                    rc = RC ( rcVDB, rcColumn, rcLoading, rcType, rcInconsistent );
-                    PLOGERR ( klogInt, ( klogInt, rc, "inconsistent metadata for column '$(name)'"
-                               , "name=%.*s"
-                               , ( int ) self -> smbr -> name -> name . size
-                               , self -> smbr -> name -> name . addr ));
-                }
-            }
-            else if ( GetRCState ( rc ) == rcNotFound )
-            {
-                rc = 0;
-            }
-        }
-    }
-
-    KMDataNodeRelease ( node );
-    return rc;
-}
-
-rc_t VPhysicalLoadMetadata ( VPhysical *self, VTypedecl *td, VSchema *schema )
-{
-    /* capture fixed row length */
-    const KMDataNode *node;
-    rc_t rc = KMetadataOpenNodeRead ( self -> meta, & node, "row-len" );
-    if ( rc == 0 )
-    {
-        rc = KMDataNodeReadAsU32 ( node, & self -> fixed_len );
-        KMDataNodeRelease ( node );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* look for "schema" root node */
-    rc = KMetadataOpenNodeRead ( self -> meta, & node, "schema" );
-    if ( rc == 0 )
-        return VPhysicalLoadSchema ( self, td, schema, node );
-    if ( GetRCState ( rc ) != rcNotFound )
-        return rc;
-
-    /* appears to be an older column */
-    self -> v01 = true;
-
-    /* look for "decoding" root node */
-    rc = KMetadataOpenNodeRead ( self -> meta, & node, "decoding" );
-    if ( rc == 0 )
-        return VPhysicalLoadV1Schema ( self, td, schema, node );
-    if ( GetRCState ( rc ) != rcNotFound )
-        return rc;
-
-    /* benign error for very old columns */
-    rc = RC ( rcVDB, rcColumn, rcLoading, rcSchema, rcNotFound );
-
-    DBGMSG(DBG_VDB, DBG_FLAG(DBG_VDB_VDB),
-        ("VPhysicalLoadMetadata = %d\n", rc));
-
-    return rc;
-}
diff --git a/libs/vdb/phys-priv.h b/libs/vdb/phys-priv.h
deleted file mode 100644
index 6ec1ab6..0000000
--- a/libs/vdb/phys-priv.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_phys_priv_
-#define _h_phys_priv_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifndef _h_klib_data_buffer_
-#include <klib/data-buffer.h>
-#endif
-
-#ifndef KONST
-#define KONST
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KColumn;
-struct KMetadata;
-struct KMDataNode;
-struct VTypedecl;
-struct VSchema;
-struct VTable;
-struct VCursor;
-struct VBlob;
-struct SExpression;
-struct SPhysMember;
-struct VProduction;
-
-
-/*--------------------------------------------------------------------------
- * VPhysical
- *
- *  "?start_id" is a starting id for column
- *
- *  "?stop_id" is an INCLUSIVE stop id for column, where the apparent
- *  convention was to whine about using intervals at all due to legacy
- *  issues while at the same time using "stop" as a lame attempt at
- *  indicating fully-closed vs. "end" to indicate half-closed intervals.
- */
-typedef struct VPhysical VPhysical;
-struct VPhysical
-{
-    /* physical column */
-    int64_t kstart_id, kstop_id;
-    struct KColumn KONST *kcol;
-    struct KMetadata KONST *meta;
-
-    /* static column */
-    int64_t sstart_id, sstop_id;
-    struct KMDataNode KONST *knode;
-
-    /* owning cursor */
-    struct VCursor KONST *curs;
-
-    /* definition from schema */
-    struct SPhysMember const *smbr;
-
-    /* encoding expression */
-    struct SExpression const *enc;
-
-    /* read production
-       provides decompressed data,
-       with correct byte-order */
-    struct VProduction *out;
-
-    /* output of decompression schema */
-    struct VProduction *b2p;
-
-    /* output of compression schema */
-    struct VProduction *b2s;
-
-    /* write production
-       provides decompressed data
-       in native byte-order */
-    struct VProduction *in;
-
-    /* cached static row data */
-    KDataBuffer srow;
-
-    /* id */
-    uint32_t id;
-
-    /* fixed row length */
-    uint32_t fixed_len;
-
-    /* synthesize v1 blob header */
-    bool no_hdr;
-
-    /* v0 or v1 blobs */
-    bool v01;
-
-    /* recorded at create time */
-    bool read_only;
-};
-
-/* symbol for failed production */
-#define FAILED_PHYSICAL ( ( VPhysical* ) 1U )
-
-/* Make
- *  make an empty object
- */
-rc_t VPhysicalMake ( VPhysical **phys,
-    struct VCursor KONST *curs, struct SPhysMember const *smbr );
-
-/* Whack
- */
-void VPhysicalDestroy ( VPhysical *self );
-void CC VPhysicalWhack ( void *self, void *ignore );
-
-/* Open
- *  open existing columns
- *  load schema definitions
- */
-rc_t VPhysicalOpenWrite ( VPhysical *self,
-    struct VSchema *schema, struct VTable const *tbl );
-rc_t VPhysicalOpenRead ( VPhysical *self,
-    struct VSchema *schema, struct VTable const *tbl );
-
-/* Finish
- *  complete common open procedures
- */
-rc_t VPhysicalFinishKColumn ( VPhysical *self,
-    struct VSchema *schema, struct SPhysMember const *smbr );
-rc_t VPhysicalFinishStatic ( VPhysical *self,
-    struct VSchema const *schema, struct SPhysMember const *smbr );
-
-/* LoadMetadata
- *  looks in metadata for stored schema
- *  loads fixed row length
- */
-rc_t VPhysicalLoadMetadata ( VPhysical *self,
-    struct VTypedecl *td, struct VSchema *schema );
-
-/* Read
- *  get the blob
- */
-rc_t VPhysicalRead ( VPhysical *self,
-    struct VBlob **vblob, int64_t id, uint32_t cnt, uint32_t elem_bits );
-rc_t VPhysicalReadBlob ( VPhysical *self,
-    struct VBlob **vblob, int64_t id, uint32_t elem_bits );
-
-/* IsStatic
- *  is this a static column
- */
-rc_t VPhysicalIsStatic ( const VPhysical *self, bool *is_static );
-
-/* GetKColumn
- *  try to get a KColumn,
- *  and if that fails, indicate whether the column is static
- */
-rc_t VPhysicalGetKColumn ( const VPhysical * self, struct KColumn ** kcol, bool * is_static );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_phys_priv_ */
diff --git a/libs/vdb/phys.c b/libs/vdb/phys.c
deleted file mode 100644
index 5e216f7..0000000
--- a/libs/vdb/phys.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define KONST const
-#define SKONST const
-#include "phys-priv.h"
-#include "prod-priv.h"
-#include "blob-priv.h"
-#undef KONST
-#undef SKONST
-
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-
-/*--------------------------------------------------------------------------
- * VPhysical
- */
-
-
-/* Whack
- */
-void CC VPhysicalWhack ( void *item, void *ignore )
-{
-    VPhysical *self = item;
-    if ( self > FAILED_PHYSICAL )
-        VPhysicalDestroy ( self );
-}
-
-/* Read
- *  get the blob
- */
-rc_t VPhysicalRead ( VPhysical *self, VBlob **vblob, int64_t id, uint32_t cnt, uint32_t elem_bits )
-{
-    return VPhysicalReadBlob ( self, vblob, id, elem_bits );
-}
diff --git a/libs/vdb/prod-cmn.c b/libs/vdb/prod-cmn.c
deleted file mode 100644
index b80c003..0000000
--- a/libs/vdb/prod-cmn.c
+++ /dev/null
@@ -1,2506 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define USE_EUGENE 1
-
-
-#define TRACK_REFERENCES 0
-
-#include <vdb/extern.h>
-
-#define KONST const
-#include "prod-priv.h"
-#include "prod-expr.h"
-#include "schema-priv.h"
-#include "schema-parse.h"
-#include "schema-expr.h"
-#include "table-priv.h"
-#include "cursor-priv.h"
-#include "linker-priv.h"
-#include "column-priv.h"
-#include "phys-priv.h"
-#include "blob-priv.h"
-#include "blob.h"
-#include "page-map.h"
-#include "blob-headers.h"
-#undef KONST
-
-#include <vdb/schema.h>
-#include <vdb/cursor.h>
-#include <vdb/xform.h>
-#include <klib/symbol.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <ctype.h>
-#include <os-native.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <bitstr.h>
-#include <stdio.h>
-#include <limits.h>
-
-#if !defined(WINDOWS)  &&  !defined(_WIN32)  &&  !defined(NCBI_WITHOUT_MT)
-#define LAUNCH_PAGEMAP_THREAD 1
-#endif
-
-
-/*--------------------------------------------------------------------------
- * VBlob
- */
-
-
-static
-void CC vblob_release ( void *item, void *ignore )
-{
-    TRACK_BLOB ( VBlobRelease, ( VBlob* ) item );
-    VBlobRelease ( ( VBlob* ) item );
-}
-
-/*--------------------------------------------------------------------------
- * VProduction
- */
-
-
-/* Make
- *  allocation and parent initialization
- *  called from the "Make" functions below
- *
- *  "prod" [ OUT ] - returned production
- *
- *  "size" [ IN ] - sizeof sub-type
- *
- *  "owned" [ IN ] - vector to contain productions
- *
- *  "var" [ IN ] - variant code, e.g. prodSimple, prodFunc
- *
- *  "sub" [ IN ] - sub-variant code, e.g. prodSimplePage2Blob
- *
- *  "name" [ IN, NULL OKAY ] - optional object name, derived
- *  from schema if possible
- *
- *  "fd" [ IN ] and "desc" [ IN ] - production type description
- *
- *  "cid" [ IN ] - contextual ( two-level ) id
- *
- *  "chain" [ IN ] - which chain(s) are supported
- *    chainEncoding    - when going from input to physical
- *    chainDecoding    - when pulling from physical to output
- *    chainUncommitted - when resolving trigger and validation expressions
- */
-rc_t VProductionMake ( VProduction **prodp, Vector *owned, size_t size,
-    int var, int sub, const char *name, const VFormatdecl *fd,
-    const VTypedesc *desc, const VCtxId *cid, uint8_t chain )
-{
-    rc_t rc;
-    VProduction *prod;
-
-#if PROD_NAME
-    size_t psize = size;
-#endif
-
-    assert ( size >= sizeof * prod );
-
-#if PROD_NAME
-    if ( name != NULL )
-        size += strlen ( name );
-    size += 1;
-#endif
-
-    prod = calloc ( 1, size );
-    if ( prod == NULL )
-        rc = RC ( rcVDB, rcProduction, rcResolving, rcMemory, rcExhausted );
-    else
-    {
-        rc = VectorAppend ( owned, & prod -> oid, prod );
-        if ( rc != 0 )
-        {
-            free ( prod );
-            prod = NULL;
-        }
-        else
-        {
-#if PROD_NAME
-            prod -> name = ( ( const char* ) prod ) + psize;
-            strcpy ( ( char* ) prod -> name, name ? name : "" );
-#endif
-
-            if ( fd != NULL )
-                prod -> fd = * fd;
-            if ( desc != NULL )
-                prod -> desc = * desc;
-            if ( cid != NULL )
-                prod -> cid = * cid;
-
-            prod -> var = ( uint8_t ) var;
-            prod -> sub = ( uint8_t ) sub;
-            prod -> chain = chain;
-        }
-    }
-
-    * prodp = prod;
-    return rc;
-}
-
-#if PROD_CACHE
-static
-void VProductionFlushCacheDeep ( VProduction *self, const char *context )
-{
-    int i;
-    for ( i = 0; i < self -> cache_cnt; ++ i )
-    {
-#if TRACKING_BLOBS
-        if ( self -> cache [ i ] != NULL )
-        {
-            fprintf( stderr, "%p->%p(%d) dropped from cache on %s *** %s\n"
-                     , self
-                     , self -> cache [ i ]
-                     , atomic32_read ( & self -> cache -> refcount )
-                     , context
-                     , self -> name
-                );
-        }
-#endif
-        vblob_release ( self -> cache [ i ], NULL );
-        self -> cache [ i ] = NULL;
-    }
-}
-#endif
-
-
-/*--------------------------------------------------------------------------
- * VSimpleProd
- *  single input param
- */
-
-/* Make
- */
-rc_t VSimpleProdMake ( VProduction **prodp, Vector *owned, struct VCursor const *curs,
-   int sub, const char *name, const VFormatdecl *fd, const VTypedesc *desc,
-    const VCtxId *cid, VProduction *in, uint8_t chain )
-{
-    VSimpleProd *prod;
-    rc_t rc = VProductionMake ( prodp, owned, sizeof * prod,
-        prodSimple, sub, name, fd, desc, cid, chain );
-    if ( rc == 0 )
-    {
-        prod = ( VSimpleProd* ) * prodp;
-        prod -> in = in;
-        prod -> curs = curs;
-    }
-    return rc;
-}
-
-static
-rc_t VSimpleProdPage2Blob ( VSimpleProd *self, VBlob **rslt, int64_t id ,uint32_t cnt)
-{
-    return VProductionReadBlob(self->in, rslt, id, cnt, NULL);
-}
-
-static
-rc_t VSimpleProdSerial2Blob ( VSimpleProd *self, VBlob **rslt, int64_t id, uint32_t cnt )
-{
-    /* read serialized blob */
-    VBlob *sblob;
-    rc_t rc = VProductionReadBlob ( self -> in, &sblob, id, cnt, NULL );
-    if ( rc == 0 )
-    {
-        /* recast data to 8 bit */
-        KDataBuffer buffer;
-        rc = KDataBufferCast ( & sblob -> data, & buffer, 8, false );
-        if (rc == 0)
-        {
-            /* create a new, fluffy blob having rowmap and headers */
-            VBlob *y;
-#if LAUNCH_PAGEMAP_THREAD
-            if(self->curs->pagemap_thread == NULL){
-                VCursor *curs = (VCursor*) self->curs;
-                if(--curs->launch_cnt<=0){
-                    /* ignoring errors because we operate with or without thread */
-                    VCursorLaunchPagemapThread(curs);
-                }
-            }
-#endif
-		
-            rc = VBlobCreateFromData ( & y, sblob -> start_id, sblob -> stop_id,
-                & buffer, VTypedescSizeof ( & self -> dad . desc ), self->curs->pagemap_thread?&self->curs->pmpr:NULL );
-            KDataBufferWhack ( & buffer );
-
-            /* return on success */
-            if ( rc == 0 )
-                * rslt = y;
-        }
-
-	vblob_release(sblob, NULL);
-    }
-
-    return rc;
-}
-
-
-static
-rc_t VSimpleProdBlob2Serial( VSimpleProd *self, VBlob **rslt, int64_t id, uint32_t cnt )
-{
-    rc_t rc;
-    VBlob *sblob;
-    
-    rc = VProductionReadBlob(self->in, &sblob, id, cnt, NULL);
-    if (rc == 0) {
-        VBlob *y;
-        
-        rc = VBlobNew(&y, sblob->start_id, sblob->stop_id, "blob2serial");
-        TRACK_BLOB (VBlobNew, y);
-        if (rc == 0) {
-            rc = KDataBufferMakeBytes(&y->data, 0);
-            if (rc == 0) {
-                /* save a reference to the page map so that fixed row-length can be determined */
-                y->pm = sblob->pm;
-                PageMapAddRef(y->pm);
-                
-                rc = VBlobSerialize(sblob, &y->data);
-                if (rc == 0)
-                    * rslt = y;
-            }
-            if (rc)
-	      vblob_release(y, NULL);
-        }
-
-	vblob_release(sblob, NULL);
-    }
-    return rc;
-}
-
-/* Read
- *  return a blob containing row id
- */
-rc_t VSimpleProdRead ( VSimpleProd *self, VBlob **vblob, int64_t id, uint32_t cnt, VBlobMRUCacheCursorContext *cctx)
-{
-    rc_t rc;
-
-    switch ( self -> dad . sub )
-    {
-    case prodSimpleCast:
-        rc = VProductionReadBlob ( self -> in, vblob, id , cnt, cctx );
-        break;
-    case prodSimplePage2Blob:
-        return VSimpleProdPage2Blob(self, vblob, id, cnt);
-    case prodSimpleSerial2Blob:
-        return VSimpleProdSerial2Blob(self, vblob, id, cnt);
-    case prodSimpleBlob2Serial:
-        return VSimpleProdBlob2Serial(self, vblob, id, cnt);
-    default:
-        * vblob = NULL;
-        return RC ( rcVDB, rcProduction, rcReading, rcProduction, rcCorrupt );
-    }
-
-    if ( rc == 0 )
-    {
-        VBlob *blob = * vblob;
-
-        /* force data buffer to reflect element size */
-        if ( self -> dad . fd . fmt == 0 &&
-             self -> dad . fd . td . type_id > 2 )
-        {
-            uint32_t elem_bits = VTypedescSizeof ( & self -> dad . desc );
-            if ( elem_bits != 0 && blob -> data . elem_bits != elem_bits )
-            {
-                rc = KDataBufferCast ( & blob -> data, & blob -> data, elem_bits, true );
-                if ( rc != 0 )
-                {
-                    vblob_release ( blob, NULL );
-                    * vblob = NULL;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * VFunctionProd
- *  function input params are VProduction*
- *  extern C function pointer and self object
- */
-
-rc_t VFunctionProdMake ( VFunctionProd **prodp, Vector *owned,
-    const VCursor *curs, int sub, const char *name,
-    const VFormatdecl *fd, const VTypedesc *desc, uint8_t chain )
-{
-    VFunctionProd *prod;
-    rc_t rc = VProductionMake ( ( VProduction** ) prodp, owned,
-        sizeof * prod, prodFunc, sub, name, fd, desc, NULL, chain );
-    if ( rc == 0 )
-    {
-        prod = * prodp;
-        prod -> curs = curs;
-
-        if ( sub != prodFuncByteswap )
-            VectorInit ( & prod -> parms, 0, 4 );
-        else
-        {
-            SDatatype *dt = VSchemaFindTypeid ( curs -> schema, fd -> td . type_id );
-            assert ( dt != NULL );
-            prod -> u . bswap = dt -> byte_swap;
-            VectorInit ( & prod -> parms, 0, 1 );
-        }
-    }
-    return rc;
-}
-
-void VFunctionProdDestroy ( VFunctionProd *self )
-{
-    /* release input parameters */
-    VectorWhack ( & self -> parms, NULL, NULL );
-    if ( self -> whack != NULL )
-        ( * self -> whack ) ( self -> fself );
-}
-
-
-
-/* Read
- */
-
-#define VECTOR_ALLOC_ARRAY( ARGC, ARRAY, S_ARRAY, H_ARRAY )	\
-    do { \
-        size_t const needed = (ARGC) * sizeof((ARRAY)[0]); \
-        (H_ARRAY) = NULL; \
-        (ARRAY) = &((S_ARRAY)[0]); \
-        if (needed > sizeof((S_ARRAY))) { \
-            (H_ARRAY) = malloc(needed); \
-            if ((H_ARRAY) == NULL) \
-                return RC(rcVDB, rcProduction, rcReading, rcMemory, rcExhausted); \
-            (ARRAY) = &((H_ARRAY)[0]); \
-        } \
-        memset((ARRAY), 0, needed); \
-    } while (0)
-
-#define VECTOR_COPY_TO_ARRAY( VECTOR, ARRAY )	\
-    do { \
-        int i, n; \
-        for (n = (i = VectorStart((VECTOR))) + VectorLength((VECTOR)); i != n; ++i) \
-            (ARRAY)[i] = VectorGet((VECTOR), i); \
-    } while (0)
-
-#define VECTOR_TO_ARRAY( ARGC, ARRAY, S_ARRAY, H_ARRAY, VECTOR )	\
-    do { \
-        VECTOR_ALLOC_ARRAY((ARGC), (ARRAY), (S_ARRAY), (H_ARRAY)); \
-        VECTOR_COPY_TO_ARRAY((VECTOR), (ARRAY)); \
-    } while (0)
-
-static
-rc_t VFunctionProdCallNDRowFunc(
-                                VFunctionProd *self,
-                                VBlob **prslt,
-                                int64_t row_id,
-                                const VXformInfo *info,
-                                Vector *args
-                                )
-{
-    rc_t rc;
-    
-    /* create output blob
-       TBD - try to used cached blob if available */
-#if PROD_NAME
-    rc = VBlobNew ( prslt, row_id, row_id, self->dad.name );
-#else
-    rc = VBlobNew ( prslt, row_id, row_id, "VFunctionProdCallNDRowFunc" );
-#endif
-    TRACK_BLOB ( VBlobNew, *prslt );
-    if ( rc == 0 )
-    {
-        VRowResult rslt;
-        VRowData on_stack [ 16 ], *on_heap, *argv;
-
-        VBlob *blob = * prslt;
-        uint32_t i, argc = VectorLength ( args );
-
-        /* create and populate array of input parameters */
-        VECTOR_ALLOC_ARRAY(argc, argv, on_stack, on_heap);
-        for ( i = 0; i < argc; ++ i )
-        {
-            const VBlob *in = VectorGet(args, i);
-            uint32_t first_elem;
-
-            /* always point to page base address */
-            argv [ i ] . u . data . base = in -> data . base;
-
-            /* get row length and starting element in one pass */
-            argv [ i ] . u . data . elem_count = PageMapGetIdxRowInfo ( in -> pm, (uint32_t)( row_id - in -> start_id ), & first_elem, NULL ); 
-            argv [ i ] . u . data . first_elem = first_elem;
-            
-            /* finally set the element size */
-            argv [ i ] . u . data . elem_bits = in -> data . elem_bits;
-        }
-
-        /* fill out return param block
-           NB - the initially passed-in buffer
-           may be reallocated by external function */
-        rslt . data =  & blob -> data;
-        rslt . elem_count = 0;
-        rslt . elem_bits = blob -> data . elem_bits =
-            VTypedescSizeof ( & self -> dad . desc );
-        rslt.no_cache = 0;
-        
-        blob -> byte_order = vboNative;
-
-        /* invoke the row function */
-        rc = self -> u . ndf ( self -> fself, info, row_id, & rslt, argc, argv );
-        blob->no_cache = (rslt.no_cache ? true : false);
-
-        /* clean up input arguments */
-        if ( on_heap != NULL )
-            free ( on_heap );
-
-        /* take reallocated buffer */
-        if ( rslt . data != & blob -> data )
-        {
-            KDataBufferWhack ( & blob -> data );
-            KDataBufferSub ( rslt . data, & blob -> data, 0, UINT64_MAX );
-            KDataBufferWhack ( rslt . data );
-        }
-        blob->data.elem_count = rslt.elem_count;
-
-        /* if the function was successful incorporate row length */
-        if (rc == 0)
-        {
-            assert(rslt . elem_count >> 32 == 0);
-            rc = PageMapNewFixedRowLength ( & blob -> pm, 1, (uint32_t)rslt . elem_count );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        vblob_release ( blob, NULL );
-
-        *prslt = NULL;
-    }
-
-    return rc;
-}
-
-/* TODO: enable in next release */
-#define PAGEMAP_PRE_EXPANDING_SINGLE_ROW_FIX 0
-static
-rc_t VFunctionProdCallRowFunc( VFunctionProd *self, VBlob **prslt, int64_t row_id, 
-    uint32_t row_count, const VXformInfo *info, Vector *args,int64_t param_start_id,int64_t param_stop_id)
-{
-    rc_t rc;
-    uint32_t i, argc = VectorLength ( args );
-    VRowResult rslt;
-    VRowData args_os[16], *args_oh, *argv;
-    KDataBuffer scratch;
-    VBlob *blob;
-    const VBlob *in;
-    PageMapIterator iter_os[16], *iter_oh, *iter;
-    uint64_t last = 0;
-    uint32_t last_len = 0;
-    uint32_t window;
-	uint32_t min_row_count=UINT32_MAX; /* will increase row_count due to larger common repeat count of parameters */
-    int64_t  row_id_max=0;
-    uint32_t MAX_BLOB_REGROUP; /** max rows in blob for regrouping ***/
-    bool function_failed = false;
-    bool window_resized = false;
-    
-    if (argc == 0) {
-        memset(&scratch, 0, sizeof(scratch));
-        memset(&args_os[0], 0, sizeof(args_os[0]));
-        rslt.data = &scratch;
-        rslt.elem_count = 0;
-        rslt.elem_bits = scratch.elem_bits = VTypedescSizeof(&self->dad.desc);
-        
-        rc = self->u.rf(self->fself, info, row_id, &rslt, 0, args_os);
-        if (rc == 0) {
-#if PROD_NAME
-            rc = VBlobNew ( &blob, -INT64_MAX - 1, INT64_MAX, self->dad.name );
-#else
-            rc = VBlobNew ( &blob, -INT64_MAX - 1, INT64_MAX, "VFunctionProdCallDetRowFunc" );
-#endif
-            if (rc == 0) {
-		        blob->byte_order = vboNative;
-                assert(rslt.elem_count <= UINT32_MAX);
-                KDataBufferSub(rslt.data, &blob->data, 0, rslt.elem_count);
-		if ( rslt.data != & scratch )
-		  KDataBufferWhack(rslt.data);
-                rc = PageMapNewSingle(&blob->pm, UINT32_MAX, (uint32_t)rslt.elem_count);
-                if (rc == 0)
-                    *prslt = blob;
-                else
-				  vblob_release(blob, NULL);
-            }
-        }
-        KDataBufferWhack(&scratch);
-        return rc;
-    }
-
-    if(self->curs->cache_curs && self->curs->cache_col_active){
-        /*** since cache_cursor exist, trying to avoid prefetching data which is in cache cursor ***/
-		row_id_max = self->curs->cache_empty_end;
-		MAX_BLOB_REGROUP=256;
-    } else {
-		MAX_BLOB_REGROUP=1024;
-    }
-	if(self->dad.sub == vftRowFast)
-    {
-		window = MAX_BLOB_REGROUP;
-	}
-    else
-    {
-        /*** from previous fetch **/
-		window = self->stop_id - self->start_id + 1;
-
-        /** detect sequentual io ***/
-		if ( row_id == self->stop_id + 1 )
-        {
-			if( row_id % ( 4 * window ) == 1 ) 
-            {
-                if ( window < MAX_BLOB_REGROUP )
-                {
-                    if ( 4 * window <= MAX_BLOB_REGROUP )
-                        window *= 4;
-                    else
-                        window = MAX_BLOB_REGROUP;
-                    window_resized = true;
-                }
-                /* we know that row_id lands on the first row of the new window */
-			}
-		}
-        else
-        {
-            /* random access - use tiny blob window */
-			window = 1;
-		}
-	} 
-
-    if(window == 1)
-    {
-        /* random access or initial blob - create blob with initial row-count */
-		self->start_id=self->stop_id=row_id;
-		if(row_count > 0)
-            self->stop_id += row_count-1;
-    }
-    else
-    {
-        /* start out with supplied row range */
-        self->start_id=param_start_id;
-        self->stop_id =param_stop_id;
-        assert(row_id >= self->start_id && row_id  + row_count -1 <= self->stop_id);
-
-        /* special code to detect an old-style static column with infinite range */
-        if(self->start_id==-INT64_MAX - 1 || self->stop_id==INT64_MAX)
-        {
-            /* same logic as above */
-            self->start_id=self->stop_id=row_id;
-            if(row_count > 0)
-                self->stop_id += row_count-1;
-        }
-
-        /* this code only executes if requested row-count is 1 */
-        else if ( row_count == 1 )
-        {
-            /* the blob itself has to be at least twice the window size.
-              this may be a problem because once "window" becomes large enough,
-              it could cause us to switch from "reblobbing" back to whole blob. */
-            if ( self->stop_id - self->start_id > 2*window)
-            {
-                /* determine which "window" ( relative to start of TABLE ) contains row_id */
-                int64_t	n=(row_id-1)/window;
-
-                /* look at blob left edge, move up to window left edge if possible */
-                if(self->start_id <= n*window)
-                    self->start_id=n*window+1;
-
-                /* look at blob right edge, move down to window right edge if possible */
-                if(self->stop_id > (n+1) * window)
-                    self->stop_id = (n+1)*window;
-
-                /* eventual window from self->start_id..self->stop_id must be <= "window" size */
-                assert ( self -> start_id <= self -> start_id );
-                assert ( self -> stop_id - self -> start_id + 1 <= window );
-            }
-            else if ( window_resized )
-            {
-                self -> start_id = row_id;
-            }
-            else
-            {
-                /* handle case when the window has grown large enough
-                   to disable reblobbing after blobbing was once in place */
-            }
-        }
-    }
-
-    /* create and populate array of input parameters */
-    VECTOR_ALLOC_ARRAY(argc, argv, args_os, args_oh);
-    VECTOR_ALLOC_ARRAY(argc, iter, iter_os, iter_oh);
-    for (i = 0; i != argc; ++ i){
-		
-        in = VectorGet(args, i);
-       
-		if(in->start_id == -INT64_MAX - 1 ) {
-			rc = PageMapNewIterator(in->pm, &iter[i],0,-1);
-		} else if(param_stop_id>self->stop_id && param_stop_id < INT64_MAX){
-			rc = PageMapNewIterator(in->pm, &iter[i], self->start_id-in->start_id, param_stop_id - self->start_id + 1);
-			if(rc == 0){
-				uint32_t n = PageMapIteratorRepeatCount(&iter[i]);
-				if(n < min_row_count) min_row_count=n;
-			}
-		} else {
-			rc = PageMapNewIterator(in->pm, &iter[i], self->start_id-in->start_id, self->stop_id - self->start_id + 1);
-		}
-        if ( rc ) break;
-        argv[i].variant = vrdData;
-        argv[i].blob_stop_id = in->stop_id;
-        argv[i].u.data.elem_bits = in->data.elem_bits;
-        argv[i].u.data.base = in->data.base;
-        argv[i].u.data.base_elem_count = in->data.elem_count;
-    }
-	if(min_row_count < UINT32_MAX && self->start_id + min_row_count -1 > self->stop_id ){
-		self->stop_id = self->start_id + min_row_count - 1;
-	}
-	if(row_id_max >= row_id && self->stop_id > row_id_max)     self->stop_id = row_id_max;
-
-
-
-
-#if PROD_NAME
-    rc = VBlobNew ( &blob, self->start_id, self->stop_id, self->dad.name );
-#else
-    rc = VBlobNew ( &blob, self->start_id, self->stop_id, "VFunctionProdCallDetRowFunc" );
-#endif
-    TRACK_BLOB ( VBlobNew, blob );
-    if (rc)
-        return rc;
-    
-#if PAGEMAP_PRE_EXPANDING_SINGLE_ROW_FIX
-#else
-    rc = PageMapNew(&blob->pm, row_count /**BlobRowCount(blob)**/);
-#if 0
-    /* disabled for causing problems with accumulating static columns */
-    if (rc == 0)
-		rc = PageMapPreExpandFull(blob->pm, BlobRowCount(blob));
-#endif
-    if (rc) {
-      vblob_release(blob, NULL);
-        return rc;
-    }
-#endif
-    
-    memset(&scratch, 0, sizeof(scratch));
-    rslt.data = &scratch;
-    rslt.elem_bits = scratch.elem_bits = blob->data.elem_bits = VTypedescSizeof(&self->dad.desc);
-    blob->byte_order = vboNative;
-    
-    
-    
-    for (row_id = self->start_id; row_id <= self->stop_id && rc == 0; ) {
-        uint32_t row_count = 1;
-        if(self->dad.sub == vftRow || self->dad.sub ==vftRowFast ){
-            row_count = PageMapIteratorRepeatCount(&iter[0]);
-            
-            for (i = 1; i != argc; ++i) {
-                uint32_t j = PageMapIteratorRepeatCount(&iter[i]);
-                if (row_count > j)
-                row_count = j;
-            }
-            if (row_id + row_count > self->stop_id + 1)
-            row_count = (uint32_t)( self->stop_id + 1 - row_id );
-        }
-        
-        for (i = 0; i != argc; ++i) {
-            argv[i].u.data.elem_count = PageMapIteratorDataLength(&iter[i]);
-            argv[i].u.data.first_elem = PageMapIteratorDataOffset(&iter[i]);
-        }
-        
-        rslt.elem_count = 0;
-        rc = self->u.rf(self->fself, info, row_id, &rslt, argc, argv);
-        if (rc) {
-            function_failed = true;
-            break;
-        }
-        
-        assert(rslt.elem_count >> 32 == 0);
-        
-        if (row_id == self->start_id) {
-#if PAGEMAP_PRE_EXPANDING_SINGLE_ROW_FIX
-            if (blob->start_id + row_count > blob->stop_id) {
-                last = blob->data.elem_count;
-                rc = KDataBufferResize(&blob->data, blob->data.elem_count + rslt.elem_count);
-                if (rc == 0) {
-                    bitcpy(blob->data.base, last * rslt.elem_bits,
-                           rslt.data->base, 0, rslt.elem_count * rslt.elem_bits);
-                    rc = PageMapNewSingle(&blob->pm, row_count, rslt.elem_count);
-                }
-            }
-            else
-            goto ADD_ROW_TO_BLOB;
-#else
-            goto ADD_ROW_TO_BLOB;
-#endif
-        }
-        else if (last_len != rslt.elem_count ||
-                 bitcmp(blob->data.base, last * rslt.elem_bits,
-                        rslt.data->base, 0, rslt.elem_count * rslt.elem_bits) != 0)
-        {
-        ADD_ROW_TO_BLOB:
-            last = blob->data.elem_count;
-            rc = KDataBufferResize(&blob->data, blob->data.elem_count + rslt.elem_count);
-            if (rc == 0) {
-                bitcpy(blob->data.base, last * rslt.elem_bits,
-                       rslt.data->base, 0, rslt.elem_count * rslt.elem_bits);
-                rc = PageMapAppendRows(blob->pm, rslt.elem_count, row_count, false);
-            }
-        }
-        else
-            rc = PageMapAppendRows(blob->pm, rslt.elem_count, row_count, true);
-        
-        /* drop any new buffer that was returned to us */
-        if (rslt.data != &scratch) {
-            KDataBufferWhack(rslt.data);
-        }
-        
-        if (rc) break;
-        
-        last_len = (uint32_t)rslt.elem_count;
-        
-        for (i = 0; i != argc; ++i)
-            PageMapIteratorAdvance(&iter[i], row_count);
-        row_id += row_count;
-    }
-    KDataBufferWhack(&scratch);    
-    if (args_oh) free(args_oh);
-    if (iter_oh) free(iter_oh);
-
-    if (rc == 0 || (function_failed && row_id > self->start_id)) {
-        *prslt = blob;
-        return 0;
-    }
-    vblob_release(blob, NULL);
-    
-    return rc;
-}
-
-static
-rc_t VFunctionProdCallArrayFunc( VFunctionProd *self, VBlob **prslt,
-    int64_t id, const VXformInfo *info, Vector *args ) {
-    VBlob *rslt = 0;
-    VBlob *sblob;
-    rc_t rc;
-    
-    sblob = VectorGet(args, 0);
-    assert(sblob);
-    
-#if PROD_NAME
-    rc = VBlobNew(&rslt, sblob->start_id, sblob->stop_id, self->dad.name);
-#else
-    rc = VBlobNew(&rslt, sblob->start_id, sblob->stop_id, "VFunctionProdCallArrayFunc");
-#endif
-    TRACK_BLOB( VBlobNew, rslt );
-    if (rc == 0) {
-        rslt->pm = sblob->pm;
-        PageMapAddRef(rslt->pm);
-        
-        if (sblob->headers) {
-            if ( self -> dad . chain == chainEncoding )
-                rc = BlobHeadersCreateChild(sblob->headers, &rslt->headers);
-            else {
-                rslt->headers = (BlobHeaders *)BlobHeadersGetNextFrame(sblob->headers);
-                BlobHeadersAddRef(rslt->headers);
-            }
-        }
-        if (rc == 0) {
-	    rc = KDataBufferMake(&rslt->data, VTypedescSizeof(&self->dad.desc), sblob->data.elem_count);
-            if (rc == 0) {
-                rc = self->u.af(
-                                self->fself,
-                                info,
-                                rslt->data.base,
-                                sblob->data.base,
-                                sblob->data.elem_count
-                                );
-                if (rc == 0) {
-                    *prslt = rslt;
-                    return 0;
-                }
-            }
-        }
-
-        vblob_release( rslt, NULL );
-    }
-    
-    return rc;
-}
-
-static
-rc_t VFunctionProdCallPageFunc( VFunctionProd *self, VBlob **rslt, int64_t id, 
-    const VXformInfo *info, Vector *args )
-{
-    struct input_t {
-        const VBlob *blob;
-        bool	sb_input;
-        PageMapIterator cur_row;
-        bool at_end;
-    };
-    struct input_t on_stack[8];
-    struct input_t *on_heap;
-    struct input_t *argv;
-    
-    VRowData pb_stack[8];
-    VRowData *pb_heap;
-    VRowData *param;
-    
-    rc_t rc=0;
-    uint32_t i, argc = VectorLength(args);
-    int64_t start_id;
-    int64_t stop_id;
-    uint32_t elem_count;
-    uint32_t row_count;
-    int first_non_control_input;
-    int allInputsAreSingleRow;
-    VBlob *blob = NULL;
-    
-    VECTOR_ALLOC_ARRAY(argc, argv, on_stack, on_heap);
-    VECTOR_ALLOC_ARRAY(argc, param, pb_stack, pb_heap);
-
-    for (start_id = stop_id = 0,
-         first_non_control_input=-1,
-         allInputsAreSingleRow = true,
-         i = 0; i != argc ; ++i) {
-        const VBlob *b = (const VBlob *)VectorGet(args, i);
-        const VProduction *prod = (const VProduction *)VectorGet(&self->parms, i);
-
-
-        if(b->pm == NULL){
-            rc=PageMapProcessGetPagemap(&self->curs->pmpr,(PageMap**)(&b->pm));
-            if(rc != 0) return rc;
-        }
-        
-        if (prod->control) {
-            param[i].variant = vrdControl;
-            assert(0); /*** TBD: Not implemented ???? ***/
-        } else {
-            param[i].variant = vrdData;
-            argv[i].blob = b;
-            argv[i].sb_input = VBlobIsSingleRow(argv[i].blob);
-            allInputsAreSingleRow &= argv[i].sb_input;
-            
-            if(first_non_control_input < 0){
-                first_non_control_input = i;
-                start_id = argv[i].blob->start_id;
-                stop_id = argv[i].blob->stop_id;
-            } else {
-                if(start_id < argv[i].blob->start_id)
-                    start_id = argv[i].blob->start_id;
-                if(stop_id > argv[i].blob->stop_id)
-                    stop_id  = argv[i].blob->stop_id;
-            }
-        }
-    }
-    if ( allInputsAreSingleRow ) {
-	row_count = stop_id - start_id + 1;
-	if(row_count == 0 ) /*** case of static column **/
-		row_count=1;
-    } else {
-	row_count = stop_id - start_id + 1;
-    }
-    if (first_non_control_input < 0) /* no non-control inputs */
-        rc = RC(rcVDB, rcFunction, rcExecuting, rcParam, rcInvalid);
-    else if (start_id > stop_id )
-        rc = RC(rcVDB, rcFunction, rcExecuting, rcRange, rcEmpty);
-    
-    for ( elem_count = 0, i = 0; i != argc && rc ==0; ++i) {
-        rc = PageMapNewIterator(argv[i].blob->pm, &argv[i].cur_row, start_id - argv[i].blob->start_id ,row_count);
-        if(rc == 0){
-            PageMapIterator temp = argv[i].cur_row;
-            uint32_t ec = 0;
-            
-            if ( argv[i].sb_input ){
-                ec = PageMapIteratorDataLength(&temp) * row_count;
-            } else do {
-                ec+=PageMapIteratorDataLength(&temp);
-            } while (PageMapIteratorNext(&temp));
-            if(ec == 0){
-                rc = RC(rcVDB, rcFunction, rcExecuting, rcPagemap, rcInvalid); /* bad page map */
-            } else if (elem_count == 0){
-                elem_count=ec;
-            } else if (ec != elem_count){
-                rc = RC(rcVDB, rcFunction, rcExecuting, rcParam, rcInvalid); /* Pages have to have the same number of elements*/
-            }
-    	}
-    }
-    
-    while (rc == 0) /* not really while */ {
-#if PROD_NAME
-        rc = VBlobNew(&blob, start_id, stop_id, self->dad.name);
-#else
-        rc = VBlobNew(&blob, start_id, stop_id, "VFunctionProdCallPageFunc");
-#endif
-        if (rc) break;
-        
-        TRACK_BLOB(VBlobNew,blob);
-        
-        if (allInputsAreSingleRow) {
-            VFixedRowResult rslt;
-            uint32_t	row_element_count = PageMapIteratorDataLength(&argv[first_non_control_input].cur_row);
-            
-            rc = PageMapNewSingle(&blob->pm, row_count, row_element_count);
-            if (rc) break;
-            
-            rc = KDataBufferMake(&blob->data, VTypedescSizeof(&self->dad.desc), row_element_count);
-            if (rc) break;
-            
-            for (i = 0; i != argc; ++i) {
-                if (param[i].variant == vrdControl)
-                    continue;
-                if (argv[i].at_end) {
-                    rc = RC(rcVDB, rcFunction, rcExecuting, rcRow, rcNotFound);
-                    break;
-                }
-                
-                param[i].u.data.base = argv[i].blob->data.base;
-                param[i].u.data.elem_count = row_element_count;
-                param[i].u.data.first_elem = PageMapIteratorDataOffset(&argv[i].cur_row);
-                param[i].u.data.elem_bits = argv[i].blob->data.elem_bits;
-                
-                argv[i].at_end = PageMapIteratorNext(&argv[i].cur_row) ? false : true;
-            }
-            if (rc) break;
-            
-            rslt.base = blob->data.base;
-            rslt.first_elem = 0;
-            rslt.elem_count = row_element_count;
-            rslt.elem_bits = blob->data.elem_bits;
-            
-            rc = self->u.pf(self->fself, info, start_id, &rslt, argc, param);
-        } else {
-            uint32_t first_write;
-            int64_t row_id;
-            uint32_t last = 0;
-            uint32_t last_rowlen = 0;
-            
-            rc = PageMapNew(&blob->pm, row_count); /*** max number of rows - it may collapse some **/
-            if (rc) break;
-            rc = KDataBufferMake(&blob->data, VTypedescSizeof(&self->dad.desc), elem_count);
-            if (rc) break;
-            
-            for (first_write = 0, row_id = start_id; row_id <= stop_id; ++row_id) {
-                VFixedRowResult rslt;
-                
-                for (i = 0; i != argc; ++i) {
-                    if (param[i].variant == vrdControl)
-                        continue;
-                    if (argv[i].at_end) {
-                        rc = RC(rcVDB, rcFunction, rcExecuting, rcRow, rcNotFound);
-                        break;
-                    }
-                    
-                    param[i].u.data.base = argv[i].blob->data.base;
-                    param[i].u.data.elem_count = PageMapIteratorDataLength(&argv[i].cur_row);
-                    param[i].u.data.first_elem = PageMapIteratorDataOffset(&argv[i].cur_row);
-                    param[i].u.data.elem_bits = argv[i].blob->data.elem_bits;
-                    
-                    argv[i].at_end = PageMapIteratorNext(&argv[i].cur_row) ? false : true;
-                }
-                if (rc)
-                    break;
-                
-                rslt.base = blob->data.base;
-                rslt.first_elem = first_write;
-                rslt.elem_count = param[first_non_control_input].u.data.elem_count;
-                rslt.elem_bits = blob->data.elem_bits;
-                
-                rc = self->u.pf(self->fself, info, row_id, &rslt, argc, param);
-                if (rc)
-                    break;
-                
-                assert(rslt.elem_count >> 32 == 0);
-                if ( row_id != start_id && last_rowlen == rslt.elem_count &&
-                    memcmp(((char*)blob->data.base) + (last*rslt.elem_bits)/8,
-                           ((char*)blob->data.base) + (first_write*rslt.elem_bits)/8,
-                           (rslt.elem_count*rslt.elem_bits)/8) == 0)
-                {
-                    rc = PageMapAppendRow(blob->pm, (uint32_t)rslt.elem_count, true);
-                }
-                else {
-                    last = first_write;
-                    first_write += rslt.elem_count;
-                    rc = PageMapAppendRow(blob->pm, (uint32_t)rslt.elem_count, false);
-                }
-                if (rc)
-                    break;
-                last_rowlen = (uint32_t)rslt.elem_count;
-            }
-            if (rc)
-                break;
-            KDataBufferSub(&blob->data, &blob->data, 0, first_write);
-        }
-        *rslt = blob;
-        break;
-    }
-    if (rc != 0 && blob != NULL) vblob_release(blob, NULL);
-    if (on_heap) free(on_heap);
-    if (pb_heap) free(pb_heap);
-    return rc;
-}
-
-static
-rc_t VFunctionProdCallBlobFuncEncoding( VFunctionProd *self, VBlob *rslt, int64_t id,
-    const VXformInfo *info, const VBlob *sblob ) {
-    VBlobData src;
-    VBlobResult dst;
-    VBlobHeader *hdr;
-    rc_t rc;
-    uint32_t elem_size = VTypedescSizeof(&self->dad.desc);
-    
-    rc = BlobHeadersCreateChild(sblob->headers, &rslt->headers);
-    if (rc == 0) {
-        hdr = BlobHeadersGetHdrWrite(rslt->headers);
-        if (hdr) {
-            bitsz_t sz = KDataBufferBits(&sblob->data);
-            
-            VBlobHeaderSetSourceSize(hdr, KDataBufferBytes(&sblob->data));
-            sz = (sz + elem_size - 1) / elem_size;
-            rc = KDataBufferMake( &rslt->data, elem_size, sz );
-        }
-        else
-            rc = RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    }
-    if (rc)
-        return rc;
-
-    dst.header = NULL;
-    
-    if ( sblob -> data.elem_count == 0)
-        goto SKIP_COMPRESSION;
-
-    src.data = sblob -> data.base;
-    src.elem_count = sblob -> data.elem_count;
-    src.elem_bits = sblob -> data.elem_bits;
-    src.byte_order = sblob -> byte_order;
-    
-    dst.data = rslt -> data.base;
-    dst.elem_count = rslt -> data.elem_count;
-    dst.elem_bits = rslt -> data.elem_bits;
-    dst.byte_order = sblob -> byte_order;
-    
-    rc = self->u.bf(self->fself, info, &dst, &src, hdr);
-    
-    if (rc == 0) {
-        if ( dst.header != NULL && dst.header != hdr ) {
-            VBlobHeaderReplace ( hdr, dst.header );
-            VBlobHeaderRelease ( dst.header );
-        }
-        rslt->data.elem_bits = dst.elem_bits;
-        rslt->data.elem_count = dst.elem_count;
-        rslt->byte_order = dst.byte_order;
-    }
-    else if (GetRCObject(rc) == (enum RCObject)rcBuffer && GetRCState(rc) == rcInsufficient) {
-    SKIP_COMPRESSION:
-        VBlobHeaderSetFlags(hdr, 1);
-        
-        KDataBufferWhack(&rslt->data);
-        if ( dst.header != NULL && dst.header != hdr )
-            VBlobHeaderRelease ( dst.header );
-        
-        /* compressors usually produce bits (elem_size == 1) or bytes (elem_size == 8)
-         * the cast to bits can never fail, so we will force the cast to bytes to also be
-         * infallible; casts to other sizes are allowed to fail to prevent data loss */
-        if (elem_size == 8) {
-            KDataBufferSub(&sblob->data, &rslt->data, 0, UINT64_MAX);
-            /* We can't shrink the data and KDataBufferCast won't increase the number of bits
-             * but we know that KDataBuffer can't allocate anything other than whole bytes
-             * so we're forcing the conversion to bytes manually. */
-            rslt->data.elem_count = KDataBufferBytes(&rslt->data);
-            rslt->data.elem_bits = 8;
-            rc = 0;
-        }
-        else /* if elem_size == 1 this will always work */
-            rc = KDataBufferCast(&sblob->data, &rslt->data, elem_size, false);
-    }
-    VBlobHeaderRelease(hdr);
-    
-    return rc;
-}
-
-static
-rc_t VFunctionProdCallBlobFuncDecoding( VFunctionProd *self, VBlob *rslt,
-    int64_t id, const VXformInfo *info, const VBlob *sblob ) {
-    VBlobHeader *hdr;
-    rc_t rc;
-    uint32_t elem_size = VTypedescSizeof(&self->dad.desc);
-    
-    if (sblob->headers == NULL) {
-        /* v1 blobs don't have headers, but v1 blobs
-         * are fixed row-length so we know the data size
-         * we are relying on the blob deserialization code
-         * to set the page map up correctly */
-        if (sblob->pm == NULL) {
-            hdr = BlobHeadersCreateDummyHeader(0, 0, 0, (sblob->data.elem_bits * sblob->data.elem_count + 7) >> 3);
-        }
-        else
-            hdr = BlobHeadersCreateDummyHeader(0, 0, 0, BlobRowCount(sblob) * PageMapGetIdxRowInfo(sblob->pm, 0, 0, NULL));
-        /* leave rslt->headers null so that the next
-         * stage will also create a dummy header */
-    }
-    else {
-        /* rslt gets the headers for the next stage in decoding */
-        rslt->headers = (BlobHeaders *)BlobHeadersGetNextFrame(sblob->headers);
-        BlobHeadersAddRef(rslt->headers);
-        
-        /* get the headers for this stage in decoding */
-        hdr = BlobHeadersGetHeader(sblob->headers);
-    }
-    if ( hdr == NULL )
-        rc = RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    else if ((VBlobHeaderFlags(hdr) & 1) != 0)
-    {
-        /* compression was skipped */
-        VBlobHeaderRelease(hdr);
-        return KDataBufferCast(&sblob->data, &rslt->data, elem_size, true);
-    }
-    else
-    {
-        rc = KDataBufferMakeBytes(&rslt->data, VBlobHeaderSourceSize(hdr));
-        if (rc == 0) {
-            VBlobData src;
-            VBlobResult dst;
-            
-            dst.header = NULL;
-            
-            src.data = sblob -> data.base;
-            src.elem_count = sblob -> data.elem_count;
-            src.elem_bits = sblob -> data.elem_bits;
-            src.byte_order = sblob -> byte_order;
-            
-            dst.data = rslt -> data.base;
-            dst.elem_count = (rslt -> data.elem_count << 3) / elem_size;
-            dst.elem_bits = elem_size;
-            dst.byte_order = sblob -> byte_order;
-            
-            rc = self->u.bf(self->fself, info, &dst, &src, hdr);
-            
-            if (rc == 0) {
-                if ( dst.header != NULL && dst.header != hdr ) {
-                    /* only allow replacement of headers when encoding */
-                    VBlobHeaderRelease ( dst.header );
-                }
-                
-                rslt->data.elem_bits = dst.elem_bits;
-                rslt->data.elem_count = dst.elem_count;
-                rslt->byte_order = dst.byte_order;
-                
-                rc = KDataBufferCast(&rslt->data, &rslt->data, elem_size, true);
-            }
-        }
-        VBlobHeaderRelease(hdr);
-    }
-
-    return rc;
-}
-
-static
-rc_t VFunctionProdCallBlobFunc( VFunctionProd *self, VBlob **prslt,
-    int64_t id, const VXformInfo *info, Vector *args ) {
-    VBlob *rslt = 0;
-    VBlob *sblob;
-    rc_t rc;
-    
-    sblob = VectorGet(args, 0);
-    assert(sblob);
-    if(self->dad.chain == chainEncoding){
-	VBlobAddRef(sblob);
-	if(sblob->headers==NULL)/**first in encryption chain***/
-		VBlobPageMapOptimize(&sblob); /** try to optimize the blob **/
-    }
-
-#if PROD_NAME
-    rc = VBlobNew(&rslt, sblob->start_id, sblob->stop_id, self->dad.name);
-#else
-    rc = VBlobNew(&rslt, sblob->start_id, sblob->stop_id, "VFunctionProdCallBlobFunc");
-#endif
-    if (rc)
-        return rc;
-    
-    TRACK_BLOB(VBlobNew,rslt);
-    
-    /* blob funcs are not allowed to change page maps */
-    rslt->pm = sblob->pm;
-    PageMapAddRef(rslt->pm);
-    
-    rslt->byte_order = sblob->byte_order;
-    
-    if (self->dad.chain == chainEncoding){
-        rc = VFunctionProdCallBlobFuncEncoding(self, rslt, id, info, sblob);
-	vblob_release( sblob, NULL );
-    } else {
-        rc = VFunctionProdCallBlobFuncDecoding(self, rslt, id, info, sblob);
-    }
-    
-    if (rc == 0) {
-        *prslt = rslt;
-        return 0;
-    }
-    vblob_release( rslt, NULL );
-    return rc;
-}
-
-static
-rc_t VFunctionProdCallBlobNFunc( VFunctionProd *self, VBlob **rslt,
-    int64_t id, const VXformInfo *info, Vector *args ) {
-    const VBlob *on_stack[16];
-    const VBlob **on_heap;
-    const VBlob **argv;
-    int argc = VectorLength(args);
-    rc_t rc;
-    
-    VECTOR_TO_ARRAY(argc, argv, on_stack, on_heap, args);
-    {
-	int i;
-	for(i=0;i<argc;i++){
-		VBlob const *vb=argv[i];
-		if(vb->pm == NULL){
-			rc=PageMapProcessGetPagemap(&self->curs->pmpr,(PageMap**)(&vb->pm));
-			if(rc != 0) return rc;
-		}
-	}
-    }
-    rc = self->u.bfN(self->fself, info, id, rslt, argc, argv);
-    if ( on_heap )
-        free( (void*) on_heap );
-    return rc;
-}
-
-static
-rc_t VFunctionProdCallLegacyBlobFunc( VFunctionProd *self, VBlob **prslt,
-    int64_t id, const VXformInfo *info, Vector *args ) {
-    VBlob *rslt = 0;
-    VBlob *sblob;
-    VNoHdrBlobFunc func = (VNoHdrBlobFunc)self->u.bf;
-    rc_t rc;
-    uint32_t elem_size = VTypedescSizeof(&self->dad.desc);
-    
-    sblob = VectorGet(args, 0);
-    assert(sblob);
-    
-#if PROD_NAME
-    rc = VBlobNew(&rslt, sblob->start_id, sblob->stop_id, self->dad.name);
-#else
-    rc = VBlobNew(&rslt, sblob->start_id, sblob->stop_id, "VFunctionProdCallLegacyBlobFunc");
-#endif
-    TRACK_BLOB(VBlobNew,rslt);
-    if (rc == 0) {
-        rc = KDataBufferMakeBytes(&rslt->data, 0);
-        if (rc == 0) {
-            VLegacyBlobResult dst;
-            dst.dst = & rslt -> data;
-            dst.byte_order = vboLittleEndian;
-            rc = func(self->fself,
-                      info,
-                      &dst,
-                      &sblob->data
-                      );
-            
-            if (rc == 0)
-            {
-                rslt->byte_order = dst.byte_order;
-
-                rc = KDataBufferCast(&rslt->data, &rslt->data, elem_size, true);
-                if (rc == 0) {
-                    rslt->pm = sblob->pm;
-                    PageMapAddRef(rslt->pm);
-
-                    *prslt = rslt;
-                    return 0;
-                }
-            }
-        }
-
-        vblob_release( rslt, NULL );
-    }
-    return rc;
-}
-
-static
-rc_t VFunctionProdCallByteswap ( VFunctionProd *self, VBlob **vblob,
-    int64_t id, const VXformInfo *info, Vector *args )
-{
-    /* get single input blob */
-    VBlob *blob = VectorFirst ( args );
-    rc_t rc;
-
-    assert ( blob != NULL );
-    
-#if PROD_CACHE
-    VProductionFlushCacheDeep ( & self -> dad, "byteswap" );
-#endif
-    
-    /* CAST */
-    rc = KDataBufferCast ( & blob->data, & blob->data, 
-                           self->dad.desc.intrinsic_bits * self->dad.desc.intrinsic_dim,
-                           false );
-    if ( rc == 0 )
-    {
-        /* legacy blob check
-         * repair missing pagemap
-         */
-        if (blob->pm == NULL) {
-            uint64_t row_count = BlobRowCount ( blob );
-            if ( row_count == 0 || blob->data.elem_count % row_count != 0)
-                rc = RC(rcVDB, rcBlob, rcReading, rcBlob, rcCorrupt);
-            else {
-                uint64_t row_len = blob->data.elem_count / row_count;
-                rc = PageMapNewFixedRowLength(&blob->pm, row_count, row_len);
-            }
-        }
-    }
-
-    if ( rc != 0)
-        return rc;
-
-    /* check for byteswapping function */
-    if ( self -> u.bswap != NULL )
-    {
-
-        if ( blob -> byte_order ==
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-             vboBigEndian
-#else
-             vboLittleEndian
-#endif
-            )
-        {
-            uint32_t int_size;
-            uint64_t blob_bits;
-
-            /* make writable */
-            KDataBuffer buffer;
-
-            rc = KDataBufferMakeWritable ( & blob -> data, & buffer );
-            if ( rc != 0 )
-                return rc;
-
-            /* invoke byte-swap function on input */
-            blob_bits = KDataBufferBits ( & buffer );
-            int_size = self -> dad.desc .intrinsic_bits;
-            ( * self -> u.bswap ) ( buffer.base, buffer.base,
-                ( uint32_t ) ( blob_bits / int_size ) );
-
-            /* poke bytes back into blob */
-            KDataBufferWhack ( & blob -> data );
-            blob -> data = buffer;
-        }
-    }
-
-    blob -> byte_order = vboNative;
-    *vblob = blob;
-
-    (void)VBlobAddRef ( blob );
-    TRACK_BLOB( VBlobAddRef, blob );
-
-    return 0;
-}
-
-#if _DEBUGGING
-
-static
-rc_t VFunctionProdCallCompare1(VFunctionProd *self, VBlob **vblob, int64_t id, uint32_t cnt) {
-    VBlob *orig;
-    rc_t rc;
-    
-    *vblob = NULL;
-    assert(VectorLength(&self->parms) == 2);
-    rc = VProductionReadBlob((const VProduction *)VectorGet(&self->parms, 0), &orig, id, cnt, NULL);
-    if (rc == 0) {
-        int64_t i;
-        PageMapIterator oi;
-        VRowData orig_data;
-        const VProduction *test_prod = VectorGet(&self->parms, 1);
-
-        memset(&orig_data, 0, sizeof(orig_data));
-        orig_data.u.data.base = orig->data.base;
-        orig_data.u.data.elem_bits = orig->data.elem_bits;
-        
-        PageMapNewIterator(orig->pm, &oi, 0, -1);
-        
-        for (i = orig->start_id; i <= orig->stop_id; ++i) {
-            VBlob *test;
-            uint32_t j;
-
-            j = PageMapIteratorDataLength(&oi);
-
-            rc = VProductionReadBlob(test_prod, &test, i, 1, NULL);
-            if (rc == 0) {
-                if (orig->data.elem_bits != test->data.elem_bits || orig->byte_order != test->byte_order)
-                    rc = RC(rcVDB, rcBlob, rcValidating, rcBlob, rcCorrupt);
-                else {
-                    PageMapIterator ti;
-                    VRowData test_data;
-
-                    memset(&test_data, 0, sizeof(test_data));
-                    test_data.u.data.base = test->data.base;
-                    test_data.u.data.elem_bits = test->data.elem_bits;
-                    
-                    PageMapNewIterator(test->pm, &ti, 0, -1);
-                    
-                    if (!PageMapIteratorAdvance(&ti, (uint32_t)(i - test->start_id))) {
-                        rc = RC(rcVDB, rcBlob, rcValidating, rcBlob, rcCorrupt);
-                    }
-                    else {
-                        uint32_t k = PageMapIteratorDataLength(&ti);
-                        orig_data.u.data.elem_count = test_data.u.data.elem_count = j;
-                        
-                        orig_data.u.data.first_elem = (orig->data.bit_offset / orig->data.elem_bits) + PageMapIteratorDataOffset(&oi);
-                        test_data.u.data.first_elem = (test->data.bit_offset / test->data.elem_bits) + PageMapIteratorDataOffset(&ti);
-
-                        if (j != k) {
-                            rc = RC(rcVDB, rcBlob, rcValidating, rcBlob, rcCorrupt);
-                        } else {
-                            rc = self->u.cf(self->fself, &orig_data, &test_data);
-                            if (rc) {
-                                rc = RC(rcVDB, rcBlob, rcValidating, rcBlob, rcCorrupt);
-                            }
-                        }
-                        if (rc) {
-                            const uint8_t *a = orig_data.u.data.base;
-                            const uint8_t *b = test_data.u.data.base;
-                            unsigned count;
-                            unsigned k;
-                            unsigned m;
-                            char f, ax[9 + 16 * 4 + 1], bx[9 + 16 * 4 + 1];
-                            char av[16], bv[16];
-
-                            a += (orig_data.u.data.first_elem * orig_data.u.data.elem_bits) >> 3;
-                            b += (test_data.u.data.first_elem * test_data.u.data.elem_bits) >> 3;
-                            /* show up to a row of data before */
-                            count = a - (const uint8_t*)orig_data.u.data.base;
-                            count = count < b - (const uint8_t*)orig_data.u.data.base ? count : b - (const uint8_t*)orig_data.u.data.base;
-                            count = count > 16 ? 16 : count;
-                            a -= count;
-                            b -= count;
-                            
-                            count += (j * orig->data.elem_bits + 7) >> 3;
-
-                            for (k = 0, m = 0; k != count; ++k) {
-                                if (m == 0) {
-                                    sprintf(ax, "%08X>", k);
-                                    sprintf(bx, "%08X<", k);
-                                }
-                                f = a[k] == b[k] ? ' ': '*';
-                                sprintf(ax + m * 4 + 9, " %02x%c", a[k], f);
-                                av[m] = isprint(a[k]) ? a[k] : '.';
-                                sprintf(bx + m * 4 + 9, " %02x%c", b[k], f);
-                                bv[m] = isprint(b[k]) ? b[k] : '.';
-                                m++;
-                                if(m == 16 || k == count - 1) {
-                                    DBGMSG(DBG_VDB, DBG_VDB_COMPARE, ("%-73s '%.*s'\n%-73s '%.*s'\n\n", ax, m, av, bx, m, bv));
-                                    m = 0;
-                                }
-                            }
-                        }
-                    }
-                }
-                vblob_release(test, NULL);
-                if (rc)
-                    break; }
-            else
-                break;
-            PageMapIteratorAdvance(&oi, 1);
-        }
-        vblob_release(orig, NULL);
-    }
-    return rc;
-}
-#endif
-
-static
-rc_t VFunctionProdCallCompare( VFunctionProd *self, VBlob **vblob, int64_t id, uint32_t cnt ) {
-    VBlob *orig;
-    rc_t rc;
-    VProduction const *orig_prod;
-    
-    *vblob = NULL;
-    assert(VectorLength(&self->parms) == 2);
-    orig_prod = (const VProduction *)VectorGet(&self->parms, 0);
-    rc = VProductionReadBlob(orig_prod, &orig, id, cnt, NULL);
-    if (rc == 0) {
-        VBlob *test;
-        const VProduction *test_prod = VectorGet(&self->parms, 1);
-        
-        rc = VProductionReadBlob(test_prod, &test, id, cnt, NULL);
-        if (rc == 0) {
-            if (orig->data.elem_bits != test->data.elem_bits || orig->byte_order != test->byte_order){
-                rc = RC(rcVDB, rcBlob, rcValidating, rcBlob, rcCorrupt);
-            } else if(   orig->pm->data_recs != 1				/*** catching static **/
-                      || test->pm->data_recs != 1				/*** trying quick comparison **/
-		      || orig->data.elem_count != test->data.elem_count
-                      || memcmp( orig->data.base, test->data.base, (orig->data.elem_bits*orig->data.elem_count+7)/8)){
-                uint64_t i;
-                PageMapIterator oi;
-                PageMapIterator ti;
-                VRowData orig_data;
-                VRowData test_data;
-                
-                memset(&orig_data, 0, sizeof(orig_data));
-                orig_data.u.data.base = orig->data.base;
-                orig_data.u.data.elem_bits = orig->data.elem_bits;
-                
-                memset(&test_data, 0, sizeof(test_data));
-                test_data.u.data.base = test->data.base;
-                test_data.u.data.elem_bits = test->data.elem_bits;
-                
-                PageMapNewIterator(orig->pm, &oi, 0, -1);
-                PageMapNewIterator(test->pm, &ti, 0, -1);
-                if (test->start_id < orig->start_id) {
-                    if ( !PageMapIteratorAdvance( &ti, (uint32_t)( orig->start_id - test->start_id ) ) ) {
-                        rc = RC(rcVDB, rcBlob, rcValidating, rcBlob, rcCorrupt);
-                        DBGMSG(DBG_VDB, DBG_VDB_COMPARE, ("%s: page map mismatch at row %li\n", self->dad.name, id));
-                    }
-                }
-                
-                for (i = orig->start_id; rc == 0; ) {
-                    uint32_t elem_count;
-                    uint64_t prev_i = i;
-                    
-                    orig_data.u.data.first_elem = (orig->data.bit_offset / orig->data.elem_bits) + PageMapIteratorDataOffset(&oi);
-                    test_data.u.data.first_elem = (test->data.bit_offset / test->data.elem_bits) + PageMapIteratorDataOffset(&ti);
-
-                    for (elem_count = 0; ; ) {
-                        bool done = false;
-                        uint32_t j;
-                        uint32_t k;
-                        
-                        j = PageMapIteratorDataLength(&oi);
-                        k = PageMapIteratorDataLength(&ti);
-                        if (j != k) {
-                            rc = RC(rcVDB, rcBlob, rcValidating, rcBlob, rcCorrupt);
-                            DBGMSG(DBG_VDB, DBG_VDB_COMPARE, ("%s: length mismatch at row %li ( original=%u, test=%u )\n", self->dad.name, i, j, k));
-                            break;
-                        }
-                        elem_count += j;
-                        
-                        j = PageMapIteratorRepeatCount(&oi);
-                        k = PageMapIteratorRepeatCount(&ti);
-                        if (j != k) {
-                            done = true;
-                            if (j > k)
-                                j = k;
-                        }
-                        if (PageMapIteratorAdvance(&ti, j) != PageMapIteratorAdvance(&oi, j)) {
-                            rc = RC(rcVDB, rcBlob, rcValidating, rcBlob, rcCorrupt);
-                            DBGMSG(DBG_VDB, DBG_VDB_COMPARE, ("%s: page map corrupt at row %li\n", self->dad.name, i));
-                            break;
-                        }
-                        i += j;
-			if ( done || (int64_t)i > orig->stop_id || test->pm->random_access || orig->pm->random_access || !PageMapIteratorAdvance( &ti, 0 ) )
-                            break;
-                    }
-                    if (rc)
-                        break;
-                    if ( (int64_t)i > ( orig->stop_id + 1 ) ) {
-                        rc = RC(rcVDB, rcBlob, rcValidating, rcBlob, rcCorrupt);
-                        (void)prev_i; /* shut up warning when not printing debug msg */
-                        DBGMSG(DBG_VDB, DBG_VDB_COMPARE, ("%s: page map has too many rows at row %li\n", self->dad.name, prev_i));
-                        break;
-                    }
-                    
-                    orig_data.u.data.elem_count = test_data.u.data.elem_count = elem_count;
-                    
-                    rc = self->u.cf(self->fself, &orig_data, &test_data);
-                    if (rc) {
-                        rc = RC(rcVDB, rcBlob, rcValidating, rcBlob, rcCorrupt);
-                        DBGMSG(DBG_VDB, DBG_VDB_COMPARE, ("%s: data mismatch at row %li\n", self->dad.name, prev_i));
-                        break;
-                    }
-                    if ((int64_t)i > orig->stop_id )
-                        break;
-                    
-                    /* check to see if the test iterator is at end
-                     * and if so, fetch next blob */
-                    if (!PageMapIteratorAdvance(&ti, 0)) {
-                        VBlob *temp;
-                        
-                        rc = VProductionReadBlob(test_prod, &temp, i, orig->stop_id - i, NULL);
-                        if (rc == 0) {
-                            vblob_release(test, NULL);
-                            test = temp;
-                            test_data.u.data.base = test->data.base;
-                            PageMapNewIterator(test->pm, &ti, 0, -1);
-                            if ( test->start_id < (int64_t)i ) {
-                                if ( !PageMapIteratorAdvance( &ti, (uint32_t)( i - test->start_id ) ) ) {
-                                    rc = RC(rcVDB, rcBlob, rcValidating, rcBlob, rcCorrupt);
-                                    DBGMSG(DBG_VDB, DBG_VDB_COMPARE, ("%s: page map mismatch at row %li\n", self->dad.name, i));
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-            vblob_release(test, NULL);
-        }
-        vblob_release(orig, NULL);
-    }
-    return rc;
-}
-
-typedef struct fetch_param_blob_data fetch_param_blob_data;
-struct fetch_param_blob_data
-{
-    int64_t id;
-    uint32_t cnt;
-    int64_t range_start_id;
-    int64_t range_stop_id;
-    Vector *inputs;
-    VBlob *vblob;
-    rc_t rc;
-    bool no_cache;
-};
-
-static void fetch_param_blob_data_init(fetch_param_blob_data *pb,int64_t id,uint32_t cnt,Vector *inputs)
-{
-    pb->id = id;
-    pb->cnt = cnt;
-    pb->inputs = inputs;
-    pb->rc = 0;
-    pb->vblob = NULL;
-    pb->range_start_id=INT64_MIN;
-    pb->range_stop_id =INT64_MAX;
-    pb->no_cache = false;
-}
-static
-bool CC fetch_param_blob ( void *item, void *data )
-{
-    fetch_param_blob_data *pb = data;
-    VBlob *blob;
-    
-    pb -> rc = VProductionReadBlob ( item, & blob, pb -> id , pb -> cnt, NULL);
-    if ( pb -> rc == 0 )
-    {
-        pb -> rc = VectorAppend ( pb -> inputs, NULL, blob );
-        if ( pb -> rc == 0 ) {
-            pb->no_cache |= blob->no_cache;
-	    if(blob->start_id > pb->range_start_id) pb->range_start_id=blob->start_id;
-	    if(blob->stop_id  < pb->range_stop_id)  pb->range_stop_id =blob->stop_id;
-            return false;
-        }
-        vblob_release ( blob, NULL );
-    }
-
-    return true;
-}
-
-static
-bool CC fetch_first_param_blob ( void *item, void *data )
-{
-    fetch_param_blob_data *pb = data;
-    
-    pb -> rc = VProductionReadBlob ( item, &pb->vblob, pb -> id , pb -> cnt, NULL);
-    if (GetRCState(pb->rc) == rcNotFound)
-        return false;
-    if ( pb -> vblob -> data.elem_count == 0 )
-        return false;
-    pb->range_start_id=pb->vblob->start_id;
-    pb->range_stop_id =pb->vblob->stop_id;
-    return true;
-}
-
-static
-rc_t VFunctionProdSelect ( VFunctionProd *self, VBlob **vblob, int64_t id, uint32_t cnt ) {
-    fetch_param_blob_data pb;
-    fetch_param_blob_data_init(&pb,id,cnt,NULL);
-    VectorDoUntil ( & self -> parms, false, fetch_first_param_blob, & pb );
-    * vblob = pb.vblob;
-    return pb.rc;
-}
-
-static rc_t VFunctionProdReadNormal ( VFunctionProd *self, VBlob **vblob, int64_t id ,uint32_t cnt)
-{
-    rc_t rc;
-    Vector inputs;
-    fetch_param_blob_data pb;
-    VBlob *vb=NULL;
-    int64_t	id_run;
-    int64_t     cnt_run;
-
-    /* fill out information for function to use */
-    const VCursor *curs = self -> curs;
-    VXformInfo info;
-
-    if(cnt == 0) cnt = 1;
-
-#if VMGR_PASSED_TO_XFORM
-    info . mgr = curs -> tbl -> mgr;
-#endif
-#if VSCHEMA_PASSED_TO_XFORM
-    info . schema = curs -> schema;
-#endif
-#if VTABLE_PASSED_TO_XFORM
-    info . tbl = curs -> tbl;
-#endif
-#if VPRODUCTION_PASSED_TO_XFORM
-    info . prod = & self -> dad;
-#endif
-    info . fdesc . fd = self -> dad . fd;
-    info . fdesc . desc = self -> dad . desc;
-    *vblob = NULL;
-
-    if (self->dad.sub == prodFuncBuiltInCompare) {
-        rc = VFunctionProdCallCompare(self, vblob, id, cnt);
-#if _DEBUGGING
-        if (rc != 0)
-            rc = VFunctionProdCallCompare1(self, vblob, id, cnt);
-#endif
-        return rc;
-    }
-
-    /* all other functions take some form of blob input */
-    VectorInit ( & inputs, 0, VectorLength ( & self -> parms ) );
-    fetch_param_blob_data_init(&pb,id,cnt,&inputs);
-    if ( VectorDoUntil ( & self -> parms, false, fetch_param_blob, & pb ) )
-        rc = pb . rc;
-    else for( id_run=id, cnt_run=cnt, rc=0; cnt_run > 0 && rc==0;) 
-    {
-        switch ( self -> dad . sub )
-        {
-        case vftLegacyBlob:
-            rc = VFunctionProdCallLegacyBlobFunc ( self, &vb, id_run, & info, & inputs );
-            break;
-        case vftNonDetRow:
-            rc = VFunctionProdCallNDRowFunc ( self, &vb, id_run, & info, & inputs );
-            break;
-        case vftRow:
-	    case vftRowFast:
-        case vftIdDepRow:
-            rc = VFunctionProdCallRowFunc ( self, &vb, id_run, cnt_run, & info, & inputs, pb.range_start_id,pb.range_stop_id );
-            break;
-        case vftArray:
-            rc = VFunctionProdCallArrayFunc ( self, &vb, id_run, & info, & inputs );
-            break;
-        case vftFixedRow:
-            rc = VFunctionProdCallPageFunc ( self, &vb, id_run, & info, & inputs );
-            break;
-        case vftBlob:
-            rc = VFunctionProdCallBlobFunc ( self, &vb, id_run, & info, & inputs );
-            break;
-        case vftBlobN:
-            rc = VFunctionProdCallBlobNFunc ( self, &vb, id_run, & info, & inputs );
-            break;
-        case prodFuncByteswap:
-            rc = VFunctionProdCallByteswap ( self, &vb, id_run, & info, & inputs );
-            break;
-        default:
-            rc = RC ( rcVDB, rcFunction, rcReading, rcProduction, rcCorrupt );
-        }
-        if (rc == 0) {
-            if (vb == NULL) {
-                rc = RC ( rcVDB, rcFunction, rcReading, rcProduction, rcNull );
-            }
-            else {
-                if (vb -> start_id > id_run || vb -> stop_id < id_run) { /*** shoudn't happen ***/
-                    rc = RC ( rcVDB, rcBlob, rcReading, rcRange, rcInsufficient );
-                }
-                if (*vblob == NULL) {
-                    *vblob=vb;
-                }
-                else {
-                    if (vb -> start_id <= id) {/** new blob is not appendable, but can replace the current one **/
-                        vblob_release(*vblob, NULL);
-                        *vblob = vb;
-                    }
-                    else {
-                        /*** append here **/
-                        rc = VBlobAppend(*vblob, vb);
-                        vblob_release(vb, NULL);
-                    }
-                }
-                /* propagate dirty flag */
-                (*vblob)->no_cache |= pb.no_cache;
-                if( (*vblob) -> stop_id >= id + cnt - 1)
-                    break;
-
-                id_run  = (*vblob) -> stop_id + 1;
-                cnt_run = id + cnt - id_run;
-
-            }
-        }
-        else if (id < id_run) {
-            /* if there is reblobbing and our result blob already contains some
-             * data, then return that data and not error out */
-            rc = 0;
-            break;
-        }
-    }
-    /* drop input blobs */
-    VectorWhack ( & inputs, vblob_release, NULL );
-    return rc;
-}
-
-rc_t VFunctionProdRead ( VFunctionProd *self, VBlob **vblob, int64_t id , uint32_t cnt)
-{
-    if ( self -> dad . sub == vftSelect )
-        return VFunctionProdSelect ( self, vblob, id , cnt);
-    return VFunctionProdReadNormal(self, vblob, id, cnt);
-}    
-
-typedef struct fetch_param_IdRange_data fetch_param_IdRange_data;
-struct fetch_param_IdRange_data
-{
-    int64_t first;
-    int64_t last;
-    rc_t rc;
-    bool first_time;
-};
-
-static
-bool CC fetch_param_IdRange ( void *item, void *data )
-{
-    fetch_param_IdRange_data *pb = data;
-    int64_t first;
-    int64_t last;
-    rc_t rc;
-    
-    rc = VProductionColumnIdRange(item, &first, &last);
-    if (GetRCState(rc) == rcEmpty && GetRCObject(rc) == rcRange)
-        return false;
-
-    pb->rc = rc;
-    if (rc == 0 )
-    {
-        if (pb->first_time || first < pb->first)
-            pb->first = first;
-        if (pb->first_time || last > pb->last)
-            pb->last = last;
-        pb->first_time = false;
-        return false;
-    }
-    
-    return true;
-}
-
-LIB_EXPORT rc_t CC VFunctionProdColumnIdRange ( const VFunctionProd *self, int64_t *first, int64_t *last )
-{
-    fetch_param_IdRange_data pb;
-
-    pb.first_time = true;
-    pb . rc = 0;
-    pb.first = 1;
-    pb.last = 0;
-    
-    VectorDoUntil ( & self -> parms, false, fetch_param_IdRange, & pb );
-
-    if (pb.rc == 0) {
-#if 0 
-/* this causes problems in the loaders */   
-        if(pb.first_time){ /** no parameters - some function which generated data; f.e.  meta_value() ***/
-              pb.last = INT64_MAX;
-        } 
-#endif        
-        *first = pb.first;
-        *last = pb.last;
-    }
-    return pb . rc;
-}
-
-typedef struct fetch_param_FixedRowLength_data fetch_param_FixedRowLength_data;
-struct fetch_param_FixedRowLength_data
-{
-    uint32_t length;
-    int64_t row_id;
-    bool first_time;
-};
-
-static
-bool CC fetch_param_FixedRowLength ( void *item, void *data )
-{
-    fetch_param_FixedRowLength_data *pb = data;
-    uint32_t length;
-    
-    if (((const VProduction *)item)->control == false) {
-        length = VProductionFixedRowLength(item, pb->row_id, false);
-
-        if (pb->first_time)
-            pb->length = length;
-
-        pb->first_time = false;
-        
-        if (length == 0 || length != pb->length)
-            return true;
-    }
-    return false;
-}
-
-static
-uint32_t VFunctionProdFixedRowLength ( const VFunctionProd *self, int64_t row_id, bool ignore_self )
-{
-    fetch_param_FixedRowLength_data pb;
-
-    if ( ! ignore_self )
-    {
-        switch ( self -> dad . sub )
-        {
-        case vftRow:
-		case vftRowFast:
-        case vftNonDetRow:
-        case vftIdDepRow:
-            return 0;
-        }
-    }
-
-    pb.first_time = true;
-    pb.length = 0;
-
-    VectorDoUntil ( & self -> parms, false, fetch_param_FixedRowLength, & pb );
-
-    return pb.length;
-}
-
-
-/*--------------------------------------------------------------------------
- * VScriptProd
- */
-
-rc_t VScriptProdMake ( VScriptProd **prodp, Vector *owned, struct VCursor const *curs,
-    int sub, const char *name, const VFormatdecl *fd,
-    const VTypedesc *desc, uint8_t chain )
-{
-    VScriptProd *prod;
-    rc_t rc = VProductionMake ( ( VProduction** ) prodp, owned, sizeof * prod,
-        prodScript, sub, name, fd, desc, NULL, chain );
-    if ( rc == 0 )
-    {
-        prod = * prodp;
-        prod -> curs = curs;
-        VectorInit ( & prod -> owned, 0, 4 );
-    }
-    return rc;
-}
-
-void VScriptProdDestroy ( VScriptProd *self )
-{
-    VectorWhack ( & self -> owned, VProductionWhack, NULL );
-}
-
-
-/* Read
- */
-rc_t VScriptProdRead ( VScriptProd *self, VBlob **vblob, int64_t id,uint32_t cnt )
-{
-    return VProductionReadBlob ( self -> rtn, vblob, id , cnt, NULL);
-}
-
-static rc_t VScriptProdColumnIdRange ( const VScriptProd *self, int64_t *first, int64_t *last )
-{
-    return VProductionColumnIdRange(self->rtn, first, last);
-}
-
-static uint32_t VScriptProdFixedRowLength ( const VScriptProd *self, int64_t row_id )
-{
-    return VProductionFixedRowLength(self->rtn, row_id, false);
-}
-
-
-/*--------------------------------------------------------------------------
- * VProduction
- */
-
-/* Init
- *  parent initialization function
- *  called from the "Make" functions below
- */
-#if 0
-static
-void VProductionInit ( VProduction *self, int var, int sub, const char *name,
-                       const VFormatdecl *fd, const VTypedesc *desc,
-                       const VCtxId *cid, uint8_t chain )
-{
-    memset ( self, 0, sizeof * self );
-
-    if ( fd != NULL )
-        self -> fd = * fd;
-    if ( desc != NULL )
-        self -> desc = * desc;
-    if ( cid != NULL )
-        self -> cid = * cid;
-
-    self -> var = ( uint8_t ) var;
-    self -> sub = ( uint8_t ) sub;
-    self -> chain = chain;
-}
-#endif
-
-
-void CC VProductionWhack ( void *item, void *owned )
-{
-    VProduction * self = item;
-
-    if ( self != NULL )
-    {
-        if ( owned != NULL)
-        {
-            void *ignore;
-            VectorSwap ( owned, self -> oid, NULL, & ignore );
-            assert ( ( void* ) self == ignore );
-        }
-
-
-#if PROD_CACHE
-        VProductionFlushCacheDeep ( self, "whack" );
-#endif
-        switch ( self -> var )
-        {
-        case prodSimple:
-#if TRACKING_BLOBS
-            fprintf( stderr, "VSimpleProd %p being whacked *** %s\n", self, self->name );
-#endif
-            VSimpleProdDestroy ( ( VSimpleProd* ) self );
-            break;
-
-        case prodFunc:
-#if TRACKING_BLOBS
-            fprintf( stderr, "VFunctionProd %p being whacked *** %s\n", self, self->name );
-#endif
-            VFunctionProdDestroy ( ( VFunctionProd* ) self );
-            break;
-
-        case prodScript:
-#if TRACKING_BLOBS
-            fprintf( stderr, "VScriptProd %p being whacked *** %s\n", self, self->name );
-#endif
-            VScriptProdDestroy ( ( VScriptProd* ) self );
-            break;
-
-        case prodPhysical:
-#if TRACKING_BLOBS
-            fprintf( stderr, "VPhysicalProd %p being whacked *** %s\n", self, self->name );
-#endif
-            VPhysicalProdDestroy ( ( VPhysicalProd* ) self );
-            break;
-
-        case prodColumn:
-#if TRACKING_BLOBS
-            fprintf( stderr, "VColumnProd %p being whacked *** %s\n", self, self->name );
-#endif
-            VColumnProdDestroy ( ( VColumnProd* ) self );
-            break;
-        }
-
-        free ( self );
-    }
-}
-
-/* Cmp
- * Sort
- *  compare item is a VCtxId
- *  sort item is a VProduction
- *  n is always a VProduction
- */
-LIB_EXPORT int64_t CC VProductionCmp ( const void *item, const void *n )
-{
-    const VCtxId *a = item;
-    const VProduction *b = n;
-    return VCtxIdCmp ( a, & b -> cid );
-}
-
-LIB_EXPORT int64_t CC VProductionSort ( const void *item, const void *n )
-{
-    const VProduction *a = item;
-    const VProduction *b = n;
-    return VCtxIdCmp ( & a -> cid, & b -> cid );
-}
-
-
-/* IdRange
- *  obtains intersection of all physical sources
- *
- *  "first" [ IN/OUT ] and "last" [ IN/OUT ] - range to intersect
- */
-rc_t VProductionColumnIdRange ( const VProduction *self,
-    int64_t *first, int64_t *last )
-{
-    if ( self <= FAILED_PRODUCTION )
-        return 0;
-
-    switch ( self -> var )
-    {
-    case prodSimple:
-        return VProductionColumnIdRange ( ( ( const VSimpleProd* ) self ) -> in, first, last );
-    case prodFunc:
-        return VFunctionProdColumnIdRange((const VFunctionProd *)self, first, last);
-    case prodScript:
-        return VScriptProdColumnIdRange((const VScriptProd *)self, first, last);
-    case prodPhysical:
-        return VPhysicalProdColumnIdRange((const VPhysicalProd *)self, first, last);
-    case prodColumn:
-        return RC ( rcVDB, rcColumn, rcAccessing, rcRange, rcEmpty );
-    }
-    
-    return RC ( rcVDB, rcColumn, rcAccessing, rcType, rcUnknown );
-}
-
-rc_t VProductionPageIdRange ( VProduction *self,
-    int64_t id, int64_t *first, int64_t *last )
-{
-    VBlob *blob;
-    rc_t rc = VProductionReadBlob ( self, & blob, id , 1, NULL);
-    if ( rc == 0 )
-    {
-        * first = blob -> start_id;
-        * last = blob -> stop_id;
-
-        vblob_release ( blob, NULL );
-    }
-    return rc;
-}
-
-/* RowLength
- *  get row length for a particular row
- */
-uint32_t VProductionRowLength ( const VProduction *self, int64_t row_id )
-{
-    uint32_t row_len;
-
-    VBlob *blob;
-    rc_t rc = VProductionReadBlob ( self, & blob, row_id, 1, NULL );
-    if ( rc != 0 )
-        return 0;
-    
-    row_len = PageMapGetIdxRowInfo ( blob -> pm, (uint32_t)( row_id - blob -> start_id) , NULL, NULL );
-
-    vblob_release ( blob, NULL );
-    
-    return row_len;
-}
-
-/* FixedRowLength
- *  get fixed row length for entire column
- *  returns 0 if not fixed
- */
-uint32_t VProductionFixedRowLength ( const VProduction *self, int64_t row_id,bool ignore_self )
-{
-    switch ( self -> var )
-    {
-    case prodSimple:
-        return VProductionFixedRowLength ( ( ( const VSimpleProd* ) self ) -> in, row_id, ignore_self );
-    case prodFunc:
-        return VFunctionProdFixedRowLength((const VFunctionProd *)self, row_id, ignore_self);
-    case prodScript:
-        return VScriptProdFixedRowLength((const VScriptProd *)self, row_id);
-    case prodPhysical:
-        return VPhysicalProdFixedRowLength((const VPhysicalProd *)self, row_id);
-    }
-
-    return RC ( rcVDB, rcColumn, rcAccessing, rcType, rcUnknown );
-}
-
-
-/* ReadBlob
- */
-rc_t VProductionReadBlob ( const VProduction *cself, VBlob **vblob, int64_t id, uint32_t cnt, VBlobMRUCacheCursorContext *cctx )
-{
-    rc_t rc;
-    VProduction *self = ( VProduction* ) cself;
-
-#if PROD_CACHE
-    int i;
-    VBlob *blob;
-#endif
-
-    * vblob = NULL;
-
-    /* should not be possible, but safety is cheap */
-    if ( self == NULL )
-        return RC ( rcVDB, rcProduction, rcReading, rcSelf, rcNull );
-
-    /*** Cursor-level column blobs may be 1-to-1 with production blobs ***/
-    if(cctx != NULL && self->cctx.cache == NULL ){ /*** we are connected to read cursor **/
-	self->cctx = *cctx; /*** remember it ***/
-	/** No need to do anything else here - we are on "direct line" to the column ***/
-    } else if(self->cctx.cache != NULL){
-	/** somewhere else this production is connected to a cursor **/
-	/** lets try to get answers from the cursor **/
-	blob=(VBlob*) VBlobMRUCacheFind(self->cctx.cache,self->cctx.col_idx,id);
-	if(blob){
-		rc = VBlobAddRef ( blob );
-                if ( rc != 0 ) return rc;
-		*vblob=blob;
-		return 0;
-	}
-    }
-
-#if PROD_CACHE
-    /* check cache */
-    for ( i = 0; i < self -> cache_cnt; ++ i )
-    {
-        blob = self -> cache [ i ];
-        if ( self -> cache [ i ] != NULL )
-        {
-            /* check id range */
-            if (
-#if USE_EUGENE
-                /* NB - this is an approach where we always cache
-                   a blob after a read in order to keep it alive,
-                   but never allow a cache hit on retrieval */
-                ! blob -> no_cache &&
-#endif
-                id >= blob -> start_id &&
-                id <= blob -> stop_id )
-            {
-                rc = VBlobAddRef ( blob );
-                if ( rc != 0 )
-                    return rc;
-#if TRACKING_BLOBS
-                fprintf( stderr, "%p->%p(%d) new reference to cached blob *** %s\n"
-                         , self
-                         , blob
-                         , atomic32_read ( & blob -> refcount )
-                         , self->name
-                    );
-#endif
-                /* return new reference */
-                * vblob = blob;
-#if PROD_CACHE > 1
-   #if PROD_CACHE > 2
-                /* MRU cache */
-                if ( i > 0 )
-                {
-		    memmove(self -> cache +1,self -> cache,i*sizeof(*self->cache));
-                    self -> cache [ 0 ] = blob;
-                }
-   #else 
-		if(i > 0 ){  /** trivial case ***/
-		    self -> cache [ 1 ] =  self -> cache [ 0 ];
-		    self -> cache [ 0 ] = blob;
-		}
-   #endif
-#endif
-                return 0;
-            }
-        }
-    }
-#endif /* PROD_CACHE */
-
-    /* dispatch */
-    switch ( self -> var )
-    {
-    case prodSimple:
-        rc = VSimpleProdRead ( ( VSimpleProd* ) self, vblob, id, cnt,cctx );
-        break;
-    case prodFunc:
-        rc = VFunctionProdRead ( ( VFunctionProd* ) self, vblob, id , cnt);
-#if _DEBUGGING && PROD_NAME
-        if ( rc != 0 )
-            DBGMSG ( DBG_VDB, DBG_VDB_FUNCTION, ( "%s: %R\n", self -> name, rc ) );
-#endif
-        break;
-    case prodScript:
-        rc = VScriptProdRead ( ( VScriptProd* ) self, vblob, id , cnt);
-        break;
-    case prodPhysical:
-        rc = VPhysicalProdRead ( ( VPhysicalProd* ) self, vblob, id, cnt );
-        break;
-    case prodColumn:
-        rc = VColumnProdRead ( ( VColumnProd* ) self, vblob, id );
-        break;
-    default:
-        return RC ( rcVDB, rcProduction, rcReading, rcType, rcUnknown );
-    }
-
-#if ! PROD_CACHE
-    return rc;
-#else
-    blob = * vblob;
-
-    if ( rc != 0 || * vblob == NULL )
-        return rc;
-
-#if ! USE_EUGENE
-         /* NB - there is another caching mechanism on VColumn
-            if a blob does not want to be cached, it is rejected here */
-    if ( ! blob -> no_cache )
-        return 0;
-#endif
-    if(cctx == NULL && self->cctx.cache != NULL && blob->stop_id > blob->start_id + 4){/** we will benefit from caching here **/
-		VBlobMRUCacheSave(self->cctx.cache,self->cctx.col_idx,blob);
-		return 0;
-    }
-
-    if(blob->pm == NULL) return 0;
-
-
-    /* cache output */
-    rc = VBlobAddRef ( blob );
-    if ( rc == 0 )
-    {
-        VBlobCheckIntegrity ( blob );
-	if(self -> cache_cnt < PROD_CACHE){
-#if PROD_CACHE > 1
-		if(self -> cache_cnt > 0 ){
-#if PROD_CACHE > 2
-			memmove(self -> cache + 1, self -> cache , self -> cache_cnt * sizeof(*self -> cache));
-#else
-			self -> cache[1]=self -> cache[0];
-#endif
-		}
-#endif
-		self -> cache_cnt ++;
-	} else {
-		/* release whatever was there previously */
-        	/* drop LRU */
-		vblob_release ( self -> cache [ self -> cache_cnt - 1 ], NULL );
-#if PROD_CACHE > 1
-#if PROD_CACHE > 2
-		memmove(self -> cache + 1, self -> cache , (self -> cache_cnt -1) * sizeof(*self -> cache));
-#else
-		self -> cache[1]=self -> cache[0];
-#endif
-#endif
-        }
-        /* insert a head of list */
-        self -> cache [ 0 ] = blob;
-                
-#if TRACKING_BLOBS
-        fprintf( stderr, "%p->%p(%d) cached *** %s\n"
-                 , self
-                 , blob
-                 , atomic32_read ( & blob -> refcount )
-                 , self -> name
-            );
-#endif
-    }
-
-#if USE_EUGENE
-    /* this code requires the blob to be cached on the production */
-    return rc;
-#else
-    /* we don't care if the blob was not cached */
-    return 0;
-#endif
-
-#endif /* PROD_CACHE */
-}
-
-/* IsStatic
- *  trace all the way to a physical production
- */
-rc_t VProductionIsStatic ( const VProduction *self, bool *is_static )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcColumn, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        for ( rc = 0; self != NULL; )
-        {
-            switch ( self -> var )
-            {
-            case prodSimple:
-                self = ( ( const VSimpleProd*) self ) -> in;
-                break;
-            case prodFunc:
-            case prodScript:
-            {
-                const VFunctionProd *fp = ( const VFunctionProd* ) self;
-                uint32_t start = VectorStart ( & fp -> parms );
-                uint32_t end = VectorLength ( & fp -> parms );
-                for ( end += start; start < end; ++ start )
-                {
-                    self = ( const VProduction* ) VectorGet ( & fp -> parms, start );
-                    if ( self != NULL )
-                    {
-                        rc = VProductionIsStatic ( self, is_static );
-                        if ( rc != 0 || * is_static )
-                            break;
-                    }
-                }
-                return rc;
-            }
-            case prodPhysical:
-                return VPhysicalIsStatic ( ( ( const VPhysicalProd* ) self ) -> phys, is_static );
-            case prodColumn:
-                self = NULL;
-                break;
-            default:
-                return RC ( rcVDB, rcProduction, rcReading, rcType, rcUnknown );
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* GetKColumn
- *  drills down to physical production to get a KColumn,
- *  and if that fails, indicate whether the column is static
- */
-rc_t VProductionGetKColumn ( const VProduction * self, struct KColumn ** kcol, bool * is_static )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcColumn, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        for ( rc = 0; self != NULL; )
-        {
-            switch ( self -> var )
-            {
-            case prodSimple:
-                self = ( ( const VSimpleProd*) self ) -> in;
-                break;
-            case prodFunc:
-            case prodScript:
-            {
-                const VFunctionProd *fp = ( const VFunctionProd* ) self;
-                uint32_t start = VectorStart ( & fp -> parms );
-                uint32_t end = VectorLength ( & fp -> parms );
-                for ( end += start; start < end; ++ start )
-                {
-                    self = ( const VProduction* ) VectorGet ( & fp -> parms, start );
-                    if ( self != NULL )
-                    {
-                        rc = VProductionGetKColumn ( self, kcol, is_static );
-                        if ( rc != 0 || * kcol != NULL || * is_static )
-                            break;
-                    }
-                }
-                return rc;
-            }
-            case prodPhysical:
-                return VPhysicalGetKColumn ( ( ( const VPhysicalProd* ) self ) -> phys, kcol, is_static );
-            case prodColumn:
-                self = NULL;
-                break;
-            default:
-                return RC ( rcVDB, rcProduction, rcReading, rcType, rcUnknown );
-            }
-        }
-    }
-
-    return rc;
-}
diff --git a/libs/vdb/prod-expr.c b/libs/vdb/prod-expr.c
deleted file mode 100644
index 84ff793..0000000
--- a/libs/vdb/prod-expr.c
+++ /dev/null
@@ -1,885 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define TRACK_REFERENCES 0
-
-#define KONST const
-#include "schema-priv.h"
-#include "schema-expr.h"
-#include "schema-parse.h"
-#include "cursor-priv.h"
-#include "column-priv.h"
-#include "prod-priv.h"
-#include "prod-expr.h"
-#include "phys-priv.h"
-#undef KONST
-
-#include <vdb/schema.h>
-#include <vdb/cursor.h>
-#include <vdb/xform.h>
-#include <klib/symbol.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * VProdResolve
- */
-
-/* CastExpr
- *  inserts an explicit cast operation
- *
- *  in "C" style languages ( okay, ALGOL style ), a cast expression is
- *  used as a means of coercing the rh expression type to a fixed type,
- *  which is then assigned to the lh side with normal typecasting rules.
- *  specifically, performs an intermediate assignment allowing truncation
- *  to reshape and potentially reformat the rh value ( e.g. float to char ).
- *
- *  in "C++" there were new cast operators introduced to indicate more nuance:
- *    static_cast      - permits up and down-casts with compiler check
- *    const_cast       - modifies cv qualifiers [ not applicable to VDB ]
- *    dynamic_cast     - permits up and down-casts with runtime check
- *    reinterpret_cast - permits casts between unrelated classes with
- *                       compatible binary forms ( a la "C" style ).
- *
- *  in "VDB", the compiler preserves lh and rh type information until
- *  productions are resolved. assignments always involve implicit casts
- *  that permit casting from sub to super-type. our explicit cast expression
- *  performs something analogous to the C++ "static_cast" in that it allows
- *  direct up and down casts, as well as sibling and cousin casts.
- *
- *  specifically, LH = ( T ) RH when T is a sub-type of LH and:
- *    a) RH is a sub-type of T [ implicit rule ]
- *    b) T is a sub-type of RH [ downcast ]
- *    c) T and RH share a common ancestor
- *  in all cases, LH, T and RH must all have identical element sizes
- *
- *  implicit typecasting rules allow LH or RH to be a typeset. the types
- *  are initially refined to the intersection between LH and RH
- *    a) TYPE    x TYPE
- *    b) TYPESET x TYPE
- *    c) TYPE    x TYPESET
- *    d) TYPESET x TYPESET
- *  in the latter case, the intersection may produce more than one possible
- *  result, which would incur an error when evaluating the expression. a
- *  cast operator will remove the ambiguity.
- *
- *  the rh expression may involve a column name, with type overloading. this
- *  creates the same effect as a TYPESET. a cast operator can clarify an ambigous
- *  assignment, and in the case of downcasts, make it possible.
- *
- * NB
- *  to perform a C++ style reinterpret_cast, use the "cast" function
- */
-static
-rc_t VProdResolveCastExpr ( const VProdResolve *self, VProduction **out, const SBinExpr *expr )
-{
-    /* extract cast type */
-    VFormatdecl cast;
-    rc_t rc = STypeExprResolveAsFormatdecl
-        ( ( const STypeExpr* ) expr -> left, self -> schema, & cast, self -> cx_bind );
-    if ( rc == 0 )
-    {
-        /* resolve rh expression */
-        VTypedesc desc;
-        VFormatdecl fd = cast;
-        rc = VProdResolveExpr ( self, out, & desc,
-            & fd, expr -> right, true );
-        if ( rc != 0 || * out == NULL )
-            return rc;
-
-        /* casting mode allowed returned production to be:
-           a) identical type
-           b) sub-type
-           c) super-type
-           d) have common parent
-
-           in all cases, the sizeof rh production element
-           matches "cast" size */
-        rc = VSimpleProdMake ( out, self -> owned, self -> curs, prodSimpleCast,
-            "cast", & cast, & desc, NULL, * out, self -> chain );
-    }
-
-    return rc;
-}
-
-/* ParamExpr
- *  resolve a simple parameter by name
- */
-LIB_EXPORT rc_t CC VProdResolveParamExpr ( const VProdResolve *self, VProduction **out, const KSymbol *sym )
-{
-    const SProduction *sprod = sym -> u . obj;
-    VProduction *vprod = VCursorCacheGet ( self -> cache, & sprod -> cid );
-    if ( vprod != NULL )
-    {
-        * out = vprod;
-        return 0;
-    }
-
-    PLOGMSG ( klogWarn, ( klogWarn, "unknown parameter '$(param)' used in expression"
-                          , "param=%.*s"
-                          , ( int ) sprod -> name -> name . size
-                          , sprod -> name -> name . addr ));
-    return 0;
-}
-
-
-/* ProdExpr
- *  resolve a simple production by name
- *  create/return a VSimpleProd object
- */
-rc_t VProdResolveSProduction ( const VProdResolve *self, VProduction **out, const SProduction *sprod )
-{
-    rc_t rc;
-    VFormatdecl fd;
-
-    /* check cache */
-    VProduction *vprod = VCursorCacheGet ( self -> cache, & sprod -> cid );
-    if ( vprod != NULL )
-    {
-        /* return valid or failed production */
-        * out = vprod;
-        return 0;
-    }
-
-    /* pre-fail */
-    rc = VCursorCacheSet ( self -> cache, & sprod -> cid, FAILED_PRODUCTION );
-    if ( rc == 0 )
-    {
-        /* resolve production type */
-        if ( sprod -> trigger )
-            memset ( & fd, 0, sizeof fd );
-        else
-        {
-            rc = STypeExprResolveAsFormatdecl
-                ( ( const STypeExpr* ) sprod -> fd, self -> schema, & fd, self -> cx_bind );
-        }
-    }
-    if ( rc == 0 )
-    {
-        /* resolve assignment expression */
-        VTypedesc desc;
-        rc = VProdResolveExpr ( self, out, & desc,
-            & fd, sprod -> expr, false );
-        if ( rc == 0 && * out != NULL )
-        {
-            const char *name = sprod -> name -> name . addr;
-            assert ( name [ sprod -> name -> name . size ] == 0 );
-            rc = VSimpleProdMake ( out, self -> owned, self -> curs, prodSimpleCast, 
-                name, & fd, & desc, & sprod -> cid, * out, self -> chain );
-            if ( rc == 0 )
-            {
-                void *ignore;
-                rc = VCursorCacheSwap ( self -> cache, & sprod -> cid, * out, & ignore );
-            }
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t VProdResolveProdExpr ( const VProdResolve *self, VProduction **out, const KSymbol *sym )
-{
-    const SProduction *sprod = sym -> u . obj;
-    if ( ! sprod -> trigger )
-        return VProdResolveSProduction ( self, out, sprod );
-
-    PLOGMSG ( klogWarn, ( klogWarn, "trigger production '$(trig)' used in expression"
-                          , "trig=%.*s"
-                          , ( int ) sym -> name . size
-                          , sym -> name . addr ));
-
-    return 0;
-}
-
-
-/* ColumnExpr
- *  the trick about resolving a column reference is in its type
- */
-typedef struct SColumnBestFit SColumnBestFit;
-struct SColumnBestFit
-{
-    BSTNode n;
-    const SColumn *scol;
-    VTypedecl td;
-    uint32_t distance;
-};
-
-static
-rc_t VProdResolveBestColumn ( const VProdResolve *self,
-    VProduction **out, const BSTree *ordered, bool alt )
-{
-    rc_t rc;
-
-    /* walk all candidtes */
-    const SColumnBestFit *n = ( const SColumnBestFit* ) BSTreeFirst ( ordered );
-    for ( rc = 0; n != NULL; n = ( const SColumnBestFit* ) BSTNodeNext ( & n -> n ) )
-    {
-        /* look for open column */
-        const SColumn *scol = n -> scol;
-
-        /* resolve the column as appropriate */
-        rc = VProdResolveColumn ( self, out, scol, alt );
-        if ( rc != 0 || * out != NULL )
-            break;
-    }
-
-    return rc;
-}
-
-static
-int64_t CC order_column ( const BSTNode *item, const BSTNode *n )
-{
-    const SColumnBestFit *a = ( const SColumnBestFit* ) item;
-    const SColumnBestFit *b = ( const SColumnBestFit* ) n;
-    if ( a -> distance != b -> distance )
-        return (int64_t) a -> distance - (int64_t) b -> distance;
-    return VCtxIdCmp ( & a -> scol -> cid, & b -> scol -> cid );
-}
-
-static
-rc_t VProdResolveColExpr ( const VProdResolve *self, VProduction **out,
-    VFormatdecl *fd, const SSymExpr *x, bool casting )
-{
-    rc_t rc;
-    const SNameOverload *sname;
-    const KSymbol *sym = x -> _sym;
-
-    BSTree ordered;
-    uint32_t i, count;
-    SColumnBestFit buff [ 16 ], * nodes = buff;
-
-    /* fail if "fd" has a format */
-    if ( fd -> fmt != 0 )
-    {
-        PLOGMSG ( klogWarn, ( klogWarn, "illegal cast of column '$(name)'"
-                   , "name=%.*s"
-                   , ( int ) sym -> name . size
-                   , sym -> name . addr ));
-        return 0;
-    }
-
-    /* allocate nodes for indexing columns */
-    sname = sym -> u . obj;
-    count = VectorLength ( & sname -> items );
-    if ( count > sizeof buff / sizeof buff [ 0 ] )
-    {
-        nodes = malloc ( sizeof * nodes * count );
-        if ( nodes == NULL )
-            return RC ( rcVDB, rcProduction, rcResolving, rcMemory, rcExhausted );
-    }
-
-    /* insert columns into ordered tree */
-    BSTreeInit ( & ordered );
-    for ( i = VectorStart ( & sname -> items ), count += i; i < count; ++ i )
-    {
-        /* get SColumn */
-        nodes [ i ] . scol = ( const void* ) VectorGet ( & sname -> items, i );
-
-        /* perform type cast and measure distance */
-        if ( casting ?
-             VTypedeclCommonAncestor ( & nodes [ i ] . scol -> td, self -> schema,
-                 & fd -> td, & nodes [ i ] . td, & nodes [ i ] . distance ) :
-             VTypedeclToTypedecl ( & nodes [ i ] . scol -> td, self -> schema,
-                 & fd -> td, & nodes [ i ] . td, & nodes [ i ] . distance ) )
-        {
-            BSTreeInsert ( & ordered, & nodes [ i ] . n, order_column );
-        }
-    }
-
-    /* try to resolve each in order */
-    rc = VProdResolveBestColumn ( self, out, & ordered, x -> alt );
-
-    if ( nodes != buff )
-        free ( nodes );
-
-    return rc;
-}
-
-
-/* PhysExpr
- */
-rc_t VProdResolveSPhysMember ( const VProdResolve *self,
-    VProduction **out, const SPhysMember *smbr )
-{
-    rc_t rc;
-    VCursor *curs;
-    VPhysical *phys;
-
-    curs = self -> curs;
-    phys = VCursorCacheGet ( & curs -> phys, & smbr -> cid );
-    if ( phys != NULL )
-    {
-        /* this guy should be readable, but it is not guaranteed */
-        if ( phys != FAILED_PHYSICAL )
-            * out = phys -> out;
-        return 0;
-    }
-
-    /* pre-fail */
-    rc = VCursorCacheSet ( & curs -> phys, & smbr -> cid, FAILED_PHYSICAL );
-    if ( rc == 0 )
-    {
-        /* create physical object */
-        rc = VPhysicalMake ( & phys, curs, smbr );
-        if ( rc == 0 )
-        {
-            /* build physical */
-            rc = VProdResolvePhysical ( self, phys );
-            if ( rc == 0 && phys -> out > FAILED_PRODUCTION && phys -> b2p > FAILED_PRODUCTION )
-            {
-                /* set success */
-                void *ignore;
-                rc = VCursorCacheSwap ( & curs -> phys, & smbr -> cid, phys, & ignore );
-                if ( rc == 0 )
-                {
-                    * out = phys -> out;
-                    return 0;
-                }
-            }
-            if ( GetRCState ( rc ) == rcUndefined )
-                rc = 0;
-
-            VPhysicalWhack ( phys, NULL );
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t VProdResolvePhysExpr ( const VProdResolve *self,
-    VProduction **out, const KSymbol *sym )
-{
-    if ( self -> chain == chainEncoding )
-    {
-        assert ( self -> curs -> read_only == false );
-        PLOGMSG ( klogWarn, ( klogWarn, "illegal access of physical column '$(name)'"
-                   , "name=%.*s"
-                   , ( int ) sym -> name . size
-                   , sym -> name . addr ));
-        return 0;
-    }
-
-    return VProdResolveSPhysMember ( self, out, sym -> u . obj );
-}
-
-
-/* FwdExpr
- *  handle a forwarded symbol in expression
- *  if the symbol is "virtual", check for its override
- *  map actual symbol type to expression handler
- */
-static
-rc_t VProdResolveFwdExpr ( const VProdResolve *self, VProduction **out,
-    VFormatdecl *fd, const SSymExpr *x, bool casting )
-{
-    /* virtual names that appear in parent table
-       expressions may be overridden in children */
-    const KSymbol *sym = x -> _sym;
-    if ( sym -> type == eVirtual )
-    {
-        /* most derived table class */
-        const STable *stbl = self -> stbl;
-        const KSymbol *sym2 = sym;
-        
-        sym = STableFindOverride ( stbl, ( const VCtxId* ) & sym -> u . fwd );
-        if ( sym == NULL )
-        {
-            PLOGMSG ( klogWarn, ( klogWarn, "virtual reference '$(fwd)' not found in overrides table"
-                       , "fwd=%.*s"
-                       , ( int ) sym2 -> name . size
-                       , sym2 -> name . addr ));
-            return 0;
-        }
-    }
-
-    /* test symbol type */
-    switch ( sym -> type )
-    {
-    case eProduction:
-        return VProdResolveProdExpr ( self, out, sym );
-    case ePhysMember:
-        return VProdResolvePhysExpr ( self, out, sym );
-    case eColumn:
-        return VProdResolveColExpr ( self, out, fd, x, casting );
-    }
-
-    VDB_DEBUG (("%s: unresolved forward reference '%S'",
-                 __func__, &sym->name));
-
-    return 0;
-}
-
-/* ResolveExpr
- *  resolves expression and returns resulting production object
- *
- *  "out" [ IN/OUT, INITIALLY NULL ] - return parameter for production.
- *  assmed to be preset to NULL on input.
- *  invalid on output with non-zero return code
- *  non-NULL on successful resolution with zero return code
- *
- *  "fd" [ IN/OUT ] - resultant type of assignment expression
- *  on input gives acceptance criteria, i.e. a fmtdecl, typeset or wildcard
- *  invalid on output with non-zero return code or NULL "out"
- *  otherwise, gives actual assigned type on output
- *
- *  "casting" [ IN ] - true if performing explicit type casting
- *  see VProdResolveCastExpr for rules
- *
- *  "desc" [ OUT, NULL OKAY ] - resultant type description of "out"
- *  invalid on non-zero return or NULL "out"
- *  contains description of fd->td on success
- *
- *  "cache" [ IN ] - modifiable vector of VProductions by id within
- *  a given scope: table or script function.
- *
- *  "param" [ IN, NULL OKAY ] - modifiable vector of VProduction params
- *  by id - only valid within script function
- *
- *  "expr" [ IN ] - expression to be evaluated
- *
- *  returns non-zero if a non-recoverable error occurs, 0 otherwise.
- *  resolution is only successful on zero return code and non-NULL out.
- */
-#if _DEBUGGING
-#include "schema-dump.h"
-
-static size_t xsz;
-static char xbuffer [ 4096 ];
-
-static
-rc_t CC VProdResolveCapture ( void *data, const void *buffer, size_t size )
-{
-    if ( xsz + size >= sizeof xbuffer )
-    {
-        LOGERR (klogFatal, -1, "( xsz + size >= sizeof xbuffer )");
-        return -1;
-    }
-    memcpy ( & xbuffer [ xsz ], buffer, size );
-    xsz += size;
-    return 0;
-}
-
-static
-const char *VProdResolvePrintExpr ( const VProdResolve *self, const SExpression *expr )
-{
-    SDumper dumper;
-    SDumperInit ( & dumper, self -> schema, sdmPrint, VProdResolveCapture, NULL );
-
-    xsz = 0;
-    SDumperPrint ( & dumper, "%E", expr );
-    SDumperWhack ( & dumper );
-
-    xbuffer [ xsz ] = 0;
-    return xbuffer;
-}
-
-static const char ispaces [] = "                                                                "
-                               "                                                                ";
-static int indent_level = 0;
-#endif
-
-rc_t VProdResolveExpr ( const VProdResolve *self,
-    VProduction **out, VTypedesc *desc, VFormatdecl *fd,
-    const SExpression *expr, bool casting )
-{
-    rc_t rc;
-    VProduction *prod;
-
-    if ( expr == NULL )
-    {
-        /* report NULL expression, but don't die */
-        PLOGMSG ( klogWarn, ( klogWarn, "NULL expression in '$(tbl)' table schema"
-                   , "tbl=%.*s"
-                   , ( int ) self -> stbl -> name -> name . size
-                   , self -> stbl -> name -> name . addr ));
-        return 0;
-    }
-
-    prod = NULL;
-    *out = NULL;
-
-#if _DEBUGGING
-    ++ indent_level;
-    VDB_DEBUG (( "%*cresolving expression '%s'\n", indent_level, ' ',
-                 VProdResolvePrintExpr ( self, expr ) ));
-#endif
-
-    switch ( expr -> var )
-    {
-    case eParamExpr:
-        /* a script function is making reference to a parameter */
-        rc = VProdResolveParamExpr ( self, & prod, ( ( const SSymExpr* ) expr ) -> _sym );
-    assert (rc != -1);
-        break;
-
-    case eProdExpr:
-        /* return a simple production */
-        rc = VProdResolveProdExpr ( self, & prod, ( ( const SSymExpr* ) expr ) -> _sym );
-    assert (rc != -1);
-        break;
-
-    case eFwdExpr:
-        /* handle an implicit or overridden reference */
-        rc = VProdResolveFwdExpr ( self, & prod, fd, ( const SSymExpr* ) expr, casting );
-    assert (rc != -1);
-        break;
-
-    case eColExpr:
-        /* return a column production */
-        rc = VProdResolveColExpr ( self, & prod, fd, ( const SSymExpr* ) expr, casting );
-    assert (rc != -1);
-        break;
-
-    case ePhysExpr:
-        /* return a physical production */
-        rc = VProdResolvePhysExpr ( self, & prod, ( ( const SSymExpr* ) expr ) -> _sym );
-    assert (rc != -1);
-        break;
-
-    case eScriptExpr:
-        /* create a script function */
-        rc = VProdResolveScriptExpr ( self, & prod, fd, ( const SFuncExpr* ) expr );
-    assert (rc != -1);
-        break;
-
-    case eFuncExpr:
-        /* create an external function */
-        rc = VProdResolveFuncExpr ( self, & prod, fd, ( const SFuncExpr* ) expr );
-    assert (rc != -1);
-        break;
-
-    case eCastExpr:
-        /* perform an explicit cast */
-        rc = VProdResolveCastExpr ( self, & prod, ( const SBinExpr* ) expr );
-    assert (rc != -1);
-        break;
-        
-    case eCondExpr:
-        /* run left and right expressions in order until exit condition */
-        rc = VProdResolveExpr ( self, out, desc, fd, ( ( const SBinExpr* ) expr ) -> left, casting );
-    assert (rc != -1);
-        if ( ( rc == 0 && * out == NULL ) || self -> discover_writable_columns )
-        {
-            rc = VProdResolveExpr ( self, out, desc, fd, ( ( const SBinExpr* ) expr ) -> right, casting );
-    assert (rc != -1);
-        }
-#if _DEBUGGING
-        -- indent_level;
-#endif
-        return rc;
-
-    default:
-        /* report bad expression, but don't die */
-        PLOGMSG ( klogWarn, ( klogWarn, "unrecognized expression in '$(tbl)' table schema"
-                   , "tbl=%.*s"
-                   , ( int ) self -> stbl -> name -> name . size
-                   , self -> stbl -> name -> name . addr ));
-#if _DEBUGGING
-        -- indent_level;
-#endif
-        return 0;
-    }
-
-    /* guard against returns of NULL or FAILED_PRODUCTION */
-    if ( rc == 0 && prod > FAILED_PRODUCTION )
-    {
-        VDB_DEBUG ( ("%*cresolved expression  '%s'\n", indent_level, ' ', VProdResolvePrintExpr ( self, expr ) ) );
-
-        /* returned production must be on requested chain */
-        if ( ( prod -> chain & self -> chain ) == 0 )
-        {
-            rc = RC ( rcVDB, rcProduction, rcResolving, rcSchema, rcInconsistent );
-            VDB_DEBUG ( ( "%*cPRODUCTION RESOLVED ON WRONG FORK: %R\n", indent_level, ' ', rc ) );
-        }
-        else
-        {
-            /* fix uncommitted production chain */
-            if ( prod -> chain == chainUncommitted )
-                prod -> chain = self -> chain;
-
-            /* test for type compatibility - modifies "fd" */
-            if ( casting ?
-                 VFormatdeclCommonAncestor ( & prod -> fd, self -> schema, fd, fd, NULL ) :
-                 VFormatdeclToFormatdecl ( & prod -> fd, self -> schema, fd, fd, NULL ) )
-            {
-                /* if no type description is requested, we're done */
-                if ( desc == NULL )
-                    * out = prod;
-                else
-                {
-                    /* otherwise, create a type description */
-                    rc = VSchemaDescribeTypedecl ( self -> schema, desc, & fd -> td );
-    assert (rc != -1);
-                    if ( rc != 0 )
-                        VDB_DEBUG ( ( "%*cREQUESTED TYPE CANNOT BE DESCRIBED: %R\n", indent_level, ' ', rc ) );
-                    else
-                        * out = prod;
-                }
-            }
-            else
-            {
-#if _DEBUGGING
-                char from [ 128 ] = "", to [ 128 ] = "";
-                VTypedeclToText ( & prod -> fd . td, self -> schema, from, sizeof from );
-                VTypedeclToText ( & fd -> td, self -> schema, to, sizeof to );
-                VDB_DEBUG ( ( "%*cexpression '%s' cannot be %s from '%s' to '%s'\n"
-                              , indent_level, ' '
-                              , VProdResolvePrintExpr ( self, expr )
-                              , casting ? "cast" : "typed"
-                              , from
-                              , to
-                             )
-                    );
-#endif
-            }
-        }
-    }
-    else if ( rc != 0 )
-    {
-        VDB_DEBUG ( ( "failed to resolve expression '%s' prod %p %R\n", VProdResolvePrintExpr ( self, expr ), prod, rc ) );
-    }
-    else if ( prod == NULL )
-    {
-        VDB_DEBUG ( ( "expression '%s' was not resolved\n", VProdResolvePrintExpr ( self, expr ) ) );
-    }
-    else
-    {
-        VDB_DEBUG ( ( "expression '%s' returned FAILED_PRODUCTION\n", VProdResolvePrintExpr ( self, expr ) ) );
-    }
-
-#if _DEBUGGING
-    -- indent_level;
-#endif
-
-    return rc;
-}
-
-
-/* ResolveColumn
- *  resolves a column from read/validate expression
- */
-rc_t VProdResolveColumnRead ( const VProdResolve *self,
-    VProduction **out, const SColumn *scol )
-{
-    rc_t rc;
-    VFormatdecl fd;
-    const char *name;
-    VCursor *curs;
-    VColumn *vcol;
-
-    VDB_DEBUG ( ( "resolving column '%N' read expression.\n", scol -> name ) );
-
-    /* potential error if self is NULL */
-    curs = self -> curs;
-    if ( out == NULL )
-    {
-        rc =  RC(rcVDB, rcProduction, rcResolving, rcParam, rcNull);
-        VDB_DEBUG ( ( "result NULL for column '%N'; no output can be produced by '%s' rc %R\n",
-                      scol -> name, __func__, rc ) );
-        return rc;
-    }
-    
-    /* fetch the column */
-    vcol = VCursorCacheGet ( & curs -> col, & scol -> cid );
-    if ( vcol == NULL )
-    {
-        VDB_DEBUG ( ( "failed to fetch NULL for column '%N'; no output was produced by '%s'\n",
-                      scol -> name, __func__ ) );
-        return 0;
-    }
-
-    /* if the read production is in place, return it */
-    if ( vcol -> in != NULL )
-    {
-        if ( vcol -> in != FAILED_PRODUCTION )
-            * out = vcol -> in;
-        return 0;
-    }
-
-    /* pre-fail */
-    vcol -> in = FAILED_PRODUCTION;
-
-    /* production resolution works with fmtdecl */
-    fd . td = scol -> td;
-    fd . fmt = 0;
-
-    /* resolve the expression */
-    rc = VProdResolveExpr ( self, out, & vcol -> desc, & fd, scol -> read, false );
-    assert (rc != -1);
-
-    if ( rc != 0 || *out == NULL )
-        return rc;
-
-    /* repair incomplete column declarations */
-    if ( scol -> td . type_id == 0 )
-    {
-        if ( fd . td . type_id == 0 )
-        {
-            rc = RC ( rcVDB, rcColumn, rcResolving, rcType, rcUndefined );
-            VDB_DEBUG (("failed to repair incomplete declaration for column '%N' rc %R\n",
-                        scol -> name, rc));
-            return rc;
-        }
-        ( ( SColumn* ) scol ) -> td = fd . td;
-    }
-
-    /* create a simple prod to manage fd and desc */
-    name = scol -> name -> name . addr;
-    assert ( name [ scol -> name -> name . size ] == 0 );
-    rc = VSimpleProdMake ( out, self -> owned, self -> curs, prodSimpleCast,
-        name, & fd, & vcol -> desc, NULL, * out, self -> chain );
-
-    assert (rc != -1);
-    if ( rc != 0 )
-    {
-        VDB_DEBUG (("failed to create a simple prod to manage fd and desc for column '%N', rc %R\n",
-                    scol -> name, rc));
-        return rc;
-    }
-
-    /* return column input - this is input to the column
-       that is intended to be read from the cursor */
-    vcol -> in = * out;
-    return rc;
-}
-
-/* ResolvePhysical
- *  resolves a physical column
- */
-rc_t VProdResolvePhysicalRead ( const VProdResolve *self, VPhysical *phys )
-{
-    rc_t rc;
-    VTypedesc desc;
-    VFormatdecl fd;
-    VProduction *prod;
-    VFunctionProd *bs;
-    VCursor *curs = self -> curs;
-
-    const char *name;
-    const SExpression *enc;
-    const SPhysMember *smbr;
-
-    /* a write cursor would have opened this already */
-    if ( curs -> read_only )
-    {
-        /* open the physical column for read */
-        rc = VPhysicalOpenRead ( phys,
-            ( VSchema* ) self -> schema, curs -> tbl );
-        if ( rc != 0 )
-        {
-            /* trying to open a column that doesn't exist
-               is not an error, but it didn't resolve */
-            if ( GetRCState ( rc ) == rcNotFound )
-                return 0;
-
-            return rc;
-        }
-    }
-
-    /* should be completely resolved */
-    smbr = phys -> smbr;
-    if ( smbr -> td . type_id == 0 )
-        return 0;
-
-    /* production name */
-    name = smbr -> name -> name . addr;
-
-    /* type information */
-    fd . td = smbr -> td;
-    fd . fmt = 0;
-    rc = VSchemaDescribeTypedecl ( self -> schema, & desc, & fd . td );
-    if ( rc != 0 )
-        return rc;
-
-    /* create output adapter */
-    rc = VPhysicalProdMake ( & prod, self -> owned,
-        curs, phys, prodPhysicalOut, name, & fd, & desc );
-    if ( rc != 0 )
-        return rc;
-
-    /* create byte-swap function with transparent type information */
-    rc = VFunctionProdMake ( & bs, self -> owned,
-        curs, prodFuncByteswap, name, & fd, & desc, chainDecoding );
-    if ( rc != 0 )
-        return rc;
-
-    /* set adapter as input to byte swap */
-    rc = VectorAppend ( & bs -> parms, NULL, prod );
-    if ( rc != 0 )
-        return rc;
-
-    /* take byte-swap function as output */
-    phys -> out = & bs -> dad;
-
-    /* NB - we now have byte-order native output via an adapter
-       it remains to create a decoding path for physical blobs */
-
-
-    /* create adapter */
-    rc = VPhysicalProdMake ( & prod, self -> owned,
-        curs, phys, prodPhysicalKCol, name, & fd, & desc );
-    if ( rc != 0 )
-        return rc;
-
-    /* create serial-to-blob stage */
-    rc = VSimpleProdMake ( & prod, self -> owned, self->curs,
-        prodSimpleSerial2Blob, name, & fd, & desc, NULL, prod, chainDecoding );
-    if ( rc != 0 )
-        return rc;
-
-    /* determine physical encoding */
-    enc = phys -> enc;
-    if ( enc == NULL )
-        enc = smbr -> type;
-
-    /* if unencoded */
-    if ( enc == NULL )
-        phys -> b2p = prod;
-    else
-    {
-        /* the adapter type should be undefined */
-        memset ( & prod -> fd, 0, sizeof prod -> fd );
-        prod -> desc . intrinsic_bits = prod -> desc . intrinsic_dim = 1;
-        prod -> desc . domain = 0;
-
-        /* create decoding production */
-        rc = VProdResolveEncodingExpr ( self, & phys -> b2p,
-            prod, ( const SPhysEncExpr* ) enc );
-    }
-
-    return rc;
-}
diff --git a/libs/vdb/prod-expr.h b/libs/vdb/prod-expr.h
deleted file mode 100644
index d35a839..0000000
--- a/libs/vdb/prod-expr.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_prod_expr_
-#define _h_prod_expr_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_cursor_priv_
-#include "cursor-priv.h"
-#endif
-
-#ifndef _h_prod_priv_
-#include "prod-priv.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct BSTree;
-struct KDlset;
-struct VSchema;
-struct SProduction;
-struct SPhysMember;
-struct SColumn;
-struct SExpression;
-struct SFuncExpr;
-struct SPhysEncExpr;
-struct VLinker;
-struct VPhysical;
-
-
-/*--------------------------------------------------------------------------
- * VProduction
- */
-
-/* symbol for failed production */
-#define FAILED_PRODUCTION ( ( VProduction* ) 1U )
-
-
-/*--------------------------------------------------------------------------
- * VTypedecl
- */
-
-/* Resolve
- *  ensures typedecl is completely resolved
- */
-rc_t VTypedeclResolve ( const VTypedecl *self,
-    struct VSchema const *schema, VTypedecl *resolved );
-
-
-/*--------------------------------------------------------------------------
- * VProdResolve
- */
-typedef struct VProdResolve VProdResolve;
-struct VProdResolve
-{
-    /* source of type-related information, functions and structures */
-    struct VSchema const *schema;
-
-    /* source of factory functions */
-    struct VLinker *ld;
-    struct KDlset const *libs;
-
-    /* schema of table being resolved */
-    struct STable const *stbl;
-
-    /* cursor containing columns, physicals, productions, triggers */
-    struct VCursor *curs;
-
-    /* vector of cached named productions */
-    VCursorCache *cache;
-
-    /* vector of owned productions */
-    Vector *owned;
-
-    /* vector of late-binding expressions */
-    Vector *cx_bind;
-
-    /* which chain is being resolved
-       chainEncoding    - when going from input to physical
-       chainDecoding    - when pulling from physical to output
-       chainUncommitted - when resolving trigger and validation expressions
-    */
-    uint8_t chain;
-
-    /* true if within blob realm */
-    bool blobbing;
-
-    /* true if column resolution errors should NOT halt cursor open */
-    bool ignore_column_errors;
-
-    /* true if discovering writable columns */
-    bool discover_writable_columns;
-};
-
-
-/* ResolveColumn
- *  resolves a column using read/validate expression
- */
-rc_t VProdResolveColumn ( const VProdResolve *self,
-    VProduction **out, struct SColumn const *scol, bool alt );
-rc_t VProdResolveColumnRoot ( const VProdResolve *self,
-    VProduction **out, struct SColumn const *scol );
-rc_t VProdResolveColumnRead ( const VProdResolve *self,
-    VProduction **out, struct SColumn const *scol );
-
-
-/* ResolvePhysical
- *  resolves a physical column
- */
-rc_t VProdResolvePhysical ( const VProdResolve *self,
-    struct VPhysical *phys );
-rc_t VProdResolvePhysicalRead ( const VProdResolve *self,
-    struct VPhysical *phys );
-
-
-/* ResolveExpr
- *  resolves expression and returns resulting production object
- *
- *  "out" [ IN/OUT, INITIALLY NULL ] - return parameter for production.
- *  assmed to be preset to NULL on input.
- *  invalid on output with non-zero return code
- *  non-NULL on successful resolution with zero return code
- *
- *  "fd" [ IN/OUT ] - resultant type of assignment expression
- *  on input gives acceptance criteria, i.e. a fmtdecl, typeset or wildcard
- *  invalid on output with non-zero return code or NULL "out"
- *  otherwise, gives actual assigned type on output
- *
- *  "desc" [ OUT, NULL OKAY ] - resultant type description of "out"
- *  invalid on non-zero return or NULL "out"
- *  contains description of fd->td on success
- *
- *  "expr" [ IN ] - expression to be evaluated
- *
- *  "casting" [ IN ] - true if performing explicit type casting
- *  see VProdResolveCastExpr for rules
- *
- *  returns non-zero if a non-recoverable error occurs, 0 otherwise.
- *  resolution is only successful on zero return code and non-NULL out.
- */
-rc_t VProdResolveExpr ( const VProdResolve *self,
-    VProduction **out, VTypedesc *desc, VFormatdecl *fd,
-    struct SExpression const *expr, bool casting );
-
-/* resolves any type of SProduction */
-rc_t VProdResolveSProduction ( const VProdResolve *self, VProduction **out,
-    struct SProduction const *sprod );
-
-/* resolves an SPhysMember symbol */
-rc_t VProdResolveSPhysMember ( const VProdResolve *self,
-    VProduction **out, struct SPhysMember const *smbr );
-
-/* resolves a script function */
-rc_t VProdResolveScriptExpr ( const VProdResolve *self, VProduction **out,
-    const VFormatdecl *lval_fd, struct SFuncExpr const *expr );
-
-/* resolves an external function */
-rc_t VProdResolveFuncExpr ( const VProdResolve *self, VProduction **out,
-    const VFormatdecl *lval_fd, struct SFuncExpr const *expr );
-
-/* resolves physical encoding/decoding expr */
-rc_t VProdResolveEncodingExpr ( const VProdResolve *self, VProduction **out,
-    VProduction *in, struct SPhysEncExpr const *expr );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_prod_expr_ */
diff --git a/libs/vdb/prod-func.c b/libs/vdb/prod-func.c
deleted file mode 100644
index a964d4c..0000000
--- a/libs/vdb/prod-func.c
+++ /dev/null
@@ -1,957 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define TRACK_REFERENCES 0
-
-#include <vdb/extern.h>
-
-#define KONST const
-#include "prod-priv.h"
-#include "prod-expr.h"
-#include "dbmgr-priv.h"
-#include "schema-priv.h"
-#include "schema-parse.h"
-#include "schema-expr.h"
-#include "linker-priv.h"
-#include "table-priv.h"
-#include "cursor-priv.h"
-#include "column-priv.h"
-#include "phys-priv.h"
-#undef KONST
-
-#include <vdb/manager.h>
-#include <vdb/cursor.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/symbol.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-
-/*--------------------------------------------------------------------------
- * VProdResolve
- */
-typedef struct SFunctionPushParam SFunctionPushParam;
-struct SFunctionPushParam
-{
-    /* vectors to allow recursive evaluation of types and functions */
-    Vector schema_prior;
-    Vector fact_parms, fact_prior;
-
-    VFormatdecl fd;
-    VTypedesc desc;
-};
-
-static
-rc_t SFunctionPush ( const SFunction *self, const VProdResolve *pr,
-    const VFormatdecl *lval_fd, const SFuncExpr *expr, SFunctionPushParam *pb )
-{
-    rc_t rc;
-    const VSchema *schema = pr -> schema;
-
-    /* validate input parameter counts against formal list */
-    uint32_t count = VectorLength ( & expr -> pfunc );
-    if ( count < self -> func . mand )
-    {
-        rc = RC ( rcVDB, rcFunction, rcResolving, rcParam, rcInsufficient );
-        PLOGERR ( klogWarn, ( klogWarn, rc,
-                   "function '$(func)' requires $(mand) params but got $(count)",
-                   "func=%.*s,mand=%u,count=%u",
-                   self->name->name.len, self->name->name.addr,
-                   self->func.mand,
-                   count
-                 ));
-    }
-    else
-    {
-        uint32_t end = VectorLength ( & self -> func . parms );
-        if ( end < count && ! self -> func . vararg )
-        {
-            rc = RC ( rcVDB, rcFunction, rcResolving, rcParam, rcExcessive );
-            PLOGERR ( klogWarn, ( klogWarn, rc,
-                       "function '$(func)' requires $(mand) params but got $(count)",
-                       "func=%.*s,mand=%u,count=%u",
-                       self->name->name.len, self->name->name.addr,
-                       end,
-                       count
-                     ));
-        }
-        /* ensure this is not an untyped function */
-        else if ( ! self -> validate && self -> rt == NULL )
-            rc = RC ( rcVDB, rcFunction, rcResolving, rcFunction, rcIncorrect );
-        else
-        {
-            /* bind schema params */
-            rc = SFunctionBindSchemaParms ( self, & pb -> schema_prior, & expr -> schem, pr -> cx_bind );
-            if ( rc == 0 )
-            {
-                /* resolve return type */
-                if ( self -> validate )
-                {
-                    /* set type to "void" */
-                    pb -> fd . td . type_id = pb -> fd . td . dim = 1;
-                    pb -> fd . fmt = 0;
-                    memset ( & pb -> desc, 0, sizeof pb -> desc );
-                    pb -> desc . intrinsic_bits = 1;
-                    pb -> desc . intrinsic_dim = 1;
-                }
-                else
-                {
-                    rc = STypeExprResolveAsFormatdecl
-                        ( ( const STypeExpr* ) self -> rt, schema, & pb -> fd, pr -> cx_bind );
-                    if ( rc == 0 )
-                    {
-                        /* pick up cast from lval when return type is "any" or typeset */
-                        if ( pb -> fd . td . type_id == 0 ||
-                             pb -> fd . td . type_id >= 0x40000000 )
-                        {
-                            VFormatdecl cast;
-
-                            if ( VFormatdeclCommonAncestor ( & pb -> fd, schema, lval_fd, & cast, NULL ) )
-                                pb -> fd = cast;
-                            else
-                            {
-                                const KSymbol *fd_name = NULL;
-                                const KSymbol *lval_name = NULL;
-                            
-                                const SDatatype *dt = VSchemaFindTypeid ( schema, lval_fd -> td . type_id );
-                                if ( dt != NULL )
-                                    lval_name = dt -> name;
-                                
-                                dt = VSchemaFindTypeid ( schema, pb -> fd . td . type_id );
-                                if ( dt != NULL )
-                                    fd_name = dt -> name;
-                                else
-                                {
-                                    const STypeset *ts = VSchemaFindTypesetid ( schema, pb -> fd . td . type_id );
-                                    if ( ts != NULL )
-                                        fd_name = ts->name;
-                                }
-
-                                if ( lval_name != NULL && fd_name != NULL ) 
-                                {
-                                    PLOGMSG ( klogWarn, ( klogWarn,
-                                               "function '$(func)' could not resolve return type '$(rtype)' in '$(typeset)'",
-                                               "func=%.*s,rtype=%.*s,typeset=%.*s",
-                                               self->name->name.len, self->name->name.addr,
-                                               lval_name->name.len, lval_name->name.addr,
-                                               fd_name->name.len, fd_name->name.addr
-                                                  ));
-                                }
-                                else
-                                {
-                                    PLOGMSG ( klogInt, ( klogInt,
-                                               "function '$(func)' could not resolve return type or type names!",
-                                               "func=%.*s",
-                                               self->name->name.len, self->name->name.addr
-                                                 ));
-                                }
-                            }
-                        }
-
-                        /* pick up cast from lval when return dimension is "*" */
-                        else if ( pb -> fd . td . dim == 0 )
-                        {
-                            VTypedesc lh_desc, rh_desc;
-                            /* since rh type is T' and is cast to lh type T,
-                               missing dimension is sizeof ( T[dim] ) / sizeof ( T' ) */
-                            rc = VSchemaDescribeTypedecl ( schema, & lh_desc, & lval_fd -> td );
-                            if ( rc == 0 )
-                            {
-                                VTypedecl rh_td;
-                                rh_td . type_id = pb -> fd . td . type_id;
-                                rh_td . dim = 1;
-                                rc = VSchemaDescribeTypedecl ( schema, & rh_desc, & rh_td );
-                                if ( rc == 0 )
-                                {
-                                    pb -> fd . td . dim = VTypedescSizeof ( & lh_desc ) /
-                                        VTypedescSizeof ( & rh_desc );
-
-                                    /* force dimension "*" to be at least 1 */
-                                    if ( pb -> fd . td . dim == 0 )
-                                        pb -> fd . td . dim = 1;
-                                }
-                            }
-                        }
-
-                        /* evaluate type description */
-                        rc = VSchemaDescribeTypedecl ( schema, & pb -> desc, & pb -> fd . td );
-                    }
-                }
-                 
-                if ( rc == 0 )
-                {
-                    /* bind factory params */
-                    rc = SFunctionBindFactParms ( self, & pb -> fact_parms, & pb -> fact_prior, & expr -> pfact, pr -> cx_bind );
-                    if ( rc == 0 )
-                        return 0;
-                }
-
-                SFunctionRestSchemaParms ( self, & pb -> schema_prior, pr -> cx_bind );
-            }
-        }
-    }
-
-    LOGERR ( klogWarn, rc, "failed to resolve function expression" );
-    return rc;
-}
-
-static
-void SFunctionPop ( const SFunction *self,
-    const VProdResolve *pr, SFunctionPushParam *pb )
-{
-    SFunctionRestFactParms ( self, & pb -> fact_prior, pr -> cx_bind );
-    SFunctionRestSchemaParms ( self, & pb -> schema_prior, pr -> cx_bind );
-    VectorWhack ( & pb -> fact_parms, NULL, NULL );
-}
-
-static
-rc_t VProdResolveFuncParamExpr ( const VProdResolve *self, Vector *out,
-    VFormatdecl *fd, const SExpression *expr, const SProduction *sprod )
-{
-    /* Create a production to resolve the expression; also set its
-     * type description */
-    VTypedesc desc;
-    VProduction *prod = NULL;
-    rc_t rc = VProdResolveExpr ( self, & prod, & desc, fd, expr, false );
-    if ( rc == 0 )
-    {
-        if ( prod == NULL )
-            rc = RC ( rcVDB, rcFunction, rcResolving, rcProduction, rcIncomplete );
-        else
-        {
-            bool control;
-            const char *name;
-
-            if ( sprod == NULL )
-            {
-                control = false;
-                name = "vararg";
-            }
-            else
-            {
-                control = sprod -> control;
-                name = sprod -> name -> name . addr;
-                assert ( name [ sprod -> name -> name . size ] == 0 );
-            }
-
-            rc = VSimpleProdMake ( & prod, self -> owned, self-> curs,
-                prodSimpleCast, name,fd, & desc, NULL, prod, self -> chain);
-            if ( rc == 0 )
-            {
-                prod -> control = control;
-                rc = sprod ?
-                    VectorSet ( out, prod -> cid . id = sprod -> cid . id, prod ):
-                    VectorAppend ( out, & prod -> cid . id, prod );
-                if ( rc != 0 )
-                    VProductionWhack ( prod, self -> owned );
-            }
-        }
-    }
-    return rc;
-}
-
-static
-rc_t VProdResolveValidateFuncParams ( const VProdResolve *self, Vector *out,
-    const SFormParmlist *formal, const Vector *expr )
-{
-    rc_t rc;
-    VFormatdecl fd;
-    const SProduction *sprod;
-
-    uint32_t count = VectorLength ( expr );
-    uint32_t end = VectorLength ( & formal -> parms );
-    VectorInit ( out, 0, count );
-
-    /* formal param count must be 2 */
-    assert ( end == 2 );
-
-    /* input param count must equal formals */
-    if ( count != end )
-    {
-        if ( count > end )
-            return RC ( rcVDB, rcFunction, rcResolving, rcParam, rcExcessive );
-        return RC ( rcVDB, rcFunction, rcResolving, rcParam, rcInsufficient );
-    }
-
-    /* resolve production type */
-    sprod = ( const void* ) VectorGet ( & formal -> parms, 0 );
-    rc = STypeExprResolveAsFormatdecl
-        ( ( const STypeExpr* ) sprod -> fd, self -> schema, & fd, self -> cx_bind );
-    if ( rc == 0 )
-    {
-        /* bring in source parameter */
-        const SExpression *pexpr = VectorGet ( expr, 0 );
-
-        /* create copy of resolve block and set to write side */
-        VProdResolve pr = * self;
-        pr . chain = chainEncoding;
-
-        /* resolve source parameter */
-        rc = VProdResolveFuncParamExpr ( & pr, out, & fd, pexpr, sprod );
-        if ( rc == 0 )
-        {
-            /* comparison formal */
-            sprod = ( const void* ) VectorGet ( & formal -> parms, 1 );
-            rc = STypeExprResolveAsFormatdecl
-                ( ( const STypeExpr* ) sprod -> fd, self -> schema, & fd, self -> cx_bind );
-            if ( rc == 0 )
-            {
-                /* bring in comparison parameter */
-                pexpr = VectorGet ( expr, 1 );
-
-                /* evaluate on read side */
-                pr . chain = chainDecoding;
-
-                /* resolve comparison parameter */
-                rc = VProdResolveFuncParamExpr ( & pr, out, & fd, pexpr, sprod );
-            }
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t VProdResolveFuncParams ( const VProdResolve *self, Vector *out,
-     const SFormParmlist *formal, const Vector *expr )
-{
-    rc_t rc;
-    VFormatdecl fd, ffd;
-
-    uint32_t i, count = VectorLength ( expr );
-    uint32_t end = VectorLength ( & formal -> parms );
-    VectorInit ( out, 0, count );
-
-    /* assert that there is at least one formal param
-       or that we don't have varargs */
-    assert ( end != 0 || count == 0 );
-
-    /* resolve named parameters */
-    for ( rc = 0, i = 0; rc == 0 && i < count && i < end; ++ i )
-    {
-        /* resolve production type */
-        const SProduction *sprod = ( const void* ) VectorGet ( & formal -> parms, i );
-        rc = STypeExprResolveAsFormatdecl
-            ( ( const STypeExpr* ) sprod -> fd, self -> schema, & fd, self -> cx_bind );
-        if ( rc == 0 )
-        {
-            /* bring in parameter */
-            const SExpression *pexpr = VectorGet ( expr, i );
-            ffd = fd;
-            rc = VProdResolveFuncParamExpr ( self, out, & fd, pexpr, sprod );
-        }
-    }
-
-    /* resolve vararg parameters */
-    for ( ; rc == 0 && i < count; ++ i )
-    {
-        
-        const SExpression *pexpr = VectorGet ( expr, i );
-
-#if 0
-        /* use type "any" */
-        memset ( & fd, 0, sizeof fd );
-#else
-        /* use last formal type */
-        fd = ffd;
-#endif
-
-        rc = VProdResolveFuncParamExpr ( self, out, & fd, pexpr, NULL );
-    }
-
-    return rc;
-}
-
-rc_t VProdResolveScriptExpr ( const VProdResolve *self,
-    VProduction **out, const VFormatdecl *lval_fd, const SFuncExpr *expr )
-{
-    const SFunction *func = expr -> func;
-
-    SFunctionPushParam pb;
-    rc_t rc = SFunctionPush ( func, self, lval_fd, expr, & pb );
-    if ( rc == 0 )
-    {
-        Vector *inputs = malloc ( sizeof * inputs );
-        if ( inputs == NULL )
-            rc = RC ( rcVDB, rcVector, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            rc = VProdResolveFuncParams ( self, inputs,
-                & func -> func, & expr -> pfunc );
-            if ( rc == 0 )
-            {
-                /* script name
-                   heuristic - known to have been created with NUL term */
-                const char *name = expr -> func -> name -> name . addr;
-
-                /* by this time, we have bound all parameters */
-                VScriptProd *script;
-                rc = VScriptProdMake ( & script, self -> owned, self -> curs,
-                    prodScriptFunction, name, & pb . fd, & pb . desc, self -> chain );
-                if ( rc == 0 )
-                {
-                    VCursorCache local;
-                    VCursorCacheInit ( & local, 0, 2 );
-
-                    rc = VectorAppend ( & local . cache, NULL, inputs );
-                    if ( rc == 0 )
-                    {
-                        /* create new structure */
-                        VProdResolve spr = * self;
-                        spr . cache = & local;
-                        spr . owned = & script -> owned;
-
-                        /* forget about the inputs */
-                        inputs = NULL;
-
-                        /* now evaluate the return expression */
-                        rc = VProdResolveExpr ( & spr, & script -> rtn, NULL, & pb . fd,
-                            func -> u . script . rtn, false );
-                        if ( rc != 0 || script -> rtn == NULL )
-                            VProductionWhack ( & script -> dad, self -> owned );
-                        else
-                        {
-                            * out = & script -> dad;
-                        }
-                    }
-
-                    VCursorCacheWhack ( & local, NULL, NULL );
-                }
-            }
-            else if ( GetRCState ( rc ) == rcIncomplete )
-            {
-                /* reset errors when input parameters could not be resolved */
-                rc = 0;
-            }
-
-            if ( inputs != NULL )
-            {
-                VectorWhack ( inputs, NULL, NULL );
-                free ( inputs );
-            }
-        }
-
-        SFunctionPop ( func, self, & pb );
-    }
-
-    return rc;
-}
-
-static
-rc_t VFunctionProdMakeFactParms ( VFunctionProd *self, const VProdResolve *pr,
-    const SFormParmlist *pfact, const Vector *pval, VFactoryParams *fp, const SConstExpr **cxp )
-{
-    rc_t rc;
-    VTypedecl td;
-    const VSchema *schema = pr -> schema;
-    uint32_t i, last = 0, count = fp -> argc;
-
-    for ( rc = 0, i = 0; rc == 0 && i < count; ++ i )
-    {
-        /* fetch the formal parameter, which can be NULL
-           when the factory parameters allow varargs */
-        const SIndirectConst *ic = ( const void* ) VectorGet ( & pfact -> parms, i );
-        if ( ic != NULL )
-            last = i;
-        else
-        {
-            assert ( i != 0 );
-
-            /* just use the last parameter's type */
-            ic = ( const void* ) VectorGet ( & pfact -> parms, last );
-            assert ( ic != NULL );
-        }
-
-        /* TBD - nobody is using function pointer parameters yet */
-        if ( ic -> td == NULL )
-        {
-            rc = RC ( rcVDB, rcFunction, rcConstructing, rcType, rcNull );
-            LOGERR ( klogFatal, rc, "function factory with function param" );
-            break;
-        }
-
-        /* evaluate constant typedecl */
-        rc = STypeExprResolveAsTypedecl ( ( const STypeExpr* ) ic -> td, schema, & td, pr -> cx_bind );
-        if ( rc == 0 )
-            rc = VSchemaDescribeTypedecl ( schema, & fp -> argv [ i ] . desc, & td );
-
-        if ( rc == 0 )
-        {
-            /* evaluate constant expression */
-            const SExpression *ic_expr = ( const void* ) VectorGet ( pval, i );
-            assert ( ic_expr != NULL );
-            rc = eval_const_expr ( schema, & td, ic_expr, ( SExpression** ) & cxp [ i ], pr -> cx_bind );
-            if ( rc == 0 )
-            {
-                /* catch undefined factory parameters from outer script */
-                if ( cxp [ i ] -> dad . var == eIndirectExpr )
-                {
-                    if ( fp -> argc > i )
-                        fp -> argc = i;
-                }
-                else if ( cxp [ i ] -> dad . var != eConstExpr )
-                {
-                    rc = -1;
-                    LOGERR (klogFatal, rc, "(cxp[i]->dad.var != eConstExpr)");
-                    break;
-                }
-                else if ( i >= fp -> argc )
-                {
-                    rc = -1;
-                    LOGERR (klogFatal, rc, "(i >= fp->argc)");
-                    break;
-                }
-                else
-                {
-                    fp -> argv [ i ] . data . u8 = cxp [ i ] -> u . u8;
-                    fp -> argv [ i ] . count = cxp [ i ] -> td . dim;
-                }
-            }
-        }
-    }
-
-    for ( ; i < count; ++ i )
-        cxp [ i ] = NULL;
-
-    return rc;
-}
-
-static
-rc_t VProdResolveInvokeFactory ( const VProdResolve *self, const VXfactInfo *info,
-    VFunctionProd *fprod, const VFactoryParams *cp, const VFunctionParams *dp,
-    VTransDesc *td, bool external )
-{
-    rc_t rc;
-
-    VFuncDesc desc;
-    memset ( & desc, 0, sizeof desc );
-
-    rc = ( * td -> factory ) ( td -> fself, info, & desc, cp, dp );
-    assert ( rc != -1 );
-
-    /* clobber returned context */
-    if ( rc != 0 )
-        rc = ResetRCContext ( rc, rcVDB, rcFunction, rcConstructing );
-
-    /* TBD - validate the returned value */
-    else if ( external &&
-        ( desc . variant == vftInvalid ||
-          desc . variant > vftBlob ||
-          desc . u . bf == NULL ) )
-    {
-        rc = RC ( rcVDB, rcFunction, rcConstructing, rcType, rcInvalid );
-    }
-    else
-    {
-        fprod -> fself = desc . self;
-        fprod -> whack = desc . whack;
-        fprod -> u . rf = desc . u . rf;
-        fprod -> dad . sub = ( uint8_t ) desc . variant;
-    }
-
-    return rc;
-}
-
-static
-rc_t VProdResolveBuildFuncParms ( const VProdResolve *self, const VXfactInfo *info,
-    VFunctionProd *fprod, const VFactoryParams *cp, VTransDesc *td, bool external )
-{
-    rc_t rc;
-    uint32_t i, count;
-
-    /* create a block of function parameters
-       start with data on the stack */
-    VFunctionParams fpbuff, * fp = & fpbuff;
-    count = VectorLength ( & fprod -> parms );
-    if ( count > sizeof fpbuff . argv / sizeof fpbuff . argv [ 0 ] )
-    {
-        fp = malloc ( sizeof fpbuff -
-                      sizeof fpbuff . argv +
-                      count * sizeof fpbuff . argv [ 0 ] );
-        if ( fp == NULL )
-            return RC ( rcVDB, rcFunction, rcResolving, rcMemory, rcExhausted );
-    }
-
-    fp -> argc = count;
-
-    /* copy types */
-    for ( i = 0; i < count; ++ i )
-    {
-        const VProduction *vprod = ( const void* ) VectorGet ( & fprod -> parms, i );
-        fp -> argv [ i ] . fd = vprod -> fd;
-        fp -> argv [ i ] . desc = vprod -> desc;
-    }
-
-    rc = VProdResolveInvokeFactory ( self, info, fprod, cp, fp, td, external );
-
-    if ( fp != & fpbuff )
-        free ( fp );
-
-    return rc;
-}
-
-static
-rc_t VProdResolveBuildFactParms ( const VProdResolve *self, const VXfactInfo *info,
-    VFunctionProd *fprod, const SFormParmlist *pfact, const Vector *pval,
-    VTransDesc *td, bool external )
-{
-    rc_t rc;
-    uint32_t i;
-
-    /* count the number of parameters */
-    uint32_t count = VectorLength ( pval );
-
-    /* create a block of factory parameters
-       start with data on the stack */
-    VFactoryParams fpbuff, * fp = & fpbuff;
-    const SConstExpr *cxbuff [ 16 ], **cxp = cxbuff;
-
-    /* 9/11/13
-       VFactoryParams has a declared array of 16 elements.
-       cxbuff is also declared to have 16 elements. the idea
-       is that they stay in sync. */
-    assert ( sizeof fpbuff . argv / sizeof fpbuff . argv [ 0 ] ==
-             sizeof cxbuff / sizeof cxbuff [ 0 ] );
-
-    /* 16 is generally more than enough parameters.
-       but in cases where it may not be ( e.g. maps ),
-       malloc the memory according to count. */
-    if ( count > sizeof fpbuff . argv / sizeof fpbuff . argv [ 0 ] )
-    {
-        /* allocate both structures in a single block */
-        fp = malloc ( sizeof fpbuff -
-                      sizeof fpbuff . argv +
-                      count * ( sizeof fpbuff . argv [ 0 ] + sizeof cxbuff [ 0 ] ) );
-
-        if ( fp == NULL )
-            return RC ( rcVDB, rcFunction, rcResolving, rcMemory, rcExhausted );
-
-        /* reset expression array to point within block */
-        cxp = ( const SConstExpr** ) & fp -> argv [ count ];
-    }
-
-    fp -> argc = count;
-    fp -> align = 0;
-
-    /* the purpose of this function is to bind type expressions to type ids
-       before the remainder of the function is evaluated. for this to work,
-       we need a mapping of parameterized type ids to expressions.
-
-       the purpose of the cx array is to enable recursion by saving previously
-       bound expressions upon entry ... */
-    rc = VFunctionProdMakeFactParms ( fprod, self, pfact, pval, fp, cxp );
-    assert ( rc != -1 );
-    if ( rc == 0 )
-        rc = VProdResolveBuildFuncParms ( self, info, fprod, fp, td, external );
-    assert ( rc != -1 );
-
-    for ( i = 0; i < count; ++ i )
-        SExpressionWhack ( & cxp [ i ] -> dad );
-
-    if ( fp != & fpbuff )
-        free ( fp );
-
-    return rc;
-}
-
-rc_t VProdResolveFuncExpr ( const VProdResolve *self,
-    VProduction **out, const VFormatdecl *lval_fd, const SFuncExpr *expr )
-{
-    const SFunction *sfunc = expr -> func;
-    const char *name = sfunc -> name -> name . addr;
-
-    SFunctionPushParam pb;
-    rc_t rc = SFunctionPush ( sfunc, self, lval_fd, expr, & pb );
-
-    assert ( rc != -1 );
-
-    if ( rc == 0 )
-    {
-        bool external;
-        VTransDesc td;
-        VXfactInfo info;
-
-        /* pass function type information */
-        info . fdesc . fd = pb . fd;
-        info . fdesc . desc = pb . desc;
-
-        /* locate factory function */
-        rc = VLinkerFindFactory ( self -> ld, self -> libs, & td, sfunc,
-            expr -> version_requested ? expr -> version : sfunc -> version,
-            & external );
-        if ( rc == 0 )
-        {
-            /* create a production representing function */
-            VFunctionProd *fprod;
-            rc = VFunctionProdMake ( & fprod, self -> owned,
-                self -> curs, vftInvalid, name, & info . fdesc . fd,
-                & info . fdesc . desc, self -> chain );
-            if ( rc == 0 )
-            {
-                /* check for a validation function
-                   these functions are generally compiler-generated */
-                if ( sfunc -> validate )
-                {
-                    rc = VProdResolveValidateFuncParams ( self, & fprod -> parms,
-                        & sfunc -> func, & expr -> pfunc );
-                }
-                else
-                {
-                    /* resolve normal function parameters */
-                    rc = VProdResolveFuncParams ( self, & fprod -> parms,
-                        & sfunc -> func, & expr -> pfunc );
-                }
-
-                if ( rc == 0 )
-                {
-                    /* prepare info block for function factory */
-                    info . schema = self -> schema;
-                    info . tbl = self -> curs -> tbl;
-                    info . mgr = info . tbl -> mgr;
-                    info . parms = ( struct VCursorParams * ) self -> curs;
-
-                    /* by this point the schema and factory parameters
-                       have been bound: named type and constant parameters
-                       are entered into the "self -> cx_bind" Vector,
-                       factory parameter constants are positionally recorded
-                       in "pb . fact_parms", and function parameter productions
-                       are recorded in "fprod" */
-
-                    /* the following function will evaluate the parameters
-                       and invoke the factory function to construct production */
-                    rc = VProdResolveBuildFactParms ( self, & info, fprod,
-                        & sfunc -> fact, & pb . fact_parms, & td, external );
-                    if ( rc == 0 )
-                    {
-                        /* successfully created */
-                        * out = & fprod -> dad;
-                    }
-                }
-
-                if ( rc != 0 )
-                {
-                    /* reset errors when input parameters could not be resolved
-                       or if function factory returned an error */
-                    if ( GetRCState ( rc ) == rcIncomplete ||
-                         ( GetRCTarget ( rc ) == rcFunction && GetRCContext ( rc ) == rcConstructing ) )
-                    {
-                        rc = 0;
-                    }
-
-                    VProductionWhack ( & fprod -> dad, self -> owned );
-                }
-            }
-        }
-        else
-        {
-            /* TBD - perhaps report what went wrong, but if function
-               could not be resolved, don't stop the whole process */
-            VDB_DEBUG (( "failed to find function '%S' rc %R",
-                        & sfunc -> name -> name, rc ));
-            rc = 0;
-        }
-        
-        SFunctionPop ( sfunc, self, & pb );
-    }
-
-    return rc;
-}
-
-
-/* resolves physical encoding/decoding expr */
-rc_t VProdResolveEncodingExpr ( const VProdResolve *self,
-    VProduction **out, VProduction *in, const SPhysEncExpr *expr )
-{
-    const SPhysical *sphys = expr -> phys;
-
-    /* bind schema and factory params */
-    Vector schema_prior;
-    rc_t rc = SPhysicalBindSchemaParms ( sphys, & schema_prior, & expr -> schem, self -> cx_bind );
-    if ( rc == 0 )
-    {
-        Vector fact_parms, fact_prior;
-        rc = SPhysicalBindFactParms ( sphys, & fact_parms, & fact_prior, & expr -> pfact, self -> cx_bind );
-        if ( rc == 0 )
-        {
-            /* create single input param vector */
-            Vector *inputs = malloc ( sizeof * inputs );
-            if ( inputs == NULL )
-                rc = RC ( rcVDB, rcVector, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                VectorInit ( inputs, 0, 1 );
-                rc = VectorAppend ( inputs, NULL, in );
-                if ( rc == 0 )
-                {
-                    VFormatdecl fd;
-
-                    if ( self -> chain == chainEncoding )
-                        memset ( & fd, 0, sizeof fd );
-                    else
-                    {
-                        rc = STypeExprResolveAsFormatdecl
-                            ( ( const STypeExpr* ) sphys -> td, self -> schema, & fd, self -> cx_bind );
-                    }
-
-                    if ( rc == 0 )
-                    {
-                        VScriptProd *script;
-                        const char *name = sphys -> name -> name . addr;
-                        rc = VScriptProdMake ( & script, self -> owned, self -> curs,
-                            prodScriptFunction, name, & fd, NULL, self -> chain );
-                        if ( rc == 0 )
-                        {
-                            /* create a production cache for the encoding */
-                            VCursorCache local;
-                            VCursorCacheInit ( & local, 0, 2 );
-
-                            rc = VectorAppend ( & local . cache, NULL, inputs );
-                            if ( rc == 0 )
-                            {
-                                const SFunction *func = ( self -> chain == chainEncoding ) ?
-                                    & sphys -> encode : & sphys -> decode;
-
-                                VProdResolve spr = * self;
-                                spr . cache = & local;
-                                spr . owned = & script -> owned;
-
-                                /* forget about input vector */
-                                inputs = NULL;
-
-                                /* now evaluate the return expression */
-                                rc = VProdResolveExpr ( & spr, & script -> rtn,
-                                    & script -> dad . desc, & script -> dad . fd,
-                                    func -> u . script . rtn, false );
-                                if ( rc != 0 || script -> rtn == NULL )
-                                    VProductionWhack ( & script -> dad, self -> owned );
-                                else
-                                {
-                                    * out = & script -> dad;
-                                }
-                            }
-
-                            VCursorCacheWhack ( & local, NULL, NULL );
-                        }
-                    }
-                
-                    if ( inputs != NULL )
-                    {
-                        VectorWhack ( inputs, NULL, NULL );
-                        free ( inputs );
-                    }
-                }
-            }
-            
-            SPhysicalRestFactParms ( sphys, & fact_prior, self -> cx_bind );
-            VectorWhack ( & fact_parms, NULL, NULL );
-        }
-
-        SPhysicalRestSchemaParms ( sphys, & schema_prior, self -> cx_bind );
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * VFunctionProd
- */
-
-/* BuiltInComparison
- */
-rc_t VFunctionProdMakeBuiltInComp ( VProduction **prodp, Vector *owned,
-    const char *name,  const VProdResolve *resolve, VProduction *orig, VProduction *test )
-{
-    /* locate factory */
-    VTransDesc td;
-    rc_t rc = VLinkerFindNamedFactory ( resolve -> ld,
-        resolve -> libs, & td, "vdb:compare" );
-    if ( rc == 0 )
-    {
-        const VCursor *curs = resolve -> curs;
-
-        /* build factory params */
-        VFuncDesc fd;
-        VXfactInfo info;
-        VFactoryParams cp;
-        VFunctionParams dp;
-
-        info . schema = curs -> schema;
-        info . tbl  = curs -> tbl;
-        info . mgr = curs -> tbl -> mgr;
-	info . parms = (struct VCursorParams*)curs;
-        info . fdesc . fd = orig -> fd;
-        info . fdesc . desc = orig -> desc;
-
-        memset ( & fd, 0, sizeof fd );
-
-        /* TBD - fill out % or epsilon for fp compare */
-        cp . argc = 0;
-
-        dp . argc = 2;
-        dp . argv [ 0 ] . desc = orig -> desc;
-        dp . argv [ 0 ] . fd = orig -> fd;
-        dp . argv [ 1 ] . desc = test -> desc;
-        dp . argv [ 1 ] . fd = test -> fd;
-
-        /* invoke factory */
-        rc = ( * td . factory ) ( td . fself, & info, & fd, & cp, & dp );
-        if ( rc == 0 )
-        {
-            VFunctionProd *prod;
-            rc = VFunctionProdMake ( & prod, owned, curs,
-                fd . variant, name, & orig -> fd, & orig -> desc, chainDecoding );
-            if ( rc == 0 )
-            {
-                prod -> fself = fd . self;
-                prod -> whack = fd . whack;
-                prod -> u . rf = fd . u . rf;
-
-                /* use orig and test as inputs */
-                rc = VectorAppend ( & prod -> parms, NULL, orig );
-                if ( rc == 0 )
-                {
-                    rc = VectorAppend ( & prod -> parms, NULL, test );
-                    if ( rc == 0 )
-                    {
-                        * prodp = & prod -> dad;
-                        return 0;
-                    }
-                }
-            }
-        }
-    }
-
-    return rc;
-}
diff --git a/libs/vdb/prod-priv.h b/libs/vdb/prod-priv.h
deleted file mode 100644
index 0a9a37f..0000000
--- a/libs/vdb/prod-priv.h
+++ /dev/null
@@ -1,462 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_prod_priv_
-#define _h_prod_priv_
-
-#ifndef _h_vdb_extern_
-#include <vdb/extern.h>
-#endif
-
-#ifndef _h_klib_vector_
-#include <klib/vector.h>
-#endif
-
-#ifndef _h_xform_priv_
-#include "xform-priv.h"
-#endif
-
-#ifndef _h_schema_priv_
-#include "schema-priv.h"
-#endif
-
-#ifndef _h_blob_priv_
-#include "blob-priv.h"
-#endif
-
-#ifndef _h_klib_debug_
-#include <klib/debug.h> /* DBG_VDB */
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#define PROD_CACHE  	  2                   	/** default size of Production Cache ***/
-
-/* IT IS A BAD IDEA TO USE EXTERN COLUMNS IN EXPRESSIONS
-   but it used to be okay in version 0 of the schema, so
-   it still occurs sometimes. We have allowed opening
-   columns from within schema but were afraid to alter the
-   row vector because this disturbs the serial allocation
-   of ids that could fool programmers trying to be clever.
-   Unfortunately, this resulted in a stray reference after
-   we shifted reference ownership to the row vector.
-
-   Setting this symbol to 1 will cause schema-opened columns
-   to be inserted into the row vector, disturbing the index
-   series passed out to clients, but not losing the reference. */
-#define OPEN_COLUMN_ALTERS_ROW 1
-
-#if _DEBUGGING
-#define PROD_NAME 1
-#endif
-
-#define VDB_DEBUG(msg) DBGMSG(DBG_VDB,DBG_FLAG(DBG_VDB_RESOLVE), msg )
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct VBlob;
-struct KColumn;
-struct VColumn;
-struct VPhysical;
-struct VProdResolve;
-struct VBlobMRUCacheCursorContext;
-
-
-/*--------------------------------------------------------------------------
- * VProduction
- */
-
-/* major production types */
-enum
-{
-    /* simple assignment from another production */
-    prodSimple,
-
-    /* function result and input parameters */
-    prodFunc,
-
-    /* a type of function with its own sub-productions */
-    prodScript,
-
-    /* an adapter production that references a VPhysical */
-    prodPhysical,
-
-    /* an adapter production referencing a VColumn */
-    prodColumn
-};
-
-/* read/write chain */
-enum
-{
-    chainInvalid,
-    chainEncoding,
-    chainDecoding,
-    chainUncommitted
-};
-
-#if ! VPRODUCTION_DECLARED_IN_XFORM_H
-typedef struct VProduction VProduction;
-#endif
-struct VProduction
-{
-#if PROD_NAME
-    const char *name;
-#endif
-#if PROD_CACHE
-    /* cached output */
-    struct VBlob *cache [ PROD_CACHE ];
-    uint32_t cache_cnt;
-    uint32_t cache_wash_access_cnt;
-#endif
-    /* format declaration and element type description */
-    VFormatdecl fd;
-    VTypedesc desc;
-
-    /* schema contextual id */
-    VCtxId cid;
-
-    /* owned vector id */
-    uint32_t oid;
-
-    /* production major variant ( enum see above ) */
-    uint8_t var;
-
-    /* production sub-variant ( specific to each major variant */
-    uint8_t sub;
-
-    /* indication of read/write chain */
-    uint8_t chain;
-
-    /* true if used as control parameter */
-    bool control;
-    /* is this production directly connected to a Column in a Cursor */
-    VBlobMRUCacheCursorContext cctx;
-};
-
-
-/* Make
- *  allocation and parent initialization
- *  called from the "Make" functions below
- *
- *  "prod" [ OUT ] - returned production
- *
- *  "size" [ IN ] - sizeof sub-type
- *
- *  "owned" [ IN ] - vector to contain productions
- *
- *  "var" [ IN ] - variant code, e.g. prodSimple, prodFunc
- *
- *  "sub" [ IN ] - sub-variant code, e.g. prodSimplePage2Blob
- *
- *  "name" [ IN, NULL OKAY ] - optional object name, derived
- *  from schema if possible
- *
- *  "fd" [ IN ] and "desc" [ IN ] - production type description
- *
- *  "cid" [ IN ] - contextual ( two-level ) id
- *
- *  "chain" [ IN ] - which chain(s) are supported
- *    chainEncoding    - when going from input to physical
- *    chainDecoding    - when pulling from physical to output
- *    chainUncommitted - when resolving trigger and validation expressions
- */
-rc_t VProductionMake ( VProduction **prod, Vector *owned, size_t size,
-    int var, int sub, const char *name, const VFormatdecl *fd,
-    const VTypedesc *desc, const VCtxId *cid, uint8_t chain );
-
-
-/* Whack
- *  virtual whacker
- *  calls variant specific "Destroy" function
- *  frees object
- *
- *  "owned" [ IN, NULL OKAY ] - a Vector owning production
- *  if not NULL, production will be removed from vector
- */
-void CC VProductionWhack ( void *item, void *owned );
-
-
-#if ! VPRODUCTION_DECLARED_IN_XFORM_H
-/* IdRange
- *  obtains intersection of all physical sources
- *
- *  "first" [ IN/OUT ] and "last" [ IN/OUT ] - range to intersect
- */
-rc_t VProductionColumnIdRange ( const VProduction *self,
-    int64_t *first, int64_t *last );
-rc_t VProductionPageIdRange ( VProduction *self,
-    int64_t id, int64_t *first, int64_t *last );
-
-/* RowLength
- *  get row length for a particular row
- */
-uint32_t VProductionRowLength ( const VProduction *self, int64_t row_id );
-
-/* FixedRowLength
- *  get fixed row length for entire column
- *  returns 0 if not fixed
- */
-uint32_t VProductionFixedRowLength ( const VProduction *self, int64_t row_id, bool ignore_self );
-
-#endif /* ! VPRODUCTION_DECLARED_IN_XFORM_H */
-
-/* ReadBlob
- *  fetch a blob containing at least the requested row
- *  returns a new reference
- */
-rc_t VProductionReadBlob ( const VProduction *self, struct VBlob **vblob, int64_t id , uint32_t cnt, struct VBlobMRUCacheCursorContext* cctx);
-
-/* IsStatic
- *  trace all the way to a physical production
- */
-rc_t VProductionIsStatic ( const VProduction *self, bool *is_static );
-
-/* GetKColumn
- *  drills down to physical production to get a KColumn,
- *  and if that fails, indicate whether the column is static
- */
-rc_t VProductionGetKColumn ( const VProduction * self, struct KColumn ** kcol, bool * is_static );
-
-
-/*--------------------------------------------------------------------------
- * VSimpleProd
- *  single input param
- */
-enum
-{
-    /* an implicit cast ( assignment ) or an explicit cast from schema */
-    prodSimpleCast,
-
-    /* perform blob class manipulation at page boundary */
-    prodSimplePage2Blob,
-
-    /* serialization interface at kcolumn boundary */
-    prodSimpleSerial2Blob,
-    prodSimpleBlob2Serial
-};
-
-typedef struct VSimpleProd VSimpleProd;
-struct VSimpleProd
-{
-    VProduction dad;
-    VProduction *in;
-    struct VCursor const *curs;
-};
-
-rc_t VSimpleProdMake ( VProduction **prod, Vector *owned,
-    struct VCursor const *curs,int sub, const char *name, const VFormatdecl *fd,
-    const VTypedesc *desc, const VCtxId *cid,
-    VProduction *in, uint8_t chain );
-
-#define VSimpleProdDestroy( self ) \
-    ( ( void ) 0 )
-
-/* Read
- *  return a blob containing row id
- */
-rc_t VSimpleProdRead ( VSimpleProd *self, struct VBlob **vblob, int64_t id, uint32_t cnt, struct VBlobMRUCacheCursorContext *cctx );
-
-
-/*--------------------------------------------------------------------------
- * VFunctionProd
- *  function input params are VProduction*
- *  extern C function pointer and self object
- */
-enum
-{
-    prodFuncExternal = vftLastFuncProto - 1,
-
-    /* internal types */
-    prodFuncBuiltInCompare,
-    prodFuncByteswap
-};
-
-typedef struct VFunctionProd VFunctionProd;
-struct VFunctionProd
-{
-    VProduction dad;
-
-    /* back-pointer to owning cursor
-       not a reference, not to be released */
-    struct VCursor const *curs;
-
-    /* object and optional destructor */
-    void *fself;
-    void ( CC * whack ) ( void *self );
-
-    /* runtime function */
-    union
-    {
-        /* public types */
-        VRowFunc rf;
-        VNonDetRowFunc ndf;
-        VArrayFunc af;
-        VFixedRowFunc pf;
-        VBlobFunc bf;
-
-        /* merge type */
-        VBlobFuncN bfN;
-        
-        /* compare type */
-        VBlobCompareFunc cf;
-
-        /* internal types */
-        void ( * bswap ) ( void*, const void*, uint64_t );
-
-    } u;
-
-    /* vector of VProduction input parameters */
-    Vector parms;
-
-    /* adaptive prefetch parameters */
-   int64_t start_id;
-   int64_t stop_id;
-};
-
-
-rc_t VFunctionProdMake ( VFunctionProd **prod, Vector *owned,
-    struct VCursor const *curs, int sub, const char *name,
-    const VFormatdecl *fd, const VTypedesc *desc, uint8_t chain );
-
-void VFunctionProdDestroy ( VFunctionProd *self );
-
-
-/* BuiltInComparison
- */
-rc_t VFunctionProdMakeBuiltInComp ( VProduction **prod, Vector *owned,
-    const char *name, struct VProdResolve const *resolve,
-    VProduction *orig, VProduction *test );
-
-
-/* Read
- */
-rc_t VFunctionProdRead ( VFunctionProd *self, struct VBlob **vblob, int64_t id , uint32_t cnt);
-
-
-/*--------------------------------------------------------------------------
- * VScriptProd
- *  function input params are VProduction*
- *  intermediate productions are also VProduction*
- */
-enum
-{
-    prodScriptFunction
-};
-
-typedef struct VScriptProd VScriptProd;
-struct VScriptProd
-{
-    VProduction dad;
-    VProduction *rtn;
-    Vector owned;
-    struct VCursor const *curs;
-};
-
-
-rc_t VScriptProdMake ( VScriptProd **prod, Vector *owned,
-    struct VCursor const *curs, int sub, const char *name, const VFormatdecl *fd,
-    const VTypedesc *desc, uint8_t chain );
-
-void VScriptProdDestroy ( VScriptProd *self );
-
-
-/* Read
- */
-rc_t VScriptProdRead ( VScriptProd *self,
-    struct VBlob **vblob, int64_t id, uint32_t cnt);
-
-
-/*--------------------------------------------------------------------------
- * VPhysicalProd
- *  adapts a VPhysical to VProduction
- */
-enum
-{
-    prodPhysicalOut,
-    prodPhysicalKCol
-};
-
-typedef struct VPhysicalProd VPhysicalProd;
-struct VPhysicalProd
-{
-    VProduction dad;
-    struct VPhysical *phys;
-};
-
-rc_t VPhysicalProdMake ( VProduction **prod, Vector *owned,
-    struct VCursor *curs, struct VPhysical *phys, int sub, const char *name,
-    const VFormatdecl *fd, const VTypedesc *desc );
-
-void VPhysicalProdDestroy ( VPhysicalProd *self );
-
-
-/* Read
- */
-rc_t VPhysicalProdRead ( VPhysicalProd *self,
-    struct VBlob **vblob, int64_t id, uint32_t cnt );
-
-rc_t VPhysicalProdColumnIdRange (const VPhysicalProd *self, int64_t *first, int64_t *last );
-
-uint32_t VPhysicalProdFixedRowLength(const VPhysicalProd *self, int64_t row_id );
-
-/*--------------------------------------------------------------------------
- * VColumnProd
- *  adapts a VColumn to VProduction
- */
-enum
-{
-    prodColumnOut
-};
-
-typedef struct VColumnProd VColumnProd;
-struct VColumnProd
-{
-    VProduction dad;
-    struct VColumn *col;
-};
-
-
-rc_t VColumnProdMake ( VProduction **prodp, Vector *owned,
-    struct VColumn *col, int sub, const char *name );
-
-void VColumnProdDestroy ( VColumnProd *self );
-
-
-/* Read
- */
-rc_t VColumnProdRead ( VColumnProd *self,
-    struct VBlob **vblob, int64_t id );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_prod_priv_ */
diff --git a/libs/vdb/prod.c b/libs/vdb/prod.c
deleted file mode 100644
index 2dce059..0000000
--- a/libs/vdb/prod.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-#define TRACK_REFERENCES 0
-
-#define KONST const
-#include "prod-priv.h"
-#include "prod-expr.h"
-#include "schema-priv.h"
-#include "schema-expr.h"
-#include "cursor-priv.h"
-#include "column-priv.h"
-#undef KONST
-
-#include <vdb/cursor.h>
-#include <klib/symbol.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-
-/*--------------------------------------------------------------------------
- * VProdResolve
- */
-
-/* ResolveColumn
- *  resolves a column using read expression
- */
-rc_t VProdResolveColumnRoot ( const VProdResolve *self,
-    VProduction **out, const SColumn *scol )
-{
-    rc_t rc = VProdResolveColumnRead ( self, out, scol );
-    if ( rc == 0 && * out <= FAILED_PRODUCTION )
-        return RC ( rcVDB, rcCursor, rcOpening, rcColumn, rcUndefined );
-    return rc;
-}
-
-rc_t VProdResolveColumn ( const VProdResolve *self,
-    VProduction **out, const SColumn *scol, bool alt )
-{
-    rc_t rc;
-    VColumn *vcol;
-    VCursor *curs = self -> curs;
-
-    if (alt) {
-        /* TODO: Generate warning message */
-        return RC(rcVDB, rcCursor, rcOpening, rcSchema, rcInvalid);
-    }
-    /* read-only cursor may add columns from schema */
-    vcol = VCursorCacheGet ( & curs -> col, & scol -> cid );
-    if ( vcol == NULL )
-    {
-        rc = VCursorMakeColumn ( curs, & vcol, scol, self -> cx_bind );
-        if ( rc != 0 )
-            return rc;
-
-#if OPEN_COLUMN_ALTERS_ROW
-        rc = VectorAppend ( & curs -> row, & vcol -> ord, vcol );
-        if ( rc != 0 )
-        {
-            VColumnWhack ( vcol, NULL );
-            return rc;
-        }
-#endif
-        rc = VCursorCacheSet ( & curs -> col, & scol -> cid, vcol );
-        if ( rc != 0 )
-        {
-#if OPEN_COLUMN_ALTERS_ROW
-            void *ignore;
-            VectorSwap ( & curs -> row, vcol -> ord, NULL, & ignore );
-            vcol -> ord = 0;
-#endif
-            VColumnWhack ( vcol, NULL );
-            return rc;
-        }
-    }
-
-    /* resolve for read production */
-    return VProdResolveColumnRead ( self, out, scol );
-}
-
-rc_t VProdResolvePhysical ( const VProdResolve *self, struct VPhysical *phys )
-{
-    return VProdResolvePhysicalRead ( self, phys );
-}
-
-/*--------------------------------------------------------------------------
- * VColumnProd
- *  message redirect to VColumn
- */
-
-rc_t VColumnProdMake ( VProduction **prodp, Vector *owned,
-    VColumn *col, int sub, const char *name )
-{
-    return RC ( rcVDB, rcColumn, rcReading, rcSchema, rcInvalid );
-}
-
-void VColumnProdDestroy ( VColumnProd *self )
-{
-}
-
-/* Read
- */
-rc_t VColumnProdRead ( VColumnProd *self, struct VBlob **vblob, int64_t id )
-{
-    return RC ( rcVDB, rcColumn, rcReading, rcSchema, rcInvalid );
-}
diff --git a/libs/vdb/range-validate.c b/libs/vdb/range-validate.c
deleted file mode 100644
index 9585c64..0000000
--- a/libs/vdb/range-validate.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include "xform-priv.h"
-#include "blob.h"
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-typedef union {
-    /* integer */
-    int8_t i8[2];
-    int16_t i16[2];
-    int32_t i32[2];
-    int64_t i64[2];
-    
-    /* unsigned integer */
-    uint8_t u8[2];
-    uint16_t u16[2];
-    uint32_t u32[2];
-    uint64_t u64[2];
-    
-    /* floating point */
-    float f32[2];
-    double f64[2];
-} self_t;
-
-#define VALID_FUNC(FUNC, TYPE, VAL) \
-static rc_t CC FUNC(void *Self, const VXformInfo *info, int64_t row_id, VBlob **rslt, uint32_t argc, const VBlob *argv[]) { \
-    const self_t *self = Self; \
-    TYPE lower = self->VAL[0]; \
-    TYPE upper = self->VAL[1]; \
-    const TYPE *src = argv[0]->data.base; \
-    unsigned i; \
-    uint64_t n = argv[0]->data.elem_count; \
-\
-    for (i = 0; i != n; ++i) { \
-        TYPE val = src[i]; \
-\
-        if (val < lower || val > upper) \
-	    return RC(rcVDB, rcFunction, rcExecuting, rcConstraint, rcViolated); \
-    } \
-    *rslt = (VBlob *)argv[0]; \
-    (void)VBlobAddRef(*rslt); \
-    return 0; \
-}
-
-VALID_FUNC(valid_U8, uint8_t, u8)
-VALID_FUNC(valid_I8, int8_t, i8)
-VALID_FUNC(valid_U16, uint16_t, u16)
-VALID_FUNC(valid_I16, int16_t, i16)
-VALID_FUNC(valid_U32, uint32_t, u32)
-VALID_FUNC(valid_I32, int32_t, i32)
-VALID_FUNC(valid_U64, uint64_t, u64)
-VALID_FUNC(valid_I64, int64_t, i64)
-VALID_FUNC(valid_F32, float, f32)
-VALID_FUNC(valid_F64, double, f64)
-
-/* range_validate
- *  function < type T > T range_validate #1.0 < T lower, T upper > ( T in )
- */
-static
-void CC vfunc_free ( void * self )
-{
-    free (self);
-}
-
-VTRANSFACT_BUILTIN_IMPL(vdb_range_validate, 1, 0, 0) (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc = 0;
-    self_t *self;
-
-    /* check types */
-    switch (info->fdesc.desc.domain) {
-        case vtdInt:
-        case vtdUint:
-        case vtdFloat:
-            break;
-        default:
-            return RC(rcVDB, rcFunction, rcConstructing, rcType, rcInvalid);
-    }
-    switch (info->fdesc.desc.intrinsic_bits) {
-        case 8:
-        case 16:
-        case 32:
-        case 64:
-            break;
-        default:
-            return RC(rcVDB, rcFunction, rcConstructing, rcType, rcInvalid);
-    }
-    
-    self = malloc(sizeof(*self));
-    if (self == NULL)
-        return RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-    
-    rslt->self = self;
-    rslt->whack = vfunc_free;
-    rslt->variant = vftBlobN;
-    
-    switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            switch (info->fdesc.desc.intrinsic_bits) {
-                case 8:
-                    VFUNCDESC_INTERNAL_FUNCS(rslt)->bfN = valid_I8;
-                    self->i8[0] = *cp->argv[0].data.i8;
-                    self->i8[1] = *cp->argv[1].data.i8;
-                    break;
-                case 16:
-                    VFUNCDESC_INTERNAL_FUNCS(rslt)->bfN = valid_I16;
-                    self->i16[0] = *cp->argv[0].data.i16;
-                    self->i16[1] = *cp->argv[1].data.i16;
-                    break;
-                case 32:
-                    VFUNCDESC_INTERNAL_FUNCS(rslt)->bfN = valid_I32;
-                    self->i32[0] = *cp->argv[0].data.i32;
-                    self->i32[1] = *cp->argv[1].data.i32;
-                    break;
-                case 64:
-                    VFUNCDESC_INTERNAL_FUNCS(rslt)->bfN = valid_I64;
-                    self->i64[0] = *cp->argv[0].data.i64;
-                    self->i64[1] = *cp->argv[1].data.i64;
-                    break;
-            }
-            break;
-        case vtdUint:
-            switch (info->fdesc.desc.intrinsic_bits) {
-                case 8:
-                    VFUNCDESC_INTERNAL_FUNCS(rslt)->bfN = valid_U8;
-                    self->u8[0] = *cp->argv[0].data.u8;
-                    self->u8[1] = *cp->argv[1].data.u8;
-                    break;
-                case 16:
-                    VFUNCDESC_INTERNAL_FUNCS(rslt)->bfN = valid_U16;
-                    self->u16[0] = *cp->argv[0].data.u16;
-                    self->u16[1] = *cp->argv[1].data.u16;
-                    break;
-                case 32:
-                    VFUNCDESC_INTERNAL_FUNCS(rslt)->bfN = valid_U32;
-                    self->u32[0] = *cp->argv[0].data.u32;
-                    self->u32[1] = *cp->argv[1].data.u32;
-                    break;
-                case 64:
-                    VFUNCDESC_INTERNAL_FUNCS(rslt)->bfN = valid_U64;
-                    self->u64[0] = *cp->argv[0].data.u64;
-                    self->u64[1] = *cp->argv[1].data.u64;
-                    break;
-            }
-            break;
-        case vtdFloat:
-            switch (info->fdesc.desc.intrinsic_bits) {
-                case 32:
-                    VFUNCDESC_INTERNAL_FUNCS(rslt)->bfN = valid_F32;
-                    self->f32[0] = *cp->argv[0].data.f32;
-                    self->f32[1] = *cp->argv[1].data.f32;
-                    break;
-                case 64:
-                    VFUNCDESC_INTERNAL_FUNCS(rslt)->bfN = valid_F64;
-                    self->f64[0] = *cp->argv[0].data.f64;
-                    self->f64[1] = *cp->argv[1].data.f64;
-                    break;
-            }
-            break;
-    }
-    return rc;
-}
diff --git a/libs/vdb/redimension.c b/libs/vdb/redimension.c
deleted file mode 100644
index 3e22dfe..0000000
--- a/libs/vdb/redimension.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-#include "blob.h"
-
-#include "blob-headers.h"
-#include "page-map.h"
-#include "blob-priv.h"
-#include "xform-priv.h"
-
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <assert.h>
-
-typedef struct self_t {
-    uint32_t elem_bits;
-} self_t;
-
-static
-rc_t CC redimension_drvr(
-                      void *Self,
-                      const VXformInfo *info,
-                      int64_t row_id,
-                      VBlob **rslt,
-                      uint32_t argc, const VBlob *argv[]
-) {
-    rc_t rc;
-    const self_t *self = (const self_t *)Self;
-    const VBlob *src = argv[0];
-    VBlob *y;
-    
-    rc = VBlobNew(&y, src->start_id, src->stop_id, "redimension");
-    if (rc)
-        return rc;
-    
-    rc = KDataBufferCast(&src->data, &y->data, self->elem_bits, false);
-    if (rc == 0) {
-        y->byte_order = src->byte_order;
-        PageMapAddRef(y->pm = src->pm);
-	y->pm->optimized = eBlobPageMapOptimizedFailed; /** pagemap is no longer valid; prevent optimization ***/
-        BlobHeadersAddRef(y->headers = src->headers);
-        
-        *rslt = y;
-        return 0;
-    }
-	return rc;
-}
-static
-void CC vfunc_free ( void * self )
-{
-    free ( self );
-}
-
-#include <stdio.h>
-
-VTRANSFACT_BUILTIN_IMPL(vdb_redimension, 1, 0, 0) (
-                                           const void *Self,
-                                           const VXfactInfo *info,
-                                           VFuncDesc *rslt,
-                                           const VFactoryParams *cp,
-                                           const VFunctionParams *dp
-) {
-    self_t *self;
-    
-    self = malloc(sizeof(*self));
-    if (self) {
-        self->elem_bits = VTypedescSizeof(&info->fdesc.desc);
-        
-        rslt->self = self;
-        rslt->whack = vfunc_free;
-        rslt->variant = vftBlobN;
-        VFUNCDESC_INTERNAL_FUNCS(rslt)->bfN = redimension_drvr;
-        return 0;
-    }
-    return RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-}
diff --git a/libs/vdb/report-vdb.c b/libs/vdb/report-vdb.c
deleted file mode 100644
index 3eb9f7a..0000000
--- a/libs/vdb/report-vdb.c
+++ /dev/null
@@ -1,853 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include <klib/report.h> /* ReportInit */
-#include <klib/time.h> /* KTime */
-#include <klib/namelist.h> /* KNamelistRelease */
-#include <klib/out.h> /* OUTMSG */
-#include <klib/klib-priv.h> /* ReportFuncs */
-
-#include <vdb/report.h> /* ... */
-#include <vdb/manager.h> /* VDBManagerVersion */
-#include <vdb/vdb-priv.h> /* VTableOpenKTableRead */
-#include <vdb/database.h> /* VDatabaseRelease */
-#include <vdb/table.h> /* VTableOpenParentRead */
-#include <vdb/dependencies.h> /* VDBDependenciesRelease */
-
-#include <kdb/kdb-priv.h> /* KDatabaseGetPath */
-#include <kdb/manager.h> /* kptDatabase */
-#include <kdb/database.h> /* KDatabaseRelease */
-#include <kdb/table.h> /* KTableRelease */
-
-#include <kfs/dyload.h> /* KDyld */
-#include <kfs/file.h> /* KFileRead */
-#include <kfs/nullfile.h> /* KFileMakeNullUpdate */
-#include <kfs/md5.h> /* KMD5SumFmt */
-
-#include <atomic.h>
-
-#include <stdarg.h> /* va_start */
-#include <stdio.h> /* sprintf */
-#include <stdlib.h> /* malloc */
-#include <string.h> /* memset */
-#include <limits.h> /* PATH_MAX */
-#include <assert.h>
-
-#ifndef PATH_MAX
-#define PATH_MAX 4096
-#endif
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
-
-/*
- * An unrecoverable error happened.
- * We can help to solve it
- * by reporting information about known application execution environment.
- */
-
-typedef struct Report {
-    const VDBManager* mgr;
-    const VDatabase* db;
-    const VTable* table;
-} Report;
-
-static atomic_ptr_t report_singleton;
-
-static rc_t CC ReportRelease ( void )
-{
-    rc_t rc = 0;
-    Report *prev_report, *cur_report;
-
-    cur_report = report_singleton . ptr;
-    do
-    {
-        prev_report = cur_report;
-        cur_report = atomic_test_and_set_ptr ( & report_singleton, NULL, prev_report );
-    }
-    while ( cur_report != prev_report );
-
-    if ( cur_report != NULL )
-    {
-        /* cleanup */
-        VTableRelease ( cur_report -> table );
-        VDatabaseRelease ( cur_report -> db );
-        VDBManagerRelease ( cur_report -> mgr );
-        memset ( cur_report, 0, sizeof * cur_report );
-    }
-
-    return rc;
-}
-
-static rc_t CC ReportObj(const ReportFuncs *f, uint32_t indent,
-    const char *path, bool *wasDbOrTableSet);
-static rc_t CC ReportSOFTWARE ( const ReportFuncs *f, uint32_t indent, const char *argv_0, const char *date, ver_t tool_ver );
-
-static rc_t ReportGet(Report** self)
-{
-    rc_t rc = 0;
-
-    static bool latch;
-    if ( ! latch )
-    {
-        static Report self;
-
-        rc = ReportInitVDB ( ReportObj, ReportSOFTWARE, ReportRelease );
-        if ( rc == 0 )
-        {
-            report_singleton . ptr = & self;
-            latch = true;
-        }
-    }
-
-    * self = ( Report* ) report_singleton . ptr;
-
-    return rc;
-}
-
-#define report ( * f -> report )
-#define reportData ( * f -> reportData )
-#define reportData1 ( * f -> reportData1 )
-#define reportOpen ( * f -> reportOpen )
-#define reportOpen1 ( * f -> reportOpen1 )
-#define reportClose ( * f -> reportClose )
-#define reportClose1 ( * f -> reportClose1 )
-#define reportError ( * f -> reportError )
-#define reportErrorStr ( * f -> reportErrorStr )
-#define reportErrorStrImpl ( * f -> reportErrorStrImpl )
-#define reportErrorStrInt ( * f -> reportErrorStrInt )
-#define reportError3Str ( * f -> reportError3Str )
-
-static
-rc_t ReportBuild(const ReportFuncs *f, uint32_t indent, const VDBManager* mgr)
-{
-    rc_t rc = 0;
-    KNamelist* list = NULL;
-    reportOpen(indent, "Build", 1, "static", 's', "true");
-    if (mgr) {
-        rc_t rc2 = VDBManagerListExternalSchemaModules(mgr, &list);
-        if (rc2 != 0) {
-            reportError
-                (indent + 1, rc2, "VDBManagerListExternalSchemaModules");
-            if (rc == 0 && rc2 != 0)
-            {   rc = rc2; }
-        }
-        else {
-            uint32_t count = 0;
-            rc2 = KNamelistCount(list, &count);
-            if (rc2 != 0) {
-                reportErrorStr(indent + 1, rc2, "KNamelistCount", "origin",
-                               "VDBManagerListExternalSchemaModules");
-                if (rc == 0 && rc2 != 0)
-                {   rc = rc2; }
-            }
-            else {
-                uint32_t i = 0;
-                for (i = 0; i < count && rc2 == 0; ++i) {
-                    const char* name = NULL;
-                    rc2 = KNamelistGet(list, i, &name);
-                    if (rc2 != 0) {
-                        reportErrorStr(
-                            indent + 1, rc2, "KNamelistGet", "origin",
-                            "VDBManagerListExternalSchemaModules");
-                        if (rc == 0 && rc2 != 0)
-                        {   rc = rc2; }
-                    }
-                    else {
-                        report(indent + 1, "Module", 1, "name", 's', name);
-                    }
-                }
-            }
-        }
-        RELEASE(KNamelist, list);
-        reportClose(indent, "Build");
-    }
-    return rc;
-}
-
-static rc_t VDBDependenciesReportDepend1(const VDBDependencies *self,
-    const ReportFuncs *f,
-    uint32_t count, uint32_t indent, bool toreport, uint32_t *missing)
-{
-    KDirectory *dir = NULL;
-    rc_t rc = 0;
-    uint32_t i = ~0;
-
-    assert(missing);
-
-    *missing = 0;
-
-    for (i = 0; i < count; ++i) {
-        bool isMissing = false;
-        bool local = false;
-        const char* seq_id = "";
-        const char* path = NULL;
-        rc = VDBDependenciesSeqId(self, &seq_id, i);
-        if (rc != 0 && toreport)
-            reportErrorStrInt(indent, rc, "VDBDependenciesSeqId",
-                "origin", "VDatabaseListDependencies", "idx", i);
-        if (rc == 0) {
-            rc = VDBDependenciesLocal(self, &local, i);
-            if (rc != 0 && toreport) {
-                reportErrorStrInt(indent, rc,
-                    "VDBDependenciesLocal",
-                    "origin", "VDatabaseListDependencies", "idx", i);
-            }
-        }
-        if (rc == 0) {
-            rc = VDBDependenciesPath(self, &path, i);
-            if (rc != 0 && toreport) {
-                reportErrorStrInt(indent, rc, "VDBDependenciesPath",
-                    "origin", "VDatabaseListDependencies", "idx", i);
-            }
-        }
-        if (rc == 0) {
-            if (!local && (path == NULL || path[0] == '\0')) {
-                isMissing = true;
-                ++*missing;
-            }
-            if (toreport) {
-                bool reported = false;
-                if (!isMissing && !local)  {
-                    rc_t rc = 0;
-                    bool readable = false;
-                    uint64_t size = ~0;
-                    KTime_t date = 0;
-                    bool ready = false;
-                    if (dir == NULL)
-                    {   rc = KDirectoryNativeDir(&dir); }
-                    assert(!local && path && path[0]);
-                    if (dir != NULL) {
-                        rc = KDirectoryFileSize(dir, &size, "%s", path);
-                        if (rc == 0)
-                        {   rc = KDirectoryDate(dir, &date, "%s", path); }
-                        if (rc == 0) {
-                            const KFile* f = NULL;
-                            rc = KDirectoryOpenFileRead(dir, &f, "%s", path);
-                            if (rc == 0) {
-                                char buffer[1024];
-                                size_t num_read = 0;
-                                size_t bsize =
-                                    size > sizeof buffer ? sizeof buffer : size;
-                                rc = KFileReadAll(f,
-                                    0, buffer, bsize, &num_read);
-                                if (rc == 0 && num_read != bsize) {
-                                    rc = RC(rcVDB, rcFile, rcReading,
-                                        rcBuffer, rcExcessive);
-                                }
-                                if (rc == 0)
-                                {   readable = true; }
-                            }
-                            KFileRelease(f);
-                        }
-                        if (rc == 0)
-                        {   ready = true; }
-                    }
-                    if (ready) {
-                        KTime kt;
-                        memset(&kt, 0, sizeof kt);
-                        KTimeLocal(&kt, date);
-                        report(indent, "Dependency", 7,
-                            "index", 'd', i,
-                            "seq_id", 's', seq_id,
-                            "local", 's', local ? "true" : "false",
-                            "path", 's', path,
-                            "size", 'u', size,
-                            "date", 'T', &kt,
-                            "readable", 's', readable ? "true" : "false");
-                        reported = true;
-                    }
-                    else {
-                        report(indent, "Dependency", 5,
-                            "index", 'd', i,
-                            "seq_id", 's', seq_id,
-                            "local", 's', local ? "true" : "false",
-                            "path", 's', path,
-                            "error", 'R', rc);
-                        reported = true;
-                    }
-                }
-                if (!reported) {
-                    report(indent, "Dependency", 4,
-                        "index", 'd', i,
-                        "seq_id", 's', seq_id,
-                        "local", 's', local ? "true" : "false",
-                        "path", 's', path == NULL ? "" : path);
-                }
-            }
-        }
-        if (rc != 0 && !toreport)
-        {   break; }
-    }
-
-    RELEASE(KDirectory, dir);
-
-    return rc;
-}
-
-static rc_t ReportDepend(const ReportFuncs *f,
-    uint32_t indent, const VDatabase* db)
-{
-    rc_t rc = 0;
-
-    const VDBDependencies* dep = NULL;
-
-    const char tag[] = "Dependencies";
-
-    assert(db);
-
-    reportOpen(indent, tag, 0);
-
-    rc = VDatabaseListDependencies(db, &dep, false);
-    if (rc != 0) {
-        reportError(indent + 1, rc, "VDatabaseListDependencies");
-    }
-    else {
-        uint32_t count = 0;
-        rc = VDBDependenciesCount(dep, &count);
-        if (rc != 0) { 
-            reportError(indent + 1, rc, "VDBDependenciesCount");
-        }
-        else {
-            uint32_t missing = 0;
-            const char tag[] = "List";
-            rc = VDBDependenciesReportDepend1(dep, f,
-                count, indent + 2, false, &missing);
-
-            if (rc == 0) {
-                reportOpen(indent + 1, tag, 2, "count", 'd', count,
-                    "missing", 'd', missing);
-            }
-            else {
-                reportOpen(indent + 1, tag, 1, "count", 'd', count);
-            }
-            
-            rc = VDBDependenciesReportDepend1(dep, f,
-                count, indent + 2, true, &missing);
-            reportClose(indent + 1, tag);
-        }
-    }
-
-    reportClose(indent, tag);
-
-    RELEASE(VDBDependencies, dep);
-
-    return rc;
-}
-
-typedef struct Total {
-    int64_t sz;
-    int64_t files;
-} Total;
-
-static rc_t CC visitor(const KDirectory* dir,
-    uint32_t type, const char* name, void* data)
-{
-    rc_t rc = 0;
-    Total* total = (Total*) data;
-    if (type & kptAlias)
-    {   return rc; }
-    assert(total);
-    switch (type) {
-        case kptFile: {
-            uint64_t size = 0;
-            rc = KDirectoryFileSize(dir, &size, "%s", name);
-            if (rc == 0) {
-                total->sz += size;
-            }
-            ++total->files;
-            break;
-        }
-        case kptDir: 
-            rc = KDirectoryVisit(dir, false, visitor, total, "%s", name);
-            break;
-        default:
-            rc = RC(rcVDB, rcDirectory, rcVisiting, rcType, rcUnexpected);
-            break;
-    }
-    return rc;
-}
-
-static rc_t ReportDir(const ReportFuncs *f, uint32_t indent, const KTable* tbl) {
-    rc_t rc = 0;
-    const KDirectory* dir = NULL;
-    if (tbl == NULL) {
-        report(indent, "Error", 1, "KTable" , 's', "NULL");
-        return rc;
-    }
-    rc = KTableOpenDirectoryRead(tbl, &dir);
-    if (rc != 0) {
-        reportError(indent, rc, "KTableOpenDirectoryRead");
-    }
-    else {
-        Total total;
-        memset(&total, 0, sizeof total);
-        rc = KDirectoryVisit(dir, false, visitor, &total, NULL);
-        report(indent, "Directory", 2,
-            "size", 'l', total.sz, "files", 'l', total.files);
-    }
-    RELEASE(KDirectory, dir);
-    return rc;
-}
-
-#define OBJ_OPEN(indent,count,path,type) reportOpen(indent, "Object", count, \
-    "path", 's', path, "type", 's', type
-#define OBJ_P_OPEN(indent,count,path,type,file_type) \
-    OBJ_OPEN(indent, count, path, type), "fs_type", 's', file_type
-
-#define OBJ(indent,path,type) \
-    OBJ_OPEN(indent, 2, path, type) )
-#define OBJ_P(indent,path,type,file_type) \
-    OBJ_P_OPEN(indent, 3, path, type, file_type) )
-#define OBJ_P_A(indent,path,type,file_type) \
-    OBJ_P_OPEN(indent, 4, path, type, file_type), "alias", 's', "true")
-#define OBJ_P_S(indent,path,type,file_type,size) \
-    OBJ_P_OPEN(indent, 4, path, type, file_type), "size", 'l', size)
-#define OBJ_P_S_A(indent,path,type,file_type,size) \
-    OBJ_P_OPEN(indent, 5, path, type, file_type), "size", 'l', size, \
-                                                  "alias", 's', "true")
-
-static rc_t CC ReportObj(const ReportFuncs *f, uint32_t indent,
-    const char *object, bool *wasDbOrTableSet)
-{
-    Report* self = NULL;
-    const char* fullpath = NULL;
-    const KDatabase* kdb = NULL;
-    const KTable* ktbl = NULL;
-    const VDatabase* db = NULL;
-    KPathType type = kptNotFound;
-    KPathType file_type = kptNotFound;
-    bool alias = false;
-    uint64_t size = 0;
-    bool size_unknown = true;
-
-    rc_t rc = ReportGet(&self);
-    assert(self);
-
-    if (wasDbOrTableSet != NULL) {
-        *wasDbOrTableSet = self->db != NULL || self->table != NULL;
-        return 0;
-    }
-
-    if (self->db != NULL) {
-        type = kptDatabase;
-        db = self->db;
-    }
-    else if (self->table != NULL) {
-        rc_t rc2 = VTableOpenParentRead(self->table, &db);
-        if (rc2)
-        {
-            if (rc == 0)
-            {
-                rc = rc2;
-            }
-        }
-        else if (!db)
-        {
-            type = kptTable;
-            rc2 = VTableGetKTableRead(self->table, &ktbl);
-            if (rc2)
-            {
-                if (rc == 0)
-                {
-                    rc = rc2;
-                }
-            }
-            else
-            {
-                rc2 = KTableGetPath(ktbl, &fullpath);
-            }
-        }
-    }
-
-    if (db) {
-        rc_t rc2 = VDatabaseOpenKDatabaseRead(db, &kdb);
-        type = kptDatabase;
-        if (rc2) {
-            if (rc == 0)
-            {   rc = rc2; }
-        }
-        else {
-            rc2 = KDatabaseGetPath(kdb, &fullpath);
-            if (rc2) {
-                if (rc == 0)
-                {   rc = rc2; }
-            }
-        }
-    }
-
-    if (fullpath) {
-        KDirectory* dir = NULL;
-        rc_t rc2 = KDirectoryNativeDir(&dir);
-        if (rc2) {
-            if (rc == 0)
-            {   rc = rc2; }
-        }
-        else {
-            file_type = KDirectoryPathType(dir, "%s", fullpath);
-            alias = file_type & kptAlias;
-            file_type &= ~kptAlias;
-            if (file_type == kptFile) {
-                rc2 = KDirectoryFileSize(dir, &size, "%s", fullpath);
-                if (rc2) {
-                    if (rc == 0)
-                    {   rc = rc2; }
-                }
-                else {  size_unknown = false; }
-            }
-        }
-        RELEASE(KDirectory, dir);
-    }
-
-    if (object || type != kptNotFound) {
-        const char* path
-            = fullpath ? fullpath : object ? object : "not set";
-        const char* stype = type == kptTable ? "table" : 
-            type == kptDatabase ? "database" : "unknown";
-        const char* sfile_type = file_type == kptFile ? "archive" : 
-            file_type == kptDir ? "dir" : "unexpected";
-
-        if (fullpath && !size_unknown) {
-            if (alias)
-            { OBJ_P_S_A(indent, path, stype, sfile_type, size); }
-            else
-            { OBJ_P_S  (indent, path, stype, sfile_type, size); }
-        }
-        else if (fullpath && size_unknown) {
-            if (alias)
-            { OBJ_P_A  (indent, path, stype, sfile_type); }
-            else
-            { OBJ_P    (indent, path, stype, sfile_type); }
-        }
-        else
-        {     OBJ      (indent, path, stype); }
-
-        if (!db)
-        {   db = self->db; }
-
-        if (db) {
-            rc_t rc2 = ReportDepend(f, indent + 1, db);
-            if (rc == 0)
-            {   rc = rc2; }
-        }
-        if (file_type == kptDir) {
-            rc_t rc2 = ReportDir(f, indent + 1, ktbl);
-            if (rc == 0)
-            {   rc = rc2; }
-        }
-
-        reportClose(indent, "Object");
-    }
-
-    if (db != self->db)
-    {   RELEASE(VDatabase, db); }
-    RELEASE(KTable, ktbl);
-    RELEASE(KDatabase, kdb);
-
-    return rc;
-}
-
-static
-rc_t md5(const char* path, uint8_t digest[16], const KDirectory* dir)
-{
-    const KFile* kf = NULL;
-    rc_t rc = KDirectoryOpenFileRead(dir, &kf, "%s", path);
-    if (rc == 0) {
-        KFile* fnull = NULL;
-        rc = KFileMakeNullUpdate(&fnull);
-        if (rc == 0) {
-            KMD5SumFmt* fmt = NULL;
-            rc = KMD5SumFmtMakeUpdate(&fmt, fnull);
-            if (rc == 0) {
-                const KFile* md5 = NULL;
-                rc = KFileMakeNewMD5Read(&md5, kf, fmt, path);
-                if (rc == 0) {
-                    uint64_t ps = 0;
-                    char buffer[512];
-                    size_t read = 0;
-                    do {
-                        rc = KFileRead(md5, ps, buffer, sizeof buffer, &read);
-                        if (rc == 0)
-                        {   ps += read; }
-                    } while (rc == 0 && read > 0);
-                    if (rc == 0) {
-                        bool bin;
-                        rc = KMD5SumFmtFind(fmt, path, digest, &bin);
-                    }
-                }
-                RELEASE(KFile, md5);
-            }
-            RELEASE(KMD5SumFmt, fmt);
-        }
-/*      RELEASE(KFile, fnull); fnull is released by KMD5SumFmt* fmt */
-    }
-/*  RELEASE(KFile, kf); kf is released by KFile* md5 */
-    return rc;
-}
-
-static
-rc_t ReportAlias(const ReportFuncs *f, uint32_t indent, const char* alias, const KDirectory* dir)
-{
-    char resolved[PATH_MAX + 1];
-    rc_t rc
-        = KDirectoryResolveAlias(dir, false, resolved, sizeof resolved, "%s", alias);
-    if (rc == 0) {
-        const char tag[] = "Alias";
-        uint32_t type = KDirectoryPathType(dir, "%s", resolved);
-        if (type & kptAlias) {
-            reportOpen(indent, tag, 1, "resolved", 's', resolved);
-            rc = ReportAlias(f, indent + 1, resolved, dir);
-            reportClose(indent, tag);
-        }
-        else
-        {   report(indent, tag, 1, "resolved", 's', resolved); }
-    }
-    return rc;
-}
-
-static rc_t ReportBinary(const ReportFuncs *f, uint32_t indent, const char* argv0) {
-    rc_t rc = 0;
-    KDyld *dyld = NULL;
-    assert(argv0);
-    rc = KDyldMake(&dyld);
-    if (rc != 0) {
-        reportError(indent + 1, rc, "KDyldMake");
-    }
-    else {
-        const KDirectory* dir = NULL;
-        rc = KDyldHomeDirectory(dyld, &dir, (fptr_t) ReportFinalize);
-        if (rc != 0) {
-            reportError(indent + 1, rc, "KDyldHomeDirectory");
-        }
-        else {
-            char binary[PATH_MAX + 1];
-            const char* name = strpbrk(argv0, "/\\");
-            const char* last_name = name;
-            if (last_name)
-            {   ++last_name; }
-            while (name) {
-                name = strpbrk(last_name, "/\\");
-                if (name) {
-                    last_name = name;
-                    if (last_name)
-                    {   ++last_name; }
-                }
-            }
-            name = last_name ? last_name : argv0;
-            rc = KDirectoryResolvePath(dir, true,
-                binary, sizeof binary, "%s", name);
-#if defined(WINDOWS)
-            if (rc == 0) {
-                if (KDirectoryPathType(dir, "%s", binary) == kptNotFound) {
-                    const char ext[] = ".exe";
-                    size_t s = string_size(name);
-                    if (s > sizeof ext - 1 &&
-                        strcmp(name + s - sizeof ext, ext) != 0)
-                    {
-                        rc = KDirectoryResolvePath(dir, true,
-                            binary, sizeof binary, "%s%s", name, ext);
-                    }
-                }
-            }
-#endif
-            if (rc != 0) {
-                reportErrorStr(indent + 1, rc, "KDirectoryResolvePath",
-                    "origin", "KDyldHomeDirectory");
-            }
-            else {
-                bool found = false;
-                const char tag[] = "Binary";
-                const char* sType = NULL;
-                uint8_t digest[16];
-                uint32_t type = KDirectoryPathType(dir, "%s", binary);
-                switch (type & ~kptAlias) {
-                    case kptFile:
-                        sType = type & kptAlias ? "alias" : "file";
-                        found = true;
-                        break;
-                    case kptNotFound:
-                        sType = "not found";
-                        break;
-                    default:
-                        sType = "unknown";
-                        break;
-                }
-                if (found) {
-                    rc = md5(binary, digest, dir);
-                }
-                if (type & kptAlias) {
-                    if (found && rc == 0)  {
-                        reportOpen(indent, tag, 3, "path", 's', binary,
-                            "type", 's', sType, "md5", 'M', digest);
-                    }
-                    else {
-                        reportOpen(indent, tag, 2, "path", 's', binary,
-                            "type", 's', sType);
-                    }
-                    if (rc == 0 && type & kptAlias) {
-                        rc = ReportAlias(f, indent + 1, name, dir);
-                    }
-                    reportClose(indent, tag);
-                }
-                else {
-                    if (found && rc == 0)  {
-                        report(indent, tag, 3, "path", 's', binary,
-                            "type", 's', sType, "md5", 'M', digest);
-                    }
-                    else {
-                        report(indent, tag, 2, "path", 's', binary,
-                            "type", 's', sType);
-                    }
-                }
-            }
-        }
-        RELEASE(KDirectory, dir);
-    }
-    RELEASE(KDyld, dyld);
-    return rc;
-}
-
-static rc_t CC ReportSOFTWARE(const ReportFuncs *f, uint32_t indent, const char *argv_0, const char *date, ver_t tool_ver ) {
-    rc_t rc = 0;
-
-    Report* self = NULL;
-    ReportGet(&self);
-    assert(self);
-
-    reportOpen(indent, "SOFTWARE", 0);
-
-    if (self->mgr) {
-        uint32_t version = 0;
-        rc = VDBManagerVersion(self->mgr, &version);
-        if (rc != 0) {
-            reportOpen(indent + 1, "Library", 0);
-            reportError(indent + 2, rc, "VDBManagerVersion");
-            reportClose(indent + 1, "Library");
-        }
-        else { report(indent + 1, "VDBLibrary", 1, "vers", 'V', version); }
-    }
-
-    {
-        rc_t rc2 = ReportBuild(f, indent + 1, self->mgr);
-        if (rc == 0 && rc2 != 0)
-        {   rc = rc2; }
-    }
-
-    if (argv_0) {
-        const char tag[] = "Tool";
-        reportOpen(indent + 1, tag, 3, "date", 's', date,
-                   "name", 's', argv_0, "vers", 'V', tool_ver);
-        {
-            rc_t rc2 = ReportBinary(f, indent + 2, argv_0);
-            if (rc == 0 && rc2 != 0)
-            {   rc = rc2; }
-        }
-        reportClose(indent + 1, tag);
-    }
-
-    reportClose(indent, "SOFTWARE");
-
-    return rc;
-}
-
-
-
-/* SetVDBManager
- *  remember the manager in use
- */
-LIB_EXPORT rc_t CC ReportSetVDBManager(const VDBManager *mgr) {
-    rc_t rc = 0;
-
-    Report* self = NULL;
-    ReportGet(&self);
-    if ( self != NULL )
-    {
-        rc = VDBManagerAddRef ( mgr );
-        if ( rc == 0 )
-        {
-            rc = VDBManagerRelease ( self -> mgr );
-            if ( rc != 0 )
-                VDBManagerRelease ( mgr );
-            else
-                self -> mgr = mgr;
-        }
-    }
-    return rc;
-}
-
-
-/* SetDatabase
- *  call it if you work with Database
- *
- *  "path" [ IN ] - path to the database that is used to access it
- */
-LIB_EXPORT rc_t CC ReportResetDatabase ( const char *path, const VDatabase *db )
-{
-    rc_t rc = 0;
-
-    Report* self = NULL;
-    ReportGet(&self);
-    if ( self != NULL )
-    {
-        rc = VDatabaseAddRef ( db );
-        if ( rc == 0 )
-        {
-            VTableRelease ( self -> table ), self -> table = NULL;
-            VDatabaseRelease ( self -> db );
-            self -> db = db;
-        }
-    }
-
-    return rc;
-}
-
-
-/* SetTable
- *  call it if you work with Table
- *
- *  "path" [ IN ] - path to the table that is used to access it
- */
-LIB_EXPORT rc_t CC ReportResetTable ( const char *path, const VTable *tbl )
-{
-    rc_t rc = 0;
-
-    Report* self = NULL;
-    ReportGet(&self);
-    if ( self != NULL )
-    {
-        rc = VTableAddRef ( tbl );
-        if ( rc == 0 )
-        {
-            VDatabaseRelease ( self -> db ), self -> db = NULL;
-            VTableRelease ( self -> table );
-            self -> table = tbl;
-        }
-    }
-
-    return rc;
-}
diff --git a/libs/vdb/row-id.c b/libs/vdb/row-id.c
deleted file mode 100644
index a5996f2..0000000
--- a/libs/vdb/row-id.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-#include "xform-priv.h"
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-
-static
-rc_t CC row_id_func ( void *self, const VXformInfo *info,
-    int64_t row_id, VRowResult *rslt, uint32_t argc, const VRowData in [] )
-{
-    assert ( rslt -> data -> elem_bits == 64 );
-    if ( rslt -> data -> elem_count == 0 )
-    {
-        rc_t rc = KDataBufferResize ( rslt -> data, 1 );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    * ( int64_t* ) rslt -> data -> base = row_id;
-    rslt -> elem_count = 1;
-
-    return 0;
-}
-
-VTRANSFACT_BUILTIN_IMPL ( vdb_row_id, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt -> variant = vftNonDetRow;
-    rslt -> u . ndf = row_id_func;
-    return 0;
-}
diff --git a/libs/vdb/row-len.c b/libs/vdb/row-len.c
deleted file mode 100644
index e2a6484..0000000
--- a/libs/vdb/row-len.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-#include "xform-priv.h"
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-
-static
-rc_t CC row_len_func ( void *self, const VXformInfo *info,
-    int64_t row_id, VRowResult *rslt, uint32_t argc, const VRowData in[] )
-{
-    assert ( rslt -> data -> elem_bits == 32 );
-    if ( rslt -> data -> elem_count == 0 )
-    {
-        rc_t rc = KDataBufferResize ( rslt -> data, 1 );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* for the moment row length are 32-bit */
-    * ( uint32_t* ) rslt -> data -> base = (uint32_t)in [ 0 ] . u . data . elem_count;
-    rslt -> elem_count = 1;
-
-    return 0;
-}
-
-VTRANSFACT_BUILTIN_IMPL ( vdb_row_len, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt -> variant = vftRow;
-    rslt -> u . rf = row_len_func;
-    return 0;
-}
diff --git a/libs/vdb/schema-db.c b/libs/vdb/schema-db.c
deleted file mode 100644
index 2301841..0000000
--- a/libs/vdb/schema-db.c
+++ /dev/null
@@ -1,752 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include "schema-priv.h"
-#include "schema-parse.h"
-#include "schema-dump.h"
-#include "dbmgr-priv.h"
-
-#include <klib/symbol.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * STblMember
- *  table member
- */
-
-/* Mark
- */
-static
-void CC STblMemberMark ( void * item, void * data )
-{
-    const STblMember * self = item;
-    if ( item != NULL )
-        STableMark ( ( void * )self -> tbl, data );
-}
-
-/* Dump
- */
-bool CC STblMemberDefDump ( void *item, void *dumper )
-{
-    SDumper *b = dumper;
-    STblMember *self = item;
-
-    b -> rc = SDumperPrint ( b, "\ttable " );
-    if ( b -> rc == 0 )
-        b -> rc = STableDump ( self -> tbl, b );
-    if ( b -> rc == 0 )
-        b -> rc = SDumperPrint ( b, " %N;\n", self -> name );
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-
-rc_t STblMemberDump ( const STblMember *self, SDumper *d )
-{
-    return FQNDump ( self != NULL ? self -> name : NULL, d );
-}
-
-
-/*--------------------------------------------------------------------------
- * SDBMember
- *  sub-db member
- */
-
-/* Find
- */
-SDBMember * CC SDatabaseFindDB ( const SDatabase *self, const char *name );
-
-/* Mark
- */
-static
-void CC SDBMemberMark ( void * item, void * data )
-{
-    const SDBMember * self = item;
-    if ( self != NULL )
-        SDatabaseMark ( ( void * )self -> db, data );
-}
-
-/* Dump
- */
-bool CC SDBMemberDefDump ( void *item, void *dumper )
-{
-    SDumper *b = dumper;
-    SDBMember *self = item;
-
-    b -> rc = SDumperPrint ( b, "\tdatabase " );
-    if ( b -> rc == 0 )
-        b -> rc = SDatabaseDump ( self -> db, b );
-    if ( b -> rc == 0 )
-        b -> rc = SDumperPrint ( b, " %N;\n", self -> name );
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-
-rc_t SDBMemberDump ( const SDBMember *self, SDumper *d )
-{
-    return FQNDump ( self != NULL ? self -> name : NULL, d );
-}
-
-
-/*--------------------------------------------------------------------------
- * SDatabase
- *  database declaration
- */
-
-#if SLVL >= 6
-
-/* Whack
- */
-void CC SDatabaseWhack ( void *item, void *ignore )
-{
-    SDatabase *self = item;
-
-    BSTreeWhack ( & self -> scope, KSymbolWhack, NULL );
-    VectorWhack ( & self -> db, SDBMemberWhack, NULL );
-    VectorWhack ( & self -> tbl, STblMemberWhack, NULL );
-
-    free ( self );
-}
-
-/* Cmp
- * Sort
- */
-int64_t CC SDatabaseCmp ( const void *item, const void *n )
-{
-    const uint32_t *a = item;
-    const SDatabase *b = n;
-
-    if ( * a > b -> version )
-        return 1;
-    return ( int64_t ) ( * a >> 24 ) - ( int64_t ) ( b -> version >> 24 );
-}
-
-int64_t CC SDatabaseSort ( const void *item, const void *n )
-{
-    const SDatabase *a = item;
-    const SDatabase *b = n;
-
-    return ( int64_t ) ( a -> version >> 24 ) - ( int64_t ) ( b -> version >> 24 );
-}
-
-static
-rc_t SDatabaseCompare ( const SDatabase *a, const SDatabase *b, const SDatabase **newer, bool exhaustive )
-{
-    assert ( ( a -> version >> 24 ) == ( b -> version >> 24 ) );
-
-    * newer = a -> version >= b -> version ? a : b;
-
-    /* TBD - more exhaustive comparison */
-
-    return 0;
-}
-
-/* Find
- *  generic object find within database scope
- *
- *  "name" [ OUT ] - returns list of overloaded objects if found
- *
- *  "type" [ OUT ] - returns object type id, e.g.:
- *    eDatatype, eTypeset, eFormat, eFunction, ePhysical, eTable, ...
- *
- *  "expr" [ IN ] - NUL terminated name expression identifying object
- *
- *  "ctx" [ IN ] - NUL terminated context string for evaluation,
- *  substitutes for filename in logging reports
- *
- *  returns principal object identified. if NULL but "name" is not
- *  NULL, then the object was only partially identified.
- */
-const void * SDatabaseFind ( const SDatabase *self,
-    const VSchema *schema, const SNameOverload **name,
-    uint32_t *type, const char *expr, const char *ctx )
-{
-    rc_t rc;
-    KSymTable tbl;
-
-    /* initialize to not-found */
-    const void *obj = NULL;
-    * name = NULL;
-    * type = 0;
-
-    /* build a symbol table for database */
-    rc = init_db_symtab ( & tbl, schema, self );
-    if ( rc == 0 )
-    {
-        obj = resolve_object ( & tbl, schema, NULL, name, type, expr, ctx, false );
-        KSymTableWhack ( & tbl );
-    }
-
-    return obj;
-}
-
-/* Extend
- */
-static
-void CC VectorTranslate ( Vector *v, const Vector *dad )
-{
-    uint32_t block = VectorBlock ( v );
-    uint32_t start = VectorStart ( dad ) + VectorLength ( dad );
-    VectorInit ( v, start, block );
-}
-
-static
-rc_t CC SDatabaseExtend ( SDatabase *self, const SDatabase *dad )
-{
-    self -> dad = dad;
-    VectorTranslate ( & self -> db, & dad -> db );
-    VectorTranslate ( & self -> tbl, & dad -> tbl );
-    return 0;
-}
-
-/* Mark
- */
-void CC SDatabaseClearMark ( void *item, void *ignore )
-{
-    SDatabase *self = item;
-    self -> marked = false;
-}
-
-
-void CC SDatabaseMark ( void * item, void * data )
-{
-    SDatabase * self = item;
-    if ( self != NULL && ! self -> marked )
-    {
-        self -> marked = true;
-        VectorForEach ( & self -> db, false, SDBMemberMark, data );
-        VectorForEach ( & self -> tbl, false, STblMemberMark, data );
-        SDatabaseMark ( ( void * )self -> dad, data );
-    }
-}
-
-void CC SDatabaseNameMark ( const SNameOverload *self, const VSchema *schema )
-{
-    if ( self != NULL )
-    {
-        VectorForEach ( & self -> items, false, SDatabaseMark, ( void* ) schema );
-    }
-}
-
-/* Dump
- *  dump "database" { }
- */
-rc_t SDatabaseDump ( const SDatabase *self, struct SDumper *d )
-{
-    d -> rc = FQNDump ( self != NULL ? self -> name : NULL, d );
-    if ( d -> rc == 0 && self != NULL )
-        d -> rc = SDumperVersion ( d, self -> version );
-    return d -> rc;
-}
-
-bool CC SDatabaseDefDump ( void *item, void *data )
-{
-    SDumper *b = data;
-    const SDatabase *self = ( const void* ) item;
-
-    if ( SDumperMarkedMode ( b ) && ! self -> marked )
-        return false;
-
-    b -> rc = SDumperPrint ( b, "\tdatabase %N", self -> name );
-
-    if ( b -> rc == 0 )
-        b -> rc = SDumperVersion ( b, self -> version );
-
-    /* TBD - need to overhaul inheritance of databases */
-    if ( b -> rc == 0 && self -> dad != NULL )
-        b -> rc = SDumperPrint ( b, "= %N", self -> dad -> name );
-
-    if ( b -> rc == 0 )
-        b -> rc = SDumperPrint ( b, "\n\t{\n" );
-
-    SDumperIncIndentLevel ( b );
-
-    if ( b -> rc == 0 )
-        VectorDoUntil ( & self -> tbl, false, STblMemberDefDump, b );
-
-    if ( b -> rc == 0 )
-        VectorDoUntil ( & self -> db, false, SDBMemberDefDump, b );
-
-    SDumperDecIndentLevel ( b );
-
-    if ( b -> rc == 0 )
-        b -> rc = SDumperPrint ( b, "\t}\n" );
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-
-#endif
-
-/*--------------------------------------------------------------------------
- * VSchema
- */
-
-#if SLVL >= 6
-
-static
-rc_t CC db_dbmbr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SDBMember *m )
-{
-    rc_t rc ;
-    const SNameOverload *name;
-
-    /* look for database typename */
-    rc = next_fqn ( tbl, src, t, env );
-    if ( rc != 0 )
-        return KTokenFailure ( t, klogErr, rc, "database typename" );
-    if ( t -> id != eDatabase )
-        return KTokenExpected ( t, klogErr, "database typename" );
-    name = t -> sym -> u . obj;
-    if ( name == NULL )
-    {
-        /* the database is declared but not defined: must be recursive */
-        return KTokenExpected ( t, klogErr, "database declared but not defined" );
-    }
-
-    /* look for version */
-    if ( next_token ( tbl, src, t ) -> id != eHash )
-        m -> db = VectorLast ( & name -> items );
-    else
-    {
-        uint32_t vers;
-        next_token ( tbl, src, t );
-        rc = maj_min_rel ( tbl, src, t, env, self, & vers, true );
-        if ( rc != 0 )
-            return rc;
-        m -> db = VectorFind ( & name -> items, & vers, NULL, SDatabaseCmp );
-    }
-    if ( m -> db == NULL )
-    {
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcDatabase, rcNotFound );
-        return KTokenRCExplain ( t, klogErr, rc );
-    }
-
-    /* get member name */
-    if ( t -> sym != NULL )
-    {
-        KTokenSourceReturn ( src, t );
-        next_shallow_token ( tbl, src, t, true );
-    }
-
-    /* looking for undefined identifier */
-    if ( t -> id == eIdent )
-    {
-        rc = KSymTableCreateConstSymbol ( tbl, & m -> name, & t -> str, eDBMember, m );
-        if ( rc != 0 )
-            return KTokenRCExplain ( t, klogInt, rc );
-    }
-    else
-    {
-        if ( t -> id == eDBMember )
-            return KTokenExpected ( t, klogErr, "undefined database member name" );
-        if ( t -> id != eForward && t -> id != eVirtual )
-            return KTokenExpected ( t, klogErr, "database member name" );
-
-        m -> name = t -> sym;
-        ( ( KSymbol* ) t -> sym ) -> u . obj = m;
-        ( ( KSymbol* ) t -> sym ) -> type = eDBMember;
-    }
-
-    /* expect we're done */
-    return expect ( tbl, src, next_token ( tbl, src, t ), eSemiColon, ";", true );
-}
-
-static
-rc_t CC database_dbmbr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SDatabase *db, bool tmpl )
-{
-    rc_t rc;
-    SDBMember *m = malloc ( sizeof * m );
-    if ( m == NULL )
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-    else
-    {
-        memset ( m, 0, sizeof * m );
-        m -> tmpl = tmpl;
-
-        rc = db_dbmbr ( tbl, src, t, env, self, m );
-        if ( rc == 0 )
-        {
-            rc = VectorAppend ( & db -> db, & m -> cid . id, m );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        SDBMemberWhack ( m, NULL );
-    }
-    return rc;
-}
-
-static
-rc_t CC db_tblmbr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, STblMember *m )
-{
-    rc_t rc ;
-    const SNameOverload *name;
-
-    /* look for table typename */
-    rc = next_fqn ( tbl, src, t, env );
-    if ( rc != 0 )
-        return KTokenFailure ( t, klogErr, rc, "table typename" );
-    if ( t -> id != eTable )
-        return KTokenExpected ( t, klogErr, "table typename" );
-    name = t -> sym -> u . obj;
-
-    /* look for version */
-    if ( next_token ( tbl, src, t ) -> id != eHash )
-        m -> tbl = VectorLast ( & name -> items );
-    else
-    {
-        uint32_t vers;
-        next_token ( tbl, src, t );
-        rc = maj_min_rel ( tbl, src, t, env, self, & vers, true );
-        if ( rc != 0 )
-            return rc;
-        m -> tbl = VectorFind ( & name -> items, & vers, NULL, STableCmp );
-    }
-    if ( m -> tbl == NULL )
-    {
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcTable, rcNotFound );
-        return KTokenRCExplain ( t, klogErr, rc );
-    }
-
-    /* get member name */
-    if ( t -> sym != NULL )
-    {
-        KTokenSourceReturn ( src, t );
-        next_shallow_token ( tbl, src, t, true );
-    }
-
-    /* looking for undefined identifier */
-    if ( t -> id == eIdent )
-    {
-        rc = KSymTableCreateConstSymbol ( tbl, & m -> name, & t -> str, eTblMember, m );
-        if ( rc != 0 )
-            return KTokenRCExplain ( t, klogInt, rc );
-    }
-    else
-    {
-        if ( t -> id == eTblMember )
-            return KTokenExpected ( t, klogErr, "undefined table member name" );
-        if ( t -> id != eForward && t -> id != eVirtual )
-            return KTokenExpected ( t, klogErr, "table member name" );
-
-        m -> name = t -> sym;
-        ( ( KSymbol* ) t -> sym ) -> u . obj = m;
-        ( ( KSymbol* ) t -> sym ) -> type = eTblMember;
-    }
-
-    /* expect we're done */
-    return expect ( tbl, src, next_token ( tbl, src, t ), eSemiColon, ";", true );
-}
-
-static
-rc_t CC database_tblmbr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SDatabase *db, bool tmpl )
-{
-    rc_t rc;
-    STblMember *m = malloc ( sizeof * m );
-    if ( m == NULL )
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-    else
-    {
-        memset ( m, 0, sizeof * m );
-        m -> tmpl = tmpl;
-
-        rc = db_tblmbr ( tbl, src, t, env, self, m );
-        if ( rc == 0 )
-        {
-            rc = VectorAppend ( & db -> tbl, & m -> cid . id, m );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        STblMemberWhack ( m, NULL );
-    }
-    return rc;
-}
-
-/*
- * database-body      = '{' [ <database-mbrs> ] '}'
- * database-mbrs      = [ 'template' ] <database-mbr> [ <database-mbrs> ]
- * database-mbr       = 'database' <db-mbr>
- *                    | 'table' <table-mbr>
- *                    | ';'
- */
-static
-rc_t CC database_mbr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SDatabase *db )
-{
-    bool tmpl = false;
-
-    switch ( t -> id )
-    {
-    case  kw_template:
-        tmpl = true;
-        next_token ( tbl, src, t );
-        break;
-    case eSemiColon:
-        next_token ( tbl, src, t );
-        return 0;
-    }
-
-    switch ( t -> id )
-    {
-    case kw_database:
-        return database_dbmbr ( tbl, src,
-            next_token ( tbl, src, t ), env, self, db, tmpl );
-    case kw_table:
-        return database_tblmbr ( tbl, src,
-            next_token ( tbl, src, t ), env, self, db, tmpl );
-    }
-
-    return KTokenExpected ( t, klogErr, "table or database" );
-}
-
-static
-rc_t CC database_body ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SDatabase *db )
-{
-    rc_t rc = expect ( tbl, src, t, eLeftCurly, "{", true );
-    if ( rc != 0 )
-        return rc;
-
-    while ( t -> id != eRightCurly )
-    {
-        rc = database_mbr ( tbl, src, t, env, self, db );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    return expect ( tbl, src, t, eRightCurly, "}", true );
-}
-
-
-/*
- * push-db-scope
- * pop-db-scope
- */
-rc_t push_db_scope ( KSymTable *tbl, const SDatabase *db )
-{
-    if ( db -> dad != NULL )
-    {
-        rc_t rc = push_db_scope ( tbl, db -> dad );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    return KSymTablePushScope ( tbl, ( BSTree* ) & db -> scope );
-}
-
-void pop_db_scope ( KSymTable *tbl, const SDatabase *db )
-{
-    while ( db != NULL )
-    {
-        KSymTablePopScope ( tbl );
-        db = db -> dad;
-    }
-}
-
-/*
- * init-db-symtab
- *  initializes "tbl"
- *  places db in scope
- *  must be balanced by KSymTableWhack
- */
-rc_t init_db_symtab ( KSymTable *tbl, const VSchema *schema, const SDatabase *db )
-{
-    rc_t rc = init_symtab ( tbl, schema );
-    if ( rc == 0 )
-    {
-        rc = push_db_scope ( tbl, db );
-        if ( rc == 0 )
-            return 0;
-
-        KSymTableWhack ( tbl );
-    }
-
-    return rc;
-}
-
-
-/*
- * database-decl      = 'database' <fqn> '#' <maj-min-rel>
- *                      [ '=' <database-name> ] <database-body>
- * database-body      = '{' [ <database-mbrs> ] '}'
- * database-mbrs      = <database-mbr> [ <database-mbrs> ]
- */
-static
-rc_t database_decl ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SDatabase *db )
-{
-    /* db name */
-    rc_t rc = create_fqn ( tbl, src, t, env, eDatabase, NULL );
-    if ( rc != 0 && GetRCState ( rc ) != rcExists )
-        return KTokenFailure ( t, klogErr, rc, "database name" );
-    db -> name = t -> sym;
-
-    /* database version */
-    if ( next_token ( tbl, src, t ) -> id != eHash )
-        return KTokenExpected ( t, klogErr, "#" );
-    next_token ( tbl, src, t );
-    rc = maj_min_rel ( tbl, src, t, env, self, & db -> version, true );
-    if ( rc != 0 )
-        return rc;
-
-    /* prepare vectors */
-    VectorInit ( & db -> db, 0, 8 );
-    VectorInit ( & db -> tbl, 0, 8 );
-
-    /* look for inheritance */
-    if ( t -> id == eAssign )
-    {
-        const SDatabase *dad;
-        const SNameOverload *pname;
-
-        /* look for dad */
-        rc = next_fqn ( tbl, src, next_token ( tbl, src, t ), env );
-        if ( rc != 0 )
-            return KTokenFailure ( t, klogErr, rc, "database name" );
-
-        /* insist that dad be a database */
-        if ( t -> id != eDatabase )
-            return KTokenExpected ( t, klogErr, "database name" );
-        pname = t -> sym -> u . obj;
-
-        /* check for version */
-        if ( next_token ( tbl, src, t ) -> id != eHash )
-            dad = VectorLast ( & pname -> items );
-        else
-        {
-            uint32_t pvers;
-            next_token ( tbl, src, t );
-            rc = maj_min_rel ( tbl, src, t, env, self, & pvers, true );
-            if ( rc != 0 )
-                return rc;
-            dad = VectorFind ( & pname -> items, & pvers, NULL, SDatabaseCmp );
-        }
-
-        /* dad should be found */
-        if ( dad == NULL )
-        {
-            rc = RC ( rcVDB, rcSchema, rcParsing, rcDatabase, rcNotFound );
-            return KTokenRCExplain ( t, klogErr, rc );
-        }
-
-        /* take the inheritance */
-        rc = SDatabaseExtend ( db, dad );
-        if ( rc != 0 )
-            return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    /* enter database into scope */
-    rc = push_db_scope ( tbl, db );
-    if ( rc == 0 )
-    {
-        /* parse the definition */
-        rc = database_body ( tbl, src, t, env, self, db );
-
-        /* pop out of scope */
-        pop_db_scope ( tbl, db );
-    }
-
-    return rc;
-}
-
-rc_t database_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    rc_t rc;
-    void *ignore;
-
-    SDatabase *db = malloc ( sizeof * db );
-    if ( db == NULL )
-    {
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-        return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    memset ( db, 0, sizeof * db );
-    rc = database_decl ( tbl, src, t, env, self, db );
-    if ( rc == 0 )
-    {
-        SNameOverload *name = ( void* ) db -> name -> u . obj;
-        if ( name == NULL )
-        {
-            rc = SNameOverloadMake ( & name, db -> name, 0, 4 );
-            if ( rc == 0 )
-            {
-                rc = VectorAppend ( & self -> dname, & name -> cid . id, name );
-                if ( rc != 0 )
-                    SNameOverloadWhack ( name, NULL );
-            }
-        }
-
-        if ( rc == 0 )
-        {
-            rc = VectorAppend ( & self -> db, & db -> id, db );
-            if ( rc == 0 )
-            {
-                uint32_t idx;
-                rc = VectorInsertUnique ( & name -> items, db, & idx, SDatabaseSort );
-                if ( rc == 0 )
-                    return rc;
-
-                if ( GetRCState ( rc ) == rcExists )
-                {
-                    const SDatabase *newer;
-                    SDatabase *exist = VectorGet ( & name -> items, idx );
-                    rc = SDatabaseCompare ( exist, db, & newer, false );
-                    if ( rc == 0 && newer == db )
-                    {
-                        VectorSwap ( & name -> items, idx, db, & ignore );
-                        /* TBD - need to update parent/child relationships */
-                        return 0;
-                    }
-                }
-
-                VectorSwap ( & self -> db, db -> id, NULL, & ignore );
-            }
-        }
-    }
-    else if ( GetRCState ( rc ) == rcExists )
-    {
-        rc = 0;
-    }
-
-    SDatabaseWhack ( db, NULL );
-
-    return rc;
-}
-
-#endif
diff --git a/libs/vdb/schema-dump.c b/libs/vdb/schema-dump.c
deleted file mode 100644
index 5ef2ca3..0000000
--- a/libs/vdb/schema-dump.c
+++ /dev/null
@@ -1,683 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include "schema-dump.h"
-#include "schema-priv.h"
-#include "schema-parse.h"
-#include "schema-expr.h"
-
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/symbol.h>
-#include <klib/symtab.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * SDumper
- */
-
-
-/* Init
- *  sets up block
- */
-void SDumperInit ( SDumper *self, const VSchema *schema, uint32_t mode,
-    rc_t ( CC * flush ) ( void *fd, const void *buffer, size_t size ), void *fd )
-{
-    self -> schema = schema;
-    self -> flush = flush;
-    self -> fd = fd;
-    self -> sep = "";
-    self -> rc = 0;
-    self -> indent = 0;
-    self -> mode = ( uint16_t ) mode;
-    self -> total = 0;
-}
-
-
-/* Flush
- */
-static
-rc_t SDumperFlush ( SDumper *self )
-{
-    rc_t rc = ( * self -> flush ) ( self -> fd, self -> buffer, self -> total );
-    if ( rc == 0 )
-        self -> total = 0;
-    return rc;
-}
-
-static
-rc_t SDumperFlushLine ( SDumper *self )
-{
-#if ! _DEBUGGING
-    if ( self -> total < sizeof self -> buffer / 2 )
-        return 0;
-#endif
-    return SDumperFlush ( self );
-}
-
-
-/* Whack
- *  flushes buffer if necessary
- */
-rc_t SDumperWhack ( SDumper *self )
-{
-    if ( self -> rc == 0 && self -> total != 0 )
-        return SDumperFlush ( self );
-    return 0;
-}
-
-
-/* Write
- *  writes data to buffer, flushes as necessary
- */
-rc_t SDumperWrite ( SDumper *self, const char *buffer, size_t size )
-{
-    rc_t rc;
-    size_t total, num_writ;
-
-    for ( rc = 0, total = 0; total < size; total += num_writ )
-    {
-        if ( self -> total == sizeof self -> buffer )
-        {
-            rc = SDumperFlush ( self );
-            if ( rc != 0 )
-                break;
-        }
-
-        num_writ = size - total;
-        if ( num_writ > sizeof self -> buffer - self -> total )
-            num_writ = sizeof self -> buffer - self -> total;
-
-        memcpy ( & self -> buffer [ self -> total ], & buffer [ total ], num_writ );
-        self -> total += num_writ;
-    }
-
-    return rc;
-}
-
-/* IndentLevel
- *  increase or decrease indentation level
- */
-void SDumperIncIndentLevel ( SDumper *self )
-{
-    ++ self -> indent;
-}
-
-void SDumperDecIndentLevel ( SDumper *self )
-{
-    if ( self -> indent > 0 )
-        -- self -> indent;
-}
-
-
-/* Indent
- *  writes indentation spacing
- */
-rc_t SDumperIndent ( SDumper *self )
-{
-    rc_t rc;
-    uint32_t total, num_writ;
-
-    /* use a tab */
-    const char *tabs = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
-
-    for ( rc = 0, total = 0; total < self -> indent; total += num_writ )
-    {
-        num_writ = ( ( self -> indent - total - 1 ) & 0xF ) + 1;
-        rc = SDumperWrite ( self, tabs, num_writ );
-        if ( rc != 0 )
-            break;
-    }
-
-    return rc;
-}
-
-/* SepString
- *  sets separator string
- */
-void SDumperSepString ( SDumper *self, const char *sep )
-{
-    self -> sep = sep;
-}
-
-/* Sep
- *  write separator string
- */
-rc_t SDumperSep ( SDumper *self )
-{
-    if ( self -> sep == NULL )
-        return 0;
-
-    return SDumperWrite ( self, self -> sep, strlen ( self -> sep ) );
-}
-
-/* Print
- *  \t   - indent
- *  \n   - end of line
- *  \v   - separator
- *  %d   - int
- *  %u   - unsigned int
- *  %x   - unsigned int ( lower-case )
- *  %X   - unsigned int ( UPPER-case )
- *  %f   - double
- *  %ld  - int64_t
- *  %lu  - uint64_t
- *  %lx  - uint64_t ( lower-case )
- *  %lX  - uint64_t ( UPPER-case )
- *  %p   - pointer ( UPPER-case )
- *  %z   - size_t ( decimal )
- *  %s   - const char* ( NUL-terminated )
- *  %.*s - int, const char*
- *  %S   - const String*
- *  %N   - const KSymbol*
- *  %T   - const VTypedecl*
- *  %F   - const VFormatdecl*
- *  %V   - uint32_t version
- *  %E   - const SExpression*
- */
-rc_t SDumperVPrint ( SDumper *self, const char *fmt, va_list args )
-{
-    rc_t rc;
-    const char *start, *end;
-    for ( rc = 0, start = end = fmt; * end != 0; ++ end )
-    {
-        int len;
-        size_t size;
-        char buffer [ 256 ];
-
-        switch ( * end )
-        {
-        case '\t':
-            if ( end > start )
-                rc = SDumperWrite ( self, start, end - start );
-            if ( rc == 0 )
-                rc = SDumperIndent ( self );
-            start = end + 1;
-            break;
-        case '\n':
-            rc = SDumperWrite ( self, start, end - start + 1 );
-            if ( rc == 0 )
-                rc = SDumperFlushLine ( self );
-            start = end + 1;
-            break;
-        case '\v':
-            if ( end > start )
-                rc = SDumperWrite ( self, start, end - start );
-            if ( rc == 0 )
-                rc = SDumperSep ( self );
-            start = end + 1;
-            break;
-        case '%':
-            if ( end > start )
-            {
-                rc = SDumperWrite ( self, start, end - start );
-                if ( rc != 0 )
-                    break;
-            }
-            switch ( * ( ++ end ) )
-            {
-            case 'd':
-                len = sprintf ( buffer, "%d", va_arg ( args, int ) );
-                rc = SDumperWrite ( self, buffer, len );
-                break;
-            case 'u':
-                len = sprintf ( buffer, "%u", va_arg ( args, unsigned int ) );
-                rc = SDumperWrite ( self, buffer, len );
-                break;
-            case 'x':
-                len = sprintf ( buffer, "%x", va_arg ( args, unsigned int ) );
-                rc = SDumperWrite ( self, buffer, len );
-                break;
-            case 'X':
-                len = sprintf ( buffer, "%X", va_arg ( args, unsigned int ) );
-                rc = SDumperWrite ( self, buffer, len );
-                break;
-            case 'f':
-                len = sprintf ( buffer, "%f", va_arg ( args, double ) );
-                rc = SDumperWrite ( self, buffer, len );
-                break;
-            case 'l':
-                switch ( * ( ++ end ) )
-                {
-                case 'd':
-                    rc = string_printf ( buffer, sizeof buffer, & size, "%ld", va_arg ( args, int64_t ) );
-                    if ( rc == 0 )
-                        rc = SDumperWrite ( self, buffer, size );
-                    break;
-                case 'u':
-                    rc = string_printf ( buffer, sizeof buffer, & size, "%lu", va_arg ( args, uint64_t ) );
-                    if ( rc == 0 )
-                        rc = SDumperWrite ( self, buffer, size );
-                    break;
-                case 'x':
-                    rc = string_printf ( buffer, sizeof buffer, & size, "%lx", va_arg ( args, uint64_t ) );
-                    if ( rc == 0 )
-                        rc = SDumperWrite ( self, buffer, size );
-                    break;
-                case 'X':
-                    rc = string_printf ( buffer, sizeof buffer, & size, "%lX", va_arg ( args, uint64_t ) );
-                    if ( rc == 0 )
-                        rc = SDumperWrite ( self, buffer, size );
-                    break;
-                }
-                break;
-            case 'p':
-                rc = string_printf ( buffer, sizeof buffer, & size, "0x%p", va_arg ( args, size_t ) );
-                if ( rc == 0 )
-                    rc = SDumperWrite ( self, buffer, size );
-                break;
-            case 'z':
-                rc = string_printf ( buffer, sizeof buffer, & size, "%zu", va_arg ( args, size_t ) );
-                if ( rc == 0 )
-                    rc = SDumperWrite ( self, buffer, size );
-                break;
-            case 's':
-                len = snprintf ( buffer, sizeof buffer, "%s", va_arg ( args, const char* ) );
-                if ( len < 0 || len >= sizeof buffer )
-                    rc = RC ( rcVDB, rcSchema, rcWriting, rcString, rcExcessive );
-                else
-                    rc = SDumperWrite ( self, buffer, len );
-                break;
-            case '.':
-                if ( end [ 1 ] == '*' && end [ 2 ] == 's' )
-                {
-                    end += 2;
-                    len = va_arg ( args, int );
-                    if ( len >= sizeof buffer )
-                        rc = RC ( rcVDB, rcSchema, rcWriting, rcString, rcExcessive );
-                    else
-                    {
-                        len = sprintf ( buffer, "%.*s", len, va_arg ( args, const char* ) );
-                        rc = SDumperWrite ( self, buffer, len );
-                    }
-                    break;
-                }
-                /* not handling anything else */
-                rc = SDumperWrite ( self, "%.", 2 );
-                break;
-            case 'S':
-                rc = StringDump ( va_arg ( args, const String* ), self );
-                break;
-            case 'N':
-                rc = FQNDump ( va_arg ( args, const KSymbol* ), self );
-                break;
-#if SLVL >= 1
-            case 'T':
-                rc = VTypedeclDump ( va_arg ( args, struct VTypedecl const* ), self );
-                break;
-            case 'F':
-                rc = VFormatdeclDump ( va_arg ( args, struct VFormatdecl const* ), self );
-                break;
-#endif
-#if SLVL >= 2
-            case 'E':
-                rc = SExpressionDump ( va_arg ( args, const SExpression* ) , self );
-                break;
-#endif
-            case 'V':
-                rc = SDumperVersion ( self, va_arg ( args, uint32_t ) );
-                break;
-            case '%':
-                rc = SDumperWrite ( self, "%", 1 );
-                break;
-            }
-            start = end + 1;
-            break;
-        }
-
-        if ( rc != 0 )
-            break;
-    }
-
-    if ( rc == 0 && end > start )
-    {
-        rc = SDumperWrite ( self, start, end - start );
-        if ( rc == 0 )
-            rc = SDumperFlushLine ( self );
-    }
-
-    return rc;
-}
-
-rc_t SDumperPrint ( SDumper *self, const char *fmt, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, fmt );
-    rc = SDumperVPrint ( self, fmt, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * various types
- */
-
-/* Version
- */
-rc_t SDumperVersion ( SDumper *self, uint32_t version )
-{
-    const char *fmt;
-
-    if ( ( version & 0xFFFF ) != 0 )
-        fmt =" #%u.%u.%u";
-    else if ( ( version & 0xFF0000 ) != 0 )
-        fmt =" #%u.%u";
-    else
-        fmt =" #%u";
-
-    switch ( SDumperMode ( self ) )
-    {
-    case sdmCompact:
-        ++ fmt;
-        break;
-    }
-
-    return SDumperPrint ( self, fmt,
-                          ( version >> 24 ),
-                          ( version >> 16 ) & 0xFF,
-                          ( version & 0xFFFF ) );
-}
-
-/* String
- */
-rc_t StringDump ( const String *self, SDumper *b )
-{
-    return SDumperWrite ( b, self -> addr, self -> size );
-}
-
-/* KSymbol
- */
-rc_t KSymbolDump ( const KSymbol *self, SDumper *b )
-{
-    if ( self == NULL )
-        return SDumperWrite ( b, "NULL", 4 );
-
-    return StringDump ( & self -> name, b );
-}
-
-/* FQN
- *  writes fully qualified name in schema format
- */
-rc_t FQNDump ( const KSymbol *self, SDumper *b )
-{
-    rc_t rc = 0;
-
-    if ( self != NULL && self -> dad != NULL )
-    {
-        rc = FQNDump ( self -> dad, b );
-        if ( rc == 0 )
-            rc = SDumperWrite ( b, ":", 1 );
-    }
-
-    if ( rc == 0 )
-        rc = KSymbolDump ( self, b );
-
-    return rc;
-}
-
-/* Alias
- */
-LIB_EXPORT bool CC KSymbolDumpAlias ( void *item, void *data )
-{
-    SDumper *b = data;
-    const KSymbol *self = ( const KSymbol* ) item;
-    if ( self -> u . obj == b -> alias -> u . obj )
-    {
-        if ( SDumperMode ( b ) == sdmCompact )
-            b -> rc = SDumperPrint ( b, "alias %N %N;", b -> alias, self );
-        else
-            b -> rc = SDumperPrint ( b, "alias %N %N;\n", b -> alias, self );
-    }
-
-    return false;
-}
-
-rc_t AliasDump ( const KSymbol *self, SDumper *b )
-{
-    const VSchema *schema = b -> schema;
-    for ( b -> rc = 0, b -> alias = self; schema != NULL; schema = schema -> dad )
-    {
-        if ( VectorDoUntil ( & schema -> alias, false, KSymbolDumpAlias, b ) )
-            return b -> rc;
-    }
-    return 0;
-}
-
-/* VSchema
- */
-static
-bool VSchemaDumpInt ( const VSchema *self, SDumper *b, int dump_class )
-{
-    /* never dump intrinsic schema */
-    if ( self -> dad == NULL )
-    {
-#if SLVL >= 1
-        if ( SDumperMode ( b ) == sdmCompact )
-            SDumperPrint ( b, "version 1;" );
-        else
-            SDumperPrint ( b, "version 1;\n" );
-#endif
-        return false;
-    }
-
-    /* always dump parent */
-    if ( VSchemaDumpInt ( self -> dad, b, dump_class ) )
-        return true;
-
-    /* dump self */
-#if SLVL >= 1
-    if ( ( dump_class == 0 || dump_class == sdcTypes ) &&
-         VectorDoUntil ( & self -> dt, false, SDatatypeDefDump, b ) )
-        return true;
-
-    if ( ( dump_class == 0 || dump_class == sdcTypesets ) &&
-         VectorDoUntil ( & self -> ts, false, STypesetDefDump, b ) )
-        return true;
-#endif
-    if ( ( dump_class == 0 || dump_class == sdcFormats ) &&
-         VectorDoUntil ( & self -> fmt, false, SFormatDefDump, b ) )
-        return true;
-#if SLVL >= 2
-    if ( ( dump_class == 0 || dump_class == sdcConstants ) &&
-         VectorDoUntil ( & self -> cnst, false, SConstantDefDump, b ) )
-        return true;
-#endif
-#if SLVL >= 3
-    if ( ( dump_class == 0 || dump_class == sdcFunctions ) &&
-         VectorDoUntil ( & self -> func, false, SFunctionDeclDump, b ) )
-        return true;
-#endif
-#if SLVL >= 5
-    if ( ( dump_class == 0 || dump_class == sdcColumns ) &&
-         VectorDoUntil ( & self -> phys, false, SPhysicalDefDump, b ) )
-        return true;
-#endif
-#if SLVL >= 6
-    if ( ( dump_class == 0 || dump_class == sdcTables ) &&
-         VectorDoUntil ( & self -> tbl, false, STableDefDump, b ) )
-        return true;
-    if ( ( dump_class == 0 || dump_class == sdcDatabases ) &&
-         VectorDoUntil ( & self -> db, false, SDatabaseDefDump, b ) )
-        return true;
-#endif
-    return false;
-}
-
-LIB_EXPORT rc_t CC VSchemaDump ( const VSchema *self, uint32_t mode, const char *decl,
-    rc_t ( CC * flush ) ( void *fd, const void *buffer, size_t bsize ), void *fd )
-{
-    rc_t rc;
-    bool failed;
-    int dump_class = ( mode >> 8 ) & 0x7F;
-
-    SDumper b;
-    SDumperInit ( & b, self, mode & 0x80FF, flush, fd );
-
-    if ( decl != NULL && decl [ 0 ] != 0 )
-    {
-        uint32_t type;
-        const void *obj;
-        const SNameOverload *name;
-
-        b . mode |= MARKED_MODE;
-        VSchemaClearMark ( self );
-
-        obj = VSchemaFind ( self, & name, & type, decl, "VSchemaDump", false );
-
-        if ( obj != NULL ) switch ( type )
-        {
-        case eConstant:
-            SConstantMark ( obj );
-            break;
-        case eFormat:
-            SFormatMark ( obj );
-            break;
-        case eDatatype:
-            SDatatypeMark ( obj );
-            break;
-        case eTypeset:
-            STypesetMark ( obj, self );
-            break;
-        case eFunction:
-        case eUntypedFunc:
-        case eScriptFunc:
-            SFunctionMark ( ( void * )obj, ( void * )self );
-            break;
-        case ePhysical:
-            SPhysicalMark ( ( void * )obj, ( void * )self );
-            break;
-        case eTable:
-            STableMark ( ( void * )obj, ( void * )self );
-            break;
-        case eDatabase:
-            SDatabaseMark ( ( void * )obj, ( void * )self );
-            break;
-        }
-        else if ( name != NULL ) switch ( type )
-        {
-        case eFunction:
-        case eUntypedFunc:
-        case eScriptFunc:
-            SFuncNameMark ( name, self );
-            break;
-        case ePhysical:
-            SPhysNameMark ( name, self );
-            break;
-        case eTable:
-            STableNameMark ( name, self );
-            break;
-        case eDatabase:
-            SDatabaseNameMark ( name, self );
-            break;
-        }
-    }
-
-    failed = VSchemaDumpInt ( self, & b, dump_class );
-
-    rc = SDumperWhack ( & b );
-    return failed ? b . rc : rc;
-}
-
-static rc_t CC dump_to_stderr(void *dst, const void *buf, size_t sz)
-{
-    fwrite(buf, 1, sz, stderr);
-    return 0;
-}
-
-rc_t VSchemaDebugPrint ( const VSchema *self, const char *decl )
-{
-    return VSchemaDump ( self, sdmPrint, decl, dump_to_stderr, NULL );
-}
-
-/* ToText
- *  converts some object to textual representation
- */
-typedef struct VSchema2TextData VSchema2TextData;
-struct VSchema2TextData
-{
-    char *buff;
-    size_t bsize;
-    size_t total;
-};
-
-static
-rc_t CC flush_to_text ( void *data, const void *buffer, size_t size )
-{
-    VSchema2TextData *pb = data;
-    if ( size != 0 )
-    {
-        if ( pb -> total + size >= pb -> bsize )
-            return RC ( rcVDB, rcSchema, rcWriting, rcBuffer, rcInsufficient );
-
-        memcpy ( & pb -> buff [ pb -> total ], buffer, size );
-        pb -> total += size;
-    }
-    return 0;
-}
-
-rc_t VSchemaToText ( const VSchema *self,
-    char *buff, size_t bsize, size_t *num_writ, const char *fmt, ... )
-{
-    SDumper b;
-    rc_t rc, wrc;
-    VSchema2TextData pb;
-
-    va_list args;
-    va_start ( args, fmt );
-
-    assert ( buff != NULL );
-    assert ( bsize != 0 );
-
-    SDumperInit ( & b, self, sdmCompact, flush_to_text, & pb );
-
-    pb . buff = buff;
-    pb . bsize = bsize;
-    pb . total = 0;
-
-    rc = SDumperVPrint ( & b, fmt, args );
-    wrc = SDumperWhack ( & b );
-
-    * num_writ = pb . total;
-
-    va_end ( args );
-    return rc != 0 ? rc : wrc;
-}
diff --git a/libs/vdb/schema-dump.h b/libs/vdb/schema-dump.h
deleted file mode 100644
index 9172fc9..0000000
--- a/libs/vdb/schema-dump.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_schema_dump_
-#define _h_schema_dump_
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct String;
-struct KSymbol;
-struct VSchema;
-struct VTypedecl;
-struct VFormatdecl;
-
-
-/*--------------------------------------------------------------------------
- * SDumper
- */
-#define MARKED_MODE 0x8000
-
-enum VSchemaDumpClass
-{
-    sdcTypes = 1,
-    sdcTypesets,
-    sdcFormats,
-    sdcConstants,
-    sdcFunctions,
-    sdcColumns,
-    sdcTables,
-    sdcDatabases
-};
-
-typedef struct SDumper SDumper;
-struct SDumper
-{
-    struct VSchema const *schema;
-
-    struct KSymbol const *alias;
-
-    rc_t ( CC * flush ) ( void *fd, const void *buffer, size_t size );
-    void *fd;
-
-    const char *sep;
-
-    rc_t rc;
-    uint16_t indent;
-    uint16_t mode;
-
-    size_t total;
-    char buffer [ 4096 ];
-};
-
-/* Init
- *  sets up block
- */
-void SDumperInit ( SDumper *self, struct VSchema const *schema, uint32_t mode,
-    rc_t ( CC * flush ) ( void *fd, const void *buffer, size_t size ), void *fd );
-
-/* Whack
- *  flushes buffer if necessary
- */
-rc_t SDumperWhack ( SDumper *self );
-
-/* Write
- *  write some text to the dumper
- */
-rc_t SDumperWrite ( SDumper *self,
-    const char *buffer, size_t size );
-
-/* IndentLevel
- *  increase or decrease indentation level
- */
-void SDumperIncIndentLevel ( SDumper *self );
-void SDumperDecIndentLevel ( SDumper *self );
-
-/* Indent
- *  writes indentation spacing
- */
-rc_t SDumperIndent ( SDumper *self );
-
-/* SepString
- *  sets separator string
- */
-void SDumperSepString ( SDumper *self, const char *sep );
-
-/* Sep
- *  write separator string
- */
-rc_t SDumperSep ( SDumper *self );
-
-/* Print
- *  \t   - indent
- *  \n   - end of line
- *  \v   - separator
- *  %d   - int
- *  %u   - unsigned int
- *  %x   - unsigned int ( lower-case )
- *  %X   - unsigned int ( UPPER-case )
- *  %f   - double
- *  %ld  - int64_t
- *  %lu  - uint64_t
- *  %lx  - uint64_t ( lower-case )
- *  %lX  - uint64_t ( UPPER-case )
- *  %p   - pointer ( UPPER-case )
- *  %z   - size_t ( decimal )
- *  %s   - const char* ( NUL-terminated )
- *  %.*s - int, const char*
- *  %S   - const String*
- *  %N   - const KSymbol*
- *  %T   - const VTypedecl*
- *  %F   - const VFormatdecl*
- *  %V   - uint32_t version
- *  %E   - const SExpression*
- */
-rc_t SDumperPrint ( SDumper *self, const char *fmt, ... );
-rc_t SDumperVPrint ( SDumper *self, const char *fmt, va_list args );
-
-
-/* Mode
- *  get the dump mode
- */
-#define SDumperMode( self ) \
-    ( ( self ) -> mode & 0xFF )
-
-/* Class
- *  get the class of object to dump
- */
-#define SDumperClass( self ) \
-    ( ( ( self ) -> mode >> 8 ) & 0x7F )
-
-/* MarkedMode
- *  tells if only running in marked mode
- */
-#define SDumperMarkedMode( self ) \
-    ( ( self ) -> mode & MARKED_MODE )
-
-
-/*--------------------------------------------------------------------------
- * various types
- */
-
-/* Version
- */
-rc_t SDumperVersion ( SDumper *self, uint32_t version );
-
-/* String
- */
-rc_t StringDump ( struct String const *self, SDumper *d );
-
-/* KSymbol
- */
-rc_t KSymbolDump ( struct KSymbol const *self, SDumper *b );
-
-/* FQN
- *  writes fully qualified name in schema format
- */
-rc_t FQNDump ( struct KSymbol const *self, SDumper *b );
-
-/* Alias
- */
-rc_t AliasDump ( struct KSymbol const *self, SDumper *b );
-
-/* VTypedecl
- * VFormatdecl
- */
-rc_t VTypedeclDump ( struct VTypedecl const *self, SDumper *b );
-rc_t VFormatdeclDump ( struct VFormatdecl const *self, SDumper *b );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_schema_dump_ */
diff --git a/libs/vdb/schema-eval.c b/libs/vdb/schema-eval.c
deleted file mode 100644
index 2a0ebc6..0000000
--- a/libs/vdb/schema-eval.c
+++ /dev/null
@@ -1,1400 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include "schema-priv.h"
-#include "schema-parse.h"
-#include "schema-expr.h"
-
-#include <klib/symbol.h>
-#include <klib/symtab.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <bitstr.h>
-#include <atomic32.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * VSchema
- */
-
-
-/* CacheIntrinsicTypeId
- *  for id-caching
- *
- *  reads id atomically from "cache" and returns if non-zero
- *
- *  otherwise retrieves type id by name lookup, and sets
- *  value atomically in "cache" before returning.
- */
-uint32_t VSchemaCacheIntrinsicTypeId ( const VSchema *self,
-    atomic32_t *cache, const char *type_name )
-{
-    uint32_t id;
-
-    assert ( self != NULL );
-    assert ( cache != NULL );
-    assert ( type_name != NULL && type_name [ 0 ] != 0 );
-
-    /* retrieve cached value */
-    id = atomic32_read ( cache );
-    if ( id == 0 )
-    {
-        String name;
-        uint32_t prev;
-        const KSymbol *sym;
-        const SDatatype *dt;
-
-        /* find intrinsic schema */
-        const VSchema *intrinsic = self;
-        while ( intrinsic -> dad != NULL )
-            intrinsic = intrinsic -> dad;
-
-        /* find datatype U32 */
-        StringInitCString ( & name, type_name );
-        sym = ( const KSymbol* )
-            BSTreeFind ( & intrinsic -> scope, & name, KSymbolCmp );
-        assert ( sym != NULL );
-        dt = sym -> u . obj;
-
-        /* this SHOULD be idempotent */
-        prev = atomic32_test_and_set ( cache, ( int ) dt -> id, id );
-        assert ( prev == id || prev == dt -> id );
-
-        id = dt -> id;
-    }
-
-    return id;
-}
-
-
-/*--------------------------------------------------------------------------
- * constant numeric expressions
- *
- *  built-in typecasting allows for the chain
- *    bool => uint => int => float
- *
- *  built-in size promotion is automatic from 8 => 16 => 32 => 64 bits
- *
- *  constant size-demotion is allowed due to knowledge of constant value
- *
- *  explicit casts may reverse type promotion rules
- */
-
-
-/* 64 bit interchange union
- */
-typedef union nx nx;
-union nx
-{
-    uint64_t u64;
-    int64_t i64;
-    double f64;
-};
-
-
-/* readers
- *  access data in 8, 16, 32 or 64 bit form
- *  return data in 64 bit form
- *  advance data pointer
- */
-static
-const void *read_bool ( nx *data, const void *p )
-{
-    const bool *src = p;
-    data -> u64 = src [ 0 ];
-    return src + 1;
-}
-
-static
-const void *read_U8 ( nx *data, const void *p )
-{
-    const uint8_t *src = p;
-    data -> u64 = src [ 0 ];
-    return src + 1;
-}
-
-static
-const void *read_U16 ( nx *data, const void *p )
-{
-    const uint16_t *src = p;
-    data -> u64 = src [ 0 ];
-    return src + 1;
-}
-
-static
-const void *read_U32 ( nx *data, const void *p )
-{
-    const uint32_t *src = p;
-    data -> u64 = src [ 0 ];
-    return src + 1;
-}
-
-static
-const void *read_U64 ( nx *data, const void *p )
-{
-    const uint64_t *src = p;
-    data -> u64 = src [ 0 ];
-    return src + 1;
-}
-
-static
-const void *read_I8 ( nx *data, const void *p )
-{
-    const int8_t *src = p;
-    data -> i64 = src [ 0 ];
-    return src + 1;
-}
-
-static
-const void *read_I16 ( nx *data, const void *p )
-{
-    const int16_t *src = p;
-    data -> i64 = src [ 0 ];
-    return src + 1;
-}
-
-static
-const void *read_I32 ( nx *data, const void *p )
-{
-    const int32_t *src = p;
-    data -> i64 = src [ 0 ];
-    return src + 1;
-}
-
-static
-const void *read_I64 ( nx *data, const void *p )
-{
-    const int64_t *src = p;
-    data -> i64 = src [ 0 ];
-    return src + 1;
-}
-
-static
-const void *read_F32 ( nx *data, const void *p )
-{
-    const float *src = p;
-    data -> f64 = src [ 0 ];
-    return src + 1;
-}
-
-static
-const void *read_F64 ( nx *data, const void *p )
-{
-    const double *src = p;
-    data -> f64 = src [ 0 ];
-    return src + 1;
-}
-
-/* writers
- *  write data in 8, 16, 32, or 64 bit form
- *  receive data in 64 bit form
- *  advance pointers
- */
-static
-void *write_bool ( void *p, const nx *data )
-{
-    bool *dst = p;
-    dst [ 0 ] = data -> u64 ? true : false;
-    return dst + 1;
-}
-
-static
-void *write_U8 ( void *p, const nx *data )
-{
-    uint8_t *dst = p;
-    dst [ 0 ] = ( uint8_t ) data -> u64;
-    if ( ( uint64_t ) dst [ 0 ] != data -> u64 )
-        return NULL;
-    return dst + 1;
-}
-
-static
-void *write_U16 ( void *p, const nx *data )
-{
-    uint16_t *dst = p;
-    dst [ 0 ] = ( uint16_t ) data -> u64;
-    if ( ( uint64_t ) dst [ 0 ] != data -> u64 )
-        return NULL;
-    return dst + 1;
-}
-
-static
-void *write_U32 ( void *p, const nx *data )
-{
-    uint32_t *dst = p;
-    dst [ 0 ] = ( uint32_t ) data -> u64;
-    if ( ( uint64_t ) dst [ 0 ] != data -> u64 )
-        return NULL;
-    return dst + 1;
-}
-
-static
-void *write_U64 ( void *p, const nx *data )
-{
-    uint64_t *dst = p;
-    dst [ 0 ] = data -> u64;
-    return dst + 1;
-}
-
-static
-void *write_I8 ( void *p, const nx *data )
-{
-    int8_t *dst = p;
-    dst [ 0 ] = ( int8_t ) data -> i64;
-    if ( ( int64_t ) dst [ 0 ] != data -> i64 )
-        return NULL;
-    return dst + 1;
-}
-
-static
-void *write_I16 ( void *p, const nx *data )
-{
-    int16_t *dst = p;
-    dst [ 0 ] = ( int16_t ) data -> i64;
-    if ( ( int64_t ) dst [ 0 ] != data -> i64 )
-        return NULL;
-    return dst + 1;
-}
-
-static
-void *write_I32 ( void *p, const nx *data )
-{
-    int32_t *dst = p;
-    dst [ 0 ] = ( int32_t ) data -> i64;
-    if ( ( int64_t ) dst [ 0 ] != data -> i64 )
-        return NULL;
-    return dst + 1;
-}
-
-static
-void *write_I64 ( void *p, const nx *data )
-{
-    int64_t *dst = p;
-    dst [ 0 ] = data -> i64;
-    return dst + 1;
-}
-
-static
-void *write_F32 ( void *p, const nx *data )
-{
-    double e;
-    float *dst = p;
-    dst [ 0 ] = ( float ) data -> f64;
-    e = ( double ) dst [ 0 ] - data -> f64;
-    if ( -1.0 < e || e > 1.0 )
-        return NULL;
-    return dst + 1;
-}
-
-static
-void *write_F64 ( void *p, const nx *data )
-{
-    double *dst = p;
-    dst [ 0 ] = data -> f64;
-    return dst + 1;
-}
-
-
-/* converters
- *  convert from one data type to another
- */
-static
-nx *null_cvt ( nx *data )
-{
-    return data;
-}
-
-static
-nx *uint_int ( nx *data )
-{
-    if ( data -> i64 < 0 )
-        return NULL;
-    return data;
-}
-
-static
-nx *uint_float ( nx *data )
-{
-    if ( data -> i64 < 0 )
-        return NULL;
-    data -> f64 = (double)data -> i64;
-    return data;
-}
-
-static
-nx *int_float ( nx *data )
-{
-    data -> f64 = (double)data -> i64;
-    return data;
-}
-
-static
-nx *float_int ( nx *data )
-{
-    data -> i64 = ( int64_t ) data -> f64;
-    return data;
-}
-
-static
-nx *float_uint ( nx *data )
-{
-    data -> i64 = ( int64_t ) data -> f64;
-    if ( data -> i64 < 0 )
-        return NULL;
-    return data;
-}
-
-static
-nx *int_uint ( nx *data )
-{
-    if ( data -> i64 < 0 )
-        return NULL;
-    return data;
-}
-
-/* eval-numeric-expr
- *  tries to evaluate a constant numeric expression against type
- *  returns non-zero error code if failed
- */
-#if SLVL >= 1
-LIB_EXPORT rc_t CC eval_numeric_expr ( const VSchema *self, const VTypedecl *td,
-    const SConstExpr *expr, SConstExpr **xp, bool force )
-{
-    SConstExpr *x;
-    uint32_t sbits, sdim;
-    uint32_t i, dbits, ddim;
-
-    void *dst;
-    const void *src;
-
-    const void* ( * reader ) ( nx*, const void* );
-    void* ( * writer ) ( void*, const nx* );
-    nx* ( * cvt ) ( nx* );
-
-    /* source and destination types of constant vector */
-    const SDatatype *sdt = VSchemaFindTypeid ( self, expr -> td . type_id );
-    const SDatatype *ddt = VSchemaFindTypeid ( self, td -> type_id );
-    if ( sdt == NULL || ddt == NULL )
-        return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcNotFound );
-
-    /* size of source and destination types */
-    sbits = sdt -> size;
-    dbits = ddt -> size;
-
-    /* regardless of how derived the specified types may be,
-       get their dimensions in terms of intrinsic types */
-    sdim = SDatatypeIntrinsicDim ( sdt );
-    ddim = SDatatypeIntrinsicDim ( ddt );
-
-    /* convert stated sizes to intrinsic element size */
-    assert ( sdim != 0 && ( sbits % sdim ) == 0 );
-    sbits /= sdim;
-    assert ( ddim != 0 && ( dbits % ddim ) == 0 );
-    dbits /= ddim;
-
-    /* test for cast compatibility */
-    if ( ! force ) switch ( ddt -> domain )
-    {
-    case ddBool:
-        /* only bool casts to bool */
-        if ( sdt -> domain != ddBool )
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcIncorrect );
-        break;
-    case ddUint: case ddInt: case ddFloat:
-        if ( sdt -> domain > ddt -> domain )
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcIncorrect );
-        break;
-    default:
-        return SILENT_RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcUnexpected );
-    }
-
-    /* reset dimensions to account for explicit values */
-    sdim *= expr -> td . dim;
-    i = ddim * td -> dim;
-
-    /* destination dim must divide source dim evenly */
-    if ( i == 0 || sdim < i || ( sdim % i ) != 0 )
-        return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcIncorrect );
-
-    /* determine reader */
-    switch ( sdt -> domain )
-    {
-    case ddBool:
-        reader = read_bool; break;
-    case ddUint:
-        switch ( sbits )
-        {
-        case 8:  reader = read_U8; break;
-        case 16: reader = read_U16; break;
-        case 32: reader = read_U32; break;
-        case 64: reader = read_U64; break;
-        default:
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcUnexpected );
-        }
-        break;
-    case ddInt:
-        switch ( sbits )
-        {
-        case 8:  reader = read_I8; break;
-        case 16: reader = read_I16; break;
-        case 32: reader = read_I32; break;
-        case 64: reader = read_I64; break;
-        default:
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcUnexpected );
-        }
-        break;
-    case ddFloat:
-        switch ( sbits )
-        {
-        case 32: reader = read_F32; break;
-        case 64: reader = read_F64; break;
-        default:
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcUnexpected );
-        }
-        break;
-    default:
-        /* here to quiet compiler complaints */
-        reader = NULL;
-    }
-
-    /* determine writer */
-    switch ( ddt -> domain )
-    {
-    case ddBool:
-        writer = write_bool; break;
-    case ddUint:
-        switch ( dbits )
-        {
-        case 8:  writer = write_U8; break;
-        case 16: writer = write_U16; break;
-        case 32: writer = write_U32; break;
-        case 64: writer = write_U64; break;
-        default:
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcUnexpected );
-        }
-        break;
-    case ddInt:
-        switch ( dbits )
-        {
-        case 8:  writer = write_I8; break;
-        case 16: writer = write_I16; break;
-        case 32: writer = write_I32; break;
-        case 64: writer = write_I64; break;
-        default:
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcUnexpected );
-        }
-        break;
-    case ddFloat:
-        switch ( dbits )
-        {
-        case 32: writer = write_F32; break;
-        case 64: writer = write_F64; break;
-        default:
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcUnexpected );
-        }
-        break;
-    default:
-        writer = NULL;
-    }
-
-    /* determine converter */
-    if ( sdt -> domain == ddt -> domain )
-        cvt = null_cvt;
-    else switch ( ddt -> domain )
-    {
-    case ddBool:
-    case ddUint:
-        switch ( sdt -> domain )
-        {
-        case ddInt:
-            cvt = int_uint; break;
-        case ddFloat:
-            cvt = float_uint; break;
-        default:
-            cvt = null_cvt;
-        }
-        break;
-    case ddInt:
-        switch ( sdt -> domain )
-        {
-        case ddFloat:
-            cvt = float_int; break;
-        default:
-            cvt = uint_int; break;
-        }
-        break;
-    case ddFloat:
-        switch ( sdt -> domain )
-        {
-        case ddInt:
-            cvt = int_float; break;
-        default:
-            cvt = uint_float; break;
-        }
-        break;
-    default:
-        cvt = null_cvt;
-    }
-
-    /* create output object */
-    {
-	unsigned int alloc_size;
-
-	alloc_size=(((size_t)dbits * sdim + 7) >> 3);
-	if(alloc_size < sizeof(x->u)){ /** don't go below size of union ***/
-		alloc_size=sizeof(*x);	
-	} else { /** overallocate here ***/
-		alloc_size+=sizeof(*x)-sizeof(x->u);
-	}
-	alloc_size = (alloc_size+3)&~3; /** align to 4 bytes **/
-    	x = malloc ( alloc_size );
-	if ( x == NULL )
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcMemory, rcExhausted );
-	memset(x,0,alloc_size);
-    }
-
-    /* copy, and perform type conversion */
-    src = & expr -> u;
-    dst = & x -> u;
-    for ( i = 0; i < sdim; ++ i )
-    {
-        nx data;
-        const nx *dp;
-
-        /* read element */
-        src = ( * reader ) ( & data, src );
-
-        /* type-promote */
-        dp = ( * cvt ) ( & data );
-        if ( dp == NULL )
-        {
-            free ( x );
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcConstraint, rcViolated );
-        }
-
-        /* write element */
-        dst = ( * writer ) ( dst, dp );
-        if ( dst == NULL )
-        {
-            free ( x );
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcConstraint, rcViolated );
-        }
-    }
-
-    /* it is done */
-    x -> dad . var = eConstExpr;
-    atomic32_set ( & x -> dad . refcount, 1 );
-    x -> td . type_id = td -> type_id;
-    x -> td . dim = sdim / ddim;
-    * xp = x;
-    return 0;
-}
-#endif
-
-
-/*--------------------------------------------------------------------------
- * constant textual expressions
- *
- *  built-in typecasting allows for the chain
- *    ascii => unicode
- *
- *  built-in size promotion is automatic from 8 => 16 => 32 bits
- *
- *  constant size-demotion is allowed due to knowledge of constant value
- *
- *  explicit casts may reverse type promotion rules
- */
-
-
-static
-const void *read_ascii ( uint32_t *ch, const void *p, const void *end )
-{
-    const char *src = p;
-    if ( src [ 0 ] < 0 )
-        return NULL;
-    * ch = src [ 0 ];
-    return src + 1;
-}
-
-static
-const void *read_utf8 ( uint32_t *ch, const void *p, const void *end )
-{
-    const char *src = p;
-    int len = utf8_utf32 ( ch, src, end );
-    if ( len <= 0 )
-        return NULL;
-    return src + len;
-}
-
-static
-const void *read_utf16 ( uint32_t *ch, const void *p, const void *end )
-{
-    const uint16_t *src = p;
-    * ch = src [ 0 ];
-    return src + 1;
-}
-
-static
-const void *read_utf32 ( uint32_t *ch, const void *p, const void *end )
-{
-    const uint32_t *src = p;
-    * ch = src [ 0 ];
-    return src + 1;
-}
-
-static
-void *write_ascii ( void *p, void *end, uint32_t ch )
-{
-    char *dst = p;
-    if ( ch >= 128 )
-        ch = '?';
-    dst [ 0 ] = ( char ) ch;
-    return dst + 1;
-}
-
-static
-void *write_utf8 ( void *p, void *end, uint32_t ch )
-{
-    char *dst = p;
-    int len = utf32_utf8 ( dst, end, ch );
-    if ( len <= 0 )
-        return NULL;
-    return dst + len;
-}
-
-static
-void *write_utf16 ( void *p, void *end, uint32_t ch )
-{
-    uint16_t *dst = p;
-    if ( ch > 0x10000 )
-        ch = '?';
-    dst [ 0 ] = ( uint16_t ) ch;
-    return dst + 1;
-}
-
-static
-void *write_utf32 ( void *p, void *end, uint32_t ch )
-{
-    uint32_t *dst = p;
-    dst [ 0 ] = ch;
-    return dst + 1;
-}
-
-#if SLVL >= 1
-LIB_EXPORT rc_t CC eval_text_expr ( const VSchema *self, const VTypedecl *td,
-    const SConstExpr *expr, SConstExpr **xp, bool force )
-{
-    size_t size;
-    uint32_t len;
-    SConstExpr *x;
-    uint32_t sbits, sdim;
-    uint32_t i, dbits, ddim;
-
-    void *dst, *dend;
-    const void *src, *send;
-    void* ( * writer ) ( void*, void*, uint32_t );
-    const void* ( * reader ) ( uint32_t*, const void*, const void* );
-
-    /* source and destination types of constant vector */
-    const SDatatype *sdt = VSchemaFindTypeid ( self, expr -> td . type_id );
-    const SDatatype *ddt = VSchemaFindTypeid ( self, td -> type_id );
-    if ( sdt == NULL || ddt == NULL )
-        return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcNotFound );
-
-    /* size of source and destination types */
-    sbits = sdt -> size;
-    dbits = ddt -> size;
-
-    /* regardless of how derived the specified types may be,
-       get their dimensions in terms of intrinsic types */
-    sdim = SDatatypeIntrinsicDim ( sdt );
-    ddim = SDatatypeIntrinsicDim ( ddt );
-
-    /* convert stated sizes to intrinsic element size */
-    assert ( sdim != 0 && ( sbits % sdim ) == 0 );
-    sbits /= sdim;
-    assert ( ddim != 0 && ( dbits % ddim ) == 0 );
-    dbits /= ddim;
-
-    /* test for cast compatibility */
-    if ( ! force ) switch ( ddt -> domain )
-    {
-    case ddAscii:
-        /* only ascii casts to ascii */
-        if ( sdt -> domain != ddAscii )
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcIncorrect ); 
-        break;
-    case ddUnicode:
-        if ( sdt -> domain < ddAscii || sdt -> domain > ddt -> domain )
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcIncorrect );
-        break;
-    default:
-        return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcUnexpected );
-    }
-
-    /* restore source dimension */
-    sdim *= expr -> td . dim;
-
-    /* determine reader and length */
-    len = sdim;
-    switch ( sdt -> domain )
-    {
-    case ddAscii:
-        reader = read_ascii; break;
-    default:
-        switch ( sbits )
-        {
-        case 8:
-            reader = read_utf8;
-            len = string_len ( expr -> u . utf8, sdim );
-            break;
-        case 16:
-            reader = read_utf16;
-            break;
-        case 32:
-            reader = read_utf32;
-            break;
-        default:
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcUnexpected );
-        }
-    }
-
-    /* determine writer and size */
-    ddim = len;
-    switch ( ddt -> domain )
-    {
-    case ddAscii:
-        writer = write_ascii;
-        size = len;
-        break;
-    default:
-        switch ( sbits )
-        {
-        case 8:
-            writer = write_utf8;
-            switch ( dbits )
-            {
-            case 16:
-                utf16_cvt_string_len ( expr -> u . utf16, len << 1, & size );
-                break;
-            case 32:
-                utf32_cvt_string_len ( expr -> u . utf32, len << 2, & size );
-                break;
-            default:
-                size = sdim;
-            }
-            ddim = ( uint32_t ) size;
-            break;
-        case 16:
-            writer = write_utf16;
-            size = len << 1;
-            break;
-        case 32:
-            writer = write_utf32;
-            size = len << 2;
-            break;
-        default:
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcUnexpected );
-        }
-    }
-
-    /* create output object */
-    {
-	unsigned int alloc_size;
-
-	alloc_size=size;
-	if(alloc_size < sizeof(x->u)){ /** don't go below size of union ***/
-		alloc_size=sizeof(*x);	
-	} else { /** overallocate here ***/
-		alloc_size+=sizeof(*x)-sizeof(x->u);
-	}
-	alloc_size = (alloc_size+3)&~3; /** align to 4 bytes **/
-    	x = malloc ( alloc_size );
-	if ( x == NULL )
-		return RC ( rcVDB, rcExpression, rcEvaluating, rcMemory, rcExhausted );
-	memset(x,0,alloc_size);
-    }
-   
-
-    /* copy, and perform type conversion */
-    src = expr -> u . utf8;
-    send = & expr -> u . utf8 [ sdim ];
-    dst = x -> u . utf8;
-    dend = & x -> u . utf8 [ size ];
-    for ( i = 0; i < len; ++ i )
-    {
-        uint32_t ch;
-
-        /* read character */
-        src = ( * reader ) ( & ch, src, send );
-        if ( src == NULL )
-        {
-            free ( x );
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcData, rcCorrupt );
-        }
-
-        /* write character */
-        dst = ( * writer ) ( dst, dend, ch );
-        if ( dst == NULL )
-        {
-            free ( x );
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcData, rcCorrupt );
-        }
-    }
-
-    /* it is done */
-    x -> dad . var = eConstExpr;
-    atomic32_set ( & x -> dad . refcount, 1 );
-    x -> td . type_id = td -> type_id;
-    x -> td . dim = ddim;
-    * xp = x;
-    return 0;
-}
-#endif
-
-
-/*--------------------------------------------------------------------------
- * SConstExpr
- */
-
-
-/* Resolve
- *  return constant expression as a vector of indicated type
- */
-rc_t SConstExprResolveAsBool ( const SConstExpr *self,
-    const VSchema *schema, bool *b, uint32_t capacity );
-rc_t SConstExprResolveAsI8 ( const SConstExpr *self,
-    const VSchema *schema, int8_t *i8, uint32_t capacity );
-rc_t SConstExprResolveAsI16 ( const SConstExpr *self,
-    const VSchema *schema, int16_t *i16, uint32_t capacity );
-rc_t SConstExprResolveAsI32 ( const SConstExpr *self,
-    const VSchema *schema, int32_t *i32, uint32_t capacity );
-rc_t SConstExprResolveAsI64 ( const SConstExpr *self,
-    const VSchema *schema, int64_t *i64, uint32_t capacity );
-rc_t SConstExprResolveAsU8 ( const SConstExpr *self,
-    const VSchema *schema, uint8_t *u8, uint32_t capacity );
-rc_t SConstExprResolveAsU16 ( const SConstExpr *self,
-    const VSchema *schema, uint16_t *u16, uint32_t capacity );
-
-rc_t SConstExprResolveAsU32 ( const SConstExpr *self,
-    const VSchema *schema, uint32_t *u32, uint32_t capacity, Vector *cx_bind )
-{
-    if ( capacity != 1 )
-        return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcUnsupported );
-    return eval_uint_expr ( schema, ( const SExpression* ) self, u32, cx_bind );
-}
-
-rc_t SConstExprResolveAsU64 ( const SConstExpr *self,
-    const VSchema *schema, uint32_t *u64, uint32_t capacity );
-rc_t SConstExprResolveAsF32 ( const SConstExpr *self,
-    const VSchema *schema, float *f32, uint32_t capacity );
-rc_t SConstExprResolveAsF64 ( const SConstExpr *self,
-    const VSchema *schema, double *f64, uint32_t capacity );
-rc_t SConstExprResolveAsAscii ( const SConstExpr *self,
-    const VSchema *schema, char *ascii, size_t capacity );
-rc_t SConstExprResolveAsUTF8 ( const SConstExpr *self,
-    const VSchema *schema, char *utf8, size_t bytes );
-rc_t SConstExprResolveAsUTF16 ( const SConstExpr *self,
-    const VSchema *schema, uint16_t *utf16, uint32_t capacity );
-rc_t SConstExprResolveAsUTF32 ( const SConstExpr *self,
-    const VSchema *schema, uint32_t *utf32, uint32_t capacity );
-
-
-/*--------------------------------------------------------------------------
- * STypeExpr
- */
-
-/* Resolve
- *  resolve type expression to either a VTypedecl or VFormatdecl
- */
-rc_t STypeExprResolveAsFormatdecl ( const STypeExpr *self,
-    const VSchema *schema, VFormatdecl *fd, Vector *cx_bind )
-{
-    rc_t rc;
-    uint32_t dim;
-
-    /* if self is resolved, then the format, type
-       and dimension are completely resolved */
-    if ( self -> resolved )
-    {
-        * fd = self -> fd;
-        return 0;
-    }
-
-#if SLVL < 3
-    return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcIncorrect );
-#else
-    /* the format is always completely resolved,
-       this leaves type and/or dimension */
-
-    if ( self -> id != NULL )
-    {
-        /* the type needs to be resolved */
-        const STypeExpr *type = ( const STypeExpr* ) VectorGet ( cx_bind, self -> id -> type_id );
-        if ( type == NULL )
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcUndefined );
-        if ( type -> dad . var != eTypeExpr )
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcIncorrect );
-        rc = STypeExprResolveAsFormatdecl ( type, schema, fd, cx_bind );
-        if ( rc != 0 )
-            return rc;
-
-        /* at this point, "fd" has some format - which we'll clobber,
-           a type and dim from the indirect type just resolved */
-    }
-    else
-    {
-        /* take known type and default dimension */
-        fd -> td . type_id = self -> fd . td . type_id;
-        fd -> td . dim = 1;
-    }
-
-    /* always take our format */
-    fd -> fmt = self -> fd . fmt;
-
-    /* test for unresolved dimension */
-    dim = self -> fd . td . dim;
-    if ( dim == 0 && self -> dim != NULL )
-    {
-        const SExpression *dx = self -> dim;
-        while ( dx != NULL )
-        {
-            const SIndirectConst *ic;
-
-            if ( dx -> var == eConstExpr )
-            {
-                rc = SConstExprResolveAsU32 ( ( const SConstExpr* ) dx, schema, & dim, 1, cx_bind );
-                if ( rc != 0 )
-                    return rc;
-                break;
-            }
-
-            if ( dx -> var != eIndirectExpr )
-                return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcIncorrect );
-
-            ic = ( ( const SSymExpr* ) dx ) -> _sym -> u . obj;
-            assert ( ic != NULL );
-
-            dx = ( const SExpression* ) VectorGet ( cx_bind, ic -> expr_id );
-        }
-
-        /* must have non-zero dim */
-        if ( dim == 0 )
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcUndefined );
-    }
-
-    /* factor in our dimension */
-    fd -> td . dim *= dim;
-    return 0;
-#endif
-}
-
-rc_t STypeExprResolveAsTypedecl ( const STypeExpr *self,
-    const VSchema *schema, VTypedecl *td, Vector *cx_bind )
-{
-    VFormatdecl fd;
-    rc_t rc = STypeExprResolveAsFormatdecl ( self, schema, & fd, cx_bind );
-    if ( rc == 0 )
-    {
-        if ( fd . fmt != 0 )
-            return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcIncorrect );
-        * td = fd . td;
-    }
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * general constant expression evaluation
- */
-#if SLVL >= 1
-
-/* eval-type-expr
- *  should be able to boil things down to defined type vector
- */
-static
-rc_t eval_type_expr ( const VSchema *self, const VTypedecl *td,
-    const STypeExpr *expr, SExpression **xp )
-{
-    PLOGMSG( klogWarn, ( klogWarn, "TDB: $(msg)", "msg=handle type expression" ));
-    return -1;
-}
-
-/* eval-indirect-expr
- */
-static
-rc_t eval_indirect_expr ( const VSchema *self, const VTypedecl *td,
-    const SSymExpr *expr, SExpression **xp, Vector *cx_bind )
-{
-    const SIndirectConst *ic = expr -> _sym -> u . obj;
-
-    /* if the expression is there */
-    if ( ic -> expr_id != 0 )
-    {
-        const SExpression *ic_expr = ( const SExpression* ) VectorGet ( cx_bind, ic -> expr_id );
-        if ( ic_expr != NULL )
-            return eval_const_expr ( self, td, ic_expr, xp, cx_bind );
-    }
-
-    /* just return self */
-    * xp = & ( ( SSymExpr* ) expr ) -> dad;
-    atomic32_inc ( & ( ( SSymExpr* ) expr ) -> dad . refcount );
-    return 0;
-}
-
-
-/* eval-const-cast-expr
- */
-static
-rc_t eval_const_cast_expr ( const VSchema *self, const VTypedecl *td,
-    const SExpression *expr, SExpression **xp )
-{
-    PLOGMSG( klogWarn, ( klogWarn, "TDB: $(msg)", "msg=handle const cast expression" ));
-    return -1;
-}
-
-
-/* eval-func-param-expr
- */
-static
-rc_t eval_func_param_expr ( const VSchema *self, const VTypedecl *td,
-    const SExpression *expr, SExpression **xp )
-{
-    PLOGMSG( klogWarn, ( klogWarn, "TDB: $(msg)", "msg=handle function expression" ));
-    return -1;
-}
-
-struct eval_vector_param_expr_pb
-{
-    rc_t rc;
-    const VSchema *self;
-    const VTypedecl *td;
-    Vector *cx_bind;
-    Vector v;
-};
-
-static
-void CC vector_free ( void *item, void *data )
-{
-    free ( item );
-}
-
-static
-bool CC do_eval_vector_param_expr ( void *item, void *data )
-{
-    struct eval_vector_param_expr_pb *pb = data;
-    SExpression *rslt = NULL;
-    
-    pb -> rc = eval_const_expr ( pb -> self, pb -> td, item, & rslt, pb -> cx_bind );
-    if ( pb -> rc != 0 )
-        return true;
-
-    switch ( rslt -> var )
-    {
-    case eConstExpr:
-        VectorAppend ( & pb -> v, NULL, rslt );
-        break;
-    case eVectorExpr:
-        free ( rslt );
-        break;
-    default:
-        free ( rslt );
-        pb -> rc = RC ( rcVDB, rcExpression, rcEvaluating, rcExpression, rcUnexpected );
-        return true;
-    }
-
-    return false;
-}
-
-/* eval-vector-param-expr
- */
-static
-rc_t eval_vector_param_expr ( const VSchema *self, const VTypedecl *td,
-    const SVectExpr *expr, SExpression **xp, Vector *cx_bind )
-{
-    struct eval_vector_param_expr_pb pb;
-
-    *xp = NULL;
-    
-    pb . rc = 0;
-    pb . self = self;
-    pb . td = td;
-    pb . cx_bind = cx_bind;
-    VectorInit ( & pb . v, 0, 32 );
-    
-    VectorDoUntil ( & expr -> expr, 0, do_eval_vector_param_expr, & pb );
-    if ( pb . rc == 0 )
-    {
-        SConstExpr *rslt;
-        uint32_t elem_count = VectorLength ( & pb . v );
-        uint32_t elem_bits;
-        size_t alloc_size;
-        
-        {
-            const SDatatype *dt = VSchemaFindTypeid ( self, td -> type_id );
-            elem_bits = dt -> size;
-        }
-
-        alloc_size = ( ( ( size_t ) elem_bits * elem_count + 7 ) >> 3 );
-
-        /** don't go below size of union ***/
-        if ( alloc_size < sizeof rslt -> u )
-            alloc_size = sizeof * rslt;	
-        /** overallocate here ***/
-        else
-            alloc_size += sizeof * rslt - sizeof rslt -> u ;
-
-        /** align to 4 bytes **/
-        alloc_size = ( alloc_size + 3 ) & ~ 3;
-        rslt = calloc ( alloc_size, 1 );
-        if ( rslt == NULL )
-            pb . rc = RC ( rcVDB, rcExpression, rcEvaluating, rcMemory, rcExhausted );
-        else
-        {
-            uint32_t i;
-
-            rslt -> dad . var = eConstExpr;
-            atomic32_set ( & rslt -> dad . refcount, 1 );
-            rslt -> td = *td;
-            rslt -> td . dim = elem_count;
-            
-            for ( i = 0; i != elem_count; ++i )
-            {
-                const SConstExpr *y = VectorGet ( & pb . v, i );
-                bitcpy ( & rslt -> u, i * elem_bits, & y -> u, 0, elem_bits );
-            }
-
-            *xp = & rslt -> dad;
-        }
-    }
-
-    VectorWhack( & pb . v, vector_free, 0 );
-
-    return pb . rc;
-}
-
-
-/* eval-const-expr
- *  tries to evaluate a constant expression against type
- *  returns non-zero error code if failed
- */
-rc_t eval_const_expr ( const VSchema *self, const VTypedecl *td,
-    const SExpression *expr, SExpression **xp, Vector *cx_bind )
-{
-    rc_t rc;
-    const SConstExpr *s;
-
-    switch ( expr -> var )
-    {
-    case eTypeExpr:
-        return eval_type_expr ( self, td, ( const STypeExpr* ) expr, xp );
-    case eConstExpr:
-        s = ( const SConstExpr* ) expr;
-        break;
-#if SLVL >= 3
-    case eIndirectExpr:
-        return eval_indirect_expr ( self, td, ( const SSymExpr* ) expr, xp, cx_bind );
-#endif
-#if SLVL >= 4
-    case eFuncParamExpr:
-        return eval_func_param_expr ( self, td, expr, xp );
-#endif
-    case eCastExpr:
-        return eval_const_cast_expr ( self, td, expr, xp );
-    case eVectorExpr:
-        return eval_vector_param_expr(self, td, ( const SVectExpr* ) expr, xp, cx_bind );
-    default:
-        *xp = NULL;
-        return RC ( rcVDB, rcExpression, rcEvaluating, rcExpression, rcUnexpected );
-    }
-
-    /* try to evaluate as numeric */
-    rc = eval_numeric_expr ( self, td, s, ( SConstExpr** ) xp, false );
-
-    /* fall over to text */
-    if ( rc != 0 && GetRCState ( rc ) == rcUnexpected && GetRCObject ( rc ) == (enum RCObject)rcType )
-        rc = eval_text_expr ( self, td, s, ( SConstExpr** ) xp, false );
-
-    return rc;
-}
-
-/* eval-uint-expr
- *  special const expression evaluator for uint32_t
- */
-rc_t eval_uint_expr ( const VSchema *self,
-    const SExpression *expr, uint32_t *value, Vector *cx_bind )
-{
-    rc_t rc;
-    VTypedecl td;
-    SConstExpr *x;
-
-    /* capture runtime value for U32 */
-    static atomic32_t s_U32_id;
-    uint32_t U32_id = VSchemaCacheIntrinsicTypeId ( self, & s_U32_id, "U32" );
-
-    /* evaluate expression against type */
-    td . type_id = U32_id;
-    td . dim = 1;
-    rc = eval_const_expr ( self, & td, expr, ( SExpression** ) & x, cx_bind );
-    if ( rc != 0 )
-        return rc;
-
-    /* verify dimensionality */
-    assert ( x -> dad . var == eConstExpr );
-    if ( x -> td . dim != 1 )
-        return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcIncorrect );
-
-    /* got it */
-    * value = x -> u . u32 [ 0 ];
-    free ( x );
-    return 0;
-}
-
-
-/* eval-uint64-expr
- *  special const expression evaluator for uint32_t
- */
-rc_t eval_uint64_expr ( const VSchema *self,
-    const SExpression *expr, uint64_t *value, Vector *cx_bind )
-{
-    rc_t rc;
-    VTypedecl td;
-    SConstExpr *x;
-
-    /* capture runtime value for U64 */
-    static atomic32_t s_U64_id;
-    uint64_t U64_id = VSchemaCacheIntrinsicTypeId ( self, & s_U64_id, "U64" );
-
-    /* evaluate expression against type */
-    td . type_id = U64_id;
-    td . dim = 1;
-    rc = eval_const_expr ( self, & td, expr, ( SExpression** ) & x, cx_bind );
-    if ( rc != 0 )
-        return rc;
-
-    /* verify dimensionality */
-    assert ( x -> dad . var == eConstExpr );
-    if ( x -> td . dim != 1 )
-        return RC ( rcVDB, rcExpression, rcEvaluating, rcType, rcIncorrect );
-
-    /* got it */
-    * value = x -> u . u64 [ 0 ];
-    free ( x );
-    return 0;
-}
-
-
-/* eval-expr-syntax
- *  examine expression syntax
- *  fixes forward references
- */
-static
-bool CC eval_vect_expr_syntax ( void *item, void *data )
-{
-    rc_t *rc = data;
-    SExpression *x = item;
-    * rc = eval_expr_syntax ( x );
-    return ( * rc != 0 ) ? true : false;
-}
-
-static
-rc_t eval_type_expr_syntax ( const STypeExpr *expr )
-{
-    if ( expr -> dad . var != eTypeExpr )
-        return RC ( rcVDB, rcExpression, rcValidating, rcExpression, rcIncorrect );
-    return 0;
-}
-
-static
-rc_t eval_fwd_expr_syntax ( SSymExpr *expr )
-{
-    const KSymbol *sym = expr -> _sym;
-    assert ( sym != NULL );
-    switch ( sym -> type )
-    {
-    case eFuncParam:
-        expr -> dad . var = eParamExpr;
-        break;
-    case eProduction:
-        expr -> dad . var = eProdExpr;
-        break;
-    case eColumn:
-        expr -> dad . var = eColExpr;
-        break;
-    case ePhysMember:
-        expr -> dad . var = ePhysExpr;
-        break;
-    case eForward:
-        return RC ( rcVDB, rcSchema, rcValidating, rcName, rcUndefined );
-    case eVirtual:
-        break;
-
-    default:
-        return RC ( rcVDB, rcSchema, rcValidating, rcExpression, rcInvalid );
-    }
-
-    return 0;
-}
-
-rc_t eval_expr_syntax ( const SExpression *expr )
-{
-    rc_t rc;
-
-    if ( expr == NULL )
-        rc = RC ( rcVDB, rcExpression, rcValidating, rcSelf, rcNull );
-    else switch ( expr -> var )
-    {
-    case eFwdExpr:
-        rc = eval_fwd_expr_syntax ( ( SSymExpr* ) expr );
-        break;
-    case eCastExpr:
-        rc = eval_type_expr_syntax ( ( const STypeExpr* ) ( ( const SBinExpr* ) expr ) -> left );
-        if ( rc == 0 )
-            rc = eval_expr_syntax ( ( ( const SBinExpr* ) expr ) -> right );
-        break;
-    case eVectorExpr:
-        rc = 0;
-        VectorDoUntil ( & ( ( const SVectExpr* ) expr ) -> expr, false, eval_vect_expr_syntax, & rc );
-        break;
-    case eCondExpr:
-        rc = eval_expr_syntax ( ( ( const SBinExpr* ) expr ) -> left );
-        if ( rc == 0 )
-            rc = eval_expr_syntax ( ( ( const SBinExpr* ) expr ) -> right );
-        break;
-    default:
-        rc = 0;
-    }
-
-    return rc;
-}
-
-#endif
diff --git a/libs/vdb/schema-expr.c b/libs/vdb/schema-expr.c
deleted file mode 100644
index bdefcf2..0000000
--- a/libs/vdb/schema-expr.c
+++ /dev/null
@@ -1,2170 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include "schema-priv.h"
-#include "schema-parse.h"
-#include "schema-expr.h"
-#include "schema-dump.h"
-
-#include <klib/symbol.h>
-#include <klib/symtab.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * SExpression
- */
-#if SLVL >= 1
-void SExpressionWhack ( const SExpression *cself )
-{
-    SExpression *self = ( SExpression* ) cself;
-    if ( self != NULL && atomic32_dec_and_test ( & self -> refcount ) )
-    {
-        switch ( self -> var )
-        {
-        case eTypeExpr:
-        {
-            STypeExpr *x = ( STypeExpr* ) self;
-            SExpressionWhack ( x -> dim );
-            break;
-        }
-        case eFuncExpr:
-        case eScriptExpr:
-        {
-            SFuncExpr *x = ( SFuncExpr* ) self;
-            VectorWhack ( & x -> schem, SExpressionVWhack, NULL );
-            VectorWhack ( & x -> pfact, SExpressionVWhack, NULL );
-            VectorWhack ( & x -> pfunc, SExpressionVWhack, NULL );
-            break;
-        }
-        case ePhysEncExpr:
-        {
-            SPhysEncExpr *x = ( SPhysEncExpr* ) self;
-            VectorWhack ( & x -> schem, SExpressionVWhack, NULL );
-            VectorWhack ( & x -> pfact, SExpressionVWhack, NULL );
-            break;
-        }
-        case eNegateExpr:
-        {
-            SUnaryExpr *x = ( SUnaryExpr* ) self;
-            SExpressionWhack ( x -> expr );
-            break;
-        }
-        case eCastExpr:
-        case eCondExpr:
-        {
-            SBinExpr *x = ( SBinExpr* ) self;
-            SExpressionWhack ( x -> left );
-            SExpressionWhack ( x -> right );
-            break;
-        }
-        case eVectorExpr:
-        {
-            SVectExpr *x = ( SVectExpr* ) self;
-            VectorWhack ( & x -> expr, SExpressionVWhack, NULL );
-            break;
-        }}
-
-        free ( self );
-    }
-}
-
-void CC SExpressionVWhack ( void *item, void *ignore )
-{
-    SExpression *self = item;
-    SExpressionWhack ( self );
-}
-#endif
-
-/* Mark
- */
-#if SLVL >= 1
-void CC SExpressionMark ( void * item, void * data )
-{
-    const SExpression * self = item;
-    const VSchema * schema = data;
-    if ( self != NULL ) switch ( self -> var )
-    {
-    case eTypeExpr:
-        STypeExprMark ( ( const STypeExpr* ) self, schema );
-        break;
-    case eConstExpr:
-        VSchemaTypeMark ( schema, ( ( const SConstExpr* ) self ) -> td . type_id );
-        break;
-    case eIndirectExpr:
-    case eParamExpr:
-    case eProdExpr:
-    case eFwdExpr:
-    case eFuncParamExpr:
-    case eColExpr:
-    case ePhysExpr:
-        SSymExprMark ( ( const SSymExpr* ) self, schema );
-        break;
-    case eFuncExpr:
-    case eScriptExpr:
-        SFuncExprMark ( ( const SFuncExpr* ) self, schema );
-        break;
-    case ePhysEncExpr:
-        SPhysEncExprMark ( ( const SPhysEncExpr* ) self, schema );
-        break;
-    case eNegateExpr:
-        SExpressionMark ( ( void * )( ( const SUnaryExpr* ) self ) -> expr, data );
-        break;
-    case eCastExpr:
-    case eCondExpr:
-        SExpressionMark ( ( void * )( ( const SBinExpr* ) self ) -> left, data );
-        SExpressionMark ( ( void * )( ( const SBinExpr* ) self ) -> right, data );
-        break;
-    case eVectorExpr:
-        VectorForEach ( & ( ( const SVectExpr* ) self ) -> expr, false,
-                        SExpressionMark, data );
-        break;
-    }
-}
-#endif
-
-/* Dump
- */
-#if SLVL >= 1
-bool CC SExpressionListDump ( void *item, void *data )
-{
-    SDumper *b = data;
-    const SExpression *self = ( const void* ) item;
-
-    SDumperSep ( b );
-    b -> rc = SExpressionDump ( self, b );
-    SDumperSepString ( b, SDumperMode ( b ) == sdmCompact ? "," : ", " );
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-
-rc_t SExpressionBracketListDump ( const Vector *expr, SDumper *b,
-    const char *begin, const char *end )
-{
-    SDumperSepString ( b, begin );
-    if ( VectorDoUntil ( expr, false, SExpressionListDump, b ) )
-        return b -> rc;
-    return SDumperPrint ( b, end );
-}
-
-static
-rc_t STypeExprDump ( const STypeExpr *self, SDumper *b )
-{
-    rc_t rc;
-    if ( self -> fmt != NULL )
-    {
-        rc = SFormatDump ( self -> fmt, b );
-        if ( rc != 0 )
-            return rc;
-
-        if ( self -> dt == NULL && self -> ts == NULL && self -> id == NULL )
-            return 0;
-
-        rc = SDumperWrite ( b, "/", 1 );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    if ( self -> dt != NULL )
-        rc = SDatatypeDump ( self -> dt, b );
-    else if ( self -> ts != NULL )
-        rc = STypesetDump ( self -> ts, b );
-#if SLVL >= 3
-    else if ( self -> id != NULL )
-        rc = SIndirectTypeDump ( self -> id, b );
-#endif
-    else
-        rc = SDumperWrite ( b, "NULL", 4 );
-
-    if ( rc == 0 )
-    {
-        if ( SDumperMode ( b ) == sdmCompact )
-        {
-            if ( self -> dim != NULL )
-                rc = SDumperPrint ( b, "[%E]", self -> dim );
-            else if ( self -> fd . td . dim == 0 )
-                rc = SDumperPrint ( b, "[*]" );
-        }
-        else
-        {
-            if ( self -> dim != NULL )
-                rc = SDumperPrint ( b, " [ %E ]", self -> dim );
-            else if ( self -> fd . td . dim == 0 )
-                rc = SDumperPrint ( b, " [ * ]" );
-        }
-    }
-    
-    return rc;
-}
-
-static
-rc_t SConstExprDump ( const SConstExpr *self, SDumper *b )
-{
-    rc_t rc = 0;
-    bool compact = SDumperMode ( b ) == sdmCompact ? true : false;
-    const SDatatype *dt = VSchemaFindTypeid ( b -> schema, self -> td . type_id );
-    uint32_t bits = dt -> size;
-    uint32_t i, dim = SDatatypeIntrinsicDim ( dt );
-    assert ( dim != 0 && ( bits % dim ) == 0 );
-    bits /= dim;
-    dim *= self -> td . dim;
-
-    /* open a vector expression */
-    if ( dt -> domain < ddAscii && dim > 1 )
-    {
-        rc = SDumperPrint ( b, compact ? "[" : "[ " );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    SDumperSepString ( b, "" );
-
-    switch ( dt -> domain )
-    {
-    case ddBool:
-        for ( i = 0; i < dim; ++ i )
-        {
-            rc = SDumperPrint ( b, "\v%s", self -> u . b [ i ] ? "true" : "false" );
-            if ( rc != 0 )
-                return rc;
-            SDumperSepString ( b, compact ? "," : ", " );
-        }
-        break;
-    case ddUint:
-        switch ( bits )
-        {
-        case 8:
-            for ( i = 0; i < dim; ++ i )
-            {
-                rc = SDumperPrint ( b, "\v%u", self -> u . u8 [ i ] );
-                if ( rc != 0 )
-                    return rc;
-                SDumperSepString ( b, compact ? "," : ", " );
-            }
-            break;
-        case 16:
-            for ( i = 0; i < dim; ++ i )
-            {
-                rc = SDumperPrint ( b, "\v%u", self -> u . u16 [ i ] );
-                if ( rc != 0 )
-                    return rc;
-                SDumperSepString ( b, compact ? "," : ", " );
-            }
-            break;
-        case 32:
-            for ( i = 0; i < dim; ++ i )
-            {
-                rc = SDumperPrint ( b, "\v%u", self -> u . u32 [ i ] );
-                if ( rc != 0 )
-                    return rc;
-                SDumperSepString ( b, compact ? "," : ", " );
-            }
-            break;
-        case 64:
-            for ( i = 0; i < dim; ++ i )
-            {
-                rc = SDumperPrint ( b, "\v%lu", self -> u . u64 [ i ] );
-                if ( rc != 0 )
-                    return rc;
-                SDumperSepString ( b, compact ? "," : ", " );
-            }
-            break;
-        }
-        break;
-    case ddInt:
-        switch ( bits )
-        {
-        case 8:
-            for ( i = 0; i < dim; ++ i )
-            {
-                rc = SDumperPrint ( b, "\v%d", self -> u . i8 [ i ] );
-                if ( rc != 0 )
-                    return rc;
-                SDumperSepString ( b, compact ? "," : ", " );
-            }
-            break;
-        case 16:
-            for ( i = 0; i < dim; ++ i )
-            {
-                rc = SDumperPrint ( b, "\v%d", self -> u . i16 [ i ] );
-                if ( rc != 0 )
-                    return rc;
-                SDumperSepString ( b, compact ? "," : ", " );
-            }
-            break;
-        case 32:
-            for ( i = 0; i < dim; ++ i )
-            {
-                rc = SDumperPrint ( b, "\v%d", self -> u . i32 [ i ] );
-                if ( rc != 0 )
-                    return rc;
-                SDumperSepString ( b, compact ? "," : ", " );
-            }
-            break;
-        case 64:
-            for ( i = 0; i < dim; ++ i )
-            {
-                rc = SDumperPrint ( b, "\v%ld", self -> u . i64 [ i ] );
-                if ( rc != 0 )
-                    return rc;
-                SDumperSepString ( b, compact ? "," : ", " );
-            }
-            break;
-        }
-        break;
-    case ddFloat:
-        switch ( bits )
-        {
-        case 32:
-            for ( i = 0; i < dim; ++ i )
-            {
-                rc = SDumperPrint ( b, "\v%f", ( double ) self -> u . f32 [ i ] );
-                if ( rc != 0 )
-                    return rc;
-                SDumperSepString ( b, compact ? "," : ", " );
-            }
-            break;
-        case 64:
-            for ( i = 0; i < dim; ++ i )
-            {
-                rc = SDumperPrint ( b, "\v%f", self -> u . f64 [ i ] );
-                if ( rc != 0 )
-                    return rc;
-                SDumperSepString ( b, compact ? "," : ", " );
-            }
-            break;
-        }
-        break;
-    case ddAscii:
-    {
-        const char *end, *p;
-
-        rc = SDumperWrite ( b, "'", 1 );
-
-    do_ascii:
-        for ( p = self -> u . ascii, end = p + dim; rc == 0 && p < end; )
-        {
-            const char *start = p;
-            while ( p < end && isprint ( * p ) )
-                ++ p;
-            rc = SDumperWrite ( b, start, p - start );
-            if ( p == end )
-                break;
-
-            switch ( * p )
-            {
-            case '\n':
-                rc = SDumperWrite ( b, "\\n", 2 );
-                break;
-            case '\r':
-                rc = SDumperWrite ( b, "\\", 2 );
-                break;
-            case '\t':
-                rc = SDumperWrite ( b, "\\t", 2 );
-                break;
-            default:
-                rc = SDumperPrint ( b, "\\x%x%x", ( * ( uint8_t* ) p ) / 16, * p & 15 );
-            }
-            ++ p;
-        }
-        if ( rc == 0 )
-            rc = SDumperWrite ( b, "'", 1 );
-        return rc;
-    }
-    case ddUnicode:
-    {
-        rc = SDumperWrite ( b, "'", 1 );
-        if ( rc != 0 )
-            return rc;
-
-        if ( bits == 8 )
-            goto do_ascii;
-
-        for ( i = 0; i < dim; ++ i )
-        {
-            char buff [ 8 ];
-            uint32_t ch = ( bits == 16 ) ?
-                ( uint32_t )  self -> u . utf16 [ i ] :
-                self -> u . utf32 [ i ];
-
-            if ( ch >= 128 )
-                sprintf ( buff, "\\u%04x", ch );
-            else if ( isprint ( ( int ) ch ) )
-                buff [ 0 ] = ( char ) ch, buff [ 1 ] = 0;
-            else switch ( ch )
-            {
-            case '\n':
-                sprintf ( buff, "\\n" );
-                break;
-            case '\r':
-                sprintf ( buff, "\\r" );
-                break;
-            case '\t':
-                sprintf ( buff, "\\t" );
-                break;
-            default:
-                sprintf ( buff, "\\x%02x", ch );
-            }
-
-            rc = SDumperPrint ( b, buff );
-            if ( rc != 0 )
-                return rc;
-        }
-        if ( rc == 0 )
-            rc = SDumperWrite ( b, "'", 1 );
-        return rc;
-    }}
-
-    if ( rc == 0 && dim > 1 )
-        rc = SDumperPrint ( b, compact ? "]" : " ]" );
-
-    return rc;
-}
-
-#if SLVL >= 3
-static
-rc_t SFuncExprDump ( const SFuncExpr *self, SDumper *b )
-{
-    rc_t rc;
-    bool compact = SDumperMode ( b ) == sdmCompact ? true : false;
-
-    if ( VectorLength ( & self -> schem ) != 0 )
-    {
-        if ( compact )
-            rc = SExpressionBracketListDump ( & self -> schem, b, "<", ">" );
-        else
-            rc = SExpressionBracketListDump ( & self -> schem, b, "< ", " > " );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    rc = SFunctionDump ( self -> func, b );
-    if ( rc != 0 )
-        return rc;
-
-    rc = SDumperVersion ( b, self -> version_requested ?
-        self -> version : self -> func -> version );
-    if ( rc != 0 )
-        return rc;
-
-    if ( VectorLength ( & self -> pfact ) != 0 )
-    {
-        if ( compact )
-            rc = SExpressionBracketListDump ( & self -> pfact, b, "<", ">" );
-        else
-            rc = SExpressionBracketListDump ( & self -> pfact, b, " < ", " >" );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    if ( VectorLength ( & self -> pfunc ) == 0 )
-        rc = SDumperPrint ( b, compact ? "()" : " ()" );
-    else if ( compact )
-        rc = SExpressionBracketListDump ( & self -> pfunc, b, "(", ")" );
-    else
-        rc = SExpressionBracketListDump ( & self -> pfunc, b, " ( ", " )" );
-
-    return rc;
-}
-#endif
-
-#if SLVL >= 7
-static
-rc_t SPhysEncExprDump ( const SPhysEncExpr *self, SDumper *b )
-{
-    rc_t rc;
-    bool compact = SDumperMode ( b ) == sdmCompact ? true : false;
-
-    if ( VectorLength ( & self -> schem ) != 0 )
-    {
-        if ( compact )
-            rc = SExpressionBracketListDump ( & self -> schem, b, "<", ">" );
-        else
-            rc = SExpressionBracketListDump ( & self -> schem, b, "< ", " > " );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    rc = SPhysicalDump ( self -> phys, b );
-    if ( rc != 0 )
-        return rc;
-
-    if ( self -> version_requested )
-        rc = SDumperVersion ( b, self -> version );
-    else
-        rc = SDumperVersion ( b, self -> phys -> version );
-    if ( rc != 0 )
-        return rc;
-
-    if ( VectorLength ( & self -> pfact ) != 0 )
-    {
-        if ( compact )
-            rc = SExpressionBracketListDump ( & self -> pfact, b, "<", ">" );
-        else
-            rc = SExpressionBracketListDump ( & self -> pfact, b, " < ", " >" );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    return rc;
-}
-#endif
-
-rc_t SExpressionDump ( const SExpression *self, SDumper *b )
-{
-    bool compact = SDumperMode ( b ) == sdmCompact ? true : false;
-
-    if ( self == NULL )
-        return SDumperWrite ( b, "NULL", 4 );
-
-    switch ( self -> var )
-    {
-    case eTypeExpr:
-        return STypeExprDump ( ( const STypeExpr* ) self, b );
-    case eConstExpr:
-        return SConstExprDump ( ( const SConstExpr* ) self, b );
-#if SLVL >= 3
-    case eIndirectExpr:
-    case eParamExpr:
-    case eProdExpr:
-    case eFwdExpr:
-    case eFuncParamExpr:
-    case eColExpr:
-    case ePhysExpr:
-    {
-        const SSymExpr *x = ( const SSymExpr* ) self;
-        if ( x -> alt )
-            return SDumperPrint ( b, "@%N", x -> _sym );
-        return KSymbolDump ( x -> _sym, b );
-    }
-    case eFuncExpr:
-#if SLVL >= 4
-    case eScriptExpr:
-#endif
-        return SFuncExprDump ( ( const SFuncExpr* ) self, b );
-#endif
-#if SLVL >= 7
-    case ePhysEncExpr:
-        return SPhysEncExprDump ( ( const SPhysEncExpr* ) self, b );
-#endif
-    case eNegateExpr:
-    {
-        const SUnaryExpr *x = ( const SUnaryExpr* ) self;
-        return SDumperPrint ( b, "-%E", x -> expr );
-    }
-    case eCastExpr:
-    {
-        const SBinExpr *x = ( const SBinExpr* ) self;
-        return SDumperPrint ( b, compact ? "(%E)%E" : "( %E ) %E", x -> left, x -> right );
-    }
-    case eCondExpr:
-    {
-        const SBinExpr *x = ( const SBinExpr* ) self;
-        return SDumperPrint ( b, compact ? "%E|%E" : "%E | %E", x -> left, x -> right );
-    }
-    case eVectorExpr:
-    {
-        const SVectExpr *x = ( const SVectExpr* ) self;
-        if ( compact )
-            return SExpressionBracketListDump ( & x -> expr, b, "[", "]" );
-        return SExpressionBracketListDump ( & x -> expr, b, "[ ", " ]" );
-    }}
-
-    return SDumperPrint ( b, "EXPR-UNKNOWN" );
-
-}
-
-bool SExpressionVDump ( void *item, void *data )
-{
-    SDumper *b = data;
-    const SExpression *self = ( const void* ) item;
-
-    b -> rc = SExpressionDump ( self, b );
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-#endif /* SLVL >= 1 */
-
-
-/*--------------------------------------------------------------------------
- * STypeExpr
- */
-
-/* Mark
- */
-void STypeExprMark ( const STypeExpr *self, const VSchema *schema )
-{
-    if ( self -> fmt != NULL )
-        SFormatMark ( self -> fmt );
-    if ( self -> dt != NULL )
-        SDatatypeMark ( self -> dt );
-    if ( self -> ts != NULL )
-        STypesetMark ( self -> ts, schema );
-    if ( self -> dim )
-        SExpressionMark ( ( void * ) self -> dim, ( void * ) schema );
-}
-
-
-/*--------------------------------------------------------------------------
- * SSymExpr
- */
-
-/* Make
- *  used when creating implicit expressions
- */
-rc_t SSymExprMake ( const SExpression **xp, const KSymbol *sym, uint32_t var )
-{
-    SSymExpr *x = malloc ( sizeof * x );
-    if ( x == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    x -> dad . var = var;
-    atomic32_set ( & x -> dad . refcount, 1 );
-    x -> _sym = sym;
-    x -> alt = false;
-
-    * xp = & x -> dad;
-    return 0;
-}
-
-/* Mark
- */
-void SSymExprMark ( const SSymExpr *self, const VSchema *schema )
-{
-    switch ( self -> _sym -> type )
-    {
-    case eConstant:
-        SConstantMark ( self -> _sym -> u . obj );
-        break;
-    }
-}
-
-
-/*--------------------------------------------------------------------------
- * SFuncExpr
- */
-
-/* Mark
- */
-void SFuncExprMark ( const SFuncExpr *self, const VSchema *schema )
-{
-    SFunctionMark ( ( void * )self -> func, ( void * )schema );
-}
-
-
-/*--------------------------------------------------------------------------
- * SPhysEncExpr
- */
-
-/* ImplicitPhysEncExpr
- *  create expression object
- */
-rc_t VSchemaImplicitPhysEncExpr ( VSchema *self,
-    VTypedecl *td, const SExpression **expr, const char *text, const char *ctx )
-{
-    KSymTable tbl;
-    rc_t rc = init_symtab ( & tbl, self );
-    if ( rc == 0 )
-    {
-        KToken t;
-        KTokenText tt;
-        KTokenSource src;
-
-        SchemaEnv env;
-        SchemaEnvInit ( & env, EXT_SCHEMA_LANG_VERSION );
-
-        KTokenTextInitCString ( & tt, text, ctx );
-        KTokenSourceInit ( & src, & tt );
-        next_token ( & tbl, & src, & t );
-
-        rc = phys_encoding_expr ( & tbl, & src, & t, & env, self, td, expr );
-
-        KSymTableWhack ( & tbl );
-    }
-    return rc;
-}
-
-/* Mark
- */
-void SPhysEncExprMark ( const SPhysEncExpr *self, const VSchema *schema )
-{
-    SPhysicalMark ( ( void * )self -> phys, ( void * )schema );
-}
-
-
-/*--------------------------------------------------------------------------
- * VSchema
- */
-
-#if SLVL >= 1
-static
-rc_t const_vect_expr ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, const SVectExpr **xp )
-{
-    rc_t rc;
-    SVectExpr *x = malloc ( sizeof * x );
-    if ( x == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    x -> dad . var = eVectorExpr;
-    atomic32_set ( & x -> dad . refcount, 1 );
-    VectorInit ( & x -> expr, 0, 16 );
-
-    do
-    {
-        SExpression *vx;
-        rc = const_expr ( tbl, src, next_token ( tbl, src, t ),
-            env, self, ( const SExpression** ) & vx );
-        if ( rc != 0 )
-            break;
-
-        if ( vx -> var == eVectorExpr )
-        {
-            SExpressionWhack ( vx );
-            rc = KTokenExpected ( t, klogErr, "scalar constant" );
-            break;
-        }
-
-        rc = VectorAppend ( & x -> expr, NULL, vx );
-        if ( rc != 0 )
-        {
-            SExpressionWhack ( vx );
-            break;
-        }
-    }
-    while ( t -> id == eComma );
-
-    if ( rc != 0 )
-        SExpressionWhack ( & x -> dad );
-    else
-    {
-        * xp = x;
-        rc = expect ( tbl, src, t, eRightSquare, "]", true );
-    }
-
-    return rc;
-}
-#endif
-
-/*
- * const-expr         = <constname>
- *                    | CONST-VALUE
- */
-#if SLVL >= 1
-static
-rc_t negate_expr ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, const SExpression **xp )
-{
-    rc_t rc = const_expr ( tbl, src, next_token ( tbl, src, t ), env, self, xp );
-    if ( rc == 0 )
-    {
-        SUnaryExpr *x;
-        SConstExpr *cx;
-        const SSymExpr *sx;
-        const SExpression *td;
-        const SDatatype *dt;
-
-        static atomic32_t s_I8_id;
-        static atomic32_t s_I16_id;
-        static atomic32_t s_I32_id;
-        static atomic32_t s_I64_id;
-
-        switch ( ( * xp ) -> var )
-        {
-        case eConstExpr:
-            cx = * ( SConstExpr** ) xp;
-            if ( cx -> td . dim < 2 )
-            {
-                dt = VSchemaFindTypeid ( self, cx -> td . type_id );
-                if ( dt != NULL ) switch ( dt -> domain )
-                {
-                case vtdUint:
-                    switch ( dt -> size )
-                    {
-                    case 8:
-                        cx -> td . type_id  = VSchemaCacheIntrinsicTypeId ( self, & s_I8_id, "I8" );
-                        break;
-                    case 16:
-                        cx -> td . type_id  = VSchemaCacheIntrinsicTypeId ( self, & s_I16_id, "I16" );
-                        break;
-                    case 32:
-                        cx -> td . type_id  = VSchemaCacheIntrinsicTypeId ( self, & s_I32_id, "I32" );
-                        break;
-                    case 64:
-                        cx -> td . type_id  = VSchemaCacheIntrinsicTypeId ( self, & s_I64_id, "I64" );
-                        break;
-                    }
-                    /* no break */
-                case vtdInt:
-                    switch ( dt -> size )
-                    {
-                    case 8:
-                        cx -> u . i8 [ 0 ] = - cx -> u . i8 [ 0 ];
-                        return 0;
-                    case 16:
-                        cx -> u . i16 [ 0 ] = - cx -> u . i16 [ 0 ];
-                        return 0;
-                    case 32:
-                        cx -> u . i32 [ 0 ] = - cx -> u . i32 [ 0 ];
-                        return 0;
-                    case 64:
-                        cx -> u . i64 [ 0 ] = - cx -> u . i64 [ 0 ];
-                        return 0;
-                    }
-                    break;
-                case vtdFloat:
-                    switch ( dt -> size )
-                    {
-                    case 32:
-                        cx -> u . f32 [ 0 ] = - cx -> u . f32 [ 0 ];
-                        return 0;
-                    case 64:
-                        cx -> u . f64 [ 0 ] = - cx -> u . f64 [ 0 ];
-                        return 0;
-                    }
-                    break;
-                }
-            }
-            break;
-
-        case eIndirectExpr:
-            /* if type is known, at least verify domain */
-            sx = * ( const SSymExpr** ) xp;
-            td = ( ( const SIndirectConst* ) sx -> _sym -> u . obj ) -> td;
-            if ( td != NULL )
-            {
-                const STypeExpr *tx = ( const STypeExpr* ) td;
-                if ( tx-> dad . var == eTypeExpr && tx -> resolved )
-                {
-                    /* cannot have formats, but this is verified elsewhere */
-                    if ( tx -> fd . fmt == 0 && tx -> fd . td . dim < 2 )
-                    {
-                        /* determine domain */
-                        dt = VSchemaFindTypeid ( self, tx -> fd . td . type_id );
-                        if ( dt != NULL ) switch ( dt -> domain )
-                        {
-                        case vtdUint:
-                            KTokenExpected ( t, klogWarn, "signed integer" );
-                        case vtdInt:
-                        case vtdFloat:
-                            goto introduce_negate_expr;
-                        }
-                    }
-                }
-
-                break;
-            }
-
-        introduce_negate_expr:
-            x = malloc ( sizeof * x );
-            if ( x == NULL )
-            {
-                SExpressionWhack ( & sx -> dad );
-                return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-            }
-
-            x -> dad . var = eNegateExpr;
-            atomic32_set ( & x -> dad . refcount, 1 );
-            x -> expr = & sx -> dad;
-            * xp = & x -> dad;
-            return 0;
-
-        case eNegateExpr:
-            /* double negate */
-            x = * ( SUnaryExpr** ) xp;
-            * xp = x -> expr;
-            free ( x );
-            return 0;
-
-        default:
-            SExpressionWhack ( * xp );
-            return KTokenExpected ( t, klogErr, "integer or floating point constant" );
-        }
-
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcType, rcIncorrect );
-        KTokenRCExplain ( t, klogErr, rc );
-    }
-
-    return rc;
-}
-
-static
-rc_t bool_expr ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, const SConstExpr **xp )
-{
-    static atomic32_t s_bool_id;
-
-    SConstExpr *x = malloc ( sizeof * x - sizeof x -> u + sizeof x -> u . b [ 0 ] );
-    if ( x == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    assert ( t -> id == kw_true || t -> id == kw_false );
-    x -> u . b [ 0 ] = ( t -> id == kw_true );
-
-    x -> dad . var = eConstExpr;
-    atomic32_set ( & x -> dad . refcount, 1 );
-    x -> td . type_id = VSchemaCacheIntrinsicTypeId ( self, & s_bool_id, "bool" );
-    x -> td . dim = 1;
-
-    * xp = x;
-
-    next_token ( tbl, src, t );
-    return 0;
-}
-
-static
-rc_t uint_expr ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, const SConstExpr **xp )
-{
-    rc_t rc;
-    static atomic32_t s_U64_id;
-
-    SConstExpr *x = malloc ( sizeof * x - sizeof x -> u + sizeof x -> u . u64 [ 0 ] );
-    if ( x == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    rc = KTokenToU64 ( t, & x -> u . u64 [ 0 ] );
-    if ( rc != 0 )
-    {
-        free ( x );
-        return rc;
-    }
-
-    x -> dad . var = eConstExpr;
-    atomic32_set ( & x -> dad . refcount, 1 );
-    x -> td . type_id = VSchemaCacheIntrinsicTypeId ( self, & s_U64_id, "U64" );
-    x -> td . dim = 1;
-
-    * xp = x;
-
-    next_token ( tbl, src, t );
-    return 0;
-}
-
-static
-rc_t float_expr ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, const SConstExpr **xp )
-{
-    rc_t rc;
-    static atomic32_t s_F64_id;
-
-    SConstExpr *x = malloc ( sizeof * x - sizeof x -> u + sizeof x -> u . f64 [ 0 ] );
-    if ( x == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    rc = KTokenToF64 ( t, & x -> u . f64 [ 0 ] );
-    if ( rc != 0 )
-    {
-        free ( x );
-        return rc;
-    }
-
-    x -> dad . var = eConstExpr;
-    atomic32_set ( & x -> dad . refcount, 1 );
-    x -> td . type_id = VSchemaCacheIntrinsicTypeId ( self, & s_F64_id, "F64" );
-    x -> td . dim = 1;
-
-    * xp = x;
-
-    next_token ( tbl, src, t );
-    return 0;
-}
-
-static
-rc_t string_expr ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, const SConstExpr **xp )
-{
-    rc_t rc;
-
-    size_t size = t -> str . size + 1;
-    SConstExpr *x = malloc ( sizeof * x - sizeof x -> u + size );
-    if ( x == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    rc = KTokenToString ( t, x -> u . utf8, size, & size );
-    if ( rc != 0 )
-    {
-        free ( x );
-        return rc;
-    }
-
-    x -> dad . var = eConstExpr;
-    atomic32_set ( & x -> dad . refcount, 1 );
-    x -> td . dim = ( uint32_t ) size;
-
-    if ( t -> id == eString || ( size_t ) string_len ( x -> u . utf8, size ) == size )
-    {
-        static atomic32_t s_ascii_id;
-        x -> td . type_id = VSchemaCacheIntrinsicTypeId ( self, & s_ascii_id, "ascii" );
-    }
-    else
-    {
-        static atomic32_t s_utf8_id;
-        x -> td . type_id = VSchemaCacheIntrinsicTypeId ( self, & s_utf8_id, "utf8" );
-    }
-
-    * xp = x;
-
-    next_token ( tbl, src, t );
-    return 0;
-}
-
-static
-rc_t sym_const_expr ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, const SConstExpr **xp )
-{
-    const KSymbol *sym = t -> sym;
-    const SConstant *cnst = sym -> u . obj;
-
-    assert ( cnst -> expr != NULL );
-    atomic32_inc ( & ( ( SExpression* ) cnst -> expr ) -> refcount );
-    * xp = ( SConstExpr* ) cnst -> expr;
-
-    next_token ( tbl, src, t );
-    return 0;
-}
-#endif /* SLVL >= 1 */
-
-
-#if SLVL >= 3
-LIB_EXPORT rc_t CC indirect_const_expr ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, const SExpression **xp )
-{
-    SSymExpr *x = malloc ( sizeof *x );
-    if ( x == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    x -> dad . var = eIndirectExpr;
-    atomic32_set ( & x -> dad . refcount, 1 );
-    x -> _sym = t -> sym;
-    x -> alt = false;
-    * xp = & x -> dad;
-
-    next_token ( tbl, src, t );
-    return 0;
-}
-#endif /* SLVL >= 1 */
-
-/*
- * type-expr          = <typeset>
- *                    | <fmtdecl>
- *                    | <fmtname> '/' <typeset>
- */
-#if SLVL >= 1
-static
-rc_t type_expr_impl ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, const SExpression **fd, bool vardim )
-{
-    STypeExpr *x;
-
-    rc_t rc = next_fqn ( tbl, src, t, env );
-    if ( rc != 0 )
-        return rc;
-
-    x = malloc ( sizeof *x );
-    if ( x == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    x -> dad . var = eTypeExpr;
-    atomic32_set ( & x -> dad . refcount, 1 );
-    x -> fmt = NULL;
-    x -> dt = NULL;
-    x -> ts = NULL;
-    x -> id = NULL;
-    x -> dim = NULL;
-    x -> fd . fmt = 0;
-    x -> fd . td . type_id = 0;
-    x -> fd . td . dim = 0;
-    x -> resolved = true;
-
-    if ( t -> id == eFormat )
-    {
-        x -> fmt = t -> sym -> u . obj;
-        x -> fd . fmt = x -> fmt -> id;
-        if ( next_token ( tbl, src, t ) -> id != eFwdSlash )
-        {
-            * fd = & x -> dad;
-            return 0;
-        }
-
-        rc = next_fqn ( tbl, src, next_token ( tbl, src, t ), env );
-        if ( rc != 0 )
-        {
-            free ( x );
-            return rc;
-        }
-    }
-
-    switch ( t -> id )
-    {
-    case eDatatype:
-        x -> dt = t -> sym -> u . obj;
-        x -> fd . td . type_id = x -> dt -> id;
-        break;
-    case eTypeset:
-        x -> ts = t -> sym -> u . obj;
-        x -> fd . td . type_id = x -> ts -> id;
-        break;
-#if SLVL >= 3
-    case eSchemaType:
-        x -> id = t -> sym -> u . obj;
-        x -> resolved = false;
-        break;
-#endif
-    default:
-        free ( x );
-        return KTokenExpected ( t, klogErr, "datatype or typeset" );
-    }
-
-    if ( next_token ( tbl, src, t ) -> id != eLeftSquare )
-        x -> fd . td . dim = 1;
-    else
-    {
-        if ( next_token ( tbl, src, t ) -> id == eAsterisk && vardim )
-            next_token ( tbl, src, t );
-        else
-        {
-            const SConstExpr *cx;
-
-            rc = const_expr ( tbl, src, t, env, self, & x -> dim );
-            if ( rc != 0 )
-            {
-                free ( x );
-                return rc;
-            }
-
-            switch ( x -> dim -> var )
-            {
-            case eConstExpr:
-                cx =  ( const SConstExpr* ) x -> dim;
-                if ( cx -> td . dim == 1 )
-                {
-                    const SDatatype *dt = VSchemaFindTypeid ( self, cx -> td . type_id );
-                    if ( dt != NULL && SDatatypeIntrinsicDim ( dt ) == 1 )
-                    {
-                        if ( dt -> domain == vtdUint )
-                        {
-                            switch ( dt -> size )
-                            {
-                            case 64:
-                                if ( cx -> u . u64 [ 0 ] <= 0xFFFFFFFF )
-                                    x -> fd . td . dim = ( uint32_t ) cx -> u . u64 [ 0 ];
-                                break;
-                            case 32:
-                                x -> fd . td . dim = cx -> u . u32 [ 0 ];
-                                break;
-                            case 16:
-                                x -> fd . td . dim = cx -> u . u16 [ 0 ];
-                                break;
-                            case 8:
-                                x -> fd . td . dim = cx -> u . u8 [ 0 ];
-                                break;
-                            }
-                        }
-                        else if ( dt -> domain ==  vtdInt )
-                        {
-                            switch ( dt -> size )
-                            {
-                            case 64:
-                                if ( cx -> u . i64 [ 0 ] > 0 && cx -> u . i64 [ 0 ] <= 0xFFFFFFFF )
-                                    x -> fd . td . dim = ( uint32_t ) cx -> u . i64 [ 0 ];
-                                break;
-                            case 32:
-                                if ( cx -> u . i32 [ 0 ] > 0 )
-                                    x -> fd . td . dim = cx -> u . i32 [ 0 ];
-                                break;
-                            case 16:
-                                if ( cx -> u . i16 [ 0 ] > 0 )
-                                    x -> fd . td . dim = cx -> u . i16 [ 0 ];
-                                break;
-                            case 8:
-                                if ( cx -> u . i8 [ 0 ] > 0 )
-                                    x -> fd . td . dim = cx -> u . i8 [ 0 ];
-                                break;
-                            }
-                        }
-
-                        if ( x -> fd . td . dim > 0 )
-                            break;
-                    }
-                }
-
-                SExpressionWhack ( & x -> dad );
-                return KTokenExpected ( t, klogErr, "constant integer expression" );
-
-            case eIndirectExpr:
-                x -> resolved = false;
-                break;
-            default:
-                SExpressionWhack ( & x -> dad );
-                return KTokenExpected ( t, klogErr, "constant integer expression" );
-            }
-        }
-
-        rc = expect ( tbl, src, t, eRightSquare, "]", true );
-        if ( rc != 0 )
-        {
-            SExpressionWhack ( & x -> dad );
-            return rc;
-        }
-    }
-    
-    * fd = & x -> dad;
-    return 0;
-}
-
-rc_t type_expr ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, const SExpression **fd )
-{
-    return type_expr_impl ( tbl, src, t, env, self, fd, false );
-}
-
-rc_t vardim_type_expr ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, const SExpression **fd )
-{
-    return type_expr_impl ( tbl, src, t, env, self, fd, true );
-}
-#endif /* SLVL >= 1 */
-
-
-/*
- * cast_expr          = '(' <type-expr> ')' <expression>
- */
-#if SLVL >= 1
-static
-rc_t cast_expr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, const SBinExpr **xp,
-    rc_t ( * expr ) ( KSymTable*, KTokenSource*, KToken*,
-        const SchemaEnv*, VSchema*, const SExpression** ) )
-{
-    rc_t rc;
-    SBinExpr *x = malloc ( sizeof * x );
-    if ( x == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    rc = type_expr ( tbl, src, next_token ( tbl, src, t ), env, self, & x -> left );
-    if ( rc == 0 )
-    {
-        rc = expect ( tbl, src, t, eRightParen, ")", true );
-        if ( rc == 0 )
-        {
-            rc = ( * expr ) ( tbl, src, t, env, self, & x -> right );
-            if ( rc == 0 )
-            {
-                x -> dad . var = eCastExpr;
-                atomic32_set ( & x -> dad . refcount, 1 );
-                * xp = x;
-                return 0;
-            }
-        }
-
-        SExpressionWhack ( x -> left );
-    }
-
-    free ( x );
-    return rc;
-}
-
-
-rc_t const_expr ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, const SExpression **xp )
-{
-    switch ( t -> id )
-    {
-    case eDecimal:
-    case eHex:
-    case eOctal:
-        return uint_expr ( tbl, src, t, env, self, ( const SConstExpr** ) xp );
-    case eFloat:
-    case eExpFloat:
-        return float_expr ( tbl, src, t, env, self, ( const SConstExpr** ) xp );
-    case eString:
-    case eEscapedString:
-        return string_expr ( tbl, src, t, env, self, ( const SConstExpr** ) xp );
-    case eConstant:
-        return sym_const_expr ( tbl, src, t, env, self, ( const SConstExpr** ) xp );
-#if SLVL >= 4
-    case eFactParam:
-#endif
-#if SLVL >= 3
-    case eSchemaParam:
-        return indirect_const_expr ( tbl, src, t, env, self, xp );
-#endif
-    case eLeftSquare:
-        return const_vect_expr ( tbl, src, t, env, self, ( const SVectExpr** ) xp );
-    case kw_false:
-    case kw_true:
-        return bool_expr ( tbl, src, t, env, self, ( const SConstExpr** ) xp );
-    case eLeftParen:
-        return cast_expr ( ( KSymTable* ) tbl, src, t, env,
-            ( VSchema* ) self, ( const SBinExpr** ) xp,
-            ( rc_t ( * ) ( KSymTable*, KTokenSource*, KToken*,
-              const SchemaEnv*, VSchema*, const SExpression** ) ) const_expr );
-    case eMinus:
-        /* unary minus sign */
-        return negate_expr ( tbl, src, t, env, self, xp );
-    case ePlus:
-        /* unary plus sign */
-        return const_expr ( tbl, src, next_token ( tbl, src, t ), env, self, xp );
-    }
-
-    return KTokenExpected ( t, klogErr, "boolean, integer, float, string or symbolic constant" );
-}
-#endif /* SLVL >= 1 */
-
-
-/*
- * func-param-expr    = <funcname>
- */
-#if SLVL >= 4
-static
-rc_t sym_expr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, const SSymExpr **xp, uint32_t var, bool alt )
-{
-    SSymExpr *x = malloc ( sizeof * x );
-    if ( x == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    x -> dad . var = var;
-    atomic32_set ( & x -> dad . refcount, 1 );
-    x -> _sym = t -> sym;
-    x -> alt = alt;
-    * xp = x;
-
-    next_token ( tbl, src, t );
-    return 0;
-}
-
-#define func_param_expr( tbl, src, t, env, self, xp ) \
-    sym_expr ( tbl, src, t, env, self, xp, eFuncParamExpr, false )
-
-#endif
-
-
-/*
- * param-expr         = <func-param>
- * 
- */
-#if SLVL >= 4
-
-#define param_expr( tbl, src, t, env, self, xp ) \
-    sym_expr ( tbl, src, t, env, self, xp, eParamExpr, false )
-
-#endif
-
-
-/*
- * prod-expr          = <production>
- * 
- */
-#if SLVL >= 4
-
-#define prod_expr( tbl, src, t, env, self, xp ) \
-    sym_expr ( tbl, src, t, env, self, xp, eProdExpr, false )
-
-#endif
-
-
-/*
- * fwd-expr           = ID
- */
-#if SLVL >= 4
-static
-rc_t fwd_decl_expr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, const SSymExpr **xp, bool alt )
-{
-    rc_t rc;
-    SSymExpr *x = malloc ( sizeof * x );
-    if ( x == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    rc = KSymTableCreateConstSymbol ( tbl, & x -> _sym, & t -> str, eForward, NULL );
-    if ( rc != 0 )
-    {
-        free ( x );
-        return rc;
-    }
-
-    x -> dad . var = eFwdExpr;
-    atomic32_set ( & x -> dad . refcount, 1 );
-    x -> alt = alt;
-    * xp = x;
-
-    next_token ( tbl, src, t );
-    return 0;
-}
-
-#define fwd_ref_expr( tbl, src, t, env, self, xp, alt ) \
-    sym_expr ( tbl, src, t, env, self, xp, eFwdExpr, alt )
-
-#endif
-
-
-/*
- * column-expr        = <column>
- */
-#if SLVL >= 8
-
-#define column_expr( tbl, src, t, env, self, xp, alt ) \
-    sym_expr ( tbl, src, t, env, self, xp, eColExpr, alt )
-
-#endif
-
-
-/*
- * physical-expr      = KCOL
- */
-#if SLVL >= 7
-
-#define physical_expr( tbl, src, t, env, self, xp ) \
-    sym_expr ( tbl, src, t, env, self, xp, ePhysExpr, false )
-
-#endif
-
-
-/*
- * schema-parms       = <schema-param> [ ',' <schema-parms> ]
- * schema-param       = [ ID '=' ]  <schema-value>
- * schema-value       = <fmtdecl>
- *                    | <uint-expr>
- */
-#if SLVL >= 4
-static
-rc_t schema_value ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, const SExpression **v )
-{
-    /* could be a typename */
-    if ( t -> id == eNamespace )
-    {
-        rc_t rc = next_fqn ( tbl, src, t, env );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* param value */
-    switch ( t -> id )
-    {
-    /* type parameter */
-    case eFormat:
-    case eDatatype:
-    case eTypeset:
-    case eSchemaType:
-        return type_expr ( tbl, src, t, env, self, v );
-
-    /* manifest uint constant */
-    case eDecimal:
-    case eHex:
-    case eOctal:
-        return uint_expr ( tbl, src, t, env, self, ( const SConstExpr** ) v );
-
-    /* symbolic constant must be uint */
-    case eConstant:
-        return sym_const_expr ( tbl, src, t, env, self, ( const SConstExpr** ) v );
-
-    /* schema or factory constant must be uint
-       but may not yet be completely resolved */
-    case eSchemaParam:
-    case eFactParam:
-        return indirect_const_expr ( tbl, src, t, env, self, v );
-    }
-
-    return KTokenExpected ( t, klogErr, "data type or unsigned int constant" );
-}
-#endif
-
-/*
- * fact-parms         = <fact-param> [ ',' <fact-parms> ]
- * fact-param         = [ ID '=' ] <fact-value>
- * fact-value         = <func-name>
- *                    | '[' <fact-const-list> ']'
- */
-#if SLVL >= 4
-static
-rc_t fact_value ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, const SExpression **v )
-{
-    if ( t -> id == eNamespace )
-    {
-        rc_t rc = next_fqn ( tbl, src, t, env );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    switch ( t -> id )
-    {
-        /* const-expression */
-    case eDecimal:
-    case eHex:
-    case eOctal:
-        return uint_expr ( tbl, src, t, env, self, ( const SConstExpr** ) v );
-    case eFloat:
-    case eExpFloat:
-        return float_expr ( tbl, src, t, env, self, ( const SConstExpr** ) v );
-    case eString:
-    case eEscapedString:
-        return string_expr ( tbl, src, t, env, self, ( const SConstExpr** ) v );
-    case eConstant:
-        return sym_const_expr ( tbl, src, t, env, self, ( const SConstExpr** ) v );
-    case eSchemaParam:
-    case eFactParam:
-        return indirect_const_expr ( tbl, src, t, env, self, v );
-    case eLeftSquare:
-        return const_vect_expr ( tbl, src, t, env, self, ( const SVectExpr** ) v );
-    case kw_false:
-    case kw_true:
-        return bool_expr ( tbl, src, t, env, self, ( const SConstExpr** ) v );
-
-        /* cast expression */
-    case eLeftParen:
-        return cast_expr ( tbl, src, t, env, self, ( const SBinExpr** ) v, fact_value );
-
-        /* function name */
-    case eFunction:
-        return func_param_expr ( tbl, src, t, env, self, ( const SSymExpr** ) v );
-
-    case eMinus:
-        /* unary minus sign */
-        return negate_expr ( tbl, src, t, env, self, v );
-    case ePlus:
-        /* unary plus sign */
-        return const_expr ( tbl, src, next_token ( tbl, src, t ), env, self, v );
-    }
-
-    return KTokenExpected ( t, klogErr, "constant, function param or cast operator" );
-}
-
-static
-rc_t old_fact_value ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, const SExpression **v )
-{
-    switch ( t -> id )
-    {
-        /* const-expression */
-    case eDecimal:
-    case eHex:
-    case eOctal:
-        return uint_expr ( tbl, src, t, env, self, ( const SConstExpr** ) v );
-    case eFloat:
-    case eExpFloat:
-        return float_expr ( tbl, src, t, env, self, ( const SConstExpr** ) v );
-    case eString:
-    case eEscapedString:
-        return string_expr ( tbl, src, t, env, self, ( const SConstExpr** ) v );
-    case eMinus:
-        return negate_expr ( tbl, src, t, env, self, v );
-    case ePlus:
-        return old_fact_value ( tbl, src, next_token ( tbl, src, t ), env, self, v );
-    }
-
-    return RC ( rcVDB, rcSchema, rcParsing, rcNoObj, rcNoErr );
-}
-#endif
-
-/*
- *    func-parms         = <func-param> [ ',' <func-parms> ]
- *    func-param         = <colname>
- *                       | <physname>
- *                       | <production>
- *                       | <parmname>
- */
-#if SLVL >= 4
-static
-rc_t param_value ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, const SExpression **v )
-{
-    KToken t2;
-    bool alt = false;
-
-    /* look for special modifiers */
-    switch ( t -> id )
-    {
-#if SLVL >= 7
-    case ePeriod:
-        /* detect special syntax for physical column names */
-        physical_name ( tbl, src, t, env );
-        break;
-#endif
-    case eAtSign:
-
-        /* detect alternate column source */
-        switch ( next_token ( tbl, src, & t2 ) -> id )
-        {
-#if SLVL >= 8
-        case eColumn:
-#endif
-        case eIdent:
-        case eForward:
-        case eVirtual:
-            * t = t2;
-            alt = true;
-            break;
-
-        default:
-            KTokenSourceReturn ( src, & t2 );
-        }
-        break;
-    }
-
-    switch ( t -> id )
-    {
-    /* handle function or script params, named productions */
-#if SLVL >= 5
-    case eAtSign:
-        t -> sym = KSymTableFind ( tbl, & t -> str );
-        if ( t -> sym == NULL )
-            break;
-        t -> id = t -> sym -> type;
-        /* no break */
-#endif
-    case eFuncParam:
-        return param_expr ( tbl, src, t, env, self, ( const SSymExpr** ) v );
-    case eProduction:
-        return prod_expr ( tbl, src, t, env, self, ( const SSymExpr** ) v );
-
-    /* forward reference */
-    case eIdent:
-        return fwd_decl_expr ( tbl, src, t, env, self, ( const SSymExpr** ) v, alt );
-    case eForward:
-    case eVirtual:
-        return fwd_ref_expr ( tbl, src, t, env, self, ( const SSymExpr** ) v, alt );
-#if SLVL >= 8
-    /* column expression */
-    case eColumn:
-        return column_expr ( tbl, src, t, env, self, ( const SSymExpr** ) v, alt );
-#endif
-#if SLVL >= 7
-    /* physical column expression */
-    case ePhysMember:
-        return physical_expr ( tbl, src, t, env, self, ( const SSymExpr** ) v );
-#endif
-    /* cast expression */
-    case eLeftParen:
-        return cast_expr ( tbl, src, t, env, self, ( const SBinExpr** ) v, param_value );
-    }
-
-    return KTokenExpected ( t, klogErr, "column or production name or cast operator" );
-}
-
-static
-rc_t param_list ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, Vector *v,
-    rc_t ( * value ) ( KSymTable*, KTokenSource*, KToken*,
-        const SchemaEnv*, VSchema*, const SExpression** ) )
-{
-    rc_t rc;
-    const SExpression *x;
-
-    while ( 1 )
-    {
-        /* param value */
-        rc = ( * value ) ( tbl, src, t, env, self, & x );
-        if ( rc != 0 )
-            return rc;
-
-        /* record parameter */
-        rc = VectorAppend ( v, NULL, x );
-        if ( rc != 0 )
-        {
-            SExpressionWhack ( x );
-            return KTokenRCExplain ( t, klogInt, rc );
-        }
-
-        if ( t -> id != eComma )
-            break;
-
-        next_token ( tbl, src, t );
-    }
-
-    return 0;
-}
-
-static
-rc_t func_expression ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SFuncExpr *fx, const KSymbol **sym )
-{
-    rc_t rc;
-
-    /* schema-parms */
-    if ( t -> id == eLeftAngle )
-    {
-        next_token ( tbl, src, t );
-        rc = param_list ( tbl, src, t, env, self, & fx -> schem, schema_value );
-        if ( rc == 0 )
-            rc = expect ( tbl, src, t, eRightAngle, ">", true );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* locate function or schema */
-    rc = next_fqn ( tbl, src, t, env );
-    if ( rc != 0 )
-        return rc;
-
-    if ( t -> id != eScriptFunc && t -> id != eFunction )
-        return KTokenExpected ( t, klogErr, "function" );
-    * sym = t -> sym;
-
-    /* look for requested version */
-    if ( next_token ( tbl, src, t ) -> id == eHash )
-    {
-        fx -> version_requested = true;
-        rc = maj_min_rel ( tbl, src, next_token ( tbl, src, t ),
-            env, self,  & fx -> version, false );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* look for factory params */
-    if ( t -> id == eLeftAngle && ! env -> mixed_fact_param_list )
-    {
-        next_token ( tbl, src, t );
-        rc = param_list ( tbl, src, t, env, self, & fx -> pfact, fact_value );
-        if ( rc == 0 )
-            rc = expect ( tbl, src, t, eRightAngle, ">", true );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* function params */
-    if ( t -> id != eLeftParen )
-        return KTokenExpected ( t, klogErr, "(" );
-    if ( next_token ( tbl, src, t ) -> id != eRightParen )
-    {
-        /* handle old-style fact params */
-        if ( env -> mixed_fact_param_list )
-        {
-            rc = param_list ( tbl, src, t, env, self, & fx -> pfact, old_fact_value );
-            if ( GetRCState ( rc ) == rcNoErr )
-                rc = 0;
-        }
-
-        /* handle normal function params */
-        if ( rc == 0 )
-            rc = param_list ( tbl, src, t, env, self, & fx -> pfunc, param_value );
-    }
-    if ( rc == 0 )
-        rc = expect ( tbl, src, t, eRightParen, ")", true );
-
-    return rc;
-}
-
-static
-rc_t func_expr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, const SFuncExpr **xp )
-{
-    rc_t rc;
-    const KSymbol *sym = NULL;
-
-    SFuncExpr *fx = malloc ( sizeof * fx );
-    if ( fx == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    /* initialize */
-    fx -> dad . var = eFuncExpr;
-    atomic32_set ( & fx -> dad . refcount, 1 );
-    fx -> func = NULL;
-    VectorInit ( & fx -> schem, 0, 4 );
-    VectorInit ( & fx -> pfact, 0, 8 );
-    VectorInit ( & fx -> pfunc, 0, 8 );
-    fx -> version = 0;
-    fx -> version_requested = false;
-    fx -> untyped = false;
-
-    /* parse expression */
-    rc = func_expression ( tbl, src, t, env, self, fx, & sym );
-    if ( rc == 0 )
-    {
-        const SNameOverload *vf = sym -> u . obj;
-
-        /* match expression */
-        if ( vf -> name -> type == eScriptFunc )
-            fx -> dad . var = eScriptExpr;
-
-        if ( fx -> version_requested )
-        {
-            fx -> func =
-                VectorFind ( & vf -> items, & fx -> version, NULL, SFunctionCmp );
-        }
-        else
-        {
-            fx -> func = VectorLast ( & vf -> items );
-        }
-
-        * xp = fx;
-        return 0;
-    }
-
-    SExpressionWhack ( & fx -> dad );
-    return rc;
-}
-#endif /* SLVL >= 4 */
-
-/*
- * expression         = <param-value>
- *                    | <func-expr>
- *                    | '(' <type-expr> ')' <expression>
- */
-#if SLVL >= 4
-rc_t expression ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, const SExpression **xp )
-{
-    rc_t rc;
-
-    if ( t -> id == eNamespace )
-    {
-        rc = next_fqn ( tbl, src, t, env );
-        if ( rc != 0 )
-            return rc;
-    }
-
-#if SLVL >= 7
-    /* detect special syntax for physical column names */
-    if ( t -> id == ePeriod )
-        physical_name ( tbl, src, t, env );
-#endif
-
-    switch ( t -> id )
-    {
-    /* handle function or script params, named productions */
-#if SLVL >= 5
-    case eAtSign:
-        t -> sym = KSymTableFind ( tbl, & t -> str );
-        if ( t -> sym == NULL )
-            break;
-        t -> id = t -> sym -> type;
-        /* no break */
-#endif
-    case eFuncParam:
-        return param_expr ( tbl, src, t, env, self, ( const SSymExpr** ) xp );
-    case eProduction:
-        return prod_expr ( tbl, src, t, env, self, ( const SSymExpr** ) xp );
-
-    /* forward reference */
-    case eIdent:
-        return fwd_decl_expr ( tbl, src, t, env, self, ( const SSymExpr** ) xp, false );
-    case eForward:
-    case eVirtual:
-        return fwd_ref_expr ( tbl, src, t, env, self, ( const SSymExpr** ) xp, false );
-#if SLVL >= 8
-    /* column expression */
-    case eColumn:
-        return column_expr ( tbl, src, t, env, self, ( const SSymExpr** ) xp, false );
-#endif
-#if SLVL >= 7
-    /* physical column expression */
-    case ePhysMember:
-        return physical_expr ( tbl, src, t, env, self, ( const SSymExpr** ) xp );
-#endif
-    /* function expression */
-    case eLeftAngle:
-    case eFunction:
-    case eScriptFunc:
-        return func_expr ( tbl, src, t, env, self, ( const SFuncExpr** ) xp );
-
-    /* cast expression */
-    case eLeftParen:
-        return cast_expr ( tbl, src, t, env, self,
-            ( const SBinExpr** ) xp, expression );
-
-    /* type expression */
-    case eFormat:
-    case eDatatype:
-    case eTypeset:
-    case eSchemaType:
-        return type_expr ( tbl, src, t, env, self, xp );
-
-    /* in case expression gets used for const-expression */
-    case eDecimal:
-    case eHex:
-    case eOctal:
-        return uint_expr ( tbl, src, t, env, self, ( const SConstExpr** ) xp );
-    case eFloat:
-    case eExpFloat:
-        return float_expr ( tbl, src, t, env, self, ( const SConstExpr** ) xp );
-    case eString:
-    case eEscapedString:
-        return string_expr ( tbl, src, t, env, self, ( const SConstExpr** ) xp );
-    case eConstant:
-        return sym_const_expr ( tbl, src, t, env, self, ( const SConstExpr** ) xp );
-    case eSchemaParam:
-    case eFactParam:
-        return indirect_const_expr ( tbl, src, t, env, self, xp );
-    case eLeftSquare:
-        return const_vect_expr ( tbl, src, t, env, self, ( const SVectExpr** ) xp );
-    case kw_false:
-    case kw_true:
-        return bool_expr ( tbl, src, t, env, self, ( const SConstExpr** ) xp );
-
-    case eMinus:
-        /* unary minus sign */
-        return negate_expr ( tbl, src, t, env, self, xp );
-    case ePlus:
-        /* unary plus sign */
-        return const_expr ( tbl, src, next_token ( tbl, src, t ), env, self, xp );
-    }
-
-    return KTokenExpected ( t, klogErr, "production name, column name, function or cast expression" );
-}
-#endif /* SLVL >= 4 */
-
-
-/*
- * cond-expr          = <expression> [ '|' <cond-expr> ]
- */
-#if SLVL >= 4
-rc_t cond_expr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, const SExpression **xp )
-{
-    rc_t rc = expression ( tbl, src, t, env, self, xp );
-    if ( rc != 0 )
-        return rc;
-
-    if ( t -> id == ePipe )
-    {
-        SBinExpr *x = malloc ( sizeof * x );
-        if ( x == NULL )
-        {
-            SExpressionWhack ( * xp ), * xp = NULL;
-            return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-        }
-
-        x -> dad . var = eCondExpr;
-        atomic32_set ( & x -> dad . refcount, 1 );
-        x -> left = * xp;
-        x -> right = NULL;
-        * xp = & x -> dad;
-
-        rc = cond_expr ( tbl, src, next_token ( tbl, src, t ), env, self, & x -> right );
-        if ( rc != 0 )
-        {
-            SExpressionWhack ( & x -> dad );
-            * xp = NULL;
-        }
-    }
-
-    return rc;
-}
-#endif /* SLVL >= 4 */
-
-/*
- * untyped-expr       = <fmtdecl> | <untyped-func-name> '(' ')'
- */
-#if SLVL >= 6
-static
-rc_t untyped_func_expr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, const SFuncExpr **xp )
-{
-    rc_t rc;
-    const KSymbol *sym = t -> sym;
-
-    /* expect empty parameter list */
-    next_token ( tbl, src, t );
-    rc = expect ( tbl, src, t, eLeftParen, "(", true );
-    if ( rc == 0 )
-        rc = expect ( tbl, src, t, eRightParen, ")", true );
-    if ( rc == 0 )
-    {
-        const SNameOverload *vf = sym -> u . obj;
-
-        SFuncExpr *fx = malloc ( sizeof * fx );
-        if ( fx == NULL )
-            return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-        /* initialize */
-        fx -> dad . var = eFuncExpr;
-        atomic32_set ( & fx -> dad . refcount, 1 );
-        VectorInit ( & fx -> schem, 0, 4 );
-        VectorInit ( & fx -> pfact, 0, 8 );
-        VectorInit ( & fx -> pfunc, 0, 8 );
-        fx -> version = 0;
-        fx -> version_requested = false;
-        fx -> untyped = true;
-
-        fx -> func = VectorLast ( & vf -> items );
-
-        * xp = fx;
-        return 0;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC untyped_expr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, const SExpression **xp )
-{
-    rc_t rc;
-
-    if ( t -> id == eNamespace )
-    {
-        rc = next_fqn ( tbl, src, t, env );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    switch ( t -> id )
-    {
-    /* function expression */
-    case eUntypedFunc:
-        return untyped_func_expr ( tbl, src, t, env, self, ( const SFuncExpr** ) xp );
-
-    /* type expression */
-    case eFormat:
-        return type_expr ( tbl, src, t, env, self, xp );
-    }
-
-    return KTokenExpected ( t, klogErr, "type or function expression" );
-}
-#endif /* SLVL >= 6 */
-
-
-/*
- * phys-encoding-expr = [ '<' <schema-parms> '>' ]
- *                      <phys-encoding-name> [ '#' <maj-min-rel> ]
- *                      [ '<' <fact-params> '>' ]
- */
-#if SLVL >= 7
-static
-rc_t phys_enc_expr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SPhysEncExpr *x, const KSymbol **sym )
-{
-    rc_t rc;
-
-    /* schema parms */
-    if ( t -> id == eLeftAngle )
-    {
-        next_token ( tbl, src, t );
-        rc = param_list ( tbl, src, t, env, self, & x -> schem, schema_value );
-        if ( rc == 0 )
-            rc = expect ( tbl, src, t, eRightAngle, ">", true );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* phys-encoding-name */
-    rc = next_fqn ( tbl, src, t, env );
-    if ( rc != 0 )
-        return rc;
-
-    if ( t -> id != ePhysical )
-        return KTokenExpected ( t, klogErr, "physical encoding" );
-    * sym = t -> sym;
-
-
-    /* look for requested version */
-    if ( next_token ( tbl, src, t ) -> id == eHash )
-    {
-        x -> version_requested = true;
-        rc = maj_min_rel ( tbl, src, next_token ( tbl, src, t ),
-            env, self,  & x -> version, false );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* look for factory params */
-    if ( t -> id == eLeftAngle )
-    {
-        next_token ( tbl, src, t );
-        rc = param_list ( tbl, src, t, env, self, & x -> pfact, fact_value );
-        if ( rc == 0 )
-            rc = expect ( tbl, src, t, eRightAngle, ">", true );
-    }
-
-    return rc;
-}
-
-rc_t phys_encoding_expr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, VTypedecl *td, const SExpression **xp )
-{
-    rc_t rc;
-    const KSymbol *sym = NULL;
-
-    SPhysEncExpr *x = malloc ( sizeof * x );
-    if ( x == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    /* initialize */
-    x -> dad . var = ePhysEncExpr;
-    atomic32_set ( & x -> dad . refcount, 1 );
-    x -> phys = NULL;
-    VectorInit ( & x -> schem, 0, 4 );
-    VectorInit ( & x -> pfact, 0, 8 );
-    x -> version = 0;
-    x -> version_requested = false;
-
-    /* parse expression */
-    rc = phys_enc_expr ( tbl, src, t, env, self, x, & sym );
-    if ( rc == 0 )
-    {
-        const SNameOverload *name = sym -> u . obj;
-
-        if ( x -> version_requested )
-        {
-            x -> phys =
-                VectorFind ( & name -> items, & x -> version, NULL, SPhysicalCmp );
-        }
-        else
-        {
-            x -> phys = VectorLast ( & name -> items );
-        }
-
-        /* evaluate type expression */
-        if ( td != NULL )
-        {
-            /* bind schema parameters */
-            Vector prior, cx_bind;
-            VectorInit ( & cx_bind, 1, self -> num_indirect ? self -> num_indirect : 16 );
-            rc = SPhysicalBindSchemaParms ( x -> phys, & prior, & x -> schem, & cx_bind );
-            if ( rc == 0 )
-            {
-                const SExpression *tx = x -> phys -> td;
-                assert ( tx != NULL );
-                rc = STypeExprResolveAsTypedecl ( ( const STypeExpr* ) tx, self, td, & cx_bind );
-                SPhysicalRestSchemaParms ( x -> phys, & prior, & cx_bind );
-            }
-            VectorWhack ( & cx_bind, NULL, NULL );
-        }
-
-        if ( rc == 0 )
-        {
-            * xp = & x -> dad;
-            return 0;
-        }
-    }
-
-    SExpressionWhack ( & x -> dad );
-    return rc;
-}
-#endif
diff --git a/libs/vdb/schema-expr.h b/libs/vdb/schema-expr.h
deleted file mode 100644
index b815890..0000000
--- a/libs/vdb/schema-expr.h
+++ /dev/null
@@ -1,396 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_schema_expr_
-#define _h_schema_expr_
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-#ifndef _h_klib_vector_
-#include <klib/vector.h>
-#endif
-
-#ifndef _h_vdb_xform_
-#include <vdb/xform.h>
-#endif
-
-#ifndef _h_atomic32_
-#include <atomic32.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KSymbol;
-struct VSchema;
-struct SFormat;
-struct SDatatype;
-struct STypeset;
-struct SIndirectType;
-struct SPhysical;
-struct SDumper;
-
-
-/*--------------------------------------------------------------------------
- * SExpression
- *  supertype of all expressions
- */
-enum
-{
-    /* a type expression */
-    eTypeExpr,
-
-    /* constant or indirect constant expr */
-    eConstExpr, eIndirectExpr,
-
-    /* functional param, schema or table production */
-    eParamExpr, eProdExpr, eFwdExpr,
-
-    /* a function passed as a parameter */
-    eFuncParamExpr,
-
-    /* extern or physical column expression */
-    eColExpr, ePhysExpr,
-
-    /* functional expression */
-    eFuncExpr, eScriptExpr,
-
-    /* physical encoding expression */
-    ePhysEncExpr,
-
-    /* cast operator expression */
-    eCastExpr,
-
-    /* unary negation */
-    eNegateExpr,
-
-    /* conditional expression */
-    eCondExpr,
-
-    /* vector expression */
-    eVectorExpr
-};
-
-typedef struct SExpression SExpression;
-struct SExpression
-{
-    uint32_t var;
-
-    /* this could be KRefcount */
-    atomic32_t refcount;
-};
-
-/* Whack
- */
-void SExpressionWhack ( const SExpression *self );
-void CC SExpressionVWhack ( void *item, void *ignore );
-
-/* Mark
- */
-void CC SExpressionMark ( void * item, void * data );
-
-/* Dump
- */
-rc_t SExpressionDump ( const SExpression *self, struct SDumper *d );
-bool SExpressionVDump ( void *item, void *dumper );
-bool CC SExpressionListDump ( void *item, void *dumper );
-rc_t SExpressionBracketListDump ( const Vector *expr, struct SDumper *d,
-    const char *begin, const char *end );
-
-
-/*--------------------------------------------------------------------------
- * STypeExpr
- *  handles general form of what has been called a typedecl,
- *  with an optional blob format, type, typeset, indirect type,
- *  and a const dimension expression.
- *
- *  when properly resolved, "fd" contains runtime values
- */
-typedef struct STypeExpr STypeExpr;
-struct STypeExpr
-{
-    SExpression dad;
-
-    struct SFormat const *fmt;
-    struct SDatatype const *dt;
-    struct STypeset const *ts;
-    struct SIndirectType const *id;
-    const SExpression *dim;
-
-    VFormatdecl fd;
-    bool resolved;
-};
-
-
-/* Resolve
- *  resolve type expression to either a VTypedecl or VFormatdecl
- */
-rc_t STypeExprResolveAsTypedecl ( const STypeExpr *self,
-    struct VSchema const *schema, VTypedecl *td, Vector *cx_bind );
-rc_t STypeExprResolveAsFormatdecl ( const STypeExpr *self,
-    struct VSchema const *schema, VFormatdecl *fd, Vector *cx_bind );
-
-/* Mark
- */
-void STypeExprMark ( const STypeExpr *self, struct VSchema const *schema );
-
-
-/*--------------------------------------------------------------------------
- * SConstExpr
- *  handles a vector of constant values
- *  evaluated from manifest or direct symbolic constants
- *
- *  "td" holds both an appropriate constant type
- *  as well as vector dimension
- *
- *  when td.type_id is utf8, dim gives
- *  the number of bytes rather than characters.
- */
-typedef struct SConstExpr SConstExpr;
-struct SConstExpr
-{
-    SExpression dad;
-
-    VTypedecl td;
-    union
-    {
-        /* bool */
-        bool b [ 8 ];
-
-        /* integer */
-        int8_t i8 [ 8 ];
-        int16_t i16 [ 4 ];
-        int32_t i32 [ 2 ];
-        int64_t i64 [ 1 ];
-
-        /* unsigned integer */
-        uint8_t u8 [ 8 ];
-        uint16_t u16 [ 4 ];
-        uint32_t u32 [ 2 ];
-        uint64_t u64 [ 1 ];
-
-        /* float */
-        float f32 [ 2 ];
-        double f64 [ 1 ];
-
-        /* ascii */
-        char ascii [ 8 ];
-
-        /* unicode */
-        char utf8 [ 8 ];
-        uint16_t utf16 [ 4 ];
-        uint32_t utf32 [ 2 ];
-
-    } u;
-};
-
-
-/* Resolve
- *  return constant expression as a vector of indicated type
- */
-rc_t SConstExprResolveAsBool ( const SConstExpr *self,
-    struct VSchema const *schema, bool *b, uint32_t capacity );
-rc_t SConstExprResolveAsI8 ( const SConstExpr *self,
-    struct VSchema const *schema, int8_t *i8, uint32_t capacity );
-rc_t SConstExprResolveAsI16 ( const SConstExpr *self,
-    struct VSchema const *schema, int16_t *i16, uint32_t capacity );
-rc_t SConstExprResolveAsI32 ( const SConstExpr *self,
-    struct VSchema const *schema, int32_t *i32, uint32_t capacity );
-rc_t SConstExprResolveAsI64 ( const SConstExpr *self,
-    struct VSchema const *schema, int64_t *i64, uint32_t capacity );
-rc_t SConstExprResolveAsU8 ( const SConstExpr *self,
-    struct VSchema const *schema, uint8_t *u8, uint32_t capacity );
-rc_t SConstExprResolveAsU16 ( const SConstExpr *self,
-    struct VSchema const *schema, uint16_t *u16, uint32_t capacity );
-rc_t SConstExprResolveAsU32 ( const SConstExpr *self,
-    struct VSchema const *schema, uint32_t *u32, uint32_t capacity, Vector *cx_bind );
-rc_t SConstExprResolveAsU64 ( const SConstExpr *self,
-    struct VSchema const *schema, uint32_t *u64, uint32_t capacity );
-rc_t SConstExprResolveAsF32 ( const SConstExpr *self,
-    struct VSchema const *schema, float *f32, uint32_t capacity );
-rc_t SConstExprResolveAsF64 ( const SConstExpr *self,
-    struct VSchema const *schema, double *f64, uint32_t capacity );
-rc_t SConstExprResolveAsAscii ( const SConstExpr *self,
-    struct VSchema const *schema, char *ascii, size_t capacity );
-rc_t SConstExprResolveAsUTF8 ( const SConstExpr *self,
-    struct VSchema const *schema, char *utf8, size_t bytes );
-rc_t SConstExprResolveAsUTF16 ( const SConstExpr *self,
-    struct VSchema const *schema, uint16_t *utf16, uint32_t capacity );
-rc_t SConstExprResolveAsUTF32 ( const SConstExpr *self,
-    struct VSchema const *schema, uint32_t *utf32, uint32_t capacity );
-
-
-/*--------------------------------------------------------------------------
- * SSymExpr
- *  holds a symbolic object reference
- *  used for productions and columns and indirect constants
- *  the productions and columns may be forward declarations,
- *  in which case the symbol will point to NULL when dereferenced.
- */
-typedef struct SSymExpr SSymExpr;
-struct SSymExpr
-{
-    SExpression dad;
-    struct KSymbol const *_sym;
-    bool alt;
-};
-
-/* Make
- *  used when creating implicit expressions
- */
-rc_t SSymExprMake ( const SExpression **xp,
-    struct KSymbol const *sym, uint32_t var );
-
-/* Mark
- */
-void SSymExprMark ( const SSymExpr *self, struct VSchema const *schema );
-
-
-/*--------------------------------------------------------------------------
- * SFuncExpr
- *  gathers schema, factory and functional parameter expressions
- *  locates and dereferences function or script by name and version
- */
-typedef struct SFuncExpr SFuncExpr;
-struct SFuncExpr
-{
-    SExpression dad;
-
-    /* some sort of expression */
-    struct SFunction const *func;
-
-    /* schema type and constant params */
-    Vector schem;
-
-    /* factory params */
-    Vector pfact;
-
-    /* function params */
-    Vector pfunc;
-
-    /* requested version */
-    uint32_t version;
-    bool version_requested;
-
-    /* for purposes of obtaining column info
-       in the absence of metadata */
-    bool untyped;
-};
-
-/* Mark
- */
-void SFuncExprMark ( const SFuncExpr *self, struct VSchema const *schema );
-
-
-/*--------------------------------------------------------------------------
- * SPhysEncExpr
- *  
- */
-typedef struct SPhysEncExpr SPhysEncExpr;
-struct SPhysEncExpr
-{
-    SExpression dad;
-
-    /* physical encoding */
-    struct SPhysical const *phys;
-
-    /* schema type and constant params */
-    Vector schem;
-
-    /* factory params */
-    Vector pfact;
-
-    /* requested version */
-    uint32_t version;
-    bool version_requested;
-};
-
-/* ImplicitPhysEncExpr
- *  create expression object
- */
-rc_t VSchemaImplicitPhysEncExpr ( VSchema *self, VTypedecl *td,
-    const SExpression **expr, const char *text, const char *ctx );
-
-/* Mark
- */
-void SPhysEncExprMark ( const SPhysEncExpr *self,
-    struct VSchema const *schema );
-
-
-/*--------------------------------------------------------------------------
- * SUnaryExpr
- *  applies a unary expression to further
- */
-typedef struct SUnaryExpr SUnaryExpr;
-struct SUnaryExpr
-{
-    SExpression dad;
-    const SExpression *expr;
-};
-
-
-/*--------------------------------------------------------------------------
- * SBinExpr
- *  connects two expression by means of an operator
- *  the operator is implicit in expression variant
- *
- *  e.g. eCastExpr where left = STypeExpr, right = SExpression
- */
-typedef struct SBinExpr SBinExpr;
-struct SBinExpr
-{
-    SExpression dad;
-    const SExpression *left;
-    const SExpression *right;
-};
-
-
-/*--------------------------------------------------------------------------
- * SVectExpr
- *  gathers multiple expressions connect by means of an operator
- *  the operator is implicit in expression variant
- *
- *  e.g. eCondExpr where operator is '|', or
- *  a constant vector where the operator is ','
- */
-typedef struct SVectExpr SVectExpr;
-struct SVectExpr
-{
-    SExpression dad;
-    Vector expr;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_schema_expr_ */
diff --git a/libs/vdb/schema-func.c b/libs/vdb/schema-func.c
deleted file mode 100644
index 6ac7563..0000000
--- a/libs/vdb/schema-func.c
+++ /dev/null
@@ -1,1657 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include "schema-priv.h"
-#include "schema-parse.h"
-#include "schema-expr.h"
-#include "schema-dump.h"
-
-#include <klib/symbol.h>
-#include <klib/symtab.h>
-#include <klib/out.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * SIndirectConst
- *  a parameterized constant
- */
-#if SLVL >= 3
-
-/* Whack
- */
-void CC SIndirectConstWhack ( void *item, void *ignore )
-{
-    SIndirectConst * self = item;
-    SExpressionWhack ( self -> td );
-    free ( self );
-}
-
-/* Mark
- */
-void CC SIndirectConstMark ( void * item, void * data )
-{
-    const SIndirectConst * self = item;
-    if ( self != NULL )
-        SExpressionMark ( ( void* ) self -> td, data );
-}
-
-/* Dump
- *  dump "const", dump object
- */
-rc_t SIndirectConstDump ( const SIndirectConst *self, struct SDumper *d )
-{
-    return KSymbolDump ( self != NULL ? self -> name : NULL, d );
-}
-
-bool CC SIndirectConstDefDump ( void *item, void *data )
-{
-    SDumper *b = data;
-    const SIndirectConst *self = ( const void* ) item;
-
-    /* check for this being a function */
-    if ( self -> td == NULL )
-        b -> rc = SDumperPrint ( b, "function %N", self -> name );
-    else
-        b -> rc = SDumperPrint ( b, "%E %N", self -> td, self -> name );
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-#endif
-
-/*--------------------------------------------------------------------------
- * SIndirectType
- */
-#if SLVL >= 3
-
-/* Whack
- */
-void CC SIndirectTypeWhack ( void *item, void *ignore )
-{
-    free ( item );
-}
-
-
-/* Find
- */
-SIndirectType *VSchemaFindITypeid ( const VSchema *self, uint32_t id )
-{
-    SIndirectType *pt = VectorGet ( & self -> pt, id );
-    while ( pt == NULL )
-    {
-        self = self -> dad;
-        if ( self == NULL )
-            break;
-        pt = VectorGet ( & self -> pt, id );
-    }
-    return pt;
-}
-
-
-/* Dump
- */
-rc_t SIndirectTypeDump ( const SIndirectType *self, struct SDumper *d )
-{
-    return KSymbolDump ( self != NULL ? self -> name : NULL, d );
-}
-
-#endif
-
-/*--------------------------------------------------------------------------
- * SFormParamlist
- */
-#if SLVL >= 3
-
-/* Whack
- */
-void SFormParmlistWhack ( SFormParmlist *self, void ( CC * pwhack ) ( void*, void* ) )
-{
-    VectorWhack ( & self -> parms, pwhack, NULL );
-}
-
-
-/* Mark
- */
-void SFormParmlistMark ( const SFormParmlist *self,
-    void ( CC * mark ) ( void*, void* ), const VSchema *schema )
-{
-    if ( self != NULL )
-        VectorForEach ( & self -> parms, false, mark, ( void* ) schema );
-}
-
-
-/* Dump
- *  dump param list
- */
-rc_t SFormParamlistDump ( const SFormParmlist *self, SDumper *b,
-    bool ( CC * dump ) ( void*, void* ),
-    const char *begin, const char *end, const char *empty )
-{
-    rc_t rc;
-    void *item;
-    uint32_t i, parm_cnt = VectorLength ( & self -> parms );
-    bool compact = SDumperMode ( b ) == sdmCompact ? true : false;
-
-    /* if the guy has no specific parameters */
-    if ( parm_cnt == 0 )
-    {
-        if ( self -> vararg )
-            return SDumperPrint ( b, "%s...%s", begin, end );
-        return SDumperPrint ( b, empty );
-    }
-
-    /* print mandatory params */
-    SDumperSepString ( b, begin );
-    for ( rc = 0, i = 0; i < ( uint32_t ) self -> mand; ++ i )
-    {
-        item = VectorGet ( & self -> parms, i );
-        rc = SDumperSep ( b );
-        if ( rc == 0 && ( * dump ) ( item, b ) )
-            rc = b -> rc;
-        SDumperSepString ( b, compact ? "," : ", " );
-    }
-    if ( rc != 0 )
-        return rc;
-
-    if ( i != 0 )
-        SDumperSepString ( b, compact ? "*" : " * " );
-    else
-    {
-        /* issue "begin" */
-        rc = SDumperSep ( b );
-        if ( rc != 0 )
-            return rc;
-
-        SDumperSepString ( b, compact ? "*" :  "* " );
-    }
-
-    /* print optional params */
-    for ( ; i < parm_cnt; ++ i )
-    {
-        item = VectorGet ( & self -> parms, i );
-        rc = SDumperSep ( b );
-        if ( rc == 0 && ( * dump ) ( item, b ) )
-            rc = b -> rc;
-        SDumperSepString ( b, compact ? "," : ", " );
-    }
-    if ( rc != 0 )
-        return rc;
-
-    /* print optional vararg */
-    if ( self -> vararg )
-        return SDumperPrint ( b, compact ? ",...%s" : ", ...%s", end );
-
-    /* close */
-    return SDumperPrint ( b, end );
-}
-
-#endif
-
-/*--------------------------------------------------------------------------
- * SFunction
- */
-
-#if SLVL >= 3
-
-/* Whack
- */
-void SFunctionDestroy ( SFunction *self )
-{
-    SExpressionWhack ( self -> rt );
-#if SLVL >= 4
-    if ( self -> script )
-    {
-        SExpressionWhack ( self -> u . script . rtn );
-        VectorWhack ( & self -> u . script . prod, SProductionWhack, NULL );
-    }
-#endif
-    BSTreeWhack ( & self -> sscope, KSymbolWhack, NULL );
-    BSTreeWhack ( & self -> fscope, KSymbolWhack, NULL );
-    SFormParmlistWhack ( & self -> fact, SIndirectConstWhack );
-    SFormParmlistWhack ( & self -> func, SProductionWhack );
-    VectorWhack ( & self -> type, NULL, NULL );
-    VectorWhack ( & self -> schem, SIndirectConstWhack, NULL );
-}
-
-void CC SFunctionWhack ( void *self, void *ignore )
-{
-    SFunctionDestroy ( self );
-    free ( self );
-}
-
-/* Cmp
- * Sort
- */
-int64_t CC SFunctionCmp ( const void *item, const void *n )
-{
-    const uint32_t *a = item;
-    const SFunction *b = n;
-
-    if ( * a > b -> version )
-        return 1;
-    return ( int64_t ) ( * a >> 24 ) - ( int64_t ) ( b -> version >> 24 );
-}
-
-int64_t CC SFunctionSort ( const void *item, const void *n )
-{
-    const SFunction *a = item;
-    const SFunction *b = n;
-
-    return ( int64_t ) ( a -> version >> 24 ) - ( int64_t ) ( b -> version >> 24 );
-}
-
-#if _DEBUGGING && 0
-static String no_name = { "<no-name>", sizeof "<no-name>" - 1, sizeof "<no-name>" - 1 };
-#define DBG_CXBIND1( op, name, id, val ) \
-    OUTMSG (( "%s:%d - cx_bind %s: name=%S, id=%u, val=%p\n", __func__, __LINE__, op, & name, id, val ))
-#define DBG_CXBIND2( op, name, id, old, new ) \
-    OUTMSG (( "%s:%d - cx_bind %s: name=%S, id=%u, old=%p, new=%p\n", __func__, __LINE__, op, & name, id, old, new ))
-#else
-#define DBG_CXBIND1( op, name, id, val ) \
-    ( ( void ) 0 )
-#define DBG_CXBIND2( op, name, id, old, new ) \
-    ( ( void ) 0 )
-#endif
-
-/* Bind
- *  perform schema and factory param substitution
- *  returns prior param values
- *
- *  9/11/13
- *  "self" is a cursor-local cloned version of schema decl
- */
-rc_t SFunctionBindSchemaParms ( const SFunction *self,
-    Vector *prior, const Vector *subst, Vector *cx_bind )
-{
-    rc_t rc = 0;
-
-    uint32_t i, count;
-    void *cx_old, *cx_new;
-
-    const SIndirectType *id;
-    const SIndirectConst *ic;
-
-    /* count input params
-       the first bunch are types
-       the remainder are constants */
-    count = VectorLength ( subst );
-
-    /* initialize return value
-       the prior values act as a stack for recursion */
-    VectorInit ( prior, 0, count );
-
-    /* determine total schema params */
-    i = VectorLength ( & self -> type ) + VectorLength ( & self -> schem );
-
-    /* param counts must match */
-    if ( count < i )
-        rc = RC ( rcVDB, rcFunction, rcEvaluating, rcParam, rcInsufficient );
-    else if ( count > i )
-        rc = RC ( rcVDB, rcFunction, rcEvaluating, rcParam, rcExcessive );
-    if ( rc != 0 )
-    {
-        PLOGERR ( klogWarn, ( klogWarn, rc,
-                 "schema parameter count mismatch - function: '$(f)'; expected $(i), received $(count)",
-                 "f=%.*s,count=%u,i=%u",
-                 self -> name -> name . size, self -> name -> name . addr,
-                 count, i ));
-        return rc;
-    }
-
-    /* bind types */
-    count = VectorLength ( & self -> type );
-    for ( i = 0; i < count; ++ i )
-    {
-        /* get the indirect type object */
-        id = VectorGet ( & self -> type, i );
-        assert ( id != NULL );
-
-        /* get the new type expression */
-        cx_new = VectorGet ( subst, id -> pos );
-        assert ( cx_new != NULL );
-
-        /* update the binding vector */
-        rc = VectorSwap ( cx_bind, id -> type_id, cx_new, & cx_old );
-        if ( rc != 0 )
-            break;
-        DBG_CXBIND2 ( "bind schema type", id -> name -> name, id -> type_id, cx_old, cx_new );
-
-        /* save old value on stack for recursion */
-        rc = VectorSet ( prior, id -> pos, cx_old );
-        if ( rc != 0 )
-        {
-            cx_new = cx_old;
-            VectorSwap ( cx_bind, id -> type_id, cx_new, & cx_old );
-            DBG_CXBIND2 ( "revert bind type", id -> name -> name, id -> type_id, cx_old, cx_new );
-            break;
-        }
-    }
-
-    /* bind constants */
-    if ( rc == 0 )
-    {
-        count = VectorLength ( & self -> schem );
-        for ( i = 0 ; i < count; ++ i )
-        {
-            ic = VectorGet ( & self -> schem, i );
-            assert ( ic != NULL );
-
-            /* get the new constant value expression */
-            cx_new = VectorGet ( subst, ic -> pos );
-            assert ( cx_new != NULL );
-
-            /* update the binding vector */
-            rc = VectorSwap ( cx_bind, ic -> expr_id, cx_new, & cx_old );
-            if ( rc != 0 )
-                break;
-            DBG_CXBIND2 ( "bind schema const", ic -> name -> name, ic -> expr_id, cx_old, cx_new );
-
-            /* save old value on stack for recursion */
-            rc = VectorSet ( prior, ic -> pos, cx_old );
-            if ( rc != 0 )
-            {
-                cx_new = cx_old;
-                VectorSwap ( cx_bind, ic -> expr_id, cx_new, & cx_old );
-                DBG_CXBIND2 ( "revert bind const", ic -> name -> name, ic -> expr_id, cx_old, cx_new );
-                break;
-            }
-        }
-
-        /* if there was no error, we're done */
-        if ( rc == 0 )
-            return 0;
-
-        /* reverse the damage done by binding constants */
-        while ( i -- > 0 )
-        {
-            ic = VectorGet ( & self -> schem, i );
-            assert ( ic != NULL );
-
-            /* get the old constant value expression */
-            cx_new = VectorGet ( prior, ic -> pos );
-            assert ( cx_new != NULL );
-
-            /* restore the binding vector */
-            VectorSwap ( cx_bind, ic -> expr_id, cx_new, & cx_old );
-            DBG_CXBIND2 ( "revert bind const", ic -> name -> name, ic -> expr_id, cx_old, cx_new );
-        }
-
-        /* reset i */
-        i = VectorLength ( & self -> type );
-    }
-
-    /* reverse the damage done by binding types */
-    while ( i -- > 0 )
-    {
-        /* get the indirect type object */
-        id = VectorGet ( & self -> type, i );
-        assert ( id != NULL );
-
-        /* get the old type expression */
-        cx_new = VectorGet ( prior, id -> pos );
-        assert ( cx_new != NULL );
-
-        /* restore the binding vector */
-        VectorSwap ( cx_bind, id -> type_id, cx_new, & cx_old );
-        DBG_CXBIND2 ( "revert bind type", id -> name -> name, id -> type_id, cx_old, cx_new );
-    }
-
-    /* a non-zero rc indicates the Vector is invalid */
-    VectorWhack ( prior, NULL, NULL );
-    return rc;
-}
-
-rc_t SFunctionBindFactParms ( const SFunction *self,
-    Vector *parms, Vector *prior, const Vector *subst, Vector *cx_bind )
-{
-    rc_t rc = 0;
-    SIndirectConst *ic;
-    void *cx_old, *cx_new;
-    uint32_t i, /*count,*/ act_count, form_count;
-
-    /* count input params */
-    /*count =*/ act_count = VectorLength ( subst );
-
-    /* must have minimum count */
-    if ( act_count < self -> fact . mand )
-    {
-        rc =  RC ( rcVDB, rcFunction, rcEvaluating, rcParam, rcInsufficient );
-        PLOGERR ( klogWarn, ( klogWarn, rc,
-                   "missing mandatory factory parameters - function: '$(func)'; expected $(mand), received $(count)",
-                   "func=%.*s,mand=%u,count=%u",
-                   self -> name -> name . size, self -> name -> name . addr,
-                   self -> fact . mand, act_count ));
-        return rc;
-    }
-
-    /* test against maximum count */
-    form_count = VectorLength ( & self -> fact . parms );
-    if ( act_count > form_count )
-    {
-        if ( ! self -> fact . vararg )
-        {
-            rc = RC ( rcVDB, rcFunction, rcEvaluating, rcParam, rcExcessive );
-            PLOGERR ( klogWarn, ( klogWarn, rc,
-                       "extra factory parameters - function: '$(func)'; expected $(mand), received $(count)",
-                       "func=%.*s,mand=%u,count=%u",
-                       self -> name -> name . size, self -> name -> name . addr,
-                       form_count, act_count ));
-            return rc;
-        }
-        /*count = form_count;*/
-    }
-
-    /* initialize return values
-       the "parms" vector is a positional vector of expressions,
-       and is the only way to get at varargs.
-       the prior values act as a stack for recursion */
-    VectorInit ( parms, 0, act_count );
-    VectorInit ( prior, 0, form_count );
-
-    /* bind actual formal parameter values */
-    for ( i = 0; i < form_count && i < act_count; ++ i )
-    {
-        /* get the indirect constant object */
-        ic = VectorGet ( & self -> fact . parms, i );
-        assert ( ic != NULL );
-
-        /* get the new value expression */
-        assert ( ic -> pos == i );
-        cx_new = VectorGet ( subst, i );
-        assert ( cx_new != NULL );
-
-        /* update the positional vector */
-        rc = VectorAppend ( parms, NULL, cx_new );
-        if ( rc != 0 )
-            break;
-
-        /* update the binding vector */
-        rc = VectorSwap ( cx_bind, ic -> expr_id, cx_new, & cx_old );
-        if ( rc != 0 )
-            break;
-        DBG_CXBIND2 ( "bind fact const", ic -> name -> name, ic -> expr_id, cx_old, cx_new );
-
-        /* save the old value on stack for recursion */
-        rc = VectorSet ( prior, i, cx_old );
-        if ( rc != 0 )
-        {
-            cx_new = cx_old;
-            VectorSwap ( cx_bind, ic -> expr_id, cx_new, & cx_old );
-            DBG_CXBIND2 ( "revert bind const", ic -> name -> name, ic -> expr_id, cx_old, cx_new );
-            break;
-        }
-    }
-
-    if ( rc == 0 )
-    {
-        /* this loop should only actually execute
-           to record missing optional formals */
-        assert ( i == form_count || ( i == act_count && act_count < form_count ) );
-
-        /* record optional formal parameter values */
-        for ( ; i < form_count; ++ i )
-        {
-            /* get the indirect constant object */
-            ic = VectorGet ( & self -> fact . parms, i );
-            assert ( ic != NULL );
-
-            /* get the new value expression */
-            assert ( ic -> pos == i );
-            cx_new = VectorGet ( subst, i );
-
-            /* save the same value on stack for recursion */
-            rc = VectorSet ( prior, i, cx_new );
-            if ( rc != 0 )
-                break;
-
-            DBG_CXBIND1 ( "ignore optional fact const", ic -> name -> name, ic -> expr_id, cx_new );
-        }
-    }
-
-    if ( rc == 0 )
-    {
-        /* this loop should only actually execute
-           to record vararg params beyond all formals */
-        assert ( i == form_count );
-
-        /* set vararg values */
-        for ( ; i < act_count; ++ i )
-        {
-            /* get the extra value expression */
-            cx_new = VectorGet ( subst, i );
-            assert ( cx_new != NULL );
-
-            /* update the positional vector */
-            rc = VectorAppend ( parms, NULL, cx_new );
-            if ( rc != 0 )
-                break;
-
-            DBG_CXBIND1 ( "vararg fact const", no_name, 0, cx_new );
-        }
-
-        if ( rc == 0 )
-            return 0;
-
-        i = form_count;
-    }
-
-    while ( i -- > 0 )
-    {
-        /* get the indirect type object */
-        ic = VectorGet ( & self -> fact . parms, i );
-        assert ( ic != NULL );
-
-        /* get the old type expression */
-        cx_new = VectorGet ( subst, ic -> pos );
-        assert ( cx_new != NULL );
-
-        /* restore the binding vector */
-        VectorSwap ( cx_bind, ic -> expr_id, cx_new, & cx_old );
-        DBG_CXBIND2 ( "revert bind const", ic -> name -> name, ic -> expr_id, cx_old, cx_new );
-    }
-    
-    VectorWhack ( parms, NULL, NULL ); 
-    VectorWhack ( prior, NULL, NULL );
-
-    return rc;
-}
-
-/* Rest-ore
- *  restore schema and factory param substitution
- *  destroys prior param vector
- */
-void SFunctionRestSchemaParms ( const SFunction *self, Vector *prior, Vector *cx_bind )
-{
-    rc_t rc;
-    uint32_t i, count;
-    void * cx_old, * ignore;
-
-    /* must have whole thing in prior */
-    assert ( VectorLength ( prior ) == VectorLength ( & self -> type ) + VectorLength ( & self -> schem ) );
-
-    /* restore prior values */
-    count = VectorLength ( & self -> type );
-    for ( i = 0; i < count; ++ i )
-    {
-        /* get the indirect type object */
-        const SIndirectType *id = VectorGet ( & self -> type, i );
-        assert ( id != NULL );
-
-        /* get the old type expression */
-        cx_old = VectorGet ( prior, id -> pos );
-
-        /* update the binding vector */
-        rc = VectorSwap ( cx_bind, id -> type_id, cx_old, & ignore );
-        assert ( rc == 0 );
-
-        DBG_CXBIND2 ( "restore bind type", id -> name -> name, id -> type_id, ignore, cx_old );
-    }
-
-    count = VectorLength ( & self -> schem );
-    for ( i = 0; i < count; ++ i )
-    {
-        const SIndirectConst *ic = VectorGet ( & self -> schem, i );
-        assert ( ic != NULL );
-
-        /* get the old constant value expression */
-        cx_old = VectorGet ( prior, ic -> pos );
-
-        /* restore the binding vector */
-        rc = VectorSwap ( cx_bind, ic -> expr_id, cx_old, & ignore );
-        assert ( rc == 0 );
-
-        DBG_CXBIND2 ( "restore bind const", ic -> name -> name, ic -> expr_id, ignore, cx_old );
-    }
-
-    VectorWhack ( prior, NULL, NULL );
-}
-
-void SFunctionRestFactParms ( const SFunction *self, Vector *prior, Vector *cx_bind )
-{
-    rc_t rc;
-    uint32_t i, count;
-    void * cx_old, * ignore;
-
-    /* must have whole thing in prior */
-    assert ( VectorLength ( prior ) == VectorLength ( & self -> fact . parms ) );
-
-    /* restore prior values */
-    count = VectorLength ( & self -> fact . parms );
-    for ( i = 0; i < count; ++ i )
-    {
-        const SIndirectConst *ic = VectorGet ( & self -> fact . parms, i );
-        assert ( ic != NULL );
-
-        /* get the old constant value expression */
-        cx_old = VectorGet ( prior, ic -> pos );
-
-        /* restore the binding vector */
-        rc = VectorSwap ( cx_bind, ic -> expr_id, cx_old, & ignore );
-        assert ( rc == 0 );
-
-        DBG_CXBIND2 ( "restore bind const", ic -> name -> name, ic -> expr_id, ignore, cx_old );
-    }
-
-    VectorWhack ( prior, NULL, NULL );
-}
-
-
-/* Mark
- */
-void CC SFunctionClearMark ( void *item, void *ignore )
-{
-    SFunction *self = item;
-    self -> marked = false;
-}
-
-void CC SFunctionMark ( void * item, void * data )
-{
-    SFunction * self = item;
-    const VSchema * schema = data;
-    if ( self != NULL && ! self -> marked )
-    {
-        self -> marked = true;
-        SExpressionMark ( ( void * )self -> rt, data );
-        SFormParmlistMark ( & self -> fact, SIndirectConstMark, schema );
-        SFormParmlistMark ( & self -> func, SProductionMark, schema );
-        VectorForEach ( & self -> schem, false, SIndirectConstMark, data );
-
-        if ( self -> script )
-        {
-            SExpressionMark ( ( void * )self -> u . script . rtn, ( void * )schema );
-            VectorForEach ( & self -> u . script . prod, false, SProductionMark, data );
-        }
-    }
-}
-
-void SFuncNameMark ( const SNameOverload *self, const VSchema *schema )
-{
-    if ( self != NULL )
-    {
-        VectorForEach ( & self -> items, false, SFunctionMark, ( void * ) schema );
-    }
-}
-
-
-/* Dump
- */
-rc_t SFunctionDump ( const SFunction *self, struct SDumper *d )
-{
-    return FQNDump ( self != NULL ? self -> name : NULL, d );
-}
-
-rc_t SFunctionDeclDumpSchemaParms ( const SFunction *self, SDumper *b )
-{
-    bool compact = SDumperMode ( b ) == sdmCompact ? true : false;
-
-    /* this first part is weird, because the types and
-       constants are kept separately, although they were
-       specified in a single list */
-    uint32_t i, j, sparm_cnt = VectorLength ( & self -> type ) +
-        VectorLength ( & self -> schem );
-    if ( sparm_cnt == 0 )
-        return 0;
-
-    SDumperSepString ( b, compact ? "<" : "< " );
-    for ( i = j = 0; i < sparm_cnt; ++ i )
-    {
-        const SIndirectType *id = VectorGet ( & self -> type, i - j );
-        rc_t rc = SDumperSep ( b );
-        if ( rc != 0 )
-            return rc;
-        if ( id != NULL && id -> pos == i )
-            rc = SDumperPrint ( b, "type %N", id -> name );
-        else
-        {
-            const SIndirectConst *ic = VectorGet ( & self -> schem, j );
-            assert ( id == NULL || id -> pos > i );
-            if ( ic == NULL )
-                rc = SDumperWrite ( b, "NULL", 4 );
-            else
-                SIndirectConstDefDump ( ( void* ) ic, b );
-        }
-        if ( rc != 0 )
-            return rc;
-        SDumperSepString ( b, compact ? "," : ", " );
-    }
-
-    return SDumperPrint ( b, compact ? ">" : " > " );
-}
-
-rc_t SFunctionDeclDumpFactParms ( const SFunction *self, SDumper *b )
-{
-    if ( SDumperMode ( b ) == sdmCompact )
-        return SFormParamlistDump ( & self -> fact, b, SIndirectConstDefDump, "<", ">", "" );
-    return SFormParamlistDump ( & self -> fact, b, SIndirectConstDefDump, " < ", " >", "" );
-}
-
-bool CC SFunctionDeclDump ( void *item, void *data )
-{
-    SDumper *b = data;
-    const SFunction *self = ( const void* ) item;
-    const char *func_class = "extern";
-
-    bool compact = SDumperMode ( b ) == sdmCompact ? true : false;
-
-    if ( SDumperMarkedMode ( b ) && ! self -> marked )
-        return false;
-
-    if ( self -> script )
-        func_class = "schema";
-    else if ( self -> validate )
-        func_class = "validate";
-
-    /* a type of function */
-    b -> rc = SDumperPrint ( b, "%s function ", func_class );
-    if ( b -> rc == 0 )
-    {
-        if ( self -> untyped )
-            b -> rc = SDumperPrint ( b, compact ? "__untyped %N()" : "__untyped %N ()", self -> name );
-        else if ( self -> row_length )
-            b -> rc = SDumperPrint ( b, compact ? "__row_length %N()" : "__row_length %N ()", self -> name );
-        else
-        {
-            /* could have schema parameters */
-            b -> rc = SFunctionDeclDumpSchemaParms ( self, b );
-
-            /* a return type expression, followed by a function name */
-            if ( b -> rc == 0 )
-            {
-                if ( self -> validate )
-                    b -> rc = SDumperPrint ( b, "void %N", self -> name );
-                else
-                    b -> rc = SDumperPrint ( b, "%E %N", self -> rt, self -> name );
-            }
-
-            /* version should be given */
-            if ( b -> rc == 0 )
-                b -> rc = SDumperVersion ( b, self -> version );
-
-            /* factory parameters */
-            if ( b -> rc == 0 )
-                b -> rc = SFunctionDeclDumpFactParms ( self, b );
-
-            /* function parameters */
-            if ( b -> rc == 0 )
-            {
-                if ( compact )
-                    b -> rc = SFormParamlistDump ( & self -> func, b, SProductionDefDump, "(", ")", "()" );
-                else
-                    b -> rc = SFormParamlistDump ( & self -> func, b, SProductionDefDump, " ( ", " )", " ()" );
-            }
-        }
-    }
-
-    if ( b -> rc == 0 )
-    {
-#if SLVL >= 4
-        if ( self -> script )
-        {
-            if ( ! compact )
-                b -> rc = SDumperWrite ( b, "\n", 1 );
-            if ( b -> rc == 0 )
-                b -> rc = SFunctionBodyDump ( self, b );
-        }
-        else
-#endif
-        {
-            if ( self -> u . ext . fact != NULL )
-                b -> rc = SDumperPrint ( b, compact ? "=%N" : " = %N", self -> u . ext . fact );
-            if ( b -> rc == 0 )
-                b -> rc = SDumperPrint ( b, compact ? ";" : ";\n" );
-        }
-    }
-
-    if ( b -> rc == 0 )
-        b -> rc = AliasDump ( self -> name, b );
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-
-#endif
-
-
-/*--------------------------------------------------------------------------
- * VSchema
- */
-
-#if SLVL >= 3
-
-/*
- * formal-symbol     = ID
- */
-static
-rc_t formal_symbol ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env,  uint32_t id, const void *obj )
-{
-    rc_t rc;
-
-    /* allow symbol redefines in current scope only */
-    if ( t -> sym != NULL )
-    {
-        KTokenSourceReturn ( src, t );
-        next_shallow_token ( tbl, src, t, true );
-    }
-
-    /* must have a parameter name */
-    if ( t -> id != eIdent )
-        return KTokenExpected ( t, klogErr, "undefined identifier" );
-
-    /* create the symbol in current scope */
-    rc = KSymTableCreateSymbol ( tbl, & t -> sym, & t -> str, id, obj );
-    if ( rc != 0 )
-        KTokenRCExplain ( t, klogInt, rc );
-
-    return rc;
-}
-
-
-/*
- * param-formal       = [ 'control' ] <typespec> ID
- */
-static
-rc_t param_formal ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SFormParmlist *sig )
-{
-    rc_t rc;
-
-    /* create the factory formal parameter,
-       which is just a production awaiting an expr */
-    SProduction *param = malloc ( sizeof * param );
-    if ( param == NULL )
-    {
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-        return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    /* finish initialization */
-    memset ( param, 0, sizeof * param );
-
-    /* accept 'control' keyword */
-    if ( t -> id == kw_control )
-    {
-        param -> control = true;
-        next_token ( tbl, src, t );
-    }
-
-    /* if parsing v0 text, then this is a persisted
-       column schema. it will have only a formal param
-       name, but no type. substitute "any" */
-    if ( env -> schema_param_types_absent )
-    {
-        KTokenSourceReturn ( src, t );
-        CONST_STRING ( & t -> str, "any" );
-        t -> sym = KSymTableFindIntrinsic ( tbl, & t -> str );
-        assert ( t -> sym != NULL );
-        t -> id = t -> sym -> type;
-    }
-
-    /* should start off with a type */
-    rc = vardim_type_expr ( tbl, src, t, env, self, & param -> fd );
-    if ( rc != 0 )
-    {
-        free ( param );
-        return rc;
-    }
-
-    /* create a name */
-    rc = formal_symbol ( tbl, src, t, env, eFuncParam, param );
-    if ( rc != 0 )
-    {
-        SProductionWhack ( param, NULL );
-        return rc;
-    }
-    param -> name = t -> sym;
-
-    /* append to param list */
-    rc = VectorAppend ( & sig -> parms, & param -> cid . id, param );
-    if ( rc != 0 )
-    {
-        SProductionWhack ( param, NULL );
-        return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    next_token ( tbl, src, t );
-    return 0;
-}
-
-
-/*
- * fact-formals       = <fact-formal> [ ',' <fact-formals> ]
- * fact-formal        = <fact-typedecl> ID
- * fact-parmname      = ID
- */
-static
-rc_t fact_formal ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SFormParmlist *sig )
-{
-    rc_t rc;
-    SIndirectConst *param = malloc ( sizeof * param );
-    if ( param == NULL )
-    {
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-        return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    param -> td = NULL;
-    param -> expr_id = 0;
-
-#if ACCEPT_FUNCTION_AS_FACT_PARAM
-    /* type could be 'function' */
-    if ( t -> id == kw_function )
-        next_token ( tbl, src, t );
-
-    /* should be a typedecl */
-    else
-#endif
-    {
-        rc = type_expr ( tbl, src, t, env, self, & param -> td );
-        if ( rc != 0 )
-        {
-            free ( param );
-            return KTokenFailure ( t, klogErr, rc,
-#if ACCEPT_FUNCTION_AS_FACT_PARAM
-                                   "function or "
-#endif
-                                   "data type" );
-        }
-    }
-
-    /* get its name */
-    rc = formal_symbol ( tbl, src, t, env, eFactParam, param );
-    if ( rc != 0 )
-    {
-        SIndirectConstWhack ( param, NULL );
-        return rc;
-    }
-    param -> name = t -> sym;
-
-    /* store as a parameter */
-    rc = VectorAppend ( & sig -> parms, & param -> pos, param );
-    if ( rc != 0 )
-    {
-        SIndirectConstWhack ( param, NULL );
-        return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    /* set binding constant */
-    param -> expr_id = ++ self -> num_indirect;
-
-    next_token ( tbl, src, t );
-    return 0;
-}
-
-
-/*
- * formal-params     = <formal-param> [ ',' <formal-params> ]
- */
-static
-rc_t formal_params ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SFormParmlist *sig,
-    rc_t ( * formal_param ) ( KSymTable*, KTokenSource*, KToken*,
-        const SchemaEnv*, VSchema*, SFormParmlist* ) )
-{
-    while ( t -> sym != NULL || t -> id == eIdent )
-    {
-        rc_t rc = ( * formal_param ) ( tbl, src, t, env, self, sig );
-        if ( rc != 0 )
-            return rc;
-
-        if ( t -> id != eComma )
-            break;
-
-        next_token ( tbl, src, t );
-    }
-
-    return 0;
-}
-
-
-/*
- * formal-signature   = <formal-params> [ '*' <formal-params> ] [',' '...' ]
- *                    | '*' <formal-params> [',' '...' ]
- *                    | '...'
- */
-static
-rc_t formal_signature ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SFormParmlist *sig,
-    rc_t ( * formal_param ) ( KSymTable*, KTokenSource*, KToken*,
-        const SchemaEnv*, VSchema*, SFormParmlist* ) )
-{
-    /* read mandatory parameters */
-    rc_t rc = formal_params ( tbl, src, t, env, self, sig, formal_param );
-
-    /* remember the number of mandatory params seen */
-    sig -> mand = VectorLength ( & sig -> parms );
-
-    /* read optional parameters */
-    if ( rc == 0 && t -> id == eAsterisk )
-    {
-        next_token ( tbl, src, t );
-        rc = formal_params ( tbl, src, t, env, self, sig, formal_param );
-        if ( rc == 0 && VectorLength ( & sig -> parms ) == sig -> mand )
-            KTokenExpected ( t, klogWarn, "optional parameter" );
-    }
-
-    /* accept '...' */
-    if ( t -> id == eEllipsis )
-    {
-        /* but only if there was at least one real parameter */
-        if ( VectorLength ( & sig -> parms ) == 0 )
-        {
-            rc = RC ( rcVDB, rcSchema, rcParsing, rcParam, rcInsufficient );
-            return KTokenFailure ( t, klogErr, rc, "vararg parameter requires at least one real parameter" );
-        }
-
-        sig -> vararg = true;
-        next_token ( tbl, src, t );
-    }
-
-    return 0;
-}
-
-/*
- * parm-signature     = <parm-formals> [ '*' <parm-formals> ] [',' '...' ]
- *                    | '*' <parm-formals> [',' '...' ]
- *                    | '...'
- */
-static
-rc_t parm_signature ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SFormParmlist *sig )
-{
-    /* open list */
-    rc_t rc = expect ( tbl, src, t, eLeftParen, "(", true );
-    if ( rc != 0 )
-        return rc;
-
-    /* parse list */
-    rc = formal_signature ( tbl, src, t, env, self, sig, param_formal );
-    if ( rc != 0 )
-        return 0;
-
-    /* expect close */
-    return expect ( tbl, src, t, eRightParen, ")", true );
-}
-
-/*
- * fact-signature     = <fact-formals> [ '*' <fact-formals> ] [ ',' '...' ]
- *                    | '*' <fact-formals> [ ',' '...' ]
- *                    | '...'
- */
-rc_t fact_signature ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SFormParmlist *sig )
-{
-    /* open list */
-    rc_t rc = expect ( tbl, src, t, eLeftAngle, "<", true );
-    if ( rc != 0 )
-        return rc;
-
-    /* parse list */
-    rc = formal_signature ( tbl, src, t, env, self, sig, fact_formal );
-    if ( rc != 0 )
-        return rc;
-
-    /* expect close */
-    return expect ( tbl, src, t, eRightAngle, ">", true );
-}
-
-
-/*
- * schema-signature   = <schema-formals>
- * schema-formals     = <schema-formal> [ ',' <schema-formals> ]
- * schema-formal      = <schema-typedecl> ID
- * schema-parmname    = ID
- */
-rc_t schema_signature ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SFunction *sig )
-{
-    rc_t rc;
-
-    /* open list */
-    if ( t -> id != eLeftAngle )
-        return KTokenExpected ( t, klogErr, "<" );
-
-    /* gather schema parameters */
-    do
-    {
-        const SExpression *td;
-        const SDatatype *dt;
-
-        /* check parameter type */
-        switch ( next_token ( tbl, src, t ) -> id )
-        {
-        case kw_type:
-            td = NULL;
-            next_token ( tbl, src, t );
-            break;
-
-        case eDatatype:
-            dt = t -> sym -> u . obj;
-            if ( dt -> domain == ddUint )
-            {
-                /* evaluate the type expression */
-                rc = type_expr ( tbl, src, t, env, self, & td );
-                if ( rc != 0 )
-                    return KTokenFailure ( t, klogErr, rc, "unsigned integer datatype" );
-
-                /* the type should be totally resolved */
-                assert ( td != NULL && td -> var == eTypeExpr );
-                assert ( ( ( const STypeExpr* ) td ) -> resolved );
-                if ( ( ( const STypeExpr* ) td ) -> fd . td . dim == 1 )
-                    break;
-
-                SExpressionWhack ( td );
-                return KTokenExpected ( t, klogErr, "single dimensional unsigned integer datatype" );
-            }
-
-        default:
-            return KTokenExpected ( t, klogErr, "type keyword or unsigned integer datatype" );
-        }
-
-        /* get parameter name */
-        if ( t -> id != eIdent )
-        {
-            if ( td != NULL )
-                SExpressionWhack ( td );
-            return KTokenExpected ( t, klogErr, "parameter name" );
-        }
-
-        if ( td == NULL )
-        {
-            SIndirectType *formal = malloc ( sizeof * formal );
-            if ( formal == NULL )
-            {
-                rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-                return KTokenRCExplain ( t, klogInt, rc );
-            }
-
-            /* initialize to raw format,
-               undefined type, and no dimension */
-            formal -> type_id = 0;
-
-            /* create symbol */
-            rc = KSymTableCreateConstSymbol ( tbl, & formal -> name,
-                & t -> str, eSchemaType, formal );
-            if ( rc == 0 )
-            {
-                /* record positional */
-                rc = VectorAppend ( & sig -> type, & formal -> pos, formal );
-                if ( rc == 0 )
-                {
-                    void *ignore;
-
-                    /* record formal */
-                    rc = VectorAppend ( & self -> pt, & formal -> id, formal );
-                    if ( rc != 0 )
-                        VectorSwap ( & sig -> type, formal -> pos, NULL, & ignore );
-                    else
-                        formal -> pos += VectorLength ( & sig -> schem );
-                }
-            }
-            if ( rc != 0 )
-            {
-                free ( formal );
-                return KTokenRCExplain ( t, klogInt, rc );
-            }
-
-            formal -> type_id = ++ self -> num_indirect;
-        }
-        else
-        {
-            SIndirectConst *formal = malloc ( sizeof * formal );
-            if ( formal == NULL )
-            {
-                SExpressionWhack ( td );
-                rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-                return KTokenRCExplain ( t, klogInt, rc );
-            }
-
-            /* initialize with no value */
-            formal -> expr_id = 0;
-            formal -> td = td;
-
-            /* create symbol */
-            rc = KSymTableCreateConstSymbol ( tbl, & formal -> name,
-                & t -> str, eSchemaParam, formal );
-            if ( rc == 0 )
-            {
-                /* record formal */
-                rc = VectorAppend ( & sig -> schem, & formal -> pos, formal );
-                if ( rc == 0 )
-                    formal -> pos += VectorLength ( & sig -> type );
-            }
-            if ( rc != 0 )
-            {
-                SIndirectConstWhack ( formal, NULL );
-                return KTokenRCExplain ( t, klogInt, rc );
-            }
-
-            formal -> expr_id = ++ self -> num_indirect;
-        }
-    }
-    while ( next_token ( tbl, src, t ) -> id == eComma );
-
-    /* expect close */
-    return expect ( tbl, src, t, eRightAngle, ">", true );
-}
-
-static
-rc_t return_type_expr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SFunction *f )
-{
-    if ( f -> validate )
-        return expect ( tbl, src, t, kw_void, "void", true );
-    return vardim_type_expr ( tbl, src, t, env, self, & f -> rt );
-}
-
-
-static
-rc_t func_decl ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SFunction *f, uint32_t type )
-{
-    rc_t rc;
-
-    /* check for __untyped or __row_length function */
-    if ( t -> id == kw___untyped || t -> id == kw___row_length )
-    {
-        uint32_t sym_type;
-
-        /* can't be a script function */
-        if ( type == eScriptFunc )
-            return KTokenExpected ( t, klogErr, "script function return type" );
-
-        /* can't be a validate function */
-        if ( f -> validate )
-            return KTokenExpected ( t, klogErr, "void return type" );
-
-        /* determine variant */
-        if ( t -> id == kw___untyped )
-        {
-            f -> untyped = true;
-            sym_type = eUntypedFunc;
-        }
-        else
-        {
-            f -> row_length = true;
-            sym_type = eRowLengthFunc;
-        }
-
-        /* treat keyword as a NULL return type */
-        next_token ( tbl, src, t );
-
-        /* create function name */
-        rc = create_fqn ( tbl, src, t, env, sym_type, NULL );
-        if ( rc != 0 )
-        {
-            if ( GetRCState ( rc ) == rcExists )
-                return rc;
-            return KTokenFailure ( t, klogErr, rc, "fully qualified name" );
-        }
-
-        /* record symbol */
-        f -> name = t -> sym;
-        next_token ( tbl, src, t );
-
-        /* consume empty param list */
-        rc = expect ( tbl, src, t, eLeftParen, "(", true );
-        if ( rc == 0 )
-            rc = expect ( tbl, src, t, eRightParen, ")", true );
-        return rc;
-    }
-
-
-    /* initialize vectors */
-    VectorInit ( & f -> fact . parms, 0, 8 );
-    VectorInit ( & f -> func . parms, 0, 8 );
-    VectorInit ( & f -> type, 0, 8 );
-    VectorInit ( & f -> schem, 0, 8 );
-
-    /* get schema signature */
-    if ( t -> id == eLeftAngle )
-    {
-        /* enter schema param scope */
-        rc = KSymTablePushScope ( tbl, & f -> sscope );
-        if ( rc != 0 )
-            return KTokenRCExplain ( t, klogInt, rc );
-
-        /* parse schema params */
-        rc = schema_signature ( tbl, src, t, env, self, f );
-
-        /* interpret return type within schema param scope */
-        if ( rc == 0 )
-        {
-            rc = return_type_expr ( tbl, src, t, env, self, f );
-            if ( rc != 0 )
-                KTokenFailure ( t, klogErr, rc, "return type" );
-        }
-
-        /* pop scope */
-        KSymTablePopScope ( tbl );
-
-        /* bail on problems */
-        if ( rc != 0 )
-            return rc;
-
-        /* "t" contains a lookahead token. while unlikely,
-           it could have matched something defined in schema
-           param scope. re-evaluate if possible */
-        if ( t -> sym != NULL ) switch ( t -> sym -> type )
-        {
-        case eSchemaType:
-        case eSchemaParam:
-            t -> id = eIdent;
-            t -> sym = KSymTableFind ( tbl, & t -> str );
-            if ( t -> sym != NULL )
-                t -> id = t -> sym -> type;
-            break;
-        }
-    }
-    else
-    {
-        /* get return type within global scope */
-        rc = return_type_expr ( tbl, src, t, env, self, f );
-        if ( rc != 0 )
-            return KTokenFailure ( t, klogErr, rc, "return type" );
-    }
-
-    /* get function name */
-    rc = create_fqn ( tbl, src, t, env, type, NULL );
-    if ( rc != 0 ) switch ( GetRCState ( rc ) )
-    {
-    case rcExists:
-        break;
-    case rcUnexpected:
-        if ( type == 0 && t -> sym != NULL )
-        {
-            if ( t -> sym -> type == eFunction || t -> sym -> type == eScriptFunc )
-                break;
-        }
-    default:
-        return KTokenFailure ( t, klogErr, rc, "fully qualified name" );
-    }
-
-    /* record symbol - new or redefined */
-    f -> name = t -> sym;
-
-    /* get version */
-    if ( next_token ( tbl, src, t ) -> id == eHash )
-    {
-        bool allow_release = ( f -> name -> type != eFunction ) ? true : false;
-        next_token ( tbl, src, t );
-        rc = maj_min_rel ( tbl, src, t, env, self, & f -> version, allow_release );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* parse formal parameters - enter schema scope */
-    rc = KSymTablePushScope ( tbl, & f -> sscope );
-    if ( rc != 0 )
-        KTokenRCExplain ( t, klogInt, rc );
-    else
-    {
-        /* enter function scope */
-        rc = KSymTablePushScope ( tbl, & f -> fscope );
-        if ( rc != 0 )
-            KTokenRCExplain ( t, klogInt, rc );
-        else
-        {
-            /* gather factory parameters */
-            if ( t -> id == eLeftAngle )
-                rc = fact_signature ( tbl, src, t, env, self, & f -> fact );
-
-            /* gather function parameters */
-            if ( rc == 0 )
-                rc = parm_signature ( tbl, src, t, env, self, & f -> func );
-
-            /* leave function scope */
-            KSymTablePopScope ( tbl );
-        }
-
-        /* leave schema scope */
-        KSymTablePopScope ( tbl );
-    }
-
-    /* go a bit further */
-    if ( rc == 0 )
-    {
-        /* detect script body */
-        if ( t -> id == eLeftCurly )
-        {
-#if SLVL >= 4
-            /* if user already specified extern function
-               or if user specified vararg factory params */
-            if ( type == eFunction || f -> fact . vararg )
-#endif
-                return KTokenExpected ( t, klogErr, "; or =" );
-#if SLVL >= 4
-            /* if no type was specified */
-            if ( type == 0 )
-            {
-                /* if name was previously defined as a function */
-                if ( f -> name -> type == eFunction )
-                    return KTokenExpected ( t, klogErr, "; or =" );
-
-                /* name is either undefined or script - clobber to script */
-                ( ( KSymbol* ) f -> name ) -> type = eScriptFunc;
-            }
-
-            /* parse remainder as script function */
-            return script_body ( tbl, src, t, env, self, f );
-#endif
-        }
-
-        /* detect case where should be script but isn't */
-        if ( f -> name -> type == eScriptFunc )
-            return KTokenExpected ( t, klogErr, "{" );
-
-        /* definitely an extern function */
-        if ( type == 0 )
-            ( ( KSymbol* ) f -> name ) -> type = eFunction;
-
-        /* process factory spec */
-        if ( t -> id == eAssign )
-        {
-            /* get factory name */
-            next_token ( tbl, src, t );
-            rc = create_fqn ( tbl, src, t, env, eFactory, NULL );
-            if ( rc != 0 ) switch ( GetRCState ( rc ) )
-            {
-            case rcExists:
-                break;
-            case rcUnexpected:
-                if ( t -> sym != NULL && t -> sym -> type == eFunction )
-                    break;
-            default:
-                return rc;
-            }
-
-            f -> u . ext . fact = t -> sym;
-            next_token ( tbl, src, t );
-        }
-
-        /* expect a semicolon */
-        rc = expect ( tbl, src, t, eSemiColon, ";", true );
-    }
-
-    return rc;
-}
-
-static
-rc_t function_decl ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, uint32_t type, bool validate )
-{
-    rc_t rc;
-    void *ignore;
-
-    /* create object */
-    SFunction *f = malloc ( sizeof * f );
-    if ( f == NULL )
-    {
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-        return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    memset ( f, 0, sizeof * f );
-    f -> validate = validate;
-
-    /* parse function decl */
-    rc = func_decl ( tbl, src, t, env, self, f, type );
-
-    /* check validation functions for exactly two parameters */
-    if ( f -> validate && ( rc == 0 || GetRCState ( rc ) == rcExists ) )
-    {
-        if ( f -> func . mand != 2 ||
-             f -> func . vararg != 0 ||
-             VectorLength ( & f -> func . parms ) != 2 )
-        {
-            rc = RC ( rcVDB, rcSchema, rcParsing, rcFunction, rcInvalid );
-            KTokenRCExplain ( t, klogInt, rc );
-        }
-    }
-
-    if ( rc == 0 )
-    {
-        /* need an overloaded name entry */
-        SNameOverload *name = ( void* ) f -> name -> u . obj;
-        if ( name == NULL )
-        {
-            /* create name */
-            rc = SNameOverloadMake ( & name, f -> name, 0, 4 );
-            if ( rc == 0 )
-            {
-                /* insert it - it's allowed to be empty */
-                rc = VectorAppend ( & self -> fname, & name -> cid . id, name );
-                if ( rc != 0 )
-                    SNameOverloadWhack ( name, NULL );
-            }
-        }
-
-        /* now need to record function */
-        if ( rc == 0 )
-        {
-            /* assume it's new in this schema */
-            rc = VectorAppend ( & self -> func, & f -> id, f );
-            if ( rc == 0 )
-            {
-                /* insert into name overload and exit on success */
-                uint32_t idx;
-                rc = VectorInsertUnique ( & name -> items, f, & idx, SFunctionSort );
-                if ( rc == 0 )
-                    return 0;
-
-                /* expected failure is that a function already exists */
-                if ( GetRCState ( rc ) != rcExists )
-                    VectorSwap ( & self -> func, f -> id, NULL, & ignore );
-                else
-                {
-                    /* see if new function trumps old */
-                    SFunction *exist = VectorGet ( & name -> items, idx );
-                    if ( f -> version > exist -> version )
-                    {
-                        /* insert our function in name overload */
-                        VectorSwap ( & name -> items, idx, f, & ignore );
-
-                        /* if existing is in another schema... */
-                        if ( ( const void* ) name != exist -> name -> u . obj )
-                            return 0;
-
-                        /* need to swap with old */
-                        assert ( exist -> id >= VectorStart ( & self -> func ) );
-                        assert ( exist -> id < f -> id );
-                        VectorSwap ( & self -> func, f -> id, NULL, & ignore );
-                        VectorSwap ( & self -> func, f -> id = exist -> id, f, & ignore );
-                        f = exist;
-                    }
-
-                    /* exists is not an error */
-                    rc = 0;
-                }
-
-                VectorSwap ( & self -> func, f -> id, NULL, & ignore );
-            }
-        }
-    }
-    else if ( GetRCState ( rc ) == rcExists )
-    {
-        rc = 0;
-    }
-    
-    SFunctionWhack ( f, NULL );
-    return rc;
-}
-
-/*
- * function-decl      = 'function' <ext-func-decl> ';'
- *                    | 'function' <script-func-decl>
- */
-rc_t function_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    return function_decl ( tbl, src, t, env, self,
-        env -> script_function_called_schema ? eFunction : 0, false );
-}
-
-/*
- * extern-func        = 'extern' 'function' <ext-function-decl> ';'
- */
-rc_t extfunc_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    return function_decl ( tbl, src, t, env, self, eFunction, false );
-}
-
-/*
- * validate-func      = 'validate' 'function' <validate-function-decl> ';'
- */
-rc_t valfunc_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    return function_decl ( tbl, src, t, env, self, eFunction, true );
-}
-
-#endif /* SLVL >= 3 */
-
-
-#if SLVL >= 4
-
-/*
- * script-decl        = 'schema' [ 'function' ] <script-func-decl>
- */
-rc_t script_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    if ( t -> id == kw_function )
-        next_token ( tbl, src, t );
-
-    return function_decl ( tbl, src, t, env, self, eScriptFunc, false );
-}
-
-#endif /* SLVL >= 4 */
diff --git a/libs/vdb/schema-int.c b/libs/vdb/schema-int.c
deleted file mode 100644
index d0204cf..0000000
--- a/libs/vdb/schema-int.c
+++ /dev/null
@@ -1,376 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include "schema-priv.h"
-#include "schema-parse.h"
-
-#include <vdb/vdb-priv.h>
-#include <klib/symbol.h>
-#include <klib/symtab.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <byteswap.h>
-#include <assert.h>
-
-#define INTRINSIC_SUB_BYTE_MULTI_BIT_TYPES 0
-
-/* init_keywords
- *  create simple symbols with special ids
- */
-static
-rc_t init_keywords ( KSymTable *tbl )
-{
-    int i;
-    static struct
-    {
-        const char *keyword;
-        int id;
-    } kw [] =
-    {
-#define KEYWORD( word ) \
-        { # word, kw_ ## word }
-
-        KEYWORD ( alias ),
-        KEYWORD ( column ),
-        KEYWORD ( const ),
-        KEYWORD ( control ),
-        KEYWORD ( database ),
-        KEYWORD ( decode ),
-        KEYWORD ( default ),
-        KEYWORD ( encode ),
-        KEYWORD ( extern ),
-        KEYWORD ( false ),
-        KEYWORD ( fmtdef ),
-        KEYWORD ( function ),
-        KEYWORD ( include ),
-        KEYWORD ( index ),
-        KEYWORD ( limit ),
-        KEYWORD ( physical ),
-        KEYWORD ( read ),
-        KEYWORD ( readonly ),
-        KEYWORD ( return ),
-        KEYWORD ( schema ),
-        KEYWORD ( static ),
-        KEYWORD ( table ),
-        KEYWORD ( trigger ),
-        KEYWORD ( template ),
-        KEYWORD ( true ),
-        KEYWORD ( type ),
-        KEYWORD ( typedef ),
-        KEYWORD ( typeset ),
-        KEYWORD ( validate ),
-        KEYWORD ( version ),
-        KEYWORD ( view ),
-        KEYWORD ( virtual ),
-        KEYWORD ( void ),
-        KEYWORD ( writeonly ),
-        KEYWORD ( __untyped ),
-        KEYWORD ( __row_length ),
-        KEYWORD ( __no_header )
-
-#undef KEYWORD
-    };
-
-    /* define keywords */
-    for ( i = 0; i < sizeof kw / sizeof kw [ 0 ]; ++ i )
-    {
-        rc_t rc;
-
-        String name;
-        StringInitCString ( & name, kw [ i ] . keyword );
-        rc = KSymTableCreateSymbol ( tbl, NULL, & name, kw [ i ] . id, NULL );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    return 0;
-}
-
-
-/* byte swapping */
-static
-void byte_swap_16 ( void *dst, const void *src, uint64_t count )
-{
-    uint16_t *d = dst;
-    const uint16_t *s = src;
-
-    uint64_t i;
-    for ( i = 0; i < count; ++ i )
-        d [ i ] = bswap_16 ( s [ i ] );
-}
-
-static
-void byte_swap_32 ( void *dst, const void *src, uint64_t count )
-{
-    uint32_t *d = dst;
-    const uint32_t *s = src;
-
-    uint64_t i;
-    for ( i = 0; i < count; ++ i )
-        d [ i ] = bswap_32 ( s [ i ] );
-}
-
-static
-void byte_swap_64 ( void *dst, const void *src, uint64_t count )
-{
-    uint64_t *d = dst;
-    const uint64_t *s = src;
-
-    uint64_t i;
-    for ( i = 0; i < count; ++ i )
-        d [ i ] = bswap_64 ( s [ i ] );
-}
-
-#if SUPPORT_128_BIT
-static
-void byte_swap_128 ( void *dst, const void *src, uint64_t count )
-{
-    uint64_t i;
-    uint64_t *d = dst;
-    const uint64_t *s = src;
-
-    if ( ( const uint64_t* ) d != s )
-    {
-        for ( count += count, i = 0; i < count; i += 2 )
-        {
-            d [ i + 0 ] = bswap_64 ( s [ i + 1 ] );
-            d [ i + 1 ] = bswap_64 ( s [ i + 0 ] );
-        }
-    }
-    else
-    {
-        for ( count += count, i = 0; i < count; i += 2 )
-        {
-            uint64_t tmp = bswap_64 ( s [ i + 0 ] );
-            d [ i + 0 ] = bswap_64 ( s [ i + 1 ] );
-            d [ i + 1 ] = tmp;
-        }
-    }
-}
-#endif
-
-
-/* InitTypes
- *  set up intrinsic types
- */
-static
-rc_t VSchemaInitTypes ( VSchema *self, KSymTable *tbl )
-{
-    int i;
-    static struct
-    {
-        const char *newtype;
-        const char *supertype;
-        void ( * byte_swap ) ( void *dst, const void *src, uint64_t count );
-        uint8_t dim;
-        uint8_t domain;
-    } dt [] =
-    {
-        { "any", NULL, NULL, 1, 0 },
-        { "void", NULL, NULL, 1, 0 },
-        { "opaque", NULL, NULL, 1, 0 },
-
-        /* bundles of bits in machine native order */
-        { "B1", "opaque", NULL, 1, ddUint },
-        { "B8", "opaque", NULL, 8, ddUint },
-        { "B16", "opaque", byte_swap_16, 16, ddUint },
-        { "B32", "opaque", byte_swap_32, 32, ddUint },
-        { "B64", "opaque", byte_swap_64, 64, ddUint },
-
-        /* the basic unsigned integer types */
-        { "U1", "B1", NULL, 1, ddUint },
-        { "U8", "B8", NULL, 1, ddUint },
-        { "U16", "B16", byte_swap_16, 1, ddUint },
-        { "U32", "B32", byte_swap_32, 1, ddUint },
-        { "U64", "B64", byte_swap_64, 1, ddUint },
-
-        /* the basic signed integer types */
-        { "I8", "B8", NULL, 1, ddInt },
-        { "I16", "B16", byte_swap_16, 1, ddInt },
-        { "I32", "B32", byte_swap_32, 1, ddInt },
-        { "I64", "B64", byte_swap_64, 1, ddInt },
-
-#if INTRINSIC_SUB_BYTE_MULTI_BIT_TYPES
-        /* all the basic bit tuples are subtypes
-           of opaque, making them essentially atomic,
-           required due to native byte order issues */
-        { "B2", "opaque", NULL, 2, ddUint },
-        { "B4", "opaque", NULL, 4, ddUint },
-        { "U2", "B2", NULL, 1, ddUint },
-        { "U4", "B4", NULL, 1, ddUint },
-        { "I4", "B4", NULL, 1, ddInt },
-#endif
-
-#if SUPPORT_128_BIT
-        /* 128 bit types */
-        { "B128", "opaque", byte_swap_128, 128, ddUint },
-        { "U128", "B128", byte_swap_128, 1, ddUint },
-        { "I128", "B128", byte_swap_128, 1, ddInt },
-#endif
-
-        /* floating point */
-        { "F32", "B32", byte_swap_32, 1, ddFloat },
-        { "F64", "B64", byte_swap_64, 1, ddFloat },
-
-        /* bool is typed to reflect C/C++ */
-        { "bool", "U8", NULL, 1, ddBool },
-
-        /* default character set is UNICODE */
-        { "utf8", "B8", NULL, 1, ddUnicode },
-        { "utf16", "B16", byte_swap_16, 1, ddUnicode },
-        { "utf32", "B32", byte_swap_32, 1, ddUnicode },
-
-        /* contrary to sub-classing, which extends/expands
-           a class, sub-typing refines it, making ASCII
-           a sub-type of UTF-8 in our system */
-        { "ascii", "utf8", NULL, 1, ddAscii }
-    };
-
-    for ( i = 0; i < sizeof dt / sizeof dt [ 0 ]; ++ i )
-    {
-        rc_t rc;
-        String name;
-        SDatatype *newtype;
-        const SDatatype *super = NULL;
-
-        if ( dt [ i ] . supertype != NULL )
-        {
-            KSymbol *sym;
-
-            /* find supertype in symbol table */
-            StringInitCString ( & name, dt [ i ] . supertype );
-            sym = KSymTableFind ( tbl, & name );
-            assert ( sym != NULL );
-            assert ( sym -> type == eDatatype );
-            super = sym -> u . obj;
-        }
-
-        /* create datatype */
-        newtype = malloc ( sizeof * newtype );
-        if ( newtype == NULL )
-            return RC ( rcVDB, rcSchema, rcConstructing, rcMemory, rcExhausted );
-
-        /* initialize datatype */
-        newtype -> super = super;
-        newtype -> byte_swap = dt [ i ] . byte_swap;
-        newtype -> size = ( ( super != NULL ) ? super -> size : 1 ) * dt [ i ] . dim;
-        newtype -> dim = dt [ i ] . dim;
-        newtype -> domain = dt [ i ] . domain;
-
-        /* just to cover any lazy programming, take byte_swap
-           from super-type if not already specified */
-        if ( super != NULL && newtype -> byte_swap == NULL )
-            newtype -> byte_swap = super -> byte_swap;
-
-        /* create symbol for new type */
-        StringInitCString ( & name, dt [ i ] . newtype );
-        newtype -> name = KSymTableFind ( tbl, & name );
-        assert ( newtype -> name == NULL || i == 1 );
-        if ( newtype -> name == NULL )
-            rc = KSymTableCreateConstSymbol ( tbl, & newtype -> name, & name, eDatatype, newtype );
-        else
-            rc = 0;
-
-        /* add datatype */
-        if ( rc == 0 )
-            rc = VectorAppend ( & self -> dt, & newtype -> id, newtype );
-
-        if ( rc != 0 )
-        {
-            free ( newtype );
-            return rc;
-        }
-    }
-
-    return 0;
-}
-
-
-/* MakeIntrinsic
- *  initialize intrinsics
- */
-rc_t VSchemaMakeIntrinsic ( VSchema **sp )
-{
-    rc_t rc = VSchemaMake ( sp, NULL );
-    if ( rc == 0 )
-    {
-        KSymTable tbl;
-        VSchema *self = * sp;
-
-        /* create symbol table with no intrinsic scope */
-        rc = KSymTableInit ( & tbl, NULL );
-        if ( rc == 0 )
-        {
-            /* make intrinsic scope modifiable */
-            KSymTablePushScope ( & tbl, & self -> scope );
-
-            /* add keywords, which are only names */
-            rc = init_keywords ( & tbl );
-            if ( rc == 0 )
-            {
-                /* TBD - init intrinsic formats */
-                rc = VSchemaInitTypes ( self, & tbl );
-                if ( rc == 0 )
-                {
-                    KSymTableWhack ( & tbl );
-                    return 0;
-                }
-            }
-
-            KSymTableWhack ( & tbl );
-        }
-
-        VSchemaRelease ( self );
-    }
-
-    * sp = NULL;
-
-    return rc;
-}
-
-/* LastIntrinsicTypeId - PRIVATE
- *  used to allow cast to intrinsics
- */
-LIB_EXPORT uint32_t CC VSchemaLastIntrinsicTypeId ( const VSchema *self )
-{
-    uint32_t last;
-    for ( last = 0; self != NULL; self = self -> dad )
-    {
-        if ( self -> dad == NULL )
-        {
-            last = VectorStart ( & self -> dt ) + VectorLength ( & self -> dt );
-            if ( last != 0 )
-                -- last;
-            break;
-        }
-    }
-
-    return last;
-}
diff --git a/libs/vdb/schema-parse.c b/libs/vdb/schema-parse.c
deleted file mode 100644
index 4ea920a..0000000
--- a/libs/vdb/schema-parse.c
+++ /dev/null
@@ -1,857 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include "schema-priv.h"
-#include "schema-expr.h"
-#include "schema-parse.h"
-#include "schema-dump.h"
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/mmap.h>
-#include <klib/symbol.h>
-#include <klib/symtab.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-
-/*--------------------------------------------------------------------------
- * SchemaEnv
- */
-
-/* Init - PRIVATE
- *  initialize to current version
- */
-static
-void SchemaEnvInitFeatures ( SchemaEnv *env )
-{
-    assert ( env != NULL );
-
-    switch ( env -> version >> 24 )
-    {
-    case 0:
-        env -> schema_param_types_absent = 1;
-        env -> mixed_fact_param_list = 1;
-        env -> script_function_called_schema = 1;
-        break;
-    case 1:
-        switch ( ( uint8_t ) ( env -> version >> 16 ) )
-        {
-        case 1:
-            env -> default_view_decl = 1;
-            env -> has_view_keyword = 1;
-            break;
-        }
-    }
-}
-
-void SchemaEnvInit ( SchemaEnv *env, uint32_t version )
-{
-    assert ( env != NULL );
-    memset ( env, 0, sizeof * env );
-
-    /* set version */
-    env -> version = version;
-    SchemaEnvInitFeatures ( env );
-}
-
-
-/*--------------------------------------------------------------------------
- * SConstant
- */
-#if SLVL >= 2
-
-/* Whack
- */
-void CC SConstantWhack ( void *item, void *ignore )
-{
-    SConstant *self = item;
-    SExpressionWhack ( self -> expr );
-    free ( self );
-}
-
-/* Mark
- */
-void CC SConstantClearMark ( void *item, void *ignore )
-{
-    SConstant *self = item;
-    self -> marked = false;
-}
-
-void SConstantMark ( const SConstant *cself )
-{
-    SConstant *self = ( SConstant* ) cself;
-    if ( self != NULL && ! self -> marked )
-        self -> marked = true;
-}
-
-/* Dump
- *  dump "const", dump object
- */
-rc_t SConstantDump ( const SConstant *self, struct SDumper *d )
-{
-    return FQNDump ( self != NULL ? self -> name : NULL, d );
-}
-
-bool CC SConstantDefDump ( void *item, void *data )
-{
-    SDumper *b = data;
-    const SConstant *self = ( const void* ) item;
-
-    if ( SDumperMarkedMode ( b ) && ! self -> marked )
-        return false;
-
-    if ( SDumperMode ( b ) == sdmCompact )
-    {
-        return SDumperPrint ( b, "const %T %N=%E;",
-            & self -> td, self -> name, self -> expr );
-    }
-
-    return SDumperPrint ( b, "const %T %N = %E;\n",
-        & self -> td, self -> name, self -> expr );
-}
-
-#endif
-
-
-/*--------------------------------------------------------------------------
- * VSchema
- */
-
-
-/* resolve_object
- *  generic object find
- *
- *  "td" [ OUT, NULL OKAY ] - returns cast type expression
- *  if given or "any" if not
- *
- *  "name" [ OUT ] - returns list of overloaded objects if found
- *
- *  "type" [ OUT ] - returns object type id, e.g.:
- *    eDatatype, eTypeset, eFormat, eFunction, ePhysical, eTable, ...
- *
- *  "expr" [ IN ] - NUL terminated name expression identifying object
- *
- *  "ctx" [ IN ] - NUL terminated context string for evaluation,
- *  substitutes for filename in logging reports
- *
- *  "dflt" [ IN ] - if true, resolve default value
- *
- *  returns principal object identified. if NULL but "name" is not
- *  NULL, then the object was only partially identified.
- */
-static
-int64_t CC SColumnSortByID ( const void **item, const void **n, void *ignore )
-{
-    const SColumn *a = * item;
-    const SColumn *b = * n;
-    return VCtxIdCmp ( & a -> cid, & b -> cid );
-}
-
-static
-void CC SColumnLastDefault ( void *item, void *data )
-{
-    const SColumn *self = ( const SColumn* ) item;
-    const SColumn **colp = ( const SColumn** ) data;
-
-    if ( self -> dflt || * colp == NULL )
-        * colp = self;
-}
-
-typedef struct column_best_fit_data column_best_fit_data;
-struct column_best_fit_data
-{
-    const SColumn *scol;
-    const VSchema *schema;
-    VTypedecl td;
-    uint32_t distance;
-};
-
-static
-void CC SColumnBestFit ( void *item, void *data )
-{
-    const SColumn *scol = ( const void * ) item;
-    if ( scol -> td . type_id != 0 )
-    {
-        uint32_t distance;
-        column_best_fit_data *pb = data;
-        if ( VTypedeclToTypedecl ( & scol -> td, pb -> schema, & pb -> td, NULL, & distance ) )
-        {
-            if ( pb -> scol == NULL || pb -> distance > distance )
-            {
-                pb -> scol = scol;
-                pb -> distance = distance;
-            }
-        }
-    }
-}
-
-const void *resolve_object ( const KSymTable *tbl,
-    const VSchema *self, VTypedecl *tdp, const SNameOverload **namep,
-     uint32_t *type, const char *expr, const char *ctx, bool dflt )
-{
-    rc_t rc;
-    const void *obj;
-    
-    VTypedecl td;
-    bool has_type = false;
-
-    KToken t;
-    KTokenText tt;
-    KTokenSource src;
-
-    SchemaEnv env;
-    SchemaEnvInit ( & env, EXT_SCHEMA_LANG_VERSION );
-
-    KTokenTextInitCString ( & tt, expr, ctx );
-    KTokenSourceInit ( & src, & tt );
-    next_token ( tbl, & src, & t );
-
-    /* initialize return values */
-    obj = NULL;
-
-    /* ready to go - can accept a typecast */
-    if ( t . id == eLeftParen )
-    {
-        has_type = true;
-        next_token ( tbl, & src, & t );
-        rc = typedecl ( tbl, & src, & t, & env, self, & td );
-        if ( rc == 0 )
-            rc = expect ( tbl, & src, & t, eRightParen, ")", true );
-        if ( tdp != NULL )
-            * tdp = td;
-    }
-
-    /* can also accept a physical name */
-    else 
-    {
-        if ( t . id == ePeriod )
-            physical_name ( tbl, & src, & t, & env );
-        if ( tdp != NULL )
-            memset ( tdp, 0, sizeof * tdp );
-        rc = 0;
-    }
-
-    /* we recognize a column name or
-       a fully-qualified name optionally followed by
-       a version to fully-qualify obj */
-    if ( rc == 0 && t.sym == NULL )
-        rc = SILENT_RC ( rcVDB, rcSchema, rcParsing, rcToken, rcUnexpected );
-    else if ( rc == 0 )
-        rc = next_fqn ( tbl, & src, & t, & env );
-    if ( rc == 0 )
-    {
-        uint32_t vers;
-        KToken st = t;
-        bool has_vers = false;
-        bool needs_name = true;
-        const SNameOverload *name = NULL;
-
-        next_token ( tbl, & src, & t );
-        switch ( st . id )
-        {
-        case eConstant:
-        case eFormat:
-        case eDatatype:
-        case eTypeset:
-        case ePhysMember:
-        case eTblMember:
-        case eDBMember:
-            needs_name = false;
-            obj = st . sym -> u . obj;
-            break;
-        case eFunction:
-        case eScriptFunc:
-        case ePhysical:
-        case eTable:
-        case eDatabase:
-            if ( t . id == eHash )
-            {
-                next_token ( tbl, & src, & t );
-                rc = maj_min_rel ( tbl, & src, & t, & env, self, & vers, true );
-                if ( rc != 0 )
-                    break;
-                has_vers = true;
-            }
-        case eUntypedFunc:
-        case eColumn:
-            name = st . sym -> u . obj;
-            break;
-        }
-
-        /* check if we found anything at all */
-        if ( obj != NULL || name != NULL )
-        {
-            /* accept but don't require semi-colon */
-            if ( t . id == eSemiColon )
-                next_token ( tbl, & src, & t );
-
-            /* expect end of input or else we didn't recognize */
-            if ( t . id != eEndOfInput )
-            {
-                obj = NULL;
-                name = NULL;
-            }
-        }
-
-        /* if we have something */
-        if ( obj != NULL || name != NULL )
-        {
-            * type = st . id;
-
-            /* resolve by version */
-            if ( has_vers )
-            {
-                assert ( name != NULL );
-                switch ( st . id )
-                {
-                case eFunction:
-                case eScriptFunc:
-                    obj = VectorFind ( & name -> items, & vers, NULL, SFunctionCmp );
-                    break;
-                case ePhysical:
-                    obj = VectorFind ( & name -> items, & vers, NULL, SPhysicalCmp );
-                    break;
-                case eTable:
-                    obj = VectorFind ( & name -> items, & vers, NULL, STableCmp );
-                    break;
-                case eDatabase:
-                    obj = VectorFind ( & name -> items, & vers, NULL, SDatabaseCmp );
-                    break;
-                }
-
-                /* since a version was requested,
-                   don't allow a partial find */
-                if ( obj == NULL )
-                    name = NULL;
-            }
-
-            /* resolve by type or default */
-            else if ( needs_name )
-            {
-                assert ( name != NULL );
-                switch ( st . id )
-                {
-                case eColumn:
-                    if ( ! has_type )
-                    {
-                        Vector items;
-                        rc = VectorCopy ( & name -> items, & items );
-                        if ( rc != 0 )
-                            break;
-                        VectorReorder ( & items, SColumnSortByID, NULL );
-                        VectorForEach ( & items, false, SColumnLastDefault, (void*)& obj );
-                        VectorWhack ( & items, NULL, NULL );
-                    }
-                    else
-                    {
-                        column_best_fit_data pb;
-                        pb . scol = NULL;
-                        pb . schema = self;
-                        pb . td = td;
-                        pb . distance = -1;
-
-                        VectorForEach ( & name -> items, false, SColumnBestFit, & pb );
-                        obj = pb . scol;
-                        if ( obj == NULL )
-                        {
-                            /* if named column is incomplete, allow match */
-                            memset ( & td, 0, sizeof td );
-                            obj = VectorFind ( & name -> items, & td, NULL, SColumnCmp );
-
-                            /* if column could not be matched by type, forget it */
-                            if ( obj == NULL )
-                                name = NULL;
-                        }
-                    }
-                    break;
-
-                default:
-                    if ( dflt )
-                        obj = VectorLast ( & name -> items );
-                }
-            }
-
-            * namep = name;
-        }
-    }
-
-    return obj;
-}
-
-/* Find
- *  generic object find
- *
- *  "name" [ OUT ] - returns list of overloaded names if found
- *
- *  "type" [ OUT ] - returns object type id, e.g.:
- *    eDatatype, eTypeset, eFormat, eFunction, ePhysical, eTable, ...
- *
- *  "expr" [ IN ] - name expression identifying object
- *
- *  returns principal object identified. if NULL but "name" is not
- *  NULL, then the object was only partially identified.
- */
-const void *VSchemaFind ( const VSchema *self,
-    const SNameOverload **name, uint32_t *type,
-    const char *expr, const char *ctx, bool dflt )
-{
-    rc_t rc;
-    KSymTable tbl;
-
-    /* initialize to not-found */
-    const void *obj = NULL;
-    * name = NULL;
-    * type = 0;
-
-    /* build a symbol table for schema */
-    rc = init_symtab ( & tbl, self );
-    if ( rc == 0 )
-    {
-        obj = resolve_object ( & tbl, self, NULL, name, type, expr, ctx, dflt );
-        KSymTableWhack ( & tbl );
-    }
-
-    return obj;
-}
-
-
-/* next_token
- *  gets next token
- *  looks up any identifier in symbol table
- *  converts token id to found symbol type
- */
-KToken *next_token ( const KSymTable *tbl, KTokenSource *src, KToken *t )
-{
-    if ( KTokenizerNext ( kDefaultTokenizer, src, t ) -> id == eIdent )
-    {
-        KSymbol *sym = KSymTableFind ( tbl, & t -> str );
-        t -> sym = sym;
-        if ( sym != NULL )
-            t -> id = sym -> type;
-    }
-
-    return t;
-}
-
-KToken *next_shallow_token ( const KSymTable *tbl, KTokenSource *src, KToken *t, bool plus_intrinsic )
-{
-    if ( KTokenizerNext ( kDefaultTokenizer, src, t ) -> id == eIdent || t -> id == eName )
-    {
-        KSymbol *sym = KSymTableFindShallow ( tbl, & t -> str );
-        if ( sym == NULL && plus_intrinsic )
-            sym = KSymTableFindIntrinsic ( tbl, & t -> str );
-        t -> sym = sym;
-        if ( sym != NULL )
-            t -> id = sym -> type;
-    }
-
-    return t;
-}
-
-
-/* expect
- *  performs a comparison of t->id against id, and takes one of 3 actions:
- *  1) when ids match, advance to next token and return 0
- *  2) when ids don't match but the expected token is not required,
- *     issue a KTokenExpected warning using expected text and return 0
- *  3) when ids don't match and the expected token is required,
- *     issue a KTokenExpected error using expected text and return its rc_t
- */
-rc_t expect ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    int id, const char *expected, bool required )
-{
-    if ( t -> id == id )
-        next_token ( tbl, src, t );
-    else if ( ! required )
-        KTokenExpected ( t, klogWarn, expected );
-    else
-        return KTokenExpected ( t, klogErr, expected );
-    return 0;
-}
-
-
-/*
- * maj-min            = <uint-expr> [ '.' <uint-expr> ]
- * maj-min-rel        = <uint-expr> [ '.' <uint-expr> [ '.' <uint-expr> ] ]
- */
-
-#if SLVL >= 1
-rc_t maj_min_rel ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, uint32_t *version, bool accept_release )
-{
-    rc_t rc;
-
-    if ( ! accept_release && t -> id == eMajMinRel )
-        return KTokenExpected ( t, klogErr, "maj.min version" );
-
-    rc = KTokenToVersion ( t, version );
-    if ( rc != 0 )
-        KTokenExpected ( t, klogErr, "version spec" );
-
-    next_token ( tbl, src, t );
-    return rc;
-}
-#endif
-
-
-/*
- * const-definition   = 'const' <typedecl> <fqn> '=' <const-expr>
- */
-#if SLVL >= 2
-static
-rc_t const_definition ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    rc_t rc;
-    SConstant *cnst = malloc ( sizeof * cnst );
-    if ( cnst == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    rc = typedecl ( tbl, src, t, env, self, & cnst -> td );
-    if ( rc == 0 )
-        rc = create_fqn ( tbl, src, t, env, eConstant, cnst );
-    if ( rc == 0 )
-    {
-        cnst -> name = t -> sym;
-        rc = expect ( tbl, src, next_token ( tbl, src, t ), eAssign, "=", true );
-        if ( rc == 0 )
-            rc = const_expr ( tbl, src, t, env, self, & cnst -> expr );
-    }
-    else if ( GetRCState ( rc ) == rcExists )
-    {
-        cnst -> name = t -> sym;
-        rc = expect ( tbl, src, next_token ( tbl, src, t ), eAssign, "=", true );
-        if ( rc == 0 )
-            rc = const_expr ( tbl, src, t, env, self, & cnst -> expr );
-        if ( rc == 0 )
-        {
-            /* TBD - compare expressions for equivalence */
-            SConstantWhack ( cnst, NULL );
-            return expect ( tbl, src, t, eSemiColon, ";", true );
-        }
-    }
-
-    if ( rc != 0 )
-    {
-        free ( cnst );
-        return rc;
-    }
-
-    rc = VectorAppend ( & self -> cnst, & cnst -> id, cnst );
-    if ( rc != 0 )
-    {
-        SConstantWhack ( cnst, NULL );
-        return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    return expect ( tbl, src, t, eSemiColon, ";", true );
-}
-#endif
-
-
-/*
- * alias-definition   = 'alias' SYMBOL <fqn>
- */
-static
-rc_t alias_definition ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    const KSymbol *sym;
-
-    /* read symbol name */
-    rc_t rc = next_fqn ( tbl, src, t, env );
-    if ( rc != 0 )
-        return KTokenFailure ( t, klogErr, rc, "fully qualified name" );
-
-    /* remember symbol */
-    sym = t -> sym;
-
-    /* create new name */
-    rc = create_fqn ( tbl, src, next_token ( tbl, src, t ),
-        env, sym -> type, sym -> u . obj );
-    if ( rc != 0 )
-    {
-        if ( GetRCState ( rc ) != rcExists )
-            return KTokenFailure ( t, klogErr, rc, "fully qualified name" );
-
-        /* TBD - compare alias */
-        return expect ( tbl, src, next_token ( tbl, src, t ), eSemiColon, ";", true );
-    }
-
-    /* record alias */
-    rc = VectorAppend ( & self -> alias, NULL, t -> sym );
-    if ( rc != 0 )
-        return KTokenRCExplain ( t, klogErr, rc );
-
-    return expect ( tbl, src, next_token ( tbl, src, t ), eSemiColon, ";", true );
-}
-
-
-/*
- * extern-decl        = 'extern' 'function' <ext-function-decl> ';'
- */
-static
-rc_t extern_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    switch ( t -> id )
-    {
-#if SLVL >= 3
-    case kw_function:
-        return extfunc_declaration ( tbl, src, next_token ( tbl, src, t ), env, self );
-#endif
-    default:
-        break;
-    }
-
-    return KTokenExpected ( t, klogErr, "function" );
-}
-
-
-/*
- * validate-decl      = 'validate' 'function' <validate-function-decl> ';'
- */
-static
-rc_t validate_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    switch ( t -> id )
-    {
-#if SLVL >= 3
-    case kw_function:
-        return valfunc_declaration ( tbl, src, next_token ( tbl, src, t ), env, self );
-#endif
-    default:
-        break;
-    }
-
-    return KTokenExpected ( t, klogErr, "function" );
-}
-
-
-/*
- * include-stmt       = 'include' STRING ';'
- */
-static
-rc_t include_stmt ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    rc_t rc;
-
-    if ( t -> id != eString )
-        return KTokenExpected ( t, klogErr, "file path" );
-
-    rc = VSchemaParseFile ( self, "%.*s", ( int ) ( t -> str . size - 2 ), t -> str . addr + 1 );
-    if ( rc != 0 )
-        return KTokenRCExplain ( t, klogErr, rc );
-
-    return expect ( tbl, src, next_token ( tbl, src, t ), eSemiColon, ";", true );
-}
-
-
-/*
- * schema-decl        = <type-definition>
- *                    | <typeset-definition>
- *                    | <format-definition>
- *                    | <const-definition>
- *                    | <alias-definition>
- *                    | <extern-decl>
- *                    | <script-decl>
- *                    | <function-decl>
- *                    | <physical-decl>
- *                    | <table-decl>
- *                    | <database-decl>
- *                    | <include-stmt>
- *                    | ';'
- */
-static
-rc_t schema_decl ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    /* expect a keyword */
-    switch ( t -> id )
-    {
-#if SLVL >= 1
-    case kw_typedef:
-        return type_definition ( tbl, src, next_token ( tbl, src, t ), env, self );
-    case kw_typeset:
-        return typeset_definition ( tbl, src, next_token ( tbl, src, t ), env, self );
-#endif
-    case kw_fmtdef:
-        return format_definition ( tbl, src, next_token ( tbl, src, t ), env, self );
-#if SLVL >= 2
-    case kw_const:
-        return const_definition ( tbl, src, next_token ( tbl, src, t ), env, self );
-#endif
-    case kw_alias:
-        return alias_definition ( tbl, src, next_token ( tbl, src, t ), env, self );
-
-    case kw_extern:
-        return extern_declaration ( tbl, src, next_token ( tbl, src, t ), env, self );
-#if SLVL >= 3
-    case kw_function:
-        return function_declaration ( tbl, src, next_token ( tbl, src, t ), env, self );
-#endif
-#if SLVL >= 4
-    case kw_schema:
-        return script_declaration ( tbl, src, next_token ( tbl, src, t ), env, self );
-#endif
-#if SLVL >= 5
-    case kw_physical:
-        return physical_declaration ( tbl, src, next_token ( tbl, src, t ), env, self );
-#endif
-#if SLVL >= 6
-    case kw_table:
-        return table_declaration ( tbl, src, next_token ( tbl, src, t ), env, self );
-    case kw_database:
-        return database_declaration ( tbl, src, next_token ( tbl, src, t ), env, self );
-#endif
-    case kw_include:
-        return include_stmt ( tbl, src, next_token ( tbl, src, t ), env, self );
-
-    case kw_validate:
-        return validate_declaration ( tbl, src, next_token ( tbl, src, t ), env, self );
-
-    case eSemiColon:
-        /* TBD - issue warning if desired */
-        next_token ( tbl, src, t );
-        return 0;
-    }
-
-    /* it wasn't the right thing */
-    return KTokenExpected ( t, klogErr,
-        "include, typedef, typeset, fmtdef, function, schema, database or table" );
-}
-
-/*
- * schema-version     = 'version' <maj-min>
- */
-#if SLVL >= 1
-static
-rc_t schema_version ( const KSymTable *tbl, KTokenSource *src, KToken *t, SchemaEnv *env )
-{
-    rc_t rc = maj_min_rel ( tbl, src, t, env, NULL, & env -> version, false );
-    if ( rc == 0 )
-        SchemaEnvInitFeatures ( env );
-    return rc;
-}
-#endif
-
-
-/* examine_schema_contents
- *  run a sanity check on schema contents
- */
-#if EXAMINE_SCHEMA_CONTENTS >= 1
-static
-rc_t examine_schema_contents ( const VSchema *self )
-{
-    rc_t rc = 0;
-
-    if ( self -> dad != NULL )
-    {
-        rc = examine_schema_contents ( self -> dad );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    if ( BSTreeDoUntil ( & self -> scope, false, KSymbolExamineContents, & rc ) )
-        return rc;
-
-    return 0;
-}
-#endif
-
-/*
- * schema             = [ <schema-version> ';' ] [ <schema-decl-list> ]
- *
- * schema-decl-list   = <schema-decl> [ <schema-decl-list> ]
- */
-rc_t init_symtab ( KSymTable *tbl, const VSchema *self )
-{
-    rc_t rc;
-
-    if ( self -> dad == NULL )
-        return KSymTableInit ( tbl, ( BSTree* ) & self -> scope );
-
-    rc = init_symtab ( tbl, self -> dad );
-    if ( rc == 0 )
-        rc = KSymTablePushScope ( tbl, ( BSTree* ) & self -> scope );
-
-    return rc;
-}
-
-rc_t schema ( KTokenSource *src, VSchema *self )
-{
-    /* push schema scope onto symbol table */
-    KSymTable tbl;
-    rc_t rc = init_symtab ( & tbl, self );
-    if ( rc == 0 )
-    {
-        KToken t;
-        SchemaEnv env;
-
-        /* prime token and look for version */
-        next_token ( & tbl, src, & t );
-#if SLVL >= 1
-        /* initialize default to v1 */
-        if ( t . id != kw_version )
-            SchemaEnvInit ( & env, 0x01000000 );
-        else
-        {
-            /* initialize explicit version */
-            memset ( & env, 0, sizeof env );
-            rc = schema_version ( & tbl, src, next_token ( & tbl, src, & t ), & env );
-            if ( rc == 0 )
-                rc = expect ( & tbl, src, & t, eSemiColon, ";", true );
-        }
-#endif
-        if ( rc == 0 && t . id != eEndOfInput )
-        {
-            /* implement optional schema-decl-list */
-            while ( rc == 0 && t . id != eEndOfInput )
-            {
-#if EXAMINE_SCHEMA_CONTENTS >= 1
-                rc = examine_schema_contents ( self );
-                if ( rc == 0 )
-#endif
-                rc = schema_decl ( & tbl, src, & t, & env, self );
-            }
-        }
-
-        KSymTableWhack ( & tbl );
-    }
-
-    return rc;
-}
diff --git a/libs/vdb/schema-parse.h b/libs/vdb/schema-parse.h
deleted file mode 100644
index efd695f..0000000
--- a/libs/vdb/schema-parse.h
+++ /dev/null
@@ -1,607 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_schema_parse_
-#define _h_schema_parse_
-
-#ifndef _h_schema_priv_
-#include "schema-priv.h"
-#endif
-
-#ifndef _h_schema_tok_
-#include "schema-tok.h"
-#endif
-
-#ifndef _h_klib_symtab_
-#include <klib/symtab.h>
-#endif
-
-#ifndef _h_klib_debug_
-#include <klib/debug.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * defines
- */
-#define PARSE_DEBUG( msg ) \
-    DBGMSG ( DBG_VDB, DBG_FLAG ( DBG_VDB_PARSE ), msg )
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct SVector;
-struct STable;
-struct SDatabase;
-struct SFunction;
-struct SConstExpr;
-struct SFormParmlist;
-struct SExpression;
-struct STypeExpr;
-
-/*--------------------------------------------------------------------------
- * extension of token ids
- */
-enum
-{
-    /* a symbolic constant */
-    eConstant = eNumSymtabIDs,
-
-    /* format type */
-    eFormat,
-
-    /* dynamic data type */
-    eDatatype,
-
-    /* typeset */
-    eTypeset,
-
-    /* factory */
-    eFactory,
-
-    /* external C function */
-    eFunction,
-    eUntypedFunc,
-    eRowLengthFunc,
-
-    /* script function */
-    eScriptFunc,
-
-    /* schema type and param
-       a schema type is a templatized type, basically
-       a name without a completed definition
-
-       a schema param is a parameterized constant that
-       can be used in defining type vector dimensions */
-    eSchemaType,
-    eSchemaParam,
-
-    /* factory param and name
-       a factory param is a templatized constant, but
-       cannot be used to define type dimensions */
-    eFactParam,
-
-    /* function param */
-    eFuncParam,
-
-    /* intermediate production */
-    eProduction,
-
-    /* physical column */
-    ePhysical,
-
-    /* physical column member */
-    ePhysMember,
-
-    /* external column */
-    eColumn,
-
-    /* forward declaration */
-    eForward,
-
-    /* purely virtual production */
-    eVirtual,
-
-    /* table */
-    eTable,
-
-    /* table member */
-    eTblMember,
-
-    /* database */
-    eDatabase,
-
-    /* database member */
-    eDBMember,
-
-    /* keywords */
-    eFirstKeyword,
-
-    kw_alias = eFirstKeyword,
-    kw_column,
-    kw_const,
-    kw_control,
-    kw_database,
-    kw_decode,
-    kw_default,
-    kw_encode,
-    kw_extern,
-    kw_false,
-    kw_fmtdef,
-    kw_function,
-    kw_include,
-    kw_index,
-    kw_limit,
-    kw_physical,
-    kw_read,
-    kw_readonly,
-    kw_return,
-    kw_schema,
-    kw_static,
-    kw_table,
-    kw_template,
-    kw_trigger,
-    kw_true,
-    kw_type,
-    kw_typedef,
-    kw_typeset,
-    kw_validate,
-    kw_version,
-    kw_view,
-    kw_virtual,
-    kw_void,
-    kw_writeonly,
-
-    /* special keywords */
-    kw___untyped,
-    kw___row_length,
-    kw___no_header
-
-};
-
-/* SchemaEnv
- *  states the schema language version
- *  gives switches as to features, errors, warnings, etc.
- */
-typedef struct SchemaEnv SchemaEnv;
-struct SchemaEnv
-{
-    /* maj.min.rel format,
-       only maj.min supported */
-    uint32_t version;
-
-    /* V0 COMPATIBILITY SWITCHES */
-    uint32_t schema_param_types_absent : 1;
-    uint32_t mixed_fact_param_list : 1;
-    uint32_t script_function_called_schema : 1;
-
-    /* V1 SWITCHES */
-    uint32_t default_view_decl : 1;
-    uint32_t has_view_keyword : 1;
-};
-
-/* SCHEMA_LANG_VERSION
- *  version numbers of schema language
- */
-#define CUR_SCHEMA_LANG_VERSION 0x01000000
-#define EXT_SCHEMA_LANG_VERSION 0x01000000
-
-/* Init
- *  initialize to current version
- */
-void SchemaEnvInit ( SchemaEnv *env, uint32_t version );
-
-/*--------------------------------------------------------------------------
- * schema-parse.c
- */
-
-/*
- * schema             = [ <schema-version> ';' ] [ <schema-decl-list> ]
- *
- * schema-decl-list   = <schema-decl> [ <schema-decl-list> ]
- *
- * schema-decl        = <type-definition> ';'
- *                    | <typeset-definition> ';'
- *                    | <format-definition> ';'
- *                    | <function-decl> ';'
- *                    | <schema-decl>
- *                    | <table-decl>
- *
- * schema-version     = 'version' <maj-min>
- */
-rc_t schema ( KTokenSource *src, VSchema *self );
-
-/*
- * init_symtab
- *  initializes "tbl"
- *  places schema and parents into scope
- *  must be balanced by KSymTableWhack
- */
-rc_t init_symtab ( KSymTable *tbl, const VSchema *self );
-
-/* next_token
- *  gets next token
- *  looks up any identifier in symbol table
- *  converts token id to found symbol type
- * next_shallow_token
- *  only searches current scope, and optionally intrinsic scope
- */
-#define next_token vdb_next_token
-#define next_shallow_token vdb_next_shallow_token
-KToken *next_token ( const KSymTable *tbl, KTokenSource *src, KToken *t );
-KToken *next_shallow_token ( const KSymTable *tbl,
-    KTokenSource *src, KToken *t, bool plus_intrinsic );
-
-/* expect
- *  performs a comparison of t->id against id, and takes one of 3 actions:
- *  1) when ids match, advance to next token and return 0
- *  2) when ids don't match but the expected token is not required,
- *     issue a KTokenExpected warning using expected text and return 0
- *  3) when ids don't match and the expected token is required,
- *     issue a KTokenExpected error using expected text and return its rc_t
- */
-rc_t expect ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    int id, const char *expected, bool required );
-
-/*
- * maj-min            = <uint-expr> [ '.' <uint-expr> ]
- * maj-min-rel        = <uint-expr> [ '.' <uint-expr> [ '.' <uint-expr> ] ]
- */
-rc_t maj_min_rel ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, uint32_t *version, bool accept_release );
-
-rc_t next_uint ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, uint32_t *val );
-
-/* resolve_object
- *  generic object find
- *
- *  "td" [ OUT, NULL OKAY ] - returns cast type expression
- *  if given or "any" if not
- *
- *  "name" [ OUT ] - returns list of overloaded objects if found
- *
- *  "type" [ OUT ] - returns object type id, e.g.:
- *    eDatatype, eTypeset, eFormat, eFunction, ePhysical, eTable, ...
- *
- *  "expr" [ IN ] - NUL terminated name expression identifying object
- *
- *  "ctx" [ IN ] - NUL terminated context string for evaluation,
- *  substitutes for filename in logging reports
- *
- *  "dflt" [ IN ] - if true, resolve default value
- *
- *  returns principal object identified. if NULL but "name" is not
- *  NULL, then the object was only partially identified.
- */
-const void *resolve_object ( const KSymTable *tbl,
-    const VSchema *self, VTypedecl *td, const SNameOverload **name,
-    uint32_t *type, const char *expr, const char *ctx, bool dflt );
-
-
-/*--------------------------------------------------------------------------
- * schema-type.c
- */
-
-
-/*
- * fqn                = ID [ <nested-name> ]
- * nested-name        = ':' NAME [ <nested-name> ]
- */
-rc_t next_fqn ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env );
-rc_t create_fqn ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, uint32_t id, const void *obj );
-
-
-/*
- * dim                = '[' <uint-expr> ']'
- */
-rc_t dim ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, uint32_t *dim, bool required );
-
-/*
- * typename           = <fqn>
- * typedecl           = <typename> [ <dim> ]
- */
-rc_t typename ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, uint32_t *id );
-rc_t typedecl ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, VTypedecl *td );
-
-/*
- * typeset            = <fqn>
- * typespec           = <typedecl>
- *                    | <typeset> [ <dim> ]
- */
-rc_t typeset ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, uint32_t *id );
-rc_t typespec ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, VTypedecl *td );
-
-/*
- * fmtname            = <fqn>
- * fmtdecl            = <fmtname> [ '/' <typedecl> ]
- *                    | <typedecl>
- * fmtspec            = <fmtname> [ '/' <typedecl> ]
- *                    | <typespec>
- */
-rc_t fmtname ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, uint32_t *id );
-rc_t fmtdecl ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, VFormatdecl *fd );
-rc_t fmtspec ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, VFormatdecl *fd );
-
-/*
- * type-definition    = 'typedef' <typename> <typedef-list>
- * typedef-list       = <typedef-decl> [ ',' <typedef-list> ]
- * typedef-decl       = <fqn> [ <dim> ]
- */
-rc_t type_definition ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self );
-
-/*
- * typeset-definition = 'typeset' <typeset> '{' <typespec-list> '}'
- * typespec-list      = <typespec> [ ',' <typespec-list> ]
- */
-rc_t typeset_definition ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self );
-
-/*
- * format-definition  = 'fmtdef' [ <fmtname> ] <fqn>
- */
-rc_t format_definition ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self );
-
-
-/*--------------------------------------------------------------------------
- * schema-func.c
- */
-
-/*
- * function-decl      = [ 'extern' ] 'function' <ext-function-decl> ';'
- *                    | 'validate' 'function' <validate-function-decl> ';'
- *                    | 'schema' [ 'function' ] <sch-func-decl>
- *                    | 'function' <ext-func-decl> ';'
- *                    | 'function' <sch-func-decl>
- */
-rc_t function_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self );
-rc_t extfunc_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self );
-rc_t valfunc_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self );
-rc_t script_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self );
-
-/*
- * schema-signature   = <schema-formals>
- * schema-formals     = <schema-formal> [ ',' <schema-formals> ]
- * schema-formal      = <schema-typedecl> ID
- * schema-parmname    = ID
- */
-rc_t schema_signature ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, struct SFunction *sig );
-
-/*
- * fact-signature     = <fact-formals> [ '*' <fact-formals> ] [ ',' '...' ]
- *                    | '*' <fact-formals> [ ',' '...' ]
- *                    | '...'
- */
-rc_t fact_signature ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, struct SFormParmlist *sig );
-
-
-/*--------------------------------------------------------------------------
- * schema-prod.c
- */
-
-/*
- * production-stmt    = <func-fmtdecl> ID <assign-expr>
- *                    | 'trigger' ID <assign-expr>
- */
-rc_t production_stmt ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, struct Vector *v, uint32_t ptype );
-
-/*
- * script-body        = '{' <script-stmts> '}'
- */
-rc_t script_body ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, struct SFunction *f );
-
-/*
- * physical-decl      = 'physical' [ 'column' ] <typedecl>
- *                       <fqn> '#' <maj-min-rel> <phys-body>
- */
-rc_t physical_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self );
-
-
-/*--------------------------------------------------------------------------
- * schema-expr.c
- */
-
-/*
- * dim-expr           = '[' <uint-expr> ']'
- */
-rc_t dim_expr ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, struct SExpression const **dim, bool required );
-
-
-/*
- * cond-expr          = <expression> [ '|' <cond-expr> ]
- */
-rc_t cond_expr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, struct SExpression const **expr );
-
-/*
- * expression         = <param-value>
- *                    | <func-expr>
- *                    | '(' <func-fmtdecl> ')' <expression>
- */
-rc_t expression ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, struct SExpression const **expr );
-
-/*
- * type-expr          = <typeset>
- *                    | <fmtdecl>
- *                    | <fmtname> '/' <typeset>
- */
-rc_t type_expr ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, struct SExpression const **fd );
-rc_t vardim_type_expr ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, struct SExpression const **fd );
-
-/*
- * const-expr         = <constname>
- *                    | CONST-VALUE
- */
-rc_t const_expr ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, struct SExpression const **expr );
-
-/*
- * phys-encoding-expr = [ '<' <schema-parms> '>' ]
- *                      <phys-encoding-name> [ '#' <maj-min-rel> ]
- *                      [ '<' <fact-params> '>' ]
- */
-rc_t phys_encoding_expr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, VTypedecl *td, struct SExpression const **expr );
-
-
-/*--------------------------------------------------------------------------
- * schema-eval.c
- */
-
-/* eval-const-expr
- *  tries to evaluate a constant expression against type
- *  returns non-zero error code if failed
- */
-rc_t eval_const_expr ( const VSchema *self, const VTypedecl *td,
-    struct SExpression const *expr, struct SExpression **value, Vector *cx_bind );
-
-/* eval-uint-expr
- *  special const expression evaluator for uint32_t
- */
-rc_t eval_uint_expr ( const VSchema *self,
-    struct SExpression const *expr, uint32_t *value, Vector *cx_bind );
-
-/* eval-uint64-expr
- *  special const expression evaluator for uint64_t
- */
-rc_t eval_uint64_expr ( const VSchema *self,
-    struct SExpression const *expr, uint64_t *value, Vector *cx_bind );
-
-/* eval-expr-syntax
- *  examine expression syntax
- *  fixes forward references
- */
-rc_t eval_expr_syntax ( struct SExpression const *expr );
-
-
-/*--------------------------------------------------------------------------
- * schema-tbl.c
- */
-
-/*
- * physical-name      = '.' ID
- */
-void physical_name ( const KSymTable *tbl,
-    KTokenSource *src, KToken *t, const SchemaEnv *env );
-
-/*
- * push-tbl-scope
- * pop-tbl-scope
- */
-rc_t push_tbl_scope ( KSymTable *tbl, struct STable const *table );
-void pop_tbl_scope ( KSymTable *tbl, struct STable const *table );
-
-/*
- * init-tbl-symtab
- *  initializes "tbl"
- *  places table in scope
- *  must be balanced by KSymTableWhack
- */
-rc_t init_tbl_symtab ( KSymTable *tbl, const VSchema *schema, struct STable const *table );
-
-/*
- * table-decl         = 'table' <fqn> <table-def>
- * table-def          = [ <table-dad> ] <table-body>
- *                    | <table-dad> ';'
- *
- * table-dad          = '=' <table-name>
- *
- * table-body         = '{' [ <table-decl-list> ] '}'
- * table-decl-list    = <tbl-local-decl> ';' [ <table-decl-list> ]
- */
-rc_t table_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self );
-
-
-/*--------------------------------------------------------------------------
- * schema-db.c
- */
-
-/*
- * push-db-scope
- * pop-db-scope
- */
-rc_t push_db_scope ( KSymTable *tbl, struct SDatabase const *db );
-void pop_db_scope ( KSymTable *tbl, struct SDatabase const *db );
-
-/*
- * init-db-symtab
- *  initializes "tbl"
- *  places db in scope
- *  must be balanced by KSymTableWhack
- */
-rc_t init_db_symtab ( KSymTable *tbl, const VSchema *schema, struct SDatabase const *db );
-
-/*
- * database-decl      = 'database' <fqn> <database-def>
- * database-def       = [ <database-dad> ] <database-body>
- *                    | <database-dad> ';'
- *
- * database-dad       = '=' <database-name>
- *
- * database-body      = '{' [ <db-decl-list> ] '}'
- * db-decl-list       = <database-decl>
- *                    | <table-decl>
- */
-rc_t database_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_schema_int_ */
diff --git a/libs/vdb/schema-priv.h b/libs/vdb/schema-priv.h
deleted file mode 100644
index 565c469..0000000
--- a/libs/vdb/schema-priv.h
+++ /dev/null
@@ -1,1308 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_schema_priv_
-#define _h_schema_priv_
-
-#ifndef _h_vdb_schema_
-#include <vdb/schema.h>
-#endif
-
-#ifndef _h_vdb_xform_
-#include <vdb/xform.h>
-#endif
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_klib_vector_
-#include <klib/vector.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * SLVL - schema development level
- *  used to bring schema together in an orderly fashion
- *
- *  level 0: include, fmtdef, alias
- *
- *  level 1: version, typedef, dim, typeset
- *           const-expr, type-expr
- *           eval-uint-expr, eval-type-expr
- *
- *  level 2: const, eval-const-expr
- *
- *  level 3: function, schema-param-decl, fact-param-decl, func-param-decl
- *           indirect-type-expr, indirect-const-expr, prod-expr
- *
- *  level 4: script, return-stmt, prod-stmt
- *           cond-expr, cast-expr, func-expr, name-expr
- *
- *  level 5: physical
- *
- *  level 6: database, table
- *
- *  level 7: physical members
- *
- *  level 8: columns
- */
-#ifndef SLVL
-#define SLVL 8
-#endif
-
-
-/*--------------------------------------------------------------------------
- * EXAMINE_SCHEMA_CONTENTS
- *  debugging setting for examining contents and detecting inconsistencies
- */
-#ifndef EXAMINE_SCHEMA_CONTENTS
-#if _DEBUGGING
-#define EXAMINE_SCHEMA_CONTENTS 0
-#else
-#define EXAMINE_SCHEMA_CONTENTS 0
-#endif
-#endif
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct String;
-struct KSymbol;
-struct KTokenText;
-struct KMDataNode;
-struct SFunction;
-struct SDatabase;
-struct VDBManager;
-struct SExpression;
-struct SDumper;
-
-
-/*--------------------------------------------------------------------------
- * VCtxId
- *  id within a context
- *  made to be compatible with KSymbol.u.fwd
- */
-typedef struct VCtxId VCtxId;
-struct VCtxId
-{
-    uint32_t ctx;
-    uint32_t id;
-};
-
-/* Cmp
- */
-#define VCtxIdCmp( a, b ) \
-    ( ( ( a ) -> ctx != ( b ) -> ctx ) ? \
-      ( int64_t ) ( a ) -> ctx - ( int64_t ) ( b ) -> ctx : \
-      ( int64_t ) ( a ) -> id - ( int64_t ) ( b ) -> id )
-
-
-/*--------------------------------------------------------------------------
- * KSymbol
- */
-
-/* Copy
- *  deep copy a single symbol
- */
-rc_t KSymbolCopy ( BSTree *scope,
-    struct KSymbol **cp, struct KSymbol const *orig );
-
-/* CopyScope
- *  deep copy all symbols within a scope
- */
-bool CC KSymbolCopyScope ( BSTNode *sym, void *scope );
-
-
-/* ExamineContents
- *  not much to be done here
- */
-#if EXAMINE_SCHEMA_CONTENTS >= 1
-bool KSymbolExamineContents ( BSTNode *sym, void *rc );
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KMDataNode
- */
-
-/* FillSchema
- *  a schema buffer fill function that reads from KMDataNode
- *
- * NB - preset "add_v0" to false for normal operation, "true"
- *  if the buffer should be prefixed with "version 0;" on first read
- */
-typedef struct KMDataNodeSchemaFillData KMDataNodeSchemaFillData;
-struct KMDataNodeSchemaFillData
-{
-    struct KMDataNode const *node;
-    size_t pos;
-    char buff [ 64 * 1024 - 1 ];
-    bool add_v0;
-};
-
-rc_t CC KMDataNodeFillSchema ( void *data, struct KTokenText *tt, size_t save );
-
-
-/*--------------------------------------------------------------------------
- * VTypedecl
- * VFormatdecl
- */
-
-/* CommonAncestor
- *  find a common ancestor between "self" and "peer"
- *  returns distance as sum of distances from each to "ancestor"
- */
-bool VFormatdeclCommonAncestor ( const VFormatdecl *self, const VSchema *schema,
-    const VFormatdecl *peer, VFormatdecl *ancestor, uint32_t distances [ 2 ] );
-
-
-/*--------------------------------------------------------------------------
- * SNameOverload
- *  describes an overloaded name
- *  used to implement versioning 
- */
-typedef struct SNameOverload SNameOverload;
-struct SNameOverload
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* overloaded items */
-    Vector items;
-
-    /* contextual id */
-    VCtxId cid;
-};
-
-/* Make
- */
-rc_t SNameOverloadMake ( SNameOverload **name,
-    struct KSymbol const *sym, uint32_t start, uint32_t len );
-
-/* Copy
- */
-rc_t SNameOverloadCopy ( BSTree *scope,
-    SNameOverload **cp, const SNameOverload *orig );
-rc_t SNameOverloadVectorCopy ( BSTree *scope,
-    const Vector *src, Vector *dest );
-
-/* Whack
- */
-void CC SNameOverloadWhack ( void *self, void *ignore );
-
-
-/*--------------------------------------------------------------------------
- * VSchema
- *  a symbol scope
- *  data types, blob formats, function and sub-schema declarations
- *  database and table declarations
- */
-struct VSchema
-{
-    /* parent schema */
-    const VSchema *dad;
-
-    /* global scope for this schema */
-    BSTree scope;
-
-    /* paths of opened files */
-    BSTree paths;
-
-    /* include path - vector of KDirectory references
-       ordered by precedence */
-    Vector inc;
-
-    /* alias names - owned by scope, but recorded for dumping */
-    Vector alias;
-
-    /* formats - ids start at 1, where 0 is reserved for NULL */
-    Vector fmt;
-
-    /* datatypes - ids start at 0, which is reserved for 'any' */
-    Vector dt;
-
-    /* typesets - ids start at 0x40000000 */
-    Vector ts;
-
-    /* parameterized types, declared within function
-       signatures and defined within expressions
-       ids start at 0x80000001, where 0x80000000
-       is reserved for 'undefined' */
-    Vector pt;
-
-    /* symbolic constants */
-    Vector cnst;
-
-    /* extern and schema functions */
-    Vector func;
-    Vector fname;
-
-    /* physical columns */
-    Vector phys;
-    Vector pname;
-
-    /* tables */
-    Vector tbl;
-    Vector tname;
-
-    /* databases */
-    Vector db;
-    Vector dname;
-
-    KRefcount refcount;
-
-    uint32_t file_count;
-
-    /* number of indirect expressions
-       these are uniquely identified place-holders
-       for cursor-open binding of
-       type and constant expressions */
-    uint32_t num_indirect;
-};
-
-
-/* Make
- *  creates an empty schema
- */
-rc_t VSchemaMake ( VSchema **sp, const VSchema *dad );
-
-
-/* MakeIntrinsic
- *  creates an initial, intrinsic schema
- */
-rc_t VSchemaMakeIntrinsic ( VSchema **intrinsic );
-
-
-/* Attach
- * Sever
- */
-VSchema *VSchemaAttach ( const VSchema *self );
-rc_t VSchemaSever ( const VSchema *self );
-
-
-/* ParseTextCallback
- *  parse schema text
- *  add productions to existing schema
- *
- *  "name" [ IN, NULL OKAY ] - optional name
- *  representing text, e.g. filename
- *
- *  "fill" [ IN ] and "data" [ IN, OPAQUE ] - for filling buffer
- */
-rc_t VSchemaParseTextCallback ( VSchema *self, const char *name,
-    rc_t ( CC * fill ) ( void *self, struct KTokenText *tt, size_t save ),
-    void *data );
-
-/* Find
- *  generic object find within schema global scope
- *
- *  "name" [ OUT ] - returns list of overloaded objects if found
- *
- *  "type" [ OUT ] - returns object type id, e.g.:
- *    eDatatype, eTypeset, eFormat, eFunction, ePhysical, eTable, ...
- *
- *  "expr" [ IN ] - NUL terminated name expression identifying object
- *
- *  "ctx" [ IN ] - NUL terminated context string for evaluation,
- *  substitutes for filename in logging reports
- *
- *  "dflt" [ IN ] - if true, resolve default value
- *
- *  returns principal object identified. if NULL but "name" is not
- *  NULL, then the object was only partially identified.
- */
-const void *VSchemaFind ( const VSchema *self,
-    const SNameOverload **name, uint32_t *type,
-    const char *expr, const char *ctx, bool dflt );
-
-
-/* CacheIntrinsicTypeId
- *  for id-caching
- *
- *  reads id atomically from "cache" and returns if non-zero
- *
- *  otherwise retrieves type id by name lookup, and sets
- *  value atomically in "cache" before returning.
- */
-uint32_t VSchemaCacheIntrinsicTypeId ( const VSchema *self,
-    atomic32_t *cache, const char *type_name );
-
-
-/* Marking
- */
-void VSchemaClearMark ( const VSchema *self );
-void VSchemaClearPhysMark ( const VSchema *self );
-void VSchemaTypeMark ( const VSchema *self, uint32_t type_id );
-
-
-/* ToText
- *  converts some object to textual representation
- */
-rc_t VSchemaToText ( struct VSchema const *self,
-    char *buff, size_t bsize, size_t *num_writ, const char *fmt, ... );
-
-#if _DEBUGGING
-/* ListSymtab
- *  lists contents of symbol table
- */
-void VSchemaListSymtab ( struct VSchema const *self );
-#endif
-
-
-/*--------------------------------------------------------------------------
- * SFormat
- *  describes a blob format
- */
-typedef struct SFormat SFormat;
-struct SFormat
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* superfmt - i.e. current fmt extends superfmt
-       implying that super can be decoded by current */
-    const SFormat *super;
-
-    /* format id */
-    uint32_t id;
-
-    /* marking */
-    bool marked;
-};
-
-/* Whack
- */
-#define SFormatWhack VectMbrWhack
-
-/* Find
- */
-SFormat *VSchemaFindFmtid ( const VSchema *self, uint32_t id );
-
-/* Mark
- */
-void CC SFormatClearMark ( void *item, void *ignore );
-void SFormatMark ( const SFormat *self );
-
-/* Dump
- *  dump "fmtdef", dump object
- */
-bool CC SFormatDefDump ( void *item, void *dumper );
-rc_t SFormatDump ( const SFormat *self, struct SDumper *d );
-
-
-/*--------------------------------------------------------------------------
- * SDatatype
- *  describes a registered datatype
- */
-enum
-{
-    /* these have been exported to <vdb/schema.h> */
-    ddBool = vtdBool,
-    ddUint = vtdUint,
-    ddInt = vtdInt,
-    ddFloat = vtdFloat,
-    ddAscii = vtdAscii,
-    ddUnicode = vtdUnicode
-};
-
-typedef struct SDatatype SDatatype;
-struct SDatatype
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* supertype */
-    const SDatatype *super;
-
-    /* special byte-swap function */
-    void ( * byte_swap ) ( void *dst, const void *src, uint64_t count );
-
-    /* type id */
-    uint32_t id;
-
-    /* number of parent elements, from declaration:
-       typedef super [ dim ] name; */
-    uint32_t dim;
-
-    /* element size, calculated as
-       super -> size * dim */
-    uint32_t size;
-
-    /* data domain */
-    uint16_t domain;
-
-    /* marking */
-    bool marked;
-};
-
-/* Whack
- */
-#define SDatatypeWhack VectMbrWhack
-
-/* IntrinsicDim
- */
-uint32_t SDatatypeIntrinsicDim ( const SDatatype *self );
-
-/* Find
- */
-SDatatype *VSchemaFindTypeid ( const VSchema *self, uint32_t id );
-
-/* Mark
- */
-void CC SDatatypeClearMark ( void *item, void *ignore );
-void SDatatypeMark ( const SDatatype *self );
-
-/* Dump
- */
-bool CC SDatatypeDefDump ( void *item, void *dumper );
-rc_t SDatatypeDump ( const SDatatype *self, struct SDumper *d );
-
-
-/*--------------------------------------------------------------------------
- * STypeset
- *  describes a set of typedecls
- */
-typedef struct STypeset STypeset;
-struct STypeset
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* typeset id */
-    uint32_t id;
-
-    /* marking */
-    bool marked;
-
-    /* fmtdecls */
-    uint16_t count;
-    VTypedecl td [ 1 ];
-};
-
-/* Whack
- */
-#define STypesetWhack VectMbrWhack
-
-/* Find
- */
-STypeset *VSchemaFindTypesetid ( const VSchema *self, uint32_t id );
-
-/* Mark
- */
-void CC STypesetClearMark ( void *item, void *ignore );
-void STypesetMark ( const STypeset *self, const VSchema *schema );
-
-/* Dump
- */
-bool CC STypesetDefDump ( void *item, void *dumper );
-rc_t STypesetDump ( const STypeset *self, struct SDumper *d );
-
-
-/*--------------------------------------------------------------------------
- * SIndirectType
- *  a parameterized typespec
- */
-typedef struct SIndirectType SIndirectType;
-struct SIndirectType
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* index into binding vector */
-    uint32_t type_id;
-
-    /* formal type id */
-    uint32_t id;
-
-    /* parameter position */
-    uint32_t pos;
-};
-
-/* Whack
- */
-void CC SIndirectTypeWhack ( void *item, void *ignore );
-
-/* Find
- */
-SIndirectType *VSchemaFindITypeid ( const VSchema *self, uint32_t id );
-
-/* Dump
- */
-rc_t SIndirectTypeDump ( const SIndirectType *self, struct SDumper *d );
-
-
-/*--------------------------------------------------------------------------
- * SConstant
- *  describes a symbolic constant
- */
-typedef struct SConstant SConstant;
-struct SConstant
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* value */
-    struct SExpression const *expr;
-
-    /* type */
-    VTypedecl td;
-
-    /* id */
-    uint32_t id;
-
-    /* marking */
-    bool marked;
-};
-
-/* Whack
- */
-void CC SConstantWhack ( void *item, void *ignore );
-
-/* Mark
- */
-void CC SConstantClearMark ( void *item, void *ignore );
-void SConstantMark ( const SConstant *self );
-
-/* Dump
- *  dump "const", dump object
- */
-bool CC SConstantDefDump ( void *item, void *dumper );
-rc_t SConstantDump ( const SConstant *self, struct SDumper *d );
-
-
-/*--------------------------------------------------------------------------
- * SIndirectConst
- *  a parameterized constant
- */
-typedef struct SIndirectConst SIndirectConst;
-struct SIndirectConst
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* formal typedecl or NULL if function */
-    struct SExpression const *td;
-
-    /* index into binding vector */
-    uint32_t expr_id;
-
-    /* offset position from # of indirect types */
-    uint32_t pos;
-};
-
-/* Whack
- */
-void CC SIndirectConstWhack ( void * item, void * ignore );
-
-/* Mark
- */
-void CC SIndirectConstMark ( void * item, void * data );
-
-/* Dump
- *  dump "const", dump object
- */
-bool CC SIndirectConstDefDump ( void *item, void *dumper );
-rc_t SIndirectConstDump ( const SIndirectConst *self, struct SDumper *d );
-
-
-/*--------------------------------------------------------------------------
- * SProduction
- *  a named production
- */
-typedef struct SProduction SProduction;
-struct SProduction
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* conditional expression */
-    struct SExpression const *expr;
-
-    /* formal fmtdecl */
-    struct SExpression const *fd;
-
-    /* contextual id */
-    VCtxId cid;
-
-    /* trigger production */
-    bool trigger;
-
-    /* control parameter */
-    bool control;
-};
-
-/* Whack
- */
-void CC SProductionWhack ( void * item, void * ignore );
-
-/* Mark
- */
-void CC SProductionMark ( void * itme, void * data );
-
-/* Dump
- *  dump production
- */
-bool CC SProductionDefDump ( void *item, void *dumper );
-rc_t SProductionDump ( const SProduction *self, struct SDumper *d );
-
-
-/*--------------------------------------------------------------------------
- * SFormParmlist
- *  zero or more formal parameters
- */
-typedef struct SFormParmlist SFormParmlist;
-struct SFormParmlist
-{
-    Vector parms;
-    uint16_t mand;
-    uint16_t vararg;
-};
-
-/* Whack
- */
-void SFormParmlistWhack ( SFormParmlist *self,
-    void ( CC * pwhack ) ( void*, void* ) );
-
-/* HasParams
- */
-#define SFormParmlistHasParams( self ) \
-    ( VectorLength ( & ( self ) -> parms ) != 0 || \
-      ( self ) -> varag != 0 )
-
-/* Mark
- */
-void SFormParmlistMark ( const SFormParmlist *self,
-    void ( CC * mark ) ( void*, void* ), const VSchema *schema );
-
-/* Dump
- *  dump param list
- */
-rc_t SFormParamlistDump ( const SFormParmlist *self, struct SDumper *d,
-    bool ( CC * dump ) ( void*, void* ),
-    const char *begin, const char *end, const char *empty );
-
-
-/*--------------------------------------------------------------------------
- * SFunction
- */
-typedef struct SFunction SFunction;
-struct SFunction
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* return type expression - NULL for untyped or row-length */
-    struct SExpression const *rt;
-
-    /* pointer to additional information */
-    union
-    {
-        struct
-        {
-            /* optional factory id */
-            struct KSymbol const *fact;
-
-        } ext;
-
-        struct
-        {
-            /* return statement conditional expression */
-            struct SExpression const *rtn;
-
-            /* schema productions */
-            Vector prod;
-
-            uint32_t align;
-
-        } script;
-
-    } u;
-
-    /* schema scope - i.e. indirect types and uint const */
-    BSTree sscope;
-
-    /* function scope - i.e. factory and func params, productions */
-    BSTree fscope;
-
-    /* factory parameters */
-    SFormParmlist fact;
-
-    /* function parameters */
-    SFormParmlist func;
-
-    /* schema types - indirect types, defined and owned by VSchema
-       held here for positional correlation */
-    Vector type;
-
-    /* declared version */
-    uint32_t version;
-
-    /* schema parameters - indirect uint constants */
-    Vector schem;
-
-    /* function id */
-    uint32_t id;
-
-    /* script or extern function */
-    bool script;
-
-    /* marking */
-    bool marked;
-
-    /* validate, untyped or row-length function */
-    bool validate;
-    bool untyped;
-    bool row_length;
-};
-
-/* Whack
- */
-void SFunctionDestroy ( SFunction *self );
-void CC SFunctionWhack ( void *self, void *ignore );
-
-/* Cmp
- * Sort
- */
-int64_t CC SFunctionCmp ( const void *item, const void *n );
-int64_t CC SFunctionSort ( const void *item, const void *n );
-
-/* Bind
- *  perform schema and factory param substitution
- *  returns prior param values
- */
-rc_t SFunctionBindSchemaParms ( const SFunction *self,
-    Vector *prior, const Vector *subst, Vector *cx_bind );
-rc_t SFunctionBindFactParms ( const SFunction *self,
-    Vector *parms, Vector *prior, const Vector *subst, Vector *cx_bind );
-
-/* Rest-ore
- *  restore schema and factory param substitution
- *  destroys prior param vector
- */
-void SFunctionRestSchemaParms ( const SFunction *self, Vector *prior, Vector *cx_bind );
-void SFunctionRestFactParms ( const SFunction *self, Vector *prior, Vector *cx_bind );
-
-/* Mark
- */
-void CC SFunctionClearMark ( void * self, void * ignore );
-void CC SFunctionMark ( void * item, void * data );
-void SFuncNameMark ( const SNameOverload *self, const VSchema *schema );
-
-/* Dump
- */
-rc_t SFunctionDeclDumpSchemaParms ( const SFunction *self, struct SDumper *d );
-rc_t SFunctionDeclDumpFactParms ( const SFunction *self, struct SDumper *d );
-bool CC SFunctionDeclDump ( void *item, void *dumper );
-rc_t SFunctionBodyDump ( const SFunction *self, struct SDumper *d );
-rc_t SFunctionDump ( const SFunction *self, struct SDumper *d );
-
-
-/*--------------------------------------------------------------------------
- * SPhysical
- *  physical column declaration
- */
-typedef struct SPhysical SPhysical;
-struct SPhysical
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* optional function for determining row length */
-    const SFunction *row_length;
-
-    /* encoding scripts */
-    SFunction encode, decode;
-
-    /* column type */
-    struct SExpression const *td;
-
-    /* required version */
-    uint32_t version;
-
-    /* physical decl id */
-    uint32_t id;
-
-    /* marking */
-    bool marked;
-
-    /* if only decode side exists */
-    bool read_only;
-
-    /* v0 blobs have no headers */
-    bool no_hdr;
-};
-
-/* Whack
- */
-void CC SPhysicalWhack ( void *self, void *ignore );
-
-/* Cmp
- * Sort
- */
-int64_t CC SPhysicalCmp ( const void *item, const void *n );
-int64_t CC SPhysicalSort ( const void *item, const void *n );
-
-/* Bind
- *  perform schema and factory param substitution
- *  returns prior param values
- */
-rc_t SPhysicalBindSchemaParms ( const SPhysical *self,
-    Vector *prior, const Vector *subst, Vector *cx_bind );
-rc_t SPhysicalBindFactParms ( const SPhysical *self,
-     Vector *parms, Vector *prior, const Vector *subst, Vector *cx_bind );
-
-/* Rest-ore
- *  restore schema and factory param substitution
- *  destroys prior param vector
- */
-void SPhysicalRestSchemaParms ( const SPhysical *self, Vector *prior, Vector *cx_bind );
-void SPhysicalRestFactParms ( const SPhysical *self, Vector *prior, Vector *cx_bind );
-
-/* Mark
- */
-void CC SPhysicalClearMark ( void * self, void * ignore );
-void CC SPhysicalMark ( void * item, void * data );
-void SPhysNameMark ( const SNameOverload *self, const VSchema *schema );
-
-/* Dump
- */
-bool CC SPhysicalDefDump ( void *self, void *data );
-rc_t SPhysicalDump ( const SPhysical *self, struct SDumper *d );
-
-
-/*--------------------------------------------------------------------------
- * STable
- *  table declaration
- */
-typedef struct STable STable;
-struct STable
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* optional function for determining table type */
-    const SFunction *untyped;
-
-    /* optional expression for limiting all columns' blob sizes */
-    struct SExpression const *limit;
-
-    /* optional default view declaration */
-    const String *dflt_view;
-
-    /* scope */
-    BSTree scope;
-
-    /* parents */
-    Vector parents;
-
-    /* overrides ( inherited virtual productions )
-       contents are grouped by introducing parent */
-    Vector overrides;
-
-    /* columns */
-    Vector col;
-    Vector cname;
-
-    /* explicitly declared physical column members */
-    Vector phys;
-
-    /* assignment statements */
-    Vector prod;
-
-    /* introduced virtual ( undefined ) productions
-       contents are unowned KSymbol pointers */
-    Vector vprods;
-
-    /* owned KSymbols that are not in scope */
-    Vector syms;
-
-    /* source file & line */
-    String src_file;
-    uint32_t src_line;
-
-    /* required version */
-    uint32_t version;
-
-    /* table id */
-    uint32_t id;
-
-    /* marking */
-    bool marked;
-};
-
-/* Whack
- */
-void CC STableWhack ( void *self, void *ignore );
-
-/* CloneExtend
- *  creates an initially transparent table extension
- *  used by cursor to permit addition of implicit productions
- */
-rc_t STableCloneExtend ( const STable *self, STable **clone, VSchema *schema );
-
-/* Cmp
- * Sort
- */
-int64_t CC STableCmp ( const void *item, const void *n );
-int64_t CC STableSort ( const void *item, const void *n );
-
-/* Find
- *  generic object find within table scope
- *
- *  "td" [ OUT, NULL OKAY ] - returns cast type expression
- *  if given or "any" if not
- *
- *  "name" [ OUT ] - returns list of overloaded objects if found
- *
- *  "type" [ OUT ] - returns object type id, e.g.:
- *    eDatatype, eTypeset, eFormat, eFunction, ePhysical, eTable, ...
- *
- *  "expr" [ IN ] - NUL terminated name expression identifying object
- *
- *  "ctx" [ IN ] - NUL terminated context string for evaluation,
- *  substitutes for filename in logging reports
- *
- *  "dflt" [ IN ] - if true, resolve default value
- *
- *  returns principal object identified. if NULL but "name" is not
- *  NULL, then the object was only partially identified.
- */
-const void *STableFind ( const STable *self,
-    const VSchema *schema, VTypedecl *td, const SNameOverload **name,
-    uint32_t *type, const char *expr, const char *ctx, bool dflt );
-
-
-/* FindOverride
- *  finds an inherited or introduced overridden symbol
- */
-struct KSymbol *STableFindOverride ( const STable *self, const VCtxId *cid );
-
-/* FindOrdAncestor
- *  finds a parent or grandparent by order
- */
-const STable *STableFindOrdAncestor ( const STable *self, uint32_t i );
-
-/* Mark
- */
-void CC STableClearMark ( void *self, void *ignore );
-/*
-void CC STableMark ( const STable *self, const VSchema *schema );
-*/
-void STableNameMark ( const SNameOverload *self, const VSchema *schema );
-
-/* Dump
- *  dump "table" { }
- */
-bool CC STableDefDump ( void *self, void *dumper );
-rc_t STableDump ( const STable *self, struct SDumper *d );
-
-rc_t VSchemaDumpTableName ( const VSchema *self, uint32_t mode, const STable *stbl,
-    rc_t ( CC * flush ) ( void *dst, const void *buffer, size_t bsize ), void *dst );
-rc_t VSchemaDumpTableDecl ( const VSchema *self, uint32_t mode, const STable *stbl,
-    rc_t ( CC * flush ) ( void *dst, const void *buffer, size_t bsize ), void *dst );
-
-
-/*--------------------------------------------------------------------------
- * SColumn
- *  column declaration
- */
-typedef struct SColumn SColumn;
-struct SColumn
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* read productions */
-    struct SExpression const *read;
-
-    /* validation productions */
-    struct SExpression const *validate;
-
-    /* page size limit */
-    struct SExpression const *limit;
-
-    /* physical type expression */
-    struct SExpression const *ptype;
-
-    /* typedecl */
-    VTypedecl td;
-
-    /* contextual id */
-    VCtxId cid;
-
-    /* if true, this column is default for name */
-    bool dflt;
-
-    /* if read-only, there must be a read expression */
-    bool read_only;
-
-    /* if no read or validate expression exists
-       and no corresponding physical member exists */
-    bool simple;
-};
-
-/* Whack
- */
-void CC SColumnWhack ( void *item, void *ignore );
-
-/* Cmp
- *  compare a const VTypedecl* against const SColumn*
- * Sort
- *  compare two const SColumn*
- */
-int64_t CC SColumnCmp ( const void *item, const void *n );
-int64_t CC SColumnSort ( const void *item, const void *n );
-
-
-/* ImplicitColMember
- *  adds an implicit column member of simple or incomplete type
- *
- *  "cname" [ IN ] - column name
- *
- *  "pname" [ IN ] - name of physical column
- */
-rc_t STableImplicitColMember ( STable *self,
-    struct String const *cname, struct String const *pname );
-
-/* Dump
- */
-bool CC SColumnDefDump ( void *item, void *dumper );
-rc_t SColumnDump ( const SColumn *self, struct SDumper *d );
-
-
-/*--------------------------------------------------------------------------
- * SPhysMember
- *  physical member
- */
-typedef struct SPhysMember SPhysMember;
-struct SPhysMember
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* column type expression */
-    struct SExpression const *type;
-
-    /* assignment expression */
-    struct SExpression const *expr;
-
-    /* column datatype */
-    VTypedecl td;
-
-    /* contextual id */
-    VCtxId cid;
-
-    /* if static, it is implemented in table metadata */
-    bool stat;
-
-    /* it simple, the member was implicitly declared */
-    bool simple;
-};
-
-/* Whack
- */
-void CC SPhysMemberWhack ( void *item, void *ignore );
-
-/* ImplicitPhysMember
- *  adds an implicit physical member of simple or incomplete type
- *
- *  "td" [ IN, NULL OKAY ] - type of member, if known
- *
- *  "sym" [ IN, NULL OKAY ] - optional symbol to be overridden
- *
- *  "name" [ IN ] - name of new symbol to be created if "sym" is NULL
- */
-rc_t STableImplicitPhysMember ( STable *self, const VTypedecl *td,
-    struct KSymbol *sym, struct String const *name );
-
-/* Mark
- */
-/*
-void CC SPhysMemberMark ( const SPhysMember *self, const VSchema *schema );
-*/
-
-/* Dump
- */
-bool CC SPhysMemberDefDump ( void *item, void *dumper );
-rc_t SPhysMemberDump ( const SPhysMember *self, struct SDumper *d );
-
-
-/*--------------------------------------------------------------------------
- * SDatabase
- *  database declaration
- */
-typedef struct SDatabase SDatabase;
-struct SDatabase
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* scope */
-    BSTree scope;
-
-    /* parents */
-    const SDatabase *dad;
-
-    /* databases */
-    Vector db;
-
-    /* tables */
-    Vector tbl;
-
-    /* required version */
-    uint32_t version;
-
-    /* database id */
-    uint32_t id;
-
-    /* marking */
-    bool marked;
-};
-
-/* Whack
- */
-void CC SDatabaseWhack ( void *self, void *ignore );
-
-/* Cmp
- * Sort
- */
-int64_t CC SDatabaseCmp ( const void *item, const void *n );
-int64_t CC SDatabaseSort ( const void *item, const void *n );
-
-/* Find
- *  generic object find within database scope
- *
- *  "name" [ OUT ] - returns list of overloaded objects if found
- *
- *  "type" [ OUT ] - returns object type id, e.g.:
- *    eDatatype, eTypeset, eFormat, eFunction, ePhysical, eTable, ...
- *
- *  "expr" [ IN ] - NUL terminated name expression identifying object
- *
- *  "ctx" [ IN ] - NUL terminated context string for evaluation,
- *  substitutes for filename in logging reports
- *
- *  returns principal object identified. if NULL but "name" is not
- *  NULL, then the object was only partially identified.
- */
-const void *SDatabaseFind ( const SDatabase *self,
-    const VSchema *schema, const SNameOverload **name,
-    uint32_t *type, const char *expr, const char *ctx );
-
-/* Mark
- */
-void CC SDatabaseClearMark ( void *self, void *ignore );
-void CC SDatabaseMark ( void * item, void * data );
-void CC SDatabaseNameMark ( const SNameOverload *self, const VSchema *schema );
-
-/* Dump
- *  dump "database" { }
- */
-bool CC SDatabaseDefDump ( void *self, void *dumper );
-rc_t SDatabaseDump ( const SDatabase *self, struct SDumper *d );
-
-
-/*--------------------------------------------------------------------------
- * STblMember
- *  table member
- */
-typedef struct STblMember STblMember;
-struct STblMember
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* table declaration */
-    const STable *tbl;
-
-    /* contextual id */
-    VCtxId cid;
-
-    /* is a template */
-    bool tmpl;
-};
-
-/* Whack
- */
-#define STblMemberWhack VectMbrWhack
-
-void CC STableMark ( void * item, void * data );
-
-/* Dump
- */
-bool CC STblMemberDefDump ( void *item, void *dumper );
-rc_t STblMemberDump ( const STblMember *self, struct SDumper *d );
-
-
-/*--------------------------------------------------------------------------
- * SDBMember
- *  sub-db member
- */
-typedef struct SDBMember SDBMember;
-struct SDBMember
-{
-    /* symbolic name */
-    struct KSymbol const *name;
-
-    /* database declaration */
-    const SDatabase *db;
-
-    /* contextual id */
-    VCtxId cid;
-
-    /* is a template */
-    bool tmpl;
-};
-
-/* Whack
- */
-#define SDBMemberWhack VectMbrWhack
-
-/* Dump
- */
-bool CC SDBMemberDefDump ( void *item, void *dumper );
-rc_t SDBMemberDump ( const SDBMember *self, struct SDumper *d );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_schema_priv_ */
diff --git a/libs/vdb/schema-prod.c b/libs/vdb/schema-prod.c
deleted file mode 100644
index 785fbf7..0000000
--- a/libs/vdb/schema-prod.c
+++ /dev/null
@@ -1,1004 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include "schema-priv.h"
-#include "schema-parse.h"
-#include "schema-expr.h"
-#include "schema-dump.h"
-
-#include <klib/symbol.h>
-#include <klib/symtab.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * SProduction
- *  describes a schema production/statement
- */
-#if SLVL >= 3
-
-/* Whack
- */
-void CC SProductionWhack ( void *item, void *ignore )
-{
-    SProduction *s = item;
-    SExpressionWhack ( s -> expr );
-    SExpressionWhack ( s -> fd );
-    free ( s );
-}
-
-/* Mark
- */
-void CC SProductionMark ( void * item, void * data )
-{
-    const SProduction * self = item;
-    if ( self != NULL )
-    {
-        SExpressionMark ( ( void * )self -> fd, data );
-        SExpressionMark ( ( void * )self -> expr, data );
-    }
-}
-
-/* Dump
- *  dump production
- */
-rc_t SProductionDump ( const SProduction *self, struct SDumper *d )
-{
-    if ( self == NULL )
-        return KSymbolDump ( NULL, d );
-    if ( ! self -> control )
-        return KSymbolDump ( self -> name, d );
-    return SDumperPrint ( d, "control %N", self -> name );
-}
-
-bool CC SProductionDefDump ( void *item, void *data )
-{
-    SDumper *b = data;
-    const SProduction *self = ( const void* ) item;
-
-    /* function params are waiting for an expression */
-    if ( self -> expr == NULL )
-        b -> rc = SDumperPrint ( b, "%E %N", self -> fd, self -> name );
-    else
-    {
-        bool compact = SDumperMode ( b ) == sdmCompact ? true : false;
-        if ( self -> trigger )
-        {
-            b -> rc = SDumperPrint ( b, compact ? "trigger %N=%E;" : "\ttrigger %N = %E;\n"
-                                     , self -> name
-                                     , self -> expr );
-        }
-        else
-        {
-            b -> rc = SDumperPrint ( b, compact ? "%E %N=%E;" : "\t%E %N = %E;\n"
-                                     , self -> fd
-                                     , self -> name
-                                     , self -> expr );
-        }
-    }
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-
-#endif
-
-
-/*--------------------------------------------------------------------------
- * SFunction
- *  describes a schema function
- */
-#if SLVL >= 4
-
-/* Dump
- */
-rc_t SFunctionBodyDump ( const SFunction *self, SDumper *b )
-{
-    bool compact = SDumperMode ( b ) == sdmCompact ? true : false;
-
-    if ( VectorLength ( & self -> u . script . prod ) == 0 )
-    {
-        b -> rc = SDumperPrint ( b, compact ?
-            "{return %E;}" : "\t{ return %E; }\n",
-            self -> u . script . rtn );
-    }
-    else
-    {
-        b -> rc = SDumperPrint ( b, compact ? "{" : "\t{\n" );
-        if ( b -> rc == 0 )
-        {
-            if ( ! compact )
-                SDumperIncIndentLevel ( b );
-            if ( ! VectorDoUntil ( & self -> u . script . prod, false, SProductionDefDump, b ) )
-                b -> rc = SDumperPrint ( b, compact ? "return %E;" : "\treturn %E;\n", self -> u . script . rtn );
-            if ( ! compact )
-                SDumperDecIndentLevel ( b );
-        }
-        if ( b -> rc == 0 )
-            b -> rc = SDumperPrint ( b, compact ? "}" : "\t}\n" );
-    }
-
-    return b -> rc;
-}
-
-#endif
-
-/*--------------------------------------------------------------------------
- * SPhysical
- */
-
-#if SLVL >= 5
-
-/* Whack
- */
-void CC SPhysicalWhack ( void *n, void *ignore )
-{
-    SPhysical *self = n;
-
-    /* if any schema or factory parameters were given, the objects
-       have been shared between encode and decode schema funcs, and
-       the schema names are also shared between funcs. wipe out the
-       encode copy and leave ownership with decode */
-    BSTreeInit ( & self -> encode . sscope );
-    VectorInit ( & self -> encode . fact . parms, 0, 1 );
-    VectorInit ( & self -> encode . type, 0, 1 );
-    VectorInit ( & self -> encode . schem, 0, 1 );
-
-    /* now allow normal destruction to proceed */
-    SFunctionDestroy ( & self -> encode );
-    SFunctionDestroy ( & self -> decode );
-    SExpressionWhack ( self -> td );
-
-    free ( self );
-}
-
-/* Cmp
- * Sort
- */
-int64_t CC SPhysicalCmp ( const void *item, const void *n )
-{
-    const uint32_t *a = item;
-    const SPhysical *b = n;
-
-    if ( * a > b -> version )
-        return 1;
-    return ( int64_t ) ( * a >> 24 ) - ( int64_t ) ( b -> version >> 24 );
-}
-
-int64_t CC SPhysicalSort ( const void *item, const void *n )
-{
-    const SPhysical *a = item;
-    const SPhysical *b = n;
-
-    return ( int64_t ) ( a -> version >> 24 ) - ( int64_t ) ( b -> version >> 24 );
-}
-
-/* Bind
- *  perform schema and factory param substitution
- *  returns prior param values
- */
-rc_t SPhysicalBindSchemaParms ( const SPhysical *self,
-    Vector *prior, const Vector *subst, Vector *cx_bind )
-{
-    return SFunctionBindSchemaParms ( & self -> decode, prior, subst, cx_bind );
-}
-
-rc_t SPhysicalBindFactParms ( const SPhysical *self,
-    Vector *parms, Vector *prior, const Vector *subst, Vector *cx_bind )
-{
-    return SFunctionBindFactParms ( & self -> decode, parms, prior, subst, cx_bind );
-}
-
-/* Rest-ore
- *  restore schema and factory param substitution
- *  destroys prior param vector
- */
-void SPhysicalRestSchemaParms ( const SPhysical *self, Vector *prior, Vector *cx_bind )
-{
-    SFunctionRestSchemaParms ( & self -> decode, prior, cx_bind );
-}
-
-void SPhysicalRestFactParms ( const SPhysical *self, Vector *prior, Vector *cx_bind )
-{
-    SFunctionRestFactParms ( & self -> decode, prior, cx_bind );
-}
-
-/* Mark
- */
-void CC SPhysicalClearMark ( void *item, void *ignore )
-{
-    SPhysical *self = item;
-    self -> marked = false;
-    self -> encode . marked = false;
-    self -> decode . marked = false;
-}
-
-void VSchemaClearPhysMark ( const VSchema *self )
-{
-    if ( self -> dad != NULL )
-        VSchemaClearPhysMark ( self -> dad );
-    VectorForEach ( & self -> phys, false, SPhysicalClearMark, NULL );
-}
-
-void CC SPhysicalMark ( void * item, void * data )
-{
-    SPhysical *self = item;
-    if ( self != NULL && ! self -> marked )
-    {
-        self -> marked = true;
-        SExpressionMark ( ( void * )self -> td, data );
-        SFunctionMark ( ( void * )& self -> encode, data );
-        SFunctionMark ( ( void * )& self -> decode, data );
-    }
-}
-
-void SPhysNameMark ( const SNameOverload *self, const VSchema *schema )
-{
-    if ( self != NULL )
-    {
-        VectorForEach ( & self -> items, false, SPhysicalMark, ( void* ) schema );
-    }
-}
-
-/* Dump
- */
-rc_t SPhysicalDump ( const SPhysical *self, SDumper *d )
-{
-    return FQNDump ( self != NULL ? self -> name : NULL, d );
-}
-
-bool CC SPhysicalDefDump ( void *n, void *data )
-{
-    SDumper *b = data;
-    const SPhysical *self = ( const void* ) n;
-    bool compact = SDumperMode ( b ) == sdmCompact ? true : false;
-
-    if ( SDumperMarkedMode ( b ) && ! self -> marked )
-        return false;
-
-    /* a physical column */
-    b -> rc = SDumperPrint ( b, "physical " );
-
-    /* could have schema parameters */
-    if ( b -> rc == 0 )
-        b -> rc = SFunctionDeclDumpSchemaParms ( & self -> decode, b );
-
-    /* issue __no_header for v0 encodings */
-    if ( b -> rc == 0 && self -> no_hdr )
-        b -> rc = SDumperPrint ( b, "__no_header " );
-
-    /* a return type expression followed by column typename */
-    if ( b -> rc == 0 )
-        b -> rc = SDumperPrint ( b, "%E %N", self -> td, self -> name );
-
-    /* versions are mandatory */
-    if ( b -> rc == 0 )
-        b -> rc = SDumperVersion ( b, self -> version );
-
-    /* could have factory parameters */
-    if ( b -> rc == 0 )
-        b -> rc = SFunctionDeclDumpFactParms ( & self -> decode, b );
-
-    /* physical body */
-    if ( b -> rc == 0 )
-    {
-        b -> rc = SDumperPrint ( b, compact ? "{" : "\n\t{\n" );
-        if ( b -> rc == 0 )
-        {
-            if ( ! compact )
-                SDumperIncIndentLevel ( b );
-
-            if ( self -> encode . u . script . rtn != NULL )
-            {
-                b -> rc = SDumperPrint ( b, compact ? "encode" : "\tencode\n" );
-                if ( b -> rc == 0 )
-                    b -> rc = SFunctionBodyDump ( & self -> encode, b );
-            }
-            if ( b -> rc == 0 )
-                b -> rc = SDumperPrint ( b, compact ? "decode" : "\tdecode\n" );
-            if ( b -> rc == 0 )
-                b -> rc = SFunctionBodyDump ( & self -> decode, b );
-
-            if ( ! compact )
-                SDumperDecIndentLevel ( b );
-        }
-        if ( b -> rc == 0 )
-            b -> rc = SDumperPrint ( b, compact ? "}" : "\t}\n" );
-    }
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-
-#endif
-
-
-/*--------------------------------------------------------------------------
- * VSchema
- */
-
-#if SLVL >= 4
-
-/*
- * production-stmt    = <func-fmtdecl> ID <assign-expr>
- *                    | 'trigger' ID <assign-expr>
- */
-rc_t production_stmt ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, Vector *v, uint32_t ptype )
-{
-    rc_t rc;
-    String id;
-    KSymbol *sym;
-
-    SProduction *prod = malloc ( sizeof *prod );
-    if ( prod == NULL )
-    {
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-        return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    memset ( prod, 0, sizeof * prod );
-
-    /* look for trigger production */
-    if ( ptype == eTable && t -> id == kw_trigger )
-    {
-        prod -> trigger = true;
-        next_token ( tbl, src, t );
-    }
-    else
-    {
-        KToken t2 = * t;
-
-        /* variable type */
-        rc = type_expr ( tbl, src, t, env, self, & prod -> fd );
-        if ( rc != 0 )
-        {
-            free ( prod );
-            return KTokenExpected ( t, klogErr, "type declaration" );
-        }
-
-        /* disallow formatted types within table */
-        if ( ptype == eTable && ( ( const STypeExpr* ) prod -> fd ) -> fmt != NULL )
-        {
-            SExpressionWhack ( prod -> fd );
-            free ( prod );
-            return KTokenExpected ( & t2, klogErr, "unformatted type declaration" );
-        }
-    }
-
-    /* catch defined identifiers */
-    if ( t -> sym != NULL && t -> id != eForward && t -> id != eVirtual )
-    {
-        /* if this is not a table or the symbol is not a production */
-        if ( ptype != eTable || t -> id != eProduction )
-        {
-            /* re-interpret this token in schema and intrinsic scopes */
-            KTokenSourceReturn ( src, t );
-            next_shallow_token ( tbl, src, t, true );
-        }
-    }
-
-    /* require an identifier or a forward reference */
-    sym = NULL;
-    if ( t -> id == eForward || t -> id == eVirtual )
-        sym = t -> sym;
-    else if ( t -> id != eIdent )
-    {
-        SProductionWhack ( prod, NULL );
-        return KTokenExpected ( t, klogErr, "production name" );
-    }
-
-    /* remember identifier */
-    id = t -> str;
-
-    /* within the production, only '=' is accepted for assignment
-       this could certainly change in the future... */
-    if ( next_token ( tbl, src, t ) -> id != eAssign )
-    {
-        SProductionWhack ( prod, NULL );
-        return KTokenExpected ( t, klogErr, "=" );
-    }
-
-    /* parse conditional expression */
-    rc = cond_expr ( tbl, src, next_token ( tbl, src, t ),
-        env, self, & prod -> expr );
-    if ( rc == 0 )
-    {
-        /* create symbolic name for production and insert */
-        if ( sym == NULL )
-            rc = KSymTableCreateConstSymbol ( tbl, & prod -> name, & id, eProduction, prod );
-        else
-        {
-            /* convert forward reference or virtual to production */
-            sym -> type = eProduction;
-            sym -> u . obj = prod;
-            prod -> name = sym;
-        }
-        if ( rc == 0 )
-        {
-            /* ctx = 0 for params, ctx == 1 for productions */
-            prod -> cid . ctx = 1;
-            rc = VectorAppend ( v, & prod -> cid . id, prod );
-        }
-        if ( rc != 0 )
-            KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    /* cleanup */
-    if ( rc != 0 )
-        SProductionWhack ( prod, NULL );
-
-    return rc;
-}
-
-/*
- * schema-stmt        = 'return' <cond-expr>
- *                    | <production-stmt>
- */
-static
-rc_t script_stmt ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SFunction *f )
-{
-    rc_t rc;
-
-    if ( t -> id == kw_return )
-    {
-        /* disallow multiple return statements */
-        if ( f -> u . script . rtn != NULL )
-        {
-            rc = RC ( rcVDB, rcSchema, rcParsing, rcToken, rcExists );
-            return KTokenRCExplain ( t, klogErr, rc );
-        }
-
-        /* just get a conditional expression */
-        rc = cond_expr ( tbl, src, next_token ( tbl, src, t ),
-            env, self, & f -> u . script . rtn );
-    }
-    else
-    {
-        rc = production_stmt ( tbl, src, t, env, self,
-            & f -> u . script . prod, eScriptFunc );
-    }
-
-    if ( rc == 0 )
-        rc = expect ( tbl, src, t, eSemiColon, ";", true );
-
-    return rc;
-}
-
-
-/*
- * schema-body        = '{' <script-stmts> '}'
- *
- * script-stmts       = <script-stmt> ';' [ <script-stmts> ]
- */
-static
-rc_t schema_body ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SFunction *f )
-{
-    /* always open braces */
-    rc_t rc = expect ( tbl, src, t, eLeftCurly, "{", true );
-    if ( rc != 0 )
-        return rc;
-
-    /* expect at least one statement */
-    rc = script_stmt ( tbl, src, t, env, self, f );
-    if ( rc != 0 )
-        return rc;
-
-    /* handle statement list */
-    while ( t -> id != eRightCurly )
-    {
-        rc = script_stmt ( tbl, src, t, env, self, f );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* must have a return statement */
-    if ( f -> u . script . rtn  == NULL )
-        return KTokenExpected ( t, klogErr, "return statement" );
-
-    /* looks like a script function */
-    f -> script = true;
-
-    /* close braces */
-    return expect ( tbl, src, t, eRightCurly, "}", true );
-}
-
-static
-bool CC script_prod_syntax ( void *item, void *data )
-{
-    rc_t *rc = data;
-    SProduction *prod = item;
-
-    assert ( prod -> name != NULL );
-    assert ( prod -> name -> type == eProduction );
-
-    * rc = eval_expr_syntax ( prod -> fd );
-    if ( * rc == 0 )
-        * rc = eval_expr_syntax ( prod -> expr );
-
-    return ( * rc != 0 ) ? true : false;
-}
-
-static
-bool CC script_sym_syntax ( BSTNode *n, void *data )
-{
-    rc_t *rc = data;
-    KSymbol *sym = ( KSymbol* ) n;
-
-    if ( sym -> type == eForward )
-    {
-        * rc = RC ( rcVDB, rcSchema, rcParsing, rcName, rcUndefined );
-        return true;
-    }
-
-    return false;
-}
-
-static
-rc_t script_syntax ( const VSchema *self, SFunction *f )
-{
-    rc_t rc = eval_expr_syntax ( f -> u . script . rtn );
-    if ( rc == 0 )
-    {
-        BSTreeDoUntil ( & f -> fscope,
-            false, script_sym_syntax, & rc );
-    }
-    if ( rc == 0 )
-        VectorDoUntil ( & f -> u . script . prod, false, script_prod_syntax, & rc );
-    return rc;
-}
-
-/*
- * script-body        = '{' <script-stmts> '}'
- */
-rc_t script_body ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SFunction *f )
-{
-    /* enter schema scope */
-    rc_t rc = KSymTablePushScope ( tbl, & f -> sscope );
-    if ( rc != 0 )
-        KTokenRCExplain ( t, klogInt, rc );
-    else
-    {
-        /* enter function scope */
-        rc = KSymTablePushScope ( tbl, & f -> fscope );
-        if ( rc != 0 )
-            KTokenRCExplain ( t, klogInt, rc );
-        else
-        {
-            /* parse '{' statements; '}' */
-            VectorInit ( & f -> u . script . prod, 0, 8 );
-            rc = schema_body ( tbl, src, t, env, self, f );
-
-            /* leave function scope */
-            KSymTablePopScope ( tbl );
-        }
-
-        /* leave schema scope */
-        KSymTablePopScope ( tbl );
-    }
-
-    if ( rc == 0 )
-        rc = script_syntax ( self, f );
-
-    return rc;
-}
-
-#endif /* SLVL >= 4 */
-
-#if SLVL >= 5
-
-static
-rc_t rowlen_func_expr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SPhysical *p )
-{
-    const SNameOverload *name;
-
-    /* expecting a function assignment */
-    rc_t rc = expect ( tbl, src,
-        next_token ( tbl, src, t ), eAssign, "=", true );
-    if ( rc == 0 )
-        rc = next_fqn ( tbl, src, t, env );
-    if ( rc != 0 )
-        return rc;
-    if ( t -> id != eRowLengthFunc )
-        return KTokenExpected ( t, klogErr, "row length function expression" );
-    name = t -> sym -> u . obj;
-
-    rc = expect ( tbl, src,
-        next_token ( tbl, src, t ), eLeftParen, "(", true );
-    if ( rc == 0 )
-        rc = expect ( tbl, src, t, eRightParen, ")", true );
-    if ( rc == 0 )
-        rc = expect ( tbl, src, t, eSemiColon, ";", true );
-
-    if ( rc == 0 )
-    {
-        p -> row_length = VectorLast ( & name -> items );
-        if ( p -> row_length == NULL )
-        {
-            rc = RC ( rcVDB, rcSchema, rcParsing, rcFunction, rcNotFound );
-            KTokenRCExplain ( t, klogErr, rc );
-        }
-    }
-
-    return rc;
-}
-
-/*
- * physical-stmt      = 'encode' <script-body>
- *                    | 'decode' <script-body>
- */
-static
-rc_t physical_stmt ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SPhysical *p, bool encoding )
-{
-    rc_t rc;
-    String symstr;
-    SFunction *f = encoding ? & p -> encode : & p -> decode;
-
-    /* simulate a schema function signature */
-    SProduction *parm = malloc ( sizeof * parm );
-    if ( parm == NULL )
-    {
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-        return KTokenRCExplain ( t, klogInt, rc );
-    }
-    memset ( parm, 0, sizeof * parm );
-    VectorInit ( & f -> func . parms, 0, 1 );
-    rc = VectorAppend ( & f -> func . parms, & parm -> cid . id, parm );
-    if ( rc != 0 )
-    {
-        free ( parm );
-        return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    /* enter schema scope */
-    rc = KSymTablePushScope ( tbl, & f -> sscope );
-    if ( rc != 0 )
-        KTokenRCExplain ( t, klogInt, rc );
-    else
-    {
-        /* enter param scope */
-        rc = KSymTablePushScope ( tbl, & f -> fscope );
-        if ( rc != 0 )
-            KTokenRCExplain ( t, klogInt, rc );
-        else
-        {
-            /* create special input symbol */
-            CONST_STRING ( & symstr, "@" );
-            rc = KSymTableCreateConstSymbol ( tbl, & parm -> name,
-                & symstr, eFuncParam, parm );
-            if ( rc != 0 )
-                KTokenRCExplain ( t, klogInt, rc );
-            else
-            {
-                VectorInit ( & f -> u . script . prod, 0, 8 );
-                rc = schema_body ( tbl, src, t, env, self, f );
-            }
-
-            /* exit param scope */
-            KSymTablePopScope ( tbl );
-        }
-
-        /* exit schema scope */
-        KSymTablePopScope ( tbl );
-    }
-
-    return rc;
-}
-
-/*
- * physical-decl      = 'physical' [ 'column' ] <typedecl>
- *                       <fqn> '#' <maj-min-rel> <phys-body>
- * phys-body          =  '{' <physical-stmts> '}'
- * physical-stmt      = 'encode' <script-body>
- *                    | 'decode' <script-body>
- *                    | '__row_length = <func-expr>
- *                    | ';'
- */
-static
-rc_t physical_decl ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SPhysical *p )
-{
-    rc_t rc;
-    const char *expected;
-
-    /* could have schema parameters */
-    if ( t -> id == eLeftAngle )
-    {
-        /* enter schema param scope */
-        rc = KSymTablePushScope ( tbl, & p -> decode . sscope );
-        if ( rc != 0 )
-            return KTokenRCExplain ( t, klogInt, rc );
-
-        /* parse schema params */
-        rc = schema_signature ( tbl, src, t, env, self, & p -> decode );
-
-        /* copy schema parameters to encode function
-           NB - must be cleared before destruction */
-        p -> encode . sscope = p -> decode . sscope;
-        p -> encode . type = p -> decode . type;
-        p -> encode . schem = p -> decode. schem;
-
-        /* interpret return type within schema param scope */
-        if ( rc == 0 )
-        {
-            rc = type_expr ( tbl, src, t, env, self, & p -> td );
-            if ( rc != 0 )
-                KTokenFailure ( t, klogErr, rc, "column typedecl" );
-        }
-
-        /* pop scope */
-        KSymTablePopScope ( tbl );
-
-        /* bail on problems */
-        if ( rc != 0 )
-            return rc;
-
-        /* "t" contains a lookahead token. while unlikely,
-           it could have matched something defined in schema
-           param scope. re-evaluate if possible */
-        if ( t -> sym != NULL ) switch ( t -> sym -> type )
-        {
-        case eSchemaType:
-        case eSchemaParam:
-            KTokenSourceReturn ( src, t );
-            next_token ( tbl, src, t );
-            break;
-        }
-    }
-    else
-    {
-        /* allow v0 columns to be declared with no blob header */
-        if ( t -> id == kw___no_header )
-        {
-            p -> no_hdr = true;
-            next_token ( tbl, src, t );
-        }
-
-        /* get column type expression */
-        rc = type_expr ( tbl, src, t, env, self, & p -> td );
-        if ( rc != 0 )
-            return KTokenExpected ( t, klogErr, "column typedecl" );
-    }
-
-    /* expect fully-qualified name */
-    rc = create_fqn ( tbl, src, t, env, ePhysical, NULL );
-    if ( rc != 0 && GetRCState ( rc ) != rcExists )
-        return KTokenFailure ( t, klogErr, rc, "column typename" );
-    p -> name = t -> sym;
-
-    /* must have a version */
-    if ( next_token ( tbl, src, t ) -> id != eHash )
-        return KTokenExpected ( t, klogErr, "#" );
-    next_token ( tbl, src, t );
-    rc = maj_min_rel ( tbl, src, t, env, self, & p -> version, false );
-    if ( rc != 0 )
-        return rc;
-
-    /* factory params */
-    if ( t -> id == eLeftAngle )
-    {
-        rc = KSymTablePushScope ( tbl, & p -> decode . sscope );
-        if ( rc != 0 )
-            return KTokenRCExplain ( t, klogInt, rc );
-        rc = KSymTablePushScope ( tbl, & p -> decode . fscope );
-        if ( rc != 0 )
-            KTokenRCExplain ( t, klogInt, rc );
-        else
-        {
-            rc = fact_signature ( tbl, src, t, env, self, & p -> decode . fact );
-            if ( rc == 0 )
-            {
-                /* copy factory parameters to encode function
-                   NB - must be cleared before destruction */
-                p -> encode . fact = p -> decode . fact;
-
-                /* clone factory parameter symbols */
-                if ( BSTreeDoUntil ( & p -> decode . fscope, false, KSymbolCopyScope, & p -> encode . fscope ) )
-                    rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-            }
-
-            KSymTablePopScope ( tbl );
-        }
-
-        KSymTablePopScope ( tbl );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* allow shorthand for decode-only */
-    if ( t -> id == eAssign )
-    {
-        next_token ( tbl, src, t );
-        rc = physical_stmt ( tbl, src, t, env, self, p, false );
-        if ( rc == 0 )
-            p -> read_only = true;
-        return rc;
-    }
-
-    /* open body */
-    rc = expect ( tbl, src, t, eLeftCurly, "{", true );
-    if ( rc != 0 )
-        return rc;
-
-    /* gather both parts */
-    expected = p -> no_hdr ? "decode" : "decode or encode";
-    while ( t -> id != eRightCurly )
-    {
-        if ( t -> id == eSemiColon )
-            next_token ( tbl, src, t );
-        else if ( t -> id == kw_decode && p -> decode . u . script . rtn == NULL )
-        {
-            next_token ( tbl, src, t );
-            rc = physical_stmt ( tbl, src, t, env, self, p, false );
-            if ( rc != 0 )
-                return rc;
-            expected = ( p -> encode . u . script . rtn == NULL ) ? "encode" : "}";
-        }
-        else if ( t -> id == kw_encode && p -> encode . u . script . rtn == NULL && ! p -> no_hdr )
-        {
-            next_token ( tbl, src, t );
-            rc = physical_stmt ( tbl, src, t, env, self, p, true );
-            if ( rc != 0 )
-                return rc;
-            expected = ( p -> decode . u . script . rtn == NULL ) ? "decode" : "}";
-        }
-        else if ( t -> id == kw___row_length && p -> row_length == NULL && p -> no_hdr )
-        {
-            rc = rowlen_func_expr ( tbl, src, t, env, self, p );
-            if ( rc != 0 )
-                return rc;
-        }
-        else
-        {
-            return KTokenExpected ( t, klogErr, expected );
-        }
-    }
-
-    /* must have at least a decoding */
-    if ( p -> decode . u . script . rtn == NULL )
-        return KTokenExpected ( t, klogErr, "decode" );
-
-    /* close */
-    rc = expect ( tbl, src, t, eRightCurly, "}", true );
-    if ( rc == 0 )
-    {
-        /* detect read-only decl */
-        if ( p -> encode . u . script . rtn == NULL )
-            p -> read_only = true;
-        else
-        {
-            /* patch up input parameter to encoding */
-            SProduction *parm = VectorGet ( & p -> encode . func . parms, 0 );
-            assert ( parm != NULL );
-            parm -> fd = p -> td;
-            atomic32_inc ( & ( ( SExpression* ) p -> td ) -> refcount );
-        }
-    }
-
-    return rc;
-}
-
-static
-void init_function ( SFunction *f )
-{
-    memset ( f, 0, sizeof * f );
-    f -> script = true;
-}
-
-rc_t physical_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    rc_t rc;
-    void *ignore;
-
-    SPhysical *p = malloc ( sizeof * p );
-    if ( p == NULL )
-    {
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-        return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    p -> name = NULL;
-    p -> row_length = NULL;
-    init_function ( & p -> encode );
-    init_function ( & p -> decode );
-    p -> td = NULL;
-    p -> read_only = false;
-    p -> no_hdr = false;
-
-    if ( t -> id == kw_column )
-        next_token ( tbl, src, t );
-
-    rc = physical_decl ( tbl, src, t, env, self, p );
-    if ( rc == 0 )
-    {
-        SNameOverload *name = ( void* ) p -> name -> u . obj;
-        if ( name == NULL )
-        {
-            rc = SNameOverloadMake ( & name, p -> name, 0, 8 );
-            if ( rc == 0 )
-            {
-                rc = VectorAppend ( & self -> pname, & name -> cid . id, name );
-                if ( rc != 0 )
-                    SNameOverloadWhack ( name, NULL );
-            }
-        }
-
-        if ( rc == 0 )
-        {
-            rc = VectorAppend ( & self -> phys, & p -> id, p );
-            if ( rc == 0 )
-            {
-                uint32_t idx;
-                rc = VectorInsertUnique ( & name -> items, p, & idx, SPhysicalSort );
-                if ( rc == 0 )
-                    return 0;
-                if ( GetRCState ( rc ) != rcExists )
-                    VectorSwap ( & self -> phys, p -> id, NULL, & ignore );
-                else
-                {
-                    SPhysical *exist = VectorGet ( & name -> items, idx );
-                    if ( p -> version > exist -> version )
-                    {
-                        VectorSwap ( & name -> items, idx, p, & ignore );
-                        if ( ( const void* ) name != exist -> name -> u . obj )
-                            return 0;
-                        assert ( exist -> id >= VectorStart ( & self -> phys ) );
-                        assert ( exist -> id < p -> id );
-                        VectorSwap ( & self -> phys, p -> id, NULL, & ignore );
-                        VectorSwap ( & self -> phys, p -> id = exist -> id, p, & ignore );
-                        p = exist;
-                    }
-
-                    /* exists is not an error */
-                    rc = 0;
-                }
-
-                VectorSwap ( & self -> phys, p -> id, NULL, & ignore );
-            }
-        }
-    }
-    else if ( GetRCState ( rc ) == rcExists )
-    {
-        rc = 0;
-    }
-    
-    SPhysicalWhack ( p, NULL );
-
-    return rc;
-}
-
-#endif /* SLVL >= 5 */
diff --git a/libs/vdb/schema-tbl.c b/libs/vdb/schema-tbl.c
deleted file mode 100644
index 153f668..0000000
--- a/libs/vdb/schema-tbl.c
+++ /dev/null
@@ -1,2925 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include "schema-priv.h"
-#include "schema-parse.h"
-#include "schema-expr.h"
-#include "schema-dump.h"
-#include "dbmgr-priv.h"
-
-#include <klib/symbol.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <klib/namelist.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-/* if non-zero, accept a typeset or a typedecl
-   for column. otherwise, only allow a typedecl */
-#define ALLOW_COLUMN_TYPESET 1
-
-/* make implicit physical expressions explicit on output */
-#define DUMP_EXPLICIT_PHYS_MEMBERS 0
-
-/* temporary v1 schema modification */
-#define ALLOW_DEFAULT_VIEW_DECL 1
-
-
-/*--------------------------------------------------------------------------
- * SColumn
- *  column declaration
- */
-
-#if SLVL >= 8
-
-/* Whack
- */
-void CC SColumnWhack ( void *item, void *ignore )
-{
-    SColumn *self = item;
-    SExpressionWhack ( self -> read );
-    SExpressionWhack ( self -> validate );
-    SExpressionWhack ( self -> limit );
-    SExpressionWhack ( self -> ptype );
-    free ( self );
-}
-
-/* Cmp
- * Sort
- */
-int64_t CC SColumnCmp ( const void *item, const void *n )
-{
-    const VTypedecl *a = item;
-    const SColumn *b = n;
-
-    if ( a -> type_id != b -> td . type_id )
-        return ( int64_t ) a -> type_id - ( int64_t ) b -> td . type_id;
-    return ( int64_t ) a -> dim - ( int64_t ) b -> td . dim;
-}
-
-int64_t CC SColumnSort ( const void *item, const void *n )
-{
-    const SColumn *a = item;
-    const SColumn *b = n;
-
-    if ( a -> td . type_id != b -> td . type_id )
-        return ( int64_t ) a -> td . type_id - ( int64_t ) b -> td . type_id;
-    return ( int64_t ) a -> td . dim - ( int64_t ) b -> td . dim;
-}
-
-/* Mark
- */
-static
-void CC SColumnMark ( void * item, void * data )
-{
-    const SColumn *self = item;
-    VSchema * schema = data;
-    if ( self != NULL )
-    {
-        SExpressionMark ( ( void * )self -> read, data );
-        SExpressionMark ( ( void * )self -> validate, data );
-        SExpressionMark ( ( void * )self -> limit, data );
-        VSchemaTypeMark ( schema, self -> td . type_id );
-    }
-}
-
-/* Dump
- */
-rc_t SColumnDump ( const SColumn *self, SDumper *d )
-{
-    return KSymbolDump ( self != NULL ? self -> name : NULL, d );
-}
-
-static
-rc_t SColumnDumpExpr ( SDumper *d, const SExpression *e )
-{
-    rc_t rc;
-    const SBinExpr *c;
-    bool compact = SDumperMode ( d ) == sdmCompact ? true : false;
-
-    if ( e -> var != eCondExpr )
-        return SDumperPrint ( d, compact ? "=%E;" : " = %E;\n", e );
-
-    c = ( const SBinExpr* ) e;
-
-    if ( ! compact )
-        SDumperIncIndentLevel ( d );
-    rc = SDumperPrint ( d, compact ? "=%E" : "\n\t= %E\n", c -> left );
-    while ( rc == 0 )
-    {
-        if ( c -> right -> var != eCondExpr )
-            break;
-        c = ( const SBinExpr* ) c -> right;
-        rc = SDumperPrint ( d, compact ? "|%E" : "\n\t| %E\n", c -> left );
-    }
-
-    rc = SDumperPrint ( d, compact ? "|%E" : "\n\t| %E\n", c -> right );
-    if ( ! compact )
-        SDumperDecIndentLevel ( d );
-    return rc;
-}
-
-bool CC SColumnDefDump ( void *item, void *data )
-{
-    SDumper *b = data;
-    const SColumn *self = ( const void* ) item;
-    bool compact = SDumperMode ( b ) == sdmCompact ? true : false;
-
-    /* handle simple cases first */
-    if ( self -> validate == NULL && self -> limit == NULL )
-    {
-        /* simple */
-#if ! DUMP_EXPLICIT_PHYS_MEMBERS
-        if ( self -> simple )
-        {
-            if ( self -> ptype != NULL )
-            {
-                b -> rc = SDumperPrint ( b, compact ? "column %E %N;" : "\tcolumn %E %N;\n"
-                                         , self -> ptype
-                                         , self -> name
-                    );
-            }
-            else
-            {
-                b -> rc = SDumperPrint ( b, compact ? "column %T %N;" : "\tcolumn %T %N;\n"
-                                         , & self -> td
-                                         , self -> name
-                    );
-            }
-        }
-        else
-#endif
-        {
-            assert ( self -> read != NULL );
-            b -> rc = SDumperPrint ( b, compact ? "%s%scolumn %T %N = %E;" : "\t%s%scolumn %T %N = %E;\n"
-                                     , self -> dflt ? "default " : ""
-                                     , self -> read_only ? "readonly " : ""
-                                     , & self -> td
-                                     , self -> name
-                                     , self -> read
-                );
-        }
-    }
-
-    /* canonical representation */
-    else
-    {
-#if ! DUMP_EXPLICIT_PHYS_MEMBERS
-        if ( self -> ptype != NULL )
-        {
-            b -> rc = SDumperPrint ( b, compact ? "%scolumn %E %N{" : "\t%scolumn %E %N\n\t{\n"
-                                     , self -> dflt ? "default " : ""
-                                     , self -> ptype
-                                     , self -> name
-                );
-        }
-        else
-#endif
-        {
-            b -> rc = SDumperPrint ( b, compact ? "%s%scolumn %T %N{" : "\t%s%scolumn %T %N\n\t{\n"
-                                     , self -> dflt ? "default " : ""
-                                     , self -> read_only ? "readonly " : ""
-                                     , & self -> td
-                                     , self -> name
-                );
-        }
-        if ( b -> rc == 0 )
-        {
-            if ( ! compact )
-                SDumperIncIndentLevel ( b );
-
-#if DUMP_EXPLICIT_PHYS_MEMBERS
-            if ( self -> read != NULL )
-#else
-            if ( ! self -> simple && self -> read != NULL )
-#endif
-            {
-                b -> rc = SDumperPrint ( b, compact ? "read" : "\tread" );
-                if ( b -> rc == 0 )
-                    b -> rc = SColumnDumpExpr ( b, self -> read );
-            }
-
-            if ( b -> rc == 0 && self -> validate != NULL )
-            {
-                b -> rc = SDumperPrint ( b, compact ? "validate" : "\tvalidate" );
-                if ( b -> rc == 0 )
-                    b -> rc = SColumnDumpExpr ( b, self -> validate );
-            }
-
-            if ( b -> rc == 0 && self -> limit != NULL )
-                b -> rc = SDumperPrint ( b, compact ? "limit = %E;" : "\tlimit = %E;\n", self -> limit );
-
-            if ( ! compact )
-                SDumperDecIndentLevel ( b );
-        }
-        if ( b -> rc == 0 )
-            b -> rc = SDumperPrint ( b, compact ? "}" : "\t}\n" );
-    }
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-
-#endif
-
-
-/*--------------------------------------------------------------------------
- * SPhysMember
- *  column declaration
- */
-
-#if SLVL >= 7
-
-/* Whack
- */
-void CC SPhysMemberWhack ( void *item, void *ignore )
-{
-    SPhysMember *self = item;
-
-    SExpressionWhack ( self -> type );
-    SExpressionWhack ( self -> expr );
-    free ( self );
-}
-
-/* Mark
- */
-void CC SPhysMemberMark ( void * item, void * data )
-{
-    const SPhysMember * self = item;
-    const VSchema * schema = data;
-    if ( self != NULL )
-    {
-        SExpressionMark ( ( void * )self -> type, data );
-        SExpressionMark ( ( void * )self -> expr, data );
-        VSchemaTypeMark ( schema, self -> td . type_id );
-    }
-}
-
-/* Dump
- */
-rc_t SPhysMemberDump ( const SPhysMember *self, struct SDumper *d )
-{
-    return FQNDump ( self != NULL ? self -> name : NULL, d );
-}
-
-bool CC SPhysMemberDefDump ( void *item, void *data )
-{
-    SDumper *b = data;
-    const SPhysMember *self = ( const void* ) item;
-    bool compact = SDumperMode ( b ) == sdmCompact ? true : false;
-
-#if ! DUMP_EXPLICIT_PHYS_MEMBERS
-    if ( self -> simple )
-        return false;
-#endif
-
-    b -> rc = SDumperPrint ( b, compact ? "%s column " : "\t%s column "
-                             , self -> stat ? "static" : "physical"
-        );
-    if ( b -> rc == 0 )
-    {
-        if ( self -> type != NULL )
-            b -> rc = SExpressionDump ( self -> type, b );
-        else
-            b -> rc = SDumperPrint ( b, "%T", & self -> td );
-    }
-    if ( b -> rc == 0 )
-    {
-        if ( compact )
-        {
-            if ( self -> expr == NULL )
-                b -> rc = SDumperPrint ( b, " %N;", self -> name );
-            else
-                b -> rc = SDumperPrint ( b, " %N=%E;", self -> name, self -> expr );
-        }
-        else
-        {
-            if ( self -> expr == NULL )
-                b -> rc = SDumperPrint ( b, " %N;\n", self -> name );
-            else
-                b -> rc = SDumperPrint ( b, " %N = %E;\n", self -> name, self -> expr );
-        }
-    }
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-
-#endif
-
-/*--------------------------------------------------------------------------
- * STableOverrides
- *  describes extended parent
- */
-
-#if SLVL >= 6
-typedef struct STableOverrides STableOverrides;
-struct STableOverrides
-{
-    const STable *dad;
-    Vector overrides;
-    uint32_t ctx;
-};
-
-/* Cmp
- * Sort
- */
-static
-int64_t CC STableOverridesCmp ( const void *item, const void *n )
-{
-    const uint32_t *a = item;
-    const STableOverrides *b = n;
-
-    return ( int64_t ) * a - ( int64_t ) b -> ctx;
-}
-
-static
-int64_t CC STableOverridesSort ( const void *item, const void *n )
-{
-    const STableOverrides *a = item;
-    const STableOverrides *b = n;
-
-    return ( int64_t ) a -> ctx - ( int64_t ) b -> ctx;
-}
-
-static
-int64_t CC STableOverridesKSort ( const void **item, const void **n, void *ignore )
-{
-    return STableOverridesSort ( * item, * n );
-}
-
-/* Whack
- */
-static
-void CC STableOverridesWhack ( void *item, void *ignore )
-{
-    STableOverrides *self = item;
-    VectorWhack ( & self -> overrides, NULL, NULL );
-    free ( self );
-}
-
-/* Make
- */
-static
-rc_t STableOverridesMake ( Vector *parents, const STable *dad, const Vector *overrides )
-{
-    rc_t rc;
-    STableOverrides *to;
-
-    /* first question is whether parent exists */
-    if ( VectorFind ( parents, & dad -> id, NULL, STableOverridesCmp ) != NULL )
-        return SILENT_RC ( rcVDB, rcSchema, rcParsing, rcTable, rcExists );
-
-    /* create a new override object */
-    to = malloc ( sizeof * to );
-    if ( to == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    /* shallow clone */
-    rc = VectorCopy ( overrides, & to -> overrides );
-    if ( rc != 0 )
-    {
-        free ( to );
-        return rc;
-    }
-    to -> dad = dad;
-    to -> ctx = dad -> id;
-
-    /* insert into parent override vector */
-    rc = VectorInsert ( parents, to, NULL, STableOverridesSort );
-    if ( rc != 0 )
-    {
-        STableOverridesWhack ( to, NULL );
-        return rc;
-    }
-
-    return 0;
-}
-
-static
-bool CC STableOverridesClone ( void *item, void *data )
-{
-    const STableOverrides *self = ( const void* ) item;
-    rc_t rc = STableOverridesMake ( data, self -> dad, & self -> overrides );
-    return ( rc != 0 && GetRCState ( rc ) != rcExists ) ? true : false;
-}
-
-#endif
-
-/*--------------------------------------------------------------------------
- * STable
- *  table declaration
- */
-
-#if SLVL >= 6
-
-/* Whack
- */
-void CC STableWhack ( void *item, void *ignore )
-{
-    STable *self = item;
-
-    if ( self -> dflt_view != NULL )
-        StringWhack ( self -> dflt_view );
-
-#if SLVL >= 8
-    VectorWhack ( & self -> col, SColumnWhack, NULL );
-    VectorWhack ( & self -> cname, SNameOverloadWhack, NULL );
-#endif
-#if SLVL >= 7
-    VectorWhack ( & self -> phys, SPhysMemberWhack, NULL );
-#endif
-    VectorWhack ( & self -> prod, SProductionWhack, NULL );
-    VectorWhack ( & self -> vprods, NULL, NULL );
-    VectorWhack ( & self -> syms, ( void ( CC * ) ( void*, void* ) ) KSymbolWhack, NULL );
-
-    VectorWhack ( & self -> parents, NULL, NULL );
-    VectorWhack ( & self -> overrides, STableOverridesWhack, NULL );
-
-    SExpressionWhack ( self -> limit );
-
-    BSTreeWhack ( & self -> scope, KSymbolWhack, NULL );
-
-    free ( self );
-}
-
-/* Cmp
- * Sort
- */
-int64_t CC STableCmp ( const void *item, const void *n )
-{
-    const uint32_t *a = item;
-    const STable *b = n;
-
-    if ( * a > b -> version )
-        return 1;
-    return ( int64_t ) ( * a >> 24 ) - ( int64_t ) ( b -> version >> 24 );
-}
-
-int64_t CC STableSort ( const void *item, const void *n )
-{
-    const STable *a = item;
-    const STable *b = n;
-
-    return ( int64_t ) ( a -> version >> 24 ) - ( int64_t ) ( b -> version >> 24 );
-}
-
-
-/* Find
- *  generic object find within table scope
- *
- *  "td" [ OUT, NULL OKAY ] - returns cast type expression
- *  if given or "any" if not
- *
- *  "name" [ OUT ] - returns list of overloaded objects if found
- *
- *  "type" [ OUT ] - returns object type id, e.g.:
- *    eDatatype, eTypeset, eFormat, eFunction, ePhysical, eTable, ...
- *
- *  "expr" [ IN ] - NUL terminated name expression identifying object
- *
- *  "ctx" [ IN ] - NUL terminated context string for evaluation,
- *  substitutes for filename in logging reports
- *
- *  "dflt" [ IN ] - if true, resolve default value
- *
- *  returns principal object identified. if NULL but "name" is not
- *  NULL, then the object was only partially identified.
- */
-const void *STableFind ( const STable *self,
-    const VSchema *schema, VTypedecl *td, const SNameOverload **name,
-    uint32_t *type, const char *expr, const char *ctx, bool dflt )
-{
-    rc_t rc;
-    KSymTable tbl;
-
-    /* initialize to not-found */
-    const void *obj = NULL;
-    * name = NULL;
-    * type = 0;
-
-    /* build a symbol table for table */
-    rc = init_tbl_symtab ( & tbl, schema, self );
-    if ( rc == 0 )
-    {
-        obj = resolve_object ( & tbl, schema, td, name, type, expr, ctx, dflt );
-        KSymTableWhack ( & tbl );
-    }
-
-    return obj;
-}
-
-
-/* FindOverride
- *  finds an inherited or introduced overridden symbol
- */
-KSymbol *STableFindOverride ( const STable *self, const VCtxId *cid )
-{
-    const STableOverrides *to;
-
-    /* it may be on the existing table */
-    if ( cid -> ctx == self -> id )
-        return VectorGet ( & self -> vprods, cid -> id );
-
-    to = ( const void* ) VectorFind ( & self -> overrides,
-        & cid -> ctx, NULL, STableOverridesCmp );
-    if ( to == NULL )
-        return NULL;
-
-    return VectorGet ( & to -> overrides, cid -> id );
-}
-
-/* FindOrdAncestor
- *  finds a parent or grandparent by order
- */
-const STable *STableFindOrdAncestor ( const STable *self, uint32_t i )
-{
-    const STableOverrides *to = ( const void* ) VectorGet ( & self -> overrides, i );
-    if ( to == NULL )
-        return NULL;
-    return to -> dad;
-}
-
-
-/* Extend
- */
-static
-bool CC STableHasDad ( void *item, void *data )
-{
-    if ( item == data )
-        return true;
-    return false;
-}
-
-static
-bool STableTestForTypeCollision ( const SNameOverload *a, const SNameOverload *b )
-{
-    uint32_t ax, bx, ctx;
-
-    uint32_t aend = VectorLength ( & a -> items );
-    uint32_t bend = VectorLength ( & b -> items );
-
-    if ( aend == 0 || bend == 0 )
-        return false;
-
-    ctx = a -> cid . ctx;
-    ax = VectorStart ( & a -> items );
-    bx = VectorStart ( & b -> items );
-
-    for ( aend += ax, bend += bx; ax < aend && bx < bend; )
-    {
-        int64_t diff;
-        const SColumn *acol = ( const void* ) VectorGet ( & a -> items, ax );
-        const SColumn *bcol = ( const void* ) VectorGet ( & b -> items, bx );
-        assert ( acol != NULL && bcol != NULL );
-
-        /* if they are both from some other shared parent
-           maybe they are even the same column */
-        if ( acol == bcol || acol -> cid . ctx == bcol -> cid . ctx )
-        {
-            ++ ax;
-            ++ bx;
-            continue;
-        }
-
-        /* don't bother comparing if either is from
-           originating table, as they are required
-           to appear in both lists */
-        if ( acol -> cid . ctx == ctx )
-        {
-            ++ ax;
-            continue;
-        }
-
-        if ( bcol -> cid . ctx == ctx )
-        {
-            ++ bx;
-            continue;
-        }
-
-        /* test the column types */
-        diff = SColumnSort ( acol, bcol );
-
-        /* if they are the same type, this is a collision */
-        if ( diff == 0 )
-            return true;
-
-        /* let it slide */
-        if ( diff < 0 )
-            ++ ax;
-        else
-            ++ bx;
-    }
-
-    return false;
-}
-
-static
-bool STableTestForSymCollision ( const KSymbol *sym, void *data )
-{
-    const KSymTable *tbl = ( const void* ) data;
-    const KSymbol *found = KSymTableFindSymbol ( tbl, sym );
-    if ( found != NULL && found != sym ) switch ( found -> type )
-    {
-    case eColumn:
-        if ( sym -> type == eColumn )
-        {
-            /* when colliding columns originated in the same
-               table, consider them to be compatible extensions */
-            const SNameOverload *found_col, *sym_col;
-            sym_col = sym -> u . obj;
-            found_col = found -> u . obj;
-            assert ( sym_col != NULL && found_col != NULL );
-            if ( sym_col -> cid . ctx == found_col -> cid . ctx )
-                return STableTestForTypeCollision ( sym_col, found_col );
-        }
-    case eProduction:
-    case ePhysMember:
-        PLOGMSG ( klogErr, ( klogErr, "duplicate symbol '$(sym)' in parent table hierarchy"
-                             , "sym=%S"
-                             , & sym -> name
-                      ));
-        return true;
-    }
-    return false;
-}
-
-static
-bool CC STableTestColCollisions ( void *item, void *data )
-{
-    const SNameOverload *no = ( const void* ) item;
-    return STableTestForSymCollision ( no -> name, data );
-}
-
-static
-bool CC STableTestPhysCollisions ( void *item, void *data )
-{
-    const SPhysMember *phys = ( const void* ) item;
-    return STableTestForSymCollision ( phys -> name, data );
-}
-
-static
-bool CC STableTestProdCollisions ( void *item, void *data )
-{
-    const SProduction *prod = ( const void* ) item;
-    return STableTestForSymCollision ( prod -> name, data );
-}
-
-static
-bool STableTestForCollisions ( void *item, void *data )
-{
-    const STable *self = ( const void* ) item;
-
-    /* test column names */
-    if ( VectorDoUntil ( & self -> cname, false, STableTestColCollisions, data ) )
-        return true;
-
-    /* test physical names */
-    if ( VectorDoUntil ( & self -> phys, false, STableTestPhysCollisions, data ) )
-        return true;
-
-    /* test production names */
-    if ( VectorDoUntil ( & self -> prod, false, STableTestProdCollisions, data ) )
-        return true;
-
-    return false;
-}
-
-static
-bool CC STableOverridesTestForCollisions ( void *item, void *data )
-{
-    const STableOverrides *to = ( const void* ) item;
-    return STableTestForCollisions ( ( void* ) to -> dad, data );
-}
-
-static
-bool CC STableCopyColumnNames ( void *item, void *data )
-{
-    rc_t rc;
-    STable *self= data;
-    SNameOverload *copy;
-    const SNameOverload *orig = ( const void* ) item;
-    const KSymbol *sym = ( const KSymbol* )
-        BSTreeFind ( & self -> scope, & orig -> name -> name, KSymbolCmp );
-    if ( sym == NULL )
-    {
-        rc = SNameOverloadCopy ( & self -> scope, & copy, orig );
-        if ( rc == 0 )
-        {
-            rc = VectorAppend ( & self -> cname, & copy -> cid . id, copy );
-            if ( rc != 0 )
-                SNameOverloadWhack ( copy, NULL );
-        }
-    }
-    else
-    {
-        copy = ( void* ) sym -> u . obj;
-        assert ( copy -> cid . ctx == orig -> cid . ctx );
-        rc = VectorMerge ( & copy -> items, true, & orig -> items, SColumnSort );
-    }
-
-    return ( rc != 0 ) ? true : false;
-}
-
-static
-bool CC STableScanVirtuals ( void *item, void *data )
-{
-    KSymTable *tbl = data;
-    STableOverrides *to = item;
-    BSTree *scope = VectorLast ( & tbl -> stack );
-    uint32_t i = VectorStart ( & to -> overrides );
-    uint32_t end = VectorLength ( & to -> overrides );
-    for ( end += i; i < end; ++ i )
-    {
-        const KSymbol *orig = ( const void* ) VectorGet ( & to -> overrides, i );
-        assert ( orig != NULL );
-        if ( orig -> type == eVirtual )
-        {
-            void *ignore;
-
-            /* since the virtual productions in one parent could be
-               defined by another parent, test for the possibility */
-            const KSymbol *def = KSymTableFindSymbol ( tbl, orig );
-            if ( def != NULL )
-                VectorSwap ( & to -> overrides, i, def, & ignore );
-            else
-            {
-                /* copy the original */
-                KSymbol *copy;
-                rc_t rc = KSymbolCopy ( scope, & copy, orig );
-                if ( rc != 0 )
-                    return true;
-
-                /* replace the parent virtual with an updatable copy */
-                VectorSwap ( & to -> overrides, i, copy, & ignore );
-            }
-        }
-    }
-    return false;
-}
-
-static
-rc_t STableExtend ( KSymTable *tbl, STable *self, const STable *dad )
-{
-    rc_t rc;
-
-    /* reject if direct parent already there */
-    if ( VectorDoUntil ( & self -> parents, false, STableHasDad, ( void* ) dad ) )
-        return RC ( rcVDB, rcSchema, rcParsing, rcTable, rcExists );
-
-    /* if parent is already in ancestry, treat as redundant */
-    if ( VectorFind ( & self -> overrides, & dad -> id, NULL, STableOverridesCmp ) != NULL )
-        return VectorAppend ( & self -> parents, NULL, dad );
-
-    /* enter scope for this table */
-    rc = push_tbl_scope ( tbl, self );
-    if ( rc != 0 )
-        return rc;
-
-    /* test for any collisions */
-    if ( STableTestForCollisions ( ( void* ) dad, tbl ) ||
-         VectorDoUntil ( & dad -> overrides, false, STableOverridesTestForCollisions, tbl ) )
-    {
-        pop_tbl_scope ( tbl, self );
-        return RC ( rcVDB, rcSchema, rcParsing, rcName, rcExists );
-    }
-
-    /* pop table scope */
-    pop_tbl_scope ( tbl, self );
-
-    /* add "dad" to parent list */
-    rc = VectorAppend ( & self -> parents, NULL, dad );
-    if ( rc != 0 )
-        return rc;
-
-    /* copy column names from parent - should already contain all grandparents */
-    if ( VectorDoUntil ( & dad -> cname, false, STableCopyColumnNames, self ) )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    /* add "dad" to overrides */
-    rc = STableOverridesMake ( & self -> overrides, dad, & dad -> vprods );
-    if ( rc == 0 )
-    {
-        /* add all grandparents */
-        if ( VectorDoUntil ( & dad -> overrides, false, STableOverridesClone, & self -> overrides ) )
-            rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-    }
-    else if ( GetRCState ( rc ) == rcExists )
-    {
-        rc = 0;
-    }
-    return rc;
-}
-
-/* CloneExtend
- *  creates an initially transparent table extension
- *  used by cursor to permit addition of implicit productions
- */
-rc_t STableCloneExtend ( const STable *self, STable **clone, VSchema *schema )
-{
-    rc_t rc;
-    KSymTable tbl;
-
-    STable *table = malloc ( sizeof * table );
-    if ( table == NULL )
-        return RC ( rcVDB, rcSchema, rcUpdating, rcMemory, rcExhausted );
-
-    /* need to take a deep look at scope */
-    rc = init_symtab ( & tbl, schema );
-    if ( rc != 0 )
-        return rc;
-
-    /* this takes care of initializing "scope" */
-    memset ( table, 0, sizeof * table );
-
-    /* take name and version, since this is an anonymous extension */
-    table -> name = KSymTableFindSymbol ( & tbl, self -> name );
-    KSymTableWhack ( & tbl );
-    assert ( table -> name != NULL );
-    table -> src_file = self -> src_file;
-    table -> src_line = self -> src_line;
-    table -> version = self -> version;
-
-    /* take on table-wide blob limit */
-    if ( self -> limit != NULL )
-    {
-        table -> limit = self -> limit;
-        atomic32_inc ( & ( ( SExpression* ) table -> limit ) -> refcount );
-    }
-
-    /* initialize all vectors for single-inheritance */
-    VectorInit ( & table -> parents, 0, 1 );
-    VectorInit ( & table -> overrides, 0, VectorLength ( & self -> overrides ) + 1 );
-    VectorInit ( & table -> col, 0, 16 );
-    VectorInit ( & table -> cname, 0, 16 );
-    VectorInit ( & table -> phys, 0, 16 );
-    VectorInit ( & table -> prod, 0, 64 );
-    VectorInit ( & table -> vprods, 1, 16 );
-    VectorInit ( & table -> syms, 1, 32 );
-
-    rc = init_tbl_symtab ( & tbl, schema, table );
-    if ( rc == 0 )
-        rc = STableExtend ( & tbl, table, self );
-    if ( rc == 0 )
-    {
-        rc = push_tbl_scope ( & tbl, table );
-        if ( rc == 0 )
-        {
-            if ( VectorDoUntil ( & table -> overrides, false, STableScanVirtuals, & tbl ) )
-                rc = RC ( rcVDB, rcSchema, rcUpdating, rcMemory, rcExhausted );
-        }
-    }
-
-    KSymTableWhack ( & tbl );
-
-    if ( rc == 0 )
-    {
-        /* add table to schema */
-        rc = VectorAppend ( & schema -> tbl, & table -> id, table );
-        if ( rc == 0 )
-        {
-            void *dad;
-            uint32_t idx;
-            SNameOverload *name = ( void* ) table -> name -> u . obj;
-
-            /* find ourselves in table overloads */
-            dad = VectorFind ( & name -> items, & table -> version, & idx, STableCmp );
-            assert ( dad != NULL );
-            assert ( dad == ( void* ) self );
-
-            /* set clone in our place */
-            VectorSwap ( & name -> items, idx, table, & dad );
-
-            * clone = table;
-            return 0;
-        }
-    }
-
-    STableWhack ( table, NULL ), table = NULL;
-    return rc;
-}
-
-/* ImplicitPhysMember
- *  adds an implicit physical member
- */
-rc_t STableImplicitPhysMember ( STable *self,
-    const VTypedecl *td, KSymbol *sym, const String *name )
-{
-    rc_t rc;
-    SPhysMember *m = malloc ( sizeof * m );
-    if ( m == NULL )
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-    else
-    {
-        memset ( m, 0, sizeof * m );
-
-        /* if discovered as static column, give it a type */
-        if ( td != NULL )
-            m -> td = * td;
-
-        /* create name symbol as required */
-        if ( sym == NULL )
-        {
-            rc = KSymbolMake ( & sym, name, ePhysMember, m );
-            if ( rc == 0 )
-                BSTreeInsert ( & self -> scope, & sym -> n, KSymbolSort );
-        }
-        if ( sym != NULL )
-        {
-            /* complete handshake with symbol */
-            m -> name = sym;
-            sym -> u . obj = m;
-            sym -> type = ePhysMember;
-
-            /* add member to table */
-            m -> cid . ctx = self -> id;
-            rc = VectorAppend ( & self -> phys, & m -> cid . id, m );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        SPhysMemberWhack ( m, NULL );
-    }
-    return rc;
-}
-
-/* ImplicitColMember
- *  adds an implicit column member of simple or incomplete type
- *
- *  "cname" [ IN ] - column name
- *
- *  "pname" [ IN ] - name of physical column
- */
-rc_t STableImplicitColMember ( STable *self,
-    const String *cname, const String *pname )
-{
-    rc_t rc;
-
-    /* create SColumn */
-    SColumn *col = malloc ( sizeof * col );
-    if ( col == NULL )
-        rc = RC ( rcVDB, rcTable, rcUpdating, rcMemory, rcExhausted );
-    else
-    {
-        const KSymbol *psym;
-        memset ( col, 0, sizeof * col );
-
-        /* look up SPhysMember */
-        psym = ( const KSymbol* ) BSTreeFind ( & self -> scope, pname, KSymbolCmp );
-        if ( psym == NULL )
-            rc = RC ( rcVDB, rcTable, rcUpdating, rcColumn, rcNotFound );
-        else
-        {
-            KSymbol *csym;
-
-            /* create column symbol */
-            rc = KSymbolMake ( & csym, cname, eColumn, col );
-            if ( rc == 0 )
-            {
-                BSTNode *exist;
-
-                /* complete handshake with symbol */
-                col -> name = csym;
-
-                /* insert into table scope and reject on collision
-                   deep check should have been executed previously */
-                rc = BSTreeInsertUnique ( & self -> scope, & csym -> n, & exist, KSymbolSort );
-                if ( rc == 0 )
-                {
-                    /* take column typedecl ( if known ) from physical */
-                    SPhysMember *phys = ( void* ) psym -> u . obj;
-                    col -> td = phys -> td;
-
-                    /* cross-link the external and physical columns */
-                    rc = SSymExprMake ( & col -> read, psym, ePhysExpr );
-                    if ( rc == 0 )
-                        rc = SSymExprMake ( & phys -> expr, csym, eColExpr );
-                    if ( rc == 0 )
-                    {
-                        /* add column to table */
-                        col -> cid . ctx = self -> id;
-                        rc = VectorAppend ( & self -> col, & col -> cid . id, col );
-                        if ( rc == 0 )
-                        {
-                            void *ignore;
-                            SNameOverload *name;
-
-                            /* create a column name with a single typed column */
-                            rc = SNameOverloadMake ( & name, csym, 0, 1 );
-                            if ( rc == 0 )
-                            {
-                                /* being the only column, "col" may be simply
-                                   inserted rather than using a sorted insert */
-                                rc = VectorAppend ( & name -> items, NULL, col );
-                                if ( rc == 0 )
-                                {
-                                    /* finally, insert name into table */
-                                    rc = VectorAppend ( & self -> cname, & name -> cid . id, name );
-                                    if ( rc == 0 )
-                                    {
-                                        name -> cid . ctx = self -> id;
-                                        return 0;
-                                    }
-                                }
-
-                                SNameOverloadWhack ( name, NULL );
-                            }
-
-                            VectorSwap ( & self -> col, col -> cid . id, NULL, & ignore );
-                        }
-
-                        SExpressionWhack ( phys -> expr ), phys -> expr = NULL;
-                    }
-
-                    BSTreeUnlink ( & self -> scope, & csym -> n );
-                }
-
-                KSymbolWhack ( & csym -> n, NULL );
-            }
-        }
-
-        SColumnWhack ( col, NULL );
-    }
-    return rc;
-}
-
-
-/* Compare
- */
-static
-int64_t KSymbolDeepCompare ( const KSymbol *a, const KSymbol *b )
-{
-    int64_t diff;
-
-    /* the same symbol */
-    if ( a == b )
-        return 0;
-
-    /* parents are first */
-    if ( a -> dad != NULL )
-    {
-        if ( b -> dad != NULL )
-        {
-            /* both symbols have parents */
-            diff = KSymbolDeepCompare ( a -> dad, b -> dad );
-            if ( diff != 0 )
-                return diff;
-        }
-        else
-        {
-            /* "b" is a root */
-            diff = KSymbolDeepCompare ( a -> dad, b );
-            if ( diff != 0 )
-                return diff;
-            return 1;
-        }
-    }
-    else if ( b -> dad != NULL )
-    {
-        /* "a" is a root */
-        diff = KSymbolDeepCompare ( a, b -> dad );
-        if ( diff != 0 )
-            return diff;
-        return -1;
-    }
-
-    /* perform textual comparison */
-    return KSymbolSort ( & a -> n, & b -> n );
-}
-
-static
-int64_t CC STableNameSort ( const void **a, const void **b, void *ignore )
-{
-    int diff;
-    const STable *tb = * b;
-    const STable *ta = * a;
-    if ( tb == NULL )
-        return ta != NULL;
-    if ( ta == NULL )
-        return -1;
-    diff = KSymbolDeepCompare ( ta -> name, tb -> name );
-    if ( diff != 0 )
-        return diff;
-
-    return (int64_t) ta -> version - (int64_t) tb -> version;
-}
-
-enum
-{
-    stbl_cmp_insertion = 1 << 0,
-    stbl_cmp_deletion  = 1 << 1,
-    stbl_cmp_mismatch  = 1 << 2,
-    stbl_cmp_newer     = 1 << 3,
-    stbl_cmp_older     = 1 << 4
-};
-
-static
-rc_t STableCompare ( const STable *a, const STable *b, const STable **newer, bool exhaustive )
-{
-    rc_t stage_rc, cmp_rc = 0;
-    uint32_t stage_bits, cmp_bits = 0;
-
-    int diff;
-    Vector va, vb;
-    uint32_t ia, ib, ca, cb;
-
-    assert ( ( a -> version >> 24 ) == ( b -> version >> 24 ) );
-
-    PARSE_DEBUG (( "STableCompare: testing %N #%.3V against #%.3V\n",
-                   a -> name, a -> version, b -> version ));
-
-    /* guess the newer of the two based upon version alone */
-    * newer = a -> version >= b -> version ? a : b;
-
-    /* test #1 - immediate parents */
-    ca = VectorLength ( & a -> parents );
-    cb = VectorLength ( & b -> parents );
-    if ( ca != cb || ca != 0 )
-    {
-        /* make a copy */
-        cmp_rc = VectorCopy ( & a -> parents, & va );
-        if ( cmp_rc != 0 )
-            return cmp_rc;
-        cmp_rc = VectorCopy ( & b -> parents, & vb );
-        if ( cmp_rc != 0 )
-        {
-            VectorWhack ( & va, NULL, NULL );
-            return cmp_rc;
-        }
-        if ( ca > 1 )
-            VectorReorder ( & va, STableNameSort, NULL );
-        if ( cb > 1 )
-            VectorReorder ( & vb, STableNameSort, NULL );
-
-        for ( stage_bits = ia = ib = 0; ia < ca && ib < cb; )
-        {
-            const STable *pa = ( const void* ) VectorGet ( & va, ia );
-            const STable *pb = ( const void* ) VectorGet ( & vb, ib );
-            if ( pa == pb )
-            {
-                ++ ia, ++ ib;
-                continue;
-            }
-            diff = KSymbolDeepCompare ( pa -> name, pb -> name );
-            if ( diff < 0 )
-            {
-                stage_bits |= stbl_cmp_insertion;
-                ++ ia;
-            }
-            else if ( diff > 0 )
-            {
-                stage_bits |= stbl_cmp_deletion;
-                ++ ib;
-            }
-            else
-            {
-                if ( pa -> version > pb -> version )
-                    stage_bits |= stbl_cmp_newer;
-                else if ( pa -> version < pb -> version )
-                    stage_bits |= stbl_cmp_older;
-
-                ++ ia, ++ ib;
-            }
-        }
-
-        VectorWhack ( & va, NULL, NULL );
-        VectorWhack ( & vb, NULL, NULL );
-
-        PARSE_DEBUG (( "STableCompare: %N #%.3V vs. #%.3V - PARENT COMPARISON:\n%s%s%s%s%s"
-                       , a -> name, a -> version, b -> version
-                       , ( stage_bits == 0 )                 ? "  no differences detected\n" : ""
-                       , ( stage_bits & stbl_cmp_insertion ) ? "  insertion(s) detected\n" : ""
-                       , ( stage_bits & stbl_cmp_deletion )  ? "  deletion(s) detected\n" : ""
-                       , ( stage_bits & stbl_cmp_newer )     ? "  newer ancestor(s) detected\n" : ""
-                       , ( stage_bits & stbl_cmp_older )     ? "  older ancestor(s) detected\n" : ""
-            ));
-
-        if ( stage_bits != 0 )
-        {
-            /* if the table versions are the same, the parents should not have insertions or deletions */
-            if ( a -> version == b -> version && ( stage_bits & ( stbl_cmp_insertion | stbl_cmp_deletion ) ) != 0 )
-            {
-                stage_rc = RC ( rcVDB, rcSchema, rcParsing, rcTable, rcInconsistent );
-                PLOGERR ( klogErr, ( klogErr, stage_rc, "STableCompare: illegal redeclaration of table '$(tbl)' - differing parents."
-                                     , "tbl=%N#%.3V"
-                                     , a -> name, b -> version ) );
-                if ( ! exhaustive )
-                    return stage_rc;
-                if ( cmp_rc == 0 )
-                    cmp_rc = stage_rc;
-            }
-
-            /* if the tables have same parent names but conflicting versions */
-            if ( ( stage_bits & ( stbl_cmp_newer | stbl_cmp_older ) ) == ( stbl_cmp_newer | stbl_cmp_older ) )
-            {
-                stage_rc = RC ( rcVDB, rcSchema, rcParsing, rcTable, rcInconsistent );
-                PLOGERR ( klogErr, ( klogErr, stage_rc, "STableCompare: illegal redeclaration of table '$(tbl)' - both older and newer parent versions."
-                                     , "tbl=%N#%.3V"
-                                     , a -> name, b -> version ) );
-                if ( ! exhaustive )
-                    return stage_rc;
-                if ( cmp_rc == 0 )
-                    cmp_rc = stage_rc;
-            }
-            else
-            {
-                /* if "a" claims to be newer than "b" */
-                if ( a -> version > b -> version )
-                {
-                    if ( ( stage_bits & stbl_cmp_older ) != 0 )
-                    {
-                        stage_rc = RC ( rcVDB, rcSchema, rcParsing, rcTable, rcInconsistent );
-                        PLOGERR ( klogErr, ( klogErr, stage_rc, "STableCompare: illegal redeclaration of table '$(tbl)' - version $(new_vers) has older parents than version $(old_vers)."
-                                             , "tbl=%N,new_vers=#%.3V,old_vers=#%.3V"
-                                             , a -> name, a -> version, b -> version ) );
-                        if ( ! exhaustive )
-                            return stage_rc;
-                        if ( cmp_rc == 0 )
-                            cmp_rc = stage_rc;
-                    }
-                }
-
-                /* if "b" claims to be newer than "a" */
-                else if ( a -> version < b -> version )
-                {
-                    if ( ( stage_bits & stbl_cmp_newer ) != 0 )
-                    {
-                        stage_rc = RC ( rcVDB, rcSchema, rcParsing, rcTable, rcInconsistent );
-                        PLOGERR ( klogErr, ( klogErr, stage_rc, "STableCompare: illegal redeclaration of table '$(tbl)' - version $(old_vers) has newer parents than version $(new_vers)."
-                                             , "tbl=%N,new_vers=#%.3V,old_vers=#%.3V"
-                                             , a -> name, b -> version, a -> version ) );
-                        if ( ! exhaustive )
-                            return stage_rc;
-                        if ( cmp_rc == 0 )
-                            cmp_rc = stage_rc;
-                    }
-                }
-
-                /* they are the same - check parent versions */
-                else if ( ( stage_bits & ( stbl_cmp_newer | stbl_cmp_older ) ) != 0 )
-                {
-                    PLOGMSG ( klogInfo, ( klogInfo, "STableCompare: table '$(tbl)' differs in parent hierarchy"
-                                          " - latest declaration chosen automatically.", "tbl=%N#%.3V"
-                                          , a -> name, b -> version ));
-
-                    * newer = ( stage_bits & stbl_cmp_newer ) ? a : b;
-                }
-            }
-
-            cmp_bits |= stage_bits;
-        }
-    }
-
-    /* test #2 - immediate extern columns */
-    /* test #3 - immediate physical columns */
-    /* test #4 - immediate productions */
-    /* test #5 - immediate virtual productions */
-    /* test #6 - deep parents */
-    /* test #7 - deep extern columns */
-    /* test #8 - deep physical columns */
-    /* test #9 - deep productions */
-    /* test #10 - deep virtual productions */
-
-    return cmp_rc;
-}
-
-
-/* Mark
- */
-void CC STableClearMark ( void *item, void *ignore )
-{
-    STable *self = item;
-    self -> marked = false;
-}
-
-
-void CC STableMark ( void * item, void * data )
-{
-    STable * self = item;
-    if ( self != NULL && ! self -> marked )
-    {
-        self -> marked = true;
-        SFunctionMark ( ( void * )self -> untyped, data );
-        VectorForEach ( & self -> col, false, SColumnMark, data );
-        VectorForEach ( & self -> phys, false, SPhysMemberMark, data );
-        VectorForEach ( & self -> prod, false, SProductionMark, data );
-        VectorForEach ( & self -> parents, false, STableMark, data );
-    }
-}
-
-void STableNameMark ( const SNameOverload *self, const VSchema *schema )
-{
-    if ( self != NULL )
-    {
-        VectorForEach ( & self -> items, false, STableMark, ( void * )schema );
-    }
-}
-
-
-/* Dump
- *  dump "table" { }
- */
-rc_t STableDump ( const STable *self, struct SDumper *d )
-{
-    d -> rc = FQNDump ( self != NULL ? self -> name : NULL, d );
-    if ( d -> rc == 0 && self != NULL )
-        d -> rc = SDumperVersion ( d, self -> version );
-    return d -> rc;
-}
-
-#if _DEBUGGING
-static
-bool CC SProductionDumpVirtuals ( void *item, void *data )
-{
-    SDumper *b = data;
-    const KSymbol *sym = ( const void* ) item;
-
-    switch ( sym -> type )
-    {
-    case eVirtual:
-        b -> rc = SDumperPrint ( b, "\t *  virtual %N = 0;\n", sym );
-        break;
-    case eProduction:
-    {
-        const SProduction *prod = sym -> u . obj;
-        b -> rc = SDumperPrint ( b, "\t *  %E %N;\n", prod -> fd, sym );
-        break;
-    }
-    case eColumn:
-    {
-        b -> rc = SDumperPrint ( b, "\t *  column %N;\n", sym );
-        break;
-    }
-    case ePhysMember:
-    {
-        const SPhysMember *phys = sym -> u . obj;
-        if ( phys -> type != NULL )
-            b -> rc = SDumperPrint ( b, "\t *  physical %E %N;\n", phys -> type, sym );
-        else
-            b -> rc = SDumperPrint ( b, "\t *  physical %T %N;\n", & phys -> td, sym );
-        break;
-    }}
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-
-static
-bool CC SProductionDumpOverrides ( void *item, void *data )
-{
-    SDumper *b = data;
-    const STableOverrides *to = ( const void* ) item;
-    if ( VectorLength ( & to -> overrides ) == 0 )
-        return false;
-
-    b -> rc = SDumperPrint ( b, "\n\t/* %N inherited virtual productions\n", to -> dad -> name );
-    if ( b -> rc != 0 )
-        return true;
-    if ( VectorDoUntil ( & to -> overrides, false, SProductionDumpVirtuals, b ) )
-        return true;
-    b -> rc = SDumperPrint ( b, "\t */\n" );
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-#endif
-
-static
-bool STableDumpBody ( const STable *self, SDumper *b )
-{
-    bool compact = SDumperMode ( b ) == sdmCompact ? true : false;
-
-    if ( self -> untyped != NULL )
-    {
-        b -> rc = SDumperPrint ( b, compact ? "__untyped=%N();" : "\t__untyped = %N ();\n"
-                                 , self -> untyped -> name
-            );
-        if ( b -> rc != 0 )
-            return true;
-    }
-    if ( self -> limit != NULL )
-    {
-        b -> rc = SDumperPrint ( b, compact ? "column default limit=%E;" : "\tcolumn default limit = %E;\n"
-                                 , self -> limit
-            );
-        if ( b -> rc != 0 )
-            return true;
-    }
-#if SLVL >= 8
-    if ( VectorDoUntil ( & self -> col, false, SColumnDefDump, b ) )
-        return true;
-#endif
-    if ( VectorDoUntil ( & self -> prod, false, SProductionDefDump, b ) )
-        return true;
-#if SLVL >= 7
-    if ( VectorDoUntil ( & self -> phys, false, SPhysMemberDefDump, b ) )
-        return true;
-#endif
-#if _DEBUGGING
-    if ( SDumperMode ( b ) == sdmPrint )
-    {
-        if ( VectorDoUntil ( & self -> overrides, false, SProductionDumpOverrides, b ) )
-            return true;
-
-        if ( VectorLength ( & self -> vprods ) != 0 )
-        {
-            b -> rc = SDumperPrint ( b, "\n\t/* %N virtual productions\n", self -> name );
-            if ( b -> rc != 0 )
-                return true;
-            if ( VectorDoUntil ( & self -> vprods, false, SProductionDumpVirtuals, b ) )
-                return true;
-            b -> rc = SDumperPrint ( b, "\t */\n" );
-            if ( b -> rc != 0 )
-                return true;
-        }
-    }
-#endif
-
-    return false;
-}
-
-static
-bool CC STableDumpParents ( void *item, void *data )
-{
-    SDumper *b = data;
-    const STable *self = ( const void* ) item;
-
-    b -> rc = SDumperPrint ( b, "\v%N%V", self -> name, self -> version );
-
-    SDumperSepString ( b, SDumperMode ( b ) == sdmCompact ? "," : ", " );
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-
-bool CC STableDefDump ( void *item, void *data )
-{
-    bool rtn;
-    SDumper *b = data;
-    const STable *self = ( const void* ) item;
-    bool compact = SDumperMode ( b ) == sdmCompact ? true : false;
-
-    if ( SDumperMarkedMode ( b ) && ! self -> marked )
-        return false;
-
-    b -> rc = SDumperPrint ( b, compact ? "table %N" : "\ttable %N", self -> name );
-
-    if ( b -> rc == 0 )
-        b -> rc = SDumperVersion ( b, self -> version );
-
-    if ( b -> rc == 0 )
-    {
-        SDumperSepString ( b, compact ? "=" : " = " );
-        VectorDoUntil ( & self -> parents, false, STableDumpParents, b );
-    }
-
-    if ( b -> rc == 0 )
-        b -> rc = SDumperPrint ( b, compact ? "{" : "\n\t{\n" );
-
-    if ( b -> rc != 0 )
-        return true;
-
-    if ( ! compact )
-        SDumperIncIndentLevel ( b );
-    rtn = STableDumpBody ( self, b );
-    if ( ! compact )
-        SDumperDecIndentLevel ( b );
-
-    if ( rtn )
-        return true;
-
-    b -> rc = SDumperPrint ( b, compact ? "}" : "\t}\n" );
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-
-#endif
-
-
-/*--------------------------------------------------------------------------
- * VSchema
- */
-
-#if SLVL >= 7
-
-/*
- * physical-name      = '.' ID
- */
-void physical_name ( const KSymTable *tbl, KTokenSource *src, KToken *t, const SchemaEnv *env )
-{
-    KToken t2;
-    if ( KTokenizerNext ( kDefaultTokenizer, src, & t2 ) -> id != eIdent ||
-         t -> str . addr + 1 != t2 . str . addr )
-    {
-        /* this is just a dot */
-        KTokenSourceReturn ( src, & t2 );
-    }
-    else
-    {
-        /* this is a physical name */
-        t -> str . size += t2 . str . size;
-        t -> str . len += t2 . str . len;
-        t -> id = eIdent;
-        t -> sym = KSymTableFind ( tbl, & t -> str );
-        if ( t -> sym != NULL )
-            t -> id = t -> sym -> type;
-    }
-}
-
-/*
- *    physical-decl      = 'physical' [ 'column' ] KCOL '{' <physical-stmts> '}'
- *    physical-stmts     = <physical-stmt> ';' [ <physical-stmts> ]
- *    physical-stmt      = 'read' ( '=' | '+= ) <cond-expr>
- *                       | 'write' ( '=' | '+=' ) <cond-expr>
- *                       | '__untyped' '=' <untyped-expr>
- */
-static
-rc_t physical_mbr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SPhysMember *m )
-{
-    rc_t rc;
-
-    /* determine static flag */
-    if ( t -> id == kw_static )
-    {
-        next_token ( tbl, src, t );
-        m -> stat = true;
-    }
-
-    /* skip keywords */
-    if ( t -> id == kw_physical )
-        next_token ( tbl, src, t );
-    if ( t -> id == kw_column )
-        next_token ( tbl, src, t );
-
-    /* if member type begins with schema parameters... */
-    if ( t -> id == eLeftAngle )
-        rc = phys_encoding_expr ( tbl, src, t, env, self, & m -> td, & m -> type );
-    else
-    {
-        /* get either a typename or a physical column name */
-        rc = next_fqn ( tbl, src, t, env );
-        if ( rc == 0 )
-        {
-            /* column is probably based upon a physical structure */
-            if ( t -> id == ePhysical )
-                rc = phys_encoding_expr ( tbl, src, t, env, self, & m -> td, & m -> type );            
-            else if ( t -> id != eDatatype )
-                return KTokenExpected ( t, klogErr, "typename or physical column type" );
-            else
-                rc = typedecl ( tbl, src, t, env, self, & m -> td );
-        }
-    }
-    if ( rc != 0 )
-        return KTokenFailure ( t, klogErr, rc, "typename or physical column type" );
-
-    /* get name */
-    if ( t -> id != ePeriod )
-        return KTokenExpected ( t, klogErr, "physical name starting with period" );
-    physical_name ( tbl, src, t, env );
-    if ( t -> id == eIdent )
-    {
-        /* enter name into scope */
-        rc = KSymTableCreateConstSymbol ( tbl, & m -> name, & t -> str, ePhysMember, m );
-        if ( rc != 0 )
-            return KTokenRCExplain ( t, klogInt, rc );
-    }
-    else if ( t -> id == ePhysMember )
-        return KTokenExpected ( t, klogErr, "undefined physical member name" );
-    else if ( t -> id != eForward && t -> id != eVirtual )
-        return KTokenExpected ( t, klogErr, "physical member name" );
-    else
-    {
-        m -> name = t -> sym;
-        ( ( KSymbol* ) t -> sym ) -> u . obj = m;
-        ( ( KSymbol* ) t -> sym ) -> type = ePhysMember;
-    }
-
-
-    /* get the assignment expression */
-    if ( next_token ( tbl, src, t ) -> id == eAssign )
-    {
-        rc = cond_expr ( tbl, src, next_token ( tbl, src, t ), env, self, & m -> expr );
-        if ( rc != 0 )
-            return KTokenFailure ( t, klogErr, rc, "assignment expression" );
-    }
-
-    /* expect we're done */
-    return expect ( tbl, src, t, eSemiColon, ";", true );
-}
-
-static
-rc_t physical_member ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, STable *table )
-{
-    rc_t rc;
-    SPhysMember *m = malloc ( sizeof * m );
-    if ( m == NULL )
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-    else
-    {
-        memset ( m, 0, sizeof * m );
-        rc = physical_mbr ( tbl, src, t, env, self, m );
-        if ( rc == 0 )
-        {
-            rc = VectorAppend ( & table -> phys, & m -> cid . id, m );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        SPhysMemberWhack ( m, NULL );
-    }
-    return rc;
-}
-
-static
-rc_t implicit_physical_member ( KSymTable *tbl, const SchemaEnv *env,
-    STable *table, SColumn *c, KSymbol *sym )
-{
-    rc_t rc;
-    SPhysMember *m = malloc ( sizeof * m );
-    if ( m == NULL )
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-    else
-    {
-        /* create initialized simple physical member */
-        memset ( m, 0, sizeof * m );
-        m -> simple = true;
-
-        /* capture type information */
-        m -> td = c -> td;
-        if ( c -> ptype != NULL )
-        {
-            m -> type = c -> ptype;
-            atomic32_inc ( & ( ( SExpression* ) c -> ptype ) -> refcount );
-        }
-
-        /* link up with name */
-        m -> name = sym;
-        sym -> u . obj = m;
-
-        /* now create simple input expression */
-        rc = SSymExprMake ( & m -> expr, c -> name, eColExpr );
-        if ( rc == 0 )
-            rc = SSymExprMake ( & c -> read, sym, ePhysExpr );
-        if ( rc == 0 )
-        {
-            rc = VectorAppend ( & table -> phys, & m -> cid . id, m );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        SPhysMemberWhack ( m, NULL );
-    }
-    return rc;
-}
-#endif
-
-#if SLVL >= 8
-/*
- * column-stmt        = 'read' '=' <cond-expr>
- *                    | 'validate' '=' <cond-expr>
- *                    | 'limit' '=' UINT_EXPR
- *                    | ';'
- */
-static
-rc_t column_stmt ( KSymTable *tbl, KTokenSource *src, KToken *t,
-     const SchemaEnv *env, VSchema *self, SColumn *c, const char **expected )
-{
-    rc_t rc;
-
-    switch ( t -> id )
-    {
-    case eSemiColon:
-        return 0;
-
-    case kw_read:
-
-        if ( c -> simple )
-            break;
-
-        if ( c -> read != NULL )
-        {
-            rc = RC ( rcVDB, rcSchema, rcParsing, rcProduction, rcExists );
-            return KTokenRCExplain ( t, klogErr, rc );
-        }
-
-        rc = expect ( tbl, src, next_token ( tbl, src, t ), eAssign, "=", true );
-        if ( rc == 0 )
-        {
-            rc = cond_expr ( tbl, src, t, env, self, & c -> read );
-            if ( rc != 0 )
-                KTokenFailure ( t, klogErr, rc, "read expression" );
-            else
-            {
-                if ( c -> read_only )
-                    * expected = "}";
-                else if ( c -> validate == NULL && c -> limit == NULL )
-                    * expected = "validate or limit or }";
-                else if ( c -> validate == NULL )
-                    * expected = "validate or }";
-                else if ( c -> limit == NULL )
-                    * expected = "limit or }";
-                else
-                    * expected = "}";
-                return 0;
-            }
-        }
-        break;
-
-    case kw_validate:
-
-        if ( c -> read_only || c -> simple )
-            break;
-
-        if ( c -> validate != NULL )
-        {
-            rc = RC ( rcVDB, rcSchema, rcParsing, rcProduction, rcExists );
-            return KTokenRCExplain ( t, klogErr, rc );
-        }
-
-        rc = expect ( tbl, src, next_token ( tbl, src, t ), eAssign, "=", true );
-        if ( rc == 0 )
-        {
-            rc = cond_expr ( tbl, src, t, env, self, & c -> validate );
-            if ( rc != 0 )
-                KTokenFailure ( t, klogErr, rc, "validate expression" );
-            else
-            {
-                if ( c -> read == NULL && c -> limit == NULL )
-                    * expected = "read or limit or }";
-                else if ( c -> read == NULL )
-                    * expected = "read or }";
-                else if ( c -> limit == NULL )
-                    * expected = "limit or }";
-                else
-                    * expected = "}";
-                return 0;
-            }
-        }
-        break;
-
-    case kw_limit:
-
-        if ( c -> read_only )
-            break;
-
-        if ( c -> limit != NULL )
-        {
-            rc = RC ( rcVDB, rcSchema, rcParsing, rcConstraint, rcExists );
-            return KTokenRCExplain ( t, klogErr, rc );
-        }
-
-        rc = expect ( tbl, src, next_token ( tbl, src, t ), eAssign, "=", true );
-        if ( rc == 0 )
-        {
-            rc = const_expr ( tbl, src, t, env, self, & c -> limit );
-            if ( rc != 0 )
-                KTokenFailure ( t, klogErr, rc, "limit constraint" );
-            else
-            {
-                if ( c -> read == NULL && c -> validate == NULL )
-                    * expected = "read or validate or }";
-                else if ( c -> read == NULL )
-                    * expected = "read or }";
-                else if ( c -> validate == NULL )
-                    * expected = "validate or }";
-                else
-                    * expected = "}";
-                return 0;
-            }
-        }
-        break;
-    }
-
-    return KTokenExpected ( t, klogErr, * expected );
-}
-
-/*
- * column-body        = '{' <column-stmts> '}'
- * column-stmts       = <column-stmt> ';' [ <column-stmts> ]
- */
-static
-rc_t column_body ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, SColumn *c )
-{
-    const char *expected;
-
-    rc_t rc = expect ( tbl, src, t, eLeftCurly, "{", true );
-    if ( rc != 0 )
-        return rc;
-
-    expected = c -> read_only ? "read or }" :
-        ( c -> simple ? "limit or }" :  "read or validate or limit or }" );
-
-    while ( t -> id != eRightCurly )
-    {
-        rc = column_stmt ( tbl, src, t, env, self, c, & expected );
-        if ( rc == 0 )
-            rc = expect ( tbl, src, t, eSemiColon, ";", true );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    if ( c -> read == NULL && c -> validate == NULL )
-        c -> simple = true;
-
-    return expect ( tbl, src, t, eRightCurly, "}", true );
-}
-
-/*
- * column-decl        = <typedecl> ID <column-body>
- */
-static
-rc_t typed_column_decl ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, STable *table, SColumn *c )
-{
-    rc_t rc = 0;
-
-    /* if column was forwarded, give it a type */
-    if ( t -> id == eForward || t -> id == eVirtual )
-    {
-        c -> name = t -> sym;
-        t -> sym -> type = eColumn;
-    }
-
-    /* catch case where column exists */
-    else if ( t -> id == eColumn )
-    {
-        const SNameOverload *name = t -> sym -> u . obj;
-        if ( VectorFind ( & name -> items, & c -> td, NULL, SColumnCmp ) != NULL )
-            return KTokenExpected ( t, klogErr, "new column name" );
-        c -> name = t -> sym;
-    }
-    else
-    {
-        /* allow names defined in scopes other than table and intrinsic */
-        if ( t -> sym != NULL )
-        {
-            KTokenSourceReturn ( src, t );
-            next_shallow_token ( tbl, src, t, true );
-        }
-
-        if ( t -> id != eIdent )
-            return KTokenExpected ( t, klogErr, "column name" );
-
-        rc = KSymTableCreateConstSymbol ( tbl, & c -> name, & t -> str, eColumn, NULL );
-        if ( rc != 0 )
-            return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    /* we have "[ 'readonly' | ... ] 'column' TYPE ID" by now.
-       accept a simple assignment for read/validate,
-       or a semi-colon for implicit physical, or a compound
-       statement body for read/validate/limit statements */
-    switch ( next_token ( tbl, src, t ) -> id )
-    {
-    case eSemiColon:
-
-        /* acceptable unless readonly */
-        if ( c -> read_only )
-            rc = KTokenExpected ( t, klogErr, "= or {" );
-
-        /* this looks like a simple column */
-        c -> simple = true;
-        break;
-
-    case eAssign:
-
-        /* if a simple column ( implicit physical ),
-           then there cannot be a read expression */
-        if ( c -> simple )
-            rc = KTokenExpected ( t, klogErr, "; after simple column" );
-        else
-        {
-            /* simple read expression */
-            next_token ( tbl, src, t );
-            rc = cond_expr ( tbl, src, t, env, self, & c -> read );
-            if ( rc != 0 )
-                KTokenFailure ( t, klogErr, rc, "read expression" );
-            else
-                rc = expect ( tbl, src, t, eSemiColon, ";", true );
-        }
-        break;
-
-    case eLeftCurly:
-        /* this is a canonical-form column */
-        rc = column_body ( tbl, src, t, env, self, c );
-        break;
-
-    default:
-        rc = KTokenExpected ( t, klogErr, c -> read_only ? "= or {" : "; or = or {" );
-    }
-
-    /* check for a simple column */
-    if ( rc == 0 && c -> simple )
-    {
-        String physname;
-        char physnamebuff [ 256 ];
-
-        /* check for existence of corresponding physical member */
-        if ( c -> name -> name . size >= sizeof physnamebuff )
-        {
-            /* this is a very long column name... */
-            rc = RC ( rcVDB, rcSchema, rcParsing, rcName, rcExcessive );
-            KTokenFailure ( t, klogErr, rc, "column name" );
-        }
-        else
-        {
-            KSymbol *sym;
-
-            /* tack a dot onto the beginning and look up the symbol */
-            physnamebuff [ 0 ] = '.';
-            memcpy ( & physnamebuff [ 1 ], c -> name -> name . addr, c -> name -> name . size );
-            StringInit ( & physname, physnamebuff, c -> name -> name . size + 1, c -> name -> name . len + 1 );
-            sym = KSymTableFind ( tbl, & physname );
-
-            /* if the symbol exists, then this CANNOT be a simple column */
-            if ( sym != NULL && ! ( sym -> type == eForward || sym -> type == eVirtual ) )
-            {
-                /* check for explicit physical type */
-                if ( c -> ptype != NULL )
-                {
-                    rc = RC ( rcVDB, rcSchema, rcParsing, rcName, rcExists );
-                    KTokenFailure ( t, klogErr, rc, "implicit physical column previously declared" );
-                }
-                else
-                {
-                    rc = RC ( rcVDB, rcSchema, rcParsing, rcExpression, rcNotFound );
-                    KTokenFailure ( t, klogErr, rc, "missing column read or validate expression" );
-                }
-            }
-            else if ( ( c -> td . type_id & 0xC0000000 ) != 0 )
-            {
-                rc = RC ( rcVDB, rcSchema, rcParsing, rcType, rcIncorrect );
-                KTokenFailure ( t, klogErr, rc, "simple columns cannot have typeset as type" );
-            }
-            else
-            {
-                if ( sym != NULL )
-                    sym -> type = ePhysMember;
-                else
-                {
-                    rc = KSymTableCreateSymbol ( tbl, & sym, & physname, ePhysMember, NULL );
-                    if ( rc != 0 )
-                        KTokenFailure ( t, klogErr, rc, "failed to create symbol" );
-                }
-                if ( rc == 0 )
-                {
-                    rc = implicit_physical_member ( tbl, env, table, c, sym );
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t column_decl ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, STable *table, SColumn *c )
-{
-    rc_t rc;
-
-    /* intercept physical type unless marked read-only */
-    if ( ! c -> read_only )
-    {
-        switch ( t -> id )
-        {
-        case eNamespace:
-            rc = next_fqn ( tbl, src, t, env );
-            if ( rc != 0 )
-                return KTokenFailure ( t, klogErr, rc, "typename or physical column type" );
-            if ( t -> id != ePhysical )
-                break;
-        case ePhysical:
-        case eLeftAngle:
-            rc = phys_encoding_expr ( tbl, src, t, env, self, & c -> td, & c -> ptype );
-            if ( rc != 0 )
-                return KTokenFailure ( t, klogErr, rc, "typename or physical column type" );
-
-            /* this column MUST be simple */
-            c -> simple = true;
-            return typed_column_decl ( tbl, src, t, env, self, table, c );
-        }
-    }
-
-#if ALLOW_COLUMN_TYPESET
-    /* read typedecl or typeset */
-    rc = typespec ( tbl, src, t, env, self, & c -> td );
-#else
-    /* read hard typedecl */
-    rc = typedecl ( tbl, src, t, env, self, & c -> td );
-#endif
-    if ( rc != 0 )
-        return KTokenExpected ( t, klogErr, "column type" );
-
-    /* finish the parse with a normal type */
-    return typed_column_decl ( tbl, src, t, env, self, table, c );
-}
-
-static
-rc_t column_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, STable *table )
-{
-    rc_t rc;
-    SColumn *c;
-    bool dflt, read_only;
-
-    /* parse 'virtual' and 'default' keywords */
-    for ( dflt = read_only = false;
-          t -> id != kw_column; next_token ( tbl, src, t ) )
-    {
-        switch ( t -> id )
-        {
-        case kw_default:
-            if ( dflt )
-                break;
-            dflt = true;
-            continue;
-
-        case kw_extern:
-            continue;
-
-        case kw_readonly:
-            if ( read_only )
-                break;
-            read_only = true;
-            continue;
-        }
-
-        return KTokenExpected ( t, klogErr, "column" );
-    }
-
-    /* consume 'column' keyword and look for 'default' or 'limit' */
-    switch ( next_token ( tbl, src, t ) -> id )
-    {
-    case kw_default:
-    {
-        KToken t2 = * t;
-        KTokenSource src2 = * src;
-        if ( next_token ( tbl, src, t ) -> id != kw_limit )
-        {
-            * t = t2;
-            * src = src2;
-            break;
-        }
-    }
-    case kw_limit:
-
-        if ( dflt || read_only )
-            break;
-
-        if ( table -> limit != NULL )
-        {
-            rc = RC ( rcVDB, rcSchema, rcParsing, rcConstraint, rcExists );
-            return KTokenRCExplain ( t, klogErr, rc );
-        }
-
-        rc = expect ( tbl, src, next_token ( tbl, src, t ), eAssign, "=", true );
-        if ( rc == 0 )
-        {
-            rc = const_expr ( tbl, src, t, env, self, & table -> limit );
-            if ( rc != 0 )
-                KTokenFailure ( t, klogErr, rc, "limit constraint" );
-            else
-                rc = expect ( tbl, src, t, eSemiColon, ";", true );
-        }
-        return rc;
-    }
-
-    /* create column object */
-    c = malloc ( sizeof * c );
-    if ( c == NULL )
-    {
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-        return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    memset ( c, 0, sizeof * c );
-    c -> dflt = dflt;
-    c -> read_only = read_only;
-
-    /* parse decl */
-    rc = column_decl ( tbl, src, t, env, self, table, c );
-    if ( rc == 0 )
-    {
-        /* give column its own id within table */
-        rc = VectorAppend ( & table -> col, & c -> cid . id, c );
-        if ( rc != 0 )
-            KTokenRCExplain ( t, klogInt, rc );
-        else
-        {
-            void *ignore;
-            SNameOverload *name = ( void* ) c -> name -> u . obj;
-            if ( name == NULL )
-            {
-                rc = SNameOverloadMake ( & name, c -> name, 0, 4 );
-                if ( rc == 0 )
-                {
-                    name -> cid . ctx = -1;
-                    rc = VectorAppend ( & table -> cname, & name -> cid . id, name );
-                    if ( rc != 0 )
-                        SNameOverloadWhack ( name, NULL );
-                }
-            }
-
-            if ( rc == 0 )
-            {
-                rc = VectorInsertUnique ( & name -> items, c, NULL, SColumnSort );
-                if ( rc == 0 )
-                    return 0;
-            }
-
-            /* reverse column insertion */
-            VectorSwap ( & table -> col, c -> cid . id, NULL, & ignore );
-
-            /* what went wrong */
-            KTokenRCExplain ( t, klogInt, rc );
-        }
-    }
-
-    SColumnWhack ( c, NULL );
-    return rc;
-}
-#endif
-
-#if SLVL >= 6
-
-static
-rc_t untyped_tbl_expr ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, STable *table )
-{
-    const SNameOverload *name;
-
-    /* expecting a function assignment */
-    rc_t rc = expect ( tbl, src,
-        next_token ( tbl, src, t ), eAssign, "=", true );
-    if ( rc == 0 )
-        rc = next_fqn ( tbl, src, t, env );
-    if ( rc != 0 )
-        return rc;
-    if ( t -> id != eUntypedFunc )
-        return KTokenExpected ( t, klogErr, "untyped function expression" );
-    name = t -> sym -> u . obj;
-
-    rc = expect ( tbl, src,
-        next_token ( tbl, src, t ), eLeftParen, "(", true );
-    if ( rc == 0 )
-        rc = expect ( tbl, src, t, eRightParen, ")", true );
-    if ( rc == 0 )
-        rc = expect ( tbl, src, t, eSemiColon, ";", true );
-
-    if ( rc == 0 )
-    {
-        table -> untyped = VectorLast ( & name -> items );
-        if ( table -> untyped == NULL )
-        {
-            rc = RC ( rcVDB, rcSchema, rcParsing, rcFunction, rcNotFound );
-            KTokenRCExplain ( t, klogErr, rc );
-        }
-    }
-
-    return rc;
-}
-
-#if SLVL >= 8
-static
-rc_t default_view_decl ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, STable *table )
-{
-    rc_t rc;
-    bool string_too_long;
-
-    if ( next_token ( tbl, src, t ) -> id != eString )
-        return KTokenExpected ( t, klogErr, "default view declaration" );
-
-    string_too_long = false;
-    if ( t -> str . size >= 236 + 2 )
-    {
-        KTokenExpected ( t, klogWarn, "default view declaration less than 236 characters" );
-        string_too_long = true;
-    }
-
-    rc = expect ( tbl, src, t, eSemiColon, ";", true );
-    if ( rc == 0 && ! string_too_long )
-    {
-        String decl = t -> str;
-        ++ decl . addr;
-        decl . size -= 2;
-        decl . len -= 2;
-
-        if ( table -> dflt_view != NULL )
-            StringWhack ( table -> dflt_view );
-
-        rc = StringCopy ( & table -> dflt_view, & decl );
-    }
-
-    return rc;
-}
-#endif
-
-/*
- * table-local-decl   = [ 'virtual' ] 'column' <column-decl>
- *                    | 'physical' [ 'column' ] <physical-decl>
- *                    | <production_stmt>
- */
-static
-rc_t table_local_decl ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, STable *table )
-{
-    rc_t rc;
-
-    switch ( t -> id )
-    {
-#if SLVL >= 8
-    case kw_default:
-        if ( env -> default_view_decl )
-        {
-            KToken t2;
-            if ( next_token ( tbl, src, & t2 ) -> id == kw_view )
-                return default_view_decl ( tbl, src, t, env, self, table );
-             KTokenSourceReturn ( src, & t2 );
-        }
-        /* no break */
-    case kw_extern:
-    case kw_column:
-    case kw_readonly:
-        return column_declaration ( tbl, src, t, env, self, table );
-#endif
-#if SLVL >= 7
-    case kw_static:
-    case kw_physical:
-        return physical_member ( tbl, src, t, env, self, table );
-#endif
-    case kw___untyped:
-        return untyped_tbl_expr ( tbl, src, t, env, self, table );
-#if 0
-    case kw_index:
-        break;
-#endif
-    case eSemiColon:
-        next_token ( tbl, src, t );
-        rc = 0;
-        break;
-
-    default:
-        rc = production_stmt ( tbl, src, t, env, self, & table -> prod, eTable );
-        if ( rc == 0 )
-            rc = expect ( tbl, src, t, eSemiColon, ";", true );
-    }
-
-    return rc;
-}
-
-/*
- * table-body         = '{' [ <table-decl-list> ] '}'
- *
- * table-decl-list    = <tbl-local-decl> ';' [ <table-decl-list> ]
- */
-typedef struct STableScanData STableScanData;
-struct STableScanData
-{
-    STable *self;
-    rc_t rc;
-};
-
-static
-bool CC table_fwd_scan ( BSTNode *n, void *data )
-{
-    STableScanData *pb = data;
-    KSymbol *sym = ( KSymbol* ) n;
-    STable *self = pb -> self;
-
-    /* process forwarded symbols */
-    if ( sym -> type == eForward )
-    {
-        /* this symbol was introduced in THIS table */
-        sym -> u . fwd . ctx = self -> id;
-
-        /* add it to the introduced virtual productions and make it virtual */
-        pb -> rc = VectorAppend ( & self -> vprods, & sym -> u . fwd . id, sym );
-        if ( pb -> rc != 0 )
-            return true;
-        sym -> type = eVirtual;
-    }
-    /* symbols other than fwd or virtual are ignored */
-    else if ( sym -> type != eVirtual )
-    {
-        return false;
-    }
-
-    /* add symbol to vector to track ownership */
-    pb -> rc = VectorAppend ( & self -> syms, NULL, sym );
-    if ( pb -> rc != 0 )
-        return true;
-
-    /* remove from symbol table */
-    BSTreeUnlink ( & self -> scope, & sym -> n );
-    return false;
-}
-
-static
-rc_t table_body ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, STable *table )
-{
-    rc_t rc = expect ( tbl, src, t, eLeftCurly, "{", true );
-    if ( rc != 0 )
-        return rc;
-
-    while ( t -> id != eRightCurly )
-    {
-        rc = table_local_decl ( tbl, src, t, env, self, table );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    rc = expect ( tbl, src, t, eRightCurly, "}", true );
-    if ( rc == 0 )
-    {
-        STableScanData pb;
-        pb . self = table;
-        pb . rc = 0;
-
-        /* scan table scope for unresolved forward references */
-        if ( BSTreeDoUntil ( & table -> scope, false, table_fwd_scan, & pb ) )
-            KTokenRCExplain ( t, klogInt, rc = pb . rc );
-    }
-
-    return rc;
-}
-
-/*
- * table-syntax
- */
-static
-bool CC table_prod_syntax ( void *item, void *data )
-{
-    rc_t *rc = data;
-    const SProduction *prod = ( const SProduction* ) item;
-
-    if ( ! prod -> trigger )
-        * rc = eval_expr_syntax ( prod -> fd );
-    if ( * rc == 0 )
-        * rc = eval_expr_syntax ( prod -> expr );
-
-    return ( * rc != 0 ) ? true : false;
-}
-
-static
-rc_t table_stmt_syntax ( const STable *table )
-{
-    rc_t rc = 0;
-    VectorDoUntil ( & table -> prod, false, table_prod_syntax, & rc );
-    return rc;
-}
-
-#if SLVL >= 8
-static
-bool CC table_typed_column_syntax ( void *item, void *data )
-{
-    rc_t *rc = data;
-    const SColumn *col = ( const SColumn* ) item;
-
-    if ( col -> read != NULL )
-        * rc = eval_expr_syntax ( col -> read );
-    if ( * rc == 0 && col -> validate != NULL )
-        * rc = eval_expr_syntax ( col -> validate );
-    if ( * rc == 0 && col -> limit != NULL )
-        * rc = eval_expr_syntax ( col -> limit );
-
-    return ( * rc != 0 ) ? true : false;
-}
-
-static
-rc_t table_column_syntax ( const STable *table )
-{
-    rc_t rc = 0;
-    VectorDoUntil ( & table -> col, false, table_typed_column_syntax, & rc );
-    return rc;
-}
-#endif
-
-#if SLVL >= 7
-static
-bool CC table_physcol_syntax ( void *item, void *data )
-{
-    rc_t *rc = data;
-    const SPhysMember *col = ( const SPhysMember* ) item;
-
-    if ( col -> expr == NULL )
-        return false;
-
-    * rc = eval_expr_syntax ( col -> expr );
-    return ( * rc != 0 ) ? true : false;
-}
-
-static
-rc_t table_physical_syntax ( const STable *table )
-{
-    rc_t rc = 0;
-    VectorDoUntil ( & table -> phys, false, table_physcol_syntax, & rc );
-    return rc;
-}
-#endif
-
-
-/*
- * push-tbl-scope
- * pop-tbl-scope
- */
-void pop_tbl_scope ( KSymTable *tbl, const STable *table )
-{
-    uint32_t i, count = VectorLength ( & table -> overrides );
-    for ( ++ count, i = 0; i < count; ++ i )
-        KSymTablePopScope ( tbl );
-}
-
-rc_t push_tbl_scope ( KSymTable *tbl, const STable *table )
-{
-    rc_t rc;
-    uint32_t i = VectorStart ( & table -> overrides );
-    uint32_t count = VectorLength ( & table -> overrides );
-    for ( count += i; i < count; ++ i )
-    {
-        const STableOverrides *to = ( const void* ) VectorGet ( & table -> overrides, i );
-        rc = KSymTablePushScope ( tbl, ( BSTree* ) & to -> dad -> scope );
-        if ( rc != 0 )
-        {
-            for ( count = VectorStart ( & table -> overrides ); i > count; -- i )
-                KSymTablePopScope ( tbl );
-            return rc;
-        }
-    }
-
-    rc = KSymTablePushScope ( tbl, ( BSTree* ) & table -> scope );
-    if ( rc != 0 )
-    {
-        for ( i = VectorStart ( & table -> overrides ); i < count; ++ i )
-            KSymTablePopScope ( tbl );
-    }
-
-    return rc;
-}
-
-/*
- * init-tbl-symtab
- *  initializes "tbl"
- *  places table in scope
- *  must be balanced by KSymTableWhack
- */
-rc_t init_tbl_symtab ( KSymTable *tbl, const VSchema *schema, const STable *table )
-{
-    rc_t rc = init_symtab ( tbl, schema );
-    if ( rc == 0 )
-    {
-        rc = push_tbl_scope ( tbl, table );
-        if ( rc == 0 )
-            return 0;
-
-        KSymTableWhack ( tbl );
-    }
-
-    return rc;
-}
-
-
-/*
- * table-decl         = 'table' <fqn> '#' <maj-min-rel>
- *                      [ '=' <table-name> ] <table-body>
- * table-body         = '{' [ <table-stmts> ] '}'
- * table-stmts        = <table-stmt> ';' [ <table-stmts> ]
- */
-static
-rc_t table_decl ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self, STable *table )
-{
-    /* table name */
-    rc_t rc = create_fqn ( tbl, src, t, env, eTable, NULL );
-    if ( rc != 0 && GetRCState ( rc ) != rcExists )
-        return KTokenFailure ( t, klogErr, rc, "table name" );
-    table -> name = t -> sym;
-    table -> src_file = t -> txt -> path;
-    table -> src_line = t -> lineno;
-
-    /* table version */
-    if ( next_token ( tbl, src, t ) -> id != eHash )
-        return KTokenExpected ( t, klogErr, "#" );
-    next_token ( tbl, src, t );
-    rc = maj_min_rel ( tbl, src, t, env, self, & table -> version, true );
-    if ( rc != 0 )
-        return rc;
-
-    /* prepare vectors */
-    VectorInit ( & table -> parents, 0, 4 );
-    VectorInit ( & table -> overrides, 0, 4 );
-    VectorInit ( & table -> col, 0, 16 );
-    VectorInit ( & table -> cname, 0, 16 );
-    VectorInit ( & table -> phys, 0, 16 );
-    VectorInit ( & table -> prod, 0, 64 );
-    VectorInit ( & table -> vprods, 1, 16 );
-    VectorInit ( & table -> syms, 1, 32 );
-
-    /* look for inheritance */
-    if ( t -> id == eAssign ) do
-    {
-        const STable *dad;
-        const SNameOverload *name;
-
-        /* look for dad */
-        rc = next_fqn ( tbl, src, next_token ( tbl, src, t ), env );
-        if ( rc != 0 )
-            return KTokenFailure ( t, klogErr, rc, "table name" );
-
-        /* insist that dad be a table */
-        if ( t -> id != eTable )
-            return KTokenExpected ( t, klogErr, "table name" );
-        name = t -> sym -> u . obj;
-
-        /* check for version */
-        if ( next_token ( tbl, src, t ) -> id != eHash )
-            dad = VectorLast ( & name -> items );
-        else
-        {
-            uint32_t vers;
-            next_token ( tbl, src, t );
-            rc = maj_min_rel ( tbl, src, t, env, self, & vers, true );
-            if ( rc != 0 )
-                return rc;
-            dad = VectorFind ( & name -> items, & vers, NULL, STableCmp );
-#if _DEBUGGING && 1
-            if ( dad != NULL && dad -> version > vers )
-            {
-                PLOGMSG ( klogInfo, ( klogInfo
-                                      , "table_decl: table '$(tbl)' specifies parent table '$(parent)' - should be $(actual_version)"
-                                      , "tbl=%N#%.3V,parent=%N#%.3V,actual_version=#%.3V"
-                                      , table -> name, table -> version
-                                      , dad -> name, vers
-                                      , dad -> version
-                              ));
-            }
-#endif
-        }
-
-        /* dad should be found */
-        if ( dad == NULL )
-        {
-            rc = RC ( rcVDB, rcSchema, rcParsing, rcTable, rcNotFound );
-            return KTokenRCExplain ( t, klogErr, rc );
-        }
-
-        /* take the inheritance */
-        rc = STableExtend ( tbl, table, dad );
-        if ( rc != 0 )
-            return KTokenRCExplain ( t, klogInt, rc );
-    }
-    while ( t -> id == eComma );
-
-    /* enter table into scope */
-    rc = push_tbl_scope ( tbl, table );
-    if ( rc == 0 )
-    {
-        /* scan override tables for virtual symbols */
-        if ( VectorDoUntil ( & table -> overrides, false, STableScanVirtuals, tbl ) )
-            rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-        /* parse the definition */
-        else
-            rc = table_body ( tbl, src, t, env, self, table );
-
-        /* pop out of scope */
-        pop_tbl_scope ( tbl, table );
-    }
-
-    /* fix forward references */
-    if ( rc == 0 )
-    {
-        rc = table_stmt_syntax ( table );
-#if SLVL >= 8
-        if ( rc == 0 )
-            rc = table_column_syntax ( table );
-#endif
-#if SLVL >= 7
-        if ( rc == 0 )
-            rc = table_physical_syntax ( table );
-#endif
-    }
-
-    return rc;
-}
-
-static
-void CC column_set_context ( void *item, void *data )
-{
-    SColumn *self = item;
-    self -> cid . ctx = * ( const uint32_t* ) data;
-}
-
-static
-void CC name_set_context ( void *item, void *data )
-{
-    SNameOverload *self = item;
-    if ( ( int32_t ) self -> cid . ctx < 0 )
-        self -> cid . ctx = * ( const uint32_t* ) data;
-}
-
-static
-void CC physical_set_context ( void *item, void *data )
-{
-    SPhysMember *self = item;
-    self -> cid . ctx = * ( const uint32_t* ) data;
-}
-
-static
-void CC production_set_context ( void *item, void *data )
-{
-    SProduction *self = item;
-    self -> cid . ctx = * ( const uint32_t* ) data;
-}
-
-static
-void CC symbol_set_context ( void *item, void *data )
-{
-    KSymbol *self = item;
-    self -> u . fwd . ctx = * ( const uint32_t* ) data;
-}
-
-static
-void table_set_context ( STable *self )
-{
-    VectorForEach ( & self -> col, false, column_set_context, & self -> id );
-    VectorForEach ( & self -> cname, false, name_set_context, & self -> id );
-    VectorForEach ( & self -> phys, false, physical_set_context, & self -> id );
-    VectorForEach ( & self -> prod, false, production_set_context, & self -> id );
-    VectorForEach ( & self -> vprods, false, symbol_set_context, & self -> id );
-}
-
-#if NO_UPDATE_TBL_REF || 0
-#define schema_update_tbl_ref( self, exist, table ) \
-    0
-#else
-typedef struct update_tbl_ref_data update_tbl_ref_data;
-struct update_tbl_ref_data
-{
-    const STable *exist, *table;
-    rc_t rc;
-};
-
-static
-bool CC table_update_tbl_ref ( void *item, void *data )
-{
-    STable *self = item;
-    update_tbl_ref_data *pb = data;
-
-    bool is_ancestor;
-
-    /* check for having this guy as an immediate parent */
-    uint32_t i = VectorStart ( & self -> parents );
-    uint32_t count = VectorLength ( & self -> parents );
-    for ( count += i; i < count; ++ i )
-    {
-        STable *dad = VectorGet ( & self -> parents, i );
-        if ( ( const STable* ) dad == pb -> exist )
-        {
-            void *ignore;
-            VectorSwap ( & self -> parents, i, pb -> table, & ignore );
-            PARSE_DEBUG (( "table_update_tbl_ref: replaced parent '%N#%.3V' with version #%.3V in table '%N#%.3V'.\n"
-                           , dad -> name, dad -> version
-                           , pb -> table -> version
-                           , self -> name, self -> version
-                ));
-            break;
-        }
-    }
-
-    /* check for having him in the ancestry somewhere */
-    i = VectorStart ( & self -> overrides );
-    count = VectorLength ( & self -> overrides );
-    for ( is_ancestor = false, count += i; i < count; ++ i )
-    {
-        STableOverrides *to = VectorGet ( & self -> overrides, i );
-        if ( to -> dad == pb -> exist )
-        {
-            is_ancestor = true;
-
-            /* rewrite overrides to have updated parent */
-            VectorWhack ( & to -> overrides, NULL, NULL );
-            pb -> rc = VectorCopy ( & pb -> table -> vprods, & to -> overrides );
-            if ( pb -> rc != 0 )
-                return true;
-            to -> dad = pb -> table;
-            to -> ctx = pb -> table -> id;
-            VectorReorder ( & self -> overrides, STableOverridesKSort, NULL );
-            PARSE_DEBUG (( "table_update_tbl_ref: replaced ancestor '%N#%.3V' with version #%.3V in table '%N#%.3V'.\n"
-                           , pb -> exist -> name, pb -> exist -> version
-                           , pb -> table -> version
-                           , self -> name, self -> version
-                ));
-        }
-    }
-
-    /* if he's not an ancestor, we're done */
-    if ( ! is_ancestor )
-        return false;
-
-    /* remove columns from old parent */
-    i = VectorStart ( & self -> cname );
-    count = VectorLength ( & self -> cname );
-    for ( count += i; i < count; ++ i )
-    {
-        Vector cv;
-        uint32_t cx, cnt;
-        SNameOverload *name = VectorGet ( & self -> cname, i );
-
-        /* names originating in existing parent get mapped */
-        if ( name -> cid . ctx == pb -> exist -> id )
-        {
-            name -> cid . ctx = pb -> table -> id;
-            PARSE_DEBUG (( "table_update_tbl_ref: updated context of column name '%N' from %u to %u.\n"
-                           , name -> name
-                           , pb -> exist -> id
-                           , pb -> table -> id
-                ));
-        }
-
-        /* now copy over columns, but eliminate all from old parent */
-        cx = VectorStart ( & name -> items );
-        cnt = VectorLength ( & name -> items );
-        VectorInit ( & cv, cx, cnt );
-        for ( cnt += cx; cx < cnt; ++ cx )
-        {
-            SColumn *c = VectorGet ( & name -> items, cx );
-            if ( c -> cid . ctx == pb -> exist -> id )
-            {
-                PARSE_DEBUG (( "table_update_tbl_ref: dropping column index %u from name '%N'.\n"
-                               , cx
-                               , name -> name
-                    ));
-            }
-            else
-            {
-                pb -> rc = VectorAppend ( & cv, NULL, c );
-                if ( pb -> rc != 0 )
-                    return true;
-            }
-        }
-        VectorWhack ( & name -> items, NULL, NULL );
-        name -> items = cv;
-    }
-
-    /* add in all columns from new parent */
-    if ( VectorDoUntil ( & pb -> table -> cname, false, STableCopyColumnNames, self ) )
-    {
-        pb -> rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-        return true;
-    }
-
-    return false;
-}
-
-static
-bool CC tblmbr_update_tbl_ref ( void *item, void *data )
-{
-    STblMember *self = item;
-    update_tbl_ref_data *pb = data;
-
-    if ( self -> tbl == pb -> exist )
-    {
-        PARSE_DEBUG (( "tblmbr_update_tbl_ref: updated table member '%N %N' from %V to %V.\n"
-                       , pb -> exist -> name
-                       , self -> name
-                       , pb -> exist -> version
-                       , pb -> table -> version
-                ));
-        self -> tbl = pb -> table;
-    }
-
-    return false;
-}
-
-static
-bool CC db_update_tbl_ref ( void *item, void *data )
-{
-    SDatabase *self = item;
-
-    /* update table members */
-    if ( VectorDoUntil ( & self -> tbl, false, tblmbr_update_tbl_ref, data ) )
-        return true;
-
-    return VectorDoUntil ( & self -> db, false, db_update_tbl_ref, data );
-}
-
-static
-rc_t schema_update_tbl_ref ( VSchema *self, const STable *exist, const STable *table )
-{
-    update_tbl_ref_data pb;
-    pb . exist = exist;
-    pb . table = table;
-    pb . rc = 0;
-
-    if ( ! VectorDoUntil ( & self -> tbl, false, table_update_tbl_ref, & pb ) )
-          VectorDoUntil ( & self -> db, false, db_update_tbl_ref, & pb );
-
-    return pb . rc;
-}
-#endif
-
-rc_t table_declaration ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    rc_t rc;
-    void *ignore;
-
-    STable *table = calloc ( 1, sizeof * table );
-    if ( table == NULL )
-    {
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-        return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    rc = table_decl ( tbl, src, t, env, self, table );
-    if ( rc == 0 )
-    {
-        SNameOverload *name = ( void* ) table -> name -> u . obj;
-        if ( name == NULL )
-        {
-            rc = SNameOverloadMake ( & name, table -> name, 0, 4 );
-            if ( rc == 0 )
-            {
-                rc = VectorAppend ( & self -> tname, & name -> cid . id, name );
-                if ( rc != 0 )
-                    SNameOverloadWhack ( name, NULL );
-            }
-        }
-
-        if ( rc == 0 )
-        {
-            rc = VectorAppend ( & self -> tbl, & table -> id, table );
-            if ( rc == 0 )
-            {
-                uint32_t idx;
-
-                /* set the table id on all members */
-                table_set_context ( table );
-
-                /* add to named table overrides */
-                rc = VectorInsertUnique ( & name -> items, table, & idx, STableSort );
-                if ( rc == 0 )
-                    return 0;
-
-                if ( GetRCState ( rc ) == rcExists )
-                {
-                    const STable *newer;
-                    STable *exist = VectorGet ( & name -> items, idx );
-                    rc = STableCompare ( exist, table, & newer, false );
-                    if ( rc == 0 && newer == table )
-                    {
-                        /* put the new one in place of the existing */
-                        VectorSwap ( & name -> items, idx, table, & ignore );
-
-                        /* tell everyone to use new table */
-                        return schema_update_tbl_ref ( self, exist, table );
-                    }
-                }
-
-                VectorSwap ( & self -> tbl, table -> id, NULL, & ignore );
-            }
-        }
-    }
-    else if ( GetRCState ( rc ) == rcExists )
-    {
-        rc = 0;
-    }
-
-    STableWhack ( table, NULL );
-
-    return rc;
-}
-
-#endif
diff --git a/libs/vdb/schema-tok.c b/libs/vdb/schema-tok.c
deleted file mode 100644
index 94a456d..0000000
--- a/libs/vdb/schema-tok.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-#include "schema-tok.h"
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * KToken
- */
-
-
-rc_t KTokenRCExplain ( const KToken *self, KLogLevel lvl, rc_t rc )
-{
-    if ( rc != 0 )
-    {
-        PLOGERR (lvl, ( lvl, rc, "$(file):$(lineno)", "file=%.*s,lineno=%u"
-                   , ( int ) self -> txt -> path . size, self -> txt -> path . addr
-                   , self -> lineno ));
-    }
-    return rc;
-}
-
-rc_t KTokenFailure ( const KToken *self, KLogLevel lvl, rc_t rc, const char *expected )
-{
-    if ( GetRCState ( rc ) != rcUnexpected )
-        return KTokenRCExplain ( self, lvl, rc );
-
-    PLOGMSG ( lvl, ( lvl, "$(file):$(lineno): "
-               "expected '$(expected)' but found '$(found)'",
-               "file=%.*s,lineno=%u,expected=%s,found=%.*s"
-               , ( int ) self -> txt -> path . size, self -> txt -> path . addr
-               , self -> lineno
-               , expected
-               , ( int ) self -> str . size, self -> str . addr ));
-
-    return rc;
-}
-
-rc_t KTokenExpected ( const KToken *self, KLogLevel lvl, const char *expected )
-{
-    return KTokenFailure ( self, lvl,
-        RC ( rcVDB, rcSchema, rcParsing, rcToken, rcUnexpected ), expected );
-}
diff --git a/libs/vdb/schema-tok.h b/libs/vdb/schema-tok.h
deleted file mode 100644
index bdad9dd..0000000
--- a/libs/vdb/schema-tok.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_schema_tok_
-#define _h_schema_tok_
-
-#ifndef _h_klib_token_
-#include <klib/token.h>
-#endif
-
-#ifndef _h_klib_log_
-#include <klib/log.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-/*--------------------------------------------------------------------------
- * KToken
- *  a string with an id
- */
-
-
-/* common error reporting
- */
-rc_t KTokenExpected ( const KToken *self, KLogLevel lvl, const char *expected );
-rc_t KTokenFailure ( const KToken *self, KLogLevel lvl, rc_t rc, const char *expected );
-rc_t KTokenRCExplain ( const KToken *self, KLogLevel lvl, rc_t rc );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_schema_tok_ */
diff --git a/libs/vdb/schema-type.c b/libs/vdb/schema-type.c
deleted file mode 100644
index 9c01d89..0000000
--- a/libs/vdb/schema-type.c
+++ /dev/null
@@ -1,2573 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include "schema-priv.h"
-#include "schema-parse.h"
-#include "schema-expr.h"
-#include "schema-dump.h"
-#include "dbmgr-priv.h"
-
-#include <sra/types.h>
-#include <klib/symbol.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * SFormat
- */
-
-/* Find
- */
-SFormat *VSchemaFindFmtid ( const VSchema *self, uint32_t id )
-{
-    SFormat *fmt = VectorGet ( & self -> fmt, id );
-    while ( fmt == NULL )
-    {
-        self = self -> dad;
-        if ( self == NULL )
-            break;
-        fmt = VectorGet ( & self -> fmt, id );
-    }
-    return fmt;
-}
-
-/* Mark
- */
-void CC SFormatClearMark ( void *item, void *ignore )
-{
-    SFormat *self = item;
-    self -> marked = false;
-}
-
-void SFormatMark ( const SFormat *cself )
-{
-    SFormat *self = ( SFormat* ) cself;
-    if ( cself != NULL && ! cself -> marked )
-    {
-        self -> marked = true;
-        SFormatMark ( self -> super );
-    }
-}
-
-
-/* Dump
- *  dump "fmtdef", dump object
- */
-rc_t SFormatDump ( const SFormat *self, SDumper *b )
-{
-    return FQNDump ( self != NULL ? self -> name : NULL, b );
-}
-
-bool CC SFormatDefDump ( void *item, void *data )
-{
-    SDumper *b = data;
-    const SFormat *self = ( const void* ) item;
-
-    if ( SDumperMarkedMode ( b ) && ! self -> marked )
-        return false;
-
-    if ( SDumperMode ( b ) == sdmCompact )
-    {
-        b -> rc = ( self -> super != NULL ) ?
-            SDumperPrint ( b, "fmtdef %N %N;", self -> super -> name, self -> name ):
-            SDumperPrint ( b, "fmtdef %N;", self -> name );
-    }
-    else
-    {
-        b -> rc = ( self -> super != NULL ) ?
-            SDumperPrint ( b, "fmtdef %N %N;\n", self -> super -> name, self -> name ):
-            SDumperPrint ( b, "fmtdef %N;\n", self -> name );
-    }
-
-    if ( b -> rc == 0 )
-        b -> rc = AliasDump ( self -> name, b );
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-
-
-/*--------------------------------------------------------------------------
- * SDatatype
- */
-
-/* IntrinsicDim
- */
-#if SLVL >= 1
-uint32_t SDatatypeIntrinsicDim ( const SDatatype *self )
-{
-    uint32_t dim = 1;
-    while ( 1 )
-    {
-        /* if type has no supertype or supertype is opaque
-           then this is the base intrinsic type */
-        const SDatatype *super = self -> super;
-        if ( super == NULL || super -> domain == 0 )
-            break;
-
-        /* accumulate the vector dimension of this type */
-        dim *= self -> dim;
-        self = super;
-    }
-
-    return dim;
-}
-
-/* Find
- */
-SDatatype *VSchemaFindTypeid ( const VSchema *self, uint32_t id )
-{
-    SDatatype *dt = VectorGet ( & self -> dt, id );
-    while ( dt == NULL )
-    {
-        self = self -> dad;
-        if ( self == NULL )
-            break;
-        dt = VectorGet ( & self -> dt, id );
-    }
-    return dt;
-}
-
-
-/* DescribeTypedecl
- *  produce a description of typedecl properties
- */
-LIB_EXPORT rc_t CC VSchemaDescribeTypedecl ( const VSchema *self,
-    VTypedesc *desc, const VTypedecl *td )
-{
-    rc_t rc;
-    if ( desc == NULL )
-        rc = RC ( rcVDB, rcSchema, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcSchema, rcAccessing, rcSelf, rcNull );
-        else if ( td == NULL )
-            rc = RC ( rcVDB, rcSchema, rcAccessing, rcParam, rcNull );
-        else
-        {
-            const SDatatype *dt = VSchemaFindTypeid ( self, td -> type_id );
-            if ( dt == NULL )
-                rc = RC ( rcVDB, rcSchema, rcAccessing, rcType, rcNotFound );
-            else
-            {
-                /* initial dimension from typedecl itself */
-                desc -> intrinsic_dim = td -> dim ? td -> dim : 1;
-
-                /* domain comes from the original type */
-                desc -> domain = dt -> domain;
-
-                while ( 1 )
-                {
-                    const SDatatype *super = dt -> super;
-                    if ( super == NULL || super -> domain == 0 )
-                        break;
-
-                    /* become supertype */
-                    assert ( super != dt );
-                    desc -> intrinsic_dim *= dt -> dim;
-                    dt = super;
-                }
-
-                /* take size from intrinsic */
-                desc -> intrinsic_bits = dt -> size;
-                return 0;
-            }
-        }
-
-        memset ( desc, 0, sizeof * desc );
-    }
-    return rc;
-}
-
-
-/* DescribeTypedef - PRIVATE
- *  a type is defined as either:
- *
- *     'typedef' <type> ';'
- *  or
- *     'typedef' <supertype> <type> '[' <dim> ']' ';'
- */
-LIB_EXPORT rc_t CC VSchemaDescribeTypedef ( const VSchema *self,
-    VTypedef *def, uint32_t type_id )
-{
-    rc_t rc;
-    if ( def == NULL )
-        rc = RC ( rcVDB, rcSchema, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcSchema, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            const SDatatype *dt = VSchemaFindTypeid ( self, type_id );
-            if ( dt == NULL )
-                rc = RC ( rcVDB, rcSchema, rcAccessing, rcType, rcNotFound );
-            else
-            {
-                /* id of <type> */
-                def -> type_id = dt -> id;
-
-                /* check for supertype */
-                if ( dt -> super == NULL )
-                {
-                    /* null id */
-                    def -> super_id = 0;
-                    /* sizeof ( <type> ) in bits */
-                    def -> type_size = dt -> size;
-                    assert ( dt -> dim <= 1 );
-                }
-                else
-                {
-                    /* id of <supertype> */
-                    def -> super_id = dt -> super -> id;
-                    /* sizeof ( <super-type> ) in bits */
-                    def -> type_size = dt -> super -> size;
-                }
-
-                /* 'dim' from 'typedef <supertype> <type> [ dim ];' */
-                def -> dim = dt -> dim;
-
-                /* the only bit of domain information is whether the type is signed */
-                def -> sign = 0;
-                switch ( dt -> domain )
-                {
-                case vtdInt:
-                case vtdFloat:
-                    def -> sign = 1;
-                    break;
-                }
-
-                return 0;
-            }
-        }
-
-        memset ( def, 0, sizeof * def );
-    }
-
-    return rc;
-}
-
-/* Mark
- */
-void CC SDatatypeClearMark ( void *item, void *ignore )
-{
-    SDatatype *self = item;
-    self -> marked = false;
-}
-
-void SDatatypeMark ( const SDatatype *cself )
-{
-    SDatatype *self = ( SDatatype* ) cself;
-    if ( cself != NULL && ! cself -> marked )
-    {
-        self -> marked = true;
-        SDatatypeMark ( self -> super );
-    }
-}
-
-/* Dump
- */
-rc_t SDatatypeDump ( const SDatatype *self, SDumper *d )
-{
-    return FQNDump ( self != NULL ? self -> name : NULL, d );
-}
-
-bool CC SDatatypeDefDump ( void *item, void *data )
-{
-    SDumper *b = data;
-    const char *dimfmt;
-    const SDatatype *self = ( const void* ) item;
-
-    if ( SDumperMarkedMode ( b ) && ! self -> marked )
-        return false;
-
-    switch ( SDumperMode ( b ) )
-    {
-    case sdmCompact:
-        dimfmt = "[%u]"; break;
-    default:
-        dimfmt = " [ %u ]";
-    }
-
-    b -> rc = SDumperPrint ( b, "typedef %N %N",
-        self -> super -> name, self -> name );
-    if ( b -> rc == 0 && self -> dim > 1 )
-        b -> rc = SDumperPrint ( b, dimfmt, self -> dim );
-    if ( b -> rc == 0 )
-    {
-        if ( SDumperMode ( b ) == sdmCompact )
-            b -> rc = SDumperWrite ( b, ";", 1 );
-        else
-        {
-#if _DEBUGGING && 1
-            b -> rc = SDumperPrint ( b, "; /* size %u */\n", self -> size );
-#else
-            b -> rc = SDumperWrite ( b, ";\n", 2 );
-#endif
-        }
-    }
-
-    if ( b -> rc == 0 )
-        b -> rc = AliasDump ( self -> name, b );
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-#endif
-
-/*--------------------------------------------------------------------------
- * STypesetMbr
- *  a typedecl that can be tested for uniqueness
- */
-typedef struct STypesetMbr STypesetMbr;
-struct STypesetMbr
-{
-    BSTNode n;
-    VTypedecl td;
-};
-
-/* Whack
- */
-#define STypesetMbrWhack BSTreeMbrWhack
-
-/* Cmp
- * Sort
- */
-static
-int64_t VTypedeclCmp ( const VTypedecl *a, const VTypedecl *b )
-{
-    if ( a -> type_id != b -> type_id )
-        return ( int64_t ) a -> type_id - ( int64_t ) b -> type_id;
-    return ( int64_t ) a -> dim - ( int64_t ) b -> dim;
-}
-
-static
-int64_t CC STypesetMbrSort ( const BSTNode *item, const BSTNode *n )
-{
-    const STypesetMbr *a = ( const STypesetMbr* ) item;
-    const STypesetMbr *b = ( const STypesetMbr* ) n;
-    return VTypedeclCmp ( & a -> td, & b -> td );
-}
-
-
-/*--------------------------------------------------------------------------
- * VTypedecl
- */
-
-#if SLVL >= 1
-
-/* ToText
- *  convert a VTypedecl into canonical text
- *
- *  "buffer" [ OUT ] and "bsize" [ IN ] - output buffer for
- *  NUL terminated type declaration string
- *
- *  "fmtdecl" [ IN ] - binary representation of fmtdecl
- */
-LIB_EXPORT rc_t CC VTypedeclToText ( const VTypedecl *self,
-    const VSchema *schema, char *buffer, size_t bsize )
-{
-    rc_t rc;
-
-    if ( bsize == 0 )
-        rc = RC ( rcVDB, rcType, rcConverting, rcBuffer, rcInsufficient );
-    else if ( buffer == NULL )
-        rc = RC ( rcVDB, rcType, rcConverting, rcBuffer, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcType, rcConverting, rcSelf, rcNull );
-        else if ( schema == NULL )
-            rc = RC ( rcVDB, rcType, rcConverting, rcSchema, rcNull );
-        else
-        {
-            size_t num_writ;
-            rc = VSchemaToText ( schema, buffer, bsize - 1, & num_writ, "%T", self );
-            if ( rc == 0 )
-            {
-                buffer [ num_writ ] = 0;
-                return 0;
-            }
-        }
-
-        buffer [ 0 ] = 0;
-    }
-
-    return rc;
-}
-
-
-/* ToSupertype
- *  attempt to cast a typedecl to a size-equivalent supertype decl
- *
- *  "schema" [ IN ] - schema object that would know about this type
- *
- *  "cast" [ OUT ] - return parameter for supertype decl
- *  valid only if function returns true.
- *
- *  returns true if cast succeeded
- */
-LIB_EXPORT bool CC VTypedeclToSupertype ( const VTypedecl *self,
-    const VSchema *schema, VTypedecl *cast )
-{
-    if ( self != NULL && schema != NULL )
-    {
-        const SDatatype *dt = VSchemaFindTypeid ( schema, self -> type_id );
-        if ( dt != NULL )
-        {
-            uint32_t dim = dt -> dim;
-            dt = dt -> super;
-            if ( dt != NULL && dt -> domain != 0 )
-            {
-                if ( cast != NULL )
-                {
-                    cast -> type_id = dt -> id;
-                    cast -> dim = self -> dim * dim;
-                }
-
-                return true;
-            }
-        }
-    }
-    return false;
-}
-
-
-/* ToTypedecl
- *  attempt to cast a typedecl to a size-equivalent ancestor decl
- *
- *  "schema" [ IN ] - schema object that would know about this type
- *
- *  "ancestor" [ IN ] - target typedecl or typeset for cast
- *
- *  "cast" [ OUT, NULL ] - return parameter for ancestor decl
- *  valid only if function returns true. if "ancestor" was a typeset,
- *  the value of "cast" will be the closest matching ancestral type.
- *
- *  "distance" [ OUT, NULL OKAY ] - optional linear measure of casting
- *  generations. valid only if function returns true. a value of 0 means
- *  that "self" is a direct match with "ancestor", a value of 1 means that
- *  "self" is an immediate subtype of "ancestor", etc.
- *
- *  returns true if cast succeeded
- */
-static
-bool VTypedecl2Typedecl ( const VTypedecl *self,
-    const VSchema *schema, const VTypedecl *ancestor,
-    VTypedecl *cast, uint32_t *distance )
-{
-    const SDatatype *src;
-    uint32_t i, type_id = self -> type_id;
-    uint32_t gramps = ancestor -> type_id;
-    uint32_t dim = self -> dim;
-
-    /* casting from "any" */
-    if ( type_id == 0 )
-    {
-        /* "any" to "any" isn't a cast... or is it? */
-        if ( gramps == 0 )
-            return false;
-
-        /* produce output */
-        if ( cast != NULL && ( const VTypedecl* ) cast != ancestor )
-            * cast = * ancestor;
-
-        /* record distance */
-        if ( distance != NULL )
-            * distance = 0;
-
-        return true;
-    }
-
-    /* casting to "any" */
-    if ( gramps == 0 )
-    {
-        /* produce output */
-        if ( cast != NULL && ( const VTypedecl* ) cast != self )
-            * cast = * self;
-
-        /* record distance */
-        if ( distance != NULL )
-            * distance = 0;
-
-        return true;
-    }
-
-    /* special case for identity */
-    if ( type_id == gramps )
-    {
-        /* detect variable dimension */
-        if ( dim == 0 )
-        {
-            dim = ancestor -> dim;
-            if ( ancestor -> dim == 0 )
-                return false;
-        }
-
-        /* if ancestor has variable dimension */
-        if ( ancestor -> dim == 0 )
-        {
-            if ( cast != NULL )
-            {
-                cast -> type_id = type_id;
-                cast -> dim = dim;
-            }
-        }
-        else
-        {
-            /* must have identical fixed dimension */
-            if ( dim != ancestor -> dim )
-                return false;
-
-            /* produce output */
-            if ( cast != NULL && ( const VTypedecl* ) cast != ancestor )
-                * cast = * ancestor;
-        }
-
-        /* record distance */
-        if ( distance != NULL )
-            * distance = 0;
-
-        return true;
-    }
-    /***** Temporary fix for duplicate types****/
-    {
-	char bufa[100];
-	char bufb[100];
-	if(   self->dim == ancestor->dim
-	   && VTypedeclToText(     self, schema, bufa, sizeof(bufa))== 0
-           && VTypedeclToText( ancestor, schema, bufb, sizeof(bufb))== 0
-           && strcmp(bufa,bufb) == 0){
-		if ( cast != NULL && ( const VTypedecl* ) cast != ancestor ) * cast = * ancestor;
-		if ( distance != NULL ) * distance = 0;
-		return true;
-        }
-    }
-	
-    /************************/
-
-    /* find type */
-    src = VSchemaFindTypeid ( schema, type_id );
-    if ( src == NULL )
-        return false;
-
-    /* cast toward gramps */
-    for ( i = 0; src -> id > gramps; ++ i )
-    {
-        dim *= src -> dim;
-        src = src -> super;
-        if ( src == NULL || src -> domain == 0 )
-            return false;
-    }
-
-    /* if not met */
-    if ( src -> id != gramps )
-        return false;
-
-    /* handle variable dimension */
-    if ( dim == 0 )
-    {
-        dim = ancestor -> dim;
-        if ( ancestor -> dim == 0 )
-            return false;
-    }
-    if ( ancestor -> dim == 0 )
-    {
-        if ( cast != NULL )
-        {
-            cast -> type_id = gramps;
-            cast -> dim = dim;
-        }
-    }
-    else
-    {
-        if ( dim != ancestor -> dim )
-            return false;
-        if ( cast != NULL && ( const VTypedecl* ) cast != ancestor )
-            * cast = * ancestor;
-    }
-
-    /* produce output */
-    if ( distance != NULL )
-        * distance = i;
-                            
-    return true;
-}
-
-static
-bool STypesetdecl2Typedecl ( const STypeset *self, uint32_t sdim,
-    const VSchema *schema,  const VTypedecl *ancestor,
-    VTypedecl *cast, uint32_t *distance )
-{
-    bool early;
-    VTypedecl btd;
-    uint32_t i, count, best;
-
-    /* ambiguous if casting to "any" */
-    if ( ancestor -> type_id == 0 )
-        return false;
-
-    /* can exit early if only testing castability */
-    early = ( cast == NULL && distance == NULL ) ? true : false;
-
-    /* walk set */
-    for ( best = ~ 0U, count = self -> count, i = 0; i < count; ++ i )
-    {
-        uint32_t dist;
-
-        /* convert set member to vector */
-        VTypedecl td = self -> td [ i ];
-        td . dim *= sdim;
-
-        /* cast to ancestor */
-        if ( VTypedecl2Typedecl ( & td, schema, ancestor, & td, & dist ) )
-        {
-            /* if only testing castability */
-            if ( early )
-                return true;
-
-            /* if match is better */
-            if ( dist < best )
-            {
-                if ( distance != NULL )
-                    * distance = dist;
-                if ( dist == 0 )
-                {
-                    if ( cast != NULL )
-                        * cast = td;
-                    return true;
-                }
-
-                btd = td;
-                best = dist;
-            }
-        }
-    }
-
-    if ( ( int32_t ) best > 0 )
-    {
-        if ( cast != NULL )
-            * cast = btd;
-        return true;
-    }
-
-    return false;
-}
-
-static
-bool VTypedecl2STypesetdecl ( const VTypedecl *self,
-    const VSchema *schema, const STypeset *dst, uint32_t ddim,
-    VTypedecl *cast, uint32_t *distance )
-{
-    const SDatatype *src;
-    uint32_t i, j, count, type_id, sdim;
-
-    /* ambiguous if casting from "any" */
-    if ( self -> type_id == 0 )
-        return false;
-
-    /* find source type */
-    src = VSchemaFindTypeid ( schema, self -> type_id );
-    if ( src == NULL )
-        return false;
-
-    /* current dimension */
-    sdim = self -> dim;
-
-    /* perform cast */
-    for ( count = dst -> count, type_id = src -> id, i = 0; ; type_id = src -> id, ++ i )
-    {
-        /* scan set for type match */
-        for ( j = 0; j < count; ++ j )
-        {
-            if ( type_id == dst -> td [ j ] . type_id )
-            {
-                /* this is a hit on type */
-                if ( sdim == dst -> td [ j ] . dim * ddim )
-                {
-                    /* best match is first match */
-                    if ( distance != NULL )
-                        * distance = i;
-                    if ( cast != NULL )
-                    {
-                        cast -> type_id = type_id;
-                        cast -> dim = sdim;
-                    }
-                    return true;
-                }
-                break;
-            }
-        }
-
-        /* did not match any of them */
-        sdim *= src -> dim;
-        src = src -> super;
-        if ( src == NULL || src -> domain == 0 )
-            break;
-    }
-
-    return false;
-}
-
-static
-bool VTypesetdeclToTypedecl ( const VTypedecl *self,
-    const VSchema *schema,  const VTypedecl *ancestor,
-    VTypedecl *cast, uint32_t *distance )
-{
-    /* find source typeset */
-    const STypeset *src = VSchemaFindTypesetid ( schema, self -> type_id );
-
-    /* not found or empty */
-    if ( src == NULL || src -> count == 0 )
-        return false;
-
-    /* if has single type */
-    if ( src -> count == 1 )
-    {
-        VTypedecl td = src -> td [ 0 ];
-        td . dim *= self -> dim;
-        return VTypedecl2Typedecl ( & td, schema, ancestor, cast, distance );
-    }
-
-    /* perform cast */
-    return STypesetdecl2Typedecl ( src, self -> dim, schema, ancestor, cast, distance );
-}
-
-static
-bool VTypedeclToTypesetdecl ( const VTypedecl *self,
-    const VSchema *schema,  const VTypedecl *ancestor,
-    VTypedecl *cast, uint32_t *distance )
-{
-    /* find ancestor typeset */
-    const STypeset *dst = VSchemaFindTypesetid ( schema, ancestor -> type_id );
-
-    /* if not found or empty */
-    if ( dst == NULL || dst -> count == 0 )
-        return false;
-
-    /* if has a single type */
-    if ( dst -> count == 1 )
-    {
-        VTypedecl td = dst -> td [ 0 ];
-        td . dim *= ancestor -> dim;
-        return VTypedecl2Typedecl ( self, schema, & td, cast, distance );
-    }
-
-    /* find best match */
-    return VTypedecl2STypesetdecl ( self, schema, dst, ancestor -> dim, cast, distance );
-}
-
-static
-bool VTypesetdeclToTypesetdecl ( const VTypedecl *self,
-    const VSchema *schema,  const VTypedecl *ancestor,
-    VTypedecl *cast, uint32_t *distance )
-{
-    bool early;
-    VTypedecl btd, td;
-    uint32_t i, count, best;
-    const STypeset * src, *dst;
-
-    /* find source typeset */
-    src = VSchemaFindTypesetid ( schema, self -> type_id );
-
-    /* not found or empty */
-    if ( src == NULL || src -> count == 0 )
-        return false;
-
-    /* find ancestor typeset */
-    dst = VSchemaFindTypesetid ( schema, ancestor -> type_id );
-
-    /* if not found or empty */
-    if ( dst == NULL || dst -> count == 0 )
-        return false;
-
-    /* if has a single type */
-    if ( src -> count == 1 )
-    {
-        td = src -> td [ 0 ];
-        td . dim *= self -> dim;
-        if ( dst -> count == 1 )
-        {
-            btd = dst -> td [ 0 ];
-            btd . dim *= ancestor -> dim;
-            return VTypedecl2Typedecl ( & td, schema, & btd, cast, distance );
-        }
-        return VTypedecl2STypesetdecl ( & td, schema, dst, ancestor -> dim, cast, distance );
-    }
-    if ( dst -> count == 1 )
-    {
-        td = dst -> td [ 0 ];
-        td . dim *= ancestor -> dim;
-        return STypesetdecl2Typedecl ( src, self -> dim, schema, & td, cast, distance );
-    }
-
-    /* can exit early if only testing castability */
-    early = ( cast == NULL && distance == NULL ) ? true : false;
-
-    /* full matrix scan */
-    for ( best = ~ 0U, count = src -> count, i = 0; i < count; ++ i )
-    {
-        uint32_t dist;
-
-        td = src -> td [ i ];
-        td . dim *= self -> dim;
-
-        if ( VTypedecl2STypesetdecl ( & td, schema, dst, ancestor -> dim, & td, & dist ) )
-        {
-            if ( early )
-                return true;
-
-            if ( dist < best )
-            {
-                if ( distance != NULL )
-                    * distance = dist;
-                if ( dist == 0 )
-                {
-                    if ( cast != NULL )
-                        * cast = td;
-                    return true;
-                }
-                btd = td;
-                best = dist;
-            }
-        }
-    }
-
-    if ( ( int32_t ) best > 0 )
-    {
-        if ( cast != NULL )
-            * cast = btd;
-        return true;
-    }
-
-    return false;
-}
-
-LIB_EXPORT bool CC VTypedeclToTypedecl ( const VTypedecl *self, const VSchema *schema,
-    const VTypedecl *ancestor, VTypedecl *cast, uint32_t *distance )
-{
-    if ( self == NULL || schema == NULL || ancestor == NULL )
-        return false;
-
-    /* source is typeset */
-    if ( self -> type_id >= 0x40000000 )
-    {
-        /* typeset => typeset */
-        if ( ancestor -> type_id >= 0x40000000 )
-            return VTypesetdeclToTypesetdecl ( self, schema, ancestor, cast, distance );
-
-        /* typeset => typedecl */
-        return VTypesetdeclToTypedecl ( self, schema, ancestor, cast, distance );
-    }
-
-    /* ancestor is typeset */
-    if ( ancestor -> type_id >= 0x40000000 )
-    {
-        /* typedecl => typeset */
-        return VTypedeclToTypesetdecl ( self, schema, ancestor, cast, distance );
-    }
-
-    /* typedecl => typedecl */
-    return VTypedecl2Typedecl ( self, schema, ancestor, cast, distance );
-}
-
-
-/* ToType
- *  attempt to cast a typedecl to a size-equivalent ancestor decl
- *
- *  "schema" [ IN ] - schema object that would know about this type
- *
- *  "ancestor" [ IN ] - target type or typeset for cast
- *
- *  "cast" [ OUT ] - return parameter for ancestor decl
- *  valid only if function returns true. if "ancestor" was a typeset,
- *  the value of "cast" will be the closest matching ancestral type.
- *
- *  "distance" [ OUT, NULL OKAY ] - optional linear measure of casting
- *  generations. valid only if function returns true. a value of 0 means
- *  that "self" is a direct match with "ancestor", a value of 1 means that
- *  "self" is an immediate subtype of "ancestor", etc.
- *
- *  returns true if cast succeeded
- */
-static
-bool VTypedecl2Type ( const VTypedecl *self,
-    const VSchema *schema, uint32_t gramps,
-    VTypedecl *cast, uint32_t *distance )
-{
-    const SDatatype *src;
-    uint32_t i, dim, type_id = self -> type_id;
-
-    /* cannot produce a valid typedecl if self is "any" or dimension is variable */
-    if ( type_id == 0 || self -> dim == 0 )
-        return false;
-
-    /* casting to "any" or identity */
-    if ( gramps == 0 || type_id == gramps)
-    {
-        if ( cast != NULL && ( const VTypedecl* ) cast != self )
-            * cast = * self;
-        if ( distance != NULL )
-            * distance = 0;
-        return true;
-    }
-
-    /* find type */
-    src = VSchemaFindTypeid ( schema, type_id );
-    if ( src == NULL )
-        return false;
-
-    /* cast toward gramps */
-    for ( dim = self -> dim, i = 0; src -> id > gramps; ++ i )
-    {
-        dim *= src -> dim;
-        src = src -> super;
-        if ( src == NULL || src -> domain == 0 )
-            return false;
-    }
-
-    /* if not met */
-    if ( src -> id != gramps )
-        return false;
-
-    /* produce output */
-    if ( distance != NULL )
-        * distance = i;
-                            
-    if ( cast != NULL )
-    {
-        cast -> type_id = gramps;
-        cast -> dim = dim;
-    }
-
-    return true;
-}
-
-static
-bool STypesetdecl2Type ( const STypeset *self, uint32_t sdim,
-    const VSchema *schema, uint32_t gramps,
-    VTypedecl *cast, uint32_t *distance )
-{
-    bool early;
-    VTypedecl btd;
-    uint32_t i, count, best;
-
-    /* ambiguous if casting to "any" */
-    if ( gramps == 0 )
-        return false;
-
-    /* can exit early if only testing castability */
-    early = ( cast == NULL && distance == NULL ) ? true : false;
-
-    /* cast all to ancestor */
-    for ( best = ~ 0U, count = self -> count, i = 0; i < count; ++ i )
-    {
-        uint32_t dist;
-
-        VTypedecl td;
-        td = self -> td [ i ];
-        td . dim *= sdim;
-
-        if ( VTypedecl2Type ( & td, schema, gramps, & td, & dist ) )
-        {
-            /* if only testing castability */
-            if ( early )
-                return true;
-
-            /* if match is better */
-            if ( dist < best )
-            {
-                if ( distance != NULL )
-                    * distance = dist;
-                if ( dist == 0 )
-                {
-                    if ( cast != NULL )
-                        * cast = td;
-                    return true;
-                }
-                btd = td;
-                best = dist;
-            }
-        }
-    }
-
-    if ( ( int32_t ) best > 0 )
-    {
-        if ( cast != NULL )
-            * cast = btd;
-        return true;
-    }
-
-    return false;
-}
-
-static
-bool VTypesetdeclToType ( const VTypedecl *self, const VSchema *schema,
-    uint32_t gramps, VTypedecl *cast, uint32_t *distance )
-{
-    /* find source typeset */
-    const STypeset *src = VSchemaFindTypesetid ( schema, self -> type_id );
-
-    /* not found or empty */
-    if ( src == NULL || src -> count == 0 )
-        return false;
-
-    /* if has single type */
-    if ( src -> count == 1 )
-    {
-        VTypedecl td = src -> td [ 0 ];
-        td . dim *= self -> dim;
-        return VTypedecl2Type ( & td, schema, gramps, cast, distance );
-    }
-
-    /* perform cast */
-    return STypesetdecl2Type ( src, self -> dim, schema, gramps, cast, distance );
-}
-
-LIB_EXPORT bool CC VTypedeclToType ( const VTypedecl *self, const VSchema *schema,
-    uint32_t ancestor, VTypedecl *cast, uint32_t *distance )
-{
-    if ( self == NULL || schema == NULL )
-        return false;
-
-    /* if casting to typeset */
-    if ( ancestor >= 0x40000000 )
-    {
-        /* convert ancestor to VTypedecl,
-           since the operation will be identical
-           due to the fact that the typeset contents
-           will have dimension, i.e. dimensions must match */
-        VTypedecl td;
-        td . type_id = ancestor;
-        td . dim = 1;
-
-        /* typeset => typeset */
-        if ( self -> type_id >= 0x40000000 )
-            return VTypesetdeclToTypesetdecl ( self, schema, & td, cast, distance );
-
-        /* typedecl => typeset */
-        return VTypedeclToTypesetdecl ( self, schema, & td, cast, distance );
-    }
-
-    /* typeset => type */
-    if ( self -> type_id >= 0x40000000 )
-        return VTypesetdeclToType ( self, schema, ancestor, cast, distance );
-
-    /* typedecl => type */
-    return VTypedecl2Type ( self, schema, ancestor, cast, distance );
-}
-
-/* CommonAncestor
- *  find a common ancestor between "self" and "peer"
- *  returns distance as sum of distances from each to "ancestor"
- */
-static
-bool VTypedeclTypedeclCmn ( const VTypedecl *self, const VSchema *schema,
-    const VTypedecl *peer, VTypedecl *ancestor, uint32_t *distance )
-{
-    const SDatatype *at, *bt;
-    uint32_t a, b, adim, bdim;
-
-    /* retrieve datatypes */
-    at = VSchemaFindTypeid ( schema, self -> type_id );
-    if ( at == NULL )
-        return false;
-
-    bt = VSchemaFindTypeid ( schema, peer -> type_id );
-    if ( bt == NULL )
-        return false;
-
-    /* walk each side toward parents */
-    for ( a = b = 0, adim = self -> dim, bdim = peer -> dim; at -> id != bt -> id; )
-    {
-        const SDatatype *dt;
-        if ( at -> id > bt -> id )
-        {
-            ++ a;
-            adim *= at -> dim;
-            dt = at = at -> super;
-        }
-        else
-        {
-            ++ b;
-            bdim *= bt -> dim;
-            dt = bt = bt -> super;
-        }
-        if ( dt == NULL || dt -> domain == 0 )
-            return false;
-    }
-
-    if ( adim == 0 )
-    {
-        if ( bdim == 0 )
-            return false;
-        adim = bdim;
-    }
-    else if ( bdim == 0 )
-    {
-        bdim = adim;
-    }
-
-    /* we have a common parent type, but dimensions must match */
-    if ( adim == bdim )
-    {
-        if ( distance != NULL )
-            * distance = a + b;
-        if ( ancestor != NULL )
-        {
-            ancestor -> type_id = at -> id;
-            ancestor -> dim = adim;
-        }
-        return true;
-    }
-
-    return false;
-}
-
-static
-bool VTypedeclSTypesetdeclCmn ( const VTypedecl *self, const VSchema *schema,
-    const STypeset *peer, uint32_t bdim, VTypedecl *ancestor, uint32_t *distance )
-{
-    bool early;
-    VTypedecl btd;
-    uint32_t i, count, best;
-
-    early = ( ancestor == NULL && distance == NULL ) ? true : false;
-
-    for ( best = ~ 0U, count = peer -> count, i = 0; i < count; ++ i )
-    {
-        uint32_t dist;
-
-        VTypedecl td = peer -> td [ i ];
-        td . dim *= bdim;
-
-        if ( VTypedeclTypedeclCmn ( self, schema, & td, & td, & dist ) )
-        {
-            if ( early )
-                return true;
-
-            if ( dist < best )
-            {
-                if ( distance != NULL )
-                    * distance = dist;
-                if ( dist == 0 )
-                {
-                    if ( ancestor != NULL )
-                        * ancestor = td;
-                    return true;
-                }
-                btd = td;
-                best = dist;
-            }
-        }
-    }
-
-    if ( ( int32_t ) best > 0 )
-    {
-        if ( ancestor != NULL )
-            * ancestor = btd;
-        return true;
-    }
-
-    return false;
-}
-
-static
-bool VTypedeclTypesetCmn ( const VTypedecl *self, const VSchema *schema,
-    const VTypedecl *peer, VTypedecl *ancestor, uint32_t *distance )
-{
-    /* find peer typeset */
-    const STypeset *ts = VSchemaFindTypesetid ( schema, peer -> type_id );
-
-    /* if not found or empty */
-    if ( ts == NULL || ts -> count == 0 )
-        return false;
-
-    /* if has a single type */
-    if ( ts -> count == 1 )
-    {
-        VTypedecl td = ts -> td [ 0 ];
-        td . dim *= peer -> dim;
-        return VTypedeclTypedeclCmn ( self, schema, & td, ancestor, distance );
-    }
-
-    /* find best match */
-    return VTypedeclSTypesetdeclCmn ( self, schema, ts, peer -> dim, ancestor, distance );
-}
-
-static
-bool VTypesetTypesetCmn ( const VTypedecl *self, const VSchema *schema,
-    const VTypedecl *peer, VTypedecl *ancestor, uint32_t *distance )
-{
-    bool early;
-    VTypedecl btd, td;
-    uint32_t i, count, best;
-    const STypeset *ats, *bts;
-
-    /* find self typeset */
-    ats = VSchemaFindTypesetid ( schema, self -> type_id );
-    if ( ats == NULL || ats -> count == 0 )
-        return false;
-
-    /* find peer typeset */
-    bts = VSchemaFindTypesetid ( schema, peer -> type_id );
-    if ( bts == NULL || bts -> count == 0 )
-        return false;
-
-    /* check for simple contents */
-    if ( ats -> count == 1 )
-    {
-        td = ats -> td [ 0 ];
-        td . dim *= self -> dim;
-        if ( bts -> count == 1 )
-        {
-            btd = bts -> td [ 0 ];
-            btd . dim *= peer -> dim;
-            return VTypedeclTypedeclCmn ( & td, schema, & btd, ancestor, distance );
-        }
-        return VTypedeclSTypesetdeclCmn ( & td, schema, bts, peer -> dim, ancestor, distance );
-    }
-    if ( bts -> count == 1 )
-    {
-        td = bts -> td [ 0 ];
-        td . dim *= peer -> dim;
-        return VTypedeclSTypesetdeclCmn ( & td, schema, ats, self -> dim, ancestor, distance );
-    }
-
-    early = ( ancestor == NULL && distance == NULL ) ? true : false;
-
-    for ( best = ~ 0U, count = ats -> count, i = 0; i < count; ++ i )
-    {
-        uint32_t dist = ~ 0;
-
-        td = ats -> td [ i ];
-        td . dim *= self -> dim;
-
-        if ( VTypedeclSTypesetdeclCmn ( & td, schema, bts, peer -> dim, & td, & dist ) )
-        {
-            if ( early )
-                return true;
-
-            if ( dist < best )
-            {
-                if ( distance != NULL )
-                    * distance = dist;
-                if ( dist == 0 )
-                {
-                    if ( ancestor != NULL )
-                        * ancestor = td;
-                    return true;
-                }
-                btd = td;
-                best = dist;
-            }
-        }
-    }
-
-    if ( ( int32_t ) best > 0 )
-    {
-        if ( ancestor != NULL )
-            * ancestor = btd;
-        return true;
-    }
-
-    return false;
-}
-
-LIB_EXPORT bool CC VTypedeclCommonAncestor ( const VTypedecl *self, const VSchema *schema,
-    const VTypedecl *peer, VTypedecl *ancestor, uint32_t *distance )
-{
-    if ( self == NULL || schema == NULL || peer == NULL )
-        return false;
-
-    /* wildcard make it hard to find common ancestor */
-    if ( self -> type_id == 0 || peer -> type_id == 0 )
-        return VTypedeclToTypedecl ( self, schema, peer, ancestor, distance );
-
-    /* rh type is typeset */
-    if ( self -> type_id >= 0x40000000 )
-    {
-        /* typeset, typeset => parent */
-        if ( peer -> type_id >= 0x40000000 )
-            return VTypesetTypesetCmn ( self, schema, peer, ancestor, distance );
-
-        /* typeset, typedecl => parent */
-        return VTypedeclTypesetCmn ( peer, schema, self, ancestor, distance );
-    }
-
-    /* typedecl, typeset => parent */
-    if ( peer -> type_id >= 0x40000000 )
-        return VTypedeclTypesetCmn ( self, schema, peer, ancestor, distance );
-
-    /* typedecl, typedecl => parent */
-    return VTypedeclTypedeclCmn ( self, schema, peer, ancestor, distance );
-}
-
-/* Dump
- */
-rc_t VTypedeclDump ( const VTypedecl *self, SDumper *b )
-{
-    rc_t rc;
-    uint32_t type_id = self -> type_id;
-    if ( type_id < 0x40000000 )
-    {
-        const SDatatype *dt = VSchemaFindTypeid ( b -> schema, type_id );
-        rc = SDatatypeDump ( dt, b );
-        if ( rc == 0 && dt != NULL && dt -> id == 0 )
-            return 0;
-    }
-    else if ( type_id < 0x80000000 )
-    {
-        const STypeset *ts = VSchemaFindTypesetid ( b -> schema, type_id );
-        rc = STypesetDump ( ts, b );
-    }
-    else
-    {
-#if SLVL >= 3
-        const SIndirectType *id = VSchemaFindITypeid ( b -> schema, type_id );
-        rc = SIndirectTypeDump ( id, b );
-#else
-        rc = RC ( rcVDB, rcSchema, rcWriting, rcType, rcUnrecognized );
-#endif
-    }
-
-    if ( rc == 0 && self -> dim != 1 )
-    {
-        const char *fmt;
-        switch ( SDumperMode ( b ) )
-        {
-        case sdmCompact:
-            fmt = self -> dim ? "[%u]" : "[*]"; break;
-        default:
-            fmt = self -> dim ? " [ %u ]" : " [ * ]";
-        }
-        rc = SDumperPrint ( b, fmt, self -> dim );
-    }
-
-    return rc;
-}
-#endif
-
-
-/*--------------------------------------------------------------------------
- * VTypedesc
- *  describes the fundamental properties of a VTypedecl
- *  replaces the deprecated structure VTypedef
- */
-
-/* Sizeof
- */
-LIB_EXPORT uint32_t CC VTypedescSizeof ( const VTypedesc *self )
-{
-    if ( self == NULL )
-        return 0;
-    return self -> intrinsic_bits * self -> intrinsic_dim;
-}
-
-
-/*--------------------------------------------------------------------------
- * VFormatdecl
- */
-#if SLVL >= 1
-LIB_EXPORT rc_t CC VFormatdeclToText ( const VFormatdecl *self,
-    const VSchema *schema, char *buffer, size_t bsize )
-{
-    PLOGMSG ( klogWarn, ( klogWarn, "TDB: $(msg)", "msg=handle VFormatdeclToText " ));    
-    return -1;
-}
-
-/* ToFormatdecl
- *  attempt to cast a fmtdecl to a size-equivalent ancestor decl
- *
- *  "schema" [ IN ] - schema object that would know about this type
- *
- *  "ancestor" [ IN ] - target fmtdecl or typespec for cast
- *
- *  "cast" [ OUT ] - return parameter for ancestor decl
- *  valid only if function returns true. if "ancestor" contained a typeset,
- *  the value of "cast" will be the closest matching ancestral type.
- *
- *  "distances" [ OUT, NULL OKAY ] - optional linear measure of independent
- *  casting generations for format ( 0 ) and type ( 1 ). valid only if function
- *  returns true. a value of 0 means that "self" is a direct match with "ancestor",
- *  a value of 1 means that "self" is an immediate subtype of "ancestor", etc.
- *
- *  returns true if cast succeeded
- */
-static
-bool VFormatdeclToFormatdeclInt ( const VFormatdecl *self, const VSchema *schema,
-    const VFormatdecl *ancestor, VFormatdecl *cast, uint32_t distances [ 2 ],
-    bool ( CC * td2td ) ( const VTypedecl*, const VSchema*, const VTypedecl*, VTypedecl*, uint32_t* ) )
-{
-    if ( self != NULL && schema != NULL && ancestor != NULL )
-    {
-        uint32_t i;
-        const SFormat *fmt;
-
-        /* just to handle common cases */
-        if ( distances != NULL )
-            distances [ 0 ] = distances [ 1 ] = 0;
-
-        /* no format on self */
-        if ( self -> fmt == 0 )
-        {
-            /* resulting format is ancestor's */
-            if ( cast != NULL )
-                cast -> fmt = ancestor -> fmt;
-
-            /* if no ancestor format, or if have type info, perform type cast */
-            if ( ancestor -> fmt == 0 || self -> td . type_id != 0 || ancestor -> td . type_id != 0 )
-            {
-                return ( * td2td ) ( & self -> td, schema,
-                    & ancestor -> td, & cast -> td, distances ? & distances [ 1 ] : NULL );
-            }
-
-            /* resultant type is undefined */
-            if ( cast != NULL )
-            {
-                cast -> td . type_id = 0;
-                cast -> td . dim = 1;
-            }
-
-            return true;
-        }
-
-        if ( ancestor -> fmt == 0 || ancestor -> fmt == self -> fmt )
-        {
-            /* resulting format is our own */
-            if ( cast != NULL )
-                cast -> fmt = self -> fmt;
-
-            /* if have type info, perform type cast */
-            if ( self -> td . type_id != 0 || ancestor -> td . type_id != 0 )
-            {
-                return ( * td2td ) ( & self -> td, schema,
-                    & ancestor -> td, & cast -> td, distances ? & distances [ 1 ] : NULL );
-            }
-
-            /* resultant type is undefined */
-            if ( cast != NULL )
-            {
-                cast -> td . type_id = 0;
-                cast -> td . dim = 1;
-            }
-
-            return true;
-        }
-
-        /* distinct formats involved */
-        fmt = VSchemaFindFmtid ( schema, self -> fmt );
-        for ( i = 0; fmt != NULL; ++ i, fmt = fmt -> super )
-        {
-            if ( fmt -> id == ancestor -> fmt )
-            {
-                /* successful cast to ancestor */
-                if ( cast != NULL )
-                    cast -> fmt = ancestor -> fmt;
-                if ( distances != NULL )
-                    distances [ 0 ] = i;
-
-                /* if have type info, perform type cast */
-                if ( self -> td . type_id != 0 || ancestor -> td . type_id != 0 )
-                {
-                    return ( * td2td ) ( & self -> td, schema,
-                        & ancestor -> td, & cast -> td, distances ? & distances [ 1 ] : NULL );
-                }
-
-                /* resultant type is undefined */
-                if ( cast != NULL )
-                {
-                    cast -> td . type_id = 0;
-                    cast -> td . dim = 1;
-                }
-
-                return true;
-            }
-        }
-    }
-
-    return false;
-}
-
-LIB_EXPORT bool CC VFormatdeclToFormatdecl ( const VFormatdecl *self,
-    const VSchema *schema, const VFormatdecl *ancestor,
-    VFormatdecl *cast, uint32_t distances [ 2 ] )
-{
-    return VFormatdeclToFormatdeclInt ( self, schema,
-        ancestor, cast, distances, VTypedeclToTypedecl );
-}
-
-
-/* CommonAncestor
- *  find a common ancestor between "self" and "peer"
- *  returns distance as sum of distances from each to "ancestor"
- */
-bool VFormatdeclCommonAncestor ( const VFormatdecl *self, const VSchema *schema,
-    const VFormatdecl *peer, VFormatdecl *ancestor, uint32_t distances [ 2 ] )
-{
-    return VFormatdeclToFormatdeclInt ( self, schema,
-        peer, ancestor, distances, VTypedeclCommonAncestor );
-}
-
-
-rc_t VFormatdeclDump ( const VFormatdecl *self, SDumper *b )
-{
-    rc_t rc;
-    uint32_t fmt_id = self -> fmt;
-
-    if ( fmt_id != 0 )
-    {
-        const SFormat *fmt = VSchemaFindFmtid ( b -> schema, fmt_id );
-        rc = SFormatDump ( fmt, b );
-        if ( rc != 0 || self -> td . type_id == 0 )
-            return rc;
-
-        rc = SDumperWrite ( b, "/", 1 );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    return VTypedeclDump ( & self -> td, b );
-}
-#endif
-
-/*--------------------------------------------------------------------------
- * STypeset
- */
-
-static
-void CC STypesetPopulate ( BSTNode *n, void *data )
-{
-    const STypesetMbr *mbr = ( const STypesetMbr* ) n;
-    STypeset *ts = data;
-    ts -> td [ ts -> count ++ ] = mbr -> td;
-}
-
-/* Find
- */
-STypeset *VSchemaFindTypesetid ( const VSchema *self, uint32_t id )
-{
-    STypeset *ts = VectorGet ( & self -> ts, id );
-    while ( ts == NULL )
-    {
-        self = self -> dad;
-        if ( self == NULL )
-            break;
-        ts = VectorGet ( & self -> ts, id );
-    }
-    return ts;
-}
-
-/* Mark
- */
-void CC STypesetClearMark ( void *item, void *ignore )
-{
-    STypeset *self = item;
-    self -> marked = false;
-}
-
-void VSchemaTypeMark ( const VSchema *self, uint32_t type_id )
-{
-    const SDatatype *dt;
-    const STypeset *ts;
-
-    switch ( type_id & 0xC0000000 )
-    {
-    case 0:
-        while ( type_id < VectorStart ( & self -> dt ) )
-        {
-            self = self -> dad;
-            if ( self -> dad == NULL )
-                return;
-        }
-
-        dt = VectorGet ( & self -> dt, type_id );
-        if ( dt != NULL )
-            SDatatypeMark ( dt );
-        break;
-
-    case 0x40000000:
-        while ( type_id < VectorStart ( & self -> ts ) )
-        {
-            self = self -> dad;
-            if ( self -> dad == NULL )
-                return;
-        }
-
-        ts = VectorGet ( & self -> ts, type_id );
-        if ( ts != NULL )
-            STypesetMark ( ts, self );
-        break;
-    }
-}
-
-void STypesetMark ( const STypeset *cself, const VSchema *schema )
-{
-    STypeset *self = ( STypeset* ) cself;
-    if ( cself != NULL && ! cself -> marked )
-    {
-        uint32_t i, count = self -> count;
-        self -> marked = true;
-        for ( i = 0; i < count; ++ i )
-            VSchemaTypeMark ( schema, self -> td [ i ] . type_id );
-    }
-}
-
-/* Dump
- */
-rc_t STypesetDump ( const STypeset *self, struct SDumper *d )
-{
-    return FQNDump ( self -> name, d );
-}
-
-#if SLVL >= 1
-bool CC STypesetDefDump ( void *item, void *data )
-{
-    int i;
-
-    SDumper *b = data;
-    const char *tsfmt, *sep, *cls;
-    const STypeset *self = ( const void* ) item;
-
-    if ( SDumperMarkedMode ( b ) && ! self -> marked )
-        return false;
-
-    switch ( SDumperMode ( b ) )
-    {
-    case sdmCompact:
-        tsfmt = "typeset %N{";
-        sep = ",";
-        cls = "};";
-        break;
-    default:
-        tsfmt = "typeset %N { ";
-        sep = ", ";
-        cls = " };\n";
-    }
-
-
-    SDumperSepString ( b, "" );
-
-    b -> rc = SDumperPrint ( b, tsfmt, self -> name );
-    for ( i = 0; b -> rc == 0 && i < ( int ) self -> count; ++ i )
-    {
-        b -> rc = SDumperSep ( b );
-        if ( b -> rc == 0 )
-            b -> rc = VTypedeclDump ( & self -> td [ i ], b );
-        SDumperSepString ( b, sep );
-    }
-    if ( b -> rc == 0 )
-        b -> rc = SDumperPrint ( b, cls );
-
-    if ( b -> rc == 0 )
-        b -> rc = AliasDump ( self -> name, b );
-
-    return ( b -> rc != 0 ) ? true : false;
-}
-#endif
-
-/*--------------------------------------------------------------------------
- * VSchema
- */
-
-/*
- * fqn                = ID [ <nested-name> ]
- * nested-name        = ':' NAME [ <nested-name> ]
- */
-static
-rc_t nested_name ( const KSymTable *tbl, KTokenSource *src, KToken *t, const SchemaEnv *env )
-{
-    rc_t rc;
-    KSymbol *ns = t -> sym;
-
-    /* look for colon separator */
-    if ( next_token ( tbl, src, t ) -> id != eColon )
-        return RC ( rcVDB, rcSchema, rcParsing, rcToken, rcIncomplete );
-
-    /* push namespace onto stack */
-    rc = KSymTablePushNamespace ( tbl, ns );
-    if ( rc == 0 )
-    {
-        /* look for another namespace */
-        if ( next_shallow_token ( tbl, src, t, false ) -> id == eNamespace )
-            rc = nested_name ( tbl, src, t, env );
-
-        /* pop namespace */
-        KSymTablePopNamespace ( tbl );
-    }
-
-    return rc;
-}
-
-rc_t next_fqn ( const KSymTable *tbl, KTokenSource *src, KToken *t, const SchemaEnv *env )
-{
-    rc_t rc;
-    KToken t2;
-    KTokenSource src2;
-
-    /* looking for a symbolic name */
-    if ( t -> sym == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcToken, rcUnexpected );
-
-    /* anything other than a namespace is what we want */
-    if ( t -> id != eNamespace )
-        return 0;
-
-    /* perform a lookahead */
-    t2 = * t;
-    src2 = * src;
-
-    /* requires ':' following namespace */
-    rc = nested_name ( tbl, & src2, & t2, env );
-    if ( rc == 0 )
-    {
-        KSymbol *ns;
-        uint32_t scope;
-
-        /* recognized patern (NS:)+TOKEN
-           check that TOKEN is a defined symbol within NS */
-        if ( t2 . sym != NULL )
-        {
-            * t = t2;
-            * src = src2;
-            return 0;
-        }
-
-        /* before returning an error, look harder.
-           extended VSchema can create symtab entries
-           for namespaces that opaque the parent schema */
-        for ( scope = 0, ns = t -> sym; ns != NULL; )
-        {
-            /* find a deeper symbol */
-            ns = KSymTableFindNext ( tbl, ns, & scope );
-            if ( ns != NULL && ns -> type == eNamespace )
-            {
-                t2 = * t;
-                src2 = * src;
-                t2 . sym = ns;
-                rc = nested_name ( tbl, & src2, & t2, env );
-                if ( rc != 0 )
-                    return rc;
-                if ( t2 . sym != NULL )
-                {
-                    * t = t2;
-                    * src = src2;
-                    return 0;
-                }
-            }
-        }
-
-        /* could not find anything */
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcToken, rcIncomplete );
-    }
-    return rc;
-}
-
-static
-rc_t create_fqn_sym ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, uint32_t id, const void *obj )
-{
-    KToken t2;
-    KTokenSource src2 = * src;
-
-    /* need to peek at next token */
-    if ( KTokenizerNext ( kDefaultTokenizer, & src2, & t2 ) -> id == eColon )
-    {
-        /* and again to find ident or name */
-        KTokenizerNext ( kDefaultTokenizer, & src2, & t2 );
-
-        /* allow reserved word "view" to be used in schemas <= 1.0 */
-        if ( t2 . id == kw_view && ! env -> has_view_keyword )
-            t2 . id = eIdent;
-
-        if ( t2 . id == eIdent || t2 . id == eName )
-        {
-            /* create a namespace and go in */
-            KSymbol *ns;
-            rc_t rc = KSymTableCreateNamespace ( tbl, & ns, & t -> str );
-            if ( rc == 0 )
-            {
-                rc = KSymTablePushNamespace ( tbl, ns );
-                if ( rc == 0 )
-                {
-                    /* accept ':' NS */
-                    * t = t2;
-                    * src = src2;
-
-                    /* recurse */
-                    rc = create_fqn_sym ( tbl, src, t, env, id, obj );
-
-                    /* exit namespace */
-                    KSymTablePopNamespace ( tbl );
-                }
-            }
-
-            /* always return */
-            return rc;
-        }
-    }
-
-    /* contents of "t" are a proper symbol */
-    assert ( t -> id == eIdent || t -> id == eName );
-    return KSymTableCreateSymbol ( tbl, & t -> sym, & t -> str, id, obj );
-}
-
-static
-rc_t enter_namespace ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, uint32_t id, const void *obj )
-{
-    KSymbol *ns = t -> sym;
-    rc_t rc = KSymTablePushNamespace ( tbl, ns );
-    if ( rc == 0 )
-    {
-        if ( next_token ( tbl, src, t ) -> id != eColon )
-            rc = KTokenExpected ( t, klogErr, ":" );
-        else switch ( next_shallow_token ( tbl, src, t, false ) -> id )
-        {
-        case eNamespace:
-            rc = enter_namespace ( tbl, src, t, env, id, obj );
-            break;
-        case eIdent:
-        case eName:
-            rc = create_fqn_sym ( tbl, src, t, env, id, obj );
-            break;
-        case kw_view:
-            if ( ! env -> has_view_keyword )
-            {
-                rc = create_fqn_sym ( tbl, src, t, env, id, obj );
-                break;
-            }
-            /* no break */
-        default:
-            if ( t -> id == id )
-                rc = SILENT_RC ( rcVDB, rcSchema, rcParsing, rcToken, rcExists );
-            else
-                rc = RC ( rcVDB, rcSchema, rcParsing, rcToken, rcUnexpected );
-        }
-
-        KSymTablePopNamespace ( tbl );
-    }
-    return rc;
-}
-
-rc_t create_fqn ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, uint32_t id, const void *obj )
-{
-    switch ( t -> id )
-    {
-    case eNamespace:
-        return enter_namespace ( tbl, src, t, env, id, obj );
-    case eIdent:
-        return create_fqn_sym ( tbl, src, t, env, id, obj );
-    default:
-        if ( t -> id == id )
-            return SILENT_RC ( rcVDB, rcSchema, rcParsing, rcToken, rcExists );
-    }
-
-    return RC ( rcVDB, rcSchema, rcParsing, rcToken, rcUnexpected );
-}
-
-
-/*
- * dim                = '[' <uint-expr> ']'
- */
-#if SLVL >= 1
-rc_t dim ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, uint32_t *dim, bool required )
-{
-    rc_t rc;
-
-    if ( ! required && t -> id != eLeftSquare )
-    {
-        * dim = 1;
-        return 0;
-    }
-
-    /* consume '[' */
-    rc = expect ( tbl, src, t, eLeftSquare, "[", true );
-    if ( rc == 0 )
-    {
-        /* assume manifest constant */
-        rc = KTokenToU32 ( t, dim );
-
-        /* otherwise, assume some sort of symbolic expression */
-        if ( rc != 0 )
-        {
-            const SExpression *x;
-            rc = const_expr ( tbl, src, t, env, self, & x );
-            if ( rc == 0 )
-            {
-                Vector dummy;
-                VectorInit ( & dummy, 1, 16 );
-
-                /* should have evaluated to a constant expression */
-                rc = eval_uint_expr ( self, x, dim, & dummy );
-                SExpressionWhack ( x );
-
-                VectorWhack ( & dummy, NULL, NULL );
-            }
-            if ( rc != 0 )
-                return rc;
-        }
-    }
-
-    /* close brackets */
-    return expect ( tbl, src, next_token ( tbl, src, t ), eRightSquare, "]", true );
-}
-
-
-/*
- * typename           = <fqn>
- */
-rc_t typename ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, uint32_t *id )
-{
-    const SDatatype *dt;
-    const SIndirectType *tp;
-
-    /* consume fully qualified name */
-    rc_t rc = next_fqn ( tbl, src, t, env );
-    if ( rc != 0 )
-        return rc;
-
-    /* the name must be defined as a data type */
-    switch ( t -> id )
-    {
-    case eDatatype:
-        dt = t -> sym -> u. obj;
-        * id = dt -> id;
-        break;
-    case eSchemaType:
-        tp = t -> sym -> u. obj;
-        * id = tp -> id;
-        break;
-    default:
-        return RC ( rcVDB, rcSchema, rcParsing, rcToken, rcUnexpected );
-    }
-
-    return 0;
-}
-
-
-/*
- * typedecl           = <typename> [ <dim> ]
- */
-rc_t typedecl ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, VTypedecl *td )
-{
-    rc_t rc = typename ( tbl, src, t, env, & td -> type_id );
-    if ( rc != 0 )
-        return rc;
-
-    next_token ( tbl, src, t );
-    return dim ( tbl, src, t, env, self, & td -> dim, false );
-}
-
-
-/*
- * typeset            = <fqn>
- */
-rc_t typeset ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-   const SchemaEnv *env, uint32_t *id )
-{
-    const STypeset *ts;
-
-    /* consume fully qualified name */
-    rc_t rc = next_fqn ( tbl, src, t, env );
-    if ( rc != 0 )
-        return rc;
-
-    /* the name must be defined as a typeset */
-    if ( t -> id != eTypeset )
-        return RC ( rcVDB, rcSchema, rcParsing, rcToken, rcUnexpected );
-
-    /* retrieve the runtime type id */
-    assert ( t -> sym != NULL );
-    ts = t -> sym -> u . obj;
-    * id = ts -> id;
-
-    return 0;
-}
-
-/*
- * typespec           = <typedecl>
- *                    | <typeset> [ <dim> ]
- */
-rc_t typespec ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, VTypedecl *td )
-{
-    const STypeset *ts;
-    const SDatatype *dt;
-    const SIndirectType *tp;
-
-    /* get a typename or typeset */
-    rc_t rc = next_fqn ( tbl, src, t, env );
-    if ( rc != 0 )
-        return rc;
-
-    switch ( t -> id )
-    {
-    case eDatatype:
-        dt = t -> sym -> u. obj;
-        td -> type_id = dt -> id;
-        break;
-    case eSchemaType:
-        tp = t -> sym -> u. obj;
-        td -> type_id = tp -> id;
-        break;
-    case eTypeset:
-        ts = t -> sym -> u. obj;
-        td -> type_id = ts -> id;
-        break;
-    default:
-        return RC ( rcVDB, rcSchema, rcParsing, rcToken, rcUnexpected );
-    }
-
-    next_token ( tbl, src, t );
-    return dim ( tbl, src, t, env, self, & td -> dim, false );
-}
-#endif
-
-
-/*
- * fmtname            = <fqn>
- */
-rc_t fmtname ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, uint32_t *id )
-{
-    const SFormat *fmt;
-
-    /* consume fully qualified name */
-    rc_t rc = next_fqn ( tbl, src, t, env );
-    if ( rc != 0 )
-        return rc;
-
-    /* the name must be defined as a format */
-    if ( t -> id != eFormat )
-        return RC ( rcVDB, rcSchema, rcParsing, rcToken, rcUnexpected );
-
-    /* retrieve the runtime fmt id */
-    assert ( t -> sym != NULL );
-    fmt = t -> sym -> u . obj;
-    * id = fmt -> id;
-
-    return 0;
-}
-
-/*
- * fmtdecl            = <fmtname> [ '/' <typedecl> ]
- *                    | <typedecl>
- */
-#if SLVL >= 1
-rc_t fmtdecl ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, VFormatdecl *fd )
-{
-    const SDatatype *dt;
-    const SIndirectType *tp;
-
-    /* get a fmtname or typename */
-    rc_t rc = next_fqn ( tbl, src, t, env );
-    if ( rc != 0 )
-        return rc;
-
-    /* look first for fmtname */
-    if ( t -> id == eFormat )
-    {
-        const SFormat *fmt = t -> sym -> u . obj;
-        fd -> fmt = fmt -> id;
-
-        /* unless followed by '/', this is a simple format declaration */
-        if ( next_token ( tbl, src, t ) -> id != eFwdSlash )
-        {
-            fd -> td . type_id = 0;
-            fd -> td . dim = 0;
-            return 0;
-        }
-
-        /* expect a typename */
-        rc = next_fqn ( tbl, src, next_token ( tbl, src, t ), env );
-        if ( rc != 0 )
-            return rc;
-    }
-    else
-    {
-        fd -> fmt = 0;
-    }
-
-    switch ( t -> id )
-    {
-    case eDatatype:
-        dt = t -> sym -> u. obj;
-        fd -> td . type_id = dt -> id;
-        break;
-    case eSchemaType:
-        tp = t -> sym -> u. obj;
-        fd -> td . type_id = tp -> id;
-        break;
-    default:
-        return RC ( rcVDB, rcSchema, rcParsing, rcToken, rcUnexpected );
-    }
-
-    next_token ( tbl, src, t );
-    return dim ( tbl, src, t, env, self, & fd -> td . dim, false );
-}
-
-/*
- * fmtspec            = <typespec>
- *                    | <fmtname> [ '/' <typedecl> ]
- */
-rc_t fmtspec ( const KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, const VSchema *self, VFormatdecl *fd )
-{
-    const SFormat *fmt;
-    const STypeset *ts;
-    const SDatatype *dt;
-    const SIndirectType *tp;
-
-    /* get a fmtname, typename or typeset */
-    rc_t rc = next_fqn ( tbl, src, t, env );
-    if ( rc != 0 )
-        return rc;
-
-    fd -> fmt = 0;
-    switch ( t -> id )
-    {
-    case eDatatype:
-        dt = t -> sym -> u. obj;
-        fd -> td . type_id = dt -> id;
-        break;
-    case eSchemaType:
-        tp = t -> sym -> u. obj;
-        fd -> td . type_id = tp -> id;
-        break;
-    case eTypeset:
-        ts = t -> sym -> u. obj;
-        fd -> td . type_id = ts -> id;
-        break;
-    case eFormat:
-        fmt = t -> sym -> u . obj;
-        fd -> fmt = fmt -> id;
-
-        /* unless followed by '/', this is a simple format declaration */
-        if ( next_token ( tbl, src, t ) -> id != eFwdSlash )
-        {
-            fd -> td . type_id = 0;
-            fd -> td . dim = 0;
-            return 0;
-        }
-        return typedecl ( tbl, src, t, env, self, & fd -> td );
-
-    default:
-        return RC ( rcVDB, rcSchema, rcParsing, rcToken, rcUnexpected );
-    }
-
-    next_token ( tbl, src, t );
-    return dim ( tbl, src, t, env, self, & fd -> td . dim, false );
-}
-#endif
-
-
-/*
- * type-definition    = 'typedef' <typename> <typedef-list>
- * typedef-list       = <typedef-decl> [ ',' <typedef-list> ]
- * typedef-decl       = <fqn> [ <dim> ]
- */
-#if SLVL >= 1
-rc_t type_definition ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    VTypedecl td;
-    uint32_t super_size;
-    const SDatatype *super;
-
-    /* expect a typename */
-    rc_t rc = typename ( tbl, src, t, env, & td . type_id );
-    if ( rc != 0 )
-        return KTokenFailure ( t, klogErr, rc, "type name" );
-    if ( td . type_id == 0 )
-    {
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcType, rcIncorrect );
-        return KTokenFailure ( t, klogErr, rc, "illegal base type" );
-    }
-
-    /* capture supertype */
-    assert ( t -> sym != NULL );
-    assert ( t -> sym -> type == eDatatype );
-    super = t -> sym -> u . obj;
-
-    /* get supertype size */
-    super_size = super -> size;
-
-    do
-    {
-        KSymbol *sym;
-        SDatatype *dt;
-
-        /* expect a fully qualified name */
-        rc = create_fqn ( tbl, src, next_token ( tbl, src, t ), env, eDatatype, NULL );
-        if ( rc == 0 )
-        {
-            /* remember symbol */
-            sym = t -> sym;
-
-            /* get dimension */
-            next_token ( tbl, src, t );
-            rc = dim ( tbl, src, t, env, self, & td . dim, false );
-            if ( rc != 0 )
-                return KTokenFailure ( t, klogErr, rc, "vector dimension" );
-
-            /* allocate a datatype */
-            dt = malloc ( sizeof * dt );
-            if ( dt == NULL )
-            {
-                rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-                return KTokenRCExplain ( t, klogInt, rc );
-            }
-
-            /* fill it out from super-type */
-            dt -> super = super;
-            dt -> byte_swap = super -> byte_swap;
-            dt -> name = sym;
-            dt -> size = super_size * td . dim;
-            dt -> dim = td . dim;
-            dt -> domain = super -> domain;
-
-            /* insert into type vector */
-            rc = VectorAppend ( & self -> dt, & dt -> id, dt );
-            if ( rc != 0 )
-            {
-                free ( dt );
-                return KTokenRCExplain ( t, klogInt, rc );
-            }
-
-            /* connect symbol */
-            sym -> u . obj = dt;
-        }
-
-        /* allow a benign redefine */
-        else if ( GetRCState ( rc ) != rcExists )
-            return KTokenFailure ( t, klogErr, rc, "fully qualified name" );
-        else
-        {
-            /* remember this already defined name */
-            sym = t -> sym;
-            assert ( sym != NULL && sym -> type == eDatatype );
-
-            /* look for a dimension */
-            next_token ( tbl, src, t );
-            rc = dim ( tbl, src, t, env, self, & td . dim, false );
-            if ( rc != 0 )
-                return KTokenFailure ( t, klogErr, rc, "vector dimension" );
-
-            /* peek at existing definition */
-            dt = ( SDatatype* ) sym -> u . obj;
-            if ( dt -> super != super || dt -> dim != td . dim )
-            {
-                rc = RC ( rcVDB, rcSchema, rcParsing, rcToken, rcExists );
-                return KTokenRCExplain ( t, klogErr, rc );
-            }
-        }
-    }
-    while ( t -> id == eComma );
-
-    return expect ( tbl, src, t, eSemiColon, ";", true );
-}
-#endif
-
-
-/*
- * format-definition  = 'fmtdef' [ <fmtname> ] <fqn>
- * fmtname            = <fqn>
- */
-rc_t format_definition ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    KSymbol *sym;
-    SFormat *fmt;
-    const SFormat *super;
-
-    /* start with the assumption that the name needs to be created */
-    rc_t rc = create_fqn ( tbl, src, t, env, eFormat, NULL );
-    if ( rc == 0 )
-    {
-        super = NULL;
-        sym = t -> sym;
-        next_token ( tbl, src, t );
-    }
-    else if ( GetRCState ( rc ) != rcExists )
-        return KTokenFailure ( t, klogErr, rc, "fully qualified name" );
-    else
-    {
-        /* could be a superfmt or could be a redefine */
-        sym = t -> sym;
-        if ( next_token ( tbl, src, t ) -> id != eIdent && t -> sym == NULL )
-        {
-            /* we will assume it was a redefine of a simple format */
-            return expect ( tbl, src, t, eSemiColon, "fully qualified name or ;", true );
-        }
-
-        /* has a superfmt */
-        super = sym -> u . obj;
-
-        /* do it again */
-        rc = create_fqn ( tbl, src, t, env, eFormat, NULL );
-        if ( rc != 0 )
-        {
-            /* may have been a redefine of a path-based format */
-            if ( GetRCState ( rc ) != rcExists )
-                return KTokenFailure ( t, klogErr, rc, "fully qualified name" );
-
-            return expect ( tbl, src, next_token ( tbl, src, t ),
-                eSemiColon, "fully qualified name or ;", true );
-        }
-
-        sym = t -> sym;
-        next_token ( tbl, src, t );
-    }
-
-    /* create a format */
-    fmt = malloc ( sizeof * fmt );
-    if ( fmt == NULL )
-    {
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-        return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    /* superfmt */
-    fmt -> super = super;
-
-    /* link to name */
-    fmt -> name = sym;
-
-    /* insert into vector */
-    rc = VectorAppend ( & self -> fmt, & fmt -> id, fmt );
-    if ( rc != 0 )
-    {
-        free ( fmt );
-        return KTokenRCExplain ( t, klogInt, rc );
-    }
-
-    /* link symbol to fmt */
-    sym -> u . obj = fmt;
-
-    return expect ( tbl, src, t, eSemiColon, ";", true );
-}
-
-
-/*
- * typeset-definition = 'typeset' <typeset> '{' <typespec-list> '}'
- * typespec-list      = <typespec> [ ',' <typespec-list> ]
- */
-#if SLVL >= 1
-rc_t typeset_definition ( KSymTable *tbl, KTokenSource *src, KToken *t,
-    const SchemaEnv *env, VSchema *self )
-{
-    BSTree tree;
-    KSymbol *sym;
-    bool existing;
-    uint32_t i, count;
-
-    rc_t rc = create_fqn ( tbl, src, t, env, eTypeset, NULL );
-    if ( rc == 0 )
-    {
-        sym = t -> sym;
-        existing = false;
-    }
-    else if ( GetRCState ( rc ) != rcExists )
-        return KTokenFailure ( t, klogErr, rc, "fully qualified name" );
-    else
-    {
-        sym = t -> sym;
-        existing = true;
-    }
-
-    if ( next_token ( tbl, src, t ) -> id != eLeftCurly )
-        return KTokenExpected ( t, klogErr, "{" );
-
-    BSTreeInit ( & tree );
-    count = 0;
-
-    do
-    {
-        STypesetMbr *mbr, *exist;
-
-        /* read typepec */
-        VTypedecl td;
-        next_token ( tbl, src, t );
-        rc = typespec ( tbl, src, t, env, self, & td );
-        if ( rc != 0 )
-        {
-            KTokenFailure ( t, klogErr, rc, "type name, format name or typeset name" );
-            break;
-        }
-
-        /* if we got a typedecl, add it */
-        if ( td . type_id < 0x40000000 )
-        {
-            mbr = malloc ( sizeof * mbr );
-            if ( mbr == NULL )
-            {
-                rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-                KTokenRCExplain ( t, klogInt, rc );
-                break;
-            }
-
-            mbr -> td = td;
-
-            /* ignore/allow duplicates */
-            if ( BSTreeInsertUnique ( & tree, & mbr -> n,
-                 ( BSTNode** ) & exist, STypesetMbrSort ) != 0 )
-            {
-                free ( mbr );
-            }
-            else
-            {
-                ++ count;
-            }
-        }
-
-        /* got a typeset - add each of its members */
-        else
-        {
-            const STypeset *ts;
-            const VSchema *s = self;
-
-            do
-            {
-                ts = VectorGet ( & s -> ts, td . type_id );
-                if ( ts != NULL )
-                    break;
-                s = s -> dad;
-            }
-            while ( s != NULL );
-            assert ( ts != NULL );
-
-            for ( i = 0; i < ts -> count; ++ i )
-            {
-                mbr = malloc ( sizeof * mbr );
-                if ( mbr == NULL )
-                {
-                    rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-                    KTokenRCExplain ( t, klogInt, rc );
-                    break;
-                }
-
-                mbr -> td = ts -> td [ i ];
-
-                /* ignore/allow duplicates */
-                if ( BSTreeInsertUnique ( & tree, & mbr -> n,
-                     ( BSTNode** ) & exist, STypesetMbrSort ) != 0 )
-                {
-                    free ( mbr );
-                }
-                else
-                {
-                    ++ count;
-                }
-            }
-
-            if ( rc != 0 )
-                break;
-        }
-    }
-    while ( t -> id == eComma );
-
-    if ( rc != 0 )
-    {
-        BSTreeWhack ( & tree, BSTreeMbrWhack, NULL );
-        return rc;
-    }
-
-    if ( t -> id != eRightCurly )
-        rc = KTokenExpected ( t, klogErr, "}" );
-    else
-    {
-        /* we have a typeset */
-        STypeset *ts = malloc ( sizeof * ts - sizeof ts -> td + count * sizeof ts -> td [ 0 ] );
-        if ( ts == NULL )
-            rc = RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-        else
-        {
-            /* initialize */
-            ts -> name = sym;
-            ts -> count = 0;
-
-            /* copy fmtdecls */
-            BSTreeForEach ( & tree, false, STypesetPopulate, ts );
-            assert ( ts -> count == count );
-
-            /* have a new one */
-            if ( ! existing )
-            {
-                /* enter it into list */
-                sym -> u . obj = ts;
-                rc = VectorAppend ( & self -> ts, & ts -> id, ts );
-                if ( rc != 0 )
-                {
-                    free ( ts );
-                    KTokenRCExplain ( t, klogInt, rc );
-                }
-            }
-
-            /* allow benign redefine */
-            else
-            {
-                const STypeset *orig = sym -> u . obj;
-                if ( orig -> count != count )
-                {
-                    rc = RC ( rcVDB, rcSchema, rcParsing, rcToken, rcExists );
-                    KTokenRCExplain ( t, klogErr, rc );
-                }
-                else for ( i = 0; i < count; ++ i )
-                {
-                    if ( VTypedeclCmp ( & orig -> td [ i ], & ts -> td [ i ] ) != 0 )
-                    {
-                        rc = RC ( rcVDB, rcSchema, rcParsing, rcToken, rcExists );
-                        KTokenRCExplain ( t, klogErr, rc );
-                        break;
-                    }
-                }
-
-                free ( ts );
-            }
-        }
-    }
-
-    BSTreeWhack ( & tree, BSTreeMbrWhack, NULL );
-
-    if ( rc == 0 )
-        rc = expect ( tbl, src, next_token ( tbl, src, t ), eSemiColon, ";", false );
-
-    return rc;
-}
-#endif
diff --git a/libs/vdb/schema.c b/libs/vdb/schema.c
deleted file mode 100644
index 0a18484..0000000
--- a/libs/vdb/schema.c
+++ /dev/null
@@ -1,1768 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define TRACK_REFERENCES 0
-
-#include "va_copy.h"
-
-#define KONST const
-#include "dbmgr-priv.h"
-#undef KONST
-
-#include "schema-priv.h"
-#include "schema-tok.h"
-#include "schema-parse.h"
-
-#include <kdb/meta.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/mmap.h>
-#include <klib/symbol.h>
-#include <klib/symtab.h>
-#include <klib/namelist.h>
-#include <klib/data-buffer.h>
-#include <klib/printf.h>
-#include <klib/out.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * KDirectory
- */
-static
-void CC KDirRefRelease ( void *item, void *ignore )
-{
-    KDirectoryRelease ( ( const void* ) item );
-}
-
-/*--------------------------------------------------------------------------
- * generic
- */
-
-void CC VectMbrWhack ( void *item, void *ignore )
-{
-    free ( item );
-}
-
-void CC BSTreeMbrWhack ( BSTNode *n, void *ignore )
-{
-    free ( n );
-}
-
-/*--------------------------------------------------------------------------
- * KSymbol
- */
-rc_t KSymbolCopy ( BSTree *scope, KSymbol **cp, const KSymbol *orig )
-{
-    rc_t rc;
-    KSymbol *copy, *dad = NULL;
-
-    /* recursively copy namespaces */
-    if ( orig -> dad != NULL )
-    {
-        rc = KSymbolCopy ( scope, cp, orig -> dad );
-        if ( rc != 0 )
-            return rc;
-
-        /* copied dad becomes scope */
-        dad = * cp;
-        scope = & dad -> u . scope;
-    }
-
-#if COPY_SHARE_TEXT
-    /* create simple copy with no new space for text */
-    copy = malloc ( sizeof * copy );
-#else
-    copy = malloc ( sizeof (*copy) + orig->name.size + 1 );
-#endif
-    if ( copy == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    /* copy original, including pointer to string */
-    * copy = * orig;
-
-#if ! COPY_SHARE_TEXT
-
-    /* copy original including string */
-    string_copy ( ( char* ) ( copy + 1 ), orig -> name . size + 1,
-        orig -> name . addr, orig -> name . size );
-
-    /* fix up pointer to string */
-    copy -> name . addr = ( const char* ) ( copy + 1 );
-#endif
-    copy -> dad = dad;
-
-    /* if we just created a namespace, forget its children */
-    if ( copy -> type == eNamespace )
-    {
-        BSTreeInit ( & copy -> u . scope );
-        rc = BSTreeInsertUnique ( scope, & copy -> n, ( BSTNode** ) cp, KSymbolSort );
-        if ( rc != 0 )
-        {
-            free ( copy );
-            copy = * cp;
-            if ( copy -> type == eNamespace )
-                rc = 0;
-            else
-                copy = NULL;
-        }
-    }
-    else
-    {
-        rc = BSTreeInsertUnique ( scope, & copy -> n, ( BSTNode** ) cp, KSymbolSort );
-        if ( rc != 0 )
-        {
-            free ( copy );
-            copy = NULL;
-        }
-    }
-
-/*     if (*cp != copy) */
-/*      fprintf(stderr,"%p\t%30s %30.*s\tmalloc\t%d\n", (void*)copy,  */
-/*              __func__,(int)copy->name.size,copy->name.addr, copy->type); */
-
-    * cp = copy;
-    return rc;
-}
-
-bool CC KSymbolCopyScope ( BSTNode *n, void *scope )
-{
-    const KSymbol *sym = ( const KSymbol* ) n;
-
-    /* perform a deep copy of leaf symbols */
-    if ( sym -> type != eNamespace )
-    {
-        KSymbol *ignore;
-        rc_t rc = KSymbolCopy ( scope, & ignore, sym );
-        return ( rc != 0 ) ? true : false;
-    }
-
-    /* traverse namespaces to find leaves */
-    return BSTreeDoUntil ( & sym -> u . scope, false, KSymbolCopyScope, scope );
-}
-
-#if _DEBUGGING
-static
-void CC KSymbolList ( BSTNode *item, void *data )
-{
-    const KSymbol *self = ( const KSymbol* ) item;
-    const char *indent = ( const char* ) data;
-
-    OUTMSG (( "%s%.*s = %#p"
-             , indent
-             , ( int ) self -> name . size, self -> name . addr
-             , self
-        ));
-
-    if ( self -> type != eNamespace )
-        putchar ( '\n' );
-    else
-    {
-        printf ( " ( namespace ):\n" );
-        if ( indent [ -1 ] != '.' )
-            -- indent;
-
-        BSTreeForEach ( & self -> u . scope, false, KSymbolList, ( void* ) indent );
-    }
-}
-
-static
-void CC BSTreeListSymbols ( const BSTree *self, const char *indent )
-{
-    OUTMSG (( "%sscope = %#p\n"
-             , indent
-             , self
-        ));
-
-    if ( indent [ -1 ] != '.' )
-        -- indent;
-
-    BSTreeForEach ( self, false, KSymbolList, ( void* ) indent );
-}
-#endif
-
-
-
-/* ExamineContents
- *  not much to be done here
- */
-#if EXAMINE_SCHEMA_CONTENTS >= 1
-bool CC KSymbolExamineContents ( BSTNode *n, void *data )
-{
-    rc_t *rc = data;
-    const KSymbol *sym = ( const KSymbol* ) n;
-
-    /* can test heuristic that name is NULL-terminated,
-       that name size and length are identical */
-
-    /* can test that symbol type is a valid id type */
-    return false;
-}
-#endif
-
-
-
-
-/*--------------------------------------------------------------------------
- * KMDataNode
- */
-
-/* FillSchema
- *  a schema buffer fill function that reads from KMDataNode
- */
-rc_t CC KMDataNodeFillSchema ( void *data, KTokenText *tt, size_t save )
-{
-    rc_t rc;
-    size_t num_read;
-    KMDataNodeSchemaFillData *pb = data;
-
-     /* on very first fill, check for specifying v0 */
-    if ( pb -> add_v0 )
-    {
-        assert ( save == 0 );
-        CONST_STRING ( & tt -> str, "version 0;" );
-        pb -> add_v0 = false;
-        return 0;
-    }
-
-   /* save any characters not yet consumed */
-    if ( save != 0 )
-    {
-        assert ( save < sizeof pb -> buff );
-        memmove ( pb -> buff,
-            & tt -> str . addr [ tt -> str . size - save ], save );
-    }
-
-    /* read as many characters as are available */
-    rc = KMDataNodeRead ( pb -> node, pb -> pos,
-        & pb -> buff [ save ], sizeof pb -> buff - save, & num_read, NULL );
-    if ( rc == 0 )
-    {
-	/******** PROTECT FROM BUGS IN TOKENIZER ****/
-	if(num_read == sizeof (pb -> buff) - save){ /** not the last chunk ***/
-		int i;
-		for(i=num_read+save-1;i > save && (isalnum(pb -> buff[i]) || pb -> buff[i]=='_');i--){}
-		if(i > save && pb -> buff[i]=='.'){ /*** leave this physical column for the next buffer **/
-			num_read=i-save;
-		}
-	}
-	/********************************************/
-        /* reset the buffer in "tt" */
-        tt -> str . addr = pb -> buff;
-        tt -> str . size = save + num_read;
-        tt -> str . len = string_len ( pb -> buff, save + num_read );
-        pb -> pos += num_read;
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * SNameOverload
- */
-
-/* Whack
- */
-void CC SNameOverloadWhack ( void *item, void *ignore )
-{
-    SNameOverload *self = item;
-    VectorWhack ( & self -> items, NULL, NULL );
-    free ( self );
-}
-
-/* Make
- */
-rc_t SNameOverloadMake ( SNameOverload **np,
-    const KSymbol *sym, uint32_t start, uint32_t len )
-{
-    SNameOverload *name = malloc ( sizeof * name );
-    if ( name == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-
-    name -> name = sym;
-    ( ( KSymbol* ) sym ) -> u . obj = name;
-    VectorInit ( & name -> items, start, len );
-    name -> cid . ctx = 0;
-
-    * np = name;
-    return 0;
-}
-
-/* Copy
- */
-rc_t SNameOverloadCopy ( BSTree *scope,
-    SNameOverload **cp, const SNameOverload *orig )
-{
-    KSymbol *sym;
-    rc_t rc = KSymbolCopy ( scope, & sym, orig -> name );
-    if ( rc == 0 )
-    {
-        SNameOverload *copy;
-        rc = SNameOverloadMake ( & copy, sym, 0, 0 );
-        if ( rc == 0 )
-        {
-            /* copy contents */
-            rc = VectorCopy ( & orig -> items, & copy -> items );
-            if ( rc == 0 )
-            {
-                copy -> cid = orig -> cid;
-                * cp = copy;
-                return 0;
-            }
-
-            SNameOverloadWhack ( copy, NULL );
-        }
-
-        BSTreeUnlink ( scope, & sym -> n );
-        KSymbolWhack ( & sym -> n, NULL );
-    }
-
-    * cp = NULL;
-    return rc;
-}
-
-typedef struct SNameOverloadCopyData SNameOverloadCopyData;
-struct SNameOverloadCopyData
-{
-    BSTree *scope;
-    Vector *dest;
-    rc_t rc;
-};
-
-static
-bool CC SNameOverloadVectorCopyItem ( void *item, void *data )
-{
-    SNameOverloadCopyData *pb = data;
-
-    SNameOverload *copy;
-    pb -> rc = SNameOverloadCopy ( pb -> scope, & copy, ( const void* ) item );
-    if ( pb -> rc == 0 )
-        pb -> rc = VectorAppend ( pb -> dest, & copy -> cid . id, copy );
-
-    return ( pb -> rc != 0 ) ? true : false;
-}
-
-rc_t SNameOverloadVectorCopy ( BSTree *scope, const Vector *src, Vector *dest )
-{
-    SNameOverloadCopyData pb;
-    pb . scope = scope;
-    pb . dest = dest;
-    pb . rc = 0;
-
-    if ( VectorDoUntil ( src, false, SNameOverloadVectorCopyItem, & pb ) )
-        return pb . rc;
-
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * VIncludedPath
- */
-typedef struct VIncludedPath VIncludedPath;
-struct VIncludedPath
-{
-    BSTNode n;
-    uint32_t ord;
-    char path [ 1 ];
-};
-
-/* Cmp
- * Sort
- */
-static
-int64_t CC VIncludedPathCmp ( const void *item, const BSTNode *n )
-{
-    const char *a = item;
-    const VIncludedPath *b = ( const VIncludedPath* ) n;
-    return strcmp ( a, b -> path );
-}
-
-static
-int64_t CC VIncludedPathSort ( const BSTNode *item, const BSTNode *n )
-{
-    const VIncludedPath *a = ( const VIncludedPath* ) item;
-    const VIncludedPath *b = ( const VIncludedPath* ) n;
-    return strcmp ( a -> path, b -> path );
-}
-
-static
-int64_t CC VIncludedPathSortByOrder ( const BSTNode *item, const BSTNode *n )
-{
-    const VIncludedPath *a = ( const VIncludedPath* ) item;
-    const VIncludedPath *b = ( const VIncludedPath* ) n;
-    return ( int64_t ) a -> ord - ( int64_t ) b -> ord;
-}
-
-/* Make
- */
-static
-rc_t CC VIncludedPathMake ( BSTree *paths, uint32_t *count, const char *path )
-{
-    VIncludedPath *p = malloc ( sizeof * p + strlen ( path ) );
-    if ( p == NULL )
-        return RC ( rcVDB, rcSchema, rcParsing, rcMemory, rcExhausted );
-    p -> ord = ( * count ) ++;
-    strcpy ( p -> path, path );
-    BSTreeInsert ( paths, & p -> n, VIncludedPathSort );
-    return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- * VSchema
- *  a symbol scope
- *  data types, blob formats, function and sub-schema declarations
- *  database and table declarations
- */
-
-
-#if _DEBUGGING
-/* Listing
- *  list symbol tables
- */
-void VSchemaListSymtab ( const VSchema *self )
-{
-    if ( self != NULL )
-    {
-        const char *indent = ".                ";
-        VSchemaListSymtab ( self -> dad );
-        BSTreeListSymbols ( & self -> scope, & indent [ 17 ] );
-        putchar ( '\n' );
-    }
-}
-#endif
-
-
-/* Marking
- */
-void VSchemaClearMark ( const VSchema *self )
-{
-    if ( self == NULL )
-        return;
-
-    VectorForEach ( & self -> fmt, false, SFormatClearMark, NULL );
-    VectorForEach ( & self -> dt, false, SDatatypeClearMark, NULL );
-    VectorForEach ( & self -> ts, false, STypesetClearMark, NULL );
-    VectorForEach ( & self -> cnst, false, SConstantClearMark, NULL );
-    VectorForEach ( & self -> func, false, SFunctionClearMark, NULL );
-    VectorForEach ( & self -> phys, false, SPhysicalClearMark, NULL );
-    VectorForEach ( & self -> tbl, false, STableClearMark, NULL );
-    VectorForEach ( & self -> db, false, SDatabaseClearMark, NULL );
-
-    if ( self -> dad != NULL )
-        VSchemaClearMark ( self -> dad );
-}
-
-
-/* Destroy
- */
-static
-void CC VSchemaDestroy ( VSchema *self )
-{
-    REFMSG ( "VSchema", "destroy", & self -> refcount );
-    
-    BSTreeWhack ( & self -> scope, KSymbolWhack, NULL );
-    BSTreeWhack ( & self -> paths, BSTreeMbrWhack, NULL );
-    VectorWhack ( & self -> inc, KDirRefRelease, NULL );
-    VectorWhack ( & self -> alias, NULL, NULL );
-    VectorWhack ( & self -> fmt, SFormatWhack, NULL );
-#if SLVL >= 1
-    VectorWhack ( & self -> dt, SDatatypeWhack, NULL );
-    VectorWhack ( & self -> ts, STypesetWhack, NULL );
-#endif
-#if SLVL >= 3
-    VectorWhack ( & self -> pt, SIndirectTypeWhack, NULL );
-#endif
-#if SLVL >= 2
-    VectorWhack ( & self -> cnst, SConstantWhack, NULL );
-#endif
-#if SLVL >= 3
-    VectorWhack ( & self -> func, SFunctionWhack, NULL );
-    VectorWhack ( & self -> fname, SNameOverloadWhack, NULL );
-#endif
-#if SLVL >= 5
-    VectorWhack ( & self -> phys, SPhysicalWhack, NULL );
-    VectorWhack ( & self -> pname, SNameOverloadWhack, NULL );
-#endif
-#if SLVL >= 6
-    VectorWhack ( & self -> tbl, STableWhack, NULL );
-    VectorWhack ( & self -> tname, SNameOverloadWhack, NULL );
-
-    VectorWhack ( & self -> db, SDatabaseWhack, NULL );
-    VectorWhack ( & self -> dname, SNameOverloadWhack, NULL );
-#endif
-
-    free ( self );
-}
-
-/* Whack
- */
-static
-rc_t CC VSchemaWhack ( VSchema *self )
-{
-    KRefcountWhack ( & self -> refcount, "VSchema" );
-
-    VSchemaSever ( self -> dad );
-    VSchemaDestroy ( self );
-
-    return 0;
-}
-
-
-/* AddRef
- * Release
- *  all objects are reference counted
- *  NULL references are ignored
- */
-LIB_EXPORT rc_t CC VSchemaAddRef ( const VSchema *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "VSchema" ) )
-        {
-        case krefLimit:
-            return RC ( rcVDB, rcMgr, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VSchemaRelease ( const VSchema *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "VSchema" ) )
-        {
-        case krefWhack:
-            return VSchemaWhack ( ( VSchema* ) self );
-        case krefNegative:
-            return RC ( rcVDB, rcMgr, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Attach
- * Sever
- */
-VSchema *VSchemaAttach ( const VSchema *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "VSchema" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( VSchema* ) self;
-}
-
-rc_t VSchemaSever ( const VSchema *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "VSchema" ) )
-        {
-        case krefWhack:
-            return VSchemaWhack ( ( VSchema* ) self );
-        case krefNegative:
-            return RC ( rcVDB, rcMgr, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* StartIdx
- *  returns starting index
- */
-#define VSchemaStartIdx( dad, vect, starting ) \
-    ( ( ( dad ) == NULL ) ? ( starting ) : \
-      ( VectorStart ( & ( dad ) -> vect ) + \
-        VectorLength ( & ( dad ) -> vect ) ) )
-
-/* VectorInit
- *  performs vector initialization
- */
-#define VSchemaVectorInit( schema, dad, vect, starting, block ) \
-    VectorInit ( & ( schema ) -> vect, VSchemaStartIdx ( dad, vect, starting ), block )
-
-
-/* MakeSchema
- *  make an empty schema
- */
-rc_t VSchemaMake ( VSchema **sp,  const VSchema *dad )
-{
-    VSchema *schema = malloc ( sizeof * schema );
-    if ( schema == NULL )
-        return RC ( rcVDB, rcMgr, rcConstructing, rcMemory, rcExhausted );
-
-    schema -> dad = VSchemaAttach ( dad );
-    BSTreeInit ( & schema -> scope );
-    BSTreeInit ( & schema -> paths );
-
-    /* datatypes, typesets and parameterized types all shared
-       the same type_id space from 0..0xFFFFFFFF. each is
-       assigned a range to avoid overlap:
-
-       datatypes = 0..0x3FFFFFFF
-       typesets = 0x40000000..0x7FFFFFFF
-       undefined parameterized type = 0x80000000
-       parameterized types = 0x80000001..0xFFFFFFFF
-    */
-    VSchemaVectorInit ( schema, dad, inc, 0, 4 );
-    VSchemaVectorInit ( schema, dad, alias, 0, 16 );
-    VSchemaVectorInit ( schema, dad, fmt, 1, 16 );
-    VSchemaVectorInit ( schema, dad, dt, 0, 128 );
-    VSchemaVectorInit ( schema, dad, ts, 0x40000000, 16 );
-    VSchemaVectorInit ( schema, dad, pt, 0x80000001, 32 );
-
-    VSchemaVectorInit ( schema, dad, cnst, 0, 32 );
-    VSchemaVectorInit ( schema, dad, func, 0, 64 );
-    VSchemaVectorInit ( schema, dad, phys, 0, 32 );
-    VSchemaVectorInit ( schema, dad, tbl, 0, 16 );
-    VSchemaVectorInit ( schema, dad, db, 0, 4 );
-
-    VectorInit ( & schema -> fname, 0, 64 );
-    VectorInit ( & schema -> pname, 0, 32 );
-    VectorInit ( & schema -> tname, 0, 16 );
-    VectorInit ( & schema -> dname, 0, 4 );
-
-    KRefcountInit ( & schema -> refcount, 1, "VSchema", "make", "vschema" );
-    schema -> file_count = 0;
-    schema -> num_indirect = ( dad == NULL ) ? 0 : dad -> num_indirect;
-
-    /* copy the versioned name vectors and names */
-    if ( dad != NULL )
-    {
-        rc_t rc = SNameOverloadVectorCopy ( & schema -> scope, & dad -> fname, & schema -> fname );
-        if ( rc == 0 )
-            rc = SNameOverloadVectorCopy ( & schema -> scope, & dad -> pname, & schema -> pname );
-        if ( rc == 0 )
-            rc = SNameOverloadVectorCopy ( & schema -> scope, & dad -> tname, & schema -> tname );
-        if ( rc == 0 )
-            rc = SNameOverloadVectorCopy ( & schema -> scope, & dad -> dname, & schema -> dname );
-        if ( rc != 0 )
-        {
-            VSchemaWhack ( schema );
-            * sp = NULL;
-            return rc;
-        }
-    }
-    
-    * sp = schema;
-    return 0;
-}
-
-
-/* AddIncludePath
- *  add an include path to schema for locating input files
- */
-LIB_EXPORT rc_t CC VSchemaVAddIncludePath ( VSchema *self, const char *path, va_list args )
-{
-    KDirectory *wd;
-    rc_t rc = KDirectoryNativeDir ( & wd );
-    if ( rc == 0 )
-    {
-        const KDirectory *dir;
-        rc = KDirectoryVOpenDirRead ( wd, & dir, false, path, args );
-        if ( rc == 0 )
-        {
-            rc = VectorAppend ( & self -> inc, NULL, dir );
-            if ( rc != 0 )
-                KDirectoryRelease ( dir );
-        }
-
-        KDirectoryRelease ( wd );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VSchemaAddIncludePath ( VSchema *self, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = VSchemaVAddIncludePath ( self, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* ParseText
- *  parse schema text
- *  add productions to existing schema
- *
- *  "name" [ IN, NULL OKAY ] - optional name
- *  representing text, e.g. filename
- *
- *  "text" [ IN ] and "bytes" [ IN ] - input buffer of text
- */
-static
-rc_t CC VSchemaParseTextInt ( VSchema *self,
-    const char *name, const char *text, size_t bytes )
-{
-    KTokenText tt;
-    KTokenSource src;
-    String str, path;
-    rc_t rc;
-    
-    if ( name == NULL || name [ 0 ] == 0 )
-        CONST_STRING ( & path, "<unnamed>" );
-    else
-        StringInitCString ( & path, name );
-
-    StringInit ( & str, text, bytes, string_len ( text, bytes ) );
-    KTokenTextInit ( & tt, & str, & path );
-    KTokenSourceInit ( & src, & tt );
-
-    rc = schema ( & src, self );
-    
-    if (rc == 0)
-        PARSE_DEBUG( ("Parsed schema from %s\n", name) );
-    else
-        PARSE_DEBUG( ("Failed to parse schema from %s\n", name) );
-    
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VSchemaParseText ( VSchema *self, const char *name,
-    const char *text, size_t bytes )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcSelf, rcNull );
-    else if ( bytes == 0 )
-        rc = 0;
-    else if ( text == NULL )
-        rc = RC ( rcVDB, rcSchema, rcParsing, rcParam, rcNull );
-    else
-        rc = VSchemaParseTextInt ( self, name, text, bytes );
-
-    return rc;
-}
-
-
-/* ParseTextCallback
- *  parse schema text
- *  add productions to existing schema
- *
- *  "name" [ IN, NULL OKAY ] - optional name
- *  representing text, e.g. filename
- *
- *  "fill" [ IN ] and "data" [ IN, OPAQUE ] - for filling buffer
- */
-rc_t VSchemaParseTextCallback ( VSchema *self, const char *name,
-    rc_t ( CC * fill ) ( void *self, KTokenText *tt, size_t save ), void *data )
-{
-    KTokenText tt;
-    KTokenSource src;
-
-    KTokenTextInitCString ( & tt, "", name );
-    tt . read = fill;
-    tt . data = data;
-
-    KTokenSourceInit ( & src, & tt );
-
-    return schema ( & src, self );
-}
-
-
-/* OpenFile
- *  opens a file, using include paths
- */
-static
-rc_t CC VSchemaTryOpenFile ( const VSchema *self, const KDirectory *dir, const KFile **fp,
-    char *path, size_t path_max, const char *name, va_list args )
-{
-    rc_t rc;
-    va_list cpy_args;
-
-    va_copy ( cpy_args, args );
-    rc = KDirectoryVResolvePath ( dir, true, path, path_max, name, cpy_args );
-    va_end ( cpy_args );
-
-    if ( rc == 0 )
-    {
-        /* try to find file in already opened list */
-        if ( BSTreeFind ( & self -> paths, path, VIncludedPathCmp ) != NULL )
-        {
-            * fp = NULL;
-            return 0;
-        }
-    }
-
-    if ( rc == 0 )
-        rc = KDirectoryOpenFileRead ( dir, fp, "%s", path );
-
-    return rc;
-}
-
-static
-rc_t CC VSchemaOpenFile ( const VSchema *self, const KFile **fp,
-    char *path, size_t path_max, const char *name, va_list args )
-{
-    const VSchema *schema;
-    for ( schema = self; schema != NULL; schema = schema -> dad )
-    {
-        uint32_t i, end;
-
-        for ( i = VectorStart ( & schema -> inc ), end = i + VectorLength ( & schema -> inc );
-              i < end; ++ i )
-        {
-            const KDirectory *dir = ( const KDirectory* ) VectorGet ( & schema -> inc, i );
-            if ( dir != NULL )
-            {
-                rc_t rc = VSchemaTryOpenFile ( self, dir, fp, path, path_max, name, args );
-                if ( rc == 0 || GetRCState ( rc ) != rcNotFound )
-                    return rc;
-            }
-        }
-    }
-
-    return RC ( rcVDB, rcSchema, rcOpening, rcPath, rcNotFound );
-}
-
-/* ParseFile
- *  parse schema file
- *  add productions to existing schema
- *
- *  "name" [ IN ] - filename, absolute or valid relative to
- *  working directory or within an include path
- */
-LIB_EXPORT rc_t CC VSchemaVParseFile ( VSchema *self, const char *name, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcSchema, rcOpening, rcSelf, rcNull );
-    else if ( name == NULL )
-        rc = RC ( rcVDB, rcSchema, rcOpening, rcPath, rcNull );
-    else if ( name [ 0 ] == 0 )
-        rc = RC ( rcVDB, rcSchema, rcOpening, rcPath, rcEmpty );
-    else
-    {
-        const KFile *f;
-        char path [ 4096 ];
-
-        /* open file using include paths */
-        rc = VSchemaOpenFile ( self, & f, path, sizeof path, name, args );
-
-        /* try to open the file according to current directory */
-        if ( rc != 0 )
-        {
-            KDirectory *wd;
-            rc = KDirectoryNativeDir ( & wd );
-            if ( rc == 0 )
-            {
-                rc = VSchemaTryOpenFile ( self, wd, & f, path, sizeof path, name, args );
-                KDirectoryRelease ( wd );
-            }
-        }
-
-        /* if the file was opened... */
-        if ( rc == 0 && f != NULL )
-        {
-            const KMMap *mm;
-            rc = KMMapMakeRead ( & mm, f );
-            if ( rc == 0 )
-            {
-                size_t size;
-                const void *addr;
-                rc = KMMapAddrRead ( mm, & addr );
-                if ( rc == 0 )
-                    rc = KMMapSize ( mm, & size );
-                if ( rc == 0 )
-                {
-                    rc = VIncludedPathMake ( & self -> paths, & self -> file_count, path );
-                    if ( rc == 0 )
-                        rc = VSchemaParseTextInt ( self, path, addr, size );
-                }
-            
-                KMMapRelease ( mm );
-            }
-        
-            KFileRelease ( f );
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VSchemaParseFile ( VSchema *self, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VSchemaVParseFile ( self, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* ResolveFmtdecl
- *  converts a fmtdecl string to fmt id, type id and vector dimension
- *
- *  "resolved" [ OUT ] - resolved fmtdecl
- *
- *  "fmtdecl" [ IN ] - type declaration
- */
-rc_t CC VSchemaVResolveFmtdecl ( const VSchema *self,
-    VFormatdecl *resolved, const char *decl, va_list args )
-{
-    rc_t rc;
-
-    if ( resolved == NULL )
-        rc = RC ( rcVDB, rcSchema, rcResolving, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcSchema, rcResolving, rcSelf, rcNull );
-        else if ( decl == NULL )
-            rc = RC ( rcVDB, rcSchema, rcResolving, rcType, rcNull );
-        else if ( decl [ 0 ] == 0 )
-            rc = RC ( rcVDB, rcSchema, rcResolving, rcType, rcEmpty );
-        else
-        {
-            char buffer [ 256 ];
-            int len = vsnprintf ( buffer, sizeof buffer, decl, args );
-            if ( len < 0 || len >= sizeof buffer )
-                rc = RC ( rcVDB, rcSchema, rcResolving, rcType, rcExcessive );
-            else
-            {
-                KSymTable tbl;
-                rc = init_symtab ( & tbl, self );
-                if ( rc == 0 )
-                {
-                    KToken t;
-                    KTokenText tt;
-                    KTokenSource src;
-                    String text, path;
-
-                    SchemaEnv env;
-                    SchemaEnvInit ( & env, EXT_SCHEMA_LANG_VERSION );
-
-                    StringInit ( & text, buffer, len, string_len ( buffer, len ) );
-                    CONST_STRING ( & path, "VSchemaResolve" );
-                    KTokenTextInit ( & tt, & text, & path );
-                    KTokenSourceInit ( & src, & tt );
-
-                    rc = fmtspec ( & tbl, & src, next_token ( & tbl, & src, & t ),
-                        & env, self, resolved );
-
-                    KSymTableWhack ( & tbl );
-
-                    if ( rc == 0 )
-                        return 0;
-                }
-            }
-        }
-
-        resolved -> td . type_id = 0;
-        resolved -> td . dim = 0;
-        resolved -> fmt = 0;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VSchemaResolveFmtdecl ( const VSchema *self,
-    VFormatdecl *resolved, const char *fmtdecl, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, fmtdecl );
-    rc = VSchemaVResolveFmtdecl ( self, resolved, fmtdecl, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* ResolveTypespec
- *  converts a typespec string to fmt id, type id and vector dimension
- *
- *  "resolved" [ OUT ] - resolved fmtdecl
- *
- *  "typespec" [ IN ] - type specification
- */
-LIB_EXPORT rc_t CC VSchemaVResolveTypespec ( const VSchema *self,
-    VTypedecl *resolved, const char *decl, va_list args )
-{
-    rc_t rc;
-
-    if ( resolved == NULL )
-        rc = RC ( rcVDB, rcSchema, rcResolving, rcParam, rcNull );
-    else
-    {
-        VFormatdecl fd;
-        rc = VSchemaVResolveFmtdecl ( self, & fd, decl, args );
-        if ( rc == 0 )
-        {
-            if ( fd . fmt != 0 )
-                rc = RC ( rcVDB, rcSchema, rcResolving, rcType, rcIncorrect );
-            else
-            {
-                * resolved = fd . td;
-                return 0;
-            }
-        }
-
-        resolved -> type_id = 0;
-        resolved -> dim = 0;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VSchemaResolveTypespec ( const VSchema *self,
-    VTypedecl *resolved, const char *typespec, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, typespec );
-    rc = VSchemaVResolveTypespec ( self, resolved, typespec, args );
-    va_end ( args );
-
-    return rc;
-}
-
-/* ResolveTypedecl
- *  converts a typedecl string to type id and vector dimension
- *
- *  "resolved" [ OUT ] - resolved type declaration
- *
- *  "typedecl" [ IN ] - type declaration
- */
-LIB_EXPORT rc_t CC VSchemaVResolveTypedecl ( const VSchema *self,
-    VTypedecl *resolved, const char *decl, va_list args )
-{
-    rc_t rc = VSchemaVResolveTypespec ( self, resolved, decl, args );
-    if ( rc == 0 )
-    {
-        if ( ( resolved -> type_id & 0xC0000000 ) == 0 )
-            return 0;
-
-        rc = RC ( rcVDB, rcSchema, rcResolving, rcType, rcIncorrect );
-        
-        resolved -> type_id = 0;
-        resolved -> dim = 0;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VSchemaResolveTypedecl ( const VSchema *self,
-    VTypedecl *resolved, const char *typedecl, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, typedecl );
-    rc = VSchemaVResolveTypedecl ( self, resolved, typedecl, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* IncludeFiles
- *  generates a list of paths to include file
- */
-static
-bool CC VIncludedPathList ( BSTNode *n, void *list )
-{
-    const VIncludedPath *p = ( const VIncludedPath* ) n;
-    rc_t rc = VNamelistAppend ( list, p -> path );
-    return ( rc != 0 ) ? true : false;
-}
-
-LIB_EXPORT rc_t CC VSchemaIncludeFiles ( const VSchema *self, const KNamelist **listp )
-{
-    rc_t rc;
-    if ( listp == NULL )
-        rc = RC ( rcVDB, rcSchema, rcListing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcSchema, rcListing, rcSelf, rcNull );
-        else
-        {
-            /* create namelist */
-            VNamelist *list;
-            rc = VNamelistMake ( & list, self -> file_count );
-            if ( rc == 0 )
-            {
-                /* create a shallow copy */
-                BSTree paths = self -> paths;
-
-                /* sort by order rather than by path */
-                BSTreeResort ( & paths, VIncludedPathSortByOrder );
-
-                /* add paths to list */
-                if ( BSTreeDoUntil ( & paths, false, VIncludedPathList, list ) )
-                    rc = RC ( rcVDB, rcSchema, rcListing, rcMemory, rcExhausted );
-
-                /* restore path order */
-                BSTreeResort ( & paths, VIncludedPathSort );
-                assert ( paths . root == self -> paths . root );
-
-                /* cast list, creating a new reference */
-                if ( rc == 0 )
-                    rc = VNamelistToNamelist ( list, (KNamelist **)listp );
-
-                /* discard original reference */
-                VNamelistRelease ( list );
-
-                /* return list */
-                if ( rc == 0 )
-                    return 0;
-            }
-        }
-
-        * listp = NULL;
-    }
-    return rc;
-}
-
-
-/* ListLegacyTables - PRIVATE
- *  scan all tables defined in schema
- *  return the fully-qualified and versioned name of each legacy SRA table
- */
-typedef struct STableFindData STableFindData;
-struct STableFindData
-{
-    VNamelist *list;
-    rc_t rc;
-};
-
-static
-bool CC STableTestUntyped ( void *item, void *data )
-{
-    const STable *stbl = ( const void* ) item;
-    STableFindData *pb = data;
-
-    if ( stbl -> untyped != NULL )
-    {
-        char buffer [ 1024 ];
-
-        /* found a legacy table */
-        pb -> rc = string_printf ( buffer, sizeof buffer, NULL, "%N#%V", stbl -> name, stbl -> version );
-        if ( pb -> rc != 0 )
-        {
-            pb -> rc = RC ( rcVDB, rcSchema, rcListing, rcName, rcExcessive );
-            return true;
-        }
-
-        /* add it to the vector */
-        pb -> rc = VNamelistAppend ( pb -> list, buffer );
-        if ( pb -> rc != 0 )
-            return true;
-    }
-
-    return false;
-}
-
-static
-bool VSchemaFindUntyped ( const VSchema *self, STableFindData *pb )
-{
-    if ( self -> dad )
-    {
-        if ( VSchemaFindUntyped ( self -> dad, pb ) )
-            return true;
-    }
-
-    return VectorDoUntil ( & self -> tbl, false, STableTestUntyped, pb );
-}
-
-LIB_EXPORT rc_t CC VSchemaListLegacyTables ( const VSchema *self, KNamelist **listp )
-{
-    rc_t rc;
-
-    if ( listp == NULL )
-        rc = RC ( rcVDB, rcSchema, rcListing, rcParam, rcNull );
-    else
-    {
-        * listp = NULL;
-
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcSchema, rcListing, rcSelf, rcNull );
-        else
-        {
-            STableFindData pb;
-            rc = VNamelistMake ( & pb . list, 16 );
-            if ( rc == 0 )
-            {
-                pb . rc = 0;
-                if ( VSchemaFindUntyped ( self, & pb ) )
-                    rc = pb . rc;
-                else
-                    rc = VNamelistToNamelist ( pb . list, listp );
-                    
-                VNamelistRelease ( pb . list );
-            }
-        }
-    }
-
-    return rc;
-}
-
-/*--------------------------------------------------------------------------
- * VDBManager
- */
-
-LIB_EXPORT rc_t CC VDBManagerMakeSchema ( const VDBManager *self, VSchema **schema )
-{
-    rc_t rc;
-    if ( schema == NULL )
-        rc = RC ( rcVDB, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcMgr, rcConstructing, rcSelf, rcNull );
-        else
-        {
-            rc = VSchemaMake ( schema, self -> schema );
-            if ( rc == 0 )
-                return rc;
-        }
-
-        * schema = NULL;
-    }
-
-    return rc;
-}
-
-
-
-/*--------------------------------------------------------------------------
- * VSchemaRuntimeTable
- *  an object that represents a table ( or sub-table ) created at runtime
- *  that can be used to create a VTable object
- */
-struct VSchemaRuntimeTable
-{
-    VSchema *schema;
-    KDataBuffer text;
-    size_t bytes;
-};
-
-
-/* Print
- *  print schema text into buffer
- */
-static
-rc_t VSchemaRuntimeTablePrint ( VSchemaRuntimeTable *self, const char *fmt, ... )
-{
-    int status;
-    va_list args;
-
-    char *buffer;
-    size_t bsize;
-
-    /* make sure there's a bunch of room */
-    if ( self -> text . elem_count - self -> bytes < 4096 )
-    {
-        rc_t rc = KDataBufferResize ( & self -> text, self -> text . elem_count + 4096 );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* the output buffer for this print */
-    buffer = self -> text . base;
-    bsize = self -> text . elem_count - self -> bytes;
-
-    va_start ( args, fmt );
-    status = vsnprintf ( & buffer [ self -> bytes ], bsize, fmt, args );
-    va_end ( args );
-
-    if ( status < 0 || status >= bsize )
-        return RC ( rcVDB, rcSchema, rcConstructing, rcParam, rcExcessive );
-
-    self -> bytes += status;
-    return 0;
-}
-
-
-/* Make
- *  make a table in the schema provided
- *
- *  "tbl" [ OUT ] - return parameter for new schema table object
- *
- *  "typename" [ IN ] - NUL terminated string giving desired typename of table
- *   may include version spec
- *
- *  "supertype_spec" [ IN, NULL OKAY ] - optional supertype spec, giving
- *   either a single super-table type string or multiple comma-separated tables
- */
-LIB_EXPORT rc_t CC VSchemaMakeRuntimeTable ( VSchema *self,
-    VSchemaRuntimeTable **tblp, const char *typename, const char *supertype_spec )
-{
-    rc_t rc;
-
-    if ( tblp == NULL )
-        rc = RC ( rcVDB, rcSchema, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcSchema, rcConstructing, rcSelf, rcNull );
-        else if ( typename == NULL )
-            rc = RC ( rcVDB, rcSchema, rcConstructing, rcType, rcNull );
-        else if ( typename [ 0 ] == 0 )
-            rc = RC ( rcVDB, rcSchema, rcConstructing, rcType, rcEmpty );
-        else
-        {
-            VSchemaRuntimeTable *tbl = malloc ( sizeof * tbl );
-            if ( tbl == NULL )
-                rc = RC ( rcVDB, rcSchema, rcConstructing, rcMemory, rcExhausted );
-            else
-            {
-                rc = KDataBufferMakeBytes ( & tbl -> text, 4096 * 2 );
-                if ( rc == 0 )
-                {
-                    rc = VSchemaAddRef ( self );
-                    if ( rc == 0 )
-                    {
-                        const char *dflt_vers = "";
-                        if ( strchr ( typename, '#' ) == NULL )
-                            dflt_vers = "#1.0";
-
-                        tbl -> schema = self;
-                        tbl -> bytes = 0;
-
-                        /* open the table */
-                        rc = VSchemaRuntimeTablePrint ( tbl, "table %s%s", typename, dflt_vers );
-                        if ( rc == 0 )
-                        {
-                            if ( supertype_spec != NULL && supertype_spec [ 0 ] != 0 )
-                                rc = VSchemaRuntimeTablePrint ( tbl, " = %s", supertype_spec );
-                            if ( rc == 0 )
-                            {
-                                rc = VSchemaRuntimeTablePrint ( tbl, "\n{\n" );
-                                if ( rc == 0 )
-                                {
-                                    * tblp = tbl;
-                                    return 0;
-                                }
-                            }
-                        }
-
-                        VSchemaRelease ( tbl -> schema );
-                    }
-
-                    KDataBufferWhack ( & tbl -> text );
-                }
-
-                free ( tbl );
-            }
-        }
-
-        * tblp = NULL;
-    }
-
-    return rc;
-}
-
-/* Close
- *  close the schema table handle
- *  discards any uncomitted data
- */
-LIB_EXPORT rc_t CC VSchemaRuntimeTableClose ( VSchemaRuntimeTable *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcSchema, rcClosing, rcSelf, rcNull );
-    else
-    {
-        rc = VSchemaRelease ( self -> schema );
-        if ( rc == 0 )
-        {
-            KDataBufferWhack ( & self -> text );
-            free ( self );
-        }
-    }
-
-    return rc;
-}
-
-
-/* Commit
- *  commits table data
- *  closes object to further modification
- */
-LIB_EXPORT rc_t CC VSchemaRuntimeTableCommit ( VSchemaRuntimeTable *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcSchema, rcCommitting, rcSelf, rcNull );
-    else
-    {
-        const char *data = self -> text . base;
-        if ( self -> bytes == 0 )
-            rc = RC ( rcVDB, rcSchema, rcCommitting, rcSelf, rcEmpty );
-        else
-        {
-            rc = VSchemaRuntimeTablePrint ( self, "}\n" );
-            if ( rc == 0 )
-                rc = VSchemaParseText ( self -> schema, "runtime-table", data, self -> bytes );
-            KDataBufferWhack ( & self -> text );
-        }
-    }
-
-    return rc;
-}
-
-
-/* AddColumn
- *  add a simple column to the table
- *
- *  "td" [ IN ] - data type of column, obtained from schema object
- *
- *  "encoding" [ IN, NULL OKAY ] - optional compression/encoding type
- *  specified as a NUL-terminated string
- *
- *  "name" [ IN ] - NUL-terminated simple ASCII name
- *   conforming to column name requirements
- */
-LIB_EXPORT rc_t CC VSchemaRuntimeTableVAddColumn ( VSchemaRuntimeTable *self, 
-    const VTypedecl *td, const char *encoding, const char *name, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcSelf, rcNull );
-    else if ( td == NULL )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcType, rcNull );
-    else if ( name == NULL )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcName, rcNull );
-    else if ( name [ 0 ] == 0 )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcName, rcEmpty );
-    else
-    {
-        char typedecl [ 256 ];
-        rc = VTypedeclToText ( td, self -> schema, typedecl, sizeof typedecl );
-        if ( rc == 0 )
-        {
-            rc = VSchemaRuntimeTablePrint ( self, "    extern column " );
-            if ( rc == 0 )
-            {
-                if ( encoding != NULL && encoding [ 0 ] != 0 )
-                    rc = VSchemaRuntimeTablePrint ( self, "%s ", encoding );
-                else
-                    rc = VSchemaRuntimeTablePrint ( self, "%s ", typedecl );
-            }
-            if ( rc == 0 )
-                rc = VSchemaRuntimeTablePrint ( self, name, args );
-            if ( rc == 0 )
-                rc = VSchemaRuntimeTablePrint ( self, ";\n" );
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VSchemaRuntimeTableAddColumn ( VSchemaRuntimeTable *self, 
-    const VTypedecl *td, const char *encoding, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VSchemaRuntimeTableVAddColumn ( self, td, encoding, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* AddTypedColumn
- *  Gerber versions of AddColumn
- *
- *  AddBooleanColumn - simple boolean column with default compression
- *                     provides both packed ( single bit ) and byte versions
- *  AddIntegerColumn - sized integer column with appropriate sign, size and compression
- *  AddFloatColumn   - sized floating point column with lossy compression
- *  AddAsciiColumn   - 8-bit ASCII text column with standard compression
- *  AddUnicodeColumn - UTF8, UTF16, or UTF32 text column with standard compression
- */
-LIB_EXPORT rc_t CC VSchemaRuntimeTableVAddBooleanColumn ( VSchemaRuntimeTable *self, const char *name, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcSelf, rcNull );
-    else if ( name == NULL )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcName, rcNull );
-    else if ( name [ 0 ] == 0 )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcName, rcEmpty );
-    else
-    {
-        VTypedecl td;
-        rc = VSchemaResolveTypedecl ( self -> schema, & td, "bool" );
-        if ( rc == 0 )
-            rc = VSchemaRuntimeTableVAddColumn ( self, & td, "bool_encoding", name, args );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VSchemaRuntimeTableAddBooleanColumn ( VSchemaRuntimeTable *self, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VSchemaRuntimeTableVAddBooleanColumn ( self, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VSchemaRuntimeTableVAddIntegerColumn ( VSchemaRuntimeTable *self,
-    uint32_t bits, bool has_sign,  const char *name, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcSelf, rcNull );
-    else if ( name == NULL )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcName, rcNull );
-    else if ( name [ 0 ] == 0 )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcName, rcEmpty );
-    else
-    {
-        VTypedecl td;
-
-        char typedecl [ 256 ];
-        int status = snprintf ( typedecl, sizeof typedecl, "%c%u", has_sign ? 'I' : 'U', bits );
-        if ( status < 0 || status >= sizeof typedecl )
-            rc = RC ( rcVDB, rcSchema, rcUpdating, rcBuffer, rcInsufficient );
-        else
-        {
-            rc = VSchemaResolveTypedecl ( self -> schema, & td, "%s", typedecl );
-            if ( rc != 0 && ( ( ( ( bits - 1 ) & bits ) != 0 ) || bits < 8 || bits > 64 ) )
-            {
-                status = snprintf ( typedecl, sizeof typedecl, "%c1 [ %u ]", ( bits < 4 ) ? 'B' : ( has_sign ? 'I' : 'U' ), bits );
-                if ( status < 0 || status >= sizeof typedecl )
-                    rc = RC ( rcVDB, rcSchema, rcUpdating, rcBuffer, rcInsufficient );
-                else
-                    rc = VSchemaResolveTypedecl ( self -> schema, & td, "%s", typedecl );
-            }
-            if ( rc == 0 )
-            {
-                char encoding [ 256 ];
-
-                status = snprintf ( encoding, sizeof encoding, "< %s > izip_encoding", typedecl );
-                if ( status < 0 || status >= sizeof encoding )
-                    rc = RC ( rcVDB, rcSchema, rcUpdating, rcBuffer, rcInsufficient );
-                else
-                    rc = VSchemaRuntimeTableVAddColumn ( self, & td, encoding, name, args );
-            }
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VSchemaRuntimeTableAddIntegerColumn ( VSchemaRuntimeTable *self,
-    uint32_t bits, bool has_sign,  const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VSchemaRuntimeTableVAddIntegerColumn ( self, bits, has_sign, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VSchemaRuntimeTableVAddFloatColumn ( VSchemaRuntimeTable *self,
-    uint32_t bits, uint32_t significant_mantissa_bits,  const char *name, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcSelf, rcNull );
-    else if ( name == NULL )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcName, rcNull );
-    else if ( name [ 0 ] == 0 )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcName, rcEmpty );
-    else
-    {
-        VTypedecl td;
-
-        char typedecl [ 256 ];
-        int status = snprintf ( typedecl, sizeof typedecl, "F%u", bits );
-        if ( status < 0 || status >= sizeof typedecl )
-            rc = RC ( rcVDB, rcSchema, rcUpdating, rcBuffer, rcInsufficient );
-        else
-        {
-            rc = VSchemaResolveTypedecl ( self -> schema, & td, "%s", typedecl );
-            if ( rc == 0 )
-            {
-                char encoding [ 256 ];
-
-                if ( bits != 32 || significant_mantissa_bits >= bits )
-                {
-                    status = snprintf ( encoding, sizeof encoding,
-                        "< %s > zip_encoding", typedecl );
-                }
-                else
-                {
-                    status = snprintf ( encoding, sizeof encoding,
-                        "< %s > fzip_encoding < %u >", typedecl, significant_mantissa_bits );
-                }
-                if ( status < 0 || status >= sizeof encoding )
-                    rc = RC ( rcVDB, rcSchema, rcUpdating, rcBuffer, rcInsufficient );
-                else
-                    rc = VSchemaRuntimeTableVAddColumn ( self, & td, encoding, name, args );
-            }
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VSchemaRuntimeTableAddFloatColumn ( VSchemaRuntimeTable *self,
-    uint32_t bits, uint32_t significant_mantissa_bits,  const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VSchemaRuntimeTableVAddFloatColumn ( self, bits, significant_mantissa_bits, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VSchemaRuntimeTableVAddAsciiColumn ( VSchemaRuntimeTable *self, const char *name, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcSelf, rcNull );
-    else if ( name == NULL )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcName, rcNull );
-    else if ( name [ 0 ] == 0 )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcName, rcEmpty );
-    else
-    {
-        VTypedecl td;
-        rc = VSchemaResolveTypedecl ( self -> schema, & td, "ascii" );
-        if ( rc == 0 )
-            rc = VSchemaRuntimeTableVAddColumn ( self, & td, "< ascii > zip_encoding", name, args );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VSchemaRuntimeTableAddAsciiColumn ( VSchemaRuntimeTable *self, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VSchemaRuntimeTableVAddAsciiColumn ( self, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VSchemaRuntimeTableVAddUnicodeColumn ( VSchemaRuntimeTable *self,
-    uint32_t bits, const char *name, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcSelf, rcNull );
-    else if ( name == NULL )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcName, rcNull );
-    else if ( name [ 0 ] == 0 )
-        rc = RC ( rcVDB, rcSchema, rcUpdating, rcName, rcEmpty );
-    else
-    {
-        VTypedecl td;
-
-        char typedecl [ 256 ];
-        int status = snprintf ( typedecl, sizeof typedecl, "utf%u", bits );
-        if ( status < 0 || status >= sizeof typedecl )
-            rc = RC ( rcVDB, rcSchema, rcUpdating, rcBuffer, rcInsufficient );
-        else
-        {
-            rc = VSchemaResolveTypedecl ( self -> schema, & td, "%s", typedecl );
-            if ( rc == 0 )
-            {
-                char encoding [ 256 ];
-                status = snprintf ( encoding, sizeof encoding,
-                    "< %s > zip_encoding", typedecl );
-                if ( status < 0 || status >= sizeof encoding )
-                    rc = RC ( rcVDB, rcSchema, rcUpdating, rcBuffer, rcInsufficient );
-                else
-                    rc = VSchemaRuntimeTableVAddColumn ( self, & td, encoding, name, args );
-            }
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VSchemaRuntimeTableAddUnicodeColumn ( VSchemaRuntimeTable *self,
-    uint32_t bits, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VSchemaRuntimeTableVAddUnicodeColumn ( self, bits, name, args );
-    va_end ( args );
-
-    return rc;
-}
diff --git a/libs/vdb/split.c b/libs/vdb/split.c
deleted file mode 100644
index 14ebc12..0000000
--- a/libs/vdb/split.c
+++ /dev/null
@@ -1,398 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vdb/extern.h>
-#include "blob.h"
-
-#include "blob-headers.h"
-#include "page-map.h"
-#include "blob-priv.h"
-#include "prod-priv.h"
-#include "xform-priv.h"
-
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-static
-int64_t read_64(const uint8_t **Src, const uint8_t *end, int scale, rc_t *rc) {
-	int64_t x = 0;
-	uint8_t c;
-	const uint8_t *src = *Src;
-	int n = 0;
-	
-	switch (scale) {
-	case 1:
-		scale = 2;
-		break;
-	case 2:
-		scale = 3;
-		break;
-	case 4:
-		scale = 5;
-		break;
-	case 8:
-		scale = 10;
-		break;
-	default:
-		return 0;
-	}
-	*rc = 0;
-	do {
-		if (src >= end) {
-			*rc = RC(rcVDB, rcBlob, rcConstructing, rcData, rcInsufficient);
-			return 0;
-		}
-		if (++n > scale) {
-			*rc = RC(rcVDB, rcBlob, rcConstructing, rcData, rcInvalid);
-			return 0;
-		}
-		
-		c = *src++;
-		if ((c & 0x80) != 0)
-			break;
-		x <<= 7;
-		x |= c;
-	} while (1);
-    
-	c &= 0x7F;
-	if ((c & 0x40) != 0) {
-		c &= 0x3F;
-		x <<= 6;
-		x |= c;
-		x = -x;
-	}
-	else {
-		x <<= 6;
-		x |= c;
-	}
-	*Src = src;
-	return x;
-}
-
-static rc_t VBlobSplit_v1_validate_header(const uint8_t *inp, const uint8_t *in_end, unsigned n, const uint8_t **data) {
-    rc_t rc;
-    unsigned i;
-    
-    for (i = 0; i != n; ++i) {
-        read_64(&inp, in_end, 4, &rc);
-        if (rc != 0)
-            return rc;
-    }
-    *data = inp;
-    return 0;
-}
-
-static rc_t VBlobSplit_v1(VBlob **lhs, const VBlob *self, uint32_t index, uint32_t elem_bits) {
-    const uint8_t *inp;
-    const uint8_t *in_end;
-    const uint8_t *data;
-    size_t insize;
-    rc_t rc;
-    unsigned block_count;
-    unsigned i;
-    
-    inp = self->data.base;
-    assert(self->data.bit_offset == 0);
-    insize = KDataBufferBytes(&self->data);
-    assert(insize > 0);
-    in_end = inp + insize;
-    
-    block_count = (unsigned int)read_64(&inp, in_end, 1, &rc);
-    if (rc != 0)
-        return rc;
-    
-    rc = VBlobSplit_v1_validate_header(inp, in_end, block_count, &data);
-    if (rc != 0)
-        return rc;
-    
-    for (i = 0; i != block_count; ++i) {
-        unsigned block_size = (unsigned int)read_64(&inp, in_end, 4, &rc);
-        uint8_t bits;
-        uint8_t byte_order;
-        uint16_t row_len;
-        int64_t start_id;
-        uint32_t id_span;
-        const char *datatype;
-        
-        if (data >= in_end || data + 1 >= in_end)
-            return RC(rcVDB, rcBlob, rcConstructing, rcData, rcInsufficient);
-        bits = data[0];
-        byte_order = data[1];
-        data += 2;
-        
-        row_len = (uint16_t)read_64(&data, in_end, 2, &rc);
-        if (rc != 0)
-            return rc;
-        
-        start_id = read_64(&data, in_end, 8, &rc);
-        if (rc != 0)
-            return rc;
-        
-        id_span = (uint32_t)read_64(&data, in_end, 4, &rc);
-        if (rc != 0)
-            return rc;
-        
-        if (data + block_size >= in_end)
-            return RC(rcVDB, rcBlob, rcConstructing, rcData, rcInsufficient);
-        
-        datatype = (const char *)data;
-        data = memchr(datatype, 0, block_size);
-        if (data == NULL)
-            return RC(rcVDB, rcBlob, rcConstructing, rcData, rcInvalid);
-        
-        ++data;
-        if (data >= in_end)
-            return RC(rcVDB, rcBlob, rcConstructing, rcData, rcInsufficient);
-        
-        if (i == index) {
-            if (((block_size * 8) - bits) % elem_bits != 0)
-                rc = RC(rcVDB, rcBlob, rcConstructing, rcData, rcInvalid);
-            else {
-                VBlob *y;
-                
-                rc = VBlobNew(&y, start_id, start_id + id_span, "split");
-                if (rc == 0) {
-                    KDataBuffer temp;
-                    
-                    y->byte_order = byte_order;
-                    rc = KDataBufferCast(&self->data, &temp, 8, false);
-                    if (rc == 0) {
-                        KDataBufferSub(&temp, &temp, (uint32_t)( data - (const uint8_t *)self->data.base ), block_size);
-                        KDataBufferCast(&temp, &temp, 1, true);
-                        temp.elem_count -= bits;
-                        rc = KDataBufferCast(&temp, &y->data, elem_bits, false);
-                        KDataBufferWhack(&temp);
-                        if (rc == 0) {
-                            rc = PageMapNewFixedRowLength(&y->pm, BlobRowCount(y), row_len);
-                            if (rc == 0) {
-                                *lhs = y;
-                                return 0;
-                            }
-                        }
-                    }
-                    TRACK_BLOB( VBlobRelease, ((VBlob*)y) );
-                    (void)VBlobRelease(y);
-                }
-            }
-            return rc;
-        }
-        data += block_size;
-    }
-    return RC(rcVDB, rcBlob, rcConstructing, rcParam, rcInvalid);
-}
-
-static rc_t VBlobSplit_v2(VBlob **lhs, const VBlob *self, uint32_t index, uint32_t elem_bits, const VBlobHeader *hdr) {
-    unsigned doffset;
-    unsigned dlength;
-    unsigned num_inputs;
-    unsigned num_maps;
-    unsigned map;
-    unsigned i;
-    int64_t val;
-    rc_t rc;
-    VBlob *y;
-    PageMap *pm;
-    BlobHeaders *headers;
-    
-    rc = VBlobHeaderArgPopHead(hdr, &val);
-    if (rc)
-        return rc;
-    num_inputs = (unsigned)val;
-    
-    if ( (unsigned)index > num_inputs )
-        return RC(rcVDB, rcBlob, rcConstructing, rcParam, rcInvalid);
-    
-    rc = VBlobHeaderArgPopHead(hdr, &val);
-    if (rc)
-        return rc;
-    num_maps = (unsigned)val;
-    
-    for (map = 0, i = 0; i != num_inputs; ++i) {
-        rc = VBlobHeaderArgPopHead(hdr, &val);
-        if (rc)
-            break;
-        if (i == index)
-            map = (unsigned)val;
-    }
-    if (rc)
-        return rc;
-    if (map > num_maps || map < 0)
-        return RC(rcVDB, rcBlob, rcConstructing, rcData, rcInvalid);
-    
-    if (self->spmc == 0) {
-        ((VBlob *)self)->spmc = malloc(sizeof(*self->spmc) - sizeof(self->spmc->pm) + num_maps * sizeof(self->spmc->pm[0]));
-        if (self->spmc) {
-            self->spmc->n = num_maps;
-            for (doffset = i = 0; i != num_maps; ++i) {
-                rc = VBlobHeaderArgPopHead(hdr, &val);
-                if (rc)
-                    break;
-                rc = PageMapDeserialize(&self->spmc->pm[i], &((uint8_t *)self->data.base)[doffset], (uint32_t)val, BlobRowCount(self));
-                if (rc)
-                    break;
-                doffset += (unsigned)val;
-            }
-        }
-        else
-            return RC(rcVDB, rcBlob, rcConstructing, rcMemory, rcExhausted);
-    }
-    else {
-        for (doffset = i = 0; i != num_maps; ++i) {
-            rc = VBlobHeaderArgPopHead(hdr, &val);
-            if (rc)
-                break;
-            doffset += (unsigned)val;
-        }
-    }
-    if (rc)
-        return rc;
-    pm = self->spmc->pm[map];
-    
-    for (i = 0; rc == 0 && i != num_inputs; ++i) {
-        rc = VBlobHeaderArgPopHead(hdr, &val);
-        if ( rc )
-            break;
-        if ( i == index ) {
-            if (val)
-                rc = BlobHeadersCreateFromData(&headers, &((uint8_t *)self->data.base)[doffset], (uint32_t)val);
-            else
-                headers = NULL;
-        }
-        doffset += (unsigned)val;
-    }
-    
-    for (dlength = 0, i = 0; rc == 0 && i != num_inputs; ++i) {
-        rc = VBlobHeaderArgPopHead(hdr, &val);
-        if (rc)
-            break;
-        if (i == index) {
-            dlength = (unsigned)val;
-            break;
-        }
-        doffset += ( ( (unsigned)val + 7 ) >> 3 );
-    }
-    if (rc)
-        return rc;
-    assert(dlength != 0);
-    
-    rc = VBlobNew(&y, self->start_id, self->stop_id, "split");
-    if (rc == 0) {
-        KDataBuffer buffer;
-        
-        rc = KDataBufferCast(&self->data, &buffer, 8, false);
-        if (rc == 0) {
-            KDataBufferSub( &buffer, &buffer, (uint32_t)doffset, (uint32_t)( (dlength + 7) >> 3 ) );
-            KDataBufferCast(&buffer, &buffer, 1, true);
-            buffer.elem_count = (uint32_t)dlength;
-            rc = KDataBufferCast(&buffer, &y->data, elem_bits, false);
-            KDataBufferWhack(&buffer);
-            if (rc == 0) {
-                y->pm = pm;
-                PageMapAddRef(y->pm);
-                y->headers = (BlobHeaders *)headers;
-                
-                *lhs = y;
-                return 0;
-            }
-        }
-        TRACK_BLOB( VBlobRelease, ((VBlob*)y) );
-        (void)VBlobRelease(y);
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VBlobBufferSplit(VBlob **lhs, const VBlob *self, uint32_t index, uint32_t elem_bits) {
-    rc_t rc;
-    
-    if (self->headers) {
-        const VBlobHeader *hdr = BlobHeadersGetHeader(self->headers);
-		
-        if (hdr) {
-            switch (VBlobHeaderVersion(hdr)) {
-            case 1:
-                rc = VBlobSplit_v2(lhs, self, index, elem_bits, hdr);
-                break;
-            default:
-                rc = RC(rcVDB, rcBlob, rcConstructing, rcData, rcBadVersion);
-                break;
-            }
-            VBlobHeaderRelease(hdr);
-            return rc;
-        }
-        return RC(rcVDB, rcBlob, rcConstructing, rcMemory, rcExhausted);
-    }
-    else {
-        return VBlobSplit_v1(lhs, self, index, elem_bits);
-    }
-}
-
-typedef struct self_t {
-    uint32_t index;
-} self_t;
-
-/* split
- *  any split #1.0 < U32 idx > ( merged_fmt in );
- *  any NCBI:split #1.0 < U32 idx > ( merged_t in );
- */
-static
-rc_t CC split_impl( void *self,
-                const VXformInfo *info,
-                int64_t row_id,
-                VBlob **rslt,
-                uint32_t argc,
-                const VBlob *argv[] )
-{
-    return VBlobBufferSplit(rslt, argv[0], ((const self_t *)self)->index, VTypedescSizeof(&info->prod->desc));
-}
-
-static
-void CC vfunc_free ( void * self )
-{
-    free ( self );
-}
-
-VTRANSFACT_BUILTIN_IMPL(vdb_split, 1, 0, 0) (const void *self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->self = malloc(sizeof(self_t));
-    if (rslt->self) {
-        ((self_t *)rslt->self)->index = cp->argv[0].data.u32[0];
-        rslt->whack = vfunc_free;
-        rslt->variant = vftBlobN;
-        VFUNCDESC_INTERNAL_FUNCS(rslt)->bfN = split_impl;
-        return 0;
-    }
-    return RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-}
diff --git a/libs/vdb/table-cmn.c b/libs/vdb/table-cmn.c
deleted file mode 100644
index 721354a..0000000
--- a/libs/vdb/table-cmn.c
+++ /dev/null
@@ -1,1401 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define TRACK_REFERENCES 0
-
-#define KONST const
-#include "table-priv.h"
-#include "cursor-priv.h"
-#include "database-priv.h"
-#include "dbmgr-priv.h"
-#undef KONST
-
-#include "schema-priv.h"
-#include "schema-dump.h"
-#include "linker-priv.h"
-
-#include <vdb/vdb-priv.h>
-#include <vdb/cursor.h>
-#include <kdb/manager.h>
-#include <kdb/database.h>
-#include <kdb/table.h>
-#include <kdb/index.h>
-#include <kdb/column.h>
-#include <kdb/meta.h>
-#include <kdb/namelist.h>
-#include <kdb/kdb-priv.h>
-#include <klib/symbol.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * VTable
- *  a collection of columns indexed by row id, metadata, indices
- */
-
-/* Whack
- */
-rc_t VTableWhack ( VTable *self )
-{
-    KRefcountWhack ( & self -> refcount, "VTable" );
-
-    BSTreeWhack ( & self -> read_col_cache, VColumnRefWhack, NULL );
-    BSTreeWhack ( & self -> write_col_cache, VColumnRefWhack, NULL );
-    VTableRelease(self -> cache_tbl);
-
-    KMDataNodeRelease ( self -> col_node );
-    KMetadataRelease ( self -> meta );
-    KTableRelease ( self -> ktbl );
-    VSchemaRelease ( self -> schema );
-    VLinkerRelease ( self -> linker );
-    VDatabaseSever ( self -> db );
-    VDBManagerSever ( self -> mgr );
-
-    free ( self );
-    return 0;
-}
-
-
-/* AddRef
- */
-LIB_EXPORT rc_t CC VTableAddRef ( const VTable *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "VTable" ) )
-        {
-        case krefLimit:
-            return RC ( rcVDB, rcTable, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VTableRelease ( const VTable *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "VTable" ) )
-        {
-        case krefWhack:
-            return VTableWhack ( ( VTable* ) self );
-        case krefNegative:
-            return RC ( rcVDB, rcTable, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-/* Attach
- * Sever
- *  internal
- */
-VTable *VTableAttach ( const VTable *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAddDep ( & self -> refcount, "VTable" ) )
-        {
-        case krefLimit:
-            return NULL;
-        }
-    }
-    return ( VTable* ) self;
-}
-
-rc_t VTableSever ( const VTable *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDropDep ( & self -> refcount, "VTable" ) )
-        {
-        case krefWhack:
-            return VTableWhack ( ( VTable* ) self );
-        case krefNegative:
-            return RC ( rcVDB, rcTable, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-
-/* Make - PRIVATE
- */
-rc_t VTableMake ( VTable **tblp,
-    const VDBManager *mgr, const VDatabase *db, const VSchema *schema )
-{
-    rc_t rc;
-
-    /* create a structure */
-    VTable *tbl = calloc ( sizeof * tbl, 1 );
-    if ( tbl == NULL )
-        rc = RC ( rcVDB, rcTable, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        /* since the object has been zeroed, Whack will work properly */
-        rc = VSchemaMake ( ( VSchema** ) & tbl -> schema, schema );
-        if ( rc == 0 )
-        {
-            tbl -> mgr = VDBManagerAttach ( mgr );
-            tbl -> db = VDatabaseAttach ( db );
-
-            BSTreeInit ( & tbl -> read_col_cache );
-            BSTreeInit ( & tbl -> write_col_cache );
-
-            KRefcountInit ( & tbl -> refcount, 1, "VTable", "make", "vtbl" );
-
-            tbl -> cmode = ( uint8_t ) kcmOpen;
-            tbl -> checksum = ( uint8_t ) kcsNone;
-
-            rc = VLinkerMake ( & tbl -> linker, mgr -> linker, mgr -> linker -> dl );
-            if ( rc == 0 )
-            {
-                * tblp = tbl;
-                return 0;
-            }
-        }
-
-        VTableWhack ( tbl );
-    }
-
-    * tblp = NULL;
-
-    return rc;
-}
-
-
-/* OpenRead
- *  finish initialization on open for read
- */
-static
-rc_t VTableOpenRead ( VTable *self )
-{
-    /* open metadata */
-    rc_t rc = KTableOpenMetadataRead ( self -> ktbl, & self -> meta );
-    if ( rc == 0 )
-    {
-        /* open "col" node, if present */
-        rc = KMetadataOpenNodeRead ( self -> meta, & self -> col_node, "col" );
-        if ( rc == 0 || GetRCState ( rc ) == rcNotFound )
-        {
-            /* fetch stored schema */
-            rc = VTableLoadSchema ( self );
-            if ( rc == 0 && self -> stbl == NULL )
-                rc = RC ( rcVDB, rcTable, rcOpening, rcSchema, rcNotFound );
-        }
-    }
-
-    DBGMSG(DBG_VDB, DBG_FLAG(DBG_VDB_VDB), ("VTableOpenRead = %d\n", rc));
-
-    return rc;
-}
-
-
-/* OpenTableRead
- * VOpenTableRead
- *  open a table for read
- *
- *  "tbl" [ OUT ] - return parameter for newly opened table
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to table
- */
-LIB_EXPORT rc_t CC VDBManagerVOpenTableRead ( const VDBManager *self,
-    const VTable **tblp, const VSchema *schema,
-    const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( tblp == NULL )
-        rc = RC ( rcVDB, rcMgr, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcMgr, rcOpening, rcSelf, rcNull );
-        else
-        {
-            VTable *tbl;
-
-            /* if no schema is given, always pass intrinsic */
-            if ( schema == NULL )
-                schema = self -> schema;
-
-            rc = VTableMake ( & tbl, self, NULL, schema );
-            if ( rc == 0 )
-            {
-                tbl -> read_only = true;
-                rc = KDBManagerVOpenTableRead ( self -> kmgr, & tbl -> ktbl, path, args );
-                if ( rc == 0 )
-                {
-                    tbl -> blob_validation = KTableHasRemoteData ( tbl -> ktbl );
-                    rc = VTableOpenRead ( tbl );
-                    if ( rc == 0 )
-                    {
-#if LAZY_OPEN_COL_NODE
-                        KMDataNodeRelease ( tbl -> col_node );
-                        tbl -> col_node = NULL;
-#endif
-                        * tblp = tbl;
-                        return 0;
-                    }
-                }
-                VTableWhack ( tbl );
-            }
-        }
-
-        * tblp = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDBManagerOpenTableRead ( const VDBManager *self, const VTable **tbl,
-    const VSchema *schema, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = VDBManagerVOpenTableRead ( self, tbl, schema, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseVOpenTableRead ( const VDatabase *self,
-    const VTable **tblp, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( tblp == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcOpening, rcSelf, rcNull );
-        else
-        {
-            VTable *tbl;
-            rc = VTableMake ( & tbl, self -> mgr, self, self -> schema );
-            if ( rc == 0 )
-            {
-                tbl -> read_only = true;
-
-                rc = KDatabaseVOpenTableRead ( self -> kdb, & tbl -> ktbl, path, args );
-                if ( rc == 0 )
-                {
-                    tbl -> blob_validation = KTableHasRemoteData ( tbl -> ktbl );
-                    rc = VTableOpenRead ( tbl );
-                    if ( rc == 0 )
-                    {
-                        * tblp = tbl;
-                        return 0;
-                    }
-                }
-
-                VTableWhack ( tbl );
-            }
-        }
-
-        * tblp = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseOpenTableRead ( const VDatabase *self,
-    const VTable **tbl, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = VDatabaseVOpenTableRead ( self, tbl, path, args );
-    va_end ( args );
-    
-    if ( rc == 0 && self->cache_db != NULL )
-    {
-        rc_t rc2;
-        const VTable *ctbl;
-
-        va_start ( args, path );
-        rc2 = VDatabaseVOpenTableRead ( self->cache_db, &ctbl, path, args );
-        va_end ( args );
-        
-        DBGMSG( DBG_VDB, DBG_FLAG( DBG_VDB_VDB ), ( "VDatabaseOpenTableRead(vdbcache) = %d\n", rc2 ) );
-        if ( rc2 == 0 )
-        {
-            ( ( VTable* ) ( *tbl ) ) -> cache_tbl = ctbl;
-        }
-    }
-    return rc;
-}
-
-
-/* Locked
- *  returns true if locked
- */
-LIB_EXPORT bool CC VTableLocked ( const VTable *self )
-{
-    if ( self != NULL )
-        return KTableLocked ( self -> ktbl );
-    return false;
-}
-
-
-/* Writable
- *  returns 0 if object is writable
- *  or a reason why if not
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC VTableVWritable ( const VTable *self, uint32_t type, const char * name, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcTable, rcAccessing, rcSelf, rcNull );
-    else
-        rc = KTableVWritable ( self -> ktbl, type, name, args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableWritable ( const VTable *self, uint32_t type, const char * name, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, name );
-
-    rc = VTableVWritable ( self, type, name, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* OpenMetadataRead
- *  opens metadata file
- *
- *  "meta" [ OUT ] - return parameter for metadata
- */
-LIB_EXPORT rc_t CC VTableOpenMetadataRead ( const VTable *self, struct KMetadata const **meta )
-{
-    rc_t rc;
-
-    if ( meta == NULL )
-        rc = RC ( rcVDB, rcTable, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcOpening, rcSelf, rcNull );
-        else
-        {
-            * meta = self -> meta;
-            return KMetadataAddRef ( self -> meta );
-        }
-
-        * meta = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenIndexRead
- * VOpenIndexRead
- *  open an index for read
- *
- *  "idx" [ OUT ] - return parameter for newly opened index
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
- */
-LIB_EXPORT rc_t CC VTableVOpenIndexRead ( const VTable *self,
-    struct KIndex const **idx, const char *name, va_list args )
-{
-    rc_t rc;
-    KIdxType type;
-    uint32_t version;
-    const KMDataNode *node;
-
-    if ( self == NULL )
-    {
-        if ( idx == NULL )
-            return RC ( rcVDB, rcTable, rcOpening, rcParam, rcNull );
-        * idx = NULL;
-        return RC ( rcVDB, rcTable, rcOpening, rcSelf, rcNull );
-    }
-
-    /* open the requested index */
-    rc = KTableVOpenIndexRead ( self -> ktbl, idx, name, args );
-    if ( rc != 0 )
-        return rc;
-
-    /* get version and type */
-    rc = KIndexVersion ( * idx, & version );
-    if ( rc == 0 )
-        rc = KIndexType ( * idx, & type );
-    if ( rc != 0 )
-        return 0;
-
-    /* look for versions 2 or 3, type kitText or kitText with projection */
-    switch ( version )
-    {
-    case 2:
-    case 3:
-        switch ( type )
-        {
-        case kitText:
-        case kitText | kitProj:
-            break;
-        default:
-            return 0;
-        }
-        break;
-    default:
-        return 0;
-    }
-
-    /* look for a node in metadata for repairing maximum id */
-    rc = KMetadataOpenNodeRead ( self -> meta, & node, "/.seq/spot" );
-    if ( rc == 0 )
-    {
-        int64_t maxid;
-        rc = KMDataNodeReadAsI64 ( node, & maxid );
-        if ( rc == 0 )
-            KIndexSetMaxRowId ( * idx, maxid );
-        KMDataNodeRelease ( node );
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VTableOpenIndexRead ( const VTable *self,
-    struct KIndex const **idx, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VTableVOpenIndexRead ( self, idx, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* ListColumns
- *  list readable column names
- *
- *  "names" [ OUT ] - return parameter for namelist
- *
- *  availability: v2.1
- */
-static
-rc_t list_readable_columns ( const VTable *cself )
-{
-    VTable *self = ( VTable* ) cself;
-
-    VCursor *curs;
-    rc_t rc = VTableCreateCursorReadInternal ( self, ( const VCursor** ) & curs );
-    if (  rc == 0 )
-    {
-        /* let this private VCursor-function list the columns */
-        rc = VCursorListReadableColumns ( curs, & self -> read_col_cache );
-        VCursorRelease ( curs );
-        if ( rc == 0 )
-            self -> read_col_cache_valid = true;
-    }
-
-    return rc;
-}
-
-rc_t make_column_namelist ( const BSTree *columns, KNamelist **names )
-{
-    VNamelist *list;
-    rc_t rc = VNamelistMake ( & list, 8 );
-    if ( rc == 0 )
-    {
-        const String *last = NULL;
-        const VColumnRef *cref = ( const VColumnRef* )
-            BSTreeFirst ( columns );
-        while ( cref != NULL )
-        {
-            if ( last == NULL || ! StringEqual ( last, & cref -> name ) )
-            {
-                rc = VNamelistAppend ( list, cref -> name . addr );
-                if ( rc != 0 )
-                    break;
-
-                last = & cref -> name;
-            }
-
-            cref = ( const VColumnRef* )
-                BSTNodeNext ( & cref -> n );
-        }
-
-        if ( rc == 0 )
-            rc = VNamelistToNamelist ( list, names );
-
-        VNamelistRelease ( list );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableListReadableColumns ( const VTable *self, KNamelist **names )
-{
-    rc_t rc;
-
-    if ( names == NULL )
-        rc = RC ( rcVDB, rcTable, rcListing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcListing, rcSelf, rcNull );
-        else
-        {
-            if ( ! self -> read_col_cache_valid )
-                rc = list_readable_columns ( self );
-
-            if ( self -> read_col_cache_valid )
-                return make_column_namelist ( & self -> read_col_cache, names );
-        }
-
-        * names = NULL;
-    }
-    return rc;
-}
-
-/* v2.0 interface
- */
-LIB_EXPORT rc_t CC VTableListCol ( const VTable *cself, KNamelist **names )
-{
-    return VTableListReadableColumns ( cself, names );
-}
-
-
-
-/* ListPhysColumns
- *  avail: 2.4
- */
-LIB_EXPORT rc_t CC VTableListPhysColumns ( const VTable *self, KNamelist **names )
-{
-    rc_t rc;
-
-    if ( names == NULL )
-        rc = RC ( rcVDB, rcTable, rcListing, rcParam, rcNull );
-    else
-    {
-        * names = NULL;
-
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcListing, rcSelf, rcNull );
-        else
-        {
-            KNamelist *kcol_names;
-            rc = KTableListCol ( self -> ktbl, & kcol_names );
-            if ( rc == 0 )
-            {
-                uint32_t kcol_count;
-                rc = KNamelistCount ( kcol_names, & kcol_count );
-                if ( rc == 0 )
-                {
-                    uint32_t scol_count = 0;
-                    KNamelist *scol_names = NULL;
-                    const KMDataNode *col_node = self -> col_node;
-
-#if LAZY_OPEN_COL_NODE
-                    if ( col_node == NULL )
-                    {
-                        rc = KMetadataOpenNodeRead ( self -> meta, & ( ( VTable* ) self ) -> col_node, "col" );
-                        if ( rc == 0 || GetRCState ( rc ) != rcNotFound )
-                            col_node = self -> col_node;
-                    }
-#endif
-                    if ( col_node != NULL )
-                    {
-                        rc = KMDataNodeListChildren ( col_node, & scol_names );
-                        if ( rc == 0 )
-                            rc = KNamelistCount ( scol_names, & scol_count );
-                    }
-
-                    if ( rc == 0 )
-                    {
-                        VNamelist *vnames;
-                        rc = VNamelistMake ( & vnames, kcol_count + scol_count );
-                        if ( rc == 0 )
-                        {
-                            uint32_t i;
-                            const char *name;
-
-                            for ( i = 0; i < kcol_count && rc == 0; ++ i )
-                            {
-                                rc = KNamelistGet ( kcol_names, i, & name );
-                                if ( rc == 0 )
-                                    rc = VNamelistAppend ( vnames, name );
-                            }
-
-                            for ( i = 0; i < scol_count && rc == 0; ++ i )
-                            {
-                                rc = KNamelistGet ( scol_names, i, & name );
-                                if ( rc == 0 )
-                                    rc = VNamelistAppend ( vnames, name );
-                            }
-
-                            if ( rc == 0 )
-                            {
-                                rc = VNamelistToNamelist ( vnames, names );
-                                if ( rc == 0 )
-                                    VNamelistReorder ( vnames, false );
-                            }
-                        }
-
-                        VNamelistRelease ( vnames );
-                    }
-
-                    KNamelistRelease ( scol_names );
-                }
-
-                KNamelistRelease ( kcol_names );
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-/* ListDatatypes
- *  returns list of typedecls for named column
- *
- *  "col" [ IN ] - column name
- *
- *  "dflt_idx" [ OUT, NULL OKAY ] - returns the zero-based index
- *  into "typedecls" of the default datatype for the named column
- *
- *  "typedecls" [ OUT ] - list of datatypes available for named column
- *
- *  availability: v2.1
- */
-
-rc_t make_column_typelist ( const BSTree *columns,
-    const char *col, uint32_t *dflt_idx, KNamelist **typedecls )
-{
-    VNamelist *list;
-    rc_t rc = VNamelistMake ( & list, 8 );
-    if ( rc == 0 )
-    {
-        uint32_t idx;
-        const VColumnRef *first;
-
-        String col_name;
-        StringInitCString ( & col_name, col );
-
-        first = ( const VColumnRef* )
-            BSTreeFind ( columns, & col_name, VColumnRefCmpString );
-        if ( first != NULL )
-        {
-            const VColumnRef *cref = ( const VColumnRef* ) BSTNodePrev ( & first -> n );
-            while ( cref != NULL && StringEqual ( & first -> name, & cref -> name ) )
-            {
-                first = cref;
-                cref = ( const VColumnRef* ) BSTNodePrev ( & cref -> n );
-            }
-
-            for ( cref = first, idx = 0; ; ++ idx )
-            {
-                rc = VNamelistAppend ( list, cref -> typedecl );
-                if ( rc != 0 )
-                    break;
-
-                if ( cref -> dflt )
-                    * dflt_idx = idx;
-
-                cref = ( const VColumnRef* ) BSTNodeNext ( & cref -> n );
-                if ( cref == NULL || ! StringEqual ( & first -> name, & cref -> name ) )
-                    break;
-            }
-        }
-
-        if ( rc == 0 )
-            rc = VNamelistToNamelist ( list, typedecls );
-
-        VNamelistRelease ( list );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableListReadableDatatypes ( const VTable *self,
-    const char *col, uint32_t *dflt_idx, KNamelist **typedecls )
-{
-    rc_t rc;
-
-    uint32_t dummy;
-    if ( dflt_idx == NULL )
-        dflt_idx = & dummy;
-
-    * dflt_idx = 0;
-
-    if ( typedecls == NULL )
-        rc = RC ( rcVDB, rcTable, rcListing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcListing, rcSelf, rcNull );
-        else if ( col == NULL )
-            rc = RC ( rcVDB, rcTable, rcListing, rcName, rcNull );
-        else if ( col [ 0 ] == 0 )
-            rc = RC ( rcVDB, rcTable, rcListing, rcName, rcEmpty );
-        else
-        {
-            if ( ! self -> read_col_cache_valid )
-                rc = list_readable_columns ( self );
-
-            if ( self -> read_col_cache_valid )
-                return make_column_typelist ( & self -> read_col_cache, col, dflt_idx, typedecls );
-        }
-
-        * typedecls = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableColumnDatatypes( const VTable *cself, const char *col,
-    uint32_t *dflt_idx, KNamelist **typedecls )
-{
-    return VTableListReadableDatatypes ( cself, col, dflt_idx, typedecls );
-}
-
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC VTableOpenManagerRead ( const VTable *self, const VDBManager **mgr )
-{
-    rc_t rc;
-
-    if ( mgr == NULL )
-        rc = RC ( rcVDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = VDBManagerAddRef ( self -> mgr );
-            if ( rc == 0 )
-            {
-                * mgr = self -> mgr;
-                return 0;
-            }
-        }
-
-        * mgr = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenParent
- *  duplicate reference to parent database
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC VTableOpenParentRead ( const VTable *self, const VDatabase **db )
-{
-    rc_t rc;
-
-    if ( db == NULL )
-        rc = RC ( rcVDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = VDatabaseAddRef ( self -> db );
-            if ( rc == 0 )
-            {
-                * db = self -> db;
-                return 0;
-            }
-        }
-
-        * db = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenSchema
- *  duplicate reference to table schema
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC VTableOpenSchema ( const VTable *self, const VSchema **schema )
-{
-    rc_t rc;
-
-    if ( schema == NULL )
-        rc = RC ( rcVDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = VSchemaAddRef ( self -> schema );
-            if ( rc == 0 )
-            {
-                * schema = self -> schema;
-                return 0;
-            }
-        }
-
-        * schema = NULL;
-    }
-
-    return rc;
-}
-
-
-/* GetUserData
- * SetUserData
- *  store/retrieve an opaque pointer to user data
- */
-LIB_EXPORT rc_t CC VTableGetUserData ( const VTable *self, void **data )
-{
-    rc_t rc;
-
-    if ( data == NULL )
-        rc = RC ( rcVDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * data = self -> user;
-            return 0;
-        }
-
-        * data = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableSetUserData ( const VTable *cself,
-    void *data, void ( CC * destroy ) ( void *data ) )
-{
-    VTable *self = ( VTable* ) cself;
-    if ( cself == NULL )
-        return RC ( rcVDB, rcTable, rcUpdating, rcSelf, rcNull );
-
-    self -> user = data;
-    self -> user_whack = destroy;
-
-    return 0;
-}
-
-
-/* GetKTable
- *  returns a new reference to underlying KTable
- */
-LIB_EXPORT rc_t CC VTableGetKTableRead ( const VTable *self, const KTable **ktbl )
-{
-    rc_t rc;
-
-    if ( ktbl == NULL )
-        rc = RC ( rcVDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * ktbl = self -> ktbl;
-            return KTableAddRef ( * ktbl );
-        }
-
-        * ktbl = NULL;
-    }
-
-    return rc;
-}
-
-
-
-/* Typespec
- *  retrieve table typespec
- *
- *  AVAILABILITY: version 2.1
- *
- *  "ts_buff" [ IN ] and "ts_size" [ IN ] - buffer for return of NUL-terminated
- *  table typespec, e.g. 'NCBI:tbl:abc#1.1'
- */
-#define USE_SDUMPER 0
-
-#if USE_SDUMPER
-typedef struct flush_tblspec_pb flush_tblspec_pb;
-struct flush_tblspec_pb
-{
-    char *buff;
-    size_t size;
-    size_t bytes;
-};
-
-static
-rc_t CC flush_tbl_typespec ( void *data, const void *buffer, size_t size )
-{
-    flush_tblspec_pb *pb = data;
-    if ( pb -> bytes + size >= pb -> size )
-        return RC ( rcVDB, rcTable, rcAccessing, rcBuffer, rcInsufficient );
-    memcpy ( & pb -> buff [ pb -> bytes ], buffer, size );
-    pb -> bytes += size;
-    pb -> buff [ pb -> bytes ] = 0;
-    return 0;
-}
-#endif
-
-LIB_EXPORT rc_t CC VTableTypespec ( const VTable *self, char *ts_buff, size_t ts_size )
-{
-    rc_t rc = 0;
-
-    if ( ts_size == 0 )
-        rc = RC ( rcVDB, rcTable, rcAccessing, rcBuffer, rcInsufficient );
-    else if ( ts_buff == NULL )
-        rc = RC ( rcVDB, rcTable, rcAccessing, rcBuffer, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc_t rc2;
-#if USE_SDUMPER
-            SDumper dumper;
-            flush_tblspec_pb pb;
-
-            /* initialize pb */
-            pb . buff = ts_buff;
-            pb . size = ts_size;
-            pb . bytes = 0;
-
-            /* initialize dumper for extracting name */
-            SDumperInit ( & dumper, self -> schema, sdmCompact, flush_tbl_typespec, & pb );
-
-            /* dump only the table name */
-            assert ( self -> stbl != NULL );
-            rc = SDumperPrint ( & dumper, "%N%V", self -> stbl -> name, self -> stbl -> version );
-
-            /* done */
-            rc2 = SDumperWhack ( & dumper );
-            if ( rc == 0 )
-            {
-                if ( rc2 == 0 )
-                    return 0;
-
-                rc = rc2;
-            }
-#else
-            rc2 = string_printf ( ts_buff, ts_size, NULL, "%N#%V", self -> stbl -> name, self -> stbl -> version );
-            if ( rc2 == 0 )
-                return 0;
-#endif
-        }
-
-        ts_buff [ 0 ] = 0;
-    }
-
-    return rc;
-}
-
-
-/* HasStaticColumn - PRIVATE
- *  given a physical column name, report whether it exists
- *  and is ( currently ) static
- *  avail: 2.5
- */
-LIB_EXPORT bool CC VTableHasStaticColumn ( const VTable *self, const char *name )
-{
-    if ( self != NULL && name != NULL && name [ 0 ] != 0 )
-    {
-        /* a full check of this might include testing that the column
-           can be opened for read or write, but the API is purposely
-           vague on what this means.
-
-           currently the meaning of this ( PRIVATE ) API is whether
-           there is a metadata column entry with this name - period. */
-        const KMDataNode *node;
-        rc_t rc = KMetadataOpenNodeRead ( self -> meta, & node, "/col/%s", name );
-        if ( rc == 0 )
-        {
-            KMDataNodeRelease ( node );
-            return true;
-        }
-    }
-
-    return false;
-}
-LIB_EXPORT bool CC VTableVHasStaticColumn ( const VTable *self, const char *name, va_list args )
-{
-    char full[4096];
-    if ( name == NULL )
-        full [ 0 ] = 0;
-    else
-    {
-        int len;
-
-        /* generate full name */
-        if ( args == NULL )
-            len = snprintf ( full, sizeof full, "%s", name );
-        else
-            len = vsnprintf ( full, sizeof full, name, args );
-        if ( len < 0 || len >= sizeof full )
-        {
-            rc_t rc = RC ( rcVDB, rcColumn, rcOpening, rcName, rcExcessive );
-            LOGERR ( klogInt, rc, "failed to format column name" );
-            return false;
-        }
-    }
-    return VTableHasStaticColumn( self, full );
-}
-
-
-/*--------------------------------------------------------------------------
- * VColumnRef
- *  cache entry
- */
-
-/* Whack
- */
-void CC VColumnRefWhack ( BSTNode *n, void *ignore )
-{
-    free ( n );
-}
-
-
-/* Make
- *  make a column ref from an SColumn*
- */
-rc_t VColumnRefMake ( VColumnRef **rp, const VSchema *schema, const SColumn *scol )
-{
-    char text [ 256 ];
-    rc_t rc = VTypedeclToText ( & scol -> td, schema, text, sizeof text );
-    if ( rc == 0 )
-    {
-        size_t tdsize = strlen ( text );
-        const String *name = & scol -> name -> name;
-        VColumnRef *cref = malloc ( sizeof * cref + name -> size + tdsize );
-        if ( cref == NULL )
-            rc = RC ( rcVDB, rcTable, rcListing, rcMemory, rcExhausted );
-        else
-        {
-            strcpy ( cref -> typedecl, text );
-            string_copy ( & cref -> typedecl [ tdsize + 1 ], name -> size + 1, name -> addr, name -> size );
-            StringInit ( & cref -> name, & cref -> typedecl [ tdsize + 1 ], name -> size, name -> len );
-            cref -> td = scol -> td;
-            cref -> cid = scol -> cid;
-            cref -> dflt = scol -> dflt;
-
-            * rp = cref;
-        }
-    }
-
-    return rc;
-}
-
-
-/* CmpString
- *  compares by name only
- *  "item" is a const String*
- */
-int64_t CC VColumnRefCmpString ( const void *item, const BSTNode *n )
-{
-    const VColumnRef *cref = ( const VColumnRef* ) n;
-    return StringCompare ( item, & cref -> name );
-}
-
-/* Sort
- *  compares by ( name, type ) pair
- */
-int64_t CC VColumnRefSort ( const BSTNode *item, const BSTNode *n )
-{
-    const VColumnRef *a = ( const VColumnRef* ) item;
-    const VColumnRef *b = ( const VColumnRef* ) n;
-
-    /* sorted first by name - case sensitive ASCII alphabetically */
-    int64_t diff = StringCompare ( & a -> name, & b -> name );
-    if ( diff != 0 )
-        return diff;
-
-    /* sort by cid */
-    return VCtxIdCmp ( & a -> cid, & b -> cid );
-}
-
-#if 0 /* more for later */
-static
-rc_t create_cursor_all_readable_columns(const VTable *self,
-                                        unsigned *ncol, uint32_t **idx,
-                                        const VCursor **curs)
-{
-    KNamelist *list;
-    rc_t rc = VTableListReadableColumns(self, &list);
-    
-    if (rc == 0) {
-        rc = VTableCreateCursorReadInternal(self, curs);
-        if (rc == 0) {
-            uint32_t n;
-            
-            rc = KNamelistCount(list, ncol);
-            if (rc == 0) {
-                n = *ncol;
-                *idx = malloc(n * sizeof(**idx));
-                if (idx) {
-                    unsigned i;
-                    
-                    for (i = 0; i != (unsigned)n; ++i) {
-                        const char *name;
-                        
-                        rc = KNamelistGet(list, i, &name);
-                        if (rc)
-                            break;
-                        rc = VCursorAddColumn(*curs, &(*idx)[i], "%s", name);
-                        if (rc)
-                            break;
-                    }
-                    if (rc)
-                        free(*idx);
-                }
-                else
-                    rc = RC(rcVDB, rcTable, rcValidating, rcMemory, rcExhausted);
-            }
-            if (rc)
-                VCursorRelease(*curs);
-        }
-        KNamelistRelease(list);
-    }
-    if (rc) {
-        *idx = NULL;
-        *curs = NULL;
-        *ncol = 0;
-    }
-    return rc;
-}
-
-static
-rc_t fetch_all_rows(const VCursor *curs, unsigned ncol, const uint32_t cid[/* ncol */])
-{
-    int64_t start;
-    int64_t stop;
-    int64_t row;
-    unsigned i;
-    rc_t rc;
-    
-    for (i = 0; i != ncol; ++i) {
-        int64_t cstart;
-        uint64_t ccount;
-        
-        rc = VCursorIdRange(curs, cid[i], &cstart, &ccount);
-        if (rc)
-            return rc;
-        if (i == 0) {
-            start = cstart;
-            stop = cstart + ccount;
-        }
-        else {
-            if (start > cstart)
-                start = cstart;
-            if (stop < cstart + ccount)
-                stop = cstart + ccount;
-        }
-    }
-    for (row = start; row != stop; ++row) {
-        for (i = 0; i != ncol; ++i) {
-            uint32_t elem_bits;
-            const void *base;
-            uint32_t offset;
-            uint32_t length;
-            
-            rc = VCursorCellDataDirect(curs, row, cid[i], &elem_bits,
-                                       &base, &offset, &length);
-            if (rc)
-                return rc;
-        }
-    }
-    return 0;
-}
-
-VDB_EXTERN
-rc_t CC VTableConsistencyCheck(const VTable *self, int level)
-{
-    uint32_t *cid;
-    unsigned ncol;
-    const VCursor *curs;
-    rc_t rc = create_cursor_all_readable_columns(self, &ncol, &cid, &curs);
-    
-    if (rc)
-        return rc;
-    rc = fetch_all_rows(curs, ncol, cid);
-    free(cid);
-    VCursorRelease(curs);
-    return rc;
-}
-#endif
-
-
-static bool VTableStaticEmpty( const struct VTable *self )
-{
-    bool res = true;
-    KNamelist * col_names;
-    rc_t rc = KMDataNodeListChildren ( self->col_node, &col_names );
-    if ( rc == 0 )
-    {
-        uint32_t count;
-        rc = KNamelistCount ( col_names, &count );
-        if ( rc == 0 && count > 0 )
-        {
-            uint32_t idx;
-            for ( idx = 0; rc == 0 && res && idx < count; ++idx )
-            {
-                const char * col_name;
-                rc = KNamelistGet ( col_names, idx, &col_name );
-                if ( rc == 0 )
-                {
-                    const KMDataNode * this_col;
-                    rc = KMDataNodeOpenNodeRead ( self->col_node, &this_col, "%s/row_count", col_name );
-                    if ( rc == 0 )
-                    {
-                        uint64_t this_row_count;
-                        rc = KMDataNodeReadAsU64( this_col, &this_row_count );
-                        if ( rc == 0 )
-                        {
-                            if ( this_row_count > 0 )
-                                res = false; /* this will terminate the for-loop and leads to return( false ) */
-                        }
-						else
-						{
-							rc = 0;
-						}
-                        KMDataNodeRelease ( this_col );                    
-                    }
-                }
-            }
-        }
-        KNamelistRelease( col_names );
-    }
-    return res;
-}
-
-
-static bool VTablePhysicalEmpty( const struct VTable *self )
-{
-    bool res = true;
-    KNamelist * col_names;
-    rc_t rc = KTableListCol ( self -> ktbl, &col_names );
-    if ( rc == 0 )
-    {
-        uint32_t count;
-        rc = KNamelistCount ( col_names, &count );
-        if ( rc == 0 && count > 0 )
-        {
-            uint32_t idx;
-            for ( idx = 0; rc == 0 && res && idx < count; ++idx )
-            {
-                const char * col_name;
-                rc = KNamelistGet ( col_names, idx, &col_name );
-                if ( rc == 0 )
-                {
-                    const KColumn * col;
-                    rc = KTableOpenColumnRead ( self -> ktbl, &col, "%s", col_name );
-                    if ( rc == 0 )
-                    {
-                        int64_t id_first;
-                        uint64_t id_count;
-                        rc = KColumnIdRange ( col, &id_first, &id_count );
-                        if ( rc == 0 )
-                        {
-                            if ( id_count > 0 )
-                                res = false; /* this will terminate the for-loop and leads to return( false ) */
-                        }
-                        KColumnRelease ( col );
-                    }
-                }
-            }
-        }
-        KNamelistRelease( col_names );
-    }
-    return res;
-}
-
-
-/* IsEmpty
- * first tries to find out if there are static columns, that are not empty
- * send it checks if the KTable is empty
- */
-LIB_EXPORT rc_t CC VTableIsEmpty ( const struct VTable *self, bool * empty )
-{
-    rc_t rc;
-    
-    if ( empty == NULL )
-        rc = RC ( rcVDB, rcTable, rcListing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcListing, rcSelf, rcNull );
-        else
-        {
-			bool static_empty = VTableStaticEmpty( self );
-			bool phys_empty = VTablePhysicalEmpty( self );
-            *empty = ( static_empty && phys_empty );
-            return 0;
-        }
-        * empty = false;
-    }
-    return rc;
-}
diff --git a/libs/vdb/table-load.c b/libs/vdb/table-load.c
deleted file mode 100644
index 4a9b63d..0000000
--- a/libs/vdb/table-load.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define KONST const
-#define SKONST
-
-#include "dbmgr-priv.h"
-#include "table-priv.h"
-#include "schema-priv.h"
-#include "schema-parse.h"
-#include "linker-priv.h"
-
-#undef KONST
-#undef SKONST
-
-#include <vdb/table.h>
-#include <vdb/vdb-priv.h>
-#include <kdb/meta.h>
-#include <kdb/namelist.h>
-#include <kfs/dyload.h>
-#include <klib/namelist.h>
-#include <klib/token.h>
-#include <klib/rc.h>
-#include <os-native.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-/* LoadSchema
- *  looks in metadata for stored schema
- *  or searches available definitions for match
- */
-typedef struct VTableFindData VTableFindData;
-struct VTableFindData
-{
-    VLinker *linker;
-    struct KDlset *libs;
-    const VTable *vtbl;
-    const STable *stbl;
-};
-
-static
-bool CC VTableTestUntyped ( void *item, void *data )
-{
-    VTableFindData *pb = data;
-    const STable *stbl = ( const void* ) item;
-
-    if ( stbl -> untyped != NULL )
-    {
-        /* get the function pointer */
-        VUntypedTableTest test = NULL;
-        rc_t rc = VLinkerFindUntyped ( pb -> linker, pb -> libs,
-            & test, stbl -> untyped );
-        if ( rc == 0 )
-        {
-            /* ask if it recognizes the table */
-            if ( ( * test ) ( pb -> vtbl -> ktbl, pb -> vtbl -> meta ) )
-            {
-                pb -> stbl = stbl;
-                return true;
-            }
-        }
-    }
-     
-    return false;
-}
-
-static
-bool VSchemaFindUntyped ( const VSchema *self, VTableFindData *pb )
-{
-    if ( self -> dad )
-    {
-        if ( VSchemaFindUntyped ( self -> dad, pb ) )
-            return true;
-    }
-    
-    return VectorDoUntil ( & self -> tbl, false, VTableTestUntyped, pb );
-}
-
-static
-rc_t VTableFindType ( VTable *self )
-{
-    rc_t rc;
-    VTableFindData pb;
-    
-    pb . linker = self -> linker;
-    
-    rc = VLinkerOpen ( pb . linker, & pb . libs );
-    if ( rc == 0 )
-    {
-        pb . vtbl = self;
-        pb . stbl = NULL;
-        
-        /* search schema */
-        VSchemaFindUntyped ( self -> schema, & pb );
-        
-        /* record stbl */
-        self -> stbl = pb . stbl;
-        KDlsetRelease ( pb . libs );
-    }
-    return rc;
-}
-
-static
-rc_t VTableLoadSchemaNode ( VTable *self, const KMDataNode *node )
-{
-    rc_t rc;
-    
-    /* the node is probably within our 4K buffer,
-     but by using the callback mechanism we don't
-     have buffer or allocation issues. */
-    KMDataNodeSchemaFillData pb;
-    pb . node = node;
-    pb . pos = 0;
-    pb . add_v0 = false;
-    
-    /* add in schema text. it is not mandatory, but it is
-     the design of the system to store object schema with
-     the object so that it is capable of standing alone */
-    rc = VSchemaParseTextCallback ( self -> schema,
-        "VTableLoadSchema", KMDataNodeFillSchema, & pb );
-    if ( rc == 0 )
-    {
-        /* determine table type */
-        rc = KMDataNodeReadAttr ( node, "name",
-            pb . buff, sizeof pb . buff, & pb . pos );
-        if ( rc == 0 )
-        {
-            uint32_t type;
-            const SNameOverload *name;
-            
-            /* find the stbl if possible */
-            self -> stbl = VSchemaFind ( self -> schema,
-                & name, & type, pb . buff, "VTableLoadSchema", false );
-            
-            /* the schema must be found in this case */
-            if ( self -> stbl == NULL || type != eTable )
-            {
-                self -> stbl = NULL;
-                rc = RC ( rcVDB, rcTable, rcLoading, rcSchema, rcCorrupt );
-                PLOGERR ( klogInt, ( klogInt, rc, "failed to establish table type from '$(expr)'",
-                                     "expr=%s", pb . buff ));
-            }
-        }
-    }
-    return rc;
-}
-
-rc_t VTableLoadSchema ( VTable *self )
-{
-    /* try to get schema text */
-    const KMDataNode *node;
-    rc_t rc = KMetadataOpenNodeRead ( self -> meta, & node, "schema" );
-    if ( rc == 0 )
-    {
-        rc = VTableLoadSchemaNode ( self, node );
-        KMDataNodeRelease ( node );
-    }
-    else if ( GetRCState ( rc ) == rcNotFound )
-    {
-        /* this is an older version. search schema
-         for a table having an untyped function */
-        rc = VTableFindType ( self );
-    }
-
-    return rc;
-}
-
-/* ExtendSchema
- *  discover all existing physical and static columns
- *  that are not represented in the table schema
- *  and add them in ( if possible )
- */
-static
-rc_t VTablePopulateStrayKColumn ( const VTable *self, const char *name )
-{
-    /* TBD - not returning error because the result of doing
-       nothing is simply to leave these columns inaccessible  */
-
-    /* open KColumn */
-    /* open KMetadata */
-    /* process v1 */
-    /* process v2 */
-    /* need to discover a datatype and schema information */
-    return 0;
-}
-
-static
-rc_t VTablePopulateStrayStatic ( const VTable *self,
-    const char *name, const KMDataNode *node )
-{
-    /* TBD - not returning error because the result of doing
-       nothing is simply to leave these columns inaccessible  */
-
-    /* need to discover a datatype */
-    return 0;
-}
-
-static
-bool VTableNameAvail ( const KSymTable *tbl, const char *name )
-{
-    String str;
-
-    /* build a physical name from simple name */
-    char pname [ 256 ];
-    int len = snprintf ( pname, sizeof pname, ".%s", name );
-    if ( len < 0 || len >= sizeof pname )
-        return false;
-
-    /* test for defined physical name */
-    StringInit ( & str, pname, len, len );
-    if ( KSymTableFind ( tbl, & str ) != NULL )
-        return false;
-
-    /* test for defined simple name */
-    StringSubstr ( & str, & str, 1, 0 );
-    if ( KSymTableFind ( tbl, & str ) != NULL )
-        return false;
-
-    /* name is available */
-    return true;
-}
-
-LIB_EXPORT rc_t CC VTableExtendSchema ( const VTable *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcTable, rcUpdating, rcSelf, rcNull );
-    else
-    {
-        /* create symbol table for STable */
-        KSymTable tbl;
-        rc = init_tbl_symtab ( & tbl, self -> schema, self -> stbl );
-        if ( rc == 0 )
-        {
-            KNamelist *names;
-            const char *name;
-            uint32_t i, count;
-
-            /* list all physical tables from KTable */
-            rc = KTableListCol ( self -> ktbl, & names );
-            if ( rc != 0 )
-                rc = 0;
-            else
-            {
-                rc = KNamelistCount ( names, & count );
-                for ( i = 0; rc == 0 && i < count; ++ i )
-                {
-                    /* if there are any stray columns, add them in */
-                    rc = KNamelistGet ( names, i, & name );
-                    if ( rc == 0 && VTableNameAvail ( & tbl, name ) )
-                        rc = VTablePopulateStrayKColumn ( self, name );
-                }
-
-                KNamelistRelease ( names );
-            }
-
-            if ( rc == 0 )
-            {
-                /* access table's static columns */
-                const KMDataNode *cols = self -> col_node;
-                if ( cols != NULL )
-                {
-                    /* list all columns */
-                    rc = KMDataNodeListChild ( cols, & names );
-                    if (rc == 0) {
-                        rc = KNamelistCount ( names, & count );
-                        for ( i = 0; rc == 0 && i < count; ++ i )
-                        {
-                            rc = KNamelistGet ( names, i, & name );
-                            if ( rc == 0 && VTableNameAvail ( & tbl, name ) )
-                            {
-                                const KMDataNode *node;
-                                rc = KMDataNodeOpenNodeRead ( cols, & node, "%s", name );
-                                if ( rc == 0 )
-                                {
-                                    /* add in static column */
-                                    rc = VTablePopulateStrayStatic ( self, name, node );
-                                    KMDataNodeRelease ( node );
-                                }
-                            }
-                        }
-                        KNamelistRelease ( names );
-                    }
-                }
-            }
-        }
-
-        KSymTableWhack ( & tbl );
-    }
-
-    return rc;
-}
diff --git a/libs/vdb/table-priv.h b/libs/vdb/table-priv.h
deleted file mode 100644
index fae609c..0000000
--- a/libs/vdb/table-priv.h
+++ /dev/null
@@ -1,238 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_table_priv_
-#define _h_table_priv_
-
-#ifndef _h_vdb_table_
-#include <vdb/table.h>
-#endif
-
-#ifndef _h_schema_priv_
-#include "schema-priv.h"
-#endif
-
-#ifndef _h_vdb_schema_
-#include <vdb/schema.h>
-#endif
-
-#ifndef _h_klib_container_
-#include <klib/container.h>
-#endif
-
-#ifndef _h_klib_vector_
-#include <klib/vector.h>
-#endif
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifndef KONST
-#define KONST
-#endif
-
-#ifndef SKONST
-#define SKONST const
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define LAZY_OPEN_COL_NODE 0
-
-
-/*--------------------------------------------------------------------------
- * forwards
- */
-struct KTable;
-struct STable;
-struct SColumn;
-struct VLinker;
-struct VDatabase;
-struct KMetadata;
-struct VDBManager;
-
-
-/*--------------------------------------------------------------------------
- * VTable
- *  represents a table
- *  normally implemented as a directory
- *  but may be a single archive file
- *  in either executable or streamable format
- */
-struct VTable
-{
-    /* creating manager */
-    struct VDBManager KONST *mgr;
-
-    /* enclosing database - NULL OKAY */
-    struct VDatabase KONST *db;
-
-    /* schema and table description
-       a new schema is created to house schema
-       obtained from existing table/column metadata */
-    VSchema SKONST *schema;
-    struct STable const *stbl;
-
-    /* intrinsic functions */
-    struct VLinker *linker;
-
-    /* underlying physical layer table */
-    struct KTable KONST *ktbl;
-
-    /* open table metadata */
-    struct KMetadata KONST *meta;
-
-    /* "col" subnode of metadata */
-    struct KMDataNode KONST *col_node;
-
-    /* caches of readable and writable columns */
-    BSTree read_col_cache;
-    BSTree write_col_cache;
-
-    /* user data */
-    void *user;
-    void ( CC * user_whack ) ( void *data );
-
-    /* page size for creating columns */
-    size_t pgsize;
-
-    /* open references */
-    KRefcount refcount;
-
-    /* create and checksum modes for columns */
-    uint8_t cmode;
-    uint8_t checksum;
-
-    /* open mode */
-    bool read_only;
-
-    /* cache validity */
-    bool read_col_cache_valid;
-    bool write_col_cache_valid;
-
-    /* should we perform blob validation on a file */
-    bool blob_validation;
-
-   /* cache table for cached virtual columns if any */
-    const VTable *cache_tbl;
-};
-
-
-/* Whack
- */
-rc_t VTableWhack ( VTable *self );
-
-
-/* Attach
- * Sever
- *  internal reference management
- */
-VTable *VTableAttach ( const VTable *self );
-rc_t VTableSever ( const VTable *self );
-
-
-/* Make
- *  creates an initialized table object
- *  expects either a mgr or a parent db,
- *  creates a modifiable schema
- */
-rc_t VTableMake ( VTable **tblp,
-    struct VDBManager const *mgr,
-    struct VDatabase const *db,
-    const VSchema *schema );
-
-
-/* LoadSchema
- *  looks in metadata for stored schema
- *  or searches available definitions for match
- */
-rc_t VTableLoadSchema ( VTable *self );
-
-/* StoreSchema
- *  stores schema definition in metadata
- */
-VDB_EXTERN rc_t VTableStoreSchema ( VTable *self );
-
-/* support for listing
- */
-rc_t make_column_namelist ( const BSTree *columns, struct KNamelist **names );
-rc_t make_column_typelist ( const BSTree *columns, const char *col,
-    uint32_t *dflt_idx, struct KNamelist **typedecls );
-
-
-/*--------------------------------------------------------------------------
- * VColumnRef
- *  cache entry
- */
-typedef struct VColumnRef VColumnRef;
-struct VColumnRef
-{
-    BSTNode n;
-    String name;
-    VTypedecl td;
-    VCtxId cid;
-    bool dflt;
-    char typedecl [ 2 ];
-};
-
-
-/* Whack
- *  for dropping a BSTree
- */
-void CC VColumnRefWhack ( BSTNode *n, void *ignore );
-
-
-/* Make
- *  make a column ref from an SColumn*
- */
-rc_t VColumnRefMake ( VColumnRef **cref,
-    const VSchema *schema, struct SColumn const *scol );
-
-
-/* CmpString
- *  compares by name only
- *  "item" is a const String*
- */
-int64_t CC VColumnRefCmpString ( const void *item, const BSTNode *n );
-
-/* Sort
- *  compares by (name,type) pair
- */
-int64_t CC VColumnRefSort ( const BSTNode *item, const BSTNode *n );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_table_priv_ */
diff --git a/libs/vdb/table.c b/libs/vdb/table.c
deleted file mode 100644
index ed2d71d..0000000
--- a/libs/vdb/table.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define KONST const
-#include "table-priv.h"
-#undef KONST
-
-#include <klib/namelist.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-/* List
- *  (moved from table-cmn.c to here, because needs access to VCursor...)
- *  create a namelist of all usable columns :
- *  columns, that can be added to a cursor - and the following cursor-open will not fail
- */
-LIB_EXPORT rc_t CC VTableListWritableColumns ( struct VTable *self, KNamelist **names )
-{
-    rc_t rc;
-
-    if ( names == NULL )
-        rc = RC ( rcVDB, rcTable, rcListing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcListing, rcSelf, rcNull );
-        else
-        {
-            VNamelist *list;
-            rc = VNamelistMake ( & list, 0 );
-            if ( rc == 0 )
-            {
-                rc = VNamelistToNamelist ( list, names );
-                VNamelistRelease ( list );
-                return rc;
-            }
-        }
-
-        * names = NULL;
-    }
-    return rc;
-}
-
-
-/* ListDatatypes
- *  returns list of typedecls for named column
- *
- *  "col" [ IN ] - column name
- *
- *  "typedecls" [ OUT ] - list of datatypes available for named column
- *
- *  availability: v2.1
- */
-LIB_EXPORT rc_t CC VTableListWritableDatatypes ( struct VTable *self,
-    const char *col, KNamelist **typedecls )
-{
-    rc_t rc;
-    
-    if ( typedecls == NULL )
-        rc = RC ( rcVDB, rcTable, rcListing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcListing, rcSelf, rcNull );
-        else if ( col == NULL )
-            rc = RC ( rcVDB, rcSchema, rcListing, rcName, rcNull );
-        else if ( col [ 0 ] == 0 )
-            rc = RC ( rcVDB, rcSchema, rcListing, rcName, rcEmpty );
-        else
-        {
-            /* make eventually returned */
-            VNamelist *vlist;
-            rc = VNamelistMake ( &vlist, 0 );
-            if ( rc == 0 )
-            {
-                rc = VNamelistToNamelist ( vlist, typedecls );
-                VNamelistRelease ( vlist );
-                return rc;
-            }
-        }
-
-        * typedecls = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/vdb/transpose.c b/libs/vdb/transpose.c
deleted file mode 100644
index 3b585ab..0000000
--- a/libs/vdb/transpose.c
+++ /dev/null
@@ -1,720 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include <vdb/xform.h>
-#include <klib/rc.h>
-
-#include "xform-priv.h"
-#include "blob-priv.h"
-#include "blob.h"
-#include "page-map.h"
-
-#include <assert.h>
-
-
-/* Create
- *
- * Create a new blob.  A new data buffer is sized to
- * 'element_count' * sizeof datatype; its contents are
- * uninitialized.
- */
-static
-rc_t VBlobCreate ( VBlob **blobp, const VBlob *in )
-{
-    rc_t rc = VBlobNew ( blobp, in -> start_id, in -> stop_id, "transpose" );
-    if ( rc == 0 )
-    {
-        VBlob *blob = * blobp;
-        rc = KDataBufferMake ( & blob -> data,
-            in -> data . elem_bits, in -> data . elem_count );
-        if ( rc != 0 )
-        {
-            VBlobRelease ( blob );
-            * blobp = NULL;
-        }
-        else
-        {
-            blob -> byte_order = in -> byte_order;
-        }
-    }
-    return rc;
-}
-
-
-/* detranspose
- *  pardoning the awful name, apply a transposition on the result
- *  of "transpose" to produce the original blob. "transpose"
- *  itself cannot be reused because of its signature.
- *
- *  see "transpose" below for an explanation
- */
-static
-rc_t CC transpose_formatted8 ( void *self, const VXformInfo *info, int64_t row_id,
-    VBlob **rslt, uint32_t argc, const VBlob *argv [] )
-{
-    /* input blob - schema assures us that it is ready to go */
-    const VBlob *in = argv [ 0 ];
-
-    /* allocate output blob of same size */
-    rc_t rc = VBlobCreate ( rslt, in );
-    if ( rc != 0 )
-        rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-    else
-    {
-        VBlob *out = * rslt;
-
-        /* page-map iterator */
-        PageMapIterator it;
-        rc = PageMapNewIterator ( in -> pm, & it, 0, -1 );
-
-        /* create a new reference to the page map */
-        if ( rc == 0 )
-            rc = PageMapAddRef ( in -> pm );
-
-        /* last chance for failure */
-        if ( rc != 0 )
-        {
-            rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-            VBlobRelease ( out );
-            * rslt = NULL;
-        }
-        else
-        {
-            uint32_t j, k;
-            elem_count_t i, max_row_len, row_len, rpt_cnt;
-
-            /* get source and destination pointers */
-            uint8_t *dst = out -> data . base;
-            const uint8_t *src = in -> data . base;
-
-            /* set page-map on out */
-            out -> pm = in -> pm;
-
-            /* perform the transformation
-               the first pass will determine maximum row length */
-            for ( max_row_len = 0, j = k = 0; ;  k += row_len )
-            {
-                row_len = PageMapIteratorDataLength ( & it );
-                if ( row_len > max_row_len )
-                    max_row_len = row_len;
-
-                if ( row_len != 0 )
-                {
-                    dst [ k ] = src [ j ];
-                    ++ j;
-                }
-
-                rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                    break;
-            }
-
-            /* perform transformation on the remainder */
-            for ( i = 1; i < max_row_len; ++ i )
-            {
-                it . cur_row = 0;
-                for ( k = i; ; k += row_len )
-                {
-                    row_len = PageMapIteratorDataLength ( & it );
-                    if ( row_len > i )
-                    {
-                        dst [ k ] = src [ j ];
-                        ++ j;
-                    }
-
-                    rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                    if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                        break;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t CC transpose_formatted16 ( void *self, const VXformInfo *info, int64_t row_id,
-    VBlob **rslt, uint32_t argc, const VBlob *argv [] )
-{
-    const VBlob *in = argv [ 0 ];
-    rc_t rc = VBlobCreate ( rslt, in );
-    if ( rc != 0 )
-        rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-    else
-    {
-        VBlob *out = * rslt;
-        PageMapIterator it;
-        rc = PageMapNewIterator ( in -> pm, & it, 0, -1 );
-        if ( rc == 0 )
-            rc = PageMapAddRef ( in -> pm );
-        if ( rc != 0 )
-        {
-            rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-            VBlobRelease ( out );
-            * rslt = NULL;
-        }
-        else
-        {
-            uint32_t j, k;
-            elem_count_t i, max_row_len, row_len, rpt_cnt;
-            uint16_t *dst = out -> data . base;
-            const uint16_t *src = in -> data . base;
-            out -> pm = in -> pm;
-            for ( max_row_len = 0, j = k = 0; ;  k += row_len )
-            {
-                row_len = PageMapIteratorDataLength ( & it );
-                if ( row_len > max_row_len )
-                    max_row_len = row_len;
-                if ( row_len != 0 )
-                {
-                    dst [ k ] = src [ j ];
-                    ++ j;
-                }
-                rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                    break;
-            }
-            for ( i = 1; i < max_row_len; ++ i )
-            {
-                it . cur_row = 0;
-                for ( k = i; ; k += row_len )
-                {
-                    row_len = PageMapIteratorDataLength ( & it );
-                    if ( row_len > i )
-                    {
-                        dst [ k ] = src [ j ];
-                        ++ j;
-                    }
-                    rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                    if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                        break;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t CC transpose_formatted32 ( void *self, const VXformInfo *info, int64_t row_id,
-    VBlob **rslt, uint32_t argc, const VBlob *argv [] )
-{
-    const VBlob *in = argv [ 0 ];
-    rc_t rc = VBlobCreate ( rslt, in );
-    if ( rc != 0 )
-        rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-    else
-    {
-        VBlob *out = * rslt;
-        PageMapIterator it;
-        rc = PageMapNewIterator ( in -> pm, & it, 0, -1 );
-        if ( rc == 0 )
-            rc = PageMapAddRef ( in -> pm );
-        if ( rc != 0 )
-        {
-            rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-            VBlobRelease ( out );
-            * rslt = NULL;
-        }
-        else
-        {
-            uint32_t j, k;
-            elem_count_t i, max_row_len, row_len, rpt_cnt;
-            uint32_t *dst = out -> data . base;
-            const uint32_t *src = in -> data . base;
-            out -> pm = in -> pm;
-            for ( max_row_len = 0, j = k = 0; ;  k += row_len )
-            {
-                row_len = PageMapIteratorDataLength ( & it );
-                if ( row_len > max_row_len )
-                    max_row_len = row_len;
-                if ( row_len != 0 )
-                {
-                    dst [ k ] = src [ j ];
-                    ++ j;
-                }
-                rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                    break;
-            }
-            for ( i = 1; i < max_row_len; ++ i )
-            {
-                it . cur_row = 0;
-                for ( k = i; ; k += row_len )
-                {
-                    row_len = PageMapIteratorDataLength ( & it );
-                    if ( row_len > i )
-                    {
-                        dst [ k ] = src [ j ];
-                        ++ j;
-                    }
-                    rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                    if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                        break;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t CC transpose_formatted64 ( void *self, const VXformInfo *info, int64_t row_id,
-    VBlob **rslt, uint32_t argc, const VBlob *argv [] )
-{
-    const VBlob *in = argv [ 0 ];
-    rc_t rc = VBlobCreate ( rslt, in );
-    if ( rc != 0 )
-        rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-    else
-    {
-        VBlob *out = * rslt;
-        PageMapIterator it;
-        rc = PageMapNewIterator ( in -> pm, & it, 0, -1 );
-        if ( rc == 0 )
-            rc = PageMapAddRef ( in -> pm );
-        if ( rc != 0 )
-        {
-            rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-            VBlobRelease ( out );
-            * rslt = NULL;
-        }
-        else
-        {
-            uint32_t j, k;
-            elem_count_t i, max_row_len, row_len, rpt_cnt;
-            uint64_t *dst = out -> data . base;
-            const uint64_t *src = in -> data . base;
-            out -> pm = in -> pm;
-            for ( max_row_len = 0, j = k = 0; ;  k += row_len )
-            {
-                row_len = PageMapIteratorDataLength ( & it );
-                if ( row_len > max_row_len )
-                    max_row_len = row_len;
-                if ( row_len != 0 )
-                {
-                    dst [ k ] = src [ j ];
-                    ++ j;
-                }
-                rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                    break;
-            }
-            for ( i = 1; i < max_row_len; ++ i )
-            {
-                it . cur_row = 0;
-                for ( k = i; ; k += row_len )
-                {
-                    row_len = PageMapIteratorDataLength ( & it );
-                    if ( row_len > i )
-                    {
-                        dst [ k ] = src [ j ];
-                        ++ j;
-                    }
-                    rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                    if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                        break;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-VTRANSFACT_BUILTIN_IMPL ( vdb_detranspose, 1, 0, 0 )
-    ( const void *self, const VXfactInfo *info, VFuncDesc *rslt,
-      const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    switch ( VTypedescSizeof ( & info -> fdesc . desc ) )
-    {
-    case 8:
-        VFUNCDESC_INTERNAL_FUNCS ( rslt ) -> bfN = transpose_formatted8;
-        break;
-    case 16:
-        VFUNCDESC_INTERNAL_FUNCS ( rslt ) -> bfN = transpose_formatted16;
-        break;
-    case 32:
-        VFUNCDESC_INTERNAL_FUNCS ( rslt ) -> bfN = transpose_formatted32;
-        break;
-    case 64:
-        VFUNCDESC_INTERNAL_FUNCS ( rslt ) -> bfN = transpose_formatted64;
-        break;
-    }
-
-    rslt -> variant = vftBlobN;
-    return 0;
-}
-
-/* transpose
- *  transpose a page of unformatted data
- *
- *  for example - convert a simple page of values,
- *  where vertical scale is row id and horizontal element index:
- *
- *        1   2   3
- *      +---+---+---+
- *    1 | a | b | c |
- *      +---+---+---+
- *    2 | d | e |
- *      +---+---+
- *    3 | f |
- *      +---+---+---+
- *    4 | g | h | i |
- *      +---+---+---+
- *
- *  into:
- *
- *        1   2   3   4
- *      +---+---+---+---+
- *    1 | a | d | f | g |
- *      +---+---+---+---+
- *    2 | b | e |   | h |
- *      +---+---+   +---+
- *    3 | c |       | i |
- *      +---+       +---+
- *
- *  or:
- *
- *      +---+---+---+---+---+---+---+---+---+
- *      | a | d | f | g | b | e | h | c | i |
- *      +---+---+---+---+---+---+---+---+---+
- *
- *  variable row-lengths are supported. The output blob is
- *  formatted, meaning that the result can no longer be addressed
- *  as a matrix, but the transposition has be applied to data.
- *
- *  "in" [ DATA ] - unformatted data to be transposed
- */
-static
-rc_t CC transpose_unformatted8 ( void *self, const VXformInfo *info, int64_t row_id,
-    VBlob **rslt, uint32_t argc, const VBlob *argv [] )
-{
-    /* input blob - schema assures us that it is ready to go */
-    const VBlob *in = argv [ 0 ];
-
-    /* allocate output blob of same size */
-    rc_t rc = VBlobCreate ( rslt, in );
-    if ( rc != 0 )
-        rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-    else
-    {
-        VBlob *out = * rslt;
-
-        /* page-map iterator */
-        PageMapIterator it;
-        rc = PageMapNewIterator ( in -> pm, & it, 0, -1 );
-
-        /* create a new reference to the page map */
-        if ( rc == 0 )
-            rc = PageMapAddRef ( in -> pm );
-
-        /* last chance for failure */
-        if ( rc != 0 )
-        {
-            rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-            VBlobRelease ( out );
-            * rslt = NULL;
-        }
-        else
-        {
-            uint32_t j, k;
-            elem_count_t i, max_row_len, row_len, rpt_cnt;
-
-            /* get source and destination pointers */
-            uint8_t *dst = out -> data . base;
-            const uint8_t *src = in -> data . base;
-
-            /* set page-map on out */
-            out -> pm = in -> pm;
-
-            /* perform the transformation
-               the first pass will determine maximum row length */
-            for ( max_row_len = 0, j = k = 0; ;  k += row_len )
-            {
-                row_len = PageMapIteratorDataLength ( & it );
-                if ( row_len > max_row_len )
-                    max_row_len = row_len;
-
-                if ( row_len != 0 )
-                {
-                    dst [ j ] = src [ k ];
-                    ++ j;
-                }
-
-                rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                    break;
-            }
-
-            /* perform transformation on the remainder */
-            for ( i = 1; i < max_row_len; ++ i )
-            {
-                it . cur_row = 0;
-                for ( k = i; ; k += row_len )
-                {
-                    row_len = PageMapIteratorDataLength ( & it );
-                    if ( row_len > i )
-                    {
-                        dst [ j ] = src [ k ];
-                        ++ j;
-                    }
-
-                    rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                    if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                        break;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t CC transpose_unformatted16 ( void *self, const VXformInfo *info, int64_t row_id,
-    VBlob **rslt, uint32_t argc, const VBlob *argv [] )
-{
-    const VBlob *in = argv [ 0 ];
-    rc_t rc = VBlobCreate ( rslt, in );
-    if ( rc != 0 )
-        rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-    else
-    {
-        VBlob *out = * rslt;
-        PageMapIterator it;
-        rc = PageMapNewIterator ( in -> pm, & it, 0, -1 );
-        if ( rc == 0 )
-            rc = PageMapAddRef ( in -> pm );
-        if ( rc != 0 )
-        {
-            rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-            VBlobRelease ( out );
-            * rslt = NULL;
-        }
-        else
-        {
-            uint32_t j, k;
-            elem_count_t i, max_row_len, row_len, rpt_cnt;
-            uint16_t *dst = out -> data . base;
-            const uint16_t *src = in -> data . base;
-            out -> pm = in -> pm;
-            for ( max_row_len = 0, j = k = 0; ;  k += row_len )
-            {
-                row_len = PageMapIteratorDataLength ( & it );
-                if ( row_len > max_row_len )
-                    max_row_len = row_len;
-                if ( row_len != 0 )
-                {
-                    dst [ j ] = src [ k ];
-                    ++ j;
-                }
-                rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                    break;
-            }
-            for ( i = 1; i < max_row_len; ++ i )
-            {
-                it . cur_row = 0;
-                for ( k = i; ; k += row_len )
-                {
-                    row_len = PageMapIteratorDataLength ( & it );
-                    if ( row_len > i )
-                    {
-                        dst [ j ] = src [ k ];
-                        ++ j;
-                    }
-                    rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                    if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                        break;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t CC transpose_unformatted32 ( void *self, const VXformInfo *info, int64_t row_id,
-    VBlob **rslt, uint32_t argc, const VBlob *argv [] )
-{
-    const VBlob *in = argv [ 0 ];
-    rc_t rc = VBlobCreate ( rslt, in );
-    if ( rc != 0 )
-        rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-    else
-    {
-        VBlob *out = * rslt;
-        PageMapIterator it;
-        rc = PageMapNewIterator ( in -> pm, & it, 0, -1 );
-        if ( rc == 0 )
-            rc = PageMapAddRef ( in -> pm );
-        if ( rc != 0 )
-        {
-            rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-            VBlobRelease ( out );
-            * rslt = NULL;
-        }
-        else
-        {
-            uint32_t j, k;
-            elem_count_t i, max_row_len, row_len, rpt_cnt;
-            uint32_t *dst = out -> data . base;
-            const uint32_t *src = in -> data . base;
-            out -> pm = in -> pm;
-            for ( max_row_len = 0, j = k = 0; ;  k += row_len )
-            {
-                row_len = PageMapIteratorDataLength ( & it );
-                if ( row_len > max_row_len )
-                    max_row_len = row_len;
-                if ( row_len != 0 )
-                {
-                    dst [ j ] = src [ k ];
-                    ++ j;
-                }
-                rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                    break;
-            }
-            for ( i = 1; i < max_row_len; ++ i )
-            {
-                it . cur_row = 0;
-                for ( k = i; ; k += row_len )
-                {
-                    row_len = PageMapIteratorDataLength ( & it );
-                    if ( row_len > i )
-                    {
-                        dst [ j ] = src [ k ];
-                        ++ j;
-                    }
-                    rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                    if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                        break;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t CC transpose_unformatted64 ( void *self, const VXformInfo *info, int64_t row_id,
-    VBlob **rslt, uint32_t argc, const VBlob *argv [] )
-{
-    const VBlob *in = argv [ 0 ];
-    rc_t rc = VBlobCreate ( rslt, in );
-    if ( rc != 0 )
-        rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-    else
-    {
-        VBlob *out = * rslt;
-        PageMapIterator it;
-        rc = PageMapNewIterator ( in -> pm, & it, 0, -1 );
-        if ( rc == 0 )
-            rc = PageMapAddRef ( in -> pm );
-        if ( rc != 0 )
-        {
-            rc = ResetRCContext ( rc, rcVDB, rcFunction, rcExecuting );
-            VBlobRelease ( out );
-            * rslt = NULL;
-        }
-        else
-        {
-            uint32_t j, k;
-            elem_count_t i, max_row_len, row_len, rpt_cnt;
-            uint64_t *dst = out -> data . base;
-            const uint64_t *src = in -> data . base;
-            out -> pm = in -> pm;
-            for ( max_row_len = 0, j = k = 0; ;  k += row_len )
-            {
-                row_len = PageMapIteratorDataLength ( & it );
-                if ( row_len > max_row_len )
-                    max_row_len = row_len;
-                if ( row_len != 0 )
-                {
-                    dst [ j ] = src [ k ];
-                    ++ j;
-                }
-                rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                    break;
-            }
-            for ( i = 1; i < max_row_len; ++ i )
-            {
-                it . cur_row = 0;
-                for ( k = i; ; k += row_len )
-                {
-                    row_len = PageMapIteratorDataLength ( & it );
-                    if ( row_len > i )
-                    {
-                        dst [ j ] = src [ k ];
-                        ++ j;
-                    }
-                    rpt_cnt = PageMapIteratorRepeatCount ( & it );
-                    if ( ! PageMapIteratorAdvance ( & it, rpt_cnt ) )
-                        break;
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-
-VTRANSFACT_BUILTIN_IMPL ( vdb_transpose, 1, 0, 0 )
-    ( const void *self, const VXfactInfo *info, VFuncDesc *rslt,
-      const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    /* the TYPE of input has been validated by schema, but not the dimension */
-    switch ( VTypedescSizeof ( & dp -> argv [ 0 ] . desc ) )
-    {
-    case 8:
-        VFUNCDESC_INTERNAL_FUNCS ( rslt ) -> bfN = transpose_unformatted8;
-        break;
-    case 16:
-        VFUNCDESC_INTERNAL_FUNCS ( rslt ) -> bfN = transpose_unformatted16;
-        break;
-    case 32:
-        VFUNCDESC_INTERNAL_FUNCS ( rslt ) -> bfN = transpose_unformatted32;
-        break;
-    case 64:
-        VFUNCDESC_INTERNAL_FUNCS ( rslt ) -> bfN = transpose_unformatted64;
-        break;
-    default:
-        return RC ( rcVDB, rcFunction, rcConstructing, rcType, rcUnsupported );
-    }
-
-    rslt -> variant = vftBlobN;
-    return 0;
-}
diff --git a/libs/vdb/wcolumn.c b/libs/vdb/wcolumn.c
deleted file mode 100644
index fe0a74c..0000000
--- a/libs/vdb/wcolumn.c
+++ /dev/null
@@ -1,1074 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include "klib/symbol.h"
-#include "column-priv.h"
-#include "dbmgr-priv.h"
-#include "schema-priv.h"
-#include "schema-expr.h"
-#include "schema-parse.h"
-#include "cursor-priv.h"
-#include "prod-priv.h"
-#include "blob-priv.h"
-#include "page-map.h"
-
-#include <vdb/manager.h>
-#include <vdb/cursor.h>
-#include <kdb/column.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-/* these constants MUST each be a power of two */
-#define INITIAL_DATA_PEAK ( 32 * 1024 )
-#define SINGLE_PAGE_SIZE ( 4 * 1024 )
-
-/* this is a fairly high value, useful for writing single tables
-   of data that are generally accessed serially. it's bad for random. */
-#define DFLT_TRIGGER ( 2 * 1024 * 1024 )
-
-/* debugging aid - Row-wise RunLengthEncoding ( repeated column
-   elimination ) can be disabled to check for errors it may introduce. */
-#define USE_RLE 1
-
-/* when defined, use as an additional condition for detecting
-   auto-commit cutoff points, with a limit in kilo-rows given below */
-#define ROW_COUNT_CUTOFFS 128
-
-#if ROW_COUNT_CUTOFFS
-#define MAX_ROW_COUNT ( ROW_COUNT_CUTOFFS * 1024 )
-#else
-#define MAX_ROW_COUNT 0x40000000
-#endif
-
-
-/*--------------------------------------------------------------------------
- * VColumn
- */
-
-static 
-void WColumnDestroy ( WColumn * self )
-{
-#if PROD_REFCOUNT && ! PROD_ALL_IN_CURSOR
-    PROD_TRACK_REFCOUNT ( VProductionRelease, self -> out );
-    VProductionRelease ( self -> out, NULL );
-    PROD_TRACK_REFCOUNT ( VProductionRelease, self -> val );
-    VProductionRelease ( self -> val, NULL );
-#endif
-}
-
-
-/* Whack
- *  perform read-only cleanup
- */
-void CC VColumnWhack ( void *item, void *data )
-{
-    VColumn *self = item;
-    VCursor *curs = data;
-
-    /* remove from cursor */
-    if ( curs != NULL )
-    {
-        VectorSwap ( & curs -> row, self -> ord, NULL, & item );
-        VCursorCacheSwap ( & curs -> col, & self -> scol -> cid, NULL, & item );
-    }
-
-    if ( ! self -> read_only )
-    {
-        WColumn *wself = ( WColumn* ) self;
-
-        if ( wself -> page != NULL )
-        {
-            TRACK_BLOB (VBlobRelease, wself->page);
-            VBlobRelease ( wself -> page );
-        }
-
-        KDataBufferWhack ( & wself -> dflt );
-        KDataBufferWhack ( & wself -> data );
-        KDataBufferWhack ( & wself -> rowmap );
-        WColumnDestroy ( wself );
-
-    }
-
-    VColumnDestroy ( self );
-    free ( self );
-}
-
-
-/* Make - PRIVATE
- *  make a write column
- */
-rc_t WColumnMake ( VColumn **colp, const VSchema *schema, const SColumn *scol,
-    const SExpression *blob_limit, VDBManager *mgr, Vector *cx_bind )
-{
-    rc_t rc;
-    WColumn *col;
-
-    assert ( colp != NULL );
-    assert ( schema != NULL );
-    assert ( scol != NULL );
-    assert ( mgr != NULL );
-
-    col = calloc ( 1, sizeof * col );
-    if ( col == NULL )
-        rc = RC ( rcVDB, rcColumn, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        rc = VColumnInit ( & col -> dad, schema, scol );
-        if ( rc == 0 )
-        {
-            uint32_t i;
-
-            /* initialize peak histories */
-            for ( i = 0; i < sizeof col -> data_peak_hist / sizeof col -> data_peak_hist [ 0 ]; ++ i )
-                col -> data_peak_hist [ i ] = INITIAL_DATA_PEAK;
-
-            /* initial current peak */
-            col -> data_peak = INITIAL_DATA_PEAK;
-
-            /* use column-specific expression if provided */
-            if ( scol -> limit != NULL )
-                blob_limit = scol -> limit;
-
-            /* evaluate blob cutoff limit expression */
-            if ( blob_limit == NULL )
-            {
-#ifdef DFLT_TRIGGER
-                /* use define */
-                col -> trigger = DFLT_TRIGGER;
-#else
-                /* produce max unsigned integer */
-                -- col -> trigger;
-#endif
-            }
-            else
-            {
-                /* evaluate column blob limit */
-                uint64_t trigger;
-                rc = eval_uint64_expr ( schema, blob_limit, & trigger, cx_bind );
-                col -> trigger = ( size_t ) trigger;
-            }
-
-            if ( rc == 0 )
-            {
-                * colp = & col -> dad;
-                return 0;
-            }
-        }
-
-        free ( col );
-    }
-
-    * colp = NULL;
-    return rc;
-}
-
-
-/* IdRange
- *  returns id range for column or page
- */
-rc_t VColumnIdRange ( const VColumn *vcol, int64_t *first, int64_t *last )
-{
-    rc_t rc;
-    const WColumn *self = ( const WColumn* ) vcol;
-
-    assert ( self != NULL );
-    assert ( first != NULL && last != NULL );
-
-    if ( self -> dad . in != NULL )
-        return VColumnIdRangeRead ( & self -> dad, first, last );
-
-    if ( self -> val == NULL )
-        rc = RC ( rcVDB, rcColumn, rcAccessing, rcRange, rcNotOpen );
-    else
-    {
-        /* a little silly, but set max range in 64-bit
-           without complaints from 32-bit compilers */
-        * first = 1;
-        * first <<= 63;
-        * last = ~ * first;
-
-        /* now intersect this range with all physical sources */
-        rc = VProductionColumnIdRange ( self -> val, first, last );
-        if ( rc == 0 )
-            return 0;
-    }
-
-    * first = * last = 0;
-
-    return rc;
-}
-
-/* SetDefault
- *  capture default row data
- */
-rc_t WColumnSetDefault ( VColumn *vcol,
-    bitsz_t elem_bits, const void *buffer, bitsz_t boff, uint64_t len )
-{
-    rc_t rc;
-    bitsz_t elem_size, to_copy;
-    WColumn *self = ( WColumn* ) vcol;
-
-    assert ( elem_bits != 0 );
-    assert ( buffer != NULL || ( boff == 0 && len == 0 ) );
-
-    /* test "compatibility" of elem_bits
-       this is used to interpret "len" */
-    elem_size = VTypedescSizeof ( & self -> dad . desc );
-    if ( elem_bits < elem_size && elem_size % elem_bits != 0 )
-        return RC ( rcVDB, rcColumn, rcUpdating, rcType, rcInconsistent );
-    if ( elem_bits > elem_size && elem_bits % elem_size != 0 )
-        return RC ( rcVDB, rcColumn, rcUpdating, rcType, rcInconsistent );
-
-    /* forget about prior value */
-    KDataBufferWhack ( & self -> dflt );
-    memset ( & self -> dflt, 0, sizeof self -> dflt );
-    self -> have_dflt = false;
-    self -> dflt_last = false;
-
-    /* set the element size */
-    rc = KDataBufferCast ( & self -> dflt, & self -> dflt, elem_bits, false );
-    if ( rc != 0 )
-        return rc;
-        
-    /* allow NULL setting */
-    if ( buffer == NULL )
-    {
-        self -> have_dflt = true;
-        return 0;
-    }
-
-    /* set the length */
-    rc = KDataBufferResize ( & self -> dflt, len );
-    if ( rc != 0 )
-    {
-        assert ( KDataBufferWritable ( & self -> dflt ) );
-        return rc;
-    }
-
-    /* copy in the row */
-    to_copy = len * elem_bits;
-    if ( ( ( boff | to_copy ) & 7 ) != 0 )
-        bitcpy ( self -> dflt . base, 0, buffer, boff, to_copy );
-    else
-        memcpy ( self -> dflt . base, & ( ( const uint8_t* ) buffer ) [ boff >> 3 ], to_copy >> 3 );
-
-    self -> have_dflt = true;
-    return 0;
-}
-
-
-/* OpenRow
- *  update state
- *
- *  "const_row_id" [ IN, CONST ] - id of row being opened. useful
- *  only on initial open when no other rows are buffered.
- */
-void CC WColumnOpenRow ( void *item, void *const_row_id )
-{
-    WColumn *self = item;
-    if ( self != NULL )
-    {
-        int64_t row_id = * ( const int64_t* ) const_row_id;
-
-        assert ( ! self -> row_written );
-        if ( self -> start_id != self -> end_id )
-        {
-            assert ( row_id == self -> end_id );
-        }
-        else
-        {
-            /* capture row id */
-            self -> start_id = self -> end_id = self -> cutoff_id = row_id;
-            assert ( self -> bits_in_buffer == 0 );
-            assert ( self -> row_len == 0 );
-            assert ( self -> num_rows == 0 );
-            assert ( self -> dflt_last == false );
-        }
-    }
-}
-
-
-/* Write
- */
-rc_t WColumnWrite ( VColumn *cself,
-    bitsz_t elem_bits, const void *buffer, bitsz_t boff, uint64_t len )
-{
-    WColumn *self = ( WColumn* ) cself;
-
-    bitsz_t elem_size, num_bits, data_bits, doff;
-
-    assert ( elem_bits != 0 );
-    assert ( buffer != NULL || ( boff == 0 && len == 0 ) );
-
-    /* the number of bits to write */
-    num_bits = ( bitsz_t ) elem_bits * len;
-
-    /* test "compatibility" of elem_bits
-       this is used to interpret "len" */
-    elem_size = VTypedescSizeof ( & self -> dad . desc );
-    if ( elem_bits != elem_size )
-    {
-        if ( elem_bits < elem_size && elem_size % elem_bits != 0 )
-            return RC ( rcVDB, rcColumn, rcUpdating, rcType, rcInconsistent );
-        if ( elem_bits > elem_size && elem_bits % elem_size != 0 )
-            return RC ( rcVDB, rcColumn, rcUpdating, rcType, rcInconsistent );
-        if ( num_bits % elem_size != 0 )
-            return RC ( rcVDB, rcColumn, rcUpdating, rcType, rcInconsistent );
-    }
-
-    /* allow empty row */
-    if ( len == 0 )
-    {
-        self -> row_written = true;
-        self -> dflt_last = false;
-        return 0;
-    }
-
-    /* disallow any further modifications */
-    if ( self -> row_committed )
-        return RC ( rcVDB, rcColumn, rcUpdating, rcColumn, rcBusy );
-
-    /* total number of bits to be put into buffer */
-    doff = self -> bits_in_buffer + self -> row_len;
-    data_bits = doff + num_bits;
-
-    /* see if it fits into buffer */
-    if ( data_bits > KDataBufferBits ( & self -> data ) )
-    {
-        rc_t rc;
-
-        /* calculate needed bytes */
-        size_t new_size = ( ( size_t ) ( ( data_bits + 7 ) >> 3 ) + INITIAL_DATA_PEAK - 1 )
-            & ~ ( size_t ) ( INITIAL_DATA_PEAK - 1 );
-
-        /* need buffer memory */
-        if ( self -> data . elem_count == 0 )
-        {
-            /* always go with the peak size if larger */
-            if ( new_size < self -> data_peak )
-                new_size = self -> data_peak;
-
-            /* make initial buffer at most recent peak */
-            rc = KDataBufferMakeBytes ( & self -> data, new_size );
-            if ( rc != 0 )
-                return rc;
-        }
-        else
-        {
-            /* we have a new peak */
-            rc = KDataBufferResize ( & self -> data, new_size );
-            if ( rc != 0 )
-                return rc;
-        }
-    }
-
-    /* copy in data */
-    if ( ( ( boff | doff | num_bits ) & 7 ) != 0 )
-        bitcpy ( self -> data . base, doff, buffer, boff, num_bits );
-    else
-    {
-        memcpy ( & ( ( uint8_t* ) self -> data . base ) [ doff >> 3 ],
-                 & ( ( const uint8_t* ) buffer ) [ boff >> 3 ], num_bits >> 3 );
-    }
-
-    /* accept changes */
-    self -> row_len += num_bits;
-    self -> row_written = true;
-    self -> dflt_last = false;
-
-    return 0;
-}
-
-/* RowDefaults
- *  if a row has not been written but has a default value,
- *  that value is written to the row. if no default exists,
- *  an error is generated.
- *
- *  "rc" [ OUT, DEFAULT ZERO ] - preset to 0
- *
- *  returns true if any error occurs ( i.e. "*rc != 0" )
- */
-bool CC WColumnRowDefaults ( void *item, void *data )
-{
-    WColumn *self = item;
-    rc_t *rc = data;
-
-    /* nothing to do if row written */
-    if ( self == NULL || self -> row_written )
-        return false;
-
-    /* error if no default value */
-    if ( ! self -> have_dflt )
-    {
-        * rc = RC ( rcVDB, rcColumn, rcClosing, rcRow, rcIncomplete );
-        PLOGERR ( klogErr,
-                  ( klogErr, * rc, "Column: $(col)", "col=%.*s"
-                    , self -> dad . scol -> name -> name . size
-                    , self -> dad . scol -> name -> name . addr )
-            );
-        return true;
-    }
-        
-    /* detect NULL row as default */
-    if ( self -> dflt . elem_bits == 0 )
-    {
-        * rc = RC ( rcVDB, rcColumn, rcClosing, rcRow, rcNull );
-        PLOGERR ( klogWarn,
-                  ( klogWarn, * rc, "Column: $(col)", "col=%.*s"
-                    , self -> dad . scol -> name -> name . size
-                    , self -> dad . scol -> name -> name . addr )
-            );
-        return false;
-    }
-
-    /* if the last column written was default,
-       there is an opportunity for simply incrementing the repeat count */
-    if ( USE_RLE && self -> dflt_last )
-    {
-        WColumnRowMap *rm = self -> rowmap . base;
-        assert ( self -> num_rows != 0 );
-        ++ rm [ self -> num_rows - 1 ] . cnt;
-        return false;
-    }
-
-    /* write default data */
-    * rc = WColumnWrite ( & self -> dad, self -> dflt . elem_bits,
-        self -> dflt . base, 0, self -> dflt . elem_count );
-    if ( * rc != 0 )
-        return true;
-    
-    /* record the fact that this was default */
-    self -> dflt_last = true;
-    return false;
-}
-
-/* CommitRow
- *  closes the row to further writes and accepts
- *  all data written so far as complete. if the accumulated
- *  page data trigger a flush, the flush parameter is set.
- *
- *  "end_id" [ IN/OUT ] - used to calculate the minimum
- *  end_id for pages. if the column decides that it has too
- *  much data in its buffer and wants a cutoff < current
- *  value, it can lower the id.
- *
- *  returns true if there was a memory error.
- */
-static
-bool WColumnCommitRepeatedRow ( WColumn *self, WColumnRowMap *rm, int64_t end_id )
-{
-    /* if we've previously declared a cutoff id,
-       incorporate the repeated row into the range */
-    if ( ( self -> cutoff_id != self -> start_id ) && ( self -> cutoff_id + 1 == end_id ) )
-        self -> cutoff_id = end_id;
-
-    /* just account for the repeated row */
-    ++ rm -> cnt;
-
-    /* drop data */
-    self -> row_len = 0;
-
-    /* the row has been successfully committed */
-    self -> row_committed = true;
-
-    /* no error */
-    return false;
-}
-
-static
-bool WColumnCommitRowData ( WColumn *self, int64_t *end_id )
-{
-    size_t cur_size;
-    uint64_t row_len;
-    bitsz_t elem_bits;
-    WColumnRowMap *rm;
-
-    /* if no data were written and that's okay, ignore */
-    if ( ! self -> row_written )
-    {
-        assert ( self -> row_len == 0 );
-        self -> row_committed = true;
-        return false;
-    }
-
-    /* column's element size */
-    elem_bits = VTypedescSizeof ( & self -> dad . desc );
-    assert ( self -> row_len % elem_bits == 0 );
-    row_len = self -> row_len / elem_bits;
-
-    /* detect repeated row */
-    if ( USE_RLE && self -> num_rows != 0 )
-    {
-        rm = self -> rowmap . base;
-        rm += self -> num_rows - 1;
-
-        if ( rm -> len == row_len && rm->cnt <= INT32_MAX)
-        {
-            bitsz_t poff, coff;
-            const uint8_t *base;
-
-            if ( row_len == 0 )
-                return WColumnCommitRepeatedRow ( self, rm, * end_id );
-
-            base = ( const void* ) self -> data . base;
-            assert ( self -> bits_in_buffer >= self -> row_len );
-            coff = self -> bits_in_buffer;
-            poff = self -> bits_in_buffer - self -> row_len;
-
-            if ( ( ( poff | coff | self -> row_len ) & 7 ) != 0 )
-            {
-                if ( bitcmp ( base, poff, base, coff, self -> row_len ) == 0 )
-                    return WColumnCommitRepeatedRow ( self, rm, * end_id );
-            }
-            else
-            {
-                if ( memcmp ( & base [ poff >> 3 ], & base [ coff >> 3 ], self -> row_len >> 3 ) == 0 )
-                    return WColumnCommitRepeatedRow ( self, rm, * end_id );
-            }
-        }
-    }
-
-    /* need to add a new row */
-    if ( ( uint64_t ) self -> num_rows == self -> rowmap . elem_count )
-    {
-        /* need more memory */
-        rc_t rc;
-        self -> rowmap . elem_bits = sizeof * rm * 8;
-        rc = KDataBufferResize ( & self -> rowmap, self -> rowmap . elem_count + 16 * 1024 );
-        if ( rc != 0 )
-        {
-            PLOGERR ( klogErr,
-                      ( klogErr, rc, "Column: $(col) failed to resize row map", "col=%.*s"
-                        , self -> dad . scol -> name -> name . size
-                        , self -> dad . scol -> name -> name . addr )
-                );
-            return true;
-        }
-    }
-
-    rm = self -> rowmap . base;
-    rm += self -> num_rows;
-
-    rm -> start_id = self -> end_id;
-    rm -> len = row_len;
-    rm -> cnt = 1;
-
-    self -> bits_in_buffer += self -> row_len;
-    self -> row_len = 0;
-
-    ++ self -> num_rows;
-    self -> row_committed = true;
-
-    /* detect 1x blob cutoff */
-    cur_size = ( size_t ) ( self -> bits_in_buffer + 7 ) >> 3;
-    if ( cur_size >= self -> trigger )
-    {
-        /* if size just crossed the trigger boundary and 
-         * cutoff_id has not been advanced yet */
-        if ( self -> cutoff_id == self -> start_id )
-        {
-            self -> cutoff_id = * end_id;
-        }
-
-        /* or perhaps the buffer is too large */
-        else if ( ( cur_size + cur_size ) >= self -> trigger * 3 )
-        {
-            /* set to min of current end or our cutoff */
-            if ( self -> cutoff_id < * end_id )
-            {
-#if ROW_COUNT_CUTOFFS
-                /* the number of rows until our cutoff */
-                uint64_t row_count = self -> cutoff_id - self -> start_id;
-                if ( row_count != 0 )
-                {
-/*                  int64_t end; */
-                    uint64_t msb = row_count;
-
-                    /* adjust id to nearest power of two size
-                       that does not exceed current id */
-                    while ( ( msb & ( msb - 1 ) ) != 0 )
-                        msb &= msb - 1;
-
-                    /* add in rounding factor to row_count */
-                    row_count += ( msb >> 1 );
-
-                    /* truncate */
-                    row_count &= ~ ( msb - 1 );
-
-                    if ( row_count >= 1024 )
-                    {
-                        /* limit to current row */
-                        while ( row_count > 1024 && self -> start_id + row_count > * end_id )
-                            row_count >>= 1;
-
-                        if ( self -> start_id + row_count <= * end_id )
-                            self -> cutoff_id = self -> start_id + row_count;
-                    }
-                }
-#endif
-                * end_id = self -> cutoff_id;
-            }
-        }
-    }
-
-    return false;
-}
-
-bool CC WColumnCommitRow ( void *item, void *data )
-{
-    WColumn *self = item;
-    if ( self != NULL )
-    {
-        int64_t *end_id = data;
-
-        if ( WColumnCommitRowData ( self, end_id ) )
-            return true;
-
-        /* if the row range is too great */
-        if ( ( self -> end_id - self -> start_id ) >= MAX_ROW_COUNT )
-        {
-            /* if row range has just crossed the boundary and 
-             * cutoff_id has not been advanced yet */
-            if ( self -> cutoff_id == self -> start_id )
-            {
-                self -> cutoff_id = * end_id;
-            }
-
-            /* set to min of current end or our cutoff */
-            else if ( self -> cutoff_id < * end_id )
-            {
-                * end_id = self -> cutoff_id;
-            }
-        }
-    }
-
-    return false;
-}
-
-/* RepeatRow
- *  go into the last row entry
- *  extend the count by uint64_t
- */
-void CC WColumnRepeatRow ( void *item, void *data )
-{
-    WColumn *self = item;
-    const WColumnRepeatRowData *pb = data;
-
-    if ( self != NULL && self -> num_rows != 0 )
-    {
-        WColumnRowMap *rm = self -> rowmap . base;
-        rm += self -> num_rows - 1;
-
-        /* if we've previously declared a cutoff id,
-           incorporate the repeated row into the range */
-        if ( ( self -> cutoff_id != self -> start_id ) && ( self -> cutoff_id + 1 == pb -> end_id ) )
-            self -> cutoff_id = pb -> end_id + pb -> count;
-
-        /* just account for the repeated row */
-        rm -> cnt += pb -> count;
-        self -> end_id += pb -> count;
-    }
-}
-
-/* CloseRow
- *  discards uncommitted data
- *  update state
- */
-void CC WColumnCloseRow ( void *item, void *ignore )
-{
-    WColumn *self = item;
-    if ( self != NULL )
-    {
-        if ( self -> row_committed )
-            ++ self -> end_id;
-
-        self -> row_len = 0;
-        self -> row_written = false;
-        self -> row_committed = false;
-    }
-}
-
-/* BufferPage
- *  captures page range
- *
- *  "end_id" [ IN, CONST ] - half-closed id of buffered range end
- *  column should capture this information for creating page
- *  id range either on demand, or pre-prepared.
- *
- *  returns true if there was a memory error.
- */
-static
-bool WColumnSplitBuffer ( WColumn *self, int64_t end_id, size_t rm_idx )
-{
-    rc_t rc;
-    int64_t id;
-    VBlob *vblob;
-    bool splitting;
-    size_t i, data_cur;
-    uint64_t sum_elems;
-
-    const WColumnRowMap *rm = self -> rowmap . base;
-
-    uint64_t num_rows = rm [ rm_idx ] . start_id + rm [ rm_idx ] . cnt - self -> start_id;
-    assert ( rm [ 0 ] . start_id == self -> start_id );
-
-    /* adjust end_id [ TAKES CARE OF THEORETICAL ERROR CONDITION
-       NOT KNOWN TO EXIST ] and num_rows ( when splitting repeat ) */
-    id = end_id;
-    splitting = false;
-    if ( self -> start_id + num_rows <= id )
-        id = self -> start_id + num_rows;
-    else
-    {
-        num_rows = id - self -> start_id;
-        splitting = true;
-    }
-
-    /* release previous ( but unexpected ) cache if there */
-    if ( self -> page != NULL )
-    {
-        TRACK_BLOB ( VBlobRelease, self -> page );
-        VBlobRelease ( self -> page );
-        self -> page = NULL;
-    }
-
-    /* create new blob */
-    rc = VBlobNew ( & vblob,
-                    self -> start_id, id - 1,
-                    self -> dad . scol -> name -> name . addr );
-    TRACK_BLOB ( VBlobNew, vblob );
-    if ( rc != 0 )
-    {
-        PLOGERR ( klogErr,
-                  ( klogErr, rc, "Column: $(col) failed to allocate page", "col=%.*s"
-                    , self -> dad . scol -> name -> name . size
-                    , self -> dad . scol -> name -> name . addr )
-            );
-        return true;
-    }
-
-    /* create blob page map */
-    rc = PageMapNew ( & vblob -> pm, rm_idx + 1 ); /*** rm_idx tells many WColumnRowMap need to be added to PageMap ***/
-    if ( rc != 0 )
-    {
-        TRACK_BLOB ( VBlobRelease, vblob );
-        VBlobRelease ( vblob );
-
-        PLOGERR ( klogErr,
-                  ( klogErr, rc, "Column: $(col) failed to create page map", "col=%.*s"
-                    , self -> dad . scol -> name -> name . size
-                    , self -> dad . scol -> name -> name . addr )
-            );
-        return true;
-    }
-
-    /* write page map up to ( but not including ) last entry */
-    for ( sum_elems = 0, i = 0; i < rm_idx; ++ i )
-    {
-        sum_elems += rm [ i ] . len;
-        rc = PageMapAppendSomeRows ( vblob -> pm, rm [ i ] . len, rm [ i ] . cnt );
-        if ( rc != 0 )
-        {
-            TRACK_BLOB ( VBlobRelease, vblob );
-            VBlobRelease ( vblob );
-
-            PLOGERR ( klogErr,
-                      ( klogErr, rc, "Column: $(col) failed to write page map", "col=%.*s"
-                        , self -> dad . scol -> name -> name . size
-                        , self -> dad . scol -> name -> name . addr )
-                );
-            return true;
-        }
-    }
-
-    sum_elems += rm [ i ] . len;
-    rc = PageMapAppendSomeRows ( vblob -> pm, rm [ i ] . len, id - rm [ i ] . start_id );
-    if ( rc != 0 )
-    {
-        TRACK_BLOB ( VBlobRelease, vblob );
-        VBlobRelease ( vblob );
-
-        PLOGERR ( klogErr,
-                  ( klogErr, rc, "Column: $(col) failed to write page map", "col=%.*s"
-                    , self -> dad . scol -> name -> name . size
-                    , self -> dad . scol -> name -> name . addr )
-            );
-        return true;
-    }
-
-    /* determine current data buffer usage */
-    data_cur = ( size_t ) ( ( ( self -> bits_in_buffer + 7 ) >> 3 )
-        + SINGLE_PAGE_SIZE - 1 ) & ~ ( size_t ) ( SINGLE_PAGE_SIZE - 1 );
-
-    /* update peak history */
-    if ( self -> data_peak_hist [ self -> peak_hist_idx ] == self -> data_peak )
-    {
-        int j;
-        size_t data_peak = data_cur;
-
-        for ( j = ( self -> peak_hist_idx + 1 ) & 0xF;
-              j != self -> peak_hist_idx;
-              j = ( j + 1 ) & 0xF )
-        {
-            if ( self -> data_peak_hist [ j ] > data_peak )
-                data_peak = self -> data_peak_hist [ j ];
-        }
-
-        self -> data_peak = data_peak;
-    }
-    self -> data_peak_hist [ self -> peak_hist_idx ] = data_cur;
-    self -> peak_hist_idx = ( self -> peak_hist_idx + 1 ) & 0xF;
-    if ( data_cur > self -> data_peak )
-        self -> data_peak = data_cur;
-
-    /* hand data over to blob */
-    vblob -> data = self -> data;
-    vblob -> data . elem_bits = VTypedescSizeof ( & self -> dad . desc );
-    vblob -> data . elem_count = sum_elems;
-
-    /* handle residual data */
-    if ( splitting )
-        sum_elems -= rm [ rm_idx ] . len;
-    else
-        ++ rm_idx;
-
-    if ( rm_idx == self -> num_rows )
-    {
-        /* no residual data/rows */
-        memset ( & self -> data, 0, sizeof self -> data );
-        self -> bits_in_buffer = 0;
-        self -> num_rows = 0;
-        self -> start_id = self -> cutoff_id = end_id;
-    }
-    else
-    {
-        KDataBuffer data;
-        bitsz_t boff, to_copy;
-
-        /* allocate a new data buffer */
-        rc = KDataBufferMakeBytes ( & data, self -> data_peak );
-        if ( rc != 0 )
-        {
-            /* forget transfer of blob */
-            memset ( & vblob -> data, 0, sizeof vblob -> data );
-
-            TRACK_BLOB ( VBlobRelease, vblob );
-            VBlobRelease ( vblob );
-
-            PLOGERR ( klogErr,
-                      ( klogErr, rc, "Column: $(col) failed to split page", "col=%.*s"
-                        , self -> dad . scol -> name -> name . size
-                        , self -> dad . scol -> name -> name . addr )
-                );
-            return true;
-        }
-
-        /* copy data */
-        boff = ( rm_idx > 0 ) ?
-            sum_elems * vblob -> data . elem_bits : 0;
-        to_copy = self -> bits_in_buffer - boff;
-        if ( ( ( boff | to_copy ) & 7 ) != 0 )
-            bitcpy ( data . base, 0, self -> data . base, boff, to_copy );
-        else
-            memcpy ( data . base, & ( ( const uint8_t* ) self -> data . base ) [ boff >> 3 ], to_copy >> 3 );
-
-        self -> data = data;
-        self -> bits_in_buffer = to_copy;
-
-        /* copy row map */
-        memmove ( self -> rowmap . base, & rm [ rm_idx ], ( self -> num_rows -= rm_idx ) * sizeof * rm );
-
-        /* adjust starting id and repeat count if splitting single row */
-        if ( splitting )
-        {
-            WColumnRowMap *split = self -> rowmap . base;
-            split -> cnt = split -> start_id + split -> cnt - id;
-            split -> start_id = id;
-        }
-
-        self -> start_id = self -> cutoff_id = id;
-    }
-
-    self -> page = vblob;
-    self -> dflt_last = false;
-
-    return false;
-}
-
-static
-int WColumnRowMapCompare ( const WColumnRowMap *self, int64_t id )
-{
-    /* id is right-edge exclusive */
-    if ( self -> start_id >= id )
-        return -1;
-    return id > self -> start_id + self -> cnt;
-}
-
-bool CC WColumnBufferPage ( void *item, void *const_end_id )
-{
-    WColumn *self = item;
-    if ( self != NULL )
-    {
-        int64_t end_id = * ( const int64_t* ) const_end_id;
-
-        int diff;
-        const WColumnRowMap *rm = self -> rowmap . base;
-        size_t i, left, right = self -> num_rows;
-
-        /* find the entry mentioned */
-        if ( self -> num_rows == 0 )
-        {
-            PLOGMSG ( klogWarn,
-                      ( klogWarn, "Column: $(col) has no rows to buffer", "col=%.*s"
-                        , self -> dad . scol -> name -> name . size
-                        , self -> dad . scol -> name -> name . addr )
-                );
-            return true;
-        }
-
-        /* check last entry */
-        i = right - 1;
-        diff = WColumnRowMapCompare ( & rm [ i ], end_id );
-        if ( diff >= 0 )
-            return WColumnSplitBuffer ( self, end_id, i );
-
-        /* check that the id is within our range at all */
-        assert ( self -> start_id == rm [ 0 ] . start_id );
-        if ( end_id < self -> start_id )
-        {
-            PLOGMSG ( klogWarn,
-                      ( klogWarn, "Column: $(col) cutoff id $(id) is not within range"
-                        , "col=%.*s,id=%ld"
-                        , self -> dad . scol -> name -> name . size
-                        , self -> dad . scol -> name -> name . addr
-                        , end_id )
-                );
-            return true;
-        }
-
-        /* search rails are left ( inclusive ) at 0, right ( exclusive ) at num_rows */
-        left = 0;
-
-        /* perform arithmetic search for initial portion */
-        if ( right > 1000 )
-        {
-            double p = ( double ) ( end_id - rm [ left ] . start_id ) /
-                ( rm [ right - 1 ] . start_id + rm [ right - 1 ] . cnt - rm [ left ] . start_id );
-            assert ( p >= 0.0 && p <= 1.0 );
-
-            i = left + p * ( right - left );
-
-            diff = WColumnRowMapCompare ( & rm [ i ], end_id );
-            if ( diff == 0 )
-                return WColumnSplitBuffer ( self, end_id, i );
-            if ( diff < 0 )
-                right = i;
-            else
-                left = i + 1;
-
-            if ( left < right )
-            {
-                p = ( double ) ( end_id - rm [ left ] . start_id ) /
-                    ( rm [ right - 1 ] . start_id + rm [ right - 1 ] . cnt - rm [ left ] . start_id );
-                assert ( p >= 0.0 && p <= 1.0 );
-
-                i = left + p * ( right - left );
-
-                diff = WColumnRowMapCompare ( & rm [ i ], end_id );
-                if ( diff == 0 )
-                    return WColumnSplitBuffer ( self, end_id, i );
-                if ( diff < 0 )
-                    right = i;
-                else
-                    left = i + 1;
-            }
-        }
-
-        /* normal binary search */
-        while ( left < right )
-        {
-            i = ( left + right ) >> 1;
-
-            diff = WColumnRowMapCompare ( & rm [ i ], end_id );
-            if ( diff == 0 )
-                return WColumnSplitBuffer ( self, end_id, i );
-            if ( diff < 0 )
-                right = i;
-            else
-                left = i + 1;
-        }
-
-        PLOGMSG ( klogErr,
-                  ( klogErr, "Column: $(col) cutoff id $(id) is not within range"
-                    , "col=%.*s,id=%ld"
-                    , self -> dad . scol -> name -> name . size
-                    , self -> dad . scol -> name -> name . addr
-                    , end_id )
-            );
-    }
-
-    return true;
-}
-
-/* ReadBlob
- *  reads an input blob
- *  called as a result of commit page which reads the validation production
- */
-rc_t WColumnReadBlob ( WColumn *self, VBlob **vblob, int64_t id )
-{
-    if ( self -> page == NULL )
-        return RC ( rcVDB, rcColumn, rcReading, rcBuffer, rcNotFound );
-    if ( id < self -> page -> start_id || id > self -> page -> stop_id )
-        return RC ( rcVDB, rcColumn, rcReading, rcRow, rcNotFound );
-
-    * vblob = self -> page;
-    VBlobAddRef ( self -> page );
-    TRACK_BLOB ( VBlobAddRef, self -> page );
-
-    return 0;
-}
-
-/* DropPage
- *  drops any page buffers created
- */
-void CC WColumnDropPage ( void *item, void *ignore )
-{
-    WColumn *self = item;
-    if ( self != NULL && self -> page != NULL )
-    {
-        TRACK_BLOB ( VBlobRelease, self -> page );
-        VBlobRelease ( self -> page );
-        self -> page = NULL;
-    }
-}
diff --git a/libs/vdb/wcursor.c b/libs/vdb/wcursor.c
deleted file mode 100644
index f931bd1..0000000
--- a/libs/vdb/wcursor.c
+++ /dev/null
@@ -1,1238 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define TRACK_REFERENCES 0
-
-#include "cursor-priv.h"
-#include "dbmgr-priv.h"
-#include "linker-priv.h"
-#include "schema-priv.h"
-#include "table-priv.h"
-#include "column-priv.h"
-#include "phys-priv.h"
-#include "prod-priv.h"
-#include "prod-expr.h"
-#include "blob-priv.h"
-
-#include <vdb/cursor.h>
-#include <vdb/table.h>
-#include <kdb/meta.h>
-#include <kfs/dyload.h>
-#include <klib/symbol.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#if VCURSOR_FLUSH_THREAD
-
-#include <kproc/lock.h>
-#include <kproc/cond.h>
-#include <kproc/thread.h>
-
-#if _DEBUGGING
-/* set to 1 to trigger behavior to simulate
-   an error within flush thread */
-#define FORCE_FLUSH_ERROR_EXIT 0
-#endif
-
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-static bool s_disable_flush_thread = false;
-
-/*--------------------------------------------------------------------------
- * VCursor
- *  a row cursor onto a VTable
- */
-
-LIB_EXPORT rc_t CC VDBManagerDisableFlushThread(VDBManager *self)
-{
-    s_disable_flush_thread = true;
-    return 0;
-}
-
-/* forward
- *  to avoid reordering whole page
- */
-static
-rc_t VCursorFlushPageInt ( VCursor *self, bool sync );
-
-
-/* Whack
- */
-rc_t VCursorWhack ( VCursor *self )
-{
-#if VCURSOR_FLUSH_THREAD
-    if ( self -> flush_thread != NULL )
-    {
-        rc_t rc = KLockAcquire ( self -> flush_lock );
-        if ( rc == 0 )
-        {
-            while ( self -> flush_state == vfBusy )
-            {
-                MTCURSOR_DBG (( "VCursorWhack: waiting for thread to process\n" ));
-                KConditionWait ( self -> flush_cond, self -> flush_lock );
-            }
-            self -> flush_state = vfExit;
-            KConditionSignal ( self -> flush_cond );
-            KLockUnlock ( self -> flush_lock );
-        }
-
-        MTCURSOR_DBG (( "VCursorWhack: waiting on thread to exit\n" ));
-        KThreadWait ( self -> flush_thread, NULL );
-    }
-
-    MTCURSOR_DBG (( "VCursorWhack: finishing\n" ));
-    KThreadRelease ( self -> flush_thread );
-    KConditionRelease ( self -> flush_cond );
-    KLockRelease ( self -> flush_lock );
-#endif
-    VCursorTerminatePagemapThread(self);
-    return VCursorDestroy ( self );
-}
-
-
-/* CreateCursor
- *  creates a cursor object onto table
- *  multiple read cursors are allowed
- *  only a single write cursor is allowed
- *
- *  "curs" [ OUT ] - return parameter for newly created cursor
- *
- *  "mode" [ IN ] - describes udate behavior
- *    kcmUpdate   : allow inserts or updates
- *    kcmReplace  : replace all existing rows with newly written rows
- *    kcmInsert   : allow only inserts, i.e. new rows
- */
-#if VCURSOR_FLUSH_THREAD
-static rc_t CC run_flush_thread ( const KThread *t, void *data );
-#endif
-
-rc_t VTableCreateCursorWriteInt ( VTable *self, VCursor **cursp, KCreateMode mode, bool create_thread )
-{
-    rc_t rc;
-
-    if ( cursp == NULL )
-        rc = RC ( rcVDB, rcCursor, rcCreating, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else if ( self -> read_only )
-            rc = RC ( rcVDB, rcCursor, rcCreating, rcTable, rcReadonly );
-#if VCURSOR_WRITE_MODES_SUPPORTED
-#error "expecting kcmInsert mode only"
-#else
-        else if ( mode != kcmInsert )
-            rc = RC ( rcVDB, rcCursor, rcCreating, rcMode, rcUnsupported );
-#endif
-        else
-        {
-            VCursor *curs;
-
-#if LAZY_OPEN_COL_NODE
-            if ( self -> col_node == NULL )
-                KMetadataOpenNodeUpdate ( self -> meta, & self -> col_node, "col" );
-#endif
-            rc = VCursorMake ( & curs, self );
-            if ( rc == 0 )
-            {
-                rc = VCursorSupplementSchema ( curs );
-#if VCURSOR_FLUSH_THREAD
-                if ( rc == 0 && create_thread )
-                {
-                    rc = KLockMake ( & curs -> flush_lock );
-                    if ( rc == 0 )
-                        rc = KConditionMake ( & curs -> flush_cond );
-                    if ( rc == 0 )
-                        rc = KThreadMake ( & curs -> flush_thread, run_flush_thread, curs );
-                }
-#endif
-                if ( rc == 0 )
-                {
-                    * cursp = curs;
-                    return 0;
-                }
-
-                VCursorRelease ( curs );
-            }
-        }
-
-        * cursp = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableCreateCursorWrite ( VTable *self, VCursor **cursp, KCreateMode mode )
-{
-    return VTableCreateCursorWriteInt ( self, cursp, mode, !s_disable_flush_thread );
-}
-
-
-/* MakeColumn
- */
-rc_t VCursorMakeColumn ( VCursor *self, VColumn **col, const SColumn *scol, Vector *cx_bind )
-{
-    VTable *vtbl;
-
-    if ( self -> read_only )
-        return VColumnMake ( col, self -> schema, scol );
-
-    vtbl = self -> tbl;
-    return WColumnMake ( col, self -> schema, scol, vtbl -> stbl -> limit, vtbl -> mgr, cx_bind );
-}
-
-
-/* PostOpenAdd
- *  handle opening of a column after the cursor is opened
- */
-rc_t VCursorPostOpenAdd ( VCursor *self, VColumn *col )
-{
-    rc_t rc = VCursorPostOpenAddRead ( self, col );
-
-    if ( ! self -> read_only && rc == 0 && self -> state == vcRowOpen )
-    {
-        int64_t row_id = self -> row_id;
-        WColumnOpenRow ( col, & row_id );
-    }
-
-    return rc;
-}
-
-/* Open
- *  open cursor, resolving schema
- *  for the set of opened columns
- *
- *  NB - there is no corresponding "Close"
- *  use "Release" instead.
- */
-static
-rc_t VProdResolveAddShallowTriggers ( const VProdResolve *self, const STable *stbl )
-{
-    rc_t rc;
-    VCursor *curs;
-    uint32_t i = VectorStart ( & stbl -> prod );
-    uint32_t end = i + VectorLength ( & stbl -> prod );
-
-    for ( rc = 0, curs = self -> curs; ( rc == 0 || self -> ignore_column_errors ) && i < end; ++ i )
-    {
-        SProduction *sprod = VectorGet ( & stbl -> prod, i );
-        if ( sprod != NULL && sprod -> trigger )
-        {
-            VProduction *prod = NULL;
-            rc = VProdResolveSProduction ( self, & prod, sprod );
-            if ( rc == 0 && prod != NULL )
-                rc = VectorAppend ( & curs -> trig, NULL, prod );
-        }
-    }
-
-    if ( self -> ignore_column_errors )
-        return 0;
-
-    return rc;
-}
-
-static
-rc_t VProdResolveAddTriggers ( const VProdResolve *self, const STable *stbl )
-{
-    uint32_t i = VectorStart ( & stbl -> overrides );
-    uint32_t end = VectorLength ( & stbl -> overrides );
-    for ( end += i; i < end; ++ i )
-    {
-        const STable *dad = STableFindOrdAncestor ( stbl, i );
-        rc_t rc = VProdResolveAddShallowTriggers ( self, dad );
-        if ( rc != 0 )
-            return rc;
-    }
-    return VProdResolveAddShallowTriggers ( self, stbl );
-}
-
-LIB_EXPORT rc_t CC VCursorOpen ( const VCursor *cself )
-{
-    rc_t rc;
-    VCursor *self = ( VCursor* ) cself;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcCursor, rcOpening, rcSelf, rcNull );
-    else
-    {
-        VLinker *ld = self -> tbl -> linker;
-
-        KDlset *libs;
-        rc = VLinkerOpen ( ld, & libs );
-        if ( rc == 0 )
-        {
-            rc = VCursorOpenRead ( self, libs );
-            if ( rc == 0 )
-            {
-                if ( ! self -> read_only )
-                {
-                    Vector cx_bind;
-                    VProdResolve pr;
-                    pr . schema = self -> schema;
-                    pr . ld = ld;
-                    pr . libs = libs;
-                    pr . stbl = self -> stbl;
-                    pr . curs = self;
-                    pr . cache = & self -> prod;
-                    pr . owned = & self -> owned;
-                    pr . cx_bind = & cx_bind;
-                    pr . chain = chainEncoding;
-                    pr . blobbing = false;
-                    pr . ignore_column_errors = false;
-                    pr . discover_writable_columns = false;
-
-                    VectorInit ( & cx_bind, 1, self -> schema -> num_indirect );
-
-                    if ( ! self -> suspend_triggers )
-                        rc = VProdResolveAddTriggers ( & pr, self -> stbl );
-
-                    VectorWhack ( & cx_bind, NULL, NULL );
-                }
-
-                if ( rc == 0 )
-                {
-                    /* TBD - warn if any input columns are unreferenced by schema */
-
-                    int64_t first;
-                    uint64_t count;
-                    
-                    rc = VCursorIdRange ( self, 0, & first, & count );
-                    if ( rc != 0 )
-                    {
-                        if ( GetRCState ( rc ) == rcEmpty )
-                        {
-                            /* writable cursors are expected to be empty */
-                            if ( ! self -> read_only ||
-                                 /* permit empty open when run from sradb */
-                                 ( GetRCObject ( rc ) == rcRange &&
-                                   self -> permit_add_column &&
-                                   VectorLength ( & self -> row ) == 0 ) )
-                            {
-                                rc = 0;
-                            }
-                        }
-                    }
-                    else if ( count != 0 )
-                    {
-                        if ( self -> read_only )
-                        {
-                            /* set initial row id to starting row */
-                            self -> start_id = self -> end_id = self -> row_id = first;
-                        }
-                        else
-                        {
-                            /* set initial row id to append */
-                            self -> start_id = self -> end_id = self -> row_id = first + count;
-                        }
-                    }
-                }
-
-                if ( rc != 0 )
-                    self -> state = vcFailed;
-            }
-
-            KDlsetRelease ( libs );
-        }
-    }
-
-    return rc;
-}
-
-
-/* ListWritableColumns
- *  walks list of SPhysicals and trigger SProductions
- *  attempts to resolve all write rules
- *  records any SColumn that can be reached
- *  populates BTree with VColumnRef objects
- */
-struct resolve_phys_data
-{
-    VProdResolve pr;
-    const KNamelist *seed;
-    uint32_t count;
-};
-
-static
-void CC resolve_writable_sphys ( void *item, void *data )
-{
-    struct resolve_phys_data *pb = data;
-    const SPhysMember *smbr = ( const void* ) item;
-    VProduction *out = NULL;
-
-    if ( pb -> seed == NULL )
-        VProdResolveSPhysMember ( & pb -> pr, & out, smbr );
-    else
-    {
-        uint32_t i;
-        const KSymbol *sym = smbr -> name;
-        const char *sname = sym -> name . addr;
-        size_t ssize = sym -> name . size;
-        if ( sname [ 0 ] == '.' )
-        {
-            ++ sname;
-            -- ssize;
-        }
-
-        /* TBD - this is not too speedy, but it is
-           very low frequency in all known cases */
-        for ( i = 0; i < pb -> count; ++ i )
-        {
-            const char *name;
-            rc_t rc = KNamelistGet ( pb -> seed, i, & name );
-            if ( rc == 0 )
-            {
-                if ( strlen ( name ) == ssize && memcmp ( sname, name, ssize ) == 0 )
-                {
-                    VProdResolveSPhysMember ( & pb -> pr, & out, smbr );
-                    break;
-                }
-            }
-        }
-    }
-}
-
-static
-void VProdResolveWritableColumns ( struct resolve_phys_data *pb, bool suspend_triggers )
-{
-    const STable *dad, *stbl = pb -> pr . stbl;
-
-    /* walk table schema looking for parents */
-    uint32_t i = VectorStart ( & stbl -> overrides );
-    uint32_t end = VectorLength ( & stbl -> overrides );
-    for ( end += i; i < end; ++ i )
-    {
-        dad = STableFindOrdAncestor ( stbl, i );
-        VectorForEach ( & dad -> phys, false, resolve_writable_sphys, pb );
-    }
-
-    /* walk current table */
-    VectorForEach ( & stbl -> phys, false, resolve_writable_sphys, pb );
-
-    /* add triggers */
-    if ( !suspend_triggers && pb -> seed == NULL )
-    {
-        pb -> pr . chain = chainUncommitted;
-        VProdResolveAddTriggers ( & pb -> pr, stbl );
-    }
-}
-
-rc_t VCursorListSeededWritableColumns ( VCursor *self, BSTree *columns, const KNamelist *seed )
-{
-    rc_t rc;
-    KDlset *libs;
-
-    Vector cx_bind;
-    struct resolve_phys_data pb;
-    pb . pr . schema = self -> schema;
-    pb . pr . ld = self -> tbl -> linker;
-    pb . pr . stbl = self -> stbl;
-    pb . pr . curs = self;
-    pb . pr . cache = & self -> prod;
-    pb . pr . owned = & self -> owned;
-    pb . pr . cx_bind = & cx_bind;
-    pb . pr . chain = chainEncoding;
-    pb . pr . blobbing = false;
-    pb . pr . ignore_column_errors = true;
-    pb . pr . discover_writable_columns = true;
-    pb . seed = seed;
-
-    if ( seed != NULL )
-    {
-        rc = KNamelistCount ( seed, & pb . count );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    VectorInit ( & cx_bind, 1, self -> schema -> num_indirect );
-
-    /* open the dynamic linker libraries */
-    rc = VLinkerOpen ( pb . pr . ld, & libs );
-    if ( rc == 0 )
-    {
-        pb . pr . libs = libs;
-        VProdResolveWritableColumns ( & pb , self -> suspend_triggers );
-
-        VectorWhack ( & cx_bind, NULL, NULL );
-        KDlsetRelease ( libs );
-
-        if ( rc == 0 )
-        {
-            /* add columns to list */
-            uint32_t idx = VectorStart ( & self -> row );
-            uint32_t end = VectorLength ( & self -> row );
-
-            for ( end += idx; idx < end; ++idx )
-            {
-                const VColumn* vcol = ( const VColumn* ) VectorGet ( & self -> row, idx );
-                if ( vcol != NULL )
-                {
-                    VColumnRef *cref;
-                    rc = VColumnRefMake ( & cref, self -> schema, vcol -> scol );
-                    if ( rc != 0 )
-                        break;
-
-                    rc = BSTreeInsert ( columns, & cref -> n, VColumnRefSort );
-                    assert ( rc == 0 );
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-rc_t VCursorListWritableColumns ( VCursor *self, BSTree *columns )
-{
-    return VCursorListSeededWritableColumns ( self, columns, NULL );
-}
-
-/* SetRowId
- *  seek to given row id
- *
- *  "row_id" [ IN ] - row id to select
- */
-LIB_EXPORT rc_t CC VCursorSetRowId ( const VCursor *cself, int64_t row_id )
-{
-    rc_t rc;
-    VCursor *self = ( VCursor* ) cself;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcCursor, rcPositioning, rcSelf, rcNull );
-    else if ( self -> state == vcFailed )
-        rc = RC ( rcVDB, rcCursor, rcPositioning, rcCursor, rcInvalid );
-    else if ( self -> state > vcReady || self -> start_id < self -> end_id )
-        rc = RC ( rcVDB, rcCursor, rcPositioning, rcCursor, rcBusy );
-    else if ( self -> read_only )
-        rc = VCursorSetRowIdRead ( self, row_id );
-    else
-    {
-        /* the test of start/end range above tells us that
-           no rows are buffered, so the row id can be simply set */
-        self -> start_id = self -> end_id = self -> row_id = row_id;
-        rc = 0;
-    }
-
-    return rc;
-}
-
-
-/* OpenRow
- *  open currently closed row indicated by row id
- */
-LIB_EXPORT rc_t CC VCursorOpenRow ( const VCursor *cself )
-{
-    rc_t rc;
-    VCursor *self = ( VCursor* ) cself;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcCursor, rcOpening, rcSelf, rcNull );
-    else if ( self -> state != vcReady )
-    {
-        switch ( self -> state )
-        {
-        case vcConstruct:
-            rc = RC ( rcVDB, rcCursor, rcOpening, rcRow, rcIncomplete );
-            break;
-        case vcFailed:
-            rc = RC ( rcVDB, rcCursor, rcOpening, rcCursor, rcInvalid );
-            break;
-        case vcRowOpen:
-            rc = 0;
-            break;
-        default:
-            rc = RC ( rcVDB, rcCursor, rcOpening, rcRow, rcBusy );
-        }
-    }
-    else if ( self -> read_only )
-        rc = VCursorOpenRowRead ( self );
-    else
-    {
-        /* validate that all columns have the same starting row_id */
-        int64_t row_id = self -> row_id;
-        VectorForEach ( & self -> row, false, WColumnOpenRow, & row_id );
-        assert ( row_id == self -> row_id );
-        self -> state = vcRowOpen;
-        rc = 0;
-    }
-
-    return rc;
-}
-
-/* CommitRow
- *  commit row after writing
- *  prevents further writes
- */
-LIB_EXPORT rc_t CC VCursorCommitRow ( VCursor *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcCursor, rcCommitting, rcSelf, rcNull );
-    else if ( self -> read_only )
-        rc = RC ( rcVDB, rcCursor, rcCommitting, rcCursor, rcReadonly );
-    else if ( self -> state == vcFailed )
-        rc = RC ( rcVDB, rcCursor, rcCommitting, rcCursor, rcInvalid );
-    else if ( self -> state < vcRowOpen )
-        rc = RC ( rcVDB, rcCursor, rcCommitting, rcRow, rcNotOpen );
-    else if ( self -> state >= vcRowCommitted )
-        rc = 0;
-    else
-    {
-        self -> permit_add_column = self -> permit_post_open_add;
-
-        /* tell columns to slam in any default values */
-        rc = 0;
-        if ( VectorDoUntil ( & self -> row, false, WColumnRowDefaults, & rc ) )
-            return rc;
-
-        /* account for row just written */
-        self -> end_id = self -> row_id + 1;
-
-        /* tell columns to commit the row, and allow
-           each to return an earlier cutoff id ( half-closed ) */
-        if ( VectorDoUntil ( & self -> row, false, WColumnCommitRow, & self -> end_id ) )
-        {
-            self -> state = vcFailed;
-            return RC ( rcVDB, rcCursor, rcCommitting, rcMemory, rcExhausted );
-        }
-
-        /* returned result should never be <= start id */
-        assert ( self -> end_id > self -> start_id );
-
-        /* if returned result dips down into the range of buffered rows
-           then one or more columns has requested an automatic page commit */
-        self -> state = ( self -> end_id <= self -> row_id ) ? vcPageCommit : vcRowCommitted;
-    }
-
-    return rc;
-}
-
-/* RepeatRow
- *  repeats the current row by the count provided
- *  row must have been committed
- *
- *  AVAILABILITY: version 2.6
- *
- *  "count" [ IN ] - the number of times to repeat
- *  the current row.
- */
-LIB_EXPORT rc_t CC VCursorRepeatRow ( VCursor *self, uint64_t count )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcCursor, rcUpdating, rcSelf, rcNull );
-    else if ( self -> read_only )
-        rc = RC ( rcVDB, rcCursor, rcUpdating, rcCursor, rcReadonly );
-    else if ( self -> state == vcFailed )
-        rc = RC ( rcVDB, rcCursor, rcUpdating, rcCursor, rcInvalid );
-    else if ( self -> state < vcRowOpen )
-        rc = RC ( rcVDB, rcCursor, rcUpdating, rcRow, rcNotOpen );
-    else if ( self -> state < vcRowCommitted )
-        rc = RC ( rcVDB, rcCursor, rcUpdating, rcRow, rcInvalid );
-    else if ( count > 0xFFFFFFFFU )
-        rc = RC ( rcVDB, rcCursor, rcUpdating, rcParam, rcExcessive );
-    else if ( count != 0 )
-    {
-        /* check the number of rows that would result */
-        uint64_t total = ( self -> row_id - self -> start_id ) + count;
-        if ( total > 0xFFFFFFFFU )
-            rc = RC ( rcVDB, rcCursor, rcUpdating, rcParam, rcExcessive );
-        else
-        {
-            WColumnRepeatRowData pb;
-            pb . count = count;
-            pb . row_id = self -> row_id;
-            pb . end_id = self -> end_id;
-
-            /* tell columns to commit the row, and allow
-               each to return an earlier cutoff id ( half-closed ) */
-            VectorForEach ( & self -> row, false, WColumnRepeatRow, & pb );
-
-            /* extend the current row-id, dragging end_id along with it */
-            if ( self -> end_id >= self -> row_id )
-                self -> end_id += count;
-
-            /* move the current row id ahead */
-            self -> row_id += count;
-        }
-    }
-
-    return rc;
-}
-
-/* CloseRow
- *  balances OpenRow message
- *  if there are uncommitted modifications,
- *  discard all changes. otherwise,
- *  advance to next row
- */
-LIB_EXPORT rc_t CC VCursorCloseRow ( const VCursor *cself )
-{
-    rc_t rc = 0;        /* needed in case FlushPage isn't called */
-    VCursor *self = ( VCursor* ) cself;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcCursor, rcClosing, rcSelf, rcNull );
-    else if ( self -> state == vcFailed )
-        rc = RC ( rcVDB, rcCursor, rcClosing, rcCursor, rcInvalid );
-    else if ( self -> state < vcRowOpen )
-        rc = 0;
-    else if ( self -> read_only )
-        rc = VCursorCloseRowRead ( self );
-    else
-    {
-        /* tell each of the columns that no further data may be written
-           and to abandon any uncommitted writes */
-        VectorForEach ( & self -> row, false, WColumnCloseRow, NULL );
-
-        /* if the row was committed... */
-        if ( self -> state >= vcRowCommitted )
-        {
-            /* close off the page if so requested */
-            if ( self -> state == vcPageCommit )
-            {
-                rc = VCursorFlushPageInt(self, false);
-                if ( rc )
-                {
-                    self -> state = vcFailed;
-                    return rc;
-                }
-            }
-
-            /* advance to next id */
-            ++ self -> row_id;
-        }
-
-        self -> state = vcReady;
-        rc = 0;
-    }
-
-    return rc;
-}
-
-
-/* Default
- *  give a default row value for column
- *
- *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
- *
- *  "elem_bits" [ IN ] - stated element size in bits, required
- *  to be compatible with the actual element size
- *
- *  "buffer" [ IN ] and "boff" [ IN ] - compound pointer and offset
- *  to start of default row data where "boff" is in BITS
- *
- *  "row_len" [ IN ] - the number of elements in default row
- */
-LIB_EXPORT rc_t CC VCursorDefault ( VCursor *self, uint32_t col_idx,
-    bitsz_t elem_bits, const void *buffer, bitsz_t boff, uint64_t row_len )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcCursor, rcWriting, rcSelf, rcNull );
-    else if ( buffer == NULL && ( boff != 0 || row_len != 0 ) )
-        rc = RC ( rcVDB, rcCursor, rcWriting, rcParam, rcNull );
-    else if ( self -> read_only )
-        rc = RC ( rcVDB, rcCursor, rcWriting, rcCursor, rcReadonly );
-    else if ( elem_bits == 0 )
-        rc = RC ( rcVDB, rcCursor, rcWriting, rcParam, rcInvalid );
-    else
-    {
-        VColumn *col = VectorGet ( & self -> row, col_idx );
-        if ( col == NULL )
-            rc = RC ( rcVDB, rcCursor, rcWriting, rcColumn, rcInvalid );
-        else
-            rc = WColumnSetDefault ( col, elem_bits, buffer, boff, row_len );
-    }
-
-    return rc;
-}
-
-
-/* Write
- *  append bit-aligned column data to row
- *
- *  "col_idx" [ IN ] - index of column to be read, returned by "AddColumn"
- *
- *  "elem_bits" [ IN ] - stated element size in bits, required
- *  to be compatible with the actual element size
- *
- *  "buffer" [ IN ] and "boff" [ IN ] - compound pointer and offset
- *  to start of default row data where "boff" is in BITS
- *
- *  "count" [ IN ] - the number of elements to append
- */
-LIB_EXPORT rc_t CC VCursorWrite ( VCursor *self, uint32_t col_idx,
-    bitsz_t elem_bits, const void *buffer, bitsz_t boff, uint64_t count )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcCursor, rcWriting, rcSelf, rcNull );
-    else if ( buffer == NULL && count != 0 )
-        rc = RC ( rcVDB, rcCursor, rcWriting, rcParam, rcNull );
-    else if ( self -> read_only )
-        rc = RC ( rcVDB, rcCursor, rcWriting, rcCursor, rcReadonly );
-    else if ( self -> state != vcRowOpen )
-    {
-        switch ( self -> state )
-        {
-        case vcConstruct:
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcCursor, rcNotOpen );
-            break;
-        case vcFailed:
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcCursor, rcInvalid );
-            break;
-        case vcReady:
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcRow, rcNotOpen );
-            break;
-        default:
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcRow, rcLocked );
-        }
-    }
-    else
-    {
-        VColumn *col = VectorGet ( & self -> row, col_idx );
-        if ( col == NULL )
-            rc = RC ( rcVDB, rcCursor, rcWriting, rcColumn, rcInvalid );
-        else
-            rc = WColumnWrite ( col, elem_bits, buffer, boff, count );
-    }
-
-    return rc;
-}
-
-
-/* FlushPage
- *  forces flush of all buffered page data
- *  fails if row is open
- *
- *  pages are normally auto-committed based upon
- *  size and column affinity
- */
-typedef struct run_trigger_prod_data run_trigger_prod_data;
-struct run_trigger_prod_data
-{
-    int64_t  id;
-    uint32_t cnt;
-    rc_t rc;
-};
-
-static
-bool CC run_trigger_prods ( void *item, void *data )
-{
-    run_trigger_prod_data *pb = data;
-    VProduction *prod = item;
-
-    VBlob *blob;
-    pb -> rc = VProductionReadBlob ( prod, & blob, pb -> id , pb -> cnt, NULL);
-    if ( pb -> rc != 0 )
-        return true;
-    if ( blob != NULL )
-        TRACK_BLOB ( VBlobRelease, blob );
-    ( void ) VBlobRelease ( blob );
-    return false;
-}
-
-#if VCURSOR_FLUSH_THREAD
-static
-rc_t CC run_flush_thread ( const KThread *t, void *data )
-{
-    rc_t rc;
-    VCursor *self = data;
-
-    /* acquire lock */
-    MTCURSOR_DBG (( "run_flush_thread: acquiring lock\n" ));
-    rc = KLockAcquire ( self -> flush_lock );
-    if ( rc == 0 )
-    {
-        do
-        {
-            bool failed;
-            run_trigger_prod_data pb;
-
-            /* wait for data */
-            if ( self -> flush_state == vfReady )
-            {
-                MTCURSOR_DBG (( "run_flush_thread: waiting for input\n" ));
-                rc = KConditionWait ( self -> flush_cond, self -> flush_lock );
-                if ( rc != 0 )
-                    break;
-            }
-
-            /* bail unless state is busy */
-            if ( self -> flush_state != vfBusy )
-            {
-                MTCURSOR_DBG (( "run_flush_thread: exiting\n" ));
-                break;
-            }
-
-            /* prepare param block */
-            pb . id = self -> flush_id;
-            pb . cnt = self -> flush_cnt;
-            pb . rc = 0;
-
-            MTCURSOR_DBG (( "run_flush_thread: unlocking and running\n" ));
-            KLockUnlock ( self -> flush_lock );
-
-            /* run productions from trigger roots */
-            failed = VectorDoUntil ( & self -> trig, false, run_trigger_prods, & pb );
-
-            /* drop page buffers */
-            MTCURSOR_DBG (( "run_flush_thread: dropping page buffers\n" ));
-            VectorForEach ( & self -> row, false, WColumnDropPage, NULL );
-
-            /* reacquire lock */
-            MTCURSOR_DBG (( "run_flush_thread: re-acquiring lock" ));
-            rc = KLockAcquire ( self -> flush_lock );
-            if ( rc != 0 )
-            {
-                self -> flush_state = vfBgErr;
-                LOGERR ( klogSys, rc, "run_flush_thread: re-acquiring lock failed - exit" );
-                return rc;
-            }
-
-#if FORCE_FLUSH_ERROR_EXIT
-            if ( ! failed )
-            {
-                pb . rc = RC ( rcVDB, rcCursor, rcFlushing, rcThread, rcCanceled );
-                failed = true;
-            }
-#endif
-            /* get out on failure */
-            if ( failed )
-            {
-                self -> flush_state = vfBgErr;
-                LOGERR ( klogInt, pb . rc, "run_flush_thread: run_trigger_prods failed - exit" );
-                KConditionSignal ( self -> flush_cond );
-                rc = pb . rc;
-            }
-
-            /* no longer busy */
-            else if ( self -> flush_state == vfBusy )
-            {
-                /* signal waiter */
-                self -> flush_state = vfReady;
-                MTCURSOR_DBG (( "run_flush_thread: signaling ready\n" ));
-                rc = KConditionSignal ( self -> flush_cond );
-                if ( rc != 0 )
-                    LOGERR ( klogSys, rc, "run_flush_thread: failed to signal foreground thread - exit" );
-            }
-        }
-        while ( rc == 0 );
-
-        MTCURSOR_DBG (( "run_flush_thread: unlocking\n" ));
-        KLockUnlock ( self -> flush_lock );
-    }
-
-    MTCURSOR_DBG (( "run_flush_thread: exit\n" ));
-    return rc;
-}
-#endif
-
-static
-rc_t VCursorFlushPageNoThread ( VCursor *self )
-{
-    int64_t end_id = self->end_id;
-
-    /* first, tell all columns to bundle up their pages into buffers */
-    if ( VectorDoUntil ( & self -> row, false, WColumnBufferPage, & end_id ) )
-    {
-        VectorForEach ( & self -> row, false, WColumnDropPage, NULL );
-        return RC ( rcVDB, rcCursor, rcFlushing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        run_trigger_prod_data pb;
-
-        /* supposed to be constant */
-        assert ( end_id == self -> end_id );
-        /* run all validation and trigger productions */
-        pb . id = self -> start_id;
-        pb . cnt = self -> end_id - self -> start_id;
-        pb . rc = 0;
-        if ( ! VectorDoUntil ( & self -> trig, false, run_trigger_prods, & pb ) )
-        {
-            self -> start_id = self -> end_id;
-            self -> end_id = self -> row_id + 1;
-            self -> state = vcReady;
-        }
-
-        /* drop page buffers */
-        VectorForEach ( & self -> row, false, WColumnDropPage, NULL );
-
-        return pb . rc;
-    }
-}
-
-static
-rc_t VCursorFlushPageThread ( VCursor *self, bool sync )
-{
-    rc_t rc = 0;
-    int64_t end_id = self->end_id;
-
-#if VCURSOR_FLUSH_THREAD
-    MTCURSOR_DBG (( "VCursorFlushPageInt: going to acquire lock\n" ));
-    /* get lock */
-    rc = KLockAcquire ( self -> flush_lock );
-    if ( rc != 0 )
-        return rc;
-
-    MTCURSOR_DBG (( "VCursorFlushPageInt: have lock\n" ));
-
-    /* make sure that background thread is ready */
-    while ( self -> flush_state == vfBusy )
-    {
-        MTCURSOR_DBG (( "VCursorFlushPageInt: waiting for background thread\n" ));
-        rc = KConditionWait ( self -> flush_cond, self -> flush_lock );
-        if ( rc != 0 )
-        {
-            LOGERR ( klogSys, rc, "VCursorFlushPageInt: wait failed - exiting" );
-            KLockUnlock ( self -> flush_lock );
-            return rc;
-        }
-    }
-
-    if ( self -> flush_state != vfReady )
-    {
-        if ( self -> flush_state != vfBgErr )
-            rc = RC ( rcVDB, rcCursor, rcFlushing, rcCursor, rcInconsistent );
-        else
-        {
-            rc_t rc2;
-            MTCURSOR_DBG (( "VCursorFlushPageInt: waiting on thread to exit\n" ));
-            rc = KThreadWait ( self -> flush_thread, & rc2 );
-            if ( rc == 0 )
-            {
-                rc = rc2;
-                MTCURSOR_DBG (( "VCursorFlushPageInt: releasing thread\n" ));
-                KThreadRelease ( self -> flush_thread );
-                self -> flush_thread = NULL;
-            }
-        }
-
-        PLOGERR ( klogInt, (klogInt, rc, "VCursorFlushPageInt: not in ready state[$(state)] - exiting","state=%hu",self -> flush_state ));
-        KLockUnlock ( self -> flush_lock );
-        return rc;
-    }
-
-    MTCURSOR_DBG (( "VCursorFlushPageInt: running buffer page\n" ));
-
-    /* first, tell all columns to bundle up their pages into buffers */
-    if ( VectorDoUntil ( & self -> row, false, WColumnBufferPage, & end_id ) )
-    {
-        VectorForEach ( & self -> row, false, WColumnDropPage, NULL );
-        self -> flush_state = vfFgErr;
-        rc = RC ( rcVDB, rcCursor, rcFlushing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        /* supposed to be constant */
-        assert ( end_id == self -> end_id );
-
-        MTCURSOR_DBG (( "VCursorFlushPageInt: pages buffered - capturing id and count\n" ));
-        self -> flush_id = self -> start_id;
-        self -> flush_cnt = self -> end_id - self -> start_id;
-
-        self -> start_id = self -> end_id;
-        self -> end_id = self -> row_id + 1;
-        self -> state = vcReady;
-
-        MTCURSOR_DBG (( "VCursorFlushPageInt: state set to busy - signaling bg thread\n" ));
-        self -> flush_state = vfBusy;
-        rc = KConditionSignal ( self -> flush_cond );
-        if ( rc != 0 )
-            LOGERR ( klogSys, rc, "VCursorFlushPageInt: condition returned error on signal" );
-    }
-
-    MTCURSOR_DBG (( "VCursorFlushPageInt: unlocking\n" ));
-    KLockUnlock ( self -> flush_lock );
-
-    if (sync && rc == 0) {
-        /* wait for flush to finish before returning */
-        MTCURSOR_DBG (( "VCursorFlushPage: going to acquire lock\n" ));
-        /* get lock */
-        rc = KLockAcquire ( self -> flush_lock );
-        if ( rc != 0 )
-            return rc;
-
-        MTCURSOR_DBG (( "VCursorFlushPage: have lock\n" ));
-
-        /* wait until background thread has finished */
-        while ( self -> flush_state == vfBusy )
-        {
-            MTCURSOR_DBG (( "VCursorFlushPage: waiting for background thread\n" ));
-            rc = KConditionWait ( self -> flush_cond, self -> flush_lock );
-            if ( rc != 0 )
-            {
-                LOGERR ( klogSys, rc, "VCursorFlushPage: wait failed - exiting" );
-                KLockUnlock ( self -> flush_lock );
-                return rc;
-            }
-        }
-
-        /* what was the proper rc */
-        if ( self -> flush_state != vfReady )
-        {
-            if ( self -> flush_state != vfBgErr )
-                rc = RC ( rcVDB, rcCursor, rcFlushing, rcCursor, rcInconsistent );
-            else
-            {
-                rc_t rc2;
-                MTCURSOR_DBG (( "VCursorFlushPage: waiting on thread to exit\n" ));
-                rc = KThreadWait ( self -> flush_thread, & rc2 );
-                if ( rc == 0 )
-                {
-                    rc = rc2;
-                    MTCURSOR_DBG (( "VCursorFlushPage: releasing thread\n" ));
-                    KThreadRelease ( self -> flush_thread );
-                    self -> flush_thread = NULL;
-                }
-            }
-
-            PLOGERR ( klogInt, (klogInt, rc, "VCursorFlushPage: not in ready state[$(state)] - exiting",
-                                "state=%hu", self -> flush_state ));
-
-            KLockUnlock ( self -> flush_lock );
-            return rc;
-        }
-        KLockUnlock ( self -> flush_lock );
-    }
-#endif
-    return rc;
-}
-
-static
-rc_t VCursorFlushPageInt ( VCursor *self, bool sync )
-{
-    switch ( self -> state )
-    {
-        case vcConstruct:
-            return RC ( rcVDB, rcCursor, rcFlushing, rcCursor, rcNotOpen );
-        case vcFailed:
-            return RC ( rcVDB, rcCursor, rcFlushing, rcCursor, rcInvalid );
-        case vcRowOpen:
-            return RC ( rcVDB, rcCursor, rcFlushing, rcCursor, rcBusy );
-        default:
-            break;
-    }
-    if ( self -> start_id == self -> end_id )
-    {
-        /* the cursor should be in unwritten state,
-           where the row_id can be reset but drags
-           along the other markers. */
-        assert ( self -> end_id == self -> row_id );
-        return 0;
-    }
-    if (self->flush_thread)
-        return VCursorFlushPageThread(self, sync);
-    else
-        return VCursorFlushPageNoThread(self);
-}
-
-LIB_EXPORT rc_t CC VCursorFlushPage ( VCursor *self )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcCursor, rcFlushing, rcSelf, rcNull );
-    else if ( self -> read_only )
-        rc = RC ( rcVDB, rcCursor, rcFlushing, rcCursor, rcReadonly );
-    else
-        rc = VCursorFlushPageInt ( self, true );
-
-    if ( rc == 0 )
-    {
-        assert ( self -> row_id == self -> start_id );
-        self -> end_id = self -> row_id;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VCursorCommit ( VCursor *self )
-{
-    rc_t rc = VCursorFlushPage ( self );
-    if ( rc == 0 )
-    {
-        VTable *tbl = self -> tbl;
-        if ( tbl -> read_col_cache_valid )
-        {
-            tbl -> read_col_cache_valid = false;
-            BSTreeWhack ( & tbl -> read_col_cache, VColumnRefWhack, NULL );
-        }
-        if ( tbl -> write_col_cache_valid )
-        {
-            tbl -> write_col_cache_valid = false;
-            BSTreeWhack ( & tbl -> write_col_cache, VColumnRefWhack, NULL );
-        }
-    }
-    return rc;
-}
-
-
-/* OpenParent
- *  duplicate reference to parent table
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC VCursorOpenParentUpdate ( VCursor *self, VTable **tbl )
-{
-    rc_t rc;
-
-    if ( tbl == NULL )
-        rc = RC ( rcVDB, rcCursor, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcSelf, rcNull );
-        else if ( self -> tbl -> read_only )
-            rc = RC ( rcVDB, rcCursor, rcAccessing, rcTable, rcReadonly );
-        else
-        {
-            rc = VTableAddRef ( self -> tbl );
-            if ( rc == 0 )
-            {
-                * tbl = self -> tbl;
-                return 0;
-            }
-        }
-
-        * tbl = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/vdb/wdatabase.c b/libs/vdb/wdatabase.c
deleted file mode 100644
index d597aec..0000000
--- a/libs/vdb/wdatabase.c
+++ /dev/null
@@ -1,680 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include "database-priv.h"
-#include "dbmgr-priv.h"
-#include "schema-priv.h"
-#include "schema-parse.h"
-#include "linker-priv.h"
-
-#include <kdb/kdb-priv.h>
-#include <vdb/manager.h>
-#include <vdb/database.h>
-#include <kdb/manager.h>
-#include <kdb/database.h>
-#include <kdb/meta.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * VDatabase
- *  opaque connection to a database within file system
- */
-
-
-/* StoreSchema
- */
-rc_t VDatabaseStoreSchema ( VDatabase *self )
-{
-    /* open schema node */
-    KMDataNode *node;
-    rc_t rc = KMetadataOpenNodeUpdate ( self -> meta, & node, "schema" );
-    if ( rc == 0 )
-    {
-        size_t num_writ;
-        char expr [ 256 ];
-        rc = VSchemaToText ( self -> schema, expr, sizeof expr - 1, & num_writ,
-            "%N%V", self -> sdb -> name, self -> sdb -> version );
-        if ( rc != 0 )
-            LOGERR ( klogInt, rc, "failed to determine database schema" );
-        else
-        {
-            expr [ num_writ ] = 0;
-            rc = KMDataNodeWriteAttr ( node, "name", expr );
-            if ( rc != 0 )
-                PLOGERR (klogInt, ( klogInt, rc, "failed to write database type '$(expr)'", "expr=%s", expr ));
-            else
-            {
-                /* truncate existing schema */
-                rc = KMDataNodeWrite ( node, "", 0 );
-                if ( rc == 0 )
-                {
-                    rc = VSchemaDump ( self -> schema, sdmCompact, expr,
-                        ( rc_t ( CC * ) ( void*, const void*, size_t ) ) KMDataNodeAppend, node );
-                }
-                if ( rc != 0 )
-                    PLOGERR (klogInt, ( klogInt, rc, "failed to write database schema '$(expr)'", "expr=%s", expr ));
-            }
-        }
-
-        KMDataNodeRelease ( node );
-    }
-    return rc;
-}
-
-
-/* OpenUpdate
- *  finish create operation
- */
-static
-rc_t VDatabaseOpenUpdate ( VDatabase *self, const char *decl )
-{
-    /* open metadata */
-    rc_t rc = KDatabaseOpenMetadataUpdate ( self -> kdb, & self -> meta );
-    if ( rc == 0 )
-    {
-        /* fetch stored schema */
-        rc = VDatabaseLoadSchema ( self );
-        if ( rc == 0 )
-        {
-            /* fetch requested schema */
-            const SDatabase *sdb = self -> sdb;
-            if ( decl != NULL && decl [ 0 ] != 0 )
-            {
-                uint32_t type;
-                const SNameOverload *name;
-
-                if ( self -> dad != NULL )
-                {
-                    const SDBMember *mbr = SDatabaseFind ( self -> dad -> sdb,
-                        self -> schema, & name, & type, decl, "VDatabaseOpenUpdate" );
-                    if ( mbr == NULL || type != eDBMember )
-                    {
-                        PLOGMSG ( klogWarn, ( klogWarn, "expression '$(expr)' is not a database member",
-                                   "expr=%s", decl ));
-                        sdb = NULL;
-                    }
-                    else
-                    {
-                        sdb = mbr -> db;
-                        assert ( sdb != NULL );
-                    }
-                }
-                else
-                {
-                    sdb = VSchemaFind ( self -> schema,
-                        & name, & type, decl, "VDatabaseOpenUpdate", true );
-                    if ( sdb != NULL && type != eDatabase )
-                    {
-                        PLOGMSG ( klogWarn, ( klogWarn, "expression '$(expr)' is not a database",
-                                   "expr=%s", decl ));
-                        sdb = NULL;
-                    }
-                }
-            }
-
-            /* error if the two definitions differ */
-            if ( sdb != NULL && self -> sdb != NULL && sdb != self -> sdb )
-                rc = RC ( rcVDB, rcDatabase, rcOpening, rcSchema, rcIncorrect );
-            else if ( sdb == NULL && self -> sdb == NULL )
-                rc = RC ( rcVDB, rcDatabase, rcOpening, rcSchema, rcNotFound );
-            else if ( self -> sdb == NULL )
-            {
-                /* write schema to metadata */
-                self -> sdb = sdb;
-                rc = VDatabaseStoreSchema ( self );
-            }
-            else if ( sdb != NULL )
-            {
-                /* use latest schema but don't overwrite in metadata */
-                self -> sdb = sdb;
-            }
-        }
-    }
-
-    DBGMSG(DBG_VDB, DBG_FLAG(DBG_VDB_VDB), ("VDatabaseOpenUpdate = %d\n", rc));
-
-    return rc;
-}
-
-
-/* CreateDB
- * VCreateDB
- *  create a new or open an existing database
- *
- *  "db" [ OUT ] - return parameter for newly opened database
- *
- *  "schema" [ IN ] - schema object containg database
- *  declaration to be used in creating db [ needed by manager ].
- *
- *  "decl" [ IN ] - type and optionally version of db schema
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to database
- */
-LIB_EXPORT rc_t CC VDBManagerVCreateDB ( VDBManager *self, VDatabase **dbp,
-    const VSchema *schema, const char *decl,
-    KCreateMode cmode, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( dbp == NULL )
-        rc = RC ( rcVDB, rcMgr, rcCreating, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcMgr, rcCreating, rcSelf, rcNull );
-        else if ( schema == NULL )
-            rc = RC ( rcVDB, rcMgr, rcOpening, rcSchema, rcNull );
-        else if ( decl == NULL )
-            rc = RC ( rcVDB, rcMgr, rcOpening, rcName, rcNull );
-        else if ( decl [ 0 ] == 0 )
-            rc = RC ( rcVDB, rcMgr, rcOpening, rcName, rcEmpty );
-        else
-        {
-            rc = VDatabaseMake ( dbp, self, NULL, schema );
-            if ( rc == 0 )
-            {
-                VDatabase *db = * dbp;
-
-                rc = KDBManagerVCreateDB ( self -> kmgr, & db -> kdb, cmode, path, args );
-                if ( rc == 0 )
-                {
-                    rc = VDatabaseOpenUpdate ( db, decl );
-                    if ( rc == 0 )
-                        return 0;
-
-                    rc = ResetRCContext ( rc, rcVDB, rcMgr, rcCreating );
-                }
-
-                VDatabaseWhack ( db );
-            }
-        }
-
-        * dbp = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDBManagerCreateDB ( VDBManager *self, VDatabase **db,
-    const VSchema *schema, const char *decl,
-    KCreateMode cmode, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = VDBManagerVCreateDB ( self, db, schema, decl, cmode, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseVCreateDB ( VDatabase *self, VDatabase **dbp,
-    const char *decl, KCreateMode cmode, const char *name, va_list args )
-{
-    rc_t rc;
-
-    if ( dbp == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcCreating, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcCreating, rcSelf, rcNull );
-        else if ( decl == NULL )
-            rc = RC ( rcVDB, rcMgr, rcOpening, rcName, rcNull );
-        else if ( decl [ 0 ] == 0 )
-            rc = RC ( rcVDB, rcMgr, rcOpening, rcName, rcEmpty );
-        else if ( self -> read_only )
-            rc = RC ( rcVDB, rcDatabase, rcCreating, rcDatabase, rcReadonly );
-        else
-        {
-            rc = VDatabaseMake ( dbp, self -> mgr, self, self -> schema );
-            if ( rc == 0 )
-            {
-                VDatabase *db = * dbp;
-
-                rc = KDatabaseVCreateDB ( self -> kdb, & db -> kdb, cmode, name, args );
-                if ( rc == 0 )
-                {
-                    rc = VDatabaseOpenUpdate ( db, decl );
-                    if ( rc == 0 )
-                        return 0;
-
-                    rc = ResetRCContext ( rc, rcVDB, rcDatabase, rcCreating );
-                }
-
-                VDatabaseWhack ( db );
-            }
-        }
-
-        * dbp = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseCreateDB ( VDatabase *self, VDatabase **db,
-    const char *decl, KCreateMode cmode, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VDatabaseVCreateDB ( self, db, decl, cmode, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseVDropDB ( VDatabase *self,
-                                     const char *name, va_list args)
-{
-    return KDatabaseVDropDB(self->kdb, name, args);
-}
-
-LIB_EXPORT rc_t CC VDatabaseDropDB ( VDatabase *self,
-                                    const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-    
-    va_start ( args, name );
-    rc = VDatabaseVDropDB(self, name, args);
-    va_end ( args );
-    
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseVDropTable ( VDatabase *self,
-                                    const char *name, va_list args)
-{
-    return KDatabaseVDropTable(self->kdb, name, args);
-}
-
-LIB_EXPORT rc_t CC VDatabaseDropTable ( VDatabase *self,
-                                      const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-    
-    va_start ( args, name );
-    rc = VDatabaseVDropTable(self, name, args);
-    va_end ( args );
-    
-    return rc;
-}
-
-
-/* OpenDBUpdate
- * VOpenDBUpdate
- *  open a database for read/write
- *
- *  "db" [ OUT ] - return parameter for newly opened database
- *
- *  "schema" [ IN, NULL OKAY ] - schema object containg database
- *  declaration to be used in creating db [ needed by manager ].
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to database
- */
-LIB_EXPORT rc_t CC VDBManagerVOpenDBUpdate ( VDBManager *self, VDatabase **dbp,
-    const VSchema *schema, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( dbp == NULL )
-        rc = RC ( rcVDB, rcMgr, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcMgr, rcOpening, rcSelf, rcNull );
-        else
-        {
-            if ( schema == NULL )
-                schema = self -> schema;
-
-            rc = VDatabaseMake ( dbp, self, NULL, schema );
-            if ( rc == 0 )
-            {
-                VDatabase *db = * dbp;
-
-                rc = KDBManagerVOpenDBUpdate ( self -> kmgr, & db -> kdb, path, args );
-                if ( rc == 0 )
-                {
-                    rc = VDatabaseOpenUpdate ( db, NULL );
-                    if ( rc == 0 )
-                        return 0;
-                }
-                        
-                VDatabaseWhack ( db );
-            }
-        }
-
-        * dbp = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDBManagerOpenDBUpdate ( VDBManager *self, VDatabase **db,
-    const VSchema *schema, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = VDBManagerVOpenDBUpdate ( self, db, schema, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseVOpenDBUpdate ( VDatabase *self, VDatabase **dbp,
-    const char *name, va_list args )
-{
-    rc_t rc;
-
-    if ( dbp == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcOpening, rcSelf, rcNull );
-        else if ( self -> read_only )
-            rc = RC ( rcVDB, rcDatabase, rcOpening, rcDatabase, rcReadonly );
-        else
-        {
-            rc = VDatabaseMake ( dbp, NULL, self, self -> schema );
-            if ( rc == 0 )
-            {
-                VDatabase *db = * dbp;
-
-                rc = KDatabaseVOpenDBUpdate ( self -> kdb, & db -> kdb, name, args );
-                if ( rc == 0 )
-                {
-                    rc = VDatabaseOpenUpdate ( db, NULL );
-                    if ( rc == 0 )
-                        return 0;
-                }
-
-                VDatabaseWhack ( db );
-            }
-        }
-
-        * dbp = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseOpenDBUpdate ( VDatabase *self, VDatabase **db, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VDatabaseVOpenDBUpdate ( self, db, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-/* Lock
- *  apply lock
- *
- *  if object is already locked, the operation is idempotent
- *  and returns an rc state of rcLocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC VDatabaseVLock ( VDatabase *self, uint32_t type, const char *name, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcLocking, rcSelf, rcNull );
-    else
-        rc = KDatabaseVLock ( self -> kdb, type, name, args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseLock ( VDatabase *self, uint32_t type, const char *name, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, name );
-
-    rc = VDatabaseVLock ( self, type, name, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-/* Unlock
- *  remove lock
- *
- *  if object is already unlocked, the operation is idempotent
- *  and returns an rc state of rcUnlocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptDatabase, kptTable and kptIndex
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC VDatabaseVUnlock ( VDatabase *self, uint32_t type, const char *name, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcUnlocking, rcSelf, rcNull );
-    else
-        rc = KDatabaseVUnlock ( self -> kdb, type, name, args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseUnlock ( VDatabase *self, uint32_t type, const char *name, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, name );
-
-    rc = VDatabaseVUnlock ( self, type, name, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* OpenMetadataUpdate
- *  opens metadata for update
- *
- *  "meta" [ OUT ] - return parameter for metadata
- */
-LIB_EXPORT rc_t CC VDatabaseOpenMetadataUpdate ( VDatabase *self, KMetadata **meta )
-{
-    rc_t rc;
-    if ( meta == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        * meta = NULL;
-
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            /* we operate under the notion of
-               single-threaded operation, so hand out
-               read or update capable object */
-            rc = KMetadataAddRef ( self -> meta );
-            if ( rc == 0 )
-                * meta = self -> meta;
-        }
-    }
-
-    return rc;
-}
-
-
-/* ColumnCreateParams
- *  sets the creation parameters for physical columns
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "checksum" [ IN ] - the type of checksum information to
- *  apply when writing blobs
- *
- *  "pgsize" [ IN, DEFAULT ZERO ] - size of internal column "pages"
- *  the default value is indicated by 0 ( zero ).
- *  NB - CURRENTLY THE ONLY SUPPORTED PAGE SIZE IS 1 ( ONE ) BYTE.
- */
-LIB_EXPORT rc_t CC VDatabaseColumnCreateParams ( VDatabase *self,
-    KCreateMode cmode, KChecksum checksum, size_t pgsize )
-{
-    if ( self == NULL )
-        return RC ( rcVDB, rcTable, rcUpdating, rcSelf, rcNull );
-
-    KDatabaseSetCmode ( self->kdb, cmode );
-    KDatabaseSetChecksum ( self->kdb, checksum );
-
-    self -> pgsize = pgsize;
-
-    return 0;
-}
-
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC VDatabaseOpenManagerUpdate ( VDatabase *self, VDBManager **mgr )
-{
-    rc_t rc;
-
-    if ( mgr == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = VDBManagerAddRef ( self -> mgr );
-            if ( rc == 0 )
-            {
-                * mgr = self -> mgr;
-                return 0;
-            }
-        }
-
-        * mgr = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenParent
- *  duplicate reference to parent database
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC VDatabaseOpenParentUpdate ( VDatabase *self, VDatabase **par )
-{
-    rc_t rc;
-
-    if ( par == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else if ( self -> dad != NULL && self -> dad -> read_only )
-            rc = RC ( rcVDB, rcDatabase, rcAccessing, rcDatabase, rcReadonly );
-        else
-        {
-            rc = VDatabaseAddRef ( self -> dad );
-            if ( rc == 0 )
-            {
-                * par = self -> dad;
-                return 0;
-            }
-        }
-
-        * par = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenKDatabase
- *  returns a new reference to underlying KDatabase
- */
-LIB_EXPORT rc_t CC VDatabaseOpenKDatabaseUpdate ( VDatabase *self, KDatabase **kdb )
-{
-    rc_t rc;
-
-    if ( kdb == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcAccessing, rcSelf, rcNull );
-        else if ( self -> read_only )
-            rc = RC ( rcVDB, rcDatabase, rcAccessing, rcDatabase, rcReadonly );
-        else
-        {
-            rc = KDatabaseAddRef ( self -> kdb );
-            if ( rc == 0 )
-            {
-                * kdb = self -> kdb;
-                return 0;
-            }
-        }
-
-        * kdb = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/vdb/wdbmgr.c b/libs/vdb/wdbmgr.c
deleted file mode 100644
index 911a7fe..0000000
--- a/libs/vdb/wdbmgr.c
+++ /dev/null
@@ -1,267 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define TRACK_REFERENCES 0
-/* should match dbmgr-cmn.c */
-
-#include "libvdb.vers.h"
-
-#include "dbmgr-priv.h"
-#include "schema-priv.h"
-#include "linker-priv.h"
-
-#include <vdb/manager.h>
-#include <vdb/schema.h>
-#include <vdb/vdb-priv.h>
-#include <kdb/manager.h>
-#include <kdb/kdb-priv.h>
-#include <kfs/directory.h>
-#include <kproc/lock.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * VDBManager
- *  opaque handle to library
- */
-
-
-/* MakeUpdate
- *  create library handle for specific use
- *  NB - only one of the functions will be implemented
- *
- */
-LIB_EXPORT rc_t CC VDBManagerMakeUpdate ( VDBManager ** mgrp,  KDirectory * wd )
-{
-    return VDBManagerMakeUpdateWithVFSManager ( mgrp, wd, NULL );
-}
-
-LIB_EXPORT rc_t CC VDBManagerMakeUpdateWithVFSManager ( VDBManager ** mgrp,
-    KDirectory * wd, struct VFSManager * vfs )
-{
-    rc_t rc;
-
-    if ( mgrp == NULL )
-        rc = RC ( rcVDB, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        VDBManager *mgr = malloc ( sizeof * mgr );
-        if ( mgr == NULL )
-            rc = RC ( rcVDB, rcMgr, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            rc = KDBManagerMakeUpdateWithVFSManager ( & mgr -> kmgr, wd, vfs );
-            if ( rc == 0 )
-            {
-                rc = VSchemaMakeIntrinsic ( & mgr -> schema );
-                if ( rc == 0 )
-                {
-                    rc = VLinkerMakeIntrinsic ( & mgr -> linker );
-                    if ( rc == 0 )
-                    {
-                        rc = VDBManagerConfigPaths ( mgr, true );
-                        if ( rc == 0 )
-                        {
-                            mgr -> user = NULL;
-                            mgr -> user_whack = NULL;
-                            KRefcountInit ( & mgr -> refcount, 1, "VDBManager", "make-update", "vmgr" );
-                            * mgrp = mgr;
-                            return 0;
-                        }
-
-                        VLinkerRelease ( mgr -> linker );
-                    }
-
-                    VSchemaRelease ( mgr -> schema );
-                }
-
-                KDBManagerRelease ( mgr -> kmgr );
-            }
-
-            free ( mgr );
-        }
-
-        * mgrp = NULL;
-    }
-    return rc;
-}
-
-
-/* MakeRsrc
- *  common make, regardless of library
- */
-LIB_EXPORT rc_t CC VDBManagerMakeRsrc ( VDBManager ** mgr, struct VFSManager * vfs )
-{
-    return VDBManagerMakeUpdateWithVFSManager ( mgr, NULL, vfs );
-}
-
-
-/* Version
- *  returns the library version
- */
-LIB_EXPORT rc_t CC VDBManagerVersion ( const VDBManager *self, uint32_t *version )
-{
-    if ( version == NULL )
-        return RC ( rcVDB, rcMgr, rcAccessing, rcParam, rcNull );
-    if ( self == NULL )
-        return RC ( rcVDB, rcMgr, rcAccessing, rcSelf, rcNull );
-
-    * version = LIBVDB_VERS;
-    return 0;
-}
-
-/* Lock
- *  apply lock
- *
- *  if object is already locked, the operation is idempotent
- *  and returns an rc state of rcLocked
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC VDBManagerVLock ( VDBManager *self, const char *path, va_list args )
-{
-    if ( self == NULL )
-        return RC ( rcVDB, rcMgr, rcLocking, rcSelf, rcNull );
-    return KDBManagerVLock ( self -> kmgr, path, args );
-}
-
-LIB_EXPORT rc_t CC VDBManagerLock ( VDBManager *self, const char *path, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, path );
-
-    rc = VDBManagerVLock ( self, path, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-/* Unlock
- *  remove lock
- *
- *  if object is already unlocked, the operation is idempotent
- *  and returns an rc state of rcUnlocked
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC VDBManagerVUnlock ( VDBManager *self, const char *path, va_list args )
-{
-    if ( self == NULL )
-        return RC ( rcVDB, rcMgr, rcUnlocking, rcSelf, rcNull );
-    return KDBManagerVUnlock ( self -> kmgr, path, args );
-}
-
-LIB_EXPORT rc_t CC VDBManagerUnlock ( VDBManager *self, const char *path, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, path );
-
-    rc = VDBManagerVUnlock ( self, path, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* Drop
- *  drop an object based on its path
- *
- *  "path" [ IN ] - NUL terminated string in UTF-8 giving path to the vdb object
- */
-LIB_EXPORT rc_t CC VDBManagerVDrop ( VDBManager *self, uint32_t obj_type, const char *path, va_list args )
-{
-    if ( self != NULL )
-        return KDBManagerVDrop ( self -> kmgr, obj_type, path, args );
-
-    return RC ( rcVDB, rcMgr, rcRemoving, rcSelf, rcNull );
-}
-
-LIB_EXPORT rc_t CC VDBManagerDrop ( VDBManager *self, uint32_t obj_type, const char *path, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, path );
-
-    rc = VDBManagerVDrop ( self, obj_type, path, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* VDBManagerRunPeriodicTasks
- *  executes periodic tasks, such as cache flushing
- */
-LIB_EXPORT rc_t CC VDBManagerRunPeriodicTasks ( const VDBManager *self )
-{
-    if ( self == NULL )
-        return RC ( rcVDB, rcMgr, rcExecuting, rcSelf, rcNull );
-
-    return KDBManagerRunPeriodicTasks ( self -> kmgr );
-}
-
-/* OpenKDBManager
- *  returns a new reference to KDBManager used by VDBManager
- */
-LIB_EXPORT rc_t CC VDBManagerOpenKDBManagerUpdate ( VDBManager *self, KDBManager **kmgr )
-{
-    rc_t rc;
-
-    if ( kmgr == NULL )
-        rc = RC ( rcVDB, rcMgr, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcMgr, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = KDBManagerAddRef ( self -> kmgr );
-            if ( rc == 0 )
-            {
-                * kmgr = self -> kmgr;
-                return 0;
-            }
-        }
-
-        * kmgr = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/vdb/wlinker.c b/libs/vdb/wlinker.c
deleted file mode 100644
index f8ddbe1..0000000
--- a/libs/vdb/wlinker.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define TRACK_REFERENCES 0
-
-#include "linker-priv.h"
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-extern VTRANSFACT_DECL ( meta_write );
-extern VTRANSFACT_DECL ( meta_attr_write );
-
-/* newly imported things */
-extern VTRANSFACT_DECL ( NCBI_csra2_stats_trigger );
-extern VTRANSFACT_DECL ( NCBI_SRA_cmp_stats_trigger );
-extern VTRANSFACT_DECL ( NCBI_SRA_cmpf_stats_trigger );
-extern VTRANSFACT_DECL ( NCBI_SRA_extract_name_fmt );
-extern VTRANSFACT_DECL ( NCBI_SRA_extract_spot_name );
-extern VTRANSFACT_DECL ( NCBI_SRA_phred_stats_trigger );
-extern VTRANSFACT_DECL ( NCBI_SRA_qual4_encode );
-extern VTRANSFACT_DECL ( NCBI_SRA_stats_trigger );
-#if HAVE_ALIGN_STATS_TRIGGER
-extern VTRANSFACT_DECL ( NCBI_align_stats_trigger );
-extern VTRANSFACT_DECL ( NCBI_seq_stats_trigger );
-#endif
-extern VTRANSFACT_DECL ( NCBI_refSeq_stats );
-extern VTRANSFACT_DECL ( idx_text_insert );
-extern VTRANSFACT_DECL ( vdb_bzip );
-extern VTRANSFACT_DECL ( vdb_checksum );
-extern VTRANSFACT_DECL ( vdb_fzip );
-extern VTRANSFACT_DECL ( vdb_rlencode );
-extern VTRANSFACT_DECL ( vdb_zip );
-
-/* InitFactories
- */
-rc_t VLinkerInitFactories ( VLinker *self, struct KSymTable *tbl, struct SchemaEnv const *env )
-{
-    static VLinkerIntFactory fact [] =
-    {
-        { meta_write, "meta:write" },
-        { meta_attr_write, "meta:attr:write" },
-
-        { NCBI_csra2_stats_trigger, "NCBI:csra2:stats_trigger" },
-        { NCBI_SRA_cmp_stats_trigger, "NCBI:SRA:cmp_stats_trigger" },
-        { NCBI_SRA_cmpf_stats_trigger, "NCBI:SRA:cmpf_stats_trigger" },
-        { NCBI_SRA_extract_name_fmt, "NCBI:SRA:extract_name_fmt" },
-        { NCBI_SRA_extract_spot_name, "NCBI:SRA:extract_spot_name" },
-        { NCBI_SRA_phred_stats_trigger, "NCBI:SRA:phred_stats_trigger" },
-        { NCBI_SRA_qual4_encode, "NCBI:SRA:qual4_encode" },
-        { NCBI_SRA_stats_trigger, "NCBI:SRA:stats_trigger" },
-#if HAVE_ALIGN_STATS_TRIGGER
-        { NCBI_align_stats_trigger, "NCBI:align:stats_trigger" },
-        { NCBI_seq_stats_trigger, "NCBI:seq:stats_trigger" },
-#endif
-        { NCBI_refSeq_stats, "NCBI:refSeq:stats" },
-        { idx_text_insert, "idx:text:insert" },
-        { vdb_bzip, "vdb:bzip" },
-        { vdb_checksum, "vdb:checksum" },
-        { vdb_fzip, "vdb:fzip" },
-        { vdb_rlencode, "vdb:rlencode" },
-        { vdb_zip, "vdb:zip" }
-    };
-
-    rc_t rc = VLinkerInitFactoriesRead ( self, tbl, env );
-    if ( rc == 0 )
-        rc = VLinkerAddFactories ( self, fact, sizeof fact / sizeof fact [ 0 ], tbl, env );
-    return rc;
-}
diff --git a/libs/vdb/wphys.c b/libs/vdb/wphys.c
deleted file mode 100644
index 74f9950..0000000
--- a/libs/vdb/wphys.c
+++ /dev/null
@@ -1,912 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-#include <os-native.h>
-
-#define KONST
-#define SKONST
-#include "phys-priv.h"
-#include "schema-parse.h"
-#include "schema-priv.h"
-#include "schema-expr.h"
-#include "table-priv.h"
-#include "cursor-priv.h"
-#include "prod-priv.h"
-#include "prod-expr.h"
-#include "blob-priv.h"
-#include "page-map.h"
-#undef KONST
-#undef SKONST
-
-#include <vdb/vdb-priv.h>
-#include <vdb/cursor.h>
-#include <kdb/manager.h>
-#include <kdb/table.h>
-#include <kdb/column.h>
-#include <kdb/meta.h>
-#include <klib/symbol.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-
-#if VCURSOR_WRITE_MODES_SUPPORTED
-#error "only kcmInsert and kcmReplace modes supported"
-#else
-#define WHOLE_REPLACE_UPDATE 1
-#endif
-
-/*--------------------------------------------------------------------------
- * VPhysical
- */
-
-static
-rc_t VPhysicalConvertStatic ( VPhysical *self );
-
-
-/* Whack
- */
-void CC VPhysicalWhack ( void *item, void *ignore )
-{
-    VPhysical *self = item;
-    if ( self > FAILED_PHYSICAL )
-    {
-#if PROD_CACHE
-        /* detect close of static column */
-        if ( ! self -> read_only && self -> knode != NULL )
-        {
-            /* if the column is fairly large for metadata */
-            if ( KDataBufferBytes ( & self -> srow ) > 64 * 1024 )
-                /* convert it to a single blob */
-                VPhysicalConvertStatic ( self );
-        }
-#endif
-        if ( ! self -> read_only )
-        {
-            rc_t rc;
-            VCursor *curs = self -> curs;
-            VTable *tbl = curs -> tbl;
-
-            const String *name = & self -> smbr -> name -> name;
-
-            KMDataNode *col_node = tbl -> col_node;
-
-            /* create rename strings */
-            char buff [ 300 ];
-            char *oldname, *colname, *tmpname = buff;
-            int sz = snprintf ( buff, sizeof buff / 3, "%.*s.tmp",
-                ( int ) name -> size - 1, name -> addr + 1 );
-            if ( sz < 0 || sz > sizeof buff / 3 )
-            {
-                tmpname = malloc ( 3 * 4 * 1024 );
-                if ( tmpname == NULL )
-                {
-                    rc = RC ( rcVDB, rcColumn, rcClosing, rcMemory, rcInsufficient );
-                    PLOGERR ( klogSys, ( klogInt, rc, "failed to close column '$(colname)'",
-                        "colname=%.*s", ( int ) name -> size - 1, name -> addr + 1 ));
-                    return;
-                }
-
-                sz = snprintf ( tmpname, 4 * 1024, "%.*s.tmp",
-                    ( int ) name -> size - 1, name -> addr + 1 );
-                assert ( sz > 0 && sz < 4 * 1024 );
-            }
-            oldname = & tmpname [ ++ sz ];
-            colname = & oldname [ sz ];
-            sprintf ( oldname, "%.*s.old", ( int ) name -> size - 1, name -> addr + 1 );
-            sprintf ( colname, "%.*s", ( int ) name -> size - 1, name -> addr + 1 );
-
-            /* close and rename static column */
-            if ( self -> knode != NULL )
-            {
-                rc = KMDataNodeRelease ( self -> knode );
-                if ( rc != 0 )
-                {
-                    PLOGERR ( klogInt, ( klogInt, rc, "failed to release static node when closing column '$(colname)'",
-                                         "colname=%s", colname ));
-                }
-                else
-                {
-                    self -> knode = NULL;
-
-                    assert ( col_node != NULL );
-                    rc = KMDataNodeDropChild ( col_node, "%s", colname );
-                    if ( rc != 0 && GetRCState ( rc ) != rcNotFound )
-                    {
-                        PLOGERR ( klogInt, ( klogInt, rc, "failed to drop previous static node when closing column '$(colname)'",
-                                             "colname=%s", colname ));
-                    }
-                    else
-                    {
-                        rc = KMDataNodeRenameChild ( col_node, tmpname, colname );
-                        if ( rc != 0 )
-                        {
-                            PLOGERR ( klogInt, ( klogInt, rc, "failed to rename static node when closing column '$(colname)'",
-                                                 "colname=%s", colname ));
-                        }
-                        else
-                        {
-                            KTable *ktbl;
-                            rc = VTableOpenKTableUpdate ( tbl, & ktbl );
-                            if ( rc == 0 )
-                            {
-                                rc = KTableUnlock ( ktbl, kptColumn, "%s", colname );
-                                if ( rc == 0 || GetRCState ( rc ) == rcUnlocked )
-                                    rc = KTableDropColumn ( ktbl, "%s", colname );
-                                KTableRelease ( ktbl );
-                                rc = 0;
-                            }
-                        }
-                    }
-                }
-            }
-            else if ( self -> kcol != NULL )
-            {
-                KMDataNode *node;
-
-                /* write fixed length to column metadata */
-                if ( self -> fixed_len != 0 )
-                {
-                    rc = KMetadataOpenNodeUpdate ( self -> meta, & node, "row-len" );
-                    if ( rc != 0 )
-                    {
-                        PLOGERR ( klogInt, ( klogInt, rc, "failed to open '$(node)' node when closing column '$(colname)'",
-                            "node=row-len,colname=%s", colname ));
-                    }
-                    else
-                    {
-                        if ( self -> fixed_len < 0x100 )
-                        {
-                            uint8_t u8 = ( uint8_t ) self -> fixed_len;
-                            rc = KMDataNodeWriteB8 ( node, & u8 );
-                        }
-                        else if ( self -> fixed_len < 0x10000 )
-                        {
-                            uint16_t u16 = ( uint16_t ) self -> fixed_len;
-                            rc = KMDataNodeWriteB16 ( node, & u16 );
-                        }
-                        else
-                        {
-                            rc = KMDataNodeWriteB32 ( node, & self -> fixed_len );
-                        }
-                        if ( rc != 0 )
-                        {
-                            PLOGERR ( klogInt, ( klogInt, rc, "failed to update '$(node)' node when closing column '$(colname)'",
-                                "node=row-len,colname=%s", colname ));
-                        }
-
-                        KMDataNodeRelease ( node );
-                    }
-                }
-                else
-                {
-                    rc = KMetadataOpenNodeUpdate ( self -> meta, & node, NULL );
-                    if ( rc != 0 )
-                    {
-                        PLOGERR ( klogInt, ( klogInt, rc, "failed to open '$(node)' node when closing column '$(colname)'",
-                            "node=/,colname=%s", colname ));
-                    }
-                    else
-                    {
-                        rc = KMDataNodeDropChild ( node, "row-len" );
-                        if ( rc == 0 && GetRCState ( rc ) != rcNotFound )
-                        {
-                            PLOGERR ( klogInt, ( klogInt, rc, "failed to update '$(node)' node when closing column '$(colname)'",
-                                "node=row-len,colname=%s", colname ));
-                        }
-
-                        KMDataNodeRelease ( node );
-                    }
-                }
-
-                /* close column */
-                rc = KMetadataRelease ( self -> meta );
-                if ( rc != 0 )
-                    PLOGERR ( klogInt, ( klogInt, rc, "failed to release column '$(colname)'", "colname=%s", colname ));
-                else
-                {
-                    self -> meta = NULL;
-                    rc = KColumnRelease ( self -> kcol );
-                    if ( rc != 0 )
-                        PLOGERR ( klogInt, ( klogInt, rc, "failed to release column '$(colname)'", "colname=%s", colname ));
-                    else
-                    {
-                        KTable *ktbl;
-
-                        self -> kcol = NULL;
-
-                        /* access KTable */
-                        rc = VTableOpenKTableUpdate ( tbl, & ktbl );
-                        if ( rc != 0 )
-                        {
-                            PLOGERR ( klogInt, ( klogInt, rc, "failed to access physical table when closing column '$(colname)'",
-                                                 "colname=%s", colname ));
-                        }
-                        else
-                        {
-                            bool has_old;
-
-                            /* unlock existing */
-                            rc = KTableUnlock ( ktbl, kptColumn, "%s", colname );
-                            if ( rc == 0 || GetRCState ( rc ) == rcUnlocked )
-                            {
-                                has_old = true;
-
-                                /* rename existing */
-                                rc = KTableRenameColumn ( ktbl, true, colname, oldname );
-                                if ( rc != 0 )
-                                {
-                                    PLOGERR ( klogSys, ( klogInt, rc, "failed to rename previous column when closing '$(colname)'",
-                                                         "colname=%s", colname ));
-                                }
-                            }
-                            else if ( GetRCState ( rc ) == rcNotFound )
-                            {
-                                has_old = false;
-                                rc = 0;
-                            }
-                            if ( rc == 0 )
-                            {
-                                /* rename new column */
-                                rc = KTableRenameColumn ( ktbl, true, tmpname, colname );
-                                if ( rc != 0 )
-                                {
-                                    PLOGERR ( klogSys, ( klogInt, rc, "failed to rename previous column when closing '$(colname)'",
-                                                         "colname=%s", colname ));
-                                    if ( has_old )
-                                    {
-                                        rc = KTableRenameColumn ( ktbl, true, oldname, colname );
-                                        if ( rc != 0 )
-                                        {
-                                            PLOGERR ( klogSys, ( klogInt, rc, "failed to restore previous column when closing '$(colname)'",
-                                                                 "colname=%s", colname ));
-                                        }
-                                    }
-                                }
-                                else
-                                {
-                                    if ( has_old )
-                                    {
-                                        /* drop old column */
-                                        rc = KTableDropColumn ( ktbl, "%s", oldname );
-                                        if ( rc != 0 )
-                                        {
-                                            PLOGERR ( klogWarn, ( klogInt, rc, "preexisting column was not dropped when closing '$(colname)'",
-                                                                  "colname=%s", colname ));
-                                        }
-                                    }
-
-                                    KMDataNodeDropChild ( col_node, "%s", colname );
-                                }
-                            }
-
-                            KTableRelease ( ktbl );
-                        }
-                    }
-                }
-            }
-
-            if ( tmpname != buff )
-                free ( tmpname );
-        }
-
-        VPhysicalDestroy ( self );
-    }
-}
-
-/* Open
- *  open existing columns
- *  load schema definitions
- */
-rc_t VPhysicalOpenWrite ( VPhysical *self, VSchema *schema, const VTable *tbl )
-{
-#if WHOLE_REPLACE_UPDATE
-    return 0;
-#else
-    /* physical member name from schema */
-    const SPhysMember *smbr = self -> smbr;
-    const KSymbol *name = smbr -> name;
-
-    /* open column for update */
-    rc_t rc = KTableOpenColumnUpdate ( tbl -> ktbl, & self -> kcol,
-        "%.*s", ( int ) name -> name . size - 1, name -> name . addr + 1 );
-    if ( rc == 0 )
-    { 
-        /* open its metadata */
-        rc = KColumnOpenMetadataUpdate ( self -> kcol, & self -> meta );
-        if ( rc == 0 )
-        {
-            /* finish off common initialization */
-            rc = VPhysicalFinishKColumn ( self, schema, smbr );
-            if(rc==0) rc = VPhysicalLazySetRange(self);
-        }
-    }
-
-    /* it's okay if a column doesn't exist -
-       it'll either be created or will exist as a static */
-    else if ( GetRCState ( rc ) == rcNotFound )
-    {
-        rc = 0;
-    }
-
-    if ( rc == 0 && self -> kcol == NULL )
-    {
-        /* look for static */
-        const KMDataNode *node;
-        assert ( tbl -> col_node != NULL );
-        rc = KMDataNodeOpenNodeRead ( tbl -> col_node, & node,
-            "%.*s", ( int ) name -> name . size - 1, name -> name . addr + 1 );
-        if ( rc == 0 )
-        {
-            /* reopen for update */
-            KMDataNodeRelease ( node );
-            rc = KMDataNodeOpenNodeUpdate ( tbl -> col_node, & self -> knode,
-                "%.*s", ( int ) name -> name . size - 1, name -> name . addr + 1 );
-            if ( rc == 0 )
-            {
-                /* finish off common initialization */
-                rc = VPhysicalFinishStatic ( self, schema, smbr );
-            }
-        }
-        else if ( GetRCState ( rc ) == rcNotFound )
-        {
-            rc = 0;
-        }
-    }
-
-    return rc;
-#endif
-}
-
-static
-rc_t VPhysicalCreateStatic ( VPhysical *self, const VBlob *vblob )
-{
-    rc_t rc;
-    const String *name;
-
-    VCursor *curs = self -> curs;
-    VTable *tbl = curs -> tbl;
-
-    KMDataNode *col_node = tbl -> col_node;
-    assert ( col_node != NULL );
-
-    /* create node */
-    name = & self -> smbr -> name -> name;
-    rc = KMDataNodeOpenNodeUpdate ( col_node, & self -> knode,
-        "%.*s.tmp", ( int ) name -> size - 1, name -> addr + 1 );
-    if ( rc == 0 )
-    {
-        /* type */
-        char typedecl [ 256 ];
-        rc = VTypedeclToText ( & self -> smbr -> td,
-            curs -> schema, typedecl, sizeof typedecl );
-        if ( rc == 0 )
-            rc = KMDataNodeWriteAttr ( self -> knode, "type", typedecl );
-        if ( rc == 0 )
-        {
-            /* open row */
-            KMDataNode *row;
-            rc = KMDataNodeOpenNodeUpdate ( self -> knode, & row, "row" );
-            if ( rc == 0 )
-            {
-                /* keep a copy of the original */
-                rc = KDataBufferSub ( & vblob -> data, & self -> srow, 0, UINT64_MAX );
-                if ( rc == 0 )
-                {
-                    /* total bits in static row */
-                    uint64_t row_bits = KDataBufferBits ( & vblob -> data );
-
-                    /* check for need to reverse byte order */
-                    bool reverse;
-                    rc = KMDataNodeByteOrder ( row, & reverse );
-                    if ( rc == 0 )
-                    {
-                        KDataBuffer data;
-
-                        /* if the output metadata file is in native byte order */
-                        if ( ! reverse )
-                            rc = KDataBufferSub ( & vblob -> data, & data, 0, UINT64_MAX );
-                        else
-                        {
-                            /* find the datatype for static column */
-                            const SDatatype *dt = VSchemaFindTypeid ( curs -> schema,
-                                self -> smbr -> td . type_id );
-                            assert ( dt != NULL );
-
-                            /* if the type does not need swapping */
-                            if ( dt -> byte_swap == NULL )
-                                rc = KDataBufferSub ( & vblob -> data, & data, 0, UINT64_MAX );
-                            else
-                            {
-                                /* swap into a writable buffer */
-                                rc = KDataBufferMake ( & data, vblob -> data . elem_bits, vblob -> data . elem_count );
-                                if ( rc == 0 )
-                                {
-                                    ( * dt -> byte_swap ) ( data . base,
-                                        vblob -> data . base, ( uint32_t ) ( row_bits / dt -> size ) );
-                                }
-                            }
-                        }
-                        if ( rc == 0 )
-                        {
-                            /* write row */
-                            rc = KMDataNodeWrite ( row, data . base, ( size_t ) ( ( row_bits + 7 ) >> 3 ) );
-                            if ( rc == 0 )
-                            {
-                                /* if row-bits are not integral bytes */
-                                if ( ( row_bits & 7 ) != 0 )
-                                {
-                                    /* record them in a size node */
-                                    KMDataNode *size;
-                                    rc = KMDataNodeOpenNodeUpdate ( self -> knode, & size, "size" );
-                                    if ( rc == 0 )
-                                    {
-                                        rc = KMDataNodeWriteB64 ( size, & row_bits );
-                                        KMDataNodeRelease ( size );
-                                    }
-                                }
-                            }
-
-                            KDataBufferWhack ( & data );
-                        }
-                    }
-                }
-
-                KMDataNodeRelease ( row );
-            }
-        }
-
-        if ( rc != 0 )
-        {
-            KMDataNodeRelease ( self -> knode ), self -> knode = NULL;
-            KMDataNodeDropChild ( col_node, "%.*s", ( int ) name -> size - 1, name -> addr + 1 );
-            KDataBufferWhack ( & self -> srow );
-        }
-        else
-        {
-            self -> sstart_id = vblob -> start_id;
-            self -> sstop_id = vblob -> stop_id;
-            self -> fixed_len = PageMapGetIdxRowInfo ( vblob -> pm, 0, NULL, NULL );
-        }
-    }
-    
-    return rc;
-}
-
-static
-rc_t VPhysicalCreateKColumn ( VPhysical *self )
-{
-    rc_t rc;
-    VCursor *curs = self -> curs;
-    const SPhysMember *smbr = self -> smbr;
-    VTable *tbl = curs -> tbl;
-    const String *name = & smbr -> name -> name;
-
-    /* check for static designation */
-    if ( smbr -> stat )
-    {
-        rc = RC ( rcVDB, rcColumn, rcCreating, rcConstraint, rcViolated );
-        return rc;
-    }
-
-    /* create physical column */
-    rc = KTableCreateColumn ( tbl -> ktbl, & self -> kcol,
-        ( KCreateMode ) tbl -> cmode, ( KChecksum ) tbl -> checksum, tbl -> pgsize, 
-        "%.*s.tmp", ( int ) name -> size - 1, name -> addr + 1 );
-    if ( rc == 0 )
-    {
-        /* create its metadata */
-        rc = KColumnOpenMetadataUpdate ( self -> kcol, & self -> meta );
-        if ( rc == 0 )
-        {
-            /* print typedecl */
-            char buffer [ 256 ];
-            rc = VTypedeclToText ( & smbr -> td,
-                curs -> schema, buffer, sizeof buffer );
-            if ( rc == 0 )
-            {
-                /* create schema node */
-                KMDataNode *schema_node;
-                rc = KMetadataOpenNodeUpdate ( self -> meta, & schema_node, "schema" );
-                if ( rc == 0 )
-                {
-                    /* write column type */
-                    rc = KMDataNodeWriteAttr ( schema_node, "type", buffer );
-                    if ( rc == 0 )
-                    {
-                        /* going to write some schema */
-                        if ( smbr -> type == NULL )
-                        {
-                            /* buffer already contains datatype */
-                            if ( smbr -> td . dim != 1 )
-                            {
-                                /* get just the typename */
-                                /* these statements do nothing! gcc points it out in a warning.
-                                VTypedecl td = smbr -> td;
-                                td . dim = 1;
-                                */
-                                rc = VTypedeclToText ( & smbr -> td,
-                                    curs -> schema, buffer, sizeof buffer );
-                            }
-                        }
-                        else
-                        {
-                            size_t num_writ;
-
-                            /* get physical type expression */
-                            rc = VSchemaToText ( curs -> schema,
-                                buffer, sizeof buffer, & num_writ, "%E", smbr -> type );
-                            if ( rc == 0 )
-                            {
-                                buffer [ num_writ ] = 0;
-                                rc = KMDataNodeWriteAttr ( schema_node, "expr", buffer );
-                                if ( rc == 0 )
-                                {
-                                    const SPhysical *sphys = ( ( const SPhysEncExpr* ) smbr -> type ) -> phys;
-                                    rc = VSchemaToText ( curs -> schema,
-                                        buffer, sizeof buffer, & num_writ, "%N%V",
-                                        sphys -> name, sphys -> version );
-                                    if ( rc == 0 )
-                                        buffer [ num_writ ] = 0;
-                                }
-                            }
-                        }
-                    }
-                    if ( rc == 0 )
-                    {
-                        rc = VSchemaDump ( curs -> schema, sdmCompact, buffer,
-                           ( rc_t ( CC * ) ( void*, const void*, size_t ) ) KMDataNodeAppend, schema_node );
-                        if ( rc == 0 )
-                        {
-                            /* mark it empty */
-                            self -> kstart_id = 1;
-                            self -> kstop_id = 0;
-                        }
-                    }
-                }
-
-                KMDataNodeRelease ( schema_node );
-            }
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t VPhysicalWriteKColumn ( VPhysical *self, const VBlob *vblob )
-{
-    KColumnBlob *kblob;
-    rc_t rc = KColumnCreateBlob ( self -> kcol, & kblob );
-    if ( rc == 0 )
-    {
-        /* for now, row counts are 32-bit */
-        uint32_t count = (uint32_t)(vblob -> stop_id - vblob -> start_id + 1);
-        rc = KColumnBlobAssignRange ( kblob, vblob -> start_id, count );
-        if ( rc == 0 )
-        {
-            rc = KColumnBlobAppend ( kblob, vblob -> data . base, KDataBufferBytes ( & vblob -> data ) );
-            if ( rc == 0 )
-            {
-                rc = KColumnBlobCommit ( kblob );
-                if ( rc == 0 )
-                {
-                    /* get the fixed row-length of this blob */
-                    uint32_t blob_fixed = VBlobFixedRowLength ( vblob );
-
-                    /* detect if the column is truly fixed row length */
-                    if ( self -> kstart_id > self -> kstop_id )
-                        self -> fixed_len = blob_fixed;
-                    else if ( blob_fixed != self -> fixed_len )
-                        self -> fixed_len = 0;
-
-                    /* incorporate id range into our view of the world */
-                    if ( vblob -> start_id < self -> kstart_id )
-                        self -> kstart_id = vblob -> start_id;
-                    if ( vblob -> stop_id > self -> kstop_id )
-                        self -> kstop_id = vblob -> stop_id;
-                }
-            }
-        }
-
-        KColumnBlobRelease ( kblob );
-    }
-    return rc;
-}
-
-static
-rc_t VPhysicalConvertStatic ( VPhysical *self )
-{
-#if ! PROD_CACHE
-    return RC ( rcVDB, rcColumn, rcConverting, rcFunction, rcUnsupported );
-#else
-    rc_t rc = VPhysicalCreateKColumn ( self );
-    if ( rc == 0 )
-    {
-        int64_t sstart_id, sstop_id;
-
-        /* save incoming blob cache on stack */
-        VBlob *cache [ PROD_CACHE ];
-        assert ( sizeof cache == sizeof self -> in -> cache );
-        memcpy ( cache, self -> in -> cache, sizeof cache );
-
-        /* set incoming blob cache to empty */
-        memset ( self -> in -> cache, 0, sizeof self -> in -> cache );
-
-        for ( sstart_id = self -> sstart_id;
-              rc == 0 && sstart_id <= self -> sstop_id;
-              sstart_id = sstop_id + 1 )
-        {
-            /* 3G rows */
-            sstop_id = sstart_id + 0xC0000000;
-            assert ( sstop_id > sstart_id );
-
-            /* limit to actual end */
-            if ( sstop_id > self -> sstop_id )
-                sstop_id = self -> sstop_id;
-
-            /* don't create tiny additional blobs */
-            else if ( ( self -> sstop_id - sstop_id ) < 1000 )
-                sstop_id = self -> sstop_id;
-
-            /* recreate a VBlob from static that can be sent through encoding */
-            rc = VBlobCreateFromSingleRow ( & self -> in -> cache [ 0 ],
-                sstart_id, sstop_id, & self -> srow, vboNative );
-            if ( rc == 0 )
-            {
-                /* get an encoded version of static blob */
-                VBlob *vblob;
-                rc = VProductionReadBlob ( self -> b2s, & vblob, sstart_id, 1,NULL );
-                if ( rc == 0 )
-                {
-                    /* write encoded blob to physical */
-                    rc = VPhysicalWriteKColumn ( self, vblob );
-
-                    /* in all events, release blob */
-                    TRACK_BLOB ( VBlobRelease, vblob );
-                    ( void ) VBlobRelease ( vblob );
-                }
-            
-                /* release the blob from static */
-                TRACK_BLOB ( VBlobRelease, self -> in -> cache [ 0 ] );
-                ( void ) VBlobRelease ( self -> in -> cache [ 0 ] );
-            }
-        }
-
-        /* restore cache from stack */
-        memcpy ( self -> in -> cache, cache, sizeof self -> in -> cache );
-
-        if ( rc == 0 )
-        {
-            const String *name;
-            VCursor *curs = self -> curs;
-            VTable *tbl = curs -> tbl;
-
-            /* tear down static */
-            KMDataNodeRelease ( self -> knode );
-            self -> knode = NULL;
-
-            /* delete column from table */
-            name = & self -> smbr -> name -> name;
-            assert ( tbl -> col_node != NULL );
-            rc = KMDataNodeDropChild ( tbl -> col_node,
-                "%.*s.tmp", ( int ) name -> size - 1, name -> addr + 1 );
-        }
-    }
-
-    return rc;
-#endif
-}
-
-static
-rc_t KMDataNodeWriteId ( KMDataNode *self, int64_t id )
-{
-    int32_t i32;
-    
-    if ( id >= -128 && id < 128 )
-    {
-        int8_t i8 = ( int8_t ) id;
-        return KMDataNodeWriteB8 ( self, & i8 );
-    }
-    if ( id >= -32768 && id < 32768 )
-    {
-        int16_t i16 = ( int16_t ) id;
-        return KMDataNodeWriteB16 ( self, & i16 );
-    }
-    
-    i32 = ( int32_t ) id;
-    if ( ( int64_t ) i32 == id )
-        return KMDataNodeWriteB32 ( self, & i32 );
-    
-    return KMDataNodeWriteB64 ( self, & id );
-}
-
-static
-rc_t KMDataNodeWriteCount ( KMDataNode *self, uint64_t count )
-{
-    if ( count < 0x100 )
-    {
-        uint8_t i8 = ( uint8_t ) count;
-        return KMDataNodeWriteB8 ( self, & i8 );
-    }
-    if ( count < 0x10000 )
-    {
-        uint16_t i16 = ( uint16_t ) count;
-        return KMDataNodeWriteB16 ( self, & i16 );
-    }
-    if ( ( count >> 32 ) == 0 )
-    {
-        uint32_t i32 = ( uint32_t ) count;
-        return KMDataNodeWriteB32 ( self, & i32 );
-    }
-    return KMDataNodeWriteB64 ( self, & count );
-}
-
-static
-rc_t VPhysicalSetStaticId ( VPhysical *self )
-{
-    KMDataNode *node;
-    rc_t rc = KMDataNodeOpenNodeUpdate ( self -> knode, & node, "start_id" );
-    if ( rc == 0 )
-    {
-        rc = KMDataNodeWriteId ( node, self -> sstart_id );
-        KMDataNodeRelease ( node );
-
-        if ( rc == 0 )
-        {
-            rc = KMDataNodeOpenNodeUpdate ( self -> knode, & node, "row_count" );
-            if ( rc == 0 )
-            {
-                rc = KMDataNodeWriteCount ( node, self -> sstop_id - self -> sstart_id + 1 );
-                KMDataNodeRelease ( node );
-            }
-        }
-    }
-    return rc;
-}
-
-static
-rc_t VPhysicalWrite ( VPhysical *self, int64_t id, uint32_t cnt )
-{
-    /* read from page space */
-    VBlob *vblob;
-    rc_t rc = VProductionReadBlob ( self -> in, & vblob, id , cnt,NULL);
-    if ( rc == 0 )
-    {
-        /* test for single row in blob */
-        assert ( vblob != NULL );
-        if ( VBlobIsSingleRow ( vblob ) )
-        {
-            /* new column */
-            if ( self -> knode == NULL && self -> kcol == NULL )
-            {
-                rc = VPhysicalCreateStatic ( self, vblob );
-                TRACK_BLOB ( VBlobRelease, vblob );
-                ( void ) VBlobRelease ( vblob );
-                if ( rc == 0 )
-                    rc = VPhysicalSetStaticId ( self );
-                return rc;
-            }
-
-            /* existing static column */
-            if ( self -> knode != NULL )
-            {
-                /* not allowing both to be active at the same time */
-                assert ( self -> kcol == NULL );
-
-                /* overlapping or adjacent id ranges */
-                assert ( vblob -> start_id <= vblob -> stop_id );
-                if ( vblob -> stop_id + 1 >= self -> sstart_id &&
-                     vblob -> start_id <= self -> sstop_id + 1 )
-                {
-                    /* compare lengths */
-                    if ( self -> fixed_len == PageMapGetIdxRowInfo ( vblob -> pm, 0, NULL, NULL ) )
-                    {
-                        /* compare bits */
-                        assert ( KDataBufferBits ( & self -> srow ) == KDataBufferBits ( & vblob -> data ) );
-                        if ( bitcmp ( self -> srow . base, self -> srow . bit_offset,
-                                      vblob -> data . base, vblob -> data . bit_offset,
-                                      KDataBufferBits ( & self -> srow ) ) == 0 )
-                        {
-                            /* it's fine */
-                            if ( vblob -> start_id < self -> sstart_id )
-                                self -> sstart_id = vblob -> start_id;
-                            if ( vblob -> stop_id > self -> sstop_id )
-                                self -> sstop_id = vblob -> stop_id;
-
-                            TRACK_BLOB ( VBlobRelease, vblob );
-                            ( void ) VBlobRelease ( vblob );
-
-                            return VPhysicalSetStaticId ( self );
-                        }
-                    }
-                }
-            }
-        }
-
-        /* At this point we can no longer be a static row:
-         * the current blob might have been more than a single row, or
-         * it might have been unable to extend range of static as a single row */
-        if ( self -> knode != NULL )
-            rc = VPhysicalConvertStatic ( self );
-
-        /* need to write to KColumn */
-        if ( rc == 0 )
-        {
-            /* not allowing both knode and kcol to be active at the same time */
-            assert ( self -> knode == NULL );
-
-            /* create KColumn if necessary */
-            if ( self -> kcol == NULL )
-                rc = VPhysicalCreateKColumn ( self );
-
-            /* pull through encoding */
-            if ( rc == 0 )
-            {
-                TRACK_BLOB ( VBlobRelease, vblob );
-                ( void ) VBlobRelease ( vblob );
-                rc = VProductionReadBlob ( self -> b2s, & vblob, id, cnt,NULL );
-                if ( rc == 0 )
-                {
-                    /* write encoded blob to physical */
-                    rc = VPhysicalWriteKColumn ( self, vblob );
-                }
-            }
-        }
-
-        TRACK_BLOB ( VBlobRelease, vblob );
-        ( void ) VBlobRelease ( vblob );
-    }
-
-    return rc;
-}
-
-/* Read
- *  get the blob
- */
-rc_t VPhysicalRead ( VPhysical *self, VBlob **vblob, int64_t id, uint32_t cnt, uint32_t elem_bits )
-{
-    /* use this as the chance to read from input */
-    if ( self -> in != NULL )
-    {
-        rc_t rc = VPhysicalWrite ( self, id, cnt );
-        if ( rc != 0 )
-        {
-            * vblob = NULL;
-            return rc;
-        }
-    }
-
-    /* now let read-side do its work */
-    return VPhysicalReadBlob ( self, vblob, id, elem_bits );
-}
diff --git a/libs/vdb/wprod.c b/libs/vdb/wprod.c
deleted file mode 100644
index dafb8bb..0000000
--- a/libs/vdb/wprod.c
+++ /dev/null
@@ -1,439 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#define TRACK_REFERENCES 0
-
-#define KONST const
-#include "prod-priv.h"
-#include "prod-expr.h"
-#include "schema-priv.h"
-#include "schema-expr.h"
-#include "cursor-priv.h"
-#include "column-priv.h"
-#include "phys-priv.h"
-#undef KONST
-
-#include <vdb/cursor.h>
-#include <klib/symbol.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-
-/*--------------------------------------------------------------------------
- * VProdResolve
- */
-
-/* ResolveColumn
- *  resolves a column using read/write expression
- */
-rc_t VProdResolveColumnRoot ( const VProdResolve *self,
-    VProduction **out, const SColumn *scol )
-{
-    rc_t rc;
-    WColumn *wcol;
-    VTypedesc desc;
-    const char *name;
-    VCursor *curs = self -> curs;
-    VProduction * in;
-
-    * out = NULL;
-
-    /* decide upon behavior */
-    if ( curs -> read_only )
-    {
-        rc = VProdResolveColumnRead ( self, out, scol );
-        if ( rc == 0 && * out <= FAILED_PRODUCTION )
-            return RC ( rcVDB, rcCursor, rcOpening, rcColumn, rcUndefined );
-        return rc;
-    }
-
-    /* write-only cursor must have existing column */
-    wcol = VCursorCacheGet ( & curs -> col, & scol -> cid );
-    if ( wcol == NULL )
-        return 0;
-
-    /* not intended to be reentrant */
-    assert ( wcol -> val == NULL );
-
-    /* evaluate input expression */
-    if ( scol -> validate == NULL )
-    {
-        /* use normal read expression */
-        rc = VProdResolveColumnRead ( self, &in, scol );
-    }
-    else
-    {
-        VFormatdecl fd;
-        
-        /* create fmtdecl from typedecl */
-        memset ( & fd, 0, sizeof fd );
-
-        VDB_DEBUG ( ( "resolving column '%N' validate expression.\n", scol -> name ) );
-
-        /* use validation expression */
-        rc = VProdResolveExpr ( self, &in, & desc, & fd, scol -> validate, false );
-    }
-
-    /* check failures */
-    if ( rc != 0 )
-    {
-        VDB_DEBUG ( ( "failed to resolve column '%N' - %R.\n", scol -> name, rc ) );
-        return rc;
-    }
-    if ( in <= FAILED_PRODUCTION )
-    {
-        VDB_DEBUG ( ( "failed to resolve column '%N' - NULL or failed production.\n", scol -> name ) );
-        return RC ( rcVDB, rcCursor, rcOpening, rcColumn, rcUndefined );
-    }
-
-    /* column name */
-    name = scol -> name -> name . addr;
-
-    /* pick up production */
-    if ( scol -> validate != NULL )
-    {
-        rc = VSimpleProdMake ( & wcol -> val, self -> owned, self -> curs,
-            prodSimpleCast, name, NULL, NULL, NULL, in, chainDecoding );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* create implicit comparison function */
-    else
-    {
-        /* need an output production */
-        if ( wcol -> out == NULL )
-        {
-            rc = VColumnProdMake ( & wcol -> out, self -> owned,
-                & wcol -> dad, prodColumnOut, name );
-            if ( rc != 0 )
-                return rc;
-        }
-
-        /* create comparison func */
-        rc = VFunctionProdMakeBuiltInComp ( & wcol -> val, self -> owned,
-            name, self, wcol -> out, in );
-        if ( rc != 0 )
-            return rc;
-    }
-
-    /* install trigger */
-    rc = VectorAppend ( & curs -> trig, NULL, wcol -> val );
-    if ( rc == 0 )
-        * out = wcol -> val;
-
-    return rc;
-}
-
-rc_t VProdResolveColumn ( const VProdResolve *self,
-    VProduction **out, const SColumn *scol, bool alt )
-{
-    rc_t rc;
-    VColumn *vcol;
-    WColumn *wcol;
-    VCursor *curs = self -> curs;
-
-    /* decide upon behavior */
-    if ( curs -> read_only )
-    {
-        if ( alt )
-        {
-            /* TODO: Generate warning message */
-            return RC ( rcVDB, rcCursor, rcOpening, rcSchema, rcInvalid );
-        }
-        vcol = VCursorCacheGet ( & curs -> col, & scol -> cid );
-        if ( vcol == NULL )
-        {
-            rc = VCursorMakeColumn ( curs, & vcol, scol, self -> cx_bind );
-            if ( rc != 0 )
-                return rc;
-
-#if OPEN_COLUMN_ALTERS_ROW
-            rc = VectorAppend ( & curs -> row, & vcol -> ord, vcol );
-            if ( rc != 0 )
-            {
-                VColumnWhack ( vcol, NULL );
-                return rc;
-            }
-#endif
-            rc = VCursorCacheSet ( & curs -> col, & scol -> cid, vcol );
-            if ( rc != 0 )
-            {
-#if OPEN_COLUMN_ALTERS_ROW
-                void *ignore;
-                VectorSwap ( & curs -> row, vcol -> ord, NULL, & ignore );
-                vcol -> ord = 0;
-#endif
-                VColumnWhack ( vcol, NULL );
-                return rc;
-            }
-        }
-
-        return VProdResolveColumnRead ( self, out, scol );
-    }
-
-    /* write cursor but read side */
-    if ( self -> chain == chainDecoding )
-    {
-        if ( alt )
-        {
-            /* TODO: Generate warning message */
-            return RC ( rcVDB, rcCursor, rcOpening, rcSchema, rcInvalid );
-        }
-
-        return VProdResolveColumnRead ( self, out, scol );
-    }
-
-    /* get existing column */
-    wcol = VCursorCacheGet ( & curs -> col, & scol -> cid );
-    if ( wcol == NULL )
-    {
-        /* normally write-only cursor must have existing column */
-        if ( ! self -> discover_writable_columns )
-            return 0;
-
-        /* auto-create writable column for purposes of discovery */
-        if ( scol -> read_only )
-            return 0;
-        rc = VCursorMakeColumn ( curs, & vcol, scol, self -> cx_bind );
-        if ( rc != 0 )
-            return rc;
-
-        /* add it to the row as if user had done it */
-        rc = VectorAppend ( & curs -> row, & vcol -> ord, vcol );
-        if ( rc == 0 )
-        {
-            /* add it to the indexed vector */
-            rc = VCursorCacheSet ( & curs -> col, & scol -> cid, vcol );
-            if ( rc != 0 )
-            {
-                void *ignore;
-                VectorSwap ( & curs -> row, vcol -> ord, NULL, & ignore );
-                vcol -> ord = 0;
-            }
-        }
-
-        if ( rc != 0 )
-        {
-            VColumnWhack ( vcol, NULL );
-            return rc;
-        }
-
-        wcol = ( WColumn* ) vcol;
-    }
-
-    /* create output production as required */
-    if ( wcol -> out == NULL )
-    {
-        const char *name = scol -> name -> name . addr;
-        rc = VColumnProdMake ( & wcol -> out, self -> owned,
-            & wcol -> dad, prodColumnOut, name );
-        if ( rc != 0 )
-            return rc;
-    }
-    if ( alt )
-    {
-        * out = wcol -> dad . in;
-        assert ( * out != NULL );
-    }
-    else
-    {
-        * out = wcol -> out;
-    }
-    return 0;
-}
-
-/* ResolvePhysical
- *  resolves a physical column
- */
-static
-rc_t VProdResolvePhysicalWrite ( const VProdResolve *self, VPhysical *phys )
-{
-    VTypedesc desc;
-    VFormatdecl fd;
-    VProdResolve pr;
-    VProduction *prod;
-    VCursor *curs = self -> curs;
-
-    const char *name;
-    const SExpression *enc;
-    const SPhysMember *smbr;
-
-    /* open the physical column for write
-       load column metadata/schema, complete
-       physical member description. */
-    rc_t rc = VPhysicalOpenWrite ( phys,
-        ( VSchema* ) self -> schema, curs -> tbl );
-    if ( rc != 0 )
-        return rc;
-
-    /* there are two conditions under which a physical member
-       definition would be incommplete prior to opening the
-       column: 1) if the physical column were only forwarded
-       within table schema, or 2) if the column were added as
-       the result of a file system scan.
-
-       for the column to be writable, it must have had a complete
-       member definition from table schema, with a type and an
-       assignment expression, or it must have been added as the
-       result of an fs scan with a simple reciprocal expression.
-       the test for these two cases is for a resolved typedecl
-       and an assignment expression. */
-
-    /* nothing more to do if column does not exist
-       and member was undeclared, or is declared read-only */
-    smbr = phys -> smbr;
-    if ( smbr -> td . type_id == 0 || smbr -> expr == NULL )
-        return 0;
-
-    /* build fmtdecl */
-    fd . td = smbr -> td;
-    fd . fmt = 0;
-
-    /* shift to encode chain */
-    pr = * self;
-    pr . chain = chainEncoding;
-
-    /* resolve the input expression */
-    rc = VProdResolveExpr ( & pr, & phys -> in, & desc, & fd, smbr -> expr, false );
-    if ( rc == 0 && phys -> in == NULL )
-        return RC ( rcVDB, rcCursor, rcOpening, rcColumn, rcUndefined );
-
-    /* NB - at this point, fd and desc
-       represent the column's well-defined type */
-
-    /* member name */
-    name = smbr -> name -> name . addr;
-
-    /* physical encoding */
-    enc = phys -> enc;
-    if ( enc == NULL )
-        enc = smbr -> type;
-
-    /* build encoding schema in steps:
-         in <- page-to-blob
-    */
-    rc = VSimpleProdMake ( & prod, pr . owned,  pr . curs,
-        prodSimplePage2Blob, name, & fd, & desc, NULL, phys -> in, chainEncoding );
-    if ( rc == 0 && enc != NULL )
-    {
-        /* in <- p2b <- encoding-func */
-        pr . blobbing = true;
-        rc = VProdResolveEncodingExpr ( & pr, & prod,
-            prod, ( const SPhysEncExpr* ) enc );
-        if ( rc == 0 )
-        {
-            fd = prod -> fd;
-            desc = prod -> desc;
-        }
-    }
-    if ( rc == 0 )
-    {
-        rc = VSimpleProdMake ( & phys -> b2s, pr . owned, pr . curs,
-            prodSimpleBlob2Serial, name, & fd, & desc, NULL, prod, chainEncoding );
-    }
-
-    return rc;
-}
-
-rc_t VProdResolvePhysical ( const VProdResolve *self, VPhysical *phys )
-{
-    /* build encoding chain if writable cursor */
-    if ( ! self -> curs -> read_only )
-    {
-        rc_t rc = VProdResolvePhysicalWrite ( self, phys );
-        if ( rc != 0 || self -> discover_writable_columns )
-            return rc;
-    }
-
-    /* build decoding chain */
-    return VProdResolvePhysicalRead ( self, phys );
-}
-
-/*--------------------------------------------------------------------------
- * VColumnProd
- *  message redirect to VColumn
- */
-
-rc_t VColumnProdMake ( VProduction **prodp, Vector *owned,
-    VColumn *col, int sub, const char *name )
-{
-    const SColumn *scol = col -> scol;
-
-    /* why was this changed to get the column td from SColumn? */
-    VTypedesc desc;
-    rc_t rc = VSchemaDescribeTypedecl ( col -> schema,
-        & desc, & col -> scol -> td );
-    if ( rc != 0 )
-        * prodp = NULL;
-    else
-    {
-        VColumnProd *prod;
-
-        /* construct an fd because column does not have one */
-        VFormatdecl fd;
-        fd . td = scol -> td;
-        fd . fmt = 0;
-
-        rc = VProductionMake ( prodp, owned, sizeof * prod,
-            prodColumn, sub, name, & fd, & desc, NULL, chainEncoding );
-        if ( rc == 0 )
-        {
-            prod = ( VColumnProd* ) * prodp;
-            prod -> col = col;
-        }
-    }
-    return rc;
-}
-
-void VColumnProdDestroy ( VColumnProd *self )
-{
-}
-
-
-/* Read
- */
-rc_t VColumnProdRead ( VColumnProd *self, struct VBlob **vblob, int64_t id )
-{
-    WColumn *wcol = ( WColumn* ) self -> col;
-
-    switch ( self -> dad . sub )
-    {
-    case prodColumnOut:
-        return WColumnReadBlob ( wcol, vblob, id );
-    }
-
-    return RC ( rcVDB, rcColumn, rcReading, rcProduction, rcCorrupt );
-}
diff --git a/libs/vdb/wtable.c b/libs/vdb/wtable.c
deleted file mode 100644
index aad1cac..0000000
--- a/libs/vdb/wtable.c
+++ /dev/null
@@ -1,1055 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-#include "table-priv.h"
-#include "cursor-priv.h"
-#include "dbmgr-priv.h"
-#include "schema-priv.h"
-#include "schema-parse.h"
-#include "schema-dump.h"
-#include "database-priv.h"
-#include "linker-priv.h"
-
-#include <vdb/schema.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-#include <kdb/manager.h>
-#include <kdb/database.h>
-#include <kdb/table.h>
-#include <kdb/index.h>
-#include <kdb/column.h>
-#include <kdb/meta.h>
-#include <kdb/namelist.h>
-#include <klib/symbol.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <va_copy.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/*--------------------------------------------------------------------------
- * VTable
- *  a collection of columns indexed by row id, metadata, indices
- */
-
-
-/* StoreSchema
- *  stores schema definition in metadata
- *
- *  <schema name="">...</schema>
- */
-LIB_EXPORT rc_t VTableStoreSchema ( VTable *self )
-{
-    /* open schema node */
-    KMDataNode *node;
-    rc_t rc = KMetadataOpenNodeUpdate ( self -> meta, & node, "schema" );
-    if ( rc == 0 )
-    {
-        size_t num_writ;
-        char expr [ 256 ];
-        rc = VSchemaToText ( self -> schema, expr, sizeof expr - 1, & num_writ,
-            "%N%V", self -> stbl -> name, self -> stbl -> version );
-        if ( rc != 0 )
-            LOGERR ( klogInt, rc, "failed to determine table schema" );
-        else
-        {
-            expr [ num_writ ] = 0;
-
-            /* if table has a default view declaration,
-               store the table information under a new attribute */
-            if ( self -> stbl -> dflt_view != NULL )
-            {
-                uint32_t type;
-                const SNameOverload *name;
-                const STable *view = VSchemaFind ( self -> schema, & name, & type,
-                    self -> stbl -> dflt_view-> addr, __func__, false );
-                if ( view == NULL )
-                {
-                    rc = RC ( rcVDB, rcTable, rcUpdating, rcSchema, rcNotFound );
-                    PLOGERR ( klogInt, ( klogInt, rc, "failed to locate default view schema '$(expr)'",
-                                         "expr=%S", self -> stbl -> dflt_view ));
-                }
-                else
-                {
-                    rc = KMDataNodeWriteAttr ( node, "table", expr );
-                    if ( rc != 0 )
-                        PLOGERR ( klogInt, ( klogInt, rc, "failed to write table type '$(expr)'", "expr=%s", expr ));
-                    else
-                    {
-                        rc = VSchemaToText ( self -> schema, expr, sizeof expr - 1, & num_writ,
-                            "%N%V", view -> name, view -> version );
-                        if ( rc != 0 )
-                            LOGERR ( klogInt, rc, "failed to determine table default view schema" );
-                        else
-                            expr [ num_writ ] = 0;
-                    }
-                }
-            }
-
-            if ( rc == 0 )
-            {
-                rc = KMDataNodeWriteAttr ( node, "name", expr );
-                if ( rc != 0 )
-                    PLOGERR ( klogInt, ( klogInt, rc, "failed to write table name '$(expr)'", "expr=%s", expr ));
-            }
-            if ( rc == 0 )
-            {
-                /* truncate existing schema */
-                rc = KMDataNodeWrite ( node, "", 0 );
-                if ( rc == 0 )
-                {
-                    rc = VSchemaDump ( self -> schema, sdmCompact, expr,
-                        ( rc_t ( CC * ) ( void*, const void*, size_t ) ) KMDataNodeAppend, node );
-                }
-                if ( rc != 0 )
-                    PLOGERR ( klogInt, ( klogInt, rc, "failed to write table schema '$(expr)'", "expr=%s", expr ));
-            }
-        }
-
-        KMDataNodeRelease ( node );
-    }
-    return rc;
-}
-
-
-/* OpenUpdate
- *  finish create operation
- */
-static
-rc_t VTableOpenUpdate ( VTable *self, const char *decl )
-{
-    /* open metadata */
-    rc_t rc = KTableOpenMetadataUpdate ( self -> ktbl, & self -> meta );
-    if ( rc == 0 )
-    {
-        /* open "col" node */
-        rc = KMetadataOpenNodeUpdate ( self -> meta, & self -> col_node, "col" );
-        if ( rc == 0 )
-        {
-            /* fetch stored schema */
-            rc = VTableLoadSchema ( self );
-            if ( rc == 0 )
-            {
-                /* fetch requested schema */
-                const STable *stbl = self -> stbl;
-                if ( decl != NULL && decl [ 0 ] != 0 )
-                {
-                    uint32_t type;
-                    const SNameOverload *name;
-
-                    if ( self -> db != NULL )
-                    {
-                        const STblMember *mbr = SDatabaseFind ( self -> db -> sdb,
-                            self -> schema, & name, & type, decl, "VTableOpenUpdate" );
-                        if ( mbr == NULL || type != eTblMember )
-                        {
-                            PLOGMSG ( klogWarn, ( klogWarn, "expression '$(expr)' is not a table member",
-                                       "expr=%s", decl ));
-                            stbl = NULL;
-                        }
-                        else
-                        {
-                            stbl = mbr -> tbl;
-                            assert ( stbl != NULL );
-                        }
-                    }
-                    else
-                    {
-                        stbl = VSchemaFind ( self -> schema,
-                            & name, & type, decl, "VTableOpenUpdate", true );
-                        if ( stbl != NULL && type != eTable )
-                        {
-                            PLOGMSG ( klogWarn, ( klogWarn, "expression '$(expr)' is not a table",
-                                       "expr=%s", decl ));
-                            stbl = NULL;
-                        }
-                    }
-                }
-
-                /* error if the two definitions differ */
-                if ( stbl != NULL && self -> stbl != NULL && stbl != self -> stbl )
-                    rc = RC ( rcVDB, rcTable, rcOpening, rcSchema, rcIncorrect );
-                else if ( stbl == NULL && self -> stbl == NULL )
-                    rc = RC ( rcVDB, rcTable, rcOpening, rcSchema, rcNotFound );
-                else if ( self -> stbl == NULL )
-                {
-
-                    /* write schema to metadata */
-                    self -> stbl = stbl;
-                    rc = VTableStoreSchema ( self );
-                }
-                else if ( stbl != NULL )
-                {
-                    /* use latest schema but don't overwrite in metadata */
-                    self -> stbl = stbl;
-                }
-            }
-        }
-    }
-
-    DBGMSG(DBG_VDB, DBG_FLAG(DBG_VDB_VDB), ("VTableOpenUpdate = %d\n", rc));
-
-    return rc;
-}
-
-
-/* CreateTable
- *  create a new or open an existing table using manager
- *
- *  "tbl" [ OUT ] - return parameter for newly opened table
- *
- *  "schema" [ IN ] - schema object containg table
- *  declaration to be used in creating tbl.
- *
- *  "typespec" [ IN ] - type and optionally version of table schema,
- *  e.g. 'MY_NAMESPACE:MyTable' or 'MY_NAMESPACE:MyTable#1.1'
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "path" [ IN ] - NUL terminated string in
- *  wd-native character set giving path to table
- */
-LIB_EXPORT rc_t CC VDBManagerVCreateTable ( VDBManager *self, VTable **tblp,
-    const VSchema *schema, const char *typespec,
-    KCreateMode cmode, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( tblp == NULL )
-        rc = RC ( rcVDB, rcMgr, rcCreating, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcMgr, rcCreating, rcSelf, rcNull );
-        else if ( schema == NULL )
-            rc = RC ( rcVDB, rcMgr, rcOpening, rcSchema, rcNull );
-        else if ( typespec == NULL )
-            rc = RC ( rcVDB, rcMgr, rcOpening, rcName, rcNull );
-        else if ( typespec [ 0 ] == 0 )
-            rc = RC ( rcVDB, rcMgr, rcOpening, rcName, rcEmpty );
-        else
-        {
-            /* create object with new schema */
-            rc = VTableMake ( tblp, self, NULL, schema );
-            if ( rc == 0 )
-            {
-                VTable *tbl = * tblp;
-
-                /* create physical object */
-                rc = KDBManagerVCreateTable ( self -> kmgr, & tbl -> ktbl, cmode, path, args );
-                if ( rc == 0 )
-                {
-                    rc = VTableOpenUpdate ( tbl, typespec );
-                    if ( rc == 0 )
-                    {
-#if LAZY_OPEN_COL_NODE
-                        KMDataNodeRelease ( tbl -> col_node );
-                        tbl -> col_node = NULL;
-#endif
-                        return 0;
-                    }
-
-                    rc = ResetRCContext ( rc, rcVDB, rcMgr, rcCreating );
-                }
-                VTableWhack ( tbl );
-            }
-        }
-
-        * tblp = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDBManagerCreateTable ( VDBManager *self, VTable **tbl,
-    const VSchema *schema, const char *typespec,
-    KCreateMode cmode, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = VDBManagerVCreateTable ( self, tbl, schema, typespec, cmode, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-/* CreateTable
- *  create a new or open an existing table under database
- *
- *  "tbl" [ OUT ] - return parameter for newly opened table
- *
- *  "member" [ IN ] - name of table member template under database
- *  the named member is a table template rather than a named table.
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "cmode_mask" [ IN ] - if a bit of "cmode_mask" is set (1) then
- *  the corresponding bit of "cmode" is used for the table,
- *  otherwise (0) the corresponding bit is taken from db and "cmode"'s
- *  bit is ignored
- *  the mask for setting mode (kcmOpen, kcmInit, kcmCreate) is at least
- *  one bit set in the mask kcmValueMask.
- *
- *  "name" [ IN ] - NUL terminated string in
- *  db-native character set giving actual table name
- */
-LIB_EXPORT rc_t CC VDatabaseVCreateTableByMask ( VDatabase *self, VTable **tblp,
-    const char *member, KCreateMode cmode, KCreateMode cmode_mask, const char *name, va_list args )
-{
-    rc_t rc;
-
-    if ( tblp == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcCreating, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcCreating, rcSelf, rcNull );
-        else if ( member == NULL )
-            rc = RC ( rcVDB, rcMgr, rcOpening, rcName, rcNull );
-        else if ( member [ 0 ] == 0 )
-            rc = RC ( rcVDB, rcMgr, rcOpening, rcName, rcEmpty );
-        else if ( self -> read_only )
-            rc = RC ( rcVDB, rcDatabase, rcCreating, rcDatabase, rcReadonly );
-        else
-        {
-            rc = VTableMake ( tblp, self -> mgr, self, self -> schema );
-            if ( rc == 0 )
-            {
-                VTable *tbl = * tblp;
-
-                rc = KDatabaseVCreateTableByMask ( self -> kdb, & tbl -> ktbl, cmode, cmode_mask, name, args );
-                if ( rc == 0 )
-                {
-                    rc = VTableOpenUpdate ( tbl, member );
-                    if ( rc == 0 )
-                    {
-                        tbl -> pgsize = self -> pgsize;
-                        tbl -> cmode = KDatabaseGetCmode ( self->kdb ); /* TODO: do we really want to inherit open mode from db? */
-                        tbl -> checksum = KDatabaseGetChecksum ( self->kdb );
-#if LAZY_OPEN_COL_NODE
-                        KMDataNodeRelease ( tbl -> col_node );
-                        tbl -> col_node = NULL;
-#endif
-                        return 0;
-                    }
-
-                    rc = ResetRCContext ( rc, rcVDB, rcDatabase, rcCreating );
-                }
-
-                VTableWhack ( tbl );
-            }
-        }
-
-        * tblp = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseCreateTable ( struct VDatabase *self, VTable **tbl,
-    const char *member, KCreateMode cmode, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VDatabaseVCreateTable ( self, tbl, member, cmode, name, args );
-    va_end ( args );
-
-    return rc;
-}
-LIB_EXPORT rc_t CC VDatabaseVCreateTable ( struct VDatabase *self, VTable **tbl,
-    const char *member, KCreateMode cmode, const char *name, va_list args )
-{
-    return VDatabaseVCreateTableByMask ( self, tbl, member, cmode, -1, name, args );
-}
-
-
-LIB_EXPORT rc_t CC VDatabaseCreateTableDefault ( VDatabase *self, VTable **tbl,
-    const char *member, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VDatabaseVCreateTableByMask ( self, tbl, member, 0, 0, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VDatabaseVCreateTableDefault ( VDatabase *self, VTable **tbl,
-    const char *member, const char *name, va_list args )
-{
-    return VDatabaseVCreateTableByMask ( self, tbl, member, 0, 0, name, args );
-}
-
-LIB_EXPORT rc_t CC VDatabaseCreateTableByMask ( VDatabase *self, VTable **tbl,
-    const char *member, KCreateMode cmode, KCreateMode cmode_mask,
-    const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VDatabaseVCreateTableByMask ( self, tbl, member, cmode, cmode_mask, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* OpenTableUpdate
- * VOpenTableUpdate
- *  open a table for read/write
- *
- *  "tbl" [ OUT ] - return parameter for newly opened table
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving name of table
- */
-LIB_EXPORT rc_t CC VDBManagerVOpenTableUpdate ( VDBManager *self, VTable **tblp,
-    const VSchema *schema, const char *path, va_list args )
-{
-    rc_t rc;
-
-    if ( tblp == NULL )
-        rc = RC ( rcVDB, rcMgr, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcMgr, rcOpening, rcSelf, rcNull );
-        else
-        {
-            /* if no schema is given, always pass intrinsic */
-            if ( schema == NULL )
-                schema = self -> schema;
-
-            rc = VTableMake ( tblp, self, NULL, schema );
-            if ( rc == 0 )
-            {
-                VTable *tbl = * tblp;
-                rc = KDBManagerVOpenTableUpdate ( self -> kmgr, & tbl -> ktbl, path, args );
-                if ( rc == 0 )
-                {
-                    tbl -> blob_validation = KTableHasRemoteData ( tbl -> ktbl );
-                    rc = VTableOpenUpdate ( tbl, NULL );
-                    if ( rc == 0 )
-                    {
-#if LAZY_OPEN_COL_NODE
-                        KMDataNodeRelease ( tbl -> col_node );
-                        tbl -> col_node = NULL;
-#endif
-                        return 0;
-                    }
-                }
-                VTableWhack ( tbl );
-            }
-        }
-        * tblp = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDBManagerOpenTableUpdate ( VDBManager *self,
-    VTable **tbl, const VSchema *schema, const char *path, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, path );
-    rc = VDBManagerVOpenTableUpdate ( self, tbl, schema, path, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseVOpenTableUpdate ( VDatabase *self,
-    VTable **tblp, const char *name, va_list args )
-{ 
-    rc_t rc;
-
-    if ( tblp == NULL )
-        rc = RC ( rcVDB, rcDatabase, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcDatabase, rcOpening, rcSelf, rcNull );
-        else
-        {
-            rc = VTableMake ( tblp, self -> mgr, self, self -> schema );
-            if ( rc == 0 )
-            {
-                VTable *tbl = * tblp;
-
-                rc = KDatabaseVOpenTableUpdate ( self -> kdb, & tbl -> ktbl, name, args );
-                if ( rc == 0 )
-                {
-                    tbl -> blob_validation = KTableHasRemoteData ( tbl -> ktbl );
-                    rc = VTableOpenUpdate ( tbl, NULL );
-                    if ( rc == 0 )
-                    {
-#if LAZY_OPEN_COL_NODE
-                        KMDataNodeRelease ( tbl -> col_node );
-                        tbl -> col_node = NULL;
-#endif
-                        return 0;
-                    }
-                }
-
-                VTableWhack ( tbl );
-            }
-        }
-
-        * tblp = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VDatabaseOpenTableUpdate ( VDatabase *self, VTable **tbl, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VDatabaseVOpenTableUpdate ( self, tbl, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* Lock
- *  apply lock
- *
- *  if object is already locked, the operation is idempotent
- *  and returns an rc state of rcLocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC VTableVLock ( VTable *self, uint32_t type, const char * name, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcTable, rcLocking, rcSelf, rcNull );
-    else
-        rc = KTableVLock ( self -> ktbl, type, name, args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableLock ( VTable *self, uint32_t type, const char * name, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, name );
-
-    rc = VTableVLock ( self, type, name, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* Unlock
- *  remove lock
- *
- *  if object is already unlocked, the operation is idempotent
- *  and returns an rc state of rcUnlocked
- *
- *  "type" [ IN ] - a KDBPathType
- *  valid values are kptIndex and kptColumn
- *
- *  "path" [ IN ] - NUL terminated path
- */
-LIB_EXPORT rc_t CC VTableVUnlock ( VTable *self, uint32_t type,
-    const char * name, va_list args )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcTable, rcUnlocking, rcSelf, rcNull );
-    else
-        rc = KTableVUnlock ( self -> ktbl, type, name, args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableUnlock ( VTable *self, uint32_t type,
-    const char * name, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, name );
-
-    rc = VTableVUnlock ( self, type, name, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* OpenMetadataUpdate
- *  opens metadata file
- *
- *  "meta" [ OUT ] - return parameter for metadata
- */
-LIB_EXPORT rc_t CC VTableOpenMetadataUpdate ( VTable *self, struct KMetadata **meta )
-{
-    rc_t rc;
-    if ( meta == NULL )
-        rc = RC ( rcVDB, rcTable, rcOpening, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcOpening, rcSelf, rcNull );
-        else
-        {
-            * meta = self -> meta;
-            return KMetadataAddRef ( self -> meta );
-        }
-
-        * meta = NULL;
-    }
-
-    return rc;
-}
-
-
-/* CreateIndex
- * VCreateIndex
- *  create a new or open an existing index
- *
- *  "idx" [ OUT ] - return parameter for newly opened index
- *
- *  "type" [ IN ] - type of index to create
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
- */
-LIB_EXPORT rc_t CC VTableCreateIndex ( VTable *self, struct KIndex **idx,
-    KIdxType type, KCreateMode cmode, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VTableVCreateIndex ( self, idx, type, cmode, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableVCreateIndex ( VTable *self, struct KIndex **idx,
-    KIdxType type, KCreateMode cmode, const char *name, va_list args )
-{
-    if ( self != NULL )
-        return KTableVCreateIndex ( self -> ktbl, idx, type, cmode, name, args );
-
-    if ( idx == NULL )
-        return RC ( rcVDB, rcTable, rcCreating, rcParam, rcNull );
-
-    return RC ( rcVDB, rcTable, rcCreating, rcSelf, rcNull );
-}
-
-
-/* OpenIndexUpdate
- * VOpenIndexUpdate
- *  open an index for read/write
- *
- *  "idx" [ OUT ] - return parameter for newly opened index
- *
- *  "name" [ IN ] - NUL terminated string in UTF-8 giving simple name of idx
- */
-
-LIB_EXPORT rc_t CC VTableOpenIndexUpdate ( VTable *self,
-    struct KIndex **idx, const char *name, ... )
-{
-    rc_t rc;
-    va_list args;
-
-    va_start ( args, name );
-    rc = VTableVOpenIndexUpdate ( self, idx, name, args );
-    va_end ( args );
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableVOpenIndexUpdate ( VTable *self,
-    struct KIndex **idx, const char *name, va_list args )
-{
-    if ( self != NULL )
-        return KTableVOpenIndexUpdate ( self -> ktbl, idx, name, args );
-
-    if ( idx == NULL )
-        return RC ( rcVDB, rcTable, rcOpening, rcParam, rcNull );
-
-    return RC ( rcVDB, rcTable, rcOpening, rcSelf, rcNull );
-}
-
-
-/* ListColumns
- *  list writable column names
- *
- *  "names" [ OUT ] - return parameter for namelist
- *
- *  availability: v2.1
- */
-static
-rc_t list_writable_columns ( VTable *self )
-{
-    rc_t rc;
-    VCursor *curs;
-
-    if ( self -> read_only )
-    {
-        self -> write_col_cache_valid = true;
-        return 0;
-    }
-
-    rc = VTableCreateCursorWriteInt ( self, & curs, kcmInsert, false );
-    if (  rc == 0 )
-    {
-	/* no need for schema-based triggers to fire **/
-	VCursorSuspendTriggers ( curs );
-        /* let this private VCursor-function list the columns */
-        rc = VCursorListWritableColumns ( curs, & self -> write_col_cache );
-        VCursorRelease ( curs );
-        if ( rc == 0 )
-            self -> write_col_cache_valid = true;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableListWritableColumns ( VTable *self, KNamelist **names )
-{
-    rc_t rc;
-
-    if ( names == NULL )
-        rc = RC ( rcVDB, rcTable, rcListing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcListing, rcSelf, rcNull );
-        else
-        {
-            if ( ! self -> write_col_cache_valid )
-                rc = list_writable_columns ( self );
-
-            if ( self -> write_col_cache_valid )
-                return make_column_namelist ( & self -> write_col_cache, names );
-        }
-
-        * names = NULL;
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableListSeededWritableColumns ( VTable *self,
-    KNamelist **names, const KNamelist *seed )
-{
-    rc_t rc;
-
-    if ( names == NULL )
-        rc = RC ( rcVDB, rcTable, rcListing, rcParam, rcNull );
-    else
-    {
-        * names = NULL;
-
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcListing, rcSelf, rcNull );
-        else if ( seed == NULL )
-            rc = RC ( rcVDB, rcTable, rcListing, rcParam, rcNull );
-        else
-        {
-            BSTree cache;
-            BSTreeInit ( & cache );
-
-            rc = 0;
-
-            if ( ! self -> read_only )
-            {
-                VCursor *curs;
-                rc = VTableCreateCursorWriteInt ( self, & curs, kcmInsert, false );
-                if (  rc == 0 )
-                {
-                    /* let this private VCursor-function list the columns */
-                    rc = VCursorListSeededWritableColumns ( curs, & cache, seed );
-                    VCursorRelease ( curs );
-                }
-            }
-
-            if ( rc == 0 )
-                rc = make_column_namelist ( & cache, names );
-
-            BSTreeWhack ( & cache, VColumnRefWhack, NULL );
-        }
-    }
-
-    return rc;
-}
-
-
-/* ListDatatypes
- *  returns list of typedecls for named column
- *
- *  "col" [ IN ] - column name
- *
- *  "dflt_idx" [ OUT, NULL OKAY ] - returns the zero-based index
- *  into "typedecls" of the default datatype for the named column
- *
- *  "typedecls" [ OUT ] - list of datatypes available for named column
- *
- *  availability: v2.1
- */
-LIB_EXPORT rc_t CC VTableListWritableDatatypes ( VTable *self,
-    const char *col, KNamelist **typedecls )
-{
-    rc_t rc;
-    
-    if ( typedecls == NULL )
-        rc = RC ( rcVDB, rcTable, rcListing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcListing, rcSelf, rcNull );
-        else if ( col == NULL )
-            rc = RC ( rcVDB, rcSchema, rcListing, rcName, rcNull );
-        else if ( col [ 0 ] == 0 )
-            rc = RC ( rcVDB, rcSchema, rcListing, rcName, rcEmpty );
-        else
-        {
-            if ( ! self -> write_col_cache_valid )
-                rc = list_writable_columns ( self );
-
-            if ( self -> write_col_cache_valid )
-            {
-                uint32_t dummy;
-                return make_column_typelist ( & self -> write_col_cache, col, & dummy, typedecls );
-            }
-        }
-
-        * typedecls = NULL;
-    }
-
-    return rc;
-}
-
-
-/* Reindex
- *  optimize column indices
- */
-LIB_EXPORT rc_t CC VTableReindex ( VTable *self )
-{
-    if ( self == NULL )
-        return RC ( rcVDB, rcTable, rcReindexing, rcSelf, rcNull );
-
-    /* now allow the KTable to do its job */
-    return KTableReindex ( self -> ktbl );
-}
-
-
-/* ColumnCreateParams
- *  sets the creation parameters for physical columns
- *
- *  "cmode" [ IN ] - creation mode
- *
- *  "checksum" [ IN ] - the type of checksum information to
- *  apply when writing blobs
- *
- *  "pgsize" [ IN, DEFAULT ZERO ] - size of internal column "pages"
- *  the default value is indicated by 0 ( zero ).
- *  NB - CURRENTLY THE ONLY SUPPORTED PAGE SIZE IS 1 ( ONE ) BYTE.
- */
-LIB_EXPORT rc_t CC VTableColumnCreateParams ( struct VTable *self,
-    KCreateMode cmode, KChecksum checksum, size_t pgsize )
-{
-    if ( self == NULL )
-        return RC ( rcVDB, rcTable, rcUpdating, rcSelf, rcNull );
-
-    self -> cmode = cmode;
-    self -> checksum = checksum;
-    self -> pgsize = pgsize;
-
-    return 0;
-}
-
-
-/* OpenManager
- *  duplicate reference to manager
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC VTableOpenManagerUpdate ( VTable *self, struct VDBManager **mgr )
-{
-    rc_t rc;
-
-    if ( mgr == NULL )
-        rc = RC ( rcVDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            rc = VDBManagerAddRef ( self -> mgr );
-            if ( rc == 0 )
-            {
-                * mgr = self -> mgr;
-                return 0;
-            }
-        }
-
-        * mgr = NULL;
-    }
-
-    return rc;
-}
-
-
-/* OpenParent
- *  duplicate reference to parent database
- *  NB - returned reference must be released
- */
-LIB_EXPORT rc_t CC VTableOpenParentUpdate ( VTable *self, struct VDatabase **db )
-{
-    rc_t rc;
-
-    if ( db == NULL )
-        rc = RC ( rcVDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else if ( self -> db != NULL && self -> db -> read_only )
-            rc = RC ( rcVDB, rcTable, rcAccessing, rcDatabase, rcReadonly );
-        else
-        {
-            rc = VDatabaseAddRef ( self -> db );
-            if ( rc == 0 )
-            {
-                * db = self -> db;
-                return 0;
-            }
-        }
-
-        * db = NULL;
-    }
-
-    return rc;
-}
-
-/* OpenKTable
- *  returns a new reference to underlying KTable
- */
-LIB_EXPORT rc_t CC VTableOpenKTableUpdate ( VTable *self, KTable **ktbl )
-{
-    rc_t rc;
-
-    if ( ktbl == NULL )
-        rc = RC ( rcVDB, rcTable, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVDB, rcTable, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            * ktbl = self -> ktbl;
-            return KTableAddRef ( * ktbl );
-        }
-
-        * ktbl = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableDropColumn(VTable *self, const char fmt[], ...)
-{
-    va_list va;
-    rc_t rc;
-
-    va_start(va, fmt);
-    rc = VTableVDropColumn(self, fmt, va);
-    va_end(va);
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableVDropColumn(VTable *self, const char fmt[], va_list args)
-{
-    rc_t rc;
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcTable, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        va_list args_copy;
-        bool is_static;
-        va_copy(args_copy, args);
-        is_static = VTableVHasStaticColumn ( self, fmt, args_copy );
-        va_end(args_copy);
-
-        if ( is_static )
-            rc = KMDataNodeVDropChild ( self->col_node, fmt, args );
-        else
-            rc = KTableVDropColumn(self->ktbl, fmt, args);
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VTableRenameColumn ( struct VTable *self, bool force,
-    const char *from, const char *to )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVDB, rcTable, rcAccessing, rcSelf, rcNull );
-    else
-    {
-        rc = KTableRenameColumn ( self->ktbl, force, from, to );
-        if ( GetRCState(rc) == rcNotFound )
-           rc = KMDataNodeRenameChild( self->col_node, from, to );
-    }
-
-    return rc;
-}
-
diff --git a/libs/vdb/xform-priv.h b/libs/vdb/xform-priv.h
deleted file mode 100644
index aaa539b..0000000
--- a/libs/vdb/xform-priv.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*=======================================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_xform_priv_
-#define _h_xform_priv_
-
-#ifndef _h_vdb_xform_
-#include <vdb/xform.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* VBlobFuncN
- *  works on VBlob objects
- */
-struct VBlob;
-
-enum
-{
-    vftBlobN = vftBlob + 1,
-    vftSelect,
-
-    vftLastFuncProto
-};
-
-/* merge and other internal functions
- *
- * If you return one of your input blobs, ***** ADDREF ***** it.
- */
-typedef rc_t ( CC * VBlobFuncN ) ( void *self, const VXformInfo *info, int64_t row_id,
-    struct VBlob **rslt, uint32_t argc, struct VBlob const *argv [] );
-
-typedef rc_t ( CC * VBlobCompareFunc ) (void *self, const VRowData *input, const VRowData *read);
-
-typedef union VFuncDescInternalFuncs VFuncDescInternalFuncs;
-union VFuncDescInternalFuncs
-{
-    VRowFunc         rf;
-    VNonDetRowFunc   ndf;
-    VFixedRowFunc    pf;
-    VArrayFunc       af;
-    VBlobFunc        bf;
-    VBlobFuncN       bfN;
-    VBlobCompareFunc cf;
-};
-
-#define VFUNCDESC_INTERNAL_FUNCS( DESC ) \
-    ( ( union VFuncDescInternalFuncs * ) ( & ( DESC ) -> u ) )
-
-/* factory declaration with no self parameter */
-#define VTRANSFACT_BUILTIN_IMPL( fact, maj, min, rel ) \
-    VTRANSFACT_IMPL ( fact, maj, min, rel )
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_xform_priv_ */
diff --git a/libs/vfs/Makefile b/libs/vfs/Makefile
deleted file mode 100644
index 81c251c..0000000
--- a/libs/vfs/Makefile
+++ /dev/null
@@ -1,102 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: all
-
-TOP ?= $(abspath ../..)
-
-MODULE = libs/vfs
-
-INT_LIBS = \
-	libvfs
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES = \
-	$(VFS_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-RWORKDIR=$(TOP)/$(MODULE)
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# vfs
-#
-$(ILIBDIR)/libvfs: $(addprefix $(ILIBDIR)/libvfs.,$(ILIBEXT))
-
-VFS_SRC_CMN = \
-	syspath \
-	manager  \
-	resolver \
-	resolver-3.0 \
-
-VFS_SRC = \
-	path \
-	$(VFS_SRC_CMN)
-
-VFS_OBJ = \
-	$(addsuffix .$(LOBX),$(VFS_SRC))
-
-VFS_LIB = \
-	-lkns \
-	-lkns \
-	-lkrypto \
-	-lkfg \
-	-lkfs \
-	-lklib
-
-$(ILIBDIR)/libvfs.$(LIBX): $(VFS_OBJ)
-	$(LD) --slib -o $@ $^ $(VFS_LIB)
-
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/vfs/keyring.c b/libs/vfs/keyring.c
deleted file mode 100644
index f73740a..0000000
--- a/libs/vfs/keyring.c
+++ /dev/null
@@ -1,292 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include "keyring.h"
-
-#include <klib/rc.h>
-#include <klib/refcount.h>
-#include <klib/text.h>
-#include <klib/data-buffer.h>
-#include <klib/log.h>
-
-#include <kns/stream.h>
-#include <kns/endpoint.h>
-#include <kns/socket.h>
-#include <kns/manager.h>
-
-#include <vfs/keyring-priv.h>
-
-#include <sysalloc.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-/*TODO: define protocol messages in a central location */
-/*requests*/
-static const char* shutdownMsg = "\x01X";
-static const char* initMsg     = "\x01I";
-/*responses*/
-static const char* initMsgSuccess = "IY";
-static const char* initMsgFailure = "IN";
-
-#define rcTarget rcNoTarg
-
-#define KEYRING_MAX_PATH 4096
-
-struct KKeyRing
-{
-    KRefcount refcount;
-    
-    char serverDataDir[KEYRING_MAX_PATH];
-
-    bool read_only;
-    bool shutting_down;
-    
-    KStream* ipc;
-};
-
-static
-rc_t CC ShakeHands(KStream* ipc)
-{   /* Send Init message, wait for a response (give new server a chance to ask for password */
-    rc_t rc;
-    LogMsg ( klogInfo, "KeyringClient: sending Init");
-    rc = KStreamWrite(ipc, initMsg, string_size(initMsg), NULL);
-    if (rc == 0)
-    {
-        unsigned char msg_size;
-        size_t numRead = 0;
-        rc = KStreamReadAll(ipc, &msg_size, 1, &numRead);
-        if (rc == 0 && numRead == 1)
-        {
-            char resp[2];
-            if (msg_size == sizeof(resp))
-            {
-                rc = KStreamReadAll(ipc, resp, msg_size, &numRead);
-                if (rc == 0 && numRead == msg_size)
-                {
-                    pLogMsg ( klogInfo, "KeyringClient: received '$(b1)$(b2)'", "b1=%c,b2=%c", resp[0], resp[1] );
-                    if (string_cmp(resp, sizeof(resp), initMsgSuccess, sizeof(initMsgSuccess), msg_size) == 0)
-                        rc = 0;
-                    else if (string_cmp(resp, sizeof(resp), initMsgFailure, sizeof(initMsgFailure), msg_size) == 0)
-                        rc = RC ( rcVFS, rcTarget, rcAttaching, rcParam, rcIncorrect);
-                    else
-                        rc = RC ( rcVFS, rcTarget, rcAttaching, rcMessage, rcUnexpected);
-                }
-                else
-                    LogErr(klogErr, rc, "KeyringClient: KStreamReadAll(2) failed");
-            }
-            else
-            {
-                pLogMsg ( klogInfo, "KeyringClient: received '$(bytes)' bytes, expected 2", "bytes=%d", (int32_t)msg_size );
-                rc = RC ( rcVFS, rcTarget, rcAttaching, rcMessage, rcUnexpected);
-            }
-        }
-        else
-        {
-            pLogMsg ( klogInfo, "KeyringClient: received '$(bytes)' bytes, expected 1", "bytes=%d", (int32_t)numRead );
-            LogErr(klogErr, rc, "KeyringClient: KStreamReadAll(1) failed");
-        }
-    }
-        
-    return rc;
-}
-
-static
-rc_t CC KKeyRingInit(KKeyRing* self, const char* path)
-{
-    rc_t rc = 0;
-    memset(self, 0, sizeof(KKeyRing));
-
-    KRefcountInit ( & self -> refcount, 1, "KKeyRing", "init", "" );
-
-    LogMsg ( klogInfo, "KeyringClient: starting keyring");
-    rc = StartKeyRing(path);
-    LogMsg ( klogInfo, "KeyringClient: keyring started");
-    
-    if (rc == 0)
-    {
-        KNSManager* kns;
-        rc = KNSManagerMake ( &kns );
-        if (rc == 0)
-        {
-            rc_t rc2;
-            KEndPoint ep;
-            String name; 
-            CONST_STRING(&name, KEYRING_IPC_NAME);
-            rc = KNSManagerInitIPCEndpoint(kns, &ep, &name);    
-            if (rc == 0)
-            {
-                LogMsg ( klogInfo, "KeyringClient: caling KNSMakeIPCConnection");
-                rc = KNSManagerMakeIPCConnection ( kns, &self->ipc, &ep, 5 );
-                if (rc == 0)
-                {
-                    LogMsg ( klogInfo, "KeyringClient: KNSMakeIPCConnection successful");
-                    rc = ShakeHands(self->ipc);
-                }
-            }
-            rc2 = KNSManagerRelease(kns);
-            if (rc == 0)
-                rc2 = rc;
-        }
-    }
-    
-    return rc;    
-}
-
-static
-rc_t CC KKeyRingWhack(KKeyRing* self)
-{
-    rc_t rc = 0;
-    rc_t rc2;
-    if (self->ipc != NULL && self->shutting_down)  
-    {    /* send a shutdown message to the server */
-        LogMsg ( klogInfo, "KeyringClient: sending Shutdown");
-        rc = KStreamWrite(self->ipc, shutdownMsg, string_size(shutdownMsg), NULL);
-    }
-        
-    rc2 = KStreamRelease(self->ipc);
-    if (rc == 0)
-        rc = rc2;
-        
-    free(self);
-    
-    return rc;
-}
-
-LIB_EXPORT
-rc_t CC KKeyRingAddRef ( const KKeyRing *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "KKeyRing" ) )
-        {
-        case krefLimit:
-            return RC ( rcVFS, rcTarget, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT 
-rc_t CC KKeyRingRelease ( KKeyRing *self, bool shutdown_server )
-{
-    if ( self != NULL )
-    {
-        if (shutdown_server)
-            self->shutting_down = true; /* request shutdown when refcount reaches 0 */
-            
-        switch ( KRefcountDrop ( & self -> refcount, "KKeyRing" ) )
-        {
-        case krefWhack:
-            return KKeyRingWhack ( ( KKeyRing* ) self );
-        break;
-        case krefLimit:
-            return RC ( rcVFS, rcTarget, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC KKeyRingMakeRead( const KKeyRing** cself, const char* path )
-{
-    KKeyRing** self = (KKeyRing**)cself;
-    rc_t rc = KKeyRingMakeUpdate(self, path);
-    if (rc == 0)
-        (*self)->read_only = true;
-    return rc;
-}
-
-LIB_EXPORT 
-rc_t CC KKeyRingMakeUpdate(KKeyRing** self, const char* path)
-{
-    KKeyRing* obj;
-    rc_t rc;
-    
-    if ( self == NULL )
-        rc = RC ( rcVFS, rcTarget, rcCreating, rcParam, rcNull );
-    else
-    {
-        obj = malloc(sizeof(KKeyRing));
-        if (obj == NULL)
-            rc = RC ( rcVFS, rcTarget, rcCreating, rcMemory, rcExhausted );
-        {
-            rc = KKeyRingInit(obj, path);
-            if (rc == 0)
-               *self = obj;
-            else
-                free(obj);
-        }
-    }
-    
-    return rc;
-}
-
-rc_t CC KKeyRingAddProject(KKeyRing* self, const char* project_key, const char* dl_key, const char* enc_key)
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcVFS, rcTarget, rcSending, rcSelf, rcNull );
-    else if (project_key == NULL || dl_key == NULL || enc_key == NULL)
-        rc = RC ( rcVFS, rcTarget, rcSending, rcParam, rcNull );
-    else
-    {   /* Project Add: "<uint8 msg_length>PA<uint8 length>name<uint8 length>dl_ticket<uint8 length>enc_key" */
-        size_t pkSize = string_size(project_key);
-        size_t dkSize = string_size(dl_key);
-        size_t ekSize = string_size(enc_key);
-
-        char buf[256];
-        uint8_t msg_size = 2 + sizeof(uint8_t) + pkSize + sizeof(uint8_t) + dkSize + sizeof(uint8_t) + ekSize;
-        if ( 1 + msg_size > sizeof(buf) )
-            rc = RC ( rcVFS, rcTarget, rcSending, rcSize, rcExcessive );
-        else
-        {
-            size_t idx = 0;
-        
-            buf[0] = msg_size; ++idx;
-
-            buf[idx]='P'; ++idx;
-            buf[idx]='A'; ++idx;
-            
-            buf[idx] = (char)pkSize; ++idx;
-            string_copy(buf + idx, sizeof(buf)-idx, project_key, pkSize);
-            idx += pkSize;
-            
-            buf[idx] = (char)dkSize; ++idx;
-            string_copy(buf + idx, sizeof(buf)-idx, dl_key, dkSize);
-            idx += dkSize;
-            
-            buf[idx] = (char)ekSize; ++idx;
-            string_copy(buf + idx, sizeof(buf)-idx, enc_key, ekSize);
-            idx += ekSize;
-            
-            assert(idx == msg_size + 1);
-            rc = KStreamWrite(self->ipc, buf, idx, NULL);
-        }
-    }
-    return rc;
-        
-}
-
diff --git a/libs/vfs/keyring.h b/libs/vfs/keyring.h
deleted file mode 100644
index b1140ee..0000000
--- a/libs/vfs/keyring.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_vfs_keyring_
-#define _h_vfs_keyring_
-
-#ifndef _h_vfs_extern_
-#include <vfs/extern.h>
-#endif
-
-#ifndef _h_klib_defs_
-#include <klib/defs.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* 
- * API for clients of a client/server KeyRing implementation.
- * Client code can use this interface and fall back to using KKeyStore in some cases, e.g. to work with a project that has not been
- * added to the keyring. This can be done behind KKeyRing interface (would have to define an object naming scheme that is compatible 
- * with project-id/type/object-id), or explicitly in the client code.
- */
-typedef struct KKeyRing KKeyRing;
- 
- /* Make
- * Open an IPC connection to a keyring server. Will start the server if none is running.
- * KKeyRingMakeRead will reject Add/Delete operations 
- * dataDir [ IN, NULL OK ] = path to the directory with keyring database. NULL - use default location (~/.ncbi)
- */
-VFS_EXTERN rc_t CC KKeyRingMakeRead( const KKeyRing** self, const char* dataDir );
-VFS_EXTERN rc_t CC KKeyRingMakeUpdate( KKeyRing** self, const char* dataDir );
-
- /* AddRef
- * Release
- *
- * shutdown_server [ IN ] - if this is the last reference, send a Shutdown message to server before closing the IPC connection.
- * This will not necessarily shut down the server immediately; if there are other active connections, the server will wait for them to close first.
- * Use KKeyRingIsServerRunning() to check it the server is down.
- */
-VFS_EXTERN rc_t CC KKeyRingAddRef ( const KKeyRing *self );
-VFS_EXTERN rc_t CC KKeyRingRelease ( KKeyRing *self, bool shutdown_server );
- 
-/* 
- * retrieving download/encyprtion keys
- */
-VFS_EXTERN rc_t CC KKeyRingGetDownloadTicket(const KKeyRing* self, const char* project_key, const char** dl_key);
-VFS_EXTERN rc_t CC KKeyRingGetProjectEncryptionKey(const KKeyRing* self, const char* project_key, const char** enc_key);
-
-/*
- * managing projects 
-*/                                                   
-VFS_EXTERN rc_t CC KKeyRingAddProject(KKeyRing* self, const char* project_key, const char* dl_key, const char* enc_key);
-VFS_EXTERN rc_t CC KKeyRingDeleteProject(KKeyRing* self, const char* project_key); /* will delete all associated objects */
-
-/*
- * managing objects
- */
-VFS_EXTERN rc_t CC KKeyRingAddObject(KKeyRing* self, 
-                                      const char* project_key, uint8_t object_type, const char* object_key,
-                                      const char* display_name, uint64_t size, const char* checksum);
-VFS_EXTERN rc_t CC KKeyRingDeleteObject(KKeyRing* self, 
-                                         const char* project_key, uint8_t object_type, const char* object_key);
-
-/* KKeyRingReencrypt
- * Server can refuse to reencrypt if it detects other active servers.
- */
-VFS_EXTERN rc_t CC KKeyRingReencrypt(KKeyRing** self, const char* new_passwd); 
-
- /* IsServerRunning
- * dataDir [ IN, NULL OK ] = path to the directory with keyring database. NULL - use default location (~/.ncbi)
- */
-VFS_EXTERN bool CC KKeyRingIsServerRunning(const char* dataDir);
-
-/* 
- * private API for libkrypto 
- */
-
-VFS_EXTERN rc_t CC KKeyRingGetObjectEncryptionKey(const KKeyRing* self, const char* project_key, 
-                                                   uint8_t object_type, const char* object_key, const char** enc_key);
-
-                                                   
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_vfs_keyring_ */
diff --git a/libs/vfs/kurl-stub.c b/libs/vfs/kurl-stub.c
deleted file mode 100644
index 20e885c..0000000
--- a/libs/vfs/kurl-stub.c
+++ /dev/null
@@ -1,18 +0,0 @@
-void KNSManagerMakeCurlRequest ( void )
-{
-}
-void VFSManagerMakeCurlFile ( void )
-{
-}
-void KCurlFileMake ( void )
-{
-}
-void KCurlRequestAddSField ( void )
-{
-}
-void KCurlRequestPerform ( void )
-{
-}
-void KCurlRequestRelease ( void )
-{
-}
diff --git a/libs/vfs/manager.c b/libs/vfs/manager.c
deleted file mode 100644
index 70a5e4b..0000000
--- a/libs/vfs/manager.c
+++ /dev/null
@@ -1,3326 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vfs/extern.h>
-
-#include "path-priv.h"
-#include "resolver-priv.h" /* VResolverGetProjectId */
-
-#include <sra/srapath.h>
-
-#include <vfs/manager.h>
-#include <vfs/manager-priv.h> /* VFSManagerMakeFromKfg */
-#include <vfs/path.h>
-#include <vfs/path-priv.h>
-#include <vfs/resolver.h>
-
-#include <krypto/key.h>
-#include <krypto/encfile.h>
-#include <krypto/wgaencrypt.h>
-#include <krypto/ciphermgr.h>
-
-#include <kfg/config.h>
-#include <kfg/repository.h>
-#include <kfg/keystore.h>
-#include <kfg/keystore-priv.h>
-#include <kfg/kfg-priv.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/sra.h>
-#include <kfs/tar.h>
-#include <kfs/dyload.h>
-#include <kfs/kfs-priv.h>
-#include <kfs/nullfile.h>
-#include <kfs/buffile.h>
-#include <kfs/quickmount.h>
-#include <kfs/cacheteefile.h>
-#include <kfs/lockfile.h>
-
-#include <kns/http.h>
-#include <kns/kns-mgr-priv.h> /* KNSManagerMakeReliableHttpFile */
-#include <kns/manager.h>
-
-#include <kxml/xml.h>
-
-#include <klib/debug.h> /* DBGMSG */
-#include <klib/log.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <klib/refcount.h>
-#include <klib/namelist.h>
-#include <klib/vector.h>
-
-#include <strtol.h>
-
-#include <sysalloc.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-
-#ifdef _DEBUGGING
-#define MGR_DEBUG(msg) DBGMSG(DBG_VFS,DBG_FLAG(DBG_VFS_MGR), msg)
-#else
-#define MGR_DEBUG(msg)
-#endif
-
-
-#define DEFAULT_CACHE_BLOCKSIZE ( 32768 * 4 )
-
-#define VFS_KRYPTO_PASSWORD_MAX_SIZE 4096
-
-/*--------------------------------------------------------------------------
- * VFSManager
- */
-
-/* currently expected to be a singleton and not use a vtable but
- * be fully fleshed out here */
-struct VFSManager
-{
-    /* the current directory in the eyes of the O/S when created */
-    KDirectory * cwd;
-
-    /* configuration manager */
-    KConfig * cfg;
-
-    /* krypto's cipher manager */
-    KCipherManager * cipher;
-
-    /* SRAPath will be replaced with a VResolver */
-    struct VResolver * resolver;
-
-    /* network manager */
-    KNSManager * kns;
-
-    /* path to a global password file */
-    char *pw_env;
-    
-    /* encryption key storage */ 
-    struct KKeyStore* keystore;
-
-    KRefcount refcount;
-};
-
-static const char kfsmanager_classname [] = "VFSManager";
-
-static 
-VFSManager * singleton = NULL;
-
-
-/* Destroy
- *  destroy file
- */
-static rc_t VFSManagerDestroy ( VFSManager *self )
-{
-    if ( self == NULL )
-        return RC ( rcVFS, rcFile, rcDestroying, rcSelf, rcNull );
-    
-    KKeyStoreRelease( self -> keystore );
-    free ( self -> pw_env );
-    VResolverRelease ( self -> resolver );
-    KNSManagerRelease ( self -> kns );
-    KCipherManagerRelease ( self -> cipher );
-    KConfigRelease ( self -> cfg );
-    KDirectoryRelease ( self -> cwd );
-    KRefcountWhack (&self->refcount, kfsmanager_classname);
-
-    free (self);
-    singleton = NULL;
-
-    return 0;
-}
-
-/* AddRef
- *  creates a new reference
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC VFSManagerAddRef ( const VFSManager *self )
-{
-    if (self != NULL)
-    {
-        switch (KRefcountAdd (&self->refcount, kfsmanager_classname))
-        {
-        case krefOkay:
-            break;
-        case krefZero:
-            return RC (rcVFS, rcMgr, rcAttaching, rcRefcount, rcIncorrect);
-        case krefLimit:
-            return RC (rcVFS, rcMgr, rcAttaching, rcRefcount, rcExhausted);
-        case krefNegative:
-            return RC (rcVFS, rcMgr, rcAttaching, rcRefcount, rcInvalid);
-        default:
-            return RC (rcVFS, rcMgr, rcAttaching, rcRefcount, rcUnknown);
-        }
-    }
-    return 0;
-}
-
-/* Release
- *  discard reference to file
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC VFSManagerRelease ( const VFSManager *self )
-{
-    rc_t rc = 0;
-    if (self != NULL)
-    {
-        switch (KRefcountDrop (&self->refcount, kfsmanager_classname))
-        {
-        case krefOkay:
-        case krefZero:
-            break;
-        case krefWhack:
-            rc = VFSManagerDestroy ((VFSManager*)self);
-            break;
-        case krefNegative:
-            return RC (rcVFS, rcMgr, rcAttaching, rcRefcount, rcInvalid);
-        default:
-            rc = RC (rcVFS, rcMgr, rcAttaching, rcRefcount, rcUnknown);
-            break;            
-        }
-    }
-    return rc;
-}
-
-
-
-/*--------------------------------------------------------------------------
- * VFSManagerMakeHTTPFile
- */
-static
-rc_t VFSManagerMakeHTTPFile( const VFSManager * self, const KFile **cfp,
-                             const char * url, const char * cache_location,
-                             bool high_reliability )
-{
-    rc_t rc;
-
-    if ( high_reliability )
-        rc = KNSManagerMakeReliableHttpFile ( self -> kns, cfp, NULL, 0x01010000, url );
-    else
-        rc = KNSManagerMakeHttpFile ( self -> kns, cfp, NULL, 0x01010000, url );
-
-    if ( rc == 0 && cache_location != NULL )
-    {
-		const KFile *temp_file;
-		/* we do have a cache_location! wrap the remote file in a cacheteefile */
-		rc_t rc2 = KDirectoryMakeCacheTee ( self->cwd, &temp_file, *cfp,
-											DEFAULT_CACHE_BLOCKSIZE, "%s", cache_location );
-												
-        if ( rc2 == 0 )
-        {
-            KFileRelease ( * cfp );
-            * cfp = temp_file;
-        }
-    }
-    return rc;
-}
-
-static rc_t CC VFSManagerGetConfigPWFile (const VFSManager * self, char * b, size_t bz, size_t * pz)
-{
-    const char * env;
-    const KConfigNode * node;
-    size_t oopsy;
-    size_t z = 0;
-    rc_t rc;
-
-    if (pz)
-        *pz = 0;
-
-    env = getenv (ENV_KRYPTO_PWFILE);
-    if (!env)
-        env = self->pw_env;
-    if (env)
-    {
-        z = string_copy (b, bz, env, string_size (env));
-    
-        /* force a NUL that string_copy might have omitted 
-         * even if this truncates the path */
-        b[bz-1] = '\0';
-
-        if (pz)
-            *pz = z;
-       
-        return 0;
-    }
-    
-    { /* If we are in a protected area, there may be an area-specific key file */
-        const KRepositoryMgr *repoMgr;
-        rc = KConfigMakeRepositoryMgrRead ( self->cfg, &repoMgr );
-        if (rc == 0)
-        {
-            const KRepository* prot;
-            rc = KRepositoryMgrCurrentProtectedRepository ( repoMgr, &prot );
-            if (rc == 0)
-            {
-                rc = KRepositoryEncryptionKeyFile ( prot, b, bz, pz);            
-                KRepositoryRelease(prot);
-            }
-            KRepositoryMgrRelease(repoMgr);
-        }
-        if (GetRCState(rc) == rcNotFound)
-            rc = RC (rcVFS, rcMgr, rcOpening, rcEncryptionKey, rcNotFound);
-    }
-
-    if (rc != 0)
-    {   /* fall back on an old-style global password file*/
-        rc = KConfigOpenNodeRead (self->cfg, &node, "%s", KFG_KRYPTO_PWFILE);
-        if (rc)
-        {
-            /* if not found, change object from path to encryption key */
-            if (GetRCState(rc) == rcNotFound)
-                rc = RC (rcVFS, rcMgr, rcOpening, rcEncryptionKey, rcNotFound);
-        }
-        else
-        {
-            rc = KConfigNodeRead (node, 0, b, bz-1, &z, &oopsy);
-            if (rc == 0)
-            {
-                if (oopsy != 0)
-                    rc = RC (rcKrypto, rcMgr, rcReading, rcBuffer, rcInsufficient);
-                else
-                {
-                    b[z] = '\0';
-                    *pz = z;
-                }
-            }
-            KConfigNodeRelease (node);
-        }
-    }
-    
-    return rc;
-}
-
-static
-rc_t GetEncryptionKey(const VFSManager * self, const VPath * vpath, char* obuff, size_t buf_size, size_t *pwd_size)
-{
-    /* -----
-     * #if 0
-     * first check the insecure password on the command line hack 
-     * #endif 
-     *
-     * then check the option for pwfile in the VPath
-     * then check the option for pwfd
-     * then check the keystore. if necessary, keystore will 
-     *          check the environment      
-     *          check the configuration
-     */
-
-#if 0
-    /* obviously not used yet */
-    if (VPathOption (vpath, vpopt_temporary_pw_hack, obuff, buf_size, &z) == 0)
-    {
-        if (z < 1)
-            rc = RC (rcVFS, rcPath, rcConstructing, rcParam, rcInvalid);
-        else
-        {
-            size_t x = 0;
-            size_t y = 0;
-            int ch, h, l;
-
-            while (x < z)
-            {
-                h = tolower(obuff[x++]);
-                l = tolower(obuff[x++]);
-
-                if (!isxdigit(h) || !isxdigit(l))
-                    rc = RC (rcVFS, rcPath, rcConstructing, rcParam, rcInvalid);
-
-                if (isdigit(h))
-                    ch = (h - '0') << 4;
-                else
-                    ch = (h + 10 - 'a') << 4;
-                if (isdigit(l))
-                    ch |= (l - '0');
-                else
-                    ch |= (l + 10 - 'a');
-
-                /* added for compatibility with other passwords */
-                if ((ch == '\r') || (ch == '\n'))
-                    break;
-                obuff[y++] = (char)ch;
-            }
-            obuff[y] = '\0';
-            assert (z == x);
-            assert (z/2 == y);
-            z = y;
-            * pwd_size = z;
-        }
-    }
-#endif    
-
-    rc_t rc = 0;
-    rc_t rc2;
-    size_t z;
-
-    if (VPathOption (vpath, vpopt_pwpath, obuff, buf_size - 1, &z)
-        == 0)
-    {
-        const KFile * pwfile;
-        obuff [z] = '\0';
-        rc = KDirectoryOpenFileRead(self->cwd, &pwfile, "%s", obuff);
-        if (rc == 0)
-        {
-            rc = KKeyStoreSetTemporaryKeyFromFile(self->keystore, pwfile);
-            rc2 = KFileRelease(pwfile);
-            if (rc == 0)
-                rc = rc2;
-        }
-    }
-    else if (VPathOption (vpath, vpopt_pwfd, obuff, buf_size - 1, &z)
-        == 0)
-    {
-        /* -----
-         * pwfd is not fully a VPath at this point: we 
-         * should obsolete it
-         */
-        const KFile * pwfile;
-        obuff [z] = '\0';
-        rc = KFileMakeFDFileRead (&pwfile, atoi (obuff));
-        if (rc == 0)
-        {
-            rc = KKeyStoreSetTemporaryKeyFromFile(self->keystore, pwfile);
-            rc2 = KFileRelease(pwfile);
-            if (rc == 0)
-                rc = rc2;
-        }
-    }
-    
-    if (rc == 0)
-    {
-        KEncryptionKey* enc_key = NULL;
-
-        /* here, we are only interested in global keys - at least for now */
-
-        /* Get Key for current protected repository ( or global ) */
-        rc = KKeyStoreGetKey(self->keystore, NULL, &enc_key);
-        if (rc != 0 && self->resolver != NULL) {
-            bool has_project_id = false;
-            uint32_t projectId = 0;
-            rc_t r2 = VResolverGetProjectId(self->resolver, &projectId);
-            has_project_id = projectId != 0;
-  
-  /* Get Key for protected repository that was used to create self's resolver */
-            if (r2 == 0 && has_project_id) {
-                rc = KKeyStoreGetKeyByProjectId(
-                    self->keystore, NULL, &enc_key,projectId);
-            }
-        }
-
-        if (rc == 0)
-        {
-            *pwd_size = string_copy(obuff, buf_size, enc_key->value.addr, enc_key->value.size);
-            if (*pwd_size != enc_key->value.size)
-                rc = RC(rcVFS, rcPath, rcReading, rcBuffer, rcInsufficient);
-            rc2 = KEncryptionKeyRelease(enc_key);
-            if (rc == 0)
-                rc = rc2;
-        }
-    }
-    
-    rc2 = KKeyStoreSetTemporaryKeyFromFile(self->keystore, NULL); /* forget the temp key if set */
-    if (rc == 0)
-        rc = rc2;
-    return rc;
-}
-
-/*
- * This is still hack - must match VFSManagerResolvePathRelativeDir()
- */
-LIB_EXPORT rc_t CC VFSManagerWGAValidateHack (const VFSManager * self, 
-                                              const KFile * file,
-                                              const char * path) /* we'll move this to a vpath */
-{
-    VPath * vpath;
-    rc_t rc = 0;
-
-    rc = VPathMake (&vpath, path);
-    if (rc == 0)
-    {
-        size_t z;
-        char obuff [VFS_KRYPTO_PASSWORD_MAX_SIZE + 2]; /* 1 for over-read and 1 for NUL */
-        rc = GetEncryptionKey(self, vpath, obuff, sizeof(obuff), &z);
-
-        if (rc == 0)
-        {
-            rc = WGAEncValidate (file, obuff, z);
-        }
-    }
-    return rc;
-}
-
-
-
-/* ResolvePath
- *
- * take a VPath and resolve to a final form apropriate for KDB
- *
- * that is take a relative path and resolve it against the CWD
- * or take an accession and resolve into the local or remote 
- * VResolver file based on config. It is just a single resolution percall
- */
-static rc_t VFSManagerResolvePathResolver (const VFSManager * self,
-                                           uint32_t flags,
-                                           const VPath * in_path,
-                                           VPath ** out_path)
-{
-    rc_t rc = 0;
-
-    *out_path = NULL;
-
-    /*
-     * this RC perculates up for ncbi-acc: schemes but not for
-     * no scheme uris
-     */
-    if ((flags & vfsmgr_rflag_no_acc) == vfsmgr_rflag_no_acc)
-    {
-        /* hack */
-        if ( VPathGetUri_t ( in_path ) == vpuri_none )
-            rc = SILENT_RC (rcVFS, rcMgr, rcResolving, rcSRA, rcNotAvailable);
-        else
-            rc = RC (rcVFS, rcMgr, rcResolving, rcSRA, rcNotAvailable);
-    }
-    else
-    {
-        bool not_done = true;
-
-        /*
-         * cast because we seem to have the restriction on the output from
-         * VResolver that seems too restrictive
-         */
-        if ((flags & vfsmgr_rflag_no_acc_local) == 0)
-        {
-            rc = VResolverLocal (self->resolver, in_path, (const VPath **)out_path);
-            if (rc == 0)
-                not_done = false;
-        }
-            
-        if (not_done && ((flags & vfsmgr_rflag_no_acc_remote) == 0))
-        {
-            rc = VResolverRemote (self->resolver, eProtocolHttp,
-                in_path, (const VPath **)out_path);
-        }
-    }
-    return rc;
-}
-
-
-static rc_t VFSManagerResolvePathInt (const VFSManager * self,
-                                      uint32_t flags,
-                                      const KDirectory * base_dir,
-                                      const VPath * in_path,
-                                      VPath ** out_path)
-{
-    rc_t rc;
-    char * pc;
-    VPUri_t uri_type;
-
-    assert (self);
-    assert (in_path);
-    assert (out_path);
-
-    uri_type = VPathGetUri_t ( in_path );
-    switch ( uri_type )
-    {
-    default:
-        rc = RC (rcVFS, rcMgr, rcResolving, rcPath, rcInvalid);
-        break;
-
-    case vpuri_not_supported:
-    case vpuri_ncbi_legrefseq:
-        rc = RC (rcVFS, rcMgr, rcResolving, rcPath, rcUnsupported);
-        break;
-
-    case vpuri_ncbi_acc:
-        rc = VFSManagerResolvePathResolver (self, flags, in_path, out_path);
-        break;
-
-    case vpuri_none:
-        /* for KDB purposes, no scheme might be an accession */
-        if (flags & vfsmgr_rflag_kdb_acc)
-        {
-             /* no '/' is permitted in an accession */
-            pc = string_chr (in_path->path.addr, in_path->path.size, '/');
-            if (pc == NULL)
-            {
-                rc = VFSManagerResolvePathResolver (self, flags, in_path, out_path);
-                if (rc == 0)
-                    break;
-            }
-        }
-        /* Fall through */
-    case vpuri_ncbi_vfs:
-    case vpuri_file:
-        /* check for relative versus full path : assumes no 'auth' not starting with '/' */
-        if (in_path->path.addr[0] == '/')
-        {
-            rc = VPathAddRef (in_path);
-            if (rc == 0)
-                *out_path = (VPath *)in_path; /* oh these const ptr are annoying */
-        }
-        else
-        {
-            /* not 'properly' handling query, fragment etc. for relative path
-             * assumes path within VPath is ASCIZ
-             */
-            size_t s;
-            VPath * v;
-            char u [32 * 1024];
-
-            switch ( uri_type )
-            {
-            default:
-                rc = RC (rcVFS, rcMgr, rcResolving, rcFunction, rcInvalid);
-                break;
-
-            case vpuri_ncbi_vfs:
-                string_printf ( u, sizeof u, & s, "%S:", & in_path -> scheme );
-                rc = KDirectoryResolvePath ( base_dir, true, & u [ s ], sizeof u - s,
-                    "%.*s", ( int ) in_path -> path . size, in_path -> path . addr );
-                if ( rc == 0 )
-                {
-                    s = string_size ( u );
-                    rc = string_printf ( & u [ s ], sizeof u - s, NULL,
-                        "%S%S", & in_path -> query, & in_path -> fragment );
-                }
-                if (rc == 0)
-                    rc = VPathMake (&v, u);
-                break;
-
-            case vpuri_none:
-            case vpuri_file:
-                rc = KDirectoryResolvePath ( base_dir, true, u, sizeof u,
-                    "%.*s", ( int ) in_path -> path . size, in_path -> path . addr );
-                rc = VPathMake (&v, u);
-                break;
-            }
-            if (rc == 0)
-                *out_path = v;
-        }
-        break;
-
-        /* these are considered fully resolved already */
-    case vpuri_http:
-    case vpuri_ftp:
-        rc = VPathAddRef (in_path);
-        if (rc == 0)
-            *out_path = (VPath*)in_path;
-        break;
-
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VFSManagerResolvePath (const VFSManager * self,
-                                          uint32_t flags,
-                                          const VPath * in_path,
-                                          VPath ** out_path)
-{
-    if (out_path == NULL)
-        return RC (rcVFS, rcMgr, rcResolving, rcParam, rcNull);
-
-    *out_path = NULL;
-
-    if (self == NULL)
-        return RC (rcVFS, rcMgr, rcResolving, rcSelf, rcNull);
-
-    if (in_path == NULL)
-        return RC (rcVFS, rcMgr, rcResolving, rcParam, rcNull);
-
-    return VFSManagerResolvePathInt (self, flags, self->cwd, in_path, out_path);
-}
-
-LIB_EXPORT rc_t CC VFSManagerResolvePathRelative (const VFSManager * self,
-                                                  uint32_t flags,
-                                                  const struct  VPath * base_path,
-                                                  const struct  VPath * in_path,
-                                                  struct VPath ** out_path)
-{
-    const KDirectory * dir;
-    rc_t rc;
-
-    if (out_path == NULL)
-        rc = RC (rcVFS, rcMgr, rcResolving, rcParam, rcNull);
-
-    *out_path = NULL;
-
-    if (self == NULL)
-        return RC (rcVFS, rcMgr, rcResolving, rcSelf, rcNull);
-
-    if (in_path == NULL)
-        return RC (rcVFS, rcMgr, rcResolving, rcParam, rcNull);
-
-    rc = VFSManagerOpenDirectoryRead (self, &dir, base_path);
-    if (rc == 0)
-        rc = VFSManagerResolvePathInt (self, flags, dir, in_path, out_path);
-
-    return rc;
-}
-
-/*
- * This is still hack - must match VFSManagerGetEncryptionKey()
- */
-
-LIB_EXPORT rc_t CC VFSManagerResolvePathRelativeDir (const VFSManager * self,
-                                                     uint32_t flags,
-                                                     const KDirectory * base_dir,
-                                                     const VPath * in_path,
-                                                     VPath ** out_path)
-{
-    if (out_path == NULL)
-        return RC (rcVFS, rcMgr, rcResolving, rcParam, rcNull);
-
-    *out_path = NULL;
-
-    if (self == NULL)
-        return RC (rcVFS, rcMgr, rcResolving, rcSelf, rcNull);
-
-    if (in_path == NULL)
-        return RC (rcVFS, rcMgr, rcResolving, rcParam, rcNull);
-
-    return VFSManagerResolvePathInt (self, flags, base_dir, in_path, out_path);
-}
-
-
-/* OpenFileRead
- *  opens an existing file with read-only access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-static
-rc_t VFSManagerOpenFileReadDecryption (const VFSManager *self,
-                                       const KDirectory * dir,
-                                       const KFile ** f,
-                                       const KFile * file,
-                                       const VPath * path,
-                                       bool force_decrypt,
-                                       bool * was_encrypted)
-{
-    rc_t rc = 0;
-    size_t z;
-    char obuff [VFS_KRYPTO_PASSWORD_MAX_SIZE + 2]; /* 1 for over-read and 1 for NUL */
-    bool has_enc_opt;
-
-    if (was_encrypted)
-        *was_encrypted = false;
-
-    /* -----
-     * at this point we have no fatal errors and we have the
-     * file opened but we have not seen if we have to decrypt
-     * or use other query options
-     */
-    has_enc_opt = (VPathOption (path, vpopt_encrypted, obuff,
-                                sizeof obuff, &z) == 0);
-
-    if ((has_enc_opt == false) &&
-        (force_decrypt == false))
-    {
-        /* if we are not told to decrypt, don't and we are done */
-        KFileAddRef (file);
-        *f = file;
-    }
-
-    else /* we are told to decrypt if possible */
-    {
-        /* -----
-         * pre-read 4kb from the 'encrypted file'
-         */
-        rc = KFileRandomAccess (file);
-        if (rc == 0)
-            ;
-        /* most common and easiest option is it has random
-         * access - a no-op here
-         */
-        else if (GetRCState(rc) == rcUnsupported)
-        {
-            const KFile * buffile;
-
-            rc = KBufFileMakeRead (&buffile, file, 32 * 2 * 1024);
-            if (rc)
-                ;
-            else
-            {
-                /* there is an extra reference to file now, but
-                 * it gets removed after this function returns
-                 */
-                file = buffile;
-            }
-        }
-        
-        if (rc == 0)
-        {
-            size_t tz;
-            char tbuff [4096];
-
-            /* we now have a file from which we can pre-read the
-             * possible encrypted format header */
-            rc = KFileReadAll (file, 0, tbuff, sizeof tbuff, &tz);
-            if (rc == 0)
-            {
-                /* 
-                 * we've successfully read 4KB from the file,
-                 * now decide if is actually an encrypted file
-                 * format we support
-                 */
-                const KFile * encfile;
-
-                /* is this the header of an ecnrypted file? */
-                if (KFileIsEnc (tbuff, tz) == 0)
-                {
-                    if (was_encrypted)
-                        *was_encrypted = true;
-                    rc = GetEncryptionKey(self, path, obuff, sizeof(obuff), &z);
-                    if (rc == 0)
-                    {
-                        KKey key;
-
-                        /* create the AES Key */
-                        rc = KKeyInitRead (&key, kkeyAES128, obuff, z);
-                        if (rc)
-                            ;
-                        else
-                        {
-                            rc = KEncFileMakeRead (&encfile, file, &key);
-                            if (rc)
-                                ;
-                            else
-                            {
-                                const KFile * buffile;
-
-                                /*
-                                 * TODO: make the bsize a config item not a hard constant
-                                 */
-                                rc = KBufFileMakeRead (&buffile, encfile,
-                                                       256 * 1024 * 1024);
-                                if (rc == 0)
-                                {
-                                    *f = buffile;
-                                    /* *f keeps a reference to encfile, can release it here */
-                                    KFileRelease (encfile);
-                                    return 0;
-                                }
-                                KFileRelease (encfile);
-                            }
-                        }
-                    }
-                }
-                else if (KFileIsWGAEnc (tbuff, tz) == 0)
-                {
-                    if (was_encrypted)
-                        *was_encrypted = true;
-                    rc = GetEncryptionKey(self, path, obuff, sizeof(obuff), &z);
-                    if (rc == 0)
-                    {
-                        rc = KFileMakeWGAEncRead (&encfile, file, obuff, z);
-                        if (rc)
-                            ;
-                        else
-                        {
-                            /* we'll release anextra reference to file
-                             * after this function returns
-                             */
-                            *f = encfile;
-                            return 0;
-                        }
-                    }
-                }
-                else
-                {
-                    /* -----
-                     * not encrypted in a manner we can decrypt so 
-                     * give back the raw file (possibly buffered
-                     *
-                     * since file is released in the caller
-                     * we need another reference
-                     */
-                    KFileAddRef (file);
-                    *f = file;
-                    return 0;
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-
-/*
- * try to open the file as a regular file
- */
-static
-rc_t VFSManagerOpenFileReadRegularFile (char * pbuff, size_t z,
-                                        KFile const ** file,
-                                        const KDirectory * dir)
-{
-    rc_t rc;
-    char rbuff [8192];
-
-    assert ((pbuff) && (pbuff[0]));
-    assert (*file == NULL);
-
-    rc = KDirectoryResolvePath (dir, true, rbuff, sizeof rbuff,
-                                "%s", pbuff);
-    if (rc)
-        ; /* log? */
-    else
-    {
-        /* validate that the file system agrees the path refers
-         * to a regular file (even if through a link */
-        uint32_t type;
-
-        type = KDirectoryPathType (dir, "%s", rbuff);
-        switch (type & ~kptAlias)
-        {
-        case kptNotFound:
-            rc = RC (rcVFS, rcMgr, rcOpening, rcFile,
-                     rcNotFound);
-            break;
-
-        case kptBadPath:
-            rc = RC (rcVFS, rcMgr, rcOpening, rcFile,
-                     rcInvalid);
-            break;
-
-        case kptDir:
-        case kptCharDev:
-        case kptBlockDev:
-        case kptFIFO:
-        case kptZombieFile:
-            rc = RC (rcVFS, rcMgr, rcOpening, rcFile,
-                     rcIncorrect);
-            break;
-
-        default:
-            rc = RC (rcVFS, rcMgr, rcOpening, rcFile, rcUnknown);
-            break;
-
-        case kptFile:
-            /*
-             * this is the good/successful path: open the file 
-             * as a const KFile
-             */
-            rc = KDirectoryOpenFileRead (dir, file, "%s", rbuff);
-            break;
-        }
-    }
-
-    return rc;
-}
-
-/*
- * if successful set *file to a usable KFile * and return 0
- * if unsuccessful but without error, set *file to NULL and return 0
- * if an error encountered set *file to NULL and return non-zero.
- */
-static
-rc_t VFSManagerOpenFileReadSpecial (char * pbuff, size_t z, KFile const ** file)
-{
-    rc_t rc = 0;
-    static const char dev [] = "/dev/";
-    static const char dev_stdin [] = "/dev/stdin";
-    static const char dev_null [] = "/dev/null";
-
-    assert (pbuff);
-    assert (z);
-    assert (file);
-
-    *file = NULL;
-
-    /*
-     * Handle a few special case path names that are pre-opened
-     * 'file descriptors'
-     *
-     * This probably needs to be system specific eventually
-     *
-     * First check for the path being in the 'dev' directory in
-     * posix/unix terms
-     */
-    if (string_cmp (dev, sizeof dev - 1, pbuff, z, sizeof dev - 1) != 0)
-        rc = 0; /* we're done */
-
-    else
-    {
-        if (strcmp (dev_stdin, pbuff) == 0)
-            rc = KFileMakeStdIn (file);
-
-        else if (strcmp (dev_null, pbuff) == 0)
-            rc = KFileMakeNullRead (file);
-
-        else if (strncmp ("/dev/fd/", pbuff, sizeof "/dev/fd/" - 1) == 0)
-        {
-            char * pc;
-            size_t ix;
-
-            pc = pbuff + sizeof "/dev/fd/" - 1;
-
-            for (ix = 0; isdigit (pc[ix]); ++ix)
-                assert (ix <= z);
-
-            if ((ix > 0)&&(pc[ix] == '\0'))
-            {
-                int fd;
-
-                fd = atoi (pc);
-                rc = KFileMakeFDFileRead (file, fd);
-            }
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t VFSManagerOpenFileReadInt (const VFSManager *self,
-                                const KDirectory * dir,
-                                KFile const **f,
-                                const VPath * path,
-                                bool force_decrypt,
-                                bool * was_encrypted)
-{
-    /* -----
-     * this is a first pass that only opens files directory referenced from 
-     * the ced or have a sysdir root; that is it uses KSysDir and KSysFile
-     * only.
-     */
-    const KFile * file = NULL;
-    size_t num_read;
-    char pbuff [4096];
-    rc_t rc;
-
-    rc = VPathReadPath (path, pbuff, sizeof pbuff, &num_read);
-    if (rc)
-        ; /* log? */
-    else
-    {
-        /* -----
-         * try to open path as a special file if requested
-         *
-         * *file will be set or a usable file or to NULL and rc will reflect
-         * any error
-         */
-        rc = VFSManagerOpenFileReadSpecial (pbuff, num_read, &file);
-
-        if (rc == 0)
-        {
-            /* -----
-             * If we didn't open the file using the special
-             * logic above for special paths open the file and have no error,
-             * continue
-             */
-            if (file == NULL)
-                rc = VFSManagerOpenFileReadRegularFile (pbuff, num_read,
-                                                        &file, dir);
-            /*
-             * we either have an rc to return with or we have an open KFile:
-             * check for possible encryption that we are told to decrypt
-             */
-            if (rc == 0)
-            {
-                rc = VFSManagerOpenFileReadDecryption (self, dir, f, file, path,
-                                                       force_decrypt, was_encrypted);
-            }
-            /* release file if we are here and it is open */
-            KFileRelease (file);
-        }
-    }
-    return rc;
-}
-
-
-static
-rc_t VFSManagerOpenFileReadDirectoryRelativeInt (const VFSManager *self,
-                                                 const KDirectory * dir,
-                                                 KFile const **f,
-                                                 const VPath * path,
-                                                 bool force_decrypt,
-                                                 bool * was_encrypted)
-{
-    rc_t rc;
-
-    if (f == NULL)
-        rc = RC (rcVFS, rcMgr, rcOpening, rcParam, rcNull);
-
-    else
-    {
-        *f = NULL;
-
-        if ((f == NULL) || (path == NULL))
-            rc = RC (rcVFS, rcMgr, rcOpening, rcParam, rcNull);
-
-        else if (self == NULL)
-            rc = RC (rcVFS, rcMgr, rcOpening, rcSelf, rcNull);
-
-        else
-        {
-
-            rc = VFSManagerOpenFileReadInt (self, dir, f, path, force_decrypt, was_encrypted);
-        }
-    }
-    return rc;
-}
-
-
-/* we will create a KFile from a http or ftp url... */
-static rc_t VFSManagerOpenCurlFile ( const VFSManager *self,
-                                     KFile const **f,
-                                     const VPath * path )
-{
-    rc_t rc;
-/*    const char * url; */
-    const String * uri = NULL;
-
-    if ( f == NULL )
-        return RC( rcVFS, rcMgr, rcOpening, rcParam, rcNull );
-    *f = NULL;
-    if ( self == NULL )
-        return RC( rcVFS, rcMgr, rcOpening, rcSelf, rcNull );
-    if ( path == NULL )
-        return RC( rcVFS, rcMgr, rcOpening, rcParam, rcNull );
-
-/*    url = path->path.addr; */
-    rc = VPathMakeString ( path, &uri );
-    if ( rc == 0 )
-    {
-        bool high_reliability = VPathIsHighlyReliable ( path );
-        if ( self->resolver != NULL )
-        {
-            const VPath * local_cache;
-
-            /* find cache - vresolver call */
-            rc = VResolverCache ( self->resolver, path, &local_cache, 0 );
-            if ( rc == 0 )
-            {
-                /* we did find a place for local cache --> use it! */
-                rc = VFSManagerMakeHTTPFile( self, f, uri->addr, local_cache->path.addr, high_reliability );
-                {
-                    rc_t rc2 = VPathRelease ( local_cache );
-                    if ( rc == 0 )
-                    {
-                        rc = rc2;
-                    }
-                }
-            }
-            else
-                /* we did NOT find a place for local cache --> we are not caching! */
-                rc = VFSManagerMakeHTTPFile( self, f, uri->addr, NULL, high_reliability );
-        }
-        else
-        {
-            rc = VFSManagerMakeHTTPFile( self, f, uri->addr, NULL, high_reliability );
-        }
-        free( ( void * )uri );
-    }
-    return rc;
-}
-
-LIB_EXPORT
-rc_t CC VFSManagerOpenFileReadDirectoryRelative (const VFSManager *self,
-                                                 const KDirectory * dir,
-                                                 KFile const **f,
-                                                 const VPath * path)
-{
-    return VFSManagerOpenFileReadDirectoryRelativeInt (self, dir, f, path, false, NULL);
-}
-
-LIB_EXPORT
-rc_t CC VFSManagerOpenFileReadDirectoryRelativeDecrypt (const VFSManager *self,
-                                                        const KDirectory * dir,
-                                                        KFile const **f,
-                                                        const VPath * path) /*,
-                                                        bool force_decrypt) */
-{
-    return VFSManagerOpenFileReadDirectoryRelativeInt (self, dir, f, path, true, NULL);
-}
-
-
-static rc_t ResolveVPathByVResolver( struct VResolver * resolver, const VPath ** path )
-{
-    rc_t rc;
-
-    if ( resolver == NULL )
-        rc = RC ( rcVFS, rcFile, rcOpening, rcSRA, rcUnsupported );
-    else
-    {
-        const VPath * tpath;
-        rc = VResolverLocal ( resolver, *path, &tpath );
-        if ( rc == 0 )
-        {
-            VPathRelease ( *path );
-            *path = tpath;
-        }
-    }
-    return rc;
-}
-
-static rc_t ResolveVPathBySRAPath( const VPath ** path )
-{
-    * path = NULL;
-    return RC ( rcVFS, rcFile, rcOpening, rcSRA, rcUnsupported );
-}
-
-
-LIB_EXPORT rc_t CC VFSManagerOpenFileRead ( const VFSManager *self,
-                                            KFile const **f,
-                                            const VPath * path_ )
-{
-    rc_t rc;
-
-    if ( f == NULL )
-        rc = RC (rcVFS, rcMgr, rcOpen, rcParam, rcNull);
-    else
-    {
-        *f = NULL;
-
-        if  (self == NULL )
-            rc = RC ( rcVFS, rcMgr, rcOpen, rcSelf, rcNull );
-        else if ( f == NULL )
-            rc = RC ( rcVFS, rcMgr, rcOpen, rcParam, rcNull );
-        else
-        {
-            rc = VPathAddRef ( path_ );
-            if ( rc == 0 )
-            {
-                const VPath * path = path_;
-                VPUri_t uri_type = VPathGetUri_t ( path );
-
-                switch ( uri_type )
-                {
-                default:
-                case vpuri_invalid:
-                    rc = RC (rcVFS, rcFile, rcOpening, rcPath, rcInvalid);
-                    break;
-
-                case vpuri_not_supported:
-                    rc = RC (rcVFS, rcFile, rcOpening, rcPath, rcUnsupported);
-                    break;
-
-                case vpuri_ncbi_acc:
-                    if ( self->resolver != NULL )
-                        rc = ResolveVPathByVResolver( self->resolver, &path );
-                    else
-                        rc = ResolveVPathBySRAPath( &path );
-
-                    if ( rc != 0 )
-                        break;
-
-                /* !!! fall through !!! */
-
-                case vpuri_none:
-                case vpuri_ncbi_vfs:
-                case vpuri_file:
-                    rc = VFSManagerOpenFileReadDirectoryRelativeInt ( self, self->cwd, f, path, false, NULL );
-                    break;
-
-                case vpuri_ncbi_legrefseq:
-                    rc = RC ( rcVFS, rcFile, rcOpening, rcPath, rcIncorrect );
-                    break;
-
-                case vpuri_http:
-                case vpuri_ftp:
-                    rc = VFSManagerOpenCurlFile ( self, f, path );
-                    break;
-                }
-                VPathRelease (path);
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VFSManagerOpenFileReadDecrypt (const VFSManager *self,
-                                                  KFile const **f,
-                                                  const VPath * path)
-{
-    return VFSManagerOpenFileReadDirectoryRelativeInt ( self, self->cwd, f, path, true, NULL );
-}
-
-LIB_EXPORT
-rc_t CC VFSManagerOpenDirectoryUpdateDirectoryRelative (const VFSManager *self,
-                                                        const KDirectory * dir,
-                                                        KDirectory **d,
-                                                        const VPath * path)
-{
-    rc_t rc;
-    VPUri_t uri_type;
-
-    if ((d == NULL) || (path == NULL))
-        return RC (rcVFS, rcMgr, rcOpening, rcParam, rcNull);
-
-    *d = NULL;
-
-    if (self == NULL)
-        return RC (rcVFS, rcMgr, rcOpening, rcSelf, rcNull);
-
-    uri_type = VPathGetUri_t ( path );
-    switch ( uri_type )
-    {
-    case vpuri_http :
-    case vpuri_ftp :
-        return RC( rcVFS, rcMgr, rcOpening, rcParam, rcWrongType );
-
-    default :
-        {
-            uint32_t type;
-
-            /* WHY NOT JUST TRY TO OPEN THE DIRECTORY,
-               AND LET KFS TELL US WHAT'S WRONG? */
-
-            type = KDirectoryPathType (dir, "%.*s", ( int ) path -> path . size, path -> path . addr );
-            switch (type & ~kptAlias)
-            {
-            case kptNotFound:
-                rc = RC (rcVFS, rcMgr, rcOpening, rcDirectory, rcNotFound);
-                break;
-
-            case kptFile:
-                rc = RC (rcVFS, rcMgr, rcOpening, rcDirectory, rcReadonly);
-                break;
-
-            case kptBadPath:
-                rc = RC (rcVFS, rcMgr, rcOpening, rcDirectory, rcInvalid);
-                break;
-
-            case kptDir:
-                rc = KDirectoryOpenDirUpdate ((KDirectory*)dir, d, false, "%.*s", ( int ) path -> path . size, path -> path . addr);
-                return rc;
-
-            case kptCharDev:
-            case kptBlockDev:
-            case kptFIFO:
-            case kptZombieFile:
-                rc = RC (rcVFS, rcMgr, rcOpening, rcDirectory, rcIncorrect);
-                break;
-
-            default:
-                rc = RC (rcVFS, rcMgr, rcOpening, rcDirectory, rcUnknown);
-                break;
-            }
-        }
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VFSManagerOpenDirectoryUpdate (const VFSManager *self,
-                                                  KDirectory **d,
-                                                  const VPath * path)
-{
-    return VFSManagerOpenDirectoryUpdateDirectoryRelative (self, self->cwd, d, path);
-}
-
-
-static
-rc_t TransformFileToDirectory(const KDirectory * dir,
-                              const KFile * file,
-                              KDirectory const **d,
-                              const char *path_str,
-                              bool was_encrypted)
-{
-    rc_t rc;
-
-    rc = KFileRandomAccess( file );
-    if (rc)
-        PLOGERR(klogErr,(klogErr, rc, "Can not use files without random access"
-                         " as database archives '$(P)'", "P=%s", path_str));
-    else
-    {
-        size_t tz;
-        char tbuff [4096];
-
-        rc = KFileReadAll (file, 0, tbuff, sizeof tbuff, &tz);
-        if ( rc )
-            LOGERR (klogErr, rc, "Error reading the head of an archive to use as a database object");
-        else
-        {
-            /* we only use KAR/SRA or tar files as archives so try to identify
-             * as our KAR/SRA file.
-             IT IS NOT TRUE ANYMORE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
-            if ( KFileIsSRA( tbuff, tz ) == 0 )
-                /* if it was open it as a directory */
-                rc = KDirectoryOpenSraArchiveReadUnbounded_silent_preopened( dir, d, false, file, "%s", path_str );
-
-            else
-            {
-                rc = KDirectoryOpenTarArchiveRead_silent_preopened( dir, d, false, file, "%s", path_str );
-
-                /*
-                 * if RC here we did not have an SRA and did not have
-                 * a tar file we could use; assume the problem was:
-                 * - decryption if the file was encrypted
-                 * - or it is not an archive
-                 */
-                if (rc != 0) {
-                    if ( was_encrypted ) {
-                     /* the following RC update is not correct anymore but:
-                        TODO: check tools/libraries
-                            that expect this returned code and fix them
-                        rc = RC(rcVFS, rcEncryptionKey, rcOpening, rcEncryption,
-                             rcIncorrect );
-                        PLOGERR (klogErr, (klogErr, rc,
-                            "could not use '$(P)' as an "
-                            "archive it was encrypted so the password"
-                            " was possibly wrong or it is not SRA or"
-                            " TAR file", "P=%s", path_str)); */
-                        MGR_DEBUG(("TransformFileToDirectory: could not use "
-                            "'%s' as an archive - it was encrypted and "
-                            "the password was possibly wrong "
-                            "or it is not SRA or TAR file\n", path_str));
-                    }
-                    else {
-                        PLOGERR (klogInfo, (klogInfo, rc,
-                            "could not use '$(P)' as an "
-                            "archive not identified as SRA or"
-                            " TAR file", "P=%s", path_str));
-                    }
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-/* also handles ftp - if it cant we'll need another function */
-static
-rc_t VFSManagerOpenDirectoryReadHttp (const VFSManager *self,
-                                      const KDirectory * dir,
-                                      KDirectory const **d,
-                                      const VPath * path,
-                                      bool force_decrypt)
-{
-    rc_t rc;
-    const KFile * file = NULL;
-
-    rc = VFSManagerOpenCurlFile ( self, &file, path );
-    if ( rc != 0 )
-    {
-        const char extension[] = ".vdbcache";
-        const String * s = & path -> path;
-        assert ( s );
-        /* do not log error for .vdbcache http files : find a better solution */
-        if ( s -> addr == NULL
-            || s -> size < sizeof extension || s -> len < sizeof extension
-            || string_cmp ( s -> addr + s -> size - sizeof extension + 1,
-                sizeof extension - 1,
-                extension, sizeof extension - 1, sizeof extension - 1 ) != 0 )
-        {
-            PLOGERR ( klogErr, ( klogErr, rc, "error with http open '$(U)'",
-                             "U=%S:%S", & path -> scheme, & s ) );
-        }
-    }
-    else
-    {
-        const char mountpointpath[] = "/";
-        const KDirectory * mountpoint;
-
-        rc = KQuickMountDirMake (self->cwd, &mountpoint, file,
-                                 mountpointpath, sizeof mountpointpath - 1, 
-                                 path->path.addr, path->path.size);
-        if (rc)
-        {
-            PLOGERR (klogInt, (klogErr, rc, "error creating mount "
-                               "'$(M)' for '$(F)", "M=%s,F=%S",
-                               mountpointpath, &path->path));
-        }
-        else
-        {
-            const KFile * f;
-            bool was_encrypted = false;
-
-            rc = VFSManagerOpenFileReadDecryption (self, mountpoint, &f,
-                                                   file, path,
-                                                   force_decrypt,
-                                                   &was_encrypted);
-            if (rc == 0)
-            {
-                    
-                rc = TransformFileToDirectory (mountpoint, f, d, 
-                                               path->path.addr,
-                                               was_encrypted);
-                /* hacking in the fragment bit */
-                if ((rc == 0) && (path->fragment . size > 1 ) )
-                {
-                    const KDirectory * tempd = * d;
-                    const char * fragment = path -> fragment . addr + 1;
-                    int frag_size = ( int ) path -> fragment . size - 1;
-
-                    assert ( fragment [ -1 ] == '#' );
-                        
-                    rc = KDirectoryOpenDirRead (tempd, d, false, "%.*s", frag_size, fragment );
-                    
-                    KDirectoryRelease (tempd);
-                }
-                KFileRelease (f);
-            }
-            KDirectoryRelease (mountpoint);
-        }
-        KFileRelease (file);
-    }
-    return rc;
-}
-
-/* similar to VFSManagerOpenDirectoryReadHttp but already resolved */
-static
-rc_t VFSManagerOpenDirectoryReadHttpResolved (const VFSManager *self,
-                                              KDirectory const **d,
-                                              const VPath * path,
-                                              const VPath * cache,
-                                              bool force_decrypt)
-{
-    const String * uri = NULL;
-    rc_t rc = VPathMakeString ( path, &uri );
-    if ( rc == 0 )
-    {
-        /* check how the path has been marked */
-        bool high_reliability = VPathIsHighlyReliable ( path );
-
-        const KFile * file = NULL;
-        rc = VFSManagerMakeHTTPFile( self, &file, uri->addr, cache == NULL ? NULL : cache->path.addr, high_reliability );
-        if ( rc != 0 )
-        {
-            if ( high_reliability )
-            {
-                PLOGERR ( klogErr, ( klogErr, rc, "error with http open '$(U)'",
-                                     "U=%s", uri->addr ) );
-            }
-        }
-        else
-        {
-            const char mountpointpath[] = "/";
-            const KDirectory * mountpoint;
-
-            rc = KQuickMountDirMake (self->cwd, &mountpoint, file,
-                                     mountpointpath, sizeof mountpointpath - 1, 
-                                     path->path.addr, path->path.size);
-            if (rc)
-            {
-                PLOGERR (klogInt, (klogErr, rc, "error creating mount "
-                                   "'$(M)' for '$(F)", "M=%s,F=%S",
-                                   mountpointpath, &path->path));
-            }
-            else
-            {
-                const KFile * f;
-                bool was_encrypted = false;
-
-                rc = VFSManagerOpenFileReadDecryption (self, mountpoint, &f,
-                                                       file, path,
-                                                       force_decrypt,
-                                                       &was_encrypted);
-                if (rc == 0)
-                {
-                        
-                    rc = TransformFileToDirectory (mountpoint, f, d, 
-                                                   path->path.addr,
-                                                   was_encrypted);
-                    /* hacking in the fragment bit */
-                    if ((rc == 0) && (path->fragment . size > 1 ) )
-                    {
-                        const KDirectory * tempd = * d;
-                        const char * fragment = path -> fragment . addr + 1;
-                        int frag_size = ( int ) path -> fragment . size - 1;
-
-                        assert ( fragment [ -1 ] == '#' );
-                            
-                        rc = KDirectoryOpenDirRead (tempd, d, false, "%.*s", frag_size, fragment );
-                        
-                        KDirectoryRelease (tempd);
-                    }
-                    KFileRelease (f);
-                }
-                KDirectoryRelease (mountpoint);
-            }
-            KFileRelease (file);
-        }
-        free( ( void * )uri );
-    }
-    return rc;
-}
-
-
-static
-rc_t VFSManagerOpenDirectoryReadKfs (const VFSManager *self,
-                                     const KDirectory * dir,
-                                     KDirectory const **d,
-                                     const VPath * path,
-                                     bool force_decrypt)
-{
-    const KFile * file = NULL;
-    char rbuff[ 4096 ]; /* resolved path buffer */
-    rc_t rc;
-
-    assert (self);
-    assert (dir);
-    assert (d);
-    assert (path);
-    assert ((force_decrypt == false) || (force_decrypt == true));
-    assert (*d == NULL);
-
-    file = NULL;
-
-    rc = KDirectoryResolvePath( dir, true, rbuff, sizeof rbuff, "%.*s", ( int ) path -> path . size, path -> path . addr );
-    if ( rc == 0 )
-    {
-        uint32_t type;
-        bool was_encrypted;
-
-        type = KDirectoryPathType( dir, "%s", rbuff );
-        switch (type & ~kptAlias)
-        {
-        case kptNotFound:
-            rc = RC( rcVFS, rcMgr, rcOpening, rcDirectory, rcNotFound );
-            break;
-
-        case kptFile:
-            rc = VFSManagerOpenFileReadDirectoryRelativeInt (self, dir, 
-                                                             &file, path, 
-                                                             force_decrypt,
-                                                             &was_encrypted);
-            if (rc == 0)
-                rc = TransformFileToDirectory (dir, file, d, rbuff,
-                                               was_encrypted);
-            break;
-
-        case kptBadPath:
-            rc = RC( rcVFS, rcMgr, rcOpening, rcDirectory, rcInvalid );
-            break;
-
-        case kptDir:
-            rc = KDirectoryOpenDirRead( dir, d, false, "%s", rbuff );
-            return rc;
-
-        case kptCharDev:
-        case kptBlockDev:
-        case kptFIFO:
-        case kptZombieFile:
-            rc = RC( rcVFS, rcMgr, rcOpening, rcDirectory, rcIncorrect );
-            break;
-
-        default:
-            rc = RC( rcVFS, rcMgr, rcOpening, rcDirectory, rcUnknown );
-            break;
-        }
-
-        /* hacking in the fragment bit */
-        /* the C grammar specifies order of precedence... */
-        if ((rc == 0) && (path->fragment.size > 1 ))
-        {
-            const KDirectory * tempd = * d;
-            const char * fragment = path -> fragment . addr + 1;
-            int frag_size = ( int ) path -> fragment . size - 1;
-
-            assert ( fragment [ -1 ] == '#' );
-            
-            rc = KDirectoryOpenDirRead (tempd, d, false, "%.*s", frag_size, fragment );
-            
-            KDirectoryRelease (tempd);
-        }
-    }
-
-    KFileRelease(file);
-
-    return rc;
-}
-
-
-static
-rc_t VFSManagerOpenDirectoryReadLegrefseq (const VFSManager *self,
-                                           const KDirectory * dir,
-                                           KDirectory const **d,
-                                           const VPath * path,
-                                           bool force_decrypt)
-{
-    const KFile * file;
-    const KDirectory * dd;
-    size_t num_read;
-    char pbuff [4096]; /* path buffer */
-    rc_t rc;
-
-    assert (self);
-    assert (dir);
-    assert (d);
-    assert (path);
-    assert ((force_decrypt == false) || (force_decrypt == true));
-    assert (*d == NULL);
-
-    file = NULL;
-    dd = NULL;
-
-    /* hier part only */
-    rc = VPathReadPath (path, pbuff, sizeof pbuff, &num_read);
-    if ( rc == 0 )
-    {
-        char rbuff[ 4096 ]; /* resolved path buffer */
-        rc = KDirectoryResolvePath( dir, true, rbuff, sizeof rbuff, "%s", pbuff );
-        if ( rc == 0 )
-        {
-            uint32_t type;
-            bool was_encrypted;
-
-            type = KDirectoryPathType( dir, "%s", rbuff );
-            switch (type & ~kptAlias)
-            {
-            case kptNotFound:
-                rc = RC( rcVFS, rcMgr, rcOpening, rcDirectory, rcNotFound );
-                break;
-
-            case kptFile:
-                rc = VFSManagerOpenFileReadDirectoryRelativeInt (self, dir, 
-                                                                 &file, path, 
-                                                                 force_decrypt,
-                                                                 &was_encrypted);
-                if (rc == 0)
-                    rc = TransformFileToDirectory (dir, file, &dd, rbuff,
-                                                   was_encrypted);
-                break;
-
-            case kptBadPath:
-                rc = RC( rcVFS, rcMgr, rcOpening, rcDirectory, rcInvalid );
-                break;
-
-            case kptDir:
-                rc = KDirectoryOpenDirRead( dir, &dd, false, "%s", rbuff );
-                break;
-
-            case kptCharDev:
-            case kptBlockDev:
-            case kptFIFO:
-            case kptZombieFile:
-                rc = RC( rcVFS, rcMgr, rcOpening, rcDirectory, rcIncorrect );
-                break;
-
-            default:
-                rc = RC( rcVFS, rcMgr, rcOpening, rcDirectory, rcUnknown );
-                break;
-            }
-
-            if (rc == 0)
-            {
-                if ( path -> fragment . size < 2 )
-                    rc = RC( rcVFS, rcMgr, rcOpening, rcPath, rcIncorrect );
-                else
-                {
-                    const char *fragment = path -> fragment . addr + 1;
-                    int frag_size = ( int ) path -> fragment . size - 1;
-                    assert ( fragment [ -1 ] == '#' );
-
-                    rc = KDirectoryOpenDirRead (dd, d, false, "%.*s", frag_size, fragment );
-
-                    KDirectoryRelease (dd);
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-
-static
-rc_t VFSManagerOpenDirectoryReadDirectoryRelativeInt (const VFSManager *self,
-                                                      const KDirectory * dir,
-                                                      KDirectory const **d,
-                                                      const VPath * path_,
-                                                      bool force_decrypt)
-{
-    rc_t rc;
-    do 
-    {
-        if (d == NULL)
-        {
-            rc =  RC (rcVFS, rcDirectory, rcOpening, rcParam, rcNull);
-            break;
-        }
-
-        *d = NULL;
-
-        if (self == NULL)
-        {
-            rc = RC (rcVFS, rcDirectory, rcOpening, rcSelf, rcNull);
-            break;
-        }
-
-        if ((dir == NULL) || (path_ == NULL))
-        {
-            rc = RC (rcVFS, rcDirectory, rcOpening, rcParam, rcNull);
-            break;
-        }
-
-#if 0
-        if ((force_decrypt != false) && (force_decrypt != true))
-        {
-            rc = RC (rcVFS, rcDirectory, rcOpening, rcParam, rcInvalid);
-            break;
-        }
-#endif
-
-        rc = VPathAddRef (path_);
-        if ( rc )
-            break;
-        else
-        {
-            const VPath *path = path_;
-            VPUri_t uri_type = VPathGetUri_t ( path );
-
-            switch ( uri_type )
-            {
-            default:
-            case vpuri_invalid:
-                rc = RC (rcVFS, rcDirectory, rcOpening, rcPath, rcInvalid);
-                break;
-
-
-            case vpuri_not_supported:
-                rc = RC (rcVFS, rcDirectory, rcOpening, rcPath, rcUnsupported);
-                break;
-
-            case vpuri_ncbi_acc:
-                if ( self->resolver != NULL )
-                    rc = ResolveVPathByVResolver( self->resolver, &path );
-                else
-                    rc = ResolveVPathBySRAPath( &path );
-                if ( rc != 0 )
-                    break;
-
-            /* !!! fall through !!! */
-
-            case vpuri_none:
-            case vpuri_ncbi_vfs:
-            case vpuri_file:
-                rc = VFSManagerOpenDirectoryReadKfs ( self, dir, d, path, force_decrypt );
-                break;
-
-            case vpuri_ncbi_legrefseq:
-                rc = VFSManagerOpenDirectoryReadLegrefseq ( self, dir, d, path, force_decrypt );
-                break;
-
-            case vpuri_http:
-            case vpuri_ftp:
-                rc = VFSManagerOpenDirectoryReadHttp ( self, dir, d, path, force_decrypt );
-                break;
-            }
-            VPathRelease ( path ); /* same as path_ if not uri */
-        }
-    } while (0);
-    return rc;
-}
-
-
-LIB_EXPORT 
-rc_t CC VFSManagerOpenDirectoryReadDirectoryRelative (const VFSManager *self,
-                                                      const KDirectory * dir,
-                                                      KDirectory const **d,
-                                                      const VPath * path)
-{
-    return VFSManagerOpenDirectoryReadDirectoryRelativeInt (self, dir, d, path, false);
-}
-
-
-LIB_EXPORT 
-rc_t CC VFSManagerOpenDirectoryReadDirectoryRelativeDecrypt (const VFSManager *self,
-                                                             const KDirectory * dir,
-                                                             KDirectory const **d,
-                                                             const VPath * path)
-{
-    return VFSManagerOpenDirectoryReadDirectoryRelativeInt (self, dir, d, path, true);
-}
-
-
-LIB_EXPORT rc_t CC VFSManagerOpenDirectoryReadDecrypt (const VFSManager *self,
-                                                       KDirectory const **d,
-                                                       const VPath * path)
-{
-    return VFSManagerOpenDirectoryReadDirectoryRelativeInt (self, self->cwd, d, path, true);
-}
-
-
-LIB_EXPORT rc_t CC VFSManagerOpenDirectoryRead (const VFSManager *self,
-                                                KDirectory const **d,
-                                                const VPath * path)
-{
-    return VFSManagerOpenDirectoryReadDirectoryRelativeInt (self, self->cwd, d, path, false);
-}
-
-LIB_EXPORT 
-rc_t CC VFSManagerOpenDirectoryReadDecryptRemote (const VFSManager *self,
-                                                  KDirectory const **d,
-                                                  const VPath * path,
-                                                  const VPath * cache)
-{
-    rc_t rc;
-    if ( self == NULL )
-        return RC (rcVFS, rcDirectory, rcOpening, rcSelf, rcNull);
-    if ( path == NULL )
-        return RC (rcVFS, rcDirectory, rcOpening, rcParam, rcNull);
-    /* cache == NULL is ok */
-    if ( d == NULL )
-        return RC (rcVFS, rcDirectory, rcOpening, rcParam, rcNull);
-    *d = NULL;
-
-    switch ( VPathGetUri_t ( path ) )
-    {
-    case vpuri_http:
-    case vpuri_ftp:
-        rc = VFSManagerOpenDirectoryReadHttpResolved ( self, d, path, cache, true );
-        break;
-        
-    default:
-        rc = RC (rcVFS, rcDirectory, rcOpening, rcPath, rcInvalid);
-        break;
-    }
-    
-    return rc;
-}
-
-
-/* OpenFileWrite
- *  opens an existing file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if true, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- */
-LIB_EXPORT rc_t CC VFSManagerOpenFileWrite (const VFSManager *self,
-                                            KFile **f, bool update,
-                                            const VPath * path )
-{
-    /* -----
-     * this is a first pass that only opens files directory referenced from 
-     * the ced or have a sysdir root; that is it uses KSysDir and KSysFile
-     * only.
-     */
-    KFile * file = NULL;
-    size_t num_read;
-    char pbuff [4096];
-    rc_t rc;
-
-    if ((f == NULL) || (path == NULL))
-        return RC (rcVFS, rcMgr, rcOpening, rcParam, rcNull);
-
-    *f = NULL;
-
-    if (self == NULL)
-        return RC (rcVFS, rcMgr, rcOpening, rcSelf, rcNull);
-
-    rc = VPathReadPath (path, pbuff, sizeof pbuff, &num_read);
-    if (rc == 0)
-    {
-        /* handle a few special case path names
-         * This probably needs to be system specifica eventually
-         */
-        if (strncmp ("/dev/", pbuff, sizeof "/dev/" - 1) == 0)
-        {
-
-            if (strcmp ("/dev/stdout", pbuff) == 0)
-                rc = KFileMakeStdOut (&file);
-            else if (strcmp ("/dev/stderr", pbuff) == 0)
-                rc = KFileMakeStdErr (&file);
-            else if (strcmp ("/dev/null", pbuff) == 0)
-                rc = KFileMakeNullUpdate (&file);
-            else if (strncmp ("/dev/fd/", pbuff, sizeof "/dev/fd/" - 1) == 0)
-            {
-                char * pc;
-                size_t ix;
-
-                pc = pbuff + sizeof "/dev/fd/" - 1;
-
-                for (ix = 0; isdigit (pc[ix]); ++ix)
-                    ;
-
-                if ((ix > 0)&&(pc[ix] == '\0'))
-                {
-                    int fd = atoi (pc);
-
-                    rc = KFileMakeFDFileWrite (&file, update, fd);
-                }
-            }
-        }
-        if ((rc == 0)&&(file == NULL))
-        {
-            char rbuff [4096];
-
-            rc = KDirectoryResolvePath (self->cwd, true, rbuff, sizeof rbuff, "%s", pbuff);
-            if (rc == 0)
-            {
-                uint32_t type;
-
-                type = KDirectoryPathType (self->cwd, "%s", rbuff);
-                switch (type & ~kptAlias)
-                {
-                case kptNotFound:
-                    rc = RC (rcVFS, rcMgr, rcOpening, rcFile, rcNotFound);
-                    break;
-
-                case kptFile:
-                    rc = KDirectoryOpenFileWrite (self->cwd, &file, update, "%s", rbuff);
-                    break;
-
-                case kptBadPath:
-                    rc = RC (rcVFS, rcMgr, rcOpening, rcFile, rcInvalid);
-                    break;
-                case kptDir:
-                case kptCharDev:
-                case kptBlockDev:
-                case kptFIFO:
-                case kptZombieFile:
-                    rc = RC (rcVFS, rcMgr, rcOpening, rcFile, rcIncorrect);
-                    break;
-
-                default:
-                    rc = RC (rcVFS, rcMgr, rcOpening, rcFile, rcUnknown);
-                    break;
-                }
-            }
-        }
-    }
-    if (rc == 0)
-    {
-        size_t z;
-        char obuff [VFS_KRYPTO_PASSWORD_MAX_SIZE+2];
-
-        if (VPathOption (path, vpopt_encrypted, obuff, sizeof obuff, &z) == 0)
-        {
-            rc = GetEncryptionKey(self, path, obuff, sizeof(obuff), &z);
-            if (rc == 0)
-            {
-                KKey key;
-                KFile * encfile;
-            
-                rc = KKeyInitUpdate (&key, kkeyAES128, obuff, z);
-                if (rc == 0)
-                {
-                    rc = KEncFileMakeWrite (&encfile, file, &key);
-                    if (rc == 0)
-                    {
-                        KFileRelease (file); /* owned by encfile now */
-                        *f = encfile;
-                        return 0;
-                    }
-                }
-            }
-            if (rc)
-                KFileRelease (file);
-        }
-        else
-        {
-            *f = file;
-            return 0;
-        }
-    }
-    return rc;
-}
-
-
-/* CreateFile
- *  opens a file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "update" [ IN ] - if true, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "mode" [ IN ] - a creation mode ( see explanation above ).
- *
- *  "path" [ IN ] VPath representing the path, URL or URN of the desired file
- */
-LIB_EXPORT rc_t CC VFSManagerCreateFile ( const VFSManager *self, KFile **f,
-                                          bool update, uint32_t access, KCreateMode mode, const VPath * path )
-{
-    /* -----
-     * this is a first pass that only opens files directory referenced from 
-     * the ced or have a sysdir root; that is it uses KSysDir and KSysFile
-     * only.
-     */
-    KFile * file = NULL;
-    size_t num_read;
-    rc_t rc;
-    bool file_created = false;
-    char pbuff [4096];
-    char rbuff [4096];
-
-    if ((f == NULL) || (path == NULL))
-        return RC (rcVFS, rcMgr, rcOpening, rcParam, rcNull);
-
-    *f = NULL;
-
-    if (self == NULL)
-        return RC (rcVFS, rcMgr, rcOpening, rcSelf, rcNull);
-
-    rc = VPathReadPath (path, pbuff, sizeof pbuff, &num_read);
-    if (rc == 0)
-    {
-
-        /* handle a few special case path names
-         * This probably needs to be system specifica eventually
-         */
-        if (strncmp ("/dev/", pbuff, sizeof "/dev/" - 1) == 0)
-        {
-
-            if (strcmp ("/dev/stdout", pbuff) == 0)
-                rc = KFileMakeStdOut (&file);
-            else if (strcmp ("/dev/stderr", pbuff) == 0)
-                rc = KFileMakeStdErr (&file);
-            else if (strcmp ("/dev/null", pbuff) == 0)
-                rc = KFileMakeNullUpdate (&file);
-            else if (strncmp ("/dev/fd/", pbuff, sizeof "/dev/fd/" - 1) == 0)
-            {
-                char * pc;
-                size_t ix;
-
-                pc = pbuff + sizeof "/dev/fd/" - 1;
-
-                for (ix = 0; isdigit (pc[ix]); ++ix)
-                    ;
-
-                if ((ix > 0)&&(pc[ix] == '\0'))
-                {
-                    int fd = atoi (pc);
-
-                    rc = KFileMakeFDFileWrite (&file, update, fd);
-                }
-            }
-        }
-        if ((rc == 0)&&(file == NULL))
-        {
-            rc = KDirectoryResolvePath (self->cwd, true, rbuff, sizeof rbuff, "%s", pbuff);
-            if (rc == 0)
-            {
-                uint32_t type;
-
-                type = KDirectoryPathType (self->cwd, "%s", rbuff);
-                switch (type & ~kptAlias)
-                {
-                case kptNotFound:
-                case kptFile:
-                    rc = KDirectoryCreateFile (self->cwd, &file, update, access, mode,
-                                               "%s", rbuff);
-                    if (rc == 0)
-                        file_created = true;
-                    break;
-
-                case kptBadPath:
-                    rc = RC (rcVFS, rcMgr, rcOpening, rcFile, rcInvalid);
-                    break;
-                case kptDir:
-                case kptCharDev:
-                case kptBlockDev:
-                case kptFIFO:
-                case kptZombieFile:
-                    rc = RC (rcVFS, rcMgr, rcOpening, rcFile, rcIncorrect);
-                    break;
-
-                default:
-                    rc = RC (rcVFS, rcMgr, rcOpening, rcFile, rcUnknown);
-                    break;
-                }
-            }
-        }
-    }
-    if (rc == 0)
-    {
-        size_t z;
-        char obuff [VFS_KRYPTO_PASSWORD_MAX_SIZE+2];
-
-        if (VPathOption (path, vpopt_encrypted, obuff, sizeof obuff, &z) == 0)
-        {
-            rc = GetEncryptionKey(self, path, obuff, sizeof(obuff), &z);
-            if (rc == 0)
-            {
-                KKey key;
-                KFile * encfile;
-                rc = KKeyInitUpdate (&key, kkeyAES128, obuff, z);
-
-                obuff[z] = '\0';
-
-                rc = KEncFileMakeWrite (&encfile, file, &key);
-                if (rc == 0)
-                {
-                    KFileRelease (file); /* now owned by encfile */
-                    *f = encfile;
-                    return 0;   
-                }
-            }
-            if (rc)
-                KFileRelease (file);
-        }
-        else
-        {
-            *f = file;
-            return 0;
-        }
-    }
-    if (rc && file_created)
-        KDirectoryRemove (self->cwd, true, "%s", rbuff);
-    return rc;
-}
-
-
-/* Remove
- *  remove an accessible object from its directory
- *
- *  "force" [ IN ] - if true and target is a directory,
- *  remove recursively
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- */
-LIB_EXPORT rc_t CC VFSManagerRemove ( const VFSManager *self, bool force,
-                                      const VPath * path )
-{
-    /* -----
-     * this is a first pass that only opens files directory referenced from 
-     * the ced or have a sysdir root; that is it uses KSysDir and KSysFile
-     * only.
-     */
-    size_t num_read;
-    char pbuff [4096];
-    rc_t rc;
-
-    if (path == NULL)
-        return RC (rcVFS, rcMgr, rcOpening, rcParam, rcNull);
-
-    if (self == NULL)
-        return RC (rcVFS, rcMgr, rcOpening, rcSelf, rcNull);
-
-    rc = VPathReadPath (path, pbuff, sizeof pbuff, &num_read);
-    if (rc == 0)
-    {
-        char rbuff [4096];
-    
-        rc = KDirectoryResolvePath (self->cwd, true, rbuff, sizeof rbuff, "%s", pbuff);
-        if (rc == 0)
-        {
-            uint32_t type;
-
-            type = KDirectoryPathType (self->cwd, "%s", rbuff);
-            switch (type & ~kptAlias)
-            {
-            case kptNotFound:
-                break;
-
-            case kptFile:
-            case kptDir:
-            case kptCharDev:
-            case kptBlockDev:
-            case kptFIFO:
-            case kptZombieFile:
-                rc = KDirectoryRemove (self->cwd, force, "%s", rbuff);
-                break;
-
-            case kptBadPath:
-                rc = RC (rcVFS, rcMgr, rcOpening, rcFile, rcInvalid);
-                break;
-/*                 rc = RC (rcVFS, rcMgr, rcOpening, rcFile, rcIncorrect); */
-/*                 break; */
-
-            default:
-                rc = RC (rcVFS, rcMgr, rcOpening, rcFile, rcUnknown);
-                break;
-            }
-        }
-    }
-    return rc;
-}
-
-/* Make
- */
-LIB_EXPORT rc_t CC VFSManagerMake ( VFSManager ** pmanager )
-{
-    return VFSManagerMakeFromKfg(pmanager, NULL);
-}
-
-/* Make
- */
-LIB_EXPORT rc_t CC VFSManagerMakeFromKfg ( struct VFSManager ** pmanager,
-    struct KConfig * cfg)
-{
-    rc_t rc;
-
-    if (pmanager == NULL)
-        return RC (rcVFS, rcMgr, rcConstructing, rcParam, rcNull);
-
-    *pmanager = singleton;
-    if ( singleton != NULL )
-    {
-        rc = VFSManagerAddRef ( singleton );
-        if ( rc != 0 )
-            *pmanager = NULL;
-    }
-    else
-    {
-        VFSManager * obj;
-
-        obj = calloc (1, sizeof (*obj));
-        if (obj == NULL)
-            rc = RC (rcVFS, rcMgr, rcConstructing, rcMemory, rcExhausted);
-        else
-        {
-            KRefcountInit (& obj -> refcount, 1,
-                kfsmanager_classname, "init", "singleton" );
-
-            rc = KDirectoryNativeDir ( & obj -> cwd );
-            if ( rc == 0 )
-            {
-                if (cfg == NULL)
-                    rc = KConfigMake ( & obj -> cfg, NULL );
-                else
-                {
-                    rc = KConfigAddRef ( cfg );
-                    if (rc == 0)
-                        obj -> cfg = cfg;
-                }
-                if ( rc == 0 )
-                {
-                    rc = KCipherManagerMake ( & obj -> cipher );
-                    if ( rc == 0 )
-                    {
-                        rc = KKeyStoreMake ( & obj -> keystore, obj -> cfg );
-                        if ( rc == 0 )
-                        {
-                            rc = VFSManagerMakeResolver ( obj, & obj -> resolver, obj -> cfg );
-                            if ( rc != 0 )
-                            {
-                                LOGERR ( klogWarn, rc, "could not build vfs-resolver" );
-                                rc = 0;
-                            }
-
-                            rc = KNSManagerMake ( & obj -> kns );
-                            if ( rc != 0 )
-                            {
-                                LOGERR ( klogWarn, rc, "could not build network manager" );
-                                rc = 0;
-                            }
-
-                            *pmanager = singleton = obj;
-       DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_MGR),  ("%s(%p)\n", __FUNCTION__, cfg));
-                            return 0;
-                        }
-                    }
-                }
-            }
-        }
-
-        VFSManagerDestroy (obj);
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VFSManagerGetCWD (const VFSManager * self, KDirectory ** cwd)
-{
-    rc_t rc;
-
-    if ( cwd == NULL )
-        rc = RC (rcVFS, rcMgr, rcAccessing, rcParam, rcNull);
-    else
-    {
-        if ( self == NULL )
-            rc = RC (rcVFS, rcMgr, rcAccessing, rcSelf, rcNull);
-        else
-        {
-            rc = KDirectoryAddRef ( self -> cwd );
-            if ( rc == 0 )
-            {
-                * cwd = self -> cwd;
-                return 0;
-            }
-        }
-
-        * cwd = NULL;
-    }
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VFSManagerGetResolver ( const VFSManager * self, struct VResolver ** resolver )
-{
-    rc_t rc;
-
-    if ( resolver == NULL )
-        rc = RC (rcVFS, rcMgr, rcAccessing, rcParam, rcNull);
-    else
-    {
-        if ( self == NULL )
-            rc = RC (rcVFS, rcMgr, rcAccessing, rcSelf, rcNull);
-        else
-        {
-            rc = VResolverAddRef ( self -> resolver );
-            if ( rc == 0 )
-            {
-                * resolver = self -> resolver;
-                return 0;
-            }
-        }
-
-        * resolver = NULL;
-    }
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VFSManagerSetResolver
-    ( VFSManager * self, VResolver * resolver )
-{
-    rc_t rc = 0;
-
-    if ( self == NULL )
-        rc = RC (rcVFS, rcMgr, rcUpdating, rcSelf, rcNull);
-    else if ( resolver == NULL )
-        rc = RC (rcVFS, rcMgr, rcUpdating, rcParam, rcNull);
-    else if (self -> resolver != resolver ) {
-        rc = VResolverAddRef ( resolver );
-        if (rc == 0) {
-            rc = VResolverRelease ( self -> resolver );
-            if (rc == 0) {
-                self -> resolver = resolver;
-                return 0;
-            }
-        }
-
-        VResolverRelease ( resolver );
-    }
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VFSManagerGetKNSMgr ( const VFSManager * self, struct KNSManager ** kns )
-{
-    rc_t rc;
-
-    if ( kns == NULL )
-        rc = RC (rcVFS, rcMgr, rcAccessing, rcParam, rcNull);
-    else
-    {
-        if ( self == NULL )
-            rc = RC (rcVFS, rcMgr, rcAccessing, rcSelf, rcNull);
-        else
-        {
-            rc = KNSManagerAddRef ( self -> kns );
-            if ( rc == 0 )
-            {
-                * kns = self -> kns;
-                return 0;
-            }
-        }
-
-        * kns = NULL;
-    }
-
-    return rc;
-}
-
-
-LIB_EXPORT rc_t CC VFSManagerGetKryptoPassword (const VFSManager * self,
-                                                char * password,
-                                                size_t max_size,
-                                                size_t * size)
-{
-    rc_t rc;
-
-    if (self == NULL)
-        rc = RC (rcVFS, rcMgr, rcAccessing, rcSelf, rcNull);
-
-    else if ((password == NULL) || (max_size == 0) || (size == NULL))
-        rc = RC (rcVFS, rcMgr, rcAccessing, rcParam, rcNull);
-
-    else
-    {
-        size_t z;
-        char obuff [4096 + 16];
-
-        rc = VFSManagerGetConfigPWFile(self, obuff, sizeof obuff, &z);
-        if (rc == 0)
-        {
-            VPath * vpath;
-            rc_t rc2;
-            rc = VPathMake (&vpath, obuff);
-            if (rc == 0)
-                rc = GetEncryptionKey(self, vpath, password, max_size, size);
-            rc2 = VPathRelease (vpath);
-            if (rc == 0)
-                rc = rc2;
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VFSManagerUpdateKryptoPassword (const VFSManager * self, 
-                                                   const char * password,
-                                                   size_t size,
-                                                   char * pwd_dir,
-                                                   size_t pwd_dir_size)
-{
-    static const char temp_extension [] = ".tmp";
-    rc_t rc;
-
-    if (self == NULL)
-        rc = RC (rcVFS, rcEncryptionKey, rcUpdating, rcSelf, rcNull);
-
-    else if ((password == NULL) || (size == 0))
-        rc = RC (rcVFS, rcEncryptionKey, rcUpdating, rcParam, rcNull);
-
-    else if (size > VFS_KRYPTO_PASSWORD_MAX_SIZE)
-        rc = RC (rcVFS, rcEncryptionKey, rcUpdating, rcSize, rcExcessive);
-
-    else if ((string_chr (password, size, '\n') != NULL) ||
-             (string_chr (password, size, '\r') != NULL))
-        rc = RC (rcVFS, rcEncryptionKey, rcUpdating, rcEncryptionKey, rcInvalid);
-
-    else
-    {
-        size_t old_password_file_size;
-        char old_password_file [8193];
-        
-        rc = VFSManagerGetConfigPWFile (self, old_password_file,
-                                        sizeof old_password_file - 1,
-                                        &old_password_file_size);
-        if (rc) {
-            if (rc ==
-                SILENT_RC(rcKrypto, rcMgr, rcReading, rcBuffer, rcInsufficient))
-            {
-                rc =
-                    RC(rcVFS, rcEncryptionKey, rcUpdating, rcPath, rcExcessive);
-            }
-            LOGERR (klogErr, rc, "failed to obtain configured path for password file");
-        }
-
-        else if (old_password_file_size >= (sizeof old_password_file - 1))
-        {
-            rc = RC (rcVFS, rcEncryptionKey, rcUpdating, rcPath, rcExcessive);
-            PLOGERR (klogErr,
-                     (klogErr, rc, "configured path too long for function "
-                      "'$(P)' '${F}'", "P=%s,F=%s",
-                      old_password_file, __func__));
-        }
-        else
-        {
-            KPathType ftype;
-            bool old_exists;
-
-            old_password_file[old_password_file_size] = '\0';
-            ftype = KDirectoryPathType (self->cwd, "%s", old_password_file);
-
-            switch (ftype)
-            {
-            case kptNotFound:
-                old_exists = false;
-                break;
-
-            case kptBadPath:
-                rc = RC (rcVFS, rcEncryptionKey, rcUpdating, rcPath, rcInvalid);
-                break;
-
-            case kptFile:
-                old_exists = true;
-                break;
-
-            case kptDir:
-            case kptCharDev:
-            case kptBlockDev:
-            case kptFIFO:
-            case kptZombieFile:
-            case kptDataset:
-            case kptDatatype:
-                rc = RC (rcVFS, rcEncryptionKey, rcUpdating, rcPath, rcIncorrect);
-                break;
-
-            default:
-                rc = RC (rcVFS, rcEncryptionKey, rcUpdating, rcPath, rcCorrupt);
-                break;
-            }
-
-            if (rc)
-                PLOGERR (klogErr,
-                         (klogErr, rc, "cannot use configured path for "
-                          "password file '$(P)'", "P=%s", old_password_file));
-
-            else
-            {
-                VPath * vold;
-                /* size_t new_password_file_size; */
-                char new_password_file [sizeof old_password_file + sizeof temp_extension];
-                size_t password_dir_size;
-                char password_dir [sizeof old_password_file];
-/*                 bool save_old_password; */
-                char * pc;
-
-                memcpy (password_dir, old_password_file, old_password_file_size);
-                memcpy (new_password_file, old_password_file, old_password_file_size);
-                memcpy (new_password_file + old_password_file_size, temp_extension, sizeof temp_extension);
-                /* new_password_file_size = old_password_file_size + sizeof temp_extension - 1; */
-
-                pc = string_rchr (password_dir, old_password_file_size, '/');
-                if (pc == NULL)
-                {
-                    password_dir[0] = '.';
-                    pc = password_dir+1;
-                }
-                *pc = '\0';
-                password_dir_size = pc - password_dir;
-
-                if (pwd_dir && pwd_dir_size) {
-                    size_t n = string_copy(pwd_dir, pwd_dir_size,
-                                           password_dir, password_dir_size + 1);
-                    if (n >= pwd_dir_size) {
-                        int i = 0;
-                        size_t p = pwd_dir_size - 1;
-                        pwd_dir[p] = '\0';
-                        for (i = 0; i < 3; ++i) {
-                            if (p == 0)
-                            {   break; }
-                            pwd_dir[--p] = '.';
-                        }
-                        if (p != 0)
-                        {   pwd_dir[--p] = ' '; }
-                    }
-                }
-
-                rc = VPathMake (&vold, old_password_file);
-                if (rc)
-                    PLOGERR (klogErr,
-                             (klogErr, rc, "could not create vpath for "
-                              "password file '$(P)'", "P=%s",
-                              old_password_file));
-
-                else
-                {
-                    VPath * vnew;
-
-                    rc = VPathMake (&vnew, new_password_file);
-                    if (rc)
-                        PLOGERR (klogErr,
-                                 (klogErr, rc, "could not create vpath for "
-                                  "password file '$(P)'", "P=%s",
-                                  new_password_file));
-
-                    else
-                    {
-                        const KFile * fold = NULL;
-                        KFile * fnew = NULL;
-
-                        if (old_exists)
-                        {
-                            rc = VFSManagerOpenFileRead (self, &fold, vold);
-
-                            if (rc)
-                                PLOGERR (klogErr,
-                                         (klogErr, rc, "unable to open existing "
-                                          "password file '$(P)'", "P=%s",
-                                          old_password_file));
-                        }
-                        
-
-                        if (rc == 0)
-                        {
-                            rc = VFSManagerCreateFile (self, &fnew, false, 0600,
-                                                       kcmInit|kcmParents,
-                                                       vnew);
-                            if (rc)
-                                PLOGERR (klogErr,
-                                         (klogErr, rc, "unable to open temporary "
-                                          "password file '$(P)'", "P=%s",
-                                          new_password_file));
-
-                            else
-                            {
-                                uint64_t writ;
-                                size_t this_writ;
-
-                                rc = KFileWriteAll (fnew, 0, password, size, &this_writ);
-                                if (rc)
-                                    PLOGERR (klogErr,
-                                             (klogErr, rc, "unable to write "
-                                              "password to temporary password "
-                                              "file '$(P)'", "P=%s",
-                                              new_password_file));
-
-                                else if (this_writ != size)
-                                {
-                                    rc = RC (rcVFS, rcEncryptionKey, rcWriting,
-                                             rcFile, rcInsufficient);
-                                    PLOGERR (klogErr,
-                                             (klogErr, rc, "unable to write complete "
-                                              "password to temporary password "
-                                              "file '$(P)'", "P=%s",
-                                              new_password_file));
-                                }
-
-                                else
-                                {
-                                    writ = this_writ;
-
-                                    rc = KFileWriteAll (fnew, this_writ, "\n", 1, &this_writ);
-                                    if (rc)
-                                        PLOGERR (klogErr,
-                                                 (klogErr, rc, "unable to write "
-                                                  "password to temporary password "
-                                                  "file '$(P)'", "P=%s",
-                                                  new_password_file));
-
-                                    else if (this_writ != 1)
-                                    {
-                                        rc = RC (rcVFS, rcEncryptionKey, rcWriting,
-                                                 rcFile, rcInsufficient);
-                                        PLOGERR (klogErr,
-                                                 (klogErr, rc, "unable to write complete "
-                                                  "password to temporary password "
-                                                  "file '$(P)'", "P=%s",
-                                                  new_password_file));
-                                    }
-
-                                    else
-                                    {
-                                        bool do_rename;
-
-                                        do_rename = true;
-                                        ++writ;
-
-                                        if (old_exists)
-                                        {
-                                            uint64_t read;
-                                            size_t this_read;
-                                            char buffer [VFS_KRYPTO_PASSWORD_MAX_SIZE+4];
-
-                                            rc = KFileReadAll (fold, 0, buffer,
-                                                               sizeof buffer, &this_read);
-                                            if (rc)
-                                                ;
-
-                                            else
-                                            {
-                                                read = this_read;
-                                                /* look for duplicated password */
-                                                if (read > size)
-                                                {
-                                                    char cc;
-
-                                                    cc = buffer[size];
-                                                    if (((cc == '\n') || (cc == '\r')) &&
-                                                        (memcmp (buffer, password, size) == 0))
-                                                    {
-                                                        do_rename = false;
-                                                    }
-                                                }
-                                                if (read)
-                                                    rc = KFileWriteAll (fnew, writ, buffer, read, &this_writ);
-
-                                                if (rc)
-                                                    ;
-                                                else if (do_rename)
-                                                {
-                                                    writ += this_writ;
-
-                                                    do
-                                                    {
-                                                        rc = KFileReadAll (fold, read, buffer,
-                                                                           sizeof buffer, &this_read);
-                                                        if (rc)
-                                                            ;
-
-                                                        else if (this_read == 0)
-                                                            break;
-
-                                                        else
-                                                        {
-                                                            rc = KFileWriteAll (fnew, writ, buffer,
-                                                                                this_read, &this_writ);
-                                                            if (rc)
-                                                                ;
-
-                                                            else if (this_read != this_writ)
-                                                            {
-                                                                rc = RC (rcVFS, rcEncryptionKey, rcWriting,
-                                                                         rcFile, rcInsufficient);
-                                                                PLOGERR (klogErr,
-                                                                         (klogErr, rc,
-                                                                          "unable to write complete "
-                                                                          "password to temporary password "
-                                                                          "file '$(P)'", "P=%s",
-                                                                          new_password_file));
-                                                            }
-
-                                                            else
-                                                            {
-                                                                read += this_read;
-                                                                writ += this_writ;
-                                                            }
-                                                        }
-                                                    } while (rc == 0);
-                                                }
-                                            }
-                                            KFileRelease (fold);
-                                            fold = NULL;
-                                        }
-
-                                        KFileRelease (fnew);
-                                        fnew = NULL;
-
-                                        if (rc == 0)
-                                        {
-                                            if (do_rename)
-                                            {
-                                                rc = KDirectoryRename (self->cwd, true, 
-                                                                       new_password_file,
-                                                                       old_password_file);
-                                            }
-                                            else
-                                            {
-                                                KDirectoryRemove (self->cwd, true, "%s", new_password_file);
-                                            }
-
-#if !WINDOWS
-                                            if (rc == 0)
-                                            {
-                                                uint32_t access;
-
-                                                rc = KDirectoryAccess (self->cwd,
-                                                                       &access, "%s", password_dir);
-                                                if (rc)
-                                                    ;
-
-                                                else
-                                                {
-                                                    if (access & 0027)
-                                                        rc = RC (rcVFS, rcEncryptionKey, rcUpdating, rcDirectory, rcExcessive);
-                                                }
-                                            }
-#endif
-                                        }
-                                    }
-                                }
-                                KFileRelease (fnew);
-                            }
-                            KFileRelease (fold);
-                        }
-                        VPathRelease (vold);
-                    }
-                    VPathRelease (vnew);
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-/*--------------------------------------------------------------------------
- * KConfig
- *  placing some KConfig code that relies upon VFS here
- */
-
-
-/* ReadVPath
- *  read a VPath node value
- *
- * self [ IN ] - KConfig object
- * path [ IN ] - path to the node
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-LIB_EXPORT rc_t CC KConfigReadVPath ( struct KConfig const* self, const char* path, struct VPath** result )
-{
-    rc_t rc;
-
-    if ( result == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        struct KConfigNode const *n;
-        rc = KConfigOpenNodeRead ( self, & n, "%s", path );
-        if ( rc == 0 )
-        {
-            rc = KConfigNodeReadVPath ( n, result );
-            KConfigNodeRelease ( n );
-            return rc;
-        }
-
-        * result = NULL;
-    }
-
-    return rc;
-}
-
-/* ReadVPath
- *  read a VPath node value
- *
- * self [ IN ] - KConfigNode object
- * result [ OUT ] - return value (rc != 0 if cannot be converted)
- *
- */
-LIB_EXPORT rc_t CC KConfigNodeReadVPath ( struct KConfigNode const *self, struct VPath** result )
-{
-    rc_t rc;
-
-    if ( result == NULL )
-        rc = RC ( rcKFG, rcNode, rcReading, rcParam, rcNull );
-    else
-    {
-        char buffer [ 4096 ];
-        size_t num_read, to_read;
-        rc = KConfigNodeRead ( self, 0, buffer, sizeof buffer, & num_read, & to_read );
-        if ( rc == 0 )
-        {
-            char *p;
-
-            if ( to_read == 0 && num_read < sizeof buffer )
-            {
-                buffer [ num_read ] = 0;
-                return VPathMake ( result, buffer );
-            }
-
-            p = malloc ( num_read + to_read + 1 );
-            if ( p == NULL )
-                rc = RC ( rcKFG, rcNode, rcReading, rcMemory, rcExhausted );
-            else
-            {
-                rc = KConfigNodeRead ( self, 0, p, num_read + to_read + 1, & num_read, & to_read );
-                if ( rc == 0 )
-                {
-                    p [ num_read ] = 0;
-                    rc = VPathMake ( result, p );
-                }
-
-                free ( p );
-                return rc;
-            }
-        }
-
-        * result = NULL;
-    }
-
-    return rc;
-}
-
-
-static rc_t VFSManagerResolveAcc( const VFSManager * self,
-                                  const struct VPath * source,
-                                  struct VPath ** path_to_build,
-                                  const struct KFile ** remote_file,
-                                  const struct VPath ** local_cache )
-{
-    rc_t rc;
-    const VPath * local, * remote;
-    
-    assert (self);
-    assert (source);
-    assert (path_to_build);
-    assert (remote_file);
-    assert (local_cache);
-
-#if 1
-    rc = VResolverQuery ( self -> resolver, eProtocolHttp, source, & local, & remote, local_cache );
-    if ( rc == 0 )
-    {
-        assert ( local != NULL || remote != NULL );
-        assert ( local == NULL || remote == NULL );
-        * path_to_build = ( VPath* ) ( ( local != NULL ) ? local : remote );
-    }
-#else
-
-    /* first try to find it localy */
-    rc = VResolverLocal ( self->resolver, source, (const VPath **)path_to_build );
-    if ( GetRCState( rc ) == rcNotFound )
-    {
-        /* if not found localy, try to find it remotely */
-        rc = VResolverRemote ( self->resolver, eProtocolHttp,
-            source, (const VPath **)path_to_build, remote_file );
-        if ( rc == 0 && remote_file != NULL && local_cache != NULL )
-        {
-            /* if found and the caller wants to know the location of a local cache file... */
-            uint64_t size_of_remote_file = 0;
-            if ( *remote_file != NULL )
-                rc = KFileSize ( *remote_file, &size_of_remote_file );
-            if ( rc ==  0 )
-                rc = VResolverCache ( self->resolver, *path_to_build, local_cache, size_of_remote_file );
-        }
-    }
-
-#endif
-    return rc;
-}
-
-
-static rc_t VFSManagerResolveLocal( const VFSManager * self,
-                                    const char * local_path,
-                                    struct VPath ** path_to_build )
-{
-    assert ( self != NULL );
-    assert ( local_path != NULL && local_path [ 0 ] != 0 );
-    assert ( path_to_build != NULL );
-
-    return VFSManagerMakePath ( self, path_to_build, "ncbi-file:%s", local_path );
-}
-
-static rc_t VFSManagerResolvePathOrAcc( const VFSManager * self,
-                                        const struct VPath * source,
-                                        struct VPath ** path_to_build,
-                                        const struct KFile ** remote_file,
-                                        const struct VPath ** local_cache,
-                                        bool resolve_acc )
-{
-    char buffer[ 4096 ];
-    size_t num_read;
-    rc_t rc = VPathReadPath ( source, buffer, sizeof buffer, &num_read );
-    if ( rc == 0 && num_read > 0 )
-    {
-        char * pos_of_slash = string_chr ( buffer, string_size( buffer ), '/' );
-        if ( pos_of_slash != NULL )
-        {
-            /* we can now assume that the source is a filesystem-path :
-               we build a new VPath and prepend with 'ncbi-file:' */
-            rc = VFSManagerResolveLocal( self, buffer, path_to_build );
-        }
-        else if ( resolve_acc )
-        {
-            /* we assume the source is an accession! */
-            rc = VFSManagerResolveAcc( self, source, path_to_build, remote_file, local_cache );
-            if ( GetRCState( rc ) == rcNotFound )
-            {
-                /* if we were not able to find the source as accession, we assume it is a local path */
-                rc = VFSManagerResolveLocal( self, buffer, path_to_build );
-            }
-        }
-        else
-        {
-            rc = RC ( rcVFS, rcMgr, rcAccessing, rcParam, rcInvalid );
-        }
-    }
-    return rc;
-}
-
-
-static rc_t VFSManagerResolveRemote( const VFSManager * self,
-                                     struct VPath ** source,
-                                     struct VPath ** path_to_build,
-                                     const struct KFile ** remote_file,
-                                     const struct VPath ** local_cache )
-{
-    rc_t rc = 0;
-    *path_to_build = *source;
-    if ( local_cache != NULL && remote_file != NULL && self->resolver != NULL )
-    {
-
-/*        VFS_EXTERN rc_t CC VPathMakeString ( const VPath * self, const String ** uri ); */
-        char full_url[ 4096 ];
-        size_t num_read;
-        rc = VPathReadPath ( *source, full_url, sizeof full_url, &num_read );
-        if ( rc == 0 && num_read > 0 )
-        {
-            rc = KNSManagerMakeHttpFile ( self -> kns, remote_file, NULL, 0x01010000, full_url );
-            if ( rc == 0 )
-            {
-                uint64_t size_of_remote_file = 0;
-                rc = KFileSize ( *remote_file, &size_of_remote_file );
-                if ( rc == 0 )
-                    rc = VResolverCache ( self->resolver, *source, local_cache, size_of_remote_file );
-            }
-        }
-    }
-    *source = NULL;
-    return rc;
-}
-
-/* DEPRECATED */
-LIB_EXPORT rc_t CC VFSManagerResolveSpec ( const VFSManager * self,
-                                           const char * spec,
-                                           struct VPath ** path_to_build,
-                                           const struct KFile ** remote_file,
-                                           const struct VPath ** local_cache,
-                                           bool resolve_acc )
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcVFS, rcMgr, rcAccessing, rcSelf, rcNull );
-    else if ( spec == NULL || path_to_build == NULL )
-        rc = RC ( rcVFS, rcMgr, rcAccessing, rcParam, rcNull );
-    else if ( spec[ 0 ] == 0 )
-        rc = RC ( rcVFS, rcMgr, rcAccessing, rcParam, rcEmpty );
-    else
-    {
-        VPath * temp;
-        *path_to_build = NULL;
-        if ( local_cache != NULL )
-            *local_cache = NULL;
-        if ( remote_file != NULL ) 
-            *remote_file = NULL;
-        rc = VPathMake ( &temp, spec );
-        if ( rc == 0 )
-        {
-            VPUri_t uri_type;
-            rc = VPathGetScheme_t( temp, &uri_type );
-            if ( rc == 0 )
-            {
-                switch ( uri_type )
-                {
-                default                  : /* !! fall through !! */
-                case vpuri_invalid       : rc = RC ( rcVFS, rcMgr, rcAccessing, rcParam, rcInvalid );
-                                           break;
-
-                case vpuri_none          : /* !! fall through !! */
-                case vpuri_not_supported : rc = VFSManagerResolvePathOrAcc( self, temp, path_to_build, remote_file, local_cache, resolve_acc );
-                                           break;
-
-                case vpuri_ncbi_vfs      : /* !! fall through !! */
-                case vpuri_file          : *path_to_build = temp;
-                                           temp = NULL;
-                                           break;
-
-                case vpuri_ncbi_acc      : if ( resolve_acc )
-                                                rc = VFSManagerResolveAcc( self, temp, path_to_build, remote_file, local_cache );
-                                           else
-                                                rc = RC ( rcVFS, rcMgr, rcAccessing, rcParam, rcInvalid );
-                                           break;
-
-                case vpuri_http          : /* !! fall through !! */
-                case vpuri_ftp           : rc = VFSManagerResolveRemote( self, &temp, path_to_build, remote_file, local_cache );
-                                           break;
-
-                case vpuri_ncbi_legrefseq: /* ??? */
-                                           break;
-                }
-            }
-            if ( temp != NULL )
-                VPathRelease ( temp );
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT const struct KConfig* CC VFSManagerGetConfig(const struct VFSManager * self)
-{
-    if ( self == NULL )
-        return NULL;
-    return self->cfg;
-}
-
-/*
- * Object Id / Object name bindings for accessions and dbGaP files
- */
-
-#define MAX_OBJID_SIZE 20
-#define MAX_NAME_SIZE 4096
-
-LIB_EXPORT void VFSManagerSetBindingsFile(struct VFSManager * self, const char* path)
-{
-    if (self != NULL)
-        KKeyStoreSetBindingsFile( self->keystore, path);
-}
-
-LIB_EXPORT const char* VFSManagerGetBindingsFile(struct VFSManager * self)
-{
-    if (self == NULL)
-        return NULL;
-    return KKeyStoreGetBindingsFile(self->keystore);
-}
-
-LIB_EXPORT rc_t CC VFSManagerRegisterObject(struct VFSManager* self, uint32_t oid, const struct VPath* obj)
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcVFS, rcMgr, rcRegistering, rcSelf, rcNull );
-    else if ( obj == NULL )
-        rc = RC ( rcVFS, rcMgr, rcRegistering, rcParam, rcNull );
-    else
-    {
-        const String* newName;
-        rc = VPathMakeString (obj, &newName);
-        if (rc == 0)
-        {
-            rc = KKeyStoreRegisterObject(self->keystore, oid, newName);
-            StringWhack(newName);
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VFSManagerGetObject(const struct VFSManager* self, uint32_t oid, struct VPath** obj)
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcVFS, rcMgr, rcRetrieving, rcSelf, rcNull );
-    else if ( obj == NULL )
-        rc = RC ( rcVFS, rcMgr, rcRetrieving, rcParam, rcNull );
-    else
-    {
-        const String* objName;
-        rc = KKeyStoreGetObjectName(self->keystore, oid, &objName);
-        if (rc == 0)
-        {
-            rc = VFSManagerMakePath (self, obj, "%S", objName);
-            StringWhack(objName);
-        }
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VFSManagerGetObjectId(const struct VFSManager* self, const struct VPath* obj, uint32_t* oid)
-{
-    rc_t rc = 0;
-    if ( self == NULL )
-        rc = RC ( rcVFS, rcMgr, rcRetrieving, rcSelf, rcNull );
-    else if ( obj == NULL || oid == NULL)
-        rc = RC ( rcVFS, rcMgr, rcRetrieving, rcParam, rcNull );
-    else
-    {
-        const String* pathString;
-        rc = VPathMakeString(obj, &pathString);
-        if (rc == 0)
-        {
-            rc = VKKeyStoreGetObjectId(self->keystore, pathString, oid);
-            StringWhack(pathString);
-        }
-    }
-    return rc;
-}
-
-
-static const char * default_path_key = "/repository/user/default-path";
-
-LIB_EXPORT rc_t CC VFSManagerGetCacheRoot ( const VFSManager * self,
-    struct VPath const ** path )
-{
-    rc_t rc;
-    if ( path == NULL )
-        rc = RC ( rcVFS, rcMgr, rcListing, rcParam, rcNull );
-    else
-    {
-        * path = NULL;
-        if ( self == NULL )
-            rc = RC ( rcVFS, rcMgr, rcListing, rcSelf, rcNull );
-        else if ( self -> cfg == NULL )
-            rc = RC ( rcVFS, rcMgr, rcListing, rcItem, rcNull );
-        else
-        {
-            struct String * spath;
-            rc = KConfigReadString ( self -> cfg, default_path_key, &spath );
-            if ( rc == 0 )
-            {
-                struct VPath * vp;
-                rc = VFSManagerMakePath ( self, &vp, "%S", spath );
-                if ( rc == 0 )
-                    *path = vp;
-                StringWhack( spath );
-            }
-        }
-    }
-    return rc;
-}
-
-
-/*
-    repo-path for instance '/repository/user/main/public'
-    read $(repo-path)/root, put it into frozen-list ( if is not already there )
-    write $(repository/user/default-path)/public as value into it ( just in case )
-*/
-static const char * indirect_root = "$(repository/user/default-path)/%s";
-
-LIB_EXPORT rc_t CC VFSManagerSetCacheRoot ( const VFSManager * self,
-    struct VPath const * path )
-{
-    rc_t rc;
-    if ( path == NULL )
-        rc = RC ( rcVFS, rcMgr, rcSelecting, rcParam, rcNull );
-    else if ( self == NULL )
-        rc = RC ( rcVFS, rcMgr, rcSelecting, rcSelf, rcNull );
-    else if ( self -> cfg == NULL )
-        rc = RC ( rcVFS, rcMgr, rcSelecting, rcItem, rcNull );
-    else
-    {
-        /* loop through the user-repositories to set the root property to the indirect path */
-        KRepositoryMgr * repo_mgr;
-        rc = KConfigMakeRepositoryMgrUpdate ( self -> cfg, &repo_mgr );
-        if ( rc == 0 )
-        {
-            KRepositoryVector user_repos;
-            rc = KRepositoryMgrUserRepositories ( repo_mgr, &user_repos );
-            if ( rc == 0 )
-            {
-                uint32_t start = VectorStart( &user_repos );
-                uint32_t count = VectorLength( &user_repos );
-                uint32_t idx;
-                for ( idx = 0; rc == 0 && idx < count; ++idx )
-                {
-                    KRepository * repo = VectorGet ( &user_repos, idx + start );
-                    if ( repo != NULL )
-                    {
-                        /* ask the repository to add it's current root to the root-history */
-                        rc = KRepositoryAppendToRootHistory( repo, NULL );
-                        if ( rc == 0 )
-                        {
-                            char repo_name[ 512 ];
-                            size_t repo_name_len;
-                            rc = KRepositoryName( repo, repo_name, sizeof repo_name, &repo_name_len );
-                            if ( rc == 0 )
-                            {
-                                char new_root[ 1024 ];
-                                size_t num_writ;
-                                repo_name[ repo_name_len ] = 0;
-                                rc = string_printf( new_root, sizeof new_root, &num_writ, indirect_root, repo_name );
-                                if ( rc == 0 )
-                                    rc = KRepositorySetRoot( repo, new_root, string_size( new_root ) );
-                            }
-                        }
-                    }
-                }
-                KRepositoryVectorWhack ( &user_repos );
-            }
-            KRepositoryMgrRelease ( repo_mgr );
-        }
-
-        /* write the new indirect path */
-        if ( rc == 0 )
-        {
-            String const * spath = NULL;
-            rc = VPathMakeString ( path, &spath );
-            if ( rc == 0 )
-            {
-                rc = KConfigWriteSString( self -> cfg, default_path_key, spath );
-                StringWhack( spath );
-                /*
-                    we do not commit, because ticket VDB-3060: 
-                    GBench wants to change the cache-root, but to automatically revert to previous value
-                    when GBench exits, this is achieved by not commiting here.
-                if ( rc == 0 )
-                    rc = KConfigCommit ( self -> cfg );
-                */
-            }
-        }
-    }
-    return rc;
-}
diff --git a/libs/vfs/path-priv.h b/libs/vfs/path-priv.h
deleted file mode 100644
index d05d226..0000000
--- a/libs/vfs/path-priv.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*===========================================================================
-*
-*                            Public Domain Notice
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_path_priv_
-#define _h_path_priv_
-
-#ifndef _h_vfs_extern_
-#include <vfs/extern.h>
-#endif
-
-#ifndef _h_klib_refcount_
-#include <klib/refcount.h>
-#endif
-
-#ifndef _h_klib_data_buffer_
-#include <klib/data-buffer.h>
-#endif
-
-#ifndef _h_klib_text_
-#include <klib/text.h>
-#endif
-
-#ifndef _h_vfs_path_
-#include <vfs/path.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--------------------------------------------------------------------------
- * VPath
- */
-struct VPath
-{
-    KDataBuffer data;
-
-    String scheme;
-    String auth;
-    String host;
-    String portname;
-    String path;
-    String query;
-    String fragment;
-
-    KRefcount refcount;
-
-    uint32_t obj_id;
-    uint32_t acc_code;
-
-    uint32_t ipv4;
-    uint16_t ipv6 [ 8 ];
-    uint16_t portnum;
-
-    uint8_t scheme_type;
-    uint8_t host_type;
-    uint8_t path_type;
-
-    bool from_uri;
-    bool missing_port;
-    bool highly_reliable;
-};
-
-enum VPathVariant
-{
-    vpInvalid,
-    vpOID,
-    vpAccession,
-    vpNameOrOID,
-    vpNameOrAccession,
-    vpName,
-    vpRelPath,
-    vpUNCPath,
-    vpFullPath,
-    vpAuth,
-    vpHostName,
-    vpEndpoint
-};
-
-enum VHostVariant
-{
-    vhDNSName,
-    vhIPv4,
-    vhIPv6
-};
-
-/* legacy support */
-#define VPathMake LegacyVPathMake
-VFS_EXTERN rc_t VPathMake ( VPath ** new_path, const char * posix_path );
-#define VPathMakeFmt LegacyVPathMakeFmt
-rc_t VPathMakeFmt ( VPath ** new_path, const char * fmt, ... );
-#define VPathMakeVFmt LegacyVPathMakeVFmt
-rc_t VPathMakeVFmt ( VPath ** new_path, const char * fmt, va_list args );
-VFS_EXTERN rc_t LegacyVPathMakeSysPath ( VPath ** new_path, const char * sys_path );
-
-typedef enum eVPUri_t
-{
-    vpuri_invalid = -1,
-    vpuri_none, 
-    vpuri_not_supported,
-    vpuri_ncbi_file,
-    vpuri_ncbi_vfs = vpuri_ncbi_file,
-    vpuri_file,
-    vpuri_ncbi_acc,
-    vpuri_http,
-    vpuri_ftp,
-    vpuri_ncbi_legrefseq,
-    vpuri_ncbi_obj,     /* for dbGaP objects */
-    vpuri_fasp,         /* for Aspera downloads */
-    vpuri_count
-} VPUri_t;
-
-#define VPathGetScheme_t LegacyVPathGetScheme_t
-VFS_EXTERN rc_t CC VPathGetScheme_t ( const VPath * self, VPUri_t * uri_type );
-
-#define VPathGetUri_t LegacyVPathGetUri_t
-VPUri_t VPathGetUri_t (const VPath * self);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_path_priv_ */
diff --git a/libs/vfs/path.c b/libs/vfs/path.c
deleted file mode 100644
index 559c978..0000000
--- a/libs/vfs/path.c
+++ /dev/null
@@ -1,3788 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vfs/extern.h>
-
-#include "path-priv.h"
-
-#include <vfs/manager.h>
-#include <vfs/resolver.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-#include <sysalloc.h>
-
-#define MAX_ACCESSION_LEN 20
-#define TREAT_URI_RESERVED_AS_FILENAME 0
-
-
-/*--------------------------------------------------------------------------
- * VPath
- */
-
-
-/* Whack
- */
-static
-void VPathWhack ( VPath * self )
-{
-    KDataBufferWhack ( & self -> data );
-    KRefcountWhack ( & self -> refcount, "VPath" );
-    free ( self );
-}
-
-/* ParseURI
- *  parse a flexible URI
- *  allowed to be a formal URI with scheme,
- *  a simple POSIX path, or a simple accession
- *
- * NB - the purpose is to parse, not to enforce correctness
- *  emphasis is placed on speed and leniency
- *
- *  url
- *      = accession
- *      | posix-path
- *      | scheme-spec '//' host-spec full-name-spec opt-query opt-fragment
- *      ;
- *
- *  accession
- *      = alpha-part digits-part opt-extensions
- *      | prefix alpha-part digits-part opt-extensions
- *      | prefix digits-part extensions opt-suffix
- *      ;
- *
- *  prefix
- *      = [A-Za-z]+ '_'
- *
- *  alpha-part
- *      = [A-Za-z]+
- *      ;
- *
- *  digits-part
- *      = [0-9]+
- *      ;
- *
- *  opt-extensions
- *      =
- *      | extensions
- *      ;
- *
- *  extensions
- *      = extension
- *      | extensions extension
- *      ;
- *
- *  extension
- *      = '.' [0-9]+
- *      ;
- *
- *  opt-suffix
- *      =
- *      | '_' [A-Za-z]+
- *      ;
- *
- *  obj-id
- *      = [0-9]+
- *      ;
- *
- *  posix-path
- *      = full-path
- *      | rel-path
- *      ;
- *
- *  full-path
- *      = '/' rel-path
- *      ;
- *
- *  rel-path
- *      = name
- *      | rel-path '/' name
- *      ;
- *
- *  name
- *      = [^?#/]+
- *      ;
- *
- *  scheme-spec
- *      = scheme ':'
- *      ;
- *
- *  scheme
- *      = [A-Za-z][-+A-Za-z0-9.]*
- *      ;
- *
- *  host-spec
- *      = dns-name
- *      | ipv4-spec
- *      | '[' ipv6-spec ']'
- *      ;
- *
- *  full-name-spec
- *      = '/' accession
- *      | full-path
- *      | '/' obj-id
- *      ;
- *
- *  opt-query
- *      =
- *      | '?' [^#]+
- *      ;
- *
- *  opt-fragment
- *      =
- *      | '#' any
- *      ;
- */
-typedef enum VPathParseState
-{
-    vppStart,
-    vppAccPrefixAlphaNamePathOrScheme,
-    vppAccAlphaNamePath,
-    vppAccDigitNamePathOrScheme,
-    vppAccDigitNamePath,
-    vppAccExtNamePathOrScheme,
-    vppAccExtNamePath,
-    vppAccSuffixNamePath,
-    vppAccDotNamePathOrScheme,
-    vppAccDotNamePath,
-    vppAccUnderNamePath,
-    vppNamePathOrScheme,
-    vppAccOidRelOrSlash,
-    vppAccPrefixAlphaRel,
-    vppAccAlphaRel,
-    vppAccDigitRel,
-    vppAccExtRel,
-    vppAccSuffixRel,
-    vppOidRel,
-    vppAccDotRel,
-    vppAccUnderRel,
-    vppSlash,
-    vppAuthHostSpec,
-    vppAuthHostNamePort,
-    vppHostSpec,
-    vppHostNamePort,
-    vppIPv4Port,
-    vppIPv4Dot,
-    vppIPv6Port,
-    vppIPv6Colon,
-    vppPortSpecOrFullPath,
-    vppPortSpec,
-    vppPortName,
-    vppPortNum,
-    vppNamePath,
-    vppUNCOrMalformedPOSIXPath,
-    vppFullOrUNCPath,
-    vppRelPath,
-    vppFullPath,
-    vppUNCPath,
-    vppParamName,
-    vppParamValue,
-    vppFragment
-}
-VPathParseState;
-
-static
-void VPathCaptureScheme ( VPath * self, const char * uri, size_t start, size_t end )
-{
-    size_t size = end - start;
-    StringInit ( & self -> scheme, & uri [ start ], size, ( uint32_t ) ( size ) );
-    self -> from_uri = true;
-
-    if ( size != 0 )
-    {
-        const char * scheme = & uri [ start ];
-        self -> scheme_type = vpuri_not_supported;
-
-        /* use size as a quick hash */
-        switch ( size )
-        {
-        case 3:
-            /* ftp */
-            if ( strcase_cmp (  scheme, 3, "ftp", 3, 3 ) == 0 )
-                self -> scheme_type = vpuri_ftp;
-            break;
-        case 4:
-            /* 4 character schemes */
-            switch (  uri [ 0 ] )
-            {
-            case 'f':
-            case 'F':
-                /* file */
-                if ( strcase_cmp (  scheme + 1, 3, "file" + 1, 3, 3 ) == 0 )
-                    self -> scheme_type = vpuri_file;
-                /* fasp */
-                else if ( strcase_cmp (  scheme + 1, 3, "fasp" + 1, 3, 3 ) == 0 )
-                    self -> scheme_type = vpuri_fasp;
-                break;
-            case 'h':
-            case 'H':
-                /* http */
-                if ( strcase_cmp (  scheme + 1, 3, "http" + 1, 3, 3 ) == 0 )
-                    self -> scheme_type = vpuri_http;
-                break;
-            }
-            break;
-            
-        case 8:
-            /* 8 character schemes starting with "ncbi-" */
-            if ( strcase_cmp (  scheme, 5, "ncbi-", 5, 5 ) != 0 )
-                break;
-            switch (  uri [ 5 ] )
-            {
-            case 'a':
-            case 'A':
-                /* ncbi-acc */
-                if ( strcase_cmp (  scheme + 5 + 1, 2, "acc" + 1, 2, 2 ) == 0 )
-                    self -> scheme_type = vpuri_ncbi_acc;
-                break;
-            case 'o':
-            case 'O':
-                /* ncbi-obj */
-                if ( strcase_cmp (  scheme + 5 + 1, 2, "obj" + 1, 2, 2 ) == 0 )
-                    self -> scheme_type = vpuri_ncbi_obj;
-                break;
-            }
-            break;
-            
-        case 9:
-            /* 9 character schemes starting with "ncbi-" */
-            if ( strcase_cmp (  scheme, 5, "ncbi-", 5, 5 ) != 0 )
-                break;
-            switch (  uri [ 5 ] )
-            {
-            case 'f':
-            case 'F':
-                /* ncbi-file */
-                if ( strcase_cmp (  scheme + 5 + 1, 3, "file" + 1, 3, 3 ) == 0 )
-                    self -> scheme_type = vpuri_ncbi_file;
-                break;
-            }
-            break;
-            
-        case 16:
-            /* 16 character schemes starting with "x-ncbi-" */
-            if ( strcase_cmp (  scheme, 7, "x-ncbi-", 7, 7 ) != 0 )
-                break;
-            switch (  uri [ 7 ] )
-            {
-            case 'l':
-            case 'L':
-                /* x-ncbi-legrefseq */
-                if ( strcase_cmp (  scheme + 7 + 1, 8, "legrefseq" + 1, 8, 8 ) == 0 )
-                    self -> scheme_type = vpuri_ncbi_legrefseq;
-                break;
-            }
-            break;
-        }
-    }
-}
-
-static
-void VPathCaptureAccession ( VPath * self, const char * uri, size_t start, size_t end )
-{
-    size_t size = end - start;
-    StringInit ( & self -> path, & uri [ start ], size, ( uint32_t ) size );
-
-    switch ( self -> scheme_type )
-    {
-    case vpuri_none:
-         self -> path_type = vpNameOrAccession;
-         break;
-    case vpuri_ncbi_acc:
-        if ( size < MAX_ACCESSION_LEN )
-        {
-            self -> path_type = vpAccession;
-            break;
-        }
-        /* no break */
-    default:
-         self -> path_type = vpName;
-    }
-}
-
-static
-void VPathCaptureAccCode ( VPath * self, uint32_t acc_prefix,
-    uint32_t acc_alpha, uint32_t acc_digit, uint32_t acc_ext, uint32_t acc_suffix )
-{
-    self -> acc_code
-        = ( acc_prefix << 16 )
-        | ( acc_alpha << 12 )
-        | ( acc_digit << 8 )
-        | ( acc_ext << 4 )
-        | ( acc_suffix << 0 )
-        ;
-
-    if ( self -> path_type == vpNameOrAccession )
-    {
-        switch ( self -> acc_code >> 8 )
-        {
-        case 0x015:
-        case 0x026:
-        case 0x106:
-        case 0x126:
-            /* refseq */
-            self -> path_type = vpAccession;
-            break;
-
-        case 0x109:
-            /* refseq or named annotation */
-            self -> path_type = vpAccession;
-            break;
-
-        case 0x036:
-        case 0x037:
-        case 0x038:
-        case 0x039:
-            /* sra */
-            break;
-
-        case 0x042:
-        case 0x048:
-        case 0x049:
-        case 0x142:
-        case 0x148:
-        case 0x149:
-            /* wgs */
-            self -> path_type = vpAccession;
-            break;
-
-        case 0x029:
-            if ( self -> acc_code == 0x02910 )
-            {
-                if ( self -> path . addr [ 0 ] == 'N' &&
-                     self -> path . addr [ 1 ] == 'A' )
-                {
-                    /* na */
-                    self -> path_type = vpAccession;
-                }
-            }
-            break;
-        }
-    }
-}
-
-static
-void VPathCaptureOid ( VPath * self, uint64_t oid, const char * uri, size_t start, size_t oid_start, size_t end )
-{
-    size_t oid_size = end - oid_start;
-
-    if ( oid == 0 || oid_size > 10 || oid > 0xFFFFFFFF )
-        self -> path_type = vpName;
-    else
-    {
-        self -> obj_id = ( uint32_t ) oid;
-
-        if ( self -> scheme_type == vpuri_ncbi_obj )
-        {
-            StringInit ( & self -> path, & uri [ oid_start ], oid_size, ( uint32_t ) oid_size );
-            self -> path_type = vpOID;
-            return;
-        }
-
-        self -> path_type = vpNameOrOID;
-    }
-
-    StringInit ( & self -> path, & uri [ start ], ( end - start ), ( uint32_t ) ( end - start ) );
-}
-
-static
-void VPathCaptureAuth ( VPath * self, const char * uri, size_t start, size_t end )
-{
-    StringInit ( & self -> auth, & uri [ start ], end - start, ( uint32_t ) ( end - start ) );
-    self -> path_type = vpAuth;
-}
-
-static
-void VPathCaptureHostName ( VPath * self, const char * uri, size_t start, size_t end )
-{
-    StringInit ( & self -> host, & uri [ start ], end - start, ( uint32_t ) ( end - start ) );
-    self -> path_type = vpHostName;
-}
-
-static
-rc_t VPathCaptureIPv4 ( VPath * self, const uint32_t ipv4 [ 4 ] )
-{
-    uint32_t i;
-
-    for ( i = 0; i < 4; ++ i )
-    {
-        if ( ipv4 [ i ] >= 256 )
-            return RC ( rcVFS, rcPath, rcParsing, rcData, rcExcessive );
-    }
-
-    self -> ipv4
-        = ( ipv4 [ 0 ] << 24 )
-        | ( ipv4 [ 1 ] << 16 )
-        | ( ipv4 [ 2 ] << 8 )
-        | ( ipv4 [ 3 ] << 0 )
-        ;
-
-    self -> path_type = vpEndpoint;
-    self -> host_type = vhIPv4;
-
-    return 0;
-}
-
-static
-rc_t VPathCaptureIPv6 ( VPath * self, const uint32_t ipv6 [ 8 ] )
-{
-    uint32_t i;
-
-    for ( i = 0; i < 8; ++ i )
-    {
-        if ( ipv6 [ i ] >= 0x10000 )
-            return RC ( rcVFS, rcPath, rcParsing, rcData, rcExcessive );
-
-        self -> ipv6 [ i ] = ( uint16_t ) ipv6 [ i ];
-    }
-
-    self -> path_type = vpEndpoint;
-    self -> host_type = vhIPv6;
-
-    return 0;
-}
-
-static
-void VPathCapturePortName ( VPath * self, const char * uri, size_t start, size_t end )
-{
-    StringInit ( & self -> portname, & uri [ start ], end - start, ( uint32_t ) ( end - start ) );
-    self -> path_type = vpEndpoint;
-}
-
-static
-rc_t VPathCapturePortNum ( VPath * self, uint32_t port )
-{
-    if ( port >= 0x10000 )
-        return RC ( rcVFS, rcPath, rcParsing, rcData, rcExcessive );
-
-    self -> portnum = ( uint16_t ) port;
-    self -> path_type = vpEndpoint;
-
-    return 0;
-}
-
-static
-void VPathCapturePath ( VPath * self, const char * uri, size_t start, size_t end, uint32_t count, uint32_t var )
-{
-    StringInit ( & self -> path, & uri [ start ], end - start, count );
-    self -> path_type = ( uint8_t ) var;
-}
-
-static
-void VPathCaptureQuery ( VPath * self, const char * uri, size_t start, size_t end, uint32_t count )
-{
-    StringInit ( & self -> query, & uri [ start ], end - start, count );
-}
-
-static
-void VPathCaptureFragment ( VPath * self, const char * uri, size_t start, size_t end, uint32_t count )
-{
-    StringInit ( & self -> fragment, & uri [ start ], end - start, count );
-}
-
-#define VPathParseResetAnchor( i ) \
-    do { anchor = ( i ); count = 0; } while ( 0 )
-
-static
-rc_t VPathParseInt ( VPath * self, char * uri, size_t uri_size,
-                    bool uri_is_utf )
-{
-    rc_t rc;
-    int bytes;
-    uint32_t port;
-    size_t i, anchor;
-    uint32_t count, total;
-    VPathParseState state = vppStart;
-
-    /* for handling current accession schemes */
-    uint32_t acc_prefix = 0;
-    uint32_t acc_alpha = 0;
-    uint32_t acc_digit = 0;
-    uint32_t acc_ext = 0;
-    uint32_t acc_suffix = 0;
-
-    /* for accummulating ip addresses */
-    uint32_t ip;
-    uint32_t ipv4 [ 4 ];
-    uint32_t ipv6 [ 8 ];
-
-    /* for accumulating oid */
-    uint64_t oid;
-    uint32_t oid_anchor;
-    
-    bool pileup_ext_present = false;
-    const char pileup_ext[] = ".pileup";
-    size_t pileup_ext_size = sizeof( pileup_ext ) / sizeof( pileup_ext[0] ) - 1;
-    
-    /* remove pileup extension before parsing, so that it won't change parsing results */
-    if ( uri_size > pileup_ext_size && memcmp(&uri[uri_size - pileup_ext_size], pileup_ext, pileup_ext_size) == 0)
-    {
-        uri_size -= pileup_ext_size;
-        uri[uri_size] = '\0';
-        pileup_ext_present = true;
-    }
-
-    for ( i = anchor = 0, total = count = 0; i < uri_size; ++ total, ++ count, i += bytes )
-    {
-        /* read character */
-        uint32_t ch = uri [ i ];
-
-        /* assume ascii */
-        bytes = 1;
-        if ( ( char ) ch  < 0 )
-        {
-          if ( uri_is_utf ) {
-/* expect uri in utf8  */
-            uint32_t utf32;
-
-            /* read into UTF-32 */
-            bytes = utf8_utf32 ( & utf32, & uri [ i ], & uri [ uri_size ] );
-            if ( bytes <= 0 )
-            {
-                if ( bytes < 0 )
-                    return RC ( rcVFS, rcPath, rcParsing, rcChar, rcInvalid );
-                return RC ( rcVFS, rcPath, rcParsing, rcData, rcInsufficient );
-            }
-
-            ch = utf32;
-          }
-          else {
-/* uri is in extended ASCII  */
-              ch &= 0xff;
-          }
-        }
-
-        /* enter state */
-        switch ( state )
-        {
-        case vppStart:
-
-            if ( ch >= 128 )
-                state = vppNamePath;
-            else if ( isalpha ( ch ) )
-            {
-                acc_alpha = 1;
-                state = vppAccPrefixAlphaNamePathOrScheme;
-            }
-            else if ( isdigit ( ch ) )
-                state = vppNamePath;
-            else switch ( ch )
-            {
-            case '/':
-                state = vppFullOrUNCPath;
-                break;
-
-#if ! TREAT_URI_RESERVED_AS_FILENAME
-            case ':':
-            case '?':
-            case '#':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-#endif
-
-            default:
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccPrefixAlphaNamePathOrScheme:
-
-            if ( ch >= 128 )
-            {
-                acc_alpha = 0;
-                state = vppNamePath;
-            }
-            else if ( isalpha ( ch ) )
-                ++ acc_alpha;
-            else if ( isdigit ( ch ) )
-            {
-                ++ acc_digit;
-                state = vppAccDigitNamePathOrScheme;
-            }
-            else switch ( ch )
-            {
-            case '/':
-                acc_alpha = 0;
-                state = vppRelPath;
-                break;
-
-            case '_':
-                acc_prefix = 1;
-                state = vppAccAlphaNamePath;
-                acc_alpha = 0;
-                break;
-
-            case '.':
-            case '+':
-            case '-':
-                acc_alpha = 0;
-                state = vppNamePathOrScheme;
-                break;
-
-            case ':':
-                acc_alpha = 0;
-                VPathCaptureScheme ( self, uri, anchor, i );
-                state = vppAccOidRelOrSlash;
-                break;
-
-#if ! TREAT_URI_RESERVED_AS_FILENAME
-            case '?':
-            case '#':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-#endif
-
-            default:
-                acc_alpha = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccAlphaNamePath:
-
-            if ( ch >= 128 )
-            {
-                acc_prefix = acc_alpha = 0;
-                state = vppNamePath;
-            }
-            else if ( isalpha ( ch ) )
-                ++ acc_alpha;
-            else if ( isdigit ( ch ) )
-            {
-                ++ acc_digit;
-                state = vppAccDigitNamePath;
-            }
-            else switch ( ch )
-            {
-            case '/':
-                acc_prefix = acc_alpha = 0;
-                state = vppRelPath;
-                break;
-
-#if ! TREAT_URI_RESERVED_AS_FILENAME
-            case ':':
-            case '?':
-            case '#':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-#endif
-
-            default:
-                acc_prefix = acc_alpha = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccDigitNamePathOrScheme:
-
-            if ( ch >= 128 )
-            {
-                acc_prefix = acc_alpha = acc_digit = 0;
-                state = vppNamePath;
-            }
-            else if ( isalpha ( ch ) )
-            {
-                acc_prefix = acc_alpha = acc_digit = 0;
-                state = vppNamePathOrScheme;
-            }
-            else if ( isdigit ( ch ) )
-                ++ acc_digit;
-            else switch ( ch )
-            {
-            case '/':
-                acc_prefix = acc_alpha = acc_digit = 0;
-                state = vppRelPath;
-                break;
-
-            case '.':
-                state = vppAccDotNamePathOrScheme;
-                break;
-
-            case '+':
-            case '-':
-                acc_prefix = acc_alpha = acc_digit = 0;
-                state = vppNamePathOrScheme;
-                break;
-
-            case ':':
-                acc_prefix = acc_alpha = acc_digit = 0;
-                VPathCaptureScheme ( self, uri, anchor, i );
-                state = vppAccOidRelOrSlash;
-                break;
-
-#if ! TREAT_URI_RESERVED_AS_FILENAME
-            case '?':
-            case '#':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-#endif
-
-            default:
-                acc_prefix = acc_alpha = acc_digit = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccDigitNamePath:
-
-            if ( ch >= 128 || isalpha ( ch ) )
-            {
-                acc_prefix = acc_alpha = acc_digit = 0;
-                state = vppNamePath;
-            }
-            else if ( isdigit ( ch ) )
-                ++ acc_digit;
-            else switch ( ch )
-            {
-            case '/':
-                acc_prefix = acc_alpha = acc_digit = 0;
-                state = vppRelPath;
-                break;
-
-            case '.':
-                state = vppAccDotNamePath;
-                break;
-
-#if ! TREAT_URI_RESERVED_AS_FILENAME
-            case ':':
-            case '?':
-            case '#':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-#endif
-
-            default:
-                acc_prefix = acc_alpha = acc_digit = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccExtNamePathOrScheme:
-
-            if ( ch >= 128 )
-            {
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            else if ( isalpha ( ch ) )
-            {
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePathOrScheme;
-            }
-            else if ( isdigit ( ch ) )
-                break;
-            else switch ( ch )
-            {
-            case '/':
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppRelPath;
-                break;
-
-            case '.':
-                state = vppAccDotNamePathOrScheme;
-                break;
-
-            case '+':
-            case '-':
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePathOrScheme;
-                break;
-
-            case ':':
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                VPathCaptureScheme ( self, uri, anchor, i );
-                state = vppAccOidRelOrSlash;
-                break;
-
-#if ! TREAT_URI_RESERVED_AS_FILENAME
-            case '?':
-            case '#':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-#endif
-
-            case '_':
-                if ( acc_prefix != 0 && acc_alpha == 0 && acc_digit == 9 )
-                {
-                    state = vppAccUnderNamePath;
-                    break;
-                }
-
-                /* no break */
-
-            default:
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccExtNamePath:
-
-            if ( ch >= 128 || isalpha ( ch ) )
-            {
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            else if ( isdigit ( ch ) )
-                break;
-            else switch ( ch )
-            {
-            case '/':
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppRelPath;
-                break;
-
-            case '.':
-                state = vppAccDotNamePath;
-                break;
-
-#if ! TREAT_URI_RESERVED_AS_FILENAME
-            case ':':
-            case '?':
-            case '#':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-#endif
-
-            case '_':
-                if ( acc_prefix != 0 && acc_alpha == 0 && acc_digit == 9 && acc_ext == 1 )
-                {
-                    state = vppAccUnderNamePath;
-                    break;
-                }
-
-                /* no break */
-
-            default:
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccSuffixNamePath:
-
-            if ( ch >= 128 || isdigit ( ch ) )
-            {
-                acc_prefix = acc_alpha = acc_digit = acc_ext = acc_suffix = 0;
-                state = vppNamePath;
-            }
-            else if ( isalpha ( ch ) )
-                break;
-            else switch ( ch )
-            {
-            case '/':
-                acc_prefix = acc_alpha = acc_digit = acc_ext = acc_suffix = 0;
-                state = vppRelPath;
-                break;
-
-#if ! TREAT_URI_RESERVED_AS_FILENAME
-            case ':':
-            case '?':
-            case '#':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-#endif
-
-            default:
-                acc_prefix = acc_alpha = acc_digit = acc_ext = acc_suffix = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccDotNamePathOrScheme:
-
-            if ( ch >= 128 )
-            {
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            else if ( isalpha ( ch ) )
-            {
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePathOrScheme;
-            }
-            else if ( isdigit ( ch ) )
-            {
-                ++ acc_ext;
-                state = vppAccExtNamePathOrScheme;
-            }
-            else switch ( ch )
-            {
-            case '/':
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppRelPath;
-                break;
-
-            case '.':
-            case '+':
-            case '-':
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePathOrScheme;
-                break;
-
-            case ':':
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                VPathCaptureScheme ( self, uri, anchor, i );
-                state = vppAccOidRelOrSlash;
-                break;
-
-#if ! TREAT_URI_RESERVED_AS_FILENAME
-            case '?':
-            case '#':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-#endif
-
-            default:
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccDotNamePath:
-
-            if ( ch >= 128 || isalpha ( ch ) )
-            {
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            else if ( isdigit ( ch ) )
-            {
-                ++ acc_ext;
-                state = vppAccExtNamePath;
-            }
-            else switch ( ch )
-            {
-            case '/':
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppRelPath;
-                break;
-
-#if ! TREAT_URI_RESERVED_AS_FILENAME
-            case ':':
-            case '?':
-            case '#':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-#endif
-
-            default:
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccUnderNamePath:
-
-            if ( ch >= 128 || isdigit ( ch ) )
-            {
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            else if ( isalpha ( ch ) )
-            {
-                ++ acc_suffix;
-                state = vppAccSuffixNamePath;
-            }
-            else switch ( ch )
-            {
-            case '/':
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppRelPath;
-                break;
-
-#if ! TREAT_URI_RESERVED_AS_FILENAME
-            case ':':
-            case '?':
-            case '#':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-#endif
-
-            default:
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppNamePathOrScheme:
-
-            if ( ch >= 128 )
-                state = vppNamePath;
-            else if ( isalnum ( ch ) )
-                break;
-            else switch ( ch )
-            {
-            case '/':
-                state = vppRelPath;
-                break;
-
-            case '.':
-            case '+':
-            case '-':
-                break;
-
-            case ':':
-                VPathCaptureScheme ( self, uri, anchor, i );
-                state = vppAccOidRelOrSlash;
-                break;
-
-#if ! TREAT_URI_RESERVED_AS_FILENAME
-            case '?':
-            case '#':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-#endif
-
-            default:
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccOidRelOrSlash:
-
-            VPathParseResetAnchor ( i );
-            acc_prefix = acc_digit = acc_ext = 0;
-
-            if ( ch >= 128 )
-                state = vppNamePath;
-
-            else if ( isalpha ( ch ) )
-            {
-                acc_alpha = 1;
-                state = vppAccPrefixAlphaRel;
-            }
-
-            else if ( isdigit ( ch ) )
-            {
-                state = vppOidRel;
-                oid = ch - '0';
-                oid_anchor = (uint32_t)i;
-            }
-
-            else if ( ch != '/' )
-                state = vppNamePath;
-
-            else
-                state = vppSlash;
-
-            break;
-
-        case vppAccPrefixAlphaRel:
-
-            if ( ch >= 128 )
-            {
-                acc_alpha = 0;
-                state = vppNamePath;
-            }
-            else if ( isalpha ( ch ) )
-                ++ acc_alpha;
-            else if ( isdigit ( ch ) )
-            {
-                ++ acc_digit;
-                state = vppAccDigitRel;
-            }
-            else switch ( ch )
-            {
-            case '_':
-                acc_prefix = 1;
-                acc_alpha = 0;
-                state = vppAccAlphaRel;
-                break;
-
-            case '/':
-                acc_alpha = 0;
-                state = vppRelPath;
-                break;
-
-            case '?':
-                VPathCaptureAccession ( self, uri, anchor, i );
-                VPathCaptureAccCode ( self, acc_prefix, acc_alpha, acc_digit, acc_ext, acc_suffix );
-                state = vppParamName;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case '#':
-                VPathCaptureAccession ( self, uri, anchor, i );
-                VPathCaptureAccCode ( self, acc_prefix, acc_alpha, acc_digit, acc_ext, acc_suffix );
-                state = vppFragment;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case ':':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            default:
-                acc_alpha = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccAlphaRel:
-
-            if ( ch >= 128 )
-            {
-                acc_prefix = acc_alpha = 0;
-                state = vppNamePath;
-            }
-            else if ( isalpha ( ch ) )
-                ++ acc_alpha;
-            else if ( isdigit ( ch ) )
-            {
-                ++ acc_digit;
-                state = vppAccDigitRel;
-            }
-            else switch ( ch )
-            {
-            case '/':
-                acc_prefix = acc_alpha = 0;
-                state = vppRelPath;
-                break;
-
-            case '?':
-                VPathCaptureAccession ( self, uri, anchor, i );
-                VPathCaptureAccCode ( self, acc_prefix, acc_alpha, acc_digit, acc_ext, acc_suffix );
-                state = vppParamName;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case '#':
-                VPathCaptureAccession ( self, uri, anchor, i );
-                VPathCaptureAccCode ( self, acc_prefix, acc_alpha, acc_digit, acc_ext, acc_suffix );
-                state = vppFragment;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case ':':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            default:
-                acc_prefix = acc_alpha = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccDigitRel:
-
-            if ( ch >= 128 || isalpha ( ch ) )
-            {
-                acc_prefix = acc_alpha = acc_digit = 0;
-                state = vppNamePath;
-            }
-            else if ( isdigit ( ch ) )
-                ++ acc_digit;
-            else switch ( ch )
-            {
-            case '.':
-                state = vppAccDotRel;
-                break;
-
-            case '/':
-                acc_prefix = acc_alpha = acc_digit = 0;
-                state = vppRelPath;
-                break;
-
-            case '?':
-                VPathCaptureAccession ( self, uri, anchor, i );
-                VPathCaptureAccCode ( self, acc_prefix, acc_alpha, acc_digit, acc_ext, acc_suffix );
-                state = vppParamName;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case '#':
-                VPathCaptureAccession ( self, uri, anchor, i );
-                VPathCaptureAccCode ( self, acc_prefix, acc_alpha, acc_digit, acc_ext, acc_suffix );
-                state = vppFragment;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case ':':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            default:
-                acc_prefix = acc_alpha = acc_digit = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccExtRel:
-
-            if ( ch >= 128 || isalpha ( ch ) )
-            {
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            else if ( isdigit ( ch ) )
-                break;
-            else switch ( ch )
-            {
-            case '.':
-                state = vppAccDotRel;
-                break;
-
-            case '/':
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppRelPath;
-                break;
-
-            case '?':
-                VPathCaptureAccession ( self, uri, anchor, i );
-                VPathCaptureAccCode ( self, acc_prefix, acc_alpha, acc_digit, acc_ext, acc_suffix );
-                state = vppParamName;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case '#':
-                VPathCaptureAccession ( self, uri, anchor, i );
-                VPathCaptureAccCode ( self, acc_prefix, acc_alpha, acc_digit, acc_ext, acc_suffix );
-                state = vppFragment;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case ':':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            case '_':
-                if ( acc_prefix != 0 && acc_alpha == 0 && acc_digit == 9 && acc_ext == 1 )
-                {
-                    state = vppAccUnderRel;
-                    break;
-                }
-
-            default:
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccSuffixRel:
-
-            if ( ch >= 128 || isdigit ( ch ) )
-            {
-                acc_prefix = acc_alpha = acc_digit = acc_ext = acc_suffix = 0;
-                state = vppNamePath;
-            }
-            else if ( isalpha ( ch ) )
-                break;
-            else switch ( ch )
-            {
-            case '.':
-                state = vppAccDotRel;
-                break;
-
-            case '/':
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppRelPath;
-                break;
-
-            case '?':
-                VPathCaptureAccession ( self, uri, anchor, i );
-                VPathCaptureAccCode ( self, acc_prefix, acc_alpha, acc_digit, acc_ext, acc_suffix );
-                state = vppParamName;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case '#':
-                VPathCaptureAccession ( self, uri, anchor, i );
-                VPathCaptureAccCode ( self, acc_prefix, acc_alpha, acc_digit, acc_ext, acc_suffix );
-                state = vppFragment;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case ':':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            default:
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppOidRel:
-
-            if ( ch >= 128 )
-            {
-                oid = 0;
-                state = vppNamePath;
-            }
-            else if ( isdigit ( ch ) )
-            {
-                if ( oid == 0 )
-                    oid_anchor = (uint32_t)i;
-
-                oid *= 10;
-                oid += ch - '0';
-            }
-            else switch ( ch )
-            {
-            case '/':
-                oid = 0;
-                state = vppRelPath;
-                break;
-
-            case '?':
-                VPathCaptureOid ( self, oid, uri, anchor, oid_anchor, i );
-                state = vppParamName;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case '#':
-                VPathCaptureOid ( self, oid, uri, anchor, oid_anchor, i );
-                state = vppFragment;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case ':':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            default:
-                oid = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccDotRel:
-
-            if ( ch >= 128 || isalpha ( ch ) )
-            {
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            else if ( isdigit ( ch ) )
-            {
-                ++ acc_ext;
-                state = vppAccExtRel;
-            }
-            else switch ( ch )
-            {
-            case '/':
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppRelPath;
-                break;
-
-            case ':':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            default:
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppAccUnderRel:
-
-            if ( ch >= 128 || isdigit ( ch ) )
-            {
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            else if ( isalpha ( ch ) )
-            {
-                ++ acc_suffix;
-                state = vppAccSuffixRel;
-            }
-            else switch ( ch )
-            {
-            case '/':
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppRelPath;
-                break;
-
-            case ':':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            default:
-                acc_prefix = acc_alpha = acc_digit = acc_ext = 0;
-                state = vppNamePath;
-            }
-            break;
-
-        case vppSlash:
-
-            switch ( ch )
-            {
-            case '/':
-                if ( self -> scheme_type == vpuri_ncbi_file )
-                    state = vppUNCOrMalformedPOSIXPath;
-                else
-                    state = vppAuthHostSpec;
-                break;
-
-            case ':':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            case '?':
-                VPathCapturePath ( self, uri, anchor, i, count, vpFullPath );
-                state = vppParamName;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case '#':
-                VPathCapturePath ( self, uri, anchor, i, count, vpFullPath );
-                state = vppFragment;
-                VPathParseResetAnchor ( i );
-                break;
-
-            default:
-                state = vppFullPath;
-            }
-            break;
-
-        case vppAuthHostSpec:
-
-            if ( ch >= 128 )
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            VPathParseResetAnchor ( i );
-
-            if ( isalpha ( ch ) )
-                state = vppAuthHostNamePort;
-            else if ( isdigit ( ch ) )
-            {
-                ipv4 [ ip = 0 ] = ch - '0';
-                state = vppIPv4Port;
-            }
-            else switch ( ch )
-            {
-            case '/':
-                state = vppFullPath;
-                break;
-            case '[':
-                ip = 0;
-                memset ( ipv6, 0, sizeof ipv6 );
-                state = vppIPv6Colon;
-                break;
-            default:
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-            }
-
-            break;
-
-        case vppHostSpec:
-
-            if ( ch >= 128 )
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            VPathParseResetAnchor ( i );
-
-            if ( isalpha ( ch ) )
-                state = vppHostNamePort;
-            else if ( isdigit ( ch ) )
-            {
-                ipv4 [ ip = 0 ] = ch - '0';
-                state = vppIPv4Port;
-            }
-            else switch ( ch )
-            {
-            case '/':
-                state = vppFullPath;
-                break;
-            case '[':
-                ip = 0;
-                memset ( ipv6, 0, sizeof ipv6 );
-                state = vppIPv6Colon;
-                break;
-            default:
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-            }
-
-            break;
-
-        case vppAuthHostNamePort:
-
-            if ( ch >= 128 )
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            if ( isalnum ( ch ) )
-                break;
-            else switch ( ch )
-            {
-            case '@':
-                VPathCaptureAuth ( self, uri, anchor, i );
-                state = vppHostSpec;
-                break;
-
-            case '.':
-            case '+':
-            case '-':
-            case '_':
-                break;
-
-            case ':':
-                VPathCaptureHostName ( self, uri, anchor, i );
-                state = vppPortSpec;
-                break;
-
-            case '/':
-                VPathCaptureHostName ( self, uri, anchor, i );
-                state = vppFullPath;
-                VPathParseResetAnchor ( i );
-                break;
-
-            default:
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-            }
-            break;
-
-        case vppHostNamePort:
-
-            if ( ch >= 128 )
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            if ( isalnum ( ch ) )
-                break;
-            else switch ( ch )
-            {
-            case '.':
-            case '+':
-            case '-':
-            case '_':
-                break;
-
-            case ':':
-                VPathCaptureHostName ( self, uri, anchor, i );
-                state = vppPortSpec;
-                break;
-
-            case '/':
-                VPathCaptureHostName ( self, uri, anchor, i );
-                state = vppFullPath;
-                VPathParseResetAnchor ( i );
-                break;
-
-            default:
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-            }
-            break;
-
-        case vppIPv4Port:
-
-            if ( ch >= 128 )
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-            if ( ipv4 [ ip ] >= 256 )
-                return RC ( rcVFS, rcPath, rcParsing, rcData, rcExcessive );
-            if ( isdigit ( ch ) )
-                ipv4 [ ip ] = ipv4 [ ip ] * 10 + ch - '0';
-            else if ( ++ ip == 4 )
-            {
-                switch ( ch )
-                {
-                case ':':
-                    rc = VPathCaptureIPv4 ( self, ipv4 );
-                    state = vppPortSpec;
-                    break;
-
-                case '/':
-                    rc = VPathCaptureIPv4 ( self, ipv4 );
-                    state = vppFullPath;
-                    VPathParseResetAnchor ( i );
-                    break;
-
-                default:
-                    return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-                }
-
-                if ( rc != 0 )
-                    return rc;
-            }
-            else if ( ch == '.' )
-                state = vppIPv4Dot;
-            else
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-            break;
-
-        case vppIPv4Dot:
-
-            if ( ch >= 128 || ! isdigit ( ch ) )
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            ipv4 [ ip ] = ch - '0';
-            state = vppIPv4Port;
-
-            break;
-
-        case vppIPv6Port:
-
-            if ( ch >= 128 )
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-            if ( ipv6 [ ip ] >= 0x10000 )
-                return RC ( rcVFS, rcPath, rcParsing, rcData, rcExcessive );
-            if ( isdigit ( ch ) )
-                ipv6 [ ip ] = ( ipv6 [ ip ] << 4 ) + ch - '0';
-            else if ( isxdigit ( ch ) )
-                ipv6 [ ip ] = ( ipv6 [ ip ] << 4 ) + toupper ( ch ) - 'A' + 10;
-            else
-            {
-                switch ( ch )
-                {
-                case ']':
-                    rc = VPathCaptureIPv6 ( self, ipv6 );
-                    state = vppPortSpecOrFullPath;
-                    break;
-
-                case ':':
-                    if ( ++ ip != 8 )
-                    {
-                        state = vppIPv6Colon;
-                        break;
-                    }
-
-                    /* no break */
-                default:
-                    return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-                }
-
-                if ( rc != 0 )
-                    return rc;
-            }
-            break;
-
-        case vppIPv6Colon:
-
-            if ( ch != ':' )
-            {
-                if ( ch >= 128 || ! isxdigit ( ch ) )
-                    return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-                if ( isdigit ( ch ) )
-                    ipv6 [ ip ] = ch - '0';
-                else
-                    ipv6 [ ip ] = toupper ( ch ) - 'A' + 10;
-            }
-
-            state = vppIPv6Port;
-
-            break;
-
-        case vppPortSpecOrFullPath:
-
-            switch ( ch )
-            {
-            case ':':
-                state = vppPortSpec;
-                break;
-
-            case '/':
-                state = vppFullPath;
-                VPathParseResetAnchor ( i );
-                break;
-
-            default:
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-            }
-
-            break;
-
-        case vppPortSpec:
-
-            if ( ch >= 128 )
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            VPathParseResetAnchor ( i );
-
-            if ( isalpha ( ch ) )
-                state = vppPortName;
-            else if ( isdigit ( ch ) )
-            {
-                port = ch - '0';
-                state = vppPortNum;
-            }
-            else switch ( ch )
-            {
-            case '/':
-                self -> missing_port = true;
-                state = vppFullPath;
-                break;
-
-            default:
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-            }
-
-            break;
-
-        case vppPortName:
-
-            if ( ch >= 128 )
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            if ( isalnum ( ch ) )
-                break;
-            else switch ( ch )
-            {
-            case '/':
-                VPathCapturePortName ( self, uri, anchor, i );
-                state = vppFullPath;
-                VPathParseResetAnchor ( i );
-                break;
-
-            default:
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-            }
-            break;
-
-        case vppPortNum:
-
-            if ( ch >= 128 )
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-            if ( port >= 0x10000 )
-                return RC ( rcVFS, rcPath, rcParsing, rcData, rcExcessive );
-
-            if ( isdigit ( ch ) )
-                port = port * 10 + ch - '0';
-            else switch ( ch )
-            {
-            case '/':
-                rc = VPathCapturePortNum ( self, port );
-                if ( rc != 0 )
-                    return rc;
-                state = vppFullPath;
-                VPathParseResetAnchor ( i );
-                break;
-
-            default:
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-            }
-            break;
-
-        case vppNamePath:
-
-            switch ( ch )
-            {
-            case '/':
-                state = vppRelPath;
-                break;
-
-            case ':':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            case '?':
-                VPathCapturePath ( self, uri, anchor, i, count, vpName );
-                state = vppParamName;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case '#':
-                VPathCapturePath ( self, uri, anchor, i, count, vpName );
-                state = vppFragment;
-                VPathParseResetAnchor ( i );
-                break;
-            }
-
-            break;
-
-        case vppUNCOrMalformedPOSIXPath:
-
-            switch ( ch )
-            {
-            case '/':
-                state = vppFullPath;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case ':':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            case '?':
-                VPathCapturePath ( self, uri, anchor, i, count, vpFullPath );
-                state = vppParamName;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case '#':
-                VPathCapturePath ( self, uri, anchor, i, count, vpFullPath );
-                state = vppFragment;
-                VPathParseResetAnchor ( i );
-                break;
-
-            default:
-                state = vppUNCPath;
-            }
-
-            break;
-
-        case vppFullOrUNCPath:
-
-            if ( ch == '/' )
-            {
-                state = vppUNCOrMalformedPOSIXPath;
-                break;
-            }
-
-            state = vppFullPath;
-            /* no break */
-
-        case vppRelPath:
-        case vppFullPath:
-
-            if(self->scheme_type != vpuri_none) switch ( ch )
-            {
-            case ':':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            case '?':
-                VPathCapturePath ( self, uri, anchor, i, count,
-                    ( state == vppRelPath ) ? vpRelPath : vpFullPath );
-                state = vppParamName;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case '#':
-                VPathCapturePath ( self, uri, anchor, i, count,
-                    ( state == vppRelPath ) ? vpRelPath : vpFullPath );
-                state = vppFragment;
-                VPathParseResetAnchor ( i );
-                break;
-            }
-
-            break;
-
-        case vppUNCPath:
-
-            switch ( ch )
-            {
-            case ':':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            case '?':
-                VPathCapturePath ( self, uri, anchor, i, count, vpUNCPath );
-                state = vppParamName;
-                VPathParseResetAnchor ( i );
-                break;
-
-            case '#':
-                VPathCapturePath ( self, uri, anchor, i, count, vpUNCPath );
-                state = vppFragment;
-                VPathParseResetAnchor ( i );
-                break;
-            }
-
-            break;
-
-        case vppParamName:
-
-            switch ( ch )
-            {
-            case ':':
-            case '?':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            case '=':
-                state = vppParamValue;
-                break;
-
-            case '#':
-                VPathCaptureQuery ( self, uri, anchor, i, count );
-                state = vppFragment;
-                VPathParseResetAnchor ( i );
-                break;
-            }
-
-            break;
-
-        case vppParamValue:
-
-            switch ( ch )
-            {
-            case ':':
-            case '?':
-            case '=':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-
-            case '&':
-                state = vppParamName;
-                break;
-
-            case '#':
-                VPathCaptureQuery ( self, uri, anchor, i, count );
-                state = vppFragment;
-                VPathParseResetAnchor ( i );
-                break;
-            }
-
-            break;
-
-        case vppFragment:
-
-            switch ( ch )
-            {
-            case ':':
-            case '?':
-            case '#':
-                return RC ( rcVFS, rcPath, rcParsing, rcChar, rcUnexpected );
-            }
-
-            break;
-        }
-    }
-
-    /* return pileup extension back */
-    if ( pileup_ext_present )
-    {
-        uri[uri_size] = '.';
-        if ( i == uri_size )
-            i += pileup_ext_size;
-        uri_size += pileup_ext_size;
-        
-        if ( acc_alpha && acc_digit )
-            ++acc_ext;
-    }
-    
-    switch ( state )
-    {
-    case vppStart:
-        return RC ( rcVFS, rcPath, rcParsing, rcString, rcEmpty );
-    case vppAccPrefixAlphaNamePathOrScheme:
-    case vppAccAlphaNamePath:
-    case vppAccDigitNamePathOrScheme:
-    case vppAccDigitNamePath:
-    case vppAccExtNamePathOrScheme:
-    case vppAccExtNamePath:
-    case vppAccSuffixNamePath:
-        VPathCaptureAccession ( self, uri, anchor, i );
-        VPathCaptureAccCode ( self, acc_prefix, acc_alpha, acc_digit, acc_ext, acc_suffix );
-        break;
-    case vppAccDotNamePathOrScheme:
-    case vppAccDotNamePath:
-    case vppAccUnderNamePath:
-    case vppNamePathOrScheme:
-        VPathCapturePath ( self, uri, anchor, i, count, vpName );
-        break;
-    case vppAccOidRelOrSlash:
-        return RC ( rcVFS, rcPath, rcParsing, rcData, rcInsufficient );
-    case vppAccPrefixAlphaRel:
-    case vppAccAlphaRel:
-    case vppAccDigitRel:
-    case vppAccExtRel:
-    case vppAccSuffixRel:
-        VPathCaptureAccession ( self, uri, anchor, i );
-        VPathCaptureAccCode ( self, acc_prefix, acc_alpha, acc_digit, acc_ext, acc_suffix );
-        break;
-    case vppOidRel:
-        VPathCaptureOid ( self, oid, uri, anchor, oid_anchor, i );
-        break;
-    case vppAccDotRel:
-    case vppAccUnderRel:
-    case vppSlash:
-    case vppAuthHostSpec:
-    case vppHostSpec:
-        return RC ( rcVFS, rcPath, rcParsing, rcData, rcInsufficient );
-    case vppAuthHostNamePort:
-    case vppHostNamePort:
-        VPathCaptureHostName ( self, uri, anchor, i );
-        break;
-    case vppIPv4Port:
-        if ( ++ ip == 4 )
-            return VPathCaptureIPv4 ( self, ipv4 );
-    case vppIPv4Dot:
-    case vppIPv6Port:
-    case vppIPv6Colon:
-    case vppPortSpecOrFullPath:
-    case vppPortSpec:
-        return RC ( rcVFS, rcPath, rcParsing, rcData, rcInsufficient );
-    case vppPortName:
-        VPathCapturePortName ( self, uri, anchor, i );
-        break;
-    case vppPortNum:
-        return VPathCapturePortNum ( self, port );
-    case vppNamePath:
-        VPathCapturePath ( self, uri, anchor, i, count, vpName );
-        break;
-    case vppRelPath:
-        VPathCapturePath ( self, uri, anchor, i, count, vpRelPath );
-        break;
-    case vppUNCOrMalformedPOSIXPath:
-    case vppFullOrUNCPath:
-    case vppFullPath:
-        VPathCapturePath ( self, uri, anchor, i, count, vpFullPath );
-        break;
-    case vppUNCPath:
-        VPathCapturePath ( self, uri, anchor, i, count, vpUNCPath );
-        break;
-    case vppParamName:
-    case vppParamValue:
-        VPathCaptureQuery ( self, uri, anchor, i, count );
-        break;
-    case vppFragment:
-        VPathCaptureFragment ( self, uri, anchor, i, count );
-        break;
-    }
-
-    return 0;
-}
-
-static
-rc_t VPathParse ( VPath * self, char * uri, size_t uri_size )
-{
-    /* Parse uri as UTF-8 */
-    rc_t rc = VPathParseInt ( self, uri, uri_size, true );
-
-    if ( rc == SILENT_RC ( rcVFS, rcPath, rcParsing, rcChar, rcInvalid ) /* ||
-        rc == SILENT_RC ( rcVFS, rcPath, rcParsing, rcData, rcInsufficient ) */
-       )
-    {
-        /* Parse uri as extended ASCII */
-        rc = VPathParseInt ( self, uri, uri_size, false );
-    }
-
-    return rc;
-}
-
-/* MakeFromText
- *  could be anything...
- */
-static
-rc_t VPathMakeFromVText ( VPath ** ppath, const char * path_fmt, va_list args )
-{
-    rc_t rc;
-    KDataBuffer buffer;
-
-    /* initialize buffer */
-    memset ( & buffer, 0, sizeof buffer );
-    buffer . elem_bits = 8;
-
-    /* print into buffer */
-    rc = KDataBufferVPrintf ( & buffer, path_fmt, args );
-    if ( rc == 0 )
-    {
-        VPath * path = calloc ( 1, sizeof * path );
-        if ( path == NULL )
-            rc = RC ( rcVFS, rcPath, rcAllocating, rcMemory, rcExhausted );
-        else
-        {
-            /* straight copy to steal contents */
-            path -> data = buffer;
-
-            /* parse into portions */
-            rc = VPathParse ( path, buffer . base, ( size_t ) buffer . elem_count - 1 );
-            if ( rc == 0 )
-            {
-                KRefcountInit ( & path -> refcount, 1, "VPath", "make-from-text", buffer . base );
-                * ppath = path;
-                return 0;
-            }
-
-            free ( path );
-        }
-
-        KDataBufferWhack ( & buffer );
-    }
-
-    * ppath = NULL;
-
-    return rc;
-}
-
-static
-rc_t VPathMakeFromText ( VPath ** ppath, const char * text, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, text );
-
-    rc = VPathMakeFromVText ( ppath, text, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-/* MakePathWithExtension
- *  makes a copy of original path
- *  appends an extension to path portion of orig
- */
-LIB_EXPORT rc_t CC VFSManagerMakePathWithExtension ( struct VFSManager const * self,
-    VPath ** new_path, const VPath * orig, const char * extension )
-{
-    rc_t rc;
-
-    if ( new_path == NULL )
-        rc = RC ( rcVFS, rcPath, rcCopying, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVFS, rcPath, rcCopying, rcSelf, rcNull );
-        else if ( orig == NULL )
-            rc = RC ( rcVFS, rcPath, rcCopying, rcParam, rcNull );
-        else if ( orig -> path_type == vpInvalid || orig -> path_type > vpEndpoint )
-            rc = RC ( rcVFS, rcPath, rcCopying, rcParam, rcInvalid );
-        else if ( orig -> path_type > vpFullPath )
-            rc = RC ( rcVFS, rcPath, rcCopying, rcParam, rcIncorrect );
-#if ALLOW_ADDREF_WITHIN_MAKEPATH
-        else if ( extension == NULL || extension [ 0 ] == 0 )
-        {
-            rc = VPathAddRef ( orig );
-            if ( rc == 0 )
-            {
-                * new_path = ( VPath * ) orig;
-                return 0;
-            }
-        }
-#endif
-        else
-        {
-            char path_prefix [ 4096 ];
-            size_t num_writ, total = 0;
-
-            rc = 0;
-
-#if ! ALLOW_ADDREF_WITHIN_MAKEPATH
-            if ( extension == NULL )
-                extension = "";
-#endif
-
-            /* add in original scheme */
-            if ( orig -> from_uri && orig -> scheme . size != 0 )
-            {
-                rc = string_printf ( & path_prefix [ total ], sizeof path_prefix - total,
-                    & num_writ, "%S://", & orig -> scheme );
-                if ( rc == 0 )
-                    total += num_writ;
-
-                /* if there's a host spec of some sort */
-                if ( rc == 0 && orig -> host . size != 0 )
-                {
-                    /* add in original auth */
-                    if ( orig -> auth . size != 0 )
-                    {
-                        rc = string_printf ( & path_prefix [ total ], sizeof path_prefix - total,
-                            & num_writ, "%S@", & orig -> auth );
-                        if ( rc == 0 )
-                            total += num_writ;
-                    }
-
-                    /* add in host */
-                    if ( rc == 0 )
-                    {
-                        rc = string_printf ( & path_prefix [ total ], sizeof path_prefix - total,
-                            & num_writ, "%S", & orig -> host );
-                        if ( rc == 0 )
-                            total += num_writ;
-                    }
-
-                    /* add in port */
-                    if ( rc == 0 )
-                    {
-                        num_writ = 0;
-                        if ( orig -> portname . size != 0 )
-                        {
-                            rc = string_printf ( & path_prefix [ total ], sizeof path_prefix - total,
-                                & num_writ, ":%S", & orig -> portname );
-                        }
-                        else if ( orig -> portnum != 0 )
-                        {
-                            rc = string_printf ( & path_prefix [ total ], sizeof path_prefix - total,
-                                & num_writ, ":%u", orig -> portnum );
-                        }
-                        else if ( orig -> missing_port )
-                        {
-                            rc = string_printf ( & path_prefix [ total ], sizeof path_prefix - total,
-                                & num_writ, ":" );
-                        }
-                        if ( rc == 0 )
-                            total += num_writ;
-                    }
-                }
-            }
-
-            if ( rc == 0 )
-            {
-                /* copy orig */
-                switch ( orig -> path_type )
-                {
-                case vpOID:
-
-                    if ( total != 0 )
-                    {
-                        rc = VPathMakeFromText ( new_path
-                                                 , "%.*s/%u%s%S%S"
-                                                 , ( uint32_t ) total, path_prefix
-                                                 , orig -> obj_id
-                                                 , extension
-                                                 , & orig -> query
-                                                 , & orig -> fragment
-                            );
-                    }
-                    else
-                    {
-                        rc = VPathMakeFromText ( new_path
-                                                 , "%u%s%S%S"
-                                                 , orig -> obj_id
-                                                 , extension
-                                                 , & orig -> query
-                                                 , & orig -> fragment
-                            );
-                    }
-                    break;
-
-                case vpAccession:
-                case vpNameOrOID:
-                case vpNameOrAccession:
-                case vpName:
-                case vpRelPath:
-                case vpUNCPath:
-
-                    /* no break */
-
-                case vpFullPath:
-
-                    assert ( orig -> path . size != 0 );
-                    if ( total != 0 )
-                    {
-                        rc = VPathMakeFromText ( new_path
-                                                 , "%.*s%S%s%S%S"
-                                                 , ( uint32_t ) total, path_prefix
-                                                 , & orig -> path
-                                                 , extension
-                                                 , & orig -> query
-                                                 , & orig -> fragment
-                            );
-                    }
-                    else
-                    {
-                        rc = VPathMakeFromText ( new_path
-                                                 , "%S%s%S%S"
-                                                 , & orig -> path
-                                                 , extension
-                                                 , & orig -> query
-                                                 , & orig -> fragment
-                            );
-                    }
-                    break;
-                }
-
-                if ( rc == 0 )
-                    return 0;
-            }
-        }
-
-        * new_path = NULL;
-    }
-
-    return rc;
-}
-
-
-/* ExtractAccessionOrOID
- *  given an arbitrary path, possibly with extensions,
- *  extract the portion of the leaf qualifying as an
- *  accession or OID
- */
-LIB_EXPORT rc_t CC VFSManagerExtractAccessionOrOID ( const VFSManager * self,
-    VPath ** acc_or_oid, const VPath * orig )
-{
-    rc_t rc;
-
-    if ( acc_or_oid == NULL )
-        rc = RC ( rcVFS, rcPath, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVFS, rcPath, rcConstructing, rcSelf, rcNull );
-        else if ( orig == NULL )
-            rc = RC ( rcVFS, rcPath, rcConstructing, rcParam, rcNull );
-        else if ( VPathIsAccessionOrOID ( orig ) )
-        {
-            rc = VPathAddRef ( orig );
-            if ( rc == 0 )
-            {
-                * acc_or_oid = ( VPath* ) orig;
-                return 0;
-            }
-        }
-        else
-        {
-            String path = orig -> path;
-            const char * sep, * start = path . addr;
-            const char * end = path . addr + path . size;
-
-            switch ( orig -> path_type )
-            {
-            case vpInvalid:
-                rc = RC ( rcVFS, rcPath, rcConstructing, rcParam, rcInvalid );
-                break;
-
-            case vpName:
-                break;
-
-            case vpRelPath:
-            case vpUNCPath:
-            case vpFullPath:
-                sep = string_rchr ( start, path . size, '/' );
-                if ( sep != NULL )
-                    start = sep + 1;
-                break;
-
-            default:
-                rc = RC ( rcVFS, rcPath, rcConstructing, rcParam, rcIncorrect );
-            }
-
-            /* strip off known extensions */
-            while ( 1 )
-            {
-                sep = string_rchr ( start, end - start, '.' );
-                if ( sep == NULL )
-                    break;
-
-                switch ( end - sep )
-                {
-                case 4:
-                    if ( strcase_cmp ( ".sra", 4, sep, 4, 4 ) == 0 ||
-                         strcase_cmp ( ".wgs", 4, sep, 4, 4 ) == 0 )
-                        end = sep;
-                    {
-                        end = sep;
-                        continue;
-                    }
-                case 9:
-                    if ( strcase_cmp ( ".vdbcache", 9, sep, 9, 9 ) == 0 ||
-                         strcase_cmp ( ".ncbi_enc", 9, sep, 9, 9 ) == 0 )
-                    {
-                        end = sep;
-                        continue;
-                    }
-                    break;
-                }
-                break;
-            }
-
-            /* create a new VPath */
-            rc = VPathMakeFromText ( acc_or_oid, "%.*s", ( uint32_t ) ( end - start ), start );
-            if ( rc == 0 )
-            {
-                const VPath * vpath = * acc_or_oid;
-                if ( VPathIsAccessionOrOID ( vpath ) )
-                    return 0;
-
-                VPathRelease ( vpath );
-
-                rc = RC ( rcVFS, rcPath, rcConstructing, rcParam, rcIncorrect );
-            }
-        }
-
-        * acc_or_oid = NULL;
-    }
-
-    return rc;
-}
-
-
-
-/* AddRef
- * Release
- *  ignores NULL references
- */
-LIB_EXPORT rc_t CC VPathAddRef ( const VPath *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "VPath" ) )
-        {
-        case krefLimit:
-            return RC ( rcVFS, rcPath, rcAttaching, rcRange, rcExcessive );
-        }
-    }
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VPathRelease ( const VPath *self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "VPath" ) )
-        {
-        case krefWhack:
-            VPathWhack ( ( VPath* ) self );
-            break;
-        case krefNegative:
-            return RC ( rcVFS, rcPath, rcReleasing, rcRange, rcExcessive );
-        }
-    }
-
-    return 0;
-}
-
-
-/* IsAcessionOrOID
- *  asks if the path pattern could possibly be an accession or oid
- */
-LIB_EXPORT bool CC VPathIsAccessionOrOID ( const VPath * self )
-{
-    if ( self != NULL )
-    {
-        switch ( self -> path_type )
-        {
-        case vpOID:
-        case vpAccession:
-        case vpNameOrOID:
-        case vpNameOrAccession:
-            return true;
-        }
-    }
-    return false;
-}
-
-
-/* IsFSCompatible
- *  asks if the path can be used with the OS' filesystems
- */
-LIB_EXPORT bool CC VPathIsFSCompatible ( const VPath * self )
-{
-    if ( self != NULL )
-    {
-        switch ( self -> path_type )
-        {
-        case vpNameOrAccession:
-        case vpName:
-        case vpRelPath:
-        case vpUNCPath:
-        case vpFullPath:
-            return true;
-        }
-    }
-    return false;
-}
-
-
-/* FromUri
- *  asks if the path was created from a formal URI
- */
-LIB_EXPORT bool CC VPathFromUri ( const VPath * self )
-{
-    if ( self != NULL )
-        return self -> from_uri;
-    return false;
-}
-
-
-/* Read*
- *  read the various parts
- *  copies out data into user-supplied buffer
- */
-static
-rc_t VPathSetInvalidReturn ( rc_t rc,
-    char * buffer, size_t buffer_size, size_t * num_read )
-{
-    if ( num_read != NULL )
-        * num_read = 0;
-    if ( buffer != NULL && buffer_size != 0 )
-        buffer [ 0 ] = 0;
-    return rc;
-}
-
-static
-rc_t VPathReadTestSelf ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVFS, rcPath, rcReading, rcSelf, rcNull );
-    else if ( self -> path_type == vpInvalid )
-        rc = RC ( rcVFS, rcPath, rcReading, rcSelf, rcInvalid );
-    else
-        return 0;
-
-    return VPathSetInvalidReturn ( rc, buffer, buffer_size, num_read );
-}
-
-static
-rc_t VPathReadMember ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read,
-    const String * mbr, uint32_t idx )
-{
-    rc_t rc = VPathReadTestSelf ( self, buffer, buffer_size, num_read );
-    if ( rc == 0 )
-        rc = string_printf ( buffer, buffer_size, num_read, "%:*-$S", idx, mbr );
-    return rc;
-}
-
-static
-rc_t VPathGetSchemeInt ( const VPath * self, String * scheme )
-{
-    if ( self -> scheme . size != 0 )
-        * scheme = self -> scheme;
-
-    else switch ( self -> path_type )
-    {
-    case vpOID:
-        CONST_STRING ( scheme, "ncbi-obj" );
-        break;
-    case vpAccession:
-        CONST_STRING ( scheme, "ncbi-acc" );
-        break;
-    case vpNameOrOID:
-    case vpNameOrAccession:
-    case vpName:
-    case vpRelPath:
-    case vpFullPath:
-        if ( self -> query . size != 0 || self -> fragment . size != 0 )
-            CONST_STRING ( scheme, "ncbi-file" );
-        else
-            CONST_STRING ( scheme, "file" );
-        break;
-    case vpUNCPath:
-        CONST_STRING ( scheme, "ncbi-file" );
-        break;
-    default:
-        return RC ( rcVFS, rcPath, rcReading, rcType, rcIncorrect );
-    }
-
-    return 0;
-}
-
-static
-rc_t VPathReadSchemeInt ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read,
-    const char * suffix, bool * fail )
-{
-    String scheme;
-    rc_t rc = VPathGetSchemeInt ( self, & scheme );
-    if ( rc != 0 )
-    {
-        * fail = true;
-        return rc;
-    }
-    return string_printf ( buffer, buffer_size, num_read, "%S%s", & scheme, suffix );
-}
-
-static
-rc_t VPathReadAuthInt ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read,
-    const char * prefix )
-{
-    rc_t rc = 0;
-
-    if ( self -> auth . size == 0 )
-        * num_read = 0;
-    else
-    {
-        rc = string_printf ( buffer, buffer_size, num_read,
-                             "%s%S", prefix, & self -> auth );
-    }
-
-    return rc;
-}
-
-static
-rc_t VPathReadHostInt ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read,
-    const char * prefix )
-{
-    rc_t rc = 0;
-    const char * lbrack, * rbrack;
-
-    switch ( self -> host_type )
-    {
-    case vhDNSName:
-
-        rc = string_printf ( buffer, buffer_size, num_read,
-                             "%s%S", prefix, & self -> host );
-        break;
-
-    case vhIPv4:
-
-        rc = string_printf ( buffer, buffer_size, num_read
-                             , "%s%u.%u.%u.%u"
-                             , prefix
-                             , ( self -> ipv4 >> 24 ) & 0xFF
-                             , ( self -> ipv4 >> 16 ) & 0xFF
-                             , ( self -> ipv4 >>  8 ) & 0xFF
-                             , ( self -> ipv4 >>  0 ) & 0xFF
-            );
-        break;
-
-    case vhIPv6:
-
-        lbrack = rbrack = "";
-        if ( prefix [ 0 ] != 0 )
-        {
-            lbrack = "[";
-            rbrack = "]";
-        }
-
-        rc = string_printf ( buffer, buffer_size, num_read
-                             , "%s%s%u:%u:%u:%u:%u:%u:%u:%u%s"
-                             , prefix
-                             , lbrack
-                             , self -> ipv6 [ 0 ]
-                             , self -> ipv6 [ 1 ]
-                             , self -> ipv6 [ 2 ]
-                             , self -> ipv6 [ 3 ]
-                             , self -> ipv6 [ 4 ]
-                             , self -> ipv6 [ 5 ]
-                             , self -> ipv6 [ 6 ]
-                             , self -> ipv6 [ 7 ]
-                             , rbrack
-            );
-        break;
-    }
-
-    return rc;
-}
-
-static
-rc_t VPathReadPathInt ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read )
-{
-    rc_t rc;
-
-    /* print remainder */
-    switch ( self -> path_type )
-    {
-    case vpOID:
-            
-        rc = string_printf ( buffer, buffer_size, num_read
-                             , "%u"
-                             , self -> obj_id
-            );
-        break;
-
-    case vpAccession:
-    case vpNameOrOID:
-    case vpNameOrAccession:
-    case vpName:
-    case vpRelPath:
-    case vpUNCPath:
-    case vpFullPath:
-
-        assert ( self -> path . size != 0 );
-        rc = string_printf ( buffer, buffer_size, num_read
-                             , "%S"
-                             , & self -> path
-            );
-        break;
-
-    default:
-
-        if ( num_read != NULL )
-            * num_read = 0;
-
-        rc = 0;
-    }
-
-    return rc;
-}
-
-static
-rc_t VPathReadUriInt ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * total_read )
-{
-    rc_t rc;
-    const char * host_prefix;
-    size_t total, num_read, avail;
-    bool has_auth, has_host, fail = false;
-
-    /* print scheme plus preparation for host */
-    rc = VPathReadSchemeInt ( self, buffer, buffer_size, & num_read, ":", & fail );
-    if ( fail )
-        return VPathSetInvalidReturn ( rc, buffer, buffer_size, total_read );
-    total = num_read;
-    avail = ( rc == 0 ) ? buffer_size - total : 0;
-
-    /* print auth */
-    host_prefix = "//";
-    rc = VPathReadAuthInt ( self, & buffer [ total ], avail, & num_read, host_prefix );
-    total += num_read;
-    avail -= ( rc == 0 ) ? num_read : 0;
-    has_auth = num_read > 2;
-    if ( has_auth )
-        host_prefix = "@";
-
-    /* print host */
-    rc = VPathReadHostInt ( self, & buffer [ total ], avail, & num_read, host_prefix );
-    total += num_read;
-    avail -= ( rc == 0 ) ? num_read : 0;
-    has_host = num_read > ( 2U - has_auth );
-
-    /* print port */
-    if ( has_host )
-    {
-        if ( self -> portname . size != 0 )
-            rc = string_printf ( & buffer [ total ], avail, & num_read, ":%S", & self -> portname );
-        else if ( self -> portnum != 0 )
-            rc = string_printf ( & buffer [ total ], avail, & num_read, ":%u", self -> portnum );
-        else if ( self -> missing_port )
-            rc = string_printf ( & buffer [ total ], avail, & num_read, ":" );
-        else
-            num_read = 0;
-
-        total += num_read;
-        avail -= ( rc == 0 ) ? num_read : 0;
-    }
-
-    /* sanity check */
-    assert ( ! has_auth || has_host );
-    assert ( self -> path . size == 0 || self -> path . addr [ 0 ] == '/' || ! has_host );
-    assert ( self -> query . size == 0 || self -> query . addr [ 0 ] == '?' );
-    assert ( self -> fragment . size == 0 || self -> fragment . addr [ 0 ] == '#' );
-
-    /* print remainder */
-    switch ( self -> path_type )
-    {
-    case vpOID:
-
-        if ( ! has_host )
-        {
-            /* correct for empty host spec */
-            total -= 2;
-            avail += 2;
-        }
-
-        rc = string_printf ( & buffer [ total ], avail, & num_read
-                             , "%s%u%S%S"
-                             , has_host ? "/" : ""
-                             , self -> obj_id
-                             , & self -> query
-                             , & self -> fragment
-            );
-        break;
-
-    case vpAccession:
-    case vpNameOrOID:
-    case vpNameOrAccession:
-    case vpName:
-    case vpRelPath:
-    case vpUNCPath:
-
-        assert ( ! has_host );
-
-        /* correct for empty host spec */
-        total -= 2;
-        avail += 2;
-
-        /* no break */
-
-    case vpFullPath:
-
-        assert ( self -> path . size != 0 );
-        rc = string_printf ( & buffer [ total ], avail, & num_read
-                             , "%S%S%S"
-                             , & self -> path
-                             , & self -> query
-                             , & self -> fragment
-            );
-        break;
-    }
-
-    if ( total_read != NULL )
-        * total_read = total + num_read;
-
-    if ( rc != 0 && buffer != NULL && buffer_size != 0 )
-        buffer [ 0 ] = 0;
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VPathReadUri ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read )
-{
-    rc_t rc = VPathReadTestSelf ( self, buffer, buffer_size, num_read );
-    if ( rc == 0 )
-        rc = VPathReadUriInt ( self, buffer, buffer_size, num_read );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VPathReadScheme ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read )
-{
-    rc_t rc = VPathReadTestSelf ( self, buffer, buffer_size, num_read );
-    if ( rc == 0 )
-    {
-        bool fail = false;
-        rc = VPathReadSchemeInt ( self, buffer, buffer_size, num_read, "", & fail );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VPathReadAuth ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read )
-{
-    rc_t rc = VPathReadTestSelf ( self, buffer, buffer_size, num_read );
-    if ( rc == 0 )
-        rc = VPathReadAuthInt ( self, buffer, buffer_size, num_read, "" );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VPathReadHost ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read )
-{
-    rc_t rc = VPathReadTestSelf ( self, buffer, buffer_size, num_read );
-    if ( rc == 0 )
-        rc = VPathReadHostInt ( self, buffer, buffer_size, num_read, "" );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VPathReadPortName ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read )
-{
-    return VPathReadMember ( self,
-        buffer, buffer_size, num_read,
-        & self -> portname, 0 );
-}
-
-LIB_EXPORT rc_t CC VPathReadPath ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read )
-{
-    rc_t rc = VPathReadTestSelf ( self, buffer, buffer_size, num_read );
-    if ( rc == 0 )
-        rc = VPathReadPathInt ( self, buffer, buffer_size, num_read );
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VPathReadQuery ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read )
-{
-    return VPathReadMember ( self,
-        buffer, buffer_size, num_read,
-        & self -> query, 1 );
-}
-
-static
-rc_t VPathFindParam ( const VPath * self, const char * param, String * val_str )
-{
-    rc_t rc;
-
-    if ( param == NULL )
-        rc = RC ( rcVFS, rcPath, rcReading, rcParam, rcNull );
-    else if ( param [ 0 ] == 0 )
-        rc = RC ( rcVFS, rcPath, rcReading, rcParam, rcEmpty );
-    else
-    {
-        size_t qsize = string_size ( param );
-        const char * start = self -> query . addr;
-        const char * end = start + self -> query . size;
-        if ( ++ start < end ) while ( 1 )
-        {
-            /* match as many characters as possible of param name */
-            uint32_t matching = strcase_match ( start, end - start, param, qsize, -1, NULL );
-            start += matching;
-
-            if ( ( size_t ) matching == qsize )
-            {
-                /* may have found the parameter */
-                if ( start == end || start [ 0 ] == '&' )
-                {
-                    /* no value */
-                    StringInit ( val_str, "", 0, 0 );
-                    return 0;
-                }
-
-                if ( start [ 0 ] == '=' )
-                {
-                    /* have value */
-                    const char * val = start + 1;
-                    const char * pend = string_chr ( val, end - val, '&' );
-                    if ( pend == NULL )
-                        pend = end;
-                    StringInit ( val_str, val, pend - val, string_len ( val, pend - val ) );
-                    return 0;
-                }
-            }
-
-            /* find next parameter */
-            start = string_chr ( start, end - start, '&' );
-            if ( start == NULL )
-                break;
-
-            /* skip separator */
-            ++ start;
-        }
-
-        rc = SILENT_RC ( rcVFS, rcPath, rcReading, rcParam, rcNotFound );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VPathReadParam ( const VPath * self, const char * param,
-    char * buffer, size_t buffer_size, size_t * num_read )
-{
-    rc_t rc = VPathReadTestSelf ( self, buffer, buffer_size, num_read );
-    if ( rc == 0 )
-    {
-        String val_str;
-        rc = VPathFindParam ( self, param, & val_str );
-        if ( rc == 0 )
-        {
-            /* copy out value */
-            return string_printf ( buffer, buffer_size, num_read
-                                   , "%S"
-                                   , & val_str
-                );
-        }
-
-        VPathSetInvalidReturn ( rc, buffer, buffer_size, num_read );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VPathReadFragment ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read )
-{
-    return VPathReadMember ( self,
-        buffer, buffer_size, num_read,
-        & self -> fragment, 1 );
-}
-
-
-/* MakeUri
- *  convert a VPath into a Uri
- */
-LIB_EXPORT rc_t CC VPathMakeUri ( const VPath * self, const String ** uri )
-{
-    rc_t rc;
-
-    if ( uri == NULL )
-        rc = RC ( rcVFS, rcPath, rcAccessing, rcParam, rcNull );
-    else
-    {
-        /* TBD - if we build the path from a URI, we should just
-           grab the text from buffer */
-        size_t bytes;
-        char buffer [ 8192 ];
-        rc = VPathReadUri ( self, buffer, sizeof buffer, & bytes );
-        if ( rc == 0 )
-        {
-            String uri_str;
-            StringInit ( & uri_str, buffer, bytes, string_len ( buffer, bytes ) );
-            return StringCopy ( uri, & uri_str );
-        }
-
-        /* TBD - if we ever have huge URIs, 8K can be insufficient */
-        * uri = NULL;
-    }
-    return rc;
-}
-
-
-/* MakeSysPath
- *  convert a VPath into an OS-specific path string
- */
-LIB_EXPORT rc_t CC VPathMakeSysPath ( const VPath * self, const String ** sys_path )
-{
-    rc_t rc;
-
-    if ( sys_path == NULL )
-        rc = RC ( rcVFS, rcPath, rcAccessing, rcParam, rcNull );
-    else
-    {
-        size_t bytes;
-        char buffer [ 8192 ];
-        rc = VPathReadSysPath ( self, buffer, sizeof buffer, & bytes );
-        if ( rc == 0 )
-        {
-            String sys_str;
-            StringInit ( & sys_str, buffer, bytes, string_len ( buffer, bytes ) );
-            return StringCopy ( sys_path, & sys_str );
-        }
-
-        * sys_path = NULL;
-    }
-    return rc;
-}
-
-
-/* MakeString
- *  convert a VPath into a String
- *  respects original source of path,
- *  i.e. does not add scheme unnecessarily
- */
-LIB_EXPORT rc_t CC VPathMakeString ( const VPath * self, const String ** str )
-{
-    rc_t rc;
-
-    if ( str == NULL )
-        rc = RC ( rcVFS, rcPath, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVFS, rcPath, rcAccessing, rcSelf, rcNull );
-        else
-        {
-            size_t bytes, host;
-            char buffer [ 8192 ];
-
-            if ( self -> from_uri || self -> query . size != 0 || self -> fragment . size != 0 )
-                rc = VPathReadUriInt ( self, buffer, sizeof buffer, & bytes );
-            else switch ( self -> path_type )
-            {
-            case vpHostName:
-                rc = VPathReadHostInt ( self, buffer, sizeof buffer, & bytes, "" );
-                break;
-
-            case vpEndpoint:
-                rc = VPathReadHostInt ( self, buffer, sizeof buffer, & host, "" );
-                if ( rc == 0 )
-                {
-                    if ( self -> portname . size != 0 )
-                    {
-                        rc = string_printf ( & buffer [ host ], sizeof buffer - host,
-                            & bytes, ":%S", & self -> portname );
-                    }
-                    else
-                    {
-                        rc = string_printf ( & buffer [ host ], sizeof buffer - host,
-                            & bytes, ":%u", & self -> portnum );
-                    }
-
-                    bytes += host;
-                }
-                break;
-
-            default:
-                rc = VPathReadPathInt ( self, buffer, sizeof buffer, & bytes );
-            }
-
-            if ( rc == 0 )
-            {
-                String local_str;
-                StringInit ( & local_str, buffer, bytes, string_len ( buffer, bytes ) );
-                return StringCopy ( str, & local_str );
-            }
-        }
-
-        * str = NULL;
-    }
-    return rc;
-}
-
-
-/* Get*
- *  retrieves internal parts
- *  returns pointers to internal String data
- *  Strings remain valid while "self" is valid
- */
-static
-rc_t VPathGetTestSelf ( const VPath * self )
-{
-    if ( self == NULL )
-        return RC ( rcVFS, rcPath, rcAccessing, rcSelf, rcNull );
-    if ( self -> path_type == vpInvalid )
-        return RC ( rcVFS, rcPath, rcAccessing, rcSelf, rcInvalid );
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VPathGetScheme ( const VPath * self, String * str )
-{
-    rc_t rc;
-
-    if ( str == NULL )
-        rc = RC ( rcVFS, rcPath, rcAccessing, rcParam, rcNull );
-    else
-    {
-        rc = VPathGetTestSelf ( self );
-        if ( rc == 0 )
-        {
-            /* work harder to fill out a scheme if not there */
-            rc = VPathGetSchemeInt ( self, str );
-            if ( rc == 0 )
-                return 0;
-
-            /* if the path can't have a scheme, it's okay */
-            rc = 0;
-        }
-
-        StringInit ( str, "", 0, 0 );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VPathGetAuth ( const VPath * self, String * str )
-{
-    rc_t rc;
-
-    if ( str == NULL )
-        rc = RC ( rcVFS, rcPath, rcAccessing, rcParam, rcNull );
-    else
-    {
-        rc = VPathGetTestSelf ( self );
-        if ( rc == 0 )
-        {
-            * str = self -> auth;
-            return 0;
-        }
-
-        StringInit ( str, "", 0, 0 );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VPathGetHost ( const VPath * self, String * str )
-{
-    rc_t rc;
-
-    if ( str == NULL )
-        rc = RC ( rcVFS, rcPath, rcAccessing, rcParam, rcNull );
-    else
-    {
-        rc = VPathGetTestSelf ( self );
-        if ( rc == 0 )
-        {
-            * str = self -> host;
-            return 0;
-        }
-
-        StringInit ( str, "", 0, 0 );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VPathGetPortName ( const VPath * self, String * str )
-{
-    rc_t rc;
-
-    if ( str == NULL )
-        rc = RC ( rcVFS, rcPath, rcAccessing, rcParam, rcNull );
-    else
-    {
-        rc = VPathGetTestSelf ( self );
-        if ( rc == 0 )
-        {
-            * str = self -> portname;
-            return 0;
-        }
-
-        StringInit ( str, "", 0, 0 );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT uint16_t CC VPathGetPortNum ( const VPath * self )
-{
-    rc_t rc = VPathGetTestSelf ( self );
-    if ( rc == 0 )
-        return self -> portnum;
-
-    return 0;
-}
-
-LIB_EXPORT rc_t CC VPathGetPath ( const VPath * self, String * str )
-{
-    rc_t rc;
-
-    if ( str == NULL )
-        rc = RC ( rcVFS, rcPath, rcAccessing, rcParam, rcNull );
-    else
-    {
-        rc = VPathGetTestSelf ( self );
-        if ( rc == 0 )
-        {
-            * str = self -> path;
-            return 0;
-        }
-
-        StringInit ( str, "", 0, 0 );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VPathGetQuery ( const VPath * self, String * str )
-{
-    rc_t rc;
-
-    if ( str == NULL )
-        rc = RC ( rcVFS, rcPath, rcAccessing, rcParam, rcNull );
-    else
-    {
-        rc = VPathGetTestSelf ( self );
-        if ( rc == 0 )
-        {
-            StringSubstr ( & self -> query, str, 1, 0 );
-            return 0;
-        }
-
-        StringInit ( str, "", 0, 0 );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VPathGetParam ( const VPath * self, const char * param, String * str )
-{
-    rc_t rc;
-
-    if ( str == NULL )
-        rc = RC ( rcVFS, rcPath, rcAccessing, rcParam, rcNull );
-    else
-    {
-        rc = VPathGetTestSelf ( self );
-        if ( rc == 0 )
-        {
-            rc = VPathFindParam ( self, param, str );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        StringInit ( str, "", 0, 0 );
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VPathGetFragment ( const VPath * self, String * str )
-{
-    rc_t rc;
-
-    if ( str == NULL )
-        rc = RC ( rcVFS, rcPath, rcAccessing, rcParam, rcNull );
-    else
-    {
-        rc = VPathGetTestSelf ( self );
-        if ( rc == 0 )
-        {
-            /* returning a NULL String when there is no fragment */
-            StringInit ( str, NULL, 0, 0 );
-
-            StringSubstr ( & self -> fragment, str, 1, 0 );
-            return 0;
-        }
-
-        StringInit ( str, "", 0, 0 );
-    }
-
-    return rc;
-}
-
-/* TEMPORARY */
-LIB_EXPORT uint32_t CC VPathGetOid ( const VPath * self )
-{
-    if ( self != NULL )
-        return self -> obj_id;
-    return 0;
-}
-
-
-/* MarkHighReliability
- *  mark a path as representing either a reliable URL
- *  or one where the reliability is unknown.
- *
- *  a highly-reliable URL is one that should be expected
- *  to work. this property makes errors more suspicious,
- *  and more likely to be temporary, leading to harder work
- *  within the networking module.
- *
- *  "high_reliability" [ IN ] - set to true for high reliability
- */
-LIB_EXPORT rc_t CC VPathMarkHighReliability ( VPath * self, bool high_reliability )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVFS, rcPath, rcUpdating, rcSelf, rcNull );
-    else
-    {
-        self -> highly_reliable = high_reliability;
-        rc = 0;
-    }
-    return rc;
-}
-
-/* IsHighlyReliable
- *  returns "true" if the path represents a high-reliability URL
- */
-LIB_EXPORT bool CC VPathIsHighlyReliable ( const VPath * self )
-{
-    return self != NULL && self -> highly_reliable;
-}
-
-
-/*--------------------------------------------------------------------------
- * VFSManager
- */
-
-
-/* MakePath
- *  make a path object from a string conforming to
- *  either a standard POSIX path or a URI
- *
- *  "new_path" [ OUT ] - return parameter for new path object
- *
- *  "path_str" [ IN ] - a UTF-8 NUL-terminated string
- *  representing a POSIX path or URI, or
- *  a string_printf compatible format string
- *
- *  "path_fmt" [ IN ] and "args" [ IN ] - a UTF-8 NUL-terminated fmt string
- *  compatible with string_vprintf, plus argument list
- */
-LIB_EXPORT rc_t CC VFSManagerVMakePath ( const VFSManager * self,
-    VPath ** new_path, const char * path_fmt, va_list args )
-{
-    rc_t rc;
-
-    if ( new_path == NULL )
-        rc = RC ( rcVFS, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVFS, rcMgr, rcConstructing, rcSelf, rcNull );
-        else if ( path_fmt == NULL )
-            rc = RC ( rcVFS, rcMgr, rcConstructing, rcPath, rcNull );
-        else if ( path_fmt [ 0 ] == 0 )
-            rc = RC ( rcVFS, rcMgr, rcConstructing, rcPath, rcEmpty );
-        else
-        {
-            rc = VPathMakeFromVText ( new_path, path_fmt, args );
-            if ( rc == 0 )
-            {
-                VPath * path = * new_path;
-
-                if ( ! path -> from_uri )
-                {
-                    String scheme;
-                    rc = VPathGetSchemeInt ( path, & scheme );
-                    if ( rc == 0 )
-                        path -> scheme = scheme;
-                }
-
-                return 0;
-            }
-        }
-
-        * new_path = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VFSManagerMakePath ( const VFSManager * self,
-    VPath ** new_path, const char * path_str, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, path_str );
-
-    rc = VFSManagerVMakePath ( self, new_path, path_str, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-/* MakeAccPath - TEMPORARY
- *  takes a textual accession representation
- *  creates a VPath representing an accession
- *
- *  "new_path" [ OUT ] - return parameter for new path object
- *
- *  "acc" [ IN ] - a NUL-terminated ASCII fmt string
- */
-LIB_EXPORT rc_t CC VFSManagerVMakeAccPath ( const VFSManager * self,
-    VPath ** new_path, const char * fmt, va_list args )
-{
-    rc_t rc = VFSManagerVMakePath ( self, new_path, fmt, args );
-    if ( rc == 0 )
-    {
-        VPath * path = * new_path;
-        switch ( path -> path_type )
-        {
-        case vpAccession:
-            break;
-        case vpNameOrAccession:
-            path -> path_type = vpAccession;
-            break;
-        default:
-            VPathRelease ( path );
-            * new_path = NULL;
-            return RC ( rcVFS, rcMgr, rcConstructing, rcToken, rcIncorrect );
-        }
-
-        if ( path -> scheme . size == 0 )
-            VPathCaptureScheme ( path, "ncbi-acc", 0, 8 );
-    }
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VFSManagerMakeAccPath ( const VFSManager * self,
-    VPath ** new_path, const char * acc, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, acc );
-
-    rc = VFSManagerVMakeAccPath ( self, new_path, acc, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-
-/* MakeOidPath - TEMPORARY
- *  takes an integer oid
- *  creates a VPath representing an obj-id
- *
- *  "new_path" [ OUT ] - return parameter for new path object
- *
- *  "oid" [ IN ] - a non-zero object id
- */
-LIB_EXPORT rc_t CC VFSManagerMakeOidPath ( const VFSManager * self,
-    VPath ** new_path, uint32_t oid )
-{
-    char oid_str [ 32 ];
-    rc_t rc = string_printf ( oid_str, sizeof oid_str, NULL, "%u", oid );
-    assert ( rc == 0 );
-
-    rc = VFSManagerMakePath ( self, new_path, "%s", oid_str );
-    if ( rc == 0 )
-    {
-        VPath * path = * new_path;
-        switch ( path -> path_type )
-        {
-        case vpInvalid:
-        case vpNameOrAccession:
-        case vpName:
-            break;
-        default:
-            VPathRelease ( path );
-            * new_path = NULL;
-            return RC ( rcVFS, rcMgr, rcConstructing, rcToken, rcIncorrect );
-        }
-
-        VPathCaptureScheme ( path, "ncbi-obj", 0, 8 );
-        path -> obj_id = oid;
-        path -> path_type = vpOID;
-    }
-    return rc;
-}
-
-
-/* ==========================================
-             HACK O' MATIC
- */
-
-#include <vfs/path-priv.h>
-#include <vfs/manager-priv.h>
-#include <kfs/directory.h>
-
-/* MakeDirectoryRelative
- *  apparently the idea was to interpret "posix_path" against
- *  "dir" to come up with a stand-alone path that could be used
- *  without "dir" in the future. this is a total misunderstanding
- *  of the filesystem.
- *
- *  the old code would call create system path from the posix_path,
- *  which seems to make little sense on Windows... then it would
- *  decide whether "posix_path" was standalone or directory relative.
- */
-static
-rc_t LegacyVPathResolveAccession ( VPath ** new_path, const VPath * path )
-{
-    rc_t rc;
-    VFSManager * mgr;
-
-    * new_path = NULL;
-
-    rc = VFSManagerMake ( & mgr );
-    if ( rc == 0 )
-    {
-        VResolver * resolver;
-        rc = VFSManagerGetResolver ( mgr, & resolver );
-        if ( rc == 0 )
-        {
-            rc = VResolverLocal ( resolver, path, ( const VPath** ) new_path );
-            if ( GetRCState ( rc ) == rcNotFound )
-                rc = VResolverRemote ( resolver, eProtocolHttp, path, ( const VPath** ) new_path );
-
-            VResolverRelease ( resolver );
-        }
-
-        VFSManagerRelease ( mgr );
-    }
-
-    return rc;
-}
-
-static
-rc_t LegacyVPathMakeKDirRelative ( VPath ** new_path, const KDirectory * dir, const VPath * path )
-{
-    /* resolve the provided path against directory */
-    char resolved [ 4096 ];
-    rc_t rc = KDirectoryResolvePath ( dir, true, resolved, sizeof resolved,
-        "%.*s", ( uint32_t ) path -> path . size, path -> path . addr );
-    if ( rc == 0 )
-    {
-        /* re-evaluate, adding in any query and fragment */
-        rc = VPathMakeFromText ( new_path, "%s%S%S", resolved, & path -> query, & path -> fragment );
-        if ( rc == 0 )
-        {
-            VPath * relpath = * new_path;
-
-            /* reassess the scheme */
-            String scheme;
-            rc = VPathGetSchemeInt ( relpath, & scheme );
-            if ( rc == 0 )
-                relpath -> scheme = scheme;
-
-            return 0;
-        }
-    }
-
-    * new_path = NULL;
-    return rc;
-}
-
-LIB_EXPORT rc_t CC LegacyVPathMakeDirectoryRelative ( VPath ** new_path,
-    const KDirectory * dir, const char * posix_path )
-{
-    rc_t rc;
-
-    if ( new_path == NULL )
-        rc = RC ( rcVFS, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( dir == NULL )
-            rc = RC ( rcVFS, rcMgr, rcResolving, rcDirectory, rcNull );
-        else
-        {
-            /* first, try to get a VPath from "posix_path" */
-            rc = LegacyVPathMakeFmt ( new_path, posix_path );
-            if ( rc == 0 )
-            {
-                VPath * path = * new_path;
-
-                /* now try to interpret the thing */
-                if ( path -> from_uri )
-                {
-                    /* look at scheme */
-                    switch ( LegacyVPathGetUri_t ( path ) )
-                    {
-                    case vpuri_ncbi_acc:
-                    case vpuri_ncbi_obj:
-                    case vpuri_ncbi_legrefseq:
-                        /* try to resolve using VResolver */
-                        rc = LegacyVPathResolveAccession ( new_path, path );
-                        break;
-
-                    case vpuri_ncbi_vfs:
-                    case vpuri_file:
-                        /* test for full path */
-                        if ( path -> path_type == vpFullPath || path -> path_type == vpUNCPath )
-                            return 0;
-
-                        /* interpret relative to given directory */
-                        rc = LegacyVPathMakeKDirRelative ( new_path, dir, path );
-                        break;
-
-                    case vpuri_http:
-                    case vpuri_ftp:
-                    case vpuri_fasp:
-                        /* calling code would know how to handle these */
-                        return 0;
-
-                    default:
-                        /* while apparently valid URIs, callers would not know */
-                        * new_path = NULL;
-                    }
-                }
-
-                else
-                {
-                    /* look at deduced path type */
-                    switch ( path -> path_type )
-                    {
-                    case vpOID:
-                    case vpAccession: /* this is not expected not be set... */
-                    case vpNameOrOID:
-                    case vpNameOrAccession:
-                        /* try to resolve using VResolver */
-                        rc = LegacyVPathResolveAccession ( new_path, path );
-                        if ( rc == 0 )
-                            break;
-
-                        /* no break */
-
-                    case vpName:
-                    case vpRelPath:
-                        rc = LegacyVPathMakeKDirRelative ( new_path, dir, path );
-                        break;
-
-                    case vpUNCPath:
-                    case vpFullPath:
-                        return 0;
-
-                    default:
-                        * new_path = NULL;
-                    }
-                }
-
-                /* clean up path */
-                assert ( * new_path != path );
-                VPathRelease ( path );
-                return rc;
-            }
-        }
-
-        * new_path = NULL;
-    }
-
-    return rc;
-}
-
-
-/* Option
- *  rc == 0 if the option has been specified
- *  for options with a parameter, the value of the parameter is copied to buffer
- */
-LIB_EXPORT rc_t CC VPathOption ( const VPath * self, VPOption_t option,
-    char * buffer, size_t buffer_size, size_t * num_read )
-{
-    rc_t rc = VPathReadTestSelf ( self, buffer, buffer_size, num_read );
-    if ( rc == 0 )
-    {
-        const char * param1, * param2 = NULL;
-
-        switch ( option )
-        {
-        case vpopt_encrypted:
-            param1 = "enc";
-            param2 = "encrypt";
-            break;
-        case vpopt_pwpath:
-            param1 = "pwfile";
-            break;
-        case vpopt_pwfd:
-            param1 = "pwfile";
-            break;
-        case vpopt_readgroup:
-            param1 = "readgroup";
-            break;
-#if 0            
-        case vpopt_temporary_pw_hack:
-            param1 = "temporary_pw_hack";
-            break;
-#endif            
-        case vpopt_vdb_ctx:
-            param1 = "vdb-ctx";
-            break;
-        case vpopt_gap_ticket: 
-            param1 = "tic";
-            break;
-        default:
-            return RC ( rcVFS, rcPath, rcReading, rcToken, rcUnrecognized );
-        }
-
-        rc = VPathReadParam ( self, param1, buffer, buffer_size, num_read );
-        if ( param2 != NULL && GetRCState ( rc ) == rcNotFound )
-            rc = VPathReadParam ( self, param2, buffer, buffer_size, num_read );
-    }
-    return rc;
-}
-
-
-LIB_EXPORT rc_t LegacyVPathMake ( VPath ** new_path, const char * posix_path )
-{
-    return LegacyVPathMakeFmt ( new_path, posix_path );
-}
-
-rc_t LegacyVPathMakeFmt ( VPath ** new_path, const char * fmt, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, fmt );
-
-    rc = LegacyVPathMakeVFmt ( new_path, fmt, args );
-
-    va_end ( args );
-
-    return rc;
-}
-
-rc_t LegacyVPathMakeVFmt ( VPath ** new_path, const char * fmt, va_list args )
-{
-    rc_t rc;
-
-    if ( new_path == NULL )
-        rc = RC ( rcVFS, rcPath, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( fmt == NULL )
-            rc = RC ( rcVFS, rcPath, rcConstructing, rcParam, rcNull );
-        else if ( fmt [ 0 ] == 0 )
-            rc = RC ( rcVFS, rcPath, rcConstructing, rcParam, rcEmpty );
-        else
-        {
-            rc = VPathMakeFromVText ( new_path, fmt, args );
-            if ( rc == 0 )
-            {
-                VPath * path = * new_path;
-
-                if ( ! path -> from_uri )
-                {
-                    String scheme;
-                    rc = VPathGetSchemeInt ( path, & scheme );
-                    if ( rc == 0 )
-                        path -> scheme = scheme;
-                }
-
-                return 0;
-            }
-        }
-
-        * new_path = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC LegacyVPathGetScheme_t ( const VPath * self, VPUri_t * uri_type )
-{
-    rc_t rc = 0;
-
-    if ( uri_type == NULL )
-        rc = RC ( rcVFS, rcPath, rcAccessing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVFS, rcPath, rcAccessing, rcSelf, rcNull );
-        else if ( self -> path_type != vpInvalid )
-        {
-            if ( ! self -> from_uri )
-            {
-                * uri_type = vpuri_none;
-                return 0;
-            }
-
-            * uri_type = self -> scheme_type;
-            return 0;
-        }
-
-        /* object was invalid */
-        * uri_type = vpuri_invalid;
-    }
-
-    return rc;
-}
-
-VPUri_t LegacyVPathGetUri_t ( const VPath * self )
-{
-    VPUri_t uri_type;
-    LegacyVPathGetScheme_t ( self, & uri_type );
-    return uri_type;
-}
diff --git a/libs/vfs/resolver-3.0.c b/libs/vfs/resolver-3.0.c
deleted file mode 100644
index 3ac3ff7..0000000
--- a/libs/vfs/resolver-3.0.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * =============================================================================
- */
-
-#include "path-priv.h" /* VPathMakeFmt */
-#include "resolver-priv.h" /* rcResolver */
-
-#include <klib/log.h> /* klogInt */
-#include <klib/rc.h> /* RC */
-#include <klib/text.h> /* string_chr */
-
-#include <vfs/path.h> /* VPathMakeFmt */
-
-static rc_t _GetAny(const rc_t *rc, const char **start,
-    const char *end, String *s, bool last)
-{
-    assert(rc && start);
-
-    if (*rc != 0) {
-        return *rc;
-    }
-
-    if (!last) {
-        const char *sep = string_chr ( *start, end - *start, '|' );
-        if ( sep == NULL ) {
-            return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-        }
-
-        StringInit(s, *start, sep - *start, ( uint32_t ) ( sep - *start ));
-
-        *start = sep + 1;
-    }
-    else {
-        const char *sep = NULL;
-        for ( sep = end; sep > *start; -- sep ) {
-            switch ( sep [ -1 ] ) {
-                case '\n':
-                case '\r':
-                    continue;
-                default:
-                    break;
-            }
-            break;
-        }
-
-        StringInit ( s, *start, sep - *start, ( uint32_t ) ( sep - *start ) );
-    }
-
-    return 0;
-}
-
-static rc_t _Get(const rc_t *rc, const char **start,
-    const char *end, String *s)
-{
-    return _GetAny(rc, start, end, s, false);
-}
-
-static rc_t _GetLast(const rc_t *rc, const char **start,
-    const char *end, String *s)
-{
-    return _GetAny(rc, start, end, s, true);
-}
-
-typedef enum {
-    eBadObjectType,
-    eDbgap,
-    eProvisional,
-    eSrapub, /* eSra_run, */
-    eSrapub_files,
-    eSragap, /* eSra_run, */
-    eSra_source,
-    eSra_addon,
-    eRefseq,
-    eWgs,
-    eNa,
-} EObjectType;
-EObjectType _StringToObjectType(const String *self) {
-    if (self->size == 0) {
-        return eBadObjectType;
-    }
-    else {
-        String dbgap;
-        String provisional;
-        String srapub;
-        String srapub_files;
-        String sragap;
-        String sra_source;
-        String sra_addon;
-        String refseq;
-        String wgs;
-        String na;
-        CONST_STRING(&dbgap, "dbgap");
-        CONST_STRING(&provisional, "provisional");
-        CONST_STRING(&srapub, "srapub");
-        CONST_STRING(&srapub_files, "srapub_files");
-        CONST_STRING(&sragap, "sragap");
-        CONST_STRING(&sra_source, "sra-source");
-        CONST_STRING(&sra_addon, "sra-addon");
-        CONST_STRING(&refseq, "refseq");
-        CONST_STRING(&wgs, "wgs");
-        CONST_STRING(&na, "na");
-        if (StringEqual(self, &dbgap)) {
-            return eDbgap;
-        }
-        else if (StringEqual(self, &provisional)) {
-            return eProvisional;
-        }
-        else if (StringEqual(self, &srapub)) {
-            return eSrapub;
-        }
-        else if (StringEqual(self, &srapub_files)) {
-            return eSrapub_files;
-        }
-        else if (StringEqual(self, &sragap)) {
-            return eSragap;
-        }
-        else if (StringEqual(self, &sra_source)) {
-            return eSra_source;
-        }
-        else if (StringEqual(self, &sra_addon)) {
-            return eSra_addon;
-        }
-        else if (StringEqual(self, &refseq)) {
-            return eRefseq;
-        }
-        else if (StringEqual(self, &wgs)) {
-            return eWgs;
-        }
-        else if (StringEqual(self, &na)) {
-            return eNa;
-        }
-        else {
-            return eBadObjectType;
-        }
-    }
-}
-
-static rc_t _ProcessCode(EObjectType objectType, const String *object_id,
-    const String *code, const String *download_ticket,
-    const String *url, const String *message, const VPath **path,
-    const VPath **mapping, const String *acc, const String *ticket)
-{
-    rc_t rc = 0;
-    KLogLevel lvl = 0;
-    uint32_t result_code = 0;
-    char *rslt_end = NULL;
-    assert(objectType && object_id && code && download_ticket && url);
-    if (code->size == 0)
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-    result_code = strtoul ( code -> addr, & rslt_end, 10 );
-    if ( ( const char* ) rslt_end - code -> addr != code -> size )
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-    switch ( result_code / 100 ) {
-        case 2: /* successful response but can only handle 200 */
-            if ( result_code == 200 ) { /* normal public response */
-                if (download_ticket->size == 0) {
-                    rc = VPathMakeFmt ( ( VPath** ) path, "%S", url );
-                }
-                else { /* protected response */
-                    rc = VPathMakeFmt
-                        ((VPath**) path, "%S?tic=%S", url, download_ticket);
-                }
-                if ( rc == 0 ) {
-                    rc = VPathCheckFromNamesCGI ( * path, ticket, mapping );
-                    if ( rc == 0 ) {
-                        if ( mapping == NULL )
-                            return 0;
-                        if (download_ticket->size != 0) {
-                            if (object_id->size != 0 && objectType == eSragap) {
-                                rc = VPathMakeFmt ( ( VPath** ) mapping,
-                                    "ncbi-acc:%S?tic=%S",
-                                    object_id, download_ticket);
-                            }
-                            else {
-                                if (object_id->size == 0)
-                                    return 0;
-                                else
-                                    rc = VPathMakeFmt ( ( VPath** ) mapping,
-                                        "ncbi-file:%S?tic=%S",
-                                        object_id, download_ticket);
-                            }
-                        }
-                        else if (object_id->size != 0 && objectType == eSrapub)
-                        {
-                            rc = VPathMakeFmt ( ( VPath** ) mapping,
-                                "ncbi-acc:%S", object_id );
-                        }
-                        else {
-                            if (object_id->size == 0)
-                                return 0;
-                            else
-                                rc = VPathMakeFmt ( ( VPath** ) mapping,
-                                    "ncbi-file:%S", object_id );
-                        }
-                        if ( rc == 0 )
-                            return 0;
-                    }
-                    VPathRelease ( * path );
-                    * path = NULL;
-                }
-                return rc;
-            }
-            lvl = klogInt;
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcError, rcUnexpected );
-            break;
-        case 4: /* client error */
-            lvl = klogErr;
-            switch (result_code) {
-                case 400:
-                    rc = RC(rcVFS, rcResolver, rcResolving,
-                        rcMessage, rcInvalid);
-                    break;
-                case 401:
-                case 403:
-                    rc = RC( rcVFS, rcResolver, rcResolving,
-                        rcQuery, rcUnauthorized);
-                    break;
-                case 404: /* 404|no data :
-           If it is a real response then this assession is not found.
-           What if it is a DB failure? Will be retried if configured to do so?*/
-                case 410:
-                    rc = RC( rcVFS, rcResolver, rcResolving,
-                        rcName, rcNotFound );
-                    break;
-                default:
-                    rc = RC(rcVFS, rcResolver, rcResolving,
-                        rcError, rcUnexpected);
-            }
-            break;
-        case 5: /* server error */
-            lvl = klogSys;
-            switch (result_code) {
-                case 503:
-                    rc = RC(rcVFS, rcResolver, rcResolving,
-                        rcDatabase, rcNotAvailable);
-                    break;
-                case 504:
-                    rc = RC(rcVFS, rcResolver, rcResolving,
-                        rcTimeout, rcExhausted);
-                    break;
-                default:
-                    rc = RC(rcVFS, rcResolver, rcResolving,
-                        rcError, rcUnexpected);
-            }
-            break;
-        case 1: /* informational response not much we can do here */
-        case 3: /* redirection:
-                        currently this is being handled by our request object */
-        default:
-            lvl = klogInt;
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcError, rcUnexpected );
-            break;
-    }
-    /* log message to user */
-    PLOGERR(lvl, (lvl, rc,
-        "failed to resolve accession '$(acc)' - $(msg) ( $(code) )",
-        "acc=%S,msg=%S,code=%u", acc, message, result_code));
-    return rc;
-}
-
-rc_t VResolverAlgParseResolverCGIResponse_3_0(const char *astart,
-    size_t asize, const VPath **path, const VPath **mapping,
-    const String *acc, const String *ticket)
-{
-    const char *start = astart;
-    const char *end = start + asize;
-    String object_type, object_id, size, date,
-        md5, download_ticket, url, code, message;
-    EObjectType objectType = eBadObjectType;
-    
-    rc_t rc = 0;
-    rc = _Get    (&rc, &start, end, &object_type);
-    rc = _Get    (&rc, &start, end, &object_id);
-    rc = _Get    (&rc, &start, end, &size);
-    rc = _Get    (&rc, &start, end, &date);
-    rc = _Get    (&rc, &start, end, &md5);
-    rc = _Get    (&rc, &start, end, &download_ticket);
-    rc = _Get    (&rc, &start, end, &url);
-    rc = _Get    (&rc, &start, end, &code);
-    rc = _GetLast(&rc, &start, end, &message);
-    if (rc != 0) {
-        return rc;
-    }
-
-    objectType = _StringToObjectType(&object_type);
-    if (objectType == eBadObjectType) {
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-    }
-
-    /* compare acc to accession or obj_id */
-    assert(acc);
-    if ( ! StringEqual ( & object_id, acc ) && objectType != eDbgap )
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-
-    /* compare ticket
-       currently this makes sense with 1 request from a known workspace */
-    if (download_ticket.size != 0) {
-        if ( ticket == NULL || ! StringEqual ( & download_ticket, ticket ) )
-            return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-    }
-
-    /* get the result code */
-    return _ProcessCode(objectType, &object_id, &code,
-        &download_ticket, &url, &message, path, mapping, acc, ticket);
-}
diff --git a/libs/vfs/resolver-priv.h b/libs/vfs/resolver-priv.h
deleted file mode 100644
index abd7f45..0000000
--- a/libs/vfs/resolver-priv.h
+++ /dev/null
@@ -1,241 +0,0 @@
-/*===========================================================================
-*
-*                            Public Domain Notice
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_resolver_priv_
-#define _h_resolver_priv_
-
-#ifndef _h_vfs_resolver_
-#include <vfs/resolver.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*--------------------------------------------------------------------------
- * KConfig Repository Structure
- *  expressed in pseudo BNF:
- *
- *  base-config
- *      = "repository" <category>*
- *      ;
- *
- *  category
- *      = "remote" <remote-sub-category>*
- *      | "site" <site-sub-category>*
- *      | "user" <user-sub-category>*
- *      ;
- *
- *  remote-sub-category
- *      = "main" <public-remote-named-repository>*
- *      | "aux" <public-remote-named-repository>*
- *      | "protected" <protected-remote-named-repository>*
- *      ;
- *
- *  site-sub-category
- *      = "main" <site-named-repository>*
- *      | "aux" <site-named-repository>*
- *      ;
- *
- *  user-sub-category
- *      = "public" <public-user-named-repository>*
- *      | "protected" ID <protected-user-named-repository>*
- *      ;
- *
- *  public-remote-named-repository
- *      = ID <public-remote-repository>
- *      ;
- *
- *  protected-remote-named-repository
- *      = ID <protected-remote-repository>
- *      ;
- *
- *  site-named-repository
- *      = ID <site-repository>
- *      ;
- *
- *  public-user-named-repository
- *      = ID <public-user-repository>
- *      ;
- *
- *  protected-user-named-repository
- *      = ID <protected-user-repository>
- *      ;
- *
- *  public-remote-repository
- *      = <public-remote-root> [ <disabled> ] <apps>*
- *      ;
- *
- *  protected-remote-repository
- *      = <protected-remote-root> [ <disabled> ] <apps>*
- *      ;
- *
- *  site-repository
- *      = <local-root> [ <disabled> ] <apps>*
- *      ;
- *
- *  public-user-repository
- *      = <local-root> [ <disabled> ] [ <cache-enabled> ] <apps>*
- *      ;
- *
- *  protected-user-repository
- *      = <local-root> <passwd> <download-ticket> [ <disabled> ] [ <cache-enabled> ] <apps>*
- *      ;
- *
- *  apps
- *      = "refseq" <app>
- *      | "sra" <app>
- *      | "wgs" <app>
- *      ;
- *
- *  app
- *      = [ <disabled> ] "volumes" <volume>*
- *      ;
- *
- *  volume
- *      = <expansion-alg> "=" <path-list>
- *      ;
- *
- *  expansion-alg
- *      = "flat" | "sra1000" | "sra1024" | "fuse1000" | "refseq" | ...
- *      ;
- *
- *  disabled
- *      = "disabled" "=" ( "true" | * )  # any value other than "true" is false
- *      ;
- *
- *  cache-enabled
- *      = "cache-enabled" "=" ( "true" | * )  # any value other than "true" is false
- *      ;
- */
-
-#define rcResolver   rcTree
-
-struct KDataBuffer;
-struct KNSManager;
-struct String;
-struct VResolverAlg;
-
-void VFSManagerSetNameResolverVersion3_0(void);
-
-rc_t VPathCheckFromNamesCGI(const struct VPath *path,
-    const struct String *ticket, const struct VPath **mapping);
-
-
-/*--------------------------------------------------------------------------
- * VResolverAlg
- *  represents a set of zero or more volumes
- *  each of which is addressed using a particular expansion algorithm
- */
-typedef enum
-{
-    appUnknown,
-    appAny,
-    appFILE,
-    appREFSEQ,
-    appSRA,
-    appWGS,
-    appNANNOT,
-    appNAKMER,
-    appSRAPileup,
-    appCount
-} VResolverAppID;
-
-typedef enum
-{
-    algCGI,
-    algFlat,
-    algSRAFlat,
-    algSRA1024,
-    algSRA1000,
-    algFUSE1000,
-    algREFSEQ,
-    algWGS2,                /* ordered to be of higher precedence than algWGS */
-    algWGS,
-    algWGSFlat,
-    algFuseWGS,
-    algSRA_NCBI,
-    algSRA_EBI,
-
-    algNANNOTFlat,
-    algNANNOT,
-    algFuseNANNOT,
-    algNAKMERFlat,
-    algNAKMER,
-    algFuseNAKMER,
-
-    algPileup_NCBI,
-    algPileup_EBI,
-    algPileup_DDBJ,
-
-    /* leave as last value */
-    algUnknown
-} VResolverAlgID;
-
-rc_t VResolverAlgMake(struct VResolverAlg **alg, const struct String *root,
-     VResolverAppID app_id, VResolverAlgID alg_id, bool protctd, bool disabled);
-
-void CC VResolverAlgWhack ( void *item, void *ignore );
-
-rc_t VResolverAlgParseResolverCGIResponse ( const struct KDataBuffer *result,
-    const struct VPath ** path, const struct VPath ** mapping,
-    const struct String *acc, const struct String *ticket );
-
-rc_t VResolverAlgParseResolverCGIResponse_3_0(const char *start,
-    size_t size, const struct VPath **path, const struct VPath **mapping,
-    const struct String *acc, const struct String *ticket);
-
-/* RemoteProtectedResolve
- *  use NCBI CGI to resolve accession into URL
- */
-rc_t VResolverAlgRemoteProtectedResolve( const struct VResolverAlg *self,
-    const struct KNSManager *kns, VRemoteProtocols protocols,
-    const struct String *acc, const struct VPath **path,
-    const struct VPath **mapping, bool legacy_wgs_refseq);
-
-/** get projectId ( valid for protected user repository ) */
-rc_t VResolverGetProjectId ( const VResolver * self, uint32_t * projectId );
-
-/* RemoteResolve
- *  resolve an accession into a remote VPath or not found
- *  may optionally open a KFile to the object in the process
- *  of finding it
- *
- *  2. determine the type of accession we have, i.e. its "app"
- *  3. search all local algorithms of app type for accession
- *  4. return not found or new VPath
- */
-rc_t VResolverRemoteResolve ( const VResolver *self,
-    VRemoteProtocols protocols, const struct String * accession,
-    const struct VPath ** path, const struct VPath **mapping,
-    const struct KFile ** opt_file_rtn, bool refseq_ctx, bool is_oid );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _h_resolver_priv_ */
diff --git a/libs/vfs/resolver.c b/libs/vfs/resolver.c
deleted file mode 100644
index c920814..0000000
--- a/libs/vfs/resolver.c
+++ /dev/null
@@ -1,4673 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * =============================================================================
- *
- */
-
-
-#include <vfs/extern.h>
-#include "resolver-priv.h"
-
-#include <vfs/manager.h>
-#include <vfs/path.h>
-
-#include <kns/http.h>
-#include <kns/kns-mgr-priv.h> /* KNSManagerMakeReliableHttpFile */
-#include <kns/manager.h>
-#include <kns/stream.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-#include <kfg/repository.h>
-#include <kfg/config.h>
-
-#ifdef ERR
-#undef ERR
-#endif
-
-#include <klib/text.h>
-#include <klib/vector.h>
-#include <klib/refcount.h>
-#include <klib/namelist.h>
-#include <klib/printf.h>
-#include <klib/data-buffer.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <klib/rc.h>
-
-#include <sysalloc.h>
-
-#include <vfs/path-priv.h>
-#include "path-priv.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-/* to turn off CGI name resolution for
-   any refseq accessions */
-#define NO_REFSEQ_CGI 0
-
-/* to turn off CGI name resolution for
-   legacy WGS packages used by refseq */
-#define NO_LEGACY_WGS_REFSEQ_CGI NO_REFSEQ_CGI
-
-/* do not allow fragments to be returned
-   unless we are expecting them for refseq */
-#define DISALLOW_FRAGMENT NO_LEGACY_WGS_REFSEQ_CGI
-
-/* the fail-over mechanism of allowing "aux" repositories */
-#define ALLOW_AUX_REPOSITORIES 0
-
-#define NAME_SERVICE_MAJ_VERS_ 1
-#define NAME_SERVICE_MIN_VERS_ 1
-#define ONE_DOT_ONE 0x01010000
-static uint32_t NAME_SERVICE_MAJ_VERS = NAME_SERVICE_MAJ_VERS_;
-static uint32_t NAME_SERVICE_MIN_VERS = NAME_SERVICE_MAJ_VERS_;
-static uint32_t NAME_SERVICE_VERS
-    = NAME_SERVICE_MAJ_VERS_ << 24 | NAME_SERVICE_MAJ_VERS_ << 16;
-
-static void VFSManagerSetNameResolverVersion(uint32_t maj, uint32_t min) {
-    NAME_SERVICE_MAJ_VERS = maj;
-    NAME_SERVICE_MIN_VERS = min;
-    NAME_SERVICE_VERS
-        = NAME_SERVICE_MAJ_VERS_ << 24 | NAME_SERVICE_MAJ_VERS_ << 16;
-}
-void VFSManagerSetNameResolverVersion3_0(void)
-{   VFSManagerSetNameResolverVersion(3, 0); }
-
-/*--------------------------------------------------------------------------
- * String
- */
-static
-void CC string_whack ( void *obj, void *ignore )
-{
-    StringWhack ( ( String* ) obj );
-}
-
-/*--------------------------------------------------------------------------
- * VResolverAccToken
- *  breaks up an accession into parts
- *
- *  "acc" is entire accession as given
- *
- *  the remainder is divided like so:
- *
- *    [<prefix>_]<alpha><digits>[.<ext1>[.<ext2>]]
- *
- *  prefix is optional
- *  alpha can be zero length iff prefix is not zero length
- *  digits must be non-zero length
- *  ext1 and ext2 are optional
- */
-typedef struct VResolverAccToken VResolverAccToken;
-struct VResolverAccToken
-{
-    String acc;
-    String prefix;
-    String alpha;
-    String digits;
-    String ext1;
-    String ext2;
-    String suffix;
-};
-
-static
-void VResolverAccTokenInitFromOID ( VResolverAccToken *t, const String *acc )
-{
-    CONST_STRING ( & t -> prefix, "" );
-    t -> alpha = t -> prefix;
-    t -> acc = t -> digits = * acc;
-    t -> ext1 = t -> ext2 = t -> prefix;
-    t -> suffix = t -> prefix;
-}
-
-/*--------------------------------------------------------------------------
- * VResolverAlg
- *  represents a set of zero or more volumes
- *  each of which is addressed using a particular expansion algorithm
- */
-typedef struct VResolverAlg VResolverAlg;
-struct VResolverAlg
-{
-    /* volume paths - stored as String* */
-    Vector vols;
-
-    /* root path - borrowed reference */
-    const String *root;
-
-    /* download ticket - borrowed reference
-       non-NULL means that the root is a
-       resolver CGI. also, don't rely on
-       presence of any volumes... */
-    const String *ticket;
-
-    /* app_id helps to filter out volumes by app */
-    VResolverAppID app_id;
-
-    /* how to expand an accession */
-    VResolverAlgID alg_id;
-
-    /* a property of the repository */
-    bool protected;
-
-    /* whether the volumes are cache-capable
-       in particular, enabled if cache forced */
-    bool cache_capable;
-
-    /* whether the volumes are cache-enabled */
-    bool cache_enabled;
-
-    /* whether the volume is disabled in config */
-    bool disabled;
-#if 0
-    VRemoteProtocols protocols;
-#endif
-};
-
-
-/* Whack
- */
-void CC VResolverAlgWhack ( void *item, void *ignore )
-{
-    VResolverAlg *self = item;
-
-    /* drop any volumes */
-    VectorWhack ( & self -> vols, string_whack, NULL );
-
-    /* everything else is a borrowed reference */
-
-    free ( self );
-}
-
-/* Make
- */
-rc_t VResolverAlgMake ( VResolverAlg **algp, const String *root,
-     VResolverAppID app_id, VResolverAlgID alg_id, bool protected, bool disabled )
-{
-    rc_t rc;
-    VResolverAlg *alg = calloc ( 1, sizeof * alg );
-    if ( alg == NULL )
-        rc = RC ( rcVFS, rcMgr, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        VectorInit ( & alg -> vols, 0, 8 );
-        alg -> root = root;
-        alg -> app_id = app_id;
-        alg -> alg_id = alg_id;
-        alg -> protected = protected;
-        alg -> disabled = disabled;
-        rc = 0;
-    }
-
-    assert ( algp != NULL );
-    * algp = alg;
-    return rc;
-}
-
-static
-int64_t CC VResolverAlgSort ( const void ** a, const void ** b, void * ignore )
-{
-    const VResolverAlg * aa = * a;
-    const VResolverAlg * ab = * b;
-
-    /* second key is algorithm id */
-    return ( int64_t ) aa -> alg_id - ( int64_t ) ab -> alg_id;
-}
-
-/* MakeLocalWGSRefseqURI
- *  create a special URI that tells KDB how to open this
- *  obscured table, hidden away within a KAR file
- */
-static
-rc_t VResolverAlgMakeLocalWGSRefseqURI ( const VResolverAlg *self,
-    const String *vol, const String *exp, const String *acc, const VPath ** path )
-{
-    if ( self -> root == NULL )
-        return VPathMakeFmt ( ( VPath** ) path, NCBI_FILE_SCHEME ":%S/%S#tbl/%S", vol, exp, acc );
-    return VPathMakeFmt ( ( VPath** ) path, NCBI_FILE_SCHEME ":%S/%S/%S#tbl/%S", self -> root, vol, exp, acc );
-}
-
-/* MakeRemoteWGSRefseqURI
- *  create a special URI that tells KDB how to open this
- *  obscured table, hidden away within a KAR file
- */
-static
-rc_t VResolverAlgMakeRemoteWGSRefseqURI ( const VResolverAlg *self,
-    const char *url, const String *acc, const VPath ** path )
-{
-    return VPathMakeFmt ( ( VPath** ) path, "%s#tbl/%S", url, acc );
-}
-
-/* MakeRemotePath
- *  the path is known to exist in the remote file system
- *  turn it into a VPath
- */
-static
-rc_t VResolverAlgMakeRemotePath ( const VResolverAlg *self,
-    const char *url, const VPath ** path )
-{
-    return VPathMakeFmt ( ( VPath** ) path, "%s", url );
-}
-
-/* MakeLocalPath
- *  the path is known to exist in the local file system
- *  turn it into a VPath
- */
-static
-rc_t VResolverAlgMakeLocalPath ( const VResolverAlg *self,
-    const String *vol, const String *exp, const VPath ** path )
-{
-    if ( self -> root == NULL )
-        return VPathMakeFmt ( ( VPath** ) path, "%S/%S", vol, exp );
-    return VPathMakeFmt ( ( VPath** ) path, "%S/%S/%S", self -> root, vol, exp );
-}
-
-/* MakeLocalFilePath
- *  the path is known to exist in the local file system
- *  turn it into a VPath
- */
-static
-rc_t VResolverAlgMakeLocalFilePath ( const VResolverAlg *self,
-    const String *vol, const String *exp, const char *krypto_ext, const VPath ** path )
-{
-    if ( self -> root == NULL )
-        return VPathMakeFmt ( ( VPath** ) path, "%S/%S%s", vol, exp, krypto_ext );
-    return VPathMakeFmt ( ( VPath** ) path, "%S/%S/%S%s", self -> root, vol, exp, krypto_ext );
-}
-
-/* expand_accession
- *  expand accession according to algorithm
- */
-static
-rc_t expand_algorithm ( const VResolverAlg *self, const VResolverAccToken *tok,
-    char *expanded, size_t bsize, size_t *size, bool legacy_wgs_refseq )
-{
-    rc_t rc;
-    uint32_t num;
-
-   switch ( self -> alg_id )
-    {
-    case algCGI:
-        return RC ( rcVFS, rcResolver, rcResolving, rcType, rcIncorrect );
-    case algFlat:
-        rc = string_printf ( expanded, bsize, size, "%S", & tok -> acc );
-        break;
-    case algSRAFlat:
-        rc = string_printf ( expanded, bsize, size,
-            "%S%S.sra", & tok -> alpha, & tok -> digits );
-        break;
-    case algSRA1024:
-        num = ( uint32_t ) strtoul ( tok -> digits . addr, NULL, 10 );
-        rc = string_printf ( expanded, bsize, size,
-            "%S/%06u/%S%S.sra", & tok -> alpha, num >> 10, & tok -> alpha, & tok -> digits );
-        break;
-    case algSRA1000:
-        num = ( uint32_t ) ( tok -> alpha . size + tok -> digits . size - 3 );
-        rc = string_printf ( expanded, bsize, size,
-            "%S/%.*S/%S%S.sra", & tok -> alpha, num, & tok -> acc, & tok -> alpha, & tok -> digits );
-        break;
-    case algFUSE1000:
-        num = ( uint32_t ) ( tok -> alpha . size + tok -> digits . size - 3 );
-        rc = string_printf ( expanded, bsize, size,
-            "%S/%.*S/%S%S/%S%S.sra", & tok -> alpha, num, & tok -> acc, 
-            & tok -> alpha, & tok -> digits, & tok -> alpha, & tok -> digits );
-        break;
-    case algREFSEQ:
-        if ( ! legacy_wgs_refseq )
-            rc = string_printf ( expanded, bsize, size, "%S", & tok -> acc );
-        else
-            rc = string_printf ( expanded, bsize, size, "%S%.2S", & tok -> alpha, & tok -> digits );
-        break;
-    case algWGSFlat:
-        num = ( uint32_t ) ( tok -> alpha . size + 2 );
-        if ( tok -> prefix . size != 0 )
-            num += (uint32_t) ( tok -> prefix . size + 1 );
-        rc = string_printf ( expanded, bsize, size,
-            "%.*S", num, & tok -> acc );
-        break;
-    case algWGS2:
-    case algWGS:
-        num = ( uint32_t ) ( tok -> alpha . size + 2 );
-        if ( tok -> prefix . size != 0 )
-            num += (uint32_t) ( tok -> prefix . size + 1 );
-        if ( tok -> ext1 . size == 0 )
-        {
-            rc = string_printf ( expanded, bsize, size,
-                "WGS/%.2s/%.2s/%.*S", tok -> alpha . addr, tok -> alpha . addr + 2, num, & tok -> acc );
-        }
-        else
-        {
-            rc = string_printf ( expanded, bsize, size,
-                "WGS/%.2s/%.2s/%.*S.%S", tok -> alpha . addr, tok -> alpha . addr + 2, num, & tok -> acc, & tok -> ext1 );
-        }
-        break;
-    case algFuseWGS:
-        num = ( uint32_t ) ( tok -> alpha . size + 2 );
-        if ( tok -> prefix . size != 0 )
-            num += (uint32_t) ( tok -> prefix . size + 1 );
-        rc = string_printf ( expanded, bsize, size,
-            "%.2s/%.2s/%.*S", tok -> alpha . addr, tok -> alpha . addr + 2, num, & tok -> acc );
-        break;
-    case algSRA_NCBI:
-        num = ( uint32_t ) strtoul ( tok -> digits . addr, NULL, 10 );
-        rc = string_printf ( expanded, bsize, size,
-            "%S/%06u/%S%S", & tok -> alpha, num >> 10, & tok -> alpha, & tok -> digits );
-        break;
-    case algSRA_EBI:
-        num = ( uint32_t ) ( tok -> alpha . size + tok -> digits . size - 3 );
-        rc = string_printf ( expanded, bsize, size,
-            "%S/%.*S/%S%S", & tok -> alpha, num, & tok -> acc, & tok -> alpha, & tok -> digits );
-        break;
-
-    case algNANNOTFlat:
-        rc = string_printf ( expanded, bsize, size, "%S", & tok -> acc );
-        break;
-    case algNANNOT:
-        num = ( uint32_t ) strtoul ( tok -> digits . addr, NULL, 10 );
-        rc = string_printf ( expanded, bsize, size,
-            "%03u/%03u/%S", num / 1000000, ( num / 1000 ) % 1000, & tok -> acc );
-        break;
-    case algFuseNANNOT:
-        num = ( uint32_t ) strtoul ( tok -> digits . addr, NULL, 10 );
-        rc = string_printf ( expanded, bsize, size,
-            "%03u/%03u/%S", num / 1000000, ( num / 1000 ) % 1000, & tok -> acc );
-        break;
-
-    case algNAKMERFlat:
-        rc = string_printf ( expanded, bsize, size, "%S", & tok -> acc );
-        break;
-    case algNAKMER:
-        num = ( uint32_t ) strtoul ( tok -> digits . addr, NULL, 10 );
-        rc = string_printf ( expanded, bsize, size,
-            "kmer/%03u/%03u/%S", num / 1000000, ( num / 1000 ) % 1000, & tok -> acc );
-        break;
-    case algFuseNAKMER:
-        num = ( uint32_t ) strtoul ( tok -> digits . addr, NULL, 10 );
-        rc = string_printf ( expanded, bsize, size,
-            "kmer/%03u/%03u/%S", num / 1000000, ( num / 1000 ) % 1000, & tok -> acc );
-        break;
-
-    case algPileup_NCBI:
-        num = ( uint32_t ) strtoul ( tok -> digits . addr, NULL, 10 );
-        rc = string_printf ( expanded, bsize, size,
-             "SRZ/%06u/%S%S/%S", num / 1000, & tok -> alpha, & tok -> digits, & tok -> acc );
-        break;
-            
-    case algPileup_EBI:
-        num = ( uint32_t ) strtoul ( tok -> digits . addr, NULL, 10 );
-        rc = string_printf ( expanded, bsize, size,
-             "ERZ/%06u/%S%S/%S", num / 1000, & tok -> alpha, & tok -> digits, & tok -> acc );
-        break;
-    case algPileup_DDBJ:
-        num = ( uint32_t ) strtoul ( tok -> digits . addr, NULL, 10 );
-        rc = string_printf ( expanded, bsize, size,
-             "DRZ/%06u/%S%S/%S", num / 1000, & tok -> alpha, & tok -> digits, & tok -> acc );
-        break;
-        
-    default:
-        return RC ( rcVFS, rcResolver, rcResolving, rcType, rcUnrecognized );
-    }
-
-   return rc;
-}
-
-/* LocalResolve
- *  resolve an accession into a VPath or not found
- *
- *  1. expand accession according to algorithm
- *  2. search all volumes for accession
- *  3. return not found or new VPath
- */
-static
-rc_t VResolverAlgLocalResolve ( const VResolverAlg *self,
-    const KDirectory *wd, const VResolverAccToken *tok,
-    const VPath ** path, bool legacy_wgs_refseq, bool for_cache )
-{
-    KPathType kpt;
-    uint32_t i, count;
-
-    /* expanded accession */
-    String exp;
-    size_t size;
-    char expanded [ 256 ];
-
-    /* in some cases, "root" is NULL */
-    const String *vol, *root = self -> root;
-
-    /* expand the accession */
-    rc_t rc = expand_algorithm ( self, tok, expanded, sizeof expanded, & size, legacy_wgs_refseq );
-
-    /* should never have a problem here... */
-    if ( rc != 0 )
-        return rc;
-
-    /* if this is to detect a cache file, append extension */
-    if ( for_cache )
-    {
-        size += string_copy ( & expanded [ size ], sizeof expanded - size, ".cache", sizeof ".cache" - 1 );
-        if ( size == sizeof expanded )
-            return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-    }
-
-    /* turn the expanded portion into a String
-       we know that size is also length due to
-       accession content rules */
-    StringInit ( & exp, expanded, size, ( uint32_t ) size );
-
-    /* remove the cache extension */
-    if ( for_cache )
-    {
-        exp . len -= sizeof ".cache" - 1;
-        exp . size -= sizeof ".cache" - 1;
-    }
-
-    /* now search all volumes */
-    count = VectorLength ( & self -> vols );
-    if ( root == NULL )
-    {
-        for ( i = 0; i < count; ++ i )
-        {
-            vol = VectorGet ( & self -> vols, i );
-            kpt = KDirectoryPathType ( wd, "%.*s/%.*s"
-                , ( int ) vol -> size, vol -> addr
-                , ( int ) size, expanded );
-            switch ( kpt & ~ kptAlias )
-            {
-            case kptFile:
-            case kptDir:
-                if ( legacy_wgs_refseq )
-                    return VResolverAlgMakeLocalWGSRefseqURI ( self, vol, & exp, & tok -> acc, path );
-                return VResolverAlgMakeLocalPath ( self, vol, & exp, path );
-            default:
-                break;
-            }
-        }
-    }
-    else
-    {
-        for ( i = 0; i < count; ++ i )
-        {
-            vol = VectorGet ( & self -> vols, i );
-            kpt = KDirectoryPathType ( wd, "%.*s/%.*s/%.*s"
-                , ( int ) root -> size, root -> addr
-                , ( int ) vol -> size, vol -> addr
-                , ( int ) size, expanded );
-            switch ( kpt & ~ kptAlias )
-            {
-            case kptFile:
-            case kptDir:
-                if ( legacy_wgs_refseq )
-                    return VResolverAlgMakeLocalWGSRefseqURI ( self, vol, & exp, & tok -> acc, path );
-                return VResolverAlgMakeLocalPath ( self, vol, & exp, path );
-            default:
-                break;
-            }
-        }
-    }
-    
-    return SILENT_RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-}
-
-/* LocalFile
- *  resolve an file name into a VPath or not found
- */
-static
-rc_t VResolverAlgLocalFile ( const VResolverAlg *self,
-    const KDirectory *wd, const VPath *query,
-    const VPath ** path, bool for_cache )
-{
-    KPathType kpt;
-    uint32_t i, count;
-
-    /* in some cases, "root" is NULL */
-    const String *vol, *root = self -> root;
-
-    /* the file name */
-    String fname = query -> path;
-
-    /* cache extension */
-    const char *cache_ext = for_cache ? ".cache" : "";
-
-    /* encryption extension */
-    const char *krypto_ext = self -> protected ? ".ncbi_enc" : "";
-
-    /* now search all volumes */
-    count = VectorLength ( & self -> vols );
-    if ( root == NULL )
-    {
-        for ( i = 0; i < count; ++ i )
-        {
-            vol = VectorGet ( & self -> vols, i );
-            kpt = KDirectoryPathType ( wd
-                , "%.*s/%.*s%s%s"
-                , ( int ) vol -> size, vol -> addr
-                , ( int ) fname . size, fname . addr
-                , krypto_ext
-                , cache_ext
-            );
-
-            switch ( kpt & ~ kptAlias )
-            {
-            case kptFile:
-            case kptDir:
-                return VResolverAlgMakeLocalFilePath ( self, vol, & fname, krypto_ext, path );
-            default:
-                break;
-            }
-
-            if ( krypto_ext [ 0 ] != 0 )
-            {
-                kpt = KDirectoryPathType ( wd
-                    , "%.*s/%.*s%s"
-                    , ( int ) vol -> size, vol -> addr
-                    , ( int ) fname . size, fname . addr
-                    , cache_ext
-                );
-
-                switch ( kpt & ~ kptAlias )
-                {
-                case kptFile:
-                case kptDir:
-                    return VResolverAlgMakeLocalFilePath ( self, vol, & fname, "", path );
-                default:
-                    break;
-                }
-            }
-        }
-    }
-    else
-    {
-        for ( i = 0; i < count; ++ i )
-        {
-            vol = VectorGet ( & self -> vols, i );
-            kpt = KDirectoryPathType ( wd
-                , "%.*s/%.*s/%.*s%s%s"
-                , ( int ) root -> size, root -> addr
-                , ( int ) vol -> size, vol -> addr
-                , ( int ) fname . size, fname . addr
-                , krypto_ext
-                , cache_ext
-            );
-
-            switch ( kpt & ~ kptAlias )
-            {
-            case kptFile:
-            case kptDir:
-                return VResolverAlgMakeLocalFilePath ( self, vol, & fname, krypto_ext, path );
-            default:
-                break;
-            }
-
-            if ( krypto_ext [ 0 ] != 0 )
-            {
-                kpt = KDirectoryPathType ( wd
-                    , "%.*s/%.*s/%.*s%s"
-                    , ( int ) root -> size, root -> addr
-                    , ( int ) vol -> size, vol -> addr
-                    , ( int ) fname . size, fname . addr
-                    , cache_ext
-                );
-
-                switch ( kpt & ~ kptAlias )
-                {
-                case kptFile:
-                case kptDir:
-                    return VResolverAlgMakeLocalFilePath ( self, vol, & fname, "", path );
-                default:
-                    break;
-                }
-            }
-        }
-    }
-    
-    return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-}
-
-rc_t VPathCheckFromNamesCGI ( const VPath * path, const String *ticket, const VPath ** mapping )
-{
-    size_t i, size;
-    const char * start;
-
-    /* must have an explicit scheme */
-    if ( ! path -> from_uri )
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-
-    /* can only be http or fasp */
-    switch ( path -> scheme_type )
-    {
-    case vpuri_http:
-    case vpuri_fasp:
-        break;
-    default:
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-    }
-
-
-    /* must have a host-spec with all ascii-characters */
-    switch ( path -> host_type )
-    {
-    case vhDNSName:
-        if ( path -> host . size == 0 || path -> host . size != ( size_t ) path -> host . len )
-            return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-        start = path -> host . addr;
-        size = path -> host . size;
-        for ( i = 0; i < size; ++ i )
-        {
-            if ( isalnum ( start [ i ] ) )
-                continue;
-            switch ( start [ i ] )
-            {
-            case '.':
-            case '-':
-            case '_':
-                continue;
-            }
-            return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-        }
-        break;
-    case vhIPv4:
-    case vhIPv6:
-        break;
-    }
-
-    /* must have a full-path */
-    if ( path -> path_type != vpFullPath )
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-    /* only ascii characters */
-    assert ( path -> path . size != 0 );
-    if ( path -> path . size != ( size_t ) path -> path . len )
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-    start = path -> path . addr;
-    size = path -> path . size;
-    for ( i = 0; i < size; ++ i )
-    {
-        if ( isalnum ( start [ i ] ) )
-            continue;
-        switch ( start [ i ] )
-        {
-        case '/':
-        case '.':
-        case '-':
-        case '_':
-            continue;
-        }
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-    }
-
-#if DO_NOT_USE_TIC_HACK
-    /* if the ticket was placed into the mapped path */
-    if ( mapping != NULL )
-        ticket = NULL;
-#endif
-
-    if ( path -> query . size != 0 )
-    {
-        String name, val, req;
-
-        /* query must match ticket */
-        if ( ticket == NULL )
-            return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-
-        StringSubstr ( & path -> query, & name, 0, 5 );
-        StringSubstr ( & path -> query, & val, 5, 0 );
-        if ( ! StringEqual ( & val, ticket ) )
-            return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-        CONST_STRING ( & req, "?tic=" );
-        if ( ! StringEqual ( & name, & req ) )
-            return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-    }
-
-#if DISALLOW_FRAGMENT
-    /* cannot have a fragment */
-    if ( path -> fragment . size != 0 )
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-#endif
-
-    return 0;
-}
-
-
-/* ParseResolverCGIResponse_1_0
- *  expect single row table, with this structure:
- *
- *  <accession>|<download-ticket>|<url>|<result-code>|<message>
- */
-static
-rc_t VResolverAlgParseResolverCGIResponse_1_0 ( const char *start, size_t size,
-    const VPath ** path, const VPath ** ignore, const String *acc,
-    const String *ticket )
-{
-    rc_t rc;
-    KLogLevel lvl;
-    char *rslt_end;
-    uint32_t result_code;
-
-    String accession, download_ticket, url, rslt_code, msg;
-
-    /* get accession */
-    const char *end = start + size;
-    const char *sep = string_chr ( start, size, '|' );
-    if ( sep == NULL )
-        return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-    StringInit ( & accession, start, sep - start, ( uint32_t ) ( sep - start ) );
-
-    /* get download-ticket */
-    start = sep + 1;
-    sep = string_chr ( start, end - start, '|' );
-    if ( sep == NULL )
-        return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-    StringInit ( & download_ticket, start, sep - start, ( uint32_t ) ( sep - start ) );
-
-    /* get url */
-    start = sep + 1;
-    sep = string_chr ( start, end - start, '|' );
-    if ( sep == NULL )
-        return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-    StringInit ( & url, start, sep - start, ( uint32_t ) ( sep - start ) );
-
-    /* get result-code */
-    start = sep + 1;
-    sep = string_chr ( start, end - start, '|' );
-    if ( sep == NULL )
-        return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-    StringInit ( & rslt_code, start, sep - start, ( uint32_t ) ( sep - start ) );
-
-    /* get msg */
-    start = sep + 1;
-    for ( sep = end; sep > start; -- sep )
-    {
-        switch ( sep [ -1 ] )
-        {
-        case '\n':
-        case '\r':
-            continue;
-        default:
-            break;
-        }
-
-        break;
-    }
-    StringInit ( & msg, start, sep - start, ( uint32_t ) ( sep - start ) );
-
-    /* compare acc to accession */
-    assert(acc);
-    if ( ! StringEqual ( & accession, acc ) )
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-
-    /* compare ticket
-       currently this makes sense with 1 request from a known workspace */
-    if ( download_ticket . size != 0 )
-    {
-        if ( ticket == NULL || ! StringEqual ( & download_ticket, ticket ) )
-            return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-    }
-
-    /* get the result code */
-    if ( rslt_code . size == 0 )
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-    result_code = strtoul ( rslt_code . addr, & rslt_end, 10 );
-    if ( ( const char* ) rslt_end - rslt_code . addr != rslt_code . size )
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-
-    /* still have to test the URL */    
-
-    switch ( result_code / 100 )
-    {
-    case 1:
-        /* informational response
-           not much we can do here */
-        lvl = klogInt;
-        rc = RC ( rcVFS, rcResolver, rcResolving, rcError, rcUnexpected );
-        break;
-
-    case 2:
-        /* successful response
-           but can only handle 200 */
-        if ( result_code == 200 )
-        {
-            /* normal public response */
-            if ( download_ticket . size == 0 )
-                rc = VPathMakeFmt ( ( VPath** ) path, "%S", & url );
-            else
-            {
-                /* protected response */
-                rc = VPathMakeFmt ( ( VPath** ) path, "%S?tic=%S", & url, & download_ticket );
-            }
-
-            if ( rc == 0 )
-            {
-                rc = VPathCheckFromNamesCGI ( * path, ticket, NULL );
-                if ( rc == 0 )
-                    return 0;
-
-                VPathRelease ( * path );
-                * path = NULL;
-            }
-
-            return rc;
-        }
-
-        lvl = klogInt;
-        rc = RC ( rcVFS, rcResolver, rcResolving, rcError, rcUnexpected );
-        break;
-
-    case 3:
-        /* redirection
-           currently this is being handled by our request object */
-        lvl = klogInt;
-        rc = RC ( rcVFS, rcResolver, rcResolving, rcError, rcUnexpected );
-        break;
-
-    case 4:
-        /* client error */
-        lvl = klogErr;
-        switch ( result_code )
-        {
-        case 400:
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcInvalid );
-            break;
-        case 401:
-        case 403:
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcQuery, rcUnauthorized );
-            break;
-        case 404:
-            return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-        case 410:
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-            break;
-        default:
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcError, rcUnexpected );
-        }
-        break;
-
-    case 5:
-        /* server error */
-        lvl = klogSys;
-        switch ( result_code )
-        {
-        case 503:
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcDatabase, rcNotAvailable );
-            break;
-        case 504:
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcTimeout, rcExhausted );
-            break;
-        default:
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcError, rcUnexpected );
-        }
-        break;
-
-    default:
-        lvl = klogInt;
-        rc = RC ( rcVFS, rcResolver, rcResolving, rcError, rcUnexpected );
-    }
-
-    /* log message to user */
-    PLOGERR ( lvl, ( lvl, rc, "failed to resolve accession '$(acc)' - $(msg) ( $(code) )",
-        "acc=%S,msg=%S,code=%u", acc, & msg, result_code ) );
-    return rc;
-}
-
-
-/* ParseResolverCGIResponse_1_1
- *  expect single row table, with this structure (SRA-1690) :
- *
- *  <accession>|obj-id|name|size|mod-date|md5|<download-ticket>|<url>|<result-code>|<message>
- */
-static
-rc_t VResolverAlgParseResolverCGIResponse_1_1 ( const char *astart, size_t size,
-    const VPath ** path, const VPath ** mapping, const String *acc,
-    const String *ticket )
-{
-    const char *start = astart;
-    rc_t rc;
-    KLogLevel lvl;
-    char *rslt_end;
-    uint32_t result_code;
-
-    String accession, obj_id, name, size_str, mod_date, md5, download_ticket, url, rslt_code, msg;
-
-    /* get accession */
-    const char *end = start + size;
-    const char *sep = string_chr ( start, size, '|' );
-    if ( sep == NULL )
-        return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-    StringInit ( & accession, start, sep - start, ( uint32_t ) ( sep - start ) );
-
-    /* get obj-id */
-    start = sep + 1;
-    sep = string_chr ( start, end - start, '|' );
-    if ( sep == NULL )
-        return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-    StringInit ( & obj_id, start, sep - start, ( uint32_t ) ( sep - start ) );
-
-    /* get name */
-    start = sep + 1;
-    sep = string_chr ( start, end - start, '|' );
-    if ( sep == NULL )
-        return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-    StringInit ( & name, start, sep - start, ( uint32_t ) ( sep - start ) );
-
-    /* get size */
-    start = sep + 1;
-    sep = string_chr ( start, end - start, '|' );
-    if ( sep == NULL )
-        return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-    StringInit ( & size_str, start, sep - start, ( uint32_t ) ( sep - start ) );
-
-    /* get mod-date */
-    start = sep + 1;
-    sep = string_chr ( start, end - start, '|' );
-    if ( sep == NULL )
-        return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-    StringInit ( & mod_date, start, sep - start, ( uint32_t ) ( sep - start ) );
-
-    /* get md5 */
-    start = sep + 1;
-    sep = string_chr ( start, end - start, '|' );
-    if ( sep == NULL )
-        return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-    StringInit ( & md5, start, sep - start, ( uint32_t ) ( sep - start ) );
-
-    /* get download-ticket */
-    start = sep + 1;
-    sep = string_chr ( start, end - start, '|' );
-    if ( sep == NULL )
-        return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-    StringInit ( & download_ticket, start, sep - start, ( uint32_t ) ( sep - start ) );
-
-    /* get url */
-    start = sep + 1;
-    sep = string_chr ( start, end - start, '|' );
-    if ( sep == NULL )
-        return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-    StringInit ( & url, start, sep - start, ( uint32_t ) ( sep - start ) );
-
-    /* get result-code */
-    start = sep + 1;
-    sep = string_chr ( start, end - start, '|' );
-    if ( sep == NULL )
-        return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-    StringInit ( & rslt_code, start, sep - start, ( uint32_t ) ( sep - start ) );
-
-    /* get msg */
-    start = sep + 1;
-    for ( sep = end; sep > start; -- sep )
-    {
-        switch ( sep [ -1 ] )
-        {
-        case '\n':
-        case '\r':
-            continue;
-        default:
-            break;
-        }
-
-        break;
-    }
-    StringInit ( & msg, start, sep - start, ( uint32_t ) ( sep - start ) );
-
-    /* compare acc to accession or obj_id */
-    assert(acc);
-    if ( ! StringEqual ( & accession, acc ) && ! StringEqual ( & obj_id, acc ) ) {
-        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_ERR), (
-            "@@@@@@@@2 %%s:%s:%d: %s"
-                "\n", __FILE__, __FUNCTION__, __LINE__, astart));
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-    }
-
-    /* compare ticket
-       currently this makes sense with 1 request from a known workspace */
-    if ( download_ticket . size != 0 )
-    {
-        if ( ticket == NULL || ! StringEqual ( & download_ticket, ticket ) )
-            return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-    }
-
-    /* get the result code */
-    if ( rslt_code . size == 0 )
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-    result_code = strtoul ( rslt_code . addr, & rslt_end, 10 );
-    if ( ( const char* ) rslt_end - rslt_code . addr != rslt_code . size )
-        return RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcCorrupt );
-
-    /* still have to test the URL */    
-
-    switch ( result_code / 100 )
-    {
-    case 1:
-        /* informational response
-           not much we can do here */
-        lvl = klogInt;
-        rc = RC ( rcVFS, rcResolver, rcResolving, rcError, rcUnexpected );
-        break;
-
-    case 2:
-        /* successful response
-           but can only handle 200 */
-        if ( result_code == 200 )
-        {
-            /* normal public response */
-            if ( download_ticket . size == 0
-#if DO_NOT_USE_TIC_HACK
-                 || mapping != NULL
-#endif
-                )
-            {
-                rc = VPathMakeFmt ( ( VPath** ) path, "%S", & url );
-            }
-            else
-            {
-                /* protected response */
-                rc = VPathMakeFmt ( ( VPath** ) path, "%S?tic=%S", & url, & download_ticket );
-            }
-
-            if ( rc == 0 )
-            {
-                rc = VPathCheckFromNamesCGI ( * path, ticket, mapping );
-                if ( rc == 0 )
-                {
-                    if ( mapping == NULL )
-                        return 0;
-
-                    if ( download_ticket . size != 0 )
-                    {
-                        if ( accession . size != 0 )
-                            rc = VPathMakeFmt ( ( VPath** ) mapping, "ncbi-acc:%S?tic=%S", & accession, & download_ticket );
-                        else if ( name . size == 0 )
-                            return 0;
-                        else
-                            rc = VPathMakeFmt ( ( VPath** ) mapping, "ncbi-file:%S?tic=%S", & name, & download_ticket );
-                    }
-                    else if ( accession . size != 0 )
-                        rc = VPathMakeFmt ( ( VPath** ) mapping, "ncbi-acc:%S", & accession );
-                    else if ( name . size == 0 )
-                        return 0;
-                    else
-                        rc = VPathMakeFmt ( ( VPath** ) mapping, "ncbi-file:%S", & name );
-
-                    if ( rc == 0 )
-                        return 0;
-                }
-
-                VPathRelease ( * path );
-                * path = NULL;
-            }
-
-            return rc;
-        }
-
-        lvl = klogInt;
-        rc = RC ( rcVFS, rcResolver, rcResolving, rcError, rcUnexpected );
-        break;
-
-    case 3:
-        /* redirection
-           currently this is being handled by our request object */
-        lvl = klogInt;
-        rc = RC ( rcVFS, rcResolver, rcResolving, rcError, rcUnexpected );
-        break;
-
-    case 4:
-        /* client error */
-        lvl = klogErr;
-        switch ( result_code )
-        {
-        case 400:
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcMessage, rcInvalid );
-            break;
-        case 401:
-        case 403:
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcQuery, rcUnauthorized );
-            break;
-        case 404: /* 404|no data :
-                    If it is a real response then this assession is not found.
-                    What if it is a DB failure? Will be retried if configured to do so? */
-            return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-        case 410:
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-            break;
-        default:
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcError, rcUnexpected );
-        }
-        break;
-
-    case 5:
-        /* server error */
-        lvl = klogSys;
-        switch ( result_code )
-        {
-        case 503:
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcDatabase, rcNotAvailable );
-            break;
-        case 504:
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcTimeout, rcExhausted );
-            break;
-        default:
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcError, rcUnexpected );
-        }
-        break;
-
-    default:
-        lvl = klogInt;
-        rc = RC ( rcVFS, rcResolver, rcResolving, rcError, rcUnexpected );
-    }
-
-    /* log message to user */
-    PLOGERR ( lvl, ( lvl, rc, "failed to resolve accession '$(acc)' - $(msg) ( $(code) )",
-        "acc=%S,msg=%S,code=%u", acc, & msg, result_code ) );
-    return rc;
-}
-
-
-/* ParseResolverCGIResponse_2_0
- *  expect a table type line followed by the table
- */
-static
-rc_t VResolverAlgParseResolverCGIResponse_2_0 ( const char *start, size_t size,
-    const VPath ** path, const VPath ** mapping, const String *acc,
-    const String *ticket )
-{
-    size_t i;
-
-    if ( string_cmp ( start, size, "name-resolver", sizeof "name-resolver" - 1, sizeof "name-resolver" - 1 ) == 0 )
-    {
-        do
-        {
-            /* accept table type line */
-            i = sizeof "name-resolver" - 1;
-
-            /* must be followed by eoln */
-            if ( start [ i ] == '\r' && start [ i + 1 ] == '\n' )
-                i += 2;
-            else if ( start [ i ] == '\n' )
-                i += 1;
-            else
-                break;
-
-            /* parse as 1.1 response table */
-            return VResolverAlgParseResolverCGIResponse_1_1 ( & start [ i ],
-                size - i, path, mapping, acc, ticket );
-        }
-        while ( false );
-    }
-
-    return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-}
-
-typedef enum {
-    vBad,
-    v1_0,
-    v1_1,
-    v2,
-    v3,
-} TVersion;
-
-/* ParseResolverCGIResponse
- *  the response should be NUL terminated
- *  but should also be close to the size of result
- */
-rc_t VResolverAlgParseResolverCGIResponse ( const KDataBuffer *result,
-    const VPath ** path, const VPath ** mapping, const String *acc,
-    const String *ticket )
-{
-    const char V1_0[] = "#1.0";
-    const char V1_1[] = "#1.1";
-    const char V2  [] = "#2.0";
-    const char V3  [] = "#3.0";
-    struct {
-        const char *c;
-        size_t s;
-        TVersion v;
-        rc_t (*f)( const char *start, size_t size, const VPath **path,
-            const VPath **mapping, const String *acc, const String *ticket);
-    } version[] = {
-        {V1_1, sizeof V1_1 - 1, v1_1, VResolverAlgParseResolverCGIResponse_1_1},
-        {V3  , sizeof V3   - 1, v3  , VResolverAlgParseResolverCGIResponse_3_0},
-        {V1_0, sizeof V1_0 - 1, v1_0, VResolverAlgParseResolverCGIResponse_1_0},
-        {V2  , sizeof V2   - 1, v2  , VResolverAlgParseResolverCGIResponse_2_0},
-    };
-
-    size_t size = 0;
-    int iVersion = sizeof version / sizeof version[0];
-
-    /* the textual response */
-    size_t i = 0;
-    const char *start = NULL;
-
-    assert(result);
-
-    start = ( const void* ) result -> base;
-    size = KDataBufferBytes ( result );
-
-    DBGMSG(DBG_VFS, DBG_FLAG(DBG_VFS), (" Response = %.*s\n", size, start));
-
-    /* peel back buffer to significant bytes */
-    while ( size > 0 && start [ size - 1 ] == 0 ) -- size;
-
-    /* skip over blanks */
-    for ( i = 0; i < size; ++ i ) { if ( ! isspace ( start [ i ] ) ) break; }
-
-    for (iVersion = 0;
-        iVersion < sizeof version / sizeof *version; ++iVersion)
-    {
-        if (string_cmp(&start[i], size - i,
-            version[iVersion].c, version[iVersion].s, version[iVersion].s) == 0)
-        {
-            break;
-        }
-    }
-    switch (iVersion) {
-        default:
-            if (string_cmp(&start[i], size - i, version[iVersion].c,
-                version[iVersion].s, version[iVersion].s) == 0)
-            {
-                /* accept version line */
-                i += version[iVersion].s;
-
-                /* must be followed by eoln */
-                if ( start [ i ] == '\r' && start [ i + 1 ] == '\n' )
-                    i += 2;
-                else if ( start [ i ] == '\n' )
-                    i += 1;
-                else
-                    return
-                        RC(rcVFS, rcResolver, rcResolving, rcName, rcNotFound);
-
-                /* parse response table */
-                return version[iVersion].f
-                    (&start[i], size - i, path, mapping, acc, ticket);
-            }
-            /* no break */
-        case sizeof version / sizeof version[0]:
-            return RC(rcVFS, rcResolver, rcResolving, rcName, rcNotFound);
-    }
-}
-
-/* RemoteProtectedResolve
- *  use NCBI CGI to resolve accession into URL
- */
-rc_t VResolverAlgRemoteProtectedResolve( const VResolverAlg *self,
-    const KNSManager *kns, VRemoteProtocols protocols, const String *acc,
-    const VPath ** path, const VPath ** mapping, bool legacy_wgs_refseq )
-{
-    rc_t rc;
-    KHttpRequest *req;
-
-    assert(path);
-
-    DBGMSG(DBG_VFS, DBG_FLAG(DBG_VFS), ("names.cgi = %S\n", self -> root));
-    rc = KNSManagerMakeReliableClientRequest ( kns, & req, 0x01000000, NULL, self -> root -> addr ); 
-    if ( rc == 0 )
-    {
-        /* build up POST information: */
-        DBGMSG(DBG_VFS, DBG_FLAG(DBG_VFS), ("  version = %u.%u\n",
-            NAME_SERVICE_MAJ_VERS, NAME_SERVICE_MIN_VERS));
-        rc = KHttpRequestAddPostParam ( req, "version=%u.%u",
-            NAME_SERVICE_MAJ_VERS, NAME_SERVICE_MIN_VERS );
-        if ( rc == 0 )
-        {
-            DBGMSG(DBG_VFS, DBG_FLAG(DBG_VFS), ("  acc = %S\n", acc));
-            rc = KHttpRequestAddPostParam ( req, "acc=%S", acc ); 
-        }
-        if ( rc == 0 && legacy_wgs_refseq )
-        {
-            DBGMSG(DBG_VFS, DBG_FLAG(DBG_VFS), ("  ctx = refseq\n"));
-            rc = KHttpRequestAddPostParam ( req, "ctx=refseq" );
-        }
-        if ( rc == 0 && self -> ticket != NULL )
-        {
-            DBGMSG(DBG_VFS, DBG_FLAG(DBG_VFS), ("  tic = %S\n", self -> ticket));
-            rc = KHttpRequestAddPostParam ( req, "tic=%S", self -> ticket );
-        }
-
-        if (NAME_SERVICE_VERS >= ONE_DOT_ONE) { /* SRA-1690 */
-            if ( rc == 0 ) {
-                const char *val;
-                switch ( protocols ) {
-                    case eProtocolHttp:
-                        val = "http";
-                        break;
-                    case eProtocolFasp:
-                        val = "fasp";
-                        break;
-                    case eProtocolFaspHttp:
-                        val = "fasp,http";
-                        break;
-                    case eProtocolHttpFasp:
-                        val = "http,fasp";
-                        break;
-                    default:
-                        val = NULL;
-                        rc = RC(
-                            rcVFS, rcResolver, rcResolving, rcParam, rcInvalid);
-                }
-
-                if ( rc == 0 ) {
-                    DBGMSG(DBG_VFS, DBG_FLAG(DBG_VFS),
-                        ("  accept-proto = %s\n", val));
-                    rc = KHttpRequestAddPostParam(req, "accept-proto=%s", val);
-                }
-            }
-        }
-
-        if ( rc == 0 )
-        {
-            KHttpResult *rslt;
-            
-            rc = KHttpRequestPOST ( req, &rslt ); /* will retry if needed `*/
-            if ( rc == 0 )
-            {
-                uint32_t code;
-
-                rc = KHttpResultStatus ( rslt, &code, NULL, 0, NULL );
-                if ( code == 200 )
-                {
-                    KStream *response;
-                    
-                    rc = KHttpResultGetInputStream ( rslt, &response );
-                    if ( rc == 0 )
-                    {
-                        size_t num_read;
-                        size_t total = 0;
-                        
-                        KDataBuffer result;
-                        memset ( & result, 0, sizeof result );
-                        KDataBufferMakeBytes ( & result, 4096 );
-
-                        while ( 1 )
-                        {
-                            uint8_t *base;
-                            uint64_t avail = result . elem_count - total;
-                            if ( avail < 256 )
-                            {
-                                rc = KDataBufferResize ( & result, result . elem_count + 4096 );
-                                if ( rc != 0 )
-                                    break;
-                            }
-                            
-                            base = result . base;
-                            rc = KStreamRead ( response, & base [ total ], ( size_t ) result . elem_count - total, & num_read );
-                            if ( rc != 0 )
-                            {
-                                /* TBD - look more closely at rc */
-                                if ( num_read > 0 )
-                                    rc = 0;
-                                else
-                                    break;
-                            }
-
-                            if ( num_read == 0 )
-                                break;
-
-                            total += num_read;
-                        }
-
-                        if ( rc == 0 )
-                        {
-                            result.elem_count = total;
-
-                            rc = VResolverAlgParseResolverCGIResponse(&result, path, mapping, acc, self->ticket);
-                            KDataBufferWhack ( &result );
-                        }
-
-                        KStreamRelease ( response );
-                    }
-                } else if ( code == 404 ) { /* HTTP/1.1 400 Bad Request -
-                                       resolver CGI was not found */
-                    rc = RC ( rcVFS, rcResolver, rcResolving, rcConnection,
-                        rcNotFound );
-                } else { /* Something completely unexpected */
-                    rc = RC ( rcVFS, rcResolver, rcResolving, rcConnection,
-                        rcUnexpected );
-                }
-                KHttpResultRelease ( rslt );
-            }
-        }
-        KHttpRequestRelease ( req );
-    }
-
-    assert(*path != NULL || rc != 0);
-
-    if (rc == 0 && *path == NULL) 
-    {
-        rc = RC(rcVFS, rcResolver, rcResolving, rcName, rcNull);
-    }
-
-    return rc;
-}
-
-/* RemoteResolve
- *  resolve an accession into a VPath or not found
- *
- *  1. expand accession according to algorithm
- *  2. search all volumes for accession
- *  3. return not found or new VPath
- */
-static
-rc_t VResolverAlgRemoteResolve ( const VResolverAlg *self,
-    const KNSManager *kns, VRemoteProtocols protocols, const VResolverAccToken *tok,
-    const VPath ** path, const VPath ** mapping, const KFile ** opt_file_rtn, bool legacy_wgs_refseq )
-{
-    rc_t rc;
-    uint32_t i, count;
-
-    /* expanded accession */
-    String exp;
-    size_t size;
-    char expanded [ 256 ];
-
-    const String *root;
-
-    assert(self);
-
-    /* check for download ticket */
-    if ( self -> alg_id == algCGI
-#if NO_LEGACY_WGS_REFSEQ_CGI
-         && ! legacy_wgs_refseq
-#endif
-        )
-    {
-        rc = VResolverAlgRemoteProtectedResolve ( self,
-            kns, protocols, & tok -> acc, path, mapping, legacy_wgs_refseq );
-
-        if (rc == 0 && path != NULL && *path != NULL &&
-            opt_file_rtn != NULL && *opt_file_rtn == NULL &&
-            VPathGetUri_t ( * path ) != vpuri_fasp )
-        {
-            const String *s = NULL;
-            rc_t rc = VPathMakeString(*path, &s);
-            if (rc != 0)
-            {
-                LOGERR(klogInt, rc,
-                    "failed to make string from remote protected path");
-            }
-            else
-            {
-                rc = KNSManagerMakeReliableHttpFile ( kns, opt_file_rtn, NULL, 0x01010000, "%S", s );
-                if (rc != 0)
-                {
-                    PLOGERR(klogInt, (klogInt, rc,
-                        "failed to open file for $(path)", "path=%s", s->addr));
-                }
-                StringWhack ( s );
-            }
-        }
-        return rc;
-    }
-
-    /* now we know just how to resolve HTTP locations */
-    if ( protocols == eProtocolFasp ) {
-        return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-    }
-
-    /* for remote, root can never be NULL */
-    root = self -> root;
-
-    /* expand the accession */
-    rc = expand_algorithm ( self, tok, expanded, sizeof expanded, & size, legacy_wgs_refseq );
-
-    /* should never have a problem here... */
-    if ( rc != 0 )
-        return rc;
-
-    /* turn the expanded portion into a String
-       we know that size is also length due to
-       accession content rules */
-    StringInit ( & exp, expanded, size, ( uint32_t ) size );
-
-    /* now search all remote volumes */
-    count = VectorLength ( & self -> vols );
-    for ( i = 0; i < count; ++ i )
-    {
-        char url [ 8192 ];
-        const String *vol = VectorGet ( & self -> vols, i );
-        rc = string_printf ( url, sizeof url, NULL, "%S/%S/%S", root, vol, & exp );
-        if ( rc == 0 )
-        {
-            const KFile *f;
-            rc = KNSManagerMakeHttpFile ( kns, & f, NULL, 0x01010000, url );
-            if ( rc == 0 )
-            {
-                if ( opt_file_rtn != NULL )
-                    * opt_file_rtn = f;
-                else
-                    KFileRelease ( f );
-
-                if ( legacy_wgs_refseq )
-                    return VResolverAlgMakeRemoteWGSRefseqURI ( self, url, & tok -> acc, path );
-                return VResolverAlgMakeRemotePath ( self, url, path );
-            }
-        }
-    }
-    
-    return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-}
-
-
-/* CacheResolve
- *  try to resolve accession for currently cached file
- */
-static
-rc_t VResolverAlgCacheResolve ( const VResolverAlg *self,
-    const KDirectory *wd, const VResolverAccToken *tok,
-    const VPath ** path, bool legacy_wgs_refseq )
-{
-    /* see if the cache file already exists */
-    const bool for_cache = true;
-    rc_t rc = VResolverAlgLocalResolve ( self, wd, tok, path, legacy_wgs_refseq, for_cache );
-    if ( rc == 0 )
-        return 0;
-
-    /* TBD - see if any of these volumes is a good candidate for creating a file */
-
-    return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-}
-
-
-/* CacheFile
- *  try to resolve name for currently cached file
- */
-static
-rc_t VResolverAlgCacheFile ( const VResolverAlg *self,
-    const KDirectory *wd, const VPath *query, const VPath ** path )
-{
-    /* see if the cache file already exists */
-    const bool for_cache = true;
-    rc_t rc = VResolverAlgLocalFile ( self, wd, query, path, for_cache );
-    if ( rc == 0 )
-        return 0;
-
-    /* TBD - see if any of these volumes is a good candidate for creating a file */
-
-    return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-}
-
-
-
-/* MakeCachePath
- *  we have an accession that matches this volume
- *  create a path for it
- */
-static
-rc_t VResolverAlgMakeCachePath ( const VResolverAlg *self,
-    const VResolverAccToken *tok, const VPath ** path, bool legacy_wgs_refseq )
-{
-    uint32_t i, count;
-
-    /* expanded accession */
-    String exp;
-    size_t size;
-    char expanded [ 256 ];
-
-    const String *vol;
-
-    /* expand the accession */
-    rc_t rc = expand_algorithm ( self, tok, expanded, sizeof expanded, & size, legacy_wgs_refseq );
-
-    /* should never have a problem here... */
-    if ( rc != 0 )
-        return rc;
-
-    /* turn the expanded portion into a String
-       we know that size is also length due to
-       accession content rules */
-    StringInit ( & exp, expanded, size, ( uint32_t ) size );
-
-    /* now search all volumes */
-    count = VectorLength ( & self -> vols );
-    for ( i = 0; i < count; ++ i )
-    {
-        vol = VectorGet ( & self -> vols, i );
-        return VResolverAlgMakeLocalPath ( self, vol, & exp, path );
-    }
-    
-    return RC ( rcVFS, rcResolver, rcResolving, rcPath, rcNotFound );
-}
-
-
-/* MakeCacheFilePath
- *  we have a filename that matches this volume
- *  create a path for it
- */
-static
-rc_t VResolverAlgMakeCacheFilePath ( const VResolverAlg *self,
-    const VPath *query, const VPath ** path )
-{
-    String fname = query -> path;
-
-    /* needs proper extension for krypto */
-    const char * krypto_ext = self -> protected ? ".ncbi_enc" : "";
-
-    /* now search all volumes */
-    uint32_t i, count = VectorLength ( & self -> vols );
-    for ( i = 0; i < count; ++ i )
-    {
-        const String *vol = VectorGet ( & self -> vols, i );
-        return VResolverAlgMakeLocalFilePath ( self, vol, & fname, krypto_ext, path );
-    }
-    
-    return RC ( rcVFS, rcResolver, rcResolving, rcPath, rcNotFound );
-}
-
-
-
-/*--------------------------------------------------------------------------
- * VResolver
- */
-struct VResolver
-{
-    /* root paths - stored as String* */
-    Vector roots;
-
-    /* volume algorithms - stored as VResolverAlg* */
-    Vector local;
-    Vector remote;
-
-    /* working directory for testing local paths */
-    const KDirectory *wd;
-
-    /* if there is a protected remote resolver,
-       we will need a KNS manager */
-    const KNSManager *kns;
-
-    /* if there is a working protected repository,
-       store the download ticket here */
-    const String *ticket;
-
-    KRefcount refcount;
-
-    /* counters for various app volumes */
-    uint32_t num_app_vols [ appCount ];
-
-    /* preferred protocols preferences. Default: HTTP */
-    VRemoteProtocols protocols;
-
-    /** projectId of protected user repository;
-        0 when repository is not user protected */
-    uint32_t projectId;
-};
-
-
-/* "process" global settings
- *  actually, they are library-closure global
- */
-static atomic32_t enable_local, enable_remote, enable_cache;
-
-
-/* Whack
- */
-static
-rc_t VResolverWhack ( VResolver *self )
-{
-    KRefcountWhack ( & self -> refcount, "VResolver" );
-
-    /* drop all remote volume sets */
-    VectorWhack ( & self -> remote, VResolverAlgWhack, NULL );
-
-    /* drop local volume sets */
-    VectorWhack ( & self -> local, VResolverAlgWhack, NULL );
-
-    /* drop download ticket */
-    if ( self -> ticket != NULL )
-        StringWhack ( ( String* ) self -> ticket );
-
-    /* drop root paths */
-    VectorWhack ( & self -> roots, string_whack, NULL );
-
-    /* release kns */
-    if ( self -> kns != NULL )
-        KNSManagerRelease ( self -> kns );
-
-    /* release directory onto local file system */
-    KDirectoryRelease ( self -> wd );
-
-    free ( self );
-    return 0;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT
-rc_t CC VResolverAddRef ( const VResolver * self )
-{
-    if ( self != NULL )
-    {
-        switch ( KRefcountAdd ( & self -> refcount, "VResolver" ) )
-        {
-        case krefOkay:
-            break;
-        case krefZero:
-            return RC ( rcVFS, rcResolver, rcAttaching, rcRefcount, rcIncorrect );
-        case krefLimit:
-            return RC ( rcVFS, rcResolver, rcAttaching, rcRefcount, rcExhausted );
-        case krefNegative:
-            return RC ( rcVFS, rcResolver, rcAttaching, rcRefcount, rcInvalid );
-        default:
-            return RC ( rcVFS, rcResolver, rcAttaching, rcRefcount, rcUnknown );
-        }
-    }
-    return 0;
-}
-
-LIB_EXPORT
-rc_t CC VResolverRelease ( const VResolver * self )
-{
-    rc_t rc = 0;
-    if ( self != NULL )
-    {
-        switch ( KRefcountDrop ( & self -> refcount, "VResolver" ) )
-        {
-        case krefOkay:
-        case krefZero:
-            break;
-        case krefWhack:
-            VResolverWhack ( ( VResolver* ) self );
-            break;
-        case krefNegative:
-            return RC ( rcVFS, rcResolver, rcAttaching, rcRefcount, rcInvalid );
-        default:
-            rc = RC ( rcVFS, rcResolver, rcAttaching, rcRefcount, rcUnknown );
-            break;            
-        }
-    }
-    return rc;
-}
-
-
-/* get_accession_code
- */
-static
-uint32_t get_accession_code ( const String * accession, VResolverAccToken *tok )
-{
-#if USE_VPATH_OPTIONS_STRINGS
-#error this thing is wrong
-#else
-
-#define MAX_ACCESSION_LEN 20
-
-    uint32_t code;
-
-    const char *acc = NULL;
-    size_t i, size = 0;
-
-    assert(accession);
-
-    acc = accession -> addr;
-    size = accession -> size;
-
-    /* capture the whole accession */
-    tok -> acc = * accession;
-
-    /* scan prefix or alpha */
-    for ( i = 0; i < size; ++ i )
-    {
-        if ( ! isalpha ( acc [ i ] ) )
-            break;
-    }
-
-    /* terrible situation - unrecognizable */
-    if ( i == size || i == 0 || i >= MAX_ACCESSION_LEN )
-    {
-        StringInit ( & tok -> prefix, acc, 0, 0 );
-        StringInit ( & tok -> alpha, acc, i, (uint32_t)i );
-        StringInit ( & tok -> digits, & acc [ i ], 0, 0 );
-        tok -> ext1 = tok -> ext2 = tok -> suffix = tok -> digits;
-        return 0;
-    }
-
-    /* if stopped on '_', we have a prefix */
-    if ( acc [ i ] == '_' )
-    {
-        /* prefix
-           store only its presence, not length */
-        code = 1 << 4 * 4;
-        StringInit ( & tok -> prefix, acc, i, (uint32_t)i );
-
-        /* remove prefix */
-        acc += ++ i;
-        size -= i;
-
-        /* scan for alpha */
-        for ( i = 0; i < size; ++ i )
-        {
-            if ( ! isalpha ( acc [ i ] ) )
-                break;
-        }
-
-        if ( i == size || i >= MAX_ACCESSION_LEN )
-        {
-            StringInit ( & tok -> alpha, acc, i, (uint32_t)i );
-            StringInit ( & tok -> digits, & acc [ i ], 0, 0 );
-            tok -> ext1 = tok -> ext2 = tok -> suffix = tok -> digits;
-            return 0;
-        }
-
-        code |= i << 4 * 3;
-        StringInit ( & tok -> alpha, acc, i, (uint32_t)i );
-    }
-    else if ( ! isdigit ( acc [ i ] ) )
-    {
-        StringInit ( & tok -> prefix, acc, 0, 0 );
-        StringInit ( & tok -> alpha, acc, i, (uint32_t)i );
-        StringInit ( & tok -> digits, & acc [ i ], 0, 0 );
-        tok -> ext1 = tok -> ext2 = tok -> suffix = tok -> digits;
-        return 0;
-    }
-    else
-    {
-        /* alpha */
-        code = (uint32_t) ( i << 4 * 3 );
-        StringInit ( & tok -> prefix, acc, 0, 0 );
-        StringInit ( & tok -> alpha, acc, i, (uint32_t)i );
-    }
-
-    /* remove alpha */
-    acc += i;
-    size -= i;
-
-    /* scan digits */
-    for ( i = 0; i < size; ++ i )
-    {
-        if ( ! isdigit ( acc [ i ] ) )
-            break;
-    }
-
-    /* record digits */
-    StringInit ( & tok -> digits, acc, i, (uint32_t)i );
-    StringInit ( & tok -> ext1, & acc [ i ], 0, 0 );
-    tok -> ext2 = tok -> suffix = tok -> ext1;
-
-    if ( i == 0 || i >= MAX_ACCESSION_LEN )
-        return 0;
-
-    code |= i << 4 * 2;
-
-    /* normal return point for SRA */
-    if ( i == size )
-        return code;
-
-    /* check for extension */
-    if ( acc [ i ] != '.' )
-        return 0;
-
-    /* remove digit */
-    acc += ++ i;
-    size -= i;
-    
-    /* check pileup extension */
-    if ( string_cmp( acc, size, "pileup", 6, size + 6 ) == 0 )
-    {
-        i = 6;
-    }
-    else
-    {
-        /* scan numeric extension */
-        for ( i = 0; i < size; ++ i )
-        {
-            if ( ! isdigit ( acc [ i ] ) )
-                break;
-        }
-    }
-
-    if ( i == 0 || i >= MAX_ACCESSION_LEN )
-        return 0;
-
-    /* record the actual extension */
-    StringInit ( & tok -> ext1, acc, i, (uint32_t)i );
-    /* codify the extension simply as present, not by its length */
-    code |= 1 << 4 * 1;
-
-    if ( i == size )
-        return code;
-
-    /* scan for suffix */
-    if ( acc [ i ] == '_' )
-    {
-        acc += ++ i;
-        size -= i;
-        for ( i = 0; i < size; ++ i )
-        {
-            if ( ! isalpha ( acc [ i ] ) )
-                break;
-        }
-
-        /* this has to end the whole thing */
-        if ( i == 0 || i != size )
-            return 0;
-
-        StringInit ( & tok -> suffix, acc, i, (uint32_t)i );
-        /* NB - not incorporating suffix into code right now */
-        return code;
-    }
-
-    if ( acc [ i ] != '.' )
-        return 0;
-
-
-    /* remove first extension */
-    acc += ++ i;
-    size -= i;
-
-    /* scan 2nd numeric extension */
-    for ( i = 0; i < size; ++ i )
-    {
-        if ( ! isdigit ( acc [ i ] ) )
-            break;
-    }
-
-    if ( i == 0 || i >= MAX_ACCESSION_LEN )
-        return 0;
-
-    StringInit ( & tok -> ext2, acc, i, (uint32_t)i );
-    code |= 1 << 4 * 0;
-
-    if ( i == size )
-        return code;
-
-    /* no other patterns are accepted */
-    return 0;
-#endif
-}
-
-
-/* get_accession_app
- */
-static
-VResolverAppID get_accession_app ( const String * accession, bool refseq_ctx,
-    VResolverAccToken *tok, bool *legacy_wgs_refseq )
-{
-    VResolverAppID app;
-    uint32_t code = get_accession_code ( accession, tok );
-
-    if (accession != NULL &&
-        accession->addr != NULL && isdigit(accession->addr[0]))
-    {
-        /* TODO: KART */
-        return appAny;
-    }
-
-    /* disregard extensions at this point */
-    switch ( code >> 4 * 2 )
-    {
-    case 0x015: /* e.g. "J01415" or "J01415.2"     */
-    case 0x026: /* e.g. "CM000071" or "CM000039.2" */
-    case 0x126: /* e.g. "NZ_DS995509.1"            */
-        app = appREFSEQ;
-        break;
-
-    case 0x036: /* e.g. "SRR012345"    */
-    case 0x037: /* e.g. "SRR0123456"   */
-    case 0x038: /* e.g. "SRR01234567"  */
-    case 0x039: /* e.g. "SRR012345678" */
-
-        /* detect accession with extension */
-        if ( ( code & 0xFF ) != 0 )
-        {
-            /* check pileup suffix, e.g. "SRR012345.pileup" */
-            String suffix = tok -> ext1;
-            if ( suffix . size == 6 &&
-                 suffix . addr [ 0 ] == 'p' &&
-                 suffix . addr [ 1 ] == 'i' &&
-                 suffix . addr [ 2 ] == 'l' &&
-                 suffix . addr [ 3 ] == 'e' &&
-                 suffix . addr [ 4 ] == 'u' &&
-                 suffix . addr [ 5 ] == 'p' )
-            {
-                app = appSRAPileup;
-            }
-            else
-            {
-                app = appAny;
-            }
-        }
-        else
-        {
-            app = appSRA;
-        }
-        break;
-
-    case 0x106: /* e.g. "NC_000012.10"                      */
-    case 0x109: /* e.g. "NW_003315935.1", "GPC_000000393.1" */
-        if ( tok -> prefix . size == 3 &&
-             tok -> prefix . addr [ 0 ] == 'G' &&
-             tok -> prefix . addr [ 1 ] == 'C' &&
-             ( tok -> prefix . addr [ 2 ] == 'A' || tok -> prefix . addr [ 2 ] == 'F' ) )
-        {
-            /* e.g. "GCA_000392025.1_L" */
-            app = appNAKMER;
-            break;
-        }
-
-        app = appREFSEQ;
-        break;
-
-    case 0x042: /* e.g. "AAAB01" is WGS package name */
-    case 0x048: /* e.g. "AAAA01000001"               */
-    case 0x049: /* contig can be 6 or 7 digits       */
-    case 0x142: /* e.g. "NZ_AAEW01"                  */
-    case 0x148: /* e.g. "NZ_AAEW01000001"            */
-    case 0x149:
-        app = appWGS;
-        break;
-
-    case 0x029: /* e.g. NA000008777.1 */
-        if ( code == 0x02910 )
-        {
-            if ( tok -> alpha . addr [ 0 ] == 'N' && tok -> alpha . addr [ 1 ] == 'A' )
-            {
-                app = appNANNOT;
-                break;
-            }
-        }
-
-        /* no break */
-
-    default:
-        /* TBD - people appear to be able to throw anything into refseq,
-           so anything unrecognized we may as well test out there...
-           but this should not stay the case */
-        app = appREFSEQ;
-    }
-
-    if ( app == appWGS )
-    {
-        /* if we know this is for refseq, clobber it here */
-        if ( refseq_ctx )
-        {
-            app = appREFSEQ;
-            * legacy_wgs_refseq = true;
-        }
-    }
-
-    return app;
-}
-
-/* Temporary patch for FUSE mounted accessions
- *  1. determined if accession is mounter locally
- *  2. return not found or new VPath
- */
-static
-rc_t VResolverFuseMountedResolve ( const VResolver * self,
-    const String * accession, const VPath ** path )
-{
-    rc_t rc;
-    struct KDirectory * NativeDir;
-    uint32_t PathType;
-
-    rc = 0;
-    NativeDir = NULL;
-    PathType = kptNotFound;
-
-    rc = KDirectoryNativeDir ( & NativeDir );
-    if ( rc == 0 ) {
-        PathType = KDirectoryPathType ( NativeDir, ".#dbgap-mount-tool#" );
-        if ( PathType == kptFile ) {
-            PathType = KDirectoryPathType (
-                                        NativeDir,
-                                        "%.*s",
-                                        accession -> size,
-                                        accession -> addr
-                                        );
-            if ( PathType == kptFile ) {
-                rc = VPathMakeFmt (
-                                ( VPath ** ) path,
-                                "%.*s",
-                                accession -> size,
-                                accession -> addr
-                                );
-            }
-            else {
-                rc = RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-            }
-        }
-        else {
-            rc = SILENT_RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-        }
-
-        KDirectoryRelease ( NativeDir );
-    }
-
-    return rc;
-}
-
-/* LocalResolve
- *  resolve an accession into a VPath or not found
- *
- *  1. determine the type of accession we have, i.e. its "app"
- *  2. search all local algorithms of app type for accession
- *  3. return not found or new VPath
- */
-static
-rc_t VResolverLocalResolve ( const VResolver *self,
-    const String * accession, const VPath ** path, bool refseq_ctx )
-{
-    uint32_t i, count;
-
-    VResolverAccToken tok;
-    bool legacy_wgs_refseq = false;
-    VResolverAppID app;
-
-
-    if ( VResolverFuseMountedResolve ( self, accession, path ) == 0 ) {
-        return 0;
-    }
-
-    app = get_accession_app ( accession, refseq_ctx, & tok, & legacy_wgs_refseq );
-
-    /* search all local volumes by app and accession algorithm expansion */
-
-
-    count = VectorLength ( & self -> local );
-    for ( i = 0; i < count; ++ i )
-    {
-        const VResolverAlg *alg = VectorGet ( & self -> local, i );
-        if ( alg -> app_id == app )
-        {
-            const bool for_cache = false;
-            rc_t rc = VResolverAlgLocalResolve ( alg, self -> wd, & tok, path, legacy_wgs_refseq, for_cache );
-            if ( rc == 0 )
-                return 0;
-        }
-    }
-
-    return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-}
-
-/* LocalFile
- *  locate a locally stored file
- */
-static
-rc_t VResolverLocalFile ( const VResolver *self, const VPath * query, const VPath ** path )
-{
-    uint32_t i, count;
-
-    count = VectorLength ( & self -> local );
-    for ( i = 0; i < count; ++ i )
-    {
-        const VResolverAlg *alg = VectorGet ( & self -> local, i );
-        if ( alg -> app_id == appFILE )
-        {
-            const bool for_cache = false;
-            rc_t rc = VResolverAlgLocalFile ( alg, self -> wd, query, path, for_cache );
-            if ( rc == 0 )
-                return 0;
-        }
-    }
-
-    return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-}
-
-static
-bool VPathHasRefseqContext ( const VPath * accession )
-{
-    size_t num_read;
-    char option [ 64 ];
-    rc_t rc = VPathOption ( accession, vpopt_vdb_ctx, option, sizeof option, & num_read );
-    if ( rc != 0 )
-        return false;
-
-    return ( num_read == sizeof "refseq" - 1 &&
-             strcase_cmp ( "refseq", sizeof "refseq" - 1,
-                           option, num_read, (uint32_t)num_read ) == 0 );
-}
-
-
-/* Local - DEPRECATED
- *  Find an existing local file/directory that is named by the accession.
- *  rcState of rcNotFound means it does not exist.
- *
- *  other rc code for failure are possible.
- *
- *  Accession must be an ncbi-acc scheme or a simple name with no 
- *  directory paths.
- */
-LIB_EXPORT
-rc_t CC VResolverLocal ( const VResolver * self,
-    const VPath * accession, const VPath ** path )
-{
-    rc_t rc =  VResolverQuery ( self, eProtocolHttp, accession, path, NULL, NULL );
-    if ( rc == 0 )
-    {
-        switch ( accession -> path_type )
-        {
-        case vpOID:
-        case vpAccession:
-        case vpNameOrOID:
-        case vpNameOrAccession:
-            if ( * path != accession )
-                return 0;
-            break;
-
-        case vpName:
-            if ( accession -> query . size != 0 && VPathHasRefseqContext ( accession ) )
-                return 0;
-            break;
-        }
-
-        VPathRelease ( * path );
-        * path = NULL;
-        rc = RC ( rcVFS, rcResolver, rcResolving, rcPath, rcNotFound );
-    }
-    return rc;
-}
-
-
-/* LocalEnable
- *  modify settings for using local repositories,
- *  meaning site, user-public and user-protected.
- *
- *  "enable" [ IN ] - enable or disable local access,
- *  or follow settings in KConfig
- *
- *  returns the previous state of "local-enabled" property
- *
- * NB - in VDB-2, the state is associated with library code
- *  shared libraries in separate closures will have separate
- *  state. this can only occur if dynamic ( manual ) loading of
- *  shared libraries is used, and will not occur with normal
- *  usage. in VDB-3 the state will be stored with the process,
- *  not the library.
- */
-LIB_EXPORT
-VResolverEnableState CC VResolverLocalEnable ( const VResolver * self, VResolverEnableState enable )
-{
-    int32_t val, cur, prior;
-
-    if ( self == NULL )
-        return vrUseConfig;
-
-    /* convert "VResolverEnableState" to 32-bit signed integer for atomic operation */
-    val = ( int32_t ) enable;
-
-    /* before performing atomic swap, get the current setting,
-       and return right away if it is already set correctly */
-    prior = atomic32_read ( & enable_local );
-    if ( prior != val ) do
-    {
-        cur = prior;
-        prior = atomic32_test_and_set ( & enable_local, val, prior );
-    }
-    while ( prior != cur );
-
-    return prior;
-}
-
-
-/* RemoteEnable
- *  apply or remove a process-wide enabling of remote access
- *  regardless of configuration settings
- *
- *  "enable" [ IN ] - if "true", enable all remote access
- *  if false, use settings from configuration.
- *
- *  returns the previous state of "remote-enabled" property
- *
- * NB - in VDB-2, the state is associated with library code
- *  shared libraries in separate closures will have separate
- *  state. this can only occur if dynamic ( manual ) loading of
- *  shared libraries is used, and will not occur with normal
- *  usage. in VDB-3 the state will be stored with the process,
- *  not the library.
- */
-LIB_EXPORT
-VResolverEnableState CC VResolverRemoteEnable ( const VResolver * self, VResolverEnableState enable )
-{
-    int32_t val, cur, prior;
-
-    if ( self == NULL )
-        return vrUseConfig;
-
-    /* convert "VResolverEnableState" to 32-bit signed integer for atomic operation */
-    val = ( int32_t ) enable;
-
-    /* before performing atomic swap, get the current setting,
-       and return right away if it is already set correctly */
-    prior = atomic32_read ( & enable_remote );
-    if ( prior != val ) do
-    {
-        cur = prior;
-        prior = atomic32_test_and_set ( & enable_remote, val, prior );
-    }
-    while ( prior != cur );
-
-    return prior;
-}
-
-
-/* CacheEnable
- *  modify settings for caching files in user repositories
- *
- *  "enable" [ IN ] - enable or disable user repository cache,
- *  or follow settings in KConfig
- *
- *  returns the previous state of "cache-enabled" property
- *
- * NB - in VDB-2, the state is associated with library code
- *  shared libraries in separate closures will have separate
- *  state. this can only occur if dynamic ( manual ) loading of
- *  shared libraries is used, and will not occur with normal
- *  usage. in VDB-3 the state will be stored with the process,
- *  not the library.
- */
-LIB_EXPORT
-VResolverEnableState CC VResolverCacheEnable ( const VResolver * self, VResolverEnableState enable )
-{
-    int32_t val, cur, prior;
-
-    if ( self == NULL )
-        return vrUseConfig;
-
-    /* convert "VResolverEnableState" to 32-bit signed integer for atomic operation */
-    val = ( int32_t ) enable;
-
-    /* before performing atomic swap, get the current setting,
-       and return right away if it is already set correctly */
-    prior = atomic32_read ( & enable_cache );
-    if ( prior != val ) do
-    {
-        cur = prior;
-        prior = atomic32_test_and_set ( & enable_cache, val, prior );
-    }
-    while ( prior != cur );
-
-    return prior;
-}
-
-
-/* RemoteResolve
- *  resolve an accession into a remote VPath or not found
- *  may optionally open a KFile to the object in the process
- *  of finding it
- *
- *  2. determine the type of accession we have, i.e. its "app"
- *  3. search all local algorithms of app type for accession
- *  4. return not found or new VPath
- */
-rc_t VResolverRemoteResolve ( const VResolver *self,
-    VRemoteProtocols protocols, const String * accession,
-    const VPath ** path, const VPath **mapping,
-    const KFile ** opt_file_rtn, bool refseq_ctx, bool is_oid )
-{
-    rc_t rc, try_rc;
-    uint32_t i, count;
-
-    VResolverAccToken tok;
-    VResolverAppID app, wildCard;
-    bool legacy_wgs_refseq = false;
-
-    VResolverEnableState remote_state = atomic32_read ( & enable_remote );
-
-    /* subject the accession to pattern recognition */
-    if ( ! is_oid )
-        app = get_accession_app ( accession, refseq_ctx, & tok, & legacy_wgs_refseq );
-    else
-    {
-        app = appAny;
-        VResolverAccTokenInitFromOID ( & tok, accession );
-    }
-
-    assert(self);
-
-    /* search all remote volumes by app and accession algorithm expansion */
-    count = VectorLength ( & self -> remote );
-
-    /* allow matching wildcard app */
-    wildCard = appAny;
-#if NO_REFSEQ_CGI
-    if ( app == appREFSEQ )
-        wildCard = -1;
-#endif
-
-    /* no error recorded yet */
-    rc = 0;
-
-    /* TBD - determine whether these settings interfere with
-       case of resolving oid to cache location */
-
-    /* test for forced enable, which applies only to main guys
-       TBD - limit to main sub-category */
-    if ( remote_state == vrAlwaysEnable )
-    {
-        for ( i = 0; i < count; ++ i )
-        {
-            const VResolverAlg *alg = VectorGet ( & self -> remote, i );
-            if ( alg -> app_id == app || alg -> app_id == wildCard )
-            {
-                try_rc = VResolverAlgRemoteResolve ( alg, self -> kns, protocols, & tok, path, mapping, opt_file_rtn, legacy_wgs_refseq );
-                if ( try_rc == 0 )
-                    return 0;
-                if ( rc == 0 )
-                    rc = try_rc;
-            }
-        }
-    }
-    else
-    {
-        for ( i = 0; i < count; ++ i )
-        {
-            const VResolverAlg *alg = VectorGet ( & self -> remote, i );
-            if ( ( alg -> app_id == app || alg -> app_id == wildCard ) && ! alg -> disabled )
-            {
-                try_rc = VResolverAlgRemoteResolve ( alg, self -> kns, protocols, & tok, path, mapping, opt_file_rtn, legacy_wgs_refseq );
-                if ( try_rc == 0 )
-                    return 0;
-                if ( rc == 0 )
-                    rc = try_rc;
-            }
-        }
-    }
-
-    if ( rc != 0 )
-        return rc;
-
-    return RC ( rcVFS, rcResolver, rcResolving, rcName, rcNotFound );
-}
-
-
-/* Remote
- *  Find an existing remote file that is named by the accession.
- *
- *  rcState of rcNotFound means it did not exist and can not be 
- *  downloaded. Probably a bad accession name.
- *
- *  Need a specific rc for no network configured.
- *  Need a specific rc for network access permitted.
- *
- *  Other rc code for failure are possible.
- *
- *  Accession must be an ncbi-acc scheme or a simple name with no 
- *  directory paths.
- */
-LIB_EXPORT
-rc_t CC VResolverRemote ( const VResolver * self,
-    VRemoteProtocols protocols, const VPath * accession,
-    const VPath ** path )
-{
-    return VResolverQuery ( self, protocols, accession, NULL, path, NULL );
-}
-
-/* ExtractAccessionApp
- *  examine a path for accession portion,
- *  and try to recognize what app it belongs to
- */
-static
-VResolverAppID VResolverExtractAccessionApp ( const VResolver *self,
-    const VPath * query, bool has_fragment,
-    String * accession, VResolverAccToken * tok,
-    bool *legacy_wgs_refseq )
-{
-    bool refseq_ctx = has_fragment;
-
-    * accession = query -> path;
-
-    if ( query -> fragment . size > 1 )
-        refseq_ctx = true;
-
-    /* should have something looking like an accession.
-       determine its app to see if we were successful */
-    return get_accession_app ( accession, refseq_ctx, tok, legacy_wgs_refseq );
-}
-
-static
-bool VPathHasDownloadTicket ( const VPath * url )
-{
-    size_t num_read;
-    char option [ 64 ];
-    rc_t rc = VPathOption ( url, vpopt_gap_ticket, option, sizeof option, & num_read );
-    return rc == 0;
-}
-
-static
-rc_t VPathExtractAcc ( const VPath * url, VPath ** acc )
-{
-    rc_t rc;
-    String accession;
-
-    /* locate last path or accession guy */
-    const char * start = string_rchr ( url -> path . addr, url -> path . size, '/' );
-    const char * sep, * end = url -> path . addr + url -> path . size;
-    if ( start ++ == NULL )
-        start = url -> path . addr;
-
-    /* strip off known extensions */
-    sep = string_rchr ( start, end - start, '.' );
-    while ( sep != NULL )
-    {
-        switch ( end - sep )
-        {
-        case 4:
-            if ( strcase_cmp ( ".sra", 4, sep, 4, 4 ) == 0 )
-                end = sep;
-            else if ( strcase_cmp ( ".wgs", 4, sep, 4, 4 ) == 0 )
-                end = sep;
-            break;
-        case 9:
-            if ( strcase_cmp ( ".vdbcache", 9, sep, 9, 9 ) == 0 ||
-                 strcase_cmp ( ".ncbi_enc", 9, sep, 9, 9 ) == 0 )
-            {
-                end = sep;
-                sep = string_rchr ( start, end - start, '.' );
-                continue;
-            }
-            break;
-        }
-        break;
-    }
-
-    /* this is the string */
-    StringInit ( & accession, start, end - start, string_len ( start, end - start ) );
-
-    /* now extract the mapping */
-    rc = LegacyVPathMakeFmt ( acc, "ncbi-acc:%S%S%S",
-        & accession, & url -> query, & url -> fragment );
-    if ( rc == 0 )
-    {
-        VPath * ap = * acc;
-
-        /* fix up case where we said accession but it was really a name */
-        if ( ap -> acc_code == 0 || ap -> path_type != vpAccession )
-            CONST_STRING ( & ap -> scheme, "ncbi-file" );
-    }
-
-    return rc;
-}
-
-static
-rc_t VResolverCacheResolve ( const VResolver *self,
-    const VPath * query, bool has_fragment,
-    const VPath ** cache, bool refseq_ctx )
-{
-    rc_t rc = 0;
-
-    String accession;
-    VResolverAccToken tok;
-    bool legacy_wgs_refseq = false;
-    VResolverAppID app = VResolverExtractAccessionApp ( self,
-        query, has_fragment, & accession, & tok, & legacy_wgs_refseq );
-
-    /* going to walk the local volumes, and remember
-       which one was best. actually, we have no algorithm
-       for determining it, so it's just the comment for TBD */
-    const VResolverAlg *alg, *better = NULL, *best = NULL;
-
-    /* search the volumes for a cache-enabled place */
-    uint32_t i, count = VectorLength ( & self -> local );
-
-    /* check for protected status by presence of a download ticket */
-    bool protected = VPathHasDownloadTicket ( query );
-
-    VResolverEnableState cache_state = atomic32_read ( & enable_cache );
-
-    /* check for cache-enable override */
-    if ( cache_state == vrAlwaysEnable )
-    {
-        for ( i = 0; i < count; ++ i )
-        {
-            alg = VectorGet ( & self -> local, i );
-            if ( alg -> cache_capable && alg -> protected == protected &&
-                 ( alg -> app_id == app || alg -> app_id == appAny ) )
-            {
-                /* try to find an existing cache file
-                   NB - race condition exists unless
-                   we do something with lock files */
-                rc = VResolverAlgCacheResolve ( alg, self -> wd, & tok, cache, legacy_wgs_refseq );
-                if ( rc == 0 )
-                    return 0;
-
-                /* just remember the first as best for now */
-                if ( alg -> app_id == app ) {
-                    if ( best == NULL )
-                        best = alg;
-                } else {
-                    assert ( alg -> app_id == appAny );
-                    if ( better == NULL )
-                        better = alg;
-                }
-            }
-        }
-    }
-    else
-    {
-        for ( i = 0; i < count; ++ i )
-        {
-            alg = VectorGet ( & self -> local, i );
-            if ( alg -> cache_enabled && alg -> protected == protected &&
-                 ( alg -> app_id == app || alg -> app_id == appAny ) )
-            {
-                /* try to find an existing cache file
-                   NB - race condition exists unless
-                   we do something with lock files */
-                rc = VResolverAlgCacheResolve ( alg, self -> wd, & tok, cache, legacy_wgs_refseq );
-                if ( rc == 0 )
-                    return 0;
-
-                /* just remember the first as best for now */
-                if ( best == NULL )
-                    best = alg;
-            }
-        }
-    }
-    
-    /* no existing cache file was found,
-       so create a new one using the best
-       TBD - this should remember a volume path */
-    if ( best == NULL && better == NULL )
-        rc = RC ( rcVFS, rcResolver, rcResolving, rcPath, rcNotFound );
-    else {
-        alg = best == NULL ? better : best;
-        assert ( alg );
-        rc = VResolverAlgMakeCachePath ( alg, & tok, cache, legacy_wgs_refseq );
-    }
-
-    return rc;
-}
-
-static
-rc_t VResolverCacheFile ( const VResolver *self, const VPath * query, const VPath ** cache )
-{
-    rc_t rc = 0;
-
-    /* going to walk the local volumes, and remember
-       which one was best. actually, we have no algorithm
-       for determining it, so it's just the comment for TBD */
-    const VResolverAlg *alg, *best = NULL;
-
-    /* search the volumes for a cache-enabled place */
-    uint32_t i, count = VectorLength ( & self -> local );
-
-    /* check for protected status by presence of a download ticket */
-    bool protected = VPathHasDownloadTicket ( query );
-
-    VResolverEnableState cache_state = atomic32_read ( & enable_cache );
-
-    /* check for cache-enable override */
-    if ( cache_state == vrAlwaysEnable )
-    {
-        for ( i = 0; i < count; ++ i )
-        {
-            alg = VectorGet ( & self -> local, i );
-            if ( alg -> cache_capable && alg -> protected == protected && alg -> app_id == appFILE )
-            {
-                /* try to find an existing cache file
-                   NB - race condition exists unless
-                   we do something with lock files */
-                rc = VResolverAlgCacheFile ( alg, self -> wd, query, cache );
-                if ( rc == 0 )
-                    return 0;
-
-                /* just remember the first as best for now */
-                if ( best == NULL )
-                    best = alg;
-            }
-        }
-    }
-    else
-    {
-        for ( i = 0; i < count; ++ i )
-        {
-            alg = VectorGet ( & self -> local, i );
-            if ( alg -> cache_enabled && alg -> protected == protected && alg -> app_id == appFILE )
-            {
-                /* try to find an existing cache file
-                   NB - race condition exists unless
-                   we do something with lock files */
-                rc = VResolverAlgCacheFile ( alg, self -> wd, query, cache );
-                if ( rc == 0 )
-                    return 0;
-
-                /* just remember the first as best for now */
-                if ( best == NULL )
-                    best = alg;
-            }
-        }
-    }
-    
-    /* no existing cache file was found,
-       so create a new one using the best
-       TBD - this should remember a volume path */
-    if ( best == NULL )
-        rc = RC ( rcVFS, rcResolver, rcResolving, rcPath, rcNotFound );
-    else
-        rc = VResolverAlgMakeCacheFilePath ( best, query, cache );
-
-    return rc;
-}
-
-
-/* Cache
- *  Find a cache directory that might or might not contain a partially
- *  downloaded file.
- *
- *  Accession must be an ncbi-acc scheme, an http url or a simple name with no 
- *  directory paths. All three should return the same directory URL as a VPath. (?)
- *  Or should it be a directory or a file url depending upon finding a partial
- *  download? This would require co-ordination with all download mechanisms that
- *  we permit.
- *
- *  With refseq holding wgs objects we have a case were the downloaded file is not
- *  named the same as the original accession as the file archive you want is a
- *  container for other files.
- *
- *  Find local will give a path that has a special scheme in these cases. 
- *  Find remote will give the url for the container that contains the accession
- *  so using the returned VPath from resolve remote is better than the original
- *  accession in this one case.  I think...
- */
-LIB_EXPORT
-rc_t CC VResolverCache ( const VResolver * self,
-    const VPath * url, const VPath ** path, uint64_t file_size )
-{
-    return VResolverQuery ( self, eProtocolHttp, url, NULL, NULL, path );
-}
-
-/* QueryOID
- */
-
-static
-rc_t get_query_accession ( const VPath * query, String * accession, char * oid_str, size_t bsize )
-{
-    rc_t rc;
-
-    /* going to treat oid as accession */
-    * accession = query -> path;
-
-    /* if the VPath already gives us a numeral, great */
-    if ( query -> path . size != 0 && query -> path . addr [ 0 ] != '0' )
-        return 0;
-
-    /* otherwise, generate one on stack */
-    rc = string_printf ( oid_str, bsize, & accession -> size, "%u", query -> obj_id );
-    if ( rc == 0 )
-    {
-        accession -> addr = oid_str;
-        accession -> len = ( uint32_t ) accession -> size;
-    }
-
-    return rc;
-}
-
-static
-rc_t VResolverQueryOID ( const VResolver * self, VRemoteProtocols protocols,
-    const VPath * query, const VPath ** local, const VPath ** remote, const VPath ** cache )
-{
-    rc_t rc;
-
-    /* require non-zero oid */
-    if ( query -> obj_id == 0 )
-        rc = RC ( rcVFS, rcResolver, rcResolving, rcPath, rcCorrupt );
-    else
-    {
-        /* temporary - no access to vfs
-           NB - this manager will either use a singleton
-           or create a new one with its existing config */
-        VFSManager * vfs;
-        rc = VFSManagerMake ( & vfs );
-        if ( rc == 0 )
-        {
-            char oid_str [ 32 ];
-            String accession;
-            VPath * mapped_query = NULL;
-
-            /* not expected to ever be true */
-            bool refseq_ctx = VPathHasRefseqContext ( query );
-
-            /* PREFACE - having an oid, we will need to map it to either
-               an accession or simple filename before resolving to a
-               local or cache path. there are two ways of getting this
-               mapping: either through the VFS manager, or by asking the
-               remote resolver CGI.
-
-               ASSUMPTION - if the file exists locally or is cached,
-               there should be a mapping available to VFS manager. this
-               assumption can fail if the mapping database has been lost
-               or damaged.
-            */
-
-            /* MAP OID TO ACCESSION */
-            if ( local != NULL || cache != NULL )
-            {
-                /* we want a mapping. ask VFS manager for one */
-                rc = VFSManagerGetObject ( vfs, query -> obj_id, & mapped_query );
-                if ( GetRCState ( rc ) == rcNotFound )
-                {
-                    /* no mapping could be found. another possibility is to resolve remotely */
-                    if ( remote != NULL || atomic32_read ( & enable_remote ) != vrAlwaysDisable )
-                    {
-                        rc = get_query_accession ( query, & accession, oid_str, sizeof oid_str );
-                        if ( rc == 0 )
-                        {
-                            const VPath * remote2, * remote_mapping = NULL;
-                            rc = VResolverRemoteResolve ( self, protocols, & accession,
-                                & remote2, & remote_mapping, NULL, refseq_ctx, true );
-                            if ( rc == 0 )
-                            {
-                                /* got it. now enter into VFS manager's table */
-                                rc = VFSManagerRegisterObject ( vfs, query -> obj_id, remote_mapping );
-                                if ( rc == 0 )
-                                {
-                                    mapped_query = ( VPath* ) remote_mapping;
-                                    remote_mapping = NULL;
-                                    if ( remote != NULL )
-                                    {
-                                        * remote = remote2;
-                                        remote2 = NULL;
-                                    }
-                                }
-
-                                VPathRelease ( remote2 );
-                                VPathRelease ( remote_mapping );
-                            }
-                        }
-                    }
-                }
-
-                if ( rc == 0 )
-                {
-                    assert ( mapped_query != NULL );
-
-                    /* the returned VPath should be of a usable type */
-                    assert ( mapped_query -> path_type == vpAccession       ||
-                             mapped_query -> path_type == vpNameOrAccession ||
-                             mapped_query -> path_type == vpName );
-                    assert ( mapped_query -> path . size != 0 );
-                }
-            }
-
-            /* RESOLVE FOR LOCAL PATH */
-            if ( local != NULL && mapped_query != NULL )
-            {
-                if ( mapped_query -> path_type == vpName )
-                {
-                    /* see if this is a file stored locally */
-                    rc = VResolverLocalFile ( self, mapped_query, local );
-                }
-                else
-                {
-                    /* grab the path as accession */
-                    accession = mapped_query -> path;
-
-                    /* resolve from accession to local path
-                       will NOT find partial cache files */
-                    rc = VResolverLocalResolve ( self, & accession, local, refseq_ctx );
-                }
-
-                if ( rc == 0 && remote != NULL && * remote != NULL )
-                {
-                    /* dump remote path used to map oid */
-                    VPathRelease ( * remote );
-                    * remote = NULL;
-                }
-            }
-
-            if ( local == NULL || * local == NULL )
-            {
-                bool has_fragment = false;
-
-                /* RESOLVE FOR REMOTE */
-                if ( remote != NULL && * remote == NULL )
-                {
-                    rc = get_query_accession ( query, & accession, oid_str, sizeof oid_str );
-                    if ( rc == 0 )
-                    {
-                        const VPath * remote_mapping = NULL;
-                        rc = VResolverRemoteResolve ( self, protocols, & accession, remote,
-                            ( mapped_query == NULL && cache != NULL ) ? & remote_mapping : NULL,
-                            NULL, refseq_ctx, true );
-
-                        if ( rc == 0 && mapped_query == NULL && cache != NULL && remote_mapping == NULL )
-                        {
-                            /* THIS IS LIKELY AN INTERNAL ERROR
-                               EITHER THE CGI DID NOT RETURN A MAPPING
-                               OR WE DID NOT PROPERLY PARSE IT */
-                            VPathRelease ( * remote );
-                            rc = RC ( rcVFS, rcResolver, rcResolving, rcPath, rcNull );
-                        }
-
-                        /* register new mapping */
-                        if ( rc == 0 )
-                        {
-                            assert ( * remote != NULL );
-                            if ( ( * remote ) -> fragment . size != 0 )
-                                has_fragment = true;
-                            if ( remote_mapping != NULL )
-                            {
-                                rc = VFSManagerRegisterObject ( vfs, query -> obj_id, remote_mapping );
-                                if ( rc == 0 )
-                                {
-                                    mapped_query = ( VPath* ) remote_mapping;
-                                    remote_mapping = NULL;
-                                }
-                                VPathRelease ( remote_mapping );
-                            }
-                        }
-                    }
-                }
-
-                /* RESOLVE FOR CACHE */
-                if ( ( remote == NULL || * remote != NULL ) && cache != NULL && mapped_query != NULL )
-                {
-                    /* test for file or accession */
-                    if ( mapped_query -> path_type == vpName )
-                    {
-                        /* see if this is a file stored locally */
-                        rc = VResolverCacheFile ( self, mapped_query, cache );
-                    }
-                    else
-                    {
-                        /* resolve from accession to cache path */
-                        rc = VResolverCacheResolve ( self, mapped_query, has_fragment, cache, refseq_ctx );
-                    }
-                    if ( rc != 0 && remote != NULL )
-                    {
-                        assert ( * cache == NULL );
-                        VPathRelease ( * remote );
-                        * remote = NULL;
-                    }
-                }
-            }
-
-            VPathRelease ( mapped_query );
-
-            VFSManagerRelease ( vfs );
-        }
-    }
-
-    return rc;
-}
-
-/* QueryAcc
- */
-static
-rc_t VResolverQueryAcc ( const VResolver * self, VRemoteProtocols protocols,
-    const VPath * query, const VPath ** local, const VPath ** remote, const VPath ** cache )
-{
-    rc_t rc = 0;
-
-    /* the accession should be directly usable */
-    const String * accession = & query -> path;
-
-    /* check if it is intended to locate a legacy refseq object */
-    bool refseq_ctx = VPathHasRefseqContext ( query );
-
-    /* will be needed to consult CGI */
-    const VPath * remote2 = NULL, * mapped_query = NULL;
-
-    /* LOCAL RESOLUTION */
-    if ( local != NULL )
-        rc = VResolverLocalResolve ( self, accession, local, refseq_ctx );
-
-    if ( local == NULL || * local == NULL )
-    {
-        bool has_fragment = false;
-
-        /* REMOTE RESOLUTION */
-        if ( remote != NULL || ( self -> ticket != NULL && cache != NULL ) )
-        {
-            /* will need to map if protected */
-            const VPath ** mapped_ptr = ( self -> ticket != NULL && cache != NULL ) ?
-                & mapped_query : NULL;
-
-            /* request remote resolution
-               this does not need to map the query to an accession */
-            rc = VResolverRemoteResolve ( self, protocols, accession,
-                & remote2, mapped_ptr, NULL, refseq_ctx, false );
-
-            if ( rc == 0 )
-            {
-                if ( remote2 -> fragment . size != 0 )
-                    has_fragment = true;
-
-                if ( remote != NULL )
-                    * remote = remote2;
-                else
-                    VPathRelease ( remote2 );
-
-                remote2 = NULL;
-            }
-        }
-
-        if ( ( remote == NULL || * remote != NULL ) && cache != NULL )
-        {
-            if ( mapped_query != NULL )
-                rc = VResolverCacheResolve ( self, mapped_query, has_fragment, cache, refseq_ctx );
-#if 0
-            /* the bad assumption that every remotely retrieved accession MUST be mapped */
-            else if ( self -> ticket != NULL )
-                rc = RC ( rcVFS, rcResolver, rcResolving, rcPath, rcNotFound );
-#endif
-            else
-                rc = VResolverCacheResolve ( self, query, has_fragment, cache, refseq_ctx );
-
-            if ( rc != 0 && remote != NULL )
-            {
-                assert ( * cache == NULL );
-                if ( GetRCState ( rc ) == rcNotFound )
-                    rc = 0;
-                else
-                {
-                    VPathRelease ( * remote );
-                    * remote = NULL;
-                }
-            }
-        }
-
-        if ( mapped_query != NULL )
-            VPathRelease ( mapped_query );
-    }
-
-    return rc;
-}
-
-/* QueryPath
- *  this behavior may not be correct
- *  perhaps we should reject paths upon input,
- *  and only resolve things that need resolving
- *  but there is a thought that we can also transform paths
- */
-static
-rc_t VResolverQueryPath ( const VResolver * self, const VPath * query, const VPath ** local )
-{
-    rc_t rc;
-
-    if ( local == NULL )
-        return RC ( rcVFS, rcResolver, rcResolving, rcPath, rcNotFound );
-
-    switch ( KDirectoryPathType ( self -> wd, "%.*s", ( int ) query -> path . size, query -> path . addr ) )
-    {
-    case kptFile:
-    case kptDir:
-    case kptCharDev:
-    case kptBlockDev:
-    case kptFIFO:
-    case kptFile | kptAlias:
-    case kptDir | kptAlias:
-    case kptCharDev | kptAlias:
-    case kptBlockDev | kptAlias:
-    case kptFIFO | kptAlias:
-        break;
-    default:
-        return RC ( rcVFS, rcResolver, rcResolving, rcPath, rcNotFound );
-    }
-
-    rc = VPathAddRef ( query );
-    if ( rc == 0 )
-        * local = query;
-
-    return rc;
-}
-
-
-/* QueryName
- *  may eventually look for the name in local cache,
- *  but for now just return it as a path
- */
-static
-rc_t VResolverQueryName ( const VResolver * self, VRemoteProtocols protocols,
-    const VPath * query, const VPath ** local, const VPath ** remote, const VPath ** cache )
-{
-    return VResolverQueryPath ( self, query, local );
-}
-
-
-/* QueryURL
- *  URL resolves to itself for remote and potentially to a path for cache
- */
-static
-rc_t VResolverQueryURL ( const VResolver * self, VRemoteProtocols protocols,
-    const VPath * query, const VPath ** remote, const VPath ** cache )
-{
-    rc_t rc = 0;
-
-    /* if neither remote nor cache, then must have requested local,
-       and a URL cannot be resolved to local in our world... */
-    if ( ( ( size_t ) remote | ( size_t ) cache ) == 0 )
-        return RC ( rcVFS, rcResolver, rcResolving, rcPath, rcIncorrect );
-
-    /* the URL always resolves to itself for remote */
-    if ( remote != NULL )
-    {
-        rc = VPathAddRef ( query );
-        if ( rc != 0 )
-            return rc;
-        * remote = query;
-    }
-
-    /* if we want a cache location, then try to resolve it */
-    if ( cache != NULL )
-    {
-        VPath *mapping;
-
-        /* check for refseq context */
-        bool refseq_ctx = VPathHasRefseqContext ( query );
-
-        /* first, extract accession or name from URL */
-        rc = VPathExtractAcc ( query, & mapping );
-        if ( rc == 0 )
-        {
-            /* now map to cache location */
-            rc = VResolverCacheResolve ( self, mapping, false, cache, refseq_ctx );
-            VPathRelease ( mapping );
-            if ( GetRCState ( rc ) == rcNotFound && remote != NULL )
-                rc = 0;
-        }
-
-        /* any error must invalidate "remote" */
-        if ( rc != 0 && remote != NULL )
-        {
-            VPathRelease ( * remote );
-            * remote = NULL;
-        }
-    }
-
-    return rc;
-}
-
-
-/* Query
- *  resolve object location to either an existing local path,
- *  or a pair of remote URL + local cache location.
- *
- *  "protocols" [ IN ] - the desired protocols for remote resolution
- *
- *  "query" [ IN ] - a path that can represent:
- *     accession : a recognizable accession from NCBI or known organization
- *     obj-id    : a dbGaP object id
- *     path      : a filesystem path
- *     url       : a remote location
- *
- *  "local" [ OUT, NULL OKAY ] - optional return parameter for local path:
- *     accession : resolve to local user or site path
- *     obj-id    : resolve to local user protected path
- *     path      : return duplicate of input
- *     url       : set to NULL
- *
- *  "remote" [ OUT, NULL OKAY ] - optional return parameter for remote path:
- *     accession : resolve to URL
- *     obj-id    : resolve to URL
- *     path      : set to NULL
- *     url       : set to duplicate
- *
- *  "cache" [ OUT, NULL OKAY ] - optional return parameter for cache path:
- *     accession : resolve to user cache path
- *     obj-id    : resolve to user cache path
- *     path      : set to NULL
- *     url       : resolve to user cache path
- *
- *  any of the output parameters may be NULL, but not all, i.e. there
- *  must be at least one non-NULL return parameter.
- *
- *  if you DON'T want local resolution, pass NULL for "local" and
- *  the query will be resolved remotely. if you don't want remote
- *  resolution, pass NULL for "remote".
- *
- *  a query that is resolved locally will always return NULL for
- *  "remote" and "cache", if the parameters are provided.
- */
-static
-rc_t VResolverQueryInt ( const VResolver * self, VRemoteProtocols protocols,
-    const VPath * query, const VPath ** local, const VPath ** remote, const VPath ** cache )
-{
-    rc_t rc;
-
-    if ( ( ( size_t ) local | ( size_t ) remote | ( size_t ) cache ) == 0 )
-        rc = RC ( rcVFS, rcResolver, rcResolving, rcParam, rcNull );
-    else
-    {
-        if ( local != NULL )
-        {
-            * local = NULL;
-            if ( atomic32_read ( & enable_local ) == vrAlwaysDisable )
-                local = NULL;
-        }
-
-        if ( remote != NULL )
-        {
-            * remote = NULL;
-
-            if ( protocols >= eProtocolLastDefined )
-                return RC ( rcVFS, rcResolver, rcResolving, rcParam, rcInvalid );
-
-            if ( atomic32_read ( & enable_remote ) == vrAlwaysDisable )
-                remote = NULL;
-        }
-
-        if ( cache != NULL )
-        {
-            * cache = NULL;
-            if ( atomic32_read ( & enable_cache ) == vrAlwaysDisable )
-                cache = NULL;
-        }
-
-        if ( self == NULL )
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcSelf, rcNull );
-        else if ( query == NULL )
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcPath, rcNull );
-        else if ( ( ( size_t ) local | ( size_t ) remote | ( size_t ) cache ) == 0 )
-            rc = RC ( rcVFS, rcResolver, rcResolving, rcPath, rcNotFound );
-        else
-        {
-            switch ( query -> scheme_type )
-            {
-            case vpuri_none:
-            case vpuri_ncbi_file:
-            case vpuri_file:
-            case vpuri_ncbi_acc:
-            case vpuri_ncbi_obj:
-                break;
-
-            case vpuri_http:
-                switch ( protocols )
-                {
-                case eProtocolHttp:
-                case eProtocolFaspHttp:
-                case eProtocolHttpFasp:
-                    return VResolverQueryURL ( self, protocols, query, remote, cache );
-                }
-                return RC ( rcVFS, rcResolver, rcResolving, rcPath, rcIncorrect );
-
-            case vpuri_fasp:
-                switch ( protocols )
-                {
-                case eProtocolFasp:
-                case eProtocolFaspHttp:
-                case eProtocolHttpFasp:
-                    return VResolverQueryURL ( self, protocols, query, remote, cache );
-                }
-                return RC ( rcVFS, rcResolver, rcResolving, rcPath, rcIncorrect );
-
-            default:
-                return RC ( rcVFS, rcResolver, rcResolving, rcPath, rcIncorrect );
-            }
-
-            switch ( query -> path_type )
-            {
-            case vpInvalid:
-                rc = RC ( rcVFS, rcResolver, rcResolving, rcPath, rcInvalid );
-                break;
-
-            case vpOID:
-                rc = VResolverQueryOID ( self, protocols, query, local, remote, cache );
-                break;
-
-            case vpAccession:
-                rc = VResolverQueryAcc ( self, protocols, query, local, remote, cache );
-                break;
-
-            case vpNameOrOID:
-                rc = VResolverQueryOID ( self, protocols, query, local, remote, cache );
-                if ( rc != 0 )
-                    goto try_name;
-                break;
-
-            case vpNameOrAccession:
-                rc = VResolverQueryAcc ( self, protocols, query, local, remote, cache );
-                if ( rc != 0 )
-                    goto try_name;
-                break;
-
-            case vpName:
-                /* try to handle a weird case with non-accessioned names in refseq area */
-                if ( query -> query . size != 0 )
-                {
-                    if ( VPathHasRefseqContext ( query ) )
-                    {
-                        rc = VResolverQueryAcc ( self, protocols, query, local, remote, cache );
-                        if ( rc == 0 )
-                            break;
-                    }
-                }
-            try_name:
-                rc = VResolverQueryName ( self, protocols, query, local, remote, cache );
-                break;
-
-            case vpRelPath:
-            case vpFullPath:
-            case vpUNCPath:
-                rc = VResolverQueryPath ( self, query, local );
-                break;
-
-            default:
-                rc = RC ( rcVFS, rcResolver, rcResolving, rcPath, rcIncorrect );
-            }
-        }
-    }
-
-    return rc;
-}
-
-LIB_EXPORT
-rc_t CC VResolverQuery ( const VResolver * self, VRemoteProtocols protocols,
-    const VPath * query, const VPath ** local, const VPath ** remote, const VPath ** cache )
-{
-    rc_t rc = VResolverQueryInt ( self, protocols, query, local, remote, cache );
-    if ( rc == 0 )
-    {
-        /* the paths returned from resolver are highly reliable */
-        if ( local != NULL && * local != NULL )
-            VPathMarkHighReliability ( * ( VPath ** ) local, true );
-        if ( remote != NULL && * remote != NULL )
-            VPathMarkHighReliability ( * ( VPath ** ) remote, true );
-        if ( cache != NULL && * cache != NULL )
-            VPathMarkHighReliability ( * ( VPath ** ) cache, true );
-    }
-    return rc;
-}
-
-/* LoadVolume
- *  capture volume path and other information
- */
-static
-rc_t VResolverAlgLoadVolume ( VResolverAlg *self, uint32_t *num_vols, const char *start, size_t size )
-{
-    rc_t rc = 0;
-
-#if 0
-    /* trim volume whitespace */
-    while ( size != 0 && isspace ( start [ 0 ] ) )
-    {
-        ++ start;
-        -- size;
-    }
-    while ( size != 0 && isspace ( start [ size - 1 ] ) )
-        -- size;
-#endif
-
-    /* trim trailing slashes */
-    while ( size != 0 && start [ size - 1 ] == '/' )
-        -- size;
-
-    /* now see if the string survives */
-    if ( size != 0 )
-    {
-        String loc_vol_str;
-        const String *vol_str;
-        StringInit ( & loc_vol_str, start, size, string_len ( start, size ) );
-        rc = StringCopy ( & vol_str, & loc_vol_str );
-        if ( rc == 0 )
-        {
-            rc = VectorAppend ( & self -> vols, NULL, vol_str );
-            if ( rc == 0 )
-            {
-                * num_vols += 1;
-                return 0;
-            }
-
-            StringWhack ( vol_str );
-        }
-    }
-
-    return rc;
-}
-
-/* LoadVolumes
- *
- *    path-list
- *        = PATH
- *        | <path-list> ':' PATH ;
- */
-static
-rc_t VResolverAlgLoadVolumes ( VResolverAlg *self, uint32_t *num_vols, const String *vol_list )
-{
-    const char *start = vol_list -> addr;
-    const char *end = & vol_list -> addr [ vol_list -> size ];
-    const char *sep = string_chr ( start, end - start, ':' );
-    while ( sep != NULL )
-    {
-        rc_t rc = VResolverAlgLoadVolume ( self, num_vols, start, sep - start );
-        if ( rc != 0 )
-            return rc;
-        start = sep + 1;
-        sep = string_chr ( start, end - start, ':' );
-    }
-    return VResolverAlgLoadVolume ( self, num_vols, start, end - start );
-}
-
-/* LoadAlgVolumes
- *
- *    volumes
- *        = <path-list> ;
- */
-static
-rc_t VResolverLoadAlgVolumes ( Vector *algs, const String *root,
-    const String *ticket, bool cache_capable, VResolverAppID app_id,
-    VResolverAlgID alg_id, uint32_t *num_vols, const String *vol_list,
-    bool protected, bool disabled, bool cacheEnabled )
-{
-    VResolverAlg *alg;
-    rc_t rc = VResolverAlgMake ( & alg, root, app_id, alg_id, protected, disabled );
-    if ( rc == 0 )
-    {
-        alg -> ticket = ticket;
-        alg -> cache_capable = cache_capable;
-        alg -> cache_enabled = cacheEnabled;
-
-        if ( ticket != NULL )
-            alg -> alg_id = algCGI;
-
-        rc = VResolverAlgLoadVolumes ( alg, num_vols, vol_list );
-        if ( rc == 0 && VectorLength ( & alg -> vols ) != 0 )
-        {
-            rc = VectorAppend ( algs, NULL, alg );
-            if ( rc == 0 )
-                return 0;
-        }
-
-        VResolverAlgWhack ( alg, NULL );
-    }
-
-    return rc;
-}
-
-/* LoadApp
- *
- *    alg-block
- *        = <alg-type> <volumes> ;
- *
- *    alg-type
- *        = "flat" | "sraFlat" | "sra1024" | "sra1000" | "fuse1000"
- *        | "refseq" | "wgs" | "wgsFlag" | "fuseWGS"
- *        | "ncbi" | "ddbj" | "ebi"
- *        | "nannot" | "nannotFlat" | "fuseNANNOT" | "pileupNCBI" | "pileupEBI" | "pileupDDBJ" ;
- */
-static
-rc_t VResolverLoadVolumes ( Vector *algs, const String *root,
-    const String *ticket, bool cache_capable, VResolverAppID app_id,
-    uint32_t *num_vols, const KConfigNode *vols, bool resolver_cgi,
-     bool protected, bool disabled, bool cacheEnabled )
-{
-    KNamelist *algnames;
-    rc_t rc = KConfigNodeListChildren ( vols, & algnames );
-    if ( rc == 0 )
-    {
-        uint32_t i, count;
-        rc = KNamelistCount ( algnames, & count );
-        for ( i = 0; i < count && rc == 0; ++ i )
-        {
-            const char *algname;
-            rc = KNamelistGet ( algnames, i, & algname );
-            if ( rc == 0 )
-            {
-                const KConfigNode *alg;
-                rc = KConfigNodeOpenNodeRead ( vols, & alg, "%s", algname );
-                if ( rc == 0 )
-                {
-                    VResolverAlgID alg_id = algUnknown;
-
-                    /* if using CGI for resolution */
-                    if ( resolver_cgi || strcmp ( algname, "cgi" ) == 0 )
-                        alg_id = algCGI;
-                    /* stored in a flat directory as-is */
-                    else if ( strcmp ( algname, "flat" ) == 0 )
-                        alg_id = algFlat;
-                    /* stored in a flat directory with ".sra" extension */
-                    else if ( strcmp ( algname, "sraFlat" ) == 0 )
-                        alg_id = algSRAFlat;
-                    /* stored in a three-level directory with 1K banks and ".sra" extension */
-                    else if ( strcmp ( algname, "sra1024" ) == 0 )
-                        alg_id = algSRA1024;
-                    /* stored in a three-level directory with 1000 banks and ".sra" extension */
-                    else if ( strcmp ( algname, "sra1000" ) == 0 )
-                        alg_id = algSRA1000;
-                    /* stored in a four-level directory with 1000 banks and ".sra" extension */
-                    else if ( strcmp ( algname, "fuse1000" ) == 0 )
-                        alg_id = algFUSE1000;
-                    /* stored in a flat directory with no extension */
-                    else if ( strcmp ( algname, "refseq" ) == 0 )
-                        alg_id = algREFSEQ;
-                    /* stored in a flat directory with no extension */
-                    else if ( strcmp ( algname, "wgsFlat" ) == 0 )
-                        alg_id = algWGSFlat;
-                    /* stored in a multi-level directory with no extension */
-                    else if ( strcmp ( algname, "wgs" ) == 0 )
-                        alg_id = algWGS;
-                    else if ( strcmp ( algname, "wgs2" ) == 0 )
-                        alg_id = algWGS2;
-                    else if ( strcmp ( algname, "fuseWGS" ) == 0 )
-                        alg_id = algFuseWGS;
-                    /* stored in a three-level directory with 1K banks and no extension */
-                    else if ( strcmp ( algname, "ncbi" ) == 0 ||
-                              strcmp ( algname, "ddbj" ) == 0 )
-                        alg_id = algSRA_NCBI;
-                    /* stored in a three-level directory with 1000 banks and no extension */
-                    else if ( strcmp ( algname, "ebi" ) == 0 )
-                        alg_id = algSRA_EBI;
-
-                    /* new named annotation */
-                    else if ( strcmp ( algname, "nannotFlat" ) == 0 )
-                        alg_id = algNANNOTFlat;
-                    else if ( strcmp ( algname, "nannot" ) == 0 )
-                        alg_id = algNANNOT;
-                    else if ( strcmp ( algname, "fuseNANNOT" ) == 0 )
-                        alg_id = algFuseNANNOT;
-
-                    /* new named annotation */
-                    else if ( strcmp ( algname, "nakmerFlat" ) == 0 )
-                        alg_id = algNAKMERFlat;
-                    else if ( strcmp ( algname, "nakmer" ) == 0 )
-                        alg_id = algNAKMER;
-                    else if ( strcmp ( algname, "fuseNAKMER" ) == 0 )
-                        alg_id = algFuseNAKMER;
-                    
-                    /* pileup files */
-                    else if ( strcmp ( algname, "pileupNCBI" ) == 0 )
-                        alg_id = algPileup_NCBI;
-                    else if ( strcmp ( algname, "pileupEBI" ) == 0 )
-                        alg_id = algPileup_EBI;
-                    else if ( strcmp ( algname, "pileupDDBJ" ) == 0 )
-                        alg_id = algPileup_DDBJ;
-
-                    if ( alg_id != algUnknown )
-                    {
-                        String *vol_list;
-                        rc = KConfigNodeReadString ( alg, & vol_list );
-                        if ( rc == 0 )
-                        {
-                            if ( StringLength ( vol_list ) != 0 )
-                            {
-                                rc = VResolverLoadAlgVolumes ( algs,
-                                    root, ticket, cache_capable,
-                                    app_id, alg_id, num_vols, vol_list,
-                                    protected, disabled, cacheEnabled );
-                            }
-                            StringWhack ( vol_list );
-                        }
-                    }
-
-                    KConfigNodeRelease ( alg );
-                }
-            }
-        }
-
-        KNamelistRelease ( algnames );
-    }
-    return rc;
-}
-
-/* LoadApp
- *
- *    app
- *        = [ <disabled> ] [ <cache-enabled> ] <vol-group> ;
- *
- *    disabled
- *        = "disabled" '=' ( "true" | "false" ) ;
- *
- *    cache-enabled
- *        = "cache-enabled" '=' ( "true" | "false" ) ;
- *
- *    vol-group
- *        = "volumes" <alg-block>* ;
- */
-static
-rc_t VResolverLoadApp ( VResolver *self, Vector *algs, const String *root,
-    const String *ticket, bool cache_capable, VResolverAppID app_id,
-    uint32_t *num_vols, const KConfigNode *app, bool resolver_cgi,
-    bool protected, bool disabled, bool cacheEnabled )
-{
-    const KConfigNode *node;
-
-    /* test for disabled app - it is entirely possible */
-    rc_t rc = KConfigNodeOpenNodeRead ( app, & node, "disabled" );
-    if ( rc == 0 )
-    {
-        bool app_disabled = false;
-        rc = KConfigNodeReadBool ( node, & app_disabled );
-        KConfigNodeRelease ( node );
-        if ( rc == 0 && app_disabled && algs == & self -> local )
-            return 0;
-        disabled |= app_disabled;
-    }
-
-    /* test again for cache enabled */
-    if ( cache_capable && cacheEnabled )
-    {
-        rc = KConfigNodeOpenNodeRead ( app, & node, "cache-enabled" );
-        if ( rc == 0 )
-        {
-            /* allow this node to override current value */
-            bool cache;
-            rc = KConfigNodeReadBool ( node, & cache );
-            KConfigNodeRelease ( node );
-            if ( rc == 0 )
-                cacheEnabled = cache;
-        }
-    }
-
-    /* get volumes */
-    rc = KConfigNodeOpenNodeRead ( app, & node, "volumes" );
-    if ( GetRCState ( rc ) == rcNotFound )
-        rc = 0;
-    else if ( rc == 0 )
-    {
-        rc = VResolverLoadVolumes ( algs, root, ticket, cache_capable, app_id,
-            num_vols, node, resolver_cgi, protected, disabled, cacheEnabled );
-        KConfigNodeRelease ( node );
-    }
-
-    return rc;
-}
-
-/* LoadApps
- *
- *    app-block
- *        = <app-name> <app> ;
- *
- *    app-name
- *        = "refseq" | "sra" | "wgs" | "nannot" | "nakmer" | "sraPileup" ;
- */
-static
-rc_t VResolverLoadApps ( VResolver *self, Vector *algs, const String *root,
-    const String *ticket, bool cache_capable, const KConfigNode *apps,
-    bool resolver_cgi, bool protected, bool disabled, bool cacheEnabled )
-{
-    KNamelist *appnames;
-    rc_t rc = KConfigNodeListChildren ( apps, & appnames );
-    if ( rc == 0 )
-    {
-        uint32_t i, count;
-        rc = KNamelistCount ( appnames, & count );
-        if ( resolver_cgi && rc == 0 && count == 0 )
-        {
-            VResolverAlg *cgi;
-            rc = VResolverAlgMake ( & cgi, root, appAny, algCGI, protected, disabled );
-            if ( rc == 0 )
-            {
-                rc = VectorAppend ( algs, NULL, cgi );
-                if ( rc == 0 )
-                {
-                    ++ self -> num_app_vols [ appAny ];
-                    return 0;
-                }
-            }
-        }
-        else for ( i = 0; i < count && rc == 0; ++ i )
-        {
-            const char *appname;
-            rc = KNamelistGet ( appnames, i, & appname );
-            if ( rc == 0 )
-            {
-                const KConfigNode *app;
-                rc = KConfigNodeOpenNodeRead ( apps, & app, "%s", appname );
-                if ( rc == 0 )
-                {
-                    VResolverAppID app_id = appUnknown;
-                    if ( strcmp ( appname, "file" ) == 0 )
-                        app_id = appFILE;
-                    else if ( strcmp ( appname, "nakmer" ) == 0 )
-                        app_id = appNAKMER;
-                    else if ( strcmp ( appname, "nannot" ) == 0 )
-                        app_id = appNANNOT;
-                    else if ( strcmp ( appname, "refseq" ) == 0 )
-                        app_id = appREFSEQ;
-                    else if ( strcmp ( appname, "sra" ) == 0 )
-                        app_id = appSRA;
-                    else if ( strcmp ( appname, "wgs" ) == 0 )
-                        app_id = appWGS;
-                    else if ( strcmp ( appname, "sraPileup" ) == 0 )
-                        app_id = appSRAPileup;
-
-                    rc = VResolverLoadApp ( self, algs, root, ticket,
-                        cache_capable, app_id,
-                        & self -> num_app_vols [ app_id ], app, resolver_cgi,
-                        protected, disabled, cacheEnabled );
-
-                    KConfigNodeRelease ( app );
-                }
-            }
-        }
-        KNamelistRelease ( appnames );
-    }
-    return rc;
-}
-
-typedef uint32_t EDisabled;
-enum {
-    eDisabledSet,
-    eEnabledSet,
-    eDisabledNotSet,
-};
-
-/* LoadRepo
- *
- *    repository
- *        = [ <disabled> ] [ <cache-enabled> ] <root> <app-group> ;
- *
- *    disabled
- *        = "disabled" '=' ( "true" | "false" ) ;
- *
- *    cache-enabled
- *        = "cache-enabled" '=' ( "true" | "false" ) ;
- *
- *    root
- *        = "root" '=' PATH ;
- *
- *    app-group
- *        = "apps" <app-block>* ;
- */
-static
-rc_t VResolverLoadRepo ( VResolver *self, Vector *algs, const KConfigNode *repo,
-    const String *ticket, bool cache_capable, bool protected,
-    EDisabled isDisabled, bool cacheEnabled )
-{
-    rc_t rc = 0;
-    const KConfigNode *node;
-    bool resolver_cgi;
-
-    /* test for disabled repository */
-    bool disabled = false;
-    switch (isDisabled) {
-        case eDisabledSet:
-            disabled = true;
-            break;
-        case eEnabledSet:
-            disabled = false;
-            break;
-        case eDisabledNotSet:
-            rc = KConfigNodeOpenNodeRead ( repo, & node, "disabled" );
-            if ( rc == 0 )
-            {
-                rc = KConfigNodeReadBool ( node, & disabled );
-                KConfigNodeRelease ( node );
-            }
-            break;
-    }
-
-    /* don't bother recording local, disabled repositories */
-    if ( rc == 0 && disabled && algs == & self -> local )
-        return 0;
-
-    /* Check for cache-enabled.
-       Cache-capable repositories cannot be remote.
-       we do not check "cache-enabled" for not cache_capable repositories */
-    if ( cacheEnabled ) {
-        cacheEnabled = cache_capable;
-    }
-    if ( cacheEnabled )
-    {
-        rc = KConfigNodeOpenNodeRead ( repo, & node, "cache-enabled" );
-        if ( rc == 0 )
-        {
-            rc = KConfigNodeReadBool ( node, & cacheEnabled );
-            KConfigNodeRelease ( node );
-            if ( rc != 0 )
-                cacheEnabled = false;
-        }
-    }
-
-    resolver_cgi = false;
-    if ( cache_capable )
-        rc = KConfigNodeOpenNodeRead ( repo, & node, "root" );
-    else
-    {
-        /* check for specific resolver CGI */
-        rc = KConfigNodeOpenNodeRead ( repo, & node, "resolver-cgi" );
-        if ( rc == 0 )
-            resolver_cgi = true;
-        /* or get the repository root */
-        else if ( GetRCState ( rc ) == rcNotFound )
-        {
-            rc = KConfigNodeOpenNodeRead ( repo, & node, "root" );
-        }
-    }
-    if ( GetRCState ( rc ) == rcNotFound )
-        rc = 0;
-    else if ( rc == 0 )
-    {
-        /* read root as String */
-        String *root;
-        rc = KConfigNodeReadString ( node, & root );
-        KConfigNodeRelease ( node );
-        if ( GetRCState ( rc ) == rcNotFound )
-            rc = 0;
-        else if ( rc == 0 )
-        {
-            /* perform a bit of cleanup on root */
-            while ( root -> size != 0 && root -> addr [ root -> size - 1 ] == '/' )
-            {
-                /* this is terribly nasty, but known to be safe */
-                -- root -> len;
-                -- root -> size;
-            }
-
-            /* store string on VResolver for management purposes,
-               pass the loaned reference to sub-structures */
-            rc = VectorAppend ( & self -> roots, NULL, root );
-            if ( rc != 0 )
-                StringWhack ( root );
-            else
-            {
-                /* open the "apps" sub-node */
-                rc = KConfigNodeOpenNodeRead ( repo, & node, "apps" );
-                if ( rc == 0 )
-                {
-                    rc = VResolverLoadApps ( self, algs, root, ticket,
-                        cache_capable, node, resolver_cgi,
-                        protected, disabled, cacheEnabled );
-                    KConfigNodeRelease ( node );
-                }
-                else if ( GetRCState ( rc ) == rcNotFound )
-                {
-                    rc = 0;
-                    if ( resolver_cgi )
-                    {
-                        VResolverAlg *cgi;
-                        rc = VResolverAlgMake ( & cgi, root, appAny, algCGI, protected, disabled );
-                        if ( rc == 0 )
-                        {
-                            cgi -> ticket = ticket;
-
-                            rc = VectorAppend ( algs, NULL, cgi );
-                            if ( rc == 0 )
-                            {
-                                ++ self -> num_app_vols [ appAny ];
-                                return 0;
-                            }
-                        }
-
-                        VResolverAlgWhack ( cgi, NULL );
-                    }
-                }
-            }
-        }
-    }
-
-    return rc;
-}
-
-/* LoadNamedRepo
- *
- *    repository-block
- *        = ID <repository> ;
- */
-static
-rc_t VResolverLoadNamedRepo ( VResolver *self, Vector *algs,
-    const KConfigNode *sub, const String *ticket, const char *name,
-    bool cache_capable, bool protected, EDisabled disabled, bool cacheEnabled )
-{
-    const KConfigNode *repo;
-    rc_t rc = KConfigNodeOpenNodeRead ( sub, & repo, "%s", name );
-    if ( GetRCState ( rc ) == rcNotFound )
-        rc = 0;
-    else if ( rc == 0 )
-    {
-        rc = VResolverLoadRepo ( self, algs, repo,
-            ticket, cache_capable, protected, disabled, cacheEnabled );
-        KConfigNodeRelease ( repo );
-    }
-    return rc;
-}
-
-/* LoadSubCategory
- *
- *    sub-category-block
- *        = <sub-category> <repository-block>* ;
- *
- *    sub-category
- *        = "main" | "aux" | "protected"
- *
- *    repository-block
- *        = ID <repository> ;
- */
-static
-rc_t VResolverLoadSubCategory ( VResolver *self, Vector *algs,
-    const KConfigNode *kfg, const String *ticket, const char *sub_path,
-    bool cache_capable, bool protected, EDisabled disabled, bool cacheEnabled )
-{
-    const KConfigNode *sub;
-    rc_t rc = KConfigNodeOpenNodeRead ( kfg, & sub, "%s", sub_path );
-    if ( GetRCState ( rc ) == rcNotFound )
-        rc = 0;
-    else if ( rc == 0 )
-    {
-        KNamelist *children;
-        rc = KConfigNodeListChildren ( sub, & children );
-        if ( rc == 0 )
-        {
-            uint32_t i, count;
-            rc = KNamelistCount ( children, & count );
-            for ( i = 0; i < count && rc == 0; ++ i )
-            {
-                const char *name;
-                rc = KNamelistGet ( children, i, & name );
-                if ( rc == 0 )
-                    rc = VResolverLoadNamedRepo ( self, algs, sub, ticket, name,
-                        cache_capable, protected, disabled, cacheEnabled );
-            }
-
-            KNamelistRelease ( children );
-        }
-        KConfigNodeRelease ( sub );
-    }
-    return rc;
-}
-
-/* LoadProtected
- *  special function to handle single, active protected workspace
- */
-static
-rc_t VResolverLoadProtected ( VResolver *self, const KConfigNode *kfg,
-    const char *rep_name,
-    bool cache_capable, EDisabled disabled, bool cacheEnabled )
-{
-    const KConfigNode *repo;
-    rc_t rc = KConfigNodeOpenNodeRead ( kfg, & repo, "user/protected/%s", rep_name );
-    if ( GetRCState ( rc ) == rcNotFound )
-        rc = 0;
-    else if ( rc == 0 )
-    {
-        rc = VResolverLoadRepo ( self, & self -> local,
-            repo, NULL, cache_capable, true, disabled, cacheEnabled );
-        KConfigNodeRelease ( repo );
-    }
-    return rc;
-}
-
-/* LoadLegacyRefseq
- *  load refseq information from KConfig
- *
- *  there are two legacy versions being supported
- *
- *    legacy-refseq
- *        = "refseq" <legacy-vol-or-repo> ;
- *
- *    legacy-vol-or-repo
- *        = "volumes" '=' <path-list>
- *        | <legacy-refseq-repo> <legacy-refseq-vols>
- *        ;
- */
-static
-rc_t VResolverLoadLegacyRefseq
-    ( VResolver *self, const KConfig *cfg, bool cache_capable )
-{
-    const KConfigNode *vols;
-    rc_t rc = KConfigOpenNodeRead ( cfg, & vols, "/refseq/paths" );
-    if ( GetRCState ( rc ) == rcNotFound )
-        rc = 0;
-    else if ( rc == 0 )
-    {
-        String *vol_list;
-        rc = KConfigNodeReadString ( vols, & vol_list );
-        if ( rc == 0 )
-        {
-            const bool protected = false;
-            const bool disabled = false;
-            const bool caching = true;
-            rc = VResolverLoadAlgVolumes ( & self -> local, NULL, NULL,
-                cache_capable,
-                appREFSEQ, algREFSEQ,  & self -> num_app_vols [ appREFSEQ ],
-                vol_list, protected, disabled, caching );
-            StringWhack ( vol_list );
-        }
-        KConfigNodeRelease ( vols );
-    }
-
-    return rc;
-}
-
-
-/* ForceRemoteRefseq
- *  makes sure there is a remote source of refseq
- *  or else adds a hard-coded URL to NCBI
- */
-static
-rc_t VResolverForceRemoteRefseq ( VResolver *self )
-{
-    rc_t rc;
-    bool found;
-    String local_root;
-    const String *root;
-
-    uint32_t i, count = VectorLength ( & self -> remote );
-    for ( found = false, i = 0; i < count; ++ i )
-    {
-        VResolverAlg *alg = ( VResolverAlg* ) VectorGet ( & self -> remote, i );
-        if ( alg -> app_id == appREFSEQ )
-        {
-            found = true;
-            if ( alg -> disabled )
-                alg -> disabled = false;
-        }
-    }
-
-    if ( found )
-        return 0;
-
-    if ( self -> num_app_vols [ appAny ] != 0 )
-    {
-        for ( i = 0; i < count; ++ i )
-        {
-            VResolverAlg *alg = ( VResolverAlg* ) VectorGet ( & self -> remote, i );
-            if ( alg -> app_id == appAny )
-            {
-                found = true;
-                if ( alg -> disabled )
-                    alg -> disabled = false;
-            }
-        }
-    }
-
-    if ( found )
-        return 0;
-
-    /* create one from hard-coded constants */
-    StringInitCString ( & local_root, "http://ftp-trace.ncbi.nlm.nih.gov/sra" );
-    rc = StringCopy ( & root, & local_root );    
-    if ( rc == 0 )
-    {
-        rc = VectorAppend ( & self -> roots, NULL, root );
-        if ( rc != 0 )
-            StringWhack ( root );
-        else
-        {
-            String vol_list;
-            const bool protected = false;
-            const bool disabled = false;
-            const bool caching = false;
-            StringInitCString ( & vol_list, "refseq" );
-            rc = VResolverLoadAlgVolumes ( & self -> remote, root, NULL, false,
-                appREFSEQ, algREFSEQ, & self -> num_app_vols [ appREFSEQ ],
-                & vol_list, protected, disabled, caching );
-        }
-    }
-
-    return rc;
-}
-
-
-/* GetDownloadTicket
- *  if we are within a working environment that has a download ticket,
- *  capture it here and add that local repository into the mix
- */
-static
-const String *VResolverGetDownloadTicket ( const VResolver *self,
-    const KRepository *protected, char *buffer, size_t bsize )
-{
-    const String *ticket = NULL;
-    if ( protected != NULL )
-    {
-        rc_t rc = KRepositoryName ( protected, buffer, bsize, NULL );
-        if ( rc == 0 )
-        {
-            size_t ticsz;
-            char ticbuf [ 256 ];
-            rc = KRepositoryDownloadTicket ( protected, ticbuf, sizeof ticbuf, & ticsz );
-            if ( rc == 0 )
-            {
-                String tic;
-                StringInit ( & tic, ticbuf, ticsz, ( uint32_t ) ticsz );
-                rc = StringCopy ( & ticket, & tic );
-            }
-        }
-    }
-    return ticket;
-}
-
-
-/* ForceRemoteProtected
- *  makes sure there is a remote CGI
- */
-static
-rc_t VResolverForceRemoteProtected ( VResolver *self )
-{
-    rc_t rc;
-    const String *root;
-
-    /* create one from hard-coded constants */
-    String cgi_root;
-    StringInitCString ( & cgi_root, "http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi" );
-    rc = StringCopy ( & root, & cgi_root );    
-    if ( rc == 0 )
-    {
-        rc = VectorAppend ( & self -> roots, NULL, root );
-        if ( rc != 0 )
-            StringWhack ( root );
-        else
-        {
-            const bool protected = true;
-            const bool disabled = false;
-
-            VResolverAlg *cgi;
-            rc = VResolverAlgMake ( & cgi, root, appAny, algCGI, protected, disabled );
-            if ( rc == 0 )
-            {
-                cgi -> ticket = self -> ticket;
-
-                /* Remote Protected algorythm should come first: see VDB-2679 */
-                if ( VectorLength ( & self -> remote ) > 0 ) {
-                    void *prior = NULL;
-                    rc = VectorSwap ( &self -> remote, 0, cgi, & prior );
-                    if ( rc == 0 ) {
-                        rc = VectorAppend ( &self -> remote, NULL, prior );
-                    }
-                }
-                else {
-                    rc = VectorAppend ( & self -> remote, NULL, cgi );
-                }
-
-                if ( rc == 0 )
-                {
-                    ++ self -> num_app_vols [ appAny ];
-                    return 0;
-                }
-            }
-
-            VResolverAlgWhack ( cgi, NULL );
-        }
-    }
-
-    return rc;
-}
-
-
-/* Load
- *  load the respository from ( current ) KConfig
- *
- *  using pseudo BNF, it looks like this:
- *
- *    repositories
- *        = "repository" <category-block>* ;
- *
- *    category-block
- *        = <category> <sub-category-block>* ;
- *
- *    category
- *        = "remote" | "site" | "user" ;
- *
- *    sub-category-block
- *        = <sub-category> <repository-block>* ;
- *
- *    sub-category
- *        = "main" | "aux" | "protected"
- */
-static
-rc_t VResolverDetectSRALeafPath ( VResolver *self )
-{
-    /* capture working directory as "root" path */
-    const KDirectory *wd = self -> wd;
-    char cwd [ 4096 ];
-    rc_t rc = KDirectoryResolvePath ( wd, true, cwd, sizeof cwd, "." );
-    if ( rc == 0 )
-    {
-        const String *root;
-
-        /* convert C-string to real string */
-        String cwd_str;
-        StringInitCString ( & cwd_str, cwd );
-
-        /* create a copy on heap */
-        rc = StringCopy ( & root, & cwd_str );
-        if ( rc == 0 )
-        {
-            /* insert into "roots" */
-            rc = VectorAppend ( & self -> roots, NULL, root );
-            if ( rc == 0 )
-            {
-                /* create an algorithm for any application where the
-                   spec is to be treated as a leaf path */
-                VResolverAlg *alg;
-                rc = VResolverAlgMake ( & alg, root, appAny, algFlat, self -> ticket != NULL, false );
-                if ( rc == 0 )
-                {
-                    const String *vol;
-
-                    /* create a single volume - "." */
-                    CONST_STRING ( & cwd_str, "." );
-                    rc = StringCopy ( & vol, & cwd_str );
-                    if ( rc == 0 )
-                    {
-                        rc = VectorAppend ( & alg -> vols, NULL, vol );
-                        if ( rc != 0 )
-                            free ( ( void* ) vol );
-                        else
-                        {
-                            /* insert into local resolution path */
-                            rc = VectorAppend ( & self -> local, NULL, alg );
-                            if ( rc == 0 )
-                                return 0;
-                        }
-                    }
-                
-                    VResolverAlgWhack ( alg, NULL );
-                }
-            }
-
-            free ( ( void* ) root );
-        }
-    }
-    return rc;
-}
-
-static
-rc_t VResolverForceUserFilesVol ( VResolver *self, const VResolverAlg *sraAlg )
-{
-   /* create an algorithm for "file" application where the
-       spec is to be treated as a leaf path */
-    VResolverAlg *alg;
-    rc_t rc = VResolverAlgMake ( & alg, sraAlg -> root, appFILE, algFlat, sraAlg -> protected, sraAlg -> disabled );
-    if ( rc == 0 )
-    {
-        String vol_str;
-        const String *vol;
-
-        /* create a single volume - "files" */
-        CONST_STRING ( & vol_str, "files" );
-        rc = StringCopy ( & vol, & vol_str );
-        if ( rc == 0 )
-        {
-            rc = VectorAppend ( & alg -> vols, NULL, vol );
-            if ( rc != 0 )
-                free ( ( void* ) vol );
-            else
-            {
-                /* copy sra settings */
-                alg -> ticket = sraAlg -> ticket;
-                alg -> cache_capable = sraAlg -> cache_capable;
-                alg -> cache_enabled = sraAlg -> cache_enabled;
-
-                /* insert into local resolution path */
-                rc = VectorAppend ( & self -> local, NULL, alg );
-                if ( rc == 0 )
-                {
-                    ++ self -> num_app_vols [ appFILE ];
-                    return 0;
-                }
-            }
-        }
-                
-        VResolverAlgWhack ( alg, NULL );
-    }
-
-    return rc;
-}
-
-static
-rc_t VResolverForceUserFiles ( VResolver *self )
-{
-    rc_t rc;
-    uint32_t i, count = VectorLength ( & self -> local );
-
-    for ( rc = 0, i = 0; i < count; ++ i )
-    {
-        const VResolverAlg *alg = VectorGet ( & self -> local, i );
-        if ( alg -> app_id == appSRA && alg -> cache_capable )
-        {
-            rc = VResolverForceUserFilesVol ( self, alg );
-            if ( rc != 0 )
-                break;
-        }
-    }
-
-    return rc;
-}
-
-static EDisabled _KConfigNodeRepoDisabled(
-    const KConfigNode *self, const char *name)
-{
-    EDisabled isDisabled = eDisabledNotSet;
-    const KConfigNode *node = NULL;
-    rc_t rc = KConfigNodeOpenNodeRead(self, &node, "%s/disabled", name);
-    bool disabled = false;
-    if (rc == 0) {
-        rc = KConfigNodeReadBool(node, &disabled);
-    }
-    if (rc == 0) {
-        isDisabled = disabled ? eDisabledSet : eEnabledSet;
-    }
-    KConfigNodeRelease(node);
-    return isDisabled;
-}
-
-static rc_t VResolverLoad(VResolver *self, const KRepository *protected,
-    const KConfig *cfg, const KNSManager *kns)
-{
-    bool have_remote_protected = false;
-
-    const KConfigNode *kfg;
-    rc_t rc = KConfigOpenNodeRead ( cfg, & kfg, "repository" );
-    if ( GetRCState ( rc ) == rcNotFound )
-        rc = 0;
-    else if ( rc == 0 )
-    {
-        bool userCacheEnabled = true;
-
-        EDisabled remoteDisabled = _KConfigNodeRepoDisabled(kfg, "remote");
-        EDisabled siteDisabled = _KConfigNodeRepoDisabled(kfg, "site");
-        EDisabled userDisabled = _KConfigNodeRepoDisabled(kfg, "user");
-
-        /* check to see what the current directory is */
-        char buffer [ 256 ];
-        self -> ticket = VResolverGetDownloadTicket ( self, protected, buffer, sizeof buffer );
-
-        {
-            const KConfigNode * node = NULL;
-            rc_t rc =
-                KConfigNodeOpenNodeRead ( kfg, & node, "user/cache-disabled" );
-            if ( rc == 0 ) {
-                bool disabled = false;
-                rc = KConfigNodeReadBool ( node, & disabled );
-                KConfigNodeRelease ( node );
- 
-                if ( rc == 0 && disabled ) {
-                    userCacheEnabled = false;
-                }
-            }
-        }
-
-        /* allow user to specify leaf paths in current directory */
-        rc = VResolverDetectSRALeafPath ( self );
-
-        /* if the user is inside of a protected workspace, load it now */
-        if ( rc == 0 && self -> ticket != NULL )
-        {
-            rc = VResolverLoadProtected
-                ( self, kfg, buffer, true, userDisabled, userCacheEnabled );
-            if ( rc == 0 && self -> num_app_vols [ appFILE ] == 0 )
-                rc = VResolverForceUserFiles ( self );
-        }
-
-        /* now load user public repositories */
-        if ( rc == 0 )
-            rc = VResolverLoadSubCategory ( self, & self -> local, kfg, NULL,
-                "user/main", true, false, userDisabled, userCacheEnabled );
-#if ALLOW_AUX_REPOSITORIES
-        if ( rc == 0 )
-            rc = VResolverLoadSubCategory ( self, & self -> local, kfg, NULL,
-                "user/aux", true, false, userDisabled, userCacheEnabled );
-#endif
-
-        /* load any site repositories */
-        if ( rc == 0 )
-            rc = VResolverLoadSubCategory ( self, & self -> local, kfg, NULL,
-                "site/main", false, false, siteDisabled, false );
-#if ALLOW_AUX_REPOSITORIES
-        if ( rc == 0 )
-            rc = VResolverLoadSubCategory ( self, & self -> local, kfg, NULL,
-                "site/aux", false, false, siteDisabled, false );
-#endif
-
-        /* if within a protected workspace, load protected remote repositories */
-        if ( rc == 0 && self -> ticket != NULL )
-        {
-            if (kns == NULL) {
-                rc = KNSManagerMake ( ( KNSManager** ) & self -> kns );
-            }
-            else {
-                rc = KNSManagerAddRef(kns);
-                if (rc == 0) {
-                    self -> kns = kns;
-                }
-            }
-            if ( rc == 0 )
-            {
-                uint32_t entry_vols = VectorLength ( & self -> remote );
-                rc = VResolverLoadSubCategory ( self, & self -> remote, kfg,
-                    self -> ticket, "remote/protected", false, true,
-                    remoteDisabled, false );
-                have_remote_protected = VectorLength ( & self -> remote ) > entry_vols;
-            }
-        }
-
-        /* load any remote repositories */
-        if ( rc == 0 )
-            rc = VResolverLoadSubCategory ( self, & self -> remote, kfg, NULL,
-                "remote/main", false, false, remoteDisabled, false );
-#if ALLOW_AUX_REPOSITORIES
-        if ( rc == 0 )
-            rc = VResolverLoadSubCategory ( self, & self -> remote, kfg, NULL,
-                "remote/aux", false, false, remoteDisabled, false );
-#endif
-
-        KConfigNodeRelease ( kfg );
-
-        /* recover from public remote repositories using resolver CGI */
-        if ( self -> kns == NULL )
-        {
-            if (kns == NULL) {
-                rc = KNSManagerMake ( ( KNSManager** ) & self -> kns );
-            }
-            else {
-                rc = KNSManagerAddRef(kns);
-                if (rc == 0) {
-                    self -> kns = kns;
-                }
-            }
-        }
-    }
-
-    if ( rc == 0 && self -> num_app_vols [ appAny ] == 0 )
-    {
-        bool has_current_refseq = true;
-
-        /* AT THIS POINT, a current configuration will have something.
-           But, older out-of-date configurations may exist and need special handling. */
-        if ( self -> num_app_vols [ appREFSEQ ] == 0 )
-        {
-            has_current_refseq = false;
-            rc = VResolverLoadLegacyRefseq ( self, cfg, true );
-        }
-
-        /* now, one more special case - for external users
-           who had legacy refseq configuration but nothing for SRA,
-           force existence of a remote refseq access */
-        if ( rc == 0
-             && ! has_current_refseq
-             && self -> num_app_vols [ appREFSEQ ] != 0
-             && self -> num_app_vols [ appSRA ] == 0 )
-        {
-            rc = VResolverForceRemoteRefseq ( self );
-        }
-    }
-
-    if ( rc == 0 && self -> num_app_vols [ appFILE ] == 0 )
-        rc = VResolverForceUserFiles ( self );
-
-    if ( rc == 0 && self -> ticket != NULL && ! have_remote_protected )
-        rc = VResolverForceRemoteProtected ( self );
-
-    if ( rc == 0 )
-    {
-        VectorReorder ( & self -> local, VResolverAlgSort, NULL );
-        VectorReorder ( & self -> remote, VResolverAlgSort, NULL );
-    }
-
-    self -> protocols = eProtocolHttp;
-
-    return rc;
-}
-
-LIB_EXPORT
-rc_t CC VResolverProtocols ( VResolver * self,
-    VRemoteProtocols protocols )
-{
-    if ( self == NULL )
-        return RC ( rcVFS, rcResolver, rcUpdating, rcSelf, rcNull );
-
-    if ( protocols >= eProtocolLastDefined )
-        return RC ( rcVFS, rcResolver, rcUpdating, rcParam, rcInvalid );
-
-    self -> protocols = protocols;
-
-    return 0;
-}
-
-
-rc_t VResolverGetProjectId ( const VResolver * self, uint32_t * projectId ) {
-    if ( self == NULL )
-        return RC ( rcVFS, rcResolver, rcAccessing, rcSelf, rcNull );
-    else if ( projectId == NULL )
-        return RC ( rcVFS, rcResolver, rcUpdating, rcParam, rcNull );
-    else {
-        bool has_project_id = self -> projectId != 0;
-
-        * projectId = 0;
-
-        if ( has_project_id ) {
-            * projectId = self -> projectId;
-        }
-
-        return 0;
-    }
-}
-
-
-/* Make
- *  internal factory function
- */
-static
-rc_t VResolverMake ( VResolver ** objp, const KDirectory *wd,
-    const KRepository *protected, const KConfig *kfg, const VFSManager *mgr )
-{
-    rc_t rc;
-
-    VResolver *obj = calloc ( 1, sizeof * obj );
-    if ( obj == NULL )
-        rc = RC ( rcVFS, rcMgr, rcCreating, rcMemory, rcExhausted );
-    else
-    {
-        KNSManager *kns = NULL;
-        VectorInit ( & obj -> roots, 0, 8 );
-        VectorInit ( & obj -> local, 0, 8 );
-        VectorInit ( & obj -> remote, 0, 8 );
-        obj -> wd = wd;
-
-        KRefcountInit ( & obj -> refcount, 1, "VResolver", "make", "resolver" );
-
-        if (mgr != NULL) {
-            rc_t rc = VFSManagerGetKNSMgr(mgr, &kns);
-            if (rc != 0) {
-                rc = 0;
-                kns = NULL;
-            }
-        }
-
-        rc = VResolverLoad ( obj, protected, kfg, kns );
-
-        KNSManagerRelease(kns);
-        kns = NULL;
-
-        KRepositoryProjectId ( protected, & obj -> projectId );
-
-        if ( rc == 0 )
-        {
-            * objp = obj;
-            return 0;
-        }
-
-        VResolverWhack ( obj );
-    }
-
-    return rc;
-}
-
-/* Make
- *  ask the VFS manager or repository to make a resolver
- */
-LIB_EXPORT
-rc_t CC VFSManagerMakeResolver ( const VFSManager * self,
-    VResolver ** new_resolver, const KConfig * cfg )
-{
-    rc_t rc;
-
-    if ( new_resolver == NULL )
-        rc = RC ( rcVFS, rcMgr, rcCreating, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVFS, rcMgr, rcCreating, rcSelf, rcNull );
-        else if ( cfg == NULL )
-            rc = RC ( rcVFS, rcMgr, rcCreating, rcParam, rcNull );
-        else
-        {
-            KDirectory *wd;
-            rc = VFSManagerGetCWD ( self, & wd );
-            if ( rc == 0 )
-            {
-                const KRepositoryMgr *rmgr;
-                rc = KConfigMakeRepositoryMgrRead ( cfg, & rmgr );
-                if ( rc == 0 )
-                {
-                    const KRepository *protected = NULL;
-                    rc = KRepositoryMgrCurrentProtectedRepository ( rmgr, & protected );
-                    if ( rc == 0 || GetRCState ( rc ) == rcNotFound )
-                    {
-                        rc = VResolverMake(new_resolver,
-                            wd, protected, cfg, self);
-                        KRepositoryRelease ( protected );
-
-                        if ( rc == 0 )
-                        {
-                            KRepositoryMgrRelease ( rmgr );
-                            return 0;
-                        }
-                    }
-
-                    KRepositoryMgrRelease ( rmgr );
-                }
-
-                KDirectoryRelease ( wd );
-            }
-        }
-
-        *new_resolver = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT
-rc_t CC KRepositoryMakeResolver ( const KRepository *self,
-    VResolver ** new_resolver, const KConfig * cfg )
-{
-    rc_t rc;
-
-    if ( new_resolver == NULL )
-        rc = RC ( rcVFS, rcMgr, rcCreating, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVFS, rcMgr, rcCreating, rcSelf, rcNull );
-        else if ( cfg == NULL )
-            rc = RC ( rcVFS, rcMgr, rcCreating, rcParam, rcNull );
-        else
-        {
-            KDirectory *wd;
-            rc = KDirectoryNativeDir ( & wd );
-            if ( rc == 0 )
-            {
-                rc = VResolverMake ( new_resolver, wd, self, cfg, NULL );
-                if ( rc == 0 )
-                    return 0;
-
-                KDirectoryRelease ( wd );
-            }
-        }
-
-        *new_resolver = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/vfs/srapath-stub.c b/libs/vfs/srapath-stub.c
deleted file mode 100644
index da0985d..0000000
--- a/libs/vfs/srapath-stub.c
+++ /dev/null
@@ -1,372 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <sra/extern.h>
-#include <klib/rc.h>
-#include <klib/defs.h>
-#include <klib/refcount.h>
-#include <sra/srapath.h>
-#include <sra/sradb-priv.h>
-#include <sysalloc.h>
-#include <os-native.h>
-
-#include <sra/impl.h>
-
-#include <string.h>
-#include <assert.h>
-#include <stdio.h>
-
-
-/*--------------------------------------------------------------------------
- * SRAPath
- *  manages accession -> path conversion
- */
-
-/* Make
- *  create path manager
- *
- *  the path manager should already be configured with
- *  standard search paths, but can be augmented by using
- *  the Add*Path messages.
- *
- *  "dir" [ IN, NULL OKAY ] - optional root directory to use
- *  attaches a new reference
- */
-LIB_EXPORT rc_t CC SRAPathMake ( SRAPath **pm, struct KDirectory const *dir )
-{
-    rc_t rc;
-
-    if ( pm == NULL )
-        rc = RC ( rcSRA, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        rc = SRAPathMakeImpl( pm, dir );
-        if ( rc == 0 )
-            return 0;
-
-        * pm = NULL;
-    }
-
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-LIB_EXPORT rc_t CC SRAPathAddRef ( const SRAPath *self )
-{
-    if ( self != NULL )
-    {
-        switch ( self -> vt -> v1 . maj )
-        {
-        case 1:
-        case 2:
-            return self -> vt -> v1 . addref ( self );
-        }
-
-        return RC ( rcSRA, rcMgr, rcReleasing, rcInterface, rcBadVersion );
-    }
-    return 0;
-}
-
-LIB_EXPORT rc_t CC SRAPathRelease ( const SRAPath *self )
-{
-    if ( self != NULL )
-    {
-        switch ( self -> vt -> v1 . maj )
-        {
-        case 1:
-        case 2:
-            return self -> vt -> v1 . release ( self );
-        }
-
-        return RC ( rcSRA, rcMgr, rcReleasing, rcInterface, rcBadVersion );
-    }
-    return 0;
-}
-
-
-/* Version
- *  returns the library version
- */
-LIB_EXPORT rc_t CC SRAPathVersion ( const SRAPath *self, uint32_t *version )
-{
-    if ( version == NULL )
-        return RC ( rcSRA, rcMgr, rcAccessing, rcParam, rcNull );
-
-    * version = 0;
-
-    if ( self == NULL )
-        return RC ( rcSRA, rcMgr, rcAccessing, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-    case 2:
-        return self -> vt -> v1 . version ( self, version );
-    }
-
-    return RC ( rcSRA, rcMgr, rcAccessing, rcInterface, rcBadVersion );
-}
-
-
-/* Clear
- *  forget all existing server and volume paths
- */
-LIB_EXPORT rc_t CC SRAPathClear ( SRAPath *self )
-{
-    if ( self == NULL )
-        return RC ( rcSRA, rcMgr, rcResetting, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-    case 2:
-        return self -> vt -> v1 . clear ( self );
-    }
-
-    return RC ( rcSRA, rcMgr, rcResetting, rcInterface, rcBadVersion );
-}
-
-
-/* AddRepPath
- *  add a replication path
- *
- *  "rep" [ IN ] - NUL-terminated server search path
- *  may be a compound path with ':' separator characters, e.g.
- *  "/panfs/traces01:/panfs/traces31"
- *
- *  NB - servers are searched in the order provided,
- *  first to last, until one of them satisfies a request,
- *  at which time the successful server is placed at the
- *  head of the search path.
- */
-LIB_EXPORT rc_t CC SRAPathAddRepPath ( SRAPath *self, const char *path )
-{
-    if ( self == NULL )
-        return RC ( rcSRA, rcMgr, rcUpdating, rcSelf, rcNull );
-    if ( path == NULL )
-        return RC ( rcSRA, rcMgr, rcUpdating, rcString, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcSRA, rcMgr, rcUpdating, rcString, rcEmpty );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-    case 2:
-        return self -> vt -> v1 . addRepPath ( self, path );
-    }
-
-    return RC ( rcSRA, rcMgr, rcUpdating, rcInterface, rcBadVersion );
-}
-
-
-/* AddVolPath
- *  add a volume path
- *
- *  "vol" [ IN ] - NUL-terminated volume search path
- *  may be a compound path with ':' separator characters, e.g.
- *  "sra2:sra1:sra0"
- *
- *  NB - volumes are searched in the order provided,
- *  first to last. they are never re-ordered.
- */
-LIB_EXPORT rc_t CC SRAPathAddVolPath ( SRAPath *self, const char *path )
-{
-    if ( self == NULL )
-        return RC ( rcSRA, rcMgr, rcUpdating, rcSelf, rcNull );
-    if ( path == NULL )
-        return RC ( rcSRA, rcMgr, rcUpdating, rcString, rcNull );
-    if ( path [ 0 ] == 0 )
-        return RC ( rcSRA, rcMgr, rcUpdating, rcString, rcEmpty );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-    case 2:
-        return self -> vt -> v1 . addVolPath ( self, path );
-    }
-
-    return RC ( rcSRA, rcMgr, rcUpdating, rcInterface, rcBadVersion );
-}
-
-
-/* Full
- *  creates full path from server, volume & accession
- *
- *  "rep" [ IN ] - NUL terminated full path of replication
- *  server, e.g. "/panfs/traces01"
- *
- *  "vol" [ IN ] - NUL terminated relative path of volume,
- *  e.g. "sra2"
- *
- *  "accession" [ IN ] - NUL terminated run accession,
- *  e.g. "SRR000001"
- *
- *  "path" [ OUT ] and "path_max" [ IN ] - return buffer for
- *  NUL-terminated full path to accession.
- */
-LIB_EXPORT rc_t CC SRAPathFull ( const SRAPath *self, const char *rep,
-    const char *vol, const char *accession, char *path, size_t path_max )
-{
-    if ( path_max == 0 )
-        return RC ( rcSRA, rcMgr, rcAccessing, rcBuffer, rcInsufficient );
-    if ( path == NULL )
-        return RC ( rcSRA, rcMgr, rcAccessing, rcBuffer, rcNull );
-
-    /* prepare return for failure */
-    path [ 0 ] = 0;
-
-    /* test remainder */
-    if ( self == NULL )
-        return RC ( rcSRA, rcMgr, rcAccessing, rcSelf, rcNull );
-    if ( accession == NULL )
-        return RC ( rcSRA, rcMgr, rcAccessing, rcPath, rcNull );
-    if ( accession [ 0 ] == 0 )
-        return RC ( rcSRA, rcMgr, rcAccessing, rcPath, rcEmpty );
-
-    /* turn NULL prefix parts into empty string */
-    if ( rep == NULL )
-        rep = "";
-    if ( vol == NULL )
-        vol = "";
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-    case 2:
-        return self -> vt -> v1 . fullPath ( self, rep, vol, accession, path, path_max );
-    }
-
-    return RC ( rcSRA, rcMgr, rcAccessing, rcInterface, rcBadVersion );
-}
-
-
-/* Test
- *  returns true if path appears to be accession
- *  the test is a heuristic, and may return false positives
- *
- *  "path" [ IN ] - NUL terminated path to run
- */
-LIB_EXPORT bool CC SRAPathTest ( const SRAPath *self, const char *path )
-{
-    if ( self == NULL )
-        return false;
-    if ( path == NULL || path [ 0 ] == 0 )
-        return false;
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-    case 2:
-        return self -> vt -> v1 . testPath ( self, path );
-    }
-
-    return false;
-}
-
-
-/* Find
- *  finds location of run within rep-server/volume matrix
- *
- *  "accession" [ IN ] - NUL terminated run accession,
- *   e.g. "SRR000001"
- *
- *  "path" [ OUT ] and "path_max" [ IN ] - return buffer for
- *  NUL-terminated full path to accession.
- *
- *  returns 0 if path exists, rc state rcNotFound if
- *  path cannot be found, and rcInsufficient if buffer is
- *  too small.
- */
-LIB_EXPORT rc_t CC SRAPathFindWithRepLen ( const SRAPath *self,
-    const char *accession, char *path, size_t path_max, size_t *rep_len )
-{
-    if ( path == NULL )
-        return RC ( rcSRA, rcMgr, rcSelecting, rcBuffer, rcNull );
-    if ( path_max == 0 )
-        return RC ( rcSRA, rcMgr, rcSelecting, rcBuffer, rcInsufficient );
-
-    /* looking for illegal character in the accession 'name'
-     * this will be the RC from something like "ncbi-acc:./SRR000001"
-     * or if this is called as a default resolution in the old manner
-     */
-    if ( strchr ( accession, '/' ) != NULL )
-        return RC ( rcSRA, rcUri, rcResolving, rcPath, rcIncorrect );
-
-    path [ 0 ] = 0;
-
-    if ( self == NULL )
-        return RC ( rcSRA, rcMgr, rcSelecting, rcSelf, rcNull );
-    if ( accession == NULL )
-        return RC ( rcSRA, rcMgr, rcSelecting, rcPath, rcNull );
-    if ( accession [ 0 ] == 0 )
-        return RC ( rcSRA, rcMgr, rcSelecting, rcPath, rcEmpty );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-    case 2:
-        return self -> vt -> v1 . findPath ( self, accession, path, path_max, rep_len );
-    }
-
-    return RC ( rcSRA, rcMgr, rcSelecting, rcInterface, rcBadVersion );
-}
-
-LIB_EXPORT rc_t CC SRAPathFind ( const SRAPath *self,
-    const char *accession, char *path, size_t path_max )
-{
-    return SRAPathFindWithRepLen ( self, accession, path, path_max, NULL );
-}
-
-
-/* List (Deprecated)
- *  list all runs known to SRAPath
- *  this can be VERY SLOW due to the large number of runs
- *
- *  "runs" [ OUT ] - return parameter for ordered list of accessions
- *
- *  "deep" [ IN ] - when false, list only first responding server
- */
-LIB_EXPORT rc_t CC SRAPathList ( const SRAPath *self, struct KNamelist **runs, bool deep )
-{
-    if ( runs == NULL )
-        return RC ( rcSRA, rcMgr, rcListing, rcParam, rcNull );
-
-    * runs = NULL;
-
-    if ( self == NULL )
-        return RC ( rcSRA, rcMgr, rcListing, rcSelf, rcNull );
-
-    switch ( self -> vt -> v1 . maj )
-    {
-    case 1:
-        return RC ( rcSRA, rcMgr, rcListing, rcInterface, rcUnsupported ); /* removed from v1 */
-    }
-
-    return RC ( rcSRA, rcMgr, rcListing, rcInterface, rcBadVersion );
-}
diff --git a/libs/vfs/srapath.c b/libs/vfs/srapath.c
deleted file mode 100644
index fce03d2..0000000
--- a/libs/vfs/srapath.c
+++ /dev/null
@@ -1,1424 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <sra/path-extern.h>
-
-struct SRARunlist;
-#define KNAMELIST_IMPL struct SRARunlist
-#include <klib/impl.h>
-
-struct NCBISRAPath;
-#define SRAPATH_IMPL struct NCBISRAPath
-#include <sra/impl.h>
-
-#include "libsrapath.vers.h"
-
-#include <vfs/manager.h>
-#include <sra/srapath.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/mmap.h>
-#include <kfs/dyload.h>
-#include <klib/container.h>
-#include <klib/vector.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <klib/printf.h>
-#include <kfg/config.h>
-#include <kfg/kfg-priv.h>
-#include <klib/debug.h>
-#include <klib/log.h>
-#include <sysalloc.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-#include "path-priv.h"
-
-/*--------------------------------------------------------------------------
- * SRAPathString
- */
-enum
-{
-    alg_none,
-    alg_ncbi,
-    alg_ddbj,
-    alg_ebi,
-    alg_refseq,
-    alg_wgs
-};
-
-typedef struct SRAPathString SRAPathString;
-struct SRAPathString
-{
-    DLNode n;
-    uint8_t alg;
-    char path [ 1 ];
-};
-
-/* Whack
- */
-static
-void CC SRAPathStringWhack ( DLNode *n, void *ignore )
-{
-    free ( n );
-}
-
-/* Make
- */
-static
-rc_t SRAPathStringMake ( DLList *list, const char *path, size_t sz, uint8_t alg )
-{
-    SRAPathString *s = (SRAPathString*) malloc ( sizeof * s + sz );
-    if ( s == NULL )
-        return RC ( rcSRA, rcMgr, rcUpdating, rcMemory, rcExhausted );
-
-    s -> alg = alg;
-    string_copy ( s -> path, sz + 1, path, sz );
-    DLListPushTail ( list, & s -> n );
-
-    return 0;
-}
-
-
-/* Find
- */
-typedef struct SRAPathFindInfo SRAPathFindInfo;
-struct SRAPathFindInfo
-{
-    const char *path;
-    size_t size;
-    uint8_t alg;
-    bool found;
-};
-
-static
-bool CC SRAPathStringFind ( DLNode *n, void *data )
-{
-    const SRAPathString *p = ( const SRAPathString* ) n;
-    SRAPathFindInfo *pb = ( SRAPathFindInfo* ) data;
-    if ( memcmp ( p -> path, pb -> path, pb -> size ) == 0 )
-    {
-        if ( p -> path [ pb -> size ] == 0 )
-        {
-            pb -> alg = p -> alg;
-            return pb -> found = true;
-        }
-    }
-    return false;
-}
-
-/*--------------------------------------------------------------------------
- * NCBIRepository
- *  represents a repository: replication server(s) / volume(s)
- */
-typedef struct NCBIRepository NCBIRepository;
-struct NCBIRepository
-{
-    DLNode n;
-
-    uint8_t type; /* repository type: alg_ncbi (sra: ncbi/ebi/ddbj), alg_wgs, alg_refseq*/
-
-    /* replication servers */
-    DLList repsrv;
-
-    /* volumes upon each repserver */
-    DLList vols;
-};
-/* Init
- */
-static
-rc_t CC SRARepoMake(NCBIRepository** repo)
-{
-    *repo = (NCBIRepository*)malloc(sizeof(NCBIRepository));
-    if (* repo == 0)
-    {
-        return RC ( rcSRA, rcMgr, rcInitializing, rcMemory, rcExhausted );
-    }
-    (*repo)->type = alg_ncbi;
-    (*repo)->n.next = NULL;
-    (*repo)->n.prev = NULL;
-    DLListInit(&(*repo)->repsrv);
-    DLListInit(&(*repo)->vols);
-    return 0;
-}
-/* Whack
- */
-static
-void CC SRARepoWhack ( DLNode *n, void *ignore )
-{
-    if (n != NULL)
-    {
-        DLListWhack ( & ((NCBIRepository*) n) -> repsrv, SRAPathStringWhack, NULL );
-        DLListWhack ( & ((NCBIRepository*) n) -> vols, SRAPathStringWhack, NULL );
-        free ( (NCBIRepository*) n );
-    }
-}
-
-static 
-const char* AlgToStr(uint8_t alg)
-{
-    switch (alg)
-    {
-    case alg_ncbi: 
-    case alg_ddbj:
-    case alg_ebi: return "SRA";
-    case alg_wgs: return "WGS";
-    case alg_refseq: return "REFSEQ";
-    default: return "<unknown>";
-    }
-}
-
-
-static 
-void CC LogVolume( DLNode *n, void *data )
-{
-    const SRAPathString* self = (const SRAPathString*)n;
-    PATH_DEBUG (("        \"%s\", type=%s\n", 
-                  self->path,
-                  AlgToStr(self->alg)));
-}
-
-static 
-void CC LogServer( DLNode *n, void *data )
-{
-    const SRAPathString* self = (const SRAPathString*)n;
-    PATH_DEBUG (("        \"%s\"\n", self->path));
-}
-
-static 
-void CC LogRepository ( DLNode *n, void *data )
-{
-    if (n != NULL)
-    {
-        const NCBIRepository* self = (const NCBIRepository*)n;
-        PATH_DEBUG (("    type=%s\n", AlgToStr(self->type)));
-        PATH_DEBUG (("    servers:\n"));
-        DLListForEach ( & self->repsrv, false, LogServer, NULL );
-        PATH_DEBUG (("    volumes:\n"));
-        DLListForEach ( & self->vols, false, LogVolume, NULL );
-    }
-}
-
-/*--------------------------------------------------------------------------
- * NCBISRAPath
- *  manages accession -> path conversion
- */
-typedef struct NCBISRAPath NCBISRAPath;
-struct NCBISRAPath
-{
-    struct SRAPath dad;
-
-    /* working directory */
-    const KDirectory *dir;
-
-    /* repositories */
-    DLList repos;
-    NCBIRepository* dflt_repo; /* default repository (likely to be removed in the future versions) */ 
-
-    atomic32_t refcount;
-};
-
-static void LogPathInfo(const NCBISRAPath* self)
-{
-    PATH_DEBUG (("NCBISRAPath configuration:\n"));
-    DLListForEach ( & self->repos, false, LogRepository, NULL );
-    PATH_DEBUG (("default repository:\n"));
-    LogRepository( (DLNode*) self->dflt_repo, NULL );
-}
-
-/* Whack
- */
-static
-rc_t SRAPathWhack ( NCBISRAPath *self )
-{
-    rc_t rc = KDirectoryRelease ( self -> dir );
-    if ( rc == 0 )
-    {
-        DLListWhack ( & self -> repos, SRARepoWhack, NULL );
-        SRARepoWhack ( (DLNode*) self -> dflt_repo, NULL );
-        free ( self );
-    }
-    return rc;
-}
-
-
-/* AddRef
- * Release
- */
-static
-rc_t CC NCBISRAPathAddRef ( const NCBISRAPath *cself )
-{
-    atomic32_inc ( & ( ( NCBISRAPath* ) cself ) -> refcount );
-    return 0;
-}
-
-static
-rc_t CC NCBISRAPathRelease ( const NCBISRAPath *cself )
-{
-    NCBISRAPath *self = ( NCBISRAPath* ) cself;
-    if ( atomic32_dec_and_test ( & self -> refcount ) )
-        return SRAPathWhack ( self );
-    return 0;
-}
-
-
-/* Version
- *  returns the library version
- */
-static
-rc_t CC NCBISRAPathVersion ( const NCBISRAPath *self, uint32_t *version )
-{
-    * version = LIBSRAPATH_VERS;
-    return 0;
-}
-
-
-/* Clear
- *  forget existing server and volume paths for the default repository
- */
-static
-rc_t CC NCBISRAPathClear ( NCBISRAPath *self )
-{
-    DLListWhack ( & self -> dflt_repo -> repsrv, SRAPathStringWhack, NULL );
-    DLListWhack ( & self -> dflt_repo -> vols, SRAPathStringWhack, NULL );
-    DLListInit ( & self -> dflt_repo -> repsrv );
-    DLListInit ( & self -> dflt_repo -> vols );
-
-    return 0;
-}
-
-
-/* AddPath
- *  add an alternate replication or volume path
- *
- *  "path" [ IN ] and "size" [ IN ] - sets a search path
- *
- *  "alt" [ IN ] - use std or alternate volume path algorithm
- */
-static
-rc_t SRAPathAddSubPath ( DLList *list, const char *path, size_t size, uint8_t alg )
-{
-    /* see if it's already there */
-    SRAPathFindInfo pb;
-    pb . path = path;
-    pb . size = size;
-    pb . found = 0;
-    DLListDoUntil ( list, 0, SRAPathStringFind, & pb );
-    if ( pb . found )
-        return 0;
-
-    /* create a new one */
-    return SRAPathStringMake ( list, path, size, alg );
-}
-
-static
-rc_t SRAPathAddPath ( DLList *list, const char *path, uint8_t alg )
-{
-    rc_t rc;
-    if ( path == NULL )
-        rc = RC ( rcSRA, rcMgr, rcUpdating, rcString, rcNull );
-    else if ( path [ 0 ] == 0 )
-        rc = RC ( rcSRA, rcMgr, rcUpdating, rcString, rcEmpty );
-    else
-    {
-        /* treat path as a Unix-style multi-path */
-        size_t size = string_size ( path );
-        while ( 1 )
-        {
-            /* find separator */
-            const char *sep = string_chr ( path, size, ':' );
-            if ( sep == NULL )
-                break;
-
-            /* add sub-path */
-            rc = SRAPathAddSubPath ( list, path, sep - path, alg );
-            if ( rc != 0 )
-                return rc;
-
-            /* consume ':' */
-            ++ sep;
-
-            /* pop from string */
-            size -= sep - path;
-            path = sep;
-        }
-
-        return SRAPathAddSubPath ( list, path, size, alg );
-    }
-    return rc;
-}
-
-/* AddRepPath
- *  add a replication path to a repository
- *
- *  "rep" [ IN ] - NUL-terminated server search path
- *  may be a compound path with ':' separator characters, e.g.
- *  "/panfs/traces01:/panfs/traces31"
- *
- *  NB - servers are searched in the order provided,
- *  first to last, until one of them satisfies a request,
- *  at which time the successful server is placed at the
- *  head of the search path.
- */
-static
-rc_t CC NCBISRAPathAddRepPath ( NCBIRepository* repo, const char *rep )
-{
-    return SRAPathAddPath ( & repo -> repsrv, rep, alg_none );
-}
-static
-rc_t CC NCBISRAPathAddRepPathDefault ( NCBISRAPath *self, const char *rep )
-{
-    return NCBISRAPathAddRepPath ( self -> dflt_repo, rep );
-}
-
-/* AddVolPath
- *  add a volume path to the default repository
- *
- *  "vol" [ IN ] - NUL-terminated volume search path
- *  may be a compound path with ':' separator characters, e.g.
- *  "sra2:sra1:sra0"
- *
- *  NB - volumes are searched in the order provided,
- *  first to last. they are never re-ordered.
- */
-static
-rc_t SRAPathAddAlgVolPath ( NCBIRepository* repo, const char *vol, uint8_t alg )
-{
-    return SRAPathAddPath ( & repo -> vols, vol, alg );
-}
-static
-rc_t CC NCBISRAPathAddVolPathDefault ( NCBISRAPath *self, const char *vol )
-{
-    return SRAPathAddAlgVolPath ( self -> dflt_repo, vol, alg_ncbi);
-}
-
-/* Config
- *  configure an existing path manager
- */
-static
-rc_t SRAPathConfigValue ( const KConfig *kfg, const char *node_path,
-    char *value, size_t value_size, const char *dflt )
-{
-    const KConfigNode *node;
-    rc_t rc = KConfigOpenNodeRead ( kfg, & node, "%s", node_path );
-    if ( rc == 0 )
-    {
-        size_t num_read, remaining;
-        rc = KConfigNodeRead ( node, 0, value, value_size - 1, & num_read,  & remaining );
-        if ( rc == 0 )
-        {
-            if ( remaining != 0 )
-                rc = RC ( rcSRA, rcMgr, rcConstructing, rcString, rcExcessive );
-            else
-                value [ num_read ] = 0;
-        }
-
-        KConfigNodeRelease ( node );
-    }
-
-    if ( rc != 0 )
-    {
-        if ( dflt != NULL && dflt [ 0 ] != 0 )
-        {
-            size_t num_read = string_copy_measure ( value, value_size, dflt );
-            rc = 0;
-            if ( num_read == value_size )
-                rc = RC ( rcSRA, rcMgr, rcConstructing, rcString, rcExcessive );
-        }
-        else
-	    	value[0] = 0;     
-    }
-    return rc;
-}
-
-static 
-rc_t ConfigVolume(NCBIRepository* repo, KConfig * kfg, const char* keyPref, const char* keySuff, uint8_t alg )
-{
-    char value [ 4096 ];
-    char key [ 4096 ];
-    size_t pSize = string_size(keyPref);
-    size_t sSize = string_size(keySuff);
-    if ( pSize + sSize >= sizeof(key))
-    {
-        return RC ( rcSRA, rcMgr, rcConstructing, rcString, rcExcessive );
-    }
-    string_copy(key, sizeof(key), keyPref, pSize);
-    string_copy(key + pSize, sizeof(key) - pSize, keySuff, sSize);
-    key[pSize+sSize] = 0;
-    value[0] = '\0';
-    if ( SRAPathConfigValue ( kfg, key, value, sizeof value, NULL ) == 0 )        
-        SRAPathAddAlgVolPath ( repo, value, alg );
-    return 0;
-}
-
-static
-rc_t ConfigRepo(KConfig * kfg, const char *dflt, const char* reps, const char* volPref, uint8_t type, NCBIRepository** repo)
-{
-    char value [ 4096 ] = "";
-    rc_t rc;
-
-    /* set up a new repo */ 
-    rc = SRARepoMake(repo);
-    if ( rc == 0 )
-    {
-        (*repo)->type = type;
-
-        /* set up servers */
-        if ( SRAPathConfigValue ( kfg, reps, value, sizeof value, dflt ) == 0 )
-            NCBISRAPathAddRepPath ( *repo, value );
-
-        if ( type == alg_ncbi )
-        {
-            /* set up NCBI volumes */
-            rc = ConfigVolume( *repo, kfg, volPref, "/ncbi/volumes", alg_ncbi );
-
-            /* set up EBI volumes */
-            if (rc == 0)
-                rc = ConfigVolume( *repo, kfg, volPref, "/ebi/volumes", alg_ebi );
-
-            /* set up DDBJ volumes */
-            if (rc == 0)
-                rc = ConfigVolume( *repo, kfg, volPref, "/ddbj/volumes", alg_ddbj );
-        }
-        else if (rc == 0)
-        {
-                rc = ConfigVolume( *repo, kfg, volPref, "/volumes", type);
-        }
-    }
-    return rc;
-}
-
-static
-rc_t ConfigRepoSet(DLList* repos, KConfig * kfg, const char* kfgPath, const char *dflt, uint8_t type)
-{
-    const KConfigNode *node;
-
-    rc_t rc = KConfigOpenNodeRead ( kfg, & node, "%s", kfgPath );
-    if ( rc == 0 )
-    {
-        KNamelist* children;
-        rc = KConfigNodeListChild ( node, &children );
-        if ( rc == 0 )
-        {
-            uint32_t count;
-            rc = KNamelistCount ( children, &count );
-            if ( rc == 0 )
-            {
-                uint32_t i;
-                for (i = 0; i < count; ++i)
-                {
-                    const char* name;
-                    rc = KNamelistGet ( children, i, &name );
-                    if ( rc == 0 )
-                    {
-                        #define BufSize 4096
-                        char buf[ BufSize ];
-                        size_t bSize = string_size(kfgPath);
-                        string_copy(buf, BufSize, kfgPath, bSize);
-                        if (bSize + string_size(name) < sizeof(buf))
-                        {
-                            NCBIRepository* repo;
-                            string_copy(buf + bSize, sizeof(buf) - bSize, name, string_size(name) + 1);
-                            rc = ConfigRepo( kfg, dflt, buf, buf, type, &repo );
-                            DLListPushTail( repos, (DLNode*) repo );
-                        }
-                        #undef BufSize
-                    }
-                    else
-                    {
-                        rc = RC ( rcSRA, rcMgr, rcConstructing, rcString, rcExcessive );
-                    }
-                    if ( rc != 0 )
-                    {
-                        break;
-                    }
-                }
-            }
-            KNamelistRelease ( children );
-        }
-
-        KConfigNodeRelease ( node );
-    }
-    if (GetRCState(rc) == rcNotFound)
-    {
-        return 0;
-    }
-    return rc;
-}
-
-static
-rc_t SRAPathConfig ( NCBISRAPath *self )
-{
-    const char *dflt;
-    KConfig * kfg;
-    rc_t rc = KConfigMakeLocal ( & kfg, NULL );
-    assert ( ( rc == 0 && kfg != NULL ) || ( rc != 0 && kfg == NULL ) );
-
-    /* look for defaults */
-    dflt = getenv ( "SRAPATH" );
-
-    /* locate and configure all repositories */
-    if ( rc == 0 )
-        rc = ConfigRepoSet( & self->repos, kfg, "/sra/repository/", dflt, alg_ncbi );
-    if ( rc == 0 )
-        rc = ConfigRepoSet( & self->repos, kfg, "/wgs/repository/", dflt, alg_wgs );
-    if ( rc == 0 )
-        rc = ConfigRepoSet( & self->repos, kfg, "/refseq/repository/", dflt, alg_refseq );
-
-    if ( rc == 0 )
-    {   /* default repository for backwards compatibility */
-        rc = ConfigRepo( kfg, dflt, "sra/servers", "sra", alg_ncbi, &self->dflt_repo );
-
-        /* set up REFSEQ volumes */
-        if (rc == 0)
-            rc = ConfigVolume( self->dflt_repo, kfg, "", "/refseq/volumes", alg_refseq );
-
-        /* set up WGS volumes */
-        if (rc == 0)
-            rc = ConfigVolume( self->dflt_repo, kfg, "sra", "/wgs/volumes", alg_wgs );
-    }
-
-    LogPathInfo(self);
-
-    /* kfg may be NULL */        
-    KConfigRelease ( kfg );
-
-    return rc;
-}
-
-
-/* ParseRunAccession
- *  accession is a string matching <prefix><number>
- *  extract prefix length and accession number
- */
-static
-rc_t SRAPathParseRunAccession ( const char *accession, uint32_t *prefix, uint32_t *number )
-{
-    char *end;
-    uint32_t i;
-
-    for ( i = 0; accession [ i ] != 0; ++ i )
-    {
-        if ( isdigit ( accession [ i ] ) )
-            break;
-    }
-
-    if ( i == 0 )
-        return RC ( rcSRA, rcMgr, rcResolving, rcPath, rcInvalid );
-
-    * prefix = i;
-    * number = ( uint32_t ) strtoul ( & accession [ i ], & end, 10 );
-
-    if (( end [ 0 ] == 0 ) || ( end [ 0 ] == '.' ))
-    {
-        return 0;
-    }
-    return RC ( rcSRA, rcMgr, rcResolving, rcPath, rcInvalid );
-}
-
-
-/* Full
- *  creates full path from server, volume & accession
- *
- *  "rep" [ IN ] - NUL terminated full path of replication
- *  server, e.g. "/panfs/traces01"
- *
- *  "vol" [ IN ] - NUL terminated relative path of volume,
- *  e.g. "sra2"
- *
- *  "accession" [ IN ] - NUL terminated run accession,
- *  e.g. "SRR000001"
- *
- *  "path" [ OUT ] and "path_max" [ IN ] - return buffer for
- *  NUL-terminated full path to accession.
- */
-static
-rc_t SRAPathFullInt ( const NCBISRAPath *self, const char *rep, const char *vol,
-    const char *accession, char *path, size_t path_max, size_t bank_size )
-{
-    /* pick apart accession */
-    uint32_t prefix, number;
-    rc_t rc = SRAPathParseRunAccession ( accession, & prefix, & number );
-    if ( rc == 0 )
-    {
-        size_t len;
-        size_t total = 0;
-        uint32_t bank = number / bank_size;
-
-        if ( rep [ 0 ] != 0 && vol [ 0 ] != 0 )
-        {
-            /* normally write all parts at once */
-            if ( rep [ strlen (rep) - 1 ] == '/') /* check for need or not a '/' between rep and vol */
-                rc= string_printf ( path, path_max, &len, "%s%s/%.*s/%06u/%s"
-                                 , rep
-                                 , vol
-                                 , ( int ) prefix, accession
-                                 , bank
-                                 , accession );
-            else
-                rc= string_printf  ( path, path_max, &len, "%s/%s/%.*s/%06u/%s"
-                                 , rep
-                                 , vol
-                                 , ( int ) prefix, accession
-                                 , bank
-                                 , accession );
-        }
-        else
-        {
-            /* allow for individual rep-server and volume parts */
-            if ( rep [ 0 ] != 0 )
-            {
-                rc = string_printf ( path, path_max, &len, "%s/", rep );
-                if ( rc != 0 || ( total = len ) >= path_max )
-                    return RC ( rcSRA, rcMgr, rcAccessing, rcBuffer, rcInsufficient );
-            }
-            else if ( vol [ 0 ] != 0 )
-            {
-                rc = string_printf ( & path [ total ], path_max - total, &len, "%s/", vol );
-                if ( rc != 0 || ( total = len ) >= path_max )
-                    return RC ( rcSRA, rcMgr, rcAccessing, rcBuffer, rcInsufficient );
-            }
-
-            /* append the accession */
-            rc = string_printf ( & path [ total ], path_max - total, &len, "%.*s/%06u/%s"
-                             , ( int ) prefix, accession
-                             , bank
-                             , accession );
-        }
-
-        /* common detection of buffer overflow */
-        if ( rc != 0 || ( total += len ) >= path_max )
-            rc = RC ( rcSRA, rcMgr, rcAccessing, rcBuffer, rcInsufficient );
-    }
-
-    return rc;
-}
-
-static
-rc_t SRAPathFullEBI ( const NCBISRAPath *self, const char *rep, const char *vol,
-    const char *accession, char *path, size_t path_max )
-{
-    /* pick apart accession */
-    uint32_t prefix, number;
-    rc_t rc = SRAPathParseRunAccession ( accession, & prefix, & number );
-    if ( rc == 0 )
-    {
-        size_t len;
-        size_t total = 0;
-        uint32_t bank = number / 1000;
-
-        if ( rep [ 0 ] != 0 && vol [ 0 ] != 0 )
-        {
-            /* normally write all parts at once */
-            if ( rep [ strlen (rep) - 1 ] == '/') /* check for need or not a '/' between rep and vol */
-                rc= string_printf ( path, path_max, &len, "%s%s/%.*s/%.*s%03u/%s"
-                                 , rep
-                                 , vol
-                                 , ( int ) prefix, accession
-                                 , ( int ) prefix, accession
-                                 , bank
-                                 , accession );
-            else
-                rc= string_printf  ( path, path_max, &len, "%s/%s/%.*s/%.*s%03u/%s"
-                                 , rep
-                                 , vol
-                                 , ( int ) prefix, accession
-                                 , ( int ) prefix, accession
-                                 , bank
-                                 , accession );
-        }
-        else
-        {
-            /* allow for individual rep-server and volume parts */
-            if ( rep [ 0 ] != 0 )
-            {
-                rc = string_printf ( path, path_max, &len, "%s/", rep );
-                if ( rc < 0 || ( total = len ) >= path_max )
-                    return RC ( rcSRA, rcMgr, rcAccessing, rcBuffer, rcInsufficient );
-            }
-            else if ( vol [ 0 ] != 0 )
-            {
-                rc = string_printf ( & path [ total ], path_max - total, &len, "%s/", vol );
-                if ( rc != 0 || ( total = len ) >= path_max )
-                    return RC ( rcSRA, rcMgr, rcAccessing, rcBuffer, rcInsufficient );
-            }
-
-            /* append the accession */
-            rc = string_printf ( & path [ total ], path_max - total, &len, "%.*s/%.*s%03u/%s"
-                             , ( int ) prefix, accession
-                             , ( int ) prefix, accession
-                             , bank
-                             , accession );
-        }
-
-        /* common detection of buffer overflow */
-        if ( len < 0 || ( total += len ) >= path_max )
-            rc = RC ( rcSRA, rcMgr, rcAccessing, rcBuffer, rcInsufficient );
-    }
-
-    return rc;
-}
-
-/*
-* Refseq-style accessions come in 2 naming flavors, flat or SRA-like.
-* If an accession with a flat name does not exist, use SRAPathFullInt to create an SRA-like path
-*/
-static
-rc_t SRAPathFullREFSEQ ( const NCBISRAPath *self, const char *rep, const char *vol,
-    const char *accession, char *path, size_t path_max )
-{
-    /* pick apart accession */
-    uint32_t prefix, number;
-    rc_t rc = SRAPathParseRunAccession ( accession, & prefix, & number );
-    if ( rc == 0 )
-    {
-        size_t len;
-        size_t total = 0;
-
-        if ( rep [ 0 ] != 0 && vol [ 0 ] != 0 )
-        {
-            /* normally write all parts at once */
-            if ( rep [ strlen (rep) - 1 ] == '/') /* check for need or not a '/' between rep and vol */
-                rc= string_printf ( path, path_max, &len, "%s%s/%s"
-                                 , rep
-                                 , vol
-                                 , accession );
-            else
-                rc= string_printf  ( path, path_max, &len, "%s/%s/%s"
-                                 , rep
-                                 , vol
-                                 , accession );
-        }
-        else
-        {
-            /* allow for individual rep-server and volume parts */
-            if ( rep [ 0 ] != 0 )
-            {
-                rc = string_printf ( path, path_max, &len, "%s/", rep );
-                if ( rc != 0 || ( total = len ) >= path_max )
-                    return RC ( rcSRA, rcMgr, rcAccessing, rcBuffer, rcInsufficient );
-            }
-            else if ( vol [ 0 ] != 0 )
-            {
-                rc = string_printf ( & path [ total ], path_max - total, &len, "%s/", vol );
-                if ( rc != 0 || ( total = len ) >= path_max )
-                    return RC ( rcSRA, rcMgr, rcAccessing, rcBuffer, rcInsufficient );
-            }
-
-            /* append the accession */
-            rc = string_printf ( & path [ total ], path_max - total, &len, "%s"
-                             , accession );
-        }
-
-        /* common detection of buffer overflow */
-        if ( rc != 0 || ( total += len ) >= path_max )
-            rc = RC ( rcSRA, rcMgr, rcAccessing, rcBuffer, rcInsufficient );
-    }
-
-    return rc;
-}
-
-/*
- * Try to locate in RefSeq Archives:
- * check for pattern '(\w{4}\d{2})[\.\d]+'; the archive is $1
- * use the scheme "x-ncbi-legrefseq" for vfs to recognize special case
- */
-static
-rc_t SRAPathFullREFSEQArchive(NCBISRAPath const *self,
-                              char const rep[],
-                              char const vol[],
-                              char const accession[],
-                              char path[],
-                              size_t path_max
-                             )
-{
-    size_t const rep_sz = strlen(rep);
-    size_t const vol_sz = strlen(vol);
-    char const *const rep_sep = (rep_sz > 0 && rep[rep_sz - 1] != '/') ? "/" : "";
-    char const *const vol_sep = (vol_sz > 0 && vol[vol_sz - 1] != '/') ? "/" : "";
-    size_t sz;
-    unsigned i;
-    VFSManager *vfs;
-    rc_t rc = VFSManagerMake(&vfs);
-    VPath *vpath;
-    KDirectory const *dir;
-    KPathType type;
-    
-    if (rc)
-        return rc;
-    
-    for (i = 0; i < 4; ++i) {
-        int const ch = accession[i];
-        
-        if (ch == 0 || !isalpha(ch))
-            return RC(rcSRA, rcMgr, rcAccessing, rcPath, rcIncorrect);
-    }
-    for ( ; ; ++i) {
-        int const ch = accession[i];
-        
-        if (ch == 0)
-            break;
-        if (ch != '.' && !isdigit(ch))
-            return RC(rcSRA, rcMgr, rcAccessing, rcPath, rcIncorrect);
-    }
-    if (i < 8)
-        return RC(rcSRA, rcMgr, rcAccessing, rcPath, rcIncorrect);
-    
-    rc = string_printf(path, path_max, &sz, "x-ncbi-legrefseq:%s%s%s%s%.6s", rep, rep_sep, vol, vol_sep, accession);
-    if (rc) return rc;
-    i = sz;
-    
-    rc = VPathMake(&vpath, path + 17);
-    if (rc) return rc;
-
-    rc = VFSManagerOpenDirectoryRead(vfs, &dir, vpath);
-    VPathRelease(vpath);
-    VFSManagerRelease(vfs);
-    if (rc) return rc;
-    
-    type = KDirectoryPathType(dir, "tbl/%s", accession);
-    KDirectoryRelease(dir);
-    
-    if (type != kptDir)
-        return RC(rcSRA, rcMgr, rcAccessing, rcPath, rcIncorrect);
-
-    rc = string_printf(path + i, path_max - i, &sz, "#tbl/%s", accession);
-    
-    return rc;
-}
-
-/*
-* WGS style naming: accession name ABCD01 resolves into WGS/AB/CD/ABCD01
-*/
-static
-rc_t SRAPathFullWGS( const NCBISRAPath *self, const char *rep, const char *vol,
-    const char *accession, char *path, size_t path_max )
-{
-    /* pick apart accession */
-    uint32_t prefix, number;
-    rc_t rc = SRAPathParseRunAccession ( accession, & prefix, & number );
-    if ( rc == 0 )
-    {
-        size_t len;
-        size_t total = 0;
-
-        if ( prefix < 4 )
-        {
-            return RC ( rcSRA, rcMgr, rcResolving, rcName, rcTooShort );
-        }
-
-        if ( rep [ 0 ] != 0 && vol [ 0 ] != 0 )
-        {
-            /* normally write all parts at once */
-            if ( rep [ strlen (rep) - 1 ] == '/') /* check for need or not a '/' between rep and vol */
-                rc= string_printf ( path, path_max, &len, "%s%s/WGS/%.2s/%.2s/%s"
-                                 , rep
-                                 , vol
-                                 , accession
-                                 , accession+2
-                                 , accession );
-            else
-                rc= string_printf ( path, path_max, &len, "%s/%s/WGS/%.2s/%.2s/%s"
-                                 , rep
-                                 , vol
-                                 , accession
-                                 , accession+2
-                                 , accession );
-        }
-        else
-        {
-            /* allow for individual rep-server and volume parts */
-            if ( rep [ 0 ] != 0 )
-            {
-                rc = string_printf ( path, path_max, &len, "%s/", rep );
-                if ( rc != 0 || ( total = len ) >= path_max )
-                    return RC ( rcSRA, rcMgr, rcAccessing, rcBuffer, rcInsufficient );
-            }
-            else if ( vol [ 0 ] != 0 )
-            {
-                rc = string_printf ( & path [ total ], path_max - total, &len, "%s/", vol );
-                if ( rc != 0 || ( total = len ) >= path_max )
-                    return RC ( rcSRA, rcMgr, rcAccessing, rcBuffer, rcInsufficient );
-            }
-
-            /* append the accession */
-                rc= string_printf ( & path [ total ], path_max - total, &len, "WGS/%.2s/%.2s/%s"
-                                 , accession
-                                 , accession+2
-                                 , accession );
-        }
-
-        /* common detection of buffer overflow */
-        if ( rc != 0 || ( total += len ) >= path_max )
-            rc = RC ( rcSRA, rcMgr, rcAccessing, rcBuffer, rcInsufficient );
-    }
-
-    return rc;
-}
-
-static
-rc_t ApplyAlg( const NCBISRAPath *self, const char *rep, const char *vol, 
-    const char *accession, char *path, size_t path_max, NCBIRepository *repo, bool* found)
-{
-    SRAPathFindInfo pb;
-    /* see if we recognize volume */
-    pb . path = vol;
-    pb . size = strlen ( vol );
-    pb . found = 0;
-
-    DLListDoUntil ( & repo -> vols, 0, SRAPathStringFind, & pb );
-    if ( pb . found )
-    {
-        *found = true;
-        switch (pb . alg)
-        {
-        case alg_ebi:
-            return SRAPathFullEBI ( self, rep, vol, accession, path, path_max );
-        case alg_refseq:
-        {
-            rc_t rc = SRAPathFullREFSEQ ( self, rep, vol, accession, path, path_max );
-            if ( rc == 0) /* check for existence of accession at the root of the volume, and if not found try to apply the default path-building scheme */
-            {
-                switch ( KDirectoryPathType ( self -> dir, "%s", path ) )
-                {
-                case kptNotFound:
-                case kptBadPath:
-                    return SRAPathFullREFSEQArchive( self, rep, vol, accession, path, path_max );
-                default:
-                	return 0;
-                }
-            }
-		}            
-        case alg_wgs:
-            return SRAPathFullWGS ( self, rep, vol, accession, path, path_max );
-        default:
-            break;
-        }
-    }
-    *found = false;
-    return 0;
-}
-
-static
-rc_t CC NCBISRAPathFull ( const NCBISRAPath *self, const char *rep, const char *vol,
-    const char *accession, char *path, size_t path_max )
-{
-    NCBIRepository *repo;
-    bool found;
-    rc_t rc;
-
-    /* loop through repositories */ 
-    for ( repo = ( NCBIRepository* ) DLListHead ( & self -> repos );
-          repo != NULL; repo = ( NCBIRepository* ) DLNodeNext ( & repo -> n ) )
-    {
-        rc = ApplyAlg( self, rep, vol, accession, path, path_max, repo, &found);
-        if (found)
-        {
-            return rc;
-        }
-    }
-    /* try the default repository */
-    rc = ApplyAlg( self, rep, vol, accession, path, path_max, self -> dflt_repo, &found);
-    if (found)
-    {
-        return rc;
-    }
-    /* internal version */
-    return SRAPathFullInt ( self, rep, vol, accession, path, path_max, 1024 );
-}
-
-
-/* Test
- *  returns true if path appears to be accession
- *  the test is a heuristic, and may return false positives
- *
- *  "path" [ IN ] - NUL terminated path to run
- */
-static
-bool SRAPathTestTable ( const KDirectory *dir, uint32_t type, const char *path )
-{
-    /* differentiate between legacy and current structure */
-    switch ( KDirectoryPathType ( dir, "%s/idx", path ) )
-    {
-    case kptNotFound:
-        switch ( KDirectoryPathType ( dir, "%s/meta", path ) )
-        {
-        case kptFile:
-        case kptFile | kptAlias:
-            switch ( KDirectoryPathType ( dir, "%s/skey", path ) )
-            {
-            case kptFile:
-            case kptFile | kptAlias:
-                return true;
-            }
-            break;
-        }
-        break;
-
-    case kptDir:
-    case kptDir | kptAlias:
-        switch ( KDirectoryPathType ( dir, "%s/md/cur", path ) )
-        {
-        case kptFile:
-        case kptFile | kptAlias:
-            return true;
-        }
-        break;
-    }
-
-    /* not a table */
-    return false;
-}
-
-static
-bool SRAPathTestDatabase ( const KDirectory *dir, uint32_t type, const char *path )
-{
-    /* don't have a more stringent requirement for database at this time */
-    return true;
-}
-
-static
-bool SRAPathTestFile ( const KDirectory *dir, uint32_t type, const char *path )
-{
-    /* TBD - need to look at magic information */
-    return false;
-}
-
-static
-bool SRAPathTestInt ( const KDirectory *dir, uint32_t type, const char *path )
-{
-    switch ( type )
-    {
-    case kptDir:
-    case kptDir | kptAlias:
-        break;
-
-    case kptFile:
-    case kptFile | kptAlias:
-        return SRAPathTestFile ( dir, type, path );
-
-    default:
-        return false;
-    }
-
-    /* detect apparent tables */
-    switch ( KDirectoryPathType ( dir, "%s/col", path ) )
-    {
-    case kptDir:
-    case kptDir | kptAlias:
-        return SRAPathTestTable ( dir, type, path );
-    }
-
-    /* detect apparent databases */
-    switch ( KDirectoryPathType ( dir, "%s/tbl", path ) )
-    {
-    case kptDir:
-    case kptDir | kptAlias:
-        return SRAPathTestDatabase ( dir, type, path );
-    }
-
-    /* not a recognized accession */
-    return false;
-}
-
-static
-bool CC NCBISRAPathTest ( const NCBISRAPath *self, const char *path )
-{
-    return SRAPathTestInt ( self -> dir,
-                            KDirectoryPathType ( self -> dir, "%s", path ), path );
-}
-
-
-/* FindOnServer
- *  find accession on rep-server 
- */
-static
-rc_t SRAPathFindOnServer ( const NCBISRAPath *self, const NCBIRepository *repo, const SRAPathString *srv,
-    const char *accession, char *path, size_t path_max, int vol_type )
-{
-    const SRAPathString *vol;
-
-    PATH_DEBUG (("SRAPathFindOnServer(%s)\n", srv->path));
-
-    for ( vol = ( const SRAPathString* ) DLListHead ( & repo -> vols );
-          vol != NULL; vol = ( const SRAPathString* ) DLNodeNext ( & vol -> n ) )
-    {
-        if ( vol_type == alg_none || vol_type == vol->alg )
-        {
-            rc_t rc;
-
-            PATH_DEBUG (("SRAPathFindOnServer trying volume %s\n", vol->path));
-
-            switch ( vol -> alg )
-            {
-            case alg_ebi:
-                rc = SRAPathFullEBI ( self, srv -> path, vol -> path, accession, path, path_max );
-                break;
-            case alg_refseq:
-                rc = SRAPathFullREFSEQ ( self, srv -> path, vol -> path, accession, path, path_max );
-                if ( rc == 0) /* check for existence of accession at the root of the volume, and if not found try to apply the default path-building scheme */
-                {
-                    switch ( KDirectoryPathType ( self -> dir, "%s", path ) )
-                    {
-                    case kptNotFound:
-                    case kptBadPath:
-                        rc = SRAPathFullREFSEQArchive( self, srv -> path, vol -> path, accession, path, path_max );
-                        if (rc == 0) {
-                            PATH_DEBUG (("SRAPathFindOnServer: found(%s)\n", path));
-                            return 0;
-                        }
-                        break;
-                    default:
-                    	return 0;
-                    }
-                }
-                break;
-            case alg_wgs:
-                rc = SRAPathFullWGS ( self, srv -> path, vol -> path, accession, path, path_max );
-                break;
-            default:
-                rc = SRAPathFullInt ( self, srv -> path, vol -> path, accession, path, path_max, 1024 );
-                break;
-            }
-            if ( rc == 0 )
-            {
-                switch ( KDirectoryPathType ( self -> dir, "%s", path ) )
-                {
-                case kptNotFound:
-                case kptBadPath:
-                    break;
-                default:
-                    PATH_DEBUG (("SRAPathFindOnServer: found(%s)\n", path));
-                    return 0;
-                }
-            }
-            else
-            {
-                if ( GetRCState( rc ) == rcInsufficient )
-                    return rc;
-            }
-        }
-    }
-
-    return RC ( rcSRA, rcMgr, rcSelecting, rcPath, rcNotFound );
-}
-
-/* FindInRepo
- *  find accession in a repository
- */
-static
-rc_t SRAPathFindInRepo ( const NCBISRAPath *self, NCBIRepository *repo, const char *accession, 
-                         char *path, size_t path_max, size_t *rep_len, int vol_type )
-{
-    SRAPathString *srv;
-
-    PATH_DEBUG (("SRAPathFindInRepo(%s)\n", AlgToStr(repo->type)));
-
-    /* look for accession on a rep-server */
-    for ( srv = ( SRAPathString* ) DLListHead ( & repo -> repsrv ); srv != NULL; srv = ( SRAPathString* ) DLNodeNext ( & srv -> n ) )
-    {
-        /* try with this server */
-        rc_t rc = SRAPathFindOnServer ( self, repo, srv, accession, path, path_max, vol_type );
-        if ( rc == 0 )
-        {
-            /* make sure server is at head of list */
-            if ( DLNodePrev ( & srv -> n ) != NULL )
-            {
-                DLListUnlink ( & repo -> repsrv, & srv -> n );
-                DLListPushHead ( & repo -> repsrv, & srv -> n );
-            }
-
-            if ( rep_len != NULL )
-                * rep_len = strlen ( srv -> path );
-            
-            return 0;
-        }
-
-        if ( GetRCState ( rc ) != rcNotFound )
-            return rc;
-    }
-
-    return RC ( rcSRA, rcMgr, rcSelecting, rcPath, rcNotFound );
-}
-
-/* FindInRepoByType
- *  find accession in a repository of a given type
- */
-static
-rc_t SRAPathFindInRepoByType ( const NCBISRAPath *self, const char *accession, char *path, size_t path_max, size_t *rep_len, int repo_type, int vol_type )
-{
-    /* loop through all repositories */
-    NCBIRepository *repo; 
-    for ( repo = ( NCBIRepository* ) DLListHead ( & self -> repos ); repo != NULL; repo = ( NCBIRepository* ) DLNodeNext ( & repo -> n ) )
-    {
-        if ( repo->type == repo_type && SRAPathFindInRepo(self, repo, accession, path, path_max, rep_len, vol_type) == 0 )
-            return 0;
-    }
-    return RC ( rcSRA, rcMgr, rcSelecting, rcPath, rcNotFound );
-}
-
-/* FastFind
- * Uses heuristics to select the repository most likely to contain the accession, then tries to locate the acecssion in the repository.
-*/
-static
-rc_t FindFast( const NCBISRAPath *cself, const char *accession, char *path, size_t path_max, size_t *rep_len )
-{
-    /*TODO: look up cache first */
-    
-    /* recognize known naming schemes */
-    size_t size = string_size(accession);
-    if ( string_cmp(accession, size, "SRR", 3, 3) == 0 )
-        return SRAPathFindInRepoByType(cself, accession, path, path_max, rep_len, alg_ncbi, alg_ncbi);
-
-    if ( string_cmp(accession, size, "ERR", 3, 3) == 0 )
-        return SRAPathFindInRepoByType(cself, accession, path, path_max, rep_len, alg_ncbi, alg_ebi);
-
-    if ( string_cmp(accession, size, "DRR", 3, 3) == 0 )
-        return SRAPathFindInRepoByType(cself, accession, path, path_max, rep_len, alg_ncbi, alg_ddbj);
-        
-    if ( string_chr(accession, size, '.') != NULL )
-        return SRAPathFindInRepoByType(cself, accession, path, path_max, rep_len, alg_refseq, alg_none);    
-        
-    if ( size > 2 && isdigit(accession[size-1]) && isdigit(accession[size-2]) && ! isdigit(accession[size-3]) ) 
-        return SRAPathFindInRepoByType(cself, accession, path, path_max, rep_len, alg_wgs, alg_none);    
-        
-    return RC ( rcSRA, rcMgr, rcSelecting, rcPath, rcNotFound );
-}
-
-/* Find
- *  finds location of run within rep-server/volume matrix
- *
- *  "accession" [ IN ] - NUL terminated run accession,
- *   e.g. "SRR000001"
- *
- *  "path" [ OUT ] and "path_max" [ IN ] - return buffer for
- *  NUL-terminated full path to accession.
- *
- *  returns 0 if path exists, rc state rcNotFound if
- *  path cannot be found, and rcInsufficient if buffer is
- *  too small.
- */
-static
-rc_t CC NCBISRAPathFindWithRepLen ( const NCBISRAPath *cself, const char *accession, char *path, size_t path_max, size_t *rep_len )
-{
-    rc_t rc;
-    NCBIRepository *repo;
-
-    PATH_DEBUG(("NCBISRAPathFindWithRepLen(%s)\n", accession));
-
-    rc = FindFast( cself, accession, path, path_max, rep_len );
-    if ( rc == 0 )
-        return 0;
-        
-    /* loop through all repositories */ 
-    for ( repo = ( NCBIRepository* ) DLListHead ( & cself -> repos ); repo != NULL; repo = ( NCBIRepository* ) DLNodeNext ( & repo -> n ) )
-    {
-        rc = SRAPathFindInRepo(cself, repo, accession, path, path_max, rep_len, alg_none);
-        if ( rc == 0 )
-            return 0;
-    }
-    /* default repository */
-    return SRAPathFindInRepo(cself, cself -> dflt_repo, accession, path, path_max, rep_len, alg_none);
-}
-
-struct SRAPath_vt_v2 vtSRAPath =
-{
-    2, 1,
-    NCBISRAPathAddRef,
-    NCBISRAPathRelease,
-    NCBISRAPathVersion,
-    NCBISRAPathClear,
-    NCBISRAPathAddRepPathDefault,
-    NCBISRAPathAddVolPathDefault,
-    NCBISRAPathFull,
-    NCBISRAPathTest,
-    NCBISRAPathFindWithRepLen
-};
-
-/* Make
- *  create path manager
- *
- *  the path manager should already be configured with
- *  standard search paths, but can be augmented by using
- *  the Add*Path messages.
- *
- *  "dir" [ IN, NULL OKAY ] - optional root directory to use
- *  attaches a new reference
- */
-MOD_EXPORT
-rc_t CC SRAPathMakeImpl ( SRAPath **pm, const KDirectory *dir )
-{
-    rc_t rc;
-
-    if ( pm == NULL )
-        rc = RC ( rcSRA, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        NCBISRAPath *p = (NCBISRAPath *) malloc ( sizeof * p );
-        if ( p == NULL )
-            rc = RC ( rcSRA, rcMgr, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            p -> dad . vt = ( SRAPath_vt* ) & vtSRAPath;
-            p -> dir = dir;
-            if ( dir != NULL )
-                rc = KDirectoryAddRef ( dir );
-            else
-            {
-                KDirectory *wd;
-                rc = KDirectoryNativeDir ( & wd );
-                p -> dir = wd;
-            }
-
-            if ( rc != 0 )
-                free ( p );
-            else
-            {
-                DLListInit ( & p -> repos );
-                p -> dflt_repo = NULL;
-                atomic32_set ( & p -> refcount, 1 );
-
-                /* the object is now complete */
-                rc = SRAPathConfig ( p );
-                if ( rc == 0 )
-                {
-                    * pm = & p -> dad;
-                    return 0;
-                }
-
-                SRAPathWhack ( p );
-            }
-        }
-
-        * pm = NULL;
-    }
-
-    return rc;
-}
diff --git a/libs/vfs/unix/syskeyring.c b/libs/vfs/unix/syskeyring.c
deleted file mode 100644
index 19f79a7..0000000
--- a/libs/vfs/unix/syskeyring.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vfs/keyring-priv.h>
-
-#include <kfg/config.h>
-
-#include <klib/text.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <klib/printf.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-#include <kfs/lockfile.h>
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <sys/wait.h>
-
-#include <stdio.h>
-
-#ifndef MAX_PATH
-#define MAX_PATH 4096
-#endif
-
-const char* KeyRingDefaultDataDir = "~/.ncbi";
-
-/*TODO: move to ../keyring.c */
-LIB_EXPORT bool CC KKeyRingIsServerRunning(const char* dataDir)
-{   
-    KDirectory* wd;
-    rc_t rc = KDirectoryNativeDir (&wd);
-    if (rc == 0)
-    {
-        char lockFileName[MAX_PATH];
-        if (dataDir == NULL)
-            dataDir = KeyRingDefaultDataDir;
-        rc = string_printf(lockFileName, sizeof(lockFileName)-1, NULL, "%s/keyring_lock", dataDir);
-        
-        if (rc == 0)
-        {
-            KFile* lockedFile;
-            rc = KDirectoryCreateExclusiveAccessFile(wd, &lockedFile, true, 0600, kcmOpen, "%s", lockFileName);
-            if (rc == 0)
-                KFileRelease(lockedFile);
-        }
-        KDirectoryRelease(wd);
-    }
-    return rc != 0;
-}
-
-rc_t StartKeyRing(const char* dataDir)
-{
-    rc_t rc = 0;
-    
-    pid_t child = fork();
-    switch (child)
-    {
-        case 0: /* child */
-        {   /* become the server */
-        
-/*TODO: calculate based on $(APPPATH) in kfg */
-const char* KeyRingServerExeName = "/home/boshkina/internal/asm-trace/centos/gcc/stat/x86_64/dbg/bin/keyring-srv";
-
-            if (dataDir == NULL)
-                dataDir = "~/.ncbi";
-            LogMsg(klogInfo, "Keyring: execl...");
-
-            if (execl(KeyRingServerExeName, KeyRingServerExeName, dataDir, NULL) == -1)
-            {   /* TODO: look around:
-                    - same dir as the current executable (kfg/APPPATH)
-                    - current dir
-                    - etc.
-                */
-            }
-            pLogMsg(klogErr, 
-                    "Keyring: execl($(exe)) failed ($(errno)=$(perrno))", 
-                    "exe=%s,errno=%d,perrno=%!", 
-                    KeyRingServerExeName, errno, errno);
-            exit(1);
-            break;
-        }
-        case -1: /* error */
-        {
-            switch (errno)
-            {
-            case EAGAIN:
-            case ENOMEM:
-                rc = RC (rcVFS, rcProcess, rcProcess, rcMemory, rcInsufficient);
-                break;
-            case ENOSYS:
-                rc = RC (rcVFS, rcProcess, rcProcess, rcInterface, rcUnsupported);
-                break;
-            default:
-                rc = RC (rcVFS, rcProcess, rcProcess, rcError, rcUnknown);
-                break;
-            }
-            break;
-        }
-        default: /* parent */
-            break;
-    }
-        
-    return rc;
-}
-
-#if 0
-static
-rc_t GetAppPath(const char* buf, size_t bufsize)
-{
-    KConfig* kfg;
-    rc_t rc = KConfigMake(&kfg, NULL);
-    if (rc == 0)
-    {
-        const KConfigNode *node;
-        char path[] = "APPPATH";
-        char buf[4096];
-        size_t num_read;
-        rc_t rc2;
-    
-        rc_t rc=KConfigOpenNodeRead(kfg, &node, path, string_measure(path, NULL), "%s", buf);
-        if (rc == 0) 
-        {
-            rc = KConfigNodeRead(node, 0, buf, bufsize, &num_read, NULL);
-            rc2 = KConfigNodeRelease(node);
-            if (rc == 0)
-                rc = r2;
-        }
-        rc2 = KConfigRelease(kfg);
-        if (rc == 0)
-            rc = r2;
-    }
-    return rc;
-}
-#endif
diff --git a/libs/vfs/unix/syspath.c b/libs/vfs/unix/syspath.c
deleted file mode 100644
index b257267..0000000
--- a/libs/vfs/unix/syspath.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vfs/extern.h>
-
-#include "path-priv.h"
-
-#include <vfs/manager.h>
-#include <klib/text.h>
-#include <klib/refcount.h>
-#include <klib/rc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#include <sysalloc.h>
-
-
-/*--------------------------------------------------------------------------
- * VFSManager
- */
-
-
-/* MakeSysPath
- *  make a path object from an OS native filesystem path string
- *
- *  "new_path" [ OUT ] - return parameter for new path object
- *
- *  "sys_path" [ IN ] - a UTF-8 NUL-terminated string
- *  representing a native filesystem path
- *
- *  "wide_sys_path" [ IN ] - a wide NUL-terminated string
- *  representing a native filesystem path, where
- *  wchar_t is either USC-2 or UTF-32 depending upon libraries
- */
-LIB_EXPORT rc_t CC VFSManagerMakeSysPath ( const VFSManager * self,
-    VPath ** new_path, const char * sys_path )
-{
-    rc_t rc;
-
-    if ( sys_path != NULL )
-    {
-        /* POSIX paths are our normal path type */
-        return VFSManagerMakePath ( self, new_path, "%s", sys_path );
-    }
-
-    if ( new_path == NULL )
-        rc = RC ( rcVFS, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVFS, rcMgr, rcConstructing, rcSelf, rcNull );
-        else
-            rc = RC ( rcVFS, rcMgr, rcConstructing, rcPath, rcNull );
-
-        * new_path = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VFSManagerWMakeSysPath ( const VFSManager * self,
-    VPath ** new_path, const wchar_t * wide_sys_path )
-{
-    rc_t rc;
-
-    if ( new_path == NULL )
-        rc = RC ( rcVFS, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVFS, rcMgr, rcConstructing, rcSelf, rcNull );
-        else if ( wide_sys_path == NULL )
-            rc = RC ( rcVFS, rcMgr, rcConstructing, rcPath, rcNull );
-        else
-        {
-            size_t src_size, dst_size;
-            uint32_t len = wchar_cvt_string_measure ( wide_sys_path, & src_size, & dst_size );
-            if ( len == 0 )
-                rc = RC ( rcVFS, rcMgr, rcConstructing, rcPath, rcEmpty );
-            else
-            {
-                /* transform to UTF-8 */
-                size_t copy_size;
-                char utf8_path [ 4096 ], *dst = utf8_path;
-                if ( dst_size < sizeof utf8_path )
-                    dst_size = sizeof utf8_path;
-                else
-                {
-                    dst = malloc ( ++ dst_size );
-                    if ( dst == NULL )
-                        rc = RC ( rcVFS, rcMgr, rcConstructing, rcMemory, rcExhausted );
-                }
-
-                copy_size = wchar_cvt_string_copy ( dst, dst_size, wide_sys_path, src_size );
-                if ( copy_size >= dst_size )
-                    rc = RC ( rcVFS, rcMgr, rcConstructing, rcBuffer, rcInsufficient );
-                else
-                {
-                    dst [ copy_size ] = 0;
-                    rc = VFSManagerMakePath ( self, new_path, "%s", dst );
-                }
-
-                if ( dst != utf8_path )
-                    free ( dst );
-
-                if ( rc == 0 )
-                    return 0;
-            }
-        }
-
-        * new_path = NULL;
-    }
-
-    return rc;
-}
-
-LIB_EXPORT rc_t CC VPathReadSysPath ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read )
-{
-    return VPathReadPath ( self, buffer, buffer_size, num_read );
-}
-
-/* ==========================================
-             HACK O' MATIC
- */
-
-LIB_EXPORT rc_t LegacyVPathMakeSysPath ( VPath ** new_path, const char * sys_path )
-{
-    return LegacyVPathMake ( new_path, sys_path );
-}
diff --git a/libs/vfs/win/syskeyring.c b/libs/vfs/win/syskeyring.c
deleted file mode 100644
index 7f2b748..0000000
--- a/libs/vfs/win/syskeyring.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vfs/keyring-priv.h>
-
-#include <kfg/config.h>
-#include <klib/text.h>
-
-const char* KeyRingDefaultDataDir = "%USERPROFILE%\\.ncbi";
-
-rc_t StartKeyRing(const char* dataDir)
-{
-    KConfig* kfg;
-    rc_t rc = KConfigMake(&kfg, NULL);
-    if (rc == 0)
-    {
-        const KConfigNode *node;
-        char path[] = "$(APPPATH)";
-        char buf[4096];
-        size_t num_read;
-    
-        rc_t rc=KConfigOpenNodeRead(kfg, &node, path, string_measure(path, NULL), "%s", buf);
-        if (rc == 0) 
-        {
-            rc = KConfigNodeRead(node, 0, buf, sizeof(buf), &num_read, NULL);
-            if (rc == 0)
-            {
-/*printf("apppath='%s'\n", buf);        */
-            }
-            KConfigNodeRelease(node);
-        }
-        rc = KConfigRelease(kfg);
-    }
-    return rc;
-}
diff --git a/libs/vfs/win/syspath.c b/libs/vfs/win/syspath.c
deleted file mode 100644
index ca411c4..0000000
--- a/libs/vfs/win/syspath.c
+++ /dev/null
@@ -1,471 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vfs/extern.h>
-
-#include <vfs/manager.h>
-#include <vfs/path.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/debug.h>
-
-#include "../path-priv.h"
-
-#include <wchar.h>
-#include <windows.h>
-#include <direct.h>
-
-#include <sysalloc.h>
-
-#include <os-native.h>
-/*--------------------------------------------------------------------------
- * VFSManager
- */
-
-
-/* MakeSysPath
- *  make a path object from an OS native filesystem path string
- *
- *  "new_path" [ OUT ] - return parameter for new path object
- *
- *  "sys_path" [ IN ] - a UTF-8 NUL-terminated string
- *  representing a native filesystem path
- *
- *  "wide_sys_path" [ IN ] - a wide NUL-terminated string
- *  representing a native filesystem path, where
- *  wchar_t is either USC-2 or UTF-32 depending upon libraries
- */
-LIB_EXPORT rc_t CC VFSManagerMakeSysPath ( const VFSManager * self,
-    VPath ** new_path, const char * sys_path )
-{
-    rc_t rc = 0;
-
-    /* this is all incorrect - the only reason we STILL use
-       wchar_t in Windows is to guarantee UNICODE. most of the
-       time, we'll have UTF-8, which is okay. but on older systems,
-       it could still be something ancient. should use OS
-       to convert from system path to UCS-2. */
-
-    if ( new_path == NULL )
-        rc = RC ( rcVFS, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVFS, rcMgr, rcConstructing, rcSelf, rcNull );
-        else if ( sys_path == NULL )
-            rc = RC ( rcVFS, rcMgr, rcConstructing, rcPath, rcNull );
-        else
-        {
-            size_t src_size = string_size ( sys_path );
-
-            /* transform to wchar_t */
-            wchar_t wchar_path [ 4096 ], * dst = wchar_path;
-            size_t copy_size, dst_size = src_size * sizeof wchar_path [ 0 ];
-            if ( dst_size < sizeof wchar_path )
-                dst_size = sizeof wchar_path;
-            else
-            {
-                dst = malloc ( dst_size += sizeof * dst );
-                if ( dst == NULL )
-                    rc = RC ( rcVFS, rcMgr, rcConstructing, rcMemory, rcExhausted );
-            }
-
-            if ( rc == 0 )
-            {
-                /* we need to call windows to do the conversion, because sys_path can
-                   be ascii or multi-byte */
-                copy_size = MultiByteToWideChar ( CP_THREAD_ACP, MB_PRECOMPOSED,
-                    sys_path, ( int ) src_size, dst,
-                    ( int ) ( dst_size / sizeof dst [ 0 ] ) - 1 );
-                if ( copy_size == 0 )
-                {
-                    DWORD status = GetLastError ();
-                    DBGMSG ( DBG_VFS, DBG_FLAG_ANY, ( "MultiByteToWideChar: error code - %!.\n", status ) );
-                    rc = RC ( rcVFS, rcMgr, rcConstructing, rcPath, rcInvalid );
-                }
-                else
-                {
-                    dst [ copy_size ] = 0;
-                    rc = VFSManagerWMakeSysPath ( self, new_path, dst );
-                }
-
-                if ( dst != wchar_path )
-                    free ( dst );
-
-                if ( rc == 0 )
-                    return 0;
-
-            }
-        }
-
-        * new_path = NULL;
-    }
-
-    return rc;
-}
-
-
-static
-rc_t transform_to_utf8_and_make_vpath ( const VFSManager * self,
-    VPath ** new_path, const wchar_t * src, bool dos_path )
-{
-    rc_t rc = 0;
-    size_t src_size, dst_size;
-    uint32_t len = wchar_cvt_string_measure ( src, & src_size, & dst_size );
-    if ( len == 0 )
-        rc = RC ( rcVFS, rcMgr, rcConstructing, rcPath, rcEmpty );
-    else
-    {
-        /* transform to UTF-8 */
-        size_t copy_size;
-        char utf8_path [ 4096 ], *dst = utf8_path;
-        if ( dst_size < sizeof utf8_path )
-            dst_size = sizeof utf8_path;
-        else
-        {
-            dst = malloc ( ++ dst_size );
-            if ( dst == NULL )
-                return RC ( rcVFS, rcMgr, rcConstructing, rcMemory, rcExhausted );
-        }
-
-        copy_size = wchar_cvt_string_copy ( dst, dst_size, src, src_size );
-        if ( copy_size >= dst_size )
-            rc = RC ( rcVFS, rcMgr, rcConstructing, rcBuffer, rcInsufficient );
-        else
-        {
-            size_t i = 0;
-
-            dst [ copy_size ] = 0;
-
-            /* encode drive letter */
-            if ( dos_path )
-            {
-                assert ( isalpha ( dst [ 0 ] ) );
-                assert ( dst [ 1 ] == ':' );
-                dst [ 1 ] = dst [ 0 ];
-                dst [ 0 ] = '/';
-                i = 2;
-            }
-
-            /* convert '\\' to '/' */
-            for ( ; i < copy_size; ++ i )
-            {
-                if ( dst [ i ] == '\\' )
-                    dst [ i ] = '/';
-            }
-
-            /* this is the final goal! */
-            rc = VFSManagerMakePath ( self, new_path, "%.*s", ( uint32_t ) copy_size, dst );
-        }
-
-        if ( dst != utf8_path )
-            free ( dst );
-    }
-    return rc;
-}
-
-
-static
-rc_t make_absolute_and_transform_to_utf8_and_make_vpath ( const VFSManager * self,
-    VPath ** new_path, const wchar_t * src, bool have_drive )
-{
-    rc_t rc;
-    wchar_t full [ 4096 ];
-
-    /* expand to full path - this is temporary, and will be replaced after KFS is updated */
-    DWORD len = GetFullPathNameW ( src, sizeof full / sizeof full [ 0 ], full, NULL );
-    if ( len == 0 )
-    {
-        /* we have an error */
-        DWORD status = GetLastError ();
-        DBGMSG ( DBG_VFS, DBG_FLAG_ANY, ( "GetFullPathNameW: error code - %u.\n", status ) );
-        rc = RC ( rcVFS, rcMgr, rcConstructing, rcPath, rcInvalid );
-    }
-    else if ( len >= sizeof full / sizeof full [ 0 ] )
-    {
-        /* the buffer is too small ! */
-        wchar_t * big_buf = malloc( ( ++len ) * ( sizeof full[ 0 ] ) );
-        if ( big_buf == NULL )
-            rc = RC ( rcVFS, rcMgr, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            DWORD len2 = GetFullPathNameW ( src, len, big_buf, NULL );
-            if ( len2 == 0 )
-            {
-                /* we have an error */
-                DWORD status = GetLastError ();
-                DBGMSG ( DBG_VFS, DBG_FLAG_ANY, ( "GetFullPathNameW: error code - %u.\n", status ) );
-                rc = RC ( rcVFS, rcMgr, rcConstructing, rcPath, rcInvalid );
-            }
-            else if ( len2 >= len )
-            {
-                DBGMSG ( DBG_VFS, DBG_FLAG_ANY, ( "GetFullPathNameW: buffer too small again - %u.\n", len2 ) );
-                rc = RC ( rcVFS, rcMgr, rcConstructing, rcPath, rcInvalid );
-            }
-            else
-            {
-                /* now we can call the final transform and make */
-                rc = transform_to_utf8_and_make_vpath( self, new_path, big_buf, true );
-            }
-            free( big_buf );
-        }
-    }
-    else
-    {
-        /* now we can call the final transform and make */
-        rc = transform_to_utf8_and_make_vpath( self, new_path, full, true );
-    }
-    return rc;
-}
-
-static
-bool could_be_url ( const wchar_t * wide_sys_path )
-{
-    uint32_t i;
-    for ( i = 0; wide_sys_path [ i ] != 0; ++ i )
-    {
-        if ( wide_sys_path [ i ] == ':' )
-        {
-            if ( i < 3 || i > 16 )
-                break;
-            for ( ++ i; wide_sys_path [ i ] != 0; ++ i )
-            {
-                if ( wide_sys_path [ i ] == '\\' )
-                    return false;
-            }
-            return true;
-        }
-
-        if ( wide_sys_path [ i ] == '\\' )
-            break;
-    }
-    return false;
-}
-
-static
-bool could_be_accession ( const wchar_t * wide_sys_path )
-{
-    uint32_t i;
-    for ( i = 0; wide_sys_path [ i ] != 0; ++ i )
-    {
-        switch ( wide_sys_path [ i ] )
-        {
-        case '/':
-        case '\\':
-            return false;
-        }
-    }
-    return true;
-}
-
-
-LIB_EXPORT rc_t CC VFSManagerWMakeSysPath ( const VFSManager * self,
-    VPath ** new_path, const wchar_t * wide_sys_path )
-{
-    rc_t rc = 0;
-
-    /* what makes Windows paths exciting is that they
-       have these drive letters, or they can be UNC,
-       but they can be relative to the current drive,
-       and they can use back-slashes because they're
-       easy to type, or they can use forward-slashes,
-       whatever. */
-
-    if ( new_path == NULL )
-        rc = RC ( rcVFS, rcMgr, rcConstructing, rcParam, rcNull );
-    else
-    {
-        if ( self == NULL )
-            rc = RC ( rcVFS, rcMgr, rcConstructing, rcSelf, rcNull );
-        else if ( wide_sys_path == NULL )
-            rc = RC ( rcVFS, rcMgr, rcConstructing, rcPath, rcNull );
-        else
-        {
-            /* test for UNC path */
-            if ( ( wide_sys_path [ 0 ] == '\\' && wide_sys_path [ 1 ] == '\\' ) ||
-                 ( wide_sys_path [ 0 ] == '/'  && wide_sys_path [ 1 ] == '/'  ) )
-            {
-                /* it is a UNC-path.
-                   reject IO or device namespaces */
-                if ( ( wide_sys_path [ 2 ] ==  '?' || wide_sys_path [ 2 ] == '.' ) &&
-                     ( wide_sys_path [ 3 ] == '\\' || wide_sys_path [ 3 ] == '/' ) )
-                    return RC ( rcVFS, rcPath, rcConstructing, rcPath, rcIncorrect );
-
-                /* produce the VPath-instance from the passed in string */
-                rc = transform_to_utf8_and_make_vpath ( self, new_path,  wide_sys_path, false );
-            }
-            else
-            {
-                /* it is not a UNC-path.
-                   test for drive letter */
-                if ( iswalpha ( wide_sys_path [ 0 ] ) && wide_sys_path [ 1 ] == ':' )
-                {
-                    /* drive letter detected.
-                       test for absolute path */
-                    if ( wide_sys_path [ 2 ] != '\\' && wide_sys_path [ 2 ] != '/' )
-                    {
-                        /* drive-relative path.
-                           we have make an absolute path first */
-                        rc = make_absolute_and_transform_to_utf8_and_make_vpath ( self, new_path, wide_sys_path, true );
-                    }
-                    else
-                    {
-                        /* already absolute path.
-                           produce the VPath-instance from the passed in string */
-                        rc = transform_to_utf8_and_make_vpath ( self, new_path,  wide_sys_path, true );
-                    }
-                }
-                /* test for URI syntax */
-                else if ( could_be_url ( wide_sys_path ) )
-                    rc = transform_to_utf8_and_make_vpath ( self, new_path,  wide_sys_path, false );
-                else if ( could_be_accession ( wide_sys_path ) )
-                    rc = transform_to_utf8_and_make_vpath ( self, new_path,  wide_sys_path, false );
-                else
-                {
-                    /* no drive letter detected, we have make a absolute path first */
-                    rc = make_absolute_and_transform_to_utf8_and_make_vpath ( self, new_path, wide_sys_path, false );
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-static
-void convert_fwd_to_rev_slashes ( char * buffer, size_t bytes )
-{
-    size_t i;
-    for ( i = 0; i < bytes; ++ i )
-    {
-        if ( buffer [ i ] == '/' )
-            buffer [ i ] = '\\';
-    }
-}
-
-LIB_EXPORT rc_t CC VPathReadSysPath ( const VPath * self,
-    char * buffer, size_t buffer_size, size_t * num_read )
-{
-    rc_t rc;
-
-    if ( self == NULL )
-        rc = RC ( rcVFS, rcPath, rcReading, rcSelf, rcNull );
-    else if ( buffer== NULL && buffer_size != 0 )
-        rc = RC ( rcVFS, rcPath, rcReading, rcParam, rcNull );
-    else
-    {
-        size_t dummy, effective_size = buffer_size;
-        if ( num_read == NULL )
-        {
-            num_read = & dummy;
-            if ( buffer_size != 0 )
-                -- effective_size;
-        }
-
-        rc = 0;
-
-        switch ( self -> path_type )
-        {
-        case vpInvalid:
-            rc = RC ( rcVFS, rcPath, rcReading, rcPath, rcInvalid );
-            break;
-        case vpOID:
-        case vpAccession:
-        case vpNameOrOID:
-        case vpNameOrAccession:
-        case vpName:
-            /* copy as simple name */
-            if ( effective_size < self -> path . size )
-                rc = RC ( rcVFS, rcPath, rcReading, rcBuffer, rcInsufficient );
-            else
-                * num_read = string_copy ( buffer, buffer_size, self -> path . addr, self -> path . size );
-            break;
-        case vpRelPath:
-        case vpUNCPath:
-            /* copy and transform slashes */
-            if ( effective_size < self -> path . size )
-                rc = RC ( rcVFS, rcPath, rcReading, rcBuffer, rcInsufficient );
-            else
-            {
-                * num_read = string_copy ( buffer, buffer_size, self -> path . addr, self -> path . size );
-                convert_fwd_to_rev_slashes ( buffer, * num_read );
-            }
-            break;
-        case vpFullPath:
-            /* convert to full path */
-            if ( effective_size < self -> path . size )
-                rc = RC ( rcVFS, rcPath, rcReading, rcBuffer, rcInsufficient );
-            else
-            {
-                * num_read = string_copy ( buffer, buffer_size, self -> path . addr, self -> path . size );
-                if ( self -> scheme_type == vpuri_none ||
-                    self -> scheme_type == vpuri_ncbi_file ||
-                    self -> scheme_type == vpuri_file )
-                {
-                    assert ( * num_read >= 2 );
-                    buffer [ 0 ] = buffer [ 1 ];
-                    buffer [ 1 ] = ':';
-                    convert_fwd_to_rev_slashes ( buffer, * num_read );
-                }
-            }
-            break;
-        case vpAuth:
-        case vpHostName:
-        case vpEndpoint:
-        default:
-            rc = RC ( rcVFS, rcPath, rcReading, rcPath, rcIncorrect );
-        }
-    }
-
-    if ( rc != 0 )
-    {
-        if ( num_read != NULL )
-            * num_read = 0;
-        if ( buffer != NULL && buffer_size != 0 )
-            buffer [ 0 ] = 0;
-    }
-
-    return rc;
-}
-
-
-
-/* ==========================================
-             HACK O' MATIC
- */
-
-LIB_EXPORT rc_t LegacyVPathMakeSysPath ( VPath ** new_path, const char * sys_path )
-{
-    VFSManager * vfs;
-    rc_t rc = VFSManagerMake ( & vfs );
-    if ( rc == 0 )
-    {
-        rc = VFSManagerMakeSysPath ( vfs, new_path, sys_path );
-        VFSManagerRelease ( vfs );
-    }
-    return rc;
-}
diff --git a/libs/vxf/.gitignore b/libs/vxf/.gitignore
deleted file mode 100644
index c253038..0000000
--- a/libs/vxf/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.def
diff --git a/libs/vxf/Makefile b/libs/vxf/Makefile
deleted file mode 100644
index c939964..0000000
--- a/libs/vxf/Makefile
+++ /dev/null
@@ -1,196 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/vxf
-
-INT_LIBS = \
-	libvxf \
-	libwvxf
-
-OBJFILES = \
-	$(VXF_OBJ) \
-	$(WVXF_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-RWORKDIR = $(BINDIR)
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(TARGDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(TARGDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# vdb transform library
-#
-$(TARGDIR)/libvxf: $(addprefix $(ILIBDIR)/libvxf.,$(ILIBEXT))
-
-VXF_SRC = \
-	ceil \
-	clip \
-	cut \
-	echo \
-	exists \
-	floor \
-	paste \
-	round \
-	trunc \
-	unzip \
-	map \
-	funzip \
-	vec-sum \
-	min \
-	max \
-	rldecode \
-	pack \
-	unpack \
-	izip \
-	iunzip \
-	diff \
-	sum \
-	bit_or \
-	trim \
-	deriv \
-	integral \
-	integral_0 \
-	delta \
-	undelta \
-	add-row-id \
-	subtract-row-id \
-	irzip \
-	rand_4na_2na \
-	outlier-encoder \
-	outlier-decoder \
-	bunzip \
-	simple-sub-select \
-	extract_token \
-	strtonum \
-	sprintf \
-	wgs-tokenize-accession \
-	lower-case-tech-reads
-
-VXF_OBJ = \
-	$(addsuffix .$(LOBX),$(VXF_SRC))
-
-VXF_LIB = \
-	-dvdb \
-	-dklib \
-	-dm \
-	-dz \
-	-dbz2
-
-$(ILIBDIR)/libvxf.$(LIBX): $(VXF_OBJ)
-	$(LD) --slib -o $@ $^ $(VXF_LIB)
-
-#-------------------------------------------------------------------------------
-# wvdb transform library
-#
-
-$(TARGDIR)/libwvxf: $(addprefix $(ILIBDIR)/libwvxf.,$(ILIBEXT))
-
-WVXF_SRC = \
-	$(VXF_SRC) \
-	zip \
-	bzip \
-	fzip \
-	rlencode \
-	checksum
-
-WVXF_OBJ = \
-	$(addsuffix .$(LOBX),$(WVXF_SRC))
-
-# temporary
-WVXF_LIB = \
-	-dwvdb \
-	-dwkdb \
-	-dklib \
-	-dm \
-	-dz \
-	-dbz2
-
-$(ILIBDIR)/libwvxf.$(LIBX): $(WVXF_OBJ)
-	$(LD) --slib -o $@ $^ $(WVXF_LIB)
-
-libwvxf.vers.h:
-	@ true
-
-.PHONY: $(TARGDIR)/libwvxf
-
-#-------------------------------------------------------------------------------
-# vdb entrez library
-#
-ifeq (win,$(OS))
-$(TARGDIR)/libvxfentrez:
-	@ true
-else
-$(TARGDIR)/libvxfentrez: $(addprefix $(ILIBDIR)/libvxfentrez.,$(ILIBEXT))
-endif
-
-VXF_ENTREZ_SRC = \
-	entrez
-
-VXF_ENTREZ_OBJ = \
-	$(addsuffix .$(LOBX),$(VXF_ENTREZ_SRC))
-
-VXF_ENTREZ_LIB = \
-	-dvdb \
-	-dkns \
-	-dklib \
-	-dm \
-	-dz
-
-$(ILIBDIR)/libvxfentrez.$(LIBX): $(VXF_ENTREZ_OBJ)
-	$(LD) --slib -o $@ $^ $(VXF_ENTREZ_LIB)
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/vxf/add-row-id.c b/libs/vxf/add-row-id.c
deleted file mode 100644
index b07e9c2..0000000
--- a/libs/vxf/add-row-id.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <arch-impl.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-static
-rc_t CC add_int64_t ( void *self, const VXformInfo *info,
-    int64_t row_id, VRowResult *rslt,
-    uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    uint32_t i;
-    int64_t *dst;
-    const int64_t *src = argv [ 0 ] . u . data . base;
-    uint64_t elem_count = argv [ 0 ] . u . data . elem_count;
-
-    assert ( rslt -> data -> elem_bits == 64 );
-    rc = KDataBufferResize ( rslt -> data, elem_count );
-    if ( rc != 0 )
-        return rc;
-
-    dst = rslt -> data -> base;
-    rslt -> elem_count = elem_count;
-
-    /* while this function is typically used on single-element rows,
-       we advertise taking rows of any length... */
-    for ( i = 0, src += argv [ 0 ] . u . data . first_elem; i < elem_count; ++ i )
-        dst [ i ] = src [ i ] + row_id;
-
-    return 0;
-}
-
-
-/* add_row_id
- *  return the sum of input and current row id
- *
- *  "in" [ DATA ]
- *
- * SYNOPSIS:
- *  corrects for series that have been offset by row-id
- */
-VTRANSFACT_IMPL ( vdb_add_row_id, 1, 0, 0 ) ( const void *fself, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    /* version 1.0 operates on I64 input */
-    rslt -> u . ndf = add_int64_t;
-    rslt -> variant = vftNonDetRow;
-    return 0;
-}
diff --git a/libs/vxf/bit_or.c b/libs/vxf/bit_or.c
deleted file mode 100644
index 644ea53..0000000
--- a/libs/vxf/bit_or.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <vdb/vdb-priv.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-#include <klib/log.h>
-#include <sysalloc.h>
-#include <atomic32.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
-#include <assert.h>
-
-typedef struct tag_self_t {
-    uint8_t     align;
-} self_t;
-
-static void CC self_whack( void *Self )
-{
-    free( Self );
-}
-static
-rc_t CC bit_or_impl(
-                 void *Self,
-                 const VXformInfo *info,
-                 int64_t row_id,
-                 VRowResult *rslt,
-                 uint32_t argc,
-                 const VRowData argv[]
-                          )
-{                                                                        
-    rc_t rc;
-    uint32_t a_size,b_size;
-    const self_t *self = Self;
-    const uint8_t *a = argv[0].u.data.base;
-    const uint8_t *b = argv[1].u.data.base;
-    uint8_t *dst;
-
-    a += argv[0].u.data.first_elem;
-    b += argv[1].u.data.first_elem;
-
-    assert((argv[0].u.data.elem_bits&7)== 0);
-    assert(argv[1].u.data.elem_bits==argv[0].u.data.elem_bits);
-
-    rslt->elem_bits = argv[0].u.data.elem_bits;
-    
-    a_size = argv[0].u.data.elem_count * (argv[0].u.data.elem_bits>>3);
-    b_size = argv[1].u.data.elem_count * (argv[1].u.data.elem_bits>>3);
-    if(a_size >= b_size){ /**** leaving a > b *****/
-	rslt->elem_count = argv[0].u.data.elem_count;
-    } else { /*** switching so  a > b ***/
-	const uint8_t *t;
-	uint32_t       t_size;
-	rslt->elem_count = argv[1].u.data.elem_count;
-	t=a;a=b;b=t;
-	t_size=a_size;a_size=b_size;b_size=t_size;
-    } 
-    /*** everything a is now the largest ***/
-    rc = KDataBufferResize ( rslt->data, a_size );
-    if(rc==0){
-	dst = rslt -> data -> base;
-
-	if(b_size == 0){/*** trivial shortcut ***/
-		memcpy(dst,a,a_size);
-		return 0;
-	}
-	if(self -> align == 1){ /*** left side align ***/
-		while(a_size > b_size){
-			*dst++ = *a++;
-			a_size--;
-		}
-	}
-	while(b_size > 0){
-		*dst++ = *a++ | *b++;
-		a_size--;
-		b_size--;
-		
-	}
-	while(a_size > 0){
-		*dst++ = *a++;
-                a_size--;
-	}
-    }
-    return 0;
-}
-
-VTRANSFACT_IMPL ( vdb_bit_or, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    self_t *self;
-            
-    self = malloc(sizeof(*self));
-    if (self) {
-	self->align = cp->argv[0].data.u8[0];
-	rslt->self = self;
-	rslt->whack = self_whack;
-	rslt->variant = vftRow;
-	rslt->u.rf = bit_or_impl;
-	return 0;
-    }
-    rc = RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-    return rc;
-}
diff --git a/libs/vxf/bunzip.c b/libs/vxf/bunzip.c
deleted file mode 100644
index 3ea4309..0000000
--- a/libs/vxf/bunzip.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <vdb/vdb-priv.h>
-#include <klib/data-buffer.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <endian.h>
-#include <byteswap.h>
-#include <string.h>
-#include <bzlib.h>
-
-static rc_t invoke_bzip2 ( void *dst, size_t dsize, const void *src, size_t ssize )
-{
-    int bzerr;
-
-    bz_stream s;
-    memset ( & s, 0, sizeof s );
-    bzerr = BZ2_bzDecompressInit ( & s, 0, 0 );
-    if ( bzerr != BZ_OK )
-        return RC ( rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted );
-
-    s.next_in = (void *)src;
-    s.avail_in = ssize;
-    s.next_out = dst;
-    s.avail_out = dsize;
-    
-    bzerr = BZ2_bzDecompress(&s);
-    BZ2_bzDecompressEnd ( & s );
-
-    switch ( bzerr )
-    {
-    case BZ_OK:
-    case BZ_STREAM_END:
-        break;
-    default:
-        return RC(rcXF, rcFunction, rcExecuting, rcNoObj, rcUnexpected);
-    }
-
-    return 0;
-}
-
-static
-rc_t bunzip_func_v1 ( const VXformInfo *info, VBlobResult *dst, const VBlobData *src )
-{
-    dst->byte_order = src->byte_order;
-    return invoke_bzip2 ( dst->data, (((size_t)dst->elem_count * dst->elem_bits + 7) >> 3),
-                          src->data, (((size_t)src->elem_count * src->elem_bits + 7) >> 3));
-}
-
-static
-rc_t bunzip_func_v2 ( const VXformInfo *info,
-    VBlobResult *dst, const VBlobData *src, VBlobHeader *hdr )
-{
-    int64_t trailing;
-    rc_t rc = VBlobHeaderArgPopHead ( hdr, & trailing );
-    if ( rc == 0 )
-    {
-        dst -> elem_count *= dst -> elem_bits;
-        dst -> byte_order = src -> byte_order;
-        dst -> elem_bits = 1;
-
-        rc = invoke_bzip2 ( dst->data, (((size_t)dst->elem_count + 7) >> 3),
-                            src->data, (((size_t)src->elem_count * src->elem_bits + 7) >> 3));
-        if ( rc == 0 )
-        {
-            dst -> elem_count &= ( uint64_t ) ~ 7;
-            dst -> elem_count |= trailing;
-        }
-    }
-
-    return rc;
-}
-
-
-static
-rc_t CC bunzip_func ( void *Self, const VXformInfo *info,
-    VBlobResult *dst, const VBlobData *src, VBlobHeader *hdr )
-{
-    switch ( VBlobHeaderVersion ( hdr ) )
-    {
-    case 1:
-        return bunzip_func_v1(info, dst, src);
-    case 2:
-        return bunzip_func_v2(info, dst, src, hdr);
-    }
-
-    return RC(rcXF, rcFunction, rcExecuting, rcParam, rcBadVersion);
-}
-
-/* bunzip
- *  function any bunzip #1.0 ( bzip2_fmt in );
- */
-VTRANSFACT_IMPL ( vdb_bunzip, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftBlob;
-    rslt->u.bf = bunzip_func;
-
-    return 0;
-}
diff --git a/libs/vxf/bzip.c b/libs/vxf/bzip.c
deleted file mode 100644
index f6bd457..0000000
--- a/libs/vxf/bzip.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/data-buffer.h>
-#include <sysalloc.h>
-
-#include <string.h>
-#include <bzlib.h>
-#include <stdint.h>
-#include <stdlib.h>
-
-#include <stdio.h>
-#include <assert.h>
-
-#define BUFFER_GROWTH_RATE (128 * 1024)
-
-typedef struct bzip_t bzip_t;
-struct bzip_t
-{
-    int32_t blockSize100k;
-    int32_t workFactor;
-};
-
-#if _DEBUGGING
-/*
-static
-void debug_print_bz_stream(const bz_stream *s)
-{
-    printf("avail_in: %u, avail_out: %u, total_in_lo32: %u, total_in_hi32: %u, total_out_lo32: %u, total_out_hi32: %u\n",
-           s->avail_in,
-           s->avail_out,
-           s->total_in_lo32, s->total_in_hi32,
-           s->total_out_lo32, s->total_out_hi32);
-}
-*/
-#endif
-
-static
-rc_t invoke_bzip2 ( bzip_t *self, void *dst, uint32_t *dsize, const void *src, uint32_t ssize)
-{
-    int bzerr;
-
-    bz_stream s;
-    memset ( & s, 0, sizeof s );
-    bzerr = BZ2_bzCompressInit ( & s, self -> blockSize100k, 0, self -> workFactor );
-    if ( bzerr != BZ_OK )
-        return RC ( rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted );
-    
-    s.next_in = (void *)src;
-    s.avail_in = ssize;
-    s.next_out = dst;
-    s.avail_out = *dsize;
-    
-    *dsize = 0;
-    bzerr = BZ2_bzCompress(&s, BZ_FINISH);
-    switch (bzerr)
-    {
-    case BZ_OK:
-    case BZ_RUN_OK:
-    case BZ_FINISH_OK:
-    case BZ_STREAM_END:
-        break;
-    default:
-#if _DEBUGGING
-        fprintf(stderr, "BZ2_bzCompress: unexpected bzip2 error %i\n", bzerr);
-#endif
-        BZ2_bzCompressEnd ( & s );
-        return RC(rcXF, rcFunction, rcExecuting, rcSelf, rcUnexpected);
-    }
-
-    assert ( s.total_out_hi32 == 0 );
-    *dsize = s.total_out_lo32;
-
-
-    BZ2_bzCompressEnd ( & s );
-
-    return 0;
-}
-
-static
-rc_t CC bzip_func ( void *Self, const VXformInfo *info,
-    VBlobResult *dst, const VBlobData *src, VBlobHeader *hdr )
-{
-    rc_t rc;
-    bzip_t *self = Self;
-
-    /* input bits */
-    uint64_t sbits = ( uint64_t) src -> elem_count * src -> elem_bits;
-
-    /* input bytes */
-    uint32_t ssize = ( uint32_t ) ( ( sbits + 7 ) >> 3 );
-
-    /* required output size */
-    uint32_t dsize = ( uint32_t ) ( ( ( size_t ) dst -> elem_count * dst->elem_bits + 7 ) >> 3 );
-
-    if ( ( sbits & 7 ) == 0 )
-        /* version 1 is byte-aligned */
-        VBlobHeaderSetVersion ( hdr, 1 );
-    else
-    {
-        VBlobHeaderSetVersion ( hdr, 2 );
-        VBlobHeaderArgPushTail ( hdr, ( int64_t ) ( sbits & 7 ) );
-    }
-
-    rc = invoke_bzip2 ( self, dst -> data, & dsize, src -> data, ssize);
-    if (rc == 0)
-    {
-        dst->elem_bits = 1;
-        dst->byte_order = src->byte_order;
-        if (dsize != 0)
-            dst->elem_count = dsize << 3;
-        else
-            rc = RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-    }
-
-    return rc;
-}
-
-/* bzip
- * function bzip2_fmt bzip #1.0 < * U32 blockSize100k, U32 workFactor > ( any in );
- */
-VTRANSFACT_IMPL ( vdb_bzip, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    bzip_t *fself;
-
-    int blockSize100k = 5;
-    int workFactor = 0;
-
-    if ( cp -> argc > 0 )
-    {
-        blockSize100k = cp -> argv [ 0 ] . data . i32 [ 0 ];
-        if ( blockSize100k < 1 || blockSize100k > 9 )
-            return RC(rcXF, rcFunction, rcConstructing, rcParam, rcInvalid);
-        if ( cp -> argc > 1 )
-        {
-            workFactor = cp -> argv [ 1 ] . data . i32 [ 0 ];
-            if ( workFactor > 250 )
-                return RC(rcXF, rcFunction, rcConstructing, rcParam, rcInvalid);
-        }
-    }
-
-    fself = malloc ( sizeof *fself );
-    if ( fself == NULL )
-        return RC ( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    fself -> blockSize100k = blockSize100k;
-    fself -> workFactor = workFactor;
-
-    rslt->self = fself;
-    rslt->whack = free;
-    rslt->variant = vftBlob;
-    rslt->u.bf = bzip_func;
-        
-    return 0;
-}
diff --git a/libs/vxf/ceil.c b/libs/vxf/ceil.c
deleted file mode 100644
index 141d868..0000000
--- a/libs/vxf/ceil.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <math.h>
-#include <assert.h>
-
-#define FLOAT_FUNC ceilf
-#define DOUBLE_FUNC ceil
-#include "math-funcs-impl.h"
-
-/*
- function < type T >
- T vdb:ceil #1.0 ( T in );
- */
-VTRANSFACT_IMPL(vdb_ceil, 1, 0, 0) (const void *self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp ) {
-    return factory(self, info, rslt, cp, dp);
-}
diff --git a/libs/vxf/checksum.c b/libs/vxf/checksum.c
deleted file mode 100644
index 46bc9f3..0000000
--- a/libs/vxf/checksum.c
+++ /dev/null
@@ -1,566 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <vdb/schema.h>
-#include <kdb/meta.h>
-#include <klib/checksum.h>
-#include <klib/text.h>
-#include <klib/rc.h>
-
-#include <sysalloc.h>
-
-#include <bitstr.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-typedef struct CRC32State CRC32State;
-struct CRC32State
-{
-    uint64_t len;
-    uint32_t crc;
-};
-
-typedef struct checksum checksum;
-struct checksum
-{
-    KMetadata *meta;
-
-    void ( * swap ) ( checksum *self );
-    void ( * sum ) ( checksum *self, const void *data, size_t bytes );
-    size_t ( * digest ) ( checksum *self, uint8_t *buff, size_t bsize );
-
-    size_t valid;
-    union
-    {
-        CRC32State crc32;
-        MD5State md5;
-        SHA1State sha1;
-        SHA256State sha256;
-        SHA384State sha384;
-        SHA512State sha512;
-        uint8_t buff [ 1 ];
-    } u;
-
-    bool byte_swap;
-    char node [ 1 ];
-};
-
-/*--------------------------------------------------------------------------
- * CRC32
- */
-static
-void vdb_crc32swap ( checksum *self )
-{
-    self -> u . crc32 . len = bswap_64 ( self -> u . crc32 . len );
-    self -> u . crc32 . crc = bswap_32 ( self -> u . crc32 . crc );
-}
-
-static
-void vdb_crc32sum ( checksum *self, const void *data, size_t bytes )
-{
-    self -> u . crc32 . crc = CRC32 ( self -> u . crc32 . crc, data, bytes );
-    self -> u . crc32 . len += bytes;
-}
-
-static
-size_t vdb_crc32digest ( checksum *self, uint8_t *buff, size_t bsize )
-{
-    uint64_t len = self -> u . crc32 . len;
-    uint8_t ch[sizeof(len)];
-    unsigned i;
-
-    assert ( bsize >= 4 );
-
-    for (i = 0; len; len >>= 8, ++i)
-        ch[i] = (uint8_t)len;
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-    * ( uint32_t* ) buff = bswap_32 ( ~ CRC32 ( self -> u . crc32 . crc, ch, i ) );
-#else
-    * ( uint32_t* ) buff =  ~ CRC32 ( self -> u . crc32 . crc, ch, i );
-#endif
-    return 4;
-}
-
-/*--------------------------------------------------------------------------
- * md5
- */
-static
-void vdb_md5swap ( checksum *self )
-{
-    self -> u . md5 . count [ 0 ] = bswap_32 ( self -> u . md5 . count [ 0 ] );
-    self -> u . md5 . count [ 1 ] = bswap_32 ( self -> u . md5 . count [ 1 ] );
-    self -> u . md5 . abcd [ 0 ] = bswap_32 ( self -> u . md5 . abcd [ 0 ] );
-    self -> u . md5 . abcd [ 1 ] = bswap_32 ( self -> u . md5 . abcd [ 1 ] );
-    self -> u . md5 . abcd [ 2 ] = bswap_32 ( self -> u . md5 . abcd [ 2 ] );
-    self -> u . md5 . abcd [ 3 ] = bswap_32 ( self -> u . md5 . abcd [ 3 ] );
-}
-
-static
-void vdb_md5sum ( checksum *self, const void *data, size_t bytes )
-{
-    MD5StateAppend ( & self -> u . md5, data, bytes );
-}
-
-static
-size_t vdb_md5digest ( checksum *self, uint8_t *buff, size_t bsize )
-{
-    assert ( bsize >= 16 );
-    MD5StateFinish ( & self -> u . md5, buff );
-    return 16;
-}
-
-/*--------------------------------------------------------------------------
- * sha1
- */
-static
-void vdb_sha32swap ( checksum *self )
-{
-    unsigned int i;
-    self -> u . sha1 . len = bswap_64 ( self -> u . sha1 . len );
-    for ( i = 0; i < 8; ++ i )
-        self -> u . sha1 . H [ i ] = bswap_32 ( self -> u . sha1 . H [ i ] );
-    self -> u . sha1 . cur = bswap_32 ( self -> u . sha1 . cur );
-}
-
-static
-void vdb_sha1sum ( checksum *self, const void *data, size_t bytes )
-{
-    SHA1StateAppend ( & self -> u . sha1, data, bytes );
-}
-
-static
-size_t vdb_sha1digest ( checksum *self, uint8_t *buff, size_t bsize )
-{
-    assert ( bsize >= 20 );
-    SHA1StateFinish ( & self -> u . sha1, buff );
-    return 20;
-}
-
-/*--------------------------------------------------------------------------
- * sha256
- */
-static
-void vdb_sha256sum ( checksum *self, const void *data, size_t bytes )
-{
-    SHA256StateAppend ( & self -> u . sha256, data, bytes );
-}
-
-static
-size_t vdb_sha256digest ( checksum *self, uint8_t *buff, size_t bsize )
-{
-    assert ( bsize >= 32 );
-    SHA256StateFinish ( & self -> u . sha256, buff );
-    return 32;
-}
-
-/*--------------------------------------------------------------------------
- * sha384
- */
-static
-void vdb_sha64swap ( checksum *self )
-{
-    unsigned int i;
-    self -> u . sha384 . len = bswap_64 ( self -> u . sha384 . len );
-    for ( i = 0; i < 8; ++ i )
-        self -> u . sha384 . H [ i ] = bswap_64 ( self -> u . sha384 . H [ i ] );
-    self -> u . sha384 . cur = bswap_32 ( self -> u . sha384 . cur );
-}
-
-static
-void vdb_sha384sum ( checksum *self, const void *data, size_t bytes )
-{
-    SHA384StateAppend ( & self -> u . sha384, data, bytes );
-}
-
-static
-size_t vdb_sha384digest ( checksum *self, uint8_t *buff, size_t bsize )
-{
-    assert ( bsize >= 48 );
-    SHA384StateFinish ( & self -> u . sha384, buff );
-    return 48;
-}
-
-/*--------------------------------------------------------------------------
- * sha512
- */
-static
-void vdb_sha512sum ( checksum *self, const void *data, size_t bytes )
-{
-    SHA512StateAppend ( & self -> u . sha512, data, bytes );
-}
-
-static
-size_t vdb_sha512digest ( checksum *self, uint8_t *buff, size_t bsize )
-{
-    assert ( bsize >= 64 );
-    SHA512StateFinish ( & self -> u . sha512, buff );
-    return 64;
-}
-
-
-/*--------------------------------------------------------------------------
- * general checksum function
- */
-static
-rc_t CC checksum_driver ( void *obj, const VXformInfo *info,
-    int64_t row_id, VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    checksum *self = obj;
-
-    /* we ensured the input was an octet-stream within the factory */
-    uint32_t elem_bytes = argv [ 0 ] . u . data . elem_bits >> 3;
-    const uint8_t *src = argv [ 0 ] . u . data . base;
-    uint64_t count = argv [ 0 ] . u . data . elem_count;
-
-    src += argv [ 0 ] . u . data . first_elem * elem_bytes;
-    count *= elem_bytes;
-
-    ( * self -> sum ) ( self, src, count );
-
-    return 0;
-}
-
-static
-void CC checksum_whack ( void *obj )
-{
-    checksum *self = obj;
-
-    /* store metadata */
-    KMDataNode *digest;
-    rc_t rc = KMetadataOpenNodeUpdate ( self -> meta, & digest, "%s", self -> node );
-    if ( rc == 0 )
-    {
-        size_t bytes;
-        uint8_t buff [ 256 ];
-
-        /* open state node */
-        KMDataNode *state;
-        rc = KMDataNodeOpenNodeUpdate ( digest, & state, "state" );
-        if ( rc == 0 )
-        {
-            if ( self -> byte_swap )
-                ( * self -> swap ) ( self );
-
-            KMDataNodeWrite ( state, & self -> u, self -> valid );
-            KMDataNodeRelease ( state );
-
-            if ( self -> byte_swap )
-                ( * self -> swap ) ( self );
-       }
-
-        /* capture digest */
-        bytes = ( * self -> digest ) ( self, buff, sizeof buff );
-
-        /* write digest */
-        KMDataNodeWrite ( digest, buff, bytes );
-        KMDataNodeRelease ( digest );
-    }
-
-    KMetadataRelease ( self -> meta );
-    free ( self );
-}
-
-static
-rc_t checksum_prior_state ( checksum *self, size_t state_size )
-{
-    const KMDataNode *state;
-    rc_t rc = KMetadataOpenNodeRead ( self -> meta, & state, "%s/state", self -> node );
-    if ( rc == 0 )
-    {
-        size_t remaining;
-        rc = KMDataNodeRead ( state, 0, self -> u . buff, sizeof self -> u, & self -> valid, & remaining );
-        KMDataNodeRelease ( state );
-        if ( rc == 0 )
-        {
-            if ( remaining != 0 || self -> valid > state_size )
-                rc = RC ( rcXF, rcFunction, rcConstructing, rcData, rcExcessive );
-            else if ( self -> valid != 0 && self -> valid < state_size )
-                rc = RC ( rcXF, rcFunction, rcConstructing, rcData, rcInsufficient );
-        }
-    }
-    else if ( GetRCState ( rc ) == rcNotFound )
-    {
-        rc = 0;
-    }
-
-    return rc;
-}
-
-static
-rc_t checksum_make ( const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, size_t state_size )
-{
-    rc_t rc;
-    checksum *self = malloc ( sizeof * self + cp -> argv [ 0 ] . count );
-    if ( self == NULL )
-        rc = RC ( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        rc = VTableOpenMetadataUpdate ( ( VTable* ) info -> tbl, & self -> meta );
-        if ( rc == 0 )
-        {
-            rc = KMetadataByteOrder ( self -> meta, & self -> byte_swap );
-            if ( rc == 0 )
-            {
-                string_copy ( self -> node, cp -> argv [ 0 ] . count + 1,
-                    cp -> argv [ 0 ] . data . ascii, cp -> argv [ 0 ] . count );
-
-                memset ( & self -> u, 0, sizeof self -> u );
-                rc = checksum_prior_state ( self, state_size );
-                if ( rc == 0 )
-                {
-                    rslt -> self = self;
-                    rslt -> whack = checksum_whack;
-                    rslt -> variant = vftNonDetRow;
-                    rslt -> u . rf = checksum_driver;
-
-                    return 0;
-                }
-            }
-
-            KMetadataRelease ( self -> meta );
-        }
-
-        free ( self );
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * crc32 factory
- */
-static
-rc_t vdb_crc32_fact ( const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp )
-{
-    checksum *self;
-    rc_t rc = checksum_make ( info, rslt, cp, sizeof self -> u . crc32 );
-    if ( rc == 0 )
-    {
-        self = rslt -> self;
-        self -> swap = vdb_crc32swap;
-        self -> sum = vdb_crc32sum;
-        self -> digest = vdb_crc32digest;
-        if ( self -> valid == 0 ) {
-            self -> u . crc32 . crc = 0;
-            self -> u . crc32 . len = 0;
-            self -> valid = sizeof ( self -> u . crc32 );
-        }
-        else if ( self -> byte_swap )
-            vdb_crc32swap ( self );
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * md5 factory
- */
-static
-rc_t vdb_md5sum_fact ( const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp )
-{
-    checksum *self;
-    rc_t rc = checksum_make ( info, rslt, cp, sizeof self -> u . md5 );
-    if ( rc == 0 )
-    {
-        self = rslt -> self;
-        self -> swap = vdb_md5swap;
-        self -> sum = vdb_md5sum;
-        self -> digest = vdb_md5digest;
-        if ( self -> valid == 0 ) {
-            MD5StateInit ( & self -> u . md5 );
-            self -> valid = sizeof ( self -> u . md5 );
-        }
-        else if ( self -> byte_swap )
-            vdb_md5swap ( self );
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * sha factories
- */
-static
-rc_t vdb_sha1_fact ( const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp )
-{
-    checksum *self;
-    rc_t rc = checksum_make ( info, rslt, cp, sizeof self -> u . sha1 );
-    if ( rc == 0 )
-    {
-        self = rslt -> self;
-        self -> swap = vdb_sha32swap;
-        self -> sum = vdb_sha1sum;
-        self -> digest = vdb_sha1digest;
-        if ( self -> valid == 0 ) {
-            SHA1StateInit ( & self -> u . sha1 );
-            self -> valid = sizeof ( self -> u . sha1 );
-        }
-        else if ( self -> byte_swap )
-            vdb_sha32swap ( self );
-    }
-
-    return rc;
-}
-
-static
-rc_t vdb_sha256_fact ( const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp )
-{
-    checksum *self;
-    rc_t rc = checksum_make ( info, rslt, cp, sizeof self -> u . sha256 );
-    if ( rc == 0 )
-    {
-        self = rslt -> self;
-        self -> swap = vdb_sha32swap;
-        self -> sum = vdb_sha256sum;
-        self -> digest = vdb_sha256digest;
-        if ( self -> valid == 0 ) {
-            SHA256StateInit ( & self -> u . sha256 );
-            self -> valid = sizeof ( self -> u . sha256 );
-        }
-        else if ( self -> byte_swap )
-            vdb_sha32swap ( self );
-    }
-
-    return rc;
-}
-
-static
-rc_t vdb_sha384_fact ( const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp )
-{
-    checksum *self;
-    rc_t rc = checksum_make ( info, rslt, cp, sizeof self -> u . sha384 );
-    if ( rc == 0 )
-    {
-        self = rslt -> self;
-        self -> swap = vdb_sha64swap;
-        self -> sum = vdb_sha384sum;
-        self -> digest = vdb_sha384digest;
-        if ( self -> valid == 0 ) {
-            SHA384StateInit ( & self -> u . sha384 );
-            self -> valid = sizeof ( self -> u . sha384 );
-        }
-        else if ( self -> byte_swap )
-            vdb_sha64swap ( self );
-    }
-
-    return rc;
-}
-
-static
-rc_t vdb_sha512_fact ( const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp )
-{
-    checksum *self;
-    rc_t rc = checksum_make ( info, rslt, cp, sizeof self -> u . sha512 );
-    if ( rc == 0 )
-    {
-        self = rslt -> self;
-        self -> swap = vdb_sha64swap;
-        self -> sum = vdb_sha512sum;
-        self -> digest = vdb_sha512digest;
-        if ( self -> valid == 0 ) {
-            SHA512StateInit ( & self -> u . sha512 );
-            self -> valid = sizeof ( self -> u . sha512 );
-        }
-        else if ( self -> byte_swap )
-            vdb_sha64swap ( self );
-    }
-
-    return rc;
-}
-
-
-/*--------------------------------------------------------------------------
- * checksum factory
- */
-VTRANSFACT_IMPL ( vdb_checksum, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    /* version 1.0 has 2 factory params... */
-    assert ( cp -> argc == 2 );
-    /* ...and 1 function param */
-    assert ( dp -> argc == 1 );
-
-    /* both factory params are of type ascii */
-    assert ( cp -> argv [ 0 ] . desc . domain == vtdAscii );
-    assert ( cp -> argv [ 1 ] . desc . domain == vtdAscii );
-    assert ( cp -> argv [ 0 ] . desc . intrinsic_bits == 8 );
-    assert ( cp -> argv [ 1 ] . desc . intrinsic_bits == 8 );
-    assert ( cp -> argv [ 0 ] . desc . intrinsic_dim == 1 );
-    assert ( cp -> argv [ 1 ] . desc . intrinsic_dim == 1 );
-
-    /* the input must be limited to bytes */
-    assert ( dp -> argc == 1 );
-    assert ( dp -> argv [ 0 ] . desc . intrinsic_bits == 8 );
-
-    /* look up algorithm */
-    switch ( cp -> argv [ 1 ] . count )
-    {
-    case 3:
-        if ( strcase_cmp ( cp -> argv [ 1 ] . data . ascii, 3, "md5", 3, 3 ) == 0 )
-            return vdb_md5sum_fact ( info, rslt, cp );
-        break;
-    case 4:
-        if ( strcase_cmp ( cp -> argv [ 1 ] . data . ascii, 4, "sha1", 4, 4 ) == 0 )
-            return vdb_sha1_fact ( info, rslt, cp );
-        break;
-    case 5:
-        if ( strcase_cmp ( cp -> argv [ 1 ] . data . ascii, 5, "crc32", 5, 5 ) == 0 )
-            return vdb_crc32_fact ( info, rslt, cp );
-        else if ( strcase_cmp ( cp -> argv [ 1 ] . data . ascii, 5, "sha-1", 5, 5 ) == 0 )
-            return vdb_sha1_fact ( info, rslt, cp );
-        break;
-    case 6:
-        if ( strcase_cmp ( cp -> argv [ 1 ] . data . ascii, 6, "crc-32", 6, 6 ) == 0 )
-            return vdb_crc32_fact ( info, rslt, cp );
-        else if ( strcase_cmp ( cp -> argv [ 1 ] . data . ascii, 6, "sha256", 6, 6 ) == 0 )
-            return vdb_sha256_fact ( info, rslt, cp );
-        else if ( strcase_cmp ( cp -> argv [ 1 ] . data . ascii, 6, "sha384", 6, 6 ) == 0 )
-            return vdb_sha384_fact ( info, rslt, cp );
-        else if ( strcase_cmp ( cp -> argv [ 1 ] . data . ascii, 6, "sha512", 6, 6 ) == 0 )
-            return vdb_sha512_fact ( info, rslt, cp );
-        break;
-    case 7:
-        if ( strcase_cmp ( cp -> argv [ 1 ] . data . ascii, 7, "sha-256", 7, 7 ) == 0 )
-            return vdb_sha256_fact ( info, rslt, cp );
-        else if ( strcase_cmp ( cp -> argv [ 1 ] . data . ascii, 7, "sha-384", 7, 7 ) == 0 )
-            return vdb_sha384_fact ( info, rslt, cp );
-        else if ( strcase_cmp ( cp -> argv [ 1 ] . data . ascii, 7, "sha-512", 7, 7 ) == 0 )
-            return vdb_sha512_fact ( info, rslt, cp );
-        break;
-    }
-
-    /* failed to resolve algorithm */
-    return RC ( rcXF, rcFunction, rcConstructing, rcParam, rcIncorrect );
-}
diff --git a/libs/vxf/clip.c b/libs/vxf/clip.c
deleted file mode 100644
index e8047c2..0000000
--- a/libs/vxf/clip.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-typedef struct {
-    union {
-        /* integer */
-        int8_t i8[2];
-        int16_t i16[2];
-        int32_t i32[2];
-        int64_t i64[2];
-    
-        /* unsigned integer */
-        uint8_t u8[2];
-        uint16_t u16[2];
-        uint32_t u32[2];
-        uint64_t u64[2];
-    
-        /* floating point */
-        float f32[2];
-        double f64[2];
-    } u;
-    uint32_t dim;
-} self_t;
-
-#define CLIP_FUNC(FUNC, TYPE, VAL) \
-static rc_t CC FUNC(void *Self, const VXformInfo *info, void *Dst, const void *Src, uint64_t n) { \
-    const self_t *self = Self; \
-    TYPE lower = self->u.VAL[0]; \
-    TYPE upper = self->u.VAL[1]; \
-    TYPE *dst = Dst; \
-    const TYPE *src = Src; \
-    size_t i; \
-\
-    for (i = 0, n *= self->dim; i != n; ++i) { \
-        TYPE val = src[i]; \
-\
-        if (val < lower) \
-            val = lower; \
-        else if (val > upper) \
-            val = upper; \
-\
-        dst[i] = val; \
-    } \
-    return 0; \
-}
-
-CLIP_FUNC(clip_U8, uint8_t, u8)
-CLIP_FUNC(clip_I8, int8_t, i8)
-CLIP_FUNC(clip_U16, uint16_t, u16)
-CLIP_FUNC(clip_I16, int16_t, i16)
-CLIP_FUNC(clip_U32, uint32_t, u32)
-CLIP_FUNC(clip_I32, int32_t, i32)
-CLIP_FUNC(clip_U64, uint64_t, u64)
-CLIP_FUNC(clip_I64, int64_t, i64)
-CLIP_FUNC(clip_F32, float, f32)
-CLIP_FUNC(clip_F64, double, f64)
-
-static
-void CC vxf_free_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-/* clip
- function < type T > T clip #1.0 < T lower, T upper > ( T in ) = vdb:clip;
- function < type T, U32 dim > T [ dim ] vclip #1.0 < T lower, T upper > ( T [ dim ] in ) = vdb:clip;
- */
-VTRANSFACT_IMPL(vdb_clip, 1, 0, 0) (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc = 0;
-    self_t *self;
-
-    /* check types */
-    switch (info->fdesc.desc.domain) {
-        case vtdInt:
-        case vtdUint:
-        case vtdFloat:
-            break;
-        default:
-            return RC(rcVDB, rcFunction, rcConstructing, rcType, rcInvalid);
-    }
-    switch (info->fdesc.desc.intrinsic_bits) {
-        case 8:
-        case 16:
-        case 32:
-        case 64:
-            break;
-        default:
-            return RC(rcVDB, rcFunction, rcConstructing, rcType, rcInvalid);
-    }
-    
-    self = malloc(sizeof(*self));
-    if (self == NULL)
-        return RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-    
-    rslt->self = self;
-    rslt->whack = vxf_free_wrapper;
-    rslt->variant = vftArray;
-
-    self->dim = info->fdesc.fd.td.dim;
-    
-    switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            switch (info->fdesc.desc.intrinsic_bits) {
-                case 8:
-                    rslt->u.af = clip_I8;
-                    self->u.i8[0] = *cp->argv[0].data.i8;
-                    self->u.i8[1] = *cp->argv[1].data.i8;
-                    break;
-                case 16:
-                    rslt->u.af = clip_I16;
-                    self->u.i16[0] = *cp->argv[0].data.i16;
-                    self->u.i16[1] = *cp->argv[1].data.i16;
-                    break;
-                case 32:
-                    rslt->u.af = clip_I32;
-                    self->u.i32[0] = *cp->argv[0].data.i32;
-                    self->u.i32[1] = *cp->argv[1].data.i32;
-                    break;
-                case 64:
-                    rslt->u.af = clip_I64;
-                    self->u.i64[0] = *cp->argv[0].data.i64;
-                    self->u.i64[1] = *cp->argv[1].data.i64;
-                    break;
-            }
-            break;
-        case vtdUint:
-            switch (info->fdesc.desc.intrinsic_bits) {
-                case 8:
-                    rslt->u.af = clip_U8;
-                    self->u.u8[0] = *cp->argv[0].data.u8;
-                    self->u.u8[1] = *cp->argv[1].data.u8;
-                    break;
-                case 16:
-                    rslt->u.af = clip_U16;
-                    self->u.u16[0] = *cp->argv[0].data.u16;
-                    self->u.u16[1] = *cp->argv[1].data.u16;
-                    break;
-                case 32:
-                    rslt->u.af = clip_U32;
-                    self->u.u32[0] = *cp->argv[0].data.u32;
-                    self->u.u32[1] = *cp->argv[1].data.u32;
-                    break;
-                case 64:
-                    rslt->u.af = clip_U64;
-                    self->u.u64[0] = *cp->argv[0].data.u64;
-                    self->u.u64[1] = *cp->argv[1].data.u64;
-                    break;
-            }
-            break;
-        case vtdFloat:
-            switch (info->fdesc.desc.intrinsic_bits) {
-                case 32:
-                    rslt->u.af = clip_F32;
-                    self->u.f32[0] = *cp->argv[0].data.f32;
-                    self->u.f32[1] = *cp->argv[1].data.f32;
-                    break;
-                case 64:
-                    rslt->u.af = clip_F64;
-                    self->u.f64[0] = *cp->argv[0].data.f64;
-                    self->u.f64[1] = *cp->argv[1].data.f64;
-                    break;
-            }
-            break;
-    }
-	return rc;
-}
diff --git a/libs/vxf/cut.c b/libs/vxf/cut.c
deleted file mode 100644
index e732659..0000000
--- a/libs/vxf/cut.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <assert.h>
-
-typedef struct self_t {
-    void (*f)(const struct self_t *, void *, const void *, size_t);
-    uint32_t type_size;
-    uint32_t dim;
-    uint32_t n;
-    uint32_t idx[7];
-} self_t;
-
-static
-void cut8(const struct self_t *self, void *Dst, const void *Src, size_t elem_count) {
-    uint8_t *dst = Dst;
-    const uint8_t *src = Src;
-    int i;
-    int j;
-    int doff;
-    int soff;
-    
-    for (doff = soff = i = 0; i != elem_count; ++i, doff += self->n, soff += self->dim) {
-        for (j = 0; j != self->n; ++j) {
-            dst[doff + j] = src[soff + self->idx[j]];
-        }
-    }
-}
-
-static
-void cut16(const struct self_t *self, void *Dst, const void *Src, size_t elem_count) {
-    uint16_t *dst = Dst;
-    const uint16_t *src = Src;
-    int i;
-    int j;
-    int doff;
-    int soff;
-    
-    for (doff = soff = i = 0; i != elem_count; ++i, doff += self->n, soff += self->dim) {
-        for (j = 0; j != self->n; ++j) {
-            dst[doff + j] = src[soff + self->idx[j]];
-        }
-    }
-}
-
-static
-void cut32(const struct self_t *self, void *Dst, const void *Src, size_t elem_count) {
-    uint32_t *dst = Dst;
-    const uint32_t *src = Src;
-    int i;
-    int j;
-    int doff;
-    int soff;
-    
-    for (doff = soff = i = 0; i != elem_count; ++i, doff += self->n, soff += self->dim) {
-        for (j = 0; j != self->n; ++j) {
-            dst[doff + j] = src[soff + self->idx[j]];
-        }
-    }
-}
-
-static
-void cut64(const struct self_t *self, void *Dst, const void *Src, size_t elem_count) {
-    uint64_t *dst = Dst;
-    const uint64_t *src = Src;
-    int i;
-    int j;
-    int doff;
-    int soff;
-    
-    for (doff = soff = i = 0; i != elem_count; ++i, doff += self->n, soff += self->dim) {
-        for (j = 0; j != self->n; ++j) {
-            dst[doff + j] = src[soff + self->idx[j]];
-        }
-    }
-}
-
-static
-void cut_bytes(const struct self_t *self, void *Dst, const void *Src, size_t elem_count) {
-    uint8_t *dst = Dst;
-    const uint8_t *src = Src;
-    int i;
-    int j;
-    int doff;
-    int soff;
-    const int sz = self->type_size >> 3;
-    const int di = sz * self->n;
-    const int si = sz * self->dim;
-    
-    for (doff = soff = i = 0; i != elem_count; ++i, doff += di, soff += si) {
-        for (j = 0; j != self->n; ++j) {
-            memcpy(dst + doff + j * sz, src + soff + self->idx[j] * sz, sz);
-        }
-    }
-}
-
-static
-void cut_bits(const struct self_t *self, void *dst, const void *src, size_t elem_count) {
-    int i;
-    int j;
-    int doff;
-    int soff;
-    const int sz = self->type_size;
-    const int di = sz * self->n;
-    const int si = sz * self->dim;
-    
-    for (doff = soff = i = 0; i != elem_count; ++i, doff += di, soff += si) {
-        for (j = 0; j != self->n; ++j) {
-            bitcpy(dst, doff + j * sz, src, soff + self->idx[j] * sz, sz);
-        }
-    }
-}
-
-static
-rc_t CC cut_driver (
-                    void *Self,
-                    const VXformInfo *info,
-                    void *dst,
-                    const void *src,
-                    uint64_t elem_count
-                    )
-{
-    const self_t *self = Self;
-    
-    self->f( self, dst, src, elem_count );
-    return 0;
-}
-
-static
-void CC vxf_cut_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-/* cut
- * function < type T >
- * T [ * ] cut #1.0 < U32 idx, ... > ( T [ * ] in );
- */
-VTRANSFACT_IMPL(vdb_cut, 1, 0, 0) (const void *self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    uint32_t dim = cp->argc;
-    int i;
-    self_t *ctx;
-    
-    assert(dim != 0);
-    for (i = 0; i != dim; ++i) {
-        if (*(cp->argv[i].data.u32) >= dp->argv[0].fd.td.dim)
-            return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-    }
-    
-    ctx = malloc ( sizeof * ctx - sizeof ctx -> idx + dim * sizeof ctx -> idx [ 0 ] );
-    if (ctx == NULL)
-        return RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-
-    ctx->type_size = VTypedescSizeof ( & info -> fdesc . desc ) / dim;
-    ctx->dim = VTypedescSizeof ( & dp->argv[0].desc ) / ctx->type_size;
-    ctx->n = dim;
-
-    for (i = 0; i != dim; ++i)
-    {
-        ctx->idx[i] = cp->argv[i].data.u32[0];
-        if ( ctx->idx[i] >= ctx->dim )
-        {
-            free ( ctx );
-            return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-        }
-    }
-    
-    rslt->self = ctx;
-    rslt->whack = vxf_cut_wrapper;
-    rslt->variant = vftArray;
-    rslt->u.af = cut_driver;
-    
-    switch (ctx->type_size) {
-        case 8:
-            ctx->f = cut8;
-            break;
-        case 16:
-            ctx->f = cut16;
-            break;
-        case 32:
-            ctx->f = cut32;
-            break;
-        case 64:
-            ctx->f = cut64;
-            break;
-        default:
-            ctx->f = (ctx->type_size & 7) == 0 ? cut_bytes : cut_bits;
-            break;
-    }
-    
-	return 0;
-}
diff --git a/libs/vxf/delta.c b/libs/vxf/delta.c
deleted file mode 100644
index fc3136b..0000000
--- a/libs/vxf/delta.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <arch-impl.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-
-#define DELTA_NAME( T )  delta_ ## T
-#define DELTA( T )                                                       \
-static                                                                   \
-rc_t CC DELTA_NAME ( T ) ( void *data,                                   \
-    const VXformInfo *info,  void *rslt, const void *input,              \
-    uint64_t elem_count)                                                 \
-{                                                                        \
-    uint32_t i;                                                          \
-    T *dst       = (T*) rslt;                                            \
-    const T *src = (const T*) input;                                     \
-    if(elem_count >0) {							 \
-        dst [ 0 ] = src [ 0 ];						 \
-	for ( i = 1; i < elem_count; ++ i ) {                            \
-	    dst [ i ] = src [ i ] - src [ i - 1 ];                       \
-	}                                                                \
-    }									 \
-    return 0;                                                            \
-}
-
-DELTA ( int8_t )
-DELTA ( int16_t )
-DELTA ( int32_t )
-DELTA ( int64_t )
-
-static VArrayFunc delta_func [] =
-{
-    DELTA_NAME ( int8_t  ),
-    DELTA_NAME ( int16_t ),
-    DELTA_NAME ( int32_t ),
-    DELTA_NAME ( int64_t )
-};
-/* delta
- *  return the 1 derivative of inputs
- *
- *  "T" [ TYPE ] - input and output data type
- *  must be member of  signed integers
- *
- *  "a" [ DATA ] - operand
- *
- *
- * SYNOPSIS:
- *  return 1st derivative for the whole blob with 1st element unmodified
- *
- * USAGE:
- *    I32 A = < I32 > delta ( B );
- */
-VTRANSFACT_IMPL ( vdb_delta, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    int size_idx;
-    if ( info -> fdesc . desc . domain != vtdInt)
-    {
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-    }
-
-    /* TBD - eventually support vector derivatives
-       for today, check that dim of T is 1 */
-    if ( dp -> argv [ 0 ] . desc . intrinsic_dim != 1 )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-    /* the only numeric types we support are between 8 and 64 bits */
-    size_idx = uint32_lsbit ( dp -> argv [ 0 ] . desc . intrinsic_bits ) - 3;
-    if ( size_idx < 0 || size_idx > 3 || ( ( dp -> argv [ 0 ] . desc . intrinsic_bits &
-                                             ( dp -> argv [ 0 ] . desc . intrinsic_bits - 1 ) ) != 0 ) )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-
-    rslt -> u . af = delta_func [ size_idx ];
-    rslt -> variant = vftArray;
-
-    return 0;
-}
diff --git a/libs/vxf/deriv.c b/libs/vxf/deriv.c
deleted file mode 100644
index 31be0d5..0000000
--- a/libs/vxf/deriv.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <arch-impl.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-
-#define DERIV_NAME( T )  deriv_ ## T
-#define DERIV( T )                                                       \
-static                                                                   \
-rc_t CC DERIV_NAME ( T ) ( void *data,                                   \
-    const VXformInfo *info, int64_t row_id, const VFixedRowResult *rslt, \
-    uint32_t argc, const VRowData argv [] )                              \
-{                                                                        \
-    uint32_t i;                                                          \
-    T prior, * dst = rslt -> base;                                       \
-    const T * src = argv [ 0 ] . u . data . base;                        \
-    dst += rslt -> first_elem;						                     \
-    src += argv [ 0 ] . u . data . first_elem;				             \
-    for ( prior = 0, i = 0; i < rslt -> elem_count; ++ i )               \
-    {                                                                    \
-        dst [ i ] = src [ i ] - prior;                                   \
-        prior = src [ i ];                                               \
-    }                                                                    \
-    return 0;                                                            \
-}
-
-DERIV ( int8_t )
-DERIV ( int16_t )
-DERIV ( int32_t )
-DERIV ( int64_t )
-
-static VFixedRowFunc deriv_func [] =
-{
-    DERIV_NAME ( int8_t  ),
-    DERIV_NAME ( int16_t ),
-    DERIV_NAME ( int32_t ),
-    DERIV_NAME ( int64_t )
-};
-/* deriv
- *  return the 1 derivative of inputs
- *
- *  "T" [ TYPE ] - input and output data type
- *  must be member of  signed integers
- *
- *  "a" [ DATA ] - operand
- *
- *
- * SYNOPSIS:
- *  return 1st derivative for every row with initial element unmodified
- *
- * USAGE:
- *    I32 pos_1st_d = < I32 > deriv ( position );
- */
-VTRANSFACT_IMPL ( vdb_deriv, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    int size_idx;
-    if ( info -> fdesc . desc . domain != vtdInt)
-    {
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-    }
-
-    /* TBD - eventually support vector derivatives
-       for today, check that dim of T is 1 */
-    if ( dp -> argv [ 0 ] . desc . intrinsic_dim != 1 )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-    /* the only numeric types we support are between 8 and 64 bits */
-    size_idx = uint32_lsbit ( dp -> argv [ 0 ] . desc . intrinsic_bits ) - 3;
-    if ( size_idx < 0 || size_idx > 3 || ( ( dp -> argv [ 0 ] . desc . intrinsic_bits &
-                                             ( dp -> argv [ 0 ] . desc . intrinsic_bits - 1 ) ) != 0 ) )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-
-    rslt -> u . pf = deriv_func [ size_idx ];
-    rslt -> variant = vftFixedRow;
-
-    return 0;
-}
diff --git a/libs/vxf/diff.c b/libs/vxf/diff.c
deleted file mode 100644
index d7062d4..0000000
--- a/libs/vxf/diff.c
+++ /dev/null
@@ -1,356 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <arch-impl.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-/* optional constant */
-typedef union diff_data diff_data;
-union diff_data
-{
-    int8_t i8;
-    int16_t i16;
-    int32_t i32;
-    int64_t i64;
-
-    uint8_t u8;
-    uint16_t u16;
-    uint32_t u32;
-    uint64_t u64;
-
-    float f32;
-    double f64;
-};
-
-#define FULL_DIFF_NAME( T )                                              \
-    full_diff_ ## T
-#define FULL_DIFF( T, k )                                                \
-static                                                                   \
-rc_t CC FULL_DIFF_NAME ( T ) ( void *data,                                  \
-    const VXformInfo *info, int64_t row_id, const VFixedRowResult *rslt, \
-    uint32_t argc, const VRowData argv [] )                              \
-{                                                                        \
-    uint32_t i;                                                          \
-    const diff_data *self = ( const void* ) data;                        \
-                                                                         \
-    T *dst = rslt -> base;                                               \
-    const T *a = argv [ 0 ] . u . data . base;                           \
-    const T *b = argv [ 1 ] . u . data . base;                           \
-                                                                         \
-    for ( i = 0, dst += rslt -> first_elem,                              \
-              a += argv [ 0 ] . u . data . first_elem,                   \
-              b += argv [ 1 ] . u . data . first_elem;                   \
-          i < rslt -> elem_count; ++ i )                                 \
-    {                                                                    \
-        dst [ i ] = a [ i ] - b [ i ] - self -> k;                       \
-    }                                                                    \
-                                                                         \
-    return 0;                                                            \
-}
-
-FULL_DIFF ( int8_t, i8 )
-FULL_DIFF ( int16_t, i16 )
-FULL_DIFF ( int32_t, i32 )
-FULL_DIFF ( int64_t, i64 )
-FULL_DIFF ( uint8_t, u8 )
-FULL_DIFF ( uint16_t, u16 )
-FULL_DIFF ( uint32_t, u32 )
-FULL_DIFF ( uint64_t, u64 )
-FULL_DIFF ( float, f32 )
-FULL_DIFF ( double, f64 )
-
-static VFixedRowFunc full_diff_func [] =
-{
-    FULL_DIFF_NAME ( uint8_t ),
-    FULL_DIFF_NAME ( uint16_t ),
-    FULL_DIFF_NAME ( uint32_t ),
-    FULL_DIFF_NAME ( uint64_t ),
-    FULL_DIFF_NAME ( int8_t ),
-    FULL_DIFF_NAME ( int16_t ),
-    FULL_DIFF_NAME ( int32_t ),
-    FULL_DIFF_NAME ( int64_t ),
-    NULL,
-    NULL,
-    FULL_DIFF_NAME ( float ),
-    FULL_DIFF_NAME ( double )
-};
-
-#define CONST_DIFF_NAME( T )                                             \
-    const_diff_ ## T
-#define CONST_DIFF( T, k )                                               \
-static                                                                   \
-rc_t CC CONST_DIFF_NAME ( T ) ( void *data, const VXformInfo *info,         \
-    void *rslt, const void *src, uint64_t elem_count )                   \
-{                                                                        \
-    uint32_t i;                                                          \
-    const diff_data *self = ( const void* ) data;                        \
-                                                                         \
-    T *dst = rslt;                                                       \
-    const T *a = src;                                                    \
-                                                                         \
-    for ( i = 0; i < elem_count; ++ i )                                 \
-    {                                                                    \
-        dst [ i ] = a [ i ] - self -> k;                                 \
-    }                                                                    \
-                                                                         \
-    return 0;                                                            \
-}
-
-CONST_DIFF ( int8_t, i8 )
-CONST_DIFF ( int16_t, i16 )
-CONST_DIFF ( int32_t, i32 )
-CONST_DIFF ( int64_t, i64 )
-CONST_DIFF ( uint8_t, u8 )
-CONST_DIFF ( uint16_t, u16 )
-CONST_DIFF ( uint32_t, u32 )
-CONST_DIFF ( uint64_t, u64 )
-CONST_DIFF ( float, f32 )
-CONST_DIFF ( double, f64 )
-
-static VArrayFunc const_diff_func [] =
-{
-    CONST_DIFF_NAME ( uint8_t ),
-    CONST_DIFF_NAME ( uint16_t ),
-    CONST_DIFF_NAME ( uint32_t ),
-    CONST_DIFF_NAME ( uint64_t ),
-    CONST_DIFF_NAME ( int8_t ),
-    CONST_DIFF_NAME ( int16_t ),
-    CONST_DIFF_NAME ( int32_t ),
-    CONST_DIFF_NAME ( int64_t ),
-    NULL,
-    NULL,
-    CONST_DIFF_NAME ( float ),
-    CONST_DIFF_NAME ( double )
-};
-
-#define NO_CONST_NAME( T )                                               \
-    no_const_ ## T
-#define NO_CONST( T )                                                    \
-static                                                                   \
-rc_t CC NO_CONST_NAME ( T ) ( void *data,                                   \
-    const VXformInfo *info, int64_t row_id, const VFixedRowResult *rslt, \
-    uint32_t argc, const VRowData argv [] )                              \
-{                                                                        \
-    uint32_t i;                                                          \
-                                                                         \
-    T *dst = rslt -> base;                                               \
-    const T *a = argv [ 0 ] . u . data . base;                           \
-    const T *b = argv [ 1 ] . u . data . base;                           \
-                                                                         \
-    for ( i = 0, dst += rslt -> first_elem,                              \
-              a += argv [ 0 ] . u . data . first_elem,                   \
-              b += argv [ 1 ] . u . data . first_elem;                   \
-          i < rslt -> elem_count; ++ i )                                 \
-    {                                                                    \
-        dst [ i ] = a [ i ] - b [ i ];                                   \
-    }                                                                    \
-                                                                         \
-    return 0;                                                            \
-}
-
-NO_CONST ( int8_t )
-NO_CONST ( int16_t )
-NO_CONST ( int32_t )
-NO_CONST ( int64_t )
-NO_CONST ( uint8_t )
-NO_CONST ( uint16_t )
-NO_CONST ( uint32_t )
-NO_CONST ( uint64_t )
-NO_CONST ( float )
-NO_CONST ( double )
-
-static VFixedRowFunc no_const_func [] =
-{
-    NO_CONST_NAME ( uint8_t ),
-    NO_CONST_NAME ( uint16_t ),
-    NO_CONST_NAME ( uint32_t ),
-    NO_CONST_NAME ( uint64_t ),
-    NO_CONST_NAME ( int8_t ),
-    NO_CONST_NAME ( int16_t ),
-    NO_CONST_NAME ( int32_t ),
-    NO_CONST_NAME ( int64_t ),
-    NULL,
-    NULL,
-    NO_CONST_NAME ( float ),
-    NO_CONST_NAME ( double )
-};
-
-static
-rc_t CC no_diff ( void *data, const VXformInfo *info,
-    void *dst, const void *src, uint64_t elem_count )
-{
-    memcpy ( dst, src, (size_t)elem_count * VTypedescSizeof ( & info -> fdesc . desc ) >> 3 );
-    return 0;
-}
-
-static
-void CC vxf_diff_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-/* diff
- *  return the difference of inputs
- *
- *  "T" [ TYPE ] - input and output data type
- *  must be member of numeric_set
- *
- *  "k" [ CONST, DEFAULT 0 ] - optional constant
- *  to be added or subtracted
- *
- *  "a" [ DATA ] - left-most operand
- *
- *  "b" [ DATA ] - optional subtractand
- *
- * SYNOPSIS:
- *  incorporates "k" into expression for every row
- *  returns sum or difference of inputs for all rows
- *
- * USAGE:
- *  length of half-closed interval
- *    U32 len = < U32 > diff ( stop, start );
- *  length of fully-closed interval
- *    U32 len = < U32 > diff < -1 > ( stop, start );
- */
-VTRANSFACT_IMPL ( vdb_diff, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    bool has_const;
-    int32_t size_idx;
-    diff_data k;
-
-    /* "T" must be member of numeric_set */
-    switch ( info -> fdesc . desc . domain )
-    {
-    case vtdUint:
-    case vtdInt:
-    case vtdFloat:
-        break;
-    default:
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-    }
-
-    /* TBD - eventually support vector differences
-       for today, check that dim of T is 1 */
-    if ( dp -> argv [ 0 ] . desc . intrinsic_dim != 1 )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-    /* the only numeric types we support are between 8 and 64 bits */
-    size_idx = uint32_lsbit ( dp -> argv [ 0 ] . desc . intrinsic_bits ) - 3;
-    if ( size_idx < 0 || size_idx > 3 || ( ( dp -> argv [ 0 ] . desc . intrinsic_bits &
-                                             ( dp -> argv [ 0 ] . desc . intrinsic_bits - 1 ) ) != 0 ) )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-
-    /* there are 4 variants:
-       1. no constant ( or is 0 ) and single input
-       2. non-zero constant and single input
-       3. no constant ( or is 0 ) and dual input
-       4. non-zero constant and dual input */
-    has_const = false;
-    if ( cp -> argc == 1 ) switch ( cp -> argv [ 0 ] . desc . domain )
-    {
-    case vtdUint:
-    case vtdInt:
-        switch ( cp -> argv [ 0 ] . desc . intrinsic_bits )
-        {
-        case 8:
-            if ( ( k . u8 = cp -> argv [ 0 ] . data . u8 [ 0 ] ) != 0 )
-                has_const = true;
-            break;
-        case 16:
-            if ( ( k . u16 = cp -> argv [ 0 ] . data . u16 [ 0 ] ) != 0 )
-                has_const = true;
-            break;
-        case 32:
-            if ( ( k . u32 = cp -> argv [ 0 ] . data . u32 [ 0 ] ) != 0 )
-                has_const = true;
-            break;
-        case 64:
-            if ( ( k . u64 = cp -> argv [ 0 ] . data . u64 [ 0 ] ) != 0 )
-                has_const = true;
-            break;
-        }
-        break;
-
-    case vtdFloat:
-        switch ( cp -> argv [ 0 ] . desc . intrinsic_bits )
-        {
-        case 32:
-            if ( ( k . f32 = cp -> argv [ 0 ] . data . f32 [ 0 ] ) != 0.0 )
-                has_const = true;
-            break;
-        case 64:
-            if ( ( k . f64 = cp -> argv [ 0 ] . data . f64 [ 0 ] ) != 0.0 )
-                has_const = true;
-            break;
-        }
-        break;
-    }
-
-    if ( has_const )
-    {
-        diff_data *pb = malloc ( sizeof * pb );
-        if ( pb == NULL )
-            return RC ( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-        * pb = k;
-
-        rslt -> self = pb;
-        rslt -> whack = vxf_diff_wrapper;
-
-        if ( dp -> argc > 1 )
-        {
-            rslt -> u . pf = full_diff_func [ ( dp -> argv [ 0 ] . desc . domain - vtdUint ) * 4 + size_idx ];
-            rslt -> variant = vftFixedRow;
-        }
-        else
-        {
-            rslt -> u . af = const_diff_func [ ( dp -> argv [ 0 ] . desc . domain - vtdUint ) * 4 + size_idx ];
-            rslt -> variant = vftArray;
-        }
-    }
-    else
-    {
-        if ( dp -> argc > 1 )
-        {
-            rslt -> u . pf = no_const_func [ ( dp -> argv [ 0 ] . desc . domain - vtdUint ) * 4 + size_idx ];
-            rslt -> variant = vftFixedRow;
-        }
-        else
-        {
-            rslt -> u . af = no_diff;
-            rslt -> variant = vftArray;
-        }
-    }
-
-    return 0;
-}
diff --git a/libs/vxf/echo.c b/libs/vxf/echo.c
deleted file mode 100644
index c8a8938..0000000
--- a/libs/vxf/echo.c
+++ /dev/null
@@ -1,187 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-
-#include <bitstr.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-
-struct self_t {
-    KDataBuffer val;
-    bitsz_t csize;
-    bitsz_t dsize;
-    int count;
-};
-
-static void CC self_free( void *Self ) {
-    struct self_t *self = Self;
-    
-    KDataBufferWhack(&self->val);
-    free(self);
-}
-
-static void fill(struct self_t *self, int start) {
-    int i;
-    
-    for (i = start; i != self->count; ++i)
-        bitcpy(self->val.base, i * self->csize, self->val.base, 0, self->csize);
-}
-
-static rc_t grow_and_fill(struct self_t *self, uint32_t rlen) {
-    bitsz_t rsize = rlen * self->dsize;
-    rc_t rc;
-    
-    if (self->count * self->csize <= rsize) {
-        int old_count = self->count;
-        int new_count = old_count;
-        
-        while (new_count * self->csize <= rsize)
-            new_count <<= 1;
-        
-        rc = KDataBufferResize(&self->val, new_count);
-        if (rc)
-            return rc;
-        
-        self->count = new_count;
-        fill(self, old_count);
-    }
-    return 0;
-}
-
-/* echo
- function < type T > T echo #1.0 < T val > ( any row_len );
- */
-static
-rc_t CC echo_func_1(
-                 void *Self,
-                 const VXformInfo *info,
-                 int64_t row_id,
-                 VRowResult *rslt,
-                 uint32_t argc,
-                 const VRowData argv[]
-) {
-    struct self_t *self = Self;
-    rc_t rc;
-
-    assert(argv[0].u.data.elem_count >> 32 == 0);
-    rc = grow_and_fill(self, (uint32_t)argv[0].u.data.elem_count);
-    if (rc == 0) {
-        KDataBufferWhack(rslt->data);
-        rslt->elem_count = argv[0].u.data.elem_count;
-        rc = KDataBufferSub(&self->val, rslt->data, 0, rslt->elem_count);
-    }
-    return rc;
-}
-
-/* echo
- function < type T > T echo #1.0 < T val > ();
- */
-static
-rc_t CC echo_func_0(
-                 void *Self,
-                 const VXformInfo *info,
-                 int64_t row_id,
-                 VRowResult *rslt,
-                 uint32_t argc,
-                 const VRowData argv[]
-) {
-    struct self_t *self = Self;
-
-    KDataBufferWhack(rslt->data);
-    rslt->elem_count = (uint32_t)( self->csize / self->dsize );
-    return KDataBufferSub(&self->val, rslt->data, 0, rslt->elem_count);
-}
-
-rc_t echo_row_0 ( const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp )
-{
-    rc_t rc;
-    struct self_t *self = malloc ( sizeof *self );
-    if ( self == NULL )
-        return RC(rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted);
-
-    self->dsize = VTypedescSizeof ( & cp->argv[0].desc );
-    self->csize = self->dsize * cp->argv[0].count;
-    self->count = 1;
-
-    rc = KDataBufferMake(&self->val, self->dsize, cp->argv[0].count);
-    if (rc == 0) {
-        bitcpy(self->val.base, 0, cp->argv[0].data.u8, 0, self->csize);
-    
-        rslt->self = self;
-        rslt->whack = self_free;
-        rslt->variant = vftRow;
-        rslt->u.rf = echo_func_0;
-        return 0;
-    }
-    free(self);
-    return rc;
-}
-
-static
-rc_t echo_row_1 ( const VXfactInfo *info, VFuncDesc *rslt,
-    const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    struct self_t *self = malloc ( sizeof *self );
-    if ( self == NULL )
-        return RC ( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-
-    self->dsize = VTypedescSizeof ( & cp->argv[0].desc );
-    self->csize = self->dsize * cp->argv[0].count;
-    self->count = 256;
-
-    rc = KDataBufferMake(&self->val, self->dsize, cp->argv[0].count*self->count);
-    if (rc == 0)
-    {
-        bitcpy(self->val.base, 0, cp->argv[0].data.u8, 0, self->csize);
-        fill(self, 1);
-
-        rslt->self = self;
-        rslt->whack = self_free;
-        rslt->variant = vftRow;
-        rslt->u.rf = echo_func_1;
-        return 0;
-    }
-    free(self);
-    return rc;
-}
-
-VTRANSFACT_IMPL ( vdb_echo, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    if ( dp -> argc == 0 )
-        return echo_row_0 ( info, rslt, cp );
-    return echo_row_1 ( info, rslt, cp, dp );
-}
diff --git a/libs/vxf/entrez.c b/libs/vxf/entrez.c
deleted file mode 100644
index 28fa030..0000000
--- a/libs/vxf/entrez.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <vdb/vdb-priv.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-#include <klib/log.h>
-#include <arch-impl.h>
-#include <kns/url-fetcher.h>
-#include <kns/entrez-fetcher.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-typedef struct entrez_context {
-    KUrlFetcher *url_fetcher;
-    KEntrezFetcher *entrez_fetcher;
-} entrez_context_t;
-
-
-static rc_t init_entrez_context( entrez_context_t * ctx )
-{
-    /* first make the url-fetcher, because 
-       it is neccessary to create the sra-fetcher... */
-    rc_t rc = KUrlFetcherCurlMake( &(ctx->url_fetcher), false );
-    if ( rc == 0 )
-    {
-        /* then make the sra-fetcher, with the url-fetcher as parameter... */
-        rc = KEntrezFetcherMake( &(ctx->entrez_fetcher), ctx->url_fetcher );
-    }
-    return rc;
-}
-
-
-static void CC entrez_context_whack( void *ptr )
-{
-    entrez_context_t * ctx = ( entrez_context_t * )ptr;
-    if ( ctx )
-    {
-        KEntrezFetcherRelease( ctx->entrez_fetcher );
-        KUrlFetcherRelease( ctx->url_fetcher );
-        free( ctx );
-    }
-}
-
-static rc_t vrowdata_get64( const VRowData * src, uint64_t * dst )
-{
-    if ( src->u.data.elem_bits == 64 )
-    {
-        uint64_t * src_ptr = (uint64_t *)src->u.data.base;
-        src_ptr += src->u.data.first_elem;
-        *dst = *src_ptr;
-        return 0;
-    }
-    return RC ( rcXF, rcFunction, rcReading, rcType, rcIncorrect );
-}
-
-static uint32_t vrowdata_get32( const VRowData * src, uint32_t * dst )
-{
-    if ( src->u.data.elem_bits == 32 )
-    {
-        uint32_t * src_ptr = (uint32_t *)src->u.data.base;
-        src_ptr += src->u.data.first_elem;
-        *dst = *src_ptr;
-        return 0;
-    }
-    return RC ( rcXF, rcFunction, rcReading, rcType, rcIncorrect );
-}
-
-const char * entrez_server = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi";
-
-static rc_t CC perform_entrez_fetch ( void *self,
-    const VXformInfo *info, int64_t row_id, VRowResult *rslt,
-    uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc = 0;
-    entrez_context_t * ctx = ( entrez_context_t * )self;
-    if ( ctx == NULL )
-        rc = RC ( rcXF, rcFunction, rcReading, rcSelf, rcNull );
-    else
-    {
-        char * entrez_seq_id = "NC_000001";
-        uint32_t entrez_seq_len = 1024;
-        uint64_t entrez_row_id = 1;
-        uint32_t entrez_row_count = 1;
-        size_t buffsize;
-
-        if ( argc > 0 )
-            rc = vrowdata_get64( &( argv[0] ), &entrez_row_id );
-        if ( rc == 0 )
-        {
-            if ( argc > 1 )
-                rc = vrowdata_get32( &( argv[1] ), &entrez_seq_len );
-            if ( rc == 0 )
-            {
-                /* prepare the Fetcher with all the information it needs,
-                   returns in buffsize the size of the buffer we have to provide */
-                rc = KEntrezFetcherSetup ( ctx->entrez_fetcher,
-                            entrez_server, entrez_seq_id, entrez_seq_len,
-                            entrez_row_id, entrez_row_count, &buffsize );
-                if ( rc == 0 )
-                {
-                    rc = KDataBufferResize( rslt->data, buffsize );
-                    if ( rc == 0 )
-                    {
-                        size_t num_read;
-                        /* perform the fetch-operation directly into the KDatabuffer */
-                        rc = KEntrezFetcherRead ( ctx->entrez_fetcher,
-                                          rslt->data->base,
-                                          buffsize, &num_read );
-                        if ( rc == 0 )
-                        {
-                            rslt->elem_count = num_read;
-                            rslt->elem_bits = 8;
-                        }
-                    }
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-VTRANSFACT_IMPL ( vdb_entrez, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    entrez_context_t *ctx = malloc ( sizeof( *ctx ) );
-    if ( ctx == NULL )
-        rc = RC ( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-        rc = init_entrez_context( ctx );
-        if ( rc == 0 )
-        {
-            rslt -> self = ctx;
-            rslt -> whack = entrez_context_whack;
-            rslt -> u . rf = perform_entrez_fetch;
-            rslt -> variant = vftRow;
-        }
-    }
-    return rc;
-}
diff --git a/libs/vxf/exists.c b/libs/vxf/exists.c
deleted file mode 100644
index b0b6b6c..0000000
--- a/libs/vxf/exists.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-#include <bitstr.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-
-struct self_t {
-    KDataBuffer val;
-    bitsz_t csize;
-    bitsz_t dsize;
-    int count;
-};
-
-static void CC self_free( void *Self ) {
-    struct self_t *self = Self;
-    
-    KDataBufferWhack(&self->val);
-    free(self);
-}
-
-static void fill(struct self_t *self, int start) {
-    int i;
-    
-    for (i = start; i != self->count; ++i)
-        bitcpy(self->val.base, 0, self->val.base, i * self->csize, self->csize);
-}
-
-static rc_t grow_and_fill(struct self_t *self, int rlen) {
-    bitsz_t rsize = rlen * self->dsize;
-    rc_t rc;
-    
-    if (self->count * self->csize <= rsize) {
-        int old_count = self->count;
-        int new_count = old_count;
-        
-        while (new_count * self->csize <= rsize)
-            new_count <<= 1;
-        
-        rc = KDataBufferResize(&self->val, new_count);
-        if (rc)
-            return rc;
-        
-        self->count = new_count;
-        fill(self, old_count);
-    }
-    return 0;
-}
-
-/* exists
- function < type T > T exits #1.0 < T val > ( any predicate, any row_len );
- */
-static
-rc_t CC exists_func_1(
-                 void *Self,
-                 const VXformInfo *info,
-                 int64_t row_id,
-                 VRowResult *rslt,
-                 uint32_t argc,
-                 const VRowData argv[]
-) {
-    struct self_t *self = Self;
-    rc_t rc = grow_and_fill(self, argv[1].u.data.elem_count);
-    
-    if (rc == 0) {
-        KDataBufferWhack(rslt->data);
-        rslt->elem_count = argv[1].u.data.elem_count;
-        rc = KDataBufferSub(&self->val, rslt->data, 0, rslt->elem_count);
-    }
-    return rc;
-}
-
-/* exists
- function < type T > T exists #1.0 < T val > ( any predicate );
- */
-static
-rc_t CC exists_func_0(
-                 void *Self,
-                 const VXformInfo *info,
-                 int64_t row_id,
-                 VRowResult *rslt,
-                 uint32_t argc,
-                 const VRowData argv[]
-) {
-    struct self_t *self = Self;
-
-    KDataBufferWhack(rslt->data);
-    rslt->elem_count = (uint32_t)( self->csize / self->dsize );
-    return KDataBufferSub(&self->val, rslt->data, 0, rslt->elem_count);
-}
-
-rc_t exists_row_0 ( const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp )
-{
-    rc_t rc;
-    struct self_t *self = malloc ( sizeof *self );
-    if ( self == NULL )
-        return RC(rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted);
-
-    self->dsize = VTypedescSizeof ( & cp->argv[0].desc );
-    self->csize = self->dsize * cp->argv[0].count;
-    self->count = 1;
-
-    rc = KDataBufferMake(&self->val, self->dsize, cp->argv[0].count);
-    if (rc == 0) {
-        bitcpy(self->val.base, 0, cp->argv[0].data.u8, 0, self->csize);
-    
-        rslt->self = self;
-        rslt->whack = self_free;
-        rslt->variant = vftRow;
-        rslt->u.rf = exists_func_0;
-        return 0;
-    }
-    free(self);
-    return rc;
-}
-
-static
-rc_t exists_row_1 ( const VXfactInfo *info, VFuncDesc *rslt,
-    const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    struct self_t *self = malloc ( sizeof *self );
-    if ( self == NULL )
-        return RC ( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-
-    self->dsize = VTypedescSizeof ( & cp->argv[0].desc );
-    self->csize = self->dsize * cp->argv[0].count;
-    self->count = 256;
-
-    rc = KDataBufferMake(&self->val, self->dsize, cp->argv[0].count*self->count);
-    if (rc == 0)
-    {
-        bitcpy(self->val.base, 0, cp->argv[0].data.u8, 0, self->csize);
-        fill(self, 1);
-
-        rslt->self = self;
-        rslt->whack = self_free;
-        rslt->variant = vftRow;
-        rslt->u.rf = exists_func_1;
-        return 0;
-    }
-    free(self);
-    return rc;
-}
-
-/* exists
- *  returns constant or dynamic value if predicate input exists
- *
- *  "T" [ TYPE ] - type of data to return
- *
- *  "cval" [ CONST, OPTIONAL ] - a data constant. when present,
- *  the function will behave like "echo" ( see below )
- *
- *  "predicate" [ DATA ] - an input whose existence determines
- *  whether the function will operate or not.
- *
- *  "dval" [ DATA, OPTIONAL ] - data value, either passed through
- *  or used to determine a repeat count of "cval" ( see below )
- *
- * USAGE:
- *  when "cval" is omitted, "dval" must be present and will be
- *  passed through depending upon the existence of "predicate"
- *    U8 count = < U8 > exists ( col, count2 );
- *
- *  when "cval" is present, "dval" may be omitted, and "cval" will
- *  be passed through just like echo depending upon "predicate"
- *   U8 count = < U8 > exists < 2 > ( col2 ) | < U8 > echo < 1 > ();
- *
- *  when "cval" and "dval" are both present, the behavior is
- *  like echo, but gated with "predicate"
- *    ascii poly = < ascii > exists < 'a' > ( col, repeat );
- *
-function < type T > T exists #1.0 < * T cval > ( any predicate, * T dval ) = vdb:exists;
-*/
-VTRANSFACT_IMPL ( vdb_exists, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    if ( dp -> argc == 1 )
-        return exists_row_0 ( info, rslt, cp );
-    return exists_row_1 ( info, rslt, cp, dp );
-}
diff --git a/libs/vxf/extract_token.c b/libs/vxf/extract_token.c
deleted file mode 100644
index 98d8e28..0000000
--- a/libs/vxf/extract_token.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <string.h>
-#include <assert.h>
-
-
-typedef uint16_t text_token;
-enum { tt_id, tt_start, tt_len };
-
-
-/* extract_token
- *  extract a textual token from an input string
- *
- *  "idx" [ CONST ] - a zero-based index of the token
- *  if value < row_len ( tok ), then the substring of
- *  indexed token is returned. otherwise, returns empty.
- *
- *  "str" [ DATA ] - input text. type must be compatible with
- *  output production, meaning types must be same, or ascii input
- *  with utf8 output.
- *
- *  "tok" [ DATA ] - results of tokenizing "str"
- */
-static
-rc_t CC extract_token ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    KDataBuffer *dst = rslt -> data;
-    uint32_t idx = ( uint32_t ) ( size_t ) data;
-
-    rslt -> elem_count = 0;
-    if ( ( uint64_t ) idx >= argv [ 1 ] . u . data . elem_count )
-    {
-        /* issue empty string */
-        rc = KDataBufferResize ( dst, 0 );
-    }
-    else
-    {
-        size_t sub_bytes, elem_bytes = ( size_t ) ( argv [ 0 ] . u . data . elem_bits >> 3 );
-        const char *str = argv [ 0 ] . u . data . base;
-        const text_token *tok = argv [ 1 ] . u . data . base;
-
-        str += argv [ 0 ] . u . data . first_elem * elem_bytes;
-        tok += ( argv [ 1 ] . u . data . first_elem + idx ) * 3;
-        sub_bytes = elem_bytes * tok [ tt_len ];
-
-        /* set output buffer size */
-        KDataBufferCast ( dst, dst, rslt -> elem_bits, true );
-        rc = KDataBufferResize ( dst, tok [ tt_len ] );
-        if ( rc == 0 )
-        {
-            /* copy substring */
-            rslt -> elem_count = tok [ tt_len ];
-            memcpy ( dst -> base, & str [ elem_bytes * tok [ tt_start ] ], sub_bytes );
-        }
-    }
-
-    return rc;
-}
-
-VTRANSFACT_IMPL ( vdb_extract_token, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    /* ensure that the type of input is either identical to
-       or compatible with the output */
-    if ( ! VTypedeclToTypedecl ( & dp -> argv [ 0 ] . fd . td, info -> schema, & info -> fdesc . fd . td, NULL, NULL ) )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcInconsistent );
-
-    rslt -> self = ( void* ) ( size_t ) cp -> argv [ 0 ] . data . u32 [ 0 ];
-    rslt -> variant = vftRow;
-    rslt -> u . rf = extract_token;
-    return 0;
-}
diff --git a/libs/vxf/floor.c b/libs/vxf/floor.c
deleted file mode 100644
index 2fe5aff..0000000
--- a/libs/vxf/floor.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <math.h>
-#include <assert.h>
-
-#define FLOAT_FUNC floorf
-#define DOUBLE_FUNC floor
-#include "math-funcs-impl.h"
-
-/*
- function < type T >
- T vdb:floor #1.0 ( T in );
- */
-VTRANSFACT_IMPL(vdb_floor, 1, 0, 0) (const void *self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp ) {
-    return factory(self, info, rslt, cp, dp);
-}
diff --git a/libs/vxf/fsplit-join.impl.h b/libs/vxf/fsplit-join.impl.h
deleted file mode 100644
index 1688723..0000000
--- a/libs/vxf/fsplit-join.impl.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <stdint.h>
-#include <float.h>
-#include <math.h>
-
-#if ENCODING
-static unsigned split_and_pack_f32(const float src[], uint32_t n, unsigned m, uint8_t *pexp) {
-    const uint32_t mask = ~(0x007FFFFF >> (m - 1));
-    uint32_t i; /* src & exponent index */
-    uint32_t j; /* mantissa byte offset */
-    uint32_t breg = 0;
-    int inreg = 0;
-    uint8_t *pman = pexp + n;
-    
-    for (i = 0, j = 0; i != n; ++i) {
-        float f = src[i];
-        uint32_t man;
-        int exp;
-        int sgn = 0;
-        
-        if (f == 0.0) {
-            exp = 0;
-            man = 0;
-        }
-        else {
-            if (f < 0.0) {
-                sgn = 1;
-                f = -f;
-            }
-            man = (uint32_t)ldexpf(frexpf(f, &exp), 24);
-            man &= mask;
-#if ROUND_TO_NEAREST
-            {
-                float fl = ldexpf(man, exp - 24);
-                float fh = ldexpf(man + (mask & ~(mask << 1)), exp - 24);
-                
-                if (fh - f < f - fl) {
-                    man = (uint32_t)ldexpf(frexpf(fh, &exp), 24);
-                    man &= mask;
-                }
-            }
-#endif
-            exp += 127;
-            man &= 0x7FFFFF;
-            if (sgn)
-                man |= 0x800000;
-            man >>= (24 - m);
-        }
-        pexp[i] = exp;
-        if (inreg + m < 32) {
-            breg = (breg << m) | man;
-            inreg += m;
-        }
-        else {
-            const int n = 32 - inreg;
-            inreg = m - n;
-            breg = (breg << n) | (man >> inreg);
-            
-            pman[j + 0] = breg >> 24;
-            pman[j + 1] = breg >> 16;
-            pman[j + 2] = breg >>  8;
-            pman[j + 3] = breg >>  0;
-            j += 4;
-            
-            breg = man;
-        }
-    }
-    breg <<= 32 - inreg;
-    while (inreg > 0) {
-        pman[j] = breg >> 24;
-        breg <<= 8;
-        ++j;
-        inreg -= 8;
-    }
-    return j;
-}
-#endif /* ENCODING */
-
-#if DECODING
-static void unpack_and_join_f32(const uint8_t src[], uint32_t n, unsigned m, float dst[]) {
-    uint32_t i;
-    uint32_t j;
-    uint32_t breg;
-    uint32_t inreg;
-    
-    for (i = 0, j = n, breg = 0, inreg = 0; i != n; ) {
-        if (inreg >= m) {
-            const uint32_t man = (((breg >> (inreg - m)) << (24 - m)) & 0x00FFFFFF);
-            const int exp = src[i];
-            
-            if (exp != 0 || man != 0) {
-                const float f = ldexpf(man | 0x800000, (exp - 127) - 24);
-                
-                if ((man & 0x800000) != 0)
-                    dst[i] = -f;
-                else
-                    dst[i] = f;
-            }
-            else
-                dst[i] = 0.0;
-            inreg -= m;
-            ++i;
-        }
-        else {
-            breg = (breg << 8) | src[j];
-            inreg += 8;
-            ++j;
-        }
-    }
-}
-#endif /* DECODING */
diff --git a/libs/vxf/funzip.c b/libs/vxf/funzip.c
deleted file mode 100644
index 3559eab..0000000
--- a/libs/vxf/funzip.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/data-buffer.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <zlib.h>
-#include <assert.h>
-
-#define DECODING 1
-#include "fsplit-join.impl.h"
-
-static rc_t invoke_zlib(void *dst, uint32_t dsize, uint32_t *psize, const void *src, uint32_t ssize) {
-    z_stream s;
-    int zr;
-    rc_t rc;
-    
-    memset(&s, 0, sizeof(s));
-    s.next_in = (void *)src;
-    s.avail_in = ssize;
-    s.next_out = dst;
-    s.avail_out = dsize;
-    
-    *psize = 0;
-    zr = inflateInit2(&s, -15);
-    switch (zr) {
-    case 0:
-        break;
-    case Z_MEM_ERROR:
-        return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    default:
-        return RC(rcXF, rcFunction, rcExecuting, rcNoObj, rcUnexpected);
-    }
-    zr = inflate(&s, Z_FINISH);
-    switch (zr) {
-    case Z_STREAM_END:
-        assert(s.total_out <= UINT32_MAX);
-        *psize = (uint32_t)s.total_out;
-        rc = 0;
-        break;
-    case Z_OK:
-        rc = RC(rcXF, rcFunction, rcExecuting, rcMemory, rcInsufficient);
-        break;
-    case Z_BUF_ERROR:
-    case Z_NEED_DICT:
-    case Z_DATA_ERROR:
-        rc = RC(rcXF, rcFunction, rcExecuting, rcData, rcCorrupt);
-        break;
-    case Z_MEM_ERROR:
-        rc = RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-        break;
-    default:
-        rc = RC(rcXF, rcFunction, rcExecuting, rcNoObj, rcUnexpected);
-        break;
-    }
-    zr = inflateEnd(&s);
-    switch (zr) {
-    case Z_OK:
-        return rc;
-    default:
-        if (rc == 0)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcCorrupt);
-        return rc;
-    }
-}
-
-static
-rc_t f32unzip_func_v0(
-                   const VXformInfo *info,
-                   VBlobResult *Dst,
-                   const VBlobData *src,
-                   const VBlobHeader *hdr
-) {
-    rc_t rc;
-    uint8_t mantissa;
-    int64_t val;
-    float *dst = Dst->data;
-    uint32_t elem_count;
-    const bitsz_t dbits = Dst->elem_count * Dst->elem_bits;
-    KDataBuffer scratch;
-    
-    rc = KDataBufferMakeBytes(&scratch, (dbits + 7) >> 3);
-    if (rc == 0) {
-        assert(scratch.elem_count >> 32 == 0);
-        rc = invoke_zlib(scratch.base, (uint32_t)scratch.elem_count, &elem_count,
-                         src->data, ((size_t)src->elem_count * src->elem_bits + 7) >> 3);
-        if (rc == 0) {
-            scratch.elem_count = elem_count;
-            
-            VBlobHeaderArgPopHead(hdr, &val);
-            mantissa = (uint8_t)val;
-            
-            elem_count = (uint32_t)((8 * (size_t)scratch.elem_count) / (8 + mantissa));
-            if ((size_t)elem_count * 32 > dbits)
-                rc = RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-            else {
-                Dst->elem_bits = 32;
-                Dst->elem_count = elem_count;
-                Dst->byte_order = vboNative;
-                
-                unpack_and_join_f32(scratch.base, elem_count, mantissa, dst);
-            }
-        }
-    }
-    KDataBufferWhack(&scratch);
-    return rc;
-}
-
-static
-rc_t CC f32unzip_func(
-                void *Self,
-                const VXformInfo *info,
-                VBlobResult *dst,
-                const VBlobData *src,
-                VBlobHeader *hdr
-) {
-    uint8_t bits;
-    
-    switch (VBlobHeaderVersion(hdr)) {
-    case 0:
-        VBlobHeaderOpPopHead(hdr, &bits);
-        switch (bits) {
-        case 0:
-            return f32unzip_func_v0(info, dst, src, hdr);
-        }
-        return RC(rcXF, rcFunction, rcExecuting, rcParam, rcUnexpected);
-    default:
-        return RC(rcXF, rcFunction, rcExecuting, rcParam, rcBadVersion);
-    }
-}
-
-/* unzip
- function
- fzip_set funzip #1.0 ( fzip_fmt in );
- */
-VTRANSFACT_IMPL(vdb_funzip, 1, 0, 0) (const void *self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftBlob;
-    rslt->u.bf = f32unzip_func;
-
-    return 0;
-}
diff --git a/libs/vxf/fzip.c b/libs/vxf/fzip.c
deleted file mode 100644
index 784bec2..0000000
--- a/libs/vxf/fzip.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/data-buffer.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <zlib.h>
-
-#include <assert.h>
-
-#define ROUND_TO_NEAREST 1
-#define ENCODING 1
-#include "fsplit-join.impl.h"
-
-struct self_t {
-    int32_t mantissa;
-};
-
-static rc_t invoke_zlib(void *dst, uint64_t *dsize, const void *src, uint32_t ssize, int32_t strategy, int32_t level) {
-    z_stream s;
-    int zr;
-    rc_t rc = 0;
-    
-    memset(&s, 0, sizeof(s));
-    s.next_in = (void *)src;
-    s.avail_in = ssize;
-    s.next_out = dst;
-    s.avail_out = (uInt)*dsize;
-    
-    *dsize = 0;
-    zr = deflateInit2(&s, level, Z_DEFLATED, -15, 9, strategy);
-    switch (zr) {
-        case 0:
-            break;
-        case Z_MEM_ERROR:
-            return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-        case Z_STREAM_ERROR:
-            return RC(rcXF, rcFunction, rcExecuting, rcParam, rcInvalid);
-        default:
-            return RC(rcXF, rcFunction, rcExecuting, rcSelf, rcUnexpected);
-    }
-    zr = deflate(&s, Z_FINISH);
-    switch (zr) {
-        case Z_STREAM_END:
-            break;
-        case Z_OK:
-            s.total_out = 0;
-            break;
-        default:
-            rc = RC(rcXF, rcFunction, rcExecuting, rcSelf, rcUnexpected);
-            break;
-    }
-    zr = deflateEnd(&s);
-    if (zr != Z_OK)
-        rc = RC(rcXF, rcFunction, rcExecuting, rcSelf, rcUnexpected);
-    if (rc == 0) {
-        assert(s.total_out <= UINT32_MAX);
-        *dsize = (uint32_t)s.total_out;
-    }
-    return rc;
-}
-
-static
-rc_t CC f32zip_func(
-              void *Self,
-              const VXformInfo *info,
-              VBlobResult *dst,
-              const VBlobData *Src,
-              VBlobHeader *hdr
-) {
-    rc_t rc;
-    const struct self_t *self = Self;
-    uint64_t dsize = (dst->elem_count * dst->elem_bits + 7) >> 3;
-    uint64_t element_count = (Src->elem_count * Src->elem_bits) >> 5;
-    uint64_t man_bytes;
-    KDataBuffer scratch;
-    
-    assert(element_count >> 32 == 0);
-    assert(dsize >> 32 == 0);
-    rc = KDataBufferMakeBytes(&scratch, element_count << 2);
-    if (rc)
-        return rc;
-    
-    VBlobHeaderSetVersion(hdr, 0);
-    VBlobHeaderOpPushTail(hdr, 0);
-    VBlobHeaderArgPushTail(hdr, self->mantissa);
-    
-    man_bytes = split_and_pack_f32(
-                                   Src->data, (uint32_t)element_count,
-                                   self->mantissa,
-                                   scratch.base);
-    assert((element_count + man_bytes) >> 32 == 0);
-    rc = invoke_zlib(dst->data, &dsize, scratch.base, (uint32_t)(element_count + man_bytes), Z_RLE, Z_BEST_SPEED);
-    KDataBufferWhack(&scratch);
-    if (rc == 0) {
-        dst->elem_bits = 1;
-        dst->byte_order = vboNone;
-        if (dsize)
-            dst->elem_count = dsize << 3;
-        else
-            rc = RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-    }
-    return rc;
-}
-
-static
-void CC vxf_fzip_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-/* vdb:fzip
- * function fzip_fmt vdb:fzip #1.0 < U32 mantissa > ( fzip_set in );
- */
-VTRANSFACT_IMPL(vdb_fzip, 1, 0, 0) (const void *self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    struct self_t *ctx;
-    uint32_t mantissa = 0;
-
-    assert(cp->argc == 1);
-    
-    mantissa = cp->argv[0].data.u32[0];
-    if (1 > mantissa || mantissa > 24)
-        return RC(rcXF, rcFunction, rcConstructing, rcParam, rcInvalid);
-    
-    ctx = malloc(sizeof(*ctx));
-    if (ctx) {
-        ctx->mantissa = mantissa;
-       
-        rslt->self = ctx;
-        rslt->whack = vxf_fzip_wrapper;
-        rslt->variant = vftBlob;
-        rslt->u.bf = f32zip_func;
-        
-        return 0;
-    }
-    return RC(rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted);
-}
diff --git a/libs/vxf/integral.c b/libs/vxf/integral.c
deleted file mode 100644
index e1ec6ec..0000000
--- a/libs/vxf/integral.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <arch-impl.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-
-#define INTEGRAL_NAME( T )  integral_ ## T
-#define INTEGRAL( T )                                                    \
-static                                                                   \
-rc_t CC INTEGRAL_NAME ( T ) ( void *data,                                \
-    const VXformInfo *info, int64_t row_id, const VFixedRowResult *rslt, \
-    uint32_t argc, const VRowData argv [] )                              \
-{                                                                        \
-    uint32_t i;                                                          \
-    T prior, * dst = rslt -> base;                                       \
-    const T * src = argv [ 0 ] . u . data . base;                        \
-    dst += rslt -> first_elem;						                     \
-    src += argv [ 0 ] . u . data . first_elem;				             \
-    for ( prior = 0, i = 0; i < rslt -> elem_count; ++ i )               \
-    {                                                                    \
-        prior += src [ i ];                                              \
-        dst [ i ] = prior;                                               \
-    }                                                                    \
-    return 0;                                                            \
-}
-
-INTEGRAL ( int8_t )
-INTEGRAL ( int16_t )
-INTEGRAL ( int32_t )
-INTEGRAL ( int64_t )
-
-static VFixedRowFunc integral_func [] =
-{
-    INTEGRAL_NAME ( int8_t  ),
-    INTEGRAL_NAME ( int16_t ),
-    INTEGRAL_NAME ( int32_t ),
-    INTEGRAL_NAME ( int64_t )
-};
-/* integral
- *  return the 1 integral of input
- *
- *  "T" [ TYPE ] - input and output data type
- *  must be member of  signed integers
- *
- *  "a" [ DATA ] - operand
- *
- *
- * SYNOPSIS:
- *  return 1st integral for every row
- *
- * USAGE:
- *    I32 position = < I32 > integral ( pos_1st_d );
- */
-VTRANSFACT_IMPL ( vdb_integral, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    int size_idx;
-    switch ( info -> fdesc . desc . domain )
-    {
-    case vtdUint:
-    case vtdInt:
-        break;
-    default:
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-    }
-
-    /* TBD - eventually support vector integrals
-       for today, check that dim of T is 1 */
-    if ( dp -> argv [ 0 ] . desc . intrinsic_dim != 1 )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-    /* the only numeric types we support are between 8 and 64 bits */
-    size_idx = uint32_lsbit ( dp -> argv [ 0 ] . desc . intrinsic_bits ) - 3;
-    if ( size_idx < 0 || size_idx > 3 || ( ( dp -> argv [ 0 ] . desc . intrinsic_bits &
-                                             ( dp -> argv [ 0 ] . desc . intrinsic_bits - 1 ) ) != 0 ) )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-
-    rslt -> u . pf = integral_func [ size_idx ];
-    rslt -> variant = vftFixedRow;
-
-    return 0;
-}
diff --git a/libs/vxf/integral_0.c b/libs/vxf/integral_0.c
deleted file mode 100644
index c831c95..0000000
--- a/libs/vxf/integral_0.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <arch-impl.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-
-#define INTEGRAL_NAME( T )  integral_ ## T
-#define INTEGRAL( T )                                                    \
-static                                                                   \
-rc_t CC INTEGRAL_NAME ( T ) ( void *data,                                \
-    const VXformInfo *info, int64_t row_id, const VFixedRowResult *rslt, \
-    uint32_t argc, const VRowData argv [] )                              \
-{                                                                        \
-    uint32_t i;                                                          \
-    T prior, * dst = rslt -> base;                                       \
-    const T * src = argv [ 0 ] . u . data . base;                        \
-    dst += rslt -> first_elem;						                     \
-    src += argv [ 0 ] . u . data . first_elem;				             \
-    for ( prior = 0, i = 0; i < rslt -> elem_count; ++ i )               \
-    {                                                                    \
-        dst [ i ] = prior;                                               \
-        prior += src [ i ];                                              \
-    }                                                                    \
-    return 0;                                                            \
-}
-
-INTEGRAL ( int8_t )
-INTEGRAL ( int16_t )
-INTEGRAL ( int32_t )
-INTEGRAL ( int64_t )
-
-static VFixedRowFunc integral0_func [] =
-{
-    INTEGRAL_NAME ( int8_t  ),
-    INTEGRAL_NAME ( int16_t ),
-    INTEGRAL_NAME ( int32_t ),
-    INTEGRAL_NAME ( int64_t )
-};
-/* integral
- *  return the 1 integral of input
- *
- *  "T" [ TYPE ] - input and output data type
- *  must be member of  signed integers
- *
- *  "a" [ DATA ] - operand
- *
- *
- * SYNOPSIS:
- *  return 1st integral for every row
- *
- * USAGE:
- *    I32 position = < I32 > integral_0 ( pos_1st_d );
- */
-VTRANSFACT_IMPL ( vdb_integral_0, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    int size_idx;
-    switch ( info -> fdesc . desc . domain )
-    {
-    case vtdUint:
-    case vtdInt:
-        break;
-    default:
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-    }
-
-    /* TBD - eventually support vector integrals
-       for today, check that dim of T is 1 */
-    if ( dp -> argv [ 0 ] . desc . intrinsic_dim != 1 )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-    /* the only numeric types we support are between 8 and 64 bits */
-    size_idx = uint32_lsbit ( dp -> argv [ 0 ] . desc . intrinsic_bits ) - 3;
-    if ( size_idx < 0 || size_idx > 3 || ( ( dp -> argv [ 0 ] . desc . intrinsic_bits &
-                                             ( dp -> argv [ 0 ] . desc . intrinsic_bits - 1 ) ) != 0 ) )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-
-    rslt -> u . pf = integral0_func [ size_idx ];
-    rslt -> variant = vftFixedRow;
-
-    return 0;
-}
diff --git a/libs/vxf/irzip.c b/libs/vxf/irzip.c
deleted file mode 100644
index 2ef4995..0000000
--- a/libs/vxf/irzip.c
+++ /dev/null
@@ -1,564 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <compiler.h>
-#include <klib/sort.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-
-#include <byteswap.h>
-#include <os-native.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <float.h>
-#include <limits.h>
-#include <math.h>
-
-#include <zlib.h>
-
-#include <stdio.h>
-#include <assert.h>
-
-typedef struct {
-    size_t size;
-    size_t used;
-    void *buf;
-} szbuf;
-
-static rc_t zlib_compress(szbuf *dst, const void *src, size_t ssize, int32_t strategy, int32_t level) {
-    z_stream s;
-    int zr;
-    rc_t rc = 0;
-    
-    memset(&s, 0, sizeof(s));
-    s.next_in = (void *)src;
-    s.avail_in = (uInt)ssize;
-    s.next_out = dst->buf;
-    s.avail_out = (uInt)dst->size;
-    
-    dst->used = 0;
-    
-    zr = deflateInit2(&s, level, Z_DEFLATED, -15, 9, strategy);
-    switch (zr) {
-    case 0:
-        break;
-    case Z_MEM_ERROR:
-        return RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    case Z_STREAM_ERROR:
-        return RC(rcVDB, rcFunction, rcExecuting, rcParam, rcInvalid);
-    default:
-        return RC(rcVDB, rcFunction, rcExecuting, rcSelf, rcUnexpected);
-    }
-    zr = deflate(&s, Z_FINISH);
-    switch (zr) {
-    case Z_STREAM_END:
-        break;
-    case Z_OK:
-        s.total_out = 0;
-        break;
-    default:
-        rc = RC(rcVDB, rcFunction, rcExecuting, rcSelf, rcUnexpected);
-        break;
-    }
-    zr = deflateEnd(&s);
-    if (zr != Z_OK)
-        rc = RC(rcVDB, rcFunction, rcExecuting, rcSelf, rcUnexpected);
-    if (rc == 0) {
-        dst->used = (uint32_t)s.total_out;
-    }
-    return rc;
-}
-
-static rc_t zlib_decompress(void *dst, size_t dsize, size_t *psize, const void *src, size_t ssize) {
-    z_stream s;
-    int zr;
-    rc_t rc;
-    
-    memset(&s, 0, sizeof(s));
-    s.next_in = (void *)src;
-    s.avail_in = (uInt)ssize;
-    s.next_out = dst;
-    s.avail_out = (uInt)dsize;
-    
-    zr = inflateInit2(&s, -15);
-    switch (zr) {
-    case 0:
-        break;
-    case Z_MEM_ERROR:
-        return RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    default:
-        return RC(rcVDB, rcFunction, rcExecuting, rcNoObj, rcUnexpected);
-    }
-    zr = inflate(&s, Z_FINISH);
-    switch (zr) {
-    case Z_STREAM_END:
-    case Z_OK:
-        *psize = s.total_in;
-        rc = 0;
-        break;
-    case Z_BUF_ERROR:
-    case Z_NEED_DICT:
-    case Z_DATA_ERROR:
-        rc = RC(rcVDB, rcFunction, rcExecuting, rcData, rcCorrupt);
-        break;
-    case Z_MEM_ERROR:
-        rc = RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-        break;
-    default:
-        rc = RC(rcVDB, rcFunction, rcExecuting, rcNoObj, rcUnexpected);
-        break;
-    }
-    if (inflateEnd(&s) == Z_OK) return rc;
-    
-    return rc == 0 ? RC(rcVDB, rcFunction, rcExecuting, rcData, rcCorrupt) : rc;
-}
-
-
-#define STYPE int8_t
-#define USTYPE uint8_t
-#define ENCODE encode_i8
-#define DECODE decode_i8
-#include "irzip.impl.h"
-#undef ENCODE
-#undef DECODE
-#undef STYPE
-#undef USTYPE
-
-#define STYPE int16_t
-#define USTYPE uint16_t
-#define ENCODE encode_i16
-#define DECODE decode_i16
-#include "irzip.impl.h"
-#undef ENCODE
-#undef DECODE
-#undef STYPE
-#undef USTYPE
-
-#define STYPE int32_t
-#define USTYPE uint32_t
-#define ENCODE encode_i32
-#define DECODE decode_i32
-#define TRY2SERIES 1
-#include "irzip.impl.h"
-#undef TRY2SERIES
-#undef ENCODE
-#undef DECODE
-#undef STYPE
-#undef USTYPE
-
-#define STYPE int64_t
-#define USTYPE uint64_t
-#define ENCODE encode_i64
-#define DECODE decode_i64
-#define TRY2SERIES 1
-#include "irzip.impl.h"
-#undef TRY2SERIES
-#undef ENCODE
-#undef DECODE
-#undef STYPE
-#undef USTYPE
-
-#define STYPE uint8_t
-#define USTYPE uint8_t
-#define ENCODE encode_u8
-#define DECODE decode_u8
-#include "irzip.impl.h"
-#undef ENCODE
-#undef DECODE
-#undef STYPE
-#undef USTYPE
-
-#define STYPE uint16_t
-#define USTYPE uint16_t
-#define ENCODE encode_u16
-#define DECODE decode_u16
-#include "irzip.impl.h"
-#undef ENCODE
-#undef DECODE
-#undef STYPE
-#undef USTYPE
-
-#define STYPE uint32_t
-#define USTYPE uint32_t
-#define ENCODE encode_u32
-#define DECODE decode_u32
-#define TRY2SERIES 1
-#include "irzip.impl.h"
-#undef TRY2SERIES
-#undef ENCODE
-#undef DECODE
-#undef STYPE
-#undef USTYPE
-
-#define STYPE uint64_t
-#define USTYPE uint64_t
-#define ENCODE encode_u64
-#define DECODE decode_u64
-#define TRY2SERIES 1
-#include "irzip.impl.h"
-#undef TRY2SERIES
-#undef ENCODE
-#undef DECODE
-#undef STYPE
-#undef USTYPE
-
-
-typedef rc_t (*encode_f)(uint8_t dst[], size_t dsize, size_t *used,
-                         int64_t *Min, int64_t *Slope, uint8_t *series_count,uint8_t *planes, const void *Y, unsigned N);
-
-struct self_t {
-    encode_f f;
-};
-
-static
-struct self_t selfs[8] = {
-    { (encode_f)encode_u8 },
-    { (encode_f)encode_i8 },
-    { (encode_f)encode_u16 },
-    { (encode_f)encode_i16 },
-    { (encode_f)encode_u32 },
-    { (encode_f)encode_i32 },
-    { (encode_f)encode_u64 },
-    { (encode_f)encode_i64 },
-};
-
-
-
-static
-rc_t CC irzip(
-               void *Self,
-               const VXformInfo *info,
-               VBlobResult *dst,
-               const VBlobData *src,
-               VBlobHeader *hdr
-) {
-    rc_t rc = 0;
-    const struct self_t *self = Self;
-    size_t dsize;
-    int64_t min[2],slope[2];
-    uint8_t planes;
-    uint8_t series_count = 1;
-
-    assert(src->elem_count >> 32 == 0);
-    assert(((dst->elem_count * dst->elem_bits + 7) >> 3) >> 32 == 0);
-    dsize = (uint32_t)((dst->elem_count * dst->elem_bits + 7) >> 3);
-    
-   
-    rc = self->f(dst->data, dsize, &dsize, min, slope, &series_count, &planes, src->data, (unsigned)src->elem_count);
-#if 0
-    if(/*src->elem_bits ==64 &&*/ dsize > 0){
-	printf("%2d:irzip_elem_bits=%.8f\telem=%d\tstart=%ld\tslope=%lx\tplanes=%d\n",(int)src->elem_bits,dsize*8./src->elem_count,(int)src->elem_count,min,slope,planes);
-    }
-#endif
-    
-    VBlobHeaderSetVersion(hdr, (series_count > 1)?3:2);
-    if ( rc == 0 ) {
-	rc = VBlobHeaderOpPushTail(hdr, planes);
-	if ( rc == 0) {
-		rc = VBlobHeaderArgPushTail(hdr, min[0]);
-		if ( rc == 0 ) {
-			rc = VBlobHeaderArgPushTail(hdr, slope[0]);
-			if ( rc == 0 ){
-				if(series_count > 1){
-					rc = VBlobHeaderArgPushTail(hdr, min[1]);
-					if(rc == 0) rc = VBlobHeaderArgPushTail(hdr, slope[1]);
-				}
-				dst->byte_order = vboNative;
-				dst->elem_bits = 1;
-				dst->elem_count = dsize << 3;
-			}
-		}
-	}
-   }
-    return rc;
-}
-
-/* 
- function izip_fmt izip #2.1 ( izip_set in )
- */
-VTRANSFACT_IMPL(vdb_izip, 2, 1, 1) (const void *Self, const VXfactInfo *info,
-                                     VFuncDesc *rslt, const VFactoryParams *cp,
-                                     const VFunctionParams *dp )
-{
-/*
-* 2.1.1: bug fix for #VDB-539, bad conversions in encode_u64
-*/
-
-    if (dp->argc != 1) {
-#if _DEBUGGING
-        fprintf(stderr, "dp->argc = %u != 1\n", dp->argc);
-#endif
-        return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-    }
-
-    rslt->variant = vftBlob;
-    rslt->u.bf = irzip;
-
-    switch (dp->argv[0].desc.domain) {
-    case vtdInt:
-        switch (dp->argv[0].desc.intrinsic_bits) {
-        case 8:
-            rslt->self = &selfs[1];
-            break;
-        case 16:
-            rslt->self = &selfs[3];
-            break;
-        case 32:
-            rslt->self = &selfs[5];
-            break;
-        case 64:
-            rslt->self = &selfs[7];
-            break;
-        default:
-#if _DEBUGGING
-            fprintf(stderr, "intrinsic_bits = %u != (8|16|32|64)\n", dp->argv[0].desc.intrinsic_bits);
-#endif
-            return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            break;
-        }
-        break;
-    case vtdUint:
-        switch (dp->argv[0].desc.intrinsic_bits) {
-        case 8:
-            rslt->self = &selfs[0];
-            break;
-        case 16:
-            rslt->self = &selfs[2];
-            break;
-        case 32:
-            rslt->self = &selfs[4];
-            break;
-        case 64:
-            rslt->self = &selfs[6];
-            break;
-        default:
-#if _DEBUGGING
-            fprintf(stderr, "intrinsic_bits = %u != (8|16|32|64)\n", dp->argv[0].desc.intrinsic_bits);
-#endif
-            return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            break;
-        }
-        break;
-    default:
-#if _DEBUGGING
-        fprintf(stderr, "domain != vtdInt or vtdUint\n");
-#endif
-        return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-    }
-
-    return 0;
-}
-
-typedef rc_t (*decode_f)(void *dst, unsigned N, int64_t* min, int64_t* slope, uint8_t series_count,uint8_t planes, const uint8_t src[], size_t ssize);
-
-static
-decode_f uselfs[8] = {
-    (decode_f)decode_u8,
-    (decode_f)decode_i8,
-    (decode_f)decode_u16,
-    (decode_f)decode_i16,
-    (decode_f)decode_u32,
-    (decode_f)decode_i32,
-    (decode_f)decode_u64,
-    (decode_f)decode_i64,
-};
-
-static
-rc_t iunzip_func_v1(
-                    void *Self,
-                    const VXformInfo *info,
-                    VBlobResult *dst,
-                    const VBlobData *src,
-                    int64_t* min,int64_t* slope,uint8_t series_count,
-                    uint8_t planes
-                    )
-{
-    uint32_t ssize;
-    rc_t rc;
-    
-    assert(dst->elem_count >> 32 == 0);
-    assert(((src->elem_count * src->elem_bits + 7) >> 3) >> 32 == 0);
-    ssize = (uint32_t)((src->elem_count * src->elem_bits + 7) >> 3);
-    
-    dst->byte_order = vboNative;
-    
-    rc = uselfs[(uintptr_t)(Self)](dst->data, (unsigned)dst->elem_count, min, slope, series_count, planes,src->data, ssize);
-    return rc;
-}
-
-extern rc_t CC iunzip_func_v0(
-                              void *Self,
-                              const VXformInfo *info,
-                              VBlobResult *dst,
-                              const VBlobData *src
-                              );
-    
-static
-rc_t CC iunzip(
-            void *Self,
-            const VXformInfo *info,
-            VBlobResult *dst,
-            const VBlobData *src,
-            VBlobHeader *hdr
-            )
-{
-    switch (VBlobHeaderVersion(hdr)) {
-    case 0:
-        return iunzip_func_v0(Self, info, dst, src);
-    case 1: 
-    case 2: 
-    case 3:
-	{
-        int64_t min[2],slope[2];
-        uint8_t planes;
-	uint8_t series_count=1;
-        rc_t rc;
-        
-        rc = VBlobHeaderOpPopHead(hdr, &planes);
-        if (rc == 0) {
-            rc = VBlobHeaderArgPopHead(hdr, min);
-            if (rc == 0) {
-		rc = VBlobHeaderArgPopHead(hdr, slope);
-		if (rc != 0) slope[0] = 0;
-		else {
-			rc = VBlobHeaderArgPopHead(hdr, min + 1);
-			if(rc==0) rc= VBlobHeaderArgPopHead(hdr, slope+1);
-			if(rc==0) series_count=2;
-		}
-                return iunzip_func_v1(Self, info, dst, src, min,slope, series_count, planes);
-            }
-	}
-        return rc;
-    }
-    default:
-        return RC(rcVDB, rcFunction, rcExecuting, rcParam, rcBadVersion);
-    }
-}
-
-/* 
- function izip_set iunzip #2.1 ( izip_fmt in )
- */
-VTRANSFACT_IMPL(vdb_iunzip, 2, 1, 0) (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftBlob;
-    rslt->u.bf = iunzip;
-    
-    switch (info->fdesc.desc.domain) {
-    case vtdInt:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 8:
-            rslt->self = (void *)1;
-            break;
-        case 16:
-            rslt->self = (void *)3;
-            break;
-        case 32:
-            rslt->self = (void *)5;
-            break;
-        case 64:
-            rslt->self = (void *)7;
-            break;
-        default:
-#if _DEBUGGING
-            fprintf(stderr, "intrinsic_bits = %u != (8|16|32|64)\n", info->fdesc.desc.intrinsic_bits);
-#endif
-            return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            break;
-        }
-        break;
-    case vtdUint:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 8:
-            rslt->self = (void *)0;
-            break;
-        case 16:
-            rslt->self = (void *)2;
-            break;
-        case 32:
-            rslt->self = (void *)4;
-            break;
-        case 64:
-            rslt->self = (void *)6;
-            break;
-        default:
-#if _DEBUGGING
-            fprintf(stderr, "intrinsic_bits = %u != (8|16|32|64)\n", info->fdesc.desc.intrinsic_bits);
-#endif
-            return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            break;
-        }
-        break;
-    default:
-#if _DEBUGGING
-        fprintf(stderr, "domain != vtdInt or vtdUint\n");
-#endif
-        return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-    }
-    return 0;
-}
-
-#if TESTING
-int test_encode(const int32_t Y[], unsigned N) {
-    uint8_t *dst;
-    size_t dsize;
-    size_t temp;
-    rc_t rc = 0;
-    int64_t min,slope;
-    uint8_t planes;
-    
-    temp = N * sizeof(Y[0]);
-    assert(temp >> 32 == 0);
-    dst = malloc(dsize = (unsigned)temp);
-    if (dst == NULL)
-        return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-
-    rc = encode_i32(dst, dsize, &dsize, &min, &slope, &planes, Y, N);
-    
-    {
-        int32_t *X;
-        
-        X = malloc(N * sizeof(Y[0]));
-        if (X) {
-            rc = decode_i32( X, N, min, slope, planes, dst, dsize);
-            if (rc == 0) {
-                rc = memcmp(Y, X, N * sizeof(Y[0])) == 0 ? 0 : RC(rcXF, rcFunction, rcExecuting, rcFunction, rcInvalid);
-            }
-            free(X);
-        }
-    }
-
-    free(dst);
-    if (rc)
-        fprintf(stdout, "test failed!\n");
-    return rc;
-}
-#endif
-
diff --git a/libs/vxf/irzip.impl.h b/libs/vxf/irzip.impl.h
deleted file mode 100644
index ff12a7b..0000000
--- a/libs/vxf/irzip.impl.h
+++ /dev/null
@@ -1,482 +0,0 @@
-/*
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#define DELTA_UND  0
-#if _ARCH_BITS == 32
-#define DELTA_POS  0x7ffffffffffffff0LL
-#define DELTA_NEG  0x7ffffffffffffff1LL
-#define DELTA_BOTH 0x7ffffffffffffff2LL
-#else
-#define DELTA_POS  0x7ffffffffffffff0
-#define DELTA_NEG  0x7ffffffffffffff1
-#define DELTA_BOTH 0x7ffffffffffffff2
-#endif
-
-#define TRIGGER_2ND_SERIES 10*1024
-
-static rc_t ENCODE(uint8_t dst[], size_t dsize, size_t *used, int64_t *Min, int64_t *Slope, uint8_t *series_count,uint8_t *planes, const STYPE Y[], unsigned N)
-{
-    unsigned i;
-    unsigned k;
-    rc_t rc=0;
-    STYPE min,a0;
-    int64_t 	slope, delta_type = DELTA_UND,y_cur;
-    uint64_t    sum_a0,sum_min,sum_y,sum_delta;
-    uint64_t	max_diff;
-    uint8_t	*scratch=NULL;
-#ifdef TRY2SERIES
-    uint8_t	*series=NULL;/*** for 2nd series flag ***/
-    uint64_t    sum_delta2[2] = {0,0};
-    uint64_t    max_diff2[2] = {0,0};
-    uint32_t	last[2]; /** to run 2 series ***/
-    int64_t	delta2_type[2] = {DELTA_UND,DELTA_UND};
-#endif
-
-    if( N < 10 ) /*** no reason to encode **/
-		return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-
-    scratch=malloc(N*sizeof(STYPE));
-    if(scratch==NULL) return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-#ifdef TRY2SERIES
-    series=malloc(N*sizeof(*series));
-    if(series==NULL) return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-#endif
-   
-    /*** the code tries to best-fit one of 3 cases ****/
-    /*** 1. delta - for monotonous data **/
-    /*** 2. horizontal line through the minimum ****/
-    /*** 3. sloped line from the first element y[i] = y[0] + i * slope ***/
-    /*** all algorithms keep delta positive ****/
-    /*** 1. is preferred ***/
-    /*** the best between 2 and 3 is chosen by the sum of all deltas ****/
-    /*** floating point calculations are avoided ***/
-	a0 =  Y[0];
-	y_cur = Y[1];
-	sum_y =  Y[0] +  Y[1];
-	slope = (int64_t)Y[1] - (int64_t)Y[0];
-	if(slope < 0) {
-		min = Y[1]; 
-		sum_delta = -slope;
-		delta_type = DELTA_NEG;
-	} else {
-		min = Y[0];
-		sum_delta = slope;
-		if( slope != 0 ) delta_type = DELTA_POS;
-	}
-	max_diff = sum_delta;
-#ifdef TRY2SERIES
-	if(sum_delta >= TRIGGER_2ND_SERIES){
-		last[0]=0; last[1]=1;
-		series[0]=0; series[1]=1;
-	} else {
-		last[0]=1; last[1]=0;
-		series[0]=0; series[1]=0;
-		delta2_type[0] = delta_type;
-		sum_delta2[0]=sum_delta;
-		max_diff2[0]= sum_delta;
-	}
-#endif
-	for (i = 2; i < N; ++i) {
-		int64_t  md = (int64_t)Y[i] - (int64_t)min;
-		int64_t diff =  (int64_t)Y[i] - (int64_t)Y[i-1];
-		uint64_t abs_diff = (diff >= 0) ? diff : -diff;
-#ifdef TRY2SERIES
-		int64_t	last_delta_type = delta_type ;
-#endif
-		sum_y += Y[i];
-		sum_delta += abs_diff;
-		if(abs_diff > max_diff) max_diff = abs_diff;
-#define MACRO_SET_DELTA_TYPE(Diff,DeltaType) \
-		if( DeltaType != DELTA_BOTH){ \
-			if ( Diff > 0){ \
-				if(DeltaType == DELTA_NEG ) DeltaType =DELTA_BOTH; \
-				else if (DeltaType == DELTA_UND) DeltaType = DELTA_POS; \
-			} else if ( Diff < 0 ){ \
-				if(DeltaType == DELTA_POS ) DeltaType =DELTA_BOTH; \
-				else if (DeltaType == DELTA_UND) DeltaType = DELTA_NEG; \
-			} \
-		}
-		MACRO_SET_DELTA_TYPE(diff,delta_type);
-#ifdef TRY2SERIES
-		if(last[1] == 0){/** don't have a second series yet ***/
-			if(abs_diff >= TRIGGER_2ND_SERIES){
-				last[1]=i;
-				series[i]=1;
-				sum_delta2[0] = sum_delta - abs_diff;
-				delta2_type[0] = last_delta_type;
-				max_diff2[0] = max_diff;
-			} else {
-				last[0]=i;
-				series[i]=0;
-			}
-		} else { /*** second series is in being built ***/
-			int64_t diff1 =  (int64_t)Y[i] - (int64_t)Y[last[0]];
-			int64_t diff2 =  (int64_t)Y[i] - (int64_t)Y[last[1]];
-			uint64_t abs_diff1 = (diff1 >= 0) ? diff1 : -diff1;
-			uint64_t abs_diff2 = (diff2 >= 0) ? diff2 : -diff2;
-			if(abs_diff1 <= abs_diff2){
-				last[0]=i;
-				series[i]=0;
-				sum_delta2[0] += abs_diff1;
-				if(abs_diff1 > max_diff2[0]) max_diff2[0] = abs_diff1;
-				MACRO_SET_DELTA_TYPE(diff1,delta2_type[0]);
-			} else {
-				last[1]=i;
-				series[i]=1;
-				sum_delta2[1] += abs_diff2;
-				if(abs_diff2 > max_diff2[1]) max_diff2[1] = abs_diff2;
-				MACRO_SET_DELTA_TYPE(diff2,delta2_type[1]);
-			}
-		}
-#endif
-		if ( md < 0 ) {
-			min = Y[i];
-		}
-		y_cur += slope;
-		if(y_cur > (int64_t)Y[i]){/*** reduce the slope ***/
-			slope =  ((int64_t)Y[i] - (int64_t)Y[0] - i+1/**round down**/) /i;
-			y_cur =  (int64_t)Y[0] + (int64_t)(i* slope);
-			assert( y_cur <= (int64_t)Y[i]);
-		}
-	}
-
-    /*** define which delta is the smallest **/
-    *series_count=1;
-    if(delta_type == DELTA_BOTH) sum_delta <<= 1; /*** in DELTA_BOTH case we will use extra bit ***/
-    
-    sum_min = sum_y - N*min;
-    sum_a0  = sum_y - N*a0 - slope*N*(N-1)/2;
-    
-			
-    if( (delta_type == DELTA_POS || delta_type == DELTA_NEG ||
-        (delta_type == DELTA_BOTH &&  max_diff <  (((uint64_t)1)<<(sizeof(STYPE)*8-1))) /*** to prevent loosing a bit **/
-        ) && sum_delta <= sum_min && sum_delta <= sum_a0){
-	a0=Y[0];
-	slope = delta_type;
-    } else if(sum_a0 > sum_min){
-	a0 = min;
-	slope = 0;
-    }
-	
-
-    *planes = 0;
-    *used = 0;
-    *Min= a0;
-    *Slope = slope;
-
-#ifdef TRY2SERIES
-    if(last[1] > 0){
-	bool delta2_is_ok=true;
-	uint64_t    sum_delta2_total=0;
-	if(delta2_type[0] == DELTA_UND) delta2_type[0] = DELTA_POS;
-	if(delta2_type[1] == DELTA_UND) delta2_type[1] = DELTA_POS;
-
-	if(delta2_type[0] == DELTA_BOTH){
-		 delta2_is_ok = delta2_is_ok && (max_diff2[0] <  (((uint64_t)1)<<(sizeof(STYPE)*8-2)));
-		 sum_delta2_total += sum_delta2[0] * 4;
-	} else {
-		 delta2_is_ok = delta2_is_ok && (max_diff2[0] <  (((uint64_t)1)<<(sizeof(STYPE)*8-1)));
-		 sum_delta2_total += sum_delta2[0] * 2;
-	}
-	if(delta2_type[1] == DELTA_BOTH){
-		delta2_is_ok = delta2_is_ok && (max_diff2[1] <  (((uint64_t)1)<<(sizeof(STYPE)*8-2)));
-		sum_delta2_total += sum_delta2[1] * 4;
-	} else {
-		delta2_is_ok = delta2_is_ok && (max_diff2[1] <  (((uint64_t)1)<<(sizeof(STYPE)*8-1)));
-		sum_delta2_total += sum_delta2[1] * 2;
-	}
-	
-	if(delta2_is_ok && sum_delta2_total < sum_delta && sum_delta2_total < sum_min && sum_delta2_total< sum_a0){
-		*series_count=2;
-		Slope[0] = delta2_type[0];
-		Slope[1] = delta2_type[1];
-		Min[0]   = Y[0];
-	}
-    }
-#endif
-
-#define MACRO_FLUSH_VALUE \
-	for(k=0;k<sizeof(STYPE);k++){ \
-		if ((scratch[i+k*N] = (uint8_t)(val & 0xff)) != 0){ \
-			*planes |= (1<<k); \
-		} \
-		val >>= 8; \
-	}
-
-    /*** rotate the array ***/
-    if( *series_count > 1 ){
-#ifdef TRY2SERIES
-	for( i = 0,last[0]=0,last[1]=0; i != N; ++i){
-		uint64_t val;
-		if(series[i] == 0){
-			if(delta2_type[0] == DELTA_POS)       { assert(Y[i] >= Y[last[0]]); val = Y[i] - Y[last[0]];}
-			else if (delta2_type[0] == DELTA_NEG) { assert(Y[i] <= Y[last[0]]); val = Y[last[0]] - Y[i];}
-			else if( Y[i] >= Y[last[0]] )         val = (Y[i] - Y[last[0]])*2;
-			else				      val = (Y[last[0]] - Y[i])*2+1;
-			last[0]=i;
-			val<<=1;
-		} else {
-			if(last[1]==0){
-				Min[1] = Y[i];
-				val = 1;/*** flag second series with a bit ***/
-			} else {
-				if(delta2_type[1] == DELTA_POS)       { assert(Y[i] >= Y[last[1]]); val = Y[i] - Y[last[1]];}
-				else if (delta2_type[1] == DELTA_NEG) { assert(Y[i] <= Y[last[1]]); val = Y[last[1]] - Y[i];}
-				else if( Y[i] >= Y[last[1]] )         val = (Y[i] - Y[last[1]])*2;
-				else				      val = (Y[last[1]] - Y[i])*2+1;
-				val = val*2+1; /*** flag second series with a bit ***/
-			}
-			last[1]=i;
-		}
-                MACRO_FLUSH_VALUE;
-        }
-#else
-	assert(0);
-	rc=RC(rcXF, rcFunction, rcExecuting, rcParam, rcInconsistent);
-#endif
-    } else if(slope == DELTA_POS){
-	for( i = 0; i != N; ++i){
-		uint64_t val=Y[i] - a0;
-		assert(Y[i] >= a0);
-		a0 =  Y[i];
-		MACRO_FLUSH_VALUE;
-	}
-    } else if( slope == DELTA_NEG){
-	for( i = 0; i != N; ++i){
-		uint64_t  val = a0 - Y[i];
-		assert(Y[i] <= a0);
-                a0 =  Y[i];
-		MACRO_FLUSH_VALUE;
-	}
-    } else if( slope == DELTA_BOTH){
-	for( i = 0; i != N; ++i){
-		uint64_t val;
-		if( Y[i] >= a0 ){ /** move sign bit into the lowest bit ***/
-                        val = ( Y[i] - a0 ) << 1;
-                } else {
-                        val = ( a0 - Y[i]) * 2 + 1;
-                }
-                a0 =  Y[i];
-		MACRO_FLUSH_VALUE;
-	}
-    } else {
-	for( i = 0; i != N; ++i){
-		uint64_t val =  Y[i] - a0 - slope*i;
-		assert((int64_t)Y[i] >=  (int64_t)a0 + slope*i);
-		MACRO_FLUSH_VALUE;
-	}
-    }
-
-    /*** record the arrays ***/
-    for(k=0;k<sizeof(STYPE) && rc == 0; k++){
-	if (*planes & (1<<k)) {
-		szbuf s2;
-		s2.used = 0;
-		s2.size = dsize - *used;
-		s2.buf  = dst + *used;
-		rc = zlib_compress(&s2, scratch+k*N, N,Z_RLE, Z_BEST_SPEED);
-		if ( rc == 0 ) {
-			*used += s2.used;
-			if (s2.used == 0) /*** skip zipping **/
-				 rc=RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-		}
-	}
-    }
-    if(scratch) free(scratch);
-#ifdef TRY2SERIES
-    if(series) free(series);
-#endif
-    return rc;
-}
-
-static rc_t DECODE(STYPE Y[], unsigned N, int64_t* min, int64_t* slope, uint8_t series_count, uint8_t planes, const uint8_t src[], size_t ssize)
-{
-    unsigned k;
-    size_t j;
-    unsigned m;
-    unsigned i;
-    uint8_t *scratch=NULL;
-    rc_t rc=0;
-    bool    first;
-
-    memset(Y, 0, sizeof(Y[0]) * N);
-    for (j = k = 0, m = 1,first=true; m < 0x100; m <<= 1, k += 8) {
-        size_t n;
-        
-        if ((planes & m) == 0)
-            continue;
-        
-        n = 0;
-	if( !scratch ) scratch = malloc(N);
-	
-        rc = zlib_decompress(scratch, N, &n, src + j, ssize - j);
-        if (rc) goto DONE;
-        j += n;
-	if(first){
-		for (i = 0; i != N; ++i) Y[i] = ((STYPE)scratch[i]) << k;
-		first = false;
-	} else {
-		for (i = 0; i != N; ++i) Y[i] |= ((STYPE)scratch[i]) << k;
-	}
-    }
-    if(series_count == 2){
-#if 0 /** trying to unroll ***/
-	STYPE Ylast;
-	if(slope[0]==DELTA_BOTH){
-		if(slope[1]==DELTA_BOTH){ 
-			for(i = 0; i != N; ++i){
-				scratch[i] = Y[i]&3;
-				Y[i] = ((USTYPE)Y[i]) >> 2;
-			}
-		} else {
-			for(i = 0; i != N; ++i){
-				uint8_t tmp = Y[i]&1;
-				if(tmp){
-					scratch[i] = tmp;
-					Y[i] = ((USTYPE)Y[i]) >> 1;
-				} else {
-					scratch[i] = Y[i]&3;
-					Y[i] = ((USTYPE)Y[i]) >> 2;
-				}
-                        }
-
-		}
-	} else {
-		if(slope[1]==DELTA_BOTH){
-			for(i = 0; i != N; ++i){
-                                uint8_t tmp = Y[i]&1;
-                                if(!tmp){
-                                        scratch[i] = tmp;
-					Y[i] = ((USTYPE)Y[i]) >> 1;
-                                } else {
-                                        scratch[i] = Y[i]&3;
-					Y[i] = ((USTYPE)Y[i]) >> 2;
-
-                                }
-                        }
-		} else {
-			for(i = 0; i != N; ++i){
-				scratch[i] = Y[i]&1;
-				Y[i] = ((USTYPE)Y[i]) >> 1;
-			}
-		}
-	}
-	/** k=0 - main series, k=1 -secondary **/
-	for(k=0;k<2;k++){
-		Ylast = min[k];
-		if(slope[k]==DELTA_POS) {
-			for (i = 0; i != N; ++i){
-				if((scratch[i]&1)==k){
-					Y[i]  = Ylast + Y[i];
-					Ylast = Y[i];
-				}
-			}
-		} else if (slope[k]==DELTA_NEG){
-			for (i = 0; i != N; ++i){
-				if((scratch[i]&1)==k){
-					Y[i]  = Ylast - Y[i];
-					Ylast = Y[i];
-				}
-			}
-		} else for (i = 0; i != N; ++i){
-			if((scratch[i]&1)==k){
-				if(scratch[i]&2){
-					Y[i]  = Ylast - Y[i];
-				} else {
-					Y[i]  = Ylast + Y[i];
-				}
-				Ylast = Y[i];
-			}
-		}
-	}
-
-#else
-	uint32_t last[2]={0,0};
-	for (i = 0; i != N; ++i){
-		if( (Y[i]&1) == 0 ){/**main series **/
-			USTYPE val = (USTYPE)Y[i];
-			val >>= 1;
-			if(i==0){
-                                Y[i] = (STYPE)min[0];
-                                last[0]=i;
-                        }
-			if(slope[0]==DELTA_POS)      Y[i] = Y[last[0]] + val;
-			else if(slope[0]==DELTA_NEG) Y[i] = Y[last[0]] - val;
-			else if ((val&1)==0)         Y[i] = Y[last[0]] + (val >>1);
-			else 	                     Y[i] = Y[last[0]] - (val >>1);
-			last[0]=i;
-		} else { /**secondary series ***/
-			USTYPE val = (USTYPE)Y[i];
-			val >>= 1;
-			if(last[1]==0){
-				Y[i] = (STYPE)min[1];
-				last[1]=i;
-			}
-                        if(slope[1]==DELTA_POS)      Y[i] = Y[last[1]] + val;
-                        else if(slope[1]==DELTA_NEG) Y[i] = Y[last[1]] - val;
-                        else if ((val&1)==0)         Y[i] = Y[last[1]] + (val >>1);
-                        else                         Y[i] = Y[last[1]] - (val >>1);
-                        last[1]=i;
-		}
-        }
-#endif
-    } else if(min[0]==0 && slope[0]==0){ /*** no slope no offset - nothing to do ***/
-    } else if(slope[0] == DELTA_POS){
-	assert(Y[0] == 0);
-	Y[0] = (STYPE)min[0];
-	for (i = 1; i != N; ++i){
-		Y[i] = Y[i-1] + Y[i];
-	}
-    } else if (slope[0] == DELTA_NEG ) {
-	assert(Y[0] == 0);
-	Y[0] = (STYPE)min[0];
-	for (i = 1; i != N; ++i){
-		Y[i] =  Y[i-1] - Y[i];
-	}
-    } else if (slope[0] == DELTA_BOTH){
-	assert(Y[0] == 0);
-	Y[0] = (STYPE)min[0];
-	for (i = 1; i != N; ++i){
-		USTYPE val = (USTYPE)Y[i];
-		val >>= 1;
-		if(Y[i] & 1) Y[i] = Y[i-1] - val;
-		else         Y[i] = Y[i-1] + val;
-	}
-    } else if(slope[0] == 0) {
-	for (i = 0; i != N; ++i){
-		Y[i]  += (STYPE)min[0];
-	}
-    } else {
-	for (i = 0; i != N; ++i){
-                Y[i]  += (STYPE)min[0];
-                min[0] += slope[0];
-        }
-    }
-
-DONE:
-    if(scratch) free(scratch);
-    return rc;
-}
diff --git a/libs/vxf/iunzip.c b/libs/vxf/iunzip.c
deleted file mode 100644
index fb9cf52..0000000
--- a/libs/vxf/iunzip.c
+++ /dev/null
@@ -1,748 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-#include <byteswap.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <float.h>
-#include <limits.h>
-#include <math.h>
-
-#include <zlib.h>
-
-#include <stdio.h>
-#include <assert.h>
-
-#include "izip-common.h"
-
-static void unpack_nbuf16_swap(nbuf *x) {
-    unsigned i;
-    
-    for (i = x->used; i; --i) {
-        x->data.raw[i - 1] = bswap_16(x->data.u16[i - 1]) + x->min;
-    }
-}
-
-static void unpack_nbuf32_swap(nbuf *x) {
-    unsigned i;
-    
-    for (i = x->used; i; --i) {
-        x->data.raw[i - 1] = bswap_32(x->data.u32[i - 1]) + x->min;
-    }
-}
-
-static void unpack_nbuf8(nbuf *x) {
-    unsigned i;
-    
-    for (i = x->used; i; --i) {
-        x->data.raw[i - 1] = x->data.u8[i - 1] + x->min;
-    }
-}
-
-static void unpack_nbuf16(nbuf *x) {
-    unsigned i;
-    
-    for (i = x->used; i; --i) {
-        x->data.raw[i - 1] = x->data.u16[i - 1] + x->min;
-    }
-}
-
-static void unpack_nbuf32(nbuf *x) {
-    unsigned i;
-    
-    for (i = x->used; i; --i) {
-        x->data.raw[i - 1] = x->data.u32[i - 1] + x->min;
-    }
-}
-
-static void unpack_nbuf(nbuf *x) {
-    unsigned i;
-    
-    switch (x->var) {
-    case 4:
-        unpack_nbuf8(x);
-        break;
-    case 3:
-        unpack_nbuf16(x);
-        break;
-    case 2:
-        unpack_nbuf32(x);
-        break;
-    default:
-        for (i = x->used; i; --i) {
-            x->data.raw[i - 1] = x->data.u64[i - 1] + x->min;
-        }
-        break;
-    }
-    x->var = 0;
-}
-
-static void unpack_nbuf_swap(nbuf *x) {
-    unsigned i;
-    
-    switch (x->var) {
-    case 4:
-        unpack_nbuf8(x);
-        break;
-    case 3:
-        unpack_nbuf16_swap(x);
-        break;
-    case 2:
-        unpack_nbuf32_swap(x);
-        break;
-    default:
-        for (i = x->used; ; --i) {
-            x->data.raw[i - 1] = bswap_64(x->data.u64[i - 1]) + x->min;
-            if (i == 0)
-                break;
-        }
-        break;
-    }
-    x->var = 0;
-}
-
-static rc_t zlib_decompress(void *dst, unsigned dsize, unsigned *psize, const void *src, uint32_t ssize) {
-    z_stream s;
-    int zr;
-    rc_t rc = 0;
-    
-    memset(&s, 0, sizeof(s));
-    s.next_in = (void *)src;
-    s.avail_in = ssize;
-    s.next_out = dst;
-    s.avail_out = dsize;
-    
-    zr = inflateInit2(&s, -15);
-    switch (zr) {
-    case 0:
-        break;
-    case Z_MEM_ERROR:
-        return RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    default:
-        return RC(rcVDB, rcFunction, rcExecuting, rcNoObj, rcUnexpected);
-    }
-    zr = inflate(&s, Z_FINISH);
-    switch (zr) {
-    case Z_STREAM_END:
-        assert(s.total_out <= UINT32_MAX);
-        *psize = (uint32_t)s.total_out;
-        rc = 0;
-        break;
-    case Z_OK:
-        rc = RC(rcXF, rcFunction, rcExecuting, rcMemory, rcInsufficient);
-        break;
-    case Z_BUF_ERROR:
-    case Z_NEED_DICT:
-    case Z_DATA_ERROR:
-        rc = RC(rcVDB, rcFunction, rcExecuting, rcData, rcCorrupt);
-        break;
-    case Z_MEM_ERROR:
-        rc = RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-        break;
-    default:
-        rc = RC(rcVDB, rcFunction, rcExecuting, rcNoObj, rcUnexpected);
-        break;
-    }
-    zr = inflateEnd(&s);
-    switch (zr) {
-    case Z_OK:
-        return rc;
-    default:
-        if (rc == 0)
-            {
-            return RC(rcVDB, rcFunction, rcExecuting, rcData, rcCorrupt);
-            }
-        return rc;
-    }
-    return 0;
-}
-
-static
-void decode_types(uint8_t dst[], unsigned n, const uint8_t src[])
-{
-    unsigned i, j, k = 0;
-    
-    for (i = 0, j = 1; i != n; ++i)
-    {
-        if (j == 1)
-            k = src[i / 8];
-
-        dst[i] = (k & j) == 0 ? 0 : 1;
-
-        j <<= 1;
-        if (j == 0x100)
-            j = 1;
-    }
-}
-
-#define DESERIAL16(X) do { if (i + 2 > n) return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient); memcpy(&y->u.izipped.X, &src[i], 2); i += 2; if (swap) y->u.izipped.X = bswap_16(y->u.izipped.X); } while (0)
-#define DESERIAL32(X) do { if (i + 4 > n) return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient); memcpy(&y->u.izipped.X, &src[i], 4); i += 4; if (swap) y->u.izipped.X = bswap_32(y->u.izipped.X); } while (0)
-#define DESERIAL64(X) do { if (i + 8 > n) return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient); memcpy(&y->u.izipped.X, &src[i], 8); i += 8; if (swap) y->u.izipped.X = bswap_64(y->u.izipped.X); } while (0)
-
-static rc_t deserialize_encoded(struct encoded *y, const uint8_t src[], unsigned n, int swap) {
-    unsigned i = 0;
-    
-    memset(y, 0, sizeof(*y));
-    
-    if (i + 1 > n)
-        return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-    y->flags = src[i]; ++i;
-    
-    if (i + 4 > n)
-        return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-    memcpy(&y->data_count, &src[i], 4); i += 4;
-    if (swap)
-        y->data_count = bswap_32(y->data_count);
-    
-    switch (y->flags & 0x03) {
-    case 2:
-    case 3:
-        if (i + 8 > n)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-        memcpy(&y->u.packed.min, &src[i], 8); i += 8;
-        if (swap)
-            y->u.packed.min = bswap_64(y->u.packed.min);
-    case 1:
-        y->u.zipped.data_size = n - i;
-        y->u.zipped.data = &src[i];
-        return 0;
-    default:
-        break;
-    }
-    
-    DESERIAL32(data_flags);
-    DESERIAL32(segments);
-    DESERIAL32(outliers);
-    
-    DESERIAL32(type_size);
-    DESERIAL32(diff_size);
-    DESERIAL32(length_size);
-    DESERIAL32(dy_size);
-    DESERIAL32(dx_size);
-    DESERIAL32(a_size);
-    DESERIAL32(outlier_size);
-    
-    DESERIAL64(min_diff);
-    DESERIAL64(min_length);
-    DESERIAL64(min_dy);
-    DESERIAL64(min_dx);
-    DESERIAL64(min_a);
-    DESERIAL64(min_outlier);
-    
-    if (FLAG_TYPE(y->u.izipped) != DATA_ABSENT && FLAG_TYPE(y->u.izipped) != DATA_CONSTANT) {
-        if (i + y->u.izipped.type_size > n)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-        y->u.izipped.type = &src[i]; i += y->u.izipped.type_size;
-    }
-    
-    if (FLAG_DIFF(y->u.izipped) != DATA_ABSENT && FLAG_DIFF(y->u.izipped) != DATA_CONSTANT) {
-        if (i + y->u.izipped.diff_size > n)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-        y->u.izipped.diff = &src[i]; i += y->u.izipped.diff_size;
-    }
-    
-    if (FLAG_LENGTH(y->u.izipped) != DATA_ABSENT && FLAG_LENGTH(y->u.izipped) != DATA_CONSTANT) {
-        if (i + y->u.izipped.length_size > n)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-        y->u.izipped.length = &src[i]; i += y->u.izipped.length_size;
-    }
-    
-    if (FLAG_DY(y->u.izipped) != DATA_ABSENT && FLAG_DY(y->u.izipped) != DATA_CONSTANT) {
-        if (i + y->u.izipped.dy_size > n)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-        y->u.izipped.dy = &src[i]; i += y->u.izipped.dy_size;
-    }
-    
-    if (FLAG_DX(y->u.izipped) != DATA_ABSENT && FLAG_DX(y->u.izipped) != DATA_CONSTANT) {
-        if (i + y->u.izipped.dx_size > n)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-        y->u.izipped.dx = &src[i]; i += y->u.izipped.dx_size;
-    }
-    
-    if (FLAG_A(y->u.izipped) != DATA_ABSENT && FLAG_A(y->u.izipped) != DATA_CONSTANT) {
-        if (i + y->u.izipped.a_size > n)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-        y->u.izipped.a = &src[i]; i += y->u.izipped.a_size;
-    }
-    
-    if (FLAG_OUTLIER(y->u.izipped) != DATA_ABSENT && FLAG_OUTLIER(y->u.izipped) != DATA_CONSTANT) {
-        if (i + y->u.izipped.outlier_size > n)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-        y->u.izipped.outlier = &src[i];
-        /* i += y->u.izipped.outlier_size; */
-    }
-    
-    return 0;
-}
-
-#define BITS_TO_VARIANT(X, BITS) do { switch(BITS) { case 8: (X)->var = 4; break; case 16: (X)->var = 3; break; case 32: (X)->var = 2; break; case 64: (X)->var = 1; break; default: return RC(rcXF, rcFunction, rcExecuting, rcData, rcInvalid); } } while (0);
-
-static rc_t decode_encoded(struct decoded *y, const struct encoded *x) {
-    unsigned i;
-    unsigned type = x->flags & 0x3;
-    rc_t rc;
-    const uint8_t *src;
-    uint8_t *hsrc;
-    unsigned elem_bits;
-    unsigned n = 0;
-    
-    memset(y, 0, sizeof(*y));
-    y->data_count = x->data_count;
-    y->size_type = (x->flags >> 2) & 3;
-    
-    y->diff = alloc_raw_nbuf(y->data_count);
-    if (y->diff == NULL)
-        return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    
-    if (type) {
-        if ((type & 1) != 0)  {
-            rc = zlib_decompress(y->diff->data.u8, 8 * y->data_count, &n, x->u.zipped.data, x->u.zipped.data_size );
-            if (rc)
-                return rc;
-            if ((type & 2) != 0)
-                y->diff->min = x->u.packed.min;
-        }
-        else {
-            y->diff->min = x->u.packed.min;
-            memcpy(y->diff->data.u8, x->u.packed.data, n = x->u.packed.data_size);
-        }
-        elem_bits = n * 8 / x->data_count;
-        if (elem_bits * x->data_count / 8 != n)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInvalid);
-        BITS_TO_VARIANT(y->diff, elem_bits);
-        if (type == 1 && 4 - y->diff->var != y->size_type) {
-#if _DEBUGGING
-            fprintf(stderr, "decode_encoded: var = %i, size_type = %u\n", (int)y->diff->var, (unsigned)y->size_type);
-#endif
-            return RC(rcXF, rcFunction, rcExecuting, rcRange, rcExcessive);
-        }
-        y->diff->used = x->data_count;
-        return 0;
-    }
-    
-    y->type = malloc(x->u.izipped.segments);
-    if (y->type == NULL)
-        return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    
-    if (x->u.izipped.outliers) {
-        hsrc = NULL;
-        
-        if (FLAG_TYPE(x->u.izipped) == DATA_ZIPPED) {
-            hsrc = malloc(x->u.izipped.segments);
-            if (hsrc == NULL)
-                return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-            rc = zlib_decompress(hsrc, x->u.izipped.segments, &i, x->u.izipped.type, x->u.izipped.type_size);
-            if (rc) {
-                free(hsrc);
-                return rc;
-            }
-            src = hsrc;
-        }
-        else
-            src = x->u.izipped.type;
-        decode_types(y->type, x->u.izipped.segments, src);
-        if (hsrc) free(hsrc);
-        for (n = i = 0; i != x->u.izipped.segments; ++i) {
-            if (y->type[i])
-                ++n;
-        }
-        y->lines = x->u.izipped.segments - n;
-        y->outliers = n;
-    }
-    else {
-        memset(y->type, 0, x->u.izipped.segments);
-        y->lines = x->u.izipped.segments;
-        y->outliers = 0;
-    }
-    
-    y->diff->min = x->u.izipped.min_diff;
-    if (FLAG_DIFF(x->u.izipped) == DATA_CONSTANT) {
-        y->diff->used = x->u.izipped.diff_size;
-        memset(y->diff->data.raw, 0, nbuf_size(y->diff));
-    }
-    else {
-        if (FLAG_DIFF(x->u.izipped) == DATA_ZIPPED) {
-            rc = zlib_decompress(y->diff->data.u8, y->diff->size * 8, &n, x->u.izipped.diff, x->u.izipped.diff_size);
-            if (rc)
-                return rc;
-        }
-        else {
-            n = x->u.izipped.diff_size;
-            memcpy(y->diff->data.u8, x->u.izipped.diff, n);
-        }
-
-        if ( y->diff->size != 0 )
-            elem_bits = (n * 8) / y->diff->size;
-        else
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInvalid);
-
-        if (elem_bits * y->diff->size / 8 != n)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInvalid);
-        BITS_TO_VARIANT(y->diff, elem_bits);
-        y->diff->used = n >> (4 - y->diff->var);
-    }
-    
-    y->length = alloc_nbuf(y->lines + y->outliers, 2);
-    if (y->length == NULL)
-        return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    
-    y->length->min = x->u.izipped.min_length;
-    if (FLAG_LENGTH(x->u.izipped) == DATA_CONSTANT) {
-        y->length->used = y->lines + y->outliers;
-        memset(y->length->data.raw, 0, nbuf_size(y->length));
-    }
-    else {
-        if (FLAG_LENGTH(x->u.izipped) == DATA_ZIPPED) {
-            rc = zlib_decompress(y->length->data.u8, y->length->size * 4, &n, x->u.izipped.length, x->u.izipped.length_size);
-            if (rc)
-                return rc;
-        }
-        else {
-            n = x->u.izipped.length_size;
-            memcpy(y->length->data.u8, x->u.izipped.length, n);
-        }
-        elem_bits = (n * 8) / (y->lines + y->outliers);
-        if (elem_bits * (y->lines + y->outliers) / 8 != n)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInvalid);
-        BITS_TO_VARIANT(y->length, elem_bits);
-        y->length->used = n >> (4 - y->length->var);
-    }
-    
-    y->dy = alloc_nbuf(y->lines, 1);
-    if (y->dy == NULL)
-        return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    
-    y->dy->min = x->u.izipped.min_dy;
-    if (FLAG_DY(x->u.izipped) == DATA_CONSTANT) {
-        y->dy->used = y->lines;
-        memset(y->dy->data.raw, 0, nbuf_size(y->dy));
-    }
-    else {
-        if (FLAG_DY(x->u.izipped) == DATA_ZIPPED) {
-            rc = zlib_decompress(y->dy->data.u8, y->dy->size * 8, &n, x->u.izipped.dy, x->u.izipped.dy_size);
-            if (rc)
-                return rc;
-        }
-        else {
-            n = x->u.izipped.dy_size;
-            memcpy(y->dy->data.u8, x->u.izipped.dy, n);
-        }
-        elem_bits = (n * 8) / y->lines;
-        if (elem_bits * y->lines / 8 != n)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInvalid);
-        BITS_TO_VARIANT(y->dy, elem_bits);
-        y->dy->used = n >> (4 - y->dy->var);
-    }
-    
-    y->dx = alloc_nbuf(y->lines, 1);
-    if (y->dx == NULL)
-        return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    
-    y->dx->min = x->u.izipped.min_dx;
-    if (FLAG_DX(x->u.izipped) == DATA_CONSTANT) {
-        y->dx->used = y->lines;
-        memset(y->dx->data.raw, 0, nbuf_size(y->dx));
-    }
-    else {
-        if (FLAG_DX(x->u.izipped) == DATA_ZIPPED) {
-            rc = zlib_decompress(y->dx->data.u8, y->dx->size * 8, &n, x->u.izipped.dx, x->u.izipped.dx_size);
-            if (rc)
-                return rc;
-        }
-        else {
-            n = x->u.izipped.dx_size;
-            memcpy(y->dx->data.u8, x->u.izipped.dx, n);
-        }
-        elem_bits = (n * 8) / y->lines;
-        if (elem_bits * y->lines / 8 != n)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInvalid);
-        BITS_TO_VARIANT(y->dx, elem_bits);
-        y->dx->used = n >> (4 - y->dx->var);
-    }
-    
-    y->a = alloc_nbuf(y->lines, 1);
-    if (y->a == NULL)
-        return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    
-    y->a->min = x->u.izipped.min_a;
-    if (FLAG_A(x->u.izipped) == DATA_CONSTANT) {
-        y->a->used = y->lines;
-        memset(y->a->data.raw, 0, nbuf_size(y->a));
-    }
-    else {
-        if (FLAG_A(x->u.izipped) == DATA_ZIPPED) {
-            rc = zlib_decompress(y->a->data.u8, y->a->size * 8, &n, x->u.izipped.a, x->u.izipped.a_size);
-            if (rc)
-                return rc;
-        }
-        else {
-            n = x->u.izipped.a_size;
-            memcpy(y->a->data.u8, x->u.izipped.a, n);
-        }
-        elem_bits = (n * 8) / y->lines;
-        if (elem_bits * y->lines / 8 != n)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInvalid);
-        BITS_TO_VARIANT(y->a, elem_bits);
-        y->a->used = n >> (4 - y->a->var);
-    }
-    
-    if (y->outliers) {
-        y->outlier = alloc_nbuf(x->u.izipped.outliers, 1);
-        if (y->outlier == NULL)
-            return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-        
-        y->outlier->min = x->u.izipped.min_outlier;
-        if (FLAG_OUTLIER(x->u.izipped) == DATA_CONSTANT) {
-            y->outlier->used = y->outliers;
-            memset(y->outlier->data.raw, 0, nbuf_size(y->outlier));
-        }
-        else {
-            if (FLAG_OUTLIER(x->u.izipped) == DATA_ZIPPED) {
-                rc = zlib_decompress(y->outlier->data.u8, y->outlier->size * 8, &n, x->u.izipped.outlier, x->u.izipped.outlier_size);
-                if (rc)
-                    return rc;
-            }
-            else {
-                n = x->u.izipped.outlier_size;
-                memcpy(y->outlier->data.u8, x->u.izipped.outlier, n);
-            }
-            elem_bits = (n * 8) / x->u.izipped.outliers;
-            if (elem_bits * x->u.izipped.outliers / 8 != n)
-                return RC(rcXF, rcFunction, rcExecuting, rcData, rcInvalid);
-            BITS_TO_VARIANT(y->outlier, elem_bits);
-            y->outlier->used = n >> (4 - y->outlier->var);
-        }
-    }
-    
-    return 0;
-}
-
-#define STYPE uint8_t
-#define DECODE decode_u8
-#include "izip-decode.impl.h"
-#undef STYPE
-#undef DECODE
-
-#define STYPE int8_t
-#define DECODE decode_i8
-#include "izip-decode.impl.h"
-#undef STYPE
-#undef DECODE
-
-#define STYPE uint16_t
-#define DECODE decode_u16
-#include "izip-decode.impl.h"
-#undef STYPE
-#undef DECODE
-
-#define STYPE int16_t
-#define DECODE decode_i16
-#include "izip-decode.impl.h"
-#undef STYPE
-#undef DECODE
-
-#define STYPE uint32_t
-#define DECODE decode_u32
-#include "izip-decode.impl.h"
-#undef STYPE
-#undef DECODE
-
-#define STYPE int32_t
-#define DECODE decode_i32
-#include "izip-decode.impl.h"
-#undef STYPE
-#undef DECODE
-
-#define STYPE uint64_t
-#define DECODE decode_u64
-#include "izip-decode.impl.h"
-#undef STYPE
-#undef DECODE
-
-#define STYPE int64_t
-#define DECODE decode_i64
-#include "izip-decode.impl.h"
-#undef STYPE
-#undef DECODE
-
-typedef rc_t (*decode_f)(void *dst, unsigned dsize, const uint8_t src[], unsigned N, int swap);
-
-static
-decode_f selfs[8] = {
-    (decode_f)decode_u8,
-    (decode_f)decode_i8,
-    (decode_f)decode_u16,
-    (decode_f)decode_i16,
-    (decode_f)decode_u32,
-    (decode_f)decode_i32,
-    (decode_f)decode_u64,
-    (decode_f)decode_i64,
-};
-
-#if 0
-rc_t ex_decode8( void *dst, unsigned dsize, uint8_t *src, unsigned ssize )
-{
-    return selfs[0].f( dst, dsize, src, ssize, 0 );
-}
-
-rc_t ex_decode16( void *dst, unsigned dsize, uint8_t *src, unsigned ssize )
-{
-    return selfs[2].f( dst, dsize, src, ssize, 0 );
-}
-
-rc_t ex_decode32( void *dst, unsigned dsize, uint8_t *src, unsigned ssize )
-{
-    return selfs[4].f( dst, dsize, src, ssize, 0 );
-}
-
-rc_t ex_decode64( void *dst, unsigned dsize, uint8_t *src, unsigned ssize )
-{
-    return selfs[6].f( dst, dsize, src, ssize, 0 );
-}
-#endif
-
-rc_t CC iunzip_func_v0(
-                    void *Self,
-                    const VXformInfo *info,
-                    VBlobResult *dst,
-                    const VBlobData *src
-) {
-    uint32_t ssize;
-    
-    assert(dst->elem_count >> 32 == 0);
-    assert(((src->elem_count * src->elem_bits + 7) >> 3) >> 32 == 0);
-    ssize = (uint32_t)((src->elem_count * src->elem_bits + 7) >> 3);
-    
-    dst->byte_order = vboNative;
-    switch (src->byte_order) {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-    case vboBigEndian:
-#else
-    case vboBigEndian:
-#endif
-        return selfs[(uintptr_t)Self](dst->data, (uint32_t)dst->elem_count,
-                       src->data, ssize,
-                       1);
-    default:
-        return selfs[(uintptr_t)Self](dst->data, (uint32_t)dst->elem_count,
-                       src->data, ssize,
-                       0);
-    }
-}
-
-#if 0
-
-static
-rc_t CC iunzip(
-            void *Self,
-            const VXformInfo *info,
-            VBlobResult *dst,
-            const VBlobData *src,
-            VBlobHeader *hdr
-) {
-    switch (VBlobHeaderVersion(hdr)) {
-    case 0:
-        return iunzip_func_v0(Self, info, dst, src);
-    default:
-        return RC(rcVDB, rcFunction, rcExecuting, rcParam, rcBadVersion);
-    }
-}
-
-/* 
- function izip_set iunzip #1.0 ( izip_fmt in )
- */
-VTRANSFACT_IMPL(vdb_iunzip, 1, 0, 0) (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftBlob;
-    rslt->u.bf = iunzip;
-    
-    switch (info->fdesc.desc.domain) {
-    case vtdInt:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 8:
-            rslt->self = (void *)1;
-            break;
-        case 16:
-            rslt->self = (void *)3;
-            break;
-        case 32:
-            rslt->self = (void *)5;
-            break;
-        case 64:
-            rslt->self = (void *)7;
-            break;
-        default:
-#if _DEBUGGING
-            fprintf(stderr, "intrinsic_bits = %u != (8|16|32|64)\n", info->fdesc.desc.intrinsic_bits);
-#endif
-            return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            break;
-        }
-        break;
-    case vtdUint:
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 8:
-            rslt->self = (void *)0;
-            break;
-        case 16:
-            rslt->self = (void *)2;
-            break;
-        case 32:
-            rslt->self = (void *)4;
-            break;
-        case 64:
-            rslt->self = (void *)6;
-            break;
-        default:
-#if _DEBUGGING
-            fprintf(stderr, "intrinsic_bits = %u != (8|16|32|64)\n", info->fdesc.desc.intrinsic_bits);
-#endif
-            return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            break;
-        }
-        break;
-    default:
-#if _DEBUGGING
-        fprintf(stderr, "domain != vtdInt or vtdUint\n");
-#endif
-        return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-    }
-    return 0;
-}
-#endif
-
-#if TESTING
-int test_decode(int32_t *dst, unsigned dsize, const uint8_t *src, unsigned ssize, int swap) {
-    return decode_i32(dst, dsize, src, ssize, 0);
-}
-#endif
diff --git a/libs/vxf/izip-common.h b/libs/vxf/izip-common.h
deleted file mode 100644
index c6dc84c..0000000
--- a/libs/vxf/izip-common.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-typedef struct {
-    unsigned size;
-    unsigned used;
-    int64_t min;
-    int64_t max;
-    unsigned var;
-    union {
-        int64_t  raw[1];
-        uint64_t u64[1];
-        uint32_t u32[2];
-        uint16_t u16[4];
-        uint8_t  u8[8];
-    } data;
-} nbuf;
-
-#define nbuf_get(X, I) (((const nbuf *)X)->var == 4 ? ((const nbuf *)X)->data.u8[(I)] : (((const nbuf *)X)->var == 3 ? ((const nbuf *)X)->data.u16[(I)] : (((const nbuf *)X)->var == 2 ? ((const nbuf *)X)->data.u32[(I)] : ((const nbuf *)X)->data.u64[(I)])))
-
-static unsigned nbuf_size(const nbuf *x) {
-    size_t y;
-    
-    switch (x->var) {
-    default:
-        y = sizeof(x->data.raw[0]) * x->used;
-        break;
-    case 1:
-        y = sizeof(x->data.u64[0]) * x->used;
-        break;
-    case 2:
-        y = sizeof(x->data.u32[0]) * x->used;
-        break;
-    case 3:
-        y = sizeof(x->data.u16[0]) * x->used;
-        break;
-    case 4:
-        y = sizeof(x->data.u8[0]) * x->used;
-        break;
-    }
-    assert(y <= UINT32_MAX);
-    return (unsigned)y;
-}
-
-static nbuf *alloc_nbuf(unsigned cnt, unsigned var) {
-    nbuf *rslt;
-    
-    rslt = malloc(sizeof(*rslt) - sizeof(rslt->data) + cnt * sizeof(rslt->data.raw[0]));
-    if ( rslt != NULL ) {
-        memset(rslt, 0, sizeof(*rslt) - sizeof(rslt->data));
-        rslt->size = cnt;
-        rslt->used = 0;
-        rslt->var = var;
-    }
-    return rslt;
-}
-
-static nbuf *alloc_raw_nbuf(unsigned cnt) {
-    return alloc_nbuf(cnt, 0);
-}
-
-struct decoded {
-    unsigned data_count;
-    unsigned lines;
-    unsigned outliers;
-    unsigned size_type;
-    
-    nbuf *diff;      /* diff[data_count] */
-    uint8_t *type;   /* type[lines + outliers] */
-    nbuf *length;    /* length[lines + outliers]  */
-    nbuf *dy;        /* dy[lines] */
-    nbuf *dx;        /* dx[lines] */
-    nbuf *a;         /* a[lines] */
-    nbuf *outlier;   /* outlier[outliers] */
-};
-
-#define DATA_CONSTANT (1)
-#define DATA_ZIPPED (2)
-#define DATA_ABSENT (3)
-
-#define FLAG_BITS (4)
-#define FLAG_MASK ((1 << FLAG_BITS) - 1)
-
-#define FLAG_BITS_TYPE      (0)
-#define FLAG_BITS_DIFF      (FLAG_BITS + FLAG_BITS_TYPE)
-#define FLAG_BITS_LENGTH    (FLAG_BITS + FLAG_BITS_DIFF)
-#define FLAG_BITS_DY        (FLAG_BITS + FLAG_BITS_LENGTH)
-#define FLAG_BITS_DX        (FLAG_BITS + FLAG_BITS_DY)
-#define FLAG_BITS_A         (FLAG_BITS + FLAG_BITS_DX)
-#define FLAG_BITS_OUTLIER   (FLAG_BITS + FLAG_BITS_A)
-
-#define SET_TYPE_ABSENT(FLAGS)      ((FLAGS).data_flags) |= (DATA_ABSENT << FLAG_BITS_TYPE)
-#define SET_DIFF_ABSENT(FLAGS)      ((FLAGS).data_flags) |= (DATA_ABSENT << FLAG_BITS_DIFF)
-#define SET_LENGTH_ABSENT(FLAGS)    ((FLAGS).data_flags) |= (DATA_ABSENT << FLAG_BITS_LENGTH)
-#define SET_DY_ABSENT(FLAGS)        ((FLAGS).data_flags) |= (DATA_ABSENT << FLAG_BITS_DY)
-#define SET_DX_ABSENT(FLAGS)        ((FLAGS).data_flags) |= (DATA_ABSENT << FLAG_BITS_DX)
-#define SET_A_ABSENT(FLAGS)         ((FLAGS).data_flags) |= (DATA_ABSENT << FLAG_BITS_A)
-#define SET_OUTLIER_ABSENT(FLAGS)   ((FLAGS).data_flags) |= (DATA_ABSENT << FLAG_BITS_OUTLIER)
-
-#define SET_TYPE_CONSTANT(FLAGS)    ((FLAGS).data_flags) |= (DATA_CONSTANT << FLAG_BITS_TYPE)
-#define SET_DIFF_CONSTANT(FLAGS)    ((FLAGS).data_flags) |= (DATA_CONSTANT << FLAG_BITS_DIFF)
-#define SET_LENGTH_CONSTANT(FLAGS)  ((FLAGS).data_flags) |= (DATA_CONSTANT << FLAG_BITS_LENGTH)
-#define SET_DY_CONSTANT(FLAGS)      ((FLAGS).data_flags) |= (DATA_CONSTANT << FLAG_BITS_DY)
-#define SET_DX_CONSTANT(FLAGS)      ((FLAGS).data_flags) |= (DATA_CONSTANT << FLAG_BITS_DX)
-#define SET_A_CONSTANT(FLAGS)       ((FLAGS).data_flags) |= (DATA_CONSTANT << FLAG_BITS_A)
-#define SET_OUTLIER_CONSTANT(FLAGS) ((FLAGS).data_flags) |= (DATA_CONSTANT << FLAG_BITS_OUTLIER)
-
-#define SET_TYPE_ZIPPED(FLAGS)      ((FLAGS).data_flags) |= (DATA_ZIPPED << FLAG_BITS_TYPE)
-#define SET_DIFF_ZIPPED(FLAGS)      ((FLAGS).data_flags) |= (DATA_ZIPPED << FLAG_BITS_DIFF)
-#define SET_LENGTH_ZIPPED(FLAGS)    ((FLAGS).data_flags) |= (DATA_ZIPPED << FLAG_BITS_LENGTH)
-#define SET_DY_ZIPPED(FLAGS)        ((FLAGS).data_flags) |= (DATA_ZIPPED << FLAG_BITS_DY)
-#define SET_DX_ZIPPED(FLAGS)        ((FLAGS).data_flags) |= (DATA_ZIPPED << FLAG_BITS_DX)
-#define SET_A_ZIPPED(FLAGS)         ((FLAGS).data_flags) |= (DATA_ZIPPED << FLAG_BITS_A)
-#define SET_OUTLIER_ZIPPED(FLAGS)   ((FLAGS).data_flags) |= (DATA_ZIPPED << FLAG_BITS_OUTLIER)
-
-#define FLAG_TYPE(O)                ((((O).data_flags) >> FLAG_BITS_TYPE   ) & FLAG_MASK)
-#define FLAG_DIFF(O)                ((((O).data_flags) >> FLAG_BITS_DIFF   ) & FLAG_MASK)
-#define FLAG_LENGTH(O)              ((((O).data_flags) >> FLAG_BITS_LENGTH ) & FLAG_MASK)
-#define FLAG_DY(O)                  ((((O).data_flags) >> FLAG_BITS_DY     ) & FLAG_MASK)
-#define FLAG_DX(O)                  ((((O).data_flags) >> FLAG_BITS_DX     ) & FLAG_MASK)
-#define FLAG_A(O)                   ((((O).data_flags) >> FLAG_BITS_A      ) & FLAG_MASK)
-#define FLAG_OUTLIER(O)             ((((O).data_flags) >> FLAG_BITS_OUTLIER) & FLAG_MASK)
-
-struct encoded {
-    uint8_t flags;   /* 0x1: zipped, 0x2: packed, 0x3: packed+zipped, 0x0: izipped */
-    uint32_t data_count;
-    union {
-        struct {
-            uint32_t data_size;
-            const uint8_t *data;
-        } zipped;
-        struct {
-            uint32_t data_size;
-            const uint8_t *data;
-            int64_t min;
-        } packed;
-        struct {
-            uint32_t data_flags;
-            uint32_t segments;
-            uint32_t outliers;
-            uint32_t type_size;
-            uint32_t diff_size;
-            uint32_t length_size;
-            uint32_t dy_size;
-            uint32_t dx_size;
-            uint32_t a_size;
-            uint32_t outlier_size;
-            
-            int64_t min_diff;
-            int64_t min_length;
-            int64_t min_dy;
-            int64_t min_dx;
-            int64_t min_a;
-            int64_t min_outlier;
-            
-            const uint8_t *type;
-            const uint8_t *diff;
-            const uint8_t *length;
-            const uint8_t *dy;
-            const uint8_t *dx;
-            const uint8_t *a;
-            const uint8_t *outlier;
-        } izipped;
-    } u;
-};
-
-#if 1
-#define DEBUG_PRINT(fmt, ...) { do { } while(0); }
-#else
-#define DEBUG_PRINT(fmt, ...) fprintf(stderr, "%s - " fmt "\n", __func__, __VA_ARGS__)
-#endif
-
diff --git a/libs/vxf/izip-decode.impl.h b/libs/vxf/izip-decode.impl.h
deleted file mode 100644
index d6f88f8..0000000
--- a/libs/vxf/izip-decode.impl.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-static
-rc_t DECODE(STYPE Y[], unsigned N, const uint8_t src[], unsigned ssize, int swap) {
-    rc_t rc;
-    struct encoded encoded;
-    struct decoded decoded;
-    unsigned i;
-    unsigned j;
-    unsigned k;
-    unsigned u;
-    unsigned v;
-    
-    rc = deserialize_encoded(&encoded, src, ssize, swap);
-    if (rc)
-        return rc;
-    rc = decode_encoded(&decoded, &encoded);
-    if (rc == 0) {
-        if (decoded.diff->used != N)
-            return RC(rcXF, rcFunction, rcExecuting, rcData, rcInvalid);
-        
-        if ((encoded.flags & 3) == 0) {
-            if (N == 121)
-                DEBUG_PRINT("decompressing izip", 0);
-            if (swap) {
-                unpack_nbuf_swap(decoded.diff);
-                unpack_nbuf_swap(decoded.length);
-                unpack_nbuf_swap(decoded.dy);
-                unpack_nbuf_swap(decoded.dx);
-                unpack_nbuf_swap(decoded.a);
-                if (decoded.outlier)
-                    unpack_nbuf_swap(decoded.outlier);
-            }
-            else {
-                unpack_nbuf(decoded.diff);
-                unpack_nbuf(decoded.length);
-                unpack_nbuf(decoded.dy);
-                unpack_nbuf(decoded.dx);
-                unpack_nbuf(decoded.a);
-                if (decoded.outlier)
-                    unpack_nbuf(decoded.outlier);
-            }
-
-            if (N == 121) {
-                for (i = 0; i != decoded.diff->used; ++i) {
-                    DEBUG_PRINT("  %i - diff: %lli", i, decoded.diff->data.raw[i]);
-                }
-            }
-            
-            for (u = v = k = i = 0; i != decoded.lines + decoded.outliers; ++i) {
-                unsigned n = (unsigned)decoded.length->data.raw[i];
-                
-                if (decoded.type[i]) {
-                    if (N == 121)
-                        DEBUG_PRINT("extracting stored segment %u; length: %u", i, n);
-                    for (j = 0; j != n; ++j, ++k, ++v)
-                        Y[k] = (STYPE)( decoded.outlier->data.raw[v] );
-                }
-                else {
-                    const double m = decoded.dy->data.raw[u] / (double)decoded.dx->data.raw[u];
-                    
-                    if (N == 121)
-                        DEBUG_PRINT("extracting line segment %u; length: %u; dy: %lli; dx: %lli; a: %lli", i, n, decoded.dy->data.raw[u], decoded.dx->data.raw[u], decoded.a->data.raw[u]);
-                    for (j = 0; j != n; ++j, ++k) {
-                        Y[k] = (STYPE)( decoded.diff->data.raw[k] + (STYPE)(decoded.a->data.raw[u] + j * m) );
-                        if (N == 121)
-                            DEBUG_PRINT("    %u: %i", k, (int)Y[k]);
-                    }
-                    ++u;
-                }
-            }
-        }
-        else if ((encoded.flags & 2) != 0) {
-            if ((((size_t)1) << decoded.size_type) > sizeof(Y[0])) {
-#if _DEBUGGING
-                fprintf(stderr, "iunzip: refusing to decode from original element size of %u to %u\n", (unsigned)(((size_t)1) << decoded.size_type), (unsigned)sizeof(Y[0]));
-#endif
-                return RC(rcXF, rcFunction, rcExecuting, rcRange, rcExcessive);
-            }
-            switch (decoded.diff->var) {
-            case 4:
-                for (i = 0; i != decoded.diff->used; ++i)
-                    Y[i] = (int32_t)( decoded.diff->data.u8[i] + decoded.diff->min );
-                break;
-            case 3:
-                for (i = 0; i != decoded.diff->used; ++i)
-                    Y[i] = (int32_t)( decoded.diff->data.u16[i] + decoded.diff->min );
-                break;
-            case 2:
-                for (i = 0; i != decoded.diff->used; ++i)
-                    Y[i] = (int32_t)( decoded.diff->data.u32[i] + decoded.diff->min );
-                break;
-            case 1:
-            default:
-                for (i = 0; i != decoded.diff->used; ++i)
-                    Y[i] = (int32_t)( decoded.diff->data.u64[i] + decoded.diff->min );
-                break;
-            }
-        }
-        else {
-            if ((((size_t)1) << decoded.size_type) > sizeof(Y[0])) {
-#if _DEBUGGING
-                fprintf(stderr, "iunzip: refusing to decode from original element size of %u to %u\n", (unsigned)(((size_t)1) << decoded.size_type), (unsigned)sizeof(Y[0]));
-#endif
-                return RC(rcXF, rcFunction, rcExecuting, rcRange, rcExcessive);
-            }
-            
-            switch (decoded.diff->var) {
-            case 4:
-                for (i = 0; i != decoded.diff->used; ++i)
-                    Y[i] = (int32_t)decoded.diff->data.u8[i];
-                break;
-            case 3:
-                for (i = 0; i != decoded.diff->used; ++i)
-                    Y[i] = (int32_t)decoded.diff->data.u16[i];
-                break;
-            case 2:
-                for (i = 0; i != decoded.diff->used; ++i)
-                    Y[i] = (int32_t)decoded.diff->data.u32[i];
-                break;
-            case 1:
-            default:
-                for (i = 0; i != decoded.diff->used; ++i)
-                    Y[i] = (int32_t)decoded.diff->data.u64[i];
-                break;
-            }
-        }
-    }
-    if (decoded.diff)   free(decoded.diff);
-    if (decoded.type)   free(decoded.type);
-    if (decoded.length) free(decoded.length);
-    if (decoded.dy)     free(decoded.dy);
-    if (decoded.dx)     free(decoded.dx);
-    if (decoded.a)      free(decoded.a);
-    if (decoded.outlier) free(decoded.outlier);
-    
-    return rc;
-}
diff --git a/libs/vxf/izip-encode.impl.h b/libs/vxf/izip-encode.impl.h
deleted file mode 100644
index ef23619..0000000
--- a/libs/vxf/izip-encode.impl.h
+++ /dev/null
@@ -1,523 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-static int ANALYZE(stats_t stats[], const unsigned scnt, unsigned *fcnt, const STYPE Y[], const unsigned dcnt, STYPE *MIN, STYPE *MAX) {
-    stats_t **base;
-    unsigned i;
-    unsigned k;
-    unsigned n = (dcnt + scnt - 1) / scnt;
-    int loops;
-    unsigned split;
-    unsigned merged = 0;
-    STYPE min = Y[0];
-    STYPE max = Y[0];
-    
-    memset(stats, 0, sizeof(stats[0]));
-    
-    for (i = 0, k = 0; i != dcnt; ++i) {
-        if (min > Y[i])
-            min = Y[i];
-        if (max < Y[i])
-            max = Y[i];
-        
-        stats[k].sy  += (double_t)Y[i];
-        stats[k].syy += (double_t)Y[i] * Y[i];
-        stats[k].sxy += (double_t)Y[i] * i;
-        
-        stats[k].sx  += (double_t)i;
-        stats[k].sxx += (double_t)i * i;
-        
-        ++stats[k].n;
-        if (stats[k].n != n)
-            continue;
-        
-        stats[k].fit = fitness( stats + k );
-        ++k;
-        if (k == scnt)
-            break;
-        memset(stats + k, 0, sizeof(stats[0]));
-        stats[k].x = i + 1;
-    }
-    n = k;
-    if (k != scnt && stats[k].n) {
-        stats[k].fit = fitness( stats + k );
-        ++n;
-    }
-    
-    *MIN = min;
-    *MAX = max;
-    
-    if (n == 1) {
-        *fcnt = 1;
-        return 0;
-    }
-    for (k = 0, i = 1; i != n; ++i) {
-        stats_t temp;
-        
-        merge(&temp, &stats[k], &stats[i]);
-        if (temp.fit >= stats[k].fit) {
-            stats[k] = temp;
-        }
-        else {
-            stats[++k] = stats[i];
-        }
-    }
-    n = k + 1;
-    
-    if (n == 1) {
-        *fcnt = 1;
-        return 0;
-    }
-    
-    base = malloc(scnt * sizeof(base[0]));
-    if (base == NULL)
-        return 1;
-    
-    for (loops = dcnt; loops > 0; loops >>= 1) {
-        for (i = 0, k = 0; i != n; ++i) {
-            assert(stats[i].x == k);
-            k += stats[i].n;
-            base[i] = &stats[i];
-            stats[i].i = i;
-        }
-        assert( k == dcnt );
-        ksort( base, n, sizeof(base[0]), comp_fitness, NULL );
-        if (n < scnt) {
-            for (i = 0, split = 0; i != n && n + split != scnt; ++i) {
-                stats_t R;
-                stats_t L = *base[i];
-                unsigned u = L.n / 2;
-                unsigned j;
-                
-                if (u == 0)
-                    continue;
-                
-                memset(&R, 0, sizeof(R));
-                                
-                R.x = L.x + L.n - u;
-                R.n = u;
-                u = L.x + L.n;
-                for (j = R.x; j != u; ++j) {
-                    R.sx  += j;
-                    R.sxx += (double_t)j * j;
-                    R.sy  += Y[j];
-                    R.syy += (double_t)Y[j] * Y[j];
-                    R.sxy += (double_t)Y[j] * j;
-                }
-                L.sx  -= R.sx;
-                L.sxx -= R.sxx;
-                L.sy  -= R.sy;
-                L.syy -= R.syy;
-                L.sxy -= R.sxy;
-                assert(L.n > R.n);
-                L.n   -= R.n;
-                
-                L.fit = fitness( &L );
-                R.fit = fitness( &R );
-                
-                if (L.n == 1 || R.n == 1 || L.fit > base[i]->fit || R.fit > base[i]->fit) {
-                    assert(L.x + L.n == R.x);
-                    assert(L.n + R.n == stats[L.i].n);
-                    L.i = R.i = dcnt; /* invalid value */
-                    *base[i] = L;
-                    stats[n + split] = R;
-                    ++split;
-                }
-            }
-            if (split) {
-                n += split;
-                ksort( stats, n, sizeof(stats[0]), comp_position, NULL );
-                continue;
-            }
-        }
-        
-        merged = 0;
-        for (i = n; i; ) {
-            stats_t temp;
-            unsigned j;
-            
-            --i;
-            j = base[i]->i;
-            
-            if (j == n - 1 || stats[j].n == 0 || stats[j + 1].n == 0)
-                continue;
-            
-            merge(&temp, stats + j, stats + j + 1);
-            if (temp.n > 2 && temp.fit >= stats[j].fit) {
-                stats[j] = temp;
-                stats[j + 1].n = 0;
-                stats[j + 1].x = dcnt;
-                ++merged;
-            }
-        }
-        if (merged == 0)
-            break;
-        
-        for (k = 0, i = 1; i < n; ++i) {
-            if (stats[i].n)
-                stats[++k] = stats[i];
-        }
-        assert(k + 1 == n - merged);
-        n -= merged;
-    }
-    
-    *fcnt = n;
-    free(base);
-    return 0;
-}
-
-#ifndef ABS
-#define ABS(X) ((uint64_t)(X >= 0 ? (X) : (-(X))))
-#endif
-
-static
-rc_t ENCODE(uint8_t *dst, unsigned dsize, unsigned *psize, const STYPE Y[], unsigned N, int DUMP) {
-    stats_t *stats = 0;
-    unsigned m = (N + CHUNK_SIZE - 1) / CHUNK_SIZE;
-    unsigned n;
-    rc_t rc = 0;
-    unsigned i;
-    unsigned j;
-    unsigned k;
-    unsigned u;
-    unsigned v;
-    STYPE min = 0;
-    STYPE max = 0;
-    unsigned pack_size = 0;
-    szbuf zipped;
-    struct decoded decoded;
-    struct encoded encoded;
-    /*int debugging = 0;*/
-
-    if (psize)
-        *psize = 0;
-    memset(&decoded, 0, sizeof(decoded));
-
-    do {
-        stats = malloc(m * sizeof(stats[0]));
-        if (stats == NULL) {
-            rc = RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-            break;
-        }
-        rc = ANALYZE(stats, m, &n, Y, N, &min, &max);
-        if (rc) {
-            rc = RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-            break;
-        }
-        
-        if ((ABS(min) >> 8) == 0 && (ABS(max) >> 8) == 0) {
-            decoded.size_type = 0;
-            pack_size = N;
-        }
-        else if ((ABS(min) >> 16) == 0 && (ABS(max) >> 16) == 0) {
-            decoded.size_type = 1;
-            pack_size = N * 2;
-        }
-        else if ((ABS(min) >> 32) == 0 && (ABS(max) >> 32) == 0) {
-            decoded.size_type = 2;
-            pack_size = N * 4;
-        }
-        else {
-            decoded.size_type = 3;
-            pack_size = N * 8;
-        }
-        
-        decoded.diff = alloc_raw_nbuf(N);
-        if (decoded.diff == NULL) {
-            rc = RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-            break;
-        }
-        decoded.outlier = alloc_raw_nbuf(N);
-        if (decoded.outlier == NULL) {
-            rc = RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-            break;
-        }
-        decoded.type = malloc(n);
-        if (decoded.type == NULL) {
-            rc = RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-            break;
-        }
-        decoded.length = alloc_raw_nbuf(n);
-        if (decoded.length == NULL) {
-            rc = RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-            break;
-        }
-
-        for (v = u = k = i = 0; i != n; ++i) {
-            decoded.length->data.raw[i] = stats[i].n;
-            if (stats[i].n >= OUTLIER_LIMIT) {
-                double_t M;
-                int64_t dy;
-                int64_t dx;
-                int64_t a;
-                
-                ++v;
-                regress_params(stats + i, &dy, &dx, &a);
-                M = dy / (double_t)dx;
-                for (j = 0; j != stats[i].n; ++j, ++k) {
-                    decoded.diff->data.raw[k] = Y[k] - (STYPE)(M * j + a);
-                    if (decoded.diff->min > decoded.diff->data.raw[k] || k == 0)
-                        decoded.diff->min = decoded.diff->data.raw[k];
-                    if (decoded.diff->max < decoded.diff->data.raw[k] || k == 0)
-                        decoded.diff->max = decoded.diff->data.raw[k];
-                }
-                decoded.type[i] = 0;
-            }
-            else {
-                for (j = 0; j != stats[i].n; ++j, ++k, ++u) {
-                    decoded.diff->data.raw[k] = 0;
-                    if (decoded.diff->min > 0 || k == 0)
-                        decoded.diff->min = 0;
-                    if (decoded.diff->max < 0 || k == 0)
-                        decoded.diff->max = 0;
-                    decoded.outlier->data.raw[u] = Y[k];
-                    if (decoded.outlier->min > decoded.outlier->data.raw[u] || u == 0)
-                        decoded.outlier->min = decoded.outlier->data.raw[u];
-                    if (decoded.outlier->max < decoded.outlier->data.raw[u] || u == 0)
-                        decoded.outlier->max = decoded.outlier->data.raw[u];
-                }
-                ++decoded.outliers;
-                decoded.type[i] = 1;
-            }
-        }
-        decoded.length->used = n;
-        decoded.outlier->used = u;
-        decoded.diff->used = k;
-
-        decoded.dy = alloc_raw_nbuf(v);
-        if (decoded.dy == NULL) {
-            rc = RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-            break;
-        }
-        decoded.dx = alloc_raw_nbuf(v);
-        if (decoded.dx == NULL) {
-            rc = RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-            break;
-        }
-        decoded.a = alloc_raw_nbuf(v);
-        if (decoded.a == NULL) {
-            rc = RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-            break;
-        }
-        for (u = i = 0; i < n; ++i) {
-            if (decoded.type[i] == 0) {
-                regress_params(stats + i, decoded.dy->data.raw + u, decoded.dx->data.raw + u, decoded.a->data.raw + u);
-                if (u == 0) {
-                    decoded.dy->min = decoded.dy->data.raw[u];
-                    decoded.dy->max = decoded.dy->data.raw[u];
-                    decoded.dx->min = decoded.dx->data.raw[u];
-                    decoded.dx->max = decoded.dx->data.raw[u];
-                    decoded.a->min = decoded.a->data.raw[u];
-                    decoded.a->max = decoded.a->data.raw[u];
-                }
-                else {
-                    if (decoded.dy->min > decoded.dy->data.raw[u])
-                        decoded.dy->min = decoded.dy->data.raw[u];
-                    if (decoded.dy->max < decoded.dy->data.raw[u])
-                        decoded.dy->max = decoded.dy->data.raw[u];
-                    if (decoded.dx->min > decoded.dx->data.raw[u])
-                        decoded.dx->min = decoded.dx->data.raw[u];
-                    if (decoded.dx->max < decoded.dx->data.raw[u])
-                        decoded.dx->max = decoded.dx->data.raw[u];
-                    if (decoded.a->min > decoded.a->data.raw[u])
-                        decoded.a->min = decoded.a->data.raw[u];
-                    if (decoded.a->max < decoded.a->data.raw[u])
-                        decoded.a->max = decoded.a->data.raw[u];
-                }
-                ++u;            
-            }
-        }
-        decoded.data_count = N;
-        decoded.lines = decoded.dy->used = decoded.dx->used = decoded.a->used = u;
-        
-        free(stats); stats = NULL;
-        
-        for (u = k = 0, i = 1; i < n; ++i) {
-            if (decoded.type[i] == 1 && decoded.type[k] == 1) {
-                --decoded.length->used;
-                --decoded.outliers;
-                decoded.length->data.raw[k] += decoded.length->data.raw[i];
-            }
-            else {
-                ++k;
-                if (k != i) {
-                    decoded.type[k] = decoded.type[i];
-                    decoded.length->data.raw[k] = decoded.length->data.raw[i];
-                }
-            }
-        }
-        for (i = 0; i != decoded.length->used; ++i) {
-            if (decoded.length->min > decoded.length->data.raw[i] || i == 0)
-                decoded.length->min = decoded.length->data.raw[i];
-            if (decoded.length->max < decoded.length->data.raw[i] || i == 0)
-                decoded.length->max = decoded.length->data.raw[i];
-        }
-        if (DUMP) {
-            if (N == 121) {
-                DEBUG_PRINT("Y:", 0);
-                for (i = 0; i != N; ++i)
-                    DEBUG_PRINT("    %u: %i, diff: %lli", i, (int)Y[i], decoded.diff->data.raw[i]);
-
-                DEBUG_PRINT("%u elements, %u stored, %u lines", N, decoded.outliers, decoded.lines);
-                for (i = 0; i != decoded.lines; ++i) {
-                    DEBUG_PRINT("line %u: dy: %lli; dx: %lli; a: %lli", i, decoded.dy->data.raw[i], decoded.dx->data.raw[i], decoded.a->data.raw[i]);
-                }
-            }
-            if (decoded.diff)   free(decoded.diff);
-            if (decoded.type)   free(decoded.type);
-            if (decoded.length) free(decoded.length);
-            if (decoded.dy)     free(decoded.dy);
-            if (decoded.dx)     free(decoded.dx);
-            if (decoded.a)      free(decoded.a);
-            if (decoded.outlier) free(decoded.outlier);
-                            
-            if (stats)  free(stats);
-            return 0;
-        }
-        pack_nbuf(decoded.diff);
-        pack_nbuf(decoded.length);
-        pack_nbuf(decoded.dy);
-        pack_nbuf(decoded.dx);
-        pack_nbuf(decoded.a);
-        pack_nbuf(decoded.outlier);
-        
-        rc = encode_decoded(&encoded, &decoded);
-        if (rc == 0) {
-            unsigned act_size;
-            
-            rc = serialize_encoded(dst, dsize, &act_size, &encoded);
-            /* DEBUG_PRINT("izip compress to %u bytes", act_size); */
-            if (psize)
-                *psize = act_size;
-            free_encoded(&encoded);
-        }
-    } while (0);
-    
-    if (decoded.diff)   free(decoded.diff);
-    if (decoded.type)   free(decoded.type);
-    if (decoded.length) free(decoded.length);
-    if (decoded.dy)     free(decoded.dy);
-    if (decoded.dx)     free(decoded.dx);
-    if (decoded.a)      free(decoded.a);
-    if (decoded.outlier) free(decoded.outlier);
-                            
-    if (stats)  free(stats);
-    
-    if (*psize && pack_size && (pack_size + 13) < *psize) {
-        decoded.diff = alloc_raw_nbuf(N);
-        if (decoded.diff) {
-            decoded.diff->max = max;
-            decoded.diff->min = min;
-            decoded.diff->used = N;
-            
-            switch (decoded.size_type) {
-            case 0:
-                decoded.diff->var = 4;
-                for (i = 0; i != N; ++i)
-                    decoded.diff->data.u8[i] = (uint8_t)( Y[i] - min );
-                break;
-            case 1:
-                decoded.diff->var = 3;
-                for (i = 0; i != N; ++i)
-                    decoded.diff->data.u16[i] = (uint16_t)( Y[i] - min );
-                break;
-            case 2:
-                decoded.diff->var = 2;
-                for (i = 0; i != N; ++i)
-                    decoded.diff->data.u32[i] = (uint32_t)( Y[i] - min );
-                break;
-            default:
-                decoded.diff->var = 1;
-                for (i = 0; i != N; ++i)
-                    decoded.diff->data.u64[i] = Y[i] - min;
-                break;
-            }
-            zipped.buf = malloc(zipped.size = nbuf_size(decoded.diff));
-
-            if (zipped.buf) {
-                rc_t rc2 = zlib_compress(&zipped, decoded.diff->data.u8, zipped.size, Z_DEFAULT_STRATEGY, Z_BEST_SPEED);
-                if (rc2 == 0 && zipped.used > 0) {
-                    encoded.flags = (decoded.size_type << 2) | 3;
-                    encoded.data_count = N;
-                    encoded.u.zipped.data_size = zipped.used;
-                    encoded.u.zipped.data = zipped.buf;
-                    encoded.u.packed.min = min;
-                    rc = serialize_encoded(dst, dsize, psize, &encoded);
-/*                    DEBUG_PRINT("packed+zipped to %u bytes", *psize); */
-                    /* debugging = 3; */
-                }
-                else {
-                    encoded.flags = (decoded.size_type << 2) | 2;
-                    encoded.data_count = N;
-                    encoded.u.packed.data_size = nbuf_size(decoded.diff);
-                    encoded.u.packed.data = decoded.diff->data.u8;
-                    encoded.u.packed.min = min;
-                    rc = serialize_encoded(dst, dsize, psize, &encoded);
-/*                    DEBUG_PRINT("packed to %u bytes", *psize); */
-                    /* debugging = 2; */
-                }
-                free(zipped.buf);
-            }
-            else {
-                rc = RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-            }
-            free(decoded.diff);
-        }
-        else {
-            rc = RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-        }
-    }
-    else {
-        /* DEBUG_PRINT("packed would have been %u", pack_size + 13); */
-    }
-
-    if (*psize) {
-        size_t bsize = N * sizeof(Y[0]);
-        assert(bsize <= UINT32_MAX);
-        zipped.buf = malloc(zipped.size = (unsigned)bsize);
-        if (zipped.buf) {
-            rc_t rc2 = zlib_compress(&zipped, Y, zipped.size, Z_DEFAULT_STRATEGY, Z_BEST_SPEED);
-            if (rc2 == 0 && zipped.used + 5 <= *psize) {
-                encoded.flags = ((sizeof(Y[0]) == 1 ? 0 : sizeof(Y[0]) == 2 ? 1 : sizeof(Y[0]) == 4 ? 2 : 3) << 2) | 1;
-                encoded.data_count = N;
-                encoded.u.zipped.data_size = zipped.used;
-                encoded.u.zipped.data = zipped.buf;
-                rc = serialize_encoded(dst, dsize, psize, &encoded);
-                /* DEBUG_PRINT("zipped to %u bytes", *psize); */
-                /* debugging = 1; */
-            }
-            else {
-                /* DEBUG_PRINT("zipped would have been %u", zipped.used + 5); */
-            }
-
-            free(zipped.buf);
-        }
-    }
-    /* if (debugging == 0) { */
-    /*     ENCODE(NULL, 0, NULL, Y, N, 1); */
-    /* } */
-    return rc;
-}
diff --git a/libs/vxf/izip.c b/libs/vxf/izip.c
deleted file mode 100644
index 33e1306..0000000
--- a/libs/vxf/izip.c
+++ /dev/null
@@ -1,866 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <compiler.h>
-#include <klib/sort.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-#include <byteswap.h>
-#include <os-native.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <float.h>
-#include <limits.h>
-#include <math.h>
-
-#include <zlib.h>
-
-#include <stdio.h>
-#include <assert.h>
-
-#include "izip-common.h"
-
-#define FTYPE double_t
-typedef struct stats_t {
-    FTYPE sy, syy, sxy;
-    FTYPE sx, sxx;
-    FTYPE fit;
-    unsigned n;
-    unsigned i;
-    unsigned x;
-} stats_t;
-
-#if 0
-static void debug_print_stats(const stats_t *st) {
-    fprintf(stderr, "sy: %lf, syy: %lf, sxy: %lf, sx: %lf, sxx: %lf, n: %u\n",
-        st->sy, st->syy, st->sxy, st->sx, st->sxx, st->n);
-}
-
-static void debug_print_data_u32(const uint32_t Y[], unsigned n) {
-    unsigned i;
-
-    for (i = 0; i != n; ++i) {
-        fprintf(stderr, "%u\n", Y[i]);
-    }
-}
-
-static void debug_print_data_u64(const uint64_t Y[], unsigned n) {
-    unsigned i;
-
-    for (i = 0; i != n; ++i) {
-        fprintf(stderr, "%ju\n", Y[i]);
-    }
-}
-#endif
-
-static FTYPE fitness( const stats_t *st)
-{
-    double_t var_xy = st->sxy - st->sx * st->sy / (double_t)st->n;
-    double_t var_x  = st->sxx - st->sx * st->sx / (double_t)st->n;
-    double_t var_y  = st->syy - st->sy * st->sy / (double_t)st->n;
-    
-    if (st->n <= 2)
-        return 1.0;
-    if (var_y == 0.0)
-        return 1.0;
-    if (var_xy != 0.0) {
-        if (var_x != 0.0) {
-            double_t fit = (var_xy / var_x) * (var_xy / var_y);
-            assert(-1.0 <= fit && fit <= 1.0);
-            return fit;
-        }
-    }
-    return 0.0;
-}
-
-static void regress_params(const stats_t *st, int64_t *dy, int64_t *dx, int64_t *a) {
-    double_t beta = (st->sxy - st->sx * st->sy / st->n) / ((double_t)st->n * (st->n - 1) * (st->n + 1) / 12.0);
-    double_t beta2;
-    int sgn = 1;
-    
-    if (beta < 0) {
-        beta = -beta;
-        sgn = -1;
-    }
-    if (beta > 0 && beta < 1) {
-        *dy = sgn * UINT16_MAX;
-        *dx = (int64_t)( UINT16_MAX / beta );
-    }
-    else if (beta < (UINT64_MAX / UINT16_MAX)) {
-        *dy = (int64_t)( sgn * beta * UINT16_MAX );
-        *dx = UINT16_MAX;
-    }
-    else {
-        *dy = (int64_t)( sgn * beta );
-        *dx = 1;
-    }
-    beta2 = (double_t)*dy / *dx;
-    *a = (int64_t)( (st->sy / st->n) - beta2 * (st->n - 1) / 2 );
-    
-    return;
-}
-
-typedef struct {
-    unsigned size;
-    unsigned used;
-    void *buf;
-} szbuf;
-
-static void pack_nbuf8(nbuf *x) {
-    unsigned i;
-    const unsigned n = x->used;
-    
-    for (i = 0; i != n; ++i)
-        x->data.u8[i] = (uint8_t)( x->data.raw[i] - x->min );
-    x->var = 4;
-}
-
-static void pack_nbuf16(nbuf *x) {
-    unsigned i;
-    const unsigned n = x->used;
-    
-    for (i = 0; i != n; ++i)
-        x->data.u16[i] = (uint16_t)( x->data.raw[i] - x->min );
-    x->var = 3;
-}
-
-static void pack_nbuf32(nbuf *x) {
-    unsigned i;
-    const unsigned n = x->used;
-    
-    for (i = 0; i != n; ++i)
-        x->data.u32[i] = (uint32_t)( x->data.raw[i] - x->min );
-    x->var = 2;
-}
-
-static void pack_nbuf(nbuf *x) {
-    if ((x->max - x->min) >> 8 == 0) {
-        pack_nbuf8(x);
-    }
-    else if ((x->max - x->min) >> 16 == 0) {
-        pack_nbuf16(x);
-    }
-    else if ((x->max - x->min) >> 32 == 0) {
-        pack_nbuf32(x);
-    }
-    else {
-        unsigned i;
-        const unsigned n = x->used;
-        
-        for (i = 0; i != n; ++i)
-            x->data.u64[i] = x->data.raw[i] - x->min;
-        x->var = 1;
-    }
-}
-
-static rc_t zlib_compress(szbuf *dst, const void *src, uint32_t ssize, int32_t strategy, int32_t level) {
-    z_stream s;
-    int zr;
-    rc_t rc = 0;
-    
-    memset(&s, 0, sizeof(s));
-    s.next_in = (void *)src;
-    s.avail_in = ssize;
-    s.next_out = dst->buf;
-    s.avail_out = (uInt)dst->size;
-    
-    dst->used = 0;
-    
-    zr = deflateInit2(&s, level, Z_DEFLATED, -15, 9, strategy);
-    switch (zr) {
-    case 0:
-        break;
-    case Z_MEM_ERROR:
-        return RC(rcVDB, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    case Z_STREAM_ERROR:
-        return RC(rcVDB, rcFunction, rcExecuting, rcParam, rcInvalid);
-    default:
-        return RC(rcVDB, rcFunction, rcExecuting, rcSelf, rcUnexpected);
-    }
-    zr = deflate(&s, Z_FINISH);
-    switch (zr) {
-    case Z_STREAM_END:
-        break;
-    case Z_OK:
-        s.total_out = 0;
-        break;
-    default:
-        rc = RC(rcVDB, rcFunction, rcExecuting, rcSelf, rcUnexpected);
-        break;
-    }
-    zr = deflateEnd(&s);
-    if (zr != Z_OK)
-        rc = RC(rcVDB, rcFunction, rcExecuting, rcSelf, rcUnexpected);
-    if (rc == 0) {
-        assert(s.total_out <= UINT32_MAX);
-        dst->used = (uint32_t)s.total_out;
-    }
-    return rc;
-}
-
-static
-void encode_types(uint8_t *packed, const uint8_t type[], unsigned n) {
-    unsigned i;
-    unsigned j;
-    unsigned k;
-    
-    for (i = k = 0, j = 1; i != n; ++i) {
-        if (type[i])
-            k |= j;
-        j <<= 1;
-        if (j == 0x100) {
-            j = 1;
-            packed[i / 8] = k;
-            k = 0;
-        }
-    }
-    packed[i / 8] = k;
-}
-
-static rc_t encode_decoded(struct encoded *y, const struct decoded *x) {
-    rc_t rc = 0;
-    uint8_t *temp;
-    unsigned temp_size;
-    szbuf zbuf;
-    
-    memset(y, 0, sizeof(*y));
-    y->flags = x->size_type << 2;
-    y->data_count = x->data_count;
-    y->u.izipped.segments = x->lines + x->outliers;
-    y->u.izipped.outliers = x->outliers ? x->outlier->used : 0;
-    
-    y->u.izipped.min_diff = x->diff->min;
-    y->u.izipped.min_length = x->length->min;
-    y->u.izipped.min_dy = x->dy->min;
-    y->u.izipped.min_dx = x->dx->min;
-    y->u.izipped.min_a = x->a->min;
-    y->u.izipped.min_outlier = x->outlier->min;
-    
-    if (x->outliers) {
-        temp = malloc((temp_size = (x->lines + x->outliers + 7) / 8) + 1);
-        if (temp == NULL)
-            return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-
-        encode_types(temp, x->type, x->lines + x->outliers);
-        
-        zbuf.buf = malloc(zbuf.size = temp_size);
-        if (zbuf.buf == NULL)
-            return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-
-        zbuf.used = 0;
-        rc = zlib_compress(&zbuf, temp, temp_size, Z_DEFAULT_STRATEGY, Z_BEST_SPEED);
-        if (rc) {
-            free(zbuf.buf);
-            free(temp);
-            return rc;
-        }
-        if (zbuf.used > 0 && zbuf.used < zbuf.size) {
-            free(temp);
-            SET_TYPE_ZIPPED(y->u.izipped);
-            y->u.izipped.type = zbuf.buf;
-            y->u.izipped.type_size = zbuf.used;
-        }
-        else {
-            free(zbuf.buf);
-            y->u.izipped.type = temp;
-            y->u.izipped.type_size = temp_size;
-        }
-    }
-    else {
-        SET_TYPE_ABSENT(y->u.izipped);
-        SET_OUTLIER_ABSENT(y->u.izipped);
-        y->u.izipped.type_size = 0;
-    }
-
-    if (x->diff->min == x->diff->max) {
-        SET_DIFF_CONSTANT(y->u.izipped);
-        y->u.izipped.diff_size = x->diff->used;
-    }
-    else {
-        zbuf.buf = malloc(zbuf.size = nbuf_size(x->diff));
-        if (zbuf.buf == NULL)
-            return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-        zbuf.used = 0;
-        
-        rc = zlib_compress(&zbuf, &x->diff->data, zbuf.size, Z_FILTERED, Z_BEST_SPEED);
-        if (rc) {
-            free(zbuf.buf);
-            return rc;
-        }
-        if (zbuf.used > 0 && zbuf.used < zbuf.size) {
-            SET_DIFF_ZIPPED(y->u.izipped);
-            y->u.izipped.diff = zbuf.buf;
-            y->u.izipped.diff_size = zbuf.used;
-        }
-        else {
-            y->u.izipped.diff = x->diff->data.u8;
-            y->u.izipped.diff_size = zbuf.size;
-            free(zbuf.buf);
-        }
-    }
-    
-    if (x->length->min == x->length->max) {
-        SET_LENGTH_CONSTANT(y->u.izipped);
-        y->u.izipped.length_size = x->length->used;
-    }
-    else {
-        zbuf.buf = malloc(zbuf.size = nbuf_size(x->length));
-        if (zbuf.buf == NULL)
-            return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-        zbuf.used = 0;
-        
-        rc = zlib_compress(&zbuf, &x->length->data, zbuf.size, Z_DEFAULT_STRATEGY, Z_BEST_SPEED);
-        if (rc) {
-            free(zbuf.buf);
-            return rc;
-        }
-        if (zbuf.used > 0 && zbuf.used < zbuf.size) {
-            SET_LENGTH_ZIPPED(y->u.izipped);
-            y->u.izipped.length = zbuf.buf;
-            y->u.izipped.length_size = zbuf.used;
-        }
-        else {
-            y->u.izipped.length = x->length->data.u8;
-            y->u.izipped.length_size = zbuf.size;
-            free(zbuf.buf);
-        }
-    }
-    
-    if (x->dy->min == x->dy->max) {
-        SET_DY_CONSTANT(y->u.izipped);
-        y->u.izipped.dy_size = x->dy->used;
-    }
-    else {
-        zbuf.buf = malloc(zbuf.size = nbuf_size(x->dy));
-        if (zbuf.buf == NULL)
-            return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-        zbuf.used = 0;
-        
-        rc = zlib_compress(&zbuf, &x->dy->data, zbuf.size, Z_DEFAULT_STRATEGY, Z_BEST_SPEED);
-        if (rc) {
-            free(zbuf.buf);
-            return rc;
-        }
-        if (zbuf.used > 0 && zbuf.used < zbuf.size) {
-            SET_DY_ZIPPED(y->u.izipped);
-            y->u.izipped.dy = zbuf.buf;
-            y->u.izipped.dy_size = zbuf.used;
-        }
-        else {
-            y->u.izipped.dy = x->dy->data.u8;
-            y->u.izipped.dy_size = zbuf.size;
-            free(zbuf.buf);
-        }
-    }
-    
-    if (x->dx->min == x->dx->max) {
-        SET_DX_CONSTANT(y->u.izipped);
-        y->u.izipped.dx_size = x->dx->used;
-    }
-    else {
-        zbuf.buf = malloc(zbuf.size = nbuf_size(x->dx));
-        if (zbuf.buf == NULL)
-            return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-        zbuf.used = 0;
-        
-        rc = zlib_compress(&zbuf, &x->dx->data, zbuf.size, Z_DEFAULT_STRATEGY, Z_BEST_SPEED);
-        if (rc) {
-            free(zbuf.buf);
-            return rc;
-        }
-        if (zbuf.used > 0 && zbuf.used < zbuf.size) {
-            SET_DX_ZIPPED(y->u.izipped);
-            y->u.izipped.dx = zbuf.buf;
-            y->u.izipped.dx_size = zbuf.used;
-        }
-        else {
-            y->u.izipped.dx = x->dx->data.u8;
-            y->u.izipped.dx_size = zbuf.size;
-            free(zbuf.buf);
-        }
-    }
-    
-    if (x->a->min == x->a->max) {
-        SET_A_CONSTANT(y->u.izipped);
-        y->u.izipped.a_size = x->a->used;
-    }
-    else {
-        zbuf.buf = malloc(zbuf.size = nbuf_size(x->a));
-        if (zbuf.buf == NULL)
-            return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-        zbuf.used = 0;
-        
-        rc = zlib_compress(&zbuf, &x->a->data, zbuf.size, Z_DEFAULT_STRATEGY, Z_BEST_SPEED);
-        if (rc) {
-            free(zbuf.buf);
-            return rc;
-        }
-        if (zbuf.used > 0 && zbuf.used < zbuf.size) {
-            SET_A_ZIPPED(y->u.izipped);
-            y->u.izipped.a = zbuf.buf;
-            y->u.izipped.a_size = zbuf.used;
-        }
-        else {
-            y->u.izipped.a = x->a->data.u8;
-            y->u.izipped.a_size = zbuf.size;
-            free(zbuf.buf);
-        }
-    }
-    
-    if (x->outliers != 0) {
-        zbuf.buf = malloc(zbuf.size = nbuf_size(x->outlier));
-        if (zbuf.buf == NULL)
-            return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-        zbuf.used = 0;
-        
-        rc = zlib_compress(&zbuf, &x->outlier->data, zbuf.size, Z_DEFAULT_STRATEGY, Z_BEST_SPEED);
-        if (rc) {
-            free(zbuf.buf);
-            return rc;
-        }
-        if (zbuf.used > 0 && zbuf.used < zbuf.size) {
-            SET_OUTLIER_ZIPPED(y->u.izipped);
-            y->u.izipped.outlier = zbuf.buf;
-            y->u.izipped.outlier_size = zbuf.used;
-        }
-        else {
-            y->u.izipped.outlier = x->outlier->data.u8;
-            y->u.izipped.outlier_size = zbuf.size;
-            free(zbuf.buf);
-        }
-    }
-    
-    return 0;
-}
-
-static void free_encoded(const struct encoded *self) {
-    switch (self->flags & 3) {
-    case 0:
-        if (FLAG_OUTLIER(self->u.izipped) == DATA_ZIPPED)
-            free((void *)self->u.izipped.outlier);
-        if (FLAG_A(self->u.izipped) == DATA_ZIPPED)
-            free((void *)self->u.izipped.a);
-        if (FLAG_DX(self->u.izipped) == DATA_ZIPPED)
-            free((void *)self->u.izipped.dx);
-        if (FLAG_DY(self->u.izipped) == DATA_ZIPPED)
-            free((void *)self->u.izipped.dy);
-        if (FLAG_LENGTH(self->u.izipped) == DATA_ZIPPED)
-            free((void *)self->u.izipped.length);
-        if (FLAG_DIFF(self->u.izipped) == DATA_ZIPPED)
-            free((void *)self->u.izipped.diff);
-        if (FLAG_TYPE(self->u.izipped) != DATA_ABSENT)
-            free((void *)self->u.izipped.type);
-        break;
-    default:
-        break;
-    }
-}
-
-#define SERIALZE16(X) do { if (i + 2 > dsize) return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient); memcpy(dst + i, &x->u.izipped.X, 2); i += 2; } while(0)
-#define SERIALZE32(X) do { if (i + 4 > dsize) return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient); memcpy(dst + i, &x->u.izipped.X, 4); i += 4; } while(0)
-#define SERIALZE64(X) do { if (i + 8 > dsize) return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient); memcpy(dst + i, &x->u.izipped.X, 8); i += 8; } while(0)
-
-static
-rc_t serialize_encoded(uint8_t *dst, unsigned dsize, unsigned *psize, const struct encoded *x) {
-    unsigned i = 0;
-   
-    *psize = 0;
-
-    if (i + 1 > dsize)
-        return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);    
-    dst[i] = x->flags; i += 1;
-    
-    if (i + 4 > dsize)
-        return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);    
-    memcpy(dst + i, &x->data_count, 4); i += 4;
-
-    switch (x->flags & 0x03) {
-    case 3:
-    case 2:
-        if (i + 8 > dsize)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);    
-        memcpy(dst + i, &x->u.packed.min, 8); i += 8;
-        /* fall thru */
-    case 1:
-        if (i + x->u.zipped.data_size > dsize)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);    
-        memcpy(dst + i, x->u.zipped.data, x->u.zipped.data_size); i += x->u.zipped.data_size;
-        *psize = i;
-        return 0;
-    default:
-        break;
-    }
-    
-    SERIALZE32(data_flags);
-    SERIALZE32(segments);
-    SERIALZE32(outliers);
-    SERIALZE32(type_size);
-    SERIALZE32(diff_size);
-    SERIALZE32(length_size);
-    SERIALZE32(dy_size);
-    SERIALZE32(dx_size);
-    SERIALZE32(a_size);
-    SERIALZE32(outlier_size);
-
-    SERIALZE64(min_diff);
-    SERIALZE64(min_length);
-    SERIALZE64(min_dy);
-    SERIALZE64(min_dx);
-    SERIALZE64(min_a);
-    SERIALZE64(min_outlier);
-    
-    if (FLAG_TYPE(x->u.izipped) != DATA_ABSENT && FLAG_TYPE(x->u.izipped) != DATA_CONSTANT) {
-        if (i + x->u.izipped.type_size > dsize)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        memcpy(dst + i, x->u.izipped.type, x->u.izipped.type_size); i += x->u.izipped.type_size;
-    }
-    
-    if (FLAG_DIFF(x->u.izipped) != DATA_ABSENT && FLAG_DIFF(x->u.izipped) != DATA_CONSTANT) {
-        if (i + x->u.izipped.diff_size > dsize)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        memcpy(dst + i, x->u.izipped.diff, x->u.izipped.diff_size); i += x->u.izipped.diff_size;
-    }
-    
-    if (FLAG_LENGTH(x->u.izipped) != DATA_ABSENT && FLAG_LENGTH(x->u.izipped) != DATA_CONSTANT) {
-        if (i + x->u.izipped.length_size > dsize)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        memcpy(dst + i, x->u.izipped.length, x->u.izipped.length_size); i += x->u.izipped.length_size;
-    }
-    
-    if (FLAG_DY(x->u.izipped) != DATA_ABSENT && FLAG_DY(x->u.izipped) != DATA_CONSTANT) {
-        if (i + x->u.izipped.dy_size > dsize)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        memcpy(dst + i, x->u.izipped.dy, x->u.izipped.dy_size); i += x->u.izipped.dy_size;
-    }
-    
-    if (FLAG_DX(x->u.izipped) != DATA_ABSENT && FLAG_DX(x->u.izipped) != DATA_CONSTANT) {
-        if (i + x->u.izipped.dx_size > dsize)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        memcpy(dst + i, x->u.izipped.dx, x->u.izipped.dx_size); i += x->u.izipped.dx_size;
-    }
-    
-    if (FLAG_A(x->u.izipped) != DATA_ABSENT && FLAG_A(x->u.izipped) != DATA_CONSTANT) {
-        if (i + x->u.izipped.a_size > dsize)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        memcpy(dst + i, x->u.izipped.a, x->u.izipped.a_size); i += x->u.izipped.a_size;
-    }
-    
-    if (FLAG_OUTLIER(x->u.izipped) != DATA_ABSENT && FLAG_OUTLIER(x->u.izipped) != DATA_CONSTANT) {
-        if (i + x->u.izipped.outlier_size > dsize)
-            return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        memcpy(dst + i, x->u.izipped.outlier, x->u.izipped.outlier_size); i += x->u.izipped.outlier_size;
-    }
-    
-    *psize = i;
-    return 0;
-}
-
-static int64_t CC comp_position(const void *A, const void *B, void * ignored) {
-    const stats_t *a = A;
-    const stats_t *b = B;
-    
-    return (int64_t)a->x - (int64_t)b->x;
-}
-
-static int64_t CC comp_fitness(const void *A, const void *B, void * ignored) {
-    const stats_t **a = (const stats_t **)A;
-    const stats_t **b = (const stats_t **)B;
-    
-    return (**a).fit < (**b).fit ?
-        -1 : (**b).fit < (**a).fit ? 1 : (int64_t)(**a).i - (int64_t)(**b).i;
-}
-
-static void merge(stats_t *dst, const stats_t *L, const stats_t *R) {
-    stats_t temp = *L;
-    
-    temp.sx  += R->sx;
-    temp.sxx += R->sxx;
-    temp.sy  += R->sy;
-    temp.syy += R->syy;
-    temp.sxy += R->sxy;
-    temp.n   += R->n;
-    temp.fit  = fitness( &temp );
-    
-    *dst = temp;
-}
-
-#define OUTLIER_LIMIT (12)
-#define CHUNK_SIZE (16)
-#define SANITY_CHECK 1
-
-/* for signed operations */
-#define ABS(X) ((uint64_t)(X >= 0 ? (X) : (-(X))))
-
-#define STYPE int8_t
-#define ANALYZE analyze_i8
-#define ENCODE encode_i8
-#include "izip-encode.impl.h"
-#undef STYPE
-#undef ANALYZE
-#undef ENCODE
-
-#define STYPE int16_t
-#define ANALYZE analyze_i16
-#define ENCODE encode_i16
-#include "izip-encode.impl.h"
-#undef STYPE
-#undef ANALYZE
-#undef ENCODE
-
-#define STYPE int32_t
-#define ANALYZE analyze_i32
-#define ENCODE encode_i32
-#include "izip-encode.impl.h"
-#undef STYPE
-#undef ANALYZE
-#undef ENCODE
-
-#define STYPE int64_t
-#define ANALYZE analyze_i64
-#define ENCODE encode_i64
-#include "izip-encode.impl.h"
-#undef STYPE
-#undef ANALYZE
-#undef ENCODE
-
-
-/* for unsigned operations */
-#undef ABS
-#define ABS(X) ((uint64_t)(X))
-
-#define STYPE uint8_t
-#define ANALYZE analyze_u8
-#define ENCODE encode_u8
-#include "izip-encode.impl.h"
-#undef STYPE
-#undef ANALYZE
-#undef ENCODE
-
-#define STYPE uint16_t
-#define ANALYZE analyze_u16
-#define ENCODE encode_u16
-#include "izip-encode.impl.h"
-#undef STYPE
-#undef ANALYZE
-#undef ENCODE
-
-#define STYPE uint32_t
-#define ANALYZE analyze_u32
-#define ENCODE encode_u32
-#include "izip-encode.impl.h"
-#undef STYPE
-#undef ANALYZE
-#undef ENCODE
-
-#define STYPE uint64_t
-#define ANALYZE analyze_u64
-#define ENCODE encode_u64
-#include "izip-encode.impl.h"
-#undef STYPE
-#undef ANALYZE
-#undef ENCODE
-
-typedef rc_t (*encode_f)(uint8_t *dst, unsigned dsize, unsigned *psize, const void *Y, unsigned N, int DUMP);
-
-struct self_t {
-    encode_f f;
-};
-
-static
-struct self_t selfs[8] = {
-    { (encode_f)encode_u8 },
-    { (encode_f)encode_i8 },
-    { (encode_f)encode_u16 },
-    { (encode_f)encode_i16 },
-    { (encode_f)encode_u32 },
-    { (encode_f)encode_i32 },
-    { (encode_f)encode_u64 },
-    { (encode_f)encode_i64 },
-};
-
-rc_t ex_encode8( void *dst, unsigned dsize, uint8_t *src,
-                 unsigned ssize_in_u8, unsigned *written )
-{
-    return selfs[0].f( dst, dsize, written, src, ssize_in_u8, 0 );
-}
-
-rc_t ex_encode16( void *dst, unsigned dsize, uint16_t *src,
-                  unsigned ssize_in_u16, unsigned *written )
-{
-    return selfs[2].f( dst, dsize, written, src, ssize_in_u16, 0 );
-}
-
-rc_t ex_encode32( void *dst, unsigned dsize, uint32_t *src,
-                  unsigned ssize_in_u32, unsigned *written )
-{
-    return selfs[4].f( dst, dsize, written, src, ssize_in_u32, 0 );
-}
-
-rc_t ex_encode64( void *dst, unsigned dsize, uint64_t *src,
-                  unsigned ssize_in_u64, unsigned *written )
-{
-    return selfs[6].f( dst, dsize, written, src, ssize_in_u64, 0 );
-}
-
-#if 0
-static
-rc_t CC izip(
-               void *Self,
-               const VXformInfo *info,
-               VBlobResult *dst,
-               const VBlobData *src,
-               VBlobHeader *hdr
-) {
-    rc_t rc = 0;
-    const struct self_t *self = Self;
-    uint32_t dsize;
-    
-    VBlobHeaderSetVersion(hdr, 0);
-
-    assert(src->elem_count >> 32 == 0);
-    assert(((dst->elem_count * dst->elem_bits + 7) >> 3) >> 32 == 0);
-    dsize = (uint32_t)((dst->elem_count * dst->elem_bits + 7) >> 3);
-    rc = self->f(dst->data, (uint32_t)dsize, &dsize, src->data, (uint32_t)src->elem_count, 0);
-    if (dsize && rc == 0) {
-        dst->byte_order = vboNative;
-        dst->elem_bits = 1;
-        dst->elem_count = dsize << 3;
-        return 0;
-    }
-    return RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-}
-
-/* 
- function izip_fmt izip #1.0 ( izip_set in )
- */
-VTRANSFACT_IMPL(vdb_izip, 1, 0, 0) (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    if (dp->argc != 1) {
-#if _DEBUGGING
-        fprintf(stderr, "dp->argc = %u != 1\n", dp->argc);
-#endif
-        return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-    }
-
-    rslt->variant = vftBlob;
-    rslt->u.bf = izip;
-
-    switch (dp->argv[0].desc.domain) {
-    case vtdInt:
-        switch (dp->argv[0].desc.intrinsic_bits) {
-        case 8:
-            rslt->self = &selfs[1];
-            break;
-        case 16:
-            rslt->self = &selfs[3];
-            break;
-        case 32:
-            rslt->self = &selfs[5];
-            break;
-        case 64:
-            rslt->self = &selfs[7];
-            break;
-        default:
-#if _DEBUGGING
-            fprintf(stderr, "intrinsic_bits = %u != (8|16|32|64)\n", dp->argv[0].desc.intrinsic_bits);
-#endif
-            return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            break;
-        }
-        break;
-    case vtdUint:
-        switch (dp->argv[0].desc.intrinsic_bits) {
-        case 8:
-            rslt->self = &selfs[0];
-            break;
-        case 16:
-            rslt->self = &selfs[2];
-            break;
-        case 32:
-            rslt->self = &selfs[4];
-            break;
-        case 64:
-            rslt->self = &selfs[6];
-            break;
-        default:
-#if _DEBUGGING
-            fprintf(stderr, "intrinsic_bits = %u != (8|16|32|64)\n", dp->argv[0].desc.intrinsic_bits);
-#endif
-            return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            break;
-        }
-        break;
-    default:
-#if _DEBUGGING
-        fprintf(stderr, "domain != vtdInt or vtdUint\n");
-#endif
-        return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-    }
-
-    return 0;
-}
-#endif
-
-#if TESTING
-extern int test_decode(int32_t *, unsigned, const uint8_t *, unsigned, int);
-
-int test_encode(const int32_t Y[], unsigned N) {
-    uint8_t *dst;
-    unsigned dsize;
-    size_t temp;
-    rc_t rc = 0;
-    
-    temp = N * sizeof(Y[0]);
-    assert(temp >> 32 == 0);
-    dst = malloc(dsize = (unsigned)temp);
-    if (dst == NULL)
-        return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    rc = encode_i32(dst, dsize, &dsize, Y, N, 0);
-
-    {
-        int32_t *X;
-        
-        X = malloc(N * sizeof(Y[0]));
-        if (X) {
-            rc = test_decode(X, N, dst, dsize, 0);
-            if (rc == 0) {
-                rc = memcmp(Y, X, N * sizeof(Y[0])) == 0 ? 0 : RC(rcXF, rcFunction, rcExecuting, rcFunction, rcInvalid);
-            }
-            free(X);
-        }
-    }
-
-    free(dst);
-    if (rc)
-        fprintf(stdout, "test failed!\n");
-    return rc;
-}
-#endif
diff --git a/libs/vxf/lower-case-tech-reads.c b/libs/vxf/lower-case-tech-reads.c
deleted file mode 100644
index 9f9e911..0000000
--- a/libs/vxf/lower-case-tech-reads.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <insdc/insdc.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-
-static
-rc_t CC lower_case_tech_reads ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    uint32_t i, j, k;
-
-    char *mixed;
-    const char *read_text = argv [ 0 ] . u . data . base;
-    const INSDC_coord_len *read_len = argv [ 1 ] . u . data . base;
-    const INSDC_read_type *read_type = argv [ 2 ] . u . data . base;
-
-    rc_t rc = KDataBufferResize ( rslt -> data, argv [ 0 ] . u . data . elem_count );
-    if ( rc != 0 )
-        return rc;
-
-    rslt -> elem_count = argv [ 0 ] . u . data . elem_count;
-
-    mixed = rslt -> data -> base;
-    read_text += argv [ 0 ] . u . data . first_elem;
-    read_len += argv [ 1 ] . u . data . first_elem;
-    read_type += argv [ 2 ] . u . data . first_elem;
-
-    for ( i = j = 0; i < argv [ 0 ] . u . data . elem_count; ++ j )
-    {
-        /* should still have reads described */
-        if ( j == argv [ 1 ] . u . data . elem_count || j == argv [ 2 ] . u . data . elem_count )
-            break;
-
-        /* get read length */
-        k = read_len [ j ];
-        if ( i + k > argv [ 0 ] . u . data . elem_count )
-            k = argv [ 0 ] . u . data . elem_count - i;
-
-        /* decide upon upper or lower case */
-        if ( ( read_type [ j ] & 1 ) != READ_TYPE_BIOLOGICAL )
-        {
-            for ( ; k > 0; ++ i, -- k )
-                mixed [ i ] = tolower ( read_text [ i ] );
-        }
-        else
-        {
-            for ( ; k > 0; ++ i, -- k )
-                mixed [ i ] = toupper ( read_text [ i ] );
-        }
-    }
-
-    for ( ; i < argv [ 0 ] . u . data . elem_count; ++ i )
-        mixed [ i ] = toupper ( read_text [ i ] );
-
-    return 0;
-}
-
-
-/* lower_case_tech_reads
- *  locates technical reads within an IUPAC sequence
- *  converts them to lower-case
- *
- *  "read_text" [ DATA ] - IUPAC source text
- *
- *  "read_len" [ DATA ] - ordered array of read lengths
- *
- *  "read_type" [ DATA ] - describes which reads are technical
- *  and which are biological. determines the case of each read segment
- *
- * extern function
- * INSDC:dna:mixed_case:text NCBI:lower_case_tech_reads #1 ( INSDC:dna:text read_text,
- *     INSDC:coord:len read_len, INSDC:read:type read_type );
- */
-VTRANSFACT_IMPL ( NCBI_lower_case_tech_reads, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt -> u . rf = lower_case_tech_reads;
-    rslt -> variant = vftRow;
-    return 0;
-}
diff --git a/libs/vxf/map.c b/libs/vxf/map.c
deleted file mode 100644
index de0423c..0000000
--- a/libs/vxf/map.c
+++ /dev/null
@@ -1,1017 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/sort.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-
-/* LOOP TYPES
- *  this function can be characterized by its loops
- *
- *  1) single-input that is type-compatible with the output
- *     functions like the unix command "tr" by allowing all
- *     input to pass through, except those matching the "from"
- *     array, which are changed to the corresponding entry in
- *     the "to" array.
- *
- *  2) single-input that is NOT type-compatible with output
- *     functions like a type transformation where ALL input
- *     must be transformed, i.e. there can be no pass through.
- *     this loop requires detection of any unspecified input
- *     and results in an error.
- *
- *  3) dual-input that combines the other two loops, in a sense.
- *     it is like the first loop type in that there are no
- *     points of failure, and like the second in that it has
- *     to test for matches against the "from" array. its exact
- *     behavior is to pass values from the second input to the
- *     output unchanged, unless the corresponding value from the
- *     first input matches anything in the "from" table, in which
- *     case the corresponding "to" value is substituted to dest.
- */
-
-
-/* type 1: 8-bit to 8-bit map
- *  this is our principal workhorse
- *  there are no points of failure
- *  the map is built initially for identity
- *  and overridden to perform substitutions indicated
- */
-static
-rc_t CC type1_uint8_t ( void *self, const VXformInfo *info,
-    void *vdst, const void *vsrc, uint64_t elem_count )
-{
-    const uint8_t *map = ( const void* ) self;
-    const uint8_t *src = vsrc;
-    uint8_t *dst = vdst;
-
-    uint64_t i;
-    for ( i = 0; i < elem_count; ++ i )
-        dst [ i ] = map [ src [ i ] ];
-
-    return 0;
-}
-
-static
-rc_t make_type1_uint8_t ( void **selfp, const uint8_t *from, const uint8_t *to, uint32_t map_len )
-{
-    uint32_t i;
-
-    uint8_t *map = malloc ( 256 );
-    if ( map == NULL )
-        return RC ( rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted );
-
-    for ( i = 0; i < 256; ++ i )
-        map [ i ] = ( uint8_t ) i;
-
-    for ( i = 0; i < map_len; ++ i )
-        map [ from [ i ] ] = to [ i ];
-
-    * selfp = map;
-    return 0;
-}
-
-
-/* map_t
- *  a structure that holds "from" and "to" arrays
- */
-typedef struct map_t map_t;
-struct map_t
-{
-#if _DEBUGGING
-    /* array function for type 1 and 2 loops */
-    VArrayFunc array;
-#endif
-
-    /* row function for type 3 loops */
-    void ( * row ) ( const map_t *self, void *dst,
-        const void *src, const void *tst, uint64_t elem_count );
-
-    /* map length */
-    uint32_t map_len;
-    uint32_t align;
-
-    /* ordered "from" array and corresponding "to" array */
-    const void *from, * to;
-};
-
-
-/* type 1: linear map
- *  when the arrays are so short as to not benefit from binary search
- */
-#define TYPE1_LINEAR_MAP( TYPE )                                \
-static                                                          \
-rc_t CC type1_linear_ ## TYPE ( void *vself,                    \
-    const VXformInfo *info, void *vdst, const void *vsrc,       \
-    uint64_t elem_count )                                       \
-{                                                               \
-    const map_t *self = ( const void* ) vself;                  \
-                                                                \
-    const TYPE *src = vsrc;                                     \
-    TYPE *dst = vdst;                                           \
-                                                                \
-    const TYPE *from = self -> from;                            \
-    const TYPE *to = self -> to;                                \
-                                                                \
-    uint64_t i;                                                 \
-    uint32_t j, map_len = self -> map_len;                      \
-    for ( i = 0; i < elem_count; ++ i )                         \
-    {                                                           \
-        TYPE elem = dst [ i ] = src [ i ];                      \
-        for ( j = 0; j < map_len; ++ j )                        \
-        {                                                       \
-            if ( from [ j ] == elem )                           \
-            {                                                   \
-                dst [ i ] = to [ j ];                           \
-                break;                                          \
-            }                                                   \
-        }                                                       \
-    }                                                           \
-                                                                \
-    return 0;                                                   \
-}
-
-TYPE1_LINEAR_MAP ( uint16_t )
-TYPE1_LINEAR_MAP ( uint32_t )
-TYPE1_LINEAR_MAP ( uint64_t )
-TYPE1_LINEAR_MAP ( float )
-TYPE1_LINEAR_MAP ( double )
-
-static VArrayFunc type1_linear_funcs [ 5 ] =
-{
-    type1_linear_uint16_t,
-    type1_linear_uint32_t,
-    type1_linear_uint64_t,
-    type1_linear_float,
-    type1_linear_double
-};
-
-
-/* type 1: binary map
- *  when the arrays are long enough to warrant binary search
- */
-#define TYPE1_BINARY_MAP( TYPE )                                \
-static                                                          \
-rc_t CC type1_binary_ ## TYPE ( void *vself,                    \
-    const VXformInfo *info, void *vdst, const void *vsrc,       \
-    uint64_t elem_count )                                       \
-{                                                               \
-    const map_t *self = ( const void* ) vself;                  \
-                                                                \
-    const TYPE *src = vsrc;                                     \
-    TYPE *dst = vdst;                                           \
-                                                                \
-    const TYPE *from = self -> from;                            \
-    const TYPE *to = self -> to;                                \
-                                                                \
-    uint64_t i;                                                 \
-    for ( i = 0; i < elem_count; ++ i )                         \
-    {                                                           \
-        TYPE elem = dst [ i ] = src [ i ];                      \
-                                                                \
-        uint32_t lower = 0, upper = self -> map_len;            \
-        while ( lower < upper )                                 \
-        {                                                       \
-            uint32_t j = ( lower + upper ) >> 1;                \
-            TYPE cur = from [ j ];                              \
-            if ( elem == cur )                                  \
-            {                                                   \
-                dst [ i ] = to [ j ];                           \
-                break;                                          \
-            }                                                   \
-            if ( elem < cur )                                   \
-                upper = j;                                      \
-            else                                                \
-                lower = j + 1;                                  \
-        }                                                       \
-    }                                                           \
-                                                                \
-    return 0;                                                   \
-}
-
-TYPE1_BINARY_MAP ( uint16_t )
-TYPE1_BINARY_MAP ( uint32_t )
-TYPE1_BINARY_MAP ( uint64_t )
-TYPE1_BINARY_MAP ( float )
-TYPE1_BINARY_MAP ( double )
-
-static VArrayFunc type1_binary_funcs [ 5 ] =
-{
-    type1_binary_uint16_t,
-    type1_binary_uint32_t,
-    type1_binary_uint64_t,
-    type1_binary_float,
-    type1_binary_double
-};
-
-/* type 2: 8-bit to N-bit
- *  allowed to perform a lookup test
- */
-#define TYPE2_8BIT_MAP( DTYPE )                                 \
-static                                                          \
-rc_t CC type2_uint8_t_to_ ## DTYPE ( void *vself,               \
-    const VXformInfo *info, void *vdst, const void *vsrc,       \
-    uint64_t elem_count )                                       \
-{                                                               \
-    const map_t *self = ( const void* ) vself;                  \
-                                                                \
-    const uint8_t *src = vsrc;                                  \
-    DTYPE *dst = vdst;                                          \
-                                                                \
-    const uint8_t *from = self -> from;                         \
-    const DTYPE *to = self -> to;                               \
-                                                                \
-    uint64_t i;                                                 \
-    for ( i = 0; i < elem_count; ++ i )                         \
-    {                                                           \
-        int j = src [ i ];                                      \
-        if ( ! from [ j ] )                                     \
-        {                                                       \
-            return RC ( rcVDB, rcFunction, rcExecuting, rcConstraint, rcViolated );              \
-        }                                                       \
-        dst [ i ] = to [ j ];                                   \
-    }                                                           \
-                                                                \
-    return 0;                                                   \
-}
-
-TYPE2_8BIT_MAP ( uint8_t )
-TYPE2_8BIT_MAP ( uint16_t )
-TYPE2_8BIT_MAP ( uint32_t )
-TYPE2_8BIT_MAP ( uint64_t )
-
-/* type2: binary map
- *  due to the combinatorial explosion,
- *  just implement the binary version
- */
-#define TYPE2_BINARY_MAP( STYPE, DTYPE )                        \
-static                                                          \
-rc_t CC type2_ ## STYPE ## _to_ ## DTYPE ( void *vself,         \
-    const VXformInfo *info, void *vdst, const void *vsrc,       \
-    uint64_t elem_count )                                       \
-{                                                               \
-    const map_t *self = ( const void* ) vself;                  \
-                                                                \
-    const STYPE *src = vsrc;                                    \
-    DTYPE *dst = vdst;                                          \
-                                                                \
-    const STYPE *from = self -> from;                           \
-    const DTYPE *to = self -> to;                               \
-                                                                \
-    uint64_t i;                                                 \
-    for ( i = 0; i < elem_count; ++ i )                         \
-    {                                                           \
-        STYPE cur, elem = src [ i ];                            \
-                                                                \
-        uint32_t j, lower = 0, upper = self -> map_len;         \
-        while ( lower < upper )                                 \
-        {                                                       \
-            j = ( lower + upper ) >> 1;                         \
-            cur = from [ j ];                                   \
-            if ( elem == cur )                                  \
-                goto FOUND;                                     \
-            if ( elem < cur )                                   \
-                upper = j;                                      \
-            else                                                \
-                lower = j + 1;                                  \
-        }                                                       \
-        return RC( rcVDB, rcFunction, rcExecuting, rcConstraint, rcViolated );                  \
-FOUND:                                                          \
-        dst [ i ] = to [ j ];                                   \
-    }                                                           \
-                                                                \
-    return 0;                                                   \
-}
-
-TYPE2_BINARY_MAP ( uint16_t, uint8_t )
-TYPE2_BINARY_MAP ( uint16_t, uint16_t )
-TYPE2_BINARY_MAP ( uint16_t, uint32_t )
-TYPE2_BINARY_MAP ( uint16_t, uint64_t )
-
-TYPE2_BINARY_MAP ( uint32_t, uint8_t )
-TYPE2_BINARY_MAP ( uint32_t, uint16_t )
-TYPE2_BINARY_MAP ( uint32_t, uint32_t )
-TYPE2_BINARY_MAP ( uint32_t, uint64_t )
-
-TYPE2_BINARY_MAP ( uint64_t, uint8_t )
-TYPE2_BINARY_MAP ( uint64_t, uint16_t )
-TYPE2_BINARY_MAP ( uint64_t, uint32_t )
-TYPE2_BINARY_MAP ( uint64_t, uint64_t )
-
-TYPE2_BINARY_MAP ( float, uint8_t )
-TYPE2_BINARY_MAP ( float, uint16_t )
-TYPE2_BINARY_MAP ( float, uint32_t )
-TYPE2_BINARY_MAP ( float, uint64_t )
-
-TYPE2_BINARY_MAP ( double, uint8_t )
-TYPE2_BINARY_MAP ( double, uint16_t )
-TYPE2_BINARY_MAP ( double, uint32_t )
-TYPE2_BINARY_MAP ( double, uint64_t )
-
-static VArrayFunc type2_funcs [ 6 ] [ 4 ] =
-{
-    /* uint8_t */
-    {
-        type2_uint8_t_to_uint8_t,
-        type2_uint8_t_to_uint16_t,
-        type2_uint8_t_to_uint32_t,
-        type2_uint8_t_to_uint64_t
-    },
-
-    /* uint16_t */
-    {
-        type2_uint16_t_to_uint8_t,
-        type2_uint16_t_to_uint16_t,
-        type2_uint16_t_to_uint32_t,
-        type2_uint16_t_to_uint64_t
-    },
-
-    /* uint32_t */
-    {
-        type2_uint32_t_to_uint8_t,
-        type2_uint32_t_to_uint16_t,
-        type2_uint32_t_to_uint32_t,
-        type2_uint32_t_to_uint64_t
-    },
-
-    /* uint64_t */
-    {
-        type2_uint64_t_to_uint8_t,
-        type2_uint64_t_to_uint16_t,
-        type2_uint64_t_to_uint32_t,
-        type2_uint64_t_to_uint64_t
-    },
-
-    /* float */
-    {
-        type2_float_to_uint8_t,
-        type2_float_to_uint16_t,
-        type2_float_to_uint32_t,
-        type2_float_to_uint64_t
-    },
-
-    /* double */
-    {
-        type2_double_to_uint8_t,
-        type2_double_to_uint16_t,
-        type2_double_to_uint32_t,
-        type2_double_to_uint64_t
-    }
-};
-
-
-/* type 3: 8-bit to N-bit
- *  allowed to perform a lookup test
- */
-#define TYPE3_8BIT_MAP( DTYPE )                                 \
-static                                                          \
-void type3_uint8_t_to_ ## DTYPE ( const map_t *self,            \
-    void *vdst, const void *vsrc, const void *vtst,             \
-    uint64_t elem_count )                                       \
-{                                                               \
-    const uint8_t *tst = vtst;                                  \
-    const DTYPE *src = vsrc;                                    \
-    DTYPE *dst = vdst;                                          \
-                                                                \
-    const uint8_t *from = self -> from;                         \
-    const DTYPE *to = self -> to;                               \
-                                                                \
-    uint64_t i;                                                 \
-    for ( i = 0; i < elem_count; ++ i )                         \
-    {                                                           \
-        int j = tst [ i ];                                      \
-        dst [ i ] = src [ i ];                                  \
-        if ( from [ j ] )                                       \
-            dst [ i ] = to [ j ];                               \
-    }                                                           \
-}
-
-TYPE3_8BIT_MAP ( uint8_t )
-TYPE3_8BIT_MAP ( uint16_t )
-TYPE3_8BIT_MAP ( uint32_t )
-TYPE3_8BIT_MAP ( uint64_t )
-
-/* type3: binary map
- *  due to the combinatorial explosion,
- *  just implement the binary version
- */
-#define TYPE3_BINARY_MAP( STYPE, DTYPE )                        \
-static                                                          \
-void type3_ ## STYPE ## _to_ ## DTYPE ( const map_t *self,      \
-    void *vdst, const void *vsrc, const void *vtst,             \
-    uint64_t elem_count )                                       \
-{                                                               \
-    const STYPE *tst = vtst;                                    \
-    const DTYPE *src = vsrc;                                    \
-    DTYPE *dst = vdst;                                          \
-                                                                \
-    const STYPE *from = self -> from;                           \
-    const DTYPE *to = self -> to;                               \
-                                                                \
-    uint64_t i;                                                 \
-    for ( i = 0; i < elem_count; ++ i )                         \
-    {                                                           \
-        STYPE elem = tst [ i ];                                 \
-        uint32_t lower = 0, upper = self -> map_len;            \
-                                                                \
-        dst [ i ] = src [ i ];                                  \
-                                                                \
-        while ( lower < upper )                                 \
-        {                                                       \
-            uint32_t j = ( lower + upper ) >> 1;                \
-            STYPE cur = from [ j ];                             \
-            if ( elem == cur )                                  \
-            {                                                   \
-                dst [ i ] = to [ j ];                           \
-                break;                                          \
-            }                                                   \
-            if ( elem < cur )                                   \
-                upper = j;                                      \
-            else                                                \
-                lower = j + 1;                                  \
-        }                                                       \
-    }                                                           \
-}
-
-TYPE3_BINARY_MAP ( uint16_t, uint8_t )
-TYPE3_BINARY_MAP ( uint16_t, uint16_t )
-TYPE3_BINARY_MAP ( uint16_t, uint32_t )
-TYPE3_BINARY_MAP ( uint16_t, uint64_t )
-
-TYPE3_BINARY_MAP ( uint32_t, uint8_t )
-TYPE3_BINARY_MAP ( uint32_t, uint16_t )
-TYPE3_BINARY_MAP ( uint32_t, uint32_t )
-TYPE3_BINARY_MAP ( uint32_t, uint64_t )
-
-TYPE3_BINARY_MAP ( uint64_t, uint8_t )
-TYPE3_BINARY_MAP ( uint64_t, uint16_t )
-TYPE3_BINARY_MAP ( uint64_t, uint32_t )
-TYPE3_BINARY_MAP ( uint64_t, uint64_t )
-
-TYPE3_BINARY_MAP ( float, uint8_t )
-TYPE3_BINARY_MAP ( float, uint16_t )
-TYPE3_BINARY_MAP ( float, uint32_t )
-TYPE3_BINARY_MAP ( float, uint64_t )
-
-TYPE3_BINARY_MAP ( double, uint8_t )
-TYPE3_BINARY_MAP ( double, uint16_t )
-TYPE3_BINARY_MAP ( double, uint32_t )
-TYPE3_BINARY_MAP ( double, uint64_t )
-
-typedef void ( * type3_func ) ( const map_t*, void*, const void*, const void*, uint64_t );
-static type3_func type3_funcs [ 6 ] [ 4 ] =
-{
-    /* uint8_t */
-    {
-        type3_uint8_t_to_uint8_t,
-        type3_uint8_t_to_uint16_t,
-        type3_uint8_t_to_uint32_t,
-        type3_uint8_t_to_uint64_t
-    },
-
-    /* uint16_t */
-    {
-        type3_uint16_t_to_uint8_t,
-        type3_uint16_t_to_uint16_t,
-        type3_uint16_t_to_uint32_t,
-        type3_uint16_t_to_uint64_t
-    },
-
-    /* uint32_t */
-    {
-        type3_uint32_t_to_uint8_t,
-        type3_uint32_t_to_uint16_t,
-        type3_uint32_t_to_uint32_t,
-        type3_uint32_t_to_uint64_t
-    },
-
-    /* uint64_t */
-    {
-        type3_uint64_t_to_uint8_t,
-        type3_uint64_t_to_uint16_t,
-        type3_uint64_t_to_uint32_t,
-        type3_uint64_t_to_uint64_t
-    },
-
-    /* float */
-    {
-        type3_float_to_uint8_t,
-        type3_float_to_uint16_t,
-        type3_float_to_uint32_t,
-        type3_float_to_uint64_t
-    },
-
-    /* double */
-    {
-        type3_double_to_uint8_t,
-        type3_double_to_uint16_t,
-        type3_double_to_uint32_t,
-        type3_double_to_uint64_t
-    }
-};
-
-
-#if _DEBUGGING
-static
-rc_t CC type12_driver ( void *xself, const VXformInfo *info,
-    void *dst, const void *src, uint64_t elem_count )
-{
-    map_t *self = xself;
-    return ( * self -> array ) ( self, info, dst, src, elem_count );
-}
-#endif
-
-static
-rc_t CC type3_driver ( void *xself,
-    const VXformInfo *info, int64_t row_id,
-    const VFixedRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    const map_t *self = ( const void* ) xself;
-
-    /* base pointers to pages */
-    uint8_t *dst = rslt -> base;
-    const uint8_t *tst = argv [ 0 ] . u . data . base;
-    const uint8_t *src = argv [ 1 ] . u . data . base;
-
-    /* offset by bytes to first element of row */
-    dst += ( rslt -> elem_bits * rslt -> first_elem ) >> 3;
-    tst += ( argv [ 0 ] . u . data . elem_bits * argv [ 0 ] . u . data . first_elem ) >> 3;
-    src += ( argv [ 1 ] . u . data . elem_bits * argv [ 1 ] . u . data . first_elem ) >> 3;
-
-    /* invoke function */
-    ( * self -> row ) ( self, dst, src, tst, rslt -> elem_count );
-    return 0;
-}
-
-
-/* make
- *  make a map_t structure
- */
-#define MAKE_8BIT_MAP_T( DTYPE )                                        \
-static                                                                  \
-rc_t make_map_t_uint8_t_to_ ## DTYPE ( map_t **mapp,                    \
-    const void *vfrom, const void *vto, uint32_t map_len )              \
-{                                                                       \
-    uint32_t i;                                                         \
-    uint8_t *tst;                                                       \
-    DTYPE *dto;                                                         \
-    const uint8_t *from = vfrom;                                        \
-    const DTYPE *sto = vto;                                             \
-    map_t *map = calloc ( 1, sizeof * map +                             \
-        ( sizeof * tst + sizeof * dto ) * 256 );                        \
-    if ( map == NULL )                                                  \
-    {                                                                   \
-        return RC ( rcVDB, rcFunction, rcConstructing,                  \
-            rcMemory, rcExhausted );                                    \
-    }                                                                   \
-                                                                        \
-    tst = ( uint8_t* ) ( map + 1 );                                     \
-    dto = ( DTYPE* ) & tst [ 256 ];                                     \
-                                                                        \
-    map -> row = NULL;                                                  \
-    map -> map_len = map_len;                                           \
-    map -> align = 0;                                                   \
-    map -> from = ( void* ) tst;                                        \
-    map -> to = ( void* ) dto;                                          \
-    * mapp = map;                                                       \
-                                                                        \
-    for ( i = 0; i < map_len; ++ i )                                    \
-    {                                                                   \
-        int j = from [ i ];                                             \
-        tst [ j ] = 1;                                                  \
-        dto [ j ] = sto [ i ];                                          \
-    }                                                                   \
-                                                                        \
-    return 0;                                                           \
-}
-
-MAKE_8BIT_MAP_T ( uint8_t )
-MAKE_8BIT_MAP_T ( uint16_t )
-MAKE_8BIT_MAP_T ( uint32_t )
-MAKE_8BIT_MAP_T ( uint64_t )
-
-#define MAP_T_CMP( TYPE )                                               \
-static                                                                  \
-int64_t CC map_t_cmp_ ## TYPE ( const void *a, const void *b, void *data )     \
-{                                                                       \
-    const TYPE *from = ( const TYPE* ) data;                            \
-    int left = * ( const uint16_t* ) a;                                 \
-    int right = * ( const uint16_t* ) b;                                \
-    if ( from [ left ] < from [ right ] )                               \
-        return -1;                                                      \
-    return from [ left ] > from [ right ];                              \
-}
-
-MAP_T_CMP ( uint16_t )
-MAP_T_CMP ( uint32_t )
-MAP_T_CMP ( uint64_t )
-MAP_T_CMP ( float )
-MAP_T_CMP ( double )
-
-#define MAKE_MAP_T( STYPE, DTYPE )                                      \
-static                                                                  \
-rc_t make_map_t_ ## STYPE ## _to_ ## DTYPE ( map_t **mapp,              \
-    const void *vfrom, const void *vto, uint32_t map_len )              \
-{                                                                       \
-    uint32_t i;                                                         \
-    uint16_t buff [ 64 ], *ord = buff;                                  \
-                                                                        \
-    DTYPE *dto;                                                         \
-    STYPE *dfrom;                                                       \
-                                                                        \
-    const STYPE *sfrom = vfrom;                                         \
-    const DTYPE *sto = vto;                                             \
-    map_t *map = malloc ( sizeof * map +                                \
-        ( sizeof * dfrom + sizeof * dto ) * map_len );                  \
-    if ( map == NULL )                                                  \
-    {                                                                   \
-        return RC ( rcVDB, rcFunction, rcConstructing,                  \
-            rcMemory, rcExhausted );                                    \
-    }                                                                   \
-                                                                        \
-    dfrom = ( STYPE* ) ( map + 1 );                                     \
-    dto = ( DTYPE* ) & dfrom [ map_len ];                               \
-                                                                        \
-    map -> row = NULL;                                                  \
-    map -> map_len = map_len;                                           \
-    map -> align = 0;                                                   \
-    map -> from = ( void* ) dfrom;                                      \
-    map -> to = ( void* ) dto;                                          \
-    * mapp = map;                                                       \
-                                                                        \
-    if ( map_len > sizeof buff / sizeof buff [ 0 ] )                    \
-    {                                                                   \
-        assert ( map_len < 0x10000 );                                   \
-        ord = malloc ( sizeof * ord * map_len );                        \
-        if ( ord == NULL )                                              \
-        {                                                               \
-            free ( map );                                               \
-            return RC ( rcVDB, rcFunction, rcConstructing,              \
-                rcMemory, rcExhausted );                                \
-        }                                                               \
-    }                                                                   \
-                                                                        \
-    for ( i = 0; i < map_len; ++ i )                                    \
-        ord [ i ] = ( uint16_t ) i;                                     \
-    ksort ( ord, map_len, sizeof ord [ 0 ],                             \
-        map_t_cmp_ ## STYPE, ( void* ) sfrom );                          \
-                                                                        \
-    for ( i = 0; i < map_len; ++ i )                                    \
-    {                                                                   \
-        int j = ord [ i ];                                              \
-        dfrom [ i ] = sfrom [ j ];                                      \
-        dto [ i ] = sto [ j ];                                          \
-    }                                                                   \
-                                                                        \
-    if ( ord != buff )                                                  \
-        free ( ord );                                                   \
-                                                                        \
-    return 0;                                                           \
-}
-
-MAKE_MAP_T ( uint16_t, uint8_t )
-MAKE_MAP_T ( uint16_t, uint16_t )
-MAKE_MAP_T ( uint16_t, uint32_t )
-MAKE_MAP_T ( uint16_t, uint64_t )
-
-MAKE_MAP_T ( uint32_t, uint8_t )
-MAKE_MAP_T ( uint32_t, uint16_t )
-MAKE_MAP_T ( uint32_t, uint32_t )
-MAKE_MAP_T ( uint32_t, uint64_t )
-
-MAKE_MAP_T ( uint64_t, uint8_t )
-MAKE_MAP_T ( uint64_t, uint16_t )
-MAKE_MAP_T ( uint64_t, uint32_t )
-MAKE_MAP_T ( uint64_t, uint64_t )
-
-MAKE_MAP_T ( float, uint8_t )
-MAKE_MAP_T ( float, uint16_t )
-MAKE_MAP_T ( float, uint32_t )
-MAKE_MAP_T ( float, uint64_t )
-
-MAKE_MAP_T ( double, uint8_t )
-MAKE_MAP_T ( double, uint16_t )
-MAKE_MAP_T ( double, uint32_t )
-MAKE_MAP_T ( double, uint64_t )
-
-
-typedef rc_t ( * make_func ) ( map_t**, const void*, const void*, uint32_t );
-static make_func make_funcs [ 6 ] [ 4 ] =
-{
-    /* uint8_t */
-    {
-        make_map_t_uint8_t_to_uint8_t,
-        make_map_t_uint8_t_to_uint16_t,
-        make_map_t_uint8_t_to_uint32_t,
-        make_map_t_uint8_t_to_uint64_t
-    },
-
-    /* uint16_t */
-    {
-        make_map_t_uint16_t_to_uint8_t,
-        make_map_t_uint16_t_to_uint16_t,
-        make_map_t_uint16_t_to_uint32_t,
-        make_map_t_uint16_t_to_uint64_t
-    },
-
-    /* uint32_t */
-    {
-        make_map_t_uint32_t_to_uint8_t,
-        make_map_t_uint32_t_to_uint16_t,
-        make_map_t_uint32_t_to_uint32_t,
-        make_map_t_uint32_t_to_uint64_t
-    },
-
-    /* uint64_t */
-    {
-        make_map_t_uint64_t_to_uint8_t,
-        make_map_t_uint64_t_to_uint16_t,
-        make_map_t_uint64_t_to_uint32_t,
-        make_map_t_uint64_t_to_uint64_t
-    },
-
-    /* float */
-    {
-        make_map_t_float_to_uint8_t,
-        make_map_t_float_to_uint16_t,
-        make_map_t_float_to_uint32_t,
-        make_map_t_float_to_uint64_t
-    },
-
-    /* double */
-    {
-        make_map_t_double_to_uint8_t,
-        make_map_t_double_to_uint16_t,
-        make_map_t_double_to_uint32_t,
-        make_map_t_double_to_uint64_t
-    }
-};
-
-/* domain_and_size_code
- *  converts sizes 8..64 into 0..3
- *  converts domains into integer or float
- *  combines the two into a single integer
- *  returns -1 if something is simply unsupported
- */
-static
-int domain_and_size_code ( const VTypedesc *desc )
-{
-    int size, type;
-    switch ( desc -> intrinsic_bits )
-    {
-    case 8:
-        size = 0;
-        break;
-    case 16:
-        size = 1;
-        break;
-    case 32:
-        size = 2;
-        break;
-    case 64:
-        size = 3;
-        break;
-    default:
-        return -1;
-    }
-
-    switch ( desc -> domain )
-    {
-    case vtdBool:
-    case vtdUint:
-    case vtdInt:
-        type = 0;
-        break;
-    case vtdFloat:
-        type = 4;
-        break;
-    case vtdAscii:
-    case vtdUnicode:
-        type = 0;
-        break;
-    default:
-        return -1;
-    }
-
-    return type + size;
-}
-
-
-/* map
- *  translate input elements
- *  behaves much like the Unix "tr" command
- *  except that charsets are not [currently] supported
- *
- *  "A" [ TYPE ] - input data type, e.g. "ascii"
- *
- *  "B" [ TYPE ] - output data type, e.g. "ascii" or "U8"
- *
- *  "from" [ CONST ] - set of key values.
- *
- *  "to" [ CONST ] - set of mapped values,
- *  where length ( from ) === length ( to )
- *
- *  "in" [ DATA ] - input data to be matched against keys
- *  in "from". also serves as source data when "src" is omitted
- *
- *  "src" [ DATA, OPTIONAL ] - source data to be edited by
- *  substituting "to" values when corresponding "in" value
- *  matches key in "from". if omitted, "in" is used.
- *
- * USAGE:
- *  to upper case letters from a given alphabet
- *    ascii upper = < ascii, ascii > map < 'acgtn', 'ACGTN' > ( in );
- *
- *  to translate from ascii to binary
- *    U8 bin = < ascii, U8 > map < 'ACGTN', [ 0, 1, 2, 3, 0 ] > ( in );
- *
- *  to alter certain values of a column based upon values in another
- *    U8 n_encoded = < ascii, U8 > map < 'N', 0 > ( read, quality );
- *
- * CAVEATS:
- *  the full canonical mode of operation uses separate inputs
- *  for key matching and output source.
- *
- *  when a single input is specified:
- *   - sizeof ( A ) must equal sizeof ( B )
- *   - A must be a proper subset of B -OR-
- *   - "from" keys must match every possible "in" value ( total substitution )
- */
-static
-rc_t vdb_map_type1_8bit_fact ( VFuncDesc *rslt, const VFactoryParams *cp )
-{
-    rc_t rc = make_type1_uint8_t ( & rslt -> self,
-        cp -> argv [ 0 ] . data . u8,
-        cp -> argv [ 1 ] . data . u8,
-        cp -> argv [ 0 ] . count );
-    if ( rc != 0 )
-        return rc;
-
-    rslt -> whack = free;
-    rslt -> u. af = type1_uint8_t;
-    rslt -> variant = vftArray;
-
-    return 0;
-}
-
-static
-rc_t vdb_map_type1_fact ( VFuncDesc *rslt, const VFactoryParams *cp )
-{
-    rc_t rc;
-    int code;
-    map_t *self;
-
-    /* look for special case of 8-bit to 8-bit mapping */
-    if ( cp -> argv [ 0 ] . desc . intrinsic_bits == 8 )
-        return vdb_map_type1_8bit_fact ( rslt, cp );
-
-    /* determine the domain and size code */
-    code = domain_and_size_code ( & cp -> argv [ 0 ] . desc );
-    if ( code < 0 )
-        return RC ( rcVDB, rcFunction, rcConstructing, rcType, rcUnsupported );
-
-    /* create the object */
-    rc = ( * make_funcs [ code ] [ code & 3 ] )
-        ( & self,
-          cp -> argv [ 0 ] . data . u8,
-          cp -> argv [ 1 ] . data . u8,
-          cp -> argv [ 0 ] . count );
-    if ( rc != 0 )
-        return rc;
-
-    /* 8=>8 can be discounted */
-    -- code;
-
-    /* determine whether it makes sense to perform a binary search */
-    rslt -> u. af = ( cp -> argv [ 0 ] . count < 8 ) ?
-        type1_linear_funcs [ code ] : type1_binary_funcs [ code ];
-    
-    rslt -> self = self;
-    rslt -> whack = free;
-    rslt -> variant = vftArray;
-
-#if _DEBUGGING
-    self -> array = rslt -> u . af;
-    rslt -> u . af = type12_driver;
-#endif
-
-    return 0;
-}
-
-static
-rc_t vdb_map_type2_fact ( VFuncDesc *rslt, const VFactoryParams *cp )
-{
-    rc_t rc;
-    map_t *self;
-    int code1, code2;
-
-    /* determine the domain and size codes */
-    code1 = domain_and_size_code ( & cp -> argv [ 0 ] . desc );
-    code2 = domain_and_size_code ( & cp -> argv [ 1 ] . desc );
-    if ( code1 < 0 ||  code2 < 0 )
-        return RC ( rcVDB, rcFunction, rcConstructing, rcType, rcUnsupported );
-
-    /* create the object */
-    rc = ( * make_funcs [ code1 ] [ code2 & 3 ] )
-        ( & self,
-          cp -> argv [ 0 ] . data . u8,
-          cp -> argv [ 1 ] . data . u8,
-          cp -> argv [ 0 ] . count );
-    if ( rc != 0 )
-        return rc;
-    
-    rslt -> self = self;
-    rslt -> whack = free;
-    rslt -> u. af = type2_funcs [ code1 ] [ code2 & 3 ];
-    rslt -> variant = vftArray;
-
-#if _DEBUGGING
-    self -> array = rslt -> u . af;
-    rslt -> u . af = type12_driver;
-#endif
-
-    return 0;
-}
-
-static
-rc_t vdb_map_type3_fact ( VFuncDesc *rslt, const VFactoryParams *cp )
-{
-    rc_t rc;
-    map_t *self;
-    int code1, code2;
-
-    /* determine the domain and size codes */
-    code1 = domain_and_size_code ( & cp -> argv [ 0 ] . desc );
-    code2 = domain_and_size_code ( & cp -> argv [ 1 ] . desc );
-    if ( code1 < 0 ||  code2 < 0 )
-        return RC ( rcVDB, rcFunction, rcConstructing, rcType, rcUnsupported );
-
-    /* create the object */
-    rc = ( * make_funcs [ code1 ] [ code2 & 3 ] )
-        ( & self,
-          cp -> argv [ 0 ] . data . u8,
-          cp -> argv [ 1 ] . data . u8,
-          cp -> argv [ 0 ] . count );
-    if ( rc != 0 )
-        return rc;
-
-    self -> row = type3_funcs [ code1 ] [ code2 & 3 ];
-    
-    rslt -> self = self;
-    rslt -> whack = free;
-    rslt -> u. pf = type3_driver;
-    rslt -> variant = vftFixedRow;
-
-    return 0;
-}
-
-VTRANSFACT_IMPL ( vdb_map, 1, 0, 0 ) ( const void *ignore, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    /* the compiler has no way of knowing that the map dimensions must match */
-    if ( cp -> argv [ 0 ] . count != cp -> argv [ 1 ] . count )
-        return RC ( rcVDB, rcFunction, rcConstructing, rcConstraint, rcViolated );
-
-    /* the loop type is determined by the number of inputs and input type */
-    if ( dp -> argc == 2 )
-        return vdb_map_type3_fact ( rslt, cp );
-
-    /* since two schema types A and B are given, the compiler has no way
-       of knowing that it should check for a relationship between them */
-    if ( VTypedeclToTypedecl ( & dp -> argv [ 0 ] . fd . td, info -> schema, & info -> fdesc . fd . td, NULL, NULL ) )
-        return vdb_map_type1_fact ( rslt, cp );
-
-    return vdb_map_type2_fact ( rslt, cp );
-}
diff --git a/libs/vxf/math-funcs-impl.h b/libs/vxf/math-funcs-impl.h
deleted file mode 100644
index 8f95e12..0000000
--- a/libs/vxf/math-funcs-impl.h
+++ /dev/null
@@ -1,361 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <compiler.h>
-#include <math.h>
-
-typedef void (*math_f)(void *dst, const void *src, size_t elem_count);
-typedef union self_t {
-    void *vp;
-    math_f f;
-} self_t;
-
-static void F32_to_I8(void *Dst, const void *Src, size_t elem_count) {
-    int8_t *dst = Dst;
-    const float *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (int8_t)FLOAT_FUNC(src[i]);
-}
-
-static void F32_to_U8(void *Dst, const void *Src, size_t elem_count) {
-    uint8_t *dst = Dst;
-    const float *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (uint8_t)FLOAT_FUNC(src[i]);
-}
-
-static void F32_to_I16(void *Dst, const void *Src, size_t elem_count) {
-    int16_t *dst = Dst;
-    const float *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (int16_t)FLOAT_FUNC(src[i]);
-}
-
-static void F32_to_U16(void *Dst, const void *Src, size_t elem_count) {
-    uint16_t *dst = Dst;
-    const float *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (uint16_t)FLOAT_FUNC(src[i]);
-}
-
-static void F32_to_I32(void *Dst, const void *Src, size_t elem_count) {
-    int32_t *dst = Dst;
-    const float *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (int32_t)FLOAT_FUNC(src[i]);
-}
-
-static void F32_to_U32(void *Dst, const void *Src, size_t elem_count) {
-    uint32_t *dst = Dst;
-    const float *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (uint32_t)FLOAT_FUNC(src[i]);
-}
-
-static void F32_to_I64(void *Dst, const void *Src, size_t elem_count) {
-    int64_t *dst = Dst;
-    const float *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (int64_t)FLOAT_FUNC(src[i]);
-}
-
-static void F32_to_U64(void *Dst, const void *Src, size_t elem_count) {
-    uint64_t *dst = Dst;
-    const float *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (uint64_t)FLOAT_FUNC(src[i]);
-}
-
-static void F32_to_F32(void *Dst, const void *Src, size_t elem_count) {
-    float *dst = Dst;
-    const float *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = FLOAT_FUNC(src[i]);
-}
-
-static void F32_to_F64(void *Dst, const void *Src, size_t elem_count) {
-    double *dst = Dst;
-    const float *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = FLOAT_FUNC(src[i]);
-}
-
-static void F64_to_I8(void *Dst, const void *Src, size_t elem_count) {
-    int8_t *dst = Dst;
-    const double *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (int8_t)DOUBLE_FUNC(src[i]);
-}
-
-static void F64_to_U8(void *Dst, const void *Src, size_t elem_count) {
-    uint8_t *dst = Dst;
-    const double *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (uint8_t)DOUBLE_FUNC(src[i]);
-}
-
-static void F64_to_I16(void *Dst, const void *Src, size_t elem_count) {
-    int16_t *dst = Dst;
-    const double *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (int16_t)DOUBLE_FUNC(src[i]);
-}
-
-static void F64_to_U16(void *Dst, const void *Src, size_t elem_count) {
-    uint16_t *dst = Dst;
-    const double *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (uint16_t)DOUBLE_FUNC(src[i]);
-}
-
-static void F64_to_I32(void *Dst, const void *Src, size_t elem_count) {
-    int32_t *dst = Dst;
-    const double *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (int32_t)DOUBLE_FUNC(src[i]);
-}
-
-static void F64_to_U32(void *Dst, const void *Src, size_t elem_count) {
-    uint32_t *dst = Dst;
-    const double *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (uint32_t)DOUBLE_FUNC(src[i]);
-}
-
-static void F64_to_I64(void *Dst, const void *Src, size_t elem_count) {
-    int64_t *dst = Dst;
-    const double *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (int64_t)DOUBLE_FUNC(src[i]);
-}
-
-static void F64_to_U64(void *Dst, const void *Src, size_t elem_count) {
-    uint64_t *dst = Dst;
-    const double *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (uint64_t)DOUBLE_FUNC(src[i]);
-}
-
-static void F64_to_F32(void *Dst, const void *Src, size_t elem_count) {
-    float *dst = Dst;
-    const double *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = (float)DOUBLE_FUNC(src[i]);
-}
-
-static void F64_to_F64(void *Dst, const void *Src, size_t elem_count) {
-    double *dst = Dst;
-    const double *src = Src;
-    int i;
-    
-    for (i = 0; i != elem_count; ++i)
-        dst[i] = DOUBLE_FUNC(src[i]);
-}
-
-static
-rc_t CC array_func(
-                void *Self,
-                const VXformInfo *info,
-                void *dst,
-                const void *src,
-                uint64_t num_elements
-                )
-{
-    self_t hack;
-
-    hack.vp = Self;
-    hack.f(dst, src, ( size_t ) num_elements);
-    return 0;
-}
-
-static rc_t factory( const void *self, const VXfactInfo *info, 
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    VTypedesc src_desc;
-    rc_t rc;
-    self_t hack;
-
-    rc = VSchemaDescribeTypedecl(info->schema, &src_desc, &dp->argv[0].fd.td);
-    if (rc)
-        return rc;
-    
-    rslt->variant = vftArray;
-    rslt->u.af = array_func;
-    
-    switch (src_desc.intrinsic_bits) {
-    case 32:
-        switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 8:
-                hack.f = F32_to_I8;
-                break;
-            case 16:
-                hack.f = F32_to_I16;
-                break;
-            case 32:
-                hack.f = F32_to_I32;
-                break;
-            case 64:
-                hack.f = F32_to_I64;
-                break;
-            default:
-                return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            }
-            break;
-        case vtdUint:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 8:
-                hack.f = F32_to_U8;
-                break;
-            case 16:
-                hack.f = F32_to_U16;
-                break;
-            case 32:
-                hack.f = F32_to_U32;
-                break;
-            case 64:
-                hack.f = F32_to_U64;
-                break;
-            default:
-                return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            }
-            break;
-        case vtdFloat:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 32:
-                hack.f = F32_to_F32;
-                break;
-            case 64:
-                hack.f = F32_to_F64;
-                break;
-            default:
-                return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            }
-            break;
-        default:
-            return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-        }
-        break;
-    case 64:
-        switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 8:
-                hack.f = F64_to_I8;
-                break;
-            case 16:
-                hack.f = F64_to_I16;
-                break;
-            case 32:
-                hack.f = F64_to_I32;
-                break;
-            case 64:
-                hack.f = F64_to_I64;
-                break;
-            default:
-                return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            }
-            break;
-        case vtdUint:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 8:
-                hack.f = F64_to_U8;
-                break;
-            case 16:
-                hack.f = F64_to_U16;
-                break;
-            case 32:
-                hack.f = F64_to_U32;
-                break;
-            case 64:
-                hack.f = F64_to_U64;
-                break;
-            default:
-                return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            }
-            break;
-        case vtdFloat:
-            switch (info->fdesc.desc.intrinsic_bits) {
-            case 32:
-                hack.f = F64_to_F32;
-                break;
-            case 64:
-                hack.f = F64_to_F64;
-                break;
-            default:
-                return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            }
-            break;
-        default:
-            return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-        }
-        break;
-    default:
-        return RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-    }
-    rslt->self = hack.vp;
-    return 0;
-}
-
diff --git a/libs/vxf/max.c b/libs/vxf/max.c
deleted file mode 100644
index c941468..0000000
--- a/libs/vxf/max.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-
-typedef void (*func_t)(void *, const void *, const void *, uint64_t);
-
-typedef struct self_t {
-    func_t f;
-} self_t;
-
-#define FUNC(VALTYPE) F_ ## VALTYPE
-
-#define FUNC_DEF(VALTYPE) \
-static void FUNC(VALTYPE)(void *Dst, const void *A, const void *B, uint64_t n) { \
-    VALTYPE *dst = (VALTYPE *)Dst; \
-    const VALTYPE *a = (const VALTYPE *)A; \
-    const VALTYPE *b = (const VALTYPE *)B; \
-    uint64_t i; \
-    \
-    for (i = 0; i != n; ++i) \
-        dst[i] = b[i] < a[i] ? a[i] : b[i]; \
-}
-
-FUNC_DEF(float)
-FUNC_DEF(double)
-FUNC_DEF(uint8_t)
-FUNC_DEF(uint16_t)
-FUNC_DEF(uint32_t)
-FUNC_DEF(uint64_t)
-FUNC_DEF(int8_t)
-FUNC_DEF(int16_t)
-FUNC_DEF(int32_t)
-FUNC_DEF(int64_t)
-
-static
-rc_t CC fixed_row_func(
-                      void *Self,
-                      const VXformInfo *info,
-                      int64_t row_id,
-                      const VFixedRowResult *rslt,
-                      uint32_t argc,
-                      const VRowData argv[]
-) {
-    const self_t *self = Self;
-
-    /* base pointers to pages */
-    uint8_t *dst = rslt -> base;
-    const uint8_t *a = argv [ 0 ] . u . data . base;
-    const uint8_t *b = argv [ 1 ] . u . data . base;
-
-    /* offset by bytes to first element of row */
-    dst += ( rslt -> elem_bits * rslt -> first_elem ) >> 3;
-    a += ( argv [ 0 ] . u . data . elem_bits * argv [ 0 ] . u . data . first_elem ) >> 3;
-    b += ( argv [ 1 ] . u . data . elem_bits * argv [ 1 ] . u . data . first_elem ) >> 3;
-
-    self -> f ( dst, a, b, rslt -> elem_count );
-    return 0;
-}
-
-static
-void CC vxf_max_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-/* 
- */
-VTRANSFACT_IMPL(vdb_max, 1, 0, 0) (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc = 0;
-    self_t *self;
-
-	self = malloc(sizeof(self_t));
-    if (self == NULL)
-        return RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-        
-    rslt->self = self;
-    rslt->whack = vxf_max_wrapper;
-    rslt->variant = vftFixedRow;
-    rslt->u.pf = fixed_row_func;
-
-    switch (info->fdesc.desc.intrinsic_bits) {
-    case 8:
-        switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            self->f = FUNC(int8_t);
-            break;
-        case vtdUint:
-            self->f = FUNC(uint8_t);
-            break;
-        default:
-            rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-        }
-        break;
-    case 16:
-        switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            self->f = FUNC(int16_t);
-            break;
-        case vtdUint:
-            self->f = FUNC(uint16_t);
-            break;
-        default:
-            rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-        }
-        break;
-    case 32:
-        switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            self->f = FUNC(int32_t);
-            break;
-        case vtdUint:
-            self->f = FUNC(uint32_t);
-            break;
-        case vtdFloat:
-            self->f = FUNC(float);
-            break;
-        default:
-            rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-        }
-        break;
-    case 64:
-        switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            self->f = FUNC(int64_t);
-            break;
-        case vtdUint:
-            self->f = FUNC(uint64_t);
-            break;
-        case vtdFloat:
-            self->f = FUNC(double);
-            break;
-        default:
-            rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-        }
-        break;
-    default:
-        rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-    }
-
-    if (rc)
-        free(self);
-    return rc;
-}
diff --git a/libs/vxf/min.c b/libs/vxf/min.c
deleted file mode 100644
index b7e209c..0000000
--- a/libs/vxf/min.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-
-typedef void (*func_t)(void *, const void *, const void *, uint64_t);
-
-typedef struct self_t {
-    func_t f;
-} self_t;
-
-#define FUNC(VALTYPE) F_ ## VALTYPE
-
-#define FUNC_DEF(VALTYPE) \
-static void FUNC(VALTYPE)(void *Dst, const void *A, const void *B, uint64_t n) { \
-    VALTYPE *dst = (VALTYPE *)Dst; \
-    const VALTYPE *a = (const VALTYPE *)A; \
-    const VALTYPE *b = (const VALTYPE *)B; \
-    uint64_t i; \
-    \
-    for (i = 0; i != n; ++i) \
-        dst[i] = a[i] < b[i] ? a[i] : b[i]; \
-}
-
-FUNC_DEF(float)
-FUNC_DEF(double)
-FUNC_DEF(uint8_t)
-FUNC_DEF(uint16_t)
-FUNC_DEF(uint32_t)
-FUNC_DEF(uint64_t)
-FUNC_DEF(int8_t)
-FUNC_DEF(int16_t)
-FUNC_DEF(int32_t)
-FUNC_DEF(int64_t)
-
-static
-rc_t CC fixed_row_func(
-                      void *Self,
-                      const VXformInfo *info,
-                      int64_t row_id,
-                      const VFixedRowResult *rslt,
-                      uint32_t argc,
-                      const VRowData argv[]
-) {
-    const self_t *self = Self;
-
-    /* base pointers to pages */
-    uint8_t *dst = rslt -> base;
-    const uint8_t *a = argv [ 0 ] . u . data . base;
-    const uint8_t *b = argv [ 1 ] . u . data . base;
-
-    /* offset by bytes to first element of row */
-    dst += ( rslt -> elem_bits * rslt -> first_elem ) >> 3;
-    a += ( argv [ 0 ] . u . data . elem_bits * argv [ 0 ] . u . data . first_elem ) >> 3;
-    b += ( argv [ 1 ] . u . data . elem_bits * argv [ 1 ] . u . data . first_elem ) >> 3;
-    
-    self -> f ( dst, a, b, rslt -> elem_count );
-    return 0;
-}
-
-static
-void CC vxf_min_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-/* 
- */
-VTRANSFACT_IMPL(vdb_min, 1, 0, 0) (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc = 0;
-    self_t *self;
-
-	self = malloc(sizeof(self_t));
-    if (self == NULL)
-        return RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-        
-    rslt->self = self;
-    rslt->whack = vxf_min_wrapper;
-    rslt->variant = vftFixedRow;
-    rslt->u.pf = fixed_row_func;
-
-    switch (info->fdesc.desc.intrinsic_bits) {
-    case 8:
-        switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            self->f = FUNC(int8_t);
-            break;
-        case vtdUint:
-            self->f = FUNC(uint8_t);
-            break;
-        default:
-            rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-        }
-        break;
-    case 16:
-        switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            self->f = FUNC(int16_t);
-            break;
-        case vtdUint:
-            self->f = FUNC(uint16_t);
-            break;
-        default:
-            rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-        }
-        break;
-    case 32:
-        switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            self->f = FUNC(int32_t);
-            break;
-        case vtdUint:
-            self->f = FUNC(uint32_t);
-            break;
-        case vtdFloat:
-            self->f = FUNC(float);
-            break;
-        default:
-            rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-        }
-        break;
-    case 64:
-        switch (info->fdesc.desc.domain) {
-        case vtdInt:
-            self->f = FUNC(int64_t);
-            break;
-        case vtdUint:
-            self->f = FUNC(uint64_t);
-            break;
-        case vtdFloat:
-            self->f = FUNC(double);
-            break;
-        default:
-            rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-        }
-        break;
-    default:
-        rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-    }
-
-    if (rc)
-        free(self);
-    return rc;
-}
diff --git a/libs/vxf/outlier-decoder.c b/libs/vxf/outlier-decoder.c
deleted file mode 100644
index a31a55b..0000000
--- a/libs/vxf/outlier-decoder.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-
-#include <bitstr.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#define DECODER_NAME(T) outlier_encode_ ## T
-#define DECODER(T) static rc_t CC DECODER_NAME(T) (void *self, const VXformInfo *info, void *Dst, const void *Src, uint64_t elem_count) \
-{ \
-    T *dst = (T *)Dst; \
-    T const *src = (T const *)Src; \
-    T const outlier = *(T const *)self; \
-    uint64_t i; \
-    for (i = 0; i != elem_count; ++i) { \
-        T const y = src[i]; \
-        if (y & 1) \
-            dst[i] = outlier; \
-        else \
-            dst[i] = y >> 1; \
-    } \
-    return 0; \
-}
-
-DECODER(uint8_t)
-DECODER(uint16_t)
-DECODER(uint32_t)
-DECODER(uint64_t)
-
-/*
- function < type T > T outlier_decode #1.0 < T outlier > ( T y );
- */
-
-VTRANSFACT_IMPL ( vdb_outlier_decode, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-                                                 VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    void *self;
-    
-    if (info->fdesc.desc.domain != vtdInt || cp->argv[0].count != 1)
-        return RC(rcXF, rcFunction, rcConstructing, rcType, rcIncorrect);
-        
-        switch (VTypedescSizeof(&cp->argv[0].desc)) {
-        case 8:
-        case 16:
-        case 32:
-        case 64:
-            break;
-        default:
-            return RC(rcXF, rcFunction, rcConstructing, rcType, rcIncorrect);
-            break;
-        }
-    
-    self = malloc(sizeof(uint64_t));
-    if (self == NULL)
-        return RC(rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted);
-        
-        switch (VTypedescSizeof(&cp->argv[0].desc)) {
-        case 8:
-            *(uint8_t *)self = cp->argv[0].data.u8[0];
-            rslt->u.af = DECODER_NAME(uint8_t);
-            break;
-        case 16:
-            *(uint16_t *)self = cp->argv[0].data.u16[0];
-            rslt->u.af = DECODER_NAME(uint16_t);
-            break;
-        case 32:
-            *(uint32_t *)self = cp->argv[0].data.u32[0];
-            rslt->u.af = DECODER_NAME(uint32_t);
-            break;
-        case 64:
-            *(uint64_t *)self = cp->argv[0].data.u64[0];
-            rslt->u.af = DECODER_NAME(uint64_t);
-            break;
-        default:
-            break;
-        }
-    rslt->self = self;
-    rslt->whack = free;
-    rslt->variant = vftArray;
-    return 0;
-}
diff --git a/libs/vxf/outlier-encoder.c b/libs/vxf/outlier-encoder.c
deleted file mode 100644
index 12dd827..0000000
--- a/libs/vxf/outlier-encoder.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-
-#include <bitstr.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#define ENCODER_NAME(T) outlier_encode_ ## T
-#define ENCODER(T) static rc_t CC ENCODER_NAME(T) (void *self, const VXformInfo *info, void *Dst, const void *Src, uint64_t elem_count) \
-{ \
-    T *dst = (T *)Dst; \
-    T const *src = (T const *)Src; \
-    T last = 1; \
-    T const outlier = *(T const *)self; \
-    uint64_t i; \
-    for (i = 0; i != elem_count; ++i) { \
-        T const y = src[i]; \
-        if ((((T)(y << 1)) >> 1) != y) \
-            return RC(rcXF, rcFunction, rcExecuting, rcConstraint, rcViolated); \
-        if (y == outlier) \
-            dst[i] = last; \
-        else \
-            last = (dst[i] = y << 1) | 1; \
-    } \
-    return 0; \
-}
-
-extern void Debugger(void);
-
-ENCODER(uint8_t)
-ENCODER(uint16_t)
-ENCODER(uint32_t)
-#if 1
-ENCODER(uint64_t)
-#else
-static rc_t CC outlier_encode_uint64_t (void *self, const VXformInfo *info, void *Dst, const void *Src, uint64_t elem_count)
-{
-    typedef uint64_t T;
-    T *dst = (T *)Dst;
-    T const *src = (T const *)Src;
-    T last = 1;
-    T const outlier = *(T const *)self;
-    uint64_t i;
-
-    for (i = 0; i != elem_count; ++i) {
-        T const y = src[i];
-        if ((((T)(y << 1)) >> 1) != y)
-            return RC(rcXF, rcFunction, rcExecuting, rcConstraint, rcViolated);
-        if (y == outlier)
-            dst[i] = last;
-        else
-            last = (dst[i] = y << 1) | 1;
-    }
-    return 0;
-}
-#endif
-
-/*
- function < type T > T outlier_encode #1.0 < T outlier > ( T y );
- */
-
-VTRANSFACT_IMPL ( vdb_outlier_encode, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    void *self;
-
-    if (info->fdesc.desc.domain != vtdInt || cp->argv[0].count != 1)
-        return RC(rcXF, rcFunction, rcConstructing, rcType, rcIncorrect);
-
-    switch (VTypedescSizeof(&cp->argv[0].desc)) {
-    case 8:
-    case 16:
-    case 32:
-    case 64:
-        break;
-    default:
-        return RC(rcXF, rcFunction, rcConstructing, rcType, rcIncorrect);
-        break;
-    }
-    
-    self = malloc(sizeof(uint64_t));
-    if (self == NULL)
-        return RC(rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted);
-    
-    switch (VTypedescSizeof(&cp->argv[0].desc)) {
-    case 8:
-        *(uint8_t *)self = cp->argv[0].data.u8[0];
-        rslt->u.af = ENCODER_NAME(uint8_t);
-        break;
-    case 16:
-        *(uint16_t *)self = cp->argv[0].data.u16[0];
-        rslt->u.af = ENCODER_NAME(uint16_t);
-        break;
-    case 32:
-        *(uint32_t *)self = cp->argv[0].data.u32[0];
-        rslt->u.af = ENCODER_NAME(uint32_t);
-        break;
-    case 64:
-        *(uint64_t *)self = cp->argv[0].data.u64[0];
-        rslt->u.af = ENCODER_NAME(uint64_t);
-        break;
-    default:
-        break;
-    }
-    rslt->self = self;
-    rslt->whack = free;
-    rslt->variant = vftArray;
-    return 0;
-}
diff --git a/libs/vxf/pack.c b/libs/vxf/pack.c
deleted file mode 100644
index 27b9bae..0000000
--- a/libs/vxf/pack.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-
-#include <klib/pack.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-
-
-typedef struct self_t {
-    VTypedesc sdesc;
-    uint32_t dbits;
-} self_t;
-
-static
-rc_t CC pack_func(
-               void *Self,
-               const VXformInfo *info,
-               void *dst,
-               const void *src,
-               uint64_t elem_count
-) {
-    const self_t *self = Self;
-    bitsz_t psize;
-    
-    return Pack(
-                self->sdesc.intrinsic_bits, self->dbits,
-                src, (elem_count * self->sdesc.intrinsic_dim * self->sdesc.intrinsic_bits) >> 3, 0,
-                dst, 0, elem_count * self->sdesc.intrinsic_dim * self->dbits, &psize
-               );
-}
-
-static
-void CC vxf_pack_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-/* 
- */
-VTRANSFACT_IMPL(vdb_pack, 1, 0, 0) (const void *Self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc = 0;
-    self_t *self;
-
-    self = malloc(sizeof(self_t));
-    if (self) {
-        self->dbits = info->fdesc.desc.intrinsic_dim;
-
-        assert (dp->argc == 1);
-        self->sdesc = dp->argv[0].desc;
-        
-        rslt->self = self;
-        rslt->whack = vxf_pack_wrapper;
-
-        rslt->variant = vftArray;
-        rslt->u.af = pack_func;
-    }
-    else
-        rc = RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-    return rc;
-}
diff --git a/libs/vxf/paste.c b/libs/vxf/paste.c
deleted file mode 100644
index 6dd4b1a..0000000
--- a/libs/vxf/paste.c
+++ /dev/null
@@ -1,357 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-typedef struct pastie pastie;
-struct pastie
-{
-    struct
-    {
-        union
-        {
-            void *u1;
-            uint8_t *u8;
-            uint16_t *u16;
-            uint32_t *u32;
-            uint64_t *u64;
-        } u;
-        bitsz_t off;
-
-    } dst;
-    struct
-    {
-        union
-        {
-            const void *u1;
-            const uint8_t *u8;
-            const uint16_t *u16;
-            const uint32_t *u32;
-            const uint64_t *u64;
-        } u;
-        bitsz_t off, len;
-
-    } src [ 16 ];
-};
-
-static
-rc_t CC paste_func1 ( void *data, const VXformInfo *info, int64_t row_id,
-    const VFixedRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc = 0;
-    pastie *self = data;
-    uint32_t i, j, row_len = (uint32_t)rslt -> elem_count;
-
-    assert(rslt -> elem_count >> 32 == 0);
-    /* populate "self" */
-    self -> dst . u . u1 = rslt -> base;
-    self -> dst . off = ((uint64_t)rslt -> first_elem) * rslt -> elem_bits;
-    for ( j = 0; j < argc; ++ j )
-    {
-        self -> src [ j ] . u . u1 = argv [ j ] . u . data .base;
-        self -> src [ j ] . off = ((uint64_t)argv [ j ] . u . data .first_elem) * argv [ j ] . u . data .elem_bits;
-        self -> src [ j ] . len = argv [ j ] . u . data .elem_bits;
-    }
-
-    /* create output row */
-    for ( i = 0; i < row_len; ++ i )
-    {
-        for ( j = 0; j < argc; ++ j )
-        {
-            uint32_t k = (uint32_t)self -> src [ j ] . len;
-            assert(self -> src [ j ] . len >> 32 == 0);
-            bitcpy ( self -> dst . u . u1, self -> dst . off,
-                     self -> src [ j ] . u . u1, self -> src [ j ] . off, k );
-            self -> dst . off += k;
-            self -> src [ j ] . off += k;
-        }
-    }
-    return rc;
-}
-
-static
-rc_t CC paste_func8 ( void *data, const VXformInfo *info, int64_t row_id,
-    const VFixedRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc = 0;
-    pastie *self = data;
-    uint32_t i, j, row_len = (uint32_t)rslt -> elem_count;
-    
-    assert(rslt -> elem_count >> 32 == 0);
-    /* populate "self" */
-    self -> dst . u . u8 = rslt -> base;
-    self -> dst . off = ((uint64_t)rslt -> first_elem) * (rslt -> elem_bits>>3);
-    for ( j = 0; j < argc; ++ j )
-    {
-        self -> src [ j ] . u . u8 = argv [ j ] . u . data .base;
-        self -> src [ j ] . off = ((uint64_t)argv [ j ] . u . data .first_elem) * (argv [ j ] . u . data .elem_bits >> 3);
-        self -> src [ j ] . len = argv [ j ] . u . data .elem_bits >> 3;
-    }
-
-    /* create output row */
-    for ( i = 0; i < row_len; ++ i )
-    {
-        for ( j = 0; j < argc; ++ j )
-        {
-            uint32_t k;
-            for ( k = 0; k < self -> src [ j ] . len; ++ k )
-            {
-                self -> dst . u . u8 [ self -> dst . off + k ] =
-                    self -> src [ j ] . u . u8 [ self -> src [ j ] . off + k ];
-            }
-
-            self -> dst . off += k;
-            self -> src [ j ] . off += k;
-        }
-    }
-    return rc;
-}
-
-static
-rc_t CC paste_func16 ( void *data, const VXformInfo *info, int64_t row_id,
-    const VFixedRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc = 0;
-    pastie *self = data;
-    uint32_t i, j, row_len = (uint32_t)rslt -> elem_count;
-    
-    assert(rslt -> elem_count >> 32 == 0);
-    /* populate "self" */
-    self -> dst . u . u16 = rslt -> base;
-    self -> dst . off = ((uint64_t)rslt -> first_elem) * (rslt -> elem_bits>>4);
-    for ( j = 0; j < argc; ++ j )
-    {
-        self -> src [ j ] . u . u16 = argv [ j ] . u . data .base;
-        self -> src [ j ] . off = ((uint64_t)argv [ j ] . u . data .first_elem) * (argv [ j ] . u . data .elem_bits >> 4);
-        self -> src [ j ] . len = argv [ j ] . u . data .elem_bits >> 4;
-    }
-
-    /* create output row */
-    for ( i = 0; i < row_len; ++ i )
-    {
-        for ( j = 0; j < argc; ++ j )
-        {
-            uint32_t k;
-            for ( k = 0; k < self -> src [ j ] . len; ++ k )
-            {
-                self -> dst . u . u16 [ self -> dst . off + k ] =
-                    self -> src [ j ] . u . u16 [ self -> src [ j ] . off + k ];
-            }
-
-            self -> dst . off += k;
-            self -> src [ j ] . off += k;
-        }
-    }
-    return rc;
-}
-
-static
-rc_t CC paste_func32 ( void *data, const VXformInfo *info, int64_t row_id,
-    const VFixedRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc = 0;
-    pastie *self = data;
-    uint32_t i, j, row_len = (uint32_t)rslt -> elem_count;
-    
-    assert(rslt -> elem_count >> 32 == 0);
-    /* populate "self" */
-    self -> dst . u . u32 = rslt -> base;
-    self -> dst . off = ((uint64_t)rslt -> first_elem) * (rslt -> elem_bits>>5);
-    for ( j = 0; j < argc; ++ j )
-    {
-        self -> src [ j ] . u . u32 = argv [ j ] . u . data .base;
-        self -> src [ j ] . off = ((uint64_t)argv [ j ] . u . data .first_elem) * (argv [ j ] . u . data .elem_bits >> 5);
-        self -> src [ j ] . len = argv [ j ] . u . data .elem_bits >> 5;
-    }
-
-    /* create output row */
-    for ( i = 0; i < row_len; ++ i )
-    {
-        for ( j = 0; j < argc; ++ j )
-        {
-            uint32_t k;
-            for ( k = 0; k < self -> src [ j ] . len; ++ k )
-            {
-                self -> dst . u . u32 [ self -> dst . off + k ] =
-                    self -> src [ j ] . u . u32 [ self -> src [ j ] . off + k ];
-            }
-
-            self -> dst . off += k;
-            self -> src [ j ] . off += k;
-        }
-    }
-    return rc;
-}
-
-static
-rc_t CC paste_func64 ( void *data, const VXformInfo *info, int64_t row_id,
-    const VFixedRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc = 0;
-    pastie *self = data;
-    uint32_t i, j, row_len = (uint32_t)rslt -> elem_count;
-    
-    assert(rslt -> elem_count >> 32 == 0);
-    /* populate "self" */
-    self -> dst . u . u64 = rslt -> base;
-    self -> dst . off = ((uint64_t)rslt -> first_elem) * (rslt -> elem_bits>>6);
-    for ( j = 0; j < argc; ++ j )
-    {
-        self -> src [ j ] . u . u64 = argv [ j ] . u . data .base;
-        self -> src [ j ] . off = ((uint64_t)argv [ j ] . u . data .first_elem) * (argv [ j ] . u . data .elem_bits >> 6);
-        self -> src [ j ] . len = argv [ j ] . u . data .elem_bits >> 6;
-    }
-
-    /* create output row */
-    for ( i = 0; i < row_len; ++ i )
-    {
-        for ( j = 0; j < argc; ++ j )
-        {
-            uint32_t k;
-            for ( k = 0; k < self -> src [ j ] . len; ++ k )
-            {
-                self -> dst . u . u64 [ self -> dst . off + k ] =
-                    self -> src [ j ] . u . u64 [ self -> src [ j ] . off + k ];
-            }
-
-            self -> dst . off += k;
-            self -> src [ j ] . off += k;
-        }
-    }
-    return rc;
-}
-
-static
-void CC vxf_paste_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-#include <stdio.h>
-
-/* paste
- * function < type T > T [ * ] paste #1.0 ( T [ * ] in, ... );
- * function any NCBI:paste #1.0 ( any in, ... );
- */
-VTRANSFACT_IMPL ( vdb_paste, 1, 0, 0 ) ( const void *self,
-    const VXfactInfo *info, VFuncDesc *rslt,
-    const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    pastie *fself;
-    uint32_t rtn_bits, min_gcd;
-
-    /* in the case of the modern "paste", the compiler is able to
-       enforce only the function signature, but not the essential
-       requirement that the output dimension equal the sum of all
-       input dimensions. in the case of "NCBI:paste", the compiler
-       cannot enforce anything, so we check for inputs that have
-       the same domain and intrinsic type-size, already guaranteed
-       by the type-checked version. */
-    uint32_t i, sum;
-    for ( i = sum = 0; i < dp -> argc; ++ i )
-    {
-        assert ( dp -> argv [ i ] . fd . td . dim != 0 );
-
-        /* handle type-checking for NCBI:paste */
-        if ( dp -> argv [ i ] . desc . domain != info -> fdesc . desc . domain ||
-             dp -> argv [ i ] . desc . intrinsic_bits != info -> fdesc . desc . intrinsic_bits )
-        {
-            return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-        }
-
-        sum += dp -> argv [ i ] . desc . intrinsic_dim;
-    }
-
-    assert ( info -> fdesc . fd . td . dim != 0 );
-    if ( sum > info -> fdesc . desc . intrinsic_dim )
-        return RC ( rcXF, rcFunction, rcConstructing, rcArgv, rcExcessive );
-
-    if ( sum < info -> fdesc . desc . intrinsic_dim )
-        return RC ( rcXF, rcFunction, rcConstructing, rcArgv, rcInsufficient );
-
-    /* allocate self */
-    fself = malloc ( sizeof * fself - sizeof fself -> src + sizeof fself -> src [ 0 ] * dp -> argc );
-    if ( fself == NULL )
-        return RC ( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-
-    /* we can create the function */
-    rslt -> self = fself;
-    rslt -> whack = vxf_paste_wrapper;
-    rslt -> variant = vftFixedRow;
-
-    /* the output dimension == sum ( dimension ) for all inputs
-       each input dimension will have a GCD of sizeof ( element ) * N
-       for N = 1 .. output dimension. the minimum of these will determine
-       the common copy word size */
-    rtn_bits = VTypedescSizeof ( & info -> fdesc . desc );
-    for ( min_gcd = rtn_bits, i = 0; i < dp -> argc; ++ i )
-    {
-        uint32_t gcd, a, b = VTypedescSizeof ( & dp -> argv [ i ] . desc );
-        for ( a = rtn_bits; ; )
-        {
-            if ( b == 0 )
-            {
-                gcd = a;
-                break;
-            }
-
-            a %= b;
-            if ( a == 0 )
-            {
-                gcd = b;
-                break;
-            }
-
-            b %= a;
-        }
-
-        if ( gcd < min_gcd )
-            min_gcd = gcd;
-    }
-
-    /* select the copy word size */
-    if ( ( min_gcd & 63 ) == 0 )
-        rslt -> u . pf = paste_func64;
-    else if ( ( min_gcd & 31 ) == 0 )
-        rslt -> u . pf = paste_func32;
-    else if ( ( min_gcd & 15 ) == 0 )
-        rslt -> u . pf = paste_func16;
-    else if ( ( min_gcd & 7 ) == 0 )
-        rslt -> u . pf = paste_func8;
-    else
-        rslt -> u . pf = paste_func1;
-
-    return 0;
-}
diff --git a/libs/vxf/rand_4na_2na.c b/libs/vxf/rand_4na_2na.c
deleted file mode 100644
index e8feaac..0000000
--- a/libs/vxf/rand_4na_2na.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <arch-impl.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-#include <sysalloc.h>
-#include <time.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-#if 1
-static struct {
-	uint8_t num_bits;
-	uint8_t val[4];
-} map[16] = {
-
-#if WE_SECRETLY_MEANT_4NA_BY_2NA
-#define A 1
-#define C 2
-#define G 4
-#define T 8
-#else
-#define A 0
-#define C 1
-#define G 2
-#define T 3
-#endif
-/*0000*/{4,{A,C,G,T}}, 
-/*0001*/{1,{A}},
-/*0010*/{1,{C}},
-/*0011*/{2,{A,C}},
-/*0100*/{1,{G}},
-/*0101*/{2,{A,G}},
-/*0110*/{2,{C,G}},
-/*0111*/{3,{A,C,G}},
-/*1000*/{1,{T}},
-/*1001*/{2,{A,T}},
-/*1010*/{2,{C,T}},
-/*1011*/{3,{A,C,T}},
-/*1100*/{2,{G,T}},
-/*1101*/{3,{A,G,T}},
-/*1110*/{3,{C,G,T}},
-/*1111*/{4,{A,C,G,T}}
-#undef A
-#undef C
-#undef G
-#undef T
-};
-
-static uint8_t randomize_ambiguity(uint8_t base, unsigned *seed, bool *reseed) {
-    assert(base < 16);
-    
-    if (map[base].num_bits == 1) {
-        base = map[base].val[0];
-        *seed = (*seed << 2) | base;
-        *reseed = true;
-        return base;
-    }
-    else {        
-        unsigned int rval;
-        unsigned int num_bits = map [ base ] . num_bits;
-        
-        if (*reseed)
-        {
-            *reseed = false;
-            srand(*seed);
-        }
-        rval = ( unsigned int ) ( ( ( uint64_t ) rand () * num_bits ) / RAND_MAX );
-
-        if ( rval >= num_bits)
-            return map[base].val[rval % num_bits];
-
-        return map[base].val[rval];
-    }
-}
-#else
-typedef uint8_t dna4na_t;
-
-static const bool isExact[16]
-  = { 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
-
-static const struct { dna4na_t val[12]; } possibleBase[16] = {
-    {{ 1, 2, 4, 8, 1, 2, 4, 8, 1, 2, 4, 8 }}, /* 0000 1 2 4 8 */
-    {{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }}, /* 0001 1 */
-    {{ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }}, /* 0010 2 */
-    {{ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2 }}, /* 0011 1 2 */
-    {{ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }}, /* 0100 4 */
-    {{ 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4 }}, /* 0101 1 4 */
-    {{ 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4 }}, /* 0110 2 4 */
-    {{ 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4 }}, /* 0111 1 2 4 */
-    {{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 }}, /* 1000 8 */
-    {{ 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8 }}, /* 1001 1 8 */
-    {{ 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8 }}, /* 1010 2 8 */
-    {{ 1, 2, 8, 1, 2, 8, 1, 2, 8, 1, 2, 8 }}, /* 1011 1 2 8 */
-    {{ 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8 }}, /* 1100 4 8 */
-    {{ 1, 4, 8, 1, 4, 8, 1, 4, 8, 1, 4, 8 }}, /* 1101 1 4 8 */
-    {{ 2, 4, 8, 2, 4, 8, 2, 4, 8, 2, 4, 8 }}, /* 1110 2 4 8 */
-    {{ 1, 2, 4, 8, 1, 2, 4, 8, 1, 2, 4, 8 }}  /* 1111 1 2 4 8 */
-};
-
-static uint8_t randomize_ambiguity(uint8_t base, unsigned *seed, bool *reseed) {
-    assert(base < 16);
-    
-    if (isExact[base]) {
-        typedef uint8_t dna2na_t;
-        
-        static const dna2na_t map4na2na[16]
-        = { 0, 0, 1, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0 };
-        
-        *seed = (*seed << 2) | map4na2na[base];
-        *reseed = true;
-        return base;
-    }
-    else {
-        unsigned rval;
-        
-        if (*reseed) {
-            *reseed = false;
-            srand(*seed);
-        }
-        rval = ((uint8_t)(rand() / (RAND_MAX >> 8))) % 12;
-        assert(rval < 12);
-        return possibleBase[base].val[rval];
-    }
-}
-#endif
-
-
-static
-rc_t CC rand_4na_2na_impl  ( void *data,
-    const VXformInfo *info, int64_t row_id, VRowResult *rslt,
-    uint32_t argc, const VRowData argv [] )
-{
-    unsigned seed = time( NULL ) + row_id;
-    bool reseed = true;
-    uint8_t *dst;
-    const uint8_t *src = argv [ 0 ] . u . data . base;
-    rc_t	rc;
-    KDataBuffer *dst_buf = rslt -> data;
-    
-    src += argv[0].u.data.first_elem;
-    rslt->elem_count = argv[0].u.data.elem_count;
-    assert(dst_buf -> elem_bits == 8 );
-#if 0
-    rslt->no_cache = true; /** do not cache randomized data **/
-#endif
-    rc = KDataBufferResize ( dst_buf, rslt->elem_count );
-    if( rc == 0 ){
-	    int i,last;
-	    dst = dst_buf -> base;
-
-	    for ( last = rslt -> elem_count; last >  0 && src[last-1] == 15; last --){} /** find run of Ns from the right **/
-	    if  ( rslt -> elem_count - last < 5) last = rslt -> elem_count; /*** discard not so large run of Ns ***/
-	    
-	    for ( i = 0; i < last ; ++ i )
-		dst[i] = randomize_ambiguity(src[i], &seed, &reseed);
-	    for ( ; i < rslt -> elem_count; ++ i ) /** large run of Ns from the right is set to As, not randomized  **/
-		dst[i] = 0;
-    }
-    return rc;
-}
-
-
-VTRANSFACT_IMPL ( INSDC_SEQ_rand_4na_2na, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt -> self = NULL;
-    rslt -> whack = NULL;
-    rslt -> u . ndf = rand_4na_2na_impl;
-    rslt -> variant = vftNonDetRow;
-
-    return 0;
-}
diff --git a/libs/vxf/rldecode.c b/libs/vxf/rldecode.c
deleted file mode 100644
index f39c868..0000000
--- a/libs/vxf/rldecode.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/data-buffer.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <assert.h>
-
-enum header_flags {
-	zero_run = 0,
-	one_run = 1,
-	byte_run = 2,
-	uncompressed = 3
-};
-
-static int decode(uint8_t *dst, unsigned dsize, const uint8_t src[], unsigned ssize) {
-    int st, type;
-    unsigned size, i, j;
-    
-    for (st = type = 0, i = j = size = 0; i != ssize; ++i) {
-        int x = src[i];
-        
-        switch (st) {
-        case 0:
-            type = x >> 6;
-            size = x & 0x1F;
-            if ((x & 0x20) == 0)
-                goto DECODED;
-            st = 1;
-            break;
-        case 1:
-            size = (size << 7) | (x & 0x7F);
-            if ((x & 0x80) == 0)
-                goto DECODED;
-            st = 2;
-            break;
-        case 2:
-            size = (size << 7) | (x & 0x7F);
-            if ((x & 0x80) == 0)
-                goto DECODED;
-            st = 3;
-            break;
-        case 3:
-            size = (size << 7) | (x & 0x7F);
-            if ((x & 0x80) == 0)
-                goto DECODED;
-            return 1;
-        case 4:
-            dst[j++] = x;
-            if (--size == 0)
-                st = 0;
-            break;
-        case 5:
-            memset(dst + j, x, size);
-            j += size;
-            st = 0;
-            break;
-        }
-        continue;
-    DECODED:
-        if (j + size > dsize)
-            return 1;
-        switch (type) {
-        case uncompressed:
-            if (size == 0) {
-                size = ssize - i - 1;
-                if (j + size > dsize)
-                    return 1;
-                memcpy(dst + j, src + i + 1, size);
-                return 0;
-            }
-            st = 4;
-            break;
-        case zero_run:
-            memset(dst + j, 0, size);
-            j += size;
-            st = 0;
-            break;
-        case one_run:
-            memset(dst + j, 0xFF, size);
-            j += size;
-            st = 0;
-            break;
-        default:
-            st = 5;
-            break;
-        }
-    }
-    return 0;
-}
-
-static
-rc_t CC rldecode_func(
-                   void *Self,
-                   const VXformInfo *info,
-                   VBlobResult *dst,
-                   const VBlobData *src,
-                   VBlobHeader *hdr
-) {
-    int rslt;
-    
-    rslt = decode(dst->data, (unsigned)(((size_t)dst->elem_count * dst->elem_bits + 7) >> 3),
-                  src->data, (unsigned)(((size_t)src->elem_count * src->elem_bits + 7) >> 3));
-    if (rslt)
-        return RC(rcVDB, rcFunction, rcExecuting, rcData, rcCorrupt);
-    return 0;
-}
-
-/* vdb:rldecode
- * function any rldecode #1.0 ( rle_fmt in )
- */
-VTRANSFACT_IMPL(vdb_rldecode, 1, 0, 0) (const void *self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftBlob;
-    rslt->u.bf = rldecode_func;
-    
-    return 0;
-}
-
-#if TESTING
-int rld_test(void *dst, unsigned dsize, const void *src, unsigned ssize) {
-    return decode(dst, dsize, src, ssize);
-}
-#endif
diff --git a/libs/vxf/rlencode.c b/libs/vxf/rlencode.c
deleted file mode 100644
index 05a4890..0000000
--- a/libs/vxf/rlencode.c
+++ /dev/null
@@ -1,262 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/data-buffer.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <assert.h>
-
-enum header_flags {
-	zero_run = 0,
-	one_run = 1,
-	byte_run = 2,
-	uncompressed = 3
-};
-
-#define SPECIAL ((uncompressed) << 6)
-
-#define MAX_RUN_LEN ((size_t)(((size_t)1) << (5 + 3 * 7)))
-#define HEAD_SIZE (4)
-
-static __inline__
-unsigned LENGTH_SIZE(size_t len) {
-    return len < 1 ? 0 : len < 1UL << 6 ? 1 : len < 1UL << 13 ? 2 : len < 1UL << 20 ? 3 : len < 1UL << 27 ? 4 : 0;
-}
-
-static __inline__
-int OUTPUT_SIZE(int type, int len) {
-    switch (type) {
-    case zero_run:
-    case one_run:
-        return LENGTH_SIZE(len);
-    case byte_run:
-        return LENGTH_SIZE(len) + 1;
-    case uncompressed:
-        return LENGTH_SIZE(len) + len;
-    default:
-        return len + 1;
-    }
-}
-
-static __inline__
-int f_HEADER(uint8_t HEAD[], uint8_t FLAG, int rlen) {
-    if (rlen < 1UL << 5) {
-        HEAD[0] = (FLAG << 6) | rlen;
-        return 1;
-    }
-    if (rlen < 1UL << 12) {
-        HEAD[0] = (FLAG << 6) | (1 << 5) | (rlen >> 7);
-        HEAD[1] =                           rlen         & 0x7F;
-        return 2;
-    }
-    if (rlen < 1UL << 19) {
-        HEAD[0] = (FLAG << 6) | (1 << 5) | ( rlen >> 14);
-        HEAD[1] =               (1 << 7) | ((rlen >>  7) & 0x7F);
-        HEAD[2] =                            rlen        & 0x7F;
-        return 3;
-    }
-        HEAD[0] = (FLAG << 6) | (1 << 5) | ( rlen >> 21);
-        HEAD[1] =               (1 << 7) | ((rlen >> 14) & 0x7F);
-        HEAD[2] =               (1 << 7) | ((rlen >>  7) & 0x7F);
-        HEAD[3] =                            rlen        & 0x7F;
-        return 4;
-}
-
-#define HEADER(Y, HEAD, FLAG, LEN) Y = f_HEADER(HEAD, FLAG, LEN)
-
-static __inline__ int rle_write(uint8_t *dst, const uint8_t *dend, const uint8_t *src, int type, size_t len) {
-	uint8_t head[HEAD_SIZE + 1];
-	int i = 0;
-	
-	if (type == SPECIAL) {
-		if (dst + len + 1 > dend)
-			return 0;
-
-		*dst++ = SPECIAL;
-		memcpy(dst, src, len);
-		return (int)len + 1;
-	}
-    if (len >= MAX_RUN_LEN) {
-        i = rle_write(dst, dend, src, type, len >> 1);
-        if (i == 0)
-            return 0;
-        if (type == uncompressed)
-            src += len >> 1;
-        return i + rle_write(dst + i, dend, src, type, len - (len >> 1));
-    }
-	
-	HEADER(i, head, type, (int)len);
-
-	if (type == byte_run)
-		++i;
-	if (dst + i > dend)
-		return 0;
-	switch (type) {
-    case byte_run:
-        head[i - 1] = *src;
-    case zero_run:
-    case one_run:
-        memcpy(dst, head, i);
-        return i;
-    default:
-        break;
-	}
-	if (dst + i + len > dend)
-		return 0;
-	memcpy(dst, head, i);
-	memcpy(dst + i, src, len);
-	return i + (int)len;
-}
-
-#define WRITE(SRC, TYPE, END) do { \
-    int i; \
-    i = rle_write(dst, dend, (SRC), (TYPE), (END) - (SRC)); \
-    if (i == 0) { \
-        i = rle_write(dst, dend, (SRC), SPECIAL, send - (SRC)); \
-        if (i == 0) { \
-            return -1; \
-        } \
-    } \
-    dst += i; \
-} while(0)
-
-static int encode(uint8_t *Dst, unsigned dsize, unsigned *psize, const uint8_t *src, unsigned ssize) {
-    uint8_t *dst = Dst;
-	const uint8_t *const dend = dst + dsize;
-	const uint8_t *const send = src + ssize;
-	const uint8_t *cp = src, *mark = NULL;
-	uint8_t last;
-	int type;
-    unsigned size1, size2, size3;
-	
-	while (last = *cp, ++cp != send) {
-		if (*cp == last) {
-			if (mark == NULL)
-				mark = cp - 1;
-			else
-				continue;
-		}
-		else {
-			if (mark == NULL)
-				continue;
-			if (mark != src) {
-				if (mark - src == 1) {
-					if (*src == 0)
-						type = zero_run;
-					else if (*src == 0xFF)
-						type = one_run;
-					else
-						type = uncompressed;
-				}
-				else
-					type = uncompressed;
-				size1 = OUTPUT_SIZE(type, (int)( mark - src ) );
-				size2 = OUTPUT_SIZE(*mark == 0 ? zero_run : *mark == 0xFF ? one_run : byte_run, (int)(cp - mark) );
-				size3 = OUTPUT_SIZE(uncompressed, (int)(cp - src) );
-				if (size1 + size2 >= size3) {
-					mark = NULL;
-					continue;
-				}
-				WRITE(src, type, mark);
-			}
-			WRITE(mark, *mark == 0 ? zero_run : *mark == 0xFF ? one_run : byte_run, cp);
-			mark = NULL;
-			src = cp;
-		}
-	}
-	if (src != cp) {
-		if (mark == NULL)
-			WRITE(src, SPECIAL, cp);
-		else {
-			if (mark != src) {
-				if (mark - src == 1) {
-					if (*src == 0)
-						type = zero_run;
-					else if (*src == 0xFF)
-						type = one_run;
-					else
-						type = uncompressed;
-				}
-				else
-					type = uncompressed;
-				WRITE(src, type, mark);
-			}
-			WRITE(mark, *mark == 0 ? zero_run : *mark == 0xFF ? one_run : byte_run, cp);
-		}
-	}
-    *psize = (unsigned)(dst - Dst);
-	return 0;
-}
-
-static
-rc_t CC rlencode_func(
-              void *Self,
-              const VXformInfo *info,
-              VBlobResult *dst,
-              const VBlobData *src,
-              VBlobHeader *hdr
-) {
-    unsigned sz;
-    int rc;
-    
-    VBlobHeaderSetVersion(hdr, 0);
-    rc = encode(dst->data, (unsigned)(((size_t)dst->elem_count * dst->elem_bits + 7) >> 3), &sz,
-                src->data, (unsigned)(((size_t)src->elem_count * src->elem_bits + 7) >> 3));
-    if (rc)
-        return RC(rcVDB, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-    dst->elem_bits = 1;
-    dst->byte_order = vboNone;
-    dst->elem_count = sz << 3;
-
-    return 0;
-}
-
-/* vdb:rlencode
- * function rle_fmt rlencode #1.0 ( any in )
- */
-VTRANSFACT_IMPL(vdb_rlencode, 1, 0, 0) (const void *self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftBlob;
-    rslt->u.bf = rlencode_func;
-    
-    return 0;
-}
-
-#if TESTING
-int rle_test(void *dst, unsigned dsize, const void *src, unsigned ssize) {
-    unsigned dummy;
-    return encode(dst, dsize, &dummy, src, ssize);
-}
-#endif
-
diff --git a/libs/vxf/round.c b/libs/vxf/round.c
deleted file mode 100644
index 8d74830..0000000
--- a/libs/vxf/round.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <compiler.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <math.h>
-
-#define FLOAT_FUNC roundf
-#define DOUBLE_FUNC round
-#include "math-funcs-impl.h"
-
-/*
- function < type T >
- T vdb:round #1.0 ( T in );
- */
-VTRANSFACT_IMPL(vdb_round, 1, 0, 0) (const void *self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp ) {
-    return factory(self, info, rslt, cp, dp);
-}
diff --git a/libs/vxf/simple-sub-select.c b/libs/vxf/simple-sub-select.c
deleted file mode 100644
index ab6d16c..0000000
--- a/libs/vxf/simple-sub-select.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/vdb-priv.h>
-
-
-#include <klib/rc.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <insdc/sra.h>
-#include <insdc/insdc.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-
-typedef struct SubSelect SubSelect;
-struct SubSelect
-{
-    const VCursor *curs;
-    uint32_t idx;
-    const VCursor *native_curs; /** Native cursors are either master cursor or sub_cursors - no need to AddRef **/
-    bool  first_time;
-    char  *col_name;
-    uint32_t col_name_len;
-};
-
-static
-rc_t CC simple_sub_select ( void *data, const VXformInfo *info,
-    int64_t local_row_id, VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    const SubSelect *self = ( const void* ) data;
-
-    rc_t rc;
-    const void *base;
-    uint32_t elem_bits, boff, row_len;
-    int32_t  idx=0; /*** 0 - means no index ***/
-
-    const int64_t *remote_row_id = argv [ 0 ] . u . data . base;
-    remote_row_id += argv [ 0 ] . u . data . first_elem;
-
-    assert ( argv [ 0 ] . u . data . elem_bits == 64 );
-    if(argv [ 0 ] . u . data . elem_count == 0){/** alow empty returns ***/
-        rc = KDataBufferResize ( rslt -> data, 0 );
-        rslt -> elem_count = 0;
-        return 0;
-    }
-    assert ( argv [ 0 ] . u . data . elem_count == 1 );
-    if(argc > 1 ){
-    	const int32_t *remote_idx = argv[1].u.data.base;
-        idx=remote_idx[argv[1].u.data.first_elem];
-    }
-    if(self->native_curs && self->first_time){ /*** can we use native cursor for the data? ***/
-        SubSelect *mself = (SubSelect *)self;
-        uint32_t idx;
-        rc = VCursorAddColumn ( mself->native_curs, & idx, "%.*s", mself->col_name_len, mself->col_name );
-        if(rc == 0 || GetRCState(rc) == rcExists){
-            VCursorRelease( mself->curs);
-            mself->curs = mself->native_curs;
-            mself->idx  = idx;
-        }
-        mself->first_time = false;
-        rc = 0; /** reset rc? **/
-    }
-	
-    /* sub-select */
-    rc = VCursorCellDataDirect ( self -> curs, * remote_row_id, self -> idx,
-                                 & elem_bits, & base, & boff, & row_len );
-    if ( rc == 0 )
-    {
-        uint8_t *cbase=(uint8_t*)base + (boff>>3);
-        rslt -> data -> elem_bits = elem_bits;
-        if(idx < 0 || idx > row_len){ /** out of bounds **/
-            rc = KDataBufferResize ( rslt -> data, 0 );
-            rslt -> elem_count = 0;
-            return rc;
-        } else if (idx > 0){ /*** do subset ***/
-            row_len=1;
-            cbase += (elem_bits>>3)*(idx-1);
-            boff  += elem_bits * (idx-1);
-        }
-	
-        rc = KDataBufferResize ( rslt -> data, row_len );
-        if ( rc == 0 )
-        {
-            bitsz_t bits = ( bitsz_t ) elem_bits * row_len;
-
-            if ( ( elem_bits & 7 ) != 0 )
-                bitcpy ( rslt -> data -> base, 0, base, boff, bits );
-            else{
-                assert((boff&7)==0);
-                memcpy ( rslt -> data -> base, cbase, bits>>3 );
-            }	
-
-            rslt -> elem_count = row_len;
-        }
-    }
-    else if ( GetRCState ( rc ) == rcNotFound )
-    {
-        rc = KDataBufferResize ( rslt -> data, 0 );
-        rslt -> elem_count = 0;
-    }
-
-    return rc;
-}
-
-
-/* open_sub_cursor
- */
-static
-rc_t open_sub_cursor ( SubSelect **fself, const VXfactInfo *info, const VFactoryParams *cp, const VCursor *native_curs )
-{
-    rc_t rc=0;
-    const VTable *tbl, *ftbl = NULL;
-    char name[256]="";
-    const VCursor *curs;
-
-    if ( cp -> argv [ 0 ] . count > 0 )
-    {
-        sprintf(name,"%.*s",(int)cp->argv[0].count,cp->argv[0].data.ascii);
-        rc = VCursorLinkedCursorGet(native_curs,name,&curs);
-        if(rc == 0)
-        {
-            /* curs is an owned reference */
-            rc = VCursorOpenParentRead(curs,&ftbl);
-            if(rc != 0)
-            {
-                VCursorRelease ( curs );
-                return rc;
-            }
-            tbl = ftbl;
-        }
-        else
-        {
-            const VDatabase *db;
-            uint64_t cache_size = 32*1024*1024;
-            uint64_t native_cursor_cache_size = VCursorGetCacheCapacity(native_curs);
-
-            rc = VTableOpenParentRead ( info -> tbl, & db );
-            if(rc != 0) return rc;
-            rc = VDatabaseOpenTableRead ( db, & ftbl, "%s", name);
-            if(rc != 0) return rc;
-            VDatabaseRelease ( db );
-            tbl = ftbl;
-            if(native_cursor_cache_size/4 > cache_size){
-                /* share cursor size with native cursor **/
-                cache_size = native_cursor_cache_size/4;
-                native_cursor_cache_size -= cache_size;
-                VCursorSetCacheCapacity((VCursor*)native_curs,native_cursor_cache_size);
-            }
-            rc = VTableCreateCachedCursorRead ( tbl, (const VCursor**)& curs, cache_size ); /*** some random io is expected ***/
-            if(rc != 0) return rc;
-            rc = VCursorPermitPostOpenAdd( curs );
-            if(rc != 0) return rc;
-            rc = VCursorOpen( curs );
-            if(rc != 0) return rc;
-            rc = VCursorLinkedCursorSet(native_curs,name,curs);
-            if(rc != 0) return rc;
-        }
-        native_curs = NULL;
-    }
-    else /** we don't know if native_curs permits adding columns **/
-    {
-        tbl = info -> tbl;
-        rc = VTableCreateCachedCursorRead ( tbl, & curs, 0 ); /*** some random io is expected ***/
-    }
-    if ( rc == 0 )
-    {
-        uint32_t idx;
-        rc = VCursorAddColumn ( curs, & idx, "%.*s",
-                                ( int ) cp -> argv [ 1 ] . count, cp -> argv [ 1 ] . data . ascii );
-        if ( rc == 0 || GetRCState(rc) == rcExists)
-        {
-            rc = VCursorOpen ( curs );
-            if ( rc == 0 )
-            {
-                VTypedesc src;
-                rc = VCursorDatatype ( curs, idx, NULL, & src );
-                if ( rc == 0 )
-                {
-                    /* selected column should have same characteristics */
-                    if ( src . domain != info -> fdesc . desc . domain                 ||
-                         src . intrinsic_bits != info -> fdesc . desc . intrinsic_bits ||
-                         src . intrinsic_dim != info -> fdesc . desc. intrinsic_dim )
-                    {
-                        rc = RC ( rcXF, rcFunction, rcConstructing, rcType, rcInconsistent );
-                    }
-                    else
-                    {
-                        SubSelect *self = malloc ( sizeof * self );
-                        if ( self == NULL )
-                            rc = RC ( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-                        else
-                        {
-                            self -> curs = curs;
-                            self -> idx = idx;
-                            self->native_curs = native_curs;
-                            self->first_time  = true;
-                            self->col_name_len  = cp->argv[1].count;
-                            self->col_name = malloc(self->col_name_len);
-                            memcpy(self->col_name,cp->argv[1].data.ascii,self->col_name_len);
-                            * fself = self;
-                            if ( ftbl != NULL )
-                                VTableRelease ( ftbl );
-                            return 0;
-                        }
-                    }
-                }
-            }
-        }
-        VCursorRelease ( curs );
-    }
-    if ( ftbl != NULL )
-        VTableRelease ( ftbl );
-
-    return rc;
-}
-
-
-/* close_sub_cursor
- */
-static
-void CC close_sub_cursor ( void *data )
-{
-    SubSelect *self = data;
-    if(self->curs != self->native_curs) VCursorRelease ( self -> curs );
-    free ( self->col_name);
-    free ( self );
-}
-
-
-/* 
- * function < type T >
- * T simple_sub_select < ascii tbl, ascii col > ( I64 row * I32 elem_idx(1-based) )
- *     = vdb:simple_sub_select;
- */
-VTRANSFACT_IMPL ( vdb_simple_sub_select_1, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    SubSelect *fself;
-
-    assert ( cp -> argc == 2 );
-    assert ( dp -> argc == 1 || dp -> argc == 2);
-
-    rc = open_sub_cursor ( & fself, info, cp, (const VCursor*)info->parms );
-    if ( rc == 0 )
-    {
-        rslt -> self = fself;
-        rslt -> u . rf = simple_sub_select;
-        rslt -> variant = vftRow;
-        rslt -> whack = close_sub_cursor;
-    }
-
-    return rc;
-}
-
-VTRANSFACT_IMPL ( vdb_simple_sub_select, 0, 9, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    return VTRANSFACT_NAME ( vdb_simple_sub_select_1 ) ( self, info, rslt, cp, dp );
-}
diff --git a/libs/vxf/sprintf.c b/libs/vxf/sprintf.c
deleted file mode 100644
index b8b0a15..0000000
--- a/libs/vxf/sprintf.c
+++ /dev/null
@@ -1,1280 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-
-/* the number of PrintFmt, PrintArg and String
-   elements to allocate in function-local storage */
-#define LOCAL_FMT_COUNT 64
-
-
-typedef struct Sprintf Sprintf;
-struct Sprintf
-{
-    const PrintFmt *fmt;
-    PrintArg *args;
-    String *str;
-};
-
-static uint8_t const radix2_size [ 4 ] = { 8, 16, 32, 64 };
-static uint8_t const radix8_size [ 4 ] = { 3, 6, 11, 22 };
-static uint8_t const radix10_size [ 4 ] = { 3, 5, 10, 20 };
-static uint8_t const radix16_size [ 4 ] = { 2, 4, 8, 16 };
-
-#if _DEBUGGING
-static
-rc_t validate_obj ( const Sprintf *obj, bool fmt_only )
-{
-    uint32_t i;
-
-    /* validate the format blocks */
-    for ( i = 0; obj -> fmt [ i ] . type != sptTerm; ++ i )
-    {
-        /* at this point, only looking for bad formats */
-        if ( obj -> fmt [ i ] . type == sptLiteral )
-        {
-            if ( obj -> fmt [ i ] . u . l . text == NULL )
-                return RC ( rcXF, rcFunction, rcConstructing, rcString, rcNull );
-            if ( obj -> fmt [ i ] . u . l . size == 0 )
-                return RC ( rcXF, rcFunction, rcConstructing, rcString, rcEmpty );
-            if ( string_chr ( obj -> fmt [ i ] . u . l . text, obj -> fmt [ i ] . u . l . size, 0 ) != NULL )
-                return RC ( rcXF, rcFunction, rcConstructing, rcString, rcInvalid );
-        }
-    }
-
-    return 0;
-}
-#endif
-
-static
-size_t get_radix_size ( const PrintFmt *fmt, uint32_t selector )
-{
-    const uint8_t *radix_size;
-    switch ( fmt -> radix )
-    {
-    case 0:
-        return 0;
-    case 10:
-        radix_size = radix10_size;
-        break;
-    case 16:
-        radix_size = radix16_size;
-        break;
-    case 8:
-        radix_size = radix8_size;
-        break;
-    default:
-        radix_size = radix2_size;
-    }
-    return radix_size [ selector ];
-}
-
-typedef struct FuncArgs FuncArgs;
-struct FuncArgs
-{
-    const VRowData *argv;
-    uint32_t argc;
-    uint32_t idx;
-};
-
-static
-const void *access_cell_data ( FuncArgs *args, uint64_t *row_len, size_t *size )
-{
-    size_t elem_bytes;
-    const uint8_t *data;
-
-    if ( args -> idx == args -> argc )
-        return NULL;
-
-    elem_bytes = args -> argv [ args -> idx ] . u . data . elem_bits / 8;
-    assert ( elem_bytes * 8 == args -> argv [ args -> idx ] . u . data . elem_bits );
-
-    data = args -> argv [ args -> idx ] . u . data . base;
-    * row_len = args -> argv [ args -> idx ] . u . data . elem_count;
-
-    data += args -> argv [ args -> idx ] . u . data . first_elem * elem_bytes;
-
-    if ( size != NULL )
-        * size = ( size_t ) ( * row_len * elem_bytes );
-
-    ++ args -> idx;
-    return data;
-}
-
-static
-rc_t capture_uint_scalar ( FuncArgs *args, uint64_t *val )
-{
-    uint64_t row_len;
-    const void *data = access_cell_data ( args, & row_len, NULL );
-
-    if ( data == NULL )
-        return RC ( rcXF, rcFunction, rcExecuting, rcData, rcNull );
-
-    if ( row_len != 1 )
-        return RC ( rcXF, rcFunction, rcExecuting, rcRange, rcExcessive );
-
-    switch ( args -> argv [ args -> idx - 1 ] . u . data . elem_bits )
-    {
-    case 8:
-        * val = * ( const uint8_t* ) data;
-        break;
-    case 16:
-        * val = * ( const uint16_t* ) data;
-        break;
-    case 32:
-        * val = * ( const uint32_t* ) data;
-        break;
-    case 64:
-        * val = * ( const uint64_t* ) data;
-        break;
-    }
-
-    return 0;
-}
-
-static
-rc_t CC sprintf_func ( void *obj,
-     const VXformInfo *info, int64_t row_id, VRowResult *rslt,
-     uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    size_t cell_size;
-    uint32_t str_idx, fmt_idx, arg_idx;
-
-    Sprintf *self = obj;
-
-    const PrintFmt *fmt = self -> fmt;
-    PrintArg *args = self -> args;
-    String *str = self -> str;
-
-    FuncArgs vargs;
-    vargs . argv = argv;
-    vargs . argc = argc;
-    vargs . idx = 0;
-
-    str_idx = fmt_idx = arg_idx = 0;
-
-#if _DEBUGGING
-    rc = validate_obj ( self, false );
-    if ( rc != 0 )
-        KDbgMsg ( "%s - self is bad on entry: %R\n", __func__, rc );
-#endif
-
-    /* initial pass - prepare argument list & estimate cell size */
-    for ( rc = 0, cell_size = 0; fmt [ fmt_idx ] . type != sptTerm; ++ fmt_idx )
-    {
-        size_t arg_size;
-        bool check_index;
-        uint64_t row_len, start_idx, select_len;
-        uint32_t ext_start_index, ext_stop_index;
-
-        row_len = 0;
-
-        /* test for external field width, precision, index */
-        if ( fmt [ fmt_idx ] . ext_field_width )
-        {
-            rc = capture_uint_scalar ( & vargs, & args [ arg_idx ++ ] . u );
-            if ( rc != 0 )
-                return rc;
-        }
-        if ( fmt [ fmt_idx ] . ext_precision )
-        {
-            rc = capture_uint_scalar ( & vargs, & args [ arg_idx ++ ] . u );
-            if ( rc != 0 )
-                return rc;
-        }
-
-        if ( ! fmt [ fmt_idx ] . ext_start_index )
-            start_idx = fmt [ fmt_idx ] . u . f . start_idx;
-        else
-        {
-            /* if the start index is the last in vector,
-               this needs to be suspended until later */
-            if ( ! fmt [ fmt_idx ] . inf_start_index )
-            {
-                rc = capture_uint_scalar ( & vargs, & start_idx );
-                if ( rc != 0 )
-                    return rc;
-                args [ arg_idx ] . u = start_idx;
-            }
-
-            ext_start_index = arg_idx ++;
-        }
-
-        if ( ! fmt [ fmt_idx ] . ext_stop_index && ! fmt [ fmt_idx ] . ext_select_len )
-            select_len = fmt [ fmt_idx ] . u . f . select_len;
-        else
-        {
-            /* if the stop index is the last in vector,
-               this needs to be suspended until later */
-            if ( ! fmt [ fmt_idx ] . inf_stop_index )
-            {
-                rc = capture_uint_scalar ( & vargs, & select_len );
-                if ( rc != 0 )
-                    return rc;
-                args [ arg_idx ] . u = select_len;
-            }
-            ext_stop_index = arg_idx ++;
-        }
-
-        /* make an estimate of the bytes needed by sprintf engine for argument
-           get row_len at the same time */
-        check_index = false;
-        switch ( fmt [ fmt_idx ] . type )
-        {
-        case sptLiteral:                     /* char literal        - arg in fmt   */
-            assert ( fmt [ fmt_idx ] . u . l . text != NULL );
-            arg_size = fmt [ fmt_idx ] . u . l . size;
-            row_len = arg_size;
-            -- arg_idx;
-            break;
-        case sptSignedInt8Vect:              /* signed vector int   - arg is d8    */
-            args [ arg_idx ] . d8 = access_cell_data ( & vargs, & row_len, NULL );
-            arg_size = get_radix_size ( & fmt [ fmt_idx ], 0 ) + 1;
-            break;
-        case sptSignedInt16Vect:             /* signed vector int   - arg is d16   */
-            args [ arg_idx ] . d16 = access_cell_data ( & vargs, & row_len, NULL );
-            arg_size = get_radix_size ( & fmt [ fmt_idx ], 1 ) + 1;
-            break;
-        case sptSignedInt32Vect:             /* signed vector int   - arg is d32   */
-            args [ arg_idx ] . d32 = access_cell_data ( & vargs, & row_len, NULL );
-            arg_size = get_radix_size ( & fmt [ fmt_idx ], 2 ) + 1;
-            break;
-        case sptSignedInt64Vect:             /* signed vector int   - arg is d64   */
-            args [ arg_idx ] . d64 = access_cell_data ( & vargs, & row_len, NULL );
-            arg_size = get_radix_size ( & fmt [ fmt_idx ], 3 ) + 1;
-            break;
-        case sptUnsignedInt8Vect:            /* unsigned vector int - arg is u8    */
-            args [ arg_idx ] . u8 = access_cell_data ( & vargs, & row_len, NULL );
-            arg_size = get_radix_size ( & fmt [ fmt_idx ], 0 ) + 2;
-            break;
-        case sptUnsignedInt16Vect:           /* unsigned vector int - arg is u16   */
-            args [ arg_idx ] . u16 = access_cell_data ( & vargs, & row_len, NULL );
-            arg_size = get_radix_size ( & fmt [ fmt_idx ], 1 ) + 2;
-            break;
-        case sptUnsignedInt32Vect:           /* unsigned vector int - arg is u32   */
-            args [ arg_idx ] . u32 = access_cell_data ( & vargs, & row_len, NULL );
-            arg_size = get_radix_size ( & fmt [ fmt_idx ], 2 ) + 2;
-            break;
-        case sptUnsignedInt64Vect:           /* unsigned vector int - arg is u64   */
-            args [ arg_idx ] . u64 = access_cell_data ( & vargs, & row_len, NULL );
-            arg_size = get_radix_size ( & fmt [ fmt_idx ], 3 ) + 2;
-            break;
-        case sptFloat32Vect:                 /* vector float        - arg is f32   */
-            args [ arg_idx ] . f32 = access_cell_data ( & vargs, & row_len, NULL );
-            arg_size = 32;
-            break;
-        case sptFloat64Vect:                 /* vector float        - arg is f64   */
-            args [ arg_idx ] . f64 = access_cell_data ( & vargs, & row_len, NULL );
-            arg_size = 32;
-            break;
-        case sptFloatLongVect:               /* vector float        - arg is flong */
-            args [ arg_idx ] . flong = access_cell_data ( & vargs, & row_len, NULL );
-            arg_size = 32;
-            break;
-        case sptString:                      /* vector character    - arg is S     */
-            str [ str_idx ] . addr = access_cell_data ( & vargs, & row_len, & str [ str_idx ] . size );
-            str [ str_idx ] . len = ( uint32_t ) str [ str_idx ] . size;
-            arg_size = str [ str_idx ] . size;
-            args [ arg_idx ] . S = & str [ str_idx ++ ];
-            check_index = true;
-            break;
-        case sptUCS2String:                  /* vector character    - arg is S     */
-        case sptUTF32String:                 /* vector character    - arg is S     */
-            return RC ( rcXF, rcFunction, rcExecuting, rcType, rcUnsupported );
-        case sptRowId:                       /* current row id      - arg is d     */
-            args [ arg_idx ] . d = row_id;
-            arg_size = get_radix_size ( & fmt [ fmt_idx ], 3 ) + 1;
-            ++ arg_idx;
-            continue;
-        case sptRowLen:                      /* current row length  - arg is u     */
-            access_cell_data ( & vargs, & args [ arg_idx ] . u, NULL );
-            arg_size = get_radix_size ( & fmt [ fmt_idx ], 3 ) + 2;
-            ++ arg_idx;
-            continue;
-        }
-
-        /* back-fill based upon row-length in case of non-empty rows */
-        if ( row_len != 0 )
-        {
-            /* start index is last in row */
-            if ( fmt [ fmt_idx ] . inf_start_index )
-                start_idx = args [ ext_start_index ] . u = row_len - 1;
-
-            /* end index is last in row */
-            if ( fmt [ fmt_idx ] . inf_stop_index )
-                select_len = args [ ext_stop_index ] . u = row_len - 1;
-        }
-
-        /* detect runtime error condition */
-        if ( start_idx >= row_len )
-            args [ arg_idx ] . p = NULL;
-        else
-        {
-            /* adjust size by index */
-            if ( check_index )
-            {
-                /* the select_len should be correct,
-                   unless the end is a stop coordinate */
-                if ( fmt [ fmt_idx ] . ext_stop_index )
-                {
-                    if ( select_len <= start_idx )
-                        select_len = 1;
-                    else
-                        select_len -= start_idx - 1;
-                }
-
-                /* select_len of 0 means infinite */
-                if ( select_len == 0 )
-                    select_len = row_len - start_idx;
-
-                /* real size after sub-str */
-                arg_size = argv [ vargs . idx - 1 ] . u . data . elem_bits * select_len / 8;
-            }
-
-            /* incorporate size into calcuation */
-            cell_size += arg_size;
-        }
-
-        /* done with argument */
-        ++ arg_idx;
-    }
-
-    /* round cell-size up to nearest 4K */
-    cell_size = ( cell_size + 4095 ) & ~ ( size_t ) 4095;
-
-    /* set output buffer size */
-    rc = KDataBufferResize( rslt -> data, cell_size );
-    if ( rc == 0 )
-    {
-#if _DEBUGGING
-        rc = validate_obj ( self, false );
-        if ( rc != 0 )
-            KDbgMsg ( "%s - self is bad before invoking structured_sprintf: %R\n", __func__, rc );
-#endif
-        /* invoke sprintf engine */
-        rc = structured_sprintf ( rslt -> data -> base,
-            rslt -> data -> elem_count, & cell_size, fmt, args );
-
-        /* recover from buffer insufficient */
-        if ( GetRCState ( rc ) == rcInsufficient && GetRCObject ( rc ) == (enum RCObject)rcBuffer )
-        {
-            rc = KDataBufferResize ( rslt -> data, cell_size + 1 );
-            if ( rc == 0 )
-            {
-                rc = structured_sprintf ( rslt -> data -> base,
-                    rslt -> data -> elem_count, & cell_size, fmt, args );
-            }
-        }
-
-        if ( rc == 0 )
-        {
-            /* set the return parameters */
-            rc = KDataBufferResize ( rslt -> data, cell_size );
-            if ( rc == 0 )
-            {
-                rslt -> elem_count = cell_size;
-                rslt -> elem_bits = 8;
-            }
-        }
-    }
-
-    return rc;
-}
-
-typedef struct ParseData ParseData;
-struct ParseData
-{
-    KDataBuffer overflow;
-    size_t fmt_size;
-    size_t lit_size;
-    PrintFmt *fmt;
-    uint32_t str_idx;
-    uint32_t fmt_idx;
-    uint32_t arg_idx;
-};
-
-/* create_overflow
- *  create a buffer so large that it cannot overflow again
- *  copy in existing structures
- */
-static
-rc_t create_overflow ( ParseData *pd, uint32_t fmt_idx )
-{
-    /* infer that we can never have more format items than characters in the string... */
-
-    /* our size will create a format for every byte.
-       this should be a total overkill. */
-    size_t buff_size = sizeof pd -> fmt [ 0 ] * pd -> fmt_size;
-
-    /* make the buffer */
-    rc_t rc = KDataBufferMakeBytes ( & pd -> overflow, buff_size );
-    if ( rc == 0 )
-    {
-        /* capture pointers to stack structures */
-        const PrintFmt *fmt = pd -> fmt;
-
-        /* destination pointer */
-        pd -> fmt = pd -> overflow . base;
-
-        /* copy existing data */
-        memcpy ( pd -> fmt, fmt, fmt_idx * sizeof pd -> fmt [ 0 ] );
-   }
-
-    pd -> fmt_idx = fmt_idx;
-
-    return rc;
-}
-
-typedef struct VAList VAList;
-struct VAList
-{
-    const VFunctionParams *dp;
-    uint32_t idx;
-};
-
-static
-rc_t check_integer_arg ( VAList *vargs )
-{
-    if ( vargs -> idx == vargs -> dp -> argc )
-        return RC ( rcXF, rcFunction, rcConstructing, rcParam, rcInsufficient );
-
-    switch ( vargs -> dp -> argv [ vargs -> idx ] . desc . domain )
-    {
-    case vtdBool:
-    case vtdInt:
-    case vtdUint:
-        break;
-    default:
-        return RC ( rcXF, rcFunction, rcConstructing, rcParam, rcIncorrect );
-    }
-
-    switch ( VTypedescSizeof ( & vargs -> dp -> argv [ vargs -> idx ] . desc ) )
-    {
-    case 8:
-    case 16:
-    case 32:
-    case 64:
-        break;
-    default:
-        return RC ( rcXF, rcFunction, rcConstructing, rcParam, rcIncorrect );
-    }
-
-    ++ vargs -> idx;
-    return 0;
-}
-
-static
-rc_t extract_size_modifier ( VAList *vargs, char *size_modifier )
-{
-    switch ( vargs -> dp -> argv [ vargs -> idx ] . desc . domain )
-    {
-    case vtdBool:
-        * size_modifier = 0;
-        break;
-    case vtdUint:
-    case vtdInt:
-        switch ( VTypedescSizeof ( & vargs -> dp -> argv [ vargs -> idx ] . desc ) )
-        {
-        case 8:
-            * size_modifier = 't';
-            break;
-        case 16:
-            * size_modifier = 'h';
-            break;
-        case 32:
-            * size_modifier = 0;
-            break;
-        case 64:
-            * size_modifier = 'l';
-            break;
-        default:
-            return RC ( rcXF, rcFunction, rcConstructing, rcParam, rcIncorrect );
-        }
-        break;
-    case vtdFloat:
-        switch ( VTypedescSizeof ( & vargs -> dp -> argv [ vargs -> idx ] . desc ) )
-        {
-        case 32:
-            * size_modifier = 'h';
-            break;
-        case 64:
-            * size_modifier = 0;
-            break;
-        default:
-            return RC ( rcXF, rcFunction, rcConstructing, rcParam, rcIncorrect );
-        }
-        break;
-    case vtdAscii:
-        * size_modifier = 0;
-        break;
-    case vtdUnicode:
-        switch ( vargs -> dp -> argv [ vargs -> idx ] . desc . intrinsic_bits )
-        {
-        case 8:
-            * size_modifier = 0;
-            break;
-        case 16:
-            * size_modifier = 'h';
-            break;
-        case 32:
-            * size_modifier = 'l';
-            break;
-        default:
-            return RC ( rcXF, rcFunction, rcConstructing, rcParam, rcIncorrect );
-        }
-        break;
-    default:
-        return RC ( rcXF, rcFunction, rcConstructing, rcParam, rcIncorrect );
-    }
-    return 0;
-}
-
-
-/* parse_format_string
- *  parse format string and args into structured format
- */
-static
-rc_t parse_format_string ( const char *fmt_str, ParseData *pd, VAList *vargs )
-{
-    rc_t rc;
-    uint32_t i, fmt_idx;
-
-    PrintFmt *fmt = pd -> fmt;
-
-    /* initialize returned counters */
-    pd -> lit_size = 0;
-    pd -> str_idx = pd -> fmt_idx = pd -> arg_idx = 0;
-
-    /* loop over format string */
-    for ( rc = 0, i = fmt_idx = 0; fmt_str [ i ] != 0; ++ i )
-    {
-        uint32_t domain;
-        bool alternate, numeric;
-        char size_modifier, time_modifier;
-        bool has_precision/*, has_width, has_index*/;
-
-        /* loop to gather literal portions */
-        uint32_t start;
-        for ( start = i; ; ++ i )
-        {
-            /* run until we hit start of substitution token
-               or until we hit end of format string */
-            if ( fmt_str [ i ] != 0 && fmt_str [ i ] != '%' )
-                continue;
-
-            /* detect a literal string */
-            if ( i != start )
-            {
-                /* expand into overflow */
-                if ( fmt_idx == LOCAL_FMT_COUNT )
-                {
-                    rc = create_overflow ( pd, fmt_idx );
-                    if ( rc != 0 )
-                        return rc;
-
-                    fmt = pd -> fmt;
-                }
-
-                /* create a text-literal format */
-                memset ( & fmt [ fmt_idx ], 0, sizeof fmt [ 0 ] );
-                fmt [ fmt_idx ] . u . l . text = & fmt_str [ start ];
-                fmt [ fmt_idx ] . u . l . size = i - start;
-                pd -> lit_size += i - start;
-                fmt [ fmt_idx ] . fmt = spfText;
-                fmt [ fmt_idx ] . type = sptLiteral;
-
-                /* increment counter */
-                ++ fmt_idx;
-            }
-
-            /* detect escape sequence */
-            if ( fmt_str [ i ] == 0 || fmt_str [ i + 1 ] != '%' )
-                break;
-
-            /* skip over escape */
-            start = ++ i;
-        }
-
-        /* done when NUL byte is seen */
-        if ( fmt_str [ i ] == 0 )
-            break;
-
-        /* detect overflow */
-        if ( fmt_idx == LOCAL_FMT_COUNT )
-        {
-            rc = create_overflow ( pd, fmt_idx );
-            if ( rc != 0 )
-                return rc;
-
-            fmt = pd -> fmt;
-        }
-
-        /* initial format
-         *  thousands_separate    = false
-         *  add_prefix            = false
-         *  force_decimal_point   = false
-         *  leave_trailing_zeros  = false
-         *  print_time            = false
-         *  print_date            = false
-         *  print_weekday         = false
-         *  print_timezone        = false
-         *  hour_24               = false
-         *  sign                  = 0
-         *  left_fill             = space
-         */
-        memset ( & fmt [ fmt_idx ], 0, sizeof fmt [ 0 ] );
-        fmt [ fmt_idx ] . left_fill = ' ';
-
-        /* scan flags */
-        alternate = false;
-        while ( 1 )
-        {
-            switch ( fmt_str [ ++ i ] )
-            {
-                /* plus and space modify application of sign
-                   to signed integer and floating point conversions.
-                   plus overrides space. */
-            case ' ':
-                if ( fmt [ fmt_idx ] . sign == 0 )
-            case '+':
-                    fmt [ fmt_idx ] . sign = fmt_str [ i ];
-                continue;
-
-                /* dash indicates left-alignment. indicate this
-                   by setting "left_fill" to NUL. */
-            case '-':
-                fmt [ fmt_idx ] . left_fill = 0;
-                continue;
-
-                /* zero indicates an alternate left-fill for
-                   numeric conversions. the zero is inserted before
-                   any sign character in { '+', '-' or ' ' }.
-                   since "left_fill" is also used to indicate
-                   alignment, only store when right aligning. */
-            case '0':
-                if ( fmt [ fmt_idx ] . left_fill != 0 )
-                    fmt [ fmt_idx ] . left_fill = '0';
-                continue;
-
-                /* hash indicates that the formatter should use an
-                   "alternate" approach. that approach is specific
-                   to the format. */
-            case '#':
-                alternate = true;
-                continue;
-
-                /* comma ( or apostrophe outside of US ) indicates
-                   that the integer portion of a numeral should use
-                   a comma as a thousands separator for legibility. */
-            case ',':
-            case '\'':
-                fmt [ fmt_idx ] . thousands_separate = 1;
-                continue;
-            }
-
-            /* we've hit a non-flag character */
-            break;
-        }
-
-        /* minimum field width */
-        /* has_width = false; */
-        if ( isdigit ( fmt_str [ i ] ) )
-        {
-            /* literal */
-            /*has_width = true;*/
-            fmt [ fmt_idx ] . u . f . min_field_width = fmt_str [ i ] - '0';
-            while ( isdigit ( fmt_str [ ++ i ] ) )
-            {
-                fmt [ fmt_idx ] . u . f . min_field_width *= 10;
-                fmt [ fmt_idx ] . u . f . min_field_width += fmt_str [ i ] - '0';
-            }
-        }
-        else if ( fmt_str [ i ] == '*' )
-        {
-            /* external */
-            rc = check_integer_arg ( vargs );
-            if ( rc != 0 )
-                return rc;
-
-            /*has_width = true;*/
-            fmt [ fmt_idx ] . ext_field_width = 1;
-            ++ pd -> arg_idx;
-            ++ i;
-        }
-
-        /* precision */
-        has_precision = false;
-        if ( fmt_str [ i ] == '.' )
-        {
-            /* a single dot implies a precision value of 0 */
-            has_precision = true;
-
-            if ( isdigit ( fmt_str [ ++ i ] ) )
-            {
-                /* a literal precision */
-                fmt [ fmt_idx ] . u . f . precision = fmt_str [ i ] - '0';
-                while ( isdigit ( fmt_str [ ++ i ] ) )
-                {
-                    fmt [ fmt_idx ] . u . f . precision *= 10;
-                    fmt [ fmt_idx ] . u . f . precision += fmt_str [ i ] - '0';
-                }
-            }
-            else if ( fmt_str [ i ] == '*' )
-            {
-                /* external */
-                rc = check_integer_arg ( vargs );
-                if ( rc != 0 )
-                    return rc;
-
-                fmt [ fmt_idx ] . ext_precision = 1;
-                ++ pd -> arg_idx;
-                ++ i;
-            }
-            else if ( fmt_str [ i ] == '-' )
-            {
-                /* eat a negative precision - treat as 0 */
-                while ( isdigit ( fmt_str [ ++ i ] ) )
-                    ( void ) 0;
-            }
-        }
-
-        /* index - given when parameter is a vector */
-        /*has_index = false;*/
-        if ( fmt_str [ i ] == ':' )
-        {
-            bool has_start, has_len, has_end, end_is_stop;
-            has_start = has_len = has_end = end_is_stop = false;
-
-            /* parameter is taken as a vector,
-               with a default index starting at 0 */
-            /*has_index = true;*/
-
-            if ( isdigit ( fmt_str [ ++ i ] ) )
-            {
-                /* literal index */
-                fmt [ fmt_idx ] . u . f . start_idx = fmt_str [ i ] - '0';
-                while ( isdigit ( fmt_str [ ++ i ] ) )
-                {
-                    fmt [ fmt_idx ] . u . f . start_idx *= 10;
-                    fmt [ fmt_idx ] . u . f . start_idx += fmt_str [ i ] - '0';
-                }
-                has_start = true;
-            }
-            else switch ( fmt_str [ i ] )
-            {
-            case '*':
-                /* external */
-                rc = check_integer_arg ( vargs );
-                if ( rc != 0 )
-                    return rc;
-
-                fmt [ fmt_idx ] . ext_start_index = 1;
-                ++ pd -> arg_idx;
-                ++ i;
-                has_start = true;
-                break;
-            case '$':
-                fmt [ fmt_idx ] . inf_start_index = 1;
-                fmt [ fmt_idx ] . ext_start_index = 1;
-                ++ pd -> arg_idx;
-                ++ i;
-                has_start = true;
-                break;
-            }
-
-            /* detect range */
-            switch ( fmt_str [ i ] )
-            {
-                /* given as start-stop */
-            case '-':
-                end_is_stop = true;
-
-                /* given as start/len */
-            case '/':
-
-                has_len = true;
-
-                if ( isdigit ( fmt_str [ ++ i ] ) )
-                {
-                    /* literal selection length or end */
-                    fmt [ fmt_idx ] . u . f . select_len = fmt_str [ i ] - '0';
-                    while ( isdigit ( fmt_str [ ++ i ] ) )
-                    {
-                        fmt [ fmt_idx ] . u . f . select_len *= 10;
-                        fmt [ fmt_idx ] . u . f . select_len += fmt_str [ i ] - '0';
-                    }
-                    has_end = true;
-                }
-                else switch ( fmt_str [ i ] )
-                {
-                case '*':
-                    /* external */
-                    rc = check_integer_arg ( vargs );
-                    if ( rc != 0 )
-                        return rc;
-
-                    /* external selection length or end */
-                    fmt [ fmt_idx ] . ext_stop_index = end_is_stop;
-                    fmt [ fmt_idx ] . ext_select_len = ! end_is_stop;
-                    ++ pd -> arg_idx;
-                    ++ i;
-                    has_end = true;
-                    break;
-                case '$':
-                    /* ignore index end if start is infinite */
-                    if ( ! fmt [ fmt_idx ] . inf_start_index )
-                    {
-                        fmt [ fmt_idx ] . inf_stop_index = 1;
-                        fmt [ fmt_idx ] . ext_stop_index = 1;
-                        ++ pd -> arg_idx;
-                        end_is_stop = has_end = true;
-                    }
-                    ++ i;
-                    break;
-                case '-':
-                    /* negatives are garbage */
-                    while ( isdigit ( fmt_str [ ++ i ] ) )
-                        ( void ) 0;
-                    break;
-                default:
-                    end_is_stop = false;
-                }
-                break;
-            }
-
-            if ( ! has_len && has_start )
-                fmt [ fmt_idx ] . u . f . select_len = 1;
-        }
-
-        /* size - accept for brownie-points and for KTime */
-        size_modifier = time_modifier = 0;
-        switch ( fmt_str [ i ] )
-        {
-            /* "Tiny" modifier - like "hh" in C format */
-        case 't':
-            /* "Half" modifier - same as C format */
-        case 'h':
-            /* "Long" modifier - means 64-bit for integers, otherwise like C */
-        case 'l':
-            size_modifier = time_modifier = fmt_str [ i ++ ];
-            break;
-            /* "siZe" modifier - whatever the size of size_t is */
-        case 'z':
-            ++ i;
-            time_modifier = 'z';
-            if ( sizeof ( size_t ) == sizeof ( uint64_t ) )
-                size_modifier = 'l';
-            break;
-        }
-
-        /* output format
-           describes the formatting to apply on output
-           if precision has not been set, give it a default value */
-        domain = 0;
-        numeric = false;
-        switch ( fmt_str [ i ] )
-        {
-            /* decimal signed integer */
-        case 'd':
-        case 'i':
-            fmt [ fmt_idx ] . radix = 10;
-            fmt [ fmt_idx ] . fmt = spfSignedInt;
-            numeric = true;
-            if ( ! has_precision )
-                fmt [ fmt_idx ] . u . f . precision = 1;
-            else if ( fmt [ fmt_idx ] . left_fill == '0' )
-                fmt [ fmt_idx ] . left_fill = ' ';
-            domain = vtdInt;
-            break;
-
-            /* decimal unsigned integer */
-        case 'u':
-            fmt [ fmt_idx ] . radix = 10;
-        unsigned_int:
-            fmt [ fmt_idx ] . fmt = spfUnsigned;
-            fmt [ fmt_idx ] . sign = 0;
-            numeric = true;
-            if ( ! has_precision )
-                fmt [ fmt_idx ] . u . f . precision = 1;
-            else if ( fmt [ fmt_idx ] . left_fill == '0' )
-                fmt [ fmt_idx ] . left_fill = ' ';
-            domain = vtdUint;
-            break;
-
-            /* hex unsigned integer */
-        case 'x':
-            fmt [ fmt_idx ] . add_prefix = alternate;
-            fmt [ fmt_idx ] . radix = 16;
-            goto unsigned_int;
-
-            /* upper-case hex unsigned integer */
-        case 'X':
-            fmt [ fmt_idx ] . upper_case_num = 1;
-            fmt [ fmt_idx ] . add_prefix = alternate;
-            fmt [ fmt_idx ] . radix = 16;
-            goto unsigned_int;
-
-            /* octal unsigned integer */
-        case 'o':
-            fmt [ fmt_idx ] . add_prefix = alternate;
-            fmt [ fmt_idx ] . radix = 8;
-            goto unsigned_int;
-
-            /* binary unsigned integer */
-        case 'b':
-            fmt [ fmt_idx ] . add_prefix = alternate;
-            fmt [ fmt_idx ] . radix = 2;
-            goto unsigned_int;
-
-            /* decimal signed floating point */
-        case 'f':
-            fmt [ fmt_idx ] . fmt = spfStdFloat;
-        fmt_float:
-            fmt [ fmt_idx ] . radix = 10;
-            fmt [ fmt_idx ] . force_decimal_point = alternate;
-            numeric = true;
-            if ( ! has_precision )
-                fmt [ fmt_idx ] . u . f . precision = 6;
-            domain = vtdFloat;
-            break;
-
-            /* scientific notation floating point */
-        case 'e':
-            fmt [ fmt_idx ] . fmt = spfSciFloat;
-            goto fmt_float;
-
-            /* "general" floating point */
-        case 'g':
-            fmt [ fmt_idx ] . leave_trailing_zeros = alternate;
-            fmt [ fmt_idx ] . fmt = spfGenFloat;
-            goto fmt_float;
-
-            /* character data */
-        case 's':
-            if ( ! has_precision )
-            /* no break */
-        case 'c':
-                fmt [ fmt_idx ] . u . f . precision = -1;
-            fmt [ fmt_idx ] . fmt = spfText;
-            domain = vtdUnicode;
-            break;
-
-        default:
-            return RC ( rcXF, rcString, rcFormatting, rcFormat, rcUnrecognized );
-        }
-
-        /* handle zero padding for non-numeric cases */
-        if ( ! numeric && fmt [ fmt_idx ] . left_fill == '0' )
-            fmt [ fmt_idx ] . left_fill = ' ';
-
-        /* take size from actual parameter */
-        rc = extract_size_modifier ( vargs, & size_modifier );
-        if ( rc != 0 )
-            return rc;
-
-        /* determine type from argument */
-        switch ( vargs -> dp -> argv [ vargs -> idx ] . desc . domain )
-        {
-        case vtdBool:
-        case vtdUint:
-            switch ( domain )
-            {
-            case vtdBool:
-            case vtdUint:
-            case vtdInt:
-                break;
-            case vtdFloat:
-                fmt [ fmt_idx ] . type_cast = 1;
-                break;
-            default:
-                return RC ( rcXF, rcString, rcFormatting, rcParam, rcIncorrect );
-            }
-
-            switch ( size_modifier )
-            {
-            case 't':
-                fmt [ fmt_idx ] . type = sptUnsignedInt8Vect;
-                break;
-            case 'h':
-                fmt [ fmt_idx ] . type = sptUnsignedInt16Vect;
-                break;
-            case 0:
-                fmt [ fmt_idx ] . type = sptUnsignedInt32Vect;
-                break;
-            case 'l':
-                fmt [ fmt_idx ] . type = sptUnsignedInt64Vect;
-                break;
-            }
-            break;
-
-        case vtdInt:
-            switch ( domain )
-            {
-            case vtdBool:
-            case vtdUint:
-            case vtdInt:
-                break;
-            case vtdFloat:
-                fmt [ fmt_idx ] . type_cast = 1;
-                break;
-            default:
-                return RC ( rcXF, rcString, rcFormatting, rcParam, rcIncorrect );
-            }
-
-            switch ( size_modifier )
-            {
-            case 't':
-                fmt [ fmt_idx ] . type = sptSignedInt8Vect;
-                break;
-            case 'h':
-                fmt [ fmt_idx ] . type = sptSignedInt16Vect;
-                break;
-            case 0:
-                fmt [ fmt_idx ] . type = sptSignedInt32Vect;
-                break;
-            case 'l':
-                fmt [ fmt_idx ] . type = sptSignedInt64Vect;
-                break;
-            }
-            break;
-
-        case vtdFloat:
-            switch ( domain )
-            {
-            case vtdBool:
-            case vtdUint:
-            case vtdInt:
-                fmt [ fmt_idx ] . type_cast = 1;
-                break;
-            case vtdFloat:
-                break;
-            default:
-                return RC ( rcXF, rcString, rcFormatting, rcParam, rcIncorrect );
-            }
-
-            switch ( size_modifier )
-            {
-            case 'h':
-                fmt [ fmt_idx ] . type = sptFloat32Vect;
-                break;
-            case 0:
-                fmt [ fmt_idx ] . type = sptFloat64Vect;
-                break;
-            }
-            break;
-
-        case vtdAscii:
-            switch ( domain )
-            {
-            case vtdAscii:
-            case vtdUnicode:
-                if ( size_modifier != 0 )
-                    fmt [ fmt_idx ] . type_cast = 1;
-                break;
-            default:
-                return RC ( rcXF, rcString, rcFormatting, rcParam, rcIncorrect );
-            }
-
-            fmt [ fmt_idx ] . type = sptString;
-
-            ++ pd -> str_idx;
-            break;
-
-        case vtdUnicode:
-            switch ( domain )
-            {
-            case vtdAscii:
-            case vtdUnicode:
-                switch ( size_modifier )
-                {
-                case 0:
-                    fmt [ fmt_idx ] . type = sptString;
-                    break;
-                case 'h':
-                    fmt [ fmt_idx ] . type_cast = 1;
-                    fmt [ fmt_idx ] . type = sptUCS2String;
-                    break;
-                case 'l':
-                    fmt [ fmt_idx ] . type_cast = 1;
-                    fmt [ fmt_idx ] . type = sptUTF32String;
-                    break;
-                }
-                break;
-            default:
-                return RC ( rcXF, rcString, rcFormatting, rcParam, rcIncorrect );
-            }
-
-            ++ pd -> str_idx;
-            break;
-        }
-
-        /* account for format argument */
-        ++ fmt_idx;
-        ++ pd -> arg_idx;
-        ++ vargs -> idx;
-    }
-
-    /* record final fmt */
-    if ( rc == 0 )
-    {
-        if ( fmt_idx == LOCAL_FMT_COUNT )
-        {
-            rc = create_overflow ( pd, fmt_idx );
-            if ( rc != 0 )
-                return rc;
-
-            fmt = pd -> fmt;
-        }
-
-        memset ( & fmt [ fmt_idx ++ ], 0, sizeof fmt [ 0 ] );
-
-        /* if not all arguments were consumed, should this be an error? */
-        if ( vargs -> idx != vargs -> dp -> argc )
-        {
-            /* produce warning */
-        }
-    }
-
-    pd -> fmt_idx = fmt_idx;
-
-    return rc;
-}
-
-VTRANSFACT_IMPL ( vdb_sprintf, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rc_t rc;
-    Sprintf *obj;
-
-    /* const format string */
-    VAList vargs;
-    const char *fmt_str = cp -> argv [ 0 ] . data . ascii;
-
-    /* local formatting storage */
-    PrintFmt fmt [ LOCAL_FMT_COUNT ];
-
-    /* data block for parse */
-    ParseData pd;
-    pd . fmt_size = cp -> argv [ 0 ] . count;
-    pd . fmt = fmt;
-
-    /* packaged va_list */
-    vargs . dp = dp;
-    vargs . idx = 0;
-
-    /* parse the format string */
-    rc = parse_format_string ( fmt_str, & pd, & vargs );
-    if ( rc == 0 )
-    {
-        /* the object size:
-           literal data bytes +
-           space for PrintFmt +
-           space for PrintArg */
-        size_t obj_extra = pd . lit_size +
-            pd . fmt_idx * sizeof ( PrintFmt ) +
-            pd . arg_idx * sizeof ( PrintArg ) +
-            pd . str_idx * sizeof ( String );
-        obj = malloc ( sizeof * obj + 1 + obj_extra );
-        if ( obj == NULL )
-            rc = RC ( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-        else
-        {
-            uint32_t i;
-
-            char *lit;
-            PrintFmt *dfmt;
-            size_t lit_size;
-
-            obj -> args = ( void* ) ( obj + 1 );
-            dfmt = ( void* ) & obj -> args [ pd . arg_idx ];
-            obj -> str = ( void* ) & dfmt [ pd . fmt_idx ];
-            lit = ( void* ) & obj -> str [ pd . str_idx ];
-            obj -> fmt = dfmt;
-
-            /* not necessary or even helpful, but doesn't cost much */
-            memset ( obj -> args, 0, pd . arg_idx * sizeof obj -> args [ 0 ] );
-            memset ( obj -> str, 0, pd . str_idx * sizeof obj -> str [ 0 ] );
-
-            /* copy format and literals */
-            for ( lit_size = 0, i = 0; i < pd . fmt_idx; ++ i )
-            {
-                /* simple copy */
-                dfmt [ i ] = pd . fmt [ i ];
-                if ( pd . fmt [ i ] . type == sptLiteral )
-                {
-                    /* copy over literal data */
-                    dfmt [ i ] . u . l . text = & lit [ lit_size ];
-                    memcpy ( & lit [ lit_size ],
-                        pd . fmt [ i ] . u . l . text,
-                        pd . fmt [ i ] . u . l . size );
-                    lit_size += pd . fmt [ i ] . u . l . size;
-                }
-            }
-
-            /* NUL-terminate the literal text - again, doesn't help but doesn't hurt */
-            lit [ lit_size ] = 0;
-        }
-    }
-
-    /* douse any overflow memory used */
-    if ( pd . fmt != fmt )
-        KDataBufferWhack ( & pd . overflow );
-
-#if _DEBUGGING
-    if ( rc == 0 )
-    {
-        rc = validate_obj ( obj, true );
-        if ( rc != 0 )
-            KDbgMsg ( "%s - self is bad on factory exit: %R\n", __func__, rc );
-    }
-#endif
-
-    if ( rc == 0 )
-    {
-        rslt -> self = obj;
-        rslt -> whack = free;
-        rslt -> u . rf = sprintf_func;
-        rslt -> variant = vftRow;
-    }
-
-    return rc;
-}
diff --git a/libs/vxf/strtonum.c b/libs/vxf/strtonum.c
deleted file mode 100644
index 322f50e..0000000
--- a/libs/vxf/strtonum.c
+++ /dev/null
@@ -1,354 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-
-
-/* strtonum
- *  convert string to number
- *
- *  "radix" [ CONST, DEFAULT 10 ]
- *   if not specified, or if given as 0, the default will be 10
- *   unless the string begins with "0x" or "0X", in which case radix will be 16
- *   octal is NOT inferred ( i.e. leading "0" does not imply octal )
- *
- *  "str" [ DATA ] - text to be converted
- */
-
-static
-rc_t CC strtoint ( void *data, const VXformInfo *info,
-    VRowResult *rslt, const char *str, size_t str_size )
-{
-    bool negate;
-    size_t i = 0;
-    uint64_t u, max_magnitude;
-    uint32_t radix;
-    rc_t rc;
-    KDataBuffer *dst;
-
-    if (str_size == 0) {
-        rslt -> elem_count = 0;
-        return 0;
-    }
-
-    /* determine radix */
-    radix = ( uint32_t ) ( ( size_t ) data );
-    if ( radix == 0 )
-    {
-        radix = 10;
-        if ( str_size > 2 && str [ 0 ] == '0' ) switch ( tolower ( str [ 1 ] ) )
-        {
-        case 'x':
-            radix = 16;
-            i = 2;
-            break;
-        case 'b':
-            radix = 2;
-            i = 2;
-            break;
-        }
-    }
-
-    /* check for negative */
-    negate = false;
-    if ( radix == 10 && i < str_size && str [ i ] == '-' )
-    {
-        negate = true;
-        ++ i;
-    }
-
-    /* convert numeral */
-    for ( u = 0; i < str_size; ++ i )
-    {
-        int32_t d = toupper ( str [ i ] ) - '0';
-        if ( d < 0 )
-            return RC ( rcXF, rcFunction, rcExecuting, rcParam, rcInvalid );
-        if ( d >= 10 )
-        {
-            d -= 'A' - '0' - 10;
-            if ( d < 10 )
-                return RC ( rcXF, rcFunction, rcExecuting, rcParam, rcInvalid );
-        }
-        if ( d > radix )
-            return RC ( rcXF, rcFunction, rcExecuting, rcParam, rcInvalid );
-        u = u * radix + d;
-    }
-
-    /* determine maximum magnitude */
-    if ( info -> fdesc . desc . intrinsic_bits == 64 )
-        max_magnitude = ( int64_t ) -1;
-    else
-        max_magnitude = ( ( ( uint64_t ) 1 ) << ( info -> fdesc . desc . intrinsic_bits ) ) - 1;
-    if ( info -> fdesc . desc . domain == vtdInt || negate )
-    {
-        max_magnitude >>= 1;
-        max_magnitude += negate;
-    }
-
-    if ( u > max_magnitude )
-        return RC ( rcXF, rcFunction, rcExecuting, rcParam, rcExcessive );
-
-    /* set output buffer size */
-    dst = rslt -> data;
-    rc = KDataBufferCast ( dst, dst, info -> fdesc . desc . intrinsic_bits, true );
-    if ( rc == 0 )
-        rc = KDataBufferResize ( dst, 1 );
-    if ( rc == 0 )
-    {
-        if ( negate )
-            u = - ( int64_t ) u;
-
-        rslt -> elem_count = 1;
-
-        switch ( info -> fdesc . desc . intrinsic_bits )
-        {
-        case 8:
-            * ( uint8_t* ) dst -> base = ( uint8_t ) u;
-            break;
-        case 16:
-            * ( uint16_t* ) dst -> base = ( uint16_t ) u;
-            break;
-        case 32:
-            * ( uint32_t* ) dst -> base = ( uint32_t ) u;
-            break;
-        case 64:
-            * ( uint64_t* ) dst -> base = u;
-            break;
-        default:
-            rc = RC ( rcXF, rcFunction, rcExecuting, rcParam, rcInvalid );
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t CC strtoflt ( void *data, const VXformInfo *info,
-    VRowResult *rslt, char *str, size_t str_size )
-{
-    /* set output buffer size */
-    rc_t rc;
-    KDataBuffer *dst = rslt -> data;
-
-    double d;
-    char *end;
-
-    str [ str_size ] = 0;
-    d = strtod ( str, & end );
-    if ( end != & str [ str_size ] )
-        return RC ( rcXF, rcFunction, rcExecuting, rcParam, rcInvalid );
-
-    rc = KDataBufferCast ( dst, dst, info -> fdesc . desc . intrinsic_bits, true );
-    if ( rc == 0 )
-        rc = KDataBufferResize ( dst, 1 );
-    if ( rc == 0 )
-    {
-        rslt -> elem_count = 1;
-
-        switch ( info -> fdesc . desc . intrinsic_bits )
-        {
-        case 32:
-            * ( float* ) dst -> base = ( float ) d;
-            break;
-        case 64:
-            * ( double* ) dst -> base = d;
-            break;
-        default:
-            rc = RC ( rcXF, rcFunction, rcExecuting, rcParam, rcInvalid );
-        }
-    }
-
-    return rc;
-}
-
-static
-rc_t CC strtoint_8 ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    const char *str = argv [ 0 ] . u . data . base;
-    str += argv [ 0 ] . u . data . first_elem;
-    return strtoint ( data, info, rslt, str, argv [ 0 ] . u . data . elem_count );
-}
-
-static
-rc_t CC strtoflt_8 ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    char buffer [ 128 ];
-    uint32_t count = argv [ 0 ] . u . data . elem_count;
-    const char *str = argv [ 0 ] . u . data . base;
-    str += argv [ 0 ] . u . data . first_elem;
-
-    if ( count >= sizeof buffer )
-        return RC ( rcXF, rcFunction, rcExecuting, rcParam, rcExcessive );
-
-    memcpy ( buffer, str, count );
-
-    return strtoflt ( data, info, rslt, buffer, count );
-}
-
-static
-rc_t CC strtoint_16 ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    char buffer [ 64 ];
-    uint32_t i, count = argv [ 0 ] . u . data . elem_count;
-    const uint16_t *str = argv [ 0 ] . u . data . base;
-    str += argv [ 0 ] . u . data . first_elem;
-
-    if ( count > sizeof buffer )
-        return RC ( rcXF, rcFunction, rcExecuting, rcParam, rcExcessive );
-
-    for ( i = 0; i < count; ++ i )
-    {
-        if ( str [ i ] > 128 )
-            return RC ( rcXF, rcFunction, rcExecuting, rcParam, rcInvalid );
-        buffer [ i ] = ( char ) str [ i ];
-    }
-
-    return strtoint ( data, info, rslt, buffer, count );
-}
-
-static
-rc_t CC strtoflt_16 ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    char buffer [ 128 ];
-    uint32_t i, count = argv [ 0 ] . u . data . elem_count;
-    const uint16_t *str = argv [ 0 ] . u . data . base;
-    str += argv [ 0 ] . u . data . first_elem;
-
-    if ( count >= sizeof buffer )
-        return RC ( rcXF, rcFunction, rcExecuting, rcParam, rcExcessive );
-
-    for ( i = 0; i < count; ++ i )
-    {
-        if ( str [ i ] > 128 )
-            return RC ( rcXF, rcFunction, rcExecuting, rcParam, rcInvalid );
-        buffer [ i ] = ( char ) str [ i ];
-    }
-
-    return strtoflt ( data, info, rslt, buffer, count );
-}
-
-static
-rc_t CC strtoint_32 ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    char buffer [ 64 ];
-    uint32_t i, count = argv [ 0 ] . u . data . elem_count;
-    const uint32_t *str = argv [ 0 ] . u . data . base;
-    str += argv [ 0 ] . u . data . first_elem;
-
-    if ( count > sizeof buffer )
-        return RC ( rcXF, rcFunction, rcExecuting, rcParam, rcExcessive );
-
-    for ( i = 0; i < count; ++ i )
-    {
-        if ( str [ i ] > 128 )
-            return RC ( rcXF, rcFunction, rcExecuting, rcParam, rcInvalid );
-        buffer [ i ] = ( char ) str [ i ];
-    }
-
-    return strtoint ( data, info, rslt, buffer, count );
-}
-
-static
-rc_t CC strtoflt_32 ( void *data, const VXformInfo *info, int64_t row_id,
-    VRowResult *rslt, uint32_t argc, const VRowData argv [] )
-{
-    char buffer [ 128 ];
-    uint32_t i, count = argv [ 0 ] . u . data . elem_count;
-    const uint32_t *str = argv [ 0 ] . u . data . base;
-    str += argv [ 0 ] . u . data . first_elem;
-
-    if ( count >= sizeof buffer )
-        return RC ( rcXF, rcFunction, rcExecuting, rcParam, rcExcessive );
-
-    for ( i = 0; i < count; ++ i )
-    {
-        if ( str [ i ] > 128 )
-            return RC ( rcXF, rcFunction, rcExecuting, rcParam, rcInvalid );
-        buffer [ i ] = ( char ) str [ i ];
-    }
-
-    return strtoflt ( data, info, rslt, buffer, count );
-}
-
-VTRANSFACT_IMPL ( vdb_strtonum, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    uint32_t radix = 0;
-
-    if ( cp -> argc == 1 )
-    {
-        radix = cp -> argv [ 0 ] . data . u32 [ 0 ];
-        if ( radix > 36 )
-            return RC ( rcXF, rcFunction, rcConstructing, rcParam, rcInvalid );
-    }
-
-    if ( info -> fdesc . desc . domain == vtdFloat ) switch ( radix )
-    {
-    case 0:
-    case 10:
-        break;
-    default:
-        return RC ( rcXF, rcFunction, rcConstructing, rcParam, rcInvalid );
-    }
-
-    if ( dp -> argv [ 0 ] . desc . intrinsic_dim != 1 )
-        return RC ( rcXF, rcFunction, rcConstructing, rcParam, rcInvalid );
-
-    switch ( dp -> argv [ 0 ] . desc . intrinsic_bits )
-    {
-    case 8:
-        rslt -> u . rf = ( info -> fdesc . desc . domain == vtdFloat ) ? strtoflt_8 : strtoint_8;
-        break;
-    case 16:
-        rslt -> u . rf = ( info -> fdesc . desc . domain == vtdFloat ) ? strtoflt_16 : strtoint_16;
-        break;
-    case 32:
-        rslt -> u . rf = ( info -> fdesc . desc . domain == vtdFloat ) ? strtoflt_32 : strtoint_32;
-        break;
-    default:
-        return RC ( rcXF, rcFunction, rcConstructing, rcParam, rcInvalid );
-    }
-
-    rslt -> self = ( void* ) ( size_t ) radix;
-    rslt -> variant = vftRow;
-
-    return 0;
-}
diff --git a/libs/vxf/subtract-row-id.c b/libs/vxf/subtract-row-id.c
deleted file mode 100644
index 16cfcd9..0000000
--- a/libs/vxf/subtract-row-id.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <arch-impl.h>
-#include <klib/data-buffer.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-static
-rc_t CC subtract_int64_t ( void *self, const VXformInfo *info,
-    int64_t row_id, VRowResult *rslt,
-    uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    uint32_t i;
-    int64_t *dst;
-    const int64_t *src = argv [ 0 ] . u . data . base;
-    uint64_t elem_count = argv [ 0 ] . u . data . elem_count;
-
-    assert ( rslt -> data -> elem_bits == 64 );
-    rc = KDataBufferResize ( rslt -> data, elem_count );
-    if ( rc != 0 )
-        return rc;
-
-    dst = rslt -> data -> base;
-    rslt -> elem_count = elem_count;
-
-    /* while this function is typically used on single-element rows,
-       we advertise taking rows of any length... */
-    for ( i = 0, src += argv [ 0 ] . u . data . first_elem; i < elem_count; ++ i )
-        dst [ i ] = src [ i ] - row_id;
-
-    return 0;
-}
-
-
-/* subtract_row_id
- *  return the difference between input and current row id
- *
- *  "in" [ DATA ]
- *
- * SYNOPSIS:
- *  predicts that the integer data in "in" will be related to
- *  the corresponding row-id, and subtracts off the latter.
- *  for serially generated ids, this will produce a constant
- *  difference that can be stored as a static column.
- */
-VTRANSFACT_IMPL ( vdb_subtract_row_id, 1, 0, 0 ) ( const void *fself, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    /* version 1.0 operates on I64 input */
-    rslt -> u . ndf = subtract_int64_t;
-    rslt -> variant = vftNonDetRow;
-    return 0;
-}
diff --git a/libs/vxf/sum.c b/libs/vxf/sum.c
deleted file mode 100644
index 4ef695a..0000000
--- a/libs/vxf/sum.c
+++ /dev/null
@@ -1,356 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <arch-impl.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-/* optional constant */
-typedef union sum_data sum_data;
-union sum_data
-{
-    int8_t i8;
-    int16_t i16;
-    int32_t i32;
-    int64_t i64;
-
-    uint8_t u8;
-    uint16_t u16;
-    uint32_t u32;
-    uint64_t u64;
-
-    float f32;
-    double f64;
-};
-
-#define FULL_SUM_NAME( T )                                               \
-    full_sum_ ## T
-#define FULL_SUM( T, k )                                                 \
-static                                                                   \
-rc_t CC FULL_SUM_NAME ( T ) ( void *data,                                   \
-    const VXformInfo *info, int64_t row_id, const VFixedRowResult *rslt, \
-    uint32_t argc, const VRowData argv [] )                              \
-{                                                                        \
-    uint32_t i, j;                                                       \
-    const sum_data *self = ( const void* ) data;                         \
-                                                                         \
-    T *dst = rslt -> base;                                               \
-    const T *a = argv [ 0 ] . u . data . base;                           \
-    const T *b = argv [ 1 ] . u . data . base;                           \
-                                                                         \
-    for ( i = 0, dst += rslt -> first_elem,                              \
-              a += argv [ 0 ] . u . data . first_elem,                   \
-              b += argv [ 1 ] . u . data . first_elem;                   \
-          i < rslt -> elem_count; ++ i )                                 \
-    {                                                                    \
-        dst [ i ] = a [ i ] + b [ i ] + self -> k;                       \
-        for ( j = 2; j < argc; ++ j )                                    \
-        {                                                                \
-            const T *c = argv [ j ] . u . data . base;                   \
-            dst [ i ] += c [ argv [ j ] . u . data . first_elem + i ];   \
-        }                                                                \
-    }                                                                    \
-                                                                         \
-    return 0;                                                            \
-}
-
-FULL_SUM ( int8_t, i8 )
-FULL_SUM ( int16_t, i16 )
-FULL_SUM ( int32_t, i32 )
-FULL_SUM ( int64_t, i64 )
-FULL_SUM ( uint8_t, u8 )
-FULL_SUM ( uint16_t, u16 )
-FULL_SUM ( uint32_t, u32 )
-FULL_SUM ( uint64_t, u64 )
-FULL_SUM ( float, f32 )
-FULL_SUM ( double, f64 )
-
-static VFixedRowFunc full_sum_func [] =
-{
-    FULL_SUM_NAME ( uint8_t ),
-    FULL_SUM_NAME ( uint16_t ),
-    FULL_SUM_NAME ( uint32_t ),
-    FULL_SUM_NAME ( uint64_t ),
-    FULL_SUM_NAME ( int8_t ),
-    FULL_SUM_NAME ( int16_t ),
-    FULL_SUM_NAME ( int32_t ),
-    FULL_SUM_NAME ( int64_t ),
-    NULL,
-    NULL,
-    FULL_SUM_NAME ( float ),
-    FULL_SUM_NAME ( double )
-};
-
-#define CONST_SUM_NAME( T )                                              \
-    const_sum_ ## T
-#define CONST_SUM( T, k )                                                \
-static                                                                   \
-rc_t CC CONST_SUM_NAME ( T ) ( void *data, const VXformInfo *info,          \
-    void *rslt, const void *src, uint64_t elem_count )                   \
-{                                                                        \
-    uint32_t i;                                                          \
-    const sum_data *self = ( const void* ) data;                         \
-                                                                         \
-    T *dst = rslt;                                                       \
-    const T *a = src;                                                    \
-                                                                         \
-    for ( i = 0; i < elem_count; ++ i )                                  \
-    {                                                                    \
-        dst [ i ] = a [ i ] + self -> k;                                 \
-    }                                                                    \
-                                                                         \
-    return 0;                                                            \
-}
-
-CONST_SUM ( int8_t, i8 )
-CONST_SUM ( int16_t, i16 )
-CONST_SUM ( int32_t, i32 )
-CONST_SUM ( int64_t, i64 )
-CONST_SUM ( uint8_t, u8 )
-CONST_SUM ( uint16_t, u16 )
-CONST_SUM ( uint32_t, u32 )
-CONST_SUM ( uint64_t, u64 )
-CONST_SUM ( float, f32 )
-CONST_SUM ( double, f64 )
-
-static VArrayFunc const_sum_func [] =
-{
-    CONST_SUM_NAME ( uint8_t ),
-    CONST_SUM_NAME ( uint16_t ),
-    CONST_SUM_NAME ( uint32_t ),
-    CONST_SUM_NAME ( uint64_t ),
-    CONST_SUM_NAME ( int8_t ),
-    CONST_SUM_NAME ( int16_t ),
-    CONST_SUM_NAME ( int32_t ),
-    CONST_SUM_NAME ( int64_t ),
-    NULL,
-    NULL,
-    CONST_SUM_NAME ( float ),
-    CONST_SUM_NAME ( double )
-};
-
-#define NO_CONST_NAME( T )                                               \
-    no_const_ ## T
-#define NO_CONST( T )                                                    \
-static                                                                   \
-rc_t CC NO_CONST_NAME ( T ) ( void *data,                                   \
-    const VXformInfo *info, int64_t row_id, const VFixedRowResult *rslt, \
-    uint32_t argc, const VRowData argv [] )                              \
-{                                                                        \
-    uint32_t i;                                                          \
-                                                                         \
-    T *dst = rslt -> base;                                               \
-    const T *a = argv [ 0 ] . u . data . base;                           \
-    const T *b = argv [ 1 ] . u . data . base;                           \
-                                                                         \
-    for ( i = 0, dst += rslt -> first_elem,                              \
-              a += argv [ 0 ] . u . data . first_elem,                   \
-              b += argv [ 1 ] . u . data . first_elem;                   \
-          i < rslt -> elem_count; ++ i )                                 \
-    {                                                                    \
-        dst [ i ] = a [ i ] + b [ i ];                                   \
-    }                                                                    \
-                                                                         \
-    return 0;                                                            \
-}
-
-NO_CONST ( int8_t )
-NO_CONST ( int16_t )
-NO_CONST ( int32_t )
-NO_CONST ( int64_t )
-NO_CONST ( uint8_t )
-NO_CONST ( uint16_t )
-NO_CONST ( uint32_t )
-NO_CONST ( uint64_t )
-NO_CONST ( float )
-NO_CONST ( double )
-
-static VFixedRowFunc no_const_func [] =
-{
-    NO_CONST_NAME ( uint8_t ),
-    NO_CONST_NAME ( uint16_t ),
-    NO_CONST_NAME ( uint32_t ),
-    NO_CONST_NAME ( uint64_t ),
-    NO_CONST_NAME ( int8_t ),
-    NO_CONST_NAME ( int16_t ),
-    NO_CONST_NAME ( int32_t ),
-    NO_CONST_NAME ( int64_t ),
-    NULL,
-    NULL,
-    NO_CONST_NAME ( float ),
-    NO_CONST_NAME ( double )
-};
-
-static
-rc_t CC no_sum ( void *data, const VXformInfo *info,
-    void *dst, const void *src, uint64_t elem_count )
-{
-    memcpy ( dst, src, (size_t)( elem_count * VTypedescSizeof ( & info -> fdesc . desc ) >> 3 ) );
-    return 0;
-}
-
-static
-void CC vxf_sum_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-/* sum
- *  return the sum of inputs
- *
- *  "T" [ TYPE ] - input and output data type
- *  must be member of numeric_set
- *
- *  "k" [ CONST, DEFAULT 0 ] - optional constant
- *  to be added
- *
- *  "a" [ DATA ] - left-most operand
- *
- * SYNOPSIS:
- *  incorporates "k" into expression for every row
- *  returns sum or sumerence of inputs for all rows
- */
-VTRANSFACT_IMPL ( vdb_sum, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    bool has_const;
-    int32_t size_idx;
-    sum_data k;
-
-    /* "T" must be member of numeric_set */
-    switch ( info -> fdesc . desc . domain )
-    {
-    case vtdUint:
-    case vtdInt:
-    case vtdFloat:
-        break;
-    default:
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-    }
-
-    /* TBD - eventually support vector sums
-       for today, check that dim of T is 1 */
-    if ( dp -> argv [ 0 ] . desc . intrinsic_dim != 1 )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-    /* the only numeric types we support are between 8 and 64 bits */
-    size_idx = uint32_lsbit ( dp -> argv [ 0 ] . desc . intrinsic_bits ) - 3;
-    if ( size_idx < 0 || size_idx > 3 || ( ( dp -> argv [ 0 ] . desc . intrinsic_bits &
-                                             ( dp -> argv [ 0 ] . desc . intrinsic_bits - 1 ) ) != 0 ) )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-
-    /* there are 5 variants:
-       1. no constant ( or is 0 ) and single input
-       2. non-zero constant and single input
-       3. no constant ( or is 0 ) and dual input
-       4. non-zero constant and dual input
-       5. more than 2 inputs */
-    has_const = false;
-    if ( cp -> argc == 0 )
-        memset ( & k, 0, sizeof k );
-    else switch ( cp -> argv [ 0 ] . desc . domain )
-    {
-    case vtdUint:
-    case vtdInt:
-        switch ( cp -> argv [ 0 ] . desc . intrinsic_bits )
-        {
-        case 8:
-            if ( ( k . u8 = cp -> argv [ 0 ] . data . u8 [ 0 ] ) != 0 )
-                has_const = true;
-            break;
-        case 16:
-            if ( ( k . u16 = cp -> argv [ 0 ] . data . u16 [ 0 ] ) != 0 )
-                has_const = true;
-            break;
-        case 32:
-            if ( ( k . u32 = cp -> argv [ 0 ] . data . u32 [ 0 ] ) != 0 )
-                has_const = true;
-            break;
-        case 64:
-            if ( ( k . u64 = cp -> argv [ 0 ] . data . u64 [ 0 ] ) != 0 )
-                has_const = true;
-            break;
-        }
-        break;
-
-    case vtdFloat:
-        switch ( cp -> argv [ 0 ] . desc . intrinsic_bits )
-        {
-        case 32:
-            if ( ( k . f32 = cp -> argv [ 0 ] . data . f32 [ 0 ] ) != 0.0 )
-                has_const = true;
-            break;
-        case 64:
-            if ( ( k . f64 = cp -> argv [ 0 ] . data . f64 [ 0 ] ) != 0.0 )
-                has_const = true;
-            break;
-        }
-        break;
-    }
-
-    if ( has_const || dp -> argc > 2 )
-    {
-        sum_data *pb = malloc ( sizeof * pb );
-        if ( pb == NULL )
-            return RC ( rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted );
-        * pb = k;
-        
-        rslt -> self = pb;
-        rslt -> whack = vxf_sum_wrapper;
-
-        if ( dp -> argc > 1 )
-        {
-            rslt -> u . pf = full_sum_func [ ( dp -> argv [ 0 ] . desc . domain - vtdUint ) * 4 + size_idx ];
-            rslt -> variant = vftFixedRow;
-        }
-        else
-        {
-            rslt -> u . af = const_sum_func [ ( dp -> argv [ 0 ] . desc . domain - vtdUint ) * 4 + size_idx ];
-            rslt -> variant = vftArray;
-        }
-    }
-    else
-    {
-        if ( dp -> argc > 1 )
-        {
-            rslt -> u . pf = no_const_func [ ( dp -> argv [ 0 ] . desc . domain - vtdUint ) * 4 + size_idx ];
-            rslt -> variant = vftFixedRow;
-        }
-        else
-        {
-            rslt -> u . af = no_sum;
-            rslt -> variant = vftArray;
-        }
-    }
-
-    return 0;
-}
diff --git a/libs/vxf/trim.c b/libs/vxf/trim.c
deleted file mode 100644
index a32678e..0000000
--- a/libs/vxf/trim.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <vdb/table.h>
-#include <vdb/vdb-priv.h>
-#include <klib/rc.h>
-#include <klib/data-buffer.h>
-#include <klib/log.h>
-#include <arch-impl.h>
-
-
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-typedef struct trim_self_struct {
-	union {
-	    int8_t i8;
-	    int16_t i16;
-	    int32_t i32;
-	    int64_t i64;
-
-	    uint8_t u8;
-	    uint16_t u16;
-	    uint32_t u32;
-	    uint64_t u64;
-
-	    float f32;
-	    double f64;
-	} el;
-	uint8_t side;
-} self_t;
-
-
-#define TRIM_NAME( T ) trim_ ## T
-
-#define FUNC_TRIM( T, K )                                               \
-static rc_t CC TRIM_NAME ( T ) ( void *data,                            \
-    const VXformInfo *info, int64_t row_id, VRowResult *rslt,           \
-    uint32_t argc, const VRowData argv [] )                             \
-{                                                                       \
-    rc_t rc = 0;                                                        \
-    const self_t *self = data;                                          \
-    uint32_t start = 0;                                                 \
-    uint32_t stop = argv[0].u.data.elem_count;                          \
-    const T *a = argv[0].u.data.base;                                   \
-    a += argv[0].u.data.first_elem;                                     \
-    if (self->side == 0) {                                              \
-        while (start != stop && a[start] == self->el.K)                 \
-            ++start;                                                    \
-    }                                                                   \
-    else {                                                              \
-        while (start != stop && a[stop - 1]  == self->el.K)             \
-            --stop;                                                     \
-    }                                                                   \
-    rslt->elem_count = stop - start;                                    \
-    if (rslt->elem_count > 0) {                                         \
-        rc = KDataBufferResize(rslt->data, rslt->elem_count);           \
-        if (rc == 0)                                                    \
-            memcpy(rslt->data->base, a + start, rslt->elem_count);      \
-    }                                                                   \
-    return rc;                                                          \
-}
-#if 1
-FUNC_TRIM ( uint8_t, u8 )
-#else
-static									 
-rc_t CC trim_uint8_t ( void *data,                                	 
-    const VXformInfo *info, int64_t row_id, VRowResult *rslt,		 
-    uint32_t argc, const VRowData argv [] )                              
-{                                                                        
-    rc_t rc = 0;
-    const self_t *self = data;						 
-    uint32_t start = 0;						
-    uint32_t stop = argv[0].u.data.elem_count;			
-    const uint8_t *a = argv[0].u.data.base;
-    
-    a += argv[0].u.data.first_elem;
-    
-    if (self->side == 0) { /*** left side trim ****/			 
-        while (start != stop && a[start] == self->el.u8)
-            ++start;
-    }
-    else {
-        while (start != stop && a[stop - 1]  == self->el.u8)
-            --stop;
-    }
-    rslt->elem_count = stop - start;
-    if (rslt->elem_count > 0) {
-        rc = KDataBufferResize(rslt->data, rslt->elem_count);
-        if (rc == 0)
-            memcpy(rslt->data->base, a + start, rslt->elem_count);
-    }
-    return rc;
-}
-#endif
-FUNC_TRIM ( int8_t, i8 )
-FUNC_TRIM ( int16_t, i16 )
-FUNC_TRIM ( int32_t, i32 )
-FUNC_TRIM ( int64_t, i64 )
-FUNC_TRIM ( uint16_t, u16 )
-FUNC_TRIM ( uint32_t, u32 )
-FUNC_TRIM ( uint64_t, u64 )
-FUNC_TRIM ( float, f32 )
-FUNC_TRIM ( double, f64 )
-
-static VRowFunc trim_func_set [] =
-{
-    TRIM_NAME ( uint8_t ),
-    TRIM_NAME ( uint16_t ),
-    TRIM_NAME ( uint32_t ),
-    TRIM_NAME ( uint64_t ),
-    TRIM_NAME ( int8_t ),
-    TRIM_NAME ( int16_t ),
-    TRIM_NAME ( int32_t ),
-    TRIM_NAME ( int64_t ),
-    NULL,
-    NULL,
-    TRIM_NAME ( float ),
-    TRIM_NAME ( double )
-};
-
-static
-void CC self_whack( void *ptr )
-{
-	free( ptr );
-}
-
-VTRANSFACT_IMPL ( vdb_trim, 1, 0, 0 ) ( const void *Self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    int32_t size_idx;
-    self_t self;
-
-    self.el.u64 = 0;
-
-    self.side=cp -> argv [ 0 ] . data . u8 [ 0 ];
-
-    /* "T" must be member of numeric_set */
-    switch ( info -> fdesc . desc . domain )
-    {
-    case vtdUint:
-    case vtdInt:
-    case vtdFloat:
-        break;
-    default:
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-    }
-
-    if ( dp -> argv [ 0 ] . desc . intrinsic_dim != 1 )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-    /* the only numeric types we support are between 8 and 64 bits */
-    size_idx = uint32_lsbit ( dp -> argv [ 0] . desc . intrinsic_bits ) - 3;
-    if ( size_idx < 0 || size_idx > 3 || ( ( dp -> argv [ 0 ] . desc . intrinsic_bits &
-                                             ( dp -> argv [ 0 ] . desc . intrinsic_bits - 1 ) ) != 0 ) )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-
-    switch ( cp -> argv [ 1 ] . desc . domain )
-    {
-    case vtdUint:
-    case vtdInt:
-        switch ( cp -> argv [ 1 ] . desc . intrinsic_bits )
-        {
-        case 8:
-	    self . el . u8 = cp -> argv [ 1 ] . data . u8 [ 0 ];
-            break;
-        case 16:
-	    self . el . u16 = cp -> argv [ 1 ] . data . u16 [ 0 ];
-            break;
-        case 32:
-	    self . el . u32 = cp -> argv [ 1 ] . data . u32 [ 0 ];
-            break;
-        case 64:
-            self . el . u64 = cp -> argv [ 1 ] . data . u64 [ 0 ];
-            break;
-	default: return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-        }
-        break;
-
-    case vtdFloat:
-        switch ( cp -> argv [ 1 ] . desc . intrinsic_bits )
-        {
-        case 32:
-            self . el . f32 = cp -> argv [ 1 ] . data . f32 [ 0 ];
-            break;
-        case 64:
-            self . el . f64 = cp -> argv [ 1 ] . data . f64 [ 0 ];
-            break;
-	default: return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-        }
-        break;
-    default: return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-    }
-    rslt -> self = malloc ( sizeof self );
-    memcpy(rslt -> self,&self,sizeof(self));
-    rslt -> whack = self_whack;
-    rslt -> u . rf = trim_func_set [ ( dp -> argv [ 0 ] . desc . domain - vtdUint ) * 4 + size_idx ];
-    rslt -> variant = vftRow;
-
-    return 0;
-}
diff --git a/libs/vxf/trunc.c b/libs/vxf/trunc.c
deleted file mode 100644
index b9a1285..0000000
--- a/libs/vxf/trunc.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-
-#include <assert.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <math.h>
-
-#define FLOAT_FUNC truncf
-#define DOUBLE_FUNC trunc
-#include "math-funcs-impl.h"
-
-/*
- function < type T >
- T vdb:trunc #1.0 ( T in );
- */
-VTRANSFACT_IMPL(vdb_trunc, 1, 0, 0) (const void *self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp ) {
-    return factory(self, info, rslt, cp, dp);
-}
diff --git a/libs/vxf/undelta.c b/libs/vxf/undelta.c
deleted file mode 100644
index 5c3187c..0000000
--- a/libs/vxf/undelta.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <arch-impl.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-
-
-#define UNDELTA_NAME( T )  undelta_ ## T
-#define UNDELTA( T )                                                       \
-static                                                                   \
-rc_t CC UNDELTA_NAME ( T ) ( void *data,                                   \
-    const VXformInfo *info,  void *rslt, const void *input,              \
-    uint64_t elem_count)                                                 \
-{                                                                        \
-    uint32_t i;                                                          \
-    T *dst       = (T*) rslt;                                            \
-    const T *src = (const T*) input;                                     \
-    if(elem_count >0) {							 \
-        dst [ 0 ] = src [ 0 ];						 \
-	for ( i = 1; i < elem_count; ++ i ) {                            \
-	    dst [ i ] = src [ i ] + dst [ i - 1 ];                       \
-	}                                                                \
-    }									 \
-    return 0;                                                            \
-}
-
-UNDELTA ( int8_t )
-UNDELTA ( int16_t )
-UNDELTA ( int32_t )
-UNDELTA ( int64_t )
-
-static VArrayFunc undelta_func [] =
-{
-    UNDELTA_NAME ( int8_t  ),
-    UNDELTA_NAME ( int16_t ),
-    UNDELTA_NAME ( int32_t ),
-    UNDELTA_NAME ( int64_t )
-};
-/* undelta
- *  return restoration from 1st derivative of inputs
- *
- *  "T" [ TYPE ] - input and output data type
- *  must be member of  signed integers
- *
- *  "a" [ DATA ] - operand
- *
- *
- * SYNOPSIS:
- *  return restoration of 1st derivative for the whole blob
- *
- * USAGE:
- *    I32 A = < I32 > undelta ( B );
- */
-VTRANSFACT_IMPL ( vdb_undelta, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    int size_idx;
-    if ( info -> fdesc . desc . domain != vtdInt)
-    {
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-    }
-
-    /* TBD - eventually support vector derivatives
-       for today, check that dim of T is 1 */
-    if ( dp -> argv [ 0 ] . desc . intrinsic_dim != 1 )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-    /* the only numeric types we support are between 8 and 64 bits */
-    size_idx = uint32_lsbit ( dp -> argv [ 0 ] . desc . intrinsic_bits ) - 3;
-    if ( size_idx < 0 || size_idx > 3 || ( ( dp -> argv [ 0 ] . desc . intrinsic_bits &
-                                             ( dp -> argv [ 0 ] . desc . intrinsic_bits - 1 ) ) != 0 ) )
-        return RC ( rcXF, rcFunction, rcConstructing, rcType, rcIncorrect );
-
-
-    rslt -> u . af = undelta_func [ size_idx ];
-    rslt -> variant = vftArray;
-
-    return 0;
-}
diff --git a/libs/vxf/unpack.c b/libs/vxf/unpack.c
deleted file mode 100644
index d15ae31..0000000
--- a/libs/vxf/unpack.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <sysalloc.h>
-#include <klib/pack.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-
-typedef struct self_t self_t;
-struct self_t
-{
-    VTypedesc sdesc;
-    VTypedesc ddesc;
-    uint32_t sbits;
-};
-
-static
-rc_t CC unpack_func( void *Self, const VXformInfo *info,
-    void *dst, const void *src, uint64_t elem_count )
-{
-    size_t usize;
-    const self_t *self = ( const void* ) Self;
-    bitsz_t ssize = elem_count * VTypedescSizeof ( & self -> sdesc );
-    size_t dsize = (elem_count * VTypedescSizeof ( & self -> ddesc ) + 7) >> 3;
-
-    return Unpack( self -> sbits, self -> ddesc.intrinsic_bits,
-        src, 0, ssize, NULL,
-        dst, dsize, &usize );
-}
-
-static
-void CC vxf_unpack_wrapper( void *ptr )
-{
-    free( ptr );
-}
-
-/* 
- */
-VTRANSFACT_IMPL ( vdb_unpack, 1, 0, 0 ) ( const void *ignore, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    self_t *self = malloc ( sizeof * self );
-    if ( self == NULL )
-        return RC ( rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted );
-
-    assert (dp->argc == 1);
-    self->sdesc = dp->argv[0].desc;
-    self->ddesc = info->fdesc.desc;
-    self->sbits = VTypedescSizeof ( & dp->argv[0].desc );
-        
-    rslt->self = self;
-    rslt->whack = vxf_unpack_wrapper;
-        
-    rslt->variant = vftArray;
-    rslt->u.af = unpack_func;
-        
-    return 0;
-}
-
-VTRANSFACT_IMPL ( NCBI_unpack, 1, 0, 0 ) ( const void *ignore, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    self_t *self = malloc ( sizeof * self );
-    if ( self == NULL )
-        return RC ( rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted );
-
-    assert ( dp -> argc == 1 );
-
-    assert ( cp -> argc == 2 );
-    assert ( cp -> argv [ 0 ] . desc . intrinsic_bits == 32 );
-    assert ( cp -> argv [ 0 ] . desc . domain == vtdUint );
-
-    self->sdesc = dp->argv[0].desc;
-    self -> ddesc . intrinsic_bits = cp -> argv [ 1 ] . data . u32 [ 0 ];
-    self -> ddesc . intrinsic_dim = 1;
-    self -> ddesc . domain = 0;
-    self -> sbits = cp -> argv [ 0 ] . data . u32 [ 0 ];
-
-    rslt->self = self;
-    rslt->whack = vxf_unpack_wrapper;
-        
-    rslt->variant = vftArray;
-    rslt->u.af = unpack_func;
-        
-    return 0;
-}
diff --git a/libs/vxf/unzip.c b/libs/vxf/unzip.c
deleted file mode 100644
index ba10ce1..0000000
--- a/libs/vxf/unzip.c
+++ /dev/null
@@ -1,234 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <vdb/vdb-priv.h>
-#include <klib/data-buffer.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <endian.h>
-#include <byteswap.h>
-#include <string.h>
-#include <zlib.h>
-#include <assert.h>
-
-static rc_t invoke_zlib(void *dst, size_t dsize, const void *src, size_t ssize, int windowBits)
-{
-    int zr;
-    rc_t rc = 0;
-
-    z_stream s;
-    memset ( & s, 0, sizeof s );
-
-    s.next_in = (void *)src;
-    s.avail_in = ssize;
-    s.next_out = dst;
-    s.avail_out = dsize;
-    
-    zr = inflateInit2(&s, windowBits);
-    switch (zr)
-    {
-        case Z_OK:
-            break;
-        case Z_MEM_ERROR:
-            return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-        default:
-            return RC(rcXF, rcFunction, rcExecuting, rcNoObj, rcUnexpected);
-    }
-    zr = inflate(&s, Z_FINISH);
-    switch (zr)
-    {
-    case Z_STREAM_END:
-        break;
-    case Z_OK:         /* progress but not complete */
-    case Z_BUF_ERROR:  /* no progress - need more output buffer */
-        rc = RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-        break;
-    case Z_NEED_DICT:
-    case Z_DATA_ERROR:
-        rc = RC(rcXF, rcFunction, rcExecuting, rcData, rcCorrupt);
-        break;
-    case Z_MEM_ERROR:
-        rc = RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-        break;
-    default:
-        rc = RC(rcXF, rcFunction, rcExecuting, rcNoObj, rcUnexpected);
-        break;
-    }
-    zr = inflateEnd(&s);
-    switch (zr)
-    {
-        case Z_OK:
-            break;
-        default:
-            if (rc == 0)
-                rc = RC(rcXF, rcFunction, rcExecuting, rcData, rcCorrupt);
-    }
-
-    return rc;
-}
-
-static
-rc_t unzip_func_v1(
-                   const VXformInfo *info,
-                   VBlobResult *dst,
-                   const VBlobData *src
-) {
-    dst->byte_order = src->byte_order;
-    return invoke_zlib(dst->data, (((size_t)dst->elem_count * dst->elem_bits + 7) >> 3),
-                       src->data, (((size_t)src->elem_count * src->elem_bits + 7) >> 3),
-                       -15);
-}
-
-static
-rc_t unzip_func_v2(
-                   const VXformInfo *info,
-                   VBlobResult *dst,
-                   const VBlobData *src,
-                   VBlobHeader *hdr
-) {
-    int64_t trailing;
-    rc_t rc = VBlobHeaderArgPopHead ( hdr, & trailing );
-    if ( rc == 0 )
-    {
-        dst -> elem_count *= dst -> elem_bits;
-        dst -> byte_order = src -> byte_order;
-        dst -> elem_bits = 1;
-
-        /* the feed to zlib MUST be byte aligned
-           so the output must be as well */
-        assert ( ( dst -> elem_count & 7 ) == 0 );
-        rc = invoke_zlib(dst->data, (((size_t)dst->elem_count) >> 3),
-                         src->data, (((size_t)src->elem_count * src->elem_bits + 7) >> 3),
-                         -15);
-
-        /* if the original, uncompressed source was NOT byte aligned,
-           back off the rounded up byte and add in the original bit count */
-        if ( rc == 0 && trailing != 0 )
-            dst -> elem_count -= 8 - trailing;
-    }
-
-    return rc;
-}
-
-static
-rc_t CC legacy_unzip_func ( void *self, const VXformInfo *info,
-    VLegacyBlobResult *rslt, const KDataBuffer *src )
-{
-    rc_t rc;
-    KDataBuffer *dst = rslt -> dst;
-    const uint32_t *in = src -> base;
-#if __BYTE_ORDER == __BIG_ENDIAN
-    uint64_t bits = bswap_32 ( in [ 0 ] );
-#else
-    uint64_t bits = in [ 0 ];
-#endif
-
-    do
-    {
-        size_t const bytes = ( size_t ) ( ( bits + 7 ) >> 3 ) + 64;
-        
-        if ( ( ( uint64_t ) bytes << 3 ) < bits )
-        {
-            rc = RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-            break;
-        }
-
-        dst -> elem_bits = 8;
-        rc = KDataBufferResize ( dst, bytes );
-        if ( rc != 0 )
-            break;
-
-        rc = invoke_zlib ( dst -> base, bytes, & in [ 1 ], (size_t)KDataBufferBytes ( src ) - 4, 15 );
-        if ( rc == 0 )
-        {
-            dst -> elem_bits = 1;
-            dst -> elem_count = bits;
-            break;
-        }
-
-        /* in hopes that this is a 32-bit overflow, try increasing bits */
-        bits += ( uint64_t ) 1U << 32;
-        if ( ( bits >> 32 ) == 16 )
-            break;
-    }
-    while ( GetRCState ( rc ) == rcInsufficient && GetRCObject ( rc ) == (enum RCObject)rcBuffer );
-
-    return rc;
-}
-
-
-static
-rc_t CC unzip_func(
-                void *Self,
-                const VXformInfo *info,
-                VBlobResult *dst,
-                const VBlobData *src,
-                VBlobHeader *hdr
-) {
-    int const version = VBlobHeaderVersion(hdr);
-    
-    switch (version) {
-    case 1:
-        return unzip_func_v1(info, dst, src);
-        break;
-    case 2:
-        return unzip_func_v2(info, dst, src, hdr);
-        break;
-    default:
-        return RC(rcXF, rcFunction, rcExecuting, rcParam, rcBadVersion);
-    }
-}
-
-/* unzip
- *  function any unzip #1.0 ( zlib_fmt in );
- */
-VTRANSFACT_IMPL ( vdb_unzip, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt->variant = vftBlob;
-    rslt->u.bf = unzip_func;
-
-    return 0;
-}
-
-/* NCBI:unzip
- *  function any NCBI:unzip #1.0 ( NCBI:zlib_encoded_t in );
- */
-VTRANSFACT_IMPL ( NCBI_unzip, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    VNoHdrBlobFunc f = legacy_unzip_func;
-    rslt->variant = vftLegacyBlob;
-    rslt->u.bf = ( VBlobFunc ) f;
-
-    return 0;
-}
diff --git a/libs/vxf/vec-sum.c b/libs/vxf/vec-sum.c
deleted file mode 100644
index 9903124..0000000
--- a/libs/vxf/vec-sum.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <vdb/extern.h>
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/data-buffer.h>
-#include <sysalloc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <math.h>
-#include <assert.h>
-
-typedef void (*math_f)(void *const dst,
-                       void const *const src, uint32_t const offset,
-                       uint32_t const vec_length, uint32_t const vec_count);
-typedef struct self_t {
-    uint32_t vec_length;
-    math_f f;
-} self_t;
-
-#define FUNC(VALTYPE) F_ ## VALTYPE
-
-#define FUNC_DEF(VALTYPE) \
-static void FUNC(VALTYPE)(void *Dst, void const *Src, uint32_t const offset, uint32_t const vec_length, uint32_t const vec_count) { \
-    VALTYPE sum; \
-    VALTYPE *const dst = (VALTYPE *)Dst; \
-    VALTYPE const *const src = &((VALTYPE const *)Src)[offset]; \
-    uint32_t i; \
-    uint32_t j; \
-    uint32_t k; \
-    \
-    for (i = k = 0; i != vec_count; ++i) { \
-        for (sum = 0, j = 0; j != vec_length; ++j, ++k) \
-            sum += src[k]; \
-        dst[i] = sum; \
-    } \
-}
-
-FUNC_DEF(float)
-FUNC_DEF(double)
-FUNC_DEF(uint8_t)
-FUNC_DEF(uint16_t)
-FUNC_DEF(uint32_t)
-FUNC_DEF(uint64_t)
-FUNC_DEF(int8_t)
-FUNC_DEF(int16_t)
-FUNC_DEF(int32_t)
-FUNC_DEF(int64_t)
-
-static
-rc_t CC vec_sum_row_func(void *const Self,
-                         VXformInfo const *info,
-                         int64_t const row_id,
-                         VRowResult *const rslt,
-                         uint32_t const argc,
-                         VRowData const argv[])
-{
-    self_t const *self = Self;
-    rc_t rc;
-    
-    assert(argc == 1);
-    
-    rslt->data->elem_bits = rslt->elem_bits;
-    rc = KDataBufferResize(rslt->data, rslt->elem_count = 1);
-    if (rc == 0) {
-        self->f(rslt->data->base,
-                argv[0].u.data.base, argv[0].u.data.first_elem,
-                argv[0].u.data.elem_count, 1);
-    }
-    return rc;
-}
-
-static
-rc_t CC vec_sum_array_func(
-                void *Self,
-                const VXformInfo *info,
-                void *dst,
-                const void *src,
-                uint64_t elem_count
-) {
-    const self_t *self = Self;
-    
-    assert(elem_count % self->vec_length == 0);
-    assert((elem_count / self->vec_length) >> 32 == 0);
-    self->f(dst, src, 0, self->vec_length, (uint32_t)(elem_count / self->vec_length));
-    return 0;
-}
-
-static
-void CC vxf_vec_sum_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-rc_t vec_sum_make(self_t **const rslt,
-                  VXfactInfo const *const info,
-                  VFunctionParams const *const dp)
-{
-    self_t *self;
-    rc_t rc = 0;
-    
-    self = malloc(sizeof(*self));
-    if (self == NULL)
-        rc = RC(rcVDB, rcFunction, rcConstructing, rcMemory, rcExhausted);
-    else {
-        self->vec_length = dp->argv[0].fd.td.dim;
-        
-        switch (info->fdesc.desc.intrinsic_bits) {
-        case 8:
-            switch (info->fdesc.desc.domain) {
-            case vtdInt:
-                self->f = FUNC(int8_t);
-                break;
-            case vtdUint:
-                self->f = FUNC(uint8_t);
-                break;
-            default:
-                rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            }
-            break;
-        case 16:
-            switch (info->fdesc.desc.domain) {
-            case vtdInt:
-                self->f = FUNC(int16_t);
-                break;
-            case vtdUint:
-                self->f = FUNC(uint16_t);
-                break;
-            default:
-                rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            }
-            break;
-        case 32:
-            switch (info->fdesc.desc.domain) {
-            case vtdInt:
-                self->f = FUNC(int32_t);
-                break;
-            case vtdUint:
-                self->f = FUNC(uint32_t);
-                break;
-            case vtdFloat:
-                self->f = FUNC(float);
-                break;
-            default:
-                rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            }
-            break;
-        case 64:
-            switch (info->fdesc.desc.domain) {
-            case vtdInt:
-                self->f = FUNC(int64_t);
-                break;
-            case vtdUint:
-                self->f = FUNC(uint64_t);
-                break;
-            case vtdFloat:
-                self->f = FUNC(double);
-                break;
-            default:
-                rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-            }
-            break;
-        default:
-            rc = RC(rcVDB, rcFunction, rcConstructing, rcParam, rcInvalid);
-        }
-        if (rc) {
-            free(self);
-            self = NULL;
-        }
-    }
-    *rslt = self;
-    return rc;
-}
-
-VTRANSFACT_IMPL(vdb_vec_sum, 1, 0, 0)(const void *Self,
-                                      const VXfactInfo *info,
-                                      VFuncDesc *rslt,
-                                      const VFactoryParams *cp,
-                                      const VFunctionParams *dp)
-{
-    self_t *self;
-    rc_t rc = vec_sum_make(&self, info, dp);
-    
-    if (rc == 0) {
-        rslt->self = self;
-        rslt->whack = vxf_vec_sum_wrapper;
-        rslt->variant = vftRow;
-        rslt->u.rf = vec_sum_row_func;
-    }
-    return rc;
-}
-
-/*
- function < type T, U32 dim >
- T vec_sum #1.0 ( T [ dim ] in )
- */
-VTRANSFACT_IMPL(vdb_fixed_vec_sum, 1, 0, 0)(const void *Self,
-                                            const VXfactInfo *info,
-                                            VFuncDesc *rslt,
-                                            const VFactoryParams *cp,
-                                            const VFunctionParams *dp)
-{
-    self_t *self;
-    rc_t rc = vec_sum_make(&self, info, dp);
-    
-    if (rc == 0) {
-        rslt->self = self;
-        rslt->whack = vxf_vec_sum_wrapper;
-        rslt->variant = vftArray;
-        rslt->u.af = vec_sum_array_func;
-    }
-    return rc;
-}
diff --git a/libs/vxf/wgs-tokenize-accession.c b/libs/vxf/wgs-tokenize-accession.c
deleted file mode 100644
index ac3a389..0000000
--- a/libs/vxf/wgs-tokenize-accession.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/data-buffer.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <os-native.h>
-#include <assert.h>
-
-enum
-{
-    NCBI_WGS_acc_token_unrecognized = 1,
-    NCBI_WGS_acc_token_prefix,
-    NCBI_WGS_acc_token_contig
-};
-
-enum
-{
-    TTextToken_id,
-    TTextToken_start,
-    TTextToken_len
-};
-
-
-static
-uint32_t ParseWgsAccession ( uint16_t *tok, const char *acc, size_t acc_len )
-{
-    /* WGS accessions have form:
-     * [NZ_]<4-letter prefix><2-digit version><6-7 digit contig>
-     */
-    size_t i;
-
-    /* scan non-digits */
-    for ( i = 0; i < acc_len; ++ i )
-    {
-        if ( isdigit ( acc [ i ] ) )
-            break;
-    }
-
-    /* require at least 4 characters... */
-    if ( i >= 4 )
-    {
-        /* require at least 8 digits */
-        if ( acc_len - i >= 8 )
-        {
-            /* 2-digit version */
-            if ( isdigit ( acc [ ++ i ] ) )
-            {
-                /* record first token as prefix */
-                tok [ 0 + TTextToken_id ] = NCBI_WGS_acc_token_prefix;
-                tok [ 0 + TTextToken_start ] = 0;
-                tok [ 0 + TTextToken_len ] = ( uint16_t ) ++ i;
-
-                /* the remainder should be contig */
-                tok [ 3 + TTextToken_id ] = NCBI_WGS_acc_token_contig;
-                tok [ 3 + TTextToken_start ] = ( uint16_t ) i;
-                tok [ 3 + TTextToken_len ] = ( uint16_t ) ( acc_len - i );
-
-                /* verify that it is numeric */
-                for ( ; i < acc_len; ++ i )
-                {
-                    if ( ! isdigit ( acc [ i ] ) )
-                        break;
-                }
-
-                /* great success */
-                if ( i == acc_len )
-                    return 2;
-            }
-        }
-    }
-
-    tok [ 0 + TTextToken_id ] = NCBI_WGS_acc_token_unrecognized;
-    tok [ 0 + TTextToken_start ] = 0;
-    tok [ 0 + TTextToken_len ] = ( uint16_t ) acc_len;
-
-    return 1;
-}
-
-static
-rc_t CC tokenize_nuc_accession ( void *obj,
-     const VXformInfo *info, int64_t row_id, VRowResult *rslt,
-     uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    const char *acc;
-    
-    assert ( rslt -> elem_bits == 16 * 3 );
-
-    rslt -> data -> elem_bits = rslt -> elem_bits;
-    rc = KDataBufferResize ( rslt -> data, 2 );
-    if ( rc != 0 )
-        return rc;
-
-    acc = argv [ 0 ] . u . data . base;
-    acc += argv [ 0 ] . u . data . first_elem;
-
-    rslt -> elem_count = ParseWgsAccession ( rslt -> data -> base, acc, argv [ 0 ] . u . data . elem_count );
-    if ( rslt -> elem_count != 2 )
-        rc = KDataBufferResize ( rslt -> data, rslt -> elem_count );
-
-    return rc;
-}
-
-static
-uint32_t ParseProtAccession ( uint16_t *tok, const char *acc, size_t acc_len )
-{
-    /* Protein accessions generally have pattern 
-     * <Cap-letter prefix><digital suffix>
-     * If this doesn't hold, use full accession as prefix, and make suffix empty.
-     */
-    size_t i;
-
-    for ( i = 0; i < acc_len; ++ i )
-    {
-        if ( isdigit ( acc [ i ] ) )
-            break;
-    }
-
-    tok [ 0 + TTextToken_id ] = NCBI_WGS_acc_token_prefix;
-    tok [ 0 + TTextToken_start ] = 0;
-    tok [ 0 + TTextToken_len ] = ( uint16_t ) i;
-
-    for ( ; i < acc_len; ++ i )
-    {
-        if ( ! isdigit ( acc [ i ] ) )
-            break;
-    }
-
-    if ( i == acc_len )
-    {
-        tok [ 3 + TTextToken_id ] = NCBI_WGS_acc_token_contig;
-        tok [ 3 + TTextToken_start ] = tok [ 0 + TTextToken_len ];
-        tok [ 3 + TTextToken_len ] = ( uint16_t ) ( i - tok [ 0 + TTextToken_len ] );
-        return 2;
-    }
-
-    tok [ 0 + TTextToken_len ] = ( uint16_t ) acc_len;
-    return 1;
-}
-
-static
-rc_t CC tokenize_prot_accession ( void *obj,
-     const VXformInfo *info, int64_t row_id, VRowResult *rslt,
-     uint32_t argc, const VRowData argv [] )
-{
-    rc_t rc;
-    const char *acc;
-    
-    assert ( rslt -> elem_bits == 16 * 3 );
-
-    rslt -> data -> elem_bits = rslt -> elem_bits;
-    rc = KDataBufferResize ( rslt -> data, 2 );
-    if ( rc != 0 )
-        return rc;
-
-    acc = argv [ 0 ] . u . data . base;
-    acc += argv [ 0 ] . u . data . first_elem;
-
-    rslt -> elem_count = ParseProtAccession ( rslt -> data -> base, acc, argv [ 0 ] . u . data . elem_count );
-    if ( rslt -> elem_count != 2 )
-        rc = KDataBufferResize ( rslt -> data, rslt -> elem_count );
-
-    return rc;
-}
-
-VTRANSFACT_IMPL ( NCBI_WGS_tokenize_nuc_accession, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt -> u . rf = tokenize_nuc_accession;
-    rslt -> variant = vftRow;
-    return 0;
-}
-
-VTRANSFACT_IMPL ( NCBI_WGS_tokenize_prot_accession, 1, 0, 0 ) ( const void *self, const VXfactInfo *info,
-    VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    rslt -> u . rf = tokenize_prot_accession;
-    rslt -> variant = vftRow;
-    return 0;
-}
diff --git a/libs/vxf/zip.c b/libs/vxf/zip.c
deleted file mode 100644
index d79c81d..0000000
--- a/libs/vxf/zip.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/extern.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <vdb/xform.h>
-#include <vdb/schema.h>
-#include <klib/data-buffer.h>
-#include <sysalloc.h>
-
-#include <string.h>
-#include <zlib.h>
-#include <stdint.h>
-#include <stdlib.h>
-
-#ifndef Z_MIN_LEVEL
-#define Z_MIN_LEVEL Z_DEFAULT_COMPRESSION
-#endif
-
-#ifndef Z_MAX_LEVEL
-#define Z_MAX_LEVEL Z_BEST_COMPRESSION
-#endif
-
-#ifndef Z_MIN_STRATEGY
-#define Z_MIN_STRATEGY Z_DEFAULT_STRATEGY
-#endif
-
-#ifndef Z_MAX_STRATEGY
-#define Z_MAX_STRATEGY Z_RLE
-#endif
-
-#include <stdio.h>
-#include <assert.h>
-
-#define BUFFER_GROWTH_RATE (64 * 1024)
-
-struct self_t {
-    int32_t strategy;
-    int32_t level;
-};
-
-#if _DEBUGGING
-/*
-static void debug_print_z_stream(const z_stream *s) {
-    printf("avail_in: %lu, avail_out: %lu, total_in: %lu, total_out: %lu\n",
-           (unsigned long)s->avail_in,
-           (unsigned long)s->avail_out,
-           (unsigned long)s->total_in,
-           (unsigned long)s->total_out);
-}
-*/
-#endif
-
-static rc_t invoke_zlib(void *dst, uint32_t *dsize, const void *src, uint32_t ssize, int32_t strategy, int32_t level) {
-    z_stream s;
-    int zr;
-    rc_t rc = 0;
-    
-    memset(&s, 0, sizeof(s));
-    s.next_in = (void *)src;
-    s.avail_in = ssize;
-    s.next_out = dst;
-    s.avail_out = *dsize;
-    
-    *dsize = 0;
-    zr = deflateInit2(&s, level, Z_DEFLATED, -15, 9, strategy);
-    switch (zr) {
-    case 0:
-        break;
-    case Z_MEM_ERROR:
-        return RC(rcXF, rcFunction, rcExecuting, rcMemory, rcExhausted);
-    case Z_STREAM_ERROR:
-        return RC(rcXF, rcFunction, rcExecuting, rcParam, rcInvalid);
-    default:
-#if _DEBUGGING
-        fprintf(stderr, "deflateInit2: unexpected zlib error %i: %s (strategy: %i, level: %i)\n", zr, s.msg, strategy, level);
-#endif
-        return RC(rcXF, rcFunction, rcExecuting, rcSelf, rcUnexpected);
-    }
-    zr = deflate(&s, Z_FINISH);
-    switch (zr) {
-    case Z_STREAM_END:
-        break;
-    case Z_OK:
-        s.total_out = 0;
-        break;
-    default:
-#if _DEBUGGING
-        fprintf(stderr, "deflate: unexpected zlib error %i: %s\n", zr, s.msg);
-#endif
-        rc = RC(rcXF, rcFunction, rcExecuting, rcSelf, rcUnexpected);
-        break;
-    }
-    zr = deflateEnd(&s);
-    if (zr != Z_OK && s.total_out != 0) {
-#if _DEBUGGING
-        fprintf(stderr, "deflateEnd: unexpected zlib error %i: %s\n", zr, s.msg);
-#endif
-        rc = RC(rcXF, rcFunction, rcExecuting, rcSelf, rcUnexpected);
-    }
-    if (rc == 0) {
-        assert(s.total_out <= UINT32_MAX);
-        *dsize = (uint32_t)s.total_out;
-    }
-    return rc;
-}
-
-static
-rc_t CC zip_func(
-              void *Self,
-              const VXformInfo *info,
-              VBlobResult *dst,
-              const VBlobData *src,
-              VBlobHeader *hdr
-) {
-    rc_t rc;
-    struct self_t *self = Self;
-
-    /* input bits */
-    uint64_t sbits = ( uint64_t) src -> elem_count * src -> elem_bits;
-
-    /* input bytes */
-    uint32_t ssize = ( uint32_t ) ( ( sbits + 7 ) >> 3 );
-
-    /* required output size */
-    uint32_t dsize = ( uint32_t ) ( ( ( size_t ) dst -> elem_count * dst->elem_bits + 7 ) >> 3 );
-
-    if ( ( sbits & 7 ) == 0 )
-        /* version 1 is byte-aligned */
-        VBlobHeaderSetVersion ( hdr, 1 );
-    else
-    {
-        VBlobHeaderSetVersion ( hdr, 2 );
-        VBlobHeaderArgPushTail ( hdr, ( int64_t ) ( sbits & 7 ) );
-    }
-
-    rc = invoke_zlib ( dst -> data, & dsize, src -> data, ssize, self->strategy, self->level);
-    if (rc == 0) {
-        dst->elem_bits = 1;
-        dst->byte_order = src->byte_order;
-        if (dsize)
-            dst->elem_count = dsize << 3;
-        else
-            rc = RC(rcXF, rcFunction, rcExecuting, rcBuffer, rcInsufficient);
-    }
-    return rc;
-}
-
-static
-void CC vxf_zip_wrapper( void *ptr )
-{
-	free( ptr );
-}
-
-/* zip
- * function zlib_fmt zip #1.0 < * I32 strategy, I32 level > ( any in );
- */
-VTRANSFACT_IMPL(vdb_zip, 1, 0, 0) (const void *self, const VXfactInfo *info, VFuncDesc *rslt, const VFactoryParams *cp, const VFunctionParams *dp )
-{
-    struct self_t *ctx;
-
-    int strategy = Z_RLE;
-    int level = Z_BEST_SPEED;
-
-    if ( cp -> argc > 0 )
-    {
-        strategy = cp -> argv [ 0 ] . data . i32 [ 0 ];
-        if ( strategy < Z_MIN_STRATEGY || strategy > Z_MAX_STRATEGY )
-            return RC(rcXF, rcFunction, rcConstructing, rcParam, rcInvalid);
-        if ( cp -> argc > 1 )
-        {
-            level = cp -> argv [ 1 ] . data . i32 [ 0 ];
-            if ( level < Z_MIN_LEVEL || level > Z_MAX_LEVEL )
-                return RC(rcXF, rcFunction, rcConstructing, rcRange, rcInvalid);
-        }
-    }
-
-    ctx = malloc(sizeof(*ctx));
-    if (ctx) {
-        ctx->strategy = strategy;
-        ctx->level = level;
-       
-        rslt->self = ctx;
-        rslt->whack = vxf_zip_wrapper;
-        rslt->variant = vftBlob;
-        rslt->u.bf = zip_func;
-        
-        return 0;
-    }
-    return RC(rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted);
-}
diff --git a/libs/wgsxf/Makefile b/libs/wgsxf/Makefile
deleted file mode 100644
index 26ae176..0000000
--- a/libs/wgsxf/Makefile
+++ /dev/null
@@ -1,127 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../..)
-MODULE = libs/wgsxf
-
-INT_LIBS = \
-	libwgsxf \
-	libwwgsxf
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-OBJFILES =       \
-	$(WGSXF_OBJ) \
-	$(WWGSXF_OBJ)
-
-include $(TOP)/build/Makefile.env
-
-RWORKDIR = $(BINDIR)
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs compile
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): makedirs
-	@ $(MAKE_CMD) $(TARGDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(TARGDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# wgs-vdb transform library
-#
-$(TARGDIR)/libwgsxf: $(addprefix $(ILIBDIR)/libwgsxf.,$(ILIBEXT))
-
-WGSXF_SRC = \
-	build_scaffold \
-	build_read_type
-
-WGSXF_OBJ = \
-	$(addsuffix .$(LOBX),$(WGSXF_SRC))
-
-WGSXF_LIB = \
-	-dvdb \
-	-dklib \
-	-dm \
-	-dz \
-	-dbz2
-
-$(ILIBDIR)/libwgsxf.$(LIBX): $(WGSXF_OBJ)
-	$(LD) --slib -o $@ $^ $(WGSXF_LIB)
-
-.PHONY: $(TARGDIR)/libwgsxf
-
-#-------------------------------------------------------------------------------
-# update-side wgs transform library
-#
-
-$(TARGDIR)/libwwgsxf: $(addprefix $(ILIBDIR)/libwwgsxf.,$(ILIBEXT))
-
-WWGSXF_SRC = \
-	$(WGSXF_SRC)
-
-WWGSXF_OBJ = \
-	$(addsuffix .$(LOBX),$(WWGSXF_SRC))
-
-# temporary
-WWGSXF_LIB = \
-	-dwvdb \
-	-dwkdb \
-	-dklib \
-	-dm \
-	-dz \
-	-dbz2
-
-$(ILIBDIR)/libwwgsxf.$(LIBX): $(WWGSXF_OBJ)
-	$(LD) --slib -o $@ $^ $(WWGSXF_LIB)
-
-libwwgsxf.vers.h:
-	@ true
-
-.PHONY: $(TARGDIR)/libwwgsxf
-
-compile: stdcompile
-
-$(TARGDIR)/compile: $(OBJFILES)
diff --git a/libs/wgsxf/build_read_type.c b/libs/wgsxf/build_read_type.c
deleted file mode 100644
index 02ebed5..0000000
--- a/libs/wgsxf/build_read_type.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/schema.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <insdc/insdc.h>
-#include <insdc/sra.h>
-#include <ncbi/wgs-contig.h>
-
-static
-rc_t build_read_type(INSDC_SRA_xread_type dst[],
-                     unsigned const components,
-                     NCBI_WGS_component_props const Props[/* components */])
-{
-    unsigned i;
-    
-    for (i = 0; i != components; ++i) {
-        int const props = Props[i];
-        
-        if (props < 0) {
-            dst[i] = SRA_READ_TYPE_TECHNICAL;
-        }
-        else {
-            int const type = props & 0x0F;
-            
-            if (type == 0) {
-                int const strand = props & ~(NCBI_WGS_strand_plus | NCBI_WGS_strand_minus);
-                
-                switch (strand) {
-                case 0:
-                    dst[i] = SRA_READ_TYPE_BIOLOGICAL;
-                    break;
-                case NCBI_WGS_strand_plus:
-                    dst[i] = SRA_READ_TYPE_BIOLOGICAL | SRA_READ_TYPE_FORWARD;
-                    break;
-                case NCBI_WGS_strand_minus:
-                    dst[i] = SRA_READ_TYPE_BIOLOGICAL | SRA_READ_TYPE_REVERSE;
-                    break;
-                default:
-                    return RC(rcXF, rcFunction, rcExecuting, rcType, rcInvalid);
-                }
-            }
-            else
-                return RC(rcXF, rcFunction, rcExecuting, rcType, rcInvalid);
-        }
-    }
-    return 0;
-}
-
-/*
- * function INSDC:SRA:xread_type NCBI:WGS:build_read_type #1
- *     ( NCBI:WGS:component_props component_props )
- */
-
-static
-rc_t CC build_read_type_impl(void *self, VXformInfo const *info, int64_t row_id,
-                             VFixedRowResult const *rslt,
-                             uint32_t argc, VRowData const argv[])
-{
-    NCBI_WGS_component_props const *const props = argv[0].u.data.base;
-    unsigned const components = argv[0].u.data.elem_count;
-    INSDC_SRA_xread_type *const dst = rslt->base;
-
-    return build_read_type(&dst[rslt->first_elem], components,
-                           &props[argv[0].u.data.first_elem]);
-}
-
-VTRANSFACT_IMPL(NCBI_WGS_build_read_type, 1, 0, 0)(void const *const Self,
-                                                   VXfactInfo const *const info,
-                                                   VFuncDesc *const rslt,
-                                                   VFactoryParams const *const cp,
-                                                   VFunctionParams const *const dp)
-{
-    rslt->variant = vftFixedRow;
-    rslt->u.pf = build_read_type_impl;
-    return 0;
-}
diff --git a/libs/wgsxf/build_scaffold.c b/libs/wgsxf/build_scaffold.c
deleted file mode 100644
index 5295617..0000000
--- a/libs/wgsxf/build_scaffold.c
+++ /dev/null
@@ -1,435 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <vdb/extern.h>
-#include <vdb/xform.h>
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/schema.h>
-
-#include <klib/defs.h>
-#include <klib/rc.h>
-#include <kdb/meta.h>
-#include <klib/data-buffer.h>
-#include <insdc/insdc.h>
-#include <align/refseq-mgr.h>
-#include <bitstr.h>
-#include <sysalloc.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <insdc/sra.h>
-#include <ncbi/wgs-contig.h>
-
-#define READ_GAP_VALUE (0)
-#define QUAL_GAP_VALUE (2)
-
-#define CURSOR_CACHE_SIZE (4 * 1024 * 1024)
-
-typedef struct self_t self_t;
-typedef rc_t (*impl_f)(self_t const *const self, void *const Dst,
-                       unsigned const components,
-                       INSDC_coord_one const start[/* components */],
-                       INSDC_coord_len const length[/* components */],
-                       NCBI_WGS_component_props const props[/* components */],
-                       int64_t const join[/* components */]);
-
-struct self_t
-{
-    VCursor const *curs;
-    uint32_t col_idx;
-    impl_f impl;
-};
-
-static void free_self(self_t *const self)
-{
-    VCursorRelease(self->curs);
-}
-
-static
-void CC whack(void *vp)
-{
-    if (vp) {
-        free_self(vp);
-        free(vp);
-    }
-}
-
-
-static bool does_table_have_column( VTable const * tbl, char const column[] )
-{
-    KNamelist * column_names;
-    bool res = false;
-    rc_t rc = VTableListReadableColumns ( tbl, &column_names );
-    if ( rc == 0 )
-    {
-        uint32_t count;
-        rc = KNamelistCount ( column_names, &count );
-        if ( rc == 0 && count > 0 )
-        {
-            uint32_t idx;
-            size_t col_name_size;
-            const char * col_name = string_chr ( column, string_size( column ), ')' );
-            if ( col_name == NULL )
-                col_name = column;
-            else
-                col_name++;
-            col_name_size = string_size( col_name );
-            for ( idx = 0; idx < count && rc == 0 && !res; ++idx )
-            {
-                const char * name;
-                rc = KNamelistGet ( column_names, idx, &name );
-                if ( rc == 0 && name != NULL )
-                {
-                    int cmp = string_cmp( col_name, col_name_size,
-                                          name, string_size( name ), 0xFFFF );
-                    if ( cmp == 0 )
-                        res = true;
-                }
-            }
-        }
-        KNamelistRelease ( column_names );
-    }
-    return res;
-}
-
-
-static
-rc_t init_self( self_t *self, VTable const * const srctbl, char const column[] )
-{
-    VDatabase const * db;
-    rc_t rc = VTableOpenParentRead( srctbl, &db );
-    if ( rc == 0 )
-    {
-        VTable const * tbl;
-        rc = VDatabaseOpenTableRead( db, &tbl, "SEQUENCE" );
-        VDatabaseRelease( db );
-        if ( rc == 0 )
-        {
-            bool has_column = does_table_have_column( tbl, column );
-            if ( !has_column )
-                VTableRelease( tbl );
-            else
-            {
-                VCursor const * curs;
-#if CURSOR_CACHE_SIZE
-                rc = VTableCreateCachedCursorRead( tbl, &curs, CURSOR_CACHE_SIZE );
-#else
-                rc = VTableCreateCursorRead( tbl, &curs );
-#endif
-                VTableRelease( tbl );
-                if ( rc == 0 )
-                {
-                    uint32_t col_idx;
-                    rc = VCursorAddColumn( curs, &col_idx, "%s", column );
-                    if ( rc == 0 )
-                    {
-                        rc = VCursorOpen( curs );
-                        if ( rc == 0 )
-                        {
-                            self->curs = curs;
-                            self->col_idx = col_idx;
-                            return 0;
-                        }
-                        if ( GetRCObject( rc ) == (enum RCObject)rcColumn && GetRCState( rc ) == rcUndefined )
-                            rc = 0;
-                    }
-                    VCursorRelease( curs );
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-static
-rc_t build_scaffold_read_impl(self_t const *const self, void *const Dst,
-                              unsigned const components,
-                              INSDC_coord_one const Start[/* components */],
-                              INSDC_coord_len const Length[/* components */],
-                              NCBI_WGS_component_props const Props[/* components */],
-                              int64_t const join[/* components */])
-{
-    INSDC_4na_bin *const dst = Dst;
-    unsigned i;
-    unsigned j;
-    unsigned id;
-    rc_t rc;
-    
-    for (rc = 0, id = j = i = 0; rc == 0 && i != components; ++i) {
-        INSDC_coord_len const length = Length[i];
-        int const props = Props[i];
-
-        if (props < 0) {
-            /* gap */
-            memset(dst + j, READ_GAP_VALUE, length);
-        }
-        else if (self->curs == NULL) {
-            memset(dst + j, 15, length);
-        }
-        else {
-            int const type = props & 0x0F;
-            int const strand = (props & ~(NCBI_WGS_strand_plus | NCBI_WGS_strand_minus)) >> 4;
-            
-            if (type != 0 || strand == 3)
-                rc = RC(rcXF, rcFunction, rcExecuting, rcType, rcInvalid);
-            else {
-                int64_t const row = join[id++];
-                uint32_t elem_bits;
-                uint32_t bit_offset;
-                uint32_t elem_count;
-                void const *base;
-                
-                rc = VCursorCellDataDirect(self->curs, row, self->col_idx,
-                                           &elem_bits, &base, &bit_offset,
-                                           &elem_count);
-                assert(bit_offset == 0);
-                if (rc == 0) {
-                    INSDC_coord_one const start = Start[i] - 1;
-                    
-                    if (elem_count < start + length)
-                        rc = RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-                    else {
-                        INSDC_4na_bin const *const src = base;
-                        
-                        if (strand == 2) {
-                            static INSDC_4na_bin const complement[] = {
-                                /* 0  0000 - 0000*/  0,
-                                /* 1  0001 - 1000*/  8,
-                                /* 2  0010 - 0100*/  4,
-                                /* 3  0011 - 1100*/ 12,
-                                /* 4  0100 - 0010*/  2,
-                                /* 5  0101 - 1010*/ 10,
-                                /* 6  0110 - 0110*/  6,
-                                /* 7  0111 - 1110*/ 14,
-                                /* 8  1000 - 0001*/  1,
-                                /* 9  1001 - 1001*/  9,
-                                /*10  1010 - 0101*/  5,
-                                /*11  1011 - 1101*/ 13,
-                                /*12  1100 - 0011*/  3,
-                                /*13  1101 - 1011*/ 11,
-                                /*14  1110 - 0111*/  7,
-                                /*15  1111 - 1111*/ 15
-                            };
-                            unsigned k;
-                            unsigned jj;
-                            
-                            for (jj = j + length, k = 0; k != length; ++k) {
-                                INSDC_4na_bin const elem = src[start + k];
-                                
-                                assert(/* 0 <= elem && */ elem <= 15);
-                                --jj;
-                                dst[jj] = complement[elem];
-                            }
-                        }
-                        else
-                            memcpy(&dst[j], &src[start], length);
-                    }
-                }
-            }
-        }
-
-        j += length;
-    }
-    return rc;
-}
-
-static
-rc_t build_scaffold_qual_impl(self_t const *const self, void *const Dst,
-                              unsigned const components,
-                              INSDC_coord_one const Start[/* components */],
-                              INSDC_coord_len const Length[/* components */],
-                              NCBI_WGS_component_props const Props[/* components */],
-                              int64_t const join[/* components */])
-{
-    INSDC_quality_phred *const dst = Dst;
-    unsigned i;
-    unsigned j;
-    unsigned id;
-    rc_t rc;
-    
-    for (rc = 0, id = j = i = 0; rc == 0 && i != components; ++i) {
-        INSDC_coord_len const length = Length[i];
-        int const props = Props[i];
-        
-        if (props < 0) {
-            /* gap */
-            memset(dst + j, QUAL_GAP_VALUE, length);
-        }
-        else if (self->curs == NULL) {
-            memset(dst + j, 30, length);
-        }
-        else {
-            int const type = props & 0x0F;
-            int const strand = (props & ~(NCBI_WGS_strand_plus | NCBI_WGS_strand_minus)) >> 4;
-            
-            if (type != 0 || strand == 3)
-                rc = RC(rcXF, rcFunction, rcExecuting, rcType, rcInvalid);
-            else {
-                int64_t const row = join[id++];
-                uint32_t elem_bits;
-                uint32_t bit_offset;
-                uint32_t elem_count;
-                void const *base;
-                
-                rc = VCursorCellDataDirect(self->curs, row, self->col_idx,
-                                           &elem_bits, &base, &bit_offset,
-                                           &elem_count);
-                assert(bit_offset == 0);
-                if (rc == 0) {
-                    INSDC_quality_phred const start = Start[i] - 1;
-                    
-                    if (elem_count < start + length)
-                        rc = RC(rcXF, rcFunction, rcExecuting, rcData, rcInsufficient);
-                    else {
-                        INSDC_quality_phred const *const src = base;
-                        
-                        if (strand == 2) {
-                            unsigned k;
-                            unsigned jj;
-                            
-                            for (jj = j + length, k = 0; k != length; ++k) {
-                                INSDC_quality_phred const elem = src[start + k];
-                                
-                                --jj;
-                                dst[jj] = elem;
-                            }
-                        }
-                        else
-                            memcpy(&dst[j], &src[start], length);
-                    }
-                }
-            }
-        }
-        
-        j += length;
-    }
-    return rc;
-}
-
-static
-unsigned total_length(unsigned const components, INSDC_coord_len const length[/* components */])
-{
-    unsigned i;
-    unsigned len;
-    
-    for (i = len = 0; i != components; ++i)
-        len += length[i];
-    return len;
-}
-
-
-/*
- * function INSDC:4na:bin NCBI:WGS:build_scaffold_read #1
- *     ( INSDC:coord:one component_start, INSDC:coord:len component_len,
- *       NCBI:WGS:component_props component_props, I64 component_id )
- *
- * function INSDC:quality:phred NCBI:WGS:build_scaffold_qual #1
- *     ( INSDC:coord:one component_start, INSDC:coord:len component_len,
- *       NCBI:WGS:component_props component_props, I64 component_id )
- */
-
-static
-rc_t CC build_scaffold_impl(void *const data, VXformInfo const *const info,
-                            int64_t const row_id, VRowResult *const rslt,
-                            uint32_t const argc, VRowData const argv[])
-{
-    self_t const *const self = data;
-    INSDC_coord_one const *const start = argv[0].u.data.base;
-    INSDC_coord_len const *const length = argv[1].u.data.base;
-    NCBI_WGS_component_props const *const props = argv[2].u.data.base;
-    int64_t const *const join = argv[3].u.data.base;
-    unsigned const components = argv[0].u.data.elem_count;
-    rc_t rc;
-    
-    assert(argv[1].u.data.elem_count == components);
-    assert(argv[2].u.data.elem_count == components);
-    
-    assert(start != NULL);
-    assert(length != NULL);
-    assert(props != NULL);
-    assert(join != NULL);
-    
-    assert(rslt->elem_bits == 8);
-    rslt->elem_count = total_length(components, &length[argv[1].u.data.first_elem]);
-    rc = KDataBufferResize(rslt->data, rslt->elem_count);
-    if (rc == 0)
-        rc = self->impl(self, rslt->data->base, components,
-                        &start[argv[0].u.data.first_elem],
-                        &length[argv[1].u.data.first_elem],
-                        &props[argv[2].u.data.first_elem],
-                        &join[argv[3].u.data.first_elem]);
-    return rc;
-}
-
-VTRANSFACT_IMPL(NCBI_WGS_build_scaffold_read, 1, 0, 0)(void const * Self,
-                                                       VXfactInfo const * info,
-                                                       VFuncDesc * rslt,
-                                                       VFactoryParams const * cp,
-                                                       VFunctionParams const * dp)
-{
-    self_t *self = calloc(1, sizeof(*self));
-    if (self) {
-        rc_t const rc = init_self(self, info->tbl, "(INSDC:4na:bin)READ");
-        
-        if (rc == 0) {
-            self->impl = build_scaffold_read_impl;
-            
-            rslt->self = self;
-            rslt->whack = whack;
-            rslt->variant = vftRow;
-            rslt->u.rf = build_scaffold_impl;
-        }
-        return rc;
-    }
-    return RC(rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted);
-}
-
-VTRANSFACT_IMPL(NCBI_WGS_build_scaffold_qual, 1, 0, 0)(void const * Self,
-                                                       VXfactInfo const * info,
-                                                       VFuncDesc * rslt,
-                                                       VFactoryParams const * cp,
-                                                       VFunctionParams const * dp)
-{
-    self_t *self = calloc(1, sizeof(*self));
-    if (self) {
-        rc_t const rc = init_self(self, info->tbl, "(INSDC:quality:phred)QUALITY");
-    
-        if (rc == 0) {
-            self->impl = build_scaffold_qual_impl;
-            
-            rslt->self = self;
-            rslt->whack = whack;
-            rslt->variant = vftRow;
-            rslt->u.rf = build_scaffold_impl;
-        }
-        return rc;
-    }
-    return RC(rcXF, rcFunction, rcConstructing, rcMemory, rcExhausted);
-}
diff --git a/libs/xfs/Makefile b/libs/xfs/Makefile
deleted file mode 100644
index d9afc08..0000000
--- a/libs/xfs/Makefile
+++ /dev/null
@@ -1,140 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: all
-
-TOP ?= $(abspath ../..)
-
-MODULE = libs/xfs
-
-include $(TOP)/build/Makefile.env
-RWORKDIR=$(TOP)/$(MODULE)
-
-ifeq (mac,$(OS))
-TOP = $(shell cd ../.. && pwd )
-endif
-
-
-INT_LIBS = \
-	libxfs
-
-ALL_LIBS = \
-	$(INT_LIBS)
-
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: vers-includes
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(INT_LIBS): vers-includes
-	@ $(MAKE_CMD) $(ILIBDIR)/$@
-
-.PHONY: all std $(ALL_LIBS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# vers-includes
-#
-$(TARGDIR)/vers-includes: $(addsuffix .vers.h,$(EXT_LIBS))
-
-.PHONY: $(TARGDIR)/vers-includes
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-ifeq (mac,$(OS))
-INCDIRS += -I/usr/local/include/osxfuse/fuse
-endif
-
-#-------------------------------------------------------------------------------
-# xfs
-#
-$(ILIBDIR)/libxfs: $(addprefix $(ILIBDIR)/libxfs.,$(ILIBEXT))
-
-XFS_SRC = \
-    xfs \
-    xlog    \
-    platform \
-    operations  \
-    security    \
-    model    \
-    tree    \
-    node    \
-    path    \
-    perm    \
-    editors \
-    handle  \
-    teleport    \
-    foo \
-    ncon  \
-    contnode    \
-    docnode \
-    simcon  \
-    kfs   \
-    readme  \
-    bogus     \
-    owp \
-    doc \
-    xhttp    \
-    http    \
-    xtar     \
-    tar     \
-    xencro     \
-    encro     \
-    xencws     \
-    encws     \
-    spen    \
-    xgap    \
-    xgapf    \
-    xgapk   \
-    gapk    \
-    gapks   \
-    gapka   \
-    gapc   \
-    gap     \
-    gapf    \
-    lockdpt \
-    lreader \
-    schwarzschraube \
-    zehr    \
-    mehr
-
-XFS_OBJ = \
-	$(addsuffix .$(LOBX),$(XFS_SRC))
-
-$(ILIBDIR)/libxfs.$(LIBX): $(XFS_OBJ)
-	$(LD) --slib -o $@ $^ $(XFS_LIB)
diff --git a/libs/xfs/bogus.c b/libs/xfs/bogus.c
deleted file mode 100644
index e2d7c0f..0000000
--- a/libs/xfs/bogus.c
+++ /dev/null
@@ -1,373 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/editors.h>
-
-#include "mehr.h"
-#include "zehr.h"
-#include "ncon.h"
-#include "teleport.h"
-#include "common.h"
-
-#include <sysalloc.h>
-
-/*)))
- |||
- +++    BogusNode: apparently there are two types of node : NotFound
- +++    and BadPath node. Needed to comply for all other methods
- +++    It is purely not Teleport node :P
- |||
-(((*/
-
-struct XFSBogusNode {
-    struct XFSNode Node;
-
-    bool NotFoundType;
-};
-
-/*)))
- |||
- +++    BogusNode virtual table is Living here :lol:
- |||
-(((*/
-static rc_t CC _BogusNodeFlavor_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _BogusNodeDispose_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _BogusNodeFindNode_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSPath * Path,
-                                uint32_t PathIndex,
-                                const struct XFSNode ** Node
-                                );
-static rc_t CC _BogusNodeAttr_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSAttrEditor ** Attr
-                                );
-static rc_t CC _BogusNodeDescribe_v1 (
-                                const struct XFSNode * self,
-                                char * Buffer,
-                                size_t BufferSize
-                                );
-
-static const struct XFSNode_vt_v1 _sBogusNodeVT_v1 = {
-                                        1, 1,   /* nin naj */
-                                        _BogusNodeFlavor_v1,
-                                        _BogusNodeDispose_v1,
-                                        _BogusNodeFindNode_v1,
-                                        NULL,
-                                        NULL,
-                                        _BogusNodeAttr_v1,
-                                        _BogusNodeDescribe_v1
-                                        };
-
-static rc_t CC _BogusNodeDispose ( const struct XFSBogusNode * self );
-
-uint32_t CC
-_BogusNodeFlavor_v1 ( const struct XFSNode * self )
-{
-    return _sFlavorOfBogus;
-}   /* _BogusNodeFlavor_v1 () */
-
-rc_t CC
-_BogusNodeDispose_v1 ( const struct XFSNode * self )
-{
-    return _BogusNodeDispose ( ( const struct XFSBogusNode * ) self );
-}   /* _BogusNodeDispose_v1 () */
-
-rc_t CC
-_BogusNodeFindNode_v1 (
-            const struct XFSNode * self,
-            const struct XFSPath * Path,
-            uint32_t PathIndex,
-            const struct XFSNode ** Node
-)
-{
-    return XFS_RC ( rcInvalid );
-}   /* _BogusNodeFindNode () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))   Attrs
- (((*/
-static
-rc_t CC
-_BogusNodeAttr_dispose_v1 ( const struct XFSEditor * self )
-{
-    struct XFSAttrEditor * Editor;
-
-    Editor = ( struct XFSAttrEditor * ) self;
-
-/*
-pLogMsg ( klogDebug, " _BogusNodeAttr_dispose_ ( $(editor) )", "editor=0x%p", ( void * ) Editor );
-*/
-
-    if ( Editor == 0 ) {
-        return 0;
-    }
-
-    if ( ( Editor -> Papahen ) . Node != NULL ) {
-        XFSNodeRelease ( ( Editor -> Papahen ) . Node );
-
-        ( Editor -> Papahen ) . Node = NULL;
-    }
-
-    free ( Editor );
-
-    return 0;
-}   /* _BogusNodeAttr_dispose_v1 () */
-
-static
-rc_t CC
-_BogusNodeAttr_type_v1 (
-            const struct XFSAttrEditor * self,
-            XFSNType * Type
-)
-{
-    struct XFSBogusNode * Bogus = NULL;
-
-    if ( self == NULL || Type == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Type = kxfsNotFound;
-
-    if ( ( self -> Papahen ) . Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Bogus = ( struct XFSBogusNode * ) ( self -> Papahen ) . Node;
-    * Type = ( Bogus -> NotFoundType == true )
-                                            ? kxfsNotFound
-                                            : kxfsBadPath
-                                            ;
-
-    return 0;
-}   /* _BogusNodeAttr_type_v1 () */
-
-static
-rc_t CC
-_BogusNodeAttr_v1 (
-            const struct XFSNode * self,
-            const struct XFSAttrEditor ** Attr
-)
-{
-    rc_t RCt;
-    struct XFSAttrEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-
-    if ( self == NULL || Attr == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Attr = NULL;
-
-    Editor = calloc ( 1, sizeof ( struct XFSAttrEditor ) );
-    if ( Editor == NULL ) {
-        XFSNodeRelease ( self );
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                        & ( Editor -> Papahen ),
-                        self,
-                        _BogusNodeAttr_dispose_v1
-                        );
-
-    if ( RCt == 0 ) {
-        Editor -> type = _BogusNodeAttr_type_v1;
-
-        * Attr = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-/*
-pLogMsg ( klogDebug, " _BogusNodeAttr_ ( $(editor) )", "editor=0x%p", ( void * ) Editor );
-*/
-
-    return RCt;
-}   /* _BogusNodeAttr_v1 () */
-
-rc_t CC
-_BogusNodeDescribe_v1 (
-                const struct XFSNode * self,
-                char * Buffer,
-                size_t BufferSize
-)
-{
-    rc_t RCt;
-    size_t NumWrit;
-
-    RCt = 0;
-    NumWrit = 0;
-
-    if ( Buffer == NULL || BufferSize == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self == NULL ) {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (BOGUS)[NULL][NULL]"
-                    );
-    }
-    else {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[%s][0x%p]",
-                    ( ( struct XFSBogusNode * ) self ) -> NotFoundType
-                            ? "NotFound"
-                            : "BadPath"
-                            ,
-                    self -> Name,
-                    self
-                    );
-    }
-
-    return RCt;
-}   /* _BogusNodeDescribe_v1 () */
-
-/*)))
- |||
- +++    BogusNode lives here
- |||
-(((*/
-
-/*))
- ((     Node make/dispose
-  ))
- ((*/
-
-static
-rc_t CC
-_BogusNodeDispose ( const struct XFSBogusNode * self )
-{
-    struct XFSBogusNode * Node = ( struct XFSBogusNode * ) self;
-
-/*
-pLogMsg ( klogDebug, " _BogusNodeDispose ( $(node) )", "node=0x%p", ( void * ) Node );
-*/
-    if ( Node == NULL ) {
-        return 0;
-    }
-
-    free ( Node );
-
-    return 0;
-}   /* _BogusNodeDispose () */
-
-static
-rc_t CC
-_BogusNodeMake ( 
-            const char * NodeName,
-            bool NotFoundType,
-            const struct XFSBogusNode ** Node )
-{
-    rc_t RCt;
-    struct XFSBogusNode * TheNode;
-
-    RCt = 0;
-    TheNode = NULL;
-
-    if ( NodeName == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Node = NULL;
-
-    TheNode = calloc ( 1, sizeof ( struct XFSBogusNode ) );
-    if ( TheNode == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        TheNode -> NotFoundType = NotFoundType;
-
-        RCt = XFSNodeInitVT (
-                        & ( TheNode -> Node ),
-                        NodeName,
-                        ( const union XFSNode_vt * ) & _sBogusNodeVT_v1
-                        );
-
-        if ( RCt == 0 ) {
-            * Node = TheNode;
-        }
-        else {
-            XFSNodeDispose ( ( const struct XFSNode * ) TheNode );
-        }
-    }
-/*
-pLogMsg ( klogDebug, " _BogusNodeDispose ( $(name), $(node) )", "name=%s,node=0x%p", NodeName, ( void * ) TheNode );
-*/
-
-    return RCt;
-}   /* _BogusNodeMake () */
-
-/*))))
- ////   Make methods
-((((*/
-
-LIB_EXPORT
-rc_t CC
-XFSNodeNotFoundMake (
-                const char * NodeName,
-                const struct XFSNode ** Node
-)
-{
-    return _BogusNodeMake (
-                        NodeName,
-                        true,
-                        ( const struct XFSBogusNode ** ) Node
-                        );
-}   /* XFSNodeNotFoundMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeBadPathMake (
-                const char * NodeName,
-                const struct XFSNode ** Node
-)
-{
-    return _BogusNodeMake (
-                        NodeName,
-                        false,
-                        ( const struct XFSBogusNode ** ) Node
-                        );
-}   /* XFSNodeBadPathMake () */
diff --git a/libs/xfs/common.h b/libs/xfs/common.h
deleted file mode 100644
index f417301..0000000
--- a/libs/xfs/common.h
+++ /dev/null
@@ -1,217 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_common_
-#define _h_common_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   This file contains all unsorted common things
-  ))))
- ((((*/
-
-/*))    Flavors ... all kind
- ((*/
-static const uint32_t _sFlavorLess                = 0;
-static const uint32_t _sFlavorOfFoo               = 1;
-static const uint32_t _sFlavorOfBogus             = 2;
-static const uint32_t _sFlavorOfContNode          = 3;
-static const uint32_t _sFlavorOfSimpleContainer   = 4;
-static const uint32_t _sFlavorOfKfs               = 5;
-static const uint32_t _sFlavorOfReadMe            = 6;
-static const uint32_t _sFlavorOfHttp              = 7;
-static const uint32_t _sFlavorOfTar               = 8;
-static const uint32_t _sFlavorOfEncode            = 9;
-static const uint32_t _sFlavorOfWorkspace         = 10;
-static const uint32_t _sFlavorOfGapProject        = 11;
-static const uint32_t _sFlavorOfGapProjectCache   = 12;
-static const uint32_t _sFlavorOfGapPublicCache    = 13;
-static const uint32_t _sFlavorOfGapKarts          = 14;
-static const uint32_t _sFlavorOfGapKart           = 15;
-static const uint32_t _sFlavorOfGapFile           = 16;
-static const uint32_t _sFlavorOfGapKartFiles      = 17;
-
-/*))    Methods related to all commonly used nodes
- ((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* FileNode and DirNode - implemented in kfs.c                       */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-struct XFSHandle;
-struct KFile;
-
-XFS_EXTERN rc_t CC XFSFileNodeMakeHandle (
-                            const struct XFSHandle ** Handle,
-                            struct XFSNode * FileNode,
-                            struct KFile * File
-                            );
-
-XFS_EXTERN rc_t CC XFSFileNodeMake (
-                            struct XFSNode ** Node,
-                            const char * Path,
-                            const char * Name,
-                            const char * Perm   /* Could be NULL */
-                            );
-
-XFS_EXTERN rc_t CC XFSDirNodeMake (
-                            struct XFSNode ** Node,
-                            const char * Path,
-                            const char * Name,
-                            const char * Perm   /* Could be NULL */
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* DocNode - implemented in docnode.c                                */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-struct XFSDoc;
-
-XFS_EXTERN rc_t CC XFSDocNodeMake (
-                            struct XFSNode ** Node,
-                            const struct XFSDoc * Doc,
-                            const char * Name,
-                            const char * Perm       /* Could be NULL */
-                            );
-
-XFS_EXTERN rc_t CC XFSDocNodeMakeWithFlavor (
-                            struct XFSNode ** Node,
-                            const struct XFSDoc * Doc,
-                            const char * Name,
-                            const char * Perm,      /* Could be NULL */
-                            uint32_t Flavor 
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* TarArchiveNode - implemented in tar.c                             */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-XFS_EXTERN rc_t CC XFSTarArchiveNodeMake (
-                            struct XFSNode ** Node,
-                            const char * Name,
-                            const char * Path,
-                            const char * Perm       /* Could be NULL */
-                                                    /* Not used nos */
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* EncryptedFileNode - implemented in encro.c                        */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-XFS_EXTERN rc_t CC XFSEncryptedFileNodeMake (
-                            struct XFSNode ** Node,
-                            const char * Name,
-                            const char * Path,
-                            const char * Passwd,
-                            const char * EncType    /* could be NULL */
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* WorkspaceNode - implemented in encws.c                            */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-XFS_EXTERN rc_t CC XFSWorkspaceNodeMake (
-                            struct XFSNode ** Node,
-                            const char * Name,
-                            const char * Path,
-                            const char * Passwd,
-                            const char * EncType,   /* could be NULL */
-                            bool ReadOnly
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* GapProjectNode - implemented in gap.c                             */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-XFS_EXTERN rc_t CC XFSGapProjectNodeMake (
-                            struct XFSNode ** Node,
-                            const char * Name,
-                            uint32_t ProjectId,
-                            bool ReadOnly,          /* RW if not */
-                            const char * Perm       /* Could be NULL */
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* KartsNode - implemented in gapks.c                                */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-XFS_EXTERN rc_t CC XFSGapKartsNodeMake (
-                            struct XFSNode ** Node,
-                            uint32_t ProjectId,
-                            const char * Perm       /* Could be NULL */
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* KartNode - implemented in gapk.c                                  */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-XFS_EXTERN rc_t CC XFSGapKartNodeMake (
-                            struct XFSNode ** Node,
-                            const char * Name,
-                            uint32_t ProjectId,
-                            const char * Perm       /* Could be NULL */
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* GapFileNode - implemented in gapf.c                               */
-/*   NOTE : Accession != NULL || ObjectId != 0                       */
-/*   NOTE : Name could be NULL if Accession != NULL                  */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-XFS_EXTERN rc_t CC XFSGapFileNodeMake (
-                            struct XFSNode ** Node,
-                            const char * Name,
-                            uint32_t ProjectId,
-                            const char * Accession,
-                            uint32_t ObjectId
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* KartFilesNode - implemented in gapks.c                            */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-XFS_EXTERN rc_t CC XFSGapKartFilesNodeMake (
-                            struct XFSNode ** Node,
-                            const char * Perm       /* Could be NULL */
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* GapCacheNode - implemented in gap_cache.c                         */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-XFS_EXTERN rc_t CC XFSGapCacheNodeMake (
-                            struct XFSNode ** Node,
-                            uint32_t ProjectId,     /* public if NULL */
-                            const char * Perm       /* could be NULL */
-                            );
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _h_common_ */
diff --git a/libs/xfs/contnode.c b/libs/xfs/contnode.c
deleted file mode 100644
index c32722b..0000000
--- a/libs/xfs/contnode.c
+++ /dev/null
@@ -1,685 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/namelist.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/path.h>
-#include <xfs/editors.h>
-#include <xfs/perm.h>
-
-#include "mehr.h"
-#include "schwarzschraube.h"
-#include "ncon.h"
-#include "teleport.h"
-#include "common.h"
-#include "contnode.h"
-
-#include <sysalloc.h>
-
-/*)))
-  |||
-  +++    ContNode, and other simple containers
-  |||
-  (((*/
-
-/*)))
- |||
- +++    Simple Container virtual table is Living here :lol:
- |||
-(((*/
-static rc_t CC _ContNodeFlavor_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _ContNodeDispose_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _ContNodeFindNode_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSPath * Path,
-                                uint32_t PathIndex,
-                                const struct XFSNode ** Node
-                                );
-static rc_t CC _ContNodeDir_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSDirEditor ** Dir
-                                );
-static rc_t CC _ContNodeAttr_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSAttrEditor ** Attr
-                                );
-static rc_t CC _ContNodeDescribe_v1 (
-                                const struct XFSNode * self,
-                                char * Buffer,
-                                size_t BufferSize
-                                );
-
-static const struct XFSNode_vt_v1 _sContNodeVT_v1 = {
-                                        1, 1,   /* nin naj */
-                                        _ContNodeFlavor_v1,
-                                        _ContNodeDispose_v1,
-                                        _ContNodeFindNode_v1,
-                                        _ContNodeDir_v1,
-                                        NULL,
-                                        _ContNodeAttr_v1,
-                                        _ContNodeDescribe_v1
-                                        };
-
-static
-rc_t CC
-_ContNodeDispose ( const struct XFSContNode * self )
-{
-    struct XFSContNode * Container =
-                                ( struct XFSContNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "_ContNodeDispose ( $(container) )", "container=0x%p", ( void * ) Container );
-*/
-    if ( Container == 0 ) {
-        return 0;
-    }
-
-    if ( Container -> container != NULL ) {
-        XFSNodeContainerRelease ( Container -> container );
-        Container -> container = NULL;
-    }
-
-    if ( Container -> security != NULL ) {
-        free ( ( char * ) Container -> security );
-        Container -> security = NULL;
-    }
-
-    if ( Container -> disposer != NULL ) {
-        Container -> disposer ( Container );
-    }
-    else {
-        free ( Container );
-    }
-
-    return 0;
-}   /* _ContNodeDispose () */
-
-/*)))
- |||
- +++    Here we are creating and disposing that node
- |||
-(((*/
-
-uint32_t CC
-_ContNodeFlavor_v1 ( const struct XFSNode * self )
-{
-    return ( ( const struct XFSContNode * ) self ) -> flavor;
-}   /* _ContNodeFlavor_v1 () */
-
-rc_t CC
-_ContNodeDispose_v1 ( const struct XFSNode * self )
-{
-    return _ContNodeDispose ( ( const struct XFSContNode * ) self );
-}   /* _ContNodeDispose_v1 () */
-
-/*)))
- (((    First check itself and all others after.
-  )))
- (((*/
-rc_t CC
-_ContNodeFindNode_v1 (
-                    const struct XFSNode * self,
-                    const struct XFSPath * Path,
-                    uint32_t PathIndex,
-                    const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    uint32_t PathCount;
-    const char * NodeName;
-    bool IsLast;
-    const struct XFSNode * NextNode;
-
-    RCt = 0;
-    PathCount = 0;
-    NodeName = NULL;
-    IsLast = false;
-    NextNode = NULL;
-
-        /* Standard check-initialization */
-    RCt = XFSNodeFindNodeCheckInitStandard (
-                                            self,
-                                            Path,
-                                            PathIndex,
-                                            Node,
-                                            & NodeName,
-                                            & PathCount,
-                                            & IsLast
-                                            );
-    if ( RCt == 0 ) {
-
-            /* If node is last - that is */
-        if ( IsLast ) {
-            RCt = XFSNodeAddRef ( self );
-
-            * Node = self;
-
-            return RCt;
-        }
-
-            /*  Here we aren't last and looking forward; */
-        NodeName = XFSPathPartGet ( Path, PathIndex + 1 );
-
-            /*))  Should not happen thou
-             ((*/
-        if ( NodeName == NULL ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-
-            RCt = XFSNodeContainerGet (
-                    ( ( const struct XFSContNode * ) self )
-                                                        -> container,
-                    NodeName,
-                    & NextNode
-                    );
-            if ( RCt == 0 ) {
-
-                RCt = XFSNodeFindNode (
-                                    NextNode,
-                                    Path,
-                                    PathIndex + 1,
-                                    Node
-                                    );
-            }
-        }
-    }
-
-    return RCt;
-}   /* _ContNodeFindNode_v1 () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))  So, Directory
- (((*/
-
-static
-rc_t CC
-_ContNodeDir_dispose_v1 ( const struct XFSEditor * self )
-{
-    struct XFSDirEditor * Editor;
-
-    Editor = ( struct XFSDirEditor * ) self;
-/*
-pLogMsg ( klogDebug, "_ContNodeDir_dispose_ ( $(editor) )", "editor=0x%p", ( void * ) Editor );
-*/
-
-    if ( Editor == 0 ) {
-        return 0;
-    }
-
-    free ( Editor );
-
-    return 0;
-}   /* _ContNodeDir_dispose_v1 () */
-
-static
-rc_t CC
-_ContNodeDir_find_v1 (
-                        const struct XFSDirEditor * self,
-                        const char * Name,
-                        const struct XFSNode ** Node
-)
-{
-    struct XFSContNode * Cont = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( self == NULL || Name == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Cont = ( struct XFSContNode * ) ( self -> Papahen ) . Node;
-    if ( Cont == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-    return XFSNodeContainerGet ( Cont -> container, Name, Node );
-}   /* _ContNodeDir_find_v1 () */
-
-static
-rc_t CC
-_ContNodeDir_list_v1 (
-                        const struct XFSDirEditor * self,
-                        const struct KNamelist ** List
-)
-{
-    struct XFSContNode * Cont = NULL;
-
-    if ( List != NULL ) {
-        * List = NULL;
-    }
-
-    if ( self == NULL || List == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Cont = ( struct XFSContNode * ) ( self -> Papahen ) . Node;
-    if ( Cont == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    return XFSNodeContainerList ( Cont -> container, List );
-}   /* _ContNodeDir_list_v1 () */
-
-rc_t CC
-_ContNodeDir_v1 (
-                    const struct XFSNode * self,
-                    const struct XFSDirEditor ** Dir
-)
-{
-    rc_t RCt;
-    struct XFSDirEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-
-    if ( Dir != NULL ) {
-        * Dir = NULL;
-    }
-
-    if ( self == NULL || Dir == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Editor = calloc ( 1, sizeof ( struct XFSDirEditor ) );
-    if ( Editor == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                        & ( Editor -> Papahen ),
-                        self,
-                        _ContNodeDir_dispose_v1
-                        );
-    if ( RCt == 0 ) {
-        Editor -> list = _ContNodeDir_list_v1;
-        Editor -> find = _ContNodeDir_find_v1;
-
-        * Dir = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _ContNodeDir_v1 () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))  So, Attributes
- (((*/
-
-static
-rc_t CC
-_ContNodeAttr_dispose_v1 ( const struct XFSEditor * self )
-{
-    struct XFSAttrEditor * Editor;
-
-    Editor = ( struct XFSAttrEditor * ) self;
-/*
-pLogMsg ( klogDebug, "_ContNodeAttr_dispose_ ( $(editor) )", "editor=0x%p", ( void * ) Editor );
-*/
-
-    if ( Editor == 0 ) {
-        return 0;
-    }
-
-    free ( Editor );
-
-    return 0;
-}   /* _ContNodeAttr_dispose_v1 () */
-
-static
-rc_t CC
-_ContNodeAttr_permissions_v1 (
-                            const struct XFSAttrEditor * self,
-                            const char ** Permissions
-                            )
-{
-    const struct XFSNode * Node = NULL;
-
-    if ( Permissions != NULL ) {
-        * Permissions = NULL;
-    }
-
-    if ( self == NULL || Permissions == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Node = XFSEditorNode ( & ( self -> Papahen ) );
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    * Permissions = ( ( struct XFSContNode * ) Node ) -> security;
-
-	if ( * Permissions == NULL ) {
-		* Permissions = XFSPermRODefContChar ();
-	}
-
-    return 0;
-}   /* _ContNodeAttr_permisiions_v1 () */
-
-static
-rc_t CC
-_ContNodeAttr_date_v1 (
-                            const struct XFSAttrEditor * self,
-                            KTime_t * Time
-)
-{
-    if ( Time != NULL ) {
-        * Time = 0;
-    }
-
-    if ( self == NULL || Time == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( XFSEditorNode ( & ( self -> Papahen ) ) == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    return 0;
-}   /* _ContNodeAttr_date_v1 () */
-
-static
-rc_t CC
-_ContNodeAttr_type_v1 (
-                            const struct XFSAttrEditor * self,
-                            XFSNType * Type
-)
-{
-    if ( Type != NULL ) {
-        * Type = kxfsNotFound;
-    }
-
-    if ( self == NULL || Type == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( XFSEditorNode ( & ( self -> Papahen ) ) == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    * Type = kxfsDir;
-
-    return 0;
-}   /* _ContNodeAttr_type_v1 () */
-
-rc_t CC
-_ContNodeAttr_v1 (
-                    const struct XFSNode * self,
-                    const struct XFSAttrEditor ** Attr
-)
-{
-    rc_t RCt;
-    struct XFSAttrEditor * Editor;
-
-    RCt = 0;
-
-    if ( Attr != NULL ) {
-        * Attr = NULL;
-    }
-
-    if ( self == NULL || Attr == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Editor = calloc ( 1, sizeof ( struct XFSAttrEditor ) );
-    if ( Editor == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                        & ( Editor -> Papahen ),
-                        self,
-                        _ContNodeAttr_dispose_v1
-                        );
-    if ( RCt == 0 ) {
-        Editor -> permissions = _ContNodeAttr_permissions_v1;
-        Editor -> date = _ContNodeAttr_date_v1;
-        Editor -> type = _ContNodeAttr_type_v1;
-
-        * Attr = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return 0;
-}   /* _ContNodeAttr_v1 () */
-
-rc_t CC
-_ContNodeDescribe_v1 (
-                        const struct XFSNode * self,
-                        char * Buffer,
-                        size_t BufferSize
-)
-{
-    rc_t RCt;
-    size_t NumWrit;
-
-    RCt = 0;
-    NumWrit = 0;
-
-    if ( Buffer == NULL || BufferSize == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-    * Buffer = 0;
-
-    if ( self == NULL ) {
-        RCt = string_printf (
-                        Buffer,
-                        BufferSize,
-                        & NumWrit,
-                        "NODE (BASIC CONT)[NULL][NULL]"
-                        );
-    }
-    else {
-        RCt = string_printf (
-                        Buffer,
-                        BufferSize,
-                        & NumWrit,
-                        "NODE (BASIC CONT)[%s][0x%p]",
-                        self -> Name,
-                        self
-                        );
-    }
-
-    return RCt;
-}   /* _ContNodeDescribe_v1 () */
-
-/*)))
- |||
- +++    Simple Container lives here
- |||
-(((*/
-
-/*))
- ((     Node make/dispose
-  ))
- ((*/
-
-LIB_EXPORT
-rc_t CC
-XFSContNodeInit (
-                struct XFSNode * self,
-                const char * Name,
-                const char * Perm,
-                uint32_t Flavor,
-                _tContNodeDisposer Disposer
-)
-{
-    rc_t RCt;
-    struct XFSContNode * Cont;
-
-    RCt = 0;
-    Cont = ( struct XFSContNode * ) self;
-
-    if ( Cont == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = XFSNodeInitVT (
-                    & ( Cont -> node ),
-                    Name,
-                    ( const union XFSNode_vt * ) & _sContNodeVT_v1
-                    );
-    if ( RCt == 0 ) {
-        RCt = XFSNodeContainerMake ( ( const struct XFSNodeContainer ** ) & Cont -> container );
-        if ( RCt == 0 ) {
-
-            if ( Perm != NULL ) {
-                RCt = XFS_StrDup ( Perm, & ( Cont -> security ) );
-            }
-
-            if ( RCt == 0 ) {
-                Cont -> flavor = Flavor;
-                Cont -> disposer = Disposer;
-            }
-        }
-    }
-
-    return RCt;
-}   /* XFSContNodeInit () */
-
-LIB_EXPORT
-rc_t CC
-XFSContNodeMake (
-                const char * Name,
-                const char * Perm,
-                struct XFSNode ** Node
-)
-{
-    return XFSContNodeMakeWithFlavor (
-                                    Name,
-                                    Perm,
-                                    _sFlavorOfContNode,
-                                    Node
-                                    );
-}   /* XFSContNodeMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSContNodeMakeWithFlavor (
-                const char * Name,
-                const char * Perm,
-                uint32_t Flavor,
-                struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct XFSContNode * Cont;
-
-    RCt = 0;
-    Cont = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Node == NULL || Name == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Cont = calloc ( 1, sizeof ( struct XFSContNode ) );
-    if ( Cont == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSContNodeInit ( & ( Cont -> node ), Name, Perm, Flavor, NULL );
-    if ( RCt == 0 ) {
-        * Node = & ( Cont -> node );
-    }
-    else {
-        if ( Cont != NULL ) {
-            XFSNodeDispose ( & ( Cont -> node ) );
-        }
-
-        * Node = NULL;
-    }
-/*
-pLogMsg ( klogDebug, "_ContNodeMake ND[$(container)] NM[$(name)]", "container=0x%p,name=%s", ( void * ) Cont, Name );
-*/
-
-    return RCt;
-}   /* XFSContNodeMakeWithFlavor () */
-
-LIB_EXPORT
-rc_t CC
-XFSContNodeAddChild (
-                struct XFSNode * self,
-                const struct XFSNode * Child
-)
-{
-    struct XFSContNode * Cont = ( struct XFSContNode * ) self;
-
-    if ( Cont == NULL || Child == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    return XFSNodeContainerAdd ( Cont -> container, Child );
-}   /* XFSContNodeAddChild () */
-
-LIB_EXPORT
-rc_t CC
-XFSContNodeDelChild ( struct XFSNode * self, const char * ChildName )
-{
-    struct XFSContNode * Cont = ( struct XFSContNode * ) self;
-
-    if ( Cont == NULL || ChildName == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    return XFSNodeContainerDel ( Cont -> container, ChildName );
-}   /* XFSContNodeDelChild () */
-
-LIB_EXPORT
-rc_t CC
-XFSContNodeClear ( struct XFSNode * self )
-{
-    struct XFSContNode * Cont = ( struct XFSContNode * ) self;
-
-    if ( Cont == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    return XFSNodeContainerClear ( Cont -> container );
-}   /* XFSContNodeClear () */
diff --git a/libs/xfs/contnode.h b/libs/xfs/contnode.h
deleted file mode 100644
index ccd5cdb..0000000
--- a/libs/xfs/contnode.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_contnode_
-#define _h_contnode_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   This file contains general container node
-  ))))
- ((((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* ContNode - implemented in contnode.c                              */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct XFSNodeContainer;
-struct XFSContNode;
-
-typedef rc_t ( CC * _tContNodeDisposer ) ( struct XFSContNode * self );
-
-struct XFSContNode {
-    struct XFSNode node;
-
-    _tContNodeDisposer disposer;
-
-    struct XFSNodeContainer * container;
-
-    const char * security;
-    uint32_t flavor;
-};
-
-XFS_EXTERN rc_t CC XFSContNodeInit (
-                            struct XFSNode * self,
-                            const char * Name,      /* Could be NULL */
-                            const char * Perm,
-                            uint32_t Flavor,
-                            _tContNodeDisposer disposer /* NULL is OK */
-                            );
-
-XFS_EXTERN rc_t CC XFSContNodeMake (
-                            const char * Name,
-                            const char * Perm,      /* Could be NULL */
-                            struct XFSNode ** Node
-                            );
-
-XFS_EXTERN rc_t CC XFSContNodeMakeWithFlavor (
-                            const char * Name,
-                            const char * Perm,      /* Could be NULL */
-                            uint32_t Flavor,
-                            struct XFSNode ** Node
-                            );
-
-XFS_EXTERN rc_t CC XFSContNodeAddChild (
-                            struct XFSNode * self,
-                            const struct XFSNode * Child
-                            );
-
-XFS_EXTERN rc_t CC XFSContNodeDelChild (
-                            struct XFSNode * self,
-                            const char * ChildName
-                            );
-
-XFS_EXTERN rc_t CC XFSContNodeClear ( struct XFSNode * self );
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _h_contnode_ */
diff --git a/libs/xfs/doc.c b/libs/xfs/doc.c
deleted file mode 100644
index 4d55baf..0000000
--- a/libs/xfs/doc.c
+++ /dev/null
@@ -1,730 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/refcount.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-
-#include <kfs/file.h>
-#include <kfs/file-impl.h>
-
-#include <xfs/doc.h>
-
-#include <va_copy.h>
-
-#include <string.h>    /* memcpy() */
-
-#include <sysalloc.h>
-
-static const char * _sDoc_classname = "XFSDoc";
-
-/*))
- //     Here is a struct buffer
-((*/
-struct XFSDoc {
-    const union XFSDoc_vt * vt;
-
-    KRefcount refcount;
-};
-
-LIB_EXPORT
-rc_t CC
-XFSDocInit ( const struct XFSDoc * self, const union XFSDoc_vt * VT )
-{
-    struct XFSDoc * Doc = ( struct XFSDoc * ) self;
-
-    if ( Doc == NULL || VT == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    KRefcountInit ( 
-                    & ( Doc -> refcount ),
-                    1,
-                    _sDoc_classname,
-                    "XFSDocInit",
-                    "Doc"
-                    );
-
-    Doc -> vt = VT;
-
-    return 0;
-}   /* XFSDocInit () */
-
-LIB_EXPORT
-rc_t CC
-XFSDocDispose ( const struct XFSDoc * self )
-{
-    rc_t RCt;
-    struct XFSDoc * Doc = ( struct XFSDoc * ) self;
-
-    RCt = 0;
-
-    if ( Doc == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    KRefcountWhack ( & ( Doc -> refcount ), _sDoc_classname );
-
-    if ( Doc -> vt != NULL ) {
-        switch ( Doc -> vt -> v1.maj ) {
-            case 1 :
-                    if ( Doc -> vt -> v1.dispose != NULL ) {
-                        RCt = Doc -> vt -> v1.dispose ( Doc );
-                    }
-                    break;
-            default :
-                    RCt = XFS_RC ( rcBadVersion );
-                    break;
-        }
-    }
-
-    return RCt;
-}   /* XFSDocDispose () */
-
-LIB_EXPORT
-rc_t CC
-XFSDocAddRef ( const struct XFSDoc * self )
-{
-    rc_t RCt;
-    int32_t RetCode;
-    struct XFSDoc * Doc;
-
-    RCt = 0;
-    RetCode = 0;
-    Doc = ( struct XFSDoc * ) self;
-
-    if ( Doc != NULL ) {
-        RetCode = KRefcountAdd (
-                            & ( Doc -> refcount ),
-                            _sDoc_classname
-                            );
-        switch ( RetCode ) {
-            case krefOkay :
-                    RCt = 0;
-                    break;
-            case krefZero :
-            case krefLimit :
-            case krefNegative :
-                    RCt = RC ( rcFS, rcNoTarg, rcAttaching, rcRefcount, rcInvalid );
-                    break;
-            default :
-                    RCt = RC ( rcFS, rcNoTarg, rcAttaching, rcRefcount, rcUnknown );
-                    break;
-        }
-    }
-
-    return RCt;
-}   /* XFSDocAddRef () */
-
-LIB_EXPORT
-rc_t CC
-XFSDocRelease ( const struct XFSDoc * self )
-{
-    rc_t RCt;
-    int32_t RetCode;
-    struct XFSDoc * Doc;
-
-    RCt = 0;
-    RetCode = 0;
-    Doc = ( struct XFSDoc * ) self;
-
-    if ( Doc != NULL ) {
-        RetCode = KRefcountDrop (
-                            & ( Doc -> refcount ),
-                            _sDoc_classname
-                            );
-        switch ( RetCode ) {
-            case krefOkay :
-            case krefZero :
-                    RCt = 0;
-                    break;
-            case krefWhack :
-                    XFSDocDispose ( Doc );
-                    break;
-            case krefNegative :
-                    RCt = RC ( rcFS, rcNoTarg, rcAttaching, rcRefcount, rcInvalid );
-                    break;
-            default :
-                    RCt = RC ( rcFS, rcNoTarg, rcAttaching, rcRefcount, rcUnknown );
-                    break;
-        }
-    }
-
-    return RCt;
-}   /* XFSDocRelease () */
-
-LIB_EXPORT
-rc_t CC
-XFSDocGet ( const struct XFSDoc * self, const char ** Ret )
-{
-    rc_t RCt;
-    const char * Var1;
-
-    RCt = 0;
-    Var1 = NULL;
-
-    if ( Ret != NULL ) {
-        * Ret = NULL;
-    }
-
-    if ( self == NULL || Ret == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> vt == NULL ) { 
-        return XFS_RC ( rcInvalid );
-    }
-
-    switch ( self -> vt -> v1.maj ) {
-        case 1 :
-            if ( self -> vt -> v1.get != NULL ) {
-                RCt = self -> vt -> v1.get ( self, & Var1 );
-                if ( RCt == 0 ) {
-                    if ( Var1 == NULL ) {
-                        RCt = XFS_RC ( rcInvalid );
-                    }
-                    else {
-                        * Ret = Var1;
-                    }
-                }
-            }
-            else {
-                RCt = XFS_RC ( rcUnsupported );
-            }
-            break;
-        default :
-            RCt = XFS_RC ( rcBadVersion );
-            break;
-    }
-
-    return RCt;
-}   /* XFSDocGet () */
-
-LIB_EXPORT
-rc_t CC
-XFSDocSize ( const struct XFSDoc * self, uint64_t * Ret )
-{
-    rc_t RCt;
-    uint64_t Var1;
-
-    RCt = 0;
-    Var1 = 0;
-
-    if ( Ret != NULL ) {
-        * Ret = 0;
-    }
-
-    if ( self == NULL || Ret == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> vt == NULL ) { 
-        return XFS_RC ( rcInvalid );
-    }
-
-    switch ( self -> vt -> v1.maj ) {
-        case 1 :
-            if ( self -> vt -> v1.size != NULL ) {
-                RCt = self -> vt -> v1.size ( self, & Var1 );
-                if ( RCt == 0 ) {
-                    * Ret = Var1;
-                }
-            }
-            else {
-                RCt = XFS_RC ( rcUnsupported );
-            }
-            break;
-        default :
-            RCt = XFS_RC ( rcBadVersion );
-            break;
-    }
-
-    return RCt;
-}   /* XFSDocSize () */
-
-/*))
- //     Here is a file to implement
-((*/
-struct XFSDocFile {
-    struct KFile Papahen;
-    const struct XFSDoc * Doc;
-};
-
-/*\
-|*| First we should make appropriate virtual table
-\*/
-static
-rc_t CC
-XFSDocFile_destroy_v1 ( struct KFile * self )
-{
-    struct XFSDocFile * DocFile = ( struct XFSDocFile * ) self;
-
-    if ( DocFile != NULL ) {
-        if ( DocFile -> Doc != NULL ) {
-            XFSDocRelease ( DocFile -> Doc );
-        }
-        DocFile -> Doc = NULL;
-
-        free ( DocFile );
-    }
-
-    return 0;
-}   /* XFSDocFile_destroy_v1 () */
-
-static
-struct KSysFile * 
-XFSDocFile_get_sysfile_v1 ( const struct KFile * self, uint64_t * offset )
-{
-    if ( offset != NULL ) {
-        * offset = 0;
-    }
-
-    return NULL;
-}   /* XFSDocFile_get_sysfile_v1 () */
-
-static
-rc_t CC
-XFSDocFile_random_access_v1 ( const struct KFile * self )
-{
-    return 0;
-}   /* XFSDocFile_random_access_v1 () */
-
-static
-rc_t CC
-XFSDocFile_get_size_v1 ( const struct KFile * self, uint64_t * size )
-{
-    const struct XFSDocFile * DocFile = ( const struct XFSDocFile * ) self;
-
-    if ( size != NULL ) {
-        * size = 0;
-    }
-
-    if ( DocFile == NULL || size == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( DocFile -> Doc == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    return XFSDocSize ( DocFile -> Doc, size );
-}   /* XFSDocFile_get_size_v1 () */
-
-static
-rc_t CC
-XFSDocFile_set_size_v1 ( struct KFile * self, uint64_t size )
-{
-    return XFS_RC ( rcUnsupported );
-}   /* XFSDocFile_set_size_v1 () */
-
-static
-rc_t CC
-XFSDocFile_read_v1 (
-            const struct KFile * self,
-            uint64_t pos,
-            void * buffer,
-            size_t bsize,
-            size_t * num_read
-)
-{
-    rc_t RCt;
-    const struct XFSDocFile * DocFile;
-    uint64_t DocS;
-    const char * DocB;
-    size_t Siz2R;
-
-    RCt = 0;
-    DocFile = ( const struct XFSDocFile * ) self;
-    DocS = 0;
-    DocB = NULL;
-    Siz2R = 0;
-
-    if ( num_read != NULL ) {
-        * num_read = 0;
-    }
-
-    if ( DocFile == NULL || buffer == NULL || num_read == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( bsize == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( DocFile -> Doc == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFSDocSize ( DocFile -> Doc, & DocS );
-    if ( RCt == 0 ) {
-        if ( DocS < pos ) {
-            return XFS_RC ( rcInvalid );
-        }
-
-        Siz2R = ( size_t ) ( DocS - pos );
-        if ( bsize < Siz2R ) {
-            Siz2R = bsize;
-        }
-
-        RCt = XFSDocGet ( DocFile -> Doc, & DocB );
-        if ( RCt == 0 ) {
-            memcpy ( buffer, DocB + pos, Siz2R );
-            * num_read = Siz2R;
-        }
-    }
-
-    return RCt;
-}   /* XFSDocFile_read_v1 () */
-
-static
-rc_t CC
-XFSDocFile_write_v1 (
-            struct KFile * self,
-            uint64_t pos,
-            const void * buffer,
-            size_t bsize,
-            size_t * num_writ
-)
-{
-    if ( num_writ != NULL ) {
-        * num_writ = 0;
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSDocFile_write_v1 () */
-
-static
-uint32_t CC
-XFSDocFile_get_type_v1 ( const struct KFile * self )
-{
-    return kfdFile;
-}   /* XFSDocFile_get_type_v1 () */
-
-static struct KFile_vt_v1 _sXFSDocFile_vt_v1 = {
-                            1, 1,
-                            XFSDocFile_destroy_v1,
-                            XFSDocFile_get_sysfile_v1,
-                            XFSDocFile_random_access_v1,
-                            XFSDocFile_get_size_v1,
-                            XFSDocFile_set_size_v1,
-                            XFSDocFile_read_v1,
-                            XFSDocFile_write_v1,
-                            XFSDocFile_get_type_v1
-                            };
-
-
-/*\
-|*| Here we are ugly
-\*/
-LIB_EXPORT
-rc_t CC
-XFSDocFileMake (
-            const char * Name,
-            const struct XFSDoc * Doc,
-            struct KFile ** File
-)
-{
-    rc_t RCt;
-    struct XFSDocFile * DocFile;
-    const char * xName;
-
-    RCt = 0;
-    DocFile = NULL;
-    xName = Name == NULL ? "DocFile" : Name;
-
-    if ( File != NULL ) {
-        * File = NULL;
-    }
-
-    if ( Doc == NULL || File == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = XFSDocAddRef ( Doc );
-    if ( RCt == 0 ) {
-        DocFile = calloc ( 1, sizeof ( struct XFSDocFile ) );
-        if ( DocFile == NULL ) {
-            return XFS_RC ( rcExhausted );
-        }
-
-        RCt = KFileInit ( 
-                        & ( DocFile -> Papahen ),
-                        ( const KFile_vt * ) & _sXFSDocFile_vt_v1,
-                        "XFSDocFile",
-                        xName,
-                        true,
-                        false
-                        );
-        if ( RCt == 0 ) {
-            RCt = XFSDocAddRef ( Doc ); 
-            if ( RCt == 0 ) {
-                DocFile -> Doc = Doc;
-                * File = & ( DocFile -> Papahen );
-            }
-        }
-
-        if ( RCt != 0 ) {
-            * File = NULL;
-
-            KFileRelease ( & ( DocFile -> Papahen ) );
-        }
-    }
-
-    return RCt;
-}   /* XFSDocFileMake () */
-
-/*))
- //     Here is README Doc
-((*/
-struct XFSTextDoc {
-    struct XFSDoc Papahen;
-
-    char * buffer;
-    size_t size;
-    size_t capacity;
-};
-
-static
-rc_t CC
-XFSTextDoc_dispose_v1 ( struct XFSDoc * self )
-{
-    struct XFSTextDoc * Doc = ( struct XFSTextDoc * ) self;
-
-    if ( Doc == NULL ) {
-        return 0;
-    }
-
-    if ( Doc -> buffer != NULL ) {
-        free ( Doc -> buffer );
-    }
-
-    Doc -> buffer = NULL;
-    Doc -> size = 0;
-    Doc -> capacity = 0;
-
-    free ( Doc );
-
-    return 0;
-}   /* XFSTextDoc_dispose_v1 () */
-
-static
-rc_t CC
-XFSTextDoc_get_v1 ( const struct XFSDoc * self, const char ** B )
-{
-    const struct XFSTextDoc * Doc = ( const struct XFSTextDoc * ) self;
-    if ( B != NULL ) {
-        * B = NULL;
-    }
-
-    if ( Doc == NULL || B == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * B = Doc -> buffer;
-
-    return 0;
-}   /* XFSTextDoc_get_v1 () */
-
-static
-rc_t CC
-XFSTextDoc_size_v1 ( const struct XFSDoc * self, uint64_t * S )
-{
-    const struct XFSTextDoc * Doc = ( const struct XFSTextDoc * ) self;
-    if ( S != NULL ) {
-        * S = 0;
-    }
-
-    if ( Doc == NULL || S == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * S = Doc -> size;
-
-    return 0;
-}   /* XFSTextDoc_size_v1 () */
-
-static struct XFSDoc_vt_v1 _sTextDoc_vt_v1 = {
-                                            1, 1,
-                                            XFSTextDoc_dispose_v1,
-                                            XFSTextDoc_get_v1,
-                                            XFSTextDoc_size_v1
-                                            };
-
-LIB_EXPORT
-rc_t CC
-XFSTextDocMake ( struct XFSDoc ** TextDoc )
-{
-    rc_t RCt;
-    struct XFSTextDoc * Doc;
-
-    RCt = 0;
-    Doc = NULL;
-
-    if ( TextDoc == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * TextDoc = NULL;
-
-    Doc = calloc ( 1, sizeof ( struct XFSTextDoc ) );
-    if ( Doc == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSDocInit (
-                    & ( Doc -> Papahen ),
-                    ( const union XFSDoc_vt * ) & _sTextDoc_vt_v1
-                    );
-    if ( RCt == 0 ) {
-        * TextDoc = & ( Doc -> Papahen );
-    }
-    else {
-        XFSDocRelease ( & ( Doc -> Papahen ) );
-    }
-
-    return RCt;
-}   /* XFSTextDocMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSTextDocAppend ( struct XFSDoc * self, const char * Fmt, ... )
-{
-    rc_t RCt;
-    va_list args;
-
-    va_start ( args, Fmt );
-
-    RCt = XFSTextDocVAppend ( self, Fmt, args );
-
-    va_end ( args );
-
-    return RCt;
-}   /* XFSTextDocAppend () */
-
-static
-rc_t CC
-__TextDocRealloc ( struct XFSDoc * self, size_t Len )
-{
-    size_t NewCap;
-    struct XFSTextDoc * Doc;
-    char * NewBuf;
-
-    Doc = ( struct XFSTextDoc * ) self;
-    NewCap = 0;
-    NewBuf = NULL;
-
-    if ( Doc == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    NewCap = Doc -> size + Len;
-
-    if ( Doc -> capacity < NewCap ) {
-        NewCap = ( ( NewCap / 1024 ) + 1 ) * 1024;
-
-        NewBuf = calloc ( NewCap, sizeof ( char ) );
-        if ( NewBuf == NULL ) {
-            return XFS_RC ( rcExhausted );
-        }
-
-        if ( Doc -> buffer != NULL ) {
-            if ( Doc -> size != 0 ) {
-                memcpy (
-                        NewBuf,
-                        Doc -> buffer,
-                        Doc -> size * sizeof ( char )
-                        );
-                free ( Doc -> buffer );
-                Doc -> buffer = NULL;
-            }
-        }
-
-        Doc -> buffer = NewBuf;
-        Doc -> capacity = NewCap;
-    }
-
-    return 0;
-}   /* __TextDocRealloc () */
-
-static
-rc_t CC
-__TextDocAppend ( struct XFSDoc * self, const char * Line, size_t Len )
-{
-    rc_t RCt;
-    struct XFSTextDoc * Doc;
-
-    RCt = 0;
-    Doc = ( struct XFSTextDoc * ) self;
-
-    if ( Doc == NULL || Line == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Len == 0 ) {
-        return 0;
-    }
-
-    RCt = __TextDocRealloc ( self, Len );
-    if ( RCt ==  0 ) {
-        memcpy ( Doc -> buffer + Doc -> size, Line, Len );
-
-        Doc -> size += Len;
-    }
-
-    return RCt;
-}   /* __TextDocAppend () */
-
-LIB_EXPORT
-rc_t CC
-XFSTextDocVAppend ( struct XFSDoc * self, const char * Fmt, va_list args )
-{
-    rc_t RCt;
-    char TBF [ XFS_SIZE_1024 ];
-    size_t nwr;
-    va_list xArgs;
-
-    RCt = 0;
-    * TBF = 0;
-    nwr = 0;
-
-    if ( self == NULL || Fmt == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    va_copy ( xArgs, args );
-    RCt = string_vprintf ( TBF, sizeof ( TBF ), & nwr, Fmt, xArgs );
-    va_end ( xArgs );
-    if ( RCt == 0 ) {
-        if ( nwr == 0 ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-            RCt = __TextDocAppend ( self, TBF, nwr );
-        }
-    }
-
-    return RCt;
-}   /* XFSTextDocVAppend () */
diff --git a/libs/xfs/docnode.c b/libs/xfs/docnode.c
deleted file mode 100644
index d9838b9..0000000
--- a/libs/xfs/docnode.c
+++ /dev/null
@@ -1,745 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <kfs/file.h>
-
-#include <xfs/node.h>
-#include <xfs/editors.h>
-#include <xfs/perm.h>
-#include <xfs/doc.h>
-
-#include "schwarzschraube.h"
-#include "common.h"
-
-#include <sysalloc.h>
-
-/*)))
- |||    That file contains DocFile based node as XFSDocNode
-(((*/
-
-/*)))
- |||
- +++    FileNode, and other simple containers
- |||
-(((*/
-struct XFSDocNode {
-    struct XFSNode node;
-
-    const struct XFSDoc * doc;
-    const char * perm;
-    uint32_t flavor;
-};
-
-struct XFSDocFileEditor {
-    struct XFSFileEditor Papahen;
-
-    struct KFile * file;
-};
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*                                                               *_*/
-/*_* DocNode is living here                                        *_*/
-/*_*                                                               *_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))
- |||
- +++    DocNode virtual table is Living here :lol:
- |||
-(((*/
-static rc_t CC _DocNodeFlavor_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _DocNodeDispose_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _DocNodeFindNode_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSPath * Path,
-                                uint32_t PathIndex,
-                                const struct XFSNode ** Node
-                                );
-static rc_t CC _DocNodeFile_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSFileEditor ** File
-                                );
-static rc_t CC _DocNodeAttr_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSAttrEditor ** Attr
-                                );
-static rc_t CC _DocNodeDescribe_v1 (
-                                const struct XFSNode * self,
-                                char * Buffer,
-                                size_t BufferSize
-                                );
-
-static const struct XFSNode_vt_v1 _sDocNodeVT_v1 = {
-                                        1, 1,   /* nin naj */
-                                        _DocNodeFlavor_v1,
-                                        _DocNodeDispose_v1,
-                                        _DocNodeFindNode_v1,
-                                        NULL,   /* NO DIR */
-                                        _DocNodeFile_v1,
-                                        _DocNodeAttr_v1,
-                                        _DocNodeDescribe_v1
-                                        };
-
-LIB_EXPORT
-rc_t CC
-XFSDocNodeMake (
-            struct XFSNode ** Node,
-            const struct XFSDoc * Doc,
-            const char * Name,
-            const char * Perm          /* Could be NULL */
-)
-{
-    return XFSDocNodeMakeWithFlavor (
-                                    Node,
-                                    Doc,
-                                    Name,
-                                    Perm,
-                                    _sFlavorLess
-                                    );
-}   /* XFSDocNodeMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSDocNodeMakeWithFlavor (
-            struct XFSNode ** Node,
-            const struct XFSDoc * Doc,
-            const char * Name,
-            const char * Perm,          /* Could be NULL */
-            uint32_t Flavor
-)
-{
-    rc_t RCt;
-    struct XFSDocNode * TheNode;
-
-    RCt = 0;
-    TheNode = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Node == NULL || Name == NULL || Doc == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    TheNode = calloc ( 1, sizeof ( struct XFSDocNode ) );
-    if ( TheNode == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = XFSNodeInitVT (
-                        & ( TheNode -> node),
-                        Name,
-                        ( const union XFSNode_vt * ) & _sDocNodeVT_v1
-                        );
-        if ( RCt == 0 ) {
-            if ( Perm != NULL ) {
-                RCt = XFS_StrDup ( Perm, & ( TheNode -> perm ) );
-            }
-
-            if ( RCt == 0 ) {
-                RCt = XFSDocAddRef ( Doc );
-                if ( RCt == 0 ) {
-                    TheNode -> doc = Doc;
-
-                    TheNode -> flavor = Flavor;
-
-                    * Node = & ( TheNode -> node );
-                }
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( & ( TheNode -> node ) );
-            TheNode = NULL;
-        }
-    }
-
-/*
-pLogMsg ( klogDebug, "XFSDocNodeMake ND[$(node)] NM[$(name)] Doc[$(doc)]", "node=%p,name=%s,doc=%s", ( void * ) TheNode, Name, Doc );
-*/
-
-    return RCt;
-}   /* XFSDocNodeMakeWithFlavor () */
-
-uint32_t CC
-_DocNodeFlavor_v1 ( const struct XFSNode * self )
-{
-    const struct XFSDocNode * Node = ( const struct XFSDocNode * ) self;
-
-    if ( Node != NULL ) {
-        return Node -> flavor;
-    }
-
-    return _sFlavorLess;
-}   /* _DocNodeFlavor_v1 () */
-
-static
-rc_t CC
-XFSDocNodeDispose ( const struct XFSDocNode * self )
-{
-    struct XFSDocNode * Node = ( struct XFSDocNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "XFSDocNodeDispose ( $(node) ) [$(doc)]", "node=%p,doc=%p", ( void * ) Node, ( void * ) Node -> doc );
-*/
-
-    if ( Node == 0 ) {
-        return 0;
-    }
-
-    if ( Node -> perm != NULL ) {
-        free ( ( char * ) Node -> perm );
-        Node -> perm = NULL;
-    }
-
-    if ( Node -> doc != NULL ) {
-        XFSDocRelease ( Node -> doc );
-        Node -> doc = NULL;
-    }
-
-    free ( Node );
-
-    return 0;
-}   /* XFSDocNodeDispose () */
-
-rc_t CC
-_DocNodeDispose_v1 ( const struct XFSNode * self )
-{
-    return XFSDocNodeDispose ( ( struct XFSDocNode * ) self );
-}   /* _DocNodeDispose_v1 () */
-
-/*)))
- |||
- +++  Node lookup ... never do it seriously
- |||
-(((*/
-
-rc_t CC
-_DocNodeFindNode_v1 (
-            const struct XFSNode * self,
-            const struct XFSPath * Path,
-            uint32_t PathIndex,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    uint32_t PathCount;
-    const char * NodeName;
-    bool IsLast;
-
-    RCt = 0;
-    PathCount = 0;
-    NodeName = NULL;
-    IsLast = false;
-
-    RCt = XFSNodeFindNodeCheckInitStandard (
-                                            self,
-                                            Path,
-                                            PathIndex,
-                                            Node,
-                                            & NodeName,
-                                            & PathCount,
-                                            & IsLast
-                                            );
-    if ( RCt == 0 ) {
-        if ( IsLast ) {
-            RCt = XFSNodeAddRef ( self );
-
-            * Node = self;
-        }
-    }
-
-    return RCt;
-}   /* _DocNodeFindNode () */
-
-/*)))
- |||
- +++  Unified FileEditor
- |||
-(((*/
-
-static
-rc_t CC
-_DocFile_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-    pLogMsg ( klogDebug, "_DocNodeFile_dispose_v1 ( $(node) )", "node=%p", ( void * ) self );
-*/
-
-    if ( self != NULL ) {
-        free ( ( struct XFSDocFileEditor * ) self );
-    }
-
-    return 0;
-}   /* _DocFile_dispose_v1 () */
-
-static
-rc_t CC
-_DocFile_open_v1 (
-                    const struct XFSFileEditor * self,
-                    XFSNMode Mode
-)
-{
-    const struct XFSDocNode * Node;
-    struct KFile * File;
-    rc_t RCt;
-
-    Node = NULL;
-    File = NULL;
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Node = ( const struct XFSDocNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Mode != kxfsRead ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFSDocFileMake (
-                        XFSNodeName ( & ( Node -> node ) ),
-                        Node -> doc,
-                        & File
-                        );
-    if ( RCt == 0 ) {
-        ( ( struct XFSDocFileEditor * ) self ) -> file = File;
-    }
-
-    return RCt;
-}   /* _DocFile_open_v1 () */
-
-static
-rc_t CC
-_DocFile_close_v1 ( const struct XFSFileEditor * self )
-{
-    struct XFSDocFileEditor * Editor;
-    rc_t RCt;
-
-    Editor = NULL;
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-
-    Editor = ( struct XFSDocFileEditor * ) self;
-
-    if ( Editor -> file != NULL ) {
-        RCt = KFileRelease ( Editor -> file );
-
-        Editor -> file = NULL;
-    }
-
-    return RCt;
-}   /* _DocFile_close_v1 () */
-
-static
-rc_t CC
-_DocFile_read_v1 (
-                    const struct XFSFileEditor * self,
-                    uint64_t Offset,
-                    void * Buffer,
-                    size_t SizeToRead,
-                    size_t * NumReaded
-)
-{
-    struct XFSDocFileEditor * Editor;
-    rc_t RCt;
-
-    Editor = NULL;
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Editor = ( struct XFSDocFileEditor * ) self;
-
-    if ( Editor -> file == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KFileRead (
-                    Editor -> file,
-                    Offset,
-                    Buffer,
-                    SizeToRead,
-                    NumReaded
-                    );
-
-/* here may be debutt */
-
-    return RCt;
-}   /* _DocFile_read_v1 () */
-
-static
-rc_t CC
-_DocFile_size_v1 (
-                        const struct XFSFileEditor * self,
-                        uint64_t * Size
-)
-{
-    const struct XFSDocNode * Node;
-    uint64_t TempSize;
-    rc_t RCt;
-
-    Node = NULL;
-    TempSize = 0;
-    RCt = 0;
-
-    if ( Size == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Size = 0;
-
-    Node = ( const struct XFSDocNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> doc == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFSDocSize ( Node -> doc, & TempSize );
-    if ( RCt == 0 ) {
-        * Size = TempSize;
-    }
-
-    return RCt;
-}   /* _DocFile_size_v1 () */
-
-rc_t CC
-_DocNodeFile_v1 (
-            const struct XFSNode * self,
-            const struct XFSFileEditor ** File
-)
-{
-    rc_t RCt;
-    struct XFSDocFileEditor * FileEditor;
-    struct XFSFileEditor * Editor;
-
-    RCt = 0;
-    FileEditor = NULL;
-    Editor = NULL;
-
-    if ( self == NULL || File == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * File = NULL;
-
-    FileEditor = calloc ( 1, sizeof ( struct XFSDocFileEditor ) );
-    if ( FileEditor == NULL ) { 
-        return XFS_RC ( rcExhausted );
-    }
-
-    Editor = & ( FileEditor -> Papahen );
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _DocFile_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> open = _DocFile_open_v1;
-        Editor -> close = _DocFile_close_v1;
-        Editor -> read = _DocFile_read_v1;
-        Editor -> write = NULL;
-        Editor -> size = _DocFile_size_v1;
-        Editor -> set_size = NULL;
-
-        * File = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _DocNodeFile_v1 () */
-
-/*)))
- |||
- +++  Unified Attr
- |||
-(((*/
-
-static
-rc_t CC
-_DocAttr_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-    pLogMsg ( klogDebug, "_DocAttr_dispose_v1 ( node )", "node=%p", ( void * ) self );
-*/
-
-    if ( self != NULL ) {
-        free ( ( struct XFSAttrEditor * ) self );
-    }
-
-    return 0;
-}   /* _DocAttr_dispose_v1 () */
-
-/*))    Something unusual. Will check-initialize NativeDir and Node
- //     NativeDir and Node could be NULL
-((*/
-static
-rc_t CC
-_DocAttr_init_check_v1 (
-                    const struct XFSAttrEditor * self,
-                    const struct XFSDocNode ** Node
-
-)
-{
-    rc_t RCt;
-    const struct XFSDocNode * RetNode;
-
-    RCt = 0;
-    RetNode = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RetNode = ( const struct XFSDocNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-
-    if ( RetNode == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( RetNode -> doc == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( RCt == 0 ) {
-        if ( Node != NULL ) {
-            * Node = RetNode;
-        }
-    }
-
-    return RCt;
-}   /* _DocAttr_init_check_v1 () */
-
-static
-rc_t CC
-_DocAttr_permissions_v1 (
-                        const struct XFSAttrEditor * self,
-                        const char ** Permissions
-)
-{
-    const struct XFSDocNode * Node;
-    rc_t RCt;
-
-    Node = NULL;
-    RCt = 0;
-
-    if ( Permissions == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Permissions = NULL;
-
-    RCt = _DocAttr_init_check_v1 ( self, & Node );
-    if ( RCt == 0 ) {
-        if ( Node -> perm != NULL ) {
-            * Permissions = Node -> perm;
-        }
-        else {
-            * Permissions = XFSPermRODefNodeChar ();
-        }
-    }
-
-    return RCt;
-}   /* _DocAttr_permissions_v1 () */
-
-static
-rc_t CC
-_DocAttr_date_v1 (
-                        const struct XFSAttrEditor * self,
-                        KTime_t * Time
-)
-{
-    const struct XFSDocNode * Node;
-    rc_t RCt;
-
-    Node = NULL;
-    RCt = 0;
-
-    if ( Time == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Time = 0;
-
-    RCt = _DocAttr_init_check_v1 ( self, & Node );
-    if ( RCt == 0 ) {
-            /* TODO IMPORTANT - make time !!! */
-        * Time = 0;
-    }
-
-    return RCt;
-}   /* _DocAttr_date_v1 () */
-
-static
-rc_t CC
-_DocAttr_type_v1 (
-                        const struct XFSAttrEditor * self,
-                        XFSNType * Type
-)
-{
-    if ( Type == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Type = kxfsFile;
-
-    return 0;
-}   /* _DocAttr_type_v1 () */
-
-static
-rc_t CC
-_DocNodeAttr_v1 (
-            const struct XFSNode * self,
-            const struct XFSAttrEditor ** Attr
-)
-{
-    rc_t RCt;
-    struct XFSAttrEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-
-    if ( Attr != NULL ) {
-        * Attr = NULL;
-    }
-
-    if ( self == NULL || Attr == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Editor = calloc ( 1, sizeof ( struct XFSAttrEditor ) );
-    if ( Editor == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _DocAttr_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> permissions = _DocAttr_permissions_v1;
-        Editor -> set_permissions = NULL;
-        Editor -> date = _DocAttr_date_v1;
-        Editor -> set_date = NULL;
-        Editor -> type = _DocAttr_type_v1;
-
-        * Attr = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _DocNodeAttr_v1 () */
-
-/*)))
- |||
- +++  Unified Discribe
- |||
-(((*/
-
-rc_t CC
-_DocNodeDescribe_v1 (
-            const struct XFSNode * self,
-            char * Buffer,
-            size_t BufferSize
-)
-{
-    rc_t RCt;
-    size_t NumWrit;
-    const char * Abbr;
-
-    RCt = 0;
-    NumWrit = 0;
-    Abbr = "DOC FILE";
-
-    if ( Buffer == NULL || BufferSize == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self == NULL ) {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "DOCNODE (%s)[NULL][NULL]",
-                    Abbr
-                    );
-    }
-    else {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "DOCNODE (%s)[%s][0x%p]",
-                    Abbr,
-                    self -> Name,
-                    self
-                    );
-    }
-
-    return RCt;
-}   /* _DocNodeDescribe_v1 () */
-
diff --git a/libs/xfs/editors.c b/libs/xfs/editors.c
deleted file mode 100644
index 50db6a9..0000000
--- a/libs/xfs/editors.c
+++ /dev/null
@@ -1,491 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/container.h>
-#include <klib/refcount.h>
-#include <klib/namelist.h>
-
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/editors.h>
-
-#include "mehr.h"
-#include "zehr.h"
-
-#include <sysalloc.h>
-
-#include <string.h> /* memset () */
-
-/*)))
- |||
- +++    All about Editors, and other simple Editors
- |||
-(((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*)))   Editor ...
- (((*/
-LIB_EXPORT
-rc_t CC
-XFSEditorInit (
-            const struct XFSEditor * self,
-            const struct XFSNode * Node,
-            rc_t ( CC * dispose ) ( const struct XFSEditor * self )
-)
-{
-    rc_t RCt;
-    struct XFSEditor * Editor;
-
-    RCt = 0;
-    Editor = ( struct XFSEditor * ) self;
-
-    if ( Editor == NULL || Node == NULL || dispose == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = XFSNodeAddRef ( Node );
-    if ( RCt == 0 ) {
-
-        memset ( Editor, 0, sizeof ( struct XFSEditor ) );
-
-        Editor -> Node = Node;
-        Editor -> dispose = dispose;
-        Editor -> Data = NULL;
-    }
-
-    return RCt;
-}   /* XFSEditorInit () */
-
-LIB_EXPORT
-rc_t CC
-XFSEditorDispose ( const struct XFSEditor * self )
-{
-    struct XFSEditor * Editor;
-
-    Editor = ( struct XFSEditor * ) self;
-
-    if ( Editor == NULL ) {
-        return 0;
-    }
-
-    if ( Editor -> dispose == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Editor -> Node != NULL ) {
-        XFSNodeRelease ( Editor -> Node );
-
-        Editor -> Node = NULL;
-    }
-
-    return Editor -> dispose ( self );
-}   /* XFSEditorDispose () */
-
-LIB_EXPORT
-const struct XFSNode * CC
-XFSEditorNode ( const struct XFSEditor * self )
-{
-    return self == NULL ? NULL : ( self -> Node );
-}   /* XFSEditorNode () */
-
-LIB_EXPORT
-void * CC
-XFSEditorData ( const struct XFSEditor * self )
-{
-    return self == NULL ? self -> Data : NULL;
-}   /* XFSEditorData () */
-
-LIB_EXPORT
-rc_t CC
-XFSEditorSetData ( const struct XFSEditor * self, void * Data )
-{
-    XFS_CAN ( self )
-
-    ( ( struct XFSEditor * ) self ) -> Data = Data;
-
-    return 0;
-}   /* XFSEditorSetData () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*)))   EditorF ...
- (((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*)))   DirEditor ...
- (((*/
-
-LIB_EXPORT
-rc_t CC
-XFSDirEditorList (
-                const struct XFSDirEditor * self,
-                const struct KNamelist ** List
-)
-{
-    if ( self == NULL || List == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * List = NULL;
-
-    if ( self -> list != NULL ) {
-        return self -> list ( self, List );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSDirEditorList () */
-
-LIB_EXPORT
-rc_t CC
-XFSDirEditorFind (
-                const struct XFSDirEditor * self,
-                const char * Name,
-                const struct XFSNode ** Node
-)
-{
-    if ( self == NULL || Name == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Node = NULL;
-
-    if ( self -> find != NULL ) {
-        return self -> find ( self, Name, Node );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSDirEditorFind () */
-
-LIB_EXPORT
-rc_t CC
-XFSDirEditorCreate (
-                const struct XFSDirEditor * self,
-                const char * Name,
-                XFSNMode Mode,
-                const struct XFSHandle ** Handle
-)
-{
-    if ( self == NULL || Name == NULL || Handle == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Handle = NULL;
-
-    if ( self -> create_file != NULL ) {
-        return self -> create_file ( self, Name, Mode, Handle );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSDirEditorCreate () */
-
-LIB_EXPORT
-rc_t CC
-XFSDirEditorCreateDir (
-                const struct XFSDirEditor * self,
-                const char * Name
-)
-{
-    if ( self == NULL || Name == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> create_dir != NULL ) {
-        return self -> create_dir ( self, Name );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSDirEditorCreateDir () */
-
-LIB_EXPORT
-rc_t CC
-XFSDirEditorDelete (
-                const struct XFSDirEditor * self,
-                const char * Name
-)
-{
-    if ( self == NULL || Name == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> delete != NULL ) {
-        return self -> delete ( self, Name );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSDirEditorDelete () */
-
-LIB_EXPORT
-rc_t CC
-XFSDirEditorMove (
-                const struct XFSDirEditor * self,
-                const char * OldName,
-                const struct XFSNode * NewDir,
-                const char * NewName
-)
-{
-    if ( self == NULL || OldName == NULL
-        || NewDir == NULL || NewName == NULL
-    ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> move != NULL ) {
-        return self -> move ( self, OldName, NewDir, NewName );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSDirEditorMove () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*)))   FileEditor ...
- (((*/
-
-LIB_EXPORT
-rc_t CC
-XFSFileEditorOpen ( const struct XFSFileEditor * self, XFSNMode Mode )
-{
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> open != NULL ) {
-        return self -> open ( self, Mode );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSFileModeEditorOpen () */
-
-LIB_EXPORT
-rc_t CC
-XFSFileEditorClose ( const struct XFSFileEditor * self )
-{
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> close != NULL ) {
-        return self -> close ( self );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSFileEditorClose () */
-
-LIB_EXPORT
-rc_t CC
-XFSFileEditorRead (
-                const struct XFSFileEditor * self,
-                uint64_t Offset,
-                void * Buffer,
-                size_t SizeToRead,
-                size_t * NumReaded
-)
-{
-    if ( self == NULL || Buffer == NULL || NumReaded == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * NumReaded = 0;
-
-    if ( self -> read != NULL ) {
-        return self -> read (
-                            self,
-                            Offset,
-                            Buffer,
-                            SizeToRead,
-                            NumReaded
-                            );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSFileEditorRead () */
-
-LIB_EXPORT
-rc_t CC
-XFSFileEditorWrite (
-                const struct XFSFileEditor * self,
-                uint64_t Offset,
-                const void * Buffer,
-                size_t SizeToWrite,
-                size_t * NumWritten
-)
-{
-    if ( self == NULL || Buffer == NULL || NumWritten == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * NumWritten = 0;
-
-    if ( self -> write != NULL ) {
-        return self -> write (
-                            self,
-                            Offset,
-                            Buffer,
-                            SizeToWrite,
-                            NumWritten
-                            );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSFileEditorWrite () */
-
-LIB_EXPORT
-rc_t CC
-XFSFileEditorSize ( const struct XFSFileEditor * self, uint64_t * Size )
-{
-    if ( self == NULL || Size == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Size = 0;
-
-    if ( self -> size != NULL ) {
-        return self -> size ( self, Size );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSFileEditorSize () */
-
-LIB_EXPORT
-rc_t CC
-XFSFileEditorSetSize ( const struct XFSFileEditor * self, uint64_t Size )
-{
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> set_size != NULL ) {
-        return self -> set_size ( self, Size );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSFileEditorSetSize () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*)))   AttrEditor ...
- (((*/
-
-LIB_EXPORT
-rc_t CC
-XFSAttrEditorPermissions (
-                const struct XFSAttrEditor * self,
-                const char ** Permissions
-)
-{
-    if ( self == NULL || Permissions == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Permissions = NULL;
-
-    if ( self -> permissions != NULL ) {
-        return self -> permissions ( self, Permissions );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSAttrEditorPermissions () */
-
-LIB_EXPORT
-rc_t CC
-XFSAttrEditorSetPermissions (
-                const struct XFSAttrEditor * self,
-                const char * Permissions
-)
-{
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> set_permissions != NULL ) {
-        return self -> set_permissions ( self, Permissions );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSAttrEditorSetPermissions () */
-
-LIB_EXPORT
-rc_t CC
-XFSAttrEditorDate ( const struct XFSAttrEditor * self, KTime_t * Time )
-{
-    if ( self == NULL || Time == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Time = 0;
-
-    if ( self -> date != NULL ) {
-        return self -> date ( self, Time );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSAttrEditorDate () */
-
-LIB_EXPORT
-rc_t CC
-XFSAttrEditorSetDate ( const struct XFSAttrEditor * self, KTime_t Time )
-{
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> set_date != NULL ) {
-        return self -> set_date ( self, Time );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSAttrEditorSetDate () */
-
-LIB_EXPORT
-rc_t CC
-XFSAttrEditorType ( const struct XFSAttrEditor * self, XFSNType * Type )
-{
-    if ( self == NULL || Type == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Type = kxfsNotFound;
-
-    if ( self -> type != NULL ) {
-        return self -> type ( self, Type );
-    }
-
-    return XFS_RC ( rcUnsupported );
-}   /* XFSAttrEditorType () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
diff --git a/libs/xfs/encro.c b/libs/xfs/encro.c
deleted file mode 100644
index d1563a0..0000000
--- a/libs/xfs/encro.c
+++ /dev/null
@@ -1,875 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/path.h>
-#include <xfs/editors.h>
-#include <xfs/handle.h>
-#include <xfs/perm.h>
-
-#include "xencro.h"
-#include "mehr.h"
-#include "schwarzschraube.h"
-#include "teleport.h"
-#include "common.h"
-
-#include <sysalloc.h>
-
-#include <string.h>     /* memset */
-
-/*)))
- |||    That file contains XFSEncEntry based READ ONLY node
-(((*/
-
-/*)))
- |||
- +++    EncNode, and others
- |||
-(((*/
-struct XFSEncNode {
-    struct XFSNode node;
-
-    const struct XFSEncEntry * entry;
-};
-
-struct XFSEncFileEditor {
-    struct XFSFileEditor Papahen;
-
-    const struct XFSEncEntry * entry;
-};
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*                                                               *_*/
-/*_* EncNode is living here                                       *_*/
-/*_*                                                               *_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))
- |||
- +++    EncNode virtual table is Living here :lol:
- |||
-(((*/
-static rc_t CC _EncNodeFlavor_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _EncNodeDispose_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _EncNodeFindNode_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSPath * Path,
-                                uint32_t PathIndex,
-                                const struct XFSNode ** Node
-                                );
-static rc_t CC _EncNodeFile_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSFileEditor ** File
-                                );
-static rc_t CC _EncNodeAttr_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSAttrEditor ** Attr
-                                );
-static rc_t CC _EncNodeDescribe_v1 (
-                                const struct XFSNode * self,
-                                char * Buffer,
-                                size_t BufferSize
-                                );
-
-static const struct XFSNode_vt_v1 _sEncNodeVT_v1 = {
-                                        1, 1,   /* nin naj */
-                                        _EncNodeFlavor_v1,
-                                        _EncNodeDispose_v1,
-                                        _EncNodeFindNode_v1,
-                                        NULL,   /* No DIR */
-                                        _EncNodeFile_v1,
-                                        _EncNodeAttr_v1,
-                                        _EncNodeDescribe_v1
-                                        };
-
-
-static
-rc_t CC
-XFSEncNodeMake (
-    struct XFSNode ** Node,
-    const char * Name,
-    const struct XFSEncEntry * Entry
-)
-{
-    rc_t RCt;
-    struct XFSEncNode * xNode;
-
-    RCt = 0;
-    xNode = NULL;
-
-    XFS_CSAN ( Node )
-
-    XFS_CAN ( Node )
-    XFS_CAN ( Name )
-    XFS_CAN ( Entry )
-
-    xNode = calloc ( 1, sizeof ( struct XFSEncNode ) );
-    if ( xNode == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = XFSNodeInitVT (
-                    & ( xNode -> node ),
-                    Name,
-                    ( const union XFSNode_vt * ) & _sEncNodeVT_v1
-                    );
-
-    if ( RCt == 0 ) {
-        RCt = XFSEncEntryAddRef ( Entry );
-        if ( RCt == 0 ) {
-            xNode -> entry = Entry;
-
-            * Node = & ( xNode -> node );
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( xNode != NULL ) {
-            RCt = XFSNodeDispose ( & ( xNode -> node ) );
-        }
-    }
-
-    return RCt;
-}   /* XFSEncNodeMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSEncryptedFileNodeMake (
-                    struct XFSNode ** Node,
-                    const char * Name,
-                    const char * Path,
-                    const char * Passwd,
-                    const char * EncType
-)
-{
-    rc_t RCt;
-    const struct XFSEncEntry * Entry;
-    struct XFSNode * TheNode;
-
-    RCt = 0;
-    Entry = NULL;
-    TheNode = NULL;
-
-    XFS_CSAN ( Node )
-
-    XFS_CAN ( Name )
-    XFS_CAN ( Path )
-    XFS_CAN ( Passwd )
-    XFS_CAN ( Node )
-
-    RCt = XFSEncEntryFindOrCreate ( Path, Passwd, EncType, & Entry );
-    if ( RCt == 0 ) {
-        RCt = XFSEncNodeMake ( & TheNode, Name, Entry );
-        if ( RCt == 0 ) {
-            * Node = TheNode;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( TheNode );
-        }
-        else {
-            if ( Entry != NULL ) {
-                XFSEncEntryDispose ( Entry );
-            }
-        }
-    }
-
-    return RCt;
-}   /* XFSEncryptedFileNodeMake () */
-
-uint32_t CC
-_EncNodeFlavor_v1 ( const struct XFSNode * self )
-{
-    return _sFlavorOfEncode;
-}   /* _EncNodeFlavor_v1 () */
-
-static
-rc_t CC
-XFSEncNodeDispose ( const struct XFSEncNode * self )
-{
-    struct XFSEncNode * Node = ( struct XFSEncNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "XFSEncNodeDispose ( $(node) ) EN[$(entry)]", "node=%p,entry=%d", ( void * ) Node, ( Node == NULL ? 0 : Node -> entry ) );
-*/
-
-    if ( Node == 0 ) {
-        return 0;
-    }
-
-    if ( Node -> entry != NULL ) {
-        XFSEncEntryRelease ( Node -> entry );
-
-        Node -> entry = NULL;
-    }
-
-    free ( Node );
-
-    return 0;
-}   /* XFSEncNodeDispose () */
-
-rc_t CC
-_EncNodeDispose_v1 ( const struct XFSNode * self )
-{
-    return XFSEncNodeDispose ( ( const struct XFSEncNode * ) self );
-}   /* _EncNodeDispose_v1 () */
-
-/*)))
- |||
- +++  There are no find methods for encrypted files, cuz FILE
- |||
-(((*/
-rc_t CC
-_EncNodeFindNode_v1 (
-                    const struct XFSNode * self,
-                    const struct XFSPath * Path,
-                    uint32_t PathIndex,
-                    const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    uint32_t PathCount;
-    const char * NodeName;
-    bool IsLast;
-
-    RCt = 0;
-    PathCount = 0;
-    NodeName = NULL;
-    IsLast = false;
-
-    RCt = XFSNodeFindNodeCheckInitStandard (
-                                        self,
-                                        Path,
-                                        PathIndex,
-                                        Node,
-                                        & NodeName,
-                                        & PathCount,
-                                        & IsLast
-                                        );
-    if ( RCt == 0 ) {
-        if ( IsLast ) {
-            RCt = XFSNodeAddRef ( self );
-
-            * Node = self;
-        }
-    }
-
-    return RCt;
-}   /* _EncNodeFindNode () */
-
-/*)))
- |||
- +++  No Dir editor 
- |||
-(((*/
-
-/*)))
- |||
- +++  Unified FileEditor
- |||
-(((*/
-
-static
-rc_t CC
-_EncFile_dispose_v1 ( const struct XFSEditor * self )
-{
-    struct XFSEncFileEditor * Editor = ( struct XFSEncFileEditor * ) self;
-/*
-    pLogMsg ( klogDebug, "_EncNodeFile_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( Editor != NULL ) {
-        if ( Editor -> entry != NULL ) {
-            XFSEncEntryRelease ( Editor -> entry );
-
-            Editor -> entry = NULL;
-        }
-
-        free ( Editor );
-    }
-
-    return 0;
-}   /* _EncFile_dispose_v1 () */
-
-static
-rc_t CC
-_EncFile_open_v1 (
-                    const struct XFSFileEditor * self,
-                    XFSNMode Mode
-)
-{
-    rc_t RCt;
-    const struct XFSEncNode * Node;
-    struct XFSEncFileEditor * Editor;
-
-    RCt = 0;
-    Node = NULL;
-    Editor = ( struct XFSEncFileEditor * ) self;
-
-    if ( Mode != kxfsRead ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    XFS_CAN ( self )
-
-    Node = ( const struct XFSEncNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    XFS_CA ( Node, NULL )
-    XFS_CA ( Node -> entry, NULL )
-
-    Editor = ( struct XFSEncFileEditor * ) self;
-    if ( Editor -> entry == NULL ) {
-        if ( ! XFSEncEntryIsOpen ( Node -> entry ) ) {
-            RCt = XFSEncEntryOpen ( Node -> entry );
-        }
-        if ( RCt == 0 ) {
-            Editor -> entry = Node -> entry;
-        }
-    }
-
-    return RCt;
-}   /* _EncFile_open_v1 () */
-
-static
-rc_t CC
-_EncFile_close_v1 ( const struct XFSFileEditor * self )
-{
-    rc_t RCt;
-    struct XFSEncFileEditor * Editor;
-
-    RCt = 0;
-    Editor = ( struct XFSEncFileEditor * ) self;
-
-    XFS_CAN ( Editor )
-
-    if ( Editor -> entry != NULL ) {
-        RCt = XFSEncEntryClose ( Editor -> entry );
-        if ( RCt == 0 ) {
-            RCt = XFSEncEntryRelease ( Editor -> entry );
-
-            Editor -> entry = NULL;
-        }
-    }
-
-    return RCt;
-}   /* _EncFile_close_v1 () */
-
-static
-rc_t CC
-_EncFile_read_v1 (
-                    const struct XFSFileEditor * self,
-                    uint64_t Offset,
-                    void * Buffer,
-                    size_t SizeToRead,
-                    size_t * NumReaded
-)
-{
-    rc_t RCt;
-    struct XFSEncFileEditor * Editor;
-
-    RCt = 0;
-    Editor = ( struct XFSEncFileEditor * ) self;
-
-    XFS_CAN ( Editor )
-    XFS_CA ( Editor -> entry, NULL )
-
-
-    RCt = XFSEncEntryRead (
-                        Editor -> entry,
-                        Offset,
-                        Buffer,
-                        SizeToRead,
-                        NumReaded
-                        );
-
-    return RCt;
-}   /* _EncFile_read_v1 () */
-
-static
-rc_t CC
-_EncFile_size_v1 (
-                        const struct XFSFileEditor * self,
-                        uint64_t * Size
-)
-{
-    rc_t RCt;
-    struct XFSEncNode * Node;
-
-    RCt = 0;
-    Node = NULL;
-
-    XFS_CSA ( Size, 0 )
-    XFS_CAN ( Size )
-    XFS_CAN ( self )
-
-    Node = ( struct XFSEncNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-
-    XFS_CAN ( Node )
-    XFS_CAN ( Node -> entry )
-
-    RCt = XFSEncEntrySize ( Node -> entry, Size );
-    if ( RCt != 0 ) {
-        * Size = 0;
-    }
-
-    return RCt;
-}   /* _EncFile_size_v1 () */
-
-rc_t CC
-_EncNodeFile_v1 (
-            const struct XFSNode * self,
-            const struct XFSFileEditor ** File
-)
-{
-    rc_t RCt;
-    struct XFSEncFileEditor * FileEditor;
-    struct XFSFileEditor * Editor;
-
-    RCt = 0;
-    FileEditor = NULL;
-    Editor = NULL;
-
-    XFS_CSAN ( File )
-
-    XFS_CAN ( self )
-    XFS_CAN ( File )
-
-    FileEditor = calloc ( 1, sizeof ( struct XFSEncFileEditor ) );
-    if ( FileEditor == NULL ) { 
-        return XFS_RC ( rcExhausted );
-    }
-
-    memset ( FileEditor, 0, sizeof ( struct XFSEncFileEditor ) );
-
-    Editor = & ( FileEditor -> Papahen );
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _EncFile_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> open = _EncFile_open_v1;
-        Editor -> close = _EncFile_close_v1;
-        Editor -> read = _EncFile_read_v1;
-        Editor -> size = _EncFile_size_v1;
-
-        * File = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _EncNodeFile_v1 () */
-
-/*)))
- |||
- +++  Unified Attr
- |||
-(((*/
-
-static
-rc_t CC
-_EncAttr_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-    pLogMsg ( klogDebug, "_EncAttr_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( self != NULL ) {
-        free ( ( struct XFSAttrEditor * ) self );
-    }
-
-    return 0;
-}   /* _EncAttr_dispose_v1 () */
-
-static
-rc_t CC
-_EncAttr_init_check_v1 (
-                const struct XFSAttrEditor * self,
-                const struct XFSEncEntry ** Entry
-)
-{
-    struct XFSEncNode * Node = NULL;
-
-    XFS_CSAN ( Entry )
-
-    XFS_CAN ( self )
-    XFS_CAN ( Entry )
-
-
-    Node = ( struct XFSEncNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-
-    XFS_CA ( Node, NULL )
-    XFS_CA ( Node -> entry, NULL )
-
-    * Entry = Node -> entry;
-
-    return 0;
-}   /* _EncAttr_init_check_v1 () */
-
-static
-rc_t CC
-_EncAttr_permissions_v1 (
-                        const struct XFSAttrEditor * self,
-                        const char ** Permissions
-)
-{
-    rc_t RCt;
-    const struct XFSEncEntry * Entry;
-
-    RCt = 0;
-    Entry = NULL;
-
-    XFS_CSAN ( Permissions )
-    XFS_CAN ( Permissions )
-
-    RCt = _EncAttr_init_check_v1 ( self, & Entry );
-    if ( RCt == 0 ) {
-        * Permissions = XFSPermRODefNodeChar ();
-    }
-
-    return RCt;
-}   /* _EncAttr_permissions_v1 () */
-
-
-static
-rc_t CC
-_EncAttr_date_v1 (
-                        const struct XFSAttrEditor * self,
-                        KTime_t * Time
-)
-{
-    rc_t RCt;
-    const struct XFSEncEntry * Entry;
-
-    RCt = 0;
-    Entry = NULL;
-
-    XFS_CSA ( Time, 0 )
-    XFS_CAN ( Time )
-
-    RCt = _EncAttr_init_check_v1 ( self, & Entry );
-    if ( RCt == 0 ) {
-        RCt = XFSEncEntryTime ( Entry, Time );
-        if ( RCt != 0 ) {
-            * Time = 0;
-        }
-    }
-
-    return RCt;
-}   /* _EncAttr_date_v1 () */
-
-static
-rc_t CC
-_EncAttr_type_v1 (
-                        const struct XFSAttrEditor * self,
-                        XFSNType * Type
-)
-{
-    rc_t RCt;
-    const struct XFSEncEntry * Entry;
-
-    RCt = 0;
-    Entry = NULL;
-
-    XFS_CSA ( Type, kxfsNotFound )
-    XFS_CAN ( Type )
-
-    RCt = _EncAttr_init_check_v1 ( self, & Entry );
-    if ( RCt == 0 ) {
-        * Type = kxfsFile ;
-    }
-
-    return RCt;
-}   /* _EncAttr_type_v1 () */
-
-static
-rc_t CC
-_EncNodeAttr_v1 (
-            const struct XFSNode * self,
-            const struct XFSAttrEditor ** Attr
-)
-{
-    rc_t RCt;
-    struct XFSAttrEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-
-    XFS_CSAN ( Attr )
-
-    XFS_CAN ( self )
-    XFS_CAN ( Attr )
-
-    Editor = calloc ( 1, sizeof ( struct XFSAttrEditor ) );
-    if ( Editor == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _EncAttr_dispose_v1
-                    );
-    if ( RCt == 0 ) {
-        Editor -> permissions = _EncAttr_permissions_v1;
-        Editor -> date = _EncAttr_date_v1;
-        Editor -> type = _EncAttr_type_v1;
-
-        * Attr = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _EncNodeAttr_v1 () */
-
-/*)))
- |||
- +++  Unified Discribe
- |||
-(((*/
-
-rc_t CC
-_EncNodeDescribe_v1 (
-            const struct XFSNode * self,
-            char * Buffer,
-            size_t BufferSize
-)
-{
-    rc_t RCt;
-    size_t NumWrit;
-    const char * Abbr;
-
-    RCt = 0;
-    NumWrit = 0;
-    Abbr = NULL;
-
-    XFS_CAN ( Buffer )
-    XFS_CA ( BufferSize, 0 )
-
-    Abbr = "ENC NODE";
-
-    if ( self == NULL ) {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[NULL][NULL]",
-                    Abbr
-                    );
-    }
-    else {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[%s][0x%p]",
-                    Abbr,
-                    self -> Name,
-                    self
-                    );
-    }
-
-    return RCt;
-}   /* _EncNodeDescribe_v1 () */
-
-/*)))
- |||
- +++    FileNode lives here
- |||
-(((*/
-
-/*))
- ((     Node make/dispose
-  ))
- ((*/
-
-/*)))
- |||
- +++    Non-Teleport methods to create nodes
- |||
-(((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* ALL BELOW TODO!!!                                               */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*)))
- |||
- +++    EncNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_EncryptedFileNodeConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct XFSNode * TheNode;
-    const char * NodeName;
-
-    RCt = 0;
-    TheNode = NULL;
-    NodeName = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Model == NULL || Template == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    NodeName = Alias == NULL ? XFSModelNodeName ( Template ) : Alias;
-
-    RCt = XFSEncryptedFileNodeMake (
-                & TheNode,
-                NodeName,
-                XFSModelNodeProperty ( Template, XFS_MODEL_SOURCE ),
-                XFSModelNodeProperty ( Template, XFS_MODEL_PASSWD ),
-                XFSModelNodeProperty ( Template, XFS_MODEL_ENCTYPE )
-                );
-    if ( RCt == 0 ) {
-        * Node = ( struct XFSNode * ) TheNode;
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( TheNode != NULL ) {
-            XFSEncNodeDispose ( ( const struct XFSEncNode * ) TheNode );
-        }
-    }
-
-    return RCt;
-}   /* _EncryptedFileNodeConstructor () */
-
-/*)))
- |||
- +++    EncNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_EncryptedFileConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-
-    RCt = _EncryptedFileNodeConstructor (
-                                        Model,
-                                        Template,
-                                        Alias,
-                                        Node
-                                        );
-
-/*
-pLogMsg ( klogDebug, "_EncryptedFileConstructor ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _EncryptedFileConstructor () */
-
-static
-rc_t CC
-_EncryptedFileValidator (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            uint32_t Flags
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_EncryptedFileValidator ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _EncryptedFileValidator () */
-
-static const struct XFSTeleport _sEncryptedFileTeleport = {
-                                        _EncryptedFileConstructor,
-                                        _EncryptedFileValidator,
-                                        false
-                                        };
-
-
-LIB_EXPORT
-rc_t CC
-XFSEncryptedFileProvider ( const struct XFSTeleport ** Teleport )
-{
-    if ( Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = & _sEncryptedFileTeleport;
-
-    return 0;
-}   /* XFSEncryptedFileProvider () */
-
diff --git a/libs/xfs/encws.c b/libs/xfs/encws.c
deleted file mode 100644
index 071f063..0000000
--- a/libs/xfs/encws.c
+++ /dev/null
@@ -1,1793 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/path.h>
-#include <xfs/editors.h>
-#include <xfs/handle.h>
-#include <xfs/perm.h>
-
-#include "mehr.h"
-#include "schwarzschraube.h"
-#include "ncon.h"
-#include "teleport.h"
-#include "common.h"
-#include "xencws.h"
-
-#include <sysalloc.h>
-
-/*)))
- |||    That file contains 'native' KFile and KDirectory based nodes
- |||    Both nodes are implemented as _EncWsNode
- |||    That kind of node represent real path which exists in system
-(((*/
-
-/*)))
- |||
- +++    FileNode, and other simple containers
- |||
-(((*/
-struct _EncWsNode {
-    struct XFSNode node;
-
-    const struct KDirectory * workspace;
-    const char * path;      /* Path for object */
-    XFSNType type;          /* For optimizing goals only */
-};
-
-struct _EncWsFileEditor {
-    struct XFSFileEditor Papahen;
-
-    struct KFile * File;
-};
-
-struct _EncWsAttrEditor {
-    struct XFSAttrEditor Papahen;
-
-    char perm [ 16 ];     /* there we are storing 'const' object */
-};
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*                                                               *_*/
-/*_* EncWsNode is living here                                      *_*/
-/*_*                                                               *_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))
- |||
- +++    EncWsNode virtual table is Living here :lol:
- |||
-(((*/
-static rc_t CC _EncWsNodeFlavor_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _EncWsNodeDispose_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _EncWsFileNodeFindNode_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSPath * Path,
-                                uint32_t PathIndex,
-                                const struct XFSNode ** Node
-                                );
-static rc_t CC _EncWsDirNodeFindNode_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSPath * Path,
-                                uint32_t PathIndex,
-                                const struct XFSNode ** Node
-                                );
-static rc_t CC _EncWsNodeDir_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSDirEditor ** Dir
-                                );
-static rc_t CC _EncWsNodeFile_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSFileEditor ** File
-                                );
-static rc_t CC _EncWsNodeAttr_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSAttrEditor ** Attr
-                                );
-static rc_t CC _EncWsNodeDescribe_v1 (
-                                const struct XFSNode * self,
-                                char * Buffer,
-                                size_t BufferSize
-                                );
-
-static const struct XFSNode_vt_v1 _sEncWsFileNodeVT_v1 = {
-                                        1, 1,   /* nin naj */
-                                        _EncWsNodeFlavor_v1,
-                                        _EncWsNodeDispose_v1,
-                                        _EncWsFileNodeFindNode_v1,
-                                        NULL,   /* NO DIR */
-                                        _EncWsNodeFile_v1,
-                                        _EncWsNodeAttr_v1,
-                                        _EncWsNodeDescribe_v1
-                                        };
-
-static const struct XFSNode_vt_v1 _sEncWsDirNodeVT_v1 = {
-                                        1, 1,   /* nin naj */
-                                        _EncWsNodeFlavor_v1,
-                                        _EncWsNodeDispose_v1,
-                                        _EncWsDirNodeFindNode_v1,
-                                        _EncWsNodeDir_v1,
-                                        NULL,   /* NO FILE */
-                                        _EncWsNodeAttr_v1,
-                                        _EncWsNodeDescribe_v1
-                                        };
-
-static
-rc_t CC
-_EncWsNodeMake (
-            struct _EncWsNode ** Node,
-            const struct KDirectory * Workspace,
-            const char * Name,
-            const char * Path
-)
-{
-    rc_t RCt;
-    struct _EncWsNode * TheNode;
-    uint32_t Type;
-
-    RCt = 0;
-    TheNode = NULL;
-    Type = kptNotFound;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Node )
-    XFS_CAN ( Workspace )
-    XFS_CAN ( Name )
-
-        /* First we should check that object exist and has valid type
-         */
-    Type = KDirectoryPathType ( Workspace, Path );
-    switch ( Type ) {
-        case kptFile :
-        case kptDir :
-            break;
-        case kptNotFound :
-            return XFS_RC ( rcNotFound );
-        default :
-            return XFS_RC ( rcInvalid );
-    }
-
-    TheNode = calloc ( 1, sizeof ( struct _EncWsNode ) );
-    if ( TheNode == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = XFSNodeInitVT (
-                & ( TheNode -> node),
-                Name,
-                ( const union XFSNode_vt * ) ( Type == kptDir
-                                        ? ( & _sEncWsDirNodeVT_v1 )
-                                        : ( & _sEncWsFileNodeVT_v1 )
-                )
-                );
-        if ( RCt == 0 ) {
-            RCt = KDirectoryAddRef ( Workspace );
-            if ( RCt == 0 ) {
-                TheNode -> workspace = Workspace;
-
-                TheNode -> type = Type == kptDir ? kxfsDir : kxfsFile;
-
-                    /* This is duplicate, but necessary one
-                     */
-                TheNode -> node . vt = Type == kxfsDir
-                        ? ( ( const union XFSNode_vt * ) & _sEncWsDirNodeVT_v1 )
-                        : ( ( const union XFSNode_vt * ) & _sEncWsFileNodeVT_v1 )
-                        ;
-
-                RCt = XFS_StrDup ( Path, & ( TheNode -> path ) );
-                if ( RCt == 0 ) {
-                    * Node = TheNode;
-                }
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( & ( TheNode -> node ) );
-            TheNode = NULL;
-        }
-    }
-
-/*
-pLogMsg ( klogDebug, "_EncWsNodeMake ND[$(node)] NM[$(name)] TP[$(type)]", "node=%p,name=%s,type=%d", ( void * ) TheNode, Name, Type );
-*/
-
-    return RCt;
-}   /* _EncWsNodeMake () */
-
-uint32_t CC
-_EncWsNodeFlavor_v1 ( const struct XFSNode * self )
-{
-    return _sFlavorOfWorkspace;
-}   /* _EncWsNodeFlavor_v1 () */
-
-static
-rc_t CC
-_EncWsNodeDispose ( const struct _EncWsNode * self )
-{
-    struct _EncWsNode * Node = ( struct _EncWsNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "_EncWsNodeDispose ND[$(node)] TP[$(type)]", "node=%p,type=%d", ( void * ) Node, ( Node == NULL ? 0 : Node -> type ) );
-*/
-
-    if ( Node == 0 ) {
-        return 0;
-    }
-
-    if ( Node -> workspace != NULL ) {
-        KDirectoryRelease ( Node -> workspace );
-        Node -> workspace = NULL;
-    }
-
-    if ( Node -> path != NULL ) {
-        free ( ( char * ) Node -> path );
-        Node -> path = NULL;
-    }
-
-    Node -> type = 0;
-
-    free ( Node );
-
-    return 0;
-}   /* _EncWsNodeDispose () */
-
-rc_t CC
-_EncWsNodeDispose_v1 ( const struct XFSNode * self )
-{
-    return _EncWsNodeDispose ( ( struct _EncWsNode * ) self );
-}   /* _EncWsNodeDispose_v1 () */
-
-/*)))
- |||
- +++  There will be two methods to find node: for KDir and for KFile
- |||
-(((*/
-
-/*)) KFile version
- ((*/
-rc_t CC
-_EncWsFileNodeFindNode_v1 (
-            const struct XFSNode * self,
-            const struct XFSPath * Path,
-            uint32_t PathIndex,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    uint32_t PathCount;
-    const char * NodeName;
-    bool IsLast;
-
-    RCt = 0;
-    PathCount = 0;
-    NodeName = NULL;
-    IsLast = false;
-
-    RCt = XFSNodeFindNodeCheckInitStandard (
-                                            self,
-                                            Path,
-                                            PathIndex,
-                                            Node,
-                                            & NodeName,
-                                            & PathCount,
-                                            & IsLast
-                                            );
-    if ( RCt == 0 ) {
-        if ( IsLast ) {
-            RCt = XFSNodeAddRef ( self );
-
-            * Node = self;
-        }
-    }
-
-
-    return RCt;
-}   /* _EncWsFileNodeFindNode () */
-
-/*)) KDir version
- ((*/
-rc_t CC
-_EncWsDirNodeFindNode_v1 (
-            const struct XFSNode * self,
-            const struct XFSPath * Path,
-            uint32_t PathIndex,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    uint32_t PathCount;
-    const char * NodeName;
-    char PathBuf [ XFS_SIZE_4096 ];
-    size_t PathBufLen;
-    struct _EncWsNode * EncWsNode;
-    const struct XFSPath * xPath;
-    bool IsLast;
-
-    RCt = 0;
-    PathCount = 0;
-    NodeName = NULL;
-    * PathBuf = 0;
-    PathBufLen = 0;
-    EncWsNode = NULL;
-    xPath = NULL;
-    IsLast = false;
-
-    RCt = XFSNodeFindNodeCheckInitStandard (
-                                            self,
-                                            Path,
-                                            PathIndex,
-                                            Node,
-                                            & NodeName,
-                                            & PathCount,
-                                            & IsLast
-                                            );
-    if ( RCt == 0 ) {
-        if ( IsLast ) {
-            RCt = XFSNodeAddRef ( self );
-
-            * Node = self;
-
-            return RCt;
-        }
-
-        EncWsNode = ( struct _EncWsNode * ) self;
-        if ( EncWsNode -> path == NULL ) {
-            return XFS_RC ( rcInvalid );
-        }
-
-        if ( EncWsNode -> workspace == NULL ) {
-            return XFS_RC ( rcInvalid );
-        }
-
-        PathBufLen = string_copy_measure (
-                                        PathBuf,
-                                        sizeof ( PathBuf ),
-                                        EncWsNode -> path
-                                        );
-        * ( PathBuf + PathBufLen ) = '/';
-            /*) Here we are trying to create new node
-             (*/
-        RCt = XFSPathFrom ( Path, PathIndex + 1, & xPath );
-        if ( RCt == 0 ) {
-            if ( string_copy (
-                        PathBuf + PathBufLen + 1,
-                        sizeof ( PathBuf ) - PathBufLen,
-                        XFSPathGet ( xPath ),
-                        string_size ( XFSPathGet ( xPath ) )
-                        ) != string_size ( XFSPathGet ( xPath ) ) ) {
-
-                RCt = XFS_RC ( rcInvalid );
-            }
-            XFSPathRelease ( xPath );
-        }
-        if ( RCt == 0 ) {
-            RCt = _EncWsNodeMake (
-                                & EncWsNode,
-                                EncWsNode -> workspace,
-                                XFSPathName ( Path ),
-                                PathBuf
-                                );
-            if ( RCt == 0 ) {
-                * Node = & ( EncWsNode -> node );
-            }
-        }
-    }
-
-
-    return RCt;
-}   /* _EncWsDirNodeFindNode () */
-
-/*)))
- |||
- +++  Unified DirEditor
- |||
-(((*/
-static
-rc_t CC
-_EncWsDir_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-    pLogMsg ( klogDebug, "_EncWsDir_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( self != NULL ) {
-        free ( ( struct XFSDirEditor * ) self );
-    }
-
-    return 0;
-}   /* _EncWsDir_dispose_v1 () */
-
-static
-rc_t CC
-_EncWsDir_list_v1 (
-                const struct XFSDirEditor * self,
-                const struct KNamelist ** List
-)
-{
-    const struct _EncWsNode * Node;
-    struct KNamelist * TempList;
-    rc_t RCt;
-
-    RCt = 0;
-    Node = NULL;
-    TempList = NULL;
-
-    if ( self == NULL || List == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * List = NULL;
-
-    Node = ( const struct _EncWsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> workspace == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> type != kxfsDir ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KDirectoryList (
-                        Node -> workspace,
-                        & TempList,
-                        NULL, /* Filter Func */
-                        NULL, /* Filter Data */
-                        Node -> path
-                        );
-    if ( RCt == 0 ) {
-        * List = TempList;
-    }
-    else {
-        if ( TempList != NULL ) {
-            KNamelistRelease ( TempList );
-        }
-    }
-
-    return RCt;
-}   /* _EncWsDir_list_v1 () */
-
-static
-rc_t CC
-_EncWsDir_find_v1 (
-                const struct XFSDirEditor * self,
-                const char * Name,
-                const struct XFSNode ** Node
-)
-{
-    const struct _EncWsNode * EncWsNode;
-    struct _EncWsNode * TempNode;
-    char FullPath [ XFS_SIZE_4096 ];
-    size_t NumWrit;
-    rc_t RCt;
-
-    RCt = 0;
-    EncWsNode = NULL;
-    TempNode = NULL;
-    NumWrit = 0;
-    * FullPath = 0;
-
-    if ( self == NULL || Name == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Node = NULL;
-
-    EncWsNode = ( const struct _EncWsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( EncWsNode == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( EncWsNode -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( EncWsNode -> workspace == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = string_printf (
-                        FullPath,
-                        sizeof ( FullPath ),
-                        & NumWrit,
-                        "%s/%s",
-                        EncWsNode -> path,
-                        Name
-                        );
-    if ( RCt == 0 ) {
-        RCt = _EncWsNodeMake (
-                            & TempNode,
-                            EncWsNode -> workspace,
-                            Name,
-                            FullPath
-                            );
-        if ( RCt == 0 ) {
-            * Node = ( const struct XFSNode * ) TempNode;
-        }
-    }
-
-    return RCt;
-}   /* _EncWsDir_find_v1 () */
-
-static
-rc_t CC
-_EncWsDir_create_file_v1 (
-                const struct XFSDirEditor * self,
-                const char * Name,
-                XFSNMode Mode,
-                const struct XFSHandle ** Handle
-)
-{
-    struct KFile * File;
-    bool Update;
-    KCreateMode CreateMode;
-    char Path [ XFS_SIZE_4096 ];
-    struct _EncWsNode * EncWsNode, * TempNode;
-    struct _EncWsFileEditor * FileEditor;
-    const struct XFSHandle * TempHandle;
-    size_t NumWritten;
-    uint32_t NodeMode;
-    rc_t RCt;
-
-    File = NULL;
-    Update = false;
-    CreateMode = kcmCreate;
-    * Path = 0;
-    EncWsNode = TempNode = NULL;
-    FileEditor = NULL;
-    TempHandle = NULL;
-    NumWritten = 0;
-    NodeMode = 0;
-    RCt = 0;
-
-    if ( self == NULL || Name == NULL || Handle == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Handle = NULL;
-
-    EncWsNode = ( struct _EncWsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( EncWsNode -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( EncWsNode -> workspace == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = string_printf (
-                        Path,
-                        sizeof ( Path ),
-                        & NumWritten,
-                        "%s/%s",
-                        EncWsNode -> path,
-                        Name
-                        );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    Update = Mode == kxfsReadWrite;
-    CreateMode = kcmCreate;
-
-    NodeMode = ( Mode == kxfsReadWrite || Mode == kxfsWrite )
-                                                ? XFSPermRWDefNodeNum ()
-                                                : XFSPermRODefNodeNum ()
-                                                ;
-
-        /* Here we are */
-    RCt = KDirectoryCreateFile (
-                            ( struct KDirectory * ) EncWsNode -> workspace,
-                            & File, 
-                            Update,
-                            NodeMode,
-                            CreateMode,
-                            Path
-                            );
-    if ( RCt == 0 ) {
-        RCt = _EncWsNodeMake (
-                            & TempNode,
-                            EncWsNode -> workspace,
-                            Name,
-                            Path
-                            );
-        if ( RCt == 0 ) {
-            RCt = XFSNodeFileEditor (
-                                & ( TempNode -> node ),
-                                ( const struct XFSFileEditor ** ) & FileEditor
-                                );
-            if ( RCt == 0 ) {
-                FileEditor -> File = File;
-                RCt = XFSHandleMake (
-                                & ( TempNode -> node ),
-                                & TempHandle
-                                );
-                if ( RCt == 0 ) {
-                    XFSHandleSet ( TempHandle, FileEditor );
-
-                    * Handle = TempHandle;
-                }
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Handle = NULL;
-
-        if ( TempHandle != NULL ) {
-            XFSHandleRelease ( TempHandle );
-        }
-        else {
-            if ( FileEditor != NULL ) {
-                XFSEditorDispose ( ( const struct XFSEditor * ) FileEditor );
-            }
-        }
-
-        if ( File != NULL ) {
-            KFileRelease ( File );
-        }
-    }
-
-    return RCt;
-}   /* _EncWsDir_create_file_v1 () */
-
-static
-rc_t CC
-_EncWsDir_create_dir_v1 (
-                const struct XFSDirEditor * self,
-                const char * Name
-)
-{
-    rc_t RCt;
-    struct _EncWsNode * EncWsNode;
-    char Path [ XFS_SIZE_4096 ];
-    size_t NumWritten;
-
-    RCt = 0;
-    EncWsNode = NULL;
-    * Path = 0;
-    NumWritten = 0;
-
-    if ( self == NULL || Name == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    EncWsNode = ( struct _EncWsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( EncWsNode -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( EncWsNode -> workspace == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = string_printf (
-                        Path,
-                        sizeof ( Path ),
-                        & NumWritten,
-                        "%s/%s",
-                        EncWsNode -> path,
-                        Name
-                        );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    return KDirectoryCreateDir (
-                        ( struct KDirectory * ) EncWsNode -> workspace,
-                        XFSPermRWDefContNum (),
-                        kcmCreate,
-                        Path
-                        );
-}   /* _EncWsDir_create_dir_v1 () */
-
-static
-rc_t CC
-_EncWsDir_delete_v1 (
-                const struct XFSDirEditor * self,
-                const char * Name
-)
-{
-    rc_t RCt;
-    struct _EncWsNode * EncWsNode;
-    char Path [ XFS_SIZE_4096 ];
-    size_t NumWritten;
-
-    RCt = 0;
-    EncWsNode = NULL;
-    * Path = 0;
-    NumWritten = 0;
-
-    if ( self == NULL || Name == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    EncWsNode = ( struct _EncWsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( EncWsNode -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( EncWsNode -> workspace == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = string_printf (
-                        Path,
-                        sizeof ( Path ),
-                        & NumWritten,
-                        "%s/%s",
-                        EncWsNode -> path,
-                        Name
-                        );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    return KDirectoryRemove (
-                        ( struct KDirectory * ) EncWsNode -> workspace,
-                        true,
-                        Path
-                        );
-}   /* _EncWsDir_delete_v1 () */
-
-rc_t CC
-_EncWsDir_move_v1 (
-            const struct XFSDirEditor * self,
-            const char * OldName,
-            const struct XFSNode * NewDir,
-            const char * NewName
-)
-{
-    rc_t RCt;
-    struct _EncWsNode * EncWsNode;
-    struct _EncWsNode * NewEncWsNode;
-    char OldPath [ XFS_SIZE_4096 ];
-    char NewPath [ XFS_SIZE_4096 ];
-    size_t NumWritten;
-
-    RCt = 0;
-    EncWsNode = NULL;
-    NewEncWsNode = NULL;
-    * OldPath = * NewPath = 0;
-    NumWritten = 0;
-
-    if ( self == NULL || OldName == NULL || NewDir == NULL
-        || NewName == NULL
-    ) {
-        return XFS_RC ( rcNull );
-    }
-
-        /*) TODO it is temporary, until we will do
-         (*/
-    if ( XFSNodeFlavor ( NewDir ) !=
-            XFSNodeFlavor ( ( self -> Papahen ) . Node ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    EncWsNode = ( struct _EncWsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( EncWsNode -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( EncWsNode -> workspace == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    NewEncWsNode = ( struct _EncWsNode * ) NewDir;
-
-    if ( NewEncWsNode -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( NewEncWsNode -> workspace == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = string_printf (
-                        OldPath,
-                        sizeof ( OldPath ),
-                        & NumWritten,
-                        "%s/%s",
-                        EncWsNode -> path,
-                        OldName
-                        );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    RCt = string_printf (
-                        NewPath,
-                        sizeof ( NewPath ),
-                        & NumWritten,
-                        "%s/%s",
-                        NewEncWsNode -> path,
-                        NewName
-                        );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    return KDirectoryRename (
-                        ( struct KDirectory * ) EncWsNode -> workspace,
-                        true,
-                        OldPath,
-                        NewPath
-                        );
-}   /* _EncWsDir_move_v1 () */
-
-rc_t CC
-_EncWsNodeDir_v1 (
-            const struct XFSNode * self,
-            const struct XFSDirEditor ** Dir
-)
-{
-    rc_t RCt;
-    struct XFSDirEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-
-    if ( self == NULL || Dir == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Dir = NULL;
-
-    if ( ( ( struct _EncWsNode * ) self ) -> type != kxfsDir ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Editor = calloc ( 1, sizeof ( struct XFSDirEditor ) );
-    if ( Editor == NULL ) { 
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _EncWsDir_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> list = _EncWsDir_list_v1;
-        Editor -> find = _EncWsDir_find_v1;
-        Editor -> create_file = _EncWsDir_create_file_v1;
-        Editor -> create_dir = _EncWsDir_create_dir_v1;
-        Editor -> delete = _EncWsDir_delete_v1;
-        Editor -> move = _EncWsDir_move_v1;
-
-        * Dir = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _EncWsNodeDir_v1 () */
-
-/*)))
- |||
- +++  Unified FileEditor
- |||
-(((*/
-
-static
-rc_t CC
-_EncWsFile_dispose_v1 ( const struct XFSEditor * self )
-{
-    struct _EncWsFileEditor * Editor = ( struct _EncWsFileEditor * ) self;
-
-/*
-    pLogMsg ( klogDebug, "_EncWsFile_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( Editor != NULL ) {
-        if ( Editor -> File != NULL ) {
-            KFileRelease ( Editor -> File );
-
-            Editor -> File = NULL;
-        }
-
-        free ( Editor );
-    }
-
-    return 0;
-}   /* _EncWsFile_dispose_v1 () */
-
-static
-rc_t CC
-_EncWsFile_open_v1 (
-                    const struct XFSFileEditor * self,
-                    XFSNMode Mode
-)
-{
-    KFile * File;
-    const struct _EncWsNode * Node;
-    rc_t RCt;
-
-    File = NULL;
-    Node = NULL;
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Node = ( const struct _EncWsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> type != kxfsFile ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> workspace == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Mode == kxfsRead ) {
-        RCt = KDirectoryOpenFileRead (
-                            ( struct KDirectory * ) Node -> workspace,
-                            ( const KFile ** ) & File,
-                            Node -> path
-                            );
-    }
-    else {
-        RCt = KDirectoryOpenFileWrite (
-                            ( struct KDirectory * ) Node -> workspace,
-                            & File,
-                            ( Mode & kxfsRead ) == kxfsRead,
-                            Node -> path
-                            );
-    }
-    if ( RCt == 0 ) {
-        ( ( struct _EncWsFileEditor * ) self ) -> File = File;
-    }
-
-    return RCt;
-}   /* _EncWsFile_open_v1 () */
-
-static
-rc_t CC
-_EncWsFile_close_v1 ( const struct XFSFileEditor * self )
-{
-    struct _EncWsFileEditor * Editor;
-    rc_t RCt;
-
-    Editor = NULL;
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-
-    Editor = ( struct _EncWsFileEditor * ) self;
-
-    if ( Editor -> File != NULL ) {
-        RCt = KFileRelease ( Editor -> File );
-
-        Editor -> File = NULL;
-    }
-
-    return RCt;
-}   /* _EncWsFile_close_v1 () */
-
-static
-rc_t CC
-_EncWsFile_read_v1 (
-                    const struct XFSFileEditor * self,
-                    uint64_t Offset,
-                    void * Buffer,
-                    size_t SizeToRead,
-                    size_t * NumReaded
-)
-{
-    struct _EncWsFileEditor * Editor;
-    rc_t RCt;
-
-    Editor = NULL;
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Editor = ( struct _EncWsFileEditor * ) self;
-
-    if ( Editor -> File == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KFileReadAll (
-                    Editor -> File,
-                    Offset,
-                    Buffer,
-                    SizeToRead,
-                    NumReaded
-                    );
-
-/* here may be debutt */
-
-    return RCt;
-}   /* _EncWsFile_read_v1 () */
-
-static
-rc_t CC
-_EncWsFile_write_v1 (
-                    const struct XFSFileEditor * self,
-                    uint64_t Offset,
-                    const void * Buffer,
-                    size_t SizeToWrite,
-                    size_t * NumWritten
-)
-{
-    struct _EncWsFileEditor * Editor;
-    rc_t RCt;
-
-    Editor = NULL;
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Editor = ( struct _EncWsFileEditor * ) self;
-
-    if ( Editor -> File == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KFileWriteAll (
-                    Editor -> File,
-                    Offset,
-                    Buffer,
-                    SizeToWrite,
-                    NumWritten
-                    );
-
-    return RCt;
-}   /* _EncWsFile_write_v1 () */
-
-static
-rc_t CC
-_EncWsFile_size_v1 (
-                        const struct XFSFileEditor * self,
-                        uint64_t * Size
-)
-{
-    const struct _EncWsNode * Node;
-    const struct KFile * File;
-    uint64_t TempSize;
-    rc_t RCt;
-
-    Node = NULL;
-    File = NULL;
-    TempSize = 0;
-    RCt = 0;
-
-    XFS_CSA ( Size, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Size )
-
-    Node = ( const struct _EncWsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-
-    XFS_CAN ( Node )
-    XFS_CAN ( Node -> path )
-    XFS_CAN ( Node -> workspace )
-
-    if ( Node -> type == kxfsDir ) {
-            /*) Traditionally directory have size ZERO :lol:
-             (*/
-        * Size = 0;
-    }
-    else {
-        File = ( const struct KFile * )
-                        ( ( struct _EncWsFileEditor * ) self ) -> File;
-        if ( File == NULL ) {
-            RCt = KDirectoryFileSize (
-                                Node -> workspace,
-                                & TempSize,
-                                Node -> path
-                                );
-
-        }
-        else {
-            RCt = KFileSize ( File, & TempSize );
-        }
-
-        if ( RCt == 0 ) {
-            * Size = TempSize;
-        }
-    }
-
-    return RCt;
-}   /* _EncWsFile_size_v1 () */
-
-static
-rc_t CC
-_EncWsFile_set_size_v1 (
-                const struct XFSFileEditor * self,
-                uint64_t Size
-)
-{
-    rc_t RCt;
-    const struct _EncWsNode * Node;
-    struct KFile * File;
-
-    RCt = 0;
-    Node = NULL;
-
-    XFS_CAN ( self );
-
-    Node = ( const struct _EncWsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-
-    XFS_CAN ( Node )
-    XFS_CAN ( Node -> path )
-    XFS_CAN ( Node -> workspace )
-
-    if ( Node -> type != kxfsDir ) {
-        File = ( struct KFile * )
-                        ( ( struct _EncWsFileEditor * ) self ) -> File;
-        if ( File == NULL ) {
-            RCt = KDirectorySetFileSize (
-                            ( struct KDirectory * ) Node -> workspace,
-                            Size,
-                            Node -> path
-                            );
-        }
-        else {
-            RCt = KFileSetSize ( File, Size );
-        }
-    }
-
-    return RCt;
-}   /*  _EncWsFile_set_size_v1 () */
-
-rc_t CC
-_EncWsNodeFile_v1 (
-            const struct XFSNode * self,
-            const struct XFSFileEditor ** File
-)
-{
-    rc_t RCt;
-    struct _EncWsFileEditor * FileEditor;
-    struct XFSFileEditor * Editor;
-
-    RCt = 0;
-    FileEditor = NULL;
-    Editor = NULL;
-
-    if ( self == NULL || File == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * File = NULL;
-
-    if ( ( ( struct _EncWsNode * ) self ) -> type != kxfsFile ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    FileEditor = calloc ( 1, sizeof ( struct _EncWsFileEditor ) );
-    if ( FileEditor == NULL ) { 
-        return XFS_RC ( rcExhausted );
-    }
-
-    Editor = & ( FileEditor -> Papahen );
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _EncWsFile_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> open = _EncWsFile_open_v1;
-        Editor -> close = _EncWsFile_close_v1;
-        Editor -> read = _EncWsFile_read_v1;
-        Editor -> write = _EncWsFile_write_v1;
-        Editor -> size = _EncWsFile_size_v1;
-        Editor -> set_size = _EncWsFile_set_size_v1;
-
-        * File = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _EncWsNodeFile_v1 () */
-
-/*)))
- |||
- +++  Unified Attr
- |||
-(((*/
-
-static
-rc_t CC
-_EncWsAttr_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-    pLogMsg ( klogDebug, "_EncWsAttr_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( self != NULL ) {
-        free ( ( struct _EncWsAttrEditor * ) self );
-    }
-
-    return 0;
-}   /* _EncWsAttr_dispose_v1 () */
-
-/*))    Something unusual. Will check-initialize NativeDir and Node
- //     NativeDir and Node could be NULL
-((*/
-static
-rc_t CC
-_EncWsAttr_init_check_v1 (
-                    const struct XFSAttrEditor * self,
-                    const struct _EncWsNode ** Node,
-                    struct KDirectory ** Workspace
-
-)
-{
-    const struct _EncWsNode * RetNode = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CSAN ( Workspace )
-    XFS_CAN ( self )
-
-    RetNode = ( const struct _EncWsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-
-    if ( RetNode -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( RetNode -> workspace == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node != NULL ) {
-        * Node = RetNode;
-    }
-
-    if ( Workspace != NULL ) {
-        * Workspace = ( struct KDirectory * ) RetNode -> workspace;
-    }
-
-    return 0;
-}   /* _EncWsAttr_init_check_v1 () */
-
-static
-rc_t CC
-_EncWsAttr_permissions_v1 (
-                        const struct XFSAttrEditor * self,
-                        const char ** Permissions
-)
-{
-    const struct _EncWsNode * Node;
-    KDirectory * Workspace;
-    uint32_t Access;
-    char * BF;
-    rc_t RCt;
-
-    Node = NULL;
-    Workspace = NULL;
-    BF = NULL;
-    RCt = 0;
-
-    if ( Permissions == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Permissions = NULL;
-
-    RCt = _EncWsAttr_init_check_v1 ( self, & Node, & Workspace );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryAccess ( Workspace, & Access, Node -> path );
-        if ( RCt == 0 ) {
-            BF = ( ( struct _EncWsAttrEditor * ) self ) -> perm;
-            RCt = XFSPermToChar (
-                                Access,
-                                BF,
-                                sizeof ( ( ( struct _EncWsAttrEditor * ) self ) -> perm )
-                                );
-            if ( RCt == 0 ) {
-                if ( Node -> type == kxfsDir ) {
-                    BF [ 0 ] = 'r';
-                    BF [ 2 ] = 'x';
-                }
-
-                * Permissions = ( const char * ) BF;
-            }
-        }
-    }
-
-    return RCt;
-}   /* _EncWsAttr_permissions_v1 () */
-
-static
-rc_t CC
-_EncWsAttr_set_permissions_v1 (
-                        const struct XFSAttrEditor * self,
-                        const char * Permissions
-)
-{
-    rc_t RCt;
-    const struct _EncWsNode * Node;
-    struct KDirectory * Workspace;
-    uint32_t Access;
-
-    RCt = 0;
-    Workspace = NULL;
-    Node = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Permissions )
-
-    if ( Permissions == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = _EncWsAttr_init_check_v1 ( self, & Node, & Workspace );
-    if ( RCt == 0 ) {
-        RCt = XFSPermToNum ( Permissions, & Access );
-        if ( RCt == 0 ) {
-            RCt = KDirectorySetAccess (
-                                    Workspace,
-                                    false,
-                                    Access,
-                                    Access,
-                                    Node -> path
-                                    );
-
-        }
-    }
-
-    return RCt;
-}   /*  _EncWsAttr_set_permissions_v1 () */
-
-static
-rc_t CC
-_EncWsAttr_date_v1 (
-                        const struct XFSAttrEditor * self,
-                        KTime_t * Time
-)
-{
-    const struct _EncWsNode * Node;
-    struct KDirectory * Workspace;
-    KTime_t TempTime;
-    rc_t RCt;
-
-    Node = NULL;
-    Workspace = NULL;
-    TempTime = 0;
-    RCt = 0;
-
-    XFS_CSA ( Time, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Time )
-
-    RCt = _EncWsAttr_init_check_v1 ( self, & Node, & Workspace );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryDate ( Workspace, & TempTime, Node -> path );
-        if ( RCt == 0 ) {
-            * Time = TempTime;
-        }
-    }
-
-    return RCt;
-}   /* _EncWsAttr_date_v1 () */
-
-static
-rc_t CC
-_EncWsAttr_set_date_v1 (
-                const struct XFSAttrEditor * self,
-                KTime_t Time
-)
-{
-    rc_t RCt;
-    const struct _EncWsNode * Node;
-    struct KDirectory * Workspace;
-
-    RCt = 0;
-    Workspace = NULL;
-    Node = NULL;
-
-    XFS_CAN ( self )
-
-    RCt = _EncWsAttr_init_check_v1 ( self, & Node, & Workspace );
-    if ( RCt == 0 ) {
-        RCt = KDirectorySetDate ( Workspace, true, Time, Node -> path );
-    }
-
-    return RCt;
-}   /*  _EncWsAttr_set_date_v1 () */
-
-static
-rc_t CC
-_EncWsAttr_type_v1 (
-                        const struct XFSAttrEditor * self,
-                        XFSNType * Type
-)
-{
-    const struct _EncWsNode * Node;
-    rc_t RCt;
-
-    Node = NULL;
-    RCt = 0;
-
-    XFS_CSA ( Type, kxfsFile )
-    XFS_CAN ( Type )
-
-    RCt = _EncWsAttr_init_check_v1 ( self, & Node, NULL );
-    if ( RCt == 0 ) {
-        * Type = Node -> type;
-    }
-
-    return RCt;
-}   /* _EncWsAttr_type_v1 () */
-
-static
-rc_t CC
-_EncWsNodeAttr_v1 (
-            const struct XFSNode * self,
-            const struct XFSAttrEditor ** Attr
-)
-{
-    rc_t RCt;
-    struct _EncWsAttrEditor * EncWsEditor;
-    struct XFSAttrEditor * Editor;
-
-    RCt = 0;
-    EncWsEditor = NULL;
-    Editor = NULL;
-
-    XFS_CSAN ( Attr )
-    XFS_CAN ( self )
-    XFS_CAN ( Attr )
-
-    EncWsEditor = calloc ( 1, sizeof ( struct _EncWsAttrEditor ) );
-    if ( EncWsEditor == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    Editor = & ( EncWsEditor -> Papahen );
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _EncWsAttr_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> permissions = _EncWsAttr_permissions_v1;
-        Editor -> set_permissions = _EncWsAttr_set_permissions_v1;
-        Editor -> date = _EncWsAttr_date_v1;
-        Editor -> set_date = _EncWsAttr_set_date_v1;
-        Editor -> type = _EncWsAttr_type_v1;
-
-        * Attr = Editor;
-    }
-    else {
-        free ( EncWsEditor );
-    }
-
-    return RCt;
-}   /* _EncWsNodeAttr_v1 () */
-
-/*)))
- |||
- +++  Unified Discribe
- |||
-(((*/
-
-rc_t CC
-_EncWsNodeDescribe_v1 (
-            const struct XFSNode * self,
-            char * Buffer,
-            size_t BufferSize
-)
-{
-    rc_t RCt;
-    size_t NumWrit;
-    const char * Abbr;
-
-    RCt = 0;
-    NumWrit = 0;
-    Abbr = NULL;
-
-    if ( Buffer == NULL || BufferSize == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Abbr = ( ( const struct _EncWsNode * ) self ) -> type == kxfsDir
-            ? "ENC DIR"
-            : "ENC FILE"
-            ;
-
-    if ( self == NULL ) {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[NULL][NULL]",
-                    Abbr
-                    );
-    }
-    else {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[%s][0x%p]",
-                    Abbr,
-                    self -> Name,
-                    self
-                    );
-    }
-
-    return RCt;
-}   /* _EncWsNodeDescribe_v1 () */
-
-/*)))
- |||
- +++    WorkspaceNode lives here
- |||
-(((*/
-
-/*))
- ((     Node make/dispose
-  ))
- ((*/
-static
-rc_t CC
-_EncWsNodeConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct _EncWsNode * TheNode;
-    const struct KDirectory * Workspace;
-    const char * NodeName;
-
-    RCt = 0;
-    TheNode = NULL;
-    Workspace = NULL;
-    NodeName = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Model )
-    XFS_CAN ( Template )
-    XFS_CAN ( Node )
-
-    * Node = NULL;
-
-    NodeName = Alias == NULL ? XFSModelNodeName ( Template ) : Alias;
-
-        /* First we should find valid Workspace Directory 
-         */
-    RCt = XFSEncDirectoryOpen (
-                & Workspace,
-                ! XFSModelNodeReadOnly ( Template ),
-                XFSModelNodeProperty ( Template, XFS_MODEL_PASSWD ),
-                XFSModelNodeProperty ( Template, XFS_MODEL_ENCTYPE ),
-                XFSModelNodeProperty ( Template, XFS_MODEL_SOURCE )
-                );
-
-    if ( RCt == 0 ) {
-        RCt = _EncWsNodeMake (
-                    & TheNode,
-                    Workspace,
-                    NodeName,
-                    XFSModelNodeProperty ( Template, XFS_MODEL_SOURCE )
-                    );
-        if ( RCt == 0 ) {
-            * Node = ( struct XFSNode * ) TheNode;
-        }
-
-        KDirectoryRelease ( Workspace );
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( TheNode != NULL ) {
-            _EncWsNodeDispose ( TheNode );
-        }
-    }
-
-    return RCt;
-}   /* _EncWsNodeConstructor () */
-
-/*)))
- |||
- +++    Non-Teleport methods to create nodes
- |||
-(((*/
-LIB_EXPORT
-rc_t CC
-XFSWorkspaceNodeMake (
-            struct XFSNode ** Node,
-            const char * Name,
-            const char * Path,
-            const char * Password,
-            const char * EncType,
-            bool ReadOnly
-)
-{
-    rc_t RCt;
-    struct _EncWsNode * TheNode;
-    const struct KDirectory * Workspace;
-
-    RCt = 0;
-    TheNode = NULL;
-    Workspace = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Name )
-    XFS_CAN ( Path )
-    XFS_CAN ( Password )
-    XFS_CAN ( Node )
-
-    RCt = XFSEncDirectoryOpen (
-                            & Workspace,
-                            ! ReadOnly,
-                            Password,
-                            EncType,
-                            Path
-                            );
-    if ( RCt == 0 ) {
-        RCt = _EncWsNodeMake ( & TheNode, Workspace, Name, Path );
-        if ( RCt == 0 ) {
-            * Node = & ( TheNode -> node );
-        }
-
-        KDirectoryRelease ( Workspace );
-    }
-
-    return RCt;
-}   /* XFSWorkspaceNodeMake () */
-
-/*)))
- |||
- +++    FileNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_WorkspaceNodeConstructor (
-                        const struct XFSModel * Model,
-                        const struct XFSModelNode * Template,
-                        const char * Alias,
-                        const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-
-    RCt = _EncWsNodeConstructor ( Model, Template, Alias, Node );
-
-/*
-pLogMsg ( klogDebug, "_WorkspaceNodeConstructor ( $(model), $(template) (\"name\"), \"alias\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _WorkspaceNodeConstructor () */
-
-static
-rc_t CC
-_WorkspaceNodeValidator (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            uint32_t Flags
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_WorkspaceNodeValidator ( $(model), $(template) (\"name\"), \"alias\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _WorkspaceNodeValidator () */
-
-static const struct XFSTeleport _sWorkspaceNodeTeleport = {
-                                            _WorkspaceNodeConstructor,
-                                            _WorkspaceNodeValidator,
-                                            false
-                                            };
-
-
-LIB_EXPORT
-rc_t CC
-XFSWorkspaceProvider ( const struct XFSTeleport ** Teleport )
-{
-    if ( Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = & _sWorkspaceNodeTeleport;
-
-    return 0;
-}   /* XFSWorkspaceProvider () */
-
diff --git a/libs/xfs/foo.c b/libs/xfs/foo.c
deleted file mode 100644
index 613b482..0000000
--- a/libs/xfs/foo.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/editors.h>
-#include <xfs/perm.h>
-#include <xfs/doc.h>
-
-#include "mehr.h"
-#include "zehr.h"
-#include "ncon.h"
-#include "teleport.h"
-#include "common.h"
-
-#include <sysalloc.h>
-
-/*)))
- |||
- +++    FooNode, and other vicitims
- |||
-(((*/
-
-/*)))
- |||
- +++    FooNode lives here
- |||
-(((*/
-
-/*))
- ((     Node make/dispose
-  ))
- ((*/
-
-static
-rc_t CC
-_FooNodeMake ( struct XFSNode ** Foo, const char * NodeName )
-{
-    rc_t RCt;
-    struct XFSDoc * Doc;
-    struct XFSNode * TheFoo;
-
-    RCt = 0;
-    TheFoo = NULL;
-
-    if ( Foo != NULL ) {
-        * Foo = NULL;
-    }
-
-    if ( Foo == NULL || NodeName == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = XFSTextDocMake ( & Doc );
-    if ( RCt == 0 ) {
-        RCt = XFSTextDocAppend ( Doc, "FOO FILE: placeholder for not implemented node type\n\n" );
-        if ( RCt  == 0 ) {
-            RCt = XFSDocNodeMakeWithFlavor (
-                                        & TheFoo,
-                                        Doc,
-                                        NodeName,
-                                        XFSPermRODefNodeChar (),
-                                        _sFlavorOfFoo
-                                        );
-            if ( RCt == 0 ) {
-                * Foo = TheFoo;
-            }
-            else {
-                if ( TheFoo != NULL ) {
-                    XFSNodeDispose ( TheFoo );
-                }
-            }
-        }
-
-        XFSDocRelease ( Doc );
-    }
-
-/*
-pLogMsg ( klogDebug, "_FooNodeMake ND[$(node)] NM[$(name)]", "node=%p,name=%s", ( void * ) TheFoo, NodeName );
-*/
-
-    return RCt;
-}   /* _FooNodeMake () */
-
-static
-rc_t CC
-_FooNodeDispose ( const struct XFSNode * self )
-{
-    struct XFSNode * Foo = ( struct XFSNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "_FooNodeDispose ( $(node) )", "node=%p", ( void * ) Foo );
-*/
-
-    if ( Foo == NULL ) {
-        return 0;
-    }
-
-    XFSNodeDispose ( Foo );
-
-    return 0;
-}   /* _FooNodeDispose () */
-
-/*)))
- |||
- +++    FooNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_FooNodeConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct XFSNode * TheNode;
-    const char * NodeName;
-
-    RCt = 0;
-    TheNode = NULL;
-    NodeName = NULL;
-
-    if ( Model == NULL || Template == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Node = NULL;
-
-    NodeName = Alias == NULL ? XFSModelNodeName ( Template ) : Alias;
-
-    RCt = _FooNodeMake ( & TheNode, NodeName );
-    if ( RCt == 0 ) {
-        /* TODO Copy Security */
-
-        * Node = ( struct XFSNode * ) TheNode;
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        _FooNodeDispose ( TheNode );
-    }
-
-/*
-pLogMsg ( klogDebug, "_FooNodeConstructor ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )\n", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _FooNodeConstructor () */
-
-static
-rc_t CC
-_FooNodeValidator (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            uint32_t Flags
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_FooNodeValidator ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )\n", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _FooNodeValidator () */
-
-static const struct XFSTeleport _sFooNodeTeleport = {
-                                        _FooNodeConstructor,
-                                        _FooNodeValidator,
-                                        false
-                                        };
-
-
-LIB_EXPORT
-rc_t CC
-XFSFooNodeProvider ( const struct XFSTeleport ** Teleport )
-{
-    if ( Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = & _sFooNodeTeleport;
-
-    return 0;
-}   /* XFSFooNodeProvider () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))
- ///    And there are dummies for TeleportProviders
-(((*/
-LIB_EXPORT
-rc_t CC
-XFSCacheProvider ( const struct XFSTeleport ** Teleport )
-{
-    return XFSFooNodeProvider ( Teleport );
-}   /* XFSCacheProvider () */
-
-LIB_EXPORT
-rc_t CC
-XFSLinkProvider ( const struct XFSTeleport ** Teleport )
-{
-    return XFSFooNodeProvider ( Teleport );
-}
-
-LIB_EXPORT
-rc_t CC
-XFSLocalRepositoryProvider ( const struct XFSTeleport ** Teleport )
-{
-    return XFSFooNodeProvider ( Teleport );
-}
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
diff --git a/libs/xfs/gap.c b/libs/xfs/gap.c
deleted file mode 100644
index cf36d54..0000000
--- a/libs/xfs/gap.c
+++ /dev/null
@@ -1,585 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-#include <kfg/kart.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/path.h>
-#include <xfs/editors.h>
-#include <xfs/perm.h>
-#include <xfs/doc.h>
-
-#include "mehr.h"
-#include "schwarzschraube.h"
-#include "ncon.h"
-#include "teleport.h"
-#include "common.h"
-#include "contnode.h"
-#include "xgap.h"
-
-#include <sysalloc.h>
-
-#include <string.h>     /* memset */
-
-/*)))
- |||    That is second approach for dbGaP project node
- |||    That node contains 3 statically linked nodes :
- |||        Cached ( SRA and FILES )
- |||        Karts
- |||        WorkSpace
- |||
-(((*/
-
-/*)))
- |||
- +++    _GapProjectNode
- |||
-(((*/
-
-struct _GapProjectNode {
-    struct XFSContNode node;
-
-    uint32_t project_id;
-    bool read_only;
-
-    const char * kart_files;
-};
-
-static
-rc_t CC
-_GapProjectNodeDispose ( struct XFSContNode * self )
-{
-    struct _GapProjectNode * Node =
-                                ( struct _GapProjectNode * ) self;
-
-    if ( Node != NULL ) {
-        if ( Node -> kart_files != NULL ) {
-            free ( ( char * ) Node -> kart_files );
-            Node -> kart_files = NULL;
-        }
-
-        Node -> project_id = 0;
-        Node -> read_only = true;
-
-        free ( Node );
-    }
-
-    return 0;
-}   /* _GapProjectNodeDispose () */
-
-static
-rc_t CC
-_GapProjectNodeMake (
-            struct _GapProjectNode ** Node,
-            const char * Name,
-            uint32_t ProjectId,
-            bool ReadOnly,
-            const char * Perm
-)
-{
-    rc_t RCt;
-    struct _GapProjectNode * GapNode;
-
-    RCt = 0;
-    GapNode = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Node )
-    XFS_CAN ( Name )
-
-    GapNode = calloc ( 1, sizeof ( struct _GapProjectNode ) );
-    if ( GapNode == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = XFSContNodeInit (
-                            & ( GapNode -> node . node ),
-                            Name,
-                            Perm,
-                            _sFlavorOfGapProject,
-                            _GapProjectNodeDispose
-                            );
-        if ( RCt == 0 ) {
-            if ( RCt == 0 ) {
-                GapNode -> project_id = ProjectId;
-                GapNode -> read_only = ReadOnly;
-
-                * Node = GapNode;
-            }
-        }
-    }
-
-    return RCt;
-}   /* _GapProjectNodeMake () */
-
-static
-rc_t CC
-_PrepareWorkspace (
-                uint32_t ProjectId,
-                char ** Workspace,
-                const char ** Password
-)
-{
-    rc_t RCt;
-    const struct XFSGapProject * Project;
-    char * WorkspaceDir;
-    const char * ThePass;
-    size_t ThePassSize;
-    struct KDirectory * NatDir;
-    uint32_t PathType;
-
-    RCt = 0;
-    Project = NULL;
-    WorkspaceDir = NULL;
-    ThePass = NULL;
-    ThePassSize = 0;
-    NatDir = NULL;
-    PathType = kptNotFound;
-
-    RCt = XFSGapFindOrCreate ( ProjectId, & Project );
-    if ( RCt == 0 ) {
-
-        RCt = XFSGapProjectWorkspace ( Project, & WorkspaceDir );
-        if ( RCt == 0 ) {
-            RCt = XFSGapProjectPassword (
-                                        Project,
-                                        & ThePass,
-                                        & ThePassSize
-                                        );
-
-            if ( RCt == 0 ) {
-                RCt = KDirectoryNativeDir ( & NatDir );
-                if ( RCt == 0 ) {
-                    PathType = KDirectoryPathType ( NatDir, WorkspaceDir );
-
-                    switch ( PathType ) {
-                        case kptNotFound :
-                            RCt = KDirectoryCreateDir (
-                                                    NatDir,
-                                                    0777,
-                                                    kcmCreate,
-                                                    WorkspaceDir
-                                                    );
-                            if ( RCt == 0 ) {
-                                * Workspace = WorkspaceDir;
-                                * Password = ThePass;
-                            }
-                            break;
-                        case kptDir :
-                            * Workspace = WorkspaceDir;
-                            * Password = ThePass;
-                            break;
-                        default :
-                            RCt = XFS_RC ( rcInvalid );
-                            break;
-                    }
-
-                    KDirectoryRelease ( NatDir );
-                }
-            }
-        }
-
-        XFSGapProjectRelease ( Project );
-    }
-
-    if ( RCt != 0 ) {
-        * Workspace = NULL;
-        * Password = NULL;
-
-        if ( WorkspaceDir != NULL ) {
-            free ( WorkspaceDir );
-        }
-    }
-
-    return RCt;
-}   /* _PrepareWorkspace () */
-
-static
-rc_t CC
-_GapProjectNodeAddChildren ( struct _GapProjectNode * self )
-{
-    rc_t RCt;
-    struct XFSNode * TheNode;
-    char * Workspace;
-    const char * Password;
-
-    RCt = 0;
-    TheNode = NULL;
-    Workspace = NULL;
-    Password = NULL;
-
-    XFS_CAN ( self );
-
-        /* There are three children: Cache, Karts and WS ...
-           and may be Bublic cache too.
-         */
-
-        /* Workspace is here
-         * TODO: password, location, etc ...
-         */
-    RCt = _PrepareWorkspace (
-                            self -> project_id,
-                            & Workspace,
-                            & Password
-                            );
-    if ( RCt == 0 ) {
-
-        RCt = XFSWorkspaceNodeMake (
-                                & TheNode,
-                                "workspace",
-                                Workspace,
-                                Password,
-                                NULL,
-                                self -> read_only
-                                );
-        if ( RCt == 0 ) {
-            RCt = XFSContNodeAddChild (
-                                    & ( self -> node ) . node,
-                                    TheNode
-                                    );
-        }
-
-        free ( Workspace );
-    }
-    else {
-/* TODO - use approved output method
-*/
-pLogErr ( klogErr, RCt, "ERROR: Can not find definition of Project $(project_id) in config file", "project_id=%d", self -> project_id );
-    }
-
-    if ( RCt != 0 ) {
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( TheNode );
-        }
-        return RCt;
-    }
-
-        /* Here is cache related to project
-         */
-    RCt = XFSGapCacheNodeMake (
-                        & TheNode,
-                        self -> project_id,     /* projectId */
-                        NULL                    /* perm is automatic */
-                        );
-    if ( RCt == 0 ) {
-        RCt = XFSContNodeAddChild ( & ( self -> node ) . node, TheNode );
-    }
-    else {
-/* TODO - use approved output method
-*/
-pLogErr ( klogErr, RCt, "ERROR: Can not find definition of Project $(project_id) in config file", "project_id=%d", self -> project_id );
-    }
-    if ( RCt != 0 ) {
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( TheNode );
-        }
-        return RCt;
-    }
-
-        /* Here is public cache 
-         */
-    RCt = XFSGapCacheNodeMake (
-                        & TheNode,
-                        XFS_PUBLIC_PROJECT_ID,  /* projectId */
-                        NULL                    /* perm is automatic */
-                        );
-    if ( RCt == 0 ) {
-        RCt = XFSContNodeAddChild ( & ( self -> node ) . node, TheNode );
-    }
-    else {
-        RCt = 0;
-/* TODO - use approved output method
-*/
-LogMsg ( klogWarn, "Can not find definition for 'public' area in config file" );
-    }
-
-    if ( RCt != 0 ) {
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( TheNode );
-        }
-        return RCt;
-    }
-
-    RCt = XFSGapKartFilesNodeMake ( & TheNode, NULL );
-    if ( RCt == 0 ) {
-        RCt = XFSContNodeAddChild ( & ( self -> node ) . node, TheNode );
-    }
-    if ( RCt != 0 ) {
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( TheNode );
-        }
-        return RCt;
-    }
-
-    RCt = XFSGapKartsNodeMake (
-                            & TheNode,
-                            self -> project_id,
-                            NULL
-                            );
-    if ( RCt == 0 ) {
-        RCt = XFSContNodeAddChild ( & ( self -> node ) . node, TheNode );
-    }
-    if ( RCt != 0 ) {
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( TheNode );
-        }
-        return RCt;
-    }
-
-    return RCt;
-}   /* _GapProjectNodeAddChildren () */
-
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectNodeMake (
-            struct XFSNode ** Node,
-            const char * Name,
-            uint32_t ProjectId,
-            bool ReadOnly,
-            const char * Perm
-)
-{
-    rc_t RCt;
-    struct _GapProjectNode * GapNode;
-
-    RCt = 0;
-    GapNode = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Node )
-    XFS_CAN ( Name )
-
-    RCt = _GapProjectNodeMake (
-                                & GapNode,
-                                Name,
-                                ProjectId,
-                                ReadOnly,
-                                Perm
-                                );
-    if ( RCt == 0 ) {
-        RCt = _GapProjectNodeAddChildren ( GapNode );
-        if ( RCt == 0 ) {
-            * Node = & ( GapNode -> node . node );
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( GapNode != NULL ) {
-            XFSNodeDispose ( & ( GapNode -> node . node ) );
-            GapNode = NULL;
-        }
-    }
-
-/*
-pLogMsg ( klogDebug, "_GapNodeMake ND[$(node)] NM[$(name)] PJ[$(project_id)]", "node=%p,name=%s,project_id=%d", ( void * ) Node, Name, ( GapNode == NULL ? 0 : GapNode -> project_id ) );
-*/
-    return RCt;
-}   /* XFSGapProjectNodeMake () */
-
-/*)))
- |||
- +++  There GapNode Find
- |||
-(((*/
-
-/*)))
- |||
- +++  There KartItemNode Find
- |||
-(((*/
-
-/*)))
- |||
- +++  Unified DirEditor
- |||
-(((*/
-
-/*)))
- |||
- +++  Unified Discribe
- |||
-(((*/
-
-/*)))
- |||
- +++    FileNode lives here
- |||
-(((*/
-
-/*))
- ((     Node make/dispose
-  ))
- ((*/
-
-static
-rc_t CC
-_GapProjectNodeConstructorEx (
-                        const struct XFSModel * Model,
-                        const struct XFSModelNode * Template,
-                        const char * Alias,
-                        XFSNType Type,
-                        const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct _GapProjectNode * TheNode;
-    const char * NodeName;
-    const char * TempStr;
-    uint32_t ProjectId;
-
-    RCt = 0;
-    TheNode = NULL;
-    NodeName = NULL;
-    TempStr = NULL;
-    ProjectId = 0;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Model )
-    XFS_CAN ( Template )
-    XFS_CAN ( Node )
-
-    NodeName = Alias == NULL ? XFSModelNodeName ( Template ) : Alias;
-
-    TempStr = XFSModelNodeProperty ( Template, XFS_MODEL_PROJECTID );
-    if ( TempStr == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    ProjectId = atol ( TempStr );
-    if ( ProjectId == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = _GapProjectNodeMake (
-                                & TheNode,
-                                NodeName,
-                                ProjectId,
-                                XFSModelNodeReadOnly ( Template ),
-                                XFSModelNodeSecurity ( Template )
-                                );
-    if ( RCt == 0 ) {
-        RCt = _GapProjectNodeAddChildren ( TheNode );
-        if ( RCt == 0 ) {
-            * Node = & ( TheNode -> node . node );
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( & ( TheNode -> node . node ) );
-
-            TheNode = NULL;
-        }
-    }
-
-    return RCt;
-}   /* _GapProjectNodeConstructorEx () */
-
-/*)))
- |||
- +++    FileNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_GapProjectNodeConstructor (
-                        const struct XFSModel * Model,
-                        const struct XFSModelNode * Template,
-                        const char * Alias,
-                        const struct XFSNode ** Node
-)
-{
-    rc_t RCt = 0;
-
-    RCt = _GapProjectNodeConstructorEx (
-                                        Model,
-                                        Template,
-                                        Alias,
-                                        kxfsFile,
-                                        Node
-                                        );
-/*
-pLogMsg ( klogDebug, "_GapProjectNodeConstructor ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-
-    return RCt;
-}   /* _GapProjectNodeConstructor () */
-
-static
-rc_t CC
-_GapProjectNodeValidator (
-                        const struct XFSModel * Model,
-                        const struct XFSModelNode * Template,
-                        const char * Alias,
-                        uint32_t Flags
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_GapProjectNodeValidator ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _GapProjectNodeValidator () */
-
-static const struct XFSTeleport _sGapProjectNodeTeleport = {
-                                        _GapProjectNodeConstructor,
-                                        _GapProjectNodeValidator,
-                                        false
-                                        };
-
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectProvider ( const struct XFSTeleport ** Teleport )
-{
-    if ( Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = & _sGapProjectNodeTeleport;
-
-    return 0;
-}   /* XFSGapProjectProvider () */
diff --git a/libs/xfs/gapc.c b/libs/xfs/gapc.c
deleted file mode 100644
index 80c7da3..0000000
--- a/libs/xfs/gapc.c
+++ /dev/null
@@ -1,993 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/path.h>
-#include <xfs/editors.h>
-#include <xfs/handle.h>
-#include <xfs/perm.h>
-
-#include "mehr.h"
-#include "schwarzschraube.h"
-#include "teleport.h"
-#include "common.h"
-#include "xgap.h"
-
-#include <sysalloc.h>
-
-/*)))
- |||    That file contains third approach to project GAP cached
- |||    private and public files
-(((*/
-
-/*)))
- |||
- +++    XFSCacheDirNode, and other simple containers
- |||
-(((*/
-#define XFS_GAP_PUBLIC_CACHE_NAME "public"
-#define XFS_GAP_CACHE_NAME "cache"
-
-struct _CacheDirNode {
-    struct XFSNode node;
-
-    uint32_t project_id; /* GaP project Id */
-    const char * path;   /* Path for object */
-    const char * perm;   /* Permissions in format "rwxrwxrwx u:g:o" */
-};
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*                                                               *_*/
-/*_* CacheDirNode is living here                                   *_*/
-/*_*                                                               *_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))
- |||
- +++    CacheDirNode virtual table is Living here :lol:
- |||
-(((*/
-static rc_t CC _CacheDirNodeFlavor_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _CacheDirNodeDispose_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _CacheDirNodeFindNode_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSPath * Path,
-                                uint32_t PathIndex,
-                                const struct XFSNode ** Node
-                                );
-static rc_t CC _CacheDirNodeDir_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSDirEditor ** Dir
-                                );
-static rc_t CC _CacheDirNodeAttr_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSAttrEditor ** Attr
-                                );
-static rc_t CC _CacheDirNodeDescribe_v1 (
-                                const struct XFSNode * self,
-                                char * Buffer,
-                                size_t BufferSize
-                                );
-
-static const struct XFSNode_vt_v1 _sCacheDirNodeVT_v1 = {
-                                        1, 1,   /* nin naj */
-                                        _CacheDirNodeFlavor_v1,
-                                        _CacheDirNodeDispose_v1,
-                                        _CacheDirNodeFindNode_v1,
-                                        _CacheDirNodeDir_v1,
-                                        NULL,   /* NO FILE */
-                                        _CacheDirNodeAttr_v1,
-                                        _CacheDirNodeDescribe_v1
-                                        };
-
-static
-rc_t CC
-_GapCacheGetPath ( const char ** CachePath, uint32_t ProjectId )
-{
-    rc_t RCt;
-    const struct XFSGapProject * Project;
-    char * RepositoryRoot;
-
-    RCt = 0;
-    Project = NULL;
-    RepositoryRoot = NULL;
-
-    XFS_CSAN ( CachePath )
-    XFS_CAN ( CachePath )
-
-    RCt = XFSGapFindOrCreate ( ProjectId, & Project );
-    if ( RCt == 0 ) {
-        RCt = XFSGapProjectRepositoryRoot ( Project, & RepositoryRoot );
-        if ( RCt == 0 ) {
-            * CachePath = RepositoryRoot;
-        }
-        XFSGapProjectRelease ( Project );
-    }
-
-    return RCt;
-}   /* _GapCacheGetPath () */
-
-static
-rc_t CC
-_CacheDirNodeMake (
-            struct _CacheDirNode ** Node,
-            const char * Path,
-            const char * Name,
-            const char * Perm
-)
-{
-    rc_t RCt;
-    struct _CacheDirNode * TheNode;
-
-    RCt = 0;
-    TheNode = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Node )
-    XFS_CAN ( Name )
-    XFS_CAN ( Path )
-
-    TheNode = calloc ( 1, sizeof ( struct _CacheDirNode ) );
-    if ( TheNode == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = XFSNodeInitVT (
-                & ( TheNode -> node),
-                Name,
-                ( const union XFSNode_vt * ) ( & _sCacheDirNodeVT_v1 )
-                );
-        if ( RCt == 0 ) {
-
-            RCt = XFS_StrDup ( Path, & ( TheNode -> path ) );
-            if ( RCt == 0 ) {
-                if ( Perm != NULL ) {
-                    RCt = XFS_StrDup ( Perm, & ( TheNode -> perm ) );
-                }
-                if ( RCt == 0 ) {
-                    * Node = TheNode;
-                }
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Node = TheNode;
-
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( & ( TheNode -> node ) );
-            TheNode = NULL;
-        }
-    }
-
-    return RCt;
-}   /* _CacheDirNodeMake () */
-
-uint32_t CC
-_CacheDirNodeFlavor_v1 ( const struct XFSNode * self )
-{
-    if ( self != NULL ) {
-        return ( ( struct _CacheDirNode * ) self ) -> project_id == 0
-                                            ? _sFlavorOfGapPublicCache
-                                            : _sFlavorOfGapProjectCache
-                                            ;
-    }
-    return _sFlavorLess;
-}   /* _CacheDirNodeFlavor_v1 () */
-
-static
-rc_t CC
-_CacheDirNodeDispose ( const struct _CacheDirNode * self )
-{
-    struct _CacheDirNode * Node = ( struct _CacheDirNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "_CacheDirNodeDispose ( $(node) ) [T=$(project_id)]", "node=%p,project_id=%d", ( void * ) Node, ( Node == NULL ? 0 : Node -> project_id ) );
-*/
-
-    if ( Node != 0 ) {
-        if ( Node -> perm != NULL ) {
-            free ( ( char * ) Node -> perm );
-            Node -> perm = NULL;
-        }
-
-        if ( Node -> path != NULL ) {
-            free ( ( char * ) Node -> path );
-            Node -> path = NULL;
-        }
-
-        Node -> project_id = 0;
-
-        free ( Node );
-    }
-
-    return 0;
-}   /* _CacheDirNodeDispose () */
-
-rc_t CC
-_CacheDirNodeDispose_v1 ( const struct XFSNode * self )
-{
-    return _CacheDirNodeDispose ( ( struct _CacheDirNode * ) self );
-}   /* _KfsNodeDispose_v1 () */
-
-/*)))
- |||
- +++  Find operation
- |||
-(((*/
-
-static
-rc_t CC
-_CacheDirNodeForPath (
-                    const struct XFSNode ** Node,
-                    const char * Path,
-                    const char * Name,
-                    uint32_t ProjectId
-)
-{
-    rc_t RCt;
-    const struct XFSPath * xPath;
-    struct KDirectory * NativeDir;
-    uint32_t Type;
-    struct XFSNode * TheNode;
-
-    RCt = 0;
-    xPath = NULL;
-    NativeDir = NULL;
-    Type = kptNotFound;
-    TheNode = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Path )
-    XFS_CAN ( Name )
-    XFS_CAN ( Node )
-
-    RCt = XFSPathMake ( & xPath, true, "%s/%s", Path, Name );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryNativeDir ( & NativeDir );
-        if ( RCt == 0 ) {
-            Type = KDirectoryPathType (
-                                    NativeDir,
-                                    XFSPathGet ( xPath )
-                                    );
-            switch ( Type ) {
-                case kptFile :
-                        RCt = XFSFileNodeMake (
-                                            & TheNode,
-                                            XFSPathGet ( xPath ),
-                                            XFSPathName ( xPath ),
-                                            NULL
-                                            );
-                        break;
-                case kptDir :
-                        _CacheDirNodeMake (
-                                ( struct _CacheDirNode **  ) & TheNode,
-                                XFSPathGet ( xPath ),
-                                XFSPathName ( xPath ),
-                                NULL
-                                );
-                        ( ( struct _CacheDirNode * ) TheNode ) -> project_id = ProjectId;
-                        break;
-                default :
-                        RCt = XFS_RC ( rcInvalid );
-                        break;
-            }
-            if ( RCt == 0 ) {
-                * Node = TheNode;
-            }
-
-            KDirectoryRelease ( NativeDir );
-        }
-
-        XFSPathRelease ( xPath );
-    }
-
-    return RCt;
-}   /* _CacheDirNodeForPath () */
-
-rc_t CC
-_CacheDirNodeFindNode_v1 (
-            const struct XFSNode * self,
-            const struct XFSPath * Path,
-            uint32_t PathIndex,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    uint32_t PathCount;
-    const char * NodeName;
-    struct _CacheDirNode * CacheNode;
-    bool IsLast;
-    const struct XFSPath * xPath;
-
-    RCt = 0;
-    PathCount = 0;
-    NodeName = NULL;
-    CacheNode = NULL;
-    IsLast = false;
-    xPath = NULL;
-
-    RCt = XFSNodeFindNodeCheckInitStandard (
-                                            self,
-                                            Path,
-                                            PathIndex,
-                                            Node,
-                                            & NodeName,
-                                            & PathCount,
-                                            & IsLast
-                                            );
-    if ( RCt == 0 ) {
-        if ( IsLast ) {
-            RCt = XFSNodeAddRef ( self );
-
-            * Node = self;
-
-            return RCt;
-        }
-
-        CacheNode = ( struct _CacheDirNode * ) self;
-        if ( CacheNode -> path == NULL ) {
-            return XFS_RC ( rcInvalid );
-        }
-
-            /*) Here we are trying to create new node
-             (*/
-        RCt = XFSPathFrom ( Path, PathIndex + 1, & xPath );
-        if ( RCt == 0 ) {
-            RCt = _CacheDirNodeForPath (
-                                        Node,
-                                        CacheNode -> path,
-                                        XFSPathGet ( xPath ),
-                                        CacheNode -> project_id
-                                        );
-            XFSPathRelease ( xPath );
-        }
-    }
-
-    return RCt;
-}   /* _CacheDirNodeFindNode () */
-
-/*)))
- |||
- +++  Unified DirEditor
- |||
-(((*/
-static
-rc_t CC
-_CacheDir_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-    pLogMsg ( klogDebug, "_CacheDir_dispose_v1 ( $(editor) )\n", "editor=%p", ( void * ) self );
-*/
-
-    if ( self != NULL ) {
-        free ( ( struct XFSDirEditor * ) self );
-    }
-
-    return 0;
-}   /* _KfsDir_dispose_v1 () */
-
-static
-bool CC
-_CacheDirListCallback (
-                    const struct KDirectory * self,
-                    const char * Name,
-                    void * Unused
-)
-{
-    if ( XFS_StrEndsWith ( Name, ".cache" ) ) {
-        return false;
-    }
-
-    if ( XFS_StrEndsWith ( Name, ".lock" ) ) {
-        return false;
-    }
-
-    if ( strcmp ( Name, "workspace" ) == 0 ) {
-        return false;
-    }
-
-    return true;
-}   /* _CacheDirListCallback () */
-
-static
-rc_t CC
-_CacheDir_list_v1 (
-                const struct XFSDirEditor * self,
-                const struct KNamelist ** List
-)
-{
-    KDirectory * NativeDir;
-    const struct _CacheDirNode * Node;
-    struct KNamelist * TempList;
-    rc_t RCt;
-
-    RCt = 0;
-    NativeDir = NULL;
-    Node = NULL;
-    TempList = NULL;
-
-    XFS_CSAN ( List )
-    XFS_CAN ( self )
-    XFS_CAN ( List )
-
-    Node = ( const struct _CacheDirNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    XFS_CAN ( Node )
-    XFS_CAN ( Node -> path )
-
-    RCt = KDirectoryNativeDir ( & NativeDir );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryList (
-                            NativeDir,
-                            & TempList,
-                            _CacheDirListCallback,
-                            NULL, /* Filter Data */
-                            Node -> path
-                            );
-        if ( RCt == 0 ) {
-            * List = TempList;
-        }
-        else {
-            if ( TempList != NULL ) {
-                KNamelistRelease ( TempList );
-            }
-        }
-
-        KDirectoryRelease ( NativeDir );
-    }
-
-    return RCt;
-}   /* _CacheDir_list_v1 () */
-
-static
-rc_t CC
-_CacheDir_find_v1 (
-                const struct XFSDirEditor * self,
-                const char * Name,
-                const struct XFSNode ** Node
-)
-{
-    const struct _CacheDirNode * CacheNode;
-    rc_t RCt;
-
-    RCt = 0;
-    CacheNode = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( self )
-    XFS_CAN ( Name )
-    XFS_CAN ( Node )
-
-    * Node = NULL;
-
-    CacheNode = ( const struct _CacheDirNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-
-    XFS_CAN ( CacheNode )
-    XFS_CAN ( CacheNode -> path )
-
-    RCt = _CacheDirNodeForPath (
-                                Node,
-                                CacheNode -> path,
-                                Name,
-                                CacheNode -> project_id
-                                );
-
-    return RCt;
-}   /* _CacheDir_find_v1 () */
-
-static
-rc_t CC
-_CacheDir_delete_v1 (
-                const struct XFSDirEditor * self,
-                const char * Name
-)
-{
-    rc_t RCt;
-    KDirectory * NativeDir;
-    struct _CacheDirNode * CacheNode;
-
-    RCt = 0;
-    NativeDir = NULL;
-    CacheNode = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Name )
-
-    CacheNode = ( struct _CacheDirNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    XFS_CAN ( CacheNode )
-    XFS_CAN ( CacheNode -> path )
-
-    RCt = KDirectoryNativeDir ( & NativeDir );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryRemove (
-                                NativeDir,
-                                true,
-                                "%s/%s",
-                                CacheNode -> path,
-                                Name
-                                );
-
-        KDirectoryRelease ( NativeDir );
-    }
-
-    return RCt;
-}   /* _CacheDir_delete_v1 () */
-
-rc_t CC
-_CacheDirNodeDir_v1 (
-            const struct XFSNode * self,
-            const struct XFSDirEditor ** Dir
-)
-{
-    rc_t RCt;
-    struct XFSDirEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-
-    XFS_CSAN ( Dir )
-    XFS_CAN ( self )
-    XFS_CAN ( Dir )
-
-    Editor = calloc ( 1, sizeof ( struct XFSDirEditor ) );
-    if ( Editor == NULL ) { 
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _CacheDir_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> list = _CacheDir_list_v1;
-        Editor -> find = _CacheDir_find_v1;
-        Editor -> delete = _CacheDir_delete_v1;
-
-        * Dir = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _CacheDirNodeDir_v1 () */
-
-/*)))
- |||
- +++  Unified Attr
- |||
-(((*/
-
-static
-rc_t CC
-_CacheAttr_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-    pLogMsg ( klogDebug, "_CacheAttr_dispose_v1 ( $(editor) )\n", "editor=%p", ( void * ) self );
-*/
-
-    if ( self != NULL ) {
-        free ( ( struct XFSAttrEditor * ) self );
-    }
-
-    return 0;
-}   /* _CacheAttr_dispose_v1 () */
-
-static
-rc_t CC
-_CacheAttr_permissions_v1 (
-                        const struct XFSAttrEditor * self,
-                        const char ** Permissions
-)
-{
-    const struct _CacheDirNode * Node;
-    rc_t RCt;
-
-    Node = NULL;
-    RCt = 0;
-
-    XFS_CSAN ( Permissions )
-    XFS_CAN ( self )
-    XFS_CAN ( Permissions )
-
-    Node = ( const struct _CacheDirNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    XFS_CAN ( Node )
-    XFS_CAN ( Node -> path )
-
-    * Permissions = Node -> perm == NULL
-                                    ? XFSPermRWDefContChar ()
-                                    : Node -> perm
-                                    ;
-
-    return RCt;
-}   /* _CacheAttr_permissions_v1 () */
-
-static
-rc_t CC
-_CacheAttr_date_v1 (
-                        const struct XFSAttrEditor * self,
-                        KTime_t * Time
-)
-{
-    const struct _CacheDirNode * Node;
-    KDirectory * NativeDir;
-    KTime_t TempTime;
-    rc_t RCt;
-
-    Node = NULL;
-    NativeDir = NULL;
-    TempTime = 0;
-    RCt = 0;
-
-    XFS_CSA ( Time, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Time )
-
-    Node = ( const struct _CacheDirNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    XFS_CAN ( Node )
-    XFS_CAN ( Node -> path )
-
-    RCt = KDirectoryNativeDir ( & NativeDir );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryDate ( NativeDir, & TempTime, Node -> path );
-        if ( RCt == 0 ) {
-            * Time = TempTime;
-        }
-
-        KDirectoryRelease ( NativeDir );
-    }
-
-    return RCt;
-}   /* _CacheAttr_date_v1 () */
-
-static
-rc_t CC
-_CacheAttr_type_v1 (
-                        const struct XFSAttrEditor * self,
-                        XFSNType * Type
-)
-{
-    const struct _CacheDirNode * Node;
-    rc_t RCt;
-
-    Node = NULL;
-    RCt = 0;
-
-    XFS_CSA ( Type, kxfsNotFound )
-    XFS_CAN ( self )
-    XFS_CAN ( Type )
-
-    Node = ( const struct _CacheDirNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    XFS_CAN ( Node )
-    XFS_CAN ( Node -> path )
-
-    * Type = kxfsDir;
-
-    return RCt;
-}   /* _CacheAttr_type_v1 () */
-
-static
-rc_t CC
-_CacheDirNodeAttr_v1 (
-            const struct XFSNode * self,
-            const struct XFSAttrEditor ** Attr
-)
-{
-    rc_t RCt;
-    struct XFSAttrEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-
-    XFS_CSAN ( Attr )
-    XFS_CAN ( self )
-    XFS_CAN ( Attr )
-
-    Editor = calloc ( 1, sizeof ( struct XFSAttrEditor ) );
-    if ( Editor == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                        & ( Editor -> Papahen ),
-                        self,
-                        _CacheAttr_dispose_v1
-                        );
-    if ( RCt == 0 ) {
-        Editor -> permissions = _CacheAttr_permissions_v1;
-        Editor -> date = _CacheAttr_date_v1;
-        Editor -> type = _CacheAttr_type_v1;
-
-        * Attr = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _CacheDirNodeAttr_v1 () */
-
-/*)))
- |||
- +++  Unified Discribe
- |||
-(((*/
-
-rc_t CC
-_CacheDirNodeDescribe_v1 (
-            const struct XFSNode * self,
-            char * Buffer,
-            size_t BufferSize
-)
-{
-    rc_t RCt;
-    size_t NumWrit;
-    const char * Abbr;
-
-    RCt = 0;
-    NumWrit = 0;
-    Abbr = NULL;
-
-    XFS_CAN ( Buffer )
-    XFS_CA ( BufferSize, 0 )
-
-    Abbr = ( ( const struct _CacheDirNode * ) self ) -> project_id == 0
-                ? "CACHE PUB"
-                : "CACHE PRJ"
-                ;
-
-    if ( self == NULL ) {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[NULL][NULL]",
-                    Abbr
-                    );
-    }
-    else {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[%s][0x%p]",
-                    Abbr,
-                    self -> Name,
-                    self
-                    );
-    }
-
-    return RCt;
-}   /* _CacheDirNodeDescribe_v1 () */
-
-/*))
- ((     Node make/dispose
-  ))
- ((*/
-
-static
-rc_t CC
-_CacheDirNodeConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct XFSNode * TheNode;
-    const char * TempStr;
-    uint32_t ProjectId;
-
-    RCt = 0;
-    TheNode = NULL;
-    TempStr = NULL;
-    ProjectId = 0;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Model )
-    XFS_CAN ( Template )
-    XFS_CAN ( Node )
-
-
-    TempStr = XFSModelNodeProperty ( Template, XFS_MODEL_PROJECTID );
-    if ( TempStr == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-    ProjectId = atol ( TempStr );
-
-    RCt = XFSGapCacheNodeMake (
-                     & TheNode,
-                     ProjectId,
-                     XFSModelNodeSecurity ( Template )
-                     );
-    if ( RCt == 0 ) {
-        * Node = TheNode;
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( TheNode );
-        }
-    }
-
-    return RCt;
-}   /* _CacheDirNodeConstructor () */
-
-/*)))
- |||
- +++    Non-Teleport methods to create nodes
- |||
-(((*/
-
-LIB_EXPORT
-rc_t CC
-XFSGapCacheNodeMake (
-            struct XFSNode ** Node,
-            uint32_t ProjectId,
-            const char * Perm
-)
-{
-    rc_t RCt;
-    struct _CacheDirNode * TheNode;
-    const char * Path;
-    const char * Name;
-
-    RCt = 0;
-    TheNode = NULL;
-    Path = NULL;
-    Name = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Node )
-
-    RCt = _GapCacheGetPath ( & Path, ProjectId );
-    if ( RCt == 0 ) {
-        Name = ProjectId == 0
-                    ? XFS_GAP_PUBLIC_CACHE_NAME
-                    : XFS_GAP_CACHE_NAME
-                    ;
-        RCt = _CacheDirNodeMake ( & TheNode, Path, Name, Perm );
-        if ( RCt == 0 ) {
-            TheNode -> project_id = ProjectId;
-
-            * Node = & ( TheNode -> node );
-        }
-
-        free ( ( char * ) Path );
-    }
-
-    if ( RCt != 0 ) {
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( & ( TheNode -> node ) );
-            TheNode = NULL;
-        }
-    }
-
-/*
-pLogMsg ( klogDebug, "XFSKfsNodeMake ND[$(node)] NM[$(name)] TP[$(project_id)]", "nnode=%p,name=%s,project_id=%d", ( void * ) TheNode, Name, ProjectId );
-*/
-
-    return RCt;
-}   /* XFSGapCacheNodeMake () */
-
-/*)))
- |||
- +++    DirNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_GapCacheNodeConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-
-    RCt = _CacheDirNodeConstructor ( Model, Template, Alias, Node );
-
-/*
-pLogMsg ( klogDebug, "_GapCacheNodeConstructor ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )\n", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _GapCacheNodeConstructor () */
-
-static
-rc_t CC
-_GapCacheNodeValidator (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            uint32_t Flags
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_GapCacheNodeValidator ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )\n", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _GapCacheNodeValidator () */
-
-static const struct XFSTeleport _sGapCacheNodeTeleport = {
-                                            _GapCacheNodeConstructor,
-                                            _GapCacheNodeValidator,
-                                            false
-                                            };
-
-
-LIB_EXPORT
-rc_t CC
-XFSGapCacheProvider ( const struct XFSTeleport ** Teleport )
-{
-    if ( Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = & _sGapCacheNodeTeleport;
-
-    return 0;
-}   /* XFSGapCacheProvider () */
diff --git a/libs/xfs/gapf.c b/libs/xfs/gapf.c
deleted file mode 100644
index 8ec4d72..0000000
--- a/libs/xfs/gapf.c
+++ /dev/null
@@ -1,879 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/path.h>
-#include <xfs/editors.h>
-#include <xfs/handle.h>
-#include <xfs/perm.h>
-
-#include "xgapf.h"
-#include "mehr.h"
-#include "schwarzschraube.h"
-#include "teleport.h"
-#include "common.h"
-
-#include <sysalloc.h>
-
-#include <string.h>     /* memset */
-
-/*)))
- |||
- +++    _GapNode, and others
- |||
-(((*/
-struct _GapNode {
-    struct XFSNode node;
-
-    uint32_t project_id;
-
-    const char * accession;
-    uint32_t object_id;
-};
-
-struct _GapFileEditor {
-    struct XFSFileEditor Papahen;
-
-    const struct KFile * file;
-};
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*                                                               *_*/
-/*_* _GapNode is living here                                       *_*/
-/*_*                                                               *_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))
- |||
- +++    _GapNode virtual table is Living here :lol:
- |||
-(((*/
-static rc_t CC _GapNodeFlavor_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _GapNodeDispose_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _GapNodeFindNode_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSPath * Path,
-                                uint32_t PathIndex,
-                                const struct XFSNode ** Node
-                                );
-static rc_t CC _GapNodeFile_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSFileEditor ** File
-                                );
-static rc_t CC _GapNodeAttr_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSAttrEditor ** Attr
-                                );
-static rc_t CC _GapNodeDescribe_v1 (
-                                const struct XFSNode * self,
-                                char * Buffer,
-                                size_t BufferSize
-                                );
-
-static const struct XFSNode_vt_v1 _sGapNodeVT_v1 = {
-                                        1, 1,   /* nin naj */
-                                        _GapNodeFlavor_v1,
-                                        _GapNodeDispose_v1,
-                                        _GapNodeFindNode_v1,
-                                        NULL,   /* No DIR */
-                                        _GapNodeFile_v1,
-                                        _GapNodeAttr_v1,
-                                        _GapNodeDescribe_v1
-                                        };
-
-
-LIB_EXPORT
-rc_t CC
-XFSGapFileNodeMake (
-    struct XFSNode ** Node,
-    const char * Name,
-    uint32_t ProjectId,
-    const char * Accession,
-    uint32_t ObjectId
-)
-{
-    rc_t RCt;
-    struct _GapNode * xNode;
-
-    RCt = 0;
-    xNode = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Node )
-
-    if ( Name == NULL ) {
-        if ( Accession != NULL ) {
-            Name = Accession;
-        }
-    }
-
-    if ( Accession == NULL && ObjectId == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    xNode = calloc ( 1, sizeof ( struct _GapNode ) );
-    if ( xNode == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = XFSNodeInitVT (
-                    & ( xNode -> node ),
-                    Name,
-                    ( const union XFSNode_vt * ) & _sGapNodeVT_v1
-                    );
-    if ( RCt == 0 ) {
-        xNode -> project_id = ProjectId;
-
-        if ( Accession != NULL ) {
-            RCt = XFS_StrDup ( Accession, & ( xNode -> accession ) );
-            xNode -> object_id = 0;
-        }
-        else {
-            xNode -> accession = NULL;
-            xNode -> object_id = ObjectId;
-        }
-
-        if ( RCt == 0 ) {
-            * Node = & ( xNode -> node );
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( xNode != NULL ) {
-            RCt = XFSNodeDispose ( & ( xNode -> node ) );
-        }
-    }
-
-    return RCt;
-}   /* XFSGapFileNodeMake () */
-
-uint32_t CC
-_GapNodeFlavor_v1 ( const struct XFSNode * self )
-{
-    return _sFlavorOfGapFile;
-}   /* _GapNodeFlavor_v1 () */
-
-static
-rc_t CC
-XFSGapNodeDispose ( const struct _GapNode * self )
-{
-    struct _GapNode * Node = ( struct _GapNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "XFSGapNodeDispose ( $(node) ) TP[$(project_id)]", "node=%p,project_id=%d", ( void * ) Node, ( Node == NULL ? 0 : Node -> project_id ) );
-*/
-
-    if ( Node == 0 ) {
-        return 0;
-    }
-
-    if ( Node -> accession != NULL ) {
-        free ( ( char * ) Node -> accession );
-
-        Node -> accession = NULL;
-    }
-
-    Node -> project_id = 0;
-    Node -> object_id = 0;
-
-    free ( Node );
-
-    return 0;
-}   /* XFSGapNodeDispose () */
-
-rc_t CC
-_GapNodeDispose_v1 ( const struct XFSNode * self )
-{
-    return XFSGapNodeDispose ( ( const struct _GapNode * ) self );
-}   /* _GapNodeDispose_v1 () */
-
-/*)))
- |||
- +++  There are no find methods for encrypted files, cuz FILE
- |||
-(((*/
-rc_t CC
-_GapNodeFindNode_v1 (
-                    const struct XFSNode * self,
-                    const struct XFSPath * Path,
-                    uint32_t PathIndex,
-                    const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    uint32_t PathCount;
-    const char * NodeName;
-    bool IsLast;
-
-    RCt = 0;
-    PathCount = 0;
-    NodeName = NULL;
-    IsLast = false;
-
-    RCt = XFSNodeFindNodeCheckInitStandard (
-                                        self,
-                                        Path,
-                                        PathIndex,
-                                        Node,
-                                        & NodeName,
-                                        & PathCount,
-                                        & IsLast
-                                        );
-    if ( RCt == 0 ) {
-        if ( IsLast ) {
-            RCt = XFSNodeAddRef ( self );
-
-            * Node = self;
-        }
-    }
-
-    return RCt;
-}   /* _GapNodeFindNode () */
-
-/*)))
- |||
- +++  No Dir editor 
- |||
-(((*/
-
-/*)))
- |||
- +++  Unified FileEditor
- |||
-(((*/
-
-static
-rc_t CC
-_GapFile_dispose_v1 ( const struct XFSEditor * self )
-{
-    struct _GapFileEditor * Editor = ( struct _GapFileEditor * ) self;
-/*
-pLogMsg ( klogDebug, "_GapFile_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( Editor != NULL ) {
-        if ( Editor -> file != NULL ) {
-            KFileRelease ( Editor -> file );
-
-            Editor -> file = NULL;
-        }
-
-        free ( Editor );
-    }
-
-    return 0;
-}   /* _GapFile_dispose_v1 () */
-
-static
-rc_t CC
-_GapFile_open_v1 (
-                    const struct XFSFileEditor * self,
-                    XFSNMode Mode
-)
-{
-    rc_t RCt;
-    const struct _GapNode * Node;
-    struct _GapFileEditor * Editor;
-    const struct KFile * File;
-
-    RCt = 0;
-    Node = NULL;
-    Editor = NULL;
-    File = NULL;
-
-    if ( Mode != kxfsRead ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    XFS_CAN ( self )
-
-    Node = ( const struct _GapNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    XFS_CA ( Node, NULL )
-    if ( Node -> accession == NULL && Node -> object_id == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Editor = ( struct _GapFileEditor * ) self;
-    if ( Editor -> file == NULL ) {
-        if ( Node -> accession != NULL ) {
-            RCt = XFSGapFilesOpenAccession (
-                                        & File,
-                                        Node -> project_id,
-                                        Node -> accession
-                                        );
-        }
-        else {
-            RCt = XFSGapFilesOpenObjectId (
-                                        & File,
-                                        Node -> project_id,
-                                        Node -> object_id
-                                        );
-        }
-
-        if ( RCt == 0 ) {
-            Editor -> file = File;
-        }
-    }
-
-    return RCt;
-}   /* _GapFile_open_v1 () */
-
-static
-rc_t CC
-_GapFile_close_v1 ( const struct XFSFileEditor * self )
-{
-    rc_t RCt;
-    struct _GapFileEditor * Editor;
-
-    RCt = 0;
-    Editor = ( struct _GapFileEditor * ) self;
-
-    XFS_CAN ( Editor )
-
-    if ( Editor -> file != NULL ) {
-        RCt = KFileRelease ( Editor -> file );
-        Editor -> file = NULL;
-    }
-
-    return RCt;
-}   /* _GapFile_close_v1 () */
-
-static
-rc_t CC
-_GapFile_read_v1 (
-                    const struct XFSFileEditor * self,
-                    uint64_t Offset,
-                    void * Buffer,
-                    size_t SizeToRead,
-                    size_t * NumReaded
-)
-{
-    rc_t RCt;
-    struct _GapFileEditor * Editor;
-
-    RCt = 0;
-    Editor = ( struct _GapFileEditor * ) self;
-
-    XFS_CAN ( Editor )
-    XFS_CA ( Editor -> file, NULL )
-
-
-    RCt = KFileRead (
-                    Editor -> file,
-                    Offset,
-                    Buffer,
-                    SizeToRead,
-                    NumReaded
-                    );
-
-    return RCt;
-}   /* _GapFile_read_v1 () */
-
-static
-rc_t CC
-_GapFile_size_v1 (
-                const struct XFSFileEditor * self,
-                uint64_t * Size
-)
-{
-    rc_t RCt;
-    struct _GapNode * Node;
-
-    RCt = 0;
-    Node = NULL;
-
-    XFS_CSA ( Size, 0 )
-    XFS_CAN ( Size )
-    XFS_CAN ( self )
-
-    Node = ( struct _GapNode * ) XFSEditorNode ( & ( self -> Papahen ) );
-
-    XFS_CAN ( Node )
-
-    if ( Node -> accession == NULL && Node -> object_id == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> accession != NULL ) {
-        RCt = XFSGapFilesAccessionSize (
-                                        Size,
-                                        Node -> project_id,
-                                        Node -> accession
-                                        );
-    }
-    else {
-        RCt = XFSGapFilesObjectIdSize (
-                                        Size,
-                                        Node -> project_id,
-                                        Node -> object_id
-                                        );
-    }
-
-    if ( RCt != 0 ) {
-        * Size = 0;
-    }
-
-    return RCt;
-}   /* _GapFile_size_v1 () */
-
-rc_t CC
-_GapNodeFile_v1 (
-            const struct XFSNode * self,
-            const struct XFSFileEditor ** File
-)
-{
-    rc_t RCt;
-    struct _GapFileEditor * FileEditor;
-    struct XFSFileEditor * Editor;
-
-    RCt = 0;
-    FileEditor = NULL;
-    Editor = NULL;
-
-    XFS_CSAN ( File )
-
-    XFS_CAN ( self )
-    XFS_CAN ( File )
-
-    FileEditor = calloc ( 1, sizeof ( struct _GapFileEditor ) );
-    if ( FileEditor == NULL ) { 
-        return XFS_RC ( rcExhausted );
-    }
-
-    Editor = & ( FileEditor -> Papahen );
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _GapFile_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> open = _GapFile_open_v1;
-        Editor -> close = _GapFile_close_v1;
-        Editor -> read = _GapFile_read_v1;
-        Editor -> size = _GapFile_size_v1;
-
-        * File = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _GapNodeFile_v1 () */
-
-/*)))
- |||
- +++  Unified Attr
- |||
-(((*/
-
-static
-rc_t CC
-_GapAttr_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-pLogMsg ( klogDebug, "_GapAttr_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( self != NULL ) {
-        free ( ( struct XFSEditor * ) self );
-    }
-
-    return 0;
-}   /* _GapAttr_dispose_v1 () */
-
-static
-rc_t CC
-_GapAttr_permissions_v1 (
-                        const struct XFSAttrEditor * self,
-                        const char ** Permissions
-)
-{
-    const struct _GapNode * Node;
-
-    Node = ( struct _GapNode * ) XFSEditorNode ( & ( self -> Papahen ) );
-
-    XFS_CSAN ( Permissions )
-    XFS_CAN ( Permissions )
-    XFS_CAN ( Node )
-
-    if ( Node -> accession == NULL && Node -> object_id == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    * Permissions = XFSPermRODefNodeChar ();
-
-    return 0;
-}   /* _GapAttr_permissions_v1 () */
-
-
-static
-rc_t CC
-_GapAttr_date_v1 ( const struct XFSAttrEditor * self, KTime_t * Time )
-{
-    rc_t RCt;
-    const struct _GapNode * Node;
-
-    RCt = 0;
-    Node = ( struct _GapNode * ) XFSEditorNode ( & ( self -> Papahen ) );
-
-    XFS_CSA ( Time, 0 )
-    XFS_CAN ( Time )
-    XFS_CAN ( Node )
-
-    if ( Node -> accession == NULL && Node -> object_id == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> accession != NULL ) {
-        RCt = XFSGapFilesAccessionDate (
-                                        Time, 
-                                        Node -> project_id,
-                                        Node -> accession
-                                        );
-    }
-    else {
-        RCt = XFSGapFilesObjectIdDate (
-                                        Time, 
-                                        Node -> project_id,
-                                        Node -> object_id
-                                        );
-    }
-
-    if ( RCt != 0 ) {
-        * Time = 0;
-    }
-
-    return RCt;
-}   /* _GapAttr_date_v1 () */
-
-static
-rc_t CC
-_GapAttr_type_v1 (
-                        const struct XFSAttrEditor * self,
-                        XFSNType * Type
-)
-{
-    const struct _GapNode * Node;
-
-    Node = ( struct _GapNode * ) XFSEditorNode ( & ( self -> Papahen ) );
-
-    XFS_CSA ( Type, kxfsNotFound )
-    XFS_CAN ( Type )
-    XFS_CAN ( Node )
-
-    if ( Node -> accession == NULL && Node -> object_id == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    * Type = kxfsFile ;
-
-    return 0;
-}   /* _GapAttr_type_v1 () */
-
-static
-rc_t CC
-_GapNodeAttr_v1 (
-            const struct XFSNode * self,
-            const struct XFSAttrEditor ** Attr
-)
-{
-    rc_t RCt;
-    struct XFSAttrEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-
-    XFS_CSAN ( Attr )
-
-    XFS_CAN ( self )
-    XFS_CAN ( Attr )
-
-    Editor = calloc ( 1, sizeof ( struct XFSAttrEditor ) );
-    if ( Editor == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _GapAttr_dispose_v1
-                    );
-    if ( RCt == 0 ) {
-        Editor -> permissions = _GapAttr_permissions_v1;
-        Editor -> date = _GapAttr_date_v1;
-        Editor -> type = _GapAttr_type_v1;
-
-        * Attr = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _GapNodeAttr_v1 () */
-
-/*)))
- |||
- +++  Unified Discribe
- |||
-(((*/
-
-rc_t CC
-_GapNodeDescribe_v1 (
-            const struct XFSNode * self,
-            char * Buffer,
-            size_t BufferSize
-)
-{
-    rc_t RCt;
-    size_t NumWrit;
-    const char * Abbr;
-
-    RCt = 0;
-    NumWrit = 0;
-    Abbr = NULL;
-
-    XFS_CAN ( Buffer )
-    XFS_CA ( BufferSize, 0 )
-
-    Abbr = "GAP FILE";
-
-    if ( self == NULL ) {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[NULL][NULL]",
-                    Abbr
-                    );
-    }
-    else {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[%s][0x%p]",
-                    Abbr,
-                    self -> Name,
-                    self
-                    );
-    }
-
-    return RCt;
-}   /* _GapNodeDescribe_v1 () */
-
-/*)))
- |||
- +++    FileNode lives here
- |||
-(((*/
-
-/*))
- ((     Node make/dispose
-  ))
- ((*/
-
-/*)))
- |||
- +++    Non-Teleport methods to create nodes
- |||
-(((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* ALL BELOW TODO!!!                                               */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*)))
- |||
- +++    EncNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_GapFileNodeConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct XFSNode * TheNode;
-    const char * NodeName;
-    uint32_t ProjectId;
-    uint32_t ObjectId;
-    const char * Accession;
-    const char * Var;
-
-    RCt = 0;
-    TheNode = NULL;
-    NodeName = NULL;
-    ProjectId = 0;
-    ObjectId = 0;
-    Accession = NULL;
-    Var = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Model == NULL || Template == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    NodeName = Alias == NULL ? XFSModelNodeName ( Template ) : Alias;
-
-    Var = XFSModelNodeProperty ( Template, XFS_MODEL_PROJECTID );
-    if ( Var == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    ProjectId = atol ( Var );
-
-    Accession = XFSModelNodeProperty ( Template, XFS_MODEL_ACCESSION );
-
-    Var = XFSModelNodeProperty ( Template, XFS_MODEL_OBJECTID );
-    if ( Var != NULL ) {
-        ObjectId = atol ( Var );
-    }
-
-    if ( Accession == NULL && ObjectId == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFSGapFileNodeMake (
-                            & TheNode,
-                            NodeName,
-                            ProjectId,
-                            Accession,
-                            ObjectId
-                            );
-    if ( RCt == 0 ) {
-        * Node = ( struct XFSNode * ) TheNode;
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( TheNode != NULL ) {
-            XFSGapNodeDispose ( ( const struct _GapNode * ) TheNode );
-        }
-    }
-
-    return RCt;
-}   /* _GapFileNodeConstructor () */
-
-/*)))
- |||
- +++    EncNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_GapFileConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-
-    RCt = _GapFileNodeConstructor (
-                                        Model,
-                                        Template,
-                                        Alias,
-                                        Node
-                                        );
-
-/*
-pLogMsg ( klogDebug, "_GapFileConstructor ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _GapFileConstructor () */
-
-static
-rc_t CC
-_GapFileValidator (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            uint32_t Flags
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_GapFileValidator ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _GapFileValidator () */
-
-static const struct XFSTeleport _sGapFileTeleport = {
-                                        _GapFileConstructor,
-                                        _GapFileValidator,
-                                        false
-                                        };
-
-
-LIB_EXPORT
-rc_t CC
-XFSGapFileProvider ( const struct XFSTeleport ** Teleport )
-{
-    if ( Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = & _sGapFileTeleport;
-
-    return 0;
-}   /* XFSGapFileProvider () */
diff --git a/libs/xfs/gapk.c b/libs/xfs/gapk.c
deleted file mode 100644
index 526196e..0000000
--- a/libs/xfs/gapk.c
+++ /dev/null
@@ -1,440 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-#include <kfg/kart.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/path.h>
-#include <xfs/editors.h>
-#include <xfs/perm.h>
-#include <xfs/doc.h>
-
-#include "mehr.h"
-#include "schwarzschraube.h"
-#include "ncon.h"
-#include "teleport.h"
-#include "common.h"
-#include "contnode.h"
-#include "xgap.h"
-#include "xgapk.h"
-
-#include <sysalloc.h>
-
-#include <string.h>     /* memset */
-
-/*)))
- |||    That is first draft approach for reading Kart files.
- |||    Represents KartNode container with KartItemNodes.
-(((*/
-
-/*)))
- |||
- +++    KartNode and KartItemNode
- |||
-(((*/
-
-struct XFSKartNode {
-    struct XFSContNode node;
-
-    uint32_t project_id;
-};
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*                                                               *_*/
-/*_* KartNode lives here                                           *_*/
-/*_*                                                               *_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static
-rc_t CC
-_AddKartItem (
-            struct XFSKartNode * Node,
-            const struct XFSGapKart * Kart,
-            const char * ItemName
-)
-{
-    rc_t RCt;
-    struct XFSNode * ItemNode;
-    const struct XFSGapKartItem * KartItem;
-
-    RCt = 0;
-    ItemNode = NULL;
-    KartItem = NULL;
-
-    XFS_CAN ( Node )
-    XFS_CAN ( Kart )
-    XFS_CAN ( ItemName )
-
-    KartItem = XFSGapKartGet ( Kart, ItemName );
-    if ( KartItem == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFSGapFileNodeMake ( 
-                            & ItemNode,
-                            ItemName,
-                            XFSGapKartItemProjectId ( KartItem ),
-                            XFSGapKartItemAccession ( KartItem ),
-                            XFSGapKartItemObjectId ( KartItem )
-                            );
-
-    if ( RCt == 0 ) {
-        RCt = XFSContNodeAddChild (
-                                & ( Node -> node . node ),
-                                ItemNode
-                                );
-        if ( GetRCState ( RCt ) == rcExists ) {
-            RCt = 0;
-        }
-        /* We do not dispose node here, but on the caller level */
-    }
-
-    if ( RCt != 0 ) {
-        if ( ItemNode != NULL ) { 
-            XFSNodeDispose ( ItemNode );
-            ItemNode = NULL;
-        }
-    }
-
-    return RCt;
-}   /* _AddKartItem () */
-
-static
-rc_t CC
-_AddSignatureFile ( struct XFSKartNode * Node )
-{
-    rc_t RCt;
-    struct XFSDoc * Doc;
-    struct XFSNode * Sign;
-
-    RCt = 0;
-    Doc = NULL;
-    Sign = NULL;
-
-    XFS_CAN ( Node )
-
-    RCt = XFSTextDocMake ( & Doc );
-    if ( RCt == 0 ) {
-        RCt = XFSTextDocAppend ( Doc,
-                                "%d\n",
-                                Node -> project_id
-                                );
-        if ( RCt == 0 ) {
-            RCt = XFSDocNodeMakeWithFlavor (
-                                        & Sign,
-                                        Doc,
-                                        ".#dbgap-mount-tool#",
-                                        XFSPermRODefNodeChar (),
-                                        _sFlavorOfFoo
-                                        );
-            if ( RCt == 0 ) {
-                RCt = XFSContNodeAddChild (
-                                        & ( Node -> node . node ),
-                                        Sign
-                                        );
-            }
-        }
-
-        XFSDocRelease ( Doc );
-    }
-
-    if ( RCt != 0 ) {
-        if ( Sign != NULL ) { 
-            XFSNodeDispose ( Sign );
-            Sign = NULL;
-        }
-    }
-
-    return RCt;
-}   /* _AddSignatureFile () */
-
-static 
-rc_t CC
-_LoadKart ( struct XFSKartNode * Node )
-{
-    rc_t RCt;
-    const struct XFSGapKart * Kart;
-    struct KNamelist * List;
-    uint32_t ListQ, ListI;
-    const char * ListN;
-
-    RCt = 0;
-    Kart = NULL;
-    List = NULL;
-    ListQ = ListI = 0;
-    ListN = NULL;
-
-    XFS_CAN ( Node )
-
-    RCt = _AddSignatureFile ( Node );
-    if ( RCt == 0 ) {
-        RCt = XFSGapKartDepotGet (
-                            & Kart,
-                            XFSNodeName ( & ( Node -> node . node ) )
-                            );
-        if ( RCt == 0 ) {
-
-            RCt = XFSGapKartList ( Kart, & List, Node -> project_id );
-            if ( RCt == 0 ) {
-                RCt = KNamelistCount ( List, & ListQ );
-                if ( RCt == 0 ) {
-                    for ( ListI = 0; ListI < ListQ; ListI ++ ) {
-                        RCt = KNamelistGet ( List, ListI, & ListN );
-                        if ( RCt != 0 ) {
-                            break;
-                        }
-                        RCt = _AddKartItem ( Node, Kart, ListN );
-                        if ( RCt != 0 ) {
-                            break;
-                        }
-                    }
-                }
-
-                KNamelistRelease ( List );
-            }
-
-            XFSGapKartRelease ( Kart );
-        }
-    }
-
-    return RCt;
-}   /* _LoadKart () */
-
-/*))
- ((     Node make/dispose
-  ))
- ((*/
-
-static
-rc_t CC
-_KartNodeDispose ( struct XFSContNode * self )
-{
-    struct XFSKartNode * Node = ( struct XFSKartNode * ) self;
-
-    if ( Node != NULL ) {
-        Node -> project_id = 0;
-
-        free ( Node );
-    }
-
-    return 0;
-}   /* _KartNodeDispose () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartNodeMake (
-            struct XFSNode ** Node,
-            const char * Name,
-            uint32_t ProjectId,
-            const char * Perm
-)
-{
-    rc_t RCt;
-    struct XFSKartNode * KartNode;
-
-    RCt = 0;
-    KartNode = NULL;
-
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Node )
-    XFS_CAN ( Name )
-
-    KartNode = calloc ( 1, sizeof ( struct XFSKartNode ) );
-    if ( KartNode == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = XFSContNodeInit (
-                            & ( KartNode -> node . node ),
-                            Name,
-                            Perm,
-                            _sFlavorOfGapKart,
-                            _KartNodeDispose
-                            );
-        if ( RCt == 0 ) {
-            KartNode -> project_id = ProjectId;
-
-            RCt = _LoadKart ( KartNode );
-            if ( RCt == 0 ) {
-                * Node = ( struct XFSNode * ) KartNode;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( KartNode != NULL ) {
-            XFSNodeDispose ( & ( KartNode -> node . node ) );
-            KartNode = NULL;
-        }
-    }
-
-/*
-pLogMsg ( klogDebug, "XFSGapKartNodeMake ND[$(node)] NM[$(name)] TP[$(project_id)]", "node=%p,name=%s,project_id=%d", ( void * ) Node, Name, ProjectId );
-*/
-
-    return RCt;
-}   /* XFSGapKartNodeMake () */
-
-static
-rc_t CC
-_KartNodeConstructorEx (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            XFSNType Type,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct XFSNode * TheNode;
-    const char * NodeName;
-    uint32_t ProjectId;
-    const char * Var;
-
-    RCt = 0;
-    TheNode = NULL;
-    NodeName = NULL;
-    ProjectId = 0;
-    Var = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Model )
-    XFS_CAN ( Template )
-    XFS_CAN ( Node )
-
-    NodeName = Alias == NULL ? XFSModelNodeName ( Template ) : Alias;
-
-    Var = XFSModelNodeProperty ( Template, XFS_MODEL_PROJECTID );
-    if ( Var == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-    ProjectId = atol ( Var );
-
-    RCt = XFSGapKartNodeMake (
-                    & TheNode,
-                    NodeName,
-                    ProjectId,
-                    XFSModelNodeSecurity ( Template )
-                    );
-    if ( RCt == 0 ) {
-        * Node = TheNode;
-    }
-    else {
-        * Node = NULL;
-
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( TheNode );
-        }
-    }
-
-    return RCt;
-}   /* _KartNodeConstructorEx () */
-
-/*)))
- |||
- +++    FileNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_KartNodeConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-
-    RCt = _KartNodeConstructorEx (
-                            Model,
-                            Template,
-                            Alias,
-                            kxfsFile,
-                            Node
-                            );
-
-/*
-pLogMsg ( klogDebug, "_KartNodeConstructor ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _KartNodeConstructor () */
-
-static
-rc_t CC
-_KartNodeValidator (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            uint32_t Flags
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_KartNodeValidator ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _KartNodeValidator () */
-
-static const struct XFSTeleport _sKartNodeTeleport = {
-                                        _KartNodeConstructor,
-                                        _KartNodeValidator,
-                                        false
-                                        };
-
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartProvider ( const struct XFSTeleport ** Teleport )
-{
-    if ( Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = & _sKartNodeTeleport;
-
-    return 0;
-}   /* XFSGapKartProvider () */
diff --git a/libs/xfs/gapka.c b/libs/xfs/gapka.c
deleted file mode 100644
index aec78eb..0000000
--- a/libs/xfs/gapka.c
+++ /dev/null
@@ -1,1005 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/path.h>
-#include <xfs/editors.h>
-#include <xfs/handle.h>
-#include <xfs/perm.h>
-
-#include "mehr.h"
-#include "schwarzschraube.h"
-#include "teleport.h"
-#include "common.h"
-#include "xgapk.h"
-
-#include <sysalloc.h>
-
-/*)))
- |||    That file contains _GapKartFilesNode, which is really Kfs
- |||    type node without ability to create subdirectories and with
- |||    callback to changeing version ( datestamp )
-(((*/
-
-#define XFS_GAP_KART_FILES_NAME "kart-files"
-
-/*)))
- |||
- +++    FileNode, and other simple containers
- |||
-(((*/
-
-struct _KartFilesNode {
-    struct XFSNode node;
-
-    const char * path;   /* Path for object */
-    uint64_t version;
-
-    const char * perm;   /* Permissions in format "rwxrwxrwx u:g:o" */
-};
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*                                                               *_*/
-/*_* _GapKartFilesNode is living here                              *_*/
-/*_*                                                               *_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))
- |||
- +++    _GapKartFilesNode virtual table is Living here :lol:
- |||
-(((*/
-static rc_t CC _KartFilesNodeFlavor_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _KartFilesNodeDispose_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _KartFilesNodeFindNode_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSPath * Path,
-                                uint32_t PathIndex,
-                                const struct XFSNode ** Node
-                                );
-static rc_t CC _KartFilesNodeDir_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSDirEditor ** Dir
-                                );
-static rc_t CC _KartFilesNodeAttr_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSAttrEditor ** Attr
-                                );
-static rc_t CC _KartFilesNodeDescribe_v1 (
-                                const struct XFSNode * self,
-                                char * Buffer,
-                                size_t BufferSize
-                                );
-
-static const struct XFSNode_vt_v1 _sKartFilesNodeVT_v1 = {
-                                        1, 1,   /* nin naj */
-                                        _KartFilesNodeFlavor_v1,
-                                        _KartFilesNodeDispose_v1,
-                                        _KartFilesNodeFindNode_v1,
-                                        _KartFilesNodeDir_v1,
-                                        NULL,   /* NO FILE */
-                                        _KartFilesNodeAttr_v1,
-                                        _KartFilesNodeDescribe_v1
-                                        };
-
-static
-rc_t CC
-_KartFilesNodeMake (
-            struct _KartFilesNode ** Node,
-            const char * Name
-)
-{
-    rc_t RCt;
-    struct _KartFilesNode * TheNode;
-
-    RCt = 0;
-    TheNode = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Node )
-    XFS_CAN ( Name )
-
-    TheNode = calloc ( 1, sizeof ( struct _KartFilesNode ) );
-    if ( TheNode == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = XFSNodeInitVT (
-                & ( TheNode -> node),
-                Name,
-                ( const union XFSNode_vt * ) & _sKartFilesNodeVT_v1
-                );
-        if ( RCt == 0 ) {
-
-                /* This is duplicate, but necessary one
-                 */
-            TheNode -> node . vt = 
-                    ( const union XFSNode_vt * ) & _sKartFilesNodeVT_v1
-                    ;
-            * Node = TheNode;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( & ( TheNode -> node ) );
-            TheNode = NULL;
-        }
-    }
-
-/*
-pLogMsg ( klogDebug, "_KartFilesNodeMake ND[$(node)] NM[$(name)]", "node=%p,name=%s", ( void * ) TheNode, Name );
-*/
-
-    return RCt;
-}   /* _KartFilesNodeMake () */
-
-static
-rc_t CC
-_KartFilesNodeMakeEx (
-            struct _KartFilesNode ** Node,
-            const char * Path,
-            const char * Perm
-)
-{
-    struct _KartFilesNode * TempNode;
-    rc_t RCt;
-
-    RCt = 0;
-    TempNode = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Node )
-    XFS_CAN ( Path )
-
-    RCt = _KartFilesNodeMake ( & TempNode, XFS_GAP_KART_FILES_NAME );
-    if ( RCt == 0 ) {
-        RCt = XFS_StrDup ( Path, & ( TempNode -> path ) );
-        if ( RCt == 0 ) {
-            if ( Perm != NULL ) {
-                RCt = XFS_StrDup ( Perm, & ( TempNode -> perm ) );
-            }
-            if ( RCt == 0 ) {
-                TempNode -> version = 0;
-                * Node = TempNode;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( TempNode != NULL ) {
-            XFSNodeDispose ( & ( TempNode -> node ) );
-            TempNode = NULL;
-        }
-    }
-
-    return RCt;
-}   /* _KartFilesNodeMakeEx () */
-
-uint32_t CC
-_KartFilesNodeFlavor_v1 ( const struct XFSNode * self )
-{
-    return _sFlavorOfGapKartFiles;
-}   /* _KartFilesNodeFlavor_v1 () */
-
-static
-rc_t CC
-_KartFilesNodeDispose ( const struct _KartFilesNode * self )
-{
-    struct _KartFilesNode * Node = ( struct _KartFilesNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "_KartFilesNodeDispose ND[$(node)] NM[$(path)]", "node=%p,path=%s", ( void * ) Node, ( Node == NULL ? "" : Node -> path ) );
-*/
-
-    if ( Node != 0 ) {
-
-        if ( Node -> perm != NULL ) {
-            free ( ( char * ) Node -> perm );
-            Node -> perm = NULL;
-        }
-
-        if ( Node -> path != NULL ) {
-            free ( ( char * ) Node -> path );
-            Node -> path = NULL;
-        }
-
-        Node -> version = 0;
-
-        free ( Node );
-    }
-
-    return 0;
-}   /* _KartFilesNodeDispose () */
-
-rc_t CC
-_KartFilesNodeDispose_v1 ( const struct XFSNode * self )
-{
-    return _KartFilesNodeDispose (
-                                ( const struct _KartFilesNode * ) self
-                                );
-}   /* _KartFilesNodeDispose_v1 () */
-
-/*)))
- |||
- +++  Finding node child
- |||
-(((*/
-
-rc_t CC
-_KartFilesNodeFindNode_v1 (
-            const struct XFSNode * self,
-            const struct XFSPath * Path,
-            uint32_t PathIndex,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    uint32_t PathCount;
-    const char * NodeName;
-    struct _KartFilesNode * KartsNode;
-    struct XFSNode * XfsNode;
-    bool IsLast;
-    KDirectory * NativeDir;
-    const struct XFSPath * xPath, * yPath;
-    uint32_t PathType;
-
-    RCt = 0;
-    PathCount = 0;
-    NodeName = NULL;
-    KartsNode = NULL;
-    XfsNode = NULL;
-    IsLast = false;
-    NativeDir = NULL;
-    xPath = yPath = NULL;
-    PathType = kptNotFound;
-
-    RCt = XFSNodeFindNodeCheckInitStandard (
-                                            self,
-                                            Path,
-                                            PathIndex,
-                                            Node,
-                                            & NodeName,
-                                            & PathCount,
-                                            & IsLast
-                                            );
-    if ( RCt == 0 ) {
-        if ( IsLast ) {
-            RCt = XFSNodeAddRef ( self );
-
-            * Node = self;
-
-            return RCt;
-        }
-
-        KartsNode = ( struct _KartFilesNode * ) self;
-        if ( KartsNode -> path == NULL ) {
-            return XFS_RC ( rcInvalid );
-        }
-
-            /*) Here we are trying to create new node
-             (*/
-        RCt = XFSPathFrom (
-                        Path,
-                        PathIndex + 1,
-                        & xPath
-                        );
-        if ( RCt == 0 ) {
-            RCt = XFSPathMake (
-                            & yPath,
-                            true,
-                            "%s/%s",
-                            KartsNode -> path,
-                            XFSPathGet ( xPath )
-                            );
-
-            if ( RCt == 0 ) {
-                RCt = KDirectoryNativeDir ( & NativeDir );
-                if ( RCt == 0 ) {
-                    PathType = KDirectoryPathType (
-                                                NativeDir,
-                                                XFSPathGet ( yPath )
-                                                );
-                    RCt = PathType == kptFile ? 0 : XFS_RC ( rcInvalid );
-                    if ( RCt == 0 ) {
-                        RCt = XFSFileNodeMake (
-                                            & XfsNode,
-                                            XFSPathGet ( yPath ),
-                                            XFSPathName ( yPath ),
-                                            XFSPermRWDefNodeChar ()
-                                            );
-                        if ( RCt == 0 ) {
-                            * Node = XfsNode;
-                        }
-                    }
-
-                    KDirectoryRelease ( NativeDir );
-                }
-
-                XFSPathRelease ( yPath );
-            }
-
-            XFSPathRelease ( xPath );
-        }
-    }
-
-    return RCt;
-}   /* _KartFilesNodeFindNode_v1 () */
-
-/*)))
- |||
- +++  Unified DirEditor
- |||
-(((*/
-static
-rc_t CC
-_KartFilesDir_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-    pLogMsg ( klogDebug, "_KartFilesDir_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( self != NULL ) {
-        free ( ( struct XFSDirEditor * ) self );
-    }
-
-    return 0;
-}   /* _KartFilesDir_dispose_v1 () */
-
-static
-rc_t CC
-_KartFilesDir_list_v1 (
-                        const struct XFSDirEditor * self,
-                        const struct KNamelist ** List
-)
-{
-    const struct _KartFilesNode * Node;
-    struct KNamelist * TempList;
-    rc_t RCt;
-
-    RCt = 0;
-    Node = NULL;
-    TempList = NULL;
-
-    XFS_CSAN ( List )
-    XFS_CAN ( self )
-    XFS_CAN ( List )
-
-    Node = ( const struct _KartFilesNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    XFS_CAN ( Node )
-    XFS_CAN ( Node -> path )
-
-    RCt = XFSGapKartDepotRefresh ();
-    if ( RCt == 0 ) {
-        RCt = XFSGapKartDepotList ( & TempList, 0 );
-        if ( RCt == 0 ) {
-            * List = TempList;
-        }
-        else {
-                /* impossible situation, but ...
-                 */
-            if ( TempList != NULL ) {
-                KNamelistRelease ( TempList );
-            }
-        }
-    }
-
-    return RCt;
-}   /* _KartFilesDir_list_v1 () */
-
-rc_t CC
-_KartFilesDir_find_v1 (
-                        const struct XFSDirEditor * self,
-                        const char * Name,
-                        const struct XFSNode ** Node
-)
-{
-    const struct _KartFilesNode * KartNode;
-    struct XFSNode * TempNode;
-    const struct XFSGapKart * Kart;
-    rc_t RCt;
-
-    RCt = 0;
-    KartNode = NULL;
-    TempNode = NULL;
-    Kart = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( self )
-    XFS_CAN ( Name )
-    XFS_CAN ( Node )
-
-    KartNode = ( const struct _KartFilesNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    XFS_CAN ( KartNode )
-    XFS_CAN ( KartNode -> path )
-
-    RCt = XFSGapKartDepotRefresh ();
-    if ( RCt == 0 ) {
-        RCt = XFSGapKartDepotGet ( & Kart, Name );
-        if ( RCt == 0 ) {
-            RCt = XFSFileNodeMake (
-                                & TempNode,
-                                XFSGapKartPath ( Kart ),
-                                Name,
-                                XFSPermRWDefNodeChar ()
-                                );
-            if ( RCt == 0 ) {
-                * Node = ( const struct XFSNode * ) TempNode;
-            }
-
-            XFSGapKartRelease ( Kart );
-        }
-    }
-
-    return RCt;
-}   /* _KartFilesDir_find_v1 () */
-
-static
-rc_t CC
-_KartFilesDir_create_file_v1 (
-                                const struct XFSDirEditor * self,
-                                const char * Name,
-                                XFSNMode Mode,
-                                const struct XFSHandle ** Handle
-)
-{
-    struct KDirectory * NativeDir;
-    struct KFile * File;
-    bool Update;
-    KCreateMode CreateMode;
-    struct _KartFilesNode * KartFilesNode;
-    struct XFSNode * TempNode;
-    const struct XFSHandle * TempHandle;
-    const struct XFSPath * Path;
-    rc_t RCt;
-
-    NativeDir = NULL;
-    File = NULL;
-    Update = false;
-    CreateMode = kcmCreate;
-    KartFilesNode = NULL;
-    TempNode = NULL;
-    TempHandle = NULL;
-    Path = NULL;
-    RCt = 0;
-
-    XFS_CSAN ( Handle )
-    XFS_CAN ( self )
-    XFS_CAN ( Name )
-    XFS_CAN ( Handle )
-
-    KartFilesNode = ( struct _KartFilesNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    XFS_CAN ( KartFilesNode )
-    XFS_CAN ( KartFilesNode -> path )
-
-    Update = Mode == kxfsReadWrite;
-    CreateMode = kcmCreate;
-
-    RCt = XFSPathMake (
-                    & Path,
-                    false,
-                    "%s/%s",
-                    KartFilesNode -> path,
-                    Name
-                    );
-    if ( RCt == 0 ) {
-        /* Here we are */
-        RCt = KDirectoryNativeDir ( & NativeDir );
-        if ( RCt == 0 ) {
-            RCt = KDirectoryCreateFile (
-                                    NativeDir,
-                                    & File, 
-                                    Update,
-                                    XFSPermRWDefNodeNum (),
-                                    CreateMode,
-                                    XFSPathGet ( Path )
-                                    );
-            if ( RCt == 0 ) {
-                RCt = XFSFileNodeMake (
-                                    & TempNode,
-                                    XFSPathGet ( Path ),
-                                    Name,
-                                    XFSPermRWDefNodeChar ()
-                                    );
-                if ( RCt == 0 ) {
-                    RCt = XFSFileNodeMakeHandle (
-                                                & TempHandle,
-                                                TempNode,
-                                                File
-                                                );
-                    if ( RCt == 0 ) {
-                        * Handle = TempHandle;
-                    }
-                }
-            }
-
-            KDirectoryRelease ( NativeDir );
-        }
-
-        XFSPathRelease ( Path );
-    }
-
-    if ( RCt != 0 ) {
-        * Handle = NULL;
-
-        if ( TempHandle != NULL ) {
-            XFSHandleRelease ( TempHandle );
-        }
-
-        if ( File != NULL ) {
-            KFileRelease ( File );
-        }
-    }
-
-    return RCt;
-}   /* _KartFilesDir_create_file_v1 () */
-
-static
-rc_t CC
-_KartFilesDir_delete_v1 (
-                        const struct XFSDirEditor * self,
-                        const char * Name
-)
-{
-    rc_t RCt;
-    KDirectory * NativeDir;
-    struct _KartFilesNode * KartsNode;
-    const struct XFSPath * Path;
-
-    RCt = 0;
-    NativeDir = NULL;
-    KartsNode = NULL;
-    Path = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Name )
-
-    KartsNode = ( struct _KartFilesNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    XFS_CAN ( KartsNode )
-    XFS_CAN ( KartsNode -> path )
-
-    RCt = XFSPathMake (
-                        & Path,
-                        false,
-                        "%s/%s",
-                        KartsNode -> path,
-                        Name
-                        );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryNativeDir ( & NativeDir );
-        if ( RCt == 0 ) {
-            RCt = KDirectoryRemove (
-                                    NativeDir,
-                                    true,
-                                    XFSPathGet ( Path )
-                                    );
-            KDirectoryRelease ( NativeDir );
-        }
-        XFSPathRelease ( Path );
-    }
-
-    return RCt;
-}   /* _KartFilesDir_delete_v1 () */
-
-rc_t CC
-_KartFilesNodeDir_v1 (
-                    const struct XFSNode * self,
-                    const struct XFSDirEditor ** Dir
-)
-{
-    rc_t RCt;
-    struct XFSDirEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-
-    XFS_CSAN ( Dir )
-    XFS_CAN ( self )
-    XFS_CAN ( Dir )
-
-    Editor = calloc ( 1, sizeof ( struct XFSDirEditor ) );
-    if ( Editor == NULL ) { 
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                        & ( Editor -> Papahen ),
-                        self,
-                        _KartFilesDir_dispose_v1
-                        );
-
-    if ( RCt == 0 ) {
-        Editor -> list = _KartFilesDir_list_v1;
-        Editor -> find = _KartFilesDir_find_v1;
-        Editor -> create_file = _KartFilesDir_create_file_v1;
-        Editor -> delete = _KartFilesDir_delete_v1;
-
-        * Dir = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _KartFilesNodeDir_v1 () */
-
-/*)))
- |||
- +++  Unified Attr
- |||
-(((*/
-
-static
-rc_t CC
-_KartFilesAttr_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-    pLogMsg ( klogDebug, "_KartFilesAttr_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( self != NULL ) {
-        free ( ( struct XFSAttrEditor * ) self );
-    }
-
-    return 0;
-}   /* _KartFilesAttr_dispose_v1 () */
-
-static
-rc_t CC
-_KartFilesAttr_permissions_v1 (
-                        const struct XFSAttrEditor * self,
-                        const char ** Permissions
-)
-{
-    const struct _KartFilesNode * Node = NULL;
-
-    XFS_CSAN ( Permissions )
-    XFS_CAN ( self )
-    XFS_CAN ( Permissions )
-
-    Node = ( const struct _KartFilesNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    XFS_CAN ( Node )
-
-    * Permissions = Node -> perm;
-    if ( * Permissions == NULL ) {
-        * Permissions = XFSPermRWDefContChar ();
-    }
-
-    return 0;
-}   /* _KartFilesAttr_permissions_v1 () */
-
-static
-rc_t CC
-_KartFilesAttr_date_v1 ( const struct XFSAttrEditor * self, KTime_t * Time )
-{
-    const struct _KartFilesNode * Node;
-    KDirectory * NativeDir;
-    KTime_t TempTime;
-    rc_t RCt;
-
-    Node = NULL;
-    NativeDir = NULL;
-    TempTime = 0;
-    RCt = 0;
-
-    XFS_CSA ( Time, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Time )
-
-    Node = ( const struct _KartFilesNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    XFS_CAN ( Node )
-
-    RCt = KDirectoryNativeDir ( & NativeDir );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryDate ( NativeDir, & TempTime, Node -> path );
-        if ( RCt == 0 ) {
-            * Time = TempTime;
-        }
-
-        KDirectoryRelease ( NativeDir );
-    }
-
-    return RCt;
-}   /* _KartFilesAttr_date_v1 () */
-
-static
-rc_t CC
-_KartFilesAttr_type_v1 (
-                    const struct XFSAttrEditor * self,
-                    XFSNType * Type
-)
-{
-    XFS_CSA ( Type, kxfsNotFound )
-    XFS_CAN ( self )
-    XFS_CAN ( Type )
-
-    if ( XFSEditorNode ( & ( self -> Papahen ) ) == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    * Type = kxfsDir;
-
-    return 0;
-}   /* _KartFilesAttr_type_v1 () */
-
-static
-rc_t CC
-_KartFilesNodeAttr_v1 (
-                        const struct XFSNode * self,
-                        const struct XFSAttrEditor ** Attr
-)
-{
-    rc_t RCt;
-    struct XFSAttrEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-
-    XFS_CSAN ( Attr )
-    XFS_CAN ( self )
-    XFS_CAN ( Attr )
-
-    Editor = calloc ( 1, sizeof ( struct XFSAttrEditor ) );
-    if ( Editor == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _KartFilesAttr_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> permissions = _KartFilesAttr_permissions_v1;
-        Editor -> date = _KartFilesAttr_date_v1;
-        Editor -> type = _KartFilesAttr_type_v1;
-
-        * Attr = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _KartFilesNodeAttr_v1 () */
-
-/*)))
- |||
- +++  Unified Discribe
- |||
-(((*/
-
-rc_t CC
-_KartFilesNodeDescribe_v1 (
-            const struct XFSNode * self,
-            char * Buffer,
-            size_t BufferSize
-)
-{
-    rc_t RCt;
-    size_t NumWrit;
-    const char * Abbr;
-
-    RCt = 0;
-    NumWrit = 0;
-    Abbr = NULL;
-
-    XFS_CAN ( Buffer )
-    XFS_CA ( BufferSize, 0 )
-
-    * Buffer = 0;
-
-    Abbr = "KART-FILES";
-
-    if ( self == NULL ) {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[NULL][NULL]",
-                    Abbr
-                    );
-    }
-    else {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[%s][0x%p]",
-                    Abbr,
-                    self -> Name,
-                    self
-                    );
-    }
-
-    return RCt;
-}   /* _KartFilesNodeDescribe_v1 () */
-
-/*))
- ((     Node make/dispose
-  ))
- ((*/
-
-/*)))
- |||
- +++    Non-Teleport methods to create nodes
- |||
-(((*/
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartFilesNodeMake (
-            struct XFSNode ** Node,
-            const char * Perm
-)
-{
-    rc_t RCt;
-    struct _KartFilesNode * TheNode;
-
-    RCt = 0;
-    TheNode = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Node )
-
-    RCt = _KartFilesNodeMakeEx (
-                                & TheNode,
-                                XFSGapKartDepotPath (),
-                                Perm
-                                );
-    if ( RCt == 0 ) {
-        * Node = & ( TheNode -> node );
-    }
-
-    return RCt;
-}   /* XFSDirNodeMake () */
-
-/*)))
- |||
- +++    KartFilesNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_KartFilesNodeConstructor (
-                        const struct XFSModel * Model,
-                        const struct XFSModelNode * Template,
-                        const char * Alias,
-                        const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct _KartFilesNode * TheNode;
-    const char * NodePath;
-
-    RCt = 0;
-    TheNode = NULL;
-    NodePath = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Model )
-    XFS_CAN ( Template )
-    XFS_CAN ( Node )
-
-    NodePath = XFSModelNodeProperty ( Template, XFS_MODEL_SOURCE );
-    if ( NodePath == NULL ) {
-        NodePath = XFSGapKartDepotPath ();
-    }
-
-    RCt = _KartFilesNodeMakeEx (
-                                & TheNode,
-                                NodePath,
-                                XFSModelNodeSecurity ( Template )
-                                );
-    if ( RCt == 0 ) {
-        * Node = ( struct XFSNode * ) TheNode;
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( TheNode != NULL ) {
-            _KartFilesNodeDispose ( TheNode );
-        }
-    }
-
-/*
-pLogMsg ( klogDebug, "_KartFilesNodeConstructor ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _KartFilesNodeConstructor () */
-
-static
-rc_t CC
-_KartFilesNodeValidator (
-                        const struct XFSModel * Model,
-                        const struct XFSModelNode * Template,
-                        const char * Alias,
-                        uint32_t Flags
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_KartFilesNodeValidator ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _KartFilesNodeValidator () */
-
-
-static const struct XFSTeleport _sKartFilesNodeTeleport = {
-                                            _KartFilesNodeConstructor,
-                                            _KartFilesNodeValidator,
-                                            false
-                                            };
-
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartFilesProvider ( const struct XFSTeleport ** Teleport )
-{
-    if ( Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = & _sKartFilesNodeTeleport;
-
-    return 0;
-}   /* XFSGapKartFilesProvider () */
diff --git a/libs/xfs/gapks.c b/libs/xfs/gapks.c
deleted file mode 100644
index 2df0ec5..0000000
--- a/libs/xfs/gapks.c
+++ /dev/null
@@ -1,882 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/namelist.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/path.h>
-#include <xfs/editors.h>
-#include <xfs/perm.h>
-
-#include "mehr.h"
-#include "schwarzschraube.h"
-#include "ncon.h"
-#include "teleport.h"
-#include "common.h"
-#include "xgapk.h"
-
-#include <sysalloc.h>
-
-/*)))
-  |||
-  +++    That is second approach for reading Kart files.
-  +++    Represents KartNode container
-  |||
-  (((*/
-
-#define XFS_GAP_KART_NAME "karts"
-
-struct XFSGapKartsNode {
-    struct XFSNode node;
-
-    const struct XFSNodeContainer * container;
-
-    uint32_t project_id;
-
-    uint64_t version;
-};
-
-/*)))
- |||
- +++    Simple Container virtual table is Living here :lol:
- |||
-(((*/
-static rc_t CC _GapKartsNodeFlavor_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _GapKartsNodeDispose_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _GapKartsNodeFindNode_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSPath * Path,
-                                uint32_t PathIndex,
-                                const struct XFSNode ** Node
-                                );
-static rc_t CC _GapKartsNodeDir_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSDirEditor ** Dir
-                                );
-static rc_t CC _GapKartsNodeAttr_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSAttrEditor ** Attr
-                                );
-static rc_t CC _GapKartsNodeDescribe_v1 (
-                                const struct XFSNode * self,
-                                char * Buffer,
-                                size_t BufferSize
-                                );
-
-static const struct XFSNode_vt_v1 _sGapKartsNodeVT_v1 = {
-                                            1, 1,   /* nin naj */
-                                            _GapKartsNodeFlavor_v1,
-                                            _GapKartsNodeDispose_v1,
-                                            _GapKartsNodeFindNode_v1,
-                                            _GapKartsNodeDir_v1,
-                                            NULL,
-                                            _GapKartsNodeAttr_v1,
-                                            _GapKartsNodeDescribe_v1
-                                            };
-
-static
-rc_t CC
-_GapKartsNodeDispose ( const struct XFSGapKartsNode * self )
-{
-    struct XFSGapKartsNode * Node = ( struct XFSGapKartsNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "_GapKartsNodeDispose ( $(node) )", "node=%p", ( void * ) Node );
-*/
-
-    if ( Node != 0 ) {
-        if ( Node -> container != NULL ) {
-            XFSNodeContainerRelease ( Node -> container );
-            Node -> container = NULL;
-        }
-
-        Node -> project_id = 0;
-        Node -> version = 0;
-
-        free ( Node );
-    }
-
-    return 0;
-}   /* _GapKartsNodeDispose () */
-
-/*)))
- |||
- +++    Here we are creating and disposing that node
- |||
-(((*/
-
-uint32_t CC
-_GapKartsNodeFlavor_v1 ( const struct XFSNode * self )
-{
-    return _sFlavorOfGapKarts;
-}   /* _GapKartsNodeFlavor_v1 () */
-
-rc_t CC
-_GapKartsNodeDispose_v1 ( const struct XFSNode * self )
-{
-    return _GapKartsNodeDispose (
-                                ( const struct XFSGapKartsNode * ) self
-                                );
-}   /* _GapKartsNodeDispose_v1 () */
-
-/*)))
- (((    First check itself and all others after.
-  )))
- (((*/
-rc_t CC
-_GapKartsNodeFindNode_v1 (
-                    const struct XFSNode * self,
-                    const struct XFSPath * Path,
-                    uint32_t PathIndex,
-                    const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    uint32_t PathCount;
-    const char * NodeName;
-    bool IsLast;
-    const struct XFSNode * NextNode;
-
-    RCt = 0;
-    PathCount = 0;
-    NodeName = NULL;
-    IsLast = false;
-    NextNode = NULL;
-
-        /* Standard check-initialization */
-    RCt = XFSNodeFindNodeCheckInitStandard (
-                                            self,
-                                            Path,
-                                            PathIndex,
-                                            Node,
-                                            & NodeName,
-                                            & PathCount,
-                                            & IsLast
-                                            );
-    if ( RCt == 0 ) {
-
-            /* If node is last - that is */
-        if ( IsLast ) {
-            RCt = XFSNodeAddRef ( self );
-
-            * Node = self;
-
-            return RCt;
-        }
-
-            /*  Here we aren't last and looking forward; */
-        NodeName = XFSPathPartGet ( Path, PathIndex + 1 );
-
-            /*))  Should not happen thou
-             ((*/
-        if ( NodeName == NULL ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-
-            RCt = XFSNodeContainerGet (
-                    ( ( const struct XFSGapKartsNode * ) self )
-                                                        -> container,
-                    NodeName,
-                    & NextNode
-                    );
-            if ( RCt == 0 ) {
-
-                RCt = XFSNodeFindNode (
-                                    NextNode,
-                                    Path,
-                                    PathIndex + 1,
-                                    Node
-                                    );
-            }
-        }
-    }
-
-    return RCt;
-}   /* _GapKartsNodeFindNode_v1 () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))  So, Directory
- (((*/
-
-static
-rc_t CC
-_GapKartsNodeDir_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-pLogMsg ( klogDebug, "_GapKartsNodeDir_dispose_ ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( self != 0 ) {
-        free ( ( struct XFSDirEditor * ) self );
-    }
-
-    return 0;
-}   /* _GapKartsNodeDir_dispose_v1 () */
-
-static
-rc_t CC
-_GapKartsNodeDir_find_v1 (
-                        const struct XFSDirEditor * self,
-                        const char * Name,
-                        const struct XFSNode ** Node
-)
-{
-    struct XFSGapKartsNode * Cont = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Node )
-    XFS_CAN ( Name )
-    XFS_CAN ( Node )
-
-    Cont = ( struct XFSGapKartsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( Cont == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-    return XFSNodeContainerGet ( Cont -> container, Name, Node );
-}   /* _GapKartsNodeDir_find_v1 () */
-
-static rc_t CC _UpdateKarts ( struct XFSGapKartsNode * Node );
-
-static
-rc_t CC
-_GapKartsNodeDir_list_v1 (
-                        const struct XFSDirEditor * self,
-                        const struct KNamelist ** List
-)
-{
-    rc_t RCt;
-    struct XFSGapKartsNode * Cont;
-
-    RCt = 0;
-    Cont = NULL;
-
-    XFS_CSAN ( List )
-    XFS_CAN ( self )
-    XFS_CAN ( List )
-
-    Cont = ( struct XFSGapKartsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( Cont == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = _UpdateKarts ( Cont );
-    if ( RCt == 0 ) {
-        RCt = XFSNodeContainerList ( Cont -> container, List );
-    }
-
-    return RCt;
-}   /* _GapKartsNodeDir_list_v1 () */
-
-rc_t CC
-_GapKartsNodeDir_v1 (
-                    const struct XFSNode * self,
-                    const struct XFSDirEditor ** Dir
-)
-{
-    rc_t RCt;
-    struct XFSDirEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-
-    XFS_CSAN ( Dir )
-    XFS_CAN ( self )
-    XFS_CAN ( Dir )
-
-    Editor = calloc ( 1, sizeof ( struct XFSDirEditor ) );
-    if ( Editor == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                        & ( Editor -> Papahen ),
-                        self,
-                        _GapKartsNodeDir_dispose_v1
-                        );
-    if ( RCt == 0 ) {
-        Editor -> list = _GapKartsNodeDir_list_v1;
-        Editor -> find = _GapKartsNodeDir_find_v1;
-
-        * Dir = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _GapKartsNodeDir_v1 () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))  So, Attributes
- (((*/
-
-static
-rc_t CC
-_GapKartsNodeAttr_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-pLogMsg ( klogDebug, "_GapKartsNodeAttr_dispose_ ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( self != 0 ) {
-        free ( ( struct XFSAttrEditor * ) self );
-    }
-
-    return 0;
-}   /* _GapKartsNodeAttr_dispose_v1 () */
-
-static
-rc_t CC
-_GapKartsNodeAttr_permissions_v1 (
-                            const struct XFSAttrEditor * self,
-                            const char ** Permissions
-                            )
-{
-    XFS_CSAN ( Permissions )
-    XFS_CAN ( self )
-    XFS_CAN ( Permissions )
-
-    XFS_CAN ( XFSEditorNode ( & ( self -> Papahen ) ) )
-
-    * Permissions = XFSPermRODefContChar ();
-
-    return 0;
-}   /* _GapKartsNodeAttr_permisiions_v1 () */
-
-static
-rc_t CC
-_GapKartsNodeAttr_date_v1 (
-                            const struct XFSAttrEditor * self,
-                            KTime_t * Time
-)
-{
-    XFS_CSA ( Time, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Time )
-    XFS_CAN ( XFSEditorNode ( & ( self -> Papahen ) ) );
-
-    XFSGapKartDepotRefresh ();
-
-    return 0;
-}   /* _GapKartsNodeAttr_date_v1 () */
-
-static
-rc_t CC
-_GapKartsNodeAttr_type_v1 (
-                            const struct XFSAttrEditor * self,
-                            XFSNType * Type
-)
-{
-    XFS_CSA ( Type, kxfsNotFound )
-    XFS_CAN ( self )
-    XFS_CAN ( Type )
-    XFS_CAN ( XFSEditorNode ( & ( self -> Papahen ) ) )
-
-    XFSGapKartDepotRefresh ();
-
-    * Type = kxfsDir;
-
-    return 0;
-}   /* _GapKartsNodeAttr_type_v1 () */
-
-rc_t CC
-_GapKartsNodeAttr_v1 (
-                    const struct XFSNode * self,
-                    const struct XFSAttrEditor ** Attr
-)
-{
-    rc_t RCt;
-    struct XFSAttrEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-
-    XFS_CSAN ( Attr )
-    XFS_CAN ( self )
-    XFS_CAN ( Attr )
-
-    Editor = calloc ( 1, sizeof ( struct XFSAttrEditor ) );
-    if ( Editor == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                        & ( Editor -> Papahen ),
-                        self,
-                        _GapKartsNodeAttr_dispose_v1
-                        );
-    if ( RCt == 0 ) {
-        Editor -> permissions = _GapKartsNodeAttr_permissions_v1;
-        Editor -> date = _GapKartsNodeAttr_date_v1;
-        Editor -> type = _GapKartsNodeAttr_type_v1;
-
-        * Attr = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return 0;
-}   /* _GapKartsNodeAttr_v1 () */
-
-rc_t CC
-_GapKartsNodeDescribe_v1 (
-                        const struct XFSNode * self,
-                        char * Buffer,
-                        size_t BufferSize
-)
-{
-    rc_t RCt;
-    size_t NumWrit;
-
-    RCt = 0;
-    NumWrit = 0;
-
-    if ( Buffer == NULL || BufferSize == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-    * Buffer = 0;
-
-    if ( self == NULL ) {
-        RCt = string_printf (
-                        Buffer,
-                        BufferSize,
-                        & NumWrit,
-                        "NODE (KARTS)[NULL][NULL]"
-                        );
-    }
-    else {
-        RCt = string_printf (
-                        Buffer,
-                        BufferSize,
-                        & NumWrit,
-                        "NODE (KARTS)[%s][0x%p]",
-                        self -> Name,
-                        self
-                        );
-    }
-
-    return RCt;
-}   /* _GapKartsNodeDescribe_v1 () */
-
-/*)))
- |||
- +++    KartNode
- |||
-(((*/
-
-static
-rc_t CC
-_LoadKart ( struct XFSGapKartsNode * Node, const char * KartName )
-{
-    rc_t RCt;
-    struct XFSNode * KartNode;
-
-    RCt = 0;
-    KartNode = NULL;
-
-    XFS_CAN ( Node )
-    XFS_CAN ( KartName )
-
-    RCt = XFSGapKartNodeMake (
-                            & KartNode,
-                            KartName,
-                            Node -> project_id,
-                            NULL
-                            );
-    if ( RCt == 0 ) {
-        RCt = XFSNodeContainerAdd ( Node -> container, KartNode );
-    }
-    else {
-            /*  Some Karts could be damaged 
-             |  we should think about it later
-             */
-        pLogMsg ( klogWarn, "Invalid Kart file [$(name)]", "name=%s", KartName );
-        RCt = 0;
-    }
-
-    return RCt;
-}   /* _LoadKart () */
-
-static 
-rc_t CC
-_LoadKarts ( struct XFSGapKartsNode * Node )
-{
-    rc_t RCt;
-    struct KNamelist * KartNames;
-    uint32_t qty, llp;
-    const char * Name;
-
-    RCt = 0;
-    KartNames = NULL;
-    qty = llp = 0;
-    Name = NULL;
-
-    XFS_CAN ( Node )
-
-    RCt = XFSGapKartDepotList ( & KartNames, Node -> project_id );
-    if ( RCt == 0 ) {
-        RCt = KNamelistCount ( KartNames, & qty );
-        if ( RCt == 0 ) {
-            for ( llp = 0; llp < qty; llp ++ ) {
-                RCt = KNamelistGet ( KartNames, llp, & Name );
-                if ( RCt == 0 ) {
-                    RCt = _LoadKart ( Node, Name );
-                }
-
-                RCt = 0;
-            }
-        }
-
-        KNamelistRelease ( KartNames );
-    }
-
-    if ( RCt != 0 ) {
-            /*  Sorry, we just were unable to load any Kart
-             */
-        RCt = 0;
-    }
-
-    return RCt;
-}   /* _LoadKarts () */
-
-rc_t CC
-_UpdateKarts ( struct XFSGapKartsNode * Node )
-{
-    rc_t RCt;
-    uint64_t Version;
-
-    RCt = 0;
-    Version = 0;
-
-    XFS_CAN ( Node );
-
-
-    RCt = XFSGapKartDepotRefresh ();
-    if ( RCt == 0 ) {
-        RCt = XFSGapKartDepotVersion ( & Version );
-        if ( RCt == 0 ) {
-            if ( Version != Node -> version ) {
-                RCt = XFSNodeContainerClear ( Node -> container );
-                if ( RCt == 0 ) {
-                    RCt = _LoadKarts ( Node );
-                    if ( RCt == 0 ) {
-                        Node -> version = Version;
-                    }
-                }
-            }
-        }
-    }
-
-    return RCt;
-}   /* _UpdateKarts () */
-
-/*))
- ((     Node make/dispose
-  ))
- ((*/
-
-static
-rc_t CC
-_GapKartsNodeMake (
-                const char * Name,
-                uint32_t ProjectId,
-                const char * Perm,
-                struct XFSGapKartsNode ** Node
-)
-{
-    rc_t RCt;
-    struct XFSGapKartsNode * KartNode;
-
-    RCt = 0;
-    KartNode = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Name )
-    XFS_CAN ( Node )
-
-    KartNode = calloc ( 1, sizeof ( struct XFSGapKartsNode ) );
-    if ( KartNode == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = XFSNodeInitVT (
-                    & ( KartNode -> node ),
-                    Name,
-                    ( const union XFSNode_vt * ) & _sGapKartsNodeVT_v1
-                    );
-        if ( RCt == 0 ) {
-
-            RCt = XFSNodeContainerMake ( & ( KartNode -> container ) );
-            if ( RCt == 0 ) {
-                KartNode -> project_id = ProjectId;
-                KartNode -> version = 0;
-                if ( _UpdateKarts ( KartNode )  == 0 ) {
-
-                    * Node = KartNode;
-                }
-            }
-        }
-    }
-
-    return RCt;
-}   /* _GapKartsNodeMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartsNodeMake (
-            struct XFSNode ** Node,
-            uint32_t ProjectId,
-            const char * Perm
-)
-{
-    rc_t RCt;
-    struct XFSGapKartsNode * KartNode;
-
-    RCt = 0;
-    KartNode = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Node )
-
-    RCt = _GapKartsNodeMake (
-                            XFS_GAP_KART_NAME,
-                            ProjectId,
-                            Perm,
-                            & KartNode
-                            );
-    if ( RCt == 0 ) {
-        * Node = & ( KartNode -> node );
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( KartNode != NULL ) {
-            XFSNodeDispose ( & ( KartNode -> node ) );
-            KartNode = NULL;
-        }
-    }
-
-/*
-pLogMsg ( klogDebug, "XFSKartNodeMake ND[$(node)] NM[$(name)] PJ[$(project_id)]", "node=%p,name=%s,project_id=%d", ( void * ) Node, XFS_GAP_KART_NAME, ProjectId );
-*/
-
-    return RCt;
-}   /* XFSGapKartsNodeMake () */
-
-static
-rc_t CC
-_GapKartsNodeMakeFromModel (
-                    const char * Name,
-                    const struct XFSModel * Model,
-                    const struct XFSModelNode * Template,
-                    struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct XFSGapKartsNode * KartNode;
-    const char * TempStr;
-    uint32_t ProjectId;
-
-    RCt = 0;
-    KartNode = NULL;
-    TempStr = NULL;
-    ProjectId = 0;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Name )
-    XFS_CAN ( Model )
-    XFS_CAN ( Template )
-    XFS_CAN ( Node )
-
-    TempStr = XFSModelNodeProperty ( Template, XFS_MODEL_PROJECTID );
-    if ( TempStr == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    ProjectId = atol ( TempStr );
-    if ( ProjectId == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = _GapKartsNodeMake (
-                            XFS_GAP_KART_NAME,
-                            ProjectId,
-                            XFSModelNodeSecurity ( Template ),
-                            & KartNode
-                            );
-    if ( RCt == 0 ) {
-        RCt = _LoadKarts ( KartNode );
-        if ( RCt == 0 ) {
-            * Node = & ( KartNode -> node );
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( KartNode != NULL ) {
-            XFSNodeDispose ( & ( KartNode -> node ) );
-            KartNode = NULL;
-        }
-    }
-
-/*
-pLogMsg ( klogDebug, "KartNodeMakeFromModel ND[$(node)] NM[$(name)] TP[$(project_id)]", "node=%p,name=%s,project_id=%d", ( void * ) Node, Name, ProjectId );
-*/
-
-    return RCt;
-}   /* _GapKartsNodeMakeFromModel () */
-
-static
-rc_t CC
-_GapKartsNodeConstructorEx (
-                        const struct XFSModel * Model,
-                        const struct XFSModelNode * Template,
-                        const char * Alias,
-                        const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct XFSNode * TheNode;
-    const char * NodeName;
-
-    RCt = 0;
-    TheNode = NULL;
-    NodeName = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Model )
-    XFS_CAN ( Template )
-    XFS_CAN ( Node )
-
-    NodeName = Alias == NULL ? XFSModelNodeName ( Template ) : Alias;
-
-    RCt = _GapKartsNodeMakeFromModel (
-                                    NodeName,
-                                    Model,
-                                    Template,
-                                    & TheNode
-                                    );
-
-    if ( RCt == 0 ) {
-        * Node = TheNode;
-    }
-    else {
-        * Node = NULL;
-
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( TheNode );
-        }
-    }
-
-    return RCt;
-}   /* _GapKartsNodeConstructorEx () */
-
-/*)))
- |||
- +++    FileNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_GapKartsNodeConstructor (
-                        const struct XFSModel * Model,
-                        const struct XFSModelNode * Template,
-                        const char * Alias,
-                        const struct XFSNode ** Node
-)
-{
-    rc_t RCt = _GapKartsNodeConstructorEx (
-                                            Model,
-                                            Template,
-                                            Alias,
-                                            Node
-                                            );
-
-/*
-pLogMsg ( klogDebug, "_GapKartsNodeConstructor ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-
-    return RCt;
-}   /* _GapKartsNodeConstructor () */
-
-static
-rc_t CC
-_GapKartsNodeValidator (
-                        const struct XFSModel * Model,
-                        const struct XFSModelNode * Template,
-                        const char * Alias,
-                        uint32_t Flags
-)
-{
-    rc_t RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_GapKartsNodeValidator ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _GapKartsNodeValidator () */
-
-static const struct XFSTeleport _sGapKartsNodeTeleport = {
-                                            _GapKartsNodeConstructor,
-                                            _GapKartsNodeValidator,
-                                            false
-                                            };
-
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartsProvider ( const struct XFSTeleport ** Teleport )
-{
-    XFS_CSAN ( Teleport )
-    XFS_CAN ( Teleport )
-
-    * Teleport = & _sGapKartsNodeTeleport;
-
-    return 0;
-}   /* XFSGapKartsProvider () */
diff --git a/libs/xfs/handle.c b/libs/xfs/handle.c
deleted file mode 100644
index fde9411..0000000
--- a/libs/xfs/handle.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/refcount.h>
-#include <klib/text.h>
-
-#include <kfs/file.h>
-#include <vfs/path.h>
-
-#include <xfs/handle.h>
-#include <xfs/node.h>
-
-#include <sysalloc.h>
-
-static const char * XFSHandle_classname = "XFSHandle";
-
-struct XFSHandle {
-    KRefcount refcount;
-
-    const struct XFSNode * Node;
-
-    void * Handle;
-};
-
-/*))
- // Creating Handle from scratch, OMG!
-((*/
-LIB_EXPORT
-rc_t CC
-XFSHandleMake (
-                const struct XFSNode * Node,
-                const struct XFSHandle ** Handle
-)
-{
-    rc_t RCt;
-    struct XFSHandle * RetVal;
-
-    RCt = 0;
-    RetVal = NULL;
-
-    if ( Node == NULL || Handle == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Handle = NULL;
-
-    RetVal = ( struct XFSHandle * ) calloc (
-                                        1,
-                                        sizeof ( struct XFSHandle )
-                                        );
-    if ( RetVal == NULL ) { 
-        return XFS_RC ( rcNull );
-    }
-    
-    RCt = XFSNodeAddRef ( Node );
-    if ( RCt == 0 ) {
-        KRefcountInit ( 
-                    & ( RetVal -> refcount ),
-                    1,
-                    XFSHandle_classname,
-                    "XFSHandleMake",
-                    "Node Handle"
-                    );
-
-        RetVal -> Node = Node;
-    }
-
-    if ( RCt != 0 ) {
-        free ( RetVal );
-    }
-    else {
-        * Handle = RetVal;
-    }
-
-    return RCt;
-}   /* XFSHandleMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSHandleDestroy ( const struct XFSHandle * self )
-{
-    struct XFSHandle * Handle = ( struct XFSHandle * ) self;
-    if ( Handle != NULL ) { 
-        KRefcountWhack ( & ( Handle -> refcount ), XFSHandle_classname );
-
-        if ( Handle -> Node != NULL ) {
-            XFSNodeRelease ( Handle -> Node );
-
-            Handle -> Node = NULL;
-        }
-
-        if ( Handle -> Handle != NULL ) {
-            /* TODO !!! Warning about active handle */
-
-            Handle -> Handle = NULL;
-        }
-
-        free ( Handle );
-    }
-
-    return 0;
-}   /* XFSHandleDestroy () */
-
-LIB_EXPORT
-rc_t CC
-XFSHandleAddRef ( const struct XFSHandle * self )
-{
-    rc_t RCt;
-    int32_t RetCode;
-    struct XFSHandle * Handle;
-
-    RCt = 0;
-    RetCode = 0;
-    Handle = ( struct XFSHandle * ) self;
-    if ( Handle != NULL ) {
-        RetCode = KRefcountAdd (
-                        & ( Handle -> refcount ),
-                        XFSHandle_classname
-                        );
-        switch ( RetCode ) {
-            case krefOkay :
-                    RCt = 0;
-                    break;
-            case krefZero :
-            case krefLimit :
-            case krefNegative :
-                    RCt = RC ( rcFS, rcNoTarg, rcAttaching, rcRefcount, rcInvalid );
-                    break;
-            default :
-                    RCt = RC ( rcFS, rcNoTarg, rcAttaching, rcRefcount, rcUnknown );
-                    break;
-        }
-    }
-
-    return RCt;
-}   /* XFSHandleAddRef () */
-
-LIB_EXPORT
-rc_t CC
-XFSHandleRelease ( const struct XFSHandle * self )
-{
-    rc_t RCt;
-    int32_t RetCode;
-    struct XFSHandle * Handle;
-
-    RCt = 0;
-    RetCode = 0;
-    Handle = ( struct XFSHandle * ) self;
-    if ( Handle != NULL ) {
-        RetCode = KRefcountDrop (
-                        & ( Handle -> refcount ),
-                        XFSHandle_classname
-                        );
-        switch ( RetCode ) {
-            case krefOkay :
-            case krefZero :
-                    RCt = 0;
-                    break;
-            case krefWhack :
-                    XFSHandleDestroy ( Handle );
-                    break;
-            case krefNegative :
-                    RCt = RC ( rcFS, rcNoTarg, rcAttaching, rcRefcount, rcInvalid );
-                    break;
-            default :
-                    RCt = RC ( rcFS, rcNoTarg, rcAttaching, rcRefcount, rcUnknown );
-                    break;
-        }
-    }
-
-    return RCt;
-}   /* XFSHandleRelease () */
-
-LIB_EXPORT
-void * CC
-XFSHandleGet ( const struct XFSHandle * self )
-{
-    return self == NULL ? NULL : ( self -> Handle );
-}   /* XFSHandleGetType () */
-
-LIB_EXPORT
-rc_t CC
-XFSHandleSet ( const struct XFSHandle * self, void * Handle )
-{
-    struct XFSHandle * Self;
-
-    Self = ( struct XFSHandle * ) self;
-
-    if ( Self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Self -> Handle = Handle;
-
-    return 0;
-}   /* XFSHandleSet () */
-
-LIB_EXPORT
-const struct XFSNode * CC
-XFSHandleNode ( const struct XFSHandle * self )
-{
-    return self == NULL ? NULL : ( self -> Node );
-}   /* XFSHandleNode () */
-
diff --git a/libs/xfs/http.c b/libs/xfs/http.c
deleted file mode 100644
index e894342..0000000
--- a/libs/xfs/http.c
+++ /dev/null
@@ -1,1300 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/path.h>
-#include <xfs/editors.h>
-#include <xfs/handle.h>
-#include <xfs/perm.h>
-
-#include "xhttp.h"
-#include "mehr.h"
-#include "schwarzschraube.h"
-#include "teleport.h"
-#include "common.h"
-
-#include <sysalloc.h>
-
-#include <string.h>     /* memset */
-
-/*)))
- |||    That file contains 'remote' XFSHttp based nodes
-(((*/
-
-/*)))
- |||
- +++    RemoteRepositoryNode, HttpNode, and others
- |||
-(((*/
-struct XFSHttpNode {
-    struct XFSNode node;
-
-    const struct XFSHttpEntry * entry;
-};
-
-struct XFSHttpRootNode {
-    struct XFSHttpNode node;
-
-    const struct XFSHttp * http;
-};
-
-struct XFSHttpFileEditor {
-    struct XFSFileEditor Papahen;
-
-    const struct XFSHttpReader * reader;
-};
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*                                                               *_*/
-/*_* HttpNode is living here                                       *_*/
-/*_*                                                               *_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))
- |||
- +++    HttpNode virtual table is Living here :lol:
- |||
-(((*/
-static rc_t CC _HttpNodeFlavor_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _HttpNodeDispose_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _HttpRootNodeDispose_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _HttpNodeFindNode_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSPath * Path,
-                                uint32_t PathIndex,
-                                const struct XFSNode ** Node
-                                );
-static rc_t CC _HttpNodeDir_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSDirEditor ** Dir
-                                );
-static rc_t CC _HttpNodeFile_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSFileEditor ** File
-                                );
-static rc_t CC _HttpNodeAttr_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSAttrEditor ** Attr
-                                );
-static rc_t CC _HttpNodeDescribe_v1 (
-                                const struct XFSNode * self,
-                                char * Buffer,
-                                size_t BufferSize
-                                );
-
-static const struct XFSNode_vt_v1 _sHttpRootNodeVT_v1 = {
-                                        1, 1,   /* nin naj */
-                                        _HttpNodeFlavor_v1,
-                                        _HttpRootNodeDispose_v1,
-                                        _HttpNodeFindNode_v1,
-                                        _HttpNodeDir_v1,
-                                        _HttpNodeFile_v1,
-                                        _HttpNodeAttr_v1,
-                                        _HttpNodeDescribe_v1
-                                        };
-
-static const struct XFSNode_vt_v1 _sHttpNodeVT_v1 = {
-                                        1, 1,   /* nin naj */
-                                        _HttpNodeFlavor_v1,
-                                        _HttpNodeDispose_v1,
-                                        NULL,
-                                        _HttpNodeDir_v1,
-                                        _HttpNodeFile_v1,
-                                        _HttpNodeAttr_v1,
-                                        _HttpNodeDescribe_v1
-                                        };
-
-
-static
-rc_t CC
-XFSHttpNodeMake (
-    struct XFSNode ** Node,
-    const char * Name,
-    const struct XFSHttpEntry * Entry
-)
-{
-    rc_t RCt;
-    struct XFSHttpNode * xNode;
-
-    RCt = 0;
-    xNode = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Node == NULL || Name == NULL || Entry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    xNode = calloc ( 1, sizeof ( struct XFSHttpNode ) );
-    if ( xNode == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = XFSNodeInitVT (
-                    & ( xNode -> node ),
-                    Name,
-                    ( const union XFSNode_vt * ) & _sHttpNodeVT_v1
-                    );
-
-    if ( RCt == 0 ) {
-        RCt = XFSHttpEntryAddRef ( Entry );
-        if ( RCt == 0 ) {
-            xNode -> entry = Entry;
-
-            * Node = & ( xNode -> node );
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( xNode != NULL ) {
-            RCt = XFSNodeDispose ( & ( xNode -> node ) );
-        }
-    }
-
-    return RCt;
-}   /* XFSHttpNodeMake () */
-
-static
-rc_t CC
-XFSHttpRootNodeMake (
-    struct XFSNode ** Node,
-    const char * Name,
-    const char * BaseUrl
-)
-{
-    rc_t RCt;
-    struct XFSHttpRootNode * xNode;
-    const struct XFSHttp * Http;
-    const struct XFSHttpEntry * Entry;
-
-    RCt = 0;
-    xNode = NULL;
-    Http = NULL;
-    Entry = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Node == NULL || Name == NULL || BaseUrl == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    xNode = calloc ( 1, sizeof ( struct XFSHttpRootNode ) );
-    if ( xNode == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSNodeInitVT (
-                    & ( xNode -> node . node),
-                    Name,
-                    ( const union XFSNode_vt * ) & _sHttpRootNodeVT_v1
-                    );
-    if ( RCt == 0 ) {
-        RCt = XFSHttpMake ( BaseUrl, & Http );
-        if ( RCt == 0 ) {
-            Entry = XFSHttpGetEntry ( Http, "/" );
-            if ( Entry == NULL ) {
-                RCt = XFS_RC ( rcInvalid );
-            }
-            else {
-                xNode -> node . entry = Entry;
-                xNode -> http = Http;
-
-                * Node = & ( xNode -> node . node );
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( xNode != NULL ) {
-            XFSNodeDispose ( ( const struct XFSNode * ) & ( xNode -> node ) );
-        }
-    }
-
-    return RCt;
-}   /* XFSHttpRootNodeMake () */
-
-uint32_t CC
-_HttpNodeFlavor_v1 ( const struct XFSNode * self )
-{
-    return _sFlavorOfHttp;
-}   /* _HttpNodeFlavor_v1 () */
-
-static
-rc_t CC
-XFSHttpNodeDispose ( const struct XFSHttpNode * self )
-{
-    struct XFSHttpNode * Node = ( struct XFSHttpNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "XFSHttpNodeDispose ( $(node) )]", "node=%p", ( void * ) Node );
-*/
-
-    if ( Node == 0 ) {
-        return 0;
-    }
-
-    if ( Node -> entry != NULL ) {
-        XFSHttpEntryRelease ( Node -> entry );
-        Node -> entry = NULL;
-    }
-
-    free ( Node );
-
-    return 0;
-}   /* XFSHttpNodeDispose () */
-
-static
-rc_t CC
-XFSHttpRootNodeDispose ( const struct XFSHttpRootNode * self )
-{
-    struct XFSHttpRootNode * Node = ( struct XFSHttpRootNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "XFSHttpRootNodeDispose ( $(node) )]", "node=%p", ( void * ) Node );
-*/
-
-    if ( Node == 0 ) {
-        return 0;
-    }
-
-    if ( Node -> http != NULL ) {
-        XFSHttpRelease ( ( struct XFSHttp * ) Node -> http );
-        Node -> http = NULL;
-    }
-
-    XFSHttpNodeDispose ( & ( Node -> node ) );
-
-    return 0;
-}   /* XFSHttpRootNodeDispose () */
-
-rc_t CC
-_HttpRootNodeDispose_v1 ( const struct XFSNode * self )
-{
-    return XFSHttpRootNodeDispose ( ( const struct XFSHttpRootNode * ) self );
-}   /* _HttpRootNodeDispose_v1 () */
-
-rc_t CC
-_HttpNodeDispose_v1 ( const struct XFSNode * self )
-{
-    return XFSHttpNodeDispose ( ( const struct XFSHttpNode * ) self );
-}   /* _HttpNodeDispose_v1 () */
-
-/*)))
- |||
- +++  There are two methods to find node: for Root and non Root nodes
- |||
-(((*/
-
-/*)) KDir version
- ((*/
-rc_t CC
-_HttpNodeFindNode_v1 (
-            const struct XFSNode * self,
-            const struct XFSPath * Path,
-            uint32_t PathIndex,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    uint32_t PathCount;
-    const char * NodeName;
-    struct XFSHttpRootNode * RootNode;
-    struct XFSNode * RetNode;
-    const struct XFSHttpEntry * Entry;
-    const struct XFSPath * xPath;
-    bool IsLast;
-
-    RCt = 0;
-    PathCount = 0;
-    NodeName = NULL;
-    RootNode = NULL;
-    RetNode = NULL;
-    Entry = NULL;
-    xPath = NULL;
-    IsLast = false;
-
-    RCt = XFSNodeFindNodeCheckInitStandard (
-                                            self,
-                                            Path,
-                                            PathIndex,
-                                            Node,
-                                            & NodeName,
-                                            & PathCount,
-                                            & IsLast
-                                            );
-    if ( RCt == 0 ) {
-        if ( IsLast ) {
-            RCt = XFSNodeAddRef ( self );
-
-            * Node = self;
-
-            return RCt;
-        }
-
-        RootNode = ( struct XFSHttpRootNode * ) self;
-        if ( RootNode -> http == NULL ) {
-            return XFS_RC ( rcInvalid );
-        }
-
-        RCt = XFSPathFrom ( Path, PathIndex + 1, & xPath );
-        if ( RCt == 0 ) {
-            RCt = XFSHttpGetOrCreateEntry (
-                                        RootNode -> http,
-                                        XFSPathGet ( xPath ),
-                                        & Entry
-                                        );
-            if ( RCt == 0 ) {
-                RCt = XFSHttpNodeMake (
-                                    & RetNode,
-                                    XFSPathName ( Path ),/* NodeName, */
-                                    Entry
-                                    );
-                if ( RCt == 0 ) {
-                    * Node = RetNode;
-                }
-            }
-
-            XFSPathRelease ( xPath );
-        }
-    }
-
-    return RCt;
-}   /* _HttpNodeFindNode () */
-
-/*)))
- |||
- +++  Unified DirEditor
- |||
-(((*/
-static
-rc_t CC
-_HttpDir_dispose_v1 ( const struct XFSEditor * self )
-{
-    struct XFSDirEditor * Editor = ( struct XFSDirEditor * ) self;
-/*
-    pLogMsg ( klogDebug, "_HttpDir_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( Editor != NULL ) {
-        free ( Editor );
-    }
-
-    return 0;
-}   /* _HttpDir_dispose_v1 () */
-
-static
-rc_t CC
-_HttpDir_list_v1 (
-                const struct XFSDirEditor * self,
-                const struct KNamelist ** List
-)
-{
-    rc_t RCt;
-    const struct XFSHttpNode * Node;
-    struct KNamelist * TempList;
-
-    RCt = 0;
-    Node = NULL;
-    TempList = NULL;
-
-    if ( List != NULL ) {
-        * List = NULL;
-    }
-
-    if ( self == NULL || List == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Node = ( const struct XFSHttpNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFSHttpEntryList ( Node -> entry, & TempList );
-    if ( RCt == 0 ) {
-        * List = TempList;
-    }
-
-    return RCt;
-}   /* _HttpDir_list_v1 () */
-
-static
-rc_t CC
-_HttpDir_find_v1 (
-                const struct XFSDirEditor * self,
-                const char * Name,
-                const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    const struct XFSHttpNode * HttpNode;
-    struct XFSNode * TempNode;
-    const struct XFSHttpEntry * TempEntry;
-
-    RCt = 0;
-    HttpNode = NULL;
-    TempNode = NULL;
-    TempEntry = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( self == NULL || Name == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    HttpNode = ( const struct XFSHttpNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( HttpNode == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( HttpNode -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFSHttpEntryGet ( HttpNode -> entry, Name, & TempEntry );
-    if ( RCt == 0 ) {
-        RCt = XFSHttpNodeMake ( & TempNode, Name, TempEntry );
-        if ( RCt == 0 ) {
-            * Node = TempNode;
-        }
-    }
-
-    return RCt;
-}   /* _HttpDir_find_v1 () */
-
-rc_t CC
-_HttpNodeDir_v1 (
-            const struct XFSNode * self,
-            const struct XFSDirEditor ** Dir
-)
-{
-    rc_t RCt;
-    struct XFSDirEditor * Editor;
-    const struct XFSHttpNode * Node;
-
-    RCt = 0;
-    Editor = NULL;
-    Node = ( const struct XFSHttpNode * ) self;
-
-    if ( Dir != NULL ) {
-        * Dir = NULL;
-    }
-
-    if ( self == NULL || Dir == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Node -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( ! XFSHttpEntryIsFolder ( Node -> entry ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Editor = calloc ( 1, sizeof ( struct XFSDirEditor ) );
-    if ( Editor == NULL ) { 
-        return XFS_RC ( rcExhausted );
-    }
-
-    memset ( Editor, 0, sizeof ( struct XFSDirEditor ) );
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _HttpDir_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> list = _HttpDir_list_v1;
-        Editor -> find = _HttpDir_find_v1;
-
-        * Dir = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _HttpNodeDir_v1 () */
-
-/*)))
- |||
- +++  Unified FileEditor
- |||
-(((*/
-
-static
-rc_t CC
-_HttpFile_dispose_v1 ( const struct XFSEditor * self )
-{
-    struct XFSHttpFileEditor * Editor = ( struct XFSHttpFileEditor * ) self;
-/*
-    pLogMsg ( klogDebug, "_HttpFile_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( Editor != NULL ) {
-        if ( Editor -> reader != NULL ) {
-            XFSHttpReaderRelease ( Editor -> reader );
-
-            Editor -> reader = NULL;
-        }
-
-        free ( Editor );
-    }
-
-    return 0;
-}   /* _HttpFile_dispose_v1 () */
-
-static
-rc_t CC
-_HttpFile_open_v1 (
-                    const struct XFSFileEditor * self,
-                    XFSNMode Mode
-)
-{
-    rc_t RCt;
-    const struct XFSHttpNode * Node;
-    struct XFSHttpFileEditor * Editor;
-    const struct XFSHttpReader * Reader;
-
-    RCt = 0;
-    Node = NULL;
-    Editor = ( struct XFSHttpFileEditor * ) self;
-    Reader = NULL;
-
-    if ( Mode != kxfsRead ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Node = ( const struct XFSHttpNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Editor = ( struct XFSHttpFileEditor * ) self;
-    if ( Editor -> reader == NULL ) {
-        RCt = XFSHttpReaderMake ( Node -> entry, & Reader );
-        if ( RCt == 0 ) {
-            Editor -> reader = Reader;
-        }
-    }
-
-    return RCt;
-}   /* _HttpFile_open_v1 () */
-
-static
-rc_t CC
-_HttpFile_close_v1 ( const struct XFSFileEditor * self )
-{
-    rc_t RCt;
-    struct XFSHttpFileEditor * Editor;
-
-    RCt = 0;
-    Editor = ( struct XFSHttpFileEditor * ) self;
-
-    if ( Editor == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-
-    if ( Editor -> reader != NULL ) {
-        RCt = XFSHttpReaderRelease ( Editor -> reader );
-
-        Editor -> reader = NULL;
-    }
-
-    return RCt;
-}   /* _HttpFile_close_v1 () */
-
-static
-rc_t CC
-_HttpFile_read_v1 (
-                    const struct XFSFileEditor * self,
-                    uint64_t Offset,
-                    void * Buffer,
-                    size_t SizeToRead,
-                    size_t * NumReaded
-)
-{
-    rc_t RCt;
-    struct XFSHttpFileEditor * Editor;
-
-    RCt = 0;
-    Editor = ( struct XFSHttpFileEditor * ) self;
-
-    if ( Editor == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-
-    if ( Editor -> reader == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFSHttpReaderRead (
-                        Editor -> reader,
-                        Offset,
-                        Buffer,
-                        SizeToRead,
-                        NumReaded
-                        );
-
-    return RCt;
-}   /* _HttpFile_read_v1 () */
-
-static
-rc_t CC
-_HttpFile_size_v1 (
-                        const struct XFSFileEditor * self,
-                        uint64_t * Size
-)
-{
-    rc_t RCt;
-    struct XFSHttpNode * Node;
-
-    RCt = 0;
-    Node = NULL;
-
-    XFS_CSA ( Size, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Size )
-
-    Node = ( struct XFSHttpNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( XFSHttpEntryIsFolder ( Node -> entry ) ) {
-        * Size = 0;
-    }
-    else {
-        RCt = XFSHttpEntrySize ( Node -> entry, Size );
-        if ( RCt != 0 ) {
-            * Size = 0;
-        }
-    }
-
-    return RCt;
-}   /* _HttpFile_size_v1 () */
-
-rc_t CC
-_HttpNodeFile_v1 (
-            const struct XFSNode * self,
-            const struct XFSFileEditor ** File
-)
-{
-    rc_t RCt;
-    struct XFSHttpFileEditor * FileEditor;
-    struct XFSFileEditor * Editor;
-
-    RCt = 0;
-    FileEditor = NULL;
-    Editor = NULL;
-
-    if ( File != NULL ) {
-        * File = NULL;
-    }
-
-    if ( self == NULL || File == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    FileEditor = calloc ( 1, sizeof ( struct XFSHttpFileEditor ) );
-    if ( FileEditor == NULL ) { 
-        return XFS_RC ( rcExhausted );
-    }
-
-    memset ( FileEditor, 0, sizeof ( struct XFSHttpFileEditor ) );
-
-    Editor = & ( FileEditor -> Papahen );
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _HttpFile_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> open = _HttpFile_open_v1;
-        Editor -> close = _HttpFile_close_v1;
-        Editor -> read = _HttpFile_read_v1;
-        Editor -> size = _HttpFile_size_v1;
-        Editor -> set_size = NULL;
-
-        * File = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _HttpNodeFile_v1 () */
-
-/*)))
- |||
- +++  Unified Attr
- |||
-(((*/
-
-static
-rc_t CC
-_HttpAttr_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-    pLogMsg ( klogDebug, "_HttpAttr_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( self != NULL ) {
-        free ( ( struct XFSAttrEditor * ) self );
-    }
-
-    return 0;
-}   /* _HttpAttr_dispose_v1 () */
-
-static
-rc_t CC
-_HttpAttr_init_check_v1 (
-                const struct XFSAttrEditor * self,
-                const struct XFSHttpEntry ** Entry
-)
-{
-    struct XFSHttpNode * Node = NULL;
-
-    if ( Entry != NULL ) {
-        * Entry = NULL;
-    }
-
-    if ( self == NULL || Entry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Node = ( struct XFSHttpNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    * Entry = Node -> entry;
-
-    return 0;
-}   /* _HttpAttr_init_check_v1 () */
-
-static
-rc_t CC
-_HttpAttr_permissions_v1 (
-                        const struct XFSAttrEditor * self,
-                        const char ** Permissions
-)
-{
-    rc_t RCt;
-    const struct XFSHttpEntry * Entry;
-
-    RCt = 0;
-    Entry = NULL;
-
-    if ( Permissions == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Permissions = NULL;
-
-    RCt = _HttpAttr_init_check_v1 ( self, & Entry );
-    if ( RCt == 0 ) {
-        * Permissions = XFSHttpEntryIsFolder ( Entry )
-                                        ? XFSPermRODefContChar ()
-                                        : XFSPermRODefNodeChar ()
-                                        ;
-    }
-
-    return RCt;
-}   /* _HttpAttr_permissions_v1 () */
-
-static
-rc_t CC
-_HttpAttr_date_v1 (
-                        const struct XFSAttrEditor * self,
-                        KTime_t * Time
-)
-{
-    rc_t RCt;
-    const struct XFSHttpEntry * Entry;
-
-    RCt = 0;
-    Entry = NULL;
-
-    if ( Time == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Time = 0;
-
-    RCt = _HttpAttr_init_check_v1 ( self, & Entry );
-    if ( RCt == 0 ) {
-        RCt = XFSHttpEntryTime ( Entry, Time );
-        if ( RCt != 0 ) {
-            * Time = 0;
-        }
-    }
-
-    return RCt;
-}   /* _HttpAttr_date_v1 () */
-
-static
-rc_t CC
-_HttpAttr_type_v1 (
-                        const struct XFSAttrEditor * self,
-                        XFSNType * Type
-)
-{
-    rc_t RCt;
-    const struct XFSHttpEntry * Entry;
-
-    RCt = 0;
-    Entry = NULL;
-
-    if ( Type == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Type = kxfsNotFound;
-
-    RCt = _HttpAttr_init_check_v1 ( self, & Entry );
-    if ( RCt == 0 ) {
-        * Type = XFSHttpEntryIsFolder ( Entry ) ? kxfsDir : kxfsFile ;
-    }
-
-    return RCt;
-}   /* _HttpAttr_type_v1 () */
-
-static
-rc_t CC
-_HttpNodeAttr_v1 (
-            const struct XFSNode * self,
-            const struct XFSAttrEditor ** Attr
-)
-{
-    rc_t RCt;
-    struct XFSAttrEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-
-    if ( self == NULL || Attr == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Attr = NULL;
-
-    Editor = calloc ( 1, sizeof ( struct XFSAttrEditor ) );
-    if ( Editor == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _HttpAttr_dispose_v1
-                    );
-    if ( RCt == 0 ) {
-        Editor -> permissions = _HttpAttr_permissions_v1;
-        Editor -> date = _HttpAttr_date_v1;
-        Editor -> type = _HttpAttr_type_v1;
-
-        * Attr = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _HttpNodeAttr_v1 () */
-
-/*)))
- |||
- +++  Unified Discribe
- |||
-(((*/
-
-rc_t CC
-_HttpNodeDescribe_v1 (
-            const struct XFSNode * self,
-            char * Buffer,
-            size_t BufferSize
-)
-{
-    rc_t RCt;
-    size_t NumWrit;
-    const char * Abbr;
-
-    RCt = 0;
-    NumWrit = 0;
-    Abbr = NULL;
-
-    if ( Buffer == NULL || BufferSize == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Abbr = XFSHttpEntryIsFolder ( ( ( const struct XFSHttpNode * ) self ) -> entry )
-            ? "HTTP FOLDER"
-            : "HTTP NODE"
-            ;
-
-    if ( self == NULL ) {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[NULL][NULL]",
-                    Abbr
-                    );
-    }
-    else {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[%s][0x%p]",
-                    Abbr,
-                    self -> Name,
-                    self
-                    );
-    }
-
-    return RCt;
-}   /* _HttpNodeDescribe_v1 () */
-
-/*)))
- |||
- +++    FileNode lives here
- |||
-(((*/
-
-/*))
- ((     Node make/dispose
-  ))
- ((*/
-
-static
-rc_t CC
-_RemoteRepositoryNodeConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct XFSNode * TheNode;
-    const char * NodeName;
-
-    RCt = 0;
-    TheNode = NULL;
-    NodeName = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Model == NULL || Template == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    NodeName = Alias == NULL ? XFSModelNodeName ( Template ) : Alias;
-
-    RCt = XFSHttpRootNodeMake (
-                    & TheNode,
-                    NodeName,
-                    XFSModelNodeProperty ( Template, XFS_MODEL_SOURCE )
-                    );
-    if ( RCt == 0 ) {
-        * Node = ( struct XFSNode * ) TheNode;
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( TheNode != NULL ) {
-            XFSHttpRootNodeDispose ( ( const struct XFSHttpRootNode * ) TheNode );
-        }
-    }
-
-    return RCt;
-}   /* _RemoteRepositoryNodeConstructor () */
-
-/*)))
- |||
- +++    Non-Teleport methods to create nodes
- |||
-(((*/
-
-/*)))
- |||
- +++    HttpRootNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_RemoteRepositoryConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-
-    RCt = _RemoteRepositoryNodeConstructor (
-                                        Model,
-                                        Template,
-                                        Alias,
-                                        Node
-                                        );
-
-/*
-pLogMsg ( klogDebug, "_RemoteRepositoryConstructor ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _RemoteRepositoryConstructor () */
-
-static
-rc_t CC
-_RemoteRepositoryValidator (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            uint32_t Flags
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_RemoteRepositoryValidator ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _RemoteRepositoryValidator () */
-
-static const struct XFSTeleport _sRemoteRepositoryTeleport = {
-                                        _RemoteRepositoryConstructor,
-                                        _RemoteRepositoryValidator,
-                                        false
-                                        };
-
-
-LIB_EXPORT
-rc_t CC
-XFSRemoteRepositoryProvider ( const struct XFSTeleport ** Teleport )
-{
-    if ( Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = & _sRemoteRepositoryTeleport;
-
-    return 0;
-}   /* XFSRemoteRepositoryProvider () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* ALL BELOW TODO!!!                                               */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*)))
- |||
- +++    HttpRootNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_RemoteFileNodeConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct XFSNode * TheNode;
-    const char * NodeName;
-
-    RCt = 0;
-    TheNode = NULL;
-    NodeName = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Model == NULL || Template == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    NodeName = Alias == NULL ? XFSModelNodeName ( Template ) : Alias;
-
-    RCt = XFSHttpRootNodeMake (
-                    & TheNode,
-                    NodeName,
-                    XFSModelNodeProperty ( Template, XFS_MODEL_SOURCE )
-                    );
-    if ( RCt == 0 ) {
-        * Node = ( struct XFSNode * ) TheNode;
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( TheNode != NULL ) {
-            XFSHttpRootNodeDispose ( ( const struct XFSHttpRootNode * ) TheNode );
-        }
-    }
-
-    return RCt;
-}   /* _RemoteFileNodeConstructor () */
-
-/*)))
- |||
- +++    HttpRootNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_RemoteFileConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-
-    RCt = _RemoteFileNodeConstructor (
-                                        Model,
-                                        Template,
-                                        Alias,
-                                        Node
-                                        );
-
-/*
-pLogMsg ( klogDebug, "_RemoteFileConstructor ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _RemoteFileConstructor () */
-
-static
-rc_t CC
-_RemoteFileValidator (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            uint32_t Flags
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_RemoteFileValidator ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _RemoteFileValidator () */
-
-static const struct XFSTeleport _sRemoteFileTeleport = {
-                                        _RemoteFileConstructor,
-                                        _RemoteFileValidator,
-                                        false
-                                        };
-
-
-LIB_EXPORT
-rc_t CC
-XFSRemoteFileProvider ( const struct XFSTeleport ** Teleport )
-{
-    if ( Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = & _sRemoteFileTeleport;
-
-    return 0;
-}   /* XFSRemoteFileProvider () */
diff --git a/libs/xfs/kfs.c b/libs/xfs/kfs.c
deleted file mode 100644
index eb411b7..0000000
--- a/libs/xfs/kfs.c
+++ /dev/null
@@ -1,2038 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/path.h>
-#include <xfs/editors.h>
-#include <xfs/handle.h>
-#include <xfs/perm.h>
-
-#include "mehr.h"
-#include "schwarzschraube.h"
-#include "teleport.h"
-#include "common.h"
-
-#include <sysalloc.h>
-
-/*)))
- |||    That file contains 'native' KFile and KDirectory based nodes
- |||    Both nodes are implemented as XFSKfsNode
- |||    That kind of node represent real path which exists in system
-(((*/
-
-/*)))
- |||
- +++    FileNode, and other simple containers
- |||
-(((*/
-struct XFSKfsNode {
-    struct XFSNode node;
-
-    XFSNType type;       /* possible Dir and File */
-    const char * path;   /* Path for object */
-    const char * perm;   /* Permissions in format "rwxrwxrwx u:g:o" */
-};
-
-struct XFSKfsFileEditor {
-    struct XFSFileEditor Papahen;
-
-    struct KFile * File;
-};
-
-struct XFSKfsAttrEditor {
-    struct XFSAttrEditor Papahen;
-
-    char perm [ 16 ];     /* there we are storing 'const' object */
-};
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*                                                               *_*/
-/*_* KfsNode is living here                                        *_*/
-/*_*                                                               *_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))
- |||
- +++    KfsNode virtual table is Living here :lol:
- |||
-(((*/
-static rc_t CC _KfsNodeFlavor_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _KfsNodeDispose_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _KfsFileNodeFindNode_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSPath * Path,
-                                uint32_t PathIndex,
-                                const struct XFSNode ** Node
-                                );
-static rc_t CC _KfsDirNodeFindNode_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSPath * Path,
-                                uint32_t PathIndex,
-                                const struct XFSNode ** Node
-                                );
-static rc_t CC _KfsNodeDir_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSDirEditor ** Dir
-                                );
-static rc_t CC _KfsNodeFile_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSFileEditor ** File
-                                );
-static rc_t CC _KfsNodeAttr_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSAttrEditor ** Attr
-                                );
-static rc_t CC _KfsNodeDescribe_v1 (
-                                const struct XFSNode * self,
-                                char * Buffer,
-                                size_t BufferSize
-                                );
-
-static const struct XFSNode_vt_v1 _sKfsFileNodeVT_v1 = {
-                                        1, 1,   /* nin naj */
-                                        _KfsNodeFlavor_v1,
-                                        _KfsNodeDispose_v1,
-                                        _KfsFileNodeFindNode_v1,
-                                        NULL,   /* NO DIR */
-                                        _KfsNodeFile_v1,
-                                        _KfsNodeAttr_v1,
-                                        _KfsNodeDescribe_v1
-                                        };
-
-static const struct XFSNode_vt_v1 _sKfsDirNodeVT_v1 = {
-                                        1, 1,   /* nin naj */
-                                        _KfsNodeFlavor_v1,
-                                        _KfsNodeDispose_v1,
-                                        _KfsDirNodeFindNode_v1,
-                                        _KfsNodeDir_v1,
-                                        NULL,   /* NO FILE */
-                                        _KfsNodeAttr_v1,
-                                        _KfsNodeDescribe_v1
-                                        };
-
-static
-rc_t CC
-XFSKfsNodeMake (
-            struct XFSKfsNode ** Node,
-            XFSNType Type,
-            const char * Name
-)
-{
-    rc_t RCt;
-    struct XFSKfsNode * TheNode;
-
-    RCt = 0;
-    TheNode = NULL;
-
-    if ( Node == NULL || Name == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Node = NULL;
-
-    if ( Type != kxfsFile && Type != kxfsDir ) {
-        return XFS_RC ( rcUnsupported );
-    }
-
-    TheNode = calloc ( 1, sizeof ( struct XFSKfsNode ) );
-    if ( TheNode == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = XFSNodeInitVT (
-                & ( TheNode -> node),
-                Name,
-                ( const union XFSNode_vt * ) ( Type == kxfsDir
-                                        ? ( & _sKfsDirNodeVT_v1 )
-                                        : ( & _sKfsFileNodeVT_v1 )
-                )
-                );
-        if ( RCt == 0 ) {
-
-            TheNode -> type = Type;
-
-                /* This is duplicate, but necessary one
-                 */
-            TheNode -> node . vt = Type == kxfsDir
-                    ? ( ( const union XFSNode_vt * ) & _sKfsDirNodeVT_v1 )
-                    : ( ( const union XFSNode_vt * ) & _sKfsFileNodeVT_v1 )
-                    ;
-
-            * Node = TheNode;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( TheNode != NULL ) {
-            XFSNodeDispose ( & ( TheNode -> node ) );
-            TheNode = NULL;
-        }
-    }
-
-/*
-pLogMsg ( klogDebug, "XFSKfsNodeMake ND[$(node)] NM[$(name)] TP[$(type)]", "node=%p,name=%s,type=%d", ( void * ) TheNode, Name, Type );
-*/
-
-    return RCt;
-}   /* XFSKfsNodeMake () */
-
-static
-rc_t CC
-XFSKfsNodeMakeEx (
-            struct XFSKfsNode ** Node,
-            XFSNType Type,
-            const char * Name,
-            const char * Path,
-            const char * Perm
-)
-{
-    struct XFSKfsNode * TempNode;
-    rc_t RCt;
-
-    RCt = 0;
-    TempNode = NULL;
-
-    if ( Node == NULL || Name == NULL || Path == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Node = NULL;
-
-    RCt = XFSKfsNodeMake ( & TempNode, Type, Name );
-    if ( RCt == 0 ) {
-        RCt = XFS_StrDup ( Path, & ( TempNode -> path ) );
-        if ( RCt == 0 ) {
-            if ( Perm != NULL ) {
-                RCt = XFS_StrDup ( Perm, & ( TempNode -> perm ) );
-            }
-            if ( RCt == 0 ) {
-                * Node = TempNode;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( TempNode != NULL ) {
-            XFSNodeDispose ( & ( TempNode -> node ) );
-            TempNode = NULL;
-        }
-    }
-
-    return RCt;
-}   /* XFSKfsNodeMakeEx () */
-
-uint32_t CC
-_KfsNodeFlavor_v1 ( const struct XFSNode * self )
-{
-    return _sFlavorOfKfs;
-}   /* _KfsNodeFlavor_v1 () */
-
-static
-rc_t CC
-XFSKfsNodeDispose ( const struct XFSKfsNode * self )
-{
-    struct XFSKfsNode * Node = ( struct XFSKfsNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "XFSKfsNodeDispose ( $(node) ) TP[$(type)]", "node=%p,type=%d", ( void * ) Node, ( Node == NULL ? 0 : Node -> type ) );
-*/
-
-    if ( Node == 0 ) {
-        return 0;
-    }
-
-    if ( Node -> perm != NULL ) {
-        free ( ( char * ) Node -> perm );
-        Node -> perm = NULL;
-    }
-
-    if ( Node -> path != NULL ) {
-        free ( ( char * ) Node -> path );
-        Node -> path = NULL;
-    }
-
-    Node -> type = 0;
-
-    free ( Node );
-
-    return 0;
-}   /* XFSKfsNodeDispose () */
-
-rc_t CC
-_KfsNodeDispose_v1 ( const struct XFSNode * self )
-{
-    return XFSKfsNodeDispose ( ( struct XFSKfsNode * ) self );
-}   /* _KfsNodeDispose_v1 () */
-
-/*)))
- |||
- +++  There will be two methods to find node: for KDir and for KFile
- |||
-(((*/
-
-/*)) KFile version
- ((*/
-rc_t CC
-_KfsFileNodeFindNode_v1 (
-            const struct XFSNode * self,
-            const struct XFSPath * Path,
-            uint32_t PathIndex,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    uint32_t PathCount;
-    const char * NodeName;
-    bool IsLast;
-
-    RCt = 0;
-    PathCount = 0;
-    NodeName = NULL;
-    IsLast = false;
-
-    RCt = XFSNodeFindNodeCheckInitStandard (
-                                            self,
-                                            Path,
-                                            PathIndex,
-                                            Node,
-                                            & NodeName,
-                                            & PathCount,
-                                            & IsLast
-                                            );
-    if ( RCt == 0 ) {
-        if ( IsLast ) {
-            RCt = XFSNodeAddRef ( self );
-
-            * Node = self;
-        }
-    }
-
-    return RCt;
-}   /* _KfsFileNodeFindNode () */
-
-/*)) KDir version
- ((*/
-rc_t CC
-_KfsDirNodeFindNode_v1 (
-            const struct XFSNode * self,
-            const struct XFSPath * Path,
-            uint32_t PathIndex,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    uint32_t PathCount;
-    const char * NodeName;
-    struct XFSKfsNode * KfsNode;
-    bool IsLast;
-    KDirectory * NativeDir;
-    XFSNType Type;
-    const struct XFSPath * xPath, * yPath;
-
-    RCt = 0;
-    PathCount = 0;
-    NodeName = NULL;
-    KfsNode = NULL;
-    IsLast = false;
-    NativeDir = NULL;
-    Type = kxfsNotFound;
-    xPath = yPath = NULL;
-
-    RCt = XFSNodeFindNodeCheckInitStandard (
-                                            self,
-                                            Path,
-                                            PathIndex,
-                                            Node,
-                                            & NodeName,
-                                            & PathCount,
-                                            & IsLast
-                                            );
-    if ( RCt == 0 ) {
-        if ( IsLast ) {
-            RCt = XFSNodeAddRef ( self );
-
-            * Node = self;
-
-            return RCt;
-        }
-
-        KfsNode = ( struct XFSKfsNode * ) self;
-        if ( KfsNode -> path == NULL ) {
-            return XFS_RC ( rcInvalid );
-        }
-
-            /*) Here we are trying to create new node
-             (*/
-        RCt = XFSPathFrom ( Path, PathIndex + 1, & xPath );
-        if ( RCt == 0 ) {
-            RCt = XFSPathMake (
-                            & yPath,
-                            true,
-                            "%s/%s",
-                            KfsNode -> path,
-                            XFSPathGet ( xPath )
-                            );
-            if ( RCt == 0 ) {
-                RCt = KDirectoryNativeDir ( & NativeDir );
-                if ( RCt == 0 ) {
-                    switch ( KDirectoryPathType ( NativeDir, XFSPathGet ( yPath ) ) ) {
-                        case kptFile :
-                                Type = kxfsFile;
-                                break;
-                        case kptDir :
-                                Type = kxfsDir;
-                                break;
-                        default :
-                                RCt = XFS_RC ( rcInvalid );
-                                break;
-                    }
-                    if ( RCt == 0 ) {
-                        RCt = XFSKfsNodeMakeEx (
-                                            & KfsNode,
-                                            Type,
-                                            XFSPathName ( yPath ),
-                                            XFSPathGet ( yPath ),
-                                            NULL
-                                            );
-                        if ( RCt == 0 ) {
-                            * Node = & ( KfsNode -> node );
-                        }
-                    }
-
-                    KDirectoryRelease ( NativeDir );
-                }
-
-                XFSPathRelease ( yPath );
-            }
-
-            XFSPathRelease ( xPath );
-        }
-    }
-
-    return RCt;
-}   /* _KfsDirNodeFindNode () */
-
-/*)))
- |||
- +++  Unified DirEditor
- |||
-(((*/
-static
-rc_t CC
-_KfsDir_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-    pLogMsg ( klogDebug, "_KfsDir_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( self != NULL ) {
-        free ( ( struct XFSDirEditor * ) self );
-    }
-
-    return 0;
-}   /* _KfsDir_dispose_v1 () */
-
-static
-rc_t CC
-_KfsDir_list_v1 (
-                const struct XFSDirEditor * self,
-                const struct KNamelist ** List
-)
-{
-    KDirectory * NativeDir;
-    const struct XFSKfsNode * Node;
-    struct KNamelist * TempList;
-    rc_t RCt;
-
-    RCt = 0;
-    NativeDir = NULL;
-    Node = NULL;
-    TempList = NULL;
-
-    if ( self == NULL || List == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * List = NULL;
-
-    Node = ( const struct XFSKfsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> type != kxfsDir ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KDirectoryNativeDir ( & NativeDir );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryList (
-                            NativeDir,
-                            & TempList,
-                            NULL, /* Filter Func */
-                            NULL, /* Filter Data */
-                            Node -> path
-                            );
-        if ( RCt == 0 ) {
-            * List = TempList;
-        }
-        else {
-            if ( TempList != NULL ) {
-                KNamelistRelease ( TempList );
-            }
-        }
-
-        KDirectoryRelease ( NativeDir );
-    }
-
-    return RCt;
-}   /* _KfsDir_list_v1 () */
-
-static
-rc_t CC
-_KfsDir_find_v1 (
-                const struct XFSDirEditor * self,
-                const char * Name,
-                const struct XFSNode ** Node
-)
-{
-    KDirectory * NativeDir;
-    const struct XFSKfsNode * KfsNode;
-    struct XFSKfsNode * TempNode;
-    uint32_t FileType;
-    XFSNType Type;
-    char FullPath [ XFS_SIZE_4096 ];
-    size_t NumWrit;
-    rc_t RCt;
-
-    RCt = 0;
-    NativeDir = NULL;
-    KfsNode = NULL;
-    TempNode = NULL;
-    FileType = kptNotFound;
-    Type = kxfsNotFound;
-    NumWrit = 0;
-    * FullPath = 0;
-
-    if ( self == NULL || Name == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Node = NULL;
-
-    KfsNode = ( const struct XFSKfsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( KfsNode == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( KfsNode -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = string_printf (
-                        FullPath,
-                        sizeof ( FullPath ),
-                        & NumWrit,
-                        "%s/%s",
-                        KfsNode -> path,
-                        Name
-                        );
-    if ( RCt == 0 ) {
-
-        RCt = KDirectoryNativeDir ( & NativeDir );
-        if ( RCt == 0 ) {
-            FileType = KDirectoryPathType ( NativeDir, FullPath );
-            switch ( FileType ) {
-                case kptFile :
-                    Type = kxfsFile;
-                    break;
-                case kptDir :
-                    Type = kxfsDir;
-                    break;
-                default :
-                    RCt = XFS_RC ( rcUnsupported );
-                    break;
-            }
-            if ( RCt == 0 ) {
-                RCt = XFSKfsNodeMakeEx (
-                                    & TempNode,
-                                    Type,
-                                    Name,
-                                    FullPath,
-                                    KfsNode -> perm
-                                    );
-                if ( RCt == 0 ) {
-                    * Node = ( const struct XFSNode * ) TempNode;
-                }
-            }
-
-            KDirectoryRelease ( NativeDir );
-        }
-    }
-
-    return RCt;
-}   /* _KfsDir_find_v1 () */
-
-static
-rc_t CC
-_KfsDir_create_file_v1 (
-                const struct XFSDirEditor * self,
-                const char * Name,
-                XFSNMode Mode,
-                const struct XFSHandle ** Handle
-)
-{
-    struct KDirectory * NativeDir;
-    struct KFile * File;
-    bool Update;
-    KCreateMode CreateMode;
-    char Path [ XFS_SIZE_4096 ];
-    struct XFSKfsNode * KfsNode, * TempNode;
-    struct XFSKfsFileEditor * FileEditor;
-    const struct XFSHandle * TempHandle;
-    size_t NumWritten;
-    rc_t RCt;
-
-    NativeDir = NULL;
-    File = NULL;
-    Update = false;
-    CreateMode = kcmCreate;
-    * Path = 0;
-    KfsNode = TempNode = NULL;
-    FileEditor = NULL;
-    TempHandle = NULL;
-    NumWritten = 0;
-    RCt = 0;
-
-    if ( self == NULL || Name == NULL || Handle == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Handle = NULL;
-
-    KfsNode = ( struct XFSKfsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( KfsNode -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = string_printf (
-                        Path,
-                        sizeof ( Path ),
-                        & NumWritten,
-                        "%s/%s",
-                        KfsNode -> path,
-                        Name
-                        );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    Update = Mode == kxfsReadWrite;
-    CreateMode = kcmCreate;
-
-        /* Here we are */
-    RCt = KDirectoryNativeDir ( & NativeDir );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryCreateFile (
-                                NativeDir,
-                                & File, 
-                                Update,
-                                XFSPermRODefNodeNum (),
-                                CreateMode,
-                                Path
-                                );
-        if ( RCt == 0 ) {
-            RCt = XFSKfsNodeMakeEx (
-                                & TempNode,
-                                kxfsFile,
-                                Name,
-                                Path,
-                                KfsNode -> perm
-                                );
-            if ( RCt == 0 ) {
-                RCt = XFSNodeFileEditor (
-                                    & ( TempNode -> node ),
-                                    ( const struct XFSFileEditor ** ) & FileEditor
-                                    );
-                if ( RCt == 0 ) {
-                    FileEditor -> File = File;
-                    RCt = XFSHandleMake (
-                                    & ( TempNode -> node ),
-                                    & TempHandle
-                                    );
-                    if ( RCt == 0 ) {
-                        XFSHandleSet ( TempHandle, FileEditor );
-
-                        * Handle = TempHandle;
-                    }
-                }
-            }
-        }
-
-        KDirectoryRelease ( NativeDir );
-    }
-
-    if ( RCt != 0 ) {
-        * Handle = NULL;
-
-        if ( TempHandle != NULL ) {
-            XFSHandleRelease ( TempHandle );
-        }
-        else {
-            if ( FileEditor != NULL ) {
-                XFSEditorDispose ( ( const struct XFSEditor * ) FileEditor );
-            }
-        }
-
-        if ( File != NULL ) {
-            KFileRelease ( File );
-        }
-    }
-
-    return RCt;
-}   /* _KfsDir_create_file_v1 () */
-
-static
-rc_t CC
-_KfsDir_create_dir_v1 (
-                const struct XFSDirEditor * self,
-                const char * Name
-)
-{
-    rc_t RCt;
-    KDirectory * NativeDir;
-    struct XFSKfsNode * KfsNode;
-    char Path [ XFS_SIZE_4096 ];
-    size_t NumWritten;
-
-    RCt = 0;
-    NativeDir = NULL;
-    KfsNode = NULL;
-    * Path = 0;
-    NumWritten = 0;
-
-    if ( self == NULL || Name == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    KfsNode = ( struct XFSKfsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( KfsNode -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = string_printf (
-                        Path,
-                        sizeof ( Path ),
-                        & NumWritten,
-                        "%s/%s",
-                        KfsNode -> path,
-                        Name
-                        );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    RCt = KDirectoryNativeDir ( & NativeDir );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryCreateDir (
-                                NativeDir,
-                                XFSPermRODefContNum (),
-                                kcmCreate,
-                                Path
-                                );
-
-        KDirectoryRelease ( NativeDir );
-    }
-
-    return RCt;
-}   /* _KfsDir_create_dir_v1 () */
-
-static
-rc_t CC
-_KfsDir_delete_v1 (
-                const struct XFSDirEditor * self,
-                const char * Name
-)
-{
-    rc_t RCt;
-    KDirectory * NativeDir;
-    struct XFSKfsNode * KfsNode;
-    char Path [ XFS_SIZE_4096 ];
-    size_t NumWritten;
-
-    RCt = 0;
-    NativeDir = NULL;
-    KfsNode = NULL;
-    * Path = 0;
-    NumWritten = 0;
-
-    if ( self == NULL || Name == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    KfsNode = ( struct XFSKfsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( KfsNode -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = string_printf (
-                        Path,
-                        sizeof ( Path ),
-                        & NumWritten,
-                        "%s/%s",
-                        KfsNode -> path,
-                        Name
-                        );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    RCt = KDirectoryNativeDir ( & NativeDir );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryRemove ( NativeDir, true, Path );
-
-        KDirectoryRelease ( NativeDir );
-    }
-
-    return RCt;
-}   /* _KfsDir_delete_v1 () */
-
-rc_t CC
-_KfsDir_move_v1 (
-            const struct XFSDirEditor * self,
-            const char * OldName,
-            const struct XFSNode * NewDir,
-            const char * NewName
-)
-{
-    rc_t RCt;
-    struct XFSKfsNode * KfsNode;
-    struct XFSKfsNode * NewKfsNode;
-    KDirectory * NativeDir;
-    char OldPath [ XFS_SIZE_4096 ];
-    char NewPath [ XFS_SIZE_4096 ];
-    size_t NumWritten;
-
-    RCt = 0;
-    KfsNode = NULL;
-    NewKfsNode = NULL;
-    NativeDir = NULL;
-    * OldPath = * NewPath = 0;
-    NumWritten = 0;
-
-    if ( self == NULL || OldName == NULL || NewDir == NULL
-        || NewName == NULL
-    ) {
-        return XFS_RC ( rcNull );
-    }
-
-        /*) TODO it is temporary, until we will do
-         (*/
-    if ( XFSNodeFlavor ( NewDir ) !=
-            XFSNodeFlavor ( ( self -> Papahen ) . Node ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    KfsNode = ( struct XFSKfsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( KfsNode -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    NewKfsNode = ( struct XFSKfsNode * ) NewDir;
-    if ( NewKfsNode -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = string_printf (
-                        OldPath,
-                        sizeof ( OldPath ),
-                        & NumWritten,
-                        "%s/%s",
-                        KfsNode -> path,
-                        OldName
-                        );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    RCt = string_printf (
-                        NewPath,
-                        sizeof ( NewPath ),
-                        & NumWritten,
-                        "%s/%s",
-                        NewKfsNode -> path,
-                        NewName
-                        );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    RCt = KDirectoryNativeDir ( & NativeDir );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryRename ( NativeDir, true, OldPath, NewPath );
-
-        KDirectoryRelease ( NativeDir );
-    }
-
-    return RCt;
-}   /* _KfsDir_move_v1 () */
-
-rc_t CC
-_KfsNodeDir_v1 (
-            const struct XFSNode * self,
-            const struct XFSDirEditor ** Dir
-)
-{
-    rc_t RCt;
-    struct XFSDirEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-
-    if ( self == NULL || Dir == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Dir = NULL;
-
-    if ( ( ( struct XFSKfsNode * ) self ) -> type != kxfsDir ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Editor = calloc ( 1, sizeof ( struct XFSDirEditor ) );
-    if ( Editor == NULL ) { 
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _KfsDir_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> list = _KfsDir_list_v1;
-        Editor -> find = _KfsDir_find_v1;
-        Editor -> create_file = _KfsDir_create_file_v1;
-        Editor -> create_dir = _KfsDir_create_dir_v1;
-        Editor -> delete = _KfsDir_delete_v1;
-        Editor -> move = _KfsDir_move_v1;
-
-        * Dir = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _KfsNodeDir_v1 () */
-
-/*)))
- |||
- +++  Unified FileEditor
- |||
-(((*/
-
-static
-rc_t CC
-_KfsFile_dispose_v1 ( const struct XFSEditor * self )
-{
-    struct XFSKfsFileEditor * Editor = ( struct XFSKfsFileEditor * ) self;
-
-/*
-    pLogMsg ( klogDebug, "_KfsFile_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( Editor != NULL ) {
-        if ( Editor -> File != NULL ) {
-            KFileRelease ( Editor -> File );
-
-            Editor -> File = NULL;
-        }
-
-        free ( Editor );
-    }
-
-    return 0;
-}   /* _KfsFile_dispose_v1 () */
-
-static
-rc_t CC
-_KfsFile_open_v1 (
-                    const struct XFSFileEditor * self,
-                    XFSNMode Mode
-)
-{
-    KFile * File;
-    const struct XFSKfsNode * Node;
-    KDirectory * NativeDir;
-    rc_t RCt;
-
-    File = NULL;
-    Node = NULL;
-    NativeDir = NULL;
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Node = ( const struct XFSKfsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> type != kxfsFile ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KDirectoryNativeDir ( & NativeDir );
-    if ( RCt == 0 ) {
-        if ( Mode == kxfsRead ) {
-            RCt = KDirectoryOpenFileRead (
-                                        NativeDir,
-                                        ( const KFile ** ) & File,
-                                        Node -> path
-                                        );
-        }
-        else {
-            RCt = KDirectoryOpenFileWrite (
-                                        NativeDir,
-                                        & File,
-                                        ( Mode & kxfsRead ) == kxfsRead,
-                                        Node -> path
-                                        );
-        }
-        if ( RCt == 0 ) {
-            ( ( struct XFSKfsFileEditor * ) self ) -> File = File;
-        }
-
-        KDirectoryRelease ( NativeDir );
-    }
-
-    return RCt;
-}   /* _KfsFile_open_v1 () */
-
-static
-rc_t CC
-_KfsFile_close_v1 ( const struct XFSFileEditor * self )
-{
-    struct XFSKfsFileEditor * Editor;
-    rc_t RCt;
-
-    Editor = NULL;
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-
-    Editor = ( struct XFSKfsFileEditor * ) self;
-
-    if ( Editor -> File != NULL ) {
-        RCt = KFileRelease ( Editor -> File );
-
-        Editor -> File = NULL;
-    }
-
-    return RCt;
-}   /* _KfsFile_close_v1 () */
-
-static
-rc_t CC
-_KfsFile_read_v1 (
-                    const struct XFSFileEditor * self,
-                    uint64_t Offset,
-                    void * Buffer,
-                    size_t SizeToRead,
-                    size_t * NumReaded
-)
-{
-    struct XFSKfsFileEditor * Editor;
-    rc_t RCt;
-
-    Editor = NULL;
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Editor = ( struct XFSKfsFileEditor * ) self;
-
-    if ( Editor -> File == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KFileReadAll (
-                    Editor -> File,
-                    Offset,
-                    Buffer,
-                    SizeToRead,
-                    NumReaded
-                    );
-
-/* here may be debutt */
-
-    return RCt;
-}   /* _KfsFile_read_v1 () */
-
-static
-rc_t CC
-_KfsFile_write_v1 (
-                    const struct XFSFileEditor * self,
-                    uint64_t Offset,
-                    const void * Buffer,
-                    size_t SizeToWrite,
-                    size_t * NumWritten
-)
-{
-    struct XFSKfsFileEditor * Editor;
-    rc_t RCt;
-
-    Editor = NULL;
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Editor = ( struct XFSKfsFileEditor * ) self;
-
-    if ( Editor -> File == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KFileWriteAll (
-                    Editor -> File,
-                    Offset,
-                    Buffer,
-                    SizeToWrite,
-                    NumWritten
-                    );
-
-
-/* here may be debutt */
-
-    return RCt;
-}   /* _KfsFile_write_v1 () */
-
-static
-rc_t CC
-_KfsFile_size_v1 (
-                        const struct XFSFileEditor * self,
-                        uint64_t * Size
-)
-{
-    const struct XFSKfsNode * Node;
-    KDirectory * NativeDir;
-    const struct KFile * File;
-    uint64_t TempSize;
-    rc_t RCt;
-
-    Node = NULL;
-    NativeDir = NULL;
-    File = NULL;
-    TempSize = 0;
-    RCt = 0;
-
-    XFS_CSA ( Size, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Size )
-
-    Node = ( const struct XFSKfsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> type != kxfsFile ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    File = ( ( struct XFSKfsFileEditor * ) self ) -> File;
-    if ( File == NULL ) {
-        RCt = KDirectoryNativeDir ( & NativeDir );
-        if ( RCt == 0 ) {
-            RCt = KDirectoryFileSize (
-                                NativeDir,
-                                & TempSize,
-                                Node -> path
-                                );
-
-            KDirectoryRelease ( NativeDir );
-        }
-    }
-    else {
-        RCt = KFileSize ( File, & TempSize );
-    }
-    if ( RCt == 0 ) {
-        * Size = TempSize;
-    }
-
-    return RCt;
-}   /* _KfsFile_size_v1 () */
-
-static
-rc_t CC
-_KfsFile_set_size_v1 (
-                const struct XFSFileEditor * self,
-                uint64_t Size
-)
-{
-    rc_t RCt;
-    const struct XFSKfsNode * Node;
-    KDirectory * NativeDir;
-    struct KFile * File;
-
-    RCt = 0;
-    Node = NULL;
-    NativeDir = NULL;
-    File = NULL;
-
-    XFS_CAN ( self )
-
-    Node = ( const struct XFSKfsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> type != kxfsFile ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    File = ( ( struct XFSKfsFileEditor * ) self ) -> File;
-    if ( File == NULL ) {
-
-        RCt = KDirectoryNativeDir ( & NativeDir );
-        if ( RCt == 0 ) {
-            RCt = KDirectorySetFileSize ( NativeDir, Size, Node -> path);
-
-            KDirectoryRelease ( NativeDir );
-        }
-    }
-    else {
-        RCt = KFileSetSize ( File, Size );
-    }
-
-    return RCt;
-}   /*  _KfsFile_set_size_v1 () */
-
-rc_t CC
-_KfsNodeFile_v1 (
-            const struct XFSNode * self,
-            const struct XFSFileEditor ** File
-)
-{
-    rc_t RCt;
-    struct XFSKfsFileEditor * FileEditor;
-    struct XFSFileEditor * Editor;
-
-    RCt = 0;
-    FileEditor = NULL;
-    Editor = NULL;
-
-    if ( self == NULL || File == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * File = NULL;
-
-    if ( ( ( struct XFSKfsNode * ) self ) -> type != kxfsFile ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    FileEditor = calloc ( 1, sizeof ( struct XFSKfsFileEditor ) );
-    if ( FileEditor == NULL ) { 
-        return XFS_RC ( rcExhausted );
-    }
-
-    Editor = & ( FileEditor -> Papahen );
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _KfsFile_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> open = _KfsFile_open_v1;
-        Editor -> close = _KfsFile_close_v1;
-        Editor -> read = _KfsFile_read_v1;
-        Editor -> write = _KfsFile_write_v1;
-        Editor -> size = _KfsFile_size_v1;
-        Editor -> set_size = _KfsFile_set_size_v1;
-
-        * File = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _KfsNodeFile_v1 () */
-
-/*)))
- |||
- +++  Unified Attr
- |||
-(((*/
-
-static
-rc_t CC
-_KfsAttr_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-    pLogMsg ( klogDebug, "_KfsAttr_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( self != NULL ) {
-        free ( ( struct XFSKfsAttrEditor * ) self );
-    }
-
-    return 0;
-}   /* _KfsAttr_dispose_v1 () */
-
-/*))    Something unusual. Will check-initialize NativeDir and Node
- //     NativeDir and Node could be NULL
-((*/
-static
-rc_t CC
-_KfsAttr_init_check_v1 (
-                    const struct XFSAttrEditor * self,
-                    const struct XFSKfsNode ** Node,
-                    KDirectory ** NativeDir
-
-)
-{
-    rc_t RCt;
-    const struct XFSKfsNode * RetNode;
-    KDirectory * Dir;
-
-    RCt = 0;
-    RetNode = NULL;
-    Dir = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( NativeDir != NULL ) {
-        * NativeDir = NULL;
-    }
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RetNode = ( const struct XFSKfsNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-
-    if ( RetNode == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( RetNode -> path == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( NativeDir != NULL ) {
-        RCt = KDirectoryNativeDir ( & Dir );
-        if ( RCt == 0 ) {
-            * NativeDir = Dir;
-        }
-    }
-
-    if ( RCt == 0 ) {
-        if ( Node != NULL ) {
-            * Node = RetNode;
-        }
-    }
-
-    return RCt;
-}   /* _KfsAttr_init_check_v1 () */
-
-static
-rc_t CC
-_KfsAttr_permissions_v1 (
-                        const struct XFSAttrEditor * self,
-                        const char ** Permissions
-)
-{
-    const struct XFSKfsNode * Node;
-    KDirectory * NativeDir;
-    uint32_t Access;
-    char * BF;
-    rc_t RCt;
-
-    Node = NULL;
-    NativeDir = NULL;
-    BF = NULL;
-    RCt = 0;
-
-    if ( Permissions == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Permissions = NULL;
-
-    RCt = _KfsAttr_init_check_v1 ( self, & Node, & NativeDir );
-    if ( RCt == 0 ) {
-        if ( Node -> perm != NULL ) {
-            * Permissions = Node -> perm;
-        }
-        else {
-            RCt = KDirectoryAccess ( NativeDir, & Access, Node -> path );
-            if ( RCt == 0 ) {
-                BF = ( ( struct XFSKfsAttrEditor * ) self ) -> perm;
-                RCt = XFSPermToChar (
-                                    Access,
-                                    BF,
-                                    sizeof ( ( ( struct XFSKfsAttrEditor * ) self ) -> perm )
-                                    );
-                if ( RCt == 0 ) {
-                    if ( Node -> type == kxfsDir ) {
-                        BF [ 0 ] = 'r';
-                        BF [ 2 ] = 'x';
-                    }
-
-                    * Permissions = ( const char * ) BF;
-                }
-            }
-        }
-
-        KDirectoryRelease ( NativeDir );
-    }
-
-    return RCt;
-}   /* _KfsAttr_permissions_v1 () */
-
-static
-rc_t CC
-_KfsAttr_set_permissions_v1 (
-                        const struct XFSAttrEditor * self,
-                        const char * Permissions
-)
-{
-    rc_t RCt;
-    const struct XFSKfsNode * Node;
-    KDirectory * NativeDir;
-    uint32_t Access;
-
-    RCt = 0;
-    NativeDir = NULL;
-    Node = NULL;
-
-    if ( Permissions == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = _KfsAttr_init_check_v1 ( self, & Node, & NativeDir );
-    if ( RCt == 0 ) {
-        if ( Node -> perm != NULL ) {
-            RCt = XFSPermToNum ( Node -> perm, & Access );
-        }
-        else {
-            RCt = XFSPermToNum ( Permissions, & Access );
-        }
-        if ( RCt == 0 ) {
-            RCt = KDirectorySetAccess (
-                                    NativeDir,
-                                    false,
-                                    Access,
-                                    Access,
-                                    Node -> path
-                                    );
-        }
-
-        KDirectoryRelease ( NativeDir );
-    }
-
-    return RCt;
-}   /*  _KfsAttr_set_permissions_v1 () */
-
-static
-rc_t CC
-_KfsAttr_date_v1 (
-                        const struct XFSAttrEditor * self,
-                        KTime_t * Time
-)
-{
-    const struct XFSKfsNode * Node;
-    KDirectory * NativeDir;
-    KTime_t TempTime;
-    rc_t RCt;
-
-    Node = NULL;
-    NativeDir = NULL;
-    TempTime = 0;
-    RCt = 0;
-
-    if ( Time == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Time = 0;
-
-    RCt = _KfsAttr_init_check_v1 ( self, & Node, & NativeDir );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryDate ( NativeDir, & TempTime, Node -> path );
-        if ( RCt == 0 ) {
-            * Time = TempTime;
-        }
-
-        KDirectoryRelease ( NativeDir );
-    }
-
-    return RCt;
-}   /* _KfsAttr_date_v1 () */
-
-static
-rc_t CC
-_KfsAttr_set_date_v1 (
-                const struct XFSAttrEditor * self,
-                KTime_t Time
-)
-{
-    rc_t RCt;
-    const struct XFSKfsNode * Node;
-    KDirectory * NativeDir;
-
-    RCt = 0;
-    NativeDir = NULL;
-    Node = NULL;
-
-    RCt = _KfsAttr_init_check_v1 ( self, & Node, & NativeDir );
-    if ( RCt == 0 ) {
-        RCt = KDirectorySetDate ( NativeDir, true, Time, Node -> path );
-        
-        KDirectoryRelease ( NativeDir );
-    }
-
-    return RCt;
-}   /*  _KfsAttr_set_date_v1 () */
-
-static
-rc_t CC
-_KfsAttr_type_v1 (
-                        const struct XFSAttrEditor * self,
-                        XFSNType * Type
-)
-{
-    const struct XFSKfsNode * Node;
-    rc_t RCt;
-
-    Node = NULL;
-    RCt = 0;
-
-    if ( Type == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Type = kxfsFile;
-
-    RCt = _KfsAttr_init_check_v1 ( self, & Node, NULL );
-    if ( RCt == 0 ) {
-        * Type = Node -> type;
-    }
-
-    return RCt;
-}   /* _KfsAttr_type_v1 () */
-
-static
-rc_t CC
-_KfsNodeAttr_v1 (
-            const struct XFSNode * self,
-            const struct XFSAttrEditor ** Attr
-)
-{
-    rc_t RCt;
-    struct XFSKfsAttrEditor * KfsEditor;
-    struct XFSAttrEditor * Editor;
-
-    RCt = 0;
-    KfsEditor = NULL;
-    Editor = NULL;
-
-    if ( self == NULL || Attr == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Attr = NULL;
-
-    KfsEditor = calloc ( 1, sizeof ( struct XFSKfsAttrEditor ) );
-    if ( KfsEditor == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    Editor = & ( KfsEditor -> Papahen );
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _KfsAttr_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> permissions = _KfsAttr_permissions_v1;
-        Editor -> set_permissions = _KfsAttr_set_permissions_v1;
-        Editor -> date = _KfsAttr_date_v1;
-        Editor -> set_date = _KfsAttr_set_date_v1;
-        Editor -> type = _KfsAttr_type_v1;
-
-        * Attr = Editor;
-    }
-    else {
-        free ( KfsEditor );
-    }
-
-    return RCt;
-}   /* _KfsNodeAttr_v1 () */
-
-/*)))
- |||
- +++  Unified Discribe
- |||
-(((*/
-
-rc_t CC
-_KfsNodeDescribe_v1 (
-            const struct XFSNode * self,
-            char * Buffer,
-            size_t BufferSize
-)
-{
-    rc_t RCt;
-    size_t NumWrit;
-    const char * Abbr;
-
-    RCt = 0;
-    NumWrit = 0;
-    Abbr = NULL;
-
-    if ( Buffer == NULL || BufferSize == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Abbr = ( ( const struct XFSKfsNode * ) self ) -> type == kxfsDir
-            ? "DIR"
-            : "FILE"
-            ;
-
-    if ( self == NULL ) {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[NULL][NULL]",
-                    Abbr
-                    );
-    }
-    else {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[%s][0x%p]",
-                    Abbr,
-                    self -> Name,
-                    self
-                    );
-    }
-
-    return RCt;
-}   /* _KfsNodeDescribe_v1 () */
-
-/*)))
- |||
- +++    FileNode lives here
- |||
-(((*/
-
-/*))
- ((     Node make/dispose
-  ))
- ((*/
-
-static
-rc_t CC
-_KfsNodeConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            XFSNType Type,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct XFSKfsNode * TheNode;
-    const char * NodeName;
-
-    RCt = 0;
-    TheNode = NULL;
-    NodeName = NULL;
-
-    if ( Model == NULL || Template == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Node = NULL;
-
-    NodeName = Alias == NULL ? XFSModelNodeName ( Template ) : Alias;
-
-    RCt = XFSKfsNodeMakeEx (
-                    & TheNode,
-                    Type,
-                    NodeName,
-                    XFSModelNodeProperty ( Template, XFS_MODEL_SOURCE ),
-                    XFSModelNodeSecurity ( Template )
-                    );
-    if ( RCt == 0 ) {
-        * Node = ( struct XFSNode * ) TheNode;
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( TheNode != NULL ) {
-            XFSKfsNodeDispose ( TheNode );
-        }
-    }
-
-    return RCt;
-}   /* _KfsNodeConstructor () */
-
-/*)))
- |||
- +++    Non-Teleport methods to create nodes
- |||
-(((*/
-LIB_EXPORT
-rc_t CC
-XFSFileNodeMakeHandle (
-                    const struct XFSHandle ** Handle,
-                    struct XFSNode * FileNode,
-                    struct KFile * File
-)
-{
-    rc_t RCt;
-    const struct XFSHandle * TheHandle;
-    struct XFSKfsFileEditor * Editor;
-
-    RCt = 0;
-    TheHandle = NULL;
-    Editor = NULL;
-
-    XFS_CSAN ( Handle )
-    XFS_CAN ( Handle )
-    XFS_CAN ( FileNode )
-    XFS_CAN ( File )
-
-    RCt = XFSNodeFileEditor (
-                        FileNode,
-                        ( const struct XFSFileEditor ** ) & Editor
-                        );
-    if ( RCt == 0 ) {
-        Editor -> File = File;
-
-        RCt = XFSHandleMake ( FileNode,  & TheHandle );
-        if ( RCt == 0 ) {
-            XFSHandleSet ( TheHandle, Editor );
-
-            * Handle = TheHandle;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Handle = NULL;
-
-        if ( TheHandle != NULL ) {
-            XFSHandleRelease ( TheHandle );
-        }
-        else {
-            if ( Editor != NULL ) {
-                XFSEditorDispose ( ( const struct XFSEditor * ) Editor );
-            }
-        }
-    }
-
-    return RCt;
-}   /* XFSFileNodeMakeHandle () */
-
-LIB_EXPORT
-rc_t CC
-XFSFileNodeMake (
-            struct XFSNode ** Node,
-            const char * Path,
-            const char * Name,
-            const char * Perm
-)
-{
-    rc_t RCt;
-    struct XFSKfsNode * TheNode;
-
-    RCt = 0;
-    TheNode = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Path == NULL || Name == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = XFSKfsNodeMakeEx ( & TheNode, kxfsFile, Name, Path, Perm );
-    if ( RCt == 0 ) {
-        * Node = & ( TheNode -> node );
-    }
-
-    return RCt;
-}   /* XFSFileNodeMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSDirNodeMake (
-            struct XFSNode ** Node,
-            const char * Path,
-            const char * Name,
-            const char * Perm
-)
-{
-    rc_t RCt;
-    struct XFSKfsNode * TheNode;
-
-    RCt = 0;
-    TheNode = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Path == NULL || Name == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = XFSKfsNodeMakeEx ( & TheNode, kxfsDir, Name, Path, Perm );
-    if ( RCt == 0 ) {
-        * Node = & ( TheNode -> node );
-    }
-
-    return RCt;
-}   /* XFSDirNodeMake () */
-
-/*)))
- |||
- +++    FileNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_FileNodeConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-
-    RCt = _KfsNodeConstructor (
-                            Model,
-                            Template,
-                            Alias,
-                            kxfsFile,
-                            Node
-                            );
-
-/*
-pLogMsg ( klogDebug, "_FileNodeConstructor ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,templat=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _FileNodeConstructor () */
-
-static
-rc_t CC
-_FileNodeValidator (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            uint32_t Flags
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_FileNodeValidator ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,templat=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _FileNodeValidator () */
-
-static const struct XFSTeleport _sFileNodeTeleport = {
-                                        _FileNodeConstructor,
-                                        _FileNodeValidator,
-                                        false
-                                        };
-
-
-LIB_EXPORT
-rc_t CC
-XFSFileProvider ( const struct XFSTeleport ** Teleport )
-{
-    if ( Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = & _sFileNodeTeleport;
-
-    return 0;
-}   /* XFSFileProvider () */
-
-/*)))
- |||
- +++    DirNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_DirNodeConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-
-    RCt = _KfsNodeConstructor (
-                            Model,
-                            Template,
-                            Alias,
-                            kxfsDir,
-                            Node
-                            );
-
-/*
-pLogMsg ( klogDebug, "_DirNodeConstructor ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,templat=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _DirNodeConstructor () */
-
-static
-rc_t CC
-_DirNodeValidator (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            uint32_t Flags
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_DirNodeValidator ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,templat=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _DirNodeValidator () */
-
-static const struct XFSTeleport _sDirNodeTeleport = {
-                                            _DirNodeConstructor,
-                                            _DirNodeValidator,
-                                            false
-                                            };
-
-
-LIB_EXPORT
-rc_t CC
-XFSDirectoryProvider ( const struct XFSTeleport ** Teleport )
-{
-    if ( Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = & _sDirNodeTeleport;
-
-    return 0;
-}   /* XFSDirectoryProvider () */
-
diff --git a/libs/xfs/lockdpt.c b/libs/xfs/lockdpt.c
deleted file mode 100644
index 27a3d33..0000000
--- a/libs/xfs/lockdpt.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <kproc/lock.h>
-
-#include "schwarzschraube.h"
-#include "lockdpt.h"
-#include "zehr.h"
-
-#include <sysalloc.h>
-
-
-/*||*\
-  || Lyrics:
-  || The will be array of KLock instances and lock will be acquired
-  || by hash value
-\*||*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)) XFSLockDepot structure is living here
- ((*/
-
-struct XFSLockDepot {
-    struct KLock ** mutabors;
-    uint32_t qty;
-};
-
-LIB_EXPORT
-rc_t CC
-XFSLockDepotMake ( uint32_t DepotSize, struct XFSLockDepot ** Depot )
-{
-    rc_t RCt;
-    struct XFSLockDepot * RetDepot;
-    struct KLock * Lock;
-    uint32_t llp;
-
-    RCt = 0;
-    RetDepot = NULL;
-    Lock = NULL;
-    llp = 0;
-
-    if ( Depot != NULL ) {
-        * Depot = NULL;
-    }
-
-    if ( Depot == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( DepotSize == 0 ) {
-        DepotSize = XFS_DEFAULT_DEPOT_SIZE;
-    }
-
-    RetDepot = calloc ( 1, sizeof ( struct XFSLockDepot ) );
-    if ( RetDepot == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RetDepot -> qty = DepotSize;
-
-    RetDepot -> mutabors = calloc (
-                            RetDepot -> qty,
-                            sizeof ( struct KLock * )
-                            );
-    if ( RetDepot -> mutabors == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-
-    if ( RCt == 0 ) {
-        for ( llp = 0; llp < RetDepot -> qty; llp ++ ) {
-            RCt = KLockMake ( & Lock );
-            if ( RCt != 0 ) {
-                break;
-            }
-
-            RetDepot -> mutabors [ llp ] = Lock;
-        }
-
-        if ( RCt == 0 ) {
-            * Depot = RetDepot;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        XFSLockDepotDispose ( RetDepot );
-
-        RetDepot = NULL;
-        * Depot = NULL;
-    }
-
-    return RCt;
-}   /*  XFSLockDepotMake () */
-
-    /*\ I am going to drop all bad LOCKS, so return 0 on any
-    |*| ocassion and will think later
-    \*/
-LIB_EXPORT
-rc_t CC
-XFSLockDepotDispose ( struct XFSLockDepot * self )
-{
-    uint32_t llp;
-    struct KLock * Lock;
-
-    llp = 0;
-    Lock = NULL;
-
-    if ( self == NULL ) {
-        return 0;
-    }
-
-        /*\ variable qty is initialize at first place, so it is
-        |*| safe to check it first
-        \*/
-    if ( self -> qty != 0 ) {
-        if ( self -> mutabors != NULL ) {
-            for ( llp = 0; llp < self -> qty; llp ++ ) {
-                Lock = self -> mutabors [ llp ];
-                if ( Lock != NULL ) {
-                    KLockRelease ( Lock );
-                }
-
-                self -> mutabors [ llp ] = NULL;
-            }
-
-            free ( self -> mutabors );
-
-            self -> mutabors = NULL;
-        }
-
-        self -> qty = 0;
-    }
-
-    free ( self );
-
-    return 0;
-}   /* XFSLockDepotDispose () */
-
-LIB_EXPORT
-rc_t CC
-XFSLockDepotAcquire ( struct XFSLockDepot * self, uint32_t HashValue )
-{
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> qty == 0 || self -> mutabors == NULL ) {
-        return XFS_RC ( rcInvalid );
-    } 
-
-    return KLockAcquire ( self -> mutabors [ HashValue % self -> qty ] );
-}   /* XFSLockDepotAcquire () */
-
-LIB_EXPORT
-rc_t CC
-XFSLockDepotUnlock ( struct XFSLockDepot * self, uint32_t HashValue )
-{
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> qty == 0 || self -> mutabors == NULL ) {
-        return XFS_RC ( rcInvalid );
-    } 
-
-    return KLockUnlock ( self -> mutabors [ HashValue % self -> qty ] );
-}   /* XFSLockDepotUnlock () */
diff --git a/libs/xfs/lockdpt.h b/libs/xfs/lockdpt.h
deleted file mode 100644
index 6a0d321..0000000
--- a/libs/xfs/lockdpt.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _lockdpt_h_
-#define _lockdpt_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   I suppose here could be many different items to lock, and I
-  ))))  want to reduce amount of mutexes
- ((((
-  ))))  In general, there will be array of mutexes, and user will be
- ((((   able to lock/unlock processing by providing the mutex number
-  ))))
- ((((*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct XFSLockDepot;
-
-#define XFS_DEFAULT_DEPOT_SIZE  256
-
-    /*)) If DepotSize == 0, it will produce array of
-     //  XFS_DEFAULT_DEPOT_SIZE locks
-    ((*/
-XFS_EXTERN rc_t CC XFSLockDepotMake (
-                                uint32_t DepotSize,
-                                struct XFSLockDepot ** Depot
-                                );
-XFS_EXTERN rc_t CC XFSLockDepotDispose (
-                                struct XFSLockDepot * self
-                                );
-
-XFS_EXTERN rc_t CC XFSLockDepotAcquire (
-                                struct XFSLockDepot * self,
-                                uint32_t HashValue
-                                );
-XFS_EXTERN rc_t CC XFSLockDepotUnlock (
-                                struct XFSLockDepot * self,
-                                uint32_t HashValue
-                                );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _lockdpt_h_ */
diff --git a/libs/xfs/lreader.c b/libs/xfs/lreader.c
deleted file mode 100644
index c8e812c..0000000
--- a/libs/xfs/lreader.c
+++ /dev/null
@@ -1,459 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/mmap.h>
-
-#include <va_copy.h>
-
-#include "lreader.h"
-#include "schwarzschraube.h"
-
-#include <sysalloc.h>
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))    Struct itself
- ((*/
-struct XFSLineReader {
-    KRefcount refcount;
-
-    const struct KMMap * map;
-
-    size_t size;
-    const char * start;
-    const char * curr_line;
-    size_t curr_len;
-    size_t curr_no;
-};
-
-static const char * _sXFSLineReader_classname = "XFSLineReader";
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)) Kinda basic method
- ((*/
-static
-rc_t CC
-_LineLen ( const char * Begin, const char * End, size_t * Len )
-{
-    const char * Pos = Begin;
-
-    if ( Len != NULL ) {
-        * Len = 0;
-    }
-
-    if ( Pos == NULL || End == NULL || Len == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( End <= Pos ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    while ( Pos < End ) {
-        if ( * Pos == '\n' ) {
-            break;
-        }
-
-        Pos ++;
-    }
-
-    * Len = Pos - Begin;
-
-    return 0;
-}   /* _LineLen () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static
-rc_t CC
-_LineReaderDispose ( const struct XFSLineReader * self )
-{
-    struct XFSLineReader * Reader = ( struct XFSLineReader * ) self;
-
-    if ( Reader != NULL ) {
-        KRefcountWhack (
-                    & ( Reader -> refcount ),
-                    _sXFSLineReader_classname
-                    );
-
-        if ( Reader -> map != NULL ) {
-            KMMapRelease ( Reader -> map );
-            Reader -> map = NULL;
-        }
-
-        Reader -> size = 0;
-        Reader -> start = Reader -> curr_line = 0;
-        Reader -> curr_len = Reader -> curr_no = 0;
-
-        free ( Reader );
-    }
-
-    return 0;
-}   /* XFSLineReaderDispose () */
-
-LIB_EXPORT
-rc_t CC
-XFSLineReaderOpen (
-                const struct XFSLineReader ** Reader,
-                const char * Path,
-                ...
-)
-{
-    rc_t RCt;
-    va_list Args;
-
-    RCt = 0;
-
-    va_start ( Args, Path );
-
-    RCt = XFSLineReaderVOpen ( Reader, Path, Args );
-
-    va_end ( Args );
-
-    return RCt;
-}   /* XFSLineReaderOpen () */
-
-LIB_EXPORT
-rc_t CC
-XFSLineReaderVOpen (
-                const struct XFSLineReader ** Reader,
-                const char * Path,
-                va_list Args
-)
-{
-    rc_t RCt;
-    struct KDirectory * NatDir;
-    const struct KFile * File;
-    va_list xArgs;
-
-    RCt = 0;
-    NatDir = NULL;
-    File = NULL;
-
-    XFS_CSAN ( Reader )
-    XFS_CAN ( Path )
-    XFS_CAN ( Reader )
-
-    RCt = KDirectoryNativeDir ( & NatDir );
-    if ( RCt == 0 ) {
-
-        va_copy ( xArgs, Args );
-        RCt = KDirectoryVOpenFileRead ( NatDir, & File, Path, xArgs );
-        va_end ( xArgs );
-        if ( RCt == 0 ) {
-
-            RCt = XFSLineReaderMake ( File, Reader );
-
-            KFileRelease ( File );  /* Will release file here */
-        }
-
-        KDirectoryRelease ( NatDir );
-    }
-
-    return RCt;
-}   /* XFSLineReaderVOpen () */
-
-LIB_EXPORT
-rc_t CC
-XFSLineReaderMake (
-                const struct KFile * File,
-                const struct XFSLineReader ** Reader
-)
-{
-    rc_t RCt;
-    struct XFSLineReader * RetVal;
-    const struct KMMap * Map;
-    size_t MapSize, LineLen;
-    const void * Addr;
-
-    RCt = 0;
-    RetVal = NULL;
-    Map = NULL;
-    MapSize = LineLen = 0;
-    Addr = NULL;
-
-    XFS_CSAN ( Reader )
-    XFS_CAN ( File )
-    XFS_CAN ( Reader )
-
-    RetVal = calloc ( 1, sizeof ( struct XFSLineReader ) );
-    if ( RetVal == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = KMMapMakeRead ( & Map, File );
-    if ( RCt == 0 ) {
-        RCt = KMMapSize ( Map, & MapSize );
-        if ( RCt == 0 ) {
-            if ( 0 < MapSize ) {
-                RCt = KMMapAddrRead ( Map, & Addr );
-            }
-            else {
-                Addr = NULL;
-            }
-
-            if ( RCt == 0 ) {
-                KRefcountInit (
-                            & ( RetVal -> refcount ),
-                            1,
-                            _sXFSLineReader_classname,
-                            "LineReaderMake",
-                            "LineReader"
-                            );
-
-
-                RetVal -> map = Map;
-                RetVal -> size = MapSize;
-                RetVal -> start = ( const char * ) Addr;
-
-                XFSLineReaderRewind ( RetVal );
-
-                * Reader = RetVal;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Reader = NULL;
-
-        if ( RetVal != NULL ) {
-            _LineReaderDispose ( RetVal );
-        }
-    }
-
-    return RCt;
-}   /* XFSLineReaderMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSLineReaderAddRef ( const struct XFSLineReader * self )
-{
-    rc_t RCt;
-    struct XFSLineReader * Reader;
-    int Refc;
-
-    RCt = 0;
-    Reader = ( struct XFSLineReader * ) self;
-    Refc = 0;
-
-    if ( Reader == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Refc = KRefcountAdd (
-                        & ( Reader -> refcount ),
-                        _sXFSLineReader_classname
-                        );
-    switch ( Refc ) {
-        case krefOkay :
-                    RCt = 0;
-                    break;
-        case krefZero :
-        case krefLimit :
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSLineReaderAddRef () */
-
-LIB_EXPORT
-rc_t CC
-XFSLineReaderRelease ( const struct XFSLineReader * self )
-{
-    rc_t RCt;
-    int Refc;
-    struct XFSLineReader * Reader;
-
-    RCt = 0;
-    Refc = 0;
-    Reader = ( struct XFSLineReader * ) self;
-
-    if ( Reader == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Refc = KRefcountDrop (
-                        & ( Reader -> refcount ),
-                        _sXFSLineReader_classname
-                        );
-    switch ( Refc ) {
-        case krefOkay :
-        case krefZero :
-                    RCt = 0;
-                    break;
-        case krefWhack :
-                    RCt = _LineReaderDispose ( self );
-                    break;
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSLineReaderRelease () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-LIB_EXPORT
-bool CC
-XFSLineReaderGood ( const struct XFSLineReader * self )
-{
-    if ( self != NULL ) {
-        if ( self -> start != NULL ) {
-            return true;
-        }
-    }
-    return false;
-}   /* XFSLineReaderGood () */
-
-LIB_EXPORT
-bool CC
-XFSLineReaderNext ( const struct XFSLineReader * self )
-{
-    const char * NewLineStart, * LineEnd;
-    size_t NewLineLen;
-    struct XFSLineReader * Reader;
-
-    NewLineStart = LineEnd = NULL;
-    NewLineLen = 0;
-    Reader = ( struct XFSLineReader * ) self;
-
-    if ( ! XFSLineReaderGood ( self ) ) {
-        return false;
-    }
-
-    LineEnd = self -> start + self -> size;
-    NewLineStart = self -> curr_line + Reader -> curr_len + 1;
-
-    if ( NewLineStart < LineEnd ) {
-        if ( _LineLen ( NewLineStart, LineEnd, & NewLineLen ) == 0 ) {
-            Reader -> curr_line = NewLineStart;
-            Reader -> curr_len = NewLineLen;
-            Reader -> curr_no ++;
-
-            return true;
-        }
-    }
-
-    return false;
-}   /* XFSLineReaderNext () */
-
-LIB_EXPORT
-rc_t CC
-XFSLineReaderGet (
-            const struct XFSLineReader * self,
-            const struct String * OutLine
-)
-{
-    struct String * TheOutLine = ( struct String * ) OutLine;
-
-    XFS_CAN ( self )
-    XFS_CAN ( OutLine )
-
-    if ( ! XFSLineReaderGood ( self ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    StringInit (
-                TheOutLine,
-                self -> curr_line,
-                self -> curr_len,
-                self -> curr_len
-                );
-
-    return 0;
-}   /* XFSLineReaderGet () */
-
-LIB_EXPORT
-rc_t CC
-XFSLineReaderLineNo (
-            const struct XFSLineReader * self,
-            size_t * LineNo
-)
-{
-    XFS_CSA ( LineNo, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( LineNo )
-
-    if ( ! XFSLineReaderGood ( self ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    * LineNo = self -> curr_no;
-
-    return 0;
-}   /* XFSLineReaderLineNo () */
-
-LIB_EXPORT
-rc_t CC
-XFSLineReaderRewind ( const struct XFSLineReader * self )
-{
-    rc_t RCt;
-    size_t Len;
-    struct XFSLineReader * Reader;
-
-    RCt = 0;
-    Len = 0;
-    Reader = ( struct XFSLineReader * ) self;
-
-    XFS_CAN ( self );
-
-    if ( ! XFSLineReaderGood ( self ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = _LineLen (
-                    self -> start,
-                    self -> start + self -> size,
-                    & Len
-                    );
-    if ( RCt == 0 ) {
-        Reader -> curr_line = self -> start;
-        Reader -> curr_len = Len;
-        Reader -> curr_no = 0;
-    }
-
-    return RCt;
-}   /* XFSLineReaderRewind () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
diff --git a/libs/xfs/lreader.h b/libs/xfs/lreader.h
deleted file mode 100644
index 77f625d..0000000
--- a/libs/xfs/lreader.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _lreader_h_
-#define _lreader_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   Simple line reader
-  ))))
- ((((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* Lyrics:                                                           */
-/* Liner reader creates KMMap over KFile and traverces trhough map   */
-/* NOTE: it translates file position, eg. it cuts '\n' at the end    */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))    Forwards
- ((*/
-struct XFSLineReader;
-struct KFile;
-
-/*))    Opening/creating/disposing
- ((*/
-XFS_EXTERN rc_t CC XFSLineReaderOpen (
-                                const struct XFSLineReader ** Reader,
-                                const char * Path,
-                                ...
-                                );
-XFS_EXTERN rc_t CC XFSLineReaderVOpen (
-                                const struct XFSLineReader ** Reader,
-                                const char * Path,
-                                va_list Args
-                                );
-XFS_EXTERN rc_t CC XFSLineReaderMake (
-                                const struct KFile * File,
-                                const struct XFSLineReader ** Reader
-                                );
-
-XFS_EXTERN rc_t CC XFSLineReaderAddRef (
-                                const struct XFSLineReader * self
-                                );
-XFS_EXTERN rc_t CC XFSLineReaderRelease (
-                                const struct XFSLineReader * self
-                                );
-
-/*))    Using and data accessing
- ((*/
-XFS_EXTERN bool CC XFSLineReaderGood (
-                                const struct XFSLineReader * self
-                                );
-
-    /*  If it is possible to fetch a line it moves cursor to next
-     *  line and returns true. Overvise it will return false.
-     */
-XFS_EXTERN bool CC XFSLineReaderNext (
-                                const struct XFSLineReader * self
-                                );
-
-    /*  Fetches line at current cursor and fills OutLine structure
-     */
-XFS_EXTERN rc_t CC XFSLineReaderGet (
-                                const struct XFSLineReader * self,
-                                const struct String * OutLine
-                                );
-
-    /*  Return number of line where cursor is set
-     */
-XFS_EXTERN rc_t CC XFSLineReaderLineNo (
-                                const struct XFSLineReader * self,
-                                size_t * LineNo
-                                );
-
-    /*  Set current cursor to begin of map
-     */
-XFS_EXTERN rc_t CC XFSLineReaderRewind (
-                                const struct XFSLineReader * self
-                                );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _lreader_h_ */
diff --git a/libs/xfs/mehr.c b/libs/xfs/mehr.c
deleted file mode 100644
index 0c04bfa..0000000
--- a/libs/xfs/mehr.c
+++ /dev/null
@@ -1,258 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/namelist.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-
-#include <kfg/config.h>
-
-#include <kns/manager.h>
-#include <kns/http.h>
-
-
-#include "teleport.h"
-#include "mehr.h"
-#include "schwarzschraube.h"
-#include "zehr.h"
-
-#include <sysalloc.h>
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)) Forwards
- ((*/
-XFS_EXTERN rc_t CC XFSTarDepotInit ();
-XFS_EXTERN rc_t CC XFSTarDepotDispose ();
-XFS_EXTERN rc_t CC XFSEncDepotInit ();
-XFS_EXTERN rc_t CC XFSEncDepotDispose ();
-XFS_EXTERN rc_t CC XFSEncDirectoryDepotInit ();
-XFS_EXTERN rc_t CC XFSEncDirectoryDepotDispose ();
-XFS_EXTERN rc_t CC XFSGapFilesInit ();
-XFS_EXTERN rc_t CC XFSGapFilesDispose ();
-XFS_EXTERN rc_t CC XFS_VfsManagerInit ();
-XFS_EXTERN rc_t CC XFS_VfsManagerDispose ();
-XFS_EXTERN rc_t CC XFS_KnsManagerInit ();
-XFS_EXTERN rc_t CC XFS_KnsManagerDispose ();
-XFS_EXTERN rc_t CC XFSGapKartDepotInit ();
-XFS_EXTERN rc_t CC XFSGapKartDepotDispose ();
-
-/*)) Config and all config related
- ((*/
-
-static const struct KConfig * _sConfig_MHR = NULL;
-static const char * _sConfigPath_MHR = NULL;
-
-LIB_EXPORT
-rc_t CC
-XFS_InitAll_MHR ( const char * ConfigFile )
-{
-    rc_t RCt;
-    const struct KConfig * Config;
-
-    RCt = 0;
-    Config = NULL;
-
-pLogMsg ( klogInfo, "InitAll [$(path)]", "path=%s", ( ConfigFile == NULL ? "NULL" : ConfigFile ) );
-
-        /* First we do inti config :lol: */
-    RCt = XFS_LoadConfig_ZHR ( ConfigFile, & Config );
-    if ( RCt == 0 ) {
-        _sConfig_MHR = Config;
-        if ( ConfigFile != NULL ) {
-            _sConfigPath_MHR = string_dup_measure ( ConfigFile, NULL );
-        }
-
-        RCt = XFS_VfsManagerInit ();
-
-        if ( RCt == 0 ) {
-            XFS_KnsManagerInit ();
-        }
-
-        if ( RCt == 0 ) {
-            RCt = XFSTeleportInit ();
-        }
-
-        if ( RCt == 0 ) {
-            RCt = XFSTarDepotInit ();
-        }
-
-        if ( RCt == 0 ) {
-            RCt = XFSEncDepotInit ();
-        }
-
-        if ( RCt == 0 ) {
-            RCt = XFSEncDirectoryDepotInit ();
-        }
-
-        if ( RCt == 0 ) {
-            XFSGapFilesInit ();
-        }
-
-        if ( RCt == 0 ) {
-            XFSGapKartDepotInit ();
-        }
-    }
-
-    return RCt;
-}   /* XFS_InitAll_MHR () */
-
-LIB_EXPORT
-rc_t CC
-XFS_DisposeAll_MHR ()
-{
-pLogMsg ( klogInfo, "DisposeAll [$(path)]", "path=%s", _sConfigPath_MHR );
-
-    XFSGapKartDepotDispose ();
-
-    XFSGapFilesDispose ();
-
-    XFSEncDirectoryDepotDispose ();
-
-    XFSEncDepotDispose ();
-
-    XFSTarDepotDispose ();
-
-    XFSTeleportDispose ();
-
-    XFS_VfsManagerDispose ();
-
-    XFS_KnsManagerDispose ();
-
-    if ( _sConfig_MHR != NULL ) {
-        KConfigRelease ( _sConfig_MHR );
-
-        _sConfig_MHR = NULL;
-    }
-
-    if ( _sConfigPath_MHR != NULL ) {
-        free ( ( char * ) _sConfigPath_MHR );
-
-        _sConfigPath_MHR = NULL;
-    }
-
-    return 0;
-}   /* XFS_DisposeAll_MHR () */
-
-LIB_EXPORT
-const struct KConfig * CC
-XFS_Config_MHR ()
-{
-    return _sConfig_MHR;
-}   /* XFS_Config_MHR () */
-
-LIB_EXPORT
-const char * CC
-XFS_ConfigPath_MHR ()
-{
-    return _sConfigPath_MHR;
-}   /* XFS_ConfigPath_MHR () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- //  That method will try open resource for reading local or remote
-((*/
-LIB_EXPORT
-rc_t CC
-XFS_OpenResourceRead_MHR (
-                        const char * Resource,
-                        const struct KFile ** RetFile
-)
-{
-    rc_t RCt;
-    const struct KNSManager * knsManager;
-    const struct KFile * File;
-    struct KDirectory * Directory;
-
-    RCt = 0;
-    knsManager = NULL;
-    File = NULL;
-
-        /* Standard check */
-    if ( Resource == NULL || RetFile == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * RetFile = NULL;
-
-    if ( strstr ( Resource, "http" ) == Resource ) {
-            /* That is stupid, but ... prolly this is URL */
-        knsManager = XFS_KnsManager ();
-        if ( knsManager == NULL ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        if ( RCt == 0 ) {
-            RCt = KNSManagerMakeHttpFile (
-                                knsManager,
-                                & File,
-                                NULL, /* doing that in absence conn */
-                                0x01010000,
-                                Resource
-                                );
-            if ( RCt != 0 ) {
-                /* We failed to load it remotely, may be it is local */
-                File = NULL;
-                RCt = 0;
-            }
-
-            KNSManagerRelease ( knsManager );
-        }
-    }
-
-        /* And here we are */
-    if ( File == NULL ) {
-        RCt = KDirectoryNativeDir ( & Directory );
-        if ( RCt == 0 ) {
-            RCt = KDirectoryOpenFileRead (
-                                    Directory,
-                                    & File,
-                                    Resource
-                                    );
-
-            KDirectoryRelease ( Directory );
-        }
-    }
-
-    if ( RCt == 0 ) {
-        * RetFile = File;
-    }
-
-    return RCt;
-}   /* XFS_OpenResourceRead_MHR () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
diff --git a/libs/xfs/mehr.h b/libs/xfs/mehr.h
deleted file mode 100644
index f3a416b..0000000
--- a/libs/xfs/mehr.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _mehr_h_
-#define _mehr_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   Thif fail contains temporary methods and definitions, which
-  ))))  should be replaced/removed in future.
- ((((     All names in that file ends with _MHR
-  ))))
- ((((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))  Config, and config related. Will use mainstream later.
- ((*/
-
-struct KConfig;
-
-XFS_EXTERN rc_t CC XFS_InitAll_MHR ( const char * ConfigFile );
-
-XFS_EXTERN rc_t CC XFS_DisposeAll_MHR ();
-
-XFS_EXTERN const struct KConfig * XFS_Config_MHR ();
-
-XFS_EXTERN const char * XFS_ConfigPath_MHR ();
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))  Fancy I/O
- ((*/
-struct KFile;
-
-XFS_EXTERN rc_t CC XFS_OpenResourceRead_MHR (
-                            const char * Resource,
-                            const struct KFile ** File
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _mehr_h_ */
diff --git a/libs/xfs/model.c b/libs/xfs/model.c
deleted file mode 100644
index 524acfd..0000000
--- a/libs/xfs/model.c
+++ /dev/null
@@ -1,1157 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/container.h>
-#include <klib/refcount.h>
-#include <klib/namelist.h>
-#include <klib/log.h>
-
-#include <kfg/config.h>
-
-#include <xfs/model.h>
-
-#include "owp.h"
-#include "mehr.h"
-#include "zehr.h"
-#include "schwarzschraube.h"
-
-#include <sysalloc.h>
-
-/*)))
- |||
- +++    Model and other
- |||
-(((*/
-
-/*)
- /      Useful farriables
-(*/
-static const char * _sXFSNodePath = "xfs";
-static const char * _sXFSNodeModel = "model";
-static const char * _sXFSModel_classname = "XFSModel";
-
-/*)))
- |||
- +++    We suppose that there could exists several models, so ... Refs
- |||
-(((*/
-struct XFSModel {
-    BSTree tree;
-    KRefcount refcount;
-
-    const char * Resource;
-    const char * Version;
-};
-
-struct XFSModelNode {
-    BSTNode node;
-
-        /*)   the only property, which could not be overriden
-         (*/
-    const char * Name;
-
-        /*)   all model node properties except 'children'
-         (*/
-    struct XFSOwp * Properties;
-
-        /*)   there will be chidlren with labels
-         (*/
-    struct XFSOwp * Children;
-
-    bool IsRoot;
-};
-
-/*)))
- ///    ModelNode Make and Destroy
-(((*/
-
-LIB_EXPORT
-const char * CC
-XFSModelNodeName ( const struct XFSModelNode * self )
-{
-    return self == NULL ? NULL : ( self -> Name );
-}   /* XFSModelNodeName () */
-
-LIB_EXPORT
-const char * CC
-XFSModelNodeType ( const struct XFSModelNode * self )
-{
-    return XFSModelNodeProperty ( self, XFS_MODEL_TYPE );
-}   /* XFSModelNodeType () */
-
-LIB_EXPORT
-bool CC
-XFSModelNodeReadOnly ( const struct XFSModelNode * self )
-{
-    const char * Mode = XFSModelNodeProperty ( self, XFS_MODEL_MODE );
-    if ( Mode == NULL ) {
-        return false;
-    }
-    return strcmp ( Mode, XFS_MODEL_MODE_RO ) == 0;
-}   /* XFSModelNodeReadOnly () */
-
-LIB_EXPORT
-const char * CC
-XFSModelNodeAs ( const struct XFSModelNode * self )
-{
-    return XFSModelNodeProperty ( self, XFS_MODEL_AS );
-}   /* XFSModelNodeAs () */
-
-LIB_EXPORT
-const char * CC
-XFSModelNodeLabel ( const struct XFSModelNode * self )
-{
-    return XFSModelNodeProperty ( self, XFS_MODEL_LABEL );
-}   /* XFSModelNodeLabel () */
-
-LIB_EXPORT
-const char * CC
-XFSModelNodeSecurity ( const struct XFSModelNode * self )
-{
-    return XFSModelNodeProperty ( self, XFS_MODEL_SECURITY );
-}   /* XFSModelNodeSecurity () */
-
-LIB_EXPORT
-bool CC
-XFSModelNodeIsRoot ( const struct XFSModelNode * self )
-{
-    const char * Name;
-
-    Name = XFSModelNodeName ( self );
-
-    if ( Name != NULL ) {
-        if ( strcmp ( Name, XFS_MODEL_ROOT ) == 0 ) {
-            return true;
-        }
-    }
-
-    return Name == NULL
-                    ? false
-                    : ( strcmp ( Name, XFS_MODEL_ROOT ) == 0 )
-                    ;
-}   /* XFSModelNodeIsRoot () */
-
-LIB_EXPORT
-rc_t CC
-XFSModelNodePropertyNames (
-                    const struct XFSModelNode * self,
-                    const struct KNamelist ** Properties
-)
-{
-    if ( self == NULL || Properties == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Properties = NULL;
-
-    if ( self -> Properties == NULL ) {
-        return 0;
-    }
-
-    return XFSOwpListKeys ( self -> Properties, Properties );
-}   /* XFSModelNodeListProperties () */
-
-LIB_EXPORT
-const char * CC
-XFSModelNodeProperty (
-                    const struct XFSModelNode * self,
-                    const char * PropertyName
-)
-{
-    return self == NULL
-                ? NULL
-                : XFSOwpGet ( self -> Properties, PropertyName )
-                ;
-}   /* XFSModelNodeProperty () */
-
-LIB_EXPORT
-rc_t CC
-XFSModelNodeChildrenNames (
-                    const struct XFSModelNode * self,
-                    const struct KNamelist ** Children
-)
-{
-    if ( self == NULL || Children == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Children = NULL;
-
-    if ( self -> Children == NULL ) {
-        return 0;
-    }
-
-    return XFSOwpListKeys ( self -> Children, Children );
-}   /* XFSModelNodeChildrenNames () */
-
-LIB_EXPORT
-const char * CC
-XFSModelNodeChildAlias (
-                    const struct XFSModelNode * self,
-                    const char * ChildName
-)
-{
-    return self == NULL
-                ? NULL
-                : XFSOwpGet ( self -> Children, ChildName )
-                ;
-}   /* XFSModelNodeChildAlias () */
-
-static
-rc_t CC
-_XFSModelNodeDispose ( struct XFSModelNode * Node )
-{
-
-/*
-pLogMsg ( klogDebug, "_XFSModelNodeDispose ( $(node), \"$(name)\" )", "node=%p,name=%s", ( void * ) Node, ( Node -> Name == NULL ? "NULL" : ( Node -> Name ) ) );
-*/
-    if ( Node == NULL ) {
-            /* It is already disposed */
-        return 0;
-    }
-
-    if ( Node -> Name != NULL ) {
-        free ( ( char * ) Node -> Name );
-        Node -> Name = NULL;
-    }
-
-    if ( Node -> Properties != NULL ) {
-        XFSOwpDispose ( Node -> Properties );
-        Node -> Properties = NULL;
-    }
-
-    if ( Node -> Children != NULL ) {
-        XFSOwpDispose ( Node -> Children );
-        Node -> Children = NULL;
-    }
-
-    free ( Node );
-
-    return 0;
-}   /* _XFSModelNodeDispose () */
-
-static
-rc_t CC
-_XFSModelNodeMake ( const char * Name, struct XFSModelNode ** Node )
-{
-    rc_t RCt;
-    struct XFSModelNode * Knoten;
-
-    RCt = 0;
-
-    if ( Name == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Node = NULL;
-
-    Knoten = calloc ( 1, sizeof ( struct XFSModelNode ) );
-    if ( Knoten == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    Knoten -> IsRoot = strcmp ( Name, XFS_MODEL_ROOT ) == 0;
-
-    RCt = XFS_StrDup ( Name, & ( Knoten -> Name ) );
-    if ( RCt == 0 ) {
-        RCt = XFSOwpMake ( & ( Knoten -> Properties ) );
-
-        if ( RCt == 0 ) {
-            RCt = XFSOwpMake ( & ( Knoten -> Children ) );
-
-            if ( RCt == 0 ) {
-                * Node = Knoten;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        _XFSModelNodeDispose ( Knoten );
-
-        Knoten = NULL;
-    }
-
-/*
-pLogMsg ( klogDebug, "_XFSModelNodeMake ( $(node), \"$(name)\" )", "node=%p,name=%s", ( void * ) Node, Name );
-*/
-
-    return RCt;
-}   /* _XFSModeNodeMake () */
-
-
-
-/*)))
- ///    Model Make and Destroy
-(((*/
-
-/*))
- //   That method will return source for model ... need to rethink
-((*/
-static
-rc_t CC
-_GetDefaultModelSource ( const char ** Source )
-{
-    rc_t RCt;
-    const struct KConfig * Konfig;
-    const struct KConfigNode * KonfigNode;
-    char Buf [ XFS_SIZE_4096 ];
-    size_t Readed;
-
-    RCt = 0;
-    Konfig = NULL;
-    KonfigNode = NULL;
-    Readed = 0;
-
-    if ( Source == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Source = NULL;
-
-    Konfig = XFS_Config_MHR ();
-    if ( Konfig != NULL ) {
-        RCt = KConfigOpenNodeRead (
-                                Konfig,
-                                & KonfigNode,
-                                "%s/%s",
-                                _sXFSNodePath,
-                                _sXFSNodeModel
-                                );
-        if ( RCt == 0 ) {
-            RCt = KConfigNodeRead (
-                                    KonfigNode,
-                                    0,
-                                    Buf,
-                                    sizeof ( Buf ),
-                                    & Readed,
-                                    NULL
-                                    );
-            if ( RCt == 0 && 0 < Readed ) {
-                * Source = ( const char * ) string_dup ( Buf, Readed );
-            }
-
-            KConfigNodeRelease ( KonfigNode );
-        }
-    }
-    else {
-        RCt = XFS_RC ( rcInvalid );
-    }
-
-    return RCt;
-}   /* _GetDefaultModelSource () */
-
-/*))
- //   That method will create and initialize model from scratch
-((*/
-static
-rc_t CC
-_ErstellenUndInitialisierenModel (
-                    const char * Resource,
-                    const char * Version,
-                    const struct XFSModel  ** Model
-)
-{
-    struct XFSModel * Modell;
-
-    Modell = NULL;
-
-    if ( Resource == NULL || Model == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Model = NULL;
-
-    Modell = calloc ( 1, sizeof ( struct XFSModel ) );
-    if ( Modell == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    BSTreeInit ( & ( Modell -> tree ) );
-    KRefcountInit (
-                    & ( Modell -> refcount ),
-                    1,
-                    _sXFSModel_classname,
-                    "XFSModelMake",
-                    "Model"
-                    );
-    if ( Version != NULL ) {
-        XFS_StrDup ( Version, & ( Modell -> Version ) );
-    }
-
-    if ( XFS_StrDup ( Resource, & ( Modell -> Resource ) ) != 0 ) {
-            /* We should do it ... */
-        XFSModelDispose ( Modell );
-
-        * Model = NULL;     /* just for case */
-
-        return XFS_RC ( rcInvalid );
-    }
-
-    * Model = Modell;
-
-    return 0;
-}   /* _ErstellenUndInitialisierenModel () */
-
-/*))
- //   Some usual
-((*/
-
-    /*))
-     ((   There is very simple format for children field value:
-      ))      name[:label][,name[:label]....]
-     ((*/
-static
-rc_t CC
-_ParseAddNodeChildren (
-                const struct XFSModelNode * Node,
-                const char * ChildrenProperty
-)
-{
-    rc_t RCt;
-    struct KNamelist * Children;
-    struct KNamelist * Break;
-    uint32_t ChildCount, llp;
-    const char * Child;
-    uint32_t BreakCount, ppl;
-    const char * BChild, * BAlias;
-
-    RCt = 0;
-    ChildCount = llp = 0;
-    Children = NULL;
-    Child = NULL;
-    BreakCount = ppl = 0;
-    Break = NULL;
-    BChild = BAlias = NULL;
-
-    RCt = XFS_SimpleTokenize_ZHR ( ChildrenProperty, ',', & Children );
-    if ( RCt == 0 ) {
-        RCt = KNamelistCount ( Children, & ChildCount );
-        if ( RCt == 0 ) {
-            for ( llp = 0; llp < ChildCount; llp ++ ) { 
-                RCt = KNamelistGet ( Children, llp, & Child );
-                if ( RCt == 0 ) {
-                    RCt = XFS_SimpleTokenize_ZHR ( Child, ':', &Break );
-                    if ( RCt == 0 ) {
-                        RCt = KNamelistCount ( Break, & BreakCount );
-                        if ( RCt == 0 ) {
-                            BChild = BAlias = NULL;
-
-                            RCt = KNamelistGet ( Break, 0, & BChild );
-                            if ( RCt == 0 ) {
-                                if ( 1 < BreakCount ) {
-                                    RCt = KNamelistGet (
-                                                    Break,
-                                                    1,
-                                                    & BAlias
-                                                    );
-                                }
-                            }
-                            if ( RCt == 0 ) {
-                                RCt = XFSOwpSet (
-                                                    Node -> Children,
-                                                    BChild,
-                                                    BAlias
-                                                    );
-                            }
-                        }
-
-                        KNamelistRelease ( Break );
-                    }
-                }
-
-                if ( RCt != 0 ) {
-                    break;
-                }
-            }
-        }
-
-        KNamelistRelease ( Children );
-    }
-
-    return RCt;
-}   /* _ParseAddNodeChildren () */
-
-static
-rc_t CC
-_SetModelNodeProperty (
-            const struct XFSModelNode * ModelNode,
-            const struct KConfigNode * KonfigNode,
-            const char * PropertyName
-)
-{
-    rc_t RCt;
-    struct KConfigNode * Node;
-    char Buv [ XFS_SIZE_1024 ];
-    size_t NumRead, Remain;
-
-    RCt = 0;
-    Node = NULL;
-    NumRead = Remain = 0;
-
-        /* First we opening node for read */
-    RCt = KConfigNodeOpenNodeRead (
-                            KonfigNode,
-                            ( const struct KConfigNode ** ) & Node,
-                            PropertyName
-                            );
-    if ( RCt == 0 ) {
-        RCt = KConfigNodeRead (
-                            Node,
-                            0,
-                            Buv,
-                            sizeof ( Buv ),
-                            & NumRead,
-                            & Remain
-                            );
-        if ( RCt == 0 ) {
-            Buv [ NumRead ] = 0;
-
-            if ( strcmp ( PropertyName, XFS_MODEL_CHILDREN ) == 0 ) {
-                _ParseAddNodeChildren ( ModelNode, Buv );
-            }
-            else {
-                RCt = XFSOwpSet (
-                                    ModelNode -> Properties,
-                                    PropertyName,
-                                    Buv
-                                    );
-            }
-        }
-
-        KConfigNodeRelease ( Node );
-    }
-
-    return RCt;
-}   /* _SetModelNodeProperty () */
-
-static
-int64_t CC
-_LoadNodeCallback ( const BSTNode * N1, const BSTNode * N2 )
-{
-    return XFS_StringCompare4BST_ZHR (
-                            ( ( struct XFSModelNode * ) N1 ) -> Name,
-                            ( ( struct XFSModelNode * ) N2 ) -> Name
-                            );
-}   /* _LoadNodeCallback () */
-
-/*))
- //   That method will load node for moded by name
-((*/
-static 
-rc_t CC
-_LoadModelNode (
-            const struct KConfig * Konfig,
-            struct XFSModel * Model,
-            const char * Name
-)
-{
-    rc_t RCt;
-    struct KConfigNode * Node;
-    struct XFSModelNode * Mode;
-    struct KNamelist * List;
-    uint32_t ListSize, llp;
-    const char * ListEntry;
-
-    RCt = 0;
-    Node = NULL;
-    ListEntry = NULL;
-    ListSize = llp = 0;
-
-        /* Here we do not do checks for NULL .... it is too deep */
-
-        /*) First, all nodes are unique, so we are leaving if here
-         /  already exists definition for node with that name
-        (*/
-    if ( XFSModelLookupNode ( Model, Name ) ) {
-        return 0;
-    }
-
-    RCt = KConfigOpenNodeRead (
-                            Konfig,
-                            ( const struct KConfigNode ** ) & Node,
-                            Name
-                            );
-    if ( RCt == 0 ) {
-        RCt = _XFSModelNodeMake ( Name, & Mode );
-        if ( RCt == 0 ) {
-            RCt = KConfigNodeListChildren ( Node, & List );
-            if ( RCt == 0 ) {
-                RCt = KNamelistCount ( List, & ListSize );
-                if ( RCt == 0 ) {
-                    for ( llp = 0; llp < ListSize; llp ++ ) {
-                        RCt = KNamelistGet ( List, llp, & ListEntry );
-                        if ( RCt == 0 ) {
-                            RCt = _SetModelNodeProperty (
-                                                        Mode,
-                                                        Node,
-                                                        ListEntry
-                                                        );
-                        }
-                        if ( RCt != 0 ) {
-                            break;
-                        }
-                    }
-                }
-
-                KNamelistRelease ( List );
-            }
-        }
-
-
-        KConfigNodeRelease ( Node );
-    }
-
-    if ( RCt == 0 ) {
-        RCt = BSTreeInsert (
-                        & ( Model -> tree ),
-                        ( BSTNode * ) Mode,
-                        _LoadNodeCallback
-                        );
-        if ( RCt == 0 ) {
-            RCt = XFSModelNodeChildrenNames (
-                                    Mode,
-                                    ( const struct KNamelist ** ) & List
-                                    );
-            if ( RCt == 0 && List != NULL ) {
-                RCt = KNamelistCount ( List, & ListSize );
-                if ( RCt == 0 ) {
-                    for ( llp = 0; llp < ListSize; llp ++ ) {
-                        RCt = KNamelistGet ( List, llp, & ListEntry );
-                        if ( RCt == 0 ) {
-                            RCt = _LoadModelNode (
-                                                Konfig,
-                                                Model,
-                                                ListEntry
-                                                );
-
-                            if ( RCt != 0 ) {
-                                break;
-                            }
-                        }
-                    }
-                }
-
-                KNamelistRelease ( List );
-            }
-        }
-    }
-
-    return RCt;
-}   /* _LoadModelNode () */
-
-/*))
- //   That method will load model from resource by name
-((*/
-static
-rc_t CC
-_LoadModel ( struct XFSModel  * Model )
-{
-    rc_t RCt;
-    const struct KConfig * Config;
-
-    RCt = 0;
-    Config = NULL;
-
-    if ( Model == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Model -> Resource == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFS_LoadConfig_ZHR ( Model -> Resource, & Config );
-    if ( RCt == 0 ) {
-            /* First we should check if here is node with name 'root'
-             */
-        RCt = _LoadModelNode ( Config, Model, XFS_MODEL_ROOT );
-
-        KConfigRelease ( Config );
-    }
-
-    return RCt;
-}   /* _LoadModel () */
-
-/*
- *   Creates model, and load it from Source. 
- *   Source could be NULL, in that case it will load it from config
- */
-LIB_EXPORT
-rc_t CC
-XFSModelMake (
-            struct XFSModel ** Model,
-            const char * Resource,
-            const char * Version
-)
-{
-    rc_t RCt;
-    const char * ModelResource;
-    bool DefaultModelResource;
-
-    RCt = 0;
-    DefaultModelResource = false;
-
-    if ( Model == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Resource == NULL ) {
-        RCt = _GetDefaultModelSource ( & ModelResource );
-        DefaultModelResource = true;
-    }
-    else {
-        ModelResource = Resource;
-    }
-
-    if ( RCt == 0 ) {
-        RCt = _ErstellenUndInitialisierenModel (
-                                    ModelResource,
-                                    Version,
-                                    ( const struct XFSModel ** ) Model
-                                    );
-        if ( RCt == 0 ) {
-            RCt = _LoadModel ( * Model );
-            if ( RCt != 0 ) {
-                XFSModelDispose ( ( struct XFSModel * ) * Model );
-                * Model = NULL;
-            }
-        }
-    }
-
-    if ( DefaultModelResource ) {
-        free ( ( char * ) ModelResource );
-        ModelResource = NULL;
-    }
-
-/*
-pLogMsg ( klogDebug, "XFSModelMake ( $(model) )", "model=%p", ( void * ) * Model );
-*/
-
-    return RCt;
-}   /* XFSModelMake () */
-
-static
-void CC
-_ModelWhackCallback ( BSTNode * Node, void * Unused )
-{
-    if ( Node != NULL ) {
-        _XFSModelNodeDispose ( ( struct XFSModelNode * ) Node );
-    }
-}   /* _ModelWhackCallback () */
-
-LIB_EXPORT
-rc_t CC
-XFSModelDispose ( struct XFSModel * self )
-{
-/* 
-pLogMsg ( klogDebug, "_XFSModelDispose ( $(model) )", "model=%p", ( void * ) self );
-*/
-
-    if ( self == NULL ) {
-            /* Nothing to dispose */
-        return 0;
-    }
-
-    if ( self -> Version != NULL ) {
-        free ( ( char * ) self -> Version );
-        self -> Version = NULL;
-    }
-
-    if ( self -> Resource != NULL ) {
-        free ( ( char * ) self -> Resource );
-        self -> Resource = NULL;
-    }
-
-        /*) by BSTree code: it is safe not to check tree->root == NULL
-         (*/
-    BSTreeWhack ( ( BSTree * ) self, _ModelWhackCallback, NULL );
-
-    KRefcountWhack ( & ( self -> refcount ), _sXFSModel_classname );
-
-    free ( self );
-
-    return 0;
-}   /* XFSModelDispose () */
-
-LIB_EXPORT
-rc_t CC
-XFSModelAddRef ( const struct XFSModel * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self != NULL ) {
-        switch ( KRefcountAdd (
-                            & ( self -> refcount ),
-                            _sXFSModel_classname
-                            )
-        ) {
-            case krefOkay :
-                        RCt = 0;
-                        break;
-            case krefZero :
-            case krefLimit :
-            case krefNegative :
-                        RCt = XFS_RC ( rcInvalid );
-                        break;
-            default :
-                        RCt = XFS_RC ( rcUnknown );
-                        break;
-        }
-    }
-    else {
-        RCt = XFS_RC ( rcNull );
-    }
-
-    return RCt;
-}   /* XFSModelAddRef () */
-
-LIB_EXPORT
-rc_t CC
-XFSModelRelease ( const struct XFSModel * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self != NULL ) {
-        switch ( KRefcountDrop (
-                            & ( self -> refcount ),
-                            _sXFSModel_classname
-                            )
-        ) {
-            case krefOkay :
-            case krefZero :
-                        RCt = 0;
-                        break;
-            case krefWhack :
-                        RCt = XFSModelDispose ( ( struct XFSModel * ) self );
-                        break;
-            case krefNegative :
-                        RCt = XFS_RC ( rcInvalid );
-                        break;
-            default :
-                        RCt = XFS_RC ( rcUnknown );
-                        break;
-        }
-    }
-
-    return RCt;
-}   /* XFSModelRelease () */
-
-LIB_EXPORT
-const struct XFSModelNode * CC
-XFSModelRootNode ( const struct XFSModel * self )
-{
-    return XFSModelLookupNode ( self, XFS_MODEL_ROOT );
-}   /* XFSModelRootNode () */
-
-static
-int64_t CC
-_LookupNodeCallback ( const void * Item, const BSTNode * Node )
-{
-    return XFS_StringCompare4BST_ZHR (
-                        ( const char * ) Item,
-                        ( ( struct XFSModelNode * ) Node ) -> Name
-                        );
-}   /* _LookupNodeCallback () */
-
-LIB_EXPORT
-const struct XFSModelNode * CC
-XFSModelLookupNode ( const struct XFSModel * self, const char * Name )
-{
-    if ( self == NULL || Name == NULL ) {
-        return NULL;
-    }
-
-    return ( const struct XFSModelNode * ) BSTreeFind (
-                                                & ( self -> tree ),
-                                                Name,
-                                                _LookupNodeCallback
-                                                );
-}   /* XFSModelLookupNode () */
-
-LIB_EXPORT
-const char * CC
-XFSModelResource ( const struct XFSModel * self )
-{
-    return self == NULL ? NULL : ( self -> Resource );
-}   /* XFSModelResource () */
-
-LIB_EXPORT
-const char * CC
-XFSModelVersion ( const struct XFSModel * self )
-{
-    return self == NULL ? NULL : ( self -> Version );
-}   /* XFSModelVersion () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* Editing                                                           */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-LIB_EXPORT
-rc_t CC
-XFSModelFromScratch ( struct XFSModel ** Model, const char * Version )
-{
-    XFS_CSAN ( Model )
-    XFS_CAN ( Model )
-
-    return _ErstellenUndInitialisierenModel (
-                                    "scratch",
-                                    Version,
-                                    ( const struct XFSModel ** ) Model
-                                    );
-}   /* XFSModelFromScratch () */
-
-LIB_EXPORT
-rc_t CC
-XFSModelAddNode (
-                struct XFSModel * self,
-                const char * NodeName,  /* not null */
-                const char * Type       /* not null */
-)
-{
-    rc_t RCt;
-    struct XFSModelNode * Mode;
-
-    RCt = 0;
-    Mode = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( NodeName )
-    XFS_CAN ( Type )
-
-    RCt = _XFSModelNodeMake ( NodeName, & Mode );
-    if ( RCt == 0 ) {
-        RCt = XFSModelNodeSetProperty ( Mode, XFS_MODEL_TYPE, Type );
-        if ( RCt == 0 ) {
-            RCt = BSTreeInsert (
-                            & ( self -> tree ),
-                            ( BSTNode * ) Mode,
-                            _LoadNodeCallback
-                            );
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( Mode != NULL ) {
-            _XFSModelNodeDispose ( Mode );
-        }
-    }
-
-    return RCt;
-}   /* XFSModelAddNode () */
-
-LIB_EXPORT
-rc_t CC
-XFSModelAddRootNode (
-                struct XFSModel * self,
-                const char * Type       /* not null */
-)
-{
-    return XFSModelAddNode ( self, XFS_MODEL_ROOT, Type );
-}   /* XFSModelNodeAddRootNode () */
-
-LIB_EXPORT
-rc_t CC
-XFSModelNodeSetProperty (
-                        struct XFSModelNode * self,
-                        const char * Key,       /* not null */
-                        const char * Value      /* could be null */
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    XFS_CAN ( self )
-    XFS_CAN ( self -> Properties )
-    XFS_CAN ( Key )
-
-    if ( strcmp ( Key, XFS_MODEL_CHILDREN ) == 0 ) {
-        if ( Value == NULL ) {
-            XFSOwpClear ( self -> Children );
-        }
-        else {
-            RCt = _ParseAddNodeChildren ( self, Value );
-        }
-    }
-    else {
-        RCt = XFSOwpSet ( self -> Properties, Key, Value );
-    }
-
-    return RCt;
-}   /* XFSModelNodeSetPoperty () */
-
-LIB_EXPORT
-rc_t CC
-XFSModelNodeSetLabel ( struct XFSModelNode * self, const char * Label )
-{
-    return XFSModelNodeSetProperty ( self, XFS_MODEL_LABEL, Label );
-}   /* XFSModelNodeSetLabel () */
-
-LIB_EXPORT
-rc_t CC
-XFSModelNodeSetSecurity ( struct XFSModelNode * self, const char * Sec )
-{
-    return XFSModelNodeSetProperty ( self, XFS_MODEL_SECURITY, Sec );
-}   /* XFSModelNodeSetSecurity () */
-
-LIB_EXPORT
-rc_t CC
-XFSModelNodeSetSource ( struct XFSModelNode * self, const char * Src )
-{
-    return XFSModelNodeSetProperty ( self, XFS_MODEL_SOURCE, Src );
-}   /* XFSModelNodeSetSource () */
-
-LIB_EXPORT
-rc_t CC
-XFSModelNodeSetChildren (
-                        struct XFSModelNode * self,
-                        const char * CommaSeparChildrenNames 
-)
-{
-    return XFSModelNodeSetProperty (
-                                    self,
-                                    XFS_MODEL_CHILDREN,
-                                    CommaSeparChildrenNames
-                                    );
-}   /* XFSModelNodeSetChildren () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-LIB_EXPORT
-void CC
-XFSModelNodeDDump ( const struct XFSModelNode * self )
-{
-    const struct KNamelist * List;
-    uint32_t Count, llp;
-    const char * Key, * Prop;
-
-    List = NULL;
-    Count = llp = 0;
-    Key = Prop = NULL;
-
-    if ( self == NULL ) {
-        LogMsg ( klogDebug, "   NODE [null]" );
-        return;
-    }
-
-    pLogMsg ( klogDebug, "  NODE [$(name)]", "name=%s", self -> Name );
-
-    if ( XFSModelNodePropertyNames ( self, & List ) == 0 ) {
-        if ( List != NULL ) {
-            if ( KNamelistCount ( List, & Count ) == 0 ) {
-                if ( Count == 0 ) {
-                    LogMsg ( klogDebug, "    PROPERTIES [NONE]" );
-                }
-                else {
-                    pLogMsg ( klogDebug, "    PROPERTIES [#$(count)", "count=%d", Count );
-                    for ( llp = 0; llp < Count; llp ++ ) {
-                        if ( KNamelistGet ( List, llp, & Key ) == 0 ) {
-                            Prop = XFSModelNodeProperty ( self, Key );
-                            pLogMsg ( klogDebug, "      [$(key)][$(prop)]"
-                                            , "key=%s,prop=%s"
-                                            , Key
-                                            , ( Prop == NULL ? "null" : Prop )
-                                            ); 
-                        }
-                    }
-                }
-            }
-            else {
-                LogMsg ( klogDebug, "    PROPERTIES [NONE]" );
-            }
-
-            KNamelistRelease ( List );
-            List = NULL;
-        }
-    }
-
-        /* Children */
-    if ( XFSModelNodeChildrenNames ( self, & List ) == 0 ) {
-        if ( List != NULL ) {
-            if ( KNamelistCount ( List, & Count ) == 0 ) {
-                if ( Count == 0 ) {
-                    LogMsg ( klogDebug, "    CHILDREN [NONE]" );
-                }
-                else {
-                    pLogMsg ( klogDebug, "    CHILDREN [#$(count)]", "count=%d", Count );
-                    for ( llp = 0; llp < Count; llp ++ ) {
-                        if ( KNamelistGet ( List, llp, & Key ) == 0 ) {
-                            Prop = XFSModelNodeChildAlias ( self, Key );
-                            if ( Prop == NULL ) {
-                                pLogMsg ( klogDebug, "      [$(key)]" , "key=%s", Key ); 
-                            }
-                            else {
-                                pLogMsg ( klogDebug, "      [$(key)][$(prop)]" , "key=%s,prop=%s", Key , Prop ); 
-                            }
-                        }
-                    }
-                }
-            }
-            else {
-                LogMsg ( klogDebug, "    CHILDREN [NONE]" );
-            }
-
-            KNamelistRelease ( List );
-            List = NULL;
-        }
-    }
-
-}   /* XFSModelNodeDDump () */
-
-static
-void CC
-_ModelDDumpCallback ( BSTNode * Node, void * Data )
-{
-    XFSModelNodeDDump ( ( const struct XFSModelNode * ) Node );
-}   /* _ModelDDumpCallback () */
-
-LIB_EXPORT
-void CC
-XFSModelDDump ( const struct XFSModel * self )
-{
-    if ( self == NULL ) {
-        LogMsg ( klogDebug, "MODEL [null]" );
-        return;
-    }
-    pLogMsg ( klogDebug, "MODEL Resource[$(resource)] Version[$(version)]",
-                     "resource=%s,version=%s",
-                     self -> Resource,
-                     self -> Version == NULL ? "null": self -> Version
-                     );
-
-    BSTreeForEach (
-                & ( self -> tree ),
-                false,
-                _ModelDDumpCallback,
-                NULL
-                );
-}   /* XFSModelDDump () */
diff --git a/libs/xfs/ncon.c b/libs/xfs/ncon.c
deleted file mode 100644
index dbc29c2..0000000
--- a/libs/xfs/ncon.c
+++ /dev/null
@@ -1,525 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/container.h>
-#include <klib/refcount.h>
-#include <klib/namelist.h>
-#include <klib/log.h>
-#include <kproc/lock.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-
-#include "mehr.h"
-#include "zehr.h"
-#include "ncon.h"
-
-#include <sysalloc.h>
-
-/*)))
- |||
- +++    Collection of node containers
- |||
-(((*/
-
-/*))
- ((     Simple Node Container
-  ))
- ((*/
-
-static const char * _sXFSNodeContainer_classname = "XFSNodeContainer";
-
-struct XFSNodeContainer {
-    BSTree tree;
-
-    KRefcount refcount;
-
-    struct KLock * mutabor;
-};
-
-struct XFSNodeContainerNode {
-    BSTNode node;
-
-    const struct XFSNode * xfs_node;
-};
-
-
-/*))))   Here we are
- ((((*/
-static
-rc_t CC
-_NodeContainerNodeDispose ( const struct XFSNodeContainerNode * self )
-{
-    struct XFSNodeContainerNode * Node =
-                                ( struct XFSNodeContainerNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "_NodeContainerNodeDispose ( $(node) )\n", "node=%p", ( void * ) self );
-*/
-
-    if ( Node != NULL ) {
-        if ( Node -> xfs_node != NULL ) {
-            XFSNodeRelease ( Node -> xfs_node );
-            Node -> xfs_node = NULL;
-        }
-
-        free ( Node );
-    }
-
-    return 0;
-}   /* _NodeContainerNodeDispose () */
-
-static
-rc_t CC
-_NodeContainerNodeMake (
-                    const struct XFSNode * Node, 
-                    const struct XFSNodeContainerNode ** RetNode
-)
-{
-    rc_t RCt;
-    struct XFSNodeContainerNode * TheNode;
-
-    RCt = 0;
-
-    XFS_CSAN ( RetNode )
-    XFS_CAN ( Node )
-    XFS_CAN ( RetNode )
-
-    TheNode = calloc ( 1, sizeof ( struct XFSNodeContainerNode ) );
-    if ( TheNode == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        TheNode -> xfs_node = Node;
-
-        * RetNode = TheNode;
-    }
-
-    if ( RCt != 0 ) {
-        _NodeContainerNodeDispose ( TheNode );
-        * RetNode = NULL;   /* for any case :lol: */
-    }
-/*
-pLogMsg ( klogDebug, "_NodeContainerNodeMake ( $(node) )\n", "node=%p", ( void * ) RetNode );
-*/
-
-    return RCt;
-}   /* _NodeContainerNodeMake () */
-
-/*))))   Here we are. Part II
- ((((*/
-
-LIB_EXPORT
-rc_t CC
-XFSNodeContainerMake (
-            const struct XFSNodeContainer ** Container
-)
-{
-    rc_t RCt;
-    struct XFSNodeContainer * NewCont;
-
-    RCt = 0;
-    NewCont = NULL;
-
-    XFS_CSAN ( Container )
-    XFS_CAN ( Container )
-
-    NewCont = calloc ( 1 , sizeof ( struct XFSNodeContainer ) );
-    if ( NewCont == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        BSTreeInit ( & ( NewCont -> tree ) );
-
-        KRefcountInit (
-                    & ( NewCont -> refcount ),
-                    1,
-                    _sXFSNodeContainer_classname,
-                    "XFSNodeContainerMake",
-                    "XFSNodeContainer"
-                    );
-
-        RCt = KLockMake ( & ( NewCont -> mutabor ) );
-        if ( RCt == 0 ) {
-            * Container = NewCont;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Container = NULL;
-
-        if ( NewCont != NULL ) {
-            XFSNodeContainerDispose ( NewCont );
-        }
-    }
-
-/*
-pLogMsg ( klogDebug, "XFSNodeContainerMake ( $(node) )\n", "node=%p", ( void * ) * Container );
-*/
-
-    return RCt;
-}   /* XFSNodeContainerMake () */
-
-static
-void CC
-_TreeWhackCallback ( BSTNode * Node, void * Data )
-{
-    if ( Node != NULL ) {
-        _NodeContainerNodeDispose (
-                                ( struct XFSNodeContainerNode * ) Node
-                                );
-    }
-}   /* _TreeWhackCallback () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeContainerDispose ( const struct XFSNodeContainer * self )
-{
-/*
-pLogMsg ( klogDebug, "XFSNodeContainerDispose ( $(node) )\n", "node=%p", ( void * ) self );
-*/
-
-    if ( self != NULL ) {
-        BSTreeWhack (
-                    ( BSTree * ) & ( self -> tree ),
-                    _TreeWhackCallback,
-                    NULL
-                    );
-
-        KRefcountWhack (
-                    ( KRefcount * ) & ( self -> refcount ),
-                    _sXFSNodeContainer_classname
-                    );
-
-        if ( self -> mutabor != NULL ) {
-            KLockRelease ( ( struct KLock * ) self -> mutabor );
-            ( ( struct XFSNodeContainer * ) self ) -> mutabor = NULL;
-        }
-
-        free ( ( struct XFSNodeContainer * ) self );
-
-    }
-
-    return 0;
-}   /* XFSNodeContainerDispose () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeContainerClear ( const struct XFSNodeContainer * self )
-{
-    rc_t RCt = 0;
-
-    if ( self != NULL ) {
-        RCt = KLockAcquire ( self -> mutabor );
-        if ( RCt == 0 ) {
-            BSTreeWhack (
-                        ( BSTree * ) & ( self -> tree ),
-                        _TreeWhackCallback,
-                        NULL
-                        );
-
-            BSTreeInit ( ( BSTree * ) & ( self -> tree ) );
-
-            KLockUnlock ( self -> mutabor );
-        }
-    }
-
-    return RCt;
-}   /* XFSNodeContainerClear () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeContainerAddRef ( const struct XFSNodeContainer * self )
-{
-    rc_t RCt = 0;
-
-    XFS_CAN ( self )
-
-    switch ( KRefcountAdd (
-                        & ( self -> refcount ),
-                        _sXFSNodeContainer_classname
-                        )
-    ) {
-        case krefOkay :     RCt = 0;                    break;
-
-        case krefZero :
-        case krefLimit :
-        case krefNegative : RCt = XFS_RC ( rcInvalid ); break;
-
-        default :           RCt = XFS_RC ( rcUnknown ); break;
-    }
-
-    return RCt;
-}   /* XFSNodeContainerAddRef () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeContainerRelease ( const struct XFSNodeContainer * self )
-{
-    rc_t RCt = 0;
-
-    XFS_CAN ( self )
-
-    switch ( KRefcountDrop (
-                        & ( self -> refcount ),
-                        _sXFSNodeContainer_classname
-                        )
-    ) {
-        case krefOkay :
-        case krefZero : RCt= 0;                         break;
-
-        case krefWhack :
-                RCt = XFSNodeContainerDispose ( self ); break;
-
-        case krefNegative : RCt = XFS_RC ( rcInvalid ); break;
-
-        default : RCt = XFS_RC ( rcUnknown );           break;
-    }
-
-    return RCt;
-}   /* XFSNodeContainerRelease () */
-
-LIB_EXPORT
-bool CC
-XFSNodeContainerHas (
-                    const struct XFSNodeContainer * self,
-                    const char * Name
-)
-{
-    const struct XFSNode * Node = NULL;
-
-    if ( XFSNodeContainerGet ( self, Name, & Node ) == 0 ) {
-        return ( Node != NULL );
-    }
-
-    return false;
-}   /* XFSNodeContainerHas () */
-
-static
-int64_t CC
-_NodeContainerCompare ( const void * Item, const BSTNode * Node )
-{
-    return XFS_StringCompare4BST_ZHR (
-        ( const char * ) Item,
-        ( ( const struct XFSNodeContainerNode * ) Node ) -> xfs_node -> Name
-        );
-}   /* _NodeContainerCompare () */
-
-static
-rc_t CC
-_NodeContainerNodeGet_NoLock (
-                    const struct XFSNodeContainer * self,
-                    const char * Name,
-                    const struct XFSNodeContainerNode ** Node
-)
-{
-    XFS_CSAN ( Node )
-    XFS_CAN ( self )
-    XFS_CAN ( Name )
-    XFS_CAN ( Node )
-
-    * Node = ( struct XFSNodeContainerNode * ) BSTreeFind (
-                                            & ( self -> tree ),
-                                            Name,
-                                            _NodeContainerCompare
-                                            );
-
-    return * Node == NULL ? XFS_RC ( rcNotFound ) : 0;
-}   /* _NodeContainerNodeGet () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeContainerGet (
-                const struct XFSNodeContainer * self,
-                const char * Name,
-                const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    const struct XFSNodeContainerNode * TheNode;
-
-    RCt = 0;
-
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-
-        RCt = _NodeContainerNodeGet_NoLock ( self, Name, & TheNode );
-        if ( RCt == 0 ) {
-            * Node = TheNode -> xfs_node;
-
-            if ( * Node == NULL ) {
-                RCt = XFS_RC ( rcInvalid );
-            }
-        }
-
-        KLockUnlock ( self -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSNodeContainerGet () */
-
-static
-int64_t CC
-_NodeContainerInsert ( const BSTNode * N1, const BSTNode * N2 )
-{
-    return XFS_StringCompare4BST_ZHR (
-           ( ( struct XFSNodeContainerNode * ) N1 ) -> xfs_node -> Name,
-           ( ( struct XFSNodeContainerNode * ) N2 ) -> xfs_node -> Name
-           );
-}   /* _NodeContainerInsert () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeContainerAdd (
-            const struct XFSNodeContainer * self,
-            const struct XFSNode * Node
-)
-{
-    rc_t RCt;
-    struct XFSNodeContainer * Container;
-    struct XFSNodeContainerNode * TheNode;
-
-    RCt = 0;
-    TheNode = NULL;
-    Container = ( struct XFSNodeContainer * ) self;
-
-    XFS_CAN ( Container )
-    XFS_CAN ( Node )
-
-    if ( XFSNodeContainerHas ( Container, Node -> Name ) ) {
-        return XFS_RC ( rcExists );
-    }
-
-    RCt = KLockAcquire ( Container -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _NodeContainerNodeMake (
-                    Node,
-                    ( const struct XFSNodeContainerNode ** ) & TheNode
-                    );
-        if ( RCt == 0 ) {
-            RCt = BSTreeInsert (
-                            & ( Container -> tree ),
-                            & ( TheNode -> node ),
-                            _NodeContainerInsert
-                            );
-        }
-        KLockUnlock ( Container -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSNodeContainerAdd () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeContainerDel (
-                const struct XFSNodeContainer * self,
-                const char * NodeName
-)
-{
-    rc_t RCt;
-    struct XFSNodeContainer * Container;
-    struct XFSNodeContainerNode * Node;
-
-    RCt = 0;
-    Container = ( struct XFSNodeContainer * ) self;
-
-    RCt = KLockAcquire ( Container -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _NodeContainerNodeGet_NoLock (
-                        Container,
-                        NodeName,
-                        ( const struct XFSNodeContainerNode ** ) & Node
-                        );
-        if ( RCt == 0 ) {
-            RCt = BSTreeUnlink (
-                            & ( Container -> tree ),
-                            & ( Node -> node )
-                            );
-            if ( RCt == 0 ) {
-                RCt = _NodeContainerNodeDispose ( Node );
-            }
-        }
-        KLockUnlock ( Container -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSNodeContainerDef () */
-
-static
-void CC
-_NodeContainerList ( BSTNode * Node, void * Data )
-{
-    struct XFSNodeContainerNode * TheNode;
-    struct VNamelist * TheList;
-
-    if ( Node != NULL && Data != NULL ) {
-        TheNode = ( struct XFSNodeContainerNode * ) Node;
-        TheList = ( struct VNamelist * ) Data;
-
-        VNamelistAppend ( TheList, TheNode -> xfs_node -> Name );
-    }
-}   /* _NodeContainerList () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeContainerList (
-                const struct XFSNodeContainer * self,
-                const struct KNamelist ** List
-)
-{
-    rc_t RCt;
-    struct VNamelist * TheList;
-
-    RCt = 0;
-    TheList = NULL;
-
-    XFS_CSAN ( List )
-    XFS_CAN ( self )
-    XFS_CAN ( List )
-
-    RCt = VNamelistMake ( & TheList, 32 );
-    if ( RCt == 0 ) {
-        RCt = KLockAcquire ( self -> mutabor );
-        if ( RCt == 0 ) {
-            BSTreeForEach ( 
-                        & ( self -> tree ),
-                        false,
-                        _NodeContainerList,
-                        TheList
-                        );
-
-            RCt = VNamelistToConstNamelist ( TheList, List );
-            KLockUnlock ( self -> mutabor );
-        }
-
-        VNamelistRelease ( TheList );
-    }
-
-    return RCt;
-}   /* XFSNodeContainerList () */
diff --git a/libs/xfs/ncon.h b/libs/xfs/ncon.h
deleted file mode 100644
index 7246717..0000000
--- a/libs/xfs/ncon.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _ncon_h_
-#define _ncon_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   This file contains unterface to different node containers
-  ))))  not sure how many we will have
- ((((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct XFSNodeContainer;
-struct KNamelist;
-
-XFS_EXTERN rc_t CC XFSNodeContainerMake (
-                            const struct XFSNodeContainer ** Container
-                            );
-
-XFS_EXTERN rc_t CC XFSNodeContainerDispose (
-                            const struct XFSNodeContainer * self
-                            );
-
-XFS_EXTERN rc_t CC XFSNodeContainerAddRef (
-                            const struct XFSNodeContainer * self
-                            );
-
-XFS_EXTERN rc_t CC XFSNodeContainerRelease (
-                            const struct XFSNodeContainer * self
-                            );
-
-XFS_EXTERN bool CC XFSNodeContainerHas (
-                            const struct XFSNodeContainer * self,
-                            const char * NodeName
-                            );
-
-XFS_EXTERN rc_t CC XFSNodeContainerGet (
-                            const struct XFSNodeContainer * self,
-                            const char * NodeName,
-                            const struct XFSNode ** Node
-                            );
-
-XFS_EXTERN rc_t CC XFSNodeContainerAdd (
-                            const struct XFSNodeContainer * self,
-                            const struct XFSNode * Node
-                            );
-
-XFS_EXTERN rc_t CC XFSNodeContainerDel (
-                            const struct XFSNodeContainer * self,
-                            const char * NodeName
-                            );
-
-XFS_EXTERN rc_t CC XFSNodeContainerList (
-                            const struct XFSNodeContainer * self,
-                            const struct KNamelist ** List
-                            );
-
-XFS_EXTERN rc_t CC XFSNodeContainerClear (
-                            const struct XFSNodeContainer * self
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _ncon_h_ */
diff --git a/libs/xfs/node.c b/libs/xfs/node.c
deleted file mode 100644
index ea762ba..0000000
--- a/libs/xfs/node.c
+++ /dev/null
@@ -1,616 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/container.h>
-#include <klib/refcount.h>
-#include <klib/namelist.h>
-#include <klib/log.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/path.h>
-
-#include "mehr.h"
-#include "schwarzschraube.h"
-#include "teleport.h"
-#include "common.h"
-
-#include <sysalloc.h>
-
-#include <string.h> /* strcmp () */
-
-/*)))
- |||
- +++    Tree and all the worst
- |||
-(((*/
-static const char * _sXFSNode_classname = "XFSNode";
-
-/*)))
- |||
- +++    Currentrly node presents three interfaces
- |||
-(((*/
-
-/*))
- ((     Node make/dispose. Note, we do initialize/destroy node name
-  ))    here, but Constructor could redefine it.
- ((*/
-LIB_EXPORT
-rc_t CC
-XFSNodeInit (
-            const struct XFSNode * self,
-            const char * NodeName
-)
-{
-    return XFSNodeInitVT ( self, NodeName, NULL );
-}   /* XFSNodeInit () */
-
-static
-rc_t CC
-_NodeSetName ( const struct XFSNode * self, const char * Name )
-{
-    struct XFSNode * Node = ( struct XFSNode * ) self;
-
-    if ( Node == NULL || Name == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Node -> Name != NULL ) {
-        free ( Node -> Name );
-        Node -> Name = NULL;
-    }
-
-    return XFS_StrDup ( Name, ( const char ** ) & ( Node -> Name ) );
-}   /* _NodeSetName () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeInitVT (
-            const struct XFSNode * self,
-            const char * NodeName,
-            const union XFSNode_vt * VT
-)
-{
-    rc_t RCt;
-    struct XFSNode * Node;
-
-    RCt = 0;
-    Node = ( struct XFSNode * ) self;
-
-    if ( Node == NULL || NodeName == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( VT != NULL ) {
-        Node -> vt = VT;
-    }
-
-    RCt = _NodeSetName ( self, NodeName );
-/*
-pLogMsg ( klogDebug, " [XFSNodeInit] [$(node)] [$(name)]", "node=%p,name=%s", ( void * ) Node, Node -> Name );
-*/
-    if ( RCt == 0 ) {
-        KRefcountInit (
-                    & ( Node -> refcount ),
-                    1,
-                    _sXFSNode_classname,
-                    "XFSNodeInit",
-                    "XFSNode"
-                    );
-    }
-
-    return RCt;
-}   /* XFSNodeInitVT () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeMake (
-            const struct XFSModel * Model,
-            const char * NodeName,
-            const char * NameAlias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    const struct XFSModelNode * ModelNode;
-    const struct XFSTeleport * Teleport;
-    struct XFSNode * NewNode;
-    const char * NewNodeName;
-
-    RCt = 0;
-    ModelNode = NULL;
-    Teleport = NULL;
-    NewNode = NULL;
-    NewNodeName = NULL;
-
-    if ( Model == NULL || Node == NULL || NodeName == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Node = NULL;
-
-    ModelNode = XFSModelLookupNode ( Model, NodeName );
-    if ( ModelNode == NULL ) {
-        return XFS_RC ( rcNotFound );
-    }
-
-    if ( XFSModelNodeIsRoot ( ModelNode ) ) {
-        NewNodeName = "/";
-    }
-    else {
-            /*  I could use here '?:' operator, but i think that
-             *  is more useful, cuz shows names priority:
-             *     alias -> label -> name_given
-             */
-        NewNodeName = NameAlias;
-        if ( NewNodeName == NULL ) {
-
-            NewNodeName = XFSModelNodeLabel ( ModelNode );
-            if ( NewNodeName == NULL ) {
-
-                NewNodeName = NodeName;
-            }
-        }
-    }
-
-    RCt = XFSTeleportLookup ( 
-                    XFSModelNodeType ( ModelNode ),
-                    & Teleport
-                    );
-    if ( RCt == 0 ) {
-        if ( Teleport == NULL ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-            if ( Teleport -> Constructor == NULL ) {
-                RCt = XFS_RC ( rcInvalid );
-            }
-            else {
-                RCt = Teleport -> Constructor (
-                                    Model,
-                                    ModelNode,
-                                    NameAlias,
-                                    ( const struct XFSNode ** )& NewNode
-                                    );
-                if ( RCt == 0 ) {
-                    RCt = _NodeSetName ( NewNode, NewNodeName );
-                    if ( RCt != 0 ) {
-                        XFSNodeDispose ( NewNode );
-                    }
-                    else {
-                        * Node = NewNode;
-                    }
-                }
-            }
-        }
-    }
-
-/*
-pLogMsg ( klogDebug, "XFSNodeMake ( \"$(name)\" ) As [$(alias)] ( $(node) ) [$(rc)]", "name=%s,alias=%s,node=%p,rc=%d", NodeName, ( NameAlias == NULL ? "NULL" : NameAlias ), ( void * ) NewNode, RCt );
-*/
-
-    return RCt;
-}   /* XFSNodeMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeDispose ( const struct XFSNode * self )
-{
-    rc_t RCt;
-    struct XFSNode * Node;
-
-    RCt = 0;
-    Node = ( struct XFSNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "XFSNodeDispose ( $(node) )", "node=%p", ( void * ) self );
-*/
-
-    if ( Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    KRefcountWhack ( & ( Node -> refcount ), _sXFSNode_classname );
-
-    if ( Node -> Name != NULL ) {
-/*
-pLogMsg ( klogDebug, " [XFSNodeDispose] [$(node)] [$(name)]", "node=%p,name=%s", ( void * ) Node, Node -> Name );
-*/
-        free ( Node -> Name );
-        Node -> Name = NULL;
-    }
-
-    switch ( self -> vt -> v1.maj ) {
-        case 1 :
-            if ( Node -> vt -> v1.dispose != NULL ) {
-                RCt = Node -> vt -> v1.dispose ( Node );
-            }
-            break;
-        default :
-            RCt = XFS_RC ( rcBadVersion );
-            break;
-    }
-
-    return RCt;
-}   /* XFSNodeDispose () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeAddRef ( const struct XFSNode * self )
-{
-    rc_t RCt;
-    int RefC;
-
-    RCt = 0;
-    RefC = 0;
-
-    if ( self != NULL ) {
-/*
-pLogMsg ( klogDebug, "XFSNodeAddRef ( $(node) )[$(name)]", "node=%p,name=%s", ( void * ) self, self -> Name );
-*/
-
-        RefC = KRefcountAdd (
-                        & ( self -> refcount ),
-                        _sXFSNode_classname
-                        );
-        switch ( RefC ) {
-            case krefOkay :     RCt = 0; break;
-            
-            case krefZero :
-            case krefLimit :
-            case krefNegative : RCt = XFS_RC ( rcInvalid ); break;
-
-            default :           RCt = XFS_RC ( rcUnknown ); break;
-        }
-    }
-    else {
-        RCt = XFS_RC ( rcNull );
-    }
-
-    return RCt;
-}   /* XFSNodeAddRef () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeRelease ( const struct XFSNode * self )
-{
-    rc_t RCt;
-    int RefC;
-
-    RCt = 0;
-    RefC = 0;
-
-    if ( self != NULL ) {
-/*
-pLogMsg ( klogDebug, "XFSNodeRelease ( $(node) )[$(name)]", "node=%p,name=%s", ( void * ) self, self -> Name );
-*/
-        RefC = KRefcountDrop (
-                            & ( self -> refcount ),
-                            _sXFSNode_classname
-                            );
-        switch ( RefC ) {
-            case krefOkay :
-            case krefZero :     RCt = 0; break;
-
-            case krefWhack :    RCt = XFSNodeDispose ( self ); break;
-
-            case krefNegative : RCt = XFS_RC ( rcInvalid ); break;
-            default :           RCt = XFS_RC ( rcUnknown ); break;
-        }
-    }
-
-    return RCt;
-}   /* XFSNodeRelease () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeFindNode (
-                const struct XFSNode * self,
-                const struct XFSPath * Path,
-                uint32_t PathIndex,
-                const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self == NULL || Path == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Node = NULL;
-
-    switch ( self -> vt -> v1.maj ) {
-        case 1 :
-            if ( self -> vt -> v1.findnode != NULL ) {
-                RCt = self -> vt -> v1.findnode (
-                                                self,
-                                                Path,
-                                                PathIndex,
-                                                Node
-                                                );
-            }
-            else {
-/*
-pLogMsg ( klogDebug, "XFSNodeAttrEditor ( $(node) ): unimplemented method 'findnode'", "node=%p", ( void * ) self );
-*/
-                RCt = XFS_RC ( rcUnsupported );
-            }
-            break;
-        default :
-            RCt = XFS_RC ( rcBadVersion );
-            break;
-    }
-
-    return RCt;
-}   /* XFSNodeFindNode () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeFindNodeCheckInitStandard (
-                        const struct XFSNode * self,
-                        const struct XFSPath * Path,
-                        uint32_t PathIndex,
-                        const struct XFSNode ** Node,
-                        const char ** NodeName,
-                        uint32_t * PathCount,
-                        bool * IsLast
-)
-{
-    const char * XNodeName;
-    uint32_t XPathCount;
-    bool XIsLast;
-
-    XNodeName = NULL;
-    XPathCount = 0;
-    XIsLast = false;
-
-
-    if ( self == NULL || Path == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Node = NULL;
-
-    if ( NodeName == NULL || PathCount == NULL || IsLast == NULL ) {
-        return XFS_RC ( rcUnexpected );
-    }
-
-    * NodeName = NULL;
-    * PathCount = 0;
-    * IsLast = false;
-
-    XPathCount = XFSPathPartCount ( Path );
-
-    if ( XPathCount <= PathIndex ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    XIsLast = PathIndex == ( XPathCount - 1 );
-
-    XNodeName = XFSPathPartGet ( Path, PathIndex );
-
-    /*))  Should not happen thou
-     ((*/
-    if ( XNodeName == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    /*))  Should not happen thou
-     ((*/
-    if ( strcmp ( XNodeName, XFSNodeName ( self ) ) != 0 ) {
-        return XFS_RC ( rcUnexpected );
-    }
-
-    * NodeName = XNodeName;
-    * PathCount = XPathCount;
-    * IsLast = XIsLast;
-
-    return 0;
-}   /* XFSNodeFindNodeCheckInitStandard () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeDirEditor (
-                const struct XFSNode * self,
-                const struct XFSDirEditor ** Dir
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self == NULL || Dir == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Dir = NULL;
-
-    switch ( self -> vt -> v1.maj ) {
-        case 1 :
-            if ( self -> vt -> v1.dir != NULL ) {
-                RCt = self -> vt -> v1.dir ( self, Dir );
-            }
-            break;
-        default :
-            RCt = XFS_RC ( rcBadVersion );
-    }
-
-    if ( * Dir == NULL ) {
-        RCt = XFS_RC ( rcUnsupported );
-    }
-
-    return RCt;
-}   /* XFSNodeDirEditor () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeFileEditor (
-                const struct XFSNode * self,
-                const struct XFSFileEditor ** File
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self == NULL || File == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * File = NULL;
-
-    switch ( self -> vt -> v1.maj ) {
-        case 1 :
-            if ( self -> vt -> v1.file != NULL ) {
-                RCt = self -> vt -> v1.file ( self, File );
-            }
-            break;
-        default :
-            RCt = XFS_RC ( rcBadVersion );
-    }
-
-    if ( * File == NULL ) {
-        RCt = XFS_RC ( rcUnsupported );
-    }
-
-    return RCt;
-}   /* XFSNodeFileEditor () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeAttrEditor (
-                const struct XFSNode * self,
-                const struct XFSAttrEditor ** Attr
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self == NULL || Attr == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Attr = NULL;
-
-    switch ( self -> vt -> v1.maj ) {
-        case 1 :
-            if ( self -> vt -> v1.attr != NULL ) {
-                RCt = self -> vt -> v1.attr ( self, Attr );
-            }
-            break;
-        default :
-            RCt = XFS_RC ( rcBadVersion );
-    }
-
-    if ( * Attr == NULL ) {
-        RCt = XFS_RC ( rcUnsupported );
-    }
-
-    return RCt;
-}   /* XFSNodeAttrEditor () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeDescribe (
-                const struct XFSNode * self,
-                char * Buffer,
-                size_t BufferSize
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self == NULL || Buffer == NULL || BufferSize == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Buffer = 0;
-
-    switch ( self -> vt -> v1.maj ) {
-        case 1 :
-            if ( self -> vt -> v1.describe != NULL ) {
-                RCt = self -> vt -> v1.describe (
-                                                self,
-                                                Buffer,
-                                                BufferSize
-                                                );
-            }
-            break;
-        default :
-            RCt = XFS_RC ( rcBadVersion );
-    }
-
-    return RCt;
-}   /* XFSNodeDescribe () */
-
-LIB_EXPORT
-rc_t CC
-XFSNodeDump ( const struct XFSNode * self )
-{
-    rc_t RCt;
-    char Buffer [ XFS_SIZE_1024 ];
-
-    RCt = XFSNodeDescribe ( self, Buffer, sizeof ( Buffer ) );
-
-    if ( RCt == 0 ) {
-        pLogMsg ( klogDebug, "|||>>> $(buf)\n", "buf=%s", Buffer );
-    }
-
-    return RCt;
-}   /* XFSNodeDump () */
-
-LIB_EXPORT
-const char * CC
-XFSNodeName ( const struct XFSNode * self )
-{
-    return self == NULL ? NULL : ( self -> Name );
-}   /* XFSNodeName () */
-
-LIB_EXPORT
-uint32_t CC
-XFSNodeFlavor ( const struct XFSNode * self )
-{
-    if ( self != NULL ) {
-        switch ( self -> vt -> v1.maj ) {
-            case 1 :
-                if ( self -> vt -> v1.flavor != NULL ) {
-                    return self -> vt -> v1.flavor ( self );
-                }
-                break;
-        }
-    }
-
-    return _sFlavorLess;
-}   /* XFSNodeFlavor () */
-
diff --git a/libs/xfs/owp.c b/libs/xfs/owp.c
deleted file mode 100644
index 9f752ce..0000000
--- a/libs/xfs/owp.c
+++ /dev/null
@@ -1,375 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/namelist.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/container.h>
-
-#include <kfg/config.h>
-
-#include "owp.h"
-#include "schwarzschraube.h"
-
-#include <sysalloc.h>
-
-#include <ctype.h>
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- //   it is a struct, don't know why ... prolly will add refcount later
-((*/
-struct XFSOwp {
-    BSTree tree;
-};
-
-struct XFSOwpEntry {
-    struct BSTNode node;
-    char * Key;
-    char * Property;
-};
-
-LIB_EXPORT
-rc_t CC
-XFSOwpMake ( struct XFSOwp ** Owp )
-{
-    rc_t RCt;
-    struct XFSOwp * tmpOwp;
-
-    RCt = 0;
-    tmpOwp = NULL;
-
-    if ( Owp == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Owp = NULL;
-
-    tmpOwp = calloc ( 1, sizeof ( struct XFSOwp ) );
-    if ( tmpOwp == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSOwpInit ( tmpOwp );
-    if ( RCt == 0 ) {
-        * Owp = tmpOwp;
-    }
-    else {
-        * Owp = NULL; /* I know it was initialized in that way, but */
-        free ( tmpOwp );
-    }
-
-    return RCt;
-}   /* XFSOwpMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSOwpInit ( struct XFSOwp * self )
-{
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    BSTreeInit ( ( BSTree * ) self );
-
-    return 0;
-}   /* XFSOwpInit () */
-
-static
-void CC
-_OWPEntryWhack ( BSTNode * Node, void * UsuallyNullParam )
-{
-    struct XFSOwpEntry * Entry;
-
-    Entry = ( struct XFSOwpEntry * ) Node;
-
-    if ( Entry != NULL ) {
-        if ( Entry -> Key != NULL ) {
-            free ( Entry -> Key );
-            Entry -> Key = NULL;
-        }
-
-        if ( Entry -> Property != NULL ) {
-            free ( Entry -> Property );
-            Entry -> Property = NULL;
-        }
-
-        free ( Entry );
-        Entry = NULL; /* :lol: */
-    }
-}   /* _OWPEntryWhack () */
-
-LIB_EXPORT
-rc_t CC
-XFSOwpWhack ( struct XFSOwp * self )
-{
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    BSTreeWhack ( ( BSTree * ) self, _OWPEntryWhack, NULL );
-
-    return 0;
-}   /* XFSOwpWhack () */
-
-LIB_EXPORT
-rc_t CC
-XFSOwpDispose ( struct XFSOwp * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = XFSOwpWhack ( self );
-    if ( RCt == 0 ) {
-        free ( self );
-    }
-
-    return RCt;
-}   /* XFSOwpDispose () */
-
-LIB_EXPORT
-rc_t CC
-XFSOwpClear ( struct XFSOwp * self )
-{
-    XFSOwpWhack ( self );
-    XFSOwpInit ( self );
-
-    return 0;
-}   /* XFSOwpClear () */
-
-static
-int CC
-_OWPStringCmp ( const char * Str1, const char * Str2 )
-{
-    if ( Str1 == NULL || Str2 == NULL ) {
-        if ( Str1 != NULL ) {
-            return 4096;
-        }
-
-        if ( Str2 != NULL ) {
-            return - 4096;
-        }
-
-        return 0;
-    }
-
-    return strcmp ( Str1, Str2 );
-}   /* _OWPStringCmp () */
-
-static
-int64_t CC
-_OWPEntryCmp ( const void * Item, const BSTNode * Node )
-{
-    return _OWPStringCmp (
-                ( const char * ) Item,
-                ( ( Node == NULL )
-                    ? NULL
-                    : ( ( struct XFSOwpEntry * ) Node ) -> Key
-                )
-                );
-}   /* _OWPEntryCmp () */
-
-static
-const struct XFSOwpEntry * CC
-_OWPEntryFind ( const struct XFSOwp * self, const char * Key )
-{
-    struct XFSOwpEntry * Entry;
-
-    Entry = NULL;
-
-    if ( self != NULL && Key != NULL ) {
-        Entry = ( struct XFSOwpEntry * ) BSTreeFind (
-                                                    ( BSTree * )self,
-                                                    Key,
-                                                    _OWPEntryCmp
-                                                    );
-    }
-
-    return Entry;
-}   /* _OWPEntryFind () */
-
-LIB_EXPORT
-bool CC
-XFSOwpHas ( const struct XFSOwp * self, const char * Key )
-{
-    return _OWPEntryFind ( self, Key ) != NULL ;
-}   /* XFSOwpHas () */
-
-LIB_EXPORT
-const char * CC
-XFSOwpGet ( const struct XFSOwp * self, const char * Key )
-{
-    const struct XFSOwpEntry * Entry;
-
-    Entry = _OWPEntryFind ( self, Key );
-
-    return Entry == NULL ? NULL : Entry -> Property;
-}   /* XFSOwpGet () */
-
-static
-struct XFSOwpEntry * CC
-_OWPEntryMake ( const char * Key, const char * Property )
-{
-    struct XFSOwpEntry * Entry;
-
-    Entry = calloc ( 1, sizeof ( struct XFSOwpEntry ) );
-    if ( Entry != NULL ) {
-        if ( XFS_StrDup ( Key, ( const char ** ) & ( Entry -> Key ) ) == 0 ) {
-
-            if ( Property == NULL ) {
-                return Entry;
-            }
-            else {
-                if ( XFS_StrDup ( Property, ( const char ** ) & ( Entry -> Property ) ) == 0 ) {
-                    return Entry;
-                }
-            }
-
-            free ( Entry -> Key );
-        }
-
-        free ( Entry );
-    }
-
-    return NULL;
-}   /* _OWPEntryMake () */
-
-static
-int64_t CC
-_OWPNodeCmp ( const BSTNode * Node1, const BSTNode * Node2 )
-{
-    return _OWPStringCmp (
-                        ( ( struct XFSOwpEntry * ) Node1 ) -> Key,
-                        ( ( struct XFSOwpEntry * ) Node2 ) -> Key
-                        );
-
-}   /* _OWPNodeCmp () */
-
-LIB_EXPORT
-rc_t CC
-XFSOwpSet (
-            const struct XFSOwp * self,
-            const char * Key,
-            const char * Property
-)
-{
-    rc_t RCt;
-    struct XFSOwpEntry * Entry;
-
-    RCt = 0;
-    Entry = NULL;
-
-        /* I suppose, that Property could be NULL value */
-    if ( self == NULL || Key == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-        /* All property values are unique */
-    if ( XFSOwpHas ( self, Key ) == true ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Entry = _OWPEntryMake ( Key, Property );
-    if ( Entry == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = BSTreeInsert (
-                        ( BSTree * ) self,
-                        ( BSTNode * ) Entry,
-                        _OWPNodeCmp
-                        );
-    }
-
-    return RCt;
-}   /* XFSOwpSet () */
-
-static
-void
-_ListKeysCallback ( BSTNode * Node, void * Data )
-{
-    struct VNamelist * List;
-    struct XFSOwpEntry * TheNode;
-
-    List = NULL;
-    TheNode = NULL;
-
-    if ( Node != NULL && Data != NULL ) {
-        List = ( struct VNamelist * ) Data;
-        TheNode = ( struct XFSOwpEntry * ) Node;
-
-        VNamelistAppend ( List, TheNode -> Key );
-
-    }
-}   /* _ListKeysCallback () */
-
-LIB_EXPORT
-rc_t CC
-XFSOwpListKeys (
-            const struct XFSOwp * self,
-            const struct KNamelist ** Keys
-)
-{
-    rc_t RCt;
-    struct VNamelist * List;
-
-    RCt = 0;
-
-    if ( self == NULL || Keys == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Keys = NULL;
-
-    RCt = VNamelistMake ( & List, 16 /* ?? */ );
-    if ( RCt == 0 ) {
-        BSTreeForEach (
-                    ( BSTree * ) self,
-                    false,
-                    _ListKeysCallback,
-                    List
-                    );
-
-        RCt = VNamelistToConstNamelist ( List, Keys );
-
-        VNamelistRelease ( List );
-    }
-
-    return RCt;
-}   /* XFSOwpListKeys () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
diff --git a/libs/xfs/owp.h b/libs/xfs/owp.h
deleted file mode 100644
index 0b62c8b..0000000
--- a/libs/xfs/owp.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _owp_h_
-#define _owp_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))   Object With Properties (OWP), draft version
- ((
-  ))   That is an Object which contais set of pairs of chars : key and
- ((    property.
-  ))
- ((    Temporarily, I do not have methods like delete/replace/list, but
-  ))   could add them later
- ((*/
-struct XFSOwp;
-struct KNamelist;
-
-XFS_EXTERN rc_t CC XFSOwpMake ( struct XFSOwp ** Owp );
-XFS_EXTERN rc_t CC XFSOwpInit ( struct XFSOwp * self );
-XFS_EXTERN rc_t CC XFSOwpWhack ( struct XFSOwp * self );
-XFS_EXTERN rc_t CC XFSOwpDispose ( struct XFSOwp * self );
-XFS_EXTERN rc_t CC XFSOwpClear ( struct XFSOwp * self );
-
-XFS_EXTERN bool CC XFSOwpHas (
-                                const struct XFSOwp * self,
-                                const char * Key
-                                );
-XFS_EXTERN const char * CC XFSOwpGet (
-                                const struct XFSOwp * self,
-                                const char * Key
-                                );
-    /*)) Property value could be NULL
-     ((*/
-XFS_EXTERN rc_t CC XFSOwpSet (
-                                const struct XFSOwp * self,
-                                const char * Key,
-                                const char * Propety
-                                );
-
-XFS_EXTERN rc_t CC XFSOwpListKeys (
-                                const struct XFSOwp * self,
-                                const struct KNamelist ** Keys
-                                );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _owp_h_ */
diff --git a/libs/xfs/path.c b/libs/xfs/path.c
deleted file mode 100644
index 446b763..0000000
--- a/libs/xfs/path.c
+++ /dev/null
@@ -1,1503 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/namelist.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/text.h>
-#include <klib/log.h>
-
-#include <kfs/directory.h>
-
-#include <va_copy.h>
-
-#include <xfs/path.h>
-#include "schwarzschraube.h"
-
-#include <sysalloc.h>
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static char * _sPathEmptyName = "";
-
-#define _STRC_INC_VAL_ 16
-
-struct _StrC {
-    char ** e;
-
-    size_t q;
-    size_t c;
-};
-
-static const char * CC _StrCGet (
-                    struct _StrC * self,
-                    size_t Idx
-                    );
-static size_t CC _StrCCount (
-                    struct _StrC * self
-                    );
-
-static
-void CC
-_StrCClear ( struct _StrC * self )
-{
-    size_t Idx = 0;
-
-    if ( self == NULL ) {
-        return;
-    }
-
-    if ( self -> e != NULL ) {
-        if ( self -> q != 0 ) {
-            for ( Idx = 0; Idx < self -> q; Idx ++ ) {
-                if ( self -> e [ Idx ] != NULL ) {
-                    free ( self -> e [ Idx ] );
-                    self -> e [ Idx ] = NULL;
-                }
-            }
-        }
-    }
-
-    self -> q = 0;
-
-}   /* _StrCClear () */
-
-static
-rc_t CC
-_StrCDispose ( struct _StrC * self )
-{
-    if ( self != NULL ) {
-        _StrCClear ( self );
-
-        free ( self -> e );
-
-        self -> e = NULL;
-
-        self -> c = 0;
-
-        free ( self );
-    }
-
-    return 0;
-}   /* _StrCDispose () */
-
-/*))    Capacity - 0 - means default value _STRC_INC_VAL_.
- ((*/
-static
-rc_t CC
-_StrCMake ( struct _StrC ** Cont, size_t Capacity )
-{
-    rc_t RCt;
-    struct _StrC * Ret;
-
-    RCt = 0;
-    Ret = NULL;
-
-    XFS_CAN ( Cont )
-    * Cont = NULL;
-
-    if ( Capacity == 0 ) {
-        Capacity = _STRC_INC_VAL_;
-    }
-
-    Ret = calloc ( 1, sizeof ( struct _StrC ) );
-    if ( Ret == NULL ) {
-        RCt = XFS_RC ( rcNull );
-    }
-    else {
-        Ret -> q = 0;
-        Ret -> c = Capacity;
-        Ret -> e = calloc ( Capacity, sizeof ( char * ) );
-
-        * Cont = Ret;
-    }
-
-    if ( RCt != 0 ) {
-        * Cont = NULL;
-
-        _StrCDispose ( Ret );
-    }
-
-    return RCt;
-}   /* _StrCMake () */
-
-static
-rc_t CC
-_StrCMakeFrom ( struct _StrC * From, struct _StrC ** To )
-{
-    rc_t RCt;
-    struct _StrC * Ret;
-    size_t Idx;
-    const char * Str, * Dup;
-
-    RCt = 0;
-    Ret = NULL;
-    Idx = 0;
-    Str = Dup = NULL;
-
-    XFS_CSAN ( To )
-    XFS_CAN ( From )
-    XFS_CAN ( To )
-
-    RCt = _StrCMake ( & Ret, From -> c );
-    if ( RCt == 0 ) {
-
-            /* Qty is set first for a case */
-        Ret -> q = From -> q;
-
-        for ( Idx = 0; Idx < From -> q; Idx ++ ) {
-            Str = * ( From -> e + Idx );
-            if ( Str != NULL ) {
-                RCt = XFS_StrDup ( Str, & Dup );
-                if ( RCt != 0 ) {
-                    break;
-                }
-
-                * ( Ret -> e + Idx ) = ( char * ) Dup;
-            }
-        }
-        if ( RCt == 0 ) {
-            * To = Ret;
-        }
-    }
-
-    return RCt;
-}   /* _StrCMakeFrom () */
-
-static
-rc_t CC
-_StrCReserve ( struct _StrC * self, size_t Amount )
-{
-    rc_t RCt;
-    size_t NewCapas;
-    char ** NewArr;
-
-    RCt = 0;
-    NewCapas = 0;
-
-    XFS_CAN ( self );
-
-    if ( Amount == 0 ) {
-        return 0;
-    }
-
-        /* Not enough space */
-    NewCapas = ( ( ( self -> q + Amount ) / _STRC_INC_VAL_ ) + 1 )
-                                                    * _STRC_INC_VAL_;
-
-    if ( self -> c < NewCapas ) {
-        NewArr = calloc ( NewCapas, sizeof ( char * ) );
-        if ( NewArr == NULL ) {
-            return XFS_RC ( rcExhausted );
-        }
-
-        if ( self -> e != NULL ) {
-            if ( self -> q != 0 ) {
-                memcpy (
-                        NewArr,
-                        self -> e,
-                        sizeof ( char * ) * self -> q
-                        );
-            }
-
-            free ( self -> e );
-            self -> e = NULL;
-        }
-
-        self -> c = NewCapas;
-        self -> e = NewArr;
-    }
-
-    return RCt;
-}   /* _StrCReserve () */
-
-static
-rc_t CC
-_StrCInsertMany (
-            struct _StrC * self,
-            char ** From,
-            size_t Qty,
-            size_t Pos
-)
-{
-    rc_t RCt;
-    size_t Idx;
-    char * Str;
-
-    RCt = 0;
-    Idx = 0;
-    Str = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( From )
-    XFS_CA ( Qty, 0 )
-
-        /* First we should check if item come to 0-q interval
-         */
-    if ( self -> q < Pos ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-        /* Second we should reserve enough space
-         */
-    RCt = _StrCReserve ( self, Qty );
-    if ( RCt == 0 ) {
-                /* Third, shifting content if it is necessary
-                 */
-            if ( Pos < self -> q ) {
-                memmove (
-                        self -> e + Pos + Qty,
-                        self -> e + Pos,
-                        ( self -> q - Pos ) * sizeof ( char * )
-                        );
-                memset ( self -> e + Pos, 0, Qty * sizeof ( char * ) );
-            }
-
-            for ( Idx = 0; Idx < Qty; Idx ++ ) {
-                RCt = XFS_StrDup (
-                                From [ Idx ],
-                                ( const char ** ) & Str
-                                );
-                if ( RCt != 0 ) {
-                    break;
-                }
-
-                * ( self -> e + Pos + Idx ) = Str;
-            }
-
-            self -> q += Qty;
-    }
-
-    return RCt;
-}   /* _StrCInsertMany () */
-
-static
-rc_t CC
-_StrCInsert (
-            struct _StrC * self,
-            const char * Str,
-            size_t Pos
-)
-{
-    return _StrCInsertMany ( self, ( char ** ) & Str, 1, Pos );
-}   /* _StrCInsert () */
-
-static
-rc_t CC
-_StrCAdd (
-            struct _StrC * self,
-            const char * Str,
-            size_t StrLen
-)
-{
-    rc_t RCt;
-    char * TheStr;
-
-    RCt = 0;
-    TheStr = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Str )
-    XFS_CA ( StrLen, 0 )
-
-    TheStr = malloc ( sizeof ( char ) * ( StrLen + 1 ) );
-    if ( TheStr == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    memcpy ( TheStr, Str, sizeof ( char ) * StrLen );
-    * ( TheStr + StrLen ) = 0;
-
-    RCt = _StrCInsert ( self, TheStr, _StrCCount ( self ) );
-
-    free ( TheStr );
-
-    return RCt;
-}   /* _StrCAdd () */
-
-static
-rc_t CC
-_StrCDeleteMany ( struct _StrC * self, size_t Qty, size_t Pos )
-{
-    rc_t RCt;
-    size_t Idx, To;
-
-    RCt = 0;
-    Idx = To = 0;
-
-    XFS_CAN ( self )
-
-    if ( Qty == 0 ) {
-        return 0;
-    }
-
-        /* First, we should to check upper and lower limits */
-    if ( self -> q <= Pos ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    To = Pos + Qty;
-    if ( self -> q <= To ) {
-        To = self -> q;
-    }
-
-        /* Second, we are deleting entries */
-    for ( Idx = Pos; Idx < To; Idx ++ ) {
-        free ( * ( self -> e + Idx ) );
-        * ( self -> e + Idx ) = NULL;
-    }
-
-        /* Third, we need to move some to fill a gap
-         */
-    if ( To < self -> q ) {
-        memmove (
-                self -> e + Pos,
-                self -> e + To,
-                ( self -> q - To ) * sizeof ( char * )
-                );
-
-        memset (
-                self -> e + self -> q - To + Pos,
-                0,
-                ( To - Pos ) * sizeof ( char * )
-                );
-    }
-
-
-    self -> q -= ( To - Pos );
-
-    return RCt;
-}   /* _StrCDeleteMany () */
-
-static
-rc_t CC
-_StrCDelete ( struct _StrC * self, size_t Pos )
-{
-    return _StrCDeleteMany ( self, 1, Pos );
-}   /* _StrCDelete () */
-
-const char * CC
-_StrCGet ( struct _StrC * self, size_t Idx )
-{
-    if ( self != NULL ) {
-        if ( Idx < self -> q ) {
-            return * ( self -> e + Idx );
-        }
-    }
-
-    return NULL;
-}   /* _StrCGet () */
-
-size_t CC
-_StrCCount ( struct _StrC * self )
-{
-    return self != NULL ? self -> q : 0;
-}   /* _StrCCount () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct XFSPath {
-    KRefcount refcount;
-
-    struct _StrC * tokens;
-
-    const char * path;
-    const char * orig;
-    bool is_absolute;
-};
-
-static const char * _sXFSPath_classname = "XFSPath";
-
-static
-rc_t CC
-_PathPrune ( struct XFSPath * self )
-{
-    rc_t RCt;
-    size_t Idx;
-    const char * Str;
-
-    RCt = 0;
-    Idx = 0;
-    Str = NULL;
-
-    XFS_CAN ( self )
-
-    Idx = 0;
-    while ( Idx < _StrCCount ( self -> tokens ) ) {
-        Str = _StrCGet ( self -> tokens, Idx );
-
-        if ( strcmp ( Str, "." ) == 0 ) {
-            _StrCDelete ( self -> tokens, Idx );
-            continue;
-        }
-
-        if ( strcmp ( Str, ".." ) == 0 ) {
-            if ( 0 < Idx ) {
-                _StrCDelete ( self -> tokens, Idx );
-                Idx --;
-                _StrCDelete ( self -> tokens, Idx );
-
-                continue;
-            }
-        }
-
-        Idx ++;
-    }
-
-    return RCt;
-}   /* _PathPrune () */
-
-static
-rc_t CC
-_PathCompile ( struct XFSPath * self, const char ** Str )
-{
-    size_t Qty, Idx, StrSize;
-    char * Path;
-    const char * Token;
-
-    Qty = Idx = StrSize = 0;
-    Path = NULL;
-    Token = NULL;
-
-    XFS_CSAN ( Str )
-    XFS_CAN ( self )
-    XFS_CAN ( Str )
-
-        /* First we are calculating size of string
-         */
-    if ( self -> is_absolute ) {        /* Trailing slash */
-        StrSize += 1;
-    }
-
-    Qty = XFSPathPartCount ( self );   /* Concatinating slashes */
-    if ( 0 < Qty ) {
-        StrSize += Qty - 1;
-
-        for ( Idx = 0; Idx < Qty; Idx ++ ) {
-            StrSize += string_size ( XFSPathPartGet ( self, Idx ) );
-        }
-    }
-
-    Path = malloc ( sizeof ( char ) * ( StrSize + 1 ) );
-    if ( Path == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    * Path = 0;
-
-    if ( self -> is_absolute ) {
-        strcat ( Path, "/" );
-    }
-
-    for ( Idx = 0; Idx < Qty; Idx ++ ) {
-        Token = XFSPathPartGet ( self, Idx );
-        if ( strcmp ( Token, "/" ) != 0 ) {
-            if ( Idx != 0 ) {
-                strcat ( Path, "/" );
-            }
-            strcat ( Path, Token );
-        }
-    }
-
-    * Str = Path;
-
-    return 0;
-}   /* _PathCompile () */
-
-static
-rc_t CC
-_PathRecompile ( struct XFSPath * self )
-{
-    XFS_CAN ( self )
-
-    if ( self -> path != NULL ) {
-        free ( ( char * ) self -> path );
-
-        self -> path = NULL;
-    }
-
-    return _PathCompile ( self, & ( self -> path ) );
-}   /* _PathRecompile () */
-
-static
-void CC
-_PathClear ( struct XFSPath * self )
-{
-    if ( self == NULL ) {
-        return;
-    }
-
-    _StrCClear ( self -> tokens );
-
-    if ( self -> orig != NULL ) {
-        free ( ( char * ) self -> orig );
-
-        self -> orig = NULL;
-    }
-
-    if ( self -> path != NULL ) {
-        free ( ( char * ) self -> path );
-
-        self -> path = NULL;
-    }
-}   /* _PathClear () */
-
-static
-rc_t CC
-_PathParse (
-            struct XFSPath * self,
-            bool AddPrecedingSlash,
-            const char * Path
-)
-{
-    rc_t RCt;
-    const char * Bg, * Cr;
-    bool Abs;
-
-    RCt = 0;
-    Bg = NULL;
-    Cr = NULL;
-    Abs = false;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Path )
-
-    _PathClear ( self );
-
-    Abs = * Path == '/';
-
-    if ( Abs && AddPrecedingSlash ) {
-        RCt = _StrCAdd ( self -> tokens, "/", 1 );
-    }
-
-    if ( RCt == 0 ) {
-        Bg = Path;
-        Cr = Path;
-        while ( * Cr != 0 ) {
-            if ( * Cr == '/' ) {
-                if ( 0 < Cr - Bg ) {
-                    RCt = _StrCAdd ( self -> tokens, Bg, Cr - Bg );
-                    if ( RCt != 0 ) {
-                        break;
-                    }
-                }
-
-                while ( * Cr != 0 ) {
-                    if ( * Cr != '/' ) {
-                        Bg = Cr;
-                        break;
-                    }
-                    Cr ++;
-                }
-            }
-            Cr ++;
-        }
-    }
-
-    if ( RCt == 0 ) {
-        if ( 0 < Cr - Bg && * Bg != '/' ) {
-            RCt = _StrCAdd ( self -> tokens, Bg, Cr - Bg );
-        }
-
-        if ( RCt == 0 ) {
-            self -> is_absolute = Abs;
-
-            RCt = XFS_StrDup ( Path, & ( self -> orig ) );
-            if ( RCt == 0 ) {
-
-                RCt = _PathPrune ( self );
-                if ( RCt == 0 ) {
-                    RCt = _PathRecompile ( self );
-                }
-            }
-        }
-    }
-
-    return RCt;
-}   /* _PathParse () */
-
-static
-rc_t CC
-_PathDispose ( const struct XFSPath * self )
-{
-    struct XFSPath * Path = ( struct XFSPath * ) self;
-
-    if ( Path == NULL ) {
-        return 0;
-    }
-
-    _PathClear ( Path );
-
-    _StrCDispose ( Path -> tokens );
-
-    KRefcountWhack ( & ( Path -> refcount ), _sXFSPath_classname );
-
-    free ( Path );
-
-    return 0;
-}   /* _PathDispose () */
-
-/*) This will alloc XFSPath structure and initialize tokens.
-  | If the From parameter is not NULL, it will fill tokens wit From
-  | content
-  (*/
-static
-rc_t CC
-_PathAlloc ( struct XFSPath ** Out, struct _StrC * From_CanBeZero )
-{
-    rc_t RCt;
-    struct XFSPath * Ret;
-
-    RCt = 0;
-    Ret = NULL;
-
-    XFS_CSAN ( Out )
-    XFS_CAN ( Out )
-
-    Ret = calloc ( 1, sizeof ( struct XFSPath ) );
-    if ( Ret == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-
-    KRefcountInit (
-                & ( Ret -> refcount ),
-                1,
-                _sXFSPath_classname,
-                "_PathAlloc",
-                "Path"
-                );
-
-    RCt = From_CanBeZero == NULL
-            ? _StrCMake ( & ( Ret -> tokens ), 0 ) 
-            : _StrCMakeFrom ( From_CanBeZero, & ( Ret -> tokens ) )
-            ;
-    if ( RCt == 0 ) {
-        * Out = Ret;
-    }
-    else {
-        * Out = NULL;
-
-        _PathDispose ( Ret );
-    }
-
-    return RCt;
-}   /* _PathAlloc () */
-
-LIB_EXPORT
-rc_t CC
-XFSPathVMake (
-            const struct XFSPath ** Out,
-            bool AddPrecedingSlash,
-            const char * Format,
-            va_list Args
-)
-{
-    rc_t RCt;
-    char BF [ XFS_SIZE_1024 ];
-    size_t NumWrit;
-    struct XFSPath * Ret;
-    va_list xArgs;
-
-    RCt = 0;
-    * BF = 0;
-    NumWrit = 0;
-    Ret = NULL;
-
-    XFS_CSAN ( Out )
-    XFS_CAN ( Format )
-    XFS_CAN ( Out )
-
-        /* First we are trying to allocate structure
-         */
-    RCt = _PathAlloc ( & Ret, NULL );
-    if ( RCt == 0 ) {
-            /* Second we should format path
-             */
-        va_copy ( xArgs, Args );
-        RCt = string_vprintf (
-                            BF,
-                            sizeof ( BF ),
-                            & NumWrit,
-                            Format,
-                            xArgs
-                            );
-        va_end ( xArgs );
-        if ( RCt == 0 ) {
-               /* Third we should parse path
-                */
-            RCt = _PathParse ( Ret, AddPrecedingSlash, BF );
-            if ( RCt == 0 ) {
-                * Out = Ret;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Out = NULL;
-        if ( Ret != NULL ) {
-            _PathDispose ( Ret );
-        }
-    }
-
-    return RCt;
-}   /* XFSPathVMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSPathMake (
-            const struct XFSPath ** Out,
-            bool AddPrecedingSlash,
-            const char * Format,
-            ...
-)
-{
-    rc_t RCt;
-    va_list Args;
-
-    RCt = 0;
-
-    va_start ( Args, Format );
-    RCt = XFSPathVMake ( Out, AddPrecedingSlash, Format, Args );
-    va_end ( Args );
-
-    return RCt;
-}   /* XFSPathMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSPathVMakeAbsolute (
-                const struct XFSPath ** Out,
-                bool AddPrecedingSlash,
-                const char * Format,
-                va_list Args
-)
-{
-    rc_t RCt;
-    char BF [ XFS_SIZE_1024 ];
-    va_list xArgs;
-
-    RCt = 0;
-    * BF = 0;
-
-    XFS_CSAN ( Out )
-    XFS_CAN ( Out )
-    XFS_CAN ( Format )
-
-    va_copy ( xArgs, Args );
-    RCt = XFS_VResolvePath (
-                            true,   /* Absolute */
-                            BF,
-                            sizeof ( BF ),
-                            Format,
-                            xArgs
-                            );
-    va_end ( xArgs );
-    if ( RCt == 0 ) {
-        RCt = XFSPathMake ( Out, AddPrecedingSlash, BF );
-    }
-
-    return RCt;
-}   /* XFSPathVMakeAbsolute () */
-
-LIB_EXPORT
-rc_t CC
-XFSPathMakeAbsolute (
-                const struct XFSPath ** Out,
-                bool AddPrecedingSlash,
-                const char * Format,
-                ...
-)
-{
-    rc_t RCt;
-    va_list Args;
-
-    va_start ( Args, Format );
-
-    RCt = XFSPathVMakeAbsolute ( Out, AddPrecedingSlash, Format, Args );
-
-    va_end ( Args );
-
-    return RCt;
-}   /* XFSPathMakeAbsolute () */
-
-LIB_EXPORT
-rc_t CC
-XFSPathDup (
-            const struct XFSPath * In,
-            const struct XFSPath ** Out
-)
-{
-    rc_t RCt;
-    struct XFSPath * Ret;
-
-    RCt = 0;
-    Ret = NULL;
-
-    XFS_CSAN ( Out )
-    XFS_CAN ( In )
-    XFS_CAN ( Out )
-
-    RCt = _PathAlloc ( & Ret, In -> tokens );
-    if ( RCt == 0 ) {
-
-        RCt = XFS_StrDup ( In -> orig, & ( Ret -> orig ) );
-        if ( RCt == 0 ) {
-            RCt = XFS_StrDup ( In -> orig, & ( Ret -> orig ) );
-            if ( RCt == 0 ) {
-                Ret -> is_absolute = In -> is_absolute;
-                * Out = Ret;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Out = NULL;
-        if ( Ret != NULL ) {
-            _PathDispose ( Ret );
-        }
-    }
-
-    return RCt;
-}   /* XFSPathDup () */
-
-LIB_EXPORT
-rc_t CC
-XFSPathRelease ( const struct XFSPath * self )
-{
-    rc_t RCt;
-    struct XFSPath * Path;
-
-    RCt = 0;
-    Path = ( struct XFSPath * ) self;
-
-    XFS_CAN ( Path )
-
-    switch ( KRefcountDrop ( & ( Path -> refcount ), _sXFSPath_classname ) ) {
-
-        case krefOkay :
-        case krefZero :
-                    RCt = 0;
-                    break;
-        case krefWhack :
-                    RCt = _PathDispose ( Path );
-                    break;
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSPathRelease () */
-
-LIB_EXPORT
-rc_t CC
-XFSPathAddRef ( const struct XFSPath * self )
-{
-    rc_t RCt;
-    struct XFSPath * Path;
-
-    RCt = 0;
-    Path = ( struct XFSPath * ) self;
-
-
-    XFS_CAN ( Path )
-
-    switch ( KRefcountAdd ( & ( Path -> refcount ), _sXFSPath_classname )) {
-        case krefOkay :
-                    RCt = 0;
-                    break;
-        case krefZero :
-        case krefLimit :
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSPathAddRef () */
-
-XFS_EXTERN
-rc_t CC
-XFSPathSet (
-            const struct XFSPath * self,
-            bool AddPrecedingSlash,
-            const char * Format,
-            ...
-)
-{
-    rc_t RCt;
-    va_list Args;
-    char BF [ XFS_SIZE_1024 ];
-    size_t NumWrit;
-
-    RCt = 0;
-    * BF = 0;
-    NumWrit = 0;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Format )
-
-    va_start ( Args, Format );
-    RCt = string_printf (
-                        BF,
-                        sizeof ( BF ),
-                        & NumWrit,
-                        Format,
-                        Args
-                        );
-    va_end ( Args );
-    if ( RCt == 0 ) {
-        RCt = _PathParse ( ( struct XFSPath * ) self, AddPrecedingSlash, BF ); 
-    }
-
-    return RCt;
-}   /* XFSPathSet () */
-
-XFS_EXTERN
-rc_t CC
-XFSPathSetPath (
-                const struct XFSPath * self,
-                const struct XFSPath * Path
-)
-{
-    rc_t RCt;
-    struct XFSPath * TheSelf;
-
-    RCt = 0;
-    TheSelf = ( struct XFSPath * ) self;
-
-    XFS_CAN ( TheSelf )
-    XFS_CAN ( Path )
-
-    RCt = _StrCMakeFrom ( Path -> tokens, & ( TheSelf -> tokens ) );
-    if ( RCt == 0 ) {
-
-        RCt = XFS_StrDup ( Path -> orig, & ( TheSelf -> orig ) );
-        if ( RCt == 0 ) {
-            RCt = XFS_StrDup ( Path -> orig, & ( TheSelf -> orig ) );
-            if ( RCt == 0 ) {
-                TheSelf -> is_absolute = Path -> is_absolute;
-            }
-        }
-    }
-
-    return RCt;
-}   /* XFSPathSetPath () */
-
-LIB_EXPORT
-rc_t CC
-XFSPathAppend (
-                const struct XFSPath * self,
-                const char * Format,
-                ...
-)
-{
-    rc_t RCt;
-    const struct XFSPath * ThePath;
-    va_list Args;
-
-    RCt = 0;
-    ThePath = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Format )
-
-    va_start ( Args, Format );
-    RCt = XFSPathVMake ( & ThePath, false, Format, Args );
-    va_end ( Args );
-
-    if ( RCt == 0 ) {
-        RCt = XFSPathAppendPath ( self, ThePath );
-
-        XFSPathRelease ( ThePath );
-    }
-
-    return RCt;
-}   /* XFSPathAppend () */
-
-LIB_EXPORT
-rc_t CC
-XFSPathAppendPath (
-                const struct XFSPath * self,
-                const struct XFSPath * Path
-)
-{
-    rc_t RCt;
-    char * NewOrig;
-    size_t NewLen;
-    struct XFSPath * TheSelf;
-
-    RCt = 0;
-    NewOrig = NULL;
-    NewLen = 0;
-    TheSelf = ( struct XFSPath * ) self;
-
-    XFS_CAN ( TheSelf )
-    XFS_CAN ( Path )
-
-    RCt = _StrCInsertMany (
-                        TheSelf -> tokens,
-                        Path -> tokens -> e, 
-                        Path -> tokens -> q, 
-                        TheSelf -> tokens -> q
-                        );
-    if ( RCt == 0 ) {
-        NewLen = strlen ( TheSelf -> orig ) + strlen ( Path -> orig );
-        NewOrig = malloc ( sizeof ( char ) * ( 1 + NewLen ) );
-        if ( NewOrig == NULL ) {
-            RCt = XFS_RC ( rcExhausted );
-        }
-        else {
-            strcpy ( NewOrig, TheSelf -> orig );
-            strcat ( NewOrig, Path -> orig );
-            if ( TheSelf -> orig != NULL ) {
-                free ( ( char * ) TheSelf -> orig );
-            }
-            TheSelf -> orig = NewOrig;
-
-            RCt = _PathPrune ( TheSelf );
-            if ( RCt == 0 ) {
-                RCt = _PathRecompile ( TheSelf );
-            }
-        }
-    }
-
-    return RCt;
-}   /* XFSPathAppendPath () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-LIB_EXPORT
-bool CC
-XFSPathIsAbsolute ( const struct XFSPath * self )
-{
-    return self == NULL ? false : self -> is_absolute;
-}   /* XFSPathIsAbsolute () */
-
-LIB_EXPORT
-uint32_t CC
-XFSPathPartCount ( const struct XFSPath * self )
-{
-    return self == NULL ? 0 : _StrCCount ( self -> tokens );
-}   /* XFSPathPartCount () */
-
-LIB_EXPORT
-const char * CC
-XFSPathPartGet ( const struct XFSPath * self, uint32_t Index )
-{
-    return self == NULL ? 0 : _StrCGet ( self -> tokens, Index );
-}   /* XFSPathPartGet () */
-
-LIB_EXPORT
-const char * CC
-XFSPathGet ( const struct XFSPath * self )
-{
-    return self == NULL ? NULL : self -> path;
-}   /* XFSPathGet () */
-
-LIB_EXPORT
-const char * CC
-XFSPathOrig ( const struct XFSPath * self )
-{
-    return self == NULL ? NULL : self -> orig;
-}   /* XFSPathOrig () */
-
-LIB_EXPORT
-rc_t CC
-XFSPathParent (
-                const struct XFSPath * self,
-                const struct XFSPath ** Parent
-)
-{
-    rc_t RCt;
-    const struct XFSPath * Path;
-    uint32_t Count;
-
-    RCt = 0;
-    Path = NULL;
-    Count = 0;
-
-    XFS_CSAN ( Parent )
-    XFS_CAN ( self )
-    XFS_CAN ( Parent )
-
-    Count = XFSPathPartCount ( self );
-    if ( Count < 1 ) {
-        RCt = _PathAlloc ( ( struct XFSPath ** ) & Path, NULL );
-    }
-    else {
-        RCt = XFSPathTo ( self, Count - 1, & Path );
-    }
-
-    if ( RCt == 0 ) {
-        * Parent = Path;
-    }
-    else {
-        * Parent = NULL;
-
-        if ( Path != NULL ) {
-            XFSPathRelease ( Path );
-        }
-    }
-
-    return RCt;
-}   /* XFSPathParent () */
-
-    /*) Don't forget to free Name after using it
-     (*/
-LIB_EXPORT
-const char * CC
-XFSPathName ( const struct XFSPath * self )
-{
-    uint32_t Count;
-
-    if ( self != NULL ) {
-        Count = XFSPathPartCount ( self );
-
-        return Count < 1
-                    ? _sPathEmptyName
-                    : XFSPathPartGet ( self, Count - 1 )
-                    ;
-    }
-
-    return NULL;
-}   /* XFSPathName () */
-
-LIB_EXPORT
-bool CC
-XFSPathEqual (
-            const struct XFSPath * Path1,
-            const struct XFSPath * Path2
-)
-{
-    size_t s;
-
-    if ( Path1 != NULL && Path2 != NULL ) {
-        if ( Path1 == Path2 ) {
-            return true;
-        }
-
-        s = string_size ( XFSPathGet ( Path1 ) );
-
-        if ( s == string_size ( XFSPathGet ( Path2 ) ) ) {
-            return string_cmp (
-                            XFSPathGet ( Path1 ),
-                            s,
-                            XFSPathGet ( Path2 ),
-                            s,
-                            s
-                            ) == 0;
-        }
-
-    }
-    return false;
-}   /* XFSPathEqual () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-LIB_EXPORT
-rc_t CC
-XFSPathSub (
-            const struct XFSPath * self,
-            size_t From,
-            size_t To,
-            const struct XFSPath ** Path
-)
-{
-    rc_t RCt;
-    size_t Idx, Qty;
-    struct XFSPath * Ret;
-
-    RCt = 0;
-    Idx = Qty = 0;
-    Ret = NULL;
-
-    XFS_CSAN ( Path )
-    XFS_CAN ( self )
-    XFS_CAN ( Path )
-
-        /*) First, checking range
-         (*/
-    Qty = XFSPathPartCount ( self );
-    if ( Qty < From || Qty < To ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = _PathAlloc ( & Ret, NULL );
-    if ( RCt == 0 ) {
-        for ( Idx = From; Idx < To; Idx ++ ) {
-            RCt = _StrCInsert (
-                            Ret -> tokens,
-                            _StrCGet ( self -> tokens, Idx ),
-                            _StrCCount ( Ret -> tokens )
-                            );
-            if ( RCt != 0 ) {
-                break;
-            }
-        }
-        if ( RCt == 0 ) {
-            Ret -> is_absolute = From == 0
-                                    ? self -> is_absolute
-                                    : false
-                                    ;
-            RCt = _PathPrune ( Ret );
-            if ( RCt == 0 ) {
-                RCt = _PathRecompile ( Ret );
-                if ( RCt == 0 ) {
-                    RCt = XFS_StrDup (
-                                    Ret -> path,
-                                    & ( Ret -> orig )
-                                    );
-                    if ( RCt == 0 ) {
-                        * Path = Ret;
-                    }
-                }
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Path = NULL;
-
-        if ( Ret != NULL ) {
-            _PathDispose ( Ret );
-        }
-    }
-
-    return RCt;
-}   /* XFSPathSub () */
-
-LIB_EXPORT
-rc_t CC
-XFSPathFrom (
-            const struct XFSPath * self,
-            size_t From,
-            const struct XFSPath ** Path
-)
-{
-    XFS_CAN ( self )
-
-    return XFSPathSub ( self, From, XFSPathPartCount ( self ), Path );
-}   /* XFSPathFrom () */
-
-LIB_EXPORT
-rc_t CC
-XFSPathTo (
-            const struct XFSPath * self,
-            size_t To,
-            const struct XFSPath ** Path
-)
-{
-    return XFSPathSub ( self, 0, To, Path );
-}   /* XFSPathTo () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*) That method will check if Path is base path for 'self'. i.e.
-| self could be composed as concatenation of Path and RelPath
-| RelPath could be zero, in that case it will be not returned
-| Apparently, that means Path is a sub of self, so we will call
-| XFSPathIsChild method with reversed parameters
-(*/
-LIB_EXPORT
-bool CC
-XFSPathIsBase (
-            const struct XFSPath * self,
-            const struct XFSPath * Path,
-            const struct XFSPath ** RelPath
-)
-{
-    return XFSPathIsChild ( Path, self, RelPath );
-}   /* XFSPathIsBase () */
-
-LIB_EXPORT
-bool CC
-XFSPathSIsBase (
-            const char * self,
-            const char * Path,
-            const struct XFSPath ** RelPath
-)
-{
-    return XFSPathSIsChild ( Path, self, RelPath );
-}   /* XFSPathSIsBase () */
-
-/*) That method will check if Path is child ( sub ) path for 'self'.
-| i.e. Path could be composed as concatenation of self and RelPath
-| RelPath could be zero, in that case it will be not returned
-(*/
-LIB_EXPORT
-bool CC
-XFSPathIsChild (
-            const struct XFSPath * self,
-            const struct XFSPath * Path,
-            const struct XFSPath ** RelPath
-)
-{
-    rc_t RCt;
-    bool RetVal;
-    size_t SelfQty, PathQty, Idx;
-    const char * s1, * s2;
-    const struct XFSPath * TheRel;
-
-    RCt = 0;
-    RetVal = false;
-    SelfQty = PathQty = Idx = 0;
-    s1 = s2 = NULL;
-    TheRel = NULL;
-
-    XFS_CSAN ( RelPath )
-    XFS_CAN ( self )
-    XFS_CAN ( Path )
-    XFS_CAN ( RelPath )
-
-
-    /*) Apparently we shoud check that all parts of TheSelf
-      | are also parts of ThePath
-      (*/
-    SelfQty = XFSPathPartCount ( self );
-    PathQty = XFSPathPartCount ( Path );
-
-        /* We could compare only absolute path ... because
-         | we can not tell about relative path how they are
-         | relative ... lol
-         */
-    if ( self -> is_absolute && Path -> is_absolute && 
-        SelfQty <= PathQty ) {
-        for ( Idx = 0; Idx < SelfQty; Idx ++ ) {
-            s1 = XFSPathPartGet ( self, Idx );
-            s2 = XFSPathPartGet ( Path, Idx );
-            if ( s1 == NULL || s2 == NULL ) {
-                RCt = XFS_RC ( rcInvalid );
-            }
-
-            if ( strcmp ( s1, s2 ) != 0 ) {
-                RCt = XFS_RC ( rcInvalid );
-            }
-        }
-
-        if ( RCt == 0 ) {
-            RetVal = true;
-
-            if ( RelPath != NULL ) {
-                RCt = XFSPathFrom (
-                                Path,
-                                SelfQty,
-                                & TheRel
-                                );
-                if ( RCt == 0 ) {
-                    * RelPath = TheRel;
-                }
-                else {
-                    if ( TheRel != NULL ) {
-                        _PathDispose ( TheRel );
-                    }
-                }
-            }
-        }
-    }
-
-    return RCt == 0 ? RetVal : false;
-}   /* XFSPathIsChild () */
-
-LIB_EXPORT
-bool CC
-XFSPathSIsChild (
-            const char * self,
-            const char * Path,
-            const struct XFSPath ** RelPath
-)
-{
-    rc_t RCt;
-    bool RetVal;
-    const struct XFSPath * TheSelf;
-    const struct XFSPath * ThePath;
-
-    RCt = 0;
-    RetVal = false;
-    ThePath = NULL;
-
-    XFS_CSAN ( RelPath )
-    XFS_CAN ( self )
-    XFS_CAN ( Path )
-
-    RCt = XFSPathMake ( & TheSelf, true, self );
-    if ( RCt == 0 ) {
-        RCt = XFSPathMake ( & ThePath, true, Path );
-        if ( RCt == 0 ) {
-            RetVal = XFSPathIsChild ( TheSelf, ThePath, RelPath );
-
-            XFSPathRelease ( ThePath );
-        }
-
-        XFSPathRelease ( TheSelf );
-    }
-
-    return RCt == 0 ? RetVal : false;
-}   /* XFSPathSIsChild () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-LIB_EXPORT
-void CC
-XFSPathDump ( const struct XFSPath * self )
-{
-    size_t Idx = 0;
-
-    if ( self == NULL ) {
-        LogMsg ( klogDebug, "  [Path] NULL" );
-        return;
-    }
-
-    pLogMsg ( klogDebug, "  [Path] [$(orig)]", "orig=%s", self -> orig );
-    pLogMsg ( klogDebug, "   [abs] [$(abs)]", "abs=%s", self -> is_absolute ? "yes" : "no" );
-    pLogMsg ( klogDebug, "  [path] [$(path)]", "path=%s", self -> path );
-
-    pLogMsg ( klogDebug, "   [qty] [$(qty)]", "qty=%ld", self -> tokens -> q );
-    for ( Idx = 0; Idx < self -> tokens ->q; Idx ++ ) {
-        pLogMsg ( klogDebug, "        [$(idx)] [$(token)]", "idx=%ld,token=%s", Idx, self -> tokens -> e [ Idx ] );
-    }
-
-}   /* XFSPathDump () */
diff --git a/libs/xfs/perm.c b/libs/xfs/perm.c
deleted file mode 100644
index f7682f0..0000000
--- a/libs/xfs/perm.c
+++ /dev/null
@@ -1,805 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-
-#include <xfs/perm.h>
-
-#include "zehr.h"
-
-#include <sysalloc.h>
-
-#include <ctype.h>  /* isspace () */
-#include <os-native.h>
-
-
-/*)))
- |||
- +++    XFSPerm and all about
- |||
-(((*/
-
-static char _sUserDefault [ XFS_SIZE_128 ];
-static char _sGroupDefault [ XFS_SIZE_128 ];
-static char _sOtherDefault [ XFS_SIZE_128 ];
-
-/*))))))
- //////  XFSAuth
-((((((*/
-
-/*))
- ((     Structures itself
-  ))
- ((*/
-struct XFSAuth {
-    char * Name;
-    bool NameDefaulted;
-    bool CanRead;
-    bool CanWrite;
-    bool CanExecute;
-};
-
-static
-rc_t CC
-_AuthDispose ( const struct XFSAuth * self )
-{
-    struct XFSAuth * Auth = ( struct XFSAuth * ) self;
-
-    if ( Auth != NULL ) {
-        if ( ! Auth -> NameDefaulted ) {
-            if ( Auth -> Name != NULL ) {
-                free ( Auth -> Name );
-            }
-        }
-        else {
-            Auth -> Name = NULL;
-        }
-
-        free ( Auth );
-    }
-
-    return 0;
-}   /* _AuthDispose () */
-
-static
-rc_t CC
-_AuthMake (
-            const char * Name,
-            bool NameDefaulted,
-            bool CanRead,
-            bool CanWrite,
-            bool CanExecute,
-            const struct XFSAuth ** Auth
-)
-{
-    struct XFSAuth * TheAuth;
-
-    if ( Name == NULL || Auth == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Auth = NULL;
-
-    TheAuth = calloc ( 1, sizeof ( struct XFSAuth ) );
-    if ( TheAuth == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    if ( ! NameDefaulted ) {
-        TheAuth -> Name = string_dup_measure ( Name, NULL );
-        if ( TheAuth -> Name == NULL ) {
-            _AuthDispose ( TheAuth );
-
-            return XFS_RC ( rcExhausted );
-        }
-    }
-    else {
-        TheAuth -> Name = ( char * ) Name;
-    }
-
-    TheAuth -> NameDefaulted = NameDefaulted;
-    TheAuth -> CanRead = CanRead;
-    TheAuth -> CanWrite = CanWrite;
-    TheAuth -> CanExecute = CanExecute;
-
-    * Auth = TheAuth;
-
-    return 0;
-}   /* _AuthMake () */
-
-/*))))))
- //////  XFSPerm
-((((((*/
-/*))
- ((     Structures itself : now it is just a three pointers, but
-  ))    I will make BStree in the case of something complex
- ((*/
-struct XFSPerm {
-    const struct XFSAuth * U;
-    const struct XFSAuth * G;
-    const struct XFSAuth * O;
-};
-
-/*))
- ((     Here we are.
-  ))
- ((*/
-static
-const char * CC
-_Perm_SkipTrail ( const char * Start )
-{
-    if ( Start != NULL ) {
-        while ( true ) {
-            if ( * Start == 0 ) {
-                return NULL;
-            }
-            if ( ! isspace ( * Start ) ) {
-                return Start;
-            }
-
-            Start ++;
-        }
-    }
-
-    return NULL;
-}   /* _Perm_SkipTrail () */
-
-static
-rc_t CC
-_Perm_ReadValue (
-                const char * Start,
-                const char ** Next,
-                char ** Value
-)
-{
-    const char * End;
-
-    if ( Value == NULL || Next == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Next = NULL;
-    * Value = NULL;
-
-    if ( Start == NULL ) {
-        return 0;
-    }
-
-    End = Start;
-
-    while ( * End != 0 && * End != ':' ) { End ++; }
-
-    if ( 0 == End - Start ) {
-        if ( * End == ':' ) {
-            * Next = End + 1;
-        }
-        return 0;
-    }
-
-    * Value = string_dup ( Start, End - Start );
-    if ( * Value == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    if ( * End == ':' ) {
-        * Next = End + 1;
-    }
-
-    return 0;
-}   /* _Perm_ReadString () */
-
-static
-rc_t CC
-_Perm_StringParse (
-            const char * PermAsString,
-            char ** Perm,
-            char ** User,
-            char ** Group,
-            char ** Other
-)
-{
-    rc_t RCt;
-    const char * pStart, * pEnd;
-    char ch;
-    int llp;
-    const int _PLN = 9;
-
-    RCt = 0;
-    pStart = pEnd = NULL;
-    ch = 0;
-    llp = 0;
-
-        /*  We should get at least permissions
-         */
-    if ( PermAsString == NULL || Perm == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Perm = NULL;
-
-    if ( User != NULL )  { * User = NULL;  }
-    if ( Group != NULL ) { * Group = NULL; }
-    if ( Other != NULL ) { * Other = NULL; }
-
-    pStart = ( char * ) PermAsString;
-
-
-    pStart = _Perm_SkipTrail ( pStart );
-    if ( pStart == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-        /*  second we are reading permissions 9 characters;
-         */
-    for ( llp = 0; llp < _PLN ; llp ++ ) {
-        ch = * ( pStart + llp );
-        if ( ch == 0 ) {
-            return XFS_RC ( rcInvalid );
-        }
-
-        if ( ch != '-' ) {
-            if ( llp % 3 == 0 && ch != 'r' ) {
-                return XFS_RC ( rcInvalid );
-            }
-            if ( llp % 3 == 1 && ch != 'w' ) {
-                return XFS_RC ( rcInvalid );
-            }
-            if ( llp % 3 == 2 && ch != 'x' ) {
-                return XFS_RC ( rcInvalid );
-            }
-        }
-    }
-
-    * Perm = string_dup ( pStart, _PLN );
-    if ( * Perm == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    pStart += _PLN;
-
-        /*  skipping to the next entry
-         */
-    pStart = _Perm_SkipTrail ( pStart );
-    if ( pStart == NULL ) {
-        return 0;
-    }
-
-        /*  third we are reading user
-         */
-    RCt = _Perm_ReadValue ( pStart, & pEnd, User );
-    if ( RCt == 0 && pEnd != NULL ) {
-        RCt = _Perm_ReadValue ( pEnd, & pStart, Group );
-        if ( RCt == 0 && pStart != 0 ) {
-            RCt = _Perm_ReadValue ( pStart, & pEnd, Other );
-        }
-    }
-
-    return RCt;
-}   /* _Perm_StringParse () */
-
-static
-rc_t CC
-_MakeAuth (
-        XFSAType Type,
-        const char * Name,
-        const char * Perm,
-        const struct XFSAuth ** Auth
-)
-{
-    const char * RName;
-    bool DF, CR, CW, CE;
-
-    RName = NULL;
-    DF = CR = CW = CE = false;
-
-    if ( Auth == NULL || Perm == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Auth = NULL;
-
-    DF = Name == NULL;
-    RName = DF ? XFSPermDefaultName ( Type ) : Name;
-
-    CR = * ( Perm + ( Type * 3 ) + 0 ) == 'r';
-    CW = * ( Perm + ( Type * 3 ) + 1 ) == 'w';
-    CE = * ( Perm + ( Type * 3 ) + 2 ) == 'x';
-
-    return _AuthMake ( RName, DF, CR, CW, CE, Auth );
-}   /* _MakeAuth () */
-
-LIB_EXPORT
-rc_t CC
-XFSPermMake (
-            const char * PermAsString,
-            const struct XFSPerm ** Permissions
-)
-{
-    rc_t RCt;
-    struct XFSPerm * Perm;
-    char * SPerm, * User, * Group, * Other;
-
-    RCt = 0;
-    Perm = NULL;
-    SPerm = User = Group = Other = NULL;
-
-    if ( PermAsString == NULL || Permissions == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Permissions = NULL;
-
-    Perm = calloc ( 1, sizeof ( struct XFSPerm ) );
-    if ( Perm != NULL ) {
-        RCt = _Perm_StringParse (
-                            PermAsString,
-                            & SPerm,
-                            & User,
-                            & Group,
-                            & Other
-                        );
-        if ( RCt == 0 ) {
-            RCt = _MakeAuth ( kxfsUser, User, SPerm, & ( Perm -> U ) );
-            if ( RCt == 0 ) {
-                RCt = _MakeAuth (
-                                kxfsGroup,
-                                Group,
-                                SPerm,
-                                & ( Perm -> G )
-                                );
-                if ( RCt == 0 ) {
-                    RCt = _MakeAuth ( 
-                                kxfsOther,
-                                Other,
-                                SPerm,
-                                & ( Perm -> O )
-                                );
-                }
-            }
-        }
-    }
-    else {
-        RCt = XFS_RC ( rcExhausted );
-    }
-
-    if ( SPerm != NULL ) {
-        free ( SPerm );
-    }
-    if ( User != NULL ) {
-        free ( User );
-    }
-    if ( Group != NULL ) {
-        free ( Group );
-    }
-    if ( Other != NULL ) {
-        free ( Other );
-    }
-
-    if ( RCt != 0 ) {
-        XFSPermDispose ( Perm );
-    }
-    else {
-        * Permissions = Perm;
-    }
-
-    return RCt;
-}   /* XFSPermMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSPermDispose ( const struct XFSPerm * self )
-{
-    rc_t RCt;
-    struct XFSPerm * Perm;
-
-    RCt = 0;
-
-    Perm = ( struct XFSPerm * ) self;
-
-    if ( Perm != NULL ) {
-        if ( Perm -> U != NULL ) {
-            _AuthDispose ( Perm -> U );
-            Perm -> U = NULL;
-        }
-
-        if ( Perm -> G != NULL ) {
-            _AuthDispose ( Perm -> G );
-            Perm -> G = NULL;
-        }
-
-        if ( Perm -> O != NULL ) {
-            _AuthDispose ( Perm -> O );
-            Perm -> O = NULL;
-        }
-
-        free ( Perm );
-    }
-
-    return RCt;
-}   /* XFSPermDispose () */
-
-/*)))
- ///    Defaults
-(((*/
-static
-rc_t CC
-_Perm_SetDefault (
-                const char * Default,
-                char * Buffer,
-                size_t BufferSize
-)
-{
-    size_t CYP;
-
-    if ( Buffer == NULL || BufferSize == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Default == NULL ) {
-        * Buffer = 0;
-        return 0;
-    }
-
-    CYP = string_size ( Default );
-
-    if ( BufferSize <= CYP ) {
-        return XFS_RC ( rcTooBig );
-    }
-
-        /* he-he ... should we check if it happens ? */
-    string_copy ( Buffer, BufferSize, Default, CYP );
-
-    return 0;
-}   /* _Perm_SetDefault () */
-
-LIB_EXPORT
-const struct XFSAuth * CC
-XFSPermAuth ( const struct XFSPerm * self, XFSAType Type )
-{
-    if ( self != NULL ) {
-        switch ( Type ) {
-            case kxfsUser  : return self -> U;
-            case kxfsGroup : return self -> G;
-            case kxfsOther : return self -> O;
-        }
-    }
-    return NULL;
-}   /* XFSPermAuth () */
-
-LIB_EXPORT
-rc_t CC
-XFSPermToString (
-            const struct XFSPerm * self,
-            char * Buffer,
-            size_t BufferSize
-)
-{
-    if ( self == NULL || Buffer == NULL || BufferSize == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-    * Buffer = 0;
-
-    if ( self -> U == NULL || self -> G == NULL || self -> O == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    strcat ( Buffer, ( self -> U -> CanRead )    ? "r" : "-" );
-    strcat ( Buffer, ( self -> U -> CanWrite )   ? "w" : "-" );
-    strcat ( Buffer, ( self -> U -> CanExecute ) ? "x" : "-" );
-    strcat ( Buffer, ( self -> G -> CanRead )    ? "r" : "-" );
-    strcat ( Buffer, ( self -> G -> CanWrite )   ? "w" : "-" );
-    strcat ( Buffer, ( self -> G -> CanExecute ) ? "x" : "-" );
-    strcat ( Buffer, ( self -> O -> CanRead )    ? "r" : "-" );
-    strcat ( Buffer, ( self -> O -> CanWrite )   ? "w" : "-" );
-    strcat ( Buffer, ( self -> O -> CanExecute ) ? "x" : "-" );
-
-    if (    ! self -> U -> NameDefaulted
-        ||  ! self -> G -> NameDefaulted
-        ||  ! self -> O -> NameDefaulted ) {
-
-        strcat ( Buffer, " " );
-
-        if ( ! self -> U -> NameDefaulted ) {
-            strcat ( Buffer, self -> U -> Name );
-        }
-
-        if (    ! self -> G -> NameDefaulted
-            ||  ! self -> O -> NameDefaulted ) {
-            strcat ( Buffer, ":" );
-        }
-
-        if ( ! self -> G -> NameDefaulted ) {
-            strcat ( Buffer, self -> G -> Name );
-        }
-
-        if ( ! self -> O -> NameDefaulted ) {
-            strcat ( Buffer, ":" );
-
-            strcat ( Buffer, self -> O -> Name );
-        }
-    }
-
-    return 0;
-}   /* XFSPermToString () */
-
-LIB_EXPORT
-const char * CC
-XFSPermDefaultName ( XFSAType Type )
-{
-    switch ( Type ) {
-        case kxfsUser :  return _sUserDefault;
-        case kxfsGroup : return _sGroupDefault;
-        case kxfsOther : return _sOtherDefault;
-    }
-    return NULL;
-}   /* XFSPermDefaultName () */
-
-LIB_EXPORT
-rc_t CC
-XFSPermSetDefaultName ( XFSAType Type, const char * Name )
-{
-    switch ( Type ) {
-        case kxfsUser :
-                return _Perm_SetDefault (
-                                        Name,
-                                        _sUserDefault,
-                                        sizeof ( _sUserDefault )
-                                        );
-        case kxfsGroup :
-                return _Perm_SetDefault (
-                                        Name,
-                                        _sGroupDefault,
-                                        sizeof ( _sGroupDefault )
-                                        );
-        case kxfsOther :
-                return _Perm_SetDefault (
-                                        Name,
-                                        _sOtherDefault,
-                                        sizeof ( _sOtherDefault )
-                                        );
-    }
-    return XFS_RC ( rcUnknown );
-}   /* XFSPermSetDefaultName () */
-
-LIB_EXPORT
-const char * CC
-XFSAuthName ( const struct XFSAuth * self )
-{
-    return self == NULL ? NULL : ( self -> Name );
-}   /* XFSAuthName () */
-
-LIB_EXPORT
-bool CC
-XFSAuthCanRead ( const struct XFSAuth * self )
-{
-    return self == NULL ? false : ( self -> CanRead );
-}   /* XFSAuthCanRead () */
-
-LIB_EXPORT
-bool CC
-XFSAuthCanWrite ( const struct XFSAuth * self )
-{
-    return self == NULL ? false : ( self -> CanWrite );
-}   /* XFSAuthCanWrite () */
-
-LIB_EXPORT
-bool CC
-XFSAuthCanExecute ( const struct XFSAuth * self )
-{
-    return self == NULL ? false : ( self -> CanExecute );
-}   /* XFSAuthCanExecute () */
-
-/*))))))
- //////  Misc
-((((((*/
-
-LIB_EXPORT
-rc_t CC
-XFSPermToNum ( const char * Perm, uint32_t * Num )
-{
-    rc_t RCt;
-    uint32_t xNum;
-    const struct XFSPerm * xPerm;
-    const struct XFSAuth * xAuth;
-
-    RCt = 0;
-    xNum = 0;
-    xPerm = NULL;
-    xAuth = NULL;
-
-    if ( Num == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Num = 0;
-
-    if ( Perm == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = XFSPermMake ( Perm, & xPerm );
-    if ( RCt == 0 ) {
-        xAuth = XFSPermAuth ( xPerm, kxfsUser );
-        if ( xAuth != NULL ) {
-            if ( XFSAuthCanRead    ( xAuth ) ) { xNum |= 0400; }
-            if ( XFSAuthCanWrite   ( xAuth ) ) { xNum |= 0200; }
-            if ( XFSAuthCanExecute ( xAuth ) ) { xNum |= 0100; }
-        }
-
-        xAuth = XFSPermAuth ( xPerm, kxfsGroup );
-        if ( xAuth != NULL ) {
-            if ( XFSAuthCanRead    ( xAuth ) ) { xNum |= 040; }
-            if ( XFSAuthCanWrite   ( xAuth ) ) { xNum |= 020; }
-            if ( XFSAuthCanExecute ( xAuth ) ) { xNum |= 010; }
-        }
-
-        xAuth = XFSPermAuth ( xPerm, kxfsOther );
-        if ( xAuth != NULL ) {
-            if ( XFSAuthCanRead    ( xAuth ) ) { xNum |= 04; }
-            if ( XFSAuthCanWrite   ( xAuth ) ) { xNum |= 02; }
-            if ( XFSAuthCanExecute ( xAuth ) ) { xNum |= 01; }
-        }
-
-        * Num = xNum;
-
-        XFSPermDispose ( xPerm );
-    }
-
-    return RCt;
-}   /* XFSPermToNum () */
-
-
-LIB_EXPORT
-rc_t CC
-XFSPermToChar ( uint32_t Num, char * Buf, size_t BufSize )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( Buf == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( BufSize <= 10 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    * Buf = 0;
-
-        /* owner */
-    Buf [ 0 ] = ( Num & 0400 ) == 0400 ? 'r' : '-';
-    Buf [ 1 ] = ( Num & 0200 ) == 0200 ? 'w' : '-';
-    Buf [ 2 ] = ( Num & 0100 ) == 0100 ? 'x' : '-';
-        /* group */
-    Buf [ 3 ] = ( Num & 040 ) == 040 ? 'r' : '-';
-    Buf [ 4 ] = ( Num & 020 ) == 020 ? 'w' : '-';
-    Buf [ 5 ] = ( Num & 010 ) == 010 ? 'x' : '-';
-        /* others */
-    Buf [ 6 ] = ( Num & 04 ) == 04 ? 'r' : '-';
-    Buf [ 7 ] = ( Num & 02 ) == 02 ? 'w' : '-';
-    Buf [ 8 ] = ( Num & 01 ) == 01 ? 'x' : '-';
-
-        /* internet users */
-    Buf [ 9 ] = 0;
-
-    return RCt;
-}   /* XFSPermToChar () */
-
-/*))))))
- //////  Defaults ... sorry, hardcoding those
-((((((*/
-static const char * _DefROPermForContainer = "r-xr-xr-x";
-static const char * _DefROPermForNode = "r--r--r--";
-static uint32_t _DefROPermForContainerNum = 0;
-static uint32_t _DefROPermForNodeNum = 0;
-
-LIB_EXPORT
-const char * CC
-XFSPermRODefContChar ()
-{
-    return _DefROPermForContainer;
-}   /* XFSPermRODefContChar () */
-
-LIB_EXPORT
-const char * CC
-XFSPermRODefNodeChar ()
-{
-    return _DefROPermForNode;
-}   /* XFSPermRODefNodeChar () */
-
-LIB_EXPORT
-uint32_t CC
-XFSPermRODefContNum ()
-{
-    uint32_t T;
-
-    if ( _DefROPermForContainerNum == 0 ) {
-        XFSPermToNum ( XFSPermRODefContChar (), & T );
-        _DefROPermForContainerNum = T;
-    }
-
-    return _DefROPermForContainerNum;
-}   /* XFSPermRODefContNum () */
-
-LIB_EXPORT
-uint32_t CC
-XFSPermRODefNodeNum ()
-{
-    uint32_t T;
-
-    if ( _DefROPermForNodeNum == 0 ) {
-        XFSPermToNum ( XFSPermRODefNodeChar (), & T );
-        _DefROPermForNodeNum = T;
-    }
-
-    return _DefROPermForNodeNum;
-}   /* XFSPermRODefNodeNum () */
-
-/*))))))
- //////  Defaults ... sorry, hardcoding those
-((((((*/
-static const char * _DefRWPermForContainer = "rwxr-xr-x";
-static const char * _DefRWPermForNode = "rw-r--r--";
-static uint32_t _DefRWPermForContainerNum = 0;
-static uint32_t _DefRWPermForNodeNum = 0;
-
-LIB_EXPORT
-const char * CC
-XFSPermRWDefContChar ()
-{
-    return _DefRWPermForContainer;
-}   /* XFSPermRWDefContChar () */
-
-LIB_EXPORT
-const char * CC
-XFSPermRWDefNodeChar ()
-{
-    return _DefRWPermForNode;
-}   /* XFSPermRWDefNodeChar () */
-
-LIB_EXPORT
-uint32_t CC
-XFSPermRWDefContNum ()
-{
-    uint32_t T;
-
-    if ( _DefRWPermForContainerNum == 0 ) {
-        XFSPermToNum ( XFSPermRWDefContChar (), & T );
-        _DefRWPermForContainerNum = T;
-    }
-
-    return _DefRWPermForContainerNum;
-}   /* XFSPermRWDefContNum () */
-
-LIB_EXPORT
-uint32_t CC
-XFSPermRWDefNodeNum ()
-{
-    uint32_t T;
-
-    if ( _DefRWPermForNodeNum == 0 ) {
-        XFSPermToNum ( XFSPermRWDefNodeChar (), & T );
-        _DefRWPermForNodeNum = T;
-    }
-
-    return _DefRWPermForNodeNum;
-}   /* XFSPermRWDefNodeNum () */
diff --git a/libs/xfs/platform.h b/libs/xfs/platform.h
deleted file mode 100644
index 193d7b0..0000000
--- a/libs/xfs/platform.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_platform_
-#define _h_platform_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   This file contains platform dependent forwards.
-  ))))
- ((((*/
-
-/*))    Set virtual table for control Fuse or DOKAN based
- ((*/
-XFS_EXTERN
-rc_t CC
-XFSControlPlatformInit ( struct XFSControl * self );
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _h_platform_ */
diff --git a/libs/xfs/readme.c b/libs/xfs/readme.c
deleted file mode 100644
index 470176a..0000000
--- a/libs/xfs/readme.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <xfs/model.h>
-#include <xfs/node.h>
-#include <xfs/doc.h>
-
-
-#include "teleport.h"
-#include "common.h"
-
-#include <sysalloc.h>
-
-
-/*)))
- |||
- +++    ReadMeNode lives here
- |||
-(((*/
-
-/*))
- ((     Node make/dispose
-  ))
- ((*/
-
-static
-rc_t CC
-_ReadMeNodeConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct XFSNode * TheNode;
-    const char * NodeName;
-    const char * TextOrSource;
-    struct XFSDoc * ReadMe;
-
-    RCt = 0;
-    TheNode = NULL;
-    NodeName = NULL;
-    TextOrSource = NULL;
-    ReadMe = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Model == NULL || Template == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    NodeName = Alias == NULL ? XFSModelNodeName ( Template ) : Alias;
-
-    /*) There could be "text" and "source" parameters, we will leave
-      | source for a future development then, and will use it as text
-      (*/
-    TextOrSource = XFSModelNodeProperty ( Template, XFS_MODEL_TEXT );
-    if ( TextOrSource == NULL ) {
-        TextOrSource = XFSModelNodeProperty ( Template, XFS_MODEL_SOURCE );
-    }
-
-    if ( TextOrSource == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFSTextDocMake ( & ReadMe );
-    if ( RCt == 0 ) {
-
-        RCt = XFSTextDocAppend ( ReadMe, "README:\n%s\n", TextOrSource );
-        if ( RCt == 0 ) {
-            RCt = XFSDocNodeMakeWithFlavor (
-                                & TheNode,
-                                ReadMe,
-                                NodeName,
-                                XFSModelNodeSecurity ( Template ),
-                                _sFlavorOfReadMe
-                                );
-            if ( RCt == 0 ) {
-                * Node = TheNode;
-            }
-            else {
-                if ( TheNode != NULL ) {
-                    XFSNodeDispose ( TheNode );
-                }
-            }
-        }
-
-        XFSDocRelease ( ReadMe );
-    }
-
-    return RCt;
-}   /* _ReadMeNodeConstructor () */
-
-/*)))
- |||
- +++    ReadMeNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_ReadMeConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-
-    RCt = _ReadMeNodeConstructor (
-                            Model,
-                            Template,
-                            Alias,
-                            Node
-                            );
-
-/*
-pLogMsg ( klogDebug, "_ReadMeConstructor ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,templat=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _ReadMeConstructor () */
-
-static
-rc_t CC
-_ReadMeValidator (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            uint32_t Flags
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_ReadMeValidator ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,templat=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _ReadMeValidator () */
-
-static const struct XFSTeleport _sReadMeTeleport = {
-                                            _ReadMeConstructor,
-                                            _ReadMeValidator,
-                                            false
-                                            };
-
-
-LIB_EXPORT
-rc_t CC
-XFSReadMeProvider ( const struct XFSTeleport ** Teleport )
-{
-    if ( Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = & _sReadMeTeleport;
-
-    return 0;
-}   /* XFSReadMeProvider () */
-
diff --git a/libs/xfs/schwarzschraube.c b/libs/xfs/schwarzschraube.c
deleted file mode 100644
index 3062a0f..0000000
--- a/libs/xfs/schwarzschraube.c
+++ /dev/null
@@ -1,334 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/log.h>
-#include <klib/printf.h>
-
-#include <vfs/manager.h>
-#include <kns/manager.h>
-#include <kfs/directory.h>
-
-#include "schwarzschraube.h"
-
-#include <sysalloc.h>
-
- /*))))
-   |||| That file contains unsoted methods
-   ((((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))  if Source is NULL, it will be passed to Destination
- ((*/
-LIB_EXPORT
-rc_t CC
-XFS_StrDup ( const char * Src,  const char ** Dst )
-{
-    char ** TheDst;
-
-    TheDst = ( char ** ) Dst;
-
-    if ( TheDst == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Src == NULL ) {
-        * TheDst = NULL;
-
-        return 0;
-    }
-
-    * TheDst = string_dup_measure ( Src, NULL );
-    if ( * TheDst == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    return 0;
-}   /* XFS_StrDup () */
-
-/*))  if Source is NULL, it will be passed to Destination
- ((*/
-LIB_EXPORT
-rc_t CC
-XFS_SStrDup ( const struct String * Src,  const char ** Dst )
-{
-    char ** TheDst = ( char ** ) Dst;
-
-    if ( TheDst == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Src == NULL ) {
-        * TheDst = NULL;
-
-        return 0;
-    }
-
-    if ( Src -> size == 0 ) {
-        * TheDst = NULL;
-
-        return 0;
-    }
-
-    * TheDst = string_dup ( Src -> addr, Src -> size );
-    if ( * TheDst == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    return 0;
-}   /* XFS_SStrDup () */
-
-LIB_EXPORT
-rc_t CC
-XFS_StrEndsWith ( const char * Str, const char * End )
-{
-    uint32_t StrLen, EndLen;
-
-    if ( Str == NULL || End == NULL ) {
-        return false;
-    }
-
-    StrLen = string_len ( Str, string_size ( Str ) );
-    EndLen = string_len ( End, string_size ( End ) );
-
-    if ( StrLen >= EndLen && EndLen > 0 ) {
-        return string_cmp (
-                        Str + ( StrLen - EndLen ),
-                        EndLen,
-                        End,
-                        EndLen,
-                        EndLen
-                        ) == 0;
-    }
-
-    return false;
-}   /* XFS_StrEndsWith () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))   Sometime we need VFSManager, and it is very costly to
- |||    make it each time on demand ... so here is it
- |||    NOTE: Initializing and Destroying code arent thread safe!!!
- |||          will add mutexes if it really need to :)
-(((*/
-
-static struct VFSManager * _sVfsManager = NULL;
-
-LIB_EXPORT
-rc_t CC
-XFS_VfsManagerInit ()
-{
-    rc_t RCt;
-    struct VFSManager * Manager;
-
-    RCt = 0;
-    Manager = NULL;
-
-    if ( _sVfsManager == NULL ) {
-        RCt = VFSManagerMake ( & Manager );
-        if ( RCt == 0 ) {
-            if ( Manager == NULL ) {
-                RCt = XFS_RC ( rcNull );
-            }
-            else {
-                _sVfsManager = Manager;
-            }
-        }
-    }
-
-    return RCt;
-}   /* XFS_VfsManagerInit () */
-
-LIB_EXPORT
-rc_t CC
-XFS_VfsManagerDispose ()
-{
-    rc_t RCt;
-    struct VFSManager * Manager;
-
-    RCt = 0;
-    Manager = _sVfsManager;
-
-    if ( Manager != NULL ) {
-        _sVfsManager = NULL;
-
-        RCt = VFSManagerRelease ( Manager );
-    }
-
-    return RCt;
-}   /* XFS_VfsManagerDispose () */
-
-LIB_EXPORT
-const struct VFSManager * CC
-XFS_VfsManager ()
-{
-    return _sVfsManager;
-}   /* XFS_VfsManager () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))   Sometime we need KNSManager, and it is very costly to
- |||    make it each time on demand ... so here is it
- |||    NOTE: Initializing and Destroying code arent thread safe!!!
- |||          will add mutexes if it really need to :)
-(((*/
-static struct KNSManager * _sKnsManager = NULL;
-
-LIB_EXPORT
-rc_t CC
-XFS_KnsManagerInit ()
-{
-    rc_t RCt;
-    struct KNSManager * Manager;
-
-    RCt = 0;
-    Manager = NULL;
-
-    if ( _sKnsManager == NULL ) {
-        RCt = KNSManagerMake ( & Manager );
-        if ( RCt == 0 ) {
-            if ( Manager == NULL ) {
-                RCt = XFS_RC ( rcNull );
-            }
-            else {
-                _sKnsManager = Manager;
-            }
-        }
-    }
-
-    return RCt;
-}   /* XFS_KnsManagerInit () */
-
-LIB_EXPORT
-rc_t CC
-XFS_KnsManagerDispose ()
-{
-    rc_t RCt;
-    struct KNSManager * Manager;
-
-    RCt = 0;
-    Manager = _sKnsManager;
-
-    if ( Manager != NULL ) {
-        _sKnsManager = NULL;
-
-        RCt = KNSManagerRelease ( Manager );
-    }
-
-    return RCt;
-}   /* XFS_KnsManagerDispose () */
-
-LIB_EXPORT
-const struct KNSManager * CC
-XFS_KnsManager ()
-{
-    return _sKnsManager;
-}   /* XFS_KnsManager () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))   Simple resolving path Absolute/Relative
- |||    Sometimes it necessary
-(((*/
-
-LIB_EXPORT
-rc_t CC
-XFS_ResolvePath (
-                bool Absolute,
-                char * Resolved,
-                size_t ResolvedSize,
-                const char * Format,
-                ...
-)
-{
-    rc_t RCt;
-    va_list Args;
-
-    RCt = 0;
-
-    XFS_CAN ( Format )
-
-    va_start ( Args, Format );
-
-    RCt = XFS_VResolvePath (
-                            Absolute,
-                            Resolved,
-                            ResolvedSize,
-                            Format,
-                            Args
-                            );
-
-    va_end ( Args );
-
-    return RCt;
-}   /* XFS_ResolvePath () */
-
-LIB_EXPORT
-rc_t CC
-XFS_VResolvePath (
-                bool Absolute,
-                char * Resolved,
-                size_t ResolvedSize,
-                const char * Format,
-                va_list Args
-)
-{
-    rc_t RCt;
-    struct KDirectory * NatDir;
-
-    RCt = 0;
-    NatDir = NULL;
-
-    XFS_CAN ( Resolved )
-    XFS_CAN ( Format )
-    XFS_CA ( ResolvedSize, 0 )
-
-    RCt = KDirectoryNativeDir ( & NatDir );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryVResolvePath (
-                                    NatDir,
-                                    Absolute,
-                                    Resolved,
-                                    ResolvedSize,
-                                    Format,
-                                    Args
-                                    );
-        KDirectoryRelease ( NatDir );
-    }
-
-    if ( RCt != 0 ) {
-        * Resolved = 0;
-    }
-
-    return 0;
-}   /* XFS_VResolvePath () */
diff --git a/libs/xfs/schwarzschraube.h b/libs/xfs/schwarzschraube.h
deleted file mode 100644
index 211e038..0000000
--- a/libs/xfs/schwarzschraube.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _schwarzschraube_
-#define _schwarzschraube_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*) Fowards, and others
- (*/
-
-/*))))
-  ||||   Unsorted methods which usage was approved by usage
-  ((((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct String;
-
-/*)))   Dupping string, and if NULL is Src, it will be passed to Dst
- (((*/
-XFS_EXTERN rc_t CC XFS_StrDup ( const char * Src,  const char ** Dst );
-
-/*)))   Dupping String, and if NULL is Src, it will be passed to Dst
- (((*/
-XFS_EXTERN rc_t CC XFS_SStrDup (
-                                const struct String * Src,
-                                const char ** Dst
-                                );
-
-/*)))   Checking if string ends with string
- (((*/
-XFS_EXTERN rc_t CC XFS_StrEndsWith (
-                                const char * Str, const char * End
-                                );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))   Sometimes I need VFSManager, and from different places, and
-  |||   it is very costly to make on Windows platform
-  (((*/
-struct VFSManager;
-
-XFS_EXTERN rc_t CC XFS_VfsManagerInit ( );
-XFS_EXTERN rc_t CC XFS_VfsManagerDispose ( );
-
-XFS_EXTERN const struct VFSManager * CC XFS_VfsManager ( );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))   Sometimes I need KNSManager, and from different places, and
-  |||   it is costly too
-  (((*/
-struct KNSManager;
-
-XFS_EXTERN rc_t CC XFS_KnsManagerInit ( );
-XFS_EXTERN rc_t CC XFS_KnsManagerDispose ( );
-
-XFS_EXTERN const struct KNSManager * CC XFS_KnsManager ( );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))   Just resolving absolute/relative path. Need it sometime
-  |||
-  (((*/
-XFS_EXTERN rc_t CC XFS_ResolvePath (
-                                bool Absolute,
-                                char * Resolved,
-                                size_t ResolvedSize,
-                                const char * Format,
-                                ...
-                                );
-XFS_EXTERN rc_t CC XFS_VResolvePath (
-                                bool Absolute,
-                                char * Resolved,
-                                size_t ResolvedSize,
-                                const char * Format,
-                                va_list Args
-                                );
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _schwarzschraube_ */
diff --git a/libs/xfs/simcon.c b/libs/xfs/simcon.c
deleted file mode 100644
index 2b8f8b7..0000000
--- a/libs/xfs/simcon.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/namelist.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <xfs/model.h>
-#include <xfs/node.h>
-
-#include "teleport.h"
-#include "common.h"
-#include "contnode.h"
-
-#include <sysalloc.h>
-
-/*)))
- |||
- +++    Simple Container lives here
- |||
-(((*/
-
-/*)))
- |||
- +++    Simple Container has a Teleport, and it is HERE
- |||
-(((*/
-
-static
-rc_t CC
-_SimpleContainerCreateChildren (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            struct XFSNode * Container
-)
-{
-    rc_t RCt;
-    const struct KNamelist * Children;
-    uint32_t ChildrenQty, llp;
-    const char * ChildName, * ChildAlias;
-    const struct XFSNode * TheNode;
-
-    RCt = 0;
-    Children = NULL;
-    ChildrenQty = 0;
-    ChildName = ChildAlias = NULL;
-    TheNode = NULL;
-
-
-    RCt = XFSModelNodeChildrenNames ( Template, & Children );
-    if ( RCt == 0 ) {
-
-        RCt = KNamelistCount ( Children, & ChildrenQty );
-        if ( RCt == 0 ) {
-
-            for ( llp = 0; llp < ChildrenQty; llp ++ ) {
-                RCt = KNamelistGet ( Children, llp, & ChildName );
-                if ( RCt == 0 ) {
-
-                    ChildAlias = XFSModelNodeChildAlias (
-                                                    Template,
-                                                    ChildName
-                                                    );
-
-/*
-pLogMsg ( klogDebug, " ||== Creating child [$(name)] alias [$(alias)]", "name=%s,alias=%s", ChildName, ( ChildAlias == NULL ? "NULL" : ChildAlias ) );
-*/
-
-                    RCt = XFSNodeMake (
-                                    Model,
-                                    ChildName,
-                                    ChildAlias,
-                                    & TheNode
-                                    );
-                    if ( RCt == 0 ) {
-                        RCt = XFSContNodeAddChild ( Container, TheNode );
-                        /* Don't know what to do here */
-                    }
-
-                    if ( RCt != 0 ) {
-                        break;
-                    }
-                }
-            }
-        }
-        KNamelistRelease ( Children );
-    }
-
-    return RCt;
-}   /* _SimpleContainerCreateChildren () */
-
-static
-rc_t CC
-_SimpleContainerConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct XFSNode * TheNode;
-    const char * NodeName;
-
-    RCt = 0;
-    TheNode = NULL;
-    NodeName = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Model == NULL || Template == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    NodeName = Alias == NULL ? XFSModelNodeName ( Template ) : Alias;
-
-    RCt = XFSContNodeMakeWithFlavor (
-                                NodeName,
-                                XFSModelNodeSecurity ( Template ),
-                                _sFlavorOfSimpleContainer,
-                                & TheNode
-                                );
-    if ( RCt == 0 ) {
-        RCt = _SimpleContainerCreateChildren (
-                                            Model,
-                                            Template,
-                                            TheNode
-                                            );
-        if ( RCt == 0 ) {
-            * Node = TheNode;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        XFSNodeDispose ( TheNode );
-    }
-
-/*
-pLogMsg ( klogDebug, "_SimpleContainerConstructor ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _SimpleContainerConstructor () */
-
-static
-rc_t CC
-_SimpleContainerValidator (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            uint32_t Flags
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_SimpleContainerValidator ( $(model), $(template) (\"$(name)\"), \"$(alias)\" )", "model=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _SimpleContainerValidator () */
-
-static const struct XFSTeleport _sSimpleContainerTeleport = {
-                                        _SimpleContainerConstructor,
-                                        _SimpleContainerValidator,
-                                        false
-                                        };
-
-
-LIB_EXPORT
-rc_t CC
-XFSSimpleContainerProvider ( const struct XFSTeleport ** Teleport )
-{
-    if ( Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = & _sSimpleContainerTeleport;
-
-    return 0;
-}   /* XFSSimpleContainerProvider () */
-
-
diff --git a/libs/xfs/spen.c b/libs/xfs/spen.c
deleted file mode 100644
index 343fd4e..0000000
--- a/libs/xfs/spen.c
+++ /dev/null
@@ -1,963 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/container.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <kproc/lock.h>
-#include <vfs/path.h>
-#include <kns/http.h>
-
-#include <kfg/repository.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-#include <kfs/file-impl.h>
-
-#include "schwarzschraube.h"
-#include "zehr.h"
-#include "mehr.h"
-#include "spen.h"
-#include <xfs/path.h>
-
-#include <sysalloc.h>
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- //     special structs _sP and _sPB are living here
-((*/
-
-struct XFSBurro;
-
-struct _sPB {
-    struct _sPB * prev;
-    struct _sPB * next;
-
-    struct XFSBurro * burro;
-};
-
-struct _sP {
-    struct _sPB * head;
-    struct _sPB * tail;
-
-    struct KLock * mutabor;
-
-    size_t capacity;
-    size_t qty;
-};
-
-/*))
- //     XFSPen and XFSBurro are living here
-((*/
-
-struct XFSPen {
-    struct BSTree tree;
-
-    struct _sP * pen;
-
-    struct KLock * mutabor;
-};
-
-struct XFSBurro {
-    struct BSTNode node;
-
-    struct KLock * mutabor;
-    KRefcount refcount;
-
-    const struct XFSPen * pen;
-    struct _sPB * burro;
-
-    const char * url;
-    uint32_t url_hash;
-
-    const struct KFile * file;
-
-    size_t connect_attempts;
-    XFSStatus status;
-};
-
-static const char * _sBurro_classname = "Burro";
-static size_t _sDefaultConnectAttempts = 3;
-
-static rc_t CC _CloseBurro_callback (
-                                struct _sP * self,
-                                struct _sPB * Burro
-                                );
-#ifdef NOT_NEED_YET
-static rc_t CC _CloseBurroAndDelete_callback (
-                                struct _sP * self,
-                                struct _sPB * Burro
-                                );
-#endif /* NOT_NEED_YET */
-static rc_t CC _sPTrimToSize_NoLock (
-                                struct _sP * self,
-                                size_t Size,
-                                rc_t ( CC * callback ) (
-                                                    struct _sP * p,
-                                                    struct _sPB * b
-                                                    )
-                                );
-
-static
-rc_t CC
-_sPDispose ( struct _sP * self )
-{
-    if ( self != NULL ) {
-        if ( self -> mutabor != NULL ) {
-            KLockRelease ( self -> mutabor );
-        }
-
-        // _sPTrimToSize_NoLock ( self, 0, _CloseBurroAndDelete_callback );
-        _sPTrimToSize_NoLock ( self, 0, _CloseBurro_callback );
-
-        self -> qty = 0;
-        self -> capacity = 0;
-
-        free ( self );
-    }
-
-    return 0;
-}   /* _sPDispose () */
-
-static
-rc_t CC
-_sPMake ( struct _sP ** Pen, size_t Capacity )
-{
-    rc_t RCt;
-    struct _sP * DasPen;
-
-    RCt = 0;
-    DasPen = NULL;
-
-    XFS_CSAN ( Pen )
-    XFS_CAN ( Pen )
-
-    DasPen = calloc ( 1, sizeof ( struct _sP ) );
-    if ( DasPen == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = KLockMake ( & ( DasPen -> mutabor ) );
-    if ( RCt == 0 ) {
-        DasPen -> capacity = Capacity;
-        DasPen -> qty = 0;
-
-        * Pen = DasPen;
-    }
-
-    if ( RCt != 0 ) {
-        * Pen = NULL;
-
-        _sPDispose ( DasPen );
-    }
-
-    return RCt;
-}   /* _sPMake () */
-
-static
-rc_t CC
-_sPDisconnect_NoLock (
-                    struct _sP * self,
-                    struct _sPB * Burro,
-                    rc_t ( CC * callback ) (
-                                        struct _sP * p,
-                                        struct _sPB * b
-                                        )
-)
-{
-    rc_t RCt = 0;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Burro )
-
-    if ( Burro -> next == NULL && Burro -> prev == NULL ) {
-        if ( self -> head == Burro ) {
-            self -> head = self -> tail = NULL;
-
-            self -> qty --;
-
-            if ( callback != NULL ) {
-                RCt = callback ( self, Burro );
-            }
-        }
-    }
-    else {
-            /* Donkey is a head of household
-             */
-        if ( Burro -> prev == NULL ) {
-            if ( self -> head != Burro ) {
-                return XFS_RC ( rcInvalid );
-            }
-
-            if ( Burro -> next != NULL ) {
-                Burro -> next -> prev = NULL;
-                self -> head = Burro -> next;
-            }
-            else {
-                self -> head = self -> tail = NULL;
-            }
-        }
-        else {
-                /* Donkey is a tail of household
-                 */
-            if ( Burro -> next == NULL ) {
-                if ( self -> tail != Burro ) {
-                    return XFS_RC ( rcInvalid );
-                }
-
-                if ( Burro -> prev != NULL ) {
-                    Burro -> prev -> next = NULL;
-                    self -> tail = Burro -> prev;
-                }
-                else {
-                    self -> head = self -> tail = NULL;
-                }
-            }
-            else {
-                Burro -> prev -> next = Burro -> next -> prev;
-                Burro -> next -> prev = Burro -> prev -> next;
-            }
-        }
-
-        self -> qty --;
-        Burro -> next = Burro -> prev = NULL;
-
-
-        if ( callback != NULL ) {
-            RCt = callback ( self, Burro );
-        }
-    }
-
-    return RCt;
-}   /* _sPDisconnect_NoLock () */
-
-rc_t CC
-_sPTrimToSize_NoLock (
-                    struct _sP * self,
-                    size_t Size,
-                    rc_t ( CC * callback ) (
-                                        struct _sP * p,
-                                        struct _sPB * b
-                                        )
-)
-{
-    rc_t RCt;
-    struct _sPB * Burro;
-
-    RCt = 0;
-    Burro = NULL;
-
-    XFS_CAN ( self )
-
-    if ( 0 < self -> qty ) {
-        while ( Size < self -> qty ) {
-            Burro = self -> tail;
-            RCt = _sPDisconnect_NoLock ( self, Burro, callback );
-            if ( RCt != 0 ) {
-                break;
-            }
-
-            if ( Burro != NULL && Burro == self -> tail ) {
-                RCt = XFS_RC ( rcInvalid );
-                break;
-            }
-        }
-    }
-
-    return RCt;
-}   /* _sPTrimToSize_NoLock () */
-
-static
-rc_t CC
-_sPConnect_NoLock ( struct _sP * self, struct _sPB * Burro )
-{
-    rc_t RCt = 0;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Burro )
-
-        /* Donkey is busy already 
-         */
-    if ( Burro -> next != NULL || Burro -> prev != NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-        /* Trimming pen to size
-         */
-    RCt = _sPTrimToSize_NoLock (
-                                self,
-                                self -> capacity - 1,
-                                _CloseBurro_callback
-                                );
-    if ( RCt == 0 ) {
-            /* There are no donkeys in a pen
-             */
-        if ( self -> head != NULL ) {
-            Burro -> next = self -> head;
-            self -> head -> prev = Burro;
-        }
-        else {
-            self -> tail = Burro;
-        }
-        self -> head = Burro;
-        self -> qty ++;
-    }
-
-    return RCt;
-}   /* _sPConnect_NoLock () */
-
-static
-rc_t CC
-_sPToFront ( struct _sP * self, struct _sPB * Burro )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Burro )
-
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-
-        // if ( Burro != self -> head ) {
-
-            RCt = _sPDisconnect_NoLock ( self, Burro, NULL );
-            if ( RCt == 0 ) {
-                RCt = _sPConnect_NoLock ( self, Burro );
-            }
-        // }
-
-        KLockUnlock ( self -> mutabor );
-    }
-
-    return RCt;
-}   /* _sPToFront () */
-
-rc_t CC
-_CloseBurro_callback ( struct _sP * self, struct _sPB * Burro )
-{
-    rc_t RCt;
-    const struct XFSBurro * TheBurro;
-    struct KFile * File;
-
-    RCt = 0;
-    TheBurro = NULL;
-    File = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Burro )
-
-    TheBurro = Burro -> burro;
-
-    XFS_CAN ( TheBurro )
-
-    RCt = KLockAcquire ( TheBurro -> mutabor );
-    if ( RCt == 0 ) {
-        if ( TheBurro -> file != NULL ) {
-            File = ( struct KFile * ) TheBurro -> file;
-            ( ( struct XFSBurro * ) TheBurro ) -> file = NULL;
-        }
-        KLockUnlock ( TheBurro -> mutabor );
-    }
-
-    if ( RCt == 0 && File != 0 ) {
-        KFileRelease ( File );
-    }
-
-    return RCt;
-}   /* _CloseBurro_callback () */
-
-#ifdef NOT_NEED_YET
-rc_t CC
-_CloseBurroAndDelete_callback ( struct _sP * self, struct _sPB * Burro )
-{
-    rc_t RCt = 0;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Burro )
-
-    RCt = _CloseBurro_callback ( self, Burro );
-
-    free ( Burro );
-
-    return RCt;
-}   /* _CloseBurroAndDelete_callback () */
-#endif /* NOT_NEED_YET */
-
-static
-rc_t CC
-_sPBMake ( struct _sPB ** RetVal, struct XFSBurro * Burro )
-{
-    struct _sPB * TheRet = NULL;
-
-    XFS_CSAN ( RetVal )
-    XFS_CAN ( RetVal )
-    XFS_CAN ( Burro )
-
-    TheRet = calloc ( 1, sizeof ( struct _sPB ) );
-    if ( TheRet == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    TheRet -> burro = Burro;
-    * RetVal = TheRet;
-
-    return 0;
-}   /* _sPBMake () */
-
-static
-rc_t CC
-_sPBDispose ( struct _sPB * self )
-{
-    if ( self != NULL ) {
-            /* We do not check if Burro was not disconnected
-               cuz it is too much to expect from us
-               Just shut them down
-             */
-        self -> prev = NULL;
-        self -> next = NULL;
-        self -> burro = NULL;
-
-        free ( self );
-    }
-    return 0;
-}   /* _sPBDispose () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* XFSBurro                                                          */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static
-rc_t CC
-_BurroDispose ( const struct XFSBurro * self )
-{
-    struct XFSBurro * Burro = ( struct XFSBurro * ) self;
-
-    if ( Burro != NULL ) {
-        KRefcountWhack ( & ( Burro -> refcount ), _sBurro_classname );
-
-        if ( Burro -> mutabor !=  NULL ) {
-            KLockRelease ( Burro -> mutabor );
-            Burro -> mutabor = NULL;
-        }
-
-        if ( Burro -> burro != NULL ) {
-            _sPBDispose ( Burro -> burro );
-            Burro -> burro = NULL;
-        }
-
-        if ( Burro -> url != NULL ) {
-            free ( ( char * ) Burro -> url );
-            Burro -> url = NULL;
-        }
-
-        Burro -> url_hash = 0;
-
-        if ( Burro -> file != NULL ) {
-            KFileRelease ( Burro -> file );
-            Burro -> file = NULL;
-        }
-
-        Burro -> connect_attempts = _sDefaultConnectAttempts;
-        Burro -> status = kxfsInvalid;
-        Burro -> pen = NULL;
-
-        free ( Burro );
-    }
-
-    return 0;
-}   /* _BurroDispose () */
-
-static rc_t CC _PenAdd_NoLock (
-                            const struct XFSPen * self,
-                            const struct XFSBurro * Burro
-                            );
-
-static
-rc_t CC
-_BurroMake (
-            const struct XFSPen * Pen,
-            const struct XFSBurro ** Burro,
-            const char * Url
-)
-{
-    rc_t RCt;
-    struct XFSBurro * TheBurro;
-
-    RCt = 0;
-    TheBurro = NULL;
-
-    XFS_CSAN ( Burro )
-    XFS_CAN ( Burro )
-    XFS_CAN ( Url )
-
-    TheBurro = calloc ( 1, sizeof ( struct XFSBurro ) );
-    if ( TheBurro == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    KRefcountInit (
-                & ( TheBurro -> refcount ),
-                1,
-                _sBurro_classname,
-                "BurroMake",
-                "Burro"
-                );
-
-    RCt = KLockMake ( & ( TheBurro -> mutabor ) );
-    if ( RCt == 0 ) {
-        RCt = _sPBMake ( & ( TheBurro -> burro ), TheBurro );
-        if ( RCt == 0 ) {
-            RCt = XFS_StrDup ( Url, & ( TheBurro -> url ) );
-            if ( RCt == 0 ) {
-                RCt = _PenAdd_NoLock ( Pen, TheBurro );
-                if ( RCt == 0 ) {
-                    TheBurro -> url_hash = string_hash (
-                                        TheBurro -> url,
-                                        string_size ( TheBurro -> url )
-                                        );
-                    TheBurro -> file = NULL;
-                    TheBurro -> connect_attempts =
-                                            _sDefaultConnectAttempts;
-                    TheBurro -> status = kxfsReady;
-                    TheBurro -> pen = Pen;
-
-                    * Burro = TheBurro;
-                }
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Burro = NULL;
-
-        if ( TheBurro != NULL ) {
-            _BurroDispose ( TheBurro );
-        }
-    }
-
-    return RCt;
-}   /* _BurroMake () */
-
-rc_t CC
-XFSBurroAddRef ( const struct XFSBurro * self )
-{
-    rc_t RCt;
-    int RefC;
-
-    RCt = 0;
-    RefC = 0;
-
-    XFS_CAN ( self );
-
-    RefC = KRefcountAdd ( & ( self -> refcount ), _sBurro_classname );
-    switch ( RefC ) {
-        case krefOkay :
-            RCt = 0;
-            break;
-        case krefZero :
-        case krefLimit :
-        case krefNegative :
-            RCt = XFS_RC ( rcInvalid );
-            break;
-        default :
-            RCt = XFS_RC ( rcUnknown );
-            break;
-    }
-
-    return RCt;
-}   /* XFSBurroAddRef () */
-
-rc_t CC
-XFSBurroRelease ( const struct XFSBurro * self )
-{
-    rc_t RCt;
-    int RefC;
-
-    RCt = 0;
-    RefC = 0;
-
-    XFS_CAN ( self );
-
-    RefC = KRefcountDrop ( & ( self -> refcount ), _sBurro_classname );
-    switch ( RefC ) {
-        case krefOkay :
-        case krefZero :
-                RCt = 0;
-                break;
-        case krefWhack :
-                RCt = _BurroDispose ( self );
-                break;
-        case krefNegative :
-                RCt = XFS_RC ( rcInvalid );
-                break;
-        default :
-                RCt = XFS_RC ( rcUnknown );
-                break;
-    }
-
-    return RCt;
-}   /* XFSBurroRelease () */
-
-bool CC
-XFSBurroGood ( const struct XFSBurro * self )
-{
-    if ( self != NULL ) {
-        return self -> status == kxfsReady
-                || self -> status == kxfsGood;
-    }
-
-    return false;
-}   /* XFSBurroGood () */
-
-static
-rc_t CC
-_BurroCheckMakeFile_NoLock ( const struct XFSBurro * self )
-{
-    rc_t RCt;
-    const struct KFile * File;
-
-    RCt = 0;
-    File = NULL;
-
-    XFS_CAN ( self )
-
-    if ( self -> status != kxfsReady && self -> status != kxfsComplete ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    File = self -> file;
-    if ( File == NULL ) {
-        while ( 0 < self -> connect_attempts ) {
-            ( ( struct XFSBurro * ) self ) -> status = kxfsReady;
-            RCt = KNSManagerMakeHttpFile (
-                                    XFS_KnsManager (),
-                                    & File,
-                                    NULL,
-                                    0x01010000,
-                                    self -> url
-                                    );
-            if ( RCt == 0 ) {
-                ( ( struct XFSBurro * ) self ) -> status = kxfsComplete;
-                break;
-            }
-
-            ( ( struct XFSBurro * ) self ) -> status = kxfsBroken;
-            ( ( struct XFSBurro * ) self ) -> connect_attempts --;
-        }
-    }
-
-    if ( RCt == 0 ) {
-        ( ( struct XFSBurro * ) self ) -> connect_attempts =
-                                            _sDefaultConnectAttempts;
-        ( ( struct XFSBurro * ) self ) -> file = File;
-    }
-    else {
-        ( ( struct XFSBurro * ) self ) -> file = NULL;
-    }
-
-    return RCt;
-}   /* _BurroCheckMakeFile_NoLock () */
-
-static
-rc_t CC
-_BurroGetFile (
-                const struct XFSBurro * self,
-                const struct KFile ** File,
-                bool DropOld
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    XFS_CSAN ( File )
-    XFS_CAN ( self )
-    XFS_CAN ( self -> pen )
-    XFS_CAN ( self -> burro )
-    XFS_CAN ( File )
-
-        /* Check if we are OK */
-    if ( self -> status != kxfsReady && self -> status != kxfsComplete ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-        /* Read procedure is :
-         *    Take Burro from a line and put it on the top
-         *    Connect if necessary
-         *    Read, or return Error
-         */
-    RCt = _sPToFront ( self -> pen -> pen, self -> burro );
-    if ( RCt == 0 ) {
-        RCt = KLockAcquire ( self -> mutabor );
-        if ( RCt == 0 ) {
-            if ( DropOld ) {
-                if ( self -> file != NULL ) {
-                    KFileRelease ( self -> file );
-                    ( ( struct XFSBurro * ) self ) -> file = NULL;
-                }
-            }
-
-            RCt = _BurroCheckMakeFile_NoLock ( self );
-            if ( RCt == 0 ) {
-                RCt = KFileAddRef ( self -> file );
-                if ( RCt == 0 ) {
-                    * File = self -> file;
-                }
-            }
-
-            KLockUnlock ( self -> mutabor );
-        }
-    }
-
-    return RCt;
-}   /* _BurroGetFile () */
-
-rc_t CC
-XFSBurroCachedFile (
-                const struct XFSBurro * self,
-                const struct KFile ** File
-)
-{
-    return _BurroGetFile ( self, File, false );
-}   /* XFSBurroCachedFile () */
-
-rc_t CC
-XFSBurroRecachedFile (
-                const struct XFSBurro * self,
-                const struct KFile ** File
-)
-{
-    return _BurroGetFile ( self, File, true );
-}   /* XFSBurroRecachedFile () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* XFSPen                                                            */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-rc_t CC
-XFSPenMake ( const struct XFSPen ** Pen, size_t Capacity )
-{
-    rc_t RCt;
-    struct XFSPen * ThePen;
-
-    RCt = 0;
-    ThePen = NULL;
-
-    XFS_CSAN ( Pen )
-    XFS_CAN ( Pen )
-
-    ThePen = calloc ( 1, sizeof ( struct XFSPen ) );
-    if ( ThePen == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    BSTreeInit ( & ( ThePen -> tree ) );
-
-    RCt = KLockMake ( & ( ThePen -> mutabor ) );
-    if ( RCt == 0 ) {
-        RCt = _sPMake ( & ( ThePen -> pen ), Capacity );
-        if ( RCt == 0 ) {
-            * Pen = ThePen;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Pen = NULL;
-
-        if ( ThePen != NULL ) {
-            XFSPenDispose ( ThePen );
-        }
-    }
-
-    return 0;
-}   /* XFSPenMake () */
-
-static
-void CC
-_PenTreeWhackCallback ( BSTNode * Node, void * unused )
-{
-    if ( Node != NULL ) {
-        XFSBurroRelease ( ( const struct XFSBurro * ) Node );
-    }
-}   /* _PenTreeWhackCallback () */
-
-rc_t CC
-XFSPenDispose ( const struct XFSPen * self )
-{
-    struct XFSPen * Pen = ( struct XFSPen * ) self;
-
-    if ( Pen != NULL ) {
-        if ( Pen -> mutabor != NULL ) {
-            KLockRelease ( Pen -> mutabor );
-            Pen -> mutabor = NULL;
-        }
-
-        if ( Pen -> pen != NULL ) {
-            _sPDispose ( Pen -> pen );
-            Pen -> pen = NULL;
-        }
-
-        BSTreeWhack ( & ( Pen -> tree ), _PenTreeWhackCallback, NULL );
-
-        free ( Pen );
-    }
-
-    return 0;
-}   /* XFSPenDispose () */
-
-static
-int64_t CC
-_PenFindCallback ( const void * Item, const struct BSTNode * Node )
-{
-    const char * ItemUrl, * NodeUrl;
-
-    ItemUrl = ( const char * ) Item;
-    NodeUrl = Node == NULL ? 0 : ( ( struct XFSBurro * ) Node ) -> url;
-
-    return XFS_StringCompare4BST_ZHR ( ItemUrl, NodeUrl );
-}   /* _PenFindCallback () */
-
-static
-rc_t CC
-_PenFind_NoLock (
-            const struct XFSPen * self,
-            const struct XFSBurro ** Burro,
-            const char * Url
-)
-{
-    rc_t RCt;
-    const struct XFSBurro * TheBurro;
-
-    RCt = 0;
-    TheBurro = NULL;
-
-    XFS_CSAN ( Burro )
-    XFS_CAN ( self )
-    XFS_CAN ( Burro )
-    XFS_CAN ( Url )
-
-    TheBurro = ( struct XFSBurro * ) BSTreeFind ( 
-                                            & ( self -> tree ),
-                                            Url,
-                                            _PenFindCallback
-                                            );
-    if ( TheBurro == NULL ) {
-        RCt = XFS_RC ( rcNotFound );
-    }
-    else {
-        * Burro = TheBurro;
-    }
-
-    return RCt;
-}   /* _PenFind_NoLock () */
-
-static
-int64_t CC
-_BurroAddCallback (
-const struct BSTNode * N1,
-const struct BSTNode * N2
-)
-{
-    return XFS_StringCompare4BST_ZHR (
-                                    ( ( struct XFSBurro * ) N1 ) -> url,
-                                    ( ( struct XFSBurro * ) N2 ) -> url
-                                    );
-}   /* _BurroAddCallback () */
-
-rc_t CC
-_PenAdd_NoLock (
-                const struct XFSPen * self,
-                const struct XFSBurro * Burro
-)
-{
-    XFS_CAN ( self )
-    XFS_CAN ( Burro )
-
-    return BSTreeInsert (
-                        & ( ( ( struct XFSPen * ) self ) -> tree ),
-                        ( struct BSTNode * ) Burro,
-                        _BurroAddCallback
-                        );
-}   /* _PenAdd_NoLock () */
-
-rc_t CC
-XFSPenGet ( 
-            const struct XFSPen * self,
-            const struct XFSBurro ** Burro,
-            const char * Url
-)
-{
-    rc_t RCt;
-    const struct XFSBurro * TheBurro;
-
-    RCt = 0;
-    TheBurro = NULL;
-
-    XFS_CSAN ( Burro )
-    XFS_CAN ( self )
-    XFS_CAN ( Burro )
-    XFS_CAN ( Url )
-
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _PenFind_NoLock ( self, & TheBurro, Url );
-        if ( GetRCState ( RCt ) == rcNotFound ) {
-            RCt = _BurroMake ( self, & TheBurro, Url );
-        }
-
-        if ( RCt == 0 ) {
-            RCt = XFSBurroAddRef ( TheBurro );
-            if ( RCt == 0 ) {
-                * Burro = TheBurro;
-            }
-        }
-
-        KLockUnlock ( self -> mutabor );
-    }
-
-    if ( RCt != 0 ) {
-        * Burro = NULL;
-
-        if ( TheBurro != NULL ) {
-            _BurroDispose ( TheBurro );
-            TheBurro = NULL;
-        }
-    }
-
-    return RCt;
-}   /* XFSPenGet () */
-
diff --git a/libs/xfs/spen.h b/libs/xfs/spen.h
deleted file mode 100644
index 02a807d..0000000
--- a/libs/xfs/spen.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _spen_h_
-#define _spen_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * LYRICS:
- *
- * That file contains pool of KHttpFiles, for accessing dbGaP data
- * Due to extremly sophisticated inner world of mine, I am introducing
- * Pen primitive ( not Pool ), and Pen is 'pen'. There is also small
- * donkey inside. Burro ( donkey ) it is structure which contains 
- * pointer to cached/non_cached HTTP file.
- *
- * So, call "XFSPenMake ()" function and be ready for ride.
- *
- * Enjoy.
- * 
- * TODO: make some adjustments, when Kurt will implement timeout
- *       in KFile interface.
- * 
- *_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- //     Forwards
-((*/
-struct XFSPen;
-struct XFSBurro;
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- //     XFSPen Make/Dispose methods
-((*/
-rc_t CC XFSPenMake (
-                            const struct XFSPen ** Pen,
-                            size_t Capacity
-                            );
-rc_t CC XFSPenDispose ( const struct XFSPen * self );
-
-/*))
- //     Returns object associated with URL
-((*/
-rc_t CC XFSPenGet (
-                            const struct XFSPen * self,
-                            const struct XFSBurro ** Burro,
-                            const char * Url
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- //     XFSBurro methods
-((*/
-
-rc_t CC XFSBurroAddRef ( const struct XFSBurro * self );
-rc_t CC XFSBurroRelease ( const struct XFSBurro * self );
-
-bool CC XFSBurroGood ( const struct XFSBurro * self );
-
-/*))
- //     Returns 'CACHED' KFile associated with URL
-((*/
-rc_t CC XFSBurroCachedFile (
-                                const struct XFSBurro * self,
-                                const struct KFile ** File
-                                );
-
-/*))
- //     Drops old 'CACHED' KFile associated with URL, and returns new
-((*/
-rc_t CC XFSBurroRecachedFile (
-                                const struct XFSBurro * self,
-                                const struct KFile ** File
-                                );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _spen_h_ */
diff --git a/libs/xfs/tar.c b/libs/xfs/tar.c
deleted file mode 100644
index 85c1337..0000000
--- a/libs/xfs/tar.c
+++ /dev/null
@@ -1,1225 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/path.h>
-#include <xfs/editors.h>
-#include <xfs/handle.h>
-#include <xfs/perm.h>
-
-#include "xtar.h"
-#include "mehr.h"
-#include "schwarzschraube.h"
-#include "teleport.h"
-#include "common.h"
-
-#include <sysalloc.h>
-
-#include <string.h>     /* memset */
-
-/*)))
- |||    That file contains 'archive' XFSTar based nodes
-(((*/
-
-/*)))
- |||
- +++    TarRootNode, TarNode, and others
- |||
-(((*/
-struct XFSTarNode {
-    struct XFSNode node;
-
-    const struct XFSTarEntry * entry;
-};
-
-struct XFSTarRootNode {
-    struct XFSTarNode node;
-
-    const struct XFSTar * tar;
-};
-
-struct XFSTarFileEditor {
-    struct XFSFileEditor Papahen;
-
-    const struct XFSTarEntry * entry;
-};
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*                                                               *_*/
-/*_* TarNode is living here                                       *_*/
-/*_*                                                               *_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))
- |||
- +++    TarNode virtual table is Living here :lol:
- |||
-(((*/
-static rc_t CC _TarNodeFlavor_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _TarNodeDispose_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _TarRootNodeDispose_v1 (
-                                const struct XFSNode * self
-                                );
-static rc_t CC _TarNodeFindNode_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSPath * Path,
-                                uint32_t PathIndex,
-                                const struct XFSNode ** Node
-                                );
-static rc_t CC _TarNodeDir_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSDirEditor ** Dir
-                                );
-static rc_t CC _TarNodeFile_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSFileEditor ** File
-                                );
-static rc_t CC _TarNodeAttr_v1 (
-                                const struct XFSNode * self,
-                                const struct XFSAttrEditor ** Attr
-                                );
-static rc_t CC _TarNodeDescribe_v1 (
-                                const struct XFSNode * self,
-                                char * Buffer,
-                                size_t BufferSize
-                                );
-
-static const struct XFSNode_vt_v1 _sTarRootNodeVT_v1 = {
-                                        1, 1,   /* nin naj */
-                                        _TarNodeFlavor_v1,
-                                        _TarRootNodeDispose_v1,
-                                        _TarNodeFindNode_v1,
-                                        _TarNodeDir_v1,
-                                        _TarNodeFile_v1,
-                                        _TarNodeAttr_v1,
-                                        _TarNodeDescribe_v1
-                                        };
-
-static const struct XFSNode_vt_v1 _sTarNodeVT_v1 = {
-                                        1, 1,   /* nin naj */
-                                        _TarNodeFlavor_v1,
-                                        _TarNodeDispose_v1,
-                                        NULL,
-                                        _TarNodeDir_v1,
-                                        _TarNodeFile_v1,
-                                        _TarNodeAttr_v1,
-                                        _TarNodeDescribe_v1
-                                        };
-
-
-static
-rc_t CC
-XFSTarNodeMake (
-    struct XFSNode ** Node,
-    const char * Name,
-    const struct XFSTarEntry * Entry
-)
-{
-    rc_t RCt;
-    struct XFSTarNode * xNode;
-
-    RCt = 0;
-    xNode = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Node == NULL || Name == NULL || Entry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    xNode = calloc ( 1, sizeof ( struct XFSTarNode ) );
-    if ( xNode == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = XFSNodeInitVT (
-                    & ( xNode -> node ),
-                    Name,
-                    ( const union XFSNode_vt * ) & _sTarNodeVT_v1
-                    );
-
-    if ( RCt == 0 ) {
-        RCt = XFSTarEntryAddRef ( Entry );
-        if ( RCt == 0 ) {
-            xNode -> entry = Entry;
-
-            * Node = & ( xNode -> node );
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( xNode != NULL ) {
-            RCt = XFSNodeDispose ( & ( xNode -> node ) );
-        }
-    }
-
-    return RCt;
-}   /* XFSTarNodeMake () */
-
-static
-rc_t CC
-XFSTarRootNodeMake (
-    struct XFSNode ** Node,
-    const char * Name,
-    const char * Path
-)
-{
-    rc_t RCt;
-    struct XFSTarRootNode * xNode;
-    const struct XFSTar * Tar;
-    const struct XFSTarEntry * Entry;
-
-    RCt = 0;
-    xNode = NULL;
-    Tar = NULL;
-    Entry = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Node == NULL || Name == NULL || Path == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    xNode = calloc ( 1, sizeof ( struct XFSTarRootNode ) );
-    if ( xNode == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSNodeInitVT (
-                    & ( xNode -> node . node),
-                    Name,
-                    ( const union XFSNode_vt * ) & _sTarRootNodeVT_v1
-                    );
-    if ( RCt == 0 ) {
-        RCt = XFSTarFindOrCreate ( Path, & Tar );
-        if ( RCt == 0 ) {
-            RCt = XFSTarGetEntry ( Tar, "/", & Entry );
-            if ( RCt == 0 ) {
-                if ( Entry == NULL ) {
-                    RCt = XFS_RC ( rcInvalid );
-                }
-                else {
-                    xNode -> node . entry = Entry;
-                    xNode -> tar = Tar;
-
-                    * Node = & ( xNode -> node . node );
-                }
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( xNode != NULL ) {
-            XFSNodeDispose ( ( const struct XFSNode * ) & ( xNode -> node ) );
-        }
-    }
-
-    return RCt;
-}   /* XFSTarRootNodeMake () */
-
-uint32_t CC
-_TarNodeFlavor_v1 ( const struct XFSNode * self )
-{
-    return _sFlavorOfTar;
-}   /* _TarNodeFlavor_v1 () */
-
-static
-rc_t CC
-XFSTarNodeDispose ( const struct XFSTarNode * self )
-{
-    struct XFSTarNode * Node = ( struct XFSTarNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "XFSTarNodeDispose ( $(node) )", "node=%p", ( void * ) Node );
-*/
-
-    if ( Node == 0 ) {
-        return 0;
-    }
-
-    if ( Node -> entry != NULL ) {
-        XFSTarEntryRelease ( Node -> entry );
-
-        Node -> entry = NULL;
-    }
-
-    free ( Node );
-
-    return 0;
-}   /* XFSTarNodeDispose () */
-
-static
-rc_t CC
-XFSTarRootNodeDispose ( const struct XFSTarRootNode * self )
-{
-    struct XFSTarRootNode * Node = ( struct XFSTarRootNode * ) self;
-
-/*
-pLogMsg ( klogDebug, "XFSTarRootNodeDispose ( $(node) )", "node=%p", ( void * ) Node );
-*/
-
-    if ( Node == 0 ) {
-        return 0;
-    }
-
-    if ( Node -> tar != NULL ) {
-        XFSTarRelease ( ( struct XFSTar * ) Node -> tar );
-        Node -> tar = NULL;
-    }
-
-    XFSTarNodeDispose ( & ( Node -> node ) );
-
-    return 0;
-}   /* XFSTarRootNodeDispose () */
-
-rc_t CC
-_TarRootNodeDispose_v1 ( const struct XFSNode * self )
-{
-    return XFSTarRootNodeDispose ( ( const struct XFSTarRootNode * ) self );
-}   /* _TarRootNodeDispose_v1 () */
-
-rc_t CC
-_TarNodeDispose_v1 ( const struct XFSNode * self )
-{
-    return XFSTarNodeDispose ( ( const struct XFSTarNode * ) self );
-}   /* _TarNodeDispose_v1 () */
-
-/*)))
- |||
- +++  There are two methods to find node: for Root and non Root nodes
- |||
-(((*/
-
-/*)) KDir version
- ((*/
-rc_t CC
-_TarNodeFindNode_v1 (
-            const struct XFSNode * self,
-            const struct XFSPath * Path,
-            uint32_t PathIndex,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    uint32_t PathCount;
-    const char * NodeName;
-    struct XFSTarRootNode * RootNode;
-    struct XFSNode * RetNode;
-    const struct XFSTarEntry * Entry;
-    const struct XFSPath * xPath;
-    bool IsLast;
-
-    RCt = 0;
-    PathCount = 0;
-    NodeName = NULL;
-    RootNode = NULL;
-    RetNode = NULL;
-    Entry = NULL;
-    xPath = NULL;
-    IsLast = false;
-
-    RCt = XFSNodeFindNodeCheckInitStandard (
-                                            self,
-                                            Path,
-                                            PathIndex,
-                                            Node,
-                                            & NodeName,
-                                            & PathCount,
-                                            & IsLast
-                                            );
-    if ( RCt == 0 ) {
-        if ( IsLast ) {
-            RCt = XFSNodeAddRef ( self );
-
-            * Node = self;
-
-            return RCt;
-        }
-
-        RootNode = ( struct XFSTarRootNode * ) self;
-        if ( RootNode -> tar == NULL ) {
-            return XFS_RC ( rcInvalid );
-        }
-
-        RCt = XFSPathFrom ( Path, PathIndex + 1, & xPath );
-        if ( RCt == 0 ) {
-            RCt = XFSTarGetEntry (
-                                RootNode -> tar,
-                                XFSPathGet ( xPath ),
-                                & Entry
-                                );
-            if ( RCt == 0 ) {
-                RCt = XFSTarNodeMake (
-                                    & RetNode,
-                                    XFSPathName ( Path ),/* NodeName, */
-                                    Entry
-                                    );
-                if ( RCt == 0 ) {
-                    * Node = RetNode;
-                }
-            }
-
-            XFSPathRelease ( xPath );
-        }
-    }
-
-    return RCt;
-}   /* _TarNodeFindNode () */
-
-/*)))
- |||
- +++  Unified DirEditor
- |||
-(((*/
-static
-rc_t CC
-_TarDir_dispose_v1 ( const struct XFSEditor * self )
-{
-    struct XFSDirEditor * Editor = ( struct XFSDirEditor * ) self;
-/*
-    pLogMsg ( klogDebug, "_TarDir_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( Editor != NULL ) {
-        free ( Editor );
-    }
-
-    return 0;
-}   /* _TarDir_dispose_v1 () */
-
-static
-rc_t CC
-_TarDir_list_v1 (
-                const struct XFSDirEditor * self,
-                const struct KNamelist ** List
-)
-{
-    rc_t RCt;
-    const struct XFSTarNode * Node;
-    struct KNamelist * TempList;
-
-    RCt = 0;
-    Node = NULL;
-    TempList = NULL;
-
-    if ( List != NULL ) {
-        * List = NULL;
-    }
-
-    if ( self == NULL || List == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Node = ( const struct XFSTarNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFSTarEntryList ( Node -> entry, & TempList );
-    if ( RCt == 0 ) {
-        * List = TempList;
-    }
-
-    return RCt;
-}   /* _TarDir_list_v1 () */
-
-static
-rc_t CC
-_TarDir_find_v1 (
-                const struct XFSDirEditor * self,
-                const char * Name,
-                const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    const struct XFSTarNode * TarNode;
-    struct XFSNode * TempNode;
-    const struct XFSTarEntry * TempEntry;
-
-    RCt = 0;
-    TarNode = NULL;
-    TempNode = NULL;
-    TempEntry = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( self == NULL || Name == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    TarNode = ( const struct XFSTarNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( TarNode == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( TarNode -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFSTarEntryGetChild ( TarNode -> entry, Name, & TempEntry );
-    if ( RCt == 0 ) {
-        RCt = XFSTarNodeMake ( & TempNode, Name, TempEntry );
-        if ( RCt == 0 ) {
-            * Node = TempNode;
-        }
-    }
-
-    return RCt;
-}   /* _TarDir_find_v1 () */
-
-rc_t CC
-_TarNodeDir_v1 (
-            const struct XFSNode * self,
-            const struct XFSDirEditor ** Dir
-)
-{
-    rc_t RCt;
-    struct XFSDirEditor * Editor;
-    const struct XFSTarNode * Node;
-
-    RCt = 0;
-    Editor = NULL;
-    Node = ( const struct XFSTarNode * ) self;
-
-    if ( Dir != NULL ) {
-        * Dir = NULL;
-    }
-
-    if ( self == NULL || Dir == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Node -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( ! XFSTarEntryIsFolder ( Node -> entry ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Editor = calloc ( 1, sizeof ( struct XFSDirEditor ) );
-    if ( Editor == NULL ) { 
-        return XFS_RC ( rcExhausted );
-    }
-
-    memset ( Editor, 0, sizeof ( struct XFSDirEditor ) );
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _TarDir_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> list = _TarDir_list_v1;
-        Editor -> find = _TarDir_find_v1;
-
-        * Dir = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _TarNodeDir_v1 () */
-
-/*)))
- |||
- +++  Unified FileEditor
- |||
-(((*/
-
-static
-rc_t CC
-_TarFile_dispose_v1 ( const struct XFSEditor * self )
-{
-    struct XFSTarFileEditor * Editor = ( struct XFSTarFileEditor * ) self;
-/*
-    pLogMsg ( klogDebug, "_TarNodeFile_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( Editor != NULL ) {
-        if ( Editor -> entry != NULL ) {
-            XFSTarEntryRelease ( Editor -> entry );
-
-            Editor -> entry = NULL;
-        }
-
-        free ( Editor );
-    }
-
-    return 0;
-}   /* _TarFile_dispose_v1 () */
-
-static
-rc_t CC
-_TarFile_open_v1 (
-                    const struct XFSFileEditor * self,
-                    XFSNMode Mode
-)
-{
-    rc_t RCt;
-    const struct XFSTarNode * Node;
-    struct XFSTarFileEditor * Editor;
-
-    RCt = 0;
-    Node = NULL;
-    Editor = ( struct XFSTarFileEditor * ) self;
-
-    if ( Mode != kxfsRead ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Node = ( const struct XFSTarNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Editor = ( struct XFSTarFileEditor * ) self;
-    if ( Editor -> entry == NULL ) {
-        if ( ! XFSTarEntryIsOpen ( Node -> entry ) ) {
-            RCt = XFSTarEntryOpen ( Node -> entry );
-        }
-        if ( RCt == 0 ) {
-            Editor -> entry = Node -> entry;
-        }
-    }
-
-    return RCt;
-}   /* _TarFile_open_v1 () */
-
-static
-rc_t CC
-_TarFile_close_v1 ( const struct XFSFileEditor * self )
-{
-    rc_t RCt;
-    struct XFSTarFileEditor * Editor;
-
-    RCt = 0;
-    Editor = ( struct XFSTarFileEditor * ) self;
-
-    if ( Editor == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-
-    if ( Editor -> entry != NULL ) {
-        RCt = XFSTarEntryClose ( Editor -> entry );
-        if ( RCt == 0 ) {
-            RCt = XFSTarEntryRelease ( Editor -> entry );
-
-            Editor -> entry = NULL;
-        }
-    }
-
-    return RCt;
-}   /* _TarFile_close_v1 () */
-
-static
-rc_t CC
-_TarFile_read_v1 (
-                    const struct XFSFileEditor * self,
-                    uint64_t Offset,
-                    void * Buffer,
-                    size_t SizeToRead,
-                    size_t * NumReaded
-)
-{
-    rc_t RCt;
-    struct XFSTarFileEditor * Editor;
-
-    RCt = 0;
-    Editor = ( struct XFSTarFileEditor * ) self;
-
-    if ( Editor == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-
-    if ( Editor -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFSTarEntryRead (
-                        Editor -> entry,
-                        Offset,
-                        Buffer,
-                        SizeToRead,
-                        NumReaded
-                        );
-
-    return RCt;
-}   /* _TarFile_read_v1 () */
-
-static
-rc_t CC
-_TarFile_size_v1 (
-                        const struct XFSFileEditor * self,
-                        uint64_t * Size
-)
-{
-    rc_t RCt;
-    struct XFSTarNode * Node;
-
-    RCt = 0;
-    Node = NULL;
-
-    XFS_CSA ( Size, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Size )
-
-    Node = ( struct XFSTarNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( XFSTarEntryIsFolder ( Node -> entry ) ) {
-        * Size = 0;
-    }
-    else {
-        RCt = XFSTarEntrySize ( Node -> entry, Size );
-        if ( RCt != 0 ) {
-            * Size = 0;
-        }
-    }
-
-    return RCt;
-}   /* _TarFile_size_v1 () */
-
-rc_t CC
-_TarNodeFile_v1 (
-            const struct XFSNode * self,
-            const struct XFSFileEditor ** File
-)
-{
-    rc_t RCt;
-    struct XFSTarFileEditor * FileEditor;
-    struct XFSFileEditor * Editor;
-
-    RCt = 0;
-    FileEditor = NULL;
-    Editor = NULL;
-
-    if ( File != NULL ) {
-        * File = NULL;
-    }
-
-    if ( self == NULL || File == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    FileEditor = calloc ( 1, sizeof ( struct XFSTarFileEditor ) );
-    if ( FileEditor == NULL ) { 
-        return XFS_RC ( rcExhausted );
-    }
-
-    memset ( FileEditor, 0, sizeof ( struct XFSTarFileEditor ) );
-
-    Editor = & ( FileEditor -> Papahen );
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _TarFile_dispose_v1
-                    );
-
-    if ( RCt == 0 ) {
-        Editor -> open = _TarFile_open_v1;
-        Editor -> close = _TarFile_close_v1;
-        Editor -> read = _TarFile_read_v1;
-        Editor -> size = _TarFile_size_v1;
-
-        * File = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _TarNodeFile_v1 () */
-
-/*)))
- |||
- +++  Unified Attr
- |||
-(((*/
-
-static
-rc_t CC
-_TarAttr_dispose_v1 ( const struct XFSEditor * self )
-{
-/*
-    pLogMsg ( klogDebug, "_TarAttr_dispose_v1 ( $(editor) )", "editor=%p", ( void * ) self );
-*/
-
-    if ( self != NULL ) {
-        free ( ( struct XFSAttrEditor * ) self );
-    }
-
-    return 0;
-}   /* _TarAttr_dispose_v1 () */
-
-static
-rc_t CC
-_TarAttr_init_check_v1 (
-                const struct XFSAttrEditor * self,
-                const struct XFSTarEntry ** Entry
-)
-{
-    struct XFSTarNode * Node = NULL;
-
-    if ( Entry != NULL ) {
-        * Entry = NULL;
-    }
-
-    if ( self == NULL || Entry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Node = ( struct XFSTarNode * ) XFSEditorNode (
-                                                & ( self -> Papahen )
-                                                );
-    if ( Node == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Node -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    * Entry = Node -> entry;
-
-    return 0;
-}   /* _TarAttr_init_check_v1 () */
-
-static
-rc_t CC
-_TarAttr_permissions_v1 (
-                        const struct XFSAttrEditor * self,
-                        const char ** Permissions
-)
-{
-    rc_t RCt;
-    const struct XFSTarEntry * Entry;
-
-    RCt = 0;
-    Entry = NULL;
-
-    if ( Permissions == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Permissions = NULL;
-
-    RCt = _TarAttr_init_check_v1 ( self, & Entry );
-    if ( RCt == 0 ) {
-        * Permissions = XFSTarEntryIsFolder ( Entry )
-                                        ? XFSPermRODefContChar ()
-                                        : XFSPermRODefNodeChar ()
-                                        ;
-    }
-
-    return RCt;
-}   /* _TarAttr_permissions_v1 () */
-
-
-static
-rc_t CC
-_TarAttr_date_v1 (
-                        const struct XFSAttrEditor * self,
-                        KTime_t * Time
-)
-{
-    rc_t RCt;
-    const struct XFSTarEntry * Entry;
-
-    RCt = 0;
-    Entry = NULL;
-
-    if ( Time == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Time = 0;
-
-    RCt = _TarAttr_init_check_v1 ( self, & Entry );
-    if ( RCt == 0 ) {
-        RCt = XFSTarEntryTime ( Entry, Time );
-        if ( RCt != 0 ) {
-            * Time = 0;
-        }
-    }
-
-    return RCt;
-}   /* _TarAttr_date_v1 () */
-
-static
-rc_t CC
-_TarAttr_type_v1 (
-                        const struct XFSAttrEditor * self,
-                        XFSNType * Type
-)
-{
-    rc_t RCt;
-    const struct XFSTarEntry * Entry;
-
-    RCt = 0;
-    Entry = NULL;
-
-    if ( Type == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Type = kxfsNotFound;
-
-    RCt = _TarAttr_init_check_v1 ( self, & Entry );
-    if ( RCt == 0 ) {
-        * Type = XFSTarEntryIsFolder ( Entry ) ? kxfsDir : kxfsFile ;
-    }
-
-    return RCt;
-}   /* _TarAttr_type_v1 () */
-
-static
-rc_t CC
-_TarNodeAttr_v1 (
-            const struct XFSNode * self,
-            const struct XFSAttrEditor ** Attr
-)
-{
-    rc_t RCt;
-    struct XFSAttrEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-
-    if ( self == NULL || Attr == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Attr = NULL;
-
-    Editor = calloc ( 1, sizeof ( struct XFSAttrEditor ) );
-    if ( Editor == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSEditorInit (
-                    & ( Editor -> Papahen ),
-                    self,
-                    _TarAttr_dispose_v1
-                    );
-    if ( RCt == 0 ) {
-        Editor -> permissions = _TarAttr_permissions_v1;
-        Editor -> date = _TarAttr_date_v1;
-        Editor -> type = _TarAttr_type_v1;
-
-        * Attr = Editor;
-    }
-    else {
-        free ( Editor );
-    }
-
-    return RCt;
-}   /* _TarNodeAttr_v1 () */
-
-/*)))
- |||
- +++  Unified Discribe
- |||
-(((*/
-
-rc_t CC
-_TarNodeDescribe_v1 (
-            const struct XFSNode * self,
-            char * Buffer,
-            size_t BufferSize
-)
-{
-    rc_t RCt;
-    size_t NumWrit;
-    const char * Abbr;
-
-    RCt = 0;
-    NumWrit = 0;
-    Abbr = NULL;
-
-    if ( Buffer == NULL || BufferSize == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Abbr = XFSTarEntryIsFolder ( ( ( const struct XFSTarNode * ) self ) -> entry )
-            ? "TAR FOLDER"
-            : "TAR NODE"
-            ;
-
-    if ( self == NULL ) {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[NULL][NULL]",
-                    Abbr
-                    );
-    }
-    else {
-        string_printf (
-                    Buffer,
-                    BufferSize,
-                    & NumWrit,
-                    "NODE (%s)[%s][0x%p]",
-                    Abbr,
-                    self -> Name,
-                    self
-                    );
-    }
-
-    return RCt;
-}   /* _TarNodeDescribe_v1 () */
-
-/*)))
- |||
- +++    FileNode lives here
- |||
-(((*/
-
-/*))
- ((     Node make/dispose
-  ))
- ((*/
-
-/*)))
- |||
- +++    Non-Teleport methods to create nodes
- |||
-(((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* ALL BELOW TODO!!!                                               */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*)))
- |||
- +++    TarRootNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_TarArchiveNodeConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    struct XFSNode * TheNode;
-    const char * NodeName;
-
-    RCt = 0;
-    TheNode = NULL;
-    NodeName = NULL;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Model == NULL || Template == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    NodeName = Alias == NULL ? XFSModelNodeName ( Template ) : Alias;
-
-    RCt = XFSTarRootNodeMake (
-                    & TheNode,
-                    NodeName,
-                    XFSModelNodeProperty ( Template, XFS_MODEL_SOURCE )
-                    );
-    if ( RCt == 0 ) {
-        * Node = ( struct XFSNode * ) TheNode;
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-
-        if ( TheNode != NULL ) {
-            XFSTarRootNodeDispose ( ( const struct XFSTarRootNode * ) TheNode );
-        }
-    }
-
-    return RCt;
-}   /* _TarArchiveNodeConstructor () */
-
-/*)))
- |||
- +++    TarRootNode has a Teleport, and it is HERE
- |||
-(((*/
-static
-rc_t CC
-_TarArchiveConstructor (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-
-    RCt = _TarArchiveNodeConstructor (
-                                        Model,
-                                        Template,
-                                        Alias,
-                                        Node
-                                        );
-
-/*
-pLogMsg ( klogDebug, "_TarArchiveConstructor ( $(node), $(template) (\"$(name)\"), \"$(alias)\" )", "node=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _TarArchiveConstructor () */
-
-static
-rc_t CC
-_TarArchiveValidator (
-            const struct XFSModel * Model,
-            const struct XFSModelNode * Template,
-            const char * Alias,
-            uint32_t Flags
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, "_TarArchiveValidator ( $(node), $(template) (\"$(name)\"), \"$(alias)\" )", "node=%p,template=%p,name=%s,alias=%s", ( void * ) Model, ( void * ) Template, XFSModelNodeName ( Template ), ( Alias == NULL ? "NULL" : Alias ) );
-*/
-
-    return RCt;
-}   /* _TarArchiveValidator () */
-
-static const struct XFSTeleport _sTarArchiveTeleport = {
-                                        _TarArchiveConstructor,
-                                        _TarArchiveValidator,
-                                        false
-                                        };
-
-
-LIB_EXPORT
-rc_t CC
-XFSTarArchiveProvider ( const struct XFSTeleport ** Teleport )
-{
-    if ( Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = & _sTarArchiveTeleport;
-
-    return 0;
-}   /* XFSTarArchiveProvider () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarArchiveNodeMake (
-                struct XFSNode ** Node,
-                const char * Name,
-                const char * Path,
-                const char * Perm
-)
-{
-    rc_t RCt;
-    struct XFSNode * TheNode;
-
-    RCt = 0;
-
-    if ( Node != NULL ) {
-        * Node = NULL;
-    }
-
-    if ( Name == NULL || Path == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull ) ;
-    }
-
-    RCt = XFSTarRootNodeMake ( & TheNode, Name, Path );
-    if ( RCt == 0 ) {
-        * Node = TheNode;
-    }
-    else {
-        if ( TheNode != NULL ) {
-            XFSTarRootNodeDispose ( ( const struct XFSTarRootNode * ) TheNode );
-        }
-    }
-
-    return RCt;
-}   /* XFSTarArchiveNodeMake () */
diff --git a/libs/xfs/teleport.c b/libs/xfs/teleport.c
deleted file mode 100644
index 0c98855..0000000
--- a/libs/xfs/teleport.c
+++ /dev/null
@@ -1,460 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/namelist.h>
-#include <klib/printf.h>
-#include <klib/container.h>
-
-#include "teleport.h"
-#include "zehr.h"
-#include "schwarzschraube.h"
-
-#include <sysalloc.h>
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))
- (((    Place of teleport alive :lol:
-  )))   I will use BSTree to store all teleports, and I will inhitialize
- (((    that tree ond allocate all related structures nce on a programs
-  )))   start, and ... sorry guys, but I am going simple drop that 
- (((    on program exit without deallocation, cuz don't know when and
-  )))   how we should dispose it, but here will be method for it
- (((*/
-
-static BSTree _sTeleport;
-static bool _sTeleportInited = false;
-
-struct _TNode {
-    BSTNode node;
-
-    const char * Type;
-    const struct XFSTeleport * Teleport;
-};
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static
-int64_t
-_TeleportLookupCallback ( const void * Item, const BSTNode * Node )
-{
-    return XFS_StringCompare4BST_ZHR (
-                                ( const char * ) Item,
-                                ( ( struct _TNode * ) Node ) -> Type
-                                );
-}   /* _TeleportLookupCallback () */
-
-static
-const struct _TNode * CC
-_TeleportLookup ( const char * Type )
-{
-    if ( _sTeleportInited == true ) {
-        return ( const struct _TNode * ) BSTreeFind (
-                                        ( struct BSTree * ) & _sTeleport,
-                                        Type,
-                                        _TeleportLookupCallback
-                                        );
-    }
-
-    return NULL;
-}   /* _TeleportLookup () */
-
-static
-bool CC
-_TeleportHas ( const char * Type )
-{
-    return _TeleportLookup ( Type ) != NULL;
-}   /* _TeleportHas () */
-
-static
-int64_t
-_TeleportAddCallback ( const BSTNode * Item, const BSTNode * Node )
-{
-    return XFS_StringCompare4BST_ZHR (
-                                ( ( struct _TNode * ) Item ) -> Type,
-                                ( ( struct _TNode * ) Node ) -> Type
-                                );
-}   /* _TeleportAddCallback () */
-
-static
-rc_t CC
-_TeleportAdd ( const char * Name, XFSTeleportProvider_t Provider )
-{
-    rc_t RCt;
-    struct _TNode * Tde;
-
-    RCt = 0; 
-
-    if ( Name == NULL || Provider == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( _TeleportHas ( Name ) == true ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Tde = calloc ( 1, sizeof ( struct _TNode ) );
-    if ( Tde == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    if ( XFS_StrDup ( Name, & ( Tde -> Type ) ) != 0 ) {
-        free ( Tde );
-
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = Provider ( & Tde -> Teleport );
-
-    if ( RCt != 0 || Tde -> Teleport == NULL ) {
-        free ( ( char * ) Tde -> Type );
-        free ( Tde );
-
-        return XFS_RC ( rcInvalid );
-    }
-
-    BSTreeInsert (
-                ( struct BSTree * ) & _sTeleport,
-                ( struct BSTNode * ) Tde,
-                _TeleportAddCallback
-                );
-
-    return RCt;
-}   /* _TeleportAdd () */
-
-#define CACHE_NAME                  "cache"
-XFS_EXTERN rc_t CC XFSGapCacheProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-#define FILE_NAME                   "file"
-XFS_EXTERN rc_t CC XFSFileProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-#define ENCRYPTED_FILE_NAME         "encrypted-file"
-XFS_EXTERN rc_t CC XFSEncryptedFileProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-#define DIRECTORY_NAME             "directory"
-XFS_EXTERN rc_t CC XFSDirectoryProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-#define README_NAME                "readme"
-XFS_EXTERN rc_t CC XFSReadMeProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-#define KART_KARTS_NAME            "karts"
-XFS_EXTERN rc_t CC XFSGapKartsProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-#define KART_NAME                   "kart"
-XFS_EXTERN rc_t CC XFSGapKartProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-#define KART_FILES_NAME                   "kart-files"
-XFS_EXTERN rc_t CC XFSGapKartFilesProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-#define LINK_NAME                   "link"
-XFS_EXTERN rc_t CC XFSLinkProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-#define LOCAL_REPOSITORY_NAME       "local-repository"
-XFS_EXTERN rc_t CC XFSLocalRepositoryProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-#define REMOTE_REPOSITORY_NAME      "remote-repository"
-XFS_EXTERN rc_t CC XFSRemoteRepositoryProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-/* TODO !!!
-#define REMOTE_FILE_NAME            "remote-file"
-XFS_EXTERN rc_t CC XFSRemoteFileProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-*/
-
-#define WORKSPACE_NAME              "workspace"
-XFS_EXTERN rc_t CC XFSWorkspaceProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-#define SIMPLE_CONTAINER_NAME       "simple-container"
-XFS_EXTERN rc_t CC XFSSimpleContainerProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-#define TAR_ARCHIVE_NAME            "tar-archive"
-XFS_EXTERN rc_t CC XFSTarArchiveProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-#define GAP_PROJECT_NAME            "gap-project"
-XFS_EXTERN rc_t CC XFSGapProjectProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-#define GAP_FILE_NAME               "gap-file"
-XFS_EXTERN rc_t CC XFSGapFileProvider (
-                                const struct XFSTeleport ** Teleport
-                                );
-
-static
-rc_t CC
-_TeleportInit ()
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( _sTeleportInited == true ) {
-        return 0;
-    }
-
-    BSTreeInit ( & _sTeleport );
-    _sTeleportInited = true;
-
-        /* Here we are adding Teleports */
-    do {
-        RCt = _TeleportAdd ( CACHE_NAME, XFSGapCacheProvider );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-        RCt = _TeleportAdd ( FILE_NAME, XFSFileProvider );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-        RCt = _TeleportAdd (
-                        ENCRYPTED_FILE_NAME,
-                        XFSEncryptedFileProvider
-                        );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-        RCt = _TeleportAdd ( DIRECTORY_NAME, XFSDirectoryProvider );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-        RCt = _TeleportAdd ( README_NAME, XFSReadMeProvider );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-        RCt = _TeleportAdd ( KART_KARTS_NAME, XFSGapKartsProvider );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-        RCt = _TeleportAdd ( KART_NAME, XFSGapKartProvider );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-        RCt = _TeleportAdd ( KART_FILES_NAME, XFSGapKartFilesProvider );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-        RCt = _TeleportAdd ( LINK_NAME, XFSLinkProvider );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-        RCt = _TeleportAdd (
-                        LOCAL_REPOSITORY_NAME,
-                        XFSLocalRepositoryProvider
-                        );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-        RCt = _TeleportAdd (
-                        REMOTE_REPOSITORY_NAME,
-                        XFSRemoteRepositoryProvider
-                        );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-        RCt = _TeleportAdd ( WORKSPACE_NAME, XFSWorkspaceProvider );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-        RCt = _TeleportAdd (
-                        SIMPLE_CONTAINER_NAME,
-                        XFSSimpleContainerProvider
-                        );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-        RCt = _TeleportAdd (
-                        TAR_ARCHIVE_NAME,
-                        XFSTarArchiveProvider
-                        );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-        RCt = _TeleportAdd (
-                        GAP_PROJECT_NAME,
-                        XFSGapProjectProvider
-                        );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-        RCt = _TeleportAdd (
-                        GAP_FILE_NAME,
-                        XFSGapFileProvider
-                        );
-        if ( RCt != 0 ) { 
-            break;
-        }
-
-    } while ( false );
-
-    return RCt;
-}   /* _TeleportInit () */
-
-static
-void CC
-_TeleportWhacker ( BSTNode * Node, void * Unused )
-{
-    struct _TNode * Tode;
-
-    Tode = ( struct _TNode * ) Node;
-
-    if ( Tode != NULL ) {
-        if ( Tode -> Type != NULL ) {
-            free ( ( char * ) Tode -> Type );
-
-            Tode -> Type = NULL;
-        }
-
-        if ( Tode -> Teleport != NULL ) {
-            if ( Tode -> Teleport -> DeleteOnWhack ) {
-                free ( ( struct XFSTeleport * ) Tode -> Teleport );
-
-            }
-            Tode -> Teleport = NULL;
-        }
-
-        free ( Tode );
-    }
-}   /* _TeleportWhacker () */
-
-static
-rc_t CC
-_TeleportWhack ()
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( _sTeleportInited != true ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    BSTreeWhack ( & _sTeleport, _TeleportWhacker, NULL );
-
-    _sTeleportInited = false;
-
-    return RCt;
-}   /* _TeleportWhack () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-LIB_EXPORT
-rc_t CC
-XFSTeleportLookup (
-            const char * NodeType,
-            const struct XFSTeleport ** Teleport
-)
-{
-    rc_t RCt;
-    const struct _TNode * tNode;
-
-    RCt = 0;
-    tNode = NULL;
-
-    if ( NodeType == NULL || Teleport == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Teleport = NULL;
-
-    if ( _sTeleportInited == false ) {
-        /* HOHOA, will init it somewhere else
-            RCt = _TeleportInit ();
-         */
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( RCt == 0 ) {
-        tNode = _TeleportLookup ( NodeType );
-        if ( tNode == NULL ) {
-            RCt = XFS_RC ( rcNotFound );
-        }
-        else {
-            * Teleport = tNode -> Teleport;
-        }
-    }
-
-    return RCt;
-}   /* XFSTeleportLookup () */
-
-LIB_EXPORT
-rc_t CC
-XFSTeleportInit ()
-{
-    return _TeleportInit ();
-}   /* XFSTeleportInit () */
-
-LIB_EXPORT
-rc_t CC
-XFSTeleportDispose ()
-{
-    return _TeleportWhack ();
-}   /* XFSTeleportDispose () */
diff --git a/libs/xfs/teleport.h b/libs/xfs/teleport.h
deleted file mode 100644
index c720141..0000000
--- a/libs/xfs/teleport.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _teleport_h_
-#define _teleport_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   This is unlegit file, which is access point to methods
-  ))))  which are needed to construct XFSNode from XFSModelNode
- ((((   Will change it in future, but it is right now that way
-  ))))
- ((((*/
-
-/*))
- //  Forwards
-((*/
-struct XFSTeleport;
-struct XFSModel;
-struct XFSModelNode;
-struct XFSNode;
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))))
- ////   Constructor, and validator. Think that it more than enough
-((((*/
-typedef rc_t ( CC * XFSNodeC_t ) (
-                            const struct XFSModel * Model,
-                            const struct XFSModelNode * Template,
-                            const char * Alias,
-                            const struct XFSNode ** Node
-                            );
-
-typedef rc_t ( CC * XFSNodeV_t ) (
-                            const struct XFSModel * Model,
-                            const struct XFSModelNode * Template,
-                            const char * Alias,
-                            uint32_t Flags
-                            );
-
-typedef rc_t ( CC * XFSTeleportProvider_t ) (
-                            const struct XFSTeleport ** Teleport
-                            );
-
-/*))))
- ((((   Each type of node constructor and volidator by name
-  ))))  Constructor could not be NULL, but Validator could.
- ((((*/
-struct XFSTeleport {
-        /* ??? mb. version */
-    XFSNodeC_t Constructor;
-    XFSNodeV_t Validator;
-
-    bool DeleteOnWhack;
-};
-
-/*))))
- ////   Here we are going... I mean, getting teleport by name
-((((*/
-XFS_EXTERN
-rc_t CC
-XFSTeleportLookup (
-            const char * NodeType,
-            const struct XFSTeleport ** Teleport
-);
-
-/*))))
- ////   Here we are initem'n'disposing Teleport
-((((*/
-XFS_EXTERN rc_t CC XFSTeleportInit ();
-XFS_EXTERN rc_t CC XFSTeleportDispose ();
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _teleport_h_ */
diff --git a/libs/xfs/tree.c b/libs/xfs/tree.c
deleted file mode 100644
index b3aac62..0000000
--- a/libs/xfs/tree.c
+++ /dev/null
@@ -1,717 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/container.h>
-#include <klib/refcount.h>
-#include <klib/namelist.h>
-#include <klib/log.h>
-#include <kproc/lock.h>
-
-#include <xfs/model.h>
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/path.h>
-
-#include "mehr.h"
-#include "zehr.h"
-#include "schwarzschraube.h"
-
-#include <sysalloc.h>
-
-/*)))
- |||
- +++    Tree and all the worst
- |||
-(((*/
-
-/*)))
- |||
- +++    We believe that here could be many trees, so refcounts
- +++    Also, we will not keep model in memory, because it could be
- +++    reloaded from Resource at any time and compared by version
- |||
-(((*/
-struct XFSNode;
-
-struct XFSTree {
-    KRefcount refcount;
-
-        /* Yes, it is pointer for something */
-    struct XFSNode * Root;
-
-    const char * Resource;
-    const char * Version;
-};
-
-/*)
- /      Useful farriables
-(*/
-static const char * _sXFSTree_classname = "XFSTree";
-
-/*)))
- |||
- +++    Verificaion ... does not know yet what is it, but ...
- |||
-(((*/
-
-static
-rc_t CC
-_VerifyTreeModelNode (
-                const struct XFSModel * Model,
-                const struct XFSModelNode * Node,
-                uint32_t Flags
-)
-{
-    rc_t RCt;
-    const char * Prop, * Name;
-    bool DoCheck;
-
-    RCt = 0;
-    Prop = NULL;
-    Name = NULL;
-
-    if ( Model == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    DoCheck = Flags != 0
-            && ( Flags & XFS_CHECK_INTEGRITY ) == XFS_CHECK_INTEGRITY;
-
-    if ( DoCheck ) {
-            /* First we should check that name exists and not NULL */
-        Name = XFSModelNodeName ( Node );
-        if ( Name == NULL ) {
-/*
-LogMsg ( klogDebug, "Node name missed" );
-*/
-            return XFS_RC ( rcInvalid );
-        }
-
-            /* checking noode with AS name */
-        Prop = XFSModelNodeAs ( Node );
-        if ( Prop != NULL ) {
-            if ( XFSModelLookupNode ( Model, Prop ) == NULL ) {
-/*
-pLogMsg ( klogDebug, "Node [$(name)] can not stat node with 'AS' name [$(name)]", "name=%s,as=%s", Name, Prop );
-*/
-                return XFS_RC ( rcInvalid );
-            }
-        }
-
-            /* there should not be node with name as property 'label' */
-        Prop = XFSModelNodeLabel ( Node );
-        if ( Prop != NULL ) {
-            /* TODO .... incorrect check, You should check all labels
-                for all modell nodes
-             */ 
-            if ( XFSModelLookupNode ( Model, Prop ) != NULL ) {
-/*
-pLogMsg ( klogDebug, "Node [$(name)] with 'LABEL' [$(label)] already exists", "name=%s,label=%s", Name, Prop );
-*/
-                return XFS_RC ( rcInvalid );
-            }
-        }
-    }
-
-    return RCt;
-}   /* _VerifyTreeModelNoode () */
-
-LIB_EXPORT
-rc_t CC
-XFSTreeVerifyModel ( const struct XFSModel * Model, uint32_t Flags )
-{
-    rc_t RCt;
-    const struct XFSModelNode * Root;
-    bool DoCheck;
-
-    RCt = 0;
-    Root = NULL;
-
-    if ( Model == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    DoCheck = Flags != 0
-            && ( Flags & XFS_CHECK_INTEGRITY ) == XFS_CHECK_INTEGRITY;
-
-    if ( DoCheck ) {
-        Root = XFSModelRootNode ( Model );
-        if ( Root == NULL ) {
-            return XFS_RC ( rcInvalid );
-        }
-
-        RCt = _VerifyTreeModelNode ( Model, Root, Flags );
-    }
-
-    return RCt;
-}   /* XFSTreeVerifyModel () */
-
-LIB_EXPORT
-rc_t CC
-XFSTreeMake ( const struct XFSModel * Model, struct XFSTree ** Tree )
-{
-    rc_t RCt;
-    struct XFSTree * tTree;
-
-    RCt = 0;
-
-    if ( Model == NULL || Tree == NULL ) { 
-        return XFS_RC ( rcNull );
-    }
-
-    * Tree = NULL;
-
-        /* Creating a tree */
-    tTree = calloc ( 1, sizeof ( struct XFSTree ) );
-/*
-pLogMsg ( klogDebug, " |<- TreeMake ( $(tree) )", "tree=%p", ( void * ) tTree );
-*/
-    if ( tTree == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    if ( XFS_StrDup (
-                    XFSModelResource ( Model ),
-                    & ( tTree -> Resource )
-                    ) != 0
-    ) {
-        XFSTreeDispose ( tTree );
-        return XFS_RC ( rcExhausted );
-    }
-
-    if ( XFSModelVersion ( Model ) != NULL ) {
-        if ( XFS_StrDup (
-                        XFSModelVersion ( Model ),
-                        & ( tTree -> Version ) ) != 0
-        ) {
-            XFSTreeDispose ( tTree );
-            return XFS_RC ( rcExhausted );
-        }
-    }
-    else {
-        tTree -> Version = NULL;
-    }
-
-    RCt = XFSNodeMake (
-                    Model,
-                    XFSModelNodeName ( XFSModelRootNode ( Model ) ),
-                    NULL,
-                    ( const struct XFSNode ** ) & ( tTree -> Root )
-                    );
-    if ( RCt == 0 ) {
-        KRefcountInit (
-                        & ( tTree -> refcount ),
-                        1,
-                        _sXFSTree_classname,
-                        "XFSTreeMake",
-                        "Tree"
-                        );
-    }
-
-    if ( RCt == 0 ) {
-        * Tree = tTree;
-    }
-    else {
-        XFSTreeDispose ( tTree );
-
-        tTree = NULL;
-    }
-
-/*
-pLogMsg ( klogDebug, " ->| TreeMake ( $(tree) )", "tree=%p", ( void * ) * Tree );
-*/
-
-    return RCt;
-}   /* XFSTreeMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSTreeDispose ( struct XFSTree * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-/*
-pLogMsg ( klogDebug, " |<- TreeDispose ( $(tree) )", "tree=%p", ( void * ) self );
-*/
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> Root != NULL ) {
-        XFSNodeRelease ( self -> Root );
-
-        self -> Root = NULL;
-    }
-
-    if ( self -> Resource != NULL ) {
-        free ( ( char * ) self -> Resource );
-
-        self -> Resource = NULL;
-    }
-
-    if ( self -> Version != NULL ) {
-        free ( ( char * ) self -> Version );
-
-        self -> Version = NULL;
-    }
-
-    KRefcountWhack ( & ( self -> refcount ), _sXFSTree_classname );
-
-    free ( self );
-
-    return RCt;
-}   /* XFSTreeDispose () */
-
-LIB_EXPORT
-rc_t CC
-XFSTreeAddRef ( const struct XFSTree * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self != NULL ) {
-        switch ( KRefcountAdd (
-                    & ( self -> refcount ),
-                    _sXFSTree_classname
-                    )
-        ) {
-            case krefOkay :
-                RCt = 0;
-                break;
-            case krefZero :
-            case krefLimit :
-            case krefNegative :
-                RCt = XFS_RC ( rcInvalid );
-                break;
-            default :
-                RCt = XFS_RC ( rcUnknown );
-                break;
-        }
-    }
-    else {
-        RCt = XFS_RC ( rcNull );
-    }
-
-    return RCt;
-}   /* XFSTreeAddRef () */
-
-LIB_EXPORT
-rc_t CC
-XFSTreeRelease ( const struct XFSTree * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-    if ( self != NULL ) {
-        switch ( KRefcountDrop (
-                        & ( self -> refcount ),
-                        _sXFSTree_classname
-                        )
-        ) {
-            case krefOkay :
-            case krefZero :
-                RCt = 0;
-                break;
-            case krefWhack :
-                RCt = XFSTreeDispose ( ( struct XFSTree * ) self );
-                break;
-            case krefNegative :
-                RCt = XFS_RC ( rcInvalid );
-                break;
-            default :
-                RCt = XFS_RC ( rcUnknown );
-                break;
-        }
-    }
-
-    return RCt;
-}   /* XFSTreeRelease () */
-
-LIB_EXPORT
-rc_t CC
-XFSTreeFindNode (
-                const struct XFSTree * self,
-                const char * Path,
-                const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    const struct XFSPath * XPath;
-
-    RCt = 0;
-    XPath = NULL;
-
-    if ( self == NULL || Path == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Node = NULL;
-
-    if ( self -> Root == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFSPathMake ( & XPath, true, Path );
-    if ( RCt == 0 ) {
-
-        RCt = XFSNodeFindNode ( self -> Root, XPath, 0, Node );
-        if ( RCt != 0 ) {
-            RCt = XFSNodeNotFoundMake ( XFSPathName ( XPath ), Node );
-        }
-
-        XFSPathRelease ( XPath );
-    }
-
-    return RCt;
-}   /* XFSTreeFindNode () */
-
-XFS_EXTERN
-rc_t CC
-XFSTreeFindNodeForPath (
-                const struct XFSTree * self,
-                const struct VPath * Path,
-                const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    char Buf [ XFS_SIZE_4096 ];
-
-    RCt = 0;
-    * Buf = 0;
-
-    if ( self == NULL || Path == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Node = NULL;
-
-
-    RCt = XFS_ReadVPath_ZHR ( Path, Buf, sizeof ( Buf ) , "" );
-    if ( RCt == 0 ) {
-        RCt = XFSTreeFindNode ( self, Buf, Node );
-    }
-
-    return RCt;
-}   /* XFSTreeFindNodeForPath () */
-
-/*)))
- |||
- +++    Tree Depot and all the worstterrerr
- |||
-(((*/
-
-struct XFSTreeDepot {
-    KLock * mutabor;
-
-    struct XFSTree * Tree;
-};
-
-LIB_EXPORT
-rc_t CC
-XFSTreeDepotMake ( const struct XFSTreeDepot ** Depot )
-{
-    rc_t RCt;
-    struct XFSTreeDepot * TheDepot;
-
-    RCt = 0;
-    TheDepot = NULL;
-
-    if ( Depot == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Depot = NULL;
-
-    TheDepot = calloc ( 1, sizeof ( struct XFSTreeDepot ) );
-    if ( TheDepot == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = KLockMake ( & ( TheDepot -> mutabor ) );
-    if ( RCt == 0 ) {
-        * Depot = TheDepot;
-    }
-    else {
-        free ( TheDepot );
-
-        * Depot = NULL;
-    }
-
-/*
-pLogMsg ( klogDebug, " |<- TreeDepotMake ( $(tree) )", "tree=%p", ( void * ) * Depot );
-*/
-
-    return RCt;
-}   /* XFSTreeDepotMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSTreeDepotDispose ( const struct XFSTreeDepot * self )
-{
-    rc_t RCt;
-    struct XFSTree * Tree;
-    KLock * mutabor;
-
-    RCt = 0;
-    Tree = NULL;
-    mutabor = NULL;
-
-/*
-pLogMsg ( klogDebug, " |<- TreeDepotDispose ( $(tree) )", "tree=%p", ( void * ) self );
-*/
-
-    if ( self == 0 ) {
-        return 0;
-    }
-
-    /* That is not thread safe method :lol: */
-
-    Tree = ( struct XFSTree * ) self -> Tree;
-    mutabor = self -> mutabor;
-
-    free ( ( struct XFSTreeDepot * ) self );
-
-    XFSTreeRelease ( Tree );
-    KLockRelease ( mutabor );
-
-    return RCt;
-}   /* XFSTreeDepotDispose () */
-
-LIB_EXPORT
-rc_t CC
-XFSTreeDepotGet (
-            const struct XFSTreeDepot * self,
-            const struct XFSTree ** Tree
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self == NULL || Tree == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Tree = NULL;
-
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-
-        RCt = XFSTreeAddRef ( self -> Tree );
-        if ( RCt == 0 ) {
-            * Tree = self -> Tree;
-        }
-
-        KLockUnlock ( self -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSTreeDepotGet () */
-
-LIB_EXPORT
-rc_t CC
-XFSTreeDepotSet (
-            const struct XFSTreeDepot * self,
-            const struct XFSTree * Tree
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self == NULL || Tree == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = XFSTreeAddRef ( Tree );
-        if ( RCt == 0 ) {
-            if ( self -> Tree != NULL ) {
-
-                    /*)) I do not check return code here, because we
-                     //  are going to drop that tree anyway.
-                    ((*/
-                XFSTreeRelease ( self -> Tree );
-            }
-
-            ( ( struct XFSTreeDepot * ) self ) -> Tree =
-                                    ( struct XFSTree * ) Tree;
-        }
-
-        KLockUnlock ( self -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSTreeDepotSet () */
-
-LIB_EXPORT
-rc_t CC
-XFSTreeDepotVersion (
-                const struct XFSTreeDepot * self,
-                char * Buffer,
-                size_t BufferSize
-)
-{
-    rc_t RCt;
-    const struct XFSTree * Tree;
-
-    RCt = 0;
-    Tree = NULL;
-
-    if ( self == NULL || Buffer == NULL || BufferSize == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Buffer = 0;
-
-    RCt = XFSTreeDepotGet ( self, & Tree );
-    if ( RCt == 0 ) { 
-        if ( Tree != NULL ) {
-            if ( Tree -> Version != NULL ) {
-                string_copy_measure (
-                                    Buffer,
-                                    BufferSize,
-                                    Tree -> Version
-                                    );
-            }
-
-            XFSTreeRelease ( Tree );
-        }
-        else {
-            RCt = XFS_RC ( rcNotFound );
-        }
-    }
-
-    return RCt;
-}   /* XFSTreeDepotVersion () */
-
-LIB_EXPORT
-rc_t CC
-XFSTreeDepotResource (
-                const struct XFSTreeDepot * self,
-                char * Buffer,
-                size_t BufferSize
-)
-{
-    rc_t RCt;
-    const struct XFSTree * Tree;
-
-    RCt = 0;
-    Tree = NULL;
-
-    if ( self == NULL || Buffer == NULL || BufferSize == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Buffer = 0;
-
-    RCt = XFSTreeDepotGet ( self, & Tree );
-    if ( RCt == 0 ) { 
-        if ( Tree != NULL ) {
-            if ( Tree -> Resource != NULL ) {
-                string_copy_measure (
-                                    Buffer,
-                                    BufferSize,
-                                    Tree -> Resource
-                                    );
-            }
-
-            XFSTreeRelease ( Tree );
-        }
-        else {
-            RCt = XFS_RC ( rcNotFound );
-        }
-    }
-
-    return RCt;
-}   /* XFSTreeDepotResource () */
-
-LIB_EXPORT
-rc_t CC
-XFSTreeDepotFindNode (
-                    const struct XFSTreeDepot * self,
-                    const char * Path,
-                    const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    const struct XFSTree * Tree;
-
-    RCt = 0;
-    Tree = NULL;
-
-    if ( self == NULL || Path == NULL || Node == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Node = NULL;
-
-    RCt = XFSTreeDepotGet ( self, & Tree );
-    if ( RCt == 0 ) { 
-        if ( Tree != NULL ) {
-            RCt = XFSTreeFindNode ( Tree, Path, Node );
-
-            XFSTreeRelease ( Tree );
-        }
-        else {
-            RCt = XFS_RC ( rcNotFound );
-        }
-    }
-
-    return RCt;
-}   /* XFSTreeDepotFindNode () */
-
-LIB_EXPORT
-rc_t CC
-XFSTreeDepotFindNodeForPath (
-                    const struct XFSTreeDepot * self,
-                    const struct VPath * Path,
-                    const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    char Buf [ XFS_SIZE_4096 ];
-
-    RCt = 0;
-
-    if ( self == NULL || Path == NULL || Node == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-    * Node = NULL;
-
-    RCt = XFS_ReadVPath_ZHR ( Path, Buf, sizeof ( Buf ) , "" );
-    if ( RCt == 0 ) {
-        RCt = XFSTreeDepotFindNode ( self, Buf, Node );
-    }
-
-    return RCt;
-}   /* XFSTreeDepotFindNodeForPath () */
-
diff --git a/libs/xfs/unix/operations.c b/libs/xfs/unix/operations.c
deleted file mode 100644
index 9391300..0000000
--- a/libs/xfs/unix/operations.c
+++ /dev/null
@@ -1,2150 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
- /* Something unusual: Lyrics
-  *
-  * That file contains only one useful function:
-  *
-  *                       XFS_Private_InitOperations
-  *
-  * it needed to fill fuse_operations structure.
-  *
-  * I put here all possible ( for 2.5 ) stubs to fuse_operations
-  * functions. However, I will use only several of them while 
-  * structure initialisation. So, if You want to extend functionality,
-  * please edit already ready stub and add new function to structure
-  * initialized .
-  *
-  */
-
-#include <klib/out.h>
-#include <klib/namelist.h>
-#include <klib/refcount.h>
-#include <klib/defs.h>
-#include <klib/log.h>
-#include <vfs/path.h>
-#include <vfs/manager.h>
-
-
-#include <xfs/tree.h>
-#include <xfs/node.h>
-#include <xfs/handle.h>
-#include <xfs/editors.h>
-#include <xfs/perm.h>
-#include <xfs/path.h>
-
-#include "schwarzschraube.h"
-
-#include <sysalloc.h>
-#include <string.h> /* we are using memset() */
-#include <dirent.h>
-#include <unistd.h>
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/statvfs.h>
-
-#include "operations.h"
-
-
-/****************************************************************
- * Something weird, but it could simplify somebody's life
- *
- *      FUSE method            Use/Not  Implemented  Comment
- ****************************************************************/
-#define USE_XFS_FUSE_GETATTR      1     /* + */
-#define USE_XFS_FUSE_READLINK     0     /* - */ /* ? */
-#define USE_XFS_FUSE_GETDIR       0     /* - */ /* Obsolete method */
-#define USE_XFS_FUSE_MKNOD        0     /* - */ /* Do not need */
-#define USE_XFS_FUSE_MKDIR        1     /* + */
-#define USE_XFS_FUSE_UNLINK       1     /* + */
-#define USE_XFS_FUSE_RMDIR        1     /* + */
-#define USE_XFS_FUSE_SYMLINK      0     /* - */ /* ? */
-#define USE_XFS_FUSE_RENAME       1     /* + */
-#define USE_XFS_FUSE_LINK         0     /* - */ /* ? */
-#define USE_XFS_FUSE_CHMOD        1     /* - */ /* ? */
-#define USE_XFS_FUSE_CHOWN        0     /* - */ /* Do not need */
-#define USE_XFS_FUSE_TRUNCATE     1     /* + */
-#define USE_XFS_FUSE_UTIME        1     /* + */
-#define USE_XFS_FUSE_OPEN         1     /* + */
-#define USE_XFS_FUSE_READ         1     /* + */
-#define USE_XFS_FUSE_WRITE        1     /* + */
-#define USE_XFS_FUSE_STATFS       0     /* - */ /* ? */
-#define USE_XFS_FUSE_FLUSH        0     /* - */ /* Dummy ... ? */
-#define USE_XFS_FUSE_RELEASE      1     /* + */
-#define USE_XFS_FUSE_FSYNC        1     /* + */ /* ? */
-#define USE_XFS_FUSE_SETXATTR     0     /* - */ /* Do not need */
-#define USE_XFS_FUSE_GETXATTR     0     /* - */ /* Do not need */
-#define USE_XFS_FUSE_LISTXATTR    0     /* - */ /* Do not need */
-#define USE_XFS_FUSE_REMOVEXATTR  0     /* - */ /* Do not need */
-#define USE_XFS_FUSE_OPENDIR      1     /* + */
-#define USE_XFS_FUSE_READDIR      1     /* + */
-#define USE_XFS_FUSE_RELEASEDIR   1     /* + */
-#define USE_XFS_FUSE_FSYNCDIR     0     /* - */ /* ? */
-#define USE_XFS_FUSE_INIT         1     /* + */ /* Dummy ??? */
-#define USE_XFS_FUSE_DESTROY      1     /* + */ /* Dummy ??? */
-#define USE_XFS_FUSE_ACCESS       1     /* + */
-#define USE_XFS_FUSE_CREATE       1     /* + */
-#define USE_XFS_FUSE_FTRUNCATE    1     /* + */ /* ? */
-#define USE_XFS_FUSE_FGETATTR     1     /* + */
-#define USE_XFS_FUSE_LOCK         0     /* - */ /* Do not need */
-#define USE_XFS_FUSE_UTIMENS      0     /* - */ /* Do not need */
-#define USE_XFS_FUSE_BMAP         0     /* - */ /* Do not need */
-#define USE_XFS_FUSE_IOCTL        0     /* - */ /* Do not need */
-#define USE_XFS_FUSE_POLL         0     /* - */ /* Do not need */
-
-
-/*****************************************************
- * Something unusual
- * NOTE: that procedure is getting presetted peer from
- *       fuse_context structure and context is valid
- *       only while operation call. So, do not use that
- *       method withoud being harmed
- *****************************************************/
-static
-rc_t
-_FUSE_tree_depot ( const struct XFSTreeDepot ** Depot )
-{
-    struct fuse_context * TheContext = NULL;
-
-    XFS_CSAN ( Depot )
-    XFS_CAN ( Depot )
-
-    TheContext = fuse_get_context();
-    if ( TheContext == NULL ) {
-        LogErr (
-                klogErr,
-                XFS_RC ( rcNull ),
-                "ERROR: improper usage of 'fuse_get_context()'"
-                );
-        return XFS_RC ( rcNull );
-    }
-
-    * Depot = ( const struct XFSTreeDepot * ) TheContext -> private_data;
-    XFS_CAN ( * Depot )
-
-    return 0;
-}   /* _FUSE_tree_depot () */
-
-static
-rc_t
-_FUSE_make_v_path (
-                const char * ThePath,
-                const struct VPath ** DasPath
-)
-{
-    rc_t RCt;
-    struct VPath * Pth;
-
-    RCt = 0;
-    Pth = NULL;
-
-    XFS_CSAN ( DasPath )
-    XFS_CAN ( ThePath )
-    XFS_CAN ( DasPath )
-
-    RCt = VFSManagerMakePath ( XFS_VfsManager (), & Pth, ThePath );
-    if ( RCt == 0 ) {
-        * DasPath = Pth;
-    }
-
-    return RCt;
-}   /* _FUSE_make_v_path () */
-
-static
-rc_t 
-_FUSE_get_node (
-                const struct VPath * Path,
-                const struct XFSNode ** Node
-)
-{
-    rc_t RCt;
-    const struct XFSTreeDepot * Depot;
-    const struct XFSNode * TheNode;
-
-    RCt = 0;
-    Depot = NULL;
-    TheNode = NULL;
-
-    XFS_CSAN ( Node )
-    XFS_CAN ( Path )
-    XFS_CAN ( Node )
-
-    RCt = _FUSE_tree_depot ( & Depot );
-    if ( RCt == 0 ) {
-        if ( Depot == NULL ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-            RCt = XFSTreeDepotFindNodeForPath (
-                                            Depot,
-                                            Path,
-                                            & TheNode
-                                            );
-            if ( RCt == 0 ) {
-                * Node = TheNode;
-            }
-        }
-    }
-
-    return RCt;
-}   /* _FUSE_get_node () */
-
-static
-rc_t
-_FUSE_get_path_and_node (
-                    const char * ThePath,
-                    const struct VPath ** DasPath,
-                    const struct XFSNode ** Node,
-                    XFSNType * NodeType
-)
-{
-    rc_t RCt;
-    const struct XFSNode * RNode;
-    const struct VPath * RPath;
-    XFSNType Type;
-    const struct XFSAttrEditor * Editor;
-
-    RCt = 0;
-    RNode = NULL;
-    RPath = NULL;
-    Type = kxfsNotFound;
-    Editor = NULL;
-
-    XFS_CSAN ( DasPath )
-    XFS_CSAN ( Node )
-    XFS_CAN ( ThePath )
-
-    RCt = _FUSE_make_v_path ( ThePath, & RPath );
-    if ( RCt == 0 ) {
-
-        RCt = _FUSE_get_node ( RPath, & RNode );
-        if ( RCt == 0 ) {
-            if ( NodeType != NULL ) {
-                RCt = XFSNodeAttrEditor ( RNode, & Editor );
-                if ( RCt == 0 ) {
-                    RCt = XFSAttrEditorType ( Editor, & Type );
-
-                    XFSEditorDispose ( & ( Editor -> Papahen ) );
-                }
-            }
-        }
-    }
-
-    if ( RCt == 0 ) {
-        if ( DasPath != NULL ) {
-            * DasPath = RPath;
-        }
-        else {
-            VPathRelease ( RPath );
-        }
-
-        if ( Node != NULL ) {
-            * Node = RNode;
-        }
-        else {
-            XFSNodeRelease ( RNode );
-        }
-
-        if ( NodeType != NULL ) {
-            * NodeType = Type;
-        }
-    }
-    else {
-        if ( RPath != NULL ) {
-            VPathRelease ( RPath );
-        }
-
-        if ( RNode != NULL ) {
-            XFSNodeRelease ( RNode );
-        }
-    }
-
-    return RCt;
-}   /* _FUSE_get_path_and_node () */
-
-static
-rc_t
-_FUSE_get_parent_node (
-                    const char * Path,
-                    const struct XFSNode ** Parent,
-                    XFSNType * ParentType,      /* Could be NULL */
-                    char ** ChildName           /* Could be NULL */
-)
-{
-    rc_t RCt;
-    const struct XFSTreeDepot * Depot;
-    const struct XFSPath * xPath;
-    uint32_t xPathQ;
-    const struct XFSNode * xNode;
-    const struct XFSAttrEditor * xEditor;
-    char * xName;
-    const struct XFSPath * xParent;
-
-    RCt = 0;
-    Depot = NULL;
-    xPath = NULL;
-    xPathQ = 0;
-    xNode = NULL;
-    xEditor = NULL;
-    xName = NULL;
-    xParent = NULL;
-
-    XFS_CSAN ( Parent )
-    XFS_CSA ( ParentType, kxfsNotFound )
-    XFS_CSAN ( ChildName )
-    XFS_CAN ( Path )
-    XFS_CAN ( Parent )
-
-        /* TreeDepot is a key */
-    RCt = _FUSE_tree_depot ( & Depot );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-        /* Path to parent node is ... */
-    RCt = XFSPathMake ( & xPath, true, Path );
-    if ( RCt == 0 ) {
-        xPathQ = XFSPathPartCount ( xPath );
-        if ( xPathQ < 2 ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-                /* So, there is a path to parent */
-            RCt = XFSPathParent ( xPath, & xParent );
-            if ( RCt == 0 ) {
-                    /* Looking for node */
-                RCt = XFSTreeDepotFindNode (
-                                            Depot,
-                                            XFSPathGet ( xParent ),
-                                            & xNode
-                                            );
-                if ( RCt == 0 ) {
-                    if ( ParentType != NULL ) {
-                        RCt = XFSNodeAttrEditor ( xNode, & xEditor );
-                        if ( RCt == 0 ) {
-                            RCt = XFSAttrEditorType ( xEditor, ParentType );
-                            XFSEditorDispose ( & ( xEditor -> Papahen ) );
-                        }
-                    }
-
-                    if ( RCt == 0 ) {
-                        if ( ChildName != NULL ) {
-                            RCt = XFS_StrDup (
-                                            XFSPathName ( xPath ),
-                                            ( const char ** ) & xName
-                                            );
-                            if ( RCt == 0 ) {
-                                * ChildName = xName;
-                            }
-                        }
-                    }
-
-                    if ( RCt == 0 ) {
-                        * Parent = xNode;
-                    }
-                }
-
-                XFSPathRelease ( xParent );
-            }
-        }
-
-        XFSPathRelease ( xPath );
-    }
-
-    if ( RCt != 0 ) {
-        * Parent = NULL;
-        if ( ParentType != NULL ) {
-            * ParentType = kxfsNotFound;
-        }
-        if ( ChildName != NULL ) {
-            * ChildName = NULL;
-        }
-        if ( xNode != NULL ) {
-            XFSNodeRelease ( xNode );
-        }
-        if ( xName != NULL ) {
-            free ( xName );
-        }
-    }
-
-    return RCt;
-}   /* _FUSE_get_parent_node () */
-
-static
-rc_t
-_FUSE_delete_file_dir ( const char * Path )
-{
-    rc_t RCt;
-    const struct XFSNode * Parent;
-    char * Child;
-    const struct XFSDirEditor * Editor;
-
-    RCt = 0;
-    Parent = NULL;
-    Child = NULL;
-    Editor = NULL;
-
-    XFS_CAN ( Path )
-
-    RCt = _FUSE_get_parent_node ( Path, & Parent, NULL, & Child );
-    if ( RCt == 0 ) {
-        RCt = XFSNodeDirEditor ( Parent, & Editor );
-        if ( RCt == 0 ) {
-            RCt = XFSDirEditorDelete ( Editor, Child );
-
-            XFSEditorDispose ( & ( Editor -> Papahen ) );
-        }
-
-        XFSNodeRelease ( Parent );
-        free ( Child );
-    }
-
-    return RCt;
-}   /* _FUSE_delete_file_dir () */
-
-/*****************************************************
- * Here are convertors
- *****************************************************/
- /*)
- |*|  Converts permission string to stat mode_t
- (*/
-static
-rc_t
-_FUSE_char_to_perm ( const char * Perm, XFSNType Type, mode_t * Mode )
-{
-    rc_t RCt;
-    uint32_t Temp;
-
-    RCt = 0;
-    Temp = 0;
-
-    XFS_CSA ( Mode, 0 )
-    XFS_CAN ( Mode )
-
-    if ( Perm == NULL ) {
-        Temp = Type == kxfsFile ? 0644 : 0744;
-    }
-    else {
-        RCt = XFSPermToNum ( Perm, & Temp );
-    }
-
-    if ( RCt == 0 ) {
-        switch ( Type ) {
-            case kxfsFile : Temp |= S_IFREG; break;
-            case kxfsDir:   Temp |= S_IFDIR; break;
-            case kxfsLink:  Temp |= S_IFLNK; break;
-            default:        Temp = 0;        break;
-        }
-
-        if ( Temp == 0 ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-            * Mode = Temp;
-        }
-    }
-
-    return RCt;
-}   /* _FUSE_char_to_perm () */
-
-static
-rc_t
-_FUSE_stat_for_node (
-                const struct XFSNode * Node,
-                struct stat * Stat,
-                const struct XFSFileEditor * FileEditor
-)
-{
-    rc_t RCt;
-    XFSNType Type;
-    KTime_t Time;
-    uint64_t Size;
-    const struct XFSAttrEditor * AttrEditor;
-    const char * Perm;
-
-    RCt = 0;
-    Type = kxfsNotFound;
-    Time = 0;
-    Size = 0;
-    AttrEditor = NULL;
-    Perm = NULL;
-
-    XFS_CAN ( Node )
-    XFS_CAN ( Stat )
-
-    RCt = XFSNodeAttrEditor ( Node, & AttrEditor );
-    if ( RCt != 0 || AttrEditor == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    /*) Here we are doing security ... later 
-     /  TODO Stat -> st_mode = SomeAccess
-    (*/
-
-    RCt = XFSAttrEditorType ( AttrEditor, & Type );
-    if ( RCt == 0 ) {
-        Stat -> st_mode = 0;
-        Stat -> st_uid = getuid();
-        Stat -> st_gid = getgid();
-
-        if ( XFSAttrEditorPermissions ( AttrEditor, & Perm ) == 0 ) {
-            _FUSE_char_to_perm ( Perm, Type, & ( Stat -> st_mode ) );
-        }
-
-        if ( XFSAttrEditorDate ( AttrEditor, & Time ) == 0 ) {
-            Stat -> st_atime = Time;
-            Stat -> st_mtime = Time;
-            Stat -> st_ctime = Time;
-        }
-
-        Stat -> st_blksize = XFS_SIZE_4096 * 8;
-        Stat -> st_size = 0;
-        if ( Type != kxfsDir ) {
-            if ( FileEditor != NULL ) {
-                if ( XFSFileEditorSize ( FileEditor, & Size ) == 0 ) {
-                    Stat -> st_size = Size;
-                }
-            }
-            else {
-                if ( XFSNodeFileEditor ( Node, & FileEditor ) == 0 ) {
-                    if ( FileEditor != NULL ) {
-                        if ( XFSFileEditorSize ( FileEditor, & Size ) == 0 ) {
-                            Stat -> st_size = Size;
-                        }
-                        XFSEditorDispose ( & ( FileEditor -> Papahen ) );
-                    }
-                }
-            }
-        }
-    }
-
-    XFSEditorDispose ( & ( AttrEditor -> Papahen ) );
-
-    return RCt;
-}   /* _FUSE_stat_for_node () */
-
-/*
- $  Cache for less :)
- $  Apparently, I can not to interpret all errors correctly, and
- $  I will to the same thing as Anton: return EBADF.
- */
-static
-int
-XFS_FUSE_rc_to_errno ( rc_t RCt )
-{
-    uint32_t Target, Object, State;
-
-    Target = Object = State = 0;
-
-    State = GetRCState ( RCt );
-    if ( State == rcNoErr ) {
-        return 0;
-    }
-
-    Target = GetRCTarget ( RCt );
-    Object = GetRCObject ( RCt );
-
-    if ( State == rcUnknown && Object == rcTransfer ) {
-        return EIO;
-    }
-
-    if ( Target == rcNoTarg && Object == rcNoObj ) {
-        switch ( State ) {
-                    /*  Missed Peer method */
-            case rcUnsupported :    return ENOSYS;
-                    /*  Some of peer parametes was NULL */
-            case rcNull :           return EFAULT;
-                    /*  Something is wrong */
-            case rcUnknown :        return EBADF;
-        }
-
-        return EBADF;
-    }
-
-    if ( Target == rcDirectory ) {
-        switch ( State ) {
-            case rcUnauthorized :   return EACCES;
-            case rcExhausted :      return Object == rcStorage
-                                                        ? ENOSPC
-                                                        : ENOMEM
-                                                        ;
-            case rcNotFound :       return ENOENT;
-            case rcInvalid :
-            case rcIncorrect :      return EINVAL;
-            case rcExcessive :      return Object == rcParam
-                                                        ? EFBIG
-                                                        : ENAMETOOLONG
-                                                        ;
-            case rcExists :         return EEXIST;
-            case rcBusy :           return EBUSY;
-            case rcIncomplete :     return EINTR;
-        }
-
-        return EBADF;
-    }
-
-    if ( Target == rcFile ) {
-        switch ( State ) {
-            case rcExhausted :      return Object == rcStorage
-                                                        ? ENOSPC
-                                                        : ENOMEM
-                                                        ;
-            case rcIncomplete :     return EINTR;
-            case rcExcessive :      return EFBIG;
-            case rcIncorrect :      return EISDIR;
-            case rcReadonly :       return EROFS;
-            case rcInvalid :        return EINVAL;
-        }
-
-        return EBADF;
-    }
-
-    if ( Object == rcMemMap ) {
-        switch ( State ) {
-            case rcNoPerm :         return EACCES;
-            case rcInvalid :        return EBADF;
-            case rcIncomplete :     return EAGAIN;
-            case rcExhausted :      return ENOMEM;
-        }
-
-        return EBADF;
-    }
-
-    return EBADF;
-}   /* XFS_FUSE_rc_to_errno () */
-
-
-/*****************************************************
- * Operations
- *****************************************************/
-
-/*****************************************************/
-#if USE_XFS_FUSE_GETATTR == 1
-
-static
-int
-XFS_FUSE_getattr ( const char * ThePath, struct stat * TheStat )
-{
-    rc_t RCt;
-    const struct XFSNode * Node;
-    XFSNType Type;
-
-    RCt = 0;
-    Node = NULL;
-    Type = kxfsNotFound;
-
-    pLogMsg ( klogDebug, "POLL(!): [$(path)]", "path=%s", ThePath );
-    pLogMsg ( klogDebug, "GETATTR(Fuse): [$(path)]", "path=%s", ThePath );
-
-    if ( ThePath == NULL || TheStat == NULL ) {
-        return EINVAL * - 1;
-    }
-    memset ( TheStat, 0, sizeof ( struct stat ) );
-
-    RCt = _FUSE_get_path_and_node ( ThePath, NULL, & Node, & Type );
-    if ( RCt == 0 ) {
-        if ( Type == kxfsNotFound ) {
-            XFSNodeRelease ( Node );
-
-            return ENOENT * - 1;
-        }
-
-        RCt = _FUSE_stat_for_node ( Node, TheStat, NULL );
-
-        XFSNodeRelease ( Node );
-    }
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_getattr() */
-
-#endif /* USE_XFS_FUSE_GETATTR == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_READLINK == 1
-
-static
-int
-XFS_FUSE_readlink (
-            const char * ThePath,
-            char * RetBuf,
-            size_t RetBufSize
-)
-{
-    pLogMsg ( klogDebug, "READLINK(!): [$(path)]", "path=%s", ThePath );
-
-    return -EPERM;
-}   /* XFS_FUSE_readlink() */
-
-#endif /* USE_XFS_FUSE_READLINK == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_GETDIR == 1
-
-static
-int
-XFS_FUSE_getdir (
-            const char * ThePath,
-            fuse_dirh_t TheFDH,
-            fuse_dirfil_t TheFDF
-)
-{
-    pLogMsg ( klogDebug, "GETDIR(!): [$(path)]", "path=%s", ThePath );
-
-    return -EPERM;
-}   /* XFS_FUSE_getdir() */
-
-#endif /* USE_XFS_FUSE_GETDIR == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_MKNOD == 1
-
-static
-int
-XFS_FUSE_mknod ( const char * ThePath, mode_t TheMode, dev_t TheDev )
-{
-    pLogMsg ( klogDebug, "MKNOD(!): [$(path)]", "path=%s", ThePath );
-
-    return -EPERM;
-}   /* XFS_FUSE_mknod() */
-
-#endif /* USE_XFS_FUSE_MKNOD == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_MKDIR == 1
-
-static
-int
-XFS_FUSE_mkdir ( const char * ThePath, mode_t TheMode )
-{
-    rc_t RCt;
-    const struct XFSNode * Parent;
-    char * Child;
-    const struct XFSDirEditor * Editor;
-
-    RCt = 0;
-    Parent = NULL;
-    Child = NULL;
-    Editor = NULL;
-
-    pLogMsg ( klogDebug, "MKDIR(Fuse): [$(path)] MD[$(mode)]", "path=%s,mode=%d", ThePath, TheMode );
-
-    if ( ThePath == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    RCt = _FUSE_get_parent_node ( ThePath, & Parent, NULL, & Child );
-    if ( RCt == 0 ) {
-        RCt = XFSNodeDirEditor ( Parent, & Editor );
-        if ( RCt == 0 ) {
-            RCt = XFSDirEditorCreateDir ( Editor, Child );
-
-            XFSEditorDispose ( & ( Editor -> Papahen ) );
-        }
-
-        XFSNodeRelease ( Parent );
-        free ( Child );
-    }
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_mkdir() */
-
-#endif /* USE_XFS_FUSE_MKDIR == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_UNLINK == 1
-
-static
-int
-XFS_FUSE_unlink ( const char * ThePath )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    pLogMsg ( klogDebug, "UNLINK(Fuse): [$(path)]", "path=%s", ThePath );
-
-    if ( ThePath == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    RCt = _FUSE_delete_file_dir ( ThePath );
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_unlink() */
-
-#endif /* USE_XFS_FUSE_UNLINK == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_RMDIR == 1
-
-static
-int
-XFS_FUSE_rmdir ( const char * ThePath )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    pLogMsg ( klogDebug, "RMDIR(Fuse): [$(path)]", "path=%s", ThePath );
-
-    if ( ThePath == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    RCt = _FUSE_delete_file_dir ( ThePath );
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_rmdir() */
-
-#endif /* USE_XFS_FUSE_RMDIR == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_SYMLINK == 1
-
-static
-int
-XFS_FUSE_symlink ( const char * OldPath, const char * NewPath )
-{
-    pLogMsg ( klogDebug, "SYMLINK(!): [$(path)]", "path=%s", OldPath );
-
-    return -EPERM;
-}   /* XFS_FUSE_symlink() */
-
-#endif /* USE_XFS_FUSE_SYMLINK == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_RENAME == 1
-
-static
-int
-XFS_FUSE_rename ( const char * OldPath, const char * NewPath )
-{
-    rc_t RCt;
-    const struct XFSNode * OldDir, * NewDir;
-    char * OldName, * NewName;
-    const struct XFSDirEditor * Editor;
-
-    RCt = 0;
-    OldDir = NewDir = NULL;
-    OldName = NewName = NULL;
-    Editor = NULL;
-
-
-    pLogMsg ( klogDebug, "RENAME(Fuse): FR[$(from)] TO[$(to)]", "from=%s,to=%s", OldPath, NewPath );
-
-    if ( OldPath == NULL || NewPath == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    RCt = _FUSE_get_parent_node ( OldPath, & OldDir, NULL, & OldName );
-    if ( RCt == 0 ) {
-        RCt = _FUSE_get_parent_node ( NewPath, & NewDir, NULL, & NewName );
-
-        if ( RCt == 0 ) {
-            RCt = XFSNodeDirEditor ( OldDir, & Editor );
-            if ( RCt == 0 ) {
-                RCt = XFSDirEditorMove ( Editor, OldName, NewDir, NewName );
-                XFSEditorDispose ( & ( Editor -> Papahen ) );
-            }
-
-            XFSNodeRelease ( NewDir );
-            free ( NewName );
-        }
-
-        XFSNodeRelease ( OldDir );
-        free ( OldName );
-    }
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_rename() */
-
-#endif /* USE_XFS_FUSE_RENAME == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_LINK == 1
-
-static
-int
-XFS_FUSE_link ( const char * OldPath, const char * NewPath )
-{
-    pLogMsg ( klogDebug, "LINK(!): FR[$(from)] TO[$(to)]", "from=%s,to=%s", OldPath, NewPath );
-
-    return -EPERM;
-}   /* XFS_FUSE_link() */
-
-#endif /* USE_XFS_FUSE_LINK == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_CHMOD == 1
-
-static
-int
-XFS_FUSE_chmod ( const char * ThePath, mode_t TheMode )
-{
-    rc_t RCt;
-    const struct XFSAttrEditor * Editor;
-    const struct XFSNode * Node;
-    char Buf [ 16 ];
-
-    RCt = 0;
-    Editor = NULL;
-    Node = NULL;
-    * Buf = 0;
-
-    pLogMsg ( klogDebug, "CHMOD(Fuse): [$(path)] MD[$(mode)]", "path=%s,mode=%d", ThePath, TheMode );
-
-    if ( ThePath == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    RCt = XFSPermToChar ( TheMode, Buf, sizeof ( Buf ) );
-    if ( RCt == 0 ) {
-        RCt = _FUSE_get_path_and_node ( ThePath, NULL, & Node, NULL );
-        if ( RCt == 0 ) {
-            RCt = XFSNodeAttrEditor ( Node, & Editor );
-            if ( RCt == 0 ) {
-                RCt = XFSAttrEditorSetPermissions ( Editor, Buf );
-            }
-
-            XFSNodeRelease ( Node );
-        }
-    }
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_chmod() */
-
-#endif /* USE_XFS_FUSE_CHMOD == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_CHOWN == 1
-
-static
-int
-XFS_FUSE_chown ( const char * ThePath, uid_t TheUid, gid_t TheDid )
-{
-    pLogMsg ( klogDebug, "CHOWN(!): [$(path)]", "path=%s", ThePath );
-
-    return -EPERM;
-}   /* XFS_FUSE_chown() */
-
-#endif /* USE_XFS_FUSE_CHOWN == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_TRUNCATE == 1
-
-static
-int
-XFS_FUSE_truncate ( const char * ThePath, off_t TheSize )
-{
-    rc_t RCt;
-    const struct XFSFileEditor * Editor;
-    const struct XFSNode * Node;
-
-    RCt = 0;
-    Editor = NULL;
-    Node = NULL;
-
-    pLogMsg ( klogDebug, "TRUNCATE(Fuse): [$(path)] SZ[$(size)]", "path=%s,size=%d", ThePath, TheSize );
-
-    if ( ThePath == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    RCt = _FUSE_get_path_and_node ( ThePath, NULL, & Node, NULL );
-    if ( RCt == 0 ) {
-        RCt = XFSNodeFileEditor ( Node, & Editor );
-        if ( RCt == 0 ) {
-            RCt = XFSFileEditorSetSize ( Editor, TheSize );
-        }
-
-        XFSNodeRelease ( Node );
-    }
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_truncate() */
-
-#endif /* USE_XFS_FUSE_TRUNCATE == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_UTIME == 1
-
-static
-int
-XFS_FUSE_utime ( const char * ThePath, struct utimbuf * TheBuf )
-{
-    rc_t RCt;
-    const struct XFSAttrEditor * Editor;
-    const struct XFSNode * Node;
-
-    RCt = 0;
-    Editor = NULL;
-    Node = NULL;
-
-    pLogMsg ( klogDebug, "TRUNCATE(Fuse): [$(path)] AT[$(actime)] MT[$(modtime)]", "path=%s,actime=%d,modtime=%d", ThePath, TheBuf -> actime, TheBuf -> modtime );
-
-    if ( ThePath == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    RCt = _FUSE_get_path_and_node ( ThePath, NULL, & Node, NULL );
-    if ( RCt == 0 ) {
-        RCt = XFSNodeAttrEditor ( Node, & Editor );
-        if ( RCt == 0 ) {
-            RCt = XFSAttrEditorSetDate ( Editor, TheBuf -> modtime );
-        }
-
-        XFSNodeRelease ( Node );
-    }
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_utime() */
-
-#endif /* USE_XFS_FUSE_UTIME == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_OPEN == 1
-
-static
-int
-XFS_FUSE_open ( const char * ThePath, struct fuse_file_info * TheInfo )
-{
-    rc_t RCt;
-    const struct XFSNode * Node;
-    XFSNType Type;
-    int Flags;
-    const struct XFSFileEditor * Editor;
-    XFSNMode Mode;
-    const struct XFSHandle * Handle;
-
-    RCt = 0;
-    Node = NULL;
-    Type = kxfsNotFound;
-    Flags = TheInfo == NULL ? 0xbad : TheInfo -> flags;
-    Editor = NULL;
-    Mode = kxfsNone;
-    Handle = NULL;
-
-    pLogMsg ( klogDebug, "OPEN(Fuse): [$(path)] FI[$(info)] FL[$(flags)]", "path=%s,info=%p,flags=%d", ThePath, TheInfo, Flags );
-
-    if ( ThePath == NULL || TheInfo == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    if ( ( Flags & O_RDWR ) == O_RDWR ) {
-        Mode = kxfsReadWrite;
-    }
-    else {
-        if ( ( Flags & O_WRONLY ) == O_WRONLY ) {
-            Mode = kxfsWrite;
-        }
-        else {
-            Mode = kxfsRead;
-        }
-
-    }
-
-    RCt = _FUSE_get_path_and_node ( ThePath, NULL, & Node, & Type );
-    if ( RCt == 0 ) {
-        if ( Type == kxfsNotFound ) {
-            XFSNodeRelease ( Node );
-            return ENOENT * - 1;
-        }
-
-        RCt = XFSNodeFileEditor ( Node, & Editor );
-        if ( RCt == 0 ) {
-            RCt = XFSFileEditorOpen ( Editor, Mode );
-            if ( RCt == 0 ) {
-                RCt = XFSHandleMake ( Node, & Handle );
-                if ( RCt == 0 ) {
-                    XFSHandleSet ( Handle, ( void * ) Editor );
-                    TheInfo -> fh = ( uint64_t ) Handle;
-                }
-            }
-        }
-
-        XFSNodeRelease ( Node );
-    }
-
-    if ( RCt != 0 ) {
-        if ( Editor != NULL ) {
-            XFSEditorDispose ( & ( Editor -> Papahen ) );
-        }
-    }
-
-    pLogMsg ( klogDebug, "OPEN(Fuse,cont): [$(path)] RC[$(rc)] FI[$(info)] FH[$(handle)]", "path=%s,rc=%d,info=%p,handle=%p", ThePath, RCt, TheInfo, Handle );
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_open() */
-
-#endif /* USE_XFS_FUSE_OPEN == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_READ == 1
-
-static
-int
-XFS_FUSE_read (
-            const char * ThePath,
-            char * TheBuf,
-            size_t TheSizeRead,
-            off_t TheOffsetRead,
-            struct fuse_file_info * TheFileInfo
-)
-{
-    rc_t RCt;
-    const struct XFSHandle * Handle;
-    const struct XFSFileEditor * Editor;
-    size_t NumBytesReaded;
-
-    RCt = 0;
-    Editor = NULL;
-    Handle = TheFileInfo == NULL
-                        ? NULL
-                        : ( const struct XFSHandle * ) TheFileInfo -> fh
-                        ;
-    NumBytesReaded = 0;
-
-    pLogMsg ( klogDebug, "READ(Fuse): [$(path)] FI[$(info)] FH[$(handle)] OF[$(off)] SZ[$(size)]", "path=%s,info=%p,handle=%p,off=%d,size=%d", ThePath, TheFileInfo, Handle, TheOffsetRead, TheSizeRead );
-
-    if ( ThePath == NULL || TheBuf == NULL || TheFileInfo == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    if ( Handle == NULL ) {
-        return EBADF * - 1;
-    }
-
-    Editor = ( const struct XFSFileEditor * ) XFSHandleGet ( Handle );
-    if ( Editor == NULL ) {
-        return EBADF * - 1;
-    }
-
-    RCt = XFSFileEditorRead (
-                        Editor,
-                        TheOffsetRead,
-                        TheBuf,
-                        TheSizeRead,
-                        & NumBytesReaded
-                        );
-    pLogMsg ( klogDebug, "READ(Fuse,cont): [$(path)] FI[$(info)] FH[$(handle)] OF[$(off)] SZ[$(size)] RD[$(read)] RC[$(rc)]", "path=%s,info=%p,handle=%p,off=%d,size=%d,read=%d,rc=%d", ThePath, TheFileInfo, Handle, TheOffsetRead, TheSizeRead, NumBytesReaded, RCt );
-
-    return RCt == 0
-                ? NumBytesReaded
-                : ( XFS_FUSE_rc_to_errno ( RCt ) * - 1)
-                ;
-
-}   /* XFS_FUSE_read() */
-
-#endif /* USE_XFS_FUSE_READ == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_WRITE == 1
-
-static
-int
-XFS_FUSE_write (
-            const char * ThePath,
-            const char * TheBuf,
-            size_t TheSizeWrite,
-            off_t TheOffsetWrite,
-            struct fuse_file_info * TheFileInfo
-)
-{
-    rc_t RCt;
-    const struct XFSHandle * Handle;
-    const struct XFSFileEditor * Editor;
-    size_t NumBytesWritten;
-
-    RCt = 0;
-    Editor = NULL;
-    Handle = TheFileInfo == NULL
-                        ? NULL
-                        : ( const struct XFSHandle * ) TheFileInfo -> fh
-                        ;
-    NumBytesWritten = 0;
-
-    pLogMsg ( klogDebug, "WRITE(Fuse): [$(path)] FI[$(info)] FH[$(handle)] OF[$(off)] SZ[$(size)]", "path=%s,info=%p,handle=%p,off=%d,size=%d", ThePath, TheFileInfo, Handle, TheOffsetWrite, TheSizeWrite );
-
-    if ( ThePath == NULL || TheBuf == NULL || TheFileInfo == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    if ( Handle == NULL ) {
-        return EBADF * - 1;
-    }
-
-    Editor = ( const struct XFSFileEditor * ) XFSHandleGet ( Handle );
-    if ( Editor == NULL ) {
-        return EBADF * - 1;
-    }
-
-    RCt = XFSFileEditorWrite (
-                        Editor,
-                        TheOffsetWrite,
-                        TheBuf,
-                        TheSizeWrite,
-                        & NumBytesWritten
-                        );
-
-    pLogMsg ( klogDebug, "WRITE(Fuse,cont): [$(path)] FI[$(info)] FH[$(handle)] OF[$(off)] SZ[$(size)] WR[$(wrote)] RC[$(rc)]", "path=%s,info=%p,handle=%p,off=%d,size=%d,wrote=%d,rc=%d", ThePath, TheFileInfo, Handle, TheOffsetWrite, TheSizeWrite, NumBytesWritten, RCt );
-
-    return RCt == 0
-                ? NumBytesWritten
-                : ( XFS_FUSE_rc_to_errno ( RCt ) * - 1)
-                ;
-}   /* XFS_FUSE_write() */
-
-#endif /* USE_XFS_FUSE_WRITE == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_STATFS == 1
-
-static
-int
-XFS_FUSE_statfs (
-            const char * ThePath,
-            struct statvfs * TheFSStat
-)
-{
-    pLogMsg ( klogDebug, "STATFS(!): [$(path)]", "path=%d", ThePath );
-
-    return -EPERM;
-}   /* XFS_FUSE_statfs() */
-
-#endif /* USE_XFS_FUSE_STATFS == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_FLUSH == 1
-
-static
-int
-XFS_FUSE_flush (
-            const char * ThePath,
-            struct fuse_file_info * TheFileInfo
-)
-{
-    pLogMsg ( klogDebug, "FLUSH(DUMMY): [$(path)] FI[$(info)]", "path=%d,info=%p", ThePath, TheFileInfo );
-
-    return 0;
-}   /* XFS_FUSE_flush() */
-
-#endif /* USE_XFS_FUSE_FLUSH == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_RELEASE == 1
-
-static
-int
-XFS_FUSE_release (
-            const char * ThePath,
-            struct fuse_file_info * TheFileInfo
-)
-{
-    rc_t RCt;
-    const struct XFSHandle * Handle;
-    const struct XFSFileEditor * Editor;
-
-    RCt = 0;
-    Editor = NULL;
-    Handle = TheFileInfo == NULL
-                        ? NULL
-                        : ( const struct XFSHandle * ) TheFileInfo -> fh
-                        ;
-
-    pLogMsg ( klogDebug, "RELEASE(Fuse): [$(path)] FI[$(info)] FH[$(handle)]", "path=%d,info=%p,handle=%p", ThePath, TheFileInfo, Handle );
-
-    if ( ThePath == NULL || TheFileInfo == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    if ( Handle != NULL ) {
-        Editor = ( const struct XFSFileEditor * ) XFSHandleGet ( Handle );
-
-        if ( Editor != NULL ) {
-            XFSFileEditorClose ( Editor );
-            XFSEditorDispose ( & ( Editor -> Papahen ) );
-            XFSHandleSet ( Handle, NULL );
-        }
-
-        XFSHandleRelease ( Handle );
-    }
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_release() */
-
-#endif /* USE_XFS_FUSE_RELEASE == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_FSYNC == 1
-
-static
-int
-XFS_FUSE_fsync (
-            const char * ThePath,
-            int DataSync,
-            struct fuse_file_info * TheFileInfo
-)
-{
-    pLogMsg ( klogDebug, "FSYNC(DUMMY): [$(path)] FI[$(info)] DT[$(data)]", "path=%d,info=%p,data=%p", ThePath, TheFileInfo, DataSync );
-	return 0;
-}   /* XFS_FUSE_fsync() */
-
-#endif /* USE_XFS_FUSE_FSYNC == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_SETXATTR == 1
-
-static
-int
-XFS_FUSE_setxattr (
-            const char * ThePath,
-            const char * TheName,
-            const char * TheValue,
-            size_t TheValueSize,
-            int TheFlags
-)
-{
-    pLogMsg ( klogDebug, "SETXATTR(!): [$(path)]", "path=%d", ThePath );
-
-    return -EPERM;
-}   /* XFS_FUSE_setxattr() */
-
-#endif /* USE_XFS_FUSE_SETXATTR == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_GETXATTR == 1
-
-static
-int
-XFS_FUSE_getxattr (
-            const char * ThePath,
-            const char * TheName,
-            char * TheValue,
-            size_t TheValueSize
-)
-{
-    pLogMsg ( klogDebug, "GETXATTR(!): [$(path)]", "path=%d", ThePath );
-
-    return -EPERM;
-}   /* XFS_FUSE_getxattr() */
-
-#endif /* USE_XFS_FUSE_GETXATTR == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_LISTXATTR == 1
-
-static
-int
-XFS_FUSE_listxattr (
-            const char * ThePath,
-            char * TheList,
-            size_t TheListSize
-)
-{
-    pLogMsg ( klogDebug, "LISTXATTR(!): [$(path)]", "path=%d", ThePath );
-
-    return -EPERM;
-}   /* XFS_FUSE_listxattr() */
-
-#endif /* USE_XFS_FUSE_LISTXATTR == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_REMOVEXATTR == 1
-
-static
-int
-XFS_FUSE_removexattr ( const char * ThePath, const char * TheName)
-{
-    pLogMsg ( klogDebug, "REMOVEXATTR(!): [$(path)]", "path=%d", ThePath );
-
-    return -EPERM;
-}   /* XFS_FUSE_removexattr() */
-
-#endif /* USE_XFS_FUSE_REMOVEXATTR == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_OPENDIR == 1
-
-static
-int
-XFS_FUSE_opendir (
-            const char * ThePath,
-            struct fuse_file_info * TheFileInfo
-)
-{
-    rc_t RCt;
-    const struct XFSNode * Node;
-    const struct XFSHandle * Handle;
-    XFSNType Type;
-
-    RCt = 0;
-    Node = NULL;
-    Handle = NULL;
-    Type = kxfsBadPath;
-
-    if ( ThePath == NULL || TheFileInfo == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    pLogMsg ( klogDebug, "OPENDIR(Fuse): [$(path)] FI[$(info)] FL[$(flags)]", "path=%d,info=%p,flags=%d", ThePath, TheFileInfo, TheFileInfo -> flags );
-
-    RCt = _FUSE_get_path_and_node ( ThePath, NULL, & Node, & Type );
-    if ( RCt == 0 ) {
-        if ( Type != kxfsDir ) {
-            XFSNodeRelease ( Node );
-
-            return ENOENT * - 1;
-        }
-
-        RCt = XFSHandleMake ( Node, & Handle );
-        if ( RCt == 0 ) {
-            TheFileInfo -> fh = ( uint64_t ) Handle;
-        }
-
-        XFSNodeRelease ( Node );
-    }
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_opendir() */
-
-#endif /* USE_XFS_FUSE_OPENDIR == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_READDIR == 1
-
-/*****************************************************************
- * JUST FOR ANY CASE, THAT FUNCTION IS USED IN 'readdir()' TO 
- * FILL BUFFER WITH DIRECTORY INFORMATION
- *
- *      typedef int (*fuse_fill_dir_t) (
- *                  void *buf,
- *                  const char *name,
- *                  const struct stat *stbuf,
- *                  off_t off
- *                  );
- *****************************************************************/
-
-static
-int
-XFS_FUSE_readdir (
-            const char * ThePath,
-            void * TheBuffer,
-            fuse_fill_dir_t TheFiller,
-            off_t TheOffset,
-            struct fuse_file_info * TheFileInfo
-)
-{
-    rc_t RCt;
-    const struct XFSNode * Node;
-    const struct XFSHandle * Handle;
-    const struct XFSDirEditor * Editor;
-    const struct KNamelist * List;
-    uint32_t ListQty, llp;
-    const char * Name;
-
-    RCt = 0;
-    Node = NULL;
-    Handle = NULL;
-    Editor = NULL;
-    List = NULL;
-    ListQty = llp = 0;
-    Name = NULL;
-
-    if ( ThePath == NULL || TheFileInfo == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    Handle = ( const struct XFSHandle * ) TheFileInfo -> fh;
-
-    pLogMsg ( klogDebug, "READDIR(Fuse): [$(path)] FI[$(info)] FH[$(handle)]", "path=%d,info=%p,handle=%p", ThePath, TheFileInfo, ( void * ) Handle );
-
-    if ( Handle != NULL ) {
-        Node = XFSHandleNode ( Handle );
-        if ( Node == NULL ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-            RCt = XFSNodeDirEditor ( Node, & Editor );
-            if ( RCt == 0 ) {
-                if ( Editor == NULL ) {
-                    RCt = XFS_RC ( rcInvalid );
-                }
-                else {
-                    RCt = XFSDirEditorList ( Editor, & List );
-                    if ( RCt == 0 ) {
-                        RCt = KNamelistCount ( List, & ListQty );
-                        if ( RCt == 0 ) {
-                            for ( llp = 0; llp < ListQty; llp ++ ) {
-                                RCt = KNamelistGet ( List, llp, & Name );
-                                if ( RCt == 0 ) { 
-                                    TheFiller (
-                                            TheBuffer,
-                                            Name,
-                                            NULL,
-                                            0
-                                            );
-                                }
-
-                                if ( RCt != 0 ) {
-/* Do we need that? TODO!!!
-                                    break;
-*/
-                                    RCt = 0; /* Right ? */
-                                }
-                            }
-                        }
-
-                        KNamelistRelease ( List );
-                    }
-
-                    XFSEditorDispose ( & ( Editor -> Papahen ) );
-                }
-            }
-            else {
-                RCt = XFS_RC ( rcInvalid );
-            }
-        }
-    }
-    else {
-        RCt = XFS_RC ( rcInvalid );
-    }
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_readdir() */
-
-#endif /* USE_XFS_FUSE_READDIR == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_RELEASEDIR == 1
-
-static
-int
-XFS_FUSE_releasedir (
-            const char * ThePath,
-            struct fuse_file_info * TheFileInfo
-)
-{
-    rc_t RCt;
-    const struct XFSHandle * Handle;
-
-    RCt = 0;
-    Handle = NULL;
-
-    if ( ThePath == NULL || TheFileInfo == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    Handle = ( const struct XFSHandle * ) TheFileInfo -> fh;
-
-    pLogMsg ( klogDebug, "RELEASEDIR(Fuse): [$(path)] FI[$(info)] FH[$(handle)]", "path=%d,info=%p,handle=%p", ThePath, TheFileInfo, ( void * ) Handle );
-
-    if ( Handle != NULL ) {
-        RCt = XFSHandleRelease ( Handle );
-    }
-    else {
-        RCt = XFS_RC ( rcInvalid );
-    }
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_releasedir() */
-
-#endif /* USE_XFS_FUSE_RELEASEDIR == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_FSYNCDIR == 1
-
-static
-int
-XFS_FUSE_fsyncdir (
-            const char * ThePath,
-            int DataSync,
-            struct fuse_file_info * TheFileInfo
-)
-{
-    pLogMsg ( klogDebug, "FSYNCDIR(!): [$(path)]", "path=%d", ThePath );
-
-    return -EPERM;
-}   /* XFS_FUSE_fsyncdir() */
-
-#endif /* USE_XFS_FUSE_FSYNCDIR == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_INIT == 1
-
-static
-void *
-XFS_FUSE_init ( struct fuse_conn_info * TheConnInfo )
-{
-    rc_t RCt;
-    const struct XFSTreeDepot * Depot;
-
-    RCt = 0;
-    Depot = NULL;
-
-    RCt = _FUSE_tree_depot ( & Depot );
-
-    pLogMsg ( klogDebug, "INIT(): TheConnInfo [$(conn)] TreeDepot [$(depot)]\n", "conn=%p,depot=%p", TheConnInfo, Depot );
-
-    return RCt != 0 ? NULL : ( void * ) Depot;
-}   /* XFS_FUSE_init() */
-
-#endif /* USE_XFS_FUSE_INIT == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_DESTROY == 1
-
-static
-void
-XFS_FUSE_destroy ( void * OnoSamoe )
-{
-    pLogMsg ( klogDebug, "DESTROY(Dummy): OnoSamoe [$(samoe)]", "samoe=%p", OnoSamoe );
-
-}   /* XFS_FUSE_destroy() */
-
-#endif /* USE_XFS_FUSE_DESTROY == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_ACCESS == 1
-
-static
-int
-XFS_FUSE_access ( const char * ThePath, int Access )
-{
-    rc_t RCt;
-    const struct XFSAttrEditor * Editor;
-    const struct XFSNode * Node;
-    bool xOK, rOK, wOK, fOK;
-    XFSNType Type;
-    const char * Perm;
-    const struct XFSPerm * xPerm;
-    const struct XFSAuth * Auth;
-
-    RCt = 0;
-    Editor = NULL;
-    Node = NULL;
-    Type = kxfsNotFound;
-    Perm = NULL;
-    xPerm = NULL;
-    Auth = NULL;
-
-    xOK = ( Access & X_OK ) == X_OK; /* Can Execute */
-    wOK = ( Access & W_OK ) == W_OK; /* Can Write */
-    rOK = ( Access & R_OK ) == R_OK; /* Can Read */
-    fOK = ( Access & F_OK ) == F_OK; /* File Exists */
-
-    pLogMsg ( klogDebug, "ACCESS(Fuse): [$(path)] MD[$(mode)] X[$(x)] W[$(w)] R[$(r)] F[$(f)]", "path=%s,mode=%d,x=%d,w=%d,r=%d,f=%d", ThePath, Access, xOK, wOK, rOK, fOK );
-
-    if ( ThePath == NULL ) {
-        return - 1;
-    }
-
-    if ( ! xOK && ! wOK && ! rOK && ! fOK ) {
-        return - 1;
-    }
-
-    RCt = _FUSE_get_path_and_node ( ThePath, NULL, & Node, & Type );
-    if ( RCt == 0 ) {
-            /* Check for fOK */
-        if ( Type == kxfsNotFound ) {
-            RCt = 1;
-        }
-        else {
-            if ( xOK || wOK || rOK ) {
-                RCt = XFSNodeAttrEditor ( Node, & Editor );
-                if ( RCt == 0 ) {
-                    RCt = XFSAttrEditorPermissions ( Editor, & Perm );
-                    if ( RCt == 0 ) {
-                        RCt = XFSPermMake ( Perm, & xPerm );
-                        if ( RCt == 0 ) {
-                            Auth = XFSPermAuth ( xPerm, kxfsUser );
-                            if ( Auth == NULL ) {
-                                RCt = 1;
-                            }
-                            else {
-                                if ( xOK ) {
-                                    RCt = ! XFSAuthCanExecute ( Auth );
-                                }
-                                if ( rOK && RCt == 0 ) {
-                                    RCt = ! XFSAuthCanRead ( Auth );
-                                }
-                                if ( wOK && RCt == 0 ) {
-                                    RCt = ! XFSAuthCanWrite ( Auth );
-                                }
-                            }
-
-                            XFSPermDispose ( xPerm );
-                        }
-                    }
-
-                    XFSEditorDispose ( & ( Editor -> Papahen ) );
-                }
-            }
-        }
-
-        XFSNodeRelease ( Node );
-    }
-
-    return RCt == 0 ? 0 : - 1;
-}   /* XFS_FUSE_access() */
-
-#endif /* USE_XFS_FUSE_ACCESS == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_CREATE == 1
-
-static
-int
-XFS_FUSE_create (
-            const char * ThePath,
-            mode_t TheMode,
-            struct fuse_file_info * TheFileInfo
-)
-{
-    rc_t RCt;
-    uint32_t Flags;
-    const struct XFSNode * Node;
-    const struct XFSDirEditor *Editor;
-    const struct XFSHandle * Handle;
-    char * Child;
-    XFSNMode Mode;
-
-    RCt = 0;
-    Node = NULL;
-    Editor = NULL;
-    Handle = NULL;
-    Child = NULL;
-    Mode = kxfsNone;
-
-    Flags = TheFileInfo -> flags;
-
-    pLogMsg ( klogDebug, "CREATE(Fuse): [$(path)] FI[$(info)] FL[$(flags)] MD[$(mode)]", "path=%s,info=%p,flags=%d,mode=%d", ThePath, TheFileInfo, Flags, TheMode );
-
-    if ( ThePath == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    if ( ( Flags & O_RDWR ) == O_RDWR ) {
-        Mode = kxfsReadWrite;
-    }
-    else {
-        if ( ( Flags & O_WRONLY ) == O_WRONLY ) {
-            Mode = kxfsWrite;
-        }
-        else {
-            Mode = kxfsRead;
-        }
-    }
-
-    RCt = _FUSE_get_parent_node ( ThePath, & Node, NULL, & Child );
-    if ( RCt == 0 ) {
-        RCt = XFSNodeDirEditor ( Node, & Editor );
-        if ( RCt == 0 ) {
-            RCt = XFSDirEditorCreate ( Editor, Child, Mode, & Handle );
-            if ( RCt != 0 ) {
-                XFSEditorDispose ( & ( Editor -> Papahen ) );
-                TheFileInfo -> fh = 0;
-            }
-            else {
-                TheFileInfo -> fh = ( uint64_t ) Handle;
-            }
-        }
-
-        XFSNodeRelease ( Node );
-        free ( Child );
-    }
-
-    pLogMsg ( klogDebug, "CREATE(Fuse,cont): [$(path)] FI[$(info)] FH[$(handle)] MD[$(mode)]", "path=%s,info=%p,handle=%p,mode=%d", ThePath, TheFileInfo, Handle, Mode );
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_create() */
-
-#endif /* USE_XFS_FUSE_CREATE == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_FTRUNCATE == 1
-
-static
-int
-XFS_FUSE_ftruncate (
-            const char * ThePath,
-            off_t TheSize,
-            struct fuse_file_info * TheFileInfo
-)
-{
-    rc_t RCt;
-    const struct XFSHandle * Handle;
-    const struct XFSFileEditor * Editor;
-    const struct XFSNode * Node;
-
-    RCt = 0;
-    Editor = NULL;
-    Handle = TheFileInfo == NULL 
-                        ? NULL
-                        : ( const struct XFSHandle * ) TheFileInfo -> fh
-                        ;
-    Node = NULL;
-
-    pLogMsg ( klogDebug, "FTRUNCATE(Fuse): [$(path)] FI[$(info)] FH[$(hadle)] SZ[$(size)]", "path=%s,info=%p,handle=%p,size=%d", ThePath, TheFileInfo, Handle, TheSize );
-
-    if ( ThePath == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    if ( Handle != NULL ) {
-        Editor = ( const struct XFSFileEditor * )
-                                            XFSHandleGet ( Handle );
-    }
-    else {
-        RCt = _FUSE_get_path_and_node ( ThePath, NULL, & Node, NULL );
-        if ( RCt == 0 ) {
-            RCt = XFSNodeFileEditor ( Node, & Editor );
-
-            XFSNodeRelease ( Node );
-        }
-    }
-
-    if ( RCt == 0 && Editor != NULL ) {
-        RCt = XFSFileEditorSetSize ( Editor, TheSize );
-    }
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_ftruncate() */
-
-#endif /* USE_XFS_FUSE_FTRUNCATE == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_FGETATTR == 1
-
-static
-int
-XFS_FUSE_fgetattr (
-            const char * ThePath,
-            struct stat * TheStat,
-            struct fuse_file_info * TheFileInfo
-)
-{
-    rc_t RCt;
-    const struct XFSHandle * Handle;
-    const struct XFSNode * Node;
-    const struct XFSFileEditor * Editor;
-
-    RCt = 0;
-    Handle = TheFileInfo == NULL
-                        ? NULL
-                        : ( const struct XFSHandle * ) TheFileInfo -> fh
-                        ;
-    Node = NULL;
-    Editor = NULL;
-
-    pLogMsg ( klogDebug, "FGETATTR(Fuse): [$(path)] FI[$(info)] FH[$(hadle)]", "path=%s,info=%p,handle=%p", ThePath, TheFileInfo, Handle );
-
-    if ( ThePath == NULL || TheStat == NULL || TheFileInfo == NULL || Handle == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    memset ( TheStat, 0, sizeof ( struct stat ) );
-
-    Node = XFSHandleNode ( Handle );
-    if ( Node == NULL ) {
-        return EINVAL * - 1;
-    }
-
-    Editor = ( const struct XFSFileEditor * ) XFSHandleGet ( Handle );
-
-    RCt = _FUSE_stat_for_node ( Node, TheStat, Editor );
-
-    return XFS_FUSE_rc_to_errno ( RCt ) * - 1;
-}   /* XFS_FUSE_fgetattr () */
-
-#endif /* USE_XFS_FUSE_FGETATTR == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_LOCK == 1
-
-static
-int
-XFS_FUSE_lock (
-            const char * ThePath,
-            struct fuse_file_info * TheFileInfo,
-            int TheCmd,
-		    struct flock * TheFLock
-)
-{
-    pLogMsg ( klogDebug, "LOCK(!): [$(path)]", "path=%s", ThePath );
-
-    return -EPERM;
-}   /* XFS_FUSE_lock() */
-
-#endif /* USE_XFS_FUSE_LOCK == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_UTIMENS == 1
-
-static
-int
-XFS_FUSE_utimens (
-            const char * ThePath,
-            const struct timespec TheTimespec[2]
-)
-{
-    pLogMsg ( klogDebug, "UTIMENS(!): [$(path)]", "path=%s", ThePath );
-
-    return -EPERM;
-}   /* XFS_FUSE_utimens() */
-
-#endif /* USE_XFS_FUSE_UTIMENS == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_BMAP == 1
-
-static
-int
-XFS_FUSE_bmap (
-            const char * ThePath,
-            size_t TheBlockSize,
-            uint64_t *TheIdx
-)
-{
-    pLogMsg ( klogDebug, "BMAP(!): [$(path)]", "path=%s", ThePath );
-
-    return -EPERM;
-}   /* XFS_FUSE_bmap() */
-
-#endif /* USE_XFS_FUSE_BMAP == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_IOCTL == 1
-
-static
-int
-XFS_FUSE_ioctl (
-            const char * ThePath,
-            int TheCmd,
-            void *TheArg,
-            struct fuse_file_info * TheFileInfo,
-            unsigned int TheFlags,
-            void * TheData
-)
-{
-    pLogMsg ( klogDebug, "IOCTL(!): [$(path)]", "path=%s", ThePath );
-
-    return -EPERM;
-}   /* XFS_FUSE_ioctl() */
-
-#endif /* USE_XFS_FUSE_IOCTL == 1 */
-
-/*****************************************************/
-#if USE_XFS_FUSE_POLL == 1
-
-static
-int
-XFS_FUSE_poll (
-            const char * ThePath,
-            struct fuse_file_info * TheFileInfo,
-            struct fuse_pollhandle * ThePollHandle,
-            unsigned * TheReventsp
-)
-{
-    pLogMsg ( klogDebug, "POLL(!): [$(path)]", "path=%s", ThePath );
-
-    return -EPERM;
-}   /* XFS_FUSE_poll() */
-
-#endif /* USE_XFS_FUSE_POLL == 1 */
-
-/*  Very important method, but very stupid.
- */
-rc_t
-XFS_Private_InitOperations ( struct fuse_operations * Operations )
-{
-    XFS_CAN ( Operations )
-
-    memset ( Operations, 0, sizeof( struct fuse_operations ) );
-
-#if USE_XFS_FUSE_GETATTR == 1
-    Operations -> getattr = XFS_FUSE_getattr;
-#endif /* USE_XFS_FUSE_GETATTR == 1 */
-
-#if USE_XFS_FUSE_READLINK == 1
-    Operations -> readlink = XFS_FUSE_readlink;
-#endif /* USE_XFS_FUSE_READLINK == 1 */
-
-#if USE_XFS_FUSE_GETDIR == 1
-    Operations -> getdir = XFS_FUSE_getdir;
-#endif /* USE_XFS_FUSE_GETDIR == 1 */
-
-#if USE_XFS_FUSE_MKNOD == 1
-    Operations -> mknod = XFS_FUSE_mknod;
-#endif /* USE_XFS_FUSE_MKNOD == 1 */
-
-#if USE_XFS_FUSE_MKDIR == 1
-    Operations -> mkdir = XFS_FUSE_mkdir;
-#endif /* USE_XFS_FUSE_MKDIR == 1 */
-
-#if USE_XFS_FUSE_UNLINK == 1
-    Operations -> unlink = XFS_FUSE_unlink;
-#endif /* USE_XFS_FUSE_UNLINK == 1 */
-
-#if USE_XFS_FUSE_RMDIR == 1
-    Operations -> rmdir = XFS_FUSE_rmdir;
-#endif /* USE_XFS_FUSE_RMDIR == 1 */
-
-#if USE_XFS_FUSE_SYMLINK == 1
-    Operations -> symlink = XFS_FUSE_symlink;
-#endif /* USE_XFS_FUSE_SYMLINK == 1 */
-
-#if USE_XFS_FUSE_RENAME == 1
-    Operations -> rename = XFS_FUSE_rename;
-#endif /* USE_XFS_FUSE_RENAME == 1 */
-
-#if USE_XFS_FUSE_LINK == 1
-    Operations -> link = XFS_FUSE_link;
-#endif /* USE_XFS_FUSE_LINK == 1 */
-
-#if USE_XFS_FUSE_CHMOD == 1
-    Operations -> chmod = XFS_FUSE_chmod;
-#endif /* USE_XFS_FUSE_CHMOD == 1 */
-
-#if USE_XFS_FUSE_CHOWN == 1
-    Operations -> chown = XFS_FUSE_chown;
-#endif /* USE_XFS_FUSE_CHOWN == 1 */
-
-#if USE_XFS_FUSE_TRUNCATE == 1
-    Operations -> truncate = XFS_FUSE_truncate;
-#endif /* USE_XFS_FUSE_TRUNCATE == 1 */
-
-#if USE_XFS_FUSE_UTIME == 1
-    Operations -> utime = XFS_FUSE_utime;
-#endif /* USE_XFS_FUSE_UTIME == 1 */
-
-#if USE_XFS_FUSE_OPEN == 1
-    Operations -> open = XFS_FUSE_open;
-#endif /* USE_XFS_FUSE_OPEN == 1 */
-
-#if USE_XFS_FUSE_READ == 1
-    Operations -> read = XFS_FUSE_read;
-#endif /* USE_XFS_FUSE_READ == 1 */
-
-#if USE_XFS_FUSE_WRITE == 1
-    Operations -> write = XFS_FUSE_write;
-#endif /* USE_XFS_FUSE_WRITE == 1 */
-
-#if USE_XFS_FUSE_STATFS == 1
-    Operations -> statfs = XFS_FUSE_statfs;
-#endif /* USE_XFS_FUSE_STATFS == 1 */
-
-#if USE_XFS_FUSE_FLUSH == 1
-    Operations -> flush = XFS_FUSE_flush;
-#endif /* USE_XFS_FUSE_FLUSH == 1 */
-
-#if USE_XFS_FUSE_RELEASE == 1
-    Operations -> release = XFS_FUSE_release;
-#endif /* USE_XFS_FUSE_RELEASE == 1 */
-
-#if USE_XFS_FUSE_FSYNC == 1
-    Operations -> fsync = XFS_FUSE_fsync;
-#endif /* USE_XFS_FUSE_FSYNC == 1 */
-
-#if USE_XFS_FUSE_SETXATTR == 1
-    Operations -> setxattr = XFS_FUSE_setxattr;
-#endif /* USE_XFS_FUSE_SETXATTR == 1 */
-
-#if USE_XFS_FUSE_GETXATTR == 1
-    Operations -> getxattr = XFS_FUSE_getxattr;
-#endif /* USE_XFS_FUSE_GETXATTR == 1 */
-
-#if USE_XFS_FUSE_LISTXATTR == 1
-    Operations -> listxattr = XFS_FUSE_listxattr;
-#endif /* USE_XFS_FUSE_LISTXATTR == 1 */
-
-#if USE_XFS_FUSE_REMOVEXATTR == 1
-    Operations -> removexattr = XFS_FUSE_removexattr;
-#endif /* USE_XFS_FUSE_REMOVEXATTR == 1 */
-
-#if USE_XFS_FUSE_OPENDIR == 1
-    Operations -> opendir = XFS_FUSE_opendir;
-#endif /* USE_XFS_FUSE_OPENDIR == 1 */
-
-#if USE_XFS_FUSE_READDIR == 1
-    Operations -> readdir = XFS_FUSE_readdir;
-#endif /* USE_XFS_FUSE_READDIR == 1 */
-
-#if USE_XFS_FUSE_RELEASEDIR == 1
-    Operations -> releasedir = XFS_FUSE_releasedir;
-#endif /* USE_XFS_FUSE_RELESEDIR == 1 */
-
-#if USE_XFS_FUSE_FSYNCDIR == 1
-    Operations -> fsyncdir = XFS_FUSE_fsyncdir;
-#endif /* USE_XFS_FUSE_FSYNCDIR == 1 */
-
-#if USE_XFS_FUSE_INIT == 1
-    Operations -> init = XFS_FUSE_init;
-#endif /* USE_XFS_FUSE_INIT == 1 */
-
-#if USE_XFS_FUSE_DESTROY == 1
-    Operations -> destroy = XFS_FUSE_destroy;
-#endif /* USE_XFS_FUSE_DESTROY == 1 */
-
-#if USE_XFS_FUSE_ACCESS == 1
-    Operations -> access = XFS_FUSE_access;
-#endif /* USE_XFS_FUSE_ACCESS == 1 */
-
-#if USE_XFS_FUSE_CREATE == 1
-    Operations -> create = XFS_FUSE_create;
-#endif /* USE_XFS_FUSE_CREATE == 1 */
-
-#if USE_XFS_FUSE_FTRUNCATE == 1
-    Operations -> ftruncate = XFS_FUSE_ftruncate;
-#endif /* USE_XFS_FUSE_FTRUNCATE == 1 */
-
-#if USE_XFS_FUSE_FGETATTR == 1
-    Operations -> fgetattr = XFS_FUSE_fgetattr;
-#endif /* USE_XFS_FUSE_FGETATTR == 1 */
-
-#if USE_XFS_FUSE_LOCK == 1
-    Operations -> lock = XFS_FUSE_lock;
-#endif /* USE_XFS_FUSE_LOCK == 1 */
-
-#if USE_XFS_FUSE_UTIMENS == 1
-    Operations -> utimens = XFS_FUSE_utimens;
-#endif /* USE_XFS_FUSE_UTIMENS == 1 */
-
-#if USE_XFS_FUSE_BMAP == 1
-    Operations -> bmap = XFS_FUSE_bmap;
-#endif /* USE_XFS_FUSE_BMAP == 1 */
-
-#if USE_XFS_FUSE_IOCTL == 1
-    Operations -> ioctl = XFS_FUSE_ioctl;
-#endif /* USE_XFS_FUSE_IOCTL == 1 */
-
-#if USE_XFS_FUSE_POLL == 1
-    Operations -> poll = XFS_FUSE_poll;
-#endif /* USE_XFS_FUSE_POLL == 1 */
-
-    return 0;
-}   /* XFS_Private_InitOperations() */
diff --git a/libs/xfs/unix/operations.h b/libs/xfs/unix/operations.h
deleted file mode 100644
index d909c08..0000000
--- a/libs/xfs/unix/operations.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_xfs_native_peer_operations_
-#define _h_xfs_native_peer_operations_
-
-#include <klib/rc.h>
-
-    /*  We are still working under the version 2.5 because there is
-        port on MAC for that
-     */
-/*  Different fuse_mount implementation
-#define FUSE_USE_VERSION 25
- */
-
-#define FUSE_USE_VERSION 26
-#include <fuse.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-    /*  Here we are going to fill that evis structure
-     */
-rc_t XFS_Private_InitOperations ( struct fuse_operations * Ops );
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _h_xfs_native_peer_operations_ */
diff --git a/libs/xfs/unix/platform.c b/libs/xfs/unix/platform.c
deleted file mode 100644
index facb2f2..0000000
--- a/libs/xfs/unix/platform.c
+++ /dev/null
@@ -1,359 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/log.h>
-#include <kproc/thread.h>
-
-#include <xfs/xfs.h>
-#include <xfs/tree.h>
-#include <xfs/xlog.h>
-#include "xfs-priv.h"
-#include "schwarzschraube.h"
-
-#include <stdlib.h>     /* using malloc() */
-#include <string.h>     /* using memset() */
-#include <unistd.h>     /* using STDOUT_FILENO, STDERR_FILENO */
-
-/*  Some platform dependent headers
- */
-
-#include "operations.h"
-
-#ifndef STDIN_FILENO
-#define STDIN_FILENO    0   /* Standard input.  */
-#define STDOUT_FILENO   1   /* Standard output.  */
-#define STDERR_FILENO   2   /* Standard error output.  */
-#endif /* STDIN_FILENO */
-
-/*
- *  Virtuhai table and it's methods
- */
-static rc_t XFS_FUSE_init_v1 ( struct XFSControl * self );
-static rc_t XFS_FUSE_destroy_v1 ( struct XFSControl * self );
-static rc_t XFS_FUSE_mount_v1 ( struct XFSControl * self );
-static rc_t XFS_FUSE_loop_v1 ( struct XFSControl * self );
-static rc_t XFS_FUSE_unmount_v1 ( struct XFSControl * self);
-
-static struct XFSControl_vt_v1 XFSControl_VT_V1 = {
-    1,
-    1,
-    XFS_FUSE_init_v1,
-    XFS_FUSE_destroy_v1,
-    XFS_FUSE_mount_v1,
-    XFS_FUSE_loop_v1,
-    XFS_FUSE_unmount_v1
-};
-
-static struct fuse_operations TheFuseOperations;
-
-/*  Control init.
- */
-LIB_EXPORT
-rc_t CC
-XFSControlPlatformInit ( struct XFSControl * self )
-{
-    XFS_CAN ( self )
-
-    self -> vt = ( union XFSControl_vt * ) & XFSControl_VT_V1;
-
-    return 0;
-}   /* XFSControlPlatformInit () */
-
-/*  Overloadable versions
- */
-rc_t
-XFS_FUSE_init_v1 ( struct XFSControl * self )
-{
-    rc_t RCt = 0;
-
-    XFS_CAN ( self )
-
-    LogMsg ( klogDebug, "XFS_FUSE_init()\n" );
-
-    if ( self -> Control != NULL ) {
-
-        return XFS_RC ( rcUnexpected );
-    }
-
-    if ( self -> Arguments == NULL ) {
-        LogErr ( klogErr, XFS_RC ( rcUnexpected ), "XFS_FUSE_init(): arguments are empty" );
-        return XFS_RC ( rcUnexpected );
-    }
-
-    return RCt;
-}   /* XFS_FUSE_init_v1 () */
-
-rc_t
-XFS_FUSE_destroy_v1 ( struct XFSControl * self )
-{
-    LogMsg ( klogDebug, "XFS_FUSE_destroy()\n" );
-
-    XFS_CAN ( self )
-
-    return 0;
-}   /* XFS_FUSE_destroy_v1 () */
-
-rc_t
-XFS_FUSE_mount_v1 ( struct XFSControl * self )
-{
-    rc_t RCt;
-
-    struct fuse_args FuseArgs;
-    struct fuse_chan * FuseChannel;
-    struct fuse * FuseStruct;
-    char * MountPoint;
-    const char * LogPath;
-    const char * Label;
-    int Foreground;
-    int Multithreaded;
-    int Result;
-
-    RCt = 0;
-    FuseChannel = NULL;
-    FuseStruct = NULL;
-    MountPoint = NULL;
-    LogPath = NULL;
-    Label = NULL;
-    Foreground = true;
-    Multithreaded = true;
-    Result = 0;
-
-    LogMsg ( klogDebug, "XFS_FUSE_mount()\n" );
-
-    XFS_CAN ( self )
-
-    RCt = XFS_Private_InitOperations ( & TheFuseOperations );
-    if ( RCt != 0 ) {
-        LogErr ( klogErr, XFS_RC ( rcFailed ), "Can not initialize operations" );
-        return XFS_RC ( rcFailed ); 
-    }
-
-    memset ( & FuseArgs, 0, sizeof FuseArgs );
-    Label = XFSControlGetLabel ( self );
-    Result = fuse_opt_add_arg ( & FuseArgs, Label == NULL ? "FUSE" : Label );
-    Result = fuse_opt_add_arg ( & FuseArgs, XFSControlGetMountPoint ( self ) );
-    LogPath = XFSControlGetLogFile ( self );
-
-        /* Foreground */
-    if ( ! XFSControlIsDaemonize ( self ) ) {
-        Result = fuse_opt_add_arg ( & FuseArgs, "-f" );
-    }
-
-#if ! MAC
-/* Options MAC does not know about */
-    Result = fuse_opt_add_arg ( & FuseArgs, "-o" );
-    Result = fuse_opt_add_arg( & FuseArgs, "big_writes" );
-#endif /* MAC */
-
-    if ( Result != 0 ) {
-        LogErr ( klogErr, XFS_RC ( rcFailed ), "Can not mount" );
-        return XFS_RC ( rcFailed ); 
-    }
-
-        /*  Adding the mountpoint
-         */
-    Result = fuse_parse_cmdline (
-                    & FuseArgs,
-                    & MountPoint,
-                    & Multithreaded,
-                    & Foreground
-                );
-    if ( Result != 0 ) {
-        LogErr ( klogErr, XFS_RC ( rcFailed ), "Can not parse arguments" );
-        return XFS_RC ( rcFailed ); 
-    }
-
-pLogMsg ( klogDebug, "MNT[$(mount)] MT[$(multi)] FG[$(fore)]", "mount=%s,multi=%d,fore=%d", MountPoint, Multithreaded, Foreground );
-
-
-    FuseChannel = fuse_mount ( MountPoint, & FuseArgs );
-    if ( FuseChannel == NULL ) {
-        fuse_opt_free_args ( & FuseArgs );
-
-        LogErr ( klogErr, XFS_RC ( rcFailed ), "Can not mount" );
-        return XFS_RC ( rcFailed ); 
-    }
-    self -> ControlAux = FuseChannel;
-
-        /*  Note passing TreeDepot as private data to fuse_context
-         */
-    FuseStruct = fuse_new (
-                        FuseChannel,
-                        & FuseArgs,
-                        & TheFuseOperations,
-                        sizeof ( struct fuse_operations ),
-                        self -> TreeDepot
-                    );
-    if ( FuseStruct == NULL ) {
-        fuse_unmount ( MountPoint, FuseChannel );
-
-        fuse_opt_free_args ( & FuseArgs );
-
-        LogErr ( klogErr, XFS_RC ( rcFailed ), "Can not fuse_new" );
-        return XFS_RC ( rcFailed ); 
-    }
-    self -> Control = FuseStruct;
-
-    Result = fuse_daemonize ( Foreground );
-    if ( Result == -1 ) {
-        fuse_unmount ( MountPoint, FuseChannel );
-
-        fuse_opt_free_args ( & FuseArgs );
-
-        LogErr ( klogErr, XFS_RC ( rcFailed ), "Can not daemonize" );
-        return XFS_RC ( rcFailed ); 
-    }
-
-        /*  Here we are setting the log file
-         */
-    if ( LogPath != NULL ) {
-        RCt = XFSLogInit ( LogPath );
-        if ( RCt != 0 ) {
-            fuse_unmount ( MountPoint, FuseChannel );
-
-            fuse_opt_free_args ( & FuseArgs );
-
-            LogErr ( klogErr, XFS_RC ( rcFailed ), "Can not set log file" );
-            return RCt;
-        }
-    }
-
-    Result = fuse_set_signal_handlers ( fuse_get_session ( FuseStruct ) );
-    if ( Result == -1 ) {
-        fuse_unmount ( MountPoint, FuseChannel );
-
-        fuse_opt_free_args ( & FuseArgs );
-
-        LogErr ( klogErr, XFS_RC ( rcFailed ), "Can not set signal handlers" );
-        return XFS_RC ( rcFailed ); 
-    }
-
-/*
-    if ( Multithreaded != 0 ) {
-        Result = fuse_loop_mt ( FuseStruct );
-    }
-    else {
-        Result = fuse_loop ( FuseStruct );
-    }
-
-    fuse_remove_signal_handlers ( fuse_get_session ( FuseStruct ) );
-*/
-
-
-    fuse_opt_free_args ( & FuseArgs );
-
-    pLogMsg ( klogDebug, " [XFS_FUSE_mount_v1] [$(line)] [$(rc)]", "line=%d,rc=%d", __LINE__, Result );
-
-
-    return Result == 0 ? 0 : XFS_RC ( rcInvalid );
-}   /* XFS_FUSE_mount_v1 () */
-
-rc_t
-XFS_FUSE_loop_v1( struct XFSControl * self )
-{
-    rc_t RCt;
-    struct fuse * FuseStruct;
-    int Result;
-
-    RCt = 0;
-    FuseStruct = NULL;
-    Result = 0;
-
-    LogMsg ( klogDebug, "XFS_FUSE_loop()" );
-
-    if ( self == NULL ) {
-        LogErr ( klogErr, XFS_RC ( rcInvalid ), "XFS_FUSE_loop(): empty control passed" );
-        RCt = 1;
-    }
-    else {
-        FuseStruct = (struct fuse * ) self -> Control;
-
-        Result = fuse_loop_mt ( FuseStruct );
-
-        RCt = Result == 0 ? 0 : 1;
-    }
-
-    return RCt;
-}   /* XFS_FUSE_loop_v1 () */
-
-rc_t
-XFS_FUSE_unmount_v1 ( struct XFSControl * self )
-{
-    struct fuse * FuseStruct = NULL;
-
-    FuseStruct = (struct fuse * ) self -> Control;
-
-    LogMsg ( klogDebug, "XFS_FUSE_unmount()" );
-
-    if ( self -> Control != NULL ) {
-
-#if ! MAC
-        fuse_exit ( FuseStruct );
-#endif /* MAC */
-
-LogMsg ( klogDebug, "|o|fuse_unmount()" );
-        fuse_unmount (
-                    XFSControlGetMountPoint ( self ),
-                    self -> ControlAux
-                    );
-
-LogMsg ( klogDebug, "|o|fuse_remove_signal_handlers()" );
-        fuse_remove_signal_handlers ( fuse_get_session ( FuseStruct ) );
-
-LogMsg ( klogDebug, "|o|fuse_destroy()" );
-        fuse_destroy ( FuseStruct );
-
-        self -> Control = NULL;
-        self -> ControlAux = NULL;
-
-LogMsg ( klogDebug, "|o|exiting fuse()" );
-
-        XFSLogDestroy ( );
-    }
-    else {
-        LogErr ( klogErr, XFS_RC ( rcNull ), "XFS_FUSE_unmount(): empty control passed" );
-    }
-
-    return 0;
-}   /* XFS_FUSE_unmount_v1 () */
-
-/*))    Special platform dependent method
- ((*/
-void fuse_unmount_compat22(const char *mountpoint);
-
-LIB_EXPORT
-rc_t CC
-XFSUnmountAndDestroy ( const char * MountPoint )
-{
-        /*  Unfortunately, that method is standard, but returns nothing
-         *  So no error could be detected
-         */
-    fuse_unmount_compat22 ( MountPoint );
-    return 0;
-}   /* XFSUnmountAndDestroy () */
diff --git a/libs/xfs/unix/security.c b/libs/xfs/unix/security.c
deleted file mode 100644
index 0307413..0000000
--- a/libs/xfs/unix/security.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
-===========================================================================*/
-
diff --git a/libs/xfs/win/operations.c b/libs/xfs/win/operations.c
deleted file mode 100644
index b09bac3..0000000
--- a/libs/xfs/win/operations.c
+++ /dev/null
@@ -1,2666 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
- /* Something unusual: Lyrics
-  *
-  * That file contains only one useful function:
-  *
-  *                       XFS_Private_InitOperations
-  *
-  * it needed to fill _DOKAN_OPERATIONS structure.
-  *
-  * I put here all possible stubs to _DOKAN_OPERATIONS
-  * functions. However, I will use only several of them while 
-  * structure initialisation. So, if You want to extend functionality,
-  * please edit already ready stub and add new function to structure
-  * initialized .
-  *
-  */
-
-#include <windows.h>
-
-#include <klib/out.h>
-#include <klib/log.h>
-#include <klib/namelist.h>
-#include <kfs/file.h>
-#include <kfs/directory.h>
-#include <kfs/impl.h>               /* KDirectoryGetSysDir() */
-#include <vfs/path.h>
-#include <vfs/manager.h>
-
-#include <xfs/node.h>
-#include <xfs/tree.h>
-#include <xfs/editors.h>
-#include <xfs/handle.h>
-#include <xfs/perm.h>
-#include <xfs/path.h>
-
-#include <sysalloc.h>
-
-#include <WinBase.h>
-#include <WinNT.h>
-#include <wchar.h>
-
-#include "operations.h"
-#include "zehr.h"
-#include "schwarzschraube.h"
-
-/****************************************************************
- * Song over babalula
- ****************************************************************/
-#define USE_XFS_DOKAN_CREATEFILE              1   /* - */  /* */
-#define USE_XFS_DOKAN_OPENDIRECTORY           1   /* - */  /* */
-#define USE_XFS_DOKAN_CREATEDIRECTORY         1   /* - */  /* */
-#define USE_XFS_DOKAN_CLEANUP                 1   /* - */  /* */
-#define USE_XFS_DOKAN_CLOSEFILE               1   /* - */  /* */
-#define USE_XFS_DOKAN_READFILE                1   /* - */  /* */
-#define USE_XFS_DOKAN_WRITEFILE               1   /* - */  /* */
-#define USE_XFS_DOKAN_FLUSHFILEBUFFERS        0   /* - */  /* */
-#define USE_XFS_DOKAN_GETFILEINFORMATION      1   /* - */  /* */
-#define USE_XFS_DOKAN_FINDFILES               1   /* - */  /* */
-#define USE_XFS_DOKAN_FINDFILESWITHPATTERN    0   /* - */  /* NO NEED */
-#define USE_XFS_DOKAN_SETFILEATTRIBUTES       0   /* - */  /* */
-#define USE_XFS_DOKAN_SETFILETIME             0   /* - */  /* */
-#define USE_XFS_DOKAN_DELETEFILE              1   /* - */  /* */
-#define USE_XFS_DOKAN_DELETEDIRECTORY         1   /* - */  /* */
-#define USE_XFS_DOKAN_MOVEFILE                1   /* - */  /* */
-#define USE_XFS_DOKAN_SETENDOFFILE            0   /* - */  /* */
-#define USE_XFS_DOKAN_SETALLOCATIONSIZE       0   /* - */  /* */
-#define USE_XFS_DOKAN_LOCKFILE                0   /* - */  /* */
-#define USE_XFS_DOKAN_UNLOCKFILE              0   /* - */  /* */
-#define USE_XFS_DOKAN_GETDISKFREESPACE        0   /* - */  /* NO NEED */
-#define USE_XFS_DOKAN_GETVOLUMEINFORMATION    1   /* - */  /* */
-#define USE_XFS_DOKAN_UNMOUNT                 1   /* - */  /* */
-#define USE_XFS_DOKAN_GETFILESECURITY         1   /* - */  /* */
-#define USE_XFS_DOKAN_SETFILESECURITY         1   /* - */  /* */
-
-/*)))
-  |||   Operations
-  (((*/
-
-/*))
- //
-|| is using _DOKAN_OPTIONS structure for that goal. So, there
-|| is different way to access for XFSPeer for both libraries
- \\
-  (*/
-
-/*))    KLog does not work with WCHAR :D
- ((*/
-XFS_EXTERN rc_t CC wLogMsg ( KLogLevel Level, LPCWSTR Format, ... );
-
-/*\
-|*| importante protopute
-\*/
-struct KSysDir;
-rc_t KSysDirOSPath (
-                const struct KSysDir * self,
-                wchar_t * real,
-                size_t bsize,
-                const char * path,
-                va_list args
-                );
-
-/*)))
- /// Some common things are here
-(((*/
-LIB_EXPORT
-rc_t CC
-XFSPathInnerToNative (
-                WCHAR * NativePathBuffer,
-                size_t NativePathBufferSize,
-                const char * InnerPath,
-                ...
-)
-{
-    rc_t RCt;
-    KDirectory * Dir;
-    struct KSysDir * SysDir;
-    va_list VaLsd;
-
-    RCt = 0;
-    Dir = NULL;
-
-    if ( InnerPath == NULL || NativePathBuffer == NULL
-        || NativePathBufferSize == 0 )
-    { 
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = KDirectoryNativeDir ( & Dir );
-    if ( RCt == 0 ) {
-        SysDir = KDirectoryGetSysDir(Dir);
-
-        va_start ( VaLsd, InnerPath );
-        RCt = KSysDirOSPath (
-                                SysDir,
-                                NativePathBuffer,
-                                NativePathBufferSize,
-                                InnerPath,
-                                VaLsd
-                                );
-        va_end ( VaLsd );
-    }
-
-    return RCt;
-}   /* XFSPathInnerToNative () */
-
-static
-rc_t CC
-_DOKAN_make_v_path ( LPCWSTR File, VPath ** Path )
-{
-    rc_t RCt;
-    char Buffer [ XFS_SIZE_4096 ];
-    char * pChar;
-    size_t Size;
-
-    RCt = 0;
-    Size = 0;
-    pChar = NULL;
-    * Buffer = 0;
-
-    if ( File == NULL || Path == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Path = NULL;
-
-        /* Quite stupid, but I don't know what to do
-         */
-    RCt = wcstombs_s (
-                    & Size,
-                    Buffer,
-                    sizeof ( Buffer ),
-                    File,
-                    wcslen ( File )
-                    );
-
-    if ( RCt == 0 ) {
-            /* That is kinda stupid, and I should think about it
-             */
-        pChar = Buffer;
-        while ( * pChar != 0 ) {
-            if ( * pChar == '\\' ) {
-                * pChar = '/';
-            }
-            pChar ++;
-        }
-
-        RCt = VFSManagerMakePath ( XFS_VfsManager (), Path, Buffer );
-    }
-
-    return RCt;
-}   /* _DOKAN_make_v_path () */
-
-static
-rc_t CC
-_DOKAN_get_node (
-                const PDOKAN_FILE_INFO FileInfo,
-                const struct VPath * Path,
-                const struct XFSNode ** TheNode
-)
-{
-    struct XFSTreeDepot * Depot;
-    const struct XFSNode * Node;
-    rc_t RCt;
-
-    Depot = NULL;
-    RCt = 0;
-
-    if ( FileInfo == NULL || TheNode == NULL ) {
-        return XFS_RC ( rcNull );
-    } 
-
-    * TheNode = NULL;
-
-    Depot = ( struct XFSTreeDepot * ) FileInfo -> DokanOptions -> GlobalContext;
-    if ( Depot == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFSTreeDepotFindNodeForPath ( Depot, Path, & Node );
-
-    if ( RCt == 0 ) {
-        * TheNode = Node;
-    }
-
-/*
-//TT wLogMsg ( klogDebug, L"_DOKAB_get_node () TreeDepot [0x%p] Node [0x%p] Opts [0x%p]\n", TreeDepot, Node, FileInfo -> DokanOptions );
-*/
-
-    return RCt;
-}   /* _DOKAN_get_node () */
-
-static
-rc_t CC
-_DOKAN_get_path_and_node (
-                        LPCWSTR File,
-                        const PDOKAN_FILE_INFO Info,
-                        const struct VPath ** Path,
-                        const struct XFSNode ** Node,
-                        XFSNType * NodeType
-)
-{
-    rc_t RCt;
-    struct XFSNode * RNode;
-    struct VPath * RPath;
-    XFSNType Type;
-    const struct XFSAttrEditor * Ediotr;
-
-    RCt = 0;
-    RNode = NULL;
-    RPath = NULL;
-    Type = kxfsBadPath;
-    Ediotr = NULL;
-
-    if ( File == NULL || Info == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = _DOKAN_make_v_path ( File, & RPath );
-    if ( RCt == 0 ) {
-
-        RCt = _DOKAN_get_node ( Info, RPath, & RNode );
-        if ( RCt == 0 ) {
-            if ( NodeType != NULL ) {
-                RCt = XFSNodeAttrEditor ( RNode, & Ediotr );
-                if ( RCt == 0 ) {
-                    RCt = XFSAttrEditorType ( Ediotr, & Type );
-
-                    XFSEditorDispose ( & ( Ediotr -> Papahen ) );
-                }
-            }
-        }
-    }
-
-    if ( RCt == 0 ) {
-        if ( Path != NULL ) {
-            * Path = RPath;
-        }
-        else {
-            VPathRelease ( RPath );
-        }
-
-        if ( Node != NULL ) {
-            * Node = RNode;
-        }
-        else {
-            XFSNodeRelease ( RNode );
-        }
-
-        if ( NodeType != NULL ) {
-            * NodeType = Type;
-        }
-    }
-    else {
-        if ( RPath != NULL ) {
-            VPathRelease ( RPath );
-        }
-
-        if ( RNode != NULL ) {
-            XFSNodeRelease ( RNode );
-        }
-    }
-
-    return RCt;
-}   /* _DOKAN_get_path_and_node () */
-
-static
-rc_t
-_DOKAN_get_parent_node (
-                const struct VPath * Path,
-                DOKAN_FILE_INFO * TheFileInfo,  /* Depot source */
-                struct XFSNode ** Node,         /* Ret node */
-                XFSNType * Type,                /* could be NULL */
-                char ** NodeName                /* could be NULL */
-)
-{
-    rc_t RCt;
-    struct XFSTreeDepot * Depot;
-    char BB [ XFS_SIZE_4096 ];
-    struct XFSPath * xPath;
-    uint32_t xPathQ;
-    struct XFSNode * xNode;
-    struct XFSAttrEditor * xEditor;
-    char * xName;
-    const struct XFSPath * xParent;
-
-    RCt = 0;
-    Depot = NULL;
-    * BB = 0;
-    xPath = NULL;
-    xPathQ = 0;
-    xNode = NULL;
-    xEditor = NULL;
-    xName = NULL;
-    xParent = NULL;
-
-    if ( Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Node = NULL;
-
-    if ( Path == NULL || TheFileInfo == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Type != NULL ) {
-        * Type = kxfsNotFound;
-    }
-
-    if ( NodeName != NULL ) {
-        * NodeName = NULL;
-    }
-
-        /*) First we should retrieve fresh instance of depot
-         (*/
-    Depot = ( struct XFSTreeDepot * ) TheFileInfo -> DokanOptions -> GlobalContext;
-    if ( Depot == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-        /*) Reading VPath
-         (*/
-    RCt = XFS_ReadVPath_ZHR ( Path, BB, sizeof ( BB ), "" );
-    if ( RCt == 0 ) {
-            /*) Making XFSPath
-             (*/
-        RCt = XFSPathMake ( & xPath, true, BB );
-        if ( RCt == 0 ) {
-            xPathQ = XFSPathPartCount ( xPath );
-            if ( xPathQ < 2 ) {
-                RCt = XFS_RC ( rcInvalid );
-            }
-            else {
-                    /*) Here we are composing parent path
-                     (*/
-                RCt = XFSPathParent ( xPath, & xParent );
-                if ( RCt == 0 ) {
-                        /*) Here we are looking for NODE
-                         (*/
-                    RCt = XFSTreeDepotFindNode (
-                                                Depot,
-                                                XFSPathGet ( xParent ),
-                                                & xNode
-                                                );
-                    if ( RCt == 0 ) {
-                        if ( Type != NULL ) {
-                            RCt = XFSNodeAttrEditor ( xNode, & xEditor );
-                            if ( RCt == 0 ) {
-                                RCt = XFSAttrEditorType ( xEditor, Type );
-                                XFSEditorDispose ( & ( xEditor -> Papahen ) );
-                            }
-                        }
-
-                        if ( RCt == 0 ) {
-                            if ( NodeName != NULL ) {
-                                RCt = XFS_StrDup ( 
-                                                XFSPathName ( xPath ),
-                                                & xName
-                                                );
-                                if ( RCt == 0 ) {
-                                    * NodeName = xName;
-                                }
-                            }
-                        }
-
-                        if ( RCt == 0 ) {
-                            * Node = xNode;
-                        }
-                    }
-                }
-
-                XFSPathRelease ( xParent );
-            }
-
-            XFSPathRelease ( xPath );
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Node = NULL;
-        if ( Type != NULL ) {
-            * Type = kxfsNotFound;
-        }
-        if ( NodeName != NULL ) {
-            * NodeName = NULL;
-        }
-        if ( xNode != NULL ) {
-            XFSNodeRelease ( xNode );
-        }
-        if ( xName != NULL ) {
-            free ( xName );
-        }
-    }
-
-    return RCt;
-}   /* _DOKAN_get_parent_node () */
-
-static
-rc_t
-_DOKAN_get_parent_node_from_char (
-                LPCWSTR ThePath,
-                DOKAN_FILE_INFO * TheFileInfo,  /* Depot source */
-                struct XFSNode ** Node,         /* Ret node */
-                XFSNType * Type,                /* could be NULL */
-                char ** NodeName                /* could be NULL */
-)
-{
-    rc_t RCt;
-    struct VPath * Path;
-
-    RCt = 0;
-    Path = NULL;
-
-    if ( ThePath == NULL || TheFileInfo == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Node = NULL;
-
-    RCt = _DOKAN_make_v_path ( ThePath, & Path );
-    if ( RCt == 0 ) {
-        RCt = _DOKAN_get_parent_node (
-                                    Path,
-                                    TheFileInfo,
-                                    Node,
-                                    Type,
-                                    NodeName
-                                    );
-
-        VPathRelease ( Path );
-    }
-
-    return RCt;
-}   /* _DOKAN_get_parent_node_from_char() */
-
-static
-rc_t
-_DOKAN_delete_file_dir (
-                    LPCWSTR FileName,
-                    PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    rc_t RCt;
-    struct XFSNode * Node;
-    XFSNType Type;
-    char * Name;
-    struct XFSDirEditor * Editor;
-
-    RCt = 0;
-    Node = NULL;
-    Type = kxfsNotFound;
-    Name = NULL;
-    Editor = NULL;
-
-    if ( FileName == NULL || TheFileInfo == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = _DOKAN_get_parent_node_from_char (
-                                        FileName,
-                                        TheFileInfo,
-                                        & Node,
-                                        & Type,
-                                        & Name
-                                        );
-    if ( RCt == 0 ) {
-        RCt = XFSNodeDirEditor ( Node, & Editor );
-        if ( RCt == 0 ) {
-            RCt = XFSDirEditorDelete ( Editor, Name );
-
-            XFSEditorDispose ( & ( Editor -> Papahen ) );
-        }
-
-        XFSNodeRelease ( Node );
-        free ( Name );
-    }
-
-    return 0;
-}   /* DOKAN_delete_file_dir () */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_CREATEFILE == 1
-
-static
-void
-__PrintDisposition__ ( LPCWSTR FileName, DWORD CreationDisposition )
-{
-    WCHAR BF [ XFS_SIZE_4096 ];
-
-    swprintf (
-            BF,
-            sizeof ( BF ) / sizeof ( WCHAR ),
-            L"Disposition [%08x][%s]:",
-            CreationDisposition ,
-            FileName
-            );
-
-    switch ( CreationDisposition ) {
-        case CREATE_NEW :        wcscat ( BF, L" CREATE_NEW" ); break;
-        case OPEN_ALWAYS :       wcscat ( BF, L" OPEN_ALWAYS" ); break;
-        case CREATE_ALWAYS :     wcscat ( BF, L" CREATE_ALWAYS" ); break;
-        case OPEN_EXISTING :     wcscat ( BF, L" OPEN_EXISTING" ); break;
-        case TRUNCATE_EXISTING : wcscat ( BF, L" TRUNCATE_EXISTING" ); break;
-        default:                 wcscat ( BF, L" UNKNOWN" ); break;
-    }
-
-    wLogMsg ( klogDebug, L"%s (%d)\n", BF, CreationDisposition );
-}   /* __PrintDisposition__ () */
-
-static
-void 
-__PrintAccessMode__ ( LPCWSTR FileName, DWORD AccessMode )
-{
-    int llp, klf;
-    WCHAR BF [ XFS_SIZE_4096 ];
-
-    swprintf ( BF, sizeof ( BF ) / sizeof ( WCHAR ), L"AccessMode [%08x][%s]:", AccessMode, FileName );
-
-    for ( llp = 31; 0 <= llp; llp -- ) {
-        klf = 1 << llp;
-        if ( llp % 8 == 0 ) {
-            wcscat ( BF, L" " );
-        }
-
-        if ( ( AccessMode & klf ) == klf ) {
-            wcscat ( BF, L"1" );
-        }
-        else {
-            wcscat ( BF, L"0" );
-        }
-    }
-    wLogMsg ( klogDebug, L"%s\n", BF );
-
-    swprintf ( BF, sizeof ( BF ) / sizeof ( WCHAR ), L"AccessMode [%08xl][%s]:", AccessMode, FileName );
-    if ( ( AccessMode & FILE_READ_DATA ) == FILE_READ_DATA ) wcscat ( BF, L" FILE_READ_DATA" );
-    if ( ( AccessMode & FILE_WRITE_DATA ) == FILE_WRITE_DATA ) wcscat ( BF, L" FILE_WRITE_DATA" );
-    if ( ( AccessMode & FILE_APPEND_DATA ) == FILE_APPEND_DATA ) wcscat ( BF, L" FILE_APPEND_DATA" );
-    if ( ( AccessMode & FILE_READ_EA ) == FILE_READ_EA ) wcscat ( BF, L" FILE_READ_EA" );
-    if ( ( AccessMode & FILE_WRITE_EA ) == FILE_WRITE_EA ) wcscat ( BF, L" FILE_WRITE_EA" );
-    if ( ( AccessMode & FILE_EXECUTE ) == FILE_EXECUTE ) wcscat ( BF, L" FILE_EXECUTE" );
-    if ( ( AccessMode & FILE_DELETE_CHILD ) == FILE_DELETE_CHILD ) wcscat ( BF, L" FILE_DELETE_CHILD" );
-    if ( ( AccessMode & FILE_READ_ATTRIBUTES ) == FILE_READ_ATTRIBUTES ) wcscat ( BF, L" FILE_READ_ATTRIBUTES" );
-    if ( ( AccessMode & FILE_WRITE_ATTRIBUTES ) == FILE_WRITE_ATTRIBUTES ) wcscat ( BF, L" FILE_WRITE_ATTRIBUTES" );
-    if ( ( AccessMode & FILE_ALL_ACCESS ) == FILE_ALL_ACCESS ) wcscat ( BF, L" FILE_ALL_ACCESS" );
-    if ( ( AccessMode & READ_CONTROL ) == READ_CONTROL ) wcscat ( BF, L" READ_CONTROL" );
-    if ( ( AccessMode & DELETE ) == DELETE ) wcscat ( BF, L" DELETE" );
-
-    wLogMsg ( klogDebug, L"%s\n", BF );
-}   /* __PrintAccessMode__ () */
-
-static
-int
-_HandleForNode (
-            const struct XFSNode * Node,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    int RetVal;
-    struct XFSHandle * Handle;
-
-    RetVal = 0;
-
-    if ( Node == NULL ) {
-        return ERROR_INVALID_DATA;
-    }
-
-    if ( TheFileInfo == NULL ) {
-        RetVal = ERROR_INVALID_DATA;
-    } else {
-        if ( XFSHandleMake ( Node, & Handle ) != 0 ) {
-            RetVal = ERROR_INVALID_DATA;
-        }
-        else {
-            TheFileInfo -> Context = ( ULONG ) Handle;
-
-            RetVal = 0;
-        }
-    }
-
-    XFSNodeRelease ( Node );
-
-    return RetVal;
-}   /* _HandleForNode () */
-
-static
-int
-_HandleOpenExistingFileEdit (
-                    const struct XFSNode * Node,
-                    PDOKAN_FILE_INFO TheFileInfo,
-                    bool Write,
-                    bool Read
-)
-{
-    struct XFSFileEditor * Editor;
-    rc_t RCt;
-    XFSNMode Mode;
-    struct XFSHandle * Handle;
-    int RetVal;
-
-    Editor = NULL;
-    Mode = 0;
-    Handle = NULL;
-    RCt= 0;
-    RetVal = 0;
-
-    if ( Node == NULL ) {
-        return ERROR_INVALID_DATA;
-    }
-
-    if ( TheFileInfo == NULL ) {
-        XFSNodeRelease ( Node );
-
-        return ERROR_INVALID_DATA;
-    }
-
-    if ( Write ) {
-        Mode |= kxfsWrite;
-    }
-
-    if ( Read ) {
-        Mode |= kxfsRead;
-    }
-
-    RCt = XFSNodeFileEditor ( Node, & Editor );
-    if ( RCt == 0 ) {
-        RCt = XFSFileEditorOpen ( Editor, Mode );
-        if ( RCt == 0 ) {
-            RCt = XFSHandleMake ( Node, & Handle );
-            if ( RCt == 0 ) {
-                XFSHandleSet ( Handle, Editor );
-
-                TheFileInfo -> Context = ( ULONG ) Handle;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( Editor != NULL ) {
-            XFSEditorDispose ( & ( Editor -> Papahen ) );
-        }
-    }
-
-    XFSNodeRelease ( Node );
-
-    if ( RCt == 0 ) {
-        RetVal = 0;
-    }
-    else {
-        if ( RCt == XFS_RC ( rcBusy ) ) {
-            RetVal = ERROR_PATH_BUSY;
-        }
-        else {
-            RetVal = ERROR_ACCESS_DENIED;
-        }
-    }
-
-    return RetVal;
-}   /* _HandleOpenExistingFileEdit () */
-
-static
-int
-_HandleCreateNewFileEdit (
-                        const struct VPath * Path,
-                        DOKAN_FILE_INFO * TheFileInfo,
-                        bool Write,
-                        bool Read
-)
-{
-    rc_t RCt;
-    struct XFSNode * Node;
-    struct XFSDirEditor * DirEditor;
-    struct XFSHandle * Handle;
-    char * NodeName;
-    XFSNType Type;
-    XFSNMode Mode;
-
-    RCt = 0;
-    Node = NULL;
-    DirEditor = NULL;
-    Handle = NULL;
-    NodeName = NULL;
-    Type = kxfsNotFound;
-    Mode = kxfsNone;
-
-    if ( TheFileInfo == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    TheFileInfo -> Context = 0;
-
-    if ( Write ) { Mode |= kxfsWrite; }
-    if ( Read ) { Mode |= kxfsRead; }
-
-    RCt = _DOKAN_get_parent_node (
-                                Path,
-                                TheFileInfo,
-                                & Node,
-                                & Type,
-                                & NodeName
-                                );
-    if ( RCt == 0 ) {
-            /* I do not check if node exists or not,
-             * cuz Bogus node will fail on retrieving
-             * DirEditor
-             */
-        RCt = XFSNodeDirEditor ( Node, & DirEditor );
-        if ( RCt == 0 ) {
-            RCt = XFSDirEditorCreate (
-                                    DirEditor,
-                                    NodeName,
-                                    Mode,
-                                    & Handle
-                                    );
-            if ( RCt == 0 ) {
-                TheFileInfo -> Context = ( ULONG ) Handle;
-            }
-        }
-
-        XFSNodeRelease ( Node );
-        free ( NodeName );
-    }
-
-    if ( RCt != 0 ) {
-        if ( DirEditor != NULL ) {
-            XFSEditorDispose ( & ( DirEditor -> Papahen ) );
-        }
-    }
-
-    return RCt == 0 ? 0 : ERROR_ACCESS_DENIED;
-}   /* _HandleCreateNewFileEdit () */
-
-/*))
- ((     Really strange method, long and stupid.
-  ))
- ((*/
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_CreateFile (
-            LPCWSTR FileName,
-            DWORD AccessMode,
-            DWORD ShareMode,
-            DWORD CreationDisposition,
-            DWORD FlagsAndAttributes,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    rc_t RCt;
-    int RetValue;
-    struct XFSNode * Node;
-    XFSNType Type;
-    bool Read, Write;
-    VPath * Path;
-
-    RCt = 0;
-    RetValue = 0;
-    Node = NULL;
-    Type = kxfsBadPath;
-    Read = Write = false;
-    Path = NULL;
-
-#ifdef I_AM_AN_IMBECILE
-{
-if ( wcsstr ( FileName, klogDebug, L"CVS" ) != NULL
-    || wcsstr ( FileName, klogDebug, L".svn" ) != NULL
-    || wcsstr ( FileName, klogDebug, L"desktop.ini" ) != NULL
-    || wcsstr ( FileName, klogDebug, L".gs" ) != NULL
-    || wcsstr ( FileName, klogDebug, L"Authorun.inf" ) != NULL
-    ) {
-wLogMsg ( klogDebug, L" CREATE File [%s][VYHUHOL]\n", FileName );
-    return ERROR_PATH_NOT_FOUND * - 1;
-}
-}
-#endif /* I_AM_AN_IMBECILE */
-
-wLogMsg ( klogDebug, L" CREATE File [%s][I=0x%p][H=0x%p]\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context );
-
-    if ( FileName == NULL || TheFileInfo == NULL ) {
-        return 1 * - 1; /* TODO !!! */
-    }
-    TheFileInfo -> Context = 0L;
-
-__PrintAccessMode__ ( FileName, AccessMode );
-__PrintDisposition__ ( FileName, CreationDisposition );
-
-        /* Awkward attempt to reduce filesystem abuse from
-            CVS agen and all other services, like gzip
-         */
-
-        /* First we should know what kind of file object do we have
-         */
-    RCt = _DOKAN_get_path_and_node (
-                                FileName,
-                                TheFileInfo,
-                                & Path,
-                                & Node,
-                                & Type
-                                );
-        /* Something really wrong did happen
-         */
-    if ( RCt != 0 ) {
-        return 1 * - 1;
-    }
-
-        /* Reading/Writing file
-         */
-    Read = ( AccessMode & FILE_READ_DATA ) == FILE_READ_DATA;
-    Write = ( AccessMode & FILE_WRITE_DATA ) == FILE_WRITE_DATA;
-
-        /* We need only existing file
-         */
-    if ( Type == kxfsNotFound && CreationDisposition == OPEN_EXISTING ) {
-        TheFileInfo -> Context = 0L;
-
-        XFSNodeRelease ( Node );
-        VPathRelease ( Path );
-
-        RetValue = ERROR_FILE_NOT_FOUND;
-
-wLogMsg ( klogDebug, L"     RETURNS [%s][RC=%d][H=NULL][I=0x%p][%d]\n", FileName, RetValue, TheFileInfo, __LINE__ );
-        return RetValue * - 1;
-    }
-
-        /* We are trying to open new file
-         */
-    if ( Type == kxfsNotFound && CreationDisposition != OPEN_EXISTING
-        && ( Read || Write )
-    ) {
-        RetValue = _HandleCreateNewFileEdit ( Path, TheFileInfo, Write, Read );
-
-        VPathRelease ( Path );
-wLogMsg ( klogDebug, L"     RETURNS [%s][RC=%d][H=0x%p][I=0x%p][%d]\n", FileName, RetValue, ( void * ) ( TheFileInfo -> Context ), TheFileInfo, __LINE__ );
-        return RetValue * - 1;
-    }
-
-        /* Reading directory content
-         */
-    if ( Type == kxfsDir ) {
-            /* Reading Directory Listing
-             */
-        if ( CreationDisposition == OPEN_EXISTING && Read ) {
-            RetValue = _HandleForNode ( Node, TheFileInfo );
-
-            VPathRelease ( Path );
-wLogMsg ( klogDebug, L"     RETURNS [%s][RC=%d][H=0x%p][I=0x%p][%d]\n", FileName, RetValue, ( void * ) ( TheFileInfo -> Context ), TheFileInfo, __LINE__ );
-            return RetValue * - 1;
-        }
-    }
-
-        /* Reading/Writin existing file
-         */
-    if ( ( Read || Write ) && Type != kxfsDir &&  Type != kxfsNotFound && Type != kxfsBadPath ) {
-        RetValue = _HandleOpenExistingFileEdit ( Node, TheFileInfo, Write, Read );
-
-        VPathRelease ( Path );
-wLogMsg ( klogDebug, L"     RETURNS [%s][RC=%d][H=0x%p][I=0x%p][%d]\n", FileName, RetValue, ( void * ) ( TheFileInfo -> Context ), TheFileInfo, __LINE__ );
-        return RetValue * - 1;
-    }
-
-        /* Reading/Writin file attributes
-         */
-    if ( ( AccessMode & FILE_GENERIC_READ ) == FILE_WRITE_ATTRIBUTES && CreationDisposition == OPEN_EXISTING ) {
-        RetValue = _HandleOpenExistingFileEdit ( Node, TheFileInfo, Write, Read );
-
-        VPathRelease ( Path );
-wLogMsg ( klogDebug, L"     RETURNS [%s][RC=%d][H=0x%p][I=0x%p][%d]\n", FileName, RetValue, ( void * ) ( TheFileInfo -> Context ), TheFileInfo, __LINE__ );
-        return RetValue * - 1;
-    }
-
-        /* Security read ... SACL DACL
-         */
-    if ( ( AccessMode & READ_CONTROL ) == READ_CONTROL
-            && ( ! Read )
-            && ( ! Write )
-    ) {
-        RetValue = _HandleForNode ( Node, TheFileInfo );
-
-        VPathRelease ( Path );
-wLogMsg ( klogDebug, L"     RETURNS [%s][RC=%d][H=0x%p][I=0x%p][%d]\n", FileName, RetValue, ( void * ) ( TheFileInfo -> Context ), TheFileInfo, __LINE__ );
-        return RetValue * - 1;
-    }
-
-        /* We are reading file attributes, and all other requests
-         */
-    if ( ( AccessMode & FILE_GENERIC_READ ) == FILE_READ_ATTRIBUTES ) {
-        RetValue = _HandleForNode ( Node, TheFileInfo );
-
-        VPathRelease ( Path );
-wLogMsg ( klogDebug, L"     RETURNS [%s][RC=%d][H=0x%p][I=0x%p][%d]\n", FileName, RetValue, ( void * ) ( TheFileInfo -> Context ), TheFileInfo, __LINE__ );
-        return RetValue * - 1;
-    }
-
-        /* We are deleting file ...
-         */
-    if ( ( AccessMode & DELETE ) == DELETE ) {
-        RetValue = _HandleForNode ( Node, TheFileInfo );
-
-        VPathRelease ( Path );
-wLogMsg ( klogDebug, L"     RETURNS [%s][RC=%d][H=0x%p][I=0x%p][%d]\n", FileName, RetValue, ( void * ) ( TheFileInfo -> Context ), TheFileInfo, __LINE__ );
-        return RetValue * - 1;
-    }
-
-    /* Something else is here */
-    RetValue = 1; // TODO
-
-    XFSNodeRelease ( Node );
-    VPathRelease ( Path );
-
-wLogMsg ( klogDebug, L"     RETURNS [%s][RC=%d][I=0x%p][%d]\n", FileName, RetValue, TheFileInfo, __LINE__ );
-
-    return RetValue * - 1;
-}   /* CreateFile() */
-
-#endif /* USE_XFS_DOKAN_CREATEFILE == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_OPENDIRECTORY == 1
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_OpenDirectory (
-            LPCWSTR FileName,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    rc_t RCt;
-    const struct XFSNode * TheNode;
-    XFSNType Type;
-    int RetVal;
-
-    RCt = 0;
-    TheNode = NULL;
-    Type = kxfsNotFound;
-    RetVal = 0;
-
-//TT wLogMsg ( klogDebug, L" OPEN directory [%s][I=0x%p][C=0x%p]\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context );
-
-    if ( FileName == NULL || TheFileInfo == NULL ) {
-        return 1 * - 1;
-    }
-    TheFileInfo -> Context = 0L;
-
-    RCt = _DOKAN_get_path_and_node (
-                                FileName,
-                                TheFileInfo,
-                                NULL,
-                                & TheNode,
-                                & Type
-                                );
-    if ( RCt == 0 ) {
-        if ( Type == kxfsDir ) {
-            RetVal = _HandleForNode ( TheNode, TheFileInfo );
-        }
-        else {
-            RetVal = ERROR_PATH_NOT_FOUND;
-
-            XFSNodeRelease ( TheNode );
-        }
-    }
-    else {
-        RetVal = ERROR_INVALID_DATA;
-    }
-
-//TT wLogMsg ( klogDebug, L" OPEN directory,cont [%s][I=0x%p][C=0x%p][RC=%lu]\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context, RetVal );
-    return RetVal * - 1;
-}   /* OpenDirectory() */
-
-#endif /* USE_XFS_DOKAN_OPENDIRECTORY == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_CREATEDIRECTORY == 1
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_CreateDirectory (
-            LPCWSTR FileName,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    rc_t RCt;
-    struct XFSNode * Node;
-    char * Name;
-    struct XFSDirEditor * Editor;
-
-    RCt = 0;
-    Node = NULL;
-    Name = NULL;
-    Editor = NULL;
-
-//TT wLogMsg ( klogDebug, L"CREATE Directory [%s][FI=0x%p][H=0x%p]\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context );
-
-    RCt = _DOKAN_get_parent_node_from_char (
-                                        FileName,
-                                        TheFileInfo,
-                                        & Node,
-                                        NULL,
-                                        & Name
-                                        );
-    if ( RCt == 0 ) {
-        RCt = XFSNodeDirEditor ( Node, & Editor );
-        if ( RCt == 0 ) {
-            RCt = XFSDirEditorCreateDir ( Editor, Name );
-
-            XFSEditorDispose ( & ( Editor -> Papahen ) );
-        }
-
-        XFSNodeRelease ( Node );
-        free ( Name );
-    }
-
-//TT wLogMsg ( klogDebug, L"   CREATE Directory [%s][FI=0x%p][H=0x%p][RC=%d]\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context, RCt );
-
-    return RCt == 0 ? 0 : - 1;
-}   /* CreateDirectory() */
-
-#endif /* USE_XFS_DOKAN_CREATEDIRECTORY == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_CLEANUP == 1
-
-    /*))
-     // We should remember, all files are closing and deleting here
-    ((*/
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_Cleanup (
-            LPCWSTR FileName,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    struct XFSHandle * Handle;
-    struct XFSFileEditor * Editor;
-
-    if ( FileName == NULL || TheFileInfo == NULL ) {
-        return ERROR_INVALID_DATA * - 1;
-    }
-
-    Handle = ( struct XFSHandle * ) TheFileInfo -> Context;
-
-    if ( Handle == NULL )  {
-        return ERROR_INVALID_HANDLE * - 1;
-    }
-
-//TT wLogMsg ( klogDebug, L" CLEANUP File [%s][I=0x%p][H=0x%p][Del=%d]\n", FileName, TheFileInfo, Handle, TheFileInfo -> DeleteOnClose );
-
-    TheFileInfo -> Context = 0L;
-
-    Editor = ( struct XFSFileEditor * ) XFSHandleGet ( Handle );
-    if ( Editor != NULL ) {
-        /*)) I believe that if ... if here is non-NULL handle, 
-         //  it could be only handle for KFile, will change if ...
-        ((*/
-        XFSFileEditorClose ( Editor );
-        XFSEditorDispose ( & ( Editor -> Papahen ) );
-        XFSHandleSet ( Handle, NULL );
-    }
-    XFSHandleRelease ( Handle );
-
-    if ( TheFileInfo -> DeleteOnClose ) {
-//TT wLogMsg ( klogDebug, L"     CLEANUP File : DELETE ON CLOSE [%s][I=0x%p][H=0x%p]\n", FileName, TheFileInfo, Handle );
-        _DOKAN_delete_file_dir ( FileName, TheFileInfo );
-
-    }
-
-    return 0;
-}   /* Cleanup() */
-
-#endif /* USE_XFS_DOKAN_CLEANUP == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_CLOSEFILE == 1
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_CloseFile (
-            LPCWSTR FileName,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    rc_t RCt;
-    struct XFSHandle * Handle;
-    struct XFSFileEditor * Editor;
-
-    RCt = 0; Handle = NULL;
-    Editor = NULL;
-
-    if ( FileName == NULL || TheFileInfo == NULL ) {
-        return 1 * - 1;
-    }
-
-    Handle = ( struct XFSHandle * ) TheFileInfo -> Context;
-
-//TT wLogMsg ( klogDebug, L" CLOSE File [%s][I=0x%p][H=0x%p]\n", FileName, TheFileInfo, Handle );
-
-    if ( Handle == NULL )  {
-        /* That's is OK */
-        return 0;
-    }
-
-//TT wLogMsg ( klogDebug, L" CLOSE File: Cleanup method wasn't called [%s][E=0x%p]\n", FileName, Handle );
-
-    TheFileInfo -> Context = 0L;
-
-    Editor = ( struct XFSFileEditor * ) XFSHandleGet ( Handle );
-    if ( Editor != NULL ) {
-
-        XFSFileEditorClose ( Editor );
-        XFSEditorDispose ( & ( Editor -> Papahen ) );
-        XFSHandleSet ( Handle, NULL );
-    }
-    XFSHandleRelease ( Handle );
-
-    if ( TheFileInfo -> DeleteOnClose ) {
-        RCt = _DOKAN_delete_file_dir ( FileName, TheFileInfo );
-    }
-
-//TT wLogMsg ( klogDebug, L" CLOSE File,cont [%s][I=0x%p][H=0x%p][RC=%d]\n", FileName, TheFileInfo, Handle, RCt );
-
-    return ( RCt == 0 ? 0 : ERROR_INVALID_DATA ) * - 1;
-}   /* CloseFile() */
-
-#endif /* USE_XFS_DOKAN_CLOSEFILE == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_READFILE == 1
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_ReadFile (
-            LPCWSTR FileName,
-            LPVOID Buffer,
-            DWORD NumberOfBytesToRead,
-            LPDWORD NumberOfBytesRead,
-            LONGLONG Offset,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    struct XFSHandle * Handle;
-    bool LocallyOpened;
-    struct XFSFileEditor * Editor;
-    const struct XFSNode * Node;
-    rc_t RCt;
-    int RetVal;
-    size_t n2r, nRd;
-
-    Handle = NULL;
-    LocallyOpened = false;
-    Editor = NULL;
-    Node = NULL;
-    RCt = 0;
-    RetVal = 0;
-    n2r = nRd = 0;
-
-    if ( FileName == NULL || TheFileInfo == NULL ) {
-        return 1 * - 1; /* TODO !!! */
-    }
-
-//TT wLogMsg ( klogDebug, L" READ File [%s][I=0x%p][H=0x%p] - [N=%lu][O=%lu]\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context, NumberOfBytesToRead, Offset );
-
-    Handle = ( struct XFSHandle * ) TheFileInfo -> Context;
-    n2r = ( size_t ) NumberOfBytesToRead;
-
-        /*)) That's could happen, and we need to reopen fiel
-         ((*/
-    if ( Handle == NULL ) {
-//TT wLogMsg ( klogDebug, L" READ File [%s][I=0x%p][H=0x%p] - REOPENING!\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context );
-
-            /*)) First we are looking for a node
-             ((*/
-
-        RCt = _DOKAN_get_path_and_node (
-                                    FileName,
-                                    TheFileInfo,
-                                    NULL,   /* VPath, no need */
-                                    & Node,
-                                    NULL    /* NodeType */
-                                    );
-        if ( RCt == 0 ) {
-            RCt = XFSNodeFileEditor ( Node, & Editor );
-            if ( RCt == 0 ) {
-                RCt = XFSFileEditorOpen ( Editor, kxfsRead );
-                if ( RCt == 0 ) {
-                    LocallyOpened = true;
-                }
-            }
-        }
-    }
-    else {
-        Editor = ( struct XFSFileEditor * ) XFSHandleGet ( Handle );
-        if ( Editor == NULL ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-            Node = XFSHandleNode ( Handle );
-            if ( Node == NULL ) {
-                RCt = XFS_RC ( rcInvalid );
-            }
-        }
-    }
-
-    if ( RCt == 0 ) {
-        /*) Here we are reading info
-         (*/
-        RCt = XFSFileEditorRead (
-                            Editor,
-                            Offset,
-                            Buffer,
-                            n2r,
-                            & nRd
-                            );
-        * NumberOfBytesRead = nRd;
-    }
-
-    if ( LocallyOpened ) {
-//TT wLogMsg ( klogDebug, L" READ File [%s][I=0x%p][H=0x%p] - RECLOSING!\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context );
-        if ( Editor != NULL ) {
-            XFSFileEditorClose ( Editor );
-
-            XFSEditorDispose ( & ( Editor -> Papahen ) );
-        }
-
-        Editor = NULL;
-
-        if ( Node != NULL ) {
-            XFSNodeRelease ( Node );
-
-            Node = NULL;
-        }
-    }
-
-    RetVal =  RCt == 0 ? 0 : ERROR_INVALID_DATA;
-
-//TT wLogMsg ( klogDebug, L" READ File,cont [%s][I=0x%p][H=0x%p] - [Read=%lu][RC=%d]!\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context, * NumberOfBytesRead, RetVal );
-
-    return RetVal * - 1;
-}   /* ReadFile() */
-
-#endif /* USE_XFS_DOKAN_READFILE == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_WRITEFILE == 1
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_WriteFile (
-            LPCWSTR FileName,
-            LPCVOID Buffer,
-            DWORD NumBytesWrite,
-            LPDWORD NumBytesWritten,
-            LONGLONG Offset,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    struct XFSHandle * Handle;
-    bool LocallyOpened;
-    struct XFSFileEditor * Editor;
-    const struct XFSNode * Node;
-    rc_t RCt;
-    int RetVal;
-    size_t n2w, nWr;
-
-    Handle = NULL;
-    LocallyOpened = false;
-    Editor = NULL;
-    Node = NULL;
-    RCt = 0;
-    RetVal = 0;
-    n2w = nWr = 0;
-
-    if ( FileName == NULL || TheFileInfo == NULL ) {
-        return 1 * - 1; /* TODO !!! */
-    }
-
-//TT wLogMsg ( klogDebug, L" WRITE File [%s][I=0x%p][H=0x%p] - [O=%d][N=%d]\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context, (int)Offset, (int)NumBytesWrite );
-
-    n2w = ( size_t ) NumBytesWrite;
-
-    Handle = ( struct XFSHandle * ) TheFileInfo -> Context;
-
-        /*)) That's could happen, and we need to reopen fiel
-         ((*/
-    if ( Handle == NULL ) {
-//TT wLogMsg ( klogDebug, L" WRITE File [%s][I=0x%p][H=0x%p] - REOPENING!\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context );
-
-            /*)) First we are looking for a node
-             ((*/
-
-        RCt = _DOKAN_get_path_and_node (
-                                    FileName,
-                                    TheFileInfo,
-                                    NULL,   /* VPath, no need */
-                                    & Node,
-                                    NULL    /* NodeType */
-                                    );
-        if ( RCt == 0 ) {
-            RCt = XFSNodeFileEditor ( Node, & Editor );
-            if ( RCt == 0 ) {
-                RCt = XFSFileEditorOpen ( Editor, kxfsWrite );
-                if ( RCt == 0 ) {
-                    LocallyOpened = true;
-                }
-            }
-        }
-    }
-    else {
-        Editor = ( struct XFSFileEditor * ) XFSHandleGet ( Handle );
-        if ( Editor == NULL ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-            Node = XFSHandleNode ( Handle );
-            if ( Node == NULL ) {
-                RCt = XFS_RC ( rcInvalid );
-            }
-        }
-    }
-
-    if ( RCt == 0 ) {
-        /*) Here we are reading info
-         (*/
-        RCt = XFSFileEditorWrite (
-                            Editor,
-                            Offset,
-                            Buffer,
-                            n2w,
-                            & nWr
-                            );
-        * NumBytesWritten = nWr;
-    }
-
-    if ( LocallyOpened ) {
-//TT wLogMsg ( klogDebug, L" WRITE File [%s][I=0x%p][H=0x%p] - RECLOSING!\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context );
-        if ( Editor != NULL ) {
-            XFSFileEditorClose ( Editor );
-
-            XFSEditorDispose ( & ( Editor -> Papahen ) );
-        }
-
-        Editor = NULL;
-
-        if ( Node != NULL ) {
-            XFSNodeRelease ( Node );
-
-            Node = NULL;
-        }
-    }
-
-    RetVal =  RCt == 0 ? 0 : ERROR_INVALID_DATA;
-
-//TT wLogMsg ( klogDebug, L" WRITE File,cont [%s][I=0x%p][H=0x%p] - [Wrote=%d][RC=%d]!\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context, (int)* NumBytesWritten, (int)RetVal );
-
-    return RetVal * - 1;
-}   /* WriteFile() */
-
-#endif /* USE_XFS_DOKAN_WRITEFILE == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_FLUSHFILEBUFFERS == 1
-
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_FlushFileBuffers (
-            LPCWSTR FileName,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-//TT wLogMsg ( klogDebug, L"FLUSHFILEBUFFERS(DOKAN): [%s][FI=0x%p]\n", FileName, TheFileInfo );
-    return - 0;
-}   /* FlushFileBuffers() */
-
-#endif /* USE_XFS_DOKAN_FLUSHFILEBUFFERS == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_GETFILEINFORMATION == 1
-
-/*))
- // TODO : introduce global handle class, which will represent all
-((*/
-
-static
-int
-_Read_HANDLE_FILE_INFORMATION (
-                        const struct XFSHandle * Handle,
-                        LPBY_HANDLE_FILE_INFORMATION HandleFileInfo
-)
-{
-    rc_t RCt;
-    int RetVal;
-    const struct XFSNode * Node;
-    struct XFSAttrEditor * Editor;
-    struct XFSFileEditor * FileEditor;
-    struct XFSPerm * Perm;
-    const char * PermStr;
-    XFSNType Type;
-    ULONG64 Time;
-    KTime_t TheTime;
-    DWORD TimeHigh, TimeLow;
-    LARGE_INTEGER FileSize;
-    uint64_t Size;
-
-    RCt = 0;
-    RetVal = 0;
-    Node = NULL;
-    Editor = NULL;
-    Perm = NULL;
-    PermStr = NULL;
-    Type = kxfsNotFound;
-
-    if ( Handle == NULL || HandleFileInfo == NULL ) {
-        return 1;
-    }
-
-    Node = XFSHandleNode ( Handle );
-    if ( Node == NULL ) {
-        return 1;
-    }
-
-    RCt = XFSNodeAttrEditor ( Node, & Editor );
-    if ( RCt != 0 || Editor == NULL ) {
-        return 1;
-    }
-
-    while ( true ) {
-        ZeroMemory (
-                HandleFileInfo,
-                sizeof ( BY_HANDLE_FILE_INFORMATION )
-                );
-
-            /* File Attributes */
-        if ( XFSAttrEditorType ( Editor, & Type ) != 0 ) {
-            RetVal = 1;
-            break;
-        }
-        HandleFileInfo -> dwFileAttributes
-                                        = FILE_ATTRIBUTE_NORMAL;
-        switch ( Type ) {
-            case kxfsFile:
-                break;
-            case kxfsDir:
-                HandleFileInfo -> dwFileAttributes
-                                        |= FILE_ATTRIBUTE_DIRECTORY;
-                break;
-            case kxfsLink:
-            default:
-                HandleFileInfo -> dwFileAttributes
-                                        = INVALID_FILE_ATTRIBUTES;
-                break;
-        }
-
-        if ( HandleFileInfo -> dwFileAttributes != INVALID_FILE_ATTRIBUTES && Type != kxfsDir ) {
-/* ### Check permissions */
-            if ( XFSAttrEditorPermissions ( Editor, & PermStr ) == 0 ) {
-                if ( XFSPermMake ( PermStr, & Perm ) == 0 ) {
-                    if ( XFSPermAuth ( Perm, kxfsUser ) != NULL ) {
-                        if ( ! XFSAuthCanRead (
-                                         XFSPermAuth ( Perm, kxfsUser )
-                                         ) ) {
-                            HandleFileInfo -> dwFileAttributes
-                                            |= FILE_ATTRIBUTE_READONLY;
-                        }
-                    }
-                    free ( Perm );
-                }
-            }
-        }
-
-            /* Times */
-        if ( XFSAttrEditorDate ( Editor, & TheTime ) != 0 ) {
-            RetVal = 1;
-            break;
-        }
-        Time = ( TheTime * 10000000 ) + 116444736000000000;;
-        TimeLow = ( DWORD ) Time;
-        TimeHigh = Time >> 32;
-        HandleFileInfo -> ftCreationTime.dwLowDateTime = TimeLow;
-        HandleFileInfo -> ftCreationTime.dwHighDateTime = TimeHigh;
-        HandleFileInfo -> ftLastAccessTime.dwLowDateTime = TimeLow;
-        HandleFileInfo -> ftLastAccessTime.dwHighDateTime = TimeHigh;
-        HandleFileInfo -> ftLastWriteTime.dwLowDateTime = TimeLow;
-        HandleFileInfo -> ftLastWriteTime.dwHighDateTime = TimeHigh;
-
-            /* Sizes: set default value and try to get some */
-        FileSize.QuadPart = 0;
-        HandleFileInfo -> nFileSizeHigh = FileSize.HighPart;
-        HandleFileInfo -> nFileSizeLow = FileSize.LowPart;
-
-        FileEditor = ( struct XFSFileEditor * ) XFSHandleGet ( Handle );
-        if ( FileEditor == NULL ) {
-            RCt = XFSNodeFileEditor ( Node, & FileEditor );
-            if ( RCt == 0 ) {
-                if ( FileEditor != NULL ) {
-                    if ( XFSFileEditorSize ( FileEditor, & Size ) == 0 ) {
-                        FileSize.QuadPart = Size;
-                        HandleFileInfo -> nFileSizeHigh = FileSize.HighPart;
-                        HandleFileInfo -> nFileSizeLow = FileSize.LowPart;
-                    }
-
-                    XFSEditorDispose ( & ( FileEditor -> Papahen ) );
-                }
-            }
-        } else {
-            if ( XFSFileEditorSize ( FileEditor, & Size ) == 0 ) {
-                FileSize.QuadPart = Size;
-                HandleFileInfo -> nFileSizeHigh = FileSize.HighPart;
-                HandleFileInfo -> nFileSizeLow = FileSize.LowPart;
-            }
-        }
-
-        break;
-    }
-
-    XFSEditorDispose ( & ( Editor -> Papahen ) );
-
-    return RetVal;
-}   /* _Read_HANDLE_FILE_INFORMATION () */
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_GetFileInformation (
-            LPCWSTR FileName,
-            LPBY_HANDLE_FILE_INFORMATION HandleFileInfo,
-            PDOKAN_FILE_INFO FileInfo
-)
-{
-    struct XFSHandle * Handle;
-    int RetValue;
-
-    RetValue = 0;
-    Handle = NULL;
-
-//TT wLogMsg ( klogDebug, L" INFO file [%s][I=0x%p][H=0x%p]\n", FileName, FileInfo, (void * ) FileInfo -> Context );
-
-    if ( FileName == NULL || HandleFileInfo == NULL || FileInfo == NULL ) {
-        return ERROR_INVALID_DATA * - 1;
-    }
-
-    Handle = ( struct XFSHandle * ) FileInfo -> Context;
-
-    if ( Handle == NULL )  {
-        return ERROR_INVALID_HANDLE * - 1;
-    }
-
-    RetValue = _Read_HANDLE_FILE_INFORMATION ( Handle, HandleFileInfo );
-
-//TT wLogMsg ( klogDebug, L" INFO File,cont [%s][0x%p][RV=%d]\n", FileName, FileInfo, RetValue );
-
-    return RetValue * - 1;
-}   /* GetFileInformation() */
-
-#endif /* USE_XFS_DOKAN_GETFILEINFORMATION == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_FINDFILES == 1
-
-static
-rc_t CC
-_Read_PWIN32_FIND_DATA (
-                const struct XFSNode * Node,
-                LPWIN32_FIND_DATAW FindData
-)
-{
-    rc_t RCt;
-    struct XFSAttrEditor * Editor;
-    struct XFSFileEditor * FileEditor;
-    struct XFSPerm * Perm;
-    const char * PermStr;
-    ULONG64 Time;
-    XFSNType Type;
-    KTime_t TheTime;
-    DWORD TimeHigh, TimeLow;
-    LARGE_INTEGER FileSize;
-    uint64_t Size;
-    size_t CopyNum;
-
-    RCt = 0;
-    Editor = NULL;
-    Perm = NULL;
-    PermStr = NULL;
-    Type = kxfsNotFound;
-    CopyNum = 0;
-
-    if ( Node == NULL || FindData == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    ZeroMemory ( FindData, sizeof ( WIN32_FIND_DATAW ) );
-
-
-    RCt = XFSNodeAttrEditor ( Node, & Editor );
-    if ( RCt != 0 || Editor == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( XFSAttrEditorType ( Editor, & Type ) != 0 ) {
-        XFSEditorDispose ( & ( Editor -> Papahen ) );
-
-        return XFS_RC ( rcInvalid );
-    }
-
-    FindData -> dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
-
-    switch ( Type ) {
-        case kxfsFile:
-            break;
-        case kxfsDir:
-            FindData -> dwFileAttributes |= FILE_ATTRIBUTE_DIRECTORY;
-            break;
-        case kxfsLink:
-        default:
-            FindData -> dwFileAttributes = INVALID_FILE_ATTRIBUTES;
-            break;
-    }
-
-    if ( FindData -> dwFileAttributes != INVALID_FILE_ATTRIBUTES && Type != kxfsDir ) {
-/* ### Check permissions */
-        RCt = XFSAttrEditorPermissions ( Editor, & PermStr );
-        if ( RCt == 0 ) {
-            RCt = XFSPermMake ( PermStr, & Perm );
-            if ( RCt == 0 ) {
-                if ( XFSPermAuth ( Perm, kxfsUser ) == NULL ) {
-                    RCt = XFS_RC ( rcInvalid );
-                }
-                free ( Perm );
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        XFSEditorDispose ( & ( Editor -> Papahen ) );
-        return RCt;
-    }
-
-    RCt = XFSAttrEditorDate ( Editor, & TheTime );
-    XFSEditorDispose ( & ( Editor -> Papahen ) );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-    Time = ( TheTime * 10000000 ) + 116444736000000000;;
-    TimeLow = ( DWORD ) Time;
-    TimeHigh = Time >> 32;
-
-    FindData -> ftCreationTime.dwLowDateTime = TimeLow;
-    FindData -> ftCreationTime.dwHighDateTime = TimeHigh;
-    FindData -> ftLastAccessTime.dwLowDateTime = TimeLow;
-    FindData -> ftLastAccessTime.dwHighDateTime = TimeHigh;
-    FindData -> ftLastWriteTime.dwLowDateTime = TimeLow;
-    FindData -> ftLastWriteTime.dwHighDateTime = TimeHigh;
-
-    FileSize.QuadPart = 0;
-    RCt = XFSNodeFileEditor ( Node, & FileEditor );
-    if ( RCt == 0 ) {
-        if ( FileEditor != NULL ) {
-            RCt = XFSFileEditorSize ( FileEditor, & Size );
-            if ( RCt == 0 ) {
-                FileSize.QuadPart = Size;
-            }
-            XFSEditorDispose ( & ( FileEditor -> Papahen ) );
-        }
-    }
-    if ( RCt != 0 ) {
-        RCt = 0;
-    }
-    FindData -> nFileSizeHigh = FileSize.HighPart;
-    FindData -> nFileSizeLow = FileSize.LowPart;
-
-        /*))
-         // And here is it ... dances with schimpanami
-        ((*/
-    if ( mbstowcs_s (
-                    & CopyNum,
-                    FindData -> cFileName,
-                    MAX_PATH,
-                    Node -> Name,
-                    string_size ( Node -> Name )
-                    ) != 0 ) {
-        RCt = XFS_RC ( rcInvalid );
-    }
-
-    if ( RCt == 0 ) {
-        GetShortPathNameW (
-                        FindData -> cFileName,
-                        FindData -> cAlternateFileName,
-                        sizeof ( FindData -> cAlternateFileName )
-                                                    / sizeof ( WCHAR )
-                        );
-    }
-
-    return RCt;
-}   /* _Read_PWIN32_FIND_DATA () */
-       
-static
-rc_t CC
-_FindDataForFile (
-                const struct XFSDirEditor * Editor,
-                const char * FileName,
-                LPWIN32_FIND_DATAW FindData
-)
-{
-    rc_t RCt;
-    struct XFSNode * Child;
-
-    RCt = 0;
-    Child = NULL;
-
-    if ( Editor == NULL || FileName == NULL || FindData == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-        /*) First we are looking for child node
-         (*/
-    RCt = XFSDirEditorFind ( Editor, FileName, & Child );
-    if ( RCt == 0 ) {
-            /*) Second we are reading data for child node
-             (*/
-        RCt = _Read_PWIN32_FIND_DATA ( Child, FindData );
-    }
-
-    return RCt;
-}   /* _FindDataForFile () */
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_FindFiles (
-            LPCWSTR PathName,
-            PFillFindData FindDataCallback,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    rc_t RCt;
-    struct XFSHandle * Handle;
-    const struct XFSDirEditor * Editor;
-    const struct XFSNode * Node;
-    struct KNamelist * List;
-    uint32_t ListQty, llp;
-    const char * Name;
-    WIN32_FIND_DATAW FindData;
-    int RetVal;
-
-    RCt = 0;
-    Handle = NULL;
-    Editor = NULL;
-    Node = NULL;
-    List = NULL;
-    ListQty = llp = 0;
-    Name = NULL;
-    RetVal = 0;
-
-    if ( PathName == NULL || FindDataCallback == NULL
-        || TheFileInfo == NULL
-    ) {
-        return ERROR_INVALID_DATA * - 1;
-    }
-
-//TT wLogMsg ( klogDebug, L" FIND Files [%s][0x%p]\n", PathName, TheFileInfo );
-
-    Handle = ( struct XFSHandle * ) TheFileInfo -> Context;
-    if ( Handle == NULL ) {
-        return ERROR_INVALID_HANDLE * - 1;
-    }
-
-    Node = XFSHandleNode ( Handle );
-    if ( Node == NULL ) {
-        return ERROR_INVALID_DATA * - 1;
-    }
-
-    if ( XFSNodeDirEditor ( Node, & Editor ) != 0 ) {
-        return ERROR_INVALID_DATA * - 1;
-    }
-
-    if ( Editor == 0 ) {
-        return ERROR_INVALID_FUNCTION * - 1;
-    }
-
-    if ( XFSDirEditorList ( Editor, & List ) == 0 ) {
-        if ( KNamelistCount ( List, & ListQty ) == 0 ) {
-            for ( llp = 0; llp < ListQty; llp ++ ) {
-                RCt = KNamelistGet ( List, llp, & Name );
-                if ( RCt == 0 ) {
-                    RCt = _FindDataForFile ( Editor, Name, & FindData );
-                    if ( RCt == 0 ) {
-                        FindDataCallback ( & FindData, TheFileInfo );
-                    }
-                }
-
-                if ( RCt != 0 ) {
-/* Do we need that? TODO!!!
-                    RetVal = ERROR_INVALID_DATA;
-                    break;
-*/
-                    RCt = 0; /* Right ? */
-                }
-            }
-        }
-        else {
-            RetVal = ERROR_INVALID_DATA;
-        }
-
-        KNamelistRelease ( List );
-    }
-    else {
-        RetVal = ERROR_INVALID_DATA;
-    }
-
-    XFSEditorDispose ( & ( Editor -> Papahen ) );
-
-//TT wLogMsg ( klogDebug, L" FIND Files [%s][0x%p][H=0x%p][V=%d]\n", PathName, TheFileInfo, Handle, RetVal );
-
-    return RetVal * - 1;
-}   /* FindFiles() */
-
-#endif /* USE_XFS_DOKAN_FINDFILES == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_FINDFILESWITHPATTERN == 1
-
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_FindFilesWithPattern (
-            LPCWSTR PathName,
-            LPCWSTR SearchPattern,
-            PFillFindData FindDataCallback,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-//TT wLogMsg ( klogDebug, L"FINDFILESWITHPATTERN(DOKAN): [%s][FI=0x%p]\n", FileName, TheFileInfo );
-    return - 0;
-}   /* FindFilesWithPattern() */
-
-#endif /* USE_XFS_DOKAN_FINDFILESWITHPATTERN == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_SETFILEATTRIBUTES == 1
-
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_SetFileAttributes (
-            LPCWSTR FileName,
-            DWORD FileAttributes,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-//TT wLogMsg ( klogDebug, L"SETFILEATTRIBUTES(DOKAN): [%s][FI=0x%p]\n", FileName, TheFileInfo );
-    return - 0;
-}   /* SetFileAttributes() */
-
-#endif /* USE_XFS_DOKAN_SETFILEATTRIBUTES == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_SETFILETIME == 1
-
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_SetFileTime (
-            LPCWSTR FileName,
-            CONST FILETIME * CreationTime,
-            CONST FILETIME * LastAccessTime,
-            CONST FILETIME * LastWriteTime,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    rc_t RCt;
-    struct XFSAttrEditor * Editor;
-    const struct XFSNode * Node;
-    KTime_t Time;
-    ULONG64 xTime;
-
-    RCt = 0;
-    Editor = NULL;
-    Node = NULL;
-    Time = 0;
-    xTime = 0;
-
-//TT wLogMsg ( klogDebug, L" SET file time: [%s][FI=0x%p]\n", FileName, TheFileInfo );
-
-    if ( FileName == NULL || TheFileInfo == NULL ) {
-        return ERROR_INVALID_DATA * - 1;
-    }
-
-        /*\ First we should convert time to time
-        \*/
-    xTime = LastWriteTime -> dwHighDateTime << 32;
-    xTime += LastWriteTime -> dwLowDateTime;
-    xTime -= 116444736000000000;
-    xTime /= 10000000;
-
-    RCt = _DOKAN_get_path_and_node (
-                                FileName,
-                                TheFileInfo,
-                                NULL,   /* VPath, no need */
-                                & Node,
-                                NULL    /* NodeType */
-                                );
-    if ( RCt == 0 ) {
-        RCt = XFSNodeAttrEditor ( Node, & Editor );
-
-        if ( RCt == 0 ) {
-            RCt = XFSAttrEditorSetDate ( Editor, xTime );
-        }
-
-        XFSNodeRelease ( Node );
-    }
-
-//TT wLogMsg ( klogDebug, L" SET file time,cont: [%s][FI=0x%p][RC=%d]\n", FileName, TheFileInfo, RCt );
-
-    return ( RCt == 0 ? 0 : ERROR_INVALID_DATA ) * - 1;
-}   /* SetFileTime() */
-
-#endif /* USE_XFS_DOKAN_SETFILETIME == 1 */
-
-/************************************************************/
-/************************************************************/
-#if USE_XFS_DOKAN_DELETEFILE == 1
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_DeleteFile (
-            LPCWSTR FileName,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-//TT wLogMsg ( klogDebug, L"DELETE File [%s][FI=0x%p][H=0x%p]\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context );
-
-    RCt = _DOKAN_delete_file_dir ( FileName, TheFileInfo );
-
-//TT wLogMsg ( klogDebug, L"   DELETE File,cont [%s][FI=0x%p][H=0x%p][RC=%d]\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context, RCt );
-
-    return ( RCt == 0 ? 0 : ERROR_INVALID_DATA ) * - 1;
-}   /* DeleteFile() */
-
-#endif /* USE_XFS_DOKAN_DELETEFILE == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_DELETEDIRECTORY == 1
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_DeleteDirectory (
-            LPCWSTR FileName,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-//TT wLogMsg ( klogDebug, L"DELETE Directory [%s][FI=0x%p][H=0x%p]\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context );
-
-    RCt = _DOKAN_delete_file_dir ( FileName, TheFileInfo );
-
-//TT wLogMsg ( klogDebug, L"   DELETE Directory [%s][FI=0x%p][H=0x%p][RC=%d]\n", FileName, TheFileInfo, (void * ) TheFileInfo -> Context, RCt );
-
-    return ( RCt == 0 ? 0 : ERROR_INVALID_DATA ) * - 1;
-}   /* DeleteDirectory() */
-
-#endif /* USE_XFS_DOKAN_DELETEDIRECTORY == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_MOVEFILE == 1
-
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_MoveFile (
-            LPCWSTR OldFile,
-            LPCWSTR NewFile,
-            BOOL ReplaceExisting,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    rc_t RCt;
-    struct XFSNode * OldDir, * NewDir;
-    char * OldName, * NewName;
-    struct XFSDirEditor * Editor;
-
-    RCt = 0;
-    OldDir = NewDir = NULL;
-    OldName = NewName = NULL;
-    Editor = NULL;
-
-//TT wLogMsg ( klogDebug, L"MOVE File FR[%s]TO[%s][FI=0x%p][H=0x%p]\n", OldFile, NewFile, TheFileInfo, (void * ) TheFileInfo -> Context );
-
-    RCt = _DOKAN_get_parent_node_from_char (
-                                        OldFile,
-                                        TheFileInfo,
-                                        & OldDir,
-                                        NULL,
-                                        & OldName
-                                        );
-    if ( RCt == 0 ) {
-        RCt = _DOKAN_get_parent_node_from_char (
-                                            NewFile,
-                                            TheFileInfo,
-                                            & NewDir,
-                                            NULL,
-                                            & NewName
-                                            );
-        if ( RCt == 0 ) {
-            RCt = XFSNodeDirEditor ( OldDir, & Editor );
-            if ( RCt == 0 ) {
-                RCt = XFSDirEditorMove (
-                                    Editor,
-                                    OldName,
-                                    NewDir,
-                                    NewName
-                                    );
-                XFSEditorDispose ( & ( Editor -> Papahen ) );
-            }
-
-            XFSNodeRelease ( NewDir );
-            free ( NewName );
-        }
-
-        XFSNodeRelease ( OldDir );
-        free ( OldName );
-    }
-
-//TT wLogMsg ( klogDebug, L"   MOVE File FR[%s]TO[%s][FI=0x%p][H=0x%p][RC=%d]\n", OldFile, NewFile, TheFileInfo, (void * ) TheFileInfo -> Context, RCt );
-
-    return ( RCt == 0 ? 0 : ERROR_INVALID_DATA ) * - 1;
-}   /* MoveFile() */
-
-#endif /* USE_XFS_DOKAN_MOVEFILE == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_SETENDOFFILE == 1
-
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_SetEndOfFile (
-            LPCWSTR FileName,
-            LONGLONG Length,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    rc_t RCt;
-    struct XFSHandle * Handle;
-    struct XFSFileEditor * FileEditor;
-    const struct XFSNode * Node;
-
-    RCt = 0;
-    Handle = NULL;
-    Editor = NULL;
-    Node = NULL;
-
-//TT wLogMsg ( klogDebug, L" SET end of file: [%s][FI=0x%p]\n", FileName, TheFileInfo );
-
-    if ( FileName == NULL || TheFileInfo == NULL ) {
-        return ERROR_INVALID_DATA * - 1;
-    }
-
-    Handle = ( struct XFSHandle * ) TheFileInfo -> Context;
-
-    Editor = Handle != NULL
-                ? ( struct XFSFileEditor * ) XFSHandleGet ( Handle )
-                : NULL
-                ;
-    if ( Editor == NULL ) {
-        RCt = _DOKAN_get_path_and_node (
-                                    FileName,
-                                    TheFileInfo,
-                                    NULL,   /* VPath, no need */
-                                    & Node,
-                                    NULL    /* NodeType */
-                                    );
-        if ( RCt == 0 ) {
-            RCt = XFSNodeFileEditor ( Node, & Editor );
-            if ( RCt == 0 ) {
-                RCt = XFSFileEditorSetSize ( Editor, Length );
-
-                XFSEditorDispose ( & ( Editor -> Papahen ) );
-            }
-
-            XFSNodeRelease ( Node );
-        }
-    }
-    else {
-        RCt = XFSFileEditorSetSize ( Editor, Length );
-    }
-
-    return ( RCt == 0 ? 0 : ERROR_INVALID_DATA ) * - 1;
-}   /* SetEndOfFile() */
-
-#endif /* USE_XFS_DOKAN_SETENDOFFILE == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_SETALLOCATIONSIZE == 1
-
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_SetAllocationSize (
-            LPCWSTR FileName,
-            LONGLONG Length,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-//TT wLogMsg ( klogDebug, L"SETALLOCATIONSIZE(DOKAN): [%s][FI=0x%p]\n", FileName, TheFileInfo );
-    return - 0;
-}   /* SetAllocationSize() */
-
-#endif /* USE_XFS_DOKAN_SETALLOCATIONSIZE == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_LOCKFILE == 1
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_LockFile (
-            LPCWSTR FileName,
-            LONGLONG ByteOffset,
-            LONGLONG Length,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-//TT wLogMsg ( klogDebug, L"LOCKFILE(DOKAN): [%s][FI=0x%p]\n", FileName, TheFileInfo );
-    return - 0;
-}   /* LockFile() */
-
-#endif /* USE_XFS_DOKAN_LOCKFILE == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_UNLOCKFILE == 1
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_UnlockFile (
-            LPCWSTR FileName,
-            LONGLONG ByteOffset,
-            LONGLONG Length,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-//TT wLogMsg ( klogDebug, L"UNLOCKFILE(DOKAN): [%s][FI=0x%p]\n", FileName, TheFileInfo );
-    return - 0;
-}   /* UnlockFile() */
-
-#endif /* USE_XFS_DOKAN_UNLOCKFILE == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_GETDISKFREESPACE == 1
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_GetDiskFreeSpace (
-            PULONGLONG FreeBytesAvailable,
-            PULONGLONG TotalNumberOfBytes,
-            PULONGLONG TotalNumberOfFreeBytes,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-//TT wLogMsg ( klogDebug, L"GETDISKFREESPACE(DOKAN): [%s][FI=0x%p]\n", FileName, TheFileInfo );
-    return - 0;
-}   /* GetDiskFreeSpace() */
-
-#endif /* USE_XFS_DOKAN_GETDISKFREESPACE == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_GETVOLUMEINFORMATION == 1
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_GetVolumeInformation (
-            LPWSTR VolumeNameBuffer,
-            DWORD VolumeNameSize,
-            LPDWORD VolumeSerialNumber,
-            LPDWORD MaximumComponentLength,
-            LPDWORD FileSystemFlags,
-            LPWSTR FileSystemNameBuffer,
-            DWORD FileSystemNameSize,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-//TT wLogMsg ( klogDebug, L"GETVOLUMEINFORMATION(DOKAN): [FI=0x%p]\n", TheFileInfo );
-
-    wcscpy_s(
-            VolumeNameBuffer,
-            VolumeNameSize / sizeof(WCHAR),
-            // L"NCBI&CO"
-            L"dbGaP"
-            );
-
-    * VolumeSerialNumber = 0x19450509;
-    * MaximumComponentLength = 256;
-    * FileSystemFlags = FILE_CASE_SENSITIVE_SEARCH
-                        | FILE_CASE_PRESERVED_NAMES
-                        | FILE_SUPPORTS_REMOTE_STORAGE
-                        | FILE_UNICODE_ON_DISK
-                        | FILE_PERSISTENT_ACLS  /*  comment if ACL and
-                                                    security does not
-                                                    needed
-                                                */
-                        ;
-
-    wcscpy_s(
-            FileSystemNameBuffer,
-            FileSystemNameSize / sizeof(WCHAR),
-            L"NCBI&CO"
-            );
-
-    return 0;
-}   /* GetVolumeInformation() */
-
-#endif /* USE_XFS_DOKAN_GETVOLUMEINFORMATION == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_UNMOUNT == 1
-
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_Unmount (
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-wLogMsg ( klogDebug, L"UNMOUNT(DOKAN): [FI=0x%p]\n", TheFileInfo );
-    return - 0;
-}   /* Unmount() */
-
-#endif /* USE_XFS_DOKAN_UNMOUNT == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_GETFILESECURITY == 1
-
-/************************************************************
- *  Luriks : see file security.c
- ***********************************************************/
-
-static const char * _sDefaultPermissions = "rwxr-xr-x";
-
-XFS_EXTERN void CC _SI_Dump (
-                        SECURITY_INFORMATION Inf,
-                        char * Buff,
-                        size_t BuffSize
-                        );
-
-XFS_EXTERN rc_t CC XFSSecurityDescriptor (
-                                    SECURITY_INFORMATION SecInfo,
-                                    const char * Permissions,
-                                    XFSNType NodeType,
-                                    PSECURITY_DESCRIPTOR Descriptor,
-                                    ULONG DescriptorLength
-                                    );
-
-XFS_EXTERN rc_t CC XFSSecurityDescriptorSize (
-                                    SECURITY_INFORMATION SecInfo,
-                                    const char * Permissions,
-                                    XFSNType NodeType,
-                                    ULONG * DescSize
-                                    );
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_GetFileSecurity (
-                        LPCWSTR FileName,
-                        PSECURITY_INFORMATION SecInfo,
-                        PSECURITY_DESCRIPTOR SecDsc,
-                        ULONG SecDscLen,
-                        PULONG SecDscLenNeeded,
-                        PDOKAN_FILE_INFO TheFileInfo
-)
-{
-    rc_t RCt;
-    int RetVal;
-    SECURITY_INFORMATION Sinfo;
-    const struct XFSHandle * Handle;
-    const struct XFSNode * Node;
-    const struct XFSAttrEditor * Editor;
-    XFSNType Type;
-    const char * Permissions;
-
-    RetVal = 0;
-    RCt = 0;
-    Sinfo = 0;
-    Handle = NULL;
-    Node = NULL;
-    Editor = NULL;
-    Type = kxfsNotFound;
-    Permissions = NULL;
-
-    if ( FileName == NULL || TheFileInfo == NULL ) {
-        return ERROR_INVALID_DATA * - 1;
-    }
-
-    if ( SecDscLenNeeded == NULL || SecDsc == NULL || SecInfo == NULL ) {
-        return ERROR_INVALID_DATA * - 1;
-    }
-    * SecDscLenNeeded = 0;
-    Sinfo = * SecInfo;
-
-    Handle = ( struct XFSHandle * ) TheFileInfo -> Context;
-
-    if ( Handle == NULL )  {
-        return ERROR_INVALID_HANDLE * - 1;
-    }
-
-    Node = XFSHandleNode ( Handle );
-    if ( Node == NULL ) {
-        return ERROR_INVALID_HANDLE * - 1;
-    }
-
-    if ( XFSNodeAttrEditor ( Node, & Editor ) != 0 ) {
-        return ERROR_INVALID_HANDLE * - 1;
-    }
-
-//TT wLogMsg ( klogDebug, L" SECURITY File [%s][0x%p][E=0x%p]\n", FileName, TheFileInfo, Editor );
-/*
-{
-char FU [ 64 ];
-_SI_Dump ( Sinfo, FU, sizeof ( FU ) );
-printf ( "SECURITY File [%s][0x%p]\n", FU, TheFileInfo );
-}
-*/
-
-    RCt = XFSAttrEditorType ( Editor, & Type );
-    if ( RCt == 0 ) {
-        if ( Type == kxfsFile || Type == kxfsDir || Type == kxfsLink ) {
-            RCt = XFSAttrEditorPermissions ( Editor, & Permissions );
-            if ( RCt == 0 ) {
-
-                if ( Permissions == NULL ) {
-                    Permissions = _sDefaultPermissions;
-                }
-
-                /*   First we are going to check if here is enough space
-                 */
-                RCt = XFSSecurityDescriptorSize (
-                                            Sinfo,
-                                            Permissions,
-                                            Type,
-                                            SecDscLenNeeded
-                                            );
-                if ( RCt == 0 && 0 < * SecDscLenNeeded ) {
-                    if ( SecDscLen == 0 || SecDscLen < * SecDscLenNeeded ) {
-//TT wLogMsg ( klogDebug, L" SECURITY File ( SIZE Requested ) [%s][NS=%d][BS=%d]\n", FileName, * SecDscLenNeeded, SecDscLen );
-                        RetVal = ERROR_INSUFFICIENT_BUFFER;
-                    }
-                    else {
-                        RCt = XFSSecurityDescriptor (
-                                                Sinfo,
-                                                Permissions,
-                                                Type,
-                                                SecDsc,
-                                                SecDscLen
-                                                );
-                    }
-                }
-            }
-        }
-        else {
-            RCt = XFS_RC ( rcInvalid );
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( RetVal == 0 ) {
-            RetVal = ERROR_INVALID_HANDLE;
-        }
-    }
-
-    XFSEditorDispose ( & ( Editor -> Papahen ) );
-//TT wLogMsg ( klogDebug, L" SECURITY File,cont [%s][0x%p][R=%d]\n", FileName, TheFileInfo, RetVal );
-
-    return RetVal * - 1;
-}   /* GetFileSecurity() */
-
-#endif /* USE_XFS_DOKAN_GETFILESECURITY == 1 */
-
-/************************************************************/
-/************************************************************/
-
-#if USE_XFS_DOKAN_SETFILESECURITY == 1
-
-static
-int DOKAN_CALLBACK
-XFS_DOKAN_SetFileSecurity (
-            LPCWSTR FileName,
-            PSECURITY_INFORMATION SecurityInformation,
-            PSECURITY_DESCRIPTOR SecurityDescriptor,
-            ULONG SecurityDescriptorLength,
-            PDOKAN_FILE_INFO TheFileInfo
-)
-{
-//TT wLogMsg ( klogDebug, L"SETFILESECURITY(DOKAN): [%s][FI=0x%p]\n", FileName, TheFileInfo );
-    return - 0;
-}   /* SetFileSecurity() */
-
-#endif /* USE_XFS_DOKAN_SETFILESECURITY == 1 */
-
-/************************************************************/
-/************************************************************/
-
-/*))
-  || Old good necessary method
-  (*/
-LIB_EXPORT
-rc_t CC
-XFS_Private_InitOperations ( DOKAN_OPERATIONS * Operations )
-{
-    if ( Operations == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    ZeroMemory ( Operations, sizeof( struct _DOKAN_OPERATIONS ) );
-
-
-#if USE_XFS_DOKAN_CREATEFILE == 1
-    Operations -> CreateFile = XFS_DOKAN_CreateFile;
-#endif /* USE_XFS_DOKAN_CREATEFILE == 1 */
-
-#if USE_XFS_DOKAN_OPENDIRECTORY == 1
-    Operations -> OpenDirectory = XFS_DOKAN_OpenDirectory;
-#endif /* USE_XFS_DOKAN_OPENDIRECTORY == 1 */
-
-#if USE_XFS_DOKAN_CREATEDIRECTORY == 1
-    Operations -> CreateDirectory = XFS_DOKAN_CreateDirectory;
-#endif /* USE_XFS_DOKAN_CREATEDIRECTORY == 1 */
-
-#if USE_XFS_DOKAN_CLEANUP == 1
-    Operations -> Cleanup = XFS_DOKAN_Cleanup;
-#endif /* USE_XFS_DOKAN_CLEANUP == 1 */
-
-#if USE_XFS_DOKAN_CLOSEFILE == 1
-    Operations -> CloseFile = XFS_DOKAN_CloseFile;
-#endif /* USE_XFS_DOKAN_CLOSEFILE == 1 */
-
-#if USE_XFS_DOKAN_READFILE == 1
-    Operations -> ReadFile = XFS_DOKAN_ReadFile;
-#endif /* USE_XFS_DOKAN_READFILE == 1 */
-
-#if USE_XFS_DOKAN_WRITEFILE == 1
-    Operations -> WriteFile = XFS_DOKAN_WriteFile;
-#endif /* USE_XFS_DOKAN_WRITEFILE == 1 */
-
-#if USE_XFS_DOKAN_FLUSHFILEBUFFERS == 1
-    Operations -> FlushFileBuffers = XFS_DOKAN_FlushFileBuffers;
-#endif /* USE_XFS_DOKAN_FLUSHFILEBUFFERS == 1 */
-
-#if USE_XFS_DOKAN_GETFILEINFORMATION == 1
-    Operations -> GetFileInformation = XFS_DOKAN_GetFileInformation;
-#endif /* USE_XFS_DOKAN_GETFILEINFORMATION == 1 */
-
-#if USE_XFS_DOKAN_FINDFILES == 1
-    Operations -> FindFiles = XFS_DOKAN_FindFiles;
-#endif /* USE_XFS_DOKAN_FINDFILES == 1 */
-
-#if USE_XFS_DOKAN_FINDFILESWITHPATTERN == 1
-    Operations -> FindFilesWithPattern = XFS_DOKAN_FindFilesWithPattern;
-#endif /* USE_XFS_DOKAN_FINDFILESWITHPATTERN == 1 */
-
-#if USE_XFS_DOKAN_SETFILEATTRIBUTES == 1
-    Operations -> SetFileAttributes = XFS_DOKAN_SetFileAttributes;
-#endif /* USE_XFS_DOKAN_SETFILEATTRIBUTES == 1 */
-
-#if USE_XFS_DOKAN_SETFILETIME == 1
-    Operations -> SetFileTime = XFS_DOKAN_SetFileTime;
-#endif /* USE_XFS_DOKAN_SETFILETIME == 1 */
-
-#if USE_XFS_DOKAN_DELETEFILE == 1
-    Operations -> DeleteFile = XFS_DOKAN_DeleteFile;
-#endif /* USE_XFS_DOKAN_DELETEFILE == 1 */
-
-#if USE_XFS_DOKAN_DELETEDIRECTORY == 1
-    Operations -> DeleteDirectory = XFS_DOKAN_DeleteDirectory;
-#endif /* USE_XFS_DOKAN_DELETEDIRECTORY == 1 */
-
-#if USE_XFS_DOKAN_MOVEFILE == 1
-    Operations -> MoveFile = XFS_DOKAN_MoveFile;
-#endif /* USE_XFS_DOKAN_MOVEFILE == 1 */
-
-#if USE_XFS_DOKAN_SETENDOFFILE == 1
-    Operations -> SetEndOfFile = XFS_DOKAN_SetEndOfFile;
-#endif /* USE_XFS_DOKAN_SETENDOFFILE == 1 */
-
-#if USE_XFS_DOKAN_SETALLOCATIONSIZE == 1
-    Operations -> SetAllocationSize = XFS_DOKAN_SetAllocationSize;
-#endif /* USE_XFS_DOKAN_SETALLOCATIONSIZE == 1 */
-
-#if USE_XFS_DOKAN_LOCKFILE == 1
-    Operations -> LockFile = XFS_DOKAN_LockFile;
-#endif /* USE_XFS_DOKAN_LOCKFILE == 1 */
-
-#if USE_XFS_DOKAN_UNLOCKFILE == 1
-    Operations -> UnlockFile = XFS_DOKAN_UnlockFile;
-#endif /* USE_XFS_DOKAN_UNLOCKFILE == 1 */
-
-#if USE_XFS_DOKAN_GETDISKFREESPACE == 1
-    Operations -> GetDiskFreeSpace = XFS_DOKAN_GetDiskFreeSpace;
-#endif /* USE_XFS_DOKAN_GETDISKFREESPACE == 1 */
-
-#if USE_XFS_DOKAN_GETVOLUMEINFORMATION == 1
-    Operations -> GetVolumeInformation = XFS_DOKAN_GetVolumeInformation;
-#endif /* USE_XFS_DOKAN_GETVOLUMEINFORMATION == 1 */
-
-#if USE_XFS_DOKAN_UNMOUNT == 1
-    Operations -> Unmount = XFS_DOKAN_Unmount;
-#endif /* USE_XFS_DOKAN_UNMOUNT == 1 */
-
-#if USE_XFS_DOKAN_GETFILESECURITY == 1
-    Operations -> GetFileSecurity = XFS_DOKAN_GetFileSecurity;
-#endif /* USE_XFS_DOKAN_GETFILESECURITY == 1 */
-
-#if USE_XFS_DOKAN_SETFILESECURITY == 1
-    Operations -> SetFileSecurity = XFS_DOKAN_SetFileSecurity;
-#endif /* USE_XFS_DOKAN_SETFILESECURITY == 1 */
-
-    return 0;
-}   /* XFS_Private_InitOperations() */
-
-
-/****************************************************************
- * LogMsg as pLogMsg does not work with WCHAR ... so ... julep
- ****************************************************************/
-LIB_EXPORT
-rc_t CC
-wLogMsg ( KLogLevel Level, LPCWSTR Format, ... )
-{
-    rc_t RCt;
-    WCHAR BF [ XFS_SIZE_4096 ];
-    char BFF [ XFS_SIZE_4096 ];
-    va_list Args;
-    size_t Size;
-
-    RCt = 0;
-    * BF = 0;
-    * BFF = 0;
-    Size = 0;
-
-    if ( Level <= KLogLevelGet () ) {
-        va_start ( Args, Format );
-
-        if ( vswprintf ( BF, sizeof ( BF ) / sizeof ( WCHAR ), Format, Args ) == - 1 ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-
-        va_end ( Args );
-
-        if ( RCt == 0 ) {
-            if ( wcstombs_s ( & Size, BFF, sizeof ( BFF ), BF, wcslen ( BF ) ) == 0 ) {
-                RCt = LogMsg ( Level, BFF );
-            }
-            else {
-                RCt = XFS_RC ( rcInvalid );
-            }
-        }
-    }
-
-    return RCt;
-}   /* wLogMsg () */
diff --git a/libs/xfs/win/operations.h b/libs/xfs/win/operations.h
deleted file mode 100644
index d82a898..0000000
--- a/libs/xfs/win/operations.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_xfs_native_peer_operations_
-#define _h_xfs_native_peer_operations_
-
-#include <klib/rc.h>
-#include <WTypes.h>
-
-    /*  We are still working under the version 2.5 because there is
-        port on MAC for that
-    */
-#include <dokan.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-    /*  Here we are going to fill that evis structure
-    */
-XFS_EXTERN rc_t CC XFS_Private_InitOperations ( DOKAN_OPERATIONS * Ops );
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _h_xfs_native_peer_operations_ */
diff --git a/libs/xfs/win/platform.c b/libs/xfs/win/platform.c
deleted file mode 100644
index e1cf4ac..0000000
--- a/libs/xfs/win/platform.c
+++ /dev/null
@@ -1,541 +0,0 @@
-/*===========================================================================
-
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/log.h>
-#include <kproc/thread.h>
-#include <xfs/xfs.h>
-#include <xfs/xlog.h>
-
-#include "xfs-priv.h"
-#include "platform.h"
-
-#include <sysalloc.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <Shlwapi.h>
-
-/*  Some platform dependent headers
- */
-
-#include "operations.h"
-
-
-/*  Some useless pranks
- */
-
-XFS_EXTERN rc_t CC XFSSecurityInit ();
-XFS_EXTERN rc_t CC XFSSecurityDeinit ();
-XFS_EXTERN rc_t CC wLogMsg ( KLogLevel Level, LPCWSTR Format, ... );
-
-/*
- *  Virtuhai table and it's methods
- */
-static rc_t XFS_DOKAN_init_v1( struct XFSControl * self );
-static rc_t XFS_DOKAN_destroy_v1( struct XFSControl * self );
-static rc_t XFS_DOKAN_mount_v1( struct XFSControl * self );
-static rc_t XFS_DOKAN_loop_v1( struct XFSControl * self);
-static rc_t XFS_DOKAN_unmount_v1( struct XFSControl * self);
-
-static struct XFSControl_vt_v1 XFSControl_VT_V1 = {
-    1,
-    1,
-    XFS_DOKAN_init_v1,
-    XFS_DOKAN_destroy_v1,
-    XFS_DOKAN_mount_v1,
-    XFS_DOKAN_loop_v1,
-    XFS_DOKAN_unmount_v1
-};
-
-/*  Control init.
- */
-LIB_EXPORT
-rc_t CC
-XFSControlPlatformInit ( struct XFSControl * self )
-{
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    self -> vt = ( union XFSControl_vt * ) & XFSControl_VT_V1;
-
-    return 0;
-}   /* XFSControlInit () */
-
-/*  Overloadable versions
- */
-rc_t
-XFS_DOKAN_init_v1( struct XFSControl * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    LogMsg ( klogDebug, "XFS_DOKAN_init()" );
-
-        /*) Standard checks
-         (*/
-    if ( self -> Control != NULL ) {
-        LogMsg ( klogDebug, "XFS_DOKAN_init(): control is not empty" );
-        return XFS_RC ( rcUnexpected );
-    }
-
-    if ( self -> Arguments == NULL ) {
-        LogMsg ( klogDebug, "XFS_DOKAN_init(): arguments are empty" );
-        return XFS_RC ( rcUnexpected );
-    }
-
-    if ( XFSControlGetLabel ( self ) == NULL ) {
-        RCt = XFSControlSetLabel ( self, "DOKAN" );
-    }
-
-    return RCt;
-}   /* XFS_DOKAN_init() */
-
-rc_t
-XFS_DOKAN_destroy_v1( struct XFSControl * self )
-{
-    PDOKAN_OPTIONS Options;
-
-    Options = NULL;
-
-    LogMsg ( klogDebug, "XFS_DOKAN_destroy()" );
-
-    if ( self == NULL ) { 
-        LogMsg ( klogDebug, "XFS_DOKAN_destroy(): NULL self passed" );
-
-        return XFS_RC ( rcNull );
-    }
-
-    Options = ( PDOKAN_OPTIONS ) self -> Control;
-
-    if ( Options == NULL ) {
-        LogMsg ( klogDebug, "XFS_DOKAN_destroy(): options are empty" );
-    }
-    else {
-        if ( Options -> MountPoint != NULL ) {
-            free ( ( char * ) Options -> MountPoint );
-            Options -> MountPoint = NULL;
-        }
-
-        free ( Options );
-        self -> Control = NULL;
-    }
-
-    return 0;
-}   /* XFS_DOKAN_destroy() */
-
-static
-rc_t CC
-_InitDOKAN_OPERATIONS ( DOKAN_OPERATIONS ** Operations )
-{
-    rc_t RCt;
-    DOKAN_OPERATIONS * RetOp;
-
-    RCt = 0;
-    RetOp = NULL;
-
-    XFS_CSAN ( Operations )
-    XFS_CAN ( Operations )
-
-    RetOp = calloc ( 1, sizeof ( DOKAN_OPERATIONS ) );
-    if ( RetOp == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = XFS_Private_InitOperations ( RetOp );
-        if ( RCt == 0 ) {
-            * Operations = RetOp;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Operations = NULL;
-
-        if ( RetOp != NULL ) {
-            free ( RetOp );
-        }
-    }
-
-    return RCt;
-}   /* _InitDOKAN_OPERATIONS () */
-
-XFS_EXTERN rc_t CC XFSPathInnerToNative (
-                                WCHAR * NativePathBuffer,
-                                size_t NativePathBufferSize,
-                                const char * InnerPath,
-                                ...
-                                );
-
-static
-rc_t CC
-_MakeMountPath ( const char * Inner, const WCHAR ** MountPath )
-{
-    rc_t RCt;
-    WCHAR BF [ XFS_SIZE_64 ];
-    WCHAR * Path;
-    size_t SZ;
-
-    RCt = 0;
-    * BF = 0;
-    Path = NULL;
-    SZ = 0;
-
-    XFS_CSAN ( MountPath )
-    XFS_CAN ( Inner )
-    XFS_CAN ( MountPath )
-
-    RCt = XFSPathInnerToNative ( BF, sizeof ( BF ), Inner );
-    if ( RCt == 0 ) {
-        SZ = wcslen ( BF );
-        if ( BF [ SZ - 1 ] == L'\\' ) {
-            BF [ SZ - 1 ] = 0;
-            SZ --;
-        }
-
-        Path = calloc ( SZ + 1, sizeof ( WCHAR ) );
-        if ( Path == NULL ) {
-            RCt = XFS_RC ( rcExhausted );
-        }
-        else {
-            wcscpy ( Path, BF );
-
-            * MountPath = Path;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * MountPath = NULL;
-
-        if ( Path != NULL ) {
-            free ( Path );
-        }
-    }
-
-    return RCt;
-}   /* _MakeMountPath () */
-
-rc_t
-XFS_DOKAN_mount_v1( struct XFSControl * self )
-{
-    rc_t RCt;
-    DOKAN_OPTIONS * Options;
-
-    RCt = 0;
-    Options = NULL;
-
-    LogMsg ( klogDebug, "XFS_DOKAN_mount()" );
-
-    if ( self == NULL ) {
-        LogMsg ( klogDebug, "ZERO self passed" );
-        return XFS_RC ( rcNull );
-    }
-
-    if ( ( RCt = XFSSecurityInit () ) != 0 ) {
-        LogMsg ( klogDebug, "Can not initialize DOKAN security" );
-        return RCt;
-    }
-
-        /*) Here we are allocating DOKAN options and it's global context
-         (*/
-    Options = calloc ( 1, sizeof ( DOKAN_OPTIONS ) );
-    if ( Options == NULL ) {
-        RCt = XFS_RC ( rcNull );
-    }
-    else {
-
-        Options -> Version = DOKAN_VERSION;
-        Options -> ThreadCount = 0; /* Default Value */
-        Options -> Options = 0L;
-        Options -> Options |= DOKAN_OPTION_KEEP_ALIVE;
-        Options -> Options |= DOKAN_OPTION_DEBUG;
-            /*) using Peer as GlobalContext as for FUSE implementation
-             (*/
-        Options -> GlobalContext = ( ULONG64 )( self -> TreeDepot );
-
-        RCt = _MakeMountPath (
-                            XFSControlGetMountPoint ( self ),
-                            & ( Options -> MountPoint )
-                            );
-        if ( RCt == 0 ) {
-            if ( PathFileExistsW ( Options -> MountPoint ) == TRUE ) {
-                wLogMsg ( klogFatal, L"Mount point in use [%s]\n", Options -> MountPoint );
-                RCt = XFS_RC ( rcInvalid );
-            }
-            else {
-                self -> Control = Options;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        self -> Control = NULL;
-
-        if ( Options != NULL ) {
-            if ( Options -> MountPoint != NULL ) {\
-                free ( ( char * ) Options -> MountPoint );
-                Options -> MountPoint = NULL;
-            }
-            free ( Options );
-        }
-    }
-
-    return RCt;
-}   /* XFS_DOKAN_mount() */
-
-rc_t
-XFS_DOKAN_loop_v1( struct XFSControl * self )
-{
-    rc_t RCt;
-    DOKAN_OPTIONS * Options;
-    DOKAN_OPERATIONS * Operations;
-    const struct XFSTree * Tree;
-
-    RCt = 0;
-    Operations = NULL;
-    Options = NULL;
-    Tree = NULL;
-
-    LogMsg ( klogDebug, "XFS_DOKAN_loop()" );
-
-    if ( self == NULL ) {
-        LogMsg ( klogDebug, "XFSControl: ZERO self passed" );
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> TreeDepot == NULL ) {
-        LogMsg ( klogDebug, "XFSControl: ZERO passed" );
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = XFSControlGetTree ( self, & Tree );
-    if ( RCt != 0 || Tree == NULL ) {
-        LogMsg ( klogDebug, "XFSControl: ZERO Tree DATA passed" );
-        return XFS_RC ( rcNull );
-    }
-
-    Options = ( DOKAN_OPTIONS * ) self -> Control;
-    if ( Options == NULL ) {
-        LogMsg ( klogDebug, "XFSControl: ZERO options passed" );
-        return XFS_RC ( rcNull );
-    }
-
-pLogMsg ( klogDebug, "XFS_DOKAN_loop(): Tree [$(tree)] Data [$(data)]\n",  "tree=%p,data=%p", self -> TreeDepot, Tree );
-
-
-/*  We will split mount method for mount'n'loop later, so there is 
-    usual routine stuff
-*/
-
-    RCt = _InitDOKAN_OPERATIONS ( & Operations );
-    if ( RCt == 0 ) {
-            /*)
-             /  There we are running DokanMain
-            (*/
-        switch ( DokanMain ( Options, Operations ) ) {
-            case DOKAN_SUCCESS :
-                LogMsg ( klogDebug, "DokanMain() : general success" );
-                break;
-            case DOKAN_ERROR :
-                RCt = XFS_RC ( rcError );
-                LogErr ( klogDebug, RCt, "DokanMain() : general error" );
-                break;
-            case DOKAN_DRIVE_LETTER_ERROR :
-                RCt = XFS_RC ( rcError );
-                LogErr ( klogDebug, RCt, "DokanMain() : bad drive letter" );
-                break;
-            case DOKAN_DRIVER_INSTALL_ERROR :
-                RCt = XFS_RC ( rcError );
-                LogErr ( klogDebug, RCt, "DokanMain() : can't install driver" );
-                break;
-            case DOKAN_START_ERROR :
-                RCt = XFS_RC ( rcError );
-                LogErr ( klogDebug, RCt, "DokanMain() : can't start, something wrong" );
-                break;
-            case DOKAN_MOUNT_ERROR :
-                RCt = XFS_RC ( rcError );
-                LogErr ( klogDebug, RCt, "DokanMain() : can't assigh a drive letter or mount point" );
-                break;
-            case DOKAN_MOUNT_POINT_ERROR :
-                RCt = XFS_RC ( rcError );
-                LogErr ( klogDebug, RCt, "DokanMain() : mount point is invalid" );
-                break;
-            default :
-                RCt = XFS_RC ( rcError );
-                LogErr ( klogDebug, RCt, "DokanMain() : something wrong happens" );
-                break;
-        }
-
-        free ( Operations );
-    }
-
-pLogMsg ( klogDebug, "XFS_DOKAN_loop(): Exited Tree [$(tree)]", "tree=%p", self -> TreeDepot );
-
-    return RCt;
-}   /* XFS_DOKAN_loop() */
-
-rc_t
-XFS_DOKAN_unmount_v1( struct XFSControl * self )
-{
-    rc_t RCt = 0;
-
-    if ( self == NULL ) {
-        LogMsg ( klogDebug, "ZERO self passed" );
-        /*
-        return XFS_RC ( rcNull );
-        */
-        return 0;
-    }
-
-    if ( self -> Control == NULL ) {
-        LogMsg ( klogDebug, "ZERO self passed" );
-        /*
-        return XFS_RC ( rcNull );
-        */
-        return 0;
-    }
-
-    XFSSecurityDeinit ();
-
-    return 0;
-}   /* XFS_DOKAN_unmount() */
-
-/********************
- * Something extra
- *************/
-static
-rc_t CC
-_GetProgPath ( WCHAR * Path, DWORD PathSize)
-{
-    const WCHAR * cP = L"\\Dokan\\DokanLibrary\\dokanctl.exe";
-
-        /* First we are trying %ProgramFiles(x86)%
-         */
-    if ( GetEnvironmentVariableW ( L"%ProgramFiles(x86)%", Path, PathSize ) == 0 ) {
-        wcscat ( Path, cP );
-        if ( PathFileExistsW ( Path ) == TRUE ) {
-            return 0;
-        }
-    }
-
-        /* First we are trying %ProgramFiles%
-         */
-    if ( GetEnvironmentVariableW ( L"%ProgramFiles%", Path, PathSize ) == 0 ) {
-        wcscat ( Path, cP );
-        if ( PathFileExistsW ( Path ) == TRUE ) {
-            return 0;
-        }
-    }
-
-    wcscpy_s (
-        Path,
-        PathSize,
-        L"C:\\Program Files (x86)\\Dokan\\DokanLibrary\\dokanctl.exe"
-        );
-    return PathFileExistsW ( Path ) == TRUE ? 0 : XFS_RC ( rcNotFound );
-}   /* _GetProgPath () */
-
-/*))    Special platform dependent method
-  ||    very specific method. It is looking for
-  ||        %ProgramFiles(x86)%\Dokan\DokanLibrary\dokanctl.exe
-  ||    or
-  ||        %ProgramFiles%\Dokan\DokanLibrary\dokanctl.exe
-  ||    or
-  ||        C:\Program Files (x86)\Dokan\DokanLibrary\dokanctl.exe
-  ((*/
-LIB_EXPORT
-rc_t CC
-XFSUnmountAndDestroy ( const char * MountPoint )
-{
-    rc_t RCt;
-    WCHAR Path [ XFS_SIZE_4096 ];
-    WCHAR Comm [ XFS_SIZE_4096 ];
-    WCHAR * MPath;
-    BOOL Ret;
-    STARTUPINFO StartInfo;
-    PROCESS_INFORMATION Process;
-    int Err;
-
-    RCt = 0;
-    * Path = 0;
-    * Comm = 0;
-    MPath = NULL;
-    Ret = FALSE;
-    ZeroMemory ( & StartInfo, sizeof( StartInfo ) );
-    ZeroMemory ( & Process, sizeof( Process ) );
-    Err = 0;
-
-    RCt = _MakeMountPath ( MountPoint, & MPath );
-    if ( RCt == 0 ) {
-        if ( PathFileExistsW ( MPath ) == TRUE ) {
-            wLogMsg ( klogInfo, L"Unmounting volume [%s]\n", MPath );
-
-            RCt = _GetProgPath ( Path, sizeof ( Path ) / sizeof ( WCHAR ) );
-            if ( RCt == 0 ) {
-                swprintf (
-                        Comm,
-                        sizeof ( Comm ) / sizeof ( WCHAR ),
-                        L"\"%s\" /u %s",
-                        Path,
-                        MPath
-                        );
-                wLogMsg ( klogInfo, L"Executing [%s]\n", Comm );
-                Ret = CreateProcessW (
-                                    NULL,
-                                    Comm,
-                                    NULL,
-                                    NULL,
-                                    FALSE,
-                                    DETACHED_PROCESS,
-                                    NULL,
-                                    NULL,
-                                    & StartInfo,
-                                    & Process
-                                    );
-                if ( Ret == 0 ) {
-                    wLogMsg ( klogErr, L"Failed [%s] ErrNo [%d]\n", Comm, GetLastError () );
-                }
-            }
-            else {
-                wLogMsg ( klogErr, L"CRITICAL: Can not find 'dokanctl.exe' utility.\n" );
-                wLogMsg ( klogErr, L"          Please ask administrator about it location. \n" );
-                wLogMsg ( klogErr, L"          Please use command 'dokanctl.exe /u %s'. \n", MPath );
-            }
-        }
-        else {
-            wLogMsg ( klogErr, L"Can not find volume [%s]\n", MPath );
-        }
-
-        free ( MPath );
-    }
-
-
-    return RCt;
-}   /* XFSUnmountAndDestroy () */
diff --git a/libs/xfs/win/security.c b/libs/xfs/win/security.c
deleted file mode 100644
index 4aa28f8..0000000
--- a/libs/xfs/win/security.c
+++ /dev/null
@@ -1,1935 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <windows.h>
-#include <WinBase.h>
-#include <AccCtrl.h>
-#include <AclApi.h>
-#include <WinNT.h>
-
-#include <klib/container.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <kproc/lock.h>
-
-#include <xfs/editors.h>
-#include <xfs/perm.h>
-
-#include <sysalloc.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "zehr.h"
-
-/*)))
- ///    This file contains security related stuff. Main goal is to 
- \\\    convert XFSPerm object to security descriptor.
- (((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * That is simple storage for any used SID.
- *
- * The simple reason why I am organizing that storage is :
- *    I should create SECURITY_DESCRIPTOR and convert it to 
- *    PSECURITY_DESCRIPTOR ( which is relative ) and there are
- *    many phases where we should create and free SID by
- *    different reason. And it will complicate uninitialising
- *    procedure in the cases when, for example DACL constucting
- *    failed.
- * There are several disadvantages, for example, if SID was
- *    changed during program execution ... we will think about
- *    that later
- * Another disadvantage is : it suppose to be thread safe
- * 
- * SID is stored and accessed by name ( char * ) of account associated
- * User responsible for initializing SID storage before it's usage
- * and for destroying it after.
- * User could cal method "_SidStorageRehash ()" to renew all sids.
- *_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*) That is a lock which I will use to access stored SIDs
- (*/
-static struct KLock * _sMutabor = NULL;
-
-/*) That is a SIDs storage
- (*/
-static BSTree _sSidStorage;
-
-/*) That struct represents node with SID stored
- (*/
-struct __SidNode {
-        /*) mandatory
-         (*/
-    BSTNode node;
-
-        /*) Account name
-         (*/
-    const char * name;
-
-        /*) SID associated with account
-         (*/
-    SID * sid;
-        /*) SID size, You could always calculate it, but shortcut
-         (*/
-    DWORD size;
-};
-
-/*)))
-  |||   Those are prototypes for storage data accessing funcions
-  |||   Some are locking, and some are not. Those, which are withou
-  |||   locking, they does not check for NuLL
- (((*/
-static rc_t CC _ClearSidStorageNoLock ();
-static const struct __SidNode * _FindSidNoLock ( const char * Name );
-static rc_t _GetSidAndSizeNoLock (
-                            const  char * Name,
-                            SID ** Sid,
-                            DWORD * SidSize
-                            );
-
-static SID * _SidStorageGet ( const char * Name );
-static DWORD _SidStorageGetSize ( const char * Name );
-static rc_t _SidStorageRehash ();
-
-/*)))   Returns true if storage is good and usable.
- ///    Very simple check, but it is better to use method
- \\\    instead copy pasting code
- (((*/
-static
-bool
-_IsSidStorageGood ()
-{
-    return _sMutabor != NULL;
-}   /* _IsSidStorageGood () */
-
-/*)))   Two methods: _InitSidStorage() and _DisposeSidStorage()
- ///    You should call them before and after
-(((*/
-static
-rc_t CC
-_SidStorageInit ()
-{
-    rc_t RCt;
-    struct KLock * tLock;
-
-    RCt = 0;
-    tLock = NULL;
-
-    if ( _IsSidStorageGood () ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KLockMake ( & tLock );
-    if ( RCt == 0 ) {
-        BSTreeInit ( & _sSidStorage );
-    }
-
-    if ( RCt == 0 ) {
-        _sMutabor = tLock;
-    }
-    else {
-        if ( tLock != NULL ) {
-            KLockRelease ( tLock );
-        }
-    }
-
-    return RCt;
-}   /* _SidStorageInit () */
-
-static
-rc_t CC
-_SidStorageDispose ()
-{
-    if ( ! _IsSidStorageGood () ) {
-        return 0;
-    }
-
-        /*) No check for return code 
-         (*/
-    _ClearSidStorageNoLock ();
-
-        /*) Disengageing Lock
-         (*/
-    KLockRelease ( _sMutabor );
-
-    return 0;
-}   /* _SidStorageDispose () */
-
-SID * CC
-_SidStorageGet ( const char * Name )
-{
-    SID * RetVal;
-    rc_t RCt;
-    const struct __SidNode * Node;
-
-    RetVal = 0;
-    RCt = 0;
-    Node = NULL;
-
-    if ( _IsSidStorageGood () ) {
-        RCt = KLockAcquire ( _sMutabor );
-        if ( RCt == 0 ) {
-            Node = _FindSidNoLock ( Name );
-
-            if ( Node != NULL ) {
-                RetVal = Node -> sid;
-            }
-
-            KLockUnlock ( _sMutabor );
-        }
-    }
-
-    return RetVal;
-}   /* _SidStorageGet () */
-
-DWORD CC
-_SidStorageGetSize ( const char * Name )
-{
-    DWORD RetVal;
-    rc_t RCt;
-    const struct __SidNode * Node;
-
-    RetVal = 0;
-    RCt = 0;
-    Node = NULL;
-
-    if ( _IsSidStorageGood () ) {
-        RCt = KLockAcquire ( _sMutabor );
-        if ( RCt == 0 ) {
-            Node = _FindSidNoLock ( Name );
-
-            if ( Node != NULL ) {
-                RetVal = Node -> size;
-            }
-
-            KLockUnlock ( _sMutabor );
-        }
-    }
-
-    return RetVal;
-}   /* _SidStorageGetSize () */
-
-rc_t CC
-_SidStorageRehash ()
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( _IsSidStorageGood () ) {
-        RCt = KLockAcquire ( _sMutabor );
-        if ( RCt == 0 ) {
-            RCt = _ClearSidStorageNoLock ();
-
-            KLockUnlock ( _sMutabor );
-        }
-    }
-
-    return RCt;
-}   /* _SidStorageRehash () */
-
-static
-rc_t CC
-_SidNodeMake ( const char * Name, struct __SidNode ** Node )
-{
-    struct __SidNode * Ret;
-    SID * Sid;
-    DWORD SidSize;
-    rc_t RCt;
-
-    Ret = NULL;
-    Sid = NULL;
-    SidSize = 0;
-    RCt = 0;
-
-    if ( Name == NULL || Node == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Node = NULL;
-
-        /*)) If Account does not exist, we do create empty node, and
-         //  it is users responsibility to handle such account
-        ((*/
-    RCt = _GetSidAndSizeNoLock ( Name, & Sid, & SidSize );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    Ret = calloc ( 1, sizeof ( struct __SidNode ) );
-    if ( Ret == NULL ) {
-        if ( Sid != NULL ) {
-            free ( Sid );
-        }
-
-        return XFS_RC ( rcExhausted );
-    }
-
-    Ret -> name = ( const char * ) string_dup_measure ( Name, NULL );
-    if ( Ret -> name == NULL ) {
-        if ( Sid != NULL ) {
-            free ( Sid );
-        }
-
-        free ( Ret );
-
-        return XFS_RC ( rcExhausted );
-    }
-
-    Ret -> sid = Sid;
-    Ret -> size = SidSize;
-
-    * Node = Ret;
-
-    return 0;
-}   /* _SidNodeMake () */
-
-static
-rc_t CC
-_SidNodeDispose ( struct __SidNode * self )
-{
-    if ( self != NULL ) {
-        if ( self -> name != NULL ) {
-            free ( ( char * ) self -> name );
-        }
-
-        self -> name = NULL;
-
-        if ( self -> sid != NULL ) {
-            free ( self -> sid );
-        }
-
-        self -> sid = NULL;
-
-        self -> size = 0;
-    }
-    return 0;
-}   /* _SidNodeDispose () */
-
-static
-void CC
-_SidStorageWhackCallback ( BSTNode * Node, void * Unused )
-{
-    if ( Node != NULL ) {
-        _SidNodeDispose ( ( struct __SidNode * ) Node );
-    }
-}   /* _SidStorageWhackCallback () */
-
-rc_t CC
-_ClearSidStorageNoLock ()
-{
-    BSTreeWhack (  & _sSidStorage, _SidStorageWhackCallback, NULL );
-    return 0;
-}   /* _ClearSidStorageNoLock () */
-
-static
-int64_t CC
-_SidStorageAddCallback ( const BSTNode * Node1, const BSTNode * Node2 )
-{
-    return XFS_StringCompare4BST_ZHR (
-                            ( ( struct __SidNode * ) Node1 ) -> name,
-                            ( ( struct __SidNode * ) Node2 ) -> name
-                            );
-}   /* _SidStorageAddCallback () */
-
-static
-rc_t CC
-_AddSidNoLock ( const char * Name, struct __SidNode ** Ret )
-{
-    struct __SidNode * Node;
-    rc_t RCt;
-
-    Node = NULL;
-    RCt = 0;
-
-    if ( Name == NULL || Ret == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Ret = NULL;
-
-    RCt = _SidNodeMake ( Name, & Node );
-    if ( RCt == 0 ) {
-        RCt = BSTreeInsert (
-                            & _sSidStorage,
-                            & ( Node -> node ),
-                            _SidStorageAddCallback
-                            );
-        if ( RCt == 0 ) {
-            * Ret = Node;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        _SidNodeDispose ( Node );
-    }
-
-    return RCt;
-}   /* _AddSidNoLock () */
-
-static
-int64_t CC
-_SidStorageFindCallback ( const void * Item, const BSTNode * Node )
-{
-    return XFS_StringCompare4BST_ZHR (
-                            ( const char * ) Item,
-                            ( ( struct __SidNode * ) Node ) -> name
-                            );
-}   /* _SidStorageFindCallback () */
-
-const struct __SidNode *
-_FindSidNoLock ( const char * Name )
-{
-    const struct __SidNode * RetVal;
-
-    RetVal = NULL;
-
-    if ( Name != NULL ) {
-        RetVal = ( const struct __SidNode * ) BSTreeFind (
-                                            & _sSidStorage,
-                                            Name,
-                                            _SidStorageFindCallback
-                                            );
-        if ( RetVal == NULL ) {
-            _AddSidNoLock ( Name, ( struct __SidNode ** ) & RetVal );
-        }
-    }
-
-    return RetVal;
-}   /* _FindSidNoLock () */
-
-rc_t
-_GetSidAndSizeNoLock ( const  char * Name, SID ** Sid, DWORD * SidSize )
-{
-    rc_t RCt;
-    DWORD Size1, Size2;
-    SID_NAME_USE NameUse;
-    SID * RetSid;
-    BYTE SomeByte [ XFS_SIZE_128 ];
-
-    RCt = 0;
-    Size1 = Size2 = 0;
-    RetSid = NULL;
-
-    if ( Name == NULL || Sid == NULL || SidSize == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Sid = NULL;
-    * SidSize = 0;
-
-        /*) First we should know size of SID
-         (*/
-    if ( LookupAccountNameA (
-                        NULL,
-                        Name,
-                        NULL,
-                        & Size1,
-                        NULL,
-                        & Size2,
-                        & NameUse
-                        ) == 0
-    ) {
-        if ( GetLastError () != ERROR_INSUFFICIENT_BUFFER ) {
-            return XFS_RC ( rcExhausted );
-        }
-    }
-
-    RetSid = calloc ( Size1, sizeof ( BYTE ) );
-    if ( RetSid == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    if ( LookupAccountNameA (
-                        NULL,
-                        Name,
-                        RetSid,
-                        & Size1,
-                        SomeByte,
-                        & Size2,
-                        & NameUse
-                        ) == 0
-    ) {
-        free ( RetSid );
-
-        return XFS_RC ( rcInvalid );
-    }
-
-    * Sid = RetSid;
-    * SidSize = Size1;
-
-    return 0;
-}   /* _GetSidAndSizeNoLock () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*
- *  Another important part: Names.
- *  We are trying to simulate Unix like permissions, and we are 
- *  going to use names for User and Group. We will ignore Other
- *  group, however, we will reserve name for it. Also, there are
- *  two special accounts which will have all permissions : Admin and
- *  Systems ... So, here are all names
- */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*))
- //     Useful variables
-((*/
-static const char * _sOtherName   = "Everyone";
-static const char * _sAdminName   = "Administrators";
-static const char * _sSystemName  = "SYSTEM";
-static const char * _sUsersName   = "Users"; /* Users are not User */
-static const char * _sCreatorName = "CREATOR OWNER";
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*))
- //     Statics but usefuls
-((*/
-static
-rc_t CC
-_GetUserName ( char * Buffer, size_t BufferSize )
-{
-    DWORD BS;
-
-    if ( Buffer == NULL || BufferSize == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-
-    BS = BufferSize;
-
-    if ( GetUserNameA ( Buffer, & BS ) == 0 ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    return 0;
-}   /* _GetUserName () */
-
-static
-rc_t CC
-_GetGroupNameInLegitWay ( char * Buffer, size_t BufferSize )
-{
-    rc_t RCt;
-    HANDLE ThisProcess;
-    HANDLE TokenHandle;
-    char TokenInfo [ XFS_SIZE_128 ];
-    DWORD LenghtInReturn;
-    SID * TheSid;
-    SID_NAME_USE peUse;
-    char BSht [ XFS_SIZE_128 ];
-    size_t BShtSz;
-
-    RCt = 0;
-    ThisProcess = TokenHandle = INVALID_HANDLE_VALUE;
-    LenghtInReturn = 0;
-    TheSid = NULL;
-    BShtSz = sizeof ( BSht );
-
-    ThisProcess = GetCurrentProcess ();
-    if ( ! OpenProcessToken ( ThisProcess, TOKEN_READ, & TokenHandle ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( ! GetTokenInformation (
-                            TokenHandle,
-                            TokenPrimaryGroup,
-                            TokenInfo,
-                            sizeof ( TokenInfo ),
-                            & LenghtInReturn
-                            )
-    ) {
-        RCt = XFS_RC ( rcInvalid );
-    }
-    else {
-        TheSid = ( ( TOKEN_PRIMARY_GROUP * ) TokenInfo ) -> PrimaryGroup;
-        if ( TheSid != NULL ) {
-            if ( IsValidSid ( TheSid ) ) {
-                if ( ! LookupAccountSidA (
-                                    NULL,
-                                    TheSid,
-                                    Buffer,
-                                    & BufferSize,
-                                    BSht, & BShtSz, /* B-SH#T */
-                                    & peUse
-                                    )
-                ) {
-                    RCt = XFS_RC ( rcInvalid );
-                }
-            }
-            else {
-                RCt = XFS_RC ( rcInvalid );
-            }
-        }
-        else {
-            RCt = XFS_RC ( rcNull );
-        }
-    }
-
-    CloseHandle ( TokenHandle );
-
-    return 0;
-}   /* _GetGroupNameInLegitWay () */
-
-static
-rc_t CC
-_GetGroupName ( char * Buffer, size_t BufferSize )
-{
-    size_t NWR;
-
-    if ( Buffer == NULL || BufferSize == 0 ) {
-        return XFS_RC ( rcNull );
-    }
-    * Buffer = 0;
-
-        /*) First we should check if account with name "Users" exists
-         (*/
-    if ( _SidStorageGet ( _sUsersName ) ) {
-        string_printf ( Buffer, BufferSize, &NWR, _sUsersName );
-        return 0;
-    }
-
-    return _GetGroupNameInLegitWay ( Buffer, BufferSize );
-}   /* _GetGroupName () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
- /****************************************************************
-  * Here we are initializing security, which includes :
-  *  1) Initializing SID storage
-  *  2) Checking and resolving names for general accounts
-  *     which will be used by XFSPerm object.
-  ****************************************************************/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-LIB_EXPORT
-rc_t CC
-XFSSecurityInit ()
-{
-    rc_t RCt;
-    char Buffer [ XFS_SIZE_128 ];
-
-    RCt = 0;
-
-        /*)  First we are initializing SID storage
-         (*/
-    RCt = _SidStorageInit ();
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-        /* First setting up default User name */
-    * Buffer = 0;
-
-    RCt = _GetUserName ( Buffer, sizeof ( Buffer ) ); 
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    RCt = XFSPermSetDefaultName ( kxfsUser, Buffer );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-        /* Second setting up default Group name */
-    * Buffer = 0;
-
-    RCt = _GetGroupName ( Buffer, sizeof ( Buffer ) );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    RCt = XFSPermSetDefaultName ( kxfsGroup, Buffer );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-        /* Third setting up default Other name */
-    RCt = XFSPermSetDefaultName ( kxfsOther, _sOtherName );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    return 0;
-}   /* XFSSecurityInit () */
-
-LIB_EXPORT
-rc_t CC
-XFSSecurityDeinit ()
-{
-        /*)  I think that is enough
-         (*/
-    _SidStorageDispose ();
-
-    return 0;
-}   /* XFSSecirotuDeinit () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
- /****************************************************************
-  * Here we are: making security descriptor
-  * There will be two set of functions which will have that pattern
-  *       SD_XXXX_Set ()
-  * and
-  *       SD_XXXX_Size ()
-  * and XXXX will be identical. One set is for compiling security
-  * descriptor, and another for calculateing it's size
-  *
-  * We grant all possible rights for Admin and System
-  * We will grant/deny unix-like rights for user/group
-  * We do not care about others
-  *
-  *  SecurityDescriptor structure :
-  *      SecurityDescriptor header size 0x20 ( 32 )
-  *                          sizeof ( _SECURITY_DESCRIPTOR_RELATIVE )
-  *    + Owner SID                 size 0x14 ( 20 )
-  *                          GetSidLengthRequired ( 5 )
-  *    + Group SID                 size 0x14 ( 20 )
-  *                          GetSidLengthRequired ( 5 )
-  *    + SACL                      size 0x00 ( 00 ) < don't have one
-  *    + DACL header               size 0x08 (  8 )
-  *                          sizeof ( ACL )
-  *    + N * ACE QTY
-  *          ACE Header + SID      size 0x1c ( 28 ) * N
-  *
-  *
-  *  We are adding 4 standard ACE GrantAccess entries for file
-  *  and 5 standard ACE GrantAccess entries for directory. If here are
-  *  DenyAccess ACEs, they will be added directly before GrantAccess
-  *  ACEs.
-  *
-  *  DenyAccess ACEs will be added for owner and users only
-  *
-  *  We are adding these GrantAccess ACE entries in that order:
-  *    For files :
-  *                 administrators
-  *                 system
-  *                 owner
-  *                 users
-  *    For Directories :
-  *                 administrators
-  *                 system
-  *                 owner
-  *                 creator owner
-  *                 users
-  *
-  *  We are setting only 3 types of security information :
-  *      OWNER_SECURITY_INFORMATION
-  *      GROUP_SECURITY_INFORMATION
-  *      DACL_SECURITY_INFORMATION
-  *
-  *  We will return nothing for those :
-  *      SACL_SECURITY_INFORMATION
-  *      PROTECTED_DACL_SECURITY_INFORMATION
-  *      PROTECTED_SACL_SECURITY_INFORMATION
-  *      UNPROTECTED_DACL_SECURITY_INFORMATION
-  *      UNPROTECTED_SACL_SECURITY_INFORMATION
-  *
-  ****************************************************************/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)) Inheritance flags
- ((*/
-#define _ACE_CONTAINER_FLAGS    \
-                              CONTAINER_INHERIT_ACE    \
-                            | SUB_CONTAINERS_AND_OBJECTS_INHERIT    \
-                            | SUB_CONTAINERS_ONLY_INHERIT    \
-                            | SUB_OBJECTS_ONLY_INHERIT
-
-    /*) Directories deny and grant access flags
-     (*/
-static const DWORD _sAceFlagsDir =
-                              _ACE_CONTAINER_FLAGS
-                            | OBJECT_INHERIT_ACE
-                            ;
-
-static const DWORD _sCreatorAceGrantFlagsDir =
-                              _ACE_CONTAINER_FLAGS
-                            | INHERIT_ONLY
-                            | INHERIT_ONLY_ACE
-                            | OBJECT_INHERIT_ACE
-                            ;
-
-static const DWORD _sUsersAceGrantFlagsDir =
-                              _ACE_CONTAINER_FLAGS
-                            | OBJECT_INHERIT_ACE
-                            ;
-
-static const DWORD _sOwnerAceGrantFlagsDir =
-                              _ACE_CONTAINER_FLAGS
-                            | OBJECT_INHERIT_ACE
-                            ;
-
-/*))
-||| We will suppose that User and Group flags are inheritable
-||| 
-||| static const DWORD _sUsersAceGrantFlagsDir =
-|||                               CONTAINER_INHERIT_ACE
-|||                             | SUB_CONTAINERS_ONLY_INHERIT
-|||                             ;
-||| 
-||| static const DWORD _sOwnerAceGrantFlagsDir = NO_INHERITANCE;
-(((*/
-
-    /*) Files deny and grant access flags
-     (*/
-static const DWORD _sAceDenyFlags_File = NO_INHERITANCE;
-static const DWORD _sAceGrantFlags_File = NO_INHERITANCE;
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))) Owner and Group for SD
- (((*/
-static
-rc_t CC
-_SD_OwnerGroup_Set (
-                    SECURITY_INFORMATION SecInfo,
-                    const struct XFSPerm * Permissions,
-                    enum XFSAType AccountType,
-                    SECURITY_DESCRIPTOR * Descriptor
-)
-{
-    SID * Sid;
-    DWORD Flags;
-    BOOL ( WINAPI * adder ) (
-                        SECURITY_DESCRIPTOR * SD,
-                        SID * Sid,
-                        BOOL Defaulted
-                        );
-    const struct XFSAuth * Auth;
-
-    Sid = NULL;
-    Flags = 0;
-    adder = NULL;
-    Auth = NULL;
-
-    if ( Descriptor == NULL || Permissions == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( AccountType == kxfsUser ) {
-        Flags = OWNER_SECURITY_INFORMATION;
-        adder = SetSecurityDescriptorOwner;
-    }
-    else {
-        if ( AccountType == kxfsGroup ) {
-            Flags = GROUP_SECURITY_INFORMATION;
-            adder = SetSecurityDescriptorGroup;
-        }
-        else {
-            return XFS_RC ( rcInvalid );
-        }
-    }
-
-        /*) That information does not needed
-         (*/
-    if ( ( SecInfo & Flags ) != Flags ) {
-        return 0;
-    }
-
-    Auth = XFSPermAuth ( Permissions, AccountType );
-    if ( Auth == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Sid = _SidStorageGet ( XFSAuthName ( Auth ) );
-    if ( Sid == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( adder ( Descriptor, Sid, FALSE ) == 0 ) { 
-        return XFS_RC ( rcInvalid );
-    }
-
-    return 0;
-}   /* _SD_OwnerGroup_Set () */
-
-static
-rc_t CC
-_SD_OwnerGroup_Size (
-                    SECURITY_INFORMATION SecInfo,
-                    const struct XFSPerm * Permissions,
-                    enum XFSAType AccountType,
-                    ULONG * Size
-)
-{
-    ULONG SidSize;
-    DWORD Flags;
-    const struct XFSAuth * Auth;
-
-    SidSize = 0;
-    Flags = 0;
-    Auth = NULL;
-
-    if ( Size == NULL || Permissions == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Size = 0;
-
-    if ( AccountType == kxfsUser ) {
-        Flags = OWNER_SECURITY_INFORMATION;
-    }
-    else {
-        if ( AccountType == kxfsGroup ) {
-            Flags = GROUP_SECURITY_INFORMATION;
-        }
-        else {
-            return XFS_RC ( rcInvalid );
-        }
-    }
-
-        /*) That information does not needed
-         (*/
-    if ( ( SecInfo & Flags ) != Flags ) {
-        return 0;
-    }
-
-    Auth = XFSPermAuth ( Permissions, AccountType );
-    if ( Auth == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    SidSize = _SidStorageGetSize ( XFSAuthName ( Auth ) );
-    if ( SidSize == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-    * Size = SidSize;
-
-    return 0;
-}   /* _SD_OwnerGroup_Size () */
-
-static
-rc_t CC
-_SD_Owner_Set (
-            SECURITY_INFORMATION SecInfo,
-            const struct XFSPerm * Permissions,
-            SECURITY_DESCRIPTOR * Descriptor
-)
-{
-    return _SD_OwnerGroup_Set (
-                            SecInfo,
-                            Permissions,
-                            kxfsUser,
-                            Descriptor
-                            );
-}   /* _SD_Owner_Set () */
-
-static
-rc_t CC
-_SD_Owner_Size (
-            SECURITY_INFORMATION SecInfo,
-            const struct XFSPerm * Permissions,
-            ULONG * Size
-)
-{
-    return _SD_OwnerGroup_Size ( SecInfo, Permissions, kxfsUser, Size );
-}   /* _SD_Owner_Size () */
-
-static
-rc_t CC
-_SD_Group_Set (
-            SECURITY_INFORMATION SecInfo,
-            const struct XFSPerm * Permissions,
-            SECURITY_DESCRIPTOR * Descriptor
-)
-{
-    return _SD_OwnerGroup_Set (
-                            SecInfo,
-                            Permissions,
-                            kxfsGroup,
-                            Descriptor
-                            );
-}   /* _SD_Group_Set () */
-
-static
-rc_t CC
-_SD_Group_Size (
-            SECURITY_INFORMATION SecInfo,
-            const struct XFSPerm * Permissions,
-            ULONG * Size
-)
-{
-    return _SD_OwnerGroup_Size ( SecInfo, Permissions, kxfsGroup, Size );
-}   /* _SD_Group_Size () */
-
-static
-rc_t CC
-_SD_Sacl_Set (
-            SECURITY_INFORMATION SecInfo,
-            const struct XFSPerm * Permissions,
-            XFSNType NodeType,
-            SECURITY_DESCRIPTOR * Descriptor
-)
-{
-        /*) He-he ... no SACL
-         (*/
-    return 0;
-}   /* _SD_Sacl_Set () */
-
-static
-rc_t CC
-_SD_Sacl_Size (
-            SECURITY_INFORMATION SecInfo,
-            const struct XFSPerm * Permissions,
-            XFSNType NodeType,
-            ULONG * Size
-)
-{
-        /*) He-he ... no SACL ... but ...
-         (*/
-    if ( Size == NULL || Permissions == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Size = 0;
-
-    return 0;
-}   /* _SD_Sacl_Size () */
-
-static
-DWORD CC
-_AuthToGrantMode ( const struct XFSAuth * Auth )
-{
-    DWORD Mode;
-
-    Mode = 0;
-
-    if ( XFSAuthCanRead ( Auth ) ) Mode |= GENERIC_READ;
-    if ( XFSAuthCanWrite ( Auth ) ) Mode |= GENERIC_WRITE | DELETE;
-    if ( XFSAuthCanExecute ( Auth ) ) Mode |= GENERIC_EXECUTE;
-
-    Mode |= SYNCHRONIZE | 0x1FF;
-
-    return Mode;
-}   /* _AuthToGrantMode () */
-
-static
-DWORD CC
-_AuthToDenyMode ( const struct XFSAuth * Auth )
-{
-    DWORD Mode;
-
-    Mode = 0;
-
-    if ( ! XFSAuthCanRead ( Auth ) ) Mode |= GENERIC_READ;
-    if ( ! XFSAuthCanWrite ( Auth ) ) Mode |= GENERIC_WRITE | DELETE;
-    if ( ! XFSAuthCanExecute ( Auth ) ) Mode |= GENERIC_EXECUTE;
-
-    return Mode;
-}   /* _AuthToDenyMode () */
-
-static
-rc_t CC
-_SD_Dacl_Ace_Creator_Size ( XFSNType NodeType, ULONG * Size )
-{
-    ULONG WholeSize;
-    if ( Size == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Size = 0;
-
-    if ( NodeType != kxfsDir ) {
-        return 0;
-    }
-
-    WholeSize = _SidStorageGetSize ( _sCreatorName );
-    if ( WholeSize == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    WholeSize += sizeof ( ACE_HEADER ); /* ACE header */
-    WholeSize += sizeof ( DWORD );      /* ACE mask */
-
-    * Size = WholeSize;
-
-    return 0;
-}   /* _SD_Dacl_Ace_Creator_Size () */
-
-static
-rc_t CC
-_SD_Dacl_Ace_Creator_Set ( XFSNType NodeType, ACL * Dacl )
-{
-    SID * Sid = NULL;
-
-    if ( Dacl == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( NodeType != kxfsDir ) {
-        return 0;
-    }
-
-    Sid = _SidStorageGet ( _sCreatorName );
-    if ( Sid == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( AddAccessAllowedAceEx (
-                                Dacl,
-                                ACL_REVISION,
-                                _sCreatorAceGrantFlagsDir,
-                                GENERIC_ALL,
-                                Sid
-                                ) == 0
-    ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    return 0;
-}   /* _SD_Dacl_Ace_Creator_Set () */
-
-static
-rc_t CC
-_SD_Dacl_Ace_Power_Size (
-                const char * AccName, 
-                XFSNType NodeType,  /* not needed really */
-                ULONG * Size
-)
-{
-    ULONG WholeSize;
-    if ( AccName == NULL || Size == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Size = 0;
-
-    WholeSize = _SidStorageGetSize ( AccName );
-    if ( WholeSize == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    WholeSize += sizeof ( ACE_HEADER ); /* ACE header */
-    WholeSize += sizeof ( DWORD );      /* ACE mask */
-
-    * Size = WholeSize;
-
-    return 0;
-}   /* _SD_Dacl_Ace_Power_Size () */
-
-static
-rc_t CC
-_SD_Dacl_Ace_Power_Set (
-                const char * AccName,
-                XFSNType NodeType,
-                ACL * Dacl
-)
-{
-    SID * Sid;
-    DWORD Flags;
-
-    Sid = NULL;
-    Flags = 0;
-
-    if ( AccName == NULL || Dacl == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Sid = _SidStorageGet ( AccName );
-    if ( Sid == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Flags = NodeType == kxfsDir ? _sAceFlagsDir : _sAceGrantFlags_File;
-
-    if ( AddAccessAllowedAceEx (
-                        Dacl,
-                        ACL_REVISION,
-                        Flags,
-                        SYNCHRONIZE | STANDARD_RIGHTS_REQUIRED | 0x1FF,
-                        Sid
-                        ) == 0
-    ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    return 0;
-}   /* _SD_Dacl_Ace_Power_Set () */
-
-static
-rc_t CC
-_SD_Dacl_Ace_GrantDeny_Size (
-                const struct XFSPerm * Permissions,
-                enum XFSAType AccountType,
-                XFSNType NodeType,  /* not needed really */
-                bool Grant,
-                ULONG * Size
-)
-{
-    ULONG WholeSize;
-    const struct XFSAuth * Auth; 
-    DWORD Mode;
-
-    WholeSize = 0;
-    Auth = NULL;
-    Mode = 0;
-
-    if ( Permissions == NULL || Size == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Size = 0;
-
-    if ( AccountType != kxfsUser && AccountType != kxfsGroup ) {
-        return 0;
-    }
-
-    Auth = XFSPermAuth ( Permissions, AccountType );
-    if ( Auth == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Mode = Grant
-                ? _AuthToGrantMode ( Auth )
-                : _AuthToDenyMode ( Auth )
-                ;
-    if ( Mode == 0 ) {
-        return 0;
-    }
-
-    WholeSize = _SidStorageGetSize ( XFSAuthName ( Auth ) );
-    if ( WholeSize == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    WholeSize += sizeof ( ACE_HEADER ); /* ACE header */
-    WholeSize += sizeof ( DWORD );      /* ACE mask */
-
-    * Size = WholeSize;
-
-    return 0;
-}   /* _SD_Dacl_Ace_GrantDeny_Size () */
-
-static
-rc_t CC
-_SD_Dacl_Ace_GrantDeny_Set (
-                const struct XFSPerm * Permissions,
-                enum XFSAType AccountType,
-                XFSNType NodeType,
-                bool Grant,
-                ACL * Dacl
-)
-{
-    const struct XFSAuth * Auth;
-    SID * Sid;
-    DWORD Flags;
-    DWORD Mode;
-    BOOL ( WINAPI * adder ) (
-                    ACL * Dacl,
-                    DWORD Revision,
-                    DWORD Flags,
-                    DWORD Mode,
-                    SID * Sid
-                );
-
-    Auth = NULL;
-    Sid = NULL;
-    Flags = 0;
-    Mode = 0;
-    adder = NULL;
-
-
-    if ( Permissions == NULL || Dacl == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( AccountType != kxfsUser && AccountType != kxfsGroup ) {
-        return 0;
-    }
-
-    Auth = XFSPermAuth ( Permissions, AccountType );
-    if ( Auth == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Grant ) {
-        Mode = _AuthToGrantMode ( Auth );
-        Flags = NodeType == kxfsDir
-                            ? _sAceFlagsDir
-                            : _sAceGrantFlags_File
-                            ;
-        adder = AddAccessAllowedAceEx;
-    }
-    else {
-        Mode = _AuthToDenyMode ( Auth );
-        Flags = NodeType == kxfsDir
-                            ? _sAceFlagsDir
-                            : _sAceDenyFlags_File
-                            ;
-        adder = AddAccessDeniedAceEx;
-    }
-
-    if ( Mode == 0 ) {
-        return 0;
-    }
-
-
-    Sid = _SidStorageGet ( XFSAuthName ( Auth ) );
-    if ( Sid == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( adder ( Dacl, ACL_REVISION, Flags, Mode, Sid ) == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    return 0;
-}   /* _SD_Dacl_Ace_GrantDeny_Set () */
-
-static
-rc_t CC
-_SD_Dacl_Aces_Size (
-                const struct XFSPerm * Permissions,
-                XFSNType NodeType,
-                ULONG * Size
-)
-{
-    rc_t RCt;
-    ULONG WholeSize, TempSize;
-
-    RCt = 0;
-    WholeSize = TempSize = 0;
-
-    if ( Permissions == NULL || Size == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Size = 0;
-
-        /*) Ok, here we are adding denials if it is possible
-         (*/
-    RCt = _SD_Dacl_Ace_GrantDeny_Size (
-                            Permissions,
-                            kxfsUser,
-                            NodeType,
-                            false,
-                            & TempSize
-                            );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-    WholeSize += TempSize;
-
-    RCt = _SD_Dacl_Ace_GrantDeny_Size (
-                            Permissions,
-                            kxfsGroup,
-                            NodeType,
-                            false,
-                            & TempSize
-                            );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-    WholeSize += TempSize;
-
-        /*) Ok, here we are adding our power users
-         (*/
-    RCt = _SD_Dacl_Ace_Power_Size (
-                                _sAdminName,
-                                NodeType,
-                                &TempSize
-                            );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-    WholeSize += TempSize;
-
-    RCt = _SD_Dacl_Ace_Power_Size (
-                                _sSystemName,
-                                NodeType,
-                                &TempSize
-                            );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-    WholeSize += TempSize;
-
-        /*) Ok, here we are adding granted if it is possible
-         (*/
-    RCt = _SD_Dacl_Ace_GrantDeny_Size (
-                            Permissions,
-                            kxfsUser,
-                            NodeType,
-                            true,
-                            & TempSize
-                            );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-    WholeSize += TempSize;
-
-    RCt = _SD_Dacl_Ace_Creator_Size ( NodeType, & TempSize );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-    WholeSize += TempSize;
-
-    RCt = _SD_Dacl_Ace_GrantDeny_Size (
-                            Permissions,
-                            kxfsGroup,
-                            NodeType,
-                            true,
-                            & TempSize
-                            );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-    WholeSize += TempSize;
-
-    * Size = WholeSize;
-
-    return 0;
-}   /* _SD_Dacl_Aces_Size () */
-
-static
-rc_t CC
-_SD_Dacl_Aces_Set (
-                const struct XFSPerm * Permissions,
-                XFSNType NodeType,
-                ACL * Dacl
-)
-{
-    rc_t RCt;
-
-    if ( Permissions == NULL || Dacl == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = 0;
-
-        /*) Ok, here we are adding denials if it is possible
-         (*/
-    RCt = _SD_Dacl_Ace_GrantDeny_Set (
-                            Permissions,
-                            kxfsUser,
-                            NodeType,
-                            false,
-                            Dacl
-                            );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    RCt = _SD_Dacl_Ace_GrantDeny_Set (
-                            Permissions,
-                            kxfsGroup,
-                            NodeType,
-                            false,
-                            Dacl
-                            );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-        /*) Ok, here we are adding our power users
-         (*/
-    RCt = _SD_Dacl_Ace_Power_Set (
-                                _sAdminName,
-                                NodeType,
-                                Dacl
-                            );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    RCt = _SD_Dacl_Ace_Power_Set (
-                                _sSystemName,
-                                NodeType,
-                                Dacl
-                            );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-        /*) Ok, here we are adding grants if it is possible
-         (*/
-    RCt = _SD_Dacl_Ace_GrantDeny_Set (
-                            Permissions,
-                            kxfsUser,
-                            NodeType,
-                            true,
-                            Dacl
-                            );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    RCt = _SD_Dacl_Ace_Creator_Set ( NodeType, Dacl );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    RCt = _SD_Dacl_Ace_GrantDeny_Set (
-                            Permissions,
-                            kxfsGroup,
-                            NodeType,
-                            true,
-                            Dacl
-                            );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    return 0;
-}   /* _SD_Dacl_Aces_Set () */
-
-static
-rc_t CC
-_SD_Dacl_Size (
-            SECURITY_INFORMATION SecInfo,
-            const struct XFSPerm * Permissions,
-            XFSNType NodeType,
-            ULONG * Size
-)
-{
-    rc_t RCt;
-    ULONG WholeSize, TempSize;
-
-    RCt = 0;
-    WholeSize = TempSize = 0;
-
-    if ( Permissions == NULL || Size == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Size = 0;
-
-    if ( ( SecInfo & DACL_SECURITY_INFORMATION )
-                                    != DACL_SECURITY_INFORMATION
-    ) {
-            /*) Dacl is not needed
-             (*/
-        return 0;
-    }
-
-    WholeSize += sizeof ( ACL );
-
-    RCt = _SD_Dacl_Aces_Size ( Permissions, NodeType, & TempSize );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    WholeSize += TempSize;
-
-    * Size = WholeSize;
-
-    return 0;
-}   /* _SD_Dacl_Size () */
-
-static
-rc_t CC
-_SD_Dacl_Set (
-            SECURITY_INFORMATION SecInfo,
-            const struct XFSPerm * Permissions,
-            XFSNType NodeType,
-            SECURITY_DESCRIPTOR * Descriptor
-)
-{
-    rc_t RCt;
-    ACL * Dacl;
-    ULONG DaclSize;
-
-    RCt = 0;
-    Dacl = NULL;
-    DaclSize = 0;
-
-    if ( Permissions == NULL || Descriptor == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( ( SecInfo & DACL_SECURITY_INFORMATION )
-                                    != DACL_SECURITY_INFORMATION
-    ) {
-            /*) Dacl is not needed
-             (*/
-        return 0;
-    }
-
-        /*) Initializing Dacl 
-         (*/
-    RCt = _SD_Dacl_Size ( SecInfo, Permissions, NodeType, & DaclSize );
-    if ( RCt == 0 ) {
-        if ( DaclSize == 0 ) {
-                /*) Apparently that is impossible
-                 (*/
-            return XFS_RC ( rcInvalid );
-        }
-
-        Dacl = calloc ( DaclSize, sizeof ( BYTE ) );
-        if ( Dacl == NULL ) {
-            return XFS_RC ( rcExhausted );
-        }
-    }
-
-    ZeroMemory ( Dacl, sizeof ( BYTE ) * DaclSize );
-    if ( InitializeAcl ( Dacl, DaclSize, ACL_REVISION ) == 0 ) {
-        free ( Dacl );
-
-        return XFS_RC ( rcInvalid ) ;
-    }
-
-    RCt = _SD_Dacl_Aces_Set ( Permissions, NodeType, Dacl );
-    if ( RCt != 0 ) {
-        free ( Dacl );
-
-        return RCt;
-    }
-
-    if ( SetSecurityDescriptorDacl (
-                                Descriptor,
-                                TRUE,
-                                Dacl,
-                                FALSE
-                                ) == 0
-    ) {
-        free ( Dacl );
-
-        return XFS_RC ( rcInvalid );
-    }
-
-    return 0;
-}   /* _SD_Dacl_Set () */
-
-/*)) That function will compose Absolute Security Descriptor
- //  (see also _SD_Size)
-((*/
-static
-rc_t CC
-_SD_Set (
-        SECURITY_INFORMATION SecInfo,
-        const struct XFSPerm * Permissions,
-        XFSNType NodeType,
-        SECURITY_DESCRIPTOR * Descriptor
-) 
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-        /*) Standard checks
-         (*/
-    if ( Permissions == NULL || Descriptor == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-        /*) Intializing security descriptor 
-         (*/
-    ZeroMemory ( Descriptor, sizeof ( SECURITY_DESCRIPTOR ) );
-    if ( InitializeSecurityDescriptor (
-                                    Descriptor,
-                                    SECURITY_DESCRIPTOR_REVISION
-                                    ) == 0
-    ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-        /*) Owner information
-         (*/
-    RCt = _SD_Owner_Set ( SecInfo, Permissions, Descriptor );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-        /*) Group information
-         (*/
-    RCt = _SD_Group_Set ( SecInfo, Permissions, Descriptor );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-        /*) SACL information
-         (*/
-    RCt = _SD_Sacl_Set ( SecInfo, Permissions, NodeType, Descriptor );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-        /*) DACL information
-         (*/
-    RCt = _SD_Dacl_Set ( SecInfo, Permissions, NodeType, Descriptor );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    return 0;
-}   /* _SD_Set () */
-
-/*)) That function will calculate Security Descriptor size
- //  (see also _SD_Set)
-((*/
-static
-rc_t CC
-_SD_Size (
-        SECURITY_INFORMATION SecInfo,
-        const struct XFSPerm * Permissions,
-        XFSNType NodeType,
-        ULONG * DescSize
-)
-{
-    rc_t RCt;
-    ULONG TempSize, WholeSize;
-
-    RCt = 0;
-    TempSize = WholeSize = 0;
-
-        /*) Standard checks
-         (*/
-    if ( Permissions == NULL || DescSize == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * DescSize = 0;
-
-        /*) Securit descriptor header
-         (*/
-    WholeSize += sizeof ( SECURITY_DESCRIPTOR_RELATIVE );
-
-        /*) Owner information
-         (*/
-    RCt = _SD_Owner_Size ( SecInfo, Permissions, & TempSize );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-    WholeSize += TempSize;
-
-        /*) Group information
-         (*/
-    RCt = _SD_Group_Size ( SecInfo, Permissions, & TempSize );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-    WholeSize += TempSize;
-
-        /*) SACL information
-         (*/
-    RCt = _SD_Sacl_Size ( SecInfo, Permissions, NodeType, & TempSize );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-    WholeSize += TempSize;
-
-        /*) DACL information
-         (*/
-    RCt = _SD_Dacl_Size ( SecInfo, Permissions, NodeType, & TempSize );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-    WholeSize += TempSize;
-
-    * DescSize = WholeSize;
-
-    return 0;
-}   /* _SD_Size () */
-
-static
-void CC
-_SD_Dispose ( SECURITY_DESCRIPTOR * Descriptor )
-{
-    /*)) dispose only Sacl and Dacl, since Owner and Group are reusable
-     ((*/
-    if ( Descriptor != 0 ) {
-        if ( Descriptor -> Sacl != NULL ) {
-            free ( Descriptor -> Sacl );
-        }
-        if ( Descriptor -> Dacl != NULL ) {
-            free ( Descriptor -> Dacl );
-        }
-
-        ZeroMemory ( Descriptor, sizeof ( SECURITY_DESCRIPTOR ) );
-    }
-}   /* _SD_Dispose () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*  Couple cool methods                                          */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-static
-void
-_SD_AB_Dump ( PSECURITY_DESCRIPTOR Ds, ULONG DsL )
-{
-    BYTE * Ar;
-    int ArL, llp;
-
-    printf ( "[= DUMP SD: [0x%p] [%d]\n", Ds, DsL );
-
-    if ( Ds == NULL || DsL == 0 ) {
-        printf ( "INVALID SD\n" );
-        return;
-    }
-
-    Ar = ( BYTE * ) Ds;
-    ArL = DsL / sizeof ( BYTE );
-
-    for ( llp = 0; llp < ArL; llp ++ ) {
-        if ( llp % 4 == 0 ) {
-            if ( llp != 0 ) { printf ( "\n" ); }
-            printf ( " %04d (%02x) ", llp, llp );
-        }
-        else {
-            if ( llp % 2 == 0 ) {
-                printf ( " " );
-            }
-        }
-
-        printf ( "%02x", ( int ) Ar [ llp ] );
-    }
-    printf ( "\n" );
-
-}   /* _SD_AB_Dump () */
-
-LIB_EXPORT
-void
-_SD_SR_Dump ( SECURITY_DESCRIPTOR * Sd )
-{
-    printf ( "[= DUMP USD: [0x%p]\n", Sd );
-
-    if ( Sd == NULL ) { 
-        printf ( "INVALID SD\n" );
-        return;
-    }
-
-    printf ( "REV : [%d]\n", Sd -> Revision );
-    printf ( "SBZ1 : [%d]\n", Sd -> Sbz1 );
-    printf ( "CNTR: [%d]\n", Sd -> Control );
-    printf ( "OWNR: [0x%p]\n", Sd -> Owner );
-    printf ( "GRUP: [0x%p]\n", Sd -> Group );
-    printf ( "SACL: [0x%p]\n", Sd -> Sacl );
-    printf ( "DACL: [0x%p]\n", Sd -> Dacl );
-
-}   /* _SD_SR_Dump () */
-
-LIB_EXPORT
-void
-_SI_Dump ( SECURITY_INFORMATION Inf, char * Buff, size_t BuffSize )
-{
-    if ( Buff == NULL || BuffSize < 8 ) {
-        return;
-    }
-
-    ZeroMemory ( Buff, sizeof ( char ) * BuffSize );
-
-    Buff [0] = ( Inf & OWNER_SECURITY_INFORMATION ) == 0 ? '_' : 'O';
-    Buff [1] = ( Inf & GROUP_SECURITY_INFORMATION ) == 0 ? '_' : 'G';
-    Buff [2] = ( Inf & DACL_SECURITY_INFORMATION )  == 0 ? '_' : 'D';
-    Buff [3] = ( Inf & SACL_SECURITY_INFORMATION )  == 0 ? '_' : 'S';
-    Buff [4] = ( Inf & PROTECTED_DACL_SECURITY_INFORMATION )   == 0 ? '_' : 'd';
-    Buff [5] = ( Inf & PROTECTED_SACL_SECURITY_INFORMATION )   == 0 ? '_' : 's';
-    Buff [6] = ( Inf & UNPROTECTED_DACL_SECURITY_INFORMATION ) == 0 ? '_' : 'c';
-    Buff [7] = ( Inf & UNPROTECTED_SACL_SECURITY_INFORMATION ) == 0 ? '_' : 't';
-}   /* _SI_Dump () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*  Here are external functions                                  */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- //     NOTE!!! that does not check for length of Security Descriptor
- \\             so if buffer is unsufficient memory will be messed
- //             To obtain size of buffer use XFSSecurityDescriptorSize()
-((*/
-LIB_EXPORT
-rc_t CC
-XFSSecurityDescriptor (
-                    SECURITY_INFORMATION SecInfo,
-                    const char * Permissions,
-                    XFSNType NodeType,
-                    PSECURITY_DESCRIPTOR Descriptor,
-                    ULONG DescriptorLength
-)
-{
-    rc_t RCt;
-    SECURITY_DESCRIPTOR AbsDescriptor;
-    const struct XFSPerm * Perm;
-    DWORD DscLen;
-
-    RCt = 0;
-    Perm = NULL;
-    DscLen = DescriptorLength;
-
-
-    if ( Permissions == NULL || Descriptor == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = XFSPermMake ( Permissions, & Perm );
-    if ( RCt != 0 || Perm == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = _SD_Set ( SecInfo, Perm, NodeType, & AbsDescriptor );
-    if ( RCt == 0 ) {
-            /*)) Checking if SD is valid
-             ((*/
-        if ( IsValidSecurityDescriptor ( & AbsDescriptor ) == 0 ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-                /*))    we should convert absolute to selfrelative
-                 ((*/
-            if ( MakeSelfRelativeSD (
-                                    & AbsDescriptor,
-                                    Descriptor,
-                                    & DscLen
-                                    ) == 0
-            ) {
-                RCt = XFS_RC ( rcInvalid );
-            }
-        }
-
-    }
-
-/*
-_SD_SR_Dump ( & AbsDescriptor );
-_SD_AB_Dump ( Descriptor, DescriptorLength );
-*/
-
-    free ( ( struct XFSPerm * ) Perm );
-    _SD_Dispose ( & AbsDescriptor );
-
-    return RCt;
-}   /* XFSSecurityDescriptor () */
-
-LIB_EXPORT
-rc_t CC
-XFSSecurityDescriptorSize (
-                        SECURITY_INFORMATION SecInfo,
-                        const char * Permissions,
-                        XFSNType NodeType,
-                        ULONG * DescSize
-)
-{
-    rc_t RCt;
-    ULONG WholeSize;
-    const struct XFSPerm * Perm;
-
-    RCt = 0;
-    WholeSize = 0;
-    Perm = NULL;
-
-    if ( Permissions == NULL || DescSize == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * DescSize = 0;
-
-        /*) Creating permissions
-         (*/
-    RCt = XFSPermMake ( Permissions, & Perm );
-    if ( RCt != 0 || Perm == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = _SD_Size ( SecInfo, Perm, NodeType, & WholeSize );
-    if ( RCt == 0 ) {
-        * DescSize = WholeSize;
-    }
-
-    return RCt;
-}   /* XFSSecurityDescriptorSize () */
-
diff --git a/libs/xfs/xencro.c b/libs/xfs/xencro.c
deleted file mode 100644
index 180ff46..0000000
--- a/libs/xfs/xencro.c
+++ /dev/null
@@ -1,944 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/container.h>
-#include <klib/namelist.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <kproc/lock.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-
-#include <krypto/key.h>
-#include <krypto/encfile.h>
-
-#include <xfs/path.h>
-
-#include "schwarzschraube.h"
-#include "xencro.h"
-#include "zehr.h"
-#include "lockdpt.h"
-
-#include <sysalloc.h>
-
-#include <ctype.h>
-#include <time.h>
-
-/*||*\
-  || Lyrics:
-  || That file contains interface to Encoded files based on 'krypto.
-  || package. Very experimental, cuz I do not really know what to do
-  || here.
-\*||*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)) XFSEncEntry and XFSEndKey and _EncDpt ( EncDepot ) structs are
- ||  living here
-((*/
-
-/*))
- //  EntryDepot this is responsible for sharing Enc resources
- \\  Not sure if we need to collect keys tho
- //
-((*/
-struct _EncDpt {
-    BSTree tree;
-
-    KLock * mutabor;
-};
-
-/*)) 
- //  Just a path to file
-((*/
-struct XFSEncEntry {
-    BSTNode node;
-
-    KRefcount refcount;
-    KLock * mutabor;
-
-    const char * path;
-
-    struct KKey key;        /* Key for decription */
-
-    uint64_t size;          /* File size and time, I need to cache */
-    KTime_t time;           /* to avoid frequent file opening */
-
-    XFSStatus status;
-
-    const struct KFile * file;
-};
-
-static const char * _sXFSEncEntry_classname = "XFSEncEntry";
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* _EncDpt Methods ...                                               */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static struct _EncDpt * _sEncDpt = NULL;
-
-static
-struct _EncDpt * CC
-_Dpt ()
-{
-    return _sEncDpt;
-}   /* _Dpt () */
-
-static
-void CC
-_EncDptWhackCallback ( BSTNode * Node, void * unused )
-{
-    if ( Node != NULL ) {
-        XFSEncEntryDispose ( ( const struct XFSEncEntry * ) Node );
-    }
-}   /* _EncDptWhackCallback () */
-
-static
-rc_t CC
-_EncDptDisposeImpl ( struct _EncDpt * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self != NULL ) { 
-        BSTreeWhack (
-                    & ( self -> tree ),
-                    _EncDptWhackCallback,
-                    NULL
-                    );
-
-        if ( self -> mutabor != NULL ) {
-            KLockRelease ( self -> mutabor );
-            self -> mutabor = NULL;
-        }
-
-        free ( self );
-    }
-
-    return RCt;
-}   /* _EncDptDisposeImpl () */
-
-LIB_EXPORT
-rc_t CC
-XFSEncDepotDispose ()
-{
-    struct _EncDpt * EncDpt;
-
-    EncDpt = _sEncDpt;
-    _sEncDpt = NULL;
-
-    if ( EncDpt != NULL ) {
-        _EncDptDisposeImpl ( EncDpt );
-    }
-
-    return 0;
-}   /* XFSEncDepotDispose () */
-
-static
-rc_t CC
-_EncDptMakeImpl ( struct _EncDpt ** EncDpt )
-{
-    rc_t RCt;
-    struct _EncDpt * TheD;
-
-    RCt = 0;
-    TheD = NULL;
-
-    if ( EncDpt != NULL ) {
-        * EncDpt = NULL;
-    }
-
-    if ( EncDpt == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    TheD = calloc ( 1, sizeof ( struct _EncDpt ) );
-    if ( TheD == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = KLockMake ( & ( TheD -> mutabor ) );
-    if ( RCt == 0 ) {
-        BSTreeInit ( & ( TheD -> tree ) );
-
-        * EncDpt = TheD;
-    }
-
-    if ( RCt != 0 ) {
-        * EncDpt = NULL;
-        _EncDptDisposeImpl ( TheD );
-    }
-
-    return RCt;
-}   /* _EncDptMakeImpl () */
-
-LIB_EXPORT
-rc_t CC
-XFSEncDepotInit ()
-{
-    rc_t RCt;
-    struct _EncDpt * EncDpt;
-
-    RCt = 0;
-    EncDpt = NULL;
-
-    if ( _sEncDpt == NULL ) {
-
-        RCt = _EncDptMakeImpl ( & EncDpt );
-        if ( RCt == 0 ) {
-            if ( _sEncDpt == NULL ) {
-                _sEncDpt = EncDpt;
-            }
-            else {
-                _EncDptDisposeImpl ( EncDpt );
-            }
-        }
-    }
-
-    return RCt;
-}   /* XFSEncDepotInit () */
-
-static
-int64_t CC
-_EncCmpCallback ( const void * Item, const BSTNode * Node )
-{
-    const char * Str1, * Str2;
-
-    Str1 = ( const char * ) Item;
-
-    Str2 = Node == NULL
-                ? NULL
-                : ( ( struct XFSEncEntry * ) Node ) -> path
-                ;
-    return XFS_StringCompare4BST_ZHR ( Str1, Str2 );
-}   /* _EncCmpCallback () */
-
-static
-rc_t CC
-_EncDptGetNoLock (
-                struct _EncDpt * self,
-                const char * Path,
-                const struct XFSEncEntry ** EncEntry
-)
-{
-    const struct XFSEncEntry * RetVal = NULL;
-
-    if ( EncEntry != NULL ) {
-        * EncEntry = NULL;
-    }
-
-    if ( self == NULL || Path == NULL || EncEntry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RetVal = ( const struct XFSEncEntry * ) BSTreeFind (
-                                                & ( self -> tree ),
-                                                Path,
-                                                _EncCmpCallback
-                                                );
-
-
-    * EncEntry = RetVal;
-
-    return RetVal == NULL ? XFS_RC ( rcNotFound ) : 0;
-}   /* _EncDptGetNoLock () */
-
-static
-int64_t CC
-_EncAddCallback ( const BSTNode * N1, const BSTNode * N2 )
-{
-    return XFS_StringCompare4BST_ZHR (
-            ( ( struct XFSEncEntry * ) N1 ) -> path,
-            ( ( struct XFSEncEntry * ) N2 ) -> path
-            );
-}   /* _EncAddCallback () */
-
-static
-rc_t CC
-_EncDptAddNoLock (
-                struct _EncDpt * self,
-                const struct XFSEncEntry * EncEntry
-)
-{
-    rc_t RCt = 0;
-
-    if ( self == NULL || EncEntry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = BSTreeInsert (
-                    & ( self -> tree ),
-                    ( struct BSTNode * ) & ( EncEntry -> node ),
-                    _EncAddCallback
-                    );
-
-    return RCt;
-}   /* _EncDptAddNoLock () */
-
-static
-rc_t CC
-_EncDptDelNoLock (
-            struct _EncDpt * self,
-            const struct XFSEncEntry * EncEntry
-)
-{
-    if ( self == NULL || EncEntry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    BSTreeUnlink (
-                & ( self -> tree ),
-                ( struct BSTNode * ) & ( EncEntry -> node )
-                );
-    XFSEncEntryDispose ( EncEntry );
-
-    return 0;
-}   /* _EncDptDelNoLock () */
-
-static
-rc_t CC
-_EncDptClearNoLock ( struct _EncDpt * self )
-{
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    BSTreeWhack ( & ( self -> tree ), _EncDptWhackCallback, NULL );
-    BSTreeInit ( & ( self -> tree ) );
-
-    return 0;
-}   /* _EncDptClearNoLock () */
-
-LIB_EXPORT
-rc_t CC
-XFSEncDepotClear ()
-{
-    rc_t RCt;
-    struct _EncDpt * D;
-
-    RCt = 0;
-    D = _Dpt ();
-
-    if ( D == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KLockAcquire ( D -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _EncDptClearNoLock ( D );
-
-        KLockUnlock ( D -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSEncDepotClear () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* XFSEncEntry Methods ...                                           */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-static
-rc_t CC
-_EncEntryMake (
-            const char * Path,
-            const char * Passwd,
-            const char * EncodeType,
-            const struct XFSEncEntry ** EncEntry
-)
-{
-    rc_t RCt;
-    struct XFSEncEntry * TheEntry;
-
-    RCt = 0;
-    TheEntry = NULL;
-
-    XFS_CSAN ( EncEntry )
-
-    XFS_CAN ( Path )
-    XFS_CAN ( Passwd )
-    XFS_CAN ( EncEntry )
-
-    TheEntry = calloc ( 1, sizeof ( struct XFSEncEntry ) );
-    if ( TheEntry == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    TheEntry -> status = kxfsInvalid;
-
-    RCt = XFS_InitKKey_ZHR (
-                        Passwd,
-                        EncodeType,
-                        & ( TheEntry -> key )
-                        );
-    if ( RCt == 0 ) {
-        RCt = KLockMake ( & ( TheEntry -> mutabor ) );
-        if ( RCt == 0 ) {
-            KRefcountInit (
-                        & ( TheEntry -> refcount ),
-                        1,
-                        _sXFSEncEntry_classname,
-                        "EncEntryMake",
-                        "EncEntry"
-                        );
-
-            RCt = XFS_StrDup ( Path, & ( TheEntry -> path ) );
-            if ( RCt == 0 ) {
-                TheEntry -> status = kxfsReady;
-
-                * EncEntry = TheEntry;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * EncEntry = NULL;
-
-        if ( TheEntry != NULL ) {
-            XFSEncEntryDispose ( TheEntry );
-        }
-    }
-
-    return RCt;
-}   /* _EncEntryMake () */
-
-static
-rc_t CC
-_EncDptFindOrCreateNoLock (
-                struct _EncDpt * self,
-                const char * Path,
-                const char * Passwd,
-                const char * EncodeType,
-                const struct XFSEncEntry ** EncEntry
-)
-{
-    rc_t RCt;
-    const struct XFSEncEntry * Entry;
-
-    RCt = 0;
-
-    XFS_CSAN ( EncEntry )
-
-    XFS_CAN ( Path )
-    XFS_CAN ( Passwd )
-    XFS_CAN ( EncEntry )
-
-    RCt = _EncDptGetNoLock ( self, Path, & Entry );
-    if ( RCt == 0 ) {
-        RCt = XFSEncEntryAddRef ( Entry );
-    }
-    else {
-        RCt = _EncEntryMake ( Path, Passwd, EncodeType, & Entry );
-        if ( RCt == 0 ) {
-            RCt = _EncDptAddNoLock ( self, Entry );
-        }
-    }
-
-    if ( RCt == 0 ) {
-        * EncEntry = Entry;
-    }
-    else {
-        * EncEntry = NULL;
-
-        if ( Entry != NULL ) {
-            _EncDptDelNoLock ( self, Entry );
-        }
-    }
-
-    return RCt;
-}   /* _EncDptFindOrCreateNoLock () */
-
-LIB_EXPORT
-rc_t CC
-XFSEncEntryFindOrCreate (
-                const char * Path,
-                const char * Passwd,
-                const char * EncodeType,
-                const struct XFSEncEntry ** EncEntry
-)
-{
-    rc_t RCt;
-    const struct XFSEncEntry * TheEntry;
-    struct _EncDpt * Dpt;
-
-    RCt = 0;
-    TheEntry = NULL;
-    Dpt = _Dpt ();
-
-    XFS_CAN ( Dpt )
-
-    XFS_CSAN ( EncEntry )
-
-    RCt = KLockAcquire ( Dpt -> mutabor );
-    if ( RCt == 0 ) {
-
-        RCt = _EncDptFindOrCreateNoLock (
-                                        Dpt,
-                                        Path,
-                                        Passwd,
-                                        EncodeType,
-                                        & TheEntry
-                                        );
-        if ( RCt == 0 ) {
-            /* Here add to ... */
-
-            * EncEntry = TheEntry;
-        }
-
-        KLockUnlock ( Dpt -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSEncEntryFindOrCreate () */
-
-LIB_EXPORT
-rc_t CC
-XFSEncEntryDispose (
-    const struct XFSEncEntry * self
-)
-{
-    struct XFSEncEntry * Entry = ( struct XFSEncEntry * ) self;
-
-    if ( Entry == NULL ) {
-        return 0;
-    }
-
-    if ( XFSEncEntryIsOpen ( Entry ) ) {
-        XFSEncEntryClose ( Entry );
-    }
-
-    Entry -> status = kxfsInvalid;
-
-    if ( Entry -> file != NULL ) {
-        KFileRelease ( Entry -> file );
-
-        Entry -> file = NULL;
-    }
-
-    if ( Entry -> path != NULL ) {
-        free ( ( char * ) Entry -> path );
-
-        Entry -> path = NULL;
-    }
-
-    if ( Entry -> mutabor != NULL ) {
-        KLockRelease ( Entry -> mutabor );
-
-        Entry -> mutabor = NULL;
-    }
-
-    Entry -> size = 0;
-    Entry -> time = 0;
-    ( Entry -> key ) . type = kkeyTypeCount;
-
-    KRefcountWhack ( & ( Entry -> refcount ), _sXFSEncEntry_classname );
-
-    free ( Entry );
-
-    return 0;
-}   /* XFSEncEntryDispose () */
-
-
-LIB_EXPORT
-rc_t CC
-XFSEncEntryAddRef ( const struct XFSEncEntry * self )
-{
-    rc_t RCt;
-    struct XFSEncEntry * EncEntry;
-
-    RCt = 0;
-    EncEntry = ( struct XFSEncEntry * ) self;
-
-    if ( EncEntry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    switch ( KRefcountAdd ( & ( EncEntry -> refcount ), _sXFSEncEntry_classname ) ) {
-        case krefOkay :
-                    RCt = 0;
-                    break;
-        case krefZero :
-        case krefLimit :
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSEncEntryAddRef () */
-
-LIB_EXPORT
-rc_t CC
-XFSEncEntryRelease ( const struct XFSEncEntry * self )
-{
-    rc_t RCt;
-    struct XFSEncEntry * EncEntry;
-
-    RCt = 0;
-    EncEntry = ( struct XFSEncEntry * ) self;
-
-    if ( EncEntry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    switch ( KRefcountDrop ( & ( EncEntry -> refcount ), _sXFSEncEntry_classname ) ) {
-
-        case krefOkay :
-        case krefZero :
-                    RCt = 0;
-                    break;
-        case krefWhack :
-                    RCt = XFSEncEntryClose (
-                                    ( struct XFSEncEntry * ) EncEntry
-                                    );
-                    break;
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSEncEntryRelease () */
-
-static
-rc_t CC
-_OpenEncFileNoLock ( const struct XFSEncEntry * self )
-{
-    rc_t RCt;
-    struct XFSEncEntry * Entry;
-    struct KDirectory * NatD;
-    const struct KFile * File, * EncFile;
-    uint32_t PathType;
-
-    RCt = 0;
-    Entry = ( struct XFSEncEntry * ) self;
-    NatD = NULL;
-    File = EncFile = NULL;
-    PathType = kptNotFound;
-
-    XFS_CAN ( Entry )
-
-        /*  First we should check that entry is valid, or it's state
-         *  is Ready or Complete
-         */
-    if ( Entry -> status != kxfsReady
-        && Entry -> status != kxfsComplete ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-        /*  Second it is not open already
-         */
-    if ( Entry -> file != NULL ) {
-        return 0;
-    }
-
-    RCt = KDirectoryNativeDir ( & NatD );
-    if ( RCt == 0 ) {
-            /*  Third if it does exist and it is a FILE
-             */
-        PathType = KDirectoryPathType ( NatD, Entry -> path );
-        if ( PathType == kptFile ) {
-            RCt = KDirectoryOpenFileRead (
-                                        NatD,
-                                        & File,
-                                        Entry -> path
-                                        );
-            if ( RCt == 0 ) {
-                RCt = KEncFileMakeRead (
-                                        & EncFile,
-                                        File,
-                                        & Entry -> key
-                                        );
-                if ( RCt == 0 ) {
-                        /*  Here we are reading missing data
-                         */
-                    if ( Entry -> status == kxfsReady ) {
-                        RCt = KDirectoryDate (
-                                            NatD,
-                                            & ( Entry -> time ),
-                                            Entry -> path
-                                            );
-                        if ( RCt == 0 ) {
-                            RCt = KFileSize (
-                                            EncFile,
-                                            & ( Entry -> size )
-                                            );
-                            if ( RCt == 0 ) {
-                                Entry -> status = kxfsComplete;
-                            }
-                        }
-                    }
-                }
-
-                if ( RCt == 0 ) {
-                    Entry -> file = EncFile;
-                }
-
-                KFileRelease ( File );
-            }
-        }
-        else {
-            Entry -> status = kxfsBroken;
-            RCt = XFS_RC ( rcInvalid );
-        }
-
-        KDirectoryRelease ( NatD );
-    }
-
-    return RCt;
-}   /* _OpenEncFileNoLock () */
-
-static 
-rc_t CC
-_CloseEncFileNoLock ( const struct XFSEncEntry * self )
-{
-    rc_t RCt;
-    struct XFSEncEntry * Entry;
-
-    RCt = 0;
-    Entry = ( struct XFSEncEntry * ) self;
-
-    XFS_CAN ( Entry )
-
-    if ( Entry -> file != NULL ) {
-        KFileRelease ( Entry -> file );
-        Entry -> file = NULL;
-    }
-
-    return RCt;
-}   /* _CloseEncFileNoLock () */
-
-static
-rc_t CC
-_CompleteEncEntryNoLock ( const struct XFSEncEntry * self )
-{
-    rc_t RCt = 0;
-
-    XFS_CAN ( self )
-
-    if ( self -> status == kxfsComplete ) {
-        return 0;
-    }
-
-    if ( self -> status != kxfsReady ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = _OpenEncFileNoLock ( self );
-    if ( RCt == 0 ) {
-        RCt = _CloseEncFileNoLock ( self );
-    }
-
-    return RCt;
-}   /* _CompleteEncEntryNoLock () */
-
-XFS_EXTERN
-const char * CC
-XFSEncEntryPath ( const struct XFSEncEntry * self )
-{
-    return self == NULL
-                    ? NULL
-                    : self -> path
-                    ;
-}   /* XFSEncEntryPath () */
-
-XFS_EXTERN
-rc_t CC
-XFSEncEntrySize ( const struct XFSEncEntry * self, uint64_t * Size )
-{
-    rc_t RCt = 0;
-
-    XFS_CSA ( Size, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Size )
-
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) { 
-            /* Here we are ... if it is in Ready state, we should open
-               and read it. If it is in Complete state, we should just
-               return result
-             */
-        RCt = _CompleteEncEntryNoLock ( self );
-        if ( RCt == 0 ) {
-            * Size = self -> size;
-        }
-
-        KLockUnlock ( self -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSEncEntrySize () */
-
-XFS_EXTERN
-rc_t CC
-XFSEncEntryTime ( const struct XFSEncEntry * self, KTime_t * Time )
-{
-    rc_t RCt = 0;
-
-    XFS_CSA ( Time, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Time )
-
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) { 
-            /* Here we are ... if it is in Ready state, we should open
-               and read it. If it is in Complete state, we should just
-               return result
-             */
-        RCt = _CompleteEncEntryNoLock ( self );
-        if ( RCt == 0 ) {
-            * Time = self -> time;
-        }
-
-        KLockUnlock ( self -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSEncEntryTime () */
-
-XFS_EXTERN
-bool CC
-XFSEncEntryGood ( const struct XFSEncEntry * self )
-{
-    bool RetVal = false;
-
-    if ( self != NULL ) {
-        if ( KLockAcquire ( self -> mutabor ) == 0 ) {
-            RetVal = self -> status == kxfsGood;
-
-            KLockUnlock ( self -> mutabor );
-        }
-    }
-
-    return RetVal;
-}   /* XFSEncEntryGood () */
-
-XFS_EXTERN
-bool CC
-XFSEncEntryIsOpen ( const struct XFSEncEntry * self )
-{
-    bool RetVal = false;
-
-    if ( self != NULL ) {
-        if ( KLockAcquire ( self -> mutabor ) == 0 ) {
-            RetVal = self -> file != NULL;
-
-            KLockUnlock ( self -> mutabor );
-        }
-    }
-
-    return RetVal;
-}   /* XFSEncEntryIsOpen () */
-
-XFS_EXTERN
-rc_t CC
-XFSEncEntryOpen ( const struct XFSEncEntry * self )
-{
-    rc_t RCt = 0;
-
-    XFS_CAN ( self )
-
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _OpenEncFileNoLock ( self );
-
-        KLockUnlock ( self -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSEncEntryOpen () */
-
-XFS_EXTERN
-rc_t CC
-XFSEncEntryClose ( const struct XFSEncEntry * self )
-{
-    rc_t RCt = 0;
-
-    XFS_CAN ( self )
-
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _CloseEncFileNoLock ( self );
-
-        KLockUnlock ( self -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSEncEntryClose () */
-
-XFS_EXTERN
-rc_t CC
-XFSEncEntryRead (
-            const struct XFSEncEntry * self,
-            uint64_t Offset,
-            void * Buffer,
-            size_t BufferSize,
-            size_t * NumRead
-)
-{
-    rc_t RCt = 0;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Buffer )
-    XFS_CAN ( NumRead )
-
-    if ( BufferSize == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-        if ( self -> file != NULL ) {
-            if ( self -> status == kxfsComplete ) {
-                RCt = KFileRead (
-                                self -> file,
-                                Offset,
-                                Buffer,
-                                BufferSize,
-                                NumRead
-                                );
-            }
-            else {
-                RCt = XFS_RC ( rcInvalid );
-            }
-        }
-        else {
-            RCt = XFS_RC ( rcInvalid );
-        }
-
-        KLockUnlock ( self -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSEncEntryReady () */
diff --git a/libs/xfs/xencro.h b/libs/xfs/xencro.h
deleted file mode 100644
index 4e8ce16..0000000
--- a/libs/xfs/xencro.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _xencro_h_
-#define _xencro_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   There is some interface build to implement access to files
-  ))))  through Krypto package
- ((((*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct XFSEncEntry;
-
-/*))
- //     We are cacheing info: key, size and date of encrypted file
-((*/
-XFS_EXTERN rc_t CC XFSEncDepotInit ();
-XFS_EXTERN rc_t CC XFSEncDepotDispose ();
-XFS_EXTERN rc_t CC XFSEncDepotClear ();
-
-/*))
- || Just handles structure which reffer to encrypted file
- || IMPORTANT: we are ReadOnlyMode only, which does means everything
- || Also, Release method does not destroy EncEntry, only Dispose 
- || call will do it. Release method will close associated file only
- || 
-((*/
-XFS_EXTERN rc_t CC XFSEncEntryFindOrCreate (
-                            const char * Path,
-                            const char * Passwd,
-                            const char * EncodeType, /* could be NULL */
-                            const struct XFSEncEntry ** EncEntry
-                            );
-XFS_EXTERN rc_t CC XFSEncEntryDispose (
-                            const struct XFSEncEntry * self
-                            );
-
-XFS_EXTERN rc_t CC XFSEncEntryAddRef (
-                            const struct XFSEncEntry * self
-                            );
-XFS_EXTERN rc_t CC XFSEncEntryRelease (
-                            const struct XFSEncEntry * self
-                            );
-
-
-XFS_EXTERN const char * CC XFSEncEntryPath (
-                            const struct XFSEncEntry * self
-                            );
-XFS_EXTERN rc_t CC XFSEncEntrySize (
-                            const struct XFSEncEntry * self,
-                            uint64_t * Size
-                            );
-XFS_EXTERN rc_t CC XFSEncEntryTime (
-                            const struct XFSEncEntry * self,
-                            KTime_t * Time
-                            );
-XFS_EXTERN bool CC XFSEncEntryGood (
-                            const struct XFSEncEntry * self
-                            );
-/*))
- //     There will no special reader. Entry reads.
-((*/
-XFS_EXTERN bool CC XFSEncEntryIsOpen (
-                            const struct XFSEncEntry * self
-                            );
-
-XFS_EXTERN rc_t CC XFSEncEntryOpen (
-                            const struct XFSEncEntry * self
-                            );
-XFS_EXTERN rc_t CC XFSEncEntryClose (
-                            const struct XFSEncEntry * self
-                            );
-
-XFS_EXTERN rc_t CC XFSEncEntryRead (
-                            const struct XFSEncEntry * self,
-                            uint64_t Offset,
-                            void * Buffer,
-                            size_t BufferSize,
-                            size_t * NumRead
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _xencro_h_ */
diff --git a/libs/xfs/xencws.c b/libs/xfs/xencws.c
deleted file mode 100644
index b6c4a7c..0000000
--- a/libs/xfs/xencws.c
+++ /dev/null
@@ -1,5090 +0,0 @@
- /*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/container.h>
-#include <klib/namelist.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-#include <kproc/lock.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/impl.h>
-
-#include <krypto/key.h>
-#include <krypto/encfile.h>
-
-#include <xfs/doc.h>
-
-#include <va_copy.h>
-
-#include "schwarzschraube.h"
-#include "xencws.h"
-#include "zehr.h"
-#include "lreader.h"
-#include <xfs/path.h>
-
-#include <sysalloc.h>
-
-#include <ctype.h>
-#include <time.h>
-
-/*||*\
-  || Lyrics:
-  || 
-  || There is temporary solution for WORKSPACE directory, which
-  || supposes encrypting of everything.
-  || Simple simulation: directory could be opened as workspace
-  || if it contains special file with name _sDirectoryWsContent
-  || That file is simple file in format :
-  || 
-  ||     type<tab>eff_name<tab>display_name
-  ||     type<tab>eff_name<tab>display_name
-  ||     type<tab>eff_name<tab>display_name
-  || 
-  || Only entries from that file are accessible throught that interface
-  || There are two types of entries : file and folder
-  ||
-  || User should pass path and password to XFSEncDirectoryOpen
-  || method to open directory. All other operations with file
-  || system should be done relative to that directory.
-  ||
-\*||*/
-
-#ifdef JOJOBA
-#define LOG_LOC_ACQ(line,lockp) pLogMsg (   \
-                        klogDebug,  \
-                        " [KLockAcquire] [$(line)] [$(lockp)]", \
-                        "line=%d,lockp=%p", \
-                        line, ( void * )lockp   \
-                        )
-#define LOG_LOC_UNL(line,lockp) pLogMsg (   \
-                        klogDebug,  \
-                        " [KLockUnlock] [$(line)] [$(lockp)]", \
-                        "line=%d,lockp=%p", \
-                        line, ( void * )lockp   \
-                        )
-#else
-#define LOG_LOC_ACQ(line,lockp)
-#define LOG_LOC_UNL(line,lockp)
-#endif
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- ||  Usefull stuff
-((*/
-
-/* static const char * _sDirectoryWsContent = ".ncbi-ws-content"; */
-static const char * _sDirectoryWsContent = ".ncbi-ws-gehalt";
-static const char * _sFileExt            = ".datei";
-static const char * _sFolderExt          = ".mappe";
-static const char * _sFileTag            = "file";
-static const char * _sFolderTag          = "folder";
-
-#define _NAME_FORMAT_LEN_   8
-
-/* because of we unable to read encrypted file header in Write Only
- * mode we are always opening files in Update mode. I have no idea how
- * to fix that problem. Thinking about it.
- */
-#define _ENCODED_FILE_UPDATE_ALWAYS_
-
-/*\
- *  Other thoughts:
- *
- *  each directory will imediately synchronize it's content to disk.
- *  That synchronisation works only in the case of : creation, deletion
- *  and renaming file.
-\*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*                                                                   */
-/* As it usually happens, first is description of directory          */
-/*                                                                   */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct _DirC;
-
-struct _DirE {
-    BSTNode node;
-
-    KLock * mutabor;
-    KRefcount refcount;
-
-    const char * name;
-    const char * eff_name;
-
-    bool is_folder;
-    const struct _DirC * content;     /* NULL for non-folder */
-};
-
-struct _DirC {
-    BSTree tree;
-
-    struct KKey key;
-
-    const char * path;
-
-    uint64_t last;
-};
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/**)))  There are too many places, where encrypted file is opened
-  (((**/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static const char * _sDirE_classname = "DirE";
-
-static rc_t CC _DirEDisposeContent ( const struct _DirE * self );
-
-static
-rc_t CC
-_DirEDispose ( const struct _DirE * self )
-{
-    struct _DirE * Entry = ( struct _DirE * ) self;
-
-    if ( Entry != NULL ) {
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " [-DSP] [$(line)] [$(entry)] [$(name)]", "line=%d,entry=%p,name=%s", __LINE__, Entry, Entry -> name );
-#endif /* JOJOBA */
-
-        if ( Entry -> mutabor != NULL ) {
-            KLockRelease ( Entry -> mutabor );
-            Entry -> mutabor = NULL;
-        }
-
-        KRefcountWhack (
-                        & ( Entry -> refcount ),
-                        _sDirE_classname
-                        );
-
-        if ( Entry -> name != NULL ) {
-            free ( ( char * ) Entry -> name );
-            Entry -> name = NULL;
-        }
-        if ( Entry -> eff_name != NULL ) {
-            free ( ( char * ) Entry -> eff_name );
-            Entry -> eff_name = NULL;
-        }
-
-        _DirEDisposeContent ( Entry );
-
-        free ( Entry );
-    }
-    return 0;
-}   /* _DirEDispose () */
-
-static
-rc_t CC
-_DirEMake (
-            const char * Type,
-            const char * EffName,
-            const char * DisplayName,
-            const struct _DirE ** Entry
-)
-{
-    rc_t RCt;
-    struct _DirE * RetVal;
-    bool IsFolder;
-
-    RCt = 0;
-    RetVal = NULL;
-    IsFolder = false;
-
-    if ( Type != NULL && EffName != NULL && DisplayName != NULL ) {
-        if ( strcmp ( Type, _sFileTag ) == 0 ) {
-            IsFolder = false;
-        }
-        else {
-            if ( strcmp ( Type, _sFolderTag ) == 0 ) {
-                IsFolder = true;
-            }
-            else {
-                RCt = XFS_RC ( rcInvalid );
-            }
-        }
-
-        if ( RCt == 0 ) {
-            RetVal = calloc ( 1, sizeof ( struct _DirE ) );
-            if ( RetVal == NULL ) {
-                RCt = XFS_RC ( rcExhausted );
-            }
-            else {
-                RCt = KLockMake ( & ( RetVal -> mutabor ) );
-                if ( RCt == 0 ) {
-                    KRefcountInit (
-                                & ( RetVal -> refcount ),
-                                1,
-                                _sDirE_classname,
-                                "DirEMake",
-                                "DirE"
-                                );
-
-                    RCt = XFS_StrDup (
-                                    DisplayName,
-                                    & ( RetVal -> name )
-                                    );
-                    if ( RCt == 0 ) {
-                        RCt = XFS_StrDup (
-                                        EffName,
-                                        & ( RetVal -> eff_name )
-                                        );
-                        if ( RCt == 0 ) {
-                            RetVal -> is_folder = IsFolder;
-                            * Entry = RetVal;
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " [-ALC] [$(line)] [$(entry)] [$(name)]", "line=%d,entry=%p,name=%s", __LINE__, RetVal, RetVal -> name );
-#endif /* JOJOBA */
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( RetVal != NULL ) {
-            if ( RetVal -> mutabor != NULL ) {
-                KLockRelease ( RetVal -> mutabor );
-                RetVal -> mutabor = NULL;
-            }
-            if ( RetVal -> name != NULL ) {
-                free ( ( char * ) RetVal -> name );
-                RetVal -> name = NULL;
-            }
-            if ( RetVal -> eff_name != NULL ) {
-                free ( ( char * ) RetVal -> eff_name );
-                RetVal -> eff_name = NULL;
-            }
-
-            free ( RetVal );
-        }
-
-        * Entry = NULL;
-    }
-
-    return RCt;
-}   /* _DirEMake () */
-
-static
-rc_t CC
-_DirEAddRef ( const struct _DirE * self )
-{
-    rc_t RCt;
-    struct _DirE * Entry;
-    int Refc;
-
-    RCt = 0;
-    Entry = ( struct _DirE * ) self;
-    Refc = 0;
-
-    XFS_CAN ( Entry )
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " [>ARE] [$(line)] [$(entry)] [$(name)]", "line=%d,entry=%p,name=%s", __LINE__, self, self -> name );
-#endif /* JOJOBA */
-
-    Refc = KRefcountAdd (
-                    & ( Entry -> refcount ),
-                    _sDirE_classname
-    );
-    switch ( Refc ) {
-        case krefOkay :
-                RCt = 0;
-                break;
-        case krefZero :
-        case krefLimit :
-        case krefNegative :
-                RCt = XFS_RC ( rcInvalid );
-                break;
-        default :
-                RCt = XFS_RC ( rcUnknown );
-                break;
-    }
-
-    return RCt;
-}   /* _DirEAddRef () */
-
-static
-rc_t CC
-_DirERelease ( const struct _DirE * self )
-{
-    rc_t RCt;
-    struct _DirE * Entry;
-    int Refc;
-
-    RCt = 0;
-    Entry = ( struct _DirE * ) self;
-    Refc = 0;
-
-    XFS_CAN ( Entry )
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " [<ARE] [$(line)] [$(entry)] [$(name)]", "line=%d,entry=%p,name=%s", __LINE__, self, self -> name );
-#endif /* JOJOBA */
-
-    Refc = KRefcountDrop (
-                    & ( Entry -> refcount ),
-                    _sDirE_classname
-                    );
-    switch ( Refc ) {
-        case krefOkay :
-        case krefZero :
-                RCt = 0;
-                break;
-        case krefWhack :
-                RCt = _DirEDispose ( self );
-                break;
-        case krefNegative :
-                RCt = XFS_RC ( rcInvalid );
-                break;
-        default :
-                RCt = XFS_RC ( rcUnknown );
-                break;
-    }
-
-    return RCt;
-}   /* _DirERelease () */
-
-static
-rc_t CC
-_NextWord (
-            const char * Line,
-            size_t Length,
-            const char ** Word,
-            const char ** NextLine
-)
-{
-    const char * Bg, * En, * Ps;
-
-    Bg = En = Ps = NULL;
-
-    XFS_CSAN ( Word )
-    XFS_CSAN ( NextLine )
-    XFS_CA ( Length, 0 )
-    XFS_CAN ( Word )
-    XFS_CAN ( NextLine )
-    XFS_CAN ( Line )
-
-    Bg = Line;
-    En = Line + Length;
-
-        /* Skipping fron tabls */
-    while ( Bg < En ) {
-        if ( * Bg != '\t' ) {
-            break;
-        }
-        Bg ++;
-    }
-
-    Ps = Bg;
-    while ( Ps < En ) {
-        if ( * Ps == '\t' ) {
-            break;
-        }
-        Ps ++;
-    }
-
-    if ( Ps == Bg ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    * Word = string_dup ( Bg, Ps - Bg );
-    if ( * Word == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    if ( Ps == En ) {
-        * NextLine = NULL;
-    }
-    else {
-        * NextLine = Ps + 1;
-    }
-
-    return 0;
-}   /* _NextWord () */
-
-static
-rc_t CC
-_DirEParse (
-            const struct String * Line,
-            const struct _DirE ** Entry
-)
-{
-    rc_t RCt;
-    const char * Start, * Name, * EffName, * Type, * NextLine;
-    size_t Len, Dif;
-
-    RCt = 0;
-    Start = Name = EffName = Type = NextLine = NULL;
-    Len = Dif = 0;
-
-    XFS_CSAN ( Entry )
-    XFS_CAN ( Line )
-    XFS_CAN ( Entry )
-
-    Start = Line -> addr;
-    Len = Line -> len;
-
-        /* First is Type */
-    RCt = _NextWord ( Start, Len, & Type, & NextLine );
-    if ( RCt == 0 ) {
-        Len -= NextLine - Start;
-        Start = NextLine;
-
-
-            /* Second is Effective Name */
-        RCt = _NextWord ( Start, Len, & EffName, & NextLine );
-        if ( RCt == 0 ) {
-            Len -= NextLine - Start;
-            Start = NextLine;
-
-                /* Third is display Name */
-            RCt = _NextWord ( Start, Len, & Name, & NextLine );
-            if ( RCt == 0 ) {
-                RCt = _DirEMake ( Type, EffName, Name, Entry );
-
-                free ( ( char * ) Name );
-                Name = NULL;
-            }
-
-            free ( ( char * ) EffName );
-            EffName = NULL;
-        }
-
-        free ( ( char * ) Type );
-        Type = NULL;
-    }
-
-    if ( RCt != 0 ) {
-        if ( * Entry != NULL ) {
-            _DirEDispose ( * Entry );
-        }
-    }
-
-    return RCt;
-}   /* _DirEParse () */
-
-static
-rc_t CC
-_OpenEncLineReader (
-                const struct XFSLineReader ** Reader,
-                const struct KKey * Key,
-                const char * Path,
-                ...
-)
-{
-    rc_t RCt;
-    struct KDirectory * NatDir;
-    const struct KFile * File;
-    const struct KFile * EncFile;
-    va_list Args;
-
-    RCt = 0;
-    NatDir = NULL;
-    File = NULL;
-    EncFile = NULL;
-
-    XFS_CSAN ( Reader )
-    XFS_CAN ( Key )
-    XFS_CAN ( Path )
-    XFS_CAN ( Reader )
-
-    RCt = KDirectoryNativeDir ( & NatDir );
-    if ( RCt == 0 ) {
-
-        va_start ( Args, Path );
-        RCt = KDirectoryVOpenFileRead ( NatDir, & File, Path, Args );
-        va_end ( Args );
-
-        if ( RCt == 0 ) {
-            RCt = KEncFileMakeRead ( & EncFile, File, Key );
-            if ( RCt == 0 ) {
-                RCt = XFSLineReaderMake ( EncFile, Reader );
-
-                KFileRelease ( EncFile );
-            }
-
-            KFileRelease ( File );
-        }
-
-        KDirectoryRelease ( NatDir );
-    }
-
-    return RCt;
-}   /* _OpenEncLineReader () */
-
-/*))
-  ++    IMPORTANT: all modifications to Content should be made through 
-  ++               corresponding Entry
-  ((*/
-static rc_t CC _SyncronizeDirectoryContentNoLock (
-                                        const struct _DirE * self
-                                        );
-static rc_t CC _DirEAddEntryNoLock (
-                                    const struct _DirE * self,
-                                    const struct _DirE * Entry
-                                    );
-static
-rc_t CC
-_DirEReadContent ( const struct _DirE * self )
-{
-    rc_t RCt;
-    const struct XFSLineReader * Reader;
-    const struct _DirE * Entry;
-    const struct String Line;
-    size_t LineNo; 
-
-    RCt = 0;
-    Reader = NULL;
-    Entry = NULL;
-    LineNo = 0;
-
-    XFS_CAN ( self )
-
-    RCt = _OpenEncLineReader (
-                            & Reader,
-                            & ( self -> content -> key ),
-                            "%s/%s",
-                            self -> content -> path,
-                            _sDirectoryWsContent
-                            );
-
-    if ( RCt == 0 ) {
-        if ( XFSLineReaderGood ( Reader ) ) {
-            do {
-                RCt = XFSLineReaderGet ( Reader, & Line );
-                if ( RCt == 0 ) {
-                    RCt = _DirEParse ( & Line, & Entry );
-                    if ( RCt == 0 ) {
-                        RCt = _DirEAddEntryNoLock ( self, Entry );
-                        if ( RCt == 0 ) {
-/* TODO */
-                        }
-                    }
-                }
-
-                if ( RCt != 0 ) {
-                    XFSLineReaderLineNo ( Reader, & LineNo );
-pLogMsg ( klogDebug, " __DirE : invalid line no $(line)", "line=%d", ( int ) LineNo );
-                    RCt = 0;
-                }
-            } while ( XFSLineReaderNext ( Reader ) );
-
-        }
-        else {
-            /*  TODO : JUST a stub. I mean, it is not a problem. File
-             *  could be lost, or directory could be just created
-             */
-        }
-
-        XFSLineReaderRelease ( Reader );
-    }
-    else {
-        if ( GetRCState ( RCt ) == rcNotFound ) {
-            LogMsg ( klogDebug, " Mahindra: Syncronicytyty" );
-            RCt = _SyncronizeDirectoryContentNoLock ( self );
-        }
-    }
-
-    return RCt;
-}   /* _DirEReadContent () */
-
-static char _FmtStr [ 64 ];
-static char * _pFmtStr = NULL;
-static
-const char * CC
-_fFmtStr ()
-{
-    size_t NW;
-
-    if ( _pFmtStr == NULL ) {
-        string_printf (
-                    _FmtStr,
-                    sizeof ( _FmtStr ),
-                    & NW,
-                    ".%%0.%dd%%s",
-                    _NAME_FORMAT_LEN_
-                    );
-        _pFmtStr = _FmtStr;
-    }
-    return _pFmtStr;
-}   /* _fFmtStr () */
-
-static
-rc_t CC
-_DirCNewName (
-            const struct _DirC * self,
-            bool IsFolder,
-            char * Out,
-            size_t Len
-)
-{
-    rc_t RCt;
-    size_t Var;
-    int Series;
-    const char * Ext;
-
-    RCt = 0;
-    Series = 0;
-    Ext = IsFolder ? _sFolderExt : _sFileExt;
-    Var =    1                     /* trailing point */
-           + string_size ( Ext )   /* extention for folder or file */
-           + _NAME_FORMAT_LEN_     /* name */
-           + 1                     /* 0 */
-           ;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Out )
-    if ( Len <= Var ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    * Out = 0;
-
-    Series = ( int ) ( self -> last + 1 );
-
-    RCt = string_printf ( Out, Len, & Var, _fFmtStr (), Series, Ext );
-    if ( RCt == 0 ) {
-        ( ( struct _DirC * ) self ) -> last ++;
-    }
-    else {
-        * Out = 0;
-    }
-
-    return RCt;
-}   /* _DirCNewName () */
-
-static
-void CC
-_MakeContentDocumentCallback ( BSTNode * Node, void * Data )
-{
-    struct _DirE * Entry;
-    struct XFSDoc * Doc;
-
-    Entry = ( struct _DirE * ) Node;
-    Doc = ( struct XFSDoc * ) Data;
-
-    if ( Entry != NULL && Doc != NULL ) {
-        XFSTextDocAppend (
-                    Doc,
-                    "%s\t%s\t%s\n", 
-                    ( Entry -> is_folder ? _sFolderTag : _sFileTag ),
-                    Entry -> eff_name,
-                    Entry -> name
-                    );
-    }
-}   /* _MakeContentDocumentCallback () */
-
-static
-rc_t CC
-_MakeContentDocument (
-                    const struct _DirE * self,
-                    const struct XFSDoc ** Doc
-)
-{
-    rc_t RCt;
-    struct XFSDoc * RetVal;
-
-    RCt = 0;
-    RetVal = NULL;
-
-    XFS_CSAN ( Doc )
-    XFS_CAN ( self )
-    XFS_CAN ( Doc )
-    XFS_CAN ( self -> content )
-
-    RCt = XFSTextDocMake ( & RetVal );
-    if ( RCt == 0 ) {
-        BSTreeForEach ( 
-                    & ( self -> content -> tree ),
-                    false,
-                    _MakeContentDocumentCallback,
-                    RetVal
-                    );
-
-        * Doc = RetVal;
-    }
-
-    return RCt;
-}   /* _MakeContentDocument () */
-
-static
-rc_t CC
-_StoreContentDocument (
-                    const struct _DirE * self,
-                    const struct XFSDoc * Doc
-)
-{
-    rc_t RCt;
-    struct _DirC * Content;
-    struct KFile * File, * EncFile;
-    struct KDirectory * NatDir;
-    const char * Text;
-    uint64_t TextSize;
-    size_t NumWrit;
-    uint32_t PathType;
-
-    RCt = 0;
-    Content = NULL;
-    File = EncFile = NULL;
-    NatDir = NULL;
-    Text = NULL;
-    TextSize = 0;
-    NumWrit = 0;
-    PathType = kptNotFound;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Doc )
-    Content = ( struct _DirC * ) self -> content;
-    XFS_CAN ( Content )
-
-    RCt = KDirectoryNativeDir ( & NatDir );
-    if ( RCt == 0 ) {
-        PathType = KDirectoryPathType (
-                                    NatDir,
-                                    "%s/%s",
-                                    Content -> path,
-                                    _sDirectoryWsContent
-                                    );
-        if ( PathType == kptNotFound ) {
-            RCt = KDirectoryCreateFile (
-                                        NatDir,
-                                        & File,
-                                        true,
-                                        0664,
-                                        kcmCreate,
-                                        "%s/%s",
-                                        Content -> path,
-                                        _sDirectoryWsContent
-                                        );
-        }
-        else {
-            RCt = KDirectoryOpenFileWrite (
-                                        NatDir,
-                                        & File,
-                                        true,
-                                        "%s/%s",
-                                        Content -> path,
-                                        _sDirectoryWsContent
-                                        );
-        }
-        if ( RCt == 0 ) {
-            RCt = KFileSetSize ( File, 0 );
-            if ( RCt == 0 ) {
-                RCt = KEncFileMakeUpdate (
-                                    & EncFile,
-                                    File,
-                                    & ( Content -> key )
-                                    );
-                KFileRelease ( File );
-                if ( RCt == 0 ) {
-                    RCt = XFSDocSize ( Doc, & TextSize );
-                    if ( RCt == 0 ) {
-                        if ( TextSize != 0 ) {
-                            RCt = XFSDocGet ( Doc, & Text );
-                            if ( RCt == 0 ) {
-                                RCt = KFileWrite (
-                                                EncFile,
-                                                0,
-                                                Text,
-                                                ( size_t ) TextSize,
-                                                & NumWrit
-                                                );
-                            }
-                        }
-                    }
-
-                    KFileRelease ( EncFile );
-                }
-            }
-
-        }
-
-        KDirectoryRelease ( NatDir );
-    }
-
-    return RCt;
-}   /* _StoreContentDocument () */
-
-/*))
- //     Method is not synchronized, so lock it before, unlock after
-((*/
-static
-rc_t CC
-_SyncronizeDirectoryContentNoLock ( const struct _DirE * self )
-{
-    rc_t RCt;
-    const struct XFSDoc * Doc;
-
-    RCt = 0;
-    Doc = NULL;
-
-    XFS_CAN ( self );
-
-    if ( self -> content != NULL ) {
-        RCt = _MakeContentDocument ( self, & Doc );
-        if  ( RCt == 0 ) {
-
-            RCt = _StoreContentDocument ( self, Doc );
-
-            XFSDocRelease ( Doc );
-        }
-    }
-
-    return RCt;
-}   /* _SynchronizeDirectoryContentNoLock () */
-
-static
-void CC
-_DirCWhackCallback ( BSTNode * Node, void * unused )
-{
-    if ( Node != NULL ) {
-        _DirERelease ( ( const struct _DirE * ) Node );
-    }
-}   /* _DirCWhackCallback () */
-
-static
-rc_t CC
-_DirEDisposeContent ( const struct _DirE * self )
-{
-    struct _DirC * Content;
-
-    if ( self != NULL ) {
-
-        Content = ( struct _DirC * ) self -> content;
-        if ( Content != NULL ) {
-            BSTreeWhack (
-                        & ( Content -> tree ),
-                        _DirCWhackCallback,
-                        NULL
-                        );
-
-            if ( Content -> path != NULL ) {
-                free ( ( char * ) Content -> path );
-
-                Content -> path = NULL;
-            }
-
-            Content -> last = 0;
-
-            free ( Content );
-        }
-
-        ( ( struct _DirE * ) self ) -> content = NULL;
-    }
-
-    return 0;
-}   /* _DirEDisposeContent () */
-
-static
-rc_t CC
-_DirEVMakeContent (
-            const struct _DirE * self,
-            const struct KKey * Key,
-            const char * Format,
-            va_list Args
-)
-{
-    rc_t RCt;
-    struct _DirC * Cont;
-    const struct XFSPath * Path;
-    va_list xArgs;
-
-    RCt = 0;
-    Cont = NULL;
-    Path = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Format )
-    XFS_CAN ( Key )
-
-    if ( ! self -> is_folder ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( self -> content != NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    va_copy ( xArgs, Args );
-    RCt = XFSPathVMakeAbsolute ( & Path, false, Format, xArgs );
-    va_end ( xArgs );
-    if ( RCt != 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Cont = calloc ( 1, sizeof ( struct _DirC ) );
-    if ( Cont == NULL ) {
-        XFSPathRelease ( Path );
-
-        return XFS_RC ( rcExhausted );
-    }
-
-    ( ( struct _DirE * ) self ) -> content = Cont;
-
-    RCt = XFS_StrDup ( XFSPathGet ( Path ), & ( Cont -> path ) );
-    if ( RCt == 0 ) {
-        BSTreeInit ( & ( Cont -> tree ) );
-
-        memcpy ( & ( Cont -> key ), Key, sizeof ( struct KKey ) );
-
-        RCt = _DirEReadContent ( self );
-    }
-
-    XFSPathRelease ( Path );
-
-    if ( RCt != 0 ) {
-        _DirEDisposeContent ( self );
-    }
-
-    return RCt;
-}   /* _DirEVMakeContent () */
-
-static
-rc_t CC
-_DirEMakeContent (
-            const struct _DirE * self,
-            const struct KKey * Key,
-            const char * Format,
-            ...
-)
-{
-    rc_t RCt;
-    va_list Args;
-
-    RCt = 0;
-
-    va_start ( Args, Format );
-    RCt = _DirEVMakeContent ( self, Key, Format, Args );
-    va_end ( Args );
-
-    return RCt;
-}   /* _DirEMakeContent () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))   
- ||     NOTE: all non-locking methods which modify Content does not
- ||           store Content, while all locking methods forcely store
- ||           modified content to the disk
- ||     There are Methods : Rename, Delete, Create
- ||           All those are implemented in both locking/non-locking way
- ||           Methods are selfexplainable, except Create, which will 
- ||           return existing entry if it exists.
- ||     There is list of methods which do not modify Content : Get and
- ||           List. Those methods are implemented in both locking/non-
- ||           locking way, but locking implementation does not perform
- ||           synchronisation of Content on disk.
-((*/
-
-static
-int64_t CC
-_DirFindCallback ( const void * Item, const BSTNode * Node )
-{
-    const char * Str1, * Str2;
-
-    Str1 = ( const char * ) Item;
-
-    Str2 = Node == NULL
-                    ? NULL
-                    : ( ( struct _DirE * ) Node ) -> name
-                    ;
-
-    return XFS_StringCompare4BST_ZHR ( Str1, Str2 );
-}   /* _DirFindCallback () */
-
-static
-rc_t CC
-_DirEGetEntryNoLock (
-                const struct _DirE * self,
-                const char * Name,
-                const struct _DirE ** Entry
-)
-{
-    const struct _DirE * RetVal = NULL;
-
-    XFS_CSAN ( Entry )
-    XFS_CAN ( self )
-    XFS_CAN ( self -> content )
-    XFS_CAN ( Name )
-    XFS_CAN ( Entry )
-
-    if ( ! self -> is_folder ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RetVal = ( const struct _DirE * ) BSTreeFind (
-                                        & ( self -> content -> tree ),
-                                        Name,
-                                        _DirFindCallback
-                                        );
-    if ( RetVal != NULL ) {
-        if ( _DirEAddRef ( RetVal ) == 0 ) {
-            * Entry = RetVal;
-        }
-        else {
-            RetVal = NULL;
-        }
-    }
-
-    return RetVal == NULL ? XFS_RC ( rcNotFound ) : 0;
-}   /* _DirEGetEntryNoLock () */
-
-static
-rc_t CC
-_DirEGetEntry (
-                const struct _DirE * self,
-                const char * Name,
-                const struct _DirE ** Entry
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    XFS_CSAN ( Entry )
-    XFS_CAN ( self )
-    XFS_CAN ( Name )
-    XFS_CAN ( Entry )
-
-    if ( ! self -> is_folder ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    LOG_LOC_ACQ ( __LINE__, self -> mutabor );
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _DirEGetEntryNoLock ( self, Name, Entry );
-
-        LOG_LOC_UNL ( __LINE__, self -> mutabor );
-        KLockUnlock ( self -> mutabor );
-    }
-    return RCt;
-}   /* _DirEGetEntry () */
-
-static
-void CC
-_DirCModifyLast ( const struct _DirC * self, const char * Name )
-{
-    const char * pStart, * pEnd;
-    struct _DirC * Content;
-    size_t NameLen;
-    uint64_t Series;
-
-    pStart = pEnd = NULL;
-    Content = ( struct _DirC * ) self;
-    NameLen = 0;
-    Series = 0;
-
-    if ( Content == NULL || Name == NULL ) {
-        return;
-    }
-
-    if ( string_size ( Name ) < _NAME_FORMAT_LEN_ ) {
-        return;
-    }
-
-    if ( * Name == '.' ) {
-        pStart = Name + 1;
-
-        NameLen = string_size ( pStart );
-        if ( _NAME_FORMAT_LEN_ <= NameLen ) {
-            pEnd = pStart + _NAME_FORMAT_LEN_;
-
-            while ( pStart < pEnd ) {
-                if ( * pStart != '0' ) {
-                    break;
-                }
-
-                pStart ++;
-
-            }
-            if ( pStart != pEnd ) {
-                Series = string_to_U64 ( pStart, pEnd - pStart, NULL );
-                if ( Content -> last <= Series ) {
-                    Content -> last = Series;
-                }
-            }
-        }
-    }
-}   /* _DirCModifyLast () */
-
-static
-int64_t CC
-_DirEAddCallback ( const BSTNode * N1, const BSTNode * N2 )
-{
-    return XFS_StringCompare4BST_ZHR (
-                                    ( ( struct _DirE * ) N1 ) -> name,
-                                    ( ( struct _DirE * ) N2 ) -> name
-                                    );
-}   /* _DirEAddCallback () */
-
-static
-rc_t CC
-_DirEAddEntryNoLock (
-                    const struct _DirE * self,
-                    const struct _DirE * Entry
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    XFS_CAN ( self )
-    XFS_CAN ( self -> content )
-    XFS_CAN ( Entry )
-
-    if ( ! self -> is_folder ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = BSTreeInsert (
-                    ( struct BSTree * ) & ( self -> content -> tree ),
-                    ( struct BSTNode * ) & ( Entry -> node ),
-                    _DirEAddCallback
-                    );
-    if ( RCt == 0 ) {
-        _DirCModifyLast ( self -> content, Entry -> eff_name );
-    }
-
-    return RCt;
-}   /* _DirEAddEntryNoLock () */
-
-static
-rc_t CC
-_DirEDelEntryNoLock (
-            const struct _DirE * self,
-            const struct _DirE * Entry
-)
-{
-    XFS_CAN ( self )
-    XFS_CAN ( self -> content )
-    XFS_CAN ( Entry )
-
-    if ( ! self -> is_folder ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    BSTreeUnlink (
-                ( struct BSTree * ) & ( self -> content -> tree ),
-                ( struct BSTNode * ) & ( Entry -> node )
-                );
-
-    return _DirERelease ( Entry );
-}   /* _DirEDelEntryNoLock () */
-
-static
-rc_t CC
-_DirERenameEntryNoLock (
-                    const struct _DirE * self,
-                    const char * OldName,
-                    const char * NewName
-)
-{
-    rc_t RCt;
-    struct _DirE * Entry;
-
-    RCt = 0;
-    Entry = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( OldName )
-    XFS_CAN ( NewName )
-
-    if ( ! self -> is_folder ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = _DirEGetEntryNoLock (
-                            self,
-                            OldName,
-                            ( const struct _DirE ** ) & Entry
-                            );
-    if ( RCt == 0 ) {
-        if ( Entry != NULL ) {
-            RCt = _DirEDelEntryNoLock ( self, Entry );
-            if ( RCt == 0 ) {
-                free ( ( char * ) Entry -> name );
-                Entry -> name = NULL;
-
-                RCt = XFS_StrDup ( NewName, & ( Entry -> name ) );
-                if ( RCt == 0 ) {
-                    RCt = _DirEAddEntryNoLock ( self, Entry );
-                }
-            }
-        }
-
-        // _DirERelease ( Entry );
-    }
-
-    return RCt;
-}   /* _DirERenameEntryNoLock () */
-
-/*)) Rather long and weird method, which should be revisited TODO TODO
- ((*/
-static
-rc_t CC
-_DirEMoveEntry (
-                    const struct _DirE * OldParent,
-                    const char * OldName,
-                    const struct _DirE * NewParent,
-                    const char * NewName
-)
-{
-    rc_t RCt;
-    struct KDirectory * NatDir;
-    const struct _DirE * Entry;
-    const struct _DirE * TmpEntry;
-    const struct XFSPath * OldPath;
-    const struct XFSPath * NewPath;
-    char BF [ 32 ];
-
-    RCt = 0;
-    NatDir = NULL;
-    Entry = NULL;
-    TmpEntry = NULL;
-    OldPath = NULL;
-    NewPath = NULL;
-    * BF = 0;
-
-    XFS_CAN ( OldParent )
-    XFS_CAN ( OldName )
-    XFS_CAN ( NewParent )
-    XFS_CAN ( NewName )
-
-        /* Locking first and accessing Entry to move
-         */
-    LOG_LOC_ACQ ( __LINE__, OldParent -> mutabor );
-    RCt = KLockAcquire ( OldParent -> mutabor );
-    if ( RCt == 0 ) {
-            /* First we are getting the entry to move 
-             */
-        RCt = _DirEGetEntryNoLock ( OldParent , OldName, & Entry );
-
-        LOG_LOC_UNL ( __LINE__, OldParent -> mutabor );
-        KLockUnlock ( OldParent -> mutabor );
-    }
-
-    if ( RCt == 0 ) {
-            /* Locking and creating space for Entry to move
-             */
-        LOG_LOC_ACQ ( __LINE__, NewParent -> mutabor );
-        RCt = KLockAcquire ( NewParent -> mutabor );
-        if ( RCt == 0 ) {
-            RCt = _DirEGetEntryNoLock (
-                                     NewParent ,
-                                     NewName,
-                                     & TmpEntry
-                                     );
-            if ( RCt == 0 ) {
-                RCt = _DirEDelEntryNoLock ( NewParent, TmpEntry );
-
-                _DirERelease ( TmpEntry );
-            }
-            else {
-                RCt = 0;
-            }
-
-            LOG_LOC_UNL ( __LINE__, NewParent -> mutabor );
-            KLockUnlock ( NewParent -> mutabor );
-        }
-    }
-
-    if ( RCt == 0 ) {
-        RCt = KDirectoryNativeDir ( & NatDir );
-
-        if ( RCt == 0 ) {
-                /* Here we are moving real file
-                 */
-            RCt = XFSPathMakeAbsolute (
-                                    & OldPath,
-                                    false,
-                                    "%s/%s",
-                                    OldParent -> content -> path,
-                                    Entry -> eff_name
-                                    );
-            if ( RCt == 0 ) {
-                RCt = _DirCNewName (
-                                NewParent -> content,
-                                Entry -> is_folder,
-                                BF,
-                                sizeof ( BF )
-                                );
-                if ( RCt == 0 ) {
-                    RCt = XFSPathMakeAbsolute (
-                                        & NewPath,
-                                        false,
-                                        "%s/%s",
-                                        NewParent -> content -> path,
-                                        BF
-                                        );
-                    if ( RCt == 0 ) {
-                        RCt = KDirectoryRename (
-                                                NatDir,
-                                                true, /* FORCE */
-                                                XFSPathGet ( OldPath ),
-                                                XFSPathGet ( NewPath )
-                                                );
-                        XFSPathRelease ( NewPath );
-                    }
-                }
-
-                XFSPathRelease ( OldPath );
-            }
-
-            KDirectoryRelease ( NatDir );
-        }
-    }
-
-        /* Here we are deleteing old entry and synchronizing
-         */
-    if ( RCt == 0 ) {
-        LOG_LOC_ACQ ( __LINE__, OldParent -> mutabor );
-        RCt = KLockAcquire ( OldParent -> mutabor );
-        if ( RCt == 0 ) {
-            RCt = _DirEDelEntryNoLock ( OldParent, Entry );
-            if ( RCt == 0 ) {
-                RCt = _SyncronizeDirectoryContentNoLock ( OldParent );
-            }
-            LOG_LOC_UNL ( __LINE__, OldParent -> mutabor );
-            KLockUnlock ( OldParent -> mutabor );
-        }
-    }
-
-        /* Here we are adding new 'old' entry and synchronizing
-         */
-    if ( RCt == 0 ) {
-        LOG_LOC_ACQ ( __LINE__, NewParent -> mutabor );
-        RCt = KLockAcquire ( NewParent -> mutabor );
-        if ( RCt == 0 ) {
-                /*  First, we should setup new : Name, EffName and Path,
-                 *  if it is a Folder
-                 */
-
-            free ( ( char * ) Entry -> name );
-            RCt = XFS_StrDup (
-                            NewName,
-                            ( const char ** ) & ( Entry -> name )
-                            );
-            if ( RCt == 0 ) {
-
-                free ( ( char * ) Entry -> eff_name );
-                RCt = XFS_StrDup (
-                            BF,
-                            ( const char ** ) & ( Entry -> eff_name )
-                            );
-                if ( RCt == 0 ) {
-                    if ( Entry -> is_folder ) {
-                        RCt = XFSPathMakeAbsolute (
-                                         & NewPath,
-                                         false,
-                                         "%s/%s",
-                                         NewParent -> content -> path,
-                                         BF
-                                         );
-                        if ( RCt == 0 ) {
-
-                            free ( ( char * ) Entry -> content -> path );
-                            XFS_StrDup (
-                                    XFSPathGet ( NewPath ),
-                                    ( const char ** ) & ( Entry -> content -> path )
-                                    );
-
-                            XFSPathRelease ( NewPath );
-                        }
-
-                    }
-
-                    if ( RCt == 0 ) {
-                        RCt = _DirEAddEntryNoLock ( NewParent, Entry );
-                        if ( RCt == 0 ) {
-                            RCt = _SyncronizeDirectoryContentNoLock (
-                                                            NewParent
-                                                            );
-                        }
-                    }
-                }
-            }
-        }
-
-        LOG_LOC_UNL ( __LINE__, NewParent -> mutabor );
-        KLockUnlock ( NewParent -> mutabor );
-    }
-
-    return RCt;
-}   /* _DirEMoveEntry () */
-
-static
-rc_t CC
-_DirECreateEntryNoLock (
-                const struct _DirE * self,
-                const char * Name,
-                bool IsFolder,
-                const struct _DirE ** Entry
-)
-{
-    rc_t RCt;
-    const struct _DirE * RetVal;
-    char Buf [ XFS_SIZE_64 ];
-
-    RCt = 0;
-    RetVal = NULL;
-    * Buf = 0;
-
-    XFS_CSAN ( Entry )
-    XFS_CAN ( self )
-    XFS_CAN ( Name )
-    XFS_CAN ( Entry )
-
-    if ( ! self -> is_folder ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = _DirEGetEntryNoLock ( self, Name, & RetVal );
-    if ( GetRCState ( RCt ) == rcNotFound ) {
-        RCt = _DirCNewName (
-                            self -> content,
-                            IsFolder,
-                            Buf,
-                            sizeof ( Buf )
-                            );
-        if ( RCt == 0 ) {
-            RCt = _DirEMake (
-                            ( IsFolder ? _sFolderTag : _sFileTag ),
-                            Buf,
-                            Name,
-                            & RetVal
-                            );
-            if ( RCt == 0 ) {
-                RCt = _DirEAddEntryNoLock ( self, RetVal );
-            }
-        }
-    }
-    else {
-        if ( RCt == 0 ) {
-            _DirERelease ( RetVal );
-        }
-    }
-
-    if ( RCt == 0 ) {
-        * Entry = RetVal;
-    }
-    else {
-        if ( RetVal != NULL ) {
-            _DirEDispose ( RetVal );
-        }
-    }
-
-    return RCt;
-}   /* _DirECreateEntryNoLock () */
-
-static
-bool CC 
-_DirEHasEntriesCallback ( BSTNode *n, void *data )
-{
-    return true;
-}   /* _DirEHasEntriesCallback () */
-
-static
-bool CC
-_DirEHasEntries ( const struct _DirE * self )
-{
-    if ( self == NULL ) {
-        return false;
-    }
-
-    if ( ! self -> is_folder ) {
-        return false;
-    }
-
-    if ( self -> content == NULL ) {
-        return false;
-    }
-
-    return  BSTreeDoUntil (
-                        & ( self -> content -> tree ),
-                        false,
-                        _DirEHasEntriesCallback,
-                        NULL
-                        );
-}   /* _DirEHasEntries () */
-
-static
-void
-_DirEListCalback ( BSTNode * Node, void * Data )
-{
-    struct VNamelist * List;
-    struct _DirE * Entry;
-
-    List = ( struct VNamelist * ) Data;
-    Entry = ( struct _DirE * ) Node;
-
-    if ( List != NULL && Entry != NULL ) {
-        VNamelistAppend ( List, Entry -> name );
-    }
-}   /* _DirEListCalback () */
-
-static
-rc_t CC
-_DirEListEntriesNoLock (
-                const struct _DirE * self,
-                struct KNamelist ** List
-)
-{
-    rc_t RCt;
-    struct VNamelist * xList;
-
-    RCt = 0;
-    xList = NULL;
-
-    XFS_CSAN ( List )
-    XFS_CAN ( self )
-    XFS_CAN ( self -> content )
-    XFS_CAN ( List )
-
-    if ( ! self -> is_folder ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = VNamelistMake ( & xList, 16 );
-    if ( RCt == 0 ) {
-        BSTreeForEach (
-                    & ( self -> content -> tree ),
-                    false,
-                    _DirEListCalback,
-                    xList
-                    );
-
-        RCt = VNamelistToNamelist ( xList, List );
-
-        VNamelistRelease ( xList );
-    }
-
-
-    return RCt;
-}   /* _DirEListEntries () */
-
-static
-rc_t CC
-_DirEVisitNoLock (
-                const struct _DirE * self, 
-                const struct KDirectory * Dir,
-                bool Recurse,
-                rc_t ( CC * Func ) (
-                            const struct KDirectory *,
-                            uint32_t,
-                            const char *,
-                            void *
-                            ), 
-                void * Data,
-                const char * Path
-)
-{
-    rc_t RCt;
-    struct KNamelist * List;
-    uint32_t ListQty;
-    uint32_t Idx;
-    const struct _DirE * Entry;
-    const char * Name;
-    char BF [ XFS_SIZE_4096 ];
-    size_t NumW;
-
-    RCt = 0;
-    List = NULL;
-    ListQty = 0;
-    Idx = 0;
-    Entry = NULL;
-    Name = NULL;
-    * BF = 0;
-    NumW = 0;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Func )
-    XFS_CAN ( Path )
-
-    LOG_LOC_ACQ ( __LINE__, self -> mutabor );
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _DirEListEntriesNoLock ( self, & List );
-
-        LOG_LOC_UNL ( __LINE__, self -> mutabor );
-        KLockUnlock ( self -> mutabor );
-    }
-
-    if ( RCt == 0 ) {
-        RCt = KNamelistCount ( List, & ListQty );
-        if ( RCt == 0 ) {
-            for ( Idx = 0; ( Idx < ListQty ) && ( RCt == 0 ); Idx ++ ) {
-                RCt = KNamelistGet ( List, Idx, & Name );
-                if ( RCt == 0 ) {
-                    RCt = _DirEGetEntry ( self, Name, & Entry );
-                    if ( RCt == 0 ) {
-
-                        RCt = string_printf ( 
-                                            BF,
-                                            sizeof ( BF ),
-                                            & NumW,
-                                            "%s/%s",
-                                            Path,
-                                            Name
-                                            );
-                        if ( RCt == 0 ) {
-                            RCt = Func ( 
-                                        Dir,
-                                        Entry -> is_folder
-                                                        ? kptDir
-                                                        : kptFile
-                                                        ,
-                                        BF,
-                                        Data
-                                        );
-                            if ( RCt == 0 ) {
-                                if ( Entry -> is_folder && Recurse ) {
-                                    RCt = _DirEVisitNoLock (
-                                                            Entry,
-                                                            Dir,
-                                                            Recurse,
-                                                            Func,
-                                                            Data,
-                                                            BF
-                                                            );
-                                }
-                            }
-                        }
-
-                        _DirERelease ( Entry );
-                    }
-                }
-            }
-        }
-
-        KNamelistRelease ( List );
-    }
-
-    return RCt;
-}   /* _DirEVisitNoLock () */
-
-/*))    That method will get or create content from entry.
- ((*/
-static
-rc_t CC
-_DirECheckLoadContent (
-                const struct _DirE * self,
-                const struct KKey * Key,
-                const char * Format,
-                ...
-)
-{
-    rc_t RCt;
-    va_list Args;
-
-    RCt = 0;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Key )
-    XFS_CAN ( Format )
-
-    if ( ! self -> is_folder ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    LOG_LOC_ACQ ( __LINE__, self -> mutabor );
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-            /*)) Check if Content already loaded ((*/
-        if ( self -> content == NULL ) {
-
-                /*)) Tying to load Content ((*/
-            va_start ( Args, Format );
-            RCt = _DirEVMakeContent ( self, Key, Format, Args );
-            va_end ( Args );
-        }
-
-        if ( self -> content == NULL ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-
-        LOG_LOC_UNL ( __LINE__, self -> mutabor );
-        KLockUnlock ( self -> mutabor );
-
-    }
-
-    return RCt;
-}   /* _DirECheckLoadContent () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct XFSWsDir {
-    struct KDirectory dir;
-
-    const char * passwd;
-    const char * enc_type;
-    bool update;
-
-    const struct _DirE * entry;
-};
-
-static
-rc_t CC
-_WsDirEntry (
-            const struct XFSWsDir * self,
-            const struct _DirE ** Entry
-)
-{
-    rc_t RCt = 0;
-
-    XFS_CSAN ( Entry )
-    XFS_CAN ( self )
-    XFS_CAN ( Entry )
-
-    XFS_CAN ( self -> entry ) 
-
-    RCt = _DirEAddRef ( self -> entry );
-    if ( RCt == 0 ) {
-        * Entry = self -> entry;
-    }
-
-    return RCt;
-}   /* _WsDirEntry () */
-
-static
-const struct KKey * CC
-_WsDirKey ( const struct XFSWsDir * self )
-{
-    if ( self != NULL ) {
-        if ( self -> entry != NULL ) {
-            if ( self -> entry -> content != NULL ) {
-                return & ( self -> entry -> content -> key );
-            }
-        }
-    }
-    return NULL;
-}   /* _WsDirKey () */
-
-static
-const char * CC
-_WsDirPath ( const struct XFSWsDir * self )
-{
-    if ( self != NULL ) {
-        if ( self -> entry != NULL ) {
-            if ( self -> entry -> content != NULL ) {
-                return self -> entry -> content -> path;
-            }
-        }
-    }
-    return NULL;
-}   /* _WsDirPath () */
-
-static
-rc_t CC
-_WsDirMapPath (
-            const struct XFSWsDir * self,
-            const struct XFSPath * Path,
-            const struct _DirE ** RetEntry,
-            const struct XFSPath ** EffPath
-)
-{
-    rc_t RCt;
-    size_t Idx, Qty;
-    const struct XFSPath * RetVal;
-    const struct _DirE * Entry, * TmpEntry;
-
-    RCt = 0;
-    Idx = Qty = 0;
-    RetVal = NULL;
-    Entry = TmpEntry = NULL;
-
-    XFS_CSAN ( EffPath )
-    XFS_CSAN ( RetEntry )
-    XFS_CAN ( self )
-    XFS_CAN ( Path )
-    XFS_CAN ( EffPath )
-    XFS_CAN ( RetEntry )
-
-        /*) First we are creating empty Path
-         */
-
-    RCt = XFSPathMake ( & RetVal, false, "" );
-    if ( RCt == 0 ) {
-        RCt = _WsDirEntry ( self, & Entry );
-        if ( RCt == 0 ) {
-
-            Qty = XFSPathPartCount ( Path );
-            for ( Idx = 0; Idx < Qty; Idx ++ ) {
-                RCt = _DirEGetEntry (
-                                    Entry,
-                                    XFSPathPartGet ( Path, Idx ),
-                                    & TmpEntry
-                                    );
-
-                if ( RCt != 0 ) {
-                    break;
-                }
-
-                if ( TmpEntry == NULL ) {
-                    RCt = XFS_RC ( rcNotFound );
-                    break;
-                }
-
-                if ( TmpEntry -> is_folder ) {
-                    RCt = _DirECheckLoadContent (
-                                    TmpEntry,
-                                    & ( Entry -> content -> key ),
-                                    "%s/%s",
-                                    Entry -> content -> path,
-                                    TmpEntry -> eff_name
-                                    );
-                    if ( RCt != 0 ) {
-                        break;
-                    }
-                }
-                else {
-                    if ( ( Idx + 1 ) < Qty ) {
-                        RCt = XFS_RC ( rcInvalid );
-                        break;
-                    }
-                }
-
-                RCt = XFSPathAppend ( RetVal, TmpEntry -> eff_name );
-                if ( RCt != 0 ) {
-                    break;
-                }
-
-                _DirERelease ( Entry );
-
-                Entry = TmpEntry;
-                TmpEntry = NULL;
-            }
-
-            if ( RCt == 0 ) {;
-                    /* Should we check Entry for NULL ? */
-                * EffPath = RetVal;
-
-                * RetEntry = Entry;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * EffPath = NULL;
-        * RetEntry = NULL;
-
-        if ( RetVal != NULL ) {
-            XFSPathRelease ( RetVal );
-        }
-
-        if ( Entry != NULL ) {
-            _DirERelease ( Entry );
-        }
-    }
-
-    return RCt;
-}   /* _WsDirMapPath () */
-
-static
-rc_t
-_WsDirVMapIt (
-            const struct XFSWsDir * self,
-            const struct _DirE ** Entry,
-            const struct XFSPath ** EffPath,   /* Could be NULL */
-            const char * Format,
-            va_list Args
-)
-{
-    rc_t RCt;
-    const struct XFSPath * WsPath;
-    const struct XFSPath * DerPath;
-    const struct XFSPath * TmpPath;
-    const struct XFSPath * ThePath;
-    const struct _DirE * TheEntry;
-    va_list xArgs;
-
-    RCt = 0;
-    WsPath = NULL;
-    DerPath = NULL;
-    TmpPath = NULL;
-    ThePath = NULL;
-    TheEntry = NULL;
-
-    XFS_CSAN( Entry )
-    XFS_CSAN( EffPath )
-    XFS_CAN ( self )
-    XFS_CAN ( Format )
-
-        /* First we shoud make sure that path is our.
-         | I mean, path should be part of Directory path.
-         */
-            /*) Orig Path
-             (*/
-    RCt = XFSPathMakeAbsolute ( & WsPath, false, _WsDirPath ( self ) );
-    if ( RCt == 0 ) {
-            /*) Absolute Input Path
-             (*/
-        va_copy ( xArgs, Args );
-        RCt = XFSPathVMakeAbsolute ( & DerPath, false, Format, xArgs );
-        va_end ( xArgs );
-
-        if ( RCt == 0 ) {
-            if ( XFSPathIsChild ( WsPath, DerPath, & TmpPath ) ) {
-                    /*) Here we are mapping effective path
-                     (*/
-                RCt = _WsDirMapPath (
-                                    self,
-                                    TmpPath,
-                                    & TheEntry,
-                                    & ThePath
-                                    );
-                if ( RCt == 0 ) {
-                    * Entry = TheEntry;
-
-                    if ( EffPath != NULL ) {
-                        XFSPathAddRef ( ThePath );
-                        * EffPath = ThePath;
-                    }
-
-                    XFSPathRelease ( ThePath );
-                }
-
-                XFSPathRelease ( TmpPath );
-            }
-            else {
-                RCt = XFS_RC ( rcOutOfKDirectory );
-            }
-
-            XFSPathRelease ( DerPath );
-        }
-
-        XFSPathRelease ( WsPath );
-    }
-
-    if ( RCt != 0 ) {
-        if ( EffPath != NULL ) {
-            * EffPath = NULL;
-        }
-    }
-
-    return RCt;
-}   /* _WsDirVMapIt () */
-
-static
-rc_t
-_WsDirMapIt (
-            const struct XFSWsDir * self,
-            const struct _DirE ** Entry,
-            const struct XFSPath ** EffPath,   /* Could be NULL */
-            const char * Format,
-            ...
-)
-{
-    rc_t RCt;
-    va_list Args;
-
-    RCt = 0;
-
-    va_start ( Args, Format );
-    RCt = _WsDirVMapIt ( self, Entry, EffPath, Format, Args );
-    va_end ( Args );
-
-    return RCt;
-}   /* _WsDirMapIt () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*  Cryptonomifile-ile-wile                                          */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)))
- (((    Here is some lyrics. Current version of KEncFile is not 
-  )))   thread safe, so I had to add mutex here. However, the only
- (((    way to create KEncFile is call "KEncFileMakeInt ()" which
-  )))   allocates KEncFile, and theree is no any 'Init" methods.
- (((    So, we can not just do it in normal 'inheritance way' That's
-  )))   why there is that ugle-moogle
- (((*/
-struct _xEncFile {
-    struct KFile file;
-
-    struct KFile * enc_file;
-
-    struct KLock * mutabor;
-};
-
-static
-rc_t CC
-_EncFileDestroy ( struct KFile * self )
-{
-    struct _xEncFile * File;
-
-    File = ( struct _xEncFile * ) self;
-
-    if ( File != NULL ) {
-
-        if ( File -> mutabor != NULL ) {
-            KLockRelease ( File -> mutabor );
-
-            File -> mutabor = NULL;
-        }
-
-        if ( File -> enc_file != NULL ) {
-            KFileRelease ( File -> enc_file );
-
-            File -> enc_file = NULL;
-        }
-
-        free ( File );
-    }
-
-    return 0;
-}   /* _EncFileDestroy () */
-
-static
-struct KSysFile * CC
-_EncFileGetSysFile ( const struct KFile * self, uint64_t * Offset )
-{
-    struct _xEncFile * File = ( struct _xEncFile * ) self;
-
-    if ( File != NULL ) {
-        if ( File -> enc_file != NULL ) {
-            return KFileGetSysFile ( File -> enc_file, Offset );
-        }
-    }
-
-    return NULL;
-}   /* _EncFileGetSysFile () */
-
-static
-rc_t CC
-_EncFileRandomAccess ( const struct KFile * self )
-{
-    const struct _xEncFile * File = ( const struct _xEncFile * ) self;
-
-    XFS_CAN ( File )
-    XFS_CAN ( File -> enc_file )
-
-    return KFileRandomAccess ( File -> enc_file );
-}   /* _EncFileRandomAccess () */
-
-static
-rc_t CC
-_EncFileSize ( const struct KFile * self, uint64_t * Size )
-{
-    rc_t RCt;
-    const struct _xEncFile * File;
-
-    RCt = 0;
-    File = ( const struct _xEncFile * ) self;
-
-    XFS_CSA ( Size, 0 )
-    XFS_CAN ( File )
-    XFS_CAN ( Size )
-    XFS_CAN ( File -> enc_file )
-    XFS_CAN ( File -> mutabor )
-
-    LOG_LOC_ACQ ( __LINE__, File -> mutabor );
-    RCt = KLockAcquire ( File -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = KFileSize ( File -> enc_file, Size );
-
-        LOG_LOC_UNL ( __LINE__, File -> mutabor );
-        KLockUnlock ( File -> mutabor );
-    }
-
-    return RCt;
-}   /* _EncFileSize () */
-
-static
-rc_t CC
-_EncFileSetSize ( struct KFile * self, uint64_t Size )
-{
-    rc_t RCt;
-    const struct _xEncFile * File;
-
-    RCt = 0;
-    File = ( const struct _xEncFile * ) self;
-
-    XFS_CAN ( File )
-    XFS_CAN ( File -> enc_file )
-    XFS_CAN ( File -> mutabor )
-
-    LOG_LOC_ACQ ( __LINE__, File -> mutabor );
-    RCt = KLockAcquire ( File -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = KFileSetSize ( File -> enc_file, Size );
-
-        LOG_LOC_UNL ( __LINE__, File -> mutabor );
-        KLockUnlock ( File -> mutabor );
-    }
-
-    return RCt;
-}   /* _EncFileSetSize () */
-
-static
-rc_t CC
-_EncFileRead (
-            const struct KFile * self,
-            uint64_t Pos,
-            void * Bf,
-            size_t BfSz,
-            size_t * NumRead
-)
-{
-    rc_t RCt;
-    const struct _xEncFile * File;
-
-    RCt = 0;
-    File = ( const struct _xEncFile * ) self;
-
-    XFS_CSA ( NumRead, 0 )
-    XFS_CAN ( File )
-    XFS_CAN ( Bf )
-    XFS_CAN ( NumRead )
-    XFS_CAN ( File -> enc_file )
-    XFS_CAN ( File -> mutabor )
-
-    LOG_LOC_ACQ ( __LINE__, File -> mutabor );
-    RCt = KLockAcquire ( File -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = KFileRead ( File -> enc_file, Pos, Bf, BfSz, NumRead );
-
-        LOG_LOC_UNL ( __LINE__, File -> mutabor );
-        KLockUnlock ( File -> mutabor );
-    }
-
-    return RCt;
-}   /* _EncFileRead () */
-
-static
-rc_t CC
-_EncFileWrite (
-            struct KFile * self,
-            uint64_t Pos,
-            const void * Bf,
-            size_t BfSz,
-            size_t * NumWrote
-)
-{
-    rc_t RCt;
-    struct _xEncFile * File;
-
-    RCt = 0;
-    File = ( struct _xEncFile * ) self;
-
-    XFS_CSA ( NumWrote, 0 )
-    XFS_CAN ( File )
-    XFS_CAN ( Bf )
-    XFS_CAN ( NumWrote )
-    XFS_CAN ( File -> enc_file )
-    XFS_CAN ( File -> mutabor )
-
-    LOG_LOC_ACQ ( __LINE__, File -> mutabor );
-    RCt = KLockAcquire ( File -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = KFileWrite ( File -> enc_file, Pos, Bf, BfSz, NumWrote );
-
-        LOG_LOC_UNL ( __LINE__, File -> mutabor );
-        KLockUnlock ( File -> mutabor );
-    }
-
-    return RCt;
-}   /* _EncFileWrite () */
-
-static
-uint32_t CC
-_EncFileType ( const struct KFile * self )
-{
-    const struct _xEncFile * File = ( const struct _xEncFile * ) self;
-
-    if ( File != NULL ) {
-        if ( File -> enc_file != NULL ) {
-            return KFileType ( File -> enc_file );
-        }
-    }
-
-    return kptFile;
-}   /* _EncFileType () */
-                                
-static struct KFile_vt_v1 _svxEncFile = {
-                                        /* version */
-                                    1, 1,
-                                
-                                        /* 1.0 */
-                                    _EncFileDestroy,
-                                    _EncFileGetSysFile,
-                                    _EncFileRandomAccess,
-                                    _EncFileSize,
-                                    _EncFileSetSize,
-                                    _EncFileRead,
-                                    _EncFileWrite,
-                                
-                                        /* 1.1 */
-                                    _EncFileType
-                                    };
-
-static
-rc_t CC
-_EncFileMake ( struct KFile * EncFile, struct KFile ** RetFile )
-{
-    rc_t RCt;
-    struct _xEncFile * File;
-
-    RCt = 0;
-    File = NULL;
-
-    XFS_CSAN ( RetFile )
-    XFS_CAN ( EncFile )
-    XFS_CAN ( RetFile )
-
-    File = calloc ( 1, sizeof ( struct _xEncFile ) );
-    if ( File == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = KFileInit (
-                        & ( File -> file ),
-                        ( const KFile_vt * ) & _svxEncFile,
-                        "XFSEncFile",
-                        "EncFile",
-                        EncFile -> read_enabled,
-                        EncFile -> write_enabled
-                        );
-        if ( RCt == 0 ) {
-            RCt = KLockMake ( & ( File -> mutabor ) );
-            if ( RCt == 0 ) {
-                File -> enc_file = EncFile;
-
-                * RetFile = & ( File -> file );
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * RetFile = NULL;
-
-        KFileRelease ( & ( File -> file ) );
-    }
-
-    return RCt;
-}   /* _EncFileMake () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*  Cryptonomicom-om-um                                              */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static
-rc_t CC
-_OpenEncryptedFileRead (
-                const struct KFile ** File,
-                struct KKey * Key,
-                const char * Path,
-                ...
-)
-{
-    rc_t RCt;
-    struct KDirectory * nDir;
-    const struct KFile * rFile, * xFile;
-    va_list Args;
-
-    RCt = 0;
-    nDir = NULL;
-    rFile = xFile = NULL;
-
-    XFS_CSAN ( File )
-    XFS_CAN ( File )
-    XFS_CAN ( Key )
-    XFS_CAN ( Path )
-
-    RCt = KDirectoryNativeDir ( & nDir );
-    if ( RCt == 0 ) {
-        va_start ( Args, Path );
-        RCt = KDirectoryVOpenFileRead ( nDir, & rFile, Path, Args );
-        va_end ( Args );
-        if ( RCt == 0 ) {
-            RCt = KEncFileMakeRead ( & xFile, rFile, Key );
-
-            KFileRelease ( rFile );
-            if ( RCt == 0 ) {
-                RCt = _EncFileMake ( ( struct KFile * ) xFile, ( struct KFile ** ) File );
-            }
-else { RCt = XFS_RC ( rcBusy ); pLogMsg ( klogDebug, " RET_BUSY [$(line)]", "line=%d", __LINE__ ); }
-        }
-
-        KDirectoryRelease ( nDir );
-    }
-
-    return RCt;
-}   /* _OpenEncryptedFileRead () */
-
-static
-rc_t CC
-_OpenVEncryptedFileWrite (
-                struct KFile ** File,
-                struct KKey * Key,
-                bool Update,
-                const char * Path,
-                va_list VaList
-)
-{
-    rc_t RCt;
-    struct KDirectory * nDir;
-    struct KFile * wFile, * xFile;
-    va_list Args;
-
-    RCt = 0;
-    nDir = NULL;
-    wFile = xFile = NULL;
-
-    XFS_CSAN ( File )
-    XFS_CAN ( File )
-    XFS_CAN ( Key )
-    XFS_CAN ( Path )
-
-/* because of we unable to read encrypted file header in Write Only
- * mode we are always opening files in Update mode. I have no idea how
- * to fix that problem. Thinking about it.
- */
-#ifdef _ENCODED_FILE_UPDATE_ALWAYS_
-    Update = true;
-#endif /* _ENCODED_FILE_UPDATE_ALWAYS_ */
-
-    RCt = KDirectoryNativeDir ( & nDir );
-    if ( RCt == 0 ) {
-        va_copy ( Args, VaList );
-        RCt = KDirectoryVOpenFileWrite (
-                                        nDir,
-                                        & wFile,
-                                        Update,
-                                        Path,
-                                        Args
-                                        );
-        va_end ( Args );
-        if ( RCt == 0 ) {
-            RCt = Update
-                    ? KEncFileMakeUpdate ( & xFile, wFile, Key )
-                    : KEncFileMakeWrite ( & xFile, wFile, Key )
-                    ;
-            KFileRelease ( wFile );
-
-            if ( RCt == 0 ) {
-                RCt = _EncFileMake ( ( struct KFile * ) xFile, File );
-            }
-else { RCt = XFS_RC ( rcBusy ); pLogMsg ( klogDebug, " RET_BUSY [$(line)]", "line=%d", __LINE__ ); }
-
-        }
-
-        KDirectoryRelease ( nDir );
-    }
-
-    return RCt;
-}   /* _OpenVEncryptedFileWrite () */
-
-static
-rc_t CC
-_OpenEncryptedFileWrite (
-                struct KFile ** File,
-                struct KKey * Key,
-                bool Update,
-                const char * Path,
-                ...
-)
-{
-    rc_t RCt;
-    va_list Args;
-
-    RCt = 0;
-
-    va_start ( Args, Path );
-    RCt = _OpenVEncryptedFileWrite ( File, Key, Update, Path, Args );
-    va_end ( Args );
-
-    return RCt;
-}   /* _OpenEncryptedFileWrite () */
-
-static
-rc_t CC
-_CreateEncryptedFile (
-                struct KFile ** File,
-                const struct KKey * Key,
-                bool Update,
-                uint32_t Access,
-                KCreateMode Cmode,
-                const char * Format,
-                ...
-)
-{
-    rc_t RCt;
-    struct KDirectory * NativeDir;
-    struct KFile * TheFile, * EncFile;
-    va_list Args;
-
-    RCt = 0;
-    NativeDir = NULL;
-    TheFile = EncFile = NULL;
-
-    XFS_CSAN ( File )
-    XFS_CAN ( File )
-    XFS_CAN ( Key )
-    XFS_CAN ( Format )
-
-/* because of we unable to read encrypted file header in Write Only
- * mode we are always opening files in Update mode. I have no idea how
- * to fix that problem. Thinking about it.
- */
-#ifdef _ENCODED_FILE_UPDATE_ALWAYS_
-    Update = true;
-#endif /* _ENCODED_FILE_UPDATE_ALWAYS_ */
-
-    RCt = KDirectoryNativeDir ( & NativeDir );
-    if ( RCt == 0 ) {
-            /* Create File */
-        va_start ( Args, Format );
-        RCt = KDirectoryVCreateFile (
-                                    NativeDir,
-                                    & TheFile,
-                                    Update,
-                                    Access,
-                                    Cmode,
-                                    Format,
-                                    Args
-                                    );
-        va_end ( Args );
-        if ( RCt == 0 ) {
-                /* Create Encrypted File */
-            RCt = Update
-                        ? KEncFileMakeUpdate ( & EncFile, TheFile, Key )
-                        : KEncFileMakeWrite ( & EncFile, TheFile, Key )
-                        ;
-
-            KFileRelease ( TheFile );
-
-            if ( RCt == 0 ) {
-                RCt = _EncFileMake ( ( struct KFile * ) EncFile, File );
-                // * File = EncFile;
-            }
-        }
-
-        KDirectoryRelease ( NativeDir );
-    }
-
-    return RCt;
-}   /* _CreateEncryptedFile () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*  Some common things                                               */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*||+\
- +||+   Don't forget to free 'EntryName'
-\+||*/
-static
-rc_t CC
-_GetNameAndMapParentEntryNoLock (
-                        struct  XFSWsDir * self,
-                        const struct _DirE ** ParentEntry,
-                        const struct XFSPath ** EffPath,
-                        const char ** EntryName,
-                        const char * Format,
-                        va_list Args
-)
-{
-    rc_t RCt;
-    const struct _DirE * RetEntry;
-    const struct XFSPath * RetEffPath;
-    const struct XFSPath * ThePath, * ParPath;
-    va_list xArgs;
-
-    RCt = 0;
-    RetEntry = NULL;
-    RetEffPath = NULL;
-    ThePath = ParPath = NULL;
-
-    XFS_CSAN ( ParentEntry )
-    XFS_CSAN ( EffPath )
-    XFS_CSAN ( EntryName )
-    XFS_CAN ( self )
-    XFS_CAN ( ParentEntry )
-    XFS_CAN ( EffPath )
-    XFS_CAN ( EntryName )
-    XFS_CAN ( Format )
-
-        /*) Simple : Map parent directory, create file, add record about
-         (*/
-    va_copy ( xArgs, Args );
-    RCt = XFSPathVMakeAbsolute ( & ThePath, false, Format, xArgs );
-    va_end ( xArgs );
-    if ( RCt == 0 ) {
-        RCt = XFSPathParent ( ThePath, & ParPath );
-        if ( RCt == 0 ) {
-            RCt = _WsDirMapIt (
-                            self,
-                            & RetEntry,
-                            & RetEffPath,
-                            XFSPathGet ( ParPath )
-                            );
-            if ( RCt == 0 ) {
-                RCt = _DirECheckLoadContent (
-                                            RetEntry,
-                                            _WsDirKey ( self ),
-                                            "%s/%s",
-                                            _WsDirPath ( self ),
-                                            XFSPathGet ( RetEffPath )
-                                            );
-                if ( RCt == 0 ) {
-                    RCt = XFS_StrDup (
-                                    XFSPathName ( ThePath ),
-                                    EntryName
-                                    );
-                    if ( RCt == 0 ) {
-                        * ParentEntry = RetEntry;
-                        * EffPath = RetEffPath;
-                    }
-                }
-            }
-
-            XFSPathRelease ( ParPath );
-        }
-
-        XFSPathRelease ( ThePath );
-    }
-
-    if ( RCt != 0 ) {
-        * ParentEntry = NULL;
-        * EffPath = NULL;
-
-        if ( RetEffPath != NULL ) {
-            XFSPathRelease ( RetEffPath );
-
-            RetEffPath = NULL;
-        }
-
-        if ( * EntryName != NULL ) {
-            free ( ( char * ) * EntryName );
-
-            * EntryName = NULL;
-        }
-
-        if ( RetEntry != NULL ) {
-            _DirERelease ( RetEntry );
-        }
-    }
-
-    return RCt;
-}   /* _GetNameAndMapParentEntryNoLock () */
-
-static
-rc_t CC
-_GetCNameAndMapParentEntryNoLock (
-                        struct  XFSWsDir * self,
-                        const struct _DirE ** ParentEntry,
-                        const struct XFSPath ** EffPath,
-                        const char ** EntryName,
-                        const char * Format,
-                        ...
-)
-{
-    rc_t RCt;
-
-    va_list Args;
-
-    va_start ( Args, Format );
-    RCt = _GetNameAndMapParentEntryNoLock (
-                                        self,
-                                        ParentEntry,
-                                        EffPath,
-                                        EntryName,
-                                        Format,
-                                        Args
-                                        );
-    va_end ( Args );
-
-    return RCt;
-}   /* _GetCNameAndMapParentEntryNoLock () */
-
-static
-rc_t CC
-_GetContentEntryAndLock (
-                        const struct _DirE * Parent,
-                        const struct _DirE ** Entry,
-                        const char * EntryName
-)
-{
-    rc_t RCt;
-    const struct _DirE * RetEntry;
-
-    RCt = 0;
-    RetEntry = NULL;
-
-    XFS_CSAN ( Entry )
-    XFS_CAN ( Parent )
-    XFS_CAN ( Entry )
-    XFS_CAN ( EntryName )
-
-        /*) Locking
-         (*/
-    LOG_LOC_ACQ ( __LINE__, Parent -> mutabor );
-    RCt = KLockAcquire ( Parent -> mutabor );
-    if ( RCt == 0 ) {
-            /*) Getting content entry for file
-             (*/
-        RCt = _DirEGetEntryNoLock ( Parent , EntryName, & RetEntry );
-        if ( RCt == 0 ) {
-            * Entry = RetEntry;
-        }
-        else {
-            LOG_LOC_UNL ( __LINE__, Parent -> mutabor );
-            KLockUnlock ( Parent -> mutabor );
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Entry = NULL; 
-    }
-
-    return RCt;
-}   /* _GetContentEntryAndLock () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*  Dirty virtual table                                              */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirDestroy
- */
-static
-rc_t CC
-XFSWsDirDestroy ( struct KDirectory * self )
-{
-    struct XFSWsDir * Dir = ( struct XFSWsDir * ) self;
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirDestroy] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    if ( Dir == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Dir -> entry != NULL ) {
-        _DirERelease ( Dir -> entry );
-        Dir -> entry = NULL;
-    }
-
-    if ( Dir -> passwd != NULL ) {
-        free ( ( char * ) Dir -> passwd );
-        Dir -> passwd = NULL;
-    }
-
-    if ( Dir -> enc_type != NULL ) {
-        free ( ( char * ) Dir -> enc_type );
-        Dir -> enc_type = NULL;
-    }
-
-    Dir -> update = false;
-
-    free ( Dir );
-
-    return 0;
-}   /* XFSWsDirDestroy () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirList
- *  create a directory listing
- *
- *  "list" [ OUT ] - return parameter for list object
- *
- *  "path" [ IN, NULL OKAY ] - optional parameter for target
- *  directory. if NULL, interpreted to mean "."
- *
- * [RET] rc_t		    0 for success; anything else for a failure
- *						see itf/klib/rc.h for general details
- * [IN]	 const XFSWsDir *	self		Object oriented C; XFSWsDir object for this method
- * [OUT] KNamelist ** listp,
- * [IN]  bool ( * f )( const KDirectory *, const char *, void * )
- * [IN]  void *	data
- * [IN]  const char * path
- * [IN]  va_list args
- */
-static
-rc_t CC
-XFSWsDirList (
-                const struct KDirectory * self,
-                struct KNamelist ** List,
-                bool ( CC * f ) (
-                            const struct KDirectory * dir,
-                            const char * name,
-                            void * data
-                            ),
-                void * Data,
-                const char * Path,
-                va_list Args
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * Dir;
-    const struct _DirE * Entry;
-    const struct XFSPath * TheEffPath;
-    struct KNamelist * TheList;
-    va_list xArgs;
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirList] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    RCt = 0;
-    Dir = ( struct XFSWsDir * ) self;
-    Entry = NULL;
-    TheEffPath = NULL;
-    TheList = NULL;
-
-    XFS_CSAN ( List )
-    XFS_CAN ( self )
-    XFS_CAN ( List )
-    XFS_CAN ( Path )
-
-        /*) first we are trying to map content entry according to path
-         (*/
-    va_copy ( xArgs, Args );
-    RCt = _WsDirVMapIt (
-                    Dir,
-                    & Entry,
-                    & TheEffPath,
-                    Path,
-                    Args
-                    );
-    va_end ( xArgs );
-    if ( RCt == 0 ) {
-        if ( ! Entry -> is_folder || Entry -> content == NULL ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-/*)
- || IMPORTANT: For now Filtering function is not used
- || TODO!!!!!!
- (*/
-            LOG_LOC_ACQ ( __LINE__, Entry -> mutabor );
-            RCt = KLockAcquire ( Entry -> mutabor );
-            if ( RCt == 0 ) {
-
-                RCt = _DirEListEntriesNoLock ( Entry, & TheList );
-                if ( RCt == 0 ) {
-                    * List = TheList;
-                }
-
-                LOG_LOC_UNL ( __LINE__, Entry -> mutabor );
-                KLockUnlock ( Entry -> mutabor );
-            }
-        }
-
-        XFSPathRelease ( TheEffPath );
-        _DirERelease ( Entry );
-    }
-
-    return RCt;
-}   /* XFSWsDirList () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirVisit
- *  visit each path under designated directory,
- *  recursively if so indicated
- *
- *  "recurse" [ IN ] - if non-zero, recursively visit sub-directories
- *
- *  "f" [ IN ] and "data" [ IN, OPAQUE ] - function to execute
- *  on each path. receives a base directory and relative path
- *  for each entry, where each path is also given the leaf name
- *  for convenience. if "f" returns non-zero, the iteration will
- *  terminate and that value will be returned. NB - "dir" will not
- *  be the same as "self".
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- */
-static 
-rc_t CC
-XFSWsDirVisit (
-                const struct KDirectory * self, 
-                bool Recurse,
-                rc_t ( CC * Func ) (
-                            const struct KDirectory *,
-                            uint32_t,
-                            const char *,
-                            void *
-                            ), 
-                void * Data,
-                const char * Format,
-                va_list Args
-)
-{
-    rc_t RCt;
-    const struct XFSWsDir * Dir;
-    const struct XFSPath * Path;
-    const struct XFSPath * RelPath;
-    const struct _DirE * Entry;
-    va_list xArgs;
-
-    RCt = 0;
-    Dir = ( const struct XFSWsDir * ) self;
-    Path = NULL;
-    RelPath = NULL;
-    Entry = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Func )
-    XFS_CAN ( Format )
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirVisit] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    va_copy ( xArgs, Args );
-    RCt = XFSPathVMakeAbsolute ( & Path, false, Format, xArgs );
-    va_end ( xArgs );
-    if ( RCt == 0 ) {
-        if ( XFSPathSIsChild (
-                            _WsDirPath ( Dir ),
-                            XFSPathGet ( Path ),
-                            & RelPath
-                            ) ) {
-                /* Mapping Node and path
-                */
-           va_copy ( xArgs, Args );
-           RCt = _WsDirVMapIt ( Dir, & Entry, NULL, Format, xArgs ); 
-           va_end ( xArgs );
-           if ( RCt == 0 ) {
-                /* check if it is a folder
-                 */
-                if ( Entry -> is_folder ) {
-                    RCt = _DirEVisitNoLock (
-                                    Entry,
-                                    self,
-                                    Recurse,
-                                    Func,
-                                    Data,
-                                    XFSPathGet ( RelPath )
-                                    );
-                }
-                else {
-                    RCt = XFS_RC ( rcInvalid );
-                }
-
-                _DirERelease ( Entry );
-            }
-
-            XFSPathRelease ( RelPath );
-        }
-        else {
-            RCt = XFS_RC ( rcOutOfKDirectory );
-        }
-
-        XFSPathRelease ( Path );
-    }
-
-
-    return RCt;
-}   /* XFSWsDirVisit () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirVisitUpdate
- */
-static
-rc_t CC
-XFSWsDirVisitUpdate (
-                struct KDirectory * self,
-                bool recurse,
-                rc_t ( CC * f ) (
-                            struct KDirectory *,
-                            uint32_t,
-                            const char *
-                            ,void *
-                            ),
-                void * data,
-                const char * path,
-                va_list args
-)
-{
-/*)
- || JOJOBA
- (*/
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirVisitUpdate] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-    return RC (rcFS, rcDirectory, rcUpdating, rcFunction, rcUnsupported);
-}   /* XFSWsDirVisitUpdate () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirPathType
- *  returns a KPathType
- *
- *  "path" [ IN ] - NUL terminated string in directory-native character set
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- *
- * [RET] uint32_t
- * [IN]  const XFSWsDir *	self		Object oriented C; XFSWsDir object for this method
- * [IN]  const char *		path
- * [IN]  va_list		args
- */
-static
-uint32_t CC
-XFSWsDirPathType (
-                const struct KDirectory * self,
-                const char * Path,
-                va_list Args
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * Dir;
-    const struct _DirE * Entry;
-    uint32_t RetVal;
-    va_list xArgs;
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirPathType] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    RCt = 0;
-    Dir = ( struct XFSWsDir * ) self;
-    Entry = NULL;
-    RetVal = kptNotFound;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Path )
-
-    va_copy ( xArgs, Args );
-    RCt = _WsDirVMapIt (
-                    Dir,
-                    & Entry,
-                    NULL,
-                    Path,
-                    xArgs
-                    );
-    va_end ( xArgs );
-    if ( RCt == 0 ) {
-        RetVal = Entry -> is_folder ? kptDir : kptFile;
-
-        _DirERelease ( Entry );
-
-        return RetVal;
-    }
-    else {
-        if ( RCt == XFS_RC ( rcNotFound ) ) {
-            return kptNotFound;
-        }
-    }
-
-    return kptBadPath;
-}   /* XFSWsDirPathType () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirResolvePath
- *
- *  resolves path to an absolute or directory-relative path
- *
- * [IN]  const XFSWsDir *self		Objected oriented self
- * [IN]	 bool 		absolute	if non-zero, always give a path starting
- *  					with '/'. NB - if the directory is 
- *					chroot'd, the absolute path
- *					will still be relative to directory root.
- * [OUT] char *		resolved	buffer for NUL terminated result path in 
- *					directory-native character set
- * [IN]	 size_t		rsize		limiting size of resolved buffer
- * [IN]  const char *	path		NUL terminated string in directory-native
- *					character set denoting target path. 
- *					NB - need not exist.
- *
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t CC
-XFSWsDirResolvePath (
-                const struct KDirectory * self,
-                bool Absolute,
-                char * Resolved,
-                size_t Rsize,
-                const char * Path,
-                va_list Args
-)
-{
-    rc_t RCt;
-    va_list xArgs;
-
-    RCt = 0;
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirResolvePath] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    va_copy ( xArgs, Args );
-    RCt = XFS_VResolvePath ( Absolute, Resolved, Rsize, Path, xArgs );
-    va_end ( xArgs );
-
-    return RCt;
-}   /* XFSWsDirResolvePath () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirResolveAlias
- *  resolves an alias path to its immediate target
- *  NB - the resolved path may be yet another alias
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting an object presumed to be an alias.
- *
- *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
- *  NUL terminated result path in directory-native character set
- *
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t CC
-XFSWsDirResolveAlias (
-                const struct KDirectory * self, 
-				bool absolute,
-				char * resolved,
-				size_t rsize,
-				const char * alias,
-				va_list args
-)
-{
-/*)
- || JOJOBA
- (*/
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirResolveAlias] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-    return RC (rcFS, rcDirectory, rcAccessing, rcFunction, rcUnsupported);
-}   /* XFSWsDirResolveAlias () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirRename
- *  rename an object accessible from directory, replacing
- *  any existing target object of the same type
- *
- *  "from" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- *
- *  "to" [ IN ] - NUL terminated string in directory-native
- *  character set denoting existing object
- */
-static
-rc_t CC
-XFSWsDirRename (
-                struct KDirectory * self,
-                bool Force,
-                const char * OldName,
-                const char * NewName
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * Dir;
-    const struct _DirE * OldParent, * NewParent;
-    const struct XFSPath * OldEffPath, * NewEffPath;
-    const char * OldEntryName, * NewEntryName;
-
-    RCt = 0;
-    Dir = ( struct XFSWsDir * ) self;
-
-    XFS_CAN ( self )
-    XFS_CAN ( OldName )
-    XFS_CAN ( NewName )
-
-    if ( ! Dir -> update ) {
-        return XFS_RC ( rcUnauthorized );
-    }
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirRename] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-        /*||   There are two steps : move factual file if it
-          ||   is necessary, and make corrections in content
-          ||   files
-          ||*/
-
-        /* First we should resolve parent directory for both
-         * path and decide if we should simple rename file withou
-         * moving or we should move file first.
-         */
-    RCt = _GetCNameAndMapParentEntryNoLock (
-                                            Dir,
-                                            & OldParent,
-                                            & OldEffPath,
-                                            & OldEntryName,
-                                            OldName
-                                            );
-    if ( RCt == 0 ) {
-        RCt = _GetCNameAndMapParentEntryNoLock (
-                                                Dir,
-                                                & NewParent,
-                                                & NewEffPath,
-                                                & NewEntryName,
-                                                NewName
-                                                );
-        if ( RCt == 0 ) {
-
-                /*  Since we are cacheing _DirE instances, it is 
-                 *  normal to compare pointers here :lol:
-                 */
-            if ( OldParent == NewParent ) {
-                /* No need to move */
-                LOG_LOC_ACQ ( __LINE__, OldParent -> mutabor );
-                RCt = KLockAcquire ( OldParent -> mutabor );
-                if ( RCt == 0 ) {
-                    RCt = _DirERenameEntryNoLock (
-                                                OldParent,
-                                                OldEntryName,
-                                                NewEntryName
-                                                );
-                    if ( RCt == 0 ) {
-                        RCt = _SyncronizeDirectoryContentNoLock (
-                                                            OldParent
-                                                            );
-                    }
-                    LOG_LOC_UNL ( __LINE__, OldParent -> mutabor );
-                    KLockUnlock ( OldParent -> mutabor );
-                }
-            }
-            else {
-                    /* Need to move */
-                RCt = _DirEMoveEntry (
-                                    OldParent,
-                                    OldEntryName,
-                                    NewParent,
-                                    NewEntryName
-                                    );
-            }
-
-            free ( ( char * ) NewEntryName );
-            XFSPathRelease ( NewEffPath );
-            _DirERelease ( NewParent );
-        }
-
-        free ( ( char * ) OldEntryName );
-        XFSPathRelease ( OldEffPath );
-        _DirERelease ( OldParent );
-    }
-
-    return RCt;
-}   /* XFSWsDirRename () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirRemove
- *  remove an accessible object from its directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "force" [ IN ] - if non-zero and target is a directory,
- *  remove recursively
- */
-static
-rc_t CC
-XFSWsDirRemove (
-                struct KDirectory * self,
-                bool Force,
-                const char * Format,
-                va_list Args
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * Dir;
-    const struct _DirE * Entry;
-    const struct _DirE * Parent;
-    const struct XFSPath * EffPath;
-    const char * EntryName;
-    struct KDirectory * NatDir;
-    bool HasEntries;
-    va_list xArgs;
-
-    RCt = 0;
-    Entry = NULL;
-    Parent = NULL;
-    EffPath = NULL;
-    Dir = ( struct XFSWsDir * ) self;
-    EntryName = NULL;
-    NatDir = NULL;
-    HasEntries = false;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Format )
-
-    if ( ! Dir -> update ) {
-        return XFS_RC ( rcUnauthorized );
-    }
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirRemove] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-        /*|| Simple: map it's parent and remove entry ||*/
-    RCt = KDirectoryNativeDir ( & NatDir );
-    if ( RCt == 0 ) {
-        va_copy ( xArgs, Args );
-        RCt = _GetNameAndMapParentEntryNoLock (
-                                        Dir,
-                                        & Parent,
-                                        & EffPath,
-                                        & EntryName,
-                                        Format,
-                                        xArgs
-                                        );
-        va_end ( xArgs );
-        if ( RCt == 0 ) {
-            RCt = _GetContentEntryAndLock ( Parent, & Entry, EntryName );
-            if ( RCt == 0 ) {
-                HasEntries = _DirEHasEntries ( Entry );
-
-                if ( ( ! HasEntries ) || ( HasEntries && Force ) ) {
-                    if ( RCt == 0 ) {
-                /*|| IMPORTANT : we are not going to do it in right and 
-                  ||             legal way by visiting each entry. Here
-                  ||             could be trach remained ( not removed
-                  ||             files and directories )
-                  ||             Also we are forceing Force flag 8-|
-                  ||*/
-                        RCt = _DirEDelEntryNoLock ( Parent, Entry );
-                        if ( RCt == 0 ) {
-                            RCt = _SyncronizeDirectoryContentNoLock ( Parent );
-                            if ( RCt == 0 ) {
-                                RCt = KDirectoryRemove (
-                                                NatDir,
-                                                true,
-                                                "%s/%s/%s",
-                                                _WsDirPath ( Dir ),
-                                                XFSPathGet ( EffPath ),
-                                                Entry -> eff_name
-                                                );
-                            }
-                        }
-                    }
-                }
-
-                RCt = _DirERelease ( Entry );
-            }
-
-            free ( ( char * ) EntryName );
-
-            LOG_LOC_UNL ( __LINE__, Parent -> mutabor );
-            KLockUnlock ( Parent -> mutabor );
-
-            XFSPathRelease ( EffPath );
-
-            _DirERelease ( Parent );
-        }
-
-        KDirectoryRelease ( NatDir );
-    }
-
-    return RCt;
-}   /* XFSWsDirRemove () */
-
-static
-rc_t CC
-XFSWsDirRemoveU (
-                struct KDirectory * self,
-                bool Force,
-                const char * Format,
-                ...
-)
-{
-    rc_t RCt;
-    va_list Args;
-
-    va_start ( Args, Format );
-    RCt = XFSWsDirRemove ( self, Force, Format, Args );
-    va_end ( Args );
-
-    return RCt;
-}   /* XFSWsDirRemoveU () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirClearDir
- *  remove all directory contents
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "force" [ IN ] - if non-zero and directory entry is a
- *  sub-directory, remove recursively
- */
-static
-rc_t CC
-XFSWsDirClearDir (
-                struct KDirectory * self,
-                bool Force,
-                const char * Format,
-                va_list Args
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * Dir;
-    struct KNamelist * List;
-    uint32_t LQty, Idx;
-    const char * SubName;
-    const struct XFSPath * Path;
-    va_list xArgs;
-
-    RCt = 0;
-    Dir = ( struct XFSWsDir * ) self;
-    List = NULL;
-    LQty = Idx = 0;
-    SubName = NULL;
-    Path = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Format )
-
-    if ( ! Dir -> update ) {
-        return XFS_RC ( rcUnauthorized );
-    }
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirClearDir] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-        /* Second we should list directory entries
-         */
-    va_copy ( xArgs, Args );
-    RCt = XFSWsDirList ( self, & List, NULL, NULL, Format, xArgs );
-    va_end ( xArgs );
-    if ( RCt == 0 ) {
-            /* Removing content one by one
-             */
-        RCt = KNamelistCount ( List, & LQty );
-        if ( RCt == 0 && 0 < LQty ) {
-                /* First we need path
-                 */
-            va_copy ( xArgs, Args );
-            RCt = XFSPathVMakeAbsolute ( & Path, false, Format, xArgs );
-            va_end ( xArgs );
-            if ( RCt == 0 ) {
-                for ( Idx = 0; Idx < LQty; Idx ++ ) {
-                    RCt = KNamelistGet ( List, Idx, & SubName );
-                    if ( RCt != 0 ) {
-                        break;
-                    }
-
-                    RCt = XFSWsDirRemoveU (
-                                            self,
-                                            Force,
-                                            "%s/%s",
-                                            XFSPathGet ( Path ),
-                                            SubName
-                                            );
-
-                    if ( RCt != 0 ) {
-                        break;
-                    }
-                }
-
-                XFSPathRelease ( Path );
-            }
-        }
-
-        KNamelistRelease ( List );
-    }
-
-    return RCt;
-}   /* XFSWsDirClearDir () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirAccess
- *  get access to object
- *
- *  "access" [ OUT ] - return parameter for Unix access mode
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t CC
-XFSWsDirVAccess (
-                const struct KDirectory * self,
-			    uint32_t * Access,
-			    const char * Format,
-			    va_list Args
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * Dir;
-    const struct _DirE * Entry;
-    const struct XFSPath * Path;
-    struct KDirectory * NatDir;
-    va_list xArgs;
-
-    RCt = 0;
-    Dir = ( struct XFSWsDir * ) self;
-    Entry = NULL;
-    Path = NULL;
-    NatDir = NULL;
-
-    XFS_CSA ( Access, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Access )
-    XFS_CAN ( Format )
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirVAccess] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    RCt = KDirectoryNativeDir ( & NatDir );
-    if ( RCt == 0 ) {
-
-        va_copy ( xArgs, Args );
-        RCt = _WsDirVMapIt (
-                        Dir,
-                        & Entry,
-                        & Path,
-                        Format,
-                        xArgs
-                        );
-        va_end ( xArgs );
-        if ( RCt == 0 ) {
-            RCt = KDirectoryAccess (
-                                NatDir,
-                                Access,
-                                "%s/%s",
-                                _WsDirPath ( Dir ),
-                                XFSPathGet ( Path )
-                                );
-
-            XFSPathRelease ( Path );
-            _DirERelease ( Entry );
-        }
-
-        KDirectoryRelease ( NatDir );
-    }
-
-    return RCt;
-}   /* XFSWsDirVAccess () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirSetAccess
- *  set access to object a la Unix "chmod"
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "access" [ IN ] and "mask" [ IN ] - definition of change
- *  where "access" contains new bit values and "mask defines
- *  which bits should be changed.
- *
- *  "recurse" [ IN ] - if non zero and "path" is a directory,
- *  apply changes recursively.
- */
-static
-rc_t CC
-XFSWsDirSetAccess (
-                struct KDirectory * self,
-			    bool Recurse,
-			    uint32_t Access,
-			    uint32_t Mask,
-			    const char * Format,
-			    va_list Args
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * Dir;
-    const struct _DirE * Entry;
-    const struct XFSPath * Path;
-    struct KDirectory * NatDir;
-    va_list xArgs;
-
-    RCt = 0;
-    Dir = ( struct XFSWsDir * ) self;
-    Entry = NULL;
-    Path = NULL;
-    NatDir = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Format )
-
-    if ( ! Dir -> update ) {
-        return XFS_RC ( rcUnauthorized );
-    }
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirSetAccess] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    RCt = KDirectoryNativeDir ( & NatDir );
-    if ( RCt == 0 ) {
-
-        va_copy ( xArgs, Args );
-        RCt = _WsDirVMapIt (
-                        Dir,
-                        & Entry,
-                        & Path,
-                        Format,
-                        xArgs
-                        );
-        va_end ( xArgs );
-        if ( RCt == 0 ) {
-            RCt = KDirectorySetAccess (
-                                NatDir,
-                                Recurse,
-                                Access,
-                                Mask,
-                                "%s/%s",
-                                _WsDirPath ( Dir ),
-                                XFSPathGet ( Path )
-                                );
-
-            XFSPathRelease ( Path );
-            _DirERelease ( Entry );
-        }
-
-        KDirectoryRelease ( NatDir );
-    }
-
-    return RCt;
-}   /* XFSWsDirSetAccess () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirCreateAlias
- *  creates a path alias according to create mode
- *
- *  "targ" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target object
- *
- *  "alias" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target alias
- *
- *  "access" [ IN ] - standard Unix directory access mode
- *  used when "mode" has kcmParents set and alias path does
- *  not exist.
- *
- *  "mode" [ IN ] - a creation mode (see explanation above).
- */
-static
-rc_t CC
-XFSWsDirCreateAlias (
-                struct KDirectory * self,
-			    uint32_t access,
-			    KCreateMode mode,
-			    const char * targ,
-			    const char * alias
-)
-{
-    assert (self != NULL);
-    assert (targ != NULL);
-    assert (alias != NULL);
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirCreateAlias] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-/*)
- || JOJOBA
- (*/
-    return RC (rcFS, rcDirectory, rcCreating, rcSelf, rcUnsupported);
-}   /* XFSWsDirCreateAlias () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirOpenFileRead
- *  opens an existing file with read-only access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t CC
-XFSWsDirOpenFileRead (
-                const struct KDirectory * self,
-                const struct KFile ** File,
-                const char * Format,
-                va_list Args
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * Dir;
-    const struct _DirE * Entry;
-    const struct _DirE * Parent;
-    const char * EntryName;
-    const struct XFSPath * EffPath;
-    va_list xArgs;
-
-    RCt = 0;
-    Entry = NULL;
-    EffPath = NULL;
-    EntryName = NULL;
-    Dir = ( struct XFSWsDir * ) self;
-
-    XFS_CSAN ( File )
-    XFS_CAN ( self )
-    XFS_CAN ( File )
-    XFS_CAN ( Format )
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirOpenFileRead] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-        /*) Mapping parent directory 
-         (*/
-    va_copy ( xArgs, Args );
-    RCt = _GetNameAndMapParentEntryNoLock (
-                                        Dir,
-                                        & Parent,
-                                        & EffPath,
-                                        & EntryName,
-                                        Format,
-                                        xArgs
-                                        );
-    va_end ( xArgs );
-    if ( RCt == 0 ) {
-        RCt = _GetContentEntryAndLock ( Parent, & Entry, EntryName );
-        if ( RCt == 0 ) {
-                /*) Opening file 
-                 (*/
-            RCt = _OpenEncryptedFileRead (
-                                    File,
-                                    ( struct KKey * ) _WsDirKey ( Dir ),
-                                    "%s/%s/%s",
-                                    _WsDirPath ( Dir ),
-                                    XFSPathGet ( EffPath ),
-                                    Entry -> eff_name
-                                    );
-
-            LOG_LOC_UNL ( __LINE__, Parent -> mutabor );
-            KLockUnlock ( Parent -> mutabor );
-            _DirERelease ( Entry );
-        }
-
-        free ( ( char * ) EntryName );
-
-        XFSPathRelease ( EffPath );
-
-        _DirERelease ( Parent );
-    }
-
-    return RCt;
-}   /* XFSWsDirOpenFileRead () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirOpenFileWrite
- *  opens an existing file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- */
-static
-rc_t CC
-XFSWsDirOpenFileWrite (
-                struct KDirectory * self,
-                struct KFile ** File,
-                bool Update,
-                const char * Format,
-                va_list Args
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * Dir;
-    const struct _DirE * Entry;
-    const struct _DirE * Parent;
-    const char * EntryName;
-    const struct XFSPath * EffPath;
-    va_list xArgs;
-
-    RCt = 0;
-    Entry = NULL;
-    Parent = NULL;
-    EffPath = NULL;
-    EntryName = NULL;
-    Dir = ( struct XFSWsDir * ) self;
-
-    XFS_CSAN ( File )
-    XFS_CAN ( self )
-    XFS_CAN ( File )
-    XFS_CAN ( Format )
-
-    if ( ! Dir -> update ) {
-        return XFS_RC ( rcUnauthorized );
-    }
-
-// #ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirOpenFileWrite] [$(dir)]", "dir=%p", ( void * ) self );
-// #endif /* JOJOBA */
-
-        /*) Mapping parent directory 
-         (*/
-    va_copy ( xArgs, Args );
-    RCt = _GetNameAndMapParentEntryNoLock (
-                                        Dir,
-                                        & Parent,
-                                        & EffPath,
-                                        & EntryName,
-                                        Format,
-                                        xArgs
-                                        );
-    va_end ( xArgs );
-    if ( RCt == 0 ) {
-        RCt = _GetContentEntryAndLock ( Parent, & Entry, EntryName );
-        if ( RCt == 0 ) {
-                /*) Opening file
-                 (*/
-            RCt = _OpenEncryptedFileWrite (
-                                    File,
-                                    ( struct KKey * ) _WsDirKey ( Dir ),
-                                    Update,
-                                    "%s/%s/%s",
-                                    _WsDirPath ( Dir ),
-                                    XFSPathGet ( EffPath ),
-                                    Entry -> eff_name
-                                    );
-
-            LOG_LOC_UNL ( __LINE__, Parent -> mutabor );
-            KLockUnlock ( Parent -> mutabor );
-            _DirERelease ( Entry );
-        }
-
-        free ( ( char * ) EntryName );
-
-        XFSPathRelease ( EffPath );
-
-        _DirERelease ( Parent );
-    }
-
-    return RCt;
-}   /* XFSWsDirOpenFileWrite () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirCreateFile
- *  opens a file with write access
- *
- *  "f" [ OUT ] - return parameter for newly opened file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "access" [ IN ] - standard Unix access mode, e.g. 0664
- *
- *  "update" [ IN ] - if non-zero, open in read/write mode
- *  otherwise, open in write-only mode
- *
- *  "mode" [ IN ] - a creation mode (see explanation above).
- */
-static
-rc_t CC
-XFSWsDirCreateFile	(
-                struct KDirectory * self,
-                struct KFile ** File,
-                bool Update,
-                uint32_t Access,
-                KCreateMode Cmode,
-                const char * Format,
-                va_list Args
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * Dir;
-    const struct _DirE * Entry;
-    const struct _DirE * Parent;
-    const char * EntryName;
-    const struct XFSPath * EffPath;
-    va_list xArgs;
-
-    RCt = 0;
-    Entry = NULL;
-    Parent = NULL;
-    EffPath = NULL;
-    EntryName = NULL;
-    Dir = ( struct XFSWsDir * ) self;
-
-    XFS_CSAN ( File )
-    XFS_CAN ( self )
-    XFS_CAN ( File )
-    XFS_CAN ( Format )
-
-    if ( ! Dir -> update ) {
-        return XFS_RC ( rcUnauthorized );
-    }
-
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirCreateFile] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-        /*) Mapping parent directory
-         (*/
-    va_copy ( xArgs, Args );
-    RCt = _GetNameAndMapParentEntryNoLock (
-                                        Dir,
-                                        & Parent,
-                                        & EffPath,
-                                        & EntryName,
-                                        Format,
-                                        xArgs
-                                        );
-    va_end ( xArgs );
-    if ( RCt == 0 ) {
-        LOG_LOC_ACQ ( __LINE__, Parent -> mutabor );
-        RCt = KLockAcquire ( Parent -> mutabor );
-        if ( RCt == 0 ) {
-            RCt = _DirEGetEntryNoLock (
-                                    Parent,
-                                    EntryName,
-                                    & Entry
-                                    );
-            if ( GetRCState ( RCt ) == rcNotFound ) {
-                    /*) Really we don't need to do it 
-                     (*/
-                RCt = 0;
-                    /*) Making record in journal 
-                     (*/
-                RCt = _DirECreateEntryNoLock (
-                                            Parent,
-                                            EntryName,
-                                            false,
-                                            & Entry
-                                            );
-                if ( RCt == 0 ) {
-                        /*) Here we are opening file 
-                        (*/
-                    RCt = _CreateEncryptedFile (
-                                            File,
-                                            _WsDirKey ( Dir ) ,
-                                            Update,
-                                            Access,
-                                            Cmode,
-                                            "%s/%s/%s",
-                                            _WsDirPath ( Dir ),
-                                            XFSPathGet ( EffPath ),
-                                            Entry -> eff_name
-                                            );
-                    if ( RCt == 0 ) {
-                        RCt = _SyncronizeDirectoryContentNoLock ( Parent );
-                    }
-                    else {
-                        _DirEDelEntryNoLock ( Parent, Entry );
-                    }
-                }
-            }
-            else {
-                if ( RCt == 0 ) {
-                    _DirERelease ( Entry );
-                }
-            }
-
-            LOG_LOC_UNL ( __LINE__, Parent -> mutabor );
-            KLockUnlock ( Parent -> mutabor );
-        }
-
-        free ( ( char * ) EntryName );
-
-        XFSPathRelease ( EffPath );
-
-        _DirERelease ( Parent );
-    }
-
-    return RCt;
-}   /* XFSWsDirCreateFile () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirFileSize
- *  returns size in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "size" [ OUT ] - return parameter for file size
- * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
- */
-static
-rc_t CC
-XFSWsDirFileSize (
-                const struct KDirectory * self,
-                uint64_t * Size,
-                const char * Format,
-                va_list Args
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * Dir;
-    const struct _DirE * Entry;
-    const struct XFSPath * Path;
-    struct KDirectory * NatDir;
-    const struct KFile * File;
-    va_list xArgs;
-
-    RCt = 0;
-    Dir = ( struct XFSWsDir * ) self;
-    Entry = NULL;
-    Path = NULL;
-    NatDir = NULL;
-    File = NULL;
-
-    XFS_CSA ( Size, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Size )
-    XFS_CAN ( Format )
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirFileSize] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    RCt = KDirectoryNativeDir ( & NatDir );
-    if ( RCt == 0 ) {
-
-        va_copy ( xArgs, Args );
-        RCt = _WsDirVMapIt ( Dir, & Entry, & Path, Format, xArgs );
-        va_end ( xArgs );
-        if ( RCt == 0 ) {
-            if ( Entry -> is_folder ) {
-                RCt = XFS_RC ( rcInvalid );
-            }
-            else {
-                RCt = _OpenEncryptedFileRead (
-                                            & File, 
-                                            ( struct KKey * ) _WsDirKey ( Dir ),
-                                            "%s/%s",
-                                            _WsDirPath ( Dir ),
-                                            XFSPathGet ( Path )
-                                            );
-                if ( RCt == 0 ) {
-                    RCt = KFileSize ( File, Size );
-
-                    KFileRelease ( File );
-                }
-            }
-
-            XFSPathRelease ( Path );
-            _DirERelease ( Entry );
-        }
-
-        KDirectoryRelease ( NatDir );
-    }
-
-    return RCt;
-}   /* XFSWsDirFileSize () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirSetFileSize
- *  sets size in bytes of target file
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target file
- *
- *  "size" [ IN ] - new file size
- */
-static
-rc_t CC
-XFSWsDirSetFileSize (
-                struct KDirectory * self,
-                uint64_t Size,
-                const char * Format,
-                va_list Args
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * Dir;
-    const struct _DirE * Entry;
-    const struct XFSPath * Path;
-    struct KDirectory * NatDir;
-    struct KFile * File;
-    va_list xArgs;
-
-    RCt = 0;
-    Dir = ( struct XFSWsDir * ) self;
-    Entry = NULL;
-    Path = NULL;
-    NatDir = NULL;
-    File = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Format )
-
-    if ( ! Dir -> update ) {
-        return XFS_RC ( rcUnauthorized );
-    }
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirSetFileSize] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    RCt = KDirectoryNativeDir ( & NatDir );
-    if ( RCt == 0 ) {
-
-        va_copy ( xArgs, Args );
-        RCt = _WsDirVMapIt ( Dir, & Entry, & Path, Format, xArgs );
-        va_end ( xArgs );
-        if ( RCt == 0 ) {
-            if ( Entry -> is_folder ) {
-                RCt = XFS_RC ( rcInvalid );
-            }
-            else {
-                RCt = _OpenEncryptedFileWrite (
-                                            & File, 
-                                            ( struct KKey * ) _WsDirKey ( Dir ),
-                                            true,
-                                            "%s/%s",
-                                            _WsDirPath ( Dir ),
-                                            XFSPathGet ( Path )
-                                            );
-                if ( RCt == 0 ) {
-                    RCt = KFileSetSize ( File, Size );
-
-                    KFileRelease ( File );
-                }
-            }
-
-            XFSPathRelease ( Path );
-            _DirERelease ( Entry );
-        }
-
-        KDirectoryRelease ( NatDir );
-    }
-
-    return RCt;
-}   /* XFSWsDirSetFileSize () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirOpenDirRead
- *
- *  opens a sub-directory
- *
- * [IN]  const XFSWsDir *	self	Object Oriented C XFSWsDir self
- * [OUT] const KDirectory **	subp	Where to put the new KDirectory/XFSWsDir
- * [IN]  bool			chroot	Create a chroot cage for this new subdirectory
- * [IN]  const char *		path	Path to the directory to open
- * [IN]  va_list		args	So far the only use of args is possible additions to path
- */
-static 
-rc_t CC
-XFSWsDirOpenDirRead (
-                const struct KDirectory * self,
-                const struct KDirectory ** Subp,
-                bool Chroot,
-                const char * Format,
-                va_list Args
-)
-{
-    assert (self != NULL);
-    assert (Subp != NULL);
-    assert (Format != NULL);
-
-/* We do not implement that method, because subdirectory workspace
- * could clash with parent workspace on file synchronizing.
- * Of course, we may hash each directory content in separate Depot,
- *            and will do it if it is necessary
- */
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirOpenDirRead] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    return RC (rcFS, rcDirectory, rcOpening, rcSelf, rcUnsupported);
-}   /* XFSWsDirOpenDirRead () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirOpenDirUpdate
- *  opens a sub-directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "chroot" [ IN ] - if non-zero, the new directory becomes
- *  chroot'd and will interpret paths beginning with '/'
- *  relative to itself.
- */
-static
-rc_t CC
-XFSWsDirOpenDirUpdate (
-                struct KDirectory * self,
-                struct KDirectory ** Subp, 
-                bool Chroot, 
-                const char * Format, 
-                va_list Args
-)
-{
-    assert (self != NULL);
-    assert (Subp != NULL);
-    assert (Format != NULL);
-/* We do not implement that method, because subdirectory workspace
- * could clash with parent workspace on file synchronizing.
- * Of course, we may hash each directory content in separate Depot,
- *            and will do it if it is necessary
- */
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirOpenDirUpdate] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    return RC (rcFS, rcDirectory, rcUpdating, rcSelf, rcUnsupported);
-}   /* XFSWsDirOpenDirUpdate () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirCreateDir
- *  create a sub-directory
- *
- *  "path" [ IN ] - NUL terminated string in directory-native
- *  character set denoting target directory
- *
- *  "access" [ IN ] - standard Unix directory permissions
- *
- *  "mode" [ IN ] - a creation mode (see explanation above).
- */
-static
-rc_t CC
-XFSWsDirCreateDir (
-                struct KDirectory * self,
-                uint32_t Access,
-                KCreateMode CreationMode,
-                const char * Format,
-                va_list Args
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * Dir;
-    const struct _DirE * Entry;
-    const struct _DirE * Parent;
-    const struct XFSPath * EffPath;
-    const char * EntryName;
-    struct KDirectory * NatDir;
-    va_list xArgs;
-
-    RCt = 0;
-    Entry = NULL;
-    Parent = NULL;
-    EffPath = NULL;
-    EntryName = NULL;
-    Dir = ( struct XFSWsDir * ) self;
-    NatDir = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Format )
-
-    if ( ! Dir -> update ) {
-        return XFS_RC ( rcUnauthorized );
-    }
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirCreateDir] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    RCt = KDirectoryNativeDir ( & NatDir );
-    if ( RCt == 0 ) {
-            /*) Mapping parent
-             (*/
-        va_copy ( xArgs, Args );
-        RCt = _GetNameAndMapParentEntryNoLock (
-                                            Dir,
-                                            & Parent,
-                                            & EffPath,
-                                            & EntryName,
-                                            Format,
-                                            xArgs
-                                            );
-        va_end ( xArgs );
-        if ( RCt == 0 ) {
-            LOG_LOC_ACQ ( __LINE__, Parent -> mutabor );
-            RCt = KLockAcquire ( Parent -> mutabor );
-            if ( RCt == 0 ) {
-                RCt = _DirEGetEntryNoLock ( Parent, EntryName, & Entry );
-                if ( GetRCState ( RCt ) == rcNotFound ) {
-
-                        /*) Really we don't need to do it
-                         (*/
-                    RCt = 0;
-
-                        /*) Making record in journal
-                         (*/
-                    RCt = _DirECreateEntryNoLock (
-                                            Parent,
-                                            EntryName,
-                                            true,
-                                            & Entry
-                                            );
-                    if ( RCt == 0 ) {
-                        /*) Here we are opening file
-                         (*/
-                        RCt = KDirectoryCreateDir (
-                                                NatDir,
-                                                Access,
-                                                CreationMode,
-                                                "%s/%s/%s",
-                                                _WsDirPath ( Dir ),
-                                                XFSPathGet ( EffPath ),
-                                                Entry -> eff_name
-                                                );
-                        if ( RCt == 0 ) {
-                            RCt = _SyncronizeDirectoryContentNoLock (
-                                                                Parent
-                                                                );
-                            if ( RCt == 0 ) {
-                                RCt = _SyncronizeDirectoryContentNoLock (
-                                                                Entry
-                                                                );
-                            }
-                        }
-                        else {
-                            _DirEDelEntryNoLock ( Parent, Entry );
-                        }
-
-                    }
-                }
-                else {
-                    if ( RCt == 0 ) {
-                        _DirERelease ( Entry );
-                    }
-                }
-
-                LOG_LOC_UNL ( __LINE__, Parent -> mutabor );
-                KLockUnlock ( Parent -> mutabor );
-            }
-
-            free ( ( char * ) EntryName );
-
-            XFSPathRelease ( EffPath );
-            
-            _DirERelease ( Parent );
-        }
-
-        KDirectoryRelease ( NatDir );
-    }
-
-    return RCt;
-}   /* XFSWsDirCreateDir () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * XFSWsDirDestroyFile
- */
-static
-rc_t CC
-XFSWsDirDestroyFile ( struct KDirectory * self, struct KFile * File )
-{
-    assert (self != NULL);
-    assert (File != NULL);
-
-/* We don't really need that method
- */
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirDestroyFile] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    return RC (rcFS, rcDirectory, rcDestroying, rcSelf, rcUnsupported);
-}   /* XFSWsDirDestroyFile () */
-
-static
-rc_t CC
-XFSWsDirDate (
-                const struct KDirectory * self,
-                KTime_t * Date,
-                const char * Format,
-                va_list Args
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * Dir;
-    const struct _DirE * Entry;
-    const struct XFSPath * Path;
-    struct KDirectory * NatDir;
-    va_list xArgs;
-
-    RCt = 0;
-    Dir = ( struct XFSWsDir * ) self;
-    Entry = NULL;
-    Path = NULL;
-    NatDir = NULL;
-
-    XFS_CSA ( Date, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Date )
-    XFS_CAN ( Format )
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirDate] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    RCt = KDirectoryNativeDir ( & NatDir );
-    if ( RCt == 0 ) {
-
-        va_copy ( xArgs, Args );
-        RCt = _WsDirVMapIt ( Dir, & Entry, & Path, Format, xArgs );
-        va_end ( xArgs );
-        if ( RCt == 0 ) {
-            RCt = KDirectoryDate (
-                                NatDir,
-                                Date, 
-                                "%s/%s",
-                                _WsDirPath ( Dir ),
-                                XFSPathGet ( Path )
-                                );
-
-            XFSPathRelease ( Path );
-            _DirERelease ( Entry );
-        }
-
-        KDirectoryRelease ( NatDir );
-    }
-
-    return RCt;
-}   /* XFSWsDirDate () */
-
-
-static
-rc_t CC
-XFSWsDirSetDate (
-                struct KDirectory * self,
-                bool Recurse,
-                KTime_t Date,
-                const char * Format,
-                va_list Args
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * Dir;
-    const struct _DirE * Entry;
-    const struct XFSPath * Path;
-    struct KDirectory * NatDir;
-    va_list xArgs;
-
-    RCt = 0;
-    Dir = ( struct XFSWsDir * ) self;
-    Entry = NULL;
-    Path = NULL;
-    NatDir = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Format )
-
-    if ( ! Dir -> update ) {
-        return XFS_RC ( rcUnauthorized );
-    }
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirSetDate] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    RCt = KDirectoryNativeDir ( & NatDir );
-    if ( RCt == 0 ) {
-
-        va_copy ( xArgs, Args );
-        RCt = _WsDirVMapIt ( Dir, & Entry, & Path, Format, xArgs );
-        va_end ( xArgs );
-        if ( RCt == 0 ) {
-            RCt = KDirectorySetDate (
-                                NatDir,
-                                Recurse,
-                                Date, 
-                                "%s/%s",
-                                _WsDirPath ( Dir ),
-                                XFSPathGet ( Path )
-                                );
-
-            XFSPathRelease ( Path );
-            _DirERelease ( Entry );
-        }
-
-        KDirectoryRelease ( NatDir );
-    }
-
-    return RCt;
-}   /* XFSWsDirSetDate () */
-
-
-static
-struct KSysDir * CC
-XFSWsDirGetSysDir ( const struct KDirectory * self )
-{
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " <<<[XFSWsDirGetSysDir] [$(dir)]", "dir=%p", ( void * ) self );
-#endif /* JOJOBA */
-
-    return NULL;
-}   /* XFSWsDirGetSysDir () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- *
- */
-static struct KDirectory_vt_v1 vtXFSWsDir =
-{
-    /* version 1.0 */
-    1, 1,
-
-    /* start minor version 0 methods*/
-    XFSWsDirDestroy,                    /* [+] */
-    XFSWsDirList,                       /* [+] */
-    XFSWsDirVisit,                      /* [-] */
-    XFSWsDirVisitUpdate,                /* [-] */
-    XFSWsDirPathType,                   /* [+] */
-    XFSWsDirResolvePath,                /* [+] */
-    XFSWsDirResolveAlias,               /* [-] */ /* 4 FUTURE */
-    XFSWsDirRename,                     /* [+] */
-    XFSWsDirRemove,                     /* [+] */
-    XFSWsDirClearDir,                   /* [+] */
-    XFSWsDirVAccess,                    /* [+] */
-    XFSWsDirSetAccess,                  /* [+] */
-    XFSWsDirCreateAlias,                /* [-] */ /* 4 FUTURE */
-    XFSWsDirOpenFileRead,               /* [+] */
-    XFSWsDirOpenFileWrite,              /* [+] */
-    XFSWsDirCreateFile,                 /* [+] */
-    XFSWsDirFileSize,                   /* [+] */
-    XFSWsDirSetFileSize,                /* [+] */
-    XFSWsDirOpenDirRead,                /* [-] */ /* WE DON"T DO IT */
-    XFSWsDirOpenDirUpdate,              /* [-] */ /* WE DON"T DO IT */
-    XFSWsDirCreateDir,                  /* [+] */
-    XFSWsDirDestroyFile,                /* [-] */ /* NO NEED */
-    /* end minor version 0 methods*/
-    /* start minor version 1 methods*/
-
-    XFSWsDirDate,                       /* [-] */
-    XFSWsDirSetDate,                    /* [-] */
-    XFSWsDirGetSysDir,                  /* [-] */
-    /* end minor version 2 methods*/
-#ifdef NO_JOJOBA
-    NULL,
-    /* end minor version 2 methods*/
-    /* end minor version 3 methods*/
-    NULL,
-    NULL
-    /* end minor version 3 methods*/
-#endif /* NO_JOJOBA */
-};
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*
- * DEPOT <<
- */
-struct _WsDptE {
-    BSTNode node;
-
-    struct KDirectory * dir;
-    const char * path;
-};
-
-static
-rc_t CC
-_WsDptEDispose ( struct _WsDptE * self )
-{
-    if ( self != NULL ) {
-        if ( self -> dir != NULL ) {
-            KDirectoryRelease ( self -> dir );
-
-            self -> dir = NULL;
-        }
-
-        if ( self -> path != NULL ) {
-            free ( ( char * ) self -> path );
-
-            self -> path = NULL;
-        }
-
-        free ( self );
-    }
-
-    return 0;
-}   /* _WsDptEDispose () */
-
-static
-rc_t CC
-_WsDptEMake (
-            const char * Path,
-            struct KDirectory * Dir,
-            struct _WsDptE ** Entry
-)
-{
-    rc_t RCt;
-    struct _WsDptE * RetEntry;
-
-    RCt = 0;
-    RetEntry = NULL;
-
-    RCt = 0;
-
-    XFS_CSAN ( Entry )
-    XFS_CAN ( Path )
-    XFS_CAN ( Dir )
-    XFS_CAN ( Entry )
-
-    RetEntry = calloc ( 1, sizeof ( struct _WsDptE ) );
-    if ( RetEntry == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = XFS_StrDup ( Path, & ( RetEntry -> path ) );
-        if ( RCt == 0 ) {
-            RetEntry -> dir = Dir;
-
-            * Entry = RetEntry;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Entry = NULL;
-
-        _WsDptEDispose ( RetEntry );
-    }
-
-    return RCt;
-}   /* _WsDptEMake () */
-
-struct _WsDpt {
-    BSTree tree;
-
-    struct KLock * mutabor;
-};
-
-static struct _WsDpt * _sWsDpt = NULL;
-
-static
-struct _WsDpt * CC
-_Dpt ()
-{
-    return _sWsDpt;
-}   /* _Dpt () */
-
-static
-void CC
-_WsDptWhackCallback ( BSTNode * Node, void * unused )
-{
-    if ( Node != NULL ) {
-        _WsDptEDispose ( ( struct _WsDptE * ) Node );
-    }
-}   /* _WsDptWhackCallback () */
-
-static
-rc_t CC
-_WsDptDisposeImpl ( struct _WsDpt * self )
-{
-    if ( self != NULL ) {
-        BSTreeWhack ( & ( self -> tree ) , _WsDptWhackCallback, NULL );
-
-        if ( self -> mutabor != NULL ) {
-            KLockRelease ( self -> mutabor );
-
-            self -> mutabor = NULL;
-        }
-
-        free ( self );
-    }
-
-    return 0;
-}   /* _WsDptDipsoseImpl () */
-
-static
-rc_t CC
-_WsDptMakeImpl ( struct _WsDpt ** Depot )
-{
-    rc_t RCt;
-    struct _WsDpt * TheDepot;
-
-    RCt = 0;
-    TheDepot = NULL;
-
-    XFS_CSAN ( Depot )
-    XFS_CAN ( Depot )
-
-    TheDepot = calloc ( 1, sizeof ( struct _WsDpt ) );
-    if ( TheDepot != NULL ) {
-        RCt = KLockMake ( & ( TheDepot -> mutabor ) );
-
-        if ( RCt == 0 ) {
-            BSTreeInit ( & ( TheDepot -> tree ) );
-
-            * Depot = TheDepot;
-        }
-    }
-    else {
-        RCt = XFS_RC ( rcExhausted );
-    }
-
-    if ( RCt != 0 ) {
-        * Depot = NULL;
-
-        _WsDptDisposeImpl ( TheDepot );
-    }
-
-    return RCt;
-}   /* _WsDptMakeImpl () */
-
-LIB_EXPORT
-rc_t CC
-XFSEncDirectoryDepotInit ()
-{
-    rc_t RCt;
-    struct _WsDpt * Depot;
-
-    RCt = 0;
-    Depot = NULL;
-
-    if ( _sWsDpt == NULL ) {
-        RCt = _WsDptMakeImpl ( & Depot );
-        if ( RCt == 0 ) {
-            if ( _sWsDpt == NULL ) {
-                _sWsDpt = Depot;
-            }
-            else {
-                _WsDptDisposeImpl ( Depot );
-            }
-        }
-    }
-
-    return RCt;
-}   /* XFSEncDirectoryDepotInit () */
-
-LIB_EXPORT
-rc_t CC
-XFSEncDirectoryDepotDispose ()
-{
-    struct _WsDpt * Depot;
-
-    Depot = _sWsDpt;
-    _sWsDpt = NULL;
-
-    if ( Depot != NULL ) {
-        _WsDptDisposeImpl ( Depot );
-    }
-
-    return 0;
-}   /* XFSEncDirectoryDepotDispose () */
-
-static
-int64_t CC
-_WsDptCmpCallback (const void * Item, const BSTNode * Node )
-{
-    const char * Str1, * Str2;
-
-    Str1 = ( const char * ) Item;
-
-    Str2 = Node == NULL
-                    ? NULL
-                    : ( ( struct _WsDptE * ) Node ) -> path
-                    ;
-
-    return XFS_StringCompare4BST_ZHR ( Str1, Str2 );
-}   /* _WsDptCmpCallback () */
-
-static
-rc_t CC
-_WsDptGetNoLock (
-                struct _WsDpt * self,
-                const char * Path,
-                struct KDirectory ** Dir
-)
-{
-    struct _WsDptE * Entry = NULL;
-
-    XFS_CSAN ( Dir )
-    XFS_CAN ( self )
-    XFS_CAN ( Path )
-    XFS_CAN ( Dir )
-
-    Entry = ( struct _WsDptE * ) BSTreeFind (
-                                            & ( self -> tree ),
-                                            Path,
-                                            _WsDptCmpCallback
-                                            );
-    if ( Entry != NULL ) {
-        * Dir = Entry -> dir;
-    }
-
-    return Entry == NULL ? XFS_RC ( rcNotFound ) : 0;
-}   /* _WsDptGetNoLock () */
-
-static
-int64_t CC
-_WsDptAddCallback ( const BSTNode * N1, const BSTNode * N2 )
-{
-    return XFS_StringCompare4BST_ZHR (
-                                ( ( struct _WsDptE * ) N1 ) -> path,
-                                ( ( struct _WsDptE * ) N2 ) -> path
-                                );
-}   /* _WsDptAddCallback () */
-
-static
-rc_t CC
-_WsDptAddNoLock (
-                struct _WsDpt * self,
-                const char * Path,
-                struct KDirectory * Dir
-)
-{
-    rc_t RCt;
-    struct _WsDptE * Entry;
-
-    RCt = 0;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Path )
-    XFS_CAN ( Dir )
-
-    RCt = _WsDptEMake ( Path, Dir, & Entry );
-    if ( RCt == 0 ) {
-        RCt = BSTreeInsert (
-                            & ( self -> tree ),
-                            ( struct BSTNode * ) & ( Entry -> node ),
-                            _WsDptAddCallback
-                            );
-    }
-
-    return RCt;
-}   /* _WsDptAddNoLock () */
-
-static
-rc_t CC
-_WsDptClearNoLock ( struct _WsDpt * self )
-{
-    XFS_CAN ( self )
-
-    BSTreeWhack ( & ( self -> tree ), _WsDptWhackCallback, NULL );
-    BSTreeInit ( & ( self -> tree ) );
-
-    return 0;
-}   /* _WsDptClearNoLock () */
-
-LIB_EXPORT
-rc_t CC
-XFSEncDirectoryDepotClear ()
-{
-    rc_t RCt;
-    struct _WsDpt * Depot;
-
-    RCt = 0;
-    Depot = _Dpt ();
-
-    XFS_CAN ( Depot )
-
-    LOG_LOC_ACQ ( __LINE__, Depot -> mutabor );
-    RCt = KLockAcquire ( Depot -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _WsDptClearNoLock ( Depot );
-
-        LOG_LOC_UNL ( __LINE__, Depot -> mutabor );
-        KLockUnlock ( Depot -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSEncDirectoryDepotClear () */
-
-static
-rc_t CC
-_WsDptGet ( const char * Path, struct KDirectory ** Dir )
-{
-    rc_t RCt;
-    struct _WsDpt * Depot;
-
-    RCt = 0;
-    Depot = _Dpt ();
-
-    XFS_CAN ( Depot )
-
-    XFS_CSAN ( Dir )
-    XFS_CAN ( Path )
-    XFS_CAN ( Dir )
-
-    LOG_LOC_ACQ ( __LINE__, Depot -> mutabor );
-    RCt = KLockAcquire ( Depot -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _WsDptGetNoLock ( Depot, Path, Dir );
-
-        LOG_LOC_UNL ( __LINE__, Depot -> mutabor );
-        KLockUnlock ( Depot -> mutabor );
-    }
-
-    return RCt;
-}   /* _WsDptGet () */
-
-static
-rc_t CC
-_WsDptAdd ( const char * Path, struct KDirectory * Dir )
-{
-    rc_t RCt;
-    struct _WsDpt * Depot;
-    struct KDirectory * TheDir;
-
-    RCt = 0;
-    Depot = _Dpt ();
-    TheDir = NULL;
-
-    XFS_CAN ( Depot )
-
-    XFS_CAN ( Path )
-    XFS_CAN ( Dir )
-
-    LOG_LOC_ACQ ( __LINE__, Depot -> mutabor );
-    RCt = KLockAcquire ( Depot -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _WsDptGetNoLock ( Depot, Path, & TheDir );
-        if ( RCt == 0 ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-            RCt = _WsDptAddNoLock ( Depot, Path, Dir );
-        }
-
-        LOG_LOC_UNL ( __LINE__, Depot -> mutabor );
-        KLockUnlock ( Depot -> mutabor );
-    }
-
-
-    return RCt;
-}   /* _WsDptAdd () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-    /*)) That method does not do any checks
-     ((*/
-static
-rc_t CC
-_WsDirAlloc (
-        const char * AbsolutePath,
-        const char * DisplayName,
-        const char * Password,
-        const char * EncType,
-        bool Update,
-        struct KDirectory ** Dir
-)
-{
-    rc_t RCt;
-    struct XFSWsDir * RetDir;
-    struct KKey Key;
-    const struct _DirE * Entry;
-
-    RCt = 0;
-    RetDir = NULL;
-    Entry = NULL;
-
-    XFS_CSAN ( Dir )
-    XFS_CAN ( AbsolutePath )
-    XFS_CAN ( DisplayName )
-    XFS_CAN ( Password )
-    XFS_CAN ( Dir )
-
-    RetDir = calloc ( 1, sizeof ( struct XFSWsDir ) );
-    if ( RetDir == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RetDir -> update = rcUnauthorized;
-
-            /* First - init directory
-             */
-    RCt = KDirectoryInit (
-                        & ( RetDir -> dir ),
-                        ( const KDirectory_vt * ) & vtXFSWsDir,
-                        "WsDir",
-                        AbsolutePath,
-                        Update
-                        );
-
-    if ( RCt == 0 ) {
-            /* second : Creating entry
-             */
-        RCt = _DirEMake (
-                        _sFolderTag,
-                        DisplayName,
-                        DisplayName,
-                        & Entry
-                        );
-        if ( RCt == 0 ) {
-                /* third : Crating encoding key
-                 */
-            RCt =  XFS_InitKKey_ZHR ( Password, EncType, & Key );
-            if ( RCt == 0 ) {
-                    /* fourth : Trying to load content
-                     */
-                RCt = _DirEMakeContent ( Entry, & Key, AbsolutePath );
-                if ( RCt == 0 ) {
-
-                    RetDir -> entry = Entry;
-
-                    RCt = XFS_StrDup (
-                                    Password,
-                                    & ( RetDir -> passwd )
-                                    );
-                    if ( RCt == 0 ) {
-                        RCt = XFS_StrDup (
-                                        EncType,
-                                        & ( RetDir -> enc_type )
-                                        );
-
-                        if ( RCt == 0 ) {
-                            * Dir = & ( RetDir -> dir );
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Dir = NULL;
-
-        if ( RetDir != NULL ) {
-            XFSWsDirDestroy ( & ( RetDir -> dir ) );
-        }
-    }
-
-#ifdef JOJOBA
-pLogMsg ( klogDebug, " [_WsDirAlloc] [$(line)] [$(rc)]", "line=%d,rc=%d", __LINE__, RCt );
-#endif /* JOJOBA */
-
-    return RCt;
-}   /* _WsDirAlloc () */
-
-static
-rc_t CC
-_WsDirMake (
-                const struct KDirectory ** Dir,
-                bool Update,
-                const char * Password,
-                const char * EncType,
-                const char * Path,
-                va_list Args
-)
-{
-    rc_t RCt;
-    const struct XFSPath * aPath;
-    struct KDirectory * RetVal;
-    const char * Name;
-    va_list xArgs;
-
-    RCt = 0;
-    aPath = NULL;
-    RetVal = NULL;
-    Name = NULL;
-
-    XFS_CSAN ( Dir )
-    XFS_CAN ( Password )
-    XFS_CAN ( Path )
-    XFS_CAN ( Dir )
-
-        /* Creating valid path
-         */
-    va_copy ( xArgs, Args );
-    RCt = XFSPathVMakeAbsolute ( & aPath, false, Path, xArgs );
-    va_end ( xArgs );
-    if ( RCt == 0 ) {
-        RCt = _WsDptGet ( XFSPathGet ( aPath ), & RetVal );
-        if ( RCt != 0 ) {
-            RCt = 0;     /* We do not need that really */
-
-            Name = XFSPathName ( aPath );
-            if ( RCt == 0 ) {
-                    /* Creating encoded directory
-                     */
-                RCt = _WsDirAlloc (
-                                XFSPathGet ( aPath ),
-                                Name,
-                                Password,
-                                EncType,
-                                Update,
-                                & RetVal
-                                );
-                if ( RCt == 0 ) {
-                    RCt = _WsDptAdd ( XFSPathGet ( aPath ), RetVal );
-                }
-            }
-        }
-
-        XFSPathRelease ( aPath );
-    }
-
-    if ( RCt == 0 ) {
-        if ( Dir == NULL ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-            RCt = KDirectoryAddRef ( RetVal );
-            if ( RCt == 0 ) {
-                * Dir = RetVal;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Dir = NULL;
-
-        if ( RetVal != NULL ) {
-                /* Should we delete entry ? I think NO! */
-        }
-    }
-
-    return RCt;
-}   /* _WsDirMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSEncDirectoryOpen (
-                const struct KDirectory ** Dir,
-                bool Update,
-                const char * Password,
-                const char * EncType,
-                const char * Path,
-                ...
-)
-{
-    rc_t RCt;
-    va_list Args;
-
-    RCt = 0;
-
-    XFS_CSAN ( Dir )
-    XFS_CAN ( Password )
-    XFS_CAN ( Path )
-    XFS_CAN ( Dir )
-
-    va_start ( Args, Path );
-    RCt = _WsDirMake ( Dir, Update, Password, EncType, Path, Args );
-    va_end ( Args );
-
-    return RCt;
-}   /* XFSEncDirectoryOpen () */
-
diff --git a/libs/xfs/xencws.h b/libs/xfs/xencws.h
deleted file mode 100644
index f80552d..0000000
--- a/libs/xfs/xencws.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _xencws_h_
-#define _xencws_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   There is temporary interface which needed to store encrypted
-  ))))  data in encrypted directory
- ((((*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))    Forwards
- ((*/
-struct KDirectory;
-
-/*))
- //     Depot
-((*/
-XFS_EXTERN rc_t CC XFSEncDirectoryDepotInit ();
-XFS_EXTERN rc_t CC XFSEncDirectoryDepotDispose ();
-XFS_EXTERN rc_t CC XFSEncDirectoryDepotClear ();
-
-/*))
- //     The only method we will use
-((*/
-XFS_EXTERN rc_t CC XFSEncDirectoryOpen (
-                                const struct KDirectory ** Dir,
-                                bool Update,
-                                const char * Password,
-                                const char * EncType,
-                                const char * Path,
-                                ...
-                                );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _xencws_h_ */
diff --git a/libs/xfs/xfs-priv.h b/libs/xfs/xfs-priv.h
deleted file mode 100644
index 938404a..0000000
--- a/libs/xfs/xfs-priv.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _h_xfs_priv_
-#define _h_xfs_priv_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*  Forwards forewer
- */
-struct XFSTreeDepot;
-
-union XFSControl_vt;
-struct XFSControlArgs;
-struct XFSOwp;
-
-/*
- *  XFSControl structure
- *
- *  Note, that structure is using two members : Tree and Control.
- *  Tree is an object which is rendering tree, and it is accepting
- *  callbacks from Control, which is definitely implementation of
- *  Fuse/Dokan interface. THAT IS VERY IMPORTANT that Tree should
- *  be initialized before Control.
- *
- */
-struct XFSControl {
-    const union XFSControl_vt *vt;
-
-        /*  "struct XFSTree", which should be responsible for rendering
-            tree structure into Fuse/Dokan terms of filesystem
-            NOTE: it should be initialized before Control
-        */
-    struct XFSTreeDepot * TreeDepot;
-
-        /*  "struct fuse" for Fuse, and something else for all
-            other platforms
-            "struct fuse" contains pointer for "fuse_session",
-            and it contains pointer for "fuse_chan", so it will
-            allow to define practically everything in environment.
-            NOTE: it should be initialized after Tree
-         */
-    void * Control;
-    void * ControlAux;
-
-        /*  That is for storeing of arguments to run fuse
-            I am not sure if we need it, but arguments for initializing
-            fuse and docan are passing in difeerent way.
-            BTW, prolly I need to use BSTree here, not sure.
-         */
-    struct XFSOwp * Arguments;
-};
-
-/*
- *  Vertuhai table.
- */
-struct XFSControl_vt_v1 {
-        /*  version == 1.x
-         */
-    uint32_t maj;
-    uint32_t min;
-
-        /*  overloaded methods
-         */
-        /*  version 0.0
-         */
-    rc_t ( CC * init ) ( struct XFSControl * self );
-    rc_t ( CC * destroy ) ( struct XFSControl * self );
-    rc_t ( CC * mount ) ( struct XFSControl * self );
-    rc_t ( CC * loop ) ( struct XFSControl * self );
-    rc_t ( CC * unmount ) ( struct XFSControl * self );
-};
-
-union XFSControl_vt {
-    struct XFSControl_vt_v1 v1;
-};
-
-/*))    Some usefull defines, used in Arguments
- ((*/
-#define XFS_CONTROL_APPNAME     "appname"
-#define XFS_CONTROL_MOUNTPOINT  "mountpoint"
-#define XFS_CONTROL_LABEL       "label"
-#define XFS_CONTROL_LOGFILE     "logfile"
-#define XFS_CONTROL_DAEMONIZE   "daemonize"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _h_xfs_priv_ */
diff --git a/libs/xfs/xfs.c b/libs/xfs/xfs.c
deleted file mode 100644
index ba3d39b..0000000
--- a/libs/xfs/xfs.c
+++ /dev/null
@@ -1,403 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/out.h>
-#include <klib/text.h>
-
-#include <xfs/xfs.h>
-#include <xfs/tree.h>
-
-#include "platform.h"
-#include "schwarzschraube.h"
-#include "owp.h"
-#include "xfs-priv.h"
-
-#include <sysalloc.h>
-#include <stdlib.h> /* we are using calloc */
-#include <string.h> /* we are using memset */
-
-/*  Some forwards and declarations
- */
-static rc_t XFSVeryMainLoop ( void * Data );
-
-/*  The code, which is checking version is quite similar for
- *  destroy/start/stop ... and, possible for other methods,
- *  so we do that then.
- */
-static
-rc_t
-XFSControlStandardSelfCheck( const struct XFSControl * self )
-{
-        /*  TODO : here and further not sure about rc */
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> vt == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-        /*  Should be extended for switch later
-         */
-    if ( self -> vt -> v1 . maj != 1 && self -> vt -> v1 . min != 1 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if (    self -> vt -> v1.init == NULL
-        ||  self -> vt -> v1.destroy == NULL 
-        ||  self -> vt -> v1.mount == NULL 
-        ||  self -> vt -> v1.loop == NULL 
-        ||  self -> vt -> v1.unmount == NULL 
-        ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( self -> Arguments == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    return 0;
-}   /* XFSControlStandardSelfCheck () */
-
-/*  The code will create  and init instance of XFSControl,
- *  it is calling external method
- *  XFSControlInitVT (), which is platform dependent
- */
-LIB_EXPORT
-rc_t CC
-XFSControlMake (
-            const struct XFSTree * Tree,
-            struct XFSControl ** Control
-)
-{
-    rc_t RCt;
-    struct XFSControl * TheControl;
-
-    RCt = 0;
-    TheControl = NULL;
-
-    if ( Control == NULL || Tree == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Control = NULL;
-
-    TheControl = calloc ( 1, sizeof ( struct XFSControl ) );
-    if ( TheControl == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSOwpMake ( & ( TheControl -> Arguments ) );
-    if ( RCt == 0 ) {
-
-        RCt = XFSControlPlatformInit ( TheControl );
-        if ( RCt == 0 ) {
-
-            RCt = XFSTreeDepotMake (
-                        ( const struct XFSTreeDepot ** )
-                                & ( TheControl -> TreeDepot )
-                        );
-            if ( RCt == 0 ) {
-
-                RCt = XFSTreeDepotSet ( TheControl -> TreeDepot, Tree );
-                if ( RCt == 0 ) {
-
-                    RCt = TheControl -> vt -> v1.init ( TheControl );
-                    if ( RCt == 0 ) {
-                        * Control = TheControl;
-                    }
-                }
-            }
-        }
-    }
-
-
-    if ( RCt != 0 ) {
-        XFSControlDispose ( TheControl );
-
-        * Control = NULL;
-    }
-
-    return RCt;
-}   /* XFSControlInit () */
-
-/*  Control destroy.
- */
-LIB_EXPORT
-rc_t CC
-XFSControlDispose ( struct XFSControl * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return 0;
-    }
-
-    if ( self -> TreeDepot != NULL ) {
-        XFSTreeDepotDispose ( self -> TreeDepot );
-
-        self -> TreeDepot = NULL;
-    }
-
-    if ( self -> Arguments != NULL ) {
-        XFSOwpDispose ( self -> Arguments );
-
-        self -> Arguments = NULL;
-    }
-
-    if ( self -> vt != NULL ) {
-        self -> vt -> v1.destroy ( self );
-
-        self -> vt = NULL;
-    }
-
-    free ( self );
-
-    return RCt;
-}   /* XFSControlDestroy () */
-
-/*  Start file system
- */
-LIB_EXPORT
-rc_t CC
-XFSStart ( struct XFSControl * self )
-{
-    rc_t RCt;
-
-    RCt = XFSControlStandardSelfCheck ( self );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    RCt = self -> vt -> v1.mount ( self );
-    XFSVeryMainLoop ( self );
-
-    return RCt;
-}   /* XFSStart () */
-
-/*  Stop filesystem.
- */
-LIB_EXPORT
-rc_t CC
-XFSStop ( struct XFSControl * self )
-{
-    rc_t RCt;
-
-    RCt = XFSControlStandardSelfCheck ( self );
-    if ( RCt == 0 ) {
-
-        RCt = self -> vt -> v1.unmount ( self );
-    }
-
-    return RCt;
-}   /* XFSStop () */
-
-LIB_EXPORT
-rc_t CC
-XFSControlGetTree (
-                struct XFSControl * self,
-                const struct XFSTree ** Tree
-)
-{
-    if ( self == NULL || Tree == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    return XFSTreeDepotGet ( self -> TreeDepot, Tree );
-}   /* XFSControlGetTree () */
-
-/*  Here we are goint to implement some Arguments methods
- */
-LIB_EXPORT
-rc_t CC
-XFSControlSetArg (
-                struct XFSControl * self,
-                const char * ArgName,
-                const char * ArgValue
-)
-{
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    return XFSOwpSet ( self -> Arguments, ArgName, ArgValue );
-}   /* XFSControlSetArg () */
-
-LIB_EXPORT
-const char * CC
-XFSControlGetArg ( struct XFSControl * self, const char * ArgName )
-{
-    return self == NULL
-                ? NULL
-                : XFSOwpGet ( self -> Arguments, ArgName )
-                ;
-}   /* XFSControlGetArg () */
-
-LIB_EXPORT
-bool CC
-XFSControlHasArg ( struct XFSControl * self, const char * ArgName )
-{
-    if ( self != NULL && ArgName != NULL ) {
-        return XFSOwpHas ( self -> Arguments, ArgName );
-    }
-    return false;
-}   /* XFSControlHasArg () */
-
-
-LIB_EXPORT
-rc_t CC
-XFSControlSetAppName ( struct XFSControl * self, const char * AppName )
-{
-    return XFSControlSetArg (
-                        self,
-                        XFS_CONTROL_APPNAME,
-                        ( AppName == NULL ? "mount-tool" : AppName )
-                        );
-}   /* XFSControlSetAppName () */
-
-LIB_EXPORT
-const char * CC
-XFSControlGetAppName ( struct XFSControl * self )
-{
-    return XFSControlGetArg ( self, XFS_CONTROL_APPNAME );
-}   /* XFSControlGetAppName () */
-
-LIB_EXPORT
-rc_t CC
-XFSControlDaemonize ( struct XFSControl * self )
-{
-    return XFSControlSetArg (
-                        self,
-                        XFS_CONTROL_DAEMONIZE,
-                        XFS_CONTROL_DAEMONIZE
-                        );
-}   /* XFSControlDaemonize () */
-
-LIB_EXPORT
-bool CC
-XFSControlIsDaemonize ( struct XFSControl * self )
-{
-    return XFSControlHasArg ( self, XFS_CONTROL_DAEMONIZE );
-}   /* XFSControlIsDaemonize () */
-
-LIB_EXPORT
-rc_t CC
-XFSControlSetMountPoint (
-                    struct XFSControl * self,
-                    const char * MountPoint
-)
-{
-    return MountPoint == NULL
-                ? XFS_RC ( rcNull )
-                : XFSControlSetArg (
-                                    self,
-                                    XFS_CONTROL_MOUNTPOINT,
-                                    MountPoint
-                                    )
-                ;
-}   /* XFSControlSetMountPoint () */
-
-LIB_EXPORT
-const char * CC
-XFSControlGetMountPoint ( struct XFSControl * self )
-{
-    return XFSControlGetArg ( self, XFS_CONTROL_MOUNTPOINT );
-}   /* XFSControlGetMountPoint () */
-
-LIB_EXPORT
-rc_t CC
-XFSControlSetLogFile ( struct XFSControl * self, const char * Path )
-{
-    rc_t RCt;
-    char BF [ XFS_SIZE_1024 ];
-
-    RCt = 0;
-    * BF = 0;
-
-    XFS_CAN ( self )
-
-    RCt = XFS_ResolvePath (
-                        true,
-                        BF,
-                        sizeof ( BF ),
-                        ( Path == NULL ? "./mount-tool.log" : Path )
-                        );
-    if ( RCt == 0 ) {
-        RCt = XFSControlSetArg ( self, XFS_CONTROL_LOGFILE, BF );
-    }
-
-    return RCt;
-}   /* XFSControlSetLogFile () */
-
-LIB_EXPORT
-const char * CC
-XFSControlGetLogFile ( struct XFSControl * self )
-{
-    return XFSControlGetArg ( self, XFS_CONTROL_LOGFILE );
-}   /* XFSControlGetLogFile () */
-
-LIB_EXPORT
-rc_t CC
-XFSControlSetLabel ( struct XFSControl * self, const char * Label )
-{
-    return Label == NULL
-                ? XFS_RC ( rcNull )
-                : XFSControlSetArg ( self, XFS_CONTROL_LABEL, Label )
-                ;
-}   /* XFSControlSetLabel () */
-
-LIB_EXPORT
-const char * CC
-XFSControlGetLabel ( struct XFSControl * self )
-{
-    return XFSControlGetArg ( self, XFS_CONTROL_LABEL );
-}   /* XFSControlGetLabel () */
-
-static
-rc_t
-XFSVeryMainLoop ( void * Data )
-{
-    struct XFSControl * TheControl;
-
-    TheControl = ( struct XFSControl * ) Data;
-
-    if ( TheControl == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( TheControl -> vt == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( TheControl -> vt -> v1.loop == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    return TheControl -> vt -> v1.loop ( TheControl );
-}   /* XFSVeryMainLoop () */
diff --git a/libs/xfs/xgap.c b/libs/xfs/xgap.c
deleted file mode 100644
index 31d9b7d..0000000
--- a/libs/xfs/xgap.c
+++ /dev/null
@@ -1,1408 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/container.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/vector.h>
-#include <kproc/lock.h>
-#include <vfs/path.h>
-#include <vfs/manager.h>
-#include <vfs/resolver.h>
-#include <kns/http.h>
-
-#include <kfg/repository.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-#include <kfs/file-impl.h>
-#include <kfs/cacheteefile.h>
-#include <krypto/key.h>
-#include <krypto/encfile.h>
-
-#include "schwarzschraube.h"
-#include "zehr.h"
-#include "mehr.h"
-#include "xgap.h"
-#include <xfs/path.h>
-
-#include <sysalloc.h>
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))    XFSGapProject and XFSGapDepot
- //     
-((*/
-
-struct _GapDepot {
-    BSTree tree;
-
-    struct KLock * mutabor;     /*  this lock is used for operations
-                                 *  related to retrieve GapProjects
-                                 */
-};
-
-struct XFSGapProject {
-    BSTNode node;
-
-    KRefcount refcount;
-
-    bool good;
-    uint32_t project_id;
-
-    const struct KRepository * repository;
-    const struct VResolver * resolver;
-
-    const char * pass;
-    size_t pass_size;
-    const struct KKey * key;
-};
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* Weird stuff                                                       */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-static
-rc_t CC
-_GetRepository (
-                const struct KRepository ** Repository,
-                uint32_t ProjectId
-)
-{
-    rc_t RCt, TmpRCt;
-    struct KRepository * TheRepository;
-    KRepositoryVector RepositoryVec;
-    const struct KRepositoryMgr * RepositoryMgr;
-    uint32_t llp, qty, prj;
-    char Bf [ XFS_SIZE_128 ];
-
-    RCt = 0;
-    TmpRCt = 0;
-    TheRepository = NULL;
-    RepositoryMgr = NULL;
-    llp = qty = prj = 0;
-    * Bf = 0;
-
-    XFS_CSAN ( Repository )
-    XFS_CAN ( Repository )
-
-    RCt = KConfigMakeRepositoryMgrRead (
-                                    XFS_Config_MHR (),
-                                    & RepositoryMgr
-                                    );
-    if ( RCt == 0 ) {
-
-        RCt = KRepositoryMgrUserRepositories (
-                                            RepositoryMgr,
-                                            & RepositoryVec
-                                            );
-        if ( RCt == 0 ) {
-            qty = VectorLength ( & RepositoryVec );
-            for ( llp = 0; llp < qty; llp ++ ) {
-
-                TheRepository = VectorGet ( & RepositoryVec, llp );
-                if ( TheRepository == NULL ) {
-                    continue;
-                }
-
-                TmpRCt = KRepositoryName (
-                                        TheRepository,
-                                        Bf,
-                                        sizeof ( Bf ),
-                                        NULL
-                                        );
-                if ( TmpRCt != 0 ) {
-                    continue;
-                }
-
-                if ( ProjectId == XFS_PUBLIC_PROJECT_ID ) {
-                    if ( strcmp ( Bf, "public" ) != 0 ) {
-                        continue;
-                    }
-                }
-                else {
-                    TmpRCt = KRepositoryProjectId (
-                                                TheRepository,
-                                                & prj
-                                                );
-                    if ( TmpRCt != 0 ) {
-                        continue;
-                    }
-
-                    if ( prj != ProjectId ) {
-                        continue;
-                    }
-                }
-
-                    /* So, here we do have our repository */
-                RCt = KRepositoryAddRef ( TheRepository );
-                if ( RCt == 0 ) {
-                    * Repository = TheRepository;
-                }
-
-                break;
-            }
-
-            KRepositoryVectorWhack ( & RepositoryVec );
-        }
-
-        KRepositoryMgrRelease ( RepositoryMgr );
-    }
-
-    if ( * Repository == NULL ) {
-        RCt = XFS_RC ( rcNotFound );
-    }
-
-    return RCt;
-}   /*  _GetRepository () */
-
-static
-rc_t CC
-_MakeResolver (
-            const struct VResolver ** Resolver,
-            const struct KRepository * Repository
-)
-{
-    rc_t RCt;
-    struct VResolver * TheResolver;
-
-    RCt = 0;
-    TheResolver = NULL;
-
-    XFS_CSAN ( Resolver )
-    XFS_CAN ( Resolver )
-    XFS_CAN ( Repository )
-
-    RCt = KRepositoryMakeResolver (
-                                Repository,
-                                & TheResolver,
-                                XFS_Config_MHR ()
-                                );
-    if ( RCt == 0 ) {
-        * Resolver = TheResolver;
-    }
-
-    return RCt;
-}   /* _MakeResolver () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* XFSGapProject                                                     */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static const char * _sGapProject_classname = "GapProject";
-
-static
-rc_t CC
-_GapProjectDispose ( const struct XFSGapProject * self )
-{
-    struct XFSGapProject * Project = ( struct XFSGapProject * ) self;
-
-    if ( Project != NULL ) {
-
-        Project -> good = false;
-
-        Project -> project_id = 0;
-
-        KRefcountWhack (
-                    & ( Project -> refcount ),
-                    _sGapProject_classname
-                    );
-
-        if ( Project -> repository != NULL ) {
-            KRepositoryRelease ( Project -> repository );
-            Project -> repository = NULL;
-        }
-
-        if ( Project -> resolver != NULL ) {
-            VResolverRelease ( Project -> resolver );
-            Project -> resolver = NULL;
-        }
-
-        if ( Project -> key != NULL ) {
-            free ( ( struct KKey * )  Project -> key );
-            Project -> key = NULL;
-        }
-
-        if ( Project -> pass != NULL ) {
-            free ( ( char * ) Project -> pass );
-            Project -> pass = NULL;
-        }
-
-        Project -> pass_size = 0;
-
-        free ( Project );
-    }
-
-    return 0;
-}   /* _GapProjectDispose () */
-
-static 
-rc_t CC
-_GapProjectMake (
-                const struct XFSGapProject ** Project,
-                uint32_t ProjectId
-)
-{
-    rc_t RCt;
-    struct XFSGapProject * TheProject;
-
-    RCt = 0;
-    TheProject = NULL;
-
-    XFS_CSAN ( Project )
-    XFS_CAN ( Project )
-
-    TheProject = calloc ( 1, sizeof ( struct XFSGapProject ) );
-    if ( TheProject == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-            /* until it is good */
-        TheProject -> good = false;
-
-        TheProject -> project_id = ProjectId;
-
-        TheProject -> key = NULL;
-
-        KRefcountInit (
-                    & ( TheProject -> refcount ),
-                    1,
-                    _sGapProject_classname,
-                    "GapProjectMake",
-                    "GapProject"
-                    );
-
-        RCt = _GetRepository (
-                            & ( TheProject -> repository ),
-                            TheProject -> project_id
-                            );
-        if ( RCt == 0 ) {
-
-            RCt = _MakeResolver (
-                            & ( TheProject -> resolver ),
-                            TheProject -> repository
-                            );
-            if ( RCt == 0 ) {
-                TheProject -> good = true;
-
-                * Project = TheProject;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Project = NULL;
-
-        if ( TheProject != 0 ) {
-            _GapProjectDispose ( TheProject );
-        }
-    }
-
-    return RCt;
-}   /* _GapProjectMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectAddRef ( const struct XFSGapProject * self )
-{
-    rc_t RCt;
-    int RefC;
-
-    RCt = 0;
-    RefC = 0;
-
-    XFS_CAN ( self );
-
-    RefC = KRefcountAdd (
-                        & ( self -> refcount ),
-                        _sGapProject_classname
-                        );
-    switch ( RefC ) {
-        case krefOkay :
-            RCt = 0;
-            break;
-        case krefZero :
-        case krefLimit :
-        case krefNegative :
-            RCt = XFS_RC ( rcInvalid );
-            break;
-        default :
-            RCt = XFS_RC ( rcUnknown );
-            break;
-    }
-
-    return RCt;
-}   /* XFSGapProjectAddRef () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectRelease ( const struct XFSGapProject * self )
-{
-    rc_t RCt;
-    int RefC;
-
-    RCt = 0;
-    RefC = 0;
-
-    XFS_CAN ( self );
-
-    RefC = KRefcountDrop (
-                        & ( self -> refcount ),
-                        _sGapProject_classname
-                        );
-    switch ( RefC ) {
-        case krefOkay :
-        case krefZero :
-                RCt = 0;
-                break;
-        case krefWhack :
-                RCt = _GapProjectDispose ( self );
-                break;
-        case krefNegative :
-                RCt = XFS_RC ( rcInvalid );
-                break;
-        default :
-                RCt = XFS_RC ( rcUnknown );
-                break;
-    }
-
-    return RCt;
-}   /* XFSGapProjectRelease () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectIsValid ( const struct XFSGapProject * self )
-{
-    return self != NULL ? ( self -> good  ) : false;
-}   /* XFSGapProjectIsValid () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectId ( const struct XFSGapProject * self, uint32_t * Id )
-{
-    XFS_CSA ( Id, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Id )
-
-    * Id = self -> project_id;
-
-    return 0;
-}   /* XFSGapProjectId () */
-
-static
-rc_t CC
-_GapProjectReadCharValue (
-                        const struct XFSGapProject * self,
-                        char ** RetValue,
-                        rc_t ( CC * Reader ) ( 
-                                        const struct KRepository * self,
-                                        char * Buffer,
-                                        size_t BufferSize,
-                                        size_t * RetSize
-                                        )
-)
-{
-    rc_t RCt;
-    char Bf [ XFS_SIZE_1024 ];
-    char * TheRetVal;
-    size_t TheRetValSize;
-
-    RCt = 0;
-    * Bf = 0;
-    TheRetVal = NULL;
-    TheRetValSize = 0;
-
-    XFS_CSAN ( RetValue )
-    XFS_CAN ( self )
-    XFS_CAN ( RetValue )
-    XFS_CAN ( Reader )
-
-    if ( ! XFSGapProjectIsValid ( self ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = Reader (
-                self -> repository,
-                Bf,
-                sizeof ( Bf ),
-                & TheRetValSize
-                );
-    if ( RCt == 0 ) {
-        if ( TheRetValSize != 0 ) {
-            RCt = XFS_StrDup ( Bf, ( const char ** ) ( & TheRetVal ) );
-            if ( RCt == 0 ) {
-                * RetValue = TheRetVal;
-            } 
-        }
-        else {
-            RCt = XFS_RC ( rcInvalid );
-        }
-    }
-
-    return RCt;
-}   /* _GapProjectReadCharValue () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectRepositoryName (
-                        const struct XFSGapProject * self,
-                        char ** RepositoryName
-)
-{
-    return _GapProjectReadCharValue (
-                                    self,
-                                    RepositoryName,
-                                    KRepositoryName
-                                    );
-}   /* XFSGapProjectRepositoryName () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectRepositoryDisplayName (
-                        const struct XFSGapProject * self,
-                        char ** DisplayName
-)
-{
-    return _GapProjectReadCharValue (
-                                    self,
-                                    DisplayName,
-                                    KRepositoryDisplayName
-                                    );
-}   /* XFSGapProjectRepositoryDisplayName () */
-
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectRepositoryRoot (
-                        const struct XFSGapProject * self,
-                        char ** RepositoryRoot
-)
-{
-    return _GapProjectReadCharValue (
-                                    self,
-                                    RepositoryRoot,
-                                    KRepositoryRoot
-                                    );
-}   /* XFSGapProjectRepositoryRoot () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectWorkspace (
-                        const struct XFSGapProject * self,
-                        char ** Workspace
-)
-{
-    rc_t RCt;
-    char * Root;
-    char BF [ XFS_SIZE_1024 ];
-    size_t NR;
-
-    RCt = 0;
-    Root = NULL;
-    * BF = 0;
-    NR = 0;
-
-    XFS_CSAN ( Workspace )
-    XFS_CAN ( self )
-    XFS_CAN ( Workspace )
-
-    RCt = XFSGapProjectRepositoryRoot ( self, & Root );
-    if ( RCt == 0 ) {
-        RCt = string_printf (
-                            BF,
-                            sizeof ( BF ) - 1,
-                            & NR,
-                            "%s/workspace",
-                            Root
-                            );
-        if ( RCt == 0 ) {
-            RCt = XFS_StrDup ( BF, ( const char ** ) Workspace );
-        }
-        free ( Root );
-    }
-
-    return RCt;
-}   /* XFSGapProjectWorkspace () */
-
-rc_t CC
-XFSGapPublicfiles ( char ** Publicfiles )
-{
-    rc_t RCt;
-    const struct XFSGapProject * Project;
-
-    RCt = 0;
-    Project = NULL;
-
-    XFS_CSAN ( Publicfiles )
-    XFS_CAN ( Publicfiles )
-
-    RCt = XFSGapFindOrCreate ( XFS_PUBLIC_PROJECT_ID, & Project );
-    if ( RCt == 0 ) {
-        RCt = XFSGapProjectRepositoryRoot ( Project, Publicfiles );
-
-        XFSGapProjectRelease ( Project );
-    }
-
-    return RCt;
-}   /* XFSGapPublicfiles () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartfiles ( char ** Kartfiles )
-{
-    rc_t RCt;
-    char * UserConfigDir;
-    const struct XFSPath * Path;
-
-    RCt = 0;
-    UserConfigDir = NULL;
-    Path = NULL;
-
-    XFS_CSAN ( Kartfiles )
-    XFS_CAN ( Kartfiles )
-
-    RCt = XFSGapUserConfigDir ( & UserConfigDir );
-    if ( RCt == 0 ) {
-        RCt= XFSPathMake (
-                        & Path,
-                        false,
-                        "%s/kart-files",
-                        UserConfigDir
-                        );
-        if ( RCt == 0 ) {
-            RCt = XFS_StrDup (
-                            XFSPathGet ( Path ),
-                            ( const char ** ) Kartfiles
-                            );
-
-            XFSPathRelease ( Path );
-        }
-
-        free ( UserConfigDir );
-    }
-
-    return RCt;
-}   /* XFSGapKartfiles () */
-
-static
-const char * CC
-_GapUserHomeDir ()
-{
-    const char * Ret = getenv ( "HOME" );
-    if ( Ret == NULL ) {
-        Ret = getenv ( "USERPROFILE" );
-    }
-
-    return Ret;
-}   /* _GapUserHomeDir () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapUserHome ( char ** UserHome )
-{
-    rc_t RCt;
-    const char * Var;
-
-    RCt = 0;
-    Var = NULL;
-
-    XFS_CSAN ( UserHome )
-    XFS_CAN ( UserHome )
-
-    Var = _GapUserHomeDir ();
-    if ( Var != NULL ) {
-        RCt = XFS_StrDup ( Var, ( const char ** ) UserHome );
-    }
-    else {
-        RCt = XFS_RC ( rcInvalid );
-    }
-
-    return RCt;
-}   /* XFSGapUserHome () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapUserConfigDir ( char ** UserConfigDir )
-{
-    rc_t RCt;
-    const char * Var;
-    const struct XFSPath * Path;
-
-    RCt = 0;
-    Var = NULL;
-    Path = NULL;
-
-    XFS_CSAN ( UserConfigDir )
-    XFS_CAN ( UserConfigDir )
-
-    Var = _GapUserHomeDir ();
-    if ( Var == NULL ) {
-        RCt = XFS_RC ( rcInvalid );
-    }
-    else {
-        RCt= XFSPathMake ( & Path, false, "%s/.ncbi", Var );
-        if ( RCt == 0 ) {
-            RCt = XFS_StrDup (
-                            XFSPathGet ( Path ) ,
-                            ( const char ** ) UserConfigDir
-                            );
-            XFSPathRelease ( Path );
-        }
-    }
-
-    return RCt;
-}   /* XFSGapUserConfigDir () */
-
-static
-rc_t CC
-_GapProjectLoadEncriptionKey ( const struct XFSGapProject * self )
-{
-    rc_t RCt;
-    struct XFSGapProject * Project;
-    struct KKey * Key;
-    char Pass [ XFS_SIZE_4096 ];
-    size_t PassSize;
-    char * ThePass;
-
-    RCt = 0;
-    Project = ( struct XFSGapProject * ) self;
-    Key = NULL;
-    * Pass = 0;
-    ThePass = NULL;
-    PassSize = 0;
-
-    XFS_CAN ( Project )
-
-    if ( ! XFSGapProjectIsValid ( Project ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KRepositoryEncryptionKey (
-                                Project -> repository,
-                                Pass,
-                                sizeof ( Pass ),
-                                & PassSize
-                                );
-    if ( RCt == 0 ) {
-        ThePass = string_dup ( Pass, PassSize );
-        if ( ThePass == NULL ) {
-            RCt = XFS_RC ( rcExhausted );
-        }
-        else {
-            Key = calloc ( 1, sizeof ( struct KKey ) );
-            if ( Key == NULL ) {
-                RCt = XFS_RC ( rcExhausted );
-            }
-            else {
-                RCt = KKeyInitRead (
-                                    Key,
-                                    kkeyAES128,
-                                    ThePass,
-                                    PassSize
-                                    );
-                if ( RCt == 0 ) {
-                    Project -> key = Key;
-                    Project -> pass = ThePass;
-                    Project -> pass_size = PassSize;
-                }
-            }
-        }
-    }
-
-    return RCt;
-}   /* _GapProjectLoadEncriptionKey () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectEncriptionKey (
-                        const struct XFSGapProject * self,
-                        const struct KKey ** EncriptionKey
-)
-{
-    rc_t RCt = 0;
-
-    XFS_CSAN ( EncriptionKey )
-    XFS_CAN ( self )
-    XFS_CAN ( EncriptionKey )
-
-    if ( self -> key == NULL ) {
-        RCt = _GapProjectLoadEncriptionKey ( self );
-    }
-
-    if ( RCt == 0 ) {
-        * EncriptionKey = self -> key;
-    }
-
-    return RCt;
-}   /* XFSGapProjectEncriptionKey () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectPassword (
-                        const struct XFSGapProject * self,
-                        const char ** Password,
-                        size_t * PasswordSize
-)
-{
-    rc_t RCt = 0;
-
-    XFS_CSAN ( Password )
-    XFS_CSA ( PasswordSize, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Password )
-    XFS_CAN ( PasswordSize )
-
-    if ( self -> key == NULL ) {
-        RCt = _GapProjectLoadEncriptionKey ( self );
-    }
-
-    if ( RCt == 0 ) {
-        * Password = self -> pass;
-        * PasswordSize = self -> pass_size;
-    }
-
-    return RCt;
-}   /* XFSGapProjectPassword () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectLocateAccession (
-                        const struct XFSGapProject * self,
-                        const char * Accession,
-                        const struct VPath ** Remote,
-                        const struct VPath ** Cache
-)
-{
-    rc_t RCt;
-    struct VPath * Query;
-
-    RCt = 0;
-    Query = NULL;
-
-    XFS_CSAN ( Remote )
-    XFS_CSAN ( Cache )
-    XFS_CAN ( self )
-    XFS_CAN ( Accession )
-
-    if ( ! XFSGapProjectIsValid ( self ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Remote == NULL && Cache == NULL ) {
-        return 0;
-    }
-
-    RCt = VFSManagerMakePath (
-                            XFS_VfsManager (),
-                            & Query,
-                            "ncbi-acc:%s",
-                            Accession
-                            );
-    if ( RCt == 0 ) {
-        RCt = VResolverQuery (
-                        self -> resolver,
-                        eProtocolHttp,
-                        Query,
-                        NULL,
-                        Remote,
-                        Cache
-                        );
-
-        VPathRelease ( Query );
-    }
-
-    return RCt;
-}   /* XFSGapProjectLocateAccession () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectLocateObject (
-                        const struct XFSGapProject * self,
-                        uint32_t ObjectId,
-                        const struct VPath ** Remote,
-                        const struct VPath ** Cache
-)
-{
-    rc_t RCt;
-    struct VPath * Query;
-
-    RCt = 0;
-    Query = NULL;
-
-    XFS_CSAN ( Remote )
-    XFS_CSAN ( Cache )
-    XFS_CAN ( self )
-
-    if ( ! XFSGapProjectIsValid ( self ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Remote == NULL && Cache == NULL ) {
-        return 0;
-    }
-
-    RCt = VFSManagerMakePath (
-                            XFS_VfsManager (),
-                            & Query,
-                            "ncbi-obj:%d",
-                            ObjectId
-                            );
-    if ( RCt == 0 ) {
-        RCt = VResolverQuery (
-                        self -> resolver,
-                        eProtocolHttp,
-                        Query,
-                        NULL,
-                        Remote,
-                        Cache
-                        );
-
-        VPathRelease ( Query );
-    }
-
-    return RCt;
-}   /* XFSGapProjectLocateObject () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectAccessionUrlAndPath (
-                            const struct XFSGapProject * self,
-                            const char * Accession,
-                            const char ** RemoteUrl,
-                            const char ** CachePath
-)
-{
-    rc_t RCt;
-    char BF [ XFS_SIZE_4096 ];
-    const struct VPath * rPath;
-    const struct VPath * cPath;
-    const char * rChar;
-    const char * cChar;
-
-    RCt = 0;
-    * BF = 0;
-    rPath = NULL;
-    cPath = NULL;
-    rChar = NULL;
-    cChar = NULL;
-
-    XFS_CSAN ( RemoteUrl )
-    XFS_CSAN ( CachePath )
-    XFS_CAN ( self )
-    XFS_CAN ( Accession )
-
-    if ( ! XFSGapProjectIsValid ( self ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( RemoteUrl == NULL && CachePath == NULL ) {
-        return 0;
-    }
-
-    RCt = XFSGapProjectLocateAccession (
-                                    self,
-                                    Accession,
-                                    RemoteUrl == NULL ? NULL : & rPath,
-                                    CachePath == NULL ? NULL : & cPath
-                                    );
-    if ( RCt == 0 ) {
-        if ( rPath != NULL ) {
-
-            RCt = XFS_ReadVUri_ZHR (
-                                    rPath,
-                                    BF,
-                                    sizeof ( BF ),
-                                    NULL
-                                    );
-            if ( RCt == 0 ) {
-                RCt = XFS_StrDup ( BF, & rChar );
-            }
-
-            VPathRelease ( rPath );
-        }
-
-        if ( cPath != NULL ) {
-            if ( RCt == 0 ) {
-
-                RCt = XFS_ReadVPath_ZHR (
-                                        cPath,
-                                        BF,
-                                        sizeof ( BF ),
-                                        NULL
-                                        );
-
-                if ( RCt == 0 ) {
-                    RCt = XFS_StrDup ( BF, & cChar );
-                }
-            }
-
-            VPathRelease ( cPath );
-        }
-
-        if ( RCt == 0 ) {
-            if ( RemoteUrl != NULL ) {
-                * RemoteUrl = rChar;
-            }
-
-            if ( CachePath != NULL ) {
-                * CachePath = cChar;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( RemoteUrl != NULL ) {
-            * RemoteUrl = NULL;
-        }
-
-        if ( CachePath != NULL ) {
-            * CachePath = NULL;
-        }
-
-        if ( rChar != NULL ) {
-            free ( ( char * ) rChar );
-        }
-
-        if ( cChar != NULL ) {
-            free ( ( char * ) cChar );
-        }
-    }
-
-    return RCt;
-}   /* XFSGapProjectAccessionUrlAndPath () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapProjectObjectUrlAndPath (
-                            const struct XFSGapProject * self,
-                            uint32_t ObjectId,
-                            const char ** RemoteUrl,
-                            const char ** CachePath
-)
-{
-    rc_t RCt;
-    char BF [ XFS_SIZE_4096 ];
-    const struct VPath * rPath;
-    const struct VPath * cPath;
-    const char * rChar;
-    const char * cChar;
-
-    RCt = 0;
-    * BF = 0;
-    rPath = NULL;
-    cPath = NULL;
-    rChar = NULL;
-    cChar = NULL;
-
-    XFS_CSAN ( RemoteUrl )
-    XFS_CSAN ( CachePath )
-    XFS_CAN ( self )
-
-    if ( ObjectId == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( ! XFSGapProjectIsValid ( self ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( RemoteUrl == NULL && CachePath == NULL ) {
-        return 0;
-    }
-
-    RCt = XFSGapProjectLocateObject (
-                                    self,
-                                    ObjectId,
-                                    RemoteUrl == NULL ? NULL : & rPath,
-                                    CachePath == NULL ? NULL : & cPath
-                                    );
-    if ( RCt == 0 ) {
-        if ( rPath != NULL ) {
-
-            RCt = XFS_ReadVUri_ZHR (
-                                    rPath,
-                                    BF,
-                                    sizeof ( BF ),
-                                    NULL
-                                    );
-            if ( RCt == 0 ) {
-                RCt = XFS_StrDup ( BF, & rChar );
-            }
-
-            VPathRelease ( rPath );
-        }
-
-        if ( cPath != NULL ) {
-            if ( RCt == 0 ) {
-
-                RCt = XFS_ReadVPath_ZHR (
-                                        cPath,
-                                        BF,
-                                        sizeof ( BF ),
-                                        NULL
-                                        );
-
-                if ( RCt == 0 ) {
-                    RCt = XFS_StrDup ( BF, & cChar );
-                }
-            }
-
-            VPathRelease ( cPath );
-        }
-
-        if ( RCt == 0 ) {
-            if ( RemoteUrl != NULL ) {
-                * RemoteUrl = rChar;
-            }
-            if ( CachePath != NULL ) {
-                * CachePath = cChar;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( RemoteUrl != NULL ) {
-            * RemoteUrl = NULL;
-        }
-        if ( CachePath != NULL ) {
-            * CachePath = NULL;
-        }
-
-        if ( rChar != NULL ) {
-            free ( ( char * ) rChar );
-        }
-
-        if ( cChar != NULL ) {
-            free ( ( char * ) cChar );
-        }
-    }
-
-    return RCt;
-}   /* XFSGapProjectObjectUrlAndPath () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* _GapDepot                                                     */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static struct _GapDepot * _sDepot = NULL;
-
-static
-struct _GapDepot * CC
-_DepotGet ()
-{
-    return _sDepot;
-}   /* _DepotGet () */
-
-static
-void CC
-_DepotWhackCallback ( BSTNode * Node, void * unused )
-{
-    if ( Node != NULL ) {
-        XFSGapProjectRelease ( ( const struct XFSGapProject * ) Node );
-    }
-}   /* _DepotWhackCallback () */
-
-static
-rc_t CC
-_GapDepotDispose ( struct _GapDepot * self )
-{
-    if ( self != NULL ) {
-        BSTreeWhack ( & ( self -> tree ), _DepotWhackCallback, NULL );
-
-        if ( self -> mutabor != NULL ) {
-            KLockRelease ( self -> mutabor );
-            self -> mutabor = NULL;
-        }
-
-        free ( self );
-    }
-
-    return 0;
-}   /* _GapDepotDispose () */
-
-static
-rc_t CC
-_GapDepotMake ( struct _GapDepot ** Depot )
-{
-    rc_t RCt;
-    struct _GapDepot * TheDepot;
-
-    RCt = 0;
-    TheDepot = NULL;
-
-    XFS_CSAN ( Depot )
-    XFS_CAN ( Depot )
-
-    TheDepot = calloc ( 1, sizeof ( struct _GapDepot ) );
-    if ( TheDepot == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = KLockMake ( & ( TheDepot -> mutabor ) );
-        if ( RCt == 0 ) {
-            BSTreeInit ( & ( TheDepot -> tree ) );
-
-            * Depot = TheDepot;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Depot = NULL;
-
-        if ( TheDepot != NULL ) {
-            _GapDepotDispose ( TheDepot );
-        }
-    }
-
-    return RCt;
-}   /* _GapDepotMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapInit ()
-{
-    if ( _sDepot == NULL ) {
-        return _GapDepotMake ( & _sDepot );
-    }
-
-    return 0;
-}   /* XFSGapDelete () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapDispose ()
-{
-    struct _GapDepot * Dpt = _sDepot;
-
-    if ( Dpt != NULL ) {
-        _sDepot = NULL;
-
-        return _GapDepotDispose ( Dpt );
-    }
-
-    return 0;
-}   /* XFSGapDelete () */
-
-static
-int64_t CC
-_DepotAddCallback (
-                const struct BSTNode * N1,
-                const struct BSTNode * N2
-)
-{
-    struct XFSGapProject * P1 = ( struct XFSGapProject * ) N1;
-    struct XFSGapProject * P2 = ( struct XFSGapProject * ) N2;
-    return  P1 -> project_id - P2 -> project_id;
-}   /* _DepotAddCallback () */
-
-static
-rc_t CC
-_DepotAdd_NoLock ( const struct XFSGapProject * Project )
-{
-    struct _GapDepot * Depot = _DepotGet ();
-
-    XFS_CAN ( Project )
-    XFS_CAN ( Depot )
-
-    return BSTreeInsert (
-                        & ( Depot -> tree ),
-                        ( struct BSTNode * ) Project,
-                        _DepotAddCallback
-                        );
-}   /* _DepotAdd_NoLock () */
-
-static
-int64_t CC
-_DepotFindCallback ( const void * Item, const struct BSTNode * Node )
-{
-    uint32_t ItemId, NodeId;
-
-    ItemId = * ( ( uint32_t * ) Item );
-    NodeId = Node == NULL
-                    ? 0
-                    : ( ( struct XFSGapProject * ) Node ) -> project_id
-                    ;
-
-
-    return ItemId - NodeId;
-}   /* _DepotFindCallback () */
-
-static
-rc_t CC
-_GapDepotFind_NoLock (
-                    uint32_t ProjectId,
-                    const struct XFSGapProject ** Project
-)
-{
-    rc_t RCt;
-    struct XFSGapProject * TheProject;
-    struct _GapDepot * Depot;
-
-    RCt = 0;
-    Depot = _DepotGet ();
-
-    XFS_CSAN ( Project )
-    XFS_CAN ( Depot )
-    XFS_CAN ( Project )
-    XFS_CAN ( Depot )
-
-    TheProject = ( struct XFSGapProject * ) BSTreeFind ( 
-                                        & ( Depot -> tree ),
-                                        ( const void * ) & ProjectId,
-                                        _DepotFindCallback
-                                        );
-    if ( TheProject == NULL ) {
-        RCt = XFS_RC ( rcNotFound );
-    }
-    else {
-        * Project = TheProject;
-    }
-
-    return RCt;
-}   /* _GapDepotFind () */
-
-LIB_EXPORT
-bool CC
-XFSGapHas ( uint32_t ProjectId )
-{
-    rc_t RCt;
-    struct _GapDepot * Depot;
-    const struct XFSGapProject * Project;
-
-    RCt = 0;
-    Project = NULL;
-    Depot = _DepotGet ();
-
-    XFS_CAN ( Depot )
-
-    RCt = KLockAcquire ( Depot -> mutabor );
-    if ( RCt == 0 ) {
-
-        RCt = _GapDepotFind_NoLock ( ProjectId, & Project );
-
-        KLockUnlock ( Depot -> mutabor );
-    }
-
-    return RCt == 0;
-}   /* XFSGapHas () */
-
-static
-rc_t CC
-_GapProjectMake_NoLock (
-                const struct XFSGapProject ** Project,
-                uint32_t ProjectId
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    XFS_CSAN ( Project )
-    XFS_CAN ( Project )
-
-    RCt = _GapProjectMake ( Project, ProjectId );
-    if ( RCt == 0 ) {
-        RCt = _DepotAdd_NoLock ( * Project );
-        if ( RCt != 0 ) {
-            * Project = NULL;
-
-            _GapProjectDispose ( * Project );
-        }
-    }
-
-    return RCt;
-}   /* _GapProjectMake_NoLock () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapFindOrCreate (
-                uint32_t ProjectId,
-                const struct XFSGapProject ** Project
-)
-{
-    rc_t RCt;
-    struct _GapDepot * Depot;
-    const struct XFSGapProject * TheProject;
-
-    RCt = 0;
-    Depot = _DepotGet ();
-    TheProject = NULL;
-
-    XFS_CSAN ( Project )
-    XFS_CAN ( Project )
-
-    RCt = KLockAcquire ( Depot -> mutabor );
-    if ( RCt == 0 ) {
-
-        RCt = _GapDepotFind_NoLock ( ProjectId, & TheProject );
-        if ( GetRCState ( RCt ) == rcNotFound ) {
-            RCt = _GapProjectMake_NoLock ( & TheProject, ProjectId );
-        }
-
-        if ( RCt == 0 ) {
-            RCt = XFSGapProjectAddRef ( TheProject );
-
-            if ( RCt == 0 ) {
-                * Project = TheProject;
-            }
-        }
-
-        KLockUnlock ( Depot -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSGapFindOrCreate () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapRemove ( uint32_t ProjectId )
-{
-    rc_t RCt;
-    struct _GapDepot * Depot;
-    const struct XFSGapProject * Project;
-
-    RCt = 0;
-    Depot = _DepotGet ();
-    Project = NULL;
-
-    RCt = KLockAcquire ( Depot -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _GapDepotFind_NoLock ( ProjectId, & Project );
-        if ( RCt == 0 ) {
-            BSTreeUnlink (
-                        & ( Depot -> tree ),
-                        ( struct BSTNode * ) & ( Project -> node )
-                        );
-            XFSGapProjectRelease ( Project );
-        } 
-
-        KLockUnlock ( Depot -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSGapRemove () */
-
diff --git a/libs/xfs/xgap.h b/libs/xfs/xgap.h
deleted file mode 100644
index 4038859..0000000
--- a/libs/xfs/xgap.h
+++ /dev/null
@@ -1,244 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _xgap_h_
-#define _xgap_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   There is some thing which suppose to be a temporary stuff
-  ))))  of viewer for dbGaP projects
- ((((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * LYRICS:
- *
- * That file contains methods which allow to access to dbGaP project
- * data, as for :
- * 
- *      Directories
- *      Files
- *      Passwords
- *
- * XFSGapProject - dbGap Project defined by unique ProjectId (uint32_t)
- *    1) does not have Make/Dispose methods - should be created by
- *       Gap's FindOrCreate method, and Released after use
- *    2) provides methods: Root directory, Key for ProjectId
- *    3) provides access to Project Data by Accession or ObjectId
- *       ( opens and decrypts files )
- *    3) thread safe
- *    4) struct itself hidden
- *
- * XFSGap - retrieves or creates dbGaP Project by ProjectId
- *    1) provides access to dbGaP Project data by ProjectID
- *    3) thread safe.
- *
- * There is special ProjectId = XFS_PUBLIC_PROJECT_ID ( 0 ), which is
- * for 'public' data
- *
- *_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- //     Forwards
-((*/
-struct XFSGapProject;
-struct KKey;
-struct VPath;
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- //     XFSGapInit/XFSGapDispose
- \\     We are keepin' single instance of depot per program. These 
- //     methods should be called at the program begining and end.
-((*/
-XFS_EXTERN rc_t CC XFSGapInit ();
-XFS_EXTERN rc_t CC XFSGapDispose ();
-
-    /*  Don't know if we need that method. Added for a sake of sake
-     *  Return true if Project with such ID exists
-     */
-XFS_EXTERN bool CC XFSGapHas ( uint32_t ProjectId );
-
-    /*  Usint method FindOrCreate, to avoid collisions from different
-     *  creative people :lol:
-     */
-XFS_EXTERN rc_t CC XFSGapFindOrCreate (
-                                uint32_t ProjectId,
-                                const struct XFSGapProject ** Project
-                                );
-
-    /*  Don't know if we need that method. Added for a sake of sake
-     */
-XFS_EXTERN rc_t CC XFSGapRemove ( uint32_t ProjectId );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*))
- //     XFSGapProject
-((*/
-
-#define XFS_PUBLIC_PROJECT_ID   0
-
-XFS_EXTERN rc_t CC XFSGapProjectAddRef (
-                            const struct XFSGapProject * self
-                            );
-XFS_EXTERN rc_t CC XFSGapProjectRelease (
-                            const struct XFSGapProject * self
-                            );
-
-XFS_EXTERN bool CC XFSGapPfojectIsValid (
-                            const struct XFSGapProject * self
-                            );
-
-XFS_EXTERN rc_t CC XFSGapProjectId (
-                            const struct XFSGapProject * self,
-                            uint32_t * Id
-                            );
-
-    /* Both Remote and Cache could be NULL, so no data will be returned
-     * To dispose pahts, You should release them after using
-     */
-XFS_EXTERN rc_t CC XFSGapProjectLocateAccession (
-                            const struct XFSGapProject * self,
-                            const char * Accession,
-                            const struct VPath ** Remote,
-                            const struct VPath ** Cache
-                            );
-
-    /* Both Remote and Cache could be NULL, so no data will be returned
-     * To dispose pahts, You should release them after using
-     */
-XFS_EXTERN rc_t CC XFSGapProjectLocateObject (
-                            const struct XFSGapProject * self,
-                            uint32_t ObjectId,
-                            const struct VPath ** Remote,
-                            const struct VPath ** Cache
-                            );
-
-    /*  Both Remote and Cache could be NULL, and don't forget to free
-     *  them 
-     */
-XFS_EXTERN rc_t CC XFSGapProjectAccessionUrlAndPath (
-                            const struct XFSGapProject * self,
-                            const char * Accession,
-                            const char ** RemoteUrl,
-                            const char ** CachePath
-                            );
-
-    /*  Both Remote and Cache could be NULL, and don't forget to free
-     *  them 
-     */
-XFS_EXTERN rc_t CC XFSGapProjectObjectUrlAndPath (
-                            const struct XFSGapProject * self,
-                            uint32_t ObjectId,
-                            const char ** RemoteUrl,
-                            const char ** CachePath
-                            );
-
-    /* Don't forget to free RepositoryName, cuz it is part of a system
-     */
-XFS_EXTERN rc_t CC XFSGapProjectRepositoryName (
-                            const struct XFSGapProject * self,
-                            char ** RepositoryName
-                            );
-
-    /* Don't forget to free DislplayName, cuz it is part of a system
-     */
-XFS_EXTERN rc_t CC XFSGapProjectRepositoryDisplayName (
-                            const struct XFSGapProject * self,
-                            char ** DislplayName
-                            );
-
-    /* Don't forget to free RepositoryRoot, cuz it is part of a system
-     */
-XFS_EXTERN rc_t CC XFSGapProjectRepositoryRoot (
-                            const struct XFSGapProject * self,
-                            char ** RepositoryRoot
-                            );
-
-    /* No need to free Key, cuz it is part of a system
-     */
-XFS_EXTERN rc_t CC XFSGapProjectEncriptionKey (
-                            const struct XFSGapProject * self,
-                            const struct KKey ** EncriptionKey
-                            );
-
-    /* No need to free Password, cuz it is part of a system
-     */
-XFS_EXTERN rc_t CC XFSGapProjectPassword (
-                            const struct XFSGapProject * self,
-                            const char ** Password,
-                            size_t * PasswordSize
-                            );
-
-    /* Don't forget to free Workspace, cuz it is part of a system
-     */
-XFS_EXTERN rc_t CC XFSGapProjectWorkspace (
-                            const struct XFSGapProject * self,
-                            char ** Workspace
-                            );
-
-/*)))   Those do not need ProjectId
- (((*/
-    /* Don't forget to free Kartfiles, cuz it is part of a system
-     */
-XFS_EXTERN rc_t CC XFSGapKartfiles ( char ** Kartfiles );
-
-    /* Don't forget to free Publicfiles, cuz it is part of a system
-     */
-XFS_EXTERN rc_t CC XFSGapPublicfiles ( char ** PublicFiles );
-
-/*)))   For those, who are lame. Apparently, there should be a
- |||    method in kfg/config.h for that ... but ...
-(((*/
-    /* Don't forget to free UserHome, cuz it is part of a system
-     */
-XFS_EXTERN rc_t CC XFSGapUserHome ( char ** UserHome );
-
-    /* Don't forget to free UserConfigDir, cuz it is part of a system
-     */
-XFS_EXTERN rc_t CC XFSGapUserConfigDir ( char ** UserConfigDir );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _xgap_h_ */
diff --git a/libs/xfs/xgapf.c b/libs/xfs/xgapf.c
deleted file mode 100644
index 7e8927e..0000000
--- a/libs/xfs/xgapf.c
+++ /dev/null
@@ -1,1822 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/container.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/vector.h>
-#include <kproc/lock.h>
-#include <vfs/path.h>
-#include <vfs/manager.h>
-#include <vfs/resolver.h>
-#include <kns/http.h>
-
-#include <kfg/repository.h>
-
-#include <kfs/file.h>
-#include <kfs/directory.h>
-#include <kfs/file-impl.h>
-#include <kfs/cacheteefile.h>
-#include <krypto/key.h>
-#include <krypto/encfile.h>
-#include <krypto/wgaencrypt.h>
-
-#include <xfs/path.h>
-#include <xfs/perm.h>
-#include "schwarzschraube.h"
-#include "xgap.h"
-#include "xgapf.h"
-#include "spen.h"
-#include "zehr.h"
-
-#include <sysalloc.h>
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*))    Useful defines
- ((*/
-
-    /* Do not comment that line unless You know what it does */
-#define _USE_CACHED_CONN_
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))    XFSGapFiles are living here
- ((*/
-
-struct _GapFiles {
-    BSTree tree;
-
-    KLock * mutabor;
-
-    const struct XFSPen * pen;
-};
-
-typedef enum _EncType {
-                    kxfsEncInvalid,
-                    kxfsEncReady,
-                    kxfsEncNone,
-                    kxfsEncEncFile,
-                    kxfsEncSraFile,
-                    kxfsEncWGAFile,
-                    kxfsEncBroken
-                    } _EncType;
-
-struct _GapFilePeer {
-    BSTNode node;
-
-    KLock * mutabor;
-    KRefcount refcount;
-
-    uint32_t project_id;
-    const char * accession;
-    uint32_t object_id;
-
-    const char * remote_url;
-    const char * cache_path;
-
-    XFSStatus status;
-    _EncType enc_type;
-
-    uint64_t size;
-
-    const struct KFile * file;
-};
-
-struct _GapFile {
-    struct KFile file;
-
-    const struct KFile * looney_bin;
-
-    struct _GapFilePeer * peer;
-};
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* _GapFiles ...                                                     */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-static struct _GapFiles * _sFiles = NULL;
-
-static
-struct _GapFiles *
-_FilesGet ()
-{
-    return _sFiles;
-}   /* _FilesGet () */
-
-static rc_t CC _GapFilePeerAddRef ( struct _GapFilePeer * self );
-static rc_t CC _GapFilePeerRelease ( struct _GapFilePeer * Peer );
-static rc_t CC _GapFilePeerMake (
-                                struct _GapFilePeer ** File,
-                                uint32_t ProjectId,
-                                const char * Accession,
-                                uint32_t ObjectId
-                                );
-static rc_t CC _GapFilePeerDispose ( struct _GapFilePeer * self );
-
-static
-void CC
-_GapFilesWhackCallback ( BSTNode * Node, void * unused )
-{
-    if ( Node != NULL ) {
-        _GapFilePeerRelease ( ( struct _GapFilePeer* ) Node );
-    }
-}   /* _GapFilesWhackCallback () */
-
-static
-rc_t CC
-_GapFilesDispose ( struct _GapFiles * self )
-{
-    if ( self != NULL ) {
-        BSTreeWhack (
-                    & ( self -> tree ),
-                    _GapFilesWhackCallback,
-                    NULL
-                    );
-
-        if ( self -> pen != NULL ) {
-            XFSPenDispose ( self -> pen );
-            self -> pen = NULL;
-        }
-
-        if ( self -> mutabor != NULL ) {
-            KLockRelease ( self -> mutabor );
-            self -> mutabor = NULL;
-        }
-
-        free ( self );
-    }
-
-    return 0;
-}   /* _GapFilesDispose () */
-
-static
-rc_t CC
-_GapFilesMake ( struct _GapFiles ** Files )
-{
-    rc_t RCt;
-    struct _GapFiles * TheFiles;
-
-    RCt = 0;
-    TheFiles = NULL;
-
-    XFS_CSAN ( Files )
-    XFS_CAN ( Files )
-
-    TheFiles = calloc ( 1, sizeof ( struct _GapFiles ) );
-    if ( TheFiles == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = XFSPenMake ( & ( TheFiles -> pen ), 65 );
-        if ( RCt == 0 ) {
-            RCt = KLockMake ( & ( TheFiles -> mutabor ) );
-            if ( RCt == 0 ) {
-                BSTreeInit ( & ( TheFiles -> tree ) );
-
-                * Files = TheFiles;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Files = NULL;
-
-        if ( TheFiles != NULL ) {
-            _GapFilesDispose ( TheFiles );
-        }
-    }
-
-    return RCt;
-}   /* _GapFilesDispose () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapFilesInit ()
-{
-    rc_t RCt = 0;
-
-    RCt = XFSGapInit ();
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    if ( _sFiles == NULL ) {
-        return _GapFilesMake ( & _sFiles );
-    }
-
-    return 0;
-}   /* XFSGapFilesInit () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapFilesDispose ()
-{
-    rc_t RCt;
-    struct _GapFiles * Files;
-
-    RCt = 0;
-    Files = _sFiles;
-
-    if ( Files != NULL ) {
-        _sFiles = NULL;
-
-        RCt = _GapFilesDispose ( Files );
-    }
-
-    XFSGapDispose ();
-
-    return RCt;
-}   /* XFSGapFilesDispose () */
-
-static
-int64_t CC
-_GapFilesFindCallback ( const void * Item, const BSTNode * Node )
-{
-    const char * Str1, * Str2;
-
-    Str1 = ( ( char * ) Item );
-    Str2 = Node == NULL
-                    ? NULL
-                    : ( ( struct _GapFilePeer * ) Node ) -> cache_path
-                    ;
-
-
-    return XFS_StringCompare4BST_ZHR ( Str1, Str2 );
-}   /* _GapFilesFindCallback () */
-
-static
-rc_t CC
-_GapFilesFind_NoLock (
-                    struct _GapFiles * self,
-                    struct _GapFilePeer ** Peer,
-                    const char * CachePath
-)
-{
-    rc_t RCt;
-    struct _GapFilePeer * ThePeer;
-
-    RCt = 0;
-    ThePeer = NULL;
-
-    XFS_CSAN ( Peer )
-    XFS_CAN ( self )
-    XFS_CAN ( Peer )
-    XFS_CAN ( CachePath )
-
-    ThePeer = ( struct _GapFilePeer * ) BSTreeFind ( 
-                                        & ( self -> tree ),
-                                        CachePath,
-                                        _GapFilesFindCallback
-                                        );
-    if ( ThePeer == NULL ) {
-
-        RCt = XFS_RC ( rcNotFound );
-    }
-    else {
-
-        * Peer = ThePeer;
-        RCt = 0;
-    }
-
-    return RCt;
-}   /* _GapFilesFind_NoLock () */
-
-static
-int64_t CC
-_GapFilesAddCallback (
-                    const struct BSTNode * N1,
-                    const struct BSTNode * N2
-)
-{
-    const char * Str1, * Str2;
-
-
-    Str1 = N1 == NULL
-                    ? NULL
-                    : ( ( ( struct _GapFilePeer * ) N1 ) -> cache_path )
-                    ;
-    Str2 = N2 == NULL
-                    ? NULL
-                    : ( ( ( struct _GapFilePeer * ) N2 ) -> cache_path )
-                    ;
-
-    return XFS_StringCompare4BST_ZHR ( Str1, Str2 );
-}   /* _GapFilesAddCallback () */
-
-static
-rc_t CC
-_GapFilesAddPeer_NoLock (
-                    struct _GapFiles * self,
-                    struct _GapFilePeer ** Peer,
-                    uint32_t ProjectId,
-                    const char * Accession,
-                    uint32_t ObjectId
-)
-{
-    rc_t RCt;
-    struct _GapFilePeer * ThePeer;
-
-    RCt = 0;
-    ThePeer = NULL;
-
-    XFS_CSAN ( Peer )
-    XFS_CAN ( self )
-    XFS_CAN ( Peer )
-
-    RCt = _GapFilePeerMake (
-                        & ThePeer,
-                        ProjectId,
-                        Accession,
-                        ObjectId
-                        );
-    if ( RCt == 0 ) {
-        RCt = BSTreeInsert (
-                        & ( self -> tree ),
-                        ( struct BSTNode * ) ThePeer,
-                        _GapFilesAddCallback
-                        );
-        if ( RCt == 0 ) {
-            * Peer = ThePeer;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Peer = NULL;
-
-        if ( ThePeer != NULL ) {
-            _GapFilePeerDispose ( ThePeer );
-        }
-    }
-
-    return RCt;
-}   /* _GapFilesAddPeer_NoLock () */
-
-static
-rc_t CC
-_GapFilesFindOrCreate (
-                    struct _GapFilePeer ** Peer,
-                    uint32_t ProjectId,
-                    const char * Accession,
-                    uint32_t ObjectId
-)
-{
-    rc_t RCt;
-    struct _GapFiles * Files;
-    struct _GapFilePeer * ThePeer;
-    const struct XFSGapProject * Project;
-    const char * CachePath;
-
-    RCt = 0;
-    ThePeer = NULL;
-    Files = _FilesGet ();
-    Project = NULL;
-    CachePath = NULL;
-
-    XFS_CSAN ( Peer )
-    XFS_CAN ( Files )
-    XFS_CAN ( Peer )
-
-    if ( Accession == NULL && ObjectId == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = XFSGapFindOrCreate ( ProjectId, & Project );
-    if ( RCt == 0 ) {
-        if ( Accession != NULL ) {
-            RCt = XFSGapProjectAccessionUrlAndPath (
-                                                Project,
-                                                Accession,
-                                                NULL,
-                                                & CachePath
-                                                );
-        }
-        else {
-            RCt = XFSGapProjectObjectUrlAndPath (
-                                                Project,
-                                                ObjectId,
-                                                NULL,
-                                                & CachePath
-                                                );
-        }
-
-        if ( RCt == 0 ) {
-            RCt = KLockAcquire ( Files -> mutabor );
-            if ( RCt == 0 ) {
-                    /* First we trying to locate already ready peer
-                     */
-                RCt = _GapFilesFind_NoLock (
-                                            Files,
-                                            & ThePeer,
-                                            CachePath
-                                            );
-                if ( GetRCState ( RCt ) == rcNotFound ) {
-                    RCt = _GapFilesAddPeer_NoLock (
-                                                Files,
-                                                & ThePeer,
-                                                ProjectId,
-                                                Accession,
-                                                ObjectId
-                                                );
-                }
-
-                if ( RCt == 0 ) {
-                    RCt = _GapFilePeerAddRef ( ThePeer );
-                    if ( RCt == 0 ) {
-                        * Peer = ThePeer;
-                    }
-                }
-
-                KLockUnlock ( Files -> mutabor );
-            }
-
-            free ( ( char * ) CachePath );
-        }
-
-        XFSGapProjectRelease ( Project );
-    }
-
-    return RCt;
-}   /* _GapFilesFindOrCreate () */
-
-static rc_t CC _GapFilePeerOpen (
-                            struct _GapFilePeer * self,
-                            const struct KFile ** File
-                            );
-static
-rc_t CC
-_GapFilesOpen (
-                const struct KFile ** File,
-                uint32_t ProjectId,
-                const char * Accession,
-                uint32_t ObjectId
-)
-{
-    rc_t RCt;
-    struct _GapFilePeer * Peer;
-    const struct KFile * TheFile;
-
-    RCt = 0;
-    Peer = NULL;
-    TheFile = NULL;
-
-    XFS_CSAN ( File )
-    XFS_CAN ( File )
-
-    RCt = _GapFilesFindOrCreate (
-                                & Peer,
-                                ProjectId,
-                                Accession,
-                                ObjectId
-                                );
-    if ( RCt == 0 ) {
-        RCt = _GapFilePeerOpen ( Peer, & TheFile );
-        if ( RCt == 0 ) {
-            * File = TheFile;
-        }
-
-        _GapFilePeerRelease ( Peer );
-    }
-
-    return RCt;
-}   /* _GapFilesOpen () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapFilesOpenAccession (
-                        const struct KFile ** File,
-                        uint32_t ProjectId,
-                        const char * Accession
-)
-{
-    return _GapFilesOpen ( File, ProjectId, Accession, 0 );
-}   /* XFSGapFilesOpenAccession () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapFilesOpenObjectId (
-                        const struct KFile ** File,
-                        uint32_t ProjectId,
-                        uint32_t ObjectId
-)
-{
-    return _GapFilesOpen ( File, ProjectId, NULL, ObjectId );
-}   /* XFSGapFilesOpenObjectId () */
-
-static
-rc_t CC
-_GapFilesSize (
-                uint64_t * Size,
-                uint32_t ProjectId,
-                const char * Accession,
-                uint32_t ObjectId
-)
-{
-    rc_t RCt;
-    struct _GapFilePeer * Peer;
-    const struct KFile * TheFile;
-
-    RCt = 0;
-    Peer = NULL;
-    TheFile = NULL;
-
-    XFS_CSA ( Size, 0 )
-    XFS_CAN ( Size )
-
-    RCt = _GapFilesFindOrCreate (
-                                & Peer,
-                                ProjectId,
-                                Accession,
-                                ObjectId
-                                );
-    if ( RCt == 0 ) {
-        if ( Peer -> size == 0 ) {
-            RCt = _GapFilePeerOpen ( Peer, & TheFile );
-            if ( RCt == 0 ) {
-                KFileRelease ( TheFile );
-            }
-        }
-
-        if ( RCt == 0 ) {
-            * Size = Peer -> size;
-        }
-
-        _GapFilePeerRelease ( Peer );
-    }
-
-    return RCt;
-}   /* _GapFilesSize () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapFilesAccessionSize (
-                        uint64_t * Size,
-                        uint32_t ProjectId,
-                        const char * Accession
-)
-{
-    return _GapFilesSize ( Size, ProjectId, Accession, 0 );
-}   /* XFSGapFilesAccessionSize () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapFilesObjectIdSize (
-                        uint64_t * Size,
-                        uint32_t ProjectId,
-                        uint32_t ObjectId
-)
-{
-    return _GapFilesSize ( Size, ProjectId, NULL, ObjectId );
-}   /* XFSGapFilesObjectIdSize () */
-
-static
-rc_t CC
-_GapFilesPathDate (
-                KTime_t * Time,
-                const char * Path,
-                bool Completed
-)
-{
-    rc_t RCt;
-    struct KDirectory * NatDir;
-
-    RCt = 0;
-    NatDir = NULL;
-
-    XFS_CSA ( Time, 0 )
-    XFS_CAN ( Time )
-    XFS_CAN ( Path )
-
-    RCt = KDirectoryNativeDir ( & NatDir );
-    if ( RCt == 0 ) {
-        if ( Completed ) {
-            RCt = KDirectoryDate ( NatDir, Time, Path );
-        }
-        else {
-            RCt = KDirectoryDate ( NatDir, Time, "%s.cache", Path );
-        }
-
-        KDirectoryRelease ( NatDir );
-    }
-
-    return RCt;
-}   /* _GapFilesPathDate () */
-
-static
-rc_t CC
-_GapFilesDate (
-                KTime_t * Time,
-                uint32_t ProjectId,
-                const char * Accession,
-                uint32_t ObjectId
-)
-{
-    rc_t RCt;
-    struct _GapFilePeer * Peer;
-    const struct KFile * TheFile;
-
-    RCt = 0;
-    Peer = NULL;
-    TheFile = NULL;
-
-    XFS_CSA ( Time, 0 )
-    XFS_CAN ( Time )
-
-    RCt = _GapFilesFindOrCreate (
-                                & Peer,
-                                ProjectId,
-                                Accession,
-                                ObjectId
-                                );
-    if ( RCt == 0 ) {
-            /*  It may be file does not exists
-             */
-        if ( Peer -> size == 0 ) {
-            RCt = _GapFilePeerOpen ( Peer, & TheFile );
-            if ( RCt == 0 ) {
-                KFileRelease ( TheFile );
-            }
-        }
-
-        if ( RCt == 0 ) {
-            RCt = _GapFilesPathDate (
-                                    Time,
-                                    Peer -> cache_path,
-                                    Peer -> status == kxfsComplete
-                                    );
-        }
-
-        _GapFilePeerRelease ( Peer );
-    }
-
-    return RCt;
-}   /* _GapFilesDate () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapFilesAccessionDate (
-                        KTime_t * Time,
-                        uint32_t ProjectId,
-                        const char * Accession
-)
-{
-    return _GapFilesDate ( Time, ProjectId, Accession, 0 );
-}   /* XFSGapFilesAccessionDate () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapFilesObjectIdDate (
-                        KTime_t * Time,
-                        uint32_t ProjectId,
-                        uint32_t ObjectId
-)
-{
-    return _GapFilesDate ( Time, ProjectId, NULL, ObjectId );
-}   /* XFSGapFilesObjectIdDate () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* _GapFilesPeer                                                     */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static const char * _sGapFilePeer_classname = "GapFilePeer";
-
-rc_t CC
-_GapFilePeerDispose ( struct _GapFilePeer * self )
-{
-    if ( self != NULL ) {
-        if ( self -> mutabor != NULL ) {
-            KLockRelease ( self -> mutabor );
-            self -> mutabor = NULL;
-        }
-
-        KRefcountWhack (
-                        & ( self -> refcount ),
-                        _sGapFilePeer_classname
-                        );
-
-        self -> project_id = 0;
-
-        if ( self -> accession != NULL ) {
-            free ( ( char * ) self -> accession );
-            self -> accession = NULL;
-        }
-
-        self -> object_id = 0;
-
-        if ( self -> remote_url != NULL ) {
-            free ( ( char * ) self -> remote_url );
-            self -> remote_url = NULL;
-        }
-
-        if ( self -> cache_path != NULL ) {
-            free ( ( char * ) self -> cache_path );
-            self -> cache_path = NULL;
-        }
-
-        self -> status = kxfsReady;
-        self -> enc_type = kxfsEncReady;
-        self -> size = 0;
-
-        if ( self -> file != NULL ) {
-            ( ( struct _GapFile * ) self -> file ) -> peer = NULL;
-            KFileRelease ( self -> file );
-            self -> file = NULL;
-        }
-
-        free ( self );
-    }
-
-    return 0;
-}   /* _GapFilePeerDispose () */
-
-rc_t CC
-_GapFilePeerMake (
-                struct _GapFilePeer ** File,
-                uint32_t ProjectId,
-                const char * Accession,
-                uint32_t ObjectId
-)
-{
-    rc_t RCt;
-    const struct XFSGapProject * Project;
-    struct _GapFilePeer * TheFile;
-
-    RCt = 0;
-    Project = NULL;
-    TheFile = NULL;
-
-    XFS_CSAN ( File )
-    XFS_CAN ( File )
-
-    if ( Accession == NULL && ObjectId == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    TheFile = calloc ( 1, sizeof ( struct _GapFilePeer ) );
-    if ( TheFile == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        KRefcountInit (
-                    & ( TheFile -> refcount ),
-                    1,
-                    _sGapFilePeer_classname,
-                    "GapFilePeerMake",
-                    "GapFilePeer"
-                    );
-        TheFile -> project_id = ProjectId;
-        TheFile -> enc_type = kxfsEncInvalid;
-
-        RCt = XFSGapFindOrCreate ( ProjectId, & Project );
-
-        TheFile -> status = RCt == 0 ? kxfsInvalid : kxfsBroken;
-        TheFile -> size = 0;
-
-        if ( RCt == 0 ) {
-            if ( Accession != NULL ) {
-                RCt = XFS_StrDup (
-                                Accession,
-                                & ( TheFile -> accession )
-                                );
-            }
-            else {
-                TheFile -> object_id = ObjectId;
-            }
-
-            if ( RCt == 0 ) {
-                RCt = KLockMake ( & ( TheFile -> mutabor ) );
-                if ( RCt == 0 ) {
-
-                    if ( Accession != NULL ) {
-                        RCt = XFSGapProjectAccessionUrlAndPath (
-                                            Project,
-                                            Accession,
-                                            & ( TheFile -> remote_url ),
-                                            & ( TheFile -> cache_path )
-                                            );
-                    }
-                    else {
-                        RCt = XFSGapProjectObjectUrlAndPath (
-                                            Project,
-                                            ObjectId,
-                                            & ( TheFile -> remote_url ),
-                                            & ( TheFile -> cache_path )
-                                            );
-                    }
-
-                    if ( RCt == 0 ) {
-                        TheFile -> status = kxfsReady;
-                        TheFile -> enc_type = kxfsEncReady;
-                        TheFile -> size = 0;
-                    }
-                }
-            }
-
-            XFSGapProjectRelease ( Project );
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( TheFile != NULL ) {
-            TheFile -> status = kxfsBroken;
-            TheFile -> enc_type = kxfsEncBroken;
-            TheFile -> size = 0;
-        }
-    }
-
-        /*  We have to return bad files too, to avoid multiply attempt
-         *  of initialization of the same files
-         */
-    if ( TheFile != NULL ) {
-        * File = TheFile;
-    }
-
-    return RCt;
-}   /* _GapFilePeerMake () */
-
-rc_t CC
-_GapFilePeerAddRef ( struct _GapFilePeer * self )
-{
-    rc_t RCt;
-    int RefC;
-
-    RCt = 0;
-    RefC = 0;
-
-    XFS_CAN ( self );
-
-    RefC = KRefcountAdd (
-                        & ( self -> refcount ),
-                        _sGapFilePeer_classname
-                        );
-    switch ( RefC ) {
-        case krefOkay :
-            RCt = 0;
-            break;
-        case krefZero :
-        case krefLimit :
-        case krefNegative :
-            RCt = XFS_RC ( rcInvalid );
-            break;
-        default :
-            RCt = XFS_RC ( rcUnknown );
-            break;
-    }
-
-    return RCt;
-}   /* _GapFilePeerAddRef () */
-
-rc_t CC
-_GapFilePeerRelease ( struct _GapFilePeer * self )
-{
-    rc_t RCt;
-    int RefC;
-
-    RCt = 0;
-    RefC = 0;
-
-    XFS_CAN ( self );
-
-    RefC = KRefcountDrop (
-                        & ( self -> refcount ),
-                        _sGapFilePeer_classname
-                        );
-    switch ( RefC ) {
-        case krefOkay :
-        case krefZero :
-                RCt = 0;
-                break;
-        case krefWhack :
-                RCt = _GapFilePeerDispose ( self );
-                break;
-        case krefNegative :
-                RCt = XFS_RC ( rcInvalid );
-                break;
-        default :
-                RCt = XFS_RC ( rcUnknown );
-                break;
-    }
-
-    return RCt;
-}   /* _GapFilePeerRelease () */
-
-static
-bool CC
-_GapFilePeerGood ( struct _GapFilePeer * self )
-{
-    if ( self != NULL ) {
-        return self -> status == kxfsReady || self -> status == kxfsGood;
-    }
-    return false;
-}   /* _GapFilePeerGood () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* _GapFile ...                                                      */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static
-rc_t CC
-_GapFileLockPeer ( const struct _GapFile * File )
-{
-    XFS_CAN ( File );
-    XFS_CAN ( File -> peer );
-    XFS_CAN ( File -> peer -> mutabor );
-
-    return KLockAcquire ( File -> peer -> mutabor );
-}   /* _GapFileLockPeer () */
-
-static
-rc_t CC
-_GapFileUnlockPeer ( const struct _GapFile * File )
-{
-    XFS_CAN ( File );
-    XFS_CAN ( File -> peer );
-    XFS_CAN ( File -> peer -> mutabor );
-
-    return KLockUnlock ( File -> peer -> mutabor );
-}   /* _GapFileUnlockPeer () */
-
-/*))
- || _GapFile virtual table
-((*/
-
-static rc_t CC _GapFile_destroy (
-                                struct KFile * self
-                                );
-static struct KSysFile_v1 * CC _GapFile_get_sysfile (
-                                const struct KFile * self,
-                                uint64_t * Offset
-                                );
-static rc_t CC _GapFile_random_access (
-                                const struct KFile * self
-                                );
-static rc_t CC _GapFile_get_size (
-                                const struct KFile * self,
-                                uint64_t * Size
-                                );
-static rc_t CC _GapFile_set_size (
-                                struct KFile * self,
-                                uint64_t Size
-                               );
-static rc_t CC _GapFile_read (
-                                const struct KFile * self,
-                                uint64_t Offset,
-                                void * Buffer,
-                                size_t BufferSize,
-                                size_t * NumRead
-                                );
-static rc_t CC _GapFile_write (
-                                struct KFile * self,
-                                uint64_t Offset,
-                                const void * Buffer,
-                                size_t BufferSize,
-                                size_t * NumWrite
-                                );
-static uint32_t CC _GapFile_get_type (
-                                const struct KFile * self
-                                );
-
-#ifdef MINOR_2_JOJOBA
-static rc_t CC _GapFile_timed_read (
-                                const struct KFile * self,
-                                uint64_t Offset,
-                                void * Buffer,
-                                size_t BufferSize,
-                                size_t * NumRead,
-                                struct timeout_t * Tm
-                                );
-static rc_t CC _GapFile_timed_write (
-                                struct KFile * self,
-                                uint64_t Offset,
-                                const void * Buffer,
-                                size_t BufferSize,
-                                size_t * NumWrit,
-                                struct timeout_t * Tm
-                                );
-#endif /* MINOR_2_JOJOBA */
-
-static struct KFile_vt_v1 _svtGapFile = {
-                                1,  /* maj */
-                                1,  /* min */
-
-                            /* start minor version == 0 */
-                                _GapFile_destroy,
-                                _GapFile_get_sysfile,
-                                _GapFile_random_access,
-                                _GapFile_get_size,
-                                _GapFile_set_size,
-                                _GapFile_read,
-                                _GapFile_write,
-                            /* end minor version == 0 */
-
-                            /* start minor version == 1 */
-                                _GapFile_get_type,
-                            /* end minor version == 1 */
-
-#ifdef MINOR_2_JOJOBA
-                            /* start minor version == 2 */
-                                _GapFile_timed_read,
-                                _GapFile_timed_write,
-                            /* end minor version == 2 */
-#endif /* MINOR_2_JOJOBA */
-};
-
-/*))
- || _GapFile constructor
-((*/
-static
-rc_t CC
-_GapFileMake (
-            const struct KFile ** File,
-            const struct KFile * LooneyBin,
-            struct _GapFilePeer * Peer
-)
-{
-    rc_t RCt;
-    struct _GapFile * GapFile;
-
-    RCt = 0;
-    GapFile = NULL;
-
-    XFS_CSAN ( File )
-    XFS_CAN ( File )
-    XFS_CAN ( LooneyBin )
-    XFS_CAN ( Peer )
-
-        /*  First we should check if Peer is good and valid 
-         */
-    if ( ! _GapFilePeerGood ( Peer ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    GapFile = calloc ( 1, sizeof ( struct _GapFile ) );
-    if ( GapFile == NULL ) {
-        RCt = XFS_RC ( rcNull );
-    }
-    else {
-        RCt = KFileInit (
-                & ( GapFile -> file ),
-                ( const KFile_vt * ) & _svtGapFile,
-                "GapFile",
-                "GapFile",
-                true,
-                false
-                );
-        if ( RCt == 0 ) {
-            RCt = _GapFilePeerAddRef ( Peer );
-            if ( RCt == 0 ) {
-                GapFile -> peer = Peer;
-                GapFile -> looney_bin = LooneyBin;
-
-                * File = ( const KFile * ) & ( GapFile -> file );
-
-                Peer -> file = * File;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * File = NULL;
-        KFileRelease ( & ( GapFile -> file ) );
-    }
-
-    return RCt;
-}   /* _GapFileMake () */
-
-/*))
- || _GapFile virtual table implementation
-((*/
-rc_t CC
-_GapFile_destroy ( struct KFile * self )
-{
-    struct _GapFile * File;
-    struct _GapFilePeer * Peer;
-
-    Peer = NULL;
-    File = ( struct _GapFile * ) self;
-
-    if ( File != NULL ) {
-
-        Peer = File -> peer;
-        if ( Peer != NULL ) {
-            KLockAcquire ( Peer -> mutabor );
-
-            File -> peer = NULL;
-
-
-            if ( Peer -> file == & ( File -> file ) ) {
-                Peer -> file = NULL;
-            }
-
-            KLockUnlock ( Peer -> mutabor );
-
-            _GapFilePeerRelease ( Peer );
-        }
-
-        if ( File -> looney_bin != NULL ) {
-            KFileRelease ( File -> looney_bin );
-            File -> looney_bin = NULL;
-        }
-
-        free ( File );
-    }
-
-    return 0;
-}   /* _GapFile_destroy () */
-
-struct KSysFile_v1 * CC
-_GapFile_get_sysfile ( const struct KFile * self, uint64_t * Offset )
-{
-    struct _GapFile * File = ( struct _GapFile * ) self;
-
-    if ( File != NULL ) {
-        if ( File -> looney_bin != NULL ) {
-            return KFileGetSysFile ( File -> looney_bin, Offset );
-        }
-    }
-
-    return NULL;
-}   /* _GapFile_get_sysfile () */
-
-rc_t CC
-_GapFile_random_access ( const struct KFile * self )
-{
-    struct _GapFile * File = ( struct _GapFile * ) self;
-
-    XFS_CAN ( File )
-    XFS_CAN ( File -> looney_bin )
-
-    return KFileRandomAccess ( File -> looney_bin );
-}   /* _GapFile_random_access () */
-
-rc_t CC
-_GapFile_get_size ( const struct KFile * self, uint64_t * Size )
-{
-    rc_t RCt;
-    struct _GapFile * File;
-
-    RCt = 0;
-    File = ( struct _GapFile * ) self;
-
-    XFS_CSA ( Size, 0 )
-    XFS_CAN ( File )
-    XFS_CAN ( Size )
-    XFS_CAN ( File -> looney_bin )
-
-    RCt = _GapFileLockPeer ( File );
-    if ( RCt == 0 ) {
-        RCt = KFileSize ( File -> looney_bin, Size );
-
-        _GapFileUnlockPeer ( File );
-    }
-
-    return RCt;
-}   /* _GapFile_get_size () */
-
-rc_t CC
-_GapFile_set_size ( struct KFile * self, uint64_t Size )
-{
-    XFS_CAN ( self )
-
-    return RC (rcFS, rcDirectory, rcUpdating, rcSelf, rcUnsupported);
-}   /* _GapFile_set_size () */
-
-rc_t CC
-_GapFile_read (
-                const struct KFile * self,
-                uint64_t Offset,
-                void * Buffer,
-                size_t BufferSize,
-                size_t * NumRead
-)
-{
-    rc_t RCt;
-    struct _GapFile * File;
-
-    RCt = 0;
-    File = ( struct _GapFile * ) self;
-
-    XFS_CSA ( NumRead, 0 )
-    XFS_CAN ( File )
-    XFS_CAN ( Buffer )
-    XFS_CAN ( NumRead )
-    XFS_CAN ( File -> looney_bin )
-
-    RCt = _GapFileLockPeer ( File );
-    if ( RCt == 0 ) {
-        RCt = KFileReadAll (
-                        File -> looney_bin,
-                        Offset,
-                        Buffer,
-                        BufferSize,
-                        NumRead
-                        );
-
-        _GapFileUnlockPeer ( File );
-    }
-
-    return RCt;
-}   /* _GapFile_read () */
-
-rc_t CC
-_GapFile_write (
-                struct KFile * self,
-                uint64_t Offset,
-                const void * Buffer,
-                size_t BufferSize,
-                size_t * NumWrite
-)
-{
-    XFS_CSA ( NumWrite, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Buffer )
-    XFS_CAN ( NumWrite )
-
-    return RC (rcFS, rcDirectory, rcUpdating, rcSelf, rcUnsupported);
-}   /* _GapFile_write () */
-
-uint32_t CC
-_GapFile_get_type ( const struct KFile * self )
-{
-    struct _GapFile * File = ( struct _GapFile * ) self;
-    return KFileType ( File -> looney_bin );
-}   /* _GapFile_get_type () */
-
-
-#ifdef MINOR_2_JOJOBA
-rc_t CC
-_GapFile_timed_read (
-                const struct KFile * self,
-                uint64_t Offset,
-                void * Buffer,
-                size_t BufferSize,
-                size_t * NumRead,
-                struct timeout_t * Tm
-)
-{
-    rc_t RCt;
-    struct _GapFile * File;
-
-    RCt = 0;
-    File = ( struct _GapFile * ) self;
-
-    XFS_CSA ( NumRead, 0 )
-    XFS_CAN ( File )
-    XFS_CAN ( Buffer )
-    XFS_CAN ( NumRead )
-    XFS_CAN ( File -> looney_bin )
-
-    RCt = _GapFileLockPeer ( File );
-    if ( RCt == 0 ) {
-        KFileTimedRead (
-                        File,
-                        Offset,
-                        Buffer,
-                        BufferSize,
-                        NumRead,
-                        Tm
-                        );
-
-        _GapFileUnlockPeer ( File );
-    }
-
-    return RCt;
-}   /* _GapFile_timed_read () */
-
-rc_t CC
-_GapFile_timed_write (
-                struct KFile * self,
-                uint64_t Offset,
-                const void * Buffer,
-                size_t BufferSize,
-                size_t * NumWrite,
-                struct timeout_t * Tm
-)
-{
-    XFS_CSA ( NumWrite, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Buffer )
-    XFS_CAN ( NumWrite )
-    
-    return RC (rcFS, rcDirectory, rcUpdating, rcSelf, rcUnsupported);
-}   /* _GapFile_timed_write () */
-
-#endif /* MINOR_2_JOJOBA */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* _GapFilePeerOpen                                                  */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static
-rc_t CC
-_CheckMakeParentDir ( struct KDirectory * Directory, const char * Path )
-{
-    rc_t RCt;
-    const struct XFSPath * xPath;
-    const struct XFSPath * xParent;
-    const char * Parent;
-    uint32_t PathType;
-
-    RCt = 0;
-    xPath = NULL;
-    xParent = NULL;
-    Parent = NULL;
-    PathType = kptNotFound;
-
-    XFS_CAN ( Directory )
-    XFS_CAN ( Path )
-
-    RCt = XFSPathMake ( & xPath, false, Path );
-    if ( RCt == 0 ) {
-        RCt = XFSPathParent ( xPath, & xParent );
-        if ( RCt == 0 ) {
-            Parent = XFSPathGet ( xParent );
-
-            PathType = KDirectoryPathType ( Directory, Parent );
-            if ( PathType == kptNotFound ) {
-                RCt = KDirectoryCreateDir (
-                                        Directory,
-                                        XFSPermRWDefContNum (),
-                                        kcmCreate,
-                                        Parent
-                                        );
-            }
-            else {
-                if ( PathType != kptDir ) {
-                    RCt = XFS_RC ( rcInvalid );
-                }
-            }
-
-            XFSPathRelease ( xParent );
-        }
-
-        XFSPathRelease ( xPath );
-    }
-
-    return RCt;
-}   /* _CheckMakeParentDir () */
-
-static
-rc_t CC
-_Take_Burro_From_Pen (
-                    const struct KFile ** File,
-                    const char * Url,
-                    bool Cached
-)
-{
-    rc_t RCt;
-    struct _GapFiles * Files;
-    const struct XFSBurro * Burro;
-
-    RCt = 0;
-    Files = _FilesGet ();
-    Burro = NULL;
-
-    RCt = XFSPenGet ( Files -> pen, & Burro, Url );
-    if ( RCt == 0 ) {
-        if ( ! XFSBurroGood ( Burro ) ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-            RCt = Cached
-                        ? XFSBurroCachedFile ( Burro, File )
-                        : XFSBurroRecachedFile ( Burro, File )
-                        ;
-        }
-
-        XFSBurroRelease ( Burro );
-    }
-
-    return RCt;
-}   /* _Take_Burro_From_Pen_ () */
-
-static
-rc_t CC
-_Open_File_1 ( struct _GapFilePeer * self, const struct KFile ** File )
-{
-    rc_t RCt;
-    uint32_t PathType;
-    struct KDirectory * NatDir;
-    const struct KFile * File_1;
-    const struct KFile * File_2;
-
-    RCt = 0;
-    PathType = kptNotFound;
-    NatDir = NULL;
-    File_1 = NULL;
-    File_2 = NULL;
-
-    XFS_CSAN ( File )
-    XFS_CAN ( self )
-    XFS_CAN ( File )
-
-    if ( ! _GapFilePeerGood ( self ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KDirectoryNativeDir ( & NatDir );
-    if ( RCt == 0 ) {
-            /*  First we should check if file is complete
-             */
-        if ( self -> status == kxfsReady ) {
-                /*  First we should check if cached file exists
-                 *  Open and return it
-                 */
-            PathType = KDirectoryPathType ( NatDir, self -> cache_path );
-            if ( PathType == kptNotFound ) {
-                    /*  Second, we should create parent directory if
-                     *  it does not exists
-                     */
-                RCt = _CheckMakeParentDir ( NatDir, self -> cache_path );
-                if ( RCt == 0 ) {
-                    /*  KNS File first
-                     */
-#ifdef _USE_CACHED_CONN_
-                    RCt = _Take_Burro_From_Pen (
-                                                & File_1,
-                                                self -> remote_url,
-                                                true
-                                                );
-#else /* _USE_CACHED_CONN_ */
-                    RCt = KNSManagerMakeHttpFile (
-                                                XFS_KnsManager (),
-                                                & File_1,
-                                                NULL,
-                                                0x01010000,
-                                                self -> remote_url
-                                                );
-#endif /* _USE_CACHED_CONN_ */
-
-                    if ( RCt == 0 ) {
-                        RCt = KDirectoryMakeCacheTee (
-                                            NatDir,
-                                            & File_2,
-                                            File_1,
-                                            32768 * 4, /* Buffer size */
-                                            self -> cache_path
-                                            );
-                        KFileRelease ( File_1 );
-                    }
-                }
-            }
-            else {
-                if ( PathType == kptFile ) {
-                    self -> status = kxfsComplete;
-                }
-                else {
-                    RCt = XFS_RC ( rcInvalid );
-                }
-            }
-
-        }
-
-        if ( self -> status == kxfsComplete ) {
-            RCt = KDirectoryOpenFileRead (
-                                        NatDir,
-                                        & File_2,
-                                        self -> cache_path
-                                        );
-        }
-
-        KDirectoryRelease ( NatDir );
-    }
-
-    if ( RCt == 0 ) {
-            /* We suppose that all files from dbGaP has non ZERO size
-             * and that size does not change with time
-             */
-        if ( self -> size == 0 ) { 
-            RCt = KFileSize ( File_2, & ( self -> size ) );
-        }
-        if ( RCt == 0 ) {
-            * File = File_2;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * File = NULL;
-
-        self -> status = kxfsBroken;
-        self -> enc_type = kxfsEncBroken;
-        self -> size = 0;
-    }
-
-    return RCt;
-}   /* _Open_File_1 () */
-
-static
-rc_t CC
-_CheckEncType ( struct _GapFilePeer * self, const struct KFile * File )
-{
-    rc_t RCt;
-    char BF [ XFS_SIZE_128 ];
-    size_t NumRead;
-
-    RCt = 0;
-    NumRead = 0;
-
-    XFS_CAN ( self )
-    XFS_CAN ( File )
-
-    switch ( self -> enc_type ) {
-        case kxfsEncInvalid :
-        case kxfsEncBroken :
-                return XFS_RC ( rcInvalid );
-
-        case kxfsEncNone :
-        case kxfsEncEncFile :
-        case kxfsEncSraFile :
-        case kxfsEncWGAFile :
-                return 0;
-
-        case kxfsEncReady :
-                break;
-
-        default :
-                return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KFileReadAll ( File, 0, BF, sizeof ( BF ), & NumRead );
-    if ( RCt != 0 ) {
-        self -> enc_type = kxfsEncBroken;
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KFileIsEnc ( BF, NumRead );
-    if ( RCt == 0 ) {
-        self -> enc_type = KFileIsSraEnc ( BF, NumRead ) == 0
-                                                    ? kxfsEncSraFile
-                                                    : kxfsEncEncFile
-                                                    ;
-
-    }
-    else {
-        self -> enc_type = KFileIsWGAEnc ( BF, NumRead ) == 0
-                                                    ? kxfsEncWGAFile
-                                                    : kxfsEncNone
-                                                    ;
-    }
-
-    return 0;
-}   /* _CheckEncType () */
-
-static
-rc_t CC
-_Open_File_2 (
-            struct _GapFilePeer * self,
-            const struct KFile ** DecFile,
-            const struct KFile * EncFile
-)
-{
-    rc_t RCt;
-    const struct KFile * File_2;
-    const struct XFSGapProject * Project;
-    const struct KKey * Key;
-    const char * Password;
-    size_t PasswordSize;
-
-    RCt = 0;
-    File_2 = NULL;
-    Project = NULL;
-    Key = NULL;
-    Password = NULL;
-    PasswordSize = 0;
-
-    XFS_CSAN ( DecFile )
-    XFS_CAN ( self )
-    XFS_CAN ( DecFile )
-    XFS_CAN ( EncFile )
-
-    if ( ! _GapFilePeerGood ( self ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    switch ( self -> enc_type ) {
-        case kxfsEncNone :
-            RCt = KFileAddRef ( EncFile );
-            if ( RCt == 0 ) {
-                File_2 = EncFile;
-            }
-            break;
-
-        case kxfsEncEncFile :
-            RCt = XFSGapFindOrCreate ( self -> project_id, & Project );
-            if ( RCt == 0 ) {
-                RCt = XFSGapProjectEncriptionKey ( Project, & Key );
-                if ( RCt == 0 ) {
-                    RCt = KEncFileMakeRead ( & File_2, EncFile, Key );
-                }
-
-                XFSGapProjectRelease ( Project );
-            }
-            break;
-
-        case kxfsEncSraFile :
-                /* Really I do not know what to do here
-                 */
-            RCt = KFileAddRef ( EncFile );
-            if ( RCt == 0 ) {
-                File_2 = EncFile;
-            }
-            break;
-
-        case kxfsEncWGAFile :
-            RCt = XFSGapFindOrCreate ( self -> project_id, & Project );
-            if ( RCt == 0 ) {
-                RCt = XFSGapProjectPassword (
-                                            Project,
-                                            & Password,
-                                            & PasswordSize
-                                            );
-                if ( RCt == 0 ) {
-                    RCt = KFileMakeWGAEncRead (
-                                            & File_2,
-                                            EncFile,
-                                            Password,
-                                            PasswordSize
-                                            );
-                }
-
-                XFSGapProjectRelease ( Project );
-            }
-            break;
-
-        default :
-            RCt = XFS_RC ( rcInvalid );
-            break;
-    }
-
-    if ( RCt == 0 ) {
-        * DecFile = File_2;
-    }
-    else {
-        * DecFile = NULL;
-
-        if ( File_2 != NULL ) {
-            KFileRelease ( File_2 );
-        }
-    }
-
-    return RCt;
-}   /* _Open_File_2 () */
-
-/*))
-  ||    This method, will return file opened for read.
-  ||    Unsynchronized. Uses Peer as input, but also
-  ||    modifies Peer's fields too
-  ((*/
-static
-rc_t CC
-_GapFilePeerOpen_NoLock (
-                    struct _GapFilePeer * self,
-                    const struct KFile ** File
-)
-{
-    rc_t RCt;
-    const struct KFile * File_1;
-    const struct KFile * File_2;
-    const struct KFile * File_3;
-
-    RCt = 0;
-    File_1 = NULL;
-    File_2 = NULL;
-    File_3 = NULL;
-
-    XFS_CSAN ( File )
-    XFS_CAN ( self )
-    XFS_CAN ( File )
-
-        /*  The peer is invalid : something went wrong
-         */
-    if ( ! _GapFilePeerGood ( self ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-        /*  We do have open file already
-         */
-    File_1 = self -> file;
-    if ( File_1 != NULL ) {
-        RCt = KFileAddRef ( File_1 );
-        if ( RCt == 0 ) {
-            * File = File_1;
-        }
-        return RCt;
-    }
-
-        /*  Three stage process
-         *
-         *  First we shoud open Http and Tee files or just open file
-         *  if it is completed
-         *
-         *  Check type of file ( NoEnc, Enc, SRA/WGA )
-         *
-         *  Opening Encoded file
-         *
-         */
-    RCt = _Open_File_1 ( self, & File_1 );
-    if ( RCt == 0 ) {
-            /* Checking Encoding type */
-        RCt = _CheckEncType ( self, File_1 );
-        if ( RCt == 0 ) {
-            RCt = _Open_File_2 ( self, & File_2, File_1 );
-            if ( RCt == 0 ) {
-                    /* So, if file already dowloaded and it is not
-                     * encoded, we may just return file withou
-                     * modifying the peer
-                     */
-                if ( self -> status == kxfsComplete
-                    && self -> enc_type == kxfsEncNone
-                ) {
-                    * File = File_2;
-                }
-                else {
-                    RCt = _GapFileMake ( & File_3, File_2, self );
-                    if ( RCt == 0 ) {
-                        * File = File_3;
-                    }
-                }
-            }
-        }
-
-        KFileRelease ( File_1 );
-    }
-
-    if ( RCt != 0 ) {
-        * File = NULL;
-
-        if ( File_2 != NULL ) {
-            KFileRelease ( File_2 );
-        }
-
-        if ( File_3 != NULL ) {
-            KFileRelease ( File_3 );
-        }
-    }
-
-    return RCt;
-}   /* _GapFilePeerOpen_NoLock () */
-
-rc_t CC
-_GapFilePeerOpen (
-                struct _GapFilePeer * self,
-                const struct KFile ** File
-)
-{
-    rc_t RCt;
-    const struct KFile * TheFile;
-
-    RCt = 0;
-    TheFile = NULL;
-
-    XFS_CSAN ( File )
-    XFS_CAN ( self )
-    XFS_CAN ( File )
-
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _GapFilePeerOpen_NoLock ( self, & TheFile );
-        if ( RCt == 0 ) {
-            * File = TheFile;
-        }
-
-        KLockUnlock ( self -> mutabor );
-    }
-
-    if ( RCt != 0 ) {
-        * File = NULL;
-
-        if ( TheFile != NULL ) {
-            KFileRelease ( TheFile );
-        }
-    }
-
-    return RCt;
-}   /* _GapFilePeerOpen () */
diff --git a/libs/xfs/xgapf.h b/libs/xfs/xgapf.h
deleted file mode 100644
index 3b9398b..0000000
--- a/libs/xfs/xgapf.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _xgapf_h_
-#define _xgapf_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   There is some primitives which allow to access dbGaP files
-  ))))  
- ((((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
- * LYRICS:
- *
- * That file contains set of structures which will implement FUSE/DOKAN
- * access to dbGaP data files.
- * 
- * PRIMITEVES:
- *
- * XFSGapFiles - use this structure to access dbGaP data files
- *
- *_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- //     Forwards
-((*/
-struct XFSGapFiles;
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- //     XFSGapFiles
-((*/
-
-    /* These should be called before/after using this interface
-     */
-XFS_EXTERN rc_t CC XFSGapFilesInit ();
-XFS_EXTERN rc_t CC XFSGapFilesDipose ();
-
-/*))
- //     Opening only for reading
-((*/
-XFS_EXTERN rc_t CC XFSGapFilesOpenAccession (
-                            const struct KFile ** File,
-                            uint32_t ProjectId,
-                            const char * Accession
-                            );
-
-XFS_EXTERN rc_t CC XFSGapFilesOpenObjectId (
-                            const struct KFile ** File,
-                            uint32_t ProjectId,
-                            uint32_t ObjectId
-                            );
-
-/*))
- //     Attributes if possible
-((*/
-XFS_EXTERN rc_t CC XFSGapFilesAccessionSize (
-                            uint64_t * Size,
-                            uint32_t ProjectId,
-                            const char * Accession
-                            );
-
-XFS_EXTERN rc_t CC XFSGapFilesAccessionDate (
-                            KTime_t * Time,
-                            uint32_t ProjectId,
-                            const char * Accession
-                            );
-
-XFS_EXTERN rc_t CC XFSGapFilesObjectIdSize (
-                            uint64_t * Size,
-                            uint32_t ProjectId,
-                            uint32_t ObjectId
-                            );
-
-XFS_EXTERN rc_t CC XFSGapFilesObjectIdDate (
-                            KTime_t * Time,
-                            uint32_t ProjectId,
-                            uint32_t ObjectId
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*))
- //     XFSGapKart_Temp
-((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _xgapf_h_ */
diff --git a/libs/xfs/xgapk.c b/libs/xfs/xgapk.c
deleted file mode 100644
index 3dbd095..0000000
--- a/libs/xfs/xgapk.c
+++ /dev/null
@@ -1,1777 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/container.h>
-#include <klib/namelist.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-
-#include <kproc/lock.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-
-#include <kfg/kart.h>
-
-#include "schwarzschraube.h"
-#include "xgap.h"
-#include "xgapk.h"
-#include "zehr.h"
-
-#include <sysalloc.h>
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)) XFSGapKart and XFSGapKartItem structs are living here
- ((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* XFSGapKartItem ...                                                */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct XFSGapKartItem {
-    BSTNode node;
-    KRefcount refcount;
-
-    uint32_t project_id;
-    uint32_t object_id;
-
-    const char * accession;
-    const char * name;
-    const char * description;
-};
-
-static const char * _sXFSGapKartItem_classname = "XFSGapKartItem";
-
-static
-rc_t CC
-_KartItemDispose ( struct XFSGapKartItem * self )
-{
-    if ( self != NULL ) {
-        KRefcountWhack (
-                    & ( self -> refcount ),
-                    _sXFSGapKartItem_classname
-                    ); 
-        self -> project_id = 0;
-        self -> object_id = 0;
-
-        if ( self -> accession != NULL ) {
-            free ( ( char * ) self -> accession ) ;
-            self -> accession = NULL;
-        }
-        if ( self -> name != NULL ) {
-            free ( ( char * ) self -> name ) ;
-            self -> name = NULL;
-        }
-        if ( self -> description != NULL ) {
-            free ( ( char * ) self -> description ) ;
-            self -> description = NULL;
-        }
-
-        free ( self );
-    }
-
-    return 0;
-}   /* _KartItemDispose () */
-
-static
-rc_t CC
-_KartItemMake (
-            struct XFSGapKartItem ** RetItem,
-            const struct KartItem * Item
-)
-{
-    rc_t RCt;
-    const struct String * TheString;
-    struct XFSGapKartItem * xItem;
-    uint64_t ProjectId, ObjectId;
-
-    RCt = 0;
-    TheString = NULL;
-    xItem = NULL;
-    ProjectId = ObjectId = 0;
-
-    XFS_CSAN ( RetItem )
-    XFS_CAN ( RetItem )
-    XFS_CAN ( Item )
-
-    xItem = calloc ( 1, sizeof ( struct XFSGapKartItem ) );
-    if ( xItem == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    KRefcountInit (
-                & ( xItem -> refcount ),
-                1,
-                _sXFSGapKartItem_classname,
-                "_KartItemMake",
-                "KartItem"
-                );
-
-    RCt = KartItemProjIdNumber ( Item, & ProjectId );
-    if ( RCt == 0 ) {
-        xItem -> project_id = ( uint32_t ) ProjectId;
-    }
-
-    if ( RCt == 0 ) {
-        RCt = KartItemItemId ( Item, & TheString );
-        if ( RCt == 0 && TheString -> len != 0 ) {
-            RCt = KartItemItemIdNumber ( Item, & ObjectId );
-            if ( RCt == 0 ) {
-                xItem -> object_id = ( uint32_t ) ObjectId;
-            }
-        }
-        else {
-            xItem -> object_id = 0;
-        }
-    }
-
-    if ( RCt == 0 ) {
-        RCt = KartItemAccession ( Item, & TheString );
-        if ( RCt == 0 && TheString -> len != 0 ) {
-            RCt = XFS_SStrDup ( TheString, & xItem -> accession );
-        }
-        else {
-            xItem -> accession = NULL;
-        }
-    }
-
-    if ( RCt == 0 ) {
-        RCt = KartItemName ( Item, & TheString );
-        if ( RCt == 0 && TheString -> len != 0 ) {
-            RCt = XFS_SStrDup ( TheString, & xItem -> name );
-        }
-        else {
-            xItem -> name = NULL;
-        }
-    }
-
-    if ( RCt == 0 ) {
-        RCt = KartItemItemDesc ( Item, & TheString );
-        if ( RCt == 0 && TheString -> len != 0 ) {
-            RCt = XFS_SStrDup ( TheString, & xItem -> description );
-        }
-        else {
-            xItem -> description = NULL;
-        }
-    }
-
-    if ( xItem -> object_id == 0 && xItem -> accession == NULL ) {
-        RCt = XFS_RC ( rcInvalid );
-    }
-
-    if ( RCt == 0 ) {
-        * RetItem = xItem;
-    }
-    else {
-        if ( xItem != NULL ) {
-            _KartItemDispose ( xItem );
-        }
-    }
-
-    return RCt;
-}   /* _KartItemMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartItemAddRef ( const struct XFSGapKartItem * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    XFS_CAN ( self )
-
-    switch ( KRefcountAdd ( & ( self -> refcount ), _sXFSGapKartItem_classname ) ) {
-        case krefOkay :
-                    RCt = 0;
-                    break;
-        case krefZero :
-        case krefLimit :
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSGapKartItemAddRef () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartItemRelease ( const struct XFSGapKartItem * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    XFS_CAN ( self )
-
-    switch ( KRefcountDrop ( & ( self -> refcount ), _sXFSGapKartItem_classname ) ) {
-
-        case krefOkay :
-        case krefZero :
-                    RCt = 0;
-                    break;
-        case krefWhack :
-                    RCt = _KartItemDispose ( ( struct XFSGapKartItem * ) self );
-                    break;
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSGapKartItemRelease () */
-
-LIB_EXPORT
-uint32_t CC
-XFSGapKartItemProjectId ( const struct XFSGapKartItem * self )
-{
-    return self == NULL ? 0 : self -> project_id;
-}   /* XFSGapKartItemProjectId () */
-
-LIB_EXPORT
-uint32_t CC
-XFSGapKartItemObjectId ( const struct XFSGapKartItem * self )
-{
-    return self == NULL ? 0 : self -> object_id;
-}   /* XFSGapKartItemObjectId () */
-
-LIB_EXPORT
-const char * CC
-XFSGapKartItemAccession ( const struct XFSGapKartItem * self )
-{
-    return self == NULL ? NULL : ( self -> accession );
-}   /* XFSGapKartItemAccession () */
-
-LIB_EXPORT
-const char * CC
-XFSGapKartItemName ( const struct XFSGapKartItem * self )
-{
-    return self == NULL ? NULL : ( self -> name );
-}   /* XFSGapKartItemName () */
-
-LIB_EXPORT
-const char * CC
-XFSGapKartItemDescription ( const struct XFSGapKartItem * self )
-{
-    return self == NULL ? NULL : ( self -> description );
-}   /* XFSGapKartItemDescription () */
-
-LIB_EXPORT
-const char * CC
-XFSGapKartItemDisplayName ( const struct XFSGapKartItem * self )
-{
-    if ( self != NULL ) {
-        return self -> accession == NULL
-                                    ? self -> name
-                                    : self -> accession
-                                    ;
-    }
-    return NULL;
-}   /* XFSGapKartItemProject () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))))
- ((((   This is very stupid and under developed structure, which
-  ))))  is very un-effictive.
- ((((   Kart could contain items, which belong to different
-  ))))  projects. I need fast way to check if cart contains items
- ((((   which belong to some particular project.
-  ))))  Good thing, Kart could contain items for not more than two
- ((((   or three projects so, we could use bubble search.
-  ))))  There is structure _LaIn ( LAme INdex )
- ((((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* _LaIn                                                           */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct _LaIn {
-    uint32_t q;     /* items qty */
-    uint32_t c;     /* array capasity */
-    uint32_t * a;   /* array */
-};
-
-static
-rc_t CC
-_LaInMake ( const struct _LaIn ** LaIn )
-{
-    struct _LaIn * Ret = NULL;
-
-    XFS_CSAN ( LaIn )
-    XFS_CAN ( LaIn )
-
-    Ret = calloc ( 1, sizeof ( struct _LaIn ) );
-    if ( Ret == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    * LaIn = Ret;
-
-    return 0;
-}   /* _LaInMake () */
-
-static
-rc_t CC
-_LaInDispose ( const struct _LaIn * self )
-{
-    struct _LaIn * LaIn = ( struct _LaIn * ) self;
-
-    if ( LaIn != NULL ) {
-        if ( LaIn -> a != NULL ) {
-            free ( LaIn -> a );
-            LaIn -> a = NULL;
-        }
-
-        LaIn -> q = 0;
-        LaIn -> c = 0;
-
-        free ( LaIn );
-    }
-
-    return 0;
-}   /* _LaInDispose () */
-
-static
-rc_t CC
-_LaInRealloc ( struct _LaIn * self, uint32_t Qty )
-{
-    rc_t RCt;
-    uint32_t * NewA;
-    uint32_t NewC;
-
-#define POPOTAN 4
-
-    RCt = 0;
-    NewA = NULL;
-    NewC = 0;
-
-    XFS_CAN ( self )
-
-    if ( Qty < self -> c ) {
-        return 0;
-    }
-
-    NewC = ( Qty / POPOTAN + 1 ) * POPOTAN;
-
-    NewA = malloc ( sizeof ( uint32_t ) * NewC );
-    if ( NewA == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    if ( self -> a != NULL ) {
-        if ( self -> q != 0 ) {
-            memcpy ( NewA, self -> a, sizeof ( uint32_t ) * self -> q );
-        }
-
-        free ( self -> a );
-    }
-
-    self -> a = NewA;
-    self -> c = NewC;
-
-#undef POPOTAN
-
-    return RCt;
-}   /* _LaInRealloc () */
-
-static
-bool CC
-_LaInHas ( const struct _LaIn * self, uint32_t Value )
-{
-    uint32_t llp = 0;
-
-    if ( self != NULL ) {
-        for ( llp = 0; llp < self -> q; llp ++ ) {
-            if ( Value == * ( self -> a + llp ) ) {
-                return true;
-            }
-        }
-    }
-
-    return false;
-}   /* _LaInHas () */
-
-static
-rc_t CC
-_LaInAdd ( const struct _LaIn * self, uint32_t Value )
-{
-    rc_t RCt;
-    struct _LaIn * LaIn;
-
-    RCt = 0;
-    LaIn = ( struct _LaIn * ) self;
-
-    XFS_CAN ( LaIn )
-
-    if ( ! _LaInHas ( LaIn, Value ) ) {
-            
-        RCt = _LaInRealloc ( LaIn, LaIn -> q + 1 );
-        if ( RCt == 0 ) {
-
-            LaIn -> a [ LaIn -> q ] = Value;
-            LaIn -> q ++;
-        }
-    }
-
-    return RCt;
-}   /* _LaInAdd () */
-
-#ifdef JOJOBA
-/*))  Unnecessary in real life
- ((*/
-static
-rc_t CC
-_LaInQty ( const struct _LaIn * self, uint32_t * Qty )
-{
-    XFS_CSA ( Qty, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Qty )
-
-    * Qty = self -> q;
-
-    return 0;
-}   /* _LaInQty () */
-
-/*))  Unnecessary in real life
- ((*/
-static
-rc_t CC
-_LaInGet (
-            const struct _LaIn * self,
-            uint32_t Index,
-            uint32_t * Value
-)
-{
-    XFS_CSA ( Value, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Value )
-
-    if ( Index < self -> q ) {
-        * Value = self -> a [ Index ];
-        return 0;
-    }
-
-    return XFS_RC ( rcInvalid );
-}   /* _LaInGet () */
-#endif /* JOJOBA */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* XFSGapKart ...                                                    */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct XFSGapKart {
-    BSTNode node;
-
-    BSTree tree;
-    KRefcount refcount;
-
-    const char * path;
-    const char * name;
-
-    const struct _LaIn * lain;
-};
-
-static const char * _sXFSGapKart_classname = "XFSGapKart";
-
-static rc_t CC _GapKartLoad ( struct XFSGapKart * self );
-
-static
-rc_t CC
-_KartPath (
-            const char * KartPath,
-            const char * KartName,
-            char * Buffer,
-            size_t BufferSize
-)
-{
-    rc_t RCt;
-    size_t NumW;
-
-    RCt = 0;
-    NumW = 0;
-
-    XFS_CAN ( KartPath )
-    XFS_CAN ( KartName )
-    XFS_CAN ( Buffer )
-
-    RCt = string_printf (
-                        Buffer,
-                        BufferSize,
-                        & NumW,
-                        "%s/%s",
-                        KartPath,
-                        KartName
-                        );
-    if ( RCt != 0 ) {
-        * Buffer = 0;
-    }
-
-    return RCt;
-}   /* _KartPath () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartMake (
-                const struct XFSGapKart ** Kart,
-                const char * Path,
-                const char * Name
-)
-{
-    rc_t RCt;
-    struct XFSGapKart * RetKart;
-
-    RCt = 0;
-    RetKart = NULL;
-
-    XFS_CSAN ( Kart )
-    XFS_CAN ( Kart )
-    XFS_CAN ( Path )
-
-    RetKart = calloc ( 1, sizeof ( struct XFSGapKart ) );
-    if ( RetKart == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    BSTreeInit ( & ( RetKart -> tree ) );
-    KRefcountInit (
-                & ( RetKart -> refcount ),
-                1,
-                _sXFSGapKart_classname,
-                "XFSGapKartMake",
-                "Kart"
-                );
-
-    RCt = _LaInMake ( & ( RetKart -> lain ) );
-    if ( RCt == 0 ) {
-        RCt = XFS_StrDup ( Path, & ( RetKart -> path ) );
-        if ( RCt == 0 ) {
-            RCt = XFS_StrDup ( Name, & ( RetKart -> name ) );
-            if ( RCt == 0 ) {
-                RCt = _GapKartLoad ( RetKart );
-                if ( RCt == 0 ) {
-                    * Kart = RetKart;
-                }
-                else {
-                    XFSGapKartDispose ( RetKart );
-                }
-            }
-        }
-    }
-
-    return RCt;
-}   /* XFSGapKartMake () */
-
-static
-void CC
-_KartWhackCallback ( BSTNode * Node, void * unused )
-{
-    if ( Node != NULL ) {
-        XFSGapKartItemRelease ( ( struct XFSGapKartItem * ) Node );
-    }
-}   /* _KartWhackCallback () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartDispose ( const struct XFSGapKart * self )
-{
-    struct XFSGapKart * Kart = ( struct XFSGapKart * ) self;
-
-    if ( Kart != NULL ) {
-        if ( Kart -> lain != NULL ) {
-            _LaInDispose ( Kart -> lain );
-            Kart -> lain = NULL;
-        }
-
-        if ( Kart -> name != NULL ) {
-            free ( ( char * ) Kart -> name );
-            Kart -> name = NULL;
-        }
-
-        if ( Kart -> path != NULL ) {
-            free ( ( char * ) Kart -> path );
-            Kart -> path = NULL;
-        }
-
-        BSTreeWhack ( & ( Kart -> tree ), _KartWhackCallback, NULL );
-        KRefcountWhack ( & ( Kart -> refcount ), _sXFSGapKart_classname );
-
-        free ( Kart );
-    }
-
-    return 0;
-}   /* XFSGapKartDispose () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartAddRef ( const struct XFSGapKart * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    XFS_CAN ( self )
-
-    switch ( KRefcountAdd ( & ( self -> refcount ), _sXFSGapKart_classname ) ) {
-        case krefOkay :
-                    RCt = 0;
-                    break;
-        case krefZero :
-        case krefLimit :
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSGapKartAddRef () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartRelease ( const struct XFSGapKart * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    XFS_CAN ( self )
-
-    switch ( KRefcountDrop ( & ( self -> refcount ), _sXFSGapKart_classname ) ) {
-
-        case krefOkay :
-        case krefZero :
-                    RCt = 0;
-                    break;
-        case krefWhack :
-                    RCt = XFSGapKartDispose ( ( struct XFSGapKart * ) self );
-                    break;
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSGapKartRelease () */
-
-static
-int64_t CC
-_AddKartItemCallback ( const BSTNode * N1, const BSTNode * N2 )
-{
-    return XFS_StringCompare4BST_ZHR (
-        XFSGapKartItemDisplayName ( ( struct XFSGapKartItem * ) N1 ),
-        XFSGapKartItemDisplayName ( ( struct XFSGapKartItem * ) N2 )
-        );
-}   /* _AddKartItemCallback () */
-
-static
-rc_t CC
-_AddKartItem ( struct XFSGapKart * self, const struct KartItem * Item )
-{
-    rc_t RCt;
-    struct XFSGapKartItem * xItem;
-
-    XFS_CAN ( self )
-    XFS_CAN ( Item )
-
-    RCt = _KartItemMake ( & xItem, Item );
-    if ( RCt == 0 ) {
-        RCt = _LaInAdd (
-                        self -> lain,
-                        XFSGapKartItemProjectId ( xItem )
-                        );
-        if ( RCt == 0 ) {
-            RCt = BSTreeInsert (
-                            & ( self -> tree ),
-                            & ( xItem -> node ),
-                            _AddKartItemCallback
-                            );
-        }
-    }
-
-    if ( RCt != 0 ) {
-        if ( xItem != NULL ) {
-            _KartItemDispose ( xItem );
-        }
-    }
-
-    return RCt;
-}   /* _AddKartItem () */
-
-rc_t CC
-_GapKartLoad ( struct XFSGapKart * self )
-{
-    rc_t RCt;
-    struct Kart * TheKart;
-    const struct KartItem * TheKartItem;
-    struct KDirectory * Directory;
-    bool IsKart;
-    char BF [ XFS_SIZE_1024 ];
-
-    RCt = 0;
-    TheKart = NULL;
-    IsKart = false;
-    Directory = NULL;
-    * BF = 0;
-
-    XFS_CAN ( self )
-    XFS_CAN ( self -> path )
-
-    RCt = _KartPath ( self -> path, self -> name , BF, sizeof ( BF ) );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryNativeDir ( & Directory );
-        if ( RCt == 0 ) {
-            RCt = KartMake ( Directory, BF, & TheKart, & IsKart );
-            if ( RCt == 0 ) {
-                if ( ! IsKart ) {
-                    RCt = XFS_RC ( rcInvalid );
-                }
-                else {
-                    while ( true ) {
-                        RCt = KartMakeNextItem (
-                                                TheKart,
-                                                & TheKartItem
-                                                );
-                        if ( RCt != 0 ) {   /* Error happened */
-                            break;
-                        }
-
-                        if ( TheKartItem == NULL ) { /* no more items */
-                            break;
-                        }
-
-                        RCt = _AddKartItem ( self, TheKartItem );
-
-                        KartItemRelease ( TheKartItem );
-
-                        if ( RCt != 0 ) {
-                            break;
-                        }
-                    }
-                }
-
-                if ( TheKart != NULL ) {
-                    KartRelease ( TheKart );
-                }
-            }
-
-            KDirectoryRelease ( Directory );
-        }
-    }
-
-    return RCt;
-}   /* _GapKartLoad () */
-
-struct _LollyPopp {
-    struct VNamelist * list;
-    uint32_t project_id;
-};
-
-static
-void
-_ListKartItemsCallback ( BSTNode * Node, void * Data )
-{
-    struct _LollyPopp * Popp;
-    struct XFSGapKartItem * Item;
-
-    Popp = ( struct _LollyPopp * ) Data;
-    Item = ( struct XFSGapKartItem * ) Node;
-
-    if ( Popp -> list != NULL && Item != NULL ) {
-        if ( Popp -> project_id == 0 || 
-            Popp -> project_id == XFSGapKartItemProjectId ( Item )
-        ) {
-            VNamelistAppend (
-                            Popp -> list,
-                            XFSGapKartItemDisplayName ( Item )
-                            );
-        }
-    }
-}   /* _ListKartItemsCallback () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartList (
-                const struct XFSGapKart * self,
-                struct KNamelist ** List,
-                uint32_t ProjectId
-)
-{
-    rc_t RCt;
-    struct VNamelist * xList;
-    struct _LollyPopp Popp;
-
-    RCt = 0;
-    xList = NULL;
-    Popp . list = NULL;
-    Popp . project_id = 0;
-
-    XFS_CSAN ( List )
-    XFS_CAN ( self )
-    XFS_CAN ( List )
-
-    RCt = VNamelistMake ( & xList, 16 /* ????? */ );
-    if ( RCt == 0 ) {
-        if ( XFSGapKartHasForProject ( self, ProjectId ) ) {
-            Popp . list = xList;
-            Popp . project_id = ProjectId;
-
-            BSTreeForEach (
-                        & ( self -> tree ),
-                        false,
-                        _ListKartItemsCallback,
-                        & Popp
-                        );
-        }
-
-        RCt = VNamelistToNamelist ( xList, List );
-
-        VNamelistRelease ( xList );
-    }
-
-    return RCt;
-}   /* XFSGapKartList () */
-
-static
-int64_t CC
-_KartItemCmp ( const void * Item, const BSTNode * Node )
-{
-    const char * Str1, * Str2;
-
-    Str1 = ( const char * ) Item;
-
-    Str2 = Node == NULL
-        ? NULL
-        : XFSGapKartItemDisplayName ( ( struct XFSGapKartItem * ) Node )
-        ;
-
-    if ( Str1 == NULL || Str2 == NULL ) {
-        if ( Str1 != NULL ) {
-            return 4096;
-        }
-
-        if ( Str2 != NULL ) {
-            return - 4096;
-        }
-
-        return 0;
-    }
-
-    return strcmp ( Str1, Str2 );
-}   /* _KartItemCmp () */
-
-LIB_EXPORT
-const struct XFSGapKartItem * CC
-XFSGapKartGet ( const struct XFSGapKart * self, const char * ItemName )
-{
-    const struct XFSGapKartItem * RetVal = NULL;
-
-    if ( self != NULL && ItemName != NULL ) {
-        RetVal = ( const struct XFSGapKartItem * ) BSTreeFind (
-                                                    & ( self -> tree ),
-                                                    ItemName,
-                                                    _KartItemCmp
-                                                    );
-    }
-
-    return RetVal;
-}   /* XFSGapKartGet () */
-
-LIB_EXPORT
-const char * CC
-XFSGapKartPath ( const struct XFSGapKart * self )
-{
-    return self == NULL ? NULL : ( self -> path );
-}   /* XFSGapKartPath () */
-
-LIB_EXPORT
-bool CC
-XFSGapKartHasForProject (
-                    const struct XFSGapKart * self,
-                    uint32_t ProjectId
-)
-{
-    if ( self != NULL ) {
-            /*  If ProjectId == 0 we should return everything
-             */
-        return ProjectId == 0
-                            ? true
-                            : _LaInHas ( self -> lain, ProjectId )
-                            ;
-    }
-
-    return false;
-}   /* XFSGapKartHasForProject () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* _Kartophoby ...                                                  */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-    /*  Because that object changes only on the creation time,
-     *  we should not use any mutexes, and it is thread safe
-     */
-struct _Kartophoby {
-    BSTree tree;
-    KRefcount refcount;
-
-    const char * path;
-    uint64_t version;
-};
-
-static const char * _sKartophoby_classname = "_Kartophoby";
-
-static
-void CC
-_KartophobyWhackCallback ( BSTNode * Node, void * unused )
-{
-    if ( Node != NULL ) {
-        XFSGapKartRelease ( ( struct XFSGapKart * ) Node );
-    }
-}   /* _KartophobyWhackCallback () */
-
-static
-rc_t CC
-_KartophobyDispose ( const struct _Kartophoby * self )
-{
-    struct _Kartophoby * Phob = ( struct _Kartophoby * ) self;
-
-    if ( Phob != NULL ) {
-        BSTreeWhack (
-                    & ( Phob -> tree ),
-                    _KartophobyWhackCallback,
-                    NULL
-                    );
-
-        KRefcountWhack (
-            & ( Phob -> refcount ),
-            _sKartophoby_classname
-            );
-
-        if ( Phob -> path != NULL ) {
-            free ( ( char * ) Phob -> path );
-            Phob -> path = NULL;
-        }
-
-        Phob -> version = 0;
-
-        free ( Phob );
-    }
-
-    return 0;
-}   /* _KartophobyDispose () */
-
-static rc_t CC _KartophobyReadVersion (
-                                    struct _Kartophoby * self,
-                                    struct KNamelist ** List,
-                                    const char * Path
-                                    );
-
-static rc_t CC _KartophobyAddKart (
-                                    struct _Kartophoby * Phoby,
-                                    const char * KartName,
-                                    const struct _Kartophoby * LoadFrom
-                                    );
-
-static rc_t CC _KartophobyGet (
-                                    const struct _Kartophoby * self,
-                                    const struct XFSGapKart ** Kart,
-                                    const char * KartName
-                                    );
-
-static
-rc_t CC
-_KartophobyMake (
-                const struct _Kartophoby ** Phoby,
-                const char * Path,
-                const struct _Kartophoby * MakeFrom /* Could be NULL */
-)
-{
-    rc_t RCt;
-    struct _Kartophoby * ThePhoby;
-    struct KNamelist * List;
-    uint32_t Count, llp;
-    const char * Name;
-
-    RCt = 0;
-    ThePhoby = NULL;
-    List = NULL;
-    Count = llp = 0;
-    Name = NULL;
-
-    XFS_CSAN ( Phoby )
-    XFS_CAN ( Phoby )
-    XFS_CAN ( Path )
-
-        /* Creating Phoby is quite tricky :D
-         */
-    ThePhoby = calloc ( 1, sizeof ( struct _Kartophoby  ) );
-    if ( ThePhoby == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    KRefcountInit (
-                & ( ThePhoby -> refcount ),
-                1,
-                _sKartophoby_classname,
-                "_KartophobyMake",
-                "_Kartophoby"
-                );
-
-        /*  First we should check that path is valid and
-         *  read valid version for our phoby and list of Karts
-         */
-    RCt = _KartophobyReadVersion ( ThePhoby, & List, Path );
-    if ( RCt == 0 ) {
-        RCt = KNamelistCount ( List, & Count );
-        if ( RCt == 0 ) {
-            for ( llp = 0; llp < Count; llp ++ ) {
-                RCt = KNamelistGet ( List, llp, & Name );
-                if ( RCt == 0 ) {
-                    RCt = _KartophobyAddKart (
-                                            ThePhoby,
-                                            Name,
-                                            MakeFrom
-                                            );
-                    if ( RCt != 0 ) {
-                        RCt = 0;
-                    }
-                }
-            }
-        }
-
-        KNamelistRelease ( List );
-    }
-
-    if ( RCt != 0 ) {
-        * Phoby = NULL;
-
-        if ( ThePhoby != NULL ) {
-            _KartophobyDispose ( ThePhoby );
-        }
-    }
-
-    if ( RCt == 0 ) {
-        * Phoby = ThePhoby;
-    }
-
-    return RCt;
-}   /* _KartophobyMake () */
-
-static
-rc_t CC
-_KartophobyAddRef ( const struct _Kartophoby * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    XFS_CAN ( self )
-
-    switch ( KRefcountAdd ( & ( self -> refcount ), _sKartophoby_classname ) ) {
-        case krefOkay :
-                    RCt = 0;
-                    break;
-        case krefZero :
-        case krefLimit :
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* _KartophobyAddRef () */
-
-LIB_EXPORT
-rc_t CC
-_KartophobyRelease ( const struct _Kartophoby * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    XFS_CAN ( self )
-
-    switch ( KRefcountDrop ( & ( self -> refcount ), _sKartophoby_classname ) ) {
-
-        case krefOkay :
-        case krefZero :
-                    RCt = 0;
-                    break;
-        case krefWhack :
-                    RCt = _KartophobyDispose ( self );
-                    break;
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* _KartophobyRelease () */
-
-/*  Check and read directory version ( time ) and return List
- *  if it is not NULL
- */
-static
-rc_t CC
-_VersionAndListForPath (
-                        const char * Path,
-                        uint64_t * Version,
-                        struct KNamelist ** List
-)
-{
-    rc_t RCt;
-    struct KDirectory * NatDir;
-    KTime_t Date;
-    uint32_t PathType;
-
-    RCt = 0;
-    NatDir = NULL;
-    Date = 0;
-    PathType = kptNotFound;
-
-    XFS_CSAN ( List )
-    XFS_CSA ( Version, 0 )
-    XFS_CAN ( Path )
-    XFS_CAN ( Version )
-
-    RCt = KDirectoryNativeDir ( & NatDir );
-    if ( RCt == 0 ) {
-        PathType = KDirectoryPathType ( NatDir, Path );
-        switch ( PathType ) {
-            case kptNotFound:
-                RCt = KDirectoryCreateDir (
-                                            NatDir,
-                                            0755,
-                                            kcmCreate,
-                                            Path
-                                            );
-                break;
-            case kptDir:
-                break;
-            default:
-                RCt = XFS_RC ( rcInvalid );
-        }
-
-        if ( RCt == 0 ) {
-            RCt = KDirectoryDate ( NatDir, & Date, Path );
-            if ( RCt == 0 ) {
-                * Version = Date;
-
-                if ( List != NULL ) {
-                    RCt = KDirectoryList (
-                                        NatDir,
-                                        List,
-                                        NULL,
-                                        NULL,
-                                        Path
-                                        );
-                }
-            }
-        }
-
-        KDirectoryRelease ( NatDir );
-    }
-
-    return RCt;
-}   /* _VersionAndListForPath () */
-
-rc_t CC
-_KartophobyReadVersion (
-                        struct _Kartophoby * self,
-                        struct KNamelist ** List,
-                        const char * Path
-)
-{
-    rc_t RCt = 0;
-
-    XFS_CSAN ( List )
-    XFS_CAN ( self )
-    XFS_CAN ( List )
-
-    RCt = XFS_StrDup ( Path, & ( self -> path ) );
-    if ( RCt == 0 ) {
-        RCt = _VersionAndListForPath (
-                                    self -> path,
-                                    & ( self -> version),
-                                    List
-                                    );
-    }
-
-    return RCt;
-}   /* _KartophobyReadVersion () */
-
-static
-int64_t CC
-_KartophobyAddKartCallback ( const BSTNode * N1, const BSTNode * N2 )
-{
-    return XFS_StringCompare4BST_ZHR (
-                                ( ( struct XFSGapKart * ) N1 ) -> name,
-                                ( ( struct XFSGapKart * ) N2 ) -> name
-                                );
-}   /* _KartophobyAddKartCallback () */
-
-rc_t CC
-_KartophobyAddKart (
-                    struct _Kartophoby * self,
-                    const char * KartName,
-                    const struct _Kartophoby * LoadFrom
-)
-{
-    rc_t RCt;
-    const struct XFSGapKart * Kart;
-
-    RCt = 0;
-    Kart = NULL;
-
-    XFS_CAN ( self )
-    XFS_CAN ( KartName )
-
-        /*)     First we should check if we already have and use it
-         (*/
-    RCt = _KartophobyGet ( self, & Kart, KartName );
-    if ( RCt != 0 ) {
-            /*)     We should load kart if that exists
-             (*/
-        RCt = XFSGapKartMake ( & Kart, self -> path, KartName );
-    }
-
-    if ( RCt == 0 ) {
-            /*) Here we should add Kart to new Kartophoby
-             (*/
-        RCt = BSTreeInsert (
-                        & ( self -> tree ),
-                        & ( ( ( struct XFSGapKart * ) Kart ) -> node ),
-                        _KartophobyAddKartCallback
-                        );
-        if ( RCt != 0 ) {
-            XFSGapKartRelease ( Kart );
-        }
-    }
-
-    return RCt;
-}   /* _KartophobyAddKart () */
-
-static
-int64_t CC
-_KartophobyGetCallback ( const void * Item, const BSTNode * Node )
-{
-    const char * Str1, * Str2;
-
-    Str1 = ( ( char * ) Item );
-    Str2 = Node == NULL
-                    ? NULL
-                    : ( ( struct XFSGapKart * ) Node ) -> name
-                    ;
-
-
-    return XFS_StringCompare4BST_ZHR ( Str1, Str2 );
-}   /* _KartophobyGetCallback () */
-
-rc_t CC
-_KartophobyGet (
-                const struct _Kartophoby * self,
-                const struct XFSGapKart ** Kart,
-                const char * KartName
-)
-{
-    rc_t RCt;
-    const struct XFSGapKart * TheKart;
-
-    RCt = 0;
-    TheKart = NULL;
-
-    XFS_CSAN ( Kart )
-    XFS_CAN ( self )
-    XFS_CAN ( Kart )
-    XFS_CAN ( KartName )
-
-    TheKart = ( const struct XFSGapKart * ) BSTreeFind (
-                                            & ( self -> tree ),
-                                            KartName,
-                                            _KartophobyGetCallback
-                                            );
-    if ( TheKart != NULL ) {
-        RCt = XFSGapKartAddRef ( TheKart );
-        if ( RCt == 0 ) {
-            * Kart = TheKart;
-        }
-    }
-    else {
-        RCt = XFS_RC ( rcNotFound );
-    }
-
-    return RCt;
-}   /* _KartophobyGet () */
-
-rc_t CC
-_KartophobyVersion (
-                const struct _Kartophoby * self,
-                uint64_t * Version
-)
-{
-    XFS_CSA ( Version, 0 )
-    XFS_CAN ( self )
-    XFS_CAN ( Version )
-
-    * Version = self -> version;
-
-    return 0;
-}   /* _KartophobyVersion () */
-
-static
-void
-_ListKartophobyCallback ( BSTNode * Node, void * Data )
-{
-    struct _LollyPopp * Popp;
-    struct XFSGapKart * Kart;
-
-    Popp = ( struct _LollyPopp * ) Data;
-    Kart = ( struct XFSGapKart * ) Node;
-
-    if ( Popp -> list != NULL && Kart != NULL ) {
-        if ( Popp -> project_id == 0 ||
-            XFSGapKartHasForProject ( Kart, Popp -> project_id )
-        ) {
-            VNamelistAppend ( Popp -> list, Kart -> name );
-        }
-    }
-}   /* _ListKartophobyCallback () */
-
-static
-rc_t CC
-_KartophobyList (
-                const struct _Kartophoby * self,
-                struct KNamelist ** List,
-                uint32_t ProjectId
-)
-{
-    rc_t RCt;
-    struct VNamelist * xList;
-    struct _LollyPopp Popp;
-
-    RCt = 0;
-    xList = NULL;
-    Popp . list = NULL;
-    Popp . project_id = 0;
-
-    XFS_CSAN ( List )
-    XFS_CAN ( self )
-    XFS_CAN ( List )
-
-    RCt = VNamelistMake ( & xList, 16 /* ????? */ );
-    if ( RCt == 0 ) {
-        Popp . list = xList;
-        Popp . project_id = ProjectId;
-
-        BSTreeForEach (
-                        & ( self -> tree ),
-                        false,
-                        _ListKartophobyCallback,
-                        & Popp
-                        );
-
-        RCt = VNamelistToNamelist ( xList, List );
-
-        VNamelistRelease ( xList );
-    }
-
-    return RCt;
-}   /* _KartophobyList () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* _KartDepot ...                                                    */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct _KartDepot {
-    KLock * mutabor;
-
-    char * path;
-
-    const struct _Kartophoby * phoby;
-};
-
-static struct _KartDepot * _sDpt = NULL;
-
-static rc_t CC _KartDepotPhoby ( const struct _Kartophoby ** Phoby );
-static rc_t CC _KartDepotPhobySet ( const struct _Kartophoby * Phoby );
-
-static
-rc_t CC
-_KartDepotDispose ( struct _KartDepot * self )
-{
-    if ( self != NULL ) {
-        if ( self -> phoby != NULL ) {
-            _KartophobyRelease ( self -> phoby );
-            self -> phoby = NULL;
-        }
-
-        if ( self -> path != NULL ) {
-            free ( self -> path );
-            self -> path = NULL;
-        }
-
-        if ( self -> mutabor != NULL ) {
-            KLockRelease ( self -> mutabor );
-            self -> mutabor = NULL;
-        }
-
-        free ( self );
-    }
-
-    return 0;
-}   /* _KartDepotDispose () */
-
-static
-rc_t CC
-_KartDepotMake ( struct _KartDepot ** Dpt )
-{
-    rc_t RCt;
-    struct _KartDepot * Depot;
-
-    RCt = 0;
-    Depot = NULL;
-
-    XFS_CSAN ( Dpt )
-    XFS_CAN ( Dpt )
-
-    Depot = calloc ( 1, sizeof ( struct _KartDepot ) );
-    if ( Depot == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = KLockMake ( & ( Depot -> mutabor ) );
-        if ( RCt == 0 ) {
-
-            RCt = XFSGapKartfiles ( & ( Depot -> path ) );
-            if ( RCt == 0 ) {
-                RCt = _KartophobyMake ( 
-                                    & ( Depot -> phoby ),
-                                    Depot -> path,
-                                    NULL
-                                    );
-                if ( RCt == 0 ) {
-                    * Dpt = Depot;
-                }
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Dpt = NULL;
-
-        if ( Depot != NULL ) {
-            _KartDepotDispose ( Depot );
-        }
-    }
-
-    return RCt;
-}   /* _KartDepotMake () */
-
-static
-struct _KartDepot * CC
-_KartDepotGet ()
-{
-    return _sDpt;
-}   /* _KartDepotGet () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartDepotInit ()
-{
-    rc_t RCt;
-    struct _KartDepot * Depot;
-
-    RCt = 0;
-    Depot = NULL;
-
-    if ( _sDpt == NULL ) {
-        RCt = _KartDepotMake ( & Depot );
-        if ( RCt == 0 ) {
-            _sDpt = Depot;
-        }
-    }
-
-    return RCt;
-}   /* XFSGapKartDepotInit () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartDepotDispose ()
-{
-    struct _KartDepot * Depot = _sDpt;
-
-    _sDpt = NULL;
-
-    if ( Depot != NULL ) {
-        _KartDepotDispose ( Depot );
-    }
-
-    return 0;
-}   /* XFSGapKartDepotDispose () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartDepotList ( struct KNamelist ** List, uint32_t ProjectId )
-{
-    rc_t RCt;
-    const struct _Kartophoby * Phoby;
-
-    RCt = 0;
-    Phoby = NULL;
-
-    XFS_CSAN ( List )
-    XFS_CAN ( List )
-
-    RCt = _KartDepotPhoby ( & Phoby );
-    if ( RCt == 0 ) {
-        RCt = _KartophobyList ( Phoby, List, ProjectId );
-
-        if ( Phoby != NULL ) {
-            _KartophobyRelease ( Phoby );
-        }
-    }
-
-    return RCt;
-}   /* XFSGapKartDepotList () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartDepotGet (
-                const struct XFSGapKart ** Kart,
-                const char * KartName
-)
-{
-    rc_t RCt;
-    const struct _Kartophoby * Phoby;
-
-    RCt = 0;
-    Phoby = NULL;
-
-    XFS_CSAN ( Kart )
-    XFS_CAN ( Kart )
-    XFS_CAN ( KartName )
-
-    RCt = _KartDepotPhoby ( & Phoby );
-    if ( RCt == 0 ) {
-        RCt = _KartophobyGet ( Phoby, Kart, KartName );
-
-        if ( Phoby != NULL ) {
-            _KartophobyRelease ( Phoby );
-        }
-    }
-
-    return RCt;
-}   /* XFSGapKartDepotGet () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartDepotRefresh ()
-{
-    rc_t RCt;
-    struct _KartDepot * Dpt;
-    uint64_t OldVer;
-    uint64_t NewVer;
-    const struct _Kartophoby * NewPhoby;
-    const struct _Kartophoby * OldPhoby;
-
-    RCt = 0;
-    Dpt = _KartDepotGet ();
-    OldVer = 0;
-    NewVer = 0;
-    OldPhoby = NULL;
-    NewPhoby = NULL;
-
-    XFS_CAN ( Dpt )
-
-    RCt = _VersionAndListForPath ( Dpt -> path, & NewVer, NULL );
-    if ( RCt == 0 ) {
-        RCt = _KartDepotPhoby ( & OldPhoby );
-        if ( RCt == 0 ) {
-            OldVer = OldPhoby == NULL
-                                ? ( NewVer - 1)
-                                : OldPhoby -> version
-                                ;
-            if ( OldVer != NewVer ) {
-                RCt = _KartophobyMake (
-                                    & NewPhoby,
-                                    Dpt -> path,
-                                    OldPhoby
-                                    );
-                if ( RCt == 0 ) {
-                    RCt = _KartDepotPhobySet ( NewPhoby );
-
-                    _KartophobyRelease ( NewPhoby );
-                }
-            }
-
-            if ( OldPhoby != NULL ) {
-                _KartophobyRelease ( OldPhoby );
-            }
-        }
-    }
-
-    return RCt;
-}   /* XFSGapKartDepotRefresh () */
-
-LIB_EXPORT
-rc_t CC
-XFSGapKartDepotVersion ( uint64_t * Ver )
-{
-    rc_t RCt;
-    const struct _Kartophoby * Phoby;
-
-    RCt = 0;
-    Phoby = NULL;
-
-    XFS_CSA ( Ver, 0 )
-    XFS_CAN ( Ver )
-
-    RCt = _KartDepotPhoby ( & Phoby );
-    if ( RCt == 0 ) {
-        RCt = _KartophobyVersion ( Phoby, Ver );
-
-        if ( Phoby != NULL ) {
-            _KartophobyRelease ( Phoby );
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Ver = 0;
-    }
-
-    return RCt;
-}   /* XFSGapKartDepotVersion () */
-
-LIB_EXPORT
-const char * CC
-XFSGapKartDepotPath ()
-{
-    struct _KartDepot * Dpt = _KartDepotGet ();
-    return Dpt == NULL ? NULL : ( Dpt -> path );
-}   /* XFSGapKartDepotPath () */
-
-rc_t CC
-_KartDepotPhoby ( const struct _Kartophoby ** Phoby )
-{
-    rc_t RCt;
-    struct _KartDepot * Dpt;
-
-    RCt = 0;
-    Dpt = _KartDepotGet ();
-
-    XFS_CSAN ( Phoby )
-    XFS_CAN ( Phoby )
-    XFS_CAN ( Dpt )
-
-    RCt = KLockAcquire ( Dpt -> mutabor );
-    if ( RCt == 0 ) {
-        if  ( Dpt -> phoby != NULL ) {
-            RCt = _KartophobyAddRef ( Dpt -> phoby );
-            if ( RCt == 0 ) {
-                * Phoby = Dpt -> phoby;
-            }
-        }
-
-        KLockUnlock ( Dpt -> mutabor );
-    }
-
-    return RCt;
-}   /* _KartDepotPhoby () */
-
-rc_t CC
-_KartDepotPhobySet ( const struct _Kartophoby * Phoby )
-{
-    rc_t RCt;
-    struct _KartDepot * Dpt;
-
-    RCt = 0;
-    Dpt = _KartDepotGet ();
-
-    XFS_CAN ( Phoby )
-    XFS_CAN ( Dpt )
-
-    RCt = KLockAcquire ( Dpt -> mutabor );
-    if ( RCt == 0 ) {
-
-        RCt = _KartophobyAddRef ( Phoby );
-        if ( RCt == 0 ) {
-            if  ( Dpt -> phoby != NULL ) {
-                RCt = _KartophobyRelease ( Dpt -> phoby );
-            }
-
-            Dpt -> phoby = Phoby;
-        }
-
-        KLockUnlock ( Dpt -> mutabor );
-    }
-
-    return RCt;
-}   /* _KartDepotPhobySet () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
diff --git a/libs/xfs/xgapk.h b/libs/xfs/xgapk.h
deleted file mode 100644
index a917b20..0000000
--- a/libs/xfs/xgapk.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _xgapk_h_
-#define _xgapk_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   There is some interface build over Kart structure.
-  ))))  Called it XFSGapKart, sorry, weak imagination
- ((((*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct XFSGapKartItem;
-struct XFSGapKart;
-struct KNamelist;
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*))
-  ||    KartItem : user could not create or destroy it, only change
-  ||    referrence count. Item contains following data:
-  ||
-  ||       project_id, accession, object_id, name and description.
-  ||
-  ||    One method called as DisplayName, it is just Accession or
-  ||    Name if Accession equals NULL.
- ((*/
-XFS_EXTERN rc_t CC XFSGapKartItemAddRef (
-                            const struct XFSGapKartItem * self
-                            );
-XFS_EXTERN rc_t CC XFSGapKartItemRelease (
-                            const struct XFSGapKartItem * self
-                            );
-
-XFS_EXTERN uint32_t CC XFSGapKartItemProjectId (
-                            const struct XFSGapKartItem * self
-                            );
-XFS_EXTERN uint32_t CC XFSGapKartItemObjectId (
-                            const struct XFSGapKartItem * self
-                            );
-XFS_EXTERN const char * CC XFSGapKartItemAccession (
-                            const struct XFSGapKartItem * self
-                            );
-XFS_EXTERN const char * CC XFSGapKartItemName (
-                            const struct XFSGapKartItem * self
-                            );
-XFS_EXTERN const char * CC XFSGapKartItemDescription (
-                            const struct XFSGapKartItem * self
-                            );
-    /*  This method will return name which will be used as filename
-     *  if Accession != NULL it will be Accession, overwise ItemName
-     */
-XFS_EXTERN const char * CC XFSGapKartItemDisplayName (
-                            const struct XFSGapKartItem * self
-                            );
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*))
-  ||    Kart : collection of KartItems.
-  ||
-  ||    Kart content could not be changed, so we may pass it from one
-  ||    collection to another. 
-  ||    Theoretically, Kart could contain items for different projects
-  ||    so, list method for Kart requires ProjectId
-  ||
- ((*/
-/*))
- //     Standard method of loading/uploading
-((*/
-XFS_EXTERN rc_t CC XFSGapKartMake (
-                            const struct XFSGapKart ** Kart,
-                            const char * Path,
-                            const char * Name
-                            );
-XFS_EXTERN rc_t CC XFSGapKartDispose (
-                            const struct XFSGapKart * self
-                            );
-
-XFS_EXTERN rc_t CC XFSGapKartAddRef (
-                            const struct XFSGapKart * self
-                            );
-XFS_EXTERN rc_t CC XFSGapKartRelease (
-                            const struct XFSGapKart * self
-                            );
-
-/*))
- //     Accessing content
-((*/
-    /*  If ProjectId == 0 it will return all items 
-     */
-XFS_EXTERN rc_t CC XFSGapKartList (
-                            const struct XFSGapKart * self,
-                            struct KNamelist ** List,
-                            uint32_t ProjectId
-                            );
-XFS_EXTERN const struct XFSGapKartItem * CC XFSGapKartGet (
-                            const struct XFSGapKart * self,
-                            const char * ItemName
-                            );
-
-XFS_EXTERN const char * CC XFSGapKartPath (
-                            const struct XFSGapKart * self
-                            );
-XFS_EXTERN bool CC XFSGapKartHasForProject (
-                            const struct XFSGapKart * self,
-                            uint32_t ProjectId
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*))
- ||    KartDepot : collection of Kart.
- ||
- ||    KartDepot is represented by real directory, where Kart files
- ||    are stored.
- ||    Content of KartDepot could be changed, there is Refresh method
- ||    You may list stored Karts as by ProjectId and without
- ||    There is only one KartDepot directory, so ...  
- ||
-((*/
-
-XFS_EXTERN rc_t CC XFSGapKartDepotInit ();
-
-XFS_EXTERN rc_t CC XFSGapKartDepotDispose ();
-
-    /* If ProjectId == 0, it will return list of all kart files
-     */
-XFS_EXTERN rc_t CC XFSGapKartDepotList (
-                                    struct KNamelist ** List,
-                                    uint32_t ProjectId
-                                    );
-
-XFS_EXTERN rc_t CC XFSGapKartDepotGet (
-                                    const struct XFSGapKart ** Kart,
-                                    const char * KartName
-                                    );
-
-XFS_EXTERN rc_t CC XFSGapKartDepotRefresh ();
-
-XFS_EXTERN rc_t CC XFSGapKartDepotVersion ( uint64_t * Version );
-
-XFS_EXTERN const char * CC XFSGapKartDepotPath ();
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _xgapk_h_ */
diff --git a/libs/xfs/xhttp.c b/libs/xfs/xhttp.c
deleted file mode 100644
index 5760430..0000000
--- a/libs/xfs/xhttp.c
+++ /dev/null
@@ -1,2998 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/container.h>
-#include <klib/namelist.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <kproc/lock.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kns/manager.h>
-#include <kns/http.h>
-#include <kns/stream.h>
-
-#include <xfs/path.h>
-
-#include "schwarzschraube.h"
-#include "xhttp.h"
-#include "zehr.h"
-#include "lockdpt.h"
-
-#include <sysalloc.h>
-
-#include <ctype.h>
-#include <os-native.h>
-#include <time.h>
-#include <stdio.h> /* sscanf */
-
-/*||*\
-  || Lyrics:
-  || That file contains interface to SRA archive at
-  ||
-  ||     http://ftp-trace.ncbi.nlm.nih.gov/sra
-  ||
-  || That archive contains folders and files. For example, that
-  || directory contains 'DRR000001' subdirectory :
-  ||
-  || (http://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/DRR/DRR000)
-  ||
-  ||     DRR000001/              26-May-2014 07:22    -   
-  ||     DRR000002/              26-May-2014 08:00    -   
-  ||     DRR000003/              26-May-2014 08:07    -   
-  ||     DRR000004/              26-May-2014 08:07    -  
-  ||
-  || If we will enter 'DRR000001' subdirectory, we will file here :
-  ||
-  || (http://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/DRR/DRR000/DRR000001/)
-  || 
-  ||     DRR000001.sra           26-May-2014 07:22  569M  
-  ||
-  || So, code could looks little weird, parsing and servint that format
-  ||
-\*||*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)) XFSHttp and XFSHttpEntry and _HttpED ( EntryDepot ) structs are
- ||  living here
-((*/
-
-/*))
- //  Status we will use in that module
-((*/
-
-/*)) Forward
- ((*/
-struct _HttpHs;
-
-/*))
- //  EntryDepot this is responsible for sharing HTTP resources
-((*/
-struct _HttpED {
-    BSTree tree;
-    KRefcount refcount;
-    KLock * mutabor;
-
-    struct XFSLockDepot * mutabors;
-    struct _HttpHs * http_hs;
-};
-
-/*)) 
- //  Just a URL base to access entry by relative path.
-((*/
-struct XFSHttp {
-    KRefcount refcount;
-
-    const char * base_url;
-};
-
-/*)) 
- //  Just a URL base to access entry by relative path.
-((*/
-struct XFSHttpEntry {
-    BSTNode node;
-    KRefcount refcount;
-
-    const char * name;
-    const char * url;
-    uint32_t url_hash;
-
-    bool is_folder;
-
-    struct VNamelist * list;    /* is null if not a folder */
-    uint64_t size;              /* is ZERO if a folder */
-    KTime_t time;
-
-    XFSStatus status;
-};
-
-struct XFSHttpReader {
-    KRefcount refcount;
-
-    const struct XFSHttpEntry * entry;
-};
-
-/*) Usefuls
- (*/
-static const char * _sXFSHttpED_classname = "XFSHttpEntryDepot";
-static const char * _sXFSHttp_classname = "XFSHttp";
-static const char * _sXFSHttpEntry_classname = "XFSHttpEntry";
-static const char * _sXFSHttpReader_classname = "XFSHttpReader";
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* _HttpHs/_HttpHsEn Methods ...                                     */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#define DEFAULT_PIPIRDA_SIZE    64
-
-struct _HttpHsEn {
-    struct _HttpHsEn * next;
-    struct _HttpHsEn * prev;
-
-    const struct XFSHttpEntry * entry;
-    const struct KFile * file;
-};
-
-struct _HttpHs {
-    KLock * mutabor;
-
-    uint32_t size;
-    uint32_t qty;
-
-    struct _HttpHsEn * kopf;
-    struct _HttpHsEn * arse;
-};
-
-static
-rc_t CC
-_HttpHsEnMake ( struct XFSHttpEntry * Entry, struct _HttpHsEn ** HsEn )
-{
-    struct _HttpHsEn * TheSi = NULL;
-
-    if ( HsEn != NULL ) {
-        * HsEn = NULL;
-    }
-
-    if ( Entry == NULL || HsEn == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    TheSi = calloc ( 1, sizeof ( struct _HttpHsEn ) );
-    if ( TheSi == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    TheSi -> entry = Entry;
-
-    * HsEn = TheSi;
-
-    return 0;
-}   /* _HttpHsEnMake () */
-
-static
-rc_t CC
-_HttpHsEnDispose ( struct _HttpHsEn * self )
-{
-    if ( self == NULL ) {
-        return 0;
-    }
-
-    if ( self -> file != NULL ) {
-        KFileRelease ( self -> file );
-
-        self -> file = NULL;
-    }
-
-    self -> next = self -> prev = NULL;
-    self -> entry = NULL;
-
-    free ( self );
-
-    return 0;
-}   /* _HttpHsEnDispose () */
-
-static
-rc_t CC
-_HttpHsEnConnect ( struct _HttpHsEn * self )
-{
-    rc_t RCt;
-    const struct KNSManager * Manager;
-    const struct KFile * File;
-
-    RCt = 0;
-    Manager = NULL;
-    File = NULL;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull ) ;
-    }
-
-    if ( self -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( self -> entry -> url == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( self -> entry -> is_folder ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-        /*)) Not sure about it ((*/
-    if ( self -> file != NULL ) {
-        return 0;
-    }
-
-        /*] Here we are [*/
-    Manager = XFS_KnsManager ();
-    if ( Manager == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = KNSManagerMakeHttpFile (
-                                    Manager,
-                                    & File,
-                                    NULL,   /* no open connections */
-                                    0x01010000,
-                                    self -> entry -> url
-                                    );
-        if ( RCt == 0 ) {
-            self -> file = File;
-        }
-    }
-
-    return RCt;
-}   /* _HttpHsEnConnect () */
-
-static
-void CC
-_HttpHsRemNoLock ( struct _HttpHs * self, struct _HttpHsEn * HsEn )
-{
-    if ( self == NULL || HsEn == NULL ) {
-        return;
-    }
-
-    if ( HsEn -> prev == NULL ) {       /* at the kopf */
-        if ( HsEn -> next == NULL ) {
-            self -> kopf = self -> arse = NULL;
-        }
-        else {
-            self -> kopf = HsEn -> next;
-            self -> kopf -> prev = NULL;
-        }
-    }
-    else {
-        if ( HsEn -> next == NULL ) {   /* at the arse */
-            self -> arse = HsEn -> prev;
-            self -> arse -> next = NULL;
-        }
-        else {                          /* in between */
-            HsEn -> prev -> next = HsEn -> next;
-            HsEn -> next -> prev = HsEn -> prev;
-        }
-    }
-
-    HsEn -> prev = HsEn -> next = NULL;
-
-    self -> qty ++;
-}   /* _HttpHsRemNoLock () */
-
-static
-void CC
-_HttpHsAddNoLock ( struct _HttpHs * self, struct _HttpHsEn * HsEn )
-{
-    if ( self == NULL || HsEn == NULL ) {
-        return;
-    }
-
-        /*)) Note, addidng always to head
-         ((*/
-    if ( self -> kopf == NULL ) {
-        HsEn -> next = HsEn -> prev = NULL;
-        self -> kopf = self -> arse = HsEn;
-    }
-    else {
-        self -> kopf -> prev = HsEn;
-        HsEn -> next = self -> kopf;
-        self -> kopf = HsEn;
-    }
-
-    self -> qty ++;
-}   /* _HttpHsAddNoLock () */
-
-static
-void CC
-_HttpHsMakeSlotNoLock ( const struct _HttpHs * self )
-{
-    struct _HttpHsEn * HsEn;
-
-    if ( self == NULL ) {
-        return;
-    }
-
-    if ( self -> arse == NULL ) {
-        return;
-    }
-
-    while ( self -> size <= self -> qty ) {
-        HsEn = self -> arse;
-        if ( HsEn == NULL ) {
-            break;
-        }
-
-        _HttpHsRemNoLock ( ( struct _HttpHs * ) self, HsEn );
-        _HttpHsEnDispose ( HsEn );
-    }
-}   /* _HttpHsMakeSlotNoLock () */
-
-static
-struct _HttpHsEn * CC
-_HttpHsFindNoLock (
-                const struct _HttpHs * self,
-                const struct XFSHttpEntry * Entry
-)
-{
-    struct _HttpHsEn * HsEn = NULL;
-
-    if ( self == NULL || Entry == NULL ) {
-        return NULL;
-    }
-
-    HsEn = self -> kopf;
-
-    while ( HsEn != NULL ) {
-        if ( HsEn -> entry == Entry ) {
-            _HttpHsRemNoLock ( ( struct _HttpHs * ) self, HsEn );
-            _HttpHsAddNoLock ( ( struct _HttpHs * ) self, HsEn );
-            return HsEn;
-        }
-
-        HsEn = HsEn -> next;
-    }
-
-    return NULL;
-}   /* _HttpHsFindNoLock () */
-
-static 
-rc_t CC
-_HttpHsMake ( uint32_t Size, struct _HttpHs ** Hs )
-{
-    rc_t RCt;
-    struct _HttpHs * TheHs;
-
-    RCt = 0;
-    TheHs = NULL;
-
-    if ( Hs == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Hs = NULL;
-
-    TheHs = calloc ( 1, sizeof ( struct _HttpHs ) );
-    if ( TheHs == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = KLockMake ( & ( TheHs -> mutabor ) );
-    if ( RCt == 0 ) {
-        TheHs -> size = Size == 0 ? DEFAULT_PIPIRDA_SIZE : Size ;
-        TheHs -> qty = 0;
-        * Hs = TheHs;
-    }
-    else {
-        free ( TheHs );
-    }
-
-    return RCt;
-}   /* _HttpHsMake () */
-
-static
-rc_t CC
-_HttpHsDispose ( struct _HttpHs * self )
-{
-    bool AbleToLock;
-    struct _HttpHsEn * HsEn;
-
-    AbleToLock = false;
-    HsEn = NULL;
-
-    if ( self == NULL ) {
-        return 0;
-    }
-
-    if ( self -> mutabor != NULL ) {
-        AbleToLock = KLockAcquire ( self -> mutabor ) == 0;
-    }
-
-    while ( self -> kopf != NULL ) {
-        HsEn = self -> kopf;
-
-        _HttpHsRemNoLock ( ( struct _HttpHs * ) self, HsEn );
-        _HttpHsEnDispose ( HsEn );
-    }
-
-    self -> kopf = self -> arse = NULL;
-    self -> size = self -> qty = 0;
-
-    if ( self -> mutabor != NULL ) {
-        if ( AbleToLock ) {
-            KLockUnlock ( self -> mutabor );
-        }
-        KLockRelease ( self -> mutabor );
-    }
-
-    free ( self );
-
-    return 0;
-}   /* _HttpHsDispose () */
-
-static
-rc_t CC
-_HttpHsFindOrCreate (
-                    const struct _HttpHs * self,
-                    const struct XFSHttpEntry * Entry,
-                    const struct _HttpHsEn ** HsEn
-)
-{
-    rc_t RCt;
-    struct _HttpHsEn * TheSi;
-
-    RCt = 0;
-    TheSi = NULL;
-
-    if ( HsEn != NULL ) {
-        * HsEn = NULL;
-    }
-
-    if ( self == NULL || Entry == NULL || HsEn == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-            /* First we are trying to find appropriate HttpHsEn
-             */
-        TheSi = _HttpHsFindNoLock ( self, Entry );
-        if ( TheSi == NULL ) {
-            RCt = _HttpHsEnMake (
-                            ( struct XFSHttpEntry * ) Entry,
-                            & TheSi
-                            );
-            if ( RCt == 0 ) {
-                _HttpHsMakeSlotNoLock ( self );
-                _HttpHsAddNoLock ( ( struct _HttpHs * ) self, TheSi );
-            }
-            else {
-                TheSi = NULL;
-                _HttpHsEnDispose ( TheSi );
-            }
-        }
-
-        KLockUnlock ( self -> mutabor );
-    }
-
-    if ( RCt == 0 ) {
-        if ( TheSi == NULL ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-            RCt = _HttpHsEnConnect ( TheSi );
-            if ( RCt == 0 ) {
-                * HsEn = TheSi;
-            }
-        }
-    }
-
-    return RCt;
-}   /* _HttpHsFindOrCreate () */
-
-static
-rc_t CC
-_HttpHsDelete (
-            const struct _HttpHs * self,
-            const struct XFSHttpEntry * Entry
-)
-{
-    rc_t RCt;
-    struct _HttpHsEn * HsEn;
-
-    RCt = 0;
-    HsEn = NULL;
-
-    if ( self == NULL || Entry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-        HsEn = _HttpHsFindNoLock ( self, Entry );
-        if ( HsEn != NULL ) {
-            _HttpHsRemNoLock ( ( struct _HttpHs * ) self, HsEn );
-            _HttpHsEnDispose ( HsEn );
-        }
-
-        KLockUnlock ( self -> mutabor );
-    }
-
-    return RCt;
-}   /* _HttpHsDelele () */
-
-static
-rc_t CC
-_HttpHsGetKFile (
-            const struct _HttpHs * self,
-            const struct XFSHttpEntry * Entry,
-            const struct KFile ** File
-)
-{
-    rc_t RCt;
-    const struct _HttpHsEn * HsEn;
-
-    RCt = 0;
-    HsEn = NULL;
-
-    RCt = _HttpHsFindOrCreate ( self, Entry, & HsEn );
-    if ( RCt == 0 ) {
-        RCt = KFileAddRef ( HsEn -> file );
-        if ( RCt == 0 ) {
-            * File = HsEn -> file;
-        }
-    }
-
-    return RCt;
-}   /* _HttpHsGetKFile () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* _HttpED Methods ...                                               */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static struct _HttpED * _sHttpED = NULL;
-
-static
-struct _HttpED * CC
-_ED ()
-{
-    return _sHttpED;
-}   /* _ED () */
-
-static
-void CC
-_HttpEDWhackCallback ( BSTNode * Node, void * unused )
-{
-    if ( Node != NULL ) {
-        XFSHttpEntryRelease ( ( struct XFSHttpEntry * ) Node );
-    }
-}   /* _HttpEDWhackCallback () */
-
-static
-rc_t CC
-_HttpEDDisposeImpl ( struct _HttpED * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self != NULL ) { 
-        BSTreeWhack (
-                    & ( self -> tree ),
-                    _HttpEDWhackCallback,
-                    NULL
-                    );
-
-        KRefcountWhack (
-                    & ( self -> refcount ),
-                    _sXFSHttpED_classname
-                    );
-
-        XFSLockDepotDispose ( self -> mutabors );
-        _HttpHsDispose ( self -> http_hs );
-
-        if ( self -> mutabor != NULL ) {
-            KLockRelease ( self -> mutabor );
-            self -> mutabor = NULL;
-        }
-
-        free ( self );
-    }
-
-    return RCt;
-}   /* _HttpEDDisposeImpl () */
-
-static
-rc_t CC
-_HttpEDMakeImpl ( struct _HttpED ** HttpED )
-{
-    rc_t RCt;
-    struct _HttpED * TheED;
-
-    RCt = 0;
-    TheED = NULL;
-
-    if ( HttpED != NULL ) {
-        * HttpED = NULL;
-    }
-
-    if ( HttpED == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    TheED = calloc ( 1, sizeof ( struct _HttpED ) );
-    if ( TheED == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSLockDepotMake ( 0, & ( TheED -> mutabors ) );
-    if ( RCt == 0 ) {
-
-        RCt = _HttpHsMake ( 0, & ( TheED -> http_hs ) );
-        if ( RCt == 0 ) {
-
-            RCt = KLockMake ( & ( TheED -> mutabor ) );
-            if ( RCt == 0 ) {
-                BSTreeInit ( & ( TheED -> tree ) );
-
-                KRefcountInit (
-                            & ( TheED -> refcount ),
-                            1,
-                            _sXFSHttpED_classname,
-                            "_HttpEDMake",
-                            "HttpED"
-                            );
-
-                * HttpED = TheED;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * HttpED = NULL;
-        _HttpEDDisposeImpl ( TheED );
-    }
-
-    return RCt;
-}   /* _HttpEDMakeImpl () */
-
-static
-rc_t CC
-_HttpEDDispose ()
-{
-    struct _HttpED * HttpED;
-
-         /* Sorry, there is no any mutex available, so dummy
-          * TODO ... think about global lock ...
-          */
-    HttpED = _sHttpED;
-    _sHttpED = NULL;
-
-    if ( HttpED != NULL ) {
-        _HttpEDDisposeImpl ( HttpED );
-    }
-
-    return 0;
-}   /* _HttpEDDispose () */
-
-static
-rc_t CC
-_HttpEDMake ()
-{
-    rc_t RCt;
-    struct _HttpED * HttpED;
-
-    RCt = 0;
-    HttpED = NULL;
-
-    if ( _sHttpED == NULL ) {
-
-        RCt = _HttpEDMakeImpl ( & HttpED );
-        if ( RCt == 0 ) {
-                /* Sorry, there is no any mutex available, so dummy
-                 * TODO ... think about global lock ...
-                 */
-            if ( _sHttpED == NULL ) {
-                _sHttpED = HttpED;
-            }
-            else {
-                _HttpEDDisposeImpl ( HttpED );
-            }
-        }
-    }
-
-    return RCt;
-}   /* _HttpEDMake () */
-
-static
-rc_t CC
-_HttpEDAddRef ()
-{
-    rc_t RCt;
-    struct _HttpED * HttpED;
-
-    RCt = 0;
-    HttpED = _ED ();
-
-    if ( HttpED == NULL ) {
-        RCt = _HttpEDMake ( );
-        if ( RCt == 0 ) {
-        }
-    }
-    else {
-        RCt = KLockAcquire ( HttpED -> mutabor );
-        if ( RCt == 0 ) {
-            switch ( KRefcountAdd ( & ( HttpED -> refcount ), _sXFSHttpED_classname ) ) {
-                case krefOkay :
-                            RCt = 0;
-                            break;
-                case krefZero :
-                case krefLimit :
-                case krefNegative :
-                            RCt = XFS_RC ( rcInvalid );
-                            break;
-                default :
-                            RCt = XFS_RC ( rcUnknown );
-                            break;
-            }
-            KLockUnlock ( HttpED -> mutabor );
-        }
-    }
-
-    return RCt;
-}   /* _HttpEDAddRef () */
-
-static
-rc_t CC
-_HttpEDRelease ()
-{
-    rc_t RCt;
-    struct _HttpED * HttpED;
-    bool DisposeED;
-
-    RCt = 0;
-    HttpED = _ED ();
-    DisposeED = false;
-
-    if ( HttpED != NULL ) {
-        RCt = KLockAcquire ( HttpED -> mutabor );
-        if ( RCt == 0 ) {
-            switch ( KRefcountDrop ( & ( HttpED -> refcount ), _sXFSHttpED_classname ) ) {
-                case krefOkay :
-                case krefZero :
-                            RCt = 0;
-                            break;
-                case krefWhack :
-                            RCt = 0;
-                            DisposeED = true;
-                            break;
-                case krefNegative :
-                            RCt = XFS_RC ( rcInvalid );
-                            break;
-                default :
-                            RCt = XFS_RC ( rcUnknown );
-                            break;
-            }
-
-            KLockUnlock ( HttpED -> mutabor );
-        }
-        if ( DisposeED ) {
-            _HttpEDDispose ();
-        };
-    }
-
-    return RCt;
-}   /* _HttpEDRelease () */
-
-static
-int64_t CC
-_HttpEntryCmpCallback ( const void * Item, const BSTNode * Node )
-{
-    const char * Str1, * Str2;
-
-    Str1 = ( const char * ) Item;
-
-    Str2 = Node == NULL
-                ? NULL
-                : ( ( struct XFSHttpEntry * ) Node ) -> url
-                ;
-    return XFS_StringCompare4BST_ZHR ( Str1, Str2 );
-}   /* _HttpEntryCmpCallback () */
-
-static
-rc_t CC
-_HttpEDGetNoLock (
-                struct _HttpED * self,
-                const char * Url,
-                const struct XFSHttpEntry ** Entry
-)
-{
-    const struct XFSHttpEntry * RetVal = NULL;
-
-    if ( Entry != NULL ) {
-        * Entry = NULL;
-    }
-
-    if ( self == NULL || Url == NULL || Entry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RetVal = ( const struct XFSHttpEntry * ) BSTreeFind (
-                                                & ( self -> tree ),
-                                                Url,
-                                                _HttpEntryCmpCallback
-                                                );
-
-
-    * Entry = RetVal;
-
-    return 0;
-}   /* _HttpEDGetNoLock () */
-
-static
-rc_t CC
-_HttpEDGet ( const char * Url, const struct XFSHttpEntry ** Entry )
-{
-    rc_t RCt;
-    struct _HttpED * ED;
-
-    RCt = 0;
-    ED = _ED ();
-
-    if ( ED == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KLockAcquire ( ED -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _HttpEDGetNoLock ( ED, Url, Entry );
-
-        KLockUnlock ( ED -> mutabor );
-    }
-
-    return RCt;
-}   /* _HttpEDGet () */
-
-static
-int64_t CC
-_HttpEntryAddCallback ( const BSTNode * N1, const BSTNode * N2 )
-{
-    return XFS_StringCompare4BST_ZHR (
-            ( ( struct XFSHttpEntry * ) N1 ) -> url,
-            ( ( struct XFSHttpEntry * ) N2 ) -> url
-            );
-}   /* _HttpEntryAddCallback () */
-
-static
-rc_t CC
-_HttpEDAddNoLock (
-                struct _HttpED * self,
-                const char * Url,
-                const struct XFSHttpEntry * Entry
-)
-{
-    rc_t RCt;
-    const struct XFSHttpEntry * TheEntry;
-
-    RCt = 0;
-    TheEntry = NULL;
-
-    if ( self == NULL || Url == NULL || Entry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = _HttpEDGetNoLock ( self, Url, & TheEntry );
-    if ( RCt == 0 ) {
-        if ( TheEntry == NULL ) {
-            RCt = XFSHttpEntryAddRef ( Entry );
-            if ( RCt == 0 ) {
-                RCt = BSTreeInsert (
-                            & ( self -> tree ),
-                            ( struct BSTNode * ) & ( Entry -> node ),
-                            _HttpEntryAddCallback
-                            );
-                if ( RCt != 0 ) {
-                    XFSHttpEntryRelease ( Entry );
-                }
-            }
-        }
-    }
-
-    return RCt;
-}   /* _HttpEDAddNoLock () */
-
-static
-rc_t CC
-_HttpEDAdd ( const struct XFSHttpEntry * Entry )
-{
-    rc_t RCt;
-    struct _HttpED * ED;
-
-    RCt = 0;
-    ED = _ED ();
-
-    if ( ED == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KLockAcquire ( ED -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _HttpEDAddNoLock ( ED, Entry -> url, Entry );
-
-        KLockUnlock ( ED -> mutabor );
-    }
-    return RCt;
-}   /* _HttpEDAdd () */
-
-#ifdef NOT_NEED_YET
-static
-rc_t CC
-_HttpEDDelNoLock ( struct _HttpED * self, const char * Url )
-{
-    rc_t RCt;
-    const struct XFSHttpEntry * Entry;
-    bool DelSucc;
-
-    RCt = 0;
-    Entry = NULL;
-    DelSucc = false;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = _HttpEDGetNoLock ( self, Url, & Entry );
-    if ( RCt == 0 ) {
-        if ( Entry != NULL ) {
-            DelSucc = BSTreeUnlink (
-                                & ( self -> tree ),
-                                ( struct BSTNode * ) & ( Entry -> node )
-                                ); 
-            if ( DelSucc ) {
-                _HttpHsDelete ( self -> http_hs, Entry );
-                XFSHttpEntryRelease ( Entry );
-            }
-        }
-    }
-
-    return RCt;
-}   /* _HttpEDDelNoLock () */
-
-static
-rc_t CC
-_HttpEDDel ( const char * Url )
-{
-    rc_t RCt;
-    struct _HttpED * ED;
-
-    RCt = 0;
-    ED = _ED ();
-
-    if ( ED == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KLockAcquire ( ED -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _HttpEDDelNoLock ( ED, Url );
-
-        KLockUnlock ( ED -> mutabor );
-    }
-
-    return RCt;
-}   /* _HttpEDGet () */
-#endif /* NOT_NEED_YET */
-
-static
-rc_t CC
-_HttpEDClearNoLock ( struct _HttpED * self )
-{
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    BSTreeWhack ( & ( self -> tree ), _HttpEDWhackCallback, NULL );
-    BSTreeInit ( & ( self -> tree ) );
-
-    return 0;
-}   /* _HttpEDClearNoLock () */
-
-static
-rc_t CC
-_HttpEDClear ()
-{
-    rc_t RCt;
-    struct _HttpED * ED;
-
-    RCt = 0;
-    ED = _ED ();
-
-    if ( ED == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KLockAcquire ( ED -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _HttpEDClearNoLock ( ED );
-
-        KLockUnlock ( ED -> mutabor );
-    }
-
-    return RCt;
-}   /* _HttpEDClear () */
-
-static 
-rc_t CC
-_HttpEDLock ( uint32_t HashValue )
-{
-    struct _HttpED * ED = _ED ();
-
-    if ( ED == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( ED -> mutabors == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    return XFSLockDepotAcquire ( ED -> mutabors, HashValue );
-}   /* _HttpEDLock () */
-
-static 
-rc_t CC
-_HttpEDUnlock ( uint32_t HashValue )
-{
-    struct _HttpED * ED = _ED ();
-
-    if ( ED == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( ED -> mutabors == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    return XFSLockDepotUnlock ( ED -> mutabors, HashValue );
-}   /* _HttpEDUnlock () */
-
-static
-rc_t CC
-_HttpEDGetFileForEntry (
-                    const struct XFSHttpEntry * Entry,
-                    const struct KFile ** File
-)
-{
-    struct _HttpED * ED = _ED ();
-
-    if ( File != NULL ) {
-        * File = NULL;
-    }
-
-    if ( ED == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( ED -> http_hs == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Entry == NULL || File == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    return _HttpHsGetKFile ( ED -> http_hs, Entry, File );
-}   /* _HttpEDHttpHs () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* Misk Methods ...                                                  */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/*))
- //   MISKA 1: Will concatenate base_url and Path.
-((*/
-static
-rc_t CC
-_HttpMakeUrlFromPath (
-                    const char * BaseUrl,
-                    const char * Path,
-                    const char ** Url
-)
-{
-    size_t PathSize, BaseSize, RetSize;
-    char * RetUrl;
-
-    PathSize = BaseSize = RetSize = 0;
-    RetUrl = NULL;
-
-    if ( Url != NULL ) {
-        * Url = NULL;
-    }
-
-    if ( BaseUrl == NULL || Path == NULL || Url == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    PathSize = string_size ( Path );
-    BaseSize = string_size ( BaseUrl );
-
-        /*  First we are calculating string size with some extra
-         */
-    RetSize = PathSize
-                + 1 /* slash */
-                + BaseSize
-                + 1 /* 0 at the end of string */
-                ;
-        /*  Second we are allocating string
-         */
-    RetUrl = calloc ( RetSize, sizeof ( char ) );
-    if ( RetUrl == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-        /*  Third we are copying base_url and removing exess of slashes
-         */
-    string_copy ( RetUrl, RetSize, BaseUrl, BaseSize );
-    if ( RetUrl [ BaseSize - 1 ] == '/' ) {
-        BaseSize --;
-        RetUrl [ BaseSize ] = 0;
-    }
-
-        /*  Fourth, adding trailing slash if it is necessary
-         */
-    if ( * Path != '/' ) {
-        RetUrl [ BaseSize ] = '/';
-        BaseSize ++;
-    }
-
-        /*  Fith we are copying Path
-         */
-    string_copy ( RetUrl + BaseSize, RetSize - BaseSize, Path, PathSize );
-
-    * Url = RetUrl;
-
-    return 0;
-}   /* _HttpMakeUrlFromPath () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* XFSHttpEntry Make/Dispose Methods ...                             */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-static rc_t CC _HttpEntryDispose ( struct XFSHttpEntry * self );
-
-static
-rc_t CC
-_HttpCreateEntry (
-            const char * BaseUrl,
-            const char * Path,
-            bool IsFolder,
-            uint64_t Size,
-            KTime_t Time,
-            struct XFSHttpEntry ** Entry
-)
-{
-    rc_t RCt;
-    struct XFSHttpEntry * RetEntry;
-    size_t PathSize;
-
-    RCt = 0;
-    RetEntry = NULL;
-    PathSize = 0;
-
-    if ( Entry != NULL ) {
-        * Entry = NULL;
-    }
-
-    if ( BaseUrl == NULL || Path == NULL || Entry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    PathSize = string_size ( Path );
-    if ( PathSize == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RetEntry = calloc ( 1, sizeof ( struct XFSHttpEntry ) );
-    if ( RetEntry == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RetEntry -> status = kxfsInvalid;
-
-    RCt = VNamelistMake ( & ( RetEntry -> list ), 128 );
-    if ( RCt == 0 ) { 
-        RCt = _HttpMakeUrlFromPath ( BaseUrl, Path, & ( RetEntry -> url ) );
-        if ( RCt == 0 ) {
-            RCt = XFS_NameFromPath_ZHR ( Path, & ( RetEntry -> name ), false );
-            if ( RCt == 0 ) {
-                KRefcountInit (
-                            & ( RetEntry -> refcount ),
-                            1,
-                            _sXFSHttpEntry_classname,
-                            "_HttpCreateEntry",
-                            "HttpEntry"
-                            );
-                RetEntry -> is_folder = IsFolder;
-                RetEntry -> size = IsFolder ? 0 : Size;
-                RetEntry -> time = Time;
-                RetEntry -> url_hash = string_hash (
-                                            RetEntry -> url,
-                                            string_size ( RetEntry -> url )
-                                            );
-                    /* Last thing to do, it is Ready, not Complete !!! */
-                RetEntry -> status = kxfsReady;
-
-                * Entry = RetEntry;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Entry = NULL;
-
-        if ( RetEntry != NULL ) {
-            _HttpEntryDispose ( RetEntry );
-        }
-    }
-
-    return RCt;
-}   /* _HttpCreateEntry () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* XFSHttp Methods ...                                               */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-LIB_EXPORT
-rc_t CC
-XFSHttpMake ( const char * BaseUrl, const struct XFSHttp ** TheHttp )
-{
-    rc_t RCt;
-    struct XFSHttp * RetHttp;
-    struct XFSHttpEntry * Entry;
-    size_t UrlSize;
-
-    RCt = 0;
-    RetHttp = NULL;
-
-    if ( TheHttp != NULL ) {
-        * TheHttp = NULL;
-    }
-
-    if ( TheHttp == NULL || BaseUrl == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-        /* First we should be sure that HttpED is good and trusty
-         */
-    RCt = _HttpEDAddRef ();
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    RetHttp = calloc ( 1, sizeof ( struct XFSHttp ) );
-    if ( RetHttp == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    KRefcountInit (
-                & ( RetHttp -> refcount ),
-                1,
-                _sXFSHttp_classname,
-                "XFSHttpMake",
-                "Http"
-                );
-
-    RCt = XFS_StrDup ( BaseUrl, & ( RetHttp -> base_url ) );
-    if ( RCt == 0 ) {
-            /* Here we are stripping last 'slash' if it is
-             */
-        UrlSize = string_size ( RetHttp -> base_url );
-        while ( 0 < UrlSize ) {
-            if ( RetHttp -> base_url [ UrlSize - 1 ] == '/' ) {
-                ( ( char * ) RetHttp -> base_url ) [ UrlSize - 1 ] = 0;
-                UrlSize --;
-            }
-            else {
-                break;
-            }
-        }
-
-        RCt = _HttpCreateEntry (
-                            RetHttp -> base_url,
-                            "/",
-                            true,
-                            0,
-                            0,
-                            & Entry
-                            );
-        if ( RCt == 0 ) {
-            RCt = _HttpEDAdd ( Entry );
-
-            if ( RCt != 0 ) {
-                _HttpEntryDispose ( Entry );
-
-                    /*  Really it is not error, and something else
-                     *  already created that entry
-                     */
-                RCt = 0;
-            }
-            * TheHttp = RetHttp;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * TheHttp = NULL;
-
-        XFSHttpDispose ( RetHttp );
-    }
-
-    return RCt;
-}   /* XFSHttpMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSHttpDispose ( const struct XFSHttp * self )
-{
-    struct XFSHttp * Http = ( struct XFSHttp * ) self;
-
-    if ( Http != NULL ) {
-        if ( Http -> base_url != NULL ) {
-            free ( ( char * ) Http -> base_url );
-            Http -> base_url = NULL;
-        }
-
-        KRefcountWhack ( & ( Http -> refcount ), _sXFSHttp_classname );
-
-        free ( Http );
-
-        _HttpEDRelease ();
-    }
-
-    return 0;
-}   /* XFSHttpDispose () */
-
-LIB_EXPORT
-rc_t CC
-XFSHttpAddRef ( const struct XFSHttp * self )
-{
-    rc_t RCt;
-    struct XFSHttp * Http;
-
-    RCt = 0;
-    Http = ( struct XFSHttp * ) self;
-
-    if ( Http == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    switch ( KRefcountAdd ( & ( Http -> refcount ), _sXFSHttp_classname ) ) {
-        case krefOkay :
-                    RCt = 0;
-                    break;
-        case krefZero :
-        case krefLimit :
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSHttpAddRef () */
-
-LIB_EXPORT
-rc_t CC
-XFSHttpRelease ( const struct XFSHttp * self )
-{
-    rc_t RCt;
-    struct XFSHttp * Http;
-
-    RCt = 0;
-    Http = ( struct XFSHttp * ) self;
-
-    if ( Http == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    switch ( KRefcountDrop ( & ( Http -> refcount ), _sXFSHttp_classname ) ) {
-
-        case krefOkay :
-        case krefZero :
-                    RCt = 0;
-                    break;
-        case krefWhack :
-                    RCt = XFSHttpDispose ( ( struct XFSHttp * ) Http );
-                    break;
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSHttpRelease () */
-
-LIB_EXPORT
-const char * CC 
-XFSHttpBaseUrl ( const struct XFSHttp * self )
-{
-    if ( self != NULL ) {
-        return self -> base_url;
-    }
-    return NULL;
-}   /* XFSHttpBaseUrl () */
-
-LIB_EXPORT
-bool CC
-XFSHttpHasEntry ( const struct XFSHttp * self, const char * Path )
-{
-    return XFSHttpGetEntry ( self, Path ) != NULL;
-}   /* XFSHttpHasEntry () */
-
-LIB_EXPORT
-const struct XFSHttpEntry * CC
-XFSHttpGetEntry ( const struct XFSHttp * self, const char * EntryPath )
-{
-    rc_t RCt;
-    const char * Url;
-    const struct XFSHttpEntry * RetEntry;
-
-    RCt = 0;
-    Url = NULL;
-    RetEntry = NULL;
-
-    if ( self != NULL && EntryPath != NULL ) {
-        RCt = _HttpMakeUrlFromPath ( self -> base_url, EntryPath, & Url );
-
-        if ( RCt == 0 ) {
-            RCt = _HttpEDGet ( Url, & RetEntry );
-            if ( RCt != 0 ) {
-                RetEntry = NULL;
-            }
-            free ( ( char * ) Url );
-        }
-    }
-
-    return RetEntry;
-}   /* XFSHttpGetEntry () */
-
-static rc_t CC _HttpLoadDirEntry ( const struct XFSHttpEntry * self );
-
-static
-rc_t CC
-_MakeValidPath (
-            const char * Path,
-            const struct XFSPath ** xPath,
-            uint32_t * xPathQty
-)
-{
-    rc_t RCt;
-    char BF [ XFS_SIZE_4096 ];
-    const char * P;
-
-    RCt = 0;
-    * BF = 0;
-    P = NULL;
-
-    if ( xPath != NULL ) {
-        * xPath = NULL;
-    }
-
-    if ( xPathQty != NULL ) {
-        * xPathQty = 0;
-    }
-
-    if ( xPath == NULL || Path == NULL || xPathQty == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( * Path == '/' ) {
-        P = Path;
-    }
-    else {
-        * BF = '/';
-        string_copy_measure ( BF + 1, sizeof ( BF ) - 1, Path );
-
-        P = BF;
-    }
-
-    RCt = XFSPathMake ( xPath, true, P );
-    if ( RCt == 0 ) {
-        * xPathQty = XFSPathPartCount ( * xPath );
-    }
-
-    return RCt;
-}   /* _MakeValidPath () */
-
-static
-rc_t CC
-_HttpOrCreateEntry (
-            const struct XFSHttp * self,
-            const char * Path,
-            const struct XFSHttpEntry ** Entry
-)
-{
-    rc_t RCt;
-    const struct XFSPath * xPath;
-    char BF [ XFS_SIZE_1024 ];
-    uint32_t xQty;
-    const struct XFSHttpEntry * Parent;
-    const struct XFSPath * xParent;
-
-    RCt = 0;
-    xPath = NULL;
-    * BF = 0;
-    xQty = 0;
-    Parent = NULL;
-    xParent = NULL;
-
-    if ( Entry != NULL ) {
-        * Entry = NULL;
-    }
-
-    if ( self == NULL || Path == NULL || Entry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = _MakeValidPath ( Path, & xPath, & xQty );
-    if ( RCt == 0 ) { 
-        if ( xQty < 2 ) {
-            /* Not an error ???
-                RCt = XFS_RC ( rcInvalid );
-            */
-        }
-        else {
-                /* Path to parent directory */
-            RCt = XFSPathParent ( xPath, & xParent );
-            if ( RCt == 0 ) {
-                    /* Trying to get ready one */
-                Parent = XFSHttpGetEntry ( self, XFSPathGet ( xParent ) );
-                if ( Parent == NULL ) {
-                        /* Creating new one */
-                    RCt = _HttpCreateEntry (
-                                    self -> base_url,
-                                    XFSPathGet ( xParent ),
-                                    true,
-                                    0,
-                                    0,
-                                    ( struct XFSHttpEntry ** ) & Parent
-                                    );
-                    if ( RCt == 0 ) {
-                        RCt = _HttpEDAdd ( Parent );
-                    }
-                }
-
-                if ( RCt == 0 ) {
-                        /* Checking and loading parent entry */
-                    if ( Parent -> status == kxfsReady ) {
-                        RCt = _HttpLoadDirEntry ( Parent );
-                    }
-
-                        /* Check if we obtained necessary node */
-                    if ( RCt == 0 ) {
-                        Parent = XFSHttpGetEntry ( self, Path );
-                        if ( Parent == NULL ) {
-                            RCt = XFS_RC ( rcNull );
-                        }
-                        else {
-                            * Entry = Parent;
-                        }
-
-                    }
-                }
-
-                XFSPathRelease ( xParent );
-            }
-        }
-
-        XFSPathRelease ( xPath );
-    }
-
-    return RCt;
-}   /* _HttpOrCreateEntry () */
-
-LIB_EXPORT
-rc_t CC
-XFSHttpGetOrCreateEntry (
-            const struct XFSHttp * self,
-            const char * Path,
-            const struct XFSHttpEntry ** Entry
-)
-{
-    rc_t RCt;
-    const struct XFSHttpEntry * TheEntry;
-
-    RCt = 0;
-    TheEntry = NULL;
-
-    if ( Entry != NULL ) {
-        * Entry = NULL;
-    }
-
-    if ( self == NULL || Entry == NULL || Path == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    TheEntry = XFSHttpGetEntry ( self, Path );
-    if ( TheEntry != NULL ) {
-        * Entry = TheEntry;
-    }
-    else {
-        /*)) we should find an parent directory and load it.
-          || after that we should search throught that directory
-          ((*/
-        RCt = _HttpOrCreateEntry ( self, Path , & TheEntry );
-        if ( RCt == 0 ) {
-            * Entry = TheEntry;
-        }
-    }
-
-    return RCt;
-}   /* XFSHttpGetOrCreateEntry () */
-
-static
-rc_t CC
-_HttpEntryDispose ( struct XFSHttpEntry * self )
-{
-    if ( self != NULL ) {
-        self -> status = kxfsInvalid;
-
-        KRefcountWhack (
-                    & ( self -> refcount ),
-                    _sXFSHttpEntry_classname
-                    ); 
-        if ( self -> name != NULL ) {
-            free ( ( char * ) self -> name ) ;
-            self -> name = NULL;
-        }
-        if ( self -> url != NULL ) {
-            free ( ( char * ) self -> url ) ;
-            self -> url = NULL;
-        }
-        self -> url_hash = 0;
-        self -> is_folder = false;
-
-        if ( self -> list != NULL ) {
-            VNamelistRelease ( self -> list );
-            self -> list = NULL;
-        }
-
-        self -> size = 0;
-        self -> time = 0;
-
-        free ( self );
-    }
-
-    return 0;
-}   /* _HttpEntryDispose () */
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* XFSHttpEntry Methods ...                                          */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-LIB_EXPORT
-rc_t CC
-XFSHttpEntryAddRef ( const struct XFSHttpEntry * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    switch ( KRefcountAdd ( & ( self -> refcount ), _sXFSHttpEntry_classname ) ) {
-        case krefOkay :
-                    RCt = 0;
-                    break;
-        case krefZero :
-        case krefLimit :
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSHttpEntryAddRef () */
-
-LIB_EXPORT
-rc_t CC
-XFSHttpEntryRelease ( const struct XFSHttpEntry * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    switch ( KRefcountDrop ( & ( self -> refcount ), _sXFSHttpEntry_classname ) ) {
-
-        case krefOkay :
-        case krefZero :
-                    RCt = 0;
-                    break;
-        case krefWhack :
-                    RCt = _HttpEntryDispose ( ( struct XFSHttpEntry * ) self );
-                    break;
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSHttpEntryRelease () */
-
-LIB_EXPORT
-bool CC
-XFSHttpEntryIsFolder ( const struct XFSHttpEntry * self )
-{
-    return self == NULL ? false : ( self -> is_folder );
-}   /* XFSHttpEntryIsFolder () */
-
-LIB_EXPORT
-const char * CC
-XFSHttpEntryName ( const struct XFSHttpEntry * self )
-{
-    return self == NULL ? NULL : ( self -> name );
-}   /* XFSHttpEntryName () */
-
-LIB_EXPORT
-const char * CC
-XFSHttpEntryUrl ( const struct XFSHttpEntry * self )
-{
-    return self == NULL ? NULL : ( self -> url );
-}   /* XFSHttpEntryUrl () */
-
-LIB_EXPORT
-uint32_t CC
-XFSHttpEntryUrlHash ( const struct XFSHttpEntry * self )
-{
-    return self == NULL ? 0 : ( self -> url_hash );
-}   /* XFSHttpEntryUrlHash () */
-
-static
-rc_t CC
-_HttpCheckLoadList ( const struct XFSHttpEntry * self )
-{
-    rc_t RCt;
-    struct XFSHttpEntry * Entry;
-
-    RCt = 0;
-    Entry = ( struct XFSHttpEntry * ) self;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> is_folder ) {
-        if ( self -> status == kxfsReady ) {
-            RCt = _HttpLoadDirEntry ( self );
-
-            Entry -> status = ( RCt == 0 ? kxfsComplete : kxfsBroken );
-        }
-    }
-
-    if ( self -> status != kxfsComplete
-        && self -> status != kxfsReady ) {
-        RCt = XFS_RC ( rcInvalid );
-    }
-
-    return RCt;
-}   /* _HttpCheckLoadList () */
-
-LIB_EXPORT
-rc_t CC
-XFSHttpEntryList (
-                const struct XFSHttpEntry * self,
-                struct KNamelist ** List
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( List != NULL ) {
-        * List = NULL;
-    }
-
-    if ( self == NULL || List == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( ! self -> is_folder ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = _HttpCheckLoadList ( self );
-    if ( RCt == 0 ) {
-            /* TODO : think where to keep empty list ?
-             */
-        RCt = VNamelistToNamelist ( self -> list, List );
-    }
-
-    return RCt;
-}   /* XFSHttpEntryList () */
-
-LIB_EXPORT
-rc_t CC
-XFSHttpEntrySize ( const struct XFSHttpEntry * self, uint64_t * Size )
-{
-    if ( Size != NULL ) {
-        * Size = 0;
-    }
-
-    if ( self == NULL || Size == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Size = self -> size;
-
-    return 0;
-}   /* XFSHttpEntrySize () */
-
-LIB_EXPORT
-rc_t CC
-XFSHttpEntryTime ( const struct XFSHttpEntry * self, KTime_t * Time )
-{
-    if ( Time != NULL ) {
-        * Time = 0;
-    }
-
-    if ( self == NULL || Time == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Time = self -> time;
-
-    return 0;
-}   /* XFSHttpEntryTime () */
-
-LIB_EXPORT
-bool CC
-XFSHttpEntryGood ( const struct XFSHttpEntry * self )
-{
-    if ( self != NULL ) {
-        return self -> status == kxfsReady
-                    || self -> status == kxfsComplete;
-    }
-    return false;
-}   /* XFSHttpEntryGood () */
-
-LIB_EXPORT
-bool CC
-XFSHttpEntryHas (
-                const struct XFSHttpEntry * self,
-                const char * ChildName
-)
-{
-    rc_t RCt;
-    uint32_t Cnt, llp;
-    const char * Name;
-    size_t CSz, NSz;
-
-    RCt = 0;
-    Cnt = llp = 0;
-    Name = NULL;
-    CSz = NSz = 0;
-
-    if ( self != NULL && ChildName != NULL ) {
-        CSz = string_size ( ChildName );
-
-        if ( self -> list != NULL ) {
-            RCt = VNameListCount ( self -> list, & Cnt );
-            if ( RCt == 0 ) {
-                for ( llp = 0; llp < Cnt; llp ++ ) {
-                    RCt = VNameListGet ( self -> list, llp, & Name );
-                    if ( RCt == 0 ) {
-                        NSz = string_size ( Name );
-                        if ( NSz == CSz ) {
-                            if ( string_cmp ( ChildName, CSz, Name, CSz, CSz ) == 0 ) {
-                                return true;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-    return false;
-}   /* XFSHttpEntryHas () */
-
-LIB_EXPORT
-rc_t CC
-XFSHttpEntryGet (
-                const struct XFSHttpEntry * self,
-                const char * ChildName,
-                const struct XFSHttpEntry ** Child
-)
-{
-    rc_t RCt;
-    const char * ChildPath;
-    const struct XFSHttpEntry * RetChild;
-
-    RCt = 0;
-    ChildPath = NULL;
-
-    if ( Child != NULL ) {
-        * Child = NULL;
-    }
-
-    if ( self == NULL || ChildName == NULL || Child == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = _HttpMakeUrlFromPath ( self -> url, ChildName, & ChildPath );
-    if ( RCt == 0 ) {
-        RCt = _HttpEDGet ( ChildPath, & RetChild );
-        if ( RCt == 0 ) {
-            * Child = RetChild;
-        }
-
-        free ( ( char * ) ChildPath );
-        ChildPath = NULL;
-    }
-
-    return RCt;
-}   /* XFSHttpEntryGet () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-LIB_EXPORT
-rc_t CC
-XFSHttpRehash ()
-{
-    return _HttpEDClear () ;
-}   /* XFSHttpRehash () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* XFSHttpReader Methods ...                                         */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-LIB_EXPORT
-rc_t CC
-XFSHttpReaderMake (
-                const struct XFSHttpEntry * Entry,
-                const struct XFSHttpReader ** Reader
-)
-{
-    rc_t RCt;
-    struct XFSHttpReader * RetReader;
-
-    RCt = 0;
-    RetReader = NULL;
-
-    if ( Reader != NULL ) {
-        * Reader = NULL;
-    }
-
-    if ( Entry == NULL || Reader == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RetReader = calloc ( 1, sizeof ( struct XFSHttpReader ) );
-    if ( RetReader == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = XFSHttpEntryAddRef ( Entry );
-    if ( RCt == 0 ) {
-        RetReader -> entry = Entry;
-
-        KRefcountInit (
-                    & ( RetReader -> refcount ),
-                    1,
-                    _sXFSHttpReader_classname,
-                    "XFSHttpReaderMake",
-                    "HttpReader"
-                    );
-
-        * Reader = RetReader;
-    }
-    else {
-        free ( RetReader );
-    }
-
-    return RCt;
-}   /* XFSHttpReaderMake () */
-
-LIB_EXPORT
-rc_t CC
-XFSHttpReaderAddRef ( const struct XFSHttpReader * self )
-{
-    rc_t RCt;
-    struct XFSHttpReader * Reader;
-    uint32_t hash;
-
-    RCt = 0;
-    Reader = ( struct XFSHttpReader * ) self;
-    hash = 0;
-
-    if ( Reader == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Reader -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    hash = Reader -> entry -> url_hash;
-    RCt = _HttpEDLock ( hash );
-    if ( RCt == 0 ) {
-        switch ( KRefcountAdd ( & ( Reader -> refcount ), _sXFSHttpReader_classname ) ) {
-            case krefOkay :
-                        RCt = 0;
-                        break;
-            case krefZero :
-            case krefLimit :
-            case krefNegative :
-                        RCt = XFS_RC ( rcInvalid );
-                        break;
-            default :
-                        RCt = XFS_RC ( rcUnknown );
-                        break;
-        }
-
-        RCt = _HttpEDUnlock ( hash );
-    }
-
-    return RCt;
-}   /* XFSHttpReaderAddRef () */
-
-static
-rc_t CC
-_HttpReaderDispose ( const struct XFSHttpReader * self )
-{
-    struct XFSHttpReader * Reader;
-
-    Reader = ( struct XFSHttpReader * ) self;
-
-    if ( Reader == NULL ) {
-        return 0;
-    }
-
-        /* TODO We are not removing data from queue, it will die itself
-         */
-
-    KRefcountWhack (
-                & ( Reader -> refcount ),
-                _sXFSHttpReader_classname
-                );
-
-    if ( Reader -> entry != NULL ) {
-        _HttpHsDelete ( _ED () -> http_hs, Reader -> entry );
-
-        XFSHttpEntryRelease ( Reader -> entry );
-
-        Reader -> entry = NULL;
-    }
-
-    free ( Reader );
-
-    return 0;
-}   /* _HttpReaderDispose () */
-
-LIB_EXPORT
-rc_t CC
-XFSHttpReaderRelease ( const struct XFSHttpReader * self )
-{
-    rc_t RCt;
-    struct XFSHttpReader * Reader;
-    uint32_t hash;
-
-    RCt = 0;
-    Reader = ( struct XFSHttpReader * ) self;
-    hash = 0;
-
-    if ( Reader == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Reader -> entry == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    hash = Reader -> entry -> url_hash;
-    RCt = _HttpEDLock ( hash );
-    if ( RCt == 0 ) {
-        switch ( KRefcountDrop ( & ( Reader -> refcount ), _sXFSHttpReader_classname ) ) {
-            case krefOkay :
-            case krefZero :
-                        RCt = 0;
-                        break;
-            case krefWhack :
-                        RCt = 0;
-                        _HttpReaderDispose ( Reader );
-                        break;
-            case krefNegative :
-                        RCt = XFS_RC ( rcInvalid );
-                        break;
-            default :
-                        RCt = XFS_RC ( rcUnknown );
-                        break;
-        }
-
-        RCt = _HttpEDUnlock ( hash );
-    }
-
-    return RCt;
-}   /* XFSHttpReaderRelease () */
-
-static
-rc_t CC
-_CheckResoveOpen (
-            const struct XFSHttpEntry * self,
-            const struct KFile ** File
-)
-{
-    rc_t RCt;
-    struct XFSHttpEntry * Entry;
-    const struct KFile * TheFile;
-    uint64_t Size;
-
-    RCt = 0;
-    Entry = ( struct XFSHttpEntry * ) self;
-    TheFile = NULL;
-    Size = 0;
-
-    if ( File != NULL ) {
-        * File = NULL;
-    }
-
-    if ( File == NULL || self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> status == kxfsInvalid
-        || self -> status == kxfsBroken ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-
-    RCt = _HttpEDGetFileForEntry ( self, & TheFile );
-    if ( RCt != 0 ) {
-        ( ( struct XFSHttpEntry * ) self ) -> status = kxfsBroken;
-    }
-    else {
-        if ( self -> status == kxfsReady ) {
-            if ( ! self -> is_folder ) {
-                    /* Here we are reading real file size */
-                RCt = KFileSize ( TheFile, & Size );
-                if ( RCt == 0 ) {
-                    Entry -> size = Size;
-                }
-                else {
-                    RCt = 0; // TODO: not sure about it
-                }
-            }
-        }
-
-        ( ( struct XFSHttpEntry * ) self ) -> status = kxfsComplete;
-        * File = TheFile;
-    }
-
-    return RCt;
-}   /* _CheckResoveOpen () */
-
-
-LIB_EXPORT
-rc_t CC
-XFSHttpReaderRead (
-                const struct XFSHttpReader * self,
-                uint64_t Offset,
-                void * Buffer,
-                size_t BufferSize,
-                size_t * NumRead
-)
-{
-    rc_t RCt;
-    const struct KFile * File;
-
-    RCt = 0;
-    File = NULL;
-
-    if ( self == NULL || Buffer == NULL || NumRead == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( BufferSize == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = _HttpEDLock ( self -> entry -> url_hash );
-    if ( RCt == 0 ) {
-
-        RCt = _CheckResoveOpen ( self -> entry, &File );
-        if ( RCt == 0 ) {
-            RCt = KFileRead (
-                            File,
-                            Offset,
-                            Buffer,
-                            BufferSize,
-                            NumRead
-                            );
-            KFileRelease ( File );
-        }
-        _HttpEDUnlock ( self -> entry -> url_hash );
-    }
-
-    return RCt;
-}   /* XFSHttpReaderRead () */
-
-static
-rc_t CC
-_HttpMakeBuffer ( uint64_t Size, void ** Buffer )
-{
-    char * BF;
-
-    BF = NULL;
-
-    if ( Buffer == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Buffer = NULL;
-
-    if ( Size == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    BF = calloc ( ( size_t ) Size, sizeof ( char ) );
-    if ( BF == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-    BF [ Size - 1 ] = 0;
-
-    * Buffer = ( void * ) BF;
-
-    return 0;
-}   /* _HttpMakeBuffer () */
-
-/*))
- // We do suppose that size of readed data will not exceed 128K
-((*/
-#define XFS_MAX_DIR_BUFFER 131072
-
-static
-rc_t CC
-_xStreamReadAll ( const char * Url, void ** Buffer, size_t * NumRead )
-{
-    rc_t RCt;
-    const struct XFSHttpStream * Stream;
-    char * BF;
-    uint64_t SZ, Off;
-    size_t NumR;
-
-    RCt = 0;
-    Stream = NULL;
-    BF = NULL;
-    SZ = XFS_MAX_DIR_BUFFER;
-    Off = 0;
-    NumR = 0;
-
-    if ( Buffer != NULL ) {
-        * Buffer = NULL;
-    }
-
-    if ( NumRead != NULL ) {
-        * NumRead = 0;
-    }
-
-    if ( Url == NULL || Buffer == NULL || NumRead == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = XFS_HttpStreamMake_ZHR ( Url, & Stream );
-    if ( RCt == 0 ) {
-        RCt = _HttpMakeBuffer ( SZ, ( void ** ) & BF );
-        if ( RCt == 0 ) {
-            while ( ! XFS_HttpStreamCompleted_ZHR ( Stream ) ) {
-                RCt = XFS_HttpStreamRead_ZHR (
-                                            Stream,
-                                            BF + Off,
-                                            ( size_t ) ( SZ - Off ),
-                                            & NumR
-                                            );
-                if ( RCt != 0 ) {
-                    break;
-                }
-
-                if ( NumR != 0 && SZ <= ( Off + NumR ) ) {
-                    RCt = XFS_RC ( rcInvalid );
-
-                    break;
-                }
-
-                Off += NumR;
-                NumR = 0;
-            }
-
-            if ( RCt == 0 ) {
-                * Buffer = BF;
-                * NumRead = ( size_t ) Off;
-            }
-        }
-
-        XFS_HttpStreamDispose_ZHR ( Stream );
-    }
-
-    if ( RCt != 0 ) {
-        * Buffer = NULL;
-        * NumRead = 0;
-
-        if ( BF != NULL ) {
-            free ( BF );
-        }
-    }
-
-    return RCt;
-}   /* _xStreamReadAll () */
-
-struct _BufferLR {
-    const char * buffer;
-    size_t length;
-
-    size_t line_start;
-    size_t line_end;
-    size_t line_no;
-};
-
-static
-rc_t CC
-_BufferLRInit (
-            struct _BufferLR * self,
-            const char * Buffer,
-            size_t Length
-)
-{
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    self -> buffer = Buffer;
-    self -> length = Length;
-    self -> line_start = 0;
-    self -> line_end = 0;
-    self -> line_no = 0;
-
-    return 0;
-}   /* _BufferLRInit () */
-
-static
-rc_t CC
-_BufferLRWhack ( struct _BufferLR * self )
-{
-    if ( self != NULL ) {
-        self -> buffer = NULL;
-        self -> length = 0;
-        self -> line_start = 0;
-        self -> line_end = 0;
-        self -> line_no = 0;
-    }
-    return 0;
-}   /* _BufferLRWhack () */
-
-static
-bool CC
-_BufferLRNext (
-            struct _BufferLR * self,
-            const char ** NextLine,
-            size_t * Length
-)
-{
-    const char * start, * end, * kirdyk;
-
-    start = end = kirdyk = NULL;
-
-    if ( NextLine != NULL ) {
-        * NextLine = NULL;
-    }
-
-    if ( Length != NULL ) {
-        * Length = 0;
-    }
-
-    if ( self == NULL || NextLine == NULL || Length == NULL ) {
-        return false;
-    }
-
-        /* Line number, just for case */
-    self -> line_no ++;
-
-    kirdyk = self -> buffer + self -> length;
-    start = self -> buffer + self -> line_start;
-    end = self -> buffer + self -> line_end;
-
-        /* First, we are looking for start of new line */
-    start = NULL;
-    while ( end < kirdyk ) {
-        if ( isalnum ( * end ) || * end == '<' ) {
-            start = end;
-            break;
-        }
-        end ++;
-    }
-    if ( start == NULL ) {
-        return false;
-    }
-
-        /* Second we are looking for end of new line */
-    end ++;
-    while ( end < kirdyk ) {
-        if ( * end == '\n' ) {
-            break;
-        }
-
-        end ++;
-    }
-
-    self -> line_start = start - self -> buffer;
-    self -> line_end = end - self -> buffer;
-
-    * NextLine = start;
-    * Length = end - start;
-
-    return true;
-}   /* _BufferLRNext () */
-
-static
-bool CC
-_GetAnchor (
-        const char * Start,
-        const char * End,
-        const char ** AncStart,
-        const char ** AncEnd
-)
-{
-    const char * AncS, * AncE, * AncP;
-
-    AncS = AncE = AncP = NULL;
-
-    /* We are looking for "<a href ... </a>" tag */
-
-    AncP = Start;
-    while ( AncP < End ) {
-        if ( * AncP == '<' ) {
-            if ( 2 <= ( End - AncP ) ) {
-                if ( * ( AncP + 1 ) == 'a' && * ( AncP + 2 ) == ' ' ) {
-                    AncS = AncP;
-                    AncP += 8;
-
-                    break;
-                }
-            }
-        }
-
-        AncP ++;
-    }
-
-    if ( AncS == NULL ) {
-        return false;
-    }
-
-    while ( AncP < End ) {
-        if ( * AncP == '<' ) {
-            if ( 3 <= ( End - AncP ) ) {
-                if ( * ( AncP + 1 ) == '/' && * ( AncP + 2 ) == 'a' && * ( AncP + 3 ) == '>' ) {
-                    AncE = AncP + 4;
-
-                    break;
-                }
-            }
-        }
-
-        AncP ++;
-    }
-
-    if ( AncE == NULL ) {
-        return false;
-    }
-
-    * AncStart = AncS;
-    * AncEnd = AncE;
-
-    return true;
-}   /* _GetAnchor () */
-
-static
-bool CC
-_GetAnchorName (
-            const char * Start,
-            const char * End,
-            char ** Name,
-            bool * IsDir
-)
-{
-    const char * nS, * nE, * nP;
-    bool Dir;
-
-    nS = nE = nP = NULL;
-    Dir = false;
-
-    * Name = NULL;
-    * IsDir = false;
-
-    nP = Start;
-    while ( nP < End ) {
-        if ( * nP == '"' ) {
-            if ( 1 <= ( End - nP ) ) {
-                nP ++;
-                nS = nP;
-            }
-            break;
-        }
-
-        nP ++;
-    }
-    if ( nS == NULL ) {
-        return false;
-    }
-
-    while ( nP < End ) {
-        if ( * nP == '"' ) {
-            nE = nP;
-
-            break;
-        }
-
-        nP ++;
-    }
-    if ( nE == NULL ) {
-        return false;
-    }
-
-    if ( * ( nE - 1 ) == '/' ) {
-        Dir = true;
-        nE --;
-    }
-
-    if ( nE == nS ) {
-        return false;
-    }
-
-    * Name = string_dup ( nS, nE - nS );
-    * IsDir = Dir;
-
-    return * Name != NULL;
-}   /* _GetAnchorName () */
-
-static
-rc_t CC
-_GetNameFrom (
-            const char * Start,
-            const char * End,
-            char ** Name,
-            bool * IsDir,
-            const char ** Next
-)
-{
-    char * TheName;
-    const char * aS, * aE;
-
-    TheName = NULL;
-    aS = aE = NULL;
-
-    if ( Name != NULL ) {
-        * Name = NULL;
-    }
-
-    if ( Next != NULL ) {
-        * Next = NULL;
-    }
-
-    if ( IsDir != NULL ) {
-        * IsDir = false;
-    }
-
-    if ( Start == NULL || End == NULL || Name == NULL || Next == NULL || IsDir == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( ! _GetAnchor ( Start, End, & aS, & aE ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( ! _GetAnchorName ( aS, aE, & TheName, IsDir ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    * Name = TheName;
-    * Next = aE + 1;
-
-    return 0;
-}   /* _GetNameFrom () */
-
-static
-rc_t CC
-_GetTimeFrom (
-            const char * Start,
-            const char * End,
-            int64_t * Time,
-            const char ** Next
-)
-{
-    static const char * MNT [ 12 ] = {
-                        "Jan", "Feb", "Mar", "Apr", "May", "Jun",
-                        "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-                        };
-    const char * Pos;
-    int Day, Year, Hour, Minute, Ret;
-    char Month [ 8 ];
-    struct tm Tm;
-
-    Pos = NULL;
-    Day = Year = Hour = Minute = Ret = 0;
-    * Month = 0;
-    memset ( & Tm, 0, sizeof ( struct tm ) );
-
-    if ( Time != NULL ) {
-        * Time = 0;
-    }
-    if ( Next != NULL ) {
-        * Next = NULL;
-    }
-
-    if ( Start == NULL || End == NULL || Time == NULL || Next == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-        /* We are parsing format "dd-mmm-YYYY HH:MM"
-         */
-    Start = XFS_SkipSpaces_ZHR ( Start, End );
-    if ( Start == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Pos = Start + 17;
-    Pos = XFS_SkipSpaces_ZHR ( Pos, End );
-
-    Ret = sscanf (
-            Start,
-            "%2d-%3s-%4d %2d:%2d",
-            & Day,
-            Month,
-            & Year,
-            & Hour,
-            & Minute
-            ); 
-    if ( Ret != 5 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    for ( Ret = 0; Ret < 12; Ret ++ ) {
-        if ( strncmp ( MNT [ Ret ], Month, 3 ) == 0 ) {
-            break;
-        }
-    }
-
-    if ( Ret == 12 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Tm . tm_min = Minute;
-    Tm . tm_hour = Hour;
-    Tm . tm_year = Year - 1900;
-    Tm . tm_mon = Ret;
-    Tm . tm_mday = Day;
-
-    * Time = mktime ( & Tm );
-    * Next = Pos;
-
-    return 0;
-}   /* _GetTimeFrom () */
-
-static
-rc_t CC
-_GetSizeFrom (
-            const char * Start,
-            const char * End,
-            uint64_t * Size,
-            const char ** Next
-)
-{
-    const char * Pos;
-    uint64_t TheSize;
-    float PP;
-    int Ret;
-
-    Pos = NULL;
-    TheSize = 0;
-    PP = 0;
-    Ret = 0;
-
-    if ( Size != NULL ) {
-        * Size = 0;
-    }
-
-    if ( Next != NULL ) {
-        * Next = NULL;
-    }
-
-    if ( Start == NULL || End == NULL || Size == NULL || Next == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Start = XFS_SkipSpaces_ZHR ( Start, End );
-    if ( Start == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Pos = XFS_SkipLetters_ZHR ( Start, End );
-    if ( Pos == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    Ret = sscanf ( Start, "%f", & PP );
-    if ( Ret != 1 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    switch ( * ( Pos - 1 ) ) {
-        case 'K' : TheSize = ( uint64_t ) ( PP * 1024.0 ); break;
-        case 'M' : TheSize = ( uint64_t ) ( PP * 1048576.0 ); break;
-        case 'G' : TheSize = ( uint64_t ) ( PP * 1073741824.0 ); break;
-        default  : TheSize = ( uint64_t ) ( PP * 1.0 ); break;
-    }
-
-    * Size = TheSize;
-    * Next = Pos;
-
-    return 0;
-}   /* _GetSizeFrom () */
-
-/*|
-|*  Very simple format of line. For file :
- *|
-|*      name     dd-MMM-YYYY HH:MM   size
- *|
-|*  For directory :
- *|
-|*      name/    dd-MMM-YYYY HH:MM     -
- *|
-|*  Bad thing : ther is no method to convert string to time
- *|
-|*/
-
-static
-rc_t CC
-_HttpParseLine (
-            const char * Line,
-            size_t Length,
-            char ** Name,
-            uint64_t * Size,
-            int64_t * Time,
-            bool * IsDir
-)
-{
-    rc_t RCt;
-    const char * start, * end, * pos;
-    char * TheName;
-    bool TheIsDir;
-
-
-    RCt = 0;
-    start = end = pos = NULL;
-    TheName = NULL;
-    TheIsDir = false;
-
-    if ( Name != NULL ) {
-        * Name = NULL;
-    }
-
-    if ( Size != NULL ) {
-        * Size = 0;
-    }
-
-    if ( Time != NULL ) {
-        * Time = 0;
-    }
-
-    if ( IsDir != NULL ) {
-        * IsDir = false;
-    }
-
-    if ( Line == NULL || Length == 0 || Name == NULL || Size == NULL || Time == NULL || IsDir == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-        /* first we are extracting Name of entry */
-    start = Line;
-    end = start + Length;
-    RCt = _GetNameFrom ( start, end, & TheName, & TheIsDir, & start );
-    if ( RCt == 0 ) {
-
-        RCt = _GetTimeFrom ( start, end, Time, & start );
-        if ( RCt == 0 ) {
-
-            if ( ! TheIsDir ) {
-                RCt = _GetSizeFrom ( start, end, Size, & start );
-            }
-
-        }
-    }
-
-    if ( RCt == 0 ) {
-        * Name = TheName;
-        * IsDir = TheIsDir;
-    }
-    else {
-        free ( TheName );
-    }
-
-    return RCt;
-}   /* _HttpParseLine () */
-
-static
-rc_t CC
-_HttpParseEntry (
-                const struct XFSHttpEntry * self,
-                const char * Line,
-                size_t Length
-)
-{
-    rc_t RCt;
-    struct XFSHttpEntry * NewEntry;
-    char * Name;
-    uint64_t Size;
-    int64_t Time;
-    bool IsDir;
-
-    RCt = 0;
-    NewEntry = NULL;
-    Name = NULL;
-    Size = 0;
-    Time = 0;
-    IsDir = false;
-
-    if ( self == NULL || Line == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Length == 0 ) {
-        return XFS_RC ( rcInvalid );
-    } 
-
-    RCt = _HttpParseLine (
-                        Line,
-                        Length,
-                        & Name,
-                        & Size,
-                        & Time,
-                        & IsDir
-                        );
-    if ( RCt == 0 ) {
-            /*) First we should add name to list of items
-             (*/
-        RCt = VNamelistAppend ( self -> list, Name );
-        if ( RCt == 0 ) {
-                /*) Second we should add new entry to ED
-                 (*/
-            RCt = _HttpCreateEntry (
-                                self -> url,
-                                Name,
-                                IsDir,
-                                Size,
-                                Time,
-                                & NewEntry
-                                );
-            if ( RCt == 0 ) {
-                RCt = _HttpEDAdd ( NewEntry );
-                if ( RCt != 0 ) {
-                    _HttpEntryDispose ( NewEntry );
-                }
-            }
-        }
-
-        free ( Name );
-    }
-
-    return 0;
-}   /* _HttpParseEntry () */
-
-static
-rc_t CC
-_HttpParseFolder (
-            const struct XFSHttpEntry * self,
-            char * Buffer,
-            size_t BufferSize
-)
-{
-    rc_t RCt;
-    struct _BufferLR LineReader;
-    const char * Line;
-    size_t LineLength;
-
-    RCt = 0;
-    Line = NULL;
-    LineLength = 0;
-
-    RCt = _BufferLRInit ( & LineReader, Buffer, BufferSize );
-    if ( RCt == 0 ) {
-        while ( _BufferLRNext ( & LineReader, & Line, & LineLength ) ) {
-            if ( Line != NULL && LineLength != 0 ) {
-                RCt = _HttpParseEntry ( self, Line, LineLength );
-                if ( RCt != 0 ) {
-                        /*) TODO: It is OK, we will report on that only
-                         (*/
-                    RCt = 0;
-                }
-            }
-        }
-        _BufferLRWhack ( & LineReader );
-    }
-
-    return RCt;
-}   /* _HttpParseFolder () */
-
-rc_t CC
-_HttpLoadDirEntry ( const struct XFSHttpEntry * self )
-{
-    rc_t RCt;
-    char * Buffer;
-    size_t NumRead;
-
-    RCt = 0;
-    Buffer = NULL;
-    NumRead = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = _xStreamReadAll (
-                        self -> url,
-                        ( void ** ) & Buffer,
-                        & NumRead
-                        );
-    if ( RCt == 0 ) {
-        if ( Buffer != NULL ) {
-            RCt = _HttpParseFolder ( self, Buffer, NumRead );
-            if ( RCt != 0 ) {
-                    /* I am not sure, but I will do it */
-                RCt = 0;
-
-                ( ( struct XFSHttpEntry * ) self ) -> status
-                                                        = kxfsBroken;
-            }
-            else {
-                ( ( struct XFSHttpEntry * ) self ) -> status
-                                                        = kxfsComplete;
-            }
-
-            free ( Buffer );
-        }
-    }
-
-    return RCt;
-}   /* _HttpLoadDirEntry () */
diff --git a/libs/xfs/xhttp.h b/libs/xfs/xhttp.h
deleted file mode 100644
index 7a4c108..0000000
--- a/libs/xfs/xhttp.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _xhttp_h_
-#define _xhttp_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   There is some interface build to implement access to files
-  ))))  through HTTP
- ((((*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct XFSHttp;
-struct XFSHttpEntry;
-struct XFSHttpReader;
-struct KNamelist;
-
-/*))
- //     Standard method of loading/uploading
-((*/
-XFS_EXTERN rc_t CC XFSHttpMake (
-                            const char * BaseUrl,
-                            const struct XFSHttp ** Http
-                            );
-XFS_EXTERN rc_t CC XFSHttpDispose (
-                            const struct XFSHttp * self
-                            );
-
-XFS_EXTERN rc_t CC XFSHttpAddRef (
-                            const struct XFSHttp * self
-                            );
-XFS_EXTERN rc_t CC XFSHttpRelease (
-                            const struct XFSHttp * self
-                            );
-
-/*))
- //     Accessing HttpItems
-((*/
-
-/*||
-  ||    Note, while accessing HttpEntry by Has adn Get methods
-  ||    the Path relative to Http base URL should be used
-  ||*/
-XFS_EXTERN const char * CC XFSHttpBaseUrl (
-                            const struct XFSHttp * self
-                            );
-XFS_EXTERN bool CC XFSHttpHasEntry (
-                            const struct XFSHttp * self,
-                            const char * Path
-                            );
-XFS_EXTERN const struct XFSHttpEntry * CC XFSHttpGetEntry (
-                            const struct XFSHttp * self,
-                            const char * Path
-                            );
-XFS_EXTERN rc_t CC XFSHttpGetOrCreateEntry (
-                            const struct XFSHttp * self,
-                            const char * Path,
-                            const struct XFSHttpEntry ** Entry
-                            );
-
-/*))
- //     HttpEntry content
-((*/
-
-XFS_EXTERN rc_t CC XFSHttpEntryAddRef (
-                            const struct XFSHttpEntry * self
-                            );
-XFS_EXTERN rc_t CC XFSHttpEntryRelease (
-                            const struct XFSHttpEntry * self
-                            );
-
-XFS_EXTERN bool CC XFSHttpEntryIsFolder (
-                            const struct XFSHttpEntry * self
-                            );
-XFS_EXTERN const char * CC XFSHttpEntryName (
-                            const struct XFSHttpEntry * self
-                            );
-XFS_EXTERN const char * CC XFSHttpEntryUrl (
-                            const struct XFSHttpEntry * self
-                            );
-XFS_EXTERN uint32_t CC XFSHttpEntryUrlHash (
-                            const struct XFSHttpEntry * self
-                            );
-XFS_EXTERN rc_t CC XFSHttpEntryList (
-                            const struct XFSHttpEntry * self,
-                            struct KNamelist ** List
-                            );
-XFS_EXTERN rc_t CC XFSHttpEntrySize (
-                            const struct XFSHttpEntry * self,
-                            uint64_t * Size
-                            );
-XFS_EXTERN rc_t CC XFSHttpEntryTime (
-                            const struct XFSHttpEntry * self,
-                            KTime_t * Time
-                            );
-XFS_EXTERN bool CC XFSHttpEntryGood (
-                            const struct XFSHttpEntry * self
-                            );
-    /*))    Access to children nodes by name
-     ((*/
-XFS_EXTERN bool CC XFSHttpEntryHas (
-                            const struct XFSHttpEntry * self,
-                            const char * ChildName
-                            );
-XFS_EXTERN rc_t CC XFSHttpEntryGet (
-                            const struct XFSHttpEntry * self,
-                            const char * ChildName,
-                            const struct XFSHttpEntry ** Child
-                            );
-
-/*))
- //     Special treatment
-((*/
-XFS_EXTERN rc_t CC XFSHttpRehash ();
-
-/*))
- //     XFSHttpReader
-((*/
-XFS_EXTERN rc_t CC XFSHttpReaderMake (
-                            const struct XFSHttpEntry * Entry,
-                            const struct XFSHttpReader ** Reader
-                            );
-
-XFS_EXTERN rc_t CC XFSHttpReaderAddRef (
-                            const struct XFSHttpReader * self
-                            );
-XFS_EXTERN rc_t CC XFSHttpReaderRelease (
-                            const struct XFSHttpReader * self
-                            );
-
-XFS_EXTERN rc_t CC XFSHttpReaderRead (
-                            const struct XFSHttpReader * self,
-                            uint64_t Offset,
-                            void * Buffer,
-                            size_t BufferSize,
-                            size_t * NumRead
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _xhttp_h_ */
diff --git a/libs/xfs/xlog.c b/libs/xfs/xlog.c
deleted file mode 100644
index 848decc..0000000
--- a/libs/xfs/xlog.c
+++ /dev/null
@@ -1,295 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/text.h>
-#include <klib/printf.h>
-#include <klib/log.h>
-#include <klib/debug.h>
-#include <klib/status.h>
-#include <kproc/lock.h>
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-#include <xfs/xlog.h>
-#include "schwarzschraube.h"
-
-#include <sysalloc.h>
-
- /*))))
-   |||| That file contains unsoted methods
-   ((((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- || Setting log file is tricky and platform dependent
-((*/
-
-struct _LWr {
-    struct KLock * mutabor;
-
-    const char * path;
-    struct KFile * file;
-
-    uint64_t pos;
-};
-
-static struct _LWr * _sLWr = NULL;
-
-static
-rc_t CC
-_LWrClose ( struct _LWr * self )
-{
-    rc_t RCt = 0;
-
-    XFS_CAN ( self )
-
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-        if ( self -> file != NULL ) {
-            KFileRelease ( self -> file );
-            self -> file = NULL;
-        }
-
-        KLockUnlock ( self -> mutabor );
-    }
-
-    return 0;
-}   /* _LWrClose () */
-
-static
-rc_t CC
-_LWrOpen ( struct _LWr * self )
-{
-    rc_t RCt;
-    struct KDirectory * NatDir;
-
-    RCt = 0;
-    NatDir = NULL;
-
-    XFS_CAN ( self )
-
-    RCt = KLockAcquire ( self -> mutabor );
-    if ( RCt == 0 ) {
-        if ( self -> file == NULL ) {
-            RCt = KDirectoryNativeDir ( & NatDir );
-            if ( RCt == 0 ) {
-                RCt = KDirectoryCreateFile (
-                                            NatDir,
-                                            & ( self -> file ),
-                                            false,
-                                            0664,
-                                            kcmSharedAppend,
-                                            self -> path
-                                            );
-                if ( RCt == 0 ) {
-                    RCt = KFileSize (
-                                    self -> file,
-                                    & ( self -> pos )
-                                    );
-                }
-                KDirectoryRelease ( NatDir );
-            }
-
-        }
-        KLockUnlock ( self -> mutabor );
-    }
-
-    if ( RCt != 0 ) {
-        _LWrClose ( self );
-    }
-
-    return 0;
-}   /* _LWrOpen () */
-
-static
-rc_t CC
-_LWrDispose ( struct _LWr * self )
-{
-    if ( self != NULL ) {
-        _LWrClose ( self );
-
-        if ( self -> mutabor != NULL ) {
-            KLockRelease ( self -> mutabor );
-            self -> mutabor = NULL;
-        }
-
-        if ( self -> path != NULL ) {
-            free ( ( char * ) self -> path );
-            self -> path = NULL;
-        }
-
-        self -> pos = 0;
-
-        free ( self );
-    }
-
-    return 0;
-}   /* _LWrDispose () */
-
-static 
-rc_t CC
-_LWrMake ( struct _LWr ** Writer, const char * LogFile )
-{
-    rc_t RCt;
-    struct _LWr * TheWriter;
-
-    RCt = 0;
-    TheWriter = NULL;
-
-    XFS_CSAN ( Writer )
-    XFS_CAN ( Writer )
-    XFS_CAN ( LogFile )
-
-    TheWriter = calloc ( 1, sizeof ( struct _LWr ) );
-    if ( TheWriter == NULL ) {
-        RCt = XFS_RC ( rcExhausted );
-    }
-    else {
-        RCt = KLockMake ( & ( TheWriter -> mutabor ) );
-        if ( RCt == 0 ) {
-            RCt = XFS_StrDup ( LogFile, & ( TheWriter -> path ) );
-            if ( RCt == 0 ) {
-                TheWriter -> pos = 0;
-
-                * Writer = TheWriter;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Writer = NULL;
-
-        if ( TheWriter != NULL ) {
-            _LWrDispose ( TheWriter );
-        }
-    }
-
-    return RCt;
-}   /* _LWrMake () */
-
-static
-rc_t CC
-_LWrWriter ( void * self, const char * Bf, size_t BfS, size_t * NWr )
-{
-    rc_t RCt;
-    struct _LWr * Writer;
-
-    RCt = 0;
-    Writer = ( struct _LWr * ) self;
-
-    XFS_CSA ( NWr, 0 )
-    XFS_CAN ( Bf )
-    XFS_CAN ( NWr )
-
-    if ( self != NULL && Writer -> file != NULL ) {
-        RCt = KFileWriteAll ( Writer -> file, Writer -> pos, Bf, BfS, NWr );
-        if ( RCt == 0 ) {
-            Writer -> pos += * NWr;
-        }
-    }
-
-    return RCt;
-}   /* _LWrWriter () */
-
-static
-rc_t CC
-_LWrWriterDummy ( void * s, const char * b, size_t bs, size_t * w )
-{
-    if ( w != NULL ) {
-        * w = bs;
-    }
-
-    return 0;
-}   /* _LWrWriterDummy () */
-
-LIB_EXPORT
-rc_t CC
-XFSLogInit ( const char * LogFile )
-{
-    rc_t RCt;
-    struct _LWr * Writer;
-
-    RCt = 0;
-    Writer = NULL;
-
-    if ( LogFile != NULL ) {
-        if ( _sLWr == NULL ) {
-            RCt = _LWrMake ( & Writer, LogFile );
-            if ( RCt == 0 ) {
-                RCt = _LWrOpen ( Writer );
-                if ( RCt == 0 ) {
-                    _sLWr = Writer;
-
-                    KOutHandlerSet( _LWrWriter, Writer );
-                    KDbgHandlerSet( _LWrWriter, Writer );
-                    KLogHandlerSet( _LWrWriter, Writer );
-                    KLogLibHandlerSet( _LWrWriter, Writer );
-                    KStsHandlerSet( _LWrWriter, Writer );
-                    KStsLibHandlerSet( _LWrWriter, Writer );
-                }
-            }
-        }
-    }
-
-    if ( RCt != 0 || LogFile == NULL ) {
-        _sLWr = NULL;
-
-        if ( Writer != NULL ) {
-            _LWrDispose ( Writer );
-        }
-        KOutHandlerSet( _LWrWriterDummy, NULL );
-        KDbgHandlerSet( _LWrWriterDummy, NULL );
-        KLogHandlerSet( _LWrWriterDummy, NULL );
-        KLogLibHandlerSet( _LWrWriterDummy, NULL );
-        KStsHandlerSet( _LWrWriterDummy, NULL );
-        KStsLibHandlerSet( _LWrWriterDummy, NULL );
-    }
-
-    return 0;
-    return RCt;
-}   /* XFSLogInit () */
-
-LIB_EXPORT
-rc_t CC
-XFSLogDestroy ( )
-{
-    struct _LWr * Writer = _sLWr;
-    if ( Writer != NULL ) {
-        _sLWr = NULL;
-
-        _LWrClose ( Writer );
-        _LWrDispose ( Writer );
-    }
-
-    return 0;
-}   /* XFSLogDestroy () */
diff --git a/libs/xfs/xtar.c b/libs/xfs/xtar.c
deleted file mode 100644
index f6afa06..0000000
--- a/libs/xfs/xtar.c
+++ /dev/null
@@ -1,1248 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/container.h>
-#include <klib/namelist.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <kproc/lock.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/tar.h>
-
-#include <xfs/path.h>
-
-#include "schwarzschraube.h"
-#include "xtar.h"
-#include "zehr.h"
-#include "lockdpt.h"
-
-#include <sysalloc.h>
-
-#include <ctype.h>
-#include <time.h>
-
-/*||*\
-  || Lyrics:
-  || That file contains interface to TAR archive
-  || Tar archive is readed by using KDirectoryOpenTarArchive from
-  || kfs/tar.h
-  ||
-\*||*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*)) XFSTar and XFSTarEntry and _TarDpt ( TarDepot ) structs are
- ||  living here
-((*/
-
-/*))
- //  EntryDepot this is responsible for sharing Tar resources
-((*/
-struct _TarDpt {
-    BSTree tree;
-
-    KLock * mutabor;
-};
-
-/*)) 
- //  Path to a file and related KDirectory
-((*/
-struct XFSTar {
-    BSTNode node;
-
-    KRefcount refcount;
-    KLock * mutabor;
-
-    const char * source;
-    const struct KDirectory * dir;
-
-    XFSStatus status;
-};
-
-/*)) 
- //  Just a path to entry in TAR archive
-((*/
-struct XFSTarEntry {
-    KRefcount refcount; /* ??? */
-
-    const struct XFSTar * tar;    /* Way we go */
-
-    const char * name;
-    const char * path;
-
-    bool is_folder;
-
-    XFSStatus status;
-
-    const struct KFile * file;
-};
-
-/*) Usefuls
- (*/
-static const char * _sXFSTar_classname = "XFSTar";
-static const char * _sXFSTarEntry_classname = "XFSTarEntry";
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* _TarDpt Methods ...                                               */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static struct _TarDpt * _sTarDpt = NULL;
-
-static
-struct _TarDpt * CC
-_Dpt ()
-{
-    return _sTarDpt;
-}   /* _Dpt () */
-
-static
-void CC
-_TarDptWhackCallback ( BSTNode * Node, void * unused )
-{
-    if ( Node != NULL ) {
-        XFSTarDispose ( ( struct XFSTar * ) Node );
-    }
-}   /* _TarDptWhackCallback () */
-
-static
-rc_t CC
-_TarDptDisposeImpl ( struct _TarDpt * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self != NULL ) { 
-        BSTreeWhack (
-                    & ( self -> tree ),
-                    _TarDptWhackCallback,
-                    NULL
-                    );
-
-        if ( self -> mutabor != NULL ) {
-            KLockRelease ( self -> mutabor );
-            self -> mutabor = NULL;
-        }
-
-        free ( self );
-    }
-
-    return RCt;
-}   /* _TarDptDisposeImpl () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarDepotDispose ()
-{
-    struct _TarDpt * TarDpt;
-
-    TarDpt = _sTarDpt;
-    _sTarDpt = NULL;
-
-    if ( TarDpt != NULL ) {
-        _TarDptDisposeImpl ( TarDpt );
-    }
-
-    return 0;
-}   /* XFSTarDepotDispose () */
-
-static
-rc_t CC
-_TarDptMakeImpl ( struct _TarDpt ** TarDpt )
-{
-    rc_t RCt;
-    struct _TarDpt * TheD;
-
-    RCt = 0;
-    TheD = NULL;
-
-    if ( TarDpt != NULL ) {
-        * TarDpt = NULL;
-    }
-
-    if ( TarDpt == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    TheD = calloc ( 1, sizeof ( struct _TarDpt ) );
-    if ( TheD == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RCt = KLockMake ( & ( TheD -> mutabor ) );
-    if ( RCt == 0 ) {
-        BSTreeInit ( & ( TheD -> tree ) );
-
-        * TarDpt = TheD;
-    }
-
-    if ( RCt != 0 ) {
-        * TarDpt = NULL;
-        _TarDptDisposeImpl ( TheD );
-    }
-
-    return RCt;
-}   /* _TarDptMakeImpl () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarDepotInit ()
-{
-    rc_t RCt;
-    struct _TarDpt * TarDpt;
-
-    RCt = 0;
-    TarDpt = NULL;
-
-    if ( _sTarDpt == NULL ) {
-
-        RCt = _TarDptMakeImpl ( & TarDpt );
-        if ( RCt == 0 ) {
-            if ( _sTarDpt == NULL ) {
-                _sTarDpt = TarDpt;
-            }
-            else {
-                _TarDptDisposeImpl ( TarDpt );
-            }
-        }
-    }
-
-    return RCt;
-}   /* XFSTarDepotInit () */
-
-static
-int64_t CC
-_TarCmpCallback ( const void * Item, const BSTNode * Node )
-{
-    const char * Str1, * Str2;
-
-    Str1 = ( const char * ) Item;
-
-    Str2 = Node == NULL
-                ? NULL
-                : ( ( struct XFSTar * ) Node ) -> source
-                ;
-    return XFS_StringCompare4BST_ZHR ( Str1, Str2 );
-}   /* _TarCmpCallback () */
-
-static
-rc_t CC
-_TarDptGetNoLock (
-                struct _TarDpt * self,
-                const char * Source,
-                const struct XFSTar ** Tar
-)
-{
-    const struct XFSTar * RetVal = NULL;
-
-    if ( Tar != NULL ) {
-        * Tar = NULL;
-    }
-
-    if ( self == NULL || Source == NULL || Tar == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RetVal = ( const struct XFSTar * ) BSTreeFind (
-                                                & ( self -> tree ),
-                                                Source,
-                                                _TarCmpCallback
-                                                );
-
-
-    * Tar = RetVal;
-
-    return 0;
-}   /* _TarDptGetNoLock () */
-
-static
-int64_t CC
-_TarAddCallback ( const BSTNode * N1, const BSTNode * N2 )
-{
-    return XFS_StringCompare4BST_ZHR (
-            ( ( struct XFSTar * ) N1 ) -> source,
-            ( ( struct XFSTar * ) N2 ) -> source
-            );
-}   /* _TarAddCallback () */
-
-static
-rc_t CC
-_TarDptAddNoLock ( struct _TarDpt * self, const struct XFSTar * Tar )
-{
-    rc_t RCt;
-    const struct XFSTar * TheTar;
-    const char * Source;
-
-    RCt = 0;
-    TheTar = NULL;
-    Source = NULL;
-
-    if ( self == NULL || Tar == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    Source = Tar -> source;
-
-    RCt = _TarDptGetNoLock ( self, Source, & TheTar );
-    if ( RCt == 0 ) {
-        if ( TheTar == NULL ) {
-            RCt = BSTreeInsert (
-                        & ( self -> tree ),
-                        ( struct BSTNode * ) & ( Tar -> node ),
-                        _TarAddCallback
-                        );
-            if ( RCt != 0 ) {
-                XFSTarRelease ( Tar );
-            }
-        }
-    }
-
-    return RCt;
-}   /* _TarDptAddNoLock () */
-
-static
-rc_t CC
-_TarDptDelNoLock ( struct _TarDpt * self, const struct XFSTar * Tar )
-{
-    if ( self == NULL || Tar == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    BSTreeUnlink ( & ( self -> tree ), ( struct BSTNode * ) & ( Tar -> node ) );
-    XFSTarDispose ( Tar );
-
-    return 0;
-}   /* _TarDptDelNoLock () */
-
-static
-rc_t CC
-_TarDptClearNoLock ( struct _TarDpt * self )
-{
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    BSTreeWhack ( & ( self -> tree ), _TarDptWhackCallback, NULL );
-    BSTreeInit ( & ( self -> tree ) );
-
-    return 0;
-}   /* _TarDptClearNoLock () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarDepotClear ()
-{
-    rc_t RCt;
-    struct _TarDpt * D;
-
-    RCt = 0;
-    D = _Dpt ();
-
-    if ( D == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KLockAcquire ( D -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _TarDptClearNoLock ( D );
-
-        KLockUnlock ( D -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSTarDepotClear () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* XFSTar Methods ...                                                */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-static
-rc_t CC
-_TarOpen ( const struct XFSTar * self )
-{
-    rc_t RCt;
-    struct XFSTar * Tar;
-    const struct KDirectory * Dir;
-    struct KDirectory * NativeDir;
-
-    RCt = 0;
-    Dir = NativeDir = NULL;
-    Tar = ( struct XFSTar * ) self;
-
-    if ( Tar == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = KLockAcquire ( Tar -> mutabor );
-    if ( RCt == 0 ) { 
-        if ( Tar -> status != kxfsReady ) {
-            RCt = XFS_RC ( rcInvalid );
-        }
-        else {
-            if ( Tar -> dir == NULL ) {
-                RCt = KDirectoryNativeDir ( & NativeDir );
-                if ( RCt == 0 ) {
-                    RCt = KDirectoryOpenTarArchiveRead_silent (
-                                                        NativeDir,
-                                                        & Dir,
-                                                        1,
-                                                        Tar -> source
-                                                        );
-                    if ( RCt == 0 ) {
-                        Tar -> dir = Dir;
-                        Tar -> status = kxfsGood;
-                    }
-                    else {
-                        Tar -> status = kxfsBroken;
-                    }
-
-                    KDirectoryRelease ( NativeDir );
-                }
-            }
-        }
-
-        KLockUnlock ( Tar -> mutabor );
-    }
-
-    return RCt;
-}   /* _TarOpen () */
-
-static
-rc_t CC
-_TarClose ( const struct XFSTar * self )
-{
-    rc_t RCt;
-    struct XFSTar * Tar;
-
-    RCt = 0;
-    Tar = ( struct XFSTar * ) self;
-
-    if ( Tar == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = KLockAcquire ( Tar -> mutabor );
-    if ( RCt == 0 ) {
-        if ( Tar -> status == kxfsGood
-                || Tar -> status == kxfsReady /* shouldn't happen */
-        ) {
-            if ( Tar -> dir != NULL ) {
-                KDirectoryRelease ( Tar -> dir );
-
-                Tar -> dir = NULL;
-                Tar -> status = kxfsReady;
-            }
-        }
-        else {
-            RCt = XFS_RC ( rcInvalid );
-        }
-
-        KLockUnlock ( Tar -> mutabor );
-    }
-
-    return RCt;
-}   /* _TarClose () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarDispose ( const struct XFSTar * self )
-{
-    struct XFSTar * Tar = ( struct XFSTar * ) self;
-
-    if ( Tar != NULL ) {
-        Tar -> status = kxfsInvalid;
-
-        if ( Tar -> source != NULL ) {
-            free ( ( char * ) Tar -> source );
-
-            Tar -> source = NULL;
-        }
-
-        if ( Tar -> dir != NULL ) {
-            KDirectoryRelease ( Tar -> dir );
-
-            Tar -> dir = NULL;
-        }
-
-        if ( Tar -> mutabor != NULL ) {
-            KLockRelease ( Tar -> mutabor );
-
-            Tar -> mutabor = NULL;
-        }
-
-        KRefcountWhack ( & ( Tar -> refcount ), _sXFSTar_classname );
-
-        free ( Tar );
-    }
-
-    return 0;
-}   /* XFSTarDispose () */
-
-static
-rc_t CC
-_TarAddRef ( const struct XFSTar * self )
-{
-    rc_t RCt;
-    struct XFSTar * Tar;
-
-    RCt = 0;
-    Tar = ( struct XFSTar * ) self;
-
-    if ( Tar == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    switch ( KRefcountAdd ( & ( Tar -> refcount ), _sXFSTar_classname ) ) {
-        case krefOkay :
-                    RCt = 0;
-                    break;
-        case krefZero :
-        case krefLimit :
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* _TarAddRef () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarRelease ( const struct XFSTar * self )
-{
-    rc_t RCt;
-    struct XFSTar * Tar;
-
-    RCt = 0;
-    Tar = ( struct XFSTar * ) self;
-
-    if ( Tar == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    switch ( KRefcountDrop ( & ( Tar -> refcount ), _sXFSTar_classname ) ) {
-
-        case krefOkay :
-        case krefZero :
-                    RCt = 0;
-                    break;
-        case krefWhack :
-                    RCt = _TarClose ( ( struct XFSTar * ) Tar );
-                    break;
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSTarRelease () */
-
-static
-rc_t CC
-_TarMake ( const char * Resource, const struct XFSTar ** Tar )
-{
-    rc_t RCt;
-    struct XFSTar * RetTar;
-
-    RCt = 0;
-    RetTar = NULL;
-
-    if ( Tar != NULL ) {
-        * Tar = NULL;
-    }
-
-    if ( Tar == NULL || Resource == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RetTar = calloc ( 1, sizeof ( struct XFSTar ) );
-    if ( RetTar == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RetTar -> status = kxfsInvalid;
-
-    RCt = KLockMake ( & ( RetTar -> mutabor ) );
-    if ( RCt == 0 ) {
-        KRefcountInit (
-                    & ( RetTar -> refcount ),
-                    1,
-                    _sXFSTar_classname,
-                    "_TarMake",
-                    "Tar"
-                    );
-
-        RCt = XFS_StrDup ( Resource, & ( RetTar -> source ) );
-        if ( RCt == 0 ) {
-            RetTar -> status = kxfsReady;
-
-            * Tar = RetTar;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Tar = NULL;
-
-        XFSTarDispose ( RetTar );
-    }
-
-    return RCt;
-}   /* _TarMake () */
-
-static
-rc_t CC
-_TarDptFindOrCreateNoLock (
-                    struct _TarDpt * self,
-                    const char * Resource,
-                    const struct XFSTar ** Tar
-)
-{
-    rc_t RCt;
-    const struct XFSTar * TheTar;
-
-    RCt = 0;
-    TheTar = NULL;
-
-    if ( Tar != NULL ) {
-        * Tar = NULL;
-    }
-
-    if ( self == NULL || Resource == NULL || Tar == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = _TarDptGetNoLock ( self, Resource, & TheTar );
-    if ( RCt == 0 ) {
-        if ( TheTar != NULL ) {
-            RCt = _TarAddRef ( TheTar );
-        }
-        else {
-            RCt = _TarMake ( Resource, & TheTar );
-        }
-
-    }
-
-    if ( RCt == 0 ) {
-        RCt = _TarDptAddNoLock ( self, TheTar );
-        if ( RCt == 0 ) {
-            * Tar = TheTar;
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Tar = NULL;
-
-        if ( TheTar != NULL ) {
-            _TarDptDelNoLock ( self, TheTar );
-        }
-    }
-
-    return RCt;
-}   /* _TarDptFindOrCreateNoLock () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarFindOrCreate ( const char * Resource, const struct XFSTar ** Tar )
-{
-    rc_t RCt;
-    struct _TarDpt * Dpt;
-    const struct XFSTar * TheTar;
-
-    RCt = 0;
-    TheTar = NULL;
-    Dpt = _Dpt ();
-
-    if ( Tar != NULL ) {
-        * Tar = NULL;
-    }
-
-    if ( Dpt == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( Resource == NULL || Tar == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = KLockAcquire ( Dpt -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = _TarDptFindOrCreateNoLock ( Dpt, Resource, & TheTar );
-
-        KLockUnlock ( Dpt -> mutabor );
-    }
-
-        /* Here we opens TAR directory, it will use another lock
-         */
-    if ( RCt == 0 ) {
-        RCt = _TarOpen ( TheTar );
-        if ( RCt == 0 ) {
-            * Tar = TheTar;
-        }
-        else {
-            XFSTarRelease ( TheTar );
-        }
-    }
-
-    return RCt;
-}   /* XFSTarFindOrCreate () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* XFSTarEntry Make/Dispose Methods ...                             */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-static
-rc_t CC
-_TarEntryDispose ( struct XFSTarEntry * self )
-{
-    if ( self != NULL ) {
-        self -> status = kxfsInvalid;
-
-        if ( XFSTarEntryIsOpen ( self ) ) {
-            XFSTarEntryClose ( self );
-        }
-
-        if ( self -> tar != NULL ) {
-            XFSTarRelease ( self -> tar );
-            self -> tar = NULL;
-        }
-
-        KRefcountWhack (
-                    & ( self -> refcount ),
-                    _sXFSTarEntry_classname
-                    ); 
-
-        if ( self -> name != NULL ) {
-            free ( ( char * ) self -> name ) ;
-
-            self -> name = NULL;
-        }
-
-        if ( self -> path != NULL ) {
-            free ( ( char * ) self -> path ) ;
-
-            self -> path = NULL;
-        }
-
-        self -> is_folder = false;
-
-        free ( self );
-    }
-
-    return 0;
-}   /* _TarEntryDispose () */
-
-static
-rc_t CC
-_TarCreateEntry (
-            const struct XFSTar * self,
-            const char * Path,
-            const struct XFSTarEntry ** Entry
-)
-{
-    rc_t RCt;
-    struct XFSTarEntry * RetEntry;
-    size_t PathSize;
-    uint32_t PathType;
-
-    RCt = 0;
-    RetEntry = NULL;
-    PathSize = 0;
-    PathType = kptNotFound;
-
-    if ( Entry != NULL ) {
-        * Entry = NULL;
-    }
-
-    if ( self == NULL || Path == NULL || Entry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    PathSize = string_size ( Path );
-    if ( PathSize == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RetEntry = calloc ( 1, sizeof ( struct XFSTarEntry ) );
-    if ( RetEntry == NULL ) {
-        return XFS_RC ( rcExhausted );
-    }
-
-    RetEntry -> status = kxfsReady;
-
-    RCt = _TarAddRef ( self ); 
-    if ( RCt == 0 ) {
-        RetEntry -> tar = self;
-
-        RCt = XFS_StrDup ( Path, & ( RetEntry -> path ) );
-        if ( RCt == 0 ) {
-            RCt = XFS_NameFromPath_ZHR ( Path, & ( RetEntry -> name ), false );
-            if ( RCt == 0 ) {
-                KRefcountInit (
-                            & ( RetEntry -> refcount ),
-                            1,
-                            _sXFSTarEntry_classname,
-                            "_TarCreateEntry",
-                            "TarEntry"
-                            );
-                    /* Here we are going to check if it directory 
-                     */
-                PathType = KDirectoryPathType ( self -> dir, "./%s", Path );
-                switch ( PathType ) {
-                    case kptFile :
-                        RetEntry -> is_folder = false;
-                        break;
-                    case kptDir :
-                        RetEntry -> is_folder = true;
-                        break;
-                    default :
-                        RetEntry -> status = kxfsBroken;
-                        RCt = XFS_RC ( rcInvalid );
-                        break;
-                }
-                if ( RCt == 0 ) {
-                    RetEntry -> status = kxfsGood;
-
-                    * Entry = RetEntry;
-                }
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Entry = NULL;
-
-        if ( RetEntry != NULL ) {
-            _TarEntryDispose ( RetEntry );
-        }
-    }
-
-    return RCt;
-}   /* _TarCreateEntry () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarEntryAddRef ( const struct XFSTarEntry * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    switch ( KRefcountAdd ( & ( self -> refcount ), _sXFSTarEntry_classname ) ) {
-        case krefOkay :
-                    RCt = 0;
-                    break;
-        case krefZero :
-        case krefLimit :
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSTarEntryAddRef () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarEntryRelease ( const struct XFSTarEntry * self )
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( self == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    switch ( KRefcountDrop ( & ( self -> refcount ), _sXFSTarEntry_classname ) ) {
-
-        case krefOkay :
-        case krefZero :
-                    RCt = 0;
-                    break;
-        case krefWhack :
-                    RCt = _TarEntryDispose ( ( struct XFSTarEntry * ) self );
-                    break;
-        case krefNegative :
-                    RCt = XFS_RC ( rcInvalid );
-                    break;
-        default :
-                    RCt = XFS_RC ( rcUnknown );
-                    break;
-    }
-
-    return RCt;
-}   /* XFSTarEntryRelease () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* XFSTar Methods ...                                               */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-LIB_EXPORT
-const char * CC
-XFSTarSource ( const struct XFSTar * self )
-{
-    if ( self != NULL ) {
-        return self -> source;
-    }
-
-    return NULL;
-}   /* XFSTarBaseUrl () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarGetEntry (
-            const struct XFSTar * self,
-            const char * Path,
-            const struct XFSTarEntry ** Entry
-)
-{
-    return _TarCreateEntry ( self, Path, Entry );
-}   /* XFSTarGetEntry () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-/* XFSTarEntry Methods ...                                          */
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-LIB_EXPORT
-bool CC
-XFSTarEntryIsFolder ( const struct XFSTarEntry * self )
-{
-    return self == NULL ? false : ( self -> is_folder );
-}   /* XFSTarEntryIsFolder () */
-
-LIB_EXPORT
-const char * CC
-XFSTarEntryName ( const struct XFSTarEntry * self )
-{
-    return self == NULL ? NULL : ( self -> name );
-}   /* XFSTarEntryName () */
-
-LIB_EXPORT
-const char * CC
-XFSTarEntryPath ( const struct XFSTarEntry * self )
-{
-    return self == NULL ? NULL : ( self -> path );
-}   /* XFSTarEntryPath () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarEntryList (
-                const struct XFSTarEntry * self,
-                struct KNamelist ** List
-)
-{
-    rc_t RCt;
-
-    RCt = 0;
-
-    if ( List != NULL ) {
-        * List = NULL;
-    }
-
-    if ( self == NULL || List == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( ! self -> is_folder || ! ( self -> status == kxfsGood ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KLockAcquire ( self -> tar -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryList (
-                            self -> tar -> dir,
-                            List,
-                            NULL,
-                            NULL,
-                            "./%s",
-                            self -> path
-                            );
-        KLockUnlock ( self -> tar -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSTarEntryList () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarEntrySize ( const struct XFSTarEntry * self, uint64_t * Size )
-{
-    rc_t RCt = 0;
-
-    if ( Size != NULL ) {
-        * Size = 0;
-    }
-
-    if ( self == NULL || Size == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> status != kxfsGood ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KLockAcquire ( self -> tar -> mutabor );
-    if ( RCt == 0 ) {
-        if ( ! self -> is_folder ) {
-            RCt = KDirectoryFileSize (
-                                    self -> tar -> dir,
-                                    Size,
-                                    "./%s",
-                                    self -> path
-                                    );
-        }
-
-        KLockUnlock ( self -> tar -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSTarEntrySize () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarEntryTime ( const struct XFSTarEntry * self, KTime_t * Time )
-{
-    rc_t RCt = 0;
-
-    if ( Time != NULL ) {
-        * Time = 0;
-    }
-
-    if ( self == NULL || Time == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> status != kxfsGood ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KLockAcquire ( self -> tar -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryDate (
-                            self -> tar -> dir,
-                            Time,
-                            "./%s",
-                            self -> path
-                            );
-        KLockUnlock ( self -> tar -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSTarEntryTime () */
-
-LIB_EXPORT
-bool CC
-XFSTarEntryGood ( const struct XFSTarEntry * self )
-{
-    bool RV = false;
-
-    if ( self != NULL ) {
-        if ( KLockAcquire ( self -> tar -> mutabor ) == 0 ) {
-            RV = self -> status == kxfsGood;
-
-            KLockUnlock ( self -> tar -> mutabor );
-        }
-    }
-    return RV;
-}   /* XFSTarEntryGood () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarEntryGetChild (
-                const struct XFSTarEntry * self,
-                const char * ChildName,
-                const struct XFSTarEntry ** Child
-)
-{
-    rc_t RCt;
-    char BF [ XFS_SIZE_1024 ];
-    size_t NumW;
-
-    RCt = 0;
-    * BF = 0;
-    NumW = 0;
-
-    if ( Child != NULL ) {
-        * Child = NULL;
-    }
-
-    if ( self == NULL || ChildName == NULL || Child == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = string_printf (
-                        BF,
-                        sizeof ( BF ),
-                        & NumW,
-                        "%s/%s",
-                        self -> path,
-                        ChildName
-                        );
-    if ( RCt == 0 ) {
-        RCt = XFSTarGetEntry ( self -> tar, BF, Child );
-    }
-
-    return RCt;
-}   /* XFSTarEntryGetChild () */
-
-LIB_EXPORT
-bool CC
-XFSTarEntryIsOpen ( const struct XFSTarEntry * self ) 
-{
-    bool RetVal = false;
-
-    if ( self != NULL ) {
-        if ( KLockAcquire ( self -> tar -> mutabor ) == 0 ) {
-            RetVal = self -> file != NULL;
-
-            KLockUnlock ( self -> tar -> mutabor );
-        }
-    }
-    return RetVal;
-}   /* XFSTarEntryIsOpen () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarEntryOpen ( const struct XFSTarEntry * self )
-{
-    rc_t RCt;
-    struct XFSTarEntry * Entry;
-
-    RCt = 0;
-    Entry = ( struct XFSTarEntry * ) self;
-
-    if ( Entry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Entry -> status != kxfsGood || Entry -> is_folder == true ) {
-        RCt = XFS_RC ( rcInvalid );
-    }
-
-    RCt = KLockAcquire ( Entry -> tar -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = KDirectoryOpenFileRead (
-                                Entry -> tar -> dir,
-                                & ( Entry -> file ),
-                                "./%s",
-                                Entry -> path
-                                );
-        if ( RCt != 0 ) {
-            Entry -> status = kxfsBroken;
-        }
-
-        KLockUnlock ( Entry -> tar -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSTarEntryOpent () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarEntryRead (
-                const struct XFSTarEntry * self,
-                uint64_t Offset,
-                void * Buffer,
-                size_t BufferSize,
-                size_t * NumRead
-)
-{
-    rc_t RCt = 0;
-
-    if ( self == NULL || Buffer == NULL || NumRead == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( self -> file == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    if ( BufferSize == 0 ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KLockAcquire ( self -> tar -> mutabor );
-    if ( RCt == 0 ) {
-        RCt = KFileRead (
-                        self -> file,
-                        Offset,
-                        Buffer,
-                        BufferSize,
-                        NumRead
-                        );
-        KLockUnlock ( self -> tar -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSTarEntryRead () */
-
-LIB_EXPORT
-rc_t CC
-XFSTarEntryClose ( const struct XFSTarEntry * self )
-{
-    rc_t RCt;
-    struct XFSTarEntry * Entry;
-
-    RCt = 0;
-    Entry = ( struct XFSTarEntry * ) self;
-
-    if ( Entry == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Entry -> file == NULL ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-    RCt = KLockAcquire ( Entry -> tar -> mutabor );
-    if ( RCt == 0 ) {
-        KFileRelease ( Entry -> file );
-        Entry -> file = NULL;
-
-        KLockUnlock ( Entry -> tar -> mutabor );
-    }
-
-    return RCt;
-}   /* XFSTarEntryClose () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
diff --git a/libs/xfs/xtar.h b/libs/xfs/xtar.h
deleted file mode 100644
index ef4461f..0000000
--- a/libs/xfs/xtar.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _xtar_h_
-#define _xtar_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   There is some interface build to implement access to files
-  ))))  through HTTP
- ((((*/
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct XFSTar;
-struct XFSTarEntry;
-struct XFSTarReader;
-struct KNamelist;
-
-/*))
- //     Tar depot ... initializing depot for Tar archives
-((*/
-XFS_EXTERN rc_t CC XFSTarDepotInit ();
-XFS_EXTERN rc_t CC XFSTarDepotDispose ();
-XFS_EXTERN rc_t CC XFSTarDepotClear ();
-
-/*))
- ||     Tar archive make/dispose
- || There is no ArrRef method. FindOrCreate will add referrence to
- || archive each time when it called. If refcount was zero, the 
- || tar archive will be opened for reading. The call of Release 
- || method reduce refcount, and, if resulting count will became zero,
- || tar archive will be closed.
- || To remove tar archive from depot user should use Dispose method.
-((*/
-XFS_EXTERN rc_t CC XFSTarFindOrCreate (
-                            const char * Resource,
-                            const struct XFSTar ** Tar
-                            );
-XFS_EXTERN rc_t CC XFSTarRelease (
-                            const struct XFSTar * self
-                            );
-XFS_EXTERN rc_t CC XFSTarDispose (
-                            const struct XFSTar * self
-                            );
-
-/*))
- //     Accessing TarItems
-((*/
-
-/*||
-  ||    Note, while accessing TarEntry by Has adn Get methods
-  ||    the Path relative to Tar base URL should be used
-  ||*/
-XFS_EXTERN const char * CC XFSTarSource (
-                            const struct XFSTar * self
-                            );
-XFS_EXTERN rc_t CC XFSTarGetEntry (
-                            const struct XFSTar * self,
-                            const char * Path,
-                            const struct XFSTarEntry ** Entry
-                            );
-
-/*))
- //     TarEntry content
-((*/
-
-XFS_EXTERN rc_t CC XFSTarEntryAddRef (
-                            const struct XFSTarEntry * self
-                            );
-XFS_EXTERN rc_t CC XFSTarEntryRelease (
-                            const struct XFSTarEntry * self
-                            );
-
-XFS_EXTERN bool CC XFSTarEntryIsFolder (
-                            const struct XFSTarEntry * self
-                            );
-XFS_EXTERN const char * CC XFSTarEntryName (
-                            const struct XFSTarEntry * self
-                            );
-XFS_EXTERN const char * CC XFSTarEntryPath (
-                            const struct XFSTarEntry * self
-                            );
-XFS_EXTERN rc_t CC XFSTarEntryList (
-                            const struct XFSTarEntry * self,
-                            struct KNamelist ** List
-                            );
-XFS_EXTERN rc_t CC XFSTarEntrySize (
-                            const struct XFSTarEntry * self,
-                            uint64_t * Size
-                            );
-XFS_EXTERN rc_t CC XFSTarEntryTime (
-                            const struct XFSTarEntry * self,
-                            KTime_t * Time
-                            );
-XFS_EXTERN bool CC XFSTarEntryGood (
-                            const struct XFSTarEntry * self
-                            );
-XFS_EXTERN rc_t CC XFSTarEntryGetChild (
-                            const struct XFSTarEntry * self,
-                            const char * ChildName,
-                            const struct XFSTarEntry ** Child
-                            );
-/*))
- //     There will no special reader. Entry reads.
-((*/
-XFS_EXTERN bool CC XFSTarEntryIsOpen (
-                            const struct XFSTarEntry * self
-                            );
-
-XFS_EXTERN rc_t CC XFSTarEntryOpen (
-                            const struct XFSTarEntry * self
-                            );
-
-XFS_EXTERN rc_t CC XFSTarEntryRead (
-                            const struct XFSTarEntry * self,
-                            uint64_t Offset,
-                            void * Buffer,
-                            size_t BufferSize,
-                            size_t * NumRead
-                            );
-
-XFS_EXTERN rc_t CC XFSTarEntryClose (
-                            const struct XFSTarEntry * self
-                            );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _xtar_h_ */
diff --git a/libs/xfs/zehr.c b/libs/xfs/zehr.c
deleted file mode 100644
index ddb4d5d..0000000
--- a/libs/xfs/zehr.c
+++ /dev/null
@@ -1,1063 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/out.h>
-#include <klib/namelist.h>
-#include <klib/refcount.h>
-#include <klib/printf.h>
-#include <klib/container.h>
-#include <klib/text.h>
-
-#include <kfg/config.h>
-
-#include <kfs/file.h>
-#include <vfs/path.h>
-#include <kns/manager.h>
-#include <kns/http.h>
-#include <kns/stream.h>
-
-#include <krypto/key.h>
-
-#include "schwarzschraube.h"
-#include "zehr.h"
-#include "mehr.h"
-
-#include <sysalloc.h>
-
-#include <ctype.h>
-#include <os-native.h>
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))  Loading config. BTW, resource is a name of file or URL
- ((*/
-LIB_EXPORT
-rc_t CC
-XFS_LoadConfig_ZHR (
-                const char * Resource,
-                const struct KConfig ** Config
-)
-{
-    rc_t RCt;
-    const struct KFile * File;
-    struct KConfig * TmpConfig;
-
-    RCt = 0;
-    TmpConfig = NULL;
-    File = NULL;
-
-        /* Now Resource could be NULL
-         */
-    XFS_CSAN ( Config )
-    XFS_CAN ( Config )
-
-    RCt = KConfigMake ( & TmpConfig, NULL );
-    if ( RCt != 0 ) {
-        return RCt;
-    }
-
-    if ( Resource != NULL ) {
-            /* Trying to open resource as file */
-        RCt = XFS_OpenResourceRead_MHR ( Resource, & File );
-        if ( RCt == 0 ) {
-            RCt = KConfigLoadFile ( TmpConfig, Resource, File );
-
-            KFileRelease ( File );
-        }
-    }
-
-    if ( RCt == 0 ) {
-        * Config = TmpConfig;
-    }
-    else {
-        if ( TmpConfig != NULL ) {
-            KConfigRelease ( TmpConfig );
-        }
-    }
-
-    return RCt;
-}   /* XFS_LoadConfig_ZHR () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- //  Simple string tokenizer
-((*/
-
-static
-rc_t CC
-_AddTrimStringToList_ZHR ( struct VNamelist * List, char * String )
-{
-        /*))
-         ((    We suppose that String is null terminated and editable
-          ))   ... i.e. it could be called by Tokenizer only
-         ((*/
-    char * BG, * EN;
-
-    if ( String == NULL ) {
-        return 0;
-    }
-
-    if ( List == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    BG = String;
-    EN = BG + strlen ( String );
-
-        /*) Trim from front (*/
-    while ( BG < EN ) {
-        if ( isspace ( * BG ) ) {
-            BG ++;
-        }
-        else {
-            break;
-        }
-    }
-
-        /*) Trim from end (*/
-    while ( BG < EN ) {
-        if ( isspace ( * EN ) || * EN == 0 ) {
-            * EN = 0;
-            EN --;
-        }
-        else {
-            break;
-        }
-    }
-
-    if ( 0 < EN - BG ) {
-        return VNamelistAppend ( List, BG );
-    }
-
-    return 0;
-}   /* _AddTrimStringToList_ZHR () */
-
-LIB_EXPORT
-rc_t CC
-XFS_SimpleTokenize_ZHR (
-                    const char * SimpleString,
-                    char Separator,
-                    struct KNamelist ** Tokens
-)
-{
-    rc_t RCt;
-    struct VNamelist * List;
-    char LN [ XFS_SIZE_1024 ], * LNEnd;
-    const char * End;
-
-    RCt = 0;
-    List = NULL;
-    LNEnd = NULL;
-    End = NULL;
-
-    if ( Tokens == NULL || SimpleString == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-    * Tokens = NULL;
-
-    RCt = VNamelistMake ( & List, 16 /* he-he */ );
-    if ( RCt == 0 ) {
-        End = SimpleString;
-        LNEnd = LN;
-
-        while ( * End != 0 ) {
-            * LNEnd = * End;
-
-            if ( * End == Separator ) {
-                *LNEnd = 0;
-
-                RCt = _AddTrimStringToList_ZHR ( List, LN );
-                if ( RCt != 0 ) {
-                    break;
-                }
-
-                LNEnd = LN;
-                End ++;
-            }
-            else {
-                End ++;
-                LNEnd ++;
-            }
-
-        }
-
-        if ( RCt == 0 ) {
-            if ( LN != LNEnd ) {
-                * LNEnd = 0;
-                RCt = _AddTrimStringToList_ZHR ( List, LN );
-            }
-        }
-
-        if ( RCt == 0 ) {
-            RCt = VNamelistToNamelist ( List, Tokens );
-        }
-
-        VNamelistRelease ( List );
-    }
-
-    return RCt;
-}   /* XFS_SimpleTokenize_ZHR () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- //  Simple string comparator
-((*/
-LIB_EXPORT
-int CC
-XFS_StringCompare4BST_ZHR ( const char * Str1, const char * Str2 )
-{
-    if ( Str1 == NULL || Str2 == NULL ) {
-        if ( Str1 != NULL ) {
-            return 4096;
-        }
-        
-        if ( Str2 != NULL ) {
-            return 4096 * - 1;
-        }
-
-        return 0;
-    }
-
-    return strcmp ( Str1, Str2 );
-}   /* XFS_StringCompare4BST_XHR () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static
-rc_t CC
-_NameExtEndPosFromPath (
-                        const char * Path,
-                        const char ** Name,
-                        const char ** Ext,  /* Will be End if No */
-                        const char ** End   /* for Name + Ext */
-)
-{
-    const char * pStart;
-    const char * pEnd;
-    const char * pCurr;
-    const char * pExt;
-
-    pStart = pEnd = pCurr = pExt = NULL;
-
-    XFS_CSAN ( Name )
-    XFS_CSAN ( Ext )
-    XFS_CSAN ( End )
-    XFS_CAN ( Path )
-    XFS_CAN ( Name )
-    XFS_CAN ( Ext )
-    XFS_CAN ( End )
-
-    pStart = Path;
-    pEnd = Path + string_size ( Path );
-    pCurr = pEnd - 1;
-    pExt = pEnd;
-
-    if ( 0 == ( pEnd - pStart ) ) {
-        return XFS_RC ( rcInvalid );
-    }
-
-        /*  Lookin' for name
-         */
-    while ( pStart < pCurr ) {
-        if ( * pCurr == '/' ) {
-            pStart = pCurr + 1;
-            break;
-        }
-
-        pCurr --;
-    }
-
-        /*  Now lookin' for Extention
-         */
-    pCurr = pEnd - 1;
-    while ( pStart < pCurr ) {
-        if ( * pCurr == '.' ) {
-            pExt = pCurr;
-            break;
-        }
-
-        pCurr --;
-    }
-
-    * Name = pStart;
-    * Ext = pExt;
-    * End = pEnd;
-
-    return 0;
-}   /* _NameExtEndPosFromPath () */
-
-/*))
- ||     Will return name with/without extension
- ||     It will return new string, so don't forget to delete it
-((*/
-LIB_EXPORT
-rc_t CC
-XFS_NameFromPath_ZHR (
-                    const char * Path,
-                    const char ** Name,
-                    bool TrimExt
-)
-{
-    rc_t RCt;
-    const char * pName;
-    const char * pExt;
-    const char * pEnd;
-    char * RetVal;
-
-    RCt = 0;
-    pName = pExt = pEnd = NULL;
-    RetVal = NULL;
-
-    XFS_CSAN ( Name )
-    XFS_CAN ( Path )
-    XFS_CAN ( Name )
-
-    RCt = _NameExtEndPosFromPath ( Path, & pName, & pExt, & pEnd );
-    if ( RCt == 0 ) {
-
-        RetVal = string_dup (
-                            pName,
-                            ( TrimExt ? pExt : pEnd ) - pName
-                            );
-
-        if ( RetVal == NULL ) {
-            RCt = XFS_RC ( rcExhausted );
-        }
-        else {
-            * Name = RetVal;
-        }
-    }
-
-
-    return RCt;
-}   /* XFS_NameFromPath_ZHR () */
-
-/*))
- ||     Will return null if Extension does not exists
- ||     It will return new strings, so don't forget to delete them
-((*/
-LIB_EXPORT
-rc_t CC
-XFS_NameExtFromPath_ZHR (
-                    const char * Path,
-                    const char ** Name,
-                    const char ** Ext
-)
-{
-    rc_t RCt;
-    const char * pName;
-    const char * pExt;
-    const char * pEnd;
-    char * RetName;
-    char * RetExt;
-
-    RCt = 0;
-    pName = pExt = pEnd = NULL;
-    RetName = RetExt = NULL;
-
-    XFS_CSAN ( Name )
-    XFS_CSAN ( Ext )
-    XFS_CAN ( Path )
-    XFS_CAN ( Name )
-    XFS_CAN ( Ext )
-
-    RCt = _NameExtEndPosFromPath ( Path, & pName, & pExt, & pEnd );
-    if ( RCt == 0 ) {
-        RetName = string_dup ( pName, pExt - pName );
-        if ( RetName == NULL ) {
-            RCt = XFS_RC ( rcExhausted );
-        }
-        else {
-            if ( pExt != pEnd ) {
-
-                RetExt = string_dup ( pExt, pEnd - pExt );
-                if ( RetExt == NULL ) {
-                    RCt = XFS_RC ( rcExhausted );
-                }
-            }
-            if ( RCt == 0 ) {
-                * Name = RetName;
-                * Ext = RetExt;
-            }
-        }
-    }
-
-    if ( RCt != 0 ) {
-        * Name = NULL;
-        * Ext = NULL;
-
-        if ( RetName != NULL ) {
-            free ( RetName );
-        }
-
-        if ( RetExt != NULL ) {
-            free ( RetExt );
-        }
-    }
-
-    return RCt;
-}   /* XFS_NameExtFromPath_ZHR () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
- /*))))
-   (((( That file contains methods, which are common for all modules
-   )))) but I am not sure if they were implemented right or wrong.
-   ((((*/
-typedef rc_t ( CC * XFS_ReadV_ZHR ) (
-                                const struct VPath * self,
-                                char * buffer,
-                                size_t buffer_size,
-                                size_t * num_read
-                                );
-
-static
-rc_t CC
-XFS_ReadVEverything_ZHR (
-                const struct VPath * Path,
-                char * Buffer,
-                size_t BufferSize,
-                const char * Filler,
-                XFS_ReadV_ZHR Reader
-)
-{
-    rc_t RCt;
-    size_t NR;
-    const char * DefaultFiller = "NULL";
-
-    RCt = 0;
-
-    if ( Buffer == NULL || BufferSize <= 0 ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Buffer = 0;
-
-    if ( Path != NULL ) {
-        RCt = Reader ( Path, Buffer, BufferSize, & NR );
-    }
-    else {
-        RCt = XFS_RC ( rcNull );
-
-        string_copy_measure (
-                        Buffer,
-                        sizeof ( Buffer ),
-                        ( Filler == NULL ? DefaultFiller : Filler )
-                        );
-    }
-
-    return RCt;
-}   /* XFS_ReadVEverything_ZHR () */
-
-static
-rc_t CC
-XFS_ReadCEverything_ZHR (
-                const char * Url,
-                char * Buffer,
-                size_t BufferSize,
-                const char * Filler,
-                XFS_ReadV_ZHR Reader
-)
-{
-    rc_t RCt;
-    size_t NR;
-    const char * DefaultFiller = "NULL";
-    struct VPath * Path;
-
-    RCt = 0;
-    NR = 0;
-    Path = NULL;
-
-    if ( Buffer == NULL || BufferSize <= 0 ) {
-        return XFS_RC ( rcNull );
-    }
-
-    * Buffer = 0;
-
-    if ( Url == NULL ) {
-        RCt = XFS_RC ( rcNull );
-
-        string_copy_measure (
-                        Buffer,
-                        sizeof ( Buffer ),
-                        ( Filler == NULL ? DefaultFiller : Filler )
-                        );
-    }
-    else {
-        RCt = VFSManagerMakePath ( XFS_VfsManager (), & Path, Url );
-        if ( RCt == 0 ) {
-            RCt = Reader ( Path, Buffer, BufferSize, & NR );
-
-            VPathRelease ( Path );
-        }
-    }
-
-    return RCt;
-}   /* XFS_ReadCEverything_ZHR () */
-
-LIB_EXPORT
-rc_t CC
-XFS_ReadVPath_ZHR (
-                const struct VPath * Path,
-                char * Buffer,
-                size_t BufferSize,
-                const char * Filler
-)
-{
-    return XFS_ReadVEverything_ZHR (
-                                Path,
-                                Buffer,
-                                BufferSize,
-                                Filler,
-                                VPathReadPath
-                                );
-}   /* XFS_ReadVPath_ZHR () */
-
-LIB_EXPORT
-rc_t CC
-XFS_ReadCPath_ZHR (
-                const char * Url,
-                char * Buffer,
-                size_t BufferSize,
-                const char * Filler
-)
-{
-    return XFS_ReadCEverything_ZHR (
-                                Url,
-                                Buffer,
-                                BufferSize,
-                                Filler,
-                                VPathReadPath
-                                );
-}   /* XFS_ReadCPath_ZHR () */
-
-LIB_EXPORT
-rc_t CC
-XFS_ReadVUri_ZHR (
-                const struct VPath * Path,
-                char * Buffer,
-                size_t BufferSize,
-                const char * Filler
-)
-{
-    return XFS_ReadVEverything_ZHR (
-                                Path,
-                                Buffer,
-                                BufferSize,
-                                Filler,
-                                VPathReadUri
-                                );
-}   /* XFS_ReadVUri_ZHR () */
-
-LIB_EXPORT
-rc_t CC
-XFS_ReadCUri_ZHR (
-                const char * Url,
-                char * Buffer,
-                size_t BufferSize,
-                const char * Filler
-)
-{
-    return XFS_ReadCEverything_ZHR (
-                                Url,
-                                Buffer,
-                                BufferSize,
-                                Filler,
-                                VPathReadUri
-                                );
-}   /* XFS_ReadCUri_ZHR () */
-
-LIB_EXPORT
-rc_t CC
-XFS_ReadVHost_ZHR (
-                const struct VPath * Path,
-                char * Buffer,
-                size_t BufferSize,
-                const char * Filler
-)
-{
-    return XFS_ReadVEverything_ZHR (
-                                Path,
-                                Buffer,
-                                BufferSize,
-                                Filler,
-                                VPathReadHost
-                                );
-}   /* XFS_ReadVHost_ZHR () */
-
-LIB_EXPORT
-rc_t CC
-XFS_ReadCHost_ZHR (
-                const char * Url,
-                char * Buffer,
-                size_t BufferSize,
-                const char * Filler
-)
-{
-    return XFS_ReadCEverything_ZHR (
-                                Url,
-                                Buffer,
-                                BufferSize,
-                                Filler,
-                                VPathReadHost
-                                );
-}   /* XFS_ReadCHost_ZHR () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-LIB_EXPORT
-const char * CC
-XFS_SkipSpaces_ZHR ( const char * Start, const char * End )
-{
-    if ( Start != NULL && End != NULL ) {
-        while ( Start < End ) {
-            if ( ! isspace ( * Start ) ) {
-                return Start;
-            }
-
-            Start ++;
-        }
-    }
-    return NULL;
-}   /* XFS_SkipSpaces_ZHR () */
-
-LIB_EXPORT
-const char * CC
-XFS_SkipLetters_ZHR ( const char * Start, const char * End )
-{
-    if ( Start != NULL && End != NULL ) {
-        while ( Start < End ) {
-            if ( isspace ( * Start ) ) {
-                return Start;
-            }
-
-            Start ++;
-        }
-    }
-    return NULL;
-}   /* XFS_SkipLetters_ZHR () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct XFSHttpStream {
-    KClientHttp * http;
-    KHttpRequest * req;
-    KHttpResult * res;
-    KStream * str;
-
-    rc_t last_error;
-    bool completed;
-};
-
-LIB_EXPORT
-rc_t CC
-XFS_HttpStreamMake_ZHR (
-                    const char * Url,
-                    const struct XFSHttpStream ** Stream
-)
-{
-    rc_t RCt;
-    struct VPath * Path;
-    struct String Host;
-    uint32_t Port;
-    struct XFSHttpStream * TheStream;
-
-    RCt = 0;
-    Path = NULL;
-    TheStream = NULL;
-
-    if ( Stream != NULL ) {
-        * Stream = NULL;
-    }
-
-    if ( Url == NULL || Stream == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    RCt = VFSManagerMakePath ( XFS_VfsManager (), & Path, Url );
-    if ( RCt == 0 ) {
-        RCt = VPathGetHost ( Path, & Host );
-        if ( RCt == 0 ) {
-            Port = VPathGetPortNum ( Path );
-
-            TheStream = calloc ( 1, sizeof ( struct XFSHttpStream ) );
-            if ( TheStream == NULL ) {
-                RCt = XFS_RC ( rcExhausted );
-            }
-            else {
-                RCt = KNSManagerMakeHttp (
-                                    XFS_KnsManager(),
-                                    & ( TheStream -> http ),
-                                    NULL,
-                                    0x01010000,
-                                    & Host,
-                                    Port
-                                    );
-                if ( RCt == 0 ) {
-                    RCt = KHttpMakeRequest (
-                                        TheStream -> http,
-                                        & ( TheStream -> req ),
-                                        Url
-                                        );
-                    if ( RCt == 0 ) {
-                        RCt = KHttpRequestGET (
-                                        TheStream -> req,
-                                        & ( TheStream -> res )
-                                        );
-                        if ( RCt == 0 ) {
-                            RCt = KHttpResultGetInputStream (
-                                                TheStream -> res,
-                                                & ( TheStream -> str )
-                                                );
-                            if ( RCt == 0 ) {
-                                TheStream -> completed = false;
-                                TheStream -> last_error = 0;
-
-                                * Stream = TheStream;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        VPathRelease ( Path );
-    }
-
-    if ( RCt != 0 ) {
-        * Stream = NULL;
-
-        if ( TheStream != NULL ) {
-            XFS_HttpStreamDispose_ZHR ( TheStream );
-        }
-    }
-
-    return RCt;
-}   /* XFS_HttpStreamMake_ZHR () */
-
-static
-rc_t CC
-_HttpStreamCloseInternals_ZHR ( const struct XFSHttpStream * self )
-{
-    struct XFSHttpStream * Stream = ( struct XFSHttpStream * ) self;
-
-    if ( Stream == 0 ) {
-        return 0;
-    }
-
-    if ( Stream -> str != NULL ) {
-        KStreamRelease ( Stream -> str );
-
-        Stream -> str = NULL;
-    }
-
-    if ( Stream -> res != NULL ) {
-        KClientHttpResultRelease ( Stream -> res );
-
-        Stream -> res = NULL;
-    }
-
-    if ( Stream -> req != NULL ) {
-        KClientHttpRequestRelease ( Stream -> req );
-
-        Stream -> req = NULL;
-    }
-
-    if ( Stream -> http != NULL ) {
-        KClientHttpRelease ( Stream -> http );
-
-        Stream -> http = NULL;
-    }
-
-    return 0;
-}   /* _HttpStreamCloseInternals_ZHR () */
-
-LIB_EXPORT
-rc_t CC
-XFS_HttpStreamDispose_ZHR ( const struct XFSHttpStream * self )
-{
-    struct XFSHttpStream * Stream = ( struct XFSHttpStream * ) self;
-
-    if ( Stream == NULL ) {
-        return 0;
-    }
-
-    Stream -> completed = false;
-    Stream -> last_error = XFS_RC ( rcInvalid );
-
-    _HttpStreamCloseInternals_ZHR ( self );
-
-    free ( Stream );
-
-    return 0;
-}   /* XFS_HttpStreamDispose_ZHR () */
-
-LIB_EXPORT
-bool CC
-XFS_HttpStreamGood_ZHR ( const struct XFSHttpStream * self )
-{
-    if ( self != NULL ) {
-        return self -> last_error == 0;
-    }
-    return false;
-}   /* XFS_HttpStreamGood_ZHR () */
-
-LIB_EXPORT
-bool CC
-XFS_HttpStreamCompleted_ZHR ( const struct XFSHttpStream * self )
-{
-    if ( self != NULL ) {
-        return self -> completed;
-    }
-    return true;
-}   /* XFS_HttpStreamCompleted_ZHR () */
-
-LIB_EXPORT
-rc_t CC
-XFS_HttpStreamRead_ZHR (
-                    const struct XFSHttpStream * self,
-                    void * Buffer,
-                    size_t Size,
-                    size_t * NumRead
-)
-{
-    struct XFSHttpStream * Stream = ( struct XFSHttpStream * ) self;
-
-    if ( NumRead != NULL ) {
-        * NumRead = 0;
-    }
-
-    if ( Stream == NULL || Buffer == NULL || Size == 0 || NumRead == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Stream -> last_error != 0 ) {
-        return Stream -> last_error;
-    }
-
-    if ( Stream -> completed ) {
-        * NumRead = 0;
-
-        return 0;
-    }
-
-    if ( Stream -> str == NULL ) {
-        _HttpStreamCloseInternals_ZHR ( Stream );
-
-        Stream -> last_error = XFS_RC ( rcInvalid );
-
-        return Stream -> last_error;
-    }
-
-    Stream -> last_error = KStreamRead ( 
-                                    Stream -> str,
-                                    Buffer,
-                                    Size,
-                                    NumRead
-                                    );
-    if ( Stream -> last_error == 0 ) {
-        if ( * NumRead == 0 ) {
-            _HttpStreamCloseInternals_ZHR ( Stream );
-
-            Stream -> completed = true;
-        }
-    }
-    else {
-        _HttpStreamCloseInternals_ZHR ( Stream );
-    }
-
-    return self -> last_error;
-}   /* XFS_HttpStreamRead_ZHR */
-
-LIB_EXPORT
-rc_t CC
-XFS_HttpStreamTimedRead_ZHR (
-                    const struct XFSHttpStream * self,
-                    void * Buffer,
-                    size_t Size,
-                    size_t * NumRead,
-                    struct timeout_t * Tm
-)
-{
-    struct XFSHttpStream * Stream = ( struct XFSHttpStream * ) self;
-
-    if ( NumRead != NULL ) {
-        * NumRead = 0;
-    }
-
-    if ( Stream == NULL || Buffer == NULL || Size == 0 || NumRead == NULL ) {
-        return XFS_RC ( rcNull );
-    }
-
-    if ( Stream -> last_error != 0 ) {
-        return Stream -> last_error;
-    }
-
-    if ( Stream -> completed ) {
-        * NumRead = 0;
-
-        return 0;
-    }
-
-    if ( Stream -> str == NULL ) {
-        _HttpStreamCloseInternals_ZHR ( Stream );
-
-        Stream -> last_error = XFS_RC ( rcInvalid );
-
-        return Stream -> last_error;
-    }
-
-    Stream -> last_error = KStreamTimedRead ( 
-                                    Stream -> str,
-                                    Buffer,
-                                    Size,
-                                    NumRead,
-                                    Tm
-                                    );
-    if ( Stream -> last_error == 0 ) {
-        if ( * NumRead == 0 ) {
-            _HttpStreamCloseInternals_ZHR ( Stream );
-
-            Stream -> completed = true;
-        }
-    }
-    else {
-        _HttpStreamCloseInternals_ZHR ( Stream );
-    }
-
-    return self -> last_error;
-}   /* XFS_HttpStreamTimedRead_ZHR */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-static
-rc_t CC
-XFS_KeyType_ZHR ( const char * EncType, KKeyType * Type )
-{
-    size_t B;
-    const char * C;
-
-    B = 0;
-    C = NULL;
-
-    XFS_CAN ( Type )
-    * Type = kkeyNone;
-
-    if ( EncType == NULL ) {
-        * Type = KKeyTypeDefault;
-        return 0;
-    }
-
-    B = string_size ( EncType );
-
-    C = "AES128";
-    if ( strcase_cmp ( C, string_size ( C ), EncType, B, B ) == 0 ) {
-        * Type = kkeyAES128;
-        return 0;
-    }
-
-    C = "AES192";
-    if ( strcase_cmp ( C, string_size ( C ), EncType, B, B ) == 0 ) {
-        * Type = kkeyAES192;
-        return 0;
-    }
-
-    C = "AES256";
-    if ( strcase_cmp ( C, string_size ( C ), EncType, B, B ) == 0 ) {
-        * Type = kkeyAES256;
-        return 0;
-    }
-
-    return XFS_RC ( rcInvalid );
-}   /* XFS_KeyType_ZHR () */
-
-LIB_EXPORT
-rc_t CC
-XFS_InitKKey_ZHR (
-            const char * EncPass,
-            const char * EncType,
-            struct KKey * Key
-)
-{
-    rc_t RCt;
-    KKeyType Type;
-
-    RCt = 0;
-    Type = kkeyNone;
-
-    XFS_CAN ( EncPass )
-    XFS_CAN ( Key )
-
-    RCt = XFS_KeyType_ZHR ( EncType, & Type );
-    if ( RCt == 0 ) {
-        RCt = KKeyInitRead (
-                            Key,
-                            Type,
-                            EncPass,
-                            string_size ( EncPass )
-                            );
-    }
-
-    return RCt;
-}   /* XFS_InitKey_ZHR () */
-
-LIB_EXPORT
-rc_t CC
-XFS_CopyKKey_ZHR ( const struct KKey * Src, struct KKey * Dst )
-{
-    XFS_CAN ( Src )
-    XFS_CAN ( Dst )
-
-    memcpy ( Dst, Src, sizeof ( struct KKey ) );
-
-    return 0;
-}   /* XFS_CopyKKey_ZHR () */
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
diff --git a/libs/xfs/zehr.h b/libs/xfs/zehr.h
deleted file mode 100644
index 5fa3ea1..0000000
--- a/libs/xfs/zehr.h
+++ /dev/null
@@ -1,266 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#ifndef _zehr_h_
-#define _zehr_h_
-
-#include <xfs/xfs-defs.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif /* __cplusplus */
-
-/*))))
- ((((   This file contains methods and definitions, which
-  ))))  should be extended and reimplemented later
- ((((     All names in that file ends with _ZHR
-  ))))
- ((((*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))  Universal method which should load config from resource
- ((*/
-
-struct KConfig;
-
-XFS_EXTERN rc_t CC XFS_LoadConfig_ZHR (
-                                    const char * Resource,
-                                    const struct KConfig ** Konfig
-                                    );
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct KNamelist;
-
-/*))
- ((   Simple string tokeniser: splits string by separator and fills
-  ))  KNamelist, trims 'isspace' from begin and end of strings
- ((*/
-XFS_EXTERN rc_t CC XFS_SimpleTokenize_ZHR (
-                                        const char * SimpleString,
-                                        char Separator,
-                                        struct KNamelist ** Tokens
-                                        );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*))
- ((   That is correct comparision function needed for BSTree operations
-  ))
- ((*/
-XFS_EXTERN int CC XFS_StringCompare4BST_ZHR (
-                                    const char * Str1,
-                                    const char * Str2
-                                    );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-    /*))
-     ||     Will return name with/without extension
-     ||     It will return new string, so don't forget to delete it
-    ((*/
-XFS_EXTERN rc_t CC XFS_NameFromPath_ZHR (
-                                        const char * Paht,
-                                        const char ** Name,
-                                        bool TrimExtension
-                                        );
-
-    /*))
-     ||     Will return null if Extension does not exists
-     ||     It will return new strings, so don't forget to delete them
-    ((*/
-XFS_EXTERN rc_t CC XFS_NameExtFromPath_ZHR (
-                                        const char * Paht,
-                                        const char ** Name,
-                                        const char ** Extension
-                                        );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-struct VPath;
-
-/*))
-  ||   Prints VPath to buffer, and, if there was error of reading,
-  ||   or Path is NULL, the Filler value will be copied to buffer.
-  ||   Filler should be 0 terminated string, or NULL If Filler is
-  ||   NULL, the "NULL" will be copied to buffer then.
-  ((*/
-XFS_EXTERN rc_t CC XFS_ReadVPath_ZHR (
-                                    const struct VPath * Path,
-                                    char * Buffer,
-                                    size_t BufferSize,
-                                    const char * Filler
-                                    );
-XFS_EXTERN rc_t CC XFS_ReadCPath_ZHR (
-                                    const char * Url,
-                                    char * Buffer,
-                                    size_t BufferSize,
-                                    const char * Filler
-                                    );
-
-/*))
-  ||   Prints VPath Uri to buffer, and, if there was error of reading,
-  ||   or Path is NULL, the Filler value will be copied to buffer.
-  ||   Filler should be 0 terminated string, or NULL If Filler is
-  ||   NULL, the "NULL" will be copied to buffer then.
-  ((*/
-XFS_EXTERN rc_t CC XFS_ReadVUri_ZHR (
-                                    const struct VPath * Path,
-                                    char * Buffer,
-                                    size_t BufferSize,
-                                    const char * Filler
-                                    );
-XFS_EXTERN rc_t CC XFS_ReadCUri_ZHR (
-                                    const char * Url,
-                                    char * Buffer,
-                                    size_t BufferSize,
-                                    const char * Filler
-                                    );
-
-/*))
-  ||   Prints VPath Host to buffer, and, if there was error of reading,
-  ||   or Path is NULL, the Filler value will be copied to buffer.
-  ||   Filler should be 0 terminated string, or NULL If Filler is
-  ||   NULL, the "NULL" will be copied to buffer then.
-  ((*/
-XFS_EXTERN rc_t CC XFS_ReadVHost_ZHR (
-                                    const struct VPath * Path,
-                                    char * Buffer,
-                                    size_t BufferSize,
-                                    const char * Filler
-                                    );
-
-XFS_EXTERN rc_t CC XFS_ReadCHost_ZHR (
-                                    const char * Url,
-                                    char * Buffer,
-                                    size_t BufferSize,
-                                    const char * Filler
-                                    );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*|
-|*  Those methods does not do any error handling and returns NULL in 
- *| the case of error, or if condition was not found
-|*/
-XFS_EXTERN const char * CC XFS_SkipSpaces_ZHR (
-                                    const char * Start,
-                                    const char * End
-                                    );
-
-XFS_EXTERN const char * CC XFS_SkipLetters_ZHR (
-                                    const char * Start,
-                                    const char * End
-                                    );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*\
-|*| That is representing HttpStreamer. The reason why I do it here,
-|*| is : KHttpFile does not work if "content-length" field missed
-|*| at header
-\*/
-struct XFSHttpStream;
-struct timeout_t;
-
-XFS_EXTERN rc_t CC XFS_HttpStreamMake_ZHR (
-                                    const char * Url,
-                                    const struct XFSHttpStream ** Stream
-                                    );
-
-XFS_EXTERN rc_t CC XFS_HttpStreamDispose_ZHR (
-                                    const struct XFSHttpStream * self
-                                    );
-
-XFS_EXTERN bool CC XFS_HttpStreamGood_ZHR (
-                                    const struct XFSHttpStream * self
-                                    );
-
-XFS_EXTERN bool CC XFS_HttpStreamCompleted_ZHR (
-                                    const struct XFSHttpStream * self
-                                    );
-
-    /*>>
-     // Reading :
-     \\     End of stream indicator is NumRead == 0 and rc_t == 0
-     //     If timeout == NULL - will block indefinitely
-    <<*/
-XFS_EXTERN rc_t CC XFS_HttpStreamRead_ZHR (
-                                    const struct XFSHttpStream * self,
-                                    void * Buffer,
-                                    size_t Size,
-                                    size_t * NumRead
-                                    );
-
-XFS_EXTERN rc_t CC XFS_HttpStreamTimedRead_ZHR (
-                                    const struct XFSHttpStream * self,
-                                    void * Buffer,
-                                    size_t Size,
-                                    size_t * NumRead,
-                                    struct timeout_t * Tm
-                                    );
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-struct KKey;
-XFS_EXTERN rc_t CC XFS_InitKKey_ZHR (
-                                    const char * EncPass,
-                                    const char * EncType,
-                                    struct KKey * Key
-                                    );
-XFS_EXTERN rc_t CC XFS_CopyKKey_ZHR (
-                                    const struct KKey * Src,
-                                    struct KKey * Dst
-                                    );
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
-
-#ifdef __cplusplus 
-}
-#endif /* __cplusplus */
-
-#endif /* _zehr_h_ */
diff --git a/local-builds.sh b/local-builds.sh
deleted file mode 100755
index e6dbd96..0000000
--- a/local-builds.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/bash
-
-# consider the entire matrix to have a single timestamp
-NOW=$(date "+%Y-%m-%d.%H.%M.%S")
-
-# for most builds, we use a separate host to determine architecture
-# and these will have a single item in the list called "default"
-ARCH_LIST=$(make architectures)
-if [ "$ARCH_LIST" = "default" ]
-then
-    CUR_ARCH=$(make architecture)
-else
-    CUR_ARCH=all-arch
-fi
-
-run ()
-{
-    echo "MAKE COMMANDS: make $*"
-
-    for COMPILER in $(make compilers)
-    do
-        make $COMPILER 1> /dev/null
-
-        for LINKAGE in dynamic static
-        do
-
-            make $LINKAGE 1> /dev/null
-
-            for ARCHITECTURE in $ARCH_LIST 
-            do
-
-                if [ "$ARCHITECTURE" = "default" ]
-                then
-                    ARCHITECTURE=$CUR_ARCH
-                else
-                    make $ARCHITECTURE 1> /dev/null
-                fi
-
-                for OPTIMIZATION in debug release profile
-                do
-
-                    make $OPTIMIZATION 1> /dev/null
-
-                    TARGET_DIR=$(make targdir)
-
-                    if make $* 1> "$TARGET_DIR/$NOW-build.log" 2> "$TARGET_DIR/$NOW-build.err"
-                    then
-                        STATUS="COMPLETED"
-                    else
-                        STATUS=" FAILED  "
-                    fi
-
-                    printf "%-32s [ %s ]\n" $COMPILER.$LINKAGE.$ARCHITECTURE.$OPTIMIZATION "$STATUS"
-
-                done
-
-            done
-
-        done
-
-    done
-}
-
-# going to put a log of this activity into OS output directory
-OS_DIR=$(make osdir)
-[ -d "$OS_DIR" ] || mkdir -p "$OS_DIR"
-
-# log based upon architecture to avoid competitions
-LOG_FILE="$OS_DIR/$NOW-build-$CUR_ARCH.log"
-
-# run the matrix of builds
-run $* 2>&1 | tee "$LOG_FILE"
diff --git a/schema_crc.pl b/schema_crc.pl
deleted file mode 100755
index ca5230e..0000000
--- a/schema_crc.pl
+++ /dev/null
@@ -1,148 +0,0 @@
-#!/usr/bin/perl -w
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-use File::Path;
-use IO::File;
-
-# walks a given range of accessions and prints 'crc of schema', platform,
-# obj-time, tabdb and loader
-
-# example: schema_crc.pl SRR 000010 000020
-# walks accessions SRR000010 ... SRR000020
-
-
-walk_acc ( @ARGV );
-
-sub walk_acc
-{
-    my( $prefix, $first, $last ) = @_;
-    my $count;
-
-    for ( $count = $first; $count <= $last; $count++ )
-    {
-        my $acc  = sprintf( "$prefix%.06d", $count );
-        my $path = `srapath $acc 2>/dev/null`;
-        chomp( $path );
-        if ( -e "$path" )
-        {
-            my $crc  = get_schema_crc( $acc );
-            my $pfm  = get_platform( $acc );
-            my $time = get_obj_time( $path );
-            my $tdb  = get_tabdb( $acc );
-            my $ldr  = get_loader( $path );
-            my $pt   = "file";
-            print( "$acc\t$pt\t$crc\t$pfm\t$time\t$tdb\t$ldr\n" );
-        }
-        elsif ( -d "$path" )
-        {
-            my $crc  = get_schema_crc( $acc );
-            my $pfm  = get_platform( $acc );
-            my $time = get_obj_time( $path );
-            my $tdb  = get_tabdb( $acc );
-            my $ldr  = get_loader( $path );
-            my $pt   = "dir";
-            print( "$acc\t$pt\t$crc\t$pfm\t$time\t$tdb\t$ldr\n" );
-        }
-        else
-        {
-            print( "$acc not-found\n" );
-        }
-    }
-}
-
-sub get_schema_crc
-{
-    my( $src ) = @_;
-    my $cmd = "vdb-dump $src -A | md5sum";
-    open ( PROC, "-|", "$cmd" ) or die "vdb-dump ( print schema ) failed";
-    my $row = <PROC>;
-    chomp( $row );
-    close ( PROC );
-    my @parts = split( / /, $row );
-    return $parts[ 0 ];
-}
-
-sub get_platform
-{
-    my( $src ) = @_;
-    my $cmd = "vdb-dump $src -N -R1 -CPLATFORM 2>/dev/null";
-    open ( PROC, "-|", "$cmd" ) or die "vdb-dump ( print platform ) failed";
-    my $row = <PROC>;
-    chomp( $row );
-    close ( PROC );
-    return $row;
-}
-
-sub get_obj_time
-{
-    my( $src ) = @_;
-    my $cmd = "ls -l -d $src 2>/dev/null";
-    open ( PROC, "-|", "$cmd" ) or die "ls -l failed";
-    my $row = <PROC>;
-    chomp( $row );
-    close ( PROC );
-    my @parts = split( ' ', $row );
-    my $res = sprintf( "%s-%s-%s", $parts[ 5 ], $parts[ 6 ], $parts[ 7 ] );
-    return $res;
-}
-
-sub get_tabdb
-{
-    my( $src ) = @_;
-    my $cmd = "vdb-dump $src -E 2>/dev/null";
-    open ( PROC, "-|", "$cmd" ) or die "vdb-dump ( check tab/db ) failed";
-    my $row = <PROC>;
-    chomp( $row );
-    close ( PROC );
-    my @parts = split( / /, $row );
-    if ( $row )
-    {
-        if ( $parts[ 0 ] eq "cannot" )
-        {
-            return "table";
-        }
-        else
-        {
-            return "database";
-        }
-    }
-}
-
-sub get_loader
-{
-    my( $src ) = @_;
-    my $cmd = "kdbmeta $src SOFTWARE/loader 2>/dev/null";
-    open ( PROC, "-|", "$cmd" ) or die "kdmeta failed";
-    my $row = <PROC>;
-    close ( PROC );
-    if ( $row )
-    {
-        chomp( $row );
-        return $row;
-    }
-    else
-    {
-        return "unknown";
-    }
-}
diff --git a/setup/install.prl b/setup/install.prl
index 941305f..8b26a51 100644
--- a/setup/install.prl
+++ b/setup/install.prl
@@ -1,9 +1,38 @@
-sub PACKAGE_NAME { 'NCBI-VDB' }
-sub HAVE        { ( CONFIG => 1, DLLS => 1, LIBS => 1, USR_INCLUDES => 1, ) }
+sub PACKAGE_NAME { 'SRA-TOOLS' }
+sub HAVE        { ( BINS => 1, CONFIG => 1,) }
 sub CONFIG_OUT  {  'build' }
-sub INCLUDES    {  'interfaces/ngs/ncbi/NGS.hpp' }
-sub INCLUDES_OUT{  'ncbi-vdb' }
-sub LIBS
-    { ( 'ncbi-ngs-c++' => 'LIB', 'ncbi-vdb'  => 'LIB', 'ncbi-vdb'  => 'SHL',
-                                 'ncbi-wvdb' => 'LIB', 'ncbi-wvdb' => 'SHL', ) }
+sub BINS     { qw (abi-dump
+                   abi-load
+                   align-info
+                   bam-load
+                   cache-mgr
+                   cg-load
+                   fastq-dump
+                   fastq-load
+                   helicos-load
+                   illumina-dump
+                   illumina-load
+                   kar
+                   kdbmeta
+                   latf-load
+                   prefetch
+                   rcexplain
+                   sam-dump
+                   sff-dump
+                   sff-load
+                   sra-pileup
+                   sra-sort
+                   sra-stat
+                   srapath
+                   srf-load
+                   test-sra
+                   vdb-config
+                   vdb-copy
+                   vdb-decrypt
+                   vdb-dump
+                   vdb-encrypt
+                   vdb-lock
+                   vdb-passwd
+                   vdb-unlock
+                   vdb-validate ) }
 1
diff --git a/setup/konfigure.perl b/setup/konfigure.perl
index c6a08ec..f74d191 100644
--- a/setup/konfigure.perl
+++ b/setup/konfigure.perl
@@ -892,7 +892,7 @@ EndText
     L($F, "NO_ARRAY_BOUNDS_WARNING = $NO_ARRAY_BOUNDS_WARNING");
     L($F);
 
-    print $F <<EndText;
+        print $F <<EndText;
 # \$(VERSION) is defined in a separate file which is updated every release
 include \$(TOP)/build/Makefile.vers
 
diff --git a/setup/package.prl b/setup/package.prl
index fa4d60e..9028eb0 100644
--- a/setup/package.prl
+++ b/setup/package.prl
@@ -1,57 +1,66 @@
 ################################################################################
-sub PACKAGE      { 'ncbi-vdb' }
-sub PACKAGE_TYPE { 'L' }
-sub PACKAGE_NAME { 'NCBI-VDB' }
-sub PACKAGE_NAMW { 'VDB' }
+sub PACKAGE      { 'sra-tools' }
+sub PACKAGE_TYPE { 'B' }
+sub PACKAGE_NAME { 'SRA-TOOLS' }
+sub PACKAGE_NAMW { 'SRATOOLS' }
 sub CONFIG_OUT   { 'build' }
 sub PKG { ( LNG   => 'C',
             OUT   => 'ncbi-outdir',
             LOCOUT=> '../../OUTDIR',
-            PATH  => '/usr/local/ncbi/ncbi-vdb',
-            UPATH =>      '$HOME/ncbi/ncbi-vdb', ) }
-sub DEPENDS { ( { name => 'hdf5' , Include => '/usr/include'        , },
+            PATH  => '/usr/local/ncbi/sra-tools',
+            UPATH =>      '$HOME/ncbi/sra-tools', ) }
+sub DEPENDS { ( { name => 'fuse' , Include => '/usr/include'        , },
+                { name => 'hdf5' , Include => '/usr/include'        , },
                 { name => 'magic', Include => '/usr/include'        , },
                 { name => 'xml2' , Include => '/usr/include/libxml2', } ) }
-sub REQ { ( { name    => 'ngs-sdk',
+sub REQ { (
+            { name    => 'ngs-sdk',
               aname   => 'NGS',
               option  => 'with-ngs-sdk-prefix',
               origin  => 'I',
-              type    => 'IDQ',
+              type    => 'L',
               srcpath => '../ngs/ngs-sdk',
               pkgpath => '/usr/local/ngs/ngs-sdk',
               usrpath =>      '$HOME/ngs/ngs-sdk',
               bldpath => '$HOME/ncbi-outdir/ngs-sdk',
               locbldpath=>'$Bin/../../OUTDIR/ngs-sdk',
               include => 'ngs/itf/Refcount.h',
-              lib     => 'libngs-sdk.$SHLX',
+              lib     => 'libngs-c++.a',
             },
-            { name    => 'ngs-java',
-              aname   => 'NGS_JAVA',
-              option  => 'with-ngs-java-prefix',
+            { name    => 'ncbi-vdb',
+              aname   => 'VDB',
+              option  => 'with-ncbi-vdb-sources',
+              boption => 'with-ncbi-vdb-build',
               origin  => 'I',
-              type    => 'JO',
-              pkgpath => '/usr/local/ngs/ngs-java',
-              usrpath =>      '$HOME/ngs/ngs-java',
-              bldpath => '$HOME/ncbi-outdir/ngs-java',
-              locbldpath=>'$Bin/../../OUTDIR/ngs-java',
-              lib     => 'ngs-java.jar',
+              type    => 'SB',
+              srcpath => '../ncbi-vdb',
+              pkgpath => '/usr/local/ncbi/ncbi-vdb',
+              usrpath =>      '$HOME/ncbi/ncbi-vdb',
+              bldpath => '$HOME/ncbi-outdir/ncbi-vdb',
+              locbldpath=>'$Bin/../../OUTDIR/ncbi-vdb',
+              include => 'klib/rc.h',
+              src     => 'libs/kfg/default.kfg',
+              lib     => 'libncbi-vdb.a',
+              ilib    => 'libkapp.a',
+            },
+            { name    => 'fuse',
+              option  => 'with-fuse-prefix',
+              origin  => 'E',
+              type    => 'LIO',
             },
             { name    => 'hdf5',
               option  => 'with-hdf5-prefix',
               origin  => 'E',
               type    => 'LIO',
-              pkgpath => '/usr',
-              usrpath => '$HOME',
-              include => 'hdf5.h',
-              lib     => 'libhdf5.a',
+            },
+            { name    => 'magic',
+              option  => 'with-magic-prefix',
+              origin  => 'E',
+              type    => 'LIO',
             },
             { name    => 'xml2',
               option  => 'with-xml2-prefix',
               origin  => 'E',
               type    => 'LIO',
-              pkgpath => '/usr',
-              usrpath => '$HOME',
-              include => 'libxml2/xmlreader.h',
-              lib     => 'libxml2.a',
         } ) }
 1
diff --git a/shared/Makefile b/shared/Makefile
new file mode 100644
index 0000000..49a5ba7
--- /dev/null
+++ b/shared/Makefile
@@ -0,0 +1,85 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ..)
+
+MODULE = shared
+
+INT_LIBS = \
+	libtk-version \
+
+ALL_LIBS = \
+	$(INT_LIBS)
+
+ALL_TOOLS =      \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+	
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/std
+
+$(INT_LIBS): makedirs
+	@ $(MAKE_CMD) $(ILIBDIR)/$@
+
+
+.PHONY: all std $(ALL_LIBS)
+
+#-------------------------------------------------------------------------------
+# std
+#
+$(TARGDIR)/std: \
+	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
+
+.PHONY: $(TARGDIR)/std
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# toolkit-version
+#
+$(ILIBDIR)/libtk-version: $(addprefix $(ILIBDIR)/libtk-version.,$(ILIBEXT))
+
+TK_VERSION_SRC = \
+    toolkit.vers
+
+TK_VERSION_OBJ = \
+	$(addsuffix .$(LOBX),$(TK_VERSION_SRC))
+
+$(ILIBDIR)/libtk-version.$(LIBX): $(TK_VERSION_OBJ)
+	$(LD) --slib -o $@ $^ $(KFS_LIB)
+
+
diff --git a/libs/ncbi-vdb/libncbi-vdb.vers b/shared/toolkit.vers
similarity index 100%
rename from libs/ncbi-vdb/libncbi-vdb.vers
rename to shared/toolkit.vers
diff --git a/shared/toolkit.vers.c b/shared/toolkit.vers.c
new file mode 100644
index 0000000..ee350fb
--- /dev/null
+++ b/shared/toolkit.vers.c
@@ -0,0 +1,8 @@
+#include "toolkit.vers.h"
+
+#include <kapp/main.h>
+
+ver_t CC KAppVersion()
+{
+    return TOOLKIT_VERS;
+}
diff --git a/shared/toolkit.vers.h b/shared/toolkit.vers.h
new file mode 100644
index 0000000..b34a081
--- /dev/null
+++ b/shared/toolkit.vers.h
@@ -0,0 +1 @@
+#define TOOLKIT_VERS 0x02070000
diff --git a/test/Makefile b/test/Makefile
index dd3ab34..15bbf6c 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -34,31 +34,28 @@ include $(TOP)/build/Makefile.config
 #-------------------------------------------------------------------------------
 # default
 #
-SUBDIRS =       \
-    ktst        \
-    cc          \
-    ext         \
-    judy_test   \
-    kfc         \
-    kfs         \
-    klib        \
-    kfg         \
-    kapp        \
-    kns         \
-    kdb         \
-    kproc       \
-    vdb         \
-    ngs         \
-    ngs-c++     \
-    ngs-java    \
-    ngs-python  \
-    search      \
-    vfs         \
-    sraxf       \
-    vxf         \
-    loader      \
-    krypto      \
-    cipher      \
+SUBDIRS =    \
+	fastq-loader    \
+	vcf-loader      \
+	kget            \
+	general-loader  \
+	vschema         \
+	align-info      \
+	align-cache     \
+	vdb-dump        \
+	ref-variation   \
+	vdb-validate    \
+	kar             \
+    copycat         \
+	fastdump        \
+	vdb-copy        \
+	qual-recalib-stat        \
+	sra-pileup      \
+	srapath         \
+    fuse            \
+
+# under construction    
+#    ngs-pileup      \
 
 # common targets for non-leaf Makefiles; must follow a definition of SUBDIRS
 include $(TOP)/build/Makefile.targets
diff --git a/test/align-cache/CSRA_file b/test/align-cache/CSRA_file
new file mode 100644
index 0000000..18e06d2
Binary files /dev/null and b/test/align-cache/CSRA_file differ
diff --git a/test/align-cache/Makefile b/test/align-cache/Makefile
new file mode 100644
index 0000000..9a8ded8
--- /dev/null
+++ b/test/align-cache/Makefile
@@ -0,0 +1,58 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/align-cache
+
+TEST_TOOLS = \
+
+ALL_TOOLS = \
+	$(TEST_TOOLS) \
+
+include $(TOP)/build/Makefile.env
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
+
+#-------------------------------------------------------------------------------
+# align-cache tool tests
+#
+runtests: align-cache
+
+
+align-cache: $(BINDIR)/align-cache
+	@ rm -rf CSRA_file.cache
+	@ $(BINDIR)/align-cache -t 10 --min-cache-count 1 CSRA_file CSRA_file.cache
+	@ $(BINDIR)/vdb-validate CSRA_file.cache/ 2>&1 | grep --quiet "is consistent"
+	@ rm -rf CSRA_file.cache
+	
+vg: $(BINDIR)/align-cache
+	valgrind --ncbi --suppressions=$(SRCDIR)/valgrind.suppress $(BINDIR)/align-cache -t 10 --min-cache-count 1 CSRA_file CSRA_file.cache
diff --git a/test/align-cache/valgrind.suppress b/test/align-cache/valgrind.suppress
new file mode 100644
index 0000000..002d332
--- /dev/null
+++ b/test/align-cache/valgrind.suppress
@@ -0,0 +1,6 @@
+{
+   vt_cache
+   Memcheck:Leak
+   fun:calloc
+   fun:_ZN3ngs7Resolve*
+}
diff --git a/test/align-info/Makefile b/test/align-info/Makefile
new file mode 100644
index 0000000..3266e05
--- /dev/null
+++ b/test/align-info/Makefile
@@ -0,0 +1,48 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/align-info
+
+TEST_TOOLS = \
+
+include $(TOP)/build/Makefile.env
+
+$(TEST_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
+
+#-------------------------------------------------------------------------------
+# runtests
+runtests: cmdline
+
+cmdline:
+	# make sure -h does not crash
+	$(BINDIR)/align-info -h 
\ No newline at end of file
diff --git a/test/cc/Makefile b/test/cc/Makefile
deleted file mode 100644
index 73e5009..0000000
--- a/test/cc/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-MODULE = test/cc
-
-TEST_TOOLS = \
-	test-asm
-
-include $(TOP)/build/Makefile.env
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: $(ALL_LIBS) $(TEST_TOOLS)
-
-clean: stdclean
-
-#----------------------------------------------------------------
-# asm-test
-#
-
-ASM_TEST_SRC = \
-	asm-test
-
-ASM_TEST_OBJ = \
-	$(addsuffix .$(OBJX),$(ASM_TEST_SRC))
-
-ASM_TEST_LIB = \
-	-skapp \
-    -sncbi-vdb \
-    -sktst
-
-$(TEST_BINDIR)/test-asm: $(ASM_TEST_OBJ)
-	$(LP) --exe -o $@ $^ $(ASM_TEST_LIB)
-
diff --git a/test/cc/asm-test.cpp b/test/cc/asm-test.cpp
deleted file mode 100644
index 246ba05..0000000
--- a/test/cc/asm-test.cpp
+++ /dev/null
@@ -1,465 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests of functions potentially implemented using asm
-*
-* For now, only cover operations with jumps inside (to test transition from relative offsets to labels)
-*
-*/
-
-#include <ktst/unit_test.hpp>
-
-#include <atomic32.h>
-#include <arch-impl.h>
-
-TEST_SUITE(AsmTestSuite);
-
-// 32 bit operations
-
-TEST_CASE(a32_read_and_add)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add ( & v, 3 ), 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 5 );
-}
-
-TEST_CASE(a32_add_and_read)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_add_and_read ( & v, 3 ), 5 );
-}
-
-TEST_CASE(a32_read_and_add_lt_true)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_lt ( & v, 3 , 4 ), 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 5 );
-}
-TEST_CASE(a32_read_and_add_lt_false)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_lt ( & v, 3 , 2 ), 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 2 );
-}
-
-TEST_CASE(a32_read_and_add_le_true)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_le ( & v, 3 , 2 ), 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 5 );
-}
-TEST_CASE(a32_read_and_add_le_false)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_le ( & v, 3 , 1 ), 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 2 );
-}
-
-TEST_CASE(a32_read_and_add_eq_true)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_eq ( & v, 3 , 2 ), 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 5 );
-}
-TEST_CASE(a32_read_and_add_eq_false)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_eq ( & v, 3 , 1 ), 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 2 );
-}
-
-TEST_CASE(a32_read_and_add_ne_true)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_ne ( & v, 3 , 1 ), 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 5 );
-}
-TEST_CASE(a32_read_and_add_ne_false)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_ne ( & v, 3 , 2 ), 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 2 );
-}
-
-TEST_CASE(a32_read_and_add_ge_true)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_ge ( & v, 3 , 2 ), 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 5 );
-}
-TEST_CASE(a32_read_and_add_ge_false)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_ge ( & v, 3 , 3 ), 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 2 );
-}
-
-TEST_CASE(a32_read_and_add_gt_true)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_gt ( & v, 3 , 1 ), 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 5 );
-}
-TEST_CASE(a32_read_and_add_gt_false)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_gt ( & v, 3 , 2 ), 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 2 );
-}
-
-TEST_CASE(a32_read_and_add_odd_true)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 1 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_odd ( & v, 3 ), 1 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 4 );
-}
-TEST_CASE(a32_read_and_add_odd_false)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_odd ( & v, 3 ), 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 2 );
-}
-
-TEST_CASE(a32_read_and_add_even_true)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_even ( & v, 3 ), 2 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 5 );
-}
-TEST_CASE(a32_read_and_add_even_false)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 1 );
-    REQUIRE_EQ ( ( int ) atomic32_read_and_add_even ( & v, 3 ), 1 );
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 1 );
-}
-
-TEST_CASE(atomic32_inc_and_test_true)
-{
-    atomic32_t v;
-    atomic32_set ( & v, -1 );
-    REQUIRE ( atomic32_inc_and_test ( & v ) );
-}
-TEST_CASE(atomic32_inc_and_test_false)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 1 );
-    REQUIRE ( ! atomic32_inc_and_test ( & v ) );
-}
-
-TEST_CASE(atomic32_dec_and_test_true)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 1 );
-    REQUIRE ( atomic32_dec_and_test ( & v ) );
-}
-TEST_CASE(atomic32_dec_and_test_false)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 2 );
-    REQUIRE ( ! atomic32_dec_and_test ( & v ) );
-}
-
-TEST_CASE(atomic32_test_and_set_true)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 0 );
-    REQUIRE_EQ ( ( int ) 0, ( int ) atomic32_test_and_set ( & v, 1, 0 ) );  // returns prior value of v
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 1 );
-}
-TEST_CASE(atomic32_test_and_set_false)
-{
-    atomic32_t v;
-    atomic32_set ( & v, 0 );
-    REQUIRE_EQ ( ( int ) 0,  ( int ) atomic32_test_and_set ( & v, 1, 2 ) ); // returns prior value of v
-    REQUIRE_EQ ( ( int ) atomic32_read ( & v ), 0 );
-}
-
-#ifdef USE_GCC_BUILTIN
-#undef USE_GCC_BUILTIN
-TEST_CASE(uint16_lsbit_0_asm)
-{
-    REQUIRE_EQ ( ( int16_t ) -1, uint16_lsbit ( 0 ) );
-}
-TEST_CASE(uint16_lsbit_not_0_asm)
-{
-    REQUIRE_EQ ( ( int16_t ) 1, uint16_lsbit ( 0xfffe ) );
-}
-TEST_CASE(uint32_lsbit_0_asm)
-{
-    REQUIRE_EQ ( ( int32_t ) -1, uint32_lsbit ( 0 ) );
-}
-TEST_CASE(uint32_lsbit_not_0_asm)
-{
-    REQUIRE_EQ ( ( int32_t ) 17, uint32_lsbit ( 0xfffe0000 ) );
-}
-#define USE_GCC_BUILTIN
-TEST_CASE(uint16_lsbit_0_builtin)
-{
-    REQUIRE_EQ ( ( int16_t ) -1, uint16_lsbit ( 0 ) );
-}
-TEST_CASE(uint16_lsbit_not_0_builtin)
-{
-    REQUIRE_EQ ( ( int16_t ) 1, uint16_lsbit ( 0xfffe ) );
-}
-TEST_CASE(uint32_lsbit_0_builtin)
-{
-    REQUIRE_EQ ( ( int32_t ) -1, uint32_lsbit ( 0 ) );
-}
-TEST_CASE(uint32_lsbit_not_0_builtin)
-{
-    REQUIRE_EQ ( ( int32_t ) 17, uint32_lsbit ( 0xfffe0000 ) );
-}
-#else
-#define USE_GCC_BUILTIN
-TEST_CASE(uint16_lsbit_0_asm)
-{
-    REQUIRE_EQ ( ( int16_t ) -1, uint16_lsbit ( 0 ) );
-}
-TEST_CASE(uint16_lsbit_not_0_asm)
-{
-    REQUIRE_EQ ( ( int16_t ) 1, uint16_lsbit ( 0xfffe ) );
-}
-TEST_CASE(uint32_lsbit_0_asm)
-{
-    REQUIRE_EQ ( ( int32_t ) -1, uint32_lsbit ( 0 ) );
-}
-TEST_CASE(uint32_lsbit_not_0_asm)
-{
-    REQUIRE_EQ ( ( int32_t ) 17, uint32_lsbit ( 0xfffe0000 ) );
-}
-#undef USE_GCC_BUILTIN
-TEST_CASE(uint16_lsbit_0_builtin)
-{
-    REQUIRE_EQ ( ( int16_t ) -1, uint16_lsbit ( 0 ) );
-}
-TEST_CASE(uint16_lsbit_not_0_builtin)
-{
-    REQUIRE_EQ ( ( int16_t ) 1, uint16_lsbit ( 0xfffe ) );
-}
-TEST_CASE(uint32_lsbit_0_builtin)
-{
-    REQUIRE_EQ ( ( int32_t ) -1, uint32_lsbit ( 0 ) );
-}
-TEST_CASE(uint32_lsbit_not_0_builtin)
-{
-    REQUIRE_EQ ( ( int32_t ) 17, uint32_lsbit ( 0xfffe0000 ) );
-}
-#endif
-
-
-#if _ARCH_BITS == 64
-
-// 64 bit operations
-
-#include <atomic64.h>
-
-TEST_CASE(a64_read_and_add)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add ( & v, 3 ), ( int64_t ) 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 5 );
-}
-
-TEST_CASE(a64_add_and_read)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_add_and_read ( & v, 3 ), ( int64_t ) 5 );
-}
-
-TEST_CASE(a64_read_and_add_lt_true)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add_lt ( & v, 3 , 4 ), ( int64_t ) 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 5 );
-}
-TEST_CASE(a64_read_and_add_lt_false)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add_lt ( & v, 3 , 2 ), ( int64_t ) 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 2 );
-}
-
-TEST_CASE(a64_read_and_add_le_true)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add_le ( & v, 3 , 2 ), ( int64_t ) 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 5 );
-}
-TEST_CASE(a64_read_and_add_le_false)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add_le ( & v, 3 , 1 ), ( int64_t ) 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 2 );
-}
-
-TEST_CASE(a64_read_and_add_eq_true)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add_eq ( & v, 3 , 2 ), ( int64_t ) 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 5 );
-}
-TEST_CASE(a64_read_and_add_eq_false)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add_eq ( & v, 3 , 1 ), ( int64_t ) 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 2 );
-}
-
-TEST_CASE(a64_read_and_add_ne_true)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add_ne ( & v, 3 , 1 ), ( int64_t ) 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 5 );
-}
-TEST_CASE(a64_read_and_add_ne_false)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add_ne ( & v, 3 , 2 ), ( int64_t ) 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 2 );
-}
-
-TEST_CASE(a64_read_and_add_ge_true)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add_ge ( & v, 3 , 2 ), ( int64_t ) 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 5 );
-}
-TEST_CASE(a64_read_and_add_ge_false)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add_ge ( & v, 3 , 3 ), ( int64_t ) 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 2 );
-}
-
-TEST_CASE(a64_read_and_add_gt_true)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add_gt ( & v, 3 , 1 ), ( int64_t ) 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 5 );
-}
-TEST_CASE(a64_read_and_add_gt_false)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add_gt ( & v, 3 , 2 ), ( int64_t ) 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ),( int64_t )  2 );
-}
-
-TEST_CASE(a64_read_and_add_odd_true)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 1 );
-    REQUIRE_EQ ( ( int64_t )atomic64_read_and_add_odd ( & v, 3 ), ( int64_t ) 1 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 4 );
-}
-TEST_CASE(a64_read_and_add_odd_false)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add_odd ( & v, 3 ), ( int64_t ) 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 2 );
-}
-
-TEST_CASE(a64_read_and_add_even_true)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add_even ( & v, 3 ), ( int64_t ) 2 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 5 );
-}
-TEST_CASE(a64_read_and_add_even_false)
-{
-    atomic64_t v;
-    atomic64_set ( & v, 1 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read_and_add_even ( & v, 3 ), ( int64_t ) 1 );
-    REQUIRE_EQ ( ( int64_t ) atomic64_read ( & v ), ( int64_t ) 1 );
-}
-
-#endif
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-asm";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t rc=AsmTestSuite(argc, argv);
-    return rc;
-}
-
-}
-
-
diff --git a/test/cipher/Makefile b/test/cipher/Makefile
deleted file mode 100644
index a246cf1..0000000
--- a/test/cipher/Makefile
+++ /dev/null
@@ -1,52 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-
-MODULE = test/cipher
-
-ALL_TARGS = \
-
-include $(TOP)/build/Makefile.env
-
-
-# make sure runs are not cached in the user repository when running tests
-ifeq ($(wildcard ../../../asm-trace),)
-	ifeq (,$(VDB_CONFIG))
-		VDB_CONFIG = $(shell pwd)/../only-remote-repository.kfg
-	endif
-endif
-
-
-#-------------------------------------------------------------------------------
-# runtests
-#
-runtests: cipher
-
-cipher:
-	@ export LD_LIBRARY_PATH=$(LIBDIR) ; ./test.sh $(TOP)
-
-.PHONY: cipher
diff --git a/test/cipher/test.sh b/test/cipher/test.sh
deleted file mode 100755
index c02814a..0000000
--- a/test/cipher/test.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-TOP=$1
-
-if [ $(uname) = "Darwin" ]; then
-    echo "cipher test is turned off on Mac"
-    exit 0
-fi
-
-#installing cipher module into newly created virtual env
-tmp_py_env=temp_env
-python_bin=$(which python2)
-echo $python_bin
-if [$python_bin == ""]; then
-    python_bin=$(which python)
-fi
-virtualenv -p $python_bin $tmp_py_env
-. $tmp_py_env/bin/activate
-tmp_cur_dir=$(pwd)
-cd $TOP/libs/cipher/cipher-1.7/
-$tmp_py_env/bin/python setup.py install
-cd $tmp_cur_dir
-unset tmp_cur_dir
-
-echo "Running python cipher test..."
-
-#running cipher test in py virtual env
-rm -f test.in test.enc test.out
-
-for i in {0..10000}
-do
-    echo "Hello world $i" >> test.in
-done
-
-python $TOP/libs/cipher/cipher-1.7/encrypt.py --password=password123 test.in test.enc
-python $TOP/libs/cipher/cipher-1.7/decrypt.py --password=password123 test.enc test.out
-
-diff test.in test.out
-exit_code=$?
-rm test.in test.enc test.out
-
-echo "pyhon cipher test is complete."
-
-# cleanup
-deactivate
-rm -rf $tmp_py_env
-unset tmp_py_env
-
-exit $exit_code
diff --git a/test/copycat/Makefile b/test/copycat/Makefile
new file mode 100644
index 0000000..3f4ed99
--- /dev/null
+++ b/test/copycat/Makefile
@@ -0,0 +1,60 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/copycat
+
+TEST_TOOLS = \
+
+include $(TOP)/build/Makefile.env
+
+$(TEST_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
+
+#-------------------------------------------------------------------------------
+# scripted tests
+#
+ifeq (1,$(HAVE_MAGIC))
+runtests: copy
+else
+runtests:
+	@ echo "NOTE - copycat tests are skipped:"          \
+		"copycat was not built"
+	@ echo "because it requires our internal library 'libkff'" \
+		"which requires 'libmagic' and its development headers."
+endif
+
+copy: 
+	@ echo "Starting copycat tests..."
+	@ rm -rf actual
+	@ $(BINDIR)/copycat -h >/dev/null
+	@ export PATH=$(BINDIR):$$PATH; vdb-config | grep bin; copycat ./input/1.xml actual/ >/dev/null && diff ./input/1.xml actual/1.xml 
+	@ rm -rf actual
diff --git a/test/copycat/input/1.xml b/test/copycat/input/1.xml
new file mode 100644
index 0000000..cc70b4f
--- /dev/null
+++ b/test/copycat/input/1.xml
@@ -0,0 +1,5 @@
+<ROOT version="2.6.2">
+  <archive id="1" path="1.tar" name="1.tar" size="10240" mtime="2016-04-07T21:06:20Z" filetype="Archive/TapeArchive" md5="41fbc9b272d12c815c8a4c301a354b95"  crc32="d7b8fc09">
+    <file id="2" path="1.tar/1" name="1" size="25" lines="4" mtime="2016-04-07T19:47:13Z" filetype="Unknown/Unknown" md5="293363f5942f2ca7e4d0a1aa9ffda34f"  offset="512"/>
+  </archive>
+</ROOT>
diff --git a/test/ext/Makefile b/test/ext/Makefile
deleted file mode 100644
index 28e8917..0000000
--- a/test/ext/Makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-by_default: runtests
-
-TOP ?= $(abspath ../..)
-MODULE = test/ext
-
-include $(TOP)/build/Makefile.shell
-
-include $(TOP)/build/Makefile.config
-
-#-------------------------------------------------------------------------------
-# default
-#
-SUBDIRS = \
-
-# The libmagic tests (and copycat which is the only user of libmagic for now) rely on 
-# the correct version of libmagic database installed on the system.
-# Disabling for now.
-#    magic \
-
-# common targets for non-leaf Makefiles; must follow a definition of SUBDIRS
-include $(TOP)/build/Makefile.targets
-
-$(SUBDIRS):
-	@ $(MAKE) -C $@
-
-.PHONY: default $(SUBDIRS)
-
diff --git a/test/ext/magic/Makefile b/test/ext/magic/Makefile
deleted file mode 100644
index d7a0603..0000000
--- a/test/ext/magic/Makefile
+++ /dev/null
@@ -1,61 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
- 
-default: runtests
- 
-TOP ?= $(abspath ../../..)
- 
-MODULE = test/ext/magic
- 
-TEST_TOOLS = \
-	test-magic
- 
-include $(TOP)/build/Makefile.env
- 
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
- 
-.PHONY: $(TEST_TOOLS)
- 
-clean: stdclean
- 
-#-------------------------------------------------------------------------------
-# test-magic
-#
-TEST_MAGIC_SRC = \
-	magictest 
- 
-TEST_MAGIC_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_MAGIC_SRC))
- 
-TEST_MAGIC_LIB = \
-	-skapp \
-    -smagic \
-    -sncbi-vdb \
-    -sktst
- 
- 
-$(TEST_BINDIR)/test-magic: $(TEST_MAGIC_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_MAGIC_LIB)
- 
\ No newline at end of file
diff --git a/test/ext/magic/magictest.cpp b/test/ext/magic/magictest.cpp
deleted file mode 100644
index cbf4f0f..0000000
--- a/test/ext/magic/magictest.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
- 
-/**
-* Integration tests for libmagic, version 5.04
-*/
- 
-#include <ktst/unit_test.hpp>
- 
-#include <magic.h>
- 
-using namespace std;
- 
-TEST_SUITE(MagicTestSuite);
- 
-TEST_CASE(openClose)
-{
-    magic_t cookie = magic_open(0);
-    REQUIRE_NOT_NULL(cookie);
-    magic_close(cookie);
-}
- 
-TEST_CASE(ASCII)
-{
-    magic_t cookie = magic_open(0);
-    REQUIRE_NOT_NULL(cookie);
-    
-    REQUIRE_EQ(0, magic_load(cookie, NULL));
-    REQUIRE_EQ(string("ASCII English text"), string(magic_file(cookie, "./Makefile"))); 
-    
-    magic_close(cookie);
-}
- 
-//////////////////////////////////////////// Main
-extern "C"
-{
- 
-#include <kapp/args.h>
- 
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
- 
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
- 
-const char UsageDefaultName[] = "test-magic";
- 
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t rc=MagicTestSuite(argc, argv);
-    return rc;
-}
- 
-}
diff --git a/test/fastdump/Makefile b/test/fastdump/Makefile
new file mode 100644
index 0000000..ea3d1d0
--- /dev/null
+++ b/test/fastdump/Makefile
@@ -0,0 +1,53 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/fastdump
+
+TEST_TOOLS = 
+
+include $(TOP)/build/Makefile.env
+
+.PHONY: $(TEST_TOOLS)
+
+slowtests: fastdump1 fastdump2
+
+ACC = SRR341578
+SCRATCH = /tmp/$(shell whoami)/
+THREADS = 4
+
+fastdump1: prepare $(BINDIR)/fastdump $(BINDIR)/vdb-dump
+	@ mkdir -p $(SCRATCH)
+	@./test_no_1.sh $(ACC) $(SCRATCH) $(THREADS) $(BINDIR)
+
+fastdump2: $(BINDIR)/fastdump $(BINDIR)/vdb-dump
+	@ mkdir -p $(SCRATCH)
+	@./test_no_2.sh $(ACC) $(SCRATCH) $(THREADS) $(BINDIR)
+
+prepare:
+	@ export BINDIR=$(BINDIR) ; export VDB_INCDIR=$(VDB_INCDIR) ; \
+        ./copy-default-kfg.sh
diff --git a/test/fastdump/copy-default-kfg.sh b/test/fastdump/copy-default-kfg.sh
new file mode 100755
index 0000000..ad11d52
--- /dev/null
+++ b/test/fastdump/copy-default-kfg.sh
@@ -0,0 +1,12 @@
+# make sure we can find remote repository if site repository does not exist
+
+${BINDIR}/vdb-config -on repository/site/main/tracearc/root
+if [ "$?" != 0 ] ; then
+    if [ -f   ${BINDIR}/../../../../../../../ncbi-vdb/libs/kfg/default.kfg ]
+    then
+        cp -v ${BINDIR}/../../../../../../../ncbi-vdb/libs/kfg/default.kfg \
+                                                    ${BINDIR}/ncbi
+    else
+        cp -v ${VDB_INCDIR}/../libs/kfg/default.kfg ${BINDIR}/ncbi
+    fi
+fi
diff --git a/test/fastdump/test_no_1.sh b/test/fastdump/test_no_1.sh
new file mode 100755
index 0000000..25f5f12
--- /dev/null
+++ b/test/fastdump/test_no_1.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+ACC="$1"
+SCRATCH="$2"
+THREADS="$3"
+BINDIR="$4"
+
+echo ""
+echo "===== TESTING FASTDUMP: TEST #1 ( output-type = SPOT_ID,READ,SPOT_GROUP )=="
+echo "accession       : $ACC"
+echo "scratch-space at: $SCRATCH"
+echo "parallel threads: $THREADS"
+echo "binaries in     : $BINDIR"
+echo ""
+
+FASTDUMP_OUT="$SCRATCH$ACC.fastdump.txt"
+VDB_DUMP_OUT="$SCRATCH$ACC.vdb_dump.txt"
+
+clear_files()
+{
+    CMD="rm -rf $FASTDUMP_OUT $VDB_DUMP_OUT"
+    $CMD 2>&1 > /dev/null
+}
+
+clear_files
+
+#produce the output using the lookup-file
+CMD="$BINDIR/fastdump $ACC -t $SCRATCH -f special -o $FASTDUMP_OUT -e $THREADS -p"
+echo "$CMD"
+$CMD
+rc=$?; if [[ $rc != 0 ]]; then echo "$CMD failed"; exit $rc; fi
+
+#produce the same output using vdb-dump with internal schema-joins
+CMD="$BINDIR/vdb-dump $ACC -C SPOT_ID,READ,SPOT_GROUP -f tab"
+echo "$CMD"
+$CMD > $VDB_DUMP_OUT
+rc=$?; if [[ $rc != 0 ]]; then echo "$CMD failed"; exit $rc; fi
+
+#verify that the output of fastdump via vdb-dump
+CMD="diff $FASTDUMP_OUT $VDB_DUMP_OUT"
+echo "$CMD"
+$CMD 2>&1 > /dev/null
+rc=$?;
+if [[ $rc != 0 ]]; then echo "$CMD failed"; exit $rc; fi
+if [[ $rc == 0 ]]; then echo ">>>SUCCESS!"; fi
+
+clear_files
+
+exit $rc
diff --git a/test/fastdump/test_no_2.sh b/test/fastdump/test_no_2.sh
new file mode 100755
index 0000000..48495de
--- /dev/null
+++ b/test/fastdump/test_no_2.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+ACC="$1"
+SCRATCH="$2"
+THREADS="$3"
+BINDIR="$4"
+
+echo ""
+echo "===== TESTING FASTDUMP: TEST #2 ( output-type = FASTQ )===================="
+echo "accession       : $ACC"
+echo "scratch-space at: $SCRATCH"
+echo "parallel threads: $THREADS"
+echo "binaries in     : $BINDIR"
+echo ""
+
+FASTDUMP_OUT="$SCRATCH$ACC.fastdump.txt"
+VDB_DUMP_OUT="$SCRATCH$ACC.vdb_dump.txt"
+
+clear_files()
+{
+    CMD="rm -rf $FASTDUMP_OUT $VDB_DUMP_OUT"
+    $CMD 2>&1 > /dev/null
+}
+
+clear_files
+
+#produce the output using the lookup-file
+CMD="$BINDIR/fastdump $ACC -t $SCRATCH -f fastq -o $FASTDUMP_OUT -e $THREADS -p"
+echo "$CMD"
+$CMD
+rc=$?; if [[ $rc != 0 ]]; then echo "$CMD failed"; exit $rc; fi
+
+#produce the same output using vdb-dump with internal schema-joins
+CMD="$BINDIR/vdb-dump $ACC -f fastq"
+echo "$CMD"
+$CMD > $VDB_DUMP_OUT
+rc=$?; if [[ $rc != 0 ]]; then echo "$CMD failed"; exit $rc; fi
+
+#verify that the output of fastdump via vdb-dump
+CMD="diff $FASTDUMP_OUT $VDB_DUMP_OUT"
+echo "$CMD"
+$CMD 2>&1 > /dev/null
+rc=$?;
+if [[ $rc != 0 ]]; then echo "$CMD failed"; exit $rc; fi
+if [[ $rc == 0 ]]; then echo ">>>SUCCESS!"; fi
+
+clear_files
+
+exit $rc
diff --git a/test/fastq-loader/.gitignore b/test/fastq-loader/.gitignore
new file mode 100644
index 0000000..508061b
--- /dev/null
+++ b/test/fastq-loader/.gitignore
@@ -0,0 +1 @@
+actual
diff --git a/test/fastq-loader/Makefile b/test/fastq-loader/Makefile
new file mode 100644
index 0000000..6604ea8
--- /dev/null
+++ b/test/fastq-loader/Makefile
@@ -0,0 +1,208 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+#TODO: transfer slowtests/big_loads (see CVS)
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/fastq-loader
+
+TEST_TOOLS = \
+	wb-test-fastq \
+	test-fastq-loader
+
+include $(TOP)/build/Makefile.env
+
+$(TEST_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
+
+#-------------------------------------------------------------------------------
+# white-box test
+#
+FASTQ_TEST_SRC = \
+	wb-test-fastq 
+
+FASTQ_TEST_OBJ = \
+	$(addsuffix .$(OBJX),$(FASTQ_TEST_SRC))
+
+FASTQ_TEST_LIB = \
+	-skapp \
+	-sktst \
+	-sfastqloader \
+	-sload \
+	-sncbi-wvdb \
+
+$(TEST_BINDIR)/wb-test-fastq: $(FASTQ_TEST_OBJ)
+	$(LP) --exe -o $@ $^ $(FASTQ_TEST_LIB)
+
+wb: wb-test-fastq
+	$(TEST_BINDIR)/wb-test-fastq  2>&1
+
+#-------------------------------------------------------------------------------
+# test-fastqtest-loader
+#
+FASTQTEST_LOADER_SRC = \
+	test-fastq-loader 
+
+FASTQTEST_LOADER_OBJ = \
+	$(addsuffix .$(OBJX),$(FASTQTEST_LOADER_SRC))
+
+$(TEST_BINDIR)/test-fastq-loader: $(FASTQTEST_LOADER_OBJ)
+	$(LP) --exe -o $@ $^ $(FASTQ_TEST_LIB)
+
+tfl: 
+	$(MAKE) -C $(OBJDIR) -f $(SRCDIR)/Makefile test-fastq-loader
+	$(TEST_BINDIR)/test-fastq-loader
+
+.PHONY: test-fastq-loader
+
+#-------------------------------------------------------------------------------
+# scripted tests
+#
+runtests: set_schema smalltests
+
+set_schema: $(BINDIR)/vdb-config
+	find $(HOME)/ncbi -size +9999c -exec ls -l {} \; | sort -nk5 | tail
+	echo HOST=`hostname`
+	echo OS=$(OS)
+	echo USER=$(USER)
+	$(BINDIR)/vdb-config -s vdb/schema/paths="$(VDB_INCDIR)"
+
+SMALLRUN = @ $(SRCDIR)/runtestcase.sh $(BINDIR) $(SRCDIR)
+smalltests: $(TEST_TOOLS)
+	-rm -rf $(SRCDIR)/actual
+#   Small tests
+#   Input:
+#       Quality encoding: phred/logodds, ascii/decimal
+#           1.1 phred 33 
+	$(SMALLRUN) 1.1 0 $(SRCDIR)/input/1.1.fastq --quality PHRED_33
+#           1.2 phred 64 
+	$(SMALLRUN) 1.2 0 $(SRCDIR)/input/1.2.fastq --quality PHRED_64
+#           1.3 phred 33, decimal qualities
+	$(SMALLRUN) 1.3 3 $(SRCDIR)/input/1.3.fastq --quality PHRED_33
+#           1.4 logodds 64
+	$(SMALLRUN) 1.4 0 $(SRCDIR)/input/1.4.fastq --quality LOGODDS
+#       
+#       Single input file
+#           2.1 reads only, basespace
+	$(SMALLRUN) 2.1 0 $(SRCDIR)/input/2.1.fastq --quality PHRED_33
+#           2.1.1 reads only, colorspace
+	$(SMALLRUN) 2.1.1 0 $(SRCDIR)/input/2.1.1.fastq --quality PHRED_33
+#           2.2 qualities only
+	-$(SMALLRUN) 2.2 0 $(SRCDIR)/input/2.2.fastq --quality PHRED_33
+#           2.3 reads+qualities, qualities before reads
+	-$(SMALLRUN) 2.3 0 $(SRCDIR)/input/2.3.fastq --quality PHRED_33
+#           2.4 reads+qualities, reads before qualities
+	-$(SMALLRUN) 2.4 0 $(SRCDIR)/input/2.4.fastq --quality PHRED_33
+#           2.5 reads+qualities, paired up
+	$(SMALLRUN) 2.5 0 $(SRCDIR)/input/2.5.fastq --quality PHRED_33
+#           2.6 spot assembly
+	$(SMALLRUN) 2.6 0 $(SRCDIR)/input/2.6.fastq --quality PHRED_33
+#           2.7 spot assembly, read numbers not specified
+	$(SMALLRUN) 2.7 0 $(SRCDIR)/input/2.7.fastq --quality PHRED_33
+#           2.8 handling of N in reads, ALTREAD is a static column
+#           TODO; investigate intermittent failure (FIXED_SPOT_LEN == 0, not 3)
+	-$(SMALLRUN) 2.8 0 $(SRCDIR)/input/2.8.fastq --quality PHRED_33
+#           2.8.1 handling of N in reads, ALTREAD is a physical column
+	$(SMALLRUN) 2.8.1 0 $(SRCDIR)/input/2.8.1.fastq --quality PHRED_33
+#           2.9 mismatching length of sequence and quality (qualities shorter)
+	$(SMALLRUN) 2.9 3 $(SRCDIR)/input/2.9.fastq --quality PHRED_33
+#           2.9.1 mismatching length of sequence and quality (qualities longer)
+	$(SMALLRUN) 2.9.1 3 $(SRCDIR)/input/2.9.1.fastq --quality PHRED_33
+#
+#       Multiple files
+#           3.1 reads+qualities together
+	$(SMALLRUN) 3.1 0 $(SRCDIR)/input/3.1a.fastq $(SRCDIR)/input/3.1b.fastq --quality PHRED_33
+#           3.2 qualities separately from reads, reads file comes first
+	-$(SMALLRUN) 3.2 0 $(SRCDIR)/input/3.2a.fastq $(SRCDIR)/input/3.2b.fastq --quality PHRED_33
+#           3.3 qualities separately from reads, qualities file comes first (reject?)
+	-$(SMALLRUN) 3.3 0 $(SRCDIR)/input/3.3a.fastq $(SRCDIR)/input/3.3b.fastq --quality PHRED_33
+#           3.4 default read number 
+#	$(SMALLRUN) 3.4 0 -r 1 $(SRCDIR)/input/3.4a.fastq -r 2 $(SRCDIR)/input/3.4b.fastq --quality PHRED_33
+#
+#   Command line options:
+#           4.1 --tmpfs             temporary files created at the specified location
+	@echo "running 4.1"; export LD_LIBRARY_PATH=$(LIBDIR);$(BINDIR)/latf-load $(SRCDIR)/input/4.fastq --tmpfs $(SRCDIR)/actual/ -v -o actual/4.1.obj --quality PHRED_33 | grep "Path for scratch files: $(SRCDIR)/actual/" >/dev/null
+#           4.2 --qual-quant        quality values are quantized as specified
+	$(SMALLRUN) 4.2 0 $(SRCDIR)/input/4.fastq --qual-quant 1:10,10:20,20:30,30:- --quality PHRED_33
+#           4.3 --cache-size        handled correctly
+	@echo "running 4.3"; export LD_LIBRARY_PATH=$(LIBDIR);$(BINDIR)/latf-load $(SRCDIR)/input/4.fastq --cache-size 10 -v -o actual/4.1.obj --quality PHRED_33 | grep "Cache size: 10M" >/dev/null
+#           4.3.1 --cache-size      rejected if invalid
+	$(SMALLRUN) 4.3.1 3 $(SRCDIR)/input/4.fastq --cache-size BIG --quality PHRED_33
+#           4.4 --max-rec-count     stops at the specified record #
+	$(SMALLRUN) 4.4 0 $(SRCDIR)/input/4.4.fastq --max-rec-count 3 --quality PHRED_33
+#           4.5 --max-err-count     stops after the specified # of errors
+	$(SMALLRUN) 4.5 3 $(SRCDIR)/input/4.5.fastq --max-err-count 2 --quality PHRED_33
+#           4.5.1 --max-err-pct     fails if % of error records is too high
+	$(SMALLRUN) 4.5.1 3 $(SRCDIR)/input/4.5.1.fastq --quality PHRED_33  --max-err-count 10 --max-err-pct 20
+#           4.6 --platform          saves correct value in the PLATFORM column 
+	$(SMALLRUN) 4.6 0 $(SRCDIR)/input/4.fastq -p LS454 --quality PHRED_33
+#           4.6.1 --platform        rejects invalid values
+	$(SMALLRUN) 4.6.1 3 $(SRCDIR)/input/4.fastq -p SOMETHINGELSE --quality PHRED_33
+#           4.7 input file missing
+	$(SMALLRUN) 4.7 3 $(SRCDIR)/input/not_there --quality PHRED_33
+#   Gzipped input
+	$(SMALLRUN) 5.0 0 $(SRCDIR)/input/5.0.fastq.gz --quality PHRED_33
+#   Misparsed quality
+	$(SMALLRUN) 6.0 0 $(SRCDIR)/input/6.0.fastq --quality PHRED_33
+#   PACBIO fastq
+	$(SMALLRUN) 7.1 0 $(SRCDIR)/input/7.1.fastq --platform=PACBIO --quality PHRED_33
+	$(SMALLRUN) 7.2 0 $(SRCDIR)/input/7.2.fastq --platform=PACBIO --quality PHRED_33
+	$(SMALLRUN) 7.3 0 $(SRCDIR)/input/7.3.fastq --platform=PACBIO --quality PHRED_33
+#   secondary read numbers other than 3
+	$(SMALLRUN) 8.0 0 $(SRCDIR)/input/8.0.fastq --quality PHRED_33
+#   reject inconsistent secondary read numbers 
+	$(SMALLRUN) 8.1 3 $(SRCDIR)/input/8.1.fastq --quality PHRED_33
+#   newest Illumina tag line variation ("_" instead of " /")
+	$(SMALLRUN) 9.0 0 $(SRCDIR)/input/9.0.fastq --quality PHRED_33
+#   accepting ascii quality values up to 126
+	$(SMALLRUN) 10.0 0 $(SRCDIR)/input/10.0.fastq --quality PHRED_33
+    # 2-file fasta, tag line Run.Spot.Read
+	$(SMALLRUN) 11.0 0 $(SRCDIR)/input/11.0.1.fasta $(SRCDIR)/input/11.0.2.fasta --quality PHRED_33
+    # 2-file fastq, tag line Run.Spot.Read
+	$(SMALLRUN) 11.1 0 $(SRCDIR)/input/11.1.1.fastq $(SRCDIR)/input/11.1.2.fastq --quality PHRED_33
+    # Illumina, ignore barcodes
+	$(SMALLRUN) 12.0 0 $(SRCDIR)/input/12.0.fastq --quality PHRED_33 --ignore-illumina-tags
+    # Illumina, use barcodes as spotgroups
+	$(SMALLRUN) 12.1 0 $(SRCDIR)/input/12.1.fastq --quality PHRED_33 
+    # Illumina, use barcodes as spotgroups, alternative format
+	$(SMALLRUN) 12.2 0 $(SRCDIR)/input/12.2.fastq --quality PHRED_33
+    # Consume our own dog food (13.0.fastq created by fastq-dump )
+	$(SMALLRUN) 13.0 0 $(SRCDIR)/input/13.0.fastq --quality PHRED_33 
+    # Consume our own dog food (13.1.fastq created by fastq-dump -F )
+	$(SMALLRUN) 13.1 0 $(SRCDIR)/input/13.1.fastq --quality PHRED_33 
+    # SRA-2932: 30 is the preferred value for qualities when reading FASTA
+	$(SMALLRUN) 14.0 0 $(SRCDIR)/input/14.0.fasta $(SRCDIR)/input/14.0.fasta --quality PHRED_33
+	rm -rf $(SRCDIR)/actual
+
+onetest:
+	rm -rf $(SRCDIR)/actual
+	$(SMALLRUN) 13.1 0 $(SRCDIR)/input/13.1.fastq --quality PHRED_33 
+    
diff --git a/test/fastq-loader/expected/1.1.stdout b/test/fastq-loader/expected/1.1.stdout
new file mode 100644
index 0000000..f4f8914
--- /dev/null
+++ b/test/fastq-loader/expected/1.1.stdout
@@ -0,0 +1,30 @@
+       BASE_COUNT: 36
+   BIO_BASE_COUNT: 36
+   CMP_BASE_COUNT: 36
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 112332022230202..1120022110..03..0..
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 36
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 1
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 5, 13, 27, 22, 22, 19, 22, 23, 23, 23, 24, 24, 24, 23, 22, 22, 21, 22, 22, 21, 25, 24, 24, 22, 24, 22, 19, 18, 20, 19, 22, 22, 19, 22, 22, 24
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: GTCGCTTCTCGGAAGNGTGAAAGACAANAATNTTNN
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 36, 0
+         READ_SEG: [0, 36], [36, 0]
+       READ_START: 0, 36
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 1
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 36
+         TRIM_LEN: 36
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/1.2.stdout b/test/fastq-loader/expected/1.2.stdout
new file mode 100644
index 0000000..f5940fb
--- /dev/null
+++ b/test/fastq-loader/expected/1.2.stdout
@@ -0,0 +1,30 @@
+       BASE_COUNT: 36
+   BIO_BASE_COUNT: 36
+   CMP_BASE_COUNT: 36
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 112332022230202..1120022110..03..0..
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 36
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 1
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 16, 25, 25, 22, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: GTCGCTTCTCGGAAGNGTGAAAGACAANAATNTTNN
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 36, 0
+         READ_SEG: [0, 36], [36, 0]
+       READ_START: 0, 36
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 1
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 36
+         TRIM_LEN: 36
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/1.3.stderr b/test/fastq-loader/expected/1.3.stderr
new file mode 100644
index 0000000..a40494f
--- /dev/null
+++ b/test/fastq-loader/expected/1.3.stderr
@@ -0,0 +1,4 @@
+latf-load err: file="1.3.fastq"
+latf-load err:Invalid quality value (' '=32, position 2): for Phred33, valid range is from 33 to 126.
+latf-load err: format unsupported while parsing file - accession="obj" errors="1" status="failure"
+latf-load err: format unsupported while parsing file - load failed
diff --git a/test/fastq-loader/expected/1.3.stdout b/test/fastq-loader/expected/1.3.stdout
new file mode 100644
index 0000000..896a550
--- /dev/null
+++ b/test/fastq-loader/expected/1.3.stdout
@@ -0,0 +1,27 @@
+     ALIGNMENT_COUNT: 0, 0
+          BASE_COUNT: 36
+      BIO_BASE_COUNT: 36
+      CMP_BASE_COUNT: 36
+            CMP_READ: GTCGCTTCTCGGAAGNGTGAAAGACAANAATNTTNN
+        COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+              CS_KEY: TT
+           CS_NATIVE: false
+         MAX_SPOT_ID: 1
+         MIN_SPOT_ID: 1
+                NAME: 1
+            PLATFORM: SRA_PLATFORM_UNDEFINED
+PRIMARY_ALIGNMENT_ID: 0, 0
+             QUALITY: 8, 9, 10, 11, 12, 13, 14, 15, 16, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 7, 8, 9, 10, 11, 12, 13
+           RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+            READ_LEN: 36, 0
+            READ_SEG: [0, 36], [36, 0]
+          READ_START: 0, 36
+           READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD, SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+          SIGNAL_LEN: 0
+          SPOT_COUNT: 1
+          SPOT_GROUP: 
+             SPOT_ID: 1
+          TMP_KEY_ID: 0
+          TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/1.4.stdout b/test/fastq-loader/expected/1.4.stdout
new file mode 100755
index 0000000..d8883a4
--- /dev/null
+++ b/test/fastq-loader/expected/1.4.stdout
@@ -0,0 +1,90 @@
+       BASE_COUNT: 216
+   BIO_BASE_COUNT: 216
+   CMP_BASE_COUNT: 216
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 131033233331013023032230132132312301331032212003012030012223002013323212
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 72
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 3
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 34, 36, 40, 40, 40, 40, 40, 40, 5, 40, 8, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 33, 40, 40, 40, 40, 40, 40, 40, 13, 40, 40, 40, 12, 40, 40, 40, 40, 40, 1, 40, 40, 3, 40
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: GCAATAGCGCGTTGCCTAATCTAACGACGATGATTGATGGCTCAGGGCCAGGCCCAGAGCCCTTGCGATCAG
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 36, 36
+         READ_SEG: [0, 36], [36, 36]
+       READ_START: 0, 36
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 3
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 72
+         TRIM_LEN: 72
+       TRIM_START: 0
+
+       BASE_COUNT: 216
+   BIO_BASE_COUNT: 216
+   CMP_BASE_COUNT: 216
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 110003323031230312213200233330230230030231233302133312123321320321233203
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 72
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 3
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 27, 40, 40, 40, 40, 40, 14, 24, 40, 40, 9, 2, 4, 40, 32, 12, 40, 13, 3, 3, 2, 40, 4, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 34, 40, 11, 40, 40, 40, 40, 40, 40, 40, 5
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: GTTTTATCGGCAGCCGTCTGCTTTCGCGCCTAAGCCTAAGCAGCGCCTGCGCAGTCGCTGCTTAGTCGCTTA
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 36, 36
+         READ_SEG: [0, 36], [36, 36]
+       READ_START: 0, 36
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 3
+       SPOT_GROUP: 
+          SPOT_ID: 2
+         SPOT_LEN: 72
+         TRIM_LEN: 72
+       TRIM_START: 0
+
+       BASE_COUNT: 216
+   BIO_BASE_COUNT: 216
+   CMP_BASE_COUNT: 216
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 122312131322312131021100002130102223101233212132311133020101010332200312
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 72
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 3
+      MIN_SPOT_ID: 1
+             NAME: 3
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 24, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 15, 21, 40, 40, 40, 40, 40, 40, 40, 10, 40, 27, 40
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: GAGCAGTACGAGCAGTACCTGTTTTTCATTGGAGATGGTCGCTGACGATGTGCGGAACCAACCGCTCCCGTC
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 36, 36
+         READ_SEG: [0, 36], [36, 36]
+       READ_START: 0, 36
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 3
+       SPOT_GROUP: 
+          SPOT_ID: 3
+         SPOT_LEN: 72
+         TRIM_LEN: 72
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/10.0.stdout b/test/fastq-loader/expected/10.0.stdout
new file mode 100644
index 0000000..5b0db4e
--- /dev/null
+++ b/test/fastq-loader/expected/10.0.stdout
@@ -0,0 +1,30 @@
+       BASE_COUNT: 21
+   BIO_BASE_COUNT: 21
+   CMP_BASE_COUNT: 21
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 202311120113300010103
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 21
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 1
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 65, 65, 93, 68, 68, 68, 68, 68, 70, 70, 70, 66, 70, 72, 72, 71, 71, 66, 68, 70, 70
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: CCTACACTTGTATTTTGGTTA
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 21, 0
+         READ_SEG: [0, 21], [21, 0]
+       READ_START: 0, 21
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 1
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 21
+         TRIM_LEN: 21
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/11.0.stdout b/test/fastq-loader/expected/11.0.stdout
new file mode 100644
index 0000000..2ecc0d6
--- /dev/null
+++ b/test/fastq-loader/expected/11.0.stdout
@@ -0,0 +1,30 @@
+       BASE_COUNT: 152
+   BIO_BASE_COUNT: 152
+   CMP_BASE_COUNT: 152
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 12231033031122330010100000000000000000000000000203301033111000111011021301111301123113320231133000013123101102202202000000000000001300011000033112330033
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 152
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 1
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 3 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: GAGCAATAATGTCTATTTGGTTTTTTTTTTTTTTTTTTTTTTTTTTTCCGCCAATACACCCCACAACAAGTAACACGCCACTACATAGGATGTATTTTTGCAGCAACAAGAAGAAGGGGGGGGGGGGGGGTAAAACAAAAATACAGCGGGCG
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 76, 76
+         READ_SEG: [0, 76], [76, 76]
+       READ_START: 0, 76
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 1
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 152
+         TRIM_LEN: 152
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/11.1.stdout b/test/fastq-loader/expected/11.1.stdout
new file mode 100644
index 0000000..bfaeb2a
--- /dev/null
+++ b/test/fastq-loader/expected/11.1.stdout
@@ -0,0 +1,30 @@
+       BASE_COUNT: 202
+   BIO_BASE_COUNT: 202
+   CMP_BASE_COUNT: 202
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 0300232002130023102002201303012112133111010333330332133032020333303000312301230003311300303300333003003002320021300231020022013030121121331110103333303321330320203333030003123012300033113003033003330030
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 202
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 1
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 34, 34, 34, 37, 37, 37, 37, 37, 39, 39, 38, 39, 38, 41, 41, 41, 41, 41, 41, 41, 40, 40, 41, 41, 38, 41, 41, 40, 41, 38, 40, 39, 39, 40, 41, 37, 33, 39, 38, 40, 40, 41, 38, 37, 36, 31, 33, 39, 40, 40, 36, 34, 36, 39, 40, 40, 38, 40, 38, 40, 39, 39, 40, 40, 41, 40, 40, 40, 41, 38, 36, 36, 34, 39, 39, 37, 31, 36, 38, 39, 38, 35, 39, 38, 36, 39, 37, 36, 36, 39, 39, 37, 37, 37, 35, 37, 37, 37, 36, 36, 31, 34, 34, 34, 37, 37, 37, 37, 37, 39, 39, 38, 39, 38, 41, 41, 41, 41, 4 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: TAAAGCTTTCATTTCGTTCCCTCCATTAACTGTCATACACCAATATATTATCATAATCCTTATATTAAAATGATTGATTTTATGTAAATTATTTATAAATTTAAAGCTTTCATTTCGTTCCCTCCATTAACTGTCATACACCAATATATTATCATAATCCTTATATTAAAATGATTGATTTTATGTAAATTATTTATAAATT
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 101, 101
+         READ_SEG: [0, 101], [101, 101]
+       READ_START: 0, 101
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 1
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 202
+         TRIM_LEN: 202
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/12.0.stdout b/test/fastq-loader/expected/12.0.stdout
new file mode 100644
index 0000000..9ac9d1f
--- /dev/null
+++ b/test/fastq-loader/expected/12.0.stdout
@@ -0,0 +1,60 @@
+       BASE_COUNT: 42
+   BIO_BASE_COUNT: 42
+   CMP_BASE_COUNT: 42
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 202311120113300010103
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 21
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 65, 65, 93, 68, 68, 68, 68, 68, 70, 70, 70, 66, 70, 72, 72, 71, 71, 66, 68, 70, 70
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: CCTACACTTGTATTTTGGTTA
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 21, 0
+         READ_SEG: [0, 21], [21, 0]
+       READ_START: 0, 21
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 21
+         TRIM_LEN: 21
+       TRIM_START: 0
+
+       BASE_COUNT: 42
+   BIO_BASE_COUNT: 42
+   CMP_BASE_COUNT: 42
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 202311120113300010103
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 21
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 65, 65, 93, 68, 68, 68, 68, 68, 70, 70, 70, 66, 70, 72, 72, 71, 71, 66, 68, 70, 70
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: CCTACACTTGTATTTTGGTTA
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 21, 0
+         READ_SEG: [0, 21], [21, 0]
+       READ_START: 0, 21
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 2
+         SPOT_LEN: 21
+         TRIM_LEN: 21
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/12.1.stdout b/test/fastq-loader/expected/12.1.stdout
new file mode 100644
index 0000000..37ace54
--- /dev/null
+++ b/test/fastq-loader/expected/12.1.stdout
@@ -0,0 +1,60 @@
+       BASE_COUNT: 42
+   BIO_BASE_COUNT: 42
+   CMP_BASE_COUNT: 42
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 202311120113300010103
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 21
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 65, 65, 93, 68, 68, 68, 68, 68, 70, 70, 70, 66, 70, 72, 72, 71, 71, 66, 68, 70, 70
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: CCTACACTTGTATTTTGGTTA
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 21, 0
+         READ_SEG: [0, 21], [21, 0]
+       READ_START: 0, 21
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: SG1
+          SPOT_ID: 1
+         SPOT_LEN: 21
+         TRIM_LEN: 21
+       TRIM_START: 0
+
+       BASE_COUNT: 42
+   BIO_BASE_COUNT: 42
+   CMP_BASE_COUNT: 42
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 202311120113300010103
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 21
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 65, 65, 93, 68, 68, 68, 68, 68, 70, 70, 70, 66, 70, 72, 72, 71, 71, 66, 68, 70, 70
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: CCTACACTTGTATTTTGGTTA
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 21, 0
+         READ_SEG: [0, 21], [21, 0]
+       READ_START: 0, 21
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: SG2
+          SPOT_ID: 2
+         SPOT_LEN: 21
+         TRIM_LEN: 21
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/12.2.stdout b/test/fastq-loader/expected/12.2.stdout
new file mode 100644
index 0000000..e3207c8
--- /dev/null
+++ b/test/fastq-loader/expected/12.2.stdout
@@ -0,0 +1,30 @@
+       BASE_COUNT: 42
+   BIO_BASE_COUNT: 42
+   CMP_BASE_COUNT: 42
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 202311120113300010103202311120113300010103
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 42
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 1
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: CCTACACTTGTATTTTGGTTACCTACACTTGTATTTTGGTTA
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 21, 21
+         READ_SEG: [0, 21], [21, 21]
+       READ_START: 0, 21
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 1
+       SPOT_GROUP: ATCACG
+          SPOT_ID: 1
+         SPOT_LEN: 42
+         TRIM_LEN: 42
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/13.0.stdout b/test/fastq-loader/expected/13.0.stdout
new file mode 100644
index 0000000..1f4dc2b
--- /dev/null
+++ b/test/fastq-loader/expected/13.0.stdout
@@ -0,0 +1,90 @@
+       BASE_COUNT: 798
+   BIO_BASE_COUNT: 798
+   CMP_BASE_COUNT: 798
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 02123011032113003322110220022200103231333121221313323333221121030210103010021013001013213022003000313012103130101022120231301120133013301021030022010303311212103020322101303323213222201312030133023222030132201031220213011122033133303021323002311003110321203331102202000203
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 3
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 28, 28, 28, 28, 36, 28, 28, 37, 29, 28, 28, 28, 27, 36, 30, 8, 27, 28, 26, 28, 26, 37, 28, 27, 39, 33, 13, 28, 24, 39, 33, 13, 33, 24, 22, 28, 27, 28, 28, 28, 26, 28, 28, 27, 26, 28, 28, 28, 28, 28, 28, 27, 27, 28, 28, 28, 28, 28, 27, 28, 27, 35, 26, 33, 26, 27, 31, 24, 35, 28, 33, 26, 34, 29, 9, 27, 31, 22, 27, 34, 30, 9, 33, 25, 25, 26, 25, 25, 34, 27, 26, 37, 33, 16, 38, 34, 22, 8, 24, 26, 33, 25, 27, 26, 35, 28, 26, 27, 34, 28, 34, 28, 33, 26, 27, 27, 27, 30, 21, 2 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: TCAGCCACCGACATTTATCTGTTCTTTCTCCCAATCGTATACTGAGTACGCTATATCTGTCAATTCAACCGGTTTCAACGGGTTGCTGCCTCCCGGGGCATTGACCGTAACCAAGACTTCGTAACAGGTATTGCGGTTCAATTTCTTGGCCGCACTGACCGGAATCTGGTAATAGCTGCTCTCCATGAATTGCGGATCTCCGGTAGAACCGTCTTCATTGTGAGGCGTATAATTCATCGGGATGTTTACAATCAGGCGCACCTCCTTTTCCG
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 272
+         READ_SEG: [0, 272]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 3
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 272
+         TRIM_LEN: 272
+       TRIM_START: 0
+
+       BASE_COUNT: 798
+   BIO_BASE_COUNT: 798
+   CMP_BASE_COUNT: 798
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 0212133120302031103223023130302333331100230101211112020102102023030100111020031210320003031033121131131213113211032000132301322100113002211313331220312000132031302330330022331330202022022002211001010221301221321323012311302113311332101033223110202203011220212312
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 3
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 28, 28, 26, 26, 28, 28, 28, 26, 35, 26, 34, 25, 30, 20, 28, 25, 37, 29, 27, 28, 28, 37, 29, 27, 28, 28, 36, 27, 37, 29, 27, 27, 28, 28, 28, 28, 28, 41, 35, 16, 26, 37, 28, 36, 28, 26, 25, 27, 28, 28, 28, 36, 28, 36, 27, 36, 27, 27, 34, 24, 33, 23, 28, 31, 21, 37, 28, 40, 33, 14, 28, 25, 34, 27, 36, 31, 12, 25, 25, 25, 34, 27, 26, 37, 33, 20, 5, 33, 25, 21, 29, 21, 27, 27, 22, 25, 27, 28, 27, 28, 28, 28, 27, 27, 26, 26, 28, 28, 27, 27, 26, 34, 28, 28, 37, 34, 20, 6, 23, [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: TCAGTATGAATTCCGTGGCTCGGATGCCGGATATATGTTTCGGTTGACACAGGAACCTGGAAGCCGGTTTGTGGAAATGACCGAAAATTACCGCAGTGCACGTCATGTAGTGGCTTTTGCTAACGAGTTTGTAAAGACATGCGCAGAATGAAAACGAATGCCTATTATTTCTATGCGGAAGGAGGAGGGAGTGGGTTGGAGTAACTCATCATCGGTCGTGCCTGTATGTATCAACCGCTCGTGGAAGAATTGTCTTCAGCAG
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 262
+         READ_SEG: [0, 262]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 3
+       SPOT_GROUP: 
+          SPOT_ID: 2
+         SPOT_LEN: 262
+         TRIM_LEN: 262
+       TRIM_START: 0
+
+       BASE_COUNT: 798
+   BIO_BASE_COUNT: 798
+   CMP_BASE_COUNT: 798
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 021223230310323132313220212100222021223323122220130103132133332013121323122301300232301313201211100211212211223032322123003120303302023102030103111320011332210331020023130202021223113011030132013220123232330313100113321033223312011032123131023010313100003120312200
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 3
+      MIN_SPOT_ID: 1
+             NAME: 3
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 28, 28, 27, 28, 28, 26, 27, 37, 29, 28, 35, 26, 28, 26, 28, 20, 28, 28, 24, 27, 27, 27, 37, 29, 27, 28, 28, 41, 35, 16, 28, 28, 37, 28, 28, 28, 28, 28, 26, 27, 27, 27, 28, 28, 28, 28, 37, 29, 27, 37, 28, 37, 28, 27, 28, 28, 28, 28, 28, 27, 28, 28, 34, 27, 27, 27, 27, 27, 27, 26, 26, 27, 27, 26, 27, 34, 27, 26, 37, 33, 17, 27, 25, 27, 34, 27, 23, 27, 27, 27, 34, 27, 27, 26, 25, 28, 37, 33, 16, 27, 27, 27, 25, 27, 27, 27, 28, 26, 28, 27, 35, 28, 27, 28, 27, 27, 26, 28, 2 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: TCAGATCGGCAATCGTAGCATCTTCAGTTTCTCCTGAGCGATGAGAGGTAACCGTAGTATATCCATGACGATGAGCCATTTCGATTGCATCCAGTGTTTCACTGAGTGAGCCGATCTGATTTACTTAATAAGGATGGAATTGGCACATCCCACGCTCAATACCTTTCGTAAGGAAGTCTACATTGTTAACGAACGAGGTCGATCGCCGTACCCACGCTGGCGAGCGTCCACCGACTACGTTCGGTTACGTTTTTACTTACTCCC
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 264
+         READ_SEG: [0, 264]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 3
+       SPOT_GROUP: 
+          SPOT_ID: 3
+         SPOT_LEN: 264
+         TRIM_LEN: 264
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/13.1.stdout b/test/fastq-loader/expected/13.1.stdout
new file mode 100644
index 0000000..fda3e5c
--- /dev/null
+++ b/test/fastq-loader/expected/13.1.stdout
@@ -0,0 +1,90 @@
+       BASE_COUNT: 605
+   BIO_BASE_COUNT: 605
+   CMP_BASE_COUNT: 605
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 021210023002012331130011033133230233111022331010003110311021202310200113011320222330110103222021332332130211230321222111331011200023320310203112311200023320.
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 3
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 28, 27, 25, 22, 37, 30, 8, 24, 37, 30, 8, 29, 18, 27, 28, 27, 28, 28, 28, 37, 30, 9, 27, 35, 25, 27, 27, 27, 28, 27, 25, 37, 29, 28, 27, 28, 28, 25, 35, 26, 28, 28, 26, 28, 35, 26, 43, 36, 23, 11, 19, 24, 36, 27, 28, 28, 36, 28, 28, 26, 36, 28, 28, 28, 36, 27, 37, 31, 10, 28, 28, 36, 27, 28, 28, 27, 35, 28, 27, 23, 27, 28, 34, 26, 26, 32, 24, 31, 22, 26, 27, 24, 29, 21, 27, 27, 28, 28, 28, 27, 28, 27, 27, 32, 25, 23, 27, 25, 26, 34, 27, 27, 28, 27, 26, 27, 27, 27, 24,  [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: TCAGTTTCGGGAACTATGTAAACAATACGCTAAGCGTGTTCTATGGTTTTACAATGTTCAGGATGGAAACATTGTAGGAGATAACAACCGAGAAGTATCGCTGCCTGTCGGCTGAGACACGCAACAGGGGATAGGCAAGGCACTACAGGGGATAGGN
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 157
+         READ_SEG: [0, 157]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 3
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 157
+         TRIM_LEN: 157
+       TRIM_START: 0
+
+       BASE_COUNT: 605
+   BIO_BASE_COUNT: 605
+   CMP_BASE_COUNT: 605
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 0212323113012102000312333011322331202002303323200230312320022301013000022123103113311011103312010311102202032031113210221021002200300012000033000001020130200232210123131000123113210202302102001012123321013310300302131332122130023313123321320021112313200221112022201330102030312122
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 3
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 27, 28, 19, 24, 28, 25, 28, 27, 28, 35, 26, 28, 28, 37, 28, 41, 34, 19, 4, 24, 28, 28, 28, 28, 36, 27, 28, 28, 27, 24, 28, 28, 28, 26, 36, 28, 39, 33, 13, 27, 35, 26, 28, 28, 28, 28, 36, 29, 7, 27, 35, 25, 27, 28, 27, 28, 37, 30, 9, 28, 27, 35, 26, 36, 27, 28, 44, 36, 24, 13, 3, 28, 27, 27, 26, 24, 33, 26, 25, 27, 27, 26, 26, 27, 31, 24, 26, 25, 31, 24, 28, 23, 28, 29, 20, 34, 28, 27, 25, 23, 34, 27, 28, 29, 21, 31, 23, 28, 28, 20, 27, 27, 27, 27, 28, 27, 35, 28, 27, 2 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: TCAGCTACATTGACCTTTTACTATAACATCTATGAAGGGATTATCGAAAGCCGTCGAAAGATTGGTAAAAAGACTACCGTGCGTGGTGTTATGAACCGTGTTCTTCCGAATGTGCTGGAGTTCAAAGAAATTTTGAAAAATAAAAAACCTTGCCTTTCGAGTTGATGCAAAACTACATCAAGGATTCAAGGGTTGACTATCAACGCAATTTAAGTACGCTGAGTAAAGCGTACTATCATCCCTGTGATGCTTTCTGTGAAGAGGTATTGGAATTACTGAG
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 280
+         READ_SEG: [0, 280]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 3
+       SPOT_GROUP: 
+          SPOT_ID: 2
+         SPOT_LEN: 280
+         TRIM_LEN: 280
+       TRIM_START: 0
+
+       BASE_COUNT: 605
+   BIO_BASE_COUNT: 605
+   CMP_BASE_COUNT: 605
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 02120000213300010201113302312032021013211123101211131013113313011230110302210130301112310031321011330113021333300113020302202122211133101120002332031020311111200023320.
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 3
+      MIN_SPOT_ID: 1
+             NAME: 3
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 28, 28, 27, 43, 36, 23, 12, 1, 28, 27, 24, 40, 34, 18, 1, 33, 23, 32, 22, 26, 28, 28, 28, 36, 27, 28, 28, 28, 36, 27, 27, 27, 16, 26, 29, 18, 26, 27, 27, 28, 28, 28, 28, 28, 36, 28, 28, 28, 28, 28, 28, 28, 36, 28, 28, 28, 28, 28, 28, 28, 28, 36, 27, 28, 28, 28, 35, 25, 28, 33, 26, 34, 27, 28, 28, 34, 27, 28, 34, 27, 34, 27, 27, 28, 28, 28, 27, 35, 30, 10, 27, 27, 28, 27, 33, 25, 27, 28, 27, 33, 25, 27, 28, 33, 26, 28, 27, 28, 27, 28, 35, 30, 11, 28, 27, 34, 26, 32, 25, [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: TCAGGGGGACGCCCCAAGGTGTATTCGTCCGAAGTTGCTGTGATGGTCACATGGTACATACGGTGATTGTTAAGACCATTAACACTACCCGTAGTTGTATTGTAAGTATATTTGTAAGGCCTCCTGAGACACGCAACAGGGGATAGGCAAGGCACACAGGGGATAGGN
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 168
+         READ_SEG: [0, 168]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 3
+       SPOT_GROUP: 
+          SPOT_ID: 3
+         SPOT_LEN: 168
+         TRIM_LEN: 168
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/14.0.stdout b/test/fastq-loader/expected/14.0.stdout
new file mode 100755
index 0000000..822f5e1
--- /dev/null
+++ b/test/fastq-loader/expected/14.0.stdout
@@ -0,0 +1,30 @@
+       BASE_COUNT: 76
+   BIO_BASE_COUNT: 76
+   CMP_BASE_COUNT: 76
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 1223103303112233001010000000000000000000000000020330103311100011101102130111
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 76
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 1
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: GAGCAATAATGTCTATTTGGTTTTTTTTTTTTTTTTTTTTTTTTTTTCCGCCAATACACCCCACAACAAGTAACAC
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 76, 0
+         READ_SEG: [0, 76], [76, 0]
+       READ_START: 0, 76
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 1
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 76
+         TRIM_LEN: 76
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/2.1.1.stdout b/test/fastq-loader/expected/2.1.1.stdout
new file mode 100644
index 0000000..a79501e
--- /dev/null
+++ b/test/fastq-loader/expected/2.1.1.stdout
@@ -0,0 +1,44 @@
+       BASE_COUNT: 12
+   BIO_BASE_COUNT: 12
+   CMP_BASE_COUNT: 12
+       CMP_CSREAD: 123123
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CS_KEY: TT
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 0, 0, 0, 0, 0, 0
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 6, 0
+       READ_START: 0, 6
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 1
+       TRIM_START: 0
+
+       BASE_COUNT: 12
+   BIO_BASE_COUNT: 12
+   CMP_BASE_COUNT: 12
+       CMP_CSREAD: 123123
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CS_KEY: GT
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 0, 0, 0, 0, 0, 0
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 6, 0
+       READ_START: 0, 6
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 2
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/2.1.stdout b/test/fastq-loader/expected/2.1.stdout
new file mode 100644
index 0000000..1d2f84a
--- /dev/null
+++ b/test/fastq-loader/expected/2.1.stdout
@@ -0,0 +1,60 @@
+       BASE_COUNT: 148
+   BIO_BASE_COUNT: 148
+   CMP_BASE_COUNT: 148
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 01020330101302022131302322022022032222311023120230220132002100031300203330
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 74
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: TGGAATAACCATTCCTCATGCCTAGAAGAAGAATCTCTACAAGCAGGATTCTTGCTTTCAAAATGCCCTTATAA
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 74, 0
+         READ_SEG: [0, 74], [74, 0]
+       READ_START: 0, 74
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 74
+         TRIM_LEN: 74
+       TRIM_START: 0
+
+       BASE_COUNT: 148
+   BIO_BASE_COUNT: 148
+   CMP_BASE_COUNT: 148
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 00131012333231011230202133203233112022003112203010033321302212200030111213
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 74
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: TTGCAACTATAGCAACAGCCTTCATAGGCTATGTCCTCCCGTGAGGCCAAATATCATTCTGAGGGGCCACAGTA
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 74, 0
+         READ_SEG: [0, 74], [74, 0]
+       READ_START: 0, 74
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 2
+         SPOT_LEN: 74
+         TRIM_LEN: 74
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/2.5.stdout b/test/fastq-loader/expected/2.5.stdout
new file mode 100644
index 0000000..908eb8a
--- /dev/null
+++ b/test/fastq-loader/expected/2.5.stdout
@@ -0,0 +1,60 @@
+       BASE_COUNT: 66
+   BIO_BASE_COUNT: 66
+   CMP_BASE_COUNT: 66
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 301212321010213302323201331023331
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 33
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: AACTGATCAACCTGCGGATCGAACGCAAGCGCA
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 33
+         READ_SEG: [0, 33]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 33
+         TRIM_LEN: 33
+       TRIM_START: 0
+
+       BASE_COUNT: 66
+   BIO_BASE_COUNT: 66
+   CMP_BASE_COUNT: 66
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 311203221313213231002230003322030
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 33
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: ACAGGCTCATGCTGCTACCCTCGGGGCGAGGCC
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 33
+         READ_SEG: [0, 33]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 2
+         SPOT_LEN: 33
+         TRIM_LEN: 33
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/2.6.stdout b/test/fastq-loader/expected/2.6.stdout
new file mode 100644
index 0000000..44db5d1
--- /dev/null
+++ b/test/fastq-loader/expected/2.6.stdout
@@ -0,0 +1,30 @@
+       BASE_COUNT: 66
+   BIO_BASE_COUNT: 66
+   CMP_BASE_COUNT: 66
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 301212321010213302323201331023331311203221313213231002230003322030
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 66
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 1
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: AACTGATCAACCTGCGGATCGAACGCAAGCGCAACAGGCTCATGCTGCTACCCTCGGGGCGAGGCC
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 33, 33
+         READ_SEG: [0, 33], [33, 33]
+       READ_START: 0, 33
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 1
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 66
+         TRIM_LEN: 66
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/2.7.stdout b/test/fastq-loader/expected/2.7.stdout
new file mode 100644
index 0000000..d91d929
--- /dev/null
+++ b/test/fastq-loader/expected/2.7.stdout
@@ -0,0 +1,30 @@
+       BASE_COUNT: 33
+   BIO_BASE_COUNT: 33
+   CMP_BASE_COUNT: 33
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 301212321010213302323201331023331
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 33
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 1
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: AACTGATCAACCTGCGGATCGAACGCAAGCGCA
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 33
+         READ_SEG: [0, 33]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 1
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 33
+         TRIM_LEN: 33
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/2.8.1.stdout b/test/fastq-loader/expected/2.8.1.stdout
new file mode 100644
index 0000000..b35248d
--- /dev/null
+++ b/test/fastq-loader/expected/2.8.1.stdout
@@ -0,0 +1,60 @@
+       BASE_COUNT: 6
+   BIO_BASE_COUNT: 6
+   CMP_BASE_COUNT: 6
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: ..3
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 3
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 30, 30, 30
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: NTA
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 3
+         READ_SEG: [0, 3]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 3
+         TRIM_LEN: 3
+       TRIM_START: 0
+
+       BASE_COUNT: 6
+   BIO_BASE_COUNT: 6
+   CMP_BASE_COUNT: 6
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: ...
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 3
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 30, 30, 30
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: NNT
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 3
+         READ_SEG: [0, 3]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 2
+         SPOT_LEN: 3
+         TRIM_LEN: 3
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/2.8.stdout b/test/fastq-loader/expected/2.8.stdout
new file mode 100644
index 0000000..51253cd
--- /dev/null
+++ b/test/fastq-loader/expected/2.8.stdout
@@ -0,0 +1,60 @@
+       BASE_COUNT: 6
+   BIO_BASE_COUNT: 6
+   CMP_BASE_COUNT: 6
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: ..3
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 3
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 30, 30, 30
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: NTA
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 3
+         READ_SEG: [0, 3]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 3
+         TRIM_LEN: 3
+       TRIM_START: 0
+
+       BASE_COUNT: 6
+   BIO_BASE_COUNT: 6
+   CMP_BASE_COUNT: 6
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: ..3
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 3
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 30, 30, 30
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: NTA
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 3
+         READ_SEG: [0, 3]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 2
+         SPOT_LEN: 3
+         TRIM_LEN: 3
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/2.9.1.stderr b/test/fastq-loader/expected/2.9.1.stderr
new file mode 100644
index 0000000..dea1795
--- /dev/null
+++ b/test/fastq-loader/expected/2.9.1.stderr
@@ -0,0 +1,5 @@
+latf-load err: data inconsistent while reading document within alignment module - Spot 'BILLIEHOLIDAY': length of original quality does not match sequence
+latf-load err: data inconsistent while reading document within alignment module - ArchiveFile: SequenceGetQuality failed
+latf-load warn: The file contained no records that were processed.
+latf-load err: data empty while reading file within alignment module - accession="obj" errors="1" status="failure"
+latf-load err: data empty while reading file within alignment module - load failed
diff --git a/test/fastq-loader/expected/2.9.stderr b/test/fastq-loader/expected/2.9.stderr
new file mode 100644
index 0000000..dea1795
--- /dev/null
+++ b/test/fastq-loader/expected/2.9.stderr
@@ -0,0 +1,5 @@
+latf-load err: data inconsistent while reading document within alignment module - Spot 'BILLIEHOLIDAY': length of original quality does not match sequence
+latf-load err: data inconsistent while reading document within alignment module - ArchiveFile: SequenceGetQuality failed
+latf-load warn: The file contained no records that were processed.
+latf-load err: data empty while reading file within alignment module - accession="obj" errors="1" status="failure"
+latf-load err: data empty while reading file within alignment module - load failed
diff --git a/test/fastq-loader/expected/3.1.stdout b/test/fastq-loader/expected/3.1.stdout
new file mode 100644
index 0000000..fb87b02
--- /dev/null
+++ b/test/fastq-loader/expected/3.1.stdout
@@ -0,0 +1,120 @@
+       BASE_COUNT: 144
+   BIO_BASE_COUNT: 144
+   CMP_BASE_COUNT: 144
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 112332022230202..1120022110..03..0..
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 36
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 4
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: GTCGCTTCTCGGAAGNGTGAAAGACAANAATNTTNN
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 36
+         READ_SEG: [0, 36]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 4
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 36
+         TRIM_LEN: 36
+       TRIM_START: 0
+
+       BASE_COUNT: 144
+   BIO_BASE_COUNT: 144
+   CMP_BASE_COUNT: 144
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 122311322021001....32101321......2..
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 36
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 4
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: GAGCACGAGGACCCANNNATCAACGACNANNNGANN
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 36
+         READ_SEG: [0, 36]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 4
+       SPOT_GROUP: 
+          SPOT_ID: 2
+         SPOT_LEN: 36
+         TRIM_LEN: 36
+       TRIM_START: 0
+
+       BASE_COUNT: 144
+   BIO_BASE_COUNT: 144
+   CMP_BASE_COUNT: 144
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 312102231132..2..00....12...........
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 36
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 4
+      MIN_SPOT_ID: 1
+             NAME: 3
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: ACTGGAGCACGANAGNCCCNCNACTNANANCNGNNN
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 36
+         READ_SEG: [0, 36]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 4
+       SPOT_GROUP: 
+          SPOT_ID: 3
+         SPOT_LEN: 36
+         TRIM_LEN: 36
+       TRIM_START: 0
+
+       BASE_COUNT: 144
+   BIO_BASE_COUNT: 144
+   CMP_BASE_COUNT: 144
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 221022311322201....30030211......3..
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 36
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 4
+      MIN_SPOT_ID: 1
+             NAME: 4
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: CTGGAGCACGAGAACNCNGCCCGGACANANGNGCNN
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 36
+         READ_SEG: [0, 36]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 4
+       SPOT_GROUP: 
+          SPOT_ID: 4
+         SPOT_LEN: 36
+         TRIM_LEN: 36
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/4.2.stdout b/test/fastq-loader/expected/4.2.stdout
new file mode 100644
index 0000000..b4814b9
--- /dev/null
+++ b/test/fastq-loader/expected/4.2.stdout
@@ -0,0 +1,30 @@
+       BASE_COUNT: 36
+   BIO_BASE_COUNT: 36
+   CMP_BASE_COUNT: 36
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 112332022230202..1120022110..03..0..
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 36
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 1
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 1, 10, 20, 20, 20, 10, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 10, 10, 20, 10, 20, 20, 10, 20, 20, 20
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: GTCGCTTCTCGGAAGNGTGAAAGACAANAATNTTNN
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 36, 0
+         READ_SEG: [0, 36], [36, 0]
+       READ_START: 0, 36
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 1
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 36
+         TRIM_LEN: 36
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/4.3.1.stderr b/test/fastq-loader/expected/4.3.1.stderr
new file mode 100644
index 0000000..1268b1a
--- /dev/null
+++ b/test/fastq-loader/expected/4.3.1.stderr
@@ -0,0 +1,14 @@
+Usage:
+	latf-load [options] <fastq-file> ...
+
+Summary:
+	Load FASTQ formatted data files
+
+Example:
+	latf-load -p 454 -o SRZ123456 123456-1.fastq 123456-2.fastq
+
+
+Use option --help for more information.
+
+latf-load err: param incorrect while accessing argument list within application support module - accession="obj" errors="0" status="failure"
+latf-load err: param incorrect while accessing argument list within application support module - load failed
diff --git a/test/fastq-loader/expected/4.4.stdout b/test/fastq-loader/expected/4.4.stdout
new file mode 100644
index 0000000..94fbeb5
--- /dev/null
+++ b/test/fastq-loader/expected/4.4.stdout
@@ -0,0 +1,66 @@
+       BASE_COUNT: 105
+   BIO_BASE_COUNT: 105
+   CMP_BASE_COUNT: 105
+       CMP_CSREAD: 12312312312312312312312312312312312
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CS_KEY: GT
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 3
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 35, 0
+       READ_START: 0, 35
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SPOT_COUNT: 3
+       SPOT_GROUP: 
+          SPOT_ID: 1
+       TRIM_START: 0
+
+       BASE_COUNT: 105
+   BIO_BASE_COUNT: 105
+   CMP_BASE_COUNT: 105
+       CMP_CSREAD: 12312312312312312312312312312312312
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CS_KEY: GT
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 3
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 35, 0
+       READ_START: 0, 35
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SPOT_COUNT: 3
+       SPOT_GROUP: 
+          SPOT_ID: 2
+       TRIM_START: 0
+
+       BASE_COUNT: 105
+   BIO_BASE_COUNT: 105
+   CMP_BASE_COUNT: 105
+       CMP_CSREAD: 12312312312312312312312312312312312
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CS_KEY: GT
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 3
+      MIN_SPOT_ID: 1
+             NAME: 3
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 35, 0
+       READ_START: 0, 35
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SPOT_COUNT: 3
+       SPOT_GROUP: 
+          SPOT_ID: 3
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/4.5.1.stderr b/test/fastq-loader/expected/4.5.1.stderr
new file mode 100644
index 0000000..0cb8caf
--- /dev/null
+++ b/test/fastq-loader/expected/4.5.1.stderr
@@ -0,0 +1,8 @@
+latf-load warn: file="4.5.1.fastq"
+latf-load warn:syntax error, unexpected fqASCQUAL, expecting fqBASESEQ or fqCOLORSEQ
+latf-load warn: file="4.5.1.fastq"
+latf-load warn:syntax error, unexpected fqASCQUAL, expecting fqBASESEQ or fqCOLORSEQ
+latf-load err: data invalid while closing table - Too many bad records: records: 5, bad records: 2, bad records percentage: 0.40, allowed percentage: 0.20
+latf-load warn: path not found while removing directory within database module - table CS_SEQUENCE failed to drop temporary column 'TMP_KEY_ID'
+latf-load err: data invalid while closing table - accession="obj" errors="2" status="failure"
+latf-load err: data invalid while closing table - load failed
diff --git a/test/fastq-loader/expected/4.5.stderr b/test/fastq-loader/expected/4.5.stderr
new file mode 100644
index 0000000..99a8e64
--- /dev/null
+++ b/test/fastq-loader/expected/4.5.stderr
@@ -0,0 +1,9 @@
+latf-load warn: file="4.5.fastq"
+latf-load warn:syntax error, unexpected fqASCQUAL, expecting fqBASESEQ or fqCOLORSEQ
+latf-load warn: file="4.5.fastq"
+latf-load warn:syntax error, unexpected fqASCQUAL, expecting fqBASESEQ or fqCOLORSEQ
+latf-load warn: file="4.5.fastq"
+latf-load warn:syntax error, unexpected fqASCQUAL, expecting fqBASESEQ or fqCOLORSEQ
+latf-load err: error excessive while reading file within alignment module - Number of errors 3 exceeds limit of 2: Exiting
+latf-load err: error excessive while reading file within alignment module - accession="obj" errors="3" status="failure"
+latf-load err: error excessive while reading file within alignment module - load failed
diff --git a/test/fastq-loader/expected/4.6.1.stderr b/test/fastq-loader/expected/4.6.1.stderr
new file mode 100644
index 0000000..1f17349
--- /dev/null
+++ b/test/fastq-loader/expected/4.6.1.stderr
@@ -0,0 +1,3 @@
+latf-load err: param incorrect while accessing argument list within application support module - Invalid platform SOMETHINGELSE
+latf-load err: param incorrect while accessing argument list within application support module - accession="obj" errors="0" status="failure"
+latf-load err: param incorrect while accessing argument list within application support module - load failed
diff --git a/test/fastq-loader/expected/4.6.stdout b/test/fastq-loader/expected/4.6.stdout
new file mode 100644
index 0000000..e23aa0e
--- /dev/null
+++ b/test/fastq-loader/expected/4.6.stdout
@@ -0,0 +1,30 @@
+       BASE_COUNT: 36
+   BIO_BASE_COUNT: 36
+   CMP_BASE_COUNT: 36
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 112332022230202..1120022110..03..0..
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 36
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 1
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_454
+          QUALITY: 5, 13, 27, 22, 22, 19, 22, 23, 23, 23, 24, 24, 24, 23, 22, 22, 21, 22, 22, 21, 25, 24, 24, 22, 24, 22, 19, 18, 20, 19, 22, 22, 19, 22, 22, 24
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: GTCGCTTCTCGGAAGNGTGAAAGACAANAATNTTNN
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 36, 0
+         READ_SEG: [0, 36], [36, 0]
+       READ_START: 0, 36
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 1
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 36
+         TRIM_LEN: 36
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/4.7.stderr b/test/fastq-loader/expected/4.7.stderr
new file mode 100644
index 0000000..e89fee5
--- /dev/null
+++ b/test/fastq-loader/expected/4.7.stderr
@@ -0,0 +1,2 @@
+latf-load err: path not found while accessing directory within file system module - accession="obj" errors="0" status="failure"
+latf-load err: path not found while accessing directory within file system module - load failed
diff --git a/test/fastq-loader/expected/5.0.stdout b/test/fastq-loader/expected/5.0.stdout
new file mode 100644
index 0000000..f4f8914
--- /dev/null
+++ b/test/fastq-loader/expected/5.0.stdout
@@ -0,0 +1,30 @@
+       BASE_COUNT: 36
+   BIO_BASE_COUNT: 36
+   CMP_BASE_COUNT: 36
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 112332022230202..1120022110..03..0..
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 36
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 1
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 5, 13, 27, 22, 22, 19, 22, 23, 23, 23, 24, 24, 24, 23, 22, 22, 21, 22, 22, 21, 25, 24, 24, 22, 24, 22, 19, 18, 20, 19, 22, 22, 19, 22, 22, 24
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: GTCGCTTCTCGGAAGNGTGAAAGACAANAATNTTNN
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 36, 0
+         READ_SEG: [0, 36], [36, 0]
+       READ_START: 0, 36
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 1
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 36
+         TRIM_LEN: 36
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/6.0.stdout b/test/fastq-loader/expected/6.0.stdout
new file mode 100644
index 0000000..f2a589b
--- /dev/null
+++ b/test/fastq-loader/expected/6.0.stdout
@@ -0,0 +1,390 @@
+       BASE_COUNT: 1992
+   BIO_BASE_COUNT: 1992
+   CMP_BASE_COUNT: 1992
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 33333113001122113112313102030222133122230321033330003303123012303302102200033003011212211003120000330322030230111230023000331031322331013122211000001112132020113221212022310122001303300031130003321103303120130022220212122000003122200012300330033000311110001103033003330301230033021210033003
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 13
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 23, 24, 25, 39, 39, 32, 25, 14, 16, 16, 24, 17, 35, 34, 39, 39, 40, 40, 36, 40, 40, 40, 40, 38, 38, 38, 38, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 32, 24, 20, 20, 20, 18, 32, 23, 27, 36, 39, 39, 38, 40, 40, 40, 40, 38, 36, 36, 32, 39, 35, 26, 22, 16, 16, 16, 16, 26, 14, 14, 14, 32, 32, 35, 33, 38, 40, 40, 40, 40, 36, 35, 35, 34, 34, 25, 25, 25, 25, 25, 40, 22, 22, 35, 40, 39, 39, 40, 40, 40, 35, 35, 35, 38, 40, 35, 20, 20, 21, 28, 2 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: ATATACATTTGTCTGTACAGCATGGAATTCTCATACTCTAATCAATATAAAATAATGATTGATTATTCAAGAAAATAAATTGTCAGACAAATGAAAAATAATCTTAAGCCACAGCCCTAAAATACCGTAGATACCATGAGACAAAAAACACTGCTTCCACGAGTCAGGAGCAACTCCCATTATTTTACATTTTATCACCGCCGTCCATTTCTCTTCAGTCTTTTTTACTCTTTTGATTTATTTATTTTACACAAAACAATTATTTATAATTGATTTATTCAGTTTATTTA
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 290
+         READ_SEG: [0, 290]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 13
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 290
+         TRIM_LEN: 290
+       TRIM_START: 0
+
+       BASE_COUNT: 1992
+   BIO_BASE_COUNT: 1992
+   CMP_BASE_COUNT: 1992
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 0120230102202301112310113213110012202220220222322023022130220320202112303211020022210222022022021121310130201332031103210011302222010211021210231301020303202212303210211330322111311122200220131133120121202301320220120112212332211222121001
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 13
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 37, 37, 36, 36, 36, 37, 37, 37, 37, 37, 37, 40, 40, 40, 40, 40, 40, 40, 39, 37, 26, 26, 26, 39, 39, 39, 39, 39, 39, 31, 31, 31, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 35, 37, 35, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 35, 35, 30, 25, 25, 24, 24, 33, 20, 21, 21, 25, 28, 32, 33, 35, 35, 35, 35, 35, 35, 30, 30, 30, 35, 35, 32, 28, 28, 25, 25, 25, 25, 25, 24, 27, 28, 28, 29, 29, 28, 30, 27, 1 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: TGAAGCCAAGAAGCCACAGCAACATCATGTTTGAGGAGAAGAAGAGCTCCTAAGACGGAGGCTTCCTGTCGGCTGTTCCCTCTGGAGAAGAAGAAGTGACGTTGCCTTGCGAATGTTAGTTTGTAAGAGAACCTGTTCAGTTCGTAACCTTAATCCTCAGCCGACCTGTATTAGACACGTGTCTCCCTCCATGTATGAACTGAAGCCATCCTCCAGGTGAGTCGCTCACTCTGACCCA
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 238
+         READ_SEG: [0, 238]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 13
+       SPOT_GROUP: 
+          SPOT_ID: 2
+         SPOT_LEN: 238
+         TRIM_LEN: 238
+       TRIM_START: 0
+
+       BASE_COUNT: 1992
+   BIO_BASE_COUNT: 1992
+   CMP_BASE_COUNT: 1992
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: .
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 13
+      MIN_SPOT_ID: 1
+             NAME: 3
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 0
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: N
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 1
+         READ_SEG: [0, 1]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 13
+       SPOT_GROUP: 
+          SPOT_ID: 3
+         SPOT_LEN: 1
+         TRIM_LEN: 1
+       TRIM_START: 0
+
+       BASE_COUNT: 1992
+   BIO_BASE_COUNT: 1992
+   CMP_BASE_COUNT: 1992
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 3233002222000311131011112200120012023120111002313221303322200232101021320113203131113033111022010111033201333100123131330333103123103222323120100123231
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 13
+      MIN_SPOT_ID: 1
+             NAME: 4
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 39, 40, 40, 28, 28, 28, 36, 33, 39, 29, 29, 29, 29, 36, 36, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 39, 39, 40, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 36, 33, 33, 32, 35, 38, 38, 38, 27, 27, 29, 32, 32, 32, 32, 32, 35, 35, 36, 36, 39, 39, 39, 39, 40, 40, 40, 36, 35, 37, 37, 40, 40, 40, 36, 36, 3 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: AGCGGGAGAGGGGCACATGGTGTGAGGGTCCCAGGATGAACACCCTACGAGTAATAGAGGGATCAACCTGCTTGTAGGCATGTGCCGCACAAGAACCACAATAGGTATACCCAGCATGCGGCGCAATGATGGCTCTAGCAGGTTTGATCGT
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 151
+         READ_SEG: [0, 151]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 13
+       SPOT_GROUP: 
+          SPOT_ID: 4
+         SPOT_LEN: 151
+         TRIM_LEN: 151
+       TRIM_START: 0
+
+       BASE_COUNT: 1992
+   BIO_BASE_COUNT: 1992
+   CMP_BASE_COUNT: 1992
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 20223123320211200021310032023022113211020213231200100101020333313100120232001001121212120333033312111130201212320110020211321111111011101012102302211312210301021213112121103330001222301133102212210100011002111030120223123001130013200000..0000213
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 13
+      MIN_SPOT_ID: 1
+             NAME: 5
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 26, 26, 26, 26, 40, 40, 40, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 39, 39, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 35, 26, 26, 26, 39, 40, 40, 40, 40, 39, 39, 39, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 26, 26, 26, 26, 40, 40, 40, 40, 40, 40, 40, 40, 39, 39, 39, 40, 4 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: CCTCGTCGCTTCACTTTTCATGGGCTTCGGAGTGCTGTTCCTGCTACTTTGGGTTGGAATATACGTTTGAAGCTTTGGGTGACTGACTTATAATATGACACATTCCAGTCGAACAAAGGACATCACACACAACACCAACTGGATTCTGTACTCAATTGGACTGCACTGACAATATTTTGAGATTGTATGGAGTCTGGTTTTGTTTCACAATTGAAGATGATTTGTAAACGAAAAAANAAAAAGTA
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 245
+         READ_SEG: [0, 245]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 13
+       SPOT_GROUP: 
+          SPOT_ID: 5
+         SPOT_LEN: 245
+         TRIM_LEN: 245
+       TRIM_START: 0
+
+       BASE_COUNT: 1992
+   BIO_BASE_COUNT: 1992
+   CMP_BASE_COUNT: 1992
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: .
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 13
+      MIN_SPOT_ID: 1
+             NAME: 6
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 0
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: N
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 1
+         READ_SEG: [0, 1]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 13
+       SPOT_GROUP: 
+          SPOT_ID: 6
+         SPOT_LEN: 1
+         TRIM_LEN: 1
+       TRIM_START: 0
+
+       BASE_COUNT: 1992
+   BIO_BASE_COUNT: 1992
+   CMP_BASE_COUNT: 1992
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 223200321003103331210230003113330102230133303001022311100130130130131100321130133000012310133313120110010203102331310332111310031021031232200102023210011110102223120033232133321130013221231231102322000101220220002200102131111102333001221113300123201102323233323230223032203330223213323101
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 13
+      MIN_SPOT_ID: 1
+             NAME: 7
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 40, 40, 40, 39, 39, 39, 40, 40, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 34, 34, 34, 34, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 39, 21, 21, 21, 21, 21, 35, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 38, 38, 38, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 4 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: CTAGGGCTGGGCAATATGACCTAAAATGTATAACCTCGGTATAATTTGGAGCACAAACGGTAACGGTACAAATCACGGTATTTTTGATGGTATACGTCCACCCAAGGCAAGCGTACCGCTGTGCAAATGGACCGTCGAGGGTTCCTAGTTTGTGTTGGAGATGAAATAGCTGCGCTGTAAACGAGTCGTCGTGGATCTTTTGGTCTTCTTTTCTTTGGACGTGTGTTCGCGGGTCTGTGCGGGTCGAACAAGCTAGCGCTAGCCTCGGCTCCGCGGAGCTGCGATGGT
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 288
+         READ_SEG: [0, 288]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 13
+       SPOT_GROUP: 
+          SPOT_ID: 7
+         SPOT_LEN: 288
+         TRIM_LEN: 288
+       TRIM_START: 0
+
+       BASE_COUNT: 1992
+   BIO_BASE_COUNT: 1992
+   CMP_BASE_COUNT: 1992
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 312332130330013213131311103130100220330003132112211210312031220331223032033112121022101200020112122023001312220111111111111111111111111111232
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 13
+      MIN_SPOT_ID: 1
+             NAME: 8
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 39, 39, 40, 40, 40, 40, 40, 40, 40, 39, 39, 38, 37, 35, 35, 35, 35, 32, 32, 21, 21, 18, 25, 24, 32, 33, 24, 25, 25, 26, 35, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 34, 35, 35, 37, 37, 37, 37, 35, 35, 35, 37, 37, 37, 37, 37, 37, 37, 35, 33, 32, 32, 32, 32, 32, 27, 23, 16, 16, 16, 16, 19, 19, 32, 32, 32, 30, 32, 32, 33, 37, 37, 37, 35, 35, 35, 35, 35, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 3 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: ACTATCATTATTTGCTGCATGCACAATGCCAAAGAATAAAATGCTGTCTGTCAATGAATGAGGCGTCTAATCCGCACTGACCTCAACTTTTCCACTGAGGATTTGCAGAGGTGTGTGTGTGTGTGTGTGTGTGTGTGTCGA
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 141
+         READ_SEG: [0, 141]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 13
+       SPOT_GROUP: 
+          SPOT_ID: 8
+         SPOT_LEN: 141
+         TRIM_LEN: 141
+       TRIM_START: 0
+
+       BASE_COUNT: 1992
+   BIO_BASE_COUNT: 1992
+   CMP_BASE_COUNT: 1992
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 3
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 13
+      MIN_SPOT_ID: 1
+             NAME: 9
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 14
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: A
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 1
+         READ_SEG: [0, 1]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 13
+       SPOT_GROUP: 
+          SPOT_ID: 9
+         SPOT_LEN: 1
+         TRIM_LEN: 1
+       TRIM_START: 0
+
+       BASE_COUNT: 1992
+   BIO_BASE_COUNT: 1992
+   CMP_BASE_COUNT: 1992
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 1113102220321220323011002113132101023311102023132320203003331103221213312231022232120110210122020113123200020011332122312101301202210221013202122020003213210102101021102012100330320023102103000110102300112013212333113010003103101221222211022111033003
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 13
+      MIN_SPOT_ID: 1
+             NAME: 10
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 40, 40, 40, 40, 40, 40, 40, 40, 39, 39, 21, 21, 21, 33, 37, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 35, 35, 35, 34, 37, 33, 31, 30, 29, 29, 19, 17, 17, 17, 13, 13, 13, 14, 12, 19, 18, 22, 22, 25, 24, 2 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: GTGCAAGAGGCTGAGGCTAACAAAGTGCATCAACCTATGTGGAAGCATCGAAGGCCCGCGTGGCTCAGTATGAGCAAGAGCTGAACAAGTTGAGGAACATGATCCCCTTTGTATCAGATGACCATTGAAGACCTCAACGAAGTCTTCCCCGACGACCAAGTTGGACAAGGTCAAATAATCCCTACCTGGCCCCACCAAGCCCACTTGCTGATATGTAACCCCGTTACCAGACTCTCACCTCACAATAAAT
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 250
+         READ_SEG: [0, 250]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 13
+       SPOT_GROUP: 
+          SPOT_ID: 10
+         SPOT_LEN: 250
+         TRIM_LEN: 250
+       TRIM_START: 0
+
+       BASE_COUNT: 1992
+   BIO_BASE_COUNT: 1992
+   CMP_BASE_COUNT: 1992
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 33311333221321211222302103222110103211322212002132122301203222112123122333113
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 13
+      MIN_SPOT_ID: 1
+             NAME: 11
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 39, 39, 39, 34, 34, 38, 38, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 39, 38, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: ATACATATCTGCTGACAGAGCCTGGCTCTGTTGGCTGTAGAGTCCCTGCTGAGCCAGGCTCTGTCAGCAGATATGTA
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 77
+         READ_SEG: [0, 77]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 13
+       SPOT_GROUP: 
+          SPOT_ID: 11
+         SPOT_LEN: 77
+         TRIM_LEN: 77
+       TRIM_START: 0
+
+       BASE_COUNT: 1992
+   BIO_BASE_COUNT: 1992
+   CMP_BASE_COUNT: 1992
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 303
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 13
+      MIN_SPOT_ID: 1
+             NAME: 12
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 16, 16, 16
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: AAT
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 3
+         READ_SEG: [0, 3]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 13
+       SPOT_GROUP: 
+          SPOT_ID: 12
+         SPOT_LEN: 3
+         TRIM_LEN: 3
+       TRIM_START: 0
+
+       BASE_COUNT: 1992
+   BIO_BASE_COUNT: 1992
+   CMP_BASE_COUNT: 1992
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 020211001202210203122201033110123121112132313130203112333120312022111011200121221103112021111111201133110022130210220230010312320130210113221001212321320221111102202100010312200222312330200030233002201312320012211123133221111221031312122131320310320002113131112033112211322122113000202200102031111120000233
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 13
+      MIN_SPOT_ID: 1
+             NAME: 13
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 40, 40, 40, 40, 26, 21, 21, 21, 30, 30, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 3 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: TCCTGTTTGAAGACCTTACTCTTGGCGTGGTCGTCACAGTAGCATGCCTTACAGCGCAGGCAGGAGTGTTGTCCCAGTCTGTTACAGGACACACACTTGTATGTTTCTGCCTGGAGGATTTGGCAGCTTGCCTGGTGCTCAAACTGATCATCCTCACACAAGAAGTTTTGGCAGAAAGAGCAGCGGAAAATTCGCCCTCCATGATCCCAGACACTACGCTCACACTCAATGCAGTCTGCATCCGTTAGGGGACATGCACAGGCGTGAGTGCTCAGACATTTTCCTCCCAAGGCACACAGGGGGATA
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 306
+         READ_SEG: [0, 306]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 13
+       SPOT_GROUP: 
+          SPOT_ID: 13
+         SPOT_LEN: 306
+         TRIM_LEN: 306
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/7.1.stdout b/test/fastq-loader/expected/7.1.stdout
new file mode 100644
index 0000000..a4158cd
--- /dev/null
+++ b/test/fastq-loader/expected/7.1.stdout
@@ -0,0 +1,60 @@
+       BASE_COUNT: 1025
+   BIO_BASE_COUNT: 1025
+   CMP_BASE_COUNT: 1025
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 32221001232021032212221120133210330331132030111131310212320130231200330232013203300231032110333113001122130311333232301021300200321100002110112231020013122132303310001331220213313321330223331101002002230033013230020231000320033101332123232101011000130130302310102031031213302310210102212222023123212031111210200121222111301020122122023130022031231211000203330131110310000200100212313123101330333110220231213313002301111130012202000333020020223303121301310203312033023110303 [...]
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_PACBIO_SMRT
+          QUALITY: 43, 43, 71, 69, 29, 29, 29, 29, 58, 58, 39, 39, 67, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 45, 43, 47, 47, 71, 71, 71, 38, 38, 71, 45, 45, 71, 69, 69, 71, 71, 50, 50, 22, 22, 22, 62, 62, 70, 71, 60, 60, 71, 71, 52, 52, 71, 71, 50, 50, 50, 67, 64, 38, 38, 71, 57, 57, 57, 57, 71, 71, 71, 71, 39, 39, 39, 46, 48, 71, 71, 42, 42, 42, 43, 52, 52, 71, 71, 68, 18, 54, 54, 56, 39, 39, 52, 71, 71, 71, 71, 71, 57, 57, 71, 71, 42, 41, 6, 65, 36, 36, 65, 34, 34, 61, 70, 57, 42, 57 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: AGAGTTTGATCCTGGCTCAGAGTGAACGCTGGCGGCGTGCTTAACACATGCAAGTCGAACGGATGAAATAAGCTTGCTTATTTCGTTAGTGGCGCACGGGTGAGTAATGTATAGCTAACCTGCCCTTTAGTGGGGGACAACAGATGGAAACGTCTGCTAATACCCCATACTCCTGCGTATCATAAGATATGTTGGGAAAGATTTATTGCTAAAGGATGGGGCTTTATGGTATCAGCTAGTTGGTGGGGTAACGGCCTACCAAGGCAATGACGCCTACCTGGTTCTGAGAGGATGATCAGGCACACTGGAAACTGAGACACGGTTCCAGACTCCTACGGGAGGCAGCAGTGGGGAATATTGCACAATGGGGGAAACCCTGATGCAGCAACGCCGCGTGGAGGATGACGCATTTCGGTGTGTAAACTCCTTTTATAAGGGAAGATAATGACGGTACCTTATGAATAAGCACCGGC [...]
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 507
+         READ_SEG: [0, 507]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 507
+         TRIM_LEN: 507
+       TRIM_START: 0
+
+       BASE_COUNT: 1025
+   BIO_BASE_COUNT: 1025
+   CMP_BASE_COUNT: 1025
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 32221001232021032212021320133210330133132030111131310212320132221322231020312100202300020312003220322002110332013001122130133311001301021302331020020203323022300200121002213031302033303311211202123313103200132110300133220301130133202310210033312001303232321010112223301123001101020332132310013010301221222200332013012111121020121222111301201221220231302203123121100020333013331031003101002121331231033103331122112022201000230232313002322211033010002022000002213013100102202 [...]
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_PACBIO_SMRT
+          QUALITY: 71, 68, 68, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 69, 69, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 48, 48, 71, 70, 70, 71, 71, 71, 71, 71, 71, 71, 51, 51, 71, 71, 63, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 62, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 67, 67, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 21, 21, 21, 21, 23, 71, 71, 71, 53, 53, 53, 71, 71, 71, 71, 71, 71, 53, 53, 53, 71, 71, 59, 59, 71, 71, 71, 71, 71, 28, 28, 28, 71, 71, 71, 7 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: AGAGTTTGATCCTGGCTCAGGACGAACGCTGGCGGTATGCTTAACACATGCAAGTCGAACGAGACGAGATGGAATGACCCTTCGGGGAATGAAATCTTAGAAAGTGGCGAACGGGTGAGTAACGCGTGGGTAACCTGCCTATGGAAAGGAATAGCCTCGGGAAACTGGGAGTAATGCCTTATAATACAGTGAAGTCGCATGGCTTTGCTGTTAAACGCTCCGGTGCCATAGGATGGACCCGCGTCCCATTAGCTAGTTGGTGAGATAACAGCCCACCAAGGCGACGATGGGTAACCGGTCTGAGAGGGCGAACGGTCACACTGGAACTGAGACACGGTCCAGACTCCTACGGAGGCAGCAGTGGGGAATATTGCGCAATGGGCAACCCTGACGCAGCAATACCGCGTGAGTGAAGAGGTTTTCGGATCGTAAAGCTCTGTTATTGGGGAAGAAAAAAGACGGTACCCAAGAAG [...]
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 518
+         READ_SEG: [0, 518]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 2
+         SPOT_LEN: 518
+         TRIM_LEN: 518
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/7.2.stdout b/test/fastq-loader/expected/7.2.stdout
new file mode 100644
index 0000000..a7a4eff
--- /dev/null
+++ b/test/fastq-loader/expected/7.2.stdout
@@ -0,0 +1,60 @@
+       BASE_COUNT: 1033
+   BIO_BASE_COUNT: 1033
+   CMP_BASE_COUNT: 1033
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 3320110002200110011000000000002310000002200001111110022000011110002112000000110330330022003213300111110000001001320011111100000110000013211101113301100110000012311110110110001110010123000000110000001100011000001110111
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_PACBIO_SMRT
+          QUALITY: 6, 0, 4, 0, 4, 2, 0, 0, 0, 0, 0, 0, 4, 1, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 0, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 5, 0, 0, 1, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 4, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 5, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 5, 0, 0, 3, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 5, 0, 0, 1, 0, 0, 2, 8, 0, 1, 0, 0, 4, 0, 0, [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: ATCCACCCCTCCCACCCACCCCCCCCCCCCTACCCCCCCTCCCCCACACACCCTCCCCCACACCCCTGTCCCCCCCACCGCCGCCCTCCCGACGCCCACACAAAAAAACCCATCCCACACACCCCCCACCCCCCATCACAACACGCCACCCACCCCCCAGCACACCACCACCCCACAAACCAGCCCCCCCACCCCCCCACCCCACCCCCCACAACAC
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 217
+         READ_SEG: [0, 217]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 217
+         TRIM_LEN: 217
+       TRIM_START: 0
+
+       BASE_COUNT: 1033
+   BIO_BASE_COUNT: 1033
+   CMP_BASE_COUNT: 1033
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 20111100001100101000113030000101011011011010001110003333000110000111100011113301100330110033011101330003213332001001100033330011010100110110003211100110000033110110000000333311033001100011100132133010122010100000000033011001230330000000110123000001100033003223003213030113333003311000123033000012300000000000001111100001010100100011000011001010001101100133011010000110000111010000000111010101000110011011010112201100003300001010003210000101100013311110111000133011000321111 [...]
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_PACBIO_SMRT
+          QUALITY: 2, 0, 0, 3, 0, 1, 0, 0, 0, 0, 0, 1, 1, 2, 0, 4, 0, 2, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 5, 0, 0, 0, 3, 0, 4, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 5, 4, 3, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 4, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 6, 0, 0, 0, 1, 0, 0, 2, 0, 0, 1, 1, 2, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 4, 0, 2, 0, 0, 3, 3, 2, 0, 3, 3, 0, 0, 0, 1, 2, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 5, 0, 0, [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: CCACACCCCCACCCAACCCCACGGCCCCCAACCACCACCACCAAAACACCCCGCGCCCCACCCCCACACCCCACACGCCACCCGCCACCCGCCACAACGCCCCGACGCGAAACCCACCCCGCGCCCACCAACCCACCACCCCGACACCCACCCCCCGCACCACCCCCCCCGCGCACCGCCCACCCCACAAACGACGCCAACTCCAACCCCCCCCCCGCCACCCAGCCGCCCCCCCCACCAGCCCCCCACCCCGCCCGAGCCCGACGGCCACGCGCCCGCACCCCAGCCGCCCCCAGCCCCCCCCCCCCCCACACAAAAACCAACCCAAAACAAAAACAAACCAAAACAACAAACGCCACCAAAAACAAAAACACCAAAAAAAACACCAACCAAAACAAACAACAACCACTCCACCCCCGCCCCCAACCCCGACCCCCAACAAAACGCACACCACAAAACGCCACCCCGACACA [...]
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 816
+         READ_SEG: [0, 816]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 2
+         SPOT_LEN: 816
+         TRIM_LEN: 816
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/7.3.stdout b/test/fastq-loader/expected/7.3.stdout
new file mode 100644
index 0000000..f51b1a6
--- /dev/null
+++ b/test/fastq-loader/expected/7.3.stdout
@@ -0,0 +1,60 @@
+       BASE_COUNT: 1076
+   BIO_BASE_COUNT: 1076
+   CMP_BASE_COUNT: 1076
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 1013222012202312332112220332021212330330022330222013211133333202123102303221202133123222223222022210102222002332020301202110230033301121323222230022311123012302231012212200232222323231012221211111011221332310
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_PACBIO_SMRT
+          QUALITY: 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 2 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: GGTAGAGGTCTTCGTCGCTGTCTCCGCTTCAGTCGCCGCCCTCGCCTCTTGCTGTGCGCGCTTCAGCAAGCCGAGTCCTGCGTCGAGAGATCTCCTCTGGTTCTCTTTCGCTTCCGGTCCTGTTCGGGCGCCACTGCTAGAGATTTCTACACTAACTAAGATGGTCTGAGGGATCTCTAGCTACCAGAGTCACACAACAGACGCTACC
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 208
+         READ_SEG: [0, 208]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 208
+         TRIM_LEN: 208
+       TRIM_START: 0
+
+       BASE_COUNT: 1076
+   BIO_BASE_COUNT: 1076
+   CMP_BASE_COUNT: 1076
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 10021022333303332130220223031222201202222233333322222203300211203322000303033331121333021322123333320232202222131131321312123123331222322023211331233111222311133230222233230101320032111111110130220223302220223212202211222203102222000213332203303332121120201210321221233033211132123133333333303312110333333333332110233311312220332203333303003003331231323222103032103322203231220233221230331212222320013222013022231203300101312232120101101330101303120220231200112201331312003 [...]
+           CS_KEY: T
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 0
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_PACBIO_SMRT
+          QUALITY: 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 2 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS
+             READ: GGGACCTCGCGCCGCGACGGAGGAGCCGTCTCTTGAAGAGAGCGCGCGAGAGAGGCGGGACAGGCGAGGGGCCGGCGCGTGACGCGGACGAGTCGCGCGAAGCTCCTCTCATGTACGACGTCAGCAGCGCAGAGCTCCTAGTGCGTCGCACAGAGCACATAGCCTCTCGCTAACCATCCCGACACACACAACGGAGGAGCGGAGAAGATCAGAAGACAGAGAATGGAGAGGGGACGCGAGGCGGCGCTGACAGGAACTGGCTGAGTCGCCGCTGTGCTGATGCGCGCGCGCCGCAGTGGCGCGCGCGCGCTGTTCGCGTGCAGAGGCGAGGCGCGCCGGGCCCGCGTCGTAGCTCTGGCCGACCGCTCTTAGCAGAAGCGAGTCGGCGTCAGAGATCCCATCTCCATTCTCGTCCGCCCAACGTCTAGTCCAACAACGCCAACGGCAGGAGGATGAAACAGAACGCATGAAAT [...]
+      READ_FILTER: SRA_READ_FILTER_PASS
+         READ_LEN: 868
+         READ_SEG: [0, 868]
+       READ_START: 0
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: 
+          SPOT_ID: 2
+         SPOT_LEN: 868
+         TRIM_LEN: 868
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/8.0.stdout b/test/fastq-loader/expected/8.0.stdout
new file mode 100644
index 0000000..44db5d1
--- /dev/null
+++ b/test/fastq-loader/expected/8.0.stdout
@@ -0,0 +1,30 @@
+       BASE_COUNT: 66
+   BIO_BASE_COUNT: 66
+   CMP_BASE_COUNT: 66
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 301212321010213302323201331023331311203221313213231002230003322030
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 66
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 1
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: AACTGATCAACCTGCGGATCGAACGCAAGCGCAACAGGCTCATGCTGCTACCCTCGGGGCGAGGCC
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 33, 33
+         READ_SEG: [0, 33], [33, 33]
+       READ_START: 0, 33
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 1
+       SPOT_GROUP: 
+          SPOT_ID: 1
+         SPOT_LEN: 66
+         TRIM_LEN: 66
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/expected/8.1.stderr b/test/fastq-loader/expected/8.1.stderr
new file mode 100644
index 0000000..3a036e1
--- /dev/null
+++ b/test/fastq-loader/expected/8.1.stderr
@@ -0,0 +1,5 @@
+latf-load err: file="8.1.fastq"
+latf-load err:Inconsistent secondary read number: previously used 3, now seen 2
+latf-load warn: path not found while removing directory within database module - table SEQUENCE failed to drop temporary column 'TMP_KEY_ID'
+latf-load err: format unsupported while parsing file - accession="obj" errors="1" status="failure"
+latf-load err: format unsupported while parsing file - load failed
diff --git a/test/fastq-loader/expected/9.0.stdout b/test/fastq-loader/expected/9.0.stdout
new file mode 100644
index 0000000..498100c
--- /dev/null
+++ b/test/fastq-loader/expected/9.0.stdout
@@ -0,0 +1,60 @@
+       BASE_COUNT: 404
+   BIO_BASE_COUNT: 404
+   CMP_BASE_COUNT: 404
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 2230120003312333000101101303001013310103223001100120023010030322210223120322311200013213102011200203322132132213111122002212110220112212323122012213221002021302221333210033032200312330210133320301210321
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 202
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 1
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 30, 30, 27, 35, 26, 35, 35, 35, 37, 32, 34, 23, 11, 34, 25, 34, 37, 38, 40, 33, 38, 10, 34, 34, 8, 18, 27, 34, 37, 39, 29, 34, 16, 9, 25, 36, 37, 35, 33, 34, 30, 9, 16, 33, 38, 37, 15, 33, 37, 31, 9, 24, 35, 34, 29, 33, 8, 30, 30, 34, 34, 33, 34, 25, 35, 22, 23, 19, 31, 28, 37, 36, 36, 31, 36, 32, 25, 8, 22, 8, 8, 28, 30, 24, 30, 22, 31, 31, 33, 34, 25, 29, 26, 26, 18, 28, 31, 33, 33, 33, 33, 31, 33, 31, 37, 30, 35, 32, 36, 39, 39, 19, 34, 27, 32, 34, 25, 36, 36, 39, 2 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: CTAACTTTTATGATATTTTGGTGGTAATTTGGTATGGTTAGATTTGTTTGAAAGCCAAATTAGAGTTCTACTTAGATGTCCCCATCATGGAACAGGGAATACTGCTGCTCATGTGTCTTTCTGACAAGAACAGACTAGCAGAACTCATCTGGGAAGTAAGAGTATAGTTTATTAGAAATGATAAGTTGCGCTTAACTGGCTG
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 101, 101
+         READ_SEG: [0, 101], [101, 101]
+       READ_START: 0, 101
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: GATCAG
+          SPOT_ID: 1
+         SPOT_LEN: 202
+         TRIM_LEN: 202
+       TRIM_START: 0
+
+       BASE_COUNT: 404
+   BIO_BASE_COUNT: 404
+   CMP_BASE_COUNT: 404
+CMP_LINKAGE_GROUP: 
+     COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+           CSREAD: 1131131133323131133030331132231121330123331222003300110002133123111202120023213022003330321020211202111300303030011213303300332202121220032020312021032011103132222220220023012002233111002332013120311030
+           CS_KEY: TT
+        CS_NATIVE: false
+   FIXED_SPOT_LEN: 202
+    LINKAGE_GROUP: 
+      MAX_SPOT_ID: 2
+      MIN_SPOT_ID: 1
+             NAME: 2
+         PLATFORM: SRA_PLATFORM_UNDEFINED
+          QUALITY: 33, 33, 31, 35, 37, 37, 37, 37, 38, 39, 38, 39, 39, 40, 40, 39, 37, 39, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41, 40, 38, 40, 41, 41, 39, 39, 40, 41, 41, 37, 36, 40, 39, 40, 37, 40, 37, 34, 35, 36, 38, 39, 40, 40, 41, 40, 41, 40, 41, 37, 38, 40, 40, 37, 40, 39, 38, 40, 40, 41, 41, 38, 40, 40, 41, 41, 40, 40, 38, 41, 40, 40, 40, 38, 38, 36, 39, 40, 41, 39, 39, 39, 37, 39, 38, 39, 37, 37, 37, 37, 37, 37, 31, 33, 34, 37, 37, 37, 37, 37, 39, 39, 39, 39, 39, 39, 40, 38, 38, 4 [...]
+        RD_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+             READ: GTACATGTATAGCATGTATTAATACATCTACAGTATTGATATGAGAAATAAACAAAAGTATGATGTGAAGTCCCTAGTAAGAAATATTAGTTCCTGTCCTGGTAAATTAATTTGTCATAATAAATAGAAGTCAGAAATCCTTACTTCAATCCACAATGCTCTCTCCTCCCTAACTTTCTATGTGGGATAGGTACTTACAATT
+      READ_FILTER: SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS
+         READ_LEN: 101, 101
+         READ_SEG: [0, 101], [101, 101]
+       READ_START: 0, 101
+        READ_TYPE: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_BIOLOGICAL
+       SIGNAL_LEN: 0
+       SPOT_COUNT: 2
+       SPOT_GROUP: GATCAG
+          SPOT_ID: 2
+         SPOT_LEN: 202
+         TRIM_LEN: 202
+       TRIM_START: 0
+
diff --git a/test/fastq-loader/input/1.1.fastq b/test/fastq-loader/input/1.1.fastq
new file mode 100644
index 0000000..069381b
--- /dev/null
+++ b/test/fastq-loader/input/1.1.fastq
@@ -0,0 +1,5 @@
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540/1
+GTCGCTTCTCGGAAGNGTGAAAGACAANAATNTTNN
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540
+&.<77478889998776776:997974354774779
+
diff --git a/test/fastq-loader/input/1.2.fastq b/test/fastq-loader/input/1.2.fastq
new file mode 100644
index 0000000..9f7e6b7
--- /dev/null
+++ b/test/fastq-loader/input/1.2.fastq
@@ -0,0 +1,5 @@
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540/1
+GTCGCTTCTCGGAAGNGTGAAAGACAANAATNTTNN
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540
+YYYYYYYYYYYYYYYYPYYVYYYYYYYYYYYYYYYY
+
diff --git a/test/fastq-loader/input/1.3.fastq b/test/fastq-loader/input/1.3.fastq
new file mode 100644
index 0000000..39145e2
--- /dev/null
+++ b/test/fastq-loader/input/1.3.fastq
@@ -0,0 +1,5 @@
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540/1
+GTCGCTTCTCGGAAGNGTGAAAGACAANAATNTTNN
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540
+41 42 43 44 45 46 47 48 49 40 41 42 43 44 45 46 47 48 49 40 41 42 43 44 45 46 47 48 49 40 41 42 43 44 45 46
+
diff --git a/test/fastq-loader/input/1.4.fastq b/test/fastq-loader/input/1.4.fastq
new file mode 100644
index 0000000..371fc95
--- /dev/null
+++ b/test/fastq-loader/input/1.4.fastq
@@ -0,0 +1,24 @@
+ at ID57_120908_30E4FAAXX:3:1:1772:953/1
+GCAATAGCGCGTTGCCTAATCTAACGACGATGATTG
++ID57_120908_30E4FAAXX:3:1:1772:953
+hhhhhhhhhhhhhhhhhhhhhhbdhhhhhhDhGhhh
+ at ID57_120908_30E4FAAXX:3:1:1772:953/2
+ATGGCTCAGGGCCAGGCCCAGAGCCCTTGCGATCAG
++ID57_120908_30E4FAAXX:3:1:1772:953
+hhhhhhhhhhhhhahhhhhhhMhhhLhhhhh<hh at h
+ at ID57_120908_30E4FAAXX:3:1:1590:999/1
+GTTTTATCGGCAGCCGTCTGCTTTCGCGCCTAAGCC
++ID57_120908_30E4FAAXX:3:1:1590:999
+hhhhhhhhhhhhh[hhhhhNXhhH=Ah`LhM??>hB
+ at ID57_120908_30E4FAAXX:3:1:1590:999/2
+TAAGCAGCGCCTGCGCAGTCGCTGCTTAGTCGCTTA
++ID57_120908_30E4FAAXX:3:1:1590:999
+hhhhhhhhhhhhhhhhhhhhhhhhhbhKhhhhhhhC
+ at ID57_120908_30E4FAAXX:3:1:1701:982/1
+GAGCAGTACGAGCAGTACCTGTTTTTCATTGGAGAT
++ID57_120908_30E4FAAXX:3:1:1701:982
+hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhXhhh
+ at ID57_120908_30E4FAAXX:3:1:1701:982/2
+GGTCGCTGACGATGTGCGGAACCAACCGCTCCCGTC
++ID57_120908_30E4FAAXX:3:1:1701:982
+hhhhhhhhhhhhhhhhhhhhhhhOUhhhhhhhIh[h
diff --git a/test/fastq-loader/input/10.0.fastq b/test/fastq-loader/input/10.0.fastq
new file mode 100644
index 0000000..e7efa74
--- /dev/null
+++ b/test/fastq-loader/input/10.0.fastq
@@ -0,0 +1,4 @@
+ at HWI-ST1374:1:1101:1161:2060#0/1
+CCTACACTTGTATTTTGGTTA
++HWI-ST1374:1:1101:1161:2060#0/1
+bb~eeeeegggcgiihhcegg
diff --git a/test/fastq-loader/input/11.0.1.fasta b/test/fastq-loader/input/11.0.1.fasta
new file mode 100644
index 0000000..67e5df2
--- /dev/null
+++ b/test/fastq-loader/input/11.0.1.fasta
@@ -0,0 +1,2 @@
+ at SRR390728.1.1
+GAGCAATAATGTCTATTTGGTTTTTTTTTTTTTTTTTTTTTTTTTTTCCGCCAATACACCCCACAACAAGTAACAC
diff --git a/test/fastq-loader/input/11.0.2.fasta b/test/fastq-loader/input/11.0.2.fasta
new file mode 100644
index 0000000..45efbc3
--- /dev/null
+++ b/test/fastq-loader/input/11.0.2.fasta
@@ -0,0 +1,2 @@
+ at SRR390728.1.2
+GCCACTACATAGGATGTATTTTTGCAGCAACAAGAAGAAGGGGGGGGGGGGGGGTAAAACAAAAATACAGCGGGCG
diff --git a/test/fastq-loader/input/11.1.1.fastq b/test/fastq-loader/input/11.1.1.fastq
new file mode 100644
index 0000000..316d9b6
--- /dev/null
+++ b/test/fastq-loader/input/11.1.1.fastq
@@ -0,0 +1,4 @@
+ at SRR493912.15083.1 15083 length=101
+TAAAGCTTTCATTTCGTTCCCTCCATTAACTGTCATACACCAATATATTATCATAATCCTTATATTAAAATGATTGATTTTATGTAAATTATTTATAAATT
++SRR493912.15083.1 15083 length=101
+CCCFFFFFHHGHGJJJJJJJIIJJGJJIJGIHHIJFBHGIIJGFE at BHIIECEHIIGIGIHHIIJIIIJGEECHHF@EGHGDHGEHFEEHHFFFDFFFEE@
\ No newline at end of file
diff --git a/test/fastq-loader/input/11.1.2.fastq b/test/fastq-loader/input/11.1.2.fastq
new file mode 100644
index 0000000..a95e6a4
--- /dev/null
+++ b/test/fastq-loader/input/11.1.2.fastq
@@ -0,0 +1,4 @@
+ at SRR493912.15083.2 15083 length=101
+TAAAGCTTTCATTTCGTTCCCTCCATTAACTGTCATACACCAATATATTATCATAATCCTTATATTAAAATGATTGATTTTATGTAAATTATTTATAAATT
++SRR493912.15083.2 15083 length=101
+CCCFFFFFHHGHGJJJJJJJIIJJGJJIJGIHHIJFBHGIIJGFE at BHIIECEHIIGIGIHHIIJIIIJGEECHHF@EGHGDHGEHFEEHHFFFDFFFEE@
\ No newline at end of file
diff --git a/test/fastq-loader/input/12.0.fastq b/test/fastq-loader/input/12.0.fastq
new file mode 100644
index 0000000..b716dab
--- /dev/null
+++ b/test/fastq-loader/input/12.0.fastq
@@ -0,0 +1,8 @@
+ at HWI-ST1374:1:1101:1161:2060#SG1/1
+CCTACACTTGTATTTTGGTTA
++HWI-ST1374:1:1101:1161:2060#SG1/1
+bb~eeeeegggcgiihhcegg
+ at HWI-ST1375:1:1101:1161:2060#SG2/1
+CCTACACTTGTATTTTGGTTA
++HWI-ST1375:1:1101:1161:2060#SG2/1
+bb~eeeeegggcgiihhcegg
diff --git a/test/fastq-loader/input/12.1.fastq b/test/fastq-loader/input/12.1.fastq
new file mode 100644
index 0000000..b716dab
--- /dev/null
+++ b/test/fastq-loader/input/12.1.fastq
@@ -0,0 +1,8 @@
+ at HWI-ST1374:1:1101:1161:2060#SG1/1
+CCTACACTTGTATTTTGGTTA
++HWI-ST1374:1:1101:1161:2060#SG1/1
+bb~eeeeegggcgiihhcegg
+ at HWI-ST1375:1:1101:1161:2060#SG2/1
+CCTACACTTGTATTTTGGTTA
++HWI-ST1375:1:1101:1161:2060#SG2/1
+bb~eeeeegggcgiihhcegg
diff --git a/test/fastq-loader/input/12.2.fastq b/test/fastq-loader/input/12.2.fastq
new file mode 100644
index 0000000..c040978
--- /dev/null
+++ b/test/fastq-loader/input/12.2.fastq
@@ -0,0 +1,4 @@
+ at HWI-ST1234:33:D1019ACXX:2:1101:1415:2223/1 1:N:0:ATCACG
+CCTACACTTGTATTTTGGTTA
+ at HWI-ST1234:33:D1019ACXX:2:1101:1415:2223/2 2:N:0:ATCACG
+CCTACACTTGTATTTTGGTTA
diff --git a/test/fastq-loader/input/13.0.fastq b/test/fastq-loader/input/13.0.fastq
new file mode 100644
index 0000000..e6b5a3c
--- /dev/null
+++ b/test/fastq-loader/input/13.0.fastq
@@ -0,0 +1,12 @@
+ at SRR000123.10 EXRHO8E16JXOK2 length=272
+TCAGCCACCGACATTTATCTGTTCTTTCTCCCAATCGTATACTGAGTACGCTATATCTGTCAATTCAACCGGTTTCAACGGGTTGCTGCCTCCCGGGGCATTGACCGTAACCAAGACTTCGTAACAGGTATTGCGGTTCAATTTCTTGGCCGCACTGACCGGAATCTGGTAATAGCTGCTCTCCATGAATTGCGGATCTCCGGTAGAACCGTCTTCATTGTGAGGCGTATAATTCATCGGGATGTTTACAATCAGGCGCACCTCCTTTTCCG
++SRR000123.10 EXRHO8E16JXOK2 length=272
+====E==F>===<E?)<=;=;F=<HB.=9HB.B97=<===;==<;======<<=====<=<D;B;<@9D=B;C>*<@7<C?*B::;::C<;FB1GC7)9;B:<;D=;<C=C=B;<<<?6<=<A9;=@7=<A99=D=C<<B;@;$;C=@8 at 88=<;;<:C=B=C==<<C=;C==<<=<<<;==D====C<C=;<C==<;;D=D=9==C<C=;=;B;<;@8=;<<B;==<<<C<C<<<:=FB2<;<FB198B;9<;B;<;==C=<C<GC6(B;1
+ at SRR000123.11 EXRHO8E16JR2D4 length=262
+TCAGTATGAATTCCGTGGCTCGGATGCCGGATATATGTTTCGGTTGACACAGGAACCTGGAAGCCGGTTTGTGGAAATGACCGAAAATTACCGCAGTGCACGTCATGTAGTGGCTTTTGCTAACGAGTTTGTAAAGACATGCGCAGAATGAAAACGAATGCCTATTATTTCTATGCGGAAGGAGGAGGGAGTGGGTTGGAGTAACTCATCATCGGTCGTGCCTGTATGTATCAACCGCTCGTGGAAGAATTGTCTTCAGCAG
++SRR000123.11 EXRHO8E16JR2D4 length=262
+==;;===;D;C:?5=:F><==F><==E<F><<=====JD1;F=E=;:<===E=E<E<<C9B8=@6F=IB/=:C<E at -:::C<;FB5&B:6>6<<7:<=<===<<;;==<<;C==FC5'820>59969C>*=2?;#;54222254<:C;=7EA2"95<3<8B;<;C=4FB2<4<<8;B<=5@;2@;<FB2;9<@<&C=@;<78C=<874;18<;C=27(4,9/:<5<99<3==:0C=<852<:B:>67C<:0:(=?6:7<442
+ at SRR000123.12 EXRHO8E16JYG2J length=264
+TCAGATCGGCAATCGTAGCATCTTCAGTTTCTCCTGAGCGATGAGAGGTAACCGTAGTATATCCATGACGATGAGCCATTTCGATTGCATCCAGTGTTTCACTGAGTGAGCCGATCTGATTTACTTAATAAGGATGGAATTGGCACATCCCACGCTCAATACCTTTCGTAAGGAAGTCTACATTGTTAACGAACGAGGTCGATCGCCGTACCCACGCTGGCGAGCGTCCACCGACTACGTTCGGTTACGTTTTTACTTACTCCC
++SRR000123.12 EXRHO8E16JYG2J length=264
+==<==;<F>=D;=;=5==9<<<F><==JD1==F=====;<<<====F><F=F=<=====<==C<<<<<<;;<<;<C<;FB2<:<C<8<<<C<<;:=FB1<<<:<<<=;=<D=<=<<;=<FB1;=@;;2=B:9/=6;2;2C<?6:999<A=(:)<5<:@8;2B;@;%9=.@;A9A<(5:2<98B=07-8.<:C=7&2B:;<8<<;:B<(<=@;$9-<=<@8<5:<73<C=8C=<<*=<<9A<:C=D=3(2GC8-"94C<569EA.
diff --git a/test/fastq-loader/input/13.1.fastq b/test/fastq-loader/input/13.1.fastq
new file mode 100644
index 0000000..213002e
--- /dev/null
+++ b/test/fastq-loader/input/13.1.fastq
@@ -0,0 +1,12 @@
+ at EXRHO8E16JTGUV
+TCAGTTTCGGGAACTATGTAAACAATACGCTAAGCGTGTTCTATGGTTTTACAATGTTCAGGATGGAAACATTGTAGGAGATAACAACCGAGAAGTATCGCTGCCTGTCGGCTGAGACACGCAACAGGGGATAGGCAAGGCACTACAGGGGATAGGN
++EXRHO8E16JTGUV
+=<:7F?)9F?)>3<=<===F?*<D:<<<=<:F>=<==:D;==;=D;LE8,49E<==E==;E===E<F at +==E<==<D=<8<=C;;A9 at 7;<9>6<<===<=<<A:8<:;C<<=<;<<<9<:=B;88GC6(6<<C==C=C=<=<&<9=GC7):<<B:!
+ at EXRHO8E16JU4WU
+TCAGCTACATTGACCTTTTACTATAACATCTATGAAGGGATTATCGAAAGCCGTCGAAAGATTGGTAAAAAGACTACCGTGCGTGGTGTTATGAACCGTGTTCTTCCGAATGTGCTGGAGTTCAAAGAAATTTTGAAAAATAAAAAACCTTGCCTTTCGAGTTGATGCAAAACTACATCAAGGATTCAAGGGTTGACTATCAACGCAATTTAAGTACGCTGAGTAAAGCGTACTATCATCCCTGTGATGCTTTCTGTGAAGAGGTATTGGAATTACTGAG
++EXRHO8E16JU4WU
+<=49=:=<=D;==F=JC4%9====E<==<9===;E=HB.<D;====E>(<D:<=<=F?*=<D;E<=ME9.$=<<;9B;:<<;;<@9;:@9=8=>5C=<:8C<=>6 at 8==5<<<<=<D=<9D=;FB1;B>)GC7)<HD9/%<HC92+$@:C==C=FB18<=;D==<:<=HD8,3<=<<<<C<D=<C=;C=FB1C=;:<;;<<D=;<:@8FA/C=<<<<=:<:=<9FB2<<<;;;;=<<<<FB0<<<<<==;FB19:<<=C=9:C<29C=C<C<C<<<8<4<
+ at EXRHO8E16JVI1Y
+TCAGGGGGACGCCCCAAGGTGTATTCGTCCGAAGTTGCTGTGATGGTCACATGGTACATACGGTGATTGTTAAGACCATTAACACTACCCGTAGTTGTATTGTAAGTATATTTGTAAGGCCTCCTGAGACACGCAACAGGGGATAGGCAAGGCACACAGGGGATAGGN
++EXRHO8E16JVI1Y
+==<LE8-"=<9IC3"B8A7;===E<===E<<<1;>3;<<=====E=======E========E<===D:=B;C<==C<=C<C<<===<D?+<<=<B:<=<B:<=B;=<=<=D?,=<C;A:B:<?7==<=<<<==<D=<=GC6(:<=C=<C=D===<===HD8+<;=C=!
diff --git a/test/fastq-loader/input/14.0.fasta b/test/fastq-loader/input/14.0.fasta
new file mode 100644
index 0000000..67e5df2
--- /dev/null
+++ b/test/fastq-loader/input/14.0.fasta
@@ -0,0 +1,2 @@
+ at SRR390728.1.1
+GAGCAATAATGTCTATTTGGTTTTTTTTTTTTTTTTTTTTTTTTTTTCCGCCAATACACCCCACAACAAGTAACAC
diff --git a/test/fastq-loader/input/2.1.1.fastq b/test/fastq-loader/input/2.1.1.fastq
new file mode 100644
index 0000000..ba0f52e
--- /dev/null
+++ b/test/fastq-loader/input/2.1.1.fastq
@@ -0,0 +1,5 @@
+ at R16:8:1:0:875#0/1
+T123123
+ at R16:8:1:0:14#0/1
+G123123
+
diff --git a/test/fastq-loader/input/2.1.fastq b/test/fastq-loader/input/2.1.fastq
new file mode 100644
index 0000000..d3cc85b
--- /dev/null
+++ b/test/fastq-loader/input/2.1.fastq
@@ -0,0 +1,4 @@
+ at R16:8:1:0:875#0/1
+TGGAATAACCATTCCTCATGCCTAGAAGAAGAATCTCTACAAGCAGGATTCTTGCTTTCAAAATGCCCTTATAA
+ at R16:8:1:0:14#0/1
+TTGCAACTATAGCAACAGCCTTCATAGGCTATGTCCTCCCGTGAGGCCAAATATCATTCTGAGGGGCCACAGTA
diff --git a/test/fastq-loader/input/2.2.fastq b/test/fastq-loader/input/2.2.fastq
new file mode 100644
index 0000000..9f59a38
--- /dev/null
+++ b/test/fastq-loader/input/2.2.fastq
@@ -0,0 +1,4 @@
+>HWI-EAS6_4_FC2010T:1:1:80:366
+BBBBBBBBBBBBBBBBBBBB
+>HWI-EAS6_4_FC2010T:1:1:212:230
+CCCCCCCCCCCCCCCCCCCC
\ No newline at end of file
diff --git a/test/fastq-loader/input/2.3.fastq b/test/fastq-loader/input/2.3.fastq
new file mode 100644
index 0000000..878d296
--- /dev/null
+++ b/test/fastq-loader/input/2.3.fastq
@@ -0,0 +1,8 @@
+>HWI-EAS6_4_FC2010T:1:1:80:366
+DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
+>HWI-EAS6_4_FC2010T:1:1:212:230
+EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
+>HWI-EAS6_4_FC2010T:1:1:80:366
+AACTGATCAACCTGCGGATCGAACGCAAGCGCA
+>HWI-EAS6_4_FC2010T:1:1:212:230
+ACAGGCTCATGCTGCTACCCTCGGGGCGAGGCC
\ No newline at end of file
diff --git a/test/fastq-loader/input/2.4.fastq b/test/fastq-loader/input/2.4.fastq
new file mode 100644
index 0000000..13816d0
--- /dev/null
+++ b/test/fastq-loader/input/2.4.fastq
@@ -0,0 +1,8 @@
+>HWI-EAS6_4_FC2010T:1:1:80:366
+AACTGATCAACCTGCGGATCGAACGCAAGCGCA
+>HWI-EAS6_4_FC2010T:1:1:212:230
+ACAGGCTCATGCTGCTACCCTCGGGGCGAGGCC
+>HWI-EAS6_4_FC2010T:1:1:80:366
+DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
+>HWI-EAS6_4_FC2010T:1:1:212:230
+EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
diff --git a/test/fastq-loader/input/2.5.fastq b/test/fastq-loader/input/2.5.fastq
new file mode 100644
index 0000000..28c749a
--- /dev/null
+++ b/test/fastq-loader/input/2.5.fastq
@@ -0,0 +1,9 @@
+ at HWI-EAS6_4_FC2010T:1:1:80:366
+AACTGATCAACCTGCGGATCGAACGCAAGCGCA
++HWI-EAS6_4_FC2010T:1:1:80:366
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+ at HWI-EAS6_4_FC2010T:1:1:212:230
+ACAGGCTCATGCTGCTACCCTCGGGGCGAGGCC
++HWI-EAS6_4_FC2010T:1:1:212:230
+DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
+
diff --git a/test/fastq-loader/input/2.6.fastq b/test/fastq-loader/input/2.6.fastq
new file mode 100644
index 0000000..ee402b2
--- /dev/null
+++ b/test/fastq-loader/input/2.6.fastq
@@ -0,0 +1,9 @@
+ at HWI-EAS6_4_FC2010T:1:1:80:366/1
+AACTGATCAACCTGCGGATCGAACGCAAGCGCA
++HWI-EAS6_4_FC2010T:1:1:80:366
+EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
+ at HWI-EAS6_4_FC2010T:1:1:80:366/2
+ACAGGCTCATGCTGCTACCCTCGGGGCGAGGCC
++HWI-EAS6_4_FC2010T:1:1:212:230
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+
diff --git a/test/fastq-loader/input/2.7.fastq b/test/fastq-loader/input/2.7.fastq
new file mode 100644
index 0000000..70c76bc
--- /dev/null
+++ b/test/fastq-loader/input/2.7.fastq
@@ -0,0 +1,8 @@
+ at HWI-EAS6_4_FC2010T:1:1:80:366
+AACTGATCAACCTGCGGATCGAACGCAAGCGCA
++HWI-EAS6_4_FC2010T:1:1:80:366
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ at HWI-EAS6_4_FC2010T:1:1:80:366
+ACAGGCTCATGCTGCTACCCTCGGGGCGAGGCC
++HWI-EAS6_4_FC2010T:1:1:212:230
+GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
diff --git a/test/fastq-loader/input/2.8.1.fastq b/test/fastq-loader/input/2.8.1.fastq
new file mode 100644
index 0000000..2a1cc02
--- /dev/null
+++ b/test/fastq-loader/input/2.8.1.fastq
@@ -0,0 +1,4 @@
+ at GG3IVWD03HJRKK
+NTA
+ at GG3IVWD03HJRKZ
+NNT
diff --git a/test/fastq-loader/input/2.8.fastq b/test/fastq-loader/input/2.8.fastq
new file mode 100644
index 0000000..1384e06
--- /dev/null
+++ b/test/fastq-loader/input/2.8.fastq
@@ -0,0 +1,4 @@
+ at GG3IVWD03HJRKK
+NTA
+ at GG3IVWD03HJRKZ
+NTA
diff --git a/test/fastq-loader/input/2.9.1.fastq b/test/fastq-loader/input/2.9.1.fastq
new file mode 100644
index 0000000..36abd6f
--- /dev/null
+++ b/test/fastq-loader/input/2.9.1.fastq
@@ -0,0 +1,4 @@
+ at BILLIEHOLIDAY
+GTCG
++BILLIEHOLIDAY
+&.&.&.&.
diff --git a/test/fastq-loader/input/2.9.fastq b/test/fastq-loader/input/2.9.fastq
new file mode 100644
index 0000000..b4c6e95
--- /dev/null
+++ b/test/fastq-loader/input/2.9.fastq
@@ -0,0 +1,4 @@
+ at BILLIEHOLIDAY
+GTCG
++BILLIEHOLIDAY
+&.
diff --git a/test/fastq-loader/input/3.1a.fastq b/test/fastq-loader/input/3.1a.fastq
new file mode 100644
index 0000000..260fcb8
--- /dev/null
+++ b/test/fastq-loader/input/3.1a.fastq
@@ -0,0 +1,8 @@
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540
+GTCGCTTCTCGGAAGNGTGAAAGACAANAATNTTNN
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540
+HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:118:250
+GAGCACGAGGACCCANNNATCAACGACNANNNGANN
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:118:250
+IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
diff --git a/test/fastq-loader/input/3.1b.fastq b/test/fastq-loader/input/3.1b.fastq
new file mode 100644
index 0000000..2d0d2b9
--- /dev/null
+++ b/test/fastq-loader/input/3.1b.fastq
@@ -0,0 +1,9 @@
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:212:211
+ACTGGAGCACGANAGNCCCNCNACTNANANCNGNNN
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:212:211
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:182:340
+CTGGAGCACGAGAACNCNGCCCGGACANANGNGCNN
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:182:340
+GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
+
diff --git a/test/fastq-loader/input/3.2a.fastq b/test/fastq-loader/input/3.2a.fastq
new file mode 100644
index 0000000..1c6c81d
--- /dev/null
+++ b/test/fastq-loader/input/3.2a.fastq
@@ -0,0 +1,8 @@
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:212:211
+ACTGGAGCACGANAGNCCCNCNACTNANANCNGNNN
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:182:340
+CTGGAGCACGAGAACNCNGCCCGGACANANGNGCNN
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540
+GTCGCTTCTCGGAAGNGTGAAAGACAANAATNTTNN
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:118:250
+GAGCACGAGGACCCANNNATCAACGACNANNNGANN
diff --git a/test/fastq-loader/input/3.2b.fastq b/test/fastq-loader/input/3.2b.fastq
new file mode 100644
index 0000000..166cc59
--- /dev/null
+++ b/test/fastq-loader/input/3.2b.fastq
@@ -0,0 +1,8 @@
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:212:211
+40 40 40 40 40 27 40 40 12 8 5 6 -5 -3 0 -5 -4 0 4 -5 7 -5 7 1 0 -5 -0 -5 -1 -5 -0 -5 7 -5 -5 -5
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:182:340
+40 40 40 40 40 40 40 23 40 40 9 22 -2 14 9 -5 7 -5 0 -2 3 9 -1 0 7 3 0 -5 8 -5 -3 -5 10 2 -5 -5
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540
+40 3 1 22 17 18 34 8 13 21 -3 7 5 0 -0 -5 1 -0 7 3 2 -3 -3 3 -1 -1 4 -5 5 -2 -2 -5 -0 -1 -5 -5
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:118:250
+40 40 40 40 40 40 40 22 33 40 16 29 4 -1 1 -5 -5 -5 7 -3 1 -1 -1 6 -1 14 -1 -5 -2 -5 -5 -5 6 -1 -5 -5
diff --git a/test/fastq-loader/input/3.3a.fastq b/test/fastq-loader/input/3.3a.fastq
new file mode 100644
index 0000000..166cc59
--- /dev/null
+++ b/test/fastq-loader/input/3.3a.fastq
@@ -0,0 +1,8 @@
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:212:211
+40 40 40 40 40 27 40 40 12 8 5 6 -5 -3 0 -5 -4 0 4 -5 7 -5 7 1 0 -5 -0 -5 -1 -5 -0 -5 7 -5 -5 -5
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:182:340
+40 40 40 40 40 40 40 23 40 40 9 22 -2 14 9 -5 7 -5 0 -2 3 9 -1 0 7 3 0 -5 8 -5 -3 -5 10 2 -5 -5
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540
+40 3 1 22 17 18 34 8 13 21 -3 7 5 0 -0 -5 1 -0 7 3 2 -3 -3 3 -1 -1 4 -5 5 -2 -2 -5 -0 -1 -5 -5
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:118:250
+40 40 40 40 40 40 40 22 33 40 16 29 4 -1 1 -5 -5 -5 7 -3 1 -1 -1 6 -1 14 -1 -5 -2 -5 -5 -5 6 -1 -5 -5
diff --git a/test/fastq-loader/input/3.3b.fastq b/test/fastq-loader/input/3.3b.fastq
new file mode 100644
index 0000000..1c6c81d
--- /dev/null
+++ b/test/fastq-loader/input/3.3b.fastq
@@ -0,0 +1,8 @@
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:212:211
+ACTGGAGCACGANAGNCCCNCNACTNANANCNGNNN
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:182:340
+CTGGAGCACGAGAACNCNGCCCGGACANANGNGCNN
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540
+GTCGCTTCTCGGAAGNGTGAAAGACAANAATNTTNN
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:118:250
+GAGCACGAGGACCCANNNATCAACGACNANNNGANN
diff --git a/test/fastq-loader/input/4.4.fastq b/test/fastq-loader/input/4.4.fastq
new file mode 100644
index 0000000..f53b4ad
--- /dev/null
+++ b/test/fastq-loader/input/4.4.fastq
@@ -0,0 +1,13 @@
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540/1
+G12312312312312312312312312312312312
+ at BILLIEHOLIDAY_1_FC21F3DAAXX:8:2:342:540/1
+G12312312312312312312312312312312312
+ at BILLIEHOLIDAY_1_FC22F3DAAXX:8:2:342:540/1
+G12312312312312312312312312312312312
+ at BILLIEHOLIDAY_1_FC23F3DAAXX:8:2:342:540/1
+G12312312312312312312312312312312312
+ at BILLIEHOLIDAY_1_FC24F3DAAXX:8:2:342:540/1
+G12312312312312312312312312312312312
+ at BILLIEHOLIDAY_1_FC25F3DAAXX:8:2:342:540/1
+G12312312312312312312312312312312312
+
diff --git a/test/fastq-loader/input/4.5.1.fastq b/test/fastq-loader/input/4.5.1.fastq
new file mode 100644
index 0000000..2c5c331
--- /dev/null
+++ b/test/fastq-loader/input/4.5.1.fastq
@@ -0,0 +1,10 @@
+ at BILLIEHOLIDAY_1_FC20F3DAAXX
+G12312312312312312312312312312312312
+ at BILLIEHOLIDAY_1_FC21F3DAAXX
+G12112312312312312312 312312312312312
+ at BILLIEHOLIDAY_1_FC22F3DAAXX
+G1232231231231231231 2312312312312312
+ at BILLIEHOLIDAY_1_FC23F3DAAXX
+G12313312312312312312312312312312312
+ at BILLIEHOLIDAY_1_FC24F3DAAXX
+G12312112312312312312312312312312312
diff --git a/test/fastq-loader/input/4.5.fastq b/test/fastq-loader/input/4.5.fastq
new file mode 100644
index 0000000..3781903
--- /dev/null
+++ b/test/fastq-loader/input/4.5.fastq
@@ -0,0 +1,10 @@
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540/1
+G1231231231231231 2312312312312312312
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540/1
+G12112312312312312 312312312312312312
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540/1
+G123223123123123123 12312312312312312
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540/1
+G1231331231231231231 2312312312312312
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540/1
+G12312112312312312312 312312312312312
diff --git a/test/fastq-loader/input/4.fastq b/test/fastq-loader/input/4.fastq
new file mode 100644
index 0000000..069381b
--- /dev/null
+++ b/test/fastq-loader/input/4.fastq
@@ -0,0 +1,5 @@
+ at BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540/1
+GTCGCTTCTCGGAAGNGTGAAAGACAANAATNTTNN
++BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540
+&.<77478889998776776:997974354774779
+
diff --git a/test/fastq-loader/input/5.0.fastq.gz b/test/fastq-loader/input/5.0.fastq.gz
new file mode 100644
index 0000000..7c236e5
Binary files /dev/null and b/test/fastq-loader/input/5.0.fastq.gz differ
diff --git a/test/fastq-loader/input/6.0.fastq b/test/fastq-loader/input/6.0.fastq
new file mode 100644
index 0000000..1a065e7
--- /dev/null
+++ b/test/fastq-loader/input/6.0.fastq
@@ -0,0 +1,52 @@
+ at GG3IVWD03HJRKK length=290 xy=2978_1730 region=3 run=R_2010_05_11_11_15_22_
+ATATACATTTGTCTGTACAGCATGGAATTCTCATACTCTAATCAATATAAAATAATGATTGATTATTCAAGAAAATAAATTGTCAGACAAATGAAAAATAATCTTAAGCCACAGCCCTAAAATACCGTAGATACCATGAGACAAAAAACACTGCTTCCACGAGTCAGGAGCAACTCCCATTATTTTACATTTTATCACCGCCGTCCATTTCTCTTCAGTCTTTTTTACTCTTTTGATTTATTTATTTTACACAAAACAATTATTTATAATTGATTTATTCAGTTTATTTA
++
+89:HHA:/1192DCHHIIEIIIIGGGGIIIIIIIIIIIIIIIIIIIA95553A8<EHHGIIIIGEEAHD;71111;///AADBGIIIIEDDCC:::::I77DIHHIIIDDDGID556===@@H?IIIIIIIIIIIIIIIIII669997B2BBIIIIIIIIIIIIIIIIIII;;;;;;HIIIE;;;;IDA444482DE>>@<?IGHHI>>>B>IIIGGGGG677722HI1=53117;@B=;//1=8;=:DDCD>>@@G<;>>=BBEIIIIDABB=>9;00750,,,51411
+ at GG3IVWD03GMLDS length=238 xy=2600_2350 region=3 run=R_2010_05_11_11_15_22_
+TGAAGCCAAGAAGCCACAGCAACATCATGTTTGAGGAGAAGAAGAGCTCCTAAGACGGAGGCTTCCTGTCGGCTGTTCCCTCTGGAGAAGAAGAAGTGACGTTGCCTTGCGAATGTTAGTTTGTAAGAGAACCTGTTCAGTTCGTAACCTTAATCCTCAGCCGACCTGTATTAGACACGTGTCTCCCTCCATGTATGAACTGAAGCCATCCTCCAGGTGAGTCGCTCACTCTGACCCA
++
+FFEEEFFFFFFIIIIIIIHF;;;HHHHHH@@@IIIIIIIIIIIIIIIIIDFDFFFFFFFFFFFFFFFFFFFFFFFDD?::99B566:=ABDDDDDD???DDA==:::::9<==>>=?<111187>><<<=>>899>>>900048888<<<<@<888<<<?AA8555::DAAADDDFFFDCCFFFFFC<99<?FFFFDDDACCFD???AADA???AAADFDDDDDDBBB??==772212
+ at GG3IVWD03GFQBB length=1 xy=2522_1637 region=3 run=R_2010_05_11_11_15_22_
+N
++
+!
+ at GG3IVWD03F2Q8L length=151 xy=2374_2515 region=3 run=R_2010_05_11_11_15_22_
+AGCGGGAGAGGGGCACATGGTGTGAGGGTCCCAGGATGAACACCCTACGAGTAATAGAGGGATCAACCTGCTTGTAGGCATGTGCCGCACAAGAACCACAATAGGTATACCCAGCATGCGGCGCAATGATGGCTCTAGCAGGTTTGATCGT
++
+HII===EBH>>>>EEIIIIIIIIIIHHHIHHHIIIIIIIIIIHHHIIIIIIIIIIIIIHHHIIIIIIIIIIIIIIIIIIIIIEBBADGGG<<>AAAAADDEEHHHHIIIEDFFIIIEEEEIGBB===BIIIGED==AAA?/////2:=::8
+ at GG3IVWD03G7J0C length=245 xy=2839_1402 region=3 run=R_2010_05_11_11_15_22_
+CCTCGTCGCTTCACTTTTCATGGGCTTCGGAGTGCTGTTCCTGCTACTTTGGGTTGGAATATACGTTTGAAGCTTTGGGTGACTGACTTATAATATGACACATTCCAGTCGAACAAAGGACATCACACACAACACCAACTGGATTCTGTACTCAATTGGACTGCACTGACAATATTTTGAGATTGTATGGAGTCTGGTTTTGTTTCACAATTGAAGATGATTTGTAAACGAAAAAANAAAAAGTA
++
+IIIIIIIIIIIIII;;;;IIIHHHIIIIIIIIIIIIIIIIIIIIIIIHHHHHHIIIIIIIIIIID;;;HIIIIHHHHHHIIIIIIIIIIIIIIIIIIIIIII;;;;IIIIIIIIHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIICCCCIIIIIIIIIIIIIIH@@BBIIIIIIIIDC>>==FB=22---0/,--5=B==@@@EIIEDDD>>>9122229666624!/3333IH8
+ at GG3IVWD03G2V2N length=1 xy=2786_0845 region=3 run=R_2010_05_11_11_15_22_
+N
++
+!
+ at GG3IVWD03HKKWM length=288 xy=2987_2884 region=3 run=R_2010_05_11_11_15_22_
+CTAGGGCTGGGCAATATGACCTAAAATGTATAACCTCGGTATAATTTGGAGCACAAACGGTAACGGTACAAATCACGGTATTTTTGATGGTATACGTCCACCCAAGGCAAGCGTACCGCTGTGCAAATGGACCGTCGAGGGTTCCTAGTTTGTGTTGGAGATGAAATAGCTGCGCTGTAAACGAGTCGTCGTGGATCTTTTGGTCTTCTTTTCTTTGGACGTGTGTTCGCGGGTCTGTGCGGGTCGAACAAGCTAGCGCTAGCCTCGGCTCCGCGGAGCTGCGATGGT
++
+IIIHHHIIHHHIIIIIIIIIIICCCCIIIIIIIIIIIIIIIIIIHHHIIIIIIIHHHIIIIIIIIIIIIHHHIIIIIIIH66666DHIIIIIIIIIIIIIGGGIIIIIIIIIIIIIIIIIIIIIHHHIIIIIIIIIHH;;;??HHIIIHHHIIIIIIIIIIII???IIIIIIIIIIIIHHHIIIIIIIIIIIIIIID><97<95B=52////8///@@EIIIIIIIIIIIHHHIIIIIH??;;;HIIIIIIIIIIIIIIIIIIIIHHHHHHIIIIIIIIIIIIIIIII
+ at GG3IVWD03G0YS1 length=141 xy=2764_1187 region=3 run=R_2010_05_11_11_15_22_
+ACTATCATTATTTGCTGCATGCACAATGCCAAAGAATAAAATGCTGTCTGTCAATGAATGAGGCGTCTAATCCGCACTGACCTCAACTTTTCCACTGAGGATTTGCAGAGGTGTGTGTGTGTGTGTGTGTGTGTGTGTCGA
++
+FFFFFFFFFFFHHIIIIIIIHHGFDDDDAA663:9AB9::;DFFFFFFFFFFFFFFFFFFFCDDFFFFDDDFFFFFFFDBAAAAA<8111144AAA?AABFFFDDDDDFFFFFFFFFFFFFFFFFFFFFFDBA??=6643/
+ at GG3IVWD03FQOVY length=1 xy=2237_0748 region=3 run=R_2010_05_11_11_15_22_
+A
++
+/
+ at GG3IVWD03HD8KU length=250 xy=2915_1884 region=3 run=R_2010_05_11_11_15_22_
+GTGCAAGAGGCTGAGGCTAACAAAGTGCATCAACCTATGTGGAAGCATCGAAGGCCCGCGTGGCTCAGTATGAGCAAGAGCTGAACAAGTTGAGGAACATGATCCCCTTTGTATCAGATGACCATTGAAGACCTCAACGAAGTCTTCCCCGACGACCAAGTTGGACAAGGTCAAATAATCCCTACCTGGCCCCACCAAGCCCACTTGCTGATATGTAACCCCGTTACCAGACTCTCACCTCACAATAAAT
++
+FFFFFFFFFFFIIIIIIIIHH666BFHIIIIIIIIIIIIIIIIIIIIIIIIIFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDDDCFB@?>>4222.../-4377:9777996664223266:666<:333779;222244.3322667;;../426;;44...4//<66357//366.0..415;;=66440449999:?<==AAA7766@>41//14=998=?A at A:9:<>>A;;84
+ at GG3IVWD03GXKBC length=77 xy=2725_2182 region=3 run=R_2010_05_11_11_15_22_
+ATACATATCTGCTGACAGAGCCTGGCTCTGTTGGCTGTAGAGTCCCTGCTGAGCCAGGCTCTGTCAGCAGATATGTA
++
+IIIIIIIIIIIIIIIIIIIHHHHCCGGIIIIIIIIIIIIIIIIHHGHHIIIIIIIIIIIIIIIIIIIIIIIIIIIII
+ at GG3IVWD03HIDOA length=3 xy=2962_2600 region=3 run=R_2010_05_11_11_15_22_
+AAT
++
+111
+ at GG3IVWD03HB687 length=306 xy=2892_1065 region=3 run=R_2010_05_11_11_15_22_
+TCCTGTTTGAAGACCTTACTCTTGGCGTGGTCGTCACAGTAGCATGCCTTACAGCGCAGGCAGGAGTGTTGTCCCAGTCTGTTACAGGACACACACTTGTATGTTTCTGCCTGGAGGATTTGGCAGCTTGCCTGGTGCTCAAACTGATCATCCTCACACAAGAAGTTTTGGCAGAAAGAGCAGCGGAAAATTCGCCCTCCATGATCCCAGACACTACGCTCACACTCAATGCAGTCTGCATCCGTTAGGGGACATGCACAGGCGTGAGTGCTCAGACATTTTCCTCCCAAGGCACACAGGGGGATA
++
+IIII;666??HIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIHHHIIIIIIIIIIIIIIIIIIIIIHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIHHHIIIIIIIIIIIIHHHIIIIIIIIIIIIIIIIIIIHHHIIIHHHIHHHHHIIIIIIIIIICCBBIIIII;;;E<EAGGI=;4442@@HE774=7:EEEE?455IIIIIIIIIIIIIIIIIIDCCDDIIIIIIIIIIIIIIIH??>>?DIIIIIIIC????HIIIEA?AB=;=;00--..-333....:=;;;8---//;53
diff --git a/test/fastq-loader/input/7.1.fastq b/test/fastq-loader/input/7.1.fastq
new file mode 100644
index 0000000..d79f3ec
--- /dev/null
+++ b/test/fastq-loader/input/7.1.fastq
@@ -0,0 +1,9 @@
+ at m121205_055009_42163_c100416332550000001523041801151327_s1_p0/19/ccs
+AGAGTTTGATCCTGGCTCAGAGTGAACGCTGGCGGCGTGCTTAACACATGCAAGTCGAACGGATGAAATAAGCTTGCTTATTTCGTTAGTGGCGCACGGGTGAGTAATGTATAGCTAACCTGCCCTTTAGTGGGGGACAACAGATGGAAACGTCTGCTAATACCCCATACTCCTGCGTATCATAAGATATGTTGGGAAAGATTTATTGCTAAAGGATGGGGCTTTATGGTATCAGCTAGTTGGTGGGGTAACGGCCTACCAAGGCAATGACGCCTACCTGGTTCTGAGAGGATGATCAGGCACACTGGAAACTGAGACACGGTTCCAGACTCCTACGGGAGGCAGCAGTGGGGAATATTGCACAATGGGGGAAACCCTGATGCAGCAACGCCGCGTGGAGGATGACGCATTTCGGTGTGTAAACTCCTTTTATAAGGGAAGATAATGACGGTACCTTATGAATAAGCACCGGCTAACTCCGTGTCAGCAGCC [...]
++m121205_055009_42163_c100416332550000001523041801151327_s1_p0/19/ccs
+LLhf>>>>[[HHdggghhhhhhhNLPPhhhGGhNNhffhhSS777__gh]]hhUUhhSSSdaGGhZZZZhhhhHHHOQhhKKKLUUhhe3WWYHHUhhhhhZZhhKJ'bEEbCC^gZKZdhhMMM,,,,^fVVAIV]]=<=hhhNNhXXX at hhhEE]_OOOC8988VhHhXEEE_ffQQgeZZHFHUUTThOO222222_aafdhWWW^^hhRHHHh++++hFFF[hUU??BBhcaabhOOMMLNNNNRggXTTUdeh^hbcQTOOffhLLh55bXUXbII%%Whh]]hXUP\hg99hee..cgghhh111\hhhhggG99@,,\_ddKKQPYYhhhhh=67bbgHHahCCCC>??g111hhh\\\88888DFFEQQWW??Xf]EE888[$$IbecceJJfT`hXJR>>WWWYh^gOMRE>>>?hfb>>>>>hVV&&&eehhg^^^hQOTKhUT[LhhhhKZZKKK--SR&&c=111hdEdWWhcdDEdO9+ [...]
+ at m121205_055009_42163_c100416332550000001523041801151327_s1_p0/25/ccs
+AGAGTTTGATCCTGGCTCAGGACGAACGCTGGCGGTATGCTTAACACATGCAAGTCGAACGAGACGAGATGGAATGACCCTTCGGGGAATGAAATCTTAGAAAGTGGCGAACGGGTGAGTAACGCGTGGGTAACCTGCCTATGGAAAGGAATAGCCTCGGGAAACTGGGAGTAATGCCTTATAATACAGTGAAGTCGCATGGCTTTGCTGTTAAACGCTCCGGTGCCATAGGATGGACCCGCGTCCCATTAGCTAGTTGGTGAGATAACAGCCCACCAAGGCGACGATGGGTAACCGGTCTGAGAGGGCGAACGGTCACACTGGAACTGAGACACGGTCCAGACTCCTACGGAGGCAGCAGTGGGGAATATTGCGCAATGGGCAACCCTGACGCAGCAATACCGCGTGAGTGAAGAGGTTTTCGGATCGTAAAGCTCTGTTATTGGGGAAGAAAAAAGACGGTACCCAAGAAGAAAGTCCCGGCTAACTACG [...]
++m121205_055009_42163_c100416332550000001523041801151327_s1_p0/25/ccs
+heehhhhhhhhhhffhhhhhhhhhhhhhhhQQhgghhhhhhhTThh`hhhhhhhhhhhh_hhhhhhhhhhddhhhhhhhhhhh66668hhhVVVhhhhhhVVVhh\\hhhhh===hhhhhhhhhhhhhbfhhhhhhh333hhhhhhhddhhhhhggghhhhhhhhhZZZhhhhhhh;;ffhhhhhhhhhhh+$%%hhhhhffh]]]]hhhhhhhhhZZggghhhh__ghhgghhhhhdddhZZh999hhhh^^hhh__fghhhhhhhhhhhKKKd00cc==hhhhhhhbbbhhheehehhhhhhhHHHehhhhhhhhhfhhhhUhhhhhhhhhhe??hbbchhhhhhhhh333^^ffhhhhh////gghh44hhhhhhh....ggVVUhhhhhhhYMNchhhbedhhhhhhh==a'&0CCCChhhhhehh]]]]hhhhhggghhFFFFhh^HHHHHHhhMMghhMMMNNhddhDDDhgAAAQQ``hhhhhhh [...]
+
diff --git a/test/fastq-loader/input/7.2.fastq b/test/fastq-loader/input/7.2.fastq
new file mode 100644
index 0000000..6f07408
--- /dev/null
+++ b/test/fastq-loader/input/7.2.fastq
@@ -0,0 +1,8 @@
+ at m101111_134728_richard_c000027022550000000115022502211150_s1_p0/1
+ATCCACCCCTCCCACCCACCCCCCCCCCCCTACCCCCCCTCCCCCACACACCCTCCCCCACACCCCTGTCCCCCCCACCGCCGCCCTCCCGACGCCCACACAAAAAAACCCATCCCACACACCCCCCACCCCCCATCACAACACGCCACCCACCCCCCAGCACACCACCACCCCACAAACCAGCCCCCCCACCCCCCCACCCCACCCCCCACAACAC
++
+'!%!%#!!!!!!%"!!!$"!!!!!!!!!!#""!!!!$!!!#!!!!!!!!!!!!!!$#!"!!!!!!!!!!$'!!!#"!!!!!&!!"$!!!$!!!!!%!!&!!!!!!!!$!!&!%!"!!!!!!&!!$!!#!!!!$!!!!!&!!!!&!!"!!#)!"!!%!!!!!"%!!!"!"!"!!&!)!!#!!!!"$!!!!&!!%!!"!'!!!!$"!!"$!!!!!!!!"
+ at m101111_134728_richard_c000027022550000000115022502211150_s1_p0/2
+CCACACCCCCACCCAACCCCACGGCCCCCAACCACCACCACCAAAACACCCCGCGCCCCACCCCCACACCCCACACGCCACCCGCCACCCGCCACAACGCCCCGACGCGAAACCCACCCCGCGCCCACCAACCCACCACCCCGACACCCACCCCCCGCACCACCCCCCCCGCGCACCGCCCACCCCACAAACGACGCCAACTCCAACCCCCCCCCCGCCACCCAGCCGCCCCCCCCACCAGCCCCCCACCCCGCCCGAGCCCGACGGCCACGCGCCCGCACCCCAGCCGCCCCCAGCCCCCCCCCCCCCCACACAAAAACCAACCCAAAACAAAAACAAACCAAAACAACAAACGCCACCAAAAACAAAAACACCAAAAAAAACACCAACCAAAACAAACAACAACCACTCCACCCCCGCCCCCAACCCCGACCCCCAACAAAACGCACACCACAAAACGCCACCCCGACACACCACGCGCAGCCCCACACA [...]
++
+#!!$!"!!!!!""#!%!#!!!!!$!!!!&!!!$!%$!!!#!!!!!!!"&%$!!!#"!!!!!!%#!"!!!!!!!!!!!!!!!!!!!!!!!&!!'!!!"!!#!!""##!!"!!!!!!#!!!#%!#!!$$#!$$!!!"#"!!$!!!!!!!!#!!!!!$&!!&!$"!!!(!!!!"!!!!!!!!!!"#!!(&!!!!&!'$!!!!$%!!!!!!!!!!!!!!!!!!!!!!!'!!!!!!!!"!!!!#&!!!!!!!!!!!!!!&!#!!!!!!!!!!!"!!!"!$!!#!"!'%!#(!!%!#"!$!'!!!!!"!$""#!!!!"!!!%!!!!!%%!#!!!!$#!!!$!!!"!!!!!!$!!$!!!#"!!!!!!!"!!!!!!!!!!!!!!!!!!!!!#!!!"!!!$!!#"'!"!"'%!!!!!!!#!&!"!!!!!)!!!!!"**!!#!!!!&!!#!!!!"!#!!!!!!!!!!!%%!!!"!!!!(!!!!!!!!!!!!!%!#!!#&'!& [...]
diff --git a/test/fastq-loader/input/7.3.fastq b/test/fastq-loader/input/7.3.fastq
new file mode 100644
index 0000000..2b47bed
--- /dev/null
+++ b/test/fastq-loader/input/7.3.fastq
@@ -0,0 +1,8 @@
+ at m101210_094054_00126_c000028442550000000115022402181134_s1_p0/2 ccs
+GGTAGAGGTCTTCGTCGCTGTCTCCGCTTCAGTCGCCGCCCTCGCCTCTTGCTGTGCGCGCTTCAGCAAGCCGAGTCCTGCGTCGAGAGATCTCCTCTGGTTCTCTTTCGCTTCCGGTCCTGTTCGGGCGCCACTGCTAGAGATTTCTACACTAACTAAGATGGTCTGAGGGATCTCTAGCTACCAGAGTCACACAACAGACGCTACC
++m101210_094054_00126_c000028442550000000115022402181134_s1_p0/2 ccs
+5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555
+ at m101210_094054_00126_c000028442550000000115022402181134_s1_p0/3 ccs
+GGGACCTCGCGCCGCGACGGAGGAGCCGTCTCTTGAAGAGAGCGCGCGAGAGAGGCGGGACAGGCGAGGGGCCGGCGCGTGACGCGGACGAGTCGCGCGAAGCTCCTCTCATGTACGACGTCAGCAGCGCAGAGCTCCTAGTGCGTCGCACAGAGCACATAGCCTCTCGCTAACCATCCCGACACACACAACGGAGGAGCGGAGAAGATCAGAAGACAGAGAATGGAGAGGGGACGCGAGGCGGCGCTGACAGGAACTGGCTGAGTCGCCGCTGTGCTGATGCGCGCGCGCCGCAGTGGCGCGCGCGCGCTGTTCGCGTGCAGAGGCGAGGCGCGCCGGGCCCGCGTCGTAGCTCTGGCCGACCGCTCTTAGCAGAAGCGAGTCGGCGTCAGAGATCCCATCTCCATTCTCGTCCGCCCAACGTCTAGTCCAACAACGCCAACGGCAGGAGGATGAAACAGAACGCATGAAATGATCGCGTGATGCGGACGA [...]
++m101210_094054_00126_c000028442550000000115022402181134_s1_p0/3 ccs
+555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555 [...]
diff --git a/test/fastq-loader/input/8.0.fastq b/test/fastq-loader/input/8.0.fastq
new file mode 100644
index 0000000..2e3c64e
--- /dev/null
+++ b/test/fastq-loader/input/8.0.fastq
@@ -0,0 +1,9 @@
+ at HWI-EAS6_4_FC2010T:1:1:80:366/1
+AACTGATCAACCTGCGGATCGAACGCAAGCGCA
++HWI-EAS6_4_FC2010T:1:1:80:366
+EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
+ at HWI-EAS6_4_FC2010T:1:1:80:366/3
+ACAGGCTCATGCTGCTACCCTCGGGGCGAGGCC
++HWI-EAS6_4_FC2010T:1:1:212:230
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+
diff --git a/test/fastq-loader/input/8.1.fastq b/test/fastq-loader/input/8.1.fastq
new file mode 100644
index 0000000..92c872b
--- /dev/null
+++ b/test/fastq-loader/input/8.1.fastq
@@ -0,0 +1,17 @@
+ at HWI-EAS6_4_FC2010T:1:1:80:366/1
+AACTGATCAACCTGCGGATCGAACGCAAGCGCA
++HWI-EAS6_4_FC2010T:1:1:80:366
+EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
+ at HWI-EAS6_4_FC2010T:1:1:80:366/3
+ACAGGCTCATGCTGCTACCCTCGGGGCGAGGCC
++HWI-EAS6_4_FC2010T:1:1:212:230
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ at HWI-EAS6_5_FC2010T:1:1:80:366/1
+AACTGATCAACCTGCGGATCGAACGCAAGCGCA
++HWI-EAS6_5_FC2010T:1:1:80:366
+EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
+ at HWI-EAS6_5_FC2010T:1:1:80:366/2
+ACAGGCTCATGCTGCTACCCTCGGGGCGAGGCC
++HWI-EAS6_5_FC2010T:1:1:212:230
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+
diff --git a/test/fastq-loader/input/9.0.fastq b/test/fastq-loader/input/9.0.fastq
new file mode 100644
index 0000000..5e3ded4
--- /dev/null
+++ b/test/fastq-loader/input/9.0.fastq
@@ -0,0 +1,16 @@
+ at DG7PMJN1:293:D12THACXX:2:1101:1161:1968_1:N:0:GATCAG
+CTAACTTTTATGATATTTTGGTGGTAATTTGGTATGGTTAGATTTGTTTGAAAGCCAAATTAGAGTTCTACTTAGATGTCCCCATCATGGAACAGGGAATA
++
+??<D;DDDFAC8,C:CFGIBG+CC)3<CFH>C1*:EFDBC?*1BGF0BF@*9DC>B)??CCBC:D784@=FEE at EA:)7))=?9?7@@BC:>;;3=@BBBB
+ at DG7PMJN1:293:D12THACXX:2:1101:1275:1946_1:N:0:GATCAG
+GTACATGTATAGCATGTATTAATACATCTACAGTATTGATATGAGAAATAAACAAAAGTATGATGTGAAGTCCCTAGTAAGAAATATTAGTTCCTGTCCTG
++
+BB at DFFFFGHGHHIIHFHIIIJJJJJJJIGIJJHHIJJFEIHIFIFCDEGHIIJIJIJFGIIFIHGIIJJGIIJJIIGJIIIGGEHIJHHHFHGHFFFFFF
+ at DG7PMJN1:293:D12THACXX:2:1101:1161:1968_2:N:0:GATCAG
+CTGCTGCTCATGTGTCTTTCTGACAAGAACAGACTAGCAGAACTCATCTGGGAAGTAAGAGTATAGTTTATTAGAAATGATAAGTTGCGCTTAACTGGCTG
++
+ at B@F?DAEHH4C<AC:EEH>CIFHIGGG>EGGHCFEGGGGCEGHIJJGGGGEBGIHG>?FHB<E<C at EGGGEGIF>HAGGEFCHH?E3593>@ACCDCBC?
+ at DG7PMJN1:293:D12THACXX:2:1101:1275:1946_2:N:0:GATCAG
+GTAAATTAATTTGTCATAATAAATAGAAGTCAGAAATCCTTACTTCAATCCACAATGCTCTCTCCTCCCTAACTTTCTATGTGGGATAGGTACTTACAATT
++
+ at BCFFFFFHHHHHHIGGIIJJIIJJIJIJHGIHIIIJGGHIGHIIJJIJGIIJJJJJJJJJJIJGIJJIJIHJJJJJJIJIEHGHCEFDFFFEEFEEEDDD
diff --git a/test/fastq-loader/runtestcase.sh b/test/fastq-loader/runtestcase.sh
new file mode 100755
index 0000000..d5e4a98
--- /dev/null
+++ b/test/fastq-loader/runtestcase.sh
@@ -0,0 +1,106 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+#echo "$0 $*"
+
+# $1 - path to vdb tools (fastq-load.3, vdb-dump)
+# $2 - work directory (expected results under expected/, actual results and temporaries created under actual/)
+# $3 - test case ID
+# $3 - expected result code from fastq-load.3
+# $4, $5, ... - command line options for fastq-load.3 
+#
+# return codes:
+# 0 - passed
+# 1 - coud not create temp dir
+# 2 - unexpected return code from fastq-load.3 
+# 3 - vdb-dump failed on the output of fastq-load.3
+# 4 - outputs differ
+
+BINDIR=$1
+WORKDIR=$2
+CASEID=$3
+RC=$4
+shift 4
+CMDLINE=$*
+
+DUMP="$BINDIR/vdb-dump"
+LOAD="$BINDIR/latf-load"
+TEMPDIR=$WORKDIR/actual/$CASEID
+
+echo "running $CASEID"
+
+mkdir -p $TEMPDIR
+rm -rf $TEMPDIR/*
+if [ "$?" != "0" ] ; then
+    exit 1
+fi
+export LD_LIBRARY_PATH=$BINDIR/../lib; 
+
+#CMD="$LOAD $CMDLINE -o $TEMPDIR/obj --no-user-settings 1>$TEMPDIR/load.stdout 2>$TEMPDIR/load.stderr"
+CMD="$LOAD $CMDLINE -o $TEMPDIR/obj 1>$TEMPDIR/load.stdout 2>$TEMPDIR/load.stderr"
+#    echo $CMD
+eval $CMD
+rc="$?"
+if [ "$rc" != "$RC" ] ; then
+    echo "$LOAD returned $rc, expected $RC"
+    echo "command executed:"
+    echo $CMD
+    cat $TEMPDIR/load.stderr
+    exit 2
+fi
+
+if [ "$rc" == "0" ] ; then
+    CMD="$DUMP $TEMPDIR/obj 1>$TEMPDIR/dump.stdout 2>$TEMPDIR/dump.stderr"
+    eval $CMD
+    rc="$?"
+    if [ "$rc" != "0" ] ; then
+        echo "command executed:"
+        echo $CMD
+        cat $TEMPDIR/dump.stderr
+        exit 3
+    fi
+    diff $WORKDIR/expected/$CASEID.stdout $TEMPDIR/dump.stdout >$TEMPDIR/diff
+    rc="$?"
+else # load failed as expected
+    # remove timestamps
+    sed -i -e 's/^....-..-..T..:..:.. //g' $TEMPDIR/load.stderr
+    # remove pathnames
+    sed -i -e 's=/.*/==g' $TEMPDIR/load.stderr
+    # remove source locations
+    sed -i -e 's=: .*:[0-9]*:[^ ]*:=:=g' $TEMPDIR/load.stderr
+    # remove version number
+    sed -i -e 's=latf-load\(\.[0-9]*\)*=latf-load=g' $TEMPDIR/load.stderr
+    diff $WORKDIR/expected/$CASEID.stderr $TEMPDIR/load.stderr >$TEMPDIR/diff
+    rc="$?"
+fi
+if [ "$rc" != "0" ] ; then
+    cat $TEMPDIR/diff
+    echo "command executed:"
+    echo $CMD
+    exit 4
+fi    
+
+#rm -rf $TEMPDIR
+
+exit 0
diff --git a/test/fastq-loader/test-fastq-loader.cpp b/test/fastq-loader/test-fastq-loader.cpp
new file mode 100644
index 0000000..4ad4534
--- /dev/null
+++ b/test/fastq-loader/test-fastq-loader.cpp
@@ -0,0 +1,215 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+/**
+* Long-running tests for ReaderFile-related interfaces
+*/
+
+#include <cstring>
+#include <ctime>
+
+#include <ktst/unit_test.hpp>
+
+#include <klib/out.h>
+
+#include <kapp/args.h>
+
+#include <kfs/directory.h>
+#include <kfs/impl.h>
+
+#include <vdb/manager.h>
+#include <vdb/database.h>
+#include <vdb/schema.h>
+
+extern "C" {
+#include <loader/common-reader.h>
+#include <loader/common-writer.h>
+#include <loader/sequence-writer.h>
+#include <loader/alignment-writer.h>
+#include "../../tools/fastq-loader/fastq-reader.h"
+#include "../../tools/fastq-loader/fastq-parse.h"
+}
+
+using namespace std;
+using namespace ncbi::NK;
+
+TEST_SUITE(LoaderFastqTestSuite);
+
+///////////////////////////////////////////////// tests for loading FASTQ files
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+class TempFileFixture
+{
+public:
+    static const string TempDir;
+    static const string SchemaPath;
+    static const string DbType;
+
+public:
+    TempFileFixture() 
+    :   wd(0), rf(0)
+    {
+        if ( KDirectoryNativeDir ( & wd ) != 0 )
+            FAIL("KDirectoryNativeDir failed");
+            
+        if ( VDBManagerMakeUpdate ( & mgr, wd ) != 0)
+            FAIL("VDBManagerMakeUpdate failed");
+            
+        if ( VDBManagerMakeSchema ( mgr, & schema ) != 0 )
+            FAIL("VDBManagerMakeSchema failed");
+        if ( VSchemaParseFile( schema, SchemaPath.c_str() ) != 0 )
+            FAIL("VSchemaParseFile failed");
+        
+        if ( KDirectoryCreateDir_v1 ( wd, 0775, kcmOpen | kcmInit | kcmCreate, TempDir.c_str() ) != 0 )        
+            FAIL("KDirectoryOpenDirUpdate_v1 failed");
+    }
+    ~TempFileFixture() 
+    {
+        if ( rf != 0 && ReaderFileRelease( rf ) != 0)
+            FAIL("ReaderFileRelease failed");
+     
+        if ( schema && VSchemaRelease(schema) != 0 )
+            FAIL("VSchemaRelease failed");            
+        if ( db && VDatabaseRelease(db) != 0 )
+            FAIL("VDatabaseRelease failed");
+        if ( mgr && VDBManagerRelease(mgr) != 0 )
+            FAIL("VDBManagerRelease failed");
+            
+        if ( wd && ! filename.empty() && KDirectoryRemove(wd, true, filename.c_str()) != 0 )
+            FAIL("KDirectoryRemove on input failed");
+
+        if ( wd && ! dbName.empty() )
+        {   // sometimes it takes several attempts to remove a non-empty dir
+            while (KDirectoryRemove(wd, true, dbName.c_str()) != 0);
+        }
+        if ( wd )
+        {   // sometimes it takes several attempts to remove a non-empty dir
+            while (KDirectoryRemove(wd, true, TempDir.c_str()) != 0);
+        }
+             
+        if ( wd && KDirectoryRelease ( wd ) != 0 )
+            FAIL("KDirectoryRelease failed");
+    }
+    rc_t CreateFile(const char* p_filename, const char* contents)
+    {   // create and open for read
+        KFile* file;
+        filename=p_filename;
+        rc_t rc=KDirectoryCreateFile(wd, &file, true, 0664, kcmInit, p_filename);
+        if (rc == 0)
+        {
+            size_t num_writ=0;
+            rc=KFileWrite(file, 0, contents, strlen(contents), &num_writ);
+            if (rc == 0)
+            {
+                rc=KFileRelease(file);
+            }
+            else
+            {
+                KFileRelease(file);
+            }
+            file=0;
+        }
+        return FastqReaderFileMake(&rf, wd, p_filename, FASTQphred33, 0, false);
+    }
+
+    KDirectory* wd;
+    string filename;
+    const ReaderFile* rf;
+    VDBManager* mgr;
+    VSchema *schema;
+    VDatabase* db;
+    string dbName;
+};
+const string TempFileFixture::TempDir = "./tmp";
+const string TempFileFixture::SchemaPath = "align/align.vschema";
+const string TempFileFixture::DbType = "NCBI:align:db:alignment_unsorted";
+
+///////////////////////////////////////////////// FASTQ-based tests for CommonWriter 
+FIXTURE_TEST_CASE(CommonWriterOneFile, TempFileFixture)
+{   // source: SRR006565
+    CreateFile(GetName(), 
+                "@G15-D_3_1_903_603_0.81\n"
+                "GATTGTAGGGAGTAGGGTACAATACAGTCTGGTCTC\n"
+                "+G15-D_3_1_903_603_0.81\n"
+                "IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII\n");
+
+    dbName = string(GetName())+".db";
+    KDirectoryRemove(wd, true, dbName.c_str());
+    REQUIRE_RC(VDBManagerCreateDB(mgr, &db, schema, DbType.c_str(), kcmInit + kcmMD5, dbName.c_str()));
+
+    CommonWriterSettings settings;
+    memset(&settings, 0, sizeof(settings));
+    settings.numfiles = 1;
+    settings.tmpfs = TempDir.c_str();
+    
+    CommonWriter cw;
+    REQUIRE_RC(CommonWriterInit( &cw, mgr, db, &settings ));
+     
+    REQUIRE_RC(CommonWriterArchive( &cw, rf ));
+    REQUIRE_RC(CommonWriterComplete( &cw, false, 0 ));
+
+    REQUIRE_RC(CommonWriterWhack( &cw ));
+    
+    //TODO: open and validate database 
+}
+
+//////////////////////////////////////////// Main
+#include <kapp/args.h>
+#include <kfg/config.h>
+
+extern "C"
+{
+
+ver_t CC KAppVersion ( void )
+{
+    return 0x1000000;
+}
+
+const char UsageDefaultName[] = "test-fastq-loader";
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg ( "Usage:\n" "\t%s [options] -o path\n\n", progname );
+}
+
+rc_t CC Usage( const Args* args )
+{
+    return 0;
+}
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+	// need to use user settings in order to get to the current schema
+    //KConfigDisableUserSettings();
+	
+    rc_t rc = LoaderFastqTestSuite(argc, argv);
+    return rc;
+}
+
+}
+
diff --git a/test/fastq-loader/wb-test-fastq.cpp b/test/fastq-loader/wb-test-fastq.cpp
new file mode 100644
index 0000000..339ebc6
--- /dev/null
+++ b/test/fastq-loader/wb-test-fastq.cpp
@@ -0,0 +1,1384 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+/**
+* Unit tests for FASTQ loader
+*/
+#include <ktst/unit_test.hpp> 
+#include <klib/rc.h>
+#include <loader/common-writer.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+#include "../../tools/fastq-loader/fastq-parse.h"
+#include "../../tools/fastq-loader/fastq-tokens.h"
+#include "../../tools/fastq-loader/fastq-reader.h"
+
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <cstring>
+#include <stdexcept> 
+#include <list>
+
+using namespace std;
+
+TEST_SUITE(FastqLoaderWbTestSuite);
+
+//////////////////////////////////////////// tests for flex-generated scanner
+
+
+// test fixture for scanner tests
+class FastqScanFixture
+{
+public:
+    FastqScanFixture() 
+    {
+        pb.self = this;
+        pb.input = Input;
+        consumed = 0;
+    }
+    ~FastqScanFixture() 
+    {
+        FASTQScan_yylex_destroy(&pb);
+        if (pb.record != 0)
+        {
+            KDataBufferWhack( & pb.record->source );
+            free(pb.record);
+        }
+    }
+    void InitScan(const char* p_input, bool trace=false)
+    {
+        input = p_input;
+        FASTQScan_yylex_init(&pb, trace);
+        pb.record = (FastqRecord*)calloc(sizeof(FastqRecord), 1);
+        KDataBufferMakeBytes ( & pb.record->source, 0 );
+        FASTQ_ParseBlockInit ( &pb );
+    }
+    int Scan()
+    {
+        int tokenId=FASTQ_lex(&sym, pb.scanner);
+        if (tokenId != 0)
+        {
+            tokenText=string(TokenTextPtr(&pb, &sym), sym.tokenLength);
+        }
+        else
+        {
+            tokenText.clear();
+        }
+        
+        return tokenId;
+    }
+    static size_t CC Input(FASTQParseBlock* sb, char* buf, size_t max_size)
+    {
+        FastqScanFixture* self = (FastqScanFixture*)sb->self;
+        if (self->input.size() < self->consumed)
+            return 0;
+
+        size_t to_copy = min(self->input.size() - self->consumed, max_size);
+        if (to_copy == 0)
+            return 0;
+
+        memcpy(buf, self->input.c_str(), to_copy);
+        if (to_copy < max_size && buf[to_copy-1] != '\n')
+        {
+            buf[to_copy] = '\n';
+            ++to_copy;
+        }
+        self->consumed += to_copy;
+        return to_copy;
+    }
+
+    string input;
+    size_t consumed;
+    FASTQParseBlock pb;
+    FASTQToken sym;
+    string tokenText;
+};
+
+FIXTURE_TEST_CASE(EmptyInput, FastqScanFixture)
+{   
+    InitScan("");
+    REQUIRE_EQUAL(Scan(), 0);
+}
+#define REQUIRE_TOKEN(tok)              REQUIRE_EQUAL((int)tok, Scan());
+#define REQUIRE_TOKEN_TEXT(tok, text)   REQUIRE_TOKEN(tok); REQUIRE_EQ(tokenText, string(text));
+
+#define REQUIRE_TOKEN_COORD(tok, text, line, col)  \
+    REQUIRE_TOKEN_TEXT(tok, text); \
+    REQUIRE_EQ(pb.lastToken->line_no, (size_t)line); \
+    REQUIRE_EQ(pb.lastToken->column_no, (size_t)col);
+
+FIXTURE_TEST_CASE(TagLine1, FastqScanFixture)
+{   
+    InitScan("@HWUSI-EAS499_1:1:3:9:1822\n");
+    REQUIRE_TOKEN('@');
+    REQUIRE_TOKEN_COORD(fqALPHANUM, "HWUSI-EAS499", 1, 2);
+    REQUIRE_TOKEN('_');
+    REQUIRE_TOKEN_TEXT(fqNUMBER, "1");
+    REQUIRE_TOKEN_TEXT(fqCOORDS, ":1:3:9:1822");
+    REQUIRE_TOKEN(fqENDLINE); 
+    REQUIRE_TOKEN(0); 
+}
+
+FIXTURE_TEST_CASE(SequenceQuality, FastqScanFixture)
+{   
+    InitScan("@8\n" "GATC\n" "+8:1:46:673\n" "!**'\n");
+    REQUIRE_TOKEN('@');
+    REQUIRE_TOKEN_TEXT(fqNUMBER, "8"); 
+    REQUIRE_TOKEN(fqENDLINE); 
+    REQUIRE_TOKEN_COORD(fqBASESEQ, "GATC", 2, 1); 
+    REQUIRE_TOKEN(fqENDLINE); 
+    REQUIRE_TOKEN('+'); 
+    REQUIRE_TOKEN_TEXT(fqTOKEN,  "8:1:46:673"); 
+    REQUIRE_TOKEN(fqENDLINE); 
+    REQUIRE_TOKEN_TEXT(fqASCQUAL, "!**'"); 
+    REQUIRE_TOKEN(fqENDLINE); 
+}
+
+FIXTURE_TEST_CASE(QualityOnly, FastqScanFixture)
+{   
+    InitScan(">8\n" "\x7F!**'\n");
+    REQUIRE_TOKEN('>'); 
+    REQUIRE_TOKEN_TEXT(fqNUMBER, "8"); 
+    REQUIRE_TOKEN(fqENDLINE); 
+    REQUIRE_TOKEN_TEXT(fqASCQUAL, "\x7F!**'"); 
+    REQUIRE_TOKEN(fqENDLINE); 
+    REQUIRE_TOKEN(0); 
+}
+
+FIXTURE_TEST_CASE(NoEOL_InQuality, FastqScanFixture)
+{   
+    InitScan("@8\n" "GATC\n" "+\n" "!**'");
+    REQUIRE_TOKEN('@');
+    REQUIRE_TOKEN_TEXT(fqNUMBER, "8"); 
+    REQUIRE_TOKEN(fqENDLINE); 
+    REQUIRE_TOKEN_TEXT(fqBASESEQ, "GATC"); 
+    REQUIRE_TOKEN(fqENDLINE); 
+    REQUIRE_TOKEN('+'); 
+    REQUIRE_TOKEN(fqENDLINE); 
+
+    REQUIRE_TOKEN_TEXT(fqASCQUAL, "!**'"); 
+    REQUIRE_TOKEN(fqENDLINE); /* this is auto-inserted by FastqScanFixture::Input() */ 
+    REQUIRE_TOKEN(0); 
+}
+
+FIXTURE_TEST_CASE(CRnoLF, FastqScanFixture)
+{   
+    InitScan("@8\r", 0);
+    REQUIRE_TOKEN('@');
+    REQUIRE_TOKEN_TEXT(fqNUMBER, "8"); 
+    REQUIRE_TOKEN(fqENDLINE); 
+}
+
+FIXTURE_TEST_CASE(CommaSeparatedQuality3, FastqScanFixture)
+{   
+    InitScan("@8\n" "GATC\n" "+\n" "0047044004,046,,4000,04444000,--,6-\n");
+    REQUIRE_TOKEN('@');
+    REQUIRE_TOKEN_TEXT(fqNUMBER, "8"); 
+    REQUIRE_TOKEN(fqENDLINE); 
+    REQUIRE_TOKEN_TEXT(fqBASESEQ, "GATC"); 
+    REQUIRE_TOKEN(fqENDLINE); 
+    REQUIRE_TOKEN('+'); 
+    REQUIRE_TOKEN(fqENDLINE); 
+
+    REQUIRE_TOKEN_TEXT(fqASCQUAL, "0047044004,046,,4000,04444000,--,6-"); 
+    REQUIRE_EQUAL(Scan(), (int)fqENDLINE);
+    REQUIRE_EQUAL(Scan(), 0);
+}
+
+FIXTURE_TEST_CASE(WsBeforeEol, FastqScanFixture)
+{   
+    InitScan("@ \n");
+    REQUIRE_TOKEN('@');
+    REQUIRE_TOKEN(fqENDLINE); 
+    REQUIRE_EQUAL(Scan(), 0);
+}
+
+FIXTURE_TEST_CASE(SkipToEol, FastqScanFixture)
+{   
+    InitScan("@ kjalkjaldkj \nGATC\n");
+    REQUIRE_TOKEN('@');
+    FASTQScan_skip_to_eol(&pb);
+    REQUIRE_TOKEN(fqENDLINE); 
+    REQUIRE_TOKEN_TEXT(fqBASESEQ, "GATC"); // back to normal
+    REQUIRE_TOKEN(fqENDLINE); 
+    REQUIRE_EQUAL(Scan(), 0);
+}
+
+FIXTURE_TEST_CASE(InlineBaseSequence, FastqScanFixture)
+{   
+    InitScan("@:GATC.NNNN\n");
+    REQUIRE_TOKEN('@');
+    REQUIRE_TOKEN(':');
+    FASTQScan_inline_sequence(&pb);
+    REQUIRE_TOKEN_TEXT(fqBASESEQ, "GATC.NNNN");
+    REQUIRE_TOKEN(fqENDLINE); 
+    REQUIRE_EQUAL(Scan(), 0);
+}
+
+///////////////////////////////////////////////// Fastq Parser test fixture
+class ParserFixture
+{
+public:
+    ParserFixture()
+    {
+        pb.record = 0;
+    }
+    ~ParserFixture()
+    {
+        FASTQScan_yylex_destroy(&pb);
+        if (pb.record != 0)
+        {
+            KDataBufferWhack( & pb.record->source );
+            free(pb.record);
+        }    
+    }
+    
+    bool Parse(bool traceLex = false)
+    {
+        pb.self = this;
+        pb.input = Input;    
+        pb.qualityFormat = FASTQphred33;
+        pb.defaultReadNumber = 9;
+        pb.secondaryReadNumber = 0;
+        pb.ignoreSpotGroups = false;
+        
+        if (FASTQScan_yylex_init(& pb, traceLex) != 0)
+            FAIL("ParserFixture::ParserFixture: FASTQScan_yylex_init failed");
+    
+        pb.record = (FastqRecord*)calloc(1, sizeof(FastqRecord));
+        if (pb.record == 0)
+            FAIL("ParserFixture::ParserFixture: malloc failed");
+        KDataBufferMakeBytes ( & pb.record->source, 0 );
+            
+        //FASTQ_debug = 1;
+        FASTQ_ParseBlockInit ( &pb );
+        return FASTQ_parse( &pb ) == 1 && pb.record->rej == 0;
+    }
+    
+    void AddBuffer(const string& p_text)
+    {
+        buffers.push_back(p_text);
+    }
+    
+    static size_t CC Input(struct FASTQParseBlock* sb, char* buf, size_t max_size)
+    {
+        ParserFixture* self = (ParserFixture*)sb->self;
+        if (self->buffers.empty())
+            return 0;
+        
+        string s = self->buffers.front();
+        self->buffers.pop_front();
+        memcpy(buf, s.c_str(), s.size()); // ignore max_size for our short test lines
+        return s.size();
+    }
+    
+    list<string> buffers;
+    FASTQParseBlock pb;
+};
+
+FIXTURE_TEST_CASE(BufferBreakInTag, ParserFixture)
+{   
+    AddBuffer("@HWI-ST226:170:AB075UABXX:3:1101:10089:7031 ");
+    AddBuffer("1:N:0:GCCAAT\n"
+              "TACA\n"
+              "+\n"
+              "GEGE\n");
+    REQUIRE(Parse());
+    REQUIRE_EQ(1, (int)pb.record->seq.readnumber);
+}
+
+///////////////////////////////////////////////// FastqReader test fixture
+
+class LoaderFixture
+{
+public:
+    LoaderFixture() 
+    :   wd(0), rf(0), 
+        record(0), seq(0), reject(0), 
+        read(0), readLength(0), 
+        name(0), length(0), 
+        errorText(0), errorLine(0), column(0), 
+        quality(0), qualityAsciiOffset(0), qualityType(-1),
+        qualityFormat(FASTQphred33), defaultReadNumber(0), 
+        ignoreSpotGroups(false)
+    {
+        if ( KDirectoryNativeDir ( & wd ) != 0 )
+            FAIL("KDirectoryNativeDir failed");
+    }
+    ~LoaderFixture() 
+    {
+        delete [] read;
+
+        if (seq != 0 && SequenceRelease(seq) != 0)
+            FAIL("SequenceRelease failed");
+
+        if (record != 0 && RecordRelease(record) != 0)
+            FAIL("RecordRelease failed");
+
+        if (reject != 0 && RejectedRelease(reject) != 0)
+            FAIL("RejectedRelease failed");
+
+        if ( rf != 0 && ReaderFileRelease( rf ) != 0)
+            FAIL("ReaderFileRelease failed");
+
+        if ( !filename.empty() && KDirectoryRemove(wd, true, filename.c_str()) != 0)
+            FAIL("KDirectoryRemove failed");
+
+        if ( KDirectoryRelease ( wd ) != 0 )
+            FAIL("KDirectoryRelease failed");
+
+        FASTQ_debug = 0;
+    }
+    rc_t CreateFile(const char* p_filename, const char* contents)
+    {   // create and open for read
+        KFile* file;
+        filename=p_filename;
+        rc_t rc=KDirectoryCreateFile(wd, &file, true, 0664, kcmInit, p_filename);
+        if (rc == 0)
+        {
+            size_t num_writ=0;
+            rc=KFileWrite(file, 0, contents, strlen(contents), &num_writ);
+            if (rc == 0)
+            {
+                rc=KFileRelease(file);
+            }
+            else
+            {
+                KFileRelease(file);
+            }
+            file=0;
+        }
+        return FastqReaderFileMake(&rf, wd, p_filename, qualityFormat, defaultReadNumber, ignoreSpotGroups);
+    }
+    void CreateFileGetRecord(const char* fileName, const char* contents)
+    {
+        if (record != 0 && RecordRelease(record) != 0)
+            throw logic_error("CreateFileGetRecord: RecordRelease failed");
+
+        if (CreateFile(fileName, contents) != 0)
+            throw logic_error("CreateFileGetRecord: CreateFile failed");
+
+        if (ReaderFileGetRecord(rf, &record) != 0 || record == 0)
+            throw logic_error("CreateFileGetRecord: ReaderFileGetRecord failed");
+    }
+    bool GetRecord()
+    {
+        if (rf == 0)
+            return false;
+
+        if (record != 0 && RecordRelease(record) != 0)
+            return false;
+        if (reject != 0 && RejectedRelease(reject) != 0)
+            return false;
+        reject = 0;
+        if (seq != 0 && SequenceRelease(seq) != 0)
+            return false;
+        seq = 0;
+
+        return ReaderFileGetRecord(rf, &record) == 0;
+    }
+
+    bool GetRejected()
+    {
+        if (reject != 0 && RejectedRelease(reject) != 0)
+            throw logic_error("GetRejected: RejectedRelease failed");
+        if (record == 0)
+            throw logic_error("GetRejected: record == 0");
+        if (RecordGetRejected(record, &reject) != 0)
+            throw logic_error("GetRejected: RecordGetRejected failed");
+        if (reject == 0)
+            return false;
+        if (RejectedGetError(reject, &errorText, &errorLine, &column, &fatal) != 0)
+            throw logic_error("IsFatal: RejectedGetError failed");
+        return true;
+    }
+    
+    bool CreateFileGetSequence(const char* name, const char* contents)
+    {
+        if (CreateFile(name, contents) != 0)
+            throw logic_error("CreateFileGetSequence: CreateFile failed");
+
+        if (!GetRecord() || record == 0)
+            throw logic_error("CreateFileGetSequence: GetRecord failed");
+
+        if (GetRejected())
+            throw logic_error(string("CreateFileGetSequence: record rejected, ")+string(errorText));
+            
+        if (RecordGetSequence(record, &seq) != 0)
+            throw logic_error("CreateFileGetSequence: RecordGetSequence failed:");
+
+        return seq != 0;
+    }
+
+    bool MakeReadBuffer()
+    {
+        if (SequenceGetReadLength(seq, &readLength) != 0 || readLength == 0)
+            return false;
+
+        delete [] read;
+        read = new char[readLength];
+        return true;
+    }
+
+    void BisonDebugOn()
+    {
+        FASTQ_debug = 1;
+    }
+
+    KDirectory* wd;
+    string filename;
+    const ReaderFile* rf;
+    const Record* record;
+    const Sequence* seq;
+    const Rejected* reject;
+
+    char* read;
+    uint32_t readLength;
+
+    const char* name;
+    size_t length;
+
+    const char* errorText;
+    uint64_t errorLine;
+    uint64_t column;
+    bool fatal;
+    const void* errorData;
+
+    const int8_t* quality;
+    uint8_t qualityAsciiOffset;
+    int qualityType;
+
+    enum FASTQQualityFormat qualityFormat;
+    int8_t defaultReadNumber;
+    bool ignoreSpotGroups;
+};
+
+///////////////////////////////////////////////// FASTQ test cases
+FIXTURE_TEST_CASE(EmptyFile, LoaderFixture)
+{
+    REQUIRE_RC(CreateFile(GetName(), ""));
+    REQUIRE_EQ( string(ReaderFileGetPathname(rf)), string(GetName()) );  
+    REQUIRE(GetRecord());  
+    REQUIRE_NULL(record);
+}
+
+FIXTURE_TEST_CASE(EndLines, LoaderFixture)
+{
+    REQUIRE_RC(CreateFile(GetName(), "\n\n"));
+    REQUIRE_EQ( string(ReaderFileGetPathname(rf)), string(GetName()) );  
+    REQUIRE(GetRecord());  
+    REQUIRE_NULL(record);
+}
+ 
+//////////////////// syntax errors and recovery
+const string SyntaxError("syntax error");
+FIXTURE_TEST_CASE(SyntaxError1, LoaderFixture)
+{
+    string input="qqq abcd";
+
+    CreateFileGetRecord(GetName(), input.c_str());
+
+    REQUIRE(GetRejected());
+    REQUIRE(!fatal);
+    REQUIRE_NOT_NULL(errorText);
+    REQUIRE_EQ(SyntaxError, string (errorText).substr(0, SyntaxError.size()));
+    REQUIRE_EQ(errorLine, (uint64_t)1); 
+    REQUIRE_EQ(column, (uint64_t)4);
+    
+    const void* data;
+    REQUIRE_RC(RejectedGetData(reject, &data, &length));
+    REQUIRE_NOT_NULL(data);
+    REQUIRE_EQ(input, string((const char*)data, length));
+}
+
+FIXTURE_TEST_CASE(SyntaxError2, LoaderFixture)
+{
+    #define input "qqq abcd"
+    CreateFileGetRecord(GetName(), "@SEQ_ID1\n" "GATT\n" "+\n" "!''*\n" input );
+    REQUIRE(GetRecord());
+
+    REQUIRE(GetRejected());
+    REQUIRE(!fatal);
+    REQUIRE_NOT_NULL(errorText);
+    REQUIRE_EQ(SyntaxError, string (errorText).substr(0, SyntaxError.size()));
+    REQUIRE_EQ(errorLine, (uint64_t)5); 
+    REQUIRE_EQ(column, (uint64_t)4);
+
+    const void* data;
+    REQUIRE_RC(RejectedGetData(reject, &data, &length));
+    REQUIRE_EQ(string(input), string((const char*)data, length));
+
+    
+    #undef input
+}
+
+FIXTURE_TEST_CASE(RecoveryFromErrorAtTopLevel, LoaderFixture)
+{
+    CreateFileGetRecord(GetName(), "qqq abcd\n" "@SEQ_ID1\n" "GATT\n" "+\n" "!''*\n");
+    REQUIRE(GetRejected());
+
+    REQUIRE(GetRecord());    
+    REQUIRE_NOT_NULL(record);
+
+    REQUIRE_RC(RecordGetSequence(record, &seq));
+    REQUIRE_NOT_NULL(seq);
+
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("SEQ_ID1"), string(name, length));
+}
+
+FIXTURE_TEST_CASE(RecoveryFromErrorInHeader, LoaderFixture)
+{
+    CreateFileGetRecord(GetName(), "@SEQ_ID1^\n" "GATT\n" "+\n" "!''*\n" "@SEQ_ID2\n" "GATT\n" "+\n" "!''*\n");
+    REQUIRE(GetRejected());
+
+    REQUIRE(GetRecord());    
+    REQUIRE_NOT_NULL(record);
+
+    REQUIRE_RC(RecordGetSequence(record, &seq));
+    REQUIRE_NOT_NULL(seq);
+
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("SEQ_ID2"), string(name, length));
+}
+
+FIXTURE_TEST_CASE(RecoveryFromErrorInRead, LoaderFixture)
+{
+    CreateFileGetRecord(GetName(), "@SEQ_ID1\n" "G^ATT\n" "+\n" "!''*\n" "@SEQ_ID2\n" "GATT\n" "+\n" "!''*\n");
+    REQUIRE(GetRejected());
+
+    REQUIRE(GetRecord());    
+    REQUIRE_NOT_NULL(record);
+
+    REQUIRE_RC(RecordGetSequence(record, &seq));
+    REQUIRE_NOT_NULL(seq);
+
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("SEQ_ID2"), string(name, length));
+}
+
+FIXTURE_TEST_CASE(RecoveryFromErrorInQuality, LoaderFixture)
+{
+    CreateFileGetRecord(GetName(), "@SEQ_ID1\n" "GATT\n" "+\n" "\n" "@SEQ_ID2\n" "GATT\n" "+\n" "!''*\n");
+    REQUIRE(GetRejected());
+
+    REQUIRE(GetRecord());    
+    REQUIRE_NOT_NULL(record);
+
+    REQUIRE_RC(RecordGetSequence(record, &seq));
+    REQUIRE_NOT_NULL(seq);
+
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("SEQ_ID2"), string(name, length));
+}
+
+FIXTURE_TEST_CASE(ErrorLineNumber, LoaderFixture)
+{
+    CreateFileGetRecord(GetName(), 
+        "@HWI-ST959:56:D0AW4ACXX:8:2108:6958:112042 1:Y:0#\n"
+        "ATT\n");
+    REQUIRE(GetRejected());
+    REQUIRE_EQ(SyntaxError, string (errorText).substr(0, SyntaxError.size()));
+    REQUIRE_EQ(errorLine, (uint64_t)1); 
+    REQUIRE_EQ(column, (uint64_t)49);
+}
+
+//////////////////// tag line parsing
+#define TEST_TAGLINE(line)\
+    CreateFileGetRecord(GetName(), line "\n" "GATT\n" "+\n" "!''*\n");\
+    REQUIRE(! GetRejected()); /* no error */ \
+    REQUIRE(GetRecord()); /* parsing done */ \
+    REQUIRE_NULL(record); /* input consumed */
+
+FIXTURE_TEST_CASE(Tag1,   LoaderFixture)  { TEST_TAGLINE("@HWUSI-EAS499:1:3:9:1822"); }
+FIXTURE_TEST_CASE(Tag2_1, LoaderFixture)  { TEST_TAGLINE("@HWUSI-EAS499:1:3:9:1822:.2"); }
+FIXTURE_TEST_CASE(Tag2_2, LoaderFixture)  { TEST_TAGLINE("@HWUSI-EAS499:1:3:9:1822:1.2"); }
+FIXTURE_TEST_CASE(Tag3,   LoaderFixture)  { TEST_TAGLINE("@BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540"); }
+FIXTURE_TEST_CASE(Tag4,   LoaderFixture)  { TEST_TAGLINE("@BILLIEHOLIDAY_1_FC200TYAAXX_3_1_751_675"); }
+FIXTURE_TEST_CASE(Tag5,   LoaderFixture)  { TEST_TAGLINE("@HWUSI-EAS499:1:3:9:1822#0/1"); }
+FIXTURE_TEST_CASE(Tag6,   LoaderFixture)  { TEST_TAGLINE("@1:3:9:1822:33.44"); }
+FIXTURE_TEST_CASE(Tag7,   LoaderFixture)  { TEST_TAGLINE("@1:3:9:1822#1/2"); }
+FIXTURE_TEST_CASE(Tag8,   LoaderFixture)  { TEST_TAGLINE("@HWUSI-EAS499:1:3:9:1822#CAT/1"); }
+FIXTURE_TEST_CASE(Tag9,   LoaderFixture)  { TEST_TAGLINE("@ERBRDQF01EGP9U"); }
+FIXTURE_TEST_CASE(Tag10,  LoaderFixture)  { TEST_TAGLINE("@ID57_120908_30E4FAAXX:3:1:1772:953.1"); }
+FIXTURE_TEST_CASE(Tag11,  LoaderFixture)  { TEST_TAGLINE(">ID57_120908_30E4FAAXX:3:1:1772:953"); }
+FIXTURE_TEST_CASE(Tag12,  LoaderFixture)  { TEST_TAGLINE("@741:6:1:1204:10747"); }
+FIXTURE_TEST_CASE(Tag13,  LoaderFixture)  { TEST_TAGLINE("@741:6:1:1204:10747/1"); }
+FIXTURE_TEST_CASE(Tag14,  LoaderFixture)  { TEST_TAGLINE("@SNPSTER4_246_30GCDAAXX_PE:1:1:3:896/1 run=090102_SNPSTER4_0246_30GCDAAXX_PE"); }
+FIXTURE_TEST_CASE(Tag15,  LoaderFixture)  { TEST_TAGLINE("@G15-D_3_1_903_603_0.81"); }
+
+//////////////////// building Sequence objects
+FIXTURE_TEST_CASE(NotRejected, LoaderFixture)
+{
+    CreateFileGetRecord(GetName(), "@HWUSI-EAS499:1:3:9:1822:1.2\n" "GATT\n" "+\n" "!''*\n");
+    reject = (const Rejected*)1;
+    REQUIRE_RC(RecordGetRejected(record, &reject));
+    REQUIRE_NULL(reject);
+}
+
+FIXTURE_TEST_CASE(SequenceNoAlignment, LoaderFixture)
+{
+    CreateFileGetRecord(GetName(), "@HWUSI-EAS499:1:3:9:1822:1.2\n" "GATT\n" "+\n" "!''*\n");
+
+    const Alignment* align;
+    REQUIRE_RC(RecordGetAlignment(record, &align));
+    REQUIRE_NULL(align);
+
+    REQUIRE_RC(RecordGetSequence(record, &seq));
+    REQUIRE_NOT_NULL(seq);
+}
+
+FIXTURE_TEST_CASE(TestSequenceGetReadLength, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), "@SEQ_ID1\n" "GATT\n" "+\n" "!''*\n" ));
+    REQUIRE_RC(SequenceGetReadLength(seq, &readLength));
+    REQUIRE_EQ(readLength, 4u);
+}
+
+FIXTURE_TEST_CASE(TestSequenceGetRead, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), "@SEQ_ID1\n" "GATT\n" "+\n" "!''*\n" ));
+    REQUIRE(MakeReadBuffer());
+    REQUIRE_RC(SequenceGetRead(seq, read));
+    REQUIRE_EQ(string(read, readLength), string("GATT"));
+}
+
+FIXTURE_TEST_CASE(TestSequenceGetRead2, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), "@SEQ_ID1\n" "GATT\n" "+\n" "!''*\n" ));
+    REQUIRE(MakeReadBuffer());
+
+    // normal
+    REQUIRE_RC(SequenceGetRead2(seq, read, 0, 2));
+    REQUIRE_EQ(string(read, 2), string("GA"));
+
+    // stop out of range
+    REQUIRE_RC_FAIL(SequenceGetRead2(seq, read, 2, 6));
+
+    // start out of range
+    REQUIRE_RC_FAIL(SequenceGetRead2(seq, read, 20, 1));
+}
+
+FIXTURE_TEST_CASE(SequenceGetQuality33, LoaderFixture)
+{
+    qualityFormat = FASTQphred33;
+    
+    REQUIRE(CreateFileGetSequence(GetName(), "@SEQ_ID1\n" "GATT\n" "+\n" "!''*\n" ));
+    
+    REQUIRE_RC(SequenceGetQuality(seq, &quality, &qualityAsciiOffset, &qualityType));
+    REQUIRE_NOT_NULL(quality);
+    uint32_t l;
+    REQUIRE_RC(SequenceGetReadLength(seq, &l));
+    REQUIRE_EQ(qualityAsciiOffset, (uint8_t)33);
+    REQUIRE_EQ(qualityType, (int)QT_Phred);
+    REQUIRE_EQ(quality[0],  (int8_t)'!');
+}
+
+FIXTURE_TEST_CASE(SequenceGetQuality64, LoaderFixture)
+{
+    qualityFormat = FASTQphred64;
+    
+    REQUIRE(CreateFileGetSequence(GetName(), "@SEQ_ID1\n" "GATT\n" "+\n" "BBCC\n" ));
+    
+    REQUIRE_RC(SequenceGetQuality(seq, &quality, &qualityAsciiOffset, &qualityType));
+    REQUIRE_NOT_NULL(quality);
+    uint32_t l;
+    REQUIRE_RC(SequenceGetReadLength(seq, &l));
+    REQUIRE_EQ(qualityAsciiOffset, (uint8_t)64);
+    REQUIRE_EQ(qualityType, (int)QT_Phred);
+    REQUIRE_EQ(quality[0],  (int8_t)'B');
+}
+
+FIXTURE_TEST_CASE(SequenceGetQualityLogOdds, LoaderFixture)
+{
+    qualityFormat = FASTQlogodds;
+    
+    REQUIRE(CreateFileGetSequence(GetName(), "@SEQ_ID1\n" "GATT\n" "+\n" ";>@H\n" ));
+    
+    REQUIRE_RC(SequenceGetQuality(seq, &quality, &qualityAsciiOffset, &qualityType));
+    REQUIRE_NOT_NULL(quality);
+    uint32_t l;
+    REQUIRE_RC(SequenceGetReadLength(seq, &l));
+    REQUIRE_EQ(qualityAsciiOffset, (uint8_t)64);
+    REQUIRE_EQ(qualityType, (int)QT_LogOdds);
+    REQUIRE_EQ(quality[0],  (int8_t)';');
+}
+
+FIXTURE_TEST_CASE(SequenceBaseSpace, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), "@q\n" "GATC\n" "+\n" "!''*\n" ));
+    REQUIRE(!SequenceIsColorSpace(seq));
+    char k;
+    REQUIRE_RC(SequenceGetCSKey(seq, &k)); // RC is 0 but k is undefined
+}
+
+FIXTURE_TEST_CASE(SequenceColorSpace, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), "@q\n" "G123\n" "+\n" "!''*\n" ));
+    REQUIRE(SequenceIsColorSpace(seq));
+
+    char k;
+    REQUIRE_RC(SequenceGetCSKey(seq, &k));
+    REQUIRE_EQ(k, 'G');
+    
+    uint32_t l;
+    REQUIRE_RC(SequenceGetReadLength(seq, &l));
+    REQUIRE_EQ(l, (uint32_t)0);
+    REQUIRE_RC(SequenceGetCSReadLength(seq, &l));
+    REQUIRE_EQ(l, (uint32_t)3);
+    
+    delete [] read;
+    read = new char[l];
+    REQUIRE_RC(SequenceGetCSRead(seq, read));
+    REQUIRE_EQ(string(read, l), string("123"));
+    
+    REQUIRE_RC(SequenceGetCSQuality(seq, &quality, &qualityAsciiOffset, &qualityType));
+    REQUIRE_NOT_NULL(quality);
+    REQUIRE_EQ(qualityType, (int)QT_Phred);
+    REQUIRE_EQ(qualityAsciiOffset,   (uint8_t)33);
+    REQUIRE_EQ(quality[0],  (int8_t)'\'');
+    REQUIRE_EQ(quality[1],  (int8_t)'\'');
+    REQUIRE_EQ(quality[2],  (int8_t)'*' );
+}
+
+FIXTURE_TEST_CASE(SequenceGetOrientationIsReverse, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), "@q\n" "G123\n" "+\n" "!''*\n" ));
+    REQUIRE_EQ(SequenceGetOrientationSelf(seq), (int)ReadOrientationUnknown);
+    REQUIRE_EQ(SequenceGetOrientationMate(seq), (int)ReadOrientationUnknown);
+}
+
+//  Read Number
+FIXTURE_TEST_CASE(ReadNumber, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), "@HWUSI-EAS499:1:3:9:1822#0/1\n" "GATT\n" "+\n" "!''*\n"));
+    REQUIRE(SequenceIsFirst(seq));
+    REQUIRE(!SequenceIsSecond(seq));
+}
+FIXTURE_TEST_CASE(ReadNumberMissing, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), "@HWUSI-EAS499:1:3:9:1822\n" "GATT\n" "+\n" "!''*\n"));
+    REQUIRE(!SequenceIsFirst(seq));
+    REQUIRE(!SequenceIsSecond(seq));
+}
+FIXTURE_TEST_CASE(ReadNumberDefault, LoaderFixture)
+{
+    defaultReadNumber = 2;
+    REQUIRE(CreateFileGetSequence(GetName(), "@HWUSI-EAS499:1:3:9:1822\n" "GATT\n" "+\n" "!''*\n"));
+    REQUIRE(!SequenceIsFirst(seq));
+    REQUIRE(SequenceIsSecond(seq));
+}
+FIXTURE_TEST_CASE(ReadNumberOverride, LoaderFixture)
+{
+    defaultReadNumber = 1;
+    REQUIRE(CreateFileGetSequence(GetName(), "@HWUSI-EAS499:1:3:9:1822/2\n" "GATT\n" "+\n" "!''*\n"));
+    REQUIRE(!SequenceIsFirst(seq));
+    REQUIRE(SequenceIsSecond(seq));
+}
+
+FIXTURE_TEST_CASE(RunSpotRead, LoaderFixture)
+{
+    defaultReadNumber = 1;
+    REQUIRE(CreateFileGetSequence(GetName(), "@SRR390728.1.2\n" "GATT\n" "+\n" "!''*\n"));
+    REQUIRE(SequenceIsSecond(seq));
+}
+
+FIXTURE_TEST_CASE(RunSpotRead_withTail, LoaderFixture)
+{
+    defaultReadNumber = 1;
+    REQUIRE(CreateFileGetSequence(GetName(), "@SRR390728.1.2 123\n" "GATT\n" "+\n" "!''*\n"));
+    REQUIRE(SequenceIsSecond(seq));
+}
+
+FIXTURE_TEST_CASE(RunSpotNothing, LoaderFixture)
+{
+    defaultReadNumber = 1;
+    REQUIRE(CreateFileGetSequence(GetName(), "@SRR390728.1\n" "GATT\n" "+\n" "!''*\n"));
+}
+
+// Components of Illumina tag lines:
+// @HWUSI-EAS499:1:3:9:1822#0/1"
+// spot-name HWUSI-EAS499:1:3:9:1822    tag line up to and including coordinates
+// spot-group "0"                       token following '#'
+// read-number "1"                      1 or 2 following '/'
+
+// not implemented for now:
+// run-group HWUSI-EAS499               tag line up to and excluding coordinates
+// coords [ 1 3 9 182 ]                  
+// fmt-name HWUSI-EAS499:1:3:$X:$Y
+
+FIXTURE_TEST_CASE(SequenceGetSpotNameIllumina, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), "@HWUSI-EAS499:1:3:9:1822#0/1\n" "GATT\n" "+\n" "!''*\n"));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("HWUSI-EAS499:1:3:9:1822"), string(name, length));
+    REQUIRE(!SequenceIsSecond(seq));
+    REQUIRE(SequenceIsFirst(seq));
+}
+
+FIXTURE_TEST_CASE(SequenceGetSpotGroupIllumina, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), "@1:3:9:1822#CAT/1\n" "GATT\n" "+\n" "!''*\n"));
+    REQUIRE_RC(SequenceGetSpotGroup(seq, &name, &length));
+    REQUIRE_EQ(string("CAT"), string(name, length));
+    REQUIRE(!SequenceIsSecond(seq));
+    REQUIRE(SequenceIsFirst(seq));
+}
+
+FIXTURE_TEST_CASE(SequenceGetSpotGroupIllumina_Ignored, LoaderFixture)
+{
+    ignoreSpotGroups = true;
+    REQUIRE(CreateFileGetSequence(GetName(), "@1:3:9:1822#CAT/1\n" "GATT\n" "+\n" "!''*\n"));
+    REQUIRE_RC(SequenceGetSpotGroup(seq, &name, &length));
+    REQUIRE_EQ(string(""), string(name, length));
+    REQUIRE(!SequenceIsSecond(seq));
+    REQUIRE(SequenceIsFirst(seq));
+}
+
+FIXTURE_TEST_CASE(SequenceGetSpotGroup_Empty, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        ">HWI-EAS6_4_FC2010T:1:1:80:366\n" 
+        "GATT\n" 
+        "+\n" 
+        "!''*\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotGroup(seq, &name, &length));
+    REQUIRE_EQ(string(""), string(name, length));
+    REQUIRE(!SequenceIsSecond(seq));
+    REQUIRE(!SequenceIsFirst(seq));
+}
+
+FIXTURE_TEST_CASE(SequenceGetSpotGroup_Zero, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        ">HWI-EAS6_4_FC2010T:1:1:80:366#0\n" 
+        "GATT\n" 
+        "+\n" 
+        "!''*\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotGroup(seq, &name, &length));
+    REQUIRE_EQ(string(""), string(name, length));
+    REQUIRE(!SequenceIsSecond(seq));
+    REQUIRE(!SequenceIsFirst(seq));
+}
+
+FIXTURE_TEST_CASE(SequenceGetSpotGroupBarcode, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), "@HWI-ST1234:33:D1019ACXX:2:1101:1415:2223/1 1:N:0:ATCACG\nATCG\n"));
+    REQUIRE_RC(SequenceGetSpotGroup(seq, &name, &length));
+    REQUIRE_EQ(string("ATCACG"), string(name, length));
+    REQUIRE(!SequenceIsSecond(seq));
+    REQUIRE(SequenceIsFirst(seq));
+}
+
+FIXTURE_TEST_CASE(SequenceGetSpotGroupUnderscore, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), "@FCA5PJ4:1:1101:14707:1407#GTAGTCGC_AGCTCGGT/1\nATCG\n"));
+    REQUIRE_RC(SequenceGetSpotGroup(seq, &name, &length));
+    REQUIRE_EQ(string("GTAGTCGC_AGCTCGGT"), string(name, length));
+    REQUIRE(!SequenceIsSecond(seq));
+    REQUIRE(SequenceIsFirst(seq));
+}
+
+
+#define TEST_PAIRED(line, paired)\
+    REQUIRE(CreateFileGetSequence(GetName(), line "\n" "GATT\n" "+\n" "!''*\n"));\
+    if (paired)\
+        REQUIRE(SequenceWasPaired(seq));\
+    else\
+        REQUIRE(!SequenceWasPaired(seq));
+
+FIXTURE_TEST_CASE(SequenceWasPaired1, LoaderFixture) { TEST_PAIRED("@HWUSI-EAS499:1:3:9:1822",         false); }
+FIXTURE_TEST_CASE(SequenceWasPaired2, LoaderFixture) { TEST_PAIRED("@HWUSI-EAS499:1:3:9:1822#0/0",     false); }
+FIXTURE_TEST_CASE(SequenceWasPaired3, LoaderFixture) { TEST_PAIRED("@HWUSI-EAS499:1:3:9:1822#0/1",     true); }
+FIXTURE_TEST_CASE(SequenceWasPaired4, LoaderFixture) { TEST_PAIRED("@HWUSI-EAS499:1:3:9:1822#CAT/1",   true); }
+FIXTURE_TEST_CASE(SequenceWasPaired5, LoaderFixture) { TEST_PAIRED("@HWUSI-EAS499:1:3:9:1822/2",       true); }
+
+FIXTURE_TEST_CASE(SequenceGetSpotNameOneLine, LoaderFixture)
+{   // source: SRR014283
+    REQUIRE(CreateFileGetSequence(GetName(), "USI-EAS50_1:6:1:392:881:GCT:!!!")); 
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("USI-EAS50_1:6:1:392:881"), string(name, length));
+}
+
+FIXTURE_TEST_CASE(SequenceGetNameNumeric, LoaderFixture)
+{   // source: SRR094419
+    qualityFormat = FASTQphred64;
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@741:6:1:1204:10747/1\n"
+        "GTCGTTGTCCCGCTCCTCATATTCNNNNNNNNNNNN\n"
+        "+\n"
+        "bbbbbbbbbbbbbbbbbbbb````BBBBBBBBBBBB\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("741:6:1:1204:10747"), string(name, length));
+}
+
+//////////////////// parsing Quality lines
+
+FIXTURE_TEST_CASE(GtStartsQualityOnly, LoaderFixture)
+{   // source: XXX001656
+    CreateFileGetRecord(GetName(), 
+        ">HWI-EAS6_4_FC2010T:1:1:80:366\n"
+        "!!\n"
+        ">HWI-EAS6_4_FC2010T:1:1:80:366\n"
+        "!!\n"
+        );
+    REQUIRE(GetRejected());
+    REQUIRE(!fatal);
+}
+
+FIXTURE_TEST_CASE(OneLineRead, LoaderFixture)
+{   
+// source: SRR016872
+    CreateFileGetRecord(GetName(), "USI-EAS50_1:6:1:392:881:GCTC:!!!!\n"); 
+    REQUIRE(!GetRejected());
+}
+
+FIXTURE_TEST_CASE(ForcePhredOffset, LoaderFixture)
+{   // quality line looks like it may be Phred64, but we know we are dealing with Phred33 
+// source: SRR014126
+    qualityFormat = FASTQphred33;
+    CreateFileGetSequence(GetName(), 
+        "@R16:8:1:19:1012#0/2\n"
+        "TTAAATGACTCTTTAAAAAACACAACATACATTGATATATTTATTCCTAGATATTTGCTTATAAGACTCTAATCA\n"
+        "+\n"
+        "BCCBBBACBBCCCCBCCCCCCCCCCBCBCCCABBBBBBCCBBCBBCCBBCBCCCABBCAAABC at CCCAB@CBACC\n"
+    );
+    REQUIRE_RC(SequenceGetQuality(seq, &quality, &qualityAsciiOffset, &qualityType));
+    REQUIRE_NOT_NULL(quality);
+    REQUIRE_EQ(qualityType, (int)QT_Phred);
+    REQUIRE_EQ(qualityAsciiOffset,  (uint8_t)33);
+    REQUIRE_EQ(quality[0],    (int8_t)'B');
+}
+
+// Illumina spot names
+FIXTURE_TEST_CASE(IlluminaCasava_1_8, LoaderFixture)
+{ // source: SAMN01860354.fastq
+    REQUIRE(CreateFileGetSequence(GetName(), 
+                "@HWI-ST273:315:C0LKAACXX:7:1101:1487:2221 2:Y:0:GGCTAC\n"
+                "AACA\n+\n$.%0\n"
+    ));
+
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("HWI-ST273:315:C0LKAACXX:7:1101:1487:2221"), string(name, length));
+    REQUIRE(SequenceIsSecond(seq));
+    REQUIRE(SequenceIsLowQuality(seq));
+    REQUIRE_RC(SequenceGetSpotGroup(seq, &name, &length));
+    REQUIRE_EQ(string("GGCTAC"), string(name, length));
+}
+
+FIXTURE_TEST_CASE(IlluminaCasava_1_8_SpotGroupNumber, LoaderFixture)
+{ // source: SAMN01860354.fastq
+    REQUIRE(CreateFileGetSequence(GetName(), 
+                "@HWI-ST273:315:C0LKAACXX:7:1101:1487:2221 2:Y:0:1\n"
+                "AACA\n+\n$.%0\n"
+    ));
+
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("HWI-ST273:315:C0LKAACXX:7:1101:1487:2221"), string(name, length));
+    REQUIRE(SequenceIsSecond(seq));
+    REQUIRE(SequenceIsLowQuality(seq));
+    REQUIRE_RC(SequenceGetSpotGroup(seq, &name, &length));
+    REQUIRE_EQ(string("1"), string(name, length));
+}
+
+FIXTURE_TEST_CASE(IlluminaCasava_1_8_SpotGroup_MoreMadness, LoaderFixture)
+{ // source: SRR1106612
+    REQUIRE(CreateFileGetSequence(GetName(), 
+                "@HWI-ST808:130:H0B8YADXX:1:1101:1914:2223 1:N:0:NNNNNN.GGTCCA.AAAA\n"
+                "AACA\n+\n$.%0\n"
+    ));
+
+    REQUIRE_RC(SequenceGetSpotGroup(seq, &name, &length));
+    REQUIRE_EQ(string("NNNNNN.GGTCCA.AAAA"), string(name, length));
+}
+
+FIXTURE_TEST_CASE(IlluminaCasava_1_8_EmptyTag, LoaderFixture)
+{ 
+    REQUIRE(CreateFileGetSequence(GetName(), 
+                "@HWI-ST959:56:D0AW4ACXX:8:1101:1233:2026 2:N:0:\n"
+                "AACA\n+\n$.%0\n"
+
+    ));
+
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("HWI-ST959:56:D0AW4ACXX:8:1101:1233:2026"), string(name, length));
+    REQUIRE(SequenceIsSecond(seq));
+    REQUIRE(! SequenceIsLowQuality(seq));
+    REQUIRE_RC(SequenceGetSpotGroup(seq, &name, &length));
+    REQUIRE_EQ(string(), string(name, length));
+}
+
+FIXTURE_TEST_CASE(Illumina_NegativeCoords, LoaderFixture)
+{ 
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@HWUSI-EAS1679-0005:4:113:4454:-51#0\n"
+        "AACA\n+\n$.%0\n"
+    ));
+
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("HWUSI-EAS1679-0005:4:113:4454:-51"), string(name, length));
+    REQUIRE_RC(SequenceGetSpotGroup(seq, &name, &length));
+    REQUIRE_EQ(string(""), string(name, length));
+}
+
+FIXTURE_TEST_CASE(Illumina_Underscore, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@DG7PMJN1:293:D12THACXX:2:1101:1161:1968_2:N:0:GATCAG\n"
+        "AGAGTTTGAT\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("DG7PMJN1:293:D12THACXX:2:1101:1161:1968"), string(name, length));
+    REQUIRE(SequenceIsSecond(seq));
+}
+
+FIXTURE_TEST_CASE(Illumina_IdentifierAtFront, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@QSEQ161.65 DBV2SVN1:1:1101:1474:2213#0/1\n"
+        "AGAGTTTGAT\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("DBV2SVN1:1:1101:1474:2213"), string(name, length));
+}
+
+FIXTURE_TEST_CASE(Illumina_SpaceAndIdentifierAtFront, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@ QSEQ161 EAS139:136:FC706VJ:2:2104:15343:197393 1:Y:18:ATCACG\n"
+        "AGAGTTTGAT\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("EAS139:136:FC706VJ:2:2104:15343:197393"), string(name, length));
+}
+
+FIXTURE_TEST_CASE(SRR1778155 , LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@2-796964       M01929:5:000000000-A46YE:1:1108:16489:18207 1:N:0:2     orig_bc=TATCGGGA        new_bc=TATCGGGA   bc_diffs=0\n"
+        "AACA\n+\n$.%0\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("M01929:5:000000000-A46YE:1:1108:16489:18207"), string(name, length));
+}
+
+FIXTURE_TEST_CASE(SRA192487, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@HWI-ST1234:33:D1019ACXX:2:1101:1415:2223/1 1:N:0:ATCACG\n"
+        "AACA\n+\n$.%0\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("HWI-ST1234:33:D1019ACXX:2:1101:1415:2223"), string(name, length));
+}
+
+//////////////////// odd syntax cases
+FIXTURE_TEST_CASE(NoEolAtEof, LoaderFixture)
+{
+    CreateFileGetRecord(GetName(), 
+        "@SEQ_ID1\n" "GATT\n" "+\n" "!''*\n" 
+        "@SEQ_ID2\n" "GATT\n" "+\n" "!''*"
+    );
+    REQUIRE_NOT_NULL(record);
+    REQUIRE(! GetRejected());
+
+    REQUIRE(GetRecord());    
+    REQUIRE(! GetRejected());
+    REQUIRE_NOT_NULL(record);
+} 
+ 
+FIXTURE_TEST_CASE(GtStartsReadOnly, LoaderFixture)
+{   // source: XXX001656
+    CreateFileGetRecord(GetName(), 
+        ">q\n"
+        "AAC\n"
+        ">q\n"
+        "ACA\n"
+    );   
+    REQUIRE(!GetRejected());
+}
+
+//////////////////// detecting older formats
+
+FIXTURE_TEST_CASE(Quality33TooLow, LoaderFixture)
+{   // negative qualities are not allowed for Phred33
+// source: SRR016872
+    qualityFormat = FASTQphred33;
+    CreateFileGetRecord(GetName(), 
+            "@HWI-EAS102_1_30LWPAAXX:5:1:1792:566\n"
+            "GAAACCCCCTATTAGANNNNCNNNNCNATCATGTCA\n"
+            "+HWI-EAS102_1_30LWPAAXX:5:1:1792:566\n"
+            "II IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII\n"
+    );
+    REQUIRE(GetRejected());
+    REQUIRE(fatal);
+}
+
+FIXTURE_TEST_CASE(Quality64TooLow, LoaderFixture)
+{   // negative qualities are not allowed for Phred64
+// source: SRR016872
+    qualityFormat = FASTQphred64;
+    CreateFileGetRecord(GetName(), 
+            "@HWI-EAS102_1_30LWPAAXX:5:1:1511:102\n"
+            "GGGGTTAGTGGCAGGGGGGGGGTCTCGGGGGGGGGG\n" 
+            "+HWI-EAS102_1_30LWPAAXX:5:1:1511:102\n"
+            "IIIIIIIIIIIIIIIIII;IIIIIIIIIIIIIIIII\n"
+        );
+    REQUIRE(GetRejected());
+    REQUIRE(fatal);
+}
+
+FIXTURE_TEST_CASE(QualityLogoddsTooLow, LoaderFixture)
+{   // qualities under 59 are not allowed for LogOdds
+    qualityFormat = FASTQlogodds;
+    CreateFileGetRecord(GetName(), 
+            "@HWI-EAS102_1_30LWPAAXX:5:1:1511:102\n"
+            "GGGGTTAGTGGCAGGGGGGGGGTCTCGGGGGGGGGG\n" 
+            "+HWI-EAS102_1_30LWPAAXX:5:1:1511:102\n"
+            "I:IIIIIIIIIIIIIIII;IIIIIIIIIIIIIIIII\n" // ':' = 58
+        );
+    REQUIRE(GetRejected());
+    REQUIRE(fatal);
+}
+
+FIXTURE_TEST_CASE(DecimalQualityRejected, LoaderFixture)
+{
+    CreateFileGetRecord(GetName(), 
+        "@BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540\n"
+        "GTCGCTTCTCGGAAGNGTGAAAGACAANAATNTTNN\n"
+        "+BILLIEHOLIDAY_1_FC20F3DAAXX:8:2:342:540\n"
+        "40 3 1 22 17 18 34 8 13 21 3 7 5 0 0 5 1 0 7 3 2 3 3 3 1 1 4 5 5 2 2 5 0 1 5 5\n"
+    );
+    REQUIRE(GetRejected());
+    REQUIRE(fatal);
+}
+
+////////////////// detecting alternative formats
+FIXTURE_TEST_CASE(PacbioRaw, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@m121205_055009_42163_c100416332550000001523041801151327_s1_p0/19\n"
+        "AGAGTTTGAT\n"
+        "+m121205_055009_42163_c100416332550000001523041801151327_s1_p0/19\n"
+        "LLhf>>>>[[\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("m121205_055009_42163_c100416332550000001523041801151327_s1_p0/19"), string(name, length));
+}
+FIXTURE_TEST_CASE(PacbioCcs, LoaderFixture)
+{
+    defaultReadNumber = -1;
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@m121205_055009_42163_c100416332550000001523041801151327_s1_p0/19/ccs\n"
+        "AGAGTTTGAT\n"
+        "+m121205_055009_42163_c100416332550000001523041801151327_s1_p0/19/ccs\n"
+        "LLhf>>>>[[\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("m121205_055009_42163_c100416332550000001523041801151327_s1_p0/19/ccs"), string(name, length));
+}
+
+FIXTURE_TEST_CASE(PacbioNoReadNumbers, LoaderFixture)
+{
+    defaultReadNumber = -1;
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@m121205_055009_42163_c100416332550000001523041801151327_s1_p0/1\n"
+        "AGAGTTTGAT\n"
+        "+m121205_055009_42163_c100416332550000001523041801151327_s1_p0/1\n"
+        "LLhf>>>>[[\n"
+    ));
+    REQUIRE(!SequenceIsFirst(seq));
+    REQUIRE(!SequenceIsSecond(seq));
+}
+
+FIXTURE_TEST_CASE(PacbioWsCcs, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@m101210_094054_00126_c000028442550000000115022402181134_s1_p0/2 ccs\n"
+        "AGAGTTTGAT\n"
+        "+m101210_094054_00126_c000028442550000000115022402181134_s1_p0/2 ccs\n"
+        "LLhf>>>>[[\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("m101210_094054_00126_c000028442550000000115022402181134_s1_p0/2"), string(name, length));
+}
+
+FIXTURE_TEST_CASE(PacbioError, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@m130727_021351_42150_c100538232550000001823086511101336_s1_p0/53/0_106\n"
+        "TTTTTCCAAAAAAGGAGACGTAAACATTTCTTAACTTGCCAGCACTCTAATTCCAAAATCAAGTCGCATTTCTGACATTGCGGTAAGATTGTGCAATATCATATCT\n"
+        "+\n"
+        ")*'&*'+*(*+#-,-/'+-)+,'-./+*+.()*()*,$#,)'+**%+'*/,+(/,,*,'/&,+--%.-.*),,+.,,.'./%-/,/(.%.,*(.+/-/(../.&'#\n"
+    ));
+}
+
+FIXTURE_TEST_CASE(NotPairedRead_Error, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@HWI-ST226:170:AB075UABXX:3:1101:10089:7031 1:N:0:GCCAAT\n"
+        "TACA\n"
+    ));
+    REQUIRE(SequenceIsFirst(seq));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("HWI-ST226:170:AB075UABXX:3:1101:10089:7031"), string(name, length));
+}
+
+FIXTURE_TEST_CASE(NoFragmentInfo_Error, LoaderFixture)
+{
+    defaultReadNumber = -1;
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@m130727_021351_42150_c100538232550000001823086511101336_s1_p0/283/0_9315\n"
+        "AACA\n+\n$.%0\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("m130727_021351_42150_c100538232550000001823086511101336_s1_p0/283/0_9315"), string(name, length));
+}
+
+FIXTURE_TEST_CASE(NoColonAtTheEnd_Error, LoaderFixture)
+{
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@HET-141-007:154:C391TACXX:6:2316:3220:70828 1:N:0\n"
+        "AACA\n+\n$.%0\n"
+    ));
+    REQUIRE(SequenceIsFirst(seq));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("HET-141-007:154:C391TACXX:6:2316:3220:70828"), string(name, length));
+}
+
+FIXTURE_TEST_CASE ( MissingRead, LoaderFixture )
+{ // source: SRR529889
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@GG3IVWD03HIDOA length=3 xy=2962_2600 region=3 run=R_2010_05_11_11_15_22_\n"
+        "AACA\n+\n$.%0\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("GG3IVWD03HIDOA"), string(name, length));
+}
+
+FIXTURE_TEST_CASE ( UnexpectedEOLreported, LoaderFixture )
+{ // source: SRR1915965
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@HWI-ST1106:381:D1CDRACXX:8:1101:10000:110594\t2\n"
+        "AACA\n+\n$.%0\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("HWI-ST1106:381:D1CDRACXX:8:1101:10000:110594"), string(name, length));
+    REQUIRE(SequenceIsSecond(seq));
+}
+
+FIXTURE_TEST_CASE ( AnotherUnexpectedEOLreported, LoaderFixture )
+{ // source: SRR1686805 
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@HWI-ST225:626:C2Y82ACXX:3:1304:7988:75799_2\n"
+        "AACA\n+\n$.%0\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("HWI-ST225:626:C2Y82ACXX:3:1304:7988:75799"), string(name, length));
+    REQUIRE(SequenceIsSecond(seq));
+}
+
+FIXTURE_TEST_CASE ( FastqDumpOutput, LoaderFixture )
+{ // VDB-2835 source: fastq-dump SRR000123 
+    REQUIRE(CreateFileGetSequence(GetName(), 
+        "@SRR000123.1 EXRHO8E16JTGUV length=157\n"
+        "TCAGTTTCGGGAACTATGTAAACAATACGCTAAGCGTGTTCTATGGTTTTACAATGTTCAGGATGGAAACATTGTAGGAGATAACAACCGAGAAGTATCGCTGCCTGTCGGCTGAGACACGCAACAGGGGATAGGCAAGGCACTACAGGGGATAGGN\n"
+        "+SRR000123.1 EXRHO8E16JTGUV length=157\n"
+        "=<:7F?)9F?)>3<=<===F?*<D:<<<=<:F>=<==:D;==;=D;LE8,49E<==E==;E===E<F at +==E<==<D=<8<=C;;A9 at 7;<9>6<<===<=<<A:8<:;C<<=<;<<<9<:=B;88GC6(6<<C==C=C=<=<&<9=GC7):<<B:!\n"
+    ));
+    REQUIRE_RC(SequenceGetSpotName(seq, &name, &length));
+    REQUIRE_EQ(string("SRR000123.1"), string(name, length));
+}
+
+
+// FIXTURE_TEST_CASE(Pacbio, LoaderFixture)
+// { 
+    // REQUIRE(CreateFileGetSequence(GetName(), 
+                // "@m120419_100821_42161_c100329130310000001523018509161273_s1_p0/11/2511_3149\n"
+                // "CTGCTTCTCCTGCTCTTCCTACTGTCCTCTCCCTGCTGTCGCTTCGCCCC\n"
+                // "TCGGTGGAGGCCGCGTTTGAGCGGCCGGTGTCCGCTGC\n"
+                // "+\n"
+                // "+*.,+*(,$+-.)**('#%*',*.*&,.(,$',,,($.,)#.-.-%'*#%\n"
+                // ",../*+*!.%!!-!/-&(.+.!.'!!//,/)!//!*-'\n"
+    // ));
+
+    // REQUIRE_RC(SequenceGetReadLength(seq, &readLength));
+    // REQUIRE_EQ(readLength, 88u);
+    // REQUIRE(MakeReadBuffer());
+    // REQUIRE_RC(SequenceGetRead(seq, read));
+    // REQUIRE_EQ(string(read, readLength), string("CTGCTTCTCCTGCTCTTCCTACTGTCCTCTCCCTGCTGTCGCTTCGCCCCTCGGTGGAGGCCGCGTTTGAGCGGCCGGTGTCCGCTGC"));
+
+    // REQUIRE_RC(SequenceGetQuality(seq, &quality, &qualityAsciiOffset, &qualityType));
+    // REQUIRE_NOT_NULL(quality);
+    // REQUIRE_EQ(qualityType, (int)QT_Phred);
+    // REQUIRE_EQ((unsigned int)qualityAsciiOffset,  (unsigned int)phredOffset);
+    // REQUIRE_EQ(quality[0],  (int8_t)'+');
+    // REQUIRE_EQ(quality[87], (int8_t)'\'');
+// }
+
+// @ERBRDQF01EGP9U
+// spot-name 
+// spot-group 
+// read-number 
+// run-group 
+// coords 
+// fmt-name 
+
+//////////////////////////////////////////// Main
+extern "C"
+{
+
+#include <kapp/args.h>
+#include <kfg/config.h>
+
+ver_t CC KAppVersion ( void )
+{
+    return 0x1000000;
+}
+rc_t CC UsageSummary (const char * progname)
+{
+    return 0;
+}
+
+rc_t CC Usage ( const Args * args )
+{
+    return 0;
+}
+
+const char UsageDefaultName[] = "wb-test-fastq";
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    KConfigDisableUserSettings();
+    rc_t rc=FastqLoaderWbTestSuite(argc, argv);
+    return rc;
+}
+
+}  
diff --git a/test/fuse/Makefile b/test/fuse/Makefile
new file mode 100644
index 0000000..d674e68
--- /dev/null
+++ b/test/fuse/Makefile
@@ -0,0 +1,79 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+runtests:
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/fuse
+
+TEST_TOOLS =
+
+include $(TOP)/build/Makefile.env
+
+$(TEST_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
+
+#-------------------------------------------------------------------------------
+# remote-fuser-test
+#
+REMOTE_FUSER_TEST_SRC = \
+	remote-fuser-test   \
+	utils
+
+REMOTE_FUSER_TEST_OBJ = \
+	$(addsuffix .$(OBJX),$(REMOTE_FUSER_TEST_SRC))
+    
+REMOTE_FUSER_TEST_LIB =   \
+	-sncbi-vdb-static   \
+	-skapp
+
+$(TEST_BINDIR)/remote-fuser-test: $(REMOTE_FUSER_TEST_OBJ)
+	$(LP) --exe -o $@ $^ $(REMOTE_FUSER_TEST_LIB)
+
+#-------------------------------------------------------------------------------
+# slowtests: match output vs sra-pileup
+#
+
+ifeq (linux,$(BUILD_OS))
+    ifneq (Ubuntu,$(OS_DISTRIBUTOR))
+slowtests: run-test
+
+run-test: $(TEST_BINDIR)/remote-fuser-test
+	@$(SRCDIR)/remote_fuser_test.sh standard 180 $(TARGDIR)/bin
+
+    else
+slowtests:
+    endif
+else
+slowtests:
+endif
+
+.PHONY: run-test
diff --git a/test/fuse/cfg/standard.cfg b/test/fuse/cfg/standard.cfg
new file mode 100644
index 0000000..9831dd9
--- /dev/null
+++ b/test/fuse/cfg/standard.cfg
@@ -0,0 +1,21 @@
+###############################################################
+## Config file for remote_fuser_test.sh script
+## That is standard 'long' running test config file 
+###############################################################    
+
+##  The test directory the directory where test will take place
+##  It is all in one directory.
+##
+
+TEST_DIR="/panfs/pan1/trace_work/teamcity-tests/remote-fuser"
+
+##  This is an URL to XML file with mount information
+##
+
+XML_URL="http://ftp-trace.ncbi.nlm.nih.gov/blast/db/cloud/LATEST/fuse.xml"
+
+##  This vairable is optional. You may uncommet it if You need
+##  to restrict used disk space by amount of GYGA BYTES.
+##
+
+# MAX_DISK_SPACE_GIG=100
diff --git a/test/fuse/remote-fuser-test.c b/test/fuse/remote-fuser-test.c
new file mode 100644
index 0000000..7233dc2
--- /dev/null
+++ b/test/fuse/remote-fuser-test.c
@@ -0,0 +1,794 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "remote-fuser-test.vers.h" /* VDB_PASSWD_VERS */
+
+#include <sysalloc.h>
+#include <kapp/main.h> /* KMain */
+
+#include <klib/text.h>
+#include <klib/rc.h>
+
+#include <kproc/lock.h>
+#include <kproc/thread.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+// #include "mutli.h"
+#include "utils.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <sys/time.h>
+#include <signal.h> 
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*  Single File Test
+ */
+struct _SFTest {
+    const char * path;
+    uint64_t size;
+};
+
+static
+rc_t CC
+_SFTestDispose ( const struct _SFTest * self )
+{
+    struct _SFTest * Test = ( struct _SFTest * ) self;
+
+    if ( Test != NULL ) {
+        if ( Test -> path != NULL ) {
+            free ( ( char * ) Test -> path );
+
+            Test -> path = NULL;
+        }
+
+        Test -> size = 0;
+
+        free ( Test );
+    }
+
+    return 0;
+}   /* _SFTestDispose () */
+
+static
+rc_t CC
+_SFTestMake ( const struct _SFTest ** Test, const char * Path )
+{
+    rc_t RCt;
+    struct _SFTest * Ret;
+    struct KDirectory * Dir;
+    uint32_t PathType;
+    uint64_t Size;
+
+    RCt = 0;
+    Ret = NULL;
+    Dir = NULL;
+    PathType = kptNotFound;
+    Size = 0;
+
+    if ( Test != NULL ) {
+        * Test = NULL;
+    }
+
+    if ( Test == NULL || Path == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+        /* First we shoud check that file exist
+         */
+    RCt = KDirectoryNativeDir ( & Dir );
+    if ( RCt == 0 ) {
+        PathType = KDirectoryPathType ( Dir, Path );
+        if ( PathType == kptFile ) {
+            RCt = KDirectoryFileSize ( Dir, & Size, Path );
+            if ( Size == 0 ) {
+                return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcInvalid );
+            }
+        }
+        else {
+            return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcInvalid );
+        }
+        KDirectoryRelease ( Dir );
+    }
+
+    if ( RCt == 0 ) {
+        Ret = calloc ( 1, sizeof ( struct _SFTest ) );
+        if ( Ret == NULL ) {
+            RCt = RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcExhausted );
+        }
+        else {
+            Ret -> path = string_dup_measure ( Path, NULL );
+            if ( Ret -> path == NULL ) {
+                RCt = RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcExhausted );
+            }
+            else {
+                Ret -> size = Size;
+
+                * Test = Ret;
+            }
+        }
+    }
+
+    if ( RCt != 0 ) {
+        * Test = NULL;
+
+        _SFTestDispose ( Ret );
+    }
+
+    return RCt;
+}   /* _SFTestMake () */
+
+/*  I am pushed to write that test fast, so nothing special. Just
+ *  reading 32M blocks at random offset
+ */
+static
+rc_t CC
+_SFTestNewJob (
+                struct _SFTest * self,
+                int Iteration,
+                const char ** Name,
+                uint64_t * Offset,
+                size_t * Size
+)
+{
+    rc_t RCt;
+    size_t BS;
+    uint64_t Oko;
+
+    RCt = 0;
+    BS = 33554432;
+    Oko = 0;
+
+    if ( Name != NULL ) {
+        * Name = NULL;
+    }
+
+    if ( Offset != NULL ) {
+        * Offset = 0;
+    }
+
+    if ( Size != NULL ) {
+        * Size = 0;
+    }
+
+    if ( self == NULL || Name == NULL || Offset == NULL || Size == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+    * Name = self -> path;
+
+    if ( self -> size < BS ) {
+        * Offset = 0;
+        * Size = self -> size;
+    }
+    else {
+        Oko = ( uint64_t ) ( self -> size / BS );
+        * Offset = ( rand () % Oko ) * BS;
+        * Size = BS;
+
+        if ( self -> size <= * Offset + BS ) {
+            * Size = self -> size - * Offset;
+        }
+    }
+
+    return RCt;
+}   /* _SFTestNewJob () */
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*  Multiply Files Test
+ */
+struct _MFTest {
+    const struct _SFTest ** files;
+    size_t files_qty;
+};
+
+static
+rc_t CC
+_MFTestDispose ( const struct _MFTest * self )
+{
+    size_t llp;
+    struct _MFTest * Test;
+
+    llp = 0;
+    Test = ( struct _MFTest * ) self;
+
+    if ( Test != NULL ) {
+        if ( Test -> files != NULL ) {
+            for ( llp = 0; llp < Test -> files_qty; llp ++ ) {
+                _SFTestDispose ( self -> files [ llp ] );
+            }
+
+            free ( Test -> files );
+        }
+
+        Test -> files = NULL;
+        Test -> files_qty = 0;
+
+        free ( Test );
+    }
+
+    return 0;
+}   /* _MFTestDispose () */
+
+static rc_t CC _MFTestLoadEntries (
+                                struct _MFTest * self,
+                                const char * Path
+                                );
+
+static
+rc_t CC
+_MFTestMake ( const struct _MFTest ** Test, const char * Path )
+{
+    rc_t RCt;
+    struct _MFTest * Ret;
+
+    RCt = 0;
+    Ret = NULL;
+
+    if ( Test != NULL ) {
+        * Test = NULL;
+    }
+
+    if ( Test == NULL || Path == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+    Ret = calloc ( 1, sizeof ( struct _MFTest ) );
+    if ( Ret == NULL ) {
+        RCt = RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcExhausted );
+    }
+    else {
+        RCt = _MFTestLoadEntries ( Ret, Path );
+        if ( RCt == 0 ) {
+            * Test = Ret;
+        }
+    }
+
+    if ( RCt != 0 ) {
+        * Test = NULL;
+
+        _MFTestDispose ( Ret );
+    }
+
+    return RCt;
+}   /* _MFTestMake () */
+
+static
+rc_t CC
+_ReadAll ( const char * Path, char ** Buf, size_t * BufSize )
+{
+    rc_t RCt;
+    const struct KFile * File;
+    struct KDirectory * Dir;
+    char * RetBuf;
+    size_t Size, NumRead;
+
+    RCt = 0;
+    File = NULL;
+    Dir = NULL;
+    RetBuf = NULL;
+    Size = 0;
+    NumRead = 0;
+
+    RCt = KDirectoryNativeDir ( & Dir );
+    if ( RCt == 0 ) {
+        RCt = KDirectoryFileSize ( Dir, & Size, Path );
+        if ( RCt == 0 ) {
+            if ( Size == 0 ) {
+                return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcInvalid );
+            }
+            else {
+                RetBuf = calloc ( Size, sizeof ( char ) );
+                if ( RetBuf == NULL ) {
+                    return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcExhausted );
+                }
+                else {
+                    RCt = KDirectoryOpenFileRead ( Dir, & File, Path );
+                    if ( RCt == 0 ) {
+                        RCt = KFileReadAll (
+                                            File,
+                                            0,
+                                            RetBuf,
+                                            Size,
+                                            & NumRead
+                                            );
+                        if ( RCt == 0 ) {
+                            * Buf = RetBuf;
+                            * BufSize = Size;
+                        }
+                    }
+                }
+            }
+        }
+
+        KDirectoryRelease ( Dir );
+    }
+
+    if ( RCt != 0 ) {
+        Buf = NULL;
+        BufSize = 0;
+
+        if ( RetBuf != NULL ) {
+            free ( RetBuf );
+        }
+    }
+
+    return RCt;
+}   /* _ReadAll () */
+
+static
+rc_t CC
+_PaarseEntries ( struct _MFTest * self, char * Buf, size_t BufSize )
+{
+    rc_t RCt;
+    size_t NumLines;
+    const struct _SFTest ** Tests;
+    char * pS, * pE, * pC;
+    size_t llp;
+    const struct _SFTest * Test;
+
+    RCt = 0;
+    NumLines = 0;
+    Tests = 0;
+    pS = pE = pC = NULL;
+    llp = 0;
+    Test = NULL;
+
+    if ( self == NULL || Buf == NULL || BufSize == 0 ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+        /*  Fist we are going through buffer trying to define amount
+         *  of lines
+         */
+    pS = pC = Buf;
+    pE = pS + BufSize;
+
+    while ( pC < pE ) {
+
+        if ( * pC == '\n' ) {
+            * pC = 0;
+            NumLines ++;
+            pS = pC + 1;
+        }
+
+        pC ++;
+    }
+
+    if ( pS < pC ) {
+        * pC = 0;       /* Ha-ha, will write zero beyond boundary */
+        NumLines ++;
+    }
+
+    if ( NumLines == 0 ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcInvalid );
+    }
+
+    Tests = calloc ( NumLines, sizeof ( struct _SFTest * ) );
+    if ( Tests == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcExhausted );
+    }
+
+        /* Here we are doing another pass to fill a foo
+         */
+    pS = pC = Buf;
+    pE = pS + BufSize;
+    llp = 0;
+    Test = 0;
+
+    while ( pC < pE ) {
+
+        if ( * pC == 0 ) {
+            RCt = _SFTestMake ( & Test, pS );
+            if ( RCt != 0 ) {
+                break;
+            }
+
+            Tests [ llp ] = Test;
+
+            llp ++;
+            pS = pC + 1;
+        }
+
+        pC ++;
+    }
+
+    if ( RCt == 0 ) {
+        if ( pS < pC ) {
+            RCt = _SFTestMake ( & Test, pS );
+            if ( RCt == 0 ) {
+                Tests [ llp ] = Test;
+            } 
+        }
+    }
+
+    if ( RCt == 0 ) {
+        self -> files = Tests;
+        self -> files_qty = NumLines;
+    }
+    else {
+        self -> files = NULL;
+        self -> files_qty = 0;
+
+        if ( Tests != NULL ) {
+            for ( llp = 0; llp < NumLines; llp ++ ) {
+                _SFTestDispose ( Tests [ llp ] );
+            }
+        }
+    }
+
+    return RCt;
+}   /* _PaarseEntries () */
+
+rc_t CC
+_MFTestLoadEntries ( struct _MFTest * self, const char * Path )
+{
+    rc_t RCt;
+    char * Buf;
+    size_t BufSize;
+
+    RCt = 0;
+    Buf = NULL;
+    BufSize = 0;
+
+    if ( self == NULL || Path == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+    RCt = _ReadAll ( Path, & Buf, & BufSize );
+    if ( RCt == 0 ) {
+        RCt = _PaarseEntries ( self, Buf, BufSize );
+
+        free ( Buf );
+    }
+
+    return RCt;
+}   /* _MFTestLoadEntries () */
+
+/*  I am pushed to write that test fast, so nothing special. Just
+ *  reading 32M blocks at random offset from random files
+ */
+static
+rc_t CC
+_MFTestNewJob (
+                struct _MFTest * self,
+                int Iteration,
+                const char ** Name,
+                uint64_t * Offset,
+                size_t * Size
+)
+{
+    rc_t RCt;
+    size_t BS;
+    uint64_t Oko;
+    const struct _SFTest * Test;
+
+    RCt = 0;
+    BS = 33554432;
+    Oko = 0;
+    Test = NULL;
+
+    if ( Name != NULL ) {
+        * Name = NULL;
+    }
+
+    if ( Offset != NULL ) {
+        * Offset = 0;
+    }
+
+    if ( Size != NULL ) {
+        * Size = 0;
+    }
+
+    if ( self == NULL || Name == NULL || Offset == NULL || Size == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+        /*  First we are going to choose righ path
+         */
+    Test = self -> files [ rand () % self -> files_qty ];
+
+    * Name = Test -> path;
+
+    if ( Test -> size < BS ) {
+        * Offset = 0;
+        * Size = Test -> size;
+    }
+    else {
+        Oko = ( uint64_t ) ( Test -> size / BS );
+        * Offset = ( rand () % Oko ) * BS;
+        * Size = BS;
+
+        if ( Test -> size <= * Offset + BS ) {
+            * Size = Test -> size - * Offset;
+        }
+    }
+
+    return RCt;
+}   /* _MFTestNewJob () */
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+static
+rc_t run_many_files ( int NumThr, int TumeRun, const char * Path )
+{
+    rc_t RCt;
+    const struct _MFTest * Test;
+    const struct XTasker * Tasker;
+
+    RCt = 0;
+    Test = NULL;
+    Tasker = NULL;
+
+    RCt = _MFTestMake ( & Test, Path );
+    if ( RCt == 0 ) {
+
+        RCt = XTaskerMake (
+                        & Tasker,
+                        NumThr,
+                        ( void * ) Test,
+                        ( Job4Task ) _MFTestNewJob 
+                        );
+        if ( RCt == 0 ) {
+
+            printf (
+                    "Run test in [%d] threads on [%lu] files\n",
+                    NumThr,
+                    Test -> files_qty
+                    );
+
+            XTaskerRun ( Tasker, TumeRun * 60 );
+
+            XTaskerDispose ( Tasker );
+        }
+
+        _MFTestDispose ( Test );
+    }
+
+    return RCt;
+}   /* run_many_files () */
+
+static
+rc_t run_single_file ( int NumThr, int TumeRun, const char * Path )
+{
+    rc_t RCt;
+    const struct _SFTest * Test;
+    const struct XTasker * Tasker;
+
+    RCt = 0;
+    Test = NULL;
+    Tasker = NULL;
+
+    RCt = _SFTestMake ( & Test, Path );
+    if ( RCt == 0 ) {
+
+        RCt = XTaskerMake (
+                        & Tasker,
+                        NumThr,
+                        ( void * ) Test,
+                        ( Job4Task ) _SFTestNewJob 
+                        );
+        if ( RCt == 0 ) {
+            printf (
+                    "Run test in [%d] threads on [single] file\n",
+                    NumThr
+                    );
+
+            XTaskerRun ( Tasker, TumeRun * 60 );
+
+            XTaskerDispose ( Tasker );
+        }
+
+        _SFTestDispose ( Test );
+    }
+
+    return RCt;
+}   /* run_single_file () */
+
+/******************************************************************************/
+
+static
+rc_t run ( int NumThr, int TumeRun, const char * Path, bool IsList )
+{
+    rc_t RCt = 0;
+
+    if ( IsList ) {
+        /* Here we are reading list */
+        RCt = run_many_files ( NumThr, TumeRun, Path );
+    }
+    else {
+        RCt = run_single_file ( NumThr, TumeRun, Path );
+        /* This is a single file case */
+    }
+
+
+    return RCt;
+}
+
+ver_t CC KAppVersion(void) { return REMOTE_FUSER_TEST_VERS; }
+
+/*  Here I will temporarily parce arguments, and will attach
+ *  toolkit ones later ... test program :)
+ */
+#define MAX_PATH_SIZE 1234
+
+char ProgramName [ MAX_PATH_SIZE ];
+
+const static char * NumThrTag = "-t";
+const static char * NumThrDsc = "num_threads";
+#define NUM_THR_DEF 16
+static int NumThr = NUM_THR_DEF;
+
+static char * RunTimeTag = "-r";
+static char * RunTimeDsc = "run_time";
+#define RUN_TIME_DEF 180
+static int RunTime = RUN_TIME_DEF;
+
+static char * ListTag    = "-l";
+bool          PathIsList = false;
+
+char FilePath [ MAX_PATH_SIZE ];
+
+static
+void
+RightUsage()
+{
+    printf ( "\nThat program will test 'remote-fuser' application. It implements two types\n" );
+    printf ( "of test : multiply access to single file and multiply acces to many files\n" );
+    printf ( "\n" );
+    printf ( "Ussage: %s [ %s %s ] [ %s %s ] [%s] path\n\n",
+                            ProgramName, NumThrTag, NumThrDsc,
+                            RunTimeTag, RunTimeDsc, ListTag
+                            );
+    printf ( "Where:\n\n" );
+    printf ( "%s - num threads to run, optional, default %d\n", NumThrDsc, NUM_THR_DEF );
+    printf ( "   %s - time minutes to run, optional, default %d\n", RunTimeDsc, RUN_TIME_DEF );
+    printf ( "         %s - flag that show that path is a list file for multiply access test\n", ListTag );
+    printf ( "       path - path to file ( single or list )\n" );
+    printf ( "\n" );
+}   /* RightUsage() */
+
+static
+bool
+ParseArgs ( int argc, char ** argv )
+{
+    const char * PPU;
+    int llp;
+
+    PPU = NULL;
+    llp = 0;
+
+    PPU = strrchr ( * argv, '/' );
+    if ( PPU == NULL ) {
+        PPU = * argv;
+    }
+    strcpy ( ProgramName, PPU );
+
+    * FilePath = 0;
+
+    for ( llp = 1; llp < argc; llp ++ ) {
+
+        PPU = argv [ llp ];
+        if ( * PPU == '-' ) {
+
+            if ( strcmp ( NumThrTag, PPU ) == 0 ) {
+                if ( argc - 1 <= llp ) {
+                    printf ( "ERROR : parameter [%s] requests an argument\n", NumThrTag );
+                    return false;
+                }
+
+                llp ++;
+                if ( ( NumThr = atol ( argv [ llp ] ) ) == 0 ) {
+                    printf ( "ERROR : invalid parameter [%s] value [%s]\n", NumThrTag, argv [ llp ] );
+                }
+
+                continue;
+            }
+
+            if ( strcmp ( RunTimeTag, PPU ) == 0 ) {
+                if ( argc - 1 <= llp ) {
+                    printf ( "ERROR : parameter [%s] requests an argument\n", RunTimeTag );
+                    return false;
+                }
+
+                llp ++;
+                if ( ( RunTime = atol ( argv [ llp ] ) ) == 0 ) {
+                    printf ( "ERROR : invalid parameter [%s] value [%s]\n", RunTimeTag, argv [ llp ] );
+                }
+
+                continue;
+            }
+
+            if ( strcmp ( ListTag, PPU ) == 0 ) {
+                PathIsList = true;
+
+                continue;
+            }
+
+            printf ( "ERROR : unknown parameter [%s]\n", PPU );
+            return false;
+        }
+        else {
+            strcpy ( FilePath, PPU );
+            break;
+        }
+    }
+
+    if ( * FilePath == 0 ) {
+        printf ( "ERROR : no path passed\n" );
+        return false;
+    }
+
+    if ( 48 <= NumThr ) {
+        printf ( "ERROR : invalide amount of threads passed [%d], should be less than 48\n", NumThr );
+        return false;
+    }
+
+    if ( RunTime < 2 ) {
+        printf ( "ERROR : invalide amount of run time passed [%d], should be greater than 2\n", RunTime );
+        return false;
+    }
+
+    return true;
+}   /* ParseArgs() */
+
+
+const char UsageDefaultName[] = "Henri Fuseli";
+rc_t CC UsageSummary (const char* progname) { return 0; }
+rc_t CC Usage ( const Args * args ) { return 0; }
+
+rc_t CC KMain(int argc, char *argv[]) {
+
+
+    if ( ! ParseArgs ( argc, argv ) ) {
+        RightUsage();
+        return 1;
+    }
+
+    if ( signal ( SIGINT, XTaskerSigIntHandler ) == SIG_ERR ) {
+        printf ( "Can not instal signal handlers\n" );
+        return RC ( rcExe, rcFile, rcReading, rcParam, rcInvalid );
+    }
+
+    return run ( NumThr, RunTime, FilePath, PathIsList );
+}
diff --git a/test/fuse/remote-fuser-test.vers b/test/fuse/remote-fuser-test.vers
new file mode 100644
index 0000000..8acdd82
--- /dev/null
+++ b/test/fuse/remote-fuser-test.vers
@@ -0,0 +1 @@
+0.0.1
diff --git a/test/fuse/remote-fuser-test.vers.h b/test/fuse/remote-fuser-test.vers.h
new file mode 100644
index 0000000..625fe28
--- /dev/null
+++ b/test/fuse/remote-fuser-test.vers.h
@@ -0,0 +1 @@
+#define REMOTE_FUSER_TEST_VERS 0x00000001
diff --git a/test/fuse/remote_fuser_test.sh b/test/fuse/remote_fuser_test.sh
new file mode 100755
index 0000000..f1c79ae
--- /dev/null
+++ b/test/fuse/remote_fuser_test.sh
@@ -0,0 +1,685 @@
+#!/bin/bash
+
+ulimit -c unlimited
+
+#####################################################################
+## Lyrics:
+##
+## That script has three parameters:
+## 
+##      config_name : it will try to find configuration file
+##                    cfg/config_name.cfg ( optional )
+##                    default config name is 'standard'
+##     time_minutes : run time of script in minutes ( optional )
+##                    default time is 180 minutes
+##    bin_directory : place where binary files like remote-fuser
+##                    etc are located ( mandatory )
+##
+#####################################################################
+
+##  Where we are, who we are?
+##
+SCR_DIR=`dirname $0`
+SCR_DIR=`cd $SCR_DIR; pwd`
+
+SCR_NAME=`basename $0`
+SCR_SNAME=`basename $0 .sh`
+
+####
+##  Environment: Jy's a mal naaier maar ek hou van jou baie
+#
+for i in @ USER REMOTE_USER HOME HOST HOSTNAME HOSTTYPE
+do
+    echo "[$i] [${!i}]"
+done
+echo "[groups] [`groups`]"
+
+####
+##  Some interesting stuff
+#
+
+_bump ()
+{
+    echo ""
+    echo "####################################################################"
+    echo "####################################################################"
+    echo "##"
+    echo "## `date`"
+    echo "##"
+    echo "####################################################################"
+}
+
+_msg ( )
+{
+    echo "INF[$SCR_SNAME][`date +%Y-%m-%d_%H:%M:%S`] $@"
+}
+
+_wrn ( )
+{
+    echo "WRN[$SCR_SNAME][`date +%Y-%m-%d_%H:%M:%S`] $@" >&2
+}
+
+_err ( )
+{
+    echo "ERR[$SCR_SNAME][`date +%Y-%m-%d_%H:%M:%S`] $@" >&2
+}
+
+_err_exit ( )
+{
+    _err $@
+    _err Exiting ...
+    exit 1
+}
+
+_exec ()
+{
+    CDM="$@"
+    _msg "## $CDM"
+    eval "$CDM"
+    if [ $? -ne 0 ]
+    then
+        _err_exit "FAILED: $CDM"
+    fi
+}
+
+check_dir ( )
+{
+    if [ -n "$1" ]
+    then
+        if [ -d "$1" ]
+        then
+            return 0
+        else
+            _err_exit "check_dir(): can not stat directory '$1'"
+        fi
+    else
+        _err_exit "cneck_dir(): missed parameters"
+    fi
+}
+
+##  Some usefuls
+##
+CFG_DIR=$SCR_DIR/cfg
+check_dir $CFG_DIR
+
+####
+##  Here the usage and Arguments processing
+#
+CFG_NAME_DEF="standard"
+CFG_NAME=$CFG_NAME_DEF
+
+RUN_TIME_DEF=180
+RUN_TIME=$RUN_TIME_DEF
+
+BIN_DIR=""
+
+usage ( )
+{
+    cat >&2 <<EOF
+
+This script will test remote_fuser utility. 
+Syntax is :
+
+    $SCR_NAME [ config_name ] [ run_time ] binary_directory
+
+Where :
+
+         config_name - name of config to use. 
+                       String. Optional. Default "$CFG_NAME_DEF"
+            run_time - time to run script.
+                       Integer. Optional. Default "$RUN_TIME_DEF"
+    binary_directory - directory which contains executables, like
+                       remote-fuser, remote-fuser-reader, etc
+
+EOF
+}
+
+_qualify ()
+{
+    VAL=$1
+
+    if [ -z "$VAL" ]
+    then
+        _err_exit "qualify(): missed parameter"
+    fi
+
+##  Simple, if it is number, it is time, overwise it is config name
+##
+    if [[ $VAL != *[!0-9]* ]]
+    then
+        RUN_TIME=$VAL
+    else
+        CFG_NAME=$VAL
+    fi
+}
+
+case $# in
+    3)
+        _qualify $1
+        _qualify $2
+        BIN_DIR=$3
+        ;;
+    2)
+        _qualify $1
+        BIN_DIR=$2
+        ;;
+    1)
+        BIN_DIR=$1
+        ;;
+    *)
+        usage
+        _err_exit Invalid parameters
+        ;;
+esac
+
+##  Checking arguments
+##
+CFG_FILE=$CFG_DIR/${CFG_NAME}.cfg
+if [ ! -f "$CFG_FILE" ]
+then
+    _err_exit "Can not stat config file with name '$CFG_NAME'"
+fi
+
+##  Checking RUN_TIME ... it should not be less than 3 minutes
+##
+if [ $RUN_TIME -le 3 ]
+then
+    _err_exit "Run time parameter should be greater than 3 minutes"
+fi
+
+##  Checking BIN_DIR and binaries
+##
+if [ ! -d "$BIN_DIR" ]
+then
+    _err_exit "Can not stat BIN_DIR directory '$BIN_DIR'"
+fi
+
+BIN_DIR=$BIN_DIR/../bin
+if [ ! -d "$BIN_DIR" ]
+then
+    _err_exit "Can not stat BIN_DIR directory '$BIN_DIR'"
+fi
+BIN_DIR=`cd $BIN_DIR; pwd`
+
+TESTBIN_DIR=$BIN_DIR/../test-bin
+if [ ! -d "$TESTBIN_DIR" ]
+then
+    _err_exit "Can not stat TESTBIN_DIR directory '$TESTBIN_DIR'"
+fi
+TESTBIN_DIR=`cd $TESTBIN_DIR; pwd`
+
+####
+##  Loading fonfig file
+#
+. $CFG_FILE
+if [ $? -ne 0 ]
+then
+    _err_exit "Can not load config file '$CFG_NAME'"
+fi
+
+####
+##  Checking config file data and prepareing environment
+#
+EFF_USER=$USER
+if [ -z "$EFF_USER" ]
+then
+    EFF_USER=`id -n -u`
+    if [ -z "$EFF_USER" ]
+    then
+        EFF_USER="undefined-user"
+        # _err_exit "Environment variable \$USER is not set"
+    fi
+fi
+
+if [ -z "$TEST_DIR" ]
+then
+    _err_exit "Config does not have definition for variable TEST_DIR"
+fi
+
+if [ ! -d "$TEST_DIR" ]
+then
+    _err_exit "Can not stat directory '$TEST_DIR'"
+fi
+
+F_TEST_DIR=$TEST_DIR/$EFF_USER
+if [ ! -d "$F_TEST_DIR" ]
+then
+    _msg "Creating directory '$F_TEST_DIR'"
+    _exec mkdir $F_TEST_DIR
+    _exec chmod ugoa+rwx $F_TEST_DIR
+fi
+F_TEST_DIR=`cd $F_TEST_DIR; pwd`
+
+_check_assign_dir ()
+{
+    if [ $# -ne 2 ]
+    then
+        _err_exit "_check_assign_dir(): requires two arguments"
+    fi
+
+    VAL=$F_TEST_DIR/$1
+    if [ ! -d "$VAL" ]
+    then
+        _msg "_check_assign_dir(): creating directory '$VAL'"
+
+        _exec mkdir $VAL
+    fi
+
+    eval "$2=$VAL"
+}
+
+_check_assign_dir bin F_BIN_DIR
+_check_assign_dir cache F_CACHE_DIR
+_check_assign_dir mount F_MOUNT_DIR
+_check_assign_dir temp F_TEMP_DIR
+_check_assign_dir log F_LOG_DIR
+_check_assign_dir depot F_DEPOT_DIR
+
+## Here we are checking that there is no remote-fuser mount
+##
+_same_dir ()
+{
+    if [ $# -ne 2 ]
+    then
+        _err_exit "_same_dir(): requires two arguments"
+    fi
+
+    N1=`basename $1`
+    N2=`basename $2`
+    if [ "$N1" == "$N2" ]
+    then
+        N1=`dirname $1`
+        N2=`dirname $2`
+        if [ "$N1" -ef "$N2" ]
+        then
+            return 0
+        fi
+    fi
+
+    return 1
+}
+
+_check_mount ()
+{
+        ## We are simple not check an mount directory.
+    for i in `mount | awk ' { print $3 } ' `
+    do
+        _same_dir $1 $i
+        if [ $? -eq 0 ]
+        then
+            return 0
+        fi
+    done
+
+    return 1
+}
+
+_check_mount $F_MOUNT_DIR
+if [ $? -eq 0 ]
+then
+    _err_exit "Mount point is in use '$F_MOUNT_DIR'"
+fi
+
+
+##  Here we are clearing old logs
+##
+DAYS_KEEP_LOG=10
+
+SEC_IN_DAY=$(( 60 * 60 * 24 ))
+NOW_DAY=$(( `date +%s` / $SEC_IN_DAY ))
+
+check_remove ()
+{
+    F2R=$1
+
+    if [ -n "$F2R" ]
+    then
+        FILE_DAY=$(( `stat --print="%X" $F2R` / $SEC_IN_DAY ))
+        DALT=$(( $NOW_DAY - $FILE_DAY ))
+        if [ $DAYS_KEEP_LOG -le $DALT ]
+        then
+            _msg Log file is $DALT days old, removing \'$F2R\'
+            echo rm -f $F2R
+            if [ $? -ne 0 ]
+            then
+                _wrn Can not remove file \'$F2R\'
+            fi
+        fi
+    fi
+}
+
+clear_old_logs ()
+{
+    _msg Clearing old logs ...
+
+    for i in `ls $F_LOG_DIR`
+    do
+        check_remove $F_LOG_DIR/$i
+    done
+}
+
+clear_old_logs
+
+##  Here we are logging and execing
+##
+F_TIME_STAMP=`date +%Y-%m-%d_%H-%M-%S`
+F_LOG_FILE=$F_LOG_DIR/${SCR_SNAME}.log.${F_TIME_STAMP}
+echo Log file: $F_LOG_FILE
+exec >$F_LOG_FILE 2>&1
+
+## Here we are copying binaries
+##
+_copy_assign_app ()
+{
+    if [ $# -ne 3 ]
+    then
+        _err_exit "_copy_assign_app(): requires two arguments"
+    fi
+
+    SRC=$1/$2
+    if [ ! -x "$SRC" ]
+    then
+        _err_exit "_copy_assign_app(): can not stat file '$SRC'"
+    fi
+
+    LNK=$F_BIN_DIR/$2
+
+    eval cmp $SRC $LNK
+    if [ $? -ne 0 ]
+    then
+        DST=$F_DEPOT_DIR/${2}.${F_TIME_STAMP}
+        _exec cp -p $SRC $DST
+        _exec rm -f $LNK
+        _exec ln -s $DST $LNK
+    fi
+
+    eval "$3=$LNK"
+}
+
+_copy_assign_app $BIN_DIR remote-fuser REMOTE_FUSER_APP
+_copy_assign_app $TESTBIN_DIR remote-fuser-test REMOTE_FUSER_TEST_APP
+
+###
+##  Here we are checking and pre-processing XML file
+#
+if [ -z "$XML_URL" ]
+then
+    _err_exit "Config does not have definition for variable XML_URL"
+fi
+
+eval HEAD "$XML_URL" >/dev/null
+if [ $? -ne 0 ]
+then
+    _err_exit "Can not stat XML file from '$XML_URL'"
+fi
+
+F_FUSE_XML=$F_TEMP_DIR/FUSE.xml.$F_TIME_STAMP
+eval GET "$XML_URL" >$F_FUSE_XML
+if [ $? -ne 0 ]
+then
+    _err_exit "Can not download XML file from '$XML_URL'"
+fi
+
+###
+##  Here we are starting FUSER
+#
+_msg Starting Fuse
+
+FUSER_LOG=$F_LOG_DIR/remote-fuser.log.$F_TIME_STAMP
+FUSER_CMD="$REMOTE_FUSER_APP -d -x $XML_URL -m $F_MOUNT_DIR -e $F_CACHE_DIR -L 5 -B 4 -o kernel_cache"
+
+_msg "## $FUSER_CMD"
+$FUSER_CMD >$FUSER_LOG 2>&1 &
+FUSER_PID=$!
+
+_is_fuser_run ()
+{
+    if [ -n "$FUSER_PID" ]
+    then
+        ps -p $FUSER_PID >/dev/null 2>&1
+        if [ $? -eq 0 ]
+        then
+            _wrn PROCESS WITH PID $FUSER_PID EXISTS
+            return 0
+        fi
+    fi
+
+    _check_mount $F_MOUNT_DIR
+    if [ $? -eq 0 ]
+    then
+        _wrn MOUNT STILL EXISTS
+        return 0
+    fi
+
+    return 1
+}
+
+_shutdown_exit ()
+{
+    _err Shutdown FUSER and exit
+        ##  Check if there is still mount
+        ##
+    _check_mount $F_MOUNT_DIR
+    if [ $? -eq 0 ]
+    then
+        /bin/fusermount -u $F_MOUNT_DIR
+    fi
+
+    sleep 1
+
+        ##  Check that process is still in the memory
+        ##
+    if [ -n "$FUSER_PID" ]
+    then
+        ps -p $FUSER_PID >/dev/null 2>&1
+        if [ $? -eq 0 ]
+        then
+            _err Killing FUSER process $FUSER_PID
+            kill -9 $FUSER_PID
+        fi
+    fi
+
+    sleep 3
+
+    if [ -n "$FUSER_PID" ]
+    then
+        ps -p $FUSER_PID >/dev/null 2>&1
+        if [ $? -eq 0 ]
+        then
+            _err_exit Failed to shutdown FUSER
+        fi
+    fi
+
+    _check_mount $F_MOUNT_DIR
+    if [ $? -eq 0 ]
+    then
+        _err_exit Failed to shutdown FUSER
+    fi
+
+    _err_exit FUSER was shut down
+}
+
+_stop_fuser ()
+{
+    _msg "Stopping Fule"
+    MCD="$REMOTE_FUSER_APP -u -m $F_MOUNT_DIR"
+    _msg "## $MCD"
+    $MCD
+
+    sleep 50
+
+    _is_fuser_run
+    if [ $? -eq 0 ]
+    then
+        _shutdown_exit
+    fi
+}
+
+_test_failed ()
+{
+    _err "TEST FAILED: $@"
+
+    _stop_fuser
+
+    _err_exit 
+}
+
+##  Here we should wait a some time and check that mount is success
+##  The mount is success if there is record in mtab and some files
+##  appeared in mount directory
+##
+for i in All the way home from Baltimore "(C)" Talking Heads THE_END
+do
+    case $i in
+        THE_END)
+            _err Can not start fuser
+            _shutdown_exit
+            ;;
+        *)
+            echo -n "$i "
+            sleep 1
+            _check_mount $F_MOUNT_DIR
+            if [ $? -eq 0 ]
+            then
+                echo ...
+                break
+            fi
+            ;;
+    esac
+done
+
+#####################################################################
+#####################################################################
+#####
+### First test is checking that file downloads full and correctly
+#
+
+_bump
+_msg TEST 1: Downloading single file
+
+## First we are trying to choose not big file to download
+##
+LINF=` grep "<File" $F_FUSE_XML | sed "s#name=##1" | sed "s#size=##1" | sed "s#path=##1" | sed "s#\"##g" | awk ' { print $2 " " $3 " " $4 } ' | sort -n -k 2 | awk ' BEGIN { SZ=0; NM=""; UR="" } { if ( SZ < 100000 ) { if ( SZ < int ( $2 ) ) { SZ = int ( $2 ); NM = $1; UR = $3 } } } END { print NM " " SZ " "  UR } ' `
+if [ -z "$LINF" ]
+then
+    _test_failed "Invalid XML file '$F_FUSE_XML'"
+fi
+
+REMOTE_URL=`echo $LINF | awk ' { print $3 } ' `
+LOCAL_FILE=`echo $LINF | awk ' { print $1 } ' `
+TEMP_FILE=$F_TEMP_DIR/${LOCAL_FILE}.${F_TIME_STAMP}
+
+## Downloading copy of proxied file
+##
+_msg "Downloading file '$REMOTE_URL'"
+eval GET "$REMOTE_URL" >$TEMP_FILE
+if [ $? -ne 0 ]
+then
+    _test_failed "Can not load remote file '$REMOTE_URL'"
+fi
+
+## Compareing downloaded file with file proxied by FUSE
+##
+_msg "Compareing downloaded file '$REMOTE_URL' with $F_MOUNT_DIR/$LOCAL_FILE"
+eval cmp $TEMP_FILE $F_MOUNT_DIR/$LOCAL_FILE
+if [ $? -ne 0 ]
+then
+    _test_failed "Invalid file content '$F_MOUNT_DIR/$LOCAL_FILE'"
+fi
+
+## Checking CACHE directory, cuz here should be only one file,
+## without ".cache" extention
+##
+RCA_DIR=$F_CACHE_DIR/.cache
+FILES=(`ls $RCA_DIR`)
+if [ ${#FILES[@]} -ne 1 ]
+then
+    ls $RCA_DIR >&2
+    _test_failed "Invalid content of cache directory '$RCA_DIR'"
+fi
+
+if [[ "${FILES[0]}" == *.cache ]]
+then
+    ls $RCA_DIR >&2
+    _test_failed "Partially downloaded file at '$RCA_DIR'"
+fi
+
+_msg TEST 1: Passed
+
+#####################################################################
+#####################################################################
+#####
+### Second multithread access to singe file
+#
+
+_bump
+_msg TEST 2: Multithread acces to single file
+
+R_TM=2
+N_THR=30
+
+## First we should choose file big enough for a test ...
+## couple hundred megs is OK
+##
+
+for i in `ls $F_MOUNT_DIR`
+do
+    if [ `stat --print="%s" $F_MOUNT_DIR/$i` -gt 200000000 ]
+    then
+        FILE_NAME=$i
+        break
+    fi
+done
+
+if [ -z "$FILE_NAME" ]
+then
+    _test_failed "Can not find file with suitable size"
+fi
+
+## TEST_LOG="$F_LOG_DIR/remote-fuser-test-single.log.$F_TIME_STAMP"
+## TEST_CMD="$REMOTE_FUSER_TEST_APP -t $N_THR -r $R_TM $F_MOUNT_DIR/$FILE_NAME >$TEST_LOG 2>&1"
+TEST_CMD="$REMOTE_FUSER_TEST_APP -t $N_THR -r $R_TM $F_MOUNT_DIR/$FILE_NAME"
+_msg "## $TEST_CMD"
+eval "$TEST_CMD"
+if [ $? -ne 0 ]
+then
+    _test_failed "Single file test failed"
+fi
+
+_msg TEST 2: Passed
+
+#####################################################################
+#####################################################################
+#####
+### Second multithread access to set of files
+#
+
+_bump
+_msg TEST 3: Multithread acces to set of files
+
+## First we should create list of files with limitation
+##
+
+LIST_FILE=$F_TEMP_DIR/listfile.$F_TIME_STAMP
+for i in `ls $F_MOUNT_DIR`
+do
+    echo $F_MOUNT_DIR/$i >>$LIST_FILE
+done
+
+TEST_CMD="$REMOTE_FUSER_TEST_APP -t $N_THR -r $RUN_TIME -l $LIST_FILE"
+_msg "## $TEST_CMD"
+eval "$TEST_CMD"
+if [ $? -ne 0 ]
+then
+    _test_failed "Multiply files test failed"
+fi
+
+
+_msg TEST 3: Passed
+
+#####
+### Here we are stopping fuser
+#
+_stop_fuser
+
+_msg TEST PASSED!
diff --git a/test/fuse/utils.c b/test/fuse/utils.c
new file mode 100644
index 0000000..e1f2873
--- /dev/null
+++ b/test/fuse/utils.c
@@ -0,0 +1,867 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <klib/rc.h>
+#include <klib/out.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <kfs/file.h>
+#include <kfs/directory.h>
+#include <kproc/lock.h>
+#include <kproc/thread.h>
+
+#include <atomic32.h>
+
+#include "utils.h"
+
+#include <sysalloc.h>
+#include <stdio.h>
+#include <sys/time.h>
+#include <time.h>
+#include <unistd.h>
+#include <signal.h>
+
+ /*))))
+   |||| XStats implementation
+   ((((*/
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*))
+ || XTmXXXX stuff
+((*/
+
+/*)))
+ ///  Mesuring time in ... microzecoidz from :
+ \\\     # date -d @1380000000
+ ///     Tue Sep 24 01:20:00 EDT 2013
+(((*/
+const uint64_t _DateFrom = 1380000000;
+const uint64_t _DateCoeff = 1000000;
+
+uint64_t CC
+XTmNow ()
+{
+    struct timeval TV;
+    uint64_t RetVal;
+
+    gettimeofday ( & TV, NULL );
+    RetVal = ( ( TV.tv_sec - _DateFrom ) * _DateCoeff ) + TV.tv_usec;
+
+
+    return RetVal;
+}   /* XTmNow () */
+
+/*))
+ || XStats struct
+((*/
+struct XStats {
+    struct KLock * mutabor;
+
+    uint64_t start_time;    /* Time of starting stat */
+
+    uint64_t qty;           /* all Reads Qty */
+    uint64_t err_qty;       /* bad Reads Qty */
+    uint64_t time;          /* Time of Reads cumulative */
+    uint64_t size;          /* all Reads Qty */
+};
+
+static rc_t CC _XStatsReset_NoLock ( const struct XStats * self );
+
+rc_t CC
+XStatsDispose ( const struct XStats * self )
+{
+    struct XStats * Stats = ( struct XStats * ) self;
+
+    if ( Stats != NULL ) {
+        if ( Stats -> mutabor != NULL ) {
+            KLockRelease ( Stats -> mutabor );
+            Stats -> mutabor = NULL;
+        }
+
+        _XStatsReset_NoLock ( self );
+
+        free ( Stats );
+    }
+
+    return 0;
+}   /* XStatDispose () */
+
+rc_t CC
+XStatsMake ( const struct XStats ** Stats )
+{
+    rc_t RCt;
+    struct XStats * Ret;
+
+    RCt = 0;
+    Ret = NULL;
+
+    if ( Stats != NULL ) {
+        * Stats = NULL;
+    }
+
+    Ret = calloc ( 1, sizeof ( struct XStats ) );
+    if ( Ret == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcExhausted );
+    }
+    else {
+        RCt = KLockMake ( & ( Ret -> mutabor ) );
+        if ( RCt == 0 ) {
+            RCt = XStatsReset ( Ret );
+            if ( RCt == 0 ) {
+                * Stats = ( const struct XStats * ) Ret;
+            }
+        }
+    }
+
+    if ( RCt != 0 ) {
+        * Stats = NULL;
+
+        if ( Ret != NULL ) {
+            XStatsDispose ( Ret );
+        }
+    }
+
+    return RCt;
+}   /* XStatMake () */
+
+static
+rc_t CC
+_XStatsReset_NoLock ( const struct XStats * self )
+{
+    struct XStats * Stats = ( struct XStats * ) self;
+
+    if ( Stats != NULL ) {
+        Stats -> start_time = XTmNow ();
+
+        Stats -> qty = 0;
+        Stats -> err_qty = 0;
+        Stats -> time = 0;
+        Stats -> size = 0;
+    }
+
+    return 0;
+}   /* _XStatsReset_NoLock () */
+
+rc_t CC
+XStatsReset ( const struct XStats * self )
+{
+    rc_t RCt = 0;
+
+    if ( self != NULL ) {
+        RCt = KLockAcquire ( self -> mutabor );
+        if ( RCt == 0 ) {
+            RCt = _XStatsReset_NoLock ( self );
+            KLockUnlock ( self -> mutabor );
+        }
+    }
+
+    return RCt;
+}   /* XStatReset () */
+
+rc_t CC
+XStatsGood ( const struct XStats * self, uint64_t Size, uint64_t Time )
+{
+    rc_t RCt;
+    struct XStats * Stats;
+
+    RCt = 0;
+    Stats = ( struct XStats * ) self;
+
+    if ( Stats != NULL ) {
+        RCt = KLockAcquire ( Stats -> mutabor );
+        if ( RCt == 0 ) {
+            Stats -> qty ++;
+            Stats -> time += Time;
+            Stats -> size += Size;
+
+            KLockUnlock ( Stats -> mutabor );
+        }
+    }
+
+    return RCt;
+}   /* XStatDispose () */
+
+rc_t CC
+XStatsBad ( const struct XStats * self )
+{
+    rc_t RCt;
+    struct XStats * Stats;
+
+    RCt = 0;
+    Stats = ( struct XStats * ) self;
+
+    if ( Stats != NULL ) {
+        RCt = KLockAcquire ( Stats -> mutabor );
+        if ( RCt == 0 ) {
+            Stats -> err_qty ++;
+
+            KLockUnlock ( Stats -> mutabor );
+        }
+    }
+
+    return RCt;
+}   /* XStatDispose () */
+
+rc_t CC
+XStatsReport ( const struct XStats * self )
+{
+    rc_t RCt;
+    uint64_t Per;
+    uint64_t Tim;
+
+    RCt = 0;
+    Per = 0;
+    Tim = 0;
+
+    if ( self != NULL ) {
+        RCt = KLockAcquire ( self -> mutabor );
+        if ( RCt == 0 ) {
+            printf ( "<<== Read Stats\n" );
+            printf ( "  READ QTY : %lu\n", self -> qty );
+            Per = self -> qty == 0 ? 0 : ( ( int ) ( ( ( float ) self -> err_qty * 100.0f ) / ( float ) ( self -> qty ) ) );
+            printf ( "    ERRORS : %lu [%lu%%]\n", self -> err_qty, Per );
+            Tim = ( XTmNow () - self -> start_time ) / 1000000;
+            printf ( "      TIME : %lu sec\n", Tim );
+            printf ( "  ACC TIME : %lu sec\n", self -> time / 1000000 );
+            printf ( " READ SIZE : %lu but\n", self -> size );
+
+            Per = self -> time == 0 ? 0 : ( self -> size / Tim ) ;
+            printf ( " THOUGHOUT : %lu bit per sec\n", Per );
+
+            KLockUnlock ( self -> mutabor );
+        }
+    }
+
+    return RCt;
+}   /* XStatDispose () */
+
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+struct XTasker;
+
+struct XTask {
+    const struct XTasker * tasker;
+
+    struct KThread * thread;
+
+    size_t task_no;
+
+    size_t buffer_size;
+    char * buffer;
+};
+
+struct XTasker {
+    size_t task_qty;
+    const struct XTask ** tasks;
+
+    atomic32_t iteration;
+    atomic32_t is_run;
+    atomic32_t is_done;
+
+    uint64_t stop_at;
+
+    const struct XStats * stat;
+
+    void * job_4_task_data;
+    Job4Task job_4_task;
+};
+
+rc_t CC _TaskStop ( const struct XTask * self );
+
+static
+rc_t CC
+_TaskDispose ( const struct XTask * self )
+{
+    struct XTask * Task = ( struct XTask * ) self;
+
+    if ( Task != NULL ) {
+        if ( Task -> thread != NULL ) {
+            _TaskStop ( Task );
+        }
+
+        Task -> task_no = 0;
+
+        Task -> buffer_size = 0;
+        if ( Task -> buffer != NULL ) {
+            free ( Task -> buffer );
+            Task -> buffer = NULL;
+        }
+
+        Task -> tasker = NULL;
+    }
+
+    return 0;
+}   /* _TaskDispose () */
+
+static
+rc_t CC
+_TaskMake (
+        const struct XTask ** Task,
+        const struct XTasker * Tasker,
+        size_t TaskNo
+)
+{
+    rc_t RCt;
+    struct XTask * Ret;
+
+    RCt = 0;
+    Ret = NULL;
+
+    if ( * Task != NULL ) {
+        * Task = NULL;
+    }
+
+    if ( Tasker == NULL || Task == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+    Ret = calloc ( 1, sizeof ( struct XTask ) );
+    if ( Ret == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcExhausted );
+    }
+    else {
+        Ret -> tasker = Tasker;
+        Ret -> task_no = TaskNo;
+
+        * Task = ( const struct XTask * ) Ret;
+    }
+
+    if ( RCt != 0 ) {
+        * Task = NULL;
+
+        if ( Ret != NULL ) {
+            _TaskDispose ( Ret );
+        }
+    }
+
+    return RCt;
+}   /* _TaskMake () */
+
+static
+rc_t CC
+_TaskRealloc ( const struct XTask * self, size_t BufferSize )
+{
+    struct XTask * Task = ( struct XTask * ) self;
+
+    if ( Task -> buffer_size < BufferSize ) {
+        if ( Task -> buffer != 0 ) {
+            free ( Task -> buffer );
+
+            Task -> buffer = NULL;
+            Task -> buffer_size = 0;
+        }
+
+        Task -> buffer_size = ( ( BufferSize / 1024 ) + 1 ) * 1024;
+        Task -> buffer = calloc (
+                                Task -> buffer_size,
+                                sizeof ( char )
+                                );
+        if ( Task -> buffer == NULL ) {
+            return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcExhausted );
+        }
+    }
+
+    return 0;
+}   /* _TaskRealloc () */
+
+
+static
+rc_t CC
+_TaskRead ( const struct XTask * self )
+{
+    rc_t RCt;
+    const char * Name;
+    uint64_t Offset;
+    size_t Size, NumRead;
+    struct KDirectory * Directory;
+    const struct KFile * File;
+    uint64_t Time;
+
+    RCt = 0;
+    Name = NULL;
+    Offset = 0;
+    Size = NumRead = 0;
+    Directory = NULL;
+    File = NULL;
+    Time = 0;
+
+    if ( self == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+    if ( self -> tasker == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcInvalid );
+    }
+
+    RCt = XTaskerNewJob ( self -> tasker, & Name, & Offset, & Size );
+    if ( RCt == 0 ) {
+        if ( Name != NULL ) {
+            RCt = _TaskRealloc ( self, Size );
+            if ( RCt == 0 ) {
+                RCt = KDirectoryNativeDir ( & Directory );
+                if ( RCt == 0 ) {
+                    RCt = KDirectoryOpenFileRead (
+                                                Directory,
+                                                & File,
+                                                Name
+                                                );
+                    if ( RCt == 0 ) {
+                        Time = XTmNow ();
+
+                        RCt = KFileReadAll (
+                                            File,
+                                            Offset,
+                                            self -> buffer,
+                                            Size,
+                                            & NumRead
+                                            );
+                        if ( RCt == 0 ) {
+                            XStatsGood (
+                                        self -> tasker -> stat,
+                                        NumRead,
+                                        ( XTmNow () - Time )
+                                        );
+                        }
+                        else {
+                            XStatsBad ( self -> tasker -> stat );
+                        }
+
+                        KFileRelease ( File );
+                    }
+                    KDirectoryRelease ( Directory );
+                }
+            }
+        }
+    }
+
+    return RCt;
+}   /* _TaskRead () */
+
+static
+bool CC
+_TaskDone ( const struct XTask * self )
+{
+    if ( self != NULL ) {
+        return XTaskerIsDoneSet ( self -> tasker );
+    }
+
+    return true;
+}   /* _TaskDone () */
+
+static
+rc_t CC
+_TaskThreadProc ( const struct KThread * Thread, void * Data )
+{
+    rc_t RCt;
+    struct XTask * Task;
+
+    RCt = 0;
+    Task = ( struct XTask * ) Data;
+
+    if ( Thread == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+    if ( Data == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+    while ( true ) {
+        /* We are ignoring the return code, cuz there is statistic */
+        /* RCt = */
+        _TaskRead ( Task );
+
+        if ( _TaskDone ( Task ) ) {
+            break;
+        }
+    }
+
+    atomic32_dec ( ( atomic32_t * ) & ( Task -> tasker -> is_run ) );
+
+    return RCt;
+}   /* _TaskThreadProc () */
+
+static
+rc_t CC
+_TaskRun ( const struct XTask * self )
+{
+    struct XTask * Task = ( struct XTask * ) self;
+
+    if ( self == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+    if ( self -> tasker == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcInvalid );
+    }
+
+    if ( self -> thread != NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcInvalid );
+    }
+
+    atomic32_read_and_add (
+                ( atomic32_t * ) & ( Task -> tasker -> is_run ), 1
+                );
+
+    return KThreadMake ( & ( Task -> thread ), _TaskThreadProc, Task );
+}   /* _TaskRun () */
+
+rc_t CC
+_TaskStop ( const struct XTask * self )
+{
+    rc_t RCt;
+    struct XTask * Task;
+
+    RCt = 0;
+    Task = ( struct XTask * ) self;
+
+    if ( self == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+    KThreadCancel ( Task -> thread );
+    KThreadWait ( Task -> thread, NULL );
+    KThreadRelease ( Task -> thread );
+
+    Task -> thread = NULL;
+
+    return RCt;
+}   /* TaskStop () */
+
+rc_t CC
+XTaskerDispose ( const struct XTasker * self )
+{
+    struct XTasker * Tasker;
+    size_t llp;
+
+    Tasker = ( struct XTasker * ) self;
+    llp = 0;
+
+    if ( Tasker != NULL ) {
+        if ( Tasker -> stat != NULL ) {
+            XStatsDispose ( Tasker -> stat );
+            Tasker -> stat = NULL;
+        }
+
+        if ( Tasker -> tasks != NULL ) {
+            for ( llp = 0; llp < Tasker -> task_qty; llp ++ ) {
+                if ( Tasker -> tasks [ llp ] != NULL ) {
+                    _TaskDispose ( Tasker -> tasks [ llp ] );
+                    Tasker -> tasks [ llp ] = NULL;
+                }
+            }
+        }
+        Tasker -> tasks = NULL;
+        Tasker -> task_qty = 0;
+
+        atomic32_set ( & ( Tasker -> iteration ), 0 );
+        atomic32_set ( & ( Tasker -> is_run ), 0 );
+        atomic32_set ( & ( Tasker -> is_done ), 0 );
+
+        Tasker -> stop_at = 0;
+
+        Tasker -> job_4_task_data = NULL;
+        Tasker -> job_4_task = NULL;
+
+        free ( Tasker );
+    }
+
+    return 0;
+}   /* XTaskerDispose () */
+
+/* JOJOBA here will be variable part */
+rc_t CC
+XTaskerMake (
+            const struct XTasker ** Tasker,
+            size_t NumThreads,
+            void * Data,
+            Job4Task Jobber
+)
+{
+    rc_t RCt;
+    struct XTasker * Ret;
+    size_t llp;
+
+    RCt = 0;
+    Ret = NULL;
+    llp = 0;
+
+    if ( Tasker != NULL ) {
+        * Tasker = NULL;
+    }
+
+    if ( Tasker == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+    if ( Jobber == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+    if ( NumThreads == 0 ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcInvalid );
+    }
+
+    Ret = calloc ( 1, sizeof ( struct XTasker ) );
+    if ( Ret == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcExhausted );
+    }
+    else {
+        Ret -> tasks = calloc ( NumThreads, sizeof ( struct XTask * ) );
+        if ( Ret -> tasks == NULL ) {
+            RCt = RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcExhausted );
+        }
+        else {
+            if ( RCt == 0 ) {
+                Ret -> task_qty = NumThreads;
+                for ( llp = 0; llp < NumThreads; llp ++ ) {
+                    RCt = _TaskMake ( Ret -> tasks + llp, Ret, llp );
+                    if ( RCt != 0 ) {
+                        break;
+                    }
+                }
+                if ( RCt == 0 ) {
+                    RCt = XStatsMake ( & ( Ret -> stat ) );
+                    if ( RCt == 0 ) { 
+                        atomic32_set ( & ( Ret -> iteration ), 0 );
+                        atomic32_set ( & ( Ret -> is_run ), 0 );
+                        atomic32_set ( & ( Ret -> is_done ), 0 );
+                        Ret -> stop_at = 0;
+                        Ret -> job_4_task_data = Data;
+                        Ret -> job_4_task = Jobber;
+
+                        * Tasker = Ret;
+                    }
+                }
+            }
+        }
+    }
+
+    if ( RCt != 0 ) {
+        * Tasker = NULL;
+
+        if ( Ret != NULL ) {
+            XTaskerDispose ( Ret );
+        }
+    }
+
+    return RCt;
+}   /* XTaskerMake () */
+
+rc_t CC
+XTaskerRun ( const struct XTasker * self, size_t Seconds )
+{
+    rc_t RCt;
+    size_t llp;
+
+    RCt = 0;
+    llp = 0;
+
+    if ( self == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+    if ( self -> tasks == NULL || self -> task_qty == 0 ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcInvalid );
+    }
+
+    ( ( struct XTasker * ) self ) -> stop_at =
+                                    XTmNow () + ( Seconds * 1000000 );
+
+    for ( llp = 0; llp < self -> task_qty; llp ++ ) {
+        if ( self -> tasks [ llp ] != NULL ) {
+            RCt = _TaskRun ( self -> tasks [ llp ] );
+        }
+
+        if ( RCt != 0 ) {
+            break;
+        }
+    }
+
+    RCt = XTaskerWait ( self );
+
+    return RCt;
+}   /* XTaskerRun () */
+
+bool CC
+XTaskerIsRunning ( const struct XTasker * self )
+{
+    if ( self != NULL ) {
+        return atomic32_read ( & ( self -> is_run ) ) != 0;
+    }
+
+    return false;
+}   /* XTaskerIsRunning () */
+
+rc_t CC
+XTaskerNewJob (
+            const struct XTasker * self,
+            const char ** FileName,
+            uint64_t * Offset,
+            size_t * Size
+)
+{
+    int Iteration = 0;
+
+    if ( FileName != NULL ) {
+        * FileName = NULL;
+    }
+
+    if ( Offset != NULL ) {
+        * Offset = 0;
+    }
+
+    if ( Size != NULL ) {
+        * Size = 0;
+    }
+
+    if ( self == NULL || FileName == NULL || Offset == NULL || Size == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+    Iteration = atomic32_read_and_add (
+                            ( atomic32_t * ) & ( self -> iteration ),
+                            1
+                            );
+
+    if ( XTaskerIsDoneSet ( self ) ) {
+        return 0;
+    }
+
+    return self -> job_4_task (
+                            self -> job_4_task_data,
+                            Iteration,
+                            FileName,
+                            Offset,
+                            Size
+                            );
+}   /* XTaskerNewJob () */
+
+rc_t CC
+XTaskerSetDone ( const struct XTasker * self )
+{
+    if ( self == NULL ) {
+        return RC ( rcExe, rcNoTarg, rcProcessing, rcParam, rcNull );
+    }
+
+    atomic32_set ( ( atomic32_t * ) & ( self -> is_done ), 1 );
+
+    return 0;
+}   /* XTaskerSetDone () */
+
+bool CC
+XTaskerIsDoneSet ( const struct XTasker * self )
+{
+    if ( self != NULL ) {
+        return atomic32_read ( & ( self -> is_done ) ) != 0;
+    }
+
+    return false;
+}   /* XTaskerIsDoneSet () */
+
+bool CC
+XTaskerIsDone ( const struct XTasker * self )
+{
+    return XTaskerIsDoneSet ( self ) && ! XTaskerIsRunning ( self );
+}   /* XTaskerIsDone () */
+
+static bool _sSigIntHandled = false;
+
+void CC
+XTaskerSigIntHandler ( int SigNo )
+{
+    if ( SigNo == SIGINT ) {
+        printf ( "SIGINT handled, ignored, but we will exit\n" );
+
+        _sSigIntHandled = true;
+    }
+}   /* XTaskerSigIntHandler () */
+
+rc_t CC
+XTaskerWait ( const struct XTasker * self )
+{
+    uint64_t Next = 0; 
+    uint64_t Now = 0; 
+    size_t llp = 0;
+    uint64_t Pardon = 600 * 1000000;
+    struct timespec t_spec;
+    struct timespec t_rem;
+
+    t_spec . tv_sec = 0;
+    t_spec . tv_nsec = 100000;
+
+    t_rem . tv_sec = 0;
+    t_rem . tv_nsec = 0;
+
+    if ( XTaskerIsRunning ( self ) ) {
+        Next = XTmNow () + Pardon;
+
+        while ( true ) {
+            nanosleep ( & t_spec, & t_rem );
+
+            if ( _sSigIntHandled ) {
+                XTaskerSetDone ( self );
+            }
+
+            Now = XTmNow ();
+
+            if ( self -> stop_at < Now ) {
+                if ( ! XTaskerIsDoneSet ( self ) ) {
+                    XTaskerSetDone ( self );
+                }
+            }
+
+            if ( XTaskerIsDone ( self ) ) {
+                break;
+            }
+
+            if ( Next < Now ) {
+                Next += Pardon;
+
+                XStatsReport ( self -> stat );
+            }
+        }
+
+        XStatsReport ( self -> stat );
+
+        for ( llp = 0; llp < self -> task_qty; llp ++ ) {
+            if ( self -> tasks [ llp ] != NULL ) {
+                _TaskStop ( self -> tasks [ llp ] );
+            }
+        }
+    }
+
+    return 0;
+}   /* XTaskerWait () */
diff --git a/test/fuse/utils.h b/test/fuse/utils.h
new file mode 100644
index 0000000..dd477a0
--- /dev/null
+++ b/test/fuse/utils.h
@@ -0,0 +1,120 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _utils_h_
+#define _utils_h_
+
+#include <xfs/xfs-defs.h>
+
+#ifdef __cplusplus 
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/**
+ ** Lyrics:
+ ** That file contains stupid things
+ **
+ **/
+
+/*) Fowards, and others
+ (*/
+
+/*) Something about time im MicroSeconds
+ (*/
+uint64_t CC XTmNow ( );
+
+/*) Statistics module
+ (*/
+struct XStats;
+
+rc_t CC XStatsMake ( const struct XStats ** Stats );
+rc_t CC XStatsDispose ( const struct XStats * self );
+
+rc_t CC XStatsReset ( const struct XStats * self );
+
+rc_t CC XStatsGood (
+                    const struct XStats * self,
+                    uint64_t Size,
+                    uint64_t Time
+                    );
+
+rc_t CC XStatsBad ( const struct XStats * self );
+
+rc_t CC XStatsReport ( const struct XStats * self ); 
+
+/*) Tasks
+ (*/
+struct XTasker;
+
+    /*  Supposed to return NULL Name and 0 RC if there are no
+     *  tasks anymore
+     */
+typedef rc_t ( CC * Job4Task ) (
+                            void * Data,
+                            int Iteration,
+                            const char ** Name,
+                            uint64_t * Offset,
+                            size_t * Size
+                            );
+
+rc_t CC XTaskerMake (
+                    const struct XTasker ** Tasker,
+                    size_t NumThreads,
+                    void * Data,
+                    Job4Task Jobber
+                    );
+rc_t CC XTaskerDispose ( const struct XTasker * self );
+
+rc_t CC XTaskerRun ( const struct XTasker * self, size_t Seconds );
+bool CC XTaskerIsRunning ( const struct XTasker * self );
+
+    /* We suppose if FileName returned as NULL, there are no new jobs
+     */
+rc_t CC XTaskerNewJob (
+                    const struct XTasker * self,
+                    const char ** FileName,
+                    uint64_t * Offset,
+                    size_t * Size
+                    );
+
+rc_t CC XTaskerSetDone ( const struct XTasker * self );
+bool CC XTaskerIsDoneSet ( const struct XTasker * self );
+bool CC XTaskerIsDone ( const struct XTasker * self );
+
+rc_t CC XTaskerWait ( const struct XTasker * self );
+
+void CC XTaskerSigIntHandler ( int SigNo );
+
+#ifdef __cplusplus 
+}
+#endif /* __cplusplus */
+
+#endif /* _utils_h_ */
diff --git a/test/general-loader/.gitignore b/test/general-loader/.gitignore
new file mode 100644
index 0000000..08ce4e2
--- /dev/null
+++ b/test/general-loader/.gitignore
@@ -0,0 +1,2 @@
+db
+*.gw
diff --git a/test/general-loader/Makefile b/test/general-loader/Makefile
new file mode 100644
index 0000000..ca7f02d
--- /dev/null
+++ b/test/general-loader/Makefile
@@ -0,0 +1,183 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/general-loader
+
+TEST_TOOLS = \
+    test-general-loader \
+	test-general-writer \
+	test-gw-dumper
+
+ALL_TOOLS = \
+	$(TEST_TOOLS) \
+
+include $(TOP)/build/Makefile.env
+
+INCDIRS += -I$(TOP)/tools/general-loader
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
+
+#-------------------------------------------------------------------------------
+# test-general-loader
+#
+TEST_GEN_LOAD_SRC = \
+	test-general-loader \
+    testsource
+
+TEST_GEN_LOAD_OBJ = \
+	$(addsuffix .$(OBJX),$(TEST_GEN_LOAD_SRC))
+
+TEST_GEN_LOAD_LIB =   \
+	-sncbi-wvdb-static  \
+    -sload              \
+	-skapp              \
+    -sktst              \
+
+$(TEST_BINDIR)/test-general-loader: $(TEST_GEN_LOAD_OBJ)
+	$(LP) --exe -o $@ $^ $(TEST_GEN_LOAD_LIB)
+
+gen_load: test-general-loader
+	$(TEST_BINDIR)/test-general-loader
+
+#-------------------------------------------------------------------------------
+# test-general-writer
+#
+TEST_GEN_WRITE_SRC = \
+	test-general-writer
+
+TEST_GEN_WRITE_OBJ = \
+	$(addsuffix .$(OBJX),$(TEST_GEN_WRITE_SRC))
+
+TEST_GEN_WRITE_LIB =   \
+    -L$(LIBDIR) \
+    -sgeneral-writer
+
+
+$(TEST_BINDIR)/test-general-writer: $(TEST_GEN_WRITE_OBJ)
+	$(LP) --exe -o $@ $^ $(TEST_GEN_WRITE_LIB)
+
+runtests:$(TEST_TOOLS) #piped-load-tests
+
+piped-load-tests: $(ALL_TOOLS)
+	-$(TEST_BINDIR)/test-general-writer | $(BINDIR)/general-loader -L=info
+	-$(BINDIR)/vdb-dump -T table1 remote_db
+	rm -rf remote_db
+
+#-------------------------------------------------------------------------------
+# test-gw-dumper
+#
+TEST_GW_DUMP_SRC = \
+	test-gw-dumper
+
+TEST_GW_DUMP_OBJ = \
+	$(addsuffix .$(OBJX),$(TEST_GW_DUMP_SRC))
+
+TEST_GW_DUMP_LIB =   \
+	-sgeneral-writer  \
+
+$(TEST_BINDIR)/test-gw-dumper: $(TEST_GW_DUMP_OBJ)
+	$(LP) --exe -o $@ $^ $(TEST_GW_DUMP_LIB)
+
+gw_dump: test-gw-dumper
+	$(TEST_BINDIR)/$^
+
+#-------------------------------------------------------------------------------
+# general-loader tool tests
+#
+runtests: setup tool-tests 
+
+setup:
+	@ mkdir -p db
+
+$(TEST_BINDIR)/makeinputs: makeinputs.cpp
+	@# generate numbered input streams for tool tests
+	$(CXX) makeinputs.cpp testsource.cpp -o $(TEST_BINDIR)/makeinputs -I$(INCDIRS) -L$(VDB_LIBDIR) -lncbi-vdb-static
+
+tool-tests: $(TEST_BINDIR)/makeinputs
+	@mkdir -p input && $(TEST_BINDIR)/makeinputs && rm $(TEST_BINDIR)/makeinputs
+	@#    
+	@# basic, unpacked
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) vdb-dump $(SRCDIR) 1 0 -I=$(VDB_INCDIR)
+	@#    
+	@# basic, packed
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) vdb-dump $(SRCDIR) 1packed 0 -I=$(VDB_INCDIR)
+	@#    
+	@# target db override 
+	@# use 1.gl which specifies the target as actual/1/db, and override that to where the script expects to see the result
+	@cp input/1.gl input/1override.gl && $(SRCDIR)/runtestcase.sh $(BINDIR) vdb-dump $(SRCDIR) 1override 0 "-I=$(VDB_INCDIR) --target actual/1override/db"
+	@# same with the storthand option
+	@cp input/1.gl input/1override.gl && $(SRCDIR)/runtestcase.sh $(BINDIR) vdb-dump $(SRCDIR) 1override 0 "-I=$(VDB_INCDIR) -T actual/1override/db"
+	@#    
+	@# error message event, unpacked
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) vdb-dump $(SRCDIR) 2 3 "-I=$(VDB_INCDIR) -L=err"
+	@#    
+	@# error message event, packed
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) vdb-dump $(SRCDIR) 2packed 3 "-I=$(VDB_INCDIR) -L=err"
+	@#    
+	@# empty default values, unpacked
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) vdb-dump $(SRCDIR) 3 0 -I=$(VDB_INCDIR)
+	@#    
+	@# empty default values, packed
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) vdb-dump $(SRCDIR) 3packed 0 -I=$(VDB_INCDIR)
+	@#    
+	@# move ahead event, unpacked
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) vdb-dump $(SRCDIR) 4 0 -I=$(VDB_INCDIR)
+	@#    
+	@# move ahead event, packed
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) vdb-dump $(SRCDIR) 4packed 0 -I=$(VDB_INCDIR)
+	@#    
+	@# integer compression (packed only)
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) vdb-dump $(SRCDIR) 5packed 0 "-L=info -I=$(VDB_INCDIR)"
+	@#    
+	@# software name in the metadata, unpacked   
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) kdbmeta $(SRCDIR) 6 0 "-L=info -I=$(VDB_INCDIR)" SOFTWARE/formatter
+	@#    
+	@# software name in the metadata, packed   
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) kdbmeta $(SRCDIR) 6packed 0 "-L=info -I=$(VDB_INCDIR)" SOFTWARE/formatter
+	@#    
+	@rm -rf input/*.gl actual/*
+
+one-tool: $(TEST_BINDIR)/makeinputs
+	@mkdir -p input && $(TEST_BINDIR)/makeinputs && rm $(TEST_BINDIR)/makeinputs
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) kdbmeta $(SRCDIR) 6 0 "-L=info -I=$(VDB_INCDIR)" SOFTWARE/formatter
+
+
+#-------------------------------------------------------------------------------
+# general-loader tool tests
+#
+slowtests: #piped-dump
+
+piped-dump: $(BINDIR)/pileup-stats test-general-loader
+	#$(BINDIR)/pileup-stats SRR1063272 | $(BINDIR)/general-loader #-L=info
+	$(BINDIR)/pileup-stats SRR1232302 | $(BINDIR)/general-loader -L=info
+
diff --git a/test/general-loader/expected/1.stdout b/test/general-loader/expected/1.stdout
new file mode 100644
index 0000000..cd95218
--- /dev/null
+++ b/test/general-loader/expected/1.stdout
@@ -0,0 +1,75 @@
+COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+      CS_KEY: T
+   CS_NATIVE: false
+       LABEL: reference
+   LABEL_LEN: 9
+ LABEL_START: 0
+ MIN_SPOT_ID: 1
+   RD_FILTER: SRA_READ_FILTER_PASS
+ READ_FILTER: SRA_READ_FILTER_PASS
+  READ_START: 0
+   READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+  SPOT_GROUP: first value
+     SPOT_ID: 1
+  TRIM_START: 0
+
+COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+      CS_KEY: T
+   CS_NATIVE: false
+       LABEL: reference
+   LABEL_LEN: 9
+ LABEL_START: 0
+ MIN_SPOT_ID: 1
+   RD_FILTER: SRA_READ_FILTER_PASS
+ READ_FILTER: SRA_READ_FILTER_PASS
+  READ_START: 0
+   READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+  SPOT_GROUP: first default
+     SPOT_ID: 2
+  TRIM_START: 0
+
+COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+      CS_KEY: T
+   CS_NATIVE: false
+       LABEL: reference
+   LABEL_LEN: 9
+ LABEL_START: 0
+ MIN_SPOT_ID: 1
+   RD_FILTER: SRA_READ_FILTER_PASS
+ READ_FILTER: SRA_READ_FILTER_PASS
+  READ_START: 0
+   READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+  SPOT_GROUP: first default
+     SPOT_ID: 3
+  TRIM_START: 0
+
+COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+      CS_KEY: T
+   CS_NATIVE: false
+       LABEL: reference
+   LABEL_LEN: 9
+ LABEL_START: 0
+ MIN_SPOT_ID: 1
+   RD_FILTER: SRA_READ_FILTER_PASS
+ READ_FILTER: SRA_READ_FILTER_PASS
+  READ_START: 0
+   READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+  SPOT_GROUP: second value
+     SPOT_ID: 4
+  TRIM_START: 0
+
+COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+      CS_KEY: T
+   CS_NATIVE: false
+       LABEL: reference
+   LABEL_LEN: 9
+ LABEL_START: 0
+ MIN_SPOT_ID: 1
+   RD_FILTER: SRA_READ_FILTER_PASS
+ READ_FILTER: SRA_READ_FILTER_PASS
+  READ_START: 0
+   READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+  SPOT_GROUP: second default
+     SPOT_ID: 5
+  TRIM_START: 0
+
diff --git a/test/general-loader/expected/1override.stdout b/test/general-loader/expected/1override.stdout
new file mode 100644
index 0000000..cd95218
--- /dev/null
+++ b/test/general-loader/expected/1override.stdout
@@ -0,0 +1,75 @@
+COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+      CS_KEY: T
+   CS_NATIVE: false
+       LABEL: reference
+   LABEL_LEN: 9
+ LABEL_START: 0
+ MIN_SPOT_ID: 1
+   RD_FILTER: SRA_READ_FILTER_PASS
+ READ_FILTER: SRA_READ_FILTER_PASS
+  READ_START: 0
+   READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+  SPOT_GROUP: first value
+     SPOT_ID: 1
+  TRIM_START: 0
+
+COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+      CS_KEY: T
+   CS_NATIVE: false
+       LABEL: reference
+   LABEL_LEN: 9
+ LABEL_START: 0
+ MIN_SPOT_ID: 1
+   RD_FILTER: SRA_READ_FILTER_PASS
+ READ_FILTER: SRA_READ_FILTER_PASS
+  READ_START: 0
+   READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+  SPOT_GROUP: first default
+     SPOT_ID: 2
+  TRIM_START: 0
+
+COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+      CS_KEY: T
+   CS_NATIVE: false
+       LABEL: reference
+   LABEL_LEN: 9
+ LABEL_START: 0
+ MIN_SPOT_ID: 1
+   RD_FILTER: SRA_READ_FILTER_PASS
+ READ_FILTER: SRA_READ_FILTER_PASS
+  READ_START: 0
+   READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+  SPOT_GROUP: first default
+     SPOT_ID: 3
+  TRIM_START: 0
+
+COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+      CS_KEY: T
+   CS_NATIVE: false
+       LABEL: reference
+   LABEL_LEN: 9
+ LABEL_START: 0
+ MIN_SPOT_ID: 1
+   RD_FILTER: SRA_READ_FILTER_PASS
+ READ_FILTER: SRA_READ_FILTER_PASS
+  READ_START: 0
+   READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+  SPOT_GROUP: second value
+     SPOT_ID: 4
+  TRIM_START: 0
+
+COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+      CS_KEY: T
+   CS_NATIVE: false
+       LABEL: reference
+   LABEL_LEN: 9
+ LABEL_START: 0
+ MIN_SPOT_ID: 1
+   RD_FILTER: SRA_READ_FILTER_PASS
+ READ_FILTER: SRA_READ_FILTER_PASS
+  READ_START: 0
+   READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+  SPOT_GROUP: second default
+     SPOT_ID: 5
+  TRIM_START: 0
+
diff --git a/test/general-loader/expected/1packed.stdout b/test/general-loader/expected/1packed.stdout
new file mode 100644
index 0000000..cd95218
--- /dev/null
+++ b/test/general-loader/expected/1packed.stdout
@@ -0,0 +1,75 @@
+COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+      CS_KEY: T
+   CS_NATIVE: false
+       LABEL: reference
+   LABEL_LEN: 9
+ LABEL_START: 0
+ MIN_SPOT_ID: 1
+   RD_FILTER: SRA_READ_FILTER_PASS
+ READ_FILTER: SRA_READ_FILTER_PASS
+  READ_START: 0
+   READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+  SPOT_GROUP: first value
+     SPOT_ID: 1
+  TRIM_START: 0
+
+COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+      CS_KEY: T
+   CS_NATIVE: false
+       LABEL: reference
+   LABEL_LEN: 9
+ LABEL_START: 0
+ MIN_SPOT_ID: 1
+   RD_FILTER: SRA_READ_FILTER_PASS
+ READ_FILTER: SRA_READ_FILTER_PASS
+  READ_START: 0
+   READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+  SPOT_GROUP: first default
+     SPOT_ID: 2
+  TRIM_START: 0
+
+COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+      CS_KEY: T
+   CS_NATIVE: false
+       LABEL: reference
+   LABEL_LEN: 9
+ LABEL_START: 0
+ MIN_SPOT_ID: 1
+   RD_FILTER: SRA_READ_FILTER_PASS
+ READ_FILTER: SRA_READ_FILTER_PASS
+  READ_START: 0
+   READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+  SPOT_GROUP: first default
+     SPOT_ID: 3
+  TRIM_START: 0
+
+COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+      CS_KEY: T
+   CS_NATIVE: false
+       LABEL: reference
+   LABEL_LEN: 9
+ LABEL_START: 0
+ MIN_SPOT_ID: 1
+   RD_FILTER: SRA_READ_FILTER_PASS
+ READ_FILTER: SRA_READ_FILTER_PASS
+  READ_START: 0
+   READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+  SPOT_GROUP: second value
+     SPOT_ID: 4
+  TRIM_START: 0
+
+COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+      CS_KEY: T
+   CS_NATIVE: false
+       LABEL: reference
+   LABEL_LEN: 9
+ LABEL_START: 0
+ MIN_SPOT_ID: 1
+   RD_FILTER: SRA_READ_FILTER_PASS
+ READ_FILTER: SRA_READ_FILTER_PASS
+  READ_START: 0
+   READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+  SPOT_GROUP: second default
+     SPOT_ID: 5
+  TRIM_START: 0
+
diff --git a/test/general-loader/expected/2.stderr b/test/general-loader/expected/2.stderr
new file mode 100644
index 0000000..6b1684e
--- /dev/null
+++ b/test/general-loader/expected/2.stderr
@@ -0,0 +1,2 @@
+general-loader err: general-loader: error "something is wrong"
+general-loader err: error exists while reading file - load failed
diff --git a/test/general-loader/expected/2packed.stderr b/test/general-loader/expected/2packed.stderr
new file mode 100644
index 0000000..6b1684e
--- /dev/null
+++ b/test/general-loader/expected/2packed.stderr
@@ -0,0 +1,2 @@
+general-loader err: general-loader: error "something is wrong"
+general-loader err: error exists while reading file - load failed
diff --git a/test/general-loader/expected/3.stdout b/test/general-loader/expected/3.stdout
new file mode 100644
index 0000000..3481de0
--- /dev/null
+++ b/test/general-loader/expected/3.stdout
@@ -0,0 +1,16 @@
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 1
+           TRIM_START: 0
+
diff --git a/test/general-loader/expected/3packed.stdout b/test/general-loader/expected/3packed.stdout
new file mode 100644
index 0000000..3481de0
--- /dev/null
+++ b/test/general-loader/expected/3packed.stdout
@@ -0,0 +1,16 @@
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 1
+           TRIM_START: 0
+
diff --git a/test/general-loader/expected/4.stdout b/test/general-loader/expected/4.stdout
new file mode 100644
index 0000000..c05dd30
--- /dev/null
+++ b/test/general-loader/expected/4.stdout
@@ -0,0 +1,160 @@
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 1
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 2
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 3
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 4
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 5
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 100
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 6
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 7
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 8
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 9
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 10
+           TRIM_START: 0
+
diff --git a/test/general-loader/expected/4packed.stdout b/test/general-loader/expected/4packed.stdout
new file mode 100644
index 0000000..c05dd30
--- /dev/null
+++ b/test/general-loader/expected/4packed.stdout
@@ -0,0 +1,160 @@
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 1
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 2
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 3
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 4
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 5
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 100
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 6
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 7
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 8
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 9
+           TRIM_START: 0
+
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 10
+           TRIM_START: 0
+
diff --git a/test/general-loader/expected/5packed.stdout b/test/general-loader/expected/5packed.stdout
new file mode 100644
index 0000000..d8acc2e
--- /dev/null
+++ b/test/general-loader/expected/5packed.stdout
@@ -0,0 +1,16 @@
+         COLOR_MATRIX: 0, 1, 2, 3, 4, 1, 0, 3, 2, 4, 2, 3, 0, 1, 4, 3, 2, 1, 0, 4, 4, 4, 4, 4, 4
+               CS_KEY: T
+            CS_NATIVE: false
+                LABEL: reference
+            LABEL_LEN: 9
+          LABEL_START: 0
+          MIN_SPOT_ID: 1
+PRIMARY_ALIGNMENT_IDS: 1085102592571150095
+            RD_FILTER: SRA_READ_FILTER_PASS
+          READ_FILTER: SRA_READ_FILTER_PASS
+           READ_START: 0
+            READ_TYPE: SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD
+           SPOT_GROUP: 
+              SPOT_ID: 1
+           TRIM_START: 0
+
diff --git a/test/general-loader/expected/6.stdout b/test/general-loader/expected/6.stdout
new file mode 100644
index 0000000..b8bf71a
--- /dev/null
+++ b/test/general-loader/expected/6.stdout
@@ -0,0 +1 @@
+<formatter name="some software" vers="9.8.7654"/>
diff --git a/test/general-loader/expected/6packed.stdout b/test/general-loader/expected/6packed.stdout
new file mode 100644
index 0000000..b8bf71a
--- /dev/null
+++ b/test/general-loader/expected/6packed.stdout
@@ -0,0 +1 @@
+<formatter name="some software" vers="9.8.7654"/>
diff --git a/test/general-loader/input/column01 b/test/general-loader/input/column01
new file mode 100644
index 0000000..c5ed0f9
--- /dev/null
+++ b/test/general-loader/input/column01
@@ -0,0 +1,2 @@
+First test sentence
+Second sentence to test the stream
diff --git a/test/general-loader/input/column02 b/test/general-loader/input/column02
new file mode 100644
index 0000000..c5ed0f9
--- /dev/null
+++ b/test/general-loader/input/column02
@@ -0,0 +1,2 @@
+First test sentence
+Second sentence to test the stream
diff --git a/test/general-loader/makeinputs.cpp b/test/general-loader/makeinputs.cpp
new file mode 100644
index 0000000..c9d739a
--- /dev/null
+++ b/test/general-loader/makeinputs.cpp
@@ -0,0 +1,226 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+/**
+* Unit tests for General Loader
+*/
+#include "testsource.hpp"
+
+#include "../../tools/general-loader/utf8-like-int-codec.c"
+
+using namespace std;
+
+const char* tableName = "REFERENCE";
+const char* asciiColumnName = "SPOT_GROUP";
+const char* i64ColumnName = "PRIMARY_ALIGNMENT_IDS";
+const char* u32ColumnName = "SPOT_ID";
+
+
+static
+string
+DatabasePath ( const string& p_caseId, bool p_packed )
+{
+    string caseId = p_caseId;
+    if ( p_packed )
+    {
+        caseId += "packed";
+    }
+    return string ( "actual/" ) + caseId + "/db";
+}
+  
+static
+string
+OutputPath ( const string& p_caseId, bool p_packed )
+{
+    string caseId = p_caseId;
+    if ( p_packed )
+    {
+        caseId += "packed";
+    }
+    return string ( "input/" ) + caseId + ".gl";
+}
+
+void
+OneTableOneColumnWithDefaults( const string& p_caseId, bool p_packed )
+{   // default values changed mid-data
+    TestSource source;
+    TestSource::packed = p_packed;
+    
+    source . SchemaEvent ( "align/align.vschema", "NCBI:align:db:alignment_sorted" );
+    source . DatabaseEvent ( DatabasePath ( p_caseId, p_packed ) );
+    
+    source . NewTableEvent ( 1, tableName ); 
+    source . NewColumnEvent ( 1, 1, asciiColumnName, 8 );
+    source . OpenStreamEvent();
+    
+    string value1 = "first value";
+    source . CellDataEvent( 1, value1 );
+    source . NextRowEvent ( 1 );
+    
+    string default1 = "first default";
+    source . CellDefaultEvent( 1, default1 );
+    source . NextRowEvent ( 1 );
+    
+    source . NextRowEvent ( 1 );
+    
+    string value2 = "second value";
+    source . CellDefaultEvent( 1, value2 );
+    source . NextRowEvent ( 1 );
+    
+    string default2 = "second default";
+    source . CellDefaultEvent( 1, default2 );
+    source . NextRowEvent ( 1 );
+    
+    source . CloseStreamEvent();
+    source . SaveBuffer ( OutputPath ( p_caseId, p_packed ) . c_str ()  );
+}
+
+void
+ErrorMessage( const string& p_caseId, bool p_packed )
+{   
+    TestSource source;
+    TestSource::packed = p_packed;
+    
+    source . SchemaEvent ( "align/align.vschema", "NCBI:align:db:alignment_sorted" );
+    source . DatabaseEvent ( DatabasePath ( p_caseId, p_packed ) );
+    
+    source . NewTableEvent ( 1, tableName ); 
+    source . NewColumnEvent ( 1, 1, asciiColumnName, 8 );
+    source . OpenStreamEvent();
+    
+    source . ErrorMessageEvent( "something is wrong" );
+    
+    source . CloseStreamEvent();
+    source . SaveBuffer ( OutputPath ( p_caseId, p_packed ) . c_str ()  );
+}
+
+void
+EmptyDefaultValue( const string& p_caseId, bool p_packed )
+{   
+    TestSource source;
+    TestSource::packed = p_packed;
+    
+    source . SchemaEvent ( "align/align.vschema", "NCBI:align:db:alignment_sorted" );
+    source . DatabaseEvent ( DatabasePath ( p_caseId, p_packed ) );
+    
+    source . NewTableEvent ( 1, tableName ); 
+    source . NewColumnEvent ( 1, 1, i64ColumnName, 64 );
+    source . OpenStreamEvent();
+    
+    source . CellEmptyDefaultEvent( 1 );
+    source . NextRowEvent ( 1 );
+    
+    source . CloseStreamEvent();
+    source . SaveBuffer ( OutputPath ( p_caseId, p_packed ) . c_str ()  );
+}
+
+void
+MoveAhead( const string& p_caseId, bool p_packed )
+{   
+    TestSource source;
+    TestSource::packed = p_packed;
+    
+    source . SchemaEvent ( "align/align.vschema", "NCBI:align:db:alignment_sorted" );
+    source . DatabaseEvent ( DatabasePath ( p_caseId, p_packed ) );
+    
+    source . NewTableEvent ( 1, tableName ); 
+    source . NewColumnEvent ( 1, 1, i64ColumnName, 64 );
+    source . OpenStreamEvent();
+    
+    source . CellEmptyDefaultEvent( 1 );
+    source . MoveAheadEvent ( 1, 5 );
+    
+    source . CellDataEvent( 1, (int64_t)100 );
+    source . MoveAheadEvent ( 1, 5 );
+    
+    // expected: 5 empty cells, 100, 4 empty cells
+    source . CloseStreamEvent();
+    source . SaveBuffer ( OutputPath ( p_caseId, p_packed ) . c_str ()  );
+}
+
+void
+IntegerCompression( const string& p_caseId, bool p_packed )
+{   
+    if ( !p_packed )
+    {   // Integer compression is used in packed mode only
+        return;
+    }
+    
+    TestSource source;
+    TestSource::packed = true;
+    
+    source . SchemaEvent ( "align/align.vschema", "NCBI:align:db:alignment_sorted" );
+    source . DatabaseEvent ( DatabasePath ( p_caseId, p_packed ) );
+    
+    source . NewTableEvent ( 1, tableName ); 
+    source . NewColumnEvent ( 1, 1, i64ColumnName, 64, true );
+    source . OpenStreamEvent();
+    
+    uint8_t buf[128];
+    int bytes = encode_uint64 ( 0x0F0F0F0F0F0F0F0FLL, buf, buf + sizeof buf );
+    source . CellDataEventRaw ( 1, 1, buf, bytes );
+    source . NextRowEvent ( 1 );
+    
+    source . CloseStreamEvent();
+    source . SaveBuffer ( OutputPath ( p_caseId, p_packed ) . c_str ()  );
+}
+
+void
+SoftwareIdString( const string& p_caseId, bool p_packed )
+{   // Software identification string in metadata
+    TestSource source;
+    TestSource::packed = true;
+    
+    source . SchemaEvent ( "align/align.vschema", "NCBI:align:db:alignment_sorted" );
+    source . DatabaseEvent ( DatabasePath ( p_caseId, p_packed ) );
+    
+    source . SoftwareNameEvent ( string ( "some software" ), string ( "9.8.7654" ) );
+    
+    source . OpenStreamEvent();
+    source . CloseStreamEvent();
+    
+    source . SaveBuffer ( OutputPath ( p_caseId, p_packed ) . c_str ()  );
+}
+
+int main()
+{
+    for (bool packed = false; ; packed = true )
+    {
+        OneTableOneColumnWithDefaults( "1", packed );
+        ErrorMessage( "2", packed );
+        EmptyDefaultValue( "3", packed );
+        MoveAhead( "4", packed );
+        IntegerCompression( "5", packed );
+        SoftwareIdString( "6", packed );
+        
+        if ( packed )
+        {
+            break;
+        }
+    }
+    
+    return 0;
+}
diff --git a/test/general-loader/runtestcase.sh b/test/general-loader/runtestcase.sh
new file mode 100755
index 0000000..6f2a6f8
--- /dev/null
+++ b/test/general-loader/runtestcase.sh
@@ -0,0 +1,108 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+#echo "$0 $*"
+
+# $1 - path to sra-tools executables (general-loader, vdb-dump)
+# $2 - name of the dumper executable (vdb-dump, kdbmeta etc.)
+# $3 - work directory (expected results under expected/, actual results and temporaries created under actual/)
+# $4 - test case ID (expect a file input/$3.gl to exist)
+# $5 - expected return code
+# $6 - command line options for general-loader
+# $7 - command line options for dumper
+#
+# return codes:
+# 0 - passed
+# 1 - could not create temp dir
+# 2 - unexpected return code from general-loader
+# 3 - vdb-dump failed on the output of general-loader
+# 4 - outputs differ
+
+BINDIR=$1
+DUMPER=$2
+WORKDIR=$3
+CASEID=$4
+RC=$5
+LOAD_OPTIONS=$6
+DUMP_OPTIONS=$7
+
+DUMP="$BINDIR/$DUMPER"
+LOAD="$BINDIR/general-loader"
+TEMPDIR=$WORKDIR/actual/$CASEID
+
+echo "running test case $CASEID"
+
+mkdir -p $TEMPDIR
+if [ "$?" != "0" ] ; then
+    echo "cannot create "
+    exit 1
+fi
+rm -rf $TEMPDIR/*
+
+CMD="cat input/$CASEID.gl | $LOAD $LOAD_OPTIONS 1>$TEMPDIR/load.stdout 2>$TEMPDIR/load.stderr"
+#echo $CMD
+eval $CMD
+rc="$?"
+if [ "$rc" != "$RC" ] ; then
+    echo "$LOAD returned $rc, expected $RC"
+    echo "command executed:"
+    echo $CMD
+    cat $TEMPDIR/load.stderr
+    exit 2
+fi
+
+if [ "$rc" == "0" ] ; then
+    CMD="$DUMP $TEMPDIR/db $DUMP_OPTIONS 1>$TEMPDIR/dump.stdout 2>$TEMPDIR/dump.stderr"
+    #echo $CMD
+    eval $CMD || ( echo "$CMD" && exit 3 )
+    
+    # remove timestamps, date from metadata
+    sed -i -e 's/<timestamp>.*<\/timestamp>/<timestamp\/>/g' $TEMPDIR/dump.stdout
+    sed -i -e 's/date=".*" name/date="" name/g' $TEMPDIR/dump.stdout
+    
+    diff $WORKDIR/expected/$CASEID.stdout $TEMPDIR/dump.stdout >$TEMPDIR/diff
+    rc="$?"
+else
+    # remove timestamps
+    sed -i -e 's/^....-..-..T..:..:.. //g' $TEMPDIR/load.stderr
+    # remove pathnames
+    sed -i -e 's=/.*/==g' $TEMPDIR/load.stderr
+    # remove source locations
+    sed -i -e 's=: .*:[0-9]*:[^ ]*:=:=g' $TEMPDIR/load.stderr
+    # remove version number
+    sed -i -e 's=general-loader\(\.[0-9]*\)*=general-loader=g' $TEMPDIR/load.stderr
+    diff $WORKDIR/expected/$CASEID.stderr $TEMPDIR/load.stderr >$TEMPDIR/diff
+    rc="$?"
+fi
+
+if [ "$rc" != "0" ] ; then
+    cat $TEMPDIR/diff
+    echo "command executed:"
+    echo $CMD
+    exit 4
+fi    
+
+rm -rf $TEMPDIR
+
+exit 0
diff --git a/test/general-loader/schema/.gitignore b/test/general-loader/schema/.gitignore
new file mode 100644
index 0000000..4063701
--- /dev/null
+++ b/test/general-loader/schema/.gitignore
@@ -0,0 +1,4 @@
+# Ignore everything in this directory
+*
+# Except this file
+!.gitignore
diff --git a/test/general-loader/test-general-loader.cpp b/test/general-loader/test-general-loader.cpp
new file mode 100644
index 0000000..eebe65c
--- /dev/null
+++ b/test/general-loader/test-general-loader.cpp
@@ -0,0 +1,1684 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+/**
+* Unit tests for General Loader
+*/
+
+#include "../../tools/general-loader/general-loader.cpp"
+#include "../../tools/general-loader/database-loader.cpp"
+#include "../../tools/general-loader/protocol-parser.cpp"
+#include "../../tools/general-loader/utf8-like-int-codec.c"
+
+#include <ktst/unit_test.hpp> 
+
+#include <sysalloc.h>
+
+#include <klib/printf.h>
+#include <klib/debug.h>
+
+#include <kns/adapt.h>
+
+#include <kfs/nullfile.h>
+#include <kfs/file.h>
+#include <kfs/ramfile.h>
+
+#include <kdb/table.h>
+
+#include <kfg/config.h> // KConfigPrint
+
+#include <vfs/path.h>
+#include <vfs/path-priv.h>
+#include <vfs/manager.h>
+
+#include <vdb/vdb-priv.h>
+
+#include <time.h>
+#include <cstring>
+#include <stdexcept> 
+#include <map>
+#include <fstream>
+#include <cstdio>
+
+#include "testsource.hpp"
+
+using namespace std;
+using namespace ncbi::NK;
+
+static KLogLevel l = 4;
+static rc_t argsHandler(int argc, char* argv[]) {
+    Args* args = NULL;
+    rc_t rc = ArgsMakeAndHandle(&args, argc, argv, 0, NULL, 0);
+    ArgsWhack(args);
+    KLogLevel lv = KLogLevelGet();
+    if (lv != 4) {
+        l = lv;
+    }
+    return rc;
+}
+TEST_SUITE_WITH_ARGS_HANDLER(GeneralLoaderTestSuite, argsHandler);
+
+const string ScratchDir         = "./db/";
+const string DefaultSchema      = ScratchDir + "default.vschema";
+
+const string DefaultSchemaText  = 
+    "table table1 #1.0.0 { column ascii columnAscii; column U32 columnU32; column bool columnBool; };\n"
+    "table table2 #1.0.0 { column I64 columnI64; column U8 columnU8; };\n"
+    "database root_database #1 { table table1 #1 TABLE1; table table2 #1 TABLE2; };\n";
+    
+const string DefaultDatabase    = "root_database";
+
+const string DefaultTable       = "TABLE1";
+const string Table2             = "TABLE2";
+
+const string DefaultColumn      = "columnAscii";
+const string U32Column          = "columnU32";
+const string BoolColumn         = "columnBool";
+const string I64Column          = "columnI64";
+const string U8Column           = "columnU8";
+
+static
+void
+ClearScratchDir ()
+{
+    KDirectory* wd;
+    KDirectoryNativeDir ( & wd );
+    KDirectoryClearDir ( wd, true, ScratchDir . c_str() );        
+    KDirectoryRelease ( wd );
+}
+
+
+class GeneralLoaderFixture
+{
+public:
+    static const uint32_t DefaultTableId = 100;
+    
+    static const uint32_t DefaultColumnId = 1;
+    static const uint32_t Column16Id = 16; 
+    static const uint32_t Column32Id = 32; 
+    static const uint32_t Column64Id = 64; 
+    
+    static std::string argv0;
+
+public:
+    GeneralLoaderFixture()
+    :   m_db ( 0 ),
+        m_cursor ( 0 ),
+        m_wd ( 0 )
+    {
+        THROW_ON_RC ( KDirectoryNativeDir ( & m_wd ) );
+
+        CreateFile ( DefaultSchema, DefaultSchemaText ); 
+    }
+    ~GeneralLoaderFixture()
+    {
+        RemoveDatabase();
+        if (l == 4) {
+            KLogLevelSet ( klogFatal );
+        }
+        KDirectoryRelease ( m_wd );
+        if ( ! m_tempSchemaFile . empty() )
+        {
+            remove ( m_tempSchemaFile . c_str() );
+        }
+    }
+    
+    GeneralLoader* MakeLoader ( const struct KFile * p_input )
+    {
+        struct KStream * inStream;
+        THROW_ON_RC ( KStreamFromKFilePair ( & inStream, p_input, 0 ) );
+            
+        GeneralLoader* ret = new GeneralLoader ( argv0, * inStream );
+        ret -> AddSchemaIncludePath ( ScratchDir );
+
+        THROW_ON_RC ( KStreamRelease ( inStream ) );
+        THROW_ON_RC ( KFileRelease ( p_input ) );
+            
+        return ret;
+    }
+    bool RunLoader ( GeneralLoader& p_loader, rc_t p_rc )
+    {
+        rc_t rc = p_loader.Run();
+        if ( rc == p_rc )
+        {
+            return true;
+        }
+        
+        char buf[1024];
+        string_printf ( buf, sizeof buf, NULL, "Expected rc='%R', actual='%R'", p_rc, rc );
+        cerr << buf << endl;
+        return false;
+    }
+    
+    bool Run ( const struct KFile * p_input, rc_t p_rc )
+    {
+        struct KStream* inStream;
+        THROW_ON_RC ( KStreamFromKFilePair ( & inStream, p_input, 0 ) );
+            
+        GeneralLoader gl ( argv0, *inStream );
+        gl . AddSchemaIncludePath ( ScratchDir );
+		
+        rc_t rc = gl.Run();
+        bool ret;
+        if ( GetRCObject ( rc ) == GetRCObject ( p_rc ) && 
+             GetRCState ( rc ) == GetRCState ( p_rc ) )
+        {
+            ret = true;
+        }
+        else
+        {
+            char buf[1024];
+            string_printf ( buf, sizeof buf, NULL, "Expected rc='%R', actual='%R'", p_rc, rc );
+            cerr << buf << endl;
+            ret = false;
+        }
+        
+        THROW_ON_RC ( KStreamRelease ( inStream ) );
+        THROW_ON_RC ( KFileRelease ( p_input ) );
+            
+        return ret;
+    }
+
+    void RemoveDatabase()
+    {
+        CloseDatabase();
+        if ( ! m_source . GetDatabaseName() . empty () )
+        {
+            KDirectoryRemove ( m_wd, true, m_source . GetDatabaseName() . c_str() );
+        }
+    }
+    
+    void OpenDatabase( const char* p_dbNameOverride = 0 )
+    {
+        CloseDatabase();
+        
+        VDBManager * vdb;
+        THROW_ON_RC ( VDBManagerMakeUpdate ( & vdb, NULL ) );
+
+        try 
+        {
+            THROW_ON_RC ( VDBManagerOpenDBUpdate ( vdb, &m_db, NULL, p_dbNameOverride != 0 ? p_dbNameOverride : m_source . GetDatabaseName() . c_str() ) );
+        }
+        catch(...)
+        {
+            VDBManagerRelease ( vdb );
+            throw;
+        }
+        
+        THROW_ON_RC ( VDBManagerRelease ( vdb ) );
+    }
+    void CloseDatabase()
+    {
+        if ( m_db != 0 )
+        {
+            VDatabaseRelease ( m_db );
+            m_db = 0;
+        }
+        if ( m_cursor != 0 )
+        {
+            VCursorRelease ( m_cursor );
+            m_cursor = 0;
+        }
+    }
+    
+    void SetUpStream( const string& p_dbName, const string& p_schema = DefaultSchema, const string& p_schemaName = DefaultDatabase )
+    {
+        m_source . SchemaEvent ( p_schema, p_schemaName );
+        string dbName = ScratchDir + p_dbName;
+        if ( m_source.packed )
+        {
+            dbName += "-packed";
+        }
+        m_source . DatabaseEvent ( dbName );
+    }
+    void SetUpStream_OneTable( const string& p_dbName )
+    {  
+        SetUpStream( p_dbName );
+        m_source . NewTableEvent ( DefaultTableId, DefaultTable ); 
+    }
+    void OpenStream_OneTableOneColumn ( const string& p_dbName )
+    {   
+        SetUpStream_OneTable( p_dbName ); 
+        m_source . NewColumnEvent ( DefaultColumnId, DefaultTableId, DefaultColumn, 8 );
+        m_source . OpenStreamEvent();
+    }
+
+    bool SetUpForIntegerCompression( const string& p_dbName )
+    {
+        if ( ! TestSource::packed )
+            return false; // integer compaction is used in packed mode only
+            
+        m_tempSchemaFile = ScratchDir + string ( p_dbName ) + ".vschema"; 
+        string schemaText = 
+                "table table1 #1.0.0\n"
+                "{\n"
+                "    column U16 column16;\n"
+                "    column U32 column32;\n"
+                "    column U64 column64;\n"
+                "};\n"
+                "database database1 #1\n"
+                "{\n"
+                "    table table1 #1 TABLE1;\n"
+                "};\n"
+            ;
+        CreateFile ( m_tempSchemaFile, schemaText ); 
+        SetUpStream ( p_dbName, m_tempSchemaFile, "database1" );
+       
+        m_source . NewTableEvent ( DefaultTableId, "TABLE1" );
+        
+        m_source . NewColumnEvent ( Column16Id, DefaultTableId, "column16", 16, true );
+        m_source . NewColumnEvent ( Column32Id, DefaultTableId, "column32", 32, true );
+        m_source . NewColumnEvent ( Column64Id, DefaultTableId, "column64", 64, true );
+        
+        return true;
+    }
+    
+    void OpenCursor( const string& p_table, const string& p_column )
+    {
+        OpenDatabase();
+        const VTable * tbl;
+        THROW_ON_RC ( VDatabaseOpenTableRead ( m_db, &tbl, p_table.c_str() ) );
+        try 
+        {
+            THROW_ON_RC ( VTableCreateCursorRead ( tbl, & m_cursor ) );
+            
+            uint32_t idx;
+            THROW_ON_RC ( VCursorAddColumn ( m_cursor, &idx, p_column.c_str() ) );
+            THROW_ON_RC ( VCursorOpen ( m_cursor ) );
+            THROW_ON_RC ( VTableRelease ( tbl ) );
+        }
+        catch (...)
+        {
+            VTableRelease ( tbl );
+            throw;
+        }
+    }
+    
+    template < typename T > T GetValue ( const string& p_table, const string& p_column, uint64_t p_row )
+    {
+        OpenCursor( p_table, p_column ); 
+        THROW_ON_RC ( VCursorSetRowId ( m_cursor, p_row ) );
+        THROW_ON_RC ( VCursorOpenRow ( m_cursor ) );
+            
+        T ret;
+        uint32_t num_read;
+        THROW_ON_RC ( VCursorRead ( m_cursor, 1, 8 * sizeof ( T ), &ret, 1, &num_read ) );
+        THROW_ON_RC ( VCursorCloseRow ( m_cursor ) );
+        return ret;
+    }
+    
+    template < typename T > bool IsNullValue ( const string& p_table, const string& p_column, uint64_t p_row )
+    {
+        OpenCursor( p_table, p_column ); 
+        THROW_ON_RC ( VCursorSetRowId ( m_cursor, p_row ) );
+        THROW_ON_RC ( VCursorOpenRow ( m_cursor ) );
+            
+        T ret;
+        uint32_t num_read;
+        THROW_ON_RC ( VCursorRead ( m_cursor, 1, 8 * sizeof ( T ), &ret, 1, &num_read ) );
+        THROW_ON_RC ( VCursorCloseRow ( m_cursor ) );
+        return num_read == 0;
+    }
+
+    template < typename T > T GetValueWithIndex ( const string& p_table, const string& p_column, uint64_t p_row, uint32_t p_count, size_t p_index )
+    {
+        OpenCursor( p_table, p_column ); 
+        THROW_ON_RC ( VCursorSetRowId ( m_cursor, p_row ) );
+        THROW_ON_RC ( VCursorOpenRow ( m_cursor ) );
+            
+        assert(1024 >= p_count);
+        T ret [ 1024 ];
+
+        uint32_t num_read;
+        THROW_ON_RC ( VCursorRead ( m_cursor, 1, (uint32_t) ( 8 * sizeof ( T ) ), &ret, p_count, &num_read ) );
+        THROW_ON_RC ( VCursorCloseRow ( m_cursor ) );
+        return ret [  p_index ];
+    }
+    
+    void FullLog() 
+    {     
+        KLogLevelSet ( klogInfo );
+    }
+    
+    void CreateFile ( const string& p_name, const string& p_content )
+    {
+        ofstream out( p_name . c_str() );
+        out << p_content;
+    }
+
+    std::string GetDbMetadataAttr ( const std::string& p_node, const std::string& p_attr )
+    {
+        const KMetadata *meta;
+        THROW_ON_RC ( VDatabaseOpenMetadataRead ( m_db, &meta ) );
+    
+        const KMDataNode *node;
+        THROW_ON_RC ( KMetadataOpenNodeRead ( meta, &node, p_node.c_str() ) );
+            
+        size_t num_read;
+        char attr [ 256 ];
+        THROW_ON_RC ( KMDataNodeReadAttr ( node, p_attr.c_str(), attr, sizeof attr, & num_read ) );
+        THROW_ON_RC ( KMDataNodeRelease ( node ) );
+        THROW_ON_RC ( KMetadataRelease ( meta ) );
+        return string ( attr, num_read );
+    }
+    
+    std::string GetMetadata ( const KMetadata* p_meta, const std::string& p_node )
+    {
+        const KMDataNode *node;
+        THROW_ON_RC ( KMetadataOpenNodeRead ( p_meta, &node, p_node.c_str() ) );
+            
+        size_t num_read;
+        char buf[ 256 ];
+        
+        THROW_ON_RC ( KMDataNodeReadCString ( node, buf, sizeof buf, &num_read ) );
+        
+        THROW_ON_RC ( KMDataNodeRelease ( node ) );
+        return string ( buf, num_read );
+        
+    }
+    std::string GetDbMetadata ( VDatabase* p_db, const std::string& p_node )
+    {
+        const KMetadata *meta;
+        THROW_ON_RC ( VDatabaseOpenMetadataRead ( p_db, &meta ) );
+        string ret = GetMetadata ( meta, p_node );
+        THROW_ON_RC ( KMetadataRelease ( meta ) );
+        return ret;
+    }
+    
+    TestSource      m_source;
+    VDatabase *     m_db;
+    const VCursor * m_cursor;
+    KDirectory*     m_wd;
+    string          m_tempSchemaFile;
+	string			m_ScratchDir;
+};    
+
+template<> std::string GeneralLoaderFixture::GetValue ( const string& p_table, const string& p_column, uint64_t p_row )
+{
+    OpenCursor( p_table, p_column ); 
+    THROW_ON_RC ( VCursorSetRowId ( m_cursor, p_row ) );
+    THROW_ON_RC ( VCursorOpenRow ( m_cursor ) );
+        
+    char buf[1024];
+    uint32_t num_read;
+    THROW_ON_RC ( VCursorRead ( m_cursor, 1, 8, &buf, sizeof buf, &num_read ) );
+    THROW_ON_RC ( VCursorCloseRow ( m_cursor ) );
+    return string ( buf, num_read );
+}
+
+std::string GeneralLoaderFixture :: argv0;
+  
+FIXTURE_TEST_CASE ( EmptyInput, GeneralLoaderFixture )
+{
+    const struct KFile * input;
+    REQUIRE_RC ( KFileMakeNullRead ( & input ) );
+    REQUIRE ( Run ( input, SILENT_RC ( rcNS, rcFile, rcReading, rcTransfer, rcIncomplete ) ) );
+}
+
+FIXTURE_TEST_CASE ( ShortInput, GeneralLoaderFixture )
+{
+    char buffer[10];
+    const struct KFile * input;
+    REQUIRE_RC ( KRamFileMakeRead ( & input, buffer, sizeof buffer ) );
+    
+    REQUIRE ( Run ( input, SILENT_RC ( rcNS, rcFile, rcReading, rcTransfer, rcIncomplete ) ) );
+}
+
+FIXTURE_TEST_CASE ( BadSignature, GeneralLoaderFixture )
+{
+    TestSource ts ( "badsigna" );
+    REQUIRE ( Run (  ts . MakeSource (), SILENT_RC ( rcExe, rcFile, rcReading, rcHeader, rcCorrupt ) ) );
+}
+
+FIXTURE_TEST_CASE ( BadEndianness, GeneralLoaderFixture )
+{
+    TestSource ts ( GeneralLoaderSignatureString, 3 );
+    REQUIRE ( Run ( ts . MakeSource (), SILENT_RC ( rcExe, rcFile, rcReading, rcFormat, rcInvalid) ) );
+}
+
+FIXTURE_TEST_CASE ( ReverseEndianness, GeneralLoaderFixture )
+{
+    TestSource ts ( GeneralLoaderSignatureString, GW_REVERSE_ENDIAN );
+    REQUIRE ( Run ( ts . MakeSource (), SILENT_RC ( rcExe, rcFile, rcReading, rcFormat, rcUnsupported ) ) );
+}
+
+FIXTURE_TEST_CASE ( LaterVersion, GeneralLoaderFixture )
+{
+    TestSource ts ( GeneralLoaderSignatureString, GW_GOOD_ENDIAN, GW_CURRENT_VERSION + 1 );
+    REQUIRE ( Run ( ts . MakeSource (), SILENT_RC ( rcExe, rcFile, rcReading, rcHeader, rcBadVersion ) ) );
+}
+
+//TODO: MakeTruncatedSource (stop in the middle of an event)
+
+
+FIXTURE_TEST_CASE ( BadSchemaFileName, GeneralLoaderFixture )
+{
+    m_source . SchemaEvent ( "this file should not exist", "someSchemaName" );
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcVDB, rcMgr, rcCreating, rcSchema, rcNotFound ) ) );
+}
+
+FIXTURE_TEST_CASE ( BadSchemaFileName_Long, GeneralLoaderFixture )
+{   
+    m_source . SchemaEvent ( string ( GeneralLoader :: MaxPackedString + 1, 'x' ), "someSchemaName" );
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcVDB, rcMgr, rcCreating, rcSchema, rcNotFound ) ) );
+}
+
+FIXTURE_TEST_CASE ( BadSchemaName, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName(), "align/align.vschema", "bad schema name" );
+    m_source . OpenStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcVDB, rcMgr, rcCreating, rcSchema, rcNotFound ) ) );
+}
+
+FIXTURE_TEST_CASE ( BadSchemaName_Long, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName(), "align/align.vschema", string ( GeneralLoader :: MaxPackedString + 1, 'x' ) );
+    m_source . OpenStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcVDB, rcMgr, rcCreating, rcSchema, rcNotFound ) ) );
+}
+
+FIXTURE_TEST_CASE ( BadTableName, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName() );
+    m_source . NewTableEvent ( 1, "nosuchtable" );
+    m_source . OpenStreamEvent();
+
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcVDB, rcMgr, rcCreating, rcSchema, rcNotFound ) ) );
+}
+
+FIXTURE_TEST_CASE ( BadTableName_Long, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName() );
+    m_source . NewTableEvent ( 1, string ( GeneralLoader :: MaxPackedString + 1, 'x' ) );
+    m_source . OpenStreamEvent();
+
+    // the expected return code is different here due to VDB's internal limitation on 256 characters in a table name 
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcDB,rcDirectory,rcResolving,rcPath,rcExcessive ) ) ); 
+}
+
+FIXTURE_TEST_CASE ( DuplicateTableId, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName() );
+    m_source . NewTableEvent ( 1, DefaultTable );
+    m_source . NewTableEvent ( 1, "differentTable" ); // same Id
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcExe, rcFile, rcReading, rcTable, rcExists ) ) );
+}
+
+FIXTURE_TEST_CASE ( BadColumnName, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName() );
+    m_source . NewTableEvent ( DefaultTableId, DefaultTable );
+    m_source . NewColumnEvent ( 1, DefaultTableId, "nosuchcolumn", 8 );
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcVDB, rcCursor, rcUpdating, rcColumn, rcNotFound ) ) );
+}
+
+FIXTURE_TEST_CASE ( BadTableId, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName() );
+    m_source . NewTableEvent ( 1, DefaultTable );
+    m_source . NewColumnEvent ( 1, 2, DefaultColumn, 8 );
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcExe, rcFile, rcReading, rcTable, rcInvalid ) ) );
+}
+
+FIXTURE_TEST_CASE ( DuplicateColumnName, GeneralLoaderFixture )
+{   
+    SetUpStream_OneTable ( GetName() );
+    m_source . NewColumnEvent ( 1, DefaultTableId, DefaultColumn, 8 );
+    m_source . NewColumnEvent ( 2, DefaultTableId, DefaultColumn, 8 );
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcVDB, rcCursor, rcUpdating, rcColumn, rcExists ) ) );
+}
+
+FIXTURE_TEST_CASE ( DuplicateColumnId, GeneralLoaderFixture )
+{   
+    SetUpStream_OneTable ( GetName() );
+    m_source . NewColumnEvent ( 1, DefaultTableId, DefaultColumn, 8 );
+    m_source . NewColumnEvent ( 1, DefaultTableId, "NAME", 8 );
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcExe, rcFile, rcReading, rcColumn, rcExists ) ) );
+}
+
+FIXTURE_TEST_CASE ( NoOpenStreamEvent, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName() );
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcNS, rcFile, rcReading, rcTransfer, rcIncomplete ) ) );
+}
+
+FIXTURE_TEST_CASE ( NoCloseStreamEvent, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName() );
+    m_source . OpenStreamEvent();
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcNS, rcFile, rcReading, rcTransfer, rcIncomplete ) ) );
+}
+
+FIXTURE_TEST_CASE ( NoColumns, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName() );
+    m_source . OpenStreamEvent();
+    m_source . CloseStreamEvent();
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    // make sure database exists and is valid
+    OpenDatabase (); // did not throw => opened successfully
+}
+
+//Testing integration of software name and version input
+FIXTURE_TEST_CASE ( SoftwareName, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName() );
+    const string SoftwareName = "softwarename";
+    const string Version = "2.1.1";
+    m_source . SoftwareNameEvent ( SoftwareName, Version );
+    m_source . OpenStreamEvent();
+    m_source . CloseStreamEvent();
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    // validate metadata
+    OpenDatabase (); 
+    REQUIRE_EQ ( SoftwareName,  GetDbMetadataAttr ( "SOFTWARE/formatter", "name" ) );
+    REQUIRE_EQ ( Version,       GetDbMetadataAttr ( "SOFTWARE/formatter", "vers" ) );
+
+    // extract the program name from path the same way it's done in ncbi-vdb/libs/kapp/loader-meta.c:KLoaderMeta_Write
+    {
+        const char* tool_name = strrchr(argv0.c_str(), '/');
+        const char* r = strrchr(argv0.c_str(), '\\');
+        if( tool_name != NULL && r != NULL && tool_name < r ) {
+            tool_name = r;
+        }
+        if( tool_name++ == NULL) {
+            tool_name = argv0.c_str();
+        }
+    
+        REQUIRE_EQ ( string ( tool_name ), GetDbMetadataAttr ( "SOFTWARE/loader", "name" ) );
+    }
+    
+    REQUIRE_EQ ( string ( __DATE__), GetDbMetadataAttr ( "SOFTWARE/loader", "date" ) );
+    {
+        char buf[265];
+        string_printf ( buf, sizeof buf, NULL, "%V", KAppVersion() ); // same format as in ncbi-vdb/libs/kapp/loader-meta.c:MakeVersion()
+        REQUIRE_EQ ( string ( buf ), GetDbMetadataAttr ( "SOFTWARE/loader", "vers" ) );
+    }
+}
+
+FIXTURE_TEST_CASE ( SoftwareName_BadVersion, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName() );
+    const string SoftwareName = "softwarename";
+    const string Version = "2.1..1"; // improperly formatted
+    m_source . SoftwareNameEvent ( SoftwareName, Version );
+    m_source . OpenStreamEvent();
+    m_source . CloseStreamEvent();
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcExe, rcDatabase, rcCreating, rcMessage, rcBadVersion ) ) );
+}    
+
+FIXTURE_TEST_CASE ( DBAddDatabase, GeneralLoaderFixture )
+{   
+    string schemaFile = ScratchDir + GetName() + ".vschema";
+    CreateFile ( schemaFile, 
+                 string ( 
+                    "table table1 #1.0.0 { column ascii column1; };"
+                    "database database0 #1 { table table1 #1 TABLE1; } ;" 
+                    "database root_database #1 { database database0 #1 SUBDB; } ;" 
+                 )
+    ); 
+    
+    SetUpStream ( GetName(), schemaFile, "root_database");
+    
+    m_source . DBAddDatabaseEvent ( 1, 0, "SUBDB", "subdb", kcmCreate );
+    m_source . OpenStreamEvent();
+    m_source . CloseStreamEvent();
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    // validate database 
+    OpenDatabase (); 
+    VDatabase * subDb;
+    REQUIRE_RC ( VDatabaseOpenDBUpdate ( m_db, & subDb, "subdb" ) );
+    REQUIRE_RC ( VDatabaseRelease ( subDb ) );
+}
+
+FIXTURE_TEST_CASE ( DBAddSubDatabase, GeneralLoaderFixture )
+{   
+    string schemaFile = ScratchDir + GetName() + ".vschema";
+    CreateFile ( schemaFile, 
+                 string ( 
+                    "table table1 #1.0.0 { column ascii column1; };"
+                    "database database0 #1 { table table1 #1 TABLE1; } ;" 
+                    "database database1 #1 { database database0 #1 SUBSUBDB; } ;" 
+                    "database root_database #1 { database database1 #1 SUBDB; } ;" 
+                 )
+    ); 
+    
+    SetUpStream ( GetName(), schemaFile, "root_database");
+    
+    m_source . DBAddDatabaseEvent ( 1, 0, "SUBDB", "subdb", kcmCreate );
+    m_source . DBAddDatabaseEvent ( 2, 1, "SUBSUBDB", "subsubdb", kcmCreate );
+    m_source . OpenStreamEvent();
+    m_source . CloseStreamEvent();
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    // validate database 
+    OpenDatabase (); 
+    VDatabase * subDb;
+    REQUIRE_RC ( VDatabaseOpenDBUpdate ( m_db, & subDb, "subdb" ) );
+    VDatabase * subSubDb;
+    REQUIRE_RC ( VDatabaseOpenDBUpdate ( subDb, & subSubDb, "subsubdb" ) );
+    REQUIRE_RC ( VDatabaseRelease ( subSubDb ) );
+    REQUIRE_RC ( VDatabaseRelease ( subDb ) );
+}
+
+FIXTURE_TEST_CASE ( DBAddTable, GeneralLoaderFixture )
+{   
+    string schemaFile = ScratchDir + GetName() + ".vschema";
+    CreateFile ( schemaFile, 
+                 string ( 
+                    "table table1 #1.0.0 { column ascii column1; };"
+                    "database root_database #1 { table table1 #1 TABLE1; } ;" 
+                 )
+    ); 
+    
+    SetUpStream ( GetName(), schemaFile, "root_database");
+    
+    m_source . DBAddTableEvent ( 1, 0, "TABLE1", "tbl", kcmCreate );
+    m_source . OpenStreamEvent();
+    m_source . CloseStreamEvent();
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    // validate database 
+    OpenDatabase (); 
+    const VTable *tbl;
+    REQUIRE_RC ( VDatabaseOpenTableRead ( m_db, & tbl, "tbl" ) );
+    REQUIRE_RC ( VTableRelease ( tbl ) );
+}
+
+FIXTURE_TEST_CASE ( DBAddTableToSubDb, GeneralLoaderFixture )
+{   
+    string schemaFile = ScratchDir + GetName() + ".vschema";
+    CreateFile ( schemaFile, 
+                 string ( 
+                    "table table1 #1.0.0 { column ascii column1; };"
+                    "database database0 #1 { table table1 #1 TABLE1; } ;" 
+                    "database root_database #1 { database database0 #1 SUBDB; } ;" 
+                 )
+    ); 
+    
+    SetUpStream ( GetName(), schemaFile, "root_database");
+    
+    m_source . DBAddDatabaseEvent ( 2, 0, "SUBDB", "subdb", kcmCreate );
+    m_source . DBAddTableEvent ( 1, 2, "TABLE1", "tbl", kcmCreate );
+    m_source . OpenStreamEvent();
+    m_source . CloseStreamEvent();
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    // validate database 
+    OpenDatabase (); 
+    {
+        VDatabase * subDb;
+        REQUIRE_RC ( VDatabaseOpenDBUpdate ( m_db, & subDb, "subdb" ) );
+        //const VTable *tbl;
+        //FAIL("see VDB-1617");
+        //REQUIRE_RC ( VDatabaseOpenTableRead ( subDb, & tbl, "tbl" ) );
+        //REQUIRE_RC ( VTableRelease ( tbl ) );
+        REQUIRE_RC ( VDatabaseRelease ( subDb ) );
+    }
+}
+
+FIXTURE_TEST_CASE ( DBMetadataNode, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName() );
+    const string key = "dbmetadatanode";
+    const string value = "1a2b3c4d";
+    m_source . OpenStreamEvent();
+    m_source . DBMetadataNodeEvent ( 0, key, value );
+    m_source . CloseStreamEvent();
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    OpenDatabase (); 
+    REQUIRE_EQ ( value, GetDbMetadata( m_db, key ) );
+}
+
+FIXTURE_TEST_CASE ( SubDBMetadataNode, GeneralLoaderFixture )
+{   
+    string schemaFile = ScratchDir + GetName() + ".vschema";
+    CreateFile ( schemaFile, 
+                 string ( 
+                    "table table1 #1.0.0 { column ascii column1; };"
+                    "database database0 #1 { table table1 #1 TABLE1; } ;" 
+                    "database root_database #1 { database database0 #1 SUBDB; } ;" 
+                 )
+    ); 
+    const uint32_t subDbId = 2;
+    const string key = "subdbmetadatanode";
+    const string value = "1a2b3c4dsub";
+    
+    SetUpStream ( GetName(), schemaFile, "root_database");
+    
+    m_source . DBAddDatabaseEvent ( subDbId, 0, "SUBDB", "subdb", kcmCreate );
+    m_source . DBAddTableEvent ( 1, subDbId, "TABLE1", "tbl", kcmCreate );
+    m_source . OpenStreamEvent();
+    m_source . DBMetadataNodeEvent ( subDbId, key, value );
+    m_source . CloseStreamEvent();
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    OpenDatabase (); 
+    {
+        VDatabase * subDb;
+        REQUIRE_RC ( VDatabaseOpenDBUpdate ( m_db, & subDb, "subdb" ) );
+        REQUIRE_EQ ( value, GetDbMetadata( subDb, key ) );
+        REQUIRE_RC ( VDatabaseRelease ( subDb ) );
+    }
+}
+
+FIXTURE_TEST_CASE ( TblMetadataNode, GeneralLoaderFixture )
+{   
+    string schemaFile = ScratchDir + GetName() + ".vschema";
+    CreateFile ( schemaFile, 
+                 string ( 
+                    "table table1 #1.0.0 { column ascii column1; };"
+                    "database root_database #1 { table table1 #1 TABLE1; } ;" 
+                 )
+    ); 
+    
+    const char* tblName = "tbl";
+    const uint32_t tblId = 2;
+    const string key = "tblmetadatanode";
+    const string value = "tbl1a2b3c4d";
+    
+    SetUpStream ( GetName(), schemaFile, "root_database");
+    
+    m_source . DBAddTableEvent ( tblId, 0, "TABLE1", tblName, kcmCreate );
+    
+    m_source . OpenStreamEvent();
+    m_source . TblMetadataNodeEvent ( tblId, key, value);
+    m_source . CloseStreamEvent();
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    // validate database 
+    OpenDatabase (); 
+    {
+        const VTable *tbl;
+        REQUIRE_RC ( VDatabaseOpenTableRead ( m_db, & tbl, tblName ) );
+        
+        {
+            const KMetadata *meta;
+            REQUIRE_RC ( VTableOpenMetadataRead ( tbl, &meta ) );
+            REQUIRE_EQ ( value, GetMetadata ( meta,  key) );
+            REQUIRE_RC ( KMetadataRelease ( meta ) );
+        }
+        REQUIRE_RC ( VTableRelease ( tbl ) );
+    }
+}
+
+FIXTURE_TEST_CASE ( ColMetadataNode, GeneralLoaderFixture )
+{   
+    string schemaFile = ScratchDir + GetName() + ".vschema";
+    CreateFile ( schemaFile, 
+                 string ( 
+                    "table table1 #1.0.0 { column ascii column1; };"
+                    "database root_database #1 { table table1 #1 TABLE1; } ;" 
+                 )
+    ); 
+
+    const char* tblName = "tbl";
+    const uint32_t tblId = 2;
+    const char* colName = "column1";
+    const uint32_t colId = 5;
+    const string NodeName   = "colmetadatanode";
+    const string NodeValue  = "1a2b3c4d";
+    
+    SetUpStream ( GetName(), schemaFile, "root_database");
+    
+    m_source . DBAddTableEvent ( tblId, 0, "TABLE1", tblName, kcmCreate | kcmMD5 );
+    m_source . NewColumnEvent ( colId, tblId, colName, 8 );
+
+    m_source . OpenStreamEvent();
+    m_source . ColMetadataNodeEvent ( colId, NodeName, NodeValue ); 
+    // need at least 2 rows with different value in order for the column to become physical, otherwise column's metadata will not be stored
+    m_source . CellDataEvent( colId, string("blah1") ); 
+    m_source . NextRowEvent ( tblId );
+    m_source . CellDataEvent( colId, string("brh2") ); 
+    m_source . NextRowEvent ( tblId );
+    m_source . CloseStreamEvent();
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    // validate metadata
+    OpenDatabase (); 
+    {
+        const VTable *tbl;
+        REQUIRE_RC ( VDatabaseOpenTableRead ( m_db, & tbl, tblName ) );
+        
+        {
+            const KTable* ktbl;
+            REQUIRE_RC ( VTableOpenKTableRead ( tbl, & ktbl ) );
+            {
+                const KColumn* col;
+                REQUIRE_RC ( KTableOpenColumnRead ( ktbl, & col, colName ) );
+                {   
+                    const KMetadata *meta;
+                    REQUIRE_RC ( KColumnOpenMetadataRead ( col, &meta ) );
+                    
+                    REQUIRE_EQ ( NodeValue, GetMetadata ( meta, NodeName ) );
+                    
+                    REQUIRE_RC ( KMetadataRelease ( meta ) );
+                }
+                REQUIRE_RC ( KColumnRelease ( col ) );
+            }
+            REQUIRE_RC ( KTableRelease ( ktbl ) );
+        }
+        REQUIRE_RC ( VTableRelease ( tbl ) );
+    }
+}
+
+FIXTURE_TEST_CASE ( NoData, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName() );
+    m_source . NewTableEvent ( 2, DefaultTable ); // ids do not have to be consecutive
+    m_source . NewColumnEvent ( 222, 2, DefaultColumn, 8 );   
+    m_source . OpenStreamEvent();
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_THROW ( OpenCursor( DefaultTable, DefaultColumn ) ); 
+}
+
+FIXTURE_TEST_CASE ( Chunk_BadColumnId, GeneralLoaderFixture )
+{   
+    OpenStream_OneTableOneColumn ( GetName() );
+    
+    m_source . CellDataEvent( /*bad*/2, string("blah") );
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcExe, rcFile, rcReading, rcColumn, rcNotFound ) ) );
+}
+
+FIXTURE_TEST_CASE ( WriteNoCommit, GeneralLoaderFixture )
+{   
+    OpenStream_OneTableOneColumn ( GetName() );
+
+    string value = "a single character string cell";
+    m_source . CellDataEvent( DefaultColumnId, value );
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_THROW ( OpenCursor( DefaultTable, DefaultColumn ) ); 
+}
+
+FIXTURE_TEST_CASE ( CommitBadTableId, GeneralLoaderFixture )
+{   
+    OpenStream_OneTableOneColumn ( GetName() );
+
+    m_source . NextRowEvent ( /*bad*/2 );
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcExe, rcFile, rcReading, rcTable, rcNotFound ) ) );
+}    
+
+FIXTURE_TEST_CASE ( OneColumnOneCellOneChunk, GeneralLoaderFixture )
+{   
+    OpenStream_OneTableOneColumn ( GetName() );
+
+    string value = "a single character string cell";
+    m_source . CellDataEvent( DefaultColumnId, value );
+    m_source . NextRowEvent ( DefaultTableId );
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_EQ ( value, GetValue<string> ( DefaultTable, DefaultColumn, 1 ) ); 
+}
+
+FIXTURE_TEST_CASE ( OneColumnOneCellOneChunk_Long, GeneralLoaderFixture )
+{   
+    OpenStream_OneTableOneColumn ( GetName() );
+
+    string value ( GeneralLoader :: MaxPackedString + 1, 'x' );
+    m_source . CellDataEvent( DefaultColumnId, value );
+    m_source . NextRowEvent ( DefaultTableId );
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_EQ ( value, GetValue<string> ( DefaultTable, DefaultColumn, 1 ) ); 
+}
+
+FIXTURE_TEST_CASE ( OneColumnOneCellManyChunks, GeneralLoaderFixture )
+{   
+    OpenStream_OneTableOneColumn ( GetName() );
+
+    string value1 = "first";
+    m_source . CellDataEvent( DefaultColumnId, value1 );
+    string value2 = "second!";
+    m_source . CellDataEvent( DefaultColumnId, value2 );
+    string value3 = "third!!!";
+    m_source . CellDataEvent( DefaultColumnId, value3 );
+    m_source . NextRowEvent ( DefaultTableId );
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_EQ ( value1 + value2 + value3, GetValue<string> ( DefaultTable, DefaultColumn, 1 ) ); 
+}
+
+FIXTURE_TEST_CASE ( IntegerCompression_MinimumCompression, GeneralLoaderFixture )
+{   
+    if ( ! SetUpForIntegerCompression ( GetName() ) )
+        return;
+        
+    // no compression ( adds 1 byte per value )
+    const uint16_t u16value = 0x3456;
+    const uint32_t u32value = 0x789abcde;
+    const uint64_t u64value = 0x0F0F0F0F0F0F0F0FLL;
+
+    m_source . OpenStreamEvent();
+    
+    uint8_t buf[128];
+    
+    int bytes = encode_uint16 ( u16value, buf, buf + sizeof buf );
+    REQUIRE_EQ ( 3, bytes );
+    m_source . CellDataEventRaw ( Column16Id, 1, buf, bytes );
+    
+    bytes = encode_uint32 ( u32value, buf, buf + sizeof buf );
+    REQUIRE_EQ ( 5, bytes );
+    m_source . CellDataEventRaw ( Column32Id, 1, buf, bytes );
+    
+    bytes = encode_uint64 ( u64value, buf, buf + sizeof buf );
+    REQUIRE_EQ ( 9, bytes );
+    m_source . CellDataEventRaw ( Column64Id, 1, buf, bytes );
+    
+    m_source . NextRowEvent ( DefaultTableId  );
+    m_source . CloseStreamEvent();
+    
+    {   
+        GeneralLoader* gl = MakeLoader ( m_source . MakeSource () );
+        REQUIRE ( RunLoader ( *gl, 0 ) );
+        delete gl;
+    } // make sure loader is destroyed (= db closed) before we reopen the database for verification
+    
+    REQUIRE_EQ ( u16value, GetValue<uint16_t> ( "TABLE1", "column16", 1 ) );    
+    REQUIRE_EQ ( u32value, GetValue<uint32_t> ( "TABLE1", "column32", 1 ) );    
+    REQUIRE_EQ ( u64value, GetValue<uint64_t> ( "TABLE1", "column64", 1 ) );    
+}
+
+FIXTURE_TEST_CASE ( IntegerCompression_MaximumCompression, GeneralLoaderFixture )
+{   
+    if ( ! SetUpForIntegerCompression ( GetName() ) )
+        return;
+        
+    // induce maximum compression ( 1 byte per value <= 0x7F )
+    const uint16_t u16value = 0;
+    const uint32_t u32value = 2;
+    const uint64_t u64value = 0x7F;
+
+    m_source . OpenStreamEvent();
+    
+    uint8_t buf[128];
+    
+    int bytes = encode_uint16 ( u16value, buf, buf + sizeof buf );
+    REQUIRE_EQ ( 1, bytes );
+    m_source . CellDataEventRaw ( Column16Id, 1, buf, bytes );
+    
+    bytes = encode_uint32 ( u32value, buf, buf + sizeof buf );
+    REQUIRE_EQ ( 1, bytes );
+    m_source . CellDataEventRaw ( Column32Id, 1, buf, bytes );
+    
+    bytes = encode_uint64 ( u64value, buf, buf + sizeof buf );
+    REQUIRE_EQ ( 1, bytes );
+    m_source . CellDataEventRaw ( Column64Id, 1, buf, bytes );
+    
+    m_source . NextRowEvent ( DefaultTableId  );
+    m_source . CloseStreamEvent();
+    
+    {   
+        GeneralLoader* gl = MakeLoader ( m_source . MakeSource () );
+        REQUIRE ( RunLoader ( *gl, 0 ) );
+        delete gl;
+    } // make sure loader is destroyed (= db closed) before we reopen the database for verification
+    
+    REQUIRE_EQ ( u16value, GetValue<uint16_t> ( "TABLE1", "column16", 1 ) );    
+    REQUIRE_EQ ( u32value, GetValue<uint32_t> ( "TABLE1", "column32", 1 ) );    
+    REQUIRE_EQ ( u64value, GetValue<uint64_t> ( "TABLE1", "column64", 1 ) );    
+}
+
+FIXTURE_TEST_CASE ( IntegerCompression_MultipleValues, GeneralLoaderFixture )
+{   
+    if ( ! SetUpForIntegerCompression ( GetName() ) )
+        return;
+
+    // induce maximum compression ( 1 byte per value <= 0x7F )
+    const uint16_t u16value1 = 0x0001;              const uint16_t u16value2 = 0x0002;
+    const uint32_t u32value1 = 0x00000003;          const uint32_t u32value2 = 0x00000004;
+    const uint64_t u64value1 = 0x0000000000000006;  const uint64_t u64value2 = 0x0000000000000007;
+    
+    m_source . OpenStreamEvent();
+    
+    uint8_t buf[128];
+
+    {
+        int bytesTotal = 0;
+        int bytes = encode_uint16 ( u16value1, buf, buf + sizeof buf );
+        bytesTotal += bytes;
+        bytes = encode_uint16 ( u16value2, buf + bytesTotal, buf + sizeof buf );
+        bytesTotal += bytes;
+        REQUIRE_EQ ( 2, bytesTotal );
+        m_source . CellDataEventRaw ( Column16Id, 2, buf, bytesTotal );
+    }
+    
+    {
+        int bytesTotal = 0;
+        int bytes = encode_uint32 ( u32value1, buf, buf + sizeof buf );
+        bytesTotal += bytes;
+        bytes = encode_uint32 ( u32value2, buf + bytesTotal, buf + sizeof buf );
+        bytesTotal += bytes;
+        REQUIRE_EQ ( 2, bytesTotal );
+        m_source . CellDataEventRaw ( Column32Id, 2, buf, bytesTotal );
+    }
+    
+    {
+        int bytesTotal = 0;
+        int bytes = encode_uint64 ( u64value1, buf, buf + sizeof buf );
+        bytesTotal += bytes;
+        bytes = encode_uint64 ( u64value2, buf + bytesTotal, buf + sizeof buf );
+        bytesTotal += bytes;
+        REQUIRE_EQ ( 2, bytesTotal );
+        m_source . CellDataEventRaw ( Column64Id, 2, buf, bytesTotal );
+    }
+    
+    m_source . NextRowEvent ( DefaultTableId  );
+    m_source . CloseStreamEvent();
+    
+    {   
+        GeneralLoader* gl = MakeLoader ( m_source . MakeSource () );
+        REQUIRE ( RunLoader ( *gl, 0 ) );
+        delete gl;
+    } // make sure loader is destroyed (= db closed) before we reopen the database for verification
+    
+    REQUIRE_EQ ( u16value1, GetValueWithIndex<uint16_t> ( "TABLE1", "column16", 1, 2, 0 ) );    
+    REQUIRE_EQ ( u16value2, GetValueWithIndex<uint16_t> ( "TABLE1", "column16", 1, 2, 1 ) );    
+    REQUIRE_EQ ( u32value1, GetValueWithIndex<uint32_t> ( "TABLE1", "column32", 1, 2, 0 ) );    
+    REQUIRE_EQ ( u32value2, GetValueWithIndex<uint32_t> ( "TABLE1", "column32", 1, 2, 1 ) );    
+    REQUIRE_EQ ( u64value1, GetValueWithIndex<uint64_t> ( "TABLE1", "column64", 1, 2, 0 ) );    
+    REQUIRE_EQ ( u64value2, GetValueWithIndex<uint64_t> ( "TABLE1", "column64", 1, 2, 1 ) );    
+}
+
+// default values
+
+FIXTURE_TEST_CASE ( OneColumnDefaultNoWrite, GeneralLoaderFixture )
+{   
+    OpenStream_OneTableOneColumn ( GetName() );
+
+    string value = "this be my default";
+    m_source . CellDefaultEvent( DefaultColumnId, value );
+    // no WriteEvent
+    m_source . NextRowEvent ( DefaultTableId  );
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_EQ ( value, GetValue<string> ( DefaultTable, DefaultColumn, 1 ) ); 
+}
+
+FIXTURE_TEST_CASE ( OneColumnDefaultNoWrite_Long, GeneralLoaderFixture )
+{   
+    OpenStream_OneTableOneColumn ( GetName() );
+
+    string value ( GeneralLoader :: MaxPackedString + 1, 'x' );
+    m_source . CellDefaultEvent( DefaultColumnId, value );
+    // no WriteEvent
+    m_source . NextRowEvent ( DefaultTableId  );
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_EQ ( value, GetValue<string> ( DefaultTable, DefaultColumn, 1 ) ); 
+}
+
+FIXTURE_TEST_CASE ( MoveAhead, GeneralLoaderFixture )
+{   
+    OpenStream_OneTableOneColumn ( GetName() );
+
+    string value = "this be my default";
+    m_source . CellDefaultEvent( DefaultColumnId, value );
+    m_source . MoveAheadEvent ( DefaultTableId, 3 );
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_EQ ( value, GetValue<string> ( DefaultTable, DefaultColumn, 1 ) ); 
+    REQUIRE_EQ ( value, GetValue<string> ( DefaultTable, DefaultColumn, 2 ) ); 
+    REQUIRE_EQ ( value, GetValue<string> ( DefaultTable, DefaultColumn, 3 ) ); 
+    REQUIRE_THROW ( GetValue<string> ( DefaultTable, DefaultColumn, 4 ) ); 
+}
+
+FIXTURE_TEST_CASE ( OneColumnDefaultOverwite, GeneralLoaderFixture )
+{   
+    OpenStream_OneTableOneColumn ( GetName() );
+
+    string valueDflt = "this be my default";
+    m_source . CellDefaultEvent( DefaultColumnId, valueDflt );
+    string value = "not the default";
+    m_source . CellDataEvent( DefaultColumnId, value );
+    m_source . NextRowEvent ( DefaultTableId  );
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_EQ ( value, GetValue<string> ( DefaultTable, DefaultColumn, 1 ) ); 
+}
+
+FIXTURE_TEST_CASE ( OneColumnChangeDefault, GeneralLoaderFixture )
+{   
+    OpenStream_OneTableOneColumn ( GetName() );
+    
+    string value1 = "this be my first default";
+    m_source . CellDefaultEvent( DefaultColumnId, value1 );
+    m_source . NextRowEvent ( DefaultTableId  );
+    
+    string value2 = "and this be my second default";
+    m_source . CellDefaultEvent( DefaultColumnId, value2 );
+    m_source . NextRowEvent ( DefaultTableId  );
+    
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_EQ ( value1, GetValue<string> ( DefaultTable, DefaultColumn, 1 ) ); 
+    REQUIRE_EQ ( value2, GetValue<string> ( DefaultTable, DefaultColumn, 2 ) ); 
+}
+
+FIXTURE_TEST_CASE ( OneColumnDataAndDefaultsMixed, GeneralLoaderFixture )
+{   
+    OpenStream_OneTableOneColumn ( GetName() );
+    
+    string value1 = "first value";
+    m_source . CellDataEvent( DefaultColumnId, value1 );
+    m_source . NextRowEvent ( DefaultTableId  );
+    
+    string default1 = "first default";
+    m_source . CellDefaultEvent( DefaultColumnId, default1 );
+    m_source . NextRowEvent ( DefaultTableId  );
+    m_source . NextRowEvent ( DefaultTableId  );
+    
+    string value2 = "second value";
+    m_source . CellDefaultEvent( DefaultColumnId, value2 );
+    m_source . NextRowEvent ( DefaultTableId  );
+    
+    string default2 = "second default";
+    m_source . CellDefaultEvent( DefaultColumnId, default2 );
+    m_source . NextRowEvent ( DefaultTableId  );
+    
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_EQ ( value1,    GetValue<string> ( DefaultTable, DefaultColumn, 1 ) ); 
+    REQUIRE_EQ ( default1,  GetValue<string> ( DefaultTable, DefaultColumn, 2 ) ); 
+    REQUIRE_EQ ( default1,  GetValue<string> ( DefaultTable, DefaultColumn, 3 ) ); 
+    REQUIRE_EQ ( value2,    GetValue<string> ( DefaultTable, DefaultColumn, 4 ) ); 
+    REQUIRE_EQ ( default2,  GetValue<string> ( DefaultTable, DefaultColumn, 5 ) ); 
+}
+
+FIXTURE_TEST_CASE ( TwoColumnsFullRow, GeneralLoaderFixture )
+{   
+    SetUpStream_OneTable ( GetName() );
+
+    m_source . NewColumnEvent ( 1, DefaultTableId, DefaultColumn, 8 );
+    m_source . NewColumnEvent ( 2, DefaultTableId, U32Column, 32 );
+    m_source . OpenStreamEvent();
+    
+    string value1 = "value1";
+    m_source . CellDataEvent( 1, value1 );
+    uint32_t value2 = 12345;
+    m_source . CellDataEvent( 2, value2 );
+    m_source . NextRowEvent ( DefaultTableId  );
+    
+    m_source . CloseStreamEvent();
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_EQ ( value1,    GetValue<string>    ( DefaultTable, DefaultColumn, 1 ) ); 
+    REQUIRE_EQ ( value2,    GetValue<uint32_t>  ( DefaultTable, U32Column, 1 ) ); 
+}
+
+FIXTURE_TEST_CASE ( TwoColumnsIncompleteRow, GeneralLoaderFixture )
+{   
+    SetUpStream_OneTable ( GetName() );
+
+    m_source . NewColumnEvent ( 1, DefaultTableId, DefaultColumn, 8 );
+    m_source . NewColumnEvent ( 2, DefaultTableId, U32Column, 32 );
+    m_source . OpenStreamEvent();
+    
+    string value1 = "value1";
+    m_source . CellDataEvent( 1, value1 );
+    // no CellData for column 2
+    m_source . NextRowEvent ( DefaultTableId  );
+    
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), SILENT_RC ( rcVDB, rcColumn, rcClosing, rcRow, rcIncomplete) ) );
+}
+
+FIXTURE_TEST_CASE ( TwoColumnsPartialRowWithDefaults, GeneralLoaderFixture )
+{   
+    SetUpStream_OneTable ( GetName() );
+
+    m_source . NewColumnEvent ( 1, DefaultTableId, DefaultColumn, 8 );
+    m_source . NewColumnEvent ( 2, DefaultTableId, U32Column, 32 );
+    m_source . OpenStreamEvent();
+    
+    string value1 = "value1";
+    m_source . CellDataEvent( 1, value1 );
+    uint32_t value2 = 12345;
+    m_source . CellDefaultEvent( 2, value2 );
+    // no Data Event for column2
+    m_source . NextRowEvent ( DefaultTableId  );
+    
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_EQ ( value1,    GetValue<string>    ( DefaultTable, DefaultColumn, 1 ) ); 
+    REQUIRE_EQ ( value2,    GetValue<uint32_t>  ( DefaultTable, U32Column, 1 ) ); 
+}
+
+FIXTURE_TEST_CASE ( TwoColumnsPartialRowWithDefaultsAndOverride, GeneralLoaderFixture )
+{   
+    SetUpStream_OneTable ( GetName() );
+
+    m_source . NewColumnEvent ( 1, DefaultTableId, DefaultColumn, 8 );
+    m_source . NewColumnEvent ( 2, DefaultTableId, U32Column, 32 );
+    m_source . NewColumnEvent ( 3, DefaultTableId, BoolColumn, 8 );
+    m_source . OpenStreamEvent();
+    
+    string value1 = "value1";
+    m_source . CellDataEvent( 1, value1 );
+    uint32_t value2 = 12345;
+    m_source . CellDefaultEvent( 2, value2 );
+    m_source . CellDefaultEvent( 3, false );
+    bool value3 = true;
+    m_source . CellDataEvent( 3, true ); // override default
+    m_source . NextRowEvent ( DefaultTableId  );
+    
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_EQ ( value1,    GetValue<string>    ( DefaultTable, DefaultColumn, 1 ) );       // explicit
+    REQUIRE_EQ ( value2,    GetValue<uint32_t>  ( DefaultTable, U32Column, 1 ) );    // default
+    REQUIRE_EQ ( value3,    GetValue<bool>      ( DefaultTable, BoolColumn, 1 ) );   // not the default
+}
+
+FIXTURE_TEST_CASE ( EmptyDefault_String, GeneralLoaderFixture )
+{   
+    OpenStream_OneTableOneColumn ( GetName() );
+
+    m_source . OpenStreamEvent();
+    
+    m_source . CellEmptyDefaultEvent( 1 );
+    m_source . NextRowEvent ( DefaultTableId  );
+    
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_EQ ( string(), GetValue<string> ( DefaultTable, DefaultColumn, 1 ) );
+}
+
+FIXTURE_TEST_CASE ( EmptyDefault_Int, GeneralLoaderFixture )
+{   
+    SetUpStream_OneTable ( GetName() );
+
+    m_source . NewColumnEvent ( 1, DefaultTableId, U32Column, 32 );
+    m_source . OpenStreamEvent();
+    
+    m_source . CellEmptyDefaultEvent( 1 );
+    m_source . NextRowEvent ( DefaultTableId  );
+    
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE ( IsNullValue<uint32_t> ( DefaultTable, U32Column, 1 ) );
+}
+
+FIXTURE_TEST_CASE ( MultipleTables_Multiple_Columns_MultipleRows, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName() );
+    
+    m_source . NewTableEvent ( 100, DefaultTable );
+    m_source . NewColumnEvent ( 1, 100, DefaultColumn, 8 );
+    m_source . NewColumnEvent ( 2, 100, U32Column, 32 );
+
+    m_source . NewTableEvent ( 200, Table2 );
+    m_source . NewColumnEvent ( 3, 200, I64Column, 64 );
+    m_source . NewColumnEvent ( 4, 200, U8Column, 8 );
+    
+    m_source . OpenStreamEvent();
+    
+        string t1c1v1 = "t1c1v1";
+        m_source . CellDataEvent( 1, t1c1v1 );
+        uint32_t t1c2v1 = 121;
+        m_source . CellDataEvent( 2, t1c2v1 );
+    m_source . NextRowEvent ( 100 );
+
+        int64_t t2c1v1 = 211;
+        m_source . CellDataEvent( 3, t2c1v1 );
+        uint8_t t2c2v1 = 221;
+        m_source . CellDataEvent( 4, t2c2v1 );
+    m_source . NextRowEvent ( 200 );
+    
+        string t1c1v2 = "t1c1v2";
+        m_source . CellDataEvent( 1, t1c1v2 );
+        uint32_t t1c2v2 = 122;
+        m_source . CellDataEvent( 2, t1c2v2 );
+    m_source . NextRowEvent ( 100 );
+
+        int64_t t2c1v2 = 212;
+        m_source . CellDataEvent( 3, t2c1v2 );
+        uint8_t t2c2v2 = 222;
+        m_source . CellDataEvent( 4, t2c2v2 );
+    m_source . NextRowEvent ( 200 );
+    
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+    
+    REQUIRE_EQ ( t1c1v1,    GetValue<string>    ( DefaultTable, DefaultColumn, 1 ) );      
+    REQUIRE_EQ ( t1c2v1,    GetValue<uint32_t>  ( DefaultTable, U32Column, 1 ) );   
+    REQUIRE_EQ ( t2c1v1,    GetValue<int64_t>   ( Table2, I64Column, 1 ) );      
+    REQUIRE_EQ ( t2c2v1,    GetValue<uint8_t>   ( Table2, U8Column, 1 ) );   
+    
+    REQUIRE_EQ ( t1c1v2,    GetValue<string>    ( DefaultTable, DefaultColumn, 2 ) );      
+    REQUIRE_EQ ( t1c2v2,    GetValue<uint32_t>  ( DefaultTable, U32Column, 2 ) );   
+    REQUIRE_EQ ( t2c1v2,    GetValue<int64_t>   ( Table2, I64Column, 2 ) );      
+    REQUIRE_EQ ( t2c2v2,    GetValue<uint8_t>   ( Table2, U8Column, 2 ) );   
+}
+
+FIXTURE_TEST_CASE ( AdditionalSchemaIncludePaths_Single, GeneralLoaderFixture )
+{   
+    string schemaPath = "schema";
+    string includeName = string ( GetName() ) + ".inc.vschema";
+    string schemaIncludeFile = schemaPath + "/" + includeName;
+    CreateFile ( schemaIncludeFile, "table table1 #1.0.0 { column ascii column1; };" ); 
+    string schemaFile = string ( GetName() ) + ".vschema";
+    CreateFile ( schemaFile, string ( "include '" ) + includeName + "'; database database1 #1 { table table1 #1 TABLE1; } ;" ); 
+
+    SetUpStream ( GetName(), schemaFile, "database1" );
+    
+    const char* table1 = "TABLE1";
+    const char* column1 = "column1";
+    m_source . NewTableEvent ( DefaultTableId, table1 );
+    m_source . NewColumnEvent ( DefaultColumnId, DefaultTableId, column1, 8 );
+    m_source . OpenStreamEvent();
+    
+    string t1c1v1 = "t1c1v1";
+    m_source . CellDataEvent( DefaultColumnId, t1c1v1 );
+    m_source . NextRowEvent ( DefaultTableId  );
+    m_source . CloseStreamEvent();
+    
+    {   
+        GeneralLoader* gl = MakeLoader ( m_source . MakeSource () );
+        gl -> AddSchemaIncludePath ( schemaPath ); 
+        REQUIRE ( RunLoader ( *gl, 0 ) );
+        delete gl;
+    } // make sure loader is destroyed (= db closed) before we reopen the database for verification
+    
+    REQUIRE_EQ ( t1c1v1, GetValue<string> ( table1, column1, 1 ) );    
+
+    remove ( schemaIncludeFile . c_str() );
+    remove ( schemaFile . c_str() );
+}
+
+FIXTURE_TEST_CASE ( AdditionalSchemaIncludePaths_Multiple, GeneralLoaderFixture )
+{   
+    string schemaPath = "schema";
+    string includeName = string ( GetName() ) + ".inc.vschema";
+    string schemaIncludeFile = schemaPath + "/" + includeName;
+    CreateFile ( schemaIncludeFile, "table table1 #1.0.0 { column ascii column1; };" ); 
+    string schemaFile = string ( GetName() ) + ".vschema";
+    CreateFile ( schemaFile, string ( "include '" ) + includeName + "'; database database1 #1 { table table1 #1 TABLE1; } ;" ); 
+    
+    SetUpStream ( GetName(), schemaFile, "database1" );
+   
+    const char* table1 = "TABLE1";
+    const char* column1 = "column1";
+    m_source . NewTableEvent ( DefaultTableId, table1 );
+    m_source . NewColumnEvent ( DefaultColumnId, DefaultTableId, column1, 8 );
+    m_source . OpenStreamEvent();
+    
+    string t1c1v1 = "t1c1v1";
+    m_source . CellDataEvent( DefaultColumnId, t1c1v1 );
+    m_source . NextRowEvent ( DefaultTableId  );
+    m_source . CloseStreamEvent();
+    
+    {   
+        GeneralLoader* gl = MakeLoader ( m_source . MakeSource () );
+        gl -> AddSchemaIncludePath ( "path1" ); 
+        gl -> AddSchemaIncludePath ( string ( "path2:" ) + schemaPath + ":path3" ); 
+        REQUIRE ( RunLoader ( *gl, 0 ) );
+        delete gl;
+    } // make sure loader is destroyed (= db closed) before we reopen the database for verification
+    
+    REQUIRE_EQ ( t1c1v1, GetValue<string> ( table1, column1, 1 ) );    
+
+    remove ( schemaIncludeFile . c_str() );
+    remove ( schemaFile . c_str() );
+}
+
+FIXTURE_TEST_CASE ( AdditionalSchemaFiles_Single, GeneralLoaderFixture )
+{   
+    string schemaPath = "schema";
+    string schemaFile = schemaPath + "/" + GetName() + ".vschema";
+    CreateFile ( schemaFile, "table table1 #1.0.0 { column ascii column1; }; database database1 #1 { table table1 #1 TABLE1; };" ); 
+    
+    // here we specify a schema that does not exist but it's OK as long as we add a good schema later
+    SetUpStream ( GetName(), "does not exist", "database1" );
+    
+    const char* table1 = "TABLE1";
+    const char* column1 = "column1";
+    m_source . NewTableEvent ( DefaultTableId, table1 );
+    m_source . NewColumnEvent ( DefaultColumnId, DefaultTableId, column1, 8 );
+    m_source . OpenStreamEvent();
+    
+    string t1c1v1 = "t1c1v1";
+    m_source . CellDataEvent( DefaultColumnId, t1c1v1 );
+    m_source . NextRowEvent ( DefaultTableId  );
+    m_source . CloseStreamEvent();
+    
+    {   
+        GeneralLoader* gl = MakeLoader ( m_source . MakeSource () );
+        gl -> AddSchemaFile ( schemaFile );
+        REQUIRE ( RunLoader ( *gl, 0 ) );
+        delete gl;
+    } // make sure loader is destroyed (= db closed) before we reopen the database for verification
+    
+    REQUIRE_EQ ( t1c1v1, GetValue<string> ( table1, column1, 1 ) );    
+
+    remove ( schemaFile . c_str() );
+}
+
+FIXTURE_TEST_CASE ( AdditionalSchemaFiles_Multiple, GeneralLoaderFixture )
+{   
+    string schemaPath = "schema";
+    string schemaFile1 = schemaPath + "/" + GetName() + "1.vschema";
+    CreateFile ( schemaFile1, "table table1 #1.0.0 { column ascii column1; };" ); 
+    string schemaFile2 = schemaPath + "/" + GetName() + "2.vschema";
+    CreateFile ( schemaFile2, "database database1 #1 { table table1 #1 TABLE1; };" ); // this file uses table1 defined in schemaFile1
+    
+    string dbFile = string ( GetName() ) + ".db";
+    
+    // here we specify a schema that does not exist but it's OK as long as we add a good schema later
+    m_source . SchemaEvent ( "does not exist", "database1" );
+    m_source . DatabaseEvent ( dbFile );
+    
+    const char* table1 = "TABLE1";
+    const char* column1 = "column1";
+    m_source . NewTableEvent ( DefaultTableId, table1 );
+    m_source . NewColumnEvent ( DefaultColumnId, DefaultTableId, column1, 8 );
+    m_source . OpenStreamEvent();
+    
+    string t1c1v1 = "t1c1v1";
+    m_source . CellDataEvent( DefaultColumnId, t1c1v1 );
+    m_source . NextRowEvent ( DefaultTableId  );
+    m_source . CloseStreamEvent();
+    
+    {   
+        GeneralLoader* gl = MakeLoader ( m_source . MakeSource () );
+        gl -> AddSchemaFile ( schemaFile1 + ":garbage.vschema:" + schemaFile2 ); // some are good
+        REQUIRE ( RunLoader ( *gl, 0 ) );
+        delete gl;
+    } // make sure loader is destroyed (= db closed) before we reopen the database for verification
+    
+    REQUIRE_EQ ( t1c1v1, GetValue<string> ( table1, column1, 1 ) );    
+
+    remove ( schemaFile1 . c_str() );
+    remove ( schemaFile2 . c_str() );
+}
+
+FIXTURE_TEST_CASE ( ErrorMessage, GeneralLoaderFixture )
+{   
+    OpenStream_OneTableOneColumn ( GetName() );
+    m_source . OpenStreamEvent();
+    m_source . ErrorMessageEvent ( "error message" );
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), RC ( rcExe, rcFile, rcReading, rcError, rcExists ) ) );
+}
+
+FIXTURE_TEST_CASE ( ErrorMessage_Long, GeneralLoaderFixture )
+{   
+    OpenStream_OneTableOneColumn ( GetName() );
+    m_source . OpenStreamEvent();
+    m_source . ErrorMessageEvent ( string ( 257, 'x' ) );
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), RC ( rcExe, rcFile, rcReading, rcError, rcExists ) ) );
+}
+
+FIXTURE_TEST_CASE ( LogMessage, GeneralLoaderFixture )
+{   
+//FullLog();
+// uncomment the line above to see the message on stdout, eg:
+// 2016-01-05T18:45:01 test-general-loader.1 info: general-loader: log from front-end-app: "some log message"
+
+    OpenStream_OneTableOneColumn ( GetName() );
+    const string SoftwareName = "front-end-app";
+    const string Version = "2.1.1";
+    m_source . SoftwareNameEvent ( SoftwareName, Version );
+    m_source . OpenStreamEvent();
+    m_source . LogMessageEvent ( "some log message" );
+    m_source . CloseStreamEvent();
+    
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+}
+
+
+FIXTURE_TEST_CASE ( ProgressMessage, GeneralLoaderFixture )
+{
+    // timestamp
+    time_t timestamp = time ( NULL );
+
+    OpenStream_OneTableOneColumn ( GetName() );
+    m_source . OpenStreamEvent ();
+    m_source . ProgMessageEvent ( 123, "progress message", timestamp, 2, 45 );
+    m_source . CloseStreamEvent ();
+
+    REQUIRE ( Run ( m_source . MakeSource (), 0 ) );
+}
+
+
+FIXTURE_TEST_CASE ( TargetOverride, GeneralLoaderFixture )
+{   
+    SetUpStream ( GetName() );
+    m_source . OpenStreamEvent();
+    m_source . CloseStreamEvent();
+
+    string newTarget = string ( GetName() ) + "_override";
+    {   
+        GeneralLoader* gl = MakeLoader ( m_source . MakeSource () );
+        gl -> SetTargetOverride ( newTarget );
+        REQUIRE ( RunLoader ( *gl, 0 ) );
+        delete gl;
+    } // make sure loader is destroyed (= db closed) before we reopen the database for verification
+    
+    REQUIRE_THROW ( OpenDatabase() );       // the db from the instruction stream was not created
+    OpenDatabase ( newTarget . c_str() );   // did not throw => overridden target db opened successfully
+    
+    // clean up
+    CloseDatabase();
+    KDirectoryRemove ( m_wd, true, newTarget . c_str() );
+}
+
+//////////////////////////////////////////// Main
+extern "C"
+{
+
+#include <kapp/args.h>
+#include <kfg/config.h>
+
+ver_t CC KAppVersion ( void )
+{
+    return 0x1000000;
+}
+rc_t CC UsageSummary (const char * progname)
+{
+    return 0;
+}
+
+rc_t CC Usage ( const Args * args )
+{
+    return 0;
+}
+
+const char UsageDefaultName[] = "test-general-loader";
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+//    TestEnv::verbosity = LogLevel::e_all;
+    KConfigDisableUserSettings();
+    
+    ClearScratchDir();
+    
+    GeneralLoaderFixture :: argv0 = argv[0];
+
+    TestSource::packed = false;
+    cerr << "Unpacked protocol: ";
+    rc_t rc = GeneralLoaderTestSuite(argc, argv);
+    if ( rc == 0 )
+    {
+        ClearScratchDir();
+
+        TestSource::packed = true;
+        cerr << "Packed protocol: ";
+        rc = GeneralLoaderTestSuite(argc, argv);
+    }
+
+    ClearScratchDir();
+
+    return rc;
+}
+
+}  
+
diff --git a/test/general-loader/test-general-writer.cpp b/test/general-loader/test-general-writer.cpp
new file mode 100644
index 0000000..902b2eb
--- /dev/null
+++ b/test/general-loader/test-general-writer.cpp
@@ -0,0 +1,341 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "../../tools/general-loader/general-writer.hpp"
+
+#include <iostream>
+#include <string>
+#include <fstream>
+#include <cstdlib>
+#include <cstring>
+#include <cstdio>
+
+namespace ncbi
+{
+    
+    GeneralWriter * testCreateGw ( const char * out_path, const char * schema_path, const char * software_name, const char * version )
+    {
+        GeneralWriter * ret;
+        if ( out_path == 0 )
+        {
+            // use stdout
+            ret = new GeneralWriter ( 1 );
+        }
+        else
+        {   
+            // use a file
+            ret = new GeneralWriter ( out_path );
+        }
+        
+        ret -> setRemotePath ( schema_path );
+        ret -> useSchema ( schema_path, std :: string ( "general_writer:test:db" ) );
+        ret -> setSoftwareName ( software_name, version );
+        
+        return ret;
+    }
+
+    int testAddTable ( GeneralWriter *gw )
+    {  
+        return gw -> addTable ( std :: string ( "table1" ) );
+    }
+
+    void testAddColumn ( GeneralWriter *gw, int table_id, const char *column_names [], int column_count, int *stream_ids )
+    {
+        for ( int i = 0; i < column_count; ++ i )
+        {
+            const char *name = column_names [ i ];
+            stream_ids [ i ] = gw -> addColumn ( table_id, name, 8, 0 ); // all columns are ascii for now
+        }
+    }
+
+    void testDBAddDatabase ( GeneralWriter *gw, const char *mbr_name, const char *db_name, uint8_t create_mode )
+    {
+        gw -> dbAddDatabase ( 0, mbr_name, db_name, create_mode );
+    }
+
+    void testDBAddTable ( GeneralWriter *gw, const char *mbr_name, const char *table_name, uint8_t create_mode )
+    {
+        gw -> dbAddDatabase ( 0, mbr_name, table_name, create_mode );
+    }
+
+    void testOpen ( GeneralWriter *gw )
+    {
+        gw -> open ();
+    }
+
+    void testColumnDefault ( GeneralWriter *gw, int stream_id )
+    {
+        const char *data = "some string as data";
+        gw -> columnDefault ( stream_id, 8, data, strlen ( data ) ); 
+    }
+
+    void testWrite ( GeneralWriter *gw, int table_id, int *stream_ids, int column_count, const char *file_names [] )
+    {
+        FILE **columns = ( FILE ** ) calloc ( column_count, sizeof *columns );
+        if ( columns == NULL )
+            throw "Failed to allocate memory";
+
+        char buffer [ 4096 ];
+        size_t buff_size = sizeof buffer;
+
+        // Populate array of file pointers
+        for ( int i = 0; i < column_count; ++ i )
+        { 
+            const char *name = file_names [ i ];
+            FILE *column = fopen ( name, "r" );
+            
+            if ( column == NULL )
+                throw "Error opening file";
+            
+            columns [ i ] = column;
+            
+            column = 0;
+        }
+        
+        // open the stream
+        gw -> open ();
+        
+        // set default values for each column
+        for ( int i = 0; i < column_count; ++ i )
+            gw -> columnDefault ( stream_ids [ i ], 8, "EOF", strlen ( "EOF" ) );
+
+        while ( 1 )
+        {
+            bool validColumn = false;
+            // write one line from each column
+            for ( int i = 0; i < column_count; ++ i )
+            {
+                // Skip any NULL entries in the FILE array
+                if ( columns [ i ] == NULL )
+                    continue;
+                
+                FILE *column = columns [ i ];
+                
+                if ( fgets ( buffer, buff_size, column ) ==  NULL )
+                {
+                    if ( ferror ( column ) )
+                    {
+                        fclose ( column );
+                        throw "Error reading from file";
+                    }
+                    
+                    // Found EOF while reading cell data
+                    // close FILE and set array pointer to NULL
+                    fclose ( column );
+                    column = 0;
+                    columns [ i ] = 0;
+                    continue;
+                }
+                
+                // found valid data, write line and go to next column
+                int elem_count = strlen ( ( const char * ) buffer );
+
+                // ensure there are no new lines at the end of the string
+                for ( int j = elem_count - 1; j >= 0; -- j )
+                {
+                    if ( buffer [ j ] == '\n' )
+                        -- elem_count;
+                }
+
+                gw -> write ( stream_ids [ i ], 8, buffer, elem_count );
+                validColumn = true;
+            }
+            
+            if ( ! validColumn )
+                break;
+
+            // go to the next row
+            gw -> nextRow ( table_id );
+        }
+        free ( columns );
+    }
+
+    void testAddDBMetadataNode ( GeneralWriter *gw, const char * node, const char *value )
+    {
+        gw -> setDBMetadataNode ( 0, node, value );
+    }
+
+    void testAddTblMetadataNode ( GeneralWriter *gw, const char * node, const char *value )
+    {
+        gw -> setTblMetadataNode ( 1, node, value );
+    }
+
+    void testAddColMetadataNode ( GeneralWriter *gw, const char * node, const char *value )
+    {
+        gw -> setColMetadataNode ( 1, node, value );
+    }
+
+    void testProgMsg ( GeneralWriter *gw, const char *name, 
+                       uint32_t version, uint64_t done, uint64_t total )
+    {
+        gw -> progMsg ( name, version, done, total );
+    }
+
+    void testEndStream ( GeneralWriter *gw )
+    {
+        gw -> endStream ();
+        
+        try
+        {
+            std :: cerr << "Attempting add table after endStream" << std :: endl;            
+            gw -> addTable ( "table1" );
+        }
+        catch ( const char x [] )
+        {
+            std :: cerr << x << std :: endl;
+            std :: cerr << "addTable correctly failed" << std :: endl;
+        }
+    }
+
+    void runTest ( int column_count, const char * columns [], const char *outfile, const char * schema_path )
+    {
+        GeneralWriter *gw;
+        try
+        {
+            const char * column_names [ column_count ];
+
+            for ( int i = 0; i < column_count ; ++ i )
+                column_names [ i ] = columns [ i ];
+
+            gw = testCreateGw ( outfile, schema_path, "softwarename", "2" );
+            std :: cerr << "CreateGw Success" << std :: endl;
+            std :: cerr << "---------------------------------" << std :: endl;
+                        
+            int table_id = testAddTable ( gw );
+            std :: cerr << "addTable Success" << std :: endl;
+            std :: cerr << "---------------------------------" << std :: endl;
+
+            int stream_ids [ column_count ];
+            testAddColumn ( gw, table_id, column_names, column_count, stream_ids ); 
+            std :: cerr << "addColumn Success" << std :: endl;
+            std :: cerr << "---------------------------------" << std :: endl;
+
+            testDBAddDatabase ( gw, "member_name", "db_name", 1 );
+            std :: cerr << "dbAddDatabase Success" << std :: endl;
+            std :: cerr << "---------------------------------" << std :: endl;
+
+            testDBAddTable ( gw, "member_name", "table_name", 1 );
+            std :: cerr << "dbAddTable Success" << std :: endl;
+            std :: cerr << "---------------------------------" << std :: endl;
+
+            testWrite ( gw, table_id, stream_ids, column_count, column_names );
+            std :: cerr << "write Success" << std :: endl;
+            std :: cerr << "---------------------------------" << std :: endl;
+
+            testAddDBMetadataNode ( gw, "db_metadata_node", "01a2b3c4d" );
+            std :: cerr << "setDBMetadataNode Success" << std :: endl;
+            std :: cerr << "---------------------------------" << std :: endl;
+            testAddTblMetadataNode ( gw, "tbl_metadata_node", "01a2b3c4d" );
+            std :: cerr << "setTblMetadataNode Success" << std :: endl;
+            std :: cerr << "---------------------------------" << std :: endl;
+            testAddColMetadataNode ( gw, "col_metadata_node", "01a2b3c4d" );
+            std :: cerr << "setColMetadataNode Success" << std :: endl;
+            std :: cerr << "---------------------------------" << std :: endl;
+
+            testProgMsg ( gw, "name", 1, 54768, 64000 );
+            std :: cerr << "setProgMsg Success" << std :: endl;
+            std :: cerr << "---------------------------------" << std :: endl;
+
+            testEndStream ( gw );
+            std :: cerr << "endStream Success" << std :: endl;
+            std :: cerr << "---------------------------------" << std :: endl;
+
+        }
+        catch ( ... )
+        {
+            delete gw;
+            throw;
+        }
+        delete gw;
+    }
+}
+
+const char * getArg ( const char*  &arg, int & i, int argc, char * argv [] )
+{
+    if ( arg [ 1 ] != 0 )
+    {
+        const char * next = arg + 1;
+        arg = "\0";
+        return next;
+    }
+    
+    if ( ++ i == argc )
+        throw "Missing argument";
+    
+    return argv [ i ];
+}
+
+int main ( int argc, char * argv [] )
+{
+    int status = 1;
+    
+    try
+    {
+
+        const char *outfile = "./db/";
+        const char *schema_path = "./test-general-writer.vschema";
+        int num_columns = 0;
+    
+        for ( int i = 1; i < argc; ++ i )
+        {
+            const char * arg = argv [ i ];
+            if ( arg [ 0 ] != '-' )
+            {
+                // have an input column
+                argv [ num_columns ++ ] = ( char* ) arg;
+            }
+            else do switch ( ( ++ arg ) [ 0 ] )
+            {
+                case 'o':
+                    outfile = getArg ( arg, i, argc, argv );
+                    break;
+                case 's':
+                    schema_path = getArg ( arg, i, argc, argv );
+                default:
+                    throw "Invalid argument";
+            }
+            while ( arg [ 1 ] != 0 );
+        }
+        
+        if ( num_columns == 0 )
+        {
+            const char * columns [ 2 ] = { "input/column01", "input/column02" };
+            ncbi :: runTest ( 2, columns, outfile, schema_path );
+        }
+        else
+        {
+            ncbi :: runTest ( num_columns, ( const char ** ) argv, outfile, schema_path );
+        }
+        
+        status = 0;
+    }
+    catch ( const char x [] )
+    {
+        std :: cerr << x << std :: endl;
+    }
+    
+    return status;
+}
diff --git a/test/general-loader/test-gw-dumper.cpp b/test/general-loader/test-gw-dumper.cpp
new file mode 100644
index 0000000..6a6347d
--- /dev/null
+++ b/test/general-loader/test-gw-dumper.cpp
@@ -0,0 +1,80 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _cpp_gw_dumper_test_
+#define _cpp_gw_dumper_test_
+
+#ifndef _hpp_general_writer_
+#include "general-writer.hpp"
+#endif
+
+#include <kfs/defs.h>
+
+namespace ncbi
+{
+    static
+    void run ()
+    {
+        GeneralWriter gw ( "test-gw-dumper.gw" );
+
+        gw . setRemotePath ( "remote-path" );
+        gw . setSoftwareName ( "gw-dumper-test", "0.9.0" );
+        gw . useSchema ( "schemafile.vschema", "db_spec.schema" );
+
+        int db_id = gw . dbAddDatabase ( 0, "db1", "db1", kcmCreate );
+        gw . setDBMetadataNode ( db_id, "node/path", "value01" );
+
+        int tbl_id = gw . dbAddTable ( db_id, "tbl1", "tbl1", kcmCreate );
+        gw . setTblMetadataNode ( tbl_id, "tbl/path", "value01" );
+
+        int col_id = gw . addColumn ( tbl_id, "col1", 64, 0 );
+        gw . setColMetadataNode ( col_id, "col/path", "value01" );
+
+        tbl_id = gw . addTable ( "tbl2" );
+        gw . setTblMetadataNode ( tbl_id, "tbl2/path", "value02" );
+    }
+}
+
+
+int main ( int argc, char * argv [] )
+{
+    try
+    {
+        ncbi :: run ();
+    }
+    catch ( const char x [] )
+    {
+        std :: cerr << "caught exception: " << x << '\n';
+    }
+    catch ( ... )
+    {
+        std :: cerr << "caught exception\n";
+    }
+
+    return 0;
+}
+
+#endif //_cpp_gw_dumper_test_
diff --git a/test/general-loader/testsource.cpp b/test/general-loader/testsource.cpp
new file mode 100644
index 0000000..0801928
--- /dev/null
+++ b/test/general-loader/testsource.cpp
@@ -0,0 +1,758 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+/**
+* Test stream creation class for unit-testing General Loader
+*/
+
+#include "testsource.hpp"
+
+#include "../../tools/general-loader/general-loader.hpp"
+
+#include <kfs/ramfile.h>
+
+#include <sysalloc.h>
+
+#include <cstring>
+
+#include <stdexcept> 
+
+using namespace std;
+using namespace ncbi;
+
+/////////////////////////////////////////////// TestSource::Buffer
+
+TestSource::Buffer::Buffer ( const string& p_signature, uint32_t p_endness, uint32_t p_version, bool p_packing )
+:   m_buffer ( 0 ), m_bufSize ( 0 )
+{
+    init ( m_header );
+    strncpy ( m_header . dad . signature, p_signature . c_str(), sizeof m_header . dad . signature );
+    m_header . dad . endian   = p_endness;
+    m_header . dad . version  = p_version;
+    m_header . packing = p_packing ? 1 : 0;
+    
+    Write ( & m_header, m_header . dad . hdr_size ); 
+}
+    
+TestSource::Buffer::~Buffer ()
+{
+    free ( m_buffer );
+}
+
+void 
+TestSource::Buffer::Save ( std::ostream& p_out ) const 
+{ 
+    p_out . write ( m_buffer, m_bufSize ); 
+}
+    
+void 
+TestSource::Buffer::Write ( const void * p_data, size_t p_size )
+{
+    m_buffer = ( char * ) realloc ( m_buffer, m_bufSize + p_size );
+    if ( m_buffer == 0 )
+        throw logic_error ( "TestSource::Buffer::Write: realloc failed" );
+        
+    memcpy ( m_buffer + m_bufSize, p_data, p_size );
+    m_bufSize += p_size;
+}
+
+void 
+TestSource::Buffer::Pad ( size_t p_alignment )
+{
+    size_t newSize = ( m_bufSize + p_alignment - 1 ) / p_alignment;
+    newSize *= p_alignment;
+    if ( m_bufSize != newSize ) 
+    {
+        m_buffer = ( char * ) realloc ( m_buffer, newSize );
+        if ( m_buffer == 0 )
+            throw logic_error ( "TestSource::Buffer::Write: realloc failed" );
+        memset ( m_buffer + m_bufSize, 0, newSize - m_bufSize );
+        m_bufSize = newSize;
+    }
+}
+
+void  
+TestSource::Buffer::Write ( const TestSource::Event& p_event )
+{
+    if ( m_header . packing )
+    {
+        WritePacked ( p_event );
+    }
+    else
+    {
+        WriteUnpacked ( p_event );
+    }
+}
+
+void    
+TestSource::Buffer::WriteUnpacked ( const TestSource::Event& p_event )
+{
+    Pad ();
+    switch ( p_event . m_event )
+    {
+    case evt_use_schema:
+    case evt_software_name:
+    case evt_db_metadata_node:
+    case evt_tbl_metadata_node:
+    case evt_col_metadata_node:
+        {   
+            gw_2string_evt_v1 hdr;
+            init ( hdr, p_event . m_id1, p_event . m_event );
+            set_size1 ( hdr, p_event . m_str1 . size() );
+            set_size2 ( hdr, p_event . m_str2 . size() );
+            
+            Write ( & hdr, sizeof hdr ); 
+            Write ( p_event . m_str1 . c_str(), p_event . m_str1 . size() ); 
+            Write ( p_event . m_str2 . c_str(), p_event . m_str2 . size() ); 
+        }
+        break;
+        
+    case evt_remote_path:
+    case evt_new_table:
+    case evt_logmsg:
+    case evt_errmsg:
+        {   
+            gw_1string_evt_v1 hdr;
+            init ( hdr, p_event . m_id1, p_event . m_event );
+            set_size ( hdr, p_event . m_str1 . size () );
+            
+            Write ( & hdr, sizeof hdr ); 
+            Write ( p_event . m_str1 . c_str(), p_event . m_str1 . size() ); 
+        }
+        break;
+    case evt_progmsg:
+        gw_status_evt_v1 hdr;
+        init ( hdr, p_event . m_id1 , evt_progmsg );
+        set_version ( hdr, p_event . m_uint32_2 );
+        set_timestamp ( hdr, p_event . m_uint32 );
+        set_pid ( hdr, p_event . m_id1 );
+        set_size ( hdr, p_event . m_str1 . size () );
+        set_percent ( hdr, p_event . m_uint32_3 );
+
+        Write ( &hdr . dad, sizeof hdr );
+        Write ( p_event . m_str1 . c_str (), p_event . m_str1 . size () );
+
+        break;
+        
+    case evt_new_column :
+        {
+            gw_column_evt_v1 hdr;
+            init ( hdr, p_event . m_id1, p_event . m_event );
+            set_table_id ( hdr, p_event . m_id2 );
+            set_elem_bits ( hdr, p_event . m_uint32 );
+            set_name_size ( hdr, p_event . m_str1 . size () );
+            
+            Write ( & hdr, sizeof hdr );
+            Write ( p_event . m_str1 . c_str (), p_event . m_str1 . size () );
+        }
+        break;
+        
+    case evt_add_mbr_db:
+    case evt_add_mbr_tbl:
+    {
+        gw_add_mbr_evt_v1 hdr;
+        init ( hdr, p_event . m_id1, p_event . m_event );
+
+        set_db_id ( hdr, p_event . m_id2 );
+        set_size1 ( hdr, p_event . m_str1 . size() );
+        set_size2 ( hdr, p_event . m_str2 . size() );
+        set_create_mode ( hdr, p_event . m_uint8 );
+            
+        Write ( & hdr, sizeof hdr );
+        Write ( p_event . m_str1 . data (), p_event . m_str1 . size () );
+        Write ( p_event . m_str2 . data (), p_event . m_str2 . size () );
+        
+    }
+    break;
+
+    case evt_open_stream:
+    case evt_end_stream:
+        {
+            gw_evt_hdr_v1 hdr;
+            init ( hdr, 0, p_event . m_event );
+            Write ( & hdr, sizeof hdr );
+        }
+        break;
+
+    case evt_cell_data :
+    case evt_cell_default :
+        {
+            gw_data_evt_v1 hdr;
+            init ( hdr, p_event . m_id1, p_event . m_event );
+            set_elem_count ( hdr, p_event . m_uint32 );
+            
+            Write ( & hdr, sizeof hdr );
+            Write ( p_event . m_val . data(), p_event . m_val . size() );
+        }
+        break;
+        
+    case evt_next_row:
+    case evt_empty_default :
+        {
+            gw_evt_hdr_v1 hdr;
+            init ( hdr, p_event . m_id1, p_event . m_event );
+            Write ( & hdr, sizeof hdr );
+        }
+        break;
+        
+    case evt_move_ahead:
+        {
+            gw_move_ahead_evt_v1 hdr;
+            init ( hdr, p_event . m_id1, p_event . m_event );
+            set_nrows ( hdr, p_event . m_uint64 );
+            Write ( & hdr, sizeof hdr );
+        }
+        break;
+        
+    default:
+        throw logic_error ( "TestSource::Buffer::WriteUnpacked: event not implemented" );
+    }
+}
+    
+void    
+TestSource::Buffer::WritePacked ( const TestSource::Event& p_event )
+{
+    switch ( p_event . m_event )
+    {
+    case evt_use_schema:
+    case evt_software_name:
+    case evt_db_metadata_node:
+    case evt_tbl_metadata_node:
+    case evt_col_metadata_node:
+        if ( p_event . m_str1 . size () <= GeneralLoader :: MaxPackedString && p_event . m_str2 . size () <= GeneralLoader :: MaxPackedString )
+        {   
+            gwp_2string_evt_v1 hdr;
+            init ( hdr, p_event . m_id1, p_event . m_event );
+        
+            set_size1 ( hdr, p_event . m_str1 . size() );
+            set_size2 ( hdr, p_event . m_str2 . size() );
+
+            Write ( & hdr, sizeof hdr ); 
+        }
+        else
+        {   
+            gwp_2string_evt_U16_v1 hdr;
+            init ( hdr, p_event . m_id1, evt_use_schema2 );
+        
+            set_size1 ( hdr, p_event . m_str1 . size() );
+            set_size2 ( hdr, p_event . m_str2 . size() );
+
+            Write ( & hdr, sizeof hdr ); 
+        }
+        Write ( p_event . m_str1 . c_str(), p_event . m_str1 . size() ); 
+        Write ( p_event . m_str2 . c_str(), p_event . m_str2 . size() ); 
+        break;
+        
+    //TODO: the following 3 cases are almost identical - refactor
+    case evt_remote_path:
+        if ( p_event . m_str1 . size () <= GeneralLoader :: MaxPackedString )
+        {   
+            gwp_1string_evt_v1 hdr;
+            init ( hdr, p_event . m_id1, evt_remote_path );
+            set_size ( hdr, p_event . m_str1 . size () );
+            Write ( & hdr, sizeof hdr ); 
+        }
+        else
+        {
+            gwp_1string_evt_U16_v1 hdr;
+            init ( hdr, p_event . m_id1, evt_remote_path2 );
+            set_size ( hdr, p_event . m_str1 . size () );
+            Write ( & hdr, sizeof hdr ); 
+        }
+        Write ( p_event . m_str1 . c_str(), p_event . m_str1 . size() ); 
+        break;
+    case evt_new_table:
+        if ( p_event . m_str1 . size () <= GeneralLoader :: MaxPackedString )
+        {   
+            gwp_1string_evt_v1 hdr;
+            init ( hdr, p_event . m_id1, evt_new_table );
+            set_size ( hdr, p_event . m_str1 . size () );
+            Write ( & hdr, sizeof hdr ); 
+        }
+        else
+        {
+            gwp_1string_evt_U16_v1 hdr;
+            init ( hdr, p_event . m_id1, evt_new_table2 );
+            set_size ( hdr, p_event . m_str1 . size () );
+            Write ( & hdr, sizeof hdr ); 
+        }
+        Write ( p_event . m_str1 . c_str(), p_event . m_str1 . size() ); 
+        break;
+    case evt_logmsg:
+        {
+            gwp_1string_evt_U16_v1 hdr;
+            init ( hdr, p_event . m_id1, p_event . m_event );
+            set_size ( hdr, p_event . m_str1 . size () );
+            Write ( & hdr, sizeof hdr ); 
+        }
+        Write ( p_event . m_str1 . c_str(), p_event . m_str1 . size() ); 
+        break;
+    case evt_errmsg:
+        if ( p_event . m_str1 . size () <= GeneralLoader :: MaxPackedString )
+        {   
+            gwp_1string_evt_v1 hdr;
+            init ( hdr, p_event . m_id1, evt_errmsg );
+            set_size ( hdr, p_event . m_str1 . size () );
+            Write ( & hdr, sizeof hdr ); 
+        }
+        else
+        {
+            gwp_1string_evt_U16_v1 hdr;
+            init ( hdr, p_event . m_id1, evt_errmsg2 );
+            set_size ( hdr, p_event . m_str1 . size () );
+            Write ( & hdr, sizeof hdr ); 
+        }
+        Write ( p_event . m_str1 . c_str(), p_event . m_str1 . size() ); 
+        break;
+    case evt_progmsg:
+        gwp_status_evt_v1 hdr;
+        init ( hdr, p_event . m_id1 , evt_progmsg );
+        set_version ( hdr, p_event . m_uint32_2 );
+        set_timestamp ( hdr, p_event . m_uint32 );
+        set_pid ( hdr, ( uint16_t ) p_event . m_id1 );
+        set_size ( hdr, p_event . m_str1 . size () );
+        set_percent ( hdr, ( uint8_t ) p_event . m_uint32_3 );
+
+        Write ( &hdr . dad, sizeof hdr );
+        Write ( p_event . m_str1 . c_str (), p_event . m_str1 . size () );
+        break;
+    case evt_new_column :
+        {
+            gwp_column_evt_v1 hdr;
+            init ( hdr, p_event . m_id1, p_event . m_event );
+            set_table_id ( hdr, p_event . m_id2 );
+            set_elem_bits ( hdr, p_event . m_uint32 );
+            hdr . flag_bits = p_event . m_uint8;
+            set_name_size ( hdr, p_event . m_str1 . size () );
+            
+            Write ( & hdr, sizeof hdr );
+            Write ( p_event . m_str1 . c_str (), p_event . m_str1 . size () );
+        }
+        break;
+
+    case evt_add_mbr_db:
+    case evt_add_mbr_tbl:
+    {
+        gwp_add_mbr_evt_v1 hdr;
+        init ( hdr, p_event . m_id1, p_event . m_event );
+
+        set_db_id ( hdr, p_event . m_id2 );
+        set_size1 ( hdr, p_event . m_str1 . size() );
+        set_size2 ( hdr, p_event . m_str2 . size() );
+        set_create_mode ( hdr, p_event . m_uint8 );
+            
+        Write ( & hdr, sizeof hdr );
+        Write ( p_event . m_str1 . data (), p_event . m_str1 . size () );
+        Write ( p_event . m_str2 . data (), p_event . m_str2 . size () );
+        
+    }
+    break;
+        
+    case evt_open_stream:
+    case evt_end_stream:
+        {
+            gwp_evt_hdr_v1 hdr;
+            init ( hdr, 0, p_event . m_event );
+            Write ( & hdr, sizeof hdr );
+        }
+        break;
+
+    case evt_cell_data :
+        if ( p_event . m_val . size () <= GeneralLoader :: MaxPackedString )
+        {
+            gwp_data_evt_v1 hdr;
+            init ( hdr, p_event . m_id1, evt_cell_data );
+            // in the packed message, we specify the number of bytes in the cell
+            set_size ( hdr, p_event . m_val . size() ); 
+            
+            Write ( & hdr, sizeof hdr );
+        }
+        else
+        {
+            gwp_data_evt_U16_v1 hdr;
+            init ( hdr, p_event . m_id1, evt_cell_data2 );
+            // in the packed message, we specify the number of bytes in the cell
+            set_size ( hdr, p_event . m_val . size() ); 
+            
+            Write ( & hdr, sizeof hdr );
+        }
+        Write ( p_event . m_val . data(), p_event . m_val . size() );
+        break;
+    case evt_cell_default :
+        if ( p_event . m_val . size () <= GeneralLoader :: MaxPackedString )
+        {
+            gwp_data_evt_v1 hdr;
+            init ( hdr, p_event . m_id1, evt_cell_default ); //TODO: this is the only difference from evt_cell_data - refactor
+            // in the packed message, we specify the number of bytes in the cell
+            set_size ( hdr, p_event . m_val . size() ); 
+            
+            Write ( & hdr, sizeof hdr );
+        }
+        else
+        {
+            gwp_data_evt_U16_v1 hdr;
+            init ( hdr, p_event . m_id1, evt_cell_default2 ); //TODO: this is the only difference from evt_cell_data - refactor
+            // in the packed message, we specify the number of bytes in the cell
+            set_size ( hdr, p_event . m_val . size() ); 
+            
+            Write ( & hdr, sizeof hdr );
+        }
+        Write ( p_event . m_val . data(), p_event . m_val . size() );
+        break;
+        
+    case evt_next_row:
+    case evt_empty_default :
+        {
+            gwp_evt_hdr_v1 hdr;
+            init ( hdr, p_event . m_id1, p_event . m_event );
+            Write ( & hdr, sizeof hdr );
+        }
+        break;
+        
+    case evt_move_ahead:
+        {
+            gwp_move_ahead_evt_v1 hdr;
+            init ( hdr, p_event . m_id1, p_event . m_event );
+            set_nrows ( hdr, p_event . m_uint64 );
+            Write ( & hdr, sizeof hdr );
+        }
+        break;
+        
+    default:
+        throw logic_error ( "TestSource::Buffer::WritePacked: event not implemented" );
+    }
+}
+
+/////////////////////////////////////// TestSource
+
+bool TestSource::packed = false;
+
+TestSource::TestSource ( const string& p_signature, uint32_t p_endness, uint32_t p_version )
+:   m_buffer ( new Buffer ( p_signature, p_endness, p_version, packed ) )
+{
+}
+
+TestSource::~TestSource()
+{
+    delete m_buffer;
+}
+
+const struct KFile * 
+TestSource::MakeSource ()
+{
+    const struct KFile * ret;
+    if ( KRamFileMakeRead ( & ret, 
+                            const_cast < char* > ( m_buffer -> GetData() ), 
+                            m_buffer -> GetSize() ) != 0 
+         || ret == 0 )
+        throw logic_error ( "TestSource::MakeSource KRamFileMakeRead failed" );
+        
+    return ret;
+}
+
+void 
+TestSource::SchemaEvent ( const std::string& p_schemaFile, const std::string& p_schemaName )
+{
+    m_buffer -> Write ( Event ( evt_use_schema, p_schemaFile, p_schemaName ) );
+}
+
+void 
+TestSource::DatabaseEvent ( const std::string& p_databaseName )
+{
+    m_buffer -> Write ( Event ( evt_remote_path, p_databaseName ) );
+    m_database = p_databaseName;
+}
+
+void 
+TestSource::SoftwareNameEvent ( const std::string& p_softwareName, const std::string& p_version )
+{
+    m_buffer -> Write ( Event ( evt_software_name, p_softwareName, p_version ) );
+}
+
+void
+TestSource::DBMetadataNodeEvent ( ObjectId p_id, const std::string& p_metadataNode, const std::string& p_value )
+{
+    m_buffer -> Write ( Event ( evt_db_metadata_node, p_id, p_metadataNode, p_value ) );
+}
+
+void
+TestSource::TblMetadataNodeEvent ( TableId p_id, const std::string& p_metadataNode, const std::string& p_value )
+{
+    m_buffer -> Write ( Event ( evt_tbl_metadata_node, p_id, p_metadataNode, p_value ) );
+}
+
+void
+TestSource::ColMetadataNodeEvent ( ColumnId p_id, const std::string& p_metadataNode, const std::string& p_value )
+{
+    m_buffer -> Write ( Event ( evt_col_metadata_node, p_id, p_metadataNode, p_value ) );
+}
+
+void 
+TestSource::NewTableEvent ( TableId p_id, const std::string& p_table )
+{
+    m_buffer -> Write ( Event ( evt_new_table, p_id, p_table ) );
+}
+
+void 
+TestSource::NewColumnEvent ( ColumnId p_columnId, TableId p_tableId, const std::string& p_column, uint32_t p_elemBits, bool p_compresssed )
+{
+    m_buffer -> Write ( Event ( evt_new_column, p_columnId, p_tableId, p_column, p_elemBits, p_compresssed ? 1 : 0 ) );
+}
+
+void
+TestSource::DBAddDatabaseEvent ( int p_db_id, int p_parent_id, const std :: string &p_mbr_name, const std :: string &p_db_name, uint8_t p_create_mode )
+{
+    m_buffer -> Write ( Event ( evt_add_mbr_db, p_db_id, p_parent_id, p_mbr_name, p_db_name, p_create_mode ) );
+}
+
+void
+TestSource::DBAddTableEvent ( int p_tbl_id, int p_db_id, const std :: string &p_mbr_name, const  std :: string &p_table_name, uint8_t p_create_mode )
+{
+    m_buffer -> Write ( Event ( evt_add_mbr_tbl, p_tbl_id, p_db_id, p_mbr_name, p_table_name, p_create_mode ) );
+}
+    
+void 
+TestSource::OpenStreamEvent ()
+{
+    m_buffer -> Write ( Event ( evt_open_stream ) );
+}
+
+void 
+TestSource::CloseStreamEvent ()
+{
+    m_buffer -> Write ( Event ( evt_end_stream ) );
+}
+
+void 
+TestSource::NextRowEvent ( TableId p_id )
+{
+    m_buffer -> Write ( Event ( evt_next_row, p_id ) );
+}
+
+void 
+TestSource::MoveAheadEvent ( TableId p_id, uint64_t p_count )
+{
+    m_buffer -> Write ( Event ( evt_move_ahead, p_id, p_count ) );
+}
+
+template<> void TestSource::CellDataEvent ( ColumnId p_columnId, string p_value )
+{
+    m_buffer -> Write ( Event ( evt_cell_data, p_columnId, ( uint32_t ) p_value . size(), ( uint32_t ) p_value . size(), p_value . c_str() ) );
+}
+
+void 
+TestSource::CellDefaultEvent ( ColumnId p_columnId, const string& p_value )
+{
+    m_buffer -> Write ( Event ( p_value . size() == 0 ? evt_empty_default : evt_cell_default,
+                                p_columnId, 
+                                ( uint32_t ) p_value . size(), 
+                                ( uint32_t ) p_value . size(), 
+                                p_value . c_str() ) );
+}
+
+void 
+TestSource::CellEmptyDefaultEvent ( ColumnId p_columnId )
+{
+    m_buffer -> Write ( Event ( evt_empty_default, p_columnId, 0, 0, 0 ) );
+}
+
+void 
+TestSource::CellDefaultEvent ( ColumnId p_columnId, uint32_t p_value )
+{
+    m_buffer -> Write ( Event ( evt_cell_default, p_columnId, 1,  sizeof p_value, (const void*)&p_value ) );
+}
+void 
+TestSource::CellDefaultEvent ( ColumnId p_columnId, bool p_value )
+{
+    m_buffer -> Write ( Event ( evt_cell_default, p_columnId, 1, sizeof p_value, (const void*)&p_value ) );
+}
+
+void 
+TestSource::ErrorMessageEvent ( const string& p_msg )
+{
+    m_buffer -> Write ( Event ( evt_errmsg, p_msg ) );
+}
+
+void 
+TestSource::LogMessageEvent ( const string& p_msg )
+{
+    m_buffer -> Write ( Event ( evt_logmsg, p_msg ) );
+}
+
+void
+TestSource::ProgMessageEvent ( ProcessId p_pid, const std :: string& p_name, uint32_t p_timestamp, uint32_t p_version, uint32_t p_percent )
+{
+    m_buffer -> Write ( Event ( evt_progmsg, p_pid, p_name, p_timestamp, p_version, p_percent ) );
+}
+
+
+void 
+TestSource::SaveBuffer ( const char* p_filename ) const
+{
+    ofstream out ( p_filename );
+    m_buffer -> Save ( out );
+}
+
+TestSource::Event::Event ( gw_evt_id p_event )
+:   m_event ( p_event ),
+    m_id1 ( 0 ),
+    m_id2 ( 0 ),
+    m_uint8 ( 0 ),
+    m_uint32 ( 0 ),
+    m_uint64 ( 0 )
+{
+}
+        
+TestSource::Event::Event ( gw_evt_id p_event, uint32_t p_id1 )
+:   m_event ( p_event ),
+    m_id1 ( p_id1 ),
+    m_id2 ( 0 ),
+    m_uint8 ( 0 ),
+    m_uint32 ( 0 ),
+    m_uint64 ( 0 )
+{
+}
+
+TestSource::Event::Event ( gw_evt_id p_event, uint32_t p_id1, uint64_t p_uint64 )
+:   m_event ( p_event ),
+    m_id1 ( p_id1 ),
+    m_id2 ( 0 ),
+    m_uint8 ( 0 ),
+    m_uint32 ( 0 ),
+    m_uint64 ( p_uint64 )
+{
+}
+
+TestSource::Event::Event ( gw_evt_id p_event, uint32_t p_id1, uint32_t p_id2, const std::string& p_str, uint32_t p_uint32, uint8_t p_uint8 )
+:   m_event ( p_event ),
+    m_id1 ( p_id1 ),
+    m_id2 ( p_id2 ),
+    m_uint8 ( p_uint8 ),
+    m_uint32 ( p_uint32 ),
+    m_uint64 ( 0 ),
+    m_str1 ( p_str )
+{
+}
+
+TestSource::Event::Event ( gw_evt_id p_event, uint32_t p_id, const std::string& p_str1 )
+:   m_event ( p_event ),
+    m_id1 ( p_id ),
+    m_id2 ( 0 ),
+    m_uint8 ( 0 ),
+    m_uint32 ( 0 ),
+    m_uint64 ( 0 ),
+    m_str1 ( p_str1 )
+{
+}
+
+TestSource::Event::Event ( gw_evt_id p_event, const std::string& p_str1 )
+:   m_event ( p_event ),
+    m_id1 ( 0 ),
+    m_id2 ( 0 ),
+    m_uint8 ( 0 ),
+    m_uint32 ( 0 ),
+    m_uint64 ( 0 ),
+    m_str1 ( p_str1 )
+{
+}
+
+TestSource::Event::Event ( gw_evt_id p_event, const std::string& p_str1, const std::string& p_str2 )
+:   m_event ( p_event ),
+    m_id1 ( 0 ),
+    m_id2 ( 0 ),
+    m_uint8 ( 0 ),
+    m_uint32 ( 0 ),
+    m_uint64 ( 0 ),
+    m_str1 ( p_str1 ),
+    m_str2 ( p_str2 )
+{
+}
+
+TestSource::Event::Event ( gw_evt_id p_event, uint32_t p_id, const std::string& p_str1, const std::string& p_str2 )
+:   m_event ( p_event ),
+    m_id1 ( p_id ),
+    m_id2 ( 0 ),
+    m_uint8 ( 0 ),
+    m_uint32 ( 0 ),
+    m_uint64 ( 0 ),
+    m_str1 ( p_str1 ),
+    m_str2 ( p_str2 )
+{
+}
+
+TestSource::Event::Event ( gw_evt_id p_event, uint32_t p_id1, uint32_t p_elem_count, uint32_t p_val_bytes, const void* p_val )
+:   m_event ( p_event ),
+    m_id1 ( p_id1 ),
+    m_id2 ( 0 ),
+    m_uint32 ( p_elem_count ),
+    m_uint64 ( 0 )
+{
+    const char* v = ( const char* ) p_val;
+    for ( size_t i = 0; i != p_val_bytes; ++i )
+    {
+        m_val . push_back ( v [ i ] );
+    }
+}
+
+TestSource::Event::Event ( gw_evt_id p_event, uint32_t p_id1, const std::string& p_str1, const std::string& p_str2, uint8_t p_uint8 )
+:   m_event ( p_event ),
+    m_id1 ( p_id1 ),
+    m_id2 ( 0 ),
+    m_uint8 ( p_uint8 ),
+    m_uint32 ( 0 ),
+    m_uint64 ( 0 ),
+    m_str1 ( p_str1 ),
+    m_str2 ( p_str2 )
+{
+}
+
+TestSource::Event::Event ( gw_evt_id p_event, uint32_t p_pid, const std :: string& p_name, uint32_t p_timestamp, uint32_t p_version, uint32_t p_percent )
+:  m_event ( p_event ),
+   m_id1 ( p_pid ),
+   m_id2 ( 0 ),
+   m_uint8 ( 0 ),
+   m_uint32 ( p_timestamp ),
+   m_uint32_2 ( p_version ),
+   m_uint32_3 ( p_percent ),
+   m_str1 ( p_name )
+{
+}
+TestSource::Event::Event ( gw_evt_id p_event, uint32_t p_id1, uint32_t p_id2, const std::string& p_str1, const std::string& p_str2, uint8_t p_uint8 )
+:   m_event ( p_event ),
+    m_id1 ( p_id1 ),
+    m_id2 ( p_id2 ),
+    m_uint8 ( p_uint8 ),
+    m_uint32 ( 0 ),
+    m_uint64 ( 0 ),
+    m_str1 ( p_str1 ),
+    m_str2 ( p_str2 )
+{
+}
+
+
+TestSource::Event::~Event()
+{
+}
diff --git a/test/general-loader/testsource.hpp b/test/general-loader/testsource.hpp
new file mode 100644
index 0000000..b6c3694
--- /dev/null
+++ b/test/general-loader/testsource.hpp
@@ -0,0 +1,177 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _sra_tools_test_hpp_testsource
+#define _sra_tools_test_hpp_testsource
+
+/**
+* Test stream creation class for unit-testing General Loader
+*/
+
+#include <sysalloc.h>
+
+#include <kfc/defs.h>
+
+#include <kfs/file.h>
+
+#include "../../tools/general-loader/general-writer.h"
+
+#include <string>
+#include <vector>
+#include <fstream>
+
+class TestSource
+{
+public:
+    typedef uint32_t TableId;
+    typedef uint32_t ColumnId;
+    typedef uint32_t ObjectId;
+    typedef uint32_t ProcessId;
+    
+public:
+    static bool packed;
+
+public:
+    TestSource( const std:: string& p_signature = GW_SIGNATURE, 
+                uint32_t p_endness = GW_GOOD_ENDIAN, 
+                uint32_t p_version  = GW_CURRENT_VERSION );
+    
+    ~TestSource();
+    
+    const std::string & GetDatabaseName() { return m_database; }
+
+    const struct KFile * MakeSource ();
+    
+    void SchemaEvent ( const std::string& p_schemaFile, const std::string& p_schemaName );
+    void DatabaseEvent ( const std::string& p_databaseName );
+    void SoftwareNameEvent ( const std::string& p_softwareName, const std::string& p_version );
+    
+    void DBMetadataNodeEvent  ( ObjectId p_id, const std::string& p_metadataNode, const std::string& p_value );
+    void TblMetadataNodeEvent ( TableId p_id, const std::string& p_metadataNode, const std::string& p_value );
+    void ColMetadataNodeEvent ( ColumnId p_id, const std::string& p_metadataNode, const std::string& p_value );
+    
+    void NewTableEvent ( TableId p_id, const std::string& p_table );
+    void NewColumnEvent ( ColumnId p_columnId, TableId p_tableId, 
+                          const std::string& p_column, uint32_t p_elemBits, bool p_compresssed = false );
+                          
+    void DBAddDatabaseEvent ( int p_db_id, int p_parent_id, const std :: string &p_mbr_name, 
+                              const std :: string &p_db_name, uint8_t p_create_mode );
+    void DBAddTableEvent ( int ptbl_id, int p_db_id, const std :: string &p_mbr_name, 
+                           const std :: string &p_table_name, uint8_t p_create_mode );
+                           
+    void OpenStreamEvent ();
+    void CloseStreamEvent ();
+    void NextRowEvent ( TableId p_id );
+    void MoveAheadEvent ( TableId p_id, uint64_t p_count );
+    void CellDefaultEvent ( ColumnId p_columnId, const std :: string& p_value );
+    void CellDefaultEvent ( ColumnId p_columnId, uint32_t p_value );
+    void CellDefaultEvent ( ColumnId p_columnId, bool p_value );
+    void CellEmptyDefaultEvent ( ColumnId p_columnId );
+
+    void ErrorMessageEvent ( const std :: string& p_msg );
+    void LogMessageEvent ( const std :: string& p_msg );
+    void ProgMessageEvent ( ProcessId p_pid, const std :: string& p_name, uint32_t p_timestamp, uint32_t p_version, uint32_t p_percent );
+    
+    template < typename T > void CellDataEvent ( ColumnId p_columnId, T p_value )
+    {
+        m_buffer -> Write ( Event ( evt_cell_data, p_columnId, 1, sizeof p_value, (const void*)&p_value ) );
+    }   // see below for specialization for std::string (follows the class definition)
+   
+    // use this to capture stream contents to be used in cmdline tests
+    void SaveBuffer ( const char* p_filename ) const;
+    
+    void CellDataEventRaw ( ColumnId p_columnId, uint32_t p_elemCount, const void* p_value, uint32_t p_size )
+    {
+        m_buffer -> Write ( Event ( evt_cell_data, p_columnId, p_elemCount, p_size, p_value ) );
+    }   
+
+private:    
+    struct Event 
+    {
+        Event ( gw_evt_id p_event );
+        Event ( gw_evt_id p_event, const std::string& p_str1 );
+        Event ( gw_evt_id p_event, const std::string& p_str1, const std::string& p_str2 );
+        Event ( gw_evt_id p_event, uint32_t p_id1 );
+        Event ( gw_evt_id p_event, uint32_t p_id1, uint64_t p_uint64 );
+        Event ( gw_evt_id p_event, uint32_t p_id1, const std::string& p_str1 );
+        Event ( gw_evt_id p_event, uint32_t p_id, const std::string& p_str1, const std::string& p_str2 );
+        Event ( gw_evt_id p_event, uint32_t p_id1, uint32_t p_elem_count, uint32_t p_val_bytes, const void* p_val );
+        Event ( gw_evt_id p_event, uint32_t p_id1, const std::string& p_str1, const std::string& p_str2, uint8_t p_uint8 );
+        Event ( gw_evt_id p_event, uint32_t p_id1, uint32_t p_id2, const std::string& p_str, uint32_t p_uint32, uint8_t p_uint8 );
+        Event ( gw_evt_id p_event, uint32_t p_pid, const std :: string& p_name, uint32_t p_timestamp, uint32_t p_version, uint32_t percent );
+        Event ( gw_evt_id p_event, uint32_t p_id1, uint32_t p_id2, const std::string& p_str1, const std::string& p_str2, uint8_t p_uint8 );
+        
+        ~Event();
+        
+        gw_evt_id               m_event;
+        uint32_t                m_id1;
+        uint32_t                m_id2;
+        
+        uint8_t                 m_uint8;
+        uint32_t                m_uint32;
+        uint32_t                m_uint32_2;
+        uint32_t                m_uint32_3;
+        uint64_t                m_uint64;
+        
+        std :: string           m_str1;
+        std :: string           m_str2;
+        std :: vector < char >  m_val;
+    };
+    
+    class Buffer
+    {
+    public:
+        Buffer(const std :: string& p_signature, uint32_t p_endness, uint32_t p_version, bool p_packing);
+        ~Buffer();
+
+        void Write ( const Event& );
+        
+        void Save ( std::ostream& p_out ) const;
+        
+        const char* GetData()   { return m_buffer; }
+        size_t GetSize() const  { return m_bufSize; }
+        
+    private:    
+        void WritePacked ( const Event& );
+        void WriteUnpacked ( const Event& );
+        
+        void Write( const void * p_data, size_t p_size );
+        void Pad ( size_t p_alignment = 4 );
+        
+        char*   m_buffer;
+        size_t  m_bufSize;
+        
+        gw_header_v1 m_header;
+    };
+
+    std :: string m_database;
+    
+    Buffer*         m_buffer;
+};
+
+template<> void TestSource::CellDataEvent ( ColumnId p_columnId, std :: string p_value );
+
+#endif
diff --git a/test/judy_test/Makefile b/test/judy_test/Makefile
deleted file mode 100644
index 110dcde..0000000
--- a/test/judy_test/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-
-MODULE = test/judy_test
-
-TEST_TOOLS = \
-	test-judy
-
-include $(TOP)/build/Makefile.env
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: $(TEST_TOOLS)
-
-clean: stdclean
-
-#-------------------------------------------------------------------------------
-# test-judy
-#
-JUDYTEST_SRC = \
-	judytest
-
-JUDYTEST_OBJ = \
-	$(addsuffix .$(OBJX),$(JUDYTEST_SRC))
-
-JUDYTEST_LIB = \
-	-skapp \
-	-sncbi-vdb 
-
-$(TEST_BINDIR)/test-judy: $(JUDYTEST_OBJ)
-	$(LD) --exe $(SRCDIR) -o $@ $^ $(JUDYTEST_LIB)
-
diff --git a/test/judy_test/judytest.c b/test/judy_test/judytest.c
deleted file mode 100644
index 32ea9ae..0000000
--- a/test/judy_test/judytest.c
+++ /dev/null
@@ -1,1831 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <kapp/main.h>
-#include <kapp/args.h>
-#include <klib/out.h>
-#include <klib/rc.h>
-#include <klib/vector.h>
-#include <sysalloc.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-
-#define OPTION_COUNT    "count"
-#define ALIAS_COUNT     "c"
-
-static const char * count_usage[]     = { "how many items", NULL };
-
-OptDef JudyTestOptions[] =
-{
-/*    name             alias        fkt.  usage-txt,  cnt, needs value, required */
-    { OPTION_COUNT,    ALIAS_COUNT, NULL, count_usage,  1, true,  false }
-};
-
-const char UsageDefaultName[] = "judytest";
-
-rc_t CC UsageSummary ( const char * progname )
-{
-    return KOutMsg ("\n"
-                    "Usage:\n"
-                    "  %s [options]\n"
-                    "\n", progname);
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    const char * progname = UsageDefaultName;
-    const char * fullpath = UsageDefaultName;
-    rc_t rc;
-
-    if ( args == NULL )
-        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
-    else
-        rc = ArgsProgram ( args, &fullpath, &progname );
-
-    if ( rc )
-        progname = fullpath = UsageDefaultName;
-
-    UsageSummary ( progname );
-
-    KOutMsg ( "Options:\n" );
-
-    HelpOptionLine ( ALIAS_COUNT, OPTION_COUNT, "count", count_usage );
-
-    HelpOptionsStandard ();
-    HelpVersion ( fullpath, KAppVersion() );
-    return rc;
-}
-
-
-/* Version  EXTERN
- *  return 4-part version code: 0xMMmmrrrr, where
- *      MM = major release
- *      mm = minor release
- *    rrrr = bug-fix release
- */
-ver_t CC KAppVersion ( void )
-{
-    return 0x01010000;
-}
-
-
-static uint32_t get_int_option( const Args *my_args,
-                                const char *name,
-                                const uint32_t def )
-{
-    uint32_t count, res = def;
-    rc_t rc = ArgsOptionCount( my_args, name, &count );
-    if ( ( rc == 0 )&&( count > 0 ) )
-    {
-        const char *s;
-        rc = ArgsOptionValue( my_args, name, 0,  (const void **)&s );
-        if ( rc == 0 ) res = atoi( s );
-    }
-    return res;
-}
-
-
-typedef struct random_numbers
-{
-    uint32_t count;
-    uint64_t *numbers;
-} random_numbers;
-
-
-static bool contains_number( random_numbers *self, const uint32_t up_to, const uint64_t value )
-{
-    uint32_t i;
-    for ( i = 0; i < up_to; ++i )
-    {
-        if ( self->numbers[ i ] == value )
-        {
-            return true;
-        }
-    }
-    return false;
-}
-
-
-static rc_t make_random_numbers( random_numbers *self, const uint32_t count, const uint32_t max )
-{
-    rc_t rc = 0;
-    self->numbers = calloc( count, sizeof *self->numbers );
-    if ( self->numbers == NULL )
-    {
-        rc = RC ( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-    }
-    else
-    {
-        uint32_t i;
-        for ( i = 0; i < count; ++i )
-        {
-            do
-            {
-                self->numbers[ i ] = ( rand() % max ) + 1;
-            } while ( contains_number( self, i, self->numbers[ i ] ) );
-        }
-        self->count = count;
-    }
-    return rc;
-}
-
-
-static void free_random_numbers( random_numbers *self )
-{
-    free( self->numbers );
-}
-
-
-typedef void * ptr;
-typedef const void * const_ptr;
-
-/*
-#define key_and_value( TYPENAME ) \
-typedef struct TYPENAME ## _key_and_value \
-{ \
-    uint64_t key; \
-    TYPENAME value; \
-} TYPENAME ## _key_and_value; \
-
-*/
-
-typedef struct uint64_t_key_and_value
-{
-    uint64_t key;
-    uint64_t value;
-} uint64_t_key_and_value;
-
-
-typedef struct uint32_t_key_and_value
-{
-    uint64_t key;
-    uint32_t value;
-} uint32_t_key_and_value;
-
-
-typedef struct uint16_t_key_and_value
-{
-    uint64_t key;
-    uint16_t value;
-} uint16_t_key_and_value;
-
-
-typedef struct uint8_t_key_and_value
-{
-    uint64_t key;
-    uint8_t value;
-} uint8_t_key_and_value;
-
-
-typedef struct int64_t_key_and_value
-{
-    uint64_t key;
-    int64_t value;
-} int64_t_key_and_value;
-
-
-typedef struct int32_t_key_and_value
-{
-    uint64_t key;
-    int32_t value;
-} int32_t_key_and_value;
-
-
-typedef struct int16_t_key_and_value
-{
-    uint64_t key;
-    int16_t value;
-} int16_t_key_and_value;
-
-
-typedef struct int8_t_key_and_value
-{
-    uint64_t key;
-    int8_t value;
-} int8_t_key_and_value;
-
-
-typedef struct float_key_and_value
-{
-    uint64_t key;
-    float value;
-} float_key_and_value;
-
-
-typedef struct double_key_and_value
-{
-    uint64_t key;
-    double value;
-} double_key_and_value;
-
-
-typedef struct bool_key_and_value
-{
-    uint64_t key;
-    bool value;
-} bool_key_and_value;
-
-
-typedef struct ptr_key_and_value
-{
-    uint64_t key;
-    ptr value;
-} ptr_key_and_value;
-
-
-/*
-#define generic_find( TYPENAME ) \
-static TYPENAME ## _key_and_value * find_ ## TYPENAME( Vector * v, uint64_t key ) \
-{ \
-    TYPENAME ## _key_and_value * res = NULL; \
-    uint32_t i, n = VectorLength( v ); \
-    for ( i = 0; i < n && res == NULL; ++i ) \
-    { \
-        TYPENAME ## _key_and_value * tmp = VectorGet ( v, i ); \
-        if ( tmp != NULL ) \
-        { \
-            if ( tmp->key == key ) \
-            { \
-                res = tmp; \
-            } \
-        } \
-    } \
-    return res; \
-}
-*/
-
-static uint64_t_key_and_value * find_uint64_t( Vector * v, uint64_t key )
-{
-    uint64_t_key_and_value * res = NULL;
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n && res == NULL; ++i ) \
-    {
-        uint64_t_key_and_value * tmp = VectorGet ( v, i );
-        if ( tmp != NULL )
-        {
-            if ( tmp->key == key )
-            {
-                res = tmp;
-            }
-        }
-    }
-    return res;
-}
-
-
-static uint32_t_key_and_value * find_uint32_t( Vector * v, uint64_t key )
-{
-    uint32_t_key_and_value * res = NULL;
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n && res == NULL; ++i ) \
-    {
-        uint32_t_key_and_value * tmp = VectorGet ( v, i );
-        if ( tmp != NULL )
-        {
-            if ( tmp->key == key )
-            {
-                res = tmp;
-            }
-        }
-    }
-    return res;
-}
-
-
-static uint16_t_key_and_value * find_uint16_t( Vector * v, uint64_t key )
-{
-    uint16_t_key_and_value * res = NULL;
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n && res == NULL; ++i ) \
-    {
-        uint16_t_key_and_value * tmp = VectorGet ( v, i );
-        if ( tmp != NULL )
-        {
-            if ( tmp->key == key )
-            {
-                res = tmp;
-            }
-        }
-    }
-    return res;
-}
-
-
-static uint8_t_key_and_value * find_uint8_t( Vector * v, uint64_t key )
-{
-    uint8_t_key_and_value * res = NULL;
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n && res == NULL; ++i ) \
-    {
-        uint8_t_key_and_value * tmp = VectorGet ( v, i );
-        if ( tmp != NULL )
-        {
-            if ( tmp->key == key )
-            {
-                res = tmp;
-            }
-        }
-    }
-    return res;
-}
-
-
-static int64_t_key_and_value * find_int64_t( Vector * v, uint64_t key )
-{
-    int64_t_key_and_value * res = NULL;
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n && res == NULL; ++i ) \
-    {
-        int64_t_key_and_value * tmp = VectorGet ( v, i );
-        if ( tmp != NULL )
-        {
-            if ( tmp->key == key )
-            {
-                res = tmp;
-            }
-        }
-    }
-    return res;
-}
-
-
-static int32_t_key_and_value * find_int32_t( Vector * v, uint64_t key )
-{
-    int32_t_key_and_value * res = NULL;
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n && res == NULL; ++i ) \
-    {
-        int32_t_key_and_value * tmp = VectorGet ( v, i );
-        if ( tmp != NULL )
-        {
-            if ( tmp->key == key )
-            {
-                res = tmp;
-            }
-        }
-    }
-    return res;
-}
-
-
-static int16_t_key_and_value * find_int16_t( Vector * v, uint64_t key )
-{
-    int16_t_key_and_value * res = NULL;
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n && res == NULL; ++i ) \
-    {
-        int16_t_key_and_value * tmp = VectorGet ( v, i );
-        if ( tmp != NULL )
-        {
-            if ( tmp->key == key )
-            {
-                res = tmp;
-            }
-        }
-    }
-    return res;
-}
-
-
-static int8_t_key_and_value * find_int8_t( Vector * v, uint64_t key )
-{
-    int8_t_key_and_value * res = NULL;
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n && res == NULL; ++i ) \
-    {
-        int8_t_key_and_value * tmp = VectorGet ( v, i );
-        if ( tmp != NULL )
-        {
-            if ( tmp->key == key )
-            {
-                res = tmp;
-            }
-        }
-    }
-    return res;
-}
-
-
-static float_key_and_value * find_float( Vector * v, uint64_t key )
-{
-    float_key_and_value * res = NULL;
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n && res == NULL; ++i ) \
-    {
-        float_key_and_value * tmp = VectorGet ( v, i );
-        if ( tmp != NULL )
-        {
-            if ( tmp->key == key )
-            {
-                res = tmp;
-            }
-        }
-    }
-    return res;
-}
-
-
-static double_key_and_value * find_double( Vector * v, uint64_t key )
-{
-    double_key_and_value * res = NULL;
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n && res == NULL; ++i ) \
-    {
-        double_key_and_value * tmp = VectorGet ( v, i );
-        if ( tmp != NULL )
-        {
-            if ( tmp->key == key )
-            {
-                res = tmp;
-            }
-        }
-    }
-    return res;
-}
-
-
-static bool_key_and_value * find_bool( Vector * v, uint64_t key )
-{
-    bool_key_and_value * res = NULL;
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n && res == NULL; ++i ) \
-    {
-        bool_key_and_value * tmp = VectorGet ( v, i );
-        if ( tmp != NULL )
-        {
-            if ( tmp->key == key )
-            {
-                res = tmp;
-            }
-        }
-    }
-    return res;
-}
-
-
-static ptr_key_and_value * find_ptr( Vector * v, uint64_t key )
-{
-    ptr_key_and_value * res = NULL;
-    uint32_t i, n = VectorLength( v );
-    for ( i = 0; i < n && res == NULL; ++i ) \
-    {
-        ptr_key_and_value * tmp = VectorGet ( v, i );
-        if ( tmp != NULL )
-        {
-            if ( tmp->key == key )
-            {
-                res = tmp;
-            }
-        }
-    }
-    return res;
-}
-
-
-typedef struct lookup_context
-{
-    KVector *v;
-    Vector *control;
-    uint32_t found;
-} lookup_context;
-
-
-static void CC key_and_value_whack( void *item, void *data )
-{
-    free( item );
-}
-
-
-/*
-#define lookup( TYPENAME, LOOKUPFUNC ) \
-static void CC TYPENAME ## _lookup( void *item, void *data ) \
-{ \
-    TYPENAME ## _key_and_value *kv = item; \
-    lookup_context *ctx = data; \
-    TYPENAME value; \
-    if ( LOOKUPFUNC ( ctx->v, kv->key, &value ) == 0 ) \
-    { \
-        if ( kv->value == value ) \
-        { \
-            ( ctx->found )++; \
-        } \
-    } \
-}
-*/
-
-
-static void CC uint64_t_lookup( void * item, void * data )
-{
-    uint64_t_key_and_value *kv = item;
-    lookup_context *ctx = data;
-    uint64_t value;
-    if ( KVectorGetU64 ( ctx->v, kv->key, &value ) == 0 )
-    {
-        if ( kv->value == value )
-        {
-            ( ctx->found )++;
-        }
-    } 
-}
-
-
-static void CC uint32_t_lookup( void * item, void * data )
-{
-    uint32_t_key_and_value *kv = item;
-    lookup_context *ctx = data;
-    uint32_t value;
-    if ( KVectorGetU32 ( ctx->v, kv->key, &value ) == 0 )
-    {
-        if ( kv->value == value )
-        {
-            ( ctx->found )++;
-        }
-    } 
-}
-
-
-static void CC uint16_t_lookup( void * item, void * data )
-{
-    uint16_t_key_and_value *kv = item;
-    lookup_context *ctx = data;
-    uint16_t value;
-    if ( KVectorGetU16 ( ctx->v, kv->key, &value ) == 0 )
-    {
-        if ( kv->value == value )
-        {
-            ( ctx->found )++;
-        }
-    } 
-}
-
-
-static void CC uint8_t_lookup( void * item, void * data )
-{
-    uint8_t_key_and_value *kv = item;
-    lookup_context *ctx = data;
-    uint8_t value;
-    if ( KVectorGetU8 ( ctx->v, kv->key, &value ) == 0 )
-    {
-        if ( kv->value == value )
-        {
-            ( ctx->found )++;
-        }
-    } 
-}
-
-
-static void CC int64_t_lookup( void * item, void * data )
-{
-    int64_t_key_and_value *kv = item;
-    lookup_context *ctx = data;
-    int64_t value;
-    if ( KVectorGetI64 ( ctx->v, kv->key, &value ) == 0 )
-    {
-        if ( kv->value == value )
-        {
-            ( ctx->found )++;
-        }
-    } 
-}
-
-
-static void CC int32_t_lookup( void * item, void * data )
-{
-    int32_t_key_and_value *kv = item;
-    lookup_context *ctx = data;
-    int32_t value;
-    if ( KVectorGetI32 ( ctx->v, kv->key, &value ) == 0 )
-    {
-        if ( kv->value == value )
-        {
-            ( ctx->found )++;
-        }
-    } 
-}
-
-
-static void CC int16_t_lookup( void * item, void * data )
-{
-    int16_t_key_and_value *kv = item;
-    lookup_context *ctx = data;
-    int16_t value;
-    if ( KVectorGetI16 ( ctx->v, kv->key, &value ) == 0 )
-    {
-        if ( kv->value == value )
-        {
-            ( ctx->found )++;
-        }
-    } 
-}
-
-
-static void CC int8_t_lookup( void * item, void * data )
-{
-    int8_t_key_and_value *kv = item;
-    lookup_context *ctx = data;
-    int8_t value;
-    if ( KVectorGetI8 ( ctx->v, kv->key, &value ) == 0 )
-    {
-        if ( kv->value == value )
-        {
-            ( ctx->found )++;
-        }
-    } 
-}
-
-
-static void CC float_lookup( void * item, void * data )
-{
-    float_key_and_value *kv = item;
-    lookup_context *ctx = data;
-    float value;
-    if ( KVectorGetF32 ( ctx->v, kv->key, &value ) == 0 )
-    {
-        if ( kv->value == value )
-        {
-            ( ctx->found )++;
-        }
-    } 
-}
-
-
-static void CC double_lookup( void * item, void * data )
-{
-    double_key_and_value *kv = item;
-    lookup_context *ctx = data;
-    double value;
-    if ( KVectorGetF64 ( ctx->v, kv->key, &value ) == 0 )
-    {
-        if ( kv->value == value )
-        {
-            ( ctx->found )++;
-        }
-    } 
-}
-
-
-static void CC bool_lookup( void * item, void * data )
-{
-    bool_key_and_value *kv = item;
-    lookup_context *ctx = data;
-    bool value;
-    if ( KVectorGetBool ( ctx->v, kv->key, &value ) == 0 )
-    {
-        if ( kv->value == value )
-        {
-            ( ctx->found )++;
-        }
-    } 
-}
-
-
-static void CC ptr_lookup( void * item, void * data )
-{
-    ptr_key_and_value *kv = item;
-    lookup_context *ctx = data;
-    ptr value;
-    if ( KVectorGetPtr ( ctx->v, kv->key, &value ) == 0 )
-    {
-        if ( kv->value == value )
-        {
-            ( ctx->found )++;
-        }
-    } 
-}
-
-
-/*
-#define generic_on_visit( TYPENAME, VALUE_TYPE ) \
-static rc_t CC on_visit_ ## TYPENAME ( uint64_t key, VALUE_TYPE value, void *user_data ) \
-{ \
-    lookup_context * ctx = user_data; \
-    TYPENAME ## _key_and_value * kv = find_ ## TYPENAME ( ctx->control, key ); \
-    if ( kv != NULL ) \
-    { \
-        if ( kv->value == (TYPENAME) value ) \
-        { \
-            ctx->found ++; \
-        } \
-        else \
-        { \
-            OUTMSG(( "values %lx vs %lx mismatch\n", (uint64_t)value, (uint64_t)kv->value )); \
-        } \
-    } \
-    else \
-    { \
-        OUTMSG(( "key %lu not found\n", key )); \
-    } \
-    return 0; \
-}
-*/
-
-static rc_t CC on_visit_uint64_t ( uint64_t key, uint64_t value, void *user_data )
-{
-    lookup_context * ctx = user_data;
-    uint64_t_key_and_value * kv = find_uint64_t( ctx->control, key );
-    if ( kv != NULL )
-    {
-        if ( kv->value == value )
-        {
-            ctx->found ++;
-        }
-        else
-        {
-            OUTMSG( ( "values %lx vs %lx mismatch\n", value, kv->value ) );
-        }
-    }
-    else
-    {
-        OUTMSG( ( "key %lu not found\n", key ) );
-    }
-    return 0;
-}
-
-
-static rc_t CC on_visit_uint32_t ( uint64_t key, uint64_t value, void *user_data )
-{
-    lookup_context * ctx = user_data;
-    uint32_t_key_and_value * kv = find_uint32_t( ctx->control, key );
-    if ( kv != NULL )
-    {
-        if ( kv->value == value )
-        {
-            ctx->found ++;
-        }
-        else
-        {
-            OUTMSG( ( "values %lx vs %x mismatch\n", value, kv->value ) );
-        }
-    }
-    else
-    {
-        OUTMSG( ( "key %lu not found\n", key ) );
-    }
-    return 0;
-}
-
-
-static rc_t CC on_visit_uint16_t ( uint64_t key, uint64_t value, void *user_data )
-{
-    lookup_context * ctx = user_data;
-    uint16_t_key_and_value * kv = find_uint16_t( ctx->control, key );
-    if ( kv != NULL )
-    {
-        if ( kv->value == value )
-        {
-            ctx->found ++;
-        }
-        else
-        {
-            OUTMSG( ( "values %lx vs %x mismatch\n", value, kv->value ) );
-        }
-    }
-    else
-    {
-        OUTMSG( ( "key %lu not found\n", key ) );
-    }
-    return 0;
-}
-
-
-static rc_t CC on_visit_uint8_t ( uint64_t key, uint64_t value, void *user_data )
-{
-    lookup_context * ctx = user_data;
-    uint8_t_key_and_value * kv = find_uint8_t( ctx->control, key );
-    if ( kv != NULL )
-    {
-        if ( kv->value == value )
-        {
-            ctx->found ++;
-        }
-        else
-        {
-            OUTMSG( ( "values %lx vs %x mismatch\n", value, kv->value ) );
-        }
-    }
-    else
-    {
-        OUTMSG( ( "key %lu not found\n", key ) );
-    }
-    return 0;
-}
-
-
-static rc_t CC on_visit_int64_t ( uint64_t key, int64_t value, void *user_data )
-{
-    lookup_context * ctx = user_data;
-    int64_t_key_and_value * kv = find_int64_t( ctx->control, key );
-    if ( kv != NULL )
-    {
-        if ( kv->value == value )
-        {
-            ctx->found ++;
-        }
-        else
-        {
-            OUTMSG( ( "values %lx vs %lx mismatch\n", value, kv->value ) );
-        }
-    }
-    else
-    {
-        OUTMSG( ( "key %lu not found\n", key ) );
-    }
-    return 0;
-}
-
-
-static rc_t CC on_visit_int32_t ( uint64_t key, int64_t value, void *user_data )
-{
-    lookup_context * ctx = user_data;
-    int32_t_key_and_value * kv = find_int32_t( ctx->control, key );
-    if ( kv != NULL )
-    {
-        if ( kv->value == value )
-        {
-            ctx->found ++;
-        }
-        else
-        {
-            OUTMSG( ( "values %lx vs %x mismatch\n", value, kv->value ) );
-        }
-    }
-    else
-    {
-        OUTMSG( ( "key %lu not found\n", key ) );
-    }
-    return 0;
-}
-
-
-static rc_t CC on_visit_int16_t ( uint64_t key, int64_t value, void *user_data )
-{
-    lookup_context * ctx = user_data;
-    int16_t_key_and_value * kv = find_int16_t( ctx->control, key );
-    if ( kv != NULL )
-    {
-        if ( kv->value == value )
-        {
-            ctx->found ++;
-        }
-        else
-        {
-            OUTMSG( ( "values %lx vs %x mismatch\n", value, kv->value ) );
-        }
-    }
-    else
-    {
-        OUTMSG( ( "key %lu not found\n", key ) );
-    }
-    return 0;
-}
-
-
-static rc_t CC on_visit_int8_t ( uint64_t key, int64_t value, void *user_data )
-{
-    lookup_context * ctx = user_data;
-    int8_t_key_and_value * kv = find_int8_t( ctx->control, key );
-    if ( kv != NULL )
-    {
-        int8_t v = ( int8_t )value;
-        if ( kv->value == v )
-        {
-            ctx->found ++;
-        }
-        else
-        {
-            OUTMSG( ( "values %lx vs %x mismatch\n", value, kv->value ) );
-        }
-    }
-    else
-    {
-        OUTMSG( ( "key %lu not found\n", key ) );
-    }
-    return 0;
-}
-
-
-static rc_t CC on_visit_double ( uint64_t key, double value, void *user_data )
-{
-    lookup_context * ctx = user_data;
-    double_key_and_value * kv = find_double( ctx->control, key );
-    if ( kv != NULL )
-    {
-        if ( kv->value == value )
-        {
-            ctx->found ++;
-        }
-        else
-        {
-            OUTMSG( ( "values %f vs %f mismatch\n", value, kv->value ) );
-        }
-    }
-    else
-    {
-        OUTMSG( ( "key %lu not found\n", key ) );
-    }
-    return 0;
-}
-
-
-static rc_t CC on_visit_bool ( uint64_t key, bool value, void *user_data )
-{
-    lookup_context * ctx = user_data;
-    bool_key_and_value * kv = find_bool( ctx->control, key );
-    if ( kv != NULL )
-    {
-        if ( kv->value == value )
-        {
-            ctx->found ++;
-        }
-        else
-        {
-            OUTMSG( ( "values %s vs %s mismatch\n", value ? "true" : "false", kv->value ? "true" : "false" ) );
-        }
-    }
-    else
-    {
-        OUTMSG( ( "key %lu not found\n", key ) );
-    }
-    return 0;
-}
-
-
-static rc_t CC on_visit_ptr ( uint64_t key, const_ptr value, void *user_data )
-{
-    lookup_context * ctx = user_data;
-    ptr_key_and_value * kv = find_ptr( ctx->control, key );
-    if ( kv != NULL )
-    {
-        if ( kv->value == value )
-        {
-            ctx->found ++;
-        }
-        else
-        {
-            OUTMSG( ( "values %p vs %p mismatch\n", value, kv->value ) );
-        }
-    }
-    else
-    {
-        OUTMSG( ( "key %lu not found\n", key ) );
-    }
-    return 0;
-}
-
-
-static rc_t perform_uint64_t_test( random_numbers *nrand ) /* */
-{
-    KVector *v;
-    rc_t rc;
-    OUTMSG(( "KVector: uint64_t - test( count = %u )\n", nrand->count )); /* */
-    rc = KVectorMake ( &v );
-    if ( rc == 0 )
-    {
-        Vector control;
-        uint32_t i;
-        VectorInit ( &control, 0, 1000 );
-        for ( i = 0; i < nrand->count && rc == 0; ++i )
-        {
-            uint64_t_key_and_value *kv = malloc( sizeof *kv ); /* */
-            if ( kv == NULL )
-            {
-                rc = RC ( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-            }
-            else
-            {
-                kv->key = nrand->numbers[ i ];
-                kv->value = (uint64_t)( rand() % ( nrand->count + 1 ) );
-                rc = KVectorSetU64 ( v, kv->key, kv->value ); /* */
-                if ( rc == 0 )
-                    rc = VectorAppend ( &control, NULL, kv );
-                if ( rc != 0)
-                    free( kv );
-            }
-        }
-        OUTMSG(( "%u key-value-pairs inserted\n", nrand->count ));
-        if ( rc == 0 )
-        {
-            lookup_context ctx;
-            ctx.found = 0;
-            ctx.v = v;
-            VectorForEach ( &control, false, uint64_t_lookup, &ctx ); /* */
-            OUTMSG(( "%u values found\n", ctx.found ));
-
-            ctx.found = 0;
-            ctx.control = &control;
-            rc = KVectorVisitU64( v, false, on_visit_uint64_t, &ctx ); /* */
-            OUTMSG(( "%u values verified\n", ctx.found ));
-        }
-        VectorWhack ( &control, key_and_value_whack, NULL );
-        KVectorRelease ( v );
-    }
-    OUTMSG(( "\n" ));
-    return rc;
-}
-
-
-static rc_t perform_uint32_t_test( random_numbers *nrand ) /* */
-{
-    KVector *v;
-    rc_t rc;
-    OUTMSG(( "KVector: uint32_t - test( count = %u )\n", nrand->count )); /* */
-    rc = KVectorMake ( &v );
-    if ( rc == 0 )
-    {
-        Vector control;
-        uint32_t i;
-        VectorInit ( &control, 0, 1000 );
-        for ( i = 0; i < nrand->count && rc == 0; ++i )
-        {
-            uint32_t_key_and_value *kv = malloc( sizeof *kv ); /* */
-            if ( kv == NULL )
-            {
-                rc = RC ( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-            }
-            else
-            {
-                kv->key = nrand->numbers[ i ];
-                kv->value = (uint32_t)( rand() % ( nrand->count + 1 ) );
-                rc = KVectorSetU32 ( v, kv->key, kv->value ); /* */
-                if ( rc == 0 )
-                    rc = VectorAppend ( &control, NULL, kv );
-                if ( rc != 0)
-                    free( kv );
-            }
-        }
-        OUTMSG(( "%u key-value-pairs inserted\n", nrand->count ));
-        if ( rc == 0 )
-        {
-            lookup_context ctx;
-            ctx.found = 0;
-            ctx.v = v;
-            VectorForEach ( &control, false, uint32_t_lookup, &ctx ); /* */
-            OUTMSG(( "%u values found\n", ctx.found ));
-
-            ctx.found = 0;
-            ctx.control = &control;
-            rc = KVectorVisitU64( v, false, on_visit_uint32_t, &ctx ); /* */
-            OUTMSG(( "%u values verified\n", ctx.found ));
-        }
-        VectorWhack ( &control, key_and_value_whack, NULL );
-        KVectorRelease ( v );
-    }
-    OUTMSG(( "\n" ));
-    return rc;
-}
-
-
-static rc_t perform_uint16_t_test( random_numbers *nrand ) /* */
-{
-    KVector *v;
-    rc_t rc;
-    OUTMSG(( "KVector: uint16_t - test( count = %u )\n", nrand->count )); /* */
-    rc = KVectorMake ( &v );
-    if ( rc == 0 )
-    {
-        Vector control;
-        uint32_t i;
-        VectorInit ( &control, 0, 1000 );
-        for ( i = 0; i < nrand->count && rc == 0; ++i )
-        {
-            uint16_t_key_and_value *kv = malloc( sizeof *kv ); /* */
-            if ( kv == NULL )
-            {
-                rc = RC ( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-            }
-            else
-            {
-                kv->key = nrand->numbers[ i ];
-                kv->value = (uint16_t)( rand() % ( nrand->count + 1 ) );
-                rc = KVectorSetU16 ( v, kv->key, kv->value ); /* */
-                if ( rc == 0 )
-                    rc = VectorAppend ( &control, NULL, kv );
-                if ( rc != 0)
-                    free( kv );
-            }
-        }
-        OUTMSG(( "%u key-value-pairs inserted\n", nrand->count ));
-        if ( rc == 0 )
-        {
-            lookup_context ctx;
-            ctx.found = 0;
-            ctx.v = v;
-            VectorForEach ( &control, false, uint16_t_lookup, &ctx ); /* */
-            OUTMSG(( "%u values found\n", ctx.found ));
-
-            ctx.found = 0;
-            ctx.control = &control;
-            rc = KVectorVisitU64( v, false, on_visit_uint16_t, &ctx ); /* */
-            OUTMSG(( "%u values verified\n", ctx.found ));
-        }
-        VectorWhack ( &control, key_and_value_whack, NULL );
-        KVectorRelease ( v );
-    }
-    OUTMSG(( "\n" ));
-    return rc;
-}
-
-
-static rc_t perform_uint8_t_test( random_numbers *nrand ) /* */
-{
-    KVector *v;
-    rc_t rc;
-    OUTMSG(( "KVector: uint8_t - test( count = %u )\n", nrand->count )); /* */
-    rc = KVectorMake ( &v );
-    if ( rc == 0 )
-    {
-        Vector control;
-        uint32_t i;
-        VectorInit ( &control, 0, 1000 );
-        for ( i = 0; i < nrand->count && rc == 0; ++i )
-        {
-            uint8_t_key_and_value *kv = malloc( sizeof *kv ); /* */
-            if ( kv == NULL )
-            {
-                rc = RC ( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-            }
-            else
-            {
-                kv->key = nrand->numbers[ i ];
-                kv->value = (uint8_t)( rand() % ( nrand->count + 1 ) );
-                rc = KVectorSetU8 ( v, kv->key, kv->value ); /* */
-                if ( rc == 0 )
-                    rc = VectorAppend ( &control, NULL, kv );
-                if ( rc != 0)
-                    free( kv );
-            }
-        }
-        OUTMSG(( "%u key-value-pairs inserted\n", nrand->count ));
-        if ( rc == 0 )
-        {
-            lookup_context ctx;
-            ctx.found = 0;
-            ctx.v = v;
-            VectorForEach ( &control, false, uint8_t_lookup, &ctx ); /* */
-            OUTMSG(( "%u values found\n", ctx.found ));
-
-            ctx.found = 0;
-            ctx.control = &control;
-            rc = KVectorVisitU64( v, false, on_visit_uint8_t, &ctx ); /* */
-            OUTMSG(( "%u values verified\n", ctx.found ));
-        }
-        VectorWhack ( &control, key_and_value_whack, NULL );
-        KVectorRelease ( v );
-    }
-    OUTMSG(( "\n" ));
-    return rc;
-}
-
-
-static rc_t perform_int64_t_test( random_numbers *nrand ) /* */
-{
-    KVector *v;
-    rc_t rc;
-    OUTMSG(( "KVector: int64_t - test( count = %u )\n", nrand->count )); /* */
-    rc = KVectorMake ( &v );
-    if ( rc == 0 )
-    {
-        Vector control;
-        uint32_t i;
-        VectorInit ( &control, 0, 1000 );
-        for ( i = 0; i < nrand->count && rc == 0; ++i )
-        {
-            int64_t_key_and_value *kv = malloc( sizeof *kv ); /* */
-            if ( kv == NULL )
-            {
-                rc = RC ( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-            }
-            else
-            {
-                kv->key = nrand->numbers[ i ];
-                kv->value = (int64_t)( rand() % ( nrand->count + 1 ) );
-                rc = KVectorSetI64 ( v, kv->key, kv->value ); /* */
-                if ( rc == 0 )
-                    rc = VectorAppend ( &control, NULL, kv );
-                if ( rc != 0)
-                    free( kv );
-            }
-        }
-        OUTMSG(( "%u key-value-pairs inserted\n", nrand->count ));
-        if ( rc == 0 )
-        {
-            lookup_context ctx;
-            ctx.found = 0;
-            ctx.v = v;
-            VectorForEach ( &control, false, int64_t_lookup, &ctx ); /* */
-            OUTMSG(( "%u values found\n", ctx.found ));
-
-            ctx.found = 0;
-            ctx.control = &control;
-            rc = KVectorVisitI64( v, false, on_visit_int64_t, &ctx ); /* */
-            OUTMSG(( "%u values verified\n", ctx.found ));
-        }
-        VectorWhack ( &control, key_and_value_whack, NULL );
-        KVectorRelease ( v );
-    }
-    OUTMSG(( "\n" ));
-    return rc;
-}
-
-
-static rc_t perform_int32_t_test( random_numbers *nrand ) /* */
-{
-    KVector *v;
-    rc_t rc;
-    OUTMSG(( "KVector: int32_t - test( count = %u )\n", nrand->count )); /* */
-    rc = KVectorMake ( &v );
-    if ( rc == 0 )
-    {
-        Vector control;
-        uint32_t i;
-        VectorInit ( &control, 0, 1000 );
-        for ( i = 0; i < nrand->count && rc == 0; ++i )
-        {
-            int32_t_key_and_value *kv = malloc( sizeof *kv ); /* */
-            if ( kv == NULL )
-            {
-                rc = RC ( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-            }
-            else
-            {
-                kv->key = nrand->numbers[ i ];
-                kv->value = (int32_t)( rand() % ( nrand->count + 1 ) );
-                rc = KVectorSetI32 ( v, kv->key, kv->value ); /* */
-                if ( rc == 0 )
-                    rc = VectorAppend ( &control, NULL, kv );
-                if ( rc != 0)
-                    free( kv );
-            }
-        }
-        OUTMSG(( "%u key-value-pairs inserted\n", nrand->count ));
-        if ( rc == 0 )
-        {
-            lookup_context ctx;
-            ctx.found = 0;
-            ctx.v = v;
-            VectorForEach ( &control, false, int32_t_lookup, &ctx ); /* */
-            OUTMSG(( "%u values found\n", ctx.found ));
-
-            ctx.found = 0;
-            ctx.control = &control;
-            rc = KVectorVisitI64( v, false, on_visit_int32_t, &ctx ); /* */
-            OUTMSG(( "%u values verified\n", ctx.found ));
-        }
-        VectorWhack ( &control, key_and_value_whack, NULL );
-        KVectorRelease ( v );
-    }
-    OUTMSG(( "\n" ));
-    return rc;
-}
-
-
-static rc_t perform_int16_t_test( random_numbers *nrand ) /* */
-{
-    KVector *v;
-    rc_t rc;
-    OUTMSG(( "KVector: int16_t - test( count = %u )\n", nrand->count )); /* */
-    rc = KVectorMake ( &v );
-    if ( rc == 0 )
-    {
-        Vector control;
-        uint32_t i;
-        VectorInit ( &control, 0, 1000 );
-        for ( i = 0; i < nrand->count && rc == 0; ++i )
-        {
-            int16_t_key_and_value *kv = malloc( sizeof *kv ); /* */
-            if ( kv == NULL )
-            {
-                rc = RC ( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-            }
-            else
-            {
-                kv->key = nrand->numbers[ i ];
-                kv->value = (int16_t)( rand() % ( nrand->count + 1 ) );
-                rc = KVectorSetI16 ( v, kv->key, kv->value ); /* */
-                if ( rc == 0 )
-                    rc = VectorAppend ( &control, NULL, kv );
-                if ( rc != 0)
-                    free( kv );
-            }
-        }
-        OUTMSG(( "%u key-value-pairs inserted\n", nrand->count ));
-        if ( rc == 0 )
-        {
-            lookup_context ctx;
-            ctx.found = 0;
-            ctx.v = v;
-            VectorForEach ( &control, false, int16_t_lookup, &ctx ); /* */
-            OUTMSG(( "%u values found\n", ctx.found ));
-
-            ctx.found = 0;
-            ctx.control = &control;
-            rc = KVectorVisitI64( v, false, on_visit_int16_t, &ctx ); /* */
-            OUTMSG(( "%u values verified\n", ctx.found ));
-        }
-        VectorWhack ( &control, key_and_value_whack, NULL );
-        KVectorRelease ( v );
-    }
-    OUTMSG(( "\n" ));
-    return rc;
-}
-
-
-static rc_t perform_int8_t_test( random_numbers *nrand ) /* */
-{
-    KVector *v;
-    rc_t rc;
-    OUTMSG(( "KVector: int8_t - test( count = %u )\n", nrand->count )); /* */
-    rc = KVectorMake ( &v );
-    if ( rc == 0 )
-    {
-        Vector control;
-        uint32_t i;
-        VectorInit ( &control, 0, 1000 );
-        for ( i = 0; i < nrand->count && rc == 0; ++i )
-        {
-            int8_t_key_and_value *kv = malloc( sizeof *kv ); /* */
-            if ( kv == NULL )
-            {
-                rc = RC ( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-            }
-            else
-            {
-                kv->key = nrand->numbers[ i ];
-                kv->value = (int8_t)( rand() % ( nrand->count + 1 ) );
-                rc = KVectorSetI8 ( v, kv->key, kv->value ); /* */
-                if ( rc == 0 )
-                    rc = VectorAppend ( &control, NULL, kv );
-                if ( rc != 0)
-                    free( kv );
-            }
-        }
-        OUTMSG(( "%u key-value-pairs inserted\n", nrand->count ));
-        if ( rc == 0 )
-        {
-            lookup_context ctx;
-            ctx.found = 0;
-            ctx.v = v;
-            VectorForEach ( &control, false, int8_t_lookup, &ctx ); /* */
-            OUTMSG(( "%u values found\n", ctx.found ));
-
-            ctx.found = 0;
-            ctx.control = &control;
-            rc = KVectorVisitI64( v, false, on_visit_int8_t, &ctx ); /* */
-            OUTMSG(( "%u values verified\n", ctx.found ));
-        }
-        VectorWhack ( &control, key_and_value_whack, NULL );
-        KVectorRelease ( v );
-    }
-    OUTMSG(( "\n" ));
-    return rc;
-}
-
-
-static rc_t perform_float_test( random_numbers *nrand ) /* */
-{
-    KVector *v;
-    rc_t rc;
-    OUTMSG(( "KVector: float - test( count = %u )\n", nrand->count )); /* */
-    rc = KVectorMake ( &v );
-    if ( rc == 0 )
-    {
-        Vector control;
-        uint32_t i;
-        VectorInit ( &control, 0, 1000 );
-        for ( i = 0; i < nrand->count && rc == 0; ++i )
-        {
-            float_key_and_value *kv = malloc( sizeof *kv ); /* */
-            if ( kv == NULL )
-            {
-                rc = RC ( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-            }
-            else
-            {
-                kv->key = nrand->numbers[ i ];
-                kv->value = (float)( rand() % ( nrand->count + 1 ) );
-                rc = KVectorSetF32 ( v, kv->key, kv->value ); /* */
-                if ( rc == 0 )
-                    rc = VectorAppend ( &control, NULL, kv );
-                if ( rc != 0)
-                    free( kv );
-            }
-        }
-        OUTMSG(( "%u key-value-pairs inserted\n", nrand->count ));
-        if ( rc == 0 )
-        {
-            lookup_context ctx;
-            ctx.found = 0;
-            ctx.v = v;
-            VectorForEach ( &control, false, float_lookup, &ctx ); /* */
-            OUTMSG(( "%u values found\n", ctx.found ));
-
-            /* there is no KVectorVisitF32(), validating with KVectorVisitF64() would fail! */
-        }
-        VectorWhack ( &control, key_and_value_whack, NULL );
-        KVectorRelease ( v );
-    }
-    OUTMSG(( "\n" ));
-    return rc;
-}
-
-
-static rc_t perform_double_test( random_numbers *nrand ) /* */
-{
-    KVector *v;
-    rc_t rc;
-    OUTMSG(( "KVector: double - test( count = %u )\n", nrand->count )); /* */
-    rc = KVectorMake ( &v );
-    if ( rc == 0 )
-    {
-        Vector control;
-        uint32_t i;
-        VectorInit ( &control, 0, 1000 );
-        for ( i = 0; i < nrand->count && rc == 0; ++i )
-        {
-            double_key_and_value *kv = malloc( sizeof *kv ); /* */
-            if ( kv == NULL )
-            {
-                rc = RC ( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-            }
-            else
-            {
-                kv->key = nrand->numbers[ i ];
-                kv->value = (double)( rand() % ( nrand->count + 1 ) );
-                rc = KVectorSetF64 ( v, kv->key, kv->value ); /* */
-                if ( rc == 0 )
-                    rc = VectorAppend ( &control, NULL, kv );
-                if ( rc != 0)
-                    free( kv );
-            }
-        }
-        OUTMSG(( "%u key-value-pairs inserted\n", nrand->count ));
-        if ( rc == 0 )
-        {
-            lookup_context ctx;
-            ctx.found = 0;
-            ctx.v = v;
-            VectorForEach ( &control, false, double_lookup, &ctx ); /* */
-            OUTMSG(( "%u values found\n", ctx.found ));
-
-            ctx.found = 0;
-            ctx.control = &control;
-            rc = KVectorVisitF64( v, false, on_visit_double, &ctx ); /* */
-            OUTMSG(( "%u values verified\n", ctx.found ));
-        }
-        VectorWhack ( &control, key_and_value_whack, NULL );
-        KVectorRelease ( v );
-    }
-    OUTMSG(( "\n" ));
-    return rc;
-}
-
-
-static rc_t perform_bool_test( random_numbers *nrand ) /* */
-{
-    KVector *v;
-    rc_t rc;
-    OUTMSG(( "KVector: bool - test( count = %u )\n", nrand->count )); /* */
-    rc = KVectorMake ( &v );
-    if ( rc == 0 )
-    {
-        Vector control;
-        uint32_t i;
-        VectorInit ( &control, 0, 1000 );
-        for ( i = 0; i < nrand->count && rc == 0; ++i )
-        {
-            bool_key_and_value *kv = malloc( sizeof *kv ); /* */
-            if ( kv == NULL )
-            {
-                rc = RC ( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-            }
-            else
-            {
-                uint32_t rv = rand() % ( nrand->count + 1 );
-                kv->key = nrand->numbers[ i ];
-                kv->value = ( rv & 1 );
-                rc = KVectorSetBool ( v, kv->key, kv->value ); /* */
-                if ( rc == 0 )
-                    rc = VectorAppend ( &control, NULL, kv );
-                if ( rc != 0)
-                    free( kv );
-            }
-        }
-        OUTMSG(( "%u key-value-pairs inserted\n", nrand->count ));
-        if ( rc == 0 )
-        {
-            lookup_context ctx;
-            ctx.found = 0;
-            ctx.v = v;
-            VectorForEach ( &control, false, bool_lookup, &ctx ); /* */
-            OUTMSG(( "%u values found\n", ctx.found ));
-
-            /* there is no visit-bool */
-        }
-        VectorWhack ( &control, key_and_value_whack, NULL );
-        KVectorRelease ( v );
-    }
-    OUTMSG(( "\n" ));
-    return rc;
-}
-
-
-static rc_t perform_ptr_test( random_numbers *rand ) /* */
-{
-    KVector *v;
-    rc_t rc;
-    OUTMSG(( "KVector: ptr - test( count = %u )\n", rand->count )); /* */
-    rc = KVectorMake ( &v );
-    if ( rc == 0 )
-    {
-        Vector control;
-        uint32_t i;
-        VectorInit ( &control, 0, 1000 );
-        for ( i = 0; i < rand->count && rc == 0; ++i )
-        {
-            ptr_key_and_value *kv = malloc( sizeof *kv ); /* */
-            if ( kv == NULL )
-            {
-                rc = RC ( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
-            }
-            else
-            {
-                kv->key = rand->numbers[ i ];
-                kv->value = kv;
-                rc = KVectorSetPtr ( v, kv->key, kv->value ); /* */
-                if ( rc == 0 )
-                    rc = VectorAppend ( &control, NULL, kv );
-                if ( rc != 0)
-                    free( kv );
-            }
-        }
-        OUTMSG(( "%u key-value-pairs inserted\n", rand->count ));
-        if ( rc == 0 )
-        {
-            lookup_context ctx;
-            ctx.found = 0;
-            ctx.v = v;
-            VectorForEach ( &control, false, ptr_lookup, &ctx ); /* */
-            OUTMSG(( "%u values found\n", ctx.found ));
-
-            ctx.found = 0;
-            ctx.control = &control;
-            rc = KVectorVisitPtr( v, false, on_visit_ptr, &ctx ); /* */
-            OUTMSG(( "%u values verified\n", ctx.found ));
-
-        }
-        VectorWhack ( &control, key_and_value_whack, NULL );
-        KVectorRelease ( v );
-    }
-    OUTMSG(( "\n" ));
-    return rc;
-}
-
-
-static rc_t test_prev_single_i32 ( KVector const* v,
-    uint64_t const key, uint64_t const prev_key_ref, int32_t const prev_value_ref )
-{
-    uint64_t prev_key;
-    int32_t prev_value;
-    rc_t rc = KVectorGetPrevI32 ( v, &prev_key, key, &prev_value );
-    if (rc)
-    {
-        OUTMSG(("KVectorGetPrevI32(key=%lu) failed with e...r %R\n", key, rc));
-    }
-    else
-        OUTMSG(("The value previous to key=%lu is (%lu, %d); must be (%lu, %d)%s\n",
-            key, prev_key, prev_value, prev_key_ref, prev_value_ref,
-            prev_key != prev_key_ref || prev_value != prev_value_ref ? " MISMATCH" : ""));
-    return rc;
-}
-
-static rc_t test_next_single_i32 ( KVector const* v,
-    uint64_t const key, uint64_t const next_key_ref, int32_t const next_value_ref )
-{
-    uint64_t next_key;
-    int32_t next_value;
-    rc_t rc = KVectorGetNextI32 ( v, &next_key, key, &next_value );
-    if (rc)
-        OUTMSG(("KVectorGetNextI32(key=%lu) failed with e...r %R\n", key, rc));
-    else
-        OUTMSG(("The value following key=%lu is (%lu, %d); must be (%lu, %d)%s\n",
-            key, next_key, next_value, next_key_ref, next_value_ref,
-            next_key != next_key_ref || next_value != next_value_ref ? " MISMATCH" : ""));
-    return rc;
-}
-
-static rc_t perform_prev_next_i32_test()
-{
-    rc_t rc;
-    KVector *v;
-    OUTMSG(( "KVector: prev element int32 - test\n")); /* */
-    rc = KVectorMake ( &v );
-    if ( rc == 0 )
-    {
-        rc = KVectorSetI32 (v, 1, 11 );
-        rc = rc || KVectorSetI32 (v, 2, 22 );
-        rc = rc || KVectorSetI32 (v, 3, 33 );
-        rc = rc || KVectorSetI32 (v, 4, 44 );
-        rc = rc || KVectorSetI32 (v, 0, 100 );
-        rc = rc || KVectorSetI32 (v, 32, 320 );
-        rc = rc || KVectorSetI32 (v, 64, 640 );
-
-        if (rc)
-            OUTMSG(("KVectorSetI32 failed with e...r %R\n", rc));
-        else
-        {
-            test_prev_single_i32 (v, 2, 1, 11);
-            test_prev_single_i32 (v, 1, 0, 100);
-            test_prev_single_i32 (v, 32, 4, 44);
-            test_prev_single_i32 (v, 64, 32, 320);
-            test_prev_single_i32 (v, 0, 0, 0);
-            test_prev_single_i32 (v, 123, 64, 640);
-            test_prev_single_i32 (v, 33, 32, 320);
-
-            OUTMSG(("\n"));
-
-            test_next_single_i32 (v, 2, 3, 33);
-            test_next_single_i32 (v, 1, 2, 22);
-            test_next_single_i32 (v, 32, 64, 640);
-            test_next_single_i32 (v, 64, 0, 0);
-            test_next_single_i32 (v, 0, 1, 11);
-            test_next_single_i32 (v, 123, 0, 0);
-            test_next_single_i32 (v, 33, 64, 640);
-        }
-        KVectorRelease ( v );
-    }
-    OUTMSG(( "\n" ));
-
-    return rc;
-}
-
-static rc_t test_prev_single_bool ( KVector const* v,
-    uint64_t key, uint64_t prev_key_ref, bool prev_value_ref )
-{
-    uint64_t prev_key;
-    bool prev_value;
-    rc_t rc = KVectorGetPrevBool ( v, &prev_key, key, &prev_value );
-    if (rc)
-        OUTMSG(("KVectorGetPrevBool(key=%lu) failed with e...r %R\n", key, rc));
-    else
-        OUTMSG(("The value previous to key=%lu is (%lu, %d); must be (%lu, %d)%s\n",
-            key, prev_key, prev_value, prev_key_ref, prev_value_ref,
-            prev_key != prev_key_ref || prev_value != prev_value_ref ? " MISMATCH" : ""));
-    return rc;
-}
-
-static rc_t test_next_single_bool ( KVector const* v,
-    uint64_t key, uint64_t next_key_ref, bool next_value_ref )
-{
-    uint64_t next_key;
-    bool next_value;
-    rc_t rc = KVectorGetNextBool ( v, &next_key, key, &next_value );
-    if (rc)
-        OUTMSG(("KVectorGetNextBool(key=%lu) failed with e...r %R\n", key, rc));
-    else
-        OUTMSG(("The value following key=%lu is (%lu, %d); must be (%lu, %d)%s\n",
-            key, next_key, next_value, next_key_ref, next_value_ref,
-            next_key != next_key_ref || next_value != next_value_ref ? " MISMATCH" : ""));
-    return rc;
-}
-
-static rc_t perform_prev_next_bool_test()
-{
-    rc_t rc;
-    KVector *v;
-    OUTMSG(( "KVector: prev element bool - test\n"));
-    rc = KVectorMake ( &v );
-    if ( rc == 0 )
-    {
-        rc = KVectorSetBool (v, 1, true );
-        rc = rc || KVectorSetBool (v, 2, false );
-        rc = rc || KVectorSetBool (v, 3, true );
-        rc = rc || KVectorSetBool (v, 4, false );
-        rc = rc || KVectorSetBool (v, 0, true );
-        rc = rc || KVectorSetBool (v, 32, false );
-        rc = rc || KVectorSetBool (v, 64, true );
-
-        if (rc)
-            OUTMSG(("KVectorSetBool failed with e...r %R\n", rc));
-        else
-        {
-            test_prev_single_bool (v, 2, 1, true);
-            test_prev_single_bool (v, 1, 0, true);
-            test_prev_single_bool (v, 32, 4, false);
-            test_prev_single_bool (v, 64, 32, false);
-            test_prev_single_bool (v, 0, 4, false);
-            test_prev_single_bool (v, 123, 64, true);
-            test_prev_single_bool (v, 33, 32, false);
-
-            OUTMSG(("\n"));
-
-            test_next_single_bool (v, 2, 3, true);
-            test_next_single_bool (v, 1, 2, false);
-            test_next_single_bool (v, 32, 64, true);
-            test_next_single_bool (v, 64, 0, true);
-            test_next_single_bool (v, 0, 1, true);
-            test_next_single_bool (v, 123, 0, true);
-            test_next_single_bool (v, 33, 64, true);
-        }
-        KVectorRelease ( v );
-    }
-    OUTMSG(( "\n" ));
-
-    return rc;
-}
-
-
-rc_t perform_test( const uint32_t count )
-{
-    random_numbers rnum;
-    rc_t rc = make_random_numbers( &rnum, count, count * 2 );
-    if ( rc != 0 )
-    {
-        OUTMSG(( "error making random numbers %u\n", rc ));
-    }
-    else
-    {
-#if _ARCH_BITS == 64
-        if ( rc == 0 )
-            rc = perform_uint64_t_test( &rnum );
-#endif
-        if ( rc == 0 )
-            rc = perform_uint32_t_test( &rnum );
-        if ( rc == 0 )
-            rc = perform_uint16_t_test( &rnum );
-        if ( rc == 0 )
-            rc = perform_uint8_t_test( &rnum );
-
-#if _ARCH_BITS == 64
-        if ( rc == 0 )
-            rc = perform_int64_t_test( &rnum );
-#endif
-        if ( rc == 0 )
-            rc = perform_int32_t_test( &rnum );
-        if ( rc == 0 )
-            rc = perform_int16_t_test( &rnum );
-        if ( rc == 0 )
-            rc = perform_int8_t_test( &rnum );
-
-        if ( rc == 0 )
-            rc = perform_float_test( &rnum );
-#if _ARCH_BITS == 64
-        if ( rc == 0 )
-            rc = perform_double_test( &rnum );
-#endif
-        if ( rc == 0 )
-            rc = perform_bool_test( &rnum );
-        if ( rc == 0 )
-            rc = perform_ptr_test( &rnum );
-
-        free_random_numbers( &rnum );
-
-        perform_prev_next_i32_test();
-        perform_prev_next_bool_test();
-    }
-
-    return rc;
-}
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args * args;
-
-    rc_t rc = ArgsMakeAndHandle ( &args, argc, argv, 1,
-                JudyTestOptions, sizeof ( JudyTestOptions ) / sizeof ( OptDef ) );
-    if ( rc == 0 )
-    {
-        srand ( ( unsigned int ) time(NULL) );
-        rc = perform_test( get_int_option( args, OPTION_COUNT, 10000 ) );
-
-        ArgsWhack ( args );
-    }
-    else
-        OUTMSG( ( "ArgsMakeAndHandle() failed %R\n", rc ) );
-
-    return rc;
-}
diff --git a/test/junit-4.11.jar b/test/junit-4.11.jar
deleted file mode 100644
index 4d552a6..0000000
Binary files a/test/junit-4.11.jar and /dev/null differ
diff --git a/test/kapp/Makefile b/test/kapp/Makefile
deleted file mode 100644
index a439578..0000000
--- a/test/kapp/Makefile
+++ /dev/null
@@ -1,169 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-#TODO: update qfiletest
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-MODULE = test/kapp
-
-TEST_TOOLS = \
-    test-qfile \
-    test-kapp
-
-ALL_TOOLS = \
-	env-test-tool \
-	sig-core \
-	report-kns-agent
-    
-include $(TOP)/build/Makefile.env
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-$(ALL_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: $(ALL_LIBS) $(ALL_TOOLS) $(TEST_TOOLS)
-
-clean: stdclean
-
-std: $(ALL_TOOLS)
-
-#-------------------------------------------------------------------------------
-# kapp-test
-#
-ARGS_TEST_SRC = \
-	kapp-test
-
-ARGS_TEST_OBJ = \
-	$(addsuffix .$(OBJX),$(ARGS_TEST_SRC))
-
-ARGS_TEST_LIB = \
-    -sktst \
-	-skapp \
-    -sload \
-    -sncbi-wvdb \
-
-$(TEST_BINDIR)/test-kapp: $(ARGS_TEST_OBJ)
-	$(LP) --exe -o $@ $^ $(ARGS_TEST_LIB)
-
-#-------------------------------------------------------------------------------
-# test-qfile
-#
-QFILETEST_SRC = \
-	qfiletest
-
-QFILETEST_OBJ = \
-	$(addsuffix .$(OBJX),$(QFILETEST_SRC))
-
-QFILETEST_LIB = \
-	-skapp \
-    -sload \
-    -sncbi-wvdb \
-
-
-$(TEST_BINDIR)/test-qfile: $(QFILETEST_OBJ)
-	$(LD) --exe $(SRCDIR) -o $@ $^ $(QFILETEST_LIB)
-
-#-------------------------------------------------------------------------------
-# env-test-tool
-#
-ENV_TEST_SRC = \
-	env-test-tool
-
-ENV_TEST_OBJ = \
-	$(addsuffix .$(OBJX),$(ENV_TEST_SRC))
-
-ENV_TEST_LIB = \
-	-skapp \
-	-sncbi-vdb \
-	-sload \
-	-lm
-
-$(TEST_BINDIR)/env-test-tool: $(ENV_TEST_OBJ)
-	$(LD) --exe -o $@ $^ $(ENV_TEST_LIB)
-
-#-------------------------------------------------------------------------------
-# sig-core
-#
-SIG_CORE_TEST_SRC = \
-	sig-core
-
-SIG_CORE_TEST_OBJ = \
-	$(addsuffix .$(OBJX),$(SIG_CORE_TEST_SRC))
-
-SIG_CORE_TEST_LIB = \
-	-skapp \
-	-sncbi-vdb \
-	-sload \
-	-lm
-
-$(TEST_BINDIR)/sig-core: $(SIG_CORE_TEST_OBJ)
-	$(LD) --exe -o $@ $^ $(SIG_CORE_TEST_LIB)
-	
-#-------------------------------------------------------------------------------
-# report-kns-agent
-#
-REPORT_KNS_AGENT_TEST_SRC = \
-	report-kns-agent
-
-REPORT_KNS_AGENT_TEST_OBJ = \
-	$(addsuffix .$(OBJX),$(REPORT_KNS_AGENT_TEST_SRC))
-
-REPORT_KNS_AGENT_TEST_LIB = \
-	-skapp \
-	-sncbi-vdb
-
-$(TEST_BINDIR)/report-kns-agent: $(REPORT_KNS_AGENT_TEST_OBJ)
-	$(LD) --exe -o $@ $^ $(REPORT_KNS_AGENT_TEST_LIB)
-
-#-------------------------------------------------------------------------------
-# scripted tests
-#
-runtests: sig-core-tests kns-agent-tests
-
-sig-core-tests: sig-core
-	@ echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-	@ echo "Running $(SRCDIR)/run-sig-core.sh $(TEST_BINDIR)/sig-core"
-	@ $(SRCDIR)/run-sig-core.sh $(TEST_BINDIR)/sig-core $(HOST_OS) $(BUILD)
-	
-kns-agent-tests: report-kns-agent
-	@ echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-	@ echo "Running kns-agent tests"
-	@ # simple tool name
-	@ export PATH=./tmp/export:$$PATH && $(SRCDIR)/run-kns-agent.sh $(TEST_BINDIR)/report-kns-agent ./tmp/export/a.123.99 a.1.2.3 a.123.99
-	@ export PATH=./tmp/export:$$PATH && $(SRCDIR)/run-kns-agent.sh $(TEST_BINDIR)/report-kns-agent ./tmp/export/abcdefghi abcdefghi.1.2.3 abcdefghi
-	@ # tool path where directory path length >= tool name length
-	@ $(SRCDIR)/run-kns-agent.sh $(TEST_BINDIR)/report-kns-agent ./tmp/path/tool.99.123 tool.1.2.3
-	@ $(SRCDIR)/run-kns-agent.sh $(TEST_BINDIR)/report-kns-agent ./tmp/path/tool tool.1.2.3
-	@ $(SRCDIR)/run-kns-agent.sh $(TEST_BINDIR)/report-kns-agent tmp/path/tool tool.1.2.3
-	@ $(SRCDIR)/run-kns-agent.sh $(TEST_BINDIR)/report-kns-agent ../kapp/tmp/path/tool tool.1.2.3
-	@ $(SRCDIR)/run-kns-agent.sh $(TEST_BINDIR)/report-kns-agent tmp/tool tool.1.2.3
-	@ # tool path where directory path length < tool name length
-	@ $(SRCDIR)/run-kns-agent.sh $(TEST_BINDIR)/report-kns-agent ./tmp/abcdefghi abcdefghi.1.2.3
-	@ $(SRCDIR)/run-kns-agent.sh $(TEST_BINDIR)/report-kns-agent ./tmp/abcdefghi.55.111 abcdefghi.1.2.3
-	@ rm -rf ./tmp/
-	
diff --git a/test/kapp/env-test-tool.c b/test/kapp/env-test-tool.c
deleted file mode 100644
index 5a349bc..0000000
--- a/test/kapp/env-test-tool.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kapp/main.h>
-#include <kapp/args.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/rc.h>
-
-#include <assert.h>
-#include <stdio.h>
-
-// TODO: provide short ones
-#define ALIAS_AMD64     NULL
-#define OPTION_AMD64    "amd64"
-static const char* USAGE_AMD64[] = { "require tool to be run under 64-bit environment", NULL };
-
-#define ALIAS_RAM       NULL
-#define OPTION_RAM      "ram"
-static const char* USAGE_RAM[] = { "require system RAM to be at least B", NULL };
-
-OptDef Options[] =
-{                                         /* needs_value, required */
-      { OPTION_AMD64, ALIAS_AMD64, NULL, USAGE_AMD64, 1, false, false }
-    , { OPTION_RAM  , ALIAS_RAM  , NULL, USAGE_RAM  , 1, true , false }
-};
-
-ver_t CC KAppVersion ( void )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-env";
-
-rc_t CC UsageSummary ( const char *progname )
-{
-    return KOutMsg ( "\n"
-                     "Usage:\n"
-                     "  %s [Options]\n"
-                     "\n"
-                     "Summary:\n"
-                     "  Test system environment.\n"
-                     , progname
-        );
-}
-
-rc_t CC Usage ( const Args *args )
-{
-    const char * progname = UsageDefaultName;
-    const char * fullpath = UsageDefaultName;
-    rc_t rc;
-
-    if (args == NULL)
-        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
-    else
-        rc = ArgsProgram (args, &fullpath, &progname);
-    if (rc)
-        progname = fullpath = UsageDefaultName;
-
-    UsageSummary (progname);
-
-    KOutMsg ("Options:\n");
-
-    HelpOptionLine (ALIAS_AMD64, OPTION_AMD64, NULL, USAGE_AMD64);
-    HelpOptionLine (ALIAS_RAM  , OPTION_RAM  , NULL, USAGE_RAM);
-    KOutMsg ("\n");
-
-    HelpOptionsStandard ();
-    HelpVersion ( fullpath, KAppVersion () );
-
-    return rc;
-}
-
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args *args;
-    rc_t rc;
-    do {
-        uint32_t paramc;
-        bool requireAmd64 = false;
-        uint64_t requireRam = 0;
-
-        rc = ArgsMakeAndHandle ( & args, argc, argv, 1, 
-               Options, sizeof Options / sizeof (OptDef) );
-        if ( rc != 0 )
-        {
-            LogErr ( klogErr, rc, "failed to parse arguments" );
-            break;
-        }
-        
-        // TODO: cehck if we need it
-        rc = ArgsParamCount ( args, & paramc );
-        if ( rc != 0 ) {
-            LogErr ( klogInt, rc, "failed to obtain param count" );
-            break;
-        }
-
-        {   // OPTION_AMD64
-            rc = ArgsOptionCount( args, OPTION_AMD64, & paramc );
-            if ( rc ) {
-                LOGERR( klogErr, rc, "Failure to get '" OPTION_AMD64 "' argument" );
-                break;
-            }
-            if ( paramc ) {
-                requireAmd64 = true;
-            }
-        }
-
-        {
-            // OPTION_RAM
-            rc = ArgsOptionCount ( args, OPTION_RAM, & paramc );
-            if ( rc ) {
-                LOGERR ( klogErr, rc, "Failure to get '" OPTION_RAM "' argument" );
-                break;
-            }
-            if ( paramc ) {
-                const char* dummy = NULL;
-                rc = ArgsOptionValue(args, OPTION_RAM, 0, (const void **)&dummy);
-                if ( rc ) {
-                    LOGERR(klogErr, rc, "Failure to get '" OPTION_RAM "' argument");
-                    break;
-                }
-
-                rc = sscanf(dummy, "%llu", &requireRam);
-                if ( rc != 1) 
-                {
-                    LOGMSG(klogErr, "Failure to parse '" OPTION_RAM "' argument value");
-                    break;
-                }
-            }
-
-        }
-       
-        {
-            rc = KAppCheckEnvironment(requireAmd64, requireRam);
-            if (rc != 0 )
-                printf("Invalid environment\n");
-            else
-                printf("Enviroment is fine!\n"); 
-        }
-    } while (false);
-
-    ArgsWhack ( args );
-
-    return rc;
-}
diff --git a/test/kapp/kapp-test.cpp b/test/kapp/kapp-test.cpp
deleted file mode 100644
index 7d51750..0000000
--- a/test/kapp/kapp-test.cpp
+++ /dev/null
@@ -1,549 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <cstdlib>
-#include <cstring>
-#include <cstdio>
-
-#include <ktst/unit_test.hpp>
-#include <klib/out.h>
-#include <klib/rc.h>
-#include <kapp/main.h>
-#include <kapp/args.h>
-#include <kapp/loader-file.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/impl.h>
-#include <kapp/queue-file.h>
-#include <kfg/config.h>
-
-using namespace std;
-using namespace ncbi::NK;
-
-TEST_SUITE(KAppTestSuite);
-
-const char UsageDefaultName[] = "args-test";
-
-#if ! ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED
-extern "C"
-{
-    rc_t CC UsageSummary ( const char *progname )
-    {
-        return TestEnv::UsageSummary ( progname );
-    }
-
-    rc_t CC Usage ( const Args *args )
-    {
-        const char* progname = UsageDefaultName;
-        const char* fullpath = UsageDefaultName;
-
-        rc_t rc = (args == NULL) ?
-            RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull):
-            ArgsProgram(args, &fullpath, &progname);
-        if ( rc == 0 )
-            rc = TestEnv::Usage ( progname );
-        return rc;
-    }
-}
-#endif
-
-#define OPTION_TEST "test"
-
-static char arg_append_string[] = "__T__";
-static size_t arg_append_string_len = sizeof arg_append_string / sizeof arg_append_string[0] - 1;
-
-rc_t TestArgConvAppender(const Args * args, uint32_t arg_index, const char * arg, size_t arg_len, void ** result, WhackParamFnP * whack)
-{
-    char * res = (char *)malloc(arg_len + arg_append_string_len + 1);
-    assert(res);
-    
-    memcpy(res, arg, arg_len);
-    memcpy(res + arg_len, arg_append_string, arg_append_string_len);
-    res[arg_len + arg_append_string_len] = 0;
-    
-    *result = res;
-    
-    return 0;
-}
-
-void WhackArgFile(void * file)
-{
-    KFileRelease(reinterpret_cast<KFile *>(file));
-}
-
-rc_t TestArgConvFileCreator(const Args * args, uint32_t arg_index, const char * arg, size_t arg_len, void ** result, WhackParamFnP * whack)
-{
-    rc_t rc;
-    KDirectory * dir;
-    KFile * file;
-    
-    char * file_path = const_cast<char *>(arg);
-    
-    rc = KDirectoryNativeDir( &dir );
-    if (rc == 0)
-    {
-        KDirectoryRemove(dir, true, "%s", file_path);
-        rc = KDirectoryCreateFile(dir, &file, false, 0664, kcmCreate, "%s", file_path);
-        if (rc == 0)
-        {
-            char buffer[4] = { 'a', 'b', 'c', 'd' };
-            size_t num_written;
-            
-            rc = KFileWriteAll(file, 0, buffer, sizeof buffer / sizeof buffer[0], &num_written);
-            if (rc == 0)
-            {
-                assert(num_written == sizeof buffer / sizeof buffer[0]);
-                
-                *result = file;
-                *whack = WhackArgFile;
-                return 0;
-            }
-            
-            fprintf(stderr, "cannot write test buffer to create file: %s\n", file_path);
-            KFileRelease(file);
-        }
-        else
-        {
-            fprintf(stderr, "cannot create file from argument: %s\n", file_path);
-        }
-        KDirectoryRelease( dir );
-    }
-    
-    return rc;
-}
-
-TEST_CASE(KApp_ArgsMakeParams)
-{
-    int argc;
-    const char * argv[16];
-
-    /* testing params */
-    argc = 6;
-    argv[0] = "test_1";
-    argv[1] = "0";
-    argv[2] = "1";
-    argv[3] = "2";
-    argv[4] = "3";
-    argv[5] = "4";
-
-    Args * args;
-    REQUIRE_RC(ArgsMake (&args));
-    REQUIRE_RC(ArgsParse (args, argc, (char**)argv));
-
-    {
-        uint32_t param_count;
-        uint32_t ix;
-
-        REQUIRE_RC(ArgsParamCount (args, &param_count));
-        REQUIRE_EQ(param_count, (uint32_t)argc-1);
-        for (ix = 0; ix < param_count; ix++)
-        {
-            const char * value;
-            REQUIRE_RC(ArgsParamValue (args, ix, reinterpret_cast<const void**>(&value)));
-            {
-                /* valgrind whines about the line below.  I can't see
-                 * the problem with a uninitialized variable used for
-                 * a conditional jump unless its in libc */
-                REQUIRE_EQ(atoi(value), (int)ix);
-            }
-        }
-    }
-    REQUIRE_RC(ArgsWhack (args));
-}
-
-TEST_CASE(KApp_ArgsMakeParamsConvAppend)
-{
-    ParamDef Parameters[] =
-    {
-        { TestArgConvAppender }
-    };
-    int argc;
-    const char * argv[16];
-    
-    /* testing params */
-    argc = 2;
-    argv[0] = "test_1";
-    argv[1] = "abcd";
-    
-    Args * args;
-    REQUIRE_RC(ArgsMake (&args));
-    REQUIRE_RC(ArgsAddParamArray (args, Parameters, sizeof Parameters / sizeof Parameters[0]));
-    REQUIRE_RC(ArgsParse (args, argc, (char**)argv));
-    
-    {
-        const char * value;
-        uint32_t param_count;
-        
-        REQUIRE_RC(ArgsParamCount (args, &param_count));
-        REQUIRE_EQ(param_count, (uint32_t)argc-1);
-        
-        REQUIRE_RC(ArgsParamValue (args, 0, reinterpret_cast<const void**>(&value)));
-        
-        REQUIRE(memcmp(value, argv[1], 4) == 0);
-        REQUIRE(memcmp(value + 4, arg_append_string, arg_append_string_len + 1) == 0);
-    }
-    REQUIRE_RC(ArgsWhack (args));
-}
-
-TEST_CASE(KApp_ArgsMakeOptions)
-{
-    OptDef Options[] =
-    {                                         /* needs_value, required */
-        { OPTION_TEST, NULL, NULL, NULL, 1, true, false }
-    };
-    int argc;
-    const char * argv[16];
-    
-    /* testing params */
-    argc = 3;
-    argv[0] = "test_2";
-    argv[1] = "--test";
-    argv[2] = "abcd";
-    
-    Args * args;
-    REQUIRE_RC(ArgsMake (&args));
-    REQUIRE_RC(ArgsAddOptionArray (args, Options, sizeof Options / sizeof Options[0]));
-    REQUIRE_RC(ArgsParse (args, argc, (char**)argv));
-    
-    {
-        const char * value;
-        uint32_t count;
-        
-        REQUIRE_RC(ArgsParamCount (args, &count));
-        REQUIRE_EQ(count, (uint32_t)0);
-        
-        REQUIRE_RC(ArgsOptionCount (args, OPTION_TEST, &count));
-        REQUIRE_EQ(count, (uint32_t)1);
-        
-        REQUIRE_RC(ArgsOptionValue (args, OPTION_TEST, 0, reinterpret_cast<const void**>(&value)));
-        REQUIRE_EQ(std::string(value), std::string(argv[2]));
-    }
-    REQUIRE_RC(ArgsWhack (args));
-}
-
-TEST_CASE(KApp_ArgsMakeOptionsConversion)
-{
-    OptDef Options[] =
-    {                                         /* needs_value, required */
-        { OPTION_TEST, NULL, NULL, NULL, 1, true, false, TestArgConvFileCreator }
-    };
-    int argc;
-    const char * argv[16];
-    KDirectory * dir;
-    
-    /* testing params */
-    argc = 3;
-    argv[0] = "test_2";
-    argv[1] = "--test";
-    argv[2] = "file.test";
-    
-    Args * args;
-    REQUIRE_RC(ArgsMake (&args));
-    REQUIRE_RC(ArgsAddOptionArray (args, Options, sizeof Options / sizeof Options[0]));
-    REQUIRE_RC(ArgsParse (args, argc, (char**)argv));
-    
-    {
-        const KFile * file;
-        uint32_t count;
-        uint64_t file_size;
-        
-        REQUIRE_RC(ArgsParamCount (args, &count));
-        REQUIRE_EQ(count, (uint32_t)0);
-        
-        REQUIRE_RC(ArgsOptionCount (args, OPTION_TEST, &count));
-        REQUIRE_EQ(count, (uint32_t)1);
-        
-        REQUIRE_RC(ArgsOptionValue (args, OPTION_TEST, 0, reinterpret_cast<const void**>(&file)));
-        
-        REQUIRE_RC(KFileSize (file, &file_size));
-        
-        REQUIRE_EQ(file_size, (uint64_t)4);
-    }
-    REQUIRE_RC(ArgsWhack (args));
-    
-    REQUIRE_RC(KDirectoryNativeDir ( &dir ));
-    REQUIRE_RC(KDirectoryRemove(dir, true, "%s", argv[2]));
-    REQUIRE_RC(KDirectoryRelease (dir));
-}
-
-#ifndef WINDOWS
-TEST_CASE(KQueueFile_ReadTimeout_FGsleeps)
-{
-    KDirectory *dir;
-    REQUIRE_RC(KDirectoryNativeDir(&dir));
-
-    KFile const* src;
-    REQUIRE_RC(KDirectoryOpenFileRead(dir, &src, "queuefile.data"));
-
-    const size_t BlockSize=10;
-    struct KFile const* qf;
-    const uint32_t timeoutSec=1;
-    // create a queue of 1 short block 
-    REQUIRE_RC(KQueueFileMakeRead(&qf, 0, src, BlockSize*1, BlockSize, timeoutSec*1000));
-
-    char buffer[BlockSize];
-    size_t num_read;
-    uint64_t pos=0;
-    REQUIRE_RC(KFileRead(qf, pos, buffer, BlockSize, &num_read)); REQUIRE_EQ(num_read, BlockSize); pos+=num_read;
-    // now sleep longer than the timeout and make sure the background thread does not seal the queue
-    TestEnv::Sleep(timeoutSec*2);
-    // read the block that has been populated while we slept:
-    REQUIRE_RC(KFileRead(qf, pos, buffer, BlockSize, &num_read)); REQUIRE_EQ(num_read, BlockSize); pos+=num_read;
-    // if queue has been sealed because of the timeout, the second read would return 0 bytes:
-    REQUIRE_RC(KFileRead(qf, pos, buffer, BlockSize, &num_read)); REQUIRE_EQ(num_read, BlockSize); pos+=num_read;
-
-    REQUIRE_RC(KFileRelease(qf));
-    REQUIRE_RC(KFileRelease(src));
-    REQUIRE_RC(KDirectoryRelease(dir));
-}
-
-//// A mock KFile object for imitating slow read on a background thread. Sends its thread to sleep after reading each block.
-struct SleepyReader
-{
-    const static uint64_t Size=10000;
-    const static int SleepSec=1;
-
-    static rc_t MakeFileRead(KFile const** f)
-    {
-        KFile* ret=(KFile*)malloc(sizeof(KFile));
-        ret-> vt = (const KFile_vt*)&vt;
-        ret-> dir = NULL;
-        atomic32_set ( & ret-> refcount, 1 );
-        ret-> read_enabled = 1;
-        ret-> write_enabled = 0;            
-        *f = ret;
-        return 0;
-    }
-    static rc_t CC get_size ( const KFILE_IMPL *self, uint64_t *size ) 
-    { 
-        *size=Size; 
-        return 0; 
-    }
-    static rc_t CC read( const KFILE_IMPL *self, uint64_t pos, void *buffer, size_t bsize, size_t *num_read )
-    {
-        memset(buffer, 1, bsize);
-        *num_read=bsize;
-        TestEnv::Sleep(SleepSec);
-        return 0;
-    }
-    static rc_t CC destroy( KFILE_IMPL *self ) 
-    { 
-        free(self); 
-        return 0; 
-    }
-
-    // the rest of the functions do not matter
-    static struct KSysFile* CC get_sysfile ( const KFILE_IMPL *self, uint64_t *offset ) { *offset=0; return 0; }
-    static rc_t CC random_access ( const KFILE_IMPL *self ) { return 0; } 
-    static rc_t CC set_size ( KFILE_IMPL *self, uint64_t size ) { return 0; }
-    static rc_t CC write( KFILE_IMPL *self, uint64_t pos, const void *buffer, size_t size, size_t *num_writ ) { *num_writ=0; return 0; }
-
-    static KFile_vt_v1 vt;
-};
-KFile_vt_v1 SleepyReader::vt=
-{   1, 0, 
-    SleepyReader::destroy,
-    SleepyReader::get_sysfile,
-    SleepyReader::random_access,
-    SleepyReader::get_size,
-    SleepyReader::set_size,
-    SleepyReader::read,
-    SleepyReader::write
-};
-
-TEST_CASE(KQueueFile_ReadTimeout_BGsleeps)
-{   
-    KFile const* src;
-    REQUIRE_RC(SleepyReader::MakeFileRead(&src)); // this reader will sleep for a second after each block
-
-    const size_t BlockSize=10;
-    struct KFile const* qf;
-    // create a queue of 1 short block 
-    REQUIRE_RC(KQueueFileMakeRead(&qf, 0, src, BlockSize*1, BlockSize, 100)); // a short timeout on the foreground thread
-
-    char buffer[BlockSize];
-    size_t num_read;
-    uint64_t pos=0;
-    REQUIRE_RC(KFileRead(qf, pos, buffer, BlockSize, &num_read)); REQUIRE_EQ(num_read, BlockSize); pos+=num_read;
-    // the background read thread will read the bytes and go to sleep for 1 second
-    // now, read the next block to make sure the foreground read thread recovers from the timeouts
-    REQUIRE_RC(KFileRead(qf, pos, buffer, BlockSize, &num_read)); REQUIRE_EQ(num_read, BlockSize); pos+=num_read;
-
-    REQUIRE_RC(KFileRelease(qf));
-    REQUIRE_RC(KFileRelease(src));
-}
-
-TEST_CASE(KQueueFile_WriteTimeout)
-{   
-    KDirectory *dir;
-    REQUIRE_RC(KDirectoryNativeDir(&dir));
-
-    const char* fileName="queuefile.temp";
-    KFile *dest;
-    REQUIRE_RC(KDirectoryCreateFile(dir, (KFile**)&dest, false, 0664, kcmInit, fileName));
-
-    const size_t BlockSize=10;
-    struct KFile* qf;
-    const uint32_t timeoutSec=1;
-    // create a queue of 1 short block 
-    REQUIRE_RC(KQueueFileMakeWrite(&qf, dest, BlockSize*1, BlockSize, timeoutSec*1000));
-
-    char buffer[BlockSize*2];
-    memset(buffer, 0, sizeof(buffer));
-    size_t num_writ;
-    uint64_t pos=0;
-    REQUIRE_RC(KFileWrite(qf, pos, buffer, BlockSize, &num_writ)); REQUIRE_EQ(num_writ, BlockSize); pos+=num_writ;
-    // now sleep longer than the timeout and make sure the background thread does not seal the queue
-    TestEnv::Sleep(timeoutSec*2);
-    // make sure we can continue writing:
-    REQUIRE_RC(KFileWrite(qf, pos, buffer, BlockSize, &num_writ)); REQUIRE_EQ(num_writ, BlockSize); 
-
-    REQUIRE_RC(KFileRelease(qf));
-    REQUIRE_RC(KFileRelease(dest));
-    REQUIRE_RC(KDirectoryRemove(dir, true, fileName)); 
-    REQUIRE_RC(KDirectoryRelease(dir));
-}
-#endif
-
-class LoaderFileFixture
-{
-public:
-    LoaderFileFixture() 
-    :   wd(0), lf(0)
-    {
-        if ( KDirectoryNativeDir ( & wd ) != 0 )
-            FAIL("KDirectoryNativeDir failed");
-    }
-    ~LoaderFileFixture() 
-    {
-        if ( lf != 0 && KLoaderFile_Release( lf, true ) != 0)
-            FAIL("KLoaderFile_Release failed");
-            
-        if ( !filename.empty() && KDirectoryRemove(wd, true, filename.c_str()) != 0)
-            FAIL("KDirectoryRemove failed");
-
-        if ( KDirectoryRelease ( wd ) != 0 )
-            FAIL("KDirectoryRelease failed");
-    }
-    rc_t CreateFile(const char* p_filename, const char* contents)
-    {   // create and open for read
-        KFile* file;
-        filename=p_filename;
-        rc_t rc=KDirectoryCreateFile(wd, &file, true, 0664, kcmInit, p_filename);
-        if (rc == 0)
-        {
-            size_t num_writ=0;
-            rc=KFileWrite(file, 0, contents, strlen(contents), &num_writ);
-            if (rc == 0)
-            {
-                rc=KFileRelease(file);
-            }
-            else
-            {
-                KFileRelease(file);
-            }
-            file=0;
-        }
-        return KLoaderFile_Make(&lf, wd, p_filename, 0, true);
-    }
-    KDirectory* wd;
-    string filename;
-    const KLoaderFile* lf;
-};
-
-FIXTURE_TEST_CASE(KLoaderFile_eolBeforeEof, LoaderFileFixture)
-{   
-    string input="qqq abcd\n";
-    CreateFile(GetName(), input.c_str());
-    const char* buf = 0;
-    size_t length = 0;
-    REQUIRE_RC(KLoaderFile_Readline(lf, (const void**)&buf, &length));
-    REQUIRE_NOT_NULL(buf);
-    REQUIRE_EQ(input, string(buf, length + 1)); // \n is not included in length but should be in the buffer
-}
-
-
-FIXTURE_TEST_CASE(KLoaderFile_noEolBeforeEof, LoaderFileFixture)
-{   // formerly a bug: if no \n on the last line of a file, the line was lost
-    string input="qqq abcd";
-    CreateFile(GetName(), input.c_str());
-    const char* buf = 0;
-    size_t length = 0;
-    REQUIRE_RC(KLoaderFile_Readline(lf, (const void**)&buf, &length));
-    REQUIRE_NOT_NULL(buf);
-    REQUIRE_EQ(input, string(buf, length));
-}
-
-TEST_CASE(KAppCheckEnvironment_requireAmd64)
-{
-    rc_t rc = KAppCheckEnvironment ( true, 0 );
-#if _ARCH_BITS != 64    
-    REQUIRE_NE ( (int)rc, 0 );
-#else
-    REQUIRE_EQ ( (int)rc, 0 );
-#endif
-}
-
-//////////////////////////////////////////// Main
-
-extern "C"
-{
-
-/* Version  EXTERN
- *  return 4-part version code: 0xMMmmrrrr, where
- *      MM = major release
- *      mm = minor release
- *    rrrr = bug-fix release
- */
-ver_t CC KAppVersion (void)
-{
-    return 0;
-}
-
-/* KMain - EXTERN
- *  executable entrypoint "main" is implemented by
- *  an OS-specific wrapper that takes care of establishing
- *  signal handlers, logging, etc.
- *
- *  in turn, OS-specific "main" will invoke "KMain" as
- *  platform independent main entrypoint.
- *
- *  "argc" [ IN ] - the number of textual parameters in "argv"
- *  should never be < 0, but has been left as a signed int
- *  for reasons of tradition.
- *
- *  "argv" [ IN ] - array of NUL terminated strings expected
- *  to be in the shell-native character set: ASCII or UTF-8
- *  element 0 is expected to be executable identity or path.
- */
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=KAppTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/kapp/qfiletest.c b/test/kapp/qfiletest.c
deleted file mode 100644
index 901ae61..0000000
--- a/test/kapp/qfiletest.c
+++ /dev/null
@@ -1,338 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <kapp/main.h>
-#include <kapp/args.h>
-#include <kapp/queue-file.h>
-
-#include <klib/out.h>
-#include <klib/rc.h>
-#include <klib/checksum.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-
-#include <sysalloc.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-
-#define OPTION_POS    "pos"
-#define ALIAS_POS     "p"
-
-#define OPTION_QSIZE  "qsize"
-#define ALIAS_QSIZE   "q"
-
-#define OPTION_BSIZE  "bsize"
-#define ALIAS_BSIZE   "b"
-
-#define OPTION_CSIZE  "csize"
-#define ALIAS_CSIZE   "c"
-
-#define OPTION_COUNT  "count"
-#define ALIAS_COUNT   "n"
-
-#define OPTION_POS2   "pos2"
-#define ALIAS_POS2    "2"
-
-static const char * pos_usage[]     = { "where to start reading", NULL };
-static const char * qsize_usage[]     = { "size of queue", NULL };
-static const char * bsize_usage[]     = { "block-size of queue", NULL };
-static const char * csize_usage[]     = { "chunk-size in loop", NULL };
-static const char * count_usage[]     = { "how much bytes total", NULL };
-static const char * pos2_usage[]     = { "2nd position to read at", NULL };
-
-OptDef QfileTestOptions[] =
-{
-/*    name             alias        fkt.  usage-txt,  cnt, needs value, required */
-    { OPTION_POS,      ALIAS_POS,   NULL, pos_usage,    1,   true,        false },
-    { OPTION_QSIZE,    ALIAS_QSIZE, NULL, qsize_usage,  1,   true,        false },
-    { OPTION_BSIZE,    ALIAS_BSIZE, NULL, bsize_usage,  1,   true,        false },
-    { OPTION_CSIZE,    ALIAS_CSIZE, NULL, csize_usage,  1,   true,        false },
-    { OPTION_COUNT,    ALIAS_COUNT, NULL, count_usage,  1,   true,        false },
-    { OPTION_POS2,     ALIAS_POS2,  NULL, pos2_usage,   1,   true,        false }
-};
-
-const char UsageDefaultName[] = "qfiletest";
-
-rc_t CC UsageSummary ( const char * progname )
-{
-    return KOutMsg ("\n"
-                    "Usage:\n"
-                    "  %s [options]\n"
-                    "\n", progname);
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    const char * progname = UsageDefaultName;
-    const char * fullpath = UsageDefaultName;
-    rc_t rc;
-
-    if ( args == NULL )
-        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
-    else
-        rc = ArgsProgram ( args, &fullpath, &progname );
-
-    if ( rc )
-        progname = fullpath = UsageDefaultName;
-
-    UsageSummary ( progname );
-
-    KOutMsg ( "Options:\n" );
-
-    HelpOptionLine ( ALIAS_POS,   OPTION_POS,   "pos",   pos_usage );
-    HelpOptionLine ( ALIAS_QSIZE, OPTION_QSIZE, "qsize", qsize_usage );
-    HelpOptionLine ( ALIAS_BSIZE, OPTION_BSIZE, "bsize", bsize_usage );
-    HelpOptionLine ( ALIAS_CSIZE, OPTION_CSIZE, "csize", csize_usage );
-    HelpOptionLine ( ALIAS_COUNT, OPTION_COUNT, "count", count_usage );
-    HelpOptionLine ( ALIAS_POS2,  OPTION_POS2,  "pos2",  pos2_usage );
-
-    HelpOptionsStandard ();
-    HelpVersion ( fullpath, KAppVersion() );
-    return rc;
-}
-
-
-/* Version  EXTERN
- *  return 4-part version code: 0xMMmmrrrr, where
- *      MM = major release
- *      mm = minor release
- *    rrrr = bug-fix release
- */
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-
-
-static uint64_t get_uint64_option( const Args *my_args,
-                                   const char *name,
-                                   const uint64_t def )
-{
-    uint32_t count;
-    uint64_t res = def;
-    rc_t rc = ArgsOptionCount( my_args, name, &count );
-    if ( ( rc == 0 )&&( count > 0 ) )
-    {
-        const char *s;
-        rc = ArgsOptionValue( my_args, name, 0,  (const void **)&s );
-        if ( rc == 0 ) res = strtoull( s, NULL, 10 );
-    }
-    return res;
-}
-
-static uint32_t get_uint32_option( const Args *my_args,
-                                   const char *name,
-                                   const uint32_t def )
-{
-    uint32_t count, res = def;
-    rc_t rc = ArgsOptionCount( my_args, name, &count );
-    if ( ( rc == 0 )&&( count > 0 ) )
-    {
-        const char *s;
-        rc = ArgsOptionValue( my_args, name, 0,  (const void **)&s );
-        if ( rc == 0 ) res = strtoul( s, NULL, 10 );
-    }
-    return res;
-}
-
-
-static rc_t read_loop( const KFile * f, const uint64_t a_pos, const uint64_t count,
-                       const size_t chunk_size, uint8_t digest [ 16 ] )
-{
-    rc_t rc = 0;
-    uint64_t pos = a_pos;
-    uint64_t n_bytes = 0;
-    size_t num_read = 1;
-    MD5State md5;
-
-    char * buffer = malloc( chunk_size );
-    if ( buffer == NULL )
-        return RC( rcExe, rcFile, rcPacking, rcMemory, rcExhausted );
-
-    MD5StateInit ( &md5 );
-    while ( rc == 0 && num_read > 0 )
-    {
-        size_t chunk = chunk_size;
-        
-        if ( ( count > 0 ) && ( ( n_bytes + chunk ) > count ) )
-        {
-            chunk = ( count - n_bytes );
-        }
-
-        OUTMSG(( "about to read from pos %lu\n", pos ));
-        rc = KFileRead ( f, pos, buffer, chunk, &num_read );
-        OUTMSG(( "returned from KFileRead rc = %R, num_read = %zu\n\n", rc, num_read ));
-        if ( rc == 0 && num_read > 0 )
-        {
-            MD5StateAppend ( &md5, buffer, num_read );
-            pos += num_read;
-            n_bytes += num_read;
-            if ( ( count > 0 ) && ( n_bytes >= count ) )
-            {
-                num_read = 0;
-            }
-        }
-    }
-    OUTMSG(( "%lu bytes read total\n", n_bytes ));
-    free( buffer );
-    MD5StateFinish ( &md5, digest );
-
-    return rc;
-}
-
-
-static void print_digest( uint8_t digest [ 16 ] )
-{
-    uint8_t i;
-
-    OUTMSG(( "md5-sum: " ));
-    for ( i = 0; i < 16; ++i )
-        OUTMSG(( "%.02x", digest[ i ] ));
-    OUTMSG(( "\n" ));
-}
-
-
-static rc_t perform_qtest( const KFile *f, const char * filename,
-                           const uint64_t pos, const uint64_t count,
-                           const size_t queue_size, const size_t block_size,
-                           const size_t chunk_size )
-{
-    const KFile * qf;
-    rc_t rc = KQueueFileMakeRead ( &qf, pos, f, queue_size, block_size, 0 );
-    if ( rc != 0 )
-    {
-        OUTMSG(( "KQueueFileMakeRead( '%s' ) failed: %R\n", filename, rc ));
-    }
-    else
-    {
-        uint8_t digest [ 16 ];
-        rc = read_loop( qf, pos, count, chunk_size, digest );
-        KFileRelease( qf );
-        print_digest( digest );
-    }
-    return rc;
-}
-
-
-static rc_t perform_test( const KDirectory *dir, const char * filename,
-                          const uint64_t pos, const uint64_t pos2,
-                          const uint64_t count, const size_t queue_size,
-                          const size_t block_size, const size_t chunk_size )
-{
-    const KFile * f;
-    rc_t rc = KDirectoryOpenFileRead ( dir, &f, filename );
-    if ( rc != 0 )
-    {
-        OUTMSG(( "KDirectoryOpenFileRead( '%s' ) failed: %R\n", filename, rc ));
-    }
-    else
-    {
-        rc = perform_qtest( f, filename, pos, count, queue_size, block_size, chunk_size );
-        if ( rc == 0 && pos2 > 0 )
-        {
-            rc = perform_qtest( f, filename, pos2, count, queue_size, block_size, chunk_size );
-        }
-        KFileRelease( f );
-    }
-    return rc;
-}
-
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args * args;
-
-    rc_t rc = ArgsMakeAndHandle ( &args, argc, argv, 1,
-                QfileTestOptions, sizeof ( QfileTestOptions ) / sizeof ( OptDef ) );
-    if ( rc != 0 )
-    {
-        OUTMSG(( "ArgsMakeAndHandle( ... ) failed: %R\n", rc ));
-    }
-    else
-    {
-        uint32_t arg_count = 0;
-        rc = ArgsParamCount ( args, &arg_count );
-        if ( rc != 0 )
-        {
-            OUTMSG(( "ArgsParamCount( ... ) failed: %R\n", rc ));
-        }
-        else
-        {
-            KDirectory *dir = NULL;
-            uint64_t position = get_uint64_option( args, OPTION_POS, 0 );
-            uint64_t count = get_uint64_option( args, OPTION_COUNT, 0 );
-            uint32_t qsize = get_uint32_option( args, OPTION_QSIZE, 1024 );
-            uint32_t bsize = get_uint32_option( args, OPTION_BSIZE, 0 );
-            uint32_t csize = get_uint32_option( args, OPTION_CSIZE, 1024 );
-            uint64_t pos2 = get_uint64_option( args, OPTION_POS2, 0 );
-
-            OUTMSG(( "start-position : %lu\n", position ));
-            if ( pos2 > 0 )
-            {
-                OUTMSG(( "2nd position   : %lu\n", pos2 ));
-            }
-            if ( count > 0 )
-            {
-                OUTMSG(( "count          : %lu\n", count ));
-            }
-            OUTMSG(( "queue-size     : %u\n",  qsize ));
-            OUTMSG(( "block-size     : %u\n",  bsize ));
-            OUTMSG(( "chunk-size     : %u\n",  csize ));
-
-            rc = KDirectoryNativeDir( &dir );
-            if ( rc != 0 )
-            {
-                OUTMSG(( "KDirectoryNativeDir( ... ) failed: %R\n", rc ));
-            }
-            else
-            {
-                uint32_t i;
-                for ( i = 0; i < arg_count && rc == 0; ++i )
-                {
-                    const char * filename;
-                    rc = ArgsParamValue ( args, i, (const void **)&filename );
-                    if ( rc != 0 )
-                    {
-                        OUTMSG(( "ArgsParamValue( %d ) failed: %R\n", i, rc ));
-                    }
-                    else
-                    {
-                        OUTMSG(( "file to read   : '%s'\n", filename ));
-                        rc = perform_test( dir, filename, position, pos2,
-                                           count, qsize, bsize, csize );
-                    }
-                }
-                KDirectoryRelease( dir );
-            }
-        }
-        ArgsWhack ( args );
-    }
-
-    return rc;
-}
diff --git a/test/kapp/queuefile.data b/test/kapp/queuefile.data
deleted file mode 100644
index 25c5a0e..0000000
--- a/test/kapp/queuefile.data
+++ /dev/null
@@ -1,338 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <kapp/main.h>
-#include <kapp/args.h>
-#include <kapp/queue-file.h>
-
-#include <klib/out.h>
-#include <klib/rc.h>
-#include <klib/checksum.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-
-#include <sysalloc.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-
-#define OPTION_POS    "pos"
-#define ALIAS_POS     "p"
-
-#define OPTION_QSIZE  "qsize"
-#define ALIAS_QSIZE   "q"
-
-#define OPTION_BSIZE  "bsize"
-#define ALIAS_BSIZE   "b"
-
-#define OPTION_CSIZE  "csize"
-#define ALIAS_CSIZE   "c"
-
-#define OPTION_COUNT  "count"
-#define ALIAS_COUNT   "n"
-
-#define OPTION_POS2   "pos2"
-#define ALIAS_POS2    "2"
-
-static const char * pos_usage[]     = { "where to start reading", NULL };
-static const char * qsize_usage[]     = { "size of queue", NULL };
-static const char * bsize_usage[]     = { "block-size of queue", NULL };
-static const char * csize_usage[]     = { "chunk-size in loop", NULL };
-static const char * count_usage[]     = { "how much bytes total", NULL };
-static const char * pos2_usage[]     = { "2nd position to read at", NULL };
-
-OptDef QfileTestOptions[] =
-{
-/*    name             alias        fkt.  usage-txt,  cnt, needs value, required */
-    { OPTION_POS,      ALIAS_POS,   NULL, pos_usage,    1,   true,        false },
-    { OPTION_QSIZE,    ALIAS_QSIZE, NULL, qsize_usage,  1,   true,        false },
-    { OPTION_BSIZE,    ALIAS_BSIZE, NULL, bsize_usage,  1,   true,        false },
-    { OPTION_CSIZE,    ALIAS_CSIZE, NULL, csize_usage,  1,   true,        false },
-    { OPTION_COUNT,    ALIAS_COUNT, NULL, count_usage,  1,   true,        false },
-    { OPTION_POS2,     ALIAS_POS2,  NULL, pos2_usage,   1,   true,        false }
-};
-
-const char UsageDefaultName[] = "qfiletest";
-
-rc_t CC UsageSummary ( const char * progname )
-{
-    return KOutMsg ("\n"
-                    "Usage:\n"
-                    "  %s [options]\n"
-                    "\n", progname);
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    const char * progname = UsageDefaultName;
-    const char * fullpath = UsageDefaultName;
-    rc_t rc;
-
-    if ( args == NULL )
-        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
-    else
-        rc = ArgsProgram ( args, &fullpath, &progname );
-
-    if ( rc )
-        progname = fullpath = UsageDefaultName;
-
-    UsageSummary ( progname );
-
-    KOutMsg ( "Options:\n" );
-
-    HelpOptionLine ( ALIAS_POS,   OPTION_POS,   "pos",   pos_usage );
-    HelpOptionLine ( ALIAS_QSIZE, OPTION_QSIZE, "qsize", qsize_usage );
-    HelpOptionLine ( ALIAS_BSIZE, OPTION_BSIZE, "bsize", bsize_usage );
-    HelpOptionLine ( ALIAS_CSIZE, OPTION_CSIZE, "csize", csize_usage );
-    HelpOptionLine ( ALIAS_COUNT, OPTION_COUNT, "count", count_usage );
-    HelpOptionLine ( ALIAS_POS2,  OPTION_POS2,  "pos2",  pos2_usage );
-
-    HelpOptionsStandard ();
-    HelpVersion ( fullpath, KAppVersion() );
-    return rc;
-}
-
-
-/* Version  EXTERN
- *  return 4-part version code: 0xMMmmrrrr, where
- *      MM = major release
- *      mm = minor release
- *    rrrr = bug-fix release
- */
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-
-
-static uint64_t get_uint64_option( const Args *my_args,
-                                   const char *name,
-                                   const uint64_t def )
-{
-    uint32_t count;
-    uint64_t res = def;
-    rc_t rc = ArgsOptionCount( my_args, name, &count );
-    if ( ( rc == 0 )&&( count > 0 ) )
-    {
-        const char *s;
-        rc = ArgsOptionValue( my_args, name, 0,  (const void **)&s );
-        if ( rc == 0 ) res = strtoull( s, NULL, 10 );
-    }
-    return res;
-}
-
-static uint32_t get_uint32_option( const Args *my_args,
-                                   const char *name,
-                                   const uint32_t def )
-{
-    uint32_t count, res = def;
-    rc_t rc = ArgsOptionCount( my_args, name, &count );
-    if ( ( rc == 0 )&&( count > 0 ) )
-    {
-        const char *s;
-        rc = ArgsOptionValue( my_args, name, 0,  (const void **)&s );
-        if ( rc == 0 ) res = strtoul( s, NULL, 10 );
-    }
-    return res;
-}
-
-
-static rc_t read_loop( const KFile * f, const uint64_t a_pos, const uint64_t count,
-                       const size_t chunk_size, uint8_t digest [ 16 ] )
-{
-    rc_t rc = 0;
-    uint64_t pos = a_pos;
-    uint64_t n_bytes = 0;
-    size_t num_read = 1;
-    MD5State md5;
-
-    char * buffer = malloc( chunk_size );
-    if ( buffer == NULL )
-        return RC( rcExe, rcFile, rcPacking, rcMemory, rcExhausted );
-
-    MD5StateInit ( &md5 );
-    while ( rc == 0 && num_read > 0 )
-    {
-        size_t chunk = chunk_size;
-        
-        if ( ( count > 0 ) && ( ( n_bytes + chunk ) > count ) )
-        {
-            chunk = ( count - n_bytes );
-        }
-
-        OUTMSG(( "about to read from pos %lu\n", pos ));
-        rc = KFileRead ( f, pos, buffer, chunk, &num_read );
-        OUTMSG(( "returned from KFileRead rc = %R, num_read = %zu\n\n", rc, num_read ));
-        if ( rc == 0 && num_read > 0 )
-        {
-            MD5StateAppend ( &md5, buffer, num_read );
-            pos += num_read;
-            n_bytes += num_read;
-            if ( ( count > 0 ) && ( n_bytes >= count ) )
-            {
-                num_read = 0;
-            }
-        }
-    }
-    OUTMSG(( "%lu bytes read total\n", n_bytes ));
-    free( buffer );
-    MD5StateFinish ( &md5, digest );
-
-    return rc;
-}
-
-
-static void print_digest( uint8_t digest [ 16 ] )
-{
-    uint8_t i;
-
-    OUTMSG(( "md5-sum: " ));
-    for ( i = 0; i < 16; ++i )
-        OUTMSG(( "%.02x", digest[ i ] ));
-    OUTMSG(( "\n" ));
-}
-
-
-static rc_t perform_qtest( const KFile *f, const char * filename,
-                           const uint64_t pos, const uint64_t count,
-                           const size_t queue_size, const size_t block_size,
-                           const size_t chunk_size )
-{
-    const KFile * qf;
-    rc_t rc = KQueueFileMakeRead ( &qf, pos, f, queue_size, block_size );
-    if ( rc != 0 )
-    {
-        OUTMSG(( "KQueueFileMakeRead( '%s' ) failed: %R\n", filename, rc ));
-    }
-    else
-    {
-        uint8_t digest [ 16 ];
-        rc = read_loop( qf, pos, count, chunk_size, digest );
-        KFileRelease( qf );
-        print_digest( digest );
-    }
-    return rc;
-}
-
-
-static rc_t perform_test( const KDirectory *dir, const char * filename,
-                          const uint64_t pos, const uint64_t pos2,
-                          const uint64_t count, const size_t queue_size,
-                          const size_t block_size, const size_t chunk_size )
-{
-    const KFile * f;
-    rc_t rc = KDirectoryOpenFileRead ( dir, &f, filename );
-    if ( rc != 0 )
-    {
-        OUTMSG(( "KDirectoryOpenFileRead( '%s' ) failed: %R\n", filename, rc ));
-    }
-    else
-    {
-        rc = perform_qtest( f, filename, pos, count, queue_size, block_size, chunk_size );
-        if ( rc == 0 && pos2 > 0 )
-        {
-            rc = perform_qtest( f, filename, pos2, count, queue_size, block_size, chunk_size );
-        }
-        KFileRelease( f );
-    }
-    return rc;
-}
-
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args * args;
-
-    rc_t rc = ArgsMakeAndHandle ( &args, argc, argv, 1,
-                QfileTestOptions, sizeof ( QfileTestOptions ) / sizeof ( OptDef ) );
-    if ( rc != 0 )
-    {
-        OUTMSG(( "ArgsMakeAndHandle( ... ) failed: %R\n", rc ));
-    }
-    else
-    {
-        uint32_t arg_count = 0;
-        rc = ArgsParamCount ( args, &arg_count );
-        if ( rc != 0 )
-        {
-            OUTMSG(( "ArgsParamCount( ... ) failed: %R\n", rc ));
-        }
-        else
-        {
-            KDirectory *dir = NULL;
-            uint64_t position = get_uint64_option( args, OPTION_POS, 0 );
-            uint64_t count = get_uint64_option( args, OPTION_COUNT, 0 );
-            uint32_t qsize = get_uint32_option( args, OPTION_QSIZE, 1024 );
-            uint32_t bsize = get_uint32_option( args, OPTION_BSIZE, 0 );
-            uint32_t csize = get_uint32_option( args, OPTION_CSIZE, 1024 );
-            uint64_t pos2 = get_uint64_option( args, OPTION_POS2, 0 );
-
-            OUTMSG(( "start-position : %lu\n", position ));
-            if ( pos2 > 0 )
-            {
-                OUTMSG(( "2nd position   : %lu\n", pos2 ));
-            }
-            if ( count > 0 )
-            {
-                OUTMSG(( "count          : %lu\n", count ));
-            }
-            OUTMSG(( "queue-size     : %u\n",  qsize ));
-            OUTMSG(( "block-size     : %u\n",  bsize ));
-            OUTMSG(( "chunk-size     : %u\n",  csize ));
-
-            rc = KDirectoryNativeDir( &dir );
-            if ( rc != 0 )
-            {
-                OUTMSG(( "KDirectoryNativeDir( ... ) failed: %R\n", rc ));
-            }
-            else
-            {
-                uint32_t i;
-                for ( i = 0; i < arg_count && rc == 0; ++i )
-                {
-                    const char * filename;
-                    rc = ArgsParamValue ( args, i, (const void **)&filename );
-                    if ( rc != 0 )
-                    {
-                        OUTMSG(( "ArgsParamValue( %d ) failed: %R\n", i, rc ));
-                    }
-                    else
-                    {
-                        OUTMSG(( "file to read   : '%s'\n", filename ));
-                        rc = perform_test( dir, filename, position, pos2,
-                                           count, qsize, bsize, csize );
-                    }
-                }
-                KDirectoryRelease( dir );
-            }
-        }
-        ArgsWhack ( args );
-    }
-
-    return rc;
-}
diff --git a/test/kapp/report-kns-agent.c b/test/kapp/report-kns-agent.c
deleted file mode 100644
index 49eec09..0000000
--- a/test/kapp/report-kns-agent.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kapp/main.h>
-#include <kns/manager.h>
-
-#include <stdio.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x01020003;
-}
-
-rc_t CC UsageSummary ( const char *progname )
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args *args )
-{
-    return 0;
-}
-
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t rc;
-    const char * user_agent;
-
-    rc = KNSManagerGetUserAgent ( &user_agent );
-    if ( rc == 0 )
-        printf("%s\n", user_agent);
-
-    return rc;
-}
diff --git a/test/kapp/run-kns-agent.sh b/test/kapp/run-kns-agent.sh
deleted file mode 100755
index 4b45619..0000000
--- a/test/kapp/run-kns-agent.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-TOOL_PATH="$1"
-CREATE_PATH="$2" # a link will be created at that path and the tool will be executed via link
-EXPECTED_TOOL_NAME="$3"
-RUN_PATH="$4" # the tool will be executed via this path. when path is empty, CREATE_PATH is used instead
-
-if [ "$RUN_PATH" = "" ]; then
-	RUN_PATH=$CREATE_PATH
-fi
-
-CREATE_DIR=$(dirname "$CREATE_PATH")
-
-mkdir -p "$CREATE_DIR"
-if [ "$?" != "0" ] ; then
-    echo "cannot create $CREATE_DIR"
-    exit 1
-fi
-
-CMD="ln -fs $TOOL_PATH $CREATE_PATH"
-eval $CMD
-if [ "$?" != "0" ] ; then
-    echo "link creation failed"
-    exit 2
-fi
-
-USER_AGENT=$("$RUN_PATH")
-if [ "$?" != "0" ] ; then
-    echo "tool execution failed"
-    exit 3
-fi
-ACTUAL_TOOL_NAME=$(eval "echo $USER_AGENT | awk '{print \$3}'")
-
-if [ "$EXPECTED_TOOL_NAME" != "$ACTUAL_TOOL_NAME" ] ; then
-    echo "Agent tool name '$ACTUAL_TOOL_NAME' does not match expected '$EXPECTED_TOOL_NAME'"
-    exit 4
-fi
diff --git a/test/kapp/run-sig-core.sh b/test/kapp/run-sig-core.sh
deleted file mode 100755
index 2634a45..0000000
--- a/test/kapp/run-sig-core.sh
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/bin/bash
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-BINARY_PATH="$1"
-HOST_OS="$2"
-BUILD_TYPE="$3"
-
-SIGQUIT=3
-
-function killFromBackground ()
-{
-    PARENT_PID=$1
-    for I in 1 2 3 4 5
-    do
-        COMMAND="ps -ef|awk '\$3==${PARENT_PID} && \$8==\"${BINARY_PATH}\"  {print \$2}'"
-        eval PID=\`${COMMAND}\`
-        if [ "$PID" = "" ]; then
-            sleep 1
-        else
-            break
-        fi
-    done
-
-    if [ "$PID" != "" ]; then
-        kill -s $SIGQUIT $PID
-    fi
-
-    echo $PID > killed.pid
-}
-
-# Check the environment if core files can be generated
-if [ "$HOST_OS" = "mac" ]; then
-   if [ "`ulimit -c`" = "0" ] || [ "`/usr/sbin/sysctl -n kern.coredump`" != "1" ]; then
-       echo "Core files are disabled. Skipping core file tests"
-       exit 0
-   fi
-
-   if [ ! -d "/core" ]; then
-        echo "/core folder is missing - core files are disabled. Skipping core files tests"
-        exit 0
-   fi
-
-   CORE_FOLDER="/core/"
-elif [ "$HOST_OS" = "linux" ]; then
-   if [ "`ulimit -c`" = "0" ]; then
-       echo "Core files are disabled. Skipping core file tests"
-       exit 0
-   fi
-
-   if [ "`cat /proc/sys/kernel/core_pattern`" != "core" ]; then
-       echo "Unknown core file pattern" 1>&2
-       exit 2
-   fi
-   CORE_FOLDER="./"
-else
-   echo "Should be run from unix-compatible OS" 1>&2
-   exit 1
-fi
-
-# Bash overrides signals in child process if strarting
-# them in background. Lets start it normally and run
-# `kill` command in background.
-killFromBackground $$ &
-$BINARY_PATH 
-
-# Wait for `kill` job
-wait
-
-# Extract PID of binary that we killed
-BINARY_PID=`cat killed.pid`
-rm killed.pid
-
-CORE_FILE="${CORE_FOLDER}core.${BINARY_PID}"
-
-if [ "$BUILD_TYPE" = "dbg" ]; then
-   if [ -f $CORE_FILE ]; then
-       rm $CORE_FILE
-       echo "Success: Core file was generated and was removed"
-       exit 0
-   else
-       echo "Failed: No core file detected" 1>&2
-       exit 3
-   fi
-else
-   if [ -f $CORE_FILE ]; then
-       rm $CORE_FILE 
-       echo "Failed: Core file generated while shouldn't and was removed" 1>&2
-       exit 4
-    else
-       echo "Success: No core file detected"
-       exit 0
-    fi 
-fi
-
diff --git a/test/kapp/sig-core.c b/test/kapp/sig-core.c
deleted file mode 100644
index c1de00c..0000000
--- a/test/kapp/sig-core.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kapp/main.h>
-#include <kapp/args.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/rc.h>
-
-#include <assert.h>
-#include <stdio.h>
-#include <unistd.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "sig-core";
-
-rc_t CC UsageSummary ( const char *progname )
-{
-    return KOutMsg ( "\n"
-                     "Usage:\n"
-                     "  %s [Options]\n"
-                     "\n"
-                     "Summary:\n"
-                     "  Test core generation by killing it with signal.\n"
-		     "  The tool enter into infinite loop after start .\n"
-                     , progname
-        );
-}
-
-rc_t CC Usage ( const Args *args )
-{
-    const char * progname = UsageDefaultName;
-    const char * fullpath = UsageDefaultName;
-    rc_t rc;
-
-    if (args == NULL)
-        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
-    else
-        rc = ArgsProgram (args, &fullpath, &progname);
-    if (rc)
-        progname = fullpath = UsageDefaultName;
-
-    UsageSummary (progname);
-
-    KOutMsg ("Options:\n");
-
-    HelpOptionsStandard ();
-    HelpVersion ( fullpath, KAppVersion () );
-
-    return rc;
-}
-
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args *args;
-    rc_t rc;
-    do {
-        rc = ArgsMakeAndHandle ( & args, argc, argv, 0 );
-        if ( rc != 0 )
-        {
-            LogErr ( klogErr, rc, "failed to parse arguments" );
-            break;
-        }
-        
-        while ( true ) {
-            sleep ( 1000 );
-        }
-    } while (false);
-
-    ArgsWhack ( args );
-
-    return rc;
-}
diff --git a/test/kar/Makefile b/test/kar/Makefile
new file mode 100644
index 0000000..1745dfc
--- /dev/null
+++ b/test/kar/Makefile
@@ -0,0 +1,56 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/kar
+
+TEST_TOOLS = 
+
+include $(TOP)/build/Makefile.env
+
+$(TEST_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+runtests: kar_test 
+
+#-------------------------------------------------------------------------------
+# scripted tests
+#
+kar_test: kar-test.sh
+	@ echo "Starting kar tests..."
+	@ bash kar-test.sh $(BINDIR)/kar
+
+kar:
+	rm -rf actual
+	mkdir -p actual
+	$(BINDIR)/kar -c actual/1.0.kar -d input/1.0; $(BINDIR)/kar -t actual/1.0.kar >actual/1.0.stdout; diff expected/1.0.stdout actual/1.0.stdout
+	rm -rf actual
+	@ python $(TOP)/build/check-exit-code.py $(BINDIR)/kar
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
diff --git a/test/kar/acc.txt b/test/kar/acc.txt
new file mode 100644
index 0000000..5c539f2
--- /dev/null
+++ b/test/kar/acc.txt
@@ -0,0 +1,756 @@
+-454-sff-load(0.0.0)-T,SRR170845,T,454
+-454-sff-load(1.2.0)-T,ERR023140,T,454
+-454-sff-load(1.2.1)-T,SRR059129,T,454
+-454-sff-loader2(1.0.0)-T,SRR054445,T,454
+-ABSOLID-abi-load(1.0.0)-T,ERR023201,T,ABSOLID
+-ABSOLID-srf-load(1.0.20)-T,SRR064942,T,ABSOLID
+-ABSOLID-srf-load.1.2.7(1.2.7)-T,SRR064943,T,ABSOLID
+#all runs of this type are private: -ABSOLID-srf-loader(1.0.0)-T,ERR001624,T,ABSOLID
+-ABSOLID-srf-loader(1.0.16)-T,SRR022546,T,ABSOLID
+-ABSOLID-srf-loader(1.0.17)-T,SRR035261,T,ABSOLID
+-ABSOLID-srf-loader(1.0.18)-T,SRR037487,T,ABSOLID
+-ABSOLID-srf-loader(1.0.19)-T,SRR042790,T,ABSOLID
+-ILLUMINA-fastq-load(1.0.20)-T,DRR000720,T,ILLUMINA
+-ILLUMINA-fastq-load(1.2.12)-T,SRR116859,T,ILLUMINA
+-ILLUMINA-fastq-load(1.2.5)-T,SRR061422,T,ILLUMINA
+-ILLUMINA-fastq-load(1.2.6)-T,SRR070223,T,ILLUMINA
+-ILLUMINA-fastq-load(1.2.9)-T,SRR097428,T,ILLUMINA
+-ILLUMINA-fastq-load.1.2.5(0.0.0)-T,SRR060117,T,ILLUMINA
+#all runs of this type are private: -ILLUMINA-fastq-loader(1.0.18)-T,SRR035374,T,ILLUMINA
+-ILLUMINA-fastq-loader(1.0.19)-T,SRR042491,T,ILLUMINA
+-ILLUMINA-srf-load(1.0.0)-T,ERR029415,T,ILLUMINA
+-ILLUMINA-srf-load(1.2.12)-T,SRR111945,T,ILLUMINA
+-ILLUMINA-srf-load(1.2.8)-T,SRR074886,T,ILLUMINA
+-ILLUMINA-srf-load(1.2.9)-T,SRR139156,T,ILLUMINA
+-ILLUMINA-srf-loader(1.0.0)-T,ERR006438,T,ILLUMINA
+NCBI:SRA:ABI:tbl:v2#1-ABSOLID-abi-load(2.0.10)-T,SRR111922,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1-ABSOLID-abi-load(2.0.4)-T,ERR030907,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.3-ABSOLID-abi-load(2.1.6)-T,ERR057556,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.3-ABSOLID-srf-load(2.1.6)-T,SRR350985,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-(0.0.0)-T,SRR217435,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(1.0.0)-T,ERR029930,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(1.0.20)-T,SRR089693,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.0.10)-T,SRR192558,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.0.12)-T,ERR042390,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.0.13)-T,SRR204407,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.0.14)-T,SRR316179,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.0.4)-T,ERR034127,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.0.7)-T,SRR171266,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.0.8)-T,SRR122308,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.1.10)-T,SRR445714,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.1.11)-T,SRR449301,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.1.12)-T,SRR492068,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.1.13)-T,SRR500516,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.1.14)-T,SRR525280,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.1.16)-T,SRR527583,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.1.17)-T,ERR182858,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.1.18)-T,ERR015491,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.1.2)-T,DRR001233,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.1.7)-T,DRR001804,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.1.8)-T,ERR071081,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.1.9)-T,ERR147439,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.2.0)-T,ERR202403,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.2.2)-T,ERR426402,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.2.3)-T,SRR806209,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.3.1)-T,DRR017925,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.3.2)-T,ERR329996,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.3.3)-T,ERR321058,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.3.4)-T,ERR660625,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.3.5)-T,DRR031434,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load(2.4.2)-T,ERR964674,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load.2.3.5(2.3.5)-T,SRR1574808,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load.2.4.0(2.4.0)-T,SRR1584376,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load.2.4.1(2.4.1)-T,SRR1611170,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load.2.4.2(2.4.2)-T,SRR1752098,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load.2.4.3(2.4.3)-T,SRR1792532,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load.2.4.4(2.4.4)-T,SRR1826150,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load.2.4.5(2.4.5)-T,SRR2009387,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load.2.5.0(2.5.0)-T,SRR2032161,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load.2.5.1(2.5.1)-T,SRR2009469,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-load.2.5.2(2.5.2)-T,SRR2604583,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-loader(1.0.11)-T,SRR017232,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-loader(1.0.12)-T,SRR017902,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-loader(1.0.14)-T,SRR019624,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-loader(1.0.16)-T,SRR029494,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-loader(1.0.17)-T,SRR033650,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-abi-loader(1.0.19)-T,DRR000425,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(1.0.0)-T,ERR022067,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(1.0.20)-T,SRR066817,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(1.2.12)-T,SRR111917,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(1.2.8)-T,SRR072241,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(1.2.9)-T,SRR172826,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.0.10)-T,SRR190574,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.0.14)-T,SRR308194,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.0.2)-T,SRR057562,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.0.5)-T,SRR057563,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.0.8)-T,SRR171679,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.0.9)-T,SRR173012,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.1.10)-T,SRR444082,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.1.12)-T,SRR452972,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.1.14)-T,SRR515191,T,ABSOLID
+#all runs of this type are private: NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.1.16)-T,ERR031050,T,ABSOLID
+#all runs of this type are private: NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.1.17)-T,ERR031052,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.1.18)-T,SRR578343,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.1.7)-T,SRR360387,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.1.8)-T,SRR389180,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.1.9)-T,ERR136940,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.2.2)-T,ERR271693,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.2.3)-T,SRR797892,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.3.2)-T,ERR107277,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load(2.3.3)-T,ERR032981,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load.1.2.7(1.2.7)-T,SRR064941,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-load.2.3.5(2.3.5)-T,ERR034813,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-loader(1.0.0)-T,ERR002797,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-loader(1.0.12)-T,SRR017528,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-loader(1.0.14)-T,SRR016407,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-loader(1.0.15)-T,SRR023628,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-loader(1.0.16)-T,SRR027914,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-loader(1.0.17)-T,SRR036757,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-loader(1.0.18)-T,SRR037163,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-loader(1.0.19)-T,SRR049684,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-loader(1.0.5)-T,SRR013122,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-loader(1.0.7)-T,SRR014962,T,ABSOLID
+NCBI:SRA:ABI:tbl:v2#1.0.4-ABSOLID-srf-loader(1.0.9)-T,SRR011686,T,ABSOLID
+NCBI:SRA:CG:tbl:fastq#1-COMPLETE_GENOMICS-(0.0.0)-T,SRR072706,T,COMPLETE_GENOMICS
+NCBI:SRA:Helicos:tbl:v2#1-HELICOS-helicos-load(2.0.2)-T,SRR020175,T,HELICOS
+#all runs of this type are private: NCBI:SRA:Helicos:tbl:v2#1-HELICOS-helicos-load(2.0.4)-T,DRR000947,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.3-HELICOS-helicos-load(2.1.6)-T,SRR346126,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.0.10)-T,SRR182422,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.0.13)-T,SRR203495,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.0.14)-T,SRR316183,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.0.2)-T,SRR051918,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.0.4)-T,DRR000965,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.0.6)-T,SRR099372,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.0.7)-T,SRR133639,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.1.10)-T,SRR442058,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.1.12)-T,SRR452966,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.1.14)-T,SRR514051,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.1.17)-T,SRR543533,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.1.18)-T,SRR621477,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.1.7)-T,DRR002075,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.1.8)-T,SRR389805,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.2.3)-T,SRR643530,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.3.1)-T,DRR013752,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.3.2)-T,SRR1002954,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.3.3)-T,SRR1041831,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.3.4)-T,SRR1143403,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load(2.3.5)-T,DRR018325,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load.2.3.5(2.3.5)-T,SRR1557952,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load.2.4.2(2.4.2)-T,SRR1732726,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load.2.4.3(2.4.3)-T,SRR1776516,T,HELICOS
+NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load.2.4.4(2.4.4)-T,SRR1810117,T,HELICOS
+#all runs of this type are private: NCBI:SRA:Helicos:tbl:v2#1.0.4-HELICOS-helicos-load.2.5.2(2.5.2)-T,SRR2123712,T,HELICOS
+NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-(0.0.0)-T,ERR037327,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-fastq-load(2.0.10)-T,SRR061126,T,ILLUMINA
+#all runs of this type are private:NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-fastq-load(2.0.13)-T,SRR207070,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-fastq-load(2.0.14)-T,SRR222486,T,ILLUMINA
+#all runs of this type are private: NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-fastq-load(2.0.15)-T,SRR222563,T,ILLUMINA
+#all runs of this type are private: NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-fastq-load(2.0.16)-T,SRR222544,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-fastq-load(2.0.7)-T,SRR166829,T,ILLUMINA
+#all runs of this type are private: NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-fastq-load(2.0.9)-T,SRR112725,T,ILLUMINA
+#all runs of this type are private: NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-illumina-load(2.0.10)-T,SRR112722,T,ILLUMINA
+#all runs of this type are private: NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-illumina-load(2.0.13)-T,SRR074174,T,ILLUMINA
+#all runs of this type are private: NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-illumina-load(2.0.15)-T,SRR074176,T,ILLUMINA
+#all runs of this type are private: NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-illumina-load(2.0.8)-T,SRR074172,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-srf-load(2.0.10)-T,SRR189815,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-srf-load(2.0.14)-T,SRR315558,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-srf-load(2.0.2)-T,SRR090423,T,ILLUMINA
+#all runs of this type are private: NCBI:SRA:Illumina:tbl:phred:v2#1-ILLUMINA-srf-load(2.0.7)-T,SRR112721,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1-UNDEFINED-(0.0.0)-T,ERR005089,T,UNDEFINED
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.2-ILLUMINA-fastq-load(2.1.0)-T,SRR341919,T,ILLUMINA
+#all runs of this type are private: NCBI:SRA:Illumina:tbl:phred:v2#1.0.2-ILLUMINA-srf-load(2.1.2)-T,SRR329669,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.3-ILLUMINA-fastq-load(2.1.3)-T,ERR022479,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.3-ILLUMINA-fastq-load(2.1.6)-T,ERR056367,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.3-ILLUMINA-illumina-load(2.1.6)-T,SRR353581,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.3-ILLUMINA-srf-load(2.1.6)-T,ERR055396,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.3-UNDEFINED-(0.0.0)-T,ERR056977,T,UNDEFINED
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-(0.0.0)-T,ERR039506,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(1.0.0)-T,ERR022980,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(1.0.20)-T,DRR000719,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(1.2.12)-T,SRR122250,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(1.2.5)-T,DRR000599,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(1.2.6)-T,DRR000600,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(1.2.9)-T,DRR000183,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.0.10)-T,SRR203064,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.0.12)-T,ERR016388,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.0.13)-T,SRR210917,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.0.14)-T,SRR223486,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.0.15)-T,SRR222572,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.0.16)-T,SRR316687,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.0.2)-T,SRR100283,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.0.5)-T,SRR149193,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.0.7)-T,SRR171281,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.0.8)-T,SRR172867,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.0.9)-T,SRR173087,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.1.0)-T,SRR342601,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.1.10)-T,SRR413527,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.1.11)-T,DRR000184,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.1.12)-T,SRR449307,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.1.13)-T,DRR002381,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.1.14)-T,SRR500734,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.1.15)-T,SRR524806,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.1.17)-T,DRR002425,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.1.18)-T,ERR197925,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.1.19)-T,SRR636603,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.1.2)-T,SRR329488,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.1.6)-T,SRR352029,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.1.7)-T,DRR002161,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.1.8)-T,ERR069563,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.1.9)-T,ERR161565,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.2.0)-T,ERR209685,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.2.1)-T,SRR642751,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.2.2)-T,ERR431471,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.2.3)-T,ERR062333,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.3.1)-T,DRR016800,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.3.2)-T,ERR234231,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.3.3)-T,ERR348421,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.3.4)-T,ERR665060,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.3.5)-T,DRR046906,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load(2.4.2)-T,ERR995409,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load.2.2.3(2.2.3)-T,SRR2054695,T,ILLUMINA
+#all runs of this type are private: NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load.2.3.4(2.3.4)-T,SRR976375,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load.2.3.5(2.3.5)-T,SRR1576091,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load.2.4.0(2.4.0)-T,SRR1593278,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load.2.4.1(2.4.1)-T,SRR1612549,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load.2.4.2(2.4.2)-T,SRR1633898,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load.2.4.2-2(2.4.2)-T,SRR1757773,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load.2.4.3(2.4.3)-T,SRR1796487,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load.2.4.4(2.4.4)-T,SRR1873559,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load.2.4.5(2.4.5)-T,SRR2015829,T,ILLUMINA
+#all runs of this type are private (12551 runs!) : NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load.2.5.0(2.5.0)-T,ERR668737,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load.2.5.1(2.5.1)-T,ERR943220,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-load.2.5.2(2.5.2)-T,ERR966616,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-loader(1.0.0)-T,ERR012002,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-loader(1.0.10)-T,SRR016855,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-loader(1.0.14)-T,DRR000030,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-loader(1.0.15)-T,DRR000092,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-loader(1.0.16)-T,DRR000116,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-loader(1.0.17)-T,DRR000149,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-loader(1.0.18)-T,DRR000348,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-loader(1.0.19)-T,DRR000431,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-loader(1.0.6)-T,SRR016113,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-loader(1.0.7)-T,SRR016404,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-loader(1.0.8)-T,SRR016673,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-fastq-loader(1.0.9)-T,SRR016689,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(1.0.20)-T,SRR059729,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.0.10)-T,SRR196233,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.0.12)-T,DRR001166,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.0.13)-T,SRR210843,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.0.15)-T,SRR315151,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.0.5)-T,SRR068545,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.0.7)-T,SRR094665,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.1.10)-T,SRR446875,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.1.12)-T,SRR490661,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.1.13)-T,SRR500487,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.1.14)-T,SRR521268,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.1.16)-T,SRR526944,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.1.17)-T,SRR546125,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.1.18)-T,ERR011433,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.1.2)-T,SRR343009,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.1.7)-T,SRR364792,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.1.8)-T,SRR400034,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.1.9)-T,SRR402371,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.2.3)-T,SRR807436,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.3.2)-T,ERR029142,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.3.3)-T,SRR1043688,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.3.4)-T,SRR1168348,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load(2.3.5)-T,SRR1200459,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load.2.3.5(2.3.5)-T,SRR1573735,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load.2.4.0(2.4.0)-T,SRR1585483,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load.2.4.1(2.4.1)-T,SRR1610241,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load.2.4.2(2.4.2)-T,SRR1743391,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load.2.4.3(2.4.3)-T,SRR1793912,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load.2.4.4(2.4.4)-T,SRR1848960,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load.2.4.5(2.4.5)-T,SRR1999299,T,ILLUMINA
+#all runs of this type are private: NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load.2.5.0(2.5.0)-T,SRR2002782,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load.2.5.1(2.5.1)-T,SRR2080517,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-load.2.5.2(2.5.2)-T,SRR2571529,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-loader(1.0.16)-T,DRR000086,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-loader(1.0.17)-T,SRR036730,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-loader(1.0.18)-T,DRR000357,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-illumina-loader(1.0.19)-T,DRR000385,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(1.0.0)-T,ERR029908,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(1.0.20)-T,DRR000852,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(1.2.12)-T,SRR122317,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(1.2.8)-T,SRR074903,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(1.2.9)-T,SRR172842,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.0.10)-T,SRR201982,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.0.12)-T,ERR043309,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.0.13)-T,SRR210866,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.0.14)-T,SRR316174,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.0.2)-T,SRR097423,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.0.4)-T,ERR034168,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.0.5)-T,SRR097541,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.0.7)-T,SRR103712,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.0.8)-T,SRR172843,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.0.9)-T,SRR125283,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.1.10)-T,SRR447701,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.1.11)-T,SRR449319,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.1.12)-T,SRR492480,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.1.13)-T,SRR499899,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.1.14)-T,ERR027766,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.1.16)-T,ERR030402,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.1.17)-T,SRR539338,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.1.18)-T,ERR039256,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.1.2)-T,SRR342314,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.1.7)-T,DRR002371,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.1.8)-T,SRR400432,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.1.9)-T,ERR159680,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.2.2)-T,ERR091574,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.2.3)-T,ERR174377,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.3.1)-T,DRR016723,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.3.2)-T,ERR009051,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.3.3)-T,ERR032238,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.3.4)-T,ERR034047,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load(2.3.5)-T,DRR034607,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load.2.3.5(2.3.5)-T,SRR1572157,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load.2.4.2(2.4.2)-T,SRR1618793,T,ILLUMINA
+#all runs of this type are private: NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-load.2.4.5(2.4.5)-T,SRR1916926,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-loader(1.0.0)-T,ERR012497,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-loader(1.0.10)-T,SRR017210,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-loader(1.0.11)-T,SRR017391,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-loader(1.0.12)-T,SRR018036,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-loader(1.0.14)-T,SRR019655,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-loader(1.0.15)-T,SRR026434,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-loader(1.0.16)-T,SRR029673,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-loader(1.0.17)-T,SRR035652,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-loader(1.0.18)-T,SRR037496,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-loader(1.0.19)-T,DRR000437,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-loader(1.0.8)-T,SRR016773,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-ILLUMINA-srf-loader(1.0.9)-T,SRR016774,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-UNDEFINED-(0.0.0)-T,ERR558193,T,UNDEFINED
+NCBI:SRA:Illumina:tbl:phred:v2#1.0.4-UNDEFINED--(0.0.0)-T,ERR997444,T,UNDEFINED
+NCBI:SRA:Illumina:tbl:q1:v2#1-ILLUMINA-(0.0.0)-T,ERR029914,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1-ILLUMINA-fastq-load(2.0.10)-T,SRR197986,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1-ILLUMINA-fastq-load(2.0.12)-T,DRR001464,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1-ILLUMINA-fastq-load(2.0.13)-T,SRR211280,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1-ILLUMINA-fastq-load(2.0.14)-T,SRR218100,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1-ILLUMINA-fastq-load(2.0.16)-T,SRR316299,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1-ILLUMINA-fastq-load(2.0.2)-T,SRR122262,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1-ILLUMINA-fastq-load(2.0.5)-T,SRR124179,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1-ILLUMINA-fastq-load(2.0.7)-T,SRR171600,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1-ILLUMINA-fastq-load(2.0.8)-T,SRR171660,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1-ILLUMINA-fastq-load(2.0.9)-T,SRR133640,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1-UNDEFINED-(0.0.0)-T,ERR005103,T,UNDEFINED
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.1-ILLUMINA-(0.0.0)-T,SRR189060,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.2-ILLUMINA-fastq-load(2.0.16)-T,SRR316298,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.2-ILLUMINA-fastq-load(2.1.0)-T,SRR342244,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.2-ILLUMINA-fastq-load(2.1.2)-T,SRR328463,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.3-ILLUMINA-fastq-load(2.1.6)-T,ERR035782,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.3-UNDEFINED-(0.0.0)-T,ERR054653,T,UNDEFINED
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-(0.0.0)-T,SRR333073,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.0.10)-T,SRR188204,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.0.16)-T,SRR290598,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.0.8)-T,SRR124187,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.1.10)-T,SRR408990,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.1.11)-T,SRR447749,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.1.12)-T,SRR449290,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.1.13)-T,SRR458497,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.1.14)-T,SRR499708,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.1.15)-T,SRR520470,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.1.18)-T,DRR003752,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.1.19)-T,SRR628281,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.1.6)-T,SRR346717,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.1.7)-T,SRR364492,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.1.8)-T,SRR400044,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.1.9)-T,SRR403299,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.2.1)-T,SRR642643,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.2.2)-T,ERR364417,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.2.3)-T,SRR770352,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.3.2)-T,SRR943042,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.3.3)-T,SRR1028161,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.3.4)-T,ERR455050,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load(2.3.5)-T,SRR1168260,T,ILLUMINA
+#all runs of this type are private: NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-ILLUMINA-fastq-load.2.3.5(2.3.5)-T,SRR1564142,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.0.4-UNDEFINED-(0.0.0)-T,ERR246328,T,UNDEFINED
+NCBI:SRA:Illumina:tbl:q1:v2#1.1-ILLUMINA-fastq-load.2.5.2(2.5.2)-T,SRR2351394,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q1:v2#1.1-UNDEFINED--(0.0.0)-T,ERR932647,T,UNDEFINED
+NCBI:SRA:Illumina:tbl:q4:v2#1-ILLUMINA-illumina-load(2.0.10)-T,SRR191722,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1-ILLUMINA-illumina-load(2.0.12)-T,SRR203399,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1-ILLUMINA-illumina-load(2.0.13)-T,SRR203398,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1-ILLUMINA-srf-load(2.0.10)-T,SRR191899,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1-ILLUMINA-srf-load(2.0.12)-T,ERR029934,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1-ILLUMINA-srf-load(2.0.13)-T,SRR210919,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1-ILLUMINA-srf-load(2.0.14)-T,SRR314702,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1-ILLUMINA-srf-load(2.0.2)-T,SRR088665,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1-ILLUMINA-srf-load(2.0.8)-T,SRR030701,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.2-ILLUMINA-srf-load(2.1.2)-T,SRR340085,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.3-ILLUMINA-illumina-load(2.1.6)-T,SRR349671,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.3-ILLUMINA-srf-load(2.1.6)-T,SRR352226,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-illumina-load(2.1.10)-T,SRR448116,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-illumina-load(2.1.12)-T,SRR488773,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-illumina-load(2.1.13)-T,SRR493780,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-illumina-load(2.1.17)-T,SRR535749,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-illumina-load(2.1.7)-T,SRR358621,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-illumina-load(2.1.9)-T,SRR398608,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-illumina-load(2.3.2)-T,SRR922614,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-illumina-load(2.3.3)-T,SRR954969,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-illumina-load(2.3.4)-T,SRR1146683,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-illumina-load.2.3.5(2.3.5)-T,SRR1407910,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-srf-load(2.1.10)-T,SRR413422,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-srf-load(2.1.12)-T,SRR452497,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-srf-load(2.1.14)-T,SRR515921,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-srf-load(2.1.17)-T,SRR546566,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-srf-load(2.1.18)-T,ERR009041,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-srf-load(2.1.7)-T,DRR001883,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-srf-load(2.1.8)-T,SRR398639,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-srf-load(2.1.9)-T,SRR402916,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-srf-load(2.2.3)-T,SRR770571,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-srf-load(2.3.2)-T,ERR009036,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-srf-load(2.3.4)-T,ERR008638,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.0.4-ILLUMINA-srf-load.2.3.5(2.3.5)-T,SRR029224,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.1-ILLUMINA-illumina-load.2.5.2(2.5.2)-T,SRR2162766,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:q4:v2#1.1-ILLUMINA-srf-load.2.5.0(2.5.0)-T,SRR1920251,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:v2#1.0.4-ILLUMINA-(0.0.0)-T,SRR000842,T,ILLUMINA
+NCBI:SRA:Illumina:tbl:v2#1.0.4-ILLUMINA-srf-loader(1.0.0)-T,ERR008867,T,ILLUMINA
+NCBI:SRA:IonTorrent:tbl:v2#1.0.2-ION_TORRENT-sff-load(2.1.0)-T,SRR329501,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load(2.1.13)-T,SRR490154,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load(2.1.15)-T,SRR518512,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load(2.1.17)-T,SRR522850,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load(2.1.18)-T,DRR003960,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load(2.1.19)-T,SRR630872,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load(2.2.3)-T,SRR802359,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load(2.3.1)-T,DRR017979,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load(2.3.2)-T,SRR988538,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load(2.3.3)-T,SRR1043572,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load(2.3.4)-T,SRR1171639,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load(2.3.5)-T,DRR034561,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load(2.4.2)-T,ERR979094,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load.2.3.5(2.3.5)-T,SRR1569014,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load.2.4.0(2.4.0)-T,SRR1586608,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load.2.4.1(2.4.1)-T,SRR1609129,T,ION_TORRENT
+#all runs of this type are private: NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load.2.4.2-2(2.4.2)-T,SRR1737219,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load.2.4.4(2.4.4)-T,SRR1836013,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load.2.4.5(2.4.5)-T,SRR1954993,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-fastq-load.2.5.2(2.5.2)-T,SRR2218460,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.1.10)-T,SRR446826,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.1.12)-T,SRR488826,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.1.13)-T,SRR495202,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.1.17)-T,DRR003303,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.1.18)-T,ERR161543,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.1.7)-T,SRR329497,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.1.8)-T,SRR389194,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.1.9)-T,SRR402854,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.2.2)-T,ERR319091,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.2.3)-T,SRR788730,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.3.1)-T,DRR017924,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.3.2)-T,SRR1002633,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.3.3)-T,SRR1043577,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.3.4)-T,ERR574422,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.3.5)-T,DRR044367,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load(2.4.2)-T,ERR866477,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load.2.3.5(2.3.5)-T,SRR1575317,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load.2.4.2(2.4.2)-T,SRR1748018,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load.2.4.3(2.4.3)-T,SRR1796210,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load.2.4.4(2.4.4)-T,SRR1818320,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load.2.4.5(2.4.5)-T,SRR2014557,T,ION_TORRENT
+NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load.2.5.1(2.5.1)-T,SRR2069650,T,ION_TORRENT
+#all runs of this type are private: NCBI:SRA:IonTorrent:tbl:v2#1.0.3-ION_TORRENT-sff-load.2.5.2(2.5.2)-T,SRR2529521,T,ION_TORRENT
+NCBI:SRA:Nanopore:db#1-OXFORD_NANOPORE-general-loader(2.5.4)-D,ERR968961,D,OXFORD_NANOPORE
+NCBI:SRA:PacBio:smrt:db#1-PACBIO_SMRT-(0.0.0)-D,SRR353493,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1-PACBIO_SMRT-pacbio-load(2.1.8)-D,SRR387217,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load(2.1.10)-D,SRR448138,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load(2.1.12)-D,SRR458511,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load(2.1.13)-D,SRR500650,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load(2.1.14)-D,SRR517973,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load(2.1.17)-D,SRR534091,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load(2.1.18)-D,ERR160066,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load(2.1.8)-D,SRR389290,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load(2.1.9)-D,SRR387289,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load(2.2.3)-D,SRR811963,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load(2.3.2)-D,SRR1003009,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load(2.3.3)-D,SRR1003644,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load(2.3.5)-D,DRR034928,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load.2.3.5(2.3.5)-D,SRR1514774,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load.2.4.1(2.4.1)-D,SRR1754811,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load.2.4.3(2.4.3)-D,ERR599182,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load.2.4.4(2.4.4)-D,ERR772474,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load.2.4.5(2.4.5)-D,ERR871715,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load.2.5.0(2.5.0)-D,ERR904395,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load.2.5.1(2.5.1)-D,ERR956962,D,PACBIO_SMRT
+NCBI:SRA:PacBio:smrt:db#1.0.1-PACBIO_SMRT-pacbio-load.2.5.2(2.5.2)-D,ERR976792,D,PACBIO_SMRT
+NCBI:SRA:_454_:tbl:v2#1-454-sff-load(2.0.10)-T,SRR201949,T,454
+NCBI:SRA:_454_:tbl:v2#1-454-sff-load(2.0.13)-T,SRR210878,T,454
+NCBI:SRA:_454_:tbl:v2#1-454-sff-load(2.0.14)-T,SRR292210,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.5-454-sff-load(2.1.2)-T,SRR333138,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.6-454-fastq-load(2.1.6)-T,ERR039829,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.6-454-sff-load(2.1.0)-T,SRR353543,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.6-454-sff-load(2.1.6)-T,DRR001607,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-(0.0.0)-T,DRR000345,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.0.10)-T,SRR189081,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.0.13)-T,SRR208304,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.0.16)-T,SRR307780,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.0.2)-T,SRR124144,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.0.5)-T,SRR099221,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.0.7)-T,SRR134394,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.0.8)-T,SRR171665,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.0.9)-T,SRR176508,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.1.10)-T,SRR408050,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.1.11)-T,SRR446299,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.1.13)-T,SRR491408,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.1.14)-T,SRR498453,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.1.15)-T,SRR520997,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.1.17)-T,SRR527811,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.1.18)-T,ERR171548,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.1.19)-T,SRR633538,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.1.2)-T,SRR326939,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.1.7)-T,SRR385745,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.1.8)-T,SRR397936,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.1.9)-T,SRR403902,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.2.0)-T,ERR204765,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.2.2)-T,ERR327894,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.2.3)-T,SRR822313,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.3.1)-T,DRR016801,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.3.2)-T,SRR1002600,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.3.3)-T,SRR1043059,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.3.4)-T,SRR1171851,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.3.5)-T,DRR046617,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load(2.4.2)-T,ERR978987,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load.2.3.5(2.3.5)-T,SRR1574968,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load.2.4.0(2.4.0)-T,SRR1592904,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load.2.4.1(2.4.1)-T,SRR1612401,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load.2.4.2(2.4.2)-T,SRR1619688,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load.2.4.2-2(2.4.2)-T,SRR1752133,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load.2.4.3(2.4.3)-T,SRR1752124,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load.2.4.4(2.4.4)-T,SRR1806724,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load.2.4.5(2.4.5)-T,SRR2009611,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load.2.5.0(2.5.0)-T,SRR2048979,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load.2.5.1(2.5.1)-T,SRR2057819,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-fastq-load.2.5.2(2.5.2)-T,SRR2581216,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(0.0.0)-T,DRR000586,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(1.2.0)-T,ERR015938,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(1.2.1)-T,SRR059268,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.0.10)-T,SRR202954,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.0.12)-T,DRR001557,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.0.13)-T,SRR212417,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.0.14)-T,SRR316686,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.0.3)-T,SRR149178,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.0.4)-T,SRR142729,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.0.5)-T,SRR156345,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.0.7)-T,SRR167727,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.0.8)-T,SRR171298,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.0.9)-T,SRR174891,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.1.0)-T,DRR002366,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.1.10)-T,SRR448936,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.1.11)-T,SRR449080,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.1.12)-T,SRR492852,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.1.13)-T,SRR500658,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.1.14)-T,SRR525235,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.1.16)-T,DRR002386,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.1.17)-T,ERR198676,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.1.18)-T,SRR636596,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.1.2)-T,DRR001368,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.1.6)-T,SRR350327,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.1.7)-T,DRR001728,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.1.8)-T,SRR400435,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.1.9)-T,SRR404102,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.2.0)-T,ERR209054,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.2.2)-T,ERR430966,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.2.3)-T,ERR023134,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.3.1)-T,DRR016802,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.3.2)-T,ERR344830,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.3.3)-T,ERR139684,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.3.4)-T,ERR664799,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.3.5)-T,DRR046428,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load(2.4.2)-T,ERR995354,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load.2.3.5(2.3.5)-T,SRR1575394,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load.2.4.0(2.4.0)-T,SRR1592716,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load.2.4.1(2.4.1)-T,SRR1611914,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load.2.4.2(2.4.2)-T,SRR1752597,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load.2.4.3(2.4.3)-T,SRR1793659,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load.2.4.4(2.4.4)-T,SRR1839343,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load.2.4.5(2.4.5)-T,ERR768594,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load.2.5.0(2.5.0)-T,ERR768593,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load.2.5.1(2.5.1)-T,SRR2097334,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-load.2.5.2(2.5.2)-T,ERR768591,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-loader(1.0.18)-T,SRR031989,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-loader2(1.0.0)-T,DRR000421,T,454
+NCBI:SRA:_454_:tbl:v2#1.0.7-454-sff-loader2(1.2.1)-T,SRR053769,T,454
+NCBI:align:db:alignment_evidence_sorted#1-orm-cg-load(2.2.0)-D,SRR576646,D,orm,NC_000002.11:20001-20011
+#all runs of this type are private: NCBI:align:db:alignment_evidence_sorted#1-orm-cg-load(2.2.1)-D,SRR576697,D,orm,NC_000001.10:15001-15011
+NCBI:align:db:alignment_evidence_sorted#1-orm-cg-load(2.3.1)-D,SRR834935,D,orm,NC_000001.10:15001-15011
+NCBI:align:db:alignment_evidence_sorted#1-orm-cg-load(2.3.2)-D,SRR849254,D,orm,NC_000004.11:20001-20011
+NCBI:align:db:alignment_evidence_sorted#1.0.1-orm-cg-load(2.3.1)-D,SRR800317,D,orm,NC_000005.9:20001-20011
+NCBI:align:db:alignment_evidence_sorted#1.0.1-orm-cg-load.2.3.5(2.3.5)-D,SRR1186270,D,orm,NC_000001.10:15001-15011
+#all runs of this type are private: NCBI:align:db:alignment_evidence_sorted#1.2-COMPLETE_GENOMICS-cg-load.2.4.5-5(2.4.5)-D,SRR1745774,D,COMPLETE_GENOMICS,NC_000006.11:150001-150011
+#all runs of this type are private: NCBI:align:db:alignment_evidence_sorted#1.2-COMPLETE_GENOMICS-cg-load.2.5.0(2.5.0)-D,SRR2048475,D,COMPLETE_GENOMICS,chr19:60062-60099
+#all runs of this type are private: NCBI:align:db:alignment_evidence_sorted#1.2-COMPLETE_GENOMICS-cg-load.2.5.1(2.5.1)-D,SRR2070515,D,COMPLETE_GENOMICS,NC_000001.10:25001-25011
+NCBI:align:db:alignment_sorted#1.1-ILLUMINA-bam-load(2.1.13)-D,SRR403996,D,ILLUMINA,supercontig_1.1:1-5000
+NCBI:align:db:alignment_sorted#1.1-ILLUMINA-bam-load(2.1.14)-D,SRR497603,D,ILLUMINA,gi|51973633|gb|CP000001.1|:250001-250010
+NCBI:align:db:alignment_sorted#1.1-UNDEFINED-bam-load(2.1.10)-D,SRR403878,D,UNDEFINED,AE003852.1:2454-2463
+NCBI:align:db:alignment_sorted#1.1-UNDEFINED-bam-load(2.1.11)-D,SRR448741,D,UNDEFINED,1:121485001-121485010
+NCBI:align:db:alignment_sorted#1.1-UNDEFINED-bam-load(2.1.13)-D,SRR489721,D,UNDEFINED,chr1:3516602-3525782
+NCBI:align:db:alignment_sorted#1.1-UNDEFINED-bam-load(2.1.14)-D,SRR413284,D,UNDEFINED,FLT3_NM_004119.2:2366-2433
+NCBI:align:db:alignment_sorted#1.1-UNDEFINED-bam-load(2.1.8)-D,SRR389317,D,UNDEFINED,NC_000001.10:30001-35000
+NCBI:align:db:alignment_sorted#1.1-UNDEFINED-bam-load(2.1.9)-D,SRR399287,D,UNDEFINED,1:152185501-152185510
+NCBI:align:db:alignment_sorted#1.2-ABSOLID-bam-load(2.1.22)-D,SRR620424,D,ABSOLID,chr5:23562556-23562566
+NCBI:align:db:alignment_sorted#1.2-ABSOLID-bam-load(2.2.3)-D,ERR069107,D,ABSOLID,chr1:121185001-121185010
+NCBI:align:db:alignment_sorted#1.2-COMPLETE_GENOMICS-bam-load(2.1.22)-D,SRR556761,D,COMPLETE_GENOMICS,CM000663.1:15001-15011
+NCBI:align:db:alignment_sorted#1.2-ILLUMINA-bam-load(2.1.16)-D,SRR501069,D,ILLUMINA,gi|169794206|ref|NC_010410.1|:15001-20000
+NCBI:align:db:alignment_sorted#1.2-ILLUMINA-bam-load(2.1.17)-D,SRR522246,D,ILLUMINA,0:5001-5011
+NCBI:align:db:alignment_sorted#1.2-ILLUMINA-bam-load(2.1.18)-D,SRR515196,D,ILLUMINA,MITO:1-5000
+NCBI:align:db:alignment_sorted#1.2-ILLUMINA-bam-load(2.1.19)-D,SRR514629,D,ILLUMINA,scaffold00001:15001-20000
+NCBI:align:db:alignment_sorted#1.2-ILLUMINA-bam-load(2.1.20)-D,SRR536876,D,ILLUMINA,NC_000001.10:152280001-152280011
+NCBI:align:db:alignment_sorted#1.2-ILLUMINA-bam-load(2.1.21)-D,SRR514297,D,ILLUMINA,AE014134.5:5001-5011
+NCBI:align:db:alignment_sorted#1.2-ILLUMINA-bam-load(2.1.22)-D,ERR208922,D,ILLUMINA,NC_000001.10:565001-570000
+NCBI:align:db:alignment_sorted#1.2-ILLUMINA-bam-load(2.2.1)-D,SRR643441,D,ILLUMINA,ecoli_K12_MG12655:10001-10011
+NCBI:align:db:alignment_sorted#1.2-ILLUMINA-bam-load(2.2.3)-D,SRR515556,D,ILLUMINA,Contig7124:10001-10011
+NCBI:align:db:alignment_sorted#1.2-ILLUMINA-latf-load(2.3.1)-D,SRR749062,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.2-ION_TORRENT-bam-load(2.1.17)-D,SRR515965,D,ION_TORRENT
+NCBI:align:db:alignment_sorted#1.2-ION_TORRENT-bam-load(2.1.22)-D,SRR620446,D,ION_TORRENT
+NCBI:align:db:alignment_sorted#1.2-UNDEFINED-bam-load(2.1.16)-D,SRR408241,D,UNDEFINED,P_bra_lrc182:5001-5011
+NCBI:align:db:alignment_sorted#1.2-UNDEFINED-bam-load(2.1.17)-D,SRR521953,D,UNDEFINED,NC_000001.9:1560001-1565000
+NCBI:align:db:alignment_sorted#1.2-UNDEFINED-bam-load(2.1.18)-D,SRR497623,D,UNDEFINED,AL111168.1:220001-225000
+NCBI:align:db:alignment_sorted#1.2-UNDEFINED-bam-load(2.1.19)-D,SRR543323,D,UNDEFINED,NC_000067.5:103410001-103415000
+NCBI:align:db:alignment_sorted#1.2-UNDEFINED-bam-load(2.1.20)-D,SRR527121,D,UNDEFINED,NC_000067.5:3190001-3190011
+#all runs in this class produce a core-dump: NCBI:align:db:alignment_sorted#1.2-UNDEFINED-bam-load(2.1.21)-D,SRR547593,D,UNDEFINED
+NCBI:align:db:alignment_sorted#1.2-UNDEFINED-bam-load(2.1.22)-D,ERR194152,D,UNDEFINED,NC_001807.4:1-11
+NCBI:align:db:alignment_sorted#1.2-UNDEFINED-bam-load(2.2.1)-D,SRR643698,D,UNDEFINED,supercontig_1.1:5001-5011
+NCBI:align:db:alignment_sorted#1.2-UNDEFINED-bam-load(2.2.3)-D,ERR194157,D,UNDEFINED,J01415.2:1-11
+NCBI:align:db:alignment_sorted#1.2.1-454-latf-load(2.3.1)-D,SRR617107,D,454
+NCBI:align:db:alignment_sorted#1.2.1-454-latf-load(2.3.2)-D,ERR169857,D,454
+NCBI:align:db:alignment_sorted#1.2.1-454-latf-load(2.3.3)-D,SRR1022493,D,454
+NCBI:align:db:alignment_sorted#1.2.1-454-latf-load.2.3.4(2.3.4)-D,SRR1138226,D,454
+NCBI:align:db:alignment_sorted#1.2.1-454-latf-load.2.3.5(2.3.5)-D,ERR346690,D,454
+NCBI:align:db:alignment_sorted#1.2.1-ABSOLID-bam-load(2.2.3)-D,SRR767813,D,ABSOLID,AF034253.1:1-5000
+NCBI:align:db:alignment_sorted#1.2.1-ABSOLID-bam-load(2.3.2)-D,ERR303572,D,ABSOLID,CM000664.1:73675001-73675011
+NCBI:align:db:alignment_sorted#1.2.1-ABSOLID-bam-load(2.3.3)-D,ERR301268,D,ABSOLID,NC_000002.10:91680001-91680011
+NCBI:align:db:alignment_sorted#1.2.1-ABSOLID-bam-load.2.3.5(2.3.5)-D,SRR1213182,D,ABSOLID,CM000663.1:10001-15000
+NCBI:align:db:alignment_sorted#1.2.1-ABSOLID-bam-load.2.3.6(2.3.6)-D,SRR1572146,D,ABSOLID,chr1:11767-14445
+NCBI:align:db:alignment_sorted#1.2.1-ABSOLID-latf-load(2.3.1)-D,SRR801846,D,ABSOLID
+NCBI:align:db:alignment_sorted#1.2.1-ABSOLID-latf-load(2.3.2)-D,SRR987600,D,ABSOLID
+NCBI:align:db:alignment_sorted#1.2.1-ABSOLID-latf-load(2.3.3)-D,SRR975539,D,ABSOLID
+NCBI:align:db:alignment_sorted#1.2.1-ABSOLID-latf-load.2.3.4(2.3.4)-D,SRR1170761,D,ABSOLID
+NCBI:align:db:alignment_sorted#1.2.1-ABSOLID-latf-load.2.3.5(2.3.5)-D,SRR1525616,D,ABSOLID
+NCBI:align:db:alignment_sorted#1.2.1-CAPILLARY-latf-load.2.3.5(2.3.5)-D,SRR1537526,D,CAPILLARY
+NCBI:align:db:alignment_sorted#1.2.1-COMPLETE_GENOMICS-bam-load.2.3.5(2.3.5)-D,SRR1238554,D,COMPLETE_GENOMICS,NC_000001.10:15001-15011
+NCBI:align:db:alignment_sorted#1.2.1-HELICOS-latf-load.2.3.5(2.3.5)-D,SRR1217244,D,HELICOS
+NCBI:align:db:alignment_sorted#1.2.1-ILLUMINA-bam-load(2.2.3)-D,SRR1604786,D,ILLUMINA,CM000663.1:16255001-16255011
+NCBI:align:db:alignment_sorted#1.2.1-ILLUMINA-bam-load(2.3.1)-D,DRR013124,D,ILLUMINA,4-1/1:3650001-3650011
+NCBI:align:db:alignment_sorted#1.2.1-ILLUMINA-bam-load(2.3.2)-D,SRR1607286,D,ILLUMINA,CM000663.1:16255001-16255011
+NCBI:align:db:alignment_sorted#1.2.1-ILLUMINA-bam-load(2.3.3)-D,ERR366772,D,ILLUMINA,NC_005089.1:10001-10011
+NCBI:align:db:alignment_sorted#1.2.1-ILLUMINA-bam-load.2.3.3(2.3.3)-D,SRR1043724,D,ILLUMINA,JA2010_JC_00014:1-11
+NCBI:align:db:alignment_sorted#1.2.1-ILLUMINA-bam-load.2.3.4(2.3.4)-D,ERR420434,D,ILLUMINA,NC_003197.1:5001-5011
+NCBI:align:db:alignment_sorted#1.2.1-ILLUMINA-bam-load.2.3.5(2.3.5)-D,ERR583001,D,ILLUMINA,NC_000067.6:7775001-7780000
+NCBI:align:db:alignment_sorted#1.2.1-ILLUMINA-bam-load.2.3.6(2.3.6)-D,SRR1556219,D,ILLUMINA,CM000663.1:15001-15011
+NCBI:align:db:alignment_sorted#1.2.1-ILLUMINA-latf-load(2.3.1)-D,SRR816291,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.2.1-ILLUMINA-latf-load(2.3.2)-D,ERR318157,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.2.1-ILLUMINA-latf-load(2.3.3)-D,SRR1041633,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.2.1-ILLUMINA-latf-load.2.3.3(2.3.3)-D,SRR1043950,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.2.1-ILLUMINA-latf-load.2.3.4(2.3.4)-D,SRR1171738,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.2.1-ILLUMINA-latf-load.2.3.5(2.3.5)-D,SRR1575336,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.2.1-ION_TORRENT-bam-load(2.3.2)-D,ERR303537,D,ION_TORRENT,CM000671.1:32630001-32630011
+NCBI:align:db:alignment_sorted#1.2.1-ION_TORRENT-bam-load.2.3.4(2.3.4)-D,SRR1153486,D,ION_TORRENT,22:1-1935
+NCBI:align:db:alignment_sorted#1.2.1-ION_TORRENT-bam-load.2.3.5(2.3.5)-D,SRR1536244,D,ION_TORRENT,CM000663.1:16255001-16255011
+NCBI:align:db:alignment_sorted#1.2.1-ION_TORRENT-latf-load(2.3.2)-D,SRR851864,D,ION_TORRENT
+NCBI:align:db:alignment_sorted#1.2.1-ION_TORRENT-latf-load.2.3.5(2.3.5)-D,SRR1299024,D,ION_TORRENT
+NCBI:align:db:alignment_sorted#1.2.1-PACBIO_SMRT-bam-load.2.3.4(2.3.4)-D,SRR1141473,D,PACBIO_SMRT,Pf3D7_03_v3:220001-225000
+NCBI:align:db:alignment_sorted#1.2.1-PACBIO_SMRT-bam-load.2.3.5(2.3.5)-D,SRR1195987,D,PACBIO_SMRT,Pf3D7_03_v3:220001-225000
+#all runs of this type are private: NCBI:align:db:alignment_sorted#1.2.1-PACBIO_SMRT-latf-load(2.3.1)-D,SRR816121,D,PACBIO_SMRT
+NCBI:align:db:alignment_sorted#1.2.1-PACBIO_SMRT-latf-load(2.3.2)-D,SRR942732,D,PACBIO_SMRT
+NCBI:align:db:alignment_sorted#1.2.1-PACBIO_SMRT-latf-load(2.3.3)-D,SRR999223,D,PACBIO_SMRT
+NCBI:align:db:alignment_sorted#1.2.1-PACBIO_SMRT-latf-load.2.3.3(2.3.3)-D,SRR1006673,D,PACBIO_SMRT
+NCBI:align:db:alignment_sorted#1.2.1-PACBIO_SMRT-latf-load.2.3.4(2.3.4)-D,SRR1168957,D,PACBIO_SMRT
+NCBI:align:db:alignment_sorted#1.2.1-PACBIO_SMRT-latf-load.2.3.5(2.3.5)-D,SRR1564130,D,PACBIO_SMRT
+NCBI:align:db:alignment_sorted#1.3-UNDEFINED-bam-load.2.5.4(2.5.4)-D,SRR820132,D,UNDEFINED,chr9:118398-123961
+NCBI:align:db:alignment_sorted#1.2.1-UNDEFINED-bam-load(2.2.3)-D,SRR806708,D,UNDEFINED,chr1:10001-10002
+NCBI:align:db:alignment_sorted#1.2.1-UNDEFINED-bam-load(2.3.2)-D,ERR318663,D,UNDEFINED,CM000663.1:85001-85011
+NCBI:align:db:alignment_sorted#1.2.1-UNDEFINED-bam-load(2.3.3)-D,ERR231644,D,UNDEFINED,NC_000067.6:33855001-33855011
+NCBI:align:db:alignment_sorted#1.2.1-UNDEFINED-bam-load(2.3.5)-D,DRR027738,D,UNDEFINED,AF125673r4000:1-2
+NCBI:align:db:alignment_sorted#1.2.1-UNDEFINED-bam-load.2.3.3(2.3.3)-D,SRR1041911,D,UNDEFINED,NC_000079.5:63110001-63115000
+NCBI:align:db:alignment_sorted#1.2.1-UNDEFINED-bam-load.2.3.4(2.3.4)-D,ERR419241,D,UNDEFINED,BX571856.1:1-11
+NCBI:align:db:alignment_sorted#1.2.1-UNDEFINED-bam-load.2.3.5(2.3.5)-D,ERR571749,D,UNDEFINED,CM000663.1:16255001-16255011
+NCBI:align:db:alignment_sorted#1.2.1-UNDEFINED-bam-load.2.3.6(2.3.6)-D,ERR571748,D,UNDEFINED,CM000663.1:16255001-16255011
+NCBI:align:db:alignment_sorted#1.2.1-UNDEFINED-latf-load(2.3.1)-D,DRR017561,D,UNDEFINED
+NCBI:align:db:alignment_sorted#1.2.1-UNDEFINED-latf-load(2.3.5)-D,DRR047105,D,UNDEFINED
+#all runs of this type are private: NCBI:align:db:alignment_sorted#1.3-454-bam-load.2.5.1(2.5.1)-D,SRR2430743,D,454,ENSMUST00000179481:1-11
+NCBI:align:db:alignment_sorted#1.3-454-latf-load.2.4.0(2.4.0)-D,SRR1578536,D,454
+NCBI:align:db:alignment_sorted#1.3-454-latf-load.2.4.2(2.4.2)-D,SRR1630887,D,454
+NCBI:align:db:alignment_sorted#1.3-454-latf-load.2.4.2-2(2.4.2)-D,SRR1756068,D,454
+NCBI:align:db:alignment_sorted#1.3-454-latf-load.2.4.3(2.4.3)-D,ERR673991,D,454
+NCBI:align:db:alignment_sorted#1.3-454-latf-load.2.4.4(2.4.4)-D,ERR673994,D,454
+NCBI:align:db:alignment_sorted#1.3-454-latf-load.2.4.5(2.4.5)-D,SRR2011241,D,454
+NCBI:align:db:alignment_sorted#1.3-454-latf-load.2.5.0(2.5.0)-D,SRR2054761,D,454
+NCBI:align:db:alignment_sorted#1.3-454-latf-load.2.5.1(2.5.1)-D,ERR924522,D,454
+NCBI:align:db:alignment_sorted#1.3-454-latf-load.2.5.2(2.5.2)-D,ERR752925,D,454
+NCBI:align:db:alignment_sorted#1.3-ABSOLID-bam-load.2.4.0.1(2.4.0)-D,ERR634919,D,ABSOLID,NC_000001.9:725001-730000
+NCBI:align:db:alignment_sorted#1.3-ABSOLID-bam-load.2.4.2(2.4.2)-D,SRR1772144,D,ABSOLID,chr1:600001-605000
+NCBI:align:db:alignment_sorted#1.3-ABSOLID-bam-load.2.4.3-1(2.4.3)-D,ERR661176,D,ABSOLID,CM000663.1:10001-15000
+NCBI:align:db:alignment_sorted#1.3-ABSOLID-bam-load.2.4.5(2.4.5)-D,ERR747955,D,ABSOLID,CM000663.1:10001-15000
+NCBI:align:db:alignment_sorted#1.3-ABSOLID-bam-load.2.5.0(2.5.0)-D,ERR732600,D,ABSOLID,chr1:14535-20000
+NCBI:align:db:alignment_sorted#1.3-ABSOLID-bam-load.2.5.1(2.5.1)-D,ERR946955,D,ABSOLID,CM000666.1:114275001-114275011
+NCBI:align:db:alignment_sorted#1.3-ABSOLID-bam-load.2.5.2(2.5.2)-D,SRR2102318,D,ABSOLID,NC_000001.10:25001-30000
+NCBI:align:db:alignment_sorted#1.3-ABSOLID-latf-load.2.4.2-2(2.4.2)-D,SRR1743390,D,ABSOLID
+NCBI:align:db:alignment_sorted#1.3-ABSOLID-latf-load.2.4.3(2.4.3)-D,SRR1761345,D,ABSOLID
+NCBI:align:db:alignment_sorted#1.3-ABSOLID-latf-load.2.4.4(2.4.4)-D,SRR1813463,D,ABSOLID
+NCBI:align:db:alignment_sorted#1.3-ABSOLID-latf-load.2.4.5(2.4.5)-D,SRR1952625,D,ABSOLID
+NCBI:align:db:alignment_sorted#1.3-ABSOLID-latf-load.2.5.2(2.5.2)-D,SRR2179730,D,ABSOLID
+NCBI:align:db:alignment_sorted#1.3-CAPILLARY-latf-load.2.4.4(2.4.4)-D,SRR1811472,D,CAPILLARY
+NCBI:align:db:alignment_sorted#1.3-CAPILLARY-latf-load.2.4.5(2.4.5)-D,ERR673293,D,CAPILLARY
+NCBI:align:db:alignment_sorted#1.3-CAPILLARY-latf-load.2.5.1(2.5.1)-D,SRR2064214,D,CAPILLARY
+NCBI:align:db:alignment_sorted#1.3-CAPILLARY-latf-load.2.5.2(2.5.2)-D,ERR738697,D,CAPILLARY
+NCBI:align:db:alignment_sorted#1.3-COMPLETE_GENOMICS-bam-load.2.5.0(2.5.0)-D,SRR1772964,D,COMPLETE_GENOMICS,CM000663.1:20001-20011
+NCBI:align:db:alignment_sorted#1.3-COMPLETE_GENOMICS-bam-load.2.5.1(2.5.1)-D,SRR1772963,D,COMPLETE_GENOMICS,NC_000001.10:20001-20011
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-bam-load.2.3.6(2.3.6)-D,SRR1576042,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-bam-load.2.4.0(2.4.0)-D,SRR1576253,D,ILLUMINA,CM000663.1:10001-15000
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-bam-load.2.4.0.1(2.4.0)-D,ERR637305,D,ILLUMINA,NC_004325.1:5001-5011
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-bam-load.2.4.1(2.4.1)-D,ERR654280,D,ILLUMINA,AE005674.2:1-11
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-bam-load.2.4.2(2.4.2)-D,ERR714615,D,ILLUMINA,FM211187.1:5001-5011
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-bam-load.2.4.3(2.4.3)-D,SRR1764942,D,ILLUMINA,CM000663.1:16255001-16255011
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-bam-load.2.4.3-1(2.4.3)-D,SRR1779286,D,ILLUMINA,CM000663.1:169380001-169380011
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-bam-load.2.4.4(2.4.4)-D,SRR1735564,D,ILLUMINA,R00000039:1-100
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-bam-load.2.4.5(2.4.5)-D,SRR1561427,D,ILLUMINA,NW_006881719.1:135001-135011
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-bam-load.2.5.0(2.5.0)-D,SRR1596219,D,ILLUMINA,CM000663.1:16890001-16890011
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-bam-load.2.5.1(2.5.1)-D,ERR976755,D,ILLUMINA,NC_004325.1:5001-5011
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-bam-load.2.5.2(2.5.2)-D,SRR2089355,D,ILLUMINA,NC_000001.10:16255001-16255011
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-latf-load.2.3.5(2.3.5)-D,SRR1576132,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-latf-load.2.4.0(2.4.0)-D,SRR1593262,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-latf-load.2.4.1(2.4.1)-D,SRR1612367,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-latf-load.2.4.2(2.4.2)-D,ERR579200,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-latf-load.2.4.2-2(2.4.2)-D,ERR637413,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-latf-load.2.4.3(2.4.3)-D,SRR1796498,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-latf-load.2.4.4(2.4.4)-D,ERR665272,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-latf-load.2.4.5(2.4.5)-D,SRR2015928,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-latf-load.2.5.0(2.5.0)-D,ERR566218,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-latf-load.2.5.1(2.5.1)-D,ERR929452,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.3-ILLUMINA-latf-load.2.5.2(2.5.2)-D,SRR2628530,D,ILLUMINA
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-bam-load.2.4.0(2.4.0)-D,SRR1581222,D,ION_TORRENT,CM000663.1:43810001-43815000
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-bam-load.2.4.0.1(2.4.0)-D,SRR1582621,D,ION_TORRENT,CM000663.1:4610001-4615000
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-bam-load.2.4.2(2.4.2)-D,SRR1710770,D,ION_TORRENT,NC_011993.1:50001-50011
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-bam-load.2.4.3-1(2.4.3)-D,ERR654234,D,ION_TORRENT,CM000663.1:196945001-196950000
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-bam-load.2.4.4(2.4.4)-D,ERR654241,D,ION_TORRENT,CM000663.1:196945001-196950000
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-bam-load.2.4.5(2.4.5)-D,SRR1979203,D,ION_TORRENT,CM000673.1:62285001-62285011
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-bam-load.2.5.0(2.5.0)-D,SRR2054919,D,ION_TORRENT,NC_002695.1:1-11
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-bam-load.2.5.1(2.5.1)-D,ERR868268,D,ION_TORRENT,CM000663.1:152280001-152280011
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-bam-load.2.5.2(2.5.2)-D,ERR875288,D,ION_TORRENT,NM_017436.4:1-2106
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-latf-load.2.4.2(2.4.2)-D,SRR1611625,D,ION_TORRENT
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-latf-load.2.4.2-2(2.4.2)-D,SRR1745247,D,ION_TORRENT
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-latf-load.2.4.3(2.4.3)-D,ERR653335,D,ION_TORRENT
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-latf-load.2.4.4(2.4.4)-D,SRR1867944,D,ION_TORRENT
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-latf-load.2.4.5(2.4.5)-D,SRR2014707,D,ION_TORRENT
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-latf-load.2.5.0(2.5.0)-D,ERR792549,D,ION_TORRENT
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-latf-load.2.5.1(2.5.1)-D,ERR849661,D,ION_TORRENT
+NCBI:align:db:alignment_sorted#1.3-ION_TORRENT-latf-load.2.5.2(2.5.2)-D,ERR906384,D,ION_TORRENT
+NCBI:align:db:alignment_sorted#1.3-PACBIO_SMRT-latf-load.2.4.1(2.4.1)-D,SRR1609768,D,PACBIO_SMRT
+NCBI:align:db:alignment_sorted#1.3-PACBIO_SMRT-latf-load.2.4.2-2(2.4.2)-D,SRR1722569,D,PACBIO_SMRT
+NCBI:align:db:alignment_sorted#1.3-PACBIO_SMRT-latf-load.2.4.3(2.4.3)-D,SRR1793660,D,PACBIO_SMRT
+NCBI:align:db:alignment_sorted#1.3-PACBIO_SMRT-latf-load.2.4.4(2.4.4)-D,SRR1823957,D,PACBIO_SMRT
+NCBI:align:db:alignment_sorted#1.3-PACBIO_SMRT-latf-load.2.4.5(2.4.5)-D,SRR1980665,D,PACBIO_SMRT
+NCBI:align:db:alignment_sorted#1.3-PACBIO_SMRT-latf-load.2.5.0(2.5.0)-D,SRR2049159,D,PACBIO_SMRT
+NCBI:align:db:alignment_sorted#1.3-PACBIO_SMRT-latf-load.2.5.1(2.5.1)-D,SRR2084063,D,PACBIO_SMRT
+NCBI:align:db:alignment_sorted#1.3-PACBIO_SMRT-latf-load.2.5.2(2.5.2)-D,SRR2560504,D,PACBIO_SMRT
+#all runs of this type are private: NCBI:align:db:alignment_sorted#1.3-UNDEFINED-bam-load.2.3.6(2.3.6)-D,SRR1575026,D,UNDEFINED,NC_000086.6:166650001-166650011
+NCBI:align:db:alignment_sorted#1.3-UNDEFINED-bam-load.2.4.0(2.4.0)-D,ERR577497,D,UNDEFINED,CM000663.1:10001-15000
+NCBI:align:db:alignment_sorted#1.3-UNDEFINED-bam-load.2.4.0.1(2.4.0)-D,ERR577494,D,UNDEFINED,J01415.2:10001-10011
+NCBI:align:db:alignment_sorted#1.3-UNDEFINED-bam-load.2.4.1(2.4.1)-D,ERR653156,D,UNDEFINED,FR878060.1:5001-5011
+NCBI:align:db:alignment_sorted#1.3-UNDEFINED-bam-load.2.4.2(2.4.2)-D,ERR694485,D,UNDEFINED,NC_000017.9:1-5000
+NCBI:align:db:alignment_sorted#1.3-UNDEFINED-bam-load.2.4.3(2.4.3)-D,SRR1758433,D,UNDEFINED,NC_000067.5:4800001-4800011
+NCBI:align:db:alignment_sorted#1.3-UNDEFINED-bam-load.2.4.3-1(2.4.3)-D,SRR1842828,D,UNDEFINED,NODE_1000157_length_958_cov_43.022964:118-612
+NCBI:align:db:alignment_sorted#1.3-UNDEFINED-bam-load.2.4.4(2.4.4)-D,ERR769899,D,UNDEFINED,MT:1000-9000
+NCBI:align:db:alignment_sorted#1.3-UNDEFINED-bam-load.2.4.5(2.4.5)-D,ERR769886,D,UNDEFINED,NC_012920.1:5001-5011
+NCBI:align:db:alignment_sorted#1.3-UNDEFINED-bam-load.2.5.0(2.5.0)-D,ERR726972,D,UNDEFINED,NC_001133.8:5001-5011
+NCBI:align:db:alignment_sorted#1.3-UNDEFINED-bam-load.2.5.1(2.5.1)-D,ERR922054,D,UNDEFINED,NC_012920.1:5001-5011
+NCBI:align:db:alignment_sorted#1.3-UNDEFINED-bam-load.2.5.2(2.5.2)-D,ERR957001,D,UNDEFINED,NC_003197.1:1-11
+NCBI:align:db:alignment_unsorted#1.2-ILLUMINA-bam-load(2.2.2)-D,ERR221380,D,ILLUMINA,AL111168.1:1-5000
+NCBI:align:db:alignment_unsorted#1.2-ILLUMINA-bam-load(2.3.4)-D,ERR449385,D,ILLUMINA
+NCBI:align:db:alignment_unsorted#1.2.1-ILLUMINA-bam-load(2.3.4)-D,ERR570054,D,ILLUMINA
diff --git a/test/kar/expected/1.0.stdout b/test/kar/expected/1.0.stdout
new file mode 100644
index 0000000..a06c00e
--- /dev/null
+++ b/test/kar/expected/1.0.stdout
@@ -0,0 +1,35 @@
+1.md5
+col
+col/sub1
+col/sub1/idx
+col/sub1/idx0
+col/sub1/idx1
+col/sub1/idx2
+col/sub1/idx3
+idx
+idx/4a
+idx/4b
+idx/sub
+idx/sub/4c
+idx/sub/4d
+md
+md/cur
+md5
+sub1
+sub1/col
+sub1/col/sub1
+sub1/col/sub1/idx
+sub1/col/sub1/idx0
+sub1/col/sub1/idx1
+sub1/col/sub1/idx2
+sub1/col/sub1/idx3
+sub1/md
+sub1/md/cur
+sub1/sub2
+sub1/sub2/col
+sub1/sub2/col/sub1
+sub1/sub2/col/sub1/idx
+sub1/sub2/col/sub1/idx0
+sub1/sub2/col/sub1/idx1
+sub1/sub2/col/sub1/idx2
+sub1/sub2/col/sub1/idx3
diff --git a/interfaces/.gitignore b/test/kar/input/1.0/1.md5
similarity index 100%
copy from interfaces/.gitignore
copy to test/kar/input/1.0/1.md5
diff --git a/libs/kdb/.gitignore b/test/kar/input/1.0/col/sub1/idx
similarity index 100%
rename from libs/kdb/.gitignore
rename to test/kar/input/1.0/col/sub1/idx
diff --git a/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx0 b/test/kar/input/1.0/col/sub1/idx0
similarity index 100%
copy from test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx0
copy to test/kar/input/1.0/col/sub1/idx0
diff --git a/libs/klib/judy/.gitignore b/test/kar/input/1.0/col/sub1/idx1
similarity index 100%
rename from libs/klib/judy/.gitignore
rename to test/kar/input/1.0/col/sub1/idx1
diff --git a/libs/krypto/rng-priv.h b/test/kar/input/1.0/col/sub1/idx2
similarity index 100%
rename from libs/krypto/rng-priv.h
rename to test/kar/input/1.0/col/sub1/idx2
diff --git a/libs/search/.gitignore b/test/kar/input/1.0/col/sub1/idx3
similarity index 100%
rename from libs/search/.gitignore
rename to test/kar/input/1.0/col/sub1/idx3
diff --git a/test/kdb/testdb/tbl/SEQUENCE/col/dummy b/test/kar/input/1.0/idx/4a
similarity index 100%
rename from test/kdb/testdb/tbl/SEQUENCE/col/dummy
rename to test/kar/input/1.0/idx/4a
diff --git a/test/vfs/ncbi/public/refseq/YYZZ99 b/test/kar/input/1.0/idx/4b
similarity index 100%
rename from test/vfs/ncbi/public/refseq/YYZZ99
rename to test/kar/input/1.0/idx/4b
diff --git a/test/vfs/ncbi/public/refseq/ZZ999999.9 b/test/kar/input/1.0/idx/sub/4c
similarity index 100%
rename from test/vfs/ncbi/public/refseq/ZZ999999.9
rename to test/kar/input/1.0/idx/sub/4c
diff --git a/test/vfs/ncbi/public/sra/SRR999998.sra b/test/kar/input/1.0/idx/sub/4d
similarity index 100%
rename from test/vfs/ncbi/public/sra/SRR999998.sra
rename to test/kar/input/1.0/idx/sub/4d
diff --git a/test/vfs/ncbi/public/wgs/YYZZ99 b/test/kar/input/1.0/md/cur
similarity index 100%
rename from test/vfs/ncbi/public/wgs/YYZZ99
rename to test/kar/input/1.0/md/cur
diff --git a/test/vfs/repo/wgs/WGS/YY/ZZ/YYZZ10 b/test/kar/input/1.0/md5
similarity index 100%
rename from test/vfs/repo/wgs/WGS/YY/ZZ/YYZZ10
rename to test/kar/input/1.0/md5
diff --git a/test/vfs/repo/wgs/WGS/YY/ZZ/YYZZ99 b/test/kar/input/1.0/sub1/col/sub1/idx
similarity index 100%
rename from test/vfs/repo/wgs/WGS/YY/ZZ/YYZZ99
rename to test/kar/input/1.0/sub1/col/sub1/idx
diff --git a/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx0 b/test/kar/input/1.0/sub1/col/sub1/idx0
similarity index 100%
copy from test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx0
copy to test/kar/input/1.0/sub1/col/sub1/idx0
diff --git a/test/vfs/repo/wgs2/WGS/YY/ZZ/YYZZ20 b/test/kar/input/1.0/sub1/col/sub1/idx1
similarity index 100%
rename from test/vfs/repo/wgs2/WGS/YY/ZZ/YYZZ20
rename to test/kar/input/1.0/sub1/col/sub1/idx1
diff --git a/test/vfs/repo/wgs2/WGS/YY/ZZ/YYZZ99 b/test/kar/input/1.0/sub1/col/sub1/idx2
similarity index 100%
rename from test/vfs/repo/wgs2/WGS/YY/ZZ/YYZZ99
rename to test/kar/input/1.0/sub1/col/sub1/idx2
diff --git a/interfaces/.gitignore b/test/kar/input/1.0/sub1/col/sub1/idx3
similarity index 100%
copy from interfaces/.gitignore
copy to test/kar/input/1.0/sub1/col/sub1/idx3
diff --git a/interfaces/.gitignore b/test/kar/input/1.0/sub1/md/cur
similarity index 100%
copy from interfaces/.gitignore
copy to test/kar/input/1.0/sub1/md/cur
diff --git a/interfaces/.gitignore b/test/kar/input/1.0/sub1/sub2/col/sub1/idx
similarity index 100%
copy from interfaces/.gitignore
copy to test/kar/input/1.0/sub1/sub2/col/sub1/idx
diff --git a/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx0 b/test/kar/input/1.0/sub1/sub2/col/sub1/idx0
similarity index 100%
rename from test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx0
rename to test/kar/input/1.0/sub1/sub2/col/sub1/idx0
diff --git a/interfaces/.gitignore b/test/kar/input/1.0/sub1/sub2/col/sub1/idx1
similarity index 100%
copy from interfaces/.gitignore
copy to test/kar/input/1.0/sub1/sub2/col/sub1/idx1
diff --git a/interfaces/.gitignore b/test/kar/input/1.0/sub1/sub2/col/sub1/idx2
similarity index 100%
copy from interfaces/.gitignore
copy to test/kar/input/1.0/sub1/sub2/col/sub1/idx2
diff --git a/interfaces/.gitignore b/test/kar/input/1.0/sub1/sub2/col/sub1/idx3
similarity index 100%
rename from interfaces/.gitignore
rename to test/kar/input/1.0/sub1/sub2/col/sub1/idx3
diff --git a/test/kar/kar-srr-test.sh b/test/kar/kar-srr-test.sh
new file mode 100755
index 0000000..3693944
--- /dev/null
+++ b/test/kar/kar-srr-test.sh
@@ -0,0 +1,81 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+KAR=kar
+[ $# -ge 1 ] && KAR="$1"
+
+ACCLIST="acc.txt"
+acc="tmp"
+
+cleanup ()
+{
+    chmod -R +w $acc*
+    rm -rf $acc* *-dump.txt
+}
+
+trap 'echo " quitting $acc test" && cleanup && exit 1' 2
+
+for acc in `shuf -n 1 $ACCLIST | cut -d',' -f2`
+do
+    # extract an SRR with the new tool
+    echo "extracting $acc"
+    if ! kar -x `srapath $acc` -d $acc
+    then
+        STATUS=$?
+        echo "new KAR failed to extract an exisiting SRR file"
+        cleanup
+        exit $STATUS
+    fi
+    
+    # re-kar the exracted SRR to run VDB-DUMP
+    echo "archiving $acc"
+    if ! kar -c $acc.sra -d $acc
+    then
+        STATUS=$?
+        echo "new KAR to create archive with previously extracted SRR file"
+        cleanup
+        exit $STATUS
+    fi
+
+    # vdb-dump the new archive and compare outputs from the old SRR archive
+    echo "starting dumps"
+    vdb-dump $acc.sra > new-$acc-dump.txt
+    echo "   finished dumping new-$acc-dump.txt"
+    vdb-dump `srapath $acc` > old-$acc-dump.txt
+    echo "   finished dumping old-$acc-dump.txt"
+    
+    echo "comparing new-$acc-dump.txt and old-$acc-dump.txt"
+    if ! diff new-$acc-dump.txt old-$acc-dump.txt
+    then
+        STATUS=$?
+        echo "vdb-dump differs in new archive"
+        cleanup
+        exit $STATUS
+    fi
+
+    cleanup
+done
+
+exit $STATUS
diff --git a/test/kar/kar-test.sh b/test/kar/kar-test.sh
new file mode 100755
index 0000000..b407a46
--- /dev/null
+++ b/test/kar/kar-test.sh
@@ -0,0 +1,400 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+RESULT="result"
+ARCHIVE="newkar.kar"
+INPUT="source"
+OUTPUT="output"
+
+
+KAR=kar
+[ $# -ge 1 ] && KAR="$1"
+
+UNAME=$(uname -s)
+case $UNAME in
+    (Linux)
+        OS=linux
+        ;;
+    (Darwin)
+        OS=mac
+        MD5TOOL=/sbin/md5
+        ;;
+    (*)
+        echo "unsupported platform: $UNAME"
+        exit 1
+        ;;
+esac
+
+
+OLDKAR=/net/snowman/vol/projects/trace_software/vdb/$OS/debug/x86_64/bin/kar.2.6.3
+if [ ! -x $OLDKAR ]
+then
+    OLDKAR=/panfs/traces01.be-md.ncbi.nlm.nih.gov/trace_software/vdb/vdb-versions/2.6.3/$OS/debug/x86_64/bin/kar.2.6.3
+fi
+
+cleanup ()
+{
+    rm -rf $ARCHIVE $ARCHIVE.md5 $RESULT/* $RESULT
+
+}
+
+test_create ()
+{
+    echo "Testing create mode..."
+    if ! $KAR -c $ARCHIVE -d $INPUT
+    then
+        echo "KAR create operation failed"
+        cleanup
+        exit 1
+    fi
+
+    echo "   Testing create mode with existing archive..."
+    if $KAR -c $ARCHIVE -d $INPUT 2> /dev/null
+    then
+        echo "KAR create operation with existing archive failed to produce an error"
+        cleanup
+        exit 1
+    fi
+}
+
+test_create_options ()
+{
+    echo "   Testing force: -f create mode..."
+    if ! $KAR -f -c $ARCHIVE -d $INPUT
+    then
+        echo "KAR force create operation failed"
+        cleanup
+        exit 1
+    fi
+    
+    echo "   Testing option variation --create ..."
+    if ! $KAR -f --create $ARCHIVE -d $INPUT
+    then
+        echo "KAR create operation failed"
+        cleanup
+        exit 1
+    fi
+    
+    echo "   Testing option variation --directory ..."
+    if ! $KAR -f --create $ARCHIVE --directory $INPUT
+    then
+        echo "KAR create operation failed"
+        cleanup
+        exit 1
+    fi
+    
+    echo "   Testing option variation --force ..."
+    if ! $KAR --force --create $ARCHIVE --directory $INPUT
+    then
+        echo "KAR create operation failed"
+        cleanup
+        exit 1
+    fi
+
+    echo "   Testing md5: --md5 mode..."
+    if ! $KAR --md5 -f -c $ARCHIVE -d $INPUT
+    then
+        echo "KAR md5 operation failed"
+        exit 1
+    else
+        case $UNAME in
+            (Linux)
+                if ! md5sum -c $ARCHIVE.md5 > /dev/null
+                then
+                    echo "md5sum check failed with status $?"
+                    cleanup
+                    exit 1
+                fi
+                ;;
+            (Darwin)
+                if [ ! -x $MD5TOOL ]
+                then
+                    echo "could not locate executable md5 tool"
+                elif ! MD5=$($MD5TOOL $ARCHIVE | cut -f4 -d' ')
+                then
+                    echo "md5 failed with status $?"
+                    cleanup
+                    exit 1
+                else
+                    MY_MD5=$(cut -f1 -d' ' $ARCHIVE.md5)
+                    if [ "$MD5" != "$MY_MD5" ]
+                    then
+                        echo "$ARCHIVE: FAILED"
+                        cleanup
+                        exit 1
+                    fi
+                fi
+                ;;
+            (*)
+                echo unknown platform
+                cleanup
+                exit 1
+                ;;
+        esac
+    fi
+}
+
+test_list ()
+{
+    echo "Testing test mode..."    
+    if ! $KAR -t $ARCHIVE > /dev/null
+    then
+        STATUS=$?
+        echo "KAR listing failed"
+        cleanup
+        exit 1
+    fi
+
+    echo "   Testing option variation --test ..."
+    if ! $KAR --test $ARCHIVE > /dev/null
+    then
+        STATUS=$?
+        echo "KAR listing failed"
+        cleanup
+        exit 1
+    fi
+}
+
+test_list_options ()
+{
+    echo "   Testing longlist: -l mode..."
+    if ! $KAR -l -t $ARCHIVE > /dev/null
+    then
+        STATUS=$?
+        echo "KAR long listing failed"
+        cleanup
+        exit 1
+    fi
+}
+
+test_extract ()
+{
+    echo "Testing extract mode..."   
+    DIR="extracted"
+    if ! $KAR -x $ARCHIVE -d $DIR
+    then
+        STATUS=$?
+        echo "KAR extraction failed"
+        cleanup
+        exit 1
+    fi
+
+    rm -rf $DIR
+
+    echo "   Testing extract mode --extract..."   
+    DIR="extracted"
+    if ! $KAR --extract $ARCHIVE -d $DIR
+    then
+        STATUS=$?
+        echo "KAR extraction failed"
+        cleanup 
+        exit 1
+    fi
+
+    rm -rf $DIR
+}
+
+
+# create archive with new tool
+# test and extract with legacy
+test_cNew_txOld_cmp ()
+{
+    echo "Testing new archive - list and extract with old..."
+
+    mkdir $RESULT
+
+    $KAR -f -c $ARCHIVE -d $INPUT
+    
+    if ! $OLDKAR -t $ARCHIVE > $RESULT/olist.txt
+    then
+        STATUS=$?
+        echo "      legacy-KAR could not test the archive...failed"
+        cleanup
+        exit 1
+    fi
+
+    if ! $OLDKAR -l -t $ARCHIVE > $RESULT/ollist.txt
+    then
+        STATUS=$?
+        echo "      legacy-KAR could not test the archive with longlist...failed"
+        cleanup
+        exit 1
+    fi
+
+    if ! $OLDKAR -x $ARCHIVE -d $RESULT/o_extracted
+    then
+        STATUS=$?
+        echo "      legacy-KAR could not extract the archive...failed"
+        cleanup
+        exit 1
+    fi
+
+
+    #start comparing outputs
+    echo "   Comparing list outputs..."
+    $KAR -t $ARCHIVE > $RESULT/nlist.txt
+    if ! diff -w $RESULT/olist.txt $RESULT/nlist.txt > $RESULT/diff.txt
+    then
+        STATUS=$?
+        echo "      KAR listing differs from legacy...test failed"
+        cat $RESULT/diff.txt
+        cleanup
+        exit 1
+    fi
+
+    # there is no purpose in testing long list mode. 
+    # most of the differences are an attempt to correct errors in the old tool
+
+    echo "   Comparing extracted archives..."
+    $KAR -x $ARCHIVE -d $RESULT/n_extracted
+    if ! diff -q -r $RESULT/o_extracted $RESULT/n_extracted 2> $RESULT/diff.txt
+    then
+        grep -v "alias" $RESULT/diff.txt > $RESULT/tmp; mv $RESULT/tmp $RESULT/diff.txt 
+
+        if [ -s $RESULT/diff.txt ] 
+        then
+            STATUS=$?
+            echo "      KAR extracting content differs from legacy...test failed"
+            cat $RESULT/diff.txt
+            cleanup
+            exit 1
+        fi
+    fi
+
+    chmod -R +w $RESULT/o_extracted
+    cleanup
+}
+
+
+
+test_cOld_txNew_cmp ()
+{
+    echo "Testing legacy archive - list and extract with new..."
+    SS="simple_source"
+
+    mkdir $RESULT
+
+    # create new source and remove aliases legacy kar doesnt handle
+    cp -r $INPUT $SS
+    rm -rf $SS/alias_subdir $SS/local_f_subdir_alias
+
+    $OLDKAR -f -c $ARCHIVE -d $SS
+    
+    if ! $KAR -t $ARCHIVE > $RESULT/nlist.txt
+    then
+        STATUS=$?
+        echo "      KAR could not test the archive...failed"
+        rm -rf $SS
+        cleanup
+        exit 1
+    fi
+
+    if ! $KAR -l -t $ARCHIVE > $RESULT/nllist.txt
+    then
+        STATUS=$?
+        echo "      KAR could not test the archive with longlist...failed"
+        rm -rf $SS
+        cleanup
+        exit 1
+    fi
+
+    if ! $KAR -x $ARCHIVE -d $RESULT/n_extracted
+    then
+        STATUS=$?
+        echo "      KAR could not extract the archive...failed"
+        rm -rf $SS
+        cleanup
+        exit 1
+    fi
+
+
+    #start comparing outputs
+    echo "   Comparing list outputs..."
+    $OLDKAR -t $ARCHIVE > $RESULT/olist.txt
+    if ! diff -w $RESULT/nlist.txt $RESULT/olist.txt > $RESULT/diff.txt
+    then
+        STATUS=$?
+        echo "      KAR listing differs from legacy...test failed"
+        cat $RESULT/diff.txt
+        cleanup
+        exit 1
+    fi
+
+    # there is no purpose in testing long list mode. 
+    # most of the differences are an attempt to correct errors in the old tool
+
+    echo "   Comparing extracted archives..."
+    $OLDKAR -x $ARCHIVE -d $RESULT/o_extracted
+    if ! diff -q -r $RESULT/n_extracted $RESULT/o_extracted 2> $RESULT/diff.txt
+    then
+        grep -v "alias" $RESULT/diff.txt > $RESULT/tmp; mv $RESULT/tmp $RESULT/diff.txt 
+
+        if [ -s $RESULT/diff.txt ] 
+        then
+            STATUS=$?
+            echo "      KAR extracting content differs from legacy...test failed"
+            cat $RESULT/diff.txt
+            cleanup
+            exit 1
+        fi
+    fi
+
+    chmod -R +w $RESULT/o_extracted
+    rm -rf $SS
+    cleanup
+}
+
+
+run_basic ()
+{
+    test_create
+    test_create_options
+    test_list
+    test_list_options
+    test_extract
+}
+
+run_compare ()
+{
+    if [ -x $OLDKAR ]
+    then
+        test_cNew_txOld_cmp
+        test_cOld_txNew_cmp
+    else
+        echo "could not locate old kar tool to run comparisons"
+    fi
+}
+
+
+# run the script
+run_basic
+run_compare
+
+
+cleanup
+
+
+exit 0
\ No newline at end of file
diff --git a/test/kar/old-kar b/test/kar/old-kar
new file mode 120000
index 0000000..950a1d6
--- /dev/null
+++ b/test/kar/old-kar
@@ -0,0 +1 @@
+/net/snowman/vol/projects/trace_software/vdb/linux/debug/x86_64/bin/kar
\ No newline at end of file
diff --git a/test/kar/source/alias_subdir/d1/subdir_f_alias b/test/kar/source/alias_subdir/d1/subdir_f_alias
new file mode 120000
index 0000000..1180d4b
--- /dev/null
+++ b/test/kar/source/alias_subdir/d1/subdir_f_alias
@@ -0,0 +1 @@
+../../f1
\ No newline at end of file
diff --git a/test/kar/source/alias_subdir/f1 b/test/kar/source/alias_subdir/f1
new file mode 100644
index 0000000..6e9849c
--- /dev/null
+++ b/test/kar/source/alias_subdir/f1
@@ -0,0 +1 @@
+sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd vi
diff --git a/test/kar/source/d1/d1f1 b/test/kar/source/d1/d1f1
new file mode 100644
index 0000000..6e9849c
--- /dev/null
+++ b/test/kar/source/d1/d1f1
@@ -0,0 +1 @@
+sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd vi
diff --git a/test/kar/source/d1/d1f2 b/test/kar/source/d1/d1f2
new file mode 100644
index 0000000..74647a2
--- /dev/null
+++ b/test/kar/source/d1/d1f2
@@ -0,0 +1 @@
+sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd vi sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd v
diff --git a/test/kar/source/d1/d1f3 b/test/kar/source/d1/d1f3
new file mode 100644
index 0000000..883bdf7
--- /dev/null
+++ b/test/kar/source/d1/d1f3
@@ -0,0 +1 @@
+sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd vi sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd v sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd v
diff --git a/test/kar/source/d2/d1/d2f1 b/test/kar/source/d2/d1/d2f1
new file mode 100644
index 0000000..6e9849c
--- /dev/null
+++ b/test/kar/source/d2/d1/d2f1
@@ -0,0 +1 @@
+sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd vi
diff --git a/test/kar/source/d2/d1/d2f2 b/test/kar/source/d2/d1/d2f2
new file mode 100644
index 0000000..74647a2
--- /dev/null
+++ b/test/kar/source/d2/d1/d2f2
@@ -0,0 +1 @@
+sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd vi sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd v
diff --git a/test/kar/source/d2/d1/d2f3 b/test/kar/source/d2/d1/d2f3
new file mode 100644
index 0000000..883bdf7
--- /dev/null
+++ b/test/kar/source/d2/d1/d2f3
@@ -0,0 +1 @@
+sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd vi sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd v sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd v
diff --git a/test/kar/source/d3/d2/d1/d3f1 b/test/kar/source/d3/d2/d1/d3f1
new file mode 100644
index 0000000..6e9849c
--- /dev/null
+++ b/test/kar/source/d3/d2/d1/d3f1
@@ -0,0 +1 @@
+sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd vi
diff --git a/test/kar/source/d3/d2/d1/d3f2 b/test/kar/source/d3/d2/d1/d3f2
new file mode 100644
index 0000000..74647a2
--- /dev/null
+++ b/test/kar/source/d3/d2/d1/d3f2
@@ -0,0 +1 @@
+sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd vi sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd v
diff --git a/test/kar/source/d3/d2/d1/d3f3 b/test/kar/source/d3/d2/d1/d3f3
new file mode 100644
index 0000000..883bdf7
--- /dev/null
+++ b/test/kar/source/d3/d2/d1/d3f3
@@ -0,0 +1 @@
+sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd vi sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd v sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd v
diff --git a/test/kar/source/f1 b/test/kar/source/f1
new file mode 100644
index 0000000..6e9849c
--- /dev/null
+++ b/test/kar/source/f1
@@ -0,0 +1 @@
+sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd vi
diff --git a/test/kar/source/f2 b/test/kar/source/f2
new file mode 100644
index 0000000..74647a2
--- /dev/null
+++ b/test/kar/source/f2
@@ -0,0 +1 @@
+sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd vi sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd v
diff --git a/test/kar/source/f3 b/test/kar/source/f3
new file mode 100644
index 0000000..883bdf7
--- /dev/null
+++ b/test/kar/source/f3
@@ -0,0 +1 @@
+sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd vi sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd v sdfkjas;dfl lkajsdf ;lkajsd fajsd kjaskdjhf aisdhc askjdc lakscsc lshdiasbcasbhd v
diff --git a/test/kar/source/local_d_alias b/test/kar/source/local_d_alias
new file mode 120000
index 0000000..562890b
--- /dev/null
+++ b/test/kar/source/local_d_alias
@@ -0,0 +1 @@
+d1
\ No newline at end of file
diff --git a/test/kar/source/local_f_alias b/test/kar/source/local_f_alias
new file mode 120000
index 0000000..9dd7ac9
--- /dev/null
+++ b/test/kar/source/local_f_alias
@@ -0,0 +1 @@
+f1
\ No newline at end of file
diff --git a/test/kar/source/local_f_subdir_alias b/test/kar/source/local_f_subdir_alias
new file mode 120000
index 0000000..b555588
--- /dev/null
+++ b/test/kar/source/local_f_subdir_alias
@@ -0,0 +1 @@
+alias_subdir/f1
\ No newline at end of file
diff --git a/test/kdb/Makefile b/test/kdb/Makefile
deleted file mode 100644
index 5337dde..0000000
--- a/test/kdb/Makefile
+++ /dev/null
@@ -1,103 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-#TODO: revive test-btree
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-MODULE = test/kdb
-
-TEST_TOOLS = \
-    test-kdb \
-    test-wkdb
-
-include $(TOP)/build/Makefile.env
-
-# make sure runs are not cached in the user repository when running tests
-ifeq ($(wildcard ../../../asm-trace),)
-	ifeq (,$(VDB_CONFIG))
-		VDB_CONFIG = $(shell pwd)/../only-remote-repository.kfg
-	endif
-endif
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: $(ALL_LIBS) $(TEST_TOOLS)
-
-clean: stdclean
-
-#-------------------------------------------------------------------------------
-# test btree
-#
-TEST_BTREE_SRC = \
-	test-btree
-
-TEST_BTREE_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_BTREE_SRC))
-
-TEST_BTREE_LIB = \
-	-skapp \
-	-sncbi-vdb
-
-$(BINDIR)/test-btree: $(TEST_BTREE_OBJ)
-	$(LD) --exe -o $@ $^ $(TEST_BTREE_LIB)
-
-#-------------------------------------------------------------------------------
-# test-kdb
-#
-TEST_KDB_SRC = \
-	kdbtest 
-
-TEST_KDB_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_KDB_SRC))
-
-TEST_KDB_LIB = \
-    -skapp \
-    -sktst \
-	-sncbi-vdb
-
-$(TEST_BINDIR)/test-kdb: $(TEST_KDB_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_KDB_LIB)
-
-#-------------------------------------------------------------------------------
-# test-wkdb
-#
-TEST_WKDB_SRC = \
-	wkdbtest 
-
-TEST_WKDB_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_WKDB_SRC))
-
-TEST_WKDB_LIB = \
-    -skapp \
-    -sktst \
-	-sncbi-wvdb
-
-$(TEST_BINDIR)/test-wkdb: $(TEST_WKDB_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_WKDB_LIB)
-
-wkdb: test-wkdb
-	$(TEST_BINDIR)/test-wkdb
diff --git a/test/kdb/kdbtest.cpp b/test/kdb/kdbtest.cpp
deleted file mode 100644
index 9b7c054..0000000
--- a/test/kdb/kdbtest.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for Kdb interface
-*/
-
-#include <ktst/unit_test.hpp>
-
-#include <sysalloc.h>
-
-#include <kdb/manager.h>
-#include <kdb/database.h>
-#include <kdb/index.h>
-#include <kdb/table.h>
-
-#include <vfs/manager.h>
-
-using namespace std;
-
-TEST_SUITE(KdbTestSuite);
-
-#define KDB_MANAGER_MAKE(mgr, wd) KDBManagerMakeRead((const KDBManager **)mgr, (struct KDirectory const *)wd)
-#include "remote_open_test.cpp"
-
-TEST_CASE(KDBManagerVPathType)
-{
-    string path;
-    { // convert accession "SRR000123" into a file system path
-        VFSManager* vfsmgr;
-        REQUIRE_RC(VFSManagerMake(&vfsmgr));
-        {
-            VPath * vpath;
-            const struct KFile *dummy1;
-            const struct VPath *dummy2;
-            REQUIRE_RC(VFSManagerResolveSpec ( vfsmgr, "SRR000123", &vpath, &dummy1, &dummy2, true));
-            
-            path = ToString(vpath);
-            
-            REQUIRE_RC(KFileRelease(dummy1));
-            REQUIRE_RC(VPathRelease(dummy2));
-            REQUIRE_RC(VPathRelease(vpath));
-        }
-        REQUIRE_RC(VFSManagerRelease(vfsmgr));
-    }
-
-
-    const KDBManager* mgr;
-    REQUIRE_RC(KDBManagerMakeRead(&mgr, NULL));
-
-//cout << path << endl;
-    REQUIRE_EQ((int)kptTable, KDBManagerPathType(mgr, path.c_str()));
-    
-    REQUIRE_RC(KDBManagerRelease(mgr));
-    
-}
-
-// KColumnBlob
-// see same tests on the write side, wkdbtest.cpp
-
-class ColumnBlobReadFixture
-{
-public:
-    ColumnBlobReadFixture()
-    :   m_num_read ( 0 ),
-        m_remaining ( 0 )
-    {
-        const KDBManager* mgr;
-        THROW_ON_RC ( KDBManagerMakeRead ( & mgr, NULL ) );
-        
-        const KTable* tbl;
-        THROW_ON_RC ( KDBManagerOpenTableRead ( mgr, & tbl, "SRR000123" ) );
-        
-        const KColumn* col;
-        THROW_ON_RC ( KTableOpenColumnRead ( tbl, & col, "X" ) );
-        
-        THROW_ON_RC ( KColumnOpenBlobRead ( col, & m_blob, 1 ) );
-        
-        THROW_ON_RC ( KColumnRelease ( col ) );
-        THROW_ON_RC ( KTableRelease ( tbl ) );
-        THROW_ON_RC ( KDBManagerRelease ( mgr ) );
-    }
-    ~ColumnBlobReadFixture()
-    {
-        KColumnBlobRelease ( m_blob );
-    }
-
-    const KColumnBlob*  m_blob;
-    size_t m_num_read;
-    size_t m_remaining;
-};
-
-FIXTURE_TEST_CASE ( ColumnBlobRead_basic, ColumnBlobReadFixture )
-{   
-    const size_t BlobSize = 1882; 
-    const size_t BufSize = 2024; 
-    char buffer [ BufSize ];
-    REQUIRE_RC ( KColumnBlobRead ( m_blob, 0, buffer, BufSize, & m_num_read, & m_remaining ) );
-    REQUIRE_EQ ( BlobSize, m_num_read );
-    REQUIRE_EQ ( (size_t)0, m_remaining );
-}
-
-FIXTURE_TEST_CASE ( ColumnBlobRead_insufficient_buffer, ColumnBlobReadFixture )
-{   
-    const size_t BlobSize = 1882; 
-    const size_t BufSize = 1024; 
-    char buffer [ BufSize ];
-    // first read incomplete
-    REQUIRE_RC ( KColumnBlobRead ( m_blob, 0, buffer, BufSize, & m_num_read, & m_remaining ) );
-    REQUIRE_EQ ( BufSize, m_num_read );
-    REQUIRE_EQ ( BlobSize - BufSize, m_remaining );
-    // the rest comes in on the second read
-    REQUIRE_RC ( KColumnBlobRead ( m_blob, BufSize, buffer, BufSize, & m_num_read, & m_remaining ) );
-    REQUIRE_EQ ( BlobSize - BufSize, m_num_read );
-    REQUIRE_EQ ( (size_t)0, m_remaining );
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-#include <klib/debug.h> // KDbgSetString
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-kdb";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    //assert(!KDbgSetString("KFG"));
-    //assert(!KDbgSetString("VFS"));
-    KConfigDisableUserSettings();
-    rc_t rc=KdbTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/kdb/remote_open_test.cpp b/test/kdb/remote_open_test.cpp
deleted file mode 100644
index e947a67..0000000
--- a/test/kdb/remote_open_test.cpp
+++ /dev/null
@@ -1,304 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* This file is to be #included to read and write side test suites
-* KDB_MANAGER_MAKE has to be #defined depending on the side
-*/
-
-#include <cstdlib>
-#include <fstream>
-#include <stdexcept>
-
-#include <kdb/kdb-priv.h>
-
-#include <kfs/file.h>
-#include <vfs/manager.h>
-#include <vfs/manager-priv.h> /* VFSManagerMakeFromKfg */
-#include <vfs/path.h>
-#include <vfs/resolver.h>
-#include <klib/text.h>
-#include <kfg/config.h>
-
-using namespace std;
-
-static string ToString(const VPath* path)
-{
-    const String * s;
-    if ( VPathMakeString (path, &s) != 0 )
-        throw logic_error ( "ToString(VPath) failed" );
-    string ret = string(s->addr, s->size);
-    free((void*)s);
-    return ret;
-}
-
-TEST_CASE(KDBManagerVPathOpenDB_Local)
-{
-    VPath * path;
-    
-    {
-        VFSManager* vfsmgr;
-        REQUIRE_RC(VFSManagerMake(&vfsmgr));
-        REQUIRE_RC(VFSManagerMakePath(vfsmgr, &path, "./testdb"));
-        REQUIRE_RC(VFSManagerRelease(vfsmgr));
-    }
-
-    {
-        KDBManager* mgr;
-        REQUIRE_RC(KDB_MANAGER_MAKE(&mgr, NULL));
-        const KDatabase * db;
-        REQUIRE_RC(KDBManagerVPathOpenLocalDBRead ( mgr, &db, path ));
-        REQUIRE_NOT_NULL(db);
-        const KTable *tbl;
-        REQUIRE_RC(KDatabaseOpenTableRead(db, &tbl, "SEQUENCE"));
-        REQUIRE_RC(KTableRelease(tbl));
-        REQUIRE_RC(KDatabaseRelease(db));
-        REQUIRE_RC(KDBManagerRelease(mgr));
-    }
-    
-    REQUIRE_RC(VPathRelease(path));
-}
-
-TEST_CASE(KDBManagerVPathOpenDB_Local_Table)
-{
-    VPath * path;
-    
-    {
-        VFSManager* vfsmgr;
-        REQUIRE_RC(VFSManagerMake(&vfsmgr));
-        REQUIRE_RC(VFSManagerMakePath(vfsmgr, &path, "SRR000123"));
-        REQUIRE_RC(VFSManagerRelease(vfsmgr));
-    }
-
-    {
-        KDBManager* mgr;
-        REQUIRE_RC(KDB_MANAGER_MAKE(&mgr, NULL));
-        const KDatabase * db;
-        REQUIRE_RC_FAIL(KDBManagerVPathOpenLocalDBRead ( mgr, &db, path )); // not a database
-        REQUIRE_RC(KDBManagerRelease(mgr));
-    }
-    
-    REQUIRE_RC(VPathRelease(path));
-}
-
-TEST_CASE(KDBManagerVPathOpenDB_Local_BadPath)
-{
-    VPath * path;
-    
-    {
-        VFSManager* vfsmgr;
-        REQUIRE_RC(VFSManagerMake(&vfsmgr));
-        REQUIRE_RC(VFSManagerMakePath(vfsmgr, &path, "xxxxx"));
-        REQUIRE_RC(VFSManagerRelease(vfsmgr));
-    }
-
-    {
-        KDBManager* mgr;
-        REQUIRE_RC(KDB_MANAGER_MAKE(&mgr, NULL));
-        const KDatabase * db;
-        REQUIRE_RC_FAIL(KDBManagerVPathOpenLocalDBRead ( mgr, &db, path )); // not a database
-        REQUIRE_RC(KDBManagerRelease(mgr));
-    }
-    
-    REQUIRE_RC(VPathRelease(path));
-}
-
-class RemoteDBFixture
-{
-public:
-    RemoteDBFixture()
-    : m_vfsmgr(0), m_path(0), m_cache(0)
-    {
-    }
-    
-    ~RemoteDBFixture()
-    {
-        if (m_vfsmgr && VFSManagerRelease(m_vfsmgr) != 0)
-            throw logic_error ( "~RemoteDBFixture: VFSManagerRelease failed" );
-            
-        if (m_path && VPathRelease(m_path) != 0)
-            throw logic_error ( "~RemoteDBFixture: VPathRelease(m_path) failed" );
-            
-        if (m_cache && VPathRelease(m_cache) != 0)
-            throw logic_error ( "~RemoteDBFixture: VPathRelease(m_path) failed" );
-            
-        remove("./root/sra");
-        remove("./root");
-        remove(m_configName.c_str());
-        remove(m_cachedFile.c_str());
-    }
-    
-    void Configure(const string& name)
-    {
-        m_configName = name+".kfg";
-        std::ofstream f(m_configName.c_str()); 
-        f   << "repository/remote/main/CGI/resolver-cgi = \"http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi\"\n"
-            << "repository/user/main/public/root=\"./root\"\n" 
-            << "repository/user/main/public/apps/sra/volumes/sraFlat=\"sra\"\n"; 
-        f.close();
-            
-        KDirectory *wd;
-        if (KDirectoryNativeDir(&wd))
-            throw logic_error ( "RemoteDBFixture::Configure: KDirectoryNativeDir failed" );
-        
-        KConfig *cfg;
-        if (KConfigMake(&cfg, wd))
-            throw logic_error ( "RemoteDBFixture::Configure: KConfigMake failed" );
-
-        if (VFSManagerMakeFromKfg(&m_vfsmgr, cfg))
-            throw logic_error ( "RemoteDBFixture::Configure: VFSManagerMakeFromKfg failed" );
-        
-        if (KConfigRelease(cfg))
-            throw logic_error ( "RemoteDBFixture::Configure: KConfigRelease failed" );
-            
-        if (KDirectoryRelease(wd))
-            throw logic_error ( "RemoteDBFixture::Configure: KDirectoryRelease failed" );
-    }
-    
-    void Resolve(const string& p_accession)
-    {
-        struct VResolver * resolver;
-        if(VFSManagerGetResolver(m_vfsmgr, & resolver))
-            throw logic_error ( "RemoteDBFixture::Resolve: VFSManagerGetResolver failed" );
-
-        VPath * accession;
-        if (VFSManagerMakePath ( m_vfsmgr, &accession, p_accession.c_str() ))
-            throw logic_error ( "RemoteDBFixture::Resolve: VFSManagerMakePath failed" );
-        
-        if (VResolverQuery( resolver, eProtocolHttp, accession, NULL, &m_path, &m_cache))
-            throw logic_error ( "RemoteDBFixture::Resolve: VResolverQuery failed" );
-        
-        //cout << ToString(m_path) << endl; 
-        //cout << ToString(m_cache) << endl; 
-        m_cachedFile = ToString(m_cache);
-        /* make sure cached file does not exist */
-        remove(m_cachedFile.c_str());
-       
-        if (VPathRelease(accession))
-            throw logic_error ( "RemoteDBFixture::Resolve: VPathRelease failed" );
-        if (VResolverRelease(resolver))
-            throw logic_error ( "RemoteDBFixture::Resolve: VResolverRelease failed" );
-    }
-
-    
-protected:
-    string m_configName;
-    
-    VFSManager * m_vfsmgr;
-    const VPath * m_path;
-    const VPath * m_cache;
-    string m_cachedFile;
-};
-
-FIXTURE_TEST_CASE(KDBManagerVPathOpenDB_Remote, RemoteDBFixture)
-{
-    Configure(GetName());
-    Resolve("SRR600096");
-    
-    KDBManager* mgr;
-    REQUIRE_RC(KDB_MANAGER_MAKE(&mgr, NULL));
-    const KDatabase * db;
-    REQUIRE_RC(KDBManagerVPathOpenRemoteDBRead ( mgr, &db, m_path, m_cache ));
-    REQUIRE_NOT_NULL(db);
-    
-    /* read something */
-    const KTable *tbl;
-    REQUIRE_RC(KDatabaseOpenTableRead(db, &tbl, "SEQUENCE"));
-    REQUIRE_RC(KTableRelease(tbl));
-
-    REQUIRE_RC(KDatabaseRelease(db));
-    REQUIRE_RC(KDBManagerRelease(mgr));
-}
-
-FIXTURE_TEST_CASE(KDBManagerVPathOpenDB_Remote_NoCache, RemoteDBFixture)
-{
-    Configure(GetName());
-    Resolve("SRR600096");
-    
-    KDBManager* mgr;
-    REQUIRE_RC(KDB_MANAGER_MAKE(&mgr, NULL));
-    const KDatabase * db;
-    REQUIRE_RC(KDBManagerVPathOpenRemoteDBRead ( mgr, &db, m_path, NULL ));
-    REQUIRE_NOT_NULL(db);
-    
-    /* read something */
-    const KTable *tbl;
-    REQUIRE_RC(KDatabaseOpenTableRead(db, &tbl, "SEQUENCE"));
-    REQUIRE_RC(KTableRelease(tbl));
-
-    REQUIRE_RC(KDatabaseRelease(db));
-    REQUIRE_RC(KDBManagerRelease(mgr));
-}
-
-FIXTURE_TEST_CASE(KDBManagerVPathOpenDB_Remote_Table, RemoteDBFixture)
-{
-    Configure(GetName());
-    Resolve("SRR000123");
-    
-    KDBManager* mgr;
-    REQUIRE_RC(KDB_MANAGER_MAKE(&mgr, NULL));
-    const KDatabase * db;
-    REQUIRE_RC_FAIL(KDBManagerVPathOpenRemoteDBRead ( mgr, &db, m_path, NULL )); // not a database
-    
-    REQUIRE_RC(KDBManagerRelease(mgr));
-}
-
-FIXTURE_TEST_CASE(KDBManagerVPathOpenDB_Remote_BadPath, RemoteDBFixture)
-{
-    Configure(GetName());
-    
-    KDBManager* mgr;
-    REQUIRE_RC(KDB_MANAGER_MAKE(&mgr, NULL));
-    const KDatabase * db;
-
-    REQUIRE_RC(VFSManagerMakePath(m_vfsmgr, (VPath**)&m_path, "xxxx"));
-    REQUIRE_RC_FAIL(KDBManagerVPathOpenRemoteDBRead ( mgr, &db, m_path, NULL )); 
-    
-    REQUIRE_RC(KDBManagerRelease(mgr));
-}
-
-FIXTURE_TEST_CASE(KDBManagerVPathOpenDB_Remote_BadCache, RemoteDBFixture)
-{
-    Configure(GetName());
-    Resolve("SRR600096");
-    
-    KDBManager* mgr;
-    REQUIRE_RC(KDB_MANAGER_MAKE(&mgr, NULL));
-    const KDatabase * db;
-    
-    VPath* cache;
-    REQUIRE_RC(VFSManagerMakePath(m_vfsmgr, &cache, "/dev/null")); // unlikely to be usable
-    REQUIRE_RC(KDBManagerVPathOpenRemoteDBRead ( mgr, &db, m_path, cache )); 
-    REQUIRE_RC(VPathRelease(cache));
-
-    /* read something */
-    const KTable *tbl;
-    REQUIRE_RC(KDatabaseOpenTableRead(db, &tbl, "SEQUENCE")); // works anyway, just not caching
-    REQUIRE_RC(KTableRelease(tbl));
-    
-    REQUIRE_RC(KDatabaseRelease(db));
-    REQUIRE_RC(KDBManagerRelease(mgr));
-}
diff --git a/test/kdb/root/sra/SRR000123.sra.cache b/test/kdb/root/sra/SRR000123.sra.cache
deleted file mode 100644
index 3073c39..0000000
Binary files a/test/kdb/root/sra/SRR000123.sra.cache and /dev/null differ
diff --git a/test/kdb/test-btree.c b/test/kdb/test-btree.c
deleted file mode 100644
index 51254f0..0000000
--- a/test/kdb/test-btree.c
+++ /dev/null
@@ -1,338 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-/* broken test - this added just to make it compile */
-
-#include <kapp/main.h>
-#include <kapp/args.h>
-#include <kfs/directory.h>
-#include <kfs/pagefile.h>
-#include <kfs/file.h>
-#include <kfs/mmap.h>
-#include <kdb/btree.h>
-#include <klib/token.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/debug.h>
-#include <klib/rc.h>
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#define USE_EXTERN_TEXT_CMP 0
-
-
-typedef struct test_btree_stat test_btree_stat;
-struct test_btree_stat
-{
-    uint32_t type;
-    uint32_t first_seen;
-    uint32_t count;
-};
-
-static
-void test_btree_stat_report ( const void *key, size_t key_size, KBTreeValue *val, void *ignore )
-{
-    size_t bytes;
-    const test_btree_stat *stat;
-    rc_t rc = KBTreeValueAccessRead ( val, ( const void** ) & stat, & bytes );
-    if ( rc != 0 )
-        LOGERR ( klogInt, rc, "KBTreeValueAccessRead failed" );
-    else if ( bytes != sizeof * stat )
-        LOGMSG ( klogInt, "KBTreeValueAccessRead returned wrong size" );
-    else
-    {
-        printf ( "key: '%.*s'\n", ( int ) key_size, ( const char* ) key );
-        printf ( "  type %u\n", stat -> type );
-        printf ( "  first seen on line %u\n", stat -> first_seen );
-        printf ( "  occurs %u times.\n\n", stat -> count );
-    }
-}
-
-#if USE_EXTERN_TEXT_CMP
-static
-int bt_text_cmp ( const void *a, size_t asize, const void *b, size_t bsize )
-{
-    if ( asize < bsize )
-        return -1;
-    if ( asize > bsize )
-        return 1;
-    return memcmp ( a, b, asize );
-}
-#else
-#define bt_text_cmp NULL
-#endif
-
-static
-rc_t test_readonly1 ( const KDirectory *dir, const KFile *in )
-{
-    const KFile *backing;
-    rc_t rc = KDirectoryOpenFileRead ( dir, & backing, "test-btree.out" );
-    if ( rc == 0 )
-    {
-        const KBTree *bt;
-        rc = KBTreeMakeRead ( & bt, backing, 256 * 1024 * 1024, bt_text_cmp );
-        if ( rc != 0 )
-            LOGERR ( klogInt, rc, "KBTreeMakeRead failed" );
-        else
-        {
-            rc = KBTreeForEach ( bt, false, test_btree_stat_report, NULL );
-            if ( rc != 0 )
-                LOGERR ( klogInt, rc, "KBTreeForEach failed" );
-
-            KBTreeRelease ( bt );
-        }
-
-        KFileRelease ( backing );
-    }
-    return rc;
-}
-
-static
-rc_t test_readonly ( const KDirectory *dir, const KFile *in )
-{
-    rc_t rc;
-
-    rc = test_readonly1 ( dir, in );
-
-    return rc;
-}
-
-static
-rc_t make_text_entry ( KBTree *bt, const char *key, size_t key_size, int id, uint32_t lineno )
-{
-    static int entry = 0;
-
-    KBTreeValue val;
-    bool was_inserted;
-    test_btree_stat *stat;
-    rc_t rc = KBTreeEntry ( bt, & val, & was_inserted, sizeof * stat, key, key_size );
-    ++ entry;
-    if ( rc != 0 )
-    {
-        LOGERR ( klogInt, rc, "KBTreeEntry failed" );
-        printf ( "failed on entry %d\n", entry );
-        fflush ( stdout );
-    }
-    else
-    {
-        size_t bytes;
-        rc = KBTreeValueAccessUpdate ( & val, ( void** ) & stat, & bytes );
-        if ( rc != 0 )
-            LOGERR ( klogInt, rc, "KBTreeValueAccessUpdate failed" );
-        else
-        {
-            if ( bytes != sizeof * stat )
-                rc = -1;
-            else if ( was_inserted )
-            {
-                stat -> type = id;
-                stat -> first_seen = lineno;
-                stat -> count = 1;
-            }
-            else
-            {
-                ++ stat -> count;
-            }
-        }
-
-        KBTreeValueWhack ( & val );
-    }
-    return rc;
-}
-
-static
-rc_t test_update1 ( KDirectory *dir, const KFile *in, const char *path )
-{
-    KFile *out;
-    rc_t rc = KDirectoryCreateFile ( dir, & out, true, 0666, kcmInit, "test-btree.out" );
-    if ( rc == 0 )
-    {
-        size_t pgsize = KPageConstSize ();
-        size_t key_max = ( pgsize > 1024 ) ? 255 : ( pgsize - 8 - 24 ) / 2;
-
-        KBTree *bt;
-        rc = KBTreeMakeUpdate ( & bt, out,
-            256 * 1024 * 1024, false, kbtOpaqueKey,
-            8, sizeof ( test_btree_stat ),
-            1, key_max,
-            sizeof ( test_btree_stat ), sizeof ( test_btree_stat ),
-            bt_text_cmp );
-        if ( rc != 0 )
-            LOGERR ( klogInt, rc, "KBTreeMakeUpdate failed" );
-        else
-        {
-            const KMMap *mm;
-            rc = KMMapMakeRead ( & mm, in );
-            if ( rc == 0 )
-            {
-                const void *addr;
-                rc = KMMapAddrRead ( mm, &addr );
-                if ( rc == 0 )
-                {
-                    size_t size;
-                    rc = KMMapSize ( mm, & size );
-                    if ( rc == 0 )
-                    {
-                        char buffer [ 1024 ];
-
-                        /* have a memory mapped input file, and it's text
-                           ( er, at least that's the idea *. */
-                        KToken t;
-                        KTokenText ttxt;
-                        KTokenSource src;
-                        String sstr, pstr;
-
-                        /* test also assumes ASCII - sorry */
-                        StringInitCString ( & pstr, path );
-                        StringInit ( & sstr, addr, size, ( uint32_t ) size );
-                        KTokenTextInit ( & ttxt, & sstr, & pstr );
-                        KTokenSourceInit ( & src, & ttxt );
-
-                        /* okay, now parse the file */
-                        while ( KTokenizerNext ( kDefaultTokenizer, & src, & t ) -> id != eEndOfInput )
-                        {
-                            switch  ( t . id )
-                            {
-                            case eUntermString:
-                            case eString:
-                            case eUntermEscapedString:
-                            case eEscapedString:
-                                rc = KTokenToString ( & t, buffer, sizeof buffer, & size );
-                                if ( rc != 0 )
-                                    rc = 0;
-                                else
-                                    rc = make_text_entry ( bt, buffer, size, t . id, t . lineno );
-                                break;
-
-                            case eIdent:
-                            case eName:
-                                rc = make_text_entry ( bt, t . str . addr, t . str . size, t . id, t . lineno );
-                                break;
-                            }
-                        }
-                    }
-                }
-
-                KMMapRelease ( mm );
-            }
-
-            KBTreeRelease ( bt );
-        }
-
-        KFileRelease ( out );
-    }
-    return rc;
-}
-
-static
-rc_t test_update ( KDirectory *dir, const KFile *in, const char *path )
-{
-    rc_t rc;
-
-    rc = test_update1 ( dir, in, path );
-
-    return rc;
-}
-
-ver_t CC KAppVersion ( void )
-{
-    return 0;
-}
-
-
-const char UsageDefaultName[] = "vdb-unlock";
-
-rc_t CC UsageSummary ( const char *progname )
-{
-    return KOutMsg ( "\n"
-                     "Usage:\n"
-                     "  %s [Options] <target>\n"
-                     "\n"
-                     "Summary:\n"
-                     "  test the btree.\n"
-                     , progname
-        );
-}
-
-rc_t CC Usage ( const Args *args )
-{
-    const char * progname = UsageDefaultName;
-    const char * fullpath = UsageDefaultName;
-    rc_t rc;
-
-    if (args == NULL)
-        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
-    else
-        rc = ArgsProgram (args, &fullpath, &progname);
-    if (rc)
-        progname = fullpath = UsageDefaultName;
-
-    UsageSummary (progname);
-
-    KOutMsg ("Options:\n");
-
-    HelpOptionsStandard ();
-
-    HelpVersion (fullpath, KAppVersion());
-
-    return rc;
-}
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args *args;
-    rc_t rc = ArgsMakeAndHandle ( & args, argc, argv, 0 );
-    if ( rc != 0 )
-        LogErr ( klogErr, rc, "failed to parse arguments" );
-    else
-    {
-        KDirectory *wd;
-
-        const char *path = "test-btree.c";
-        if ( argc == 2 )
-            path = argv [ 1 ];
-
-        rc = KDirectoryNativeDir ( & wd );
-        if ( rc == 0 )
-        {
-            const KFile *in;
-            rc = KDirectoryOpenFileRead ( wd, & in, path );
-            if ( rc == 0 )
-            {
-                rc = test_update ( wd, in, path );
-                if ( rc == 0 )
-                    rc = test_readonly ( wd, in );
-
-                KFileRelease ( in );
-            }
-
-            KDirectoryRelease ( wd );
-        }
-    }
-    return rc;
-}
diff --git a/test/kdb/wkdbtest.cpp b/test/kdb/wkdbtest.cpp
deleted file mode 100644
index 3e07011..0000000
--- a/test/kdb/wkdbtest.cpp
+++ /dev/null
@@ -1,264 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for Kdb interface
-*/
-
-#include <ktst/unit_test.hpp>
-
-#include <sysalloc.h>
-
-#include <kdb/manager.h>
-#include <kdb/database.h>
-#include <kdb/index.h>
-#include <kdb/table.h>
-#include <kdb/column.h>
-#include <kdb/meta.h>
-
-using namespace std;
-
-TEST_SUITE(KdbTestSuite);
-
-#define KDB_MANAGER_MAKE(m_mgr, m_wd) KDBManagerMakeUpdate((KDBManager **)m_mgr, (struct KDirectory *)m_wd)
-#include "remote_open_test.cpp"
-
-class WKDB_Fixture
-{
-public:
-    WKDB_Fixture()
-    {
-        THROW_ON_RC ( KDirectoryNativeDir ( & m_wd ) );
-        THROW_ON_RC ( KDBManagerMakeUpdate ( & m_mgr, m_wd ) );
-    }
-    ~WKDB_Fixture()
-    {
-        KDBManagerRelease ( m_mgr );
-        KDirectoryRelease ( m_wd );
-    }
-    
-    std::string GetColumnMetadata ( const KColumn* p_col, const char* p_metadataName )
-    {
-        const KMetadata *meta;
-        THROW_ON_RC ( KColumnOpenMetadataRead( p_col, &meta ) );
-        const KMDataNode* node;
-        THROW_ON_RC ( KMetadataOpenNodeRead ( meta, & node, p_metadataName ) );
-        size_t num_read;
-        char buf[1024];
-        THROW_ON_RC ( KMDataNodeRead ( node, 0, buf, sizeof buf, & num_read, 0 ) );
-        THROW_ON_RC ( KMDataNodeRelease ( node ) );
-        THROW_ON_RC ( KMetadataRelease ( meta ) );
-        return string ( buf, num_read );
-    }
-    
-    KDirectory* m_wd;
-    KDBManager* m_mgr;
-};
-
-FIXTURE_TEST_CASE ( MissingRows, WKDB_Fixture )
-{   // VDB-177
-    KDirectoryRemove(m_wd, true, GetName());
-    KDatabase* db;
-    REQUIRE_RC(KDBManagerCreateDB(m_mgr, &db, kcmCreate, GetName()));
- 
-    KIndex *idx;
-    REQUIRE_RC(KDatabaseCreateIndex(db, &idx, kitText, kcmCreate, "index"));
-    
-    REQUIRE_RC(KIndexInsertText(idx, true, "aaaa1", 1));
-    REQUIRE_RC(KIndexInsertText(idx, true, "aaaa3", 3));
-    
-    int64_t start_id;
-    uint64_t id_count;
-    REQUIRE_RC(KIndexFindText (idx, "aaaa1", &start_id, &id_count, NULL, NULL));
-    REQUIRE_EQ(start_id, (int64_t)1);
-    REQUIRE_EQ(id_count, (uint64_t)1);
-    
-    REQUIRE_RC_FAIL(KIndexFindText (idx, "aaaa2", &start_id, &id_count, NULL, NULL));
-    REQUIRE_RC_FAIL(KIndexFindText (idx, "", &start_id, &id_count, NULL, NULL));
-    
-    REQUIRE_RC(KIndexFindText (idx, "aaaa3", &start_id, &id_count, NULL, NULL));
-    REQUIRE_EQ(start_id, (int64_t)3);
-    REQUIRE_EQ(id_count, (uint64_t)1);
-    
-    REQUIRE_RC(KIndexRelease(idx));
-   
-    REQUIRE_RC(KDatabaseRelease(db));
-    KDirectoryRemove(m_wd, true, GetName());
-}
-
-FIXTURE_TEST_CASE ( ColumnMetadataWKDB_Fixture, WKDB_Fixture )
-{
-    KDirectoryRemove(m_wd, true, GetName());
-    
-    const char* TableName = "tbl";
-    const char* ColumnName = "col";
-    const char* MetadataName = "metaname";
-    const char* MetadataValue = "metavalue";
-    
-    {
-        KDatabase* db;
-        REQUIRE_RC(KDBManagerCreateDB(m_mgr, &db, kcmCreate, GetName()));
-     
-        KTable* tbl;
-        REQUIRE_RC ( KDBManagerCreateTable ( m_mgr, & tbl, kcmInit + kcmMD5, TableName ) );
-        
-        KColumn* col;
-        REQUIRE_RC ( KTableCreateColumn ( tbl, & col, kcmInit, kcmMD5, 0, ColumnName ) );
-        
-        KMetadata *meta;
-        REQUIRE_RC ( KColumnOpenMetadataUpdate ( col, &meta ) );
-        
-        KMDataNode* node;
-        REQUIRE_RC ( KMetadataOpenNodeUpdate ( meta, & node, MetadataName ) );
-        
-        REQUIRE_RC ( KMDataNodeWrite ( node, MetadataValue, string_size ( MetadataValue ) ) );
-        
-        REQUIRE_RC ( KMDataNodeRelease ( node ) );
-        
-        REQUIRE_RC ( KMetadataRelease ( meta ) );
-       
-        // can only read after metadata has been released
-        REQUIRE_EQ ( string ( MetadataValue ), GetColumnMetadata ( col, MetadataName ) );
-        
-        REQUIRE_RC ( KColumnRelease ( col ) );
-        REQUIRE_RC ( KTableRelease ( tbl ) );
-        REQUIRE_RC ( KDatabaseRelease ( db ) );
-    }
-    {   // reopen, verify
-        KDatabase* db;
-        REQUIRE_RC ( KDBManagerOpenDBUpdate ( m_mgr, &db, GetName() ) );
-        
-        const KTable* tbl;
-        REQUIRE_RC ( KDBManagerOpenTableRead ( m_mgr, & tbl, TableName ) );
-        
-        const KColumn* col;
-        REQUIRE_RC ( KTableOpenColumnRead ( tbl, & col, ColumnName ) );
-        
-        REQUIRE_EQ ( string ( MetadataValue ), GetColumnMetadata ( col, MetadataName ) );
-        
-        REQUIRE_RC ( KColumnRelease ( col ) );
-        REQUIRE_RC ( KTableRelease ( tbl ) );
-        REQUIRE_RC ( KDatabaseRelease ( db ) );
-    }
-    
-    KDirectoryRemove(m_wd, true, TableName);
-    KDirectoryRemove(m_wd, true, GetName());
-}
-
-// KColumnBlob
-// see same tests on the read side, kdbtest.cpp
-
-class ColumnBlobReadFixture
-{
-public:
-    ColumnBlobReadFixture()
-    :   m_num_read ( 0 ),
-        m_remaining ( 0 )
-    {
-        KDBManager* mgr;
-        THROW_ON_RC ( KDBManagerMakeUpdate( & mgr, NULL ) );
-        
-        const KTable* tbl;
-        THROW_ON_RC ( KDBManagerOpenTableRead ( mgr, & tbl, "SRR000123" ) );
-        
-        const KColumn* col;
-        THROW_ON_RC ( KTableOpenColumnRead ( tbl, & col, "X" ) );
-        
-        THROW_ON_RC ( KColumnOpenBlobRead ( col, & m_blob, 1 ) );
-        
-        THROW_ON_RC ( KColumnRelease ( col ) );
-        THROW_ON_RC ( KTableRelease ( tbl ) );
-        THROW_ON_RC ( KDBManagerRelease ( mgr ) );
-    }
-    ~ColumnBlobReadFixture()
-    {
-        KColumnBlobRelease ( m_blob );
-    }
-
-    const KColumnBlob*  m_blob;
-    size_t m_num_read;
-    size_t m_remaining;
-};
-
-FIXTURE_TEST_CASE ( ColumnBlobRead_basic, ColumnBlobReadFixture )
-{   
-    const size_t BlobSize = 1882; 
-    const size_t BufSize = 2024; 
-    char buffer [ BufSize ];
-    REQUIRE_RC ( KColumnBlobRead ( m_blob, 0, buffer, BufSize, & m_num_read, & m_remaining ) );
-    REQUIRE_EQ ( BlobSize, m_num_read );
-    REQUIRE_EQ ( (size_t)0, m_remaining );
-}
-
-FIXTURE_TEST_CASE ( ColumnBlobRead_insufficient_buffer, ColumnBlobReadFixture )
-{   
-    const size_t BlobSize = 1882; 
-    const size_t BufSize = 1024; 
-    char buffer [ BufSize ];
-    // first read incomplete
-    REQUIRE_RC ( KColumnBlobRead ( m_blob, 0, buffer, BufSize, & m_num_read, & m_remaining ) );
-    REQUIRE_EQ ( BufSize, m_num_read );
-    REQUIRE_EQ ( BlobSize - BufSize, m_remaining );
-    // the rest comes in on the second read
-    REQUIRE_RC ( KColumnBlobRead ( m_blob, BufSize, buffer, BufSize, & m_num_read, & m_remaining ) );
-    REQUIRE_EQ ( BlobSize - BufSize, m_num_read );
-    REQUIRE_EQ ( (size_t)0, m_remaining );
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-#include <klib/debug.h> // KDbgSetString
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-wkdb";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    //assert(!KDbgSetString("KFG"));
-    //assert(!KDbgSetString("VFS"));
-    KConfigDisableUserSettings();
-    rc_t rc=KdbTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/kfc/Makefile b/test/kfc/Makefile
deleted file mode 100644
index 67c4042..0000000
--- a/test/kfc/Makefile
+++ /dev/null
@@ -1,57 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-MODULE = test/kfc
-
-TEST_TOOLS = \
-	test-except
-
-include $(TOP)/build/Makefile.env
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: $(ALL_LIBS) $(TEST_TOOLS)
-
-clean: stdclean
-
-#-------------------------------------------------------------------------------
-# white-box test
-#
-TEST_SRC = \
-	test-except \
-	kfc \
-    
-TEST_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_SRC))
-
-TEST_LIB = \
-	-sklib
-
-$(TEST_BINDIR)/test-except: $(TEST_OBJ)
-	$(LD) --exe -o $@ $^ $(TEST_LIB)
diff --git a/test/kfc/kfc.c b/test/kfc/kfc.c
deleted file mode 100755
index c53cf6d..0000000
--- a/test/kfc/kfc.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "../libs/kfc/xc.c"
-#include "../libs/kfc/except.c"
-#include "../libs/kfc/tstate.c"
diff --git a/test/kfc/test-except.c b/test/kfc/test-except.c
deleted file mode 100644
index e7dd4e8..0000000
--- a/test/kfc/test-except.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#include <kfc/extern.h>
-#include <kfc/tstate.h>
-#include <kfc/rsrc.h>
-#include <kfc/ctx.h>
-#include <kfc/except.h>
-#include <kfc/rc.h>
-#include <kfc/xc.h>
-#include <kfc/xcdefs.h>
-#include <klib/text.h>
-
-#include <sysalloc.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-static
-void immediate_error_no_clean ( ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcExe, rcFunction, rcValidating );
-    UNIMPLEMENTED ();
-}
-
-static
-void child_error_no_clean ( ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcExe, rcFunction, rcValidating );
-    immediate_error_no_clean ( ctx );
-}
-
-static
-void immediate_error_clean ( ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcExe, rcFunction, rcValidating );
-    UNIMPLEMENTED ();
-    CLEAR ();
-}
-
-
-static
-void run_test ( KRsrc * rsrc, ctx_t ctx, void ( * test ) ( ctx_t ctx ) )
-{
-    rsrc -> thread = KProcMgrMakeThreadState ( ( void * ) 1 );
-
-    ( * test ) ( ctx );
-
-    KThreadStateWhack ( rsrc -> thread );
-    rsrc -> thread = NULL;
-}
-
-static
-void test_except ( KRsrc * rsrc, ctx_t ctx )
-{
-    FUNC_ENTRY ( ctx, rcExe, rcFunction, rcValidating );
-    run_test ( rsrc, ctx, immediate_error_no_clean );
-    run_test ( rsrc, ctx, child_error_no_clean );
-    ON_FAIL ( run_test ( rsrc, ctx, immediate_error_clean ) ) return;
-}
-
-int main ( int argc, char * argv [] )
-{
-    int status;
-    KRsrc rsrc;
-    KCtx local_ctx, * ctx = & local_ctx;
-    DECLARE_FUNC_LOC ( rcExe, rcFunction, rcValidating ); /* ! */
-
-    memset ( & rsrc, 0, sizeof rsrc );
-
-    memset ( & local_ctx, 0, sizeof local_ctx );
-    local_ctx . rsrc = & rsrc;
-    local_ctx . loc = & s_func_loc;
-
-    TRY ( test_except ( & rsrc, ctx ) )
-    {
-        fprintf ( stderr, "%s - succeeded\n", argv [ 0 ] );
-        status = 0;
-    }
-    CATCH_ALL ()
-    {
-        fprintf ( stderr, "%s - failed\n", argv [ 0 ] );
-        status = 1;
-    }
-
-    return status;
-}
-
-#if WINDOWS
-int CC wmain ( int argc, wchar_t * wargv [] )
-{
-    int i, status;
-    char ** argv = malloc ( argc * sizeof * argv );
-    for ( i = 0; i < argc; ++ i )
-    {
-        size_t src_size, dst_size;
-        uint32_t len = wchar_cvt_string_measure ( wargv [ i ], & src_size, & dst_size );
-        char * dst = malloc ( dst_size + 1 );
-        wchar_cvt_string_copy ( dst, dst_size + 1, wargv [ i ], src_size );
-        argv [ i ] = dst;
-    }
-
-    status = main ( argc, argv );
-
-    for ( i = 0; i < argc; ++ i )
-        free ( argv [ i ] );
-    free ( argv );
-
-    return status;
-}
-#endif
diff --git a/test/kfg/Makefile b/test/kfg/Makefile
deleted file mode 100644
index f90a34c..0000000
--- a/test/kfg/Makefile
+++ /dev/null
@@ -1,139 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-
-MODULE = test/kfg
-
-TEST_TOOLS = \
-	flat-sra-kfg \
-	wb-test-kfg \
-	test-kfg \
-	test-repository \
-	test-keystore
-
-include $(TOP)/build/Makefile.env
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: $(TEST_TOOLS)
-
-clean: stdclean
-
-#-------------------------------------------------------------------------------
-# ncbi-home-from-env
-
-ENV_SRC = \
-	ncbi-home-from-env
-
-ENV_OBJ = \
-	$(addsuffix .$(OBJX),$(ENV_SRC))
-
-$(TEST_BINDIR)/ncbi-home-from-env: $(ENV_OBJ)
-	$(LP) --exe -o $@ $^ $(ENV_LIB) 
-
-#-------------------------------------------------------------------------------
-# white-box test
-#
-TEST_SRC = \
-	wb-test-kfg
-
-TEST_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_SRC))
-
-TEST_LIB = \
-	-sktst \
-	-skapp \
-    -sncbi-vdb
-
-$(TEST_BINDIR)/wb-test-kfg: $(TEST_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_LIB)
-
-#-------------------------------------------------------------------------------
-# flat-sra-kfg
-
-FLAT_SRC = \
-	flat-sra-kfg
-
-FLAT_OBJ = \
-	$(addsuffix .$(OBJX),$(FLAT_SRC))
-
-$(TEST_BINDIR)/flat-sra-kfg: $(FLAT_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_LIB)
-
-#-------------------------------------------------------------------------------
-# test-kfg
-#
-TEST_KFG_SRC = \
-	kfgtest 
-
-TEST_KFG_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_KFG_SRC))
-
-TEST_KFG_LIB = \
-	-sktst \
-	-skapp \
-    -sncbi-vdb
-
-$(TEST_BINDIR)/test-kfg: $(TEST_KFG_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_KFG_LIB)
-
-#-------------------------------------------------------------------------------
-# test-repository
-#
-TEST_REPOSITORY_SRC = \
-	repositorytest 
-
-TEST_REPOSITORY_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_REPOSITORY_SRC))
-
-TEST_REPOSITORY_LIB = \
-	-sktst \
-	-skapp \
-    -sncbi-vdb
-
-$(TEST_BINDIR)/test-repository: $(TEST_REPOSITORY_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_REPOSITORY_LIB)
-
-#-------------------------------------------------------------------------------
-# test-keystore
-#
-TEST_KEYSTORE_SRC = \
-	keystoretest 
-
-TEST_KEYSTORE_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_KEYSTORE_SRC))
-
-TEST_KEYSTORE_LIB = \
-	-sktst \
-	-skapp \
-    -sncbi-vdb
-
-$(TEST_BINDIR)/test-keystore: $(TEST_KEYSTORE_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_KEYSTORE_LIB)
-
diff --git a/test/kfg/config.linux.kfg b/test/kfg/config.linux.kfg
deleted file mode 100644
index d7482f2..0000000
--- a/test/kfg/config.linux.kfg
+++ /dev/null
@@ -1,26 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-# no longer doing includes
-kfg/includes = "alt-include"
diff --git a/test/kfg/config.schema.kfg b/test/kfg/config.schema.kfg
deleted file mode 100644
index 6b42d1e..0000000
--- a/test/kfg/config.schema.kfg
+++ /dev/null
@@ -1,25 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-vdb/schema/paths = "/panfs/traces01/trace_software/sdk/interfaces"
diff --git a/test/kfg/config.sra.kfg b/test/kfg/config.sra.kfg
deleted file mode 100644
index d2995ed..0000000
--- a/test/kfg/config.sra.kfg
+++ /dev/null
@@ -1,29 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-# sra servers
-sra/servers = "/panfs/traces01"
-sra/ncbi/volumes = "sra2:sra1:sra0"
-sra/ebi/volumes = "era1:era0"
-sra/ddbj/volumes = "dra0"
diff --git a/test/kfg/flat-sra-kfg.cpp b/test/kfg/flat-sra-kfg.cpp
deleted file mode 100644
index d647931..0000000
--- a/test/kfg/flat-sra-kfg.cpp
+++ /dev/null
@@ -1,415 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ==============================================================================
-*
-*/
-
-#include <kfg/config.h> /* KConfig */
-#include <kfs/directory.h> /* KDirectory */
-#include <kfs/file.h> /* KFileRelease */
-#include <kns/kns-mgr-priv.h> /* KNSManagerMakeReliableHttpFile */
-#include <kns/manager.h> /* KNSManagerMake */
-#include <ktst/unit_test.hpp>
-#include <vfs/manager.h> /* VFSManagerRelease */
-#include <vfs/manager-priv.h> /* VFSManagerMakeFromKfg */
-#include <vfs/resolver.h> /* VResolver */
-#include <vfs/path.h> /* VPath */
-#include <climits> /* PATH_MAX */
-
-#define ALL
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 != 0 && rc == 0) { rc = rc2; } obj = NULL; } while (false)
-
-using ncbi::NK::TestCase;
-using std::cerr;
-using std::string;
-
-TEST_SUITE(flatSraKfgTestSuite);
-
-static KNSManager * kns = NULL;
-
-class Test : private TestCase {
-    TestCase *_dad;
-
-    void compare ( const VPath * remote, const string & expected ) {
-        assert ( expected . size ( ) );
-        char buffer [ PATH_MAX ] = "";
-        size_t num_read = 0;
-        REQUIRE_RC( VPathReadUri ( remote, buffer, sizeof buffer, & num_read) );
-        REQUIRE ( num_read );
-        REQUIRE_LT ( num_read, sizeof buffer );
-        REQUIRE_EQ ( buffer [ num_read ], '\0' );
-        REQUIRE_EQ ( expected, string ( buffer ) );
-    }
-
-public:
-    Test(TestCase *dad, const VFSManager * manager, const KConfig * config,
-            const VPath * queryShort, const VPath * queryLong,
-            const string & name, const string & expectedShort = "",
-                                 const string & expectedLong  = "")
-        : TestCase(name), _dad(dad)
-    {
-        rc_t rc = 0;
-
-        VResolver * resolver = NULL;
-        REQUIRE_RC ( VFSManagerMakeResolver ( manager, & resolver, config ) );
-
-        const VPath * remote = NULL;
-        const KFile * f = NULL;
-        if ( expectedShort . size () ) {
-            REQUIRE_RC ( VResolverQuery
-                ( resolver, eProtocolHttp, queryShort, NULL, & remote, NULL ) );
-            compare ( remote, expectedShort );
-            RELEASE ( VPath, remote );
-            REQUIRE_RC ( KNSManagerMakeReliableHttpFile
-                ( kns, & f, NULL, 0x01010000, expectedShort . c_str () ) );
-            RELEASE ( KFile, f );
-        } else {
-            REQUIRE_RC_FAIL ( VResolverQuery
-                ( resolver, eProtocolHttp, queryShort, NULL, & remote, NULL ) );
-        }
-
-        if ( expectedLong . size () ) {
-            REQUIRE_RC ( VResolverQuery
-                ( resolver, eProtocolHttp, queryLong, NULL, & remote, NULL ) );
-            compare ( remote, expectedLong );
-            RELEASE ( VPath, remote );
-            REQUIRE_RC ( KNSManagerMakeReliableHttpFile
-                ( kns, & f, NULL, 0x01010000, expectedLong . c_str () ) );
-            RELEASE ( KFile, f );
-        } else {
-            REQUIRE_RC_FAIL ( VResolverQuery
-                ( resolver, eProtocolHttp, queryLong, NULL, & remote, NULL ) );
-        }
-
-
-        RELEASE ( VResolver, resolver );
-
-        REQUIRE_EQ ( rc, 0u );
-
-    }
-
-    ~Test(void) {
-        assert(_dad);
-        _dad->ErrorCounterAdd(GetErrorCounter());
-    }
-};
-
-static const char cgiPath[] = "/repository/remote/main/CGI/resolver-cgi";
-static const char goodCgi[]
-    = "http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi";
-static const char badCgi[]
-    = "http://XXX.ncbi.nlm.nih.gov/Traces/names/names.cgi";
-#ifdef ALL
-TEST_CASE(test_sra) {
-    const string newShort
-        ("http://sra-download.ncbi.nlm.nih.gov/srapub/SRR000001");
-    const string newLong
-        ("http://sra-download.ncbi.nlm.nih.gov/srapub/SRR1000254");
-    const string oldShort("http://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/"
-                "reads/ByRun/sra/SRR/SRR000/SRR000001/SRR000001.sra");
-
-    rc_t rc = 0;
-
-    KDirectory * native = NULL;
-    REQUIRE_RC ( KDirectoryNativeDir ( & native ) );
-
-    const KDirectory * dirc = NULL;
-    KConfig * cfg = NULL;
-    VFSManager * mgr = NULL;
-
-    // LOAD OLD CONFIGURATION
-    REQUIRE_RC(KDirectoryOpenDirRead(native, &dirc, false, "flat-sra-kfg/old"));
-    REQUIRE_RC ( KConfigMake ( & cfg, dirc ) );
-    REQUIRE_RC ( VFSManagerMakeFromKfg ( & mgr, cfg ) );
-
-    VPath * queryShort = NULL;
-    REQUIRE_RC ( VFSManagerMakeAccPath ( mgr, & queryShort, "SRR000001" ) );
-
-    VPath * queryLong = NULL;
-    REQUIRE_RC ( VFSManagerMakeAccPath ( mgr, & queryLong, "SRR1000254" ) );
-
-//  const char rootPath [] = "/repository/remote/aux/NCBI/root";
-//  const char newRoot[]  = "http://sra-download.ncbi.nlm.nih.gov";
-
-    // fail using incomplete configuration
-    Test(this, mgr, cfg, queryShort, queryLong, "incomplete-old");
-
-    // resolve using correct cgi
-    REQUIRE_RC ( KConfigWriteString ( cfg, cgiPath, goodCgi ) );
-    Test(this, mgr, cfg, queryShort, queryLong, "cgi-old", newShort, newLong);
-
-    // fail using incorrect cgi
-    REQUIRE_RC ( KConfigWriteString ( cfg, cgiPath, badCgi ) );
-    Test(this, mgr, cfg, queryShort, queryLong, "bad cgi-old");
-
-/* aux repositories are ignored : VDB-3090 
-    // old aux configuration cannot resolve long accession
-    const char oldRoot  []  = "http://ftp-trace.ncbi.nlm.nih.gov/sra";
-    REQUIRE_RC ( KConfigWriteString ( cfg, rootPath, oldRoot ) );
-    Test(this, mgr, cfg, queryShort, queryLong, "aux-old", oldShort);
-*/
-
-    // LOAD NEW CONFIGURATION
-    RELEASE ( VFSManager, mgr );
-    RELEASE ( KConfig, cfg );
-    RELEASE ( KDirectory, dirc );
-
-    REQUIRE_RC(KDirectoryOpenDirRead(native, &dirc, false, "flat-sra-kfg/new"));
-    REQUIRE_RC ( KConfigMake ( & cfg, dirc ) );
-    REQUIRE_RC ( VFSManagerMakeFromKfg ( & mgr, cfg ) );
-
-    // fail using incomplete configuration
-    Test(this, mgr, cfg, queryShort, queryLong, "incomplete-new");
-
-    // resolve using correct cgi
-    REQUIRE_RC ( KConfigWriteString ( cfg, cgiPath, goodCgi ) );
-    Test(this, mgr, cfg, queryShort, queryLong, "cgi-new", newShort, newLong);
-
-    // fail using incorrect cgi
-    REQUIRE_RC ( KConfigWriteString ( cfg, cgiPath, badCgi ) );
-    Test(this, mgr, cfg, queryShort, queryLong, "bad cgi-new");
-
-/* aux repositories are ignored : VDB-3090 
-    // resolve using new aux configuration
-    REQUIRE_RC ( KConfigWriteString ( cfg, rootPath, newRoot ) );
-    Test(this, mgr, cfg, queryShort, queryLong, "aux-new", newShort, newLong);
-*/
-
-    RELEASE ( VFSManager, mgr );
-    RELEASE ( KConfig, cfg );
-    RELEASE ( KDirectory, dirc );
-
-    RELEASE ( VPath, queryLong );
-
-    RELEASE ( VPath, queryShort );
-
-    RELEASE ( KDirectory, native );
-
-    REQUIRE_EQ ( rc, 0u );
-}
-#endif
-
-class Fixture : private TestCase {
-    TestCase *_dad;
-public:
-    Fixture(TestCase *dad, const string & tname,
-             const char * acc, const char * name, const char * value,
-             const char * expected = "" )
-        : TestCase(tname), _dad(dad)
-    {
-        rc_t rc = 0;
-
-        KDirectory * native = NULL;
-        REQUIRE_RC ( KDirectoryNativeDir ( & native ) );
-
-        const KDirectory * dir = NULL;
-        REQUIRE_RC(KDirectoryOpenDirRead
-            (native, &dir, false, "flat-sra-kfg/aux_root"));
-
-        KConfig * cfg;
-        REQUIRE_RC ( KConfigMake ( & cfg, dir ) );
-
-        VFSManager * mgr = NULL;
-        REQUIRE_RC ( VFSManagerMakeFromKfg ( & mgr, cfg ) );
-
-        VPath * query = NULL;
-        if ( string ( value ) == "refseq" ) {
-            REQUIRE_RC ( VFSManagerMakeAccPath
-                ( mgr, & query, "ncbi-acc:%s?vdb-ctx=refseq", acc ) );
-        } else {
-            REQUIRE_RC ( VFSManagerMakeAccPath ( mgr, & query, acc ) );
-        }
-
-        const VPath * remoteCgi = NULL;
-        const VPath * remote = NULL;
-        VResolver * resolver = NULL;
-
-        REQUIRE_RC ( VFSManagerMakeResolver ( mgr, & resolver, cfg ) );
-// fail to resolve using empty config
-        REQUIRE_RC_FAIL ( VResolverQuery
-            ( resolver, eProtocolHttp, query, NULL, & remote, NULL ) );
-        RELEASE ( VResolver, resolver );
-
-// resolve using good cgi
-        REQUIRE_RC ( KConfigWriteString ( cfg, cgiPath, goodCgi ) );
-        REQUIRE_RC ( VFSManagerMakeResolver ( mgr, & resolver, cfg ) );
-
-        REQUIRE_RC ( VResolverQuery
-            ( resolver, eProtocolHttp, query, NULL, & remoteCgi, NULL ) );
-        if ( ! expected ) {
-cerr << "\nTO FIX !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :\n "
-            << "\tVResolverQuery(CGI, " << acc << ") SHOULD FAIL !!!!!!!!!!!\n";
-        }
-
-        RELEASE ( VResolver, resolver );
-
-// fail to resolve using bad cgi
-        REQUIRE_RC ( KConfigWriteString ( cfg, cgiPath, badCgi ) );
-        REQUIRE_RC ( VFSManagerMakeResolver ( mgr, & resolver, cfg ) );
-        REQUIRE_RC_FAIL ( VResolverQuery
-            ( resolver, eProtocolHttp, query, NULL, & remote, NULL ) );
-        RELEASE ( VResolver, resolver );
-
-// resolve using aux configuration
-        REQUIRE_RC ( KConfigWriteString ( cfg, name, value ) );
-        REQUIRE_RC ( VFSManagerMakeResolver ( mgr, & resolver, cfg ) );
-        REQUIRE_RC ( VResolverQuery
-            ( resolver, eProtocolHttp, query, NULL, & remote, NULL ) );
-        if ( ! expected ) {
-cerr << "TO FIX !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :\n "
-            << "\tVResolverQuery(AUX, " << acc << ") SHOULD FAIL !!!!!!!!!!!\n";
-        }
-        RELEASE ( VResolver, resolver );
-
-// compare cgi and aux results
-        char buffer [ PATH_MAX ] = "";
-        size_t num_read = 0;
-        REQUIRE_RC (VPathReadUri(remote, buffer, sizeof buffer, & num_read));
-        REQUIRE ( num_read );
-        REQUIRE_LT ( num_read, sizeof buffer );
-        REQUIRE_EQ ( buffer [ num_read ], '\0' );
-
-        char buffrC [ PATH_MAX ] = "";
-        size_t num_readC = 0;
-        REQUIRE_RC(VPathReadUri(remoteCgi, buffrC, sizeof buffrC, &num_readC) );
-        REQUIRE ( num_readC );
-        REQUIRE_LT ( num_readC, sizeof buffrC );
-        REQUIRE_EQ ( buffrC [ num_readC ], '\0' );
-
-if ((string(acc) != "AAAB01" || string(value) != "refseq")
-  && (num_read == num_readC))
-{ // https://jira.ncbi.nlm.nih.gov/browse/VDB-3046?focusedCommentId=4421122&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-4421122
-        REQUIRE_EQ ( string ( buffer ) , string ( buffrC ) );
-        REQUIRE_EQ ( num_read, num_readC );
-        const KFile * f = NULL;
-        REQUIRE_RC
-            (KNSManagerMakeReliableHttpFile(kns, &f, NULL, 0x01010000, buffer));
-        RELEASE ( KFile, f );
-        if ( string (acc) == "AAAB01.1"
-          && expected && expected [ 0 ] && string ( expected ) != buffer)
-        {
-cerr << "\nTO FIX !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :\n "
-            << acc << "(" << tname << "):\tREAL    : " << buffer << "\n"
-             "                        \tEXPECTED: " << expected << "\n\n";
-        } else {
-            assert ( ! expected || ! expected [ 0 ] );
-            cerr << acc << "(" << tname << "): " << buffer << "\n";
-        }
-} else
-cerr << "\nTO FIX !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :\n "
-            << acc << "(" << tname << "): AUX: " << buffer << "\n"
-                 "                        CGI: " << buffrC << "\n\n";
-
-        RELEASE ( VPath, remote );
-        RELEASE ( VPath, remoteCgi );
-
-        RELEASE ( VPath, query );
-
-        RELEASE ( VFSManager, mgr );
-
-        RELEASE ( KConfig, cfg );
-
-        RELEASE ( KDirectory, dir );
-
-        RELEASE ( KDirectory, native );
-
-        REQUIRE_EQ ( rc, 0u );
-    }
-    ~Fixture(void) {
-        assert ( _dad );
-        rc_t rc = 0;
-        REQUIRE_EQ ( rc, 0u );
-        _dad->ErrorCounterAdd(GetErrorCounter());
-    }
-};
-/* aux repositories are ignored : VDB-3090 
-#ifdef ALL
-TEST_CASE(test_nakmer) {
-    Fixture fixture(this, "nakmer", "GCA_000391885.1_R",
-        "/repository/remote/aux/NCBI/apps/nakmer/volumes/fuseNAKMER", "sadb");
-}
-TEST_CASE(test_nannot) {
-    Fixture fixture(this, "nannot", "NA000000007.1",
-        "/repository/remote/aux/NCBI/apps/nannot/volumes/fuseNANNOT", "sadb");
-}
-#endif
-#ifdef ALL
-TEST_CASE(test_AAAB01_1) {
-    Fixture fixture(this, "refseq AAAB01.1", "AAAB01.1",
-        "/repository/remote/aux/NCBI/apps/refseq/volumes/refseq", "refseq",
-        "http://ftp-trace.ncbi.nlm.nih.gov/sra/refseq/AAAB01" );
-}
-#endif
-#ifdef ALL
-TEST_CASE(test_AAAB01) {
-    Fixture fixture(this, "refseq AAAB01", "AAAB01",
-        "/repository/remote/aux/NCBI/apps/refseq/volumes/refseq", "refseq" );
-}
-#endif
-#ifdef ALL
-TEST_CASE(test_AAAB01000001) {
-    Fixture fixture(this, "refseq AAAB01000001", "AAAB01000001",
-        "/repository/remote/aux/NCBI/apps/refseq/volumes/refseq", "refseq" );
-}
-#endif
-/ * TEST_CASE(test_AAAB01_2) {
-    Fixture fixture(this, "refseq AAAB01.2", "AAAB01.2",
-        "/repository/remote/aux/NCBI/apps/refseq/volumes/refseq", "refseq" );
-} * /
-#ifdef ALL
-TEST_CASE(test_KC702199) {
-    Fixture fixture(this, "refseq KC702199.1", "KC702199.1",
-        "/repository/remote/aux/NCBI/apps/refseq/volumes/refseq", "refseq" );
-}
-#endif
-TEST_CASE(test_WGS) {
-    Fixture fixture(this, "WGS", "AFVF01.1",
-        "/repository/remote/aux/NCBI/apps/wgs/volumes/fuseWGS", "wgs" );
-}
-TEST_CASE(test_WGS_AAAB01) {
-    Fixture fixture(this, "WGS AAAB01", "AAAB01",
-        "/repository/remote/aux/NCBI/apps/wgs/volumes/fuseWGS", "wgs" );
-}
-TEST_CASE(test_WGS_AAAB01_1) {
-    Fixture fixture(this, "WGS AAAB01_1", "AAAB01.1",
-        "/repository/remote/aux/NCBI/apps/wgs/volumes/fuseWGS", "wgs",
-        "http://ftp-trace.ncbi.nlm.nih.gov/sra/wgs/AA/AB/AAAB01.1" );
-}
-TEST_CASE(test_WGS_AAAB01_9) {
-    Fixture fixture(this, "WGS AAAB01_2", "AAAB01.9",
-        "/repository/remote/aux/NCBI/apps/wgs/volumes/fuseWGS", "wgs", NULL );
-}*/
-extern "C" {
-    ver_t CC KAppVersion ( void ) { return 0; }
-    rc_t CC KMain ( int argc, char *argv [] ) {
-        KConfigDisableUserSettings();
-        rc_t rc = KNSManagerMake(&kns);
-        if (rc == 0) {
-            rc = flatSraKfgTestSuite(argc, argv);
-        }
-        RELEASE(KNSManager, kns);
-        return rc;
-    }
-}
diff --git a/test/kfg/flat-sra-kfg/aux_root/empty.kfg b/test/kfg/flat-sra-kfg/aux_root/empty.kfg
deleted file mode 100644
index 0b41a6b..0000000
--- a/test/kfg/flat-sra-kfg/aux_root/empty.kfg
+++ /dev/null
@@ -1 +0,0 @@
-/repository/remote/aux/NCBI/root = "http://ftp-trace.ncbi.nlm.nih.gov/sra"
diff --git a/test/kfg/flat-sra-kfg/new/sraFlat.kfg b/test/kfg/flat-sra-kfg/new/sraFlat.kfg
deleted file mode 100644
index b66c665..0000000
--- a/test/kfg/flat-sra-kfg/new/sraFlat.kfg
+++ /dev/null
@@ -1 +0,0 @@
-/repository/remote/aux/NCBI/apps/sra/volumes/flat = "srapub"
diff --git a/test/kfg/flat-sra-kfg/old/fuse1000.kfg b/test/kfg/flat-sra-kfg/old/fuse1000.kfg
deleted file mode 100644
index 3b9f4cd..0000000
--- a/test/kfg/flat-sra-kfg/old/fuse1000.kfg
+++ /dev/null
@@ -1 +0,0 @@
-/repository/remote/aux/NCBI/apps/sra/volumes/fuse1000 = "sra-instant/reads/ByRun/sra"
diff --git a/test/kfg/keystoretest.cpp b/test/kfg/keystoretest.cpp
deleted file mode 100644
index 728d8f8..0000000
--- a/test/kfg/keystoretest.cpp
+++ /dev/null
@@ -1,429 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for KKeyStore interfaces
-*/
-
-#include <ktst/unit_test.hpp>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/lockfile.h>
-
-#include <kfg/keystore.h>
-#include <kfg/keystore-priv.h>
-#include <kfg/config.h>
-#include <kfg/kfg-priv.h>
-
-#include <klib/text.h>
-
-#include <kproc/thread.h>
-
-#include <fstream>
-#include <stdexcept>
-
-using namespace std;
-using namespace ncbi::NK;
-
-TEST_SUITE(KeyStoreTestSuite);
-
-TEST_CASE(KeyStoreMake)
-{
-    KKeyStore* ks = 0;
-    REQUIRE_RC(KKeyStoreMake(&ks, NULL));
-    REQUIRE_NOT_NULL(ks);
-    REQUIRE_RC(KKeyStoreRelease(ks));
-}
-
-class KeyStoreFixture
-{
-public:
-    KeyStoreFixture()
-    : key(0)
-    {
-        if (KConfigMake(&kfg, NULL) != 0)
-           throw logic_error("KeyStoreFixture: KConfigMake failed");
-        if (KKeyStoreMake(&ks, kfg) != 0)
-           throw logic_error("KeyStoreFixture: KKeyStoreMake failed");
-        if (KDirectoryNativeDir(&wd) != 0)
-           throw logic_error("KeyStoreFixture: KDirectoryNativeDir failed");
-    }
-    ~KeyStoreFixture()
-    {
-        if (KEncryptionKeyRelease(key) != 0)
-           throw logic_error("~KeyStoreFixture: KEncryptionKeyRelease failed");
-        if (KDirectoryRelease(wd) != 0)
-           throw logic_error("~KeyStoreFixture: KDirectoryRelease failed");
-        if (KKeyStoreRelease(ks) != 0)
-           throw logic_error("~KeyStoreFixture: KKeyStoreRelease failed");
-        if (KConfigRelease(kfg) != 0)
-           throw logic_error("~KeyStoreFixture: KConfigRelease failed");
-    }
-    void KfgUpdateNode(const char* key, const char* value)
-    {
-        KConfigNode *node;
-        if (KConfigOpenNodeUpdate(kfg, &node, key) != 0)
-            throw logic_error("KfgUpdateNode: KConfigOpenNodeUpdate failed");
-        if (KConfigNodeWrite(node, value, string_measure(value, NULL)) != 0)
-            throw logic_error("KfgUpdateNode: KConfigNodeWrite failed");
-        if (KConfigNodeRelease(node) != 0)
-            throw logic_error("KfgUpdateNode: KConfigNodeRelease failed");
-    }    
-
-    KConfig* kfg;
-    KKeyStore* ks;
-    KDirectory* wd;
-    KEncryptionKey* key;
-};
-
-// NB: strangely enough, KKeyStoreGetKey ignores its 2nd parameter (obj_name)
-
-FIXTURE_TEST_CASE(KeyStoreGetKey_TempFile, KeyStoreFixture)
-{
-    const char tempKey[] = "tempkey from file";
-    {
-        ofstream f(GetName());
-        f << tempKey;
-    }
-
-    const KFile* file;
-    REQUIRE_RC(KDirectoryOpenFileRead(wd, &file, GetName()));
-    
-    REQUIRE_RC(KKeyStoreSetTemporaryKeyFromFile(ks, file));
-    
-    REQUIRE_RC(KKeyStoreGetKey(ks, "boohoo i am ignored here", &key)); 
-    REQUIRE_NOT_NULL(key);
-    REQUIRE_EQ(string(tempKey), string(key->value.addr, key->value.len));
-    
-    // now. ask to forget
-    REQUIRE_RC(KKeyStoreSetTemporaryKeyFromFile(ks, NULL));
-    REQUIRE_RC_FAIL(KKeyStoreGetKey(ks, "boohoo i am ignored here", &key)); 
-    
-    REQUIRE_RC(KFileRelease(file));
-    REQUIRE_RC(KDirectoryRemove(wd, true, GetName()));
-}
-
-FIXTURE_TEST_CASE(KeyStoreGetKey_Kfg_Default, KeyStoreFixture)
-{
-    REQUIRE_RC_FAIL(KKeyStoreGetKey(ks, "", &key));
-}
-
-FIXTURE_TEST_CASE(KeyStoreGetKey_Kfg, KeyStoreFixture)
-{
-    const char tempKey[] = "tempkey from file";
-    {
-        ofstream f(GetName());
-        f << tempKey << endl;
-    }
-    
-    KfgUpdateNode(KFG_KRYPTO_PWFILE, GetName());
-    
-    REQUIRE_RC(KKeyStoreSetConfig(ks, kfg));
-    
-    REQUIRE_RC(KKeyStoreGetKey(ks, NULL, &key));
-    REQUIRE_NOT_NULL(key);
-    REQUIRE_EQ(string(tempKey), string(key->value.addr, key->value.len));
-    
-    REQUIRE_RC(KDirectoryRemove(wd, true, GetName()));
-}
-
-FIXTURE_TEST_CASE(KeyStoreGetKey_Protected, KeyStoreFixture)
-{
-    const char tempKey[] = "another tempkey from file";
-    {
-        ofstream f(GetName());
-        f << tempKey << endl;
-    }
-    
-    KfgUpdateNode("/repository/user/protected/dbGaP-2956/root", ".");
-    KfgUpdateNode("/repository/user/protected/dbGaP-2956/encryption-key-path", GetName());
-
-    REQUIRE_RC(KKeyStoreSetConfig(ks, kfg));
-    
-    REQUIRE_RC(KKeyStoreGetKey(ks, "just give us the current repo's key", &key));
-    REQUIRE_NOT_NULL(key);
-    REQUIRE_EQ(string(tempKey), string(key->value.addr, key->value.len));
-    
-    REQUIRE_RC(KDirectoryRemove(wd, true, GetName()));
-}
-
-FIXTURE_TEST_CASE(KeyStoreGetKeyById_Protected, KeyStoreFixture)
-{
-    const char tempKey[] = "another tempkey from file";
-    {
-        ofstream f(GetName());
-        f << tempKey << endl;
-    }
-    
-    KfgUpdateNode("/repository/user/protected/dbGaP-2956/root", ".");
-    KfgUpdateNode("/repository/user/protected/dbGaP-2956/encryption-key-path",
-        "wrong file!");
-    KfgUpdateNode("/repository/user/protected/dbGaP-2957/root", ".");
-    KfgUpdateNode("/repository/user/protected/dbGaP-2957/encryption-key-path",
-        GetName());
-
-    REQUIRE_RC(KKeyStoreSetConfig(ks, kfg));
-    
-    REQUIRE_RC(KKeyStoreGetKeyByProjectId(ks,
-        "give us the key for 2957", &key, 2957));
-    REQUIRE_NOT_NULL(key);
-    REQUIRE_EQ(string(tempKey), string(key->value.addr, key->value.len));
-    
-    REQUIRE_RC(KDirectoryRemove(wd, true, GetName()));
-}
-
-//
-//  Object Id / Object name bindings
-//
-
-class ObjIdBindingFixture : public KeyStoreFixture 
-{
-public:
-    ObjIdBindingFixture()
-    {
-    }
-    ~ObjIdBindingFixture()
-    {
-        if (bindings.length() != 0 && KDirectoryRemove(wd, true, bindings.c_str()) != 0)
-           throw logic_error("ObjIdBindingFixture::TearDown: KDirectoryRemove failed");   
-    }
-    void SetUp(const string& bindingsFileName)
-    {
-        bindings = string("./") + bindingsFileName;
-        if (KKeyStoreSetBindingsFile(ks, bindings.c_str()) != 0)
-           throw logic_error("ObjIdBindingFixture::SetUp: KeyStoreSetBindingsFile failed");   
-        KDirectoryRemove(wd, true, bindings.c_str());  // does not have to exist
-    }
-    
-    string bindings;
-};
-
-FIXTURE_TEST_CASE(ObjIdRegister, ObjIdBindingFixture)
-{
-    SetUp(GetName());
-    
-    String name1;
-    CONST_STRING(&name1, "name1");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 1, &name1));
-    
-    String name2;
-    CONST_STRING(&name2, "name2");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 2, &name2));
-}
-
-FIXTURE_TEST_CASE(ObjIdRegister_Found_Same, ObjIdBindingFixture)
-{
-    SetUp(GetName());
-    
-    String name1;
-    CONST_STRING(&name1, "name1");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 1, &name1));
-    
-    String name2;
-    CONST_STRING(&name2, "name2");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 2, &name2));
-    
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 1, &name1)); // same name, no problem
-}
-
-FIXTURE_TEST_CASE(ObjIdRegister_Found_Different, ObjIdBindingFixture)
-{
-    SetUp(GetName());
-    
-    String name1;
-    CONST_STRING(&name1, "name1");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 1, &name1));
-    
-    String name2;
-    CONST_STRING(&name2, "name2");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 2, &name2));
-    
-    REQUIRE_RC_FAIL(KKeyStoreRegisterObject(ks, 1, &name2)); // name differs
-}
-
-FIXTURE_TEST_CASE(ObjIdById_Found, ObjIdBindingFixture)
-{
-    SetUp(GetName());
-
-    String name123;
-    CONST_STRING(&name123, "name123");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 123, &name123));
-    
-    String name12;
-    CONST_STRING(&name12, "name12");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 12, &name12));
-    
-    String name1;
-    CONST_STRING(&name1, "name1");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 1, &name1));
-    
-    const String* res;
-    
-    REQUIRE_RC(KKeyStoreGetObjectName(ks, 123, &res));
-    REQUIRE_NOT_NULL(res);
-    REQUIRE_EQ(StringCompare(res, &name123), 0);
-    StringWhack(res);
-    
-    REQUIRE_RC(KKeyStoreGetObjectName(ks, 12, &res));
-    REQUIRE_NOT_NULL(res);
-    REQUIRE_EQ(StringCompare(res, &name12), 0);
-    StringWhack(res);
-    
-    REQUIRE_RC(KKeyStoreGetObjectName(ks, 1, &res));
-    REQUIRE_NOT_NULL(res);
-    REQUIRE_EQ(StringCompare(res, &name1), 0);
-    StringWhack(res);
-}
-
-FIXTURE_TEST_CASE(ObjIdById_NotFound, ObjIdBindingFixture)
-{
-    SetUp(GetName());
-    
-    String name100;
-    CONST_STRING(&name100, "name100");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 100, &name100));
-    
-    String name200;
-    CONST_STRING(&name200, "name200");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 200, &name200));
-    
-    const String* res;
-    REQUIRE_RC_FAIL(KKeyStoreGetObjectName(ks, 100200, &res));
-}
-
-FIXTURE_TEST_CASE(ObjId_DefaultLocation, ObjIdBindingFixture)
-{
-    const String* res;
-    REQUIRE_RC_FAIL(KKeyStoreGetObjectName(ks, 1, &res)); // this will fail but set location to default
-    
-    // verify default location
-    String* home;
-    REQUIRE_RC(KConfigReadString(kfg, "NCBI_HOME", &home));
-    REQUIRE_NOT_NULL(home);
-    
-    const char* loc = KKeyStoreGetBindingsFile(ks);
-    REQUIRE_NOT_NULL(loc);
-    REQUIRE_EQ(string(loc), string(home->addr, home->size) + "/objid.mapping"); 
-    StringWhack(home);
-}
-
-FIXTURE_TEST_CASE(ObjIdByName_Found, ObjIdBindingFixture)
-{
-    SetUp(GetName());
-    
-    String name11;
-    CONST_STRING(&name11, "name11");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 11, &name11));
-    
-    String name21;
-    CONST_STRING(&name21, "name21");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 21, &name21));
-    
-    String name1;
-    CONST_STRING(&name1, "name1");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 1, &name1));
-    
-    uint32_t id;
-    
-    REQUIRE_RC(VKKeyStoreGetObjectId(ks, &name11, &id));
-    REQUIRE_EQ((uint32_t)11, id);
-
-    REQUIRE_RC(VKKeyStoreGetObjectId(ks, &name21, &id));
-    REQUIRE_EQ((uint32_t)21, id);
-    
-    REQUIRE_RC(VKKeyStoreGetObjectId(ks, &name1, &id));
-    REQUIRE_EQ((uint32_t)1, id);
-}
-FIXTURE_TEST_CASE(ObjIdByName_NotFound, ObjIdBindingFixture)
-{
-    SetUp(GetName());
-    
-    String name11;
-    CONST_STRING(&name11, "name11");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 11, &name11));
-    
-    String name21;
-    CONST_STRING(&name21, "name21");
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 21, &name21));
-    
-    String name1;
-    CONST_STRING(&name1, "name1");
-    
-    uint32_t id;
-    
-    REQUIRE_RC_FAIL(VKKeyStoreGetObjectId(ks, &name1, &id));
-}
-
-FIXTURE_TEST_CASE(ObjIdRegister_Lock, ObjIdBindingFixture)
-{   // make sure registration fails while the file is locked
-    SetUp(GetName());
-
-    KFile* lockedFile;
-    REQUIRE_RC(KDirectoryCreateExclusiveAccessFile(wd, &lockedFile, true, 0600, kcmOpen, GetName()));
-    
-    String name11;
-    CONST_STRING(&name11, "name11");
-    REQUIRE_RC_FAIL(KKeyStoreRegisterObject(ks, 11, &name11));
-    
-    REQUIRE_RC(KFileRelease(lockedFile));
-    
-    // now, will work
-    REQUIRE_RC(KKeyStoreRegisterObject(ks, 11, &name11));
-}
-
-//////////////////////////////////////////// Main
-
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-keystore";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=KeyStoreTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/kfg/kfgtest.cpp b/test/kfg/kfgtest.cpp
deleted file mode 100644
index 9529e93..0000000
--- a/test/kfg/kfgtest.cpp
+++ /dev/null
@@ -1,1030 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for Kfg interface
-*/
-
-#include <ktst/unit_test.hpp>
-
-#include <kapp/args.h> /* Args */
-
-#include <kfg/config.h>
-#include <kfg/extern.h>
-#include <kfg/repository.h> /* KConfigImportNgc */
-
-#include <os-native.h>
-
-#if !WINDOWS
-    #include <sys/utsname.h>
-#endif
-
-#include <vfs/manager.h>
-#include <vfs/path.h>
-
-#include <kfs/directory.h>
-#include <kfs/dyload.h>
-#include <kfs/impl.h>
-
-#include <klib/debug.h> /* KDbgSetModConds */
-#include <klib/log.h>
-#include <klib/printf.h>
-#include <klib/text.h>
-#include <klib/writer.h>
-
-#include <stdexcept>
-
-#include <cstdlib>
-#include <cstring>
-
-using namespace std;
-
-#define ALL
-
-static rc_t argsHandler(int argc, char* argv[]);
-TEST_SUITE_WITH_ARGS_HANDLER(KfgTestSuite, argsHandler);
-
-// test fixture for creation and lookup of kfg files
-class KfgFixture
-{
-public:
-    KfgFixture() : wd(0), kfg(0), file(0), path(0), node(0)
-    {
-        if ( KDirectoryNativeDir ( & wd ) != 0 )
-            throw logic_error("KfgFixture: KDirectoryNativeDir failed");
-            
-        if (KConfigMake ( & kfg, NULL ) != 0)
-            throw logic_error("KfgFixture: KConfigMake failed");
-            
-        if (apppath.length() == 0) // first call
-        {
-            if (!GetValue("APPPATH", apppath))
-                throw logic_error("KfgFixture: GetValue failed");
-        }
-    }
-    ~KfgFixture() 
-    {
-        if ( node != 0 && KConfigNodeRelease(node) )
-            throw logic_error("~KfgFixture: KConfigNodeRelease failed");
-        
-        if ( KConfigRelease ( kfg ) != 0 )
-            throw logic_error("~KfgFixture: KConfigRelease failed");
-            
-        if ( KDirectoryRelease ( wd ) != 0 )
-            throw logic_error("~KfgFixture: KDirectoryRelease failed");
-            
-        if ( KFileRelease( file ) != 0 )
-            throw logic_error("~KfgFixture: KFileRelease failed");
-            
-        if ( path && VPathRelease ( path) != 0 )
-            throw logic_error("~KfgFixture: VPathRelease failed");
-    }
-    void CreateFile(const char* name, const char* contents)
-    {
-        if (KDirectoryCreateFile(wd, &file, true, 0664, kcmInit, name) != 0)
-            throw logic_error("CreateFile: KDirectoryCreateFile failed");
-
-        size_t num_writ=0;
-        if (KFileWrite(file, 0, contents, strlen(contents), &num_writ) != 0)
-            throw logic_error("CreateFile: KFileWrite failed");
-
-        if (KFileRelease(file) != 0)
-            throw logic_error("CreateFile: KFileRelease failed");
-        
-        file=0;
-    }
-    
-    void LoadFile(const char* name)
-    {
-        if (KDirectoryOpenFileRead(wd, (const KFile**)&file, name) != 0)
-            throw logic_error("LoadFile: KDirectoryOpenFileRead failed");
-            
-        if (KConfigLoadFile ( kfg, name, file) != 0)
-            throw logic_error("LoadFile: KConfigLoadFile failed");
-
-        if (KFileRelease(file) != 0)
-            throw logic_error("LoadFile: KFileRelease failed");
-            
-        file=0;
-    }
-
-    void CreateAndLoad(const char* name, const char* contents)
-    {
-#ifdef DBG_KFG
-        cout << "26 CreateAndLoad(" << name << ")\n";
-#endif
-        CreateFile(name, contents);
-        LoadFile(name);
-        // the .kfg is not needed anymore
-        if (KDirectoryRemove(wd, true, name) != 0)
-            throw logic_error("CreateAndLoad: KDirectoryRemove failed");
-#ifdef DBG_KFG
-        cout << "32 CreateAndLoad(" << name << ")\n";
-#endif
-    }
-
-    bool GetValue(const char* path, string& value)
-    {
-        const KConfigNode *node;
-        rc_t rc=KConfigOpenNodeRead(kfg, &node, "%.*s", strlen(path), path);
-        if (rc == 0) 
-        {
-            rc = KConfigNodeRead(node, 0, buf, BufSize, &num_read, NULL);
-            if (rc != 0)
-                throw logic_error("GetValue: KConfigNodeRead failed");
-            buf[num_read]=0;
-            value=buf;
-            return KConfigNodeRelease(node) == 0;
-        }
-        return false;
-    }
-    bool ValueMatches(const char* path, const char* value, bool nullAsEmpty=false)
-    {
-        if (nullAsEmpty && value == 0)
-        {
-            value="";
-        }
-        string v;
-        if (GetValue(path, v))
-        {
-            bool ret=true;
-            if (v != string(value, strlen(value)))
-            {
-                cerr << "ValueMatches mismatch: expected='" << value << "', actual='" << v << "'" << endl;
-                ret=false;
-            }
-            return ret;
-        }
-        return false;
-    }
-    void UpdateNode(const char* key, const char* value)
-    {
-        KConfigNode *node;
-        if (KConfigOpenNodeUpdate(kfg, &node, key) != 0)
-            throw logic_error("UpdateNode: KConfigOpenNodeUpdate failed");
-        if (KConfigNodeWrite(node, value, strlen(value)) != 0)
-            throw logic_error("UpdateNode: KConfigNodeWrite failed");
-        if (KConfigNodeRelease(node) != 0)
-            throw logic_error("UpdateNode: KConfigNodeRelease failed");
-    }
-
-    string DirPath(const KDirectory* dir)
-    {
-        char resolved[4097];
-        if (KDirectoryResolvePath(dir, true, resolved, sizeof resolved, ".") == 0)
-        {
-            return string(resolved);
-        }
-        else
-        {
-            return "??";
-        }
-    }
-    string GetHomeDirectory()
-    {   
-        string ret;
-        if (getenv("HOME") != NULL)
-            ret = getenv("HOME");
-        else if (getenv("USERPROFILE") != NULL) // on Windows the value is taken from USERPROFILE
-            ret = getenv("USERPROFILE");
-        
-        if (KDirectoryResolvePath(wd, true, buf, sizeof(buf), ret.c_str()) != 0)
-            throw logic_error("GetHomeDirectory: KDirectoryResolvePath failed");
-        
-        return string(buf);
-    }
-    const KConfigNode* GetNode(const char* path) 
-    {
-        if ( node != 0 && KConfigNodeRelease(node) )
-            throw logic_error("GetNode: KConfigNodeRelease failed");
-        if (KConfigOpenNodeRead(kfg, (const KConfigNode**)&node, path) != 0)
-            throw logic_error("GetNode: KConfigOpenNodeRead failed");
-        return node;
-    }
-    string ReadContent(const string& fileName)
-    {
-        KFile* f;
-        KDirectoryOpenFileRead(wd, (const KFile**)&f, fileName.c_str());
-    
-        if (KFileReadAll ( f, 0, buf, BufSize, &num_read ) != 0)
-           throw logic_error("ReadContent: KFileReadAll failed");   
-           
-        KFileRelease(f);
-        return string(buf, num_read);
-    }    
-    
-    KDirectory* wd;
-    KConfig* kfg;
-    KFile* file;
-    VPath* path;
-    
-    KConfigNode* node;
-    
-    static const int BufSize = 8192;
-    char buf[BufSize];
-    size_t num_read;
-    size_t num_writ;
-
-    static string apppath; // only gets set for the 1st instance of KConfig; save it here for the corresponding test case
-};
-string KfgFixture::apppath; 
-
-///////////////////////////////////////////////// KFG parser test cases
-
-#ifdef ALL
-FIXTURE_TEST_CASE(KConfigLoadFile_should_report_null_inputs, KfgFixture)
-{
-    KFile file;
-    REQUIRE_RC_FAIL(KConfigLoadFile ( 0, "qweert", &file));
-    REQUIRE_RC_FAIL(KConfigLoadFile ( kfg, "qweert", 0));
-}
-
-FIXTURE_TEST_CASE(one_name_value_double_quotes, KfgFixture)
-{
-    CreateAndLoad(GetName(), "name=\"value\"");
-    REQUIRE(ValueMatches("name", "value"));
-}
-
-FIXTURE_TEST_CASE(one_pathname_value_single_quotes, KfgFixture)
-{
-    CreateAndLoad(GetName(), "root/subname/name='val'");
-    REQUIRE(ValueMatches("root/subname/name", "val"));
-}
-
-FIXTURE_TEST_CASE(numeric_pathnames, KfgFixture)
-{   
-    CreateAndLoad(GetName(), " root1/1 = 'val1'\n");
-    REQUIRE(ValueMatches("root1/1", "val1"));
-}
-
-FIXTURE_TEST_CASE(multiple_pathnames, KfgFixture)
-{   // sprinkle some spaces and tabs (only allowed outside pathnames)
-    const char* contents=" root1/subname1/name1 =\t \"val1\"\n"
-                         "root1/subname1/name2 =\t \"val2\"\n"
-                         "\troot1/subname2/name3\t = \"val3\"\n"
-                         "root1/subname2/name4\t = \"val4\"\n"
-                         "root2/subname1/name5 =\t \"val5\"\n"
-                         "root2/subname2/name6 = \"val6\"\n";
-    CreateAndLoad(GetName(), contents);
-
-    REQUIRE(ValueMatches("root1/subname1/name1", "val1"));
-    REQUIRE(ValueMatches("root1/subname1/name2", "val2"));
-    REQUIRE(ValueMatches("root1/subname2/name3", "val3"));
-    REQUIRE(ValueMatches("root1/subname2/name4", "val4"));
-    REQUIRE(ValueMatches("root2/subname1/name5", "val5"));
-    REQUIRE(ValueMatches("root2/subname2/name6", "val6"));
-}
-
-FIXTURE_TEST_CASE(comments, KfgFixture)
-{
-    const char* contents="root1/subname1/name1 ='val1'\n"
-                         "root1/subname1/name2 ='val2'\n"
-                         "#root1/subname1/name1='val11'\n"       // the commented out lines do not override the lines with the same paths above
-                         "/*root1/subname1/name2=\"val12\"*/\n";
-    CreateAndLoad(GetName(), contents);
-
-    REQUIRE(ValueMatches("root1/subname1/name1", "val1"));
-    REQUIRE(ValueMatches("root1/subname1/name2", "val2"));
-}
-
-FIXTURE_TEST_CASE(unescaping_escapes, KfgFixture)
-{   
-    CreateAndLoad(GetName(), "name='\\a'\n");
-    REQUIRE(ValueMatches("name", "\a"));
-}
-
-FIXTURE_TEST_CASE(dots_in_pathnames, KfgFixture)
-{   
-    CreateAndLoad(GetName(), "root.1./subname1.ext='val100'\n");
-    REQUIRE(ValueMatches("root.1./subname1.ext", "val100"));
-}
-
-FIXTURE_TEST_CASE(variable_expansion_simple, KfgFixture)
-{
-    const char* contents="var='value'\n"
-                         "ref=$(var)\n";
-    CreateAndLoad(GetName(), contents);
-
-    REQUIRE(ValueMatches("var", "value"));
-    REQUIRE(ValueMatches("ref", "value"));
-}
-
-FIXTURE_TEST_CASE(variable_expansion_concat, KfgFixture)
-{
-    const char* contents="var1='value1'\n"
-                         "var2='value2'\n"
-                         "ref=\"$(var1)'$(var2)\"\n";
-    CreateAndLoad(GetName(), contents);
-
-    REQUIRE(ValueMatches("ref", "value1'value2"));
-}
-
-FIXTURE_TEST_CASE(variable_expansion_path, KfgFixture)
-{
-    const char* contents="root/var='value'\n"
-                         "ref=$(root/var)\n";
-    CreateAndLoad(GetName(), contents);
-
-    REQUIRE(ValueMatches("ref", "value"));
-}
-
-FIXTURE_TEST_CASE(in_string_variable_expansion_path, KfgFixture)
-{
-    const char* contents="root/var='value'\n"
-                         "ref=\"+$(root/var)+\"\n";
-    CreateAndLoad(GetName(), contents);
-
-    REQUIRE(ValueMatches("ref", "+value+"));
-}
-
-FIXTURE_TEST_CASE(can_reference_keys_across_files, KfgFixture)
-{  
-    const char* contents1="root/var='Value'\n";
-    CreateAndLoad((string(GetName())+"1").c_str(), contents1);
-    const char* contents2="ref=$(root/var)\n";
-    CreateAndLoad((string(GetName())+"2").c_str(), contents2);
-
-    REQUIRE(ValueMatches("ref", "Value"));
-}
-
-FIXTURE_TEST_CASE(long_key, KfgFixture)
-{
-    string key(1025, 'k');
-    CreateAndLoad(GetName(), (key+"='value'").c_str());
-    REQUIRE(ValueMatches(key.c_str(), "value"));
-}
-
-FIXTURE_TEST_CASE(long_path, KfgFixture)
-{
-    string path=string(4097, 'v');
-    string line("k='");
-    line+=path;
-    line+="'";
-    CreateAndLoad(GetName(), line.c_str());
-    REQUIRE(ValueMatches("k", path.c_str()));
-}
-
-///////////////////////////////////////////////// predefined variables
-FIXTURE_TEST_CASE(predef_LIBPATH, KfgFixture)
-{
-#if WINDOWS && !_STATIC
-    // since this program and libkfg.dll live in different directories, they contain separate copies of KConfigMake under Windows, 
-    // so we cannot compare them
-#else
-    const char* contents="var=$(vdb/lib/paths/kfg)\n";
-    CreateAndLoad(GetName(), contents);
-
-    KDyld *dyld;
-    REQUIRE_RC(KDyldMake ( & dyld ));
-    const KDirectory *dir;
-    REQUIRE_RC(KDyldHomeDirectory ( dyld, & dir, ( fptr_t ) KConfigMake ));
-    REQUIRE(ValueMatches("var", DirPath(dir).c_str()));
-    KDirectoryRelease ( dir );
-    KDyldRelease ( dyld );
-#endif
-}
-
-FIXTURE_TEST_CASE(predef_KFGDIR, KfgFixture)
-{
-    CreateAndLoad(GetName(), "var=$(kfg/dir)\n");
-    REQUIRE(ValueMatches("var", DirPath(wd).c_str()));
-}
-FIXTURE_TEST_CASE(predef_KFGNAME, KfgFixture)
-{
-    CreateAndLoad(GetName(), "var=$(kfg/name)\n");
-    REQUIRE(ValueMatches("var", GetName()));
-}
-
-
-FIXTURE_TEST_CASE(predef_ARCHNAME, KfgFixture)
-{
-    CreateAndLoad(GetName(), "var=$(kfg/arch/name)\n");
-    #if WINDOWS
-        REQUIRE(ValueMatches("var", ""));
-    #else
-        struct utsname name;
-        REQUIRE_NE(uname(&name), -1);
-        REQUIRE(ValueMatches("var", name.nodename));
-    #endif
-}
-FIXTURE_TEST_CASE(predef_ARCHBITS, KfgFixture)
-{
-    CreateAndLoad(GetName(), "var=$(kfg/arch/bits)\n");
-    string_printf(buf, sizeof(buf), &num_writ, "%d", _ARCH_BITS);
-    REQUIRE(ValueMatches("var", buf));
-}
-
-FIXTURE_TEST_CASE(predef_OS, KfgFixture)
-{
-    CreateAndLoad(GetName(), "var=$(OS)\n");
-    #if LINUX
-        #define OS "linux"
-    #elif SUN
-        #define OS "sun"    
-    #elif MAC 
-        #define OS "mac"
-    #elif WINDOWS
-        #define OS "win"
-    #endif
-    REQUIRE(ValueMatches("var", OS));
-    #undef OS
- }
-
-#if 0 // 8/11/14 - no longer distinguishing linkage
-FIXTURE_TEST_CASE(predef_BUILD_LINKAGE, KfgFixture)
-{
-    CreateAndLoad(GetName(), "var=$(BUILD_LINKAGE)\n");
-    #if _STATIC
-        #define BUILD_LINKAGE "STATIC"
-    #else
-        #define BUILD_LINKAGE "DYNAMIC"
-    #endif
-    REQUIRE(ValueMatches("var", BUILD_LINKAGE));
-    #undef BUILD_LINKAGE
-}
-#endif
-
-FIXTURE_TEST_CASE(predef_BUILD, KfgFixture)
-{
-    CreateAndLoad(GetName(), "var=$(BUILD)\n");
-    #if _PROFILING
-        #define BUILD "PROFILE"
-    #else
-        #if _DEBUGGING
-            #define BUILD "DEBUG"
-        #else 
-            #define BUILD "RELEASE"
-        #endif
-    #endif
-    REQUIRE(ValueMatches("var", BUILD));
-    #undef BUILD
-}
-
-#if 0 // only appropriate when invoked by a canonical path ?
-FIXTURE_TEST_CASE(predef_APPPATH, KfgFixture)
-{
-    // REQUIRE_RC(CreateAndLoad(GetName(), "var=$(APPPATH)\n")); 
-    // APPPATH is only set correctly for the 1st instance of KConfig, so we saved it off in the first call to fixture's 
-    // constructor, test here
-    string path(ncbi::NK::GetTestSuite()->argv[0]);
-    string::size_type lastSlash=path.find_last_of("/");
-    if (lastSlash == string::npos)
-    {
-        lastSlash=path.find_last_of("\\");
-    }
-    if (lastSlash != string::npos)
-    {
-        path.erase(lastSlash);
-    }
-    REQUIRE_EQ(strcase_cmp(apppath.c_str(), apppath.length(), 
-                           path.c_str(), path.length(), 
-                           max(apppath.length(), path.length())), 
-               0);
-}
-#endif
-
-FIXTURE_TEST_CASE(predef_APPNAME, KfgFixture)
-{
-    CreateAndLoad(GetName(), "var=$(APPNAME)\n");
-    REQUIRE_RC(LogAppName(buf, sizeof(buf), &num_writ));
-    buf[num_writ]=0;
-    REQUIRE(ValueMatches("var", buf));
-}
-
-FIXTURE_TEST_CASE(predef_PWD, KfgFixture)
-{
-    CreateAndLoad(GetName(), "var=$(PWD)\n");
-    KDirectory* dir;
-    REQUIRE_RC(KDirectoryNativeDir(&dir));
-    REQUIRE(ValueMatches("var", DirPath(dir).c_str()));
-    KDirectoryRelease(dir);
-}
-#endif
-
-#ifdef ALL
-FIXTURE_TEST_CASE(predef_ENV, KfgFixture)
-{
-    const char* contents=
-        "host=$(HOST)\n"
-        "user=$(USER)\n"
-        "vdb_root=$(VDB_ROOT)\n"
-        "vdb_config=$(VDB_CONFIG)\n"
-        "home=$(HOME)\n"
-        "ncbi_home=$(NCBI_HOME)\n"
-        "ncbi_settings=$(NCBI_SETTINGS)\n"
-        ;
-    CreateAndLoad(GetName(), contents);
-    REQUIRE(ValueMatches("host",            getenv("HOST"), true));
-    REQUIRE(ValueMatches("user",            getenv("USER"), true));
-    REQUIRE(ValueMatches("vdb_root",        getenv("VDB_ROOT"), true));
-    REQUIRE(ValueMatches("vdb_config",      getenv("VDB_CONFIG"), true));
-    REQUIRE(ValueMatches("home",            GetHomeDirectory().c_str(), true));
-    REQUIRE(ValueMatches("ncbi_home",       (GetHomeDirectory()+"/.ncbi").c_str(), true));
-    REQUIRE(ValueMatches("ncbi_settings",   (GetHomeDirectory()+"/.ncbi/user-settings.mkfg").c_str(), true));
-}
-#endif
-
-#ifdef ALL
-FIXTURE_TEST_CASE(predef_ENV_direct, KfgFixture)
-{   // can also refer to predefs by their unadorned name
-    REQUIRE(ValueMatches("HOST",            getenv("HOST"), true));
-    REQUIRE(ValueMatches("USER",            getenv("USER"), true));
-    REQUIRE(ValueMatches("VDB_ROOT",        getenv("VDB_ROOT"), true));
-    REQUIRE(ValueMatches("VDB_CONFIG",      getenv("VDB_CONFIG"), true));
-    REQUIRE(ValueMatches("HOME",            GetHomeDirectory().c_str(), true));
-    REQUIRE(ValueMatches("NCBI_HOME",       (GetHomeDirectory()+"/.ncbi").c_str(), true));
-    REQUIRE(ValueMatches("NCBI_SETTINGS",   (GetHomeDirectory()+"/.ncbi/user-settings.mkfg").c_str(), true));
-}
-
-#if 0
-FIXTURE_TEST_CASE(include_files, KfgFixture)
-{  
-#define includeName "include_file"
-    const char* contents1="root/var='Value'\n";
-    CreateFile((GetName()+"1").c_str(), contents1);
-    const char* contents2="include ./" includeName "\n"
-                          "ref=$(root/var)\n";
-    CreateAndLoad((GetName()+"2").c_str(), contents2);
-
-    REQUIRE(ValueMatches("ref", "Value"));
-    REQUIRE_RC(KDirectoryRemove(wd, true, includeName)); 
-}
-#endif
-#endif
-
-///////////////////////////////////////////////// modification and commit
-
-#ifdef ALL
-FIXTURE_TEST_CASE(ChangeCommit, KfgFixture)
-{
-    const char* contents=
-        "one=\"1\"\n"
-        "one/two=\"2\"\n"
-        "one/two/three=\"3\"\n"
-        ;
-    // override NCBI_SETTINGS 
-    const char* LocalSettingsFile = "settings.mkfg";
-    string FullMagicPath = DirPath(wd) + "/" + LocalSettingsFile;
-    CreateAndLoad( GetName(), (string(contents) + "NCBI_SETTINGS=\"" + FullMagicPath + "\"\n").c_str() );
-    
-    // make, commit changes
-    UpdateNode("one", "1+0");
-    UpdateNode("one/two", "0+2");
-    REQUIRE_RC(KConfigCommit(kfg));
-    REQUIRE_RC(KConfigRelease(kfg));
-    
-    // load the changes from the new location
-    REQUIRE_RC(KConfigMake(&kfg,wd));
-    LoadFile(FullMagicPath.c_str());
-    
-    // verify changes
-    REQUIRE(ValueMatches("one", "1+0"));
-    REQUIRE(ValueMatches("one/two", "0+2"));
-    string s;
-    REQUIRE(! GetValue("one/two/three", s)); // unchanged values are not saved
-    
-    REQUIRE_RC(KDirectoryRemove(wd, true, LocalSettingsFile));     
-}
-
-FIXTURE_TEST_CASE(ChangeCommitEscapes, KfgFixture)
-{
-    const char* LocalSettingsFile = "settings.mkfg";
-    string FullMagicPath = DirPath(wd) + "/" + LocalSettingsFile;
-    CreateAndLoad( GetName(), (string() + "NCBI_SETTINGS=\"" + FullMagicPath + "\"\n").c_str() );
-    
-    // make, commit changes
-    UpdateNode("double/quote", "\"");
-    UpdateNode("escaped/hex", "\x0a");
-    REQUIRE_RC(KConfigCommit(kfg));
-    REQUIRE_RC(KConfigRelease(kfg));
-    
-    // load the changes from the new location
-    REQUIRE_RC(KConfigMake(&kfg,wd));
-    LoadFile(FullMagicPath.c_str());
-    
-    // verify changes
-    REQUIRE(ValueMatches("double/quote", "\""));
-    REQUIRE(ValueMatches("escaped/hex", "\x0a"));
-    
-    REQUIRE_RC(KDirectoryRemove(wd, true, LocalSettingsFile));     
-}
-
-FIXTURE_TEST_CASE(DropAllChildren, KfgFixture)
-{
-    CreateAndLoad(GetName(), "parent/one='1'\nparent/two='2'");
-    GetNode("parent");
-    struct KNamelist *children;
-    REQUIRE_RC(KConfigNodeListChildren(node, &children));
-    uint32_t count;
-    REQUIRE_RC(KNamelistCount(children, &count));
-    REQUIRE_EQ(count, (uint32_t)2);
-    KNamelistRelease(children);
-
-    REQUIRE_RC(KConfigNodeDropAll((KConfigNode*)node));
-    REQUIRE_RC(KConfigNodeListChildren(node, &children));
-    REQUIRE_RC(KNamelistCount(children, &count));
-    REQUIRE_EQ(count, (uint32_t)0);
-    KNamelistRelease(children);
-}
-
-FIXTURE_TEST_CASE(FixUserSettings, KfgFixture)
-{   // fix spelling of nodes dbGap-<number> to dbGaP-<number>
-    
-    // read values from a local .mkfg file; 
-    // if anything is changed the new values will be saved in the user's "global" .mkfg
-
-    string mkfgFilename = "./user-settings.mkfg";
-    // fake global settings since we do not want to modify the real ~/.ncbi/user-settings.mkfg
-    string globalMkfgFilename = "./global-settings.mkfg"; 
-
-    REQUIRE_RC(KConfigRelease(kfg));
-    // create the local .mkfg with the old spelling of dbGap;
-    CreateFile(mkfgFilename.c_str(), 
-                    (string("NCBI_SETTINGS=\"") + globalMkfgFilename + "\"\n"
-                     "/repository/user/protected/dbGap-123=\"qq\"\n").c_str());    
-    REQUIRE_RC(KConfigMake ( & kfg, wd )); // this should load the local .mkfg, replace "dbGap" with "dbGaP" and update the global .mkfg
-
-    // verify corrected value in memory
-    REQUIRE(ValueMatches("/repository/user/protected/dbGaP-123", "qq"));
-
-    // verify that user's global mkfg has been updated
-    string globalContent = ReadContent(globalMkfgFilename);
-    REQUIRE_NE(globalContent.find("/repository/user/protected/dbGaP-123 = \"qq\""), string::npos);
-
-    REQUIRE_RC(KDirectoryRemove(wd, true, globalMkfgFilename.c_str()));
-    REQUIRE_RC(KDirectoryRemove(wd, true, mkfgFilename.c_str()));
-}
-
-//////////////////////////////////////////// KConfig Accessors
-
-FIXTURE_TEST_CASE(ConfigAccessBool, KfgFixture)
-{
-    const char* contents=
-        "bool/f=\"FALSE\"\n"
-        "bool/t=\"true\"\n"
-        "bool=\"dunno\"\n"
-        ;
-    CreateAndLoad(GetName(), contents);
-    bool b = true;
-    REQUIRE_RC(KConfigReadBool(kfg, "bool/f", &b));
-    REQUIRE(! b);
-    REQUIRE_RC(KConfigReadBool(kfg, "bool/t", &b));
-    REQUIRE(b);
-    REQUIRE_RC_FAIL(KConfigReadBool(kfg, "bool", &b));
-}
-
-FIXTURE_TEST_CASE(ConfigAccessInt, KfgFixture)
-{
-    const char* contents=
-        "int/i1=\"100\"\n"
-        "int/i2=\"-100000000000\"\n"
-        "int=\"0dunno\"\n"
-        ;
-    CreateAndLoad(GetName(), contents);
-    int64_t i = 0;
-    REQUIRE_RC(KConfigReadI64(kfg, "int/i1", &i));
-    REQUIRE_EQ(i, INT64_C(100));
-    REQUIRE_RC(KConfigReadI64(kfg, "int/i2", &i));
-    REQUIRE_EQ(i, INT64_C(-100000000000));
-    REQUIRE_RC_FAIL(KConfigReadI64(kfg, "int", &i));
-}
-
-FIXTURE_TEST_CASE(ConfigAccessUnsigned, KfgFixture)
-{
-    const char* contents=
-        "uint/i1=\"100000000000\"\n"
-        "uint=\"1dunno\"\n"
-        ;
-    CreateAndLoad(GetName(), contents);
-    uint64_t i = 0;
-    REQUIRE_RC(KConfigReadU64(kfg, "uint/i1", &i));
-    REQUIRE_EQ(i, UINT64_C(100000000000));
-    REQUIRE_RC_FAIL(KConfigReadU64(kfg, "uint", &i));
-}
-
-FIXTURE_TEST_CASE(ConfigAccessF64, KfgFixture)
-{
-    const char* contents=
-        "f64/i1=\"3.14\"\n"
-        "f64=\"2.3dunno\"\n"
-        ;
-    CreateAndLoad(GetName(), contents);
-    double f = 0.0;
-    REQUIRE_RC(KConfigReadF64(kfg, "f64/i1", &f));
-    REQUIRE_CLOSE(f, 3.14, 0.001);
-    REQUIRE_RC_FAIL(KConfigReadF64(kfg, "v64", &f));
-}
-
-FIXTURE_TEST_CASE(ConfigAccessVPath, KfgFixture)
-{
-    // example from vfs/path.h
-    // don't know where this comes from...
-    #define VPATH "ncbi-file:///c/scanned-data/0001/file.sra?enc&pwd-file=/c/Users/JamesMcCoy/ncbi.pwd"
-    
-    const char* contents=
-        "vpath/i1=\"" VPATH "\"\n" 
-        ;
-        
-    CreateAndLoad(GetName(), contents);
-    REQUIRE_RC(KConfigReadVPath(kfg, "vpath/i1", &path));
-    VPathReadUri(path, buf, sizeof(buf), &num_read);
-    REQUIRE_EQ(string(buf), string(VPATH));
-}
-
-FIXTURE_TEST_CASE(ConfigAccessString, KfgFixture)
-{
-    // another change to get rid of C:
-    // also, can't have multiple '?' in query
-    #define STRING "ncbi-file:///c/scanned-data/0001/file.sra?enc&pwd-file=/c/Users/JamesMcCoy/ncbi.pwd"
-    const char* contents=
-        "string/i1=\"" STRING "\"\n" 
-        ;
-        
-    CreateAndLoad(GetName(), contents);
-    String* str;
-    REQUIRE_RC(KConfigReadString(kfg, "string/i1", &str));
-    REQUIRE_NOT_NULL(str);
-    REQUIRE_EQ(string(str->addr), string(STRING));
-    StringWhack(str);
-}
-
-//////////////////////////////////////////// KConfigNode Accessors
-
-FIXTURE_TEST_CASE(ConfigNodeAccessBool, KfgFixture)
-{
-    const char* contents=
-        "bool/f=\"FALSE\"\n"
-        ;
-    CreateAndLoad(GetName(), contents);
-    bool b = true;
-    REQUIRE_RC(KConfigNodeReadBool(GetNode("bool/f"), &b));
-    REQUIRE(! b);
-}
-
-FIXTURE_TEST_CASE(ConfigNodeAccessInt, KfgFixture)
-{
-    const char* contents=
-        "int/i1=\"100\"\n"
-        ;
-    CreateAndLoad(GetName(), contents);
-    int64_t i = 0;
-    REQUIRE_RC(KConfigNodeReadI64(GetNode("int/i1"), &i));
-    REQUIRE_EQ(i, (int64_t)100);
-}
-
-FIXTURE_TEST_CASE(ConfigNodeAccessUnsigned, KfgFixture)
-{
-    const char* contents=
-        "uint/i1=\"100000000000\"\n"
-        ;
-    CreateAndLoad(GetName(), contents);
-    uint64_t i = 0;
-    REQUIRE_RC(KConfigNodeReadU64(GetNode("uint/i1"), &i));
-    REQUIRE_EQ(i, UINT64_C(100000000000));
-}
-
-FIXTURE_TEST_CASE(ConfigNodeAccessF64, KfgFixture)
-{
-    const char* contents=
-        "f64/i1=\"3.14\"\n"
-        ;
-    CreateAndLoad(GetName(), contents);
-    double f = 0.0;
-    REQUIRE_RC(KConfigNodeReadF64(GetNode("f64/i1"), &f));
-    REQUIRE_CLOSE(f, 3.14, 0.001);
-}
-
-FIXTURE_TEST_CASE(ConfigNodeAccessVPath, KfgFixture)
-{
-    // example from vfs/path.h
-    // changing
-    #define VPATH "ncbi-file:///c/scanned-data/0001/file.sra?enc&pwd-file=/c/Users/JamesMcCoy/ncbi.pwd"
-    
-    const char* contents=
-        "vpath/i1=\"" VPATH "\"\n" 
-        ;
-        
-    CreateAndLoad(GetName(), contents);
-    REQUIRE_RC(KConfigNodeReadVPath(GetNode("vpath/i1"), &path));
-    VPathReadUri(path, buf, sizeof(buf), &num_read);
-    REQUIRE_EQ(string(buf), string(VPATH));
-}
-
-FIXTURE_TEST_CASE(ConfigNodeAccessString, KfgFixture)
-{
-    #define STRING "ncbi-file:///c/scanned-data/0001/file.sra?enc&pwd-file=/c/Users/JamesMcCoy/ncbi.pwd"
-    const char* contents=
-        "string/i1=\"" STRING "\"\n" 
-        ;
-     
-    CreateAndLoad(GetName(), contents);
-    String* str;
-    REQUIRE_RC(KConfigNodeReadString(GetNode("string/i1"), &str));
-    REQUIRE_NOT_NULL(str);
-    REQUIRE_EQ(string(str->addr), string(STRING));
-    StringWhack(str);
-}
-#endif
-
-//////////////////////////////////////////// Importing external objects
-
-namespace {
-    class C {
-    public:
-        static void t(const string &ngcPath) {
-        }
-    };
-}
-
-class Cleaner {
-    KDirectory *dir;
-
-    const char *home;
-
-    const bool ncbi;
-    const bool dbGaP;
-    const bool enKey;
-
-    static const char* Ncbi (void) { return  "ncbi"                   ; }
-    static const char* DbGaP(void) { return  "ncbi/dbGaP-2956"        ; }
-    static const char* EnKey(void) { return ".ncbi/dbGaP-2956.enc_key"; }
-
-public:
-    Cleaner(KDirectory *d)
-        : dir(d), home(getenv("HOME"))
-        , ncbi (KDirectoryPathType(dir, "%s/%s", home, Ncbi ()) != kptNotFound)
-        , dbGaP(KDirectoryPathType(dir, "%s/%s", home, DbGaP()) != kptNotFound)
-        , enKey(KDirectoryPathType(dir, "%s/%s", home, EnKey()) != kptNotFound)
-    {}
-
-    ~Cleaner() {
-        if (!dbGaP)
-            KDirectoryRemove(dir, false, "%s/%s", home, DbGaP());
-        if (!ncbi)
-            KDirectoryRemove(dir, false, "%s/%s", home, Ncbi ());
-        if (!enKey)
-            KDirectoryRemove(dir, false, "%s/%s", home, EnKey());
-    }
-};
-
-#ifdef ALL
-FIXTURE_TEST_CASE(KConfigImportNgc_Basic, KfgFixture)
-{
-    string s(GetName());
-    cout << "FIXTURE_TEST_CASE(KConfigImportNgc_Basic) " << s << "\n";
-    TEST_MESSAGE(s);
-    CreateAndLoad(s.c_str(), "\n");
-    TEST_MESSAGE("CreateAndLoad" << " " << s);
-
-    const char* newRepo;
-
-//    KDbgSetModConds(DBG_KFG, DBG_FLAG(DBG_KFG), DBG_FLAG(DBG_KFG));
-
-    TEST_MESSAGE("KConfigImportNgc");
-    string ngcPath("./prj_2956.ngc");
-    C::t(ngcPath);
-    Cleaner cleaner(wd);
-    REQUIRE_RC(KConfigImportNgc(kfg, ngcPath.c_str(), "repos/ngc/", &newRepo));
-    TEST_MESSAGE("KConfigImportNgc(" << ngcPath << ")");
-    // contents of the input file:
-    // id = "2956"
-    // encyption key = "12"
-    // download ticket = "943EF2DF-8C5E-4B8F-9D29-4BE5C1837798"
-    // description = "SRA Test"
-    //
-    // The resulting KConfig subtree:
-    // (root node=) /repository/user/protected/dbGaP-2956/...
-    // .../encryption-key-path = "$(NCBI_HOME)/dbGaP-2956.enc_key"   (creates the file, writes the key into it with \n appended)
-    // .../apps/sra/volumes/sraFlat="sra"
-    // .../cache-enabled = "true"
-    // .../root = "repos/ngc/" ; creates the dir 
-    //
-    // also, creates the following node if it is not present
-    // /repository/remote/protected/CGI/resolver-cgi="http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi"
-    {
-        REQUIRE_RC(KConfigNodeReadVPath(GetNode("/repository/user/protected/dbGaP-2956/encryption-key-path"), &path));    
-        VPathReadPath(path, buf, sizeof(buf), &num_read);    
-        string encFileName = "/dbGaP-2956.enc_key";
-        REQUIRE_EQ(string(buf).rfind(encFileName), num_read - encFileName.size()); // string(buf) ends with encFileName
-        VPathRelease(path);
-        path = 0;
-
-        REQUIRE_EQ(ReadContent(buf), string("12\n"));
-    }
-    
-    {
-        String* str;
-        REQUIRE_RC(KConfigNodeReadString(GetNode("/repository/user/protected/dbGaP-2956/apps/sra/volumes/sraFlat"), &str));    
-        REQUIRE_EQ(string(str->addr), string("sra"));
-        StringWhack(str);
-    }
-
-    {
-        bool b = true;
-        REQUIRE_RC(KConfigNodeReadBool(GetNode("/repository/user/protected/dbGaP-2956/cache-enabled"), &b));
-        REQUIRE(b);
-    }        
-    
-    {
-        REQUIRE_RC(KConfigNodeReadVPath(GetNode("/repository/user/protected/dbGaP-2956/root"), &path));    
-        VPathReadPath(path, buf, sizeof(buf), &num_read);    
-        REQUIRE_EQ(string(buf), string("repos/ngc/"));
-        VPathRelease(path);
-        path = 0;
-        
-        const KDirectory *sub;
-        REQUIRE_RC(KDirectoryOpenDirRead(wd, &sub, false, buf));
-        REQUIRE_RC(KDirectoryRelease(sub));
-        REQUIRE_RC(KDirectoryRemove(wd, true, buf));
-    }
-    
-    {
-        const String* str;
-        REQUIRE_RC(KConfigNodeReadVPath(GetNode("/repository/remote/protected/CGI/resolver-cgi"), &path));    
-        REQUIRE_RC(VPathMakeString(path, &str));    
-        REQUIRE_EQ(string(str->addr), string("http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi"));
-        StringWhack(str);
-    }
-    
-    REQUIRE_EQ(string(newRepo), string("repos/ngc/"));
-    
-    REQUIRE_RC(KDirectoryRemove(wd, true, "repos"));
-}
-#endif
-
-FIXTURE_TEST_CASE(KConfigImportNgc_NullLocation, KfgFixture)
-{
-    CreateAndLoad(GetName(), "\n");
-    const char* newRepo;
-    Cleaner cleaner(wd);
-    REQUIRE_RC(KConfigImportNgc(kfg, "./prj_2956.ngc", NULL, &newRepo));
-    string encDirName = "/ncbi/dbGaP-2956";
-    REQUIRE_EQ(string(newRepo).rfind(encDirName), string(newRepo).size() - encDirName.size()); // string(buf) ends with encDirName
-}
-FIXTURE_TEST_CASE(KConfigImportNgc_NullLocation_NullNewRepo, KfgFixture)
-{
-    CreateAndLoad(GetName(), "\n");
-    Cleaner cleaner(wd);
-    REQUIRE_RC(KConfigImportNgc(kfg, "./prj_2956.ngc", NULL, NULL));
-}
-
-//////////////////////////////////////////// Main
-static rc_t argsHandler(int argc, char* argv[]) {
-    Args* args = NULL;
-    rc_t rc = ArgsMakeAndHandle(&args, argc, argv, 0, NULL, 0);
-    ArgsWhack(args);
-    return rc;
-}
-
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-kfg";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=KfgTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/kfg/ncbi-home-from-env.configs/dir1/file.kfg b/test/kfg/ncbi-home-from-env.configs/dir1/file.kfg
deleted file mode 100644
index 4eb768e..0000000
--- a/test/kfg/ncbi-home-from-env.configs/dir1/file.kfg
+++ /dev/null
@@ -1,2 +0,0 @@
-/refseq/volumes = "ONE-OLD-FILE"
-/ncbi-home-from-env = "ONE-NEW-FILE"
diff --git a/test/kfg/ncbi-home-from-env.configs/dir1/not-user-settings.xml b/test/kfg/ncbi-home-from-env.configs/dir1/not-user-settings.xml
deleted file mode 100644
index 2ebd12f..0000000
--- a/test/kfg/ncbi-home-from-env.configs/dir1/not-user-settings.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-/refseq/volumes = "ONE-OLD-KFG"
-/ncbi-home-from-env = "ONE-NEW-KFG"
diff --git a/test/kfg/ncbi-home-from-env.configs/dir1/user-settings.mkfg b/test/kfg/ncbi-home-from-env.configs/dir1/user-settings.mkfg
deleted file mode 100644
index 80b98c3..0000000
--- a/test/kfg/ncbi-home-from-env.configs/dir1/user-settings.mkfg
+++ /dev/null
@@ -1,2 +0,0 @@
-/refseq/volumes = "ONE-OLD-USER"
-/ncbi-home-from-env = "ONE-NEW-USER"
diff --git a/test/kfg/ncbi-home-from-env.configs/dir2/file.kfg b/test/kfg/ncbi-home-from-env.configs/dir2/file.kfg
deleted file mode 100644
index 5632692..0000000
--- a/test/kfg/ncbi-home-from-env.configs/dir2/file.kfg
+++ /dev/null
@@ -1,2 +0,0 @@
-/refseq/volumes = "TWO-OLD-FILE"
-/ncbi-home-from-env = "TWO-NEW-FILE"
diff --git a/test/kfg/ncbi-home-from-env.configs/dir2/not-user-settings.xml b/test/kfg/ncbi-home-from-env.configs/dir2/not-user-settings.xml
deleted file mode 100644
index 599418f..0000000
--- a/test/kfg/ncbi-home-from-env.configs/dir2/not-user-settings.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-/refseq/volumes = "TWO-OLD-KFG"
-/ncbi-home-from-env = "TWO-NEW-KFG"
diff --git a/test/kfg/ncbi-home-from-env.configs/dir2/user-settings.mkfg b/test/kfg/ncbi-home-from-env.configs/dir2/user-settings.mkfg
deleted file mode 100644
index adc3163..0000000
--- a/test/kfg/ncbi-home-from-env.configs/dir2/user-settings.mkfg
+++ /dev/null
@@ -1,2 +0,0 @@
-/refseq/volumes = "TWO-OLD-USER"
-/ncbi-home-from-env = "TWO-NEW-USER"
diff --git a/test/kfg/ncbi-home-from-env.cpp b/test/kfg/ncbi-home-from-env.cpp
deleted file mode 100644
index 3c0fcf6..0000000
--- a/test/kfg/ncbi-home-from-env.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <climits> /* PATH_MAX */
-#include <cstdlib> // system
-#include <cstring> // strrchr
- #include <stdio.h>
-
-int main(int argc, char **argv) {
-    char *last = strrchr(argv[0], '/');
-    if (!last)
-        return 1;
-    char *n = strstr(argv[0], "ncbi-vdb");
-    int s = 8;
-    if (!n)
-        return 1;
-    int l = strlen(argv[0]);
-    l -= n - argv[0];
-    int tail = strlen(argv[0]);
-    tail -= last - argv[0];
-    size_t sPfx = n - argv[0];
-    char command[PATH_MAX] = "";
-    sprintf(command,
-        "./ncbi-home-from-env.sh %.*ssra-tools%.*s/../bin/vdb-config",
-        sPfx, argv[0], l - tail - s, n + s);
-    return system(command) != 0;
-}
diff --git a/test/kfg/prj_2956.ngc b/test/kfg/prj_2956.ngc
deleted file mode 100644
index 62c8ef8..0000000
Binary files a/test/kfg/prj_2956.ngc and /dev/null differ
diff --git a/test/kfg/repositorytest.cpp b/test/kfg/repositorytest.cpp
deleted file mode 100644
index df2773b..0000000
--- a/test/kfg/repositorytest.cpp
+++ /dev/null
@@ -1,280 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for KRepository interfaces
-*/
-
-#include <ktst/unit_test.hpp>
-
-#include <cstring>
-#include <stdexcept>
-
-#include <klib/vector.h>
-
-#include <kfs/directory.h>
-#include <kfs/impl.h>
-
-#include <kfg/config.h>
-#include <kfg/repository.h>
-
-using namespace std;
-
-TEST_SUITE(RepositoryTestSuite);
-
-class RepositoryFixture
-{
-public:
-    RepositoryFixture()
-    : repo(0)
-    {
-        if (KConfigMake(&kfg, NULL) != 0)
-            throw logic_error("RepositoryFixture: KConfigMake failed");
-        if (KConfigMakeRepositoryMgrRead(kfg, (const KRepositoryMgr**)&mgr) != 0)
-            throw logic_error("RepositoryFixture: KConfigMakeRepositoryMgrRead failed");
-        VectorInit(&repos, 0, 0); // in order to be able to whack it when we are done, even if not used by the test case
-        ClearRepositories();
-    }
-    ~RepositoryFixture() 
-    {
-        if (repo && KRepositoryRelease(repo) != 0)
-            throw logic_error("~RepositoryFixture: KRepositoryRelease failed");
-        if (KRepositoryVectorWhack(&repos) != 0)
-            throw logic_error("~RepositoryFixture: KRepositoryVectorWhack failed");
-        if (KRepositoryMgrRelease(mgr) != 0)
-            throw logic_error("~RepositoryFixture: KRepositoryMgrRelease failed");
-        if (KConfigRelease(kfg) != 0)
-            throw logic_error("~RepositoryFixture: KConfigRelease failed");
-    }
-    
-    void UpdateNode(const char* key, const char* value)
-    {
-        KConfigNode *node;
-        if (KConfigOpenNodeUpdate(kfg, &node, key) != 0)
-            throw logic_error("UpdateNode: KConfigOpenNodeUpdate failed");
-        if (KConfigNodeWrite(node, value, strlen(value)) != 0)
-            throw logic_error("UpdateNode: KConfigNodeWrite failed");
-        if (KConfigNodeRelease(node) != 0)
-            throw logic_error("UpdateNode: KConfigNodeRelease failed");
-    }    
-    
-    void ClearRepositories()
-    {
-        KConfigNode *node;
-        if (KConfigOpenNodeUpdate(kfg, &node, "repository") != 0)
-            throw logic_error("ClearRepositories: KConfigOpenNodeUpdate failed");
-        if (KConfigNodeDropAll(node) != 0)
-            throw logic_error("ClearRepositories: KConfigNodeDropAll failed");
-        if (KConfigNodeRelease(node) != 0)
-            throw logic_error("ClearRepositories: KConfigNodeRelease failed");
-    }
-    
-    bool ValidateRepository(const KRepository* r, KRepCategory cat, KRepSubCategory subcat, const char* name)
-    {
-        if (KRepositoryCategory( r ) != cat)
-            return false;
-        if (KRepositorySubCategory( r ) != subcat)
-            return false;
-        if (KRepositoryName( r, buf, BufSize, &num_writ) )
-            return false;
-        if (string(buf, num_writ) != string(name))
-            return false;
-        return true;
-    }
-    
-    KConfig* kfg;
-    KRepositoryMgr* mgr;
-    KRepositoryVector repos;
-    const KRepository* repo;
-    
-    static const int BufSize = 1024;
-    char buf[BufSize];
-    size_t num_writ;
-};
-
-FIXTURE_TEST_CASE(Mgr_MakeRead, RepositoryFixture)
-{
-    REQUIRE_NOT_NULL(mgr);
-}
-FIXTURE_TEST_CASE(Mgr_MakeUpdate, RepositoryFixture)
-{
-    REQUIRE_RC(KRepositoryMgrRelease(mgr)); // remove the default (read-only) mgr
-    mgr = 0;
-    REQUIRE_RC(KConfigMakeRepositoryMgrUpdate(kfg, &mgr));
-    REQUIRE_NOT_NULL(mgr);
-}
-
-// UserRepositories
-FIXTURE_TEST_CASE(Mgr_UserRepositories_NoNode, RepositoryFixture)
-{
-    REQUIRE_RC_FAIL(KRepositoryMgrUserRepositories(mgr, &repos));
-}
-FIXTURE_TEST_CASE(Mgr_UserRepositoriesEmpty, RepositoryFixture)
-{
-    KRepositoryVector v; // using a local vector to make sure it is initialized by the call
-    UpdateNode("/repository/user", "");
-    
-    REQUIRE_RC(KRepositoryMgrUserRepositories(mgr, &v));
-    REQUIRE_EQ(VectorLength(&v), (uint32_t)0);
-
-    REQUIRE_RC(KRepositoryVectorWhack(&v));
-}
-
-FIXTURE_TEST_CASE(Mgr_UserRepositories, RepositoryFixture)
-{
-    // unsorted
-    UpdateNode("/repository/user/main/repo4/", "");
-    UpdateNode("/repository/user/bad/repo7/", ""); // should be ignored
-    UpdateNode("/repository/user/aux/repo1/", "");
-    UpdateNode("/repository/user/protected/repo3/", "");
-    UpdateNode("/repository/user/aux/repo6/", "");
-    UpdateNode("/repository/user/protected/repo5/", "");
-    UpdateNode("/repository/user/main/repo1/", "");
-
-    REQUIRE_RC(KRepositoryMgrUserRepositories(mgr, &repos));
-    REQUIRE_EQ(VectorLength(&repos), (uint32_t)6);
-    
-    // verify the values and that the vector has been sorted on: subcategory(main<aux<protected), name
-    REQUIRE(ValidateRepository(( const KRepository* ) VectorGet ( & repos, 0 ), krepUserCategory, (uint32_t)krepMainSubCategory, "repo1"));
-    REQUIRE(ValidateRepository(( const KRepository* ) VectorGet ( & repos, 5 ), krepUserCategory, (uint32_t)krepProtectedSubCategory, "repo5"));
-}
-
-FIXTURE_TEST_CASE(Mgr_SiteRepositories, RepositoryFixture)
-{
-    // unsorted
-    UpdateNode("/repository/site/main/repo4/", "");
-    UpdateNode("/repository/site/bad/repo7/", ""); // should be ignored
-    UpdateNode("/repository/site/aux/repo1/", "");
-    UpdateNode("/repository/site/protected/repo3/", "");
-    UpdateNode("/repository/site/aux/repo6/", "");
-    UpdateNode("/repository/site/protected/repo5/", "");
-    UpdateNode("/repository/site/main/repo1/", "");
-
-    REQUIRE_RC(KRepositoryMgrSiteRepositories(mgr, &repos));
-    REQUIRE_EQ(VectorLength(&repos), (uint32_t)6);
-    
-    // verify the values and that the vector has been sorted on: subcategory(main<aux<protected), name
-    REQUIRE(ValidateRepository(( const KRepository* ) VectorGet ( & repos, 0 ), krepSiteCategory, (uint32_t)krepMainSubCategory, "repo1"));
-    REQUIRE(ValidateRepository(( const KRepository* ) VectorGet ( & repos, 5 ), krepSiteCategory, (uint32_t)krepProtectedSubCategory, "repo5"));
-}
-
-FIXTURE_TEST_CASE(Mgr_RemoteRepositories, RepositoryFixture)
-{
-    // unsorted
-    UpdateNode("/repository/remote/main/repo4/", "");
-    UpdateNode("/repository/remote/bad/repo7/", ""); // should be ignored
-    UpdateNode("/repository/remote/aux/repo1/", "");
-    UpdateNode("/repository/remote/protected/repo3/", "");
-    UpdateNode("/repository/remote/aux/repo6/", "");
-    UpdateNode("/repository/remote/protected/repo5/", "");
-    UpdateNode("/repository/remote/main/repo1/", "");
-
-    REQUIRE_RC(KRepositoryMgrRemoteRepositories(mgr, &repos));
-    REQUIRE_EQ(VectorLength(&repos), (uint32_t)6);
-    
-    // verify the values and that the vector has been sorted on: subcategory(main<aux<protected), name
-    REQUIRE(ValidateRepository(( const KRepository* ) VectorGet ( & repos, 0 ), krepRemoteCategory, (uint32_t)krepMainSubCategory, "repo1"));
-    REQUIRE(ValidateRepository(( const KRepository* ) VectorGet ( & repos, 5 ), krepRemoteCategory, (uint32_t)krepProtectedSubCategory, "repo5"));
-}
-
-FIXTURE_TEST_CASE(Mgr_GetProtectedRepository_OldSpelling, RepositoryFixture)
-{
-    // only repositories from /repository/user/protected/ are looked at
-    UpdateNode("/repository/user/protected/dbGap-123/", "");
-    UpdateNode("/repository/user/main/dbGap-321/", ""); 
-    UpdateNode("/repository/site/protected/dbGap-321/", "");
-    UpdateNode("/repository/user/protected/dbGap-321/", "");
-    
-    REQUIRE_RC(KRepositoryMgrGetProtectedRepository(mgr, 321, &repo));
-    REQUIRE(ValidateRepository(repo, krepUserCategory, (uint32_t)krepProtectedSubCategory, "dbGap-321"));
-}
-FIXTURE_TEST_CASE(Mgr_GetProtectedRepository, RepositoryFixture)
-{
-    // only repositories from /repository/user/protected/ are looked at
-    UpdateNode("/repository/user/protected/dbGaP-123/", "");
-    UpdateNode("/repository/user/main/dbGaP-321/", ""); 
-    UpdateNode("/repository/site/protected/dbGaP-321/", "");
-    UpdateNode("/repository/user/protected/dbGaP-321/", "");
-    
-    REQUIRE_RC(KRepositoryMgrGetProtectedRepository(mgr, 321, &repo));
-    REQUIRE(ValidateRepository(repo, krepUserCategory, (uint32_t)krepProtectedSubCategory, "dbGaP-321"));
-}
-
-//TODO: KRepositoryMgrCurrentProtectedRepository
-
-// remote repository access
-FIXTURE_TEST_CASE(Mgr_RemoteOnSingle, RepositoryFixture)
-{
-    UpdateNode ( "/repository/remote/main/repo4/", "" );
-    REQUIRE ( KRepositoryMgrHasRemoteAccess ( mgr ) );
-}
-FIXTURE_TEST_CASE(Mgr_RemoteOnMultiple, RepositoryFixture)
-{
-    UpdateNode ( "/repository/remote/main/repo4/", "" );
-    UpdateNode ( "/repository/remote/aux/repo1/disabled", "true" );
-    REQUIRE ( KRepositoryMgrHasRemoteAccess ( mgr ) );
-}
-FIXTURE_TEST_CASE(Mgr_RemoteOff, RepositoryFixture)
-{
-    UpdateNode ( "/repository/remote/main/repo4/disabled", "true" );
-    UpdateNode ( "/repository/remote/aux/repo1/disabled", "true" );
-
-    REQUIRE ( ! KRepositoryMgrHasRemoteAccess ( mgr ) );
-}
-
-
-//////////////////////////////////////////// Main
-
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-kfg";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=RepositoryTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/kfg/wb-test-kfg.cpp b/test/kfg/wb-test-kfg.cpp
deleted file mode 100644
index c132226..0000000
--- a/test/kfg/wb-test-kfg.cpp
+++ /dev/null
@@ -1,628 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for Kfg interface
-*/
-
-#include <kfg/extern.h>
-
-#include <map>
-#include <string>
-#include <cstring>
-#include <sstream>
-
-#include <ktst/unit_test.hpp>
-
-#include <klib/namelist.h>
-
-using namespace std;
-
-TEST_SUITE(KfgWbTestSuite);
-
-//////////////////////////////////////////// tests for flex-generated scanner
-extern "C" {
-#include "../libs/kfg/kfg-parse.h"
-#include "../libs/kfg/config-tokens.h"
-}
-
-// simple symbol table
-class SymbolTable : public map<string, string>
-{
-protected:
-    void Add(const char* name, const char* value)
-    {
-        (*this)[name]=value;
-    }
-
-    static bool lookup_var(void * self, KFGToken* pb)
-    { 
-        const SymbolTable* tab=(const SymbolTable*)self;
-        map<string, string>::const_iterator var=tab->find(string(pb->tokenText+2, pb->tokenLength-3));
-        if (var == tab->end())
-        {
-            return false;
-        }
-        pb->tokenText = var->second.c_str();
-        pb->tokenLength = var->second.length();
-        pb->tokenId = kfgVAR_REF;
-        return true;
-    }
-};
-
-// test fixture for scanner tests
-class KfgScanFixture : public SymbolTable
-{
-public:
-    KfgScanFixture() 
-    {
-        sb.self=this;
-        sb.file="test";
-        sb.look_up_var=lookup_var;
-        sb.buffer=0;
-        sb.scanner=0;
-        sb.report_error=report_error;
-    }
-    ~KfgScanFixture() 
-    {
-        KFGScan_yylex_destroy(&sb);
-    }
-    void InitScan(const char* input, bool trace=false)
-    {
-        KFGScan_yylex_init(&sb, input);
-        KFGScan_set_debug(trace, &sb);
-    }
-    int Scan()
-    {
-        errorMsg.clear();
-
-        KFGScan_yylex(&sym, &sb);
-
-        const char* token=sb.lastToken->tokenText;
-        if (sb.lastToken->tokenId != kfgEND_INPUT && token != 0)
-        {
-            tokenText=string(token, sb.lastToken->tokenLength);
-        }
-        else
-        {
-            tokenText.clear();
-        }
-        return sym.pb.tokenId;
-    }
-    static void report_error(KFGScanBlock* sb, const char* msg)
-    {
-        ((KfgScanFixture*)sb->self)->errorMsg=msg;
-    }
-
-    string MatchToken(const char* token, int expectedId, const char* expectedText, int nextToken=kfgEND_INPUT, bool trace=false, bool keepError=true)
-    {
-        InitScan(token, trace);
-        int id=Scan();
-        if (id != expectedId)
-        {
-            ostringstream os;
-            os << "Scan() returned " << id << ", expected" << expectedId;
-            return os.str();
-        }
-        if (expectedText == 0)
-        {
-            expectedText=token;
-        }
-        if (tokenText != expectedText)
-        {
-            ostringstream os;
-            os << "Scan() returned " << tokenText.c_str() << ", expected" << expectedText;
-            return os.str();
-        }
-
-        // save the errorMsg returned by Scan() from being overwritten, in case the test case is interested in checking it rather than the next one.
-        string errorMsgSaved=errorMsg;
-        id=Scan();
-        if (id != nextToken)
-        {
-            ostringstream os;
-            os << "post-Scan() returned " << id << ", expected" << nextToken;
-            return os.str();
-        }
-        if (keepError)
-        {
-            errorMsg=errorMsgSaved;
-        }
-        return "";
-    }
-    string MatchToken(const char* token, int expectedId, bool trace=false)
-    {
-        return MatchToken(token, expectedId, 0, kfgEND_INPUT, trace);
-    }
-
-    KFGSymbol sym;
-    KFGScanBlock sb;
-    string tokenText;
-    string errorMsg;
-};
-
-FIXTURE_TEST_CASE(KfgScanMultiLineComments, KfgScanFixture)
-{   // C comments with an \n inside are recognized as EOL
-    InitScan("/***\n\n\n*/");
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_LINE);
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT);
-}
-
-FIXTURE_TEST_CASE(KfgScanLineComments, KfgScanFixture)
-{
-    InitScan(
-        "/*********/\n"
-        "#some more stuff\n"
-        "/*========*/");
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_LINE); // C comments without \n inside are skipped
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_LINE); // line comments skipped
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT);// not folowed by /n
-}
-
-FIXTURE_TEST_CASE(KfgScanNestedMultiLineComments, KfgScanFixture)
-{   
-    InitScan("/***\n"
-             "/**/\n" // the comment ends here
-             "*/");
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_LINE);
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_LINE);
-    REQUIRE_EQUAL(Scan(), (int)kfgUNRECOGNIZED);
-}
-
-FIXTURE_TEST_CASE(KfgScanIgnoredSymbols, KfgScanFixture)
-{
-    InitScan("\v\r\t\f");
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT);
-}
-
-FIXTURE_TEST_CASE(KfgScanEndOfLine, KfgScanFixture)
-{
-    InitScan("\v\r\t\f\n");
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_LINE);
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT);
-}
-
-FIXTURE_TEST_CASE(KfgScanStrings, KfgScanFixture)
-{   // strings with white space in between
-    InitScan("'str1' \"str2\"");
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING);          REQUIRE_EQUAL(tokenText, std::string("str1"));
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING);          REQUIRE_EQUAL(tokenText, std::string("str2"));
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT);
-} 
-
-FIXTURE_TEST_CASE(KfgScanString1, KfgScanFixture)
-{   // ( in string
-    REQUIRE_EQ(MatchToken("'str1('", kfgSTRING, "str1("), string());
-}
-FIXTURE_TEST_CASE(KfgScanString2, KfgScanFixture)
-{   // $ in string
-    REQUIRE_EQ(MatchToken("'a$str2\\\"'", kfgESCAPED_STRING, "a$str2\\\""), string());
-}
-FIXTURE_TEST_CASE(KfgScanString3, KfgScanFixture)
-{   // ) in string
-    REQUIRE_EQ(MatchToken("\"str)3\"", kfgSTRING, "str)3"), string());
-}
-FIXTURE_TEST_CASE(KfgScanString4, KfgScanFixture)
-{   // escaped \n in string
-    REQUIRE_EQ(MatchToken("\"str4\\n'\"", kfgESCAPED_STRING, "str4\\n'"), string());
-}
-FIXTURE_TEST_CASE(KfgScanString5, KfgScanFixture)
-{   // escaped \" in string
-    REQUIRE_EQ(MatchToken("\"\\\"\"", kfgESCAPED_STRING, "\\\""), string());
-}
-
-FIXTURE_TEST_CASE(KfgScanVarRefInStringEscapes1, KfgScanFixture)
-{   // escaped $ in string, case 1
-    REQUIRE_EQ(MatchToken("'\\$'", kfgESCAPED_STRING, "\\$"), string());
-}
-FIXTURE_TEST_CASE(KfgScanVarRefInStringEscapes2, KfgScanFixture)
-{   // escaped $ in string, case 2
-    REQUIRE_EQ(MatchToken("\"$\\$1\"", kfgESCAPED_STRING, "$\\$1"), string());
-}
-FIXTURE_TEST_CASE(KfgScanVarRefInStringEscapes3, KfgScanFixture)
-{   // escaped $( in string
-    REQUIRE_EQ(MatchToken("\"$\\$(ref)\"", kfgESCAPED_STRING, "$\\$(ref)"), string());
-}
-FIXTURE_TEST_CASE(KfgScanVarRefInStringEscapes4, KfgScanFixture)  
-{   // unterminated $( in double quoted string
-    REQUIRE_EQ(MatchToken("\"$(qq\"qq", kfgSTRING, "", kfgSTRING), string());
-    REQUIRE_EQUAL(tokenText, string("$(qq\"qq"));
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT);
-}
-FIXTURE_TEST_CASE(KfgScanVarRefInStringEscapes5, KfgScanFixture)  
-{   // unterminated $( in single quoted string
-    REQUIRE_EQ(MatchToken("'$(qq'qq", kfgSTRING, "", kfgSTRING), string());
-    REQUIRE_EQUAL(tokenText, string("$(qq\'qq"));
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT);
-}
-FIXTURE_TEST_CASE(KfgScanVarRefInStringEscapes6, KfgScanFixture)  
-{   // unterminated $( eats up the rest of the line
-    REQUIRE_EQ(MatchToken("'$(qq zzz", kfgSTRING, "", kfgSTRING), string());
-    REQUIRE_EQUAL(tokenText, string("$(qq zzz"));
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT);
-}
-
-// EOL in strings
-FIXTURE_TEST_CASE(KfgScanUnterminatedString1, KfgScanFixture)
-{
-    REQUIRE_EQ(MatchToken("'st\n", kfgUNTERM_STRING, "st", kfgEND_LINE), string(""));
-    REQUIRE(errorMsg.length() > 0);
-}
-FIXTURE_TEST_CASE(KfgScanUnterminatedString2, KfgScanFixture)
-{
-    REQUIRE_EQ(MatchToken("\"st\n", kfgUNTERM_STRING, "st", kfgEND_LINE), string(""));
-    REQUIRE(errorMsg.length() > 0);
-}
-FIXTURE_TEST_CASE(KfgScanUnterminatedString3, KfgScanFixture)
-{
-    REQUIRE_EQ(MatchToken("'s\\t\n", kfgUNTERM_ESCAPED_STRING, "s\\t", kfgEND_LINE), string(""));
-    REQUIRE(errorMsg.length() > 0);
-}
-FIXTURE_TEST_CASE(KfgScanUnterminatedString4, KfgScanFixture)
-{
-    REQUIRE_EQ(MatchToken("\"s\\t\n", kfgUNTERM_ESCAPED_STRING, "s\\t", kfgEND_LINE), string(""));
-    REQUIRE(errorMsg.length() > 0);
-}
-// EOF in strings
-FIXTURE_TEST_CASE(KfgScanUnterminatedString5, KfgScanFixture)
-{
-    REQUIRE_EQ(MatchToken("'st", kfgUNTERM_STRING, "st"), string(""));
-    REQUIRE(errorMsg.length() > 0);
-}
-FIXTURE_TEST_CASE(KfgScanUnterminatedString6, KfgScanFixture)
-{
-    REQUIRE_EQ(MatchToken("\"st", kfgUNTERM_STRING, "st"), string(""));
-    REQUIRE(errorMsg.length() > 0);
-}
-FIXTURE_TEST_CASE(KfgScanUnterminatedString7, KfgScanFixture)
-{
-    REQUIRE_EQ(MatchToken("'s\\t", kfgUNTERM_ESCAPED_STRING, "s\\t"), string(""));
-    REQUIRE(errorMsg.length() > 0);
-}
-FIXTURE_TEST_CASE(KfgScanUnterminatedString8, KfgScanFixture)
-{
-    REQUIRE_EQ(MatchToken("\"s\\t", kfgUNTERM_ESCAPED_STRING, "s\\t"), string(""));
-    REQUIRE(errorMsg.length() > 0);
-}
-
-FIXTURE_TEST_CASE(KfgScanSimplePathNames, KfgScanFixture)
-{
-    InitScan("a _aBc 9-9 _--.* ");
-    REQUIRE_EQUAL(Scan(), (int)kfgREL_PATH); REQUIRE_EQUAL(tokenText, string("a"));
-    REQUIRE_EQUAL(Scan(), (int)kfgREL_PATH); REQUIRE_EQUAL(tokenText, string("_aBc"));
-    REQUIRE_EQUAL(Scan(), (int)kfgREL_PATH); REQUIRE_EQUAL(tokenText, string("9-9"));
-    REQUIRE_EQUAL(Scan(), (int)kfgREL_PATH); REQUIRE_EQUAL(tokenText, string("_--."));
-    REQUIRE_EQUAL(Scan(), (int)kfgUNRECOGNIZED); 
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT);
-}
-
-FIXTURE_TEST_CASE(KfgScanLongPathNames, KfgScanFixture)
-{
-    InitScan("/a/b/c a/_.- ");
-    REQUIRE_EQUAL(Scan(), (int)kfgABS_PATH); REQUIRE_EQUAL(tokenText, string("/a/b/c"));
-    REQUIRE_EQUAL(Scan(), (int)kfgREL_PATH); REQUIRE_EQUAL(tokenText, string("a/_.-"));
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT);
-}
-
-FIXTURE_TEST_CASE(KfgScanLiterals, KfgScanFixture)
-{
-    REQUIRE_EQ(MatchToken("=", kfgASSIGN), string());
-}
-
-FIXTURE_TEST_CASE(KfgScanVarRefSimple, KfgScanFixture)
-{
-    InitScan("$(ref)");
-    Add("ref", "value");
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string("value"));
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT);
-}
-
-FIXTURE_TEST_CASE(KfgScanVarRefUndefined, KfgScanFixture)
-{
-    InitScan("$(reff)");
-    Add("ref", "value");
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE(errorMsg.length() == 0); // undefined vars not reported
-    REQUIRE_EQUAL(tokenText, string(""));
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT); 
-}
-
-FIXTURE_TEST_CASE(KfgScanVarRefInDoubleString, KfgScanFixture)
-{
-    InitScan("\"-$(ref)+\"");
-    Add("ref", "value");
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string("-"));
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string("value"));
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string("+"));
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT);
-}
-
-FIXTURE_TEST_CASE(KfgScanVarRefInSingleString, KfgScanFixture)
-{
-    InitScan("'-$(ref)+'");
-    Add("ref", "value");
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string("-"));
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string("value"));
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string("+"));
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT);
-}
-
-FIXTURE_TEST_CASE(KfgScanMultipleVarRefsInString1, KfgScanFixture)
-{
-    InitScan("'-$(ref1)+$(ref2)-'");
-    Add("ref1", "value1");
-    Add("ref2", "value2");
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string("-"));
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string("value1"));
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string("+"));
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string("value2"));
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string("-"));
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT);
-}
-
-FIXTURE_TEST_CASE(KfgScanMultipleVarRefsInString2, KfgScanFixture)
-{
-    InitScan("'$(ref1)$(ref2)'");
-    Add("ref1", "value1");
-    Add("ref2", "value2");
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string(""));
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string("value1"));
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string("value2"));
-    REQUIRE_EQUAL(Scan(), (int)kfgSTRING); REQUIRE_EQUAL(tokenText, string(""));
-    REQUIRE_EQUAL(Scan(), (int)kfgEND_INPUT);
-}
-
-//// bad token cases
-FIXTURE_TEST_CASE(KfgScanVarRefEndFile, KfgScanFixture)
-{   
-    InitScan("$(ref");
-    REQUIRE_EQUAL(Scan(), (int)kfgUNRECOGNIZED); 
-}
-
-FIXTURE_TEST_CASE(KfgScanVarRefInStringEndFile, KfgScanFixture)
-{   // broken var refs inside strings are converted into strings
-    REQUIRE_EQ(MatchToken("'$(ref", kfgSTRING, "", kfgSTRING, false, false), string(""));
-    REQUIRE_EQUAL(tokenText, string("$(ref"));
-    REQUIRE(errorMsg.length() > 0);
-}
-
-FIXTURE_TEST_CASE(KfgScanVarRefInStringEndLine, KfgScanFixture)
-{   // broken var refs inside strings are converted into strings
-    REQUIRE_EQ(MatchToken("\"$(ref\n", kfgSTRING, "", kfgSTRING, false, false), string(""));
-    REQUIRE_EQUAL(tokenText, string("$(ref"));
-    REQUIRE(errorMsg.length() > 0);
-}
-
-//////////////////////////////////////////// tests for bison-generated parser
-
-// test fixture for parser tests
-class KfgParseFixture : public SymbolTable
-{
-public:
-    KfgParseFixture() 
-    {
-    }
-    ~KfgParseFixture() 
-    {
-    }
-    rc_t Parse(const char* input)
-    {
-        KFGParseBlock pb; 
-        KFGScanBlock sb;
-
-        KFGScan_yylex_init(&sb, input);
-
-        pb.write_nvp=write_nvp;
-        
-        sb.self=this;
-        sb.file="test";
-        sb.look_up_var=lookup_var;
-        sb.report_error=report_error;
-        errorMsg.clear();
-        KFG_parse(&pb, &sb);
-
-        KFGScan_yylex_destroy(&sb);
-
-        return 0;
-    }
-
-    static rc_t write_nvp(void * cfg, const char* name, size_t nameLen, VNamelist* values)
-    {
-        uint32_t count;
-        rc_t rc=VNameListCount(values, &count);
-        if (rc != 0)
-        {
-            return rc;
-        }
-        string value;
-        for (uint32_t i=0; i < count; ++i)
-        {
-            const char* val;
-            rc=VNameListGet(values, i, &val);
-            if (rc != 0)
-            {
-                return rc;
-            }
-            value+=string(val, strlen(val));
-        }
-
-        KfgParseFixture* config=(KfgParseFixture*)cfg;
-        (*config)[string(name, nameLen)] = value;
-
-        return 0;
-    }
-
-    static void report_error(KFGScanBlock* sb, const char* msg)
-    {
-        KfgParseFixture* obj=((KfgParseFixture*)sb->self);
-        obj->errorMsg   = msg;
-        obj->errorLine  = sb->lastToken->line_no;
-        obj->errorCol   = sb->lastToken->column_no;
-        const char* token=sb->lastToken->tokenText;
-        obj->errorToken =string(token, sb->lastToken->tokenLength);
-    }
-
-    size_t errorLine;
-    size_t errorCol;
-    string errorToken;
-    string errorMsg;
-};
-
-FIXTURE_TEST_CASE(KfgParseEmptyFile, KfgParseFixture)
-{
-    REQUIRE_RC(Parse(""));
-    REQUIRE_EQ(size(), (size_t)0);
-    REQUIRE_RC(Parse("\n\n"));
-    REQUIRE_EQ(size(), (size_t)0);
-}
-
-FIXTURE_TEST_CASE(KfgParseOneNameValue, KfgParseFixture)
-{
-    REQUIRE_RC(Parse("name = \"value\""));  // no \n before EOF
-    REQUIRE_EQ(size(), (size_t)1);
-    REQUIRE_EQ((*this)["name"], string("value"));
-}
-
-FIXTURE_TEST_CASE(KfgParseMultNameValue, KfgParseFixture)
-{
-    REQUIRE_RC(Parse(
-        "name1 = \"value1\"\n"
-        "name2 = \"value2\"/**\n\n**/"    // comment with \n inside serves as a line end
-        "name3 = \"value3\"\n"
-        ));
-    REQUIRE_EQ(size(), (size_t)3);
-    REQUIRE_EQ((*this)["name1"], string("value1"));
-    REQUIRE_EQ((*this)["name2"], string("value2"));
-    REQUIRE_EQ((*this)["name3"], string("value3"));
-}
-
-FIXTURE_TEST_CASE(KfgParseAbsPath, KfgParseFixture)
-{
-    REQUIRE_RC(Parse("/id/1name/1 = \"value\"\n")); 
-    REQUIRE_EQ(size(), (size_t)1);
-    REQUIRE_EQ((*this)["/id/1name/1"], string("value"));
-}
-
-FIXTURE_TEST_CASE(KfgParseRelPath, KfgParseFixture)
-{
-    REQUIRE_RC(Parse("1/name1/id = \"value\"\n")); 
-    REQUIRE_EQ(size(), (size_t)1);
-    REQUIRE_EQ((*this)["1/name1/id"], string("value"));
-}
-
-FIXTURE_TEST_CASE(KfgParseEscString, KfgParseFixture)
-{
-    REQUIRE_RC(Parse("1/name1/id = \"v\\tlue\"\n")); 
-    REQUIRE_EQ(size(), (size_t)1);
-    REQUIRE_EQ((*this)["1/name1/id"], string("v\tlue")); 
-}
-
-FIXTURE_TEST_CASE(KfgParseVarRefSimple, KfgParseFixture)
-{
-    REQUIRE_RC(Parse(
-        "ref='value'\n"
-        "var = $(ref)"
-        )); 
-    REQUIRE_EQ((*this)["var"], string("value"));
-}
-
-FIXTURE_TEST_CASE(KfgParseVarRefSimpleUndefined, KfgParseFixture)
-{
-    REQUIRE_RC(Parse(
-        "ref='value'\n"
-        "var1 = $(reff)\n"
-        "var2 = $(ref)\n"
-        "var3 = $(var1)"
-        )); 
-    REQUIRE_EQ((*this)["var1"], string("")); 
-    REQUIRE_EQ((*this)["var2"], string("value")); // and recovered from
-    REQUIRE_EQ((*this)["var3"], string("")); // var1 is usable 
-}
-
-FIXTURE_TEST_CASE(KfgParseSyntaxRecovery1, KfgParseFixture)
-{
-    REQUIRE_RC(Parse(
-        "a='q'nn\n" // syntax error (name) and skip to eol
-        "name='val'" // this should parse
-        )); 
-    REQUIRE_EQ(errorLine, (size_t)1); 
-    REQUIRE_EQ(errorCol, (size_t)6);  
-    REQUIRE_EQ(errorToken, string("nn")); 
-    REQUIRE_EQ(errorMsg, string("syntax error")); 
-    REQUIRE_EQ((*this)["name"], string("val")); 
-}
-
-FIXTURE_TEST_CASE(KfgParseSyntaxRecovery2, KfgParseFixture)
-{
-    REQUIRE_RC(Parse(
-        "a='q'%\n"  // syntax error (unrecognized character) and skip to eol
-        "name='val'" // this should parse
-        )); 
-    REQUIRE_EQ(errorLine, (size_t)1); 
-    REQUIRE_EQ(errorCol, (size_t)6);  
-    REQUIRE_EQ(errorToken, string("%")); 
-    REQUIRE_EQ(errorMsg, string("syntax error")); 
-    REQUIRE_EQ((*this)["name"], string("val")); 
-}
-
-FIXTURE_TEST_CASE(KfgParseVarRefPath, KfgParseFixture)
-{
-    REQUIRE_RC(Parse(
-        "ref/sub='value'\n"
-        "var = $(ref/sub)"
-        )); 
-    REQUIRE_EQ((*this)["var"], string("value"));
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "wb-test-kfg";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc = KfgWbTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/kfs/Makefile b/test/kfs/Makefile
deleted file mode 100644
index 42f8ba5..0000000
--- a/test/kfs/Makefile
+++ /dev/null
@@ -1,137 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-
-MODULE = test/kfs
-
-TEST_TOOLS = \
-	test-kfs \
-    test-ramfile \
-    test-resolve \
-    test-cachetee \
-	test-kfs-md5
-
-include $(TOP)/build/Makefile.env
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: $(TEST_TOOLS)
-
-clean: stdclean
-
-#-------------------------------------------------------------------------------
-# test-kfs
-#
-TEST_KFS_SRC = \
-	kfstest 
-
-TEST_KFS_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_KFS_SRC))
-
-TEST_KFS_LIB = \
-	-lkapp \
-    -sncbi-vdb \
-	-lktst
-
-ifeq (1,$(HAVE_MAGIC))
-	TEST_KFS_LIB += -skff -lmagic
-	CPPFLAGS += -DHAVE_KFF
-endif
-
-$(TEST_BINDIR)/test-kfs: $(TEST_KFS_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_KFS_LIB)
-
-#-------------------------------------------------------------------------------
-# test-kfs-md5
-#
-TEST_MD5_SRC = \
-	md5test 
-
-TEST_MD5_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_MD5_SRC))
-
-TEST_MD5_LIB = \
-	-skapp \
-    -sncbi-vdb \
-	-sktst
-
-$(TEST_BINDIR)/test-kfs-md5: $(TEST_MD5_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_MD5_LIB)
-
-
-#-------------------------------------------------------------------------------
-# test-ramfile
-#
-TEST_RAMFILE_SRC = \
-	ramfiletest 
-
-TEST_RAMFILE_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_RAMFILE_SRC))
-
-TEST_RAMFILE_LIB = \
-	-lkapp \
-    -sncbi-vdb \
-	-lktst
-
-$(TEST_BINDIR)/test-ramfile: $(TEST_RAMFILE_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_RAMFILE_LIB)
-
-#-------------------------------------------------------------------------------
-# test-resolve
-#
-TEST_RESOLVE_SRC = \
-	resolvetest 
-
-TEST_RESOLVE_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_RESOLVE_SRC))
-
-TEST_RESOLVE_LIB = \
-	-lkapp \
-    -sncbi-vdb \
-	-lktst
-
-$(TEST_BINDIR)/test-resolve: $(TEST_RESOLVE_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_RESOLVE_LIB)
-
-#-------------------------------------------------------------------------------
-# test-cachetee
-#
-TEST_CACHETEE_SRC = \
-	cacheteetest
-
-TEST_CACHETEE_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_CACHETEE_SRC))
-
-TEST_CACHETEE_LIB = \
-	-lkapp \
-    -sncbi-vdb \
-	-lktst
-
-$(TEST_BINDIR)/test-cachetee: $(TEST_CACHETEE_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_CACHETEE_LIB)
diff --git a/test/kfs/cacheteetest.cpp b/test/kfs/cacheteetest.cpp
deleted file mode 100644
index a124d8e..0000000
--- a/test/kfs/cacheteetest.cpp
+++ /dev/null
@@ -1,604 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for cacheteefile
-*/
-
-#include <cstring>
-#include <cstdlib>
-#include <ctime>
-#include <algorithm>
-
-#include <ktst/unit_test.hpp>
-
-#include <klib/out.h>
-#include <klib/rc.h>
-
-#include <kproc/thread.h>
-
-#include <kfs/defs.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/cacheteefile.h>
-
-using namespace std;
-
-#define DATAFILE "org.dat"
-#define CACHEFILE "cache.dat"
-#define CACHEFILE1 "cache.dat.cache"
-#define DATAFILESIZE ( ( 1024 * 1024 ) + 300 )
-#define BLOCKSIZE 128
-
-TEST_SUITE( CacheTeeTests );
-
-// this is not what we are testing...
-
-static uint32_t rand_32( uint32_t min, uint32_t max )
-{
-       double scaled = ( ( double )rand() / RAND_MAX );
-       return ( ( max - min + 1 ) * scaled ) + min;
-}
-
-static rc_t fill_file_with_random_data( KFile * file, size_t file_size )
-{
-	rc_t rc = KFileSetSize( file, file_size );
-	if ( rc == 0 )
-	{
-		uint64_t pos = 0;
-		size_t total = 0;
-		while ( rc == 0 && total < file_size )
-		{
-			uint32_t data[ 512 ];
-			uint32_t i;
-			size_t to_write, num_writ;
-			
-			for ( i = 0; i < 512; ++i ) data[ i ] = rand_32( 0, 0xFFFFFFFF - 1 );
-			to_write = ( file_size - total );
-			if ( to_write > sizeof data ) to_write = sizeof data;
-			rc = KFileWriteAll ( file, pos, data, to_write, &num_writ );
-			if ( rc == 0 )
-			{
-				pos += num_writ;
-				total += num_writ;
-			}
-		}
-	}
-	return rc;
-}
-
-static rc_t create_random_file( const char * filename, uint64_t file_size )
-{
-    KDirectory * dir;
-    rc_t rc = KDirectoryNativeDir( &dir );
-	if ( rc == 0 )
-	{
-		KFile * file;
-		rc = KDirectoryCreateFile ( dir, &file, false, 0664, kcmInit, filename );
-		if ( rc == 0 )
-		{
-			if ( rc == 0 )
-				rc = fill_file_with_random_data( file, file_size );
-			KFileRelease( file );
-		}
-		KDirectoryRelease( dir );
-	}
-	return rc;
-}
-
-
-static rc_t remove_file( const char * filename )
-{
-    KDirectory * dir;
-    rc_t rc = KDirectoryNativeDir( &dir );
-	if ( rc == 0 )
-	{
-		rc = KDirectoryRemove ( dir, true, "%s", filename );
-		KDirectoryRelease( dir );
-	}
-	return rc;
-}
-
-
-static rc_t compare_file_content( const KFile * file1, const KFile * file2, uint64_t pos, size_t bytes )
-{
-	rc_t rc = 0;
-	uint8_t * buffer1 = ( uint8_t * )malloc( bytes );
-	if ( buffer1 == NULL )
-		rc = RC ( rcRuntime, rcBuffer, rcConstructing, rcMemory, rcExhausted );
-	else
-	{
-		uint8_t * buffer2 = ( uint8_t * )malloc( bytes );
-		if ( buffer2 == NULL )
-			rc = RC ( rcRuntime, rcBuffer, rcConstructing, rcMemory, rcExhausted );
-		else
-		{
-			size_t num_read1;
-			rc = KFileReadAll ( file1, pos, buffer1, bytes, &num_read1 );
-			if ( rc == 0 )
-			{
-				size_t num_read2;
-				rc = KFileReadAll ( file2, pos, buffer2, bytes, &num_read2 );
-				if ( rc == 0 )
-				{
-					if ( num_read1 != num_read2 )
-						rc = RC ( rcRuntime, rcBuffer, rcReading, rcMemory, rcInvalid );
-					else
-					{
-						int diff = memcmp( buffer1, buffer2, num_read1 );
-						if ( diff != 0 )
-							rc = RC ( rcRuntime, rcBuffer, rcReading, rcMemory, rcCorrupt );
-					}
-				}
-			}
-			free( buffer2 );
-		}
-		free( buffer1 );
-	}
-	return rc;
-}
-
-
-static rc_t read_partial( const KFile * src, size_t block_size, uint64_t to_read )
-{
-    rc_t rc = 0;
-    uint8_t * buffer = ( uint8_t * )malloc( block_size );
-    if ( buffer == NULL )
-		rc = RC ( rcRuntime, rcBuffer, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-		uint64_t pos = 0;
-		uint64_t total_read = 0;
-		while ( rc == 0 && total_read < to_read )
-		{
-			size_t num_read;
-			if ( block_size > ( to_read - total_read ) )
-				rc = KFileReadAll ( src, pos, buffer, to_read - total_read, &num_read );
-			else
-				rc = KFileReadAll ( src, pos, buffer, block_size, &num_read );
-			if ( rc == 0 )
-			{
-				pos += num_read;
-				total_read += num_read;
-			}
-		}
-        free( buffer );
-    }
-    return rc;
-}
-
-
-static rc_t read_all( const KFile * src, size_t block_size )
-{
-    rc_t rc = 0;
-    uint8_t * buffer = ( uint8_t * )malloc( block_size );
-    if ( buffer == NULL )
-		rc = RC ( rcRuntime, rcBuffer, rcConstructing, rcMemory, rcExhausted );
-    else
-    {
-		uint64_t pos = 0;
-		size_t num_read = 1;
-		while ( rc == 0 && num_read > 0 )
-		{
-			rc = KFileReadAll ( src, pos, buffer, block_size, &num_read );
-			if ( rc == 0 )	pos += num_read;
-		}
-        free( buffer );
-    }
-    return rc;
-}
-
-
-// we create a data-file that we want to wrap ....
-static rc_t prepare_cachetee_tests( void )
-{
-	rc_t rc = create_random_file( DATAFILE, DATAFILESIZE );
-	remove_file( CACHEFILE );
-	remove_file( CACHEFILE1 );
-	return rc;
-}
-
-// we remove everything that was created ...
-static void finish_cachetee_tests( void )
-{
-	remove_file( DATAFILE );
-	remove_file( CACHEFILE );
-	remove_file( CACHEFILE1 );
-}
-
-//////////////////////////////////////////// Test-cases
-
-TEST_CASE( CacheTee_Basic )
-{
-	KOutMsg( "Test: CacheTee_Basic\n" );
-	
-    KDirectory * dir;
-    REQUIRE_RC( KDirectoryNativeDir( &dir ) );
-
-	const KFile * org;
-    REQUIRE_RC( KDirectoryOpenFileRead( dir, &org, "%s", DATAFILE ) );
-	
-	const KFile * tee;
-	REQUIRE_RC( KDirectoryMakeCacheTee ( dir, &tee, org, BLOCKSIZE, "%s", CACHEFILE ) );
-
-	REQUIRE_RC( KFileRelease( tee ) );
-	REQUIRE_RC( KFileRelease( org ) );
-	
-	const KFile * cache;
-	REQUIRE_RC( KDirectoryOpenFileRead( dir, &cache, "%s.cache", CACHEFILE ) );
-	
-	bool is_complete;
-	REQUIRE_RC( IsCacheFileComplete( cache, &is_complete ) );	
-	REQUIRE( !is_complete );
-	
-	float percent;
-	uint64_t bytes_in_cache;
-	REQUIRE_RC( GetCacheCompleteness( cache, &percent, &bytes_in_cache ) );
-	REQUIRE( ( percent == 0.0 ) );
-	REQUIRE( ( bytes_in_cache == 0 ) );
-	
-	REQUIRE_RC( KFileRelease( cache ) );
-	REQUIRE_RC( KDirectoryRelease( dir ) );
-}                                 
-
-
-TEST_CASE( CacheTee_Read )
-{
-	KOutMsg( "Test: CacheTee_Read\n" );
-	
-    KDirectory * dir;
-    REQUIRE_RC( KDirectoryNativeDir( &dir ) );
-
-	const KFile * org;
-    REQUIRE_RC( KDirectoryOpenFileRead( dir, &org, "%s", DATAFILE ) );
-	
-	const KFile * tee;
-	REQUIRE_RC( KDirectoryMakeCacheTee ( dir, &tee, org, BLOCKSIZE, "%s", CACHEFILE ) );
-
-	REQUIRE_RC( compare_file_content( org, tee, 0, 100 ) );						// small read at pos zero
-	REQUIRE_RC( compare_file_content( org, tee, 10, 100 ) );						// small read at pos 10
-	REQUIRE_RC( compare_file_content( org, tee, 1024 * 128, 100 ) );				// small read at block boundary
-	REQUIRE_RC( compare_file_content( org, tee, 100, 1024 * 128 + 500 ) );			// large read crossing block boundary
-	REQUIRE_RC( compare_file_content( org, tee, 200, 1024 * 128 * 3 ) );			// very large read at pos 200
-	REQUIRE_RC( compare_file_content( org, tee, 1024 * 128 * 2 + 10, 100 ) );		// small read after block boundary
-	REQUIRE_RC( compare_file_content( org, tee, 1024 * 128 * 2 - 10, 100 ) );		// small read crossing block boundary	
-	REQUIRE_RC( compare_file_content( org, tee, DATAFILESIZE - 100, 300 ) );		// small read crossing EOF
-	
-	REQUIRE_RC( KFileRelease( tee ) );	
-	REQUIRE_RC( KFileRelease( org ) );
-	REQUIRE_RC( KDirectoryRelease( dir ) );
-}
-
-
-TEST_CASE( CacheTee_Promoting )
-{
-	KOutMsg( "Test: CacheTee_Promoting\n" );
-	
-	remove_file( CACHEFILE );	// to start with a clean slate on caching...
-	remove_file( CACHEFILE1 );
-
-    KDirectory * dir;
-    REQUIRE_RC( KDirectoryNativeDir( &dir ) );
-
-	const KFile * org;
-    REQUIRE_RC( KDirectoryOpenFileRead( dir, &org, "%s", DATAFILE ) );
-	
-	const KFile * tee;
-	REQUIRE_RC( KDirectoryMakeCacheTee ( dir, &tee, org, BLOCKSIZE, "%s", CACHEFILE ) );
-
-	REQUIRE_RC( read_partial( tee, 1024 * 32, DATAFILESIZE / 2 ) );
-	REQUIRE_RC( KFileRelease( tee ) );
-	
-	const KFile * cache;
-	REQUIRE_RC( KDirectoryOpenFileRead( dir, &cache, "%s.cache", CACHEFILE ) );
-
-	bool is_complete;
-	REQUIRE_RC( IsCacheFileComplete( cache, &is_complete ) );	
-	REQUIRE( !is_complete );
-
-	float percent;
-	REQUIRE_RC( GetCacheCompleteness( cache, &percent, NULL ) );
-	REQUIRE( ( percent >= 50.0 ) );
-
-	REQUIRE_RC( KFileRelease( cache ) );
-
-	remove_file( CACHEFILE1 );
-
-	REQUIRE_RC( KDirectoryMakeCacheTee ( dir, &tee, org, BLOCKSIZE, "%s", CACHEFILE ) );
-	REQUIRE_RC( read_all( tee, 1024 * 32 ) );	//	this should trigger the promotion of the cache file from cache.dat.cache to cache.dat
-	REQUIRE_RC( KFileRelease( tee ) );	
-	
-	REQUIRE_RC( KDirectoryOpenFileRead( dir, &cache, "%s", CACHEFILE ) ); // if we can open this file then, it was promoted...
-	REQUIRE_RC( KFileRelease( cache ) );
-	
-	REQUIRE_RC( KFileRelease( org ) );	
-	REQUIRE_RC( KDirectoryRelease( dir ) );
-}
-
-
-static rc_t cache_access( int tid, int num_threads, const KFile * origfile, const KFile * cacheteefile )
-{
-    rc_t rc;
-    int i;
-    const int num_chunks = 256;
-    int chunk_pos[num_chunks];
-    int data_size = DATAFILESIZE / num_threads;
-    int data_offset = data_size * (tid - 1);
-    int chunk_size;
-    // last thread should read all remaining bytes
-    if (tid == num_threads)
-        data_size = DATAFILESIZE - data_offset;
-    chunk_size = data_size / num_chunks;
-
-    for ( i = 0; i < num_chunks; ++i )
-    {
-        chunk_pos[i] = i * chunk_size + data_offset;
-    }
-    std::random_shuffle(&chunk_pos[0], &chunk_pos[num_chunks]);
-    for ( i = 0; i < num_chunks; ++i )
-    {
-        rc = compare_file_content( origfile, cacheteefile, chunk_pos[i], chunk_size );
-        if ( rc != 0 )
-            break;
-    }
-    if ( rc == 0 )
-        KOutMsg( "Test: Thread #%d OK\n", tid );
-    else
-        KOutMsg( "Test: Thread #%d failed\n", tid );
-					
-	return rc;
-}
-
-struct ThreadData
-{
-    int tid;
-    int num_threads;
-    const KFile * origfile; // optional
-    const KFile * cacheteefile; // optional
-};
-
-static rc_t CC thread_func( const KThread *self, void *data )
-{
-    ThreadData * td = ( ThreadData * ) data;
-    if ( td->cacheteefile == NULL || td->origfile == NULL )
-    {
-        KDirectory * dir;
-        rc_t rc = KDirectoryNativeDir( &dir );
-        if ( rc == 0 )
-        {
-            const KFile * org;
-            rc = KDirectoryOpenFileRead( dir, &org, "%s", DATAFILE );
-            if ( rc == 0 )
-            {
-                const KFile * tee;
-                rc = KDirectoryMakeCacheTee ( dir, &tee, org, BLOCKSIZE, "%s", CACHEFILE );
-                if ( rc == 0 )
-                {
-                    rc = cache_access( td->tid, td->num_threads, org, tee );
-                    KFileRelease( tee );
-                }
-                KFileRelease( org );
-            }
-            KDirectoryRelease( dir );
-        }
-        return rc;
-    }
-	return cache_access( td->tid, td->num_threads, td->origfile, td->cacheteefile );
-}
-
-// TODO: fix, this does not work on Windows
-#if !defined(WINDOWS) && !defined(_WIN32)
-TEST_CASE( CacheTee_Multiple_Users_Multiple_Inst )
-{
-	KOutMsg( "Test: CacheTee_Multiple_Users_Multiple_Inst\n" );
-	remove_file( CACHEFILE );	// to start with a clean slate on caching...
-	remove_file( CACHEFILE1 );
-
-	const int n = 8;
-	KThread *t [ n ];
-	ThreadData td [ n ];
-	rc_t rc = 0;
-	for ( int i = 0; i < n && rc == 0; ++i )
-	{
-		td[ i ].tid = i + 1;
-		td[ i ].num_threads = n;
-		td[ i ].origfile = NULL;
-		td[ i ].cacheteefile = NULL;
-		rc = KThreadMake ( &( t[ i ] ), thread_func, &( td[ i ] ) );
-		REQUIRE_RC( rc );
-	}
-	
-	for ( int i = 0; i < n && rc == 0; ++i )
-	{
-		rc_t rc_thread;
-		rc = KThreadWait ( t[ i ], &rc_thread );
-		REQUIRE_RC( rc );
-		REQUIRE_RC( rc_thread );
-		REQUIRE_RC( KThreadRelease ( t[ i ] ) );
-	}
-}
-
-TEST_CASE( CacheTee_Multiple_Users_Single_Inst )
-{
-    KOutMsg( "Test: CacheTee_Multiple_Users_Single_Inst\n" );
-    remove_file( CACHEFILE );   // to start with a clean slate on caching...
-    remove_file( CACHEFILE1 );
-
-    KDirectory * dir;
-    const KFile * org;
-    const KFile * tee;
-    REQUIRE_RC( KDirectoryNativeDir( &dir ) );
-    REQUIRE_RC( KDirectoryOpenFileRead( dir, &org, "%s", DATAFILE ) );
-    REQUIRE_RC( KDirectoryMakeCacheTee ( dir, &tee, org, BLOCKSIZE, "%s", CACHEFILE ) );
-
-    const int n = 8;
-    KThread *t [ n ];
-    ThreadData td [ n ];
-    rc_t rc = 0;
-    for ( int i = 0; i < n && rc == 0; ++i )
-    {
-        td[ i ].tid = i + 1;
-        td[ i ].num_threads = n;
-        td[ i ].origfile = org;
-        td[ i ].cacheteefile = tee;
-        rc = KThreadMake ( &( t[ i ] ), thread_func, &( td[ i ] ) );
-        REQUIRE_RC( rc );
-    }
-
-    for ( int i = 0; i < n && rc == 0; ++i )
-    {
-        rc_t rc_thread;
-        rc = KThreadWait ( t[ i ], &rc_thread );
-        REQUIRE_RC( rc );
-        REQUIRE_RC( rc_thread );
-        REQUIRE_RC( KThreadRelease ( t[ i ] ) );
-    }
-
-    REQUIRE_RC( KFileRelease( tee ) );
-    REQUIRE_RC( KFileRelease( org ) );
-    REQUIRE_RC( KDirectoryRelease( dir ) );
-}
-
-TEST_CASE( CacheTee_ReadOnly )
-{
-	KOutMsg( "Test: CacheTee_ReadOnly\n" );
-	remove_file( CACHEFILE );	// to start with a clean slate on caching...
-	remove_file( CACHEFILE1 );
-
-    KDirectory * dir;
-    REQUIRE_RC( KDirectoryNativeDir( &dir ) );
-
-	const KFile * org;
-    REQUIRE_RC( KDirectoryOpenFileRead( dir, &org, "%s", DATAFILE ) );
-
-	/* make a fresh cache-tee and read 100 bytes from it... */
-	const KFile * tee;
-	REQUIRE_RC( KDirectoryMakeCacheTee ( dir, &tee, org, BLOCKSIZE, "%s", CACHEFILE ) );
-	REQUIRE_RC( read_partial( tee, 100, 100 ) );
-	REQUIRE_RC( KFileRelease( tee ) );
-
-	/* switch the cache-file to read-only */
-	REQUIRE_RC( KDirectorySetAccess ( dir, false, 0, 0222, "%s", CACHEFILE1 ) );
-
-	/* make a second cache-tee and read all from it... */
-	REQUIRE_RC( KDirectoryMakeCacheTee ( dir, &tee, org, BLOCKSIZE, "%s", CACHEFILE ) );
-	REQUIRE_RC( read_all( tee, 1024 * 32 )	);
-	REQUIRE_RC( KFileRelease( tee ) );
-
-	/* we read all from the tee-file that should have promoted it on Release,
-	   but we made it read only before the creation of the 2nd tee-file
-	   because of that it should not be promoted and not complete */
-	
-	const KFile * cache;
-	REQUIRE_RC_FAIL( KDirectoryOpenFileRead( dir, &cache, "%s", CACHEFILE ) );
-	REQUIRE_RC( KDirectoryOpenFileRead( dir, &cache, "%s", CACHEFILE1 ) );
-	
-	bool is_complete;
-	REQUIRE_RC( IsCacheFileComplete( cache, &is_complete ) );	
-	REQUIRE( !is_complete );
-
-	REQUIRE_RC( KFileRelease( cache ) );		
-	REQUIRE_RC( KFileRelease( org ) );	
-	REQUIRE_RC( KDirectoryRelease( dir ) );
-}
-
-TEST_CASE( CacheTee_Multiple_Users_with_Promoting )
-{
-	KOutMsg( "Test: CacheTee_Multiple_Users_with_Promoting\n" );
-	remove_file( CACHEFILE );	// to start with a clean slate on caching...
-	remove_file( CACHEFILE1 );
-
-    KDirectory * dir;
-    REQUIRE_RC( KDirectoryNativeDir( &dir ) );
-
-	const KFile * org;
-    REQUIRE_RC( KDirectoryOpenFileRead( dir, &org, "%s", DATAFILE ) );
-
-	/* make 2 cache-tee's */
-	const KFile * tee1;
-	REQUIRE_RC( KDirectoryMakeCacheTee ( dir, &tee1, org, BLOCKSIZE, "%s", CACHEFILE ) );
-	const KFile * tee2;
-	REQUIRE_RC( KDirectoryMakeCacheTee ( dir, &tee2, org, BLOCKSIZE, "%s", CACHEFILE ) );
-
-	/* read all from tee1 and release it, that will trigger promotion */
-	REQUIRE_RC( read_all( tee1, 1024 * 32 )	);
-	REQUIRE_RC( KFileRelease( tee1 ) );
-
-	/* read a little bit from tee2 and release it, will it corrupt the cache? */	
-	REQUIRE_RC( read_partial( tee2, 100, 100 ) );
-	REQUIRE_RC( KFileRelease( tee2 ) );
-
-	/* the ( newly ) promoted cache file has to be not corrupt */
-	REQUIRE_RC( KDirectoryMakeCacheTee ( dir, &tee1, org, BLOCKSIZE, "%s", CACHEFILE ) );
-	REQUIRE_RC( KFileRelease( tee1 ) );
-
-	/* the .cache - file has to be gone */
-	uint32_t pt = KDirectoryPathType ( dir, "%s", CACHEFILE1 );
-	REQUIRE( pt == kptNotFound );
-	
-	REQUIRE_RC( KFileRelease( org ) );	
-	REQUIRE_RC( KDirectoryRelease( dir ) );
-}
-#endif
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-
-rc_t CC UsageSummary ( const char * progname )
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "cachetee-test";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    srand(time(NULL));
-    KConfigDisableUserSettings();
-	rc_t rc = prepare_cachetee_tests();
-	if ( rc == 0 )
-	{
-		rc = CacheTeeTests( argc, argv );
-		finish_cachetee_tests();
-	}
-    return rc;
-}
-
-}
diff --git a/test/kfs/kfstest.cpp b/test/kfs/kfstest.cpp
deleted file mode 100644
index 928611e..0000000
--- a/test/kfs/kfstest.cpp
+++ /dev/null
@@ -1,198 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for Kfs interface
-*/
-
-#include <cstring>
-
-#include <ktst/unit_test.hpp>
-#include <kfs/mmap.h>
-#include <kfs/directory.h>
-#include <kfs/impl.h>
-#include <kfs/tar.h>
-
-#include <kfs/ffext.h>
-#include <kfs/ffmagic.h>
-
-#define class clss
-#include <kfs/fileformat.h>
-#undef class
-
-#include "../../libs/kfs/toc-priv.h"
-
-using namespace std;
-
-TEST_SUITE(KfsTestSuite);
-
-TEST_CASE(KMMapMakeRead_and_KMMapRelease)
-{   // create a temporary file, open it with KMMapMakeRead, close KMMap, try to delete 
-
-    KDirectory *wd;
-    REQUIRE_RC(KDirectoryNativeDir ( & wd ));
-
-    const char* fileName="test.file";
-
-    {   // create temp file, close
-        KFile* file;
-        const char* contents="contents";
-        REQUIRE_RC(KDirectoryCreateFile(wd, &file, true, 0664, kcmInit, fileName));
-        size_t num_writ=0;
-        REQUIRE_RC(KFileWrite(file, 0, contents, strlen(contents), &num_writ));
-        REQUIRE_RC(KFileRelease(file));
-    }
-
-    {   // open, memory-map, close
-        const KFile* file;
-        REQUIRE_RC(KDirectoryOpenFileRead(wd, &file, fileName));
-        const KMMap * mm;
-        REQUIRE_RC(KMMapMakeRead(&mm, file));
-        REQUIRE_RC(KMMapRelease(mm));
-
-        REQUIRE_RC(KFileRelease(file));
-    }
-
-    // now, remove the file
-    // on Windows: used to return ACCESS_DENIED, not removed file 
-    // (cause: no call to UnmapViewOfFile in libs\kfs\win\KMapUnmap)
-    REQUIRE_RC(KDirectoryRemove(wd, false, fileName)); 
-
-    REQUIRE_RC(KDirectoryRelease ( wd ));
-}
-
-#ifdef HAVE_KFF
-
-TEST_CASE(ExtFileFormat)
-{
-    struct KFileFormat* pft;
-    const char format[] = {
-        "ext1\tTestFormat1\n"
-        "ext2\tTestFormat2\n"
-    };
-    const char typeAndClass[] = {
-        "TestFormat1\tTestClass1\n"
-        "TestFormat2\tTestClass2\n"
-    };
-    REQUIRE_RC(KExtFileFormatMake(&pft, format, sizeof(format) - 1, typeAndClass, sizeof(typeAndClass) - 1));
-    
-    KFileFormatType type;
-    KFileFormatClass clss;
-    char descr[1024];
-    size_t length;
-    REQUIRE_RC(KFileFormatGetTypePath(pft, 
-                                      NULL, // ignored
-                                      "qq.ext2", 
-                                      &type, 
-                                      &clss,
-                                      descr, 
-                                      sizeof(descr),
-                                      &length));    
-    REQUIRE_EQ(type, 2);
-    REQUIRE_EQ(clss, 2);
-    REQUIRE_EQ(string(descr, length), string("TestFormat2"));
-    
-    REQUIRE_RC(KFileFormatGetClassDescr(pft, clss, descr, sizeof (descr)));        
-    REQUIRE_EQ(string(descr), string("TestClass2"));
-    REQUIRE_EQ(length, string("TestClass2").length()+1);
-    REQUIRE_RC(KFileFormatRelease(pft));
-}
-
-TEST_CASE(MagicFileFormat)
-{
-    struct KFileFormat* pft;
-    const char magic[] = 
-    {
-        "Generic Format for Sequence Data (SRF)\tSequenceReadFormat\n"
-        "GNU tar archive\tTapeArchive\n"
-    };
-    const char typeAndClass[] = {
-        "SequenceReadFormat\tRead\n"
-        "TapeArchive\tArchive\n"
-    };
-    REQUIRE_RC(KMagicFileFormatMake (&pft, "/usr/share/misc/magic", magic, sizeof(magic) - 1, typeAndClass, sizeof(typeAndClass) - 1));
-    REQUIRE_RC(KFileFormatRelease(pft));
-}
-
-#endif
-
-TEST_CASE(Tar_Parse)
-{
-    KDirectory *dir;
-    REQUIRE_RC(KDirectoryNativeDir(&dir));    
-    
-    const KDirectory *tarDir;
-    REQUIRE_RC(KDirectoryOpenTarArchiveRead(dir, &tarDir, false, "test.tar"));
-    
-    struct KNamelist *list;
-    REQUIRE_RC(KDirectoryList(tarDir, &list, NULL, NULL, NULL));
-    
-    uint32_t count;
-    REQUIRE_RC(KNamelistCount(list, &count));
-    REQUIRE_EQ(count, (uint32_t)2);
-    
-    const char* name;
-    REQUIRE_RC(KNamelistGet(list, 0, &name));
-    REQUIRE_EQ(string(name), string("Makefile"));
-    REQUIRE_RC(KNamelistGet(list, 1, &name));
-    REQUIRE_EQ(string(name), string("kfstest.cpp"));
-    
-    REQUIRE_RC(KNamelistRelease(list));
-    REQUIRE_RC(KDirectoryRelease(tarDir));
-    REQUIRE_RC(KDirectoryRelease(dir));
-}                                 
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-kfs";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=KfsTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/kfs/md5test.cpp b/test/kfs/md5test.cpp
deleted file mode 100644
index b71eee0..0000000
--- a/test/kfs/md5test.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for KMD5File
-*/
-
-#include <cstring>
-#include <cstdio>
-
-#include <ktst/unit_test.hpp>
-
-#include <kfs/directory.h>
-#include <kfs/impl.h>
-#include <kfs/md5.h>
-
-
-#define class clss
-#include <kfs/fileformat.h>
-#undef class
-
-using namespace std;
-
-TEST_SUITE(KMD5FileTestSuite);
-
-TEST_CASE(KMD5WriteFileTruncateAfterChange)
-{
-    KDirectory *wd;
-    REQUIRE_RC(KDirectoryNativeDir ( & wd ));
-
-    const char* filename = "md5test_trunc.file";
-    const char* md5sums_filename = "md5test_sums_trunc.file";
-    const char* contents = "contents";
-
-    {   // create temp file, close
-        KFile* file;
-        REQUIRE_RC( KDirectoryCreateFile(wd, &file, true, 0664, kcmInit, filename) );
-        
-        size_t num_writ;
-        REQUIRE_RC( KFileWrite(file, 0, contents, strlen(contents), &num_writ) );
-        assert(num_writ == strlen(contents));
-        
-        uint64_t file_size;
-        REQUIRE_RC( KFileSize(file, &file_size) );
-        REQUIRE( file_size == strlen(contents) );
-        
-        REQUIRE_RC( KFileRelease(file) );
-    }
-
-    {
-        KFile * file, * md5sums_file;
-        KMD5File * md5_file_obj;
-        KMD5SumFmt * md5sums;
-        
-        REQUIRE_RC( KDirectoryCreateFile(wd, &md5sums_file, true, 0664, kcmInit, md5sums_filename) );
-        REQUIRE_RC( KMD5SumFmtMakeUpdate(&md5sums, md5sums_file) );
-        
-        REQUIRE_RC( KDirectoryOpenFileWrite(wd, &file, true, filename) );
-        
-        REQUIRE_RC( KMD5FileMakeWrite(&md5_file_obj, file, md5sums, filename) );
-        file = KMD5FileToKFile(md5_file_obj);
-        
-        size_t num_writ;
-        REQUIRE_RC( KFileWrite(file, 0, contents, strlen(contents) - 2, &num_writ) );
-        assert(num_writ == strlen(contents) - 2);
-        
-        REQUIRE_RC( KFileRelease(file) );
-        REQUIRE_RC( KMD5SumFmtRelease(md5sums) );
-    }
-    
-    {
-        const KFile * file;
-        REQUIRE_RC( KDirectoryOpenFileRead(wd, &file, filename) );
-        
-        uint64_t file_size;
-        REQUIRE_RC( KFileSize(file, &file_size) );
-        REQUIRE( file_size == strlen(contents) - 2 );
-        
-        REQUIRE_RC( KFileRelease(file) );
-    }
-
-    REQUIRE_RC( KDirectoryRemove(wd, false, filename) );
-    REQUIRE_RC( KDirectoryRemove(wd, false, md5sums_filename) );
-
-    REQUIRE_RC( KDirectoryRelease ( wd ) );
-}
-
-TEST_CASE(KMD5WriteFileNotTruncateWithoutChange)
-{
-    KDirectory *wd;
-    REQUIRE_RC(KDirectoryNativeDir ( & wd ));
-    
-    const char* filename = "md5test_notrunc.file";
-    const char* md5sums_filename = "md5test_sums_notrunc.file";
-    const char* contents = "contents";
-    
-    {   // create temp file, close
-        KFile* file;
-        REQUIRE_RC( KDirectoryCreateFile(wd, &file, true, 0664, kcmInit, filename) );
-        
-        size_t num_writ;
-        REQUIRE_RC( KFileWrite(file, 0, contents, strlen(contents), &num_writ) );
-        assert(num_writ == strlen(contents));
-        
-        uint64_t file_size;
-        REQUIRE_RC( KFileSize(file, &file_size) );
-        REQUIRE( file_size == strlen(contents) );
-        
-        REQUIRE_RC( KFileRelease(file) );
-    }
-    
-    {
-        KFile * file, * md5sums_file;
-        KMD5File * md5_file_obj;
-        KMD5SumFmt * md5sums;
-        
-        REQUIRE_RC( KDirectoryCreateFile(wd, &md5sums_file, true, 0664, kcmInit, md5sums_filename) );
-        REQUIRE_RC( KMD5SumFmtMakeUpdate(&md5sums, md5sums_file) );
-        
-        REQUIRE_RC( KDirectoryOpenFileWrite(wd, &file, true, filename) );
-        
-        REQUIRE_RC( KMD5FileMakeWrite(&md5_file_obj, file, md5sums, filename) );
-        file = KMD5FileToKFile(md5_file_obj);
-        
-        REQUIRE_RC( KFileRelease(file) );
-        REQUIRE_RC( KMD5SumFmtRelease(md5sums) );
-    }
-    
-    {
-        const KFile * file;
-        REQUIRE_RC( KDirectoryOpenFileRead(wd, &file, filename) );
-        
-        uint64_t file_size;
-        REQUIRE_RC( KFileSize(file, &file_size) );
-        REQUIRE( file_size == strlen(contents) );
-        
-        REQUIRE_RC( KFileRelease(file) );
-    }
-    
-    REQUIRE_RC( KDirectoryRemove(wd, false, filename) );
-    REQUIRE_RC( KDirectoryRemove(wd, false, md5sums_filename) );
-    
-    REQUIRE_RC( KDirectoryRelease ( wd ) );
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-kfs-md5";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=KMD5FileTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/kfs/ramfiletest.cpp b/test/kfs/ramfiletest.cpp
deleted file mode 100644
index 7d0376a..0000000
--- a/test/kfs/ramfiletest.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for KRamFile
-*/
-#include <cstring>
-#include <ktst/unit_test.hpp>
-#include <kfs/ramfile.h>
-#include <kfs/impl.h>
-#include <klib/out.h>
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-using namespace std;
-
-TEST_SUITE(RamFileTestSuite);
-
-TEST_CASE(KRamFileWrite_simple_write)
-{
-    char input [4 * 1024];
-
-    for (size_t ix = 0; ix < sizeof input;  ++ ix)
-        input [ix] = (char)(' ' + (char)(ix & 0x3F));
-
-    char buffer[4 * 1024 + 1]; // extra for NUL for display purposes
-
-    KFile * wfile;
-
-
-    for (size_t pos = 0; pos < sizeof buffer /* including the +1 */; pos += 100) // skipping a bunch since its working
-    {
-        for (size_t inc = 1; inc < sizeof (input); inc += 50) // faster since its working
-        {
-            for (size_t bsize = 0; bsize <= sizeof input + 1; bsize += inc)
-            {
-                size_t num_writ;
-
-                memset (buffer, 0, sizeof buffer);
-
-                REQUIRE_RC(KRamFileMakeWrite (&wfile, buffer, sizeof buffer - 1));
-                REQUIRE_RC(KFileWrite(wfile, pos, input, bsize, &num_writ));
-                REQUIRE(((bsize<sizeof(input))?bsize:sizeof(input))==num_writ);
-                REQUIRE(memcmp(buffer,input,num_writ) == 0);
-                REQUIRE_RC(KFileRelease(wfile));
-            }
-        }
-    }
-
-}
-
-
-TEST_CASE(KramFileWrite_append_write)
-{
-    char input [4 * 1024];
-
-    for (size_t ix = 0; ix < sizeof input;  ++ ix)
-        input [ix] = (char)(' ' + (char)(ix & 0x3F));
-
-    char buffer[4 * 1024 + 1]; // extra for NUL for display purposes
-
-    KFile * wfile;
-
-    for (size_t pos = 0; pos < sizeof buffer - 1; pos += 200)
-    {
-        for (size_t bsize = 1; bsize < sizeof buffer - 1; bsize += 200)
-        {
-            uint64_t tot_writ = 0;
-            size_t num_writ;
-
-            REQUIRE_RC(KRamFileMakeWrite (&wfile, buffer, sizeof buffer - 1));
-            memset (buffer, 0, sizeof buffer);
-
-            for (size_t off = 0; tot_writ + bsize < sizeof buffer - 1; off += num_writ)
-            {
-                REQUIRE_RC (KFileWrite(wfile, tot_writ, input + off, bsize, &num_writ));
-                REQUIRE(num_writ == bsize);
-                tot_writ += num_writ;
-
-                REQUIRE(memcmp(input,buffer,tot_writ) == 0);
-            }
-
-            REQUIRE_RC(KFileRelease(wfile));            
-        }
-    }
-}
-
-TEST_CASE(KRamFileWrite_oversized_writes)
-{
-    char input [16 * 1024];
-
-    for (size_t ix = 0; ix < sizeof input;  ++ ix)
-        input [ix] = (char)(' ' + (char)(ix & 0x3F));
-
-    char buffer[4 * 1024 + 1];
-
-    KFile * wfile;
-
-    for (size_t max = 1; max <= sizeof buffer - 1; max += 200)
-    {
-        memset (buffer, 0, sizeof buffer);
-        REQUIRE_RC(KRamFileMakeWrite (&wfile, buffer, max));
-
-        for (size_t bsize = (max+1)/2; bsize < sizeof input; bsize+= 150)
-        {
-            size_t num_writ;
-
-            REQUIRE_RC (KFileWrite(wfile, 0, input, bsize, &num_writ));
-            if (bsize > max)
-                REQUIRE(num_writ == max);
-            else
-                REQUIRE(num_writ == bsize);
-
-            REQUIRE(0 == memcmp(buffer, input, num_writ));
-            REQUIRE(0 != memcmp(buffer, input, num_writ+1));
-        }
-        REQUIRE_RC(KFileRelease(wfile));            
-    }
-}
-
-
-TEST_CASE(KRamFileWrite_shift_right)
-{
-    char input [16 * 1024];
-
-    for (size_t ix = 0; ix < sizeof input;  ++ ix)
-        input [ix] = (char)(' ' + (char)(ix & 0x3F));
-
-    char buffer[4 * 1024];
-
-    size_t num_writ;
-
-    KFile * wfile;
-
-    for (size_t bsize = 1; bsize < sizeof buffer; ++bsize)
-    {
-        REQUIRE_RC(KRamFileMakeWrite (&wfile, buffer, sizeof buffer - 1));
-
-        REQUIRE_RC(KFileWrite(wfile, 0, input, bsize, &num_writ));
-        REQUIRE(bsize = num_writ);
-        
-        REQUIRE_RC(KFileRelease(wfile));            
-    }
-    
-}
-
-//////////////////////////////////////////// Main
-
-extern "C"
-{
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-
-rc_t CC UsageSummary (const char * prog_name)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args)
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-kfg";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=RamFileTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/kfs/resolvetest.cpp b/test/kfs/resolvetest.cpp
deleted file mode 100644
index bbb86dc..0000000
--- a/test/kfs/resolvetest.cpp
+++ /dev/null
@@ -1,196 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for KDirectoryResolve
-*/
-#include <cstring>
-#include <ktst/unit_test.hpp>
-#include <kfs/directory.h>
-#include <kfs/impl.h>
-#include <klib/out.h>
-#include <kapp/args.h>
-
-#include <stdexcept>
-
-using namespace std;
-
-TEST_SUITE( ResolveSuite );
-
-class ResolveFixture {
-public:
-    ResolveFixture()
-    : m_dir(0)
-    {
-        if ( KDirectoryNativeDir ( &m_dir ) != 0 )
-           throw logic_error( "ResolveFixture: KDirectoryNativeDir failed");
-    }
-    ~ResolveFixture()
-    {
-        if ( m_dir )
-        {
-            KDirectoryRelease( m_dir );
-        }
-    }
-    
-    char m_resolved[ 4 * 1024 ];
-    KDirectory *m_dir;
-};
-
-// use this in test cases based on ResolveFixture
-#define REQUIRE_RESOLVE(input, result) \
-    REQUIRE_RC( KDirectoryResolvePath ( m_dir, true, m_resolved, sizeof m_resolved, input ) ); \
-    REQUIRE_EQ(string (m_resolved), string (result) );
-
-FIXTURE_TEST_CASE( ResolveTest_Simple, ResolveFixture )
-{
-    REQUIRE_RESOLVE( "/a/22/333", "/a/22/333" );
-}
-
-FIXTURE_TEST_CASE( ResolveTest_DoubleLeading, ResolveFixture )
-{
-    REQUIRE_RC( KDirectoryResolvePath ( m_dir, true, m_resolved, sizeof m_resolved, "//1/22/333" ) );
-#ifdef WINDOWS    
-    REQUIRE_RESOLVE( "//1/22/333", "//1/22/333");
-#else
-    REQUIRE_RESOLVE( "//1/22/333", "/1/22/333");
-#endif
-}
-
-FIXTURE_TEST_CASE( ResolveTest_TrailingSlash, ResolveFixture )
-{
-    REQUIRE_RESOLVE( "/a/22/333/", "/a/22/333" );
-}
-
-FIXTURE_TEST_CASE( ResolveTest_TrailingDotSlash, ResolveFixture )
-{
-    REQUIRE_RESOLVE( "/a/22/333/./", "/a/22/333" );
-}
-
-FIXTURE_TEST_CASE( ResolveTest_CanonizeDoubleDot, ResolveFixture )
-{
-    REQUIRE_RESOLVE( "/a/22/333/../333/", "/a/22/333" );
-}
-
-FIXTURE_TEST_CASE( ResolveTest_CanonizeDoubleSlashDoubleDot, ResolveFixture )
-{
-    REQUIRE_RESOLVE( "/a/22//../333/", "/a/333" );
-}
-
-FIXTURE_TEST_CASE( ResolveTest_TrailingDoubleDot, ResolveFixture )
-{
-    REQUIRE_RESOLVE( "/a/22/333/4444/../", "/a/22/333" );
-}
-
-FIXTURE_TEST_CASE( ResolveTest_DoubleSlash, ResolveFixture )
-{
-    REQUIRE_RESOLVE( "/a/22//333", "/a/22/333" );
-}
-
-FIXTURE_TEST_CASE( ResolveTest_TripleSlash, ResolveFixture )
-{
-    REQUIRE_RESOLVE( "/a/22///333", "/a/22/333" );
-}
-
-FIXTURE_TEST_CASE( ResolveTest_TrailingTripleSlash, ResolveFixture )
-{
-    REQUIRE_RESOLVE( "/a/333///", "/a/333" );
-}
-
-FIXTURE_TEST_CASE( ResolveTest_ShortTrailingTripleSlash, ResolveFixture )
-{
-#ifdef WINDOWS    
-    REQUIRE_RESOLVE( "/a///", "/a/" ); // should not drop the '/' after the drive letter since it is significant
-#else
-    REQUIRE_RESOLVE( "/a///", "/a" ); 
-#endif    
-}
-
-FIXTURE_TEST_CASE( ResolveTest_DotsAgogo, ResolveFixture )
-{
-    REQUIRE_RESOLVE( "/a/././22/./././333/././././/", "/a/22/333" );
-}
-
-FIXTURE_TEST_CASE( ResolveTest_DoubleDotsAgogo, ResolveFixture )
-{
-    REQUIRE_RESOLVE( "/a/22/333/.././../22/333/", "/a/22/333" );
-}
-
-FIXTURE_TEST_CASE( ResolveTest_LeadingDoubleSlash, ResolveFixture )
-{
-#ifdef WINDOWS    
-    REQUIRE_RESOLVE( "//panfs/pan1", "//panfs/pan1" );
-#else
-    REQUIRE_RESOLVE( "//panfs/pan1", "/panfs/pan1" );
-#endif    
-}
-
-FIXTURE_TEST_CASE( ResolveTest_LeadingTripleSlash, ResolveFixture )
-{
-#ifdef WINDOWS    
-    REQUIRE_RESOLVE( "///panfs/pan1", "//panfs/pan1" );
-#else
-    REQUIRE_RESOLVE( "///panfs/pan1", "/panfs/pan1" );
-#endif    
-}
-
-#ifndef WINDOWS    
-FIXTURE_TEST_CASE( ResolveTest_Relative, ResolveFixture )
-{
-    REQUIRE_RC( KDirectoryResolvePath ( m_dir, false, m_resolved, sizeof m_resolved, "/" ) );
-    REQUIRE_EQ( string (m_resolved).substr(0, 9), string ("../../../") );
-}
-#endif
-
-//////////////////////////////////////////// Main
-
-extern "C"
-{
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-
-rc_t CC UsageSummary (const char * prog_name)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args)
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-resolve";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t rc = ResolveSuite( argc, argv );
-    return rc;
-}
-
-}
diff --git a/test/kfs/test.tar b/test/kfs/test.tar
deleted file mode 100644
index e7dc0ca..0000000
Binary files a/test/kfs/test.tar and /dev/null differ
diff --git a/test/kget/.gitignore b/test/kget/.gitignore
new file mode 100644
index 0000000..d64c8f0
--- /dev/null
+++ b/test/kget/.gitignore
@@ -0,0 +1,3 @@
+*.sra
+*.dat
+*.cachetee
\ No newline at end of file
diff --git a/test/kget/Makefile b/test/kget/Makefile
new file mode 100644
index 0000000..dc7427e
--- /dev/null
+++ b/test/kget/Makefile
@@ -0,0 +1,66 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/kget
+
+TEST_TOOLS = \
+
+include $(TOP)/build/Makefile.env
+
+.PHONY: $(TEST_TOOLS)
+
+#-------------------------------------------------------------------------------
+# runtests: 
+#
+runtests: download
+
+download:
+	$(BINDIR)/vdb-config -s /repository/remote/main/CGI/resolver-cgi=http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi
+	export PATH=$(BINDIR):$$PATH; python test_kget.py # expect rc = 0 
+
+#-------------------------------------------------------------------------------
+# slowtests: match output vs wget
+#
+
+slowtests: diff-vs-wget
+
+ACCESSION = SRR072810
+URL = http://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/SRR072/SRR072810/SRR072810.sra
+
+clean:
+	rm -f $(ACCESSION)*
+
+diff-vs-wget: clean
+	$(BINDIR)/kget --reliable -c ./$(ACCESSION).cachetee $(URL) $(ACCESSION).dat --progress
+	wget $(URL)
+	diff $(ACCESSION).sra ./$(ACCESSION).dat
+	#diff $(ACCESSION).sra ./$(ACCESSION).cachetee
+	rm -f $(ACCESSION)*
+
+
+.PHONY: 
diff --git a/test/kget/test_kget.py b/test/kget/test_kget.py
new file mode 100644
index 0000000..63d232a
--- /dev/null
+++ b/test/kget/test_kget.py
@@ -0,0 +1,175 @@
+import os
+import sys
+import subprocess
+import hashlib
+import datetime
+
+'''---------------------------------------------------------------------
+    calls "vdb-dump ACCESSION --info"
+    extracts from the output the line that starts with "remote : ...."
+    returns the remote url or None
+---------------------------------------------------------------------'''
+def get_remote_url( acc ):
+    cmd = "vdb-dump %s --info"%( acc )
+    try:
+        lines = subprocess.check_output( cmd, shell = True ).split( "\n" )
+        for line in lines:
+            try:
+                colon = line.index( ":" )
+                if line[ :colon ].strip() == "remote" :
+                    url = line[ colon+1: ].strip()
+                    if url.startswith( "http:" ) :
+                        return url
+            except:
+                pass
+        for line in lines:
+            try:
+                colon = line.index( ":" )
+                if line[ :colon ].strip() == "path" :
+                    url = line[ colon+1: ].strip()
+                    if url.startswith( "http:" ) :
+                        return url
+            except:
+                pass
+    except:
+        pass
+    return None
+
+'''---------------------------------------------------------------------
+    calls "kget URL --show-size"
+    extracts from the output the line that starts with "file-size : ...."
+    returns the value as int or 0
+---------------------------------------------------------------------'''
+def kget_remote_size( url ): 
+    cmd = "kget %s --show-size"%( url )
+    try:
+        lines = subprocess.check_output( cmd, shell = True ).split( "\n" )
+        for line in lines:
+            try:
+                eq = line.index( "=" )
+                if line[ :eq ].strip() == "file-size" :
+                    return int( line[ eq+1: ].strip() )
+            except:
+                pass
+    except:
+        pass
+    return 0
+
+'''---------------------------------------------------------------------
+    helper functions to create a md5 or sha256 hash from a file
+    ( this way we do not depend on the existence of a md5sum-binary )
+---------------------------------------------------------------------'''
+def hashfile( afile, hasher, blocksize=65536 ) :
+    buf = afile.read( blocksize )
+    while len( buf ) > 0 :
+        hasher.update( buf )
+        buf = afile.read( blocksize )
+    return hasher.hexdigest()
+
+def md5( fname ) :
+    return hashfile( open( fname, 'rb' ), hashlib.md5() )
+
+def sha256( fname ) :
+    return hashfile( open( fname, 'rb' ), hashlib.sha256() )
+
+    
+'''---------------------------------------------------------------------
+    calls "kget URL"
+---------------------------------------------------------------------'''
+def kget_download_partial( url, acc ):
+    try:
+        os.remove( acc )
+    except:
+        pass
+
+    cmd = "kget %s"%( url )
+    try:
+        subprocess.check_output( cmd, shell = True )
+        return md5( acc )
+    except:
+        return None
+
+'''---------------------------------------------------------------------
+    calls "kget URL --full"
+---------------------------------------------------------------------'''
+def kget_download_full( url, acc ):
+    try:
+        os.remove( acc )
+    except:
+        pass
+    cmd = "kget %s --full"%( url )
+    try:
+        subprocess.check_output( cmd, shell = True )
+        return md5( acc )
+    except:
+        return None
+
+
+'''---------------------------------------------------------------------
+    the expected values
+---------------------------------------------------------------------'''
+ACC = "NC_011748.1"
+EXP_SIZE = 1313197
+EXP_MD5 = "2656bc178743c5e32bf0594246300dd6"
+
+
+'''---------------------------------------------------------------------
+    main...
+---------------------------------------------------------------------'''
+print "-" * 80
+print "we test download of accession '%s'"%( ACC )
+
+URL = get_remote_url( ACC )
+if URL == None :
+    print "cannot resolve accession '%s'"%( ACC )
+    sys.exit( -1 )
+
+print "'%s' is resolved into '%s'"%( ACC, URL )
+
+remote_size = kget_remote_size( URL )
+if remote_size != EXP_SIZE :
+    print "size (%d) differs from expected size(%d)"%( remote_size, EXP_SIZE )
+    sys.exit( -1 )
+else :
+    print "size as expected = %d"%( remote_size )
+
+t_start = datetime.datetime.now()
+remote_md5 = kget_download_partial( URL, ACC )
+t_partial = datetime.datetime.now() - t_start;
+if remote_md5 == None :
+    print "error downloading '%s'"%( URL )
+    sys.exit( -1 )
+
+if remote_md5 != EXP_MD5 :
+    print "md5 diff: expected (%s) vs remote (%s)"%( EXP_MD5, remote_md5 )
+    sys.exit( -1 )
+else :
+    print "partial donwload ok in %d ms"%( t_partial.microseconds)
+
+t_start = datetime.datetime.now()
+remote_md5 = kget_download_full( URL, ACC )
+t_full = datetime.datetime.now() - t_start;
+if remote_md5 == None :
+    print "error downloading '%s'"%( URL )
+    sys.exit( -1 )
+
+if remote_md5 != EXP_MD5 :
+    print "md5 diff: expected (%s) vs remote (%s)"%( EXP_MD5, remote_md5 )
+    sys.exit( -1 )
+else :
+    print "full donwload ok in %d ms"%( t_full.microseconds )
+
+'''---------------------------------------------------------------------
+if t_full >= t_partial :
+    print "timing problem: full download should be faster than partial download"
+    sys.exit( -1 )
+else :
+    print "timing ok: full download is faster than partial download"
+---------------------------------------------------------------------'''
+
+try:
+    os.remove( ACC )
+except:
+    pass
+
+print "-" * 80
diff --git a/test/klib/Makefile b/test/klib/Makefile
deleted file mode 100644
index a3be7f1..0000000
--- a/test/klib/Makefile
+++ /dev/null
@@ -1,198 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-
-MODULE = test/klib
-
-# WARNING: test-md5append is excluded from TEST_TOOLS since it's supposed
-# to be run manually
-TEST_TOOLS = \
-	test-asm \
-	test-printf \
-	test-log \
-	test-out \
-	test-SraReleaseVersion \
-	test-klib \
-	test-vnamelist
-    
-include $(TOP)/build/Makefile.env
-
-std: $(TEST_TOOLS)
-
-test-md5append $(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: $(TEST_TOOLS)
-
-clean: stdclean
-
-#-------------------------------------------------------------------------------
-# test-asm
-#
-TEST_ASM_SRC = \
-	asm-test
-
-TEST_ASM_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_ASM_SRC))
-    
-TEST_ASM_LIB = \
-	-skapp \
-	-sncbi-vdb \
-	-sktst \
-
-$(TEST_BINDIR)/test-asm: $(TEST_ASM_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_ASM_LIB)
-    
-#-------------------------------------------------------------------------------
-# test-md5append
-#
-TEST_MD5APPEND_SRC = \
-	md5appendtest
-
-TEST_MD5APPEND_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_MD5APPEND_SRC))
-    
-TEST_MD5APPEND_LIB = \
-	-skapp \
-	-sncbi-vdb \
-	-sktst \
-
-$(TEST_BINDIR)/test-md5append: $(TEST_MD5APPEND_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_MD5APPEND_LIB)
-    
-#-------------------------------------------------------------------------------
-# test-printf
-#
-TEST_PRINTF_SRC = \
-	printf-test
-
-TEST_PRINTF_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_PRINTF_SRC))
-    
-TEST_PRINTF_LIB = \
-	-skapp \
-	-sncbi-vdb \
-	-sktst \
-
-$(TEST_BINDIR)/test-printf: $(TEST_PRINTF_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_PRINTF_LIB)
-    
-#-------------------------------------------------------------------------------
-# test-log
-#
-TEST_LOG_SRC = \
-	test-log
-
-TEST_LOG_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_LOG_SRC))
-    
-TEST_LOG_LIB = \
-	-skapp \
-	-sncbi-vdb \
-	-sktst \
-
-$(TEST_BINDIR)/test-log: $(TEST_LOG_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_LOG_LIB)
-    
-#-------------------------------------------------------------------------------
-# test-SraReleaseVersion
-#
-TEST_SRA_RELEASE_VERSION_SRC = \
-	test-SraReleaseVersion
-
-TEST_SRA_RELEASE_VERSION_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_SRA_RELEASE_VERSION_SRC))
-    
-TEST_SRA_RELEASE_VERSION_LIB = \
-	-skapp \
-	-sncbi-vdb \
-	-sktst \
-
-
-$(TEST_BINDIR)/test-SraReleaseVersion: $(TEST_SRA_RELEASE_VERSION_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_SRA_RELEASE_VERSION_LIB)
-    
-valgrind_sra_release_version:
-	valgrind --ncbi $(TEST_BINDIR)/test-SraReleaseVersion
-    
-.PHONY: valgrind_SraReleaseVersion
-
-
-#-------------------------------------------------------------------------------
-# test-out
-#
-TEST_OUT_SRC = \
-	test-out
-
-TEST_OUT_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_OUT_SRC))
-
-TEST_OUT_LIB = \
-	-sncbi-vdb \
-	-sktst \
-
-$(TEST_BINDIR)/test-out: $(TEST_OUT_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_OUT_LIB)
-    
-#-------------------------------------------------------------------------------
-# test-klib
-#
-TEST_KLIB_SRC = \
-	test-klib
-
-TEST_KLIB_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_KLIB_SRC))
-
-TEST_KLIB_LIB = \
-	-skapp \
-	-sncbi-vdb \
-	-sktst \
-
-$(TEST_BINDIR)/test-klib: $(TEST_KLIB_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_KLIB_LIB)
-    
-
-#-------------------------------------------------------------------------------
-# test-vnamelist
-#
-TEST_VNAMELIST_SRC = \
-	test-vnamelist
-
-TEST_VNAMELIST_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_VNAMELIST_SRC))
-
-TEST_VNAMELIST_LIB = \
-	-skapp \
-	-sncbi-vdb \
-	-sktst \
-
-$(TEST_BINDIR)/test-vnamelist: $(TEST_VNAMELIST_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_VNAMELIST_LIB)
-
-VNAMELIST: test-vnamelist
-	$(TEST_BINDIR)/test-vnamelist
-
diff --git a/test/klib/asm-test.c b/test/klib/asm-test.c
deleted file mode 100644
index 7d47b98..0000000
--- a/test/klib/asm-test.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kapp/main.h>
-#include <kapp/args.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/rc.h>
-
-#include <arch-impl.h>
-
-static
-rc_t run ( uint32_t x, uint32_t expected_result )
-{
-    int32_t lsb = uint32_lsbit(x);
-    if (lsb != expected_result)
-    {
-        KOutMsg ( "uint32_lsbit(%u) failed, expected %u, actual %u\n", x, expected_result, lsb );
-        return -1;
-    }
-    return 0;
-}
-
-
-/* Version  EXTERN
- *  return 4-part version code: 0xMMmmrrrr, where
- *      MM = major release
- *      mm = minor release
- *    rrrr = bug-fix release
- */
-ver_t CC KAppVersion ( void )
-{
-    return 0;
-}
-
-
-/* Usage
- *  This function is called when the command line argument
- *  handling sees -? -h or --help
- */
-rc_t CC UsageSummary ( const char *progname )
-{
-    return KOutMsg (
-        "\n"
-        "Usage:\n"
-        "  %s [Options]\n"
-        "\n"
-        "Summary:\n"
-        "  Simple test of functions potentially impemented using asm.\n"
-        , progname );
-}
-
-const char UsageDefaultName[] = "asm-test";
-
-rc_t CC Usage ( const Args *args )
-{
-    const char * progname = UsageDefaultName;
-    const char * fullpath = UsageDefaultName;
-    rc_t rc;
-
-    if (args == NULL)
-        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
-    else
-        rc = ArgsProgram (args, &fullpath, &progname);
-
-    UsageSummary (progname);
-
-    KOutMsg ("Options:\n");
-
-    HelpOptionsStandard();
-
-    HelpVersion (fullpath, KAppVersion());
-
-    return rc;
-}
-
-    
-/* KMain
- */
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args *args;
-    rc_t rc = ArgsMakeAndHandle ( & args, argc, argv, 0 );
-    if ( rc == 0 )
-    {
-        rc = run (8, 3);
-        ArgsWhack ( args );
-    }
-
-    return rc;
-}
diff --git a/test/klib/md5appendtest.c b/test/klib/md5appendtest.c
deleted file mode 100644
index 68102fe..0000000
--- a/test/klib/md5appendtest.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-
-#include <klib/rc.h>
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/md5.h>
-#include <klib/namelist.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <kapp/main.h>
-#include <kapp/args.h>
-
-#include <assert.h>
-
-#if 0
-void add_to_file (KFile * file, KFile * md5, uint64_t * pos)
-{
-    rc_t	rc;
-    uint64_t	word;
-    size_t	written;
-
-    word = *pos;
-
-    rc = KFileWrite (file, word, &word, sizeof (word), &written);
-
-    assert (rc == 0);
-
-    pos = word + written;
-}
-#endif
-
-rc_t	runtest (KDirectory * kdir,const char *  filename)
-{
-    uint64_t		iteration = 0;
-    size_t		written;
-    KFile *		file;
-    KFile *		md5sumfile;
-    KMD5File *  md5file;
-    KMD5SumFmt *	md5sumfmt;
-    char *		md5filename;
-    rc_t		rc = 0;
-    char		c;
-    char		buff [16];
-
-    OUTMSG (("allocate memory for name %s.md5\n", filename));
-    md5filename = malloc (strlen(filename) + 5);
-    if (md5filename == NULL)
-    {
-        OUTMSG (("failure to allocate for md5 filename\n"));
-        return -1;
-    }
-    strcpy (md5filename, filename);
-    strcat (md5filename, ".md5");
-    OUTMSG (("create md5filename is %s\n",md5filename));
-
-
-    OUTMSG (("create %s\n", filename));
-    rc = KDirectoryCreateFile (kdir, &file, true, 0777, kcmInit, filename);
-    if (rc != 0)
-    {
-        OUTMSG (("failure to open %s\n", filename));
-        return rc;
-    }
-
-    rc = KDirectoryCreateFile (kdir, &md5sumfile, true, 0777, kcmInit, md5filename);
-    if (rc != 0)
-    {
-        OUTMSG (("failure to create %s\n", md5filename));
-        return rc;
-    }
-
-    OUTMSG (("make KMD5SumFmtUpdate\n"));
-    rc = KMD5SumFmtMakeUpdate (&md5sumfmt, md5sumfile);
-    if (rc != 0)
-    {
-        OUTMSG (("unable to make KMD5SumFmtUpdate %d\n", rc));
-        return rc;
-    }
-
-    OUTMSG (("make Md5 for write\n"));
-    rc = KMD5FileMakeAppend ( & md5file, file, md5sumfmt, filename );
-    if (rc != 0)
-    {
-        OUTMSG (("unable to create KFileMakeMd5Append %d\n", rc));
-        return rc;
-    }
-    file = KMD5FileToKFile ( md5file );
-    
-    c = ' ';
-    memset (buff, c, sizeof (buff));
-    OUTMSG (("write to file %lu\n", iteration));
-    rc = KFileWrite (file, iteration * sizeof (buff), &buff, sizeof (buff), &written);
-    if (rc != 0)
-    {
-        OUTMSG (("unable to write first iteration\n"));
-        return rc;
-    }
-
-    OUTMSG (("%c %lu\n", buff[0], written));
-
-    /* close all files */
-    rc = KFileRelease (file);
-    if (rc != 0)
-    {
-        OUTMSG (("unable to close md5file %d\n", rc));
-        return rc;
-    }
-    rc = KMD5SumFmtRelease (md5sumfmt);
-    if (rc != 0)
-    {
-        OUTMSG (("unable to close md5 formatter: %d\n", rc));
-        return rc;
-    }
-    
-#if 1
-    for (iteration = 1; iteration < 1024; ++iteration)
-    {
-        rc = KDirectoryOpenFileWrite (kdir, &file, true, filename);
-        if (rc)
-            PLOGERR (klogFatal, (klogFatal, rc, "Couldn't open %s", filename));
-
-        else
-        {
-            rc = KDirectoryOpenFileWrite (kdir, &md5sumfile, true, md5filename);
-            if (rc)
-                PLOGERR (klogFatal, (klogFatal, rc, "Couldn't open %s", md5filename));
-
-            else
-            {
-                rc = KMD5SumFmtMakeUpdate (&md5sumfmt, md5sumfile);
-                if (rc)
-                    LOGERR (klogFatal, rc, "Couldn't make md5sumfmt");
-
-                else
-                {
-                    rc = KMD5FileMakeAppend (&md5file, file, md5sumfmt, filename);
-                    if (rc)
-                        LOGERR (klogFatal, rc, "unable to make KFileMakeMd5Append");
-
-                    else
-                    {
-                        c = (c == '~') ? ' ' : c+1;
-
-                        memset (buff, c, sizeof (buff));
-                        OUTMSG (("%c\n",buff[0]));
-
-                        file = KMD5FileToKFile ( md5file );
-                        rc = KFileWrite (file, iteration * sizeof (buff), &buff, sizeof (buff), &written);
-                        if (rc)
-                            LOGERR (klogFatal, rc, "failed to write");
-                        assert (written == sizeof (buff));
-                        KFileRelease (KMD5FileToKFile (md5file));
-                    }
-                    KMD5SumFmtRelease (md5sumfmt);
-                }
-            }
-/*             rc = KFileRelease (file); */
-        }
-    }
-#endif
-    return rc;
-}
-
-uint32_t CC KAppVersion ( void )
-{
-    return  0;
-}
-
-const char UsageDefaultName[] = "md5appendtest";
-
-rc_t CC UsageSummary (const char * name)
-{
-    return KOutMsg (
-        "Usage:\n"
-        " %s <file>\n"
-        "\n"
-        "    run a test of the KMD5File in append mode\n"
-        "\n", name);
-}
-
-
-rc_t CC Usage ( const Args * args )
-{
-    const char * progname = UsageDefaultName;
-    const char * fullpath = UsageDefaultName;
-    rc_t rc;
-
-    if (args == NULL)
-        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
-    else
-        rc = ArgsProgram (args, &fullpath, &progname);
-    UsageSummary (progname);
-
-    KOutMsg ("Options:\n");
-
-    HelpOptionsStandard();
- 
-    return rc;
-}
-
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args * args;
-    rc_t rc;
-
-    rc = ArgsMakeAndHandle (&args, argc, argv, 0);
-    if (rc == 0)
-    {
-        uint32_t pcount;
-        const char * filename;
-        KDirectory * kdir;
-
-        do
-        {
-            rc = ArgsParamCount (args, &pcount);
-            if (rc)
-                break;
-            if (pcount != 1)
-            {
-                MiniUsage (args);
-                break;
-            }
-
-            rc = ArgsParamValue (args, 0, (const void **)&filename);
-            if (rc)
-                break;
-
-            /* -----
-             * Mount the native filesystem as root
-             */
-            rc = KDirectoryNativeDir(&kdir);
-            if (rc)
-                break;
-
-            rc = runtest (kdir, filename);
-            KDirectoryRelease (kdir);
-        } while (0);
-    }
-    return rc;
-}
-
-
-
-
diff --git a/test/klib/printf-test.c b/test/klib/printf-test.c
deleted file mode 100644
index 03a0615..0000000
--- a/test/klib/printf-test.c
+++ /dev/null
@@ -1,836 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kapp/main.h>
-#include <kapp/args.h>
-#include <klib/printf.h>
-#include <klib/symbol.h>
-#include <klib/text.h>
-#include <klib/time.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/rc.h>
-#include <kfg/config.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <va_copy.h>
-#include <time.h>
-
-static
-rc_t test_vprintf ( const char *expected, const char *fmt, va_list args )
-{
-    rc_t rc;
-    size_t num_writ;
-    char buff [ 4096 ];
-
-    rc = string_vprintf ( buff, sizeof buff, & num_writ, fmt, args );
-    if ( rc != 0 )
-    {
-        /* report return code */
-        pLogErr ( klogErr, rc, "string_vprintf returned non-zero rc with format '$(fmt)'", "fmt=%s", fmt );
-    }
-    else
-    {
-        size_t buff_size;
-
-        /* verify results. they are:
-           1. string itself
-           2. number of characters in "num_writ"
-        */
-
-        if ( strcmp ( buff, expected ) != 0 )
-        {
-            /* set an appropriate return code */
-            rc = RC ( rcExe, rcString, rcFormatting, rcData, rcIncorrect );
-
-            /* report discrepancy */
-            pLogErr ( klogErr, rc,
-                      "string_vprintf result differs from expected:\n"
-                      "  format   - '$(format)'\n"
-                      "  expected - '$(expected)'\n"
-                      "  observed - '$(observed)'"
-                      , "format=%s,expected=%s,observed=%s"
-                      , fmt
-                      , expected
-                      , buff
-                );
-        }
-
-        buff_size = strlen ( buff );
-        if ( buff_size != num_writ )
-        {
-            /* report discrepancy */
-            pLogMsg ( klogErr,
-                      "string_vprintf size differs from expected:\n"
-                      "  expected - $(expected)\n"
-                      "  observed - $(observed)"
-                      , "expected=%zu,observed=%zu"
-                      , buff_size
-                      , num_writ
-                );
-        }
-#if 1
-        rc = 0;
-#endif
-    }
-
-    return rc;
-}
-
-static
-rc_t test_printf ( const char *expected, const char *fmt, ... )
-{
-    rc_t rc;
-    va_list args;
-    va_start ( args, fmt );
-    rc = test_vprintf ( expected, fmt, args );
-    va_end ( args );
-    return rc;
-}
-
-
-/* NEW TESTING STRATEGY
-
-    6a. size modifier
-        a. NULL ( not given )
-        b. 't' for 8-bit integer
-        c. 'h' for 16 bit integer or 32-bit float
-        d. 'l' for 64-bit integer or long double
-        E. 'z' for size of size_t ( 32 or 64 bit depending upon architecture )
-    6b. time modifier ( do this later )
-
-    So, you'll want functions for each stage. The driving function will invoke
-    the stages with parameters and values.
-*/
-
-static
-rc_t final ( const char *flags, int32_t *field_width, int32_t *precision,
-             char size_modifier, char storage_class, va_list args )
-{
-    rc_t rc;
-    uint32_t i, j, len;
-    va_list arg_copy;
-    char stdcfmt [ 32 ], fmt [ 32 ], expected [ 4096 ];
-
-    /* initialize counters */
-    i = 0;
-
-    /* build format string */
-    fmt [ i ++ ] = '%';
-
-    if ( flags != NULL )
-        i += sprintf ( & fmt [ i ], "%s", flags );
-    if ( field_width != NULL )
-    {
-        if ( field_width [ 0 ] == -1 )
-            fmt [ i ++ ] = '*';
-        else
-            i += sprintf ( & fmt [ i ], "%u", field_width [ 0 ] );
-    }
-    if ( precision != NULL )
-    {
-        fmt [ i ++ ] = '.';
-
-        if ( precision [ 0 ] == -1 )
-            fmt [ i ++ ] = '*';
-        else
-            i += sprintf ( & fmt [ i ], "%u", precision [ 0 ]  );
-    }
-    fmt[i]=0;
-
-    /* duplicate format string */
-    strcpy ( stdcfmt, fmt );
-    j = i;
-
-    /* size modifiers */
-    if ( size_modifier != 0 )
-    {
-        fmt [ i ++ ] = size_modifier;
-
-        switch ( size_modifier )
-        {
-        case 't':
-#if WINDOWS
-            return 0; /* hh does not work as we expect on Windows */
-#endif
-            stdcfmt [ j ++ ] = 'h';
-            stdcfmt [ j ++ ] = 'h';
-            break;
-        case 'z':
-            if ( sizeof ( size_t ) != sizeof ( uint32_t ) )
-                stdcfmt [ j ++ ] = 'l';
-            break;
-        case 'l':
-            if ( sizeof ( long int ) == sizeof ( int32_t ) )
-                stdcfmt [ j ++ ] = size_modifier;
-            /* no break */
-        default:
-            stdcfmt [ j ++ ] = size_modifier;
-        }
-    }
-
-    /* storage class/formatting */
-    fmt [ i ++ ] = storage_class;
-    stdcfmt [ j ++ ] = storage_class;
-
-    /* terminate format strings with NUL */
-    fmt [ i ] = 0;
-    stdcfmt [ j ] = 0;
-
-    /* generate expected string */
-    va_copy ( arg_copy, args );
-    len = vsnprintf ( expected, sizeof expected, stdcfmt, arg_copy );
-    va_end ( arg_copy );
-
-    /* execute test */
-    va_copy ( arg_copy, args );
-    rc = test_vprintf ( expected, fmt, arg_copy );
-    va_end ( arg_copy );
-
-    return rc;
-}
-
-static rc_t thousands_flag ( char *flags, uint32_t num_flags, int32_t *field_width, int32_t *precision,
-                             char size_modifier, char storage_class, va_list args)
-{
-#if 1
-    /* built-in sprintf can't handle this */
-    return final ( flags, field_width, precision, size_modifier, storage_class, args );
-#else
-    rc_t rc;
-
-    /* with nothing */
-    rc = final ( flags, field_width, precision, size_modifier, storage_class, args );
-    if ( rc != 0 )
-        return rc;
-
-    /* with thousands */
-    flags [ num_flags ] = ',';
-    flags [ num_flags + 1 ] = 0;
-    rc = final ( flags, field_width, precision, size_modifier, storage_class, args );
-
-    return rc;
-#endif
-
-}
-static rc_t alternate_flag ( char *flags, uint32_t num_flags, int32_t *field_width, int32_t *precision,
-                             char size_modifier, char storage_class, va_list args)
-{
-    rc_t rc;
-
-
-    /* with nothing */
-    rc = thousands_flag ( flags, num_flags, field_width, precision, size_modifier, storage_class, args );
-    if ( rc != 0 )
-        return rc;
-
-    /* with alternate */
-    flags [ num_flags ] = '#';
-    flags [ num_flags + 1 ] = 0;
-    rc = thousands_flag ( flags, num_flags + 1, field_width, precision, size_modifier, storage_class, args );
-
-    return rc;
-}
-
-static rc_t alignment_flag ( char *flags, uint32_t num_flags, int32_t *field_width, int32_t *precision,
-                             char size_modifier, char storage_class, va_list args)
-{
-    rc_t rc;
-
-    /* with nothing */
-    rc = alternate_flag ( flags, num_flags, field_width, precision, size_modifier, storage_class, args );
-    if ( rc != 0 )
-        return rc;
-
-    /* with left-align */
-    flags [ num_flags ] = '-';
-    flags [ num_flags + 1 ] = 0;
-    rc = alternate_flag ( flags, num_flags + 1, field_width, precision, size_modifier, storage_class, args );
-    if ( rc != 0 )
-        return rc;
-
-    /* with zer-padding left-fill */
-    flags [ num_flags ] = '0';
-    flags [ num_flags + 1 ] = 0;
-    rc = alternate_flag ( flags, num_flags + 1, field_width, precision, size_modifier, storage_class, args );
-    if ( rc != 0 )
-        return rc;
-
-    /* with both left-align and zero-padded left fill */
-    flags [ num_flags ] = '0';
-    flags [ num_flags + 1 ] = '-';
-    flags [ num_flags + 2 ] = 0;
-    rc = alternate_flag ( flags, num_flags + 2, field_width, precision, size_modifier, storage_class, args );
-
-    return rc;
-}
-
-static rc_t sign_flag ( int32_t *field_width, int32_t *precision,
-                        char size_modifier, char storage_class, va_list args)
-{
-    rc_t rc;
-    char flags [ 16 ];
-
-    /* with nothing */
-    flags [ 0 ] = 0;
-    rc = alignment_flag ( flags, 0, field_width, precision, size_modifier, storage_class, args );
-    if ( rc != 0 )
-        return rc;
-
-    /* with space */
-    flags [ 0 ] = ' ';
-    flags [ 1 ] = 0;
-    rc = alignment_flag ( flags, 1, field_width, precision, size_modifier, storage_class, args );
-    if ( rc != 0 )
-        return rc;
-
-    /* with forces + */
-    flags [ 0 ] = '+';
-    flags [ 1 ] = 0; 
-    rc = alignment_flag ( flags, 1, field_width, precision, size_modifier, storage_class, args );
-    if ( rc != 0 )
-        return rc;
-
-    /* with both */
-    flags [ 0 ] = ' ';
-    flags [ 1 ] = '+';
-    flags [ 2 ] = 0;
-    rc = alignment_flag ( flags, 2, field_width, precision, size_modifier, storage_class, args );
-
-    return rc;
-}
-
-/* apply field width */
-static rc_t do_field_width ( int32_t *field_width, int32_t *precision,
-                             char size_modifier, char storage_class, va_list args)
-{
-    rc_t rc;
-    uint32_t i; 
-
-    rc = sign_flag ( NULL, precision, size_modifier, storage_class, args );
-
-    for ( i = 0 ; field_width [ i ] != -2 && rc == 0 ; ++ i )
-        rc = sign_flag ( & field_width [ i ], precision, size_modifier, storage_class, args );
-
-    return rc;
-}
-
-/* apply precision */
-static rc_t do_precision ( int32_t *field_width, int32_t *precision,
-                           char size_modifier, char storage_class, va_list args)
-{
-    rc_t rc;
-    uint32_t i;
-
-    rc = do_field_width ( field_width, NULL, size_modifier, storage_class, args );
-
-    for ( i = 0 ; precision [ i ] != -2 && rc == 0; ++i )
-       rc = do_field_width ( field_width, & precision [ i ], size_modifier, storage_class, args );
-
-    return rc;
-}
-
-
-static rc_t do_size_modifier ( int32_t *field_width, int32_t *precision,
-    const char *size_modifier, char storage_class, va_list args )
-{
-    rc_t rc = 0;
-    uint32_t i;
-
-    for ( i = 0 ; size_modifier [ i ] != 0 && rc == 0; ++ i )
-    {
-        char modifier = size_modifier [ i ];
-        if ( modifier == ' ' )
-            modifier = 0;
-        rc = do_precision ( field_width, precision, modifier, storage_class, args );
-    }
-
-    return rc;
-}
-
-
-static rc_t do_storage_class ( int32_t *field_width, int32_t *precision,
-                               const char *size_modifier, const char *storage_class, va_list args )
-{
-    rc_t rc = 0;
-    uint32_t i;
-
-    for ( i = 0 ; storage_class [ i ] != 0 && rc == 0; ++ i )
-        rc = do_size_modifier ( field_width, precision, size_modifier, storage_class [ i ], args );
-
-    return rc;
-}
-
-
-static rc_t make_initial_test (  int32_t *field_width, int32_t *precision,
-                                 const char *size_modifier, const char *storage_class, ... )
-{
-    rc_t rc;
-
-    va_list args;
-    va_start ( args, storage_class );
-
-    rc = do_storage_class ( field_width, precision, size_modifier, storage_class, args );
- 
-    va_end ( args );
-    return rc;
-}
-
-static
-rc_t run ( const char *progname )
-{
-    rc_t rc = 0;
-    int32_t i;
-
-    int32_t field_width [ ] = { 2, 5, 9, 10, -2 };
-    int32_t precision [ ] = { 1, 3, 8, 12, -2 };
-    char c [ ] = { "aA!@0{;>" };
-
-    int32_t ext_value [ ] = { -1, -2 };
-    int32_t randValue, randValue_2, randValue_3;
-    double randValue_f;
-
-
-    for ( i = 0 ; i < 8 ; ++ i )
-    {
-        /* create random number */
-        srand ( time ( NULL ) );
-        
-        
-        /* signed integer */
-        if ( rc == 0 )
-        {
-            randValue = rand ();
-            randValue_2 = rand () % 10;
-            randValue_3 = rand () % 5;
-            
-            rc = make_initial_test ( field_width, precision, " ht", "di", randValue );
-            if ( rc == 0 )
-                rc = make_initial_test ( ext_value, precision, " ht", "di", randValue_2, randValue );
-            if ( rc == 0 )
-                rc = make_initial_test ( field_width, ext_value, " ht", "di", randValue_3, randValue );
-            
-            if ( rc == 0 )
-                rc = make_initial_test ( field_width, precision, "l", "di", ( int64_t ) randValue );
-            if ( rc == 0 )
-                rc = make_initial_test ( ext_value, precision, "l", "di", randValue_2, ( int64_t ) randValue );
-            if ( rc == 0 )
-                rc = make_initial_test ( field_width, ext_value, "l", "di", randValue_3, ( int64_t ) randValue );
-        }
-        
-        /* unsigned integer */
-        if ( rc == 0 )
-        {
-            rc = make_initial_test ( field_width, precision, " ht", "uxXo", randValue );
-            if ( rc == 0 )
-                rc = make_initial_test ( ext_value, precision, " ht", "uxXo", randValue_2, randValue );
-            if ( rc == 0 )
-                rc = make_initial_test ( field_width, ext_value, " ht", "uxXo", randValue_3, randValue );
-            
-            if ( rc == 0 )
-                rc = make_initial_test ( field_width, precision, "l", "uxXo", ( uint64_t ) randValue );
-            if ( rc == 0 )
-                rc = make_initial_test ( ext_value, precision, "l", "uxXo", randValue_2, ( uint64_t )randValue );
-            if ( rc == 0 )
-                rc = make_initial_test ( field_width, ext_value, "l", "uxXo", randValue_3, ( uint64_t ) randValue );
-            
-            if ( rc == 0 )
-                rc = make_initial_test ( field_width, precision, "z", "uxXo", ( size_t ) randValue );
-            if ( rc == 0 )
-                rc = make_initial_test ( ext_value, precision, "z", "uxXo", randValue_2, ( size_t ) randValue );
-            if ( rc == 0 )
-                rc = make_initial_test ( field_width, ext_value, "z", "uxXo", randValue_3, ( size_t ) randValue );
-        }
-        
-        /* float */
-        if ( rc == 0 )
-        {
-            
-            randValue_f = ( double ) randValue / ( ( randValue % 100 ) + 1 );
-            
-            /*** could use some floating point random numbers here */
-#if 0            
-            rc = make_initial_test ( field_width, precision, " ", "feg", randValue );
-            if ( rc == 0 )
-                rc = make_initial_test ( ext_value, precision, " ", "feg", randValue_2, randValue );
-            if ( rc == 0 )
-                rc = make_initial_test ( field_width, ext_value, " ", "feg", randValue_3, randValue );
-#endif            
-
-            if ( rc == 0 )
-                rc = make_initial_test ( field_width, precision, " ", "feg", randValue_f );
-            if ( rc == 0 )
-                rc = make_initial_test ( ext_value, precision, " ", "feg", randValue_2, randValue_f );
-            if ( rc == 0 )
-                rc = make_initial_test ( field_width, ext_value, " ", "feg", randValue_3, randValue_f );
-        }
-        
-        /* character */
-        if ( rc == 0 )
-        {
-            rc = make_initial_test ( field_width, precision, " ", "c", c [ i ] );
-            if ( rc == 0 )
-                rc = test_printf ( "I like 1 embedded % character", "I like %u embedded %% character", 1 );
-        }
-        
-        /* text string */
-        if ( rc == 0 )
-        {
-            rc = make_initial_test ( field_width, precision, " ", "s", "Kurt is having a fit" );
-#if !defined(__SunOS)  &&  !defined(__sun__)
-            /* Solaris printf doesn't cope with NULLs */
-            rc = make_initial_test ( field_width, precision, " ", "s", NULL );
-#endif            
-            rc = make_initial_test ( field_width, precision, " ", "s", "" );
-            rc = make_initial_test ( field_width, precision, " ", "s", "OK" );
-            rc = make_initial_test ( field_width, precision, " ", "s", "1234567890" );
-            rc = make_initial_test ( field_width, precision, " ", "s", "\"`~!@#$%^&*()-_=+[]{}|\\';:?/.,<>" );
-        }
-        
-    } 
-  
-    /* hand written tests */
-
-    {
-    
-        int8_t t [ ] = { -128, -67, 0, 4, 56, 100, 127 };
-        int16_t h  [ ] = { -32768, -2546, -398, -89, 0, 34, 123, 5736, 32767 };
-        int32_t v [ ] = { -2147483648, -45287957, -100001, 45, 0, 106, 7234, 546963874, 2147483647 };
-
-        /*** naked integer literals have type "int" in C, meaning they
-             can't be more than 32 bits. By adding "L" to the end of the
-             literal numeral, the compiler will read them as "long int",
-             which is in fact 64 bits on this machine. on a 32-bit machine,
-             you need type "long long int".
-
-             you can make use of a pre-processor symbol to do this properly - I'll do it below. 
-             */
-        int64_t l [ ] = { INT64_C(-9223372036854775807) - INT64_C(1), INT64_C(-67283678467328376), INT64_C(-2837640198), INT64_C(0),  INT64_C(187267509872), INT64_C(9223372036854775807) }; 
-
-        /* d, i */
-
-        /* 8 bit */
-        test_printf ( "-000128", "%07:0td", t );
-        test_printf ( "  -67"  , "%5:1td", t );
-        test_printf ( "0"      , "%:2td", t );
-        test_printf ( "4    "  , "%-5:3td", t );
-        test_printf ( " 56"    , "% .1:4td", t );
-        test_printf ( "100 "   , "%-4.2:5td", t );
-        test_printf ( "127  "  , "%-05:6td", t );
-        /* 16 bit */
-        test_printf ( "-32768"    , "%.2:0hd", h );
-        test_printf ( "-2546  "   , "%-07:1hd", h );
-        test_printf ( "-398"      , "% :2hd", h );
-        test_printf ( "-0089"     , "%05:3hd", h );
-        test_printf ( "0000"      , "%04:4hd", h );
-        test_printf ( "+34"       , "%+:5hd", h );
-        test_printf ( "+0123"     , "% +05:6hd", h );
-        test_printf ( "5736 "     , "%-05:7hd", h );
-        test_printf ( "     32767", "%10:8hd", h );
-        /* 32 bit */
-        test_printf ( "-2,147,483,648", "%,:0d", v );
-        test_printf ( "-0045287957"   , "%011:1d", v );
-        test_printf ( "-100001 "      , "%-8:2d", v );
-        test_printf ( "45"            , "%0:3d", v );
-        test_printf ( "0"             , "%,:4d", v );
-        test_printf ( "106"           , "%:5d", v );
-        test_printf ( "0,007,234"     , "%,09:6d", v );
-        test_printf ( "546963874"     , "%.3:7d", v );
-        test_printf ( "2147483647"    , "%10:8d", v );
-        /* 64 bit */
-        test_printf ( "-9223372036854775808"    , "%:0ld", l );
-        test_printf ( "-67,283,678,467,328,376" , "%,:1ld", l );
-        test_printf ( "-2837640198         "    , "%-20:2ld", l );
-        test_printf ( "+0"                      , "%+:3ld", l );
-        test_printf ( "00000000187267509872"    , "%020:4ld", l );
-        test_printf ( "9223372036854775807"     , "%.2:5ld", l );
-
-    } 
-
-
-    {
-        /* uxXo */
-
-       uint8_t u_t [ ] = { 0, 128, 255};
-       uint16_t u_h [ ] = { 0, 128, 5378, 65535};
-       uint32_t u_v [ ] = { 0, 847, 7859, 376859, 86742874, 4294967295 };
-       uint64_t u_l [ ] = { 0, 178, 178364, 1783940987, 17836479208762, UINT64_C(18446744073709551615) };
-
-
-       /* 8 bit */
-       test_printf ( "    0", "%5:0tu", u_t );
-       test_printf ( "80"   , "%:1tx", u_t );
-       test_printf ( "0x80" , "%#:1tx", u_t );
-       test_printf ( "377"  , "%:2to", u_t );
-       test_printf ( "0377" , "%#:2to", u_t );
-       /* 16 bit */
-       test_printf ( "0"        , "%#:0hX", u_h );
-       test_printf ( "00128"    , "%05:1hu", u_h );
-       test_printf ( "0x1502"   , "%-#3:2hx", u_h );
-       test_printf ( "000177777", "%#09:3ho", u_h );
-       /* 32 bit */
-       test_printf ( "00000"          , "%05:0u", u_v );
-       test_printf ( "34f"            , "%:1x", u_v );
-       test_printf ( "0X1EB3"         , "%#6:2X", u_v );
-       test_printf ( "1340033"        , "%:3o", u_v );
-       test_printf ( "86742874       ", "%-#15:4u", u_v );
-       test_printf ( "ffffffff"       , "%0:5x", u_v );
-       /* 64 bit */
-       test_printf ( "0    "               , "%-5:0lX", u_l );
-       test_printf ( "0262 "               , "%#-5:1lo", u_l );
-       test_printf ( "178364"              , "%.4:2lu", u_l );
-       test_printf ( "0x006a54c77b"        , "%#012:3lx", u_l );
-       test_printf ( "1038E101DD3A"        , "%.5:4lX", u_l );
-       test_printf ( "18446744073709551615", "%:5lu", u_l );
-
-    }
-
-
-    {
-        /* float */ 
-
-        float f [ ] = { -2.1474836, -45.287957, -10000.1, 0.45, 0, 1.06 };
-        double lf [ ] = { -9223372036854775808.0, -28.37640198 };
-        
-        /* 32 bit */
-        test_printf ( "  -2.15"             , "%7.2:0hf", f );
-        test_printf ( "-00045.288"          , "%010.3:1hf" , f );
-        test_printf ( "-10000.099609"       , "%:2hf", f );
-        test_printf ( "0"                   , "%.0:3hf", f );
-        test_printf ( "0.000"               , "%-5.3:4hf", f );
-        test_printf ( "1.060000    "        , "%-012:5hf", f );
-        /* 64 bit */
-        test_printf ( "-9223372036854775808.000000" , "%:0f", lf );
-        test_printf ( "-28.37640198000000069101", "%2.20:1f", lf );
-    }
-
-
-
-    /* s */
-    test_printf ( "There are too many tests" , "%:s"    , "There are too many tests" );
-    test_printf ( "a"                        , "%:6s"   , "There are too many tests" );
-
-    test_printf ( "There"                    , "%:/5s"  , "There are too many tests" );
-    test_printf ( "too m"                    , "%:*/5s" , 10, "There are too many tests" );
-    test_printf ( "There"                    , "%:/*s"  , 5,"There are too many tests" );
-    test_printf ( " too many tests"          , "%:9/16s", "There are too many tests" );
-    test_printf ( "s"                        , "%:$/5s" , "There are too many tests" );
-    test_printf ( "tests"                    , "%:19/$s", "There are too many tests" );
-
-    test_printf ( "There"                    , "%:0-4s", "There are too many tests" );
-    test_printf ( "There are too many tests" , "%:-s"  , "There are too many tests" );
-    test_printf ( "too many tests"           , "%:10-s", "There are too many tests" );
-    test_printf ( "There are"                , "%:-8s" , "There are too many tests" );
-
-    test_printf ( "e are too many tests"     , "%:*-s" , 4 , "There are too many tests" );
-    test_printf ( "e are too "               , "%:4-*s", 13, "There are too many tests" );
-    test_printf ( "There are t"              , "%:-*s" , 10, "There are too many tests" );
-    test_printf ( "ere a"                    , "%:*-6s", 2 , "There are too many tests" );
-
-    test_printf ( "s"                        , "%:$s"  , "There are too many tests" );
-    test_printf ( "s"                        , "%:$-s" , "There are too many tests" );
-    test_printf ( "s"                        , "%:$-2s", "There are too many tests" );
-    test_printf ( "There are too many tests" , "%:-$s" , "There are too many tests" );
-    test_printf ( "re are too many tests"    , "%:3-$s", "There are too many tests" );
-
-    /* with field width, precision, and flags */
-    test_printf ( "There are too many tests" , "%5:s"       , "There are too many tests" );
-    test_printf ( "                   a"     , "%20:6s"     , "There are too many tests" );
-    test_printf ( "There     "               , "%-10:/5s"   , "There are too many tests" );
-    test_printf ( "     too m"               , "%*:*/5s"    , 10, 10, "There are too many tests" );
-    test_printf ( "The"                      , "%.3:/*s"    , 5,"There are too many tests" );
-    test_printf ( " too"                     , "%*.4:9/16s" , 2,  "There are too many tests" );
-
-    test_printf ( "There"                          , "%-:0-4s", "There are too many tests" );
-    test_printf ( "There are too many tests      " , "%-30:-s", "There are too many tests" );
-    test_printf ( "too       "                     , "%-10.4:10-s" , "There are too many tests" );
-    test_printf ( "There"                          , "%.*:-8s"  , 5, "There are too many tests" );
-    test_printf ( ""                               , "%s", "" );
-
-    {
-        String S;
-        CONST_STRING ( & S, "My Bonnie lies over the ocean" );
-        test_printf ( "My Bo", "%:0-4S", & S );
-    }
-
-    {
-        String str1, str2, str3;
-        KSymbol *sym1, *sym2, *sym3;
-
-        CONST_STRING ( & str1, "outer" );
-        CONST_STRING ( & str2, "inner" );
-        CONST_STRING ( & str3, "leaf" );
-
-        KSymbolMake ( & sym1, & str1, 0, NULL );
-        KSymbolMake ( & sym2, & str2, 0, NULL );
-        KSymbolMake ( & sym3, & str3, 0, NULL );
-
-        sym2 -> dad = sym1;
-        sym3 -> dad = sym2;
-
-        test_printf ( "outer:inner:leaf", "%N", sym3 );
-        test_printf ( "    outer:inner:leaf", "%20N", sym3 );
-        test_printf ( "outer:inner:leaf    ", "%-20N", sym3 );
-        test_printf ( "outer:inner:leaf    ", "%-20.2N", sym3 );
-
-        KSymbolWhack ( & sym3 -> n, NULL );
-        KSymbolWhack ( & sym2 -> n, NULL );
-        KSymbolWhack ( & sym1 -> n, NULL );
-    }
-
-    test_printf ( "version 1", "version %V", 0x1000000 );
-    test_printf ( "version ", "version %.V", 0x1000000 );
-    test_printf ( "version     1", "version %5V", 0x1000000 );
-    test_printf ( "version 1.2", "version %V", 0x1020000 );
-    test_printf ( "version   1.2", "version %5V", 0x1020000 );
-    test_printf ( "version 1.2.3", "version %V", 0x1020003 );
-    test_printf ( "version 1.2.3", "version %5V", 0x1020003 );
-    test_printf ( "version 1.2.3 ", "version %-6V", 0x1020003 );
-    test_printf ( "version 1.0", "version %.2V", 0x1000000 );
-    test_printf ( "version 1.0.0", "version %.3V", 0x1000000 );
-    test_printf ( "version 1.0.0", "version %.4V", 0x1000000 );
-    test_printf ( "version 1.0", "version %#.2V", 0x1000000 );
-
-    /* RC can't be tested due to embedded filename and lineno */
-#if 0
-    rc = RC ( rcExe, rcString, rcFormatting, rcData, rcNoErr );
-    test_printf ( "?", "%#R", rc );
-#endif
-
-    {
-        KTime t;
-        t . year = 2011;
-        t . month = 9;
-        t . day = 28;
-        t . weekday = 5;
-        t . tzoff = -5 * 60;
-        t . hour = 15;
-        t . minute = 2;
-        t . second = 16;
-        t . dst = true;
-
-        test_printf ( "3:02:16 PM", "%T", & t );
-        test_printf ( "03:02:16 PM", "%0T", & t );
-        test_printf ( "Fri Oct 29 2011 3:02:16 PM", "%lT", & t );
-        test_printf ( "Fri Oct 29 2011 3:02:16 PM -5", "%zT", & t );
-        test_printf ( "Oct 29 2011", "%hT", & t );
-    }
-    { /* insufficient buffer; here we have to bypass test_printf since we need a custom buffer size */
-        char buff[10];
-        size_t num_writ;
-        rc = string_printf ( buff, 1, &num_writ, "%s", "0123456789" );
-	    if ( rc == 0 )
-	    {
-    	    pLogErr ( klogErr, rc, "string_vprintf returned zero rc with insufficient buffer", "");
-            rc = -1;
-	    }
-        else
-        {
-            rc = 0;
-        }        
-    }
-
-#if LINUX
-    test_printf ( "Success", "%!", 0 );
-    test_printf ( "Operation not permitted", "%!", 1 );
-#endif
-
-    return rc;
-    
-}
-
-
-/* Version  EXTERN
- *  return 4-part version code: 0xMMmmrrrr, where
- *      MM = major release
- *      mm = minor release 
- *    rrrr = bug-fix release
- */
-ver_t CC KAppVersion ( void )
-{
-    return 0;
-}
-
-
-/* Usage
- *  This function is called when the command line argument
- *  handling sees -? -h or --help
- */
-rc_t CC UsageSummary ( const char *progname )
-{
-    return KOutMsg (
-        "\n"
-        "Usage:\n"
-        "  %s [Options]\n"
-        "\n"
-        "Summary:\n"
-        "  Simple test of printf.\n"
-        , progname );
-}
-
-const char UsageDefaultName[] = "time-test";
-
-rc_t CC Usage ( const Args *args )
-{
-    const char * progname = UsageDefaultName;
-    const char * fullpath = UsageDefaultName;
-    rc_t rc;
-
-    if (args == NULL)
-        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
-    else
-        rc = ArgsProgram (args, &fullpath, &progname);
-
-    UsageSummary (progname);
-
-    KOutMsg ("Options:\n");
-
-    HelpOptionsStandard();
-
-    HelpVersion (fullpath, KAppVersion());
-
-    return rc;
-}
-
-    
-/* KMain
- */
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args *args;
-    rc_t rc = ArgsMakeAndHandle ( & args, argc, argv, 0 );
-    if ( rc == 0 )
-    {
-        KConfigDisableUserSettings();
-        rc = run ( argv [ 0 ] );
-        ArgsWhack ( args );
-    }
-
-    return rc;
-}
diff --git a/test/klib/test-SraReleaseVersion.cpp b/test/klib/test-SraReleaseVersion.cpp
deleted file mode 100644
index 50615dc..0000000
--- a/test/klib/test-SraReleaseVersion.cpp
+++ /dev/null
@@ -1,316 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for SraReleaseVersion
-*/
-
-#include <ktst/unit_test.hpp>
-#include <ktst/unit_test_suite.hpp> // REQUIRE_RC
-#include <kapp/args.h>
-#include <klib/sra-release-version.h> /* SraReleaseVersion */
-#include <klib/text.h> /* string_size */
-#include <string.h> /* memset */
-using std::string;
-TEST_SUITE(SraReleaseVersionTestSuite);
-
-class Test : private ncbi::NK::TestCase {
-public:
-    Test(TestCase &dad, const string &s, const char *expected = NULL)
-        : TestCase(s)
-    {
-        if (expected == NULL) {
-            expected = s.c_str();
-        }
-        SraReleaseVersion v;
-        REQUIRE_RC(SraReleaseVersionInit(&v, s.c_str(), s.size()));
-        char buffer[256] = "";
-        size_t num_writ = 0;
-        REQUIRE_RC(
-            SraReleaseVersionPrint(&v, buffer, sizeof buffer, &num_writ));
-        CHECK_EQ(num_writ, string_size(expected));
-        CHECK_EQ(memcmp(expected, buffer, num_writ), 0);
-
-        SraReleaseVersion v2;
-        REQUIRE_RC(SraReleaseVersionInit(&v2, buffer, string_size(buffer)));
-
-        int32_t result = 0;
-        REQUIRE_RC(SraReleaseVersionCmp(&v, &v2, &result));
-        CHECK_EQ(result, 0);
-
-        dad.ErrorCounterAdd(GetErrorCounter());
-    }
-};
-
-TEST_CASE(SraReleaseVersionTest) {
-    int32_t result = 0;
-    SraReleaseVersion v;
-    SraReleaseVersion etalon;
-    memset(&etalon, 0, sizeof etalon);
-    etalon.type = SraReleaseVersion::eSraReleaseVersionTypeFinal;
-
-    REQUIRE_RC(SraReleaseVersionInit(&v, NULL, 0));
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    REQUIRE_RC(SraReleaseVersionInit(&v, "", 0));
-    Test      (*this,                    "", "0.0.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    REQUIRE_RC(SraReleaseVersionInit(&v, "0", 1));
-    Test      (*this,                    "0", "0.0.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x1000000;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "1", 1));
-    Test      (*this,                    "1", "1.0.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0xC000000;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "12", 2));
-    Test      (*this,                    "12", "12.0.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x1000000;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "1.", 2));
-    Test      (*this,                    "1.", "1.0.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "0.", 2));
-    Test      (*this,                    "0.", "0.0.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0xD000000;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "13.", 3));
-    Test      (*this,                    "13", "13.0.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x2010000;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "2.1", 3));
-    Test      (*this,                    "2.1", "2.1.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x2000000;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "2.0", 3));
-    Test      (*this,                    "2.0", "2.0.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0xE010000;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "14.1", 4));
-    Test      (*this,                    "14.1", "14.1.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0xE000000;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "14.0", 4));
-    Test      (*this,                    "14.0", "14.0.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0xF0A0000;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "15.10", 5));
-    Test      (*this,                    "15.10", "15.10.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x2000000;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "2.0.", 4));
-    Test      (*this,                    "2.0", "2.0.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x2010000;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "2.1.", 4));
-    Test      (*this,                    "2.1.", "2.1.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0xE010000;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "14.1.", 5));
-    Test      (*this,                    "14.1.", "14.1.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0xF0A0000;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "15.10.", 6));
-    Test      (*this,                    "15.10", "15.10.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x3020001;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "3.2.1", 5));
-    Test      (*this,                    "3.2.1", "3.2.1");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x3020000;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "3.2.0", 5));
-    Test      (*this,                    "3.2.0", "3.2.0");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0xD030002;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "13.3.2", 6));
-    Test      (*this,                    "13.3.2", "13.3.2");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0xC100001;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "12.16.1", 7));
-    Test      (*this,                    "12.16.1", "12.16.1");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x10110012;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "16.17.18", 8));
-    Test      (*this,                    "16.17.18", "16.17.18");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x3020001;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "3.2.1-", 6));
-    Test      (*this,                    "3.2.1-", "3.2.1");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x10110012;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "16.17.18-", 9));
-    Test      (*this,                    "16.17.18-", "16.17.18");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x4030002;
-    etalon.revision = 5;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "4.3.2-5", 7));
-    Test      (*this,                    "4.3.2-5");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x4030002;
-    etalon.revision = 0;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "4.3.2-0", 7));
-    Test      (*this,                    "4.3.2-0", "4.3.2");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x13110012;
-    etalon.revision = 20;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "19.17.18-20", 11));
-    Test      (*this,                    "19.17.18-20");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x4030002;
-    etalon.revision = 0;
-    etalon.type = SraReleaseVersion::eSraReleaseVersionTypeAlpha;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "4.3.2-a", 7));
-    Test      (*this,                    "4.3.2-a");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x13110012;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "19.17.18-a", 10));
-    Test      (*this,                    "19.17.18-a");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x4030002;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "4.3.2-a0", 8));
-    Test      (*this,                    "4.3.2-a0", "4.3.2-a");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x13110012;
-    etalon.revision = 21;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "19.17.18-a21", 12));
-    Test      (*this,                    "19.17.18-a21");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x4030002;
-    etalon.revision = 1;
-    etalon.type = SraReleaseVersion::eSraReleaseVersionTypeBeta;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "4.3.2-b1", 8));
-    Test      (*this,                    "4.3.2-b1");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x4030002;
-    etalon.revision = 0;
-    etalon.type = SraReleaseVersion::eSraReleaseVersionTypeRC;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "4.3.2-rc", 8));
-    Test      (*this,                    "4.3.2-rc");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x13110012;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "19.17.18-rc", 11));
-    Test      (*this,                    "19.17.18-rc");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x4030002;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "4.3.2-rc0", 9));
-    Test      (*this,                    "4.3.2-rc0", "4.3.2-rc");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x4030002;
-    etalon.revision = 1;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "4.3.2-rc1", 9));
-    Test      (*this,                    "4.3.2-rc1");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-
-    etalon.version = 0x13110012;
-    etalon.revision = 21;
-    REQUIRE_RC(SraReleaseVersionInit(&v, "19.17.18-rc21", 13));
-    Test      (*this,                    "19.17.18-rc21");
-    REQUIRE_RC(SraReleaseVersionCmp(&v, &etalon, &result));
-    CHECK_EQ(result, 0);
-}
-
-//////////////////////////////////////////////////// Main
-extern "C" {
-    ver_t CC KAppVersion(void) { return 0; }
-    rc_t CC Usage(const Args *args) { return 0; }
-    const char UsageDefaultName[] = "test-SraReleaseVersion";
-    rc_t CC UsageSummary(const char *progname) { return 0; }
-
-    rc_t CC KMain(int argc, char *argv[]) {
-        return SraReleaseVersionTestSuite(argc, argv);
-    }
-}
diff --git a/test/klib/test-klib.cpp b/test/klib/test-klib.cpp
deleted file mode 100644
index 36094ca..0000000
--- a/test/klib/test-klib.cpp
+++ /dev/null
@@ -1,1027 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for klib interface
-*/
-
-#include <ktst/unit_test.hpp>
-
-#include <klib/sort.h>
-#include <klib/printf.h>
-#include <klib/data-buffer.h>
-#include <klib/log.h>
-#include <klib/num-gen.h>
-#include <klib/text.h>
-#include <klib/misc.h> /* is_user_admin() */
-
-#include <cstdlib>
-#include <cstring>
-#include <stdexcept>
-#include <stdint.h>
-
-using namespace std;
-
-TEST_SUITE(KlibTestSuite);
-
-///////////////////////////////////////////////// text
-
-TEST_CASE ( Klib_text_string_len )
-{
-    // this is ASCII with a character count of 37, byte count of 37
-    const char * str = "Tu estas probando este hoy, no manana";
-    size_t size = strlen ( str );
-    uint32_t length = string_len ( str, size );
-    REQUIRE_EQ ( length, ( uint32_t ) size );
-
-    // this is UTF-8 with a character count of 37, byte count of 41
-    str = "T\303\272 est\303\241s probando \303\251ste hoy, no ma\303\261ana";
-    size = strlen ( str );
-    length = string_len ( str, size );
-    REQUIRE_EQ ( length, ( uint32_t ) ( size - 4 ) );
-}
-
-TEST_CASE ( Klib_text_string_measure )
-{
-    // this is ASCII with a character count of 37, byte count of 37
-    const char * str = "Tu estas probando este hoy, no manana";
-    size_t size = strlen ( str );
-    size_t measure;
-    uint32_t length = string_measure ( str, & measure );
-    REQUIRE_EQ ( measure, size );
-    REQUIRE_EQ ( length, ( uint32_t ) size );
-
-    // this is UTF-8 with a character count of 37, byte count of 41
-    str = "T\303\272 est\303\241s probando \303\251ste hoy, no ma\303\261ana";
-    size = strlen ( str );
-    length = string_measure ( str, & measure );
-    REQUIRE_EQ ( measure, size );
-    REQUIRE_EQ ( length, ( uint32_t ) ( size - 4 ) );
-}
-
-TEST_CASE ( Klib_text_string_copy )
-{
-    char buff64 [ 64 ];
-    const char * str = "Tu estas probando este hoy, no manana";
-    size_t size = strlen ( str );
-    size_t copied = string_copy ( buff64, sizeof buff64, str, size );
-    REQUIRE_EQ ( copied, size );
-    REQUIRE_EQ ( ( char ) 0, buff64 [ copied ] );
-
-    char buff32 [ 32 ];
-    copied = string_copy ( buff32, sizeof buff32, str, size );
-    REQUIRE_EQ ( copied, ( size_t ) ( sizeof buff32 ) );
-
-    // this is UTF-8 with a character count of 37, byte count of 41
-    str = "T\303\272 est\303\241s probando \303\251ste hoy, no ma\303\261ana";
-    size = strlen ( str );
-    copied = string_copy ( buff64, sizeof buff64, str, size );
-    REQUIRE_EQ ( copied, size );
-    REQUIRE_EQ ( ( char ) 0, buff64 [ copied ] );
-
-    // this is the same string with a split UTF-8 character
-    str = "T\303\272 est\303\241s probando \303\251ste hoy, no ma\303";
-    size = strlen ( str );
-    copied = string_copy ( buff64, sizeof buff64, str, size );
-    REQUIRE_EQ ( copied, size - 1 );
-    REQUIRE_EQ ( ( char ) 0, buff64 [ copied ] );
-
-    // test a copy with an embedded NUL
-    const char EN [] = "This is the case of an\000embedded NUL byte";
-    size = sizeof EN - 1;
-    REQUIRE_EQ ( size, ( size_t ) 40 );
-    size = strlen ( EN );
-    REQUIRE_EQ ( size, ( size_t ) 22 );
-    copied = string_copy ( buff64, sizeof buff64, EN, sizeof EN - 1 );
-    REQUIRE_EQ ( copied, size );
-    REQUIRE_EQ ( ( char ) 0, buff64 [ copied ] );
-}
-
-TEST_CASE ( Klib_text_string_copy_measure )
-{
-    char buff64 [ 64 ];
-    const char * str = "Tu estas probando este hoy, no manana";
-    size_t size = strlen ( str );
-    size_t copied = string_copy_measure ( buff64, sizeof buff64, str );
-    REQUIRE_EQ ( copied, size );
-    REQUIRE_EQ ( ( char ) 0, buff64 [ copied ] );
-
-    char buff32 [ 32 ];
-    copied = string_copy_measure ( buff32, sizeof buff32, str );
-    REQUIRE_EQ ( copied, ( size_t ) ( sizeof buff32 ) );
-
-    // this is UTF-8 with a character count of 37, byte count of 41
-    str = "T\303\272 est\303\241s probando \303\251ste hoy, no ma\303\261ana";
-    size = strlen ( str );
-    copied = string_copy_measure ( buff64, sizeof buff64, str );
-    REQUIRE_EQ ( copied, size );
-    REQUIRE_EQ ( ( char ) 0, buff64 [ copied ] );
-
-    // this is the same string with a split UTF-8 character
-    str = "T\303\272 est\303\241s probando \303\251ste hoy, no ma\303";
-    size = strlen ( str );
-    copied = string_copy_measure ( buff64, sizeof buff64, str );
-    REQUIRE_EQ ( copied, size - 1 );
-    REQUIRE_EQ ( ( char ) 0, buff64 [ copied ] );
-
-    // test a copy with an embedded NUL
-    const char EN [] = "This is the case of an\000embedded NUL byte";
-    size = sizeof EN - 1;
-    REQUIRE_EQ ( size, ( size_t ) 40 );
-    size = strlen ( EN );
-    REQUIRE_EQ ( size, ( size_t ) 22 );
-    copied = string_copy_measure ( buff64, sizeof buff64, EN );
-    REQUIRE_EQ ( copied, size );
-    REQUIRE_EQ ( ( char ) 0, buff64 [ copied ] );
-}
-
-TEST_CASE ( Klib_text_tolower_copy )
-{
-    char buff64 [ 64 ];
-    const char * str = "Tu Estas Probando Este Hoy, No Manana";
-    size_t size = strlen ( str );
-    size_t copied = tolower_copy ( buff64, sizeof buff64, str, size );
-    REQUIRE_EQ ( copied, size );
-    REQUIRE_EQ ( ( char ) 0, buff64 [ copied ] );
-    int diff = strcmp ( buff64, "tu estas probando este hoy, no manana" );
-    REQUIRE_EQ ( diff, 0 );
-
-    char buff32 [ 32 ];
-    copied = tolower_copy ( buff32, sizeof buff32, str, size );
-    REQUIRE_EQ ( copied, ( size_t ) ( sizeof buff32 ) );
-    diff = memcmp ( buff64, "tu estas probando este hoy, no manana", copied );
-    REQUIRE_EQ ( diff, 0 );
-
-    // this is UTF-8 with a character count of 37, byte count of 41
-    str = "T\303\272 Est\303\241s Probando \303\211ste Hoy, No Ma\303\261ana";
-    size = strlen ( str );
-    copied = tolower_copy ( buff64, sizeof buff64, str, size );
-    REQUIRE_EQ ( copied, size );
-    REQUIRE_EQ ( ( char ) 0, buff64 [ copied ] );
-#if 0
-    std::cout
-        << buff64
-        << '\n'
-        ;
-    diff = strcmp ( buff64, "t\303\272 est\303\241s probando \303\251ste hoy, no ma\303\261ana" );
-    REQUIRE_EQ ( diff, 0 );
-#endif
-
-    // this is the same string with a split UTF-8 character
-    str = "T\303\272 Est\303\241s Probando \303\211ste Hoy, No Ma\303";
-    size = strlen ( str );
-    copied = tolower_copy ( buff64, sizeof buff64, str, size );
-    REQUIRE_EQ ( copied, size - 1 );
-    REQUIRE_EQ ( ( char ) 0, buff64 [ copied ] );
-#if 0
-    diff = memcmp ( buff64, "t\303\272 est\303\241s probando \303\251ste hoy, no ma\303\261ana", copied );
-    REQUIRE_EQ ( diff, 0 );
-#endif
-
-    // test a copy with an embedded NUL
-    const char EN [] = "This Is The Case of an\000embedded NUL byte";
-    size = sizeof EN - 1;
-    REQUIRE_EQ ( size, ( size_t ) 40 );
-    size = strlen ( EN );
-    REQUIRE_EQ ( size, ( size_t ) 22 );
-    copied = tolower_copy ( buff64, sizeof buff64, EN, sizeof EN - 1 );
-    REQUIRE_EQ ( copied, size );
-    REQUIRE_EQ ( ( char ) 0, buff64 [ copied ] );
-    diff = memcmp ( buff64, "this is the case of an\000embedded nul byte", copied );
-    REQUIRE_EQ ( diff, 0 );
-}
-
-TEST_CASE ( KLib_text_StringToI64 )
-{
-    rc_t rc;
-    String str;
-    int64_t val;
-
-    CONST_STRING ( & str, "12345678" );
-    val = StringToI64 ( & str, & rc );
-    REQUIRE_RC ( rc );
-    REQUIRE_EQ ( val, ( int64_t ) 12345678 );
-
-    CONST_STRING ( & str, "   12345678" );
-    val = StringToI64 ( & str, & rc );
-    REQUIRE_RC ( rc );
-    REQUIRE_EQ ( val, ( int64_t ) 12345678 );
-
-    CONST_STRING ( & str, "   ++12345678" );
-    val = StringToI64 ( & str, & rc );
-    REQUIRE_RC ( rc );
-    REQUIRE_EQ ( val, ( int64_t ) 12345678 );
-
-    CONST_STRING ( & str, "   ++12345678 " );
-    val = StringToI64 ( & str, & rc );
-    REQUIRE_RC_FAIL ( rc );
-    REQUIRE_EQ ( GetRCObject ( rc ), rcTransfer );
-    REQUIRE_EQ ( GetRCState ( rc ), rcIncomplete );
-    REQUIRE_EQ ( val, ( int64_t ) 12345678 );
-
-    CONST_STRING ( & str, "   ++c12345678 " );
-    val = StringToI64 ( & str, & rc );
-    REQUIRE_RC_FAIL ( rc );
-    REQUIRE_EQ ( GetRCObject ( rc ), ( RCObject ) rcData );
-    REQUIRE_EQ ( GetRCState ( rc ), rcInsufficient );
-    REQUIRE_EQ ( val, ( int64_t ) 0 );
-
-    CONST_STRING ( & str, "   -++-12345678" );
-    val = StringToI64 ( & str, & rc );
-    REQUIRE_RC ( rc );
-    REQUIRE_EQ ( val, ( int64_t ) 12345678 );
-
-    CONST_STRING ( & str, "   -++12345678" );
-    val = StringToI64 ( & str, & rc );
-    REQUIRE_RC ( rc );
-    REQUIRE_EQ ( val, ( int64_t ) -12345678 );
-
-    CONST_STRING ( & str, "" );
-    val = StringToI64 ( & str, 0 );
-    REQUIRE_EQ ( val, ( int64_t ) 0 );
-
-    CONST_STRING ( & str, "0" );
-    val = StringToI64 ( & str, 0 );
-    REQUIRE_EQ ( val, ( int64_t ) 0 );
-
-    CONST_STRING ( & str, "1" );
-    val = StringToI64 ( & str, 0 );
-    REQUIRE_EQ ( val, ( int64_t ) 1 );
-
-    CONST_STRING ( & str, "9223372036854775805" );
-    val = StringToI64 ( & str, & rc );
-    REQUIRE_RC ( rc );
-    REQUIRE_EQ ( val, INT64_C ( 9223372036854775805 ) );
-
-    CONST_STRING ( & str, "9223372036854775807" );
-    val = StringToI64 ( & str, & rc );
-    REQUIRE_RC ( rc );
-    REQUIRE_EQ ( val, INT64_C ( 9223372036854775807 ) );
-
-    CONST_STRING ( & str, "9223372036854775808" );
-    val = StringToI64 ( & str, & rc );
-    REQUIRE_RC_FAIL ( rc );
-    REQUIRE_EQ ( GetRCObject ( rc ), rcRange );
-    REQUIRE_EQ ( GetRCState ( rc ), rcExcessive );
-    REQUIRE_EQ ( val, INT64_C ( 9223372036854775807 ) );
-    val = StringToI64 ( & str, 0 );
-    REQUIRE_EQ ( val, INT64_C ( 9223372036854775807 ) );
-
-    CONST_STRING ( & str, "92233720368547758071" );
-    val = StringToI64 ( & str, & rc );
-    REQUIRE_RC_FAIL ( rc );
-    REQUIRE_EQ ( GetRCObject ( rc ), rcRange );
-    REQUIRE_EQ ( GetRCState ( rc ), rcExcessive );
-    REQUIRE_EQ ( val, INT64_C ( 9223372036854775807 ) );
-
-    CONST_STRING ( & str, "-9223372036854775805" );
-    val = StringToI64 ( & str, & rc );
-    REQUIRE_RC ( rc );
-    REQUIRE_EQ ( val, INT64_C ( -9223372036854775805 ) );
-
-    CONST_STRING ( & str, "-9223372036854775807" );
-    val = StringToI64 ( & str, & rc );
-    REQUIRE_RC ( rc );
-    REQUIRE_EQ ( val, INT64_C ( -9223372036854775807 ) );
-
-    // the value -9223372036854775808 causes complaint
-    // because it is first parsed as signed, which overflows
-    // and then is negated after the complaint
-    // use -9223372036854775807 - 1
-    // WHY AREN'T INT64_MIN/MAX WORKING?
-
-    CONST_STRING ( & str, "-9223372036854775808" );
-    val = StringToI64 ( & str, & rc );
-    REQUIRE_RC ( rc );
-    REQUIRE_EQ ( val, INT64_C ( -9223372036854775807 ) - INT64_C ( 1 ) );
-
-    CONST_STRING ( & str, "-9223372036854775809" );
-    val = StringToI64 ( & str, & rc );
-    REQUIRE_RC_FAIL ( rc );
-    REQUIRE_EQ ( GetRCObject ( rc ), rcRange );
-    REQUIRE_EQ ( GetRCState ( rc ), rcExcessive );
-    REQUIRE_EQ ( val, INT64_C ( -9223372036854775807 ) - INT64_C ( 1 ) );
-    val = StringToI64 ( & str, 0 );
-    REQUIRE_EQ ( val, INT64_C ( -9223372036854775807 ) - INT64_C ( 1 ) );
-} 
-
-TEST_CASE ( KLib_text_StringToU64 )
-{
-    rc_t rc;
-    String str;
-    uint64_t val;
-
-    CONST_STRING ( & str, "12345678" );
-    val = StringToU64 ( & str, & rc );
-    REQUIRE_RC ( rc );
-    REQUIRE_EQ ( val, ( uint64_t ) 12345678 );
-
-    CONST_STRING ( & str, "   12345678" );
-    val = StringToU64 ( & str, & rc );
-    REQUIRE_RC ( rc );
-    REQUIRE_EQ ( val, ( uint64_t ) 12345678 );
-
-    CONST_STRING ( & str, "   ++12345678" );
-    val = StringToU64 ( & str, & rc );
-    REQUIRE_RC_FAIL ( rc );
-    REQUIRE_EQ ( GetRCObject ( rc ), ( RCObject ) rcData );
-    REQUIRE_EQ ( GetRCState ( rc ), rcInsufficient );
-    REQUIRE_EQ ( val, ( uint64_t ) 0 );
-
-    CONST_STRING ( & str, "   12345678 " );
-    val = StringToU64 ( & str, & rc );
-    REQUIRE_RC_FAIL ( rc );
-    REQUIRE_EQ ( GetRCObject ( rc ), rcTransfer );
-    REQUIRE_EQ ( GetRCState ( rc ), rcIncomplete );
-    REQUIRE_EQ ( val, ( uint64_t ) 12345678 );
-
-    CONST_STRING ( & str, "" );
-    val = StringToU64 ( & str, 0 );
-    REQUIRE_EQ ( val, ( uint64_t ) 0 );
-
-    CONST_STRING ( & str, "0" );
-    val = StringToU64 ( & str, 0 );
-    REQUIRE_EQ ( val, ( uint64_t ) 0 );
-
-    CONST_STRING ( & str, "1" );
-    val = StringToU64 ( & str, 0 );
-    REQUIRE_EQ ( val, ( uint64_t ) 1 );
-
-    CONST_STRING ( & str, "18446744073709551610" );
-    val = StringToU64 ( & str, & rc );
-    REQUIRE_RC ( rc );
-    REQUIRE_EQ ( val, UINT64_C ( 18446744073709551610 ) );
-
-    CONST_STRING ( & str, "18446744073709551615" );
-    val = StringToU64 ( & str, & rc );
-    REQUIRE_RC ( rc );
-    REQUIRE_EQ ( val, UINT64_C ( 18446744073709551615 ) );
-
-    CONST_STRING ( & str, "18446744073709551616" );
-    val = StringToU64 ( & str, & rc );
-    REQUIRE_RC_FAIL ( rc );
-    REQUIRE_EQ ( GetRCObject ( rc ), rcRange );
-    REQUIRE_EQ ( GetRCState ( rc ), rcExcessive );
-    REQUIRE_EQ ( val, UINT64_C ( 18446744073709551615 ) );
-    val = StringToU64 ( & str, 0 );
-    REQUIRE_EQ ( val, UINT64_C ( 18446744073709551615 ) );
-
-    CONST_STRING ( & str, "184467440737095516151" );
-    val = StringToU64 ( & str, & rc );
-    REQUIRE_RC_FAIL ( rc );
-    REQUIRE_EQ ( GetRCObject ( rc ), rcRange );
-    REQUIRE_EQ ( GetRCState ( rc ), rcExcessive );
-    REQUIRE_EQ ( val, UINT64_C ( 18446744073709551615 ) );
-} 
-
-///////////////////////////////////////////////// ksort 
-
-static char UserData[]="User data";
-
-// this is used by qsort and (indirectly) ksort
-int CC baseCompare( const void* a, const void* b )
-{
-    const char* pa=(const char*)a;
-    const char* pb=(const char*)b;
-    if (*pa < *pb)
-    {
-        return -1;
-    }
-    if (*pa > *pb)
-    {
-        return 1;
-    }
-    return 0;
-}
-// this is used by ksort
-int64_t CC compare( const void* a, const void* b, void *data )
-{
-    // if data is not pointing where we waint it to, do not sort
-    const char* pdata=(const char*)data;
-    if (pdata != 0 && string_cmp(pdata, string_size(pdata), UserData, string_size(UserData), (uint32_t)string_size(UserData)) != 0)
-    {
-        return 0;
-    }
-    return baseCompare(a, b);
-}
-
-TEST_CASE(KLib_ksort_no_elements)
-{
-    char arr[1]={13};
-    ksort(arr, 0, sizeof (char), compare, UserData);
-    // do not crash or change the target
-    REQUIRE_EQ(arr[0], (char)13);
-}
-TEST_CASE(KLib_ksort_one_element)
-{
-    char arr[1]={13};
-    ksort(arr, 1, sizeof (char), compare, UserData);
-    // do not crash or change the target
-    REQUIRE_EQ(arr[0], (char)13);
-}
-
-TEST_CASE(KLib_ksort_simple)
-{
-    const int Size=5;
-    char arr[Size]={2, 4, 1, 0, 3};
-    ksort(arr, Size, sizeof (char), compare, UserData);
-    REQUIRE_EQ(arr[0], (char)0);
-    REQUIRE_EQ(arr[1], (char)1);
-    REQUIRE_EQ(arr[2], (char)2);
-    REQUIRE_EQ(arr[3], (char)3);
-    REQUIRE_EQ(arr[4], (char)4);
-}
-TEST_CASE(KLib_ksort_vs_qsort)
-{
-    const int Size=5;
-    char karr[Size]={2, 4, 1, 0, 3};
-    char qarr[Size];
-    memcpy(qarr, karr, sizeof(karr));
-
-    ksort(karr, Size, sizeof (char), compare, 0); // do not pass any user data
-    qsort(qarr, Size, sizeof (char), baseCompare);
-    REQUIRE_EQ(memcmp(karr, qarr, sizeof(karr)), 0);
-}
-
-// an example of a bad function (compating pointers not values, in reverse order) that causes an implementaion of ksort to crash.
-int64_t CC badCompare( const void* a, const void* b, void *data )
-{
-    const char* pa=(const char*)a;
-    const char* pb=(const char*)b;
-    if (pa < pb)
-    {
-        return 1;
-    }
-    if (pa > pb)
-    {
-        return -1;
-    }
-    return 0;
-}
-TEST_CASE(KLib_ksort_problem)
-{
-    const int Size=5;
-    {
-        char arr[Size]={2, 4, 1, 0, 3};
-        ksort(arr, Size, sizeof (char), badCompare, 0);
-        // we just do not want this to crash since the compare function is not working properly and the eventual sort order is undefined
-    }
-}
-
-///////////////////////////////////////////////// macro based ksort 
-
-TEST_CASE(KSORT_simple)
-{
-    char karr[]={2, 4, 1, 0, 3};
-    const int ElemSize = sizeof(karr[0]);
-    const int Size= sizeof(karr) / ElemSize;
-    char qarr[Size];
-    memcpy(qarr, karr, sizeof(karr));
-
-#define CMP(a, b) (*(char*)(a) < *(char*)(b) ? -1 : *(char*)(a) > *(char*)(b))
-#define SWAP(a, b, offset, size) 
-    KSORT(karr, Size, ElemSize, 0, ElemSize);
-    ksort(qarr, Size, ElemSize, compare, 0);
-    REQUIRE_EQ(memcmp(karr, qarr, sizeof(karr)), 0);    
-#undef CMP
-#undef SWAP 
-}
-
-static
-int64_t CC cmp_int64_t ( const void *a, const void *b, void *data )
-{
-    const int64_t *ap = (const int64_t *)a;
-    const int64_t *bp = (const int64_t *)b;
-
-    if ( * ap < * bp )
-        return -1;
-    return * ap > * bp;
-}
-
-TEST_CASE(KSORT_int64)
-{
-    int64_t karr[]={2, 4, 1};
-    const int ElemSize = sizeof(karr[0]);
-    const int Size= sizeof(karr) / ElemSize;
-    int64_t qarr[Size];
-    memcpy(qarr, karr, sizeof(karr));
-
-    ksort_int64_t (karr, Size);
-    ksort(qarr, Size, ElemSize, cmp_int64_t , 0);
-    REQUIRE_EQ(memcmp(karr, qarr, sizeof(karr)), 0);    
-}
-
-
-///////////////////////////////////////////////// string_printf
-TEST_CASE(KLib_print_uint64)
-{
-    char dst[1024];
-    size_t num_writ;
-    uint64_t val=UINT64_C(1152921504606846976);
-    REQUIRE_RC(string_printf ( dst, sizeof(dst), &num_writ, "%lu", val));
-    REQUIRE_EQ(string( dst, num_writ), string("1152921504606846976"));
-}
-
-#ifndef WINDOWS
-TEST_CASE(KLib_print_problem)
-{
-    char dst[1024];
-    size_t num_writ;
-    double d=1.0;
-    REQUIRE_RC(string_printf ( dst, sizeof(dst), &num_writ, "%.6f", d));
-    REQUIRE_EQ(num_writ, strlen(dst));
-    REQUIRE_EQ(string("1.000000"), string(dst, num_writ));
-}
-#endif
-
-///////////////////////////////////////////////// KDataBuffer
-
-TEST_CASE(KDataBuffer_Make)
-{
-    KDataBuffer src;
-
-    REQUIRE_RC(KDataBufferMake(&src, 13, 9876));
-
-    REQUIRE(src.ignore != 0);
-    REQUIRE(src.base != 0);
-    REQUIRE_EQ((uint64_t)13, src.elem_bits);
-    REQUIRE_EQ((uint64_t)9876, src.elem_count);
-    REQUIRE_EQ((bitsz_t)(13 * 9876), KDataBufferBits(&src));
-    REQUIRE_EQ((uint8_t)src.bit_offset, (uint8_t) 0 ); 
-
-    KDataBufferWhack(&src );
-}
-
-TEST_CASE(KDataBuffer_MakeBytes)
-{
-    KDataBuffer src;
-
-    REQUIRE_RC(KDataBufferMakeBytes(&src, 12));
-
-    REQUIRE_EQ((uint64_t)8, src.elem_bits);
-    REQUIRE_EQ((uint64_t)12, src.elem_count);
-    REQUIRE_EQ((bitsz_t)(12*8), KDataBufferBits(&src));
-    REQUIRE_EQ((size_t)12, KDataBufferBytes(&src));
-    REQUIRE_EQ((uint8_t)src.bit_offset, (uint8_t) 0 ); 
-
-    KDataBufferWhack(&src );
-}
-
-TEST_CASE(KDataBuffer_MakeBits)
-{
-    KDataBuffer src;
-
-    REQUIRE_RC(KDataBufferMakeBits(&src, 8));
-
-    REQUIRE_EQ((uint64_t)1, src.elem_bits);
-    REQUIRE_EQ((uint64_t)8, src.elem_count);
-    REQUIRE_EQ((bitsz_t)(1*8), KDataBufferBits(&src));
-    REQUIRE_EQ((size_t)1, KDataBufferBytes(&src));
-    REQUIRE_EQ((uint8_t)src.bit_offset, (uint8_t) 0 ); 
-
-    KDataBufferWhack(&src );
-}
-
-TEST_CASE(KDataBuffer_MakeBits1)
-{
-    KDataBuffer src;
-    const size_t BIT_SZ = 7896;
-    REQUIRE_RC(KDataBufferMakeBits(&src, BIT_SZ));
-
-    REQUIRE_EQ((uint64_t)1, src.elem_bits);
-    REQUIRE_EQ((uint64_t)BIT_SZ, src.elem_count);
-    REQUIRE_EQ((bitsz_t)(1*BIT_SZ), KDataBufferBits(&src));
-    REQUIRE_EQ((size_t)((1 * BIT_SZ + 7) / 8), KDataBufferBytes(&src));
-    REQUIRE_EQ((uint8_t)src.bit_offset, (uint8_t) 0 ); 
-
-    KDataBufferWhack(&src );
-}
-
-TEST_CASE(KDataBuffer_Sub)
-{
-    KDataBuffer src;
-    KDataBuffer sub;
-
-    const size_t BIT_SZ = 7896;
-    REQUIRE_RC(KDataBufferMakeBits(&src, BIT_SZ));
-
-
-    REQUIRE_RC(KDataBufferSub(&src, &sub, 800, 900 ));
-
-    REQUIRE_EQ(src.elem_bits, sub.elem_bits);
-    REQUIRE_EQ((uint64_t)900, sub.elem_count);
-    REQUIRE_EQ((bitsz_t)(1*900), KDataBufferBits(&sub));
-    REQUIRE_EQ((uint8_t*)sub.base, (uint8_t*) src.base + ( 800 >> 3 ));
-    REQUIRE_EQ((uint64_t)sub.bit_offset, (uint64_t) 0 ); 
-
-    KDataBufferWhack(&src );
-    KDataBufferWhack(&sub );
-}
-
-TEST_CASE(KDataBuffer_Sub1)
-{
-    KDataBuffer src;
-    KDataBuffer sub;
-
-    const size_t BIT_SZ = 7896;
-    REQUIRE_RC(KDataBufferMakeBits(&src, BIT_SZ));
-
-
-    REQUIRE_RC(KDataBufferSub(&src, &sub, 801, 900 ));
-
-    REQUIRE_EQ(src.elem_bits, sub.elem_bits);
-    REQUIRE_EQ((uint64_t)900, sub.elem_count);
-    REQUIRE_EQ((bitsz_t)(1*900), KDataBufferBits(&sub));
-    REQUIRE_EQ((uint8_t*)sub.base, (uint8_t*) src.base + ( 800 >> 3 ));
-    REQUIRE_EQ((uint64_t)sub.bit_offset, (uint64_t)1); 
-
-    KDataBufferWhack(&src );
-    KDataBufferWhack(&sub );
-}
-
-TEST_CASE(KDataBuffer_MakeWritable)
-{
-    KDataBuffer src;
-    KDataBuffer copy;
-
-    REQUIRE_RC(KDataBufferMakeBytes(&src, 12));
-
-    REQUIRE_RC(KDataBufferMakeWritable(&src, &copy));
-
-
-    REQUIRE_EQ(src.elem_bits, copy.elem_bits);
-    REQUIRE_EQ((uint64_t)12, copy.elem_count);
-    REQUIRE_EQ(copy.base, src.base);
-    REQUIRE_EQ((uint64_t)copy.bit_offset, (uint64_t)0); 
-
-    KDataBufferWhack(&src);
-    KDataBufferWhack(&copy);
-}
-
-TEST_CASE(KDataBuffer_MakeWritable1)
-{
-    KDataBuffer src;
-    KDataBuffer sub;
-    KDataBuffer copy;
-
-    REQUIRE_RC(KDataBufferMakeBytes(&src, 256));
-
-    REQUIRE_RC(KDataBufferSub(&src, &sub, 8, 12 ));
-
-    REQUIRE_RC(KDataBufferMakeWritable(&sub, &copy));
-
-    REQUIRE_EQ(src.elem_bits, copy.elem_bits);
-    REQUIRE_EQ((uint64_t)12, sub.elem_count);
-    REQUIRE_EQ((uint64_t)12, copy.elem_count);
-    REQUIRE_NE(sub.base, copy.base);
-    REQUIRE_EQ((uint64_t)copy.bit_offset, (uint64_t)0); 
-
-    KDataBufferWhack(&src );
-    KDataBufferWhack(&sub );
-    KDataBufferWhack(&copy );
-}
-
-TEST_CASE(KDataBuffer_Resize)
-{
-    KDataBuffer src;
-    uint32_t blob_size=4096;
-    REQUIRE_RC(KDataBufferMake(&src, 8, blob_size));
-
-    /* make sub-buffer from input */
-    KDataBuffer dst;
-    uint32_t hdr_size=7;
-    REQUIRE_RC(KDataBufferSub ( &src, &dst, hdr_size, blob_size ));
-    /* cast from 8 into 2 bits */
-    REQUIRE_RC(KDataBufferCast ( &dst, &dst, 2, true ));
-    /* resize to 4 times the original number of elements */
-    REQUIRE_RC(KDataBufferResize ( &dst, (blob_size - hdr_size) * 4 ));
-
-    KDataBufferWhack ( & dst );
-    KDataBufferWhack ( & src );
-}
-
-TEST_CASE(KDataBuffer_Cast_W32Assert)
-{   
-    KDataBuffer src;
-    REQUIRE_RC ( KDataBufferMake ( &src, 64, 1 ) );
-    REQUIRE_RC ( KDataBufferCast ( &src, &src, 64, true ) ); /* used to throw am assert on Win32 */
-    KDataBufferWhack ( & src );
-}
-
-//////////////////////////////////////////// Log
-TEST_CASE(KLog_Formatting)
-{
-    unsigned long status = 161;
-    REQUIRE_RC( pLogErr ( klogInfo, 0, "$(E) - $(C)", "E=%!,C=%u", status, status ) ); // fails on Windows
-}
-
-TEST_CASE(KLog_LevelExplain)
-{
-    char buf[5];
-    size_t num_writ=0;
-    REQUIRE_RC(KLogLevelExplain(klogInfo, buf, sizeof(buf), &num_writ));
-    REQUIRE_EQ(string("info"), string(buf));
-    REQUIRE_EQ(num_writ, strlen(buf));
-}
-TEST_CASE(KLog_LevelExplainNoRoomforNul)
-{
-    char buf[4];
-    size_t num_writ=0;
-    REQUIRE_RC(KLogLevelExplain(klogInfo, buf, sizeof(buf), &num_writ));
-    REQUIRE_EQ(string("info"), string(buf, 4));
-    REQUIRE_EQ(num_writ, (size_t)4);
-}
-TEST_CASE(KLog_LevelExplainInsufficientBuffer)
-{
-    char buf[3];
-    size_t num_writ=0;
-    REQUIRE_RC_FAIL(KLogLevelExplain(klogInfo, buf, sizeof(buf), &num_writ));
-    REQUIRE_EQ(num_writ, (size_t)0);
-}
-
-TEST_CASE(IsUserAnAdminTest) 
-{
-    // TeamCity agents run as admin on some systems but not the others
-#if defined (WINDOWS)
-    if ( getenv ( "TEAMCITY_VERSION" ) != 0 )
-    {
-        REQUIRE ( is_iser_an_admin() );
-    }
-    else
-    {
-        REQUIRE ( !is_iser_an_admin() );
-    }
-#else
-    // Linux or not under TeamCity
-    REQUIRE ( !is_iser_an_admin() );
-#endif
-}
-
-
-
-static const size_t BufSize = 1024;
-// implementation of KWrtWriter for testing purposes
-rc_t CC TestWrtWriter( void * data, const char * buffer, size_t bufsize, size_t * num_writ )
-{
-    size_t nw = string_copy((char*)data, BufSize, buffer, bufsize);
-    if (num_writ != 0)
-        *num_writ = nw;
-    return 0;
-}
-
-TEST_CASE(KLog_DefaultFormatterNull)
-{
-    REQUIRE_RC(KLogFmtWriterGet()(NULL, NULL, 0, NULL, 0, NULL));
-}    
-TEST_CASE(KLog_DefaultFormatterBasic)
-{
-    char buffer[BufSize];
-    KWrtHandler testHandler = {TestWrtWriter, (void*)buffer};
-    wrt_nvp_t args[]={ // ignored
-        {"", ""}
-    };
-    wrt_nvp_t envs[]={ // has to be sorted by key, apparently...
-        {"app", "test"},
-        {"message", "msg"},
-        {"reason", "rc"},
-        {"severity", "bad"},
-        {"timestamp", "time"},
-        {"version", "v1"},
-    };
-    REQUIRE_RC(KLogFmtWriterGet()(NULL, &testHandler, sizeof(args) / sizeof(args[0]), args, sizeof(envs) / sizeof(envs[0]), envs));
-    REQUIRE_EQ(string("time test.v1 bad: rc - msg\n"), string((const char*)testHandler.data));
-}
-
-// implementation of KFmtWriter for testing purposes
-rc_t CC TestFmtWriter ( void* self, KWrtHandler* writer,
-                        size_t argc, const wrt_nvp_t args[],
-                        size_t envc, const wrt_nvp_t envs[] )
-{
-    char buffer[BufSize];
-    size_t num_writ;
-    string_printf(buffer, 
-                  sizeof(buffer), 
-                  & num_writ, 
-                  "%s",
-                  wrt_nvp_find_value(envc, envs, "message"));  
-                  
-    size_t size;
-    return LogFlush(writer, buffer, string_measure(buffer, &size));
-}
-TEST_CASE(KLog_ParamFormatting)
-{
-    char buffer[BufSize];
-    REQUIRE_RC(KLogHandlerSet(TestWrtWriter, buffer));
-    REQUIRE_RC(KLogFmtHandlerSet(TestFmtWriter, 0, buffer));
-    REQUIRE_RC(pLogMsg(klogErr, "message with $(PARAM1) $(P2) etc.", "PARAM1=%s,P2=%s", "parameter1", "param2"));
-    REQUIRE_EQ(string("message with parameter1 param2 etc."), string(buffer));
-}    
-
-//////////////////////////////////////////// num-gen
-#define SHOW_UNIMPLEMENTED 0
-class NumGenFixture
-{
-public:
-    NumGenFixture()
-    : m_ng(0), m_it(0)
-    {
-    }
-    ~NumGenFixture()
-    {
-        if ( m_it && num_gen_iterator_destroy ( m_it ) )
-           throw logic_error ( "NumGenFixture: num_gen_iterator_destroy failed" );
-        
-        if ( m_ng && num_gen_destroy ( m_ng ) != 0 )
-           throw logic_error ( "NumGenFixture: num_gen_destroy failed" );
-    }
-    
-    struct num_gen * m_ng;
-    const struct num_gen_iter * m_it;
-};
-
-FIXTURE_TEST_CASE(num_gen_Make, NumGenFixture)
-{
-    REQUIRE_RC ( num_gen_make ( & m_ng ) );
-    REQUIRE_NOT_NULL ( m_ng );
-}    
-FIXTURE_TEST_CASE(num_gen_MakeFromStr, NumGenFixture)
-{
-    REQUIRE_RC ( num_gen_make_from_str ( & m_ng, "1" ) );
-    REQUIRE_NOT_NULL ( m_ng );
-}    
-
-FIXTURE_TEST_CASE(num_gen_MakeFromEmptyStr, NumGenFixture)
-{
-    REQUIRE_RC_FAIL ( num_gen_make_from_str ( & m_ng, "" ) );
-    REQUIRE_NULL ( m_ng );
-}    
-
-FIXTURE_TEST_CASE(num_gen_MakeFromRange, NumGenFixture)
-{
-    REQUIRE_RC ( num_gen_make_from_range ( & m_ng, 1, 2 ) );
-    REQUIRE_NOT_NULL ( m_ng );
-}    
-FIXTURE_TEST_CASE(num_gen_MakeFromEmptyRange, NumGenFixture)
-{
-    REQUIRE_RC_FAIL( num_gen_make_from_range ( & m_ng, 1, 0 ) );
-    REQUIRE_NULL ( m_ng );
-}    
-
-FIXTURE_TEST_CASE(num_gen_Empty, NumGenFixture)
-{
-    REQUIRE_RC( num_gen_make ( & m_ng ) );
-    REQUIRE ( num_gen_empty ( m_ng ) );
-}    
-
-FIXTURE_TEST_CASE(num_gen_Clear, NumGenFixture)
-{
-    REQUIRE_RC ( num_gen_make_from_range ( & m_ng, 1, 2 ) );
-    REQUIRE ( ! num_gen_empty ( m_ng ) );
-    
-    REQUIRE_RC ( num_gen_clear ( m_ng ) );
-    
-    REQUIRE ( num_gen_empty ( m_ng ) );
-}    
-
-#if SHOW_UNIMPLEMENTED
-FIXTURE_TEST_CASE(num_gen_EmptyRange, NumGenFixture)
-{
-    REQUIRE_RC( num_gen_make_from_range ( & m_ng, 1, 0 ) );
-    REQUIRE_NOT_NULL ( m_ng );
-    REQUIRE ( num_gen_empty ( m_ng ) );
-}    
-#endif
-
-FIXTURE_TEST_CASE(num_gen_IteratorMake, NumGenFixture)
-{
-    REQUIRE_RC ( num_gen_make ( & m_ng ) );
-    REQUIRE_RC ( num_gen_iterator_make( m_ng, &m_it ) );
-}
-
-FIXTURE_TEST_CASE(num_gen_IteratorCount, NumGenFixture)
-{
-    REQUIRE_RC ( num_gen_make_from_range ( & m_ng, 1, 2 ) );
-    REQUIRE_RC ( num_gen_iterator_make( m_ng, &m_it ) );
-    
-    uint64_t count;
-    REQUIRE_RC ( num_gen_iterator_count ( m_it, &count ) );
-    REQUIRE_EQ ( (uint64_t)2, count );
-}
-FIXTURE_TEST_CASE(num_gen_IteratorCountEmpty, NumGenFixture)
-{
-    REQUIRE_RC ( num_gen_make ( & m_ng ) );
-    REQUIRE_RC ( num_gen_iterator_make( m_ng, &m_it ) );
-    
-    uint64_t count;
-    REQUIRE_RC ( num_gen_iterator_count ( m_it, &count ) );
-    REQUIRE_EQ ( (uint64_t)0, count );
-}
- 
-FIXTURE_TEST_CASE(num_gen_IteratorNext, NumGenFixture)
-{
-    REQUIRE_RC ( num_gen_make_from_range ( & m_ng, 1, 2 ) );
-    REQUIRE_RC ( num_gen_iterator_make( m_ng, &m_it ) );
-    
-    int64_t value;
-    rc_t rc = 0;
-    REQUIRE ( num_gen_iterator_next ( m_it, &value, &rc ) );
-    REQUIRE_EQ ( (int64_t)1, value );
-    REQUIRE_RC ( rc );
-    
-    REQUIRE ( num_gen_iterator_next ( m_it, &value, &rc ) );
-    REQUIRE_EQ ( (int64_t)2, value );
-    REQUIRE_RC ( rc );
-    
-    REQUIRE ( ! num_gen_iterator_next ( m_it, &value, &rc ) );
-    REQUIRE_RC ( rc );
-}
- 
-//TODO:
-//rc_t num_gen_parse( struct num_gen * self, const char * src );
-//rc_t num_gen_add( struct num_gen * self, const uint64_t first, const uint64_t count );
-//rc_t num_gen_trim( struct num_gen * self, const int64_t first, const uint64_t count );
-//rc_t num_gen_as_string( const struct num_gen * self, char * buffer, size_t buffsize, size_t * written, bool full_info );
-//rc_t num_gen_contains_value( const struct num_gen * self, const uint64_t value );
-//rc_t num_gen_range_check( struct num_gen * self, const int64_t first, const uint64_t count );
-//rc_t num_gen_iterator_percent( const struct num_gen_iter * self, uint8_t fract_digits, uint32_t * value );
-
-// Error reporting
-#if _DEBUGGING
-TEST_CASE(GetUnreadRCInfo_LogRC)
-{   // bug report: only 1 RC is reported at the end of KMane in _DEBUGGING mode
-
-    // create a couple of RCs
-    RC ( rcApp, rcFile, rcConstructing, rcFile, rcNull );
-    RC ( rcXF, rcFunction, rcExecuting, rcParam, rcInvalid );
-    
-    rc_t rc;
-    uint32_t lineno;
-    const char *filename, *function;
-    REQUIRE ( GetUnreadRCInfo ( & rc, & filename, & function, & lineno ) );
-    // bug: call to pLogErr invokes GetRCFunction (and others alike),
-    // which as a side effect changes "last read RC" to equal "last written RC"
-    // causing the subsequent call to GetUnreadRCInfo to return "no more unread RCs"
-    pLogErr ( klogWarn, rc, "$(filename):$(lineno) within $(function)"
-              , "filename=%s,lineno=%u,function=%s"
-              , filename
-              , lineno
-              , function
-              );
-    REQUIRE ( GetUnreadRCInfo ( & rc, & filename, & function, & lineno ) );
-}
-#endif
-
-//////////////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-klib";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=KlibTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/klib/test-log.cpp b/test/klib/test-log.cpp
deleted file mode 100644
index 397439e..0000000
--- a/test/klib/test-log.cpp
+++ /dev/null
@@ -1,317 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for klib/log interface
-*/
-
-#include <ktst/unit_test.hpp>
-
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-
-using namespace std;
-
-static const size_t BufSize = 1024;
-// implementation of KWrtWriter for testing purposes
-rc_t CC TestWrtWriter( void * data, const char * buffer, size_t bufsize, size_t * num_writ )
-{
-    size_t nw = string_copy((char*)data, BufSize, buffer, bufsize);
-    if (num_writ != 0)
-        *num_writ = nw;
-    return 0;
-}
-
-
-// VDB_1223: logging must perform properly when not initialized from KMane/KMain
-// Start using main(), never call KWrtInit() or KLogInit()
-// call all logging functions, make sure they do not crash
-
-TEST_SUITE(KLogTestSuite);
-
-// Getters working on an implicitly initialized logging
-TEST_CASE(KLog_KLogLevelGet)
-{
-    REQUIRE_EQ((KLogLevel)klogErr, KLogLevelGet());
-}
-
-TEST_CASE(KLog_KLogLevelExplain)
-{
-    char buf[1024];
-    REQUIRE_RC(KLogLevelExplain ( klogErr, buf, sizeof(buf), NULL ));
-    REQUIRE_EQ(string("err"), string(buf));
-}
-
-TEST_CASE(KLog_KLogGetParamStrings)
-{
-    REQUIRE_EQ(string("fatal"), string(KLogGetParamStrings()[0]));
-}
-
-TEST_CASE(KLog_KLogHandlerGet)
-{
-    REQUIRE_NOT_NULL(KLogHandlerGet());
-    REQUIRE_EQ((KWrtWriter)0, KLogHandlerGet()->writer);
-    REQUIRE_NULL(KLogHandlerGet()->data);
-}
-
-TEST_CASE(KLog_KLogLibHandlerGet)
-{
-    REQUIRE_NOT_NULL(KLogLibHandlerGet());
-    REQUIRE_EQ((KWrtWriter)0, KLogLibHandlerGet()->writer);
-    REQUIRE_NULL(KLogLibHandlerGet()->data);
-}
-
-TEST_CASE(KLog_KLogWriterGet)
-{
-    REQUIRE_EQ((KWrtWriter)0, KLogWriterGet());
-}
-
-TEST_CASE(KLog_KLogLibWriterGet)
-{
-    REQUIRE_EQ((KWrtWriter)0, KLogLibWriterGet());
-}
-
-TEST_CASE(KLog_KLogDataGet)
-{
-    REQUIRE_NULL(KLogDataGet());
-}
-
-TEST_CASE(KLog_KLogLibDataGet)
-{
-    REQUIRE_NULL(KLogLibDataGet());
-}
-
-TEST_CASE(KLog_KLogFmtHandlerGet)
-{
-    REQUIRE_NOT_NULL(KLogFmtHandlerGet());
-    REQUIRE_EQ((KFmtWriter)0, KLogFmtHandlerGet()->formatter);
-    REQUIRE_NULL(KLogFmtHandlerGet()->data);
-}
-
-TEST_CASE(KLog_KLogLibFmtHandlerGet)
-{
-    REQUIRE_NOT_NULL(KLogLibFmtHandlerGet());
-    REQUIRE_EQ((KFmtWriter)0, KLogLibFmtHandlerGet()->formatter);
-    REQUIRE_NULL(KLogLibFmtHandlerGet()->data);
-}
-
-TEST_CASE(KLog_KLogLibFmtFlagsGet)
-{
-    KLogFmtFlagsGet();
-}
-
-TEST_CASE(KLog_KLogFmtFlagsGet)
-{
-    KLogLibFmtFlagsGet();
-}
-
-TEST_CASE(KLog_KLogFmtWriterGet)
-{   
-    REQUIRE_NE((KFmtWriter)0, KLogFmtWriterGet());
-}
-
-TEST_CASE(KLog_KLogLibFmtWriterGet)
-{   
-    REQUIRE_NE((KFmtWriter)0, KLogLibFmtWriterGet());
-}
-
-TEST_CASE(KLog_KLogFmtDataGet)
-{   
-    REQUIRE_NULL(KLogFmtDataGet());
-}
-
-TEST_CASE(KLog_KLogLibFmtDataGet)
-{   
-    REQUIRE_NULL(KLogLibFmtDataGet());
-}
-
-// Writers (just make sure they do not crash)
-TEST_CASE(KLog_LogMsg)
-{   
-    REQUIRE_RC(LogMsg(klogFatal, "test"));
-}
-
-TEST_CASE(KLog_LogLibMsg)
-{   
-    REQUIRE_RC(LogLibMsg(klogFatal, "test"));
-}
-
-TEST_CASE(KLog_pLogMsg)
-{   
-    REQUIRE_RC(pLogMsg(klogFatal, "test $(a) $(b)\n", "a=%s,b=%d", "kaboom", 10));
-}
-
-TEST_CASE(KLog_vLogMsg)
-{   
-    va_list l;
-    va_end(l);
-    REQUIRE_RC(vLogMsg(klogFatal, "test $(a) $(b)\n", "a=%s,b=%d", l));
-}
-
-TEST_CASE(KLog_pLogLibMsg)
-{   
-    REQUIRE_RC(pLogLibMsg(klogFatal, "test $(a) $(b)\n", "a=%s,b=%d", "kaboom", 10));
-}
-
-TEST_CASE(KLog_vLogLibMsg)
-{   
-    va_list l;
-    va_end(l);
-    REQUIRE_RC(vLogLibMsg(klogFatal, "test $(a) $(b)\n", "a=%s,b=%d", l));
-}
-
-TEST_CASE(KLog_LogErr)
-{   
-    REQUIRE_RC(LogErr(klogFatal, RC(rcNS,rcFile,rcWriting,rcTimeout,rcExhausted), "bad stuff"));
-}
-
-TEST_CASE(KLog_LogLibErr)
-{   
-    REQUIRE_RC(LogLibErr(klogFatal, RC(rcNS,rcFile,rcWriting,rcTimeout,rcExhausted), "bad stuff"));
-}
-
-TEST_CASE(KLog_pLogErr)
-{   
-    REQUIRE_RC(pLogErr(klogFatal, RC(rcNS,rcFile,rcWriting,rcTimeout,rcExhausted), "bad $(s)", "s=%s", "stuff"));
-}
-
-TEST_CASE(KLog_vLogErr)
-{   
-    va_list l;
-    va_end(l);
-    REQUIRE_RC(vLogErr(klogFatal, RC(rcNS,rcFile,rcWriting,rcTimeout,rcExhausted), "bad $(s)", "s=%s", l));
-}
-
-TEST_CASE(KLog_pLogLibErr)
-{   
-    REQUIRE_RC(pLogLibErr(klogFatal, RC(rcNS,rcFile,rcWriting,rcTimeout,rcExhausted), "bad $(s)", "s=%s", "stuff"));
-}
-
-TEST_CASE(KLog_vLogLibErr)
-{   
-    va_list l;
-    va_end(l);
-    REQUIRE_RC(vLogLibErr(klogFatal, RC(rcNS,rcFile,rcWriting,rcTimeout,rcExhausted), "bad $(s)", "s=%s", l));
-}
-
-// Setters
-TEST_CASE(KLog_KLogLevelSet)
-{
-    REQUIRE_RC(KLogLevelSet(klogInt));
-    REQUIRE_EQ((KLogLevel)klogInt, KLogLevelGet());
-}
-
-TEST_CASE(KLog_KLogLevelAdjust)
-{
-    REQUIRE_RC(KLogLevelSet(klogInt));
-    KLogLevelAdjust(2);
-    REQUIRE_EQ((KLogLevel)klogWarn, KLogLevelGet());
-}
-
-TEST_CASE(KLog_KLogLastErrorCode)
-{   // also KLogLastErrorCode
-    rc_t rc = RC(rcNS,rcFile,rcWriting,rcTimeout,rcExhausted);
-    KLogLastErrorCodeSet(klogErr, rc);
-    REQUIRE_EQ(rc, KLogLastErrorCode());
-}
-
-TEST_CASE(KLog_KLogLastErrorCodeReset)
-{
-    rc_t rc = RC(rcNS,rcFile,rcWriting,rcTimeout,rcExhausted);
-    KLogLastErrorCodeSet(klogErr, rc);
-    KLogLastErrorCodeReset();
-    REQUIRE_EQ((rc_t)0, KLogLastErrorCode());
-}
-
-
-TEST_CASE(KLog_KLogHandlerSet)
-{
-    char buf[BufSize];
-    REQUIRE_RC(KLogHandlerSet(TestWrtWriter, buf));
-    REQUIRE_NOT_NULL(KLogHandlerGet());
-    REQUIRE_EQ((KWrtWriter)TestWrtWriter, KLogHandlerGet()->writer);
-    REQUIRE_EQ((void*)buf, KLogHandlerGet()->data);
-    REQUIRE_RC(KLogHandlerSet(0, 0));
-}
-
-TEST_CASE(KLog_KLogLibHandlerSet)
-{
-    char buf[BufSize];
-    REQUIRE_RC(KLogLibHandlerSet(TestWrtWriter, buf));
-    REQUIRE_NOT_NULL(KLogLibHandlerGet());
-    REQUIRE_EQ((KWrtWriter)TestWrtWriter, KLogLibHandlerGet()->writer);
-    REQUIRE_EQ((void*)buf, KLogLibHandlerGet()->data);
-    REQUIRE_RC(KLogLibHandlerSet(0, 0));
-}
-
-TEST_CASE(KLog_KLogHandlerSetStdOut)
-{
-    REQUIRE_RC(KLogHandlerSetStdOut());
-}
-TEST_CASE(KLog_KLogLibHandlerSetStdOut)
-{
-    REQUIRE_RC(KLogLibHandlerSetStdOut());
-}
-TEST_CASE(KLog_KLogHandlerSetStdErr)
-{
-    REQUIRE_RC(KLogHandlerSetStdErr());
-}
-TEST_CASE(KLog_KLogLibHandlerSetStdErr)
-{
-    REQUIRE_RC(KLogLibHandlerSetStdErr());
-}
-
-TEST_CASE(UninitailizedCrachTest) {
-    REQUIRE_RC_FAIL(LOGMSG
-        (klogErr, "BANG! YOU SHOULD NOT SEE IT: Logger was not initialized"));
-    REQUIRE_RC(KWrtInit("app", 0x01020003));
-    REQUIRE_RC(
-        PLOGMSG(klogWarn, (klogWarn, "Now you see $(a)", "a=%s", "a warning")));
-}
-
-//TODO:
-// KLogFmtFlagsSet    
-// KLogLibFmtFlagsSet 
-// KLogFmtHandlerSet   
-// KLogLibFmtHandlerSet
-// KLogFmtHandlerSetDefault
-// KLogLibFmtHandlerSetDefault
-// KLogInit
-
-//////////////////////////////////////////////////// Main
-extern "C"
-{
-#ifdef WINDOWS
-#define main wmain
-#endif
-int main ( int argc, char *argv [] )
-{
-    rc_t rc=KLogTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/klib/test-out.cpp b/test/klib/test-out.cpp
deleted file mode 100644
index bfc5031..0000000
--- a/test/klib/test-out.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for klib/out interface
-*/
-
-#include <ktst/unit_test.hpp>
-
-#include <klib/out.h>
-#include <klib/rc.h>
-#include <klib/text.h>
-
-#include <cstring>
-
-using namespace std;
-
-// VDB_1223: logging must perform properly when not initialized from KMane/KMain
-// Start using main(), never call KWrtInit() or KLogInit()
-// call all logging functions, make sure they do not crash
-
-TEST_SUITE(KOutTestSuite);
-
-// Getters working on an implicitly initialized logging
-TEST_CASE(Out_KOutHandlerGet)
-{
-    REQUIRE_NOT_NULL(KOutHandlerGet());
-}
-
-TEST_CASE(Out_KOutWriterGet)
-{
-    REQUIRE_EQ((KWrtWriter)0, KOutWriterGet());
-}
-
-TEST_CASE(Out_KOutDataGet)
-{
-    REQUIRE_NULL(KOutDataGet());
-}
-
-// Writers (just make sure they do not crash)
-TEST_CASE(Out_KOutMsg)
-{
-    REQUIRE_RC(KOutMsg("i'm a %s out message", "little"));
-}
-
-// Setters
-// TODO:
-// KOutHandlerSet 
-// KOutHandlerSetStdOut 
-// KOutHandlerSetStdErr 
-
-// VDB-1352: short-circuit certain formats in KMsgOut
-rc_t CC writerFn ( void * self, const char * buffer, size_t bufsize, size_t * num_writ )
-{
-    string& res = *(string*)self;
-    res += string(buffer, bufsize);
-    *num_writ = bufsize;
-    return 0; 
-}
-
-TEST_CASE(KOutMsgShortcut_s)
-{
-    string output;
-    REQUIRE_RC(KOutHandlerSet(writerFn, &output));
-    REQUIRE_RC(KOutMsg("%s", "some%string"));
-    REQUIRE_EQ(output, string("some%string"));
-}
-
-TEST_CASE(KOutMsgShortcut_s_sized)
-{   // when precision is less than the NUL-terminated string size, output according to precision
-    string output;
-    REQUIRE_RC(KOutHandlerSet(writerFn, &output));
-    REQUIRE_RC(KOutMsg("%.*s", 5, "some%string"));
-    REQUIRE_EQ(output, string("some%"));
-}
-TEST_CASE(KOutMsgShortcut_s_sized_extra_size)
-{   // when precision is greater than the NUL-terminated string size, output according to precision
-    string output;
-    REQUIRE_RC(KOutHandlerSet(writerFn, &output));
-    REQUIRE_RC(KOutMsg("%.*s", 15, "some%string\0ext"));
-    REQUIRE_EQ(memcmp("some%string\0ext", output.c_str(), 15), 0);
-}
-
-TEST_CASE(KOutMsgShortcut_S)
-{
-    string output;
-    String s;
-    CONST_STRING( &s, "some%string" );
-    REQUIRE_RC(KOutHandlerSet(writerFn, &output));
-    REQUIRE_RC(KOutMsg("%S", &s));
-    REQUIRE_EQ(output, string("some%string"));
-}
-
-TEST_CASE(KOutMsgShortcut_c_ascii)
-{
-    string output;
-    REQUIRE_RC(KOutHandlerSet(writerFn, &output));
-    char ch = 'h';
-    REQUIRE_RC(KOutMsg("%c", ch));
-    REQUIRE_EQ(output, string(&ch, 1));
-}
-TEST_CASE(KOutMsgShortcut_c_utf8)
-{
-    string output;
-    REQUIRE_RC(KOutHandlerSet(writerFn, &output));
-    uint32_t ch = 163; // pound sign
-    REQUIRE_RC(KOutMsg("%c", ch));
-    REQUIRE_EQ(output[0], '\302');
-    REQUIRE_EQ(output[1], '\243');
-}
-
-TEST_CASE(KOutMsgShortcut_no_shortcut)
-{
-    string output;
-    REQUIRE_RC(KOutHandlerSet(writerFn, &output));
-    REQUIRE_RC(KOutMsg("%s\n", "str"));
-    REQUIRE_EQ(output, string("str\n"));
-}
-
-
-//////////////////////////////////////////////////// Main
-extern "C"
-{
-#ifdef WINDOWS
-#define main wmain
-#endif
-int main ( int argc, char *argv [] )
-{
-    rc_t rc=KOutTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/klib/test-vnamelist.cpp b/test/klib/test-vnamelist.cpp
deleted file mode 100644
index e65bed7..0000000
--- a/test/klib/test-vnamelist.cpp
+++ /dev/null
@@ -1,364 +0,0 @@
-// ===========================================================================
-//
-//                            PUBLIC DOMAIN NOTICE
-//               National Center for Biotechnology Information
-//
-//  This software/database is a "United States Government Work" under the
-//  terms of the United States Copyright Act.  It was written as part of
-//  the author's official duties as a United States Government employee and
-//  thus cannot be copyrighted.  This software/database is freely available
-//  to the public for use. The National Library of Medicine and the U.S.
-//  Government have not placed any restriction on its use or reproduction.
-//
-//  Although all reasonable efforts have been taken to ensure the accuracy
-//  and reliability of the software and data, the NLM and the U.S.
-//  Government do not and cannot warrant the performance or results that
-//  may be obtained by using this software or data. The NLM and the U.S.
-//  Government disclaim all warranties, express or implied, including
-//  warranties of performance, merchantability or fitness for any particular
-//  purpose.
-//
-//  Please cite the author in any work or product based on this material.
-//
-// ===========================================================================
-
-#include <vdb/manager.h> // VDBManager
-#include <vdb/vdb-priv.h>
-
-#include <ktst/unit_test.hpp> // TEST_CASE
-#include <klib/text.h> 
-#include <klib/out.h> 
-#include <klib/namelist.h> 
-
-#include <sysalloc.h>
-#include <cstdlib>
-#include <stdexcept>
-
-using namespace std;
-
-TEST_SUITE( T_VNamelist )
-
-
-TEST_CASE( VNamelist_1 )
-{
-    VNamelist * list;
-    rc_t rc = VNamelistMake ( &list, 10 );
-    if ( rc != 0 )
-        FAIL( "FAIL: VNamelistMake( 10 ) failed" );
-
-    rc = VNamelistRelease ( list );
-    if ( rc != 0 )
-        FAIL( "FAIL: VNamelistRelease() failed" );
-}
-
-struct on_part_ctx
-{
-    const char ** v;
-    int idx;
-};
-
-static rc_t CC on_part( const String * part, void * data )
-{
-    rc_t rc = 0;
-    struct on_part_ctx * ctx = ( struct on_part_ctx * ) data;
-    std::string p = std::string( part->addr, part->size );
-    std::string c = std::string( ctx->v[ ctx->idx ] );
-    if ( p != c ) rc = -1;
-    ctx->idx++;
-    return rc;
-}
-
-
-rc_t test_String( const char * to_test, const char ** v, int count )
-{
-    String s;
-    struct on_part_ctx ctx;
-    ctx.v = v;
-    ctx.idx = 0;
-    
-    StringInitCString( &s, to_test );
-    rc_t rc = foreach_String_part( &s, ':', on_part, &ctx );
-    if ( rc == 0 && ctx.idx != count ) rc = -1;
-    return rc;
-}
-
-
-rc_t test_pchar( const char * to_test, const char ** v, int count )
-{
-    struct on_part_ctx ctx;
-    ctx.v = v;
-    ctx.idx = 0;
-    
-    rc_t rc = foreach_Str_part( to_test, ':', on_part, &ctx );
-    if ( rc == 0 && ctx.idx != count ) rc = -1;
-    return rc;
-}
-
-static const char * s1 = "string:with:colons";
-static const char * t1[] = { "string", "with", "colons" };
-static const int n1 = 3;
-
-static const char * s2 = "just a string";
-static const char * t2[] = { "just a string" };
-static const int n2 = 1;
-
-static const char * s3 = "with::multiple::colons";
-static const char * t3[] = { "with", "", "multiple", "", "colons" };
-static const int n3 = 5;
-
-static const char * s4 = "::leading:colons";
-static const char * t4[] = { "", "", "leading", "colons" };
-static const int n4 = 4;
-
-static const char * s5 = "trailing:colons::";
-static const char * t5[] = { "trailing", "colons", "", "" };
-static const int n5 = 4;
-
-TEST_CASE( StringSplit )
-{
-    std::cout << "testing String-splitting by callback" << std::endl;
-    
-    rc_t rc = test_String( s1, t1, n1 );
-    if ( rc != 0 )
-        FAIL( "FAIL: foreach_String_part( #1 ) failed" );
-    rc = test_pchar( s1, t1, n1 );
-    if ( rc != 0 )
-        FAIL( "FAIL: foreach_Str_part( #1 ) failed" );
-
-    rc = test_String( s2, t2, n2 );
-    if ( rc != 0 )
-        FAIL( "FAIL: foreach_String_part( #2 ) failed" );
-    rc = test_pchar( s2, t2, n2 );
-    if ( rc != 0 )
-        FAIL( "FAIL: foreach_Str_part( #2 ) failed" );
-
-    rc = test_String( s3, t3, n3 );
-    if ( rc != 0 )
-        FAIL( "FAIL: foreach_String_part( #3) failed" );
-    rc = test_pchar( s3, t3, n3 );
-    if ( rc != 0 )
-        FAIL( "FAIL: foreach_Str_part( #3 ) failed" );
-
-    rc = test_String( s4, t4, n4 );
-    if ( rc != 0 )
-        FAIL( "FAIL: foreach_String_part( #4 ) failed" );
-    rc = test_pchar( s4, t4, n4 );
-    if ( rc != 0 )
-        FAIL( "FAIL: foreach_Str_part( #4 ) failed" );
-
-    rc = test_String( s5, t5, n5 );
-    if ( rc != 0 )
-        FAIL( "FAIL: foreach_String_part( #5 ) failed" );
-    rc = test_pchar( s5, t5, n5 );
-    if ( rc != 0 )
-        FAIL( "FAIL: foreach_Str_part( #5 ) failed" );
-}
-
-
-rc_t insert_String( VNamelist * list, const char * to_test )
-{
-    String s;
-    StringInitCString( &s, to_test );
-    return VNamelistSplitString ( list, &s, ':' );
-}
-
-
-rc_t insert_pchar( VNamelist * list, const char * to_test )
-{
-    return VNamelistSplitStr ( list, to_test, ':' );
-}
-
-
-rc_t check_list( const VNamelist * list, const char ** v, uint32_t count )
-{
-    rc_t rc = 0;
-    uint32_t idx;
-    for ( idx = 0; rc == 0 && idx < count; ++idx )
-    {
-        const char * item;
-        rc = VNameListGet ( list, idx, &item );
-        if ( rc == 0 )
-        {
-            std::string s_item = std::string( item );
-            std::string s_cmp  = std::string( v[ idx ] );
-            if ( s_item.compare( s_cmp ) != 0 )
-                rc = -1;
-        }
-        if ( rc == 0 )
-        {
-            uint32_t lc;
-            rc = VNameListCount ( list, &lc );
-            if ( rc == 0 && lc != count )
-                rc = -1;
-        }
-    }
-    return rc;
-}
-
-
-rc_t test_split_string( const char * to_test, const char ** v, uint32_t count )
-{
-    VNamelist * list;
-    rc_t rc = VNamelistMake ( &list, 10 );
-    if ( rc == 0 )
-    {
-        rc = insert_String( list, to_test );
-        if ( rc == 0 )
-            rc = check_list( list, v, count );
-        if ( rc == 0 )
-            rc = VNamelistRemoveAll( list );
-
-        if ( rc == 0 )
-            rc = insert_pchar( list, to_test );
-        if ( rc == 0 )
-            rc = check_list( list, v, count );
-
-        VNamelistRelease ( list );
-    }
-    return rc;
-}
-
-TEST_CASE( SplitIntoVNamelist )
-{
-    std::cout << "testing String-splitting into existing VNamelist " << std::endl;
-    
-    rc_t rc = test_split_string( s1, t1, n1 );
-    if ( rc != 0 )
-        FAIL( "FAIL: test_split_string( #1 )" );
-
-    rc = test_split_string( s2, t2, n2 );
-    if ( rc != 0 )
-        FAIL( "FAIL: test_split_string( #2 )" );
-
-    rc = test_split_string( s3, t3, n3 );
-    if ( rc != 0 )
-        FAIL( "FAIL: test_split_string( #3 )" );
-
-    rc = test_split_string( s4, t4, n4 );
-    if ( rc != 0 )
-        FAIL( "FAIL: test_split_string( #4 )" );
-
-    rc = test_split_string( s5, t5, n5 );
-    if ( rc != 0 )
-        FAIL( "FAIL: test_split_string( #5 )" );
-        
-}
-
-
-rc_t test_make_from_string( const char * to_test, const char ** v, uint32_t count )
-{
-    String s;
-    StringInitCString( &s, to_test );
-
-    VNamelist * list;
-    rc_t rc = VNamelistFromString( &list, &s, ':' );
-    if ( rc == 0 )
-    {
-        rc = check_list( list, v, count );
-        VNamelistRelease ( list );
-    }
-    
-    if ( rc == 0 )
-    {
-        rc = VNamelistFromStr( &list, to_test, ':' );
-        if ( rc == 0 )
-        {
-            rc = check_list( list, v, count );
-            VNamelistRelease ( list );
-        }
-    }
-    return rc;
-}
-
-
-TEST_CASE( MakeVNamelistFromString )
-{
-    std::cout << "testing String-splitting into new VNamelist " << std::endl;
-    
-    rc_t rc = test_make_from_string( s1, t1, n1 );
-    if ( rc != 0 )
-        FAIL( "FAIL: test_make_from_string( #1 )" );
-
-    rc = test_make_from_string( s2, t2, n2 );
-    if ( rc != 0 )
-        FAIL( "FAIL: test_make_from_string( #2 )" );
-
-    rc = test_make_from_string( s3, t3, n3 );
-    if ( rc != 0 )
-        FAIL( "FAIL: test_make_from_string( #3 )" );
-
-    rc = test_make_from_string( s4, t4, n4 );
-    if ( rc != 0 )
-        FAIL( "FAIL: test_make_from_string( #4 )" );
-
-    rc = test_make_from_string( s5, t5, n5 );
-    if ( rc != 0 )
-        FAIL( "FAIL: test_make_from_string( #5 )" );
-}
-
-rc_t split_join_and_check( const char * to_test )
-{
-    VNamelist * list;
-    rc_t rc = VNamelistFromStr( &list, to_test, ':' );
-    if ( rc == 0 )
-    {
-        const String * joined;
-        rc = VNamelistJoin( list, ':', &joined );
-        if ( rc != 0 )
-            FAIL( "FAIL: VNamelistJoin()" );
-        else
-        {
-            String S2;
-            StringInitCString( &S2, to_test );
-            if ( !StringEqual( joined, &S2 ) )
-                rc = -1;
-            StringWhack ( joined );
-        }
-        VNamelistRelease ( list );
-    }
-    return rc;
-}
-
-TEST_CASE( VNamelistJoining )
-{
-    std::cout << "testing joining VNamelist into one String" << std::endl;
-
-    rc_t rc = split_join_and_check( s1 );
-    if ( rc != 0 )
-        FAIL( "FAIL: split_join_and_check( #1 )" );
-
-    rc = split_join_and_check( s2 );
-    if ( rc != 0 )
-        FAIL( "FAIL: split_join_and_check( #2 )" );
-
-    rc = split_join_and_check( s3 );
-    if ( rc != 0 )
-        FAIL( "FAIL: split_join_and_check( #3 )" );
-
-    rc = split_join_and_check( s4 );
-    if ( rc != 0 )
-        FAIL( "FAIL: split_join_and_check( #4 )" );
-
-    rc = split_join_and_check( s5 );
-    if ( rc != 0 )
-        FAIL( "FAIL: split_join_and_check( #5 )" );
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void ) { return 0x1000000; }
-rc_t CC UsageSummary ( const char * progname ) { return 0; }
-rc_t CC Usage ( const Args * args ) { return 0; }
-const char UsageDefaultName[] = "test-VDB-3060";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t rc = T_VNamelist( argc, argv );
-    return rc;
-}
-
-}
diff --git a/test/kns/KNSManagerSingletonTest.cpp b/test/kns/KNSManagerSingletonTest.cpp
deleted file mode 100644
index 01dde09..0000000
--- a/test/kns/KNSManagerSingletonTest.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kns/manager.h> // KNSManagerRelease
-#include <ktst/unit_test.hpp> // TEST_SUITE
-#include <vfs/manager.h> // VFSManagerMake
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 != 0 && rc == 0) { rc = rc2; } obj = NULL; } while (false)
-
-TEST_SUITE(KNSManagerSingletonTestSuite);
-
-TEST_CASE(VDB_2877) {
-    rc_t rc = 0;
-
-    KNSManager *mgr = NULL;
-    KNSManager *mgr2 = NULL;
-
-    REQUIRE_EQ(mgr, mgr2); 
-
-    REQUIRE_RC(KNSManagerMake(&mgr)); 
-    REQUIRE(mgr); 
-    REQUIRE_NE(mgr, mgr2); 
-
-    VFSManager *vmgr = NULL;
-    REQUIRE_RC(VFSManagerMake(&vmgr));
-    REQUIRE(vmgr); 
-
-    REQUIRE_RC(VFSManagerGetKNSMgr(vmgr, &mgr2));
-    REQUIRE_EQ(mgr, mgr2); 
-
-    RELEASE(KNSManager, mgr2);
-
-    RELEASE(VFSManager, vmgr);
-
-    RELEASE(KNSManager, mgr);
-    REQUIRE_EQ(mgr, mgr2); 
-
-    REQUIRE(!rc);
-}
-
-extern "C" {
-    ver_t CC KAppVersion ( void ) { return 0; }
-    rc_t CC KMain ( int argc, char *argv [] )
-    {    return KNSManagerSingletonTestSuite(argc, argv); }
-}
diff --git a/test/kns/Makefile b/test/kns/Makefile
deleted file mode 100644
index 4a4f574..0000000
--- a/test/kns/Makefile
+++ /dev/null
@@ -1,122 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-MODULE = test/kns
-
-TEST_TOOLS = \
-	KNSManagerSingletonTest \
-	test-kns \
-	test-http \
-	test-http-dropconn \
-
-include $(TOP)/build/Makefile.env
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-clean: stdclean
-
-INCDIRS += -I$(TOP)/libs/kns
-
-#-------------------------------------------------------------------------------
-# white-box test. TODO: combine with the old test/kns/http-test.c, roll into the C++ test-http
-#
-#
-#TEST_SRC = \
-#	wb-http-test
-#
-#TEST_OBJ = \
-#	$(addsuffix .$(OBJX),$(TEST_SRC))
-#
-#TEST_LIB = \
-#	-skapp-norsrc \
-#	-sncbi-vdb \
-#
-#$(TEST_BINDIR)/test-http: $(TEST_OBJ)
-#	$(LD) --exe -o $@ $^ $(TEST_LIB)
-
-KNSTEST_LIB = \
-	-skapp \
-    -sncbi-vdb \
-    -sktst \
-
-#----------------------------------------------------------------
-# KNSManagerSingletonTest
-#
-SINGLETON_SRC = \
-	KNSManagerSingletonTest
-SINGLETON_OBJ = \
-	$(addsuffix .$(OBJX),$(SINGLETON_SRC))
-$(TEST_BINDIR)/KNSManagerSingletonTest: $(SINGLETON_OBJ)
-	$(LP) --exe -o $@ $^ $(KNSTEST_LIB)
-
-#----------------------------------------------------------------
-# test-kns
-#
-KNSTEST_SRC = \
-	knstest
-
-KNSTEST_OBJ = \
-	$(addsuffix .$(OBJX),$(KNSTEST_SRC))
-
-$(TEST_BINDIR)/test-kns: $(KNSTEST_OBJ)
-	$(LP) --exe -o $@ $^ $(KNSTEST_LIB)
-
-kns: test-kns 
-	$(TEST_BINDIR)/test-kns  #-l=all
-    
-#----------------------------------------------------------------
-# test-http
-#
-HTTPTEST_SRC = \
-	httptest
-
-HTTPTEST_OBJ = \
-	$(addsuffix .$(OBJX),$(HTTPTEST_SRC))
-
-$(TEST_BINDIR)/test-http: $(HTTPTEST_OBJ)
-	$(LP) --exe -o $@ $^ $(KNSTEST_LIB)
-
-http: test-http  
-	$(TEST_BINDIR)/test-http  # -l=all
-    
-#----------------------------------------------------------------
-# test-http-dropconn
-#
-HTTP_DROPCONN_TEST_SRC = \
-	http_dropconnection_test
-
-HTTP_DROPCONN_TEST_OBJ = \
-	$(addsuffix .$(OBJX),$(HTTP_DROPCONN_TEST_SRC))
-
-$(TEST_BINDIR)/test-http-dropconn: $(HTTP_DROPCONN_TEST_OBJ)
-	$(LP) --exe -o $@ $^ $(KNSTEST_LIB)
-
-dropconn: test-http-dropconn  
-	$(TEST_BINDIR)/test-http-dropconn  # -l=all
-    
diff --git a/test/kns/http-test.c b/test/kns/http-test.c
deleted file mode 100644
index 984f971..0000000
--- a/test/kns/http-test.c
+++ /dev/null
@@ -1,368 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kapp/args.h>
-#include <kapp/main.h>
-
-#include <kns/manager.h>
-#include <kns/endpoint.h>
-#include <kns/socket.h>
-#include <kns/stream.h>
-#include <kns/http.h>
-#include <kns/impl.h>
-#include <kns/adapt.h>
-#include <kfg/config.h>
-#include <kfs/file.h>
-#include <kfs/directory.h>
-#include <klib/text.h>
-#include <klib/out.h>
-#include <klib/rc.h>
-#include <klib/refcount.h>
-#include <klib/container.h>
-
-#include "stream-priv.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <sysalloc.h>
-
-#include "http-priv.h"
-
-
-void URLBlockInitTest ( void )
-{
-    URLBlock b;
-    URLBlockInit ( & b );
-    
-    OUTMSG ( ( "%s - URLBlockInit succeeded.\n"
-               "scheme  : '%S'\n"
-               "host    : '%S'\n"
-               "path    : '%S'\n"
-               "query   : '%S'\n"
-               "fragment: '%S'\n"
-               "port    : '%u'\n\n"
-               , __func__,  & b . scheme, & b . host
-               , & b . path, & b . query, & b . fragment, b . port ) );
-    
-}
-
-
-rc_t ParseUrlTest ( void )
-{
-    rc_t rc;
-    size_t i;
-    
-    static const char *test_urls [] =
-        {
-            /* <scheme>://<host>[:<port>]/<path>[?<query>][#<fragment>]*/
-            /*0*/ "http://www.abc.com/library/index.html?x&y=123&z=test#ignore-me",
-            /*1*/ "http://www.abc.com:123/library/index.html?x&y=123&z=test#ignore-me",
-            /*2*/ "HTTP://www.abc.com:123/library/index.html?x&y=123&z=test#ignore-me",
-            /* <scheme>://<host>[:<port>]/<path>[#<fragment>]*/
-            /*3*/ "http://www.abc.com/library/index.html#ignore-me",
-            /*4*/ "http://www.abc.com:123/library/index.html#ignore-me",
-            /* <scheme>://<host>[:<port>]/<path>[?<query>]*/
-            /*5*/ "http://www.abc.com/library/index.html?x&y=123&z=test",
-            /*6*/ "http://www.abc.com:123/library/index.html?x&y=123&z=test",
-            /* <scheme>://<host>[:<port>]/<path>*/
-            /*7*/ "http://www.abc.com/library/index.html",
-            /*8*/ "http://www.abc.com:80/library/index.html",
-            /* <scheme>://<host>[:<port>]*/
-            /*9*/ "http://www.abc.com",
-            /*10*/ "http://www.abc.com:80",
-            /* /<path>[#fragment]*/
-            /*11*/ "/library/index.html#ignore-me",
-            /* /<path>[?query]*/
-            /*12*/ "/library/index.html?x&y=123&z=test",
-            /*13*/ "///library"
-            
-            
-        };
-    const size_t num_urls = sizeof test_urls / sizeof test_urls [ 0 ];
-    
-    static const char *fail_url [] = 
-        {
-            /*<scheme>:/<path>*/
-            /*0*/ "http:/library/index.html",
-            /*1*/ "http//library/index.html",
-            /*<scheme>:/[#fragment]*/
-            /*2*/ "http:#ignore-me",
-            /*<scheme>:/[#query]*/
-            /*3*/ "http:?x&y=123&z=test",
-            /*<scheme>*/
-            /*4*/ "http",
-            /*5*/ "ftp",
-            /* <host>[:<port>]*/
-            /*6*/ "www.abc.com",
-            /*7*/ "www.abc.com:80",
-            /* <scheme>://<host>[:<port>]*/
-            /*8*/ "ftp://www.abc.com"
-            
-            
-        };
-    const size_t num_fail_urls = sizeof fail_url / sizeof fail_url [ 0 ];
-    
-    for ( i = 0; i < num_urls; ++ i )
-    {
-        URLBlock b;
-        
-        String url;
-        StringInitCString ( & url, test_urls [ i ] );
-        
-        rc  = ParseUrl ( & b, url . addr, url . size );
-        if ( rc == 0 )
-        {
-            /* same as above */
-            OUTMSG ( ( "%s - ParseUrl succeeded -- %d: %s\n"
-                       "scheme  : '%S'\n"
-                       "host    : '%S'\n"
-                       "path    : '%S'\n"
-                       "query   : '%S'\n"
-                       "fragment: '%S'\n"
-                       "port    : '%u'\n\n"
-                       , __func__, i, test_urls [ i ], & b . scheme, & b . host
-                       , & b . path, & b . query, & b . fragment, b . port ) );
-        }
-        else
-        {
-            /* same as above. analyze your code more */
-            OUTMSG (( "%s: ParseUrl failed on iteration: '%d' url: %s\n"
-                      "with rc=%R\n\n", __func__, i, test_urls [ i ], rc ));
-            return rc;
-        }
-    }
-    
-    
-    for ( i = 0; i < num_fail_urls; ++ i )
-    {
-        URLBlock b;
-        
-        String url;
-        StringInitCString ( & url, fail_url [ i ] );
-        
-        rc  = ParseUrl ( & b, url . addr, url . size );
-        if ( rc != 0 )
-        {
-            /* same as above */
-            OUTMSG ( ( "%s - ParseUrl succeeded in catching error-- %d: %s\n"
-                       "scheme  : '%S'\n"
-                       "host    : '%S'\n"
-                       "path    : '%S'\n"
-                       "query   : '%S'\n"
-                       "fragment: '%S'\n"
-                       "port    : '%u'\n\n"
-                       , __func__, i, fail_url [ i ], & b . scheme, & b . host
-                       , & b . path, & b . query, & b . fragment, b . port ) );
-        }
-        else
-        {
-            /* same as above. analyze your code more */
-            OUTMSG (( "%s: ParseUrl failed catching error on iteration: '%d' url: %s\n"
-                      "with rc=%R\n\n", __func__, i, fail_url [ i ], rc ));
-            return rc;
-        }
-    }
-    
-    return rc = 0;
-}
-
-rc_t HttpTest ( const KFile *input )
-{
-
-    KNSManager *mgr;
-
-    rc_t rc = KNSManagerMake ( & mgr );
-    if ( rc == 0 )
-    {
-        KStream *sock;
-        rc = KStreamFromKFilePair ( & sock, input, NULL );
-        if ( rc == 0 )
-        {
-            struct KClientHttp *http;
-
-            String host;
-            CONST_STRING ( & host, "www.ncbi.nlm.nih.gov" );
-
-            rc = KNSManagerMakeHttp ( mgr, & http, sock, 0x01010000, & host, 80 );
-            if ( rc == 0 )
-            {
-                String msg;
-                ver_t version;
-                uint32_t status;
-
-                rc = KHttpGetStatusLine ( http, NULL, &msg, &status, &version );
-                if ( rc != 0 )
-                    OUTMSG (( "%s: KHttpGetStatusLine failed with rc=%R\n", __func__, rc ));
-                else
-                {
-                    bool blank, close_connection;
-                    BSTree hdrs;
-                    OUTMSG (( "%s: KHttpGetStatusLine returned msg='%S', status=%u, version=%V\n",
-                              __func__, & msg, status, version ));
-
-                    BSTreeInit ( & hdrs );
-
-                    for ( blank = close_connection = false; ! blank && rc == 0; )
-                        rc = KHttpGetHeaderLine ( http, NULL, & hdrs, & blank, & close_connection );
-                    
-                    if ( rc != 0 )
-                        OUTMSG (( "%s: KHttpGetHeaderLine failed with rc=%R\n", __func__, rc ));
-                    else
-                    {
-                        const KHttpHeader * hdr;
-                        
-                        OUTMSG (( "%s: KHttpGetStatusLine listing:\n", __func__ ));
-                        for ( hdr = ( const KHttpHeader * ) BSTreeFirst ( & hdrs ); 
-                              hdr != NULL;
-                              hdr = ( const KHttpHeader * ) BSTNodeNext ( & hdr -> dad ) )
-                        {
-                            OUTMSG (( "    name='%S', value='%S'\n", & hdr -> name, & hdr -> value ));
-                        }
-                    }
-
-                    BSTreeWhack ( & hdrs, KHttpHeaderWhack, NULL );
-
-                }
-
-                KHttpRelease ( http );
-            }
-
-            KStreamRelease ( sock );
-        }
-
-        KNSManagerRelease ( mgr );
-    }
-
-    return rc;
-}
-
-rc_t PreHttpTest ( void )
-{
-    KDirectory *dir;
-    rc_t rc = KDirectoryNativeDir ( &dir );
-    if ( rc == 0 )
-    {
-        const KFile *f;
-        rc = KDirectoryOpenFileRead ( dir, &f, "nih_1_out.txt" );
-        if ( rc == 0 )
-        {
-            rc = HttpTest ( f );
-            KFileRelease ( f );
-        }
-
-        KDirectoryRelease ( dir );
-    }
-    return rc;
-}
-
-/* Version  EXTERN
- *  return 4-part version code: 0xMMmmrrrr, where
- *      MM = major release
- *      mm = minor release 
- *    rrrr = bug-fix release
- */
-ver_t CC KAppVersion ( void )
-{
-    return 0;
-}
-
-
-/* Usage
- *  This function is called when the command line argument
- *  handling sees -? -h or --help
- */
-rc_t CC UsageSummary ( const char *progname )
-{
-    /*    return KOutMsg (
-        "\n"
-        "Usage:\n"
-        "  %s [Options]\n"
-        "\n"
-        "Summary:\n"
-        "  Simple test of printf.\n"
-        , progname );
-    */
-    return 0;
-}
-
-const char UsageDefaultName[] = "time-test";
-
-rc_t CC Usage ( const Args *args )
-{
-    /*
-    const char * progname = UsageDefaultName;
-    const char * fullpath = UsageDefaultName;
-    rc_t rc;
-
-    if (args == NULL)
-        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
-    else
-        rc = ArgsProgram (args, &fullpath, &progname);
-
-    UsageSummary (progname);
-
-    KOutMsg ("Options:\n");
-
-    HelpOptionsStandard();
-
-    HelpVersion (fullpath, KAppVersion());
-
-    return rc;
-    */
-    return 0;
-}
-
-    
-static
-rc_t run ( const char *progname )
-{
-    rc_t rc = 0;
-
-    URLBlockInitTest ();
-    rc = ParseUrlTest ();
-    rc = PreHttpTest ();      
-
-    return rc;
-}
-
-/* KMain
- */
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args *args;
-    rc_t rc = ArgsMakeAndHandle ( & args, argc, argv, 0 );
-    if ( rc == 0 )
-    {
-        KConfigDisableUserSettings();
-        rc = run ( argv [ 0 ] );
-        ArgsWhack ( args );
-    }
-
-    return rc;
-}
-
diff --git a/test/kns/http_dropconnection_test.cpp b/test/kns/http_dropconnection_test.cpp
deleted file mode 100644
index 97bfef2..0000000
--- a/test/kns/http_dropconnection_test.cpp
+++ /dev/null
@@ -1,437 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for HTTP interfaces
-*/
-
-#include <ktst/unit_test.hpp>
-
-#include <klib/debug.h>
-#include <klib/rc.h>
-
-#include <kns/manager.h>
-#include <kns/http.h>
-
-#include <../libs/kns/stream-priv.h>
-#include <../libs/kns/http-priv.h>
-
-#include <kfs/file.h>
-
-#include <sysalloc.h>
-#include <stdexcept>
-#include <cstring>
-#include <list>
-
-TEST_SUITE(HttpTestSuite);
-
-using namespace std;
-using namespace ncbi::NK;
-
-class TestStream;
-#define KSTREAM_IMPL TestStream
-#include <kns/impl.h>
-
-#if _DEBUGGING
-#   define DBG_KNS_ON()  \
-        KDbgSetModConds ( DBG_KNS, DBG_FLAG ( DBG_KNS_HTTP ), DBG_FLAG ( DBG_KNS_HTTP ) );          
-#   define DBG_KNS_OFF() \
-        KDbgSetModConds ( DBG_KNS, DBG_FLAG ( DBG_KNS_HTTP ), ~ DBG_FLAG ( DBG_KNS_HTTP ) );          
-#else
-#   define DBG_KNS_ON()
-#   define DBG_KNS_OFF() 
-#endif
-
-static const string Response_HEAD_OK = "HTTP/1.1 200 OK\nAccept-Ranges: bytes\nContent-Length: 7\n";
-static const string Response_GET_Content = "HTTP/1.1 206 Partial Content\n"
-                                            "Accept-Ranges: bytes\n"
-                                            "Transfer-Encoding: chunked\n"
-                                            "Content-Range: bytes 0-6/7\n" 
-                                            "\n"
-                                            "7\n"
-                                            "content\n";
-                                    
-static rc_t RC_TransferIncomplete = SILENT_RC ( rcNS, rcFile, rcWriting, rcTransfer, rcIncomplete );
-static rc_t RC_Timeout = SILENT_RC ( rcNS, rcStream, rcReading, rcTimeout, rcExhausted );
-
-class TestStream
-{
-public:
-    static KStream_vt_v1 vt;
-
-    static rc_t CC Whack ( KSTREAM_IMPL *self ) 
-    { 
-        if ( TestEnv::verbosity == LogLevel::e_message )
-            cout << "TestStream::Whack() called" << endl;
-        return 0; 
-    }
-    static rc_t CC Read ( const KSTREAM_IMPL *self, void *buffer, size_t bsize, size_t *num_read )
-    { 
-        throw logic_error ( "TestStream::<non-timed>Read called" );
-    }
-    static rc_t CC Write ( KSTREAM_IMPL *self, const void *buffer, size_t size, size_t *num_writ )
-    { 
-        throw logic_error ( "TestStream::<non-timed>Write called" );
-    }
-    static rc_t CC TimedRead ( const KSTREAM_IMPL *self, void *buffer, size_t bsize, size_t *num_read, struct timeout_t *tm )
-    { 
-        if ( TestEnv::verbosity == LogLevel::e_message )
-            cout << "TestStream::TimedRead() called" << endl;
-            
-        string response;
-        if ( m_readResponses.size()> 0)
-        {
-            response = m_readResponses.front();
-            m_readResponses.pop_front();
-        }
-        else
-        {
-            throw logic_error ( "TestStream::TimedRead: out of responses" );
-        }
-        
-        if ( response == "DROP" )
-        {
-            num_read = 0;
-            return 0;
-        }
-        if ( response == "TIMEOUT" )
-        {
-            return RC_Timeout;
-        }
-        
-        if ( response.size() >= bsize )
-        {
-            memcpy(buffer, response.c_str(), bsize);
-            * num_read = bsize; 
-            response = response.substr(bsize);
-        }
-        else
-        {
-            memcpy(buffer, response.c_str(), response.size());
-            * num_read = response.size() + 1;  // include 0-terminator
-            ( ( char * ) buffer ) [ * num_read - 1 ] = 0;
-            response.clear();
-        }
-        if ( TestEnv::verbosity == LogLevel::e_message )
-            cout << "TestStream::TimedRead returned \"" << string((const char*)buffer, * num_read) << "\"" << endl;
-        
-        return 0; 
-    }
-    static rc_t CC TimedWrite ( KSTREAM_IMPL *self, const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm )
-    { 
-        if ( TestEnv::verbosity == LogLevel::e_message )
-            cout << "TestStream::TimedWrite(\"" << string((const char*)buffer, size) << "\") called" << endl;
-            
-        rc_t response;
-        if ( m_writeResponses.size()> 0)
-        {
-            response = m_writeResponses.front();
-            m_writeResponses.pop_front();
-        }
-        else
-        {
-            throw logic_error ( "TestStream::TimedWrite: out of responses" );
-        }
-        
-        if ( response == 0 )
-        {
-            * num_writ = size; 
-            return 0; 
-        }
-        else
-        {
-            * num_writ = 0; 
-            return response; 
-        }
-    }
-
-    static void AddReadResponse ( const string& p_str )
-    {
-        m_readResponses.push_back(p_str);
-    }
-    
-    static void AddWriteRC ( rc_t p_rc )
-    {
-        m_writeResponses.push_back(p_rc);
-    }
-    
-    static list<string> m_readResponses;
-    static list<rc_t> m_writeResponses;
-};
-
-KStream_vt_v1 TestStream::vt =
-{
-    1, 1,
-    TestStream::Whack,
-    TestStream::Read,
-    TestStream::Write,
-    TestStream::TimedRead,
-    TestStream::TimedWrite
-};
-
-list<string> TestStream::m_readResponses;
-list<rc_t> TestStream::m_writeResponses;
-
-class HttpFixture
-{
-public:
-    HttpFixture()
-    : m_mgr(0), m_file(0), m_numRead(0)
-    {
-        if ( KNSManagerMake ( & m_mgr ) != 0 )
-            throw logic_error ( "HttpFixture: KNSManagerMake failed" );
-                
-        if ( KStreamInit ( & m_stream, ( const KStream_vt* ) & TestStream::vt, "TestStream", "", true, true ) != 0 )
-            throw logic_error ( "HttpFixture: KStreamInit failed" );
-            
-        TestStream::m_readResponses.clear();
-        
-        m_reconnected = false;
-        
-#if _DEBUGGING
-    SetClientHttpReopenCallback( Reconnect ); // NB. this hook is only available in DEBUG mode
-#endif        
-    }
-    
-    ~HttpFixture()
-    {
-        if ( m_file && KFileRelease ( m_file ) != 0 )
-            throw logic_error ( "HttpFixture::~HttpFixture KFileRelease failed" );
-            
-        //if ( ! TestStream::m_readResponses.empty() )
-        //    throw logic_error ( "HttpFixture::~HttpFixture not all TestStream::m_readResponses have been consumed" );
-
-        DBG_KNS_OFF();
-        KNSManagerSetVerbose ( m_mgr, false );
-        if ( m_mgr && KNSManagerRelease ( m_mgr ) != 0 )
-            throw logic_error ( "HttpFixture::~HttpFixture KNSManagerRelease failed" );
-    }
-    
-    static string MakeURL(const char* base)
-    {
-        return string("http://") + base + ".com/";
-    }    
-    static struct KStream * Reconnect ()
-    {   
-        m_reconnected = true;
-        return & m_stream; 
-    }
-    
-    void TraceOn()
-    {
-        KNSManagerSetVerbose ( m_mgr, true );
-        DBG_KNS_ON();
-    }
-    
-    void SendReceiveHEAD(const char* p_url)
-    {
-        TestStream::AddWriteRC(0); // send HEAD succeeds
-        TestStream::AddReadResponse ( Response_HEAD_OK ); 
-        if ( KNSManagerMakeHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL ( p_url ) . c_str () ) != 0 )
-            throw logic_error ( "HttpFixture::SendReceiveHEAD KNSManagerMakeHttpFile failed" );
-    }
-    
-    
-    static KStream m_stream;
-    static bool m_reconnected;
-    
-    KNSManager* m_mgr;
-    KFile* m_file;
-    char m_buf[1024];
-    size_t m_numRead;
-};
-
-KStream HttpFixture::m_stream;
-bool HttpFixture::m_reconnected = false;
-
-//////////////////////////
-
-// the tests involving reconnection require Reconnect hook, thus cannot be run in Release build
-#define CAN_USE_RECONNECT_HOOK _DEBUGGING
-
-FIXTURE_TEST_CASE(Http_Normal, HttpFixture)
-{
-    TestStream::AddWriteRC ( 0 ); // send HEAD succeeds
-    TestStream::AddReadResponse ( Response_HEAD_OK ); 
-    REQUIRE_RC ( KNSManagerMakeHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str() ) ); 
-    
-    TestStream::AddWriteRC ( 0 ); // send GET succeeds
-    TestStream::AddReadResponse( Response_GET_Content ); 
-    
-    REQUIRE_RC( KFileTimedRead ( m_file, 0, m_buf, sizeof m_buf, &m_numRead, NULL ) );
-    REQUIRE_EQ( string("content"), string(m_buf, m_numRead) );
-}
-
-// problems with HEAD
-
-FIXTURE_TEST_CASE(HEAD_BadResponse, HttpFixture)
-{
-    TestStream::AddWriteRC(0); // send HEAD succeeds
-    TestStream::AddReadResponse("garbage"); // bad response to HEAD
-    REQUIRE_RC_FAIL ( KNSManagerMakeHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str() ) ); 
-}
-
-FIXTURE_TEST_CASE(HEAD_BrokenConnection, HttpFixture)
-{
-    TestStream::AddWriteRC(0); // send HEAD succeeds
-    TestStream::AddReadResponse(""); // simulates reaction to POLLHUP/POLLRDHUP
-    REQUIRE_RC_FAIL ( KNSManagerMakeHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str() ) ); 
-}
-
-#if CAN_USE_RECONNECT_HOOK
-FIXTURE_TEST_CASE(HEAD_Invalid_Reconnect_Succeed, HttpFixture)
-{
-    TestStream::AddWriteRC ( RC_TransferIncomplete ); // first send HEAD fails
-    TestStream::AddWriteRC ( 0 ); // retry send HEAD succeeds
-    TestStream::AddReadResponse ( Response_HEAD_OK ); 
-    REQUIRE_RC ( KNSManagerMakeHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str() ) ); 
-    REQUIRE ( m_reconnected );
-    
-    // make sure GET works after reconnection
-    TestStream::AddWriteRC ( 0 ); // send GET succeeds
-    TestStream::AddReadResponse( Response_GET_Content ); 
-    
-    REQUIRE_RC( KFileTimedRead ( m_file, 0, m_buf, sizeof m_buf, &m_numRead, NULL ) );
-    REQUIRE_EQ( string("content"), string(m_buf, m_numRead) );
-}
-#endif
-
-#if CAN_USE_RECONNECT_HOOK
-FIXTURE_TEST_CASE(HEAD_Invalid_Reconnect_Fail, HttpFixture)
-{
-    TestStream::AddWriteRC( RC_TransferIncomplete ); // first send HEAD fails
-    TestStream::AddWriteRC( RC_TransferIncomplete ); // retry send HEAD fails
-    REQUIRE_RC_FAIL ( KNSManagerMakeHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str() ) ); 
-    REQUIRE ( m_reconnected );
-}
-#endif
-
-// problems with GET
-
-#if CAN_USE_RECONNECT_HOOK
-FIXTURE_TEST_CASE(GET_Invalid_Reconnect_Succeed, HttpFixture)
-{
-    SendReceiveHEAD(GetName());
-    
-    TestStream::AddWriteRC(0); // send GET succeeds
-    TestStream::AddReadResponse( // broken response to GET
-        "HTTP/1.1 206 Partial Content\n"
-        "Transfer-Encoding: chunked\n"
-        "Content-Range: bytes 0-6/7\n" 
-        "\n");
-    TestStream::AddWriteRC(0); // retry GET succeeds
-    TestStream::AddReadResponse( Response_GET_Content ); 
-    
-    REQUIRE_RC( KFileTimedRead ( m_file, 0, m_buf, sizeof m_buf, &m_numRead, NULL ) );
-    REQUIRE_EQ( string("content"), string(m_buf, m_numRead) );
-    
-    REQUIRE ( m_reconnected );
-}
-#endif
-
-#if CAN_USE_RECONNECT_HOOK
-FIXTURE_TEST_CASE(GET_Failed_Reconnect_Succeed, HttpFixture)
-{
-    SendReceiveHEAD(GetName());
-    
-    TestStream::AddWriteRC( RC_TransferIncomplete ); // send GET fails
-    TestStream::AddWriteRC(0); // retry send GET succeeds
-    TestStream::AddReadResponse( Response_GET_Content ); 
-    
-    REQUIRE_RC( KFileTimedRead ( m_file, 0, m_buf, sizeof m_buf, &m_numRead, NULL ) );
-    REQUIRE_EQ( string("content"), string(m_buf, m_numRead) );
-    
-    REQUIRE ( m_reconnected );
-}
-#endif
-
-#if CAN_USE_RECONNECT_HOOK
-FIXTURE_TEST_CASE(GET_Timedout_Reconnect_Succeed, HttpFixture)
-{
-    SendReceiveHEAD(GetName());
-    
-    TestStream::AddWriteRC(0); // send GET succeeds
-    TestStream::AddReadResponse( "TIMEOUT" ); // response to GET times out
-    TestStream::AddWriteRC(0); // retry GET succeeds
-    TestStream::AddReadResponse( Response_GET_Content ); 
-    REQUIRE_RC ( KFileTimedRead ( m_file, 0, m_buf, sizeof m_buf, &m_numRead, NULL ) );
-    REQUIRE_EQ( string("content"), string(m_buf, m_numRead) );
-    
-    REQUIRE ( m_reconnected );
-}
-#endif
-
-#if CAN_USE_RECONNECT_HOOK
-FIXTURE_TEST_CASE(GET_Read_Failed_Reconnect_Failed, HttpFixture)
-{
-    SendReceiveHEAD(GetName());
-    
-    TestStream::AddWriteRC(0); // send GET succeeds
-    TestStream::AddReadResponse( "TIMEOUT" ); // response to GET times out
-    TestStream::AddWriteRC(0); // reconnect GET succeeds
-    TestStream::AddReadResponse( "TIMEOUT" ); // response to GET times out
-    REQUIRE_RC_FAIL ( KFileTimedRead ( m_file, 0, m_buf, sizeof m_buf, &m_numRead, NULL ) );
-    
-    REQUIRE ( m_reconnected );
-}
-#endif
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-#include <klib/debug.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-const char UsageDefaultName[] = "test-http-dropconn";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-
-	// this makes messages from the test code appear
-	// (same as running the executable with "-l=message")
-	// TestEnv::verbosity = LogLevel::e_message;
-	
-    rc_t rc=HttpTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/kns/httptest.cpp b/test/kns/httptest.cpp
deleted file mode 100644
index e805eef..0000000
--- a/test/kns/httptest.cpp
+++ /dev/null
@@ -1,870 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for HTTP interfaces
-*/
-
-#include <kapp/args.h> // Args
-
-#include <ktst/unit_test.hpp>
-
-#include <klib/log.h>
-#include <klib/rc.h>
-#include <kfg/config.h>
-
-#include <kns/manager.h>
-#include <kns/kns-mgr-priv.h>
-#include <kns/http.h>
-
-#include <../libs/kns/mgr-priv.h>
-#include <../libs/kns/http-priv.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <kfs/defs.h>
-
-#include <kproc/thread.h>
-
-#include <sysalloc.h>
-#include <stdexcept>
-#include <cstring>
-#include <list>
-#include <sstream>
-
-static rc_t argsHandler ( int argc, char * argv [] );
-TEST_SUITE_WITH_ARGS_HANDLER ( HttpTestSuite, argsHandler );
-
-using namespace std;
-using namespace ncbi::NK;
-
-class TestStream;
-#define KSTREAM_IMPL TestStream
-#include <kns/impl.h>
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 != 0 && rc == 0) { rc = rc2; } obj = NULL; } while (false)
-
-#define ALL
-
-class TestStream
-{
-public:
-    static KStream_vt_v1 vt;
-
-    static rc_t CC Whack ( KSTREAM_IMPL *self ) 
-    { 
-        if ( TestEnv::verbosity == LogLevel::e_message )
-            cout << "TestStream::Whack() called" << endl;
-        return 0; 
-    }
-    static rc_t CC Read ( const KSTREAM_IMPL *self, void *buffer, size_t bsize, size_t *num_read )
-    { 
-        if ( TestEnv::verbosity == LogLevel::e_message )
-            cout << "TestStream::Read() called" << endl;
-        * num_read = 0; 
-        return 0; 
-    }
-    static rc_t CC Write ( KSTREAM_IMPL *self, const void *buffer, size_t size, size_t *num_writ )
-    { 
-        if ( TestEnv::verbosity == LogLevel::e_message )
-            cout << "TestStream::Write() called" << endl;
-        * num_writ = size; 
-        return 0; 
-    }
-    static rc_t CC TimedRead ( const KSTREAM_IMPL *self, void *buffer, size_t bsize, size_t *num_read, struct timeout_t *tm )
-    { 
-        if ( TestEnv::verbosity == LogLevel::e_message )
-            cout << "TestStream::TimedRead() called" << endl;
-            
-        string response;
-        if ( m_responses.size()> 0)
-        {
-            response = m_responses.front();
-            m_responses.pop_front();
-        }
-        
-        if ( response.size() >= bsize )
-        {
-            memcpy(buffer, response.c_str(), bsize);
-            * num_read = bsize; 
-            response = response.substr(bsize);
-        }
-        else
-        {
-            memcpy(buffer, response.c_str(), response.size());
-            * num_read = response.size();
-            response.clear();
-        }
-        if ( TestEnv::verbosity == LogLevel::e_message )
-            cout << "TestStream::TimedRead returned \"" << string((const char*)buffer, * num_read) << "\"" << endl;
-        
-        return 0; 
-    }
-    static rc_t CC TimedWrite ( KSTREAM_IMPL *self, const void *buffer, size_t size, size_t *num_writ, struct timeout_t *tm )
-    { 
-        if ( TestEnv::verbosity == LogLevel::e_message )
-            cout << "TestStream::TimedWrite(\"" << string((const char*)buffer, size) << "\") called" << endl;
-        * num_writ = size; 
-        return 0; 
-    }
-
-    static void AddResponse ( const string& p_str, bool end_binary = false )
-    {
-        if (end_binary)
-            m_responses.push_back(p_str);
-        else
-            m_responses.push_back(std::string(p_str.c_str(), p_str.size() + 1));
-    }
-    
-    static list<string> m_responses;
-};
-
-KStream_vt_v1 TestStream::vt =
-{
-    1, 1,
-    TestStream::Whack,
-    TestStream::Read,
-    TestStream::Write,
-    TestStream::TimedRead,
-    TestStream::TimedWrite
-};
-
-list<string> TestStream::m_responses;
-
-class HttpFixture
-{
-public:
-    HttpFixture()
-    : m_mgr(0), m_file(0)
-    {
-        if ( KNSManagerMake ( & m_mgr ) != 0 )
-            throw logic_error ( "HttpFixture: KNSManagerMake failed" );
-                
-        if ( KStreamInit ( & m_stream, ( const KStream_vt* ) & TestStream::vt, "TestStream", "", true, true ) != 0 )
-            throw logic_error ( "HttpFixture: KStreamInit failed" );
-            
-        TestStream::m_responses.clear();
-    }
-    
-    ~HttpFixture()
-    {
-        if ( m_mgr && KNSManagerRelease ( m_mgr ) != 0 )
-            throw logic_error ( "HttpFixture::~HttpFixture KNSManagerRelease failed" );
-            
-        if ( m_file && KFileRelease ( m_file ) != 0 )
-            throw logic_error ( "HttpFixture::~HttpFixture KFileRelease failed" );
-            
-        if ( ! TestStream::m_responses.empty() )
-            throw logic_error ( "HttpFixture::~HttpFixture not all TestStream::m_responses have been consumed" );
-    }
-    
-    KConfig* MakeConfig( const char* name, const char* contents )
-    {
-        KDirectory* wd;
-        if ( KDirectoryNativeDir ( & wd ) != 0 )
-            throw logic_error("KfgFixture: KDirectoryNativeDir failed");
-            
-        {
-            KFile* file;    
-            if (KDirectoryCreateFile(wd, &file, true, 0664, kcmInit, name) != 0)
-                throw logic_error("MakeConfig: KDirectoryCreateFile failed");
-
-            size_t num_writ=0;
-            if (KFileWrite(file, 0, contents, strlen(contents), &num_writ) != 0)
-                throw logic_error("MakeConfig: KFileWrite failed");
-
-            if (KFileRelease(file) != 0)
-                throw logic_error("MakeConfig: KFileRelease failed");    
-        }
-        
-        KConfig* ret;
-        {
-            if (KConfigMake ( & ret, wd ) != 0) 
-                throw logic_error("MakeConfig: KConfigMake failed");        
-                
-            KFile* file;    
-            if (KDirectoryOpenFileRead(wd, (const KFile**)&file, name) != 0)
-                throw logic_error("MakeConfig: KDirectoryOpenFileRead failed");
-            
-            if (KConfigLoadFile ( ret, name, file) != 0)
-                throw logic_error("MakeConfig: KConfigLoadFile failed");
-
-            if (KFileRelease(file) != 0)
-                throw logic_error("MakeConfig: KFileRelease failed");
-        }
-        
-        if (KDirectoryRemove(wd, true, name) != 0)
-            throw logic_error("MakeConfig: KDirectoryRemove failed");
-        if (KDirectoryRelease(wd) != 0)
-            throw logic_error("MakeConfig: KDirectoryRelease failed");
-        
-        return ret;
-    }
-    
-    static struct KStream * Reconnect ()
-    {   
-        return & m_stream; 
-    }
-    
-    static string MakeURL(const char* base)
-    {
-        return string("http://") + base + ".com/";
-    }    
-    
-    KNSManager* m_mgr;
-    static KStream m_stream;
-    KFile* m_file;
-};
-
-KStream HttpFixture::m_stream;
-
-#ifdef ALL
-//////////////////////////
-// Regular HTTP 
-FIXTURE_TEST_CASE(Http_Make, HttpFixture)
-{
-    TestStream::AddResponse("HTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nContent-Length: 7\r\n");
-    REQUIRE_RC ( KNSManagerMakeHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str() ) );
-    REQUIRE_NOT_NULL ( m_file ) ;
-}
-
-#if 1
-/*FIXME: 100 used to be retried regardless of whether URL is reliable, now it is not, so the test fails */
-FIXTURE_TEST_CASE(Http_Make_Continue_100_Retry, HttpFixture)
-{
-    TestStream::AddResponse("HTTP/1.1 100 continue\r\n");
-    TestStream::AddResponse("HTTP/1.1 100 continue\r\n");
-    TestStream::AddResponse("HTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nContent-Length: 7\r\n");
-    REQUIRE_RC ( KNSManagerMakeHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str() ) );
-    REQUIRE_NOT_NULL ( m_file ) ;
-}
-#endif
-
-FIXTURE_TEST_CASE(Http_Make_500_Fail, HttpFixture)
-{   // a regular Http client does not retry
-    TestStream::AddResponse("HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n");
-    REQUIRE_RC_FAIL ( KNSManagerMakeHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str() ) );
-}
-
-FIXTURE_TEST_CASE(Http_Read, HttpFixture)
-{
-    TestStream::AddResponse("HTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nContent-Length: 7\r\n"); // response to HEAD
-    REQUIRE_RC ( KNSManagerMakeHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str() ) );
-    char buf[1024];
-    size_t num_read;
-    TestStream::AddResponse(    // response to GET
-        "HTTP/1.1 206 Partial Content\r\n"
-        "Accept-Ranges: bytes\r\n"
-        "Transfer-Encoding: chunked\r\n"
-        /*"Content-Length: 7\r\n" */ /* bug fix in KClientHttpResultHandleContentRange: used to break if Content-Length was not there */
-        "Content-Range: bytes 0-6/7\r\n"
-        "\r\n"
-        "7\r\n"
-        "content",
-        true
-    );
-    REQUIRE_RC( KFileTimedRead ( m_file, 0, buf, sizeof buf, &num_read, NULL ) );
-    REQUIRE_EQ( string ( "content" ), string ( buf, num_read ) );
-}
-
-struct ReadThreadData
-{
-    int tid;
-    int num_threads;
-    int num_requests;
-    int content_length;
-    const KFile * kHttpFile;
-    const char ** contents;
-};
-
-static rc_t CC read_thread_func( const KThread *self, void *data )
-{
-    rc_t rc;
-    ReadThreadData * td = ( ReadThreadData * ) data;
-    char buf[1024];
-    size_t num_read;
-    assert ( td->content_length <= (int)sizeof buf );
-
-    for ( int i = 0; i < td->num_requests; ++i )
-    {
-        rc = KFileTimedRead ( td->kHttpFile, 0, buf, td->content_length, &num_read, NULL );
-        if ( rc != 0 || num_read == 0 )
-        {
-            LOG(LogLevel::e_fatal_error, "read_thread_func: KFileTimedRead failed on kHttpFile\n");
-            if ( rc == 0 )
-                rc = RC( rcNS, rcFile, rcValidating, rcData, rcEmpty );
-            return rc;
-        }
-
-        std::string read_content = std::string ( buf, num_read );
-        int content_type = read_content[0] - '0';
-        if (content_type < 0 || content_type >= td->num_threads || td->contents[content_type] != read_content)
-        {
-            LOG(LogLevel::e_fatal_error, "read_thread_func: received data is corrupt and/or does not match test data\n");
-            rc = RC( rcNS, rcFile, rcValidating, rcData, rcCorrupt );
-            return rc;
-        }
-    }
-
-    return rc;
-}
-
-FIXTURE_TEST_CASE(Http_Read_Multi_User, HttpFixture)
-{
-    const int num_threads = 8;
-    const int content_length = 256; // has to be at least 256 b, otherwise httpclient will use internal buffer and load 256 b or the whole file from http server instead of partial content
-    const int content_length_total = content_length * num_threads;
-
-    const int num_requests = 1024;
-    const int num_responses_total = num_threads * num_requests;
-
-    const char * contents[] = {
-        "0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
-        "1bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
-        "2ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
-        "3ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
-        "4eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
-        "5fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
-        "6ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg",
-        "7hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"
-    };
-
-    assert( sizeof contents / sizeof *contents == num_threads );
-
-    std::stringstream ss;
-    ss << "HTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nContent-Length: " << (content_length_total) << "\r\n";
-    TestStream::AddResponse(ss.str()); // response to HEAD
-    REQUIRE_RC ( KNSManagerMakeHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str() ) );
-
-    for ( int i = 0; i < num_responses_total; ++i )
-    {
-        int content_type = i % num_threads;
-        int range_start = 0;
-        int range_end = content_length - 1;
-        ss.str(std::string());
-        ss << "HTTP/1.1 206 Partial Content\r\n"
-                "Accept-Ranges: bytes\r\n"
-                "Transfer-Encoding: chunked\r\n"
-                "Content-Range: bytes " << range_start << "-" << range_end << "/" << content_length_total << "\r\n"
-                "\r\n"
-                "" << content_length << "\r\n"
-                "" << contents[content_type];
-
-        TestStream::AddResponse(ss.str(), true);    // response to GET
-    }
-
-    KThread *t [ num_threads ];
-    ReadThreadData td [ num_threads ];
-    rc_t thread_rcs [ num_threads ];
-    rc_t rc = 0;
-    for ( int i = 0; i < num_threads; ++i )
-    {
-        td[ i ].tid = i + 1;
-        td[ i ].num_threads = num_threads;
-        td[ i ].num_requests = num_requests;
-        td[ i ].content_length = content_length;
-        td[ i ].kHttpFile = m_file;
-        td[ i ].contents = (const char**)contents;
-        rc = KThreadMake ( &( t[ i ] ), read_thread_func, &( td[ i ] ) );
-        REQUIRE_RC( rc );
-    }
-
-    for ( int i = 0; i < num_threads; ++i )
-    {
-        rc_t rc2 = KThreadWait ( t[ i ], &thread_rcs[i] );
-        if (rc2 != 0)
-        {
-            LOG(LogLevel::e_fatal_error, "KThreadWait failed\n");
-            if (rc == 0)
-                rc = rc2;
-        }
-        rc2 = KThreadRelease ( t[ i ] );
-        if (rc2 != 0)
-        {
-            LOG(LogLevel::e_fatal_error, "KThreadRelease failed\n");
-            if (rc == 0)
-                rc = rc2;
-        }
-    }
-    REQUIRE_RC( rc );
-    for (int i = 0; i < num_threads; ++i)
-    {
-        REQUIRE_RC( thread_rcs[i] );
-    }
-
-
-}
-
-FIXTURE_TEST_CASE(HttpRequest_POST_NoParams, HttpFixture)
-{   // Bug: KClientHttpRequestPOST crashed if request had no parameters
-    KClientHttpRequest *req;
-    KNSManagerMakeClientRequest ( m_mgr, &req, 0x01010000, & m_stream, MakeURL(GetName()).c_str()  );
-
-    KClientHttpResult *rslt;
-    TestStream::AddResponse("HTTP/1.1 200 OK\r\n");
-    REQUIRE_RC ( KClientHttpRequestPOST ( req, & rslt ) );
-    REQUIRE_RC ( KClientHttpResultRelease ( rslt ) );
-
-    REQUIRE_RC ( KClientHttpRequestRelease ( req ) );
-}
-
-
-//////////////////////////
-// HttpRetrySpecs
-
-FIXTURE_TEST_CASE(HttpRetrySpecs_Construct_Defaults, HttpFixture)
-{
-    HttpRetrySpecs rs;
-    KConfig* kfg = MakeConfig( GetName(), "a=\"b\"" );
-    REQUIRE_RC(HttpRetrySpecsInit(&rs, kfg));
-
-    uint8_t  max_retries;
-    const uint16_t *sleep_before_retry;
-    bool open_ended;
-
-    REQUIRE ( HttpGetRetryCodes ( & rs, 502, & max_retries, & sleep_before_retry, & open_ended ) );
-
-    REQUIRE ( ! open_ended );
-    REQUIRE_EQ ( 6, (int)max_retries );
-    REQUIRE_NOT_NULL(sleep_before_retry);
-    REQUIRE_EQ (  0, (int)sleep_before_retry[0] );
-    REQUIRE_EQ (  5, (int)sleep_before_retry[1] );
-    REQUIRE_EQ ( 10, (int)sleep_before_retry[2] );
-    REQUIRE_EQ ( 15, (int)sleep_before_retry[3] );
-    REQUIRE_EQ ( 30, (int)sleep_before_retry[4] );
-    REQUIRE_EQ ( 60, (int)sleep_before_retry[5] );
-
-    REQUIRE_RC(KConfigRelease(kfg));
-    REQUIRE_RC(HttpRetrySpecsDestroy(&rs));
-}
-
-FIXTURE_TEST_CASE(HttpRetrySpecs_Construct_Error, HttpFixture)
-{
-    HttpRetrySpecs rs;
-    REQUIRE_RC_FAIL(HttpRetrySpecsInit(&rs, NULL));
-}
-
-FIXTURE_TEST_CASE(HttpRetrySpecs_Construct, HttpFixture)
-{
-    HttpRetrySpecs rs;
-    KConfig* kfg = MakeConfig( GetName(), "http/reliable/5xx=\"0,1\"\n" "http/reliable/501=\"2,3,4\"\n");
-    REQUIRE_RC(HttpRetrySpecsInit(&rs, kfg));
-
-    uint8_t  max_retries;
-    const uint16_t *sleep_before_retry;
-    bool open_ended;
-
-    REQUIRE ( HttpGetRetryCodes ( & rs, 502, & max_retries, & sleep_before_retry, & open_ended ) );
-    REQUIRE ( ! open_ended );
-    REQUIRE_EQ ( 2, (int)max_retries );
-    REQUIRE_NOT_NULL ( sleep_before_retry );
-    REQUIRE_EQ ( 0, (int)sleep_before_retry[0] );
-    REQUIRE_EQ ( 1, (int)sleep_before_retry[1] );
-
-    REQUIRE ( HttpGetRetryCodes(&rs, 501, &max_retries, & sleep_before_retry, & open_ended) );
-    REQUIRE ( ! open_ended );
-    REQUIRE_EQ ( 3, (int)max_retries );
-    REQUIRE_NOT_NULL ( sleep_before_retry );
-    REQUIRE_EQ ( 2, (int)sleep_before_retry[0] );
-    REQUIRE_EQ ( 3, (int)sleep_before_retry[1] );
-    REQUIRE_EQ ( 4, (int)sleep_before_retry[2] );
-
-    REQUIRE_RC ( KConfigRelease(kfg) );
-    REQUIRE_RC ( HttpRetrySpecsDestroy ( & rs ) );
-}
-
-FIXTURE_TEST_CASE(HttpRetrySpecs_Construct_OpenEnded, HttpFixture)
-{
-    HttpRetrySpecs rs;
-    KConfig* kfg = MakeConfig( GetName(), "http/reliable/5xx=\"0,1+\"\n");
-    REQUIRE_RC(HttpRetrySpecsInit(&rs, kfg));
-
-    uint8_t  max_retries;
-    const uint16_t *sleep_before_retry;
-    bool open_ended;
-
-    REQUIRE ( HttpGetRetryCodes ( & rs, 502, & max_retries, & sleep_before_retry, & open_ended ) );
-    REQUIRE ( open_ended );
-    REQUIRE_EQ ( 2, (int)max_retries );
-    REQUIRE_NOT_NULL ( sleep_before_retry );
-    REQUIRE_EQ ( 0, (int)sleep_before_retry[0] );
-    REQUIRE_EQ ( 1, (int)sleep_before_retry[1] );
-
-    REQUIRE_RC ( KConfigRelease(kfg) );
-    REQUIRE_RC ( HttpRetrySpecsDestroy ( & rs ) );
-}
-
-FIXTURE_TEST_CASE(HttpRetrySpecs_Construct_SleepsDoNotDecrease, HttpFixture)
-{
-    HttpRetrySpecs rs;
-    KConfig* kfg = MakeConfig( GetName(), "http/reliable/5xx=\"0,1,10,5,7\"\n");
-    REQUIRE_RC(HttpRetrySpecsInit(&rs, kfg));
-
-    uint8_t  max_retries;
-    const uint16_t *sleep_before_retry;
-    bool open_ended;
-
-    REQUIRE ( HttpGetRetryCodes ( & rs, 502, & max_retries, & sleep_before_retry, & open_ended ) );
-    REQUIRE ( ! open_ended );
-    REQUIRE_EQ ( 5, (int)max_retries );
-    REQUIRE_NOT_NULL ( sleep_before_retry );
-    REQUIRE_EQ (  0, (int)sleep_before_retry[0] );
-    REQUIRE_EQ (  1, (int)sleep_before_retry[1] );
-    REQUIRE_EQ ( 10, (int)sleep_before_retry[2] ); // set to equal the prior sleep time
-    REQUIRE_EQ ( 10, (int)sleep_before_retry[3] );
-    REQUIRE_EQ ( 10, (int)sleep_before_retry[4] );
-
-    REQUIRE_RC ( KConfigRelease(kfg) );
-    REQUIRE_RC ( HttpRetrySpecsDestroy ( & rs ) );
-}
-
-
-//////////////////////////
-// HttpRetrier
-
-class RetrierFixture : public HttpFixture
-{
-public:
-    static const uint8_t MaxRetries = 10;
-    static const uint32_t MaxTotalWait= 600000;
-
-    ~RetrierFixture()
-    {
-        if ( KHttpRetrierDestroy ( & m_retrier ) != 0 )
-            throw logic_error ( "RetrierFixture::~RetrierFixture KHttpRetrierDestroy failed" );
-    }
-
-    void Configure ( const char* kfg_name, const char* kfg_content, uint8_t max_retries = MaxRetries, uint32_t max_total_wait = MaxTotalWait )
-    {
-        KConfig* kfg = MakeConfig( kfg_name, kfg_content );
-
-        if ( m_mgr && KNSManagerRelease ( m_mgr ) != 0 )
-            throw logic_error ( "RetrierFixture::Configure KNSManagerRelease failed" );
-
-        if ( KNSManagerMakeConfig ( & m_mgr, kfg ) != 0 )
-            throw logic_error ( "RetrierFixture::Configure KNSManagerMakeConfig failed" );
-
-        m_mgr -> maxNumberOfRetriesOnFailureForReliableURLs = max_retries;
-        m_mgr -> maxTotalWaitForReliableURLs_ms = max_total_wait;
-
-        if ( KHttpRetrierInit ( & m_retrier, kfg_name, m_mgr ) != 0 )
-            throw logic_error ( "RetrierFixture::Configure KHttpRetrierInit failed" );
-
-        KConfigRelease ( kfg );
-    }
-
-    KHttpRetrier m_retrier;
-};
-
-FIXTURE_TEST_CASE(HttpRetrier_Construct, RetrierFixture)
-{
-    REQUIRE_RC ( KHttpRetrierInit ( & m_retrier, GetName(), m_mgr ) );
-}
-
-FIXTURE_TEST_CASE(HttpRetrier_NoRetry, RetrierFixture)
-{
-    Configure( GetName(), "http/reliable/501=\"\"\n" );
-
-    REQUIRE ( ! KHttpRetrierWait ( & m_retrier, 501 ) );  // configured to never retry
-    REQUIRE_EQ ( 0u, m_retrier . last_sleep );
-
-    REQUIRE ( ! KHttpRetrierWait ( & m_retrier, 300 ) );  // only 4xx and 5xx retry
-    REQUIRE_EQ ( 0u, m_retrier . last_sleep );
-}
-
-FIXTURE_TEST_CASE(HttpRetrier_RetryDefault4xx, RetrierFixture)
-{
-    REQUIRE_RC ( KHttpRetrierInit ( & m_retrier, GetName(), m_mgr ) );
-
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 400 ) );  // default for 4xx retries
-    REQUIRE_EQ ( 0u, m_retrier . last_sleep );
-}
-
-FIXTURE_TEST_CASE(HttpRetrier_RetryDefault5xx, RetrierFixture)
-{
-    REQUIRE_RC ( KHttpRetrierInit ( & m_retrier, GetName(), m_mgr ) );
-
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 500 ) );  // default for 5xx retries
-    REQUIRE_EQ ( 0u, m_retrier . last_sleep );
-}
-
-FIXTURE_TEST_CASE(HttpRetrier_Retry, RetrierFixture)
-{
-    Configure ( GetName(), "http/reliable/501=\"1,2,3\"\n");
-
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 501 ) );
-    REQUIRE_EQ ( 1u, m_retrier . last_sleep );
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 501 ) );
-    REQUIRE_EQ ( 2u, m_retrier . last_sleep );
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 501 ) );
-    REQUIRE_EQ ( 3u, m_retrier . last_sleep );
-    REQUIRE ( ! KHttpRetrierWait ( & m_retrier, 501 ) );  // out of retries
-}
-
-FIXTURE_TEST_CASE(HttpRetrier_Retry_ExceedMaxRetries, RetrierFixture)
-{
-    Configure ( GetName(), "http/reliable/501=\"1,2,3\"\n", 2 ); // set global max retries to 2
-
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 501 ) );
-    REQUIRE_EQ ( 1u, m_retrier . last_sleep );
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 501 ) );
-    REQUIRE_EQ ( 2u, m_retrier . last_sleep );
-    REQUIRE ( ! KHttpRetrierWait ( & m_retrier, 501 ) );  // globally set max retries overrides config
-}
-FIXTURE_TEST_CASE(HttpRetrier_Retry_DiffStatus, RetrierFixture)
-{
-    Configure ( GetName(), "http/reliable/501=\"1,2,3\"\n" "http/reliable/502=\"4,5,6\"\n", 2 );
-
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 501 ) );
-    REQUIRE_EQ ( 1u, m_retrier . last_sleep );
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 501 ) );
-    REQUIRE_EQ ( 2u, m_retrier . last_sleep );
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 502 ) );  // with a different status, retry count is reset
-    REQUIRE_EQ ( 4u, m_retrier . last_sleep );
-}
-
-FIXTURE_TEST_CASE(HttpRetrier_Retry_ExceedMaxTime, RetrierFixture)
-{
-    Configure ( GetName(), "http/reliable/501=\"200,300,400,400\"\n", MaxRetries, 600 ); // set max total to 600ms
-
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 501 ) );
-    REQUIRE_EQ ( 200u, m_retrier . last_sleep );
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 501 ) );
-    REQUIRE_EQ ( 300u, m_retrier . last_sleep );
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 501 ) );
-    REQUIRE_EQ ( 100u, m_retrier . last_sleep ); // cut short to the total of 600
-    REQUIRE ( ! KHttpRetrierWait ( & m_retrier, 501 ) );  // no more retries
-}
-
-FIXTURE_TEST_CASE(HttpRetrier_Retry_OpenEnded_MaxRetries, RetrierFixture)
-{
-    Configure ( GetName(), "http/reliable/501=\"200,300+\"\n", 4 ); // 300ms until out of retries
-
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 501 ) );
-    REQUIRE_EQ ( 200u, m_retrier . last_sleep );
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 501 ) );
-    REQUIRE_EQ ( 300u, m_retrier . last_sleep ); // 300 ms from now on
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 501 ) );
-    REQUIRE_EQ ( 300u, m_retrier . last_sleep );
-    REQUIRE ( KHttpRetrierWait ( & m_retrier, 501 ) );
-    REQUIRE_EQ ( 300u, m_retrier . last_sleep );
-    REQUIRE ( ! KHttpRetrierWait ( & m_retrier, 501 ) );  // out of retries
-}
-
-//////////////////////////
-// Reliable HTTP file
-
-FIXTURE_TEST_CASE(HttpReliable_Make, HttpFixture)
-{
-    TestStream::AddResponse("HTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nContent-Length: 7\r\n");
-    REQUIRE_RC ( KNSManagerMakeReliableHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str()  ) );
-    REQUIRE_NOT_NULL ( m_file ) ;
-}
-#if 0
-/* 100 used to be retried regardless, now it is not, so the test fails */
-FIXTURE_TEST_CASE(HttpReliable_Make_Continue_100_Retry, HttpFixture)
-{
-    TestStream::AddResponse("HTTP/1.1 100 continue\r\n");
-    TestStream::AddResponse("HTTP/1.1 100 continue\r\n");
-    TestStream::AddResponse("HTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nContent-Length: 7\r\n");
-    REQUIRE_RC ( KNSManagerMakeReliableHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str()  ) );
-    REQUIRE_NOT_NULL ( m_file ) ;
-}
-#endif
-
-FIXTURE_TEST_CASE(HttpReliable_Make_5xx_retry, HttpFixture)
-{   // use default configuration for 5xx to be retried
-    TestStream::AddResponse("HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n");
-    TestStream::AddResponse("HTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nContent-Length: 7\r\n");
-    REQUIRE_RC ( KNSManagerMakeReliableHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str()  ) );
-    REQUIRE_NOT_NULL ( m_file ) ;
-}
-
-FIXTURE_TEST_CASE(HttpReliable_Make_500_Fail, RetrierFixture)
-{
-    Configure ( GetName(), "http/reliable/500=\"\"\n"); // do not retry 500
-    TestStream::AddResponse("HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n");
-    REQUIRE_RC_FAIL ( KNSManagerMakeReliableHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str()  ) );
-}
-
-FIXTURE_TEST_CASE(HttpReliable_Make_500_Retry, RetrierFixture)
-{
-    Configure ( GetName(), "http/reliable/500=\"0+\"\n" "http/reliable/5xx=\"\"\n"); // do not retry 5xx, retry 500
-    TestStream::AddResponse("HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n");
-    TestStream::AddResponse("HTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nContent-Length: 7\r\n");
-    REQUIRE_RC ( KNSManagerMakeReliableHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str()  ) );
-    REQUIRE_NOT_NULL ( m_file ) ;
-}
-
-FIXTURE_TEST_CASE(HttpReliable_Make_500_TooManyRetries, RetrierFixture)
-{
-    Configure ( GetName(), "http/reliable/500=\"0\"\n" "http/reliable/5xx=\"\"\n"); // do not retry 5xx, retry 500 once
-    TestStream::AddResponse("HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n");
-    TestStream::AddResponse("HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n");
-    REQUIRE_RC_FAIL ( KNSManagerMakeReliableHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str()  ) );
-}
-
-#ifdef _DEBUGGING
-FIXTURE_TEST_CASE(HttpReliable_Read_Retry, HttpFixture)
-{
-    SetClientHttpReopenCallback ( Reconnect ); // this hook is only available in DEBUG mode
-
-    TestStream::AddResponse("HTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nContent-Length: 7\r\n"); // response to HEAD
-    REQUIRE_RC ( KNSManagerMakeReliableHttpFile( m_mgr, ( const KFile** ) &  m_file, & m_stream, 0x01010000, MakeURL(GetName()).c_str()  ) );
-    char buf[1024];
-    size_t num_read;
-    TestStream::AddResponse("HTTP/1.1 500 Internal Server Error\r\n"); // response to GET
-    TestStream::AddResponse(
-        "HTTP/1.1 206 Partial Content\r\n"
-        "Accept-Ranges: bytes\r\n"
-        "Transfer-Encoding: chunked\r\n"
-        "Content-Length: 7\r\n"
-        "Content-Range: bytes 0-6/7\r\n"
-        "\r\n"
-        "7\r\n"
-        "content\r\n"
-    );
-    REQUIRE_RC( KFileTimedRead ( m_file, 0, buf, sizeof buf, &num_read, NULL ) );
-    REQUIRE_EQ( string ( "content" ), string ( buf, num_read ) );
-}
-#endif
-
-//////////////////////////
-// Reliable HTTP request
-FIXTURE_TEST_CASE(HttpReliableRequest_Make, HttpFixture)
-{
-    KClientHttpRequest *req;
-    KNSManagerMakeReliableClientRequest ( m_mgr, &req, 0x01010000, & m_stream, MakeURL(GetName()).c_str()  );
-    REQUIRE_NOT_NULL ( req ) ;
-    REQUIRE_RC ( KClientHttpRequestRelease ( req ) );
-}
-
-FIXTURE_TEST_CASE(HttpReliableRequest_POST_5xx_retry, HttpFixture)
-{   // use default configuration for 5xx to be retried
-    KClientHttpRequest *req;
-    KNSManagerMakeReliableClientRequest ( m_mgr, &req, 0x01010000, & m_stream, MakeURL(GetName()).c_str()  );
-
-    TestStream::AddResponse("HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\n"); // response to GET
-    TestStream::AddResponse("HTTP/1.1 200 OK\r\n");
-
-    KClientHttpResult *rslt;
-    REQUIRE_RC ( KClientHttpRequestPOST ( req, & rslt ) );
-
-    REQUIRE_RC ( KClientHttpResultRelease ( rslt ) );
-    REQUIRE_RC ( KClientHttpRequestRelease ( req ) );
-}
-
-#endif
-
-/* VDB-3059: KHttpRequestPOST generates incorrect Content-Length after retry :
- it makes web server to return 400 Bad Request */
-TEST_CASE(ContentLength) {
-    rc_t rc = 0;
-    KNSManager * kns = NULL;
-    REQUIRE_RC ( KNSManagerMake ( & kns ) );
-
-    uint32_t code = 0;
-    KHttpRequest * req = NULL;
-    KHttpResult * rslt = NULL;
-    KStream * response = NULL;
-
-    /* calling good cgi returns 200 and resolved path */
-    REQUIRE_RC ( KNSManagerMakeReliableClientRequest ( kns, & req, 0x01000000,
-        NULL, "http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi" ) ); 
-    REQUIRE_RC ( KHttpRequestAddPostParam ( req, "acc=AAAB01" ) );
-    REQUIRE_RC ( KHttpRequestPOST ( req, & rslt ) );
-    REQUIRE_RC ( KClientHttpResultStatus ( rslt, & code, NULL, 0, NULL ) );
-    REQUIRE_EQ ( code, 200u );
-    REQUIRE_RC ( KHttpResultGetInputStream ( rslt, & response ) );
-    char buffer [ 512 ] = "";
-    size_t num_read = 0;
-    REQUIRE_RC (KStreamRead( response, buffer, sizeof buffer - 1,  &num_read ));
-    REQUIRE_LT ( num_read, sizeof buffer );
-    buffer [ num_read ] = '\0';
-    REQUIRE_EQ ( string ( buffer + num_read - 7 ), string ( "200|ok\n" ) );
-    RELEASE ( KStream, response );
-    RELEASE ( KHttpResult, rslt );
-    RELEASE ( KHttpRequest, req );
-
-    /* calling non-existing cgi returns 404 */
-    REQUIRE_RC ( KNSManagerMakeReliableClientRequest ( kns, & req, 0x01000000,
-        NULL, "http://www.ncbi.nlm.nih.gov/Traces/names/bad.cgi" ) ); 
-    REQUIRE_RC ( KHttpRequestAddPostParam ( req, "acc=AAAB01" ) );
-    REQUIRE_RC ( KHttpRequestPOST ( req, & rslt ) );
-    REQUIRE_RC ( KClientHttpResultStatus ( rslt, & code, NULL, 0, NULL ) );
-    REQUIRE_EQ ( code, 404u );
-    RELEASE ( KHttpResult, rslt );
-    RELEASE ( KHttpRequest, req );
-
-    RELEASE ( KNSManager, kns );
-    REQUIRE_RC ( rc );
-}
-
-//////////////////////////////////////////// Main
-
-static rc_t argsHandler ( int argc, char * argv [] ) {
-    Args * args = NULL;
-    rc_t rc = ArgsMakeAndHandle ( & args, argc, argv, 0, NULL, 0 );
-    ArgsWhack ( args );
-    return rc;
-}
-
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-#include <klib/debug.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-const char UsageDefaultName[] = "test-http";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-
-	// this makes messages from the test code appear
-	// (same as running the executable with "-l=message")
-	// TestEnv::verbosity = LogLevel::e_message;
-	
-    rc_t rc=HttpTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/kns/knstest.cpp b/test/kns/knstest.cpp
deleted file mode 100644
index 564cae3..0000000
--- a/test/kns/knstest.cpp
+++ /dev/null
@@ -1,1074 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for KNS interfaces
-*/
-
-#include <ktst/unit_test.hpp>
-
-#include <klib/rc.h>
-#include <klib/log.h>
-
-#include <klib/printf.h>
-
-#include <kns/manager.h>
-#include <kns/endpoint.h>
-#include <kns/stream.h>
-#include <kns/adapt.h>
-#include <kns/socket.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-
-#include <kproc/thread.h>
-#include <kproc/timeout.h>
-
-#include <os-native.h>
-
-#include <sysalloc.h>
-#include <stdexcept>
-#include <cstring>
-#include <algorithm>
-#include <sstream>
-
-TEST_SUITE(KnsTestSuite);
-
-using namespace std;
-using namespace ncbi::NK;
-
-//////////////////////////////////////////// KStream
-class KnsStreamFixture
-{
-public:
-    KnsStreamFixture ()
-        : dir ( 0 ), strm ( 0 ), file ( 0 ), name ("./adapter-test.txt")
-        {
-            write_buffer = "something nice";
-
-            THROW_ON_RC (  KDirectoryNativeDir ( &dir ) );
-            KDirectoryRemove ( dir, true, name );
-            THROW_ON_RC ( KDirectoryCreateFile ( dir, &file, false, 0664, kcmCreate, name ) );
-        }
-    ~KnsStreamFixture ()
-        {                    
-            if ( strm )
-                THROW_ON_RC ( KStreamRelease ( strm ) );
-            if ( file )
-                THROW_ON_RC ( KFileRelease ( file ) );
-            if ( dir )
-            {
-                THROW_ON_RC ( KDirectoryRemove ( dir, true, name ) );
-                THROW_ON_RC ( KDirectoryRelease ( dir ) );
-            }
-        }
-
-    KDirectory *dir;
-    KStream *strm;
-    KFile *file;
-    size_t numRead, numWrit;
-    const char *write_buffer;
-    char read_buffer [ 256 ];
-    const char *name;
-};
-
-FIXTURE_TEST_CASE ( KStreamAdaptersFileWriteOnly, KnsStreamFixture )
-{   
-
-    REQUIRE_RC ( KStreamFromKFilePair ( & strm, NULL, file ) );
-    REQUIRE_RC ( KStreamWrite ( strm, write_buffer, strlen ( write_buffer ), & numWrit ) );
-    
-    KFileRelease ( file );
-
-    REQUIRE_RC ( KDirectoryOpenFileRead ( dir, ( const KFile ** ) & file, name ) );
-    REQUIRE_RC ( KFileRead ( file, 0, read_buffer, sizeof read_buffer, & numRead ) );
-    
-    REQUIRE_EQ ( numRead, numWrit );
-    REQUIRE_EQ ( strncmp ( write_buffer, read_buffer, numRead ), 0 );
-
-}
-
-FIXTURE_TEST_CASE ( KStreamAdaptersFileReadOnly, KnsStreamFixture )
-{   
-
-    REQUIRE_RC ( KFileWrite ( file, 0,  write_buffer, strlen ( write_buffer ), &numWrit ) );
-    
-    KFileRelease ( file );
-
-    REQUIRE_RC ( KDirectoryOpenFileRead ( dir, ( const KFile ** ) & file, name ) );
-    REQUIRE_RC ( KStreamFromKFilePair ( & strm, file, NULL ) );
-    REQUIRE_RC ( KStreamRead ( strm, read_buffer, sizeof read_buffer, & numRead ) );
-    
-    REQUIRE_EQ ( numRead, numWrit );
-    REQUIRE_EQ ( strncmp ( write_buffer, read_buffer, numRead ), 0 );
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////// IPC connections
-
-TEST_CASE(KnsManagerMakeRelease)
-{   
-    KNSManager* mgr;
-    REQUIRE_RC(KNSManagerMake(&mgr)); 
-    REQUIRE_NOT_NULL(mgr);
-    REQUIRE_RC(KNSManagerRelease(mgr)); 
-}
-
-class KnsManagerFixture
-{
-public:
-    KnsManagerFixture()
-    : mgr(0)
-    {
-        THROW_ON_RC ( KNSManagerMake(&mgr) );
-    }
-    ~KnsManagerFixture()
-    {
-        if (mgr)
-            THROW_ON_RC ( KNSManagerRelease(mgr) );
-    }
-    
-    KNSManager* mgr;
-    
-    KEndPoint ep;
-    String name; 
-};
-
-FIXTURE_TEST_CASE(IPCEndpoint_Create, KnsManagerFixture)
-{
-    StringInitCString(&name, GetName());
-    REQUIRE_RC(KNSManagerInitIPCEndpoint(mgr, &ep, &name));
-    REQUIRE_EQ(ep.type, (KEndPointType)epIPC);
-    REQUIRE_EQ(string(ep.u.ipc_name), string(GetName()));
-}
-
-FIXTURE_TEST_CASE(MakeListener, KnsManagerFixture)
-{
-    CONST_STRING(&name, "socket");
-    REQUIRE_RC(KNSManagerInitIPCEndpoint(mgr, &ep, &name));
-    KListener* listener;
-    REQUIRE_RC(KNSManagerMakeListener( mgr, &listener, &ep ));
-    REQUIRE_NOT_NULL(listener);
-    KListenerRelease(listener);
-}   
-
-FIXTURE_TEST_CASE(MakeIPCConnection_NoListener, KnsManagerFixture)
-{
-    CONST_STRING(&name, "socket");
-    REQUIRE_RC(KNSManagerInitIPCEndpoint(mgr, &ep, &name));
-    KSocket* socket;
-    REQUIRE_RC_FAIL(KNSManagerMakeRetryConnection(mgr, &socket, 0, NULL, &ep)); /* no server; no retries */
-    REQUIRE_NULL(socket);
-}   
-
-//////////////////////////////////////////// IPC, non-timed reads and writes 
-
-const string SocketName = string("knstest") + TestEnv::GetPidString();
-
-class SocketFixture : public KnsManagerFixture
-{
-// Sets up a server thread. The server thread will:
-// - wait for an incoming message, 
-// - upon receiving the message, convert it to upper case 
-// - send the converted message back
-// - wait for an incoming message "done"
-// - shut down the IPC connection
-
-// Test cases' bodies represent client logic
-// The fixture on the client will send "done" from the destructor and close its IPC connection
-
-public:
-    typedef rc_t (*WorkerThreadFn) ( const KThread *self, void *data );
-    
-	static const size_t MaxMessageSize = 256; // for this suite, we will agree not to send messages longer that this
-    
-public:
-    SocketFixture()
-    : server(0), listener(0), threadWorker(0)
-    {
-        StringInitCString(&name, SocketName.c_str());
-        THROW_ON_RC (KNSManagerInitIPCEndpoint(mgr, &ep, &name) );
-
-        if ( ! TestEnv::in_child_process)
-        {   // start a server thread
-            LOG(LogLevel::e_message, "starting a server" << endl);
-        
-            if (KThreadMake ( &server, ServerThreadFn, this ) != 0 || server == 0)
-                throw logic_error ( "SocketFixture: KThreadMake failed" );
-        }
-        else
-            throw logic_error ( "SocketFixture() called from child" );
-    }
-    ~SocketFixture()
-    {
-        if ( ! TestEnv::in_child_process)
-        {
-            if (server)
-            {
-                LOG(LogLevel::e_message, "server stopping" << endl);    
-
-                THROW_ON_RC ( KThreadCancel(server) );
-                THROW_ON_RC ( KThreadWait(server, NULL) );
-                THROW_ON_RC ( KThreadRelease(server) );
-                THROW_ON_RC ( KThreadRelease(server) );/* for some reason KThread is initialized with refcout = 2 */
-                    
-                if (listener)
-                {   /* shutdown the (possibly blocked) listener */
-                    LOG(LogLevel::e_message, "server releasing the listener" << endl);    
-                    THROW_ON_RC ( KListenerRelease(listener) );
-                }
-            }
-        }
-        else
-            throw logic_error ( "~SocketFixture() called from child" );
-    }
-    static rc_t ServerThreadFn ( const KThread *self, void *data )  
-    {
-        try
-        {
-            SocketFixture* me = (SocketFixture*)data;
-            return me->Listen();
-        }
-        catch (const exception& ex)
-        {
-            cout << "SocketFixture server thread threw " << ex.what() << endl; 
-            throw;
-        }
-    }
-    
-    static string ToUpper(const string& str)
-    {
-        string ret(str);
-        transform(ret.begin(), ret.end(), ret.begin(), ::toupper);
-        return ret;
-    }   
-    
-    rc_t Listen()
-    {   
-        if (KNSManagerMakeListener ( mgr, &listener, &ep ) == 0)
-        {
-            rc_t rc = 0;
-            while (rc == 0)
-            {
-                LOG(LogLevel::e_message, "server listening" << endl);    
-                KSocket* socket;
-                rc = KListenerAccept ( listener, &socket ); // may not return from here if no more incoming connections for this test case
-                if (rc == 0)
-                {
-                    KStream* stream;
-                    THROW_ON_RC ( KSocketGetStream ( socket, & stream ) );
-                    THROW_ON_RC ( KSocketRelease ( socket ) );
-                    
-                    LOG(LogLevel::e_message, "server detected connection, starting worker" << endl);    
-                    KThread* worker;
-                    if (KThreadMake ( &worker, threadWorker == 0 ? DefaultWorkerThreadFn : threadWorker, stream) != 0 || worker == 0)
-                        throw logic_error ( "SocketFixture: KThreadMake failed" );
-                }
-            }
-            LOG(LogLevel::e_message, "server  exiting" << endl);    
-            return rc;
-        }
-        else
-            throw logic_error ( "SocketFixture: KNSMakeListener failed" );
-    }
-    
-    static rc_t DefaultWorkerThreadFn ( const KThread *self, void *data )  
-    {
-        try
-        {   // this server worker converts the incoming message to all uppercase and sends it back
-            LOG(LogLevel::e_message, "worker "  << (void*)self << " starting" << endl);    
-            
-            KStream* stream = (KStream*)data;
-            char localBuf[MaxMessageSize];
-            size_t num;
-            THROW_ON_RC (KStreamTimedRead(stream, localBuf, sizeof(localBuf), &num, NULL) ); // wait forever
-            LOG(LogLevel::e_message, "worker "  << (void*)self << " after KStreamRead(" << string(localBuf, num) << ")" << endl);    
-            
-            for (size_t i = 0 ; i < num; ++i)
-                localBuf[i] = toupper(localBuf[i]);
-                
-            THROW_ON_RC ( KStreamWrite(stream, localBuf, num, &num) );
-            LOG(LogLevel::e_message, "worker "  << (void*)self << " after KStreamWrite" << endl);    
-            
-            // wait until the reader says "done"
-            THROW_ON_RC ( KStreamTimedRead(stream, localBuf, sizeof(localBuf), &num, NULL) ); // wait forever
-
-            string doneMsg(localBuf, num);
-            LOG(LogLevel::e_message, "worker "  << (void*)self << " after KStreamRead = '" << doneMsg << "'" << endl);    
-            if (doneMsg != "done")
-                throw logic_error ( "SocketFixture worker: out of sequence message received: '" + doneMsg + "'" );
-            
-            LOG(LogLevel::e_message, "worker "  << (void*)self << " after KStreamRelease" << endl);    
-
-            THROW_ON_RC ( KStreamRelease(stream) );
-            LOG(LogLevel::e_message, "worker "  << (void*)self << " after KStreamRelease" << endl);    
-        }
-        catch (const exception& ex)
-        {
-            cout << "SocketFixture worker thread threw " << ex.what() << endl; 
-            throw;
-        }
-        LOG(LogLevel::e_message, "worker "  << (void*)self << " exiting" << endl);    
-        return KThreadRelease(self);
-    }
-    
-    void CloseClientStream(KStream* p_stream)
-    {
-        if (p_stream != 0)
-        {
-            // signal to server to shut down the connection
-            string done("done");
-            size_t num;
-            THROW_ON_RC ( KStreamTimedWrite(p_stream, done.c_str(), done.length(), &num, NULL) );
-            THROW_ON_RC ( KStreamRelease(p_stream) );
-        }
-    }
-    
-    KStream* MakeStream( int32_t p_retryTimeout )
-    {
-        KSocket* socket;
-        THROW_ON_RC ( KNSManagerMakeRetryConnection(mgr, &socket, p_retryTimeout, NULL, &ep) );
-        if (socket == 0)
-           throw logic_error ( "MakeStream: KStreamRelease failed" );
-           
-        KStream* stream;
-        THROW_ON_RC ( KSocketGetStream ( socket, & stream ) );
-        if (stream == 0)
-           throw logic_error ( "MakeStream: KStreamRelease failed" );
-        KSocketRelease ( socket );
-        
-        return stream;
-    }
-
-    KThread* server;
-    
-    // created by the listener thread
-    KListener* listener;
-    
-    // may be set by subclasses
-    WorkerThreadFn threadWorker;
-
-    // for use in test cases
-    size_t num;
-    char buf[MaxMessageSize];
-};
-
-PROCESS_FIXTURE_TEST_CASE(IPCEndpoint_Basic, SocketFixture, 0, 5)
-{   // client runs in a child process
-    string content = GetName();
-    
-    KStream* stream = MakeStream ( 50 ); /* this might make some retries while the server is setting up */
-    LOG(LogLevel::e_message, "client '" << GetName() << "' after KNSMakeConnection" << endl);    
-    
-    REQUIRE_RC(KStreamWrite(stream, content.c_str(), content.length(), &num));
-    LOG(LogLevel::e_message, "client after KStreamWrite" << endl);    
-    REQUIRE_EQ(content.length(), num);
-    
-    REQUIRE_RC(KStreamTimedRead(stream, buf, sizeof(buf), &num, NULL));
-    LOG(LogLevel::e_message, "client after KStreamRead" << endl);    
-    REQUIRE_EQ(string(buf, num), ToUpper(content));
-    
-    CloseClientStream(stream);
-}
-
-PROCESS_FIXTURE_TEST_CASE(IPCEndpoint_MultipleListeners, SocketFixture, 0, 100) 
-{   // client runs in a child process
-    
-    KStream* stream = MakeStream ( 50 ); /* this might make some retries while the server is setting up */
-    LOG(LogLevel::e_message, "client '" << GetName() << "' after KNSMakeConnection1" << endl);    
-
-    TestEnv::Sleep(1); // on Windows 32, when the two calls to KNSManagerMakeConnection follow too closely, sometimes things get messed up
-    
-    KStream* stream2 = MakeStream ( 5 ); /* should work from the first try now*/
-    LOG(LogLevel::e_message, "client '" << GetName() << "' after KNSMakeConnection2" << endl);    
-    
-    string content = string(GetName())+"_1";
-    REQUIRE_RC(KStreamWrite(stream, content.c_str(), content.length(), &num));
-    LOG(LogLevel::e_message, "client after KStreamWrite1" << endl);    
-    REQUIRE_EQ(content.length(), num);
-    
-    string content2(string(GetName())+"_2");
-    REQUIRE_RC(KStreamWrite(stream2, content2.c_str(), content2.length(), &num));
-    LOG(LogLevel::e_message, "client after KStreamWrite2" << endl);    
-    REQUIRE_EQ(content2.length(), num);
-    
-    REQUIRE_RC(KStreamTimedRead(stream2, buf, sizeof(buf), &num, NULL));
-    LOG(LogLevel::e_message, "client after KStreamRead2" << endl);    
-    REQUIRE_EQ(string(buf, num), ToUpper(content2));
-    
-    REQUIRE_RC(KStreamTimedRead(stream, buf, sizeof(buf), &num, NULL));
-    LOG(LogLevel::e_message, "client after KStreamRead1" << endl);    
-    REQUIRE_EQ(string(buf, num), ToUpper(content));
-    
-    CloseClientStream(stream);
-    CloseClientStream(stream2);
-}
-
-PROCESS_FIXTURE_TEST_CASE(IPCEndpoint_ReadAll, SocketFixture, 0, 5)
-{   // call ReadAll requesting more bytes than available, see it return only what is available
-    string content = GetName();
-    
-    KStream* stream = MakeStream ( 5 ); 
-    LOG(LogLevel::e_message, "client '" << GetName() << "' after KNSMakeConnection" << endl);    
-    
-    REQUIRE_RC(KStreamWrite(stream, content.c_str(), content.length(), &num));
-    LOG(LogLevel::e_message, "client after KStreamWrite" << endl);    
-    REQUIRE_EQ(content.length(), num);
-    
-    REQUIRE_RC(KStreamReadAll(stream, buf, content.length()*2, &num));
-    REQUIRE_EQ(content.length(), num);
-    
-    CloseClientStream(stream);
-}
-
-//////////////////////////////////////////// IPC, timed reads
-class TimedReadSocketFixture : public SocketFixture
-{
-// Sets up a server thread. The server thread will:
-// - wait for an incoming message, 
-// - upon receiving the message, convert it to upper case 
-// - (this is different from SocketFixture) sleep for SERVER_WRITE_DELAY_MS (the client can time out or wait, depending on the test case)
-// - send the converted message back
-// - wait for an incoming message "done"
-// - shut down the IPC connection
-
-// Test cases' bodies represent client logic
-// (this is different from SocketFixture) Call SetupClient() to initialize timeout value
-// The fixture on the client will send "done" from the destructor and close its IPC connection
-public:
-    static const uint32_t SERVER_WRITE_DELAY_MS = 2000;
-public:
-    TimedReadSocketFixture()
-    : m_stream(0)
-    {
-        threadWorker = StutteringWorkerThreadFn;
-    }
-    ~TimedReadSocketFixture()
-    {
-    }
-	
-	void SetupClient(const string& p_content)
-	{
-        LOG(LogLevel::e_message, "TimedReadSocketFixture::SetupClient(" + p_content + ")" << endl);    
-        StringInitCString(&name, SocketName.c_str());
-        if (KNSManagerInitIPCEndpoint(mgr, &ep, &name) != 0)
-			throw logic_error ( string("TimedReadSocketFixture: SetupClient(") + p_content + "), KNSManagerInitIPCEndpoint failed" );
-
-        m_stream = MakeStream ( 5 ); 
-        LOG(LogLevel::e_message, "client '" << p_content << "' after KNSMakeConnection" << endl);    
-	}
-	void SetupClient(const string& p_content, uint32_t p_timeoutMs)
-	{
-		TimeoutInit(&tm, p_timeoutMs);
-		SetupClient(p_content);
-	}
-	void TeardownClient()
-	{   
-        CloseClientStream(m_stream);
-    }
-
-    static rc_t StutteringWorkerThreadFn ( const KThread *self, void *data )  
-    {
-        try
-        {   // this server worker converts the incoming message to all uppercase, pauses for SERVER_WRITE_DELAY_MS, and sends it back
-            KStream* stream = (KStream*)data;
-            
-            char localBuf[MaxMessageSize];
-            size_t localNumRead;
-            THROW_ON_RC ( KStreamTimedRead(stream, localBuf, sizeof(localBuf), &localNumRead, NULL) ); // wait forever
-            if (localNumRead == 0)
-                throw logic_error ( "TimedReadSocketFixture worker: 0 bytes read" );
-            LOG(LogLevel::e_message, "worker "  << (void*)self << " after KStreamRead(" << string(localBuf, localNumRead) << ")" << endl);    
-            
-            for (size_t i = 0 ; i < localNumRead; ++i)
-                localBuf[i] = toupper(localBuf[i]);
-                
-            // send outgoing message after a pause for SERVER_WRITE_DELAY_MS 
-            LOG(LogLevel::e_message, "worker "  << (void*)self << " sleeping for " << SERVER_WRITE_DELAY_MS << " ms" << endl);    
-            TestEnv::SleepMs(SERVER_WRITE_DELAY_MS);
-
-            LOG(LogLevel::e_message, "worker "  << (void*)self << " writing " << localNumRead << " bytes" << endl);    
-            size_t localNumWrit;
-            THROW_ON_RC ( KStreamWrite(stream, localBuf, localNumRead, &localNumWrit) ); // localNumWrit may be 0 if the client is not reading, as in timeout cases
-            LOG(LogLevel::e_message, "worker "  << (void*)self << " after KStreamWrite" << endl);    
-            
-            // wait until the reader says "done"
-            LOG(LogLevel::e_message, "worker "  << (void*)self << " waiting for 'done'" << endl);    
-            THROW_ON_RC ( KStreamTimedRead(stream, localBuf, sizeof(localBuf), &localNumRead, NULL) ); // wait forever
-            
-            string doneMsg(localBuf, localNumRead);
-            LOG(LogLevel::e_message, "worker "  << (void*)self << " after KStreamRead = '" << doneMsg << "'" << endl);    
-            if (doneMsg != "done")
-                throw logic_error ( "SocketFixture worker: out of sequence message received: '" + doneMsg + "'" );
-
-            LOG(LogLevel::e_message, "worker "  << (void*)self << " closing stream" << endl);    
-            THROW_ON_RC ( KStreamRelease(stream) );
-            LOG(LogLevel::e_message, "worker "  << (void*)self << " after KStreamRelease" << endl);    
-        }
-        catch (const exception& ex)
-        {
-            cout << "TimedReadSocketFixture worker thread threw " << ex.what() << endl; 
-            throw;
-        }
-        LOG(LogLevel::e_message, "worker "  << (void*)self << " exiting" << endl);    
-        return KThreadRelease(self);
-    }
-
-    // for use in test cases
-    KStream* m_stream;
-    timeout_t tm;
-};
-
-////////////////////// 1. KNSManagerMakeConnection (no time-out specified), then use KStreamTimedRead/Write
-PROCESS_FIXTURE_TEST_CASE(TimedRead_NULL_Timeout, TimedReadSocketFixture, 0, 20)
-{   // 1.1. wait indefinitely until the server responds
-    string content = GetName();
-	SetupClient(content);
-	
-    REQUIRE_RC(KStreamTimedWrite(m_stream, content.c_str(), content.length(), &num, NULL)); // waits indefinitely
-    LOG(LogLevel::e_message, "client after KStreamWrite" << endl);    
-    REQUIRE_EQ(content.length(), num);
-    
-    REQUIRE_RC(KStreamTimedRead(m_stream, buf, sizeof(buf), &num, NULL)); // waits indefinitely
-    LOG(LogLevel::e_message, "client after KStreamRead" << endl);    
-    REQUIRE_EQ(string(buf, num), ToUpper(content));
-    
-	TeardownClient();
-}
-
-PROCESS_FIXTURE_TEST_CASE(TimedRead_0_Timeout, TimedReadSocketFixture, 0, 20)
-{   // 1.2. time out immediately when the server has not yet responded
-    string content = GetName();
-	SetupClient(content, 0); /* no wait */
-
-    REQUIRE_RC(KStreamTimedWrite(m_stream, content.c_str(), content.length(), &num, &tm)); // returns immediately if socket is not writeable
-    LOG(LogLevel::e_message, "client after KStreamWrite" << endl);    
-    REQUIRE_EQ(content.length(), num);
-    
-    rc_t rc = (KStreamTimedRead(m_stream, buf, sizeof(buf), &num, &tm)); // returns immediately if no data
-    
-    REQUIRE_RC_FAIL(rc);
-    REQUIRE_EQ(rc, RC(rcNS,rcFile,rcReading,rcTimeout,rcExhausted));
-    LOG(LogLevel::e_message, "client timed out on read, as expected" << endl);    
-
-    TestEnv::SleepMs(SERVER_WRITE_DELAY_MS * 2); // let the server wake up to handle the 'done' message
-	TeardownClient();
-}
-
-PROCESS_FIXTURE_TEST_CASE(TimedRead_Short_Timeout, TimedReadSocketFixture, 0, 20)
-{   // 1.3. time out when the server has not responded quickly enough
-    string content = GetName();
-	SetupClient(content, SERVER_WRITE_DELAY_MS / 2);
-	
-    REQUIRE_RC(KStreamTimedWrite(m_stream, content.c_str(), content.length(), &num, &tm)); // times out if socket is not writeable
-    LOG(LogLevel::e_message, "client after KStreamWrite" << endl);    
-    REQUIRE_EQ(content.length(), num);
-    
-    rc_t rc = (KStreamTimedRead(m_stream, buf, sizeof(buf), &num, &tm)); // returns after timing out
-    REQUIRE_RC_FAIL(rc);
-    REQUIRE_EQ(rc, RC(rcNS,rcFile,rcReading,rcTimeout,rcExhausted));
-    LOG(LogLevel::e_message, "client timed out on read, as expected" << endl);    
-    
-    TestEnv::SleepMs(SERVER_WRITE_DELAY_MS * 2); // let the server wake up to handle the 'done' message
-	TeardownClient();
-}
-
-PROCESS_FIXTURE_TEST_CASE(TimedRead_Long_Timeout, TimedReadSocketFixture, 0, 20)
-{   // 1.4. wait enough time time for the server to respond
-    string content = GetName();
-	SetupClient(content, SERVER_WRITE_DELAY_MS * 2);
-	
-    REQUIRE_RC(KStreamTimedWrite(m_stream, content.c_str(), content.length(), &num, &tm)); // times out if socket is not writeable
-    LOG(LogLevel::e_message, "client after KStreamWrite" << endl);    
-    REQUIRE_EQ(content.length(), num);
-    
-    REQUIRE_RC(KStreamTimedRead(m_stream, buf, sizeof(buf), &num, &tm)); // should not time out
-    LOG(LogLevel::e_message, "client after KStreamRead" << endl);    
-    REQUIRE_EQ(string(buf, num), ToUpper(content));
-
-	TeardownClient();
-}
-
-////////////////////// 2. KNSManagerMakeTimedConnection, then use KStreamRead/Write, or override using TimedRead/Write,
-//////////////////////      or override using KNSManagerSetConnectionTimeouts
-class TimedConnection_ReadSocketFixture : public TimedReadSocketFixture
-{   // same as TimedReadSocketFixture but creates times connections as opposed to 
-    // issuing timed reads/writes
-public:
-	void SetupClient(const string& p_content, int32_t p_readMillis, int32_t p_writeMillis)
-	{   // same as TimedReadSocketFixture::SetupClient but calls KNSManagerMakeTimedConnection instead of KNSManagerMakeConnection
-        StringInitCString(&name, SocketName.c_str());
-        if (KNSManagerInitIPCEndpoint(mgr, &ep, &name) != 0)
-			throw logic_error ( string("TimedConnection_ReadSocketFixture: SetupClient(") + p_content + "), KNSManagerInitIPCEndpoint failed" );
-    
-        m_stream = MakeStreamTimed( 5, p_readMillis, p_writeMillis );
-        LOG(LogLevel::e_message, "client '" << p_content << "' after KNSMakeConnection" << endl);    
-	}
-
-    KStream* MakeStreamTimed( int32_t p_retryTimeout, int32_t p_readMillis, int32_t p_writeMillis  )
-    {
-        KSocket* socket;
-        THROW_ON_RC ( KNSManagerMakeRetryTimedConnection(mgr, &socket, p_retryTimeout, p_readMillis, p_writeMillis, NULL, &ep) );
-        if (socket == 0)
-           throw logic_error ( "MakeStreamTimed: KStreamRelease failed" );
-           
-        KStream* stream;
-        THROW_ON_RC ( KSocketGetStream ( socket, & stream ) );
-        if (stream == 0)
-           throw logic_error ( "MakeStreamTimed: KStreamRelease failed" );
-        KSocketRelease ( socket );
-        
-        return stream;
-    }    
-};
-
-PROCESS_FIXTURE_TEST_CASE(TimedConnection_Read_NULL_Timeout, TimedConnection_ReadSocketFixture, 0, 20)
-{   // 2.1. wait indefinitely until the server responds
-    string content = GetName();
-	SetupClient(content, -1, -1); // wait indefinitely
-	
-    REQUIRE_RC(KStreamWrite(m_stream, content.c_str(), content.length(), &num)); 
-    LOG(LogLevel::e_message, "client after KStreamWrite" << endl); // waits indefinitely   
-    REQUIRE_EQ(content.length(), num);
-    
-    REQUIRE_RC(KStreamRead(m_stream, buf, sizeof(buf), &num)); // waits indefinitely
-    LOG(LogLevel::e_message, "client after KStreamRead" << endl);    
-    REQUIRE_EQ(string(buf, num), ToUpper(content));
-    
-	TeardownClient();
-}
-PROCESS_FIXTURE_TEST_CASE(TimedConnection_TimedReadOverride_NULL_Timeout, TimedConnection_ReadSocketFixture, 0, 20)
-{   // 2.1.1 wait indefinitely until the server responds
-    string content = GetName();
-	SetupClient(content, 0, 0); // the connection is created as no-wait
-                            // but the reads/writes override that with "wait indefinitely"
-    
-    REQUIRE_RC(KStreamTimedWrite(m_stream, content.c_str(), content.length(), &num, NULL)); // waits indefinitely
-    LOG(LogLevel::e_message, "client after KStreamWrite" << endl);    
-    REQUIRE_EQ(content.length(), num);
-    
-    REQUIRE_RC(KStreamTimedRead(m_stream, buf, sizeof(buf), &num, NULL)); // waits indefinitely
-    LOG(LogLevel::e_message, "client after KStreamRead" << endl);    
-    REQUIRE_EQ(string(buf, num), ToUpper(content));
-    
-	TeardownClient();
-}
-
-PROCESS_FIXTURE_TEST_CASE(TimedConnection_Read_0_Timeout, TimedConnection_ReadSocketFixture, 0, 20)
-{   // 2.2. time out immediately when the server has not yet responded
-    string content = GetName();
-	SetupClient(content, 0, 0); /* no wait */
-
-    REQUIRE_RC(KStreamWrite(m_stream, content.c_str(), content.length(), &num)); // returns immediately if socket is not writeable
-    LOG(LogLevel::e_message, "client after KStreamWrite" << endl);    
-    REQUIRE_EQ(content.length(), num);
-    
-    rc_t rc = (KStreamRead(m_stream, buf, sizeof(buf), &num)); // returns immediately if no data
-    
-    REQUIRE_RC_FAIL(rc);
-    REQUIRE_EQ(rc, RC(rcNS,rcFile,rcReading,rcTimeout,rcExhausted));
-    LOG(LogLevel::e_message, "client timed out on read, as expected" << endl);    
-    
-    TestEnv::SleepMs(SERVER_WRITE_DELAY_MS * 2); // let the server wake up to handle the 'done' message
-	TeardownClient();
-}
-PROCESS_FIXTURE_TEST_CASE(TimedConnection_ReadOverride_0_Timeout, TimedConnection_ReadSocketFixture, 0, 20)
-{   // 2.2.1 time out immediately when the server has not yet responded
-    string content = GetName();
-	SetupClient(content, -1, -1);   // the connection is created as "wait indefinitely"
-    TimeoutInit(&tm, 0);       // but the reads/writes override that with "no wait"
-
-    REQUIRE_RC(KStreamTimedWrite(m_stream, content.c_str(), content.length(), &num, &tm)); // returns immediately if socket is not writeable
-    LOG(LogLevel::e_message, "client after KStreamWrite" << endl);    
-    REQUIRE_EQ(content.length(), num);
-    
-    rc_t rc = (KStreamTimedRead(m_stream, buf, sizeof(buf), &num, &tm)); // returns immediately if no data
-    
-    REQUIRE_RC_FAIL(rc);
-    REQUIRE_EQ(rc, RC(rcNS,rcFile,rcReading,rcTimeout,rcExhausted));
-    LOG(LogLevel::e_message, "client timed out on read, as expected" << endl);    
-    
-    TestEnv::SleepMs(SERVER_WRITE_DELAY_MS * 2); // let the server wake up to handle the 'done' message
-	TeardownClient();
-}
-PROCESS_FIXTURE_TEST_CASE(TimedConnection_SettingsOverride_0_Timeout, TimedConnection_ReadSocketFixture, 0, 20)
-{   // 2.2.2 time out immediately when the server has not yet responded
-    REQUIRE_RC(KNSManagerSetConnectionTimeouts(mgr, 5, 0, 0)); // override default setting (long time-out) to "no wait"
-    string content = GetName();
-	TimedReadSocketFixture::SetupClient(content); 
-
-    REQUIRE_RC(KStreamWrite(m_stream, content.c_str(), content.length(), &num)); // returns immediately if socket is not writeable
-    LOG(LogLevel::e_message, "client after KStreamWrite" << endl);    
-    REQUIRE_EQ(content.length(), num);
-    
-    rc_t rc = (KStreamRead(m_stream, buf, sizeof(buf), &num)); // returns immediately if no data
-    
-    REQUIRE_RC_FAIL(rc);
-    REQUIRE_EQ(rc, RC(rcNS,rcFile,rcReading,rcTimeout,rcExhausted));
-    LOG(LogLevel::e_message, "client timed out on read, as expected" << endl);    
-    
-    TestEnv::SleepMs(SERVER_WRITE_DELAY_MS * 2); // let the server wake up to handle the 'done' message
-	TeardownClient();
-}
-
-PROCESS_FIXTURE_TEST_CASE(TimedConnection_Read_Short_Timeout, TimedConnection_ReadSocketFixture, 0, 20)
-{   // 2.3. time out when the server has not responded quickly enough
-    string content = GetName();
-	SetupClient(content, SERVER_WRITE_DELAY_MS / 2, SERVER_WRITE_DELAY_MS / 2);
-	
-    REQUIRE_RC(KStreamWrite(m_stream, content.c_str(), content.length(), &num)); // times out if socket is not writeable
-    LOG(LogLevel::e_message, "client after KStreamWrite" << endl);    
-    REQUIRE_EQ(content.length(), num);
-    
-    rc_t rc = (KStreamRead(m_stream, buf, sizeof(buf), &num)); // returns after timing out
-    REQUIRE_RC_FAIL(rc);
-    REQUIRE_EQ(rc, RC(rcNS,rcFile,rcReading,rcTimeout,rcExhausted));
-    LOG(LogLevel::e_message, "client timed out on read, as expected" << endl);    
-    
-    TestEnv::SleepMs(SERVER_WRITE_DELAY_MS * 2); // let the server wake up to handle the 'done' message
-	TeardownClient();
-}
-PROCESS_FIXTURE_TEST_CASE(TimedConnection_ReadOverride_Short_Timeout, TimedConnection_ReadSocketFixture, 0, 20)
-{   // 2.3.1. time out when the server has not responded quickly enough
-    string content = GetName();
-	SetupClient(content, -1, -1);                       // the connection is created as "wait indefinitely"
-    TimeoutInit(&tm, SERVER_WRITE_DELAY_MS / 2);    // but the reads/writes override that with a short time-out
-	
-    REQUIRE_RC(KStreamTimedWrite(m_stream, content.c_str(), content.length(), &num, &tm)); // times out if socket is not writeable
-    LOG(LogLevel::e_message, "client after KStreamWrite" << endl);    
-    REQUIRE_EQ(content.length(), num);
-    
-    rc_t rc = (KStreamTimedRead(m_stream, buf, sizeof(buf), &num, &tm)); // returns after timing out
-    REQUIRE_RC_FAIL(rc);
-    REQUIRE_EQ(rc, RC(rcNS,rcFile,rcReading,rcTimeout,rcExhausted));
-    LOG(LogLevel::e_message, "client timed out on read, as expected" << endl);    
-    
-    TestEnv::SleepMs(SERVER_WRITE_DELAY_MS * 2); // let the server wake up to handle the 'done' message
-	TeardownClient();
-}
-
-PROCESS_FIXTURE_TEST_CASE(TimedConnection_Read_Long_Timeout, TimedConnection_ReadSocketFixture, 0, 20)
-{   // 2.4. wait enough time for the server to respond
-    string content = GetName();
-	SetupClient(content, SERVER_WRITE_DELAY_MS * 2, SERVER_WRITE_DELAY_MS * 2);
-	
-    REQUIRE_RC(KStreamWrite(m_stream, content.c_str(), content.length(), &num)); // times out if socket is not writeable
-    LOG(LogLevel::e_message, "client after KStreamWrite" << endl);    
-    REQUIRE_EQ(content.length(), num);
-    
-    REQUIRE_RC(KStreamRead(m_stream, buf, sizeof(buf), &num)); // should not time out
-    LOG(LogLevel::e_message, "client after KStreamRead" << endl);    
-    REQUIRE_EQ(string(buf, num), ToUpper(content));
-    
-	TeardownClient();
-}
-PROCESS_FIXTURE_TEST_CASE(TimedConnection_ReadOverride_Long_Timeout, TimedConnection_ReadSocketFixture, 0, 20)
-{   // 2.4.1. wait enough time for the server to respond
-    string content = GetName();
-	SetupClient(content, 0, 0);                         // the connection is created as "no wait"
-    TimeoutInit(&tm, SERVER_WRITE_DELAY_MS * 2);    // but the reads/writes override that with a sufficient time-out
-	
-    REQUIRE_RC(KStreamTimedWrite(m_stream, content.c_str(), content.length(), &num, &tm)); // times out if socket is not writeable
-    LOG(LogLevel::e_message, "client after KStreamWrite" << endl);    
-    REQUIRE_EQ(content.length(), num);
-    
-    REQUIRE_RC(KStreamTimedRead(m_stream, buf, sizeof(buf), &num, &tm)); // should not time out
-    LOG(LogLevel::e_message, "client after KStreamRead" << endl);    
-    REQUIRE_EQ(string(buf, num), ToUpper(content));
-    
-	TeardownClient();
-}
-
-//////////////////////////////////////////// IPC, timed writes
-class TimedWriteSocketFixture : public SocketFixture
-{
-// There will be 2 IPC connections between the server and the client, a data channel and a control channel
-// The server will not read from the data channel until the client sends "go" through the control channel
-// The clients will write to the data channel until it overflows (thus setting up subsequent timed writes to wait), 
-//  then send "go" as required by the test case's logic
-public:
-    static const size_t SERVER_WRITE_DELAY_MS = 2000;
-public:
-    TimedWriteSocketFixture()
-    : m_data(0), m_control(0)
-    {
-		go = false;
-        threadWorker = TimedWriteServerFn;
-    }
-    ~TimedWriteSocketFixture()
-    {
-        
-    }
-	
-	void SetupClient(const string& p_name)
-	{
-        StringInitCString(&name, SocketName.c_str());
-        if (KNSManagerInitIPCEndpoint(mgr, &ep, &name) != 0)
-			throw logic_error ( string("TimedWriteSocketFixture: SetupClient(") + p_name + "), KNSManagerInitIPCEndpoint failed" );
-    
-        m_data = MakeStream ( 5 );
-        m_control = MakeStream ( 5 );
-			
-		// identify data/control channels to the server
-		WriteMessage(m_data, "data");
-		WriteMessage(m_control, "ctrl");
-        
-        LOG(LogLevel::e_message, "client '" << p_name << "' waiting for server to send 'ready'" << endl);    
-        string message = ReadMessage(m_control, 5, -1);
-        if (message != "ready")
-			throw logic_error ( "TimedWriteSocketFixture: ReadMessage('ready') failed" );
-
-        LOG(LogLevel::e_message, "client '" << p_name << "' after KNSMakeConnection" << endl);    
-	}
-    
-	void TeardownClient()
-    {
-        CloseClientStream(m_data);
-        CloseClientStream(m_control);
-    }
-    
-	static string ReadMessage(KStream* p_stream, size_t size = 0, int p_timeoutMs = -1)
-	{
-		char localBuf[MaxMessageSize];
-		size_t num;
-        timeout_t tm;
-        tm.mS = p_timeoutMs;
-		THROW_ON_RC ( KStreamTimedRead(p_stream, localBuf, size == 0 ? sizeof(localBuf) : size, &num, p_timeoutMs == -1 ? NULL : &tm) );
-		
-		return string(localBuf, num);
-	}
-	static bool TryReadMessage(KStream* p_stream)
-	{
-		char localBuf[MaxMessageSize];
-		size_t num;
-        timeout_t tm;
-        tm.mS = 1000; 
-		return KStreamTimedRead(p_stream, localBuf, sizeof(localBuf), &num, &tm) == 0;
-	}
-	static rc_t WriteMessage(KStream* p_stream, const string& p_msg, int p_timeoutMs = -1)
-	{
-		size_t num;
-        timeout_t tm;
-        tm.mS = p_timeoutMs;
-        LOG(LogLevel::e_message, "WriteMessage, timeout=" << p_timeoutMs << "ms" << endl);    
-		return KStreamTimedWrite(p_stream, p_msg.c_str(), p_msg.size(), &num, p_timeoutMs == -1 ? NULL : &tm);
-	}
-
-	static volatile bool go;
-    static rc_t TimedWriteServerFn ( const KThread *self, void *data )  
-    {
-        // this function does not always exit, so using STL string in this function leads to occasional leaks.
-        // for this reason, C strings are used for local variables (STL temporaries seems to be ok)
-        char prefix[1024];
-        string_printf ( prefix, sizeof prefix, NULL, "TimedWriteSocketFixture worker %p: ", (void*)self );
-        
-        try
-        {
-            KStream* stream = (KStream*)data;
-            
-            // local STL string here leaks somehow; use C string for now
-			// string message = ReadMessage(stream, 4, 1000);
-            char message[MaxMessageSize];
-            size_t num;
-            timeout_t tm;
-            tm.mS = 1000;
-            THROW_ON_RC ( KStreamTimedRead(stream, message, 4, &num, &tm) );
-            
-            LOG(LogLevel::e_message, (string(prefix) + " after KStreamRead(" + message + ")\n"));    
-			if (string(message, num) == "data")
-			{	// from now on, wait until control thread allows us to read
-                LOG(LogLevel::e_message, "data thread waiting for 'go'\n");
-				while (!go)
-				{
-                    LOG(LogLevel::e_message, "data thread waiting for 'go'\n");
-					TestEnv::SleepMs(1);
-				}
-                LOG(LogLevel::e_message, "data thread received 'go'\n");
-                // consume the input messages and go away
-                LOG(LogLevel::e_message, "un-flooding data channel\n");
-                size_t every=0;
-				while (TryReadMessage(stream))
-                {
-                    if (every == 0) 
-                    {
-                        LOG(LogLevel::e_message, "still un-flooding data channel...\n");
-                        every=5000;
-                    }
-                    else
-                        --every;
-				}
-                LOG(LogLevel::e_message, "data thread complete\n");
-            }
-			else if (string(message, num) == "ctrl")
-			{	// when received "go", allow the data thread to read
-                WriteMessage(stream, "ready", -1);
-            
-				while (true)
-				{
-					string ctrlMessage = ReadMessage(stream, 4, 10000);
-					if (ctrlMessage == "gogo")
-                    {
-                        LOG(LogLevel::e_message, "control thread received 'gogo'\n");
-						go = true;
-                    }
-					else if (ctrlMessage == "done")
-					{
-                        LOG(LogLevel::e_message, "control thread received 'done'\n");
-						break;
-					}
-				}
-                LOG(LogLevel::e_message, "control thread complete\n");
-			}
-			else
-                throw logic_error ( string(prefix) + "unexpected message\n" );
-				
-			THROW_ON_RC ( KStreamRelease(stream) );
-		}
-        catch (const exception& ex)
-        {
-            cout << (string(prefix) + "threw " + ex.what() +"\n"); 
-            throw;
-        }
-        catch (...)
-        {
-            cout << (string(prefix) + "threw something\n"); 
-            throw;
-        }
-        LOG(LogLevel::e_message, (string(prefix) + " exiting\n"));  
-        return KThreadRelease(self);
-    }
-
-    // for use in test cases (=client code)
-	void FloodDataChannel()
-	{
-        LOG(LogLevel::e_message, "flooding" << endl);    
-		char localBuf[MaxMessageSize];
-        memset(localBuf, 0xab, sizeof(localBuf)); // to keep valgrind happy
-		size_t num;
-        struct timeout_t tm;
-        tm.mS = 0; /* do not wait */
-		while (true)
-		{
-			LOG(LogLevel::e_message, "writing " << MaxMessageSize << " bytes\n");    
-			rc_t rc = KStreamTimedWrite(m_data, localBuf, sizeof(localBuf), &num, &tm);
-			if (rc != 0)
-			{
-				LOG(LogLevel::e_message, "KStreamWrite failed - flooding complete\n");    
-				break;
-			}
-			if (num != sizeof(localBuf))
-			{
-				LOG(LogLevel::e_message, "written " << num << " bytes, expected " << sizeof(localBuf) << endl);    
-				break;
-			}
-		}
-	}
-	
-    KStream* m_data;
-    KStream* m_control;
-};
-
-volatile bool TimedWriteSocketFixture::go = false;
-
-//  1. flood the socket, see KStreamTimedWrite time out
-PROCESS_FIXTURE_TEST_CASE(TimedWrite_Short_Timeout, TimedWriteSocketFixture, 0, 20)
-{   
-	SetupClient(GetName());
-	FloodDataChannel(); // the last WriteMessage(data) failed since nobody is reading from the server side
-    
-    /* important: attempt to write at least as many bytes as a block used by FloodDataChannel , otherwise this write has a chance to succeed */
-	rc_t rc = WriteMessage(m_data, string(MaxMessageSize, 'z'), 0);  /* do not wait */
-    REQUIRE_RC_FAIL(rc);
-    REQUIRE_EQ(rc, RC(rcNS,rcFile,rcWriting,rcTimeout,rcExhausted));
-    
-	REQUIRE_RC(WriteMessage(m_control, "gogo", 0)); // signal the server to start reading
-    // the data channel is no longer flooded; give the server time to empty the pipe and finish
-    TestEnv::SleepMs(100);
-    
-    TeardownClient();
-}
-
-//  2. flood the socket, see KStreamTimedWrite wait indefinitely
-PROCESS_FIXTURE_TEST_CASE(TimedWrite_NULL_Timeout, TimedWriteSocketFixture, 0, 20)
-{
-	SetupClient(GetName());
-	FloodDataChannel(); // the last WriteMessage(data) failed since nobody is reading from the server side
-    
-	REQUIRE_RC(WriteMessage(m_control, "gogo", 0)); // signal the server to start reading
-
-	REQUIRE_RC(WriteMessage(m_data, "something", -1)); // this should wait for the server to un-flood the data channel
-
-    // the data channel is no longer flooded; give the server time to empty the pipe and finish
-    TestEnv::SleepMs(100);
-
-    TeardownClient();
-}
-
-//  TODO: KStreamReadAll, KStreamTimedReadAll, 
-//	TODO: KStreamWriteAll, KStreamTimedWriteAll, 
-
-//  TODO: KStreamReadExactly, KStreamTimedReadExactly
-//  TODO: KStreamWriteExactly, KStreamTimedWriteExactly
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-#include <klib/debug.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-const char UsageDefaultName[] = "test-kns";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-
-	// uncomment to see messages from socket code
-    // KDbgSetModConds ( DBG_KNS, DBG_FLAG ( DBG_KNS_SOCKET ), DBG_FLAG ( DBG_KNS_SOCKET ) );
-
-	// this makes messages from the test code appear
-	// (same as running the executable with "-l=message")
-	//TestEnv::verbosity = LogLevel::e_message;
-	
-    rc_t rc=KnsTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/kns/nih_1_out.txt b/test/kns/nih_1_out.txt
deleted file mode 100644
index 50fca93..0000000
--- a/test/kns/nih_1_out.txt
+++ /dev/null
@@ -1,277 +0,0 @@
-HTTP/1.1 200 OK
-Date: Mon, 06 May 2013 20:06:38 GMT
-Server: Apache
-Cache-Control: private
-NCBI-SID: CE8903371880D4E1_0008SID
-Content-Type: text/html; charset=UTF-8
-Set-Cookie: ncbi_sid=CE8903371880D4E1_0008SID; domain=.nih.gov; path=/; expires=Tue, 06 May 2014 20:06:38 GMT
-Set-Cookie: WebEnv=1leg_Y%40CE8903371880D4E1_0008SID; domain=.nlm.nih.gov; path=/; expires=Tue, 07 May 2013 04:06:39 GMT
-Vary: Accept-Encoding
-Transfer-Encoding: chunked
-
-1d76
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-    <head xmlns:xi="http://www.w3.org/2001/XInclude"><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <!-- meta -->
-    <meta name="robots" content="index,nofollow,noarchive" />
-<meta name="ncbi_app" content="entrez" /><meta name="ncbi_db" content="biosample" /><meta name="ncbi_op" content="page_view" /><meta name="ncbi_pdid" content="home" /><meta name="ncbi_sessionid" content="CE8903371880D4E1_0008SID" /><meta name="ncbi_stat" content="false" /><meta name="ncbi_hitstat" content="false" />
-
-    
-    <!-- title -->
-    <title>Home - BioSample - NCBI</title>
-    
-    <!-- Common JS and CSS -->
-    
-		<script type="text/javascript">
-		    var ncbi_startTime = new Date();
-		</script>
-		<script type="text/javascript" src="//static.pubmed.gov/core/jig/1.12.1/js/jig.min.js"></script>
-			
-				<script type="text/javascript" src="/core/lw/2.0/js/esummary.1.js"></script>
-            
-		  
-    
-    <link xmlns="http://www.w3.org/1999/xhtml" type="text/css" rel="stylesheet" href="//static.pubmed.gov/portal/portal3rc.fcgi/3837828/css/3811509/3579733.css" xml:base="http://127.0.0.1/sites/static/header_footer/" /><link xmlns="http://www.w3.org/1999/xhtml" type="text/css" rel="stylesheet" href="//static.pubmed.gov/portal/portal3rc.fcgi/3837828/css/3529739.css" media="print" xml:base="http://127.0.0.1/sites/static/header_footer/" />    
-<link rel="shortcut icon" href="//www.ncbi.nlm.nih.gov/favicon.ico" /><meta name="ncbi_phid" content="CE8903371880D431000000000008E0A9" /><script type="text/javascript"><!--
-var ScriptUrl = 'http://www.ncbi.nlm.nih.gov/biosample';
-var ScriptPath = '/portal/';
-var objHierarchy = {"name":"EntrezSystem2","type":"Layout","realname":"EntrezSystem2",
-"children":[{"name":"EntrezSystem2.PEntrez","type":"Cluster","realname":"EntrezSystem2.PEntrez",
-"children":[{"name":"EntrezSystem2.PEntrez.DbConnector","type":"Portlet","realname":"EntrezSystem2.PEntrez.PEntrez.DbConnector","shortname":"DbConnector"},
-{"name":"EntrezSystem2.PEntrez.ParamContainer","type":"Portlet","realname":"EntrezSystem2.PEntrez.PEntrez.ParamContainer","shortname":"ParamContainer"},
-{"name":"EntrezSystem2.PEntrez.MyNcbi","type":"Portlet","realname":"EntrezSystem2.PEntrez.PEntrez.MyNcbi","shortname":"MyNcbi"},
-{"name":"EntrezSystem2.PEntrez.UserPreferenceUrlParamContainer","type":"Portlet","realname":"EntrezSystem2.PEntrez.PEntrez.UserPreferenceUrlParamContainer","shortname":"UserPreferenceUrlParamContainer"},
-{"name":"EntrezSystem2.PEntrez.GridProperty","type":"Portlet","realname":"EntrezSystem2.PEntrez.PEntrez.GridProperty","shortname":"GridProperty"},
-{"name":"EntrezSystem2.PEntrez.BioSample","type":"Cluster","realname":"EntrezSystem2.PEntrez.BioSample",
-"children":[{"name":"EntrezSystem2.PEntrez.BioSample.NoPortlet","type":"Portlet","realname":"EntrezSystem2.PEntrez.BioSample.Entrez_Database.NoPortlet","shortname":"NoPortlet"},
-{"name":"EntrezSystem2.PEntrez.BioSample.BioSample_PageController","type":"Portlet","realname":"EntrezSystem2.PEntrez.BioSample.BioSample_PageController","shortname":"BioSample_PageController"},
-{"name":"EntrezSystem2.PEntrez.BioSample.Entrez_SearchBar","type":"Portlet","realname":"EntrezSystem2.PEntrez.BioSample.Entrez_Database.Entrez_SearchBar","shortname":"Entrez_SearchBar"},
-{"name":"EntrezSystem2.PEntrez.BioSample.Entrez_BotRequest","type":"Portlet","realname":"EntrezSystem2.PEntrez.BioSample.Entrez_Database.Entrez_BotRequest","shortname":"Entrez_BotRequest"},
-{"name":"EntrezSystem2.PEntrez.BioSample.BioSample_LimitsTab","type":"Portlet","realname":"EntrezSystem2.PEntrez.BioSample.BioSample_LimitsTab","shortname":"BioSample_LimitsTab"},
-{"name":"EntrezSystem2.PEntrez.BioSample.Entrez_Facets","type":"Portlet","realname":"EntrezSystem2.PEntrez.BioSample.Entrez_Database.Entrez_Facets","shortname":"Entrez_Facets"},
-{"name":"EntrezSystem2.PEntrez.BioSample.Entrez_Clipboard","type":"Portlet","realname":"EntrezSystem2.PEntrez.BioSample.Entrez_Database.Entrez_Clipboard","shortname":"Entrez_Clipboard"},
-{"name":"EntrezSystem2.PEntrez.BioSample.BioSample_StaticParts","type":"Portlet","realname":"EntrezSystem2.PEntrez.BioSample.BioSample_StaticParts","shortname":"BioSample_StaticParts"},
-{"name":"EntrezSystem2.PEntrez.BioSample.Entrez_Messages","type":"Portlet","realname":"EntrezSystem2.PEntrez.BioSample.Entrez_Database.Entrez_Messages","shortname":"Entrez_Messages"},
-{"name":"EntrezSystem2.PEntrez.BioSample.NcbiJSCheck","type":"Portlet","realname":"EntrezSystem2.PEntrez.BioSample.Entrez_Database.NcbiJSCheck","shortname":"NcbiJSCheck"},
-{"name":"EntrezSystem2.PEntrez.BioSample.NCBIFooter_dynamic","type":"Cluster","realname":"EntrezSystem2.PEntrez.BioSample.Entrez_Database.NCBIFooter_dynamic",
-"children":[{"name":"EntrezSystem2.PEntrez.BioSample.NCBIFooter_dynamic.NCBIBreadcrumbs","type":"Portlet","realname":"EntrezSystem2.PEntrez.BioSample.Entrez_Database.NCBIFooter_dynamic.NCBIBreadcrumbs","shortname":"NCBIBreadcrumbs"},
-{"name":"EntrezSystem2.PEntrez.BioSample.NCBIFooter_dynamic.NCBIHelpDesk","type":"Portlet","realname":"EntrezSystem2.PEntrez.BioSample.Entrez_Database.NCBIFooter_dynamic.NCBIHelpDesk","shortname":"NCBIHelpDesk"},
-{"name":"EntrezSystem2.PEntrez.BioSample.NCBIFooter_dynamic.NCBIApplog_NoScript_Ping","type":"Portlet","realname":"EntrezSystem2.PEntrez.BioSample.Entrez_Database.NCBIFooter_dynamic.NCBIApplog_NoScript_Ping","shortname":"NCBIApplog_NoScript_Ping"}]},
-{"name":"EntrezSystem2.PEntrez.BioSample.BrowserCheck","type":"Portlet","realname":"EntrezSystem2.PEntrez.BioSample.Entrez_Database.BrowserCheck","shortname":"BrowserCheck"},
-{"name":"EntrezSystem2.PEntrez.BioSample.BioSample_HomePage","type":"Cluster","realname":"EntrezSystem2.PEntrez.BioSample.BioSample_HomePage",
-"children":[{"name":"EntrezSystem2.PEntrez.BioSample.BioSample_HomePage.BioSample_HomePageContent","type":"Portlet","realname":"EntrezSystem2.PEntrez.BioSample.BioSample_HomePage.BioSample_HomePageContent","shortname":"BioSample_HomePageContent"}]}]}]}]};
---></script><link type="text/css" rel="stylesheet" href="//static.pubmed.gov/portal/portal3rc.fcgi/3865237/css/3808861/3475386/3841922/3751656/3395415/3316/3609340/14534/3762635/3721621/3858027/12930/3858295/3327743/31867/3734262/3767044/3317918/61817.css" /><link type="text/css" rel="stylesheet" href="//static.pubmed.gov/portal/portal3rc.fcgi/3865237/css/3501913/3529739.css" media="print" /><script type="text/javascript">
-
-var ObjectLinks=[{i:0, ename: "p$ExL", esid:"*", sname: "p$ExL", ssid:"*", dname:"p$el", dsid:"0",m:"CopyValue",p:[],f: function(src, dst) {fn_CopyValue(src, dst);}}]
-
-
-var ActiveNames = {"p$ExL":1, "EntrezSystem2.PEntrez.BioSample.BioSample_PageController.PreviousPageName":0, "EntrezSystem2.PEntrez.DbConnector.Cmd":0, "EntrezSystem2.PEntrez.DbConnector.Db":0, "EntrezSystem2.PEntrez.DbConnector.IdsFromResult":0, "EntrezSystem2.PEntrez.DbConnector.LastDb":0, "EntrezSystem2.PEntrez.DbConnector.LastIdsFromResult":0, "EntrezSystem2.PEntrez.DbConnector.LastQueryKey":0, "EntrezSystem2.PEntrez.DbConnector.LastTabCmd":0, "EntrezSystem2.PEntrez.DbConnector.LinkN [...]
-</script></head>
-    <b
-28a
-ody>
-    	<div class="grid">
-			<div class="col twelve_col nomargin shadow">
-				<form enctype="application/x-www-form-urlencoded" name="EntrezForm" method="post" onsubmit="return false;" action="/biosample" id="EntrezForm">
-					<div xmlns:xi="http://www.w3.org/2001/XInclude">
-    <!-- no javascript message -->
-    <noscript>
-	<p class="nojs">
-	<strong>Warning:</strong>
-	The NCBI web site requires JavaScript to function. 
-	<a href="http://www.ncbi.nlm.nih.gov/corehtml/query/static/unsupported-browser.html#enablejs" title="Learn how to enable JavaScript" target="_blank">more...</a>
-	</p>
-	</noscript>
-    
-    <div xmlns="http://www.w3.org/199
-169a
-9/xhtml" class="universal_header" id="universal_header" xml:base="http://127.0.0.1/sites/static/header_footer/"><ul class="inline_list jig-ncbimenu ui-ncbimenu resources_list" id="navcontent"><li class="ui-ncbimenu-item-leaf ui-ncbimenu-item-first ui-helper-reset ui-ncbimenu-item-no-hlt"><a class="ui-ncbimenu-link-first" href="/" role="banner" title="NCBI Home" id="ncbihome" accesskey="1"><span class="offscreen_noflow">NCBI</span><img src="//static.pubmed.gov/portal/portal3rc.fcgi/383782 [...]
-                        content</a></li><li class="offscreen_noflow ui-ncbimenu-item-skip access"><a href="#navcontent" title="Skip to the navigation" tabindex="0" accesskey="4">Skip to
-                        navigation</a></li><li id="resource-menu" class="topmenu ui-helper-reset ui-ncbimenu-item-first ui-helper-reset"><a class="ui-ncbimenu-first-link-has-submenu ui-ncbimenu-link-first topanchor" href="/guide/all/">Resources</a><ul id="resources-submenu"><li><a href="/guide/all/">All Resources</a></li><li><a href="#chemicals-bioassays">Chemicals & Bioassays</a><ul class="actual-resources-submenu chemicals-bioassays"><li><a href="/biosystems/" title=" Database that [...]
-966
-GenBank: BankIt</a></li><li><a href="/projects/Sequin" title=" Software tool for complex submissions of nucleotide sequences ">GenBank: Sequin</a></li><li><a href="/genbank/tbl2asn2.html" title=" Command-line program for submitting sequence data ">GenBank: tbl2asn</a></li><li><a href="/sutils/protmap.cgi" title=" Maps proteins from a COG/VOG back to its genome ">Genome ProtMap</a></li><li><a href="/projects/gbench/" title=" Stand-alone application for analyzing sequence data ">Genome Wor [...]
-12da
-tural alignments ">Vector Alignment Search Tool (VAST)</a></li><li><a href="/guide/domains-structures/">All Domains & Structures Resources...</a></li></ul></li><li><a href="#genes-expression">Genes & Expression</a><ul class="actual-resources-submenu genes-expression"><li><a href="/biosystems/" title=" Database that groups biomedical literature, small molecules, and sequence data in terms of biological relationships. ">BioSystems</a></li><li><a href="/gap" title=" Genotype/Phenoty [...]
-5a8
-quence Read Archive (SRA)</a></li><li><a href="/sutils/splign" title=" Tool for aligning transcripts to genomic DNA ">Splign</a></li><li><a href="/Traces/trace.cgi" title=" DNA chromatograms, base calls, and quality estimates for single-pass reads. ">Trace Archive</a></li><li><a href="/unists" title=" Database of Sequence Tagged Sites ">UniSTS</a></li><li><a href="/guide/genomes-maps/">All Genomes & Maps Resources...</a></li></ul></li><li><a href="#homology">Homology</a><ul class="ac [...]
-77e
-e" title=" Sets of homologous eukaryotic genes ">HomoloGene</a></li><li><a href="/proteinclusters" title=" Clusters of related proteins from prokaryotes and organelles ">Protein Clusters</a></li><li><a href="/guide/homology/">All Homology Resources...</a></li></ul></li><li><a href="#literature">Literature</a><ul class="actual-resources-submenu literature"><li><a href="/books" title=" Online biomedical books ">Bookshelf</a></li><li><a href="/books/NBK25501/ " title=" URL application progr [...]
-5a2
-sequence similarity ">BLAST (Basic Local Alignment Search Tool)</a></li><li><a href="http://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastDocs&DOC_TYPE=Download" title=" BLAST programs for a local computer ">BLAST (Stand-alone)</a></li><li><a href="/sutils/blink.cgi?mode=query" title=" Pre-computed reports showing proteins with similar sequences ">BLAST Link (BLink)</a></li><li><a href="/cdd" title=" Database of conserved protein domains represented by multiple sequence [...]
-5a8
-nce Analysis</a><ul class="actual-resources-submenu sequence-analysis"><li><a href="http://blast.ncbi.nlm.nih.gov" title=" Tool for finding local regions of sequence similarity ">BLAST (Basic Local Alignment Search Tool)</a></li><li><a href="http://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastDocs&DOC_TYPE=Download" title=" BLAST programs for a local computer ">BLAST (Stand-alone)</a></li><li><a href="/sutils/blink.cgi?mode=query" title=" Pre-computed reports showing p [...]
-5a8
-analysis/">All Sequence Analysis Resources...</a></li></ul></li><li><a href="#taxonomy">Taxonomy</a><ul class="actual-resources-submenu taxonomy"><li><a href="/taxonomy" title=" The NCBI taxonomy tree in Entrez ">Taxonomy</a></li><li><a href="/Taxonomy/Browser/wwwtax.cgi?mode=Root" title=" Displays and links Entrez data to each taxonomic node ">Taxonomy Browser</a></li><li><a href="/Taxonomy/CommonTree/wwwcmt.cgi" title=" Creates custom taxonomic trees ">Taxonomy Common Tree</a></li><li> [...]
-5a8
-ctural variation ">Database of Genomic Structural Variation (dbVar)</a></li><li><a href="/gap" title=" Genotype/Phenotype association studies ">Database of Genotypes and Phenotypes (dbGaP)</a></li><li><a href="/snp" title=" Database of nucleotide sequence polymorphisms ">Database of Single Nucleotide Polymorphisms (dbSNP)</a></li><li><a href="http://www.ncbi.nlm.nih.gov/projects/SNP" title=" The SNP database tools page provides links to the general submission guidelines and to the submis [...]
-5a8
-#howtos">Homology</a></li><li><a href="/guide/literature/#howtos">Literature</a></li><li><a href="/guide/proteins/#howtos">Proteins</a></li><li><a href="/guide/sequence-analysis/#howtos">Sequence Analysis</a></li><li><a href="/guide/taxonomy/#howtos">Taxonomy</a></li><li><a href="/guide/training-tutorials/#howtos">Training & Tutorials</a></li><li><a href="/guide/variation/#howtos">Variation</a></li></ul></li><li class="offscreen_noflow ui-ncbimenu-item-skip access"><a href="/guide/br [...]
-    
-    <div class="header">
-    <!-- logo -->
-    <div class="res_logo"><h1 class="res_name"><a href="/biosample">BioSample</a></h1>
-				<h2 class="res_tagline">National Center for Biotechnology Information</h2></div>
-    <!-- SearchBar -->
-    <div class="search"><div class="search_form"><label for="database" class="offscreen_noflow">Search database</label><select id="database"><option value="gquery">All Databases</option><option value="assembly">Assembly</option><
-3be
-option value="bioproject">BioProject</option><option value="biosample" selected="selected">BioSample</option><option value="biosystems">BioSystems</option><option value="books">Books</option><option value="clinvar">ClinVar</option><option value="clone">Clone</option><option value="cdd">Conserved Domains</option><option value="gap">dbGaP</option><option value="dbvar">dbVar</option><option value="epigenomics">Epigenomics</option><option value="nucest">EST</option><option value="gene">Gene< [...]
-12da
-"nuccore">Nucleotide</option><option value="omia">OMIA</option><option value="omim">OMIM</option><option value="pmc">PMC</option><option value="popset">PopSet</option><option value="probe">Probe</option><option value="protein">Protein</option><option value="proteinclusters">Protein Clusters</option><option value="pcassay">PubChem BioAssay</option><option value="pccompound">PubChem Compound</option><option value="pcsubstance">PubChem Substance</option><option value="pubmed" data-ac_dict=" [...]
-</div>   
-    <input name="EntrezSystem2.PEntrez.BioSample.BioSample_PageController.PreviousPageName" sid="1" type="hidden" value="home" />
-    <div id="maincontent" class="twelve_col col last">
-    <div class="content">
-        <div id="messagearea" class="empty">
-            <div class="error"><div class="browsername">We are sorry, but NCBI web applications do not support your browser and may not function properly.  <a href="/guide/browsers">More information</a></div></div>
-            <ul id="msgportlet" class="messages"></ul>
-            
-        </div>
-        
-        <div>
-    <div><div class="dbheader"><div class="headerimage"></div><div class="headerintro"><h1>BioSample</h1><div class="dbdescription">The BioSample database contains descriptions of biological source materials used in experimental assays.</div></div></div><div class="tier firsttier"><div class="onecol"><div class="firsttier_portlet"><div class="portlet_head"><h2>Using BioSample</h2></div><div class="portlet_content"><ul><li><a href="/books/NBK3837/">Help</a></li><li><a href="https://submit [...]
-    <div class="tier">
-    <!-- 
-    for two one-column width portlets
-    <div class="onecol">
-        <component id="MyHomePagePortlet1" />
-    </div>
-    <div class="onecol lastcol">
-        <component id="MyHomePagePortlet2" />
-    </div>
-    -->
-</div>
-    
-    
-</div>        
-    </div>
-</div>
-    
-    <div id="NCBIFooter_dynamic">
-    <div class="breadcrumbs">You are here: 
-            <span id="breadcrumb_text"><a href="/guide/">NCBI</a>
-                        > <a href="http://www.ncbi.nlm.nih.gov/guide/dna-rna/">DNA & RNA</a>
-                        
-                        > BioSample</span></div>
-    <a id="help-desk-link" class="help_desk" target="_blank" href="/sites/ehelp?&Ncbi_App=entrez&Db=biosample&Page=home&Snapshot=/projects/Sequences/SeqDb at 1.4&Time=2013-05-06T16:06:39-04:00&Host=portal102&Data=JiraApp:BSH;%20NCBI_Phid:CE8903371880D431000000000008E0A9;%20PageURL:http://www.ncbi.nlm.nih.gov/biosample;" onclick="window.open('/sites/ehelp?&Ncbi_App=entrez&Db=biosample&Page=home&Snapshot=/projects/Sequences/SeqDb at 1.4&Time=2013-0 [...]
-d26
-bar=no,top=50,left=200,width=720,height=695');return false;">Write to the Help
-            Desk</a>
-    <noscript><img alt="" src="/stat?jsdisabled=true&ncbi_app=entrez&ncbi_db=biosample&ncbi_pdid=home&ncbi_phid=CE8903371880D431000000000008E0A9" /></noscript>
-</div>
-
-    <div xmlns="http://www.w3.org/1999/xhtml" class="footer" id="footer" xml:base="http://127.0.0.1/sites/static/header_footer/">
-    <!--    <div class="breadcrumbs">You are here: <span id="breadcrumb_text"><a href="#">NCBI</a></span></div>
-        <a id="help-desk-link" class="help_desk" target="_blank">Help Desk</a>-->
-    <div class="subfooter">
-        <h2 class="offscreen_noflow">Simple NCBI Directory</h2>
-        <ul class="foot_list" id="getting_started">
-            <li><h3>Getting Started</h3></li>
-            <!-- removed; hp-250           <li><a href="/guide/all/">Site Map</a></li>-->
-            <li><a href="/Education/">NCBI Education</a></li>
-            <li><a href="/books/NBK3831/">NCBI Help Manual</a></li>
-            <li><a href="/books/NBK21101/">NCBI Handbook</a></li>
-            <li><a href="/guide/training-tutorials/">Training & Tutorials</a></li>
-        </ul>
-        <!-- this section is re-written by an XSLT before output -->
-        <ul class="foot_list" id="resources">
-            <li><h3>Resources</h3></li>
-            <!-- fill this in with categories -->
-        <li><a href="/guide/chemicals-bioassays">Chemicals & Bioassays</a></li><li><a href="/guide/data-software">Data & Software</a></li><li><a href="/guide/dna-rna">DNA & RNA</a></li><li><a href="/guide/domains-structures">Domains & Structures</a></li><li><a href="/guide/genes-expression">Genes & Expression</a></li><li><a href="/guide/genetics-medicine">Genetics & Medicine</a></li><li><a href="/guide/genomes-maps">Genomes & Maps</a></li><li><a href="/guide/h [...]
-        
-        <ul class="foot_list" id="popular">
-            <li><h3>Popular</h3></li>
-            <li><a href="/pubmed/">PubMed</a></li>
-            <li><a href="/nucleotide/">Nucleotide</a></li>
-            <li><a href="http://blast.ncbi.nlm.nih.gov/">BLAST</a></li>
-            <li><a href="http://www.pubmedcentral.nih.gov/" class="newdomain">PubMed Central</a></li>
-            <li><a href="/gene/">Gene</a></li>
-            <li><a href="/books/">Bookshelf</a></li>
-            <li><a href="/protein/">Protein</a></li>
-            <li><a href="/omim/">OMIM</a></li>
-            <li><a href="/genome/">Genome</a></li>
-            <li><a href="/snp/">SNP</a></li>
-            <li><a href="/Structure/">Structure</a></li>
-        </ul>
-        <ul class="foot_list" id="featured">
-            <li><h3>Featured</h3></li>
-            <li><a href="/gtr/">Genetic Testing Registry</a></li>
-            <li><a href="/pubmedhealth/">PubMed Health</a></li>
-            <li><a href="/Genbank/">GenBank</a></li>
-            <li><a href="/refseq/">Reference Sequences</a></li>
-            <li><a href="/mapview/">Map Viewer<
-14bd
-/a></li>
-            <li><a href="/genome/guide/human/">Human Genome</a></li>
-            <li><a href="/genome/guide/mouse/">Mouse Genome</a></li>
-            <li><a href="/genomes/FLU/">Influenza Virus</a></li>
-            <li><a href="/tools/primer-blast/">Primer-BLAST</a></li>
-            <li><a href="/Traces/sra/">Sequence Read Archive</a></li>
-        </ul>
-        <ul class="foot_list" id="info">
-            <li><h3>NCBI Information</h3></li>
-            <li><a href="/About/">About NCBI</a></li>
-            <li><a href="/research/">Research at NCBI</a></li>
-            <li><a href="/books/NBK1969/">NCBI Newsletter</a></li>
-            <li><a href="/Ftp/">NCBI FTP Site</a></li>
-            <li><a class="external" href="http://www.facebook.com/ncbi.nlm">NCBI on Facebook</a></li>
-            <li><a class="external" href="http://www.twitter.com/ncbi">NCBI on Twitter</a></li>
-            <li><a class="external" href="http://www.youtube.com/ncbinlm">NCBI on YouTube</a></li>
-        </ul>
-    </div>
-    <div id="external-disclaimer" class="offscreen_noflow">
-        External link. Please review our <a href="http://www.nlm.nih.gov/privacy.html">privacy policy</a>.
-    </div>    
-    <div id="ncbifooter" class="contact_info">      
-        <div id="footer-contents-right">
-            <div id="nlm_thumb_logo">
-                <a href="http://www.nlm.nih.gov" title="NLM">NLM</a>
-            </div>
-            <div id="nih_thumb_logo">
-                <a href="http://www.nih.gov" title="NIH">NIH</a>
-            </div>
-            <div id="hhs_thumb_logo">
-                <a href="http://www.dhhs.gov" title="DHHS">DHHS</a>
-            </div>
-            <div id="usagov_thumb_logo">
-                <a href="http://www.usa.gov" title="USA.gov">USA.gov</a>
-            </div>         
-        </div>
-        
-        <div id="footer-contents-left">
-            
-            <a href="/About/disclaimer.html">Copyright</a> | <a href="/About/disclaimer.html#disclaimer">Disclaimer</a> |
-            <a href="http://www.nlm.nih.gov/privacy.html" class="newdomain">Privacy</a> | 
-            <a href="/guide/browsers/">Browsers</a> | <a href="http://www.nlm.nih.gov/accessibility.html">Accessibility</a> | <a href="/About/glance/contact_info.html">Contact</a>
-            <p class="address vcard">
-                <span class="url">
-                    <a class="fn url newdomain" href="http://www.ncbi.nlm.nih.gov">National Center for
-                        Biotechnology Information</a>,
-                </span> <span class="org url"><a href="http://www.nlm.nih.gov/">U.S. National Library of Medicine</a></span>
-                <span class="adr">
-                    <span class="street-address">8600 Rockville Pike</span>, <span class="locality">Bethesda</span>
-                    <span class="region">MD</span>, <span class="postal-code">20894</span>
-                    <span class="country-name">USA</span>
-                </span>
-            </p>
-        </div>
-    </div>
-    <script type="text/javascript" src="/portal/portal3rc.fcgi/rlib/js/InstrumentOmnitureBaseJS/InstrumentNCBIBaseJS/InstrumentPageStarterJS.js?v=1"> </script>    
-    <script type="text/javascript" src="/portal/portal3rc.fcgi/static/js/hfjs.js"> </script>
-</div>
-
-</div>
-					<div><input name="EntrezSystem2.PEntrez.DbConnector.Db" sid="1" type="hidden" value="biosample" /><input name="EntrezSystem2.PEntrez.DbConnector.LastDb" sid="1" type="hidden" value="biosample" /><input name="EntrezSystem2.PEntrez.DbConnector.Term" sid="1" type="hidden" value="" /><input name="EntrezSystem2.PEntrez.DbConnector.LastTabCmd" sid="1" type="hidden" value="" /><input name="EntrezSystem2.PEntrez.DbConnector.LastQueryKey" sid="1" type="hidden" value="" /><input name="EntrezS [...]
-				<input type="hidden" name="p$a" id="p$a" /><input type="hidden" name="p$l" id="p$l" value="EntrezSystem2" /><input type="hidden" name="p$st" id="p$st" value="biosample" /><input name="SessionId" id="SessionId" value="CE8903371880D4E1_0008SID" disabled="disabled" type="hidden" /><input name="Snapshot" id="Snapshot" value="/projects/Sequences/SeqDb at 1.4" disabled="disabled" type="hidden" /></form>
-			</div>
-		</div>
-    
-
-<!-- CE8903371880D4E1_0008SID /projects/Sequences/SeqDb at 1.4 portal102 v3.5.1.r392364: Mon, Mar 25 2013 15:07:09 -->
-
-
-<script type='text/javascript' src='/portal/js/portal.js?v3%2E5%2E1%2Er392364%3A+Mon%2C+Mar+25+2013+15%3A07%3A09'></script><script type="text/javascript" src="//static.pubmed.gov/portal/portal3rc.fcgi/3865237/js/3812534/3865793/3812535/3857406/3812291/3805553/3844708/3728312/3783853.js" snapshot="biosample"></script></body>
-</html>
-0
-
diff --git a/test/kproc/Makefile b/test/kproc/Makefile
deleted file mode 100644
index a1c386b..0000000
--- a/test/kproc/Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-MODULE = test/kproc
-
-TEST_TOOLS = \
-	test-kproc \
-
-include $(TOP)/build/Makefile.env
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-clean: stdclean
-
-#-------------------------------------------------------------------------------
-# test-kproc
-#
-TEST_KPROC_SRC = \
-	kproctest 
-
-TEST_KPROC_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_KPROC_SRC))
-
-TEST_KPROC_LIB = \
-	-skapp \
-	-sktst \
-    -sncbi-vdb
-
-$(TEST_BINDIR)/test-kproc: $(TEST_KPROC_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_KPROC_LIB)
diff --git a/test/kproc/kproctest.cpp b/test/kproc/kproctest.cpp
deleted file mode 100644
index 5527c30..0000000
--- a/test/kproc/kproctest.cpp
+++ /dev/null
@@ -1,889 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for KProc interfaces
-*/
-
-#include <ktst/unit_test.hpp>
-
-#include <klib/rc.h>
-#include <klib/time.h>
-#include <klib/log.h>
-
-#include <atomic32.h>
-#include <os-native.h>
-
-#include <kproc/cond.h>
-#include <kproc/lock.h>
-#include <kproc/thread.h>
-#include <kproc/timeout.h>
-#include <kproc/queue.h>
-
-#include <stdexcept>
-#include <sstream>
-
-#include <cstring> // mamset
-
-using namespace std;
-using namespace ncbi::NK;
-
-extern "C" { static rc_t argsHandler(int argc, char* argv[]); }
-TEST_SUITE_WITH_ARGS_HANDLER(KProcTestSuite, argsHandler);
-
-//TODO: KThread
-
-///////////////////////// KLock
-TEST_CASE( KLock_NULL )
-{
-    REQUIRE_RC_FAIL(KLockMake(NULL));
-}
-
-class KLockFixture
-{
-public:
-    KLockFixture()
-    :   threadRc(0),
-        thread(0),
-        lock(0)
-    {
-        if (KLockMake(&lock) != 0)
-            throw logic_error("KLockFixture: KLockMake failed");
-    }
-    ~KLockFixture()
-    {
-        if (thread != 0 && KThreadRelease(thread) != 0)
-            throw logic_error("~KLockFixture: KThreadRelease failed");
-        if (KLockRelease((const KLock*)lock) != 0)
-            throw logic_error("~KLockFixture: KLockRelease failed");
-    }
-    
-protected:
-    class Thread {
-    public:
-        // danger - this should be an extern "C" function
-        // with CC calling convention on Windows
-        static rc_t KLock_ThreadFn ( const KThread *thread, void *data )
-        {
-            KLockFixture* self = (KLockFixture*)data;
-            
-            LOG(LogLevel::e_message, "KLock_ThreadFn acquiring lock, set threadWaiting to 1" << endl);    
-            atomic32_set ( & self->threadWaiting, 1 );
-            
-            while (KLockAcquire(self->lock) != 0)
-            {
-                TestEnv::SleepMs(1);
-            }
-            LOG(LogLevel::e_message, "KLock_ThreadFn: lock acquired" << endl);    
-            
-            atomic32_set ( & self->threadWaiting, 0 );
-            LOG(LogLevel::e_message, "KLock_ThreadFn: set threadWaiting to 0" << endl);    
-            
-            self->threadRc = KLockUnlock(self->lock);
-            LOG(LogLevel::e_message, "KLock_Timed_ThreadFn: exiting" << endl);    
-            return 0;
-        }
-    };
-    
-    rc_t StartThread()
-    {
-        atomic32_set ( & threadWaiting, 0 );
-        LOG(LogLevel::e_message, "StartThread: set threadWaiting to 0" << endl);    
-
-        threadRc = 0;
-        rc_t rc = KThreadMake(&thread, Thread::KLock_ThreadFn, this);
-        while (threadRc == 0 && !atomic32_read (&threadWaiting))
-        {
-            TestEnv::SleepMs(1);
-        }
-        LOG(LogLevel::e_message, "StartThread: threadWaiting == 1" << endl);    
-        return rc;
-    }
-    
-public:
-    rc_t threadRc;
-    KThread* thread;
-    volatile atomic32_t threadWaiting;
-    timeout_t tm;
-    KLock* lock;
-};
-
-FIXTURE_TEST_CASE(KLock_Acquire, KLockFixture)
-{
-    // lock 
-    REQUIRE_RC(KLockAcquire(lock));
-    // start a thread that tries to lock, see it wait for the lock to become available
-    REQUIRE_RC(StartThread()); // makes sure threadWaiting == 1
-    
-    // unlock, see the thread finish
-    REQUIRE_RC(KLockUnlock(lock));
-    while (atomic32_read (&threadWaiting))
-    {
-        TestEnv::SleepMs(1);
-    }
-
-    REQUIRE_RC(threadRc);
-    LOG(LogLevel::e_message, "KLock_Acquire: done" << endl);    
-}
-
-///////////////////////// KTimedLock
-TEST_CASE( KTimedLock_NULL )
-{
-    REQUIRE_RC_FAIL(KTimedLockMake(NULL));
-}
-
-class KTimedLockFixture
-{
-public:
-    KTimedLockFixture()
-    :   threadRc(0),
-        thread(0),
-        lock(0)
-    {
-        if (KTimedLockMake(&lock) != 0)
-            throw logic_error("KLockFixture: KLockMake failed");
-    }
-    ~KTimedLockFixture()
-    {
-        if (thread != 0 && KThreadRelease(thread) != 0)
-            throw logic_error("~KLockFixture: KThreadRelease failed");
-        if (KLockRelease((const KLock*)lock) != 0)
-            throw logic_error("~KLockFixture: KLockRelease failed");
-    }
-    
-protected:
-    class Thread {
-    public:
-        // danger - this should be an extern "C" function
-        // with CC calling convention on Windows
-        static rc_t KLock_Timed_ThreadFn ( const KThread *thread, void *data )
-        {
-            KTimedLockFixture* self = (KTimedLockFixture*)data;
-            
-            LOG(LogLevel::e_message, "KLock_Timed_ThreadFn acquiring lock, set threadWaiting to 1, timeout = " << self->tm.mS << "ms" << endl);    
-            atomic32_set ( & self->threadWaiting, 1 );
-        
-            self->threadRc = KTimedLockAcquire(self->lock, &self->tm);
-            if (self->threadRc == 0)
-                LOG(LogLevel::e_message, "KLock_Timed_ThreadFn: lock acquired" << endl);    
-            else
-                LOG(LogLevel::e_message, "KLock_Timed_ThreadFn: lock acquire failed" << endl);    
-            
-            LOG(LogLevel::e_message, "KLock_Timed_ThreadFn: set threadWaiting to 0" << endl);    
-            
-            if (self->threadRc == 0)
-                self->threadRc = KTimedLockUnlock(self->lock);
-            LOG(LogLevel::e_message, "KLock_Timed_ThreadFn: exiting" << endl);    
-            atomic32_set ( & self->threadWaiting, 0 );
-            return 0;
-        }
-    };
-    
-    rc_t StartThread(size_t timeout)
-    {
-        rc_t rc = TimeoutInit( &tm, timeout );
-        if ( rc == 0)
-        {
-            atomic32_set ( & threadWaiting, 0 );
-            LOG(LogLevel::e_message, "StartTimedThread: set threadWaiting to 0" << endl);    
-            
-            threadRc = 0;
-            rc = KThreadMake(&thread, Thread::KLock_Timed_ThreadFn, this);
-            while (threadRc == 0 && !atomic32_read (&threadWaiting))
-            {
-                TestEnv::SleepMs(1);
-            }
-            LOG(LogLevel::e_message, "StartTimedThread: threadWaiting == 1" << endl);    
-        }
-        return rc;
-    }
-
-public:    
-    rc_t threadRc;
-    KThread* thread;
-    volatile atomic32_t threadWaiting;
-    timeout_t tm;
-    KTimedLock* lock;
-};
-
-FIXTURE_TEST_CASE(KTimedLock_Acquire, KTimedLockFixture)
-{
-    // lock 
-    REQUIRE_RC(KTimedLockAcquire(lock, NULL));
-    
-    // start a thread that tries to lock
-    LOG(LogLevel::e_message, "TEST_KLock_TimedAcquire: starting thread" << endl);    
-    REQUIRE_RC(StartThread(1000));// makes sure threadWaiting == 1
-
-    // unlock, see the thread finish
-    LOG(LogLevel::e_message, "TEST_KLock_TimedAcquire: unlocking" << endl);    
-    REQUIRE_RC(KTimedLockUnlock(lock));
-    
-    // wait for the thread to finish
-    while (atomic32_read (&threadWaiting))
-    {
-        TestEnv::SleepMs(1);
-    }
-    REQUIRE_RC(threadRc);
-
-    LOG(LogLevel::e_message, "TEST_KLock_TimedAcquire: done" << endl);    
-}
-FIXTURE_TEST_CASE(KTimedLock_Acquire_Timeout, KTimedLockFixture)
-{
-    // lock 
-    REQUIRE_RC(KTimedLockAcquire(lock, NULL));
-    
-    // start a thread that tries to lock, see it time out
-    REQUIRE_RC(StartThread(100));// makes sure threadWaiting == 1
-    
-    // do not unlock, wait for the thread to finish
-    while (atomic32_read (&threadWaiting))
-    {
-        TestEnv::SleepMs(1);
-    }
-    REQUIRE_EQ(threadRc, RC ( rcPS, rcLock, rcLocking, rcTimeout, rcExhausted )); // timed out
-    
-    REQUIRE_RC(KTimedLockUnlock(lock));
-}
-
-///////////////////////// KRWLock
-TEST_CASE( KRWLock_NULL )
-{
-    REQUIRE_RC_FAIL(KRWLockMake(NULL));
-}
-
-class KRWLockFixture
-{
-public:
-    KRWLockFixture()
-    :   threadRc(0),
-        thread(0),
-        lock(0)
-    {
-        atomic32_set ( & threadWaiting, 0 );
-        
-        if (KRWLockMake(&lock) != 0)
-            throw logic_error("KLockFixture: KLockMake failed");
-    }
-    ~KRWLockFixture()
-    {
-        if (thread != 0 && KThreadRelease(thread) != 0)
-            throw logic_error("~KRWLockFixture: KThreadRelease failed");
-        if (KRWLockRelease((const KRWLock*)lock) != 0)
-            throw logic_error("~KRWLockFixture: KLockRelease failed");
-    }
-    
-protected:
-    class Thread {
-    public:
-        static rc_t KRWLock_Reader_ThreadFn ( const KThread *thread, void *data )
-        {
-            KRWLockFixture* self = (KRWLockFixture*)data;
-            atomic32_set( & self->threadWaiting, true );
-            
-            while (KRWLockAcquireShared(self->lock) != 0)
-            {
-                TestEnv::SleepMs(1);
-            }
-            self->threadRc = KRWLockUnlock(self->lock);
-            atomic32_set( & self->threadWaiting, false );
-            return 0;
-        }
-        static rc_t KRWLock_Writer_ThreadFn ( const KThread *thread, void *data )
-        {
-            KRWLockFixture* self = (KRWLockFixture*)data;
-            atomic32_set( & self->threadWaiting, true );
-            
-            LOG(LogLevel::e_message, "KRWLock_Writer_ThreadFn: calling KRWLockAcquireExcl\n");                
-            self->threadRc = KRWLockAcquireExcl(self->lock);
-            LOG(LogLevel::e_message, "KRWLock_Writer_ThreadFn: out of KRWLockAcquireExcl\n");                
-            if (self->threadRc == 0)
-            {
-                LOG(LogLevel::e_message, "KRWLock_Writer_ThreadFn: calling KRWLockUnlock\n");                
-                self->threadRc = KRWLockUnlock(self->lock);
-            }
-            atomic32_set( & self->threadWaiting, false );
-            return 0;
-        }
-        static rc_t KRWLock_ReaderTimed_ThreadFn ( const KThread *thread, void *data )
-        {
-            KRWLockFixture* self = (KRWLockFixture*)data;
-            atomic32_set( & self->threadWaiting, true );
-            
-            self->threadRc = KRWLockTimedAcquireShared(self->lock, &self->tm);
-            if (self->threadRc == 0)
-                self->threadRc = KRWLockUnlock(self->lock);
-            atomic32_set( & self->threadWaiting, false );
-            return 0;
-        }
-        static rc_t KRWLock_WriterTimed_ThreadFn ( const KThread *thread, void *data )
-        {
-            KRWLockFixture* self = (KRWLockFixture*)data;
-            atomic32_set( & self->threadWaiting, true );
-            
-            self->threadRc = KRWLockTimedAcquireExcl(self->lock, &self->tm);
-            if (self->threadRc == 0)
-                self->threadRc = KRWLockUnlock(self->lock);
-            atomic32_set( & self->threadWaiting, false );
-            return 0;
-        }
-    };
-    
-    rc_t StartThread(bool writer)
-    {
-        threadRc = 0;
-        rc_t rc = KThreadMake(&thread, writer ? Thread::KRWLock_Writer_ThreadFn : Thread::KRWLock_Reader_ThreadFn, this);
-        while (!atomic32_read (&threadWaiting))
-        {
-            TestEnv::SleepMs(1);
-        }
-        return rc;
-    }
-    rc_t StartThread(bool writer, size_t timeout)
-    {
-        rc_t rc = TimeoutInit( &tm, timeout );
-        if ( rc == 0)
-        {
-            threadRc = 0;
-            rc = KThreadMake(&thread, writer ? Thread::KRWLock_WriterTimed_ThreadFn : Thread::KRWLock_ReaderTimed_ThreadFn, this);
-            while (!atomic32_read (&threadWaiting))
-            {
-                TestEnv::SleepMs(1);
-            }
-        }
-        return rc;
-    }
-
-    volatile atomic32_t threadWaiting;
-    rc_t threadRc;
-    KThread* thread;
-    timeout_t tm;
-    KRWLock* lock;
-};
-
-FIXTURE_TEST_CASE( KRWLock_ManyReaders, KRWLockFixture )
-{
-    // get multiple read locks
-    REQUIRE_RC(KRWLockAcquireShared(lock));
-    REQUIRE_RC(KRWLockAcquireShared(lock));
-    REQUIRE_RC(KRWLockAcquireShared(lock));
-    //NB: On Linux, KRWLock goes away without a leak even if Unlock is not called.
-    // On Windows, Unlocks are required.
-    KRWLockUnlock(lock);
-    KRWLockUnlock(lock);
-    KRWLockUnlock(lock);
-}
-
-FIXTURE_TEST_CASE( KRWLock_OneWriter, KRWLockFixture )
-{
-    REQUIRE_RC(KRWLockAcquireExcl(lock));
-    //NB: trying to lock again from the same thread errors out on Linux but hangs on Windows
-    //REQUIRE_RC_FAIL(KRWLockAcquireExcl(lock));
-    //REQUIRE_RC_FAIL(KRWLockAcquireShared(lock));
-    //TODO: try to acquire from a different thread
-    
-    REQUIRE_RC(KRWLockUnlock(lock));
-
-    // now, can lock again
-    REQUIRE_RC(KRWLockAcquireShared(lock));
-    REQUIRE_RC(KRWLockUnlock(lock));
-}
-
-FIXTURE_TEST_CASE( KRWLock_WriterWaitsForReader, KRWLockFixture )
-{
-    LOG(LogLevel::e_message, "KRWLock_WriterWaitsForReader: calling KRWLockAcquireShared\n");                
-    REQUIRE_RC(KRWLockAcquireShared(lock));
-    
-    // start a thread that tries to write-lock, see it wait
-    LOG(LogLevel::e_message, "KRWLock_WriterWaitsForReader: starting thread\n");                
-    REQUIRE_RC(StartThread(true));
-    
-    REQUIRE(atomic32_read ( & threadWaiting )); 
-
-    LOG(LogLevel::e_message, "KRWLock_WriterWaitsForReader: calling KRWLockUnlock\n");                
-    REQUIRE_RC(KRWLockUnlock(lock));
-    // let the thread finish
-    while (atomic32_read (&threadWaiting))
-    {
-        TestEnv::SleepMs(1);
-    }
-    REQUIRE(!atomic32_read ( & threadWaiting )); 
-}
-
-FIXTURE_TEST_CASE(KWRLock_Reader_TimedAcquire, KRWLockFixture)
-{
-    // lock 
-    REQUIRE_RC(KRWLockAcquireExcl(lock));
-    
-    // start a thread that tries to lock
-    REQUIRE_RC(StartThread(false, 1000));
-    
-    // see the thread wait
-    REQUIRE(atomic32_read ( & threadWaiting )); 
-    
-    // unlock, see the thread finish
-    REQUIRE_RC(KRWLockUnlock(lock));
-    while (atomic32_read (&threadWaiting))
-    {
-        TestEnv::SleepMs(1);
-    }
-    REQUIRE_RC(threadRc);
-}
-
-FIXTURE_TEST_CASE(KWRLock_Reader_TimedAcquire_Timeout, KRWLockFixture)
-{
-    // lock 
-    REQUIRE_RC(KRWLockAcquireExcl(lock));
-    
-    // start a thread that tries to lock, see it time out
-    REQUIRE_RC(StartThread(false, 500));
-
-    // see the thread time out
-    while (atomic32_read (&threadWaiting))
-    {
-        TestEnv::SleepMs(1);
-    }
-    rc_t req_rc = RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcExhausted );
-    REQUIRE_EQ(threadRc, req_rc); // timed out
-    
-    REQUIRE_RC(KRWLockUnlock(lock));
-}
-
-FIXTURE_TEST_CASE(KWRLock_Writer_TimedAcquire, KRWLockFixture)
-{
-    // read-lock 
-    REQUIRE_RC(KRWLockAcquireShared(lock));
-    
-    // start a thread that tries to write-lock and see it wait
-    REQUIRE_RC(StartThread(true, 1000));
-    
-    // see the thread wait
-    TestEnv::SleepMs(300);
-    REQUIRE(atomic32_read (&threadWaiting));
-    
-    // unlock, see the thread finish
-    REQUIRE_RC(KRWLockUnlock(lock));
-    while (atomic32_read (&threadWaiting))
-    {
-        TestEnv::SleepMs(1);
-    }
-    REQUIRE_RC(threadRc);
-}
-
-FIXTURE_TEST_CASE(KWRLock_Writer_TimedAcquire_Timeout, KRWLockFixture)
-{
-    // read-lock 
-    REQUIRE_RC(KRWLockAcquireShared(lock));
-    
-    // start a thread that tries to write-lock, see it time out
-    REQUIRE_RC(StartThread(true, 500));
-    
-    // see the thread time out
-    while (atomic32_read (&threadWaiting))
-    {
-        TestEnv::SleepMs(1);
-    }
-    REQUIRE_EQ(threadRc, RC ( rcPS, rcRWLock, rcLocking, rcTimeout, rcExhausted )); // timed out
-    
-    REQUIRE_RC(KRWLockUnlock(lock));
-}
-
-//KCondition
-TEST_CASE( KCondition_NULL )
-{
-    REQUIRE_RC_FAIL(KConditionMake(NULL));
-}
-TEST_CASE( KCondition_MakeRelease )
-{
-    KCondition* cond;
-    REQUIRE_RC(KConditionMake(&cond));
-    REQUIRE_RC(KConditionRelease(cond));
-}
-
-///////////////////////// KQueue
-TEST_CASE( KQueue_NULL )
-{
-    REQUIRE_RC_FAIL(KQueueMake(NULL, 1));
-}
-
-TEST_CASE(KQueueSimpleTest) {
-    KQueue * queue = NULL;
-    REQUIRE_RC(KQueueMake(&queue, 2));
-
-    void *item = NULL;
-    {   // pushed 2 - popped 2 = ok
-        for (uint64_t i = 1; i < 3; ++i) {
-            item = (void*)i;
-            REQUIRE_RC(KQueuePush(queue, item, NULL));
-        }
-        for (uint64_t i = 1; i < 3; ++i) {
-            uint64_t j = 0;
-            REQUIRE_RC(KQueuePop(queue, &item, NULL));
-            j = (uint64_t)item;
-            REQUIRE_EQ(i, j);
-        }
-    }
-
-    {   // pushed 3 > capacity (failure) - popped 2 (ok)
-        for (uint64_t i = 1; i < 3; ++i) {
-            void *item = (void*)i;
-            REQUIRE_RC(KQueuePush(queue, item, NULL));
-        }
-        REQUIRE_RC_FAIL(KQueuePush(queue, item, NULL));
-        for (uint64_t i = 1; i < 3; ++i) {
-            uint64_t j = 0;
-            void *item = 0;
-            REQUIRE_RC(KQueuePop(queue, &item, NULL));
-            j = (uint64_t)item;
-            REQUIRE_EQ(i, j);
-        }
-    }
-
-    {   // pushed 2 = capacity (ok) - popped 3 >capacity (failure)
-        for (uint64_t i = 1; i < 3; ++i) {
-            void *item = (void*)i;
-            REQUIRE_RC(KQueuePush(queue, item, NULL));
-        }
-        for (uint64_t i = 1; i < 3; ++i) {
-            uint64_t j = 0;
-            void *item = 0;
-            REQUIRE_RC(KQueuePop(queue, &item, NULL));
-            j = (uint64_t)item;
-            REQUIRE_EQ(i, j);
-        }
-        REQUIRE_RC_FAIL(KQueuePop(queue, &item, NULL));
-    }
-
-    REQUIRE_RC(KQueueRelease(queue));
-}
-
-class KQueueFixture
-{
-public:
-    KQueueFixture()
-    :   threadRcs(NULL),
-        threads(NULL),
-        threadsData(NULL),
-        nThreads(32),
-        nStartedThreads(0),
-        sealed(false)
-    {
-        threads = (KThread**)malloc(sizeof(*threads) * nThreads);
-        if (threads == NULL)
-            throw logic_error("KQueueFixture: threads malloc failed");
-        threadsData = (ThreadData*)calloc(nThreads, sizeof(*threadsData));
-        if (threadsData == NULL)
-            throw logic_error("KQueueFixture: threadsData malloc failed");
-        threadRcs = (rc_t*)calloc(nThreads, sizeof(*threadRcs));
-        if (threadRcs == NULL)
-            throw logic_error("KQueueFixture: threadRcs calloc failed");
-        if (KQueueMake(&queue, nThreads) != 0)
-            throw logic_error("KQueueFixture: KQueueMake failed");
-    }
-    ~KQueueFixture()
-    {
-        if (threads != NULL)
-        {
-            for (unsigned i = 0; i < nStartedThreads; ++i)
-            {
-                if (threads[i] != 0 && KThreadRelease(threads[i]) != 0)
-                    throw logic_error("~KQueueFixture: KThreadRelease failed");
-            }
-        }
-        free(threads);
-        free(threadsData);
-        free(threadRcs);
-
-        if (KQueueRelease((const KQueue*)queue) != 0)
-            throw logic_error("~KQueueFixture: KQueueRelease failed");
-    }
-
-protected:
-    struct ThreadData {
-        KQueue * queue;
-        int tid;
-        size_t max_tid;
-        uint32_t timeout_ms;
-        bool is_reader;
-        bool finish; // will stop generating events and seal the queue once detected
-        bool allow_timeout; // if set, we won't treat timeout as an error
-    };
-
-    class Thread {
-    public:
-        // danger - this should be an extern "C" function
-        // with CC calling convention on Windows
-        static rc_t KQueue_ThreadFn ( const KThread *thread, void *data )
-        {
-            ThreadData* td = (ThreadData*)data;
-            rc_t rc = 0;
-            int numOps = 8192;
-
-            for (int i = 0; i < numOps; ++i)
-            {
-                timeout_t tm;
-                timeout_t* tm_p = td->timeout_ms == 0 ? NULL : &tm;
-                void * item;
-                if (tm_p != NULL)
-                rc = TimeoutInit(tm_p, td->timeout_ms);
-                if (rc != 0)
-                {
-                    LOG(LogLevel::e_fatal_error, "KQueue_ThreadFn: TimeoutInit failed\n");
-                    break;
-                }
-                if (td->finish)
-                {
-                    rc = KQueueSeal(td->queue);
-                    if (rc != 0)
-                        LOG(LogLevel::e_fatal_error, "KQueue_ThreadFn: failed to seal queue\n");
-                    break;
-                }
-                else if (td->is_reader)
-                {
-                    rc = KQueuePop(td->queue, &item, tm_p);
-                    if (rc == 0 && (item == NULL || (uint64_t)item > td->max_tid))
-                    {
-                        std::stringstream ss;
-                        ss << "KQueue_ThreadFn: KQueuePop returned invalid item: " << (uint64_t)item << "\n";
-                        LOG(LogLevel::e_fatal_error, ss.str().c_str());
-                        rc = RC(rcExe, rcQueue, rcValidating, rcItem, rcOutofrange);
-                        break;
-                    }
-                }
-                else
-                {
-                    item = reinterpret_cast<void*>(td->tid);
-                    rc = KQueuePush(td->queue, item, tm_p);
-                }
-
-                if (rc != 0)
-                {
-                    if (td->allow_timeout && GetRCObject ( rc ) == (enum RCObject)rcTimeout)
-                        rc = 0;
-                    else if (GetRCObject ( rc ) == (enum RCObject)rcData && GetRCState ( rc ) == rcDone)
-                        break;
-                    else if (GetRCObject ( rc ) == (enum RCObject)rcQueue && GetRCState ( rc ) == rcReadonly)
-                        break;
-                    else
-                    {
-                        LOGERR ( klogFatal, rc, "KQueue_ThreadFn: failed to push/pop to/from queue" );
-                        break;
-                    }
-                }
-
-            }
-
-            return rc;
-        }
-    };
-
-    void StartThread(bool is_reader, bool allow_timeout, uint32_t timeout_ms)
-    {
-        if (nStartedThreads >= nThreads)
-            throw logic_error("StartThread: too many threads requested");
-        if (sealed)
-            throw logic_error("StartThread: cannot start new thread, fixture is already sealed");
-
-        rc_t rc;
-        int tid = nStartedThreads++;
-        ThreadData* td;
-
-        td = &threadsData[tid];
-        td->tid = tid;
-        td->max_tid = nThreads - 1;
-        td->is_reader = is_reader;
-        td->allow_timeout = allow_timeout;
-        td->queue = queue;
-        td->timeout_ms = timeout_ms;
-        rc = KThreadMake(&threads[tid], Thread::KQueue_ThreadFn, td);
-        if (rc != 0)
-            throw logic_error("StartThread: KThreadMake failed");
-    }
-
-    void StartThreads(int numReaders, int numWriters, bool allow_timeout = true, uint32_t timeout_ms = 0)
-    {
-        if (numReaders + numWriters + nStartedThreads > nThreads)
-            throw logic_error("RunThreads: too many threads requested");
-        if (numReaders <= 0)
-            throw logic_error("RunThreads: please specify at least one reader");
-        if (numWriters <= 0)
-            throw logic_error("RunThreads: please specify at least one writer");
-
-        for (int i = 0; i < numReaders; ++i)
-        {
-            StartThread(true, allow_timeout, timeout_ms);
-        }
-        for (int i = 0; i < numWriters; ++i)
-        {
-            StartThread(false, allow_timeout, timeout_ms);
-        }
-    }
-
-    void WaitThreads(bool checkRcs = true)
-    {
-        rc_t rc = 0;
-        sealed = true;
-        for (unsigned i = 0; i < nStartedThreads; ++i)
-        {
-            rc_t rc2 = KThreadWait(threads[i], &threadRcs[i]);
-            if (rc2 != 0)
-            {
-                LOG(LogLevel::e_fatal_error, "KThreadWait: KThreadWait failed\n");
-                if (rc == 0)
-                    rc = rc2;
-            }
-        }
-        if (rc != 0)
-            throw logic_error("WaitThreads: KThreadWait failed");
-        if (checkRcs)
-            CheckThreadsRc();
-
-    }
-    void CheckThreadsRc()
-    {
-        for (unsigned i = 0; i < nStartedThreads; ++i)
-        {
-            if (threadRcs[i] != 0)
-                throw logic_error("CheckThreadsRc: thread returned unexpected exit code");
-        }
-    }
-
-public:
-    rc_t* threadRcs;
-    KThread** threads;
-    ThreadData* threadsData;
-    size_t nThreads;
-    size_t nStartedThreads;
-    KQueue* queue;
-    bool sealed;
-};
-
-FIXTURE_TEST_CASE(KQueue_Single_Reader_Single_Writer, KQueueFixture)
-{
-    StartThreads(1, 1);
-    WaitThreads();
-}
-
-FIXTURE_TEST_CASE(KQueue_Multi_Reader_Single_Writer, KQueueFixture)
-{
-    StartThreads(31, 1);
-    WaitThreads();
-}
-
-FIXTURE_TEST_CASE(KQueue_Single_Reader_Multi_Writer, KQueueFixture)
-{
-    StartThreads(1, 31);
-    WaitThreads();
-}
-
-FIXTURE_TEST_CASE(KQueue_Multi_Reader_Multi_Writer, KQueueFixture)
-{
-    StartThreads(16, 16, false, 5000);
-    WaitThreads();
-}
-
-FIXTURE_TEST_CASE(KQueue_Multi_Reader_Single_Writer_Seal, KQueueFixture)
-{
-    KTimeMs_t timeBefore = KTimeMsStamp();
-    const int numReaders = 31;
-    const int timeoutMs = 5000;
-    StartThreads(numReaders, 1, false, timeoutMs);
-    threadsData[numReaders].finish = true;
-    WaitThreads(false);
-    KTimeMs_t timeAfter = KTimeMsStamp();
-    for (unsigned i = 0; i < nStartedThreads; ++i)
-    {
-        rc_t expectedRc = (i == numReaders) ? 0 : SILENT_RC ( rcCont, rcQueue, rcRemoving, rcData, rcDone );
-        REQUIRE_EQ ( threadRcs[i], expectedRc );
-    }
-    REQUIRE_LT ( (int)(timeAfter - timeBefore), timeoutMs );
-}
-
-FIXTURE_TEST_CASE(KQueue_Single_Reader_Multi_Writer_Seal, KQueueFixture)
-{
-    KTimeMs_t timeBefore = KTimeMsStamp();
-    const int numWriters = 31;
-    const int timeoutMs = 5000;
-    StartThreads(1, numWriters, false, timeoutMs);
-    threadsData[0].finish = true;
-    WaitThreads(false);
-    KTimeMs_t timeAfter = KTimeMsStamp();
-    for (unsigned i = 0; i < nStartedThreads; ++i)
-    {
-        rc_t expectedRc = (i == 0) ? 0 : SILENT_RC ( rcCont, rcQueue, rcInserting, rcQueue, rcReadonly );
-        REQUIRE_EQ ( threadRcs[i], expectedRc );
-    }
-    REQUIRE_LT ( (int)(timeAfter - timeBefore), timeoutMs );
-}
-
-//TODO: KConditionWait, KConditionTimedWait, KConditionSignal, KConditionBroadcast
-
-//TODO: KSemaphore
-//TODO: Timeout
-//TODO: KBarrier (is it used anywhere? is there a Windows implementation?)
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-
-rc_t CC UsageSummary ( const char * progname )
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-
-const char UsageDefaultName[] = "test-kproc";
-
-static rc_t argsHandler(int argc, char* argv[]) {
-    Args* args = NULL;
-    rc_t rc = ArgsMakeAndHandle(&args, argc, argv, 0, NULL, 0);
-    ArgsWhack(args);
-    return rc;
-}
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-	// this makes messages from the test code appear
-	// (same as running the executable with "-l=message")
-	//TestEnv::verbosity = LogLevel::e_message;
-    
-    rc_t rc = KProcTestSuite( argc, argv );
-    return rc;
-}
-
-}
diff --git a/test/krypto/Makefile b/test/krypto/Makefile
deleted file mode 100644
index 67fb045..0000000
--- a/test/krypto/Makefile
+++ /dev/null
@@ -1,215 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-MODULE = test/krypto
-
-INT_TOOLS = \
-
-ifeq (linux,$(OS))
-INT_TOOLS += \
-	test-cipher-speed
-endif
-
-TEST_TOOLS = \
-	test-modes \
-	test-encdec \
-	test-reenc \
-#	test-csprng \ --- not even being compiled in ncbi-vdb, skipping for now
-
-ifeq (linux,$(OS))
-TEST_TOOLS += \
-	test-aes-ciphers
-endif
-
-SLOW_TEST_TOOLS= \
-	test-krypto-slow \
-
-EXT_TOOLS =
-
-ALL_TOOLS = \
-	$(INT_TOOLS) \
-	$(EXT_TOOLS) \
-	$(TEST_TOOLS) \
-	$(SLOW_TEST_TOOLS) \
-
-include $(TOP)/build/Makefile.env
-
-#-------------------------------------------------------------------------------
-# outer targets
-#
-all std: makedirs
-	@ $(MAKE_CMD) $(TARGDIR)/std
-
-$(ALL_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: all std $(ALL_TOOLS)
-
-#-------------------------------------------------------------------------------
-# std
-#
-$(TARGDIR)/std: \
-	$(addprefix $(TEST_BINDIR)/,$(ALL_TOOLS))
-
-.PHONY: $(TARGDIR)/std
-
-#-------------------------------------------------------------------------------
-# clean
-#
-clean: stdclean
-
-.PHONY: clean
-
-#-------------------------------------------------------------------------------
-# test encryption modes
-#
-TEST_MODES_SRC = \
-	test-modes
-
-TEST_MODES_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_MODES_SRC))
-
-TEST_MODES_LIB = \
-	-skapp \
-    -sncbi-vdb
-
-$(TEST_BINDIR)/test-modes: $(TEST_MODES_OBJ)
-	$(LD) --exe -o $@ $^ $(TEST_MODES_LIB)
-
-#-------------------------------------------------------------------------------
-# test AES encryption ciphers
-#
-TEST_AES_CIPHERS_SRC = \
-	test-aes-ciphers
-
-TEST_AES_CIPHERS_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_AES_CIPHERS_SRC))
-
-TEST_AES_CIPHERS_LIB = \
-	-skryptotest \
-	-skapp \
-    -sncbi-vdb
-
-$(TEST_BINDIR)/test-aes-ciphers: $(TEST_AES_CIPHERS_OBJ)
-	$(LD) --exe -o $@ $^ $(TEST_AES_CIPHERS_LIB)
-
-#-------------------------------------------------------------------------------
-# test cipher speed
-# run a null cipher and the aes cipher in all implmentations supported on the
-# test machine.
-# Comparing specific two versions will test possible speed gains from verious 
-# optimizations.  Comparing the null cipher (just a copy) versions against each
-# other offer insight into whether vector and vector register optimiztions are
-# beneficial and by how much
-#
-TEST_CIPHER_SPEED_SRC = \
-	test-cipher-speed
-
-TEST_CIPHER_SPEED_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_CIPHER_SPEED_SRC))
-
-TEST_CIPHER_SPEED_LIB = \
-	-skryptotest \
-	-skapp \
-    -sncbi-vdb
-
-$(TEST_BINDIR)/test-cipher-speed: $(TEST_CIPHER_SPEED_OBJ)
-	$(LD) --exe -o $@ $^ $(TEST_CIPHER_SPEED_LIB)
-
-#-------------------------------------------------------------------------------
-# test KCSPRng : cryptographically secure pseudo-random number generator
-#
-TEST_CSPRNG_SRC = \
-	test-csprng
-
-TEST_CSPRNG_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_CSPRNG_SRC))
-
-TEST_CSPRNG_LIB = \
-	-skapp \
-	-sncbi-vdb
-
-
-$(TEST_BINDIR)/test-csprng: $(TEST_CSPRNG_OBJ)
-	$(LD) --exe -o $@ $^ $(TEST_CSPRNG_LIB)
-
-#-------------------------------------------------------------------------------
-# test-encdec
-#
-TEST_ENCDEC_SRC = \
-	test-encdec \
-	test-cmn
-
-TEST_ENCDEC_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_ENCDEC_SRC))
-
-TEST_ENCDEC_LIB = \
-	-skapp \
-    -sncbi-vdb \
-    -sktst
-
-$(TEST_BINDIR)/test-encdec: $(TEST_ENCDEC_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_ENCDEC_LIB)
-
-#-------------------------------------------------------------------------------
-# test-reenc
-#
-TEST_REENC_SRC = \
-	test-reenc \
-	test-cmn
-
-TEST_REENC_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_REENC_SRC))
-
-TEST_REENC_LIB = \
-	-skapp \
-	-sncbi-vdb \
-	-sktst
-
-$(TEST_BINDIR)/test-reenc: $(TEST_REENC_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_REENC_LIB)
-
-#-------------------------------------------------------------------------------
-# test-krypto-slow
-#
-TEST_KRYPTO_SLOW_SRC = \
-	test-krypto-slow \
-	test-cmn
-
-TEST_KRYPTO_SLOW_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_KRYPTO_SLOW_SRC))
-
-TEST_KRYPTO_SLOW_LIB = \
-	-skapp \
-	-sncbi-vdb \
-	-sktst
-
-
-$(TEST_BINDIR)/test-krypto-slow: $(TEST_KRYPTO_SLOW_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_KRYPTO_SLOW_LIB)
-
diff --git a/test/krypto/test-aes-ciphers.c b/test/krypto/test-aes-ciphers.c
deleted file mode 100644
index 06d3712..0000000
--- a/test/krypto/test-aes-ciphers.c
+++ /dev/null
@@ -1,792 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-/*
- * don't compare inverse cipher when we know we are using 
- * equivalent inverse cipher
- */
-#define COMPARE_INV_CIPHER 0
-
-/*
- * do compare equivalent inverse cipher when we know we are using 
- * equivalent inverse cipher
- */
-#define COMPARE_EQ_INV_CIPHER 1
-
-#include <kapp/main.h>
-#include <kapp/args.h>
-
-#include <krypto/ciphermgr.h>
-#include <krypto/cipher.h>
-#include <krypto/cipher-test.h>
-#include "../../libs/krypto/blockcipher-priv.h"
-#include "../../libs/krypto/cipher-priv.h"
-#include "../../libs/krypto/cipher-impl.h"
-#include "../../libs/krypto/aes-priv.h"
-
-#include <klib/status.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/status.h>
-#include <klib/rc.h>
-#include <klib/defs.h>
-
-#include <byteswap.h>
-
-#include <string.h>
-#include <stdlib.h>
-
-/*
-  http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
-
-  http://www.inconteam.com/software-development/41-encryption/55-aes-test-vectors
-*/
-
-const char * types[]
-= 
-{
-    "AES byte",
-    "AES vector",
-    "AES vector register",
-    "AES accelerated(AES-NI)"
-};
-
-static const char * passed_string[] = {"DID NOT MATCH ++++++++++","matched"};
-
-int error_count;
-int test_count;
-int subtype_iterator;
-
-
-bool key_compare (const AES_KEY * control, const AES_KEY * test)
-{
-    uint32_t ix;
-    uint32_t limit;
-    bool passed_rounds = true;
-    bool passed_keys = true;
-
-    passed_rounds = (control->rounds == test->rounds);
-
-    STSMSG (4,("rounds:\t%d : %d\t%s\n", control->rounds, test->rounds,
-               passed_string[passed_rounds]));
-
-    limit = (control->rounds + 1) * 4;
-    for (ix = 0; ix < limit; ++ix)
-    {
-        bool this_key;
-
-        this_key = ((control->rd_key[ix] == bswap_32(test->rd_key[ix])) ||
-                    (control->rd_key[ix] == test->rd_key[ix]));
-
-        passed_keys = passed_keys && this_key;
-
-        STSMSG (4,("rd_key[%d]\t%0.8x : %0.8x\t%s\n",
-                   ix, control->rd_key[ix], test->rd_key[ix],
-                   passed_string[this_key]));
-    }
-
-    return passed_rounds && passed_keys;
-}
-
-
-bool block_compare (const uint8_t control [16], const uint8_t test [16])
-{
-    uint32_t ix;
-    bool passed = true;
-
-    for (ix = 0; ix < 16; ++ix)
-    {
-        bool passed_this;
-
-        passed_this = (control[ix] == test[ix]);
-
-        passed = passed && passed_this;
-
-        STSMSG (4,("byte %u: control %0.2x test %0.2x %s\n",
-                   ix, 
-                   control[ix], test[ix],
-                   passed_string[passed_this]));
-    }
-    return passed;
-}
-
-
-typedef struct key_expansion
-{
-    uint8_t key [32];
-    AES_KEY key_schedule;
-    unsigned Nk;
-} key_expansion;
-
-
-const key_expansion  a_1 = 
-{
-    {
-        0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
-        0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c
-    },
-    {
-        {
-            0x16157e2b, 0xa6d2ae28, 0x8815f7ab, 0x3c4fcf09,
-            0x17fefaa0, 0xb12c5488, 0x3939a323, 0x05766c2a,
-            0xf295c2f2, 0x43b9967a, 0x7a803559, 0x7ff65973,
-            0x7d47803d, 0x3efe1647, 0x447e231e, 0x3b887a6d,
-            0x41a544ef, 0x7f5b52a8, 0x3b2571b6, 0x00ad0bdb,
-            0xf8c6d1d4, 0x879d837c, 0xbcb8f2ca, 0xbc15f911,
-            0x7aa3886d, 0xfd3e0b11, 0x4186f9db, 0xfd9300ca,
-            0x0ef7544e, 0xf3c95f5f, 0xb24fa684, 0x4fdca64e,
-            0x2173d2ea, 0xd2ba8db5, 0x60f52b31, 0x2f298d7f,
-            0xf36677ac, 0x21dcfa19, 0x4129d128, 0x6e005c57,
-            0xa8f914d0, 0x8925eec9, 0xc80c3fe1, 0xa60c63b6
-        },
-        10
-    },
-    16
-};
-
-
-const key_expansion a_2 = {
-    { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
-      0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
-      0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b },
-    { 
-        { 0xf7b0738e, 0x52640eda, 0x2bf310c8, 0xe5799080, /* 0-3 */
-          0xd2eaf862, 0x7b6b2c52, 0xf7910cfe, 0xa5f50224, /* 4-7 */
-          0x8e0612ec, 0x6b7f826c, 0xb9957a0e, 0xc2fe565c, /* 8-11 */
-          0xbdb4b74d, 0x1841b569, 0x9647a785, 0xfd3825e9, /* 12-15 */
-          0x44ad5fe7, 0x865309bb, 0x57f05a48, 0x4fb1ef21, /* 16-19 */
-          0xd9f648a4, 0x24ce6d4d, 0x606332aa, 0xe6303b11, /* 20-23 */
-          0xd57e5ea2, 0x9acfb183, 0x4339f927, 0x67f7946a, /* 24-27 */
-          0x0794a6c0, 0xe1a49dd1, 0xeb8617ec, 0x7149a66f, /* 28-31 */
-          0x32705f48, 0x5587cb22, 0x52136de2, 0xb3b7f033, /* 32-35 */
-          0x28ebbe40, 0x59a2182f, 0x6bd24767, 0x3e558c45, /* 36-39 */
-          0x6c46e1a7, 0xdff11194, 0x0a751f82, 0x53d707ad, /* 40-43 */
-          0x380540ca, 0x0650cc8f, 0x6a162d28, 0xb5e73cbc, /* 44-47 */
-          0x6fa08be9, 0x3c778c44, 0x0472cc8e, 0x02220001  /* 48-51 */
-        },
-        12
-    },
-    24
-};
-
-const key_expansion a_3 = {
-    { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
-      0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
-      0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7,
-
-      0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4 },
-    {    { 0x10eb3d60, 0xbe71ca15, 0xf0ae732b, 0x81777d85,
-           0x072c351f, 0xd708613b, 0xa310982d, 0xf4df1409,
-           0x1154a39b, 0xaf25698e, 0x5f8b1aa5, 0xdefc6720,
-           0x1a9cb0a8, 0xcd94d193, 0x6e8449be, 0x9a5b5db7,
-           0xb8ec9ad5, 0x17c9f35b, 0x4842e9fe, 0x96be8ede,
-           0x8a32a9b5, 0x47a67826, 0x29223198, 0xb3796c2f,
-           0xad812c81, 0xba48dfda, 0xf20a3624, 0x64b4b8fa,
-           0xc9bfc598, 0x8e19bdbe, 0xa73b8c26, 0x1442e009,
-           0xac7b0068, 0x1633dfb2, 0xe439e996, 0x808d516c,
-           0x04e214c8, 0x8afba976, 0x2dc02550, 0x3982c559,
-           0x676913de, 0x715acc6c, 0x956325fa, 0x15ee7496,
-           0x5dca8658, 0xd7312f2e, 0xfaf10a7e, 0xc373cf27,
-           0xab479c74, 0xda1d5018, 0x4f7e75e2, 0x5a900174,
-           0xe3aafaca, 0x349bd5e4, 0xce6adf9a, 0x0d1910bd,
-           0xd19048fe, 0x0b8d18e6, 0x44f36d04, 0x1e636c70, },
-         14
-    },
-    32
-};
-
-bool KeyExpansion (KCipher * cipher, const key_expansion * ke)
-{
-    rc_t rc;
-
-    rc = KCipherSetEncryptKey (cipher, ke->key, ke->Nk);
-    if (rc)
-    {
-        STSMSG (1,("Could not run test"));
-        return false;
-    }
-    else
-    {
-        return (key_compare (&ke->key_schedule, cipher->encrypt_key));
-    }
-}
-
-
-typedef struct cipher_example
-{
-    uint8_t key [16];
-    AES_KEY key_schedule;
-    uint8_t plain [16];
-    uint8_t cipher [16];
-} cipher_example;
-
-const cipher_example b = 
-{
-    { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
-      0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c
-    },
-    {
-        { 0x16157e2b, 0xa6d2ae28, 0x8815f7ab, 0x3c4fcf09,
-          0x17fefaa0, 0xb12c5488, 0x3939a323, 0x05766c2a,
-          0xf295c2f2, 0x43b9967a, 0x7a803559, 0x7ff65973,
-          0x7d47803d, 0x3efe1647, 0x447e231e, 0x3b887a6d,
-          0x41a544ef, 0x7f5b52a8, 0x3b2571b6, 0x00ad0bdb,
-          0xf8c6d1d4, 0x879d837c, 0xbcb8f2ca, 0xbc15f911,
-          0x7aa3886d, 0xfd3e0b11, 0x4186f9db, 0xfd9300ca,
-          0x0ef7544e, 0xf3c95f5f, 0xb24fa684, 0x4fdca64e,
-          0x2173d2ea, 0xd2ba8db5, 0x60f52b31, 0x2f298d7f,
-          0xf36677ac, 0x21dcfa19, 0x4129d128, 0x6e005c57,
-          0xa8f914d0, 0x8925eec9, 0xc80c3fe1, 0xa60c63b6 },
-        10
-    },
-    {
-        
-        0x32, 0x43, 0xF6, 0xA8, 0x88, 0x5A, 0x30, 0x8D,
-        0x31, 0x31, 0x98, 0xA2, 0xE0, 0x37, 0x07, 0x34
-    },
-    {
-        0x39, 0x25, 0x84, 0x1D, 0x02, 0xDC, 0x09, 0xFB,
-        0xDC, 0x11, 0x85, 0x97, 0x19, 0x6A, 0x0B, 0x32
-    }
-};
-
-
-bool CipherExample (KCipher * cipher)
-{
-    uint8_t cipher_text [16];
-    rc_t rc;
-    bool passed_key;
-    bool passed_block;
-
-    memset (cipher_text, 0, sizeof cipher_text);
-
-    rc = KCipherSetEncryptKey (cipher, b.key, 128/8);
-    if (rc)
-        ;
-    else
-    {
-        passed_key = key_compare (&b.key_schedule, cipher->encrypt_key);
-        rc = KCipherEncrypt (cipher, b.plain, cipher_text);
-        if (rc)
-            ;
-        else
-        {
-            passed_block = block_compare (b.cipher, cipher_text);
-        }
-    }
-    if (rc)
-    {
-        STSMSG (1,("Could not run test"));
-        return false;
-    }
-    return passed_key && passed_block;
-}
-
-typedef struct example_vectors
-{
-    uint8_t plain [16];
-    uint8_t key [32];
-    uint8_t cipher [16];
-    AES_KEY key_enc;
-    AES_KEY key_dec;
-    AES_KEY key_dec_alt;
-} example_vectors;
-
-
-example_vectors c_1 = 
-{
-    /* Plain text */
-    {
-        0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff
-    },
-    /* User Key */
-    {
-        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f
-    },
-    /* Cipher Text */
-    {
-        0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x04, 0x30, 0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a
-    },
-    {
-/* EncKey */
-        {
-
-
-            0x03020100, 0x07060504, 0x0b0a0908, 0x0f0e0d0c,
-            0xfd74aad6, 0xfa72afd2, 0xf178a6da, 0xfe76abd6,
-            0x0bcf92b6, 0xf1bd3d64, 0x00c59bbe, 0xfeb33068,
-            0x4e74ffb6, 0xbfc9c2d2, 0xbf0c596c, 0x41bf6904,
-            0xbcf7f747, 0x033e3595, 0xbc326cf9, 0xfd8d05fd,
-            0xe8a3aa3c, 0xeb9d9fa9, 0x57aff350, 0xaa22f6ad,
-            0x7d0f395e, 0x9692a6f7, 0xc13d55a7, 0x6b1fa30a,
-            0x1a70f914, 0x8ce25fe3, 0x4ddf0a44, 0x26c0a94e,
-            0x35874347, 0xb9651ca4, 0xf4ba16e0, 0xd27abfae,
-            0xd1329954, 0x685785f0, 0x9ced9310, 0x4e972cbe,
-            0x7f1d1113, 0x174a94e3, 0x8ba707f3, 0xc5302b4d
-        },
-        10
-    },
-    {
-/* DecKey */
-        {
-            0x7f1d1113, 0x174a94e3, 0x8ba707f3, 0xc5302b4d,
-            0xd1329954, 0x685785f0, 0x9ced9310, 0x4e972cbe,
-            0x35874347, 0xb9651ca4, 0xf4ba16e0, 0xd27abfae,
-            0x1a70f914, 0x8ce25fe3, 0x4ddf0a44, 0x26c0a94e,
-            0x7d0f395e, 0x9692a6f7, 0xc13d55a7, 0x6b1fa30a,
-            0xe8a3aa3c, 0xeb9d9fa9, 0x57aff350, 0xaa22f6ad,
-            0xbcf7f747, 0x033e3595, 0xbc326cf9, 0xfd8d05fd,
-            0x4e74ffb6, 0xbfc9c2d2, 0xbf0c596c, 0x41bf6904,
-            0x0bcf92b6, 0xf1bd3d64, 0x00c59bbe, 0xfeb33068,
-            0xfd74aad6, 0xfa72afd2, 0xf178a6da, 0xfe76abd6,
-            0x03020100, 0x07060504, 0x0b0a0908, 0x0f0e0d0c
-        },
-        10
-    },
-    {
-/* EquivDecKey */
-        {
-            0x7f1d1113, 0x174a94e3, 0x8ba707f3, 0xc5302b4d,
-            0xbe29aa13, 0xf6af8f9c, 0x80f570f7, 0x03bff700,
-            0x63a46213, 0x4886258f, 0x765aff6b, 0x834a87f7,
-            0x74fc828d, 0x2b22479c, 0x3edcdae4, 0xf510789c,
-            0x8d09e372, 0x5fdec511, 0x15fe9d78, 0xcbcca278,
-            0x2710c42e, 0xd2d72663, 0x4a205869, 0xde323f00,
-            0x04f5a2a8, 0xf5c7e24d, 0x98f77e0a, 0x94126769,
-            0x91e3c6c7, 0xf13240e5, 0x6d309c47, 0x0ce51963,
-            0x9902dba0, 0x60d18622, 0x9c02dca2, 0x61d58524,
-            0xf0df568c, 0xf9d35d82, 0xfcd35a80, 0xfdd75986,
-            0x03020100, 0x07060504, 0x0b0a0908, 0x0f0e0d0c,
-        },
-        10
-    }
-};
-
-example_vectors c_2 = 
-{
-    /* Plain text */
-    {
-        0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff
-    },
-    /* User Key */
-    {
-        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
-        0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17
-    },
-    /* Cipher Text */
-    {
-        0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0, 0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91
-    },
-    {
-/* EncKey */
-        {
-            0x03020100, 0x07060504, 0x0b0a0908, 0x0f0e0d0c,
-            0x13121110, 0x17161514, 0xf9f24658, 0xfef4435c,
-            0xf5fe4a54, 0xfaf04758, 0xe9e25648, 0xfef4435c,
-            0xb349f940, 0x4dbdba1c, 0xb843f048, 0x42b3b710,
-            0xab51e158, 0x55a5a204, 0x41b5ff7e, 0x0c084562,
-            0xb44bb52a, 0xf6f8023a, 0x5da9e362, 0x080c4166,
-            0x728501f5, 0x7e8d4497, 0xcac6f1bd, 0x3c3ef387,
-            0x619710e5, 0x699b5183, 0x9e7c1534, 0xe0f151a3,
-            0x2a37a01e, 0x16095399, 0x779e437c, 0x1e0512ff,
-            0x880e7edd, 0x68ff2f7e, 0x42c88f60, 0x54c1dcf9,
-            0x235f9f85, 0x3d5a8d7a, 0x5229c0c0, 0x3ad6efbe,
-            0x781e60de, 0x2cdfbc27, 0x0f8023a2, 0x32daaed8,
-            0x330a97a4, 0x09dc781a, 0x71c218c4, 0x5d1da4e3
-        },
-        12
-    },
-    {
-/* DecKey */
-        {
-            0x330a97a4, 0x09dc781a, 0x71c218c4, 0x5d1da4e3,
-        },
-        12
-    },
-    {
-/* EquivDecKey */
-        {
-            0x330a97a4, 0x09dc781a, 0x71c218c4, 0x5d1da4e3,
-            0x0dbdbed6, 0x49ea09c2, 0x8073b04d, 0xb91b023e,
-            0xc999b98f, 0x3968b273, 0x9dd8f9c7, 0x728cc685,
-            0xc16e7df7, 0xef543f42, 0x7f317853, 0x4457b714,
-            0x90654711, 0x3b66cf47, 0x8dce0e9b, 0xf0f10bfc,
-            0xb6a8c1dc, 0x7d3f0567, 0x4a195ccc, 0x2e3a42b5,
-            0xabb0dec6, 0x64231e79, 0xbe5f05a4, 0xab038856,
-            0xda7c1bdd, 0x155c8df2, 0x1dab498a, 0xcb97c4bb,
-            0x08f7c478, 0xd63c8d31, 0x01b75596, 0xcf93c0bf,
-            0x10efdc60, 0xce249529, 0x15efdb62, 0xcf20962f,
-            0xdbcb4e4b, 0xdacf4d4d, 0xc7d75257, 0xdecb4949,
-            0x1d181f1a, 0x191c1b1e, 0xd7c74247, 0xdecb4949,
-            0x03020100, 0x07060504, 0x0b0a0908, 0x0f0e0d0c
-        },
-        12
-    }
-};
-
-example_vectors c_3 = 
-{
-    /* Plain text */
-    {
-        0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff
-    },
-    /* User Key */
-    {
-        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
-        0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
-    },
-    /* Cipher Text */
-    {
-        0x8e, 0xa2, 0xb7, 0xca, 0x51, 0x67, 0x45, 0xbf, 0xea, 0xfc, 0x49, 0x90, 0x4b, 0x49, 0x60, 0x89
-    },
-    {
-/* EncKey */
-        {
-            0x03020100, 0x07060504, 0x0b0a0908, 0x0f0e0d0c,
-            0x13121110, 0x17161514, 0x1b1a1918, 0x1f1e1d1c,
-            0x9fc273a5, 0x98c476a1, 0x93ce7fa9, 0x9cc072a5,
-            0xcda85116, 0xdabe4402, 0xc1a45d1a, 0xdeba4006,
-            0xf0df87ae, 0x681bf10f, 0xfbd58ea6, 0x6715fc03,
-            0x48f1e16d, 0x924fa56f, 0x53ebf875, 0x8d51b873,
-            0x7f8256c6, 0x1799a7c9, 0xec4c296f, 0x8b59d56c,
-            0x753ae23d, 0xe7754752, 0xb49ebf27, 0x39cf0754,
-            0x5f90dc0b, 0x48097bc2, 0xa44552ad, 0x2f1c87c1,
-            0x60a6f545, 0x87d3b217, 0x334d0d30, 0x0a820a64,
-            0x1cf7cf7c, 0x54feb4be, 0xf0bbe613, 0xdfa761d2,
-            0xfefa1af0, 0x7929a8e7, 0x4a64a5d7, 0x40e6afb3,
-            0x71fe4125, 0x2500f59b, 0xd5bb1388, 0x0a1c725a,
-            0x99665a4e, 0xe04ff2a9, 0xaa2b577e, 0xeacdf8cd,
-            0xcc79fc24, 0xe97909bf, 0x3cc21a37, 0x36de686d
-        },
-        14
-    },
-    {
-/* DecKey */
-        {
-
-
-            0x03020100, 0x07060504, 0x0b0a0908, 0x0f0e0d0c
-        },
-        14
-    },
-    {
-/* EquivDecKey */
-        {
-            0xcc79fc24, 0xe97909bf, 0x3cc21a37, 0x36de686d,
-            0xffd1f134, 0x2faacebf, 0x5fe2e9fc, 0x6e015825,
-            0xeb48165e, 0x0a354c38, 0x46b77175, 0x84e680dc,
-            0x8005a3c8, 0xd07b3f8b, 0x70482743, 0x31e3b1d9,
-            0x138e70b5, 0xe17d5a66, 0x4c823d4d, 0xc251f1a9,
-            0xa37bda74, 0x507e9c43, 0xa03318c8, 0x41ab969a,
-            0x1597a63c, 0xf2f32ad3, 0xadff672b, 0x8ed3cce4,
-            0xf3c45ff8, 0xf3054637, 0xf04d848b, 0xe1988e52,
-            0x9a4069de, 0xe7648cef, 0x5f0c4df8, 0x232cabcf,
-            0x1658d5ae, 0x00c119cf, 0x0348c2bc, 0x11d50ad9,
-            0xbd68c615, 0x7d24e531, 0xb868c117, 0x7c20e637,
-            0x0f85d77f, 0x1699cc61, 0x0389db73, 0x129dc865,
-            0xc940282a, 0xc04c2324, 0xc54c2426, 0xc4482720,
-            0x1d181f1a, 0x191c1b1e, 0x15101712, 0x11141316,
-            0x03020100, 0x07060504, 0x0b0a0908, 0x0f0e0d0c
-        },
-        14
-    }
-};
-
-bool ExampleVector (KCipher * cipher, const example_vectors * ev)
-{
-    uint8_t cipher_text [16];
-    uint8_t plain_text [16];
-    uint32_t Nk;
-    rc_t rc;
-    bool passed_enckey;
-    bool passed_deckey;
-    bool passed_enc;
-    bool passed_dec;
-
-    switch (ev->key_enc.rounds)
-    {
-    default:
-        STSMSG (1,("Bad test vector"));
-        return false;
-    case 10:
-        Nk = 16;
-        break;
-    case 12:
-        Nk = 24;
-        break;
-    case 14:
-        Nk = 32;
-        break;
-    }
-
-    memset (cipher_text, 0, sizeof cipher_text);
-    memset (plain_text, 0, sizeof plain_text);
-
-    rc = KCipherSetEncryptKey (cipher, ev->key, Nk);
-    if (rc)
-        ;
-    else
-    {
-        passed_enckey = key_compare (&ev->key_enc, cipher->encrypt_key);
-
-        rc = KCipherSetDecryptKey (cipher, ev->key, Nk);
-        if (rc)
-            ;
-        else
-        {
-#if COMPARE_INV_CIPHER
-            passed_deckey = key_compare (&ev->key_dec, cipher->decrypt_key);
-#endif
-#if COMPARE_EQ_INV_CIPHER
-            passed_deckey = key_compare (&ev->key_dec_alt, cipher->decrypt_key);
-#endif
-
-            rc = KCipherEncrypt (cipher, ev->plain, cipher_text);
-            if (rc)
-                ;
-            else
-            {
-                passed_enc = block_compare (ev->cipher, cipher_text);
-                
-                rc = KCipherDecrypt (cipher, ev->cipher, plain_text);
-                if (rc)
-                    ;
-                else
-                {
-                    passed_dec = block_compare (ev->plain, plain_text);
-                }
-            }
-        }
-    }
-    if (rc)
-    {
-        STSMSG (1,("Could not run test"));
-        return false;
-    }
-    return passed_enckey && passed_deckey && passed_enc && passed_dec;
-}
-
-
-/* ==================================================== */
-
-/* typedef uint8_t VVV __attribute__ ((vector_size (16))); unused and non-portable */ 
-
-bool run_one (KCipher * cipher)
-{
-    bool p_a_1 = true;
-    bool p_a_2 = true;
-    bool p_a_3 = true;
-    bool p_b = true;
-    bool p_c_1 = true;
-    bool p_c_2 = true;
-    bool p_c_3 = true;
-
-    STSMSG (2,("Appendix A - Key Expansion Examples"));
-    STSMSG (3,("A.1 Expansion of a 128-bit Cipher Key"));
-    p_a_1 = KeyExpansion (cipher, &a_1);
-    ++test_count;
-    if (p_a_1 == false)
-    {
-        STSMSG (1,("TEST FAILED"));
-        ++error_count;
-    }
-
-    STSMSG (3,("A.2 Expansion of a 192-bit Cipher Key"));
-    p_a_2 = KeyExpansion (cipher, &a_2);
-    ++test_count;
-    if (p_a_2 == false)
-    {
-        STSMSG (1,("TEST FAILED"));
-        ++error_count;
-    }
-
-    STSMSG (3,("A.3 Expansion of a 256-bit Cipher Key"));
-    p_a_3 = KeyExpansion (cipher, &a_3);
-    ++test_count;
-    if (p_a_3 == false)
-    {
-        STSMSG (1,("TEST FAILED"));
-        ++error_count;
-    }
-
-    STSMSG (2,("Appendix B - Cipher Example"));
-    p_b = CipherExample (cipher);
-    ++test_count;
-    if (p_b == false)
-    {
-        STSMSG (1,("TEST FAILED"));
-        ++error_count;
-    }
-
-    STSMSG (2,("Appendix C - Example Vectors"));
-    STSMSG (3,("C.1 AES-128 (Nk=4, Nr=10)"));
-    p_c_1 = ExampleVector (cipher, &c_1);
-    ++test_count;
-    if (p_c_1 == false)
-    {
-        STSMSG (1,("TEST FAILED"));
-        ++error_count;
-    }
-
-    STSMSG (3,("C.2 AES-192 (Nk=6, Nr=12)"));
-    p_c_2 = ExampleVector (cipher, &c_2);
-    ++test_count;
-    if (p_c_2 == false)
-    {
-        STSMSG (1,("TEST FAILED"));
-        ++error_count;
-    }
-
-    STSMSG (3,("C.3 AES-256 (Nk=8, Nr=14)"));
-    p_c_3= ExampleVector (cipher, &c_3);
-    ++test_count;
-    if (p_c_3 == false)
-    {
-        STSMSG (1,("TEST FAILED"));
-        ++error_count;
-    }
-
-    return p_a_1 && p_a_2 && p_a_3 && p_b && p_c_1 && p_c_2 && p_c_3;
-}
-
-
-rc_t run ()
-{
-    KCipher * cipher;
-    rc_t rc = 0, orc = 0;
-
-#if 1
-    subtype_iterator = 0;
-
-    STSMSG (1, ("======================================================================"));
-    STSMSG (1, ("%d: %s\n", subtype_iterator, types[subtype_iterator]));
-    rc = KCipherTestByteMake (&cipher, kcipher_AES);
-    if (rc == 0)
-    {
-        run_one (cipher);
-        KCipherRelease (cipher);
-    }
-    else if (GetRCState(rc) == rcUnsupported)
-        STSMSG (1, ("Not supported on this machine"));
-    else
-        orc = rc;
-#endif
-#if 1
-    subtype_iterator = 1;
-    STSMSG (1, ("======================================================================"));
-    STSMSG (1, ("%d: %s\n", subtype_iterator, types[subtype_iterator]));
-    rc = KCipherTestVecMake (&cipher, kcipher_AES);
-    if (rc == 0)
-    {
-        run_one (cipher);
-        KCipherRelease (cipher);
-    }
-    else if (GetRCState(rc) == rcUnsupported)
-        STSMSG (1, ("Not supported on this machine"));
-    else
-        orc = rc;
-#endif
-#if 1
-    subtype_iterator = 2;
-    STSMSG (1, ("======================================================================"));
-    STSMSG (1, ("%d: %s\n", subtype_iterator, types[subtype_iterator]));
-    rc = KCipherTestVecRegMake (&cipher, kcipher_AES);
-    if (rc == 0)
-    {
-        run_one (cipher);
-        KCipherRelease (cipher);
-    }
-    else if (GetRCState(rc) == rcUnsupported)
-        STSMSG (1, ("Not supported on this machine"));
-    else
-        orc = rc;
-#endif
-#if 1
-    subtype_iterator = 3;
-    STSMSG (1, ("======================================================================"));
-    STSMSG (1, ("%d: %s\n", subtype_iterator, types[subtype_iterator]));
-    rc = KCipherTestVecAesNiMake (&cipher, kcipher_AES);
-    if (rc == 0)
-    {
-        run_one (cipher);
-        KCipherRelease (cipher);
-    }
-    else if (GetRCState(rc) == rcUnsupported)
-        STSMSG (1, ("Not supported on this machine"));
-    else
-        orc = rc;
-#endif
-    return orc;
-}
-
-
-rc_t CC UsageSummary  (const char * progname)
-{
-    return 0;
-}
-
-
-const char UsageDefaultName[] = "test-aes_ciphers";
-rc_t CC Usage (const Args * args)
-{
-    return KOutMsg ("\n"
-                    "Usage:\n"
-                    "  %s [OPTIONS]\n"
-                    "\n"
-                    "Summary:\n"
-                    "  Test all of the AES Ciphers we support.\n"
-                    "  use -v one or more times for more details.\n"
-                    "  Exit is the number of attempted tests that failed\n",
-                    UsageDefaultName);
-}
-
-
-ver_t CC KAppVersion (void)
-{
-    return 0;
-}
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args * args;
-    rc_t rc;
-
-
-    rc = ArgsMakeAndHandle (&args, argc, argv, 0);
-    if (rc == 0)
-    {
-        STSMSG (3, ("Starting tests",__func__));
-
-        error_count = 0;
-        rc = run();
-    }
-
-    if (error_count)
-        STSMSG (0, ("Failed %d tests of %d run out of 28 possible",error_count, test_count));
-    else
-        STSMSG (0, ("Passed %d tests out of 28 possible\n", test_count));
-    if (rc)
-        LOGERR (klogErr, rc, "Exiting with a failure status");
-    exit (error_count);
-}
diff --git a/test/krypto/test-cipher-speed.c b/test/krypto/test-cipher-speed.c
deleted file mode 100644
index 99f1a8e..0000000
--- a/test/krypto/test-cipher-speed.c
+++ /dev/null
@@ -1,910 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <kapp/main.h>
-#include <kapp/args.h>
-
-#include <krypto/ciphermgr.h>
-#include <krypto/cipher.h>
-#include <krypto/cipher-test.h>
-
-#include <klib/status.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/status.h>
-#include <klib/rc.h>
-#include <klib/defs.h>
-
-
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-
-/* #define DEFAULT_TIMER (5*60) */
-#define DEFAULT_TIMER (5)
-
-#define OPTION_TIMER  "timer"
-#define ALIAS_TIMER   "t"
-
-const char * timer_usage[] = 
-{ "time per function in seconds", "Default is 5 seconds", NULL };
-
-OptDef Options[] = 
-{
-    { OPTION_TIMER, ALIAS_TIMER, NULL, timer_usage, 1, true, false }
-};
-
-struct KBlockCipher;
-
-const char * cipher_subtypes[] = 
-{
-    "byte",
-    "vector",
-    "vec-reg",
-    "AES-NI"
-/*     "byte", */
-/*     "vector", */
-/*     "vector register", */
-/*     "accelerated(AES-NI)" */
-};
-
-
-const char * cipher_types[] = 
-{
-    "null",
-    "AES"
-/*     "null (copy) cipher", */
-/*     "AES cipher" */
-};
-
-rc_t ((* make_functions[4])(KCipher **, kcipher_type)) = 
-{
-    KCipherTestByteMake,
-    KCipherTestVecMake,
-    KCipherTestVecRegMake,
-    KCipherTestVecAesNiMake
-};
-
-char user_key   [32];
-char cipher_block [32*1024];
-
-
-/* not at all critical that randomness is high */
-void random_cipher_block ()
-{
-    unsigned ix;
-
-    srand (1);
-    
-    for (ix = 0; ix < sizeof cipher_block; ++ix)
-        cipher_block[ix] = (char)rand();
-}
-
-
-rc_t function_timer (rc_t (*function)(KCipher * cipher), KCipher * ciphers[16], uint64_t * pcount, clock_t timer)
-{
-    uint64_t count;
-    rc_t rc = 0;
-    clock_t start;
-    clock_t end;
-    clock_t now;
-
-    random_cipher_block();
-
-    now = start = clock();
-    end = start + (clock_t)(timer * CLOCKS_PER_SEC);
-
-    for (count = 0; now < end; ++count)
-    {
-        rc = function(ciphers[count&15]);
-        if (rc)
-            break;
-        now = clock();
-    }
-    *pcount = count;
-    return rc;
-}
-
-
-rc_t set_encrypt_key_function_128 (KCipher * cipher)
-{
-    static unsigned ix;
-
-    /* just getting some random data - value shouldn't matter much */
-    if (++ix > sizeof cipher_block - 16)
-        ix = 0;
-   
-    memmove (user_key, cipher_block + ix, sizeof user_key);
-    return KCipherSetEncryptKey (cipher, user_key, 16);
-}
-
-
-rc_t set_encrypt_key_function_192 (KCipher * cipher)
-{
-    static unsigned ix;
-
-    /* just getting some random data - value shouldn't matter much */
-    if (++ix > sizeof cipher_block - 24)
-        ix = 0;
-
-    memmove (user_key, cipher_block + ix, sizeof user_key);
-    return KCipherSetEncryptKey (cipher, user_key, 24);
-}
-
-
-rc_t set_encrypt_key_function_256 (KCipher * cipher)
-{
-    static unsigned ix;
-
-    /* just getting some random data - value shouldn't matter much */
-    if (++ix > sizeof cipher_block - 32)
-        ix = 0;
-
-    memmove (user_key, cipher_block + ix, sizeof user_key);
-    return KCipherSetEncryptKey (cipher, user_key, 32);
-}
-
-
-rc_t set_decrypt_key_function_128 (KCipher * cipher)
-{
-    static unsigned ix;
-
-    /* just getting some random data - value shouldn't matter much */
-    if (++ix > sizeof cipher_block - 16)
-        ix = 0;
-   
-    memmove (user_key, cipher_block + ix, sizeof user_key);
-    return KCipherSetDecryptKey (cipher, user_key, 16);
-}
-
-
-rc_t set_decrypt_key_function_192 (KCipher * cipher)
-{
-    static unsigned ix;
-
-    /* just getting some random data - value shouldn't matter much */
-    if (++ix > sizeof cipher_block - 24)
-        ix = 0;
-
-    memmove (user_key, cipher_block + ix, sizeof user_key);
-    return KCipherSetDecryptKey (cipher, user_key, 24);
-}
-
-
-rc_t set_decrypt_key_function_256 (KCipher * cipher)
-{
-    static unsigned ix;
-
-    /* just getting some random data - value shouldn't matter much */
-    if (++ix > sizeof cipher_block - 32)
-        ix = 0;
-
-    memmove (user_key, cipher_block + ix, sizeof user_key);
-    return KCipherSetDecryptKey (cipher, user_key, 32);
-}
-
-
-rc_t encrypt_function (KCipher * cipher)
-{
-    static unsigned ix;
-
-    /* just getting some random data - value shouldn't matter much */
-    if (++ix > sizeof cipher_block - 16)
-        ix = 0;
-   
-    return KCipherEncrypt (cipher, cipher_block + ix, cipher_block + ix);
-}
-
-
-rc_t decrypt_function (KCipher * cipher)
-{
-    static unsigned ix;
-
-    /* just getting some random data - value shouldn't matter much */
-    if (++ix > sizeof cipher_block - 16)
-        ix = 0;
-   
-    return KCipherDecrypt (cipher, cipher_block + ix, cipher_block + ix);
-}
-
-
-rc_t ecb_encrypt_function (KCipher * cipher)
-{
-    static unsigned ix;
-
-    /* just getting some random data - value shouldn't matter much */
-    if (++ix > sizeof cipher_block - 16)
-        ix = 0;
-   
-    return KCipherEncryptECB (cipher, cipher_block, cipher_block, sizeof (cipher_block) / 16);
-}
-
-
-rc_t ecb_decrypt_function (KCipher * cipher)
-{
-    static unsigned ix;
-
-    /* just getting some random data - value shouldn't matter much */
-    if (++ix > sizeof cipher_block - 16)
-        ix = 0;
-   
-    return KCipherDecryptECB (cipher, cipher_block, cipher_block, sizeof (cipher_block) / 16);
-}
-
-
-rc_t cbc_encrypt_function (KCipher * cipher)
-{
-    static unsigned ix;
-
-    /* just getting some random data - value shouldn't matter much */
-    if (++ix > sizeof cipher_block - 16)
-        ix = 0;
-   
-    return KCipherEncryptCBC (cipher, cipher_block, cipher_block, sizeof (cipher_block) / 16);
-}
-
-
-rc_t cbc_decrypt_function (KCipher * cipher)
-{
-    static unsigned ix;
-
-    /* just getting some random data - value shouldn't matter much */
-    if (++ix > sizeof cipher_block - 16)
-        ix = 0;
-   
-    return KCipherDecryptCBC (cipher, cipher_block, cipher_block, sizeof (cipher_block) / 16);
-}
-
-
-/* ==================================================== */
-
-uint64_t encrypt_key_128[kcipher_count*4] = {0};
-uint64_t encrypt_key_192[kcipher_count*4] = {0};
-uint64_t encrypt_key_256[kcipher_count*4] = {0};
-uint64_t decrypt_key_128[kcipher_count*4] = {0};
-uint64_t decrypt_key_192[kcipher_count*4] = {0};
-uint64_t decrypt_key_256[kcipher_count*4] = {0};
-uint64_t encrypt_128[kcipher_count*4] = {0};
-uint64_t encrypt_192[kcipher_count*4] = {0};
-uint64_t encrypt_256[kcipher_count*4] = {0};
-uint64_t decrypt_128[kcipher_count*4] = {0};
-uint64_t decrypt_192[kcipher_count*4] = {0};
-uint64_t decrypt_256[kcipher_count*4] = {0};
-uint64_t ecb_encrypt_128[kcipher_count*4] = {0};
-uint64_t ecb_encrypt_192[kcipher_count*4] = {0};
-uint64_t ecb_encrypt_256[kcipher_count*4] = {0};
-uint64_t ecb_decrypt_128[kcipher_count*4] = {0};
-uint64_t ecb_decrypt_192[kcipher_count*4] = {0};
-uint64_t ecb_decrypt_256[kcipher_count*4] = {0};
-uint64_t cbc_encrypt_128[kcipher_count*4] = {0};
-uint64_t cbc_encrypt_192[kcipher_count*4] = {0};
-uint64_t cbc_encrypt_256[kcipher_count*4] = {0};
-uint64_t cbc_decrypt_128[kcipher_count*4] = {0};
-uint64_t cbc_decrypt_192[kcipher_count*4] = {0};
-uint64_t cbc_decrypt_256[kcipher_count*4] = {0};
-
-rc_t run_one (KCipher * ciphers[16], clock_t timer, unsigned ix)
-{
-    rc_t rc;
-
-    encrypt_key_128[ix] = 0;
-    encrypt_key_192[ix] = 0;
-    encrypt_key_256[ix] = 0;
-    decrypt_key_128[ix] = 0;
-    decrypt_key_192[ix] = 0;
-    decrypt_key_256[ix] = 0;
-
-    encrypt_128[ix] = 0;
-    encrypt_192[ix] = 0;
-    encrypt_256[ix] = 0;
-    decrypt_128[ix] = 0;
-    decrypt_192[ix] = 0;
-    decrypt_256[ix] = 0;
-
-    ecb_encrypt_128[ix] = 0;
-    ecb_encrypt_192[ix] = 0;
-    ecb_encrypt_256[ix] = 0;
-    ecb_decrypt_128[ix] = 0;
-    ecb_decrypt_192[ix] = 0;
-    ecb_decrypt_256[ix] = 0;
-
-    cbc_encrypt_128[ix] = 0;
-    cbc_encrypt_192[ix] = 0;
-    cbc_encrypt_256[ix] = 0;
-    cbc_decrypt_128[ix] = 0;
-    cbc_decrypt_192[ix] = 0;
-    cbc_decrypt_256[ix] = 0;
-
-    KStsMsg ("There will be %u seconds between outputs", timer);
-    KStsMsg ("set_encrypt_key_function_128");
-    rc = function_timer(set_encrypt_key_function_128, ciphers, encrypt_key_128+ix, timer);
-    if (rc)
-        KStsMsg ("failed to run set_encrypt_key_function_128\n");
-    else
-    {
-        KStsMsg ("set_decrypt_key_function_128");
-        rc = function_timer(set_decrypt_key_function_128, ciphers, decrypt_key_128+ix, timer);
-        if (rc)
-            KStsMsg ("failed to run set_decrypt_key_function_128\n");
-        else
-        {
-            KStsMsg ("encrypt_function");
-            rc = function_timer(encrypt_function, ciphers, encrypt_128+ix, timer);
-            if (rc)
-                KStsMsg ("failed to run encrypt_function\n");
-            else
-            {
-
-                KStsMsg ("decrypt_function");
-                rc = function_timer(decrypt_function, ciphers, decrypt_128+ix, timer);
-                if (rc)
-                    KStsMsg ("failed to run decrypt_function\n");
-                else
-                {
-                    KStsMsg ("ecb_encrypt_function");
-                    rc = function_timer(ecb_encrypt_function, ciphers, ecb_encrypt_128+ix, timer);
-                    if (rc)
-                        KStsMsg ("failed to run ecb_encrypt_function\n");
-                    else
-                    {
-
-                        KStsMsg ("ecb_decrypt_function");
-                        rc = function_timer(ecb_decrypt_function, ciphers, ecb_decrypt_128+ix, timer);
-                        if (rc)
-                            KStsMsg ("failed to run ecb_decrypt_function\n");
-                        else
-                        {
-                            KStsMsg ("cbc_encrypt_function");
-                            rc = function_timer(cbc_encrypt_function, ciphers, cbc_encrypt_128+ix, timer);
-                            if (rc)
-                                KStsMsg ("failed to run cbc_encrypt_function\n");
-                            else
-                            {
-                                KStsMsg ("cbc_decrypt_function\n");
-                                rc = function_timer(cbc_decrypt_function, ciphers, cbc_decrypt_128+ix, timer);
-                                if (rc)
-                                    KStsMsg ("failed to run cbc_decrypt_function\n");
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    KStsMsg ("set_encrypt_key_function_192\n");
-    rc = function_timer(set_encrypt_key_function_192, ciphers, encrypt_key_192+ix, timer);
-    if (rc)
-        KStsMsg ("failed to run set_encrypt_key_function_192\n");
-    else
-    {
-        KStsMsg ("set_decrypt_key_function_192\n");
-        rc = function_timer(set_decrypt_key_function_192, ciphers, decrypt_key_192+ix, timer);
-        if (rc)
-            KStsMsg ("failed to run set_decrypt_key_function_192\n");
-        else
-        {
-            KStsMsg ("encrypt_function\n");
-            rc = function_timer(encrypt_function, ciphers, encrypt_192+ix, timer);
-            if (rc)
-                KStsMsg ("failed to run encrypt_function\n");
-            else
-            {
-                KStsMsg ("decrypt_function\n");
-                rc = function_timer(decrypt_function, ciphers, decrypt_192+ix, timer);
-                if (rc)
-                    KStsMsg ("failed to run decrypt_function\n");
-                else
-                {
-                    KStsMsg ("ecb_encrypt_function\n");
-                    rc = function_timer(ecb_encrypt_function, ciphers, ecb_encrypt_192+ix, timer);
-                    if (rc)
-                        KStsMsg ("failed to run ecb_encrypt_function\n");
-                    else
-                    {
-                        KStsMsg ("ecb_decrypt_function\n");
-                        rc = function_timer(ecb_decrypt_function, ciphers, ecb_decrypt_192+ix, timer);
-                        if (rc)
-                            KStsMsg ("failed to run ecb_decrypt_function\n");
-                        else
-                        {
-                            KStsMsg ("cbc_encrypt_function\n");
-                            rc = function_timer(cbc_encrypt_function, ciphers, cbc_encrypt_192+ix, timer);
-                            if (rc)
-                                KStsMsg ("failed to run cbc_encrypt_function\n");
-                            else
-                            {
-                                KStsMsg ("cbc_decrypt_function\n");
-                                rc = function_timer(cbc_decrypt_function, ciphers, cbc_decrypt_192+ix, timer);
-                                if (rc)
-                                    KStsMsg ("failed to run cbc_decrypt_function\n");
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    KStsMsg ("set_encrypt_key_function_256\n");
-    rc = function_timer(set_encrypt_key_function_256, ciphers, encrypt_key_256+ix, timer);
-    if (rc)
-        KStsMsg ("failed to run set_encrypt_key_function_256\n");
-    else
-    {
-        KStsMsg ("set_decrypt_key_function_256\n");
-        rc = function_timer(set_decrypt_key_function_256, ciphers, decrypt_key_256+ix, timer);
-        if (rc)
-            KStsMsg ("failed to run set_decrypt_key_function_256\n");
-        else
-        {
-            KStsMsg ("encrypt_function\n");
-            rc = function_timer(encrypt_function, ciphers, encrypt_256+ix, timer);
-            if (rc)
-                KStsMsg ("failed to run encrypt_function\n");
-            else
-            {
-                KStsMsg ("decrypt_function\n");
-                rc = function_timer(decrypt_function, ciphers, decrypt_256+ix, timer);
-                if (rc)
-                    KStsMsg ("failed to rundecrypt_function\n");
-                else
-                {
-                    KStsMsg ("ecb_encrypt_function\n");
-                    rc = function_timer(ecb_encrypt_function, ciphers, ecb_encrypt_256+ix, timer);
-                    if (rc)
-                        KStsMsg ("failed to run ecb_encrypt_function\n");
-                    else
-                    {
-
-                        KStsMsg ("ecb_decrypt_function\n");  
-                        rc = function_timer(ecb_decrypt_function, ciphers, ecb_decrypt_256+ix, timer);
-                        if (rc)
-                            KStsMsg ("failed to run ecb_decrypt_function\n");
-                        else
-                        {
-                            KStsMsg ("cbc_encrypt_function\n");
-                            rc = function_timer(cbc_encrypt_function, ciphers, cbc_encrypt_256+ix, timer);
-                            if (rc)
-                                KStsMsg ("failed to run cbc_encrypt_function\n");
-                            else
-                            {
-                                KStsMsg ("cbc_decrypt_function\n");
-                                rc = function_timer(cbc_decrypt_function, ciphers, cbc_decrypt_256+ix, timer);
-                                if (rc)
-                                    KStsMsg ("failed to run cbc_decrypt_function\n");
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-    return rc;
-}
-
-
-void run (clock_t timer)
-{
-    kcipher_type cipher_type;
-
-    for (cipher_type = 0; cipher_type < kcipher_count; ++cipher_type)
-    {
-        uint32_t cipher_subtype;
-
-        for (cipher_subtype = 0; cipher_subtype < 4; ++cipher_subtype)
-        {
-            KCipher * ciphers[16];
-            unsigned ix;
-            rc_t rc;
-
-            for (ix = 0; ix < 16; ++ix)
-                ciphers[ix] = NULL;
-
-            for (ix = 0; ix < 16; ++ix)
-            {
-                rc = make_functions[cipher_subtype](&ciphers[ix], cipher_type);
-                if (GetRCState(rc) == rcUnsupported)
-                {
-                    KOutMsg ("Not supported on this machine: test not run\n");
-                    ciphers[ix] = NULL;
-                    break;
-                }
-                else if (rc)
-                {
-                    KOutMsg ("Failure creating cipher: test not run\n");
-                    ciphers[ix] = NULL;
-                    break;
-                }
-            }
-            if (rc == 0)
-            {
-                KStsMsg ("Testing the %s cipher in the %s implementation",
-                         cipher_types[cipher_type],cipher_subtypes[cipher_subtype]);
-                rc = run_one (ciphers, timer, cipher_type * 4 + cipher_subtype);
-            }
-            for (ix = 0; ix < 16; ++ix)
-            {
-                KCipherRelease (ciphers[ix]);
-            }
-        }
-    }
-    KOutMsg ("%14s\t%s-%s\t%s-%s\t%s-%s\t%s-%s\t%s-%s\t%s-%s\t%s-%s\t%s-%s\n",
-             " ",
-             cipher_types[0],cipher_subtypes[0],
-             cipher_types[0],cipher_subtypes[1],
-             cipher_types[0],cipher_subtypes[2],
-             cipher_types[0],cipher_subtypes[3],
-             cipher_types[1],cipher_subtypes[0],
-             cipher_types[1],cipher_subtypes[1],
-             cipher_types[1],cipher_subtypes[2],
-             cipher_types[1],cipher_subtypes[3]);
-
-    KOutMsg ("encrypt_key_128\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             encrypt_key_128[0],encrypt_key_128[1],encrypt_key_128[2],
-             encrypt_key_128[3],encrypt_key_128[4],encrypt_key_128[5],
-             encrypt_key_128[6],encrypt_key_128[7]);
-    KOutMsg ("encrypt_key_192\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             encrypt_key_192[0],encrypt_key_192[1],encrypt_key_192[2],
-             encrypt_key_192[3],encrypt_key_192[4],encrypt_key_192[5],
-             encrypt_key_192[6],encrypt_key_192[7]);
-    KOutMsg ("encrypt_key_256\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             encrypt_key_256[0],encrypt_key_256[1],encrypt_key_256[2],
-             encrypt_key_256[3],encrypt_key_256[4],encrypt_key_256[5],
-             encrypt_key_256[6],encrypt_key_256[7]);
-    KOutMsg ("decrypt_key_128\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             decrypt_key_128[0],decrypt_key_128[1],decrypt_key_128[2],
-             decrypt_key_128[3],decrypt_key_128[4],decrypt_key_128[5],
-             decrypt_key_128[6],decrypt_key_128[7]);
-    KOutMsg ("decrypt_key_192\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             decrypt_key_192[0],decrypt_key_192[1],decrypt_key_192[2],
-             decrypt_key_192[3],decrypt_key_192[4],decrypt_key_192[5],
-             decrypt_key_192[6],decrypt_key_192[7]);
-    KOutMsg ("decrypt_key_256\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             decrypt_key_256[0],decrypt_key_256[1],decrypt_key_256[2],
-             decrypt_key_256[3],decrypt_key_256[4],decrypt_key_256[5],
-             decrypt_key_256[6],decrypt_key_256[7]);
-
-    KOutMsg ("encrypt_128\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             encrypt_128[0],encrypt_128[1],encrypt_128[2],
-             encrypt_128[3],encrypt_128[4],encrypt_128[5],
-             encrypt_128[6],encrypt_128[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (encrypt_128[0]*16.0/(1024*1024))/timer,
-             (encrypt_128[1]*16.0/(1024*1024))/timer,
-             (encrypt_128[2]*16.0/(1024*1024))/timer,
-             (encrypt_128[3]*16.0/(1024*1024))/timer,
-             (encrypt_128[4]*16.0/(1024*1024))/timer,
-             (encrypt_128[5]*16.0/(1024*1024))/timer,
-             (encrypt_128[6]*16.0/(1024*1024))/timer,
-             (encrypt_128[7]*16.0/(1024*1024))/timer);
-
-    KOutMsg ("encrypt_192\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             encrypt_192[0],encrypt_192[1],encrypt_192[2],
-             encrypt_192[3],encrypt_192[4],encrypt_192[5],
-             encrypt_192[6],encrypt_192[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (encrypt_192[0]*16.0/(1024*1024))/timer,
-             (encrypt_192[1]*16.0/(1024*1024))/timer,
-             (encrypt_192[2]*16.0/(1024*1024))/timer,
-             (encrypt_192[3]*16.0/(1024*1024))/timer,
-             (encrypt_192[4]*16.0/(1024*1024))/timer,
-             (encrypt_192[5]*16.0/(1024*1024))/timer,
-             (encrypt_192[6]*16.0/(1024*1024))/timer,
-             (encrypt_192[7]*16.0/(1024*1024))/timer);
-
-    KOutMsg ("encrypt_256\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             encrypt_256[0],encrypt_256[1],encrypt_256[2],
-             encrypt_256[3],encrypt_256[4],encrypt_256[5],
-             encrypt_256[6],encrypt_256[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (encrypt_256[0]*16.0/(1024*1024))/timer,
-             (encrypt_256[1]*16.0/(1024*1024))/timer,
-             (encrypt_256[2]*16.0/(1024*1024))/timer,
-             (encrypt_256[3]*16.0/(1024*1024))/timer,
-             (encrypt_256[4]*16.0/(1024*1024))/timer,
-             (encrypt_256[5]*16.0/(1024*1024))/timer,
-             (encrypt_256[6]*16.0/(1024*1024))/timer,
-             (encrypt_256[7]*16.0/(1024*1024))/timer);
-
-    KOutMsg ("decrypt_128\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             decrypt_128[0],decrypt_128[1],decrypt_128[2],
-             decrypt_128[3],decrypt_128[4],decrypt_128[5],
-             decrypt_128[6],decrypt_128[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (decrypt_128[0]*16.0/(1024*1024))/timer,
-             (decrypt_128[1]*16.0/(1024*1024))/timer,
-             (decrypt_128[2]*16.0/(1024*1024))/timer,
-             (decrypt_128[3]*16.0/(1024*1024))/timer,
-             (decrypt_128[4]*16.0/(1024*1024))/timer,
-             (decrypt_128[5]*16.0/(1024*1024))/timer,
-             (decrypt_128[6]*16.0/(1024*1024))/timer,
-             (decrypt_128[7]*16.0/(1024*1024))/timer);
-
-    KOutMsg ("decrypt_192\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             decrypt_192[0],decrypt_192[1],decrypt_192[2],
-             decrypt_192[3],decrypt_192[4],decrypt_192[5],
-             decrypt_192[6],decrypt_192[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (decrypt_192[0]*16.0/(1024*1024))/timer,
-             (decrypt_192[1]*16.0/(1024*1024))/timer,
-             (decrypt_192[2]*16.0/(1024*1024))/timer,
-             (decrypt_192[3]*16.0/(1024*1024))/timer,
-             (decrypt_192[4]*16.0/(1024*1024))/timer,
-             (decrypt_192[5]*16.0/(1024*1024))/timer,
-             (decrypt_192[6]*16.0/(1024*1024))/timer,
-             (decrypt_192[7]*16.0/(1024*1024))/timer);
-
-    KOutMsg ("decrypt_256\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             decrypt_256[0],decrypt_256[1],decrypt_256[2],
-             decrypt_256[3],decrypt_256[4],decrypt_256[5],
-             decrypt_256[6],decrypt_256[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (decrypt_256[0]*16.0/(1024*1024))/timer,
-             (decrypt_256[1]*16.0/(1024*1024))/timer,
-             (decrypt_256[2]*16.0/(1024*1024))/timer,
-             (decrypt_256[3]*16.0/(1024*1024))/timer,
-             (decrypt_256[4]*16.0/(1024*1024))/timer,
-             (decrypt_256[5]*16.0/(1024*1024))/timer,
-             (decrypt_256[6]*16.0/(1024*1024))/timer,
-             (decrypt_256[7]*16.0/(1024*1024))/timer);
-
-    KOutMsg ("ecb_encrypt_128\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             ecb_encrypt_128[0],ecb_encrypt_128[1],ecb_encrypt_128[2],
-             ecb_encrypt_128[3],ecb_encrypt_128[4],ecb_encrypt_128[5],
-             ecb_encrypt_128[6],ecb_encrypt_128[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (ecb_encrypt_128[0]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_128[1]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_128[2]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_128[3]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_128[4]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_128[5]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_128[6]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_128[7]*sizeof(cipher_block)/(1024*1024))/timer);
-
-    KOutMsg ("ecb_encrypt_192\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             ecb_encrypt_192[0],ecb_encrypt_192[1],ecb_encrypt_192[2],
-             ecb_encrypt_192[3],ecb_encrypt_192[4],ecb_encrypt_192[5],
-             ecb_encrypt_192[6],ecb_encrypt_192[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (ecb_encrypt_192[0]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_192[1]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_192[2]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_192[3]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_192[4]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_192[5]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_192[6]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_192[7]*sizeof(cipher_block)/(1024*1024))/timer);
-
-    KOutMsg ("ecb_encrypt_256\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             ecb_encrypt_256[0],ecb_encrypt_256[1],ecb_encrypt_256[2],
-             ecb_encrypt_256[3],ecb_encrypt_256[4],ecb_encrypt_256[5],
-             ecb_encrypt_256[6],ecb_encrypt_256[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (ecb_encrypt_256[0]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_256[1]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_256[2]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_256[3]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_256[4]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_256[5]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_256[6]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_encrypt_256[7]*sizeof(cipher_block)/(1024*1024))/timer);
-
-    KOutMsg ("ecb_decrypt_128\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             ecb_decrypt_128[0],ecb_decrypt_128[1],ecb_decrypt_128[2],
-             ecb_decrypt_128[3],ecb_decrypt_128[4],ecb_decrypt_128[5],
-             ecb_decrypt_128[6],ecb_decrypt_128[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (ecb_decrypt_128[0]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_128[1]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_128[2]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_128[3]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_128[4]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_128[5]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_128[6]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_128[7]*sizeof(cipher_block)/(1024*1024))/timer);
-
-    KOutMsg ("ecb_decrypt_192\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             ecb_decrypt_192[0],ecb_decrypt_192[1],ecb_decrypt_192[2],
-             ecb_decrypt_192[3],ecb_decrypt_192[4],ecb_decrypt_192[5],
-             ecb_decrypt_192[6],ecb_decrypt_192[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (ecb_decrypt_192[0]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_192[1]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_192[2]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_192[3]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_192[4]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_192[5]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_192[6]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_192[7]*sizeof(cipher_block)/(1024*1024))/timer);
-
-    KOutMsg ("ecb_decrypt_256\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             ecb_decrypt_256[0],ecb_decrypt_256[1],ecb_decrypt_256[2],
-             ecb_decrypt_256[3],ecb_decrypt_256[4],ecb_decrypt_256[5],
-             ecb_decrypt_256[6],ecb_decrypt_256[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (ecb_decrypt_256[0]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_256[1]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_256[2]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_256[3]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_256[4]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_256[5]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_256[6]*sizeof(cipher_block)/(1024*1024))/timer,
-             (ecb_decrypt_256[7]*sizeof(cipher_block)/(1024*1024))/timer);
-
-    KOutMsg ("cbc_encrypt_128\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             cbc_encrypt_128[0],cbc_encrypt_128[1],cbc_encrypt_128[2],
-             cbc_encrypt_128[3],cbc_encrypt_128[4],cbc_encrypt_128[5],
-             cbc_encrypt_128[6],cbc_encrypt_128[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (cbc_encrypt_128[0]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_encrypt_128[1]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_encrypt_128[2]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_encrypt_128[3]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_encrypt_128[4]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_encrypt_128[5]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_encrypt_128[6]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_encrypt_128[7]*sizeof(cipher_block)/(1024*1024))/timer);
-
-    KOutMsg ("cbc_encrypt_192\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             cbc_encrypt_192[0],cbc_encrypt_192[1],cbc_encrypt_192[2],
-             cbc_encrypt_192[3],cbc_encrypt_192[4],cbc_encrypt_192[5],
-             cbc_encrypt_192[6],cbc_encrypt_192[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (cbc_encrypt_128[0]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_encrypt_128[1]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_encrypt_128[2]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_encrypt_128[3]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_encrypt_128[4]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_encrypt_128[5]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_encrypt_128[6]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_encrypt_128[7]*sizeof(cipher_block)/(1024*1024))/timer);
-
-    KOutMsg ("cbc_encrypt_256\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             cbc_encrypt_256[0],cbc_encrypt_256[1],cbc_encrypt_256[2],
-             cbc_encrypt_256[3],cbc_encrypt_256[4],cbc_encrypt_256[5],
-             cbc_encrypt_256[6],cbc_encrypt_256[7]);
-    KOutMsg ("cbc_decrypt_128\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             cbc_decrypt_128[0],cbc_decrypt_128[1],cbc_decrypt_128[2],
-             cbc_decrypt_128[3],cbc_decrypt_128[4],cbc_decrypt_128[5],
-             cbc_decrypt_128[6],cbc_decrypt_128[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (cbc_decrypt_128[0]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_128[1]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_128[2]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_128[3]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_128[4]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_128[5]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_128[6]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_128[7]*sizeof(cipher_block)/(1024*1024))/timer);
-
-    KOutMsg ("cbc_decrypt_192\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             cbc_decrypt_192[0],cbc_decrypt_192[1],cbc_decrypt_192[2],
-             cbc_decrypt_192[3],cbc_decrypt_192[4],cbc_decrypt_192[5],
-             cbc_decrypt_192[6],cbc_decrypt_192[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (cbc_decrypt_192[0]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_192[1]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_192[2]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_192[3]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_192[4]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_192[5]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_192[6]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_192[7]*sizeof(cipher_block)/(1024*1024))/timer);
-
-    KOutMsg ("cbc_decrypt_256\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\t%10lu\n",
-             cbc_decrypt_256[0],cbc_decrypt_256[1],cbc_decrypt_256[2],
-             cbc_decrypt_256[3],cbc_decrypt_256[4],cbc_decrypt_256[5],
-             cbc_decrypt_256[6],cbc_decrypt_256[7]);
-    KOutMsg ("MB/s       \t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\n\n",
-             (cbc_decrypt_256[0]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_256[1]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_256[2]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_256[3]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_256[4]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_256[5]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_256[6]*sizeof(cipher_block)/(1024*1024))/timer,
-             (cbc_decrypt_256[7]*sizeof(cipher_block)/(1024*1024))/timer);
-}
-
-
-rc_t CC UsageSummary  (const char * progname)
-{
-    return KOutMsg ("\n"
-                    "Usage:\n"
-                    "  %s [OPTIONS]\n"
-                    "\n"
-                    "Summary:\n"
-                    "  Run a null (copy) cipher and the AES cipher in all\n"
-                    "  modes supported on this machine.  Encrypt a block of\n"
-                    "  32KB a number of times for each mode and compute an\n"
-                    "  expected throughput for each mode. Expected long delays\n"
-                    "  of no output for long timer values\n",
-                    progname);
-}
-
-
-const char UsageDefaultName[] = "test-cipher-throughput";
-rc_t CC Usage (const Args * args)
-{
-    rc_t rc;
-
-    rc = UsageSummary (UsageDefaultName);
-    if (rc == 0)
-    {
-        KOutMsg ("Options:\n");
-        HelpOptionLine (ALIAS_TIMER, OPTION_TIMER, "seconds", timer_usage);
-        HelpOptionsStandard();
-    }
-    return rc;
-}
-
-
-ver_t CC KAppVersion (void)
-{
-    return 0;
-}
-
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args * args;
-    rc_t rc;
-
-    rc = KStsHandlerSetStdErr();
-    if (rc == 0)
-    {
-        rc = ArgsMakeAndHandle (&args, argc, argv, 1, Options, sizeof Options / sizeof (Options[0]));
-        if (rc == 0)
-        {
-            clock_t timer;
-            uint32_t pcount;
-
-            rc = ArgsOptionCount (args, OPTION_TIMER, &pcount);
-            if (rc == 0)
-            {
-                if (pcount == 0)
-                    timer = 5*60;
-                else
-                {
-                    const char * pc;
-
-                    rc = ArgsOptionValue (args, OPTION_TIMER, 0, (const void **)&pc);
-                    if (rc == 0)
-                    {
-                        timer = (clock_t)AsciiToU64 (pc, NULL, NULL);
-                    }
-                }
-            }
-            if (rc == 0)
-                run (timer);
-        }
-    }
-
-    if (rc)
-        LOGERR (klogErr, rc, "Exiting with a failure status");
-    return rc;
-}
diff --git a/test/krypto/test-cmn.cpp b/test/krypto/test-cmn.cpp
deleted file mode 100644
index 3194d57..0000000
--- a/test/krypto/test-cmn.cpp
+++ /dev/null
@@ -1,359 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-#include <krypto/encfile-priv.h>
-
-#include <assert.h>
-#include <string.h>
-
-#include "test-cmn.hpp"
-
-/**
- * Common functions to tests krypto lib
- */
-
-rc_t CC
-TOpenPtFile ( struct KDirectory * current_dir, const char * path, TFileOpenMode mode, struct KFile ** out_file )
-{
-    rc_t rc;
-    struct KFile * file;
-    
-    rc = 0;
-    file = NULL;
-    
-    assert ( path );
-    assert ( out_file );
-    
-    * out_file = NULL;
-    
-    switch (mode)
-    {
-        case TFileOpenMode_Read:
-            rc = KDirectoryOpenFileRead ( current_dir, (const struct KFile **)& file, path );
-            break;
-            
-        case TFileOpenMode_Write:
-            rc = KDirectoryOpenFileWrite ( current_dir, & file, false, path );
-            break;
-            
-        case TFileOpenMode_ReadWrite:
-            rc = KDirectoryOpenFileWrite ( current_dir, & file, true, path );
-            break;
-            
-        default:
-            assert(false);
-    }
-        
-    if (rc == 0)
-    {
-        * out_file = file;
-    }
-    
-    return rc;
-}   /* TOpenPtFile () */
-
-rc_t CC
-TCreatePtFile ( struct KDirectory * current_dir, const char * path, TFileOpenMode mode, struct KFile ** out_file )
-{
-    rc_t rc;
-    struct KFile * file;
-    
-    rc = 0;
-    file = NULL;
-    
-    assert ( path );
-    assert ( out_file );
-    
-    * out_file = NULL;
-    
-    switch (mode)
-    {
-        case TFileOpenMode_Write:
-            rc = KDirectoryCreateFile ( current_dir, & file, false, 0644, kcmParents|kcmOpen, path );
-            break;
-                
-        case TFileOpenMode_ReadWrite:
-            rc = KDirectoryCreateFile ( current_dir, & file, true, 0644, kcmParents|kcmOpen, path );
-            break;
-                
-        case TFileOpenMode_Read:
-        default:
-            assert(false);
-    }
-        
-    if (rc == 0)
-    {
-        * out_file = file;
-    }
-    
-    return rc;
-}   /* TCreatePtFile () */
-
-rc_t CC
-TOpenEncFile ( struct KDirectory * current_dir, const char * path, TFileOpenMode mode, const KKey * enc_key, struct KFile ** out_file )
-{
-    rc_t rc;
-    struct KFile * pt_file, * enc_file;
-    
-    rc = 0;
-    pt_file = NULL;
-    enc_file = NULL;
-    
-    assert ( out_file );
-    
-    * out_file = NULL;
-    
-    rc = TOpenPtFile (current_dir, path, mode, &pt_file);
-    if (rc == 0)
-    {
-        switch (mode)
-        {
-            case TFileOpenMode_Read:
-                rc = KEncFileMakeRead ( (const struct KFile **)&enc_file, (const struct KFile *)pt_file, enc_key );
-                break;
-                
-            case TFileOpenMode_Write:
-                rc = KEncFileMakeWrite ( &enc_file, pt_file, enc_key );
-                break;
-                
-            case TFileOpenMode_ReadWrite:
-                rc = KEncFileMakeUpdate ( &enc_file, pt_file, enc_key );
-                break;
-                
-            default:
-                assert(false);
-        }
-        
-        if (rc == 0)
-        {
-            *out_file = enc_file;
-        }
-        KFileRelease ( pt_file );
-    }
-    
-    return rc;
-}   /* TOpenEncFile () */
-
-rc_t CC
-TCreateEncFile ( struct KDirectory * current_dir, const char * path, TFileOpenMode mode, const KKey * enc_key, struct KFile ** out_file )
-{
-    rc_t rc;
-    struct KFile * pt_file, * enc_file;
-    
-    rc = 0;
-    pt_file = NULL;
-    enc_file = NULL;
-    
-    assert ( out_file );
-    
-    * out_file = NULL;
-    
-    rc = TCreatePtFile (current_dir, path, mode, &pt_file);
-    if (rc == 0)
-    {
-        switch (mode)
-        {
-            case TFileOpenMode_Write:
-                rc = KEncFileMakeWrite ( &enc_file, pt_file, enc_key );
-                break;
-                
-            case TFileOpenMode_ReadWrite:
-                rc = KEncFileMakeUpdate ( &enc_file, pt_file, enc_key );
-                break;
-                
-            case TFileOpenMode_Read:
-            default:
-                assert(false);
-        }
-        
-        if (rc == 0)
-        {
-            *out_file = enc_file;
-        }
-        KFileRelease ( pt_file );
-    }
-    
-    return rc;
-}   /* TCreateEncFile () */
-
-rc_t CC
-TFillFile ( struct KFile * file, const uint8_t* filler, size_t filler_size, uint64_t content_size )
-{
-    rc_t rc = 0;
-    
-    if (content_size == 0)
-    {
-        // do nothing
-        return rc;
-    }
-    
-    const size_t buffer_size = 32*1024;
-    
-    uint8_t buffer[buffer_size];
-    size_t filler_sizes_in_buffer = buffer_size / filler_size;
-    
-    assert(buffer_size % filler_size == 0);
-    assert(buffer_size / filler_size  > 0);
-
-    for (size_t i = 0; i < filler_sizes_in_buffer; ++i)
-    {
-        memcpy(buffer + i*filler_size, filler, filler_size);
-    }
-
-    uint64_t num_written_total = 0;
-    size_t num_written;
-    while (num_written_total < content_size)
-    {
-        size_t to_write = content_size - num_written_total;
-        if (to_write > buffer_size)
-        {
-            to_write = buffer_size;
-        }
-        rc = KFileWriteAll ( file, num_written_total, buffer, to_write, &num_written );
-        if (rc != 0)
-        {
-            break;
-        }
-        
-        assert(num_written == to_write);
-        num_written_total += num_written;
-    }
-    
-    return rc;
-}
-
-rc_t CC
-TCheckFileContent ( struct KFile * file, const uint8_t* filler, size_t filler_size )
-{
-    rc_t rc = 0;
-    
-    uint64_t content_size;
-    rc = KFileSize ( file, &content_size );
-    if (rc != 0)
-    {
-        return rc;
-    }
-    
-    if (content_size == 0)
-    {
-        // do nothing
-        return rc;
-    }
-    
-    const size_t buffer_size = 32*1024;
-    
-    uint8_t buffer[buffer_size], reference_buffer[buffer_size];
-    size_t filler_sizes_in_buffer = buffer_size / filler_size;
-    
-    assert(buffer_size % filler_size == 0);
-    assert(buffer_size / filler_size  > 0);
-    
-    for (size_t i = 0; i < filler_sizes_in_buffer; ++i)
-    {
-        memcpy(reference_buffer + i*filler_size, filler, filler_size);
-    }
-    
-    uint64_t num_read_total = 0;
-    size_t num_read;
-    while (num_read_total < content_size)
-    {
-        size_t to_read = content_size - num_read_total;
-        if (to_read > buffer_size)
-        {
-            to_read = buffer_size;
-        }
-        rc = KFileReadAll ( file, num_read_total, buffer, to_read, &num_read );
-        if (rc != 0)
-        {
-            break;
-        }
-        
-        assert(num_read == to_read);
-        
-        if (memcmp(reference_buffer, buffer, num_read) != 0)
-        {
-            return RC( rcKrypto, rcFile, rcValidating, rcEncryption, rcCorrupt );
-        }
-        
-        num_read_total += num_read;
-    }
-    
-    return rc;
-}
-
-rc_t CC
-TCopyFile ( struct KFile * file_dst, struct KFile * file_src )
-{
-    rc_t rc = 0;
-    
-    uint64_t size_src;
-    rc = KFileSize ( file_src, &size_src );
-    if (rc != 0)
-    {
-        return rc;
-    }
-    
-    if (size_src == 0)
-    {
-        // do nothing
-        return rc;
-    }
-    
-    const size_t buffer_size = 32*1024;
-    
-    uint8_t buffer[buffer_size];
-   
-    uint64_t num_copied_total = 0;
-    size_t num_read, num_written;
-    while (num_copied_total < size_src)
-    {
-        size_t to_copy = size_src - num_copied_total;
-        if (to_copy > buffer_size)
-        {
-            to_copy = buffer_size;
-        }
-        rc = KFileReadAll ( file_src, num_copied_total, buffer, to_copy, &num_read );
-        if (rc != 0)
-        {
-            break;
-        }
-        assert(num_read == to_copy);
-        rc = KFileWriteAll ( file_dst, num_copied_total, buffer, to_copy, &num_written );
-        if (rc != 0)
-        {
-            break;
-        }
-        assert(num_written == to_copy);
-        
-        num_copied_total += num_written;
-    }
-    
-    return rc;
-}
diff --git a/test/krypto/test-cmn.hpp b/test/krypto/test-cmn.hpp
deleted file mode 100644
index 5934699..0000000
--- a/test/krypto/test-cmn.hpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-/**
- * Common functions/types to tests krypto lib
- */
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-#include <krypto/encfile-priv.h>
-
-#define BLOCK_32K_SIZE (32*1024)
-
-#if defined(__APPLE__)
-#define TMP_FOLDER "temp_mac"
-#else
-#define TMP_FOLDER "temp_linux"
-#endif
-
-enum TFileOpenMode
-{
-    TFileOpenMode_Read,
-    TFileOpenMode_Write,
-    TFileOpenMode_ReadWrite
-};
-
-struct KFile;
-
-/**
- * Create/open plain text file
- */
-rc_t CC
-TOpenPtFile ( struct KDirectory * current_dir, const char * path, TFileOpenMode mode, struct KFile ** out_file );
-rc_t CC
-TCreatePtFile ( struct KDirectory * current_dir, const char * path, TFileOpenMode mode, struct KFile ** out_file );
-
-/**
- * Create/open encrypted file
- */
-rc_t CC
-TOpenEncFile ( struct KDirectory * current_dir, const char * path, TFileOpenMode mode, const KKey * enc_key, struct KFile ** out_file );
-rc_t CC
-TCreateEncFile ( struct KDirectory * current_dir, const char * path, TFileOpenMode mode, const KKey * enc_key, struct KFile ** out_file );
-
-/**
- * Fill "file" from pos 0 to "content_size"-1 with content defined by "filler" pattern
- */
-rc_t CC
-TFillFile ( struct KFile * file, const uint8_t* filler, size_t filler_size, uint64_t content_size );
-
-/**
- * Read "file" from beginning to the end and make sure that its content matches "filler" pattern
- */
-rc_t CC
-TCheckFileContent ( struct KFile * file, const uint8_t* filler, size_t filler_size );
-
-/**
- * Copies content from "file_src" to "file_dst"
- */
-rc_t CC
-TCopyFile ( struct KFile * file_dst, struct KFile * file_src );
-
-inline uint64_t CC
-TEncSizeFromPtSize ( uint64_t pt_size )
-{
-    return ((pt_size + BLOCK_32K_SIZE - 1 ) / BLOCK_32K_SIZE) * sizeof(KEncFileBlock) + sizeof(KEncFileHeader) + sizeof(KEncFileFooter);
-}
diff --git a/test/krypto/test-csprng.c b/test/krypto/test-csprng.c
deleted file mode 100644
index d0281a4..0000000
--- a/test/krypto/test-csprng.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-#include <krypto/rng.h>
-
-#include <kapp/main.h>
-#include <kapp/args.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/status.h>
-
-/* #include <kfs/directory.h> */
-/* #include <kfs/file.h> */
-
-/* #include <kxml/xml.h> */
-
-/* #include <string.h> */
-
-/*
- * not intended to be pretty.
- * not intended to be slick.
- * not intended to make tools like valgrind happy.
- *
- * This does not REALLY test the quality of the RNG; it's just
- * a development test and a "did I break it" test.
- *
- * It just spews lines of random bytes.  These could be gathered
- * and analyzed with another tool such as the one from NIST.  Perhaps
- * a bit of change to the output format might be needed for that.
- */
-
-static
-rc_t run()
-{
-    KRng * rng;
-    rc_t rc;
-
-    rc = KCSPRngMake (&rng);
-    if (rc)
-        LOGERR (klogErr, rc, "failed to make RNG");
-    else
-    {
-        uint32_t ix;
-
-        OUTMSG (("KCSPRng with no seed\n"));
-        
-        for (ix = 0; ix < 10; ++ix)
-        {
-            uint8_t buff [8];
-            uint32_t num_read;
-
-            rc = KRngRead (rng, buff, sizeof (buff), &num_read);
-            if (rc)
-                PLOGERR (klogErr,
-                         (klogErr, rc, "error in read '$u' from KRng",
-                          "u=%lu", ix));
-            else
-            {
-                OUTMSG (( "%4.4d: %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n",
-                          ix,
-                          buff[0], buff[1], buff[2], buff[3],
-                          buff[4], buff[5], buff[6], buff[7]));
-            }
-        }
-
-        KRngRelease (rng);
-
-        rc = KCSPRngMake (&rng);
-        if (rc)
-            LOGERR (klogErr, rc, "failed to make RNG");
-        else
-        {
-            uint32_t ix;
-
-
-            /* this is using system seed from us */
-            rc = KRngSeed (rng);
-            if (rc)
-                LOGERR (klogErr, rc, "error running KRngSeed");
-            else
-            {
-                OUTMSG (("KCSPRng with seed\n"));
-        
-                for (ix = 0; ix < 10; ++ix)
-                {
-                    uint8_t buff [8];
-                    uint32_t num_read;
-
-                    rc = KRngRead (rng, buff, sizeof (buff), &num_read);
-                    if (rc)
-                        PLOGERR (klogErr,
-                                 (klogErr, rc, "error in read '$u' from KRng",
-                                  "u=%lu", ix));
-                    else
-                    {
-                        OUTMSG (( "%4.4d: %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n",
-                                  ix,
-                                  buff[0], buff[1], buff[2], buff[3],
-                                  buff[4], buff[5], buff[6], buff[7]));
-                    }
-                }
-                {
-                    uint8_t reseed [1024];
-
-                    reseed[0] = 0xAA;
-
-                    for (ix = 1; ix < sizeof (reseed); ++ix)
-                        reseed[ix] = reseed[ix-1] ^ (uint8_t)ix;
-
-                    /* this is using reseed from us */
-                    rc = KRngReseed (rng, reseed, sizeof (reseed));
-                    if (rc)
-                        LOGERR (klogErr, rc, "error running KRngReseed");
-                    else
-                    {
-                        OUTMSG (("KCSPRng with reseed\n"));
-
-                        for (ix = 0; ix < 10; ++ix)
-                        {
-                            uint8_t buff [8];
-                            uint32_t num_read;
-
-                            rc = KRngRead (rng, buff, sizeof (buff), &num_read);
-                            if (rc)
-                                PLOGERR (klogErr,
-                                         (klogErr, rc, "error in read '$u' from KRng",
-                                          "u=%lu", ix));
-                            else
-                            {
-                                OUTMSG (( "%4.4d: %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n",
-                                          ix,
-                                          buff[0], buff[1], buff[2], buff[3],
-                                          buff[4], buff[5], buff[6], buff[7]));
-                            }
-                        }
-                    }        
-                }
-            }        
-            KRngRelease (rng);
-        }
-    }
-    return 0;
-}
-
-rc_t CC UsageSummary (const char * progname)
-{
-    return KOutMsg (
-        "\n"
-        "Usage:\n"
-        "  %s [OPTIONS]\n"
-        "\n"
-        "Summary:\n"
-        "  Test the KCSPRng type.\n",
-        progname);
-}
-
-
-const char UsageDefaultName [] = "test-csprng";
-rc_t CC Usage (const Args * args)
-{
-    const char * progname = UsageDefaultName;
-    const char * fullpath = UsageDefaultName;
-    rc_t rc;
-
-    if (args == NULL)
-        rc = RC (rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
-    else
-        rc = ArgsProgram (args, &fullpath, &progname);
-
-    UsageSummary (progname);
-
-    KOutMsg ("Options:\n");
-
-    HelpOptionsStandard();
-
-    HelpVersion (fullpath, KAppVersion());
-
-    return rc;
-}
-
-
-ver_t CC KAppVersion (void)
-{
-    return 0;
-}
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args * args;
-    rc_t rc;
-
-    rc = ArgsMakeAndHandle (&args, argc, argv, 0);
-    if (rc == 0)
-    {
-
-        rc = run();
-        if (rc)
-            LOGERR (klogErr, rc, "Exiting failure");
-        else
-            STSMSG (0, ("Exiting okay\n"));
-    }
-
-    if (rc)
-        LOGERR (klogErr, rc, "Exiting status");
-    else
-        STSMSG (0, ("Exiting status (%R)\n", rc));
-    return rc;
-}
diff --git a/test/krypto/test-encdec.cpp b/test/krypto/test-encdec.cpp
deleted file mode 100644
index 83739bd..0000000
--- a/test/krypto/test-encdec.cpp
+++ /dev/null
@@ -1,607 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-/**
- * Unit tests for KEncDecTestSuite
- */
-
-#include <ktst/unit_test.hpp>
-#include <krypto/key.h>
-#include <krypto/encfile.h>
-#include <krypto/encfile-priv.h>
-#include <krypto/reencfile.h>
-#include <kfs/impl.h>
-#include <klib/rc.h>
-#include <klib/log.h>
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-#include "test-cmn.hpp"
-
-#include <string.h>
-#include <stdio.h>
-
-TEST_SUITE(KEncDecTestSuite);
-
-TEST_CASE(KEncryptDecrypt)
-{
-    const char pw [] = "first pw";
-    KKey key;
-    REQUIRE_RC (KKeyInitUpdate (&key, kkeyAES128, pw, strlen (pw)));
-    
-    const char enc_file_path_fmt [] = TMP_FOLDER "/enc_file%llu";
-
-    KFile * enc_file, * pt_file;
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    
-    uint64_t file_sizes_n_32k[] = { 0, 1, 2, 10, 46, 51 };
-    int8_t file_size_variants[] = { -2, -1, 0, 1, 2 };
-    
-    const uint8_t* file_fillers[] = { (const uint8_t *)"\0", (const uint8_t *)"\1\2\3\0" };
-    size_t file_fillers_sizes[] = { 1, 4 };
-    
-    assert( sizeof file_fillers / sizeof file_fillers[0] == sizeof file_fillers_sizes / sizeof file_fillers_sizes[0] );
-    
-    for (size_t filler_index = 0; filler_index < sizeof file_fillers / sizeof file_fillers[0]; ++filler_index )
-    {
-        printf("filler pattern: ");
-        for (size_t i = 0; i < file_fillers_sizes[filler_index]; ++i)
-        {
-            printf("0x%X ", file_fillers[filler_index][i]);
-        }
-        printf("\n");
-        for (size_t i = 0; i < sizeof file_sizes_n_32k / sizeof file_sizes_n_32k[0]; ++i)
-        {
-            for (size_t j = 0; j < sizeof file_size_variants / sizeof file_size_variants[0]; ++j)
-            {
-                if (file_sizes_n_32k[i] == 0 && file_size_variants[j] <= 0)
-                {
-                    continue;
-                }
-                
-                uint64_t file_size = file_sizes_n_32k[i] * BLOCK_32K_SIZE + file_size_variants[j];
-                
-                char file_path[1024];
-                sprintf(file_path, enc_file_path_fmt, file_size);
-                
-                printf("encrypting/decrypting file %s, size: %llu, i: %zu, j: %zu\n", file_path, file_size, i, j);
-                
-                // create file
-                REQUIRE_RC ( TCreateEncFile( current_dir, file_path, TFileOpenMode_ReadWrite, &key, &enc_file ) );
-                
-                // write file
-                REQUIRE_RC ( TFillFile( enc_file, file_fillers[filler_index], file_fillers_sizes[filler_index], file_size ) );
-                
-                uint64_t size_data_actual;
-                REQUIRE_RC ( KFileSize ( enc_file, &size_data_actual ) );
-                
-                // check content size
-                REQUIRE ( file_size == size_data_actual );
-              
-                REQUIRE_RC ( KFileRelease ( enc_file ) );
-                
-                // check raw file size and checksums
-                REQUIRE_RC ( TOpenPtFile ( current_dir, file_path, TFileOpenMode_Read, &pt_file ) );
-                
-                uint64_t size_raw;
-                REQUIRE_RC ( KFileSize ( pt_file, &size_raw ) );
-                REQUIRE ( size_raw == TEncSizeFromPtSize(size_data_actual) );
-                
-                REQUIRE_RC ( KEncFileValidate( pt_file ) );
-                
-                REQUIRE_RC ( KFileRelease ( pt_file ) );
-                
-                // check file content
-                REQUIRE_RC ( TOpenEncFile( current_dir, file_path, TFileOpenMode_Read, &key, &enc_file ) );
-                
-                REQUIRE_RC ( TCheckFileContent( enc_file, file_fillers[filler_index], file_fillers_sizes[filler_index] ) );
-                
-                REQUIRE_RC ( KFileRelease ( enc_file ) );
-            }
-        }
-    }
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-TEST_CASE(KDecryptZeroRawSize)
-{
-    const char pw [] = "first pw";
-    KKey key;
-    REQUIRE_RC (KKeyInitUpdate (&key, kkeyAES128, pw, strlen (pw)));
-    
-    const char file_path [] = TMP_FOLDER "/zero_size_file_to_dec";
-
-    KFile * enc_file, * pt_file;
-    
-    uint64_t file_size;
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    // create file
-    REQUIRE_RC ( TCreatePtFile( current_dir, file_path, TFileOpenMode_ReadWrite, &pt_file ) );
-    REQUIRE_RC ( KFileSize ( pt_file, &file_size ) );
-    REQUIRE ( file_size == 0 );
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    LOGMSG ( klogWarn, "Expect errors after this line:" );
-    REQUIRE ( TOpenEncFile( current_dir, file_path, TFileOpenMode_Read, &key, &enc_file ) == RC( rcKrypto, rcFile, rcConstructing, rcSize, rcIncorrect ) );
-    LOGMSG ( klogWarn, "No more errors are expected" );
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-TEST_CASE(KDecryptZeroContentSizeRW)
-{
-    const char pw [] = "first pw";
-    KKey key;
-    REQUIRE_RC (KKeyInitUpdate (&key, kkeyAES128, pw, strlen (pw)));
-    
-    const char file_path [] = TMP_FOLDER "/zero_content_rw_file_to_dec";
-
-    KFile * enc_file, * pt_file;
-    
-    uint64_t file_size;
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    // create file
-    REQUIRE_RC ( TCreateEncFile( current_dir, file_path, TFileOpenMode_ReadWrite, &key, &enc_file ) );
-    REQUIRE_RC ( KFileRelease ( enc_file ) );
-    
-    // check raw size
-    REQUIRE_RC ( TOpenPtFile( current_dir, file_path, TFileOpenMode_Read, &pt_file ) );
-    REQUIRE_RC ( KFileSize ( pt_file, &file_size ) );
-    REQUIRE ( file_size == sizeof(KEncFileHeader) + sizeof(KEncFileFooter) );
-    REQUIRE_RC ( KEncFileValidate( pt_file ) );
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    // check enc open
-    REQUIRE_RC ( TOpenEncFile( current_dir, file_path, TFileOpenMode_Read, &key, &enc_file ) );
-    REQUIRE_RC ( KFileRelease ( enc_file ) );
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-TEST_CASE(KDecryptZeroContentSizeWOnly)
-{
-    const char pw [] = "first pw";
-    KKey key;
-    REQUIRE_RC (KKeyInitUpdate (&key, kkeyAES128, pw, strlen (pw)));
-    
-    const char file_path [] = TMP_FOLDER "/zero_content_w_file_to_dec";
-
-    KFile * enc_file, * pt_file;
-    
-    uint64_t file_size;
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, "temp"
-#if defined(__APPLE__)
-        "mac");
-#else
-        "linux");
-#endif
-    
-    // create file
-    REQUIRE_RC ( TCreateEncFile( current_dir, file_path, TFileOpenMode_Write, &key, &enc_file ) );
-    REQUIRE_RC ( KFileRelease ( enc_file ) );
-    
-    // check raw size
-    REQUIRE_RC ( TOpenPtFile( current_dir, file_path, TFileOpenMode_Read, &pt_file ) );
-    REQUIRE_RC ( KFileSize ( pt_file, &file_size ) );
-    REQUIRE ( file_size == sizeof(KEncFileHeader) + sizeof(KEncFileFooter) );
-    REQUIRE_RC ( KEncFileValidate( pt_file ) );
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    // check enc open
-    REQUIRE_RC ( TOpenEncFile( current_dir, file_path, TFileOpenMode_Read, &key, &enc_file ) );
-    REQUIRE_RC ( KFileRelease ( enc_file ) );
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-
-TEST_CASE(KDectryptOnlyHeader)
-{
-    const char pw [] = "first pw";
-    KKey key;
-    REQUIRE_RC (KKeyInitUpdate (&key, kkeyAES128, pw, strlen (pw)));
-    
-    const char file_path [] = TMP_FOLDER "/file_only_header";
-
-    KFile * enc_file, * pt_file;
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    // create file
-    REQUIRE_RC ( TCreateEncFile( current_dir, file_path, TFileOpenMode_Write, &key, &enc_file ) );
-    REQUIRE_RC ( TFillFile( enc_file, (const uint8_t *)"\0\1", 2, 500 ) );
-    REQUIRE_RC ( KFileRelease ( enc_file ) );
-    
-    // truncate it to header size
-    REQUIRE_RC ( TOpenPtFile ( current_dir, file_path, TFileOpenMode_ReadWrite, &pt_file ) );
-    REQUIRE_RC ( KFileSetSize ( pt_file, sizeof(KEncFileHeader) ) );
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    LOGMSG ( klogWarn, "Expect errors after this line:" );
-    REQUIRE ( TOpenEncFile( current_dir, file_path, TFileOpenMode_Read, &key, &enc_file ) == RC( rcKrypto, rcFile, rcConstructing, rcSize, rcIncorrect ) );
-    LOGMSG ( klogWarn, "No more errors are expected" );
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-TEST_CASE(KDectryptWithoutFooter)
-{
-    const char pw [] = "first pw";
-    KKey key;
-    REQUIRE_RC (KKeyInitUpdate (&key, kkeyAES128, pw, strlen (pw)));
-    
-    const char file_path [] = TMP_FOLDER "/file_no_footer";
-    KFile * enc_file, * pt_file;
-    
-    uint64_t file_size;
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    // create file
-    REQUIRE_RC ( TCreateEncFile( current_dir, file_path, TFileOpenMode_Write, &key, &enc_file ) );
-    REQUIRE_RC ( TFillFile( enc_file, (const uint8_t *)"\0\1", 2, 500 ) );
-    REQUIRE_RC ( KFileRelease ( enc_file ) );
-    
-    // truncate footer
-    REQUIRE_RC ( TOpenPtFile ( current_dir, file_path, TFileOpenMode_ReadWrite, &pt_file ) );
-    REQUIRE_RC ( KFileSize ( pt_file, &file_size ) );
-    REQUIRE_RC ( KFileSetSize ( pt_file, file_size - sizeof(KEncFileFooter) ) );
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    LOGMSG ( klogWarn, "Expect errors after this line:" );
-    REQUIRE ( TOpenEncFile( current_dir, file_path, TFileOpenMode_Read, &key, &enc_file ) == RC( rcKrypto, rcFile, rcConstructing, rcSize, rcIncorrect ) );
-    LOGMSG ( klogWarn, "No more errors are expected" );
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-TEST_CASE(KDectryptCorruptHeader)
-{
-    const char pw [] = "first pw";
-    KKey key;
-    REQUIRE_RC (KKeyInitUpdate (&key, kkeyAES128, pw, strlen (pw)));
-    
-    const char file_path [] = TMP_FOLDER "/file_corrupt_header";
-
-    KFile * enc_file, * pt_file;
-    
-    const size_t buffer_size = sizeof(KEncFileHeader);
-    size_t num_written;
-    uint8_t buffer[buffer_size];
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    
-    // create file
-    REQUIRE_RC ( TCreateEncFile( current_dir, file_path, TFileOpenMode_Write, &key, &enc_file ) );
-    REQUIRE_RC ( TFillFile( enc_file, (const uint8_t *)"\0\1", 2, 500 ) );
-    REQUIRE_RC ( KFileRelease ( enc_file ) );
-    
-    // corrupt header
-    REQUIRE_RC ( TOpenPtFile ( current_dir, file_path, TFileOpenMode_ReadWrite, &pt_file ) );
-    REQUIRE_RC ( KFileReadAll ( pt_file, 0, buffer, buffer_size, &num_written ) );
-    buffer[0] ^= 4;
-    REQUIRE_RC ( KFileWriteAll ( pt_file, 0, buffer, buffer_size, &num_written ) );
-    assert(buffer_size == num_written);
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    LOGMSG ( klogWarn, "Expect errors after this line:" );
-    REQUIRE ( TOpenEncFile( current_dir, file_path, TFileOpenMode_Read, &key, &enc_file ) == RC( rcFS, rcFile, rcConstructing, rcHeader, rcInvalid ) );
-    LOGMSG ( klogWarn, "No more errors are expected" );
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-TEST_CASE(KDectryptCorruptFooterCrc)
-{
-    const char pw [] = "first pw";
-    KKey key;
-    REQUIRE_RC (KKeyInitUpdate (&key, kkeyAES128, pw, strlen (pw)));
-    
-    const char file_path [] = TMP_FOLDER "/file_corrupt_footer_crc";
-
-    KFile * enc_file, * pt_file;
-
-    uint64_t file_size;
-    const size_t buffer_size = sizeof(KEncFileFooter);
-    size_t num_written, num_read;
-    uint8_t buffer[buffer_size];
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    
-    // create file
-    REQUIRE_RC ( TCreateEncFile( current_dir, file_path, TFileOpenMode_Write, &key, &enc_file ) );
-    REQUIRE_RC ( TFillFile( enc_file, (const uint8_t *)"\0\1", 2, 500 ) );
-    REQUIRE_RC ( KFileRelease ( enc_file ) );
-    
-    // corrupt footer
-    REQUIRE_RC ( TOpenPtFile ( current_dir, file_path, TFileOpenMode_ReadWrite, &pt_file ) );
-    REQUIRE_RC ( KFileSize ( pt_file, &file_size ) );
-    REQUIRE_RC ( KFileReadAll ( pt_file, file_size - buffer_size, buffer, buffer_size, &num_read ) );
-    assert(buffer_size == num_read);
-    ((KEncFileFooter*)&buffer)->crc_checksum ^= 4;
-    REQUIRE_RC ( KFileWriteAll ( pt_file, file_size - buffer_size, buffer, buffer_size, &num_written ) );
-    assert(buffer_size == num_written);
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    REQUIRE_RC ( TOpenPtFile( current_dir, file_path, TFileOpenMode_Read, &pt_file ) );
-    LOGMSG ( klogWarn, "Expect errors after this line:" );
-    REQUIRE ( KEncFileValidate( pt_file ) == RC(rcKrypto, rcFile, rcValidating, rcChecksum, rcCorrupt) );
-    LOGMSG ( klogWarn, "No more errors are expected" );
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-TEST_CASE(KDectryptCorruptFooterBlockCount)
-{
-    const char pw [] = "first pw";
-    KKey key;
-    REQUIRE_RC (KKeyInitUpdate (&key, kkeyAES128, pw, strlen (pw)));
-    
-    const char file_path [] = TMP_FOLDER "/file_corrupt_footer_block_count";
-
-    KFile * enc_file, * pt_file;
-    
-    uint64_t file_size;
-    const size_t buffer_size = sizeof(KEncFileFooter);
-    size_t num_written, num_read;
-    uint8_t buffer[buffer_size];
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    
-    // create file
-    REQUIRE_RC ( TCreateEncFile( current_dir, file_path, TFileOpenMode_Write, &key, &enc_file ) );
-    REQUIRE_RC ( TFillFile( enc_file, (const uint8_t *)"\0\1", 2, 500 ) );
-    REQUIRE_RC ( KFileRelease ( enc_file ) );
-    
-    // corrupt footer
-    REQUIRE_RC ( TOpenPtFile ( current_dir, file_path, TFileOpenMode_ReadWrite, &pt_file ) );
-    REQUIRE_RC ( KFileSize ( pt_file, &file_size ) );
-    REQUIRE_RC ( KFileReadAll ( pt_file, file_size - buffer_size, buffer, buffer_size, &num_read ) );
-    assert(buffer_size == num_read);
-    ((KEncFileFooter*)&buffer)->block_count ^= 4;
-    REQUIRE_RC ( KFileWriteAll ( pt_file, file_size - buffer_size, buffer, buffer_size, &num_written ) );
-    assert(buffer_size == num_written);
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    REQUIRE_RC ( TOpenPtFile( current_dir, file_path, TFileOpenMode_Read, &pt_file ) );
-    LOGMSG ( klogWarn, "Expect errors after this line:" );
-    REQUIRE ( KEncFileValidate( pt_file ) == RC(rcKrypto, rcFile, rcValidating, rcSize, rcIncorrect) );
-    LOGMSG ( klogWarn, "No more errors are expected" );
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-TEST_CASE(KDectryptCorruptBlockStruct)
-{
-    const char pw [] = "first pw";
-    KKey key;
-    REQUIRE_RC (KKeyInitUpdate (&key, kkeyAES128, pw, strlen (pw)));
-    
-    const char file_path [] = TMP_FOLDER "/file_corrupt_block_struct";
-
-    KFile * enc_file, * pt_file;
-    
-    uint64_t file_size;
-    const size_t buffer_size = sizeof(KEncFileBlock);
-    size_t num_written, num_read;
-    uint8_t buffer[buffer_size];
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    
-    // create file
-    REQUIRE_RC ( TCreateEncFile( current_dir, file_path, TFileOpenMode_Write, &key, &enc_file ) );
-    REQUIRE_RC ( TFillFile( enc_file, (const uint8_t *)"\0\1", 2, 500 ) );
-    REQUIRE_RC ( KFileRelease ( enc_file ) );
-    
-    // corrupt block struct
-    REQUIRE_RC ( TOpenPtFile ( current_dir, file_path, TFileOpenMode_ReadWrite, &pt_file ) );
-    REQUIRE_RC ( KFileSize ( pt_file, &file_size ) );
-    REQUIRE_RC ( KFileReadAll ( pt_file, file_size - sizeof(KEncFileFooter) - buffer_size, buffer, buffer_size, &num_read ) );
-    assert(buffer_size == num_read);
-    buffer[0] ^= 4;
-    REQUIRE_RC ( KFileWriteAll ( pt_file, file_size - sizeof(KEncFileFooter) - buffer_size, buffer, buffer_size, &num_written ) );
-    assert(buffer_size == num_written);
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    REQUIRE_RC ( TOpenPtFile( current_dir, file_path, TFileOpenMode_Read, &pt_file ) );
-    LOGMSG ( klogWarn, "Expect errors after this line:" );
-    REQUIRE ( KEncFileValidate( pt_file ) == RC(rcKrypto, rcFile, rcValidating, rcChecksum, rcCorrupt) );
-    LOGMSG ( klogWarn, "No more errors are expected" );
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-TEST_CASE(KDectryptCorruptBlockData)
-{
-    const char pw [] = "first pw";
-    KKey key;
-    REQUIRE_RC (KKeyInitUpdate (&key, kkeyAES128, pw, strlen (pw)));
-    
-    const char file_path [] = TMP_FOLDER "/file_corrupt_block_data";
-
-    KFile * enc_file, * pt_file;
-    
-    uint64_t file_size;
-    const size_t buffer_size = sizeof(KEncFileBlock);
-    size_t num_written, num_read;
-    uint8_t buffer[buffer_size];
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    
-    // create file
-    REQUIRE_RC ( TCreateEncFile( current_dir, file_path, TFileOpenMode_Write, &key, &enc_file ) );
-    REQUIRE_RC ( TFillFile( enc_file, (const uint8_t *)"\0\1", 2, 500 ) );
-    REQUIRE_RC ( KFileRelease ( enc_file ) );
-    
-    // corrupt block struct
-    REQUIRE_RC ( TOpenPtFile ( current_dir, file_path, TFileOpenMode_ReadWrite, &pt_file ) );
-    REQUIRE_RC ( KFileSize ( pt_file, &file_size ) );
-    REQUIRE_RC ( KFileReadAll ( pt_file, file_size - sizeof(KEncFileFooter) - buffer_size, buffer, buffer_size, &num_read ) );
-    assert(buffer_size == num_read);
-    ((KEncFileBlock*)&buffer)->data[0] ^= 4;
-    REQUIRE_RC ( KFileWriteAll ( pt_file, file_size - sizeof(KEncFileFooter) - buffer_size, buffer, buffer_size, &num_written ) );
-    assert(buffer_size == num_written);
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-
-    REQUIRE_RC ( TOpenPtFile( current_dir, file_path, TFileOpenMode_Read, &pt_file ) );
-    LOGMSG ( klogWarn, "Expect errors after this line:" );
-    REQUIRE ( KEncFileValidate( pt_file ) == RC(rcKrypto, rcFile, rcValidating, rcChecksum, rcCorrupt) );
-    LOGMSG ( klogWarn, "No more errors are expected" );
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-
-TEST_CASE(KDectryptInvalidKey)
-{
-    const char pw1 [] = "first pw";
-    const char pw2 [] = "second pw";
-    KKey key1, key2;
-    REQUIRE_RC (KKeyInitUpdate (&key1, kkeyAES128, pw1, strlen (pw1)));
-    REQUIRE_RC (KKeyInitUpdate (&key2, kkeyAES128, pw2, strlen (pw2)));
-    
-    const char file_path [] = TMP_FOLDER "/enc_file_invalid_key";
-
-    KFile * enc_file;
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    
-    // create file
-    REQUIRE_RC ( TCreateEncFile( current_dir, file_path, TFileOpenMode_Write, &key1, &enc_file ) );
-    REQUIRE_RC ( TFillFile( enc_file, (const uint8_t *)"\0\1", 2, 500 ) );
-    REQUIRE_RC ( KFileRelease ( enc_file ) );
-    
-    REQUIRE_RC ( TOpenEncFile( current_dir, file_path, TFileOpenMode_Read, &key2, &enc_file ) );
-    LOGMSG ( klogWarn, "Expect errors after this line:" );
-    REQUIRE ( TCheckFileContent( enc_file, (const uint8_t *)"\0\1", 2 ) == RC( rcKrypto, rcFile, rcValidating, rcEncryption, rcCorrupt ) );
-    LOGMSG ( klogWarn, "No more errors are expected" );
-    REQUIRE_RC ( KFileRelease ( enc_file ) );
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-//////////////////////////////////////////// Main
-
-extern "C"
-{
-    
-    ver_t CC KAppVersion ( void )
-    {
-        return 0x1000000;
-    }
-    
-    rc_t CC UsageSummary (const char * prog_name)
-    {
-        return 0;
-    }
-    
-    rc_t CC Usage ( const Args * args)
-    {
-        return 0;
-    }
-    
-    const char UsageDefaultName[] = "test-encdec";
-    
-    rc_t CC KMain ( int argc, char *argv [] )
-    {
-        KConfigDisableUserSettings();
-        rc_t rc=KEncDecTestSuite(argc, argv);
-        return rc;
-    }
-    
-}
\ No newline at end of file
diff --git a/test/krypto/test-krypto-slow.cpp b/test/krypto/test-krypto-slow.cpp
deleted file mode 100644
index 0237bd8..0000000
--- a/test/krypto/test-krypto-slow.cpp
+++ /dev/null
@@ -1,401 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-/**
- * Unit tests for KReencTestSuite
- */
-
-#include <ktst/unit_test.hpp>
-
-#include <krypto/key.h>
-#include <krypto/encfile.h>
-#include <krypto/encfile-priv.h>
-#include <krypto/reencfile.h>
-#include <kfs/impl.h>
-#include <klib/rc.h>
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-#include "test-cmn.hpp"
-
-#include <string.h>
-#include <stdio.h>
-
-TEST_SUITE(KKryptoSlowTestSuite);
-
-// check for file sizes which can only fit into 64-bit
-TEST_CASE(KReencryptBigSparseFile)
-{
-    rc_t rc;
-    bool space_exhausted = false;
-    
-    const char pw2 [] = "second pw";
-    KKey key_reenc;
-    REQUIRE_RC (KKeyInitUpdate (&key_reenc, kkeyAES128, pw2, strlen (pw2)));
-    
-    const char file_path [] = TMP_FOLDER "/big_file";
-
-    const char file_path_reenc [] = TMP_FOLDER "/big_file_reenc";
-
-    KFile * pt_file, *reenc_file, * reenc_pt_file;
-    
-    uint64_t file_size = 5LL * 1024 * 1024 * 1024;
-    uint64_t pt_size, reenc_size;
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    
-    // create file
-    REQUIRE_RC ( TCreatePtFile( current_dir, file_path, TFileOpenMode_Write, &pt_file ) );
-    REQUIRE_RC ( KFileSetSize( pt_file, file_size ) );
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    REQUIRE_RC ( TOpenPtFile( current_dir, file_path, TFileOpenMode_Read, &pt_file ) );
-    REQUIRE_RC ( KEncryptFileMakeRead( (const KFile **)&reenc_file, (const KFile *)pt_file, &key_reenc ) );
-    
-    REQUIRE_RC ( KFileSize ( pt_file, &pt_size ) );
-    REQUIRE_RC ( KFileSize ( reenc_file, &reenc_size ) );
-    
-    REQUIRE ( reenc_size == TEncSizeFromPtSize(pt_size) );
-    
-    REQUIRE_RC ( TCreatePtFile( current_dir, file_path_reenc, TFileOpenMode_Write, &reenc_pt_file ) );
-    
-    rc = TCopyFile( reenc_pt_file, reenc_file );
-    if (rc != 0 && GetRCObject(rc) == rcStorage && GetRCState(rc) == rcExhausted)
-    {
-        space_exhausted = true;
-        printf("WARNING! Test failed due to absence of free FS space - SKIPPING\n");
-    }
-    else
-    {
-        REQUIRE_RC ( rc );
-    }
-    
-    REQUIRE_RC ( KFileRelease ( reenc_pt_file ) );
-    REQUIRE_RC ( KFileRelease ( reenc_file ) );
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    if ( !space_exhausted )
-    {
-        // check file content
-        REQUIRE_RC ( TOpenEncFile( current_dir, file_path_reenc, TFileOpenMode_Read, &key_reenc, &reenc_file ) );
-        
-        REQUIRE_RC ( TCheckFileContent( reenc_file, (const uint8_t *)"\0", 1 ) );
-        
-        REQUIRE_RC ( KFileRelease ( reenc_file ) );
-    }
-
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-TEST_CASE(KReencrypt4GbMarginsSparseFiles)
-{
-    rc_t rc;
-    bool space_exhausted = false;
-    
-    const char pw2 [] = "second pw";
-    KKey key_reenc;
-    REQUIRE_RC (KKeyInitUpdate (&key_reenc, kkeyAES128, pw2, strlen (pw2)));
-    
-    const char file_path [] = TMP_FOLDER "/big_4gb_file";
-
-    const char file_path_reenc [] = TMP_FOLDER "/big_4gb_file_reenc";
-
-    KFile * pt_file, *reenc_file, * reenc_pt_file;
-    
-    uint64_t file_size = 4LL * 1024 * 1024 * 1024;
-    uint64_t pt_size, reenc_size;
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    int8_t size_variants[] = { -1, 1 };
-    for (size_t i = 0; i < sizeof size_variants / sizeof size_variants[0]; ++i )
-    {
-        // just in case if it still there
-        KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-        
-        // create file
-        REQUIRE_RC ( TCreatePtFile( current_dir, file_path, TFileOpenMode_Write, &pt_file ) );
-        REQUIRE_RC ( KFileSetSize( pt_file, file_size + size_variants[i] ) );
-        REQUIRE_RC ( KFileRelease ( pt_file ) );
-        
-        REQUIRE_RC ( TOpenPtFile( current_dir, file_path, TFileOpenMode_Read, &pt_file ) );
-        REQUIRE_RC ( KEncryptFileMakeRead( (const KFile **)&reenc_file, (const KFile *)pt_file, &key_reenc ) );
-        
-        REQUIRE_RC ( KFileSize ( pt_file, &pt_size ) );
-        REQUIRE_RC ( KFileSize ( reenc_file, &reenc_size ) );
-        
-        REQUIRE ( file_size + size_variants[i] == pt_size );
-        REQUIRE ( reenc_size == TEncSizeFromPtSize(pt_size) );
-        
-        REQUIRE_RC ( TCreatePtFile( current_dir, file_path_reenc, TFileOpenMode_Write, &reenc_pt_file ) );
-        rc = TCopyFile( reenc_pt_file, reenc_file );
-        if (rc != 0 && GetRCObject(rc) == rcStorage && GetRCState(rc) == rcExhausted)
-        {
-            space_exhausted = true;
-            printf("WARNING! Test failed due to absence of free FS space - SKIPPING\n");
-        }
-        else
-        {
-            REQUIRE_RC ( rc );
-        }
-        
-        REQUIRE_RC ( KFileRelease ( reenc_pt_file ) );
-        REQUIRE_RC ( KFileRelease ( reenc_file ) );
-        REQUIRE_RC ( KFileRelease ( pt_file ) );
-        
-        if ( !space_exhausted )
-        {
-            // check file content
-            REQUIRE_RC ( TOpenEncFile( current_dir, file_path_reenc, TFileOpenMode_Read, &key_reenc, &reenc_file ) );
-            
-            REQUIRE_RC ( TCheckFileContent( reenc_file, (const uint8_t *)"\0", 1 ) );
-            
-            REQUIRE_RC ( KFileRelease ( reenc_file ) );
-        }
-        
-        KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-        if ( space_exhausted )
-        {
-            break;
-        }
-    }
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-TEST_CASE(KEncDecBigFile)
-{
-    rc_t rc;
-    bool space_exhausted = false;
-    
-    const char pw [] = "first pw";
-    KKey key;
-    REQUIRE_RC (KKeyInitUpdate (&key, kkeyAES128, pw, strlen (pw)));
-    
-    const char file_path [] = TMP_FOLDER "/enc_big_file";
-
-    KFile * enc_file, * pt_file;
-    
-    uint64_t file_size = 5LL * 1024 * 1024 * 1024;
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    
-    // create file
-    REQUIRE_RC ( TCreateEncFile( current_dir, file_path, TFileOpenMode_ReadWrite, &key, &enc_file ) );
-    
-    // write file
-    rc = TFillFile( enc_file, (const uint8_t *)"\1\5", 2, file_size );
-    if (rc != 0 && GetRCObject(rc) == rcStorage && GetRCState(rc) == rcExhausted)
-    {
-        space_exhausted = true;
-        printf("WARNING! Test failed due to absence of free FS space - SKIPPING\n");
-    }
-    else
-    {
-        REQUIRE_RC ( rc );
-    }
-    
-    uint64_t size_data_actual;
-    if ( !space_exhausted )
-    {
-        REQUIRE_RC ( KFileSize ( enc_file, &size_data_actual ) );
-        
-        // check content size
-        REQUIRE ( file_size == size_data_actual );
-    }
-    rc = KFileRelease ( enc_file );
-    if (!space_exhausted )
-    {
-        // we write file footer when closing file, which may fail too
-        if (rc != 0 && GetRCObject(rc) == rcStorage && GetRCState(rc) == rcExhausted)
-        {
-            space_exhausted = true;
-            printf("WARNING! Test failed due to absence of free FS space - SKIPPING\n");
-        }
-        else
-        {
-            REQUIRE_RC ( rc );
-        }
-    }
-    
-    if ( !space_exhausted )
-    {
-        // check plaintext file size and checksums
-        REQUIRE_RC ( TOpenPtFile ( current_dir, file_path, TFileOpenMode_Read, &pt_file ) );
-        
-        uint64_t size_pt;
-        REQUIRE_RC ( KFileSize ( pt_file, &size_pt ) );
-        REQUIRE ( size_pt == TEncSizeFromPtSize(size_data_actual) );
-        
-        REQUIRE_RC ( KEncFileValidate( pt_file ) );
-        
-        REQUIRE_RC ( KFileRelease ( pt_file ) );
-        
-        // check file content
-        REQUIRE_RC ( TOpenEncFile( current_dir, file_path, TFileOpenMode_Read, &key, &enc_file ) );
-        
-        REQUIRE_RC ( TCheckFileContent( enc_file, (const uint8_t *)"\1\5", 2 ) );
-        
-        REQUIRE_RC ( KFileRelease ( enc_file ) );
-    }
-
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-TEST_CASE(KEncDec4GbMarginsFiles)
-{
-    rc_t rc;
-    bool space_exhausted = false;
- 
-    const char pw [] = "first pw";
-    KKey key;
-    REQUIRE_RC (KKeyInitUpdate (&key, kkeyAES128, pw, strlen (pw)));
-    
-    const char file_path [] = TMP_FOLDER "/enc_4gb_file";
-
-    KFile * enc_file, * pt_file;
-    
-    uint64_t file_size = 4LL * 1024 * 1024 * 1024;
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    int8_t size_variants[] = { -1, 1 };
-    for (size_t i = 0; i < sizeof size_variants / sizeof size_variants[0]; ++i )
-    {
-        // just in case if it still there
-        KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-        
-        // create file
-        REQUIRE_RC ( TCreateEncFile( current_dir, file_path, TFileOpenMode_ReadWrite, &key, &enc_file ) );
-        
-        // write file
-        rc = TFillFile( enc_file, (const uint8_t *)"\4\3", 2, file_size );
-        if (rc != 0 && GetRCObject(rc) == rcStorage && GetRCState(rc) == rcExhausted)
-        {
-            space_exhausted = true;
-            printf("WARNING! Test failed due to absence of free FS space - SKIPPING\n");
-        }
-        else
-        {
-            REQUIRE_RC ( rc );
-        }
-        
-        uint64_t size_data_actual;
-        if ( !space_exhausted )
-        {
-            REQUIRE_RC ( KFileSize ( enc_file, &size_data_actual ) );
-            
-            // check content size
-            REQUIRE ( file_size == size_data_actual );
-        }
-        rc = KFileRelease ( enc_file );
-        if ( !space_exhausted )
-        {
-            if (rc != 0 && GetRCObject(rc) == rcStorage && GetRCState(rc) == rcExhausted)
-            {
-                // we write file footer when closing file, which may fail too
-                space_exhausted = true;
-                printf("WARNING! Test failed due to absence of free FS space - SKIPPING\n");
-            }
-            else
-            {
-                REQUIRE_RC ( rc );
-            }
-        }
-        
-        if ( !space_exhausted )
-        {
-            // check plaintext file size and checksums
-            REQUIRE_RC ( TOpenPtFile ( current_dir, file_path, TFileOpenMode_Read, &pt_file ) );
-            
-            uint64_t size_pt;
-            REQUIRE_RC ( KFileSize ( pt_file, &size_pt ) );
-            REQUIRE ( size_pt == TEncSizeFromPtSize(size_data_actual) );
-            
-            REQUIRE_RC ( KEncFileValidate( pt_file ) );
-            
-            REQUIRE_RC ( KFileRelease ( pt_file ) );
-            
-            // check file content
-            REQUIRE_RC ( TOpenEncFile( current_dir, file_path, TFileOpenMode_Read, &key, &enc_file ) );
-            
-            REQUIRE_RC ( TCheckFileContent( enc_file, (const uint8_t *)"\4\3", 2 ) );
-            
-            REQUIRE_RC ( KFileRelease ( enc_file ) );
-        }
-        
-        KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-        if ( space_exhausted )
-        {
-            break;
-        }
-    }
-    
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-//////////////////////////////////////////// Main
-
-extern "C"
-{
-    
-    ver_t CC KAppVersion ( void )
-    {
-        return 0x1000000;
-    }
-    
-    rc_t CC UsageSummary (const char * prog_name)
-    {
-        return 0;
-    }
-    
-    rc_t CC Usage ( const Args * args)
-    {
-        return 0;
-    }
-    
-    const char UsageDefaultName[] = "test-krypto-slow";
-    
-    rc_t CC KMain ( int argc, char *argv [] )
-    {
-        KConfigDisableUserSettings();
-        ncbi::NK::TestEnv::SetVerbosity(ncbi::NK::LogLevel::e_all);
-        rc_t rc=KKryptoSlowTestSuite(argc, argv);
-        return rc;
-    }
-    
-}
\ No newline at end of file
diff --git a/test/krypto/test-modes.c b/test/krypto/test-modes.c
deleted file mode 100644
index 5b26026..0000000
--- a/test/krypto/test-modes.c
+++ /dev/null
@@ -1,1261 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <kapp/main.h>
-#include <kapp/args.h>
-
-#include <krypto/ciphermgr.h>
-#include <krypto/cipher.h>
-
-#include <klib/log.h>
-#include <klib/out.h>
-#include <klib/status.h>
-#include <klib/rc.h>
-#include <klib/defs.h>
-
-
-#include <string.h>
-
-static int num_errors = 0;
-
-/*
-  http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
-
-  http://www.inconteam.com/software-development/41-encryption/55-aes-test-vectors
-*/
-
-uint8_t AES_ECB_128_key[16] =
-{
-    0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
-    0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c
-};
-
-uint8_t  AES_ECB_128_test[4][16] =
-{
-    {
-        0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
-        0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
-    },
-    {
-        0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
-        0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51
-    },
-    {
-        0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
-        0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef
-    },
-    {
-        0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
-        0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }
-};
-
-uint8_t  AES_ECB_128_cipher[4][16] =
-{
-    {
-        0x3a, 0xd7, 0x7b, 0xb4, 0x0d, 0x7a, 0x36, 0x60,
-        0xa8, 0x9e, 0xca, 0xf3, 0x24, 0x66, 0xef, 0x97
-    },
-    {
-        0xf5, 0xd3, 0xd5, 0x85, 0x03, 0xb9, 0x69, 0x9d,
-        0xe7, 0x85, 0x89, 0x5a, 0x96, 0xfd, 0xba, 0xaf
-    },
-    {
-        0x43, 0xb1, 0xcd, 0x7f, 0x59, 0x8e, 0xce, 0x23,
-        0x88, 0x1b, 0x00, 0xe3, 0xed, 0x03, 0x06, 0x88
-    },
-    {
-        0x7b, 0x0c, 0x78, 0x5e, 0x27, 0xe8, 0xad, 0x3f,
-        0x82, 0x23, 0x20, 0x71, 0x04, 0x72, 0x5d, 0xd4
-    }
-};
-
-uint8_t AES_ECB_192_key[24] =
-{
-    0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
-    0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
-    0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b
-};
-
-uint8_t  AES_ECB_192_test[4][16] =
-{
-    {
-        0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
-        0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
-    },
-    {
-        0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
-        0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51
-    },
-    {
-        0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
-        0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef
-    },
-    {
-        0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
-        0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }
-};
-
-uint8_t  AES_ECB_192_cipher[4][16] =
-{
-    {
-        0xbd, 0x33, 0x4f, 0x1d, 0x6e, 0x45, 0xf2, 0x5f,
-        0xf7, 0x12, 0xa2, 0x14, 0x57, 0x1f, 0xa5, 0xcc
-    },
-    {
-        0x97, 0x41, 0x04, 0x84, 0x6d, 0x0a, 0xd3, 0xad,
-        0x77, 0x34, 0xec, 0xb3, 0xec, 0xee, 0x4e, 0xef
-    },
-    {
-        0xef, 0x7a, 0xfd, 0x22, 0x70, 0xe2, 0xe6, 0x0a,
-        0xdc, 0xe0, 0xba, 0x2f, 0xac, 0xe6, 0x44, 0x4e
-    },
-    {
-        0x9a, 0x4b, 0x41, 0xba, 0x73, 0x8d, 0x6c, 0x72,
-        0xfb, 0x16, 0x69, 0x16, 0x03, 0xc1, 0x8e, 0x0e
-    }
-};
- 
-uint8_t AES_ECB_256_key[32] = 
-{
-    0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
-    0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
-    0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7,
-    0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4
-};
-
-uint8_t AES_ECB_256_test[4][16] = 
-{
-    {
-        0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
-        0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
-    },
-    {
-        0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
-        0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51
-    },
-    {   
-        0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
-        0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef
-    },
-    {
-        0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
-        0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }
-};
-
-uint8_t AES_ECB_256_cipher[4][16] = 
-{
-    {
-        0xf3, 0xee, 0xd1, 0xbd, 0xb5, 0xd2, 0xa0, 0x3c,
-        0x06, 0x4b, 0x5a, 0x7e, 0x3d, 0xb1, 0x81, 0xf8
-    },
-    {
-        0x59, 0x1c, 0xcb, 0x10, 0xd4, 0x10, 0xed, 0x26,
-        0xdc, 0x5b, 0xa7, 0x4a, 0x31, 0x36, 0x28, 0x70
-    },
-    {
-        0xb6, 0xed, 0x21, 0xb9, 0x9c, 0xa6, 0xf4, 0xf9,
-        0xf1, 0x53, 0xe7, 0xb1, 0xbe, 0xaf, 0xed, 0x1d
-    },
-    {
-        0x23, 0x30, 0x4b, 0x7a, 0x39, 0xf9, 0xf3, 0xff,
-        0x06, 0x7d, 0x8d, 0x8f, 0x9e, 0x24, 0xec, 0xc7
-    }
-};
-
-uint8_t AES_CBC_128_key[16] =
-{
-    0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
-    0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c
-};
-
-uint8_t AES_CBC_128_ivec[4][16] =
-{
-    {
-        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-        0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
-    },
-    {
-        0x76, 0x49, 0xAB, 0xAC, 0x81, 0x19, 0xB2, 0x46,
-        0xCE, 0xE9, 0x8E, 0x9B, 0x12, 0xE9, 0x19, 0x7D
-    },
-    {
-        0x50, 0x86, 0xCB, 0x9B, 0x50, 0x72, 0x19, 0xEE,
-        0x95, 0xDB, 0x11, 0x3A, 0x91, 0x76, 0x78, 0xB2
-    },
-    {
-        0x73, 0xBE, 0xD6, 0xB8, 0xE3, 0xC1, 0x74, 0x3B,
-        0x71, 0x16, 0xE6, 0x9E, 0x22, 0x22, 0x95, 0x16
-    }
-};
-uint8_t AES_CBC_128_test[4][16] =
-{
-    {
-        0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
-        0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
-    },
-    {
-        0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
-        0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51
-    },
-    {
-        0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
-        0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef
-    },
-    {
-        0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
-        0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }
-};
-uint8_t AES_CBC_128_cipher[4][16] =
-{
-    {
-        0x76, 0x49, 0xab, 0xac, 0x81, 0x19, 0xb2, 0x46,
-        0xce, 0xe9, 0x8e, 0x9b, 0x12, 0xe9, 0x19, 0x7d
-    },
-    {
-        0x50, 0x86, 0xcb, 0x9b, 0x50, 0x72, 0x19, 0xee,
-        0x95, 0xdb, 0x11, 0x3a, 0x91, 0x76, 0x78, 0xb2
-    },
-    {
-        0x73, 0xbe, 0xd6, 0xb8, 0xe3, 0xc1, 0x74, 0x3b,
-        0x71, 0x16, 0xe6, 0x9e, 0x22, 0x22, 0x95, 0x16
-    },
-    {
-        0x3f, 0xf1, 0xca, 0xa1, 0x68, 0x1f, 0xac, 0x09,
-        0x12, 0x0e, 0xca, 0x30, 0x75, 0x86, 0xe1, 0xa7
-    }
-};
-
-uint8_t AES_CBC_192_key[24] =
-{
-    0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
-    0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
-    0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b
-};
-
-uint8_t AES_CBC_192_ivec[4][16] =
-{
-    {
-        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-        0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
-    },
-    {
-        0x4F, 0x02, 0x1D, 0xB2, 0x43, 0xBC, 0x63, 0x3D,
-        0x71, 0x78, 0x18, 0x3A, 0x9F, 0xA0, 0x71, 0xE8
-    },
-    {
-        0xB4, 0xD9, 0xAD, 0xA9, 0xAD, 0x7D, 0xED, 0xF4,
-        0xE5, 0xE7, 0x38, 0x76, 0x3F, 0x69, 0x14, 0x5A
-    },
-    {
-        0x57, 0x1B, 0x24, 0x20, 0x12, 0xFB, 0x7A, 0xE0,
-        0x7F, 0xA9, 0xBA, 0xAC, 0x3D, 0xF1, 0x02, 0xE0
-    }
-};
-uint8_t AES_CBC_192_test[4][16] =
-{
-    {
-        0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
-        0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
-    },
-    {
-        0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
-        0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51
-    },
-    {
-        0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
-        0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef
-    },
-    {
-        0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
-        0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }
-};
-uint8_t AES_CBC_192_cipher[4][16] =
-{
-    {
-        0x4f, 0x02, 0x1d, 0xb2, 0x43, 0xbc, 0x63, 0x3d,
-        0x71, 0x78, 0x18, 0x3a, 0x9f, 0xa0, 0x71, 0xe8
-    },
-    {
-        0xb4, 0xd9, 0xad, 0xa9, 0xad, 0x7d, 0xed, 0xf4, 
-        0xe5, 0xe7, 0x38, 0x76, 0x3f, 0x69, 0x14, 0x5a
-    },
-    {
-        0x57, 0x1b, 0x24, 0x20, 0x12, 0xfb, 0x7a, 0xe0,
-        0x7f, 0xa9, 0xba, 0xac, 0x3d, 0xf1, 0x02, 0xe0
-    },
-    {
-        0x08, 0xb0, 0xe2, 0x79, 0x88, 0x59, 0x88, 0x81,
-        0xd9, 0x20, 0xa9, 0xe6, 0x4f, 0x56, 0x15, 0xcd
-    }
-};
-
-uint8_t AES_CBC_256_key[32] =
-{
-    0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
-    0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
-    0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7,
-    0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4
-};
-
-uint8_t AES_CBC_256_ivec[4][16] =
-{
-    {
-        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-        0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
-    },
-    {
-        0xF5, 0x8C, 0x4C, 0x04, 0xD6, 0xE5, 0xF1, 0xBA,
-        0x77, 0x9E, 0xAB, 0xFB, 0x5F, 0x7B, 0xFB, 0xD6
-    },
-    {
-        0x9C, 0xFC, 0x4E, 0x96, 0x7E, 0xDB, 0x80, 0x8D,
-        0x67, 0x9F, 0x77, 0x7B, 0xC6, 0x70, 0x2C, 0x7D
-    },
-    {
-        0x39, 0xF2, 0x33, 0x69, 0xA9, 0xD9, 0xBA, 0xCF,
-        0xA5, 0x30, 0xE2, 0x63, 0x04, 0x23, 0x14, 0x61
-    }
-};
-uint8_t AES_CBC_256_test[4][16] =
-{
-    {
-        0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
-        0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
-    },
-    {
-        0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
-        0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51
-    },
-    {
-        0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
-        0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef
-    },
-    {
-        0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
-        0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }
-};
-uint8_t AES_CBC_256_cipher[4][16] =
-{
-    {
-        0xf5, 0x8c, 0x4c, 0x04, 0xd6, 0xe5, 0xf1, 0xba,
-        0x77, 0x9e, 0xab, 0xfb, 0x5f, 0x7b, 0xfb, 0xd6
-    },
-    {
-        0x9c, 0xfc, 0x4e, 0x96, 0x7e, 0xdb, 0x80, 0x8d,
-        0x67, 0x9f, 0x77, 0x7b, 0xc6, 0x70, 0x2c, 0x7d
-    },
-    {
-        0x39, 0xf2, 0x33, 0x69, 0xa9, 0xd9, 0xba, 0xcf,
-        0xa5, 0x30, 0xe2, 0x63, 0x04, 0x23, 0x14, 0x61
-    },
-    {
-        0xb2, 0xeb, 0x05, 0xe2, 0xc3, 0x9b, 0xe9, 0xfc,
-        0xda, 0x6c, 0x19, 0x07, 0x8c, 0x6a, 0x9d, 0x1b
-    }
-};
-
-/* ==================================================== */
-uint8_t AES_CFB_128_key[16] =
-{
-    0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
-    0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c
-};
-
-uint8_t AES_CFB_128_ivec[4][16] =
-{
-    {
-        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-        0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f
-    },
-    {
-        0x3B, 0x3F, 0xD9, 0x2E, 0xB7, 0x2D, 0xAD, 0x20,
-        0x33, 0x34, 0x49, 0xF8, 0xE8, 0x3C, 0xFB, 0x4A
-    },
-    {
-        0xC8, 0xA6, 0x45, 0x37, 0xA0, 0xB3, 0xA9, 0x3F,
-        0xCD, 0xE3, 0xCD, 0xAD, 0x9F, 0x1C, 0xE5, 0x8B
-    },
-    {
-        0x26, 0x75, 0x1F, 0x67, 0xA3, 0xCB, 0xB1, 0x40,
-        0xB1, 0x80, 0x8C, 0xF1, 0x87, 0xA4, 0xF4, 0xDF
-    }
-};
-uint8_t AES_CFB_128_test[4][16] =
-{
-    {
-        0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
-        0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
-    },
-    {
-        0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
-        0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51
-    },
-    {
-        0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
-        0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef
-    },
-    {
-        0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
-        0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }
-};
-uint8_t AES_CFB_128_cipher[4][16] =
-{
-    {
-        0x3b, 0x3f, 0xd9, 0x2e, 0xb7, 0x2d, 0xad, 0x20,
-        0x33, 0x34, 0x49, 0xf8, 0xe8, 0x3c, 0xfb, 0x4a
-    },
-    {
-        0xc8, 0xa6, 0x45, 0x37, 0xa0, 0xb3, 0xa9, 0x3f,
-        0xcd, 0xe3, 0xcd, 0xad, 0x9f, 0x1c, 0xe5, 0x8b
-    },
-    {
-        0x26, 0x75, 0x1f, 0x67, 0xa3, 0xcb, 0xb1, 0x40,
-        0xb1, 0x80, 0x8c, 0xf1, 0x87, 0xa4, 0xf4, 0xdf
-    },
-    {
-        0xc0, 0x4b, 0x05, 0x35, 0x7c, 0x5d, 0x1c, 0x0e,
-        0xea, 0xc4, 0xc6, 0x6f, 0x9f, 0xf7, 0xf2, 0xe6
-    }
-};
-
-uint8_t AES_CFB_192_key[24] =
-{
-    0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
-    0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
-    0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b
-};
-
-uint8_t AES_CFB_192_ivec[4][16] =
-{
-    {
-        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-        0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
-    },
-    {
-        0xCD, 0xC8, 0x0D, 0x6F, 0xDD, 0xF1, 0x8C, 0xAB,
-        0x34, 0xC2, 0x59, 0x09, 0xC9, 0x9A, 0x41, 0x74
-    },
-    {
-        0x67, 0xCE, 0x7F, 0x7F, 0x81, 0x17, 0x36, 0x21,
-        0x96, 0x1A, 0x2B, 0x70, 0x17, 0x1D, 0x3D, 0x7A
-    },
-    {
-        0x2E, 0x1E, 0x8A, 0x1D, 0xD5, 0x9B, 0x88, 0xB1,
-        0xC8, 0xE6, 0x0F, 0xED, 0x1E, 0xFA, 0xC4, 0xC9
-    }
-};
-uint8_t AES_CFB_192_test[4][16] =
-{
-    {
-        0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
-        0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
-    },
-    {
-        0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
-        0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51
-    },
-    {
-        0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, 
-        0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef
-    },
-    {
-        0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
-        0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }
-};
-uint8_t AES_CFB_192_cipher[4][16] =
-{
-    {
-        0xcd, 0xc8, 0x0d, 0x6f, 0xdd, 0xf1, 0x8c, 0xab,
-        0x34, 0xc2, 0x59, 0x09, 0xc9, 0x9a, 0x41, 0x74
-    },
-    {
-        0x67, 0xce, 0x7f, 0x7f, 0x81, 0x17, 0x36, 0x21,
-        0x96, 0x1a, 0x2b, 0x70, 0x17, 0x1d, 0x3d, 0x7a
-    },
-    {
-        0x2e, 0x1e, 0x8a, 0x1d, 0xd5, 0x9b, 0x88, 0xb1,
-        0xc8, 0xe6, 0x0f, 0xed, 0x1e, 0xfa, 0xc4, 0xc9
-    },
-    {
-        0xc0, 0x5f, 0x9f, 0x9c, 0xa9, 0x83, 0x4f, 0xa0,
-        0x42, 0xae, 0x8f, 0xba, 0x58, 0x4b, 0x09, 0xff
-    }
-};
-
-uint8_t AES_CFB_256_key[32] =
-{
-    0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
-    0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
-    0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7,
-    0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4
-};
-
-uint8_t AES_CFB_256_ivec[4][16] =
-{
-    {
-        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-        0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
-    },
-    {
-        0xDC, 0x7E, 0x84, 0xBF, 0xDA, 0x79, 0x16, 0x4B,
-        0x7E, 0xCD, 0x84, 0x86, 0x98, 0x5D, 0x38, 0x60
-    },
-    {
-        0x39, 0xFF, 0xED, 0x14, 0x3B, 0x28, 0xB1, 0xC8,
-        0x32, 0x11, 0x3C, 0x63, 0x31, 0xE5, 0x40, 0x7B
-    },
-    {
-        0xDF, 0x10, 0x13, 0x24, 0x15, 0xE5, 0x4B, 0x92,
-        0xA1, 0x3E, 0xD0, 0xA8, 0x26, 0x7A, 0xE2, 0xF9
-    }
-};
-uint8_t AES_CFB_256_test[4][16] =
-{
-    {
-        0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
-        0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
-    },
-    {
-        0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
-        0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51
-    },
-    {
-        0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
-        0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef
-    },
-    {
-        0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
-        0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }
-};
-uint8_t AES_CFB_256_cipher[4][16] =
-{
-    {
-        0xDC, 0x7E, 0x84, 0xBF, 0xDA, 0x79, 0x16, 0x4B,
-        0x7E, 0xCD, 0x84, 0x86, 0x98, 0x5D, 0x38, 0x60
-    },
-    {
-        0x39, 0xff, 0xed, 0x14, 0x3b, 0x28, 0xb1, 0xc8,
-        0x32, 0x11, 0x3c, 0x63, 0x31, 0xe5, 0x40, 0x7b
-    },
-    {
-        0xdf, 0x10, 0x13, 0x24, 0x15, 0xe5, 0x4b, 0x92,
-        0xa1, 0x3e, 0xd0, 0xa8, 0x26, 0x7a, 0xe2, 0xf9
-    },
-    {
-        0x75, 0xa3, 0x85, 0x74, 0x1a, 0xb9, 0xce, 0xf8,
-        0x20, 0x31, 0x62, 0x3d, 0x55, 0xb1, 0xe4, 0x71
-    }
-};
-/* ==================================================== */
-uint8_t AES_OFB_128_key[16] =
-{
-    0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
-    0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c
-};
-
-uint8_t AES_OFB_128_ivec[4][16] =
-{
-    {
-        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-        0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
-    },
-    {
-        0x50, 0xFE, 0x67, 0xCC, 0x99, 0x6D, 0x32, 0xB6,
-        0xDA, 0x09, 0x37, 0xE9, 0x9B, 0xAF, 0xEC, 0x60
-    },
-    {
-        0xD9, 0xA4, 0xDA, 0xDA, 0x08, 0x92, 0x23, 0x9F,
-        0x6B, 0x8B, 0x3D, 0x76, 0x80, 0xE1, 0x56, 0x74
-    },
-    {
-        0xA7, 0x88, 0x19, 0x58, 0x3F, 0x03, 0x08, 0xE7,
-        0xA6, 0xBF, 0x36, 0xB1, 0x38, 0x6A, 0xBF, 0x23
-    }
-};
-uint8_t AES_OFB_128_test[4][16] =
-{
-    {
-        0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
-        0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
-    },
-    {
-        0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
-        0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51
-    },
-    {
-        0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
-        0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef
-    },
-    {
-        0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
-        0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }
-};
-uint8_t AES_OFB_128_cipher[4][16] =
-{
-    {
-        0x3b, 0x3f, 0xd9, 0x2e, 0xb7, 0x2d, 0xad, 0x20,
-        0x33, 0x34, 0x49, 0xf8, 0xe8, 0x3c, 0xfb, 0x4a
-    },
-    {
-        0x77, 0x89, 0x50, 0x8d, 0x16, 0x91, 0x8f, 0x03,
-        0xf5, 0x3c, 0x52, 0xda, 0xc5, 0x4e, 0xd8, 0x25
-    },
-    {
-        0x97, 0x40, 0x05, 0x1e, 0x9c, 0x5f, 0xec, 0xf6,
-        0x43, 0x44, 0xf7, 0xa8, 0x22, 0x60, 0xed, 0xcc
-    },
-    {
-        0x30, 0x4c, 0x65, 0x28, 0xf6, 0x59, 0xc7, 0x78,
-        0x66, 0xa5, 0x10, 0xd9, 0xc1, 0xd6, 0xae, 0x5e
-    }
-};
-
-uint8_t AES_OFB_192_key[24] =
-{
-    0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
-    0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
-    0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b
-};
-
-uint8_t AES_OFB_192_ivec[4][16] =
-{
-    {
-        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-        0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
-    },
-    {
-        0xA6, 0x09, 0xB3, 0x8D, 0xF3, 0xB1, 0x13, 0x3D,
-        0xDD, 0xFF, 0x27, 0x18, 0xBA, 0x09, 0x56, 0x5E
-    },
-    {
-        0x52, 0xEF, 0x01, 0xDA, 0x52, 0x60, 0x2F, 0xE0,
-        0x97, 0x5F, 0x78, 0xAC, 0x84, 0xBF, 0x8A, 0x50
-    },
-    {
-        0xBD, 0x52, 0x86, 0xAC, 0x63, 0xAA, 0xBD, 0x7E,
-        0xB0, 0x67, 0xAC, 0x54, 0xB5, 0x53, 0xF7, 0x1D
-    }
-};
-uint8_t AES_OFB_192_test[4][16] =
-{
-    {
-        0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
-        0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
-    },
-    {
-        0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
-        0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51
-    },
-    {
-        0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
-        0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef
-    },
-    {
-        0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
-        0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }
-};
-uint8_t AES_OFB_192_cipher[4][16] =
-{
-    {
-        0xcd, 0xc8, 0x0d, 0x6f, 0xdd, 0xf1, 0x8c, 0xab,
-        0x34, 0xc2, 0x59, 0x09, 0xc9, 0x9a, 0x41, 0x74
-    },
-    {
-        0xfc, 0xc2, 0x8b, 0x8d, 0x4c, 0x63, 0x83, 0x7c,
-        0x09, 0xe8, 0x17, 0x00, 0xc1, 0x10, 0x04, 0x01
-    },
-    {
-        0x8d, 0x9a, 0x9a, 0xea, 0xc0, 0xf6, 0x59, 0x6f,
-        0x55, 0x9c, 0x6d, 0x4d, 0xaf, 0x59, 0xa5, 0xf2
-    },
-    {
-        0x6d, 0x9f, 0x20, 0x08, 0x57, 0xca, 0x6c, 0x3e,
-        0x9c, 0xac, 0x52, 0x4b, 0xd9, 0xac, 0xc9, 0x2a
-    }
-};
-
-uint8_t AES_OFB_256_key[32] =
-{
-    0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
-    0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
-    0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7,
-    0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4
-};
-
-uint8_t AES_OFB_256_ivec[4][16] =
-{
-    {
-        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-        0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
-    },
-    {
-        0xB7, 0xBF, 0x3A, 0x5D, 0xF4, 0x39, 0x89, 0xDD,
-        0x97, 0xF0, 0xFA, 0x97, 0xEB, 0xCE, 0x2F, 0x4A
-    },
-    {
-        0xE1, 0xC6, 0x56, 0x30, 0x5E, 0xD1, 0xA7, 0xA6,
-        0x56, 0x38, 0x05, 0x74, 0x6F, 0xE0, 0x3E, 0xDC
-    },
-    {
-        0x41, 0x63, 0x5B, 0xE6, 0x25, 0xB4, 0x8A, 0xFC,
-        0x16, 0x66, 0xDD, 0x42, 0xA0, 0x9D, 0x96, 0xE7
-    }
-};
-uint8_t AES_OFB_256_test[4][16] =
-{
-    {
-        0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
-        0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
-    },
-    {
-        0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
-        0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51
-    },
-    {
-        0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
-        0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef
-    },
-    {
-        0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
-        0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }
-};
-uint8_t AES_OFB_256_cipher[4][16] =
-{
-    {
-        0xdc, 0x7e, 0x84, 0xbf, 0xda, 0x79, 0x16, 0x4b,
-        0x7e, 0xcd, 0x84, 0x86, 0x98, 0x5d, 0x38, 0x60
-    },
-    {
-        0x4f, 0xeb, 0xdc, 0x67, 0x40, 0xd2, 0x0b, 0x3a,
-        0xc8, 0x8f, 0x6a, 0xd8, 0x2a, 0x4f, 0xb0, 0x8d
-    },
-    {
-        0x71, 0xab, 0x47, 0xa0, 0x86, 0xe8, 0x6e, 0xed,
-        0xf3, 0x9d, 0x1c, 0x5b, 0xba, 0x97, 0xc4, 0x08
-    },
-    {
-        0x01, 0x26, 0x14, 0x1d, 0x67, 0xf3, 0x7b, 0xe8,
-        0x53, 0x8f, 0x5a, 0x8b, 0xe7, 0x40, 0xe4, 0x84
-    }
-};
-
-/* ==================================================== */
-uint8_t AES_CTR_128_key[16] =
-{
-    0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
-    0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c
-};
-
-uint8_t AES_CTR_128_ivec[16] =
-{
-    0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
-    0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
-};
-uint8_t AES_CTR_128_test[4][16] =
-{
-    {
-        0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
-        0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
-    },
-    {
-        0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
-        0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51
-    },
-    {
-        0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
-        0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef
-    },
-    {
-        0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
-        0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }
-};
-uint8_t AES_CTR_128_cipher[4][16] =
-{
-    {
-        0x87, 0x4d, 0x61, 0x91, 0xb6, 0x20, 0xe3, 0x26,
-        0x1b, 0xef, 0x68, 0x64, 0x99, 0x0d, 0xb6, 0xce
-    },
-    {
-        0x98, 0x06, 0xf6, 0x6b, 0x79, 0x70, 0xfd, 0xff,
-        0x86, 0x17, 0x18, 0x7b, 0xb9, 0xff, 0xfd, 0xff
-    },
-    {
-        0x5a, 0xe4, 0xdf, 0x3e, 0xdb, 0xd5, 0xd3, 0x5e,
-        0x5b, 0x4f, 0x09, 0x02, 0x0d, 0xb0, 0x3e, 0xab
-    },
-    {
-        0x1e, 0x03, 0x1d, 0xda, 0x2f, 0xbe, 0x03, 0xd1,
-        0x79, 0x21, 0x70, 0xa0, 0xf3, 0x00, 0x9c, 0xee
-    }
-};
-
-uint8_t AES_CTR_192_key[24] =
-{
-    0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
-    0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
-    0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b
-};
-
-uint8_t AES_CTR_192_ivec[16] =
-{
-    0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
-    0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
-};
-uint8_t AES_CTR_192_test[4][16] =
-{
-    {
-        0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
-        0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
-    },
-    {
-        0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
-        0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51
-    },
-    {
-        0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
-        0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef
-    },
-    {
-        0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
-        0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }
-};
-uint8_t AES_CTR_192_cipher[4][16] =
-{
-    {
-        0x1a, 0xbc, 0x93, 0x24, 0x17, 0x52, 0x1c, 0xa2,
-        0x4f, 0x2b, 0x04, 0x59, 0xfe, 0x7e, 0x6e, 0x0b
-    },
-    {
-        0x09, 0x03, 0x39, 0xec, 0x0a, 0xa6, 0xfa, 0xef,
-        0xd5, 0xcc, 0xc2, 0xc6, 0xf4, 0xce, 0x8e, 0x94
-    },
-    {
-        0x1e, 0x36, 0xb2, 0x6b, 0xd1, 0xeb, 0xc6, 0x70,
-        0xd1, 0xbd, 0x1d, 0x66, 0x56, 0x20, 0xab, 0xf7
-    },
-    {
-        0x4f, 0x78, 0xa7, 0xf6, 0xd2, 0x98, 0x09, 0x58,
-        0x5a, 0x97, 0xda, 0xec, 0x58, 0xc6, 0xb0, 0x50
-    }
-};
-
-uint8_t AES_CTR_256_key[32] =
-{
-    0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
-    0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
-    0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7,
-    0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4
-};
-
-uint8_t AES_CTR_256_ivec[16] =
-{
-    0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
-    0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
-};
-uint8_t AES_CTR_256_test[4][16] =
-{
-    {
-        0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
-        0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
-    },
-    {
-        0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
-        0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51
-    },
-    {
-        0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
-        0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef
-    },
-    {
-        0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
-        0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
-    }
-};
-uint8_t AES_CTR_256_cipher[4][16] =
-{
-    {
-        0x60, 0x1e, 0xc3, 0x13, 0x77, 0x57, 0x89, 0xa5,
-        0xb7, 0xa7, 0xf5, 0x04, 0xbb, 0xf3, 0xd2, 0x28
-    },
-    {   
-        0xf4, 0x43, 0xe3, 0xca, 0x4d, 0x62, 0xb5, 0x9a,
-        0xca, 0x84, 0xe9, 0x90, 0xca, 0xca, 0xf5, 0xc5
-    },
-    {   
-        0x2b, 0x09, 0x30, 0xda, 0xa2, 0x3d, 0xe9, 0x4c,
-        0xe8, 0x70, 0x17, 0xba, 0x2d, 0x84, 0x98, 0x8d
-    },
-    {   
-        0xdf, 0xc9, 0xc5, 0x8d, 0xb6, 0x7a, 0xad, 0xa6,
-        0x13, 0xc2, 0xdd, 0x08, 0x45, 0x79, 0x41, 0xa6
-    }
-};
-/* ==================================================== */
-rc_t run ()
-{
-    KCipherManager * manager;
-    rc_t rc;
-
-    rc = KCipherManagerMake (&manager);
-    if (rc == 0)
-    {
-        KCipher * cipher;
-
-        rc = KCipherManagerMakeCipher (manager, &cipher, kcipher_AES);
-        if (rc == 0)
-        {
-            /* AES ECB 128 */
-            KOutMsg ("AES ECB 128\n");
-            rc = KCipherSetEncryptKey (cipher, AES_ECB_128_key, sizeof AES_ECB_128_key);
-            if (rc == 0)
-            {
-                rc = KCipherSetDecryptKey (cipher, AES_ECB_128_key, sizeof AES_ECB_128_key);
-                if (rc == 0)
-                {
-                    unsigned int index;
-
-                    for (index = 0; index < (sizeof AES_ECB_128_test / sizeof AES_ECB_128_test[0]); ++index)
-                    {
-                        uint8_t etemp [16];
-                        uint8_t dtemp [16];
-
-                        rc = KCipherEncryptECB (cipher, AES_ECB_128_test[index], etemp, sizeof AES_ECB_128_test[0] / sizeof etemp);
-                        if (rc == 0)
-                        {
-                            rc = KCipherDecryptECB (cipher, AES_ECB_128_cipher[index], dtemp, sizeof AES_ECB_128_cipher[0] / sizeof dtemp);
-                            if (rc == 0)
-                            {
-                                if (memcmp (AES_ECB_128_test[index], dtemp, sizeof dtemp) != 0)
-                                {
-                                    KOutMsg ("Failed AES ECB 128 encrypt #%u\n", index);
-                                    ++num_errors;
-                                }
-                                if (memcmp (AES_ECB_128_cipher[index], etemp, sizeof etemp) != 0)
-                                {
-                                    KOutMsg ("Failed AES ECB 128 decrypt test #%u\n", index);
-                                    ++num_errors;
-                                }
-                            }
-                        }
-                    }
-                }
-            }           
-
-            /* AES ECB 192 */
-            KOutMsg ("AES ECB 192\n");
-            rc = KCipherSetEncryptKey (cipher, AES_ECB_192_key, sizeof AES_ECB_192_key);
-            if (rc == 0)
-            {
-                rc = KCipherSetDecryptKey (cipher, AES_ECB_192_key, sizeof AES_ECB_192_key);
-                if (rc == 0)
-                {
-                    unsigned int index;
-
-                    for (index = 0; index < (sizeof AES_ECB_192_test / sizeof AES_ECB_192_test[0]); ++index)
-                    {
-                        uint8_t etemp [16];
-                        uint8_t dtemp [16];
-
-                        rc = KCipherEncryptECB (cipher, AES_ECB_192_test[index], etemp, sizeof AES_ECB_192_test[0] / sizeof etemp);
-                        if (rc == 0)
-                        {
-                            rc = KCipherDecryptECB (cipher, AES_ECB_192_cipher[index], dtemp, sizeof AES_ECB_192_cipher[0] / sizeof dtemp);
-                            if (rc == 0)
-                            {
-                                if (memcmp (AES_ECB_192_test[index], dtemp, sizeof dtemp) != 0)
-                                {
-                                    KOutMsg ("Failed AES ECB 192 encrypt #%u\n", index);
-                                    ++num_errors;
-                                }
-                                if (memcmp (AES_ECB_192_cipher[index], etemp, sizeof etemp) != 0)
-                                {
-                                    KOutMsg ("Failed AES ECB 192 decrypt test #%u\n", index);
-                                    ++num_errors;
-                                }
-                            }
-                        }
-                    }
-                }
-            }           
-
-            /* AES ECB 256 */
-            KOutMsg ("AES ECB 256\n");
-            rc = KCipherSetEncryptKey (cipher, AES_ECB_256_key, sizeof AES_ECB_256_key);
-            if (rc == 0)
-            {
-                rc = KCipherSetDecryptKey (cipher, AES_ECB_256_key, sizeof AES_ECB_256_key);
-                if (rc == 0)
-                {
-                    unsigned int index;
-
-                    for (index = 0; index < (sizeof AES_ECB_256_test / sizeof AES_ECB_256_test[0]); ++index)
-                    {
-                        uint8_t etemp [16];
-                        uint8_t dtemp [16];
-
-                        rc = KCipherEncryptECB (cipher, AES_ECB_256_test[index], etemp, sizeof AES_ECB_256_test[0] / sizeof etemp);
-                        if (rc == 0)
-                        {
-                            rc = KCipherDecryptECB (cipher, AES_ECB_256_cipher[index], dtemp, sizeof AES_ECB_256_cipher[0] / sizeof dtemp);
-                            if (rc == 0)
-                            {
-                                if (memcmp (AES_ECB_256_test[index], dtemp, sizeof dtemp) != 0)
-                                {
-                                    KOutMsg ("Failed AES ECB 256 encrypt #%u\n", index);
-                                    ++num_errors;
-                                }
-                                if (memcmp (AES_ECB_256_cipher[index], etemp, sizeof etemp) != 0)
-                                {
-                                    KOutMsg ("Failed AES ECB 256 decrypt test #%u\n", index);
-                                    ++num_errors;
-                                }
-                            }
-                        }
-                    }
-                }
-            }           
-
-
-            /* AES CBC 128 */
-            KOutMsg ("AES CBC 128\n");
-            rc = KCipherSetEncryptKey (cipher, AES_CBC_128_key, sizeof AES_CBC_128_key);
-            if (rc == 0)
-            {
-                rc = KCipherSetDecryptKey (cipher, AES_CBC_128_key, sizeof AES_CBC_128_key);
-                if (rc == 0)
-                {
-                    rc = KCipherSetEncryptIVec (cipher, AES_CBC_128_ivec);
-                    if (rc == 0)
-                    {
-                        rc = KCipherSetDecryptIVec (cipher, AES_CBC_128_ivec);
-                        if (rc == 0)
-                        {
-                            unsigned int index;
-
-                            for (index = 0; index < (sizeof AES_CBC_128_test / sizeof AES_CBC_128_test[0]); ++index)
-                            {
-                                uint8_t etemp [16];
-                                uint8_t dtemp [16];
-
-                                rc = KCipherEncryptCBC (cipher, AES_CBC_128_test[index], etemp, sizeof AES_CBC_128_test[0] / sizeof etemp);
-                                if (rc == 0)
-                                {
-                                    rc = KCipherDecryptCBC (cipher, AES_CBC_128_cipher[index], dtemp, sizeof AES_CBC_128_cipher[0] / sizeof dtemp);
-                                    if (rc == 0)
-                                    {
-                                        if (memcmp (AES_CBC_128_test[index], dtemp, sizeof dtemp) != 0)
-                                        {
-                                            KOutMsg ("Failed AES CBC 128 encrypt #%u\n", index);
-                                            ++num_errors;
-                                        }
-                                        if (memcmp (AES_CBC_128_cipher[index], etemp, sizeof etemp) != 0)
-                                        {
-                                            KOutMsg ("Failed AES CBC 128 decrypt test #%u\n", index);
-                                            ++num_errors;
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }           
-
-            /* AES CBC 192 */
-            KOutMsg ("AES CBC 192\n");
-            rc = KCipherSetEncryptKey (cipher, AES_CBC_192_key, sizeof AES_CBC_192_key);
-            if (rc == 0)
-            {
-                rc = KCipherSetDecryptKey (cipher, AES_CBC_192_key, sizeof AES_CBC_192_key);
-                if (rc == 0)
-                {
-                    rc = KCipherSetEncryptIVec (cipher, AES_CBC_128_ivec);
-                    if (rc == 0)
-                    {
-                        rc = KCipherSetDecryptIVec (cipher, AES_CBC_128_ivec);
-                        if (rc == 0)
-                        {
-                            unsigned int index;
-
-                            for (index = 0; index < (sizeof AES_CBC_192_test / sizeof AES_CBC_192_test[0]); ++index)
-                            {
-                                uint8_t etemp [16];
-                                uint8_t dtemp [16];
-
-                                rc = KCipherEncryptCBC (cipher, AES_CBC_192_test[index], etemp, sizeof AES_CBC_192_test[0] / sizeof etemp );
-                                if (rc == 0)
-                                {
-                                    rc = KCipherDecryptCBC (cipher, AES_CBC_192_cipher[index], dtemp, sizeof AES_CBC_192_cipher[0] / sizeof dtemp);
-                                    if (rc == 0)
-                                    {
-                                        if (memcmp (AES_CBC_192_test[index], dtemp, sizeof dtemp) != 0)
-                                        {
-                                            KOutMsg ("Failed AES CBC 192 encrypt #%u\n", index);
-                                            ++num_errors;
-                                        }
-                                        if (memcmp (AES_CBC_192_cipher[index], etemp, sizeof etemp) != 0)
-                                        {
-                                            KOutMsg ("Failed AES CBC 192 decrypt test #%u\n", index);
-                                            ++num_errors;
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }           
-
-            /* AES CBC 256 */
-            KOutMsg ("AES CBC 256\n");
-            rc = KCipherSetEncryptKey (cipher, AES_CBC_256_key, sizeof AES_CBC_256_key);
-            if (rc == 0)
-            {
-                rc = KCipherSetDecryptKey (cipher, AES_CBC_256_key, sizeof AES_CBC_256_key);
-                if (rc == 0)
-                {
-                    rc = KCipherSetEncryptIVec (cipher, AES_CBC_256_ivec);
-                    if (rc == 0)
-                    {
-                        rc = KCipherSetDecryptIVec (cipher, AES_CBC_256_ivec);
-                        if (rc == 0)
-                        {
-                            unsigned int index;
-
-                            for (index = 0; index < (sizeof AES_CBC_256_test / sizeof AES_CBC_256_test[0]); ++index)
-                            {
-                                uint8_t etemp [16];
-                                uint8_t dtemp [16];
-
-                                rc = KCipherEncryptCBC (cipher, AES_CBC_256_test[index], etemp, sizeof AES_CBC_256_test[0] / sizeof etemp);
-                                if (rc == 0)
-                                {
-                                    rc = KCipherDecryptCBC (cipher, AES_CBC_256_cipher[index], dtemp, sizeof AES_CBC_256_cipher[0] / sizeof dtemp);
-                                    if (rc == 0)
-                                    {
-                                        if (memcmp (AES_CBC_256_test[index], dtemp, sizeof dtemp) != 0)
-                                        {
-                                            KOutMsg ("Failed AES CBC 256 encrypt #%u\n", index);
-                                            ++num_errors;
-                                        }
-                                        if (memcmp (AES_CBC_256_cipher[index], etemp, sizeof etemp) != 0)
-                                        {
-                                            KOutMsg ("Failed AES CBC 256 decrypt test #%u\n", index);
-                                            ++num_errors;
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }           
-
-            KCipherRelease (cipher);
-        }
-        KCipherManagerRelease (manager);
-    }
-    return rc;
-}
-
-
-rc_t CC UsageSummary  (const char * progname)
-{
-    return KOutMsg ("\n"
-                    "Usage:\n"
-                    "  %s [OPTIONS]\n"
-                    "\n"
-                    "Summary:\n"
-                    "  Test the KXTocDir type.\n",
-                    progname);
-}
-const char UsageDefaultName[] = "test-modes";
-rc_t CC Usage (const Args * args)
-{
-    return 0;
-}
-/* { */
-/*     const char * progname = UsageDefaultName; */
-/*     const char * fullpath = UsageDefaultName; */
-/*     rc_t rc = 0; */
-
-/*     rc = ArgsProgram (args, &fullpath, &progname); */
-/*     if (rc == 0) */
-/*     { */
-/*         assert (args); */
-/*         summary (UsageDefaultName); */
-/*         HelpOptionsStandard (); */
-/*     } */
-/*     return rc; */
-/* } */
-
-/* MINIUSAGE(def_name) */
-
-
-ver_t CC KAppVersion (void)
-{
-    return 0;
-}
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args * args;
-    rc_t rc;
-
-    rc = ArgsMakeAndHandle (&args, argc, argv, 0);
-    if (rc == 0)
-    {
-        rc = run();
-        ArgsRelease (args);
-    }
-
-    if (rc == 0 && num_errors != 0)
-    {
-        rc = RC(rcKrypto, rcBuffer, rcValidating, rcEncryption, rcIncorrect);
-    }
-    
-    if (rc)
-        LOGERR (klogErr, rc, "Exiting status");
-    else
-        STSMSG (0, ("Exiting okay\n"));
-
-    return rc;
-}
-
-
diff --git a/test/krypto/test-reenc.cpp b/test/krypto/test-reenc.cpp
deleted file mode 100644
index 8fac678..0000000
--- a/test/krypto/test-reenc.cpp
+++ /dev/null
@@ -1,376 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-/**
- * Unit tests for KReencTestSuite
- */
-
-#include <ktst/unit_test.hpp>
-#include <krypto/key.h>
-#include <krypto/encfile.h>
-#include <krypto/encfile-priv.h>
-#include <krypto/reencfile.h>
-#include <kfs/impl.h>
-#include <klib/rc.h>
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-#include "test-cmn.hpp"
-
-#include <string.h>
-#include <stdio.h>
-
-TEST_SUITE(KReencTestSuite);
-
-TEST_CASE(KReEncryptEncFile)
-{
-    const char pw1 [] = "first pw";
-    const char pw2 [] = "second pw";
-    KKey key_enc, key_reenc;
-    REQUIRE_RC (KKeyInitUpdate (&key_enc, kkeyAES128, pw1, strlen (pw1)));
-    REQUIRE_RC (KKeyInitUpdate (&key_reenc, kkeyAES256, pw2, strlen (pw2)));
-    
-    const char enc_file_path_fmt [] = TMP_FOLDER "/file_enc%llu";
-
-    const char reenc_file_path_fmt [] = TMP_FOLDER "/file_reenc%llu";
-
-    KFile * enc_file, * reenc_file, * reenc_pt_file, * enc_pt_file;
-    
-    uint64_t enc_pt_size, reenc_size;
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    
-    uint64_t file_sizes_n_32k[] = { 0, 1, 2, 10, 46, 51 };
-    int8_t file_size_variants[] = { -2, -1, 0, 1, 2 };
-    
-    const uint8_t* file_fillers[] = { (const uint8_t *)"\3\5\1\7" };
-    size_t file_fillers_sizes[] = { 4 };
-    
-    assert( sizeof file_fillers / sizeof file_fillers[0] == sizeof file_fillers_sizes / sizeof file_fillers_sizes[0] );
-    
-    for (size_t filler_index = 0; filler_index < sizeof file_fillers / sizeof file_fillers[0]; ++filler_index )
-    {
-        printf("filler pattern: ");
-        for (size_t i = 0; i < file_fillers_sizes[filler_index]; ++i)
-        {
-            printf("0x%X ", file_fillers[filler_index][i]);
-        }
-        printf("\n");
-        for (size_t i = 0; i < sizeof file_sizes_n_32k / sizeof file_sizes_n_32k[0]; ++i)
-        {
-            for (size_t j = 0; j < sizeof file_size_variants / sizeof file_size_variants[0]; ++j)
-            {
-                if (file_sizes_n_32k[i] == 0 && file_size_variants[j] <= 0)
-                {
-                    continue;
-                }
-                
-                uint64_t file_size = file_sizes_n_32k[i] * BLOCK_32K_SIZE + file_size_variants[j];
-                
-                char file_path[1024];
-                char file_path_reenc[1024];
-                
-                sprintf(file_path, enc_file_path_fmt, file_size);
-                sprintf(file_path_reenc, reenc_file_path_fmt, file_size);
-                
-                printf("reencrypting encrypted file %s, size: %llu, i: %zu, j: %zu\n", file_path, file_size, i, j);
-    
-                // create file
-                REQUIRE_RC ( TCreateEncFile( current_dir, file_path, TFileOpenMode_Write, &key_enc, &enc_file ) );
-                REQUIRE_RC ( TFillFile( enc_file, file_fillers[filler_index], file_fillers_sizes[filler_index], file_size ) );
-                REQUIRE_RC ( KFileRelease ( enc_file ) );
-                
-                REQUIRE_RC ( TOpenPtFile( current_dir, file_path, TFileOpenMode_Read, &enc_pt_file ) );
-                REQUIRE_RC ( KReencFileMakeRead( (const KFile **)&reenc_file, (const KFile *)enc_pt_file, &key_enc, &key_reenc ) );
-                
-                REQUIRE_RC ( KFileSize ( enc_pt_file, &enc_pt_size ) );
-                REQUIRE_RC ( KFileSize ( reenc_file, &reenc_size ) );
-                
-                REQUIRE ( reenc_size == enc_pt_size ) ;
-                
-                REQUIRE_RC ( TCreatePtFile( current_dir, file_path_reenc, TFileOpenMode_Write, &reenc_pt_file ) );
-                REQUIRE_RC ( TCopyFile( reenc_pt_file, reenc_file ) );
-                
-                REQUIRE_RC ( KFileRelease ( reenc_pt_file ) );
-                REQUIRE_RC ( KFileRelease ( reenc_file ) );
-                REQUIRE_RC ( KFileRelease ( enc_pt_file ) );
-                
-                REQUIRE_RC ( TOpenPtFile( current_dir, file_path_reenc, TFileOpenMode_Read, &reenc_pt_file ) );
-                REQUIRE_RC ( KEncFileValidate( reenc_pt_file ) );
-                REQUIRE_RC ( KFileRelease ( reenc_pt_file ) );
-                
-                // check file content
-                REQUIRE_RC ( TOpenEncFile( current_dir, file_path_reenc, TFileOpenMode_Read, &key_reenc, &reenc_file ) );
-                
-                REQUIRE_RC ( TCheckFileContent( reenc_file, file_fillers[filler_index], file_fillers_sizes[filler_index] ) );
-                
-                REQUIRE_RC ( KFileRelease ( reenc_file ) );
-                
-            }
-        }
-    }
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-TEST_CASE(KReEncryptPtFile)
-{
-    const char pw2 [] = "second pw";
-    KKey key_reenc;
-    REQUIRE_RC (KKeyInitUpdate (&key_reenc, kkeyAES256, pw2, strlen (pw2)));
-    
-    const char file_path_fmt [] = TMP_FOLDER "/file%llu";
-
-    const char reenc_file_path_fmt [] = TMP_FOLDER "/file_reenc%llu";
-
-    KFile * pt_file, *reenc_file, * reenc_pt_file;
-    
-    uint64_t pt_size, reenc_size;
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    
-    uint64_t file_sizes_n_32k[] = { 0, 1, 2, 10, 46, 51 };
-    int8_t file_size_variants[] = { -2, -1, 0, 1, 2 };
-    
-    const uint8_t* file_fillers[] = { (const uint8_t *)"\1\5\3\7" };
-    size_t file_fillers_sizes[] = { 4 };
-    
-    assert( sizeof file_fillers / sizeof file_fillers[0] == sizeof file_fillers_sizes / sizeof file_fillers_sizes[0] );
-    
-    for (size_t filler_index = 0; filler_index < sizeof file_fillers / sizeof file_fillers[0]; ++filler_index )
-    {
-        printf("filler pattern: ");
-        for (size_t i = 0; i < file_fillers_sizes[filler_index]; ++i)
-        {
-            printf("0x%X ", file_fillers[filler_index][i]);
-        }
-        printf("\n");
-        for (size_t i = 0; i < sizeof file_sizes_n_32k / sizeof file_sizes_n_32k[0]; ++i)
-        {
-            for (size_t j = 0; j < sizeof file_size_variants / sizeof file_size_variants[0]; ++j)
-            {
-                if (file_sizes_n_32k[i] == 0 && file_size_variants[j] <= 0)
-                {
-                    continue;
-                }
-                
-                uint64_t file_size = file_sizes_n_32k[i] * BLOCK_32K_SIZE + file_size_variants[j];
-                
-                char file_path[1024];
-                char file_path_reenc[1024];
-                
-                sprintf(file_path, file_path_fmt, file_size);
-                sprintf(file_path_reenc, reenc_file_path_fmt, file_size);
-                
-                printf("reencrypting NOT encrypted file %s, size: %llu, i: %zu, j: %zu\n", file_path, file_size, i, j);
-                
-                // create file
-                REQUIRE_RC ( TCreatePtFile( current_dir, file_path, TFileOpenMode_Write, &pt_file ) );
-                REQUIRE_RC ( TFillFile( pt_file, file_fillers[filler_index], file_fillers_sizes[filler_index], file_size ) );
-                REQUIRE_RC ( KFileRelease ( pt_file ) );
-                
-                REQUIRE_RC ( TOpenPtFile( current_dir, file_path, TFileOpenMode_Read, &pt_file ) );
-                REQUIRE_RC ( KEncryptFileMakeRead( (const KFile **)&reenc_file, (const KFile *)pt_file, &key_reenc ) );
-                
-                REQUIRE_RC ( KFileSize ( pt_file, &pt_size ) );
-                REQUIRE_RC ( KFileSize ( reenc_file, &reenc_size ) );
-                
-                REQUIRE ( file_size == pt_size );
-                REQUIRE ( reenc_size == TEncSizeFromPtSize(pt_size) );
-                
-                REQUIRE_RC ( TCreatePtFile( current_dir, file_path_reenc, TFileOpenMode_Write, &reenc_pt_file ) );
-                REQUIRE_RC ( TCopyFile( reenc_pt_file, reenc_file ) );
-                
-                REQUIRE_RC ( KFileRelease ( reenc_pt_file ) );
-                REQUIRE_RC ( KFileRelease ( reenc_file ) );
-                REQUIRE_RC ( KFileRelease ( pt_file ) );
-                
-                // check file content
-                REQUIRE_RC ( TOpenEncFile( current_dir, file_path_reenc, TFileOpenMode_Read, &key_reenc, &reenc_file ) );
-                
-                REQUIRE_RC ( TCheckFileContent( reenc_file, file_fillers[filler_index], file_fillers_sizes[filler_index] ) );
-                
-                REQUIRE_RC ( KFileRelease ( reenc_file ) );
-                
-            }
-        }
-    }
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-TEST_CASE(KReencryptZeroContentSizeEncFile)
-{
-    const char pw1 [] = "first pw";
-    const char pw2 [] = "second pw";
-    KKey key_enc, key_reenc;
-    REQUIRE_RC (KKeyInitUpdate (&key_enc, kkeyAES128, pw1, strlen (pw1)));
-    REQUIRE_RC (KKeyInitUpdate (&key_reenc, kkeyAES256, pw2, strlen (pw2)));
-    
-    const char enc_file_path [] = TMP_FOLDER "/zero_content_file_to_reenc";
-
-    const char reenc_file_path [] = TMP_FOLDER "/reenc_zero_content_file";
-
-    KFile * enc_file, * enc_pt_file, * reenc_file, * reenc_pt_file;
-    
-    uint64_t enc_pt_size, reenc_size;
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    
-    // create file
-    REQUIRE_RC ( TCreateEncFile( current_dir, enc_file_path, TFileOpenMode_Write, &key_enc, &enc_file ) );
-    REQUIRE_RC ( KFileRelease ( enc_file ) );
-    
-    REQUIRE_RC ( TOpenPtFile( current_dir, enc_file_path, TFileOpenMode_Read, &enc_pt_file ) );
-    REQUIRE_RC ( KReencFileMakeRead( (const KFile **)&reenc_file, (const KFile *)enc_pt_file, &key_enc, &key_reenc ) );
-    
-    REQUIRE_RC ( KFileSize ( enc_pt_file, &enc_pt_size ) );
-    REQUIRE_RC ( KFileSize ( reenc_file, &reenc_size ) );
-    
-    REQUIRE ( reenc_size == enc_pt_size ) ;
-    
-    REQUIRE_RC ( TCreatePtFile( current_dir, reenc_file_path, TFileOpenMode_Write, &reenc_pt_file ) );
-    REQUIRE_RC ( TCopyFile( reenc_pt_file, reenc_file ) );
-    
-    REQUIRE_RC ( KFileRelease ( reenc_pt_file ) );
-    REQUIRE_RC ( KFileRelease ( reenc_file ) );
-    REQUIRE_RC ( KFileRelease ( enc_pt_file ) );
-    
-    REQUIRE_RC ( TOpenPtFile( current_dir, reenc_file_path, TFileOpenMode_Read, &reenc_pt_file ) );
-    REQUIRE_RC ( KEncFileValidate( reenc_pt_file ) );
-    REQUIRE_RC ( KFileRelease ( reenc_pt_file ) );
-    
-    // check file content
-    REQUIRE_RC ( TOpenEncFile( current_dir, reenc_file_path, TFileOpenMode_Read, &key_reenc, &reenc_file ) );
-    REQUIRE_RC ( KFileSize ( reenc_file, &reenc_size ) );
-    REQUIRE ( reenc_size == 0 );
-    REQUIRE_RC ( KFileRelease ( reenc_file ) );
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-TEST_CASE(KReencryptZeroContentSizePtFile)
-{
-    const char pw2 [] = "second pw";
-    KKey key_reenc;
-    REQUIRE_RC (KKeyInitUpdate (&key_reenc, kkeyAES256, pw2, strlen (pw2)));
-    
-    const char pt_file_path [] = TMP_FOLDER "/zero_content_file_to_reenc_pt";
-
-    const char reenc_file_path [] = TMP_FOLDER "/reenc_zero_content_file_pt";
-
-    KFile * pt_file, * reenc_file, * reenc_pt_file;
-    
-    uint64_t pt_size, reenc_size;
-    
-    struct KDirectory * current_dir;
-    REQUIRE_RC ( KDirectoryNativeDir ( &current_dir ) );
-    
-    // just in case if it still there
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    
-    // create file
-    REQUIRE_RC ( TCreatePtFile( current_dir, pt_file_path, TFileOpenMode_Write, &pt_file ) );
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    REQUIRE_RC ( TOpenPtFile( current_dir, pt_file_path, TFileOpenMode_Read, &pt_file ) );
-    REQUIRE_RC ( KEncryptFileMakeRead( (const KFile **)&reenc_file, (const KFile *)pt_file, &key_reenc ) );
-    
-    REQUIRE_RC ( KFileSize ( pt_file, &pt_size ) );
-    REQUIRE_RC ( KFileSize ( reenc_file, &reenc_size ) );
-    
-    REQUIRE ( reenc_size == pt_size + sizeof(KEncFileHeader) + sizeof(KEncFileFooter) ) ;
-    
-    REQUIRE_RC ( TCreatePtFile( current_dir, reenc_file_path, TFileOpenMode_Write, &reenc_pt_file ) );
-    REQUIRE_RC ( TCopyFile( reenc_pt_file, reenc_file ) );
-    
-    REQUIRE_RC ( KFileRelease ( reenc_pt_file ) );
-    REQUIRE_RC ( KFileRelease ( reenc_file ) );
-    REQUIRE_RC ( KFileRelease ( pt_file ) );
-    
-    REQUIRE_RC ( TOpenPtFile( current_dir, reenc_file_path, TFileOpenMode_Read, &reenc_pt_file ) );
-    REQUIRE_RC ( KEncFileValidate( reenc_pt_file ) );
-    REQUIRE_RC ( KFileRelease ( reenc_pt_file ) );
-    
-    // check file content
-    REQUIRE_RC ( TOpenEncFile( current_dir, reenc_file_path, TFileOpenMode_Read, &key_reenc, &reenc_file ) );
-    REQUIRE_RC ( KFileSize ( reenc_file, &reenc_size ) );
-    REQUIRE ( reenc_size == 0 );
-    REQUIRE_RC ( KFileRelease ( reenc_file ) );
-    
-    KDirectoryRemove ( current_dir, true, TMP_FOLDER );
-    
-    REQUIRE_RC ( KDirectoryRelease ( current_dir ) );
-}
-
-//////////////////////////////////////////// Main
-
-extern "C"
-{
-    
-    ver_t CC KAppVersion ( void )
-    {
-        return 0x1000000;
-    }
-    
-    rc_t CC UsageSummary (const char * prog_name)
-    {
-        return 0;
-    }
-    
-    rc_t CC Usage ( const Args * args)
-    {
-        return 0;
-    }
-    
-    const char UsageDefaultName[] = "test-reenc";
-    
-    rc_t CC KMain ( int argc, char *argv [] )
-    {
-        KConfigDisableUserSettings();
-        rc_t rc=KReencTestSuite(argc, argv);
-        return rc;
-    }
-    
-}
\ No newline at end of file
diff --git a/test/ktst/Makefile b/test/ktst/Makefile
deleted file mode 100644
index 793fb88..0000000
--- a/test/ktst/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-
-MODULE = test/ktst
-
-TEST_TOOLS = \
-	test-ktst
-
-include $(TOP)/build/Makefile.env
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: $(TEST_TOOLS)
-
-clean: stdclean
-
-#-------------------------------------------------------------------------------
-# test-ktst
-#
-TEST_KFG_SRC = \
-	ktsttest 
-
-TEST_KFG_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_KFG_SRC))
-
-TEST_KFG_LIB = \
-	-skapp \
-    -sncbi-vdb \
-    -sktst
-
-
-$(TEST_BINDIR)/test-ktst: $(TEST_KFG_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_KFG_LIB)
-
diff --git a/test/ktst/ktsttest.cpp b/test/ktst/ktsttest.cpp
deleted file mode 100644
index fdb9240..0000000
--- a/test/ktst/ktsttest.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for Ktst interface
-*/
-
-#include <ktst/unit_test.hpp>
-
-#if ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED
-#include <kapp/args.h>
-#endif
-
-#include <csignal>
-
-using namespace std;
-using namespace ncbi::NK;
-
-static rc_t argsHandler(int argc, char* argv[]);
-TEST_SUITE_WITH_ARGS_HANDLER(KtstTestSuite, argsHandler);
-
-static
-rc_t 
-RcSuccess()
-{
-    return 0;
-}
-static
-rc_t 
-RcFail()
-{
-    return 1;
-}
-
-TEST_CASE(Parameter)
-{
-#if ALLOW_TESTING_CODE_TO_RELY_UPON_CODE_BEING_TESTED
-    uint32_t count=1;
-    REQUIRE_RC(ArgsParamCount(TestEnv::GetArgs(), &count));
-    REQUIRE_EQ(count, 0u);
-#endif
-}
-
-TEST_CASE(Requires)
-{
-    REQUIRE(1);
-    CHECK(1);
-
-    CHECK_CLOSE(1.0, 2.0, 1.99);
-    REQUIRE_CLOSE(1.0, -1.0, 2.01);
-
-    CHECK_EQUAL(1, 1);    
-    CHECK_EQ(2.0, 2.0);
-    REQUIRE_EQUAL(-1, -1);
-    REQUIRE_EQ(-11.0f, -11.0f);
-    REQUIRE_NE((const char*)"qq", (const char*)1);
-
-    CHECK_NE(2.0, 2.01);
-    REQUIRE_NE(-1.f, -1.1f);
-
-    CHECK_GE(1, 1);
-    REQUIRE_GE(1, -1);
-
-    CHECK_GT(1, 0);
-    REQUIRE_GT(1, -1);
-
-    CHECK_LE(1, 10);
-    REQUIRE_LE(-1, -1);
-
-    CHECK_LT(1.0f, 2.0f);
-    REQUIRE_LT(-111.0f, 2.0f);
-
-    CHECK_RC(RcSuccess());
-    REQUIRE_RC(RcSuccess());
-
-    CHECK_RC_FAIL(RcFail());
-    REQUIRE_RC_FAIL(RcFail());
-
-    CHECK_NULL((int*)0);
-    REQUIRE_NULL((char*)0);
-
-    CHECK_NOT_NULL((float*)1);
-    REQUIRE_NOT_NULL((double*)10);
-}
-
-TEST_CASE(ParentProcess)
-{
-	REQUIRE(!TestEnv::in_child_process);
-}
-PROCESS_TEST_CASE(ChildProcessOk, 0, 0)
-{
-	REQUIRE(TestEnv::in_child_process);
-    TEST_MESSAGE("ChildProcessOk: no failures in a child process");
-    REQUIRE_EQ(0, 0); // make sure REQUIRE* macros are working
-    // just exit without errors
-}
-
-PROCESS_TEST_CASE(ChildProcessFail, TestEnv::TEST_CASE_FAILED, 0)
-{
-    FAIL("ChildProcessFail: failure in a child process");
-    // exit(255) means test case threw a C++ exception
-}
-
-PROCESS_TEST_CASE(ChildProcessAbort, SIGFPE, 0)
-{
-    TEST_MESSAGE("ChildProcessAbort: aborting child process");
-    raise(SIGFPE);
-}
-
-PROCESS_TEST_CASE(ChildProcessTimeout, TestEnv::TEST_CASE_TIMED_OUT, 1)
-{   
-    TEST_MESSAGE("ChildProcessTimeout: sleeping in the child process");
-    TestEnv::Sleep(2);
-    TEST_MESSAGE("ChildProcessTimeout: did not time out!!");
-    raise(SIGSEGV);
-}
-
-static bool argHandlerCalled = false;
-static rc_t argsHandler(int argc, char* argv[]) 
-{
-    argHandlerCalled = true;
-    return 0;
-}
-
-TEST_CASE(ArgHandlerCalled)
-{
-    REQUIRE(argHandlerCalled);
-}
-
-//TODO: test FIXTURE_TEST_CASE, PROCESS_FIXTURE_TEST_CASE
-//TODO: test GET_GLOBAL_FIXTURE
-//TODO: test REQUIRE_THROW, THROW_ON_RC
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-
-const char UsageDefaultName[] = "test-kfg";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t rc=KtstTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/loader/Makefile b/test/loader/Makefile
deleted file mode 100644
index ddf3b7e..0000000
--- a/test/loader/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-MODULE = test/loader
-
-TEST_TOOLS = \
-	test-loader \
-
-include $(TOP)/build/Makefile.env
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-clean: stdclean
-#-------------------------------------------------------------------------------
-# test-loader
-#
-TEST_LOADER_SRC = \
-	loadertest \
-	sequence-writer
-
-TEST_LOADER_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_LOADER_SRC))
-
-TEST_LOADER_LIB = \
-	-skapp \
-    -sktst \
-    -sncbi-wvdb \
-    -sload \
-
-$(TEST_BINDIR)/test-loader: $(TEST_LOADER_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_LOADER_LIB)
-
diff --git a/test/loader/loadertest.cpp b/test/loader/loadertest.cpp
deleted file mode 100644
index 2fe1f42..0000000
--- a/test/loader/loadertest.cpp
+++ /dev/null
@@ -1,407 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for the Loader module
-*/
-#include <ktst/unit_test.hpp>
-
-#include <klib/printf.h>
-
-#include <kdb/meta.h>
-
-#include <kapp/loader-meta.h>
-#include <kapp/main.h>
-
-#include <vdb/manager.h> // VDBManager
-#include <vdb/database.h> 
-#include <vdb/schema.h> /* VSchemaRelease */
-
-#include <stdexcept> 
-#include <fstream>
-
-extern "C" {
-#include <loader/sequence-writer.h>
-}
-
-using namespace std;
-
-TEST_SUITE(LoaderTestSuite);
-
-class LoaderFixture
-{
-public:
-    LoaderFixture()
-    :   m_db ( 0 ),
-        m_cursor ( 0 ),
-        m_keepDatabase ( false )
-    {
-    }
-    ~LoaderFixture()
-    {
-        RemoveDatabase();
-    }
-    
-    void RemoveDatabase()
-    {
-        CloseDatabase();
-        if ( ! m_databaseName . empty () && ! m_keepDatabase )
-        {
-            KDirectory* wd;
-            KDirectoryNativeDir ( & wd );
-            KDirectoryRemove ( wd, true, m_databaseName . c_str() );
-            KDirectoryRelease ( wd );
-        }
-    }
-    
-    void OpenDatabase()
-    {
-        CloseDatabase();
-        
-        VDBManager * vdb;
-        THROW_ON_RC ( VDBManagerMakeUpdate ( & vdb, NULL ) );
-        THROW_ON_RC ( VDBManagerOpenDBUpdate ( vdb, &m_db, NULL, m_databaseName . c_str() ) );
-        THROW_ON_RC( VDBManagerRelease ( vdb ) );
-    }
-    
-    void InitDatabase ( const char * schemaFile, const char * schemaSpec )
-    {
-        RemoveDatabase();
-        
-        VDBManager* mgr;
-        THROW_ON_RC ( VDBManagerMakeUpdate ( & mgr, NULL ) );
-        VSchema* schema;
-        THROW_ON_RC ( VDBManagerMakeSchema ( mgr, & schema ) );
-        THROW_ON_RC ( VSchemaParseFile(schema, "%s", schemaFile ) );
-        
-        THROW_ON_RC ( VDBManagerCreateDB ( mgr, 
-                                          & m_db, 
-                                          schema, 
-                                          schemaSpec, 
-                                          kcmInit + kcmMD5, 
-                                          "%s", 
-                                          m_databaseName . c_str() ) );
-                                          
-        THROW_ON_RC ( VSchemaRelease ( schema ) );
-        THROW_ON_RC ( VDBManagerRelease ( mgr ) );
-    }
-    
-    void CloseDatabase()
-    {
-        if ( m_db != 0 )
-        {
-            VDatabaseRelease ( m_db );
-            m_db = 0;
-        }
-        if ( m_cursor != 0 )
-        {
-            VCursorRelease ( m_cursor );
-            m_cursor = 0;
-        }
-    }
-    
-    void OpenCursor( const char* p_table, const char* p_column )
-    {
-        OpenDatabase();
-        const VTable * tbl;
-        THROW_ON_RC ( VDatabaseOpenTableRead ( m_db, &tbl, p_table ) );
-        THROW_ON_RC ( VTableCreateCursorRead ( tbl, & m_cursor ) );
-        
-        uint32_t idx;
-        THROW_ON_RC ( VCursorAddColumn ( m_cursor, &idx, p_column ) );
-        THROW_ON_RC ( VCursorOpen ( m_cursor ) );
-        THROW_ON_RC ( VTableRelease ( tbl ) );
-    }
-    
-    template < typename T > T GetValue ( const char* p_table, const char* p_column, uint64_t p_row )
-    {
-        OpenCursor( p_table, p_column ); 
-        THROW_ON_RC ( VCursorSetRowId ( m_cursor, p_row ) );
-        THROW_ON_RC ( VCursorOpenRow ( m_cursor ) );
-            
-        T ret;
-        uint32_t num_read;
-        THROW_ON_RC ( VCursorRead ( m_cursor, 1, 8 * sizeof ret, &ret, 1, &num_read ) );
-        THROW_ON_RC ( VCursorCloseRow ( m_cursor ) );
-        return ret;
-    }
-    
-    template < typename T, int Count > bool GetValue ( const char* p_table, const char* p_column, uint64_t p_row, T ret[Count] )
-    {
-        OpenCursor( p_table, p_column ); 
-        THROW_ON_RC ( VCursorSetRowId ( m_cursor, p_row ) );
-        THROW_ON_RC ( VCursorOpenRow ( m_cursor ) );
-            
-        uint32_t num_read;
-        THROW_ON_RC ( VCursorRead ( m_cursor, 1, 8 * sizeof ( T ), ret, Count, &num_read ) );
-        if ( num_read != Count )
-            throw logic_error("LoaderFixture::GetValueU32(): VCursorRead failed");
-        
-        THROW_ON_RC ( VCursorCloseRow ( m_cursor ) );
-        return ret;
-    }
-    
-    std::string GetMetadata ( const std::string& p_node, const std::string& p_attr )
-    {
-        const KMetadata *meta;
-        THROW_ON_RC ( VDatabaseOpenMetadataRead ( m_db, &meta ) );
-    
-        const KMDataNode *node;
-        THROW_ON_RC ( KMetadataOpenNodeRead ( meta, &node, p_node.c_str() ) );
-            
-        size_t num_read;
-        char attr [ 256 ];
-        THROW_ON_RC ( KMDataNodeReadAttr ( node, p_attr.c_str(), attr, sizeof attr, & num_read ) );
-        THROW_ON_RC ( KMDataNodeRelease ( node ) );
-        THROW_ON_RC ( KMetadataRelease ( meta ) );
-        return string ( attr, num_read );
-    }
-    
-    void CreateFile ( const string& p_name, const string& p_content )
-    {
-        ofstream out( p_name . c_str() );
-        out << p_content;
-    }
-    
-    
-    string          m_databaseName;
-    VDatabase *     m_db;
-    const VCursor * m_cursor;
-    bool            m_keepDatabase;
-};    
-
-template<> std::string LoaderFixture::GetValue ( const char* p_table, const char* p_column, uint64_t p_row )
-{
-    OpenCursor( p_table, p_column ); 
-    THROW_ON_RC ( VCursorSetRowId ( m_cursor, p_row ) );
-    THROW_ON_RC ( VCursorOpenRow ( m_cursor ) );
-        
-    char buf[1024];
-    uint32_t num_read;
-    THROW_ON_RC ( VCursorRead ( m_cursor, 1, 8, &buf, sizeof buf, &num_read ) );
-    THROW_ON_RC ( VCursorCloseRow ( m_cursor ) );
-    return string ( buf, num_read );
-}
-
-#if SHOW_UNIMPLEMENTED
-FIXTURE_TEST_CASE ( SequenceWriter_Write, LoaderFixture ) 
-{
-    m_databaseName = GetName();
-    InitDatabase ( "./sequencewriter.vschema", "NCBI:align:db:fastq";);
-    
-    const string Sequence = "AC";
-    const string SpotName = "name1";
-    const string SpotGroup = "spotgroup1";
-    const uint8_t qual[2] = {10,20};
-//m_keepDatabase = true;
-
-    {
-        SequenceWriter wr;
-        
-        REQUIRE_NOT_NULL ( SequenceWriterInit ( & wr, m_db ) );
-
-        uint32_t readStart = 0;
-        uint32_t readLen = Sequence . size();
-        uint8_t orientation = 0;
-        uint8_t is_bad = 0;
-        uint8_t alignmentCount = 0;
-        bool aligned = false;
-        uint64_t ti = 0;
-        
-        SequenceRecord rec;
-        rec . seq = (char*) Sequence . c_str ();
-        rec . qual = (uint8_t*) qual;
-        rec . readStart = & readStart;
-        rec . readLen = & readLen;
-        rec . orientation = & orientation;
-        rec . is_bad = & is_bad;
-        rec . alignmentCount = & alignmentCount;
-        rec . spotGroup = (char*) SpotGroup . c_str();
-        rec . aligned = & aligned;
-        rec . cskey = (char*)"";
-        rec . ti = & ti;
-        rec . spotName = (char*) SpotName . c_str();
-        rec . keyId = 1;
-        rec . spotGroupLen = SpotGroup . size();;
-        rec . spotNameLen = SpotName . size();
-        rec . numreads = 1;
-
-        REQUIRE_RC ( KDataBufferMake ( & rec.storage, 8, 0 ) );
-        
-        REQUIRE_RC ( SequenceWriteRecord ( & wr, 
-                                           & rec,
-                                           false, 
-                                           false, 
-                                           SRA_PLATFORM_454,
-                                           false,
-                                           false,
-                                           false,
-                                           "0",
-                                           false,
-                                           true
-                                          ) );
-        REQUIRE_RC ( SequenceDoneWriting ( & wr ) );
-        SequenceWhack ( & wr, true );
-        REQUIRE_RC ( SequenceRecordWhack ( & rec ) );
-    
-        CloseDatabase();
-    }
-    
-    // read, validate
-    REQUIRE_EQ ( Sequence, GetValue<string> ( "SEQUENCE", "CMP_READ", 1 ) );    
-    REQUIRE_EQ ( SpotName, GetValue<string> ( "SEQUENCE", "NAME", 1 ) );    
-    REQUIRE_EQ ( SpotGroup, GetValue<string> ( "SEQUENCE", "SPOT_GROUP", 1 ) );    
-    {
-        uint8_t q[2] = { 0, 0 };
-        bool req = GetValue < uint8_t, 2 > ( "SEQUENCE", "QUALITY", 1, q );
-        REQUIRE ( req );
-        REQUIRE_EQ ( (int)qual[0], (int)q[0] );
-        REQUIRE_EQ ( (int)qual[1], (int)q[1] );
-    }
-}
-#endif
-
-FIXTURE_TEST_CASE ( LoaderMeta_Write, LoaderFixture ) 
-{
-    m_databaseName = GetName();
-    
-    string schemaFile = string ( GetName() ) + ".vschema";
-    CreateFile ( schemaFile, string ( "table table1 #1.0.0 { column ascii column1; }; database database1 #1 { table table1 #1 TABLE1; } ;" ).c_str() ); 
-    InitDatabase ( schemaFile.c_str(), "database1");
-    
-    const string FormatterName = "fmt_name";
-    const string LoaderName = "test-loader";
-
-    {
-        struct KMetadata* meta;
-        REQUIRE_RC ( VDatabaseOpenMetadataUpdate ( m_db, &meta ) );
-        KMDataNode *node;
-        REQUIRE_RC ( KMetadataOpenNodeUpdate ( meta, &node, "/" ) );
-        
-        // this is the one we are testing
-        REQUIRE_RC ( KLoaderMeta_Write ( node, LoaderName.c_str(), __DATE__, FormatterName.c_str(), KAppVersion() ) );
-        
-        REQUIRE_RC ( KMDataNodeRelease ( node ) );
-        REQUIRE_RC ( KMetadataRelease ( meta ) );
-    
-        CloseDatabase();
-    }
-    
-    // read, validate
-    OpenDatabase (); 
-    REQUIRE_EQ ( FormatterName,  GetMetadata ( "SOFTWARE/formatter", "name" ) );
-
-    // extract the program name from path the same way it's done in ncbi-vdb/libs/kapp/loader-meta.c:KLoaderMeta_Write
-    REQUIRE_EQ ( LoaderName, GetMetadata ( "SOFTWARE/loader", "name" ) );
-    REQUIRE_EQ ( string ( __DATE__), GetMetadata ( "SOFTWARE/loader", "date" ) );
-    {   // the "old" KLoaderMeta_Write sets versions of loader and formatter to the same value
-        char buf[265];
-        string_printf ( buf, sizeof buf, NULL, "%V", KAppVersion() ); // same format as in ncbi-vdb/libs/kapp/loader-meta.c:MakeVersion()
-        REQUIRE_EQ ( string ( buf ), GetMetadata ( "SOFTWARE/formatter", "vers" ) );
-        REQUIRE_EQ ( string ( buf ), GetMetadata ( "SOFTWARE/loader", "vers" ) );
-    }
-    
-    std::remove ( schemaFile . c_str() );
-}
-
-FIXTURE_TEST_CASE ( LoaderMeta_WriteWithVersion, LoaderFixture ) 
-{
-    m_databaseName = GetName();
-    string schemaFile = string ( GetName() ) + ".vschema";
-    CreateFile ( schemaFile, string ( "table table1 #1.0.0 { column ascii column1; }; database database1 #1 { table table1 #1 TABLE1; } ;" ).c_str() ); 
-    InitDatabase ( schemaFile.c_str(), "database1");
-    
-    const string FormatterName = "fmt_name";
-    const string LoaderName = "test-loader";
-    const ver_t  LoaderVersion = ( 1 << 24 ) | ( 2 << 16 ) | 0x0003; 
-
-    {
-        struct KMetadata* meta;
-        REQUIRE_RC ( VDatabaseOpenMetadataUpdate ( m_db, &meta ) );
-        KMDataNode *node;
-        REQUIRE_RC ( KMetadataOpenNodeUpdate ( meta, &node, "/" ) );
-        
-        // this is the one we are testing
-        REQUIRE_RC ( KLoaderMeta_WriteWithVersion ( node, LoaderName.c_str(), __DATE__, LoaderVersion, FormatterName.c_str(), KAppVersion() ) );
-        
-        REQUIRE_RC ( KMDataNodeRelease ( node ) );
-        REQUIRE_RC ( KMetadataRelease ( meta ) );
-    
-        CloseDatabase();
-    }
-    
-    // read, validate
-    OpenDatabase (); 
-    REQUIRE_EQ ( FormatterName,  GetMetadata ( "SOFTWARE/formatter", "name" ) );
-
-    // extract the program name from path the same way it's done in ncbi-vdb/libs/kapp/loader-meta.c:KLoaderMeta_Write
-    REQUIRE_EQ ( LoaderName, GetMetadata ( "SOFTWARE/loader", "name" ) );
-    REQUIRE_EQ ( string ( __DATE__), GetMetadata ( "SOFTWARE/loader", "date" ) );
-    {   // KLoaderMeta_WriteWithVersion sets versions of loader and formatter apart
-        char buf[265];
-        string_printf ( buf, sizeof buf, NULL, "%V", KAppVersion() ); 
-        REQUIRE_EQ ( string ( buf ), GetMetadata ( "SOFTWARE/formatter", "vers" ) );
-        string_printf ( buf, sizeof buf, NULL, "%V", LoaderVersion ); 
-        REQUIRE_EQ ( string ( buf ), GetMetadata ( "SOFTWARE/loader", "vers" ) );
-    }
-    
-    std::remove ( schemaFile . c_str() );
-}
-
-//////////////////////////////////////////// Main
-#include <kapp/args.h>
-#include <klib/out.h>
-#include <kfg/config.h>
-
-extern "C"
-{
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-
-const char UsageDefaultName[] = "test-loader";
-
-rc_t CC UsageSummary (const char * progname)
-{
-    return KOutMsg ( "Usage:\n" "\t%s [options]\n\n", progname );
-}
-
-rc_t CC Usage( const Args* args )
-{
-    return 0;
-}
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=LoaderTestSuite(argc, argv);
-    return rc;
-}
-
-}
-
diff --git a/test/loader/sequence-writer.c b/test/loader/sequence-writer.c
deleted file mode 100644
index 8ebb720..0000000
--- a/test/loader/sequence-writer.c
+++ /dev/null
@@ -1,366 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <klib/rc.h>
-#include <klib/log.h>
-
-#include <vdb/database.h>
-
-#include <kdb/manager.h>
-
-#include <insdc/sra.h>
-#include <insdc/insdc.h>
-
-#include <sysalloc.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <assert.h>
-#include <ctype.h>
-
-#include <align/writer-sequence.h>
-
-#include <loader/sequence-writer.h>
-#include <loader/common-reader.h>
-
-/* MARK: SequenceWriter Object */
-
-SequenceWriter *SequenceWriterInit(SequenceWriter *self, VDatabase *db) {
-    memset(self, 0, sizeof(*self));
-    self->db = db;
-    VDatabaseAddRef(db);
-    return self;
-}
-
-rc_t SequenceWriteRecord(SequenceWriter *self,
-                         SequenceRecord const *rec,
-                         bool color,
-                         bool isDup,
-                         INSDC_SRA_platform_id platform,
-                         bool keepMismatchQual,
-                         bool no_real_output,
-                         bool hasTI,
-                         char const *QualQuantizer
-                         )
-{
-    rc_t rc = 0;
-    uint8_t nreads = rec->numreads;
-    unsigned i;
-    unsigned seqLen;
-    int64_t dummyRowId;
-    
-    uint8_t readInfo[4096];
-    void *h_readInfo = NULL;
-    
-    INSDC_coord_zero *readStart = (void *)readInfo;
-    INSDC_coord_len *readLen;
-    uint8_t *alcnt;
-    INSDC_SRA_xread_type *readType;
-    INSDC_SRA_read_filter *readFilter;
-    bool *mask = NULL;
-    size_t const elemSize = sizeof(alcnt[0]) + sizeof(readType[0])
-                          + sizeof(readStart[0]) + sizeof(readLen[0])
-                          + sizeof(readFilter[0]);
-    
-    TableWriterSeqData data;
-
-    for (i = seqLen = 0; i != nreads; ++i) {
-        seqLen += rec->readLen[i];
-    }
-    
-    if (nreads * elemSize + keepMismatchQual * seqLen * sizeof(mask[0]) > sizeof(readInfo))
-    {
-        h_readInfo = malloc(nreads * elemSize + keepMismatchQual * seqLen * sizeof(mask[0]));
-        if (h_readInfo == NULL)
-            return RC(rcAlign, rcTable, rcWriting, rcMemory, rcExhausted);
-        readStart = h_readInfo;
-    }
-    readLen = (INSDC_coord_len *)&readStart[nreads];
-    alcnt = (uint8_t *)&readLen[nreads];
-    readType = (INSDC_SRA_xread_type *)&alcnt[nreads];
-    readFilter = (INSDC_SRA_read_filter *)&readType[nreads];
-    
-    if (keepMismatchQual) {
-        mask = (bool *)&readFilter[nreads];
-        
-        for (i = 0; i != seqLen; ++i) {
-            mask[i] = (rec->qual[i] & 0x80) != 0;
-        }
-    }
-    
-    for (i = 0; i != nreads; ++i) {
-        alcnt[i] = rec->aligned[i] ? 1 : 0;
-        readLen[i] = rec->readLen[i];
-        readStart[i] = rec->readStart[i];
-        readType[i] = readLen[i] ? SRA_READ_TYPE_BIOLOGICAL : SRA_READ_TYPE_TECHNICAL;
-        switch ( rec->orientation[i] )
-        {
-            case ReadOrientationForward:
-                readType[i] |= SRA_READ_TYPE_FORWARD;
-                break;
-            case ReadOrientationReverse:
-                readType[i] |= SRA_READ_TYPE_REVERSE;
-                break;
-            case ReadOrientationUnknown:
-            default:
-                break;
-        }
-        readFilter[i] = isDup ? SRA_READ_FILTER_CRITERIA
-                      : rec->is_bad[i] ? SRA_READ_FILTER_REJECT : SRA_READ_FILTER_PASS;
-    }
-
-    memset(&data, 0, sizeof(data));
-    
-    data.sequence.buffer = rec->seq;
-    data.sequence.elements = seqLen;
-    
-    data.quality.buffer = rec->qual;
-    data.quality.elements = seqLen;
-    
-    if (keepMismatchQual) {
-        data.no_quantize_mask.buffer = mask;
-        data.no_quantize_mask.elements = seqLen;
-    }
-    
-    data.alignment_count.buffer = alcnt;
-    data.alignment_count.elements = nreads;
-    
-    data.nreads = nreads;
-    
-    data.read_type.buffer = readType;
-    data.read_type.elements = nreads;
-    
-    data.read_start.buffer = readStart;
-    data.read_start.elements = nreads;
-    
-    data.read_len.buffer = readLen;
-    data.read_len.elements = nreads;
-    
-    data.tmp_key_id = rec->keyId;
-    
-    data.spot_group.buffer = rec->spotGroup;
-    data.spot_group.elements = rec->spotGroupLen;
-    
-    data.cskey.buffer = rec->cskey;
-    data.cskey.elements = nreads;
-    
-    data.read_filter.buffer = readFilter;
-    data.read_filter.elements = nreads;
-    
-    data.platform.buffer = &platform;
-    data.platform.elements = 1;
-    
-    data.ti.buffer = rec->ti;
-    data.ti.elements = nreads;
-    
-    data.spot_name.buffer = rec->spotName;
-    data.spot_name.elements = rec->spotNameLen;
-    
-    if (!no_real_output) {
-        if (self->tbl == NULL) {
-            int csoption = (color ? ewseq_co_ColorSpace : 0);
-
-            if(hasTI) csoption |= ewseq_co_TI;
-            
-            rc = TableWriterSeq_Make(&self->tbl, self->db,
-                                     csoption | ewseq_co_NoLabelData | ewseq_co_SpotGroup /*| ewseq_co_SpotName*/, QualQuantizer);
-        }
-        if (rc == 0) {
-            rc = TableWriterSeq_Write(self->tbl, &data, &dummyRowId);
-        }
-    }
-    
-    if (h_readInfo)
-        free(h_readInfo);
-    
-    return rc;
-}
-
-rc_t SequenceDoneWriting(SequenceWriter *self)
-{
-    return TableWriterSeq_TmpKeyStart(self->tbl);
-}
-
-rc_t SequenceReadKey(const SequenceWriter *cself, int64_t row, uint64_t *keyId)
-{
-    return TableWriterSeq_TmpKey(cself->tbl, row, keyId);
-}
-
-rc_t SequenceUpdateAlignData(SequenceWriter *self, int64_t rowId, unsigned nreads,
-                             int64_t const primeId[/* nreads */],
-                             uint8_t const algnCnt[/* nreads */])
-{
-    TableWriterData data[2];
-    
-    data[0].buffer = primeId; data[0].elements = nreads;
-    data[1].buffer = algnCnt; data[1].elements = nreads;
-    
-    return TableWriterSeq_WriteAlignmentData(self->tbl, rowId, &data[0], &data[1]);
-}
-
-void SequenceWhack(SequenceWriter *self, bool commit) {
-    uint64_t dummyRows;
-    /* rc_t rc; */
-    
-    VDatabaseRelease(self->db);
-    
-    if (self->tbl == NULL)
-        return;
-    
-    /* rc = */ TableWriterSeq_Whack(self->tbl, commit, &dummyRows);
-}
-
-/* MARK: SequenceRecord Object */
-static
-rc_t SequenceRecordResize(SequenceRecord *self,
-                          KDataBuffer *storage,
-                          unsigned numreads,
-                          unsigned seqLen)
-{
-    size_t sz;
-    rc_t rc;
-    
-    sz = seqLen * (sizeof(self->seq[0]) + sizeof(self->qual[0])) +
-         numreads * (sizeof(self->ti) +
-                     sizeof(self->readStart[0]) +
-                     sizeof(self->readLen[0]) +
-                     sizeof(self->aligned[0]) + 
-                     sizeof(self->orientation[0]) +
-                     sizeof(self->alignmentCount[0]) +
-                     sizeof(self->cskey[0])
-                     );
-    storage->elem_bits = 8;
-    rc = KDataBufferResize(storage, sz);
-    if (rc)
-        return rc;
-    self->numreads = numreads;
-    
-    self->ti = (uint64_t *)storage->base;
-    self->readStart = (uint32_t *)&self->ti[numreads];
-    self->readLen = (uint32_t *)&self->readStart[numreads];
-    self->aligned = (bool *)&self->readLen[numreads];
-    self->orientation = (uint8_t *)&self->aligned[numreads];
-    self->is_bad = (uint8_t *)&self->orientation[numreads];
-    self->alignmentCount = (uint8_t *)&self->is_bad[numreads];
-    self->cskey = (char *)&self->alignmentCount[numreads];
-    self->seq = (char *)&self->cskey[numreads];
-    self->qual = (uint8_t *)&self->seq[seqLen];
-
-    self->spotGroup = NULL;
-    self->spotGroupLen = 0;
-    self->spotName = NULL;
-    self->spotNameLen = 0;
-    
-    return 0;
-}
-
-rc_t SequenceRecordInit(SequenceRecord *self, unsigned numreads, unsigned readLen[])
-{
-    unsigned i;
-    unsigned seqlen = 0;
-    rc_t rc;
-    
-    for (i = 0; i != numreads; ++i) {
-        seqlen += readLen[i];
-    }
-    rc = SequenceRecordResize(self, &self->storage, numreads, seqlen);
-    if (rc)
-        return rc;
-    memset(self->storage.base, 0, KDataBufferBytes(&self->storage));
-    
-    for (seqlen = 0, i = 0; i != numreads; ++i) {
-        self->readLen[i] = readLen[i];
-        self->readStart[i] = seqlen;
-        seqlen += readLen[i];
-    }
-    self->numreads = numreads;
-    memset(self->cskey, 'T', numreads);
-    return 0;
-}
-
-rc_t SequenceRecordAppend(SequenceRecord *self,
-                          const SequenceRecord *other
-                          )
-{
-    /* save the locations of the original data */
-    unsigned const seq = (uint8_t const *)self->seq - (uint8_t const *)self->storage.base;
-    unsigned const qual = (uint8_t const *)self->qual - (uint8_t const *)self->storage.base;
-    unsigned const cskey = (uint8_t const *)self->cskey - (uint8_t const *)self->storage.base;
-    unsigned const alignmentCount = (uint8_t const *)self->alignmentCount - (uint8_t const *)self->storage.base;
-    unsigned const is_bad = (uint8_t const *)self->is_bad - (uint8_t const *)self->storage.base;
-    unsigned const orientation = (uint8_t const *)self->orientation - (uint8_t const *)self->storage.base;
-    unsigned const aligned = (uint8_t const *)self->aligned - (uint8_t const *)self->storage.base;
-    unsigned const ti = (uint8_t const *)self->ti - (uint8_t const *)self->storage.base;
-    unsigned const readLen = (uint8_t const *)self->readLen - (uint8_t const *)self->storage.base;
-/*    unsigned const readStart = (uint8_t const *)self->readStart - (uint8_t const *)self->storage.base;*/
-
-    rc_t rc;
-    unsigned seqlen;
-    unsigned otherSeqlen;
-    unsigned i;
-    unsigned numreads = self->numreads;
-    
-    for (seqlen = 0, i = 0; i != numreads; ++i) {
-        seqlen += self->readLen[i];
-    }
-    for (otherSeqlen = 0, i = 0; i != other->numreads; ++i) {
-        otherSeqlen += other->readLen[i];
-    }
-
-    rc = SequenceRecordResize(self, &self->storage, self->numreads + other->numreads, seqlen + otherSeqlen);
-    if (rc)
-        return rc;
-    /* this needs to be reverse order from assignment in Resize function
-     * these regions can overlap
-     */
-    memmove(self->qual,             &((uint8_t const *)self->storage.base)[qual],              seqlen);
-    memmove(self->seq,              &((uint8_t const *)self->storage.base)[seq],               seqlen);
-    memmove(self->cskey,            &((uint8_t const *)self->storage.base)[cskey],             numreads * sizeof(self->cskey[0]));
-    memmove(self->alignmentCount,   &((uint8_t const *)self->storage.base)[alignmentCount],    numreads * sizeof(self->alignmentCount[0]));
-    memmove(self->is_bad,           &((uint8_t const *)self->storage.base)[is_bad],            numreads * sizeof(self->is_bad[0]));
-    memmove(self->orientation,      &((uint8_t const *)self->storage.base)[orientation],       numreads * sizeof(self->orientation[0]));
-    memmove(self->aligned,          &((uint8_t const *)self->storage.base)[aligned],           numreads * sizeof(self->aligned[0]));
-    memmove(self->readLen,          &((uint8_t const *)self->storage.base)[readLen],           numreads * sizeof(self->readLen[0]));
-    memmove(self->ti,               &((uint8_t const *)self->storage.base)[ti],                numreads * sizeof(self->ti[0]));
-    
-    memcpy(&self->ti[numreads],             other->ti,              other->numreads * sizeof(self->ti[0]));
-    memcpy(&self->readLen[numreads],        other->readLen,         other->numreads * sizeof(self->readLen[0]));
-    memcpy(&self->aligned[numreads],        other->aligned,         other->numreads * sizeof(self->aligned[0]));
-    memcpy(&self->orientation[numreads],    other->orientation,     other->numreads * sizeof(self->orientation[0]));
-    memcpy(&self->is_bad[numreads],         other->is_bad,          other->numreads * sizeof(self->is_bad[0]));
-    memcpy(&self->alignmentCount[numreads], other->alignmentCount,  other->numreads * sizeof(self->alignmentCount[0]));
-    memcpy(&self->cskey[numreads],          other->cskey,           other->numreads * sizeof(self->cskey[0]));
-    memcpy(&self->seq[seqlen],              other->seq,             otherSeqlen);
-    memcpy(&self->qual[seqlen],             other->qual,            otherSeqlen);
-    
-    for (i = 0, seqlen = 0; i != self->numreads; ++i) {
-        self->readStart[i] = seqlen;
-        seqlen += self->readLen[i];
-    }
-    
-    return 0;
-}
diff --git a/test/loader/sequencewriter.vschema b/test/loader/sequencewriter.vschema
deleted file mode 100755
index 350fa9c..0000000
--- a/test/loader/sequencewriter.vschema
+++ /dev/null
@@ -1,47 +0,0 @@
-include 'ncbi/sra.vschema';
-include 'align/seq.vschema';
-
-extern function
-INSDC:4na:bin NCBI:align:seq_restore_read #1 ( INSDC:4na:bin cmp_rd, I64 align_id,
-        INSDC:coord:len read_len, INSDC:SRA:xread_type rd_type )
-    = ALIGN:seq_restore_read;
-
-table NCBI:align:tbl:seq #1.0.0 =
-    NCBI:tbl:base_space #2.0.3,
-    NCBI:tbl:phred_quality #2.0.4,
-    NCBI:align:tbl:cmp_base_space #1,
-    NCBI:SRA:tbl:spotdesc #1.0.2,
-    NCBI:SRA:tbl:stats #1.2.0
-{
-    // 128K
-    column default limit = 131072;
-
-    // gets primary record in alignment table (size of column is NREADS)
-    // if sorted - should used special encoding
-    extern column <I64> izip_encoding PRIMARY_ALIGNMENT_ID;
-
-    INSDC:coord:zero trim_start = < INSDC:coord:zero > echo < 0 > ();
-    INSDC:coord:len trim_len = _spot_len;
-
-    // size is NREADS
-    extern column < U8 > zip_encoding ALIGNMENT_COUNT;
-
-    // allow NAME to be set externally. otherwise, auto-generate name from row-id
-    physical column < ascii > zip_encoding .NAME = name_in;
-    ascii name_in = NAME;
-    ascii out_name_fmt = .NAME | < ascii > echo < '$R' > ();
-
-    // temparary column
-    extern column < U64 > izip_encoding TMP_KEY_ID;
-
-    // restored  READ
-    INSDC:4na:bin out_dcmp_4na_bin
-        = NCBI:align:seq_restore_read (out_cmp_4na_bin, .PRIMARY_ALIGNMENT_ID, .READ_LEN, .READ_TYPE);
-
-    extern column < U64 > izip_encoding TI;
-};
-
-database NCBI:align:db:alignment_sorted #1.3
-{
-    table NCBI:align:tbl:seq #1.0 SEQUENCE;
-};
diff --git a/test/network-test/Makefile b/test/network-test/Makefile
new file mode 100644
index 0000000..ec2dc9f
--- /dev/null
+++ b/test/network-test/Makefile
@@ -0,0 +1,99 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = test/network-test
+
+include $(TOP)/build/Makefile.env
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+	network-test
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: vers-includes
+	@ $(MAKE_CMD) $(TARGDIR)/$@
+
+$(ALL_TOOLS): vers-includes
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# all
+#
+$(TARGDIR)/all: \
+	$(addprefix $(BINDIR)/,$(ALL_TOOLS))
+
+.PHONY: $(TARGDIR)/all
+
+#-------------------------------------------------------------------------------
+# std
+#
+$(TARGDIR)/std: \
+	$(addprefix $(BINDIR)/,$(EXT_TOOLS))
+
+.PHONY: $(TARGDIR)/std
+
+#-------------------------------------------------------------------------------
+# vers-includes
+#
+$(TARGDIR)/vers-includes: $(addsuffix .vers.h,$(EXT_TOOLS))
+
+.PHONY: $(TARGDIR)/vers-includes
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# TOOL_SRC
+#
+TOOL_SRC = \
+	network-testing \
+	network-test
+
+TOOL_OBJ = \
+	$(addsuffix .$(OBJX),$(TOOL_SRC))
+
+TOOL_LIB = \
+	-skapp \
+	-sncbi-vdb \
+	-lm
+
+$(BINDIR)/network-test: $(TOOL_OBJ)
+	$(LD) --exe --vers $(SRCDIR) -o $@ $^ $(TOOL_LIB)
diff --git a/test/network-test/network-test.c b/test/network-test/network-test.c
new file mode 100644
index 0000000..a6c02ce
--- /dev/null
+++ b/test/network-test/network-test.c
@@ -0,0 +1,105 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "network-test.vers.h"
+
+#include <klib/out.h>
+#include <klib/rc.h>
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+
+#include <kfs/file.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <stdio.h>
+
+#include "network-testing.h"
+
+const char UsageDefaultName[] = "network-test";
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    return KOutMsg( "\nUsage:\n %s [accession]\n\n", progname );
+}
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if ( args == NULL )
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+        rc = ArgsProgram ( args, &fullpath, &progname );
+
+    if ( rc != 0 )
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary ( progname );
+	
+    HelpOptionsStandard ();
+    HelpVersion ( fullpath, KAppVersion() );
+
+    return rc;
+}
+
+
+/* Version  EXTERN
+ *  return 4-part version code: 0xMMmmrrrr, where
+ *      MM = major release
+ *      mm = minor release
+ *    rrrr = bug-fix release
+ */
+ver_t CC KAppVersion ( void )
+{
+    return NETWORK_TEST_VERS;
+}
+
+static rc_t CC write_to_FILE ( void *f, const char *buffer, size_t bytes, size_t *num_writ )
+{
+    * num_writ = fwrite ( buffer, 1, bytes, f );
+    if ( * num_writ != bytes )
+        return RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+    return 0;
+}
+
+rc_t CC KMain( int argc, char *argv [] )
+{
+    rc_t rc = KOutHandlerSet ( write_to_FILE, stdout );
+    if ( rc == 0 )
+	{
+		if ( argc < 2 )
+			rc = perfrom_network_test( "SRR000001" );
+		else
+			rc = perfrom_network_test( argv[ 1 ] );
+	}
+    return rc;
+}
+
diff --git a/test/network-test/network-test.vers b/test/network-test/network-test.vers
new file mode 100644
index 0000000..3eefcb9
--- /dev/null
+++ b/test/network-test/network-test.vers
@@ -0,0 +1 @@
+1.0.0
diff --git a/test/network-test/network-testing.c b/test/network-test/network-testing.c
new file mode 100644
index 0000000..11a3766
--- /dev/null
+++ b/test/network-test/network-testing.c
@@ -0,0 +1,436 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/out.h>
+#include <klib/rc.h>
+#include <klib/printf.h>
+#include <klib/log.h>
+#include <klib/text.h>
+#include <klib/data-buffer.h>
+#include <klib/time.h>
+
+#include <kns/manager.h>
+#include <kns/kns-mgr-priv.h> /* KNSManagerMakeReliableHttpFile */
+#include <kns/endpoint.h>
+#include <kns/http.h>
+#include <kns/stream.h>
+
+#include <kfs/file.h>
+
+#include <vfs/manager.h>
+#include <vfs/path.h>
+#include <vfs/resolver.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+
+static rc_t ipv4_endpoint_to_string( char * buffer, size_t buflen, KEndPoint * ep )
+{
+	uint32_t b[4];
+	b[0] = ( ep->u.ipv4.addr & 0xFF000000 ) >> 24;
+	b[1] = ( ep->u.ipv4.addr & 0xFF0000 ) >> 16;
+	b[2] = ( ep->u.ipv4.addr & 0xFF00 ) >> 8;
+	b[3] = ( ep->u.ipv4.addr & 0xFF );
+	return string_printf( buffer, buflen, NULL, "ipv4: %d.%d.%d.%d : %d",
+						   b[0], b[1], b[2], b[3], ep->u.ipv4.port );
+}
+
+static rc_t ipv6_endpoint_to_string( char * buffer, size_t buflen, KEndPoint * ep )
+{
+	uint32_t b[8];
+	b[0] = ( ep->u.ipv6.addr[ 0  ] << 8 ) | ep->u.ipv6.addr[ 1  ];
+	b[1] = ( ep->u.ipv6.addr[ 2  ] << 8 ) | ep->u.ipv6.addr[ 3  ];
+	b[2] = ( ep->u.ipv6.addr[ 4  ] << 8 ) | ep->u.ipv6.addr[ 5  ];
+	b[3] = ( ep->u.ipv6.addr[ 6  ] << 8 ) | ep->u.ipv6.addr[ 7  ];
+	b[4] = ( ep->u.ipv6.addr[ 8  ] << 8 ) | ep->u.ipv6.addr[ 9  ];
+	b[5] = ( ep->u.ipv6.addr[ 10 ] << 8 ) | ep->u.ipv6.addr[ 11 ];
+	b[6] = ( ep->u.ipv6.addr[ 12 ] << 8 ) | ep->u.ipv6.addr[ 13 ];
+	b[7] = ( ep->u.ipv6.addr[ 14 ] << 8 ) | ep->u.ipv6.addr[ 15 ];
+	return string_printf( buffer, buflen, NULL, "ipv6: %.04X:%.04X:%.04X:%.04X:%.04X:%.04X:%.04X:%.04X: :%d", 
+						   b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], ep->u.ipv6.port );
+}
+
+static rc_t ipc_endpoint_to_string( char * buffer, size_t buflen, KEndPoint * ep )
+{
+	return string_printf( buffer, buflen, NULL, "ipc: %s", ep->u.ipc_name );
+}
+
+static rc_t endpoint_to_string( char * buffer, size_t buflen, KEndPoint * ep )
+{
+	rc_t rc;
+	switch( ep->type )
+	{
+		case epIPV4 : rc = ipv4_endpoint_to_string( buffer, buflen, ep ); break;
+		case epIPV6 : rc = ipv6_endpoint_to_string( buffer, buflen, ep ); break;
+		case epIPC  : rc = ipc_endpoint_to_string( buffer, buflen, ep ); break;
+		default     : rc = string_printf( buffer, buflen, NULL, "unknown endpoint-tyep %d", ep->type ); break;
+	}
+	return rc;
+}
+
+static rc_t perfrom_dns_test( KNSManager const * kns_mgr, const char * domain, uint16_t port )
+{
+	rc_t rc;
+	KEndPoint ep;
+	String s_domain;
+
+	KTimeMs_t start_time = KTimeMsStamp();
+	StringInitCString( &s_domain, domain );
+	rc = KNSManagerInitDNSEndpoint( kns_mgr, &ep, &s_domain, port );
+	if ( rc != 0 )
+		pLogErr( klogErr, rc, "cannot init endpoint for $(URL):$(PORT)", "URL=%s,PORT=%d", domain, port );
+	else
+	{
+		char s_endpoint[ 1024 ];
+		rc = endpoint_to_string( s_endpoint, sizeof s_endpoint, &ep );
+		KOutMsg( "\nendpoint for %s:%d is: '%s'\n", domain, port, s_endpoint );
+	}
+	KOutMsg( "in %d milliseconds\n", KTimeMsStamp() - start_time );
+	
+	return rc;
+}
+
+
+static rc_t read_stream_into_databuffer( KStream * stream, KDataBuffer * databuffer )
+{
+	rc_t rc;
+	
+	size_t total = 0;
+	KDataBufferMakeBytes( databuffer, 4096 );
+	while ( 1 )
+	{
+		size_t num_read;
+		uint8_t * base;
+		uint64_t avail = databuffer->elem_count - total;
+		if ( avail < 256 )
+		{
+			rc = KDataBufferResize( databuffer, databuffer->elem_count + 4096 );
+			if ( rc != 0 )
+			{
+				LogErr( klogErr, rc, "CGI: KDataBufferResize failed" );
+				break;
+			}
+		}
+		
+		base = databuffer->base;
+		rc = KStreamRead( stream, & base [ total ], ( size_t ) databuffer->elem_count - total, &num_read );
+		if ( rc != 0 )
+		{
+			/* TBD - look more closely at rc */
+			if ( num_read > 0 )
+			{
+				LogErr( klogErr, rc, "CGI: KStreamRead failed" );
+				rc = 0;
+			}
+			else
+				break;
+		}
+
+		if ( num_read == 0 )
+			break;
+
+		total += num_read;
+	}
+
+	if ( rc == 0 )
+		databuffer->elem_count = total;
+	return rc;
+}
+
+
+static rc_t call_cgi( KNSManager const * kns_mgr, const char * cgi_url, uint32_t ver_major, uint32_t ver_minor,
+			   const char * protocol, const char * acc, KDataBuffer * databuffer )
+{
+	KHttpRequest * req;
+	rc_t rc = KNSManagerMakeReliableClientRequest( kns_mgr, &req, 0x01000000, NULL, cgi_url );
+	if ( rc != 0 )
+		pLogErr( klogErr, rc, "CGI: cannot make ReliableClientRequest $(URL)", "URL=%s", cgi_url );
+	else
+	{
+        rc = KHttpRequestAddPostParam( req, "version=%u.%u", ver_major, ver_minor );
+		if ( rc != 0 )
+			pLogErr( klogErr, rc, "CGI: KHttpRequestAddPostParam version=$(V1).$(V2) failed", "V1=%d,V2=%d", ver_major, ver_minor );
+		
+		if ( rc == 0 )
+		{
+			rc = KHttpRequestAddPostParam( req, "acc=%s", acc );
+			if ( rc != 0 )
+				pLogErr( klogErr, rc, "CGI: KHttpRequestAddPostParam acc=$(ACC) failed", "ACC=%s", acc );
+		}
+		
+		if ( rc == 0 )
+		{
+			rc = KHttpRequestAddPostParam ( req, "accept-proto=%s", protocol );
+			if ( rc != 0 )
+				pLogErr( klogErr, rc, "CGI: KHttpRequestAddPostParam accept-proto=$(PROTO) failed", "PROTO=%s", protocol );
+		}
+
+        if ( rc == 0 )
+        {
+            KHttpResult *rslt;
+            rc = KHttpRequestPOST( req, &rslt );
+			if ( rc != 0 )
+				LogErr( klogErr, rc, "CGI: KHttpRequestPOST failed" );
+			else
+			{
+                uint32_t code;
+                rc = KHttpResultStatus ( rslt, &code, NULL, 0, NULL );
+				if ( rc != 0 )
+					LogErr( klogErr, rc, "CGI: KHttpResultStatus failed" );
+				else
+				{
+					if ( code != 200 )
+						pLogErr( klogErr, rc, "CGI: unexpected result-code of $(RESCODE)", "RESCODE=%d", code );
+					else
+					{
+						KStream *response;
+						
+						rc = KHttpResultGetInputStream ( rslt, &response );
+						if ( rc != 0 )
+							LogErr( klogErr, rc, "CGI: KHttpResultGetInputStream failed" );
+						else
+						{
+							rc = read_stream_into_databuffer( response, databuffer );
+							KStreamRelease ( response );
+						}
+					}
+				}
+				KHttpResultRelease ( rslt );
+			}
+		}
+		KHttpRequestRelease ( req );
+	}
+	return rc;
+}
+
+
+static rc_t perform_cgi_test( KNSManager const * kns_mgr, const char * acc )
+{
+	rc_t rc;
+	KDataBuffer databuffer;
+	KTimeMs_t start_time = KTimeMsStamp();
+
+	memset( &databuffer, 0, sizeof databuffer );
+	rc = call_cgi( kns_mgr, "http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi", 1, 1, "http", acc, &databuffer );
+	if ( rc == 0 )
+	{
+	    const char *start = ( const void* ) databuffer.base;
+		size_t size = KDataBufferBytes( &databuffer );
+		KOutMsg( "\nCGI: Response = %.*s\n", size, start );
+	}
+	KOutMsg( "in %d milliseconds\n\n", KTimeMsStamp() - start_time );
+	
+	return rc;
+}
+
+
+static rc_t print_vpath( const char * prefix, const VPath * vpath, char * buffer, size_t buflen )
+{
+	const String * s_path;
+	rc_t rc = VPathMakeString( vpath, &s_path );
+	if ( rc != 0 )
+		pLogErr( klogErr, rc, "VPathMakeString() for $(PREFIX) failed", "PREFIX=%s", prefix );
+	else
+	{
+		KOutMsg( "resolved (%s) : %S\n", prefix, s_path );
+		if ( buffer != NULL && buflen > 0 )
+			string_printf( buffer, buflen, NULL, "%S", s_path );
+		StringWhack( s_path );
+	}
+	return rc;
+}
+
+
+static rc_t perform_resolve_test( const char * acc, char * buffer, size_t buflen )
+{
+    VFSManager * vfs_mgr;
+    rc_t rc = VFSManagerMake( &vfs_mgr );
+	if ( rc != 0 )
+		LogErr( klogErr, rc, "VFSManagerMake failed" );
+    else
+    {
+        VResolver * resolver;
+        rc = VFSManagerGetResolver( vfs_mgr, &resolver );
+		if ( rc != 0 )
+			LogErr( klogErr, rc, "VFSManagerGetResolver failed" );
+        else
+        {
+            VPath * query_path;
+            rc = VFSManagerMakePath( vfs_mgr, &query_path, "ncbi-acc:%s", acc );
+			if ( rc != 0 )
+				LogErr( klogErr, rc, "VFSManagerMakePath failed" );
+            else
+            {
+                const VPath * local = NULL;
+                const VPath * remote = NULL;
+				const VPath * cache = NULL;
+				
+				KTimeMs_t start_time = KTimeMsStamp();
+				
+				rc = VResolverQuery( resolver, eProtocolHttp, query_path, &local, NULL, NULL );
+				if ( rc != 0 )
+					LogErr( klogErr, rc, "VResolverQuery (local) failed" );
+                else
+                {
+					rc = print_vpath( "local ", local, NULL, 0 );
+					VPathRelease ( local );
+                }
+				rc = VResolverQuery( resolver, eProtocolHttp, query_path, NULL, &remote, &cache );
+				if ( rc != 0 )
+					LogErr( klogErr, rc, "VResolverQuery (remote/cache) failed" );
+                else
+				{
+					if ( remote != NULL )
+					{
+						rc = print_vpath( "remote", remote, buffer, buflen );
+						VPathRelease ( remote );
+					}
+					if ( rc == 0 && cache != NULL )
+					{
+						rc = print_vpath( "cache ", cache, NULL, 0 );
+						VPathRelease ( cache );
+					}
+				}
+		
+				KOutMsg( "in %d milliseconds\n", KTimeMsStamp() - start_time );
+                VPathRelease ( query_path );
+            }
+            VResolverRelease( resolver );
+        }
+        VFSManagerRelease ( vfs_mgr );
+    }
+	return rc;
+}
+
+
+static rc_t read_blocks( const KFile * remote_file, uint32_t block_count, uint64_t * total )
+{
+	rc_t rc = 0;
+	size_t block_size = 1024 * 1024 * 32;
+	
+	*total = 0;
+	uint8_t * block = malloc( block_size );
+	if ( block == NULL )
+	{
+		rc = RC( rcExe, rcNoTarg, rcAllocating, rcMemory, rcExhausted );
+		LogErr( klogErr, rc, "allocation of block failed" );
+	}
+	else
+	{
+		uint32_t i;
+		uint64_t pos = 0;
+		for ( i = 0; rc == 0 && i < block_count; ++i )
+		{
+			size_t num_read;
+			rc = KFileReadAll( remote_file, pos, block, block_size, &num_read );
+			if ( rc != 0 )
+				pLogErr( klogErr, rc, "KFileReadAll() at '$(POS)' failed", "POS=%ld", pos );
+			else
+				pos += num_read;
+		}
+		*total = pos;
+		free( (void *) block );
+	}
+	return rc;
+}
+
+static rc_t perform_read_test( KNSManager const * kns_mgr, const char * remote_path )
+{
+	
+	const KFile * remote_file;
+	KTimeMs_t start_time = KTimeMsStamp();
+	rc_t rc = KNSManagerMakeHttpFile ( kns_mgr, &remote_file, NULL, 0x0101, "%s", remote_path );
+	if ( rc != 0 )
+		pLogErr( klogErr, rc, "KNSManagerMakeHttpFile() '$(FILENAME)' failed", "FILENAME=%s", remote_path );
+	else
+	{
+		uint64_t total;
+		KOutMsg( "\n'%s' opened\nin %d milliseconds\n", remote_path, KTimeMsStamp() - start_time );
+		start_time = KTimeMsStamp();
+		rc = read_blocks( remote_file, 10, &total );
+		KOutMsg( "total of %ld bytes read in %d milliseconds\n\n", total, KTimeMsStamp() - start_time );
+		KFileRelease( remote_file );
+	}
+	return rc;
+}
+
+rc_t perfrom_network_test( const char * acc )
+{
+	KNSManager * kns_mgr;
+	rc_t rc =  KNSManagerMake( &kns_mgr );
+	if ( rc != 0 )
+		LogErr( klogErr, rc, "cannot make KNS-Manager" );
+	else
+	{
+		if ( KNSManagerGetHTTPProxyEnabled( kns_mgr ) )
+		{
+			KOutMsg( "\nKNSManager: proxy enabled\n" );
+			{
+				const String * proxy;
+				rc = KNSManagerGetHTTPProxyPath( kns_mgr, &proxy );
+				if ( rc != 0 )
+					LogErr( klogErr, rc, "cannot request proxy-path from KNS-Manager" );
+				else
+					KOutMsg( "KNSManager: proxy at : %S\n", proxy );
+			}
+		}
+		else
+			KOutMsg( "\nKNSManager: proxy disabled\n" );
+			
+		if ( rc == 0 )
+		{
+			const char * user_agent;
+			rc = KNSManagerGetUserAgent( &user_agent );
+			if ( rc != 0 )
+				LogErr( klogErr, rc, "cannot request user-agent from KNS-Manager" );
+			else
+				KOutMsg( "KNSManager: user-agent = '%s'\n", user_agent );
+		}
+
+		if ( rc == 0 )
+			rc = perfrom_dns_test( kns_mgr, "www.ncbi.nlm.nih.gov", 80 );
+
+		if ( rc == 0 )
+			rc = perform_cgi_test( kns_mgr, acc );
+
+		if ( rc == 0 )
+		{
+			char remote_path[ 4096 ];
+			remote_path[ 0 ] = 0;
+			rc = perform_resolve_test( acc, remote_path, sizeof remote_path );
+			if ( rc == 0 && remote_path[ 0 ] != 0 )
+				rc = perform_read_test( kns_mgr, remote_path );
+		}
+			
+		KNSManagerRelease( kns_mgr );
+	}
+	return rc;
+}
diff --git a/test/network-test/network-testing.h b/test/network-test/network-testing.h
new file mode 100644
index 0000000..00cacd8
--- /dev/null
+++ b/test/network-test/network-testing.h
@@ -0,0 +1,42 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_network_testing_
+#define _h_network_testing_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <klib/rc.h>
+
+rc_t perfrom_network_test( const char * acc );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/test/ngs-c++/CSRA1PileupTest.cpp b/test/ngs-c++/CSRA1PileupTest.cpp
deleted file mode 100644
index 60f56de..0000000
--- a/test/ngs-c++/CSRA1PileupTest.cpp
+++ /dev/null
@@ -1,742 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for NGS Pileup interface, CSRA1 based implementation
-*/
-
-#include <ngs/ncbi/NGS.hpp>
-
-#include <ktst/unit_test.hpp>
-
-#include <sysalloc.h>
-#include <assert.h>
-#include <memory.h> // memset
-#include <stdio.h>
-
-#include <sstream>
-
-using namespace ncbi::NK;
-
-TEST_SUITE(NgsCsra1PileupCppTestSuite);
-
-TEST_CASE(CSRA1_PileupIterator_GetDepth)
-{
-    char const db_path[] = "SRR341578";
-
-    std::vector <uint32_t> vecDepthSlice, vecDepthEntire, vecRef;
-
-    int64_t const pos_start = 20017;
-    uint64_t const len = 5;
-
-    vecRef.push_back(1); // 20017
-    vecRef.push_back(0); // 20018
-    vecRef.push_back(1); // 20019
-    vecRef.push_back(1); // 20020
-    vecRef.push_back(3); // 20021
-
-    {
-        ngs::ReadCollection run = ncbi::NGS::openReadCollection (db_path);
-        ngs::ReferenceIterator ri = run.getReferences ();
-
-        ri.nextReference ();
-        ri.nextReference ();
-
-        ngs::PileupIterator pi = ri.getPileups ( ngs::Alignment::primaryAlignment );
-
-        uint64_t ref_pos = 0;
-        for (; pi.nextPileup (); ++ ref_pos)
-        {
-            if ( ref_pos >= (uint64_t)pos_start && ref_pos < (uint64_t)pos_start + len )
-                vecDepthEntire.push_back ( pi.getPileupDepth () );
-        }
-    }
-    {
-        ngs::ReadCollection run = ncbi::NGS::openReadCollection (db_path);
-        ngs::ReferenceIterator ri = run.getReferences ();
-
-        ri.nextReference ();
-        ri.nextReference ();
-
-        ngs::PileupIterator pi = ri.getPileupSlice ( pos_start, len, ngs::Alignment::primaryAlignment );
-
-        uint64_t ref_pos = (uint64_t)pos_start;
-        for (; pi.nextPileup (); ++ ref_pos)
-        {
-            if ( ref_pos >= (uint64_t)pos_start && ref_pos < (uint64_t)pos_start + len )
-                vecDepthSlice.push_back ( pi.getPileupDepth () );
-        }
-    }
-
-    REQUIRE_EQ ( vecRef.size(), vecDepthEntire.size() );
-    REQUIRE_EQ ( vecRef.size(), vecDepthSlice.size() );
-
-    for ( size_t i = 0; i < (size_t)len; ++i )
-    {
-        REQUIRE_EQ ( vecRef [i], vecDepthEntire [i] );
-        REQUIRE_EQ ( vecRef [i], vecDepthSlice [i] );
-    }
-}
-
-
-TEST_CASE(CSRA1_PileupEventIterator_GetType)
-{
-    char const db_path[] = "SRR341578";
-
-    int64_t const pos_start = 20022;
-    uint64_t const len = 1;
-
-    ngs::ReadCollection run = ncbi::NGS::openReadCollection (db_path);
-    ngs::ReferenceIterator ri = run.getReferences ();
-
-    ri.nextReference ();
-    ri.nextReference ();
-
-    ngs::PileupEvent::PileupEventType arrRefEvents [] =
-    {
-        (ngs::PileupEvent::PileupEventType)(ngs::PileupEvent::mismatch | ngs::PileupEvent::alignment_minus_strand),
-        ngs::PileupEvent::mismatch,
-        ngs::PileupEvent::mismatch,
-        (ngs::PileupEvent::PileupEventType)(ngs::PileupEvent::mismatch | ngs::PileupEvent::alignment_start),
-        (ngs::PileupEvent::PileupEventType)(ngs::PileupEvent::mismatch | ngs::PileupEvent::alignment_minus_strand  | ngs::PileupEvent::alignment_start),
-        (ngs::PileupEvent::PileupEventType)(ngs::PileupEvent::mismatch | ngs::PileupEvent::alignment_start)
-    };
-
-    ngs::PileupIterator pi = ri.getPileupSlice ( pos_start, len, ngs::Alignment::primaryAlignment );
-
-    for (; pi.nextPileup (); )
-    {
-        REQUIRE_EQ ( pi.getPileupDepth(), (uint32_t)6 );
-        for (size_t i = 0; pi.nextPileupEvent (); ++i)
-        {
-            REQUIRE_EQ ( pi.getEventType (), arrRefEvents [i] );
-        }
-    }
-}
-
-struct PileupEventStruct
-{
-    ngs::PileupEvent::PileupEventType event_type;
-    ngs::PileupEvent::PileupEventType next_event_type;
-    uint32_t repeat_count, next_repeat_count;
-    int mapping_quality;
-    char alignment_base;
-    bool deletion_after_this_pos;
-    ngs::String insertion_bases;
-};
-
-struct PileupLine
-{
-    typedef std::vector <PileupEventStruct> TEvents;
-
-    uint32_t depth;
-    TEvents vecEvents;
-};
-
-void print_line (
-    PileupLine const& line,
-    char const* name,
-    int64_t pos_start,
-    int64_t pos,
-    ngs::String const& strRefSlice,
-    std::ostream& os)
-{
-    os
-        << name
-        << "\t" << (pos + 1)    // + 1 to be like sra-pileup - 1-based position
-        << "\t" << strRefSlice [pos - pos_start]
-        << "\t" << line.depth
-        << "\t";
-
-    for (PileupLine::TEvents::const_iterator cit = line.vecEvents.begin(); cit != line.vecEvents.end(); ++ cit)
-    {
-        PileupEventStruct const& pileup_event = *cit;
-
-        ngs::PileupEvent::PileupEventType eventType = pileup_event.event_type;
-
-        if ( ( eventType & ngs::PileupEvent::alignment_start ) != 0 )
-        {
-            int32_t c = pileup_event.mapping_quality + 33;
-            if ( c > '~' ) { c = '~'; }
-            if ( c < 33 ) { c = 33; }
-
-            os << "^" << (char)(c);
-        }
-
-        bool reverse = ( eventType & ngs::PileupEvent::alignment_minus_strand ) != 0;
-
-        switch ( eventType & 7 )
-        {
-        case ngs::PileupEvent::match:
-            os << (reverse ? "," : ".");
-            break;
-        case ngs::PileupEvent::mismatch:
-            os
-                << (reverse ?
-                (char)tolower( pileup_event.alignment_base )
-                : (char)toupper( pileup_event.alignment_base ));
-            break;
-        case ngs::PileupEvent::deletion:
-            os << (reverse ? "<" : ">");
-            break;
-        }
-
-        if ( pileup_event.insertion_bases.size() != 0 )
-        {
-            bool next_reverse = ( pileup_event.next_event_type & ngs::PileupEvent::alignment_minus_strand ) != 0;
-            os
-                << "+"
-                << pileup_event.insertion_bases.size();
-
-            for ( uint32_t i = 0; i < pileup_event.insertion_bases.size(); ++i )
-            {
-                os
-                    << (next_reverse ?
-                    (char)tolower(pileup_event.insertion_bases[i])
-                    : (char)toupper(pileup_event.insertion_bases[i]));
-            }
-        }
-
-
-        if ( pileup_event.deletion_after_this_pos )
-        {
-            uint32_t count = pileup_event.next_repeat_count;
-            os << "-" << count;
-
-            for ( uint32_t i = 0; i < count; ++i )
-            {
-                os
-                    << (reverse ?
-                    (char)tolower(strRefSlice [pos - pos_start + i + 1]) // + 1 means "deletion is at the NEXT position"
-                    : (char)toupper(strRefSlice [pos - pos_start + i + 1])); // + 1 means "deletion is at the NEXT position"
-            }
-
-        }
-
-        if ( ( eventType & ngs::PileupEvent::alignment_stop ) != 0 )
-            os << "$";
-    }
-    os << std::endl;
-}
-
-void clear_line ( PileupLine& line )
-{
-    line.depth = 0;
-    line.vecEvents.clear ();
-}
-
-void mark_line_as_starting_deletion ( PileupLine& line, uint32_t repeat_count, size_t alignment_index )
-{
-    PileupEventStruct& pileup_event = line.vecEvents [ alignment_index ];
-    if ( ( pileup_event.event_type & 7 ) != ngs::PileupEvent::deletion)
-    {
-        pileup_event.next_repeat_count = repeat_count;
-        pileup_event.deletion_after_this_pos = true;
-    }
-}
-
-void mark_line_as_starting_insertion ( PileupLine& line, ngs::String const& insertion_bases, size_t alignment_index, ngs::PileupEvent::PileupEventType next_event_type )
-{
-    PileupEventStruct& pileup_event = line.vecEvents [ alignment_index ];
-    pileup_event.insertion_bases = insertion_bases;
-    pileup_event.next_event_type = next_event_type;
-}
-
-void mimic_sra_pileup (
-            char const* db_path,
-            char const* ref_name,
-            ngs::Alignment::AlignmentCategory category,
-            int64_t const pos_start, uint64_t const len,
-            std::ostream& os)
-{
-    ngs::ReadCollection run = ncbi::NGS::openReadCollection (db_path);
-    ngs::Reference r = run.getReference ( ref_name );
-    ngs::String const& canonical_name = r.getCanonicalName ();
-
-    // in strRefSlice we want to have bases to report current base and deletions
-    // for current base it would be enough to have only slice [pos_start, len]
-    // but for deletions we might have situation when we want
-    // to report a deletion that goes beyond (pos_start + len) on the reference
-    // so we have to read some bases beyond our slice end
-    ngs::String strRefSlice = r.getReferenceBases ( pos_start, len + 10000 );
-
-    ngs::PileupIterator pi = r.getPileupSlice ( pos_start, len, category );
-
-    PileupLine line_prev, line_curr;
-
-    // maps current line alignment vector index to
-    // previous line alignment vector index
-    // mapAlignmentIdx[i] contains adjustment for index, not the absolute value
-    std::vector <int64_t> mapAlignmentIdxPrev, mapAlignmentIdxCurr;
-
-    int64_t pos = pos_start;
-    for (; pi.nextPileup (); ++ pos)
-    {
-        line_curr.depth = pi.getPileupDepth ();
-        line_curr.vecEvents.reserve (line_curr.depth);
-        mapAlignmentIdxCurr.reserve (line_curr.depth);
-
-        int64_t current_stop_count = 0; // number of encountered stops
-        bool increased_stop_count = false; // we have increased count (skipped position) on the last step
-
-        for (; pi.nextPileupEvent (); )
-        {
-            PileupEventStruct pileup_event;
-
-            pileup_event.deletion_after_this_pos = false;
-            pileup_event.event_type = pi.getEventType ();
-
-            if ( ( pileup_event.event_type & ngs::PileupEvent::alignment_start ) != 0 )
-                pileup_event.mapping_quality = pi.getMappingQuality();
-
-            if ((pileup_event.event_type & 7) == ngs::PileupEvent::mismatch)
-                pileup_event.alignment_base = pi.getAlignmentBase();
-
-            if (increased_stop_count)
-            {
-                if (pileup_event.event_type & ngs::PileupEvent::alignment_stop)
-                {
-                    ++current_stop_count;
-                    mapAlignmentIdxCurr [mapAlignmentIdxCurr.size() - 1] = current_stop_count;
-                }
-                else
-                    increased_stop_count = false;
-            }
-            else
-            {
-                if (pileup_event.event_type & ngs::PileupEvent::alignment_stop)
-                {
-                    ++current_stop_count;
-                    increased_stop_count = true;
-                }
-                mapAlignmentIdxCurr.push_back ( current_stop_count );
-            }
-
-            if ( pos != pos_start )
-            {
-                // here in mapAlignmentIdxPrev we have already initialized
-                // indicies for line_prev
-                // so we can find corresponding alignment by doing:
-                // int64_t idx = line_curr.vecEvents.size()
-                // line_prev.vecEvents [ idx + mapAlignmentIdxPrev [idx] ]
-
-                size_t idx_curr_align = line_curr.vecEvents.size();
-
-                if (mapAlignmentIdxPrev.size() > idx_curr_align)
-                {
-                    if ((pileup_event.event_type & 7) == ngs::PileupEvent::deletion)
-                        mark_line_as_starting_deletion ( line_prev, pi.getEventRepeatCount(), mapAlignmentIdxPrev [idx_curr_align] + idx_curr_align );
-                    if ( pileup_event.event_type & ngs::PileupEvent::insertion )
-                        mark_line_as_starting_insertion ( line_prev, pi.getInsertionBases().toString(), mapAlignmentIdxPrev [idx_curr_align] + idx_curr_align, pileup_event.event_type );
-                }
-            }
-
-            line_curr.vecEvents.push_back ( pileup_event );
-        }
-
-        if ( pos != pos_start ) // there is no line_prev for the first line - nothing to print
-        {
-            // print previous line
-            print_line ( line_prev, canonical_name.c_str(), pos_start, pos - 1, strRefSlice, os );
-        }
-
-        line_prev = line_curr;
-        mapAlignmentIdxPrev = mapAlignmentIdxCurr;
-
-        clear_line ( line_curr );
-        mapAlignmentIdxCurr.clear();
-    }
-    // TODO: if the last line should contain insertion or deletion start ([-+]<number><seq>)
-    // we have to look ahead 1 more position to be able to discover this and
-    // modify line_prev, but if the last line is the very last one for the whole
-    // reference - we shouldn't do that. This all isn't implemented yet in this function
-    print_line ( line_prev, canonical_name.c_str(), pos_start, pos - 1, strRefSlice, os );
-}
-
-TEST_CASE(CSRA1_PileupEventIterator_AdjacentIndels)
-{
-    // This test crashed in CSRA1_PileupEvent.c because of
-    // insertion followed by deletion (see vdb-dump SRR1164787 -T PRIMARY_ALIGNMENT -R 209167)
-    // So now this test has to just run with no crashes to be considered as passed successfully
-
-    char const db_path[] = "SRR1164787";
-    char const ref_name[] = "chr1";
-
-    int64_t const pos_start = 1386093;
-    int64_t const pos_end = 9999999;
-    uint64_t const len = (uint64_t)(pos_end - pos_start + 1);
-
-    std::ostringstream sstream;
-
-    mimic_sra_pileup ( db_path, ref_name, ngs::Alignment::primaryAlignment, pos_start, len, sstream );
-}
-
-TEST_CASE(CSRA1_PileupEventIterator_DeletionAndEnding)
-{
-
-    //sra-pileup SRR497541 -r "Contig307.Contig78.Contig363_2872688_2872915.Contig307.Contig78.Contig363_1_2872687":106436-106438 -s -n
-    // There should be no "g-3taa$" for the position 106438, only "g$" must be there
-
-    char const db_path[] = "SRR497541";
-    char const ref_name[] = "Contig307.Contig78.Contig363_2872688_2872915.Contig307.Contig78.Contig363_1_2872687";
-
-    int64_t const pos_start = 106436-1;
-    int64_t const pos_end = 106438 - 1;
-    uint64_t const len = (uint64_t)(pos_end - pos_start + 1);
-
-    std::ostringstream sstream;
-    std::ostringstream sstream_ref;
-
-    sstream_ref << ref_name << "\t106436\tT\t106\tC$C$,$.,$,$,$,$.-5TATAA.-5TATAA,-5tataa.-5TATAA.-5TATAA.$.-5TATAA.-5TATAA,-5tataa.-5TATAA,-5tataa,-5tataa.-5TATAA,-5tataa,-5tataa.-5TATAA,-5tataa,-5tataa,-5tataa,-5tataa.-5TATAA.-5TATAA,-5tataa.-5TATAA,-5tataa,$.-5TATAA,-5tataa,,-5tataa,$.-5TATAA,-5tataa,-5tataa.-5TATAA,-5tataa.$.$.-5TATAA.-5TATAA.-5TATAA.-5TATAA,-5tataa.-5TATAA.-5TATAA.-5TATAA.-5TATAA.-5TATAA.-5TATAA.-5TATAA,-5tataa.-5TATAA,-5tataa,-5tataa,-5tataa.-5TATAA.$,-5tataa.-5TAT [...]
-    sstream_ref << ref_name << "\t106437\tT\t92\tC$>><>>>><><<><<><<<<>><><><c<><<><>>>><>>>>>>><><<<><>>>><<<><<><<>>><>>>><<><>>><<<<<<>><<," << std::endl;
-    sstream_ref << ref_name << "\t106438\tA\t91\t>><>>>><><<><<><<<<>><><><g$<><<><>>>><>>>>>>><><<<><>>>><<<><<><<>>><>>>><<><>>><<<<<<>><<," << std::endl;
-
-    mimic_sra_pileup ( db_path, ref_name, ngs::Alignment::primaryAlignment, pos_start, len, sstream );
-
-    REQUIRE_EQ ( sstream.str (), sstream_ref.str () );
-}
-
-TEST_CASE(CSRA1_PileupEventIterator_LongDeletions)
-{
-
-    //SRR1113221 "chr4" 10204 10208
-    // 1. At the position 10205 we want to have the full lenght (6) deletion
-    // 2. Previously we had a misplaced insertion at the position 10204 (+3att)
-
-    char const db_path[] = "SRR1113221";
-
-    int64_t const pos_start = 10204-1;
-    int64_t const pos_end = 10208 - 1;
-    uint64_t const len = (uint64_t)(pos_end - pos_start + 1);
-
-    // The output must be the same as for "sra-pileup SRR1113221 -r "chr4":10204-10208 -s -n"
-    std::ostringstream sstream;
-    std::ostringstream sstream_ref;
-
-    sstream_ref << "NC_000004.11\t10204\tT\t37\ta,$c+2tc,,+3att.$.$.+2TT.,,.......,..<......,...g...^!." << std::endl;
-    sstream_ref << "NC_000004.11\t10205\tC\t37\t,$,t+3ttt,..,t.......,A.<....-6TCGGCT.-6TCGGCT.,...,....^$,^!.^$." << std::endl;
-    sstream_ref << "NC_000004.11\t10206\tT\t40\t,,,$..a$g$....$.$N.,..,...-6CGGCTG>>.,...-6CGGCTGa....,..^$.^$.^%.^$." << std::endl;
-    sstream_ref << "NC_000004.11\t10207\tC\t40\t,$,$.$.$.....,..,..>>>.,..>t-6ggctgc...+2TC.,......^$.^$.^$.^$.^A." << std::endl;
-    sstream_ref << "NC_000004.11\t10208\tG\t39\t.....,..,..>>>.,..><....,...........^$,^M.^$." << std::endl;
-
-    mimic_sra_pileup ( db_path, "chr4", ngs::Alignment::primaryAlignment, pos_start, len, sstream );
-
-    REQUIRE_EQ ( sstream.str (), sstream_ref.str () );
-}
-
-
-TEST_CASE(CSRA1_PileupEventIterator_Deletion)
-{
-    // deletions
-    char const db_path[] = "SRR341578";
-
-    int64_t const pos_start = 2427;
-    int64_t const pos_end = 2428;
-    uint64_t const len = (uint64_t)(pos_end - pos_start + 1);
-
-    // The output must be the same as for "sra-pileup SRR341578 -r NC_011752.1:2428-2429 -s -n"
-    std::ostringstream sstream;
-    std::ostringstream sstream_ref;
-
-    sstream_ref << "NC_011752.1\t2428\tG\t34\t..,.,.-1A.-1A.-1A.-1A.-1A.-1A,-1a,-1a.-1A,-1a,-1a.-1A.-1A.-1A,-1a,-1a,-1a,-1a.-1A,-1a,-1a.-1A,-1a.-1A.-1A,-1a.^F,^F," << std::endl;
-    sstream_ref << "NC_011752.1\t2429\tA\t34\t.$.$,$.,>>>>>><<><<>>><<<<><<><>><Ggg" << std::endl;
-
-    mimic_sra_pileup ( db_path, "gi|218511148|ref|NC_011752.1|", ngs::Alignment::all, pos_start, len, sstream );
-
-    REQUIRE_EQ ( sstream.str (), sstream_ref.str () );
-}
-
-TEST_CASE(CSRA1_PileupEventIterator_Insertion)
-{
-    // simple matches, mismatch, insertion, mapping quality
-    char const db_path[] = "SRR341578";
-
-    int64_t const pos_start = 2017;
-    int64_t const pos_end = 2018;
-    uint64_t const len = (uint64_t)(pos_end - pos_start + 1);
-
-    // The output must be the same as for "sra-pileup SRR341578 -r NC_011752.1:2018-2019 -s -n"
-    std::ostringstream sstream;
-    std::ostringstream sstream_ref;
-
-    sstream_ref << "NC_011752.1\t2018\tT\t17\t.....,,A,,..+2CA..^F.^F.^:N" << std::endl;
-    sstream_ref << "NC_011752.1\t2019\tC\t19\t.....,,.,,.......^F.^F," << std::endl;
-
-    mimic_sra_pileup ( db_path, "gi|218511148|ref|NC_011752.1|", ngs::Alignment::all, pos_start, len, sstream );
-
-    REQUIRE_EQ ( sstream.str (), sstream_ref.str () );
-}
-
-TEST_CASE(CSRA1_PileupEventIterator_TrickyInsertion)
-{
-    // the insertion occurs in 1 or more previous chunks but not the current
-
-    char const db_path[] = "SRR341578";
-
-    int64_t const pos_start = 380000;
-    int64_t const pos_end = 380001;
-    uint64_t const len = (uint64_t)(pos_end - pos_start + 1);
-
-    // The output must be the same as for "sra-pileup SRR341578 -r NC_011748.1:380001-380002 -s -n"
-    std::ostringstream sstream;
-    std::ostringstream sstream_ref;
-
-    sstream_ref << "NC_011748.1\t380001\tT\t61\t....,,...,......,,...,,.....,,..,.,,,,...,,,,,,,+2tc.,.....G....," << std::endl;
-    sstream_ref << "NC_011748.1\t380002\tT\t61\t.$.$.$.$,$,$...,......,,...,,.....,,A.,.,,,,...,,,,,,,.,.....G....," << std::endl;
-
-    mimic_sra_pileup ( db_path, "gi|218693476|ref|NC_011748.1|", ngs::Alignment::primaryAlignment, pos_start, len, sstream );
-
-    REQUIRE_EQ ( sstream.str (), sstream_ref.str () );
-}
-
-
-TEST_CASE(CSRA1_PileupIterator_StartingZeros)
-{
-    // this is transition from depth == 0 to depth == 1
-    // initial code had different output for primaryAlignments vs all
-
-    int64_t const pos_start = 19374;
-    int64_t const pos_end = 19375;
-    uint64_t const len = (uint64_t)(pos_end - pos_start + 1); //3906625;
-
-    // when requesting category == all, the output must be the same as with
-    // primaryAlignments
-    // reference output: sra-pileup SRR833251 -r "gi|169794206|ref|NC_010410.1|":19375-19376 -s -n
-
-    std::ostringstream sstream;
-    std::ostringstream sstream_ref;
-
-    sstream_ref << "gi|169794206|ref|NC_010410.1|\t19375\tC\t0\t" << std::endl;
-    sstream_ref << "gi|169794206|ref|NC_010410.1|\t19376\tA\t1\t^!." << std::endl;
-
-    mimic_sra_pileup ( "SRR833251", "gi|169794206|ref|NC_010410.1|", ngs::Alignment::all, pos_start, len, sstream );
-
-    REQUIRE_EQ ( sstream.str (), sstream_ref.str () );
-}
-
-TEST_CASE(CSRA1_PileupIterator_MapQuality)
-{
-    // different mapping quality
-    // there was a bug caused by usage of char c instead int32_t c
-    // in printing code inside mimic_sra_pileup
-
-    int64_t const pos_start = 183830-1;
-    int64_t const pos_end = pos_start;
-    uint64_t const len = (uint64_t)(pos_end - pos_start + 1);
-
-    std::ostringstream sstream;
-    std::ostringstream sstream_ref;
-
-    sstream_ref << "gi|169794206|ref|NC_010410.1|\t183830\tA\t1\t^~," << std::endl;
-
-    mimic_sra_pileup ( "SRR833251", "gi|169794206|ref|NC_010410.1|", ngs::Alignment::all, pos_start, len, sstream );
-
-    REQUIRE_EQ ( sstream.str (), sstream_ref.str () );
-}
-
-TEST_CASE(CSRA1_PileupIterator_Depth)
-{
-    // if ngs::Alignment::all is used here
-    // there will be discrepancy with sra-pileup
-
-    int64_t const pos_start = 519533-1;
-    int64_t const pos_end = pos_start;
-    uint64_t const len = (uint64_t)(pos_end - pos_start + 1);
-
-    std::ostringstream sstream;
-    std::ostringstream sstream_ref;
-
-    sstream_ref << "gi|169794206|ref|NC_010410.1|\t519533\tC\t1\t," << std::endl;
-
-    mimic_sra_pileup ( "SRR833251", "gi|169794206|ref|NC_010410.1|", ngs::Alignment::primaryAlignment, pos_start, len, sstream );
-
-    REQUIRE_EQ ( sstream.str (), sstream_ref.str () );
-}
-
-TEST_CASE(CSRA1_PileupIterator_TrailingInsertion)
-{
-    // Loaders sometimes fail and produce a run with trailing insertions
-    // Like now (2015-06-29) SRR1652532 for SRR1652532.PA.97028
-
-    int64_t const pos_start = 42406728-1;
-    int64_t const pos_end = 42406732;
-    uint64_t const len = (uint64_t)(pos_end - pos_start + 1);
-
-    // reference output: sra-pileup SRR1652532 -r "CM000671.1":42406728-42406732 -s -n
-
-    // as of 2015-06-25, this command causes sra-pileup to crash, so
-    // we don't compare our output with one of sra-pileup
-    // and only checking that this test doesn't crash
-
-    std::ostringstream sstream;
-    //std::ostringstream sstream_ref;
-
-    //sstream_ref << "gi|169794206|ref|NC_010410.1|\t19375\tC\t0\t" << std::endl;
-    //sstream_ref << "gi|169794206|ref|NC_010410.1|\t19376\tA\t1\t^!." << std::endl;
-
-    mimic_sra_pileup ( "SRR1652532", "CM000671.1", ngs::Alignment::all, pos_start, len, sstream );
-
-    //std::cout << sstream.str() << std::endl;
-
-    //REQUIRE_EQ ( sstream.str (), sstream_ref.str () );
-}
-
-#if 0 /* TODO: this test needs to be investigated later */
-TEST_CASE(CSRA1_PileupIterator_FalseMismatch)
-{
-    // here is two problems:
-    // 1. at the position 19726231 GetEventType returns "mismatch"
-    //    but the base == 'C' for both reference and alignment
-    // 2. ngs code doesn't report deletion in the beginning of both lines
-    //    and also it reports depths: 1 and 3, while sra-pileup returns 2 and 4
-    // And also it produces a lot of warnings in stderr in the debug version
-
-    // Update:
-    // (1) reproduced in pileup-stats -v -a primary -x 2 -e 2 SRR1652532 -o SRR1652532.out
-    //     due to the bug in new pileup code - need to start not from position 19726231
-    //     but ~25 before that
-    // (2). still remains
-    // 3. if one uncomments REQUIRE_EQ in the end a lot of debug warning appear in the stderr
-
-    int64_t const pos_start = 19726231-1;
-    int64_t const pos_end = pos_start + 1;
-    uint64_t const len = (uint64_t)(pos_end - pos_start + 1);
-
-    std::ostringstream sstream;
-    std::ostringstream sstream_ref;
-
-    // sra-pileup SRR1652532 -r CM000663.1:19726231-19726232 -s -n -t p
-
-    sstream_ref << "CM000663.1\t19726231\tG\t2\t<." << std::endl;
-    sstream_ref << "CM000663.1\t19726232\tC\t4\t<.^:,^H," << std::endl;
-
-    mimic_sra_pileup ( "SRR1652532", "CM000663.1", ngs::Alignment::primaryAlignment, pos_start, len, sstream );
-
-    //std::cout << sstream.str() << std::endl;
-
-    //REQUIRE_EQ ( sstream.str (), sstream_ref.str () );
-}
-#endif
-
-uint64_t pileup_test_all_functions (
-            char const* db_path,
-            char const* ref_name,
-            ngs::Alignment::AlignmentCategory category,
-            int64_t const pos_start, uint64_t const len)
-{
-    uint64_t ret = 0;
-
-    ngs::ReadCollection run = ncbi::NGS::openReadCollection (db_path);
-    ngs::Reference r = run.getReference ( ref_name );
-
-    // in strRefSlice we want to have bases to report current base and deletions
-    // for current base it would be enough to have only slice [pos_start, len]
-    // but for deletions we might have situation when we want
-    // to report a deletion that goes beyond (pos_start + len) on the reference
-    // so we have to read some bases beyond our slice end
-    ngs::String strRefSlice = r.getReferenceBases ( pos_start, len + 100);
-
-    ngs::PileupIterator pi = r.getPileupSlice ( pos_start, len, category );
-
-    int64_t pos = pos_start;
-    for (; pi.nextPileup (); ++ pos)
-    {
-        ret += 1000000;
-
-        size_t event_count = 0;
-        for (; pi.nextPileupEvent () && pos % 17 != 0; ++ event_count)
-        {
-            //ngs::Alignment alignment = pi.getAlignment();
-            //ret += (uint64_t)(alignment.getAlignmentLength() + alignment.getAlignmentPosition());
-
-            ret += (uint64_t)pi.getAlignmentBase();
-            ret += (uint64_t)pi.getAlignmentPosition();
-            ret += (uint64_t)pi.getAlignmentQuality();
-            ret += (uint64_t)pi.getEventIndelType();
-            ret += (uint64_t)pi.getEventRepeatCount();
-            ret += (uint64_t)pi.getEventType();
-            ret += (uint64_t)pi.getFirstAlignmentPosition();
-            ret += (uint64_t)pi.getInsertionBases().size();
-            ret += (uint64_t)pi.getInsertionQualities().size();
-            ret += (uint64_t)pi.getLastAlignmentPosition();
-            ret += (uint64_t)pi.getMappingQuality();
-            ret += (uint64_t)pi.getPileupDepth();
-            ret += (uint64_t)pi.getReferenceBase();
-            ret += (uint64_t)pi.getReferencePosition();
-            ret += (uint64_t)pi.getReferenceSpec().size();
-
-            if ( (event_count + 1) % 67 == 0 )
-            {
-                ret += 100000;
-                pi.resetPileupEvent();
-                break;
-            }
-        }
-    }
-
-    return ret;
-}
-
-TEST_CASE(CSRA1_PileupIterator_TestAllFunctions)
-{
-    uint64_t ret = 0;
-    ret = pileup_test_all_functions ( "SRR822962", "chr2"/*"NC_000002.11"*/, ngs::Alignment::all, 0, 20000 );
-    // this magic sum was taken from an observed result,
-    // but due to a bug in "resetPileupEvent()", is likely to be wrong
-    // resetting the magic sum to what is being returned now.
-    REQUIRE_EQ ( ret, (uint64_t)/*46433887435*/ /*46436925309*/ 46436941625 );
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-ngs_csra1pileup-c++";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t rc=NgsCsra1PileupCppTestSuite(argc, argv);
-    return rc;
-}
-
-}
-
diff --git a/test/ngs-c++/CSRA1_ReadCollection_test.cpp b/test/ngs-c++/CSRA1_ReadCollection_test.cpp
deleted file mode 100644
index 9ce23e8..0000000
--- a/test/ngs-c++/CSRA1_ReadCollection_test.cpp
+++ /dev/null
@@ -1,252 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for NGS interface, CSRA1 based implementation, ReadCollection class
-*/
-
-/**
-* This file is to be #included into a test suite
-*/
-
-#include <klib/text.h>
-
-//TODO: getReads (categories)
-//TODO: getReadCount (categories)
-//TODO: getReadGroups
-//TODO: error cases
-
-// Open
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_Open, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly );
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_Open_Failed, CSRA1_Fixture)
-{
-    REQUIRE_THROW ( ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( string(CSRA1_PrimaryOnly) + "_BS" ) );
-}
-
-// Read collection functions
-
-TEST_CASE (CSRA1_ReadCollection_GetName)
-{
-    ngs::String name1, name2;
-    {
-        ngs::ReadCollection run = ncbi::NGS::openReadCollection ("./SRR611340");
-        name1 = run.getName();
-        char const* pNoSlash = string_rchr( name1.c_str(), name1.length(), '/' );
-        REQUIRE ( pNoSlash == NULL );
-    }
-    {
-        ngs::ReadCollection run = ncbi::NGS::openReadCollection ("SRR611340");
-        name2 = run.getName();
-    }
-    REQUIRE_EQ ( name1, name2 );
-}
-
-// READS
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReads, CSRA1_Fixture)
-{
-    ngs :: ReadIterator readIt = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getReads ( ngs :: Read :: all ); 
-} 
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReads_Filtered, CSRA1_Fixture)
-{
-    ngs :: ReadIterator readIt = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getReads ( ngs :: Read :: unaligned ); 
-} 
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReadRange, CSRA1_Fixture)
-{
-    ngs :: ReadIterator readIt = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getReadRange ( 100, 200 ); 
-} 
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetRead, CSRA1_Fixture)
-{
-    ngs :: Read read = getRead ( string ( CSRA1_PrimaryOnly ) + ".R.1" ); 
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetRead_IdTooHigh, CSRA1_Fixture)
-{
-    REQUIRE_THROW ( ngs :: Read read = 
-                        ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getRead ( string ( CSRA1_PrimaryOnly ) + ".R.2280634" ) );
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetRead_IdTooLow, CSRA1_Fixture)
-{
-    REQUIRE_THROW ( ngs :: Read read = 
-                        ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getRead ( string ( CSRA1_PrimaryOnly ) + ".R.0" ) );
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_ReadCount, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly );
-    REQUIRE_EQ( (uint64_t)2280633, run . getReadCount() ); 
-}    
-
-// REFERENCE
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReference, CSRA1_Fixture)
-{
-    ngs :: Reference ref = getReference ( "supercont2.1" ); 
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_HasReference, CSRA1_Fixture)
-{
-    REQUIRE ( hasReference ( "supercont2.1" ) ); 
-    REQUIRE ( ! hasReference ( "non-existent acc" ) ); 
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReference_Failed, CSRA1_Fixture)
-{
-    REQUIRE_THROW ( ngs :: Reference ref = getReference ( "supercnut2.1" ) ); 
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReferences, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly );
-    ngs :: ReferenceIterator refIt = run . getReferences ();
-}
-
-// ALIGNMENT
-
-// GetAlignment
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignment_Primary, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly );
-    ngs :: Alignment al = run . getAlignment ( string ( CSRA1_PrimaryOnly ) + ".PA.1" );
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignment_Primary_OutOfRange_Low, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly );
-    REQUIRE_THROW ( ngs :: Alignment al = run . getAlignment ( string ( CSRA1_PrimaryOnly ) + ".PA.0" ) );
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignment_Primary_OutOfRange_High, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly );
-    REQUIRE_THROW ( run . getAlignment ( string ( CSRA1_PrimaryOnly ) + ".PA.3987703" ) );
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignment_Secondary, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_WithSecondary );
-    ngs :: Alignment al = run . getAlignment ( string ( CSRA1_WithSecondary ) + ".SA.169" );
-    REQUIRE_EQ( ngs :: Alignment :: secondaryAlignment, al . getAlignmentCategory() );
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignment_Secondary_OutOfRange, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_WithSecondary );
-    REQUIRE_THROW ( ngs :: Alignment al = run . getAlignment ( string ( CSRA1_WithSecondary ) + ".SA.179" ) );
-}
-
-// GetAlignments
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignments_Primary, CSRA1_Fixture)
-{
-    ngs :: AlignmentIterator alIt = getAlignments ( ngs :: Alignment :: primaryAlignment );
-    REQUIRE( alIt . nextAlignment() );
-    REQUIRE_EQ( ngs :: Alignment :: primaryAlignment, alIt . getAlignmentCategory() );
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignments_Secondary, CSRA1_Fixture)
-{
-    ngs :: AlignmentIterator alIt = getAlignments ( ngs :: Alignment :: secondaryAlignment );
-    REQUIRE( alIt . nextAlignment() );
-    REQUIRE_EQ( ngs :: Alignment :: secondaryAlignment, alIt . getAlignmentCategory() );
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignments_All, CSRA1_Fixture)
-{
-    ngs :: AlignmentIterator alIt = getAlignments ( ngs :: Alignment :: all );
-    REQUIRE( alIt . nextAlignment() );
-    REQUIRE_EQ( ngs :: Alignment :: primaryAlignment, alIt . getAlignmentCategory() );
-}
-
-// GetAlignmentCount
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentCount_Secondary, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_WithSecondary );
-    REQUIRE_EQ( (uint64_t)178, run . getAlignmentCount() );
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentCount_Secondary_CategoryAll, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_WithSecondary );
-    REQUIRE_EQ( (uint64_t)178, run . getAlignmentCount( ngs :: Alignment :: all ) );
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentCount_Secondary_CategoryPrimary, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_WithSecondary );
-    REQUIRE_EQ( (uint64_t)168, run . getAlignmentCount( ngs :: Alignment :: primaryAlignment ) );
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentCount_Secondary_CategorySecondary, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_WithSecondary );
-    REQUIRE_EQ( (uint64_t)10, run . getAlignmentCount( ngs :: Alignment :: secondaryAlignment ) );
-}
-
-// GetAlignmentRange
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRange_All, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_WithSecondary );
-    ngs :: AlignmentIterator alIt = run . getAlignmentRange ( 168, 2 ); // both in primary and secondary tables
-    REQUIRE ( alIt . nextAlignment() );
-    REQUIRE_EQ( string ( CSRA1_WithSecondary ) + ".PA.168", alIt . getAlignmentId () . toString () );
-    REQUIRE_EQ( ngs :: Alignment :: primaryAlignment, alIt . getAlignmentCategory() );
-    REQUIRE ( alIt . nextAlignment() );
-    REQUIRE_EQ( string ( CSRA1_WithSecondary ) + ".SA.169", alIt . getAlignmentId () . toString () );
-    REQUIRE_EQ( ngs :: Alignment :: secondaryAlignment, alIt . getAlignmentCategory() );
-    REQUIRE ( ! alIt . nextAlignment() );
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRange_FilteredAll, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_WithSecondary );
-    ngs :: AlignmentIterator alIt = run . getAlignmentRange ( 168, 2, ngs :: Alignment :: all ); // both in primary and secondary tables
-    REQUIRE ( alIt . nextAlignment() );
-    REQUIRE_EQ( string ( CSRA1_WithSecondary ) + ".PA.168", alIt . getAlignmentId () . toString () );
-    REQUIRE_EQ( ngs :: Alignment :: primaryAlignment, alIt . getAlignmentCategory() );
-    REQUIRE ( alIt . nextAlignment() );
-    REQUIRE_EQ( string ( CSRA1_WithSecondary ) + ".SA.169", alIt . getAlignmentId () . toString () );
-    REQUIRE_EQ( ngs :: Alignment :: secondaryAlignment, alIt . getAlignmentCategory() );
-    REQUIRE ( ! alIt . nextAlignment() );
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRangeFiltered_Primary, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_WithSecondary );
-    ngs :: AlignmentIterator alIt = run . getAlignmentRange ( 168, 2, ngs :: Alignment :: primaryAlignment ); 
-    REQUIRE ( alIt . nextAlignment() );
-    REQUIRE_EQ( string ( CSRA1_WithSecondary ) + ".PA.168", alIt . getAlignmentId () . toString () );
-    REQUIRE_EQ( ngs :: Alignment :: primaryAlignment, alIt . getAlignmentCategory() );
-    REQUIRE ( ! alIt . nextAlignment() );
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRangeFiltered_Secondary, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_WithSecondary );
-    ngs :: AlignmentIterator alIt = run . getAlignmentRange ( 168, 2, ngs :: Alignment :: secondaryAlignment ); 
-    REQUIRE ( alIt . nextAlignment() );
-    REQUIRE_EQ( string ( CSRA1_WithSecondary ) + ".SA.169", alIt . getAlignmentId () . toString () );
-    REQUIRE_EQ( ngs :: Alignment :: secondaryAlignment, alIt . getAlignmentCategory() );
-    REQUIRE ( ! alIt . nextAlignment() );
-}
-
diff --git a/test/ngs-c++/CSRA1test.cpp b/test/ngs-c++/CSRA1test.cpp
deleted file mode 100644
index 917a13f..0000000
--- a/test/ngs-c++/CSRA1test.cpp
+++ /dev/null
@@ -1,1116 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for NGS interface, CSRA1 based implementation
-*/
-
-#include "ngsfixture.hpp"
-#include <stdint.h>
-
-#include <sstream>
-
-using namespace std;
-using namespace ncbi::NK;
-
-TEST_SUITE(NgsCsra1CppTestSuite);
-
-class CSRA1_Fixture : public NgsFixture
-{
-public:
-    static const char* CSRA1_PrimaryOnly;
-    static const char* CSRA1_WithSecondary;
-    static const char* CSRA1_WithGroups;
-    static const char* CSRA1_NoReadGroups;
-    static const char* CSRA1_WithCircularRef;
-    static const char* CSRA1_WithCircularRef2;
-    static const char* CSRA1_SingleFragmentPerSpot;
-    
-public:
-    CSRA1_Fixture()
-    {
-    }
-    ~CSRA1_Fixture()
-    {
-    }
-
-    ngs :: ReadIterator getReads ( ngs :: Read :: ReadCategory cat = ngs :: Read :: all )
-    {
-        return NgsFixture :: getReads ( CSRA1_PrimaryOnly, cat ); 
-    }
-    ngs :: Read getRead ( const ngs :: String& p_id)
-    {
-        return NgsFixture :: getRead ( CSRA1_PrimaryOnly, p_id ); 
-    }
-    ngs :: Read getFragment (const ngs :: String& p_readId, uint32_t p_fragIdx)
-    {
-        return NgsFixture :: getFragment ( CSRA1_PrimaryOnly, p_readId, p_fragIdx );
-    }
-    ngs :: Reference getReference ( const char* spec )
-    {
-        return NgsFixture :: getReference ( CSRA1_PrimaryOnly, spec ); 
-    }
-    bool hasReference ( const char* spec )
-    {
-        return NgsFixture :: hasReference ( CSRA1_PrimaryOnly, spec ); 
-    }
-    ngs :: ReferenceIterator getReferences ()
-    {
-        return NgsFixture :: getReferences ( CSRA1_PrimaryOnly ); 
-    }
-    ngs :: AlignmentIterator getAlignments( ngs :: Alignment :: AlignmentCategory category = ngs :: Alignment :: all )
-    {
-        return ncbi :: NGS :: openReadCollection ( CSRA1_WithSecondary ) . getAlignments ( category );
-    }
-};
-const char* CSRA1_Fixture::CSRA1_PrimaryOnly           = "SRR1063272";
-const char* CSRA1_Fixture::CSRA1_WithSecondary         = "SRR833251";
-const char* CSRA1_Fixture::CSRA1_WithGroups            = "SRR822962";
-const char* CSRA1_Fixture::CSRA1_NoReadGroups          = "SRR1237962";
-const char* CSRA1_Fixture::CSRA1_WithCircularRef       = "SRR1769246";
-const char* CSRA1_Fixture::CSRA1_WithCircularRef2      = "SRR821492";
-const char* CSRA1_Fixture::CSRA1_SingleFragmentPerSpot = "SRR2096940";
-
-#include "CSRA1_ReadCollection_test.cpp"
-
-///// Read
-//TODO: error cases
-
-FIXTURE_TEST_CASE(CSRA1_Read_ReadId, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string ( CSRA1_PrimaryOnly ) + ".R.1", getRead ( string ( CSRA1_PrimaryOnly ) + ".R.1" ) . getReadId() . toString () ); 
-}
-
-FIXTURE_TEST_CASE(CSRA1_Read_ReadName, CSRA1_Fixture)
-{
-    REQUIRE_EQ( ngs :: String( "1" ), getRead ( string ( CSRA1_PrimaryOnly ) + ".R.1" ) . getReadName() . toString() );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Read_ReadGroup, CSRA1_Fixture)
-{
-    REQUIRE_EQ( ngs :: String("C1ELY.6"), getRead ( string ( CSRA1_PrimaryOnly ) + ".R.1" ) . getReadGroup() );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Read_getNumFragments, CSRA1_Fixture)
-{
-    REQUIRE_EQ( ( uint32_t ) 2, getRead ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.1" ) . getNumFragments() ); 
-}
-
-FIXTURE_TEST_CASE(CSRA1_Read_ReadCategory_FullyAligned, CSRA1_Fixture)
-{
-    REQUIRE_EQ( ngs :: Read :: fullyAligned, getRead ( string ( CSRA1_PrimaryOnly ) + ".R.1" ) . getReadCategory() );
-}
-FIXTURE_TEST_CASE(CSRA1_Read_ReadCategory_PartiallyAligned, CSRA1_Fixture)
-{
-    REQUIRE_EQ( ngs :: Read :: partiallyAligned, getRead ( string ( CSRA1_PrimaryOnly ) + ".R.3" ) . getReadCategory() );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Read_getReadBases, CSRA1_Fixture)
-{
-    ngs :: String bases = getRead ( string ( CSRA1_PrimaryOnly ) + ".R.1" ) . getReadBases () . toString (); 
-    ngs :: String expected("ACTCGACATTCTGCCTTCGACCTATCTTTCTCCTCTCCCAGTCATCGCCCAGTAGAATTACCAGGCAATGAACCAGGGCC"
-                           "TTCCATCCCAACGGCACAGCAAAGGTATGATACCTGAGATGTTGCGGGATGGTGGGTTTGTGAGGAGATGGCCACGCAGG"
-                           "CAAGGTCTTTTGGAATGGTTCACTGTTGGAGTGAACCCATAT");
-    REQUIRE_EQ( expected, bases );    
-}
-
-FIXTURE_TEST_CASE(CSRA1_Read_getSubReadBases_Offset, CSRA1_Fixture)
-{
-    ngs :: String bases = getRead ( string ( CSRA1_PrimaryOnly ) + ".R.1" ) . getReadBases ( 160 ) . toString( ); 
-    ngs :: String expected("CAAGGTCTTTTGGAATGGTTCACTGTTGGAGTGAACCCATAT");
-    REQUIRE_EQ( expected, bases );    
-}
-
-FIXTURE_TEST_CASE(CSRA1_Read_getSubReadBases_OffsetLength, CSRA1_Fixture)
-{
-    ngs :: String bases = getRead ( string ( CSRA1_PrimaryOnly ) + ".R.1" ) . getReadBases ( 160, 10 ) . toString (); 
-    ngs :: String expected("CAAGGTCTTT");
-    REQUIRE_EQ( expected, bases );    
-}
-
-FIXTURE_TEST_CASE(CSRA1_Read_getReadQualities, CSRA1_Fixture)
-{
-    ngs :: String quals = getRead ( string ( CSRA1_PrimaryOnly ) + ".R.1" ) . getReadQualities() . toString (); 
-    ngs :: String expected("@@CDDBDFFBFHFIEEFGIGGHIEHIGIGGFGEGAFDHIIIIIGGGDFHII;=BF at FEHGIEEH?AHHFHFFFFDC5'5="
-                           "?CC?ADCD at AC??9BDDCDB<@@@DDADDFFHGHIIDHFFHDEFEHIIGHIIDGGGFHIJIGAGHAH=;DGEGEEEDDDB"
-                           "<ABBD;ACDDDCBCCCDD at CCDDDCDCDBDD@ACC>A@?>C3");
-    REQUIRE_EQ( expected, quals );    
-}
-
-FIXTURE_TEST_CASE(CSRA1_Read_getSubReadQualities_Offset, CSRA1_Fixture)
-{
-    ngs :: String quals = getRead ( string ( CSRA1_PrimaryOnly ) + ".R.1" ) . getReadQualities( 160 ) . toString (); 
-    ngs :: String expected("<ABBD;ACDDDCBCCCDD at CCDDDCDCDBDD@ACC>A@?>C3");
-    REQUIRE_EQ( expected, quals );    
-}
-
-FIXTURE_TEST_CASE(CSRA1_Read_getSubReadQualities_OffsetLength, CSRA1_Fixture)
-{
-    ngs :: String quals = getRead ( string ( CSRA1_PrimaryOnly ) + ".R.1" ) . getReadQualities( 160, 10 ) . toString (); 
-    ngs :: String expected("<ABBD;ACDD");
-    REQUIRE_EQ( expected, quals );    
-}
-
-FIXTURE_TEST_CASE(CSRA1_Read_fragmentIsAligned_MultiFragmentsPerPartiallyAlignedSpot, CSRA1_Fixture)
-{
-    ngs :: Read read = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getRead ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.3" );
-    REQUIRE_EQ( true, read.fragmentIsAligned( 0 ) );
-    REQUIRE_EQ( false, read.fragmentIsAligned( 1 ) );
-}
-
-///// ReadIterator
-//TODO: read category selection
-//TODO: range on a collection that represents a slice (read[0].id != 1)
-//TODO: range and filtering
-//TODO: ReadIterator over a ReadGroup (use a ReadGroup that is not immediately at the beginning of the run)
-//TODO: ReadIterator over a ReadIterator, to allow creation of a sub-iterator
-//TODO: ReadIterator returning less than the range requested
-//TODO: error cases (?)
-FIXTURE_TEST_CASE(CSRA1_ReadIterator_NoReadBeforeNext, CSRA1_Fixture)
-{
-    ngs :: ReadIterator readIt = getReads (); 
-    // accessing the read through an iterator before a call to nextRead() throws
-    REQUIRE_THROW ( readIt . getReadId() );
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadIterator_Open_All, CSRA1_Fixture)
-{
-    ngs :: ReadIterator readIt = getReads (); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.1", readIt . getReadId() . toString () ); 
-}
-
-#if SHOW_UNIMPLEMENTED
-FIXTURE_TEST_CASE(CSRA1_ReadIterator_Open_Filtered, CSRA1_Fixture)
-{
-    ngs :: ReadIterator readIt = getReads ( ngs :: Read :: partiallyAligned ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.3", readIt . getReadId() . toString () ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.5", readIt . getReadId() . toString () ); 
-}
-#endif
-
-FIXTURE_TEST_CASE(CSRA1_ReadIterator_Next, CSRA1_Fixture)
-{
-    ngs :: ReadIterator readIt = getReads (); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.2", readIt . getReadId() . toString () ); 
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadIterator_End, CSRA1_Fixture)
-{
-    ngs :: ReadIterator readIt = getReads (); 
-    ngs :: String lastId;
-    while (readIt . nextRead ())
-    {
-        lastId = readIt . getReadId() . toString ();
-    }
-    REQUIRE_EQ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.2280633", lastId ); 
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadIterator_BeyondEnd, CSRA1_Fixture)
-{
-    ngs :: ReadIterator readIt = getReads (); 
-    while (readIt . nextRead ())
-    {
-    }
-    REQUIRE_THROW( readIt . getReadId(); );
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadIterator_Range, CSRA1_Fixture)
-{
-    ngs :: ReadIterator readIt = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getReadRange ( 10, 5 ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.10", readIt . getReadId() . toString () ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.11", readIt . getReadId() . toString () ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.12", readIt . getReadId() . toString () ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.13", readIt . getReadId() . toString () ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.14", readIt . getReadId() . toString () ); 
-    REQUIRE( ! readIt . nextRead () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadIterator_EmptyRange, CSRA1_Fixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly );
-    ngs :: ReadIterator readIt = run . getReadRange ( run . getReadCount() + 1, 5 ); 
-    REQUIRE_THROW ( readIt . getReadId(); );
-    REQUIRE ( ! readIt . nextRead () );
-}
-
-///// Fragment
-//TODO: error cases
-FIXTURE_TEST_CASE(CSRA1_Fragment_NoFragmentBeforeNext, CSRA1_Fixture)
-{
-    ngs :: Read read = getRead ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.1" );
-    REQUIRE_THROW( read . getFragmentId() );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Fragment_Id, CSRA1_Fixture)
-{
-    ngs :: Read read = getRead ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.1" );
-    REQUIRE ( read . nextFragment() );
-    REQUIRE_EQ( ngs :: String ( CSRA1_PrimaryOnly ) + ".FR0.1", read . getFragmentId() . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Fragment_getFragmentBases, CSRA1_Fixture)
-{
-    ngs :: String expected("AAGGTATGATACCTGAGATGTTGCGGGATGGTGGGTTTGTGAGGAGATGGCCACGCAGGCAAGGTCTTTTGGAATGGTTCACTGTTGGAGTGAACCCATAT");
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.1", 2 ) . getFragmentBases () . toString () );    
-}
-
-FIXTURE_TEST_CASE(CSRA1_Fragment_getSubFragmentBases_Offset, CSRA1_Fixture)
-{
-    ngs :: String expected("ACTGTTGGAGTGAACCCATAT");
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.1", 2 ) . getFragmentBases ( 80 ) . toString () );    
-}
-
-FIXTURE_TEST_CASE(CSRA1_Fragment_getSubFragmentBases_OffsetLength, CSRA1_Fixture)
-{
-    ngs :: String expected("ACTGTT");
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.1", 2 ) . getFragmentBases ( 80, 6 ) . toString () );    
-}
-
-FIXTURE_TEST_CASE(CSRA1_Fragment_getFragmentQualities, CSRA1_Fixture)
-{
-    ngs :: String expected("@@@DDADDFFHGHIIDHFFHDEFEHIIGHIIDGGGFHIJIGAGHAH=;DGEGEEEDDDB<ABBD;ACDDDCBCCCDD at CCDDDCDCDBDD@ACC>A@?>C3");
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.1", 2 ) . getFragmentQualities () . toString () );    
-}
-
-FIXTURE_TEST_CASE(CSRA1_Fragment_getSubFragmentQualities_Offset, CSRA1_Fixture)
-{
-    ngs :: String expected("DDDCDCDBDD at ACC>A@?>C3");
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.1", 2 ) . getFragmentQualities ( 80 ) . toString () );    
-}
-
-FIXTURE_TEST_CASE(CSRA1_Fragment_getSubFragmentQualities_OffsetLength, CSRA1_Fixture)
-{
-    ngs :: String expected("DDDCDC");
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.1", 2 ) . getFragmentQualities ( 80, 6 ) . toString () );    
-}
-
-FIXTURE_TEST_CASE(CSRA1_Fragment_isPaired_MultiFragmentsPerAlignedSpot, CSRA1_Fixture)
-{
-    ngs :: Read read = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getRead ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.1" );
-    read.nextFragment();
-    REQUIRE_EQ( true, read.isPaired() );
-    read.nextFragment();
-    REQUIRE_EQ( true, read.isPaired() );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Fragment_isPaired_MultiFragmentsPerPartiallyAlignedSpot, CSRA1_Fixture)
-{
-    ngs :: Read read = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getRead ( ngs :: String ( CSRA1_PrimaryOnly ) + ".R.3" );
-    read.nextFragment();
-    REQUIRE_EQ( true, read.isPaired() );
-    read.nextFragment();
-    REQUIRE_EQ( true, read.isPaired() );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Fragment_isPaired_SingleFragmentPerSpot, CSRA1_Fixture)
-{
-    ngs :: Read read = ncbi :: NGS :: openReadCollection ( CSRA1_SingleFragmentPerSpot ) . getRead ( ngs :: String ( CSRA1_SingleFragmentPerSpot ) + ".R.1" );
-    read.nextFragment();
-    REQUIRE_EQ( false, read.isPaired() );
-}
-
-//TODO: getFragmentQualities on an accession with QUALITY column of type phred_33 (and phred_64, if there can be one)
-
-///// Reference
-//TODO: getAlignmentSlice
-//TODO: getPileups
-//TODO: getPileupRange
-//TODO: error cases
-FIXTURE_TEST_CASE(CSRA1_Reference_CommonName, CSRA1_Fixture)
-{   // SRR1199225 
-    const char* name = "supercont2.1"; 
-    REQUIRE_EQ( ngs :: String ( name ), getReference ( name ). getCommonName () );    
-}
-FIXTURE_TEST_CASE(CSRA1_Reference_CanonicalName, CSRA1_Fixture)
-{
-    const char* name = "chr7"; 
-    const char* canoName = "NC_000007.13"; 
-    REQUIRE_EQ( ngs :: String ( canoName ), ncbi :: NGS :: openReadCollection ( "SRR821492" ) . getReference ( name ). getCanonicalName () );    
-}
-
-FIXTURE_TEST_CASE(CSRA1_Reference_IsCircular_No, CSRA1_Fixture)
-{
-    REQUIRE( ! getReference ( "supercont2.1" ). getIsCircular () );    
-}
-FIXTURE_TEST_CASE(CSRA1_Reference_IsCircular_Yes, CSRA1_Fixture)
-{
-    REQUIRE( ncbi :: NGS :: openReadCollection ( "SRR821492" ) . getReference ( "chrM" ) . getIsCircular () );    
-}
-
-static uint64_t CSRA1_ReferenceLength = (uint64_t)2291499l;
-FIXTURE_TEST_CASE(CSRA1_Reference_GetLength, CSRA1_Fixture)
-{
-    REQUIRE_EQ( CSRA1_ReferenceLength, getReference ( "supercont2.1" ). getLength () );
-}
-
-
-static uint64_t CSRA1_ReferenceLength_VDB_2832 = (uint64_t)49711204;
-FIXTURE_TEST_CASE(CSRA1_Reference_GetLength_VDB_2832, CSRA1_Fixture)
-{
-    REQUIRE_EQ( CSRA1_ReferenceLength_VDB_2832, ncbi :: NGS :: openReadCollection ( "SRR2073063" ) . getReference ( "NC_016101.1" ). getLength () );
-    REQUIRE_EQ( CSRA1_ReferenceLength_VDB_2832, ncbi :: NGS :: openReadCollection ( "SRR2073063" ) . getReference ( "Gm14" ). getLength () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Reference_GetReferenceBases_All, CSRA1_Fixture)
-{
-    ngs :: String str = getReference ( "supercont2.1" ). getReferenceBases ( 0 );    
-    REQUIRE_EQ( (size_t)CSRA1_ReferenceLength, str . size () );
-    REQUIRE_EQ( string("GAATTCT"), str . substr (0, 7) );
-    REQUIRE_EQ( string("ATCTG"), str . substr (str.size() - 5, 5) );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Reference_GetReferenceBases_Offset_1, CSRA1_Fixture)
-{   // offset points into the first chunk of the reference
-    ngs :: String str = getReference ( "supercont2.1" ). getReferenceBases ( 1000 );    
-    REQUIRE_EQ( CSRA1_ReferenceLength - 1000, (uint64_t) str . size () );
-    REQUIRE_EQ( string("TCCATTC"), str . substr (0, 7) );
-    REQUIRE_EQ( string("ATCTG"), str . substr (str.size() - 5, 5) );
-}
-FIXTURE_TEST_CASE(CSRA1_Reference_GetReferenceBases_Offset_2, CSRA1_Fixture)
-{   // offset points into the second chunk of the reference
-    ngs :: String str = getReference ( "supercont2.1" ). getReferenceBases ( 7000 );    
-    REQUIRE_EQ( CSRA1_ReferenceLength - 7000, (uint64_t) str . size () );
-    REQUIRE_EQ( string("CCTGTCC"), str . substr (0, 7) );
-    REQUIRE_EQ( string("ATCTG"), str . substr (str.size() - 5, 5) );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Reference_GetReferenceBases_OffsetLength_1, CSRA1_Fixture)
-{   // offset points into the first chunk of the reference
-    ngs :: String str = getReference ( "supercont2.1" ). getReferenceBases ( 2000, 10 );    
-    REQUIRE_EQ( ngs::String ( "GGGCAAATGA" ), str );
-}
-FIXTURE_TEST_CASE(CSRA1_Reference_GetReferenceBases_OffsetLength_2, CSRA1_Fixture)
-{   // offset points into the second chunk of the reference
-    ngs :: Reference ref = getReference ( "supercont2.1" );
-    ngs :: String str = ref . getReferenceBases ( 9000, 10 );    
-    REQUIRE_EQ( ngs::String ( "GCGCTATGAC" ), str );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Reference_GetReferenceChunk_All, CSRA1_Fixture)
-{
-    ngs :: Reference ref = getReference ( "supercont2.1" );
-    ngs :: StringRef str = ref . getReferenceChunk ( 0 );    
-    REQUIRE_EQ( (size_t)5000, str . size () );
-    REQUIRE_EQ( string("GAATTCT"), str . substr (0, 7) . toString () );
-    REQUIRE_EQ( string("CTAGG"), str . substr (str.size() - 5, 5) . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Reference_GetReferenceChunk_Offset_1, CSRA1_Fixture)
-{   // offset points into the first chunk of the reference
-    ngs :: Reference ref = getReference ( "supercont2.1" );
-    ngs :: StringRef str = ref . getReferenceChunk ( 1000 );    
-    REQUIRE_EQ( (size_t)4000, str . size () );
-    REQUIRE_EQ( string("TCCATTC"), str . substr (0, 7) . toString () );
-    REQUIRE_EQ( string("CTAGG"), str . substr (str.size() - 5, 5) . toString () );
-}
-FIXTURE_TEST_CASE(CSRA1_Reference_GetReferenceChunk_Offset_2, CSRA1_Fixture)
-{   // offset points into the second chunk of the reference
-    ngs :: Reference ref = getReference ( "supercont2.1" );
-    ngs :: StringRef str = ref . getReferenceChunk ( 7000 );    
-    REQUIRE_EQ( (size_t)3000, str . size () );
-    REQUIRE_EQ( string("CCTGTCC"), str . substr (0, 7) . toString () );
-    REQUIRE_EQ( string("AATCT"), str . substr (str.size() - 5, 5) . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Reference_GetReferenceChunk_OffsetLength_1, CSRA1_Fixture)
-{   // offset points into the first chunk of the reference
-    ngs :: Reference ref = getReference ( "supercont2.1" );
-    REQUIRE_EQ( ngs::String ( "GGGCAAATGA" ), ref . getReferenceChunk ( 2000, 10 ) . toString ());
-}
-FIXTURE_TEST_CASE(CSRA1_Reference_GetReferenceChunk_OffsetLength_2, CSRA1_Fixture)
-{   // offset points into the second chunk of the reference
-    ngs :: Reference ref = getReference ( "supercont2.1" );
-    REQUIRE_EQ( ngs::String ( "GCGCTATGAC" ), ref . getReferenceChunk ( 9000, 10 ) . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Reference_GetAlignment, CSRA1_Fixture)
-{
-    ngs :: Alignment al = getReference ( "supercont2.1" ). getAlignment( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ); 
-    REQUIRE_EQ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1", al . getAlignmentId () . toString () ); 
-}
-
-FIXTURE_TEST_CASE(CSRA1_Reference_GetAlignments, CSRA1_Fixture)
-{
-    ngs :: AlignmentIterator al = getReference ( "supercont2.1" ). getAlignments ( ngs :: Alignment :: all ); 
-}
-
-///// ReferenceIterator
-FIXTURE_TEST_CASE(CSRA1_ReferenceIterator_NoObjectBeforeNextOpen, CSRA1_Fixture)
-{
-    ngs :: ReferenceIterator refIt = getReferences(); 
-    // dereferencing the iterator without calling Next() throws
-    REQUIRE_THROW ( refIt . getCommonName() ); 
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReferenceIterator_Open, CSRA1_Fixture)
-{
-    ngs :: ReferenceIterator refIt = getReferences(); 
-    REQUIRE( refIt . nextReference () );
-    REQUIRE_EQ( string("supercont2.1"), refIt . getCommonName() ); 
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReferenceIterator_Next, CSRA1_Fixture)
-{
-    ngs :: ReferenceIterator refIt = getReferences(); 
-    REQUIRE( refIt . nextReference () );
-    REQUIRE( refIt . nextReference () );
-    REQUIRE_EQ( string("supercont2.2"), refIt . getCommonName() ); 
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReferenceIterator_End, CSRA1_Fixture)
-{
-    ngs :: ReferenceIterator refIt = getReferences(); 
-    string lastName;
-    while (refIt . nextReference ())
-    {
-        lastName = refIt . getCommonName();
-        //cout << " lastName " << refIt . getLength () << endl;
-    }
-    REQUIRE_EQ( string("supercont2.14"), lastName ); 
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReferenceIterator_BeyondEnd, CSRA1_Fixture)
-{
-    ngs :: ReferenceIterator refIt = getReferences(); 
-    while (refIt . nextReference ())
-    {
-    }
-    REQUIRE_THROW ( refIt . getCommonName(); );
-}
-
-///// Alignment
-//TODO: CG's EVIDENCE?
-//TODO: add tests for missing optional columns
-//TODO: getRNAOrientatation__Present
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getAlignmentId, CSRA1_Fixture)
-{
-    REQUIRE_EQ( ngs :: String ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ), 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getAlignmentId() . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getReferenceSpec, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string("supercont2.1"), 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getReferenceSpec () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getMappingQuality, CSRA1_Fixture)
-{
-    REQUIRE_EQ( 60, 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getMappingQuality () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getReferenceBases, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string("ACTCGACATTCTGTCTTCGACCTATCTTTCTCCTCTCCCAGTCATCGCCCAGTAGAATTACCAGGCAATGAACCACGGCCTTTCATCCCAACGGCACAGCA"), 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getReferenceBases () . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getReadGroup, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string("C1ELY.6"), 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getReadGroup () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getReadGroup_Empty, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string(""), 
-                ncbi :: NGS :: openReadCollection ( CSRA1_NoReadGroups ) . getAlignment ( ngs :: String ( CSRA1_NoReadGroups ) + ".PA.1" ) . getReadGroup () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getReadId, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string ( CSRA1_PrimaryOnly ) + ".R.165753", 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.5" ) . getReadId () . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getFragmentId, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string ( CSRA1_PrimaryOnly ) + ".FA0.1", 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getFragmentId () . toString ());
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getFragmentBases, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string("TGGATGCTCTGGAAAATCTGAAAAGTGGTGTTTGTAAGGTTTGCTGGCTGCCCATATACCACATGGATGATGGGGCTTTCCATTTTAATGTTGAAGGAGGA"), 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.4" ) . getFragmentBases () . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getFragmentQualities, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string("######AA>55;5(;63;;3@;A9??;6..73CDCIDA>DCB>@B=;@B?;;ADAB<DD?1*>@C9:EC?2++A3+F4EEB<E>EEIEDC2?C:;AB+==1"), 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.4" ) . getFragmentQualities () . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getClippedFragmentBases, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string("CTTCAACATTAAAATGGAAAGCCCCATCATCCATGTGGTATATGGGCAGCCAGCAAACCTTACAAACACCACTTTTCAGATTTTCCAGAGCATCCA"), 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.4" ) . getClippedFragmentBases () . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getClippedFragmentQualities, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string("#AA>55;5(;63;;3@;A9??;6..73CDCIDA>DCB>@B=;@B?;;ADAB<DD?1*>@C9:EC?2++A3+F4EEB<E>EEIEDC2?C:;AB+==1"), 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.4" ) . getClippedFragmentQualities () . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getAlignedFragmentBases, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string("ATATGGGTTCACTCCAACAGTGAACCATTCCAAAAGACCTTGCCTGCGTGGCCATCTCCTCACAAACCCACCATCCCGCAACATCTCAGGTATCATACCTT"), 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.2" ) . getAlignedFragmentBases () . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getAlignmentCategory, CSRA1_Fixture)
-{
-    REQUIRE_EQ( ngs :: Alignment :: primaryAlignment, 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getAlignmentCategory() );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getAlignmentPosition, CSRA1_Fixture)
-{
-    REQUIRE_EQ( (int64_t)85, //REF_POS
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getAlignmentPosition () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getReferencePositionProjectionRange, CSRA1_Fixture)
-{
-    uint64_t res = ncbi::NGS::openReadCollection ("SRR1597772").getAlignment("SRR1597772.PA.6").getReferencePositionProjectionRange(11601);
-    REQUIRE( res == 1 );
-
-    res = ncbi::NGS::openReadCollection("SRR1597895").getAlignment("SRR1597895.PA.26088399").getReferencePositionProjectionRange(234668879);
-    REQUIRE( res == (uint64_t)-1 ); // out of bounds
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getReferencePositionProjectionRangeI, CSRA1_Fixture)
-{
-    uint64_t res = ncbi::NGS::openReadCollection ("SRR1597772").getAlignment("SRR1597772.PA.6").getReferencePositionProjectionRange(11692);
-    REQUIRE( res == ((uint64_t)84 << 32 | 5) );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getReferencePositionProjectionRangeD, CSRA1_Fixture)
-{
-    uint64_t res = ncbi::NGS::openReadCollection ("SRR1597772").getAlignment("SRR1597772.PA.6").getReferencePositionProjectionRange(11667);
-    REQUIRE( res == ((uint64_t)65 << 32) );
-    res = ncbi::NGS::openReadCollection ("SRR1597772").getAlignment("SRR1597772.PA.6").getReferencePositionProjectionRange(11669);
-    REQUIRE( res == ((uint64_t)65 << 32) );
-    res = ncbi::NGS::openReadCollection ("SRR1597772").getAlignment("SRR1597772.PA.6").getReferencePositionProjectionRange(11672);
-    REQUIRE( res == ((uint64_t)65 << 32) );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getAlignmentLength, CSRA1_Fixture)
-{
-    REQUIRE_EQ( (uint64_t)101, //REF_LEN or length(RAW_READ) 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getAlignmentLength () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getIsReversedOrientation_False, CSRA1_Fixture)
-{
-    REQUIRE( ! ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getIsReversedOrientation () );
-}
-FIXTURE_TEST_CASE(CSRA1_Alignment_getIsReversedOrientation_True, CSRA1_Fixture)
-{
-    REQUIRE( ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.2" ) . getIsReversedOrientation () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getSoftClip_None, CSRA1_Fixture)
-{   
-    REQUIRE_EQ( 0, ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getSoftClip ( ngs :: Alignment :: clipLeft ) );
-    REQUIRE_EQ( 0, ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getSoftClip ( ngs :: Alignment :: clipRight ) );
-}
-FIXTURE_TEST_CASE(CSRA1_Alignment_getSoftClip_Left, CSRA1_Fixture)
-{   
-    REQUIRE_EQ( 5, ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.4" ) . getSoftClip ( ngs :: Alignment :: clipLeft ) );
-    REQUIRE_EQ( 0, ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.4" ) . getSoftClip ( ngs :: Alignment :: clipRight ) );
-}
-FIXTURE_TEST_CASE(CSRA1_Alignment_getSoftClip_Right, CSRA1_Fixture)
-{   
-    REQUIRE_EQ( 0,  ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.10" ) . getSoftClip ( ngs :: Alignment :: clipLeft ) );
-    REQUIRE_EQ( 13, ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.10" ) . getSoftClip ( ngs :: Alignment :: clipRight ) );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getTemplateLength, CSRA1_Fixture)
-{
-    REQUIRE_EQ( (uint64_t)201, 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getTemplateLength () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getShortCigar_Unclipped, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string("5S96M"), 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.4" ) . getShortCigar ( false ) . toString () );
-}
-FIXTURE_TEST_CASE(CSRA1_Alignment_getShortCigar_Clipped, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string("96M"), 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.4" ) . getShortCigar ( true ) . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getLongCigar_Unclipped, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string("5S1X8=1X39=1X46="), 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.4" ) . getLongCigar ( false ) . toString () );
-}
-FIXTURE_TEST_CASE(CSRA1_Alignment_getLongCigar_Clipped, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string("1X8=1X39=1X46="), 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.4" ) . getLongCigar ( true ) . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getRNAOrientation_Missing, CSRA1_Fixture)
-{
-    REQUIRE_EQ( '?', 
-                ncbi :: NGS :: openReadCollection ( CSRA1_NoReadGroups ) . getAlignment ( ngs :: String ( CSRA1_NoReadGroups ) + ".PA.1" ) . getRNAOrientation() );
-}
-
-// Mate alignment
-FIXTURE_TEST_CASE(CSRA1_Alignment_hasMate_Primary_NoMate, CSRA1_Fixture)
-{
-    REQUIRE( ! ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.99" ) . hasMate () );
-}
-FIXTURE_TEST_CASE(CSRA1_Alignment_hasMate_Primary_YesMate, CSRA1_Fixture)
-{
-    REQUIRE( ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . hasMate () );
-}
-FIXTURE_TEST_CASE(CSRA1_Alignment_hasMate_Secondary, CSRA1_Fixture)
-{
-    REQUIRE( ! ncbi :: NGS :: openReadCollection ( CSRA1_WithSecondary ) . getAlignment ( ngs :: String ( CSRA1_WithSecondary ) + ".SA.169" ) . hasMate () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getMateAlignmentId_Primary, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string ( CSRA1_PrimaryOnly ) + ".PA.2", 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getMateAlignmentId () . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getMateAlignmentId_Missing, CSRA1_Fixture)
-{
-    REQUIRE_THROW ( ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.99" ) . getMateAlignmentId (); );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getMateAlignmentId_SecondaryThrows, CSRA1_Fixture)
-{
-    REQUIRE_THROW( ncbi :: NGS :: openReadCollection ( CSRA1_WithSecondary ) . getAlignment ( ngs :: String ( CSRA1_WithSecondary ) + ".SA.172" ) . getMateAlignmentId (); );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getMateAlignment, CSRA1_Fixture)
-{
-    ngs :: Alignment al = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getMateAlignment ();
-    REQUIRE_EQ ( string ( CSRA1_PrimaryOnly ) + ".PA.2", al . getAlignmentId () . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getMateAlignment_Missing, CSRA1_Fixture)
-{
-    REQUIRE_THROW ( ngs :: Alignment al = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( "99" ) . getMateAlignment (); );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getMateAlignment_SecondaryThrows, CSRA1_Fixture)
-{
-    REQUIRE_THROW( ncbi :: NGS :: openReadCollection ( CSRA1_WithSecondary ) . getAlignment ( ngs :: String ( CSRA1_WithSecondary ) + ".SA.169" ) . getMateAlignment (); );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getMateReferenceSpec, CSRA1_Fixture)
-{
-    REQUIRE_EQ( string("supercont2.1"), 
-                ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getMateReferenceSpec () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_getMateIsReversedOrientation_True, CSRA1_Fixture)
-{
-    REQUIRE( ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" ) . getMateIsReversedOrientation () );
-}
-FIXTURE_TEST_CASE(CSRA1_Alignment_getMateIsReversedOrientation_False, CSRA1_Fixture)
-{
-    REQUIRE( ! ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.2" ) . getMateIsReversedOrientation () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_isPaired_MultiFragmentsPerSpot, CSRA1_Fixture)
-{
-    ngs :: ReadCollection readCollection = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly );
-    ngs :: Alignment alignment = readCollection . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.1" );
-    REQUIRE_EQ( true, alignment.isPaired() );
-
-    alignment = readCollection . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.2" );
-    REQUIRE_EQ( true, alignment.isPaired() );
-    
-    // has unaligned mate
-    alignment = readCollection . getAlignment ( ngs :: String ( CSRA1_PrimaryOnly ) + ".PA.6" );
-    REQUIRE_EQ( true, alignment.isPaired() );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Alignment_isPaired_SingleFragmentPerSpot, CSRA1_Fixture)
-{
-    ngs :: ReadCollection readCollection = ncbi :: NGS :: openReadCollection ( CSRA1_SingleFragmentPerSpot );
-    ngs :: Alignment alignment = readCollection . getAlignment ( ngs :: String ( CSRA1_SingleFragmentPerSpot ) + ".PA.1" );
-    REQUIRE_EQ( false, alignment.isPaired() );
-}
-
-
-///// AlignmentIterator from ReadCollection
-//TODO: CG's EVIDENCE?
-
-FIXTURE_TEST_CASE(CSRA1_AlignmentIterator_NoAlignmentBeforeNext, CSRA1_Fixture)
-{
-    ngs :: AlignmentIterator it = getAlignments (); 
-    REQUIRE_THROW( it . getAlignmentId () ); 
-}
-
-FIXTURE_TEST_CASE(CSRA1_AlignmentIterator_PrimaryOnOpen, CSRA1_Fixture)
-{
-    ngs :: AlignmentIterator it = getAlignments (); 
-    REQUIRE( it . nextAlignment () );
-    REQUIRE_EQ( ngs :: String ( CSRA1_WithSecondary ) + ".PA.1", it . getAlignmentId () . toString () ); 
-}
-
-FIXTURE_TEST_CASE(CSRA1_AlignmentIterator_Next, CSRA1_Fixture)
-{
-    ngs :: AlignmentIterator it = getAlignments (); 
-    REQUIRE( it . nextAlignment () );
-    REQUIRE( it . nextAlignment () );
-    REQUIRE_EQ( ngs :: String ( CSRA1_WithSecondary ) + ".PA.2", it . getAlignmentId () . toString () ); 
-}
-
-FIXTURE_TEST_CASE(CSRA1_AlignmentIterator_Next_Switch_To_Secondary, CSRA1_Fixture)
-{
-    ngs :: AlignmentIterator it = ncbi :: NGS :: openReadCollection ( CSRA1_WithSecondary ) . getAlignmentRange ( 168, 2, ngs :: Alignment :: all );
-    REQUIRE( it . nextAlignment () );
-    REQUIRE_EQ( ngs :: String ( CSRA1_WithSecondary ) + ".PA.168", it . getAlignmentId () . toString () );
-    REQUIRE( it . nextAlignment () );
-    REQUIRE_EQ( ngs :: String ( CSRA1_WithSecondary ) + ".SA.169", it . getAlignmentId () . toString () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_AlignmentIterator_BeyondEnd, CSRA1_Fixture)
-{
-    ngs :: AlignmentIterator it = getAlignments (); 
-    while ( it . nextAlignment() )
-    {
-    }
-    REQUIRE_THROW ( it . getAlignmentId (); ); 
-}
-
-FIXTURE_TEST_CASE(CSRA1_AlignmentIterator_Empty, CSRA1_Fixture)
-{
-    // the next line should not throw
-    ngs :: AlignmentIterator it = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getAlignments ( ngs :: Alignment :: secondaryAlignment ); 
-    REQUIRE_THROW ( it . getAlignmentId(); );
-}
-
-FIXTURE_TEST_CASE(CSRA1_AlignmentIterator_Primary, CSRA1_Fixture)
-{
-    ngs :: AlignmentIterator it = getAlignments ( ngs :: Alignment :: primaryAlignment );
-    REQUIRE( it . nextAlignment() );
-    size_t count = 1;
-    while ( it . nextAlignment() )
-    {
-        REQUIRE_EQ( ngs :: Alignment :: primaryAlignment, it . getAlignmentCategory() );
-        ++count;
-        ostringstream str;
-        str << CSRA1_WithSecondary << ".PA." << count;
-        REQUIRE_EQ( str . str (), it . getAlignmentId() . toString () );
-    }
-    REQUIRE_EQ( (size_t)168, count);
-}
-
-FIXTURE_TEST_CASE(CSRA1_AlignmentIterator_Secondary, CSRA1_Fixture)
-{
-    ngs :: AlignmentIterator it = getAlignments ( ngs :: Alignment :: secondaryAlignment );
-    REQUIRE( it . nextAlignment() );
-    size_t count = 0;
-    while ( it . nextAlignment() )
-    {
-        REQUIRE_EQ( ngs :: Alignment :: secondaryAlignment, it . getAlignmentCategory() );
-        ++count;
-    }
-    REQUIRE_EQ( (size_t)9, count);
-}
-
-FIXTURE_TEST_CASE(CSRA1_AlignmentIterator_All, CSRA1_Fixture)
-{   
-    ngs :: AlignmentIterator it = getAlignments ( ngs :: Alignment :: all );
-    REQUIRE( it . nextAlignment() );
-    size_t count = 1;
-    while ( it . nextAlignment() )
-    {
-        if ( it . getAlignmentCategory()  == ngs :: Alignment :: secondaryAlignment )
-        {
-            break;
-        }
-        ++count;
-    }
-    REQUIRE_EQ( (size_t)168, count);
-    /* switched over to secondary alignments */
-    while ( it . nextAlignment() )
-    {
-        REQUIRE_EQ( ngs :: Alignment :: secondaryAlignment, it . getAlignmentCategory() );
-        ++count;
-    }
-    REQUIRE_EQ( (size_t)177, count);
-}
-
-///// AlignmentIterator from Reference (ReferenceWindow)
-FIXTURE_TEST_CASE(CSRA1_ReferenceWindow, CSRA1_Fixture)
-{
-    ngs :: AlignmentIterator it = NgsFixture :: getReference ( CSRA1_WithSecondary, "gi|169794206|ref|NC_010410.1|" )
-                                                             . getAlignments ( ngs :: Alignment :: all ); 
-    REQUIRE ( it . nextAlignment () );
-    
-    // the first 2 secondary alignments' locations on the list: #34, #61
-    size_t count = 1;
-    while ( it . nextAlignment() )
-    {
-        if ( it . getAlignmentCategory()  == ngs :: Alignment :: secondaryAlignment )
-            break;
-        ++count;
-    }
-    REQUIRE_EQ( (size_t)34, count);
-    while ( it . nextAlignment() )
-    {
-        if ( it . getAlignmentCategory()  == ngs :: Alignment :: secondaryAlignment )
-            break;
-        ++count;
-    }
-    REQUIRE_EQ( (size_t)61, count);
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReferenceWindow_Slice, CSRA1_Fixture)
-{
-    ngs :: AlignmentIterator it = NgsFixture :: getReference ( CSRA1_WithSecondary, "gi|169794206|ref|NC_010410.1|" )
-                                                             . getAlignmentSlice ( 516000, 100000 ); 
-                                                             
-    REQUIRE ( it . nextAlignment () );
-    REQUIRE_EQ ( ngs :: String ( CSRA1_WithSecondary ) + ".PA.33", it. getAlignmentId () . toString () );
-    REQUIRE ( it . nextAlignment () );
-    REQUIRE_EQ ( ngs :: String ( CSRA1_WithSecondary ) + ".PA.34", it. getAlignmentId () . toString () );
-    REQUIRE ( it . nextAlignment () );
-    REQUIRE_EQ ( ngs :: String ( CSRA1_WithSecondary ) + ".SA.169", it. getAlignmentId () . toString () );
-    REQUIRE ( it . nextAlignment () );
-    REQUIRE_EQ ( ngs :: String ( CSRA1_WithSecondary ) + ".PA.35", it. getAlignmentId () . toString () );
-    
-    REQUIRE ( ! it . nextAlignment () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReferenceWindow_Slice_Filtered_Start_Within_Slice, CSRA1_Fixture)
-{
-    ngs :: Reference ref = ncbi :: NGS :: openReadCollection ( CSRA1_WithCircularRef ) . getReference ( "NC_012920.1" );
-    int64_t sliceStart = 1000;
-    ngs :: AlignmentIterator it = ref . getFilteredAlignmentSlice ( sliceStart, 200, ngs :: Alignment :: all, ngs :: Alignment :: startWithinSlice, 0 );
-    
-    REQUIRE ( it . nextAlignment () );
-    REQUIRE_LE ( sliceStart, it.getAlignmentPosition() );
-}
-FIXTURE_TEST_CASE(CSRA1_ReferenceWindow_Slice_Unfiltered_Start_Before_Slice, CSRA1_Fixture)
-{
-    ngs :: Reference ref = ncbi :: NGS :: openReadCollection ( CSRA1_WithCircularRef ) . getReference ( "NC_012920.1" );
-    int64_t sliceStart = 1000;
-    ngs :: AlignmentIterator it = ref . getFilteredAlignmentSlice ( sliceStart, 200, ngs :: Alignment :: all, (ngs::Alignment::AlignmentFilter)0, 0 );
-    
-    REQUIRE ( it . nextAlignment () );
-    REQUIRE_GT ( sliceStart, it.getAlignmentPosition() );
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReferenceWindow_Slice_Filtered_Wraparound, CSRA1_Fixture)
-{
-    ngs :: Reference ref = ncbi :: NGS :: openReadCollection ( CSRA1_WithCircularRef2 ) . getReference ( "chrM" );
-    int64_t sliceStart = 5;
-    ngs :: AlignmentIterator it = ref . getFilteredAlignmentSlice ( sliceStart, 100, ngs :: Alignment :: all, (ngs::Alignment::AlignmentFilter)0, 0 );
-    
-    REQUIRE ( it . nextAlignment () );
-    
-    // the first returned alignment starts before the start of the circular reference, overlaps with slice
-    int64_t pos = it.getAlignmentPosition();
-    REQUIRE_LT ( sliceStart + 100, pos );
-    
-    // check for overlap with the slice
-    uint64_t refLen = ref . getLength();
-    pos -= ( int64_t ) refLen;
-    REQUIRE_GT ( ( int64_t ) 0, pos );
-    REQUIRE_GE ( ( int64_t ) (pos + it . getAlignmentLength()), sliceStart );
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReferenceWindow_Slice_Filtered_Wraparound_StartWithinSlice, CSRA1_Fixture)
-{
-    // when startWithinSlice filter is specified, it removes wraparound alignments as well
-    ngs :: Reference ref = ncbi :: NGS :: openReadCollection ( CSRA1_WithCircularRef2 ) . getReference ( "chrM" );
-    int64_t sliceStart = 5;
-    ngs :: AlignmentIterator it = ref . getFilteredAlignmentSlice ( sliceStart, 100, ngs :: Alignment :: all, ngs :: Alignment :: startWithinSlice, 0 );
-    
-    REQUIRE ( it . nextAlignment () );
-    
-    // the first returned alignment starts inside the slice
-    int64_t pos = it.getAlignmentPosition();
-    REQUIRE_LE ( sliceStart, pos );
-    REQUIRE_LT ( pos, sliceStart + 100 );
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReferenceWindow_Slice_Filtered_NoWraparound, CSRA1_Fixture)
-{
-    // when startWithinSlice filter is specified, it removes wraparound alignments as well
-    ngs :: Reference ref = ncbi :: NGS :: openReadCollection ( CSRA1_WithCircularRef2 ) . getReference ( "chrM" );
-    int64_t sliceStart = 5;
-    ngs :: AlignmentIterator it = ref . getFilteredAlignmentSlice ( sliceStart, 100, ngs :: Alignment :: all, ngs :: Alignment :: noWraparound, 0 );
-    
-    REQUIRE ( it . nextAlignment () );
-    
-    // the first returned sliceStart starts outside the slice but does not wrap around
-    REQUIRE_GT ( sliceStart, it.getAlignmentPosition() );
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReferenceWindow_Slice_Filtered_NoWraparound_StartWithinSlice, CSRA1_Fixture)
-{
-    // when startWithinSlice filter is specified, it removes wraparound alignments as well
-    ngs :: Reference ref = ncbi :: NGS :: openReadCollection ( CSRA1_WithCircularRef2 ) . getReference ( "chrM" );
-    int64_t sliceStart = 5;
-    ngs :: AlignmentIterator it = ref . getFilteredAlignmentSlice ( sliceStart, 100, ngs :: Alignment :: all, (ngs::Alignment::AlignmentFilter) (ngs :: Alignment :: noWraparound | ngs :: Alignment :: startWithinSlice), 0 );
-    
-    REQUIRE ( it . nextAlignment () );
-    
-    // the first returned alignment starts inside the slice
-    int64_t pos = it.getAlignmentPosition();
-    REQUIRE_LE ( sliceStart, pos );
-    REQUIRE_LT ( pos, sliceStart + 100 );
-}
-
-FIXTURE_TEST_CASE(CSRA1_Filter_SEQ_SPOT_ID_0, CSRA1_Fixture)
-{
-    // we should filter out secondary alignments with SEQ_SPOT_ID == 0
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( "seq_spot_id_0.sra" );
-    ngs :: Reference reference = run . getReference ( "NC_016088.2" );
-
-    ngs :: AlignmentIterator alignmentIterator = run.getAlignmentRange ( 145, 2, ngs :: Alignment :: all );
-
-    REQUIRE ( alignmentIterator.nextAlignment() );
-    REQUIRE_EQ ( ngs :: String ( "seq_spot_id_0.PA.145" ), alignmentIterator . getAlignmentId() . toString () );
-    REQUIRE ( !alignmentIterator.nextAlignment() );
-
-    alignmentIterator = reference . getFilteredAlignmentSlice ( 29446335, 10, ngs :: Alignment :: all, ngs :: Alignment :: startWithinSlice, 0 );
-    REQUIRE ( !alignmentIterator.nextAlignment() );
-
-    REQUIRE_THROW ( run . getAlignment ( "seq_spot_id_0.SA.146" ) );
-    REQUIRE_THROW ( reference . getAlignment ( "seq_spot_id_0.SA.146" ) );
-}
-
-/////TODO: Pileup
-//TODO: getReferenceSpec
-//TODO: getReferencePosition
-//TODO: getPileupEvents
-//TODO: getPileupDepth
-
-/////TODO: PileupIterator
-
-/////TODO: PileupEvent
-//TODO: getReferenceSpec
-//TODO: getReferencePosition
-//TODO: getMappingQuality
-//TODO: getAlignmentId
-//TODO: getAlignment
-//TODO: getAlignmentPosition
-//TODO: getFirstAlignmentPosition
-//TODO: getLastAlignmentPosition
-//TODO: getEventType
-//TODO: getAlignmentBase
-//TODO: getAlignmentQuality
-//TODO: getInsertionBases
-//TODO: getInsertionQualities
-//TODO: getDeletionCount
-
-/////TODO: PileupEventIterator
-
-///// ReadGroup
-FIXTURE_TEST_CASE(CSRA1_ReadGroup_GetName, CSRA1_Fixture)
-{
-    ngs :: ReadGroup rg = ncbi :: NGS :: openReadCollection ( CSRA1_PrimaryOnly ) . getReadGroup ( "C1ELY.6" );
-    REQUIRE_EQ ( ngs :: String("C1ELY.6"), rg . getName () );
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadGroup_HasReadGroup, CSRA1_Fixture)
-{
-    REQUIRE ( ncbi::NGS::openReadCollection( CSRA1_PrimaryOnly ).hasReadGroup( "C1ELY.6" ) );
-    REQUIRE ( ! ncbi::NGS::openReadCollection( CSRA1_PrimaryOnly ).hasReadGroup( "non-existent read group" ) );
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadGroup_GetStatistics, CSRA1_Fixture)
-{
-    ngs :: ReadGroup rg = ncbi :: NGS :: openReadCollection ( CSRA1_WithGroups ) . getReadGroup ( "GS57510-FS3-L03" );
-    ngs :: Statistics stats = rg . getStatistics ();
-    
-    REQUIRE_EQ ( (uint64_t)34164461870, stats . getAsU64 ( "BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)34164461870, stats . getAsU64 ( "BIO_BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)488063741,   stats . getAsU64 ( "SPOT_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)5368875807,  stats . getAsU64 ( "SPOT_MAX" ) );
-    REQUIRE_EQ ( (uint64_t)4880812067,  stats . getAsU64 ( "SPOT_MIN" ) );
-}
-
-/////TODO: ReadGroupIterator
-FIXTURE_TEST_CASE(CSRA1_ReadGroupIterator_AfterNext, CSRA1_Fixture)
-{   
-    ngs :: ReadGroupIterator rg = ncbi :: NGS :: openReadCollection ( "ERR730927" ) . getReadGroups ();
-    REQUIRE ( rg . nextReadGroup () );
-    REQUIRE_EQ ( string ( "1#72" ),  rg . getName () );
-}
-
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-ngs_csra1-c++";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=NgsCsra1CppTestSuite(argc, argv);
-    return rc;
-}
-
-}
-
diff --git a/test/ngs-c++/Makefile b/test/ngs-c++/Makefile
deleted file mode 100644
index 122da2f..0000000
--- a/test/ngs-c++/Makefile
+++ /dev/null
@@ -1,127 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-
-MODULE = test/ngs-c++
-
-TEST_TOOLS = \
-    test-ngs_sra-c++ \
-    test-ngs_sradb-c++ \
-    test-ngs_csra1-c++ \
-	test-ngs_csra1pileup-c++ \
-
-
-include $(TOP)/build/Makefile.env
-
-ifeq (,$(NGS_LIBDIR))
-
-$(TEST_TOOLS):
-	@true 
-	
-runtests:
-	@ echo "NGS C++ tests are not run since NGS library does not appear to be installed"
-
-else
-
-
-# make sure runs are not cached in the user repository when running tests
-ifeq ($(wildcard ../../../asm-trace),)
-	ifeq (,$(VDB_CONFIG))
-		VDB_CONFIG = $(shell pwd)/../only-remote-repository.kfg
-	endif
-endif
-
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: $(TEST_TOOLS) 
-
-clean: stdclean
-
-#-------------------------------------------------------------------------------
-# common defs 
-#
-INCDIRS += -I$(NGS_INCDIR)
-
-TEST_NGS_CPP_LIB = \
-	-sncbi-ngs-c++ \
-	-sncbi-vdb \
-	-skapp \
-    -sktst \
-    -L$(NGS_LIBDIR) \
-	-sngs-c++ \
-
-#-------------------------------------------------------------------------------
-# test-ngs_sra-c++
-#
-TEST_NGS_SRA_CPP_SRC = \
-	SRAtest
-
-TEST_NGS_SRA_CPP_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_NGS_SRA_CPP_SRC))
-
-$(TEST_BINDIR)/test-ngs_sra-c++: $(TEST_NGS_SRA_CPP_OBJ) 
-	$(LP) --exe -o $@ $^ $(TEST_NGS_CPP_LIB)
-
-#-------------------------------------------------------------------------------
-# test-ngs_sradb-c++
-#
-TEST_NGS_SRADB_CPP_SRC = \
-	SRADBtest
-
-TEST_NGS_SRADB_CPP_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_NGS_SRADB_CPP_SRC))
-
-$(TEST_BINDIR)/test-ngs_sradb-c++: $(TEST_NGS_SRADB_CPP_OBJ) 
-	$(LP) --exe -o $@ $^ $(TEST_NGS_CPP_LIB)
-
-#-------------------------------------------------------------------------------
-# test-ngs_csra1-c++
-#
-TEST_NGS_CSRA1_CPP_SRC = \
-	CSRA1test
-
-TEST_NGS_CSRA1_CPP_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_NGS_CSRA1_CPP_SRC))
-
-$(TEST_BINDIR)/test-ngs_csra1-c++: $(TEST_NGS_CSRA1_CPP_OBJ) 
-	$(LP) --exe -o $@ $^ $(TEST_NGS_CPP_LIB)
-
-#-------------------------------------------------------------------------------
-# test-ngs_csra1pileup-c++
-#
-TEST_NGS_CSRA1PILEUP_CPP_SRC = \
-	CSRA1PileupTest
-
-TEST_NGS_CSRA1PILEUP_CPP_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_NGS_CSRA1PILEUP_CPP_SRC))
-
-$(TEST_BINDIR)/test-ngs_csra1pileup-c++: $(TEST_NGS_CSRA1PILEUP_CPP_OBJ) 
-	$(LP) --exe -o $@ $^ $(TEST_NGS_CPP_LIB)
-
-endif
diff --git a/test/ngs-c++/NGStest.cpp b/test/ngs-c++/NGStest.cpp
deleted file mode 100644
index 40aa964..0000000
--- a/test/ngs-c++/NGStest.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for NGS interface
-*/
-
-#include <ngs/StringRef.hpp>
-
-#include <ktst/unit_test.hpp>
-
-using namespace std;
-using namespace ncbi::NK;
-
-TEST_SUITE(NgsCppTestSuite);
-
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-ngs-c++";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t rc=NgsCppTestSuite(argc, argv);
-    return rc;
-}
-
-}
-
-
diff --git a/test/ngs-c++/SRADBtest.cpp b/test/ngs-c++/SRADBtest.cpp
deleted file mode 100644
index 49a00e4..0000000
--- a/test/ngs-c++/SRADBtest.cpp
+++ /dev/null
@@ -1,536 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for NGS interface, SRA DB based implementation
-*/
-
-#include "ngsfixture.hpp"
-
-#include <ngs/Statistics.hpp>
-
-#include <klib/text.h>
-
-using namespace std;
-using namespace ncbi::NK;
-
-TEST_SUITE(NgsSradbCppTestSuite);
-
-class SRADBFixture : public NgsFixture
-{
-public:
-    static const char* SRADB_Accession;
-    
-public:
-    SRADBFixture()
-    {
-    }
-    ~SRADBFixture()
-    {
-    }
-
-    ngs :: ReadIterator getReads ( ngs :: Read :: ReadCategory cat = ngs :: Read :: all )
-    {
-        return NgsFixture :: getReads ( SRADB_Accession, cat ); 
-    }
-    ngs :: Read getRead ( const ngs :: String& p_id)
-    {
-        return NgsFixture :: getRead ( SRADB_Accession, p_id ); 
-    }
-    ngs :: Read getFragment (const ngs :: String& p_readId, uint32_t p_fragIdx)
-    {
-        return NgsFixture :: getFragment ( SRADB_Accession, p_readId, p_fragIdx );
-    }
-    ngs :: Reference getReference ( const char* spec )
-    {
-        return NgsFixture :: getReference ( SRADB_Accession, spec ); 
-    }
-};
-const char* SRADBFixture::SRADB_Accession = "SRR600096";
-
-///// ReadCollection
-//TODO: getReadRange (categories)
-//TODO: getReadCount (categories)
-//TODO: getReadGroups
-//TODO: error cases
-
-
-TEST_CASE (SRADB_ReadCollection_GetName)
-{
-    ngs::String name1, name2;
-    {
-        ngs::ReadCollection run = ncbi::NGS::openReadCollection ("./SRR600096");
-        name1 = run.getName();
-        char const* pNoSlash = string_rchr( name1.c_str(), name1.length(), '/' );
-        REQUIRE ( pNoSlash == NULL );
-    }
-    {
-        ngs::ReadCollection run = ncbi::NGS::openReadCollection ("SRR600096");
-        name2 = run.getName();
-    }
-    REQUIRE_EQ ( name1, name2 );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_Open, SRADBFixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( SRADB_Accession );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_Open_Failed, SRADBFixture)
-{
-    REQUIRE_THROW ( ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( string(SRADB_Accession) + "_BS" ) );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetReads, SRADBFixture)
-{
-    ngs :: ReadIterator readIt = ncbi :: NGS :: openReadCollection ( SRADB_Accession ) . getReads ( ngs :: Read :: all ); 
-} 
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetReads_Filtered, SRADBFixture)
-{
-    ngs :: ReadIterator readIt = ncbi :: NGS :: openReadCollection ( SRADB_Accession ) . getReads ( ngs :: Read :: unaligned ); 
-} 
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetReadRange, SRADBFixture)
-{
-    ngs :: ReadIterator readIt = ncbi :: NGS :: openReadCollection ( SRADB_Accession ) . getReadRange ( 100, 200 ); 
-} 
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetRead, SRADBFixture)
-{
-    ngs :: Read read = getRead ( ngs :: String ( SRADB_Accession ) + ".R.1" ); 
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetRead_Failed, SRADBFixture)
-{
-    REQUIRE_THROW ( ngs :: Read read = ncbi :: NGS :: openReadCollection ( SRADB_Accession ) . getRead ( "notthere" ) );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetReference_Failed, SRADBFixture)
-{
-    REQUIRE_THROW ( ngs :: Reference ref = getReference ( "anything" ) );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_ReadCount, SRADBFixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( SRADB_Accession );
-    REQUIRE_EQ( (uint64_t)16, run . getReadCount() ); 
-}    
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_Getreferences, SRADBFixture)
-{
-    ngs :: ReferenceIterator refIt = NgsFixture :: getReferences ( SRADB_Accession );  // always an empty iterator
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetAlignment, SRADBFixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( SRADB_Accession );
-    REQUIRE_THROW ( ngs :: Alignment align = run . getAlignment ( "1" ) );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetAlignmentCount, SRADBFixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( SRADB_Accession );
-    REQUIRE_EQ( (uint64_t)0, run . getAlignmentCount() );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetAlignmentCountFiltered, SRADBFixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( SRADB_Accession );
-    REQUIRE_EQ( (uint64_t)0, run . getAlignmentCount( ngs :: Alignment :: all ) );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetAlignmentRange, SRADBFixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( SRADB_Accession );
-    REQUIRE ( ! run . getAlignmentRange ( 1, 2 ) . nextAlignment () );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetAlignmentRangeFiltered, SRADBFixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( SRADB_Accession );
-    REQUIRE ( ! run . getAlignmentRange ( 1, 2, ngs :: Alignment :: all ) . nextAlignment () );
-}
-
-///// Read
-//TODO: error cases
-
-FIXTURE_TEST_CASE(SRADB_Read_ReadId, SRADBFixture)
-{
-    REQUIRE_EQ( ngs :: String ( SRADB_Accession ) + ".R.1", getRead ( ngs :: String ( SRADB_Accession ) + ".R.1" ) . getReadId() . toString () ); 
-}
-
-FIXTURE_TEST_CASE(SRADB_Read_ReadName, SRADBFixture)
-{
-    REQUIRE_EQ( string ( "1" ), getRead ( ngs :: String ( SRADB_Accession ) + ".R.1" ) . getReadName() . toString() );
-}
-
-FIXTURE_TEST_CASE(SRADB_Read_ReadGroup, SRADBFixture)
-{
-    REQUIRE_EQ( ngs :: String("A1DLC.1"), getRead ( ngs :: String ( SRADB_Accession ) + ".R.1" ). getReadGroup() );
-}
-
-FIXTURE_TEST_CASE(SRADB_Read_getNumFragments, SRADBFixture)
-{
-    REQUIRE_EQ( ( uint32_t ) 2, getRead ( ngs :: String ( SRADB_Accession ) + ".R.1" ) . getNumFragments() ); 
-}
-
-FIXTURE_TEST_CASE(SRADB_Read_ReadCategory, SRADBFixture)
-{
-    REQUIRE_EQ( ngs :: Read :: unaligned, getRead ( ngs :: String ( SRADB_Accession ) + ".R.1" ). getReadCategory() );
-}
-
-FIXTURE_TEST_CASE(SRADB_Read_getReadBases, SRADBFixture)
-{
-    ngs :: String bases = getRead ( ngs :: String ( SRADB_Accession ) + ".R.1" ) . getReadBases () . toString (); 
-    ngs :: String expected(
-        "TACGGAGGGGGCTAGCGTTGCTCGGAATTACTGGGCGTAAAGGGCGCGTAGGCGGACAGTTAAGTCGGGGGTGAAAGCCCCGGGCTCAACCTCGGAATTG"
-        "CCTTCGATACTGGCTGGCTTGAGTACGGTAGAGGGGGGTGGAACTCCTAGTGTAGAGGTGAAATTCGTAGAGATTCCTGTTTGCTCCCCACGCTTTCGCG"
-        "CCTCAGCGTCAGTAACGGTCCAGTGTGTCGCCTTCGCCACTGGTACTCTTCCTGCTATCTACGCATCTCATTCTACACACGTCGCGCGCCACACCTCTCT"
-        "AACACACGTGACACAGCCACTCTCTGCCGTTACTTCGCTGCTCTGCCGCC"
-    );
-    REQUIRE_EQ( expected, bases );    
-}
-
-FIXTURE_TEST_CASE(SRADB_Read_getSubReadBases_Offset, SRADBFixture)
-{
-    ngs :: String bases = getRead ( ngs :: String ( SRADB_Accession ) + ".R.1" ) . getReadBases ( 300 ) . toString( ); 
-    ngs :: String expected("AACACACGTGACACAGCCACTCTCTGCCGTTACTTCGCTGCTCTGCCGCC");
-    REQUIRE_EQ( expected, bases );    
-}
-
-FIXTURE_TEST_CASE(SRADB_Read_getSubReadBases_OffsetLength, SRADBFixture)
-{
-    ngs :: String bases = getRead ( ngs :: String ( SRADB_Accession ) + ".R.1" ) . getReadBases ( 300, 6 ) . toString (); 
-    ngs :: String expected("AACACA");
-    REQUIRE_EQ( expected, bases );    
-}
-
-FIXTURE_TEST_CASE(SRADB_Read_getReadQualities, SRADBFixture)
-{
-    ngs :: String quals = getRead ( ngs :: String ( SRADB_Accession ) + ".R.1" ) . getReadQualities() . toString (); 
-    ngs :: String expected(
-        "====,<==@7<@<@@@CEE=CCEECCEEEEFFFFEECCCEEF=EEDDCCDCEEDDDDDEEEEDDEE*=))9;;=EE(;?E(4;<<;<<EEEE;--'9<;?"
-        "EEE=;E=EE<E=EE<9(9EE;(6<?E#################################################?????BBBBDDDDDBBDEEFFFEE7"
-        "CHH58E=EECCEG///75,5CF-5A5-5C at FEEDFDEE:E--55----5,@@@,,5,5@=?7?#####################################"
-        "##################################################"
-    );
-    REQUIRE_EQ( expected, quals );    
-}
-
-FIXTURE_TEST_CASE(SRADB_Read_getSubReadQualities_Offset, SRADBFixture)
-{
-    ngs :: String quals = getRead ( ngs :: String ( SRADB_Accession ) + ".R.1" ) . getReadQualities( 300 ) . toString (); 
-    ngs :: String expected("##################################################");
-    REQUIRE_EQ( expected, quals );    
-}
-
-FIXTURE_TEST_CASE(SRADB_Read_getSubReadQualities_OffsetLength, SRADBFixture)
-{
-    ngs :: String quals = getRead ( ngs :: String ( SRADB_Accession ) + ".R.1" ) . getReadQualities( 200, 10 ) . toString (); 
-    ngs :: String expected("CHH58E=EEC");
-    REQUIRE_EQ( expected, quals );    
-}
-
-///// ReadIterator
-//TODO: read category selection
-//TODO: range on a collection that represents a slice (read[0].id != 1)
-//TODO: range and filtering
-//TODO: empty range 
-//TODO: ReadIterator over a ReadGroup (use a ReadGroup that is not immediately at the beginning of the run)
-//TODO: ReadIterator over a ReadIterator, to allow creation of a sub-iterator
-//TODO: ReadIterator returning less than the range requested
-//TODO: error cases (?)
-FIXTURE_TEST_CASE(SRADB_ReadIterator_NoReadBeforeNext, SRADBFixture)
-{
-    ngs :: ReadIterator readIt = getReads (); 
-    // accessing the read through an iterator before a call to nextRead() throws
-    REQUIRE_THROW ( readIt . getReadId() );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadIterator_Open_All, SRADBFixture)
-{
-    ngs :: ReadIterator readIt = getReads (); 
-    REQUIRE( readIt . nextRead () );
-    
-    REQUIRE_EQ( ngs :: String ( ngs :: String ( SRADB_Accession ) + ".R.1" ), readIt . getReadId() . toString() ); 
-}
-
-#if SHOW_UNIMPLEMENTED
-FIXTURE_TEST_CASE(SRADB_ReadIterator_Open_Filtered, SRADBFixture)
-{
-    ngs :: ReadIterator readIt = getReads ( ngs :: Read :: partiallyAligned ); 
-    REQUIRE( readIt . nextRead () );
-
-    REQUIRE_EQ( ngs :: String ( SRADB_Accession ) + ".R.5", readIt . getReadId() . toString () ); 
-}
-#endif
-
-FIXTURE_TEST_CASE(SRADB_ReadIterator_Next, SRADBFixture)
-{
-    ngs :: ReadIterator readIt = getReads (); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( SRADB_Accession ) + ".R.2", readIt . getReadId() . toString() ); 
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadIterator_End, SRADBFixture)
-{
-    ngs :: ReadIterator readIt = getReads (); 
-    ngs :: String lastId;
-    while (readIt . nextRead ())
-    {
-        lastId = readIt . getReadId() . toString ();
-    }
-    REQUIRE_EQ( ngs :: String ( SRADB_Accession ) + ".R.16", lastId ); 
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadIterator_BeyondEnd, SRADBFixture)
-{
-    ngs :: ReadIterator readIt = getReads (); 
-    while (readIt . nextRead ())
-    {
-    }
-    REQUIRE_THROW ( readIt . getReadId() );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadIterator_Range, SRADBFixture)
-{
-    ngs :: ReadIterator readIt = ncbi :: NGS :: openReadCollection ( SRADB_Accession ) . getReadRange ( 10, 5 ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( SRADB_Accession ) + ".R.10", readIt . getReadId() . toString() ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( SRADB_Accession ) + ".R.11", readIt . getReadId() . toString() ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( SRADB_Accession ) + ".R.12", readIt . getReadId() . toString() ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( SRADB_Accession ) + ".R.13", readIt . getReadId() . toString() ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( SRADB_Accession ) + ".R.14", readIt . getReadId() . toString() ); 
-    REQUIRE( ! readIt . nextRead () );
-}
-
-
-///// Fragment
-//TODO: error cases
-FIXTURE_TEST_CASE(SRADB_Fragment_NoFragmentBeforeNext, SRADBFixture)
-{
-    ngs :: Read read = getRead ( ngs :: String ( SRADB_Accession ) + ".R.1" );
-    REQUIRE_THROW( read . getFragmentId() );
-}
-
-FIXTURE_TEST_CASE(SRADB_Fragment_Id, SRADBFixture)
-{
-    ngs :: Read read = getRead ( ngs :: String ( SRADB_Accession ) + ".R.1" );
-    REQUIRE ( read . nextFragment() );
-    REQUIRE_EQ( ngs :: String ( SRADB_Accession ) + ".FR0.1",  read . getFragmentId() . toString () );
-}
-
-FIXTURE_TEST_CASE(SRADB_WGS_Fragment_Id, SRADBFixture)
-{
-    ngs :: Read read = NgsFixture :: getRead ( "ALWZ01", ngs :: String ( "ALWZ01" ) + ".R.1" );
-    REQUIRE ( read . nextFragment() );
-    REQUIRE_EQ( ngs :: String ( "ALWZ01" ) + ".FR0.1",  read . getFragmentId() . toString () );
-}
-
-FIXTURE_TEST_CASE(SRADB_Fragment_getFragmentBases, SRADBFixture)
-{
-    ngs :: String expected(
-        "CCTGTTTGCTCCCCACGCTTTCGCGCCTCAGCGTCAGTAACGGTCCAGTGTGTCGCCTTCGCCACTGGTACTCTTCCTGCTATCTACGCATCTCATTCTA"
-        "CACACGTCGCGCGCCACACCTCTCTAACACACGTGACACAGCCACTCTCTGCCGTTACTTCGCTGCTCTGCCGCC"
-    );
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( SRADB_Accession ) + ".R.1", 2 ) . getFragmentBases () . toString () );    
-}
-
-FIXTURE_TEST_CASE(SRADB_Fragment_getSubFragmentBases_Offset, SRADBFixture)
-{
-    ngs :: String expected("CACACGTCGCGCGCCACACCTCTCTAACACACGTGACACAGCCACTCTCTGCCGTTACTTCGCTGCTCTGCCGCC");
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( SRADB_Accession ) + ".R.1", 2 ) . getFragmentBases ( 100 ) . toString () );    
-}
-
-FIXTURE_TEST_CASE(SRADB_Fragment_getSubFragmentBases_OffsetLength, SRADBFixture)
-{
-    ngs :: String expected("CACACG");
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( SRADB_Accession ) + ".R.1", 2 ) . getFragmentBases ( 100, 6 ) . toString () );    
-}
-
-FIXTURE_TEST_CASE(SRADB_Fragment_getFragmentQualities, SRADBFixture)
-{
-    ngs :: String expected(
-        "?????BBBBDDDDDBBDEEFFFEE7CHH58E=EECCEG///75,5CF-5A5-5C at FEEDFDEE:E--55----5,@@@,,5,5@=?7?############"
-        "###########################################################################"
-    );
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( SRADB_Accession ) + ".R.1", 2 ) . getFragmentQualities () . toString () );    
-}
-
-FIXTURE_TEST_CASE(SRADB_Fragment_getSubFragmentQualities_Offset, SRADBFixture)
-{
-    ngs :: String expected("###########################################################################");
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( SRADB_Accession ) + ".R.1", 2 ) . getFragmentQualities ( 100 ) . toString () );    
-}
-
-FIXTURE_TEST_CASE(SRADB_Fragment_getSubFragmentQualities_OffsetLength, SRADBFixture)
-{
-    ngs :: String expected("5,5@=?");
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( SRADB_Accession ) + ".R.1", 2 ) . getFragmentQualities ( 80, 6 ) . toString () );    
-}
-
-/////ReferenceIterator
-FIXTURE_TEST_CASE(SRADB_ReferenceIterator_Open, SRADBFixture)
-{
-    ngs :: ReferenceIterator refIt = NgsFixture :: getReferences ( SRADB_Accession );  // always an empty iterator
-    REQUIRE_THROW ( refIt . getCommonName() );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReferenceIterator_Next, SRADBFixture)
-{
-    ngs :: ReferenceIterator refIt = NgsFixture :: getReferences ( SRADB_Accession );  // always an empty iterator
-    REQUIRE( ! refIt . nextReference () );
-}
-
-/////AlignmentIterator
-FIXTURE_TEST_CASE(SRADB_AlignmentIterator_Open, SRADBFixture)
-{
-    ngs :: AlignmentIterator alIt = ncbi :: NGS :: openReadCollection ( SRADB_Accession ) .  getAlignments ( ngs :: Alignment :: all );  // always an empty iterator
-    REQUIRE_THROW ( alIt . getAlignmentId () );
-}
-
-FIXTURE_TEST_CASE(SRADB_AlignmentIterator_Next, SRADBFixture)
-{
-    ngs :: AlignmentIterator alIt = ncbi :: NGS :: openReadCollection ( SRADB_Accession ) .  getAlignments ( ngs :: Alignment :: all );  // always an empty iterator
-    REQUIRE( ! alIt . nextAlignment () );
-}
-
-/////TODO: PileupIterator
-
-///// ReadGroup
-FIXTURE_TEST_CASE(SRADB_ReadGroup_GetName, SRADBFixture)
-{
-    ngs :: ReadGroup rg = ncbi :: NGS :: openReadCollection ( SRADB_Accession ) . getReadGroup ( "A1DLC.1" );
-    REQUIRE_EQ ( ngs :: String("A1DLC.1"), rg . getName () );
-}
-FIXTURE_TEST_CASE(SRADB_HasReadGroup, SRADBFixture)
-{
-    REQUIRE ( ncbi::NGS::openReadCollection( SRADB_Accession ).hasReadGroup ( "A1DLC.1" ) );
-    REQUIRE ( ! ncbi::NGS::openReadCollection( SRADB_Accession ).hasReadGroup ( "non-existent read group" ) );
-}
-FIXTURE_TEST_CASE(SRADB_ReadGroup_GetStatistics, SRADBFixture)
-{
-    ngs :: ReadGroup rg = ncbi :: NGS :: openReadCollection ( SRADB_Accession ) . getReadGroup ( "A1DLC.1" );
-    ngs :: Statistics stats = rg . getStatistics ();
-}
-
-/////TODO: ReadGroupIterator
-
-///// Statistics
-FIXTURE_TEST_CASE(SRADB_ReadGroup_GetStatistics_getValueType, SRADBFixture)
-{
-    ngs :: ReadGroup rg = ncbi :: NGS :: openReadCollection ( SRADB_Accession ) . getReadGroup ( "A1DLC.1" );
-    ngs :: Statistics stats = rg . getStatistics ();
-
-    REQUIRE_EQ ( ngs :: Statistics :: uint64, stats . getValueType ( "BASE_COUNT" ) );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadGroup_GetStatistics_getAsU64, SRADBFixture)
-{
-    ngs :: ReadGroup rg = ncbi :: NGS :: openReadCollection ( SRADB_Accession ) . getReadGroup ( "A1DLC.1" );
-    ngs :: Statistics stats = rg . getStatistics ();
-
-    REQUIRE_EQ ( (uint64_t)5600, stats . getAsU64 ( "BASE_COUNT" ) );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadGroup_GetStatistics_getAsI64, SRADBFixture)
-{
-    ngs :: ReadGroup rg = ncbi :: NGS :: openReadCollection ( SRADB_Accession ) . getReadGroup ( "A1DLC.1" );
-    ngs :: Statistics stats = rg . getStatistics ();
-
-    REQUIRE_EQ ( (int64_t)5600, stats . getAsI64 ( "BASE_COUNT" ) );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadGroup_GetStatistics_getAsDouble, SRADBFixture)
-{
-    ngs :: ReadGroup rg = ncbi :: NGS :: openReadCollection ( SRADB_Accession ) . getReadGroup ( "A1DLC.1" );
-    ngs :: Statistics stats = rg . getStatistics ();
-
-    REQUIRE_EQ ( 5600.0, stats . getAsDouble ( "BASE_COUNT" ) );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadGroup_GetStatistics_nextPath, SRADBFixture)
-{
-    ngs :: ReadGroup rg = ncbi :: NGS :: openReadCollection ( SRADB_Accession ) . getReadGroup ( "A1DLC.1" );
-    ngs :: Statistics stats = rg . getStatistics ();
-
-    REQUIRE_EQ ( string("BIO_BASE_COUNT"), stats . nextPath ( "BASE_COUNT" ) );
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadGroup_GetStatistics_iteration, SRADBFixture)
-{
-    ngs :: ReadGroup rg = ncbi :: NGS :: openReadCollection ( SRADB_Accession ) . getReadGroup ( "A1DLC.1" );
-    ngs :: Statistics stats = rg . getStatistics ();
-
-	string path = stats . nextPath ( "" );
-    REQUIRE_EQ ( string("BASE_COUNT"), path );
-	path = stats . nextPath ( path );
-    REQUIRE_EQ ( string("BIO_BASE_COUNT"), path );
-	path = stats . nextPath ( path );
-    REQUIRE_EQ ( string("SPOT_COUNT"), path );
-	path = stats . nextPath ( path );
-    REQUIRE_EQ ( string("SPOT_MAX"), path );
-	path = stats . nextPath ( path );
-    REQUIRE_EQ ( string("SPOT_MIN"), path );
-	path = stats . nextPath ( path );
-    REQUIRE_EQ ( string(), path );
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-ngs_sradb-c++";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t rc=NgsSradbCppTestSuite(argc, argv);
-    return rc;
-}
-
-}
-
-
diff --git a/test/ngs-c++/SRAtest.cpp b/test/ngs-c++/SRAtest.cpp
deleted file mode 100644
index 69857a1..0000000
--- a/test/ngs-c++/SRAtest.cpp
+++ /dev/null
@@ -1,478 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for NGS interface, SRA table based implementation
-*/
-
-#include "ngsfixture.hpp"
-
-using namespace std;
-using namespace ncbi::NK;
-
-TEST_SUITE(NgsSraCppTestSuite);
-
-class SRAFixture : public NgsFixture
-{
-public:
-    static const char* SRA_Accession;
-    
-public:
-    SRAFixture()
-    {
-    }
-    ~SRAFixture()
-    {
-    }
-
-    ngs :: ReadIterator getReads ( ngs :: Read :: ReadCategory cat = ngs :: Read :: all )
-    {
-        return NgsFixture :: getReads ( SRA_Accession, cat ); 
-    }
-    ngs :: Read getRead ( const ngs :: String& p_id)
-    {
-        return NgsFixture :: getRead ( SRA_Accession, p_id ); 
-    }
-    ngs :: Reference getReference ( const char* spec )
-    {
-        return NgsFixture :: getReference ( SRA_Accession, spec ); 
-    }
-    ngs :: Fragment getFragment ( const ngs :: String& p_readId, uint32_t p_fragIdx )
-    {
-        return NgsFixture :: getFragment ( SRA_Accession, p_readId, p_fragIdx );
-    }
-};
-const char* SRAFixture::SRA_Accession = "SRR000001";
-
-///// String
-TEST_CASE(SRA_String_StringRefScope)
-{
-    char const* p;
-    size_t size;
-
-    ngs::ReadCollection read_coll = ncbi::NGS::openReadCollection( "SRR618508" );
-    ngs::Reference ref = read_coll.getReference("NC_000002.11");
-    {
-        ngs::StringRef str_ref = ref.getReferenceChunk(20001);
-
-        p = str_ref.data();
-        size = str_ref.size();
-    }
-    
-
-    // data under p are still available for the current implementation
-    for (size_t i = 0; i < size; ++i)
-    {
-        // force the compiler not to optimize this loop
-        if ( p[i] == '!' )
-            std::cout << "SRA_String_StringRefScope works" << std::endl;
-    }
-}
-
-///// ReadCollection
-//TODO: getReadRange (categories)
-//TODO: getReadCount (categories)
-//TODO: getReadGroups
-//TODO: error cases
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_Open, SRAFixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( SRA_Accession );
-}
-FIXTURE_TEST_CASE(SRA_ReadCollection_Open_Failed, SRAFixture)
-{
-    REQUIRE_THROW ( ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( string(SRA_Accession) + "_BS" ) );
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetName, SRAFixture)
-{
-    REQUIRE_EQ ( ngs :: String ( SRA_Accession ), ncbi :: NGS :: openReadCollection ( SRA_Accession ) . getName () );
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetReads, SRAFixture)
-{
-    ngs :: ReadIterator readIt = ncbi :: NGS :: openReadCollection ( SRA_Accession ) . getReads ( ngs :: Read :: all ); 
-} 
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetReads_Filtered, SRAFixture)
-{
-    ngs :: ReadIterator readIt = ncbi :: NGS :: openReadCollection ( SRA_Accession ) . getReads ( ngs :: Read :: unaligned ); 
-} 
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetReadRange, SRAFixture)
-{
-    ngs :: ReadIterator readIt = ncbi :: NGS :: openReadCollection ( SRA_Accession ) . getReadRange ( 100, 200 ); 
-} 
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetRead, SRAFixture)
-{
-    ngs :: Read read = getRead ( string ( SRA_Accession ) + ".R.1" ); 
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetRead_Failed, SRAFixture)
-{
-    REQUIRE_THROW ( ngs :: Read read = ncbi :: NGS :: openReadCollection ( SRA_Accession ) . getRead ( "notaread" ) );
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_ReadCount, SRAFixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( SRA_Accession );
-    REQUIRE_EQ( (uint64_t)470985, run . getReadCount() ); 
-}    
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetReference_Failed, SRAFixture)
-{
-    REQUIRE_THROW ( ngs :: Reference ref = getReference ( "supercnut2.1" ) );
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetReferences, SRAFixture)
-{
-    ngs :: ReferenceIterator refIt = NgsFixture :: getReferences ( SRA_Accession );  // always an empty iterator
-}
-    
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetAlignment, SRAFixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( SRA_Accession );
-    REQUIRE_THROW ( ngs :: Alignment align = run . getAlignment ( "1" ) );
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetAlignmentCount, SRAFixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( SRA_Accession );
-    REQUIRE_EQ( (uint64_t)0, run . getAlignmentCount() );
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetAlignmentCountFiltered, SRAFixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( SRA_Accession );
-    REQUIRE_EQ( (uint64_t)0, run . getAlignmentCount( ngs :: Alignment :: all ) );
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetAlignmentRange, SRAFixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( SRA_Accession );
-    REQUIRE ( ! run . getAlignmentRange ( 1, 2 ) . nextAlignment () );
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetAlignmentRangeFiltered, SRAFixture)
-{
-    ngs :: ReadCollection run = ncbi :: NGS :: openReadCollection ( SRA_Accession );
-    REQUIRE ( ! run . getAlignmentRange ( 1, 2, ngs :: Alignment :: all ) . nextAlignment () );
-}
-
-///// ReadIterator
-//TODO: read category selection
-//TODO: range on a collection that represents a slice (read[0].id != 1)
-//TODO: range and filtering
-//TODO: empty range
-//TODO: ReadIterator over a ReadGroup (use a ReadGroup that is not immediately at the beginning of the run)
-//TODO: ReadIterator over a ReadIterator, to allow creation of a sub-iterator
-//TODO: ReadIterator returning less than the range requested
-//TODO: error cases (?)
-FIXTURE_TEST_CASE(SRA_ReadIterator_NoReadBeforeNext, SRAFixture)
-{
-    ngs :: ReadIterator readIt = getReads (); 
-    // accessing the read through an iterator before a call to nextRead() throws
-    REQUIRE_THROW ( readIt . getReadId() );
-}
-
-FIXTURE_TEST_CASE(SRA_ReadIterator_Open_All, SRAFixture)
-{
-    ngs :: ReadIterator readIt = getReads (); 
-    REQUIRE( readIt . nextRead () );
-    ngs :: StringRef sref = readIt . getReadId();
-    ngs :: String id =  sref . toString ();
-    REQUIRE_EQ( ngs :: String ( SRA_Accession ) + ".R.1", id ); 
-}
-
-#if SHOW_UNIMPLEMENTED
-FIXTURE_TEST_CASE(SRA_ReadIterator_Open_Filtered, SRAFixture)
-{
-    ngs :: ReadIterator readIt = getReads ( ngs :: Read :: partiallyAligned ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( (int64_t)5, readIt . getReadId() ); 
-}
-#endif
-
-FIXTURE_TEST_CASE(SRA_ReadIterator_Next, SRAFixture)
-{
-    ngs :: ReadIterator readIt = getReads (); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( SRA_Accession ) + ".R.2", readIt . getReadId() . toString () ); 
-}
-
-FIXTURE_TEST_CASE(SRA_ReadIterator_End, SRAFixture)
-{
-    ngs :: ReadIterator readIt = getReads (); 
-    ngs :: String lastId;
-    while (readIt . nextRead ())
-    {
-        lastId = readIt . getReadId() . toString ();
-    }
-    REQUIRE_EQ( ngs :: String ( SRA_Accession ) + ".R.470985", lastId ); 
-}
-
-FIXTURE_TEST_CASE(SRA_ReadIterator_BeyondEnd, SRAFixture)
-{
-    ngs :: ReadIterator readIt = getReads (); 
-    while (readIt . nextRead ())
-    {
-    }
-    REQUIRE_THROW ( readIt . getReadId() ); 
-}
-
-FIXTURE_TEST_CASE(SRA_ReadIterator_Range, SRAFixture)
-{
-    ngs :: ReadIterator readIt = ncbi :: NGS :: openReadCollection ( SRA_Accession ) . getReadRange ( 10, 5 ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( SRA_Accession ) + ".R.10", readIt . getReadId() . toString () ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( SRA_Accession ) + ".R.11", readIt . getReadId() . toString () ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( SRA_Accession ) + ".R.12", readIt . getReadId() . toString () ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( SRA_Accession ) + ".R.13", readIt . getReadId() . toString () ); 
-    REQUIRE( readIt . nextRead () );
-    REQUIRE_EQ( ngs :: String ( SRA_Accession ) + ".R.14", readIt . getReadId() . toString () ); 
-    REQUIRE( ! readIt . nextRead () );
-}
-
-/////TODO: Read
-//TODO: error cases
-
-FIXTURE_TEST_CASE(SRA_Read_ReadId, SRAFixture)
-{
-    REQUIRE_EQ( ngs :: String ( SRA_Accession ) + ".R.1", getRead ( ngs :: String ( SRA_Accession ) + ".R.1" ) . getReadId() . toString () ); 
-}
-
-FIXTURE_TEST_CASE(SRA_Read_getNumFragments, SRAFixture)
-{
-    REQUIRE_EQ( ( uint32_t ) 2, getRead ( ngs :: String ( SRA_Accession ) + ".R.1" ) . getNumFragments() ); 
-}
-
-FIXTURE_TEST_CASE(SRA_Read_ReadName, SRAFixture)
-{
-    REQUIRE_EQ( ngs :: String("EM7LVYS02FOYNU"), getRead ( ngs :: String ( SRA_Accession ) + ".R.1" ) . getReadName() . toString() );
-}
-
-FIXTURE_TEST_CASE(SRA_Read_ReadGroup, SRAFixture)
-{   //TODO: find an accession with non-empty read groups
-    REQUIRE_EQ( ngs :: String(""), getRead ( ngs :: String ( SRA_Accession ) + ".R.1" ). getReadGroup() );
-}
-
-FIXTURE_TEST_CASE(SRA_Read_ReadCategory, SRAFixture)
-{
-    REQUIRE_EQ( ngs :: Read :: unaligned, getRead ( ngs :: String ( SRA_Accession ) + ".R.1" ). getReadCategory() );
-}
-
-FIXTURE_TEST_CASE(SRA_Read_getReadBases, SRAFixture)
-{
-    ngs :: String bases = getRead ( ngs :: String ( SRA_Accession ) + ".R.1" ) . getReadBases () . toString (); 
-    ngs :: String expected(    
-        "TCAGATTCTCCTAGCCTACATCCGTACGAGTTAGCGTGGGATTACGAGGTGCACACCATTTCATTCCGTACGGGTAAATT"
-        "TTTGTATTTTTAGCAGACGGCAGGGTTTCACCATGGTTGACCAACGTACTAATCTTGAACTCCTGACCTCAAGTGATTTG"
-        "CCTGCCTTCAGCCTCCCAAAGTGACTGGGTATTACAGATGTGAGCGAGTTTGTGCCCAAGCCTTATAAGTAAATTTATAA"
-        "ATTTACATAATTTAAATGACTTATGCTTAGCGAAATAGGGTAAG"
-    );
-    REQUIRE_EQ( expected, bases );    
-}
-
-FIXTURE_TEST_CASE(SRA_Read_getReadBases_Offset, SRAFixture)
-{
-    ngs :: String bases = getRead ( ngs :: String ( SRA_Accession ) + ".R.1" ) . getReadBases ( 200 ) . toString( ); 
-    ngs :: String expected(
-        "TGAGCGAGTTTGTGCCCAAGCCTTATAAGTAAATTTATAAATTTACATAATTTAAATGACTTATGCTTAGCGAAATAGGGTAAG"
-    );
-    REQUIRE_EQ( expected, bases );    
-}
-
-FIXTURE_TEST_CASE(SRA_Read_getReadBases_OffsetLength, SRAFixture)
-{
-    ngs :: String bases = getRead ( ngs :: String ( SRA_Accession ) + ".R.1" ) . getReadBases ( 200, 6 ) . toString (); 
-    ngs :: String expected("TGAGCG");
-    REQUIRE_EQ( expected, bases );    
-}
-
-FIXTURE_TEST_CASE(SRA_Read_getReadQualities, SRAFixture)
-{
-    ngs :: String quals = getRead ( ngs :: String ( SRA_Accession ) + ".R.1" ) . getReadQualities() . toString (); 
-    ngs :: String expected(
-        "=<8<85)9=9/3-8?68<7=8<3657747==49==+;FB2;A;5:'*>69<:74)9.;C?+;<B<B;(<';FA/;C>*GC"
-        "8/%9<=GC8.#=2:5:16D==<EA2EA.;5=44<;2C=5;@73&<<2;5;6+9<?776+:24'26:7,<9A;=:;0C>*6"
-        "?7<<C=D=<52?:9CA2CA23<2<;3CA12:A<9414<7<<6;99<2/=9#<;9B at 27.;=6>:77>:1<A>+CA138?<"
-        ")C at 2166:A<B?->:%<<9<;33<;6?9;<;4=:%<$CA1+1%1");
-    REQUIRE_EQ( expected, quals );    
-}
-
-FIXTURE_TEST_CASE(SRA_Read_getReadQualities_Offset, SRAFixture)
-{
-    ngs :: String quals = getRead ( ngs :: String ( SRA_Accession ) + ".R.1" ) . getReadQualities( 200 ) . toString (); 
-    ngs :: String expected(
-        "<6;99<2/=9#<;9B at 27.;=6>:77>:1<A>+CA138?<)C at 2166:A<B?->:%<<9<;33<;6?9;<;4=:%<$CA1+1%1"
-    );
-    REQUIRE_EQ( expected, quals );    
-}
-
-FIXTURE_TEST_CASE(SRA_Read_getReadQualities_OffsetLength, SRAFixture)
-{
-    ngs :: String quals = getRead ( ngs :: String ( SRA_Accession ) + ".R.1" ) . getReadQualities( 200, 10 ) . toString (); 
-    ngs :: String expected("<6;99<2/=9");
-    REQUIRE_EQ( expected, quals );    
-}
-
-///// FragmentIterator
-FIXTURE_TEST_CASE(SRA_FragmentIterator_Next_and_Beyond, SRAFixture)
-{
-    ngs :: Read read = getRead ( ngs :: String ( SRA_Accession ) + ".R.1" ); 
-    // 2 fragments total
-    REQUIRE ( read . nextFragment () ); // still on first fragment
-    REQUIRE ( read . nextFragment () );
-    REQUIRE ( ! read . nextFragment () );
-    REQUIRE ( ! read . nextFragment () ); // past the end
-}
-
-///// Fragment
-//TODO: error cases
-
-FIXTURE_TEST_CASE(SRA_Fragment_Id, SRAFixture)
-{
-    ngs :: Read read = getRead ( ngs :: String ( SRA_Accession ) + ".R.1" ); 
-
-    REQUIRE ( read . nextFragment () );
-    REQUIRE_EQ ( string ( SRA_Accession ) + ".FR0.1", read . getFragmentId() . toString () ); 
-    
-    REQUIRE ( read . nextFragment () );
-    REQUIRE_EQ ( string ( SRA_Accession ) + ".FR1.1", read . getFragmentId() . toString () ); 
-}
-
-FIXTURE_TEST_CASE(SRA_Fragment_getFragmentBases, SRAFixture)
-{
-    ngs :: String expected(
-        "ACAGACTCAACCTGCATAATAAATAACATTGAAACTTAGTTTCCTTCTTGGGCTTTCGGTGAGAAAACATAAGTTAAAAC"
-        "TGAGCGGGCTGGCAAGGCN"
-    );
-    REQUIRE_EQ( expected, 
-                getFragment ( ngs :: String ( SRA_Accession ) + ".R.2", 2 ) . getFragmentBases () . toString () 
-    );    
-}
-
-FIXTURE_TEST_CASE(SRA_Fragment_getSubFragmentBases_Offset, SRAFixture)
-{
-    ngs :: String expected("GGCAAGGCN");
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( SRA_Accession ) + ".R.2", 2 ) . getFragmentBases ( 90 ) . toString () );    
-}
-
-FIXTURE_TEST_CASE(SRA_Fragment_getSubFragmentBases_OffsetLength, SRAFixture)
-{
-    ngs :: String expected("GGCAAG");
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( SRA_Accession ) + ".R.2", 2 ) . getFragmentBases ( 90, 6 ) . toString () );    
-}
-
-FIXTURE_TEST_CASE(SRA_Fragment_getFragmentQualities, SRAFixture)
-{
-    ngs :: String expected(
-        "<=::=<8=D=C<<<<<<A=;CA1<=7<;A<;CA1<@:<9>;&>7;4<>7CA0<C at 0:<5<;:<CA7+:7<@9<B=CA7+<"
-        "<99<:B?.<;:2<A<A;:!"
-    );
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( SRA_Accession ) + ".R.2", 2 ) . getFragmentQualities () . toString () );    
-}
-
-FIXTURE_TEST_CASE(SRA_Fragment_getSubFragmentQualities_Offset, SRAFixture)
-{
-    ngs :: String expected(":2<A<A;:!");
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( SRA_Accession ) + ".R.2", 2 ) . getFragmentQualities ( 90 ) . toString () );    
-}
-
-FIXTURE_TEST_CASE(SRA_Fragment_getSubFragmentQualities_OffsetLength, SRAFixture)
-{
-    ngs :: String expected(":2<A<A");
-    REQUIRE_EQ( expected, getFragment ( ngs :: String ( SRA_Accession ) + ".R.2", 2 ) . getFragmentQualities ( 90, 6 ) . toString () );    
-}
-
-/////ReferenceIterator
-FIXTURE_TEST_CASE(SRA_ReferenceIterator_Open, SRAFixture)
-{
-    ngs :: ReferenceIterator refIt = ncbi :: NGS :: openReadCollection ( SRA_Accession ) . getReferences ();  // always an empty iterator
-    REQUIRE_THROW ( refIt . getCommonName() );
-}
-
-FIXTURE_TEST_CASE(SRA_ReferenceIterator_Next, SRAFixture)
-{
-    ngs :: ReferenceIterator refIt = ncbi :: NGS :: openReadCollection ( SRA_Accession ) .  getReferences ();  // always an empty iterator
-    REQUIRE( ! refIt . nextReference () );
-}
-
-/////AlignmentIterator
-FIXTURE_TEST_CASE(SRA_AlignmentIterator_Open, SRAFixture)
-{
-    ngs :: AlignmentIterator alIt = ncbi :: NGS :: openReadCollection ( SRA_Accession ) .  getAlignments ( ngs :: Alignment :: all );  // always an empty iterator
-    REQUIRE_THROW ( alIt . getAlignmentId () );
-}
-
-FIXTURE_TEST_CASE(SRA_AlignmentIterator_Next, SRAFixture)
-{
-    ngs :: AlignmentIterator alIt = ncbi :: NGS :: openReadCollection ( SRA_Accession ) .  getAlignments ( ngs :: Alignment :: all );  // always an empty iterator
-    REQUIRE( ! alIt . nextAlignment () );
-}
-
-/////TODO: ReadGroup
-//TODO: getName
-//TODO: getRead
-//TODO: getReads
-
-/////TODO: ReadGroupIterator
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-ngs_sra-c++";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t rc=NgsSraCppTestSuite(argc, argv);
-    return rc;
-}
-
-}
-
-
diff --git a/test/ngs-c++/SRR600096 b/test/ngs-c++/SRR600096
deleted file mode 100644
index 4a4f343..0000000
Binary files a/test/ngs-c++/SRR600096 and /dev/null differ
diff --git a/test/ngs-c++/SRR611340 b/test/ngs-c++/SRR611340
deleted file mode 100644
index 313a248..0000000
Binary files a/test/ngs-c++/SRR611340 and /dev/null differ
diff --git a/test/ngs-c++/ngsfixture.hpp b/test/ngs-c++/ngsfixture.hpp
deleted file mode 100644
index 0ed5e30..0000000
--- a/test/ngs-c++/ngsfixture.hpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngsfixture_
-#define _h_ngsfixture_
-
-/**
-* Unit tests for NGS C++ interface, common definitions
-*/
-
-#include <ngs/ncbi/NGS.hpp>
-
-#include <ktst/unit_test.hpp>
-
-#include <sysalloc.h>
-#include <assert.h>
-
-#define SHOW_UNIMPLEMENTED 0
-
-class NgsFixture
-{
-public:
-    NgsFixture()
-    : suppress_errors(false)
-    {
-    }
-    
-    ~NgsFixture()
-    {
-    }
-
-    ngs :: ReadIterator getReads ( const char* acc, ngs :: Read :: ReadCategory cat )
-    {
-        return ncbi :: NGS :: openReadCollection ( acc ) . getReads ( cat ); 
-    }
-    ngs :: Read getRead (const char* acc, const ngs :: String& p_id)
-    {
-        return ncbi :: NGS :: openReadCollection ( acc ). getRead ( p_id ); 
-    }
-    ngs :: Read getFragment (const char* acc, const ngs :: String& p_readId, uint32_t p_fragIdx)
-    {
-        ngs :: Read read = getRead ( acc, p_readId );
-        assert ( p_fragIdx != 0 );
-        while ( p_fragIdx > 0 )
-        {
-            read . nextFragment ();
-            -- p_fragIdx;
-        }
-    
-        return read;
-    }
-
-    ngs :: Reference getReference ( const char* acc, const char* spec )
-    {
-        return ncbi :: NGS :: openReadCollection ( acc ) . getReference ( spec ); 
-    }
-    bool hasReference ( const char* acc, const char* spec )
-    {
-        return ncbi :: NGS :: openReadCollection ( acc ) . hasReference ( spec ); 
-    }
-    ngs :: ReferenceIterator getReferences ( const char* acc )
-    {
-        return ncbi :: NGS :: openReadCollection ( acc ) . getReferences (); 
-    }
-    
-    bool suppress_errors;
-};
-
-#endif
-
diff --git a/test/ngs-c++/seq_spot_id_0.sra b/test/ngs-c++/seq_spot_id_0.sra
deleted file mode 100644
index 83ac4c3..0000000
Binary files a/test/ngs-c++/seq_spot_id_0.sra and /dev/null differ
diff --git a/test/ngs-c++/valgrind.suppress b/test/ngs-c++/valgrind.suppress
deleted file mode 100644
index f79a7a4..0000000
--- a/test/ngs-c++/valgrind.suppress
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-   static_cached_KDirectory_in_KConfig_find_home_directory
-   Memcheck:Leak
-    ...
-   fun:find_home_directory
-}
-{
-   vt_cache
-   Memcheck:Leak
-   fun:calloc
-   fun:_ZN3ngs7Resolve*
-}
diff --git a/test/ngs-java/Makefile b/test/ngs-java/Makefile
deleted file mode 100644
index 500bb6a..0000000
--- a/test/ngs-java/Makefile
+++ /dev/null
@@ -1,125 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-
-MODULE = test/ngs-java
-
-JARS = \
-	ngs_jtest
-
-ALL_TARGS = \
-	$(JARS)
-
-include $(TOP)/build/Makefile.env
-
-ifeq (,$(NGS_JAVA_JAR))
-
-$(ALL_TARGS):
-	@true 
-	
-runtests:
-	@ echo "NGS Java tests are not run since ngs-java library does not appear to be installed"
-
-else
-ifeq (,$(NGS_LIBDIR))
-
-$(ALL_TARGS):
-	@true 
-	
-runtests:
-	@ echo "NGS Java tests are not run since ngs-sdk library does not appear to be installed"
-
-else
-
-JUNIT_JAR = $(SRCDIR)/../junit-4.11.jar
-
-CLASSPATH = $(NGS_JAVA_JAR):$(JUNIT_JAR)
-
-$(JARS): makejdirs
-	@ $(MAKE_CMD) $(TEST_CLSPATH)/$@
-
-.PHONY: $(JARS)
-
-clean: stdclean
-
-%.class: %.java
-	javac $^ -d $(CLASSDIR) -classpath $(CLASSPATH)
-    
-#-------------------------------------------------------------------------------
-# tests for ncbi-ngs
-#
-NGS_SRC = \
-	ngs_test_lib_load \
-	ngs_test_CSRA1
-    
-NGS_CLS = \
-	$(addsuffix .class,$(NGS_SRC))
-
-# use standard java System.loadLibrary
-VARS += -Dvdb.System.loadLibrary=1
-
-# remove all found JNI DLL-s
-#VARS += -Dvdb.deleteLibraries=1
-
-# custom load library search
-#VARS += -Dvdb.loadLibraryLocations=W
-
-#VARS += -Dvdb.log=FINEST
-
-#J=/net/pan1/sra-test/local/jdk1.7.0_51/bin/
-
-$(TEST_CLSPATH)/ngs_jtest: $(NGS_CLS)
-
-.PHONY: $(TEST_CLSPATH)/ngs_jtest
-
-#-------------------------------------------------------------------------------
-# runtests
-#
-
-runtests: $(JARS) test
-
-JAVABITS=-d$(BITS)
-
-# make sure runs are not cached in the user repository when running tests
-ifeq ($(wildcard ../../../asm-trace),)
-	ifeq (,$(VDB_CONFIG))
-		VDB_CONFIG = $(shell pwd)/../only-remote-repository.kfg
-	endif
-endif
-
-test: $(NGS_CLS)
-	@ echo Run $(CLASSDIR)/$(NGS_SRC)
-	@ echo java $(JAVABITS) -cp $(CLASSDIR):$(CLASSPATH) -Dvdb.System.loadLibrary=1 -Djava.library.path=$(NGS_LIBDIR):$(LIBDIR) org.junit.runner.JUnitCore gov.nih.nlm.ncbi.ngs.ngs_test_lib_load
-	@ export VDB_CONFIG=$(VDB_CONFIG) ; \
-		java $(JAVABITS) -cp $(CLASSDIR):$(CLASSPATH) -Dvdb.System.loadLibrary=1 -Djava.library.path=$(NGS_LIBDIR):$(LIBDIR) org.junit.runner.JUnitCore gov.nih.nlm.ncbi.ngs.ngs_test_lib_load
-	@ echo java $(JAVABITS) -cp $(CLASSDIR):$(CLASSPATH) -Dvdb.System.loadLibrary=1 -Djava.library.path=$(NGS_LIBDIR):$(LIBDIR) org.junit.runner.JUnitCore ngs_test_CSRA1
-	@ export VDB_CONFIG=$(VDB_CONFIG) ; \
-		java $(JAVABITS) -cp $(CLASSDIR):$(CLASSPATH) -Dvdb.System.loadLibrary=1 -Djava.library.path=$(NGS_LIBDIR):$(LIBDIR) org.junit.runner.JUnitCore ngs_test_CSRA1  
-
-endif    
-endif
diff --git a/test/ngs-java/build.xml b/test/ngs-java/build.xml
deleted file mode 100644
index 9aa106b..0000000
--- a/test/ngs-java/build.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<project>
-
-    <!-- This file is currently for use on Windows; Linux/Mac builds are run via gmake -->
-    <property environment="env"/>
-    <property name="Platform"       value="x64" />
-    <property name="Configuration"  value="Debug" />
-    <property name="Output"         value="${basedir}..\..\..\..\OUTDIR" />
-    <property name="MSVS"           value="2013" />
-    
-    <condition property="PlatformToolset" value="v100" else="v120">
-        <equals arg1="${MSVS}" arg2="2010"/>
-    </condition>    
-    <property name="vdb.dir"        value="${Output}\ncbi-vdb\win\${PlatformToolset}\${Platform}\${Configuration}\bin" />
-    <property name="ngs.dir"        value="${Output}\ngs-sdk\win\${PlatformToolset}\${Platform}\${Configuration}\bin" />
-    
-    <property name="classes.dir" value="${vdb.dir}\..\test\ngs-java" />
-    
-    <target name="clean">
-        <delete dir="${classes.dir}"/>
-    </target>
-
-    <target name="compile">
-        <mkdir dir="${classes.dir}"/>
-        <javac includeantruntime="false" srcdir="${basedir}" includes="ngs_test_lib_load.java ngs_test_CSRA1.java" destdir="${classes.dir}" > 
-            <classpath>
-                <pathelement location="${Output}\ngs-java\jar\ngs-java.jar" />
-                <pathelement location="${basedir}\..\junit-4.11.jar" />
-            </classpath>
-        </javac>
-    </target>
-
-    <condition property="JVMbits" value="64" else="32">
-        <equals arg1="${Platform}" arg2="x64"/>
-    </condition>    
-    
-    <target name="runtests" depends="compile" >
-        <java classname="org.junit.runner.JUnitCore" fork="true" failonerror="true">
-            <classpath>
-                <pathelement location="${classes.dir}" />
-                <pathelement location="${Output}\ngs-java\jar\ngs-java.jar" />
-                <pathelement location="${basedir}\..\junit-4.11.jar" />
-            </classpath>
-            <sysproperty key="java.library.path" path="${vdb.dir};${ngs.dir}" />
-            <sysproperty key="vdb.System.loadLibrary" value="1" />
-            <sysproperty key="vdb.log" value="FINEST" />
-            <jvmarg value="-d${JVMbits}" />
-        	<arg value="gov.nih.nlm.ncbi.ngs.ngs_test_lib_load" />
-        	<arg value="ngs_test_CSRA1" />
-        </java>
-    </target>
-    
-
-</project>
diff --git a/test/ngs-java/ngs_test_CSRA1.java b/test/ngs-java/ngs_test_CSRA1.java
deleted file mode 100644
index 069a51e..0000000
--- a/test/ngs-java/ngs_test_CSRA1.java
+++ /dev/null
@@ -1,860 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ==============================================================================
-*
-*/
-
-
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
-import org.junit.Test;
-
-import ngs.ReadCollection;
-import ngs.Alignment;
-import ngs.ErrorMsg;
-
-import gov.nih.nlm.ncbi.ngs.NGS;
-
-//  The purpose of this suite is to verify integration of Java/JNI/C code, 
-//  for which running through just one type of archive is enough. 
-//  Thus these tests are not replicated for SRA and SRADB 
-//  archives, unlike in the C-level test suites
-public class ngs_test_CSRA1 {
-
-// ReadCollection
-    String PrimaryOnly           = "SRR1063272";
-    String WithSecondary         = "SRR833251";
-    String WithGroups            = "SRR822962";
-    String WithCircularRef       = "SRR1769246";
-    String SingleFragmentPerSpot = "SRR2096940";
-    
-    @Test
-    public void open_success() throws ngs.ErrorMsg
-    {
-        ngs.ReadCollection run = NGS . openReadCollection ( PrimaryOnly );
-    }
-    
-    @Test
-    public void open_fail()
-    {
-        try
-        {
-            ngs.ReadCollection run = NGS . openReadCollection ( "SRRsomejunk" );
-            fail();
-        }
-        catch ( ngs.ErrorMsg e ) {}        
-    }
-    
-    @Test
-    public void ReadCollection_getName() throws ngs.ErrorMsg
-    {
-        assertEquals ( PrimaryOnly, NGS . openReadCollection ( PrimaryOnly ) . getName () );
-    }
-    
-    @Test
-    public void ReadCollection_getReadGroup() throws ngs.ErrorMsg
-    {
-        ngs.ReadGroup gr = NGS . openReadCollection ( PrimaryOnly ) . getReadGroup ( "C1ELY.6" );
-    }
-    
-    @Test
-    public void ReadCollection_getReadGroups() throws ngs.ErrorMsg
-    {
-        ngs.ReadGroupIterator it = NGS . openReadCollection ( PrimaryOnly ) . getReadGroups ();
-    }
-    
-    @Test
-    public void ReadCollection_getReferences() throws ngs.ErrorMsg
-    {
-        ngs.ReferenceIterator it = NGS . openReadCollection ( PrimaryOnly ) . getReferences ();
-    }
-    
-    @Test
-    public void ReadCollection_getReference() throws ngs.ErrorMsg
-    {
-        ngs.Reference ref = NGS . openReadCollection ( PrimaryOnly ) . getReference ( "supercont2.1" );
-    }
-
-    @Test
-    public void ReadCollection_hasReference() throws ngs.ErrorMsg
-    {
-        assert ( NGS . openReadCollection ( PrimaryOnly ) . hasReference ( "supercont2.1" ) );
-        assert ( ! NGS . openReadCollection ( PrimaryOnly ) . hasReference ( "non-existent acc" ) );
-    }
-    
-    @Test
-    public void ReadCollection_getAlignment() throws ngs.ErrorMsg
-    {
-        ngs.Alignment al = NGS . openReadCollection ( PrimaryOnly ) . getAlignment( PrimaryOnly + ".PA.1" );
-    }
-    
-    @Test
-    public void ReadCollection_getAlignments_Primary() throws ngs.ErrorMsg
-    {
-        ngs.AlignmentIterator alIt = NGS . openReadCollection ( PrimaryOnly ) . getAlignments( Alignment . primaryAlignment );
-    }
-    @Test
-    public void ReadCollection_getAlignments_Secondary() throws ngs.ErrorMsg
-    {
-        ngs.AlignmentIterator alIt = NGS . openReadCollection ( PrimaryOnly ) . getAlignments( Alignment . secondaryAlignment );
-    }
-    @Test
-    public void ReadCollection_getAlignments_all() throws ngs.ErrorMsg
-    {
-        ngs.AlignmentIterator alIt = NGS . openReadCollection ( PrimaryOnly ) . getAlignments( Alignment . all );
-    }
-
-    @Test
-    public void ReadCollection_getAlignmentCount_PrimaryOnly() throws ngs.ErrorMsg
-    {
-        assertEquals ( 3987701, NGS . openReadCollection ( PrimaryOnly ) . getAlignmentCount () );
-    }
-    @Test
-    public void ReadCollection_getAlignmentCount_PrimaryOnly_Primary() throws ngs.ErrorMsg
-    {
-        assertEquals ( 3987701, NGS . openReadCollection ( PrimaryOnly ) . getAlignmentCount ( Alignment . primaryAlignment ) );
-    }
-    @Test
-    public void ReadCollection_getAlignmentCount_PrimaryOnly_Secondary() throws ngs.ErrorMsg
-    {
-        assertEquals ( 0, NGS . openReadCollection ( PrimaryOnly ) . getAlignmentCount ( Alignment . secondaryAlignment ) );
-    }
-    @Test
-    public void ReadCollection_getAlignmentCount_PrimaryOnly_All() throws ngs.ErrorMsg
-    {
-        assertEquals ( 3987701, NGS . openReadCollection ( PrimaryOnly ) . getAlignmentCount ( Alignment . all ) );
-    }
-    
-    @Test
-    public void ReadCollection_getAlignmentCount_WithSecondary() throws ngs.ErrorMsg
-    {
-        assertEquals ( 178, NGS . openReadCollection ( WithSecondary ) . getAlignmentCount () );
-    }
-    @Test
-    public void ReadCollection_getAlignmentCount_WithSecondary_Primary() throws ngs.ErrorMsg
-    {
-        assertEquals ( 168, NGS . openReadCollection ( WithSecondary ) . getAlignmentCount ( Alignment . primaryAlignment ) );
-    }
-    @Test
-    public void ReadCollection_getAlignmentCount_WithSecondary_Secondary() throws ngs.ErrorMsg
-    {
-        assertEquals ( 10, NGS . openReadCollection ( WithSecondary ) . getAlignmentCount ( Alignment . secondaryAlignment ) );
-    }
-    @Test
-    public void ReadCollection_getAlignmentCount_WithSecondary_All() throws ngs.ErrorMsg
-    {
-        assertEquals ( 178, NGS . openReadCollection ( WithSecondary ) . getAlignmentCount ( Alignment . all ) );
-    }
-    
-    @Test
-    public void ReadCollection_getAlignmentRange() throws ngs.ErrorMsg
-    {   // straddling primary and secondary alignments
-        ngs . AlignmentIterator alIt = NGS . openReadCollection ( WithSecondary ) . getAlignmentRange ( 166, 5 );
-        assertTrue ( alIt . nextAlignment () );
-        assertEquals ( WithSecondary + ".PA.166", alIt . getAlignmentId () );
-    }
-    
-    @Test
-    public void ReadCollection_getRead () throws ngs.ErrorMsg
-    {   
-        ngs . Read read = NGS . openReadCollection ( PrimaryOnly ) . getRead ( PrimaryOnly + ".R.1" );
-        assertEquals ( PrimaryOnly + ".R.1", read . getReadId () );
-    }
-
-    @Test
-    public void ReadCollection_getReads () throws ngs.ErrorMsg
-    {   
-        ngs . ReadIterator readIt = NGS . openReadCollection ( PrimaryOnly ) . getReads( ngs . Read . all );
-        assertTrue ( readIt . nextRead () );
-        assertEquals ( PrimaryOnly + ".R.1", readIt . getReadId () );
-    }
-    
-    @Test
-    public void ReadCollection_getReadCount () throws ngs.ErrorMsg
-    {   
-        assertEquals ( 2280633, NGS . openReadCollection ( PrimaryOnly ) . getReadCount () );
-    }
-    
-    @Test
-    public void ReadCollection_getReadRange () throws ngs.ErrorMsg
-    {   
-        ngs . ReadIterator readIt = NGS . openReadCollection ( PrimaryOnly ) . getReadRange ( 2, 3 );
-        assertTrue ( readIt . nextRead () );
-        assertEquals ( PrimaryOnly + ".R.2", readIt . getReadId () );
-    }
-
-// Read 
-
-    ngs.Read getRead ( String id ) throws ngs.ErrorMsg
-    {
-        ngs.ReadCollection run = NGS . openReadCollection ( PrimaryOnly );
-        return run . getRead(id);
-    }
-    
-    @Test
-    public void Read_getReadCategory_full() throws ngs.ErrorMsg
-    {
-        assertEquals( ngs . Read . fullyAligned, getRead( PrimaryOnly + ".R.1" ) . getReadCategory() );
-    }
-    @Test
-    public void Read_getReadCategory_partial() throws ngs.ErrorMsg
-    {
-        assertEquals( ngs . Read . partiallyAligned, getRead( PrimaryOnly + ".R.3" ) . getReadCategory() );
-    }
-    
-    @Test
-    public void Read_getNumFragments() throws ngs.ErrorMsg
-    {
-        assertEquals( 2, getRead( PrimaryOnly + ".R.1" ) . getNumFragments() );
-    }
-    
-    @Test
-    public void Read_fragmentIsAligned_partial() throws ngs.ErrorMsg
-    {
-        ngs . Read read = NGS . openReadCollection ( PrimaryOnly ) . getRead ( PrimaryOnly + ".R.3" );
-        assertEquals( true, read.fragmentIsAligned( 0 ) );
-        assertEquals( false, read.fragmentIsAligned( 1 ) );
-    }
-
-// FragmentIterator
-    @Test
-    public void FragmentIterator_ThrowsBeforeNext() throws ngs.ErrorMsg
-    {
-        try 
-        {
-            getRead( PrimaryOnly + ".R.1" ) . getFragmentId();
-            fail();
-        }
-        catch ( ngs.ErrorMsg e ) {}        
-    }
-    @Test
-    public void FragmentIterator_Next() throws ngs.ErrorMsg
-    {
-        ngs . Read read = getRead( PrimaryOnly + ".R.1" );
-        assertTrue ( read . nextFragment () );
-        read . getReadCategory(); // does not throw
-    }
-
-    @Test
-    public void Read_getFragmentId() throws ngs.ErrorMsg
-    {
-        ngs . Read read = getRead( PrimaryOnly + ".R.1" );
-        assertTrue ( read . nextFragment () );
-        assertEquals( PrimaryOnly + ".FR0.1", read . getFragmentId () );
-    }
-    
-    @Test
-    public void getFragmentBases() throws ngs.ErrorMsg
-    {
-        ngs . Read read = getRead( PrimaryOnly + ".R.1" );
-        assertTrue ( read . nextFragment () );
-        assertTrue ( read . nextFragment () );
-        assertEquals( "GGTA", read . getFragmentBases ( 2, 4 ) );
-    }
-    
-    @Test
-    public void getFragmentQualities() throws ngs.ErrorMsg
-    {
-        ngs . Read read = getRead( PrimaryOnly + ".R.1" );
-        assertTrue ( read . nextFragment () );
-        assertTrue ( read . nextFragment () );
-        assertEquals( "@DDA", read . getFragmentQualities ( 2, 4 ) );
-    }
-
-    
-// Alignment
-    
-    ngs.Alignment getAlignment ( String id ) throws ngs.ErrorMsg
-    {
-        ngs.ReadCollection run = NGS . openReadCollection ( PrimaryOnly );
-        return run . getAlignment(id);
-    }
-    ngs.Alignment getSecondaryAlignment ( String id ) throws ngs.ErrorMsg
-    {
-        ngs.ReadCollection run = NGS . openReadCollection ( WithSecondary );
-        return run . getAlignment(id);
-    }
-
-    @Test
-    public void Alignment_getAlignmentId() throws ngs.ErrorMsg
-    {
-        assertEquals( PrimaryOnly + ".PA.1", getAlignment ( PrimaryOnly + ".PA.1" ).getAlignmentId() );
-    }
-    
-    @Test
-    public void Alignment_getReferenceSpec() throws ngs.ErrorMsg
-    {
-        assertEquals( "supercont2.1", getAlignment ( PrimaryOnly + ".PA.1" ).getReferenceSpec() );
-    }
-
-    @Test
-    public void Alignment_getMappingQuality() throws ngs.ErrorMsg
-    {
-        assertEquals( 60, getAlignment ( PrimaryOnly + ".PA.1" ).getMappingQuality() );
-    }
-    
-    @Test
-    public void Alignment_getReferenceBases() throws ngs.ErrorMsg
-    {
-        assertEquals( "ACTCGACATTCTGTCTTCGACCTATCTTTCTCCTCTCCCAGTCATCGCCCAGTAGAATTACCAGGCAATGAACCACGGCCTTTCATCCCAACGGCACAGCA", 
-                      getAlignment ( PrimaryOnly + ".PA.1" ).getReferenceBases() );
-    }
-    
-    @Test
-    public void Alignment_getReadGroup() throws ngs.ErrorMsg
-    {
-        assertEquals( "C1ELY.6", getAlignment ( PrimaryOnly + ".PA.1" ).getReadGroup() );
-    }
-    
-    @Test
-    public void Alignment_getReadId() throws ngs.ErrorMsg
-    {
-        assertEquals( PrimaryOnly + ".R.165753", getAlignment ( PrimaryOnly + ".PA.5" ).getReadId() );
-    }
-
-    @Test
-    public void Alignment_getFragmentId() throws ngs.ErrorMsg
-    {
-        assertEquals( PrimaryOnly + ".FA0.1", getAlignment ( PrimaryOnly + ".PA.1" ) . getFragmentId () );
-    }
-    
-    @Test
-    public void Alignment_getFragmentBases_Raw() throws ngs.ErrorMsg
-    {
-        assertEquals( "TGGATGCTCTGGAAAATCTGAAAAGTGGTGTTTGTAAGGTTTGCTGGCTGCCCATATACCACATGGATGATGGGGCTTTCCATTTTAATGTTGAAGGAGGA", 
-                      getAlignment ( PrimaryOnly + ".PA.4" ).getFragmentBases () );
-    }
-    
-    @Test
-    public void Alignment_getFragmentQualities_Raw() throws ngs.ErrorMsg
-    {
-        assertEquals( "######AA>55;5(;63;;3@;A9??;6..73CDCIDA>DCB>@B=;@B?;;ADAB<DD?1*>@C9:EC?2++A3+F4EEB<E>EEIEDC2?C:;AB+==1", 
-                      getAlignment ( PrimaryOnly + ".PA.4" ).getFragmentQualities () );
-    }
-    
-    @Test
-    public void Alignment_getFragmentBases_Clipped() throws ngs.ErrorMsg
-    {
-        assertEquals( "CTTCAACATTAAAATGGAAAGCCCCATCATCCATGTGGTATATGGGCAGCCAGCAAACCTTACAAACACCACTTTTCAGATTTTCCAGAGCATCCA", 
-                      getAlignment ( PrimaryOnly + ".PA.4" ).getClippedFragmentBases () );
-    }
-    
-    @Test
-    public void Alignment_getFragmentQualities_Clipped() throws ngs.ErrorMsg
-    {
-        assertEquals( "#AA>55;5(;63;;3@;A9??;6..73CDCIDA>DCB>@B=;@B?;;ADAB<DD?1*>@C9:EC?2++A3+F4EEB<E>EEIEDC2?C:;AB+==1", 
-                      getAlignment ( PrimaryOnly + ".PA.4" ).getClippedFragmentQualities () );
-    }
-
-    @Test
-    public void Alignment_getAlignedFragmentBases() throws ngs.ErrorMsg
-    {
-        assertEquals( "ATATGGGTTCACTCCAACAGTGAACCATTCCAAAAGACCTTGCCTGCGTGGCCATCTCCTCACAAACCCACCATCCCGCAACATCTCAGGTATCATACCTT", 
-                      getAlignment ( PrimaryOnly + ".PA.2" ).getAlignedFragmentBases () );
-    }
-    
-    @Test
-    public void Alignment_getAlignmentCategory() throws ngs.ErrorMsg
-    {
-        assertEquals( ngs . Alignment . primaryAlignment, getAlignment ( PrimaryOnly + ".PA.4" ).getAlignmentCategory () );
-    }
-    
-    @Test
-    public void Alignment_getAlignmentPosition() throws ngs.ErrorMsg
-    {
-        assertEquals( 85, getAlignment ( PrimaryOnly + ".PA.1" ).getAlignmentPosition () );
-    }
-    
-    @Test
-    public void Alignment_getAlignmentLength() throws ngs.ErrorMsg
-    {
-        assertEquals( 101, getAlignment ( PrimaryOnly + ".PA.1" ).getAlignmentLength () );
-    }
-    
-    @Test
-    public void Alignment_getIsReversedOrientation_False() throws ngs.ErrorMsg
-    {
-        assertFalse( getAlignment ( PrimaryOnly + ".PA.1" ).getIsReversedOrientation () );
-    }
-    @Test
-    public void Alignment_getIsReversedOrientation_True() throws ngs.ErrorMsg
-    {
-        assertTrue( getAlignment ( PrimaryOnly + ".PA.2" ).getIsReversedOrientation () );
-    }
-    
-    @Test
-    public void Alignment_getSoftClip_None() throws ngs.ErrorMsg
-    {
-        ngs . Alignment al = getAlignment ( PrimaryOnly + ".PA.1" );
-        assertEquals( 0, al . getSoftClip ( ngs . Alignment . clipLeft ) );
-        assertEquals( 0, al . getSoftClip ( ngs . Alignment . clipRight ) );
-    }
-    @Test
-    public void Alignment_getSoftClip_Left() throws ngs.ErrorMsg
-    {
-        ngs . Alignment al = getAlignment ( PrimaryOnly + ".PA.4" );
-        assertEquals( 5, al . getSoftClip ( ngs . Alignment . clipLeft ) );
-        assertEquals( 0, al . getSoftClip ( ngs . Alignment . clipRight ) );
-    }
-    @Test
-    public void Alignment_getSoftClip_Right() throws ngs.ErrorMsg
-    {
-        ngs . Alignment al = getAlignment ( PrimaryOnly + ".PA.10" );
-        assertEquals( 0,  al . getSoftClip ( ngs . Alignment . clipLeft ) );
-        assertEquals( 13, al . getSoftClip ( ngs . Alignment . clipRight ) );
-    }
-    
-    @Test
-    public void Alignment_getTemplateLength() throws ngs.ErrorMsg
-    {
-        assertEquals( 201, getAlignment ( PrimaryOnly + ".PA.1" ).getTemplateLength () );
-    }
-    
-    @Test
-    public void Alignment_getShortCigar_Unclipped() throws ngs.ErrorMsg
-    {
-        assertEquals( "5S96M", getAlignment ( PrimaryOnly + ".PA.4" ).getShortCigar ( false ) );
-    }
-    @Test
-    public void Alignment_getShortCigar_Clipped() throws ngs.ErrorMsg
-    {
-        assertEquals( "96M", getAlignment ( PrimaryOnly + ".PA.4" ).getShortCigar ( true ) );
-    }
-
-    @Test
-    public void Alignment_getLongCigar_Unclipped() throws ngs.ErrorMsg
-    {
-        assertEquals( "5S1X8=1X39=1X46=", getAlignment ( PrimaryOnly + ".PA.4" ).getLongCigar ( false ) );
-    }
-    @Test
-    public void Alignment_getLongCigar_Clipped() throws ngs.ErrorMsg
-    {
-        assertEquals( "1X8=1X39=1X46=", getAlignment ( PrimaryOnly + ".PA.4" ).getLongCigar ( true ) );
-    }
-    
-    @Test
-    public void Alignment_hasMate_Primary_No() throws ngs.ErrorMsg
-    {
-        assertFalse( getAlignment ( PrimaryOnly + ".PA.99" ) . hasMate ( ) );
-    }
-    @Test
-    public void Alignment_hasMate_Primary_Yes() throws ngs.ErrorMsg
-    {
-        assertTrue( getAlignment ( PrimaryOnly + ".PA.1" ) . hasMate ( ) );
-    }
-    @Test
-    public void Alignment_hasMate_Secondary() throws ngs.ErrorMsg
-    {
-        assertFalse( getSecondaryAlignment ( WithSecondary + ".SA.169" ) . hasMate ( ) );
-    }
-
-    @Test
-    public void Alignment_getMateAlignmentId() throws ngs.ErrorMsg
-    {
-        assertEquals ( PrimaryOnly + ".PA.2", getAlignment ( PrimaryOnly + ".PA.1" ) . getMateAlignmentId ( ) );
-    }
-    @Test
-    public void Alignment_getMateAlignmentId_Missing() throws ngs.ErrorMsg
-    {
-        try
-        {
-            getAlignment ( PrimaryOnly + ".PA.99" ) . getMateAlignmentId ( );
-            fail();
-        }
-        catch ( ngs.ErrorMsg e ) {}        
-    }
-    @Test
-    public void Alignment_getMateAlignmentId_SecondaryThrows() throws ngs.ErrorMsg
-    {
-        try
-        {
-            getSecondaryAlignment ( WithSecondary + ".SA.172" ) . getMateAlignmentId ( );
-            fail();
-        }
-        catch ( ngs.ErrorMsg e ) {}        
-    }
-    
-    @Test
-    public void Alignment_getMateAlignment() throws ngs.ErrorMsg
-    {
-        assertEquals ( PrimaryOnly + ".PA.2",  getAlignment ( PrimaryOnly + ".PA.1" ) . getMateAlignment () . getAlignmentId () );
-    }
-    @Test
-    public void Alignment_getMateAlignment_Missing() throws ngs.ErrorMsg
-    {
-        try 
-        {
-            getAlignment ( PrimaryOnly + ".PA.99" ) . getMateAlignment ();
-            fail();
-        }
-        catch ( ngs.ErrorMsg e ) {}        
-    }
-    @Test
-    public void Alignment_getMateAlignment_SecondaryThrows() throws ngs.ErrorMsg
-    {
-        try 
-        {
-            getSecondaryAlignment ( WithSecondary +".SA.172" ) . getMateAlignment ();
-            fail();
-        }
-        catch ( ngs.ErrorMsg e ) {}        
-    }
-    
-    @Test
-    public void Alignment_getMateReferenceSpec() throws ngs.ErrorMsg
-    {
-        assertEquals ( "supercont2.1",  getAlignment ( PrimaryOnly + ".PA.1" ) . getMateReferenceSpec () );
-    }
-    
-    @Test
-    public void Alignment_getMateIsReversedOrientation_Yes() throws ngs.ErrorMsg
-    {
-        assertTrue( getAlignment ( PrimaryOnly + ".PA.1" ) . getMateIsReversedOrientation () );
-    }
-    @Test
-    public void Alignment_getMateIsReversedOrientation_No() throws ngs.ErrorMsg
-    {
-        assertFalse( getAlignment ( PrimaryOnly + ".PA.2" ) . getMateIsReversedOrientation () );
-    }
-    
-    @Test
-    public void Alignment_isPaired_MultiFragmentsPerSpot() throws ngs.ErrorMsg
-    {
-        ngs . ReadCollection readCollection = NGS . openReadCollection ( PrimaryOnly );
-        ngs . Alignment alignment = readCollection . getAlignment ( PrimaryOnly + ".PA.1" );
-        assertTrue( alignment.isPaired() );
-        
-        alignment = readCollection . getAlignment ( PrimaryOnly + ".PA.2" );
-        assertTrue( alignment.isPaired() );
-        
-        // has unaligned mate
-        alignment = readCollection . getAlignment ( PrimaryOnly + ".PA.6" );
-        assertTrue( alignment.isPaired() );
-    }
-    
-    @Test
-    public void Alignment_isPaired_SingleFragmentPerSpot() throws ngs.ErrorMsg
-    {
-        ngs . ReadCollection readCollection = NGS . openReadCollection ( SingleFragmentPerSpot );
-        ngs . Alignment alignment = readCollection . getAlignment ( SingleFragmentPerSpot + ".PA.1" );
-        assertFalse( alignment.isPaired() );
-    }
-
-
-// ReferenceSequence
-    public ngs . ReferenceSequence getReferenceSequence() throws ngs.ErrorMsg
-    {
-        return NGS . openReferenceSequence ( "NC_011752.1" );
-    }
-
-    @Test
-    public void ReferenceSequence_getCanonicalName () throws ngs.ErrorMsg
-    {
-        assertEquals ( "gi|218511148|ref|NC_011752.1|", getReferenceSequence () . getCanonicalName () );
-    }
-    
-    @Test
-    public void ReferenceSequence_getIsCircular_Yes() throws ngs.ErrorMsg
-    {
-        assertTrue( getReferenceSequence () . getIsCircular () );
-    }
-    
-    @Test
-    public void ReferenceSequence_getLength() throws ngs.ErrorMsg
-    {
-        assertEquals ( 72482, getReferenceSequence () . getLength() );
-    }
-    
-    @Test
-    public void ReferenceSequence_getReferenceBases() throws ngs.ErrorMsg
-    {
-        assertEquals ( "ATAAA", getReferenceSequence () . getReferenceBases ( 72482 - 5 ) );
-    }
-    @Test
-    public void ReferenceSequence_getReferenceBases_Length() throws ngs.ErrorMsg
-    {
-        assertEquals ( "TACA", getReferenceSequence () . getReferenceBases ( 4998, 4 ) );
-    }
-    
-    @Test
-    public void ReferenceSequence_getReferenceChunk() throws ngs.ErrorMsg
-    {
-        assertEquals ( "TAATA", getReferenceSequence () . getReferenceChunk ( 5000 - 5, 5 ) );
-    }
-    @Test
-    public void ReferenceSequence_getReferenceChunk_Length () throws ngs.ErrorMsg
-    {
-        assertEquals ( "TAATA", getReferenceSequence () . getReferenceChunk ( 5000 - 5, 10 ) );
-    }
-
-
-// Reference
-    public ngs . Reference getReference() throws ngs.ErrorMsg
-    {
-        return NGS . openReadCollection ( PrimaryOnly ) . getReference ( "supercont2.1" );
-    }
-
-    @Test
-    public void Reference_getCommonName () throws ngs.ErrorMsg
-    {
-        assertEquals ( "supercont2.1", getReference () . getCommonName () );
-    }
-    
-    @Test
-    public void Reference_getCanonicalName () throws ngs.ErrorMsg
-    {
-        assertEquals ( "NC_000007.13", NGS . openReadCollection ( "SRR821492" ) . getReference ( "chr7" ) . getCanonicalName () );
-    }
-    
-    @Test
-    public void Reference_getIsCircular_No() throws ngs.ErrorMsg
-    {
-        assertFalse( getReference () . getIsCircular () );
-    }
-    @Test
-    public void Reference_getIsCircular_Yes() throws ngs.ErrorMsg
-    {
-        assertTrue( NGS . openReadCollection ( "SRR821492" ) . getReference ( "chrM" ) . getIsCircular () );
-    }
-    
-    @Test
-    public void Reference_getLength() throws ngs.ErrorMsg
-    {
-        assertEquals ( 2291499l, getReference () . getLength() );
-    }
-    
-    @Test
-    public void Reference_getReferenceBases() throws ngs.ErrorMsg
-    {
-        assertEquals ( "ATCTG", getReference () . getReferenceBases ( 2291499l - 5 ) );
-    }
-    @Test
-    public void Reference_getReferenceBases_Length() throws ngs.ErrorMsg
-    {
-        assertEquals ( "GCGCTATGAC", getReference () . getReferenceBases ( 9000, 10 ) );
-    }
-    
-    @Test
-    public void Reference_getReferenceChunk() throws ngs.ErrorMsg
-    {
-        assertEquals ( "CTAGG", getReference () . getReferenceChunk ( 5000 - 5, 5 ) );
-    }
-    @Test
-    public void Reference_getReferenceChunk_Length () throws ngs.ErrorMsg
-    {
-        assertEquals ( "GCGCTATGAC", getReference () . getReferenceChunk ( 9000, 10 ) );
-    }
-    
-    @Test
-    public void Reference_getAlignment() throws ngs.ErrorMsg
-    {
-        assertEquals ( PrimaryOnly + ".PA.1", getReference () . getAlignment ( PrimaryOnly + ".PA.1" ) . getAlignmentId () );
-    }
-    
-//TODO: getPileups
-//TODO: getPileupSlice
-//TODO: getPileupSlice_Filtered
-
-// ReferenceIterator
-
-    @Test
-    public void ReferenceIterator_ThrowBeforeNext() throws ngs.ErrorMsg
-    {
-        ngs.ReferenceIterator it = NGS . openReadCollection ( PrimaryOnly ) . getReferences ();
-        try 
-        {
-            it . getCommonName ();
-            fail();
-        }
-        catch ( ngs.ErrorMsg e ) {}        
-    }
-    
-    @Test
-    public void ReferenceIterator_Next() throws ngs.ErrorMsg
-    {
-        ngs.ReferenceIterator it = NGS . openReadCollection ( PrimaryOnly ) . getReferences ();
-        assertTrue ( it . nextReference () );
-        assertEquals ( "supercont2.1", it . getCommonName () );
-    }
-    
-// AlignmentIterator from Reference (ReferenceWindow)
-    @Test
-    public void ReferenceWindow () throws ngs.ErrorMsg
-    {
-        ngs.AlignmentIterator it = NGS . openReadCollection ( WithSecondary ) 
-                                        . getReference ( "gi|169794206|ref|NC_010410.1|" )
-                                        . getAlignments ( ngs . Alignment . all ); 
-        assertTrue ( it . nextAlignment () );  
-    
-        // the first 2 secondary alignments' locations on the list: #34, #61
-        long count = 1;
-        while ( it . nextAlignment() )
-        {
-            if ( it . getAlignmentCategory()  == ngs . Alignment . secondaryAlignment )
-                break;
-            ++count;
-        }
-        assertEquals ( 34, count);    
-        while ( it . nextAlignment() )
-        {
-            if ( it . getAlignmentCategory()  == ngs . Alignment . secondaryAlignment )
-                break;
-            ++count;
-        }
-        assertEquals ( 61, count);    
-    }
-    
-    @Test
-    public void ReferenceWindow_Slice () throws ngs.ErrorMsg
-    {
-        ngs.AlignmentIterator it = NGS . openReadCollection ( WithSecondary ) 
-                                        . getReference ( "gi|169794206|ref|NC_010410.1|" )
-                                        . getAlignmentSlice ( 516000, 100000 ); 
-        assertTrue ( it . nextAlignment () );  
-        assertEquals ( WithSecondary + ".PA.33", it. getAlignmentId () );
-        assertTrue ( it . nextAlignment () );  
-        assertEquals ( WithSecondary + ".PA.34", it. getAlignmentId () );
-        assertTrue ( it . nextAlignment () );  
-        assertEquals ( WithSecondary + ".SA.169", it. getAlignmentId () ); //secondary
-        assertTrue ( it . nextAlignment () );  
-        assertEquals ( WithSecondary + ".PA.35", it. getAlignmentId () );
-        assertFalse ( it . nextAlignment () );  
-    }
-   
-    @Test
-    public void ReferenceWindow_Slice_Filtered_Category () throws ngs.ErrorMsg
-    {
-        ngs.AlignmentIterator it = NGS . openReadCollection ( WithSecondary ) 
-                                        . getReference ( "gi|169794206|ref|NC_010410.1|" )
-                                        . getAlignmentSlice ( 516000, 100000, ngs . Alignment . primaryAlignment ); 
-        assertTrue ( it . nextAlignment () );  
-        assertEquals ( WithSecondary + ".PA.33", it. getAlignmentId () );
-        assertTrue ( it . nextAlignment () );  
-        assertEquals ( WithSecondary + ".PA.34", it. getAlignmentId () );
-        assertTrue ( it . nextAlignment () );  
-        assertEquals ( WithSecondary + ".PA.35", it. getAlignmentId () ); // no secondary
-        assertFalse ( it . nextAlignment () );  
-    }
-    
-    @Test
-    public void ReferenceWindow_Slice_Filtered_Start_Within_Slice () throws ngs.ErrorMsg
-    {
-        ngs.Reference ref = NGS . openReadCollection ( WithCircularRef )
-                                 . getReference ( "NC_012920.1" );
-        ngs.AlignmentIterator it = ref . getFilteredAlignmentSlice ( 0, ref.getLength(), Alignment . all, Alignment . startWithinSlice, 0 );
-    
-        assertTrue ( it . nextAlignment () );
-        long numberOfFilteredAlignments = 1;
-        long lastAlignmentPosition = it.getAlignmentPosition();
-        while ( it . nextAlignment () ) {
-            long currentPosition = it.getAlignmentPosition();
-            
-            String errorMsg = "Sorting violated. Last position (" + lastAlignmentPosition + ") is higher than current one (" + currentPosition + ")";
-            assertTrue ( errorMsg, lastAlignmentPosition <= currentPosition );
-            
-            lastAlignmentPosition = currentPosition;
-            numberOfFilteredAlignments++;
-        }
-        
-        it = ref . getFilteredAlignmentSlice ( 0, ref.getLength(), Alignment . all, 0, 0 );
-        long numberOfUnfilteredAlignments = 0;
-        while ( it . nextAlignment () ) {
-            numberOfUnfilteredAlignments++;
-        }
-        
-        assertEquals ( numberOfUnfilteredAlignments, 12317 );
-        assertEquals ( numberOfFilteredAlignments, 12316 );
-    }
-    
-    // ReadGroup
-    @Test
-    public void ReadGroup_getName () throws ngs.ErrorMsg
-    {
-        ngs.ReadGroup gr = NGS . openReadCollection ( PrimaryOnly ) . getReadGroup ( "C1ELY.6" );
-        assertEquals( "C1ELY.6", gr . getName () );
-    }
-    @Test
-    public void ReadGroup_has () throws ngs.ErrorMsg
-    {
-        assert ( NGS.openReadCollection( PrimaryOnly ).hasReadGroup ( "C1ELY.6" ) );
-        assert ( ! NGS.openReadCollection( PrimaryOnly ).hasReadGroup ( "non-existent read-group" ) );
-    }
-    @Test
-    public void ReadGroup_getStatistics() throws ngs.ErrorMsg
-    {
-        ngs.ReadGroup gr = NGS . openReadCollection ( WithGroups ) . getReadGroup ( "GS57510-FS3-L03" );
-
-        ngs . Statistics stats = gr . getStatistics ();
-    
-        assertEquals ( 34164461870L, stats . getAsU64 ( "BASE_COUNT" ) );
-        assertEquals ( 34164461870L, stats . getAsU64 ( "BIO_BASE_COUNT" ) );
-        assertEquals ( 488063741L,   stats . getAsU64 ( "SPOT_COUNT" ) );
-        assertEquals ( 5368875807L,  stats . getAsU64 ( "SPOT_MAX" ) );
-        assertEquals ( 4880812067L,  stats . getAsU64 ( "SPOT_MIN" ) );        
-    }
-
-/* ReadGroup no longer supports Reads
-    @Test
-    public void ReadGroup_getRead () throws ngs.ErrorMsg
-    {
-        ngs.ReadGroup gr = NGS . openReadCollection ( PrimaryOnly ) . getReadGroup ( "C1ELY.6" );
-        ngs.Read r = gr . getRead ( PrimaryOnly + ".R.1" );
-        assertEquals ( "C1ELY.6", r . getReadGroup () );
-    }
-    
-    @Test
-    public void ReadGroup_getReads () throws ngs.ErrorMsg
-    {
-        ngs.ReadGroup gr = NGS . openReadCollection ( PrimaryOnly ) . getReadGroup ( "C1ELY.6" );
-        ngs.ReadIterator r = gr . getReads ( ngs . Read . partiallyAligned );
-    }
-*/
-    
-    // ReadGroupIterator
-    @Test
-    public void ReadGroupIterator_ThrowBeforeNext() throws ngs.ErrorMsg
-    {
-        ngs.ReadGroupIterator it = NGS . openReadCollection ( PrimaryOnly ) . getReadGroups ();
-        try 
-        {
-            it . getName ();
-            fail();
-        }
-        catch ( ngs.ErrorMsg e ) {}        
-    }
-    
-    @Test
-    public void ReadGroupIterator_Next() throws ngs.ErrorMsg
-    {
-        ngs.ReadGroupIterator it = NGS . openReadCollection ( PrimaryOnly ) . getReadGroups ();
-        assertTrue ( it . nextReadGroup () );
-        String name = it . getName ();
-/*
-        ngs.ReadIterator r = it . getReads ( ngs . Read . all );
-        assertTrue ( r . nextRead () );
-        assertEquals ( name, r . getReadGroup () );
-*/
-    }    
-}
diff --git a/test/ngs-java/ngs_test_lib_load.java b/test/ngs-java/ngs_test_lib_load.java
deleted file mode 100644
index 0f3c93b..0000000
--- a/test/ngs-java/ngs_test_lib_load.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ==============================================================================
-*
-*/
-
-
-package gov.nih.nlm.ncbi.ngs;
-
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
-
-import gov.nih.nlm.ncbi.ngs.LibManager;
-import gov.nih.nlm.ncbi.ngs.Logger;
-import gov.nih.nlm.ncbi.ngs.Version;
-import gov.nih.nlm.ncbi.ngs.error.LibraryIncompatibleVersionError;
-import gov.nih.nlm.ncbi.ngs.error.LibraryLoadError;
-import gov.nih.nlm.ncbi.ngs.error.LibraryNotFoundError;
-import gov.nih.nlm.ncbi.ngs.error.cause.ConnectionProblemCause;
-import gov.nih.nlm.ncbi.ngs.error.cause.DownloadDisabledCause;
-import gov.nih.nlm.ncbi.ngs.error.cause.InvalidLibraryCause;
-import gov.nih.nlm.ncbi.ngs.error.cause.JvmErrorCause;
-import gov.nih.nlm.ncbi.ngs.error.cause.OutdatedJarCause;
-import gov.nih.nlm.ncbi.ngs.error.cause.PrereleaseReqLibCause;
-import gov.nih.nlm.ncbi.ngs.error.cause.UnsupportedArchCause;
-import org.junit.Test;
-import org.junit.Before;
-import org.junit.After;
-
-import ngs.ReadCollection;
-import ngs.Alignment;
-import ngs.ErrorMsg;
-
-import gov.nih.nlm.ncbi.ngs.NGS;
-
-import java.lang.String;
-import java.lang.System;
-import java.lang.Throwable;
-import java.util.TreeMap;
-
-//The purpose of this suite is to verify native library load code,
-//including testing various error cases.
-public class ngs_test_lib_load {
-    static String test_lib = "test_lib";
-    static String test_lib_ver = "1.1.0";
-    LibManager libManager;
-    Logger.Level savedLogLevel;
-    String savedSysLoadLibrary;
-    String savedSysNoLibDownload;
-
-    @Before
-    public void saveSysVars() {
-        savedLogLevel = Logger.getLevel();
-        savedSysLoadLibrary = System.getProperty("vdb.System.loadLibrary");
-        savedSysNoLibDownload = System.getProperty("vdb.System.noLibraryDownload");
-    }
-
-    @Before
-    public void setupEnv() {
-        Logger.setLevel(Logger.Level.OFF);
-        System.setProperty("vdb.System.loadLibrary", "0");
-    }
-
-    @After
-    public void restoreSysVars() {
-        Logger.setLevel(savedLogLevel);
-        sysSetProp("vdb.System.loadLibrary", savedSysLoadLibrary);
-        sysSetProp("vdb.System.noLibraryDownload", savedSysNoLibDownload);
-    }
-
-    private void sysSetProp(String name, String value) {
-        if (value != null)
-            System.setProperty(name, value);
-        else
-            System.clearProperty(name);
-    }
-
-    private void createLibManager() {
-        libManager = new LibManager(
-                new String[] { test_lib },
-                new String[] { test_lib_ver }
-        );
-        libManager.mocksEnabled = true;
-        libManager.mockLocationVersions = new TreeMap();
-    }
-
-    private Throwable loadAndCatch(String libName) {
-        Throwable exception = null;
-        try {
-            libManager.loadLibrary(test_lib);
-        } catch (Throwable e) {
-            exception = e;
-        }
-        return exception;
-    }
-
-    @Test
-    public void LibManagerMock_Ok()
-    {
-        createLibManager();
-        libManager.mockLocationVersions.put(LibManager.Location.LIBPATH, new Version(test_lib_ver));
-        libManager.mockLoadedLibraryVersion = test_lib_ver;
-
-        assertEquals(loadAndCatch(test_lib), null);
-    }
-
-    @Test
-    public void LibManagerMock_NotFound_NoDownload()
-    {
-        System.setProperty("vdb.System.noLibraryDownload", "1");
-        createLibManager();
-        Throwable e = loadAndCatch(test_lib);
-        assertNotNull(e);
-        assertEquals(LibraryNotFoundError.class, e.getClass());
-        assertNotNull(e.getCause());
-        assertEquals(DownloadDisabledCause.class, e.getCause().getClass());
-    }
-
-    @Test
-    public void LibManagerMock_NotFound_DownloadFail()
-    {
-        createLibManager();
-        libManager.mockDownloadStatus = DownloadManager.DownloadResult.FAILED;
-
-        Throwable e = loadAndCatch(test_lib);
-        assertNotNull(e);
-        assertEquals(LibraryNotFoundError.class, e.getClass());
-        assertNotNull(e.getCause());
-        assertEquals(ConnectionProblemCause.class, e.getCause().getClass());
-    }
-
-    @Test
-    public void LibManagerMock_NotFound_DownloadUnsupportedOs()
-    {
-        createLibManager();
-        libManager.mockDownloadStatus = DownloadManager.DownloadResult.UNSUPPORTED_OS;
-
-        Throwable e = loadAndCatch(test_lib);
-        assertNotNull(e);
-        assertEquals(LibraryNotFoundError.class, e.getClass());
-        assertNotNull(e.getCause());
-        assertEquals(UnsupportedArchCause.class, e.getCause().getClass());
-    }
-
-    @Test
-    public void LibManagerMock_LoadFailed_BadDownloadFile()
-    {
-        createLibManager();
-        libManager.mockDownloadStatus = DownloadManager.DownloadResult.SUCCESS;
-        libManager.mockLoadException = new UnsatisfiedLinkError();
-
-        Throwable e = loadAndCatch(test_lib);
-        assertNotNull(e);
-        assertEquals(LibraryLoadError.class, e.getClass());
-        assertNotNull(e.getCause());
-        assertEquals(JvmErrorCause.class, e.getCause().getClass());
-    }
-
-    @Test
-    public void LibManagerMock_LoadFailed_GetVersionFailed()
-    {
-        createLibManager();
-        libManager.mockDownloadStatus = DownloadManager.DownloadResult.SUCCESS;
-
-        Throwable e = loadAndCatch(test_lib);
-        assertNotNull(e);
-        assertEquals(LibraryLoadError.class, e.getClass());
-        assertNotNull(e.getCause());
-        assertEquals(InvalidLibraryCause.class, e.getCause().getClass());
-    }
-
-    @Test
-    public void LibManagerMock_IncompatibleVers_DownloadDisabled()
-    {
-        System.setProperty("vdb.System.noLibraryDownload", "1");
-        String incompVersions[] = new String[] { "0.0.1", "1.0.0", "2.0.0" };
-        for (String version : incompVersions) {
-            createLibManager();
-            libManager.mockLocationVersions.put(LibManager.Location.LIBPATH, new Version(version));
-            libManager.mockLoadedLibraryVersion = version;
-
-            Throwable e = loadAndCatch(test_lib);
-            assertNotNull(e);
-            assertEquals(LibraryIncompatibleVersionError.class, e.getClass());
-            assertNotNull(e.getCause());
-            assertEquals(DownloadDisabledCause.class, e.getCause().getClass());
-        }
-    }
-
-    @Test
-    public void LibManagerMock_IncompatibleVers_DownloadPrereleaseVers()
-    {
-        String incompVersions[] = new String[] { "0.0.1", "1.0.0" };
-        for (String version : incompVersions) {
-            createLibManager();
-            libManager.mockDownloadStatus = DownloadManager.DownloadResult.SUCCESS;
-            libManager.mockLocationVersions.put(LibManager.Location.DOWNLOAD, new Version(version));
-            libManager.mockLoadedLibraryVersion = version;
-
-            Throwable e = loadAndCatch(test_lib);
-            assertNotNull(e);
-            assertEquals(LibraryIncompatibleVersionError.class, e.getClass());
-            assertNotNull(e.getCause());
-            assertEquals(PrereleaseReqLibCause.class, e.getCause().getClass());
-        }
-    }
-
-    @Test
-    public void LibManagerMock_IncompatibleVers_Download_OutdatedJar()
-    {
-        String version = "2.0.0";
-        createLibManager();
-        libManager.mockDownloadStatus = DownloadManager.DownloadResult.SUCCESS;
-        libManager.mockLocationVersions.put(LibManager.Location.DOWNLOAD, new Version(version));
-        libManager.mockLoadedLibraryVersion = version;
-
-        Throwable e = loadAndCatch(test_lib);
-        assertNotNull(e);
-        assertEquals(LibraryIncompatibleVersionError.class, e.getClass());
-        assertNotNull(e.getCause());
-        assertEquals(OutdatedJarCause.class, e.getCause().getClass());
-    }
-}
\ No newline at end of file
diff --git a/test/ngs-pileup/Makefile b/test/ngs-pileup/Makefile
new file mode 100644
index 0000000..03ab186
--- /dev/null
+++ b/test/ngs-pileup/Makefile
@@ -0,0 +1,137 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/ngs-pileup
+
+TEST_TOOLS = \
+    test-ngs-pileup
+
+include $(TOP)/build/Makefile.env
+
+$(TEST_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
+
+#-------------------------------------------------------------------------------
+# test-ngs-pileup
+#
+TEST_NGS_PILEUP_SRC = \
+	test-ngs-pileup 
+
+TEST_NGS_PILEUP_OBJ = \
+	$(addsuffix .$(OBJX),$(TEST_NGS_PILEUP_SRC))
+    
+TEST_NGS_PILEUP_LIB =   \
+	-sngs-c++           \
+	-sncbi-ngs-c++      \
+	-sncbi-vdb-static   \
+	-skapp              \
+    -sktst              \
+
+$(TEST_BINDIR)/test-ngs-pileup: $(TEST_NGS_PILEUP_OBJ)
+	$(LP) --exe -o $@ $^ $(TEST_NGS_PILEUP_LIB)
+
+#-------------------------------------------------------------------------------
+# slowtests: match output vs sra-pileup
+#
+
+slowtests: diff-vs-sra-pileup
+
+diff-vs-sra-pileup:
+	-@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 1.0 SRR833251
+	@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 2.0 SRR1166393
+	@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 3.0 ERR334733                # ILLUMINA
+	@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 4.0 SRR1068006
+	@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 5.0 SRR619510                # ABSOLID REF_ROWS=36172
+	-@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 6.0 SRR1251988               # SEC_ROWS=198
+	@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 7.0 SRR1186012               # ION_TORRENT
+	-@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 8.1 SRR556739 -r chrY # COMPLETE_GENOMICS
+	-@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 8.2 SRR556739 -r chrM # COMPLETE_GENOMICS, circular reference
+	@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 9.0 SRR341578 -r NC_011752.1         #:19900-20022
+
+onediff:
+	@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 9.1 SRR341578 -r NC_011752.1:19900-20022
+
+#alignment selection:
+#TODO: multiple references in one accession
+#TODO: multiple accessions with overlapping alignments
+#TODO: filter by reference (-r ref) using canonic name
+#TODO: filter by reference (-r ref) using common name 
+#TODO: filter by multiple references (-r ref1 -r ref2)
+#TODO: filter by position on the reference (-r ref:from-to)
+#TODO: filter by multiple positions on the same reference (-r ref:from1-to1 -r ref:from2-to2)
+#TODO: primary alignment table only (-t p)
+#TODO: secondary alignment table only (-t s)
+#TODO: evidence  table only (-t e)
+#TODO: include duplicates (-d 1)
+#TODO: do not include duplicates (-d 0) NB: broken in sra-pileup
+#TODO: minimum mapq value (-q min)
+
+#output control:
+#TODO: omit qualities (-n)
+
+#output file control:
+#TODO: redirect output to a file (-o)
+#TODO: bzip2 output (--bzip2)
+#TODO: gzip output (--gzip)
+
+# hidden options:
+#TODO: output alignment information (-i)
+# any more?
+
+#not sure if these are needed:
+#  -p|--spotgroups <spotgroups-modes>  divide by spotgroups 
+#  -e|--seqname                     use original seq-name 
+#  --minmismatch                    min percent of mismatches used in function 
+#                                   mismatch, default is 5% 
+#  --merge-dist                     If adjacent slices are closer than this,  
+#                                   they are merged and skiplist is created.  
+#                                   a value of zero disables the feature, 
+#                                   default is 10000 
+#  --function ref                   list references 
+#  --function ref-ex                list references coverage 
+#  --function count                 sort pileup with counters 
+#  --function stat                  strand/tlen statistic 
+#  --function mismatch              only lines with mismatch 
+#  --function index                 list deletion counts 
+#  --function varcount              variation counters:  ref-name, ref-pos, 
+#                                   ref-base, coverage,  mismatch A, mismatch C, 
+#                                   mismatch G, mismatch T, deletes, inserts, ins 
+#                                   after A, ins after C, ins after G, ins 
+#                                   after T 
+#  --function deletes               list deletions greater then 20 
+#
+#Grouping of accessions into artificial spotgroups:
+#  sra-pileup SRRXXXXXX=a SRRYYYYYY=b SRRZZZZZZ=a
+
+
+
+.PHONY: diff-vs-sra-pileup
diff --git a/test/ngs-pileup/runtestcase.sh b/test/ngs-pileup/runtestcase.sh
new file mode 100755
index 0000000..b28c39b
--- /dev/null
+++ b/test/ngs-pileup/runtestcase.sh
@@ -0,0 +1,90 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+#echo "$0 $*"
+
+# $1 - path to sra tools (sra-pileup, ngs-pileup)
+# $2 - work directory (actual results and temporaries created under actual/)
+# $3 - test case ID
+# $4, $5, ... - command line options for pileup programs 
+#
+# return codes:
+# 0 - passed
+# 1 - could not create temp dir
+# 2 - unexpected return code from sra-pileup 
+# 3 - unexpected return code from ngs-pileup 
+# 4 - outputs differ
+
+BINDIR=$1
+WORKDIR=$2
+CASEID=$3
+shift 3
+CMDLINE=$*
+
+SRA_PILEUP="$BINDIR/sra-pileup"
+NGS_PILEUP="$BINDIR/ngs-pileup"
+TEMPDIR=$WORKDIR/actual/$CASEID
+
+printf "running $CASEID: "
+
+mkdir -p $TEMPDIR
+rm -rf $TEMPDIR/*
+if [ "$?" != "0" ] ; then
+    exit 1
+fi
+
+CMD="$SRA_PILEUP $CMDLINE 1>$TEMPDIR/sra.stdout.tmp 2>$TEMPDIR/sra.stderr"
+printf "sra... "
+eval "$CMD"
+if [ "$?" != "0" ] ; then
+    echo "SRA pileup failed. Command executed:"
+    echo $CMD
+    cat $TEMPDIR/sra.stderr
+    exit 2
+fi    
+cut -f 1,2,4 $TEMPDIR/sra.stdout.tmp >$TEMPDIR/sra.stdout 
+   
+CMD="$NGS_PILEUP $CMDLINE 1>$TEMPDIR/ngs.stdout 2>$TEMPDIR/ngs.stderr"
+printf "ngs... "
+eval "$CMD"
+if [ "$?" != "0" ] ; then
+    echo "NGS pileup failed. Command executed:"
+    echo $CMD
+    cat $TEMPDIR/ngs.stderr
+    exit 3
+fi    
+
+printf "diff... "
+diff $TEMPDIR/sra.stdout $TEMPDIR/ngs.stdout >$TEMPDIR/diff
+if [ "$?" != "0" ] ; then
+    cat $TEMPDIR/diff
+    echo "command executed:"
+    echo $CMD
+    exit 4
+fi    
+
+printf "done\n"
+rm -rf $TEMPDIR
+
+exit 0
diff --git a/test/ngs-pileup/test-ngs-pileup.cpp b/test/ngs-pileup/test-ngs-pileup.cpp
new file mode 100644
index 0000000..0711d84
--- /dev/null
+++ b/test/ngs-pileup/test-ngs-pileup.cpp
@@ -0,0 +1,177 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+/**
+* Unit tests for NGS Pileup
+*/
+
+#include <ktst/unit_test.hpp> 
+
+#include <sysalloc.h>
+
+#include <sstream>
+
+#include "../../tools/ngs-pileup/ngs-pileup.cpp"
+
+using namespace std;
+using namespace ncbi::NK;
+
+TEST_SUITE(NgsPileupTestSuite);
+
+class NGSPileupFixture
+{
+public:
+    NGSPileupFixture()
+    {
+        ps . output = & m_str; 
+    }
+    
+    string Run()
+    {
+        NGS_Pileup ( ps ) . Run ();
+        return m_str . str ();
+    }
+    
+    ostringstream m_str;
+    NGS_Pileup::Settings ps;
+};
+
+FIXTURE_TEST_CASE ( NoInput, NGSPileupFixture )
+{
+    Run ();
+    REQUIRE_EQ ( string(), m_str . str() );
+}
+
+FIXTURE_TEST_CASE ( BadInput, NGSPileupFixture )
+{
+    ps . AddInput ( "blah" );
+    REQUIRE_THROW ( Run() );
+    REQUIRE_EQ ( string(), m_str . str() );
+}
+
+FIXTURE_TEST_CASE ( Basic, NGSPileupFixture )
+{
+    ps . AddInput ( "SRR833251" ); // a small accession with primary and secondary alignments
+    string expectedStart = "gi|169794206|ref|NC_010410.1|\t19376\t1\n"; //TODO: expand when pileup prints out more data
+    REQUIRE_EQ ( expectedStart, Run () . substr ( 0, expectedStart . length () ) );
+}
+
+FIXTURE_TEST_CASE ( SingleReference_ByCommonName, NGSPileupFixture )
+{
+    ps . AddInput ( "ERR247027" ); 
+    ps . AddReference ( "Pf3D7_13" );  
+    string expectedStart = "AL844509.2\t1212494\t1"; //TODO: expand when pileup prints out more data
+    string actual = Run ();
+    REQUIRE_EQ ( expectedStart, actual . substr ( 0, expectedStart . length () ) );
+}
+
+FIXTURE_TEST_CASE ( SingleReference_ByCanonicalName, NGSPileupFixture )
+{
+    ps . AddInput ( "ERR247027" ); 
+    ps . AddReference ( "AL844509.2" );  
+    string expectedStart = "AL844509.2\t1212494\t1"; //TODO: expand when pileup prints out more data
+    REQUIRE_EQ ( expectedStart, Run () . substr ( 0, expectedStart . length () ) );
+}
+
+FIXTURE_TEST_CASE ( SingleReference_Slice, NGSPileupFixture )
+{
+    ps . AddInput ( "ERR247027" ); 
+    ps . AddReferenceSlice ( "AL844509.2", 1212492, 3 );  
+    string expected = 
+        "AL844509.2\t1212494\t1\n" /* this position is 1-based */
+        "AL844509.2\t1212495\t1\n";
+        //TODO: expand when pileup prints out more data
+    REQUIRE_EQ ( expected, Run () );
+}
+
+#if 0
+FIXTURE_TEST_CASE ( MultipleReferences, NGSPileupFixture )
+{   
+    ps . AddInput ( "SRR1068024" ); // 38 references
+    const string ref1 = "0000000.72b.NC2_17738";
+    const string ref2 = "0000000.72b.NC2_14823"; // this one should come first in the output 
+    ps . AddReference ( ref1 );
+    ps . AddReference ( ref2 ); 
+    string expectedStart = ref2 + "\t1\t1"; 
+    
+    string res = Run();
+
+    REQUIRE_EQ ( expectedStart, res . substr ( 0, expectedStart . length () ) );
+    REQUIRE_NE ( string :: npos, res. find ( ref2 ) ); 
+}
+
+FIXTURE_TEST_CASE ( MultipleInputs, NGSPileupFixture )
+{   // ERR334733 ERR334777 align against the same reference, ERR334733's position comes first so it has to 
+    // be the first on the output regardless of order of accessions on the command line
+    ps . AddInput ( "ERR334777" ); 
+    ps . AddInput ( "ERR334733" ); 
+    string expectedStart = "FN433596.1\t805952\t1"; // comes from ERR334733
+    string res = Run();
+    REQUIRE_EQ ( expectedStart, res . substr ( 0, expectedStart . length () ) );
+    REQUIRE_NE ( string :: npos, res. find ( "2424446" ) ); // one of the positions from ERR334777
+}
+
+FIXTURE_TEST_CASE ( AllReferencses, NGSPileupFixture )
+{
+    ps . AddInput ( "SRR341578" ); 
+    string expectedStart = "NC_011748.1\t1\t1"; 
+    REQUIRE_EQ ( expectedStart, Run () . substr ( 0, expectedStart . length () ) );
+}
+
+//TODO: multiple input overlapping
+#endif
+//////////////////////////////////////////// Main
+extern "C"
+{
+
+#include <kapp/args.h>
+#include <kfg/config.h>
+
+ver_t CC KAppVersion ( void )
+{
+    return 0x1000000;
+}
+rc_t CC UsageSummary (const char * progname)
+{
+    return 0;
+}
+
+rc_t CC Usage ( const Args * args )
+{
+    return 0;
+}
+
+const char UsageDefaultName[] = "test-ngs-pileup";
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    KConfigDisableUserSettings();
+    rc_t rc=NgsPileupTestSuite(argc, argv);
+    return rc;
+}
+
+}  
+
diff --git a/test/ngs-python/Makefile b/test/ngs-python/Makefile
deleted file mode 100644
index 9b3b9c1..0000000
--- a/test/ngs-python/Makefile
+++ /dev/null
@@ -1,57 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-
-MODULE = test/ngs-python
-
-ALL_TARGS = \
-
-include $(TOP)/build/Makefile.env
-
-
-# make sure runs are not cached in the user repository when running tests
-ifeq ($(wildcard ../../../asm-trace),)
-	ifeq (,$(VDB_CONFIG))
-		VDB_CONFIG = $(shell pwd)/../only-remote-repository.kfg
-	endif
-endif
-
-
-#-------------------------------------------------------------------------------
-# runtests
-#
-runtests: pytest
-
-pytest:
-	python -c "from ngs import NGS" \
-		&& export VDB_CONFIG=$(VDB_CONFIG) ; export NGS_PY_DOWNLOAD_LIBRARY=0; \
-			unset NGS_PY_LIBRARY_PATH; \
-			export LD_LIBRARY_PATH=$(LIBDIR):$(NGS_LIBDIR):$$LD_LIBRARY_PATH; \
-			python tests.py \
-		|| echo "NGS Python tests are not run since ngs module does not appear to be installed"
-
-.PHONY: pytest
diff --git a/test/ngs-python/build.xml b/test/ngs-python/build.xml
deleted file mode 100644
index b4fcc8a..0000000
--- a/test/ngs-python/build.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<project>
-
-    <!-- This file is currently for use on Windows; Linux/Mac builds are run via gmake -->
-    <property environment="env"/>
-    <property name="Platform"       value="x64" />
-    <property name="Configuration"  value="Debug" />
-    <property name="Output"         value="${basedir}\..\..\..\OUTDIR" />
-    <property name="MSVS"           value="2013" />
-    
-    <condition property="PlatformToolset" value="v100" else="v120">
-        <equals arg1="${MSVS}" arg2="2010"/>
-    </condition>    
-    <property name="vdb.dir"        value="${Output}\ncbi-vdb\win\${PlatformToolset}\${Platform}\${Configuration}\bin" />
-    <property name="ngs.dir"        value="${Output}\ngs-sdk\win\${PlatformToolset}\${Platform}\${Configuration}\bin" />
-    
-    <property name="ngs-source.dir" value="${basedir}\..\..\..\ngs" />
-    
-    <!-- Set this to full path to Python if not in PATH already 
-        make sure that
-            python -c "import platform;print (platform.architecture()[0])" = "32bit" or "64bit" 
-        as needed for the platform
-    -->
-    <property name="python.exe"     value="python" />
-	
-    <target name="install">
-        <exec executable="${python.exe}" dir="${ngs-source.dir}\ngs-python" failonerror="true" >
-            <arg value="setup.py" />
-            <arg value="install" />
-            <arg value="--user" />
-        </exec>
-    </target>
-
-    <target name="runtests" depends="install">
-        <exec executable="${python.exe}" failonerror="true">
-            <env key="Path" value="${vdb.dir};${ngs.dir};${env.Path}"/>            
-            <env key="NGS_PY_DOWNLOAD_LIBRARY" value="0"/>
-            <arg value="tests.py" />
-        </exec>
-    </target>
-    
-</project>
diff --git a/test/ngs-python/tests.py b/test/ngs-python/tests.py
deleted file mode 100644
index 7748d8f..0000000
--- a/test/ngs-python/tests.py
+++ /dev/null
@@ -1,506 +0,0 @@
-import unittest
-from ngs import NGS
-from ngs.ErrorMsg import ErrorMsg
-from ngs.ReadCollection import ReadCollection
-from ngs.ReferenceSequence import ReferenceSequence
-from ngs.Alignment import Alignment
-from ngs.Read import Read
-
-PrimaryOnly           = "SRR1063272"
-WithSecondary         = "SRR833251"
-WithGroups            = "SRR822962"
-WithCircularRef       = "SRR1769246"
-SingleFragmentPerSpot = "SRR2096940";
-
-def getRead(id):
-    run = NGS.openReadCollection(PrimaryOnly)
-    return run.getRead(id)
-
-def getAlignment(id):
-    run = NGS.openReadCollection(PrimaryOnly)
-    return run.getAlignment(id)
-    
-def getSecondaryAlignment(id):
-    run = NGS.openReadCollection(WithSecondary)
-    return run.getAlignment(id)
-
-def getReference():
-    return NGS.openReadCollection(PrimaryOnly).getReference("supercont2.1")
-
-def getReferenceSequence():
-    return NGS.openReferenceSequence("NC_011752.1")
-    
-class Tests(unittest.TestCase):
-    
-    def fail(self):
-        self.assertTrue(False)
-    
-    def test_open_success(self):
-        run = NGS.openReadCollection(PrimaryOnly)
-    
-    def test_open_fail(self):
-        try:
-            run = NGS.openReadCollection("SRRsomejunk")
-            self.fail()
-        except ErrorMsg:
-            pass
-
-    def test_ReadCollection_getName(self):
-        self.assertEqual(PrimaryOnly, NGS.openReadCollection(PrimaryOnly).getName())
-    
-    def test_ReadCollection_getReadGroup(self):
-        gr = NGS.openReadCollection(PrimaryOnly).getReadGroup("C1ELY.6")
-    
-    def test_ReadCollection_getReadGroups(self):
-        it = NGS.openReadCollection(PrimaryOnly).getReadGroups()
-    
-    def test_ReadCollection_getReferences(self):
-        it = NGS.openReadCollection(PrimaryOnly).getReferences()
-    
-    def test_ReadCollection_getReference(self):
-        ref = NGS.openReadCollection(PrimaryOnly).getReference("supercont2.1")
-
-    def test_ReadCollection_hasReference(self):
-        assert ( NGS.openReadCollection(PrimaryOnly).hasReference("supercont2.1") )
-        assert ( not NGS.openReadCollection(PrimaryOnly).hasReference("non-existent acc") )
-
-    def test_ReadCollection_getAlignment(self):
-        al = NGS.openReadCollection(PrimaryOnly).getAlignment(PrimaryOnly + ".PA.1")
-    
-    def test_ReadCollection_getAlignments_Primary(self):
-        alIt = NGS.openReadCollection(PrimaryOnly).getAlignments(Alignment.primaryAlignment)
-
-    def test_ReadCollection_getAlignments_Secondary(self):
-        alIt = NGS.openReadCollection(PrimaryOnly).getAlignments(Alignment.secondaryAlignment)
-
-    def test_ReadCollection_getAlignments_all(self):
-        alIt = NGS.openReadCollection(PrimaryOnly).getAlignments(Alignment.all)
-
-    def test_ReadCollection_getAlignmentCount_PrimaryOnly(self):
-        self.assertEqual(3987701, NGS.openReadCollection(PrimaryOnly).getAlignmentCount())
-
-    def test_ReadCollection_getAlignmentCount_PrimaryOnly_Primary(self):
-        self.assertEqual(3987701, NGS.openReadCollection(PrimaryOnly).getAlignmentCount(Alignment.primaryAlignment))
-
-    def test_ReadCollection_getAlignmentCount_PrimaryOnly_Secondary(self):
-        self.assertEqual(0, NGS.openReadCollection(PrimaryOnly).getAlignmentCount(Alignment.secondaryAlignment))
-
-    def test_ReadCollection_getAlignmentCount_PrimaryOnly_All(self):
-        self.assertEqual(3987701, NGS.openReadCollection(PrimaryOnly).getAlignmentCount(Alignment.all))
-
-    def test_ReadCollection_getAlignmentCount_WithSecondary(self):
-        self.assertEqual(178, NGS.openReadCollection(WithSecondary).getAlignmentCount())
-
-    def test_ReadCollection_getAlignmentCount_WithSecondary_Primary(self):
-        self.assertEqual(168, NGS.openReadCollection(WithSecondary).getAlignmentCount(Alignment.primaryAlignment))
-
-    def test_ReadCollection_getAlignmentCount_WithSecondary_Secondary(self):
-        self.assertEqual(10, NGS.openReadCollection(WithSecondary).getAlignmentCount(Alignment.secondaryAlignment))
-
-    def test_ReadCollection_getAlignmentCount_WithSecondary_All(self):
-        self.assertEqual(178, NGS.openReadCollection(WithSecondary).getAlignmentCount(Alignment.all))
-    
-    def test_ReadCollection_getAlignmentRange(self):
-        # straddling primary and secondary alignments
-        alIt = NGS.openReadCollection(WithSecondary).getAlignmentRange(166, 5)
-        self.assertTrue(alIt.nextAlignment())
-        self.assertEqual(WithSecondary + ".PA.166", alIt.getAlignmentId())
-    
-    def test_ReadCollection_getRead(self):
-        read = NGS.openReadCollection(PrimaryOnly).getRead(PrimaryOnly + ".R.1")
-        self.assertEqual(PrimaryOnly + ".R.1", read.getReadId())
-
-    def test_ReadCollection_getReads(self):
-        readIt = NGS.openReadCollection(PrimaryOnly).getReads(Read.all)
-        self.assertTrue(readIt.nextRead())
-        self.assertEqual(PrimaryOnly + ".R.1", readIt.getReadId())
-
-    def test_ReadCollection_getReadCount(self):
-        self.assertEqual(2280633, NGS.openReadCollection(PrimaryOnly).getReadCount())
-
-    def test_ReadCollection_getReadRange(self):
-        readIt = NGS.openReadCollection(PrimaryOnly).getReadRange(2, 3)
-        self.assertTrue(readIt.nextRead())
-        self.assertEqual(PrimaryOnly + ".R.2", readIt.getReadId())
-
-
-# Read 
-
-    def test_Read_getReadCategory_full(self):
-        self.assertEqual(Read.fullyAligned, getRead(PrimaryOnly + ".R.1").getReadCategory())
-        
-    def test_Read_getReadCategory_partial(self):
-        self.assertEqual(Read.partiallyAligned, getRead(PrimaryOnly + ".R.3").getReadCategory())
-    
-    def test_Read_getNumFragments(self):
-        self.assertEqual(2, getRead(PrimaryOnly + ".R.1").getNumFragments())
-    
-    def test_Read_fragmentIsAligned_partial(self):
-        read = NGS.openReadCollection(PrimaryOnly).getRead(PrimaryOnly + ".R.3")
-        self.assertEqual(True, read.fragmentIsAligned(0))
-        self.assertEqual(False, read.fragmentIsAligned(1))
-    
-# FragmentIterator
-    def test_FragmentIterator_ThrowsBeforeNext(self):
-        try:
-            getRead(PrimaryOnly + ".R.1").getFragmentId()
-            self.fail()
-        except ErrorMsg:
-            pass
-
-    def test_FragmentIterator_Next(self):
-        read = getRead(PrimaryOnly + ".R.1")
-        self.assertTrue(read.nextFragment())
-        read.getReadCategory() # does not throw
-
-# Fragment
-    def test_Read_getFragmentId(self):
-        read = getRead(PrimaryOnly + ".R.1")
-        self.assertTrue(read.nextFragment())
-        self.assertEqual(PrimaryOnly + ".FR0.1", read.getFragmentId())
-
-    def test_getFragmentBases(self):
-        read = getRead(PrimaryOnly + ".R.1")
-        self.assertTrue(read.nextFragment())
-        self.assertTrue(read.nextFragment())
-        self.assertEqual("GGTA", read.getFragmentBases(2, 4));
-
-    def test_getFragmentQualities(self):
-        read = getRead(PrimaryOnly + ".R.1")
-        self.assertTrue(read.nextFragment())
-        self.assertTrue(read.nextFragment())
-        self.assertEqual("@DDA", read.getFragmentQualities(2, 4))
-
-    
-# Alignment
-    
-    def test_Alignment_getAlignmentId(self):
-        self.assertEqual(PrimaryOnly + ".PA.1", getAlignment(PrimaryOnly + ".PA.1").getAlignmentId())
-    
-    def test_Alignment_getReferenceSpec(self):
-        self.assertEqual("supercont2.1", getAlignment(PrimaryOnly + ".PA.1").getReferenceSpec())
-
-    def test_Alignment_getMappingQuality(self):
-        self.assertEqual(60, getAlignment(PrimaryOnly + ".PA.1").getMappingQuality())
-    
-    def test_Alignment_getReferenceBases(self):
-        self.assertEqual("ACTCGACATTCTGTCTTCGACCTATCTTTCTCCTCTCCCAGTCATCGCCCAGTAGAATTACCAGGCAATGAACCACGGCCTTTCATCCCAACGGCACAGCA", 
-                      getAlignment(PrimaryOnly + ".PA.1").getReferenceBases())
-    
-    def test_Alignment_getReadGroup(self):
-        self.assertEqual("C1ELY.6", getAlignment(PrimaryOnly + ".PA.1").getReadGroup())
-    
-    def test_Alignment_getReadId(self):
-        self.assertEqual(PrimaryOnly + ".R.165753", getAlignment(PrimaryOnly + ".PA.5").getReadId())
-
-    def test_Alignment_getFragmentId(self):
-        self.assertEqual(PrimaryOnly + ".FA0.1", getAlignment(PrimaryOnly + ".PA.1").getFragmentId())
-    
-    def test_Alignment_getFragmentBases_Raw(self):
-        self.assertEqual("TGGATGCTCTGGAAAATCTGAAAAGTGGTGTTTGTAAGGTTTGCTGGCTGCCCATATACCACATGGATGATGGGGCTTTCCATTTTAATGTTGAAGGAGGA", 
-                      getAlignment(PrimaryOnly + ".PA.4").getFragmentBases())
-    
-    def test_Alignment_getFragmentQualities_Raw(self):
-        self.assertEqual("######AA>55;5(;63;;3@;A9??;6..73CDCIDA>DCB>@B=;@B?;;ADAB<DD?1*>@C9:EC?2++A3+F4EEB<E>EEIEDC2?C:;AB+==1", 
-                      getAlignment(PrimaryOnly + ".PA.4").getFragmentQualities())
-    
-    def test_Alignment_getFragmentBases_Clipped(self):
-        self.assertEqual("CTTCAACATTAAAATGGAAAGCCCCATCATCCATGTGGTATATGGGCAGCCAGCAAACCTTACAAACACCACTTTTCAGATTTTCCAGAGCATCCA", 
-                      getAlignment(PrimaryOnly + ".PA.4").getClippedFragmentBases())
-    
-    def test_Alignment_getFragmentQualities_Clipped(self):
-        self.assertEqual("#AA>55;5(;63;;3@;A9??;6..73CDCIDA>DCB>@B=;@B?;;ADAB<DD?1*>@C9:EC?2++A3+F4EEB<E>EEIEDC2?C:;AB+==1", 
-                      getAlignment(PrimaryOnly + ".PA.4").getClippedFragmentQualities())
-
-    def test_Alignment_getAlignedFragmentBases(self):
-        self.assertEqual("ATATGGGTTCACTCCAACAGTGAACCATTCCAAAAGACCTTGCCTGCGTGGCCATCTCCTCACAAACCCACCATCCCGCAACATCTCAGGTATCATACCTT", 
-                      getAlignment(PrimaryOnly + ".PA.2").getAlignedFragmentBases())
-    
-    def test_Alignment_getAlignmentCategory(self):
-        self.assertEqual(Alignment.primaryAlignment, getAlignment(PrimaryOnly + ".PA.4").getAlignmentCategory())
-    
-    def test_Alignment_getAlignmentPosition(self):
-        self.assertEqual(85, getAlignment(PrimaryOnly + ".PA.1").getAlignmentPosition())
-    
-    def test_Alignment_getAlignmentLength(self):
-        self.assertEqual(101, getAlignment(PrimaryOnly + ".PA.1").getAlignmentLength())
-    
-    def test_Alignment_getIsReversedOrientation_False(self):
-        self.assertFalse(getAlignment(PrimaryOnly + ".PA.1").getIsReversedOrientation())
-
-    def test_Alignment_getIsReversedOrientation_True(self):
-        self.assertTrue(getAlignment(PrimaryOnly + ".PA.2").getIsReversedOrientation())
-    
-    def test_Alignment_getSoftClip_None(self):
-        al = getAlignment(PrimaryOnly + ".PA.1")
-        self.assertEqual(0, al.getSoftClip(Alignment.clipLeft))
-        self.assertEqual(0, al.getSoftClip(Alignment.clipRight))
-        
-    def test_Alignment_getSoftClip_Left(self):
-        al = getAlignment(PrimaryOnly + ".PA.4")
-        self.assertEqual(5, al.getSoftClip(Alignment.clipLeft))
-        self.assertEqual(0, al.getSoftClip(Alignment.clipRight))
-        
-    def test_Alignment_getSoftClip_Right(self):
-        al = getAlignment(PrimaryOnly + ".PA.10")
-        self.assertEqual(0,  al.getSoftClip(Alignment.clipLeft))
-        self.assertEqual(13, al.getSoftClip(Alignment.clipRight))
-    
-    def test_Alignment_getTemplateLength(self):
-        self.assertEqual(201, getAlignment(PrimaryOnly + ".PA.1").getTemplateLength())
-    
-    def test_Alignment_getShortCigar_Unclipped(self):
-        self.assertEqual("5S96M", getAlignment(PrimaryOnly + ".PA.4").getShortCigar(False))
-        
-    def test_Alignment_getShortCigar_Clipped(self):
-        self.assertEqual("96M", getAlignment(PrimaryOnly + ".PA.4").getShortCigar(True))
-
-    def test_Alignment_getLongCigar_Unclipped(self):
-        self.assertEqual("5S1X8=1X39=1X46=", getAlignment(PrimaryOnly + ".PA.4").getLongCigar(False))
-
-    def test_Alignment_getLongCigar_Clipped(self):
-        self.assertEqual("1X8=1X39=1X46=", getAlignment(PrimaryOnly + ".PA.4").getLongCigar(True))
-    
-    def test_Alignment_hasMate_Primary_No(self):
-        self.assertFalse(getAlignment(PrimaryOnly + ".PA.99").hasMate())
-
-    def test_Alignment_hasMate_Primary_Yes(self):
-        self.assertTrue(getAlignment(PrimaryOnly + ".PA.1").hasMate())
-        
-    def test_Alignment_hasMate_Secondary(self):
-        self.assertFalse(getSecondaryAlignment(WithSecondary + ".SA.169").hasMate())
-
-    def test_Alignment_getMateAlignmentId(self):
-        self.assertEqual(PrimaryOnly + ".PA.2", getAlignment(PrimaryOnly + ".PA.1").getMateAlignmentId())
-        
-    def test_Alignment_getMateAlignmentId_Missing(self):
-        try:
-            getAlignment(PrimaryOnly + ".PA.99").getMateAlignmentId()
-            self.fail()
-        except ErrorMsg:
-            pass
-        
-    def test_Alignment_getMateAlignmentId_SecondaryThrows(self):
-        try:
-            getSecondaryAlignment(WithSecondary + ".SA.172").getMateAlignmentId()
-            self.fail()
-        except ErrorMsg:
-            pass
-    
-    def test_Alignment_getMateAlignment(self):
-        self.assertEqual(PrimaryOnly + ".PA.2", getAlignment(PrimaryOnly + ".PA.1").getMateAlignment().getAlignmentId())
-        
-    def test_Alignment_getMateAlignment_Missing(self):
-        try:
-            getAlignment(PrimaryOnly + ".PA.99").getMateAlignment()
-            self.fail()
-        except ErrorMsg:
-            pass
-
-    def test_Alignment_getMateAlignment_SecondaryThrows(self):
-        try:
-            getSecondaryAlignment(WithSecondary +".SA.172").getMateAlignment ()
-            self.fail()
-        except ErrorMsg:
-            pass
-    
-    def test_Alignment_getMateReferenceSpec(self):
-        self.assertEqual("supercont2.1",  getAlignment(PrimaryOnly + ".PA.1").getMateReferenceSpec())
-    
-    def test_Alignment_getMateIsReversedOrientation_Yes(self):
-        self.assertTrue(getAlignment(PrimaryOnly + ".PA.1").getMateIsReversedOrientation())
-
-    def test_Alignment_getMateIsReversedOrientation_No(self):
-        self.assertFalse(getAlignment(PrimaryOnly + ".PA.2").getMateIsReversedOrientation())
-    
-    def test_Alignment_isPaired_MultiFragmentsPerSpot(self):
-        readCollection = NGS.openReadCollection(PrimaryOnly)
-        alignment = readCollection.getAlignment(PrimaryOnly + ".PA.1")
-        self.assertTrue(alignment.isPaired())
-        
-        alignment = readCollection.getAlignment(PrimaryOnly + ".PA.2")
-        self.assertTrue(alignment.isPaired())
-        
-        # has unaligned mate
-        alignment = readCollection.getAlignment (PrimaryOnly + ".PA.6")
-        self.assertTrue(alignment.isPaired())
-    
-    def test_Alignment_isPaired_SingleFragmentPerSpot(self):
-        readCollection = NGS.openReadCollection(SingleFragmentPerSpot)
-        alignment = readCollection.getAlignment(SingleFragmentPerSpot + ".PA.1")
-        self.assertFalse(alignment.isPaired())
-
-# ReferenceSequence
-    def test_ReferenceSequence_getCanonicalName(self):
-        self.assertEqual("gi|218511148|ref|NC_011752.1|", getReferenceSequence().getCanonicalName())
-    
-    def test_ReferenceSequence_getIsCircular_Yes(self):
-        self.assertTrue(getReferenceSequence().getIsCircular())
-    
-    def test_ReferenceSequence_getLength(self):
-        self.assertEqual(72482, getReferenceSequence().getLength())
-    
-    def test_ReferenceSequence_getReferenceBases(self):
-        self.assertEqual("ATAAA", getReferenceSequence().getReferenceBases(72482 - 5))
-
-    def test_ReferenceSequence_getReferenceBases_Length(self):
-        self.assertEqual("TACA", getReferenceSequence().getReferenceBases(4998, 4))
-    
-    def test_ReferenceSequence_getReferenceChunk(self):
-        self.assertEqual("TAATA", getReferenceSequence().getReferenceChunk(5000 - 5, 5))
-
-    def test_ReferenceSequence_getReferenceChunk_Length (self):
-        self.assertEqual("TAATA", getReferenceSequence().getReferenceChunk(5000 - 5, 10))
-        
-# Reference
-    def test_Reference_getCommonName(self):
-        self.assertEqual("supercont2.1", getReference().getCommonName())
-    
-    def test_Reference_getCanonicalName(self):
-        self.assertEqual("NC_000007.13", NGS.openReadCollection("SRR821492").getReference("chr7").getCanonicalName())
-    
-    def test_Reference_getIsCircular_No(self):
-        self.assertFalse(getReference().getIsCircular())
-
-    def test_Reference_getIsCircular_Yes(self):
-        self.assertTrue(NGS.openReadCollection("SRR821492").getReference("chrM").getIsCircular())
-    
-    def test_Reference_getLength(self):
-        self.assertEqual(2291499, getReference().getLength())
-    
-    def test_Reference_getReferenceBases(self):
-        self.assertEqual("ATCTG", getReference().getReferenceBases(2291499 - 5))
-
-    def test_Reference_getReferenceBases_Length(self):
-        self.assertEqual("GCGCTATGAC", getReference().getReferenceBases(9000, 10))
-    
-    def test_Reference_getReferenceChunk(self):
-        self.assertEqual("CTAGG", getReference().getReferenceChunk(5000 - 5, 5))
-
-    def test_Reference_getReferenceChunk_Length (self):
-        self.assertEqual("GCGCTATGAC", getReference().getReferenceChunk(9000, 10))
-    
-    def test_Reference_getAlignment(self):
-        self.assertEqual(PrimaryOnly + ".PA.1", getReference().getAlignment(PrimaryOnly + ".PA.1").getAlignmentId())
-    
-#TODO: getAlignmentCount
-#TODO: getAlignmentCount_Filtered
-
-#TODO: getPileups
-#TODO: getPileupRange
-#TODO: getPileupRange_Filtered
-
-# ReferenceIterator
-
-    def test_ReferenceIterator_ThrowBeforeNext(self):
-        it = NGS.openReadCollection(PrimaryOnly).getReferences()
-        try:
-            it.getCommonName()
-            self.fail()
-        except ErrorMsg:
-            pass
-    
-    def test_ReferenceIterator_Next(self):
-        it = NGS.openReadCollection(PrimaryOnly).getReferences()
-        self.assertTrue(it.nextReference())
-        self.assertEqual("supercont2.1", it.getCommonName())
-    
-# AlignmentIterator from Reference (ReferenceWindow)
-    def test_ReferenceWindow(self):
-        it = NGS.openReadCollection(WithSecondary).getReference("gi|169794206|ref|NC_010410.1|").getAlignments(Alignment.all) 
-        self.assertTrue(it.nextAlignment())  
-    
-        # the first 2 secondary alignments' locations on the list: #34, #61
-        count = 1;
-        while it.nextAlignment():
-            if it.getAlignmentCategory() == Alignment.secondaryAlignment:
-                break
-            count += 1
-
-        self.assertEqual(34, count)    
-        while it.nextAlignment():
-            if it.getAlignmentCategory() == Alignment.secondaryAlignment:
-                break
-            count += 1
-
-        self.assertEqual(61, count)
-    
-    def test_ReferenceWindow_Slice(self):
-        it = NGS.openReadCollection(WithSecondary).getReference("gi|169794206|ref|NC_010410.1|").getAlignmentSlice(516000, 100000) 
-        self.assertTrue(it.nextAlignment())  
-        self.assertEqual(WithSecondary + ".PA.33", it.getAlignmentId())
-        self.assertTrue(it.nextAlignment())  
-        self.assertEqual(WithSecondary + ".PA.34", it.getAlignmentId())
-        self.assertTrue(it.nextAlignment())  
-        self.assertEqual(WithSecondary + ".SA.169", it.getAlignmentId()) #secondary
-        self.assertTrue(it.nextAlignment())  
-        self.assertEqual(WithSecondary + ".PA.35", it.getAlignmentId())
-        self.assertFalse(it.nextAlignment())  
-   
-    def test_ReferenceWindow_Slice_Filtered_Category (self):
-        it = NGS.openReadCollection(WithSecondary).getReference("gi|169794206|ref|NC_010410.1|").getAlignmentSlice(516000, 100000, Alignment.primaryAlignment) 
-        self.assertTrue(it.nextAlignment())  
-        self.assertEqual(WithSecondary + ".PA.33", it. getAlignmentId())
-        self.assertTrue(it.nextAlignment())  
-        self.assertEqual(WithSecondary + ".PA.34", it. getAlignmentId())
-        self.assertTrue(it.nextAlignment())  
-        self.assertEqual(WithSecondary + ".PA.35", it. getAlignmentId()) # no secondary
-        self.assertFalse(it.nextAlignment())
-    
-    def test_ReferenceWindow_Slice_Filtered_Start_Within_Slice (self):
-        ref = NGS.openReadCollection(WithCircularRef).getReference("NC_012920.1")
-        it = ref.getFilteredAlignmentSlice(0, ref.getLength(), Alignment.all, Alignment.startWithinSlice, 0)
-    
-        self.assertTrue(it.nextAlignment())
-        lastAlignmentPosition = it.getAlignmentPosition()
-        while it.nextAlignment():
-            currentPosition = it.getAlignmentPosition()
-            errorMsg = "Sorting violated. Last position (" + str(lastAlignmentPosition) + ") is higher than current one (" + str(currentPosition) + ")"
-            self.assertTrue ( lastAlignmentPosition <= currentPosition, errorMsg )
-            lastAlignmentPosition = currentPosition
-    
-    # ReadGroup
-    def test_ReadGroup_getName(self):
-        gr = NGS.openReadCollection(PrimaryOnly).getReadGroup("C1ELY.6")
-        self.assertEqual("C1ELY.6", gr.getName())
-
-    def test_ReadGroup_has(self):
-        assert ( NGS.openReadCollection(PrimaryOnly).hasReadGroup("C1ELY.6") )
-        assert ( not NGS.openReadCollection(PrimaryOnly).hasReadGroup("non-existent read group") )
-
-    def test_ReadGroup_getStatistics(self):
-        gr = NGS.openReadCollection(WithGroups).getReadGroup("GS57510-FS3-L03")
-
-        stats = gr.getStatistics()
-    
-        self.assertEqual(34164461870, stats.getAsU64("BASE_COUNT"))
-        self.assertEqual(34164461870, stats.getAsU64("BIO_BASE_COUNT"))
-        self.assertEqual(488063741,   stats.getAsU64("SPOT_COUNT"))
-        self.assertEqual(5368875807,  stats.getAsU64("SPOT_MAX"))
-        self.assertEqual(4880812067,  stats.getAsU64("SPOT_MIN"))
-
-    # def test_ReadGroup_getRead(self):
-        # gr = NGS.openReadCollection(PrimaryOnly).getReadGroup("C1ELY.6")
-        # r = gr.getRead(PrimaryOnly + ".R.1")
-        # self.assertEqual("C1ELY.6", r.getReadGroup())
-    
-    # def test_ReadGroup_getReads(self):
-        # gr = NGS.openReadCollection(PrimaryOnly).getReadGroup("C1ELY.6")
-        # r = gr.getReads(Read.partiallyAligned)
-    
-    # ReadGroupIterator
-    def test_ReadGroupIterator_ThrowBeforeNext(self):
-        it = NGS.openReadCollection(PrimaryOnly).getReadGroups()
-        try:
-            it.getName()
-            self.fail()
-        except ErrorMsg:
-            pass
-    
-    def test_ReadGroupIterator_Next(self):
-        it = NGS.openReadCollection(PrimaryOnly).getReadGroups();
-        self.assertTrue(it.nextReadGroup());
-        name = it.getName();
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/test/ngs/Makefile b/test/ngs/Makefile
deleted file mode 100644
index a479010..0000000
--- a/test/ngs/Makefile
+++ /dev/null
@@ -1,216 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-
-MODULE = test/ngs
-
-TEST_TOOLS = \
-    test-ngs \
-    test-ngs_sra \
- 	test-ngs_sradb \
- 	test-ngs_csra1 \
- 	test-ngs_csra1_readcollection \
-    test-ngs_csra1_refwin \
-    test-ngs_csra1_pileup \
-    test-ngs_reference \
-    test-ngs_fragmentblob \
-
-include $(TOP)/build/Makefile.env
-
-
-# make sure runs are not cached in the user repository when running tests
-ifeq ($(wildcard ../../../asm-trace),)
-	ifeq (,$(VDB_CONFIG))
-		VDB_CONFIG = $(shell pwd)/../only-remote-repository.kfg
-	endif
-endif
-
-$(TEST_TOOLS) $(SLOW_TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: $(TEST_TOOLS) $(SLOW_TEST_TOOLS)
-
-clean: stdclean
-
-#-------------------------------------------------------------------------------
-# common definitions
-#
-INCDIRS +=  -I$(TOP)/libs/ngs
-
-TEST_NGS_LIB = \
-	-sncbi-vdb \
-	-skapp \
-    -sktst
-
-#-------------------------------------------------------------------------------
-# ngs-makedb
-# Create test databases for use in other suites
-NGS_MAKEDB_SRC = \
-	ngstest_makedb
-
-NGS_MAKEDB_OBJ = \
-	$(addsuffix .$(OBJX),$(NGS_MAKEDB_SRC))
-
-NGS_MAKEDB_LIB = \
-    -skapp \
-	-sktst \
-    -sncbi-wvdb
-
-$(TEST_BINDIR)/ngs-makedb: $(NGS_MAKEDB_OBJ)
-	$(LP) --exe -o $@ $^ $(NGS_MAKEDB_LIB)
-
-makedb: $(TEST_BINDIR)/ngs-makedb
-	cd $(SRCDIR)/data; $(TEST_BINDIR)/ngs-makedb
-
-#-------------------------------------------------------------------------------
-# test-ngs
-#
-TEST_NGS_SRC = \
-	ngstest
-
-TEST_NGS_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_NGS_SRC))
-
-$(TEST_BINDIR)/test-ngs: $(TEST_NGS_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_NGS_LIB)
-
-ngs: test-ngs
-	$(TEST_BINDIR)/$^
-
-#-------------------------------------------------------------------------------
-# test-ngs_sra
-#
-TEST_NGS_SRA_SRC = \
-	ngstest_sra
-
-TEST_NGS_SRA_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_NGS_SRA_SRC))
-
-$(TEST_BINDIR)/test-ngs_sra: $(TEST_NGS_SRA_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_NGS_LIB)
-
-sra: test-ngs_sra
-	$(TEST_BINDIR)/$^
-
-#-------------------------------------------------------------------------------
-# test-ngs_sradb
-#
-TEST_NGS_SRADB_SRC = \
-	ngstest_sradb
-
-TEST_NGS_SRADB_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_NGS_SRADB_SRC))
-
-$(TEST_BINDIR)/test-ngs_sradb: $(TEST_NGS_SRADB_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_NGS_LIB)
-
-sradb: test-ngs_sradb
-	$(TEST_BINDIR)/$^
-
-#-------------------------------------------------------------------------------
-# test-ngs_csra1
-#
-TEST_NGS_CSRA1_SRC = \
-	ngstest_csra1
-
-TEST_NGS_CSRA1_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_NGS_CSRA1_SRC))
-
-$(TEST_BINDIR)/test-ngs_csra1: $(TEST_NGS_CSRA1_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_NGS_LIB)
-
-csra1: test-ngs_csra1
-	$(TEST_BINDIR)/$^
-
-#-------------------------------------------------------------------------------
-# test-ngs_csra1_readcollection
-#
-TEST_NGS_CSRA1_READCOLLECTION_SRC = \
-	ngstest_csra1_readcollection
-
-TEST_NGS_CSRA1_READCOLLECTION_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_NGS_CSRA1_READCOLLECTION_SRC))
-
-$(TEST_BINDIR)/test-ngs_csra1_readcollection: $(TEST_NGS_CSRA1_READCOLLECTION_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_NGS_LIB)
-
-#-------------------------------------------------------------------------------
-# test-ngs_csra1_refwin
-#
-TEST_NGS_CSRA1_REFWIN_SRC = \
-	ngstest_csra1_refwin
-
-TEST_NGS_CSRA1_REFWIN_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_NGS_CSRA1_REFWIN_SRC))
-
-$(TEST_BINDIR)/test-ngs_csra1_refwin: $(TEST_NGS_CSRA1_REFWIN_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_NGS_LIB)
-
-refwin: test-ngs_csra1_refwin
-	$(TEST_BINDIR)/$^
-
-#-------------------------------------------------------------------------------
-# test-ngs_csra1_pileup
-#
-TEST_NGS_CSRA1_PILEUP_SRC = \
-	ngstest_csra1_pileup
-
-TEST_NGS_CSRA1_PILEUP_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_NGS_CSRA1_PILEUP_SRC))
-
-$(TEST_BINDIR)/test-ngs_csra1_pileup: $(TEST_NGS_CSRA1_PILEUP_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_NGS_LIB)
-
-#-------------------------------------------------------------------------------
-# test-ngs_reference
-#
-TEST_NGS_REFERENCE_SRC = \
-	ngstest_reference
-
-TEST_NGS_REFERENCE_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_NGS_REFERENCE_SRC))
-
-$(TEST_BINDIR)/test-ngs_reference: $(TEST_NGS_REFERENCE_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_NGS_LIB)
-
-reference: test-ngs_reference
-	$(TEST_BINDIR)/$^
-
-#-------------------------------------------------------------------------------
-# test-ngs_fragmentblob
-#
-TEST_NGS_SRC = \
-	ngstest_fragmentblob
-
-TEST_NGS_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_NGS_SRC))
-
-$(TEST_BINDIR)/test-ngs_fragmentblob: $(TEST_NGS_OBJ) makedb
-	$(LP) --exe -o $@ $^ $(TEST_NGS_LIB)
-
-fragmentblob: test-ngs_fragmentblob
-	cd $(SRCDIR); $(TEST_BINDIR)/$^
diff --git a/test/ngs/data/.gitignore b/test/ngs/data/.gitignore
deleted file mode 100644
index 43753d2..0000000
--- a/test/ngs/data/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-SparseFragmentBlobs
diff --git a/test/ngs/data/SysPathTest/md/cur b/test/ngs/data/SysPathTest/md/cur
deleted file mode 100644
index a4c548a..0000000
Binary files a/test/ngs/data/SysPathTest/md/cur and /dev/null differ
diff --git a/test/ngs/data/SysPathTest/md5 b/test/ngs/data/SysPathTest/md5
deleted file mode 100644
index 23a0920..0000000
--- a/test/ngs/data/SysPathTest/md5
+++ /dev/null
@@ -1 +0,0 @@
-e632416bc831c3052cf4bc591d569651 *md/cur
diff --git a/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/data b/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/data
deleted file mode 100644
index 422b42c..0000000
Binary files a/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/data and /dev/null differ
diff --git a/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx b/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx
deleted file mode 100644
index 0a37ea2..0000000
Binary files a/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx and /dev/null differ
diff --git a/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx1 b/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx1
deleted file mode 100644
index 4a0b075..0000000
Binary files a/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx1 and /dev/null differ
diff --git a/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx2 b/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx2
deleted file mode 100644
index 8970933..0000000
Binary files a/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/idx2 and /dev/null differ
diff --git a/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/md/cur b/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/md/cur
deleted file mode 100644
index 76b1009..0000000
Binary files a/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/md/cur and /dev/null differ
diff --git a/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/md5 b/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/md5
deleted file mode 100644
index 1933b3c..0000000
--- a/test/ngs/data/SysPathTest/tbl/SEQUENCE/col/READ/md5
+++ /dev/null
@@ -1,6 +0,0 @@
-6fd353b18b12ea9f51247e16c2a4a0d5 *md/cur
-0387b26b33dd31382152f87027ee9c90 *idx
-af0e3b0ce3ba8aea4adcdc6c6107dd25 *idx1
-d41d8cd98f00b204e9800998ecf8427e *idx0
-5f3b15a8f2d8cd31205e2bce7a0270c0 *idx2
-9f89f40e67feb07c68a4b4ee176288b4 *data
diff --git a/test/ngs/data/SysPathTest/tbl/SEQUENCE/md/cur b/test/ngs/data/SysPathTest/tbl/SEQUENCE/md/cur
deleted file mode 100644
index 4ec6114..0000000
Binary files a/test/ngs/data/SysPathTest/tbl/SEQUENCE/md/cur and /dev/null differ
diff --git a/test/ngs/data/SysPathTest/tbl/SEQUENCE/md5 b/test/ngs/data/SysPathTest/tbl/SEQUENCE/md5
deleted file mode 100644
index 36a701b..0000000
--- a/test/ngs/data/SysPathTest/tbl/SEQUENCE/md5
+++ /dev/null
@@ -1 +0,0 @@
-5273d66b808595e261380b3b56584188 *md/cur
diff --git a/test/ngs/ngs_c_fixture.hpp b/test/ngs/ngs_c_fixture.hpp
deleted file mode 100644
index b31f183..0000000
--- a/test/ngs/ngs_c_fixture.hpp
+++ /dev/null
@@ -1,180 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_ngs_c_fixture_
-#define _h_ngs_c_fixture_
-
-/**
-* Unit tests for NGS C interface, common definitions
-*/
-
-#include <sysalloc.h>
-
-#include <string>
-#include <iostream>
-#include <sstream>
-#include <stdexcept>
-
-#include <ktst/unit_test.hpp>
-
-#include <kfc/xcdefs.h>
-#include <kfc/except.h>
-
-#include <kfc/ctx.h>
-#include <kfc/rsrc.h>
-
-#include "NGS_ReadCollection.h"
-#include "NGS_Read.h"
-#include "NGS_ReadGroup.h"
-#include "NGS_Reference.h"
-#include "NGS_Alignment.h"
-#include "NGS_Statistics.h"
-
-#include <NGS_String.h>
-
-#define SHOW_UNIMPLEMENTED 0
-
-#define ENTRY \
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing ); \
-    m_ctx = ctx; \
-
-#define ENTRY_ACC(acc) \
-    ENTRY; \
-    m_acc = acc; \
-    m_coll = NGS_ReadCollectionMake ( ctx, acc );
-
-#define ENTRY_GET_READ(acc, readNo) \
-    ENTRY_ACC(acc); \
-    GetRead(readNo);
-
-#define ENTRY_GET_REF(acc,ref) \
-    ENTRY_ACC(acc); \
-    GetReference ( ref );
-
-#define EXIT \
-    REQUIRE ( ! FAILED () ); \
-    Release()
-
-////// additional REQUIRE macros
-
-#define REQUIRE_FAILED() ( REQUIRE ( FAILED () ), CLEAR() )
-
-// use for NGS calls returning NGS_String*
-#define REQUIRE_STRING(exp, call) \
-{\
-    string str = toString ( call, ctx, true );\
-    REQUIRE ( ! FAILED () );\
-    REQUIRE_EQ ( string(exp), str);\
-}
-
-//////
-
-std :: string
-toString ( const NGS_String* str, ctx_t ctx, bool release_source = false )
-{
-    if ( str == 0 )
-    {
-        throw std :: logic_error ( "toString ( NULL ) called" );
-    }
-    std :: string ret = std::string ( NGS_StringData ( str, ctx ), NGS_StringSize ( str, ctx ) );
-    if ( release_source )
-    {
-        NGS_StringRelease ( str, ctx );
-    }
-    return ret;
-}
-
-class NGS_C_Fixture
-{
-public:
-    NGS_C_Fixture()
-    : m_ctx(0), m_coll(0), m_read(0), m_readGroup (0), m_ref (0)
-    {
-    }
-    ~NGS_C_Fixture()
-    {
-    }
-
-    virtual void Release()
-    {
-        if (m_ctx != 0)
-        {
-            if (m_coll != 0)
-            {
-                NGS_RefcountRelease ( ( NGS_Refcount* ) m_coll, m_ctx );
-            }
-            if (m_read != 0)
-            {
-                NGS_ReadRelease ( m_read, m_ctx );
-            }
-            if (m_readGroup != 0)
-            {
-                NGS_ReadGroupRelease ( m_readGroup, m_ctx );
-            }
-            if (m_ref != 0)
-            {
-                NGS_ReferenceRelease ( m_ref, m_ctx );
-            }
-            m_ctx = 0; // a pointer into the caller's local memory
-        }
-    }
-
-    std::string ReadId(int64_t id) const
-    {
-        std::ostringstream s;
-        s << m_acc << ".R." << id;
-        return s . str ();
-    }
-    void GetRead(const std::string & id)
-    {
-        m_read = NGS_ReadCollectionGetRead ( m_coll, m_ctx, id.c_str() );
-        if (m_read != 0)
-        {   // initialize the fragment iterator
-            NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, m_ctx );
-        }
-    }
-    void GetRead(int64_t id)
-    {
-        GetRead ( ReadId ( id ) );
-    }
-
-    void GetReference(const char* name)
-    {
-        m_ref = NGS_ReadCollectionGetReference ( m_coll, m_ctx, name );
-        if ( m_ctx -> rc != 0 || m_ref == 0 )
-            throw std :: logic_error ( "GetReference() failed" );
-    }
-
-    const KCtx*         m_ctx;  // points into the test case's local memory
-    std::string         m_acc;
-    NGS_ReadCollection* m_coll;
-    NGS_Read*           m_read;
-    NGS_ReadGroup*      m_readGroup;
-    NGS_Reference*      m_ref;
-};
-
-#endif
-
diff --git a/test/ngs/ngstest.cpp b/test/ngs/ngstest.cpp
deleted file mode 100644
index 9c05b7a..0000000
--- a/test/ngs/ngstest.cpp
+++ /dev/null
@@ -1,889 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for low-level NGS functions
-*/
-
-// suppress macro max from windows.h
-#define NOMINMAX
-
-#include "ngs_c_fixture.hpp"
-
-#include <SRA_ReadGroupInfo.h>
-#include <SRA_Statistics.h>
-#include <NGS_Cursor.h>
-#include <SRA_Read.h>
-
-#include <NGS_Id.h>
-
-#include <klib/namelist.h>
-
-#include <kfg/kfg-priv.h>
-#include <kfg/repository.h>
-
-#include <vdb/table.h>
-#include <vdb/database.h>
-
-#include <stdexcept>
-#include <cstring>
-#include <limits>
-#include <cmath>
-
-using namespace std;
-using namespace ncbi::NK;
-
-TEST_SUITE(NgsTestSuite);
-
-const char* SRA_Accession = "SRR000001";
-const char* SRA_Accession_WithReadGroups = "SRR006061";
-const char* SRADB_Accession_WithBamHeader = "SRR600096";
-
-class ReadGroupInfo_Fixture : public NGS_C_Fixture
-{
-public:
-    ReadGroupInfo_Fixture()
-    : m_tbl(0), m_rgi(0)
-    {
-    }
-    ~ReadGroupInfo_Fixture()
-    {
-    }
-
-    void MakeSRA( const char* acc )
-    {
-        if ( m_tbl != 0 )
-            VTableRelease ( m_tbl );
-        if ( VDBManagerOpenTableRead ( m_ctx -> rsrc -> vdb, & m_tbl, NULL, acc ) != 0 )
-            throw logic_error ("ReadGroupInfo_Fixture::MakeSRA VDBManagerOpenTableRead failed");
-
-        if (m_rgi != 0 )
-            SRA_ReadGroupInfoRelease ( m_rgi, m_ctx );
-        m_rgi = SRA_ReadGroupInfoMake ( m_ctx, m_tbl );
-    }
-    void MakeSRADB( const char* acc )
-    {
-        if ( m_tbl != 0 )
-            VTableRelease ( m_tbl );
-        const VDatabase* db;
-        if ( VDBManagerOpenDBRead ( m_ctx -> rsrc -> vdb, & db, NULL, acc ) != 0 )
-            throw logic_error ("ReadGroupInfo_Fixture::MakeSRADB VDBManagerOpenTableRead failed");
-        if ( VDatabaseOpenTableRead ( db, & m_tbl, "SEQUENCE" ) != 0 )
-            throw logic_error ("ReadGroupInfo_Fixture::MakeSRADB VDatabaseOpenTableRead failed");
-
-        VDatabaseRelease ( db );
-
-        if (m_rgi != 0 )
-            SRA_ReadGroupInfoRelease ( m_rgi, m_ctx );
-        m_rgi = SRA_ReadGroupInfoMake ( m_ctx, m_tbl );
-    }
-
-    virtual void Release()
-    {
-        if (m_ctx != 0)
-        {
-            if (m_rgi != 0)
-                SRA_ReadGroupInfoRelease ( m_rgi, m_ctx );
-            if ( m_tbl != 0 )
-                VTableRelease ( m_tbl );
-        }
-        NGS_C_Fixture :: Release ();
-    }
-
-    const VTable*               m_tbl;
-    const SRA_ReadGroupInfo*    m_rgi;
-};
-
-
-FIXTURE_TEST_CASE ( ReadGroupInfo_Make, ReadGroupInfo_Fixture )
-{
-    ENTRY;
-    MakeSRA ( SRA_Accession_WithReadGroups );
-
-    REQUIRE ( ! FAILED () );
-    REQUIRE_NOT_NULL ( m_rgi );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( ReadGroupInfo_Count, ReadGroupInfo_Fixture )
-{
-    ENTRY;
-    MakeSRA ( SRA_Accession_WithReadGroups );
-
-    REQUIRE_EQ ( (uint32_t)144, m_rgi -> count );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( ReadGroupInfo_Access, ReadGroupInfo_Fixture )
-{
-    ENTRY;
-    MakeSRA ( SRA_Accession_WithReadGroups );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_NOT_NULL ( m_rgi -> groups [ 2 ] . name );
-    REQUIRE_EQ ( string ( "S104_V2" ), toString ( m_rgi -> groups [ 2 ] . name,    ctx ) );
-
-    REQUIRE_NULL ( m_rgi -> groups [ 2 ] . bam_LB );
-    REQUIRE_NULL ( m_rgi -> groups [ 2 ] . bam_SM );
-
-    REQUIRE_EQ ( (uint64_t)3263,        m_rgi -> groups [ 2 ] . min_row );
-    REQUIRE_EQ ( (uint64_t)6140,        m_rgi -> groups [ 2 ] . max_row );
-    REQUIRE_EQ ( (uint64_t)2878,        m_rgi -> groups [ 2 ] . row_count );
-    REQUIRE_EQ ( (uint64_t)759518,      m_rgi -> groups [ 2 ] . base_count );
-    REQUIRE_EQ ( (uint64_t)653032,      m_rgi -> groups [ 2 ] . bio_base_count );
-
-    EXIT;
-}
-#if SHOW_UNIMPLEMENTED
-FIXTURE_TEST_CASE ( ReadGroupInfo_BamHeader, ReadGroupInfo_Fixture )
-{
-    ENTRY;
-    MakeSRADB ( SRADB_Accession_WithBamHeader );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_NOT_NULL ( m_rgi -> groups [ 0 ] . name );
-    REQUIRE_EQ ( string ( "A1DLC.1" ), toString ( m_rgi -> groups [ 0 ] . name, ctx ) );
-
-    REQUIRE_NOT_NULL ( m_rgi -> groups [ 0 ] . bam_LB );
-    REQUIRE_EQ ( string ( "Solexa-112136" ), toString ( m_rgi -> groups [ 0 ] . bam_LB,  ctx ) );
-
-    REQUIRE_NOT_NULL ( m_rgi -> groups [ 0 ] . bam_SM );
-    REQUIRE_EQ ( string ( "12341_SN_05_1" ), toString ( m_rgi -> groups [ 0 ] . bam_SM,  ctx ) );
-
-    EXIT;
-}
-#endif
-FIXTURE_TEST_CASE ( ReadGroupInfo_Find_Found, ReadGroupInfo_Fixture )
-{
-    ENTRY;
-    MakeSRA ( SRA_Accession_WithReadGroups );
-
-    NGS_String * s = NGS_StringMake ( ctx, "S104_V2", strlen ( "S104_V2" ) );
-    REQUIRE_EQ ( (uint32_t)2, SRA_ReadGroupInfoFind ( m_rgi, ctx, NGS_StringData(s, ctx), NGS_StringSize(s, ctx) ) );
-    REQUIRE ( ! FAILED () );
-    NGS_StringRelease ( s, ctx );
-
-    EXIT;
-}
-
-
-#if 0
-FIXTURE_TEST_CASE ( ReadGroupInfo_PrintAll, ReadGroupInfo_Fixture )
-{
-    ENTRY;
-    MakeSRA ( SRA_Accession_WithReadGroups );
-//    MakeSRA ( "SRR000001" );
-
-    for ( uint32_t  i = 0; i < m_rgi -> count; ++i )
-    {
-        const NGS_String * name = m_rgi -> groups [ i ] . name;
-        REQUIRE_NOT_NULL ( name );
-        cout << NGS_StringData ( name, ctx ) << " "
-             << m_rgi -> groups [ i ] . min_row         << " "
-             << m_rgi -> groups [ i ] . max_row         << " "
-             << m_rgi -> groups [ i ] . row_count       << " "
-             << m_rgi -> groups [ i ] . base_count      << " "
-             << m_rgi -> groups [ i ] . bio_base_count  << " "
-             << endl;
-    }
-
-    EXIT;
-}
-#endif
-
-// NGS_Id
-
-class Id_Fixture : public NGS_C_Fixture
-{
-public:
-    Id_Fixture()
-    : run ( 0 ), id ( 0 )
-    {
-    }
-    ~Id_Fixture()
-    {
-    }
-
-    void Release()
-    {
-        if (m_ctx != 0)
-        {
-            if (run != 0)
-                NGS_StringRelease ( run, m_ctx );
-            if (id != 0)
-                NGS_StringRelease ( id, m_ctx );
-        }
-        NGS_C_Fixture :: Release ();
-    }
-
-    void MakeId ( enum NGS_Object object, int64_t rowId )
-    {
-        run  = NGS_StringMake ( m_ctx, "run", strlen ( "run" ) );
-        id = NGS_IdMake ( m_ctx, run, object, rowId );
-    }
-    void MakeFragmentId ( bool alignment, int64_t rowId, uint32_t frag_num )
-    {
-        run  = NGS_StringMake ( m_ctx, "run", strlen ( "run" ) );
-        id = NGS_IdMakeFragment ( m_ctx, run, alignment, rowId, frag_num);
-    }
-
-    NGS_String * run;
-    NGS_String * id;
-};
-
-
-//TODO: error cases
-
-FIXTURE_TEST_CASE(NGS_IdMake_Read, Id_Fixture)
-{
-    ENTRY;
-
-    MakeId ( NGSObject_Read, 12345678 );
-    REQUIRE_EQ ( string ( "run.R.12345678" ), string ( NGS_StringData ( id, ctx ), NGS_StringSize ( id, ctx ) ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(NGS_IdMake_Primary, Id_Fixture)
-{
-    ENTRY;
-
-    MakeId ( NGSObject_PrimaryAlignment, 12345678 );
-    REQUIRE_EQ ( string ( "run.PA.12345678" ), string ( NGS_StringData ( id, ctx ), NGS_StringSize ( id, ctx ) ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(NGS_IdMake_Secondary, Id_Fixture)
-{
-    ENTRY;
-
-    MakeId ( NGSObject_SecondaryAlignment, 12345678 );
-    REQUIRE_EQ ( string ( "run.SA.12345678" ), string ( NGS_StringData ( id, ctx ), NGS_StringSize ( id, ctx ) ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(NGS_IdMake_ReadFragment, Id_Fixture)
-{
-    ENTRY;
-
-    MakeFragmentId ( false, 12345678, 1 );
-    REQUIRE_EQ ( string ( "run.FR1.12345678" ), string ( NGS_StringData ( id, ctx ), NGS_StringSize ( id, ctx ) ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(NGS_IdMake_AlignmentFragment, Id_Fixture)
-{
-    ENTRY;
-
-    MakeFragmentId ( true, 12345678, 2 );
-    REQUIRE_EQ ( string ( "run.FA2.12345678" ), string ( NGS_StringData ( id, ctx ), NGS_StringSize ( id, ctx ) ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(NGS_Id_Parse_Read, Id_Fixture)
-{
-    ENTRY;
-
-    MakeId ( NGSObject_Read, 12345678 );
-    struct NGS_Id parsed = NGS_IdParse ( NGS_StringData(id, ctx), NGS_StringSize(id, ctx), ctx );
-    REQUIRE_EQ ( string ( "run" ), string ( parsed . run . addr, parsed . run . len ) );
-    REQUIRE_EQ ( (int32_t)NGSObject_Read, parsed . object );
-    REQUIRE_EQ ( (int64_t)12345678, parsed . rowId );
-    REQUIRE_EQ ( (uint32_t)0, parsed . fragId );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(NGS_Id_Parse_Primary, Id_Fixture)
-{
-    ENTRY;
-
-    MakeId ( NGSObject_PrimaryAlignment, 12345678 );
-    struct NGS_Id parsed = NGS_IdParse ( NGS_StringData(id, ctx), NGS_StringSize(id, ctx), ctx );
-    REQUIRE_EQ ( string ( "run" ), string ( parsed . run . addr, parsed . run . len ) );
-    REQUIRE_EQ ( (int32_t)NGSObject_PrimaryAlignment, parsed . object );
-    REQUIRE_EQ ( (int64_t)12345678, parsed . rowId );
-    REQUIRE_EQ ( (uint32_t)0, parsed . fragId );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(NGS_Id_Parse_Secondary, Id_Fixture)
-{
-    ENTRY;
-
-    MakeId ( NGSObject_SecondaryAlignment, 12345678 );
-    struct NGS_Id parsed = NGS_IdParse ( NGS_StringData(id, ctx), NGS_StringSize(id, ctx), ctx );
-    REQUIRE_EQ ( string ( "run" ), string ( parsed . run . addr, parsed . run . len ) );
-    REQUIRE_EQ ( (int32_t)NGSObject_SecondaryAlignment, parsed . object );
-    REQUIRE_EQ ( (int64_t)12345678, parsed . rowId );
-    REQUIRE_EQ ( (uint32_t)0, parsed . fragId );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(NGS_Id_Parse_ReadFragment, Id_Fixture)
-{
-    ENTRY;
-
-    MakeFragmentId ( false, 12345678, 1 );
-    struct NGS_Id parsed = NGS_IdParse ( NGS_StringData(id, ctx), NGS_StringSize(id, ctx), ctx );
-    REQUIRE_EQ ( string ( "run" ), string ( parsed . run . addr, parsed . run . len ) );
-    REQUIRE_EQ ( (int32_t)NGSObject_ReadFragment, parsed . object );
-    REQUIRE_EQ ( (int64_t)12345678, parsed . rowId );
-    REQUIRE_EQ ( (uint32_t)1, parsed . fragId );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(NGS_Id_Parse_AlignmentFragment, Id_Fixture)
-{
-    ENTRY;
-
-    MakeFragmentId ( true, 12345678, 2 );
-    struct NGS_Id parsed = NGS_IdParse ( NGS_StringData(id, ctx), NGS_StringSize(id, ctx), ctx );
-    REQUIRE_EQ ( string ( "run" ), string ( parsed . run . addr, parsed . run . len ) );
-    REQUIRE_EQ ( (int32_t)NGSObject_AlignmentFragment, parsed . object );
-    REQUIRE_EQ ( (int64_t)12345678, parsed . rowId );
-    REQUIRE_EQ ( (uint32_t)2, parsed . fragId );
-
-    EXIT;
-}
-
-// NGS_Statistics
-//TODO: decide whether to allow overwriting
-//TODO: type conversions
-
-TEST_CASE(NGS_Statistics_Make)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_AddU64)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    NGS_StatisticsAddU64 ( stats, ctx, "path", 1 );
-	REQUIRE_EQ ( ( uint32_t ) NGS_StatisticValueType_UInt64, NGS_StatisticsGetValueType ( stats, ctx, "path" ) );
-    REQUIRE_EQ ( (uint64_t)1, NGS_StatisticsGetAsU64 ( stats, ctx, "path" ) );
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_AddI64)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    NGS_StatisticsAddI64 ( stats, ctx, "path", -12 );
-	REQUIRE_EQ ( ( uint32_t ) NGS_StatisticValueType_Int64, NGS_StatisticsGetValueType ( stats, ctx, "path" ) );
-    REQUIRE_EQ ( (int64_t)-12, NGS_StatisticsGetAsI64 ( stats, ctx, "path" ) );
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_AddString)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    const char* cstr = "blah";
-    NGS_String * str = NGS_StringMake ( ctx, cstr, strlen ( cstr ) );
-    NGS_StatisticsAddString ( stats, ctx, "path", str );
-	REQUIRE_EQ ( ( uint32_t ) NGS_StatisticValueType_String, NGS_StatisticsGetValueType ( stats, ctx, "path" ) );
-    REQUIRE_EQ ( string ( cstr ), toString ( NGS_StatisticsGetAsString ( stats, ctx, "path" ), ctx, true ) );
-
-    NGS_StringRelease ( str, ctx );
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_AddDouble)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    NGS_StatisticsAddDouble ( stats, ctx, "path", 3.1415926 );
-	REQUIRE_EQ ( ( uint32_t ) NGS_StatisticValueType_Real, NGS_StatisticsGetValueType ( stats, ctx, "path" ) );
-    REQUIRE_EQ ( 3.1415926, NGS_StatisticsGetAsDouble ( stats, ctx, "path" ) );
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_AddNotANumber)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    NGS_StatisticsAddDouble ( stats, ctx, "path", std::numeric_limits<double>::quiet_NaN() );
-    REQUIRE_FAILED ();
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_OverwriteU64)
-{   // currently, an attempt to overwrite a path throws
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    NGS_StatisticsAddU64 ( stats, ctx, "path", 1 );
-    NGS_StatisticsAddU64 ( stats, ctx, "path", 2 );
-    REQUIRE_FAILED ();
-
-    REQUIRE_EQ ( (uint64_t)1, NGS_StatisticsGetAsU64 ( stats, ctx, "path" ) );
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_FindFound)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    NGS_StatisticsAddU64 ( stats, ctx, "path1", 1 );
-    NGS_StatisticsAddU64 ( stats, ctx, "path2", 2 );
-    NGS_StatisticsAddU64 ( stats, ctx, "path3", 3 );
-
-    REQUIRE_EQ ( (uint64_t)1, NGS_StatisticsGetAsU64 ( stats, ctx, "path1" ) );
-    REQUIRE_EQ ( (uint64_t)2, NGS_StatisticsGetAsU64 ( stats, ctx, "path2" ) );
-    REQUIRE_EQ ( (uint64_t)3, NGS_StatisticsGetAsU64 ( stats, ctx, "path3" ) );
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-
-TEST_CASE(NGS_Statistics_FindNotFound)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    NGS_StatisticsAddU64 ( stats, ctx, "path1", 1 );
-    NGS_StatisticsAddU64 ( stats, ctx, "path2", 2 );
-    NGS_StatisticsAddU64 ( stats, ctx, "path3", 3 );
-
-    NGS_StatisticsGetAsU64 ( stats, ctx, "path4" );
-    REQUIRE_FAILED ();
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-
-TEST_CASE(NGS_Statistics_Iterate)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    NGS_StatisticsAddU64 ( stats, ctx, "path3", 3 );
-    NGS_StatisticsAddU64 ( stats, ctx, "path1", 1 );
-    NGS_StatisticsAddU64 ( stats, ctx, "path2", 2 );
-
-    const char* path;
-    REQUIRE ( NGS_StatisticsNextPath ( stats, ctx, "", & path ) );
-    REQUIRE_EQ ( string ( "path1" ), string ( path ) );
-
-    REQUIRE ( NGS_StatisticsNextPath ( stats, ctx, "path1", & path ) );
-    REQUIRE_EQ ( string ( "path2" ), string ( path ) );
-
-    REQUIRE ( NGS_StatisticsNextPath ( stats, ctx, "path2", & path ) );
-    REQUIRE_EQ ( string ( "path3" ), string ( path ) );
-
-    REQUIRE ( ! NGS_StatisticsNextPath ( stats, ctx, "path3", & path ) );
-    REQUIRE_NULL ( path );
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_ConversionU64)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    NGS_StatisticsAddU64 ( stats, ctx, "path", 1 );
-    REQUIRE_EQ ( (int64_t)1, NGS_StatisticsGetAsI64 ( stats, ctx, "path" ) );
-    REQUIRE_EQ ( 1.0, NGS_StatisticsGetAsDouble( stats, ctx, "path" ) );
-    REQUIRE_EQ ( string ( "1" ), toString ( NGS_StatisticsGetAsString( stats, ctx, "path" ), ctx , true ) );
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_ConversionU64_Error)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    // MAX_U64 throws when reading as I64
-    NGS_StatisticsAddU64 ( stats, ctx, "path", std::numeric_limits<uint64_t>::max() );
-    NGS_StatisticsGetAsI64 ( stats, ctx, "path" );
-    REQUIRE_FAILED ();
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_ConversionI64)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    NGS_StatisticsAddI64 ( stats, ctx, "path", 1 );
-    REQUIRE_EQ ( (uint64_t)1, NGS_StatisticsGetAsU64 ( stats, ctx, "path" ) );
-    REQUIRE_EQ ( 1.0, NGS_StatisticsGetAsDouble( stats, ctx, "path" ) );
-    REQUIRE_EQ ( string ( "1" ), toString ( NGS_StatisticsGetAsString( stats, ctx, "path" ), ctx , true ) );
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_ConversionI64_Error)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    // negatives throw when reading as U64
-    NGS_StatisticsAddI64 ( stats, ctx, "path", -1 );
-    NGS_StatisticsGetAsU64 ( stats, ctx, "path" );
-    REQUIRE_FAILED ();
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_ConversionReal)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    NGS_StatisticsAddDouble ( stats, ctx, "path", 3.14 );
-
-    // GetAsU64 truncates
-    REQUIRE_EQ ( (uint64_t)3, NGS_StatisticsGetAsU64 ( stats, ctx, "path" ) );
-    // GetAsI64 truncates
-    REQUIRE_EQ ( (int64_t)3, NGS_StatisticsGetAsI64 ( stats, ctx, "path" ) );
-    // GetAsString converts with a default precision */
-    REQUIRE_EQ ( string ( "3.140000" ), toString ( NGS_StatisticsGetAsString( stats, ctx, "path" ), ctx , true ) );
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_ConversionReal_Negative)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    NGS_StatisticsAddDouble ( stats, ctx, "path", -1.1 );
-    // GetAsU64 throws
-    NGS_StatisticsGetAsU64( stats, ctx, "path" );
-    REQUIRE_FAILED ();
-    // GetAsI64 truncates
-    REQUIRE_EQ ( (int64_t)-1, NGS_StatisticsGetAsI64 ( stats, ctx, "path" ) );
-    // GetAsString converts with a default precision */
-    REQUIRE_EQ ( string ( "-1.100000" ), toString ( NGS_StatisticsGetAsString( stats, ctx, "path" ), ctx , true ) );
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_ConversionReal_ErrorSize)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    // throws when too big for a 64 bit number
-    NGS_StatisticsAddDouble ( stats, ctx, "path", std::numeric_limits<double>::max() );
-    NGS_StatisticsGetAsU64( stats, ctx, "path" );
-    REQUIRE_FAILED ();
-    NGS_StatisticsGetAsI64( stats, ctx, "path" );
-    REQUIRE_FAILED ();
-
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_ConversionString)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    const char* cstr = "   \t3.14"; /* leading space is ok */
-    NGS_String * str = NGS_StringMake ( ctx, cstr, strlen ( cstr ) );
-    NGS_StatisticsAddString ( stats, ctx, "path", str );
-
-    // GetAsU64 truncates
-    REQUIRE_EQ ( (uint64_t)3, NGS_StatisticsGetAsU64 ( stats, ctx, "path" ) );
-    // GetAsI64 truncates
-    REQUIRE_EQ ( (int64_t)3, NGS_StatisticsGetAsI64 ( stats, ctx, "path" ) );
-    REQUIRE_EQ ( 3.14, NGS_StatisticsGetAsDouble( stats, ctx, "path" ) );
-
-//TODO: more conversions to real
-// "  +3.14"
-// "  -3.14"
-// "  -3E2"
-// "  -3e2"
-// "  -3.14e2"
-// "  -0xF.0"
-// "  -0xF.0P2" binary exponent P/p might not work on MSVS (MSVS doc on strtod mentions D/d without explanation)
-// "  -0xFp2"
-// "  -0xFp-2"
-// "  INf"
-// "  iNFiNiTY"
-// "  NAN"
-// "  nAn"
-// "  naN(blah)"
-
-    NGS_StringRelease ( str, ctx );
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_ConversionString_BigUInt)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    const char* cstr = "18446744073709551615"; // std::numeric_limits<uint64_t>::max()
-    NGS_String * str = NGS_StringMake ( ctx, cstr, strlen ( cstr ) );
-    NGS_StatisticsAddString ( stats, ctx, "path", str );
-
-    REQUIRE_EQ ( std::numeric_limits<uint64_t>::max(), NGS_StatisticsGetAsU64 ( stats, ctx, "path" ) );
-
-    NGS_StringRelease ( str, ctx );
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_ConversionString_BigUInt_Error)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    const char* cstr = "18446744073709551616"; // std::numeric_limits<uint64_t>::max() + 1
-    NGS_String * str = NGS_StringMake ( ctx, cstr, strlen ( cstr ) );
-    NGS_StatisticsAddString ( stats, ctx, "path", str );
-
-    NGS_StatisticsGetAsU64 ( stats, ctx, "path" );
-    REQUIRE_FAILED ();
-
-    NGS_StringRelease ( str, ctx );
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_ConversionString_BigInt)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    const char* cstr = "9223372036854775807"; // std::numeric_limits<int64_t>::max()
-    NGS_String * str = NGS_StringMake ( ctx, cstr, strlen ( cstr ) );
-    NGS_StatisticsAddString ( stats, ctx, "path", str );
-
-    REQUIRE_EQ ( std::numeric_limits<int64_t>::max(), NGS_StatisticsGetAsI64 ( stats, ctx, "path" ) );
-
-    NGS_StringRelease ( str, ctx );
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_ConversionString_BigInt_Error)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    const char* cstr = "9223372036854775808"; // std::numeric_limits<int64_t>::max() + 1
-    NGS_String * str = NGS_StringMake ( ctx, cstr, strlen ( cstr ) );
-    NGS_StatisticsAddString ( stats, ctx, "path", str );
-
-    NGS_StatisticsGetAsI64 ( stats, ctx, "path" );
-    REQUIRE_FAILED ();
-
-    NGS_StringRelease ( str, ctx );
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-TEST_CASE(NGS_Statistics_ConversionString_TrailingSpace)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_Statistics * stats = SRA_StatisticsMake ( ctx );
-
-    const char* cstr = "   \t3.14 \t\n  "; /* trailing space is an error*/
-    NGS_String * str = NGS_StringMake ( ctx, cstr, strlen ( cstr ) );
-    NGS_StatisticsAddString ( stats, ctx, "path", str );
-
-    NGS_StatisticsGetAsDouble( stats, ctx, "path" );
-    REQUIRE_FAILED ();
-
-    NGS_StringRelease ( str, ctx );
-    NGS_StatisticsRelease ( stats, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-//////////////////////////////////////////// Errors opening read collection
-
-#define BAD_ACCESSION "that refuses to open"
-TEST_CASE(NGS_FailedToOpen)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_ReadCollectionMake ( ctx, BAD_ACCESSION);
-
-    KConfig* kfg;
-    REQUIRE_RC ( KConfigMakeLocal ( &kfg, NULL ) );
-    const KRepositoryMgr* repoMgr;
-    REQUIRE_RC ( KConfigMakeRepositoryMgrRead ( kfg, &repoMgr ) );
-    if ( KRepositoryMgrHasRemoteAccess ( repoMgr ) )
-    {
-        REQUIRE_EQ ( string ( "Cannot open accession '" BAD_ACCESSION "'"),
-                 string ( WHAT () ) );
-    }
-    else
-    {
-        REQUIRE_EQ ( string ( "Cannot open accession '" BAD_ACCESSION "'. Note: remote access is disabled in the configuration"),
-                 string ( WHAT () ) );
-    }
-    REQUIRE_FAILED ();
-    REQUIRE_RC ( KRepositoryMgrRelease ( repoMgr ) );
-}
-
-//////////////////////////////////////////// Open read collection using system path
-
-#ifdef WIN32
-#define SYSPATH_ACCESSION ".\\data\\SysPathTest"
-#else
-#define SYSPATH_ACCESSION "./data/SysPathTest"
-#endif
-TEST_CASE(NGS_OpenBySysPath)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-    NGS_ReadCollection * readColl = NGS_ReadCollectionMake( ctx, SYSPATH_ACCESSION );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_NOT_NULL ( readColl );
-    NGS_ReadCollectionRelease ( readColl, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-
-//////////////////////////////////////////// NGS_Cursor
-
-TEST_CASE ( NGS_Cursor_GetColumnIndex_adds_column)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-
-    const VDBManager * mgr = ctx -> rsrc -> vdb;
-    REQUIRE_NOT_NULL ( mgr );
-
-    const VDatabase *db;
-    REQUIRE_RC ( VDBManagerOpenDBRead ( mgr, & db, NULL, "%s", SRADB_Accession_WithBamHeader ) );
-
-    VTable* tbl;
-    REQUIRE_RC ( VDatabaseOpenTableRead ( db, (const VTable**)&tbl, "SEQUENCE" ) );
-
-    const NGS_Cursor* curs = NGS_CursorMake ( ctx, tbl, sequence_col_specs, seq_NUM_COLS ); // this will add the first column (READ) to the cursor
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_NE ( (uint32_t)0, NGS_CursorGetColumnIndex ( curs, ctx, seq_READ_LEN ) ); // this should add the column we are requesting to the cursor
-
-    NGS_CursorRelease ( curs, ctx );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_RC ( VTableRelease ( tbl ) );
-
-    REQUIRE_RC ( VDatabaseRelease ( db ) );
-}
-
-TEST_CASE ( NGS_Cursor_Leak_when_Make_fails )
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-
-    const VDBManager * mgr = ctx -> rsrc -> vdb;
-    REQUIRE_NOT_NULL ( mgr );
-
-    const VDatabase *db;
-    REQUIRE_RC ( VDBManagerOpenDBRead ( mgr, & db, NULL, "%s", SRADB_Accession_WithBamHeader ) );
-
-    VTable* tbl;
-    REQUIRE_RC ( VDatabaseOpenTableRead ( db, (const VTable**)&tbl, "SEQUENCE" ) );
-
-    const char * bogus_col_specs [] = { "not a column at all!" };
-    REQUIRE_NULL ( NGS_CursorMake ( ctx, tbl, bogus_col_specs, 1 ) );
-    REQUIRE ( FAILED () );
-    CLEAR();
-
-    REQUIRE_RC ( VTableRelease ( tbl ) );
-    REQUIRE_RC ( VDatabaseRelease ( db ) );
-}
-
-//////////////////////////////////////////// Main
-
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-ngs";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t m_coll=NgsTestSuite(argc, argv);
-    return m_coll;
-}
-
-}
-
diff --git a/test/ngs/ngstest_csra1.cpp b/test/ngs/ngstest_csra1.cpp
deleted file mode 100644
index 00b6072..0000000
--- a/test/ngs/ngstest_csra1.cpp
+++ /dev/null
@@ -1,1250 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for NGS C interface, CSRA1 archives
-*/
-
-#include "ngs_c_fixture.hpp"
-
-#include <limits.h>
-
-#include <klib/printf.h>
-
-#include <kdb/manager.h>
-
-#include <vdb/manager.h>
-#include <vdb/vdb-priv.h>
-
-#include "CSRA1_Reference.h"
-#include "NGS_Pileup.h"
-#include "NGS_FragmentBlobIterator.h"
-#include "NGS_FragmentBlob.h"
-
-using namespace std;
-using namespace ncbi::NK;
-
-TEST_SUITE(NgsCsra1TestSuite);
-
-const char* CSRA1_PrimaryOnly   = "SRR1063272";
-const char* CSRA1_WithSecondary = "SRR833251";
-const char* CSRA1_WithGroups = "SRR822962";
-const char* CSRA1_WithCircularReference = "SRR1769246";
-const char* CSRA1_Older = "SRR353866";
-
-#define ENTRY_GET_ALIGN(acc, alignNo) \
-    ENTRY_ACC(acc); \
-    GetAlignment(alignNo);
-
-class CSRA1_Fixture : public NGS_C_Fixture
-{
-public:
-    CSRA1_Fixture()
-    : m_align(0)
-    {
-    }
-    ~CSRA1_Fixture()
-    {
-    }
-
-    virtual void Release()
-    {
-        if (m_ctx != 0)
-        {
-            if (m_align != 0)
-            {
-                NGS_AlignmentRelease ( m_align, m_ctx );
-            }
-        }
-        NGS_C_Fixture :: Release ();
-    }
-
-
-    void GetAlignment ( uint64_t id, bool primary = true )
-    {
-        stringstream str;
-        str << toString ( NGS_ReadCollectionGetName ( m_coll, m_ctx ), m_ctx, true ) << ( primary ? ".PA." : ".SA.") << id;
-        m_align = NGS_ReadCollectionGetAlignment ( m_coll, m_ctx, str . str () . c_str () );
-        if ( m_ctx -> rc != 0 || m_align == 0 )
-            throw std :: logic_error ( "GetAlignment() failed" );
-    }
-
-    NGS_Alignment*      m_align;
-};
-
-// NGS_Read
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGetReadName, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( "1", NGS_ReadGetReadName ( m_read, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGetReadId, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( ReadId ( 1 ),  NGS_ReadGetReadId ( m_read, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGetReadGroup, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( "C1ELY.6",  NGS_ReadGetReadGroup ( m_read, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGetReadCategory_Aligned, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-
-    enum NGS_ReadCategory cat = NGS_ReadGetReadCategory ( m_read, ctx );
-    REQUIRE_EQ ( NGS_ReadCategory_fullyAligned, cat );
-
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGetReadCategory_Partial, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 3 );
-
-    enum NGS_ReadCategory cat = NGS_ReadGetReadCategory ( m_read, ctx );
-    REQUIRE_EQ ( NGS_ReadCategory_partiallyAligned, cat );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGetReadSequence_Full, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-
-    string expected ("ACTCGACATTCTGCCTTCGACCTATCTTTCTCCTCTCCCAGTCATCGCCCAGTAGAATTACCAGGCAATGAACCAGGGCCTTCCATCCCAACGGCACAGC"
-                     "AAAGGTATGATACCTGAGATGTTGCGGGATGGTGGGTTTGTGAGGAGATGGCCACGCAGGCAAGGTCTTTTGGAATGGTTCACTGTTGGAGTGAACCCAT"
-                     "AT");
-    REQUIRE_STRING( expected,  NGS_ReadGetReadSequence ( m_read, ctx, 0, (size_t)-1 ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGetReadSequence_PartialNoLength, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( "AT",  NGS_ReadGetReadSequence ( m_read, ctx, 200, (size_t)-1 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGetReadSequence_PartialLength, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( "CATA", NGS_ReadGetReadSequence ( m_read, ctx, 197, 4 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGetReadQualities_Full, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-
-    string expected (
-        "@@CDDBDFFBFHFIEEFGIGGHIEHIGIGGFGEGAFDHIIIIIGGGDFHII;=BF at FEHGIEEH?AHHFHFFFFDC5'5=?CC?ADCD at AC??9BDDCDB"
-        "<@@@DDADDFFHGHIIDHFFHDEFEHIIGHIIDGGGFHIJIGAGHAH=;DGEGEEEDDDB<ABBD;ACDDDCBCCCDD at CCDDDCDCDBDD@ACC>A@?>"
-        "C3");
-    REQUIRE_STRING ( expected, NGS_ReadGetReadQualities ( m_read, ctx, 0, (size_t)-1 ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGetReadQualities_PartialNoLength, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( "C3", NGS_ReadGetReadQualities ( m_read, ctx, 200, (size_t)-1 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGetReadQualities_PartialLength, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( "@?>C", NGS_ReadGetReadQualities ( m_read, ctx, 197, 4 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadNumFragments, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-
-    uint32_t num = NGS_ReadNumFragments ( m_read, ctx );
-    REQUIRE_EQ ( (uint32_t)2, num );
-
-    EXIT;
-}
-
-// NGS_Fragment (through an NGS_Read object)
-FIXTURE_TEST_CASE(CSRA1_NGS_NoFragmentBeforeNext, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    m_read = NGS_ReadCollectionGetRead ( m_coll, ctx, ReadId ( 1 ) . c_str () );
-
-    // no access to a Fragment before a call to NGS_FragmentIteratorNext
-    REQUIRE_NULL ( NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_FragmentGetId, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( string ( CSRA1_PrimaryOnly ) + ".FR0.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_FragmentGetSequence_Full, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-
-    string expected = "ACTCGACATTCTGCCTTCGACCTATCTTTCTCCTCTCCCAGTCATCGCCCAGTAGAATTACCAGGCAATGAACCAGGGCC"
-                      "TTCCATCCCAACGGCACAGCA";
-    REQUIRE_STRING( expected,  NGS_FragmentGetSequence ( (NGS_Fragment*)m_read, ctx, 0, (size_t)-1 ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_FragmentGetSequence_PartialNoLength, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( "TTCCATCCCAACGGCACAGCA",  NGS_FragmentGetSequence ( (NGS_Fragment*)m_read, ctx, 80, (size_t)-1 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_FragmentGetSequence_PartialLength, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( "TTCC", NGS_FragmentGetSequence ( (NGS_Fragment*)m_read, ctx, 80, 4 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_FragmentGetQualities_Full, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-    string expected = "@@CDDBDFFBFHFIEEFGIGGHIEHIGIGGFGEGAFDHIIIIIGGGDFHII;=BF at FEHGIEEH?AHHFHFFFFDC5'5=?CC?ADCD at AC??9BDDCDB<";
-    REQUIRE_STRING ( expected, NGS_FragmentGetQualities ( (NGS_Fragment*)m_read, ctx, 0, (size_t)-1 ) );
-    EXIT;
-}
-
-// Iteration over Fragments
-FIXTURE_TEST_CASE(CSRA1_NGS_FragmentIteratorNext, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 ); // calls NGS_FragmentIteratorNext
-
-    REQUIRE_STRING ( string( CSRA1_PrimaryOnly ) + ".FR0.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE_STRING ( string( CSRA1_PrimaryOnly ) + ".FR1.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_FragmentIteratorNext_SingleFragment, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( "ERR055323", 1 );
-    REQUIRE_STRING ( "ERR055323.FR0.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_FragmentIteratorNext_NullRead, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, false ); // will return an empty iterator
-    REQUIRE_NULL ( NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_FragmentIteratorNext_BeyondEnd, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_PrimaryOnly, 1 );
-
-    REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-
-    EXIT;
-}
-
-// Iteration over Reads
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReads_Next, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, true );
-    REQUIRE ( ! FAILED () && m_read );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    // on the first read
-    REQUIRE_STRING ( ReadId ( 1 ), NGS_ReadGetReadId ( m_read, ctx ) );
-
-    // iterate over fragments
-    {
-        REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) ); // position on the first fragment
-        REQUIRE_STRING ( string( CSRA1_PrimaryOnly ) + ".FR0.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-        REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-        REQUIRE_STRING ( string( CSRA1_PrimaryOnly ) + ".FR1.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-        REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-    }
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    // on the second read
-    REQUIRE_STRING ( ReadId ( 2 ), NGS_ReadGetReadId ( m_read, ctx ) );
-
-    {
-        REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) ); // position on the first fragment
-        REQUIRE_STRING ( string( CSRA1_PrimaryOnly ) + ".FR0.2", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-        REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-        REQUIRE_STRING ( string( CSRA1_PrimaryOnly ) + ".FR1.2", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-        REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-    }
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_GetReadsIteratorNext_BeyondEnd, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, false, false, false);
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-
-    EXIT;
-}
-
-// Iteration over a range of Reads
-FIXTURE_TEST_CASE(CSRA1_ReadRange_NoReadBeforeNext, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-
-    m_read = NGS_ReadCollectionGetReadRange ( m_coll, ctx, 3, 2, true, true, true );
-    REQUIRE ( ! FAILED () && m_read );
-
-    // no access to a Read before a call to NGS_FragmentIteratorNext
-    REQUIRE_NULL ( NGS_ReadGetReadId ( m_read, ctx ) );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReadRange, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-
-    m_read = NGS_ReadCollectionGetReadRange ( m_coll, ctx, 3, 2, true, true, true );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE_STRING ( ReadId ( 3 ), NGS_ReadGetReadId ( m_read, ctx ) );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE_STRING ( ReadId ( 4 ), NGS_ReadGetReadId ( m_read, ctx ) );
-
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReadRange_Empty, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    m_read = NGS_ReadCollectionGetReadRange ( m_coll, ctx, 6000000, 2, true, true, true );
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReadRange_Filtered, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-
-    m_read = NGS_ReadCollectionGetReadRange ( m_coll, ctx, 1, 2000000, false, false, true );
-    REQUIRE ( ! FAILED () && m_read );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    enum NGS_ReadCategory cat = NGS_ReadGetReadCategory ( m_read, ctx );
-    REQUIRE_EQ ( NGS_ReadCategory_unaligned, cat );
-
-    EXIT;
-}
-
-// NGS_Fragment (through an NGS_Alignment object)
-FIXTURE_TEST_CASE(CSRA1_NoAlignmentFragmentBeforeNext, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-
-    m_align = NGS_ReadCollectionGetAlignments ( m_coll, m_ctx, true, true );
-    // no access to a Fragment before a call to NGS_FragmentIteratorNext
-    REQUIRE_NULL ( NGS_FragmentGetId ( (NGS_Fragment*)m_align, ctx ) );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentFragmentGetId, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 5 );
-    REQUIRE_STRING ( string ( CSRA1_PrimaryOnly ) + ".FA1.5", NGS_FragmentGetId ( (NGS_Fragment*)m_align, ctx ) );
-                                                                // NB. alignment #5 refers to read #165753
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentFragmentGetSequence, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( "TCGAC", NGS_FragmentGetSequence ( (NGS_Fragment*)m_align, ctx, 2, 5 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentFragmentGetQualities, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( "CDDBD", NGS_FragmentGetQualities ( (NGS_Fragment*)m_align, ctx, 2, 5 ) );
-    EXIT;
-}
-
-// NGS_Alignment
-//TODO: secondary alignments
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetAlignmentId, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( string( CSRA1_PrimaryOnly ) + ".PA.1", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetReferenceSpec, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( string( "supercont2.1" ), NGS_AlignmentGetReferenceSpec ( m_align, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetMappingQuality, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_EQ( 60, NGS_AlignmentGetMappingQuality( m_align, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetReferenceBases, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( "ACTCGACATTCTGTCTTCGACCTATCTTTCTCCTCTCCCAGTCATCGCCCAGTAGAATTACCAGGCAATGAACCACGGCCTTTCATCCCAACGGCACAGCA",
-                     NGS_AlignmentGetReferenceBases( m_align, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetReadGroup, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( "C1ELY.6", NGS_AlignmentGetReadGroup( m_align, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetReadId, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 5 );
-    REQUIRE_STRING ( string ( CSRA1_PrimaryOnly ) + ".R.165753", NGS_AlignmentGetReadId ( m_align, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentIsPrimary_Yes, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 5 );
-    REQUIRE( NGS_AlignmentIsPrimary ( m_align, ctx ) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentIsPrimary_No, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_WithSecondary );
-    GetAlignment(175, false);
-    REQUIRE( ! NGS_AlignmentIsPrimary ( m_align, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetAlignmentPosition, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_EQ ( (int64_t)85, NGS_AlignmentGetAlignmentPosition ( m_align, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetAlignmentLength, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_EQ ( (uint64_t)101, NGS_AlignmentGetAlignmentLength ( m_align, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetIsReversedOrientation_False, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE ( ! NGS_AlignmentGetIsReversedOrientation ( m_align, ctx ) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetIsReversedOrientation_True, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 2 );
-    REQUIRE ( NGS_AlignmentGetIsReversedOrientation ( m_align, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetSoftClip_None, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_EQ ( 0, NGS_AlignmentGetSoftClip ( m_align, ctx, true ) );
-    REQUIRE_EQ ( 0, NGS_AlignmentGetSoftClip ( m_align, ctx, false ) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetSoftClip_Left, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 4 );
-    REQUIRE_EQ ( 5, NGS_AlignmentGetSoftClip ( m_align, ctx, true ) );
-    REQUIRE_EQ ( 0, NGS_AlignmentGetSoftClip ( m_align, ctx, false ) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetSoftClip_Right, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 10 );
-    REQUIRE_EQ ( 0, NGS_AlignmentGetSoftClip ( m_align, ctx, true ) );
-    REQUIRE_EQ ( 13, NGS_AlignmentGetSoftClip ( m_align, ctx, false ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetTemplateLength, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_EQ ( (uint64_t)201, NGS_AlignmentGetTemplateLength ( m_align, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetMateAlignment, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-
-    NGS_Alignment* mate = NGS_AlignmentGetMateAlignment ( m_align, ctx );
-    REQUIRE ( ! FAILED () && mate );
-
-    // mate is alignment #2
-    REQUIRE_STRING ( string( CSRA1_PrimaryOnly ) + ".FA1.2", NGS_FragmentGetId( (NGS_Fragment*)mate, ctx ) );
-
-    NGS_AlignmentRelease ( mate, ctx );
-
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetClippedFragmentQualities, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 4 );
-    REQUIRE_STRING ( "#AA>55;5(;63;;3@;A9??;6..73CDCIDA>DCB>@B=;@B?;;ADAB<DD?1*>@C9:EC?2++A3+F4EEB<E>EEIEDC2?C:;AB+==1",
-                     NGS_AlignmentGetClippedFragmentQualities ( m_align, ctx ));
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetAlignedFragmentBases, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 2 );
-    REQUIRE_STRING ( "ATATGGGTTCACTCCAACAGTGAACCATTCCAAAAGACCTTGCCTGCGTGGCCATCTCCTCACAAACCCACCATCCCGCAACATCTCAGGTATCATACCTT",
-                     NGS_AlignmentGetAlignedFragmentBases ( m_align, ctx ));
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetShortCigar_Unclipped, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 4 );
-    REQUIRE_STRING ( "5S96M", NGS_AlignmentGetShortCigar ( m_align, ctx, false ) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetShortCigar_Clipped, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 4 );
-    REQUIRE_STRING ( "96M", NGS_AlignmentGetShortCigar ( m_align, ctx, true ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetLongCigar_Unclipped, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 4 );
-    REQUIRE_STRING ( "5S1X8=1X39=1X46=", NGS_AlignmentGetLongCigar ( m_align, ctx, false ) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetLongCigar_Clipped, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 4 );
-    REQUIRE_STRING ( "1X8=1X39=1X46=", NGS_AlignmentGetLongCigar ( m_align, ctx, true ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentHasMate_Primary_NoMate, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 99 );
-    REQUIRE ( ! NGS_AlignmentHasMate ( m_align, ctx ) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentHasMate_Primary_YesMate, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE ( NGS_AlignmentHasMate ( m_align, ctx ) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentHasMate_Secondary, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_WithSecondary );
-    GetAlignment ( 169, false );
-    REQUIRE ( ! NGS_AlignmentHasMate ( m_align, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetMateAlignmentId_Primary, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( string ( CSRA1_PrimaryOnly ) + ".PA.2", NGS_AlignmentGetMateAlignmentId ( m_align, ctx ) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetMateAlignmentId_Missing, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 99 );
-    NGS_AlignmentGetMateAlignmentId ( m_align, ctx );
-    REQUIRE_FAILED ();
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetMateAlignmentId_Secondary, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_WithSecondary );
-    GetAlignment ( 172, false );
-    NGS_AlignmentGetMateAlignmentId ( m_align, ctx );
-    REQUIRE_FAILED ();
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetMateReferenceSpec, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE_STRING ( "supercont2.1", NGS_AlignmentGetMateReferenceSpec ( m_align, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetMateReferenceSpec_OlderSchema, CSRA1_Fixture)
-{   // VDB-3065: for older accessions mate reference spec is in a different column
-    ENTRY_GET_ALIGN( CSRA1_Older, 1 );
-    REQUIRE_STRING ( "AAAB01006027.1", NGS_AlignmentGetMateReferenceSpec ( m_align, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetMateIsReversedOrientation_True, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 1 );
-    REQUIRE ( NGS_AlignmentGetMateIsReversedOrientation ( m_align, ctx ) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_AlignmentGetMateIsReversedOrientation_False, CSRA1_Fixture)
-{
-    ENTRY_GET_ALIGN( CSRA1_PrimaryOnly, 2 );
-    REQUIRE ( ! NGS_AlignmentGetMateIsReversedOrientation ( m_align, ctx ) );
-    EXIT;
-}
-
-// NGS_Reference
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetCommonName, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1");
-    REQUIRE_STRING ( "supercont2.1", NGS_ReferenceGetCommonName ( m_ref, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetCanonicalName, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( "SRR821492", "chr7" );
-    const char* canoName = "NC_000007.13";
-    REQUIRE_STRING ( canoName, NGS_ReferenceGetCanonicalName ( m_ref, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceIsCircular_Yes, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( "SRR821492", "chrM" );
-    REQUIRE ( NGS_ReferenceGetIsCircular ( m_ref, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceIsCircular_No, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1" );
-    REQUIRE ( ! NGS_ReferenceGetIsCircular ( m_ref, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetLength, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1" );
-    REQUIRE_EQ ( (uint64_t)2291499l, NGS_ReferenceGetLength ( m_ref, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetFirstRowId, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1" );
-    REQUIRE_EQ ( (int64_t)1, CSRA1_Reference_GetFirstRowId ( m_ref, ctx ) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetLastRowId, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1" );
-    REQUIRE_EQ ( (int64_t)459, CSRA1_Reference_GetLastRowId ( m_ref, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetBases_Full, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1" );
-    string bases = toString ( NGS_ReferenceGetBases( m_ref, ctx, 0, -1 ), ctx, true );
-    REQUIRE_EQ ( NGS_ReferenceGetLength ( m_ref, ctx ), ( uint64_t ) bases. size () );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetBases, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1" );
-    REQUIRE_STRING ( "CCTGTCC", NGS_ReferenceGetBases( m_ref, ctx, 7000, 7 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetAlignment_Primary, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    m_align = NGS_ReferenceGetAlignment ( m_ref, ctx, ( string ( CSRA1_PrimaryOnly ) + ".PA.1" ) . c_str () );
-    REQUIRE ( ! FAILED () && m_align );
-
-    REQUIRE_STRING ( string ( CSRA1_PrimaryOnly ) + ".PA.1", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetAlignments_PrimaryOnly_Primary, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, true, false );
-    REQUIRE ( ! FAILED () && m_align );
-
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( string ( CSRA1_PrimaryOnly ) + ".PA.1", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetAlignments_PrimaryOnly_Secondary, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, false, true );
-    REQUIRE ( ! FAILED () && m_align );
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetAlignments_WithSecondary_Primary, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_WithSecondary, "gi|169794206|ref|NC_010410.1|" );
-
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, true, false);
-    REQUIRE ( ! FAILED () && m_align );
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( string ( CSRA1_WithSecondary ) + ".PA.1", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetAlignments_WithSecondary_Secondary, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_WithSecondary, "gi|169794206|ref|NC_010410.1|" );
-
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, false, true );
-    REQUIRE ( ! FAILED () && m_align );
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-
-    REQUIRE_STRING ( string ( CSRA1_WithSecondary ) + ".SA.169", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-
-    EXIT;
-}
-
-
-// ReferenceGetAlignments on circular references
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetAlignments_Circular_Wraparound, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_WithCircularReference, "NC_012920.1" );
-
-    const bool wants_primary = true;
-    const bool wants_secondary = true;
-    const uint32_t no_filters = 0;
-    const int32_t no_map_qual = 0;
-
-    m_align = NGS_ReferenceGetFilteredAlignments ( m_ref, ctx, wants_primary, wants_secondary, no_filters, no_map_qual );
-    REQUIRE ( ! FAILED () && m_align );
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-
-    // by default, the first returned alignment starts before the start of the circular reference
-    REQUIRE_EQ ( (int64_t)16477, NGS_AlignmentGetAlignmentPosition ( m_align, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetAlignments_Circular_NoWraparound, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_WithCircularReference, "NC_012920.1" );
-
-    const bool wants_primary = true;
-    const bool wants_secondary = true;
-    const uint32_t filters = NGS_AlignmentFilterBits_no_wraparound;
-    const int32_t no_map_qual = 0;
-
-    m_align = NGS_ReferenceGetFilteredAlignments ( m_ref, ctx, wants_primary, wants_secondary, filters, no_map_qual );
-    REQUIRE ( ! FAILED () && m_align );
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-
-    // with a no-wraparound filter, the first returned alignment starts at/after the start of the circular reference
-    REQUIRE_EQ ( (int64_t)5, NGS_AlignmentGetAlignmentPosition ( m_align, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetFilteredAlignmentSlice_FullReference_Wraparound_Count, CSRA1_Fixture )
-{
-    ENTRY_GET_REF( CSRA1_WithCircularReference, "NC_012920.1" );
-
-    const bool wants_primary = true;
-    const bool wants_secondary = true;
-    const uint32_t no_filters = 0;
-    const int32_t no_map_qual = 0;
-
-    m_align = NGS_ReferenceGetFilteredAlignmentSlice ( m_ref, ctx, 0, NGS_ReferenceGetLength ( m_ref, ctx ), wants_primary, wants_secondary, no_filters, no_map_qual );
-    REQUIRE ( ! FAILED () && m_align );
-
-    uint64_t count = 0;
-    while ( NGS_AlignmentIteratorNext ( m_align, ctx ) )
-    {
-        ++count;
-    }
-    REQUIRE_EQ ( (uint64_t) 12317, count );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetFilteredAlignmentSlice_FullReference_NoWraparound_Count, CSRA1_Fixture )
-{
-    ENTRY_GET_REF( CSRA1_WithCircularReference, "NC_012920.1" );
-
-    const bool wants_primary = true;
-    const bool wants_secondary = true;
-    const uint32_t filters = NGS_AlignmentFilterBits_no_wraparound;
-    const int32_t no_map_qual = 0;
-
-    m_align = NGS_ReferenceGetFilteredAlignmentSlice ( m_ref, ctx, 0, NGS_ReferenceGetLength ( m_ref, ctx ), wants_primary, wants_secondary, filters, no_map_qual );
-    REQUIRE ( ! FAILED () && m_align );
-
-    int64_t lastPos = 0;
-    uint64_t count = 0;
-    while ( NGS_AlignmentIteratorNext ( m_align, ctx ) )
-    {
-        ++count;
-        int64_t newPos = NGS_AlignmentGetAlignmentPosition ( m_align, ctx );
-        REQUIRE_LE ( lastPos, newPos );
-        lastPos = newPos;
-    }
-    REQUIRE_EQ ( (uint64_t) 12316, count );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetChunk_Empty, CSRA1_Fixture)
-{   // offset beyond the end of reference
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1" );
-    REQUIRE_STRING ( "", NGS_ReferenceGetChunk ( m_ref, ctx, 30000000, 10) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_Reference_SharedCursor, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1" );
-    NGS_Reference* ref2 = NGS_ReadCollectionGetReference ( m_coll, ctx, "supercont2.2" );
-
-    string name = toString ( NGS_ReferenceGetCommonName ( m_ref, ctx), ctx, true );
-    string name2 = toString ( NGS_ReferenceGetCommonName ( ref2, ctx), ctx, true );
-
-    REQUIRE_NE ( name, name2 );
-
-    NGS_ReferenceRelease ( ref2, m_ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetStats, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    NGS_Statistics * stats = NGS_ReferenceGetStatistics ( m_ref, ctx );
-    REQUIRE ( ! FAILED () );
-
-    // Reference stats are empty for now
-    const char* path;
-    REQUIRE ( ! NGS_StatisticsNextPath ( stats, ctx, "", &path ) );
-
-    NGS_StatisticsRelease ( stats, ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetPileups, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    NGS_Pileup* pileup = NGS_ReferenceGetPileups( m_ref, ctx, true, false);
-    REQUIRE ( ! FAILED () && pileup );
-
-    NGS_PileupRelease ( pileup, ctx );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetPileupSlice, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    NGS_Pileup* pileup = NGS_ReferenceGetPileupSlice( m_ref, ctx, 500, 10, true, false);
-    REQUIRE ( ! FAILED () && pileup );
-
-    NGS_PileupRelease ( pileup, ctx );
-    EXIT;
-}
-
-// Iteration over References
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceIterator_GetLength_1, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    NGS_Reference* refIt = NGS_ReadCollectionGetReferences ( m_coll, m_ctx );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_EQ ( NGS_ReferenceGetLength ( refIt, ctx ), NGS_ReferenceGetLength ( m_ref, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    NGS_ReferenceRelease ( refIt, ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceIterator_GetLength_2, CSRA1_Fixture)
-{   // bug report: after a 1-chunk reference, the next reference in an iterator report wrong length
-    ENTRY_ACC( "SRR1121656" );
-    m_ref = NGS_ReadCollectionGetReferences ( m_coll, m_ctx );
-
-    bool checked = false;
-    while ( NGS_ReferenceIteratorNext ( m_ref, ctx ) )
-    {
-        if ( string ( "GL000207.1" ) == toString ( NGS_ReferenceGetCommonName ( m_ref, ctx ), ctx, true ) )
-        {
-            REQUIRE_EQ ( (uint64_t)4262, NGS_ReferenceGetLength ( m_ref, ctx ) );
-        }
-        else if ( string ( "GL000226.1" ) == toString ( NGS_ReferenceGetCommonName ( m_ref, ctx ), ctx, true ) )
-        {
-            REQUIRE_EQ ( (uint64_t)15008, NGS_ReferenceGetLength ( m_ref, ctx ) );
-            checked = true;
-            break;
-        }
-    }
-    REQUIRE ( checked );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceIterator_GetFirstRowId, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1" );
-    NGS_Reference* refIt = NGS_ReadCollectionGetReferences ( m_coll, m_ctx );
-
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)1, CSRA1_Reference_GetFirstRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)460, CSRA1_Reference_GetFirstRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)785, CSRA1_Reference_GetFirstRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)1101, CSRA1_Reference_GetFirstRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)1318, CSRA1_Reference_GetFirstRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)1681, CSRA1_Reference_GetFirstRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)1966, CSRA1_Reference_GetFirstRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)2246, CSRA1_Reference_GetFirstRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)2526, CSRA1_Reference_GetFirstRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)2764, CSRA1_Reference_GetFirstRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)2976, CSRA1_Reference_GetFirstRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)3289, CSRA1_Reference_GetFirstRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)3444, CSRA1_Reference_GetFirstRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)3596, CSRA1_Reference_GetFirstRowId ( refIt, ctx ) );
-    REQUIRE ( ! NGS_ReferenceIteratorNext ( refIt, ctx ) );
-
-    NGS_ReferenceRelease ( refIt, ctx );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceIterator_GetLastRowId, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( CSRA1_PrimaryOnly, "supercont2.1" );
-    NGS_Reference* refIt = NGS_ReadCollectionGetReferences ( m_coll, m_ctx );
-
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)459, CSRA1_Reference_GetLastRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)784, CSRA1_Reference_GetLastRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)1100, CSRA1_Reference_GetLastRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)1317, CSRA1_Reference_GetLastRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)1680, CSRA1_Reference_GetLastRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)1965, CSRA1_Reference_GetLastRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)2245, CSRA1_Reference_GetLastRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)2525, CSRA1_Reference_GetLastRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)2763, CSRA1_Reference_GetLastRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)2975, CSRA1_Reference_GetLastRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)3288, CSRA1_Reference_GetLastRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)3443, CSRA1_Reference_GetLastRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)3595, CSRA1_Reference_GetLastRowId ( refIt, ctx ) );
-    REQUIRE ( NGS_ReferenceIteratorNext ( refIt, ctx ) );
-    REQUIRE_EQ ( (int64_t)3781, CSRA1_Reference_GetLastRowId ( refIt, ctx ) );
-    REQUIRE ( ! NGS_ReferenceIteratorNext ( refIt, ctx ) );
-
-    NGS_ReferenceRelease ( refIt, ctx );
-    EXIT;
-}
-
-
-
-// ReadGroups
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGroupGetName, CSRA1_Fixture)
-{
-    ENTRY_ACC(CSRA1_PrimaryOnly);
-    const char * name = "C1ELY.6";
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, name );
-    REQUIRE ( ! FAILED () && m_readGroup );
-    REQUIRE_STRING ( name, NGS_ReadGroupGetName ( m_readGroup, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_HasReadGroup, CSRA1_Fixture)
-{
-    ENTRY_ACC(CSRA1_PrimaryOnly);
-    const char * name = "C1ELY.6";
-    REQUIRE ( NGS_ReadCollectionHasReadGroup ( m_coll, ctx, name ) && ! FAILED() );
-    REQUIRE ( ! NGS_ReadCollectionHasReadGroup ( m_coll, ctx, "non-existent read group" ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGroupGetStats, CSRA1_Fixture)
-{
-    ENTRY_ACC(CSRA1_WithGroups);
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "GS57510-FS3-L03" );
-
-    NGS_Statistics * stats = NGS_ReadGroupGetStatistics ( m_readGroup, ctx );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_EQ ( (uint64_t)34164461870, NGS_StatisticsGetAsU64 ( stats, ctx, "BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)34164461870, NGS_StatisticsGetAsU64 ( stats, ctx, "BIO_BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)488063741,   NGS_StatisticsGetAsU64 ( stats, ctx, "SPOT_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)5368875807,  NGS_StatisticsGetAsU64 ( stats, ctx, "SPOT_MAX" ) );
-    REQUIRE_EQ ( (uint64_t)4880812067,  NGS_StatisticsGetAsU64 ( stats, ctx, "SPOT_MIN" ) );
-
-    NGS_StatisticsRelease ( stats, ctx );
-
-    EXIT;
-}
-
-// parsing BAM_HEADER: (tab-separated), for CSRA1_PrimaryOnly:
-//   "@RG  ID:C1ELY.6      PL:illumina     PU:C1ELYACXX121221.6.ATTCTAGG   LB:Pond-203140  PI:0"
-//   "DT:2012-12-21T00:00:00-0500     SM:Cryptococcus neoformans var. grubii MW-RSA913        CN:BI"
-//
-// SAM/BAM Read group line (@RG), tags:
-// ID (required):   Read group identifier. Each @RG line must have a unique ID. The value of ID is used in the RG
-//                  tags of alignment records. Must be unique among all read groups in header section. Read group
-//                  IDs may be modified when merging SAM files in order to handle collisions.
-// CN:  Name of sequencing center producing the read.
-// DS:  Description.
-// DT:  Date the run was produced (ISO8601 date or date/time).
-// FO:  Flow order. The array of nucleotide bases that correspond to the nucleotides used for each row of each read. Multi-base
-//      rows are encoded in IUPAC format, and non-nucleotide rows by various other characters. Format: /\*|[ACMGRSVTWYHKDBN]+/
-// KS:  The array of nucleotide bases that correspond to the key sequence of each read.
-// LB:  Library.
-// PG:  Programs used for processing the read group.
-// PI:  Predicted median insert size.
-// PL:  Platform/technology used to produce the reads. Valid values: CAPILLARY, LS454, ILLUMINA, SOLID, HELICOS, IONTORRENT and PACBIO.
-// PU:  Platform unit (e.g. rowcell-barcode.lane for Illumina or slide for SOLiD). Unique identifier.
-// SM:  Sample. Use pool name where a pool is being sequenced
-
-
-// Iteration over ReadGroups
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGroupIterator_NoReadGroupBeforeNext, CSRA1_Fixture)
-{
-    ENTRY_ACC(CSRA1_PrimaryOnly);
-    m_readGroup = NGS_ReadCollectionGetReadGroups ( m_coll, ctx );
-    REQUIRE ( ! FAILED () && m_readGroup );
-    NGS_ReadGroupGetName ( m_readGroup, ctx );
-    REQUIRE_FAILED( );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGroupIterator_AfterNext, CSRA1_Fixture)
-{
-    ENTRY_ACC(CSRA1_WithGroups);
-    m_readGroup = NGS_ReadCollectionGetReadGroups ( m_coll, ctx );
-    REQUIRE ( NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( "GS46253-FS3-L03", NGS_ReadGroupGetName ( m_readGroup, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( "GS54387-FS3-L01", NGS_ReadGroupGetName ( m_readGroup, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadGroupNext_BeyondEnd, CSRA1_Fixture)
-{
-    ENTRY_GET_READ( CSRA1_WithGroups, 1 );
-    m_readGroup = NGS_ReadCollectionGetReadGroups ( m_coll, ctx );
-
-    size_t count = 0;
-    while ( NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) )
-    {
-        REQUIRE ( ! FAILED () );
-        ++count;
-    }
-
-    REQUIRE_EQ ( (size_t)13, count );
-
-    NGS_ReadGroupGetName ( m_readGroup, ctx );
-    REQUIRE_FAILED( );
-
-    REQUIRE ( ! NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-
-    EXIT;
-}
-
-TEST_CASE(CSRA1_NGS_ReadCollectionHasReference)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-
-    NGS_ReadCollection* read_coll = NGS_ReadCollectionMake ( ctx, CSRA1_PrimaryOnly );
-
-    REQUIRE ( read_coll != NULL );
-    REQUIRE ( NGS_ReadCollectionHasReference ( read_coll, ctx, "supercont2.2" ) );
-    REQUIRE ( ! NGS_ReadCollectionHasReference ( read_coll, ctx, "non-existent acc" ) );
-
-    NGS_ReadCollectionRelease ( read_coll, ctx );
-}
-
-// Fragment Blobs
-
-FIXTURE_TEST_CASE(CSRA1_GetFragmentBlobs, CSRA1_Fixture)
-{
-    ENTRY_ACC(CSRA1_PrimaryOnly);
-
-    NGS_FragmentBlobIterator* blobIt = NGS_ReadCollectionGetFragmentBlobs ( m_coll, ctx );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_NOT_NULL ( blobIt );
-
-    NGS_FragmentBlob* blob = NGS_FragmentBlobIteratorNext ( blobIt, ctx );
-
-    REQUIRE_EQ ( (uint64_t)808, NGS_FragmentBlobSize ( blob, ctx ) );
-
-    NGS_FragmentBlobRelease ( blob, ctx );
-    NGS_FragmentBlobIteratorRelease ( blobIt, ctx );
-
-    EXIT;
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-ngs_csra1";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t m_coll=NgsCsra1TestSuite(argc, argv);
-    return m_coll;
-}
-
-}
-
diff --git a/test/ngs/ngstest_csra1_pileup.cpp b/test/ngs/ngstest_csra1_pileup.cpp
deleted file mode 100644
index a8a2199..0000000
--- a/test/ngs/ngstest_csra1_pileup.cpp
+++ /dev/null
@@ -1,577 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for NGS C interface, CSRA1 archives, Pileup-related functions
-*/
-
-#include "ngs_c_fixture.hpp"
-
-#include "NGS_Pileup.h"
-#include "NGS_PileupEvent.h"
-
-#include <kdb/manager.h>
-
-#include <vdb/manager.h>
-#include <vdb/vdb-priv.h>
-
-#include <klib/printf.h>
-
-#include <limits.h>
-
-using namespace std;
-using namespace ncbi::NK;
-
-TEST_SUITE(NgsCsra1PileupTestSuite);
-
-const char* CSRA1_PrimaryOnly   = "SRR1063272";
-const char* CSRA1_WithSecondary = "SRR833251";
-const char* CSRA1_WithCircularReference = "SRR821492";
-
-#define ENTRY_GET_PILEUP(acc,ref) \
-    ENTRY_GET_REF(acc,ref) \
-    m_pileup = NGS_ReferenceGetPileups( m_ref, ctx, true, false); \
-    REQUIRE ( ! FAILED () && m_pileup );
-
-#define ENTRY_GET_PILEUP_NEXT(acc,ref) \
-    ENTRY_GET_PILEUP(acc,ref) \
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    
-#define ENTRY_GET_PILEUP_SLICE(acc,ref,offset,size) \
-    ENTRY_GET_REF(acc,ref) \
-    m_pileup = NGS_ReferenceGetPileupSlice( m_ref, ctx, offset, size, true, false); \
-    REQUIRE ( ! FAILED () && m_pileup );
-
-#define ENTRY_GET_PILEUP_SLICE_NEXT(acc,ref,offset,size) \
-    ENTRY_GET_PILEUP_SLICE(acc,ref,offset,size); \
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    
-class CSRA1_Fixture : public NGS_C_Fixture
-{
-public:
-    CSRA1_Fixture()
-    : m_pileup (0)
-    {
-    }
-
-    virtual void Release()
-    {
-        if (m_ctx != 0)
-        {
-            if ( m_pileup != 0 )
-            {
-                NGS_PileupRelease ( m_pileup, m_ctx );
-            }
-        }
-        NGS_C_Fixture :: Release ();
-    }
-    
-    void Advance ( uint32_t count )
-    {
-        while ( count > 0 )
-        {
-            if  ( ! NGS_PileupIteratorNext ( m_pileup, m_ctx ) )
-                throw std :: logic_error ( "CSRA1_Fixture::Advance : NGS_PileupIteratorNext() failed" );
-            --count;
-        }
-    }
-    
-    void PrintAll ()
-    {
-        HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-        while (NGS_PileupIteratorNext ( m_pileup, ctx ))
-        {
-            int64_t pos = NGS_PileupGetReferencePosition ( m_pileup, ctx );
-            if  ( FAILED () )
-                throw std :: logic_error ( "CSRA1_Fixture::PrintAll : NGS_PileupGetReferencePosition() failed" );
-            unsigned int depth = NGS_PileupGetPileupDepth ( m_pileup, ctx );
-            if  ( FAILED () )
-                throw std :: logic_error ( "CSRA1_Fixture::PrintAll : NGS_PileupGetPileupDepth() failed" );
-            string ref = toString ( NGS_PileupGetReferenceSpec ( m_pileup, ctx ), ctx, true );
-            if  ( FAILED () )
-                throw std :: logic_error ( "CSRA1_Fixture::PrintAll : NGS_PileupGetReferenceSpec() failed" );
-            if ( depth != 0 )
-                cout <<  ref << "\t" << pos << "\t" << depth << endl;
-        }
-    }
-
-    
-    NGS_Pileup*     m_pileup;
-};
-
-//// PileupIterator, full non-circular reference
-
-// no access before a call to NGS_PileupIteratorNext():
-
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_NoAccessBeforeNext_PileupGetReferenceSpec, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP ( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    REQUIRE_NULL ( NGS_PileupGetReferenceSpec ( m_pileup, ctx ) ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_NoAccessBeforeNext_PileupGetReferencePosition, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP ( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    NGS_PileupGetReferencePosition ( m_pileup, ctx ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_NoAccessBeforeNext_PileupGetReferenceBase, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP ( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    REQUIRE_EQ ( (char)0, NGS_PileupGetReferenceBase ( m_pileup, ctx ) ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_NoAccessBeforeNext_PileupGetPileupDepth, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP ( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    NGS_PileupGetPileupDepth ( m_pileup, ctx ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-
-// access after a call to NGS_PileupIteratorNext():
-
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_AccessAfterNext_PileupGetReferenceSpec, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_NEXT ( CSRA1_PrimaryOnly, "supercont2.1" );
-    REQUIRE_STRING ( "supercont2.1", NGS_PileupGetReferenceSpec ( m_pileup, ctx ) ); 
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_AccessAfterNext_PileupGetReferencePosition, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_NEXT ( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    REQUIRE_EQ ( (int64_t)0, NGS_PileupGetReferencePosition ( m_pileup, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_AccessAfterNext_PileupGetReferenceBase, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_NEXT ( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    char base = NGS_PileupGetReferenceBase ( m_pileup, ctx ); 
-    //REQUIRE ( ! FAILED () && base != 0 );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_AccessAfterNext_PileupGetPileupDepth, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_NEXT ( CSRA1_PrimaryOnly, "supercont2.1" );
-    REQUIRE_EQ ( (unsigned int)0, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    EXIT;
-}
-
-// no access after the end of iteration
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_NoAccessAfterEnd_PileupGetReferenceSpec, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP ( CSRA1_PrimaryOnly, "supercont2.1" );
-    while ( NGS_PileupIteratorNext ( m_pileup, ctx ) ) {}
-
-    REQUIRE_NULL ( NGS_PileupGetReferenceSpec ( m_pileup, ctx ) ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_NoAccessAfterEnd_PileupGetReferencePosition, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP ( CSRA1_PrimaryOnly, "supercont2.1" );
-    while ( NGS_PileupIteratorNext ( m_pileup, ctx ) ) {}
-    
-    NGS_PileupGetReferencePosition ( m_pileup, ctx ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_NoAccessAfterEnd_PileupGetReferenceBase, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP ( CSRA1_PrimaryOnly, "supercont2.1" );
-    while ( NGS_PileupIteratorNext ( m_pileup, ctx ) ) {}
-
-    REQUIRE_EQ ( (char)0, NGS_PileupGetReferenceBase ( m_pileup, ctx ) ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_NoAccessAfterEnd_PileupGetPileupDepth, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP ( CSRA1_PrimaryOnly, "supercont2.1" );
-    while ( NGS_PileupIteratorNext ( m_pileup, ctx ) ) {}
-
-    NGS_PileupGetPileupDepth ( m_pileup, ctx ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_NoAccessAfterEnd_PileupIteratorNext, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP ( CSRA1_PrimaryOnly, "supercont2.1" );
-    while ( NGS_PileupIteratorNext ( m_pileup, ctx ) ) {}
-
-    REQUIRE ( ! NGS_PileupIteratorNext ( m_pileup, ctx ) ); 
-    
-    EXIT;
-}
-
-// regular operation
-
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_PileupGetReferencePosition, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_NEXT ( CSRA1_PrimaryOnly, "supercont2.1" );
-    
-    REQUIRE_EQ ( (int64_t)0, NGS_PileupGetReferencePosition ( m_pileup, ctx ) ); 
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    REQUIRE_EQ ( (int64_t)1, NGS_PileupGetReferencePosition ( m_pileup, ctx ) ); 
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    REQUIRE_EQ ( (int64_t)2, NGS_PileupGetReferencePosition ( m_pileup, ctx ) ); 
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_PileupGetPileupDepth_1, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP ( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    Advance(85);
-
-    REQUIRE_EQ ( (int64_t)84, NGS_PileupGetReferencePosition ( m_pileup, ctx ) ); 
-    REQUIRE_EQ ( (unsigned int)0, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-
-    Advance(1);
-
-    REQUIRE_EQ ( (int64_t)85, NGS_PileupGetReferencePosition ( m_pileup, ctx ) ); 
-    REQUIRE_EQ ( (unsigned int)1, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_PileupGetPileupDepth_2, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP ( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    Advance(186);
-    REQUIRE_EQ ( (int64_t)185, NGS_PileupGetReferencePosition ( m_pileup, ctx ) ); 
-    REQUIRE_EQ ( (unsigned int)2, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_PileupGetPileupDepth_3, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP ( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    Advance(5491);
-
-    REQUIRE_EQ ( (int64_t)5490, NGS_PileupGetReferencePosition ( m_pileup, ctx ) ); 
-    REQUIRE_EQ ( (unsigned int)2, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-
-    Advance(1);
-
-    REQUIRE_EQ ( (int64_t)5491, NGS_PileupGetReferencePosition ( m_pileup, ctx ) ); 
-    REQUIRE_EQ ( (unsigned int)3, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    
-    EXIT;
-}
-
-#if 0
-FIXTURE_TEST_CASE(CSRA1_PileupIterator_PrintOut, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP( CSRA1_PrimaryOnly, "supercont2.1" );
-    PrintAll ();
-    EXIT;
-}
-#endif
-
-//// PileupIterator, non-circular reference slice
-
-// no access before a call to NGS_PileupIteratorNext():
-
-FIXTURE_TEST_CASE(CSRA1_PileupIteratorSlice_NoAccessBeforeNext_PileupGetReferenceSpec, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE( CSRA1_PrimaryOnly, "supercont2.1", 5431, 4 );
-
-    REQUIRE_NULL ( NGS_PileupGetReferenceSpec ( m_pileup, ctx ) ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIteratorSlice_NoAccessBeforeNext_PileupGetReferencePosition, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE( CSRA1_PrimaryOnly, "supercont2.1", 5431, 4 );
-
-    NGS_PileupGetReferencePosition ( m_pileup, ctx ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIteratorSlice_NoAccessBeforeNext_PileupGetReferenceBase, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE( CSRA1_PrimaryOnly, "supercont2.1", 5431, 4 );
-
-    REQUIRE_EQ ( (char)0, NGS_PileupGetReferenceBase ( m_pileup, ctx ) ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIteratorSlice_NoAccessBeforeNext_PileupGetPileupDepth, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE( CSRA1_PrimaryOnly, "supercont2.1", 5431, 4 );
-
-    NGS_PileupGetPileupDepth ( m_pileup, ctx ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-
-// access after a call to NGS_PileupIteratorNext():
-
-FIXTURE_TEST_CASE(CSRA1_PileupIteratorSlice_AccessAfterNext_PileupGetReferenceSpec, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE_NEXT( CSRA1_PrimaryOnly, "supercont2.1", 5431, 4 );
-    REQUIRE_STRING ( "supercont2.1", NGS_PileupGetReferenceSpec ( m_pileup, ctx ) ); 
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_PileupIteratorSlice_AccessAfterNext_PileupGetReferencePosition, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE_NEXT( CSRA1_PrimaryOnly, "supercont2.1", 5431, 4 );
-
-    REQUIRE_EQ ( (int64_t)5431, NGS_PileupGetReferencePosition ( m_pileup, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_PileupIteratorSlice_AccessAfterNext_PileupGetReferenceBase, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE_NEXT( CSRA1_PrimaryOnly, "supercont2.1", 5431, 4 );
-
-    char base = NGS_PileupGetReferenceBase ( m_pileup, ctx ); 
-    //REQUIRE ( ! FAILED () && base != 0 );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_PileupIteratorSlice_AccessAfterNext_PileupGetPileupDepth, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE_NEXT( CSRA1_PrimaryOnly, "supercont2.1", 5431, 4 );
-    REQUIRE_EQ ( (unsigned int)1, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    EXIT;
-}
-
-// no access after the end of iteration:
-
-FIXTURE_TEST_CASE(CSRA1_PileupIteratorSlice_NoAccessAfterEnd_PileupGetReferenceSpec, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE( CSRA1_PrimaryOnly, "supercont2.1", 5431, 4 );
-    while ( NGS_PileupIteratorNext ( m_pileup, ctx ) ) {}
-
-    REQUIRE_NULL ( NGS_PileupGetReferenceSpec ( m_pileup, ctx ) ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIteratorSlice_NoAccessAfterEnd_PileupGetReferencePosition, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE( CSRA1_PrimaryOnly, "supercont2.1", 5431, 4 );
-    while ( NGS_PileupIteratorNext ( m_pileup, ctx ) ) {}
-
-    NGS_PileupGetReferencePosition ( m_pileup, ctx ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIteratorSlice_NoAccessAfterEnd_PileupGetReferenceBase, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE( CSRA1_PrimaryOnly, "supercont2.1", 5431, 4 );
-    while ( NGS_PileupIteratorNext ( m_pileup, ctx ) ) {}
-
-    REQUIRE_EQ ( (char) 0, NGS_PileupGetReferenceBase ( m_pileup, ctx ) ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIteratorSlice_NoAccessAfterEnd_PileupGetPileupDepth, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE( CSRA1_PrimaryOnly, "supercont2.1", 5431, 4 );
-    while ( NGS_PileupIteratorNext ( m_pileup, ctx ) ) {}
-
-    NGS_PileupGetPileupDepth ( m_pileup, ctx ); 
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-
-// regular operation
-
-FIXTURE_TEST_CASE(CSRA1_PileupIteratorSlice_PileupGetReferencePosition, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE( CSRA1_PrimaryOnly, "supercont2.1", 5431, 2 );
-    
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    REQUIRE_EQ ( (int64_t)5431, NGS_PileupGetReferencePosition ( m_pileup, ctx ) ); 
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    REQUIRE_EQ ( (int64_t)5432, NGS_PileupGetReferencePosition ( m_pileup, ctx ) ); 
-    REQUIRE ( ! NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_PileupIteratorSlice_PileupGetPileupDepth_NoFiltering, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE( CSRA1_PrimaryOnly, "supercont2.1", 404, 4 );
-
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    REQUIRE_EQ ( (unsigned int)1, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    REQUIRE_EQ ( (unsigned int)1, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    REQUIRE_EQ ( (unsigned int)2, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    REQUIRE_EQ ( (unsigned int)2, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    REQUIRE ( ! NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_PileupIteratorSlice_PileupGetPileupDepth_WithFiltering, CSRA1_Fixture)
-{   // alignments marked as rejected are not included into pileup depth counts
-    ENTRY_GET_PILEUP_SLICE( CSRA1_PrimaryOnly, "supercont2.1", 5505, 4 );
-
-// positions 5505-5508 match a rejected alignment; with filtering turned off the reported depths would be 3, 3, 4, 4.
-
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    REQUIRE_EQ ( (unsigned int)2, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    REQUIRE_EQ ( (unsigned int)2, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    REQUIRE_EQ ( (unsigned int)3, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    REQUIRE_EQ ( (unsigned int)3, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    REQUIRE ( ! NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    
-    EXIT;
-}
-//TODO: alignment filtering-related schema variations
-// no RD_FILTER physically exists in either PRIMARY_ALIGNMENT or SEQUENCE (no filtering) 
-//      (use VTableListPhysColumns) (NB. READ_FILTER may be present but virtual!)
-// RD_FILTER physically exists in PRIMARY_ALIGNMENT
-// RD_FILTER_CACHE appears to exist virtually in PRIMARY_ALIGNMENT:
-// RD_FILTER physically exists in SEQUENCE and RD_FILTER_CACHE does not exist in PRIMARY_ALIGNMENT
-
-////TODO: PileupIterator, full circular reference 
-////TODO: PileupIterator, circular reference slice
-
-// discrepancies with sra-pileup
-
-#if SHOW_UNIMPLEMENTED
-FIXTURE_TEST_CASE(CSRA1_Pileup_ExtraPileupReported, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE( "SRR833251", "gi|169794206|ref|NC_010410.1|", 19416, 2 );
-    // sra-pileup stops at position 19417 (0-based), ngs-pileup at position 19418
-
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    REQUIRE_EQ ( (int64_t)19416, NGS_PileupGetReferencePosition ( m_pileup, ctx ) ); 
-    REQUIRE_EQ ( (unsigned int)1, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    REQUIRE_EQ ( (int64_t)19417, NGS_PileupGetReferencePosition ( m_pileup, ctx ) ); 
-    REQUIRE_EQ ( (unsigned int)0, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    REQUIRE ( ! NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_Pileup_ExtraEventReported, CSRA1_Fixture)
-{
-    ENTRY_GET_PILEUP_SLICE( "SRR1063272", "supercont2.1", 12979, 1 );
-    // at position 12980 (0-based) sra-pileup reports depth of 15, ngs-pileup 16
-
-    REQUIRE ( NGS_PileupIteratorNext ( m_pileup, ctx ) );
-    REQUIRE_EQ ( (int64_t)12979, NGS_PileupGetReferencePosition ( m_pileup, ctx ) ); 
-    REQUIRE_EQ ( (unsigned int)15, NGS_PileupGetPileupDepth ( m_pileup, ctx ) ); 
-    
-    EXIT;
-}
-#endif
-
-//// PileupEvent
-
-//TODO: NGS_PileupEventGetReferenceSpec
-//TODO: NGS_PileupEventGetReferencePosition
-//TODO: NGS_PileupEventGetMappingQuality
-//TODO: NGS_PileupEventGetAlignmentId
-//TODO: NGS_PileupEventGetAlignment
-//TODO: NGS_PileupEventGetAlignmentPosition
-//TODO: NGS_PileupEventGetFirstAlignmentPosition
-//TODO: NGS_PileupEventGetLastAlignmentPosition
-//TODO: NGS_PileupEventGetEventType
-//TODO: NGS_PileupEventGetAlignmentBase
-//TODO: NGS_PileupEventGetAlignmentQuality
-//TODO: NGS_PileupEventGetInsertionBases
-//TODO: NGS_PileupEventGetInsertionQualities
-//TODO: NGS_PileupEventGetDeletionCount
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-ngs_csra1_pileup";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t m_coll=NgsCsra1PileupTestSuite(argc, argv);
-    return m_coll;
-}
-
-}
-
diff --git a/test/ngs/ngstest_csra1_readcollection.cpp b/test/ngs/ngstest_csra1_readcollection.cpp
deleted file mode 100644
index 205b171..0000000
--- a/test/ngs/ngstest_csra1_readcollection.cpp
+++ /dev/null
@@ -1,739 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for NGS C interface, ReadCollection-related functions, CSRA1 archives
-*/
-
-#include "ngs_c_fixture.hpp"
-
-#include <CSRA1_ReadCollection.h>
-
-#include <NGS_Cursor.h>
-
-#include <kdb/manager.h>
-
-#include <vdb/manager.h>
-#include <vdb/vdb-priv.h>
-
-#include <klib/printf.h>
-
-#include <limits.h>
-
-using namespace std;
-using namespace ncbi::NK;
-
-TEST_SUITE(NgsCsra1ReadCollectionTestSuite);
-
-const char* CSRA1_PrimaryOnly   = "SRR1063272";
-const char* CSRA1_WithSecondary = "SRR833251";
-
-class CSRA1_Fixture : public NGS_C_Fixture
-{
-public:
-    CSRA1_Fixture()
-    : m_align(0)
-    {
-    }
-    ~CSRA1_Fixture()
-    {
-    }
-    
-    virtual void Release()
-    {
-        if (m_ctx != 0)
-        {
-            if (m_align != 0)
-            {
-                NGS_AlignmentRelease ( m_align, m_ctx );
-            }
-        }
-        NGS_C_Fixture :: Release ();
-    }
-    
-    
-    NGS_Alignment*      m_align;
-};
-
-// CSRA1_ReadCollection
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_Open, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    REQUIRE_NOT_NULL(m_coll);
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetName, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    REQUIRE_STRING ( CSRA1_PrimaryOnly, NGS_ReadCollectionGetName ( m_coll, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetRead, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    m_read = NGS_ReadCollectionGetRead ( m_coll, ctx, ReadId ( 1 )  . c_str () );
-    REQUIRE_NOT_NULL ( m_read );
-    EXIT;
-}
-
-const uint64_t GetReadCount_Total       = 2280633;
-const uint64_t GetReadCount_Unaligned   =  246555;
-const uint64_t GetReadCount_Aligned     = GetReadCount_Total - GetReadCount_Unaligned; // 2034078
-const uint64_t GetReadCount_FullyAligned = 1953623;
-const uint64_t GetReadCount_PartiallyAligned = GetReadCount_Aligned - GetReadCount_FullyAligned; // 80455
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReadCount_All, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    REQUIRE_EQ( GetReadCount_Total, NGS_ReadCollectionGetReadCount ( m_coll, ctx, true, true, true ) ); 
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReadCount_Unaligned, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    REQUIRE_EQ( GetReadCount_Unaligned, NGS_ReadCollectionGetReadCount ( m_coll, ctx, false, false, true ) ); 
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReadCount_Aligned, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    REQUIRE_EQ( GetReadCount_Aligned, NGS_ReadCollectionGetReadCount ( m_coll, ctx, true, true, false ) ); 
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReadCount_FullyAligned, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    REQUIRE_EQ( GetReadCount_FullyAligned, NGS_ReadCollectionGetReadCount ( m_coll, ctx, true, false, false ) ); 
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReadCount_PartiallyAligned, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    REQUIRE_EQ( GetReadCount_PartiallyAligned, NGS_ReadCollectionGetReadCount ( m_coll, ctx, false, true, false ) ); 
-    EXIT;
-}
-
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReads_All, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, true );
-    REQUIRE ( ! FAILED () && m_read );
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReads_Aligned, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, false, false);
-    REQUIRE ( ! FAILED () && m_read );
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_EQ ( NGS_ReadCategory_fullyAligned, NGS_ReadGetReadCategory ( m_read, ctx ) );
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReads_Partial, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, false, true, false);
-    REQUIRE ( ! FAILED () && m_read );
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_EQ ( NGS_ReadCategory_partiallyAligned, NGS_ReadGetReadCategory ( m_read, ctx ) );
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReads_Unaligned, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, false, false, true);
-    REQUIRE ( ! FAILED () && m_read );
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_EQ ( NGS_ReadCategory_unaligned, NGS_ReadGetReadCategory ( m_read, ctx ) );
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetReads_None, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, false, false, false);
-    REQUIRE ( ! FAILED () && m_read );
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollectionGetReadRange, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    m_read = NGS_ReadCollectionGetReadRange ( m_coll, ctx, 2, 3, true, true, true );
-    REQUIRE_NOT_NULL ( m_read );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignment, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    m_align = NGS_ReadCollectionGetAlignment ( m_coll, ctx, ( string ( CSRA1_PrimaryOnly ) + ".PA.1" ) . c_str () );
-    REQUIRE_NOT_NULL ( m_align );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignment_IdLow, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    REQUIRE_NULL ( NGS_ReadCollectionGetAlignment ( m_coll, ctx, ( string ( CSRA1_PrimaryOnly ) + ".PA.0" ) . c_str () ) );
-    REQUIRE_FAILED ();
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignment_Secondary, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_WithSecondary );
-    m_align = NGS_ReadCollectionGetAlignment ( m_coll, ctx, ( string ( CSRA1_WithSecondary ) + ".SA.169" ) . c_str () );
-    REQUIRE_NOT_NULL ( m_align );
-    REQUIRE_STRING ( string ( CSRA1_WithSecondary ) + ".SA.169", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollectionGetReference, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    m_ref = NGS_ReadCollectionGetReference ( m_coll, ctx, "supercont2.1" );
-    REQUIRE_NOT_NULL ( m_ref );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollectionGetReferences, CSRA1_Fixture)
-{
-    ENTRY_ACC( CSRA1_PrimaryOnly );
-    m_ref = NGS_ReadCollectionGetReferences ( m_coll, ctx );
-    REQUIRE_NOT_NULL ( m_ref );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollectionGetReadGroups, CSRA1_Fixture)
-{   
-    ENTRY_ACC(CSRA1_PrimaryOnly);
-    
-    m_readGroup = NGS_ReadCollectionGetReadGroups ( m_coll, ctx );
-    REQUIRE ( ! FAILED () && m_readGroup );
-
-    REQUIRE ( NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollectionGetReadGroup_NotFound, CSRA1_Fixture)
-{   
-    ENTRY_ACC(CSRA1_PrimaryOnly);
-    REQUIRE_NULL ( NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "wontfindme" ) );
-    REQUIRE_FAILED ();
-    EXIT;
-}
-    
-FIXTURE_TEST_CASE(CSRA1_ReadCollectionGetReadGroup_WithGroups_DefaultNotFound, CSRA1_Fixture)
-{   
-    ENTRY_ACC(CSRA1_PrimaryOnly);
-    REQUIRE_NULL ( NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "" ) );
-    REQUIRE_FAILED ();
-    EXIT;
-}
-    
-FIXTURE_TEST_CASE(CSRA1_ReadCollectionGetReadGroup_WithGroups_Found, CSRA1_Fixture)
-{   
-    ENTRY_ACC(CSRA1_PrimaryOnly);
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "C1ELY.6");
-    REQUIRE_NOT_NULL ( m_readGroup );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollectionHasReadGroup_NotFound, CSRA1_Fixture)
-{   
-    ENTRY_ACC(CSRA1_PrimaryOnly);
-    REQUIRE ( ! NGS_ReadCollectionHasReadGroup ( m_coll, ctx, "wontfindme" ) );
-    EXIT;
-}
-    
-FIXTURE_TEST_CASE(CSRA1_ReadCollectionHasReadGroup_WithGroups_DefaultNotFound, CSRA1_Fixture)
-{   
-    ENTRY_ACC(CSRA1_PrimaryOnly);
-    REQUIRE ( ! NGS_ReadCollectionHasReadGroup ( m_coll, ctx, "" ) );
-    EXIT;
-}
-    
-FIXTURE_TEST_CASE(CSRA1_ReadCollectionHasReadGroup_WithGroups_Found, CSRA1_Fixture)
-{   
-    ENTRY_ACC(CSRA1_PrimaryOnly);
-    REQUIRE ( NGS_ReadCollectionHasReadGroup ( m_coll, ctx, "C1ELY.6") );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollectionGetAlignments_All, CSRA1_Fixture)
-{   
-    ENTRY_ACC(CSRA1_WithSecondary);
-    
-    m_align = NGS_ReadCollectionGetAlignments ( m_coll, ctx, true, true );
-    REQUIRE ( ! FAILED () && m_align );
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( NGS_AlignmentIsPrimary ( m_align, ctx ) );
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollectionGetAlignments_FilteredPrimary, CSRA1_Fixture)
-{   
-    ENTRY_ACC(CSRA1_WithSecondary);
-    
-    m_align = NGS_ReadCollectionGetAlignments ( m_coll, ctx, true, false );
-    REQUIRE ( ! FAILED () && m_align );
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( NGS_AlignmentIsPrimary ( m_align, ctx ) );
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollectionGetAlignments_FilteredSecondary, CSRA1_Fixture)
-{   
-    ENTRY_ACC(CSRA1_WithSecondary);
-    
-    m_align = NGS_ReadCollectionGetAlignments ( m_coll, ctx, false, true );
-    REQUIRE ( ! FAILED () && m_align );
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( ! NGS_AlignmentIsPrimary ( m_align, ctx ) );
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollectionGetAlignments_FilteredNone, CSRA1_Fixture)
-{   
-    ENTRY_ACC(CSRA1_WithSecondary);
-    
-    m_align = NGS_ReadCollectionGetAlignments ( m_coll, ctx, false, false );
-    REQUIRE ( ! FAILED () && m_align );
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentCount_Primary_None, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_PrimaryOnly );
-    REQUIRE_EQ( (uint64_t)0, NGS_ReadCollectionGetAlignmentCount ( m_coll, ctx, false, false) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentCount_Primary_All, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_PrimaryOnly );
-    REQUIRE_EQ( (uint64_t)3987701, NGS_ReadCollectionGetAlignmentCount ( m_coll, ctx, true, true) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentCount_Primary_CategoryPrimary, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_PrimaryOnly );
-    REQUIRE_EQ( (uint64_t)3987701, NGS_ReadCollectionGetAlignmentCount ( m_coll, ctx, true, false) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentCount_Primary_CategorySecondary, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_PrimaryOnly );
-    REQUIRE_EQ( (uint64_t)0, NGS_ReadCollectionGetAlignmentCount ( m_coll, ctx, false, true) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentCount_Secondary_All, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_WithSecondary );
-    REQUIRE_EQ( (uint64_t)178, NGS_ReadCollectionGetAlignmentCount ( m_coll, ctx, true, true) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentCount_Secondary_CategoryPrimary, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_WithSecondary );
-    REQUIRE_EQ( (uint64_t)168, NGS_ReadCollectionGetAlignmentCount ( m_coll, ctx, true, false) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentCount_Secondary_CategorySecondary, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_WithSecondary );
-    REQUIRE_EQ( (uint64_t)10, NGS_ReadCollectionGetAlignmentCount ( m_coll, ctx, false, true) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRange_Primary, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_PrimaryOnly );
-    
-    m_align = NGS_ReadCollectionGetAlignmentRange ( m_coll, ctx, 3, 2, true, true );
-    REQUIRE ( ! FAILED () && m_align );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_PrimaryOnly ) + ".PA.3", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_PrimaryOnly ) + ".PA.4", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRange_PrimarySingle, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_PrimaryOnly );
-    
-    m_align = NGS_ReadCollectionGetAlignmentRange ( m_coll, ctx, 4, 1, true, true );
-    REQUIRE ( ! FAILED () && m_align );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_PrimaryOnly ) + ".PA.4", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRange_PrimaryOutOfRange_CutLow, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_PrimaryOnly );
-
-    m_align = NGS_ReadCollectionGetAlignmentRange ( m_coll, ctx, 0, 13, true, true );
-    REQUIRE ( ! FAILED () && m_align );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_PrimaryOnly ) + ".PA.1", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRange_PrimaryOutOfRangeHigh, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_PrimaryOnly );
-
-    m_align = NGS_ReadCollectionGetAlignmentRange ( m_coll, ctx, 3987702, 1, true, true );
-    REQUIRE ( ! FAILED () && m_align );
-    
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRange_PrimaryOutOfRange_CutHigh, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_PrimaryOnly );
-
-    m_align = NGS_ReadCollectionGetAlignmentRange ( m_coll, ctx, 3987701, 2, true, true );
-    REQUIRE ( ! FAILED () && m_align );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_PrimaryOnly ) + ".PA.3987701", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRange_Secondary, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_WithSecondary );
-    
-    m_align = NGS_ReadCollectionGetAlignmentRange ( m_coll, ctx, 170, 2, true, true );
-    REQUIRE ( ! FAILED () && m_align );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_WithSecondary ) + ".SA.170", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_WithSecondary ) + ".SA.171", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRange_SecondarySingle, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_WithSecondary );
-    
-    m_align = NGS_ReadCollectionGetAlignmentRange ( m_coll, ctx, 174, 1, true, true );
-    REQUIRE ( ! FAILED () && m_align );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_WithSecondary ) + ".SA.174", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRange_SecondaryOutOfRangeHigh, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_WithSecondary );
-    
-    m_align = NGS_ReadCollectionGetAlignmentRange ( m_coll, ctx, 179, 1, true, true );
-    REQUIRE ( ! FAILED () && m_align );
-    
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRange_SecondaryOutOfRange_CutHigh, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_WithSecondary );
-    
-    m_align = NGS_ReadCollectionGetAlignmentRange ( m_coll, ctx, 178, 4, true, true );
-    REQUIRE ( ! FAILED () && m_align );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_WithSecondary ) + ".SA.178", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRange_All, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_WithSecondary );
-    
-    m_align = NGS_ReadCollectionGetAlignmentRange ( m_coll, ctx, 167, 4, true, true );
-    REQUIRE ( ! FAILED () && m_align );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_WithSecondary ) + ".PA.167", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_WithSecondary ) + ".PA.168", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_WithSecondary ) + ".SA.169", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_WithSecondary ) + ".SA.170", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRangeFiltered_Primary, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_WithSecondary );
-    
-    m_align = NGS_ReadCollectionGetAlignmentRange ( m_coll, ctx, 167, 4, true, false );
-    REQUIRE ( ! FAILED () && m_align );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_WithSecondary ) + ".PA.167", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_WithSecondary ) + ".PA.168", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRangeFiltered_Secondary, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_WithSecondary );
-    
-    m_align = NGS_ReadCollectionGetAlignmentRange ( m_coll, ctx, 167, 4, false, true );
-    REQUIRE ( ! FAILED () && m_align );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_WithSecondary ) + ".SA.169", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( string ( CSRA1_WithSecondary ) + ".SA.170", NGS_AlignmentGetAlignmentId ( m_align, ctx ) );
-    
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_ReadCollection_GetAlignmentRangeFiltered_None, CSRA1_Fixture)
-{
-    ENTRY_ACC ( CSRA1_WithSecondary );
-    
-    m_align = NGS_ReadCollectionGetAlignmentRange ( m_coll, ctx, 167, 4, false, false);
-    REQUIRE ( ! FAILED () && m_align );
-    
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(NGS_ReadCollection_MakeAlignmentCursor_Reuse, CSRA1_Fixture)
-{   // if an exclusive cursor is requested, the currently open cursor is returned if it is not in use
-    ENTRY_ACC ( CSRA1_WithSecondary );
-
-    // create and release a non-exclusive cursor
-    const NGS_Cursor* c1 = CSRA1_ReadCollectionMakeAlignmentCursor ( ( CSRA1_ReadCollection * ) m_coll, ctx, true, false );
-    REQUIRE ( ! FAILED () && c1 );
-    NGS_CursorRelease ( c1, ctx );
-    REQUIRE ( ! FAILED () );
-    
-    // request an exclusive cursor, verify that it is the same one as former c1
-    const NGS_Cursor* c2 = CSRA1_ReadCollectionMakeAlignmentCursor ( ( CSRA1_ReadCollection * ) m_coll, ctx, true, true );
-    REQUIRE ( ! FAILED () && c2 );
-    REQUIRE_EQ ( c1, c2 );
-    
-    // request another non-exclusive cursor, make sure it is a new one
-    c1 = CSRA1_ReadCollectionMakeAlignmentCursor ( ( CSRA1_ReadCollection * ) m_coll, ctx, true, false );
-    REQUIRE ( ! FAILED () && c1 );
-    REQUIRE_NE ( c1, c2 );
-
-    NGS_CursorRelease ( c2, ctx );
-    REQUIRE ( ! FAILED () );
-    NGS_CursorRelease ( c1, ctx );
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(NGS_ReadCollection_MakeAlignmentCursor_New, CSRA1_Fixture)
-{   // if an exclusive cursor is requested, a new cursor is created if the currently open one is in use
-    ENTRY_ACC ( CSRA1_WithSecondary );
-
-    // create a non-exclusive cursor
-    const NGS_Cursor* c1 = CSRA1_ReadCollectionMakeAlignmentCursor ( ( CSRA1_ReadCollection * ) m_coll, ctx, true, false );
-    REQUIRE ( ! FAILED () && c1 );
-    
-    // request an exclusive cursor, verify that it is not c1
-    const NGS_Cursor* c2 = CSRA1_ReadCollectionMakeAlignmentCursor ( ( CSRA1_ReadCollection * ) m_coll, ctx, true, true );
-    REQUIRE ( ! FAILED () && c2 );
-    REQUIRE_NE ( c1, c2 );
-    NGS_CursorRelease ( c2, ctx );
-    REQUIRE ( ! FAILED () );
-    
-    // request a non-exclusive cursor, verify that it is the same as c1
-    c2 = CSRA1_ReadCollectionMakeAlignmentCursor ( ( CSRA1_ReadCollection * ) m_coll, ctx, true, false );
-    REQUIRE ( ! FAILED () && c2 );
-    REQUIRE_EQ ( c1, c2 );
-    
-    NGS_CursorRelease ( c2, ctx );
-    REQUIRE ( ! FAILED () );
-    NGS_CursorRelease ( c1, ctx );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReadCollectionGetStats, CSRA1_Fixture)
-{   
-    ENTRY_ACC(CSRA1_WithSecondary);
-    
-    NGS_Statistics * stats = NGS_ReadCollectionGetStatistics ( m_coll, ctx );
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE_EQ ( (uint64_t)615696,  NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)615696,  NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/BIO_BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)598728,  NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/CMP_BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)3048,    NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/SPOT_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)3048,    NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/SPOT_MAX" ) );
-    REQUIRE_EQ ( (uint64_t)1,       NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/SPOT_MIN" ) );
-
-    REQUIRE_EQ ( (uint64_t)3936291, NGS_StatisticsGetAsU64 ( stats, ctx, "REFERENCE/BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)3936291, NGS_StatisticsGetAsU64 ( stats, ctx, "REFERENCE/BIO_BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)3936291, NGS_StatisticsGetAsU64 ( stats, ctx, "REFERENCE/CMP_BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)788,     NGS_StatisticsGetAsU64 ( stats, ctx, "REFERENCE/SPOT_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)788,     NGS_StatisticsGetAsU64 ( stats, ctx, "REFERENCE/SPOT_MAX" ) );
-    REQUIRE_EQ ( (uint64_t)1,       NGS_StatisticsGetAsU64 ( stats, ctx, "REFERENCE/SPOT_MIN" ) );
-    
-    REQUIRE_EQ ( (uint64_t)16968,   NGS_StatisticsGetAsU64 ( stats, ctx, "PRIMARY_ALIGNMENT/BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)16968,   NGS_StatisticsGetAsU64 ( stats, ctx, "PRIMARY_ALIGNMENT/BIO_BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)168,     NGS_StatisticsGetAsU64 ( stats, ctx, "PRIMARY_ALIGNMENT/SPOT_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)168,     NGS_StatisticsGetAsU64 ( stats, ctx, "PRIMARY_ALIGNMENT/SPOT_MAX" ) );
-    REQUIRE_EQ ( (uint64_t)1,       NGS_StatisticsGetAsU64 ( stats, ctx, "PRIMARY_ALIGNMENT/SPOT_MIN" ) );
-    
-    REQUIRE_EQ ( (uint64_t)1010,    NGS_StatisticsGetAsU64 ( stats, ctx, "SECONDARY_ALIGNMENT/BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)1010,    NGS_StatisticsGetAsU64 ( stats, ctx, "SECONDARY_ALIGNMENT/BIO_BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)10,      NGS_StatisticsGetAsU64 ( stats, ctx, "SECONDARY_ALIGNMENT/SPOT_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)10,      NGS_StatisticsGetAsU64 ( stats, ctx, "SECONDARY_ALIGNMENT/SPOT_MAX" ) );
-    REQUIRE_EQ ( (uint64_t)1,       NGS_StatisticsGetAsU64 ( stats, ctx, "SECONDARY_ALIGNMENT/SPOT_MIN" ) );
-    
-    NGS_StatisticsRelease ( stats, ctx );
-    
-    EXIT;
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-ngs_csra1_readcollection";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t m_coll=NgsCsra1ReadCollectionTestSuite(argc, argv);
-    return m_coll;
-}
-
-}
-
diff --git a/test/ngs/ngstest_csra1_refwin.cpp b/test/ngs/ngstest_csra1_refwin.cpp
deleted file mode 100644
index 1abd39c..0000000
--- a/test/ngs/ngstest_csra1_refwin.cpp
+++ /dev/null
@@ -1,819 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for NGS C interface, CSRA1 archives, ReferenceWindow-related functions
-*/
-
-#include "ngs_c_fixture.hpp"
-
-#include <kdb/manager.h>
-
-#include <vdb/manager.h>
-#include <vdb/vdb-priv.h>
-
-#include <klib/printf.h>
-
-#include <limits.h>
-
-using namespace std;
-using namespace ncbi::NK;
-
-TEST_SUITE(NgsCsra1RefWinTestSuite);
-
-const char* CSRA1_PrimaryOnly   = "SRR1063272";
-const char* CSRA1_WithSecondary = "SRR833251";
-const char* CSRA1_WithCircularReference = "SRR821492";
-
-class CSRA1_Fixture : public NGS_C_Fixture
-{
-public:
-    CSRA1_Fixture()
-    : m_align (0)
-    {
-    }
-    ~CSRA1_Fixture()
-    {
-    }
-    virtual void Release()
-    {
-        if (m_ctx != 0)
-        {
-            if (m_align != 0)
-            {
-                NGS_AlignmentRelease ( m_align, m_ctx );
-            }
-        }
-        NGS_C_Fixture :: Release ();
-    }
-    
-    void GetAlignment(uint64_t id)
-    {
-        stringstream str;
-        str << id;
-        m_align = NGS_ReadCollectionGetAlignment ( m_coll, m_ctx, str . str () . c_str () );
-    }
-    void SkipAlignments ( size_t num, bool print = false )
-    {
-        for (size_t i = 0; i < num; ++i)
-        {
-            if ( ! NGS_AlignmentIteratorNext ( m_align, m_ctx ) )
-                throw logic_error ("premature end of iterator");
-            if ( m_ctx -> rc != 0 )
-                throw logic_error ("NGS_AlignmentIteratorNext failed");
-                
-            if (print)
-                cout << toString ( NGS_AlignmentGetAlignmentId ( m_align, m_ctx ), m_ctx, true ) << endl;
-        }
-    }
-    void PrintAlignment ()
-    {
-        cout << "id=" << toString ( NGS_AlignmentGetAlignmentId ( m_align, m_ctx ), m_ctx, true ) 
-             << " pos=" << NGS_AlignmentGetAlignmentPosition ( m_align, m_ctx ) 
-             << " len=" << NGS_AlignmentGetAlignmentLength ( m_align, m_ctx ) 
-             << ( NGS_AlignmentIsPrimary ( m_align, m_ctx ) ? " PRI" : " SEC" )
-             << " mapq=" << NGS_AlignmentGetMappingQuality( m_align, m_ctx )
-             << endl;    
-    }
-    
-    bool NextId (const string& p_expected)
-    {
-        if ( ! NGS_AlignmentIteratorNext ( m_align, m_ctx ) || m_ctx -> rc != 0 )
-        {
-            cout << "NextId: NGS_AlignmentIteratorNext FAILED" << endl;
-            return false;
-        }
-        string actual = toString ( NGS_AlignmentGetAlignmentId ( m_align, m_ctx ), m_ctx, true );
-        if ( p_expected !=  actual )
-        {
-            cout << "NextId: expected '" << p_expected << "', actual '" << actual << "'" <<endl;
-            return false;
-        }
-        return m_ctx -> rc == 0;
-    }
-    
-    bool VerifyOrder()
-    {
-        uint64_t prevPos = 0;
-        uint64_t prevLen = 0;
-        bool     prevIsPrimary = true;
-        int      prevMapq = 0;
-        while ( NGS_AlignmentIteratorNext ( m_align, m_ctx ) )
-        {
-            uint64_t newPos = NGS_AlignmentGetAlignmentPosition ( m_align, m_ctx );
-            uint64_t newLen = NGS_AlignmentGetAlignmentLength ( m_align, m_ctx );
-            bool     newIsPrimary = NGS_AlignmentIsPrimary ( m_align, m_ctx );
-            int      newMapq = NGS_AlignmentGetMappingQuality( m_align, m_ctx );
-            if (prevPos > newPos)
-            {
-                PrintAlignment();
-                return false;
-            }
-            if ( prevPos == newPos ) 
-            {
-                if ( prevLen < newLen )
-                {
-                    PrintAlignment();
-                    return false;
-                }
-                if ( prevLen == newLen )
-                {
-                    if ( ! ( prevIsPrimary || ! newIsPrimary) )
-                    {
-                        PrintAlignment();
-                        return false;
-                    }
-                    if ( prevIsPrimary == newIsPrimary )
-                    {
-                        if ( prevMapq < newMapq )
-                        {
-                            PrintAlignment();
-                            return false;
-                        }
-                    }
-                }
-            }
-            prevPos = newPos;
-            prevLen = newLen;
-            prevIsPrimary = newIsPrimary;
-            prevMapq = newMapq;
-        }
-        return true;
-    }
-    
-    NGS_Alignment*      m_align;
-};
-
-// ReferenceWindow as an Alignment
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_NoAccessBeforeNext, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_PrimaryOnly, "supercont2.1" );
-    
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, true, false ); 
-
-    REQUIRE_NULL ( NGS_AlignmentGetAlignmentId ( m_align, ctx ) ); 
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_AlignmentGetReferenceSpec ( m_align, ctx ) ); 
-    REQUIRE_FAILED ();
-    NGS_AlignmentGetMappingQuality ( m_align, ctx ); 
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_AlignmentGetReadGroup ( m_align, ctx ) ); 
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_AlignmentGetReadId ( m_align, ctx ) ); 
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_AlignmentGetClippedFragmentBases ( m_align, ctx ) ); 
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_AlignmentGetClippedFragmentQualities ( m_align, ctx ) ); 
-    REQUIRE_FAILED ();
-    NGS_AlignmentIsPrimary ( m_align, ctx ); 
-    REQUIRE_FAILED ();
-    NGS_AlignmentGetAlignmentPosition ( m_align, ctx ); 
-    REQUIRE_FAILED ();
-    NGS_AlignmentGetAlignmentLength ( m_align, ctx ); 
-    REQUIRE_FAILED ();
-    NGS_AlignmentGetIsReversedOrientation ( m_align, ctx ); 
-    REQUIRE_FAILED ();
-    NGS_AlignmentGetSoftClip ( m_align, ctx, true ); 
-    REQUIRE_FAILED ();
-    NGS_AlignmentGetTemplateLength ( m_align, ctx ); 
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_AlignmentGetShortCigar ( m_align, ctx, true ) ); 
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_AlignmentGetLongCigar ( m_align, ctx, true ) ); 
-    REQUIRE_FAILED ();
-
-    REQUIRE ( ! NGS_AlignmentHasMate ( m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () ); /* HasMate does not throw */
-    
-    REQUIRE_NULL ( NGS_AlignmentGetMateAlignmentId ( m_align, ctx ) ); 
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_AlignmentGetMateAlignment ( m_align, ctx ) ); 
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_AlignmentGetMateReferenceSpec ( m_align, ctx ) ); 
-    REQUIRE_FAILED ();
-    NGS_AlignmentGetMateIsReversedOrientation ( m_align, ctx ); 
-    REQUIRE_FAILED (); 
-    
-    // fragment functions
-    REQUIRE_NULL ( NGS_FragmentGetId ( (NGS_Fragment*)m_align, ctx ) );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_FragmentGetSequence ( (NGS_Fragment*)m_align, ctx, 2, 5 ) );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_FragmentGetQualities ( (NGS_Fragment*)m_align, ctx, 2, 5 ) );
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_AccessAfterNext, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_PrimaryOnly, "supercont2.1" );
-    
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, true, false ); 
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( string ( CSRA1_PrimaryOnly ) + ".PA.1", NGS_AlignmentGetAlignmentId ( m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( "supercont2.1", NGS_AlignmentGetReferenceSpec ( m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE_EQ ( 60, NGS_AlignmentGetMappingQuality ( m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE_STRING ( "C1ELY.6", NGS_AlignmentGetReadGroup ( m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE_STRING ( string ( CSRA1_PrimaryOnly ) + ".R.1", NGS_AlignmentGetReadId ( m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE_STRING ( "ACTCGACATTCTGCCTTCGACCTATCTTTCTCCTCTCCCAGTCATCGCCCAGTAGAATTACCAGGCAATGAACCAGGGCCTTCCATCCCAACGGCACAGCA", 
-                     NGS_AlignmentGetClippedFragmentBases ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE_STRING ( "@@CDDBDFFBFHFIEEFGIGGHIEHIGIGGFGEGAFDHIIIIIGGGDFHII;=BF at FEHGIEEH?AHHFHFFFFDC5'5=?CC?ADCD at AC??9BDDCDB<", 
-                     NGS_AlignmentGetClippedFragmentQualities ( m_align, ctx ) );
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE ( NGS_AlignmentIsPrimary ( m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE_EQ ( (int64_t)85, NGS_AlignmentGetAlignmentPosition ( m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE_EQ ( (uint64_t)101, NGS_AlignmentGetAlignmentLength ( m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE ( ! NGS_AlignmentGetIsReversedOrientation ( m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE_EQ ( (int)0, NGS_AlignmentGetSoftClip ( m_align, ctx, true ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE_EQ ( (uint64_t)201, NGS_AlignmentGetTemplateLength ( m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE_STRING ( "101M", NGS_AlignmentGetShortCigar ( m_align, ctx, true ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE_STRING ( "13=1X61=1X6=1X18=", NGS_AlignmentGetLongCigar ( m_align, ctx, true ) ); 
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE ( NGS_AlignmentHasMate ( m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () ); 
-    
-    REQUIRE_STRING ( string ( CSRA1_PrimaryOnly ) + ".PA.2", NGS_AlignmentGetMateAlignmentId ( m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    NGS_Alignment * mate = NGS_AlignmentGetMateAlignment ( m_align, ctx );
-    REQUIRE_NOT_NULL ( mate ); 
-    REQUIRE ( ! FAILED () );
-    NGS_RefcountRelease ( NGS_AlignmentToRefcount ( mate ) , ctx );
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE_STRING ( "supercont2.1", NGS_AlignmentGetMateReferenceSpec ( m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE ( NGS_AlignmentGetMateIsReversedOrientation ( m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    // fragment functions
-    REQUIRE_STRING ( string ( CSRA1_PrimaryOnly ) + ".FA0.1", NGS_FragmentGetId ( (NGS_Fragment*)m_align, ctx ) ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE_STRING (  "ACTCG",  NGS_FragmentGetSequence ( (NGS_Fragment*)m_align, ctx, 0, 5 ) );
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE_STRING ( "@@CDD",  NGS_FragmentGetQualities ( (NGS_Fragment*)m_align, ctx, 0, 5 ) );
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_align, ctx ) );
-    REQUIRE_FAILED ();
-    
-    EXIT;
-}
-
-// Iteration over a ReferenceWindow
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Primary, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_WithSecondary, "gi|169794206|ref|NC_010410.1|" );
-    
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, true, false ); 
-
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".PA.1") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".PA.2") ); 
-    // etc
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Primary_Only, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_WithSecondary, "gi|169794206|ref|NC_010410.1|" );
-    
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, true, false ); 
-
-    // skip to where a secondary alignment which would show up, between primary alignments 34 and 35
-    SkipAlignments( 33 );
-    
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".PA.34") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".PA.35") ); 
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Secondary, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_WithSecondary, "gi|169794206|ref|NC_010410.1|" );
-    
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, false, true ); 
-
-    
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".SA.169") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".SA.170") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".SA.171") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".SA.172") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".SA.173") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".SA.174") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".SA.175") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".SA.176") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".SA.177") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".SA.178") ); 
-    
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_PrimaryAndSecondary, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_WithSecondary, "gi|169794206|ref|NC_010410.1|" );
-    
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, true, true ); 
-
-    // skip to where a secondary alignment is expected, between primary alignments 34 and 35
-    SkipAlignments( 33 );
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".PA.34") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".SA.169") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".PA.35") ); 
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Sort, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_WithSecondary, "gi|169794206|ref|NC_010410.1|" );
-    
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, true, true ); 
-
-    // secondary 170 should go before primary 62
-    SkipAlignments( 61 ); /*skip over 60 primary and 1 secondary */
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".PA.61") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".SA.170") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".PA.62") ); 
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_FullPrimary_Order, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_WithSecondary, "gi|169794206|ref|NC_010410.1|" );
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, true, false ); 
-    REQUIRE ( VerifyOrder() );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_FullSecondary_Order, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_WithSecondary, "gi|169794206|ref|NC_010410.1|" );
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, false, true ); 
-    REQUIRE ( VerifyOrder() );
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_FullAll_Order, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_WithSecondary, "gi|169794206|ref|NC_010410.1|" );
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, true, true ); 
-    REQUIRE ( VerifyOrder() );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Slice_Empty, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( "SRR960954", "gi|296100371|ref|NC_014121.1|" );
-    
-    m_align = NGS_ReferenceGetAlignmentSlice ( m_ref, ctx, 0, 20000, false, false ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Slice_OutOfBounds, CSRA1_Fixture)
-{
-    ENTRY_GET_REF( "SRR960954", "gi|296100371|ref|NC_014121.1|" );
-    
-    m_align = NGS_ReferenceGetAlignmentSlice ( m_ref, ctx, NGS_ReferenceGetLength ( m_ref, ctx ), 1, true, true ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Slice, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_WithSecondary, "gi|169794206|ref|NC_010410.1|" );
-
-    m_align = NGS_ReferenceGetAlignmentSlice ( m_ref, ctx, 517000, 100000, true, true ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".PA.34") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".SA.169") ); 
-    REQUIRE ( NextId ( string ( CSRA1_WithSecondary ) + ".PA.35") ); 
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Slice_Order, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_WithSecondary, "gi|169794206|ref|NC_010410.1|" );
-    m_align = NGS_ReferenceGetAlignmentSlice ( m_ref, ctx, 517000, 100000, true, true ); 
-    REQUIRE ( VerifyOrder() );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Slice_NoSecondary, CSRA1_Fixture)
-{   // VDB-2658: exception when there is no REFERENCE.SECONDARY_ALIGNMENT_IDS column
-    const char* accesssion = "SRR644545";
-    ENTRY_GET_REF ( accesssion, "NC_000004.11" );
-
-    m_align = NGS_ReferenceGetAlignmentSlice ( m_ref, ctx, 0, 100000, true, true ); 
-    REQUIRE ( ! FAILED () );
-    
-    REQUIRE ( NextId ( string ( accesssion ) + ".PA.1") ); 
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Slice_Overlap_Primary, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_PrimaryOnly, "supercont2.1" );
-
-    m_align = NGS_ReferenceGetAlignmentSlice ( m_ref, ctx, 10000, 100, true, true ); 
-    REQUIRE ( ! FAILED () );
-    
-    // 2 primary alignments start in the previous chunk and overlap with the chunk starting at 10000
-    REQUIRE ( NextId ( string ( CSRA1_PrimaryOnly ) + ".PA.96") ); 
-    REQUIRE ( NextId ( string ( CSRA1_PrimaryOnly ) + ".PA.97") ); 
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Slice_Overlap_Primary_Order, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_PrimaryOnly, "supercont2.1" );
-    m_align = NGS_ReferenceGetAlignmentSlice ( m_ref, ctx, 10000, 100, true, true ); 
-    REQUIRE ( VerifyOrder() );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Slice_Overlap_Secondary, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( "SRR960954", "gi|296100371|ref|NC_014121.1|" );
-
-    m_align = NGS_ReferenceGetAlignmentSlice ( m_ref, ctx, 4020000, 100, true, true ); 
-    REQUIRE ( ! FAILED () );
-    
-    // a secondary alignment starts in the previous chunk and overlaps with the chunk starting at 4020000
-    REQUIRE ( NextId ( string ( "SRR960954.SA.1384") ) ); 
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Slice_Overlap_PrimaryAndSecondary, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( "ERR225922", "2" );
-
-    m_align = NGS_ReferenceGetAlignmentSlice ( m_ref, ctx, 203895000, 100, true, true ); 
-    REQUIRE ( ! FAILED () );
-    
-    // several primary and secondary alignments start in the previous chunk and overlap with the chunk starting at 203895000
-                                    // pos, len, mapq
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7023")    ) ); 
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7024")    ) ); 
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7025")    ) ); 
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7026")    ) ); 
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7028")    ) );    // 203894959, 76, 60 (higher MAPQ than 7027, same pos/len)
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7027")    ) );    // 203894959, 76, 60
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7029")    ) );    // 203894961, 76, 60 (same as 45681 but primary)
-    REQUIRE ( NextId ( string ( "ERR225922.SA.45681")   ) );   // 203894961, 76, 60 (same as 7029 but secondary; id=45521+160 )
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7030")    ) ); 
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7031")    ) ); 
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7032")    ) ); 
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7033")    ) ); 
-    REQUIRE ( NextId ( string ( "ERR225922.SA.45682")   ) );   // (id=45,521+161)
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, m_ctx ) ); 
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Slice_Overlap_PrimaryAndSecondary_Cutoff, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( "ERR225922", "2" );
-
-    m_align = NGS_ReferenceGetAlignmentSlice ( m_ref, ctx, 203895050, 100, true, true ); // increase offset by 50 bases
-    REQUIRE ( ! FAILED () );
-    
-    // compared to the test above, alignments that do not reach 50+ bases into the chunk are excluded
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7032")  ) ); 
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7033")  ) ); 
-    REQUIRE ( NextId ( string ( "ERR225922.SA.45682") ) ); // 45,521+161
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, m_ctx ) ); 
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Slice_Overlap_PrimaryAndSecondary_FullCutoff, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( "ERR225922", "2" );
-
-    m_align = NGS_ReferenceGetAlignmentSlice ( m_ref, ctx, 203895150, 100, true, true ); // increase offset to exclude all overlaps
-    REQUIRE ( ! FAILED () );
-    
-    // none of the alignments reach 150+ bases into the chunk
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, m_ctx ) ); 
-    
-    EXIT;
-}
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Slice_Filtered, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( "ERR225922", "2" );
-
-    const bool wants_primary = true;
-    const bool wants_secondary = true;
-#pragma message ( "filtering did not work prior to today's changes. I have set filter bits to allow this test to pass. the test should be fixed so that filters are set to the two desired flags." )
-    const uint32_t filters = NGS_AlignmentFilterBits_pass_bad | NGS_AlignmentFilterBits_pass_dups |
-        NGS_AlignmentFilterBits_no_wraparound | NGS_AlignmentFilterBits_start_within_window;
-    const int32_t no_map_qual = 0;
-
-    m_align = NGS_ReferenceGetFilteredAlignmentSlice ( m_ref, ctx, 203894961, 100, wants_primary, wants_secondary, filters, no_map_qual ); // only the ones that start within the window
-    REQUIRE ( ! FAILED () );
-    
-    // only the alignments starting inside the slice (203894961)
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7029")    ) );    // 203894961, 76, 60 (same as 45681 but primary)
-    REQUIRE ( NextId ( string ( "ERR225922.SA.45681")   ) );   // 203894961, 76, 60 (same as 7029 but secondary; id=45521+160 )
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7030")    ) ); 
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7031")    ) ); 
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7032")    ) ); 
-    REQUIRE ( NextId ( string ( "ERR225922.PA.7033")    ) ); 
-    REQUIRE ( NextId ( string ( "ERR225922.SA.45682")   ) );   // (id=45,521+161)
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( m_align, m_ctx ) ); 
-    
-    EXIT;
-}
-
-// FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Slice_Overlap_LookbackMoreThanOneChunk, CSRA1_Fixture)
-// FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Slice_Overlap_LookbackDiffersForPrimaryAndSecondary, CSRA1_Fixture)
-// FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Slice_Overlap_DefaultLookback, CSRA1_Fixture)
-
-// circular reference 
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Circular, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_WithCircularReference, "chrM" );
-
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, true, true ); 
-    REQUIRE ( ! FAILED () );
-    
-    // chrM is 16569 bases long          // pos, len, mapq
-    REQUIRE ( NextId ( string ( CSRA1_WithCircularReference ) + ".PA.4511855081") );   // 16528, 42, 0   // last base 16528+42-1 = 16569 (mod 16569 = #0 in 0-based coord)
-    REQUIRE ( NextId ( string ( CSRA1_WithCircularReference ) + ".PA.4511855600") );   // 16529, 41, 66
-    REQUIRE ( NextId ( string ( CSRA1_WithCircularReference ) + ".PA.4511855598") );   // 16529, 41, 35
-    REQUIRE ( NextId ( string ( CSRA1_WithCircularReference ) + ".PA.4511855595") );   // 16529, 41, 28
-    REQUIRE ( NextId ( string ( CSRA1_WithCircularReference ) + ".PA.4511855597") );   // 16529, 41, 4
-    REQUIRE ( NextId ( string ( CSRA1_WithCircularReference ) + ".PA.4511855596") );   // 16529, 41, 0
-    REQUIRE ( NextId ( string ( CSRA1_WithCircularReference ) + ".PA.4511855599") );   // 16529, 41, 0
-    
-    // ...
-    
-    // TODO: make sure alignments do not reappear at the end of iteration!
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_Circular_Slice, CSRA1_Fixture)
-{
-    ENTRY_GET_REF ( CSRA1_WithCircularReference, "chrM" );
-
-    m_align = NGS_ReferenceGetAlignmentSlice ( m_ref, ctx, 1, 100, true, true ); 
-    REQUIRE ( ! FAILED () );
-                                         // pos, len, mapq
-    REQUIRE ( NextId ( string ( CSRA1_WithCircularReference ) + ".PA.4511856243") );   // -39, 41, 56
-    REQUIRE ( NextId ( string ( CSRA1_WithCircularReference ) + ".PA.4511856241") );   // -39, 41, 0
-    REQUIRE ( NextId ( string ( CSRA1_WithCircularReference ) + ".PA.4511856242") );   // -39, 41, 0
-    REQUIRE ( NextId ( string ( CSRA1_WithCircularReference ) + ".PA.4511857002") );   // -38, 40, 74
-    REQUIRE ( NextId ( string ( CSRA1_WithCircularReference ) + ".PA.4511857001") );   // -38, 40, 70
-    
-    // ...
-   
-    EXIT;
-}
-
-// NGS_ReferenceGetFilteredAlignmentSlice
-
-uint64_t SliceOffset = 5;
-uint64_t SliceLength = 100;
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetFilteredAlignmentSlice_Wraparound, CSRA1_Fixture )
-{   // wraparound alignments overlapping with a slice
-    ENTRY_GET_REF( CSRA1_WithCircularReference, "chrM" );
-    
-    const bool wants_primary = true;
-    const bool wants_secondary = true;
-#pragma message ( "filtering did not work prior to today's changes. I have set filter bits to allow this test to pass. the test should be fixed so that filters are set to the two desired flags." )
-    const uint32_t no_filters = NGS_AlignmentFilterBits_pass_bad | NGS_AlignmentFilterBits_pass_dups;
-    const int32_t no_map_qual = 0;
-
-    m_align = NGS_ReferenceGetFilteredAlignmentSlice ( m_ref, ctx, SliceOffset, SliceLength, wants_primary, wants_secondary, no_filters, no_map_qual ); 
-    REQUIRE ( ! FAILED () && m_align );
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    // the first returned alignment starts before the start of the circular reference, overlaps with slice
-    int64_t pos = NGS_AlignmentGetAlignmentPosition ( m_align, ctx );
-    REQUIRE_LT ( ( int64_t ) ( SliceOffset + SliceLength ), pos );
-    
-    // check for overlap with the slice
-    uint64_t refLen = NGS_ReferenceGetLength ( m_ref, ctx );
-    pos -= ( int64_t ) refLen; 
-    REQUIRE_GT ( ( int64_t ) 0, pos );
-    REQUIRE_GE ( pos + NGS_AlignmentGetAlignmentLength( m_align, ctx ), SliceOffset );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetFilteredAlignmentSlice_Wraparound_StartInWindow, CSRA1_Fixture )
-{   // when StartInWindow filter is specified, it removes wraparound alignments as well
-    ENTRY_GET_REF( CSRA1_WithCircularReference, "chrM" );
-    
-    const bool wants_primary = true;
-    const bool wants_secondary = true;
-#pragma message ( "filtering did not work prior to today's changes. I have set filter bits to allow this test to pass. the test should be fixed so that filters are set to the two desired flags." )
-    const uint32_t filters = NGS_AlignmentFilterBits_pass_bad | NGS_AlignmentFilterBits_pass_dups |
-        NGS_AlignmentFilterBits_start_within_window;
-    const int32_t no_map_qual = 0;
-
-    m_align = NGS_ReferenceGetFilteredAlignmentSlice ( m_ref, ctx, SliceOffset, SliceLength, wants_primary, wants_secondary, filters, no_map_qual ); 
-    REQUIRE ( ! FAILED () && m_align );
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    // the first returned alignment starts inside the slice
-    int64_t pos = NGS_AlignmentGetAlignmentPosition ( m_align, ctx );
-    REQUIRE_LE ( ( int64_t ) SliceOffset, pos );
-    REQUIRE_LT ( pos, ( int64_t ) ( SliceOffset + SliceLength ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetFilteredAlignmentSlice_NoWraparound, CSRA1_Fixture )
-{   // only removes wraparound alignments, not the ones starting before the slice
-    ENTRY_GET_REF( CSRA1_WithCircularReference, "chrM" );
-    
-    const bool wants_primary = true;
-    const bool wants_secondary = true;
-#pragma message ( "filtering did not work prior to today's changes. I have set filter bits to allow this test to pass. the test should be fixed so that filters are set to the two desired flags." )
-    const uint32_t filters = NGS_AlignmentFilterBits_pass_bad | NGS_AlignmentFilterBits_pass_dups |
-        NGS_AlignmentFilterBits_no_wraparound;
-    const int32_t no_map_qual = 0;
-
-    m_align = NGS_ReferenceGetFilteredAlignmentSlice ( m_ref, ctx, SliceOffset, SliceLength, wants_primary, wants_secondary, filters, no_map_qual ); 
-    REQUIRE ( ! FAILED () && m_align );
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    // the first returned alignment starts outside the slice but does not wrap around
-    REQUIRE_GT ( ( int64_t ) SliceOffset, NGS_AlignmentGetAlignmentPosition ( m_align, ctx ) );
-    
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceGetFilteredAlignmentSlice_NoWraparound_StartInWindow, CSRA1_Fixture )
-{   // when StartInWindow filter is specified, it removes wraparound alignments as well
-    ENTRY_GET_REF( CSRA1_WithCircularReference, "chrM" );
-    
-    const bool wants_primary = true;
-    const bool wants_secondary = true;
-#pragma message ( "filtering did not work prior to today's changes. I have set filter bits to allow this test to pass. the test should be fixed so that filters are set to the two desired flags." )
-    const uint32_t filters = NGS_AlignmentFilterBits_pass_bad | NGS_AlignmentFilterBits_pass_dups |
-        NGS_AlignmentFilterBits_no_wraparound | NGS_AlignmentFilterBits_start_within_window;
-    const int32_t no_map_qual = 0;
-
-    m_align = NGS_ReferenceGetFilteredAlignmentSlice ( m_ref, ctx, SliceOffset, SliceLength, wants_primary, wants_secondary, filters, no_map_qual ); 
-    REQUIRE ( ! FAILED () && m_align );
-    REQUIRE ( NGS_AlignmentIteratorNext ( m_align, ctx ) );
-    
-    // the first returned alignment starts inside the slice
-    int64_t pos = NGS_AlignmentGetAlignmentPosition ( m_align, ctx );
-    REQUIRE_LE ( ( int64_t ) SliceOffset, pos );
-    REQUIRE_LT ( pos, ( int64_t ) ( SliceOffset + SliceLength ) );
-    
-    EXIT;
-}
-
-
-
-#if 0
-FIXTURE_TEST_CASE(CSRA1_NGS_ReferenceWindow_PrintEmAll_1, CSRA1_Fixture)
-{
-//    ENTRY_GET_REF ( "SRR960954" , "gi|296100371|ref|NC_014121.1|" );
-//    ENTRY_GET_REF ( "SRR822962" , "chr2" );
-//    ENTRY_GET_REF ( CSRA1_WithSecondary, "gi|169794206|ref|NC_010410.1|" );
-//    ENTRY_GET_REF ( CSRA1_PrimaryOnly, "supercont2.1" );
-    ENTRY_GET_REF ( CSRA1_WithCircularReference, "chrM" );
-    
-    m_align = NGS_ReferenceGetAlignments ( m_ref, ctx, true, true ); 
-
-    uint64_t prevPos = 0;
-    uint64_t prevLen = 0;
-    bool     prevIsPrimary = true;
-    int      prevMapq = 0;
-    while ( NGS_AlignmentIteratorNext ( m_align, ctx ) )
-    {
-        
-        uint64_t newPos = NGS_AlignmentGetAlignmentPosition ( m_align, m_ctx );
-        uint64_t newLen = NGS_AlignmentGetAlignmentLength ( m_align, m_ctx );
-        bool     newIsPrimary = NGS_AlignmentIsPrimary ( m_align, m_ctx );
-        int      newMapq = NGS_AlignmentGetMappingQuality( m_align, m_ctx );
-        
-        PrintAlignment ();
-        
-/*        REQUIRE_LE (prevPos, newPos);
-        if ( prevPos == newPos ) 
-        {
-            REQUIRE_GE ( prevLen, newLen );
-            if ( prevLen == newLen )
-            {
-                REQUIRE ( prevIsPrimary || ! newIsPrimary);
-                if ( prevIsPrimary == newIsPrimary )
-                {
-                    REQUIRE_GE ( prevMapq, newMapq );
-                }
-            }
-        }*/
-        prevPos = newPos;
-        prevLen = newLen;
-        prevIsPrimary = newIsPrimary;
-        prevMapq = newMapq;
-    }
-    
-    EXIT;
-}
-#endif
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-ngs_csra1_refwin";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t m_coll=NgsCsra1RefWinTestSuite(argc, argv);
-    return m_coll;
-}
-
-}
-
diff --git a/test/ngs/ngstest_fragmentblob.cpp b/test/ngs/ngstest_fragmentblob.cpp
deleted file mode 100644
index 54e9991..0000000
--- a/test/ngs/ngstest_fragmentblob.cpp
+++ /dev/null
@@ -1,597 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for low-level NGS functions
-*/
-
-// suppress macro max from windows.h
-#define NOMINMAX
-
-#include "ngs_c_fixture.hpp"
-
-#include <NGS_Cursor.h>
-#include <SRA_Read.h>
-#include <NGS_FragmentBlob.h>
-#include <NGS_FragmentBlobIterator.h>
-
-#include <vdb/table.h>
-#include <vdb/database.h>
-
-#include <stdexcept>
-#include <cstring>
-#include <limits>
-#include <cmath>
-
-using namespace std;
-using namespace ncbi::NK;
-
-TEST_SUITE(NgsFragmentBlobTestSuite);
-
-const char* SRA_Accession = "SRR000001";
-
-//////////////////////////////////////////// NGS_FragmentBlob
-
-class FragmentBlobFixture : public NGS_C_Fixture
-{
-public:
-    FragmentBlobFixture ()
-    :   m_tbl ( 0 ),
-        m_curs ( 0 ),
-        m_blob ( 0 )
-    {
-    }
-
-    void MakeBlob ( const char* acc, int64_t rowId )
-    {
-        if ( m_tbl != 0 )
-        {
-            VTableRelease ( m_tbl );
-        }
-        if ( VDBManagerOpenTableRead ( m_ctx -> rsrc -> vdb, & m_tbl, NULL, acc ) != 0 )
-        {
-            throw logic_error ("FragmentBlobFixture::MakeBlob VDBManagerOpenTableRead failed");
-        }
-        m_curs = NGS_CursorMake ( m_ctx, m_tbl, sequence_col_specs, seq_NUM_COLS );
-        if ( m_curs == 0 )
-        {
-            throw logic_error ("FragmentBlobFixture::MakeBlob NGS_CursorMake failed");
-        }
-        NGS_String* run = NGS_StringMake ( m_ctx, acc, string_size ( acc ) );
-        m_blob = NGS_FragmentBlobMake ( m_ctx, run, m_curs, rowId );
-        NGS_StringRelease ( run, m_ctx );
-        if ( m_blob == 0 )
-        {
-            throw logic_error ("FragmentBlobFixture::MakeBlob NGS_FragmentBlobMake failed");
-        }
-    }
-    virtual void Release()
-    {
-        if (m_ctx != 0)
-        {
-            if ( m_blob != 0 )
-            {
-                NGS_FragmentBlobRelease ( m_blob, m_ctx );
-            }
-            if ( m_curs != 0 )
-            {
-                NGS_CursorRelease ( m_curs, m_ctx );
-            }
-            if ( m_tbl != 0 )
-            {
-                VTableRelease ( m_tbl );
-            }
-        }
-        NGS_C_Fixture :: Release ();
-    }
-
-    const VTable* m_tbl;
-    const NGS_Cursor* m_curs;
-    struct NGS_FragmentBlob* m_blob;
-};
-
-TEST_CASE ( NGS_FragmentBlobMake_BadCursor)
-{
-    HYBRID_FUNC_ENTRY ( rcSRA, rcRow, rcAccessing );
-
-    NGS_String* run = NGS_StringMake ( ctx, "", 0 );
-    REQUIRE ( ! FAILED () );
-
-    struct NGS_FragmentBlob * blob = NGS_FragmentBlobMake ( ctx, run, NULL, 1 );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( blob );
-
-    NGS_StringRelease ( run, ctx );
-    REQUIRE ( ! FAILED () );
-}
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobMake_NullRunName, FragmentBlobFixture )
-{
-    ENTRY;
-
-    REQUIRE_RC ( VDBManagerOpenTableRead ( m_ctx -> rsrc -> vdb, & m_tbl, NULL, SRA_Accession ) );
-    m_curs = NGS_CursorMake ( m_ctx, m_tbl, sequence_col_specs, seq_NUM_COLS );
-    REQUIRE_NOT_NULL ( m_curs );
-
-    struct NGS_FragmentBlob * blob = NGS_FragmentBlobMake ( ctx, NULL, m_curs, 1 );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( blob );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobMake_BadRowId, FragmentBlobFixture )
-{
-    ENTRY;
-    REQUIRE_RC ( VDBManagerOpenTableRead ( m_ctx -> rsrc -> vdb, & m_tbl, NULL, SRA_Accession ) );
-    m_curs = NGS_CursorMake ( m_ctx, m_tbl, sequence_col_specs, seq_NUM_COLS );
-    REQUIRE_NOT_NULL ( m_curs );
-    NGS_String* run = NGS_StringMake ( m_ctx, SRA_Accession, string_size ( SRA_Accession ) );
-
-    m_blob = NGS_FragmentBlobMake ( m_ctx, run, m_curs, -1 ); // bad row Id
-    REQUIRE_FAILED ();
-
-    NGS_StringRelease ( run, m_ctx );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlob_RowRange, FragmentBlobFixture )
-{
-    ENTRY;
-    MakeBlob ( SRA_Accession, 1 );
-
-    int64_t first = 0;
-    uint64_t count = 0;
-    NGS_FragmentBlobRowRange ( m_blob, m_ctx, & first, & count );
-    REQUIRE_EQ ( (int64_t)1, first );
-    REQUIRE_EQ ( (uint64_t)4, count );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobMake_DuplicateRelease, FragmentBlobFixture )
-{
-    ENTRY;
-    MakeBlob ( SRA_Accession, 1 );
-
-    // Duplicate
-    NGS_FragmentBlob* anotherBlob = NGS_FragmentBlobDuplicate ( m_blob, m_ctx );
-    REQUIRE_NOT_NULL ( anotherBlob );
-    // Release
-    NGS_FragmentBlobRelease ( anotherBlob, m_ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobMake_Data_BadArg, FragmentBlobFixture )
-{
-    ENTRY;
-
-    REQUIRE_NULL ( NGS_FragmentBlobData ( NULL, m_ctx ) );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-FIXTURE_TEST_CASE ( NGS_FragmentBlobMake_Data, FragmentBlobFixture )
-{
-    ENTRY;
-    MakeBlob ( SRA_Accession, 1 );
-
-    const void* data = NGS_FragmentBlobData ( m_blob, m_ctx );
-    REQUIRE_NOT_NULL ( data );
-    REQUIRE_EQ ( string ( "TCAGAT" ), string ( (const char*)data, 6 ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobMake_Size_BadArg, FragmentBlobFixture )
-{
-    ENTRY;
-
-    NGS_FragmentBlobSize ( NULL, m_ctx );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-FIXTURE_TEST_CASE ( NGS_FragmentBlobMake_Size, FragmentBlobFixture )
-{
-    ENTRY;
-    MakeBlob ( SRA_Accession, 1 );
-
-    REQUIRE_EQ ( (uint64_t)1080, NGS_FragmentBlobSize ( m_blob, m_ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobMake_InfoByOffset_BadSelf, FragmentBlobFixture )
-{
-    ENTRY;
-
-    int64_t rowId;
-    uint64_t fragStart;
-    uint64_t baseCount;
-    int32_t bioNumber;
-    NGS_FragmentBlobInfoByOffset ( NULL, ctx, 0, & rowId, & fragStart, & baseCount, & bioNumber );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-// TODO: NULL for optional parameters
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobMake_InfoByOffset_Biological, FragmentBlobFixture )
-{
-    ENTRY;
-    MakeBlob ( SRA_Accession, 1 );
-
-    int64_t rowId;
-    uint64_t fragStart;
-    uint64_t baseCount;
-    int32_t bioNumber;
-    // offset 300 is in row 2 which starts at 284 and consists of 4 fragments:
-    // technical, start 284, len 4
-    // biological #0, start 288, len 115 <== expect to see this for offset 300
-    // technical, start 403, len 44
-    // biological #1, start 447, len 99
-    NGS_FragmentBlobInfoByOffset ( m_blob, ctx, 300, & rowId, & fragStart, & baseCount, & bioNumber );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_EQ ( (int64_t)2, rowId );
-    REQUIRE_EQ ( (uint64_t)288, fragStart );
-    REQUIRE_EQ ( (uint64_t)115, baseCount );
-    REQUIRE_EQ ( (int32_t)0, bioNumber );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobMake_InfoByOffset_Technical, FragmentBlobFixture )
-{
-    ENTRY;
-    MakeBlob ( SRA_Accession, 1 );
-
-    int64_t rowId;
-    uint64_t fragStart;
-    uint64_t baseCount;
-    int32_t bioNumber;
-    // offset 300 is in row 2 which starts at 284 and consists of 4 fragments:
-    // technical, start 284, len 4
-    // biological #0, start 288, len 115
-    // technical, start 403, len 44  <== expect to see this for offset 410
-    // biological #1, start 447, len 99
-    NGS_FragmentBlobInfoByOffset ( m_blob, ctx, 410, & rowId, & fragStart, & baseCount, & bioNumber );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_EQ ( (int64_t)2, rowId );
-    REQUIRE_EQ ( (uint64_t)403, fragStart );
-    REQUIRE_EQ ( (uint64_t)44, baseCount );
-    REQUIRE_EQ ( (int32_t)-1, bioNumber );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobMake_InfoByOffset_WithRepeat, FragmentBlobFixture )
-{   // VDB-3026, VDB-2809
-    ENTRY;
-
-    // In SRR341578.SEQUENCE, rows 197317 and 197318 have identical values in the READ column
-    // we test correct handling of the repeat count in the row map by providing an offset
-    // that points into the second of the two rows
-    const int64_t RepeatedRowId = 197318;
-    const uint64_t OffsetIntoRepeatedRowId = 8889;
-    const char* acc = "SRR341578";
-
-    const VDatabase *db;
-    REQUIRE_RC ( VDBManagerOpenDBRead ( m_ctx -> rsrc -> vdb, & db, NULL, acc ) );
-    REQUIRE_RC ( VDatabaseOpenTableRead ( db, & m_tbl, "SEQUENCE" ) );
-    REQUIRE_RC ( VDatabaseRelease ( db ) );
-
-    m_curs = NGS_CursorMake ( m_ctx, m_tbl, sequence_col_specs, seq_NUM_COLS );
-    REQUIRE_NOT_NULL ( m_curs );
-
-    // The blob-making code in vdb is very-very smart and decides on the size of the blob
-    // to create based on the access patterns.
-    // If we specify our rowId directly, we will get a one-row blob. We want
-    // more than one row so that repeat count is > 1. So, we walk from 1 up to our RepeatedRowId
-    // to make sure we got a bigger blob:
-    {
-        NGS_String* run = NGS_StringMake ( m_ctx, acc, string_size ( acc ) );
-        int64_t rowId = 1;
-        while ( ! FAILED () )
-        {
-            m_blob = NGS_FragmentBlobMake ( m_ctx, run, m_curs, rowId );
-            int64_t first = 0;
-            uint64_t count = 0;
-            NGS_FragmentBlobRowRange ( m_blob, m_ctx, & first, & count );
-            if ( first + (int64_t)count > RepeatedRowId )
-            {
-                break; // m_blob is what we need
-            }
-            NGS_FragmentBlobRelease ( m_blob, m_ctx );
-            rowId += count;
-        }
-        NGS_StringRelease ( run, m_ctx );
-    }
-
-    {   // verify access to the second of 2 repeated cells
-        int64_t rowId;
-        uint64_t fragStart;
-        uint64_t baseCount;
-        int32_t bioNumber;
-        NGS_FragmentBlobInfoByOffset ( m_blob, ctx, OffsetIntoRepeatedRowId, & rowId, & fragStart, & baseCount, & bioNumber );
-        REQUIRE ( ! FAILED () );
-        REQUIRE_EQ ( RepeatedRowId, rowId );
-        REQUIRE_EQ ( (uint64_t)8888, fragStart );
-        REQUIRE_EQ ( (uint64_t)101, baseCount );
-        REQUIRE_EQ ( (int32_t)0, bioNumber );
-    }
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlob_MakeFragmentId, FragmentBlobFixture )
-{
-    ENTRY;
-    MakeBlob ( SRA_Accession, 1 );
-
-    NGS_String* id = NGS_FragmentBlobMakeFragmentId ( m_blob, ctx, 2, 1 );
-    REQUIRE_EQ ( string ( SRA_Accession ) + ".FR1.2", string ( NGS_StringData ( id, ctx ), NGS_StringSize ( id, ctx ) ) );
-    NGS_StringRelease ( id, ctx );
-
-    EXIT;
-}
-
-//////////////////////////////////////////// NGS_FragmentBlobIterator
-
-class BlobIteratorFixture : public NGS_C_Fixture
-{
-public:
-    BlobIteratorFixture ()
-    :   m_tbl ( 0 ),
-        m_blobIt ( 0 )
-    {
-    }
-
-    void MakeSRA( const char* acc )
-    {
-        if ( m_tbl != 0 )
-            VTableRelease ( m_tbl );
-        if ( VDBManagerOpenTableRead ( m_ctx -> rsrc -> vdb, & m_tbl, NULL, acc ) != 0 )
-            throw logic_error ("BlobIteratorFixture::MakeSRA VDBManagerOpenTableRead failed");
-    }
-    void MakeIterator( const char* acc )
-    {
-        MakeSRA ( acc );
-        NGS_String* run = NGS_StringMake ( m_ctx, acc, string_size ( acc ) );
-        m_blobIt = NGS_FragmentBlobIteratorMake ( m_ctx, run, m_tbl );
-        NGS_StringRelease ( run, m_ctx );
-    }
-    virtual void Release()
-    {
-        if (m_ctx != 0)
-        {
-            if ( m_blobIt != 0 )
-            {
-                NGS_FragmentBlobIteratorRelease ( m_blobIt, m_ctx );
-            }
-            if ( m_tbl != 0 )
-            {
-                VTableRelease ( m_tbl );
-            }
-        }
-        NGS_C_Fixture :: Release ();
-    }
-
-    const VTable* m_tbl;
-    struct NGS_FragmentBlobIterator* m_blobIt;
-};
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobIterator_BadMake, BlobIteratorFixture )
-{
-    ENTRY;
-
-    NGS_String* run = NGS_StringMake ( m_ctx, "", 0 );
-    REQUIRE ( ! FAILED () );
-
-    struct NGS_FragmentBlobIterator* blobIt = NGS_FragmentBlobIteratorMake ( ctx, run, NULL );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( blobIt );
-    NGS_StringRelease ( run, ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobIterator_CreateRelease, BlobIteratorFixture )
-{
-    ENTRY;
-    MakeSRA ( SRA_Accession );
-
-    NGS_String* run = NGS_StringMake ( m_ctx, SRA_Accession, string_size ( SRA_Accession ) );
-    REQUIRE ( ! FAILED () );
-    struct NGS_FragmentBlobIterator* blobIt = NGS_FragmentBlobIteratorMake ( m_ctx, run, m_tbl );
-    REQUIRE ( ! FAILED () );
-    NGS_StringRelease ( run, m_ctx );
-    REQUIRE_NOT_NULL ( blobIt );
-    REQUIRE ( ! FAILED () );
-    // Release
-    NGS_FragmentBlobIteratorRelease ( blobIt, m_ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobIterator_DuplicateRelease, BlobIteratorFixture )
-{
-    ENTRY;
-    MakeIterator ( SRA_Accession );
-
-    // Duplicate
-    struct NGS_FragmentBlobIterator* anotherBlobIt = NGS_FragmentBlobIteratorDuplicate ( m_blobIt, m_ctx );
-    REQUIRE_NOT_NULL ( anotherBlobIt );
-    // Release
-    NGS_FragmentBlobIteratorRelease ( anotherBlobIt, m_ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobIterator_Next, BlobIteratorFixture )
-{
-    ENTRY;
-    MakeIterator ( SRA_Accession );
-
-    struct NGS_FragmentBlob* blob = NGS_FragmentBlobIteratorNext ( m_blobIt, m_ctx );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_NOT_NULL ( blob );
-    NGS_FragmentBlobRelease ( blob, ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobIterator_HasMore, BlobIteratorFixture )
-{
-    ENTRY;
-    MakeIterator ( SRA_Accession );
-
-    REQUIRE ( NGS_FragmentBlobIteratorHasMore ( m_blobIt, m_ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    EXIT;
-}
-
-#if VDB_3075_has_been_fixed
-FIXTURE_TEST_CASE ( NGS_FragmentBlobIterator_FullScan, BlobIteratorFixture )
-{
-    ENTRY;
-    MakeIterator ( SRA_Accession );
-
-    uint32_t count = 0;
-    while ( NGS_FragmentBlobIteratorHasMore ( m_blobIt, m_ctx ) )
-    {
-        struct NGS_FragmentBlob* blob = NGS_FragmentBlobIteratorNext ( m_blobIt, m_ctx );
-        REQUIRE_NOT_NULL ( blob );
-        NGS_FragmentBlobRelease ( blob, ctx );
-        ++count;
-    }
-    REQUIRE_EQ ( (uint32_t)243, count);
-    REQUIRE_NULL ( NGS_FragmentBlobIteratorNext ( m_blobIt, m_ctx ) );
-
-    EXIT;
-}
-#endif
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobIterator_SparseTable, BlobIteratorFixture )
-{
-    ENTRY;
-    MakeIterator ( "./data/SparseFragmentBlobs" );
-    // only row 1 and 10 are present
-
-    REQUIRE ( NGS_FragmentBlobIteratorHasMore ( m_blobIt, m_ctx ) );
-    {
-        struct NGS_FragmentBlob* blob = NGS_FragmentBlobIteratorNext ( m_blobIt, m_ctx );
-        REQUIRE_NOT_NULL ( blob );
-        int64_t first = 0;
-        uint64_t count = 0;
-        NGS_FragmentBlobRowRange ( blob, m_ctx, & first, & count );
-        REQUIRE_EQ ( (int64_t)1, first );
-        REQUIRE_EQ ( (uint64_t)1, count );
-        NGS_FragmentBlobRelease ( blob, ctx );
-    }
-
-    REQUIRE ( NGS_FragmentBlobIteratorHasMore ( m_blobIt, m_ctx ) );
-    {
-        struct NGS_FragmentBlob* blob = NGS_FragmentBlobIteratorNext ( m_blobIt, m_ctx );
-        REQUIRE_NOT_NULL ( blob );
-        int64_t first = 0;
-        uint64_t count = 0;
-        NGS_FragmentBlobRowRange ( blob, m_ctx, & first, & count );
-        REQUIRE_EQ ( (int64_t)10, first );
-        REQUIRE_EQ ( (uint64_t)1, count );
-        NGS_FragmentBlobRelease ( blob, ctx );
-    }
-
-    REQUIRE ( ! NGS_FragmentBlobIteratorHasMore ( m_blobIt, m_ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE ( NGS_FragmentBlobIterator_IteratorRetreats, BlobIteratorFixture )
-{   // VDB-2809: NGS_FragmentBlobIterator returns overlapping blobs on CSRA1 accessions
-    ENTRY;
-    const char* acc = "SRR833251";
-    const VDatabase *db;
-    REQUIRE_RC ( VDBManagerOpenDBRead ( m_ctx -> rsrc -> vdb, & db, NULL, acc ) );
-    REQUIRE_RC ( VDatabaseOpenTableRead ( db, & m_tbl, "SEQUENCE" ) );
-    REQUIRE_RC ( VDatabaseRelease ( db ) );
-
-    NGS_String* run = NGS_StringMake ( m_ctx, acc, string_size ( acc ) );
-    m_blobIt = NGS_FragmentBlobIteratorMake ( m_ctx, run, m_tbl );
-    NGS_StringRelease ( run, m_ctx );
-
-    int64_t rowId = 1;
-    while (true)
-    {
-        struct NGS_FragmentBlob* blob = NGS_FragmentBlobIteratorNext ( m_blobIt, m_ctx );
-        if ( blob == 0 )
-        {
-            break;
-        }
-        int64_t first = 0;
-        uint64_t count = 0;
-        NGS_FragmentBlobRowRange ( blob, m_ctx, & first, & count );
-        REQUIRE_EQ ( rowId, first );
-        NGS_FragmentBlobRelease ( blob, ctx );
-        rowId = first + count;
-    }
-
-    EXIT;
-}
-
-//////////////////////////////////////////// Main
-
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-ngs";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t m_coll=NgsFragmentBlobTestSuite(argc, argv);
-    return m_coll;
-}
-
-}
-
diff --git a/test/ngs/ngstest_makedb.cpp b/test/ngs/ngstest_makedb.cpp
deleted file mode 100644
index c7daf11..0000000
--- a/test/ngs/ngstest_makedb.cpp
+++ /dev/null
@@ -1,196 +0,0 @@
-// ===========================================================================
-//
-//                            PUBLIC DOMAIN NOTICE
-//               National Center for Biotechnology Information
-//
-//  This software/database is a "United States Government Work" under the
-//  terms of the United States Copyright Act.  It was written as part of
-//  the author's official duties as a United States Government employee and
-//  thus cannot be copyrighted.  This software/database is freely available
-//  to the public for use. The National Library of Medicine and the U.S.
-//  Government have not placed any restriction on its use or reproduction.
-//
-//  Although all reasonable efforts have been taken to ensure the accuracy
-//  and reliability of the software and data, the NLM and the U.S.
-//  Government do not and cannot warrant the performance or results that
-//  may be obtained by using this software or data. The NLM and the U.S.
-//  Government disclaim all warranties, express or implied, including
-//  warranties of performance, merchantability or fitness for any particular
-//  purpose.
-//
-//  Please cite the author in any work or product based on this material.
-//
-// ===========================================================================
-
-#include <vdb/manager.h> // VDBManager
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/schema.h> /* VSchemaRelease */
-#include <vdb/vdb-priv.h>
-
-#include <sra/sraschema.h> // VDBManagerMakeSRASchema
-
-#include <kdb/meta.h>
-#include <kdb/table.h>
-
-#include <klib/rc.h>
-
-#include <ktst/unit_test.hpp> // TEST_CASE
-
-#include <sysalloc.h>
-
-#include <sstream>
-#include <cstdlib>
-
-using namespace std;
-
-/*
- * We will compile this test file first in read/write mode, create DB and
- * run tests using libncbi-wvdb library; then use  the database(s) it created
- * in other test suites
- */
-
-TEST_SUITE( NgsMakeDbSuite )
-
-const string ScratchDir = "./";
-
-class VDB_Fixture
-{
-public:
-    VDB_Fixture()
-    : m_table ( 0 )
-    {
-        THROW_ON_RC ( KDirectoryNativeDir ( & m_wd ) );
-        THROW_ON_RC ( VDBManagerMakeUpdate ( & m_mgr, m_wd ) );
-    }
-    ~VDB_Fixture()
-    {
-        if ( m_table != 0 )
-        {
-            VTableRelease ( m_table );
-        }
-        VDBManagerRelease ( m_mgr );
-        KDirectoryRelease ( m_wd );
-    }
-
-    void RemoveDatabase()
-    {
-        if ( ! m_tableName . empty () )
-        {
-            KDirectoryRemove ( m_wd, true, m_tableName . c_str () );
-        }
-    }
-
-    VCursor* MakeCursor()
-    {
-        const string schemaText =
-            "typedef ascii INSDC:dna:text;\n"
-            "typedef U32 INSDC:coord:len;\n"
-            "typedef U8 INSDC:SRA:xread_type;\n"
-            "table SEQUENCE #1\n"
-            "{\n"
-            "    column INSDC:dna:text READ;\n"
-            "    column INSDC:coord:len READ_LEN;\n"
-            "    column INSDC:SRA:xread_type READ_TYPE;\n"
-            "};\n"
-        ;
-        const char * schemaSpec = "SEQUENCE";
-
-        // make table
-        VSchema* schema;
-        THROW_ON_RC ( VDBManagerMakeSchema ( m_mgr, & schema ) );
-        THROW_ON_RC ( VSchemaParseText(schema, NULL, schemaText . c_str(), schemaText . size () ) );
-
-        THROW_ON_RC ( VDBManagerCreateTable ( m_mgr,
-                                              & m_table,
-                                              schema,
-                                              schemaSpec,
-                                              kcmInit + kcmMD5,
-                                              "%s",
-                                              m_tableName . c_str () ) );
-        THROW_ON_RC ( VSchemaRelease ( schema ) );
-
-        // make cursor
-        VCursor* ret;
-        THROW_ON_RC ( VTableCreateCursorWrite ( m_table, & ret, kcmInsert ) );
-
-        THROW_ON_RC ( VCursorAddColumn ( ret, & read_colIdx, "READ" ) );
-        THROW_ON_RC ( VCursorAddColumn ( ret, & read_len_colIdx, "READ_LEN" ) );
-        THROW_ON_RC ( VCursorAddColumn ( ret, & read_type_colIdx, "READ_TYPE" ) ); // 1 = biological
-
-        return ret;
-    }
-
-    void AddRow( VCursor* p_cursor, int64_t p_rowId, const string& p_read )
-    {
-        THROW_ON_RC ( VCursorSetRowId ( p_cursor, p_rowId ) );
-        THROW_ON_RC ( VCursorOpenRow ( p_cursor ) );
-        THROW_ON_RC ( VCursorWrite ( p_cursor, read_colIdx, 8, p_read.c_str(), 0, p_read.size() ) );
-        uint32_t u32=p_read.size();
-        THROW_ON_RC ( VCursorWrite ( p_cursor, read_len_colIdx, 32, &u32, 0, 1 ) );
-        uint8_t u8=1;
-        THROW_ON_RC ( VCursorWrite ( p_cursor, read_type_colIdx, 8, &u8, 0, 1 ) );
-        THROW_ON_RC ( VCursorCommitRow ( p_cursor ) );
-        THROW_ON_RC ( VCursorCloseRow ( p_cursor ) );
-        THROW_ON_RC ( VCursorFlushPage ( p_cursor ) );
-    }
-
-    KDirectory* m_wd;
-
-    VDBManager* m_mgr;
-    string m_tableName;
-
-    VTable* m_table;
-
-    uint32_t read_colIdx;
-    uint32_t read_len_colIdx;
-    uint32_t read_type_colIdx;
-};
-
-FIXTURE_TEST_CASE ( SparseFragmentBlobs, VDB_Fixture)
-{
-    RemoveDatabase();
-    m_tableName = ScratchDir + GetName();
-    VCursor* cursor = MakeCursor();
-
-    REQUIRE_RC ( VCursorOpen ( cursor ) );
-
-    // add rows, with sufficient gaps in between to create NULL blobs
-    AddRow ( cursor, 1, "ACGT" );
-    AddRow ( cursor, 10, "AACGT" );
-
-    REQUIRE_RC ( VCursorCommit ( cursor ) );
-    REQUIRE_RC ( VCursorRelease ( cursor ) );
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "ngs-make-db";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=NgsMakeDbSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/ngs/ngstest_reference.cpp b/test/ngs/ngstest_reference.cpp
deleted file mode 100644
index fd3f5d7..0000000
--- a/test/ngs/ngstest_reference.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for NGS C interface, reference accessions
-*/
-
-#include "ngs_c_fixture.hpp"
-#include <ktst/unit_test.hpp>
-#include "NGS_ReferenceSequence.h"
-#include "NGS_String.h"
-
-#include <string.h>
-
-using namespace std;
-using namespace ncbi::NK;
-
-TEST_SUITE(NgsReferenceTestSuite);
-
-FIXTURE_TEST_CASE(SRA_Reference_Open, NGS_C_Fixture)
-{
-    ENTRY;
-    const char* SRA_Reference = "NC_000001.10";
-    NGS_ReferenceSequence * ref = NGS_ReferenceSequenceMake ( ctx, SRA_Reference );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_NOT_NULL ( ref );
-    NGS_ReferenceSequenceRelease ( ref, ctx );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_Reference_Open_FailsOnNonReference, NGS_C_Fixture)
-{
-    ENTRY;
-    const char* SRA_Accession = "SRR000001";
-    REQUIRE_NULL ( NGS_ReferenceSequenceMake ( ctx, SRA_Accession ) );
-    REQUIRE_FAILED ();
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(EBI_Reference_Open_EBI_MD5, NGS_C_Fixture)
-{
-    ENTRY;
-    const char* EBI_Accession = "ffd6aeffb54ade3d28ec7644afada2e9";
-    NGS_ReferenceSequence * ref = NGS_ReferenceSequenceMake ( ctx, EBI_Accession );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_NOT_NULL ( ref );
-
-    NGS_String* bases = NGS_ReferenceSequenceGetBases ( ref, ctx, 4, 16 );
-    
-    REQUIRE ( strcmp (NGS_StringData ( bases, ctx ), "CTTTCTGACCGAAATT") == 0 );
-
-    REQUIRE_EQ ( NGS_ReferenceSequenceGetLength(ref, ctx), (uint64_t)784333 );
-
-    // to suppress the warning of unused function - call toString
-    toString ( bases, ctx );
-
-    NGS_StringRelease ( bases, ctx );
-    NGS_ReferenceSequenceRelease ( ref, ctx );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(EBI_Reference_Open_EBI_ACC, NGS_C_Fixture)
-{
-    ENTRY;
-    const char* EBI_Accession = "U12345.1";
-    NGS_ReferenceSequence * ref = NGS_ReferenceSequenceMake ( ctx, EBI_Accession );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_NOT_NULL ( ref );
-
-    NGS_String* bases = NGS_ReferenceSequenceGetBases ( ref, ctx, 4, 16 );
-    REQUIRE ( strcmp (NGS_StringData ( bases, ctx ), "CCGCTATCAATATACT") == 0 );
-
-    REQUIRE_EQ ( NGS_ReferenceSequenceGetLength(ref, ctx), (uint64_t)426 );
-
-    NGS_StringRelease ( bases, ctx );
-    NGS_ReferenceSequenceRelease ( ref, ctx );
-    EXIT;
-}
-
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-ngs_sra";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t m_coll=NgsReferenceTestSuite(argc, argv);
-    return m_coll;
-}
-
-}
-
diff --git a/test/ngs/ngstest_sra.cpp b/test/ngs/ngstest_sra.cpp
deleted file mode 100644
index 87f6687..0000000
--- a/test/ngs/ngstest_sra.cpp
+++ /dev/null
@@ -1,1065 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for NGS C interface, SRA archives
-*/
-
-#include <klib/debug.h> // KDbgSetString
-
-#include "ngs_c_fixture.hpp"
-#include <ktst/unit_test.hpp>
-
-#include "NGS_ReadCollection.h"
-#include "NGS_FragmentBlobIterator.h"
-#include "NGS_FragmentBlob.h"
-
-#include <kdb/manager.h>
-
-#include <vdb/manager.h>
-#include <vdb/vdb-priv.h>
-
-#include <klib/printf.h>
-
-#include <limits.h>
-
-using namespace std;
-using namespace ncbi::NK;
-
-TEST_SUITE(NgsSraTestSuite);
-
-const char* SRA_Accession = "SRR000001";
-const char* SRA_Accession_WithReadGroups = "SRR006061";
-uint64_t SRA_Accession_ReadCount = 470985;
-
-class SRA_Fixture : public NGS_C_Fixture { };
-
-// SRA_ReadCollection
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_Open, SRA_Fixture)
-{
-    ENTRY;
-    m_coll = NGS_ReadCollectionMake ( ctx, SRA_Accession );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_NOT_NULL ( m_coll );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_Open_FailsOnReference, SRA_Fixture)
-{
-    ENTRY;
-    const char* SRA_Reference = "NC_000001.10";
-    REQUIRE_NULL ( NGS_ReadCollectionMake ( ctx, SRA_Reference ) );
-    REQUIRE_FAILED ();
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetReadCount, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-    REQUIRE_EQ ( SRA_Accession_ReadCount, NGS_ReadCollectionGetReadCount ( m_coll, ctx, true, true, true ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetRead, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-    m_read = NGS_ReadCollectionGetRead ( m_coll, ctx, ReadId ( 1 ) . c_str () );
-    REQUIRE_NOT_NULL ( m_read );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetReads_All, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, true );
-    REQUIRE_NOT_NULL ( m_read );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetReads_Filtered_Aligned, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, false);
-    REQUIRE ( ! FAILED () && m_read );
-
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetReads_Filtered_Unaligned, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, false, false, true);
-    REQUIRE ( ! FAILED () && m_read );
-    uint64_t count = 0;
-    while ( NGS_ReadIteratorNext ( m_read, ctx ) )
-    {
-        REQUIRE ( NGS_ReadGetReadCategory ( m_read, ctx ) == NGS_ReadCategory_unaligned && ! FAILED () );
-        ++count;
-    }
-    REQUIRE_EQ ( SRA_Accession_ReadCount, count );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionGetReadRange, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-    m_read = NGS_ReadCollectionGetReadRange ( m_coll, ctx, 2, 3, true, true, true );
-    REQUIRE_NOT_NULL ( m_read );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionGetName, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-    REQUIRE_STRING ( SRA_Accession, NGS_ReadCollectionGetName ( m_coll, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionGetReferences, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    NGS_Reference * ref = NGS_ReadCollectionGetReferences ( m_coll, ctx );
-    REQUIRE ( ! FAILED () && ref );
-
-    REQUIRE_NULL ( NGS_ReferenceGetCommonName ( ref, ctx ) );
-    REQUIRE_FAILED();
-
-    REQUIRE ( ! NGS_ReferenceIteratorNext ( ref, ctx ) );
-
-    NGS_ReferenceRelease ( ref, ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionGetReference, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-    REQUIRE_NULL ( NGS_ReadCollectionGetReference ( m_coll, ctx, "wont find me anyways" ) );
-    REQUIRE_FAILED ();
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionGetAlignments, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    NGS_Alignment * align = NGS_ReadCollectionGetAlignments ( m_coll, ctx, true, true );
-    REQUIRE ( ! FAILED () && align );
-
-    REQUIRE_NULL ( NGS_AlignmentGetReferenceSpec ( align, ctx ) );
-    REQUIRE_FAILED ();
-
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( align, ctx ) );
-
-    NGS_AlignmentRelease ( align, ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionGetAlignment, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-    REQUIRE_NULL ( NGS_ReadCollectionGetAlignment ( m_coll, ctx, ReadId ( 1 ) . c_str () ) );
-    REQUIRE_FAILED ();
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionGetAlignmentCount, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-    REQUIRE_EQ ( (uint64_t)0, NGS_ReadCollectionGetAlignmentCount ( m_coll, ctx, true, true ) );
-    EXIT;
-}
-FIXTURE_TEST_CASE(SRA_ReadCollectionGetAlignmentRange, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    NGS_Alignment * align = NGS_ReadCollectionGetAlignmentRange ( m_coll, ctx, 1, 2, true, true );
-    REQUIRE ( ! FAILED () && align );
-
-    REQUIRE_NULL ( NGS_AlignmentGetReferenceSpec ( align, ctx ) );
-    REQUIRE_FAILED ();
-
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( align, ctx ) );
-
-    NGS_AlignmentRelease ( align, ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionGetReadGroups_NoGroups, SRA_Fixture)
-{   // in some SRA archives, a single read group including the whole run
-    ENTRY_ACC(SRA_Accession);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroups ( m_coll, ctx );
-    REQUIRE ( ! FAILED () && m_readGroup );
-
-    REQUIRE ( NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE ( ! NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionGetReadGroups_WithGroups, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession_WithReadGroups);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroups ( m_coll, ctx );
-    REQUIRE ( ! FAILED () && m_readGroup );
-
-    REQUIRE ( NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE ( NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-
-    // etc
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionGetReadGroup_NotFound, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-    REQUIRE_NULL ( NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "wontfindme" ) );
-    REQUIRE_FAILED ();
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionGetReadGroup_NoGroups_DefaultFound_ByEmptyString, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "" );
-    REQUIRE_NOT_NULL ( m_readGroup );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionGetReadGroup_WithGroups_DefaultFound, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession_WithReadGroups);
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "" );
-    REQUIRE_NOT_NULL ( m_readGroup );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionGetReadGroup_WithGroups_Found, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession_WithReadGroups);
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "S77_V2");
-    REQUIRE_NOT_NULL ( m_readGroup );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionHasReadGroup_NotFound, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-    REQUIRE ( ! NGS_ReadCollectionHasReadGroup ( m_coll, ctx, "wontfindme" ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionHasReadGroup_NoGroups_DefaultFound_ByEmptyString, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-    REQUIRE ( NGS_ReadCollectionHasReadGroup ( m_coll, ctx, "" ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionHasReadGroup_WithGroups_DefaultFound, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession_WithReadGroups);
-    REQUIRE ( NGS_ReadCollectionHasReadGroup ( m_coll, ctx, "" ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionHasReadGroup_WithGroups_Found, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession_WithReadGroups);
-    REQUIRE ( NGS_ReadCollectionHasReadGroup ( m_coll, ctx, "S77_V2") );
-    EXIT;
-}
-
-// NGS_Read
-
-FIXTURE_TEST_CASE(SRA_NGS_ReadGetReadName, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-    REQUIRE_STRING ( "EM7LVYS02FOYNU", NGS_ReadGetReadName ( m_read, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_ReadGetReadId, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-    REQUIRE_STRING ( ReadId ( 1 ), NGS_ReadGetReadId ( m_read, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_ReadGetReadGroup_Default, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-    REQUIRE_STRING ( "", NGS_ReadGetReadGroup ( m_read, ctx ));
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_ReadGetReadGroup, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession_WithReadGroups, 1);
-    REQUIRE_STRING ( "S103_V2", NGS_ReadGetReadGroup ( m_read, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_ReadGetReadCategory, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-
-    enum NGS_ReadCategory cat = NGS_ReadGetReadCategory ( m_read, ctx );
-    REQUIRE_EQ ( NGS_ReadCategory_unaligned, cat );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_ReadGetReadSequence_Full, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-
-    string expected (
-        "TCAGATTCTCCTAGCCTACATCCGTACGAGTTAGCGTGGGATTACGAGGTGCACACCATTTCATTCCGTACGGGTAAATT"
-        "TTTGTATTTTTAGCAGACGGCAGGGTTTCACCATGGTTGACCAACGTACTAATCTTGAACTCCTGACCTCAAGTGATTTG"
-        "CCTGCCTTCAGCCTCCCAAAGTGACTGGGTATTACAGATGTGAGCGAGTTTGTGCCCAAGCCTTATAAGTAAATTTATAA"
-        "ATTTACATAATTTAAATGACTTATGCTTAGCGAAATAGGGTAAG");
-    REQUIRE_STRING ( expected, NGS_ReadGetReadSequence ( m_read, ctx, 0, (size_t)-1 ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_ReadGetReadSequence_PartialNoLength, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-    string expected ("TGAGCGAGTTTGTGCCCAAGCCTTATAAGTAAATTTATAAATTTACATAATTTAAATGACTTATGCTTAGCGAAATAGGGTAAG" );
-    REQUIRE_STRING ( expected,  NGS_ReadGetReadSequence ( m_read, ctx, 200, (size_t)-1 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_ReadGetReadSequence_PartialLength, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-    string expected ("TGAGCGAGTT");
-    REQUIRE_STRING ( expected, NGS_ReadGetReadSequence ( m_read, ctx, 200, 10 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_ReadGetReadQualities_Full, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-
-    string expected (
-        "=<8<85)9=9/3-8?68<7=8<3657747==49==+;FB2;A;5:'*>69<:74)9.;C?+;<B<B;(<';FA/;C>*GC"
-        "8/%9<=GC8.#=2:5:16D==<EA2EA.;5=44<;2C=5;@73&<<2;5;6+9<?776+:24'26:7,<9A;=:;0C>*6"
-        "?7<<C=D=<52?:9CA2CA23<2<;3CA12:A<9414<7<<6;99<2/=9#<;9B at 27.;=6>:77>:1<A>+CA138?<"
-        ")C at 2166:A<B?->:%<<9<;33<;6?9;<;4=:%<$CA1+1%1");
-    REQUIRE_STRING ( expected, NGS_ReadGetReadQualities ( m_read, ctx, 0, (size_t)-1 ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_ReadGetReadQualities_PartialNoLength, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-    string expected ( "<6;99<2/=9#<;9B at 27.;=6>:77>:1<A>+CA138?<)C at 2166:A<B?->:%<<9<;33<;6?9;<;4=:%<$CA1+1%1" );
-    REQUIRE_STRING ( expected, NGS_ReadGetReadQualities ( m_read, ctx, 200, (size_t)-1 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_ReadGetReadQualities_PartialLength, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-    REQUIRE_STRING ( "<6;99<2/=9", NGS_ReadGetReadQualities ( m_read, ctx, 200, 10 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_ReadNumFragments, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-    uint32_t num = NGS_ReadNumFragments ( m_read, ctx );
-    REQUIRE_EQ ( (uint32_t)2, num );
-    EXIT;
-}
-
-// NGS_Fragment (through an NGS_Read object)
-FIXTURE_TEST_CASE(SRA_NGS_NoFragmentBeforeNext, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_read = NGS_ReadCollectionGetRead ( m_coll, ctx, ReadId ( 1 ) . c_str () );
-
-    // no access to a Fragment before a call to NGS_FragmentIteratorNext
-    REQUIRE_NULL ( NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_FragmentGetSequence ( (NGS_Fragment*)m_read, ctx, 0, 1 ) );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_FragmentGetQualities ( (NGS_Fragment*)m_read, ctx, 0, 1 ) );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_FragmentGetId, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-    REQUIRE_STRING ( string( SRA_Accession ) + ".FR0.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_FragmentGetSequence_Full, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-    string expected =
-        "ATTCTCCTAGCCTACATCCGTACGAGTTAGCGTGGGATTACGAGGTGCACACCATTTCATTCCGTACGGGTAAATTTTTG"
-        "TATTTTTAGCAGACGGCAGGGTTTCACCATGGTTGACCAACGTACTAATCTTGAACTCCTGACCTCAAGTGATTTGCCTG"
-        "CCTTCAGCCTCCCAAAGTGACTGGGTATTACAGATGTGAGCGAGTTTGTGCCCAAGCCTTATAAGTAAATTTAT"
-        "AAATTTACATAATTTAAATGACTTATGCTTAGCGAAATAGGGTAAG";
-    REQUIRE_STRING ( expected, NGS_FragmentGetSequence ( (NGS_Fragment*)m_read, ctx, 0, (size_t)-1 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_FragmentGetSequence_PartialNoLength, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-    REQUIRE_STRING (
-        "TATTTTTAGCAGACGGCAGGGTTTCACCATGGTTGACCAACGTACTAATCTTGAACTCCTGACCTCAAGTGATTTGCCTG"
-        "CCTTCAGCCTCCCAAAGTGACTGGGTATTACAGATGTGAGCGAGTTTGTGCCCAAGCCTTATAAGTAAATTTAT"
-        "AAATTTACATAATTTAAATGACTTATGCTTAGCGAAATAGGGTAAG",
-        NGS_FragmentGetSequence ( (NGS_Fragment*)m_read, ctx, 80, (size_t)-1 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_FragmentGetSequence_PartialLength, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-    REQUIRE_STRING ( "TATT",  NGS_FragmentGetSequence ( (NGS_Fragment*)m_read, ctx, 80, 4 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_FragmentGetQualities_Full, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-    string expected =
-        "85)9=9/3-8?68<7=8<3657747==49==+;FB2;A;5:'*>69<:74)9.;C?+;<B<B;(<';FA/;C>*GC8/%9"
-        "<=GC8.#=2:5:16D==<EA2EA.;5=44<;2C=5;@73&<<2;5;6+9<?776+:24'26:7,<9A;=:;0C>*6?7<<"
-        "C=D=<52?:9CA2CA23<2<;3CA12:A<9414<7<<6;99<2/=9#<;9B at 27.;=6>:77>:1<A>+CA138?<)C at 2"
-        "166:A<B?->:%<<9<;33<;6?9;<;4=:%<$CA1+1%1";
-    REQUIRE_STRING ( expected,  NGS_FragmentGetQualities ( (NGS_Fragment*)m_read, ctx, 0, (size_t)-1 ) );
-    EXIT;
-}
-
-// Iteration over Fragments
-FIXTURE_TEST_CASE(SRA_NGS_FragmentIteratorNext, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1); // calls NGS_FragmentIteratorNext
-
-    REQUIRE_STRING ( string ( SRA_Accession ) + ".FR0.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-    REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( string ( SRA_Accession ) + ".FR1.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-    REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_FragmentIterator_NullRead, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, false ); // will return an empty iterator
-    REQUIRE ( ! FAILED () );
-
-    NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_FragmentGetSequence ( (NGS_Fragment*)m_read, ctx, 0, 1 ) );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_FragmentGetQualities ( (NGS_Fragment*)m_read, ctx, 0, 1 ) );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_FragmentIteratorNext_BeyondEnd, SRA_Fixture)
-{
-    ENTRY_GET_READ(SRA_Accession, 1);
-
-    REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    // no access through the iterator after the end
-    NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_FragmentGetSequence ( (NGS_Fragment*)m_read, ctx, 0, 1 ) );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_FragmentGetQualities ( (NGS_Fragment*)m_read, ctx, 0, 1 ) );
-    REQUIRE_FAILED ();
-
-    REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-
-    EXIT;
-}
-
-// Iteration over Reads
-FIXTURE_TEST_CASE(SRA_ReadIterator_NoReadBeforeNext, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, true );
-    REQUIRE ( ! FAILED () && m_read );
-    // no access to a Read before a call to NGS_FragmentIteratorNext
-    REQUIRE_NULL ( NGS_ReadGetReadId ( m_read, ctx ) );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_ReadGetReadName ( m_read, ctx ) );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_ReadGetReadId ( m_read, ctx ) );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_ReadGetReadGroup ( m_read, ctx ) );
-    REQUIRE_FAILED ();
-    NGS_ReadGetReadCategory ( m_read, ctx );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_ReadGetReadSequence ( m_read, ctx, 0, 1 ) );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_ReadGetReadQualities ( m_read, ctx, 0, 1 ) );
-    REQUIRE_FAILED ();
-    NGS_ReadNumFragments ( m_read, ctx );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetReads_Next, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, true );
-    REQUIRE ( ! FAILED () && m_read );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    // on the first m_read
-    REQUIRE_STRING ( ReadId ( 1 ),  NGS_ReadGetReadId ( m_read, ctx ) );
-
-    {   // iterate over fragments
-        REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) ); // position on the first fragment
-        REQUIRE ( ! FAILED () );
-
-        REQUIRE_STRING ( string ( SRA_Accession ) + ".FR0.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-        REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-        REQUIRE ( ! FAILED () );
-
-        REQUIRE_STRING ( string ( SRA_Accession ) + ".FR1.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-        REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-        REQUIRE ( ! FAILED () );
-    }
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-    // on the second m_read
-    REQUIRE_STRING ( ReadId ( 2 ),  NGS_ReadGetReadId ( m_read, ctx ) );
-
-    {   // iterate over fragments
-        REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) ); // position on the first fragment
-        REQUIRE ( ! FAILED () );
-
-        REQUIRE_STRING ( string ( SRA_Accession ) + ".FR0.2", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-        REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-        REQUIRE ( ! FAILED () );
-
-        REQUIRE_STRING ( string ( SRA_Accession ) + ".FR1.2", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-        REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-        REQUIRE ( ! FAILED () );
-    }
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetReads_None, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, false );
-    REQUIRE ( ! FAILED () && m_read );
-
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_GetReadsIteratorNext_BeyondEnd, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, false ); // empty
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    // no access through the iterator after the end
-    REQUIRE_NULL ( NGS_ReadGetReadId ( m_read, ctx ) );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_ReadGetReadName ( m_read, ctx ) );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_ReadGetReadId ( m_read, ctx ) );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_ReadGetReadGroup ( m_read, ctx ) );
-    REQUIRE_FAILED ();
-    NGS_ReadGetReadCategory ( m_read, ctx );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_ReadGetReadSequence ( m_read, ctx, 0, 1 ) );
-    REQUIRE_FAILED ();
-    REQUIRE_NULL ( NGS_ReadGetReadQualities ( m_read, ctx, 0, 1 ) );
-    REQUIRE_FAILED ();
-    NGS_ReadNumFragments ( m_read, ctx );
-    REQUIRE_FAILED ();
-
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_NGS_ReadIteratorGetCount, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, true );
-
-    REQUIRE_EQ( SRA_Accession_ReadCount, NGS_ReadIteratorGetCount ( m_read, ctx ) );
-    // read count does not change after Next()
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE_EQ( SRA_Accession_ReadCount, NGS_ReadIteratorGetCount ( m_read, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetReads_NumFragments, SRA_Fixture)
-{    // bug report: NumFreagment increases with each call to NGS_ReadIteratorNext
-    ENTRY_ACC(SRA_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, true );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-
-    REQUIRE_STRING ( ReadId ( 1 ),  NGS_ReadGetReadId ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_EQ ( (uint32_t)2, NGS_ReadNumFragments ( m_read, ctx ) );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_EQ ( (uint32_t)2, NGS_ReadNumFragments ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    EXIT;
-}
-
-// Iteration over a range of Reads
-FIXTURE_TEST_CASE(SRA_ReadRange_NoReadBeforeNext, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_read = NGS_ReadCollectionGetReadRange ( m_coll, ctx, 3, 2, true, true, true );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_NOT_NULL ( m_read );
-    // no access to a Read before a call to NGS_FragmentIteratorNext
-    REQUIRE_NULL ( NGS_ReadGetReadId ( m_read, ctx ) );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetReadRange, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_read = NGS_ReadCollectionGetReadRange ( m_coll, ctx, 3, 2, true, true, true );
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( ReadId ( 3 ),  NGS_ReadGetReadId ( m_read, ctx ) );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( ReadId ( 4 ),  NGS_ReadGetReadId ( m_read, ctx ) );
-
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetReadRange_Empty, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_read = NGS_ReadCollectionGetReadRange ( m_coll, ctx, 6000000, 2, true, true, true );
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-
-    EXIT;
-}
-FIXTURE_TEST_CASE(SRA_ReadCollection_GetReadRange_Filtered, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_read = NGS_ReadCollectionGetReadRange ( m_coll, ctx, 1, 200000, true, true, false);
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-
-    EXIT;
-}
-
-// ReadGroup
-
-FIXTURE_TEST_CASE(SRA_ReadGroupGetName_Default, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "" );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( "", NGS_ReadGroupGetName ( m_readGroup, ctx ) );
-
-    EXIT;
-}
-
-#if READ_GROUP_SUPPORTS_READS
-FIXTURE_TEST_CASE(SRA_ReadGroupGetReads_NoGroups, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "" );
-
-    m_read = NGS_ReadGroupGetReads ( m_readGroup, ctx, true, true, true );
-    REQUIRE ( ! FAILED () && m_read );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( ReadId ( 1 ),  NGS_ReadGetReadId ( m_read, ctx ) );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( ReadId ( 2 ),  NGS_ReadGetReadId ( m_read, ctx ) );
-
-    EXIT;
-}
-#endif
-
-#if READ_GROUP_SUPPORTS_READS
-FIXTURE_TEST_CASE(SRA_ReadGroupGetReads_WithGroups, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession_WithReadGroups);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "S77_V2" );
-    REQUIRE ( ! FAILED () );
-
-    m_read = NGS_ReadGroupGetReads ( m_readGroup, ctx, true, true, true );
-    REQUIRE ( ! FAILED () && m_read );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( ReadId ( 29 ),  NGS_ReadGetReadId ( m_read, ctx ) );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( ReadId ( 30 ),  NGS_ReadGetReadId ( m_read, ctx ) );
-    // etc
-
-    EXIT;
-}
-#endif
-
-#if READ_GROUP_SUPPORTS_READS
-FIXTURE_TEST_CASE(SRA_ReadGroupGetReads_Filtered, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "" );
-
-    m_read = NGS_ReadGroupGetReads ( m_readGroup, ctx, true, true, false ); // no unaligned
-    REQUIRE ( ! FAILED () && m_read );
-
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) ); // no reads
-
-    EXIT;
-}
-#endif
-
-#if READ_GROUP_SUPPORTS_READS
-FIXTURE_TEST_CASE(SRA_ReadGroupGetRead, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "" );
-
-    m_read = NGS_ReadGroupGetRead ( m_readGroup, ctx, ReadId ( 1 ) . c_str () );
-    REQUIRE ( ! FAILED () && m_read );
-
-    REQUIRE_STRING ( ReadId ( 1 ),  NGS_ReadGetReadId ( m_read, ctx ) );
-
-    EXIT;
-}
-#endif
-
-#if READ_GROUP_SUPPORTS_READS
-FIXTURE_TEST_CASE(SRA_ReadGroupGetRead_WrongReadGroup, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession_WithReadGroups);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "S77_V2" ); // reads 29 through 125
-
-    REQUIRE_NULL ( NGS_ReadGroupGetRead ( m_readGroup, ctx, ReadId ( 126 ) . c_str () ) );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-#endif
-
-FIXTURE_TEST_CASE(SRA_ReadGroupGetStatistics_default, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession_WithReadGroups);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "" );
-    REQUIRE ( ! FAILED () );
-    NGS_Statistics * stats = NGS_ReadGroupGetStatistics ( m_readGroup, ctx );
-    REQUIRE ( ! FAILED () && stats );
-
-	NGS_StatisticsRelease ( stats, ctx );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadGroupGetStatistics_named, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession_WithReadGroups);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "S77_V2" ); // reads 29 through 125
-    REQUIRE ( ! FAILED () && m_readGroup );
-    NGS_Statistics * stats = NGS_ReadGroupGetStatistics ( m_readGroup, ctx );
-    REQUIRE ( ! FAILED () && stats );
-
-	NGS_StatisticsRelease ( stats, ctx );
-    EXIT;
-}
-
-
-// Iteration over ReadGroups
-
-FIXTURE_TEST_CASE(SRA_ReadGroupIterator_NoGroupBeforeNext, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroups ( m_coll, ctx );
-    REQUIRE ( ! FAILED () && m_readGroup );
-
-    REQUIRE_NULL ( NGS_ReadGroupGetName ( m_readGroup, ctx ) );
-    REQUIRE_FAILED ();
-
-#if READ_GROUP_SUPPORTS_READS
-    REQUIRE_NULL ( NGS_ReadGroupGetRead ( m_readGroup, ctx, ReadId ( 1 ) . c_str () ) );
-    REQUIRE_FAILED ();
-
-    REQUIRE_NULL ( NGS_ReadGroupGetReads ( m_readGroup, ctx, true, true, true ) );
-    REQUIRE_FAILED ();
-#endif
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadGroupIterator_NoGroups_AfterNext, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroups ( m_coll, ctx );
-    REQUIRE ( ! FAILED () && m_readGroup );
-
-    REQUIRE ( NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( "", NGS_ReadGroupGetName ( m_readGroup, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadGroupIterator_WithGroups_AfterNext, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession_WithReadGroups);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroups ( m_coll, ctx );
-    REQUIRE ( ! FAILED () && m_readGroup );
-
-    REQUIRE ( NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    // iteration is in the alphanumeric order, as stored in the metadata
-    REQUIRE_STRING ( "S100_V2", NGS_ReadGroupGetName ( m_readGroup, ctx ) );
-
-    REQUIRE ( NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( "S103_V2", NGS_ReadGroupGetName ( m_readGroup, ctx ) );
-
-    REQUIRE ( NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( "S104_V2", NGS_ReadGroupGetName ( m_readGroup, ctx ) );
-
-    // etc
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadGroupIterator_BeyondEnd, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroups ( m_coll, ctx );
-    REQUIRE ( ! FAILED () && m_readGroup );
-
-    REQUIRE ( NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE ( ! NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_NULL ( NGS_ReadGroupGetName ( m_readGroup, ctx ) );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-
-// Statistics
-
-FIXTURE_TEST_CASE(SRA_ReadCollectionGetStatistics, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession_WithReadGroups);
-
-    NGS_Statistics * stats = NGS_ReadCollectionGetStatistics ( m_coll, ctx );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_EQ ( (uint64_t)132958771,   NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)114588308,   NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/BIO_BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)496499,      NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/SPOT_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)496499,      NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/SPOT_MAX" ) );
-    REQUIRE_EQ ( (uint64_t)1,           NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/SPOT_MIN" ) );
-
-    NGS_StatisticsRelease ( stats, ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRA_ReadGroupGetStatistics, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession_WithReadGroups);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "S77_V2" );
-    REQUIRE ( ! FAILED () );
-
-    NGS_Statistics * stats = NGS_ReadGroupGetStatistics ( m_readGroup, ctx );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_EQ ( (uint64_t)25920,   NGS_StatisticsGetAsU64 ( stats, ctx, "BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)22331,   NGS_StatisticsGetAsU64 ( stats, ctx, "BIO_BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)97,      NGS_StatisticsGetAsU64 ( stats, ctx, "SPOT_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)125,     NGS_StatisticsGetAsU64 ( stats, ctx, "SPOT_MAX" ) );
-    REQUIRE_EQ ( (uint64_t)29,      NGS_StatisticsGetAsU64 ( stats, ctx, "SPOT_MIN" ) );
-
-    NGS_StatisticsRelease ( stats, ctx );
-
-    EXIT;
-}
-
-// Fragment Blobs
-
-FIXTURE_TEST_CASE(SRA_GetFragmentBlobs, SRA_Fixture)
-{
-    ENTRY_ACC(SRA_Accession);
-
-    NGS_FragmentBlobIterator* blobIt = NGS_ReadCollectionGetFragmentBlobs ( m_coll, ctx );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_NOT_NULL ( blobIt );
-
-    NGS_FragmentBlob* blob = NGS_FragmentBlobIteratorNext ( blobIt, ctx );
-
-    REQUIRE_EQ ( (uint64_t)1080, NGS_FragmentBlobSize ( blob, ctx ) );
-
-    NGS_FragmentBlobIteratorRelease ( blobIt, ctx );
-
-    EXIT;
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-ngs_sra";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    //assert(!KDbgSetString("KFG"));
-    //assert(!KDbgSetString("VFS"));
-    rc_t m_coll=NgsSraTestSuite(argc, argv);
-    return m_coll;
-}
-
-}
-
diff --git a/test/ngs/ngstest_sradb.cpp b/test/ngs/ngstest_sradb.cpp
deleted file mode 100644
index 9b71717..0000000
--- a/test/ngs/ngstest_sradb.cpp
+++ /dev/null
@@ -1,866 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for NGS C interface, SRADB archives
-*/
-
-#include "ngs_c_fixture.hpp"
-
-#include <limits.h>
-
-#include <klib/printf.h>
-
-#include <kdb/manager.h>
-
-#include <vdb/manager.h>
-#include <vdb/vdb-priv.h>
-
-#include "NGS_FragmentBlobIterator.h"
-#include "NGS_FragmentBlob.h"
-
-using namespace std;
-using namespace ncbi::NK;
-
-TEST_SUITE(NgsSradbTestSuite);
-
-const char* SRADB_Accession = "SRR600096";
-uint64_t SRADB_Accession_ReadCount = 16;
-
-class SRADB_Fixture : public NGS_C_Fixture {};
-
-// SRADB_ReadCollection
-FIXTURE_TEST_CASE(SRADB_ReadCollection_Open, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    REQUIRE_NOT_NULL ( m_coll);
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetReadCount, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    REQUIRE_EQ ( SRADB_Accession_ReadCount, NGS_ReadCollectionGetReadCount ( m_coll, ctx, true, true, true ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetRead, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    m_read = NGS_ReadCollectionGetRead ( m_coll, ctx, ReadId ( 1 ) . c_str () );
-    REQUIRE_NOT_NULL ( m_read );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetReads, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, true );
-    REQUIRE_NOT_NULL ( m_read );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetReads_Filtered_Aligned, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, false);
-    REQUIRE ( ! FAILED () && m_read );
-
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetReads_Filtered_Unaligned, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, false, false, true);
-    REQUIRE ( ! FAILED () && m_read );
-
-    uint64_t count = 0;
-    while ( NGS_ReadIteratorNext ( m_read, ctx ) )
-    {
-        REQUIRE ( NGS_ReadGetReadCategory ( m_read, ctx ) == NGS_ReadCategory_unaligned && ! FAILED () );
-        ++count;
-    }
-    REQUIRE_EQ ( SRADB_Accession_ReadCount, count );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollectionGetReadRange, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    m_read = NGS_ReadCollectionGetReadRange ( m_coll, ctx, 2, 3, true, true, true );
-    REQUIRE_NOT_NULL ( m_read );
-    EXIT;
-}
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetReadRange_Filtered, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_read = NGS_ReadCollectionGetReadRange ( m_coll, ctx, 1, 200000, true, true, false);
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollectionGetName, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    REQUIRE_STRING ( SRADB_Accession, NGS_ReadCollectionGetName ( m_coll, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollectionGetReferences, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    NGS_Reference* ref = NGS_ReadCollectionGetReferences ( m_coll, ctx );
-    REQUIRE ( ! FAILED () && ref);
-
-    REQUIRE_NULL ( NGS_ReferenceGetCommonName ( ref, ctx ) );
-    REQUIRE_FAILED ();
-
-    REQUIRE ( ! NGS_ReferenceIteratorNext ( ref, ctx ) );
-
-    NGS_ReferenceRelease ( ref, ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollectionGetReference, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    REQUIRE_NULL ( NGS_ReadCollectionGetReference ( m_coll, ctx, "wont find me anyways" ) );
-    REQUIRE_FAILED ();
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollectionGetAlignments, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    NGS_Alignment* align = NGS_ReadCollectionGetAlignments ( m_coll, ctx, true, true );
-    REQUIRE ( ! FAILED () && align );
-
-    REQUIRE_NULL ( NGS_AlignmentGetReferenceSpec ( align, ctx ) );
-    REQUIRE_FAILED ();
-
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( align, ctx ) );
-
-    NGS_AlignmentRelease ( align, ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollectionGetAlignment, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    REQUIRE_NULL ( NGS_ReadCollectionGetAlignment ( m_coll, ctx, "1" ) );
-    REQUIRE_FAILED ();
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollectionGetAlignmentCount, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    REQUIRE_EQ ( (uint64_t)0, NGS_ReadCollectionGetAlignmentCount ( m_coll, ctx, true, true ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollectionGetAlignmentRange, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    NGS_Alignment* align = NGS_ReadCollectionGetAlignmentRange ( m_coll, ctx, 1, 2, true, true );
-    REQUIRE ( ! FAILED () && align);
-
-    REQUIRE_NULL ( NGS_AlignmentGetReferenceSpec ( align, ctx ) );
-    REQUIRE_FAILED ();
-
-    REQUIRE ( ! NGS_AlignmentIteratorNext ( align, ctx ) );
-
-    NGS_AlignmentRelease ( align, ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollectionGetReadGroups, SRADB_Fixture)
-{   // in SRADB archives, a single read group including the whole run
-    ENTRY_ACC(SRADB_Accession);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroups ( m_coll, ctx );
-    REQUIRE ( ! FAILED () && m_readGroup );
-
-    REQUIRE ( NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE ( ! NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollectionGetReadGroup_NotFound, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    REQUIRE_NULL ( NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "wontfindme" ) );
-    REQUIRE_FAILED ();
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollectionGetReadGroup_Found, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "A1DLC.1" );
-    REQUIRE_NOT_NULL ( m_readGroup );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollectionHasReadGroup_NotFound, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    REQUIRE ( ! NGS_ReadCollectionHasReadGroup ( m_coll, ctx, "wontfindme" ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollectionHasReadGroup_Found, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    REQUIRE ( NGS_ReadCollectionHasReadGroup ( m_coll, ctx, "A1DLC.1" ) );
-    EXIT;
-}
-
-// NGS_Read
-
-FIXTURE_TEST_CASE(SRADB_NGS_ReadGetReadName, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-    REQUIRE_STRING ( string ( "1" ),  NGS_ReadGetReadName ( m_read, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_ReadGetReadId, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-    REQUIRE_STRING ( ReadId ( 1 ), NGS_ReadGetReadId ( m_read, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_ReadGetReadGroup, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-    REQUIRE_STRING ( string ( "A1DLC.1" ),  NGS_ReadGetReadGroup ( m_read, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_ReadGetReadCategory, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-
-    enum NGS_ReadCategory cat = NGS_ReadGetReadCategory ( m_read, ctx );
-    REQUIRE_EQ ( NGS_ReadCategory_unaligned, cat );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_ReadGetReadSequence_Full, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-
-    string expected (
-        "TACGGAGGGGGCTAGCGTTGCTCGGAATTACTGGGCGTAAAGGGCGCGTAGGCGGACAGTTAAGTCGGGGGTGAAAGCCCCGGGCTCAACCTCGGAATTG"
-        "CCTTCGATACTGGCTGGCTTGAGTACGGTAGAGGGGGGTGGAACTCCTAGTGTAGAGGTGAAATTCGTAGAGATTCCTGTTTGCTCCCCACGCTTTCGCG"
-        "CCTCAGCGTCAGTAACGGTCCAGTGTGTCGCCTTCGCCACTGGTACTCTTCCTGCTATCTACGCATCTCATTCTACACACGTCGCGCGCCACACCTCTCT"
-        "AACACACGTGACACAGCCACTCTCTGCCGTTACTTCGCTGCTCTGCCGCC"
-    );
-    REQUIRE_STRING( expected,  NGS_ReadGetReadSequence ( m_read, ctx, 0, (size_t)-1 ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_ReadGetReadSequence_PartialNoLength, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-    string expected ("AACACACGTGACACAGCCACTCTCTGCCGTTACTTCGCTGCTCTGCCGCC");
-    REQUIRE_STRING( expected,  NGS_ReadGetReadSequence ( m_read, ctx, 300, (size_t)-1 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_ReadGetReadSequence_PartialLength, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-    REQUIRE_STRING ( "AACACA",  NGS_ReadGetReadSequence ( m_read, ctx, 300, 6 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_ReadGetReadQualities_Full, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-
-    string expected(
-        "====,<==@7<@<@@@CEE=CCEECCEEEEFFFFEECCCEEF=EEDDCCDCEEDDDDDEEEEDDEE*=))9;;=EE(;?E(4;<<;<<EEEE;--'9<;?"
-        "EEE=;E=EE<E=EE<9(9EE;(6<?E#################################################?????BBBBDDDDDBBDEEFFFEE7"
-        "CHH58E=EECCEG///75,5CF-5A5-5C at FEEDFDEE:E--55----5,@@@,,5,5@=?7?#####################################"
-        "##################################################"
-    );
-    REQUIRE_STRING ( expected,  NGS_ReadGetReadQualities ( m_read, ctx, 0, (size_t)-1 ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_ReadGetReadQualities_PartialNoLength, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-    string expected("##################################################");
-    REQUIRE_STRING ( expected,  NGS_ReadGetReadQualities ( m_read, ctx, 300, (size_t)-1 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_ReadGetReadQualities_PartialLength, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-    REQUIRE_STRING ( "CHH58E=EEC",  NGS_ReadGetReadQualities ( m_read, ctx, 200, 10 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_ReadNumFragments, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-
-    uint32_t num = NGS_ReadNumFragments ( m_read, ctx );
-    REQUIRE_EQ ( (uint32_t)2, num );
-
-    EXIT;
-}
-
-// NGS_Fragment (through an NGS_Read object)
-FIXTURE_TEST_CASE(SRADB_NGS_NoFragmentBeforeNext, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_read = NGS_ReadCollectionGetRead ( m_coll, ctx, ReadId ( 1 ) . c_str () );
-    REQUIRE ( ! FAILED () );
-    // no access to a Fragment before a call to NGS_FragmentIteratorNext
-    REQUIRE_NULL ( NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_FragmentGetId, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-    REQUIRE_STRING ( string( SRADB_Accession ) + ".FR0.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_FragmentGetSequence_Full, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-
-    REQUIRE ( ! FAILED () );
-    string expected(
-        "TACGGAGGGGGCTAGCGTTGCTCGGAATTACTGGGCGTAAAGGGCGCGTAGGCGGACAGTTAAGTCGGGGGTGAAAGCCCCGGGCTCAACCTCGGAATTG"
-        "CCTTCGATACTGGCTGGCTTGAGTACGGTAGAGGGGGGTGGAACTCCTAGTGTAGAGGTGAAATTCGTAGAGATT"
-    );
-    REQUIRE_STRING ( expected,  NGS_FragmentGetSequence ( (NGS_Fragment*)m_read, ctx, 0, (size_t)-1 ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_FragmentGetSequence_PartialNoLength, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-    string expected = "CCTTCGATACTGGCTGGCTTGAGTACGGTAGAGGGGGGTGGAACTCCTAGTGTAGAGGTGAAATTCGTAGAGATT";
-    REQUIRE_STRING ( expected,  NGS_FragmentGetSequence ( (NGS_Fragment*)m_read, ctx, 100, (size_t)-1 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_FragmentGetSequence_PartialLength, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-    REQUIRE_STRING ( "CCTT",  NGS_FragmentGetSequence ( (NGS_Fragment*)m_read, ctx, 100, 4 ) );
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_FragmentGetQualities_Full, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-
-    string expected(
-        "====,<==@7<@<@@@CEE=CCEECCEEEEFFFFEECCCEEF=EEDDCCDCEEDDDDDEEEEDDEE*=))9;;=EE(;?E(4;<<;<<EEEE;--'9<;?"
-        "EEE=;E=EE<E=EE<9(9EE;(6<?E#################################################"
-    );
-    REQUIRE_STRING ( expected,  NGS_FragmentGetQualities ( (NGS_Fragment*)m_read, ctx, 0, (size_t)-1 ) );
-
-    EXIT;
-}
-
-// Iteration over Fragments
-FIXTURE_TEST_CASE(SRADB_NGS_FragmentIteratorNext, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1); // calls NGS_FragmentIteratorNext
-
-    REQUIRE_STRING ( string( SRADB_Accession ) + ".FR0.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-    REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( string( SRADB_Accession ) + ".FR1.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-    REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_FragmentIteratorNext_NullRead, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, false ); // will return an empty iterator
-    REQUIRE ( ! FAILED () );
-
-    NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_FragmentIteratorNext_BeyondEnd, SRADB_Fixture)
-{
-    ENTRY_GET_READ(SRADB_Accession, 1);
-
-    REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-
-    EXIT;
-}
-
-// Iteration over Reads
-FIXTURE_TEST_CASE(SRADB_ReadIterator_NoReadBeforeNext, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, true );
-    REQUIRE ( ! FAILED () && m_read );
-    // no access to a Read before a call to NGS_FragmentIteratorNext
-    REQUIRE_NULL ( NGS_ReadGetReadId ( m_read, ctx ) );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetReads_Next, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, true );
-    REQUIRE ( ! FAILED () && m_read );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    // on the first m_read
-    REQUIRE_STRING ( ReadId ( 1 ), NGS_ReadGetReadId ( m_read, ctx ) );
-
-    {   // iterate over fragments
-        REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) ); // position on the first fragment
-        REQUIRE ( ! FAILED () );
-
-        REQUIRE_STRING ( string( SRADB_Accession ) + ".FR0.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-        REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-        REQUIRE ( ! FAILED () );
-
-        REQUIRE_STRING ( string( SRADB_Accession ) + ".FR1.1", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-        REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-        REQUIRE ( ! FAILED () );
-    }
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-    // on the second m_read
-    REQUIRE_STRING ( ReadId ( 2 ), NGS_ReadGetReadId ( m_read, ctx ) );
-
-    {   // iterate over fragments
-        REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) ); // position on the first fragment
-        REQUIRE ( ! FAILED () );
-
-        REQUIRE_STRING ( string( SRADB_Accession ) + ".FR0.2", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-        REQUIRE ( NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-        REQUIRE ( ! FAILED () );
-
-        REQUIRE_STRING ( string( SRADB_Accession ) + ".FR1.2", NGS_FragmentGetId ( (NGS_Fragment*)m_read, ctx ) );
-
-        REQUIRE ( ! NGS_FragmentIteratorNext ( (NGS_Fragment*)m_read, ctx ) );
-        REQUIRE ( ! FAILED () );
-    }
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetReads_All, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, true );
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-    // on the first m_read
-    string id = toString ( NGS_ReadGetReadId ( m_read, ctx ), ctx, true );
-    while ( NGS_ReadIteratorNext ( m_read, ctx ) )
-    {
-        REQUIRE ( ! FAILED () );
-        id = toString ( NGS_ReadGetReadId ( m_read, ctx ), ctx, true );
-        REQUIRE ( ! FAILED () );
-    }
-    REQUIRE_EQ ( ReadId ( SRADB_Accession_ReadCount ), id );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetReads_None, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, false );
-    REQUIRE ( ! FAILED () && m_read );
-
-    NGS_ReadGetReadId ( m_read, ctx );
-    REQUIRE_FAILED ();
-
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_NGS_GetReadsIteratorNext_BeyondEnd, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, false ); // empty
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-
-    EXIT;
-}
-
-// Iteration over a range of Reads
-FIXTURE_TEST_CASE(SRADB_ReadRange_NoReadBeforeNext, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_read = NGS_ReadCollectionGetReadRange ( m_coll, ctx, 3, 2, true, true, true );
-    REQUIRE ( ! FAILED () && m_read );
-    // no access to a Read before a call to NGS_FragmentIteratorNext
-    REQUIRE_NULL ( NGS_ReadGetReadId ( m_read, ctx ) );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetReadRange, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_read = NGS_ReadCollectionGetReadRange ( m_coll, ctx, 3, 2, true, true, true );
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( ReadId ( 3 ), NGS_ReadGetReadId ( m_read, ctx ) );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( ReadId ( 4 ), NGS_ReadGetReadId ( m_read, ctx ) );
-
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadCollection_GetReadRange_Empty, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_read = NGS_ReadCollectionGetReadRange ( m_coll, ctx, 6000000, 2, true, true, true );
-    REQUIRE ( ! FAILED () );
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) );
-
-    EXIT;
-}
-
-// ReadGroup
-
-FIXTURE_TEST_CASE(SRA_ReadGroupGetName, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "A1DLC.1" );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( "A1DLC.1", NGS_ReadGroupGetName ( m_readGroup, ctx ) );
-
-    EXIT;
-}
-
-
-#if READ_GROUP_SUPPORTS_READS
-FIXTURE_TEST_CASE(SRA_ReadGroupGetReads, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "A1DLC.1" );
-
-    m_read = NGS_ReadGroupGetReads ( m_readGroup, ctx, true, true, true );
-    REQUIRE ( ! FAILED () && m_read );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( ReadId ( 1 ), NGS_ReadGetReadId ( m_read, ctx ) );
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_STRING ( ReadId ( 2 ), NGS_ReadGetReadId ( m_read, ctx ) );
-
-    EXIT;
-}
-#endif
-
-#if READ_GROUP_SUPPORTS_READS
-FIXTURE_TEST_CASE(SRA_ReadGroupGetReads_Filtered, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "A1DLC.1" );
-
-    m_read = NGS_ReadGroupGetReads ( m_readGroup, ctx, true, true, false ); // no unaligned
-    REQUIRE ( ! FAILED () && m_read );
-
-    REQUIRE ( ! NGS_ReadIteratorNext ( m_read, ctx ) ); // no reads
-
-    EXIT;
-}
-#endif
-
-#if READ_GROUP_SUPPORTS_READS
-FIXTURE_TEST_CASE(SRA_ReadGroupGetRead, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "A1DLC.1" );
-
-    m_read = NGS_ReadGroupGetRead ( m_readGroup, ctx, ReadId ( 3 ) . c_str () );
-    REQUIRE ( ! FAILED () && m_read );
-
-    REQUIRE_STRING ( ReadId ( 3 ), NGS_ReadGetReadId ( m_read, ctx ) );
-
-    EXIT;
-}
-#endif
-
-// Iteration over ReadGroups
-
-FIXTURE_TEST_CASE(SRADB_ReadGroupIterator_NoGroupBeforeNext, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    m_readGroup = NGS_ReadCollectionGetReadGroups ( m_coll, ctx );
-
-    REQUIRE_NULL ( NGS_ReadGroupGetName ( m_readGroup, ctx ) );
-    REQUIRE_FAILED ();
-
-#if READ_GROUP_SUPPORTS_READS
-    REQUIRE_NULL ( NGS_ReadGroupGetRead ( m_readGroup, ctx, ReadId ( 3 ) . c_str () ) );
-    REQUIRE_FAILED ();
-
-    REQUIRE_NULL ( NGS_ReadGroupGetReads ( m_readGroup, ctx, true, true, true ) );
-    REQUIRE_FAILED ();
-#endif
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadGroupIterator_AfterNext, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    m_readGroup = NGS_ReadCollectionGetReadGroups ( m_coll, ctx );
-
-    REQUIRE ( NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_STRING ( "A1DLC.1", NGS_ReadGroupGetName ( m_readGroup, ctx ) );
-
-    EXIT;
-}
-
-
-FIXTURE_TEST_CASE(SRADB_ReadGroupIterator_BeyondEnd, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-    m_readGroup = NGS_ReadCollectionGetReadGroups ( m_coll, ctx );
-    REQUIRE ( NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-
-    REQUIRE ( ! NGS_ReadGroupIteratorNext ( m_readGroup, ctx ) );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_NULL ( NGS_ReadGroupGetName ( m_readGroup, ctx ) );
-    REQUIRE_FAILED ();
-
-    EXIT;
-}
-
-// Statistics
-FIXTURE_TEST_CASE(SRADB_ReadCollectionGetStatistics, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    NGS_Statistics * stats = NGS_ReadCollectionGetStatistics ( m_coll, ctx );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_EQ ( (uint64_t)5600,    NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)5600,    NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/BIO_BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)16,      NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/SPOT_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)16,      NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/SPOT_MAX" ) );
-    REQUIRE_EQ ( (uint64_t)1,       NGS_StatisticsGetAsU64 ( stats, ctx, "SEQUENCE/SPOT_MIN" ) );
-
-    const char* bam =
-        "@HD\tVN:1.0\tSO:queryname\n"
-        "@RG\tID:A1DLC.1\tPL:illumina\tPU:A1DLC120809.1.AATGAGCCCACG\tLB:Solexa-112136\tPI:393\tDT:2012-08-09T00:00:00-0400\tSM:12341_SN_05_1\tCN:BI\n"
-        "@PG\tID:bwa.negative.screen\tPN:bwa\tVN:0.5.9-tpx\tCL:bwa aln Screening.negative.Homo_sapiens_GRCh37.1_p5.fasta"
-        " -q 5 -l 32 -k 2 -t $NSLOTS -o 1 -f illuminaReadGroupBamScreening.G21523.A1DLC120809.1.Illumina_P7-Bonijeci.BI6212661.negative.Screening.negative.Homo_sapiens_GRCh37.1_p5.2.sai"
-        " illuminaReadGroupBamScreening.G21523.A1DLC120809.1.Illumina_P7-Bonijeci.BI6212661.negative.2.fastq.gz; bwa aln Screening.negative.Homo_sapiens_GRCh37.1_p5.fasta -q 5 -l 32 -k 2"
-        " -t $NSLOTS -o 1 -f illuminaReadGroupBamScreening.G21523.A1DLC120809.1.Illumina_P7-Bonijeci.BI6212661.negative.Screening.negative.Homo_sapiens_GRCh37.1_p5.1.sai"
-        " illuminaReadGroupBamScreening.G21523.A1DLC120809.1.Illumina_P7-Bonijeci.BI6212661.negative.1.fastq.gz; bwa sampe -t $NSLOTS -T -P -a 589 -f"
-        " illuminaReadGroupBamScreening.G21523.A1DLC120809.1.Illumina_P7-Bonijeci.BI6212661.negative.Screening.negative.Homo_sapiens_GRCh37.1_p5.aligned_bwa.sam"
-        " Screening.negative.Homo_sapiens_GRCh37.1_p5.fasta illuminaReadGroupBamScreening.G21523.A1DLC120809.1.Illumina_P7-Bonijeci.BI6212661.negative.Screening.negative.Homo_sapiens_GRCh37.1_p5.1.sai"
-        " illuminaReadGroupBamScreening.G21523.A1DLC120809.1.Illumina_P7-Bonijeci.BI6212661.negative.Screening.negative.Homo_sapiens_GRCh37.1_p5.2.sai"
-        " illuminaReadGroupBamScreening.G21523.A1DLC120809.1.Illumina_P7-Bonijeci.BI6212661.negative.1.fastq.gz illuminaReadGroupBamScreening.G21523.A1DLC120809.1.Illumina_P7-Bonijeci.BI6212661.negative.2.fastq.gz\n";
-
-    REQUIRE_STRING ( string ( bam ), NGS_StatisticsGetAsString ( stats, ctx, "BAM_HEADER" ) );
-
-    NGS_StatisticsRelease ( stats, ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(SRADB_ReadGroupGetStatistics, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    m_readGroup = NGS_ReadCollectionGetReadGroup ( m_coll, ctx, "A1DLC.1" );
-    REQUIRE ( ! FAILED () );
-
-    NGS_Statistics * stats = NGS_ReadGroupGetStatistics ( m_readGroup, ctx );
-    REQUIRE ( ! FAILED () );
-
-    REQUIRE_EQ ( (uint64_t)5600,    NGS_StatisticsGetAsU64 ( stats, ctx, "BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)5600,    NGS_StatisticsGetAsU64 ( stats, ctx, "BIO_BASE_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)16,      NGS_StatisticsGetAsU64 ( stats, ctx, "SPOT_COUNT" ) );
-    REQUIRE_EQ ( (uint64_t)16,      NGS_StatisticsGetAsU64 ( stats, ctx, "SPOT_MAX" ) );
-    REQUIRE_EQ ( (uint64_t)1,       NGS_StatisticsGetAsU64 ( stats, ctx, "SPOT_MIN" ) );
-
-    NGS_StatisticsRelease ( stats, ctx );
-
-    EXIT;
-}
-
-FIXTURE_TEST_CASE(PACBIO_ThrowsOnGetReadId, SRADB_Fixture)
-{   // VDB-2668
-    ENTRY_ACC("SRR287782");
-
-    m_read = NGS_ReadCollectionGetReads ( m_coll, ctx, true, true, true );
-    REQUIRE_NOT_NULL ( m_read );
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE_STRING ( "SRR287782.R.1", NGS_ReadGetReadName ( m_read, ctx ) ); // VDB-2668: throws "no NAME-column found"
-
-    REQUIRE ( NGS_ReadIteratorNext ( m_read, ctx ) );
-    REQUIRE_STRING ( "SRR287782.R.2", NGS_ReadGetReadName ( m_read, ctx ) ); // VDB-2668, review: does not update on Next
-
-    EXIT;
-}
-
-// Fragment Blobs
-
-FIXTURE_TEST_CASE(SRADB_GetFragmentBlobs, SRADB_Fixture)
-{
-    ENTRY_ACC(SRADB_Accession);
-
-    NGS_FragmentBlobIterator* blobIt = NGS_ReadCollectionGetFragmentBlobs ( m_coll, ctx );
-    REQUIRE ( ! FAILED () );
-    REQUIRE_NOT_NULL ( blobIt );
-
-    NGS_FragmentBlob* blob = NGS_FragmentBlobIteratorNext ( blobIt, ctx );
-
-    REQUIRE_EQ ( (uint64_t)5600, NGS_FragmentBlobSize ( blob, ctx ) );
-
-    NGS_FragmentBlobRelease ( blob, ctx );
-    NGS_FragmentBlobIteratorRelease ( blobIt, ctx );
-
-    EXIT;
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-ngs_sra";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t m_coll=NgsSradbTestSuite(argc, argv);
-    return m_coll;
-}
-
-}
-
diff --git a/test/ngs/valgrind.suppress b/test/ngs/valgrind.suppress
deleted file mode 100644
index 929ce5b..0000000
--- a/test/ngs/valgrind.suppress
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-   static_cached_KDirectory_in_KConfig_find_home_directory
-   Memcheck:Leak
-    ...
-   fun:find_home_directory
-}
-{
-   first_time_ctx_recover
-   Memcheck:Leak
-   ...
-   fun:KConfigMake
-   fun:rsrc_init
-   fun:KRsrcGlobalInit
-   fun:get_tls_ctx
-   fun:ctx_recover
-}
\ No newline at end of file
diff --git a/test/pileup-stats/Makefile b/test/pileup-stats/Makefile
new file mode 100644
index 0000000..cd8b3f6
--- /dev/null
+++ b/test/pileup-stats/Makefile
@@ -0,0 +1,66 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/pileup-stats
+
+TEST_TOOLS = \
+
+ALL_TOOLS = \
+	$(TEST_TOOLS) \
+
+include $(TOP)/build/Makefile.env
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
+
+runtests: pileup-stats ignore-args
+
+#-------------------------------------------------------------------------------
+# pileup-stats tool tests
+#
+
+pileup-stats: $(BINDIR)/pileup-stats
+	@ # The line below is the test for --version output. Yes, this is ridiculous to make tests like this (especially the one depending on the path to the sources of the binary being tested) but Anatoly insisted on it here: VDB-2837
+	@ $(BINDIR)/pileup-stats -V | sed -e 's/\([1-9][0-9]*\)\.0\.0/\1/' -e 's/\([1-9][0-9]*\.[1-9][0-9]*\)\.0/\1/' -e 's/\([1-9][0-9]*\.[0-9][0-9]*\.[1-9][0-9]*\)/\1/' | grep --quiet "$(shell head -n 1 $(TOP)/tools/pileup-stats/pileup-stats.vers)[^0-9\.]"
+
+slowtests: optional-column-ref-offset-type
+
+optional-column-ref-offset-type:
+	@ $(BINDIR)/pileup-stats --align-category primary ERR085308 >/dev/null
+
+vg: $(BINDIR)/pileup-stats
+	@ # TODO: a better command line options should be chosen to test for memory leaks
+	valgrind --ncbi --suppressions=$(SRCDIR)/valgrind.suppress $(BINDIR)/pileup-stats -V
+
+ignore-args: test-ignore-args.sh
+	@ echo "starting test-ignore-args..."
+	@ bash test-ignore-args.sh
\ No newline at end of file
diff --git a/test/pileup-stats/test-ignore-args.sh b/test/pileup-stats/test-ignore-args.sh
new file mode 100644
index 0000000..364a860
--- /dev/null
+++ b/test/pileup-stats/test-ignore-args.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+test_ignore_args ()
+{
+    if ! pileup-stats -L 1 2> /dev/null
+    then
+        echo $?...test failed on option -L
+    fi
+
+    if ! pileup-stats -z ignore.txt 2> /dev/null
+    then
+        echo $?...test failed on option -z
+    fi
+
+    if ! pileup-stats --log-level 1 2> /dev/null
+    then
+        echo $?...test failed on option --log-level
+    fi
+
+    if ! pileup-stats --xml-log ignore.txt 2> /dev/null
+    then
+        echo $?...test failed on option --xml-log
+    fi
+
+    if ! pileup-stats --xml-log-fd ignore.txt 2> /dev/null
+    then
+        echo $?...test failed on option --xml-log-fd
+    fi
+}
+
+test_ignore_args
\ No newline at end of file
diff --git a/test/pileup-stats/valgrind.suppress b/test/pileup-stats/valgrind.suppress
new file mode 100644
index 0000000..002d332
--- /dev/null
+++ b/test/pileup-stats/valgrind.suppress
@@ -0,0 +1,6 @@
+{
+   vt_cache
+   Memcheck:Leak
+   fun:calloc
+   fun:_ZN3ngs7Resolve*
+}
diff --git a/test/qual-recalib-stat/Makefile b/test/qual-recalib-stat/Makefile
new file mode 100644
index 0000000..64df55b
--- /dev/null
+++ b/test/qual-recalib-stat/Makefile
@@ -0,0 +1,49 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/qual-recalib-stat
+
+TEST_TOOLS = 
+
+include $(TOP)/build/Makefile.env
+
+$(TEST_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+runtests: check_exit_code
+
+#-------------------------------------------------------------------------------
+# scripted tests
+#
+
+check_exit_code:
+	@ python $(TOP)/build/check-exit-code.py $(BINDIR)/qual-recalib-stat
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
diff --git a/test/ref-variation/Makefile b/test/ref-variation/Makefile
new file mode 100644
index 0000000..34cdafc
--- /dev/null
+++ b/test/ref-variation/Makefile
@@ -0,0 +1,62 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/ref-variation
+
+TEST_TOOLS = \
+
+ALL_TOOLS = \
+	$(TEST_TOOLS) \
+
+include $(TOP)/build/Makefile.env
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
+
+#-------------------------------------------------------------------------------
+# ref-variation tool tests
+#
+runtests: ref-variation var-expand
+
+ref-variation: $(BINDIR)/ref-variation
+
+	@ #./have-access.sh $(BINDIR) || (echo "no access to repository, skipping ref-variation test..."; exit 0)
+	@ ./have-access.sh $(BINDIR) $@
+	
+vg: $(BINDIR)/ref-variation
+	valgrind --ncbi --suppressions=$(SRCDIR)/valgrind.suppress $(BINDIR)/ref-variation -r NC_000002.11 -p 73613067 --query '-' -l 3 \
+	SRR1597772 SRR1597776 SRR1597780 SRR1597784 SRR1597788 SRR1597792 SRR1597796 SRR1597800 SRR1597915 SRR1597919 SRR1597924 SRR1597928 SRR1597932 SRR1597936 SRR1597940 SRR1597944 SRR1597950 SRR1597955 SRR1598087 SRR1598091 SRR1598097 SRR1598101 SRR1598105 SRR1598111 SRR1598118 SRR945586 SRR867664 SRR867668 SRR867672 SRR867676 SRR867680 SRR867684 SRR867688 SRR867692 SRR851163 SRR792574 SRR792583 SRR792595 SRR792600 SRR792609 SRR792617 SRR792634 SRR792699 SRR792723 SRR792865 SRR792873 SRR792 [...]
+#	SRR793139 SRR793150 SRR793291 SRR793304 SRR793325 SRR793352 SRR793517 SRR793545 SRR793566 SRR793584 SRR793709 SRR793718 SRR793732 SRR793739 SRR793760 SRR793788 SRR793800 SRR793927 SRR793949 SRR793961 SRR793990 SRR794015 SRR794150 SRR794208 SRR794255 SRR794383 SRR794420 SRR794439 SRR794474 SRR794592 SRR794607 SRR794624 SRR795034 SRR795057 SRR795077 SRR795091 SRR795107 SRR795249 SRR795262 SRR795289 SRR795302 SRR795308 SRR795321 SRR795326 SRR795335 SRR795476 SRR795493 SRR795504 SRR795525  [...]
+
+var-expand: $(BINDIR)/var-expand
+	@# ./have-access.sh $(BINDIR) || (echo "no access to repository, skipping var-expand test..."; exit 0)
+	@ ./have-access.sh $(BINDIR) $@
diff --git a/test/ref-variation/expected/ref-variation.out b/test/ref-variation/expected/ref-variation.out
new file mode 100644
index 0000000..9394831
--- /dev/null
+++ b/test/ref-variation/expected/ref-variation.out
@@ -0,0 +1,192 @@
+info: percent="0"
+info: processed 0%
+warn: Input variation spec   : NC_000013.10:100635036:0:ACC
+warn: Adjusted variation spec: NC_000013.10:100635007:29:CCACCACCACCACCACCACCACCACCACCACC
+SRR793062
+info: percent="33"
+info: processed 33%
+SRR795251
+info: percent="66"
+info: processed 66%
+info: percent="100"
+info: processed 100%
+info: percent="0"
+info: processed 0%
+info: Found indel box at pos=73613071, length=1
+info: reference: ...AGGAA[G]AGGAG...
+info: var_query=C
+warn: Input variation spec   : NC_000002.11:73613071:1:C
+warn: Adjusted variation spec: NC_000002.11:73613071:1:C
+info: percent="100"
+info: processed 100%
+info: percent="0"
+info: processed 0%
+info: Found indel box at pos=117292899, length=9
+info: reference: ...GAAAG[TATTTATTT]TTTCT...
+info: var_query=GTATTTT
+warn: Input variation spec   : NC_000007.13:117292900:4:
+warn: Adjusted variation spec: NC_000007.13:117292899:9:TATTT
+info: percent="100"
+info: processed 100%
+info: percent="0"
+info: processed 0%
+warn: Input variation spec   : NC_000002.11:73613067:3:
+warn: Adjusted variation spec: NC_000002.11:73613031:39:GGAGGAGGAGGAGGAGGAGGAGGAGGAGGAGGAGGA
+SRR867061	0	45
+info: percent="33"
+info: processed 33%
+SRR867131	22	50
+info: percent="66"
+info: processed 66%
+info: percent="100"
+info: processed 100%
+info: percent="0"
+info: processed 0%
+warn: Input variation spec   : NC_000002.11:73613067:3:
+warn: Adjusted variation spec: NC_000002.11:73613031:39:GGAGGAGGAGGAGGAGGAGGAGGAGGAGGAGGAGGA
+SRR867061	0,0	45,27
+info: percent="33"
+info: processed 33%
+SRR867131	22,12	50,27
+info: percent="66"
+info: processed 66%
+info: percent="100"
+info: processed 100%
+info: percent="0"
+info: processed 0%
+warn: Input variation spec   : CM000671.1:136131022:1:T
+warn: Adjusted variation spec: CM000671.1:136131022:2:TG
+SRR1601768	0	5
+info: percent="50"
+info: processed 50%
+info: percent="100"
+info: processed 100%
+info: percent="0"
+info: processed 0%
+info: percent="100"
+info: processed 100%
+err: ERROR: The selected reference region [N] does not contain valid bases, exiting...
+info: percent="0"
+info: processed 0%
+warn: Input variation spec   : CM000671.1:136131021:1:T
+warn: Adjusted variation spec: CM000671.1:136131020:2:CT
+SRR1596639	0	8
+info: percent="50"
+info: processed 50%
+info: percent="100"
+info: processed 100%
+info: percent="0"
+info: processed 0%
+info: Found indel box at pos=73613030, length=4
+info: reference: ...CGAGC[TGGA]GGAGG...
+info: var_query=CATAG
+warn: Input variation spec   : NC_000002.11:73613030:3:AT
+warn: Adjusted variation spec: NC_000002.11:73613030:4:ATA
+info: Found indel box at pos=73613030, length=4
+info: reference: ...CGAGC[TGGA]GGAGG...
+info: var_query=ATATA
+warn: Input variation spec   : NC_000002.11:73613030:3:ATAT
+warn: Adjusted variation spec: NC_000002.11:73613030:4:ATATA
+info: Found indel box at pos=73613030, length=4
+info: reference: ...CGAGC[TGGA]GGAGG...
+info: var_query=ATATATA
+warn: Input variation spec   : NC_000002.11:73613030:3:ATATAT
+warn: Adjusted variation spec: NC_000002.11:73613030:4:ATATATA
+info: percent="100"
+info: processed 100%
+info: percent="0"
+info: processed 0%
+warn: Input variation spec   : CM000664.1:234668879:14:ATATATATATATAT
+warn: Adjusted variation spec: CM000664.1:234668879:15:ATATATATATATATA
+SRR1597895	29	31
+info: percent="50"
+info: processed 50%
+info: percent="100"
+info: processed 100%
+info: percent="0"
+info: processed 0%
+warn: Input variation spec   : CM000664.1:234668879:14:AT
+warn: Adjusted variation spec: CM000664.1:234668879:15:ATA
+warn: Input variation spec   : CM000664.1:234668879:14:ATAT
+warn: Adjusted variation spec: CM000664.1:234668879:15:ATATA
+warn: Input variation spec   : CM000664.1:234668879:14:ATATAT
+warn: Adjusted variation spec: CM000664.1:234668879:15:ATATATA
+warn: Input variation spec   : CM000664.1:234668879:14:ATATATAT
+warn: Adjusted variation spec: CM000664.1:234668879:15:ATATATATA
+warn: Input variation spec   : CM000664.1:234668879:14:ATATATATAT
+warn: Adjusted variation spec: CM000664.1:234668879:15:ATATATATATA
+warn: Input variation spec   : CM000664.1:234668879:14:ATATATATATAT
+warn: Adjusted variation spec: CM000664.1:234668879:15:ATATATATATATA
+warn: Input variation spec   : CM000664.1:234668879:14:ATATATATATATAT
+warn: Adjusted variation spec: CM000664.1:234668879:15:ATATATATATATATA
+warn: Input variation spec   : CM000664.1:234668879:14:ATATATATATATATAT
+warn: Adjusted variation spec: CM000664.1:234668879:15:ATATATATATATATATA
+warn: Total counts don't match for SRR1597895 for query # 6 and 7: total: 31 vs 29, total positive: 31 vs 29
+SRR1597895	0	0	0	0	0	0	28	8	31
+info: percent="50"
+info: processed 50%
+info: percent="100"
+info: processed 100%
+info: percent="0"
+info: processed 0%
+info: Found indel box at pos=1064998, length=2
+info: reference: ...GAATG[CC]GTGGC...
+info: var_query=CA
+warn: Input variation spec   : NC_000001.10:1064999:1:A
+warn: Adjusted variation spec: NC_000001.10:1064998:2:CA
+info: percent="100"
+info: processed 100%
+info: percent="0"
+info: processed 0%
+info: Found indel box at pos=137518, length=19
+info: reference: ...GTGTG[TATATATATATATATATAT]TCCAT...
+info: var_query=GTATATATATATATATATT
+warn: Input variation spec   : NC_000020.10:137534:2:
+warn: Adjusted variation spec: NC_000020.10:137518:19:TATATATATATATATAT
+info: percent="100"
+info: processed 100%
+info: percent="0"
+info: processed 0%
+info: Found indel box at pos=123452, length=8
+info: reference: ...GATTA[GGGAAATG]TCTCA...
+info: var_query=GGGAGAAATG
+warn: Input variation spec   : CM000663.1:123452:7:GGGAGAAAT
+warn: Adjusted variation spec: CM000663.1:123452:8:GGGAGAAATG
+info: percent="100"
+info: processed 100%
+info: percent="0"
+info: processed 0%
+info: Found indel box at pos=36662041, length=10
+info: reference: ...CAACA[ATAATTATAA]GATTC...
+info: var_query=AATAAG
+warn: Input variation spec   : CM000684.1:36662045:6:
+warn: Adjusted variation spec: CM000684.1:36662041:10:ATAA
+info: [0] Processing parameter # 0: SRR1597729, path=[], pileup path=[]
+info: [0] Processing SRR1597729.pileup...
+info: [0] found CM000684.1 row_id=2829728721, id_count=51304566
+info: [0] SRR1597729 is suspicious
+info: [0] Processing SRR1597729
+info: [0] id=SRR1597729.PA.257963012: AATAAT
+info: [0] id=SRR1597729.PA.257963013: AATAAG MATCH!
+info: [0] id=SRR1597729.PA.257963014: AATAAT
+info: [0] id=SRR1597729.PA.257963016: AATAAG MATCH!
+info: [0] id=SRR1597729.PA.257963017: AATAAT
+info: [0] id=SRR1597729.PA.257963018: AATAAG MATCH!
+SRR1597729	3	6
+info: percent="50"
+info: processed 50%
+info: percent="100"
+info: processed 100%
+info: percent="0"
+info: processed 0%
+info: Found indel box at pos=569998, length=4
+info: reference: ...GATAC[GGGA]TAATC...
+info: var_query=GGAA
+warn: Input variation spec   : NC_000001.10:570000:1:A
+warn: Adjusted variation spec: NC_000001.10:569998:4:GGAA
+info: percent="100"
+info: processed 100%
+SRR867061	0	45
+SRR867061	0	45
+SRR867131	22	50
+SRR867131	22	50
diff --git a/test/ref-variation/expected/var-expand.out b/test/ref-variation/expected/var-expand.out
new file mode 100644
index 0000000..602b6dc
--- /dev/null
+++ b/test/ref-variation/expected/var-expand.out
@@ -0,0 +1 @@
+a	CM000664.1:234668879:14:AT	CM000664.1:234668879:15:ATA	CM000664.1:234668879:15:ATATATATATATATA
diff --git a/test/ref-variation/have-access.sh b/test/ref-variation/have-access.sh
new file mode 100755
index 0000000..ef9813e
--- /dev/null
+++ b/test/ref-variation/have-access.sh
@@ -0,0 +1,25 @@
+BINDIR=$1
+test_name=$2
+exit_code=0
+have_access()
+{
+	$BINDIR/vdb-config -on /repository/site > /dev/null
+}
+
+if have_access; then
+	echo "Starting $test_name test..."; 
+	if [ "$test_name" = "ref-variation" ]; then
+		./ref-variation.sh $BINDIR; 
+		exit_code=$?
+	elif [ "$test_name" = "var-expand" ]; then
+		rm -f var-expand.out
+		echo "a CM000664.1:234668879:14:AT" | $BINDIR/var-expand --no-user-settings --algorithm=ra >> var-expand.out
+		diff expected/var-expand.out var-expand.out
+		exit_code=$?
+		rm var-expand.out
+	fi
+	echo "$test_name test is done";	
+else
+	echo "no access to repository, skipping $test_name test...";
+fi
+exit $exit_code
\ No newline at end of file
diff --git a/test/ref-variation/ref-variation.in b/test/ref-variation/ref-variation.in
new file mode 100644
index 0000000..5f29904
--- /dev/null
+++ b/test/ref-variation/ref-variation.in
@@ -0,0 +1,4 @@
+SRR867061	SRR867061	SRR867061.pileup
+SRR867061	SRR867061
+SRR867131
+SRR867131		SRR867131.pileup
diff --git a/test/ref-variation/ref-variation.sh b/test/ref-variation/ref-variation.sh
new file mode 100755
index 0000000..f69fd53
--- /dev/null
+++ b/test/ref-variation/ref-variation.sh
@@ -0,0 +1,29 @@
+BINDIR=$1
+
+if [ "$(uname)" = "Darwin" ]
+then
+	echo "ref-variation test is disabled for Mac"
+else
+	rm -f ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -v -r NC_000013.10 -p 100635036 --query ACC -l 0 SRR793062 SRR795251 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -vv -r NC_000002.11 -p 73613071 --query "C" -l 1 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -vv -t 16 -r NC_000007.13 -p 117292900 --query "-" -l 4 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -v -c -t 1 -r NC_000002.11 -p 73613067 --query "-" -l 3 SRR867061 SRR867131 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -v -c --count-strand counteraligned -t 1 -r NC_000002.11 -p 73613067 --query "-" -l 3 SRR867061 SRR867131 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -v -c -r CM000671.1 -p 136131022 --query "T" -l 1 SRR1601768 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -v -c -r NC_000001.11 -p 136131022 --query "T" -l 1 SRR1601768 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -v -t 16 -c -r CM000671.1 -p 136131021 --query "T" -l 1 SRR1596639 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -vv -r NC_000002.11 -p 73613030 --query "AT[1-3]" -l 3 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -v -c -r CM000664.1 -p 234668879  -l 14 --query "ATATATATATATAT" SRR1597895 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -v -c -r CM000664.1 -p 234668879  -l 14 --query "AT[1-8]" SRR1597895 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -vv -r NC_000001.10 -p 1064999 -l 1 --query A 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -vv -r NC_000020.10 -p 137534 -l 2 --query - 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -vv -c -r CM000663.1 -p 123452 -l 7 --query "GGGAGAAAT" 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -vvv -r CM000684.1 -p 36662045 --query - -l 6 -vvv -c SRR1597729 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L info -vv -r NC_000001.10 -p 570000 -l 1 --query A 2>&1 | sed "s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}\:[0-9]\{2\}\:[0-9]\{2\}[ \t]*ref-variation\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?[ \t]*//" >> ref-variation.out
+	$BINDIR/ref-variation --no-user-settings --algorithm=ra -L err -v -c -t 1 -r NC_000002.11 -p 73613067 --query "-" -l 3 -i ref-variation.in >> ref-variation.out 2>&1
+	diff expected/ref-variation.out ref-variation.out
+	EXIT_CODE=$?
+	rm ref-variation.out
+	exit $EXIT_CODE
+fi
diff --git a/test/samline/Makefile b/test/samline/Makefile
new file mode 100644
index 0000000..414b84d
--- /dev/null
+++ b/test/samline/Makefile
@@ -0,0 +1,115 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = test/samline
+
+include $(TOP)/build/Makefile.env
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+	samline \
+	sampart
+    
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: vers-includes
+	@ $(MAKE_CMD) $(TARGDIR)/$@
+
+$(ALL_TOOLS): vers-includes
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# all
+#
+$(TARGDIR)/all: \
+	$(addprefix $(BINDIR)/,$(ALL_TOOLS))
+
+.PHONY: $(TARGDIR)/all
+
+#-------------------------------------------------------------------------------
+# std
+#
+$(TARGDIR)/std: \
+	$(addprefix $(BINDIR)/,$(EXT_TOOLS))
+
+.PHONY: $(TARGDIR)/std
+
+#-------------------------------------------------------------------------------
+# vers-includes
+#
+$(TARGDIR)/vers-includes: $(addsuffix .vers.h,$(EXT_TOOLS))
+
+.PHONY: $(TARGDIR)/vers-includes
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+CMN_LIBS = \
+	-skapp \
+	-sncbi-vdb \
+	-lm
+
+#-------------------------------------------------------------------------------
+# SAMLINE
+#
+SAMLINE_SRC = \
+	refbases \
+	cigar \
+	alig-gen
+
+SAMLINE_OBJ = \
+	$(addsuffix .$(OBJX),$(SAMLINE_SRC))
+
+$(BINDIR)/samline: $(SAMLINE_OBJ)
+	$(LD) --exe --vers $(SRCDIR) -o $@ $^ $(CMN_LIBS)
+
+#-------------------------------------------------------------------------------
+# SAMPART
+#
+SAMPART_SRC = \
+	refbases \
+	cigar \
+	sampart
+
+SAMPART_OBJ = \
+	$(addsuffix .$(OBJX),$(SAMPART_SRC))
+
+$(BINDIR)/sampart: $(SAMPART_OBJ)
+	$(LD) --exe --vers $(SRCDIR) -o $@ $^ $(CMN_LIBS)
diff --git a/test/samline/alig-gen.c b/test/samline/alig-gen.c
new file mode 100644
index 0000000..66845c5
--- /dev/null
+++ b/test/samline/alig-gen.c
@@ -0,0 +1,656 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "samline.vers.h"
+
+#include <kfs/file.h>
+#include <kfs/directory.h>
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+
+#include <klib/out.h>
+#include <klib/rc.h>
+#include <klib/printf.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "refbases.h"
+#include "cigar.h"
+
+#define DFLT_REFNAME        "NC_011752.1"
+#define DFLT_REFPOS         10000
+#define DFLT_CIGAR          "50M"
+#define DFLT_INSBASES       "ACGTACGTACGT"
+#define DFLT_MAPQ           20
+#define DFLT_QNAME          "1"
+#define DFLT_TLEN           0
+
+static const char * refname_usage[]        = { "the ref-seq-id to use 'NC_011752.1'", NULL };
+static const char * refalias_usage[]       = { "the alias to be written out like 'c1'", NULL };
+static const char * refpos_usage[]         = { "the position on the reference 0-based", NULL };
+static const char * cigar_usage[]          = { "the cigar-string to use", NULL };
+static const char * insbases_usage[]       = { "what bases to insert ( if needed )", NULL };
+static const char * mapq_usage[]           = { "what mapq to use", NULL };
+static const char * reverse_usage[]        = { "alignment is reverse", NULL };
+static const char * qname_usage[]          = { "query template name", NULL };
+static const char * sec_usage[]            = { "secondary alignment", NULL };
+static const char * bad_usage[]            = { "did not pass quality control", NULL };
+static const char * dup_usage[]            = { "is PCR or optical duplicate", NULL };
+static const char * prop_usage[]           = { "each fragment is properly aligned", NULL };
+static const char * first_usage[]          = { "fragment is first", NULL };
+static const char * last_usage[]           = { "fragment is last", NULL };
+static const char * show_usage[]           = { "show details of calculations", NULL };
+static const char * ref_usage[]            = { "return only refbases (set cigar to 100M for len=100)", NULL };
+static const char * flags_usage[]          = { "decode decimal flags-value", NULL };
+static const char * header_usage[]         = { "produce header", NULL };
+static const char * config_usage[]         = { "procuce config-file", NULL };
+static const char * mdtag_usage[]          = { "procuce md-tag", NULL };
+
+#define OPTION_REFNAME        "refname"
+#define OPTION_REFALIAS       "refalias"
+#define OPTION_REFPOS         "refpos"
+#define OPTION_CIGAR          "cigar"
+#define OPTION_INSBASES       "insbases"
+#define OPTION_MAPQ           "mapq"
+#define OPTION_REVERSE        "reverse"
+#define OPTION_QNAME          "qname"
+#define OPTION_SEC            "secondary"
+#define OPTION_BAD            "bad"
+#define OPTION_DUP            "duplicate"
+#define OPTION_PROP           "proper"
+#define OPTION_FIRST          "first"
+#define OPTION_LAST           "last"
+#define OPTION_SHOW           "show"
+#define OPTION_REF            "ref"
+#define OPTION_FLAGS          "flags"
+#define OPTION_HEADER         "header"
+#define OPTION_CONFIG         "config"
+#define OPTION_MDTAG          "mdtag"
+
+#define ALIAS_REFNAME        "r"
+#define ALIAS_REFALIAS       "b"
+#define ALIAS_REFPOS         "p"
+#define ALIAS_CIGAR          "c"
+#define ALIAS_INSBASES       "i"
+#define ALIAS_MAPQ           "m"
+#define ALIAS_REVERSE        "e"
+#define ALIAS_SEC            "2"
+#define ALIAS_BAD            "a"
+#define ALIAS_DUP            "u"
+#define ALIAS_PROP           "o"
+#define ALIAS_SHOW           "s"
+#define ALIAS_REF            "f"
+#define ALIAS_FLAGS          "l"
+#define ALIAS_HEADER         "d"
+#define ALIAS_CONFIG         "n"
+#define ALIAS_MDTAG          "t"
+
+OptDef Options[] =
+{
+    { OPTION_REFNAME,   ALIAS_REFNAME,  NULL, refname_usage,   2,    true,     false },
+    { OPTION_REFALIAS,  ALIAS_REFALIAS, NULL, refalias_usage,  2,    true,     false },
+    { OPTION_REFPOS,    ALIAS_REFPOS,   NULL, refpos_usage,    2,    true,     false },
+    { OPTION_CIGAR,     ALIAS_CIGAR,    NULL, cigar_usage,     2,    true,     false },
+    { OPTION_INSBASES,  ALIAS_INSBASES, NULL, insbases_usage,  1,    true,     false },
+    { OPTION_MAPQ,      ALIAS_MAPQ,     NULL, mapq_usage,      2,    true,     false },
+    { OPTION_REVERSE,   ALIAS_REVERSE,  NULL, reverse_usage,   1,    false,    false },
+    { OPTION_QNAME,     NULL,           NULL, qname_usage,     2,    true,     false },
+    { OPTION_SEC,       ALIAS_SEC,      NULL, sec_usage,       2,    true,     false },
+    { OPTION_BAD,       ALIAS_BAD,      NULL, bad_usage,       2,    true,     false },
+    { OPTION_DUP,       ALIAS_DUP,      NULL, dup_usage,       2,    true,     false },
+    { OPTION_PROP,      ALIAS_PROP,     NULL, prop_usage,      2,    true,     false },
+    { OPTION_FIRST,     NULL,           NULL, first_usage,     2,    true,     false },
+    { OPTION_LAST,      NULL,           NULL, last_usage,      2,    true,     false },
+    { OPTION_SHOW,      ALIAS_SHOW,     NULL, show_usage,      1,    false,    false },
+    { OPTION_REF,       ALIAS_REF,      NULL, ref_usage,       1,    false,    false },
+    { OPTION_FLAGS,     ALIAS_FLAGS,    NULL, flags_usage,     1,    true,     false },
+    { OPTION_HEADER,    ALIAS_HEADER,   NULL, header_usage,    1,    false,    false },
+    { OPTION_CONFIG,    ALIAS_CONFIG,   NULL, config_usage,    1,    true,     false },
+    { OPTION_MDTAG,     ALIAS_MDTAG,    NULL, mdtag_usage,     1,    false,    false }        
+};
+
+const char UsageDefaultName[] = "samline";
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    return KOutMsg( "\nUsage:\n %s [options]\n\n", progname );
+}
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    int i, n_options;
+    rc_t rc;
+
+    if ( args == NULL )
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+        rc = ArgsProgram ( args, &fullpath, &progname );
+
+    if ( rc != 0 )
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary ( progname );
+    KOutMsg ( "Options:\n" );
+
+    n_options = sizeof Options / sizeof Options[ 0 ];
+    for ( i = 0; i < n_options; ++i )
+    {
+        OptDef * o = &Options[ i ];
+        HelpOptionLine( o->aliases, o->name, NULL, o->help );
+    }
+
+    KOutMsg ( "\n" );
+    HelpOptionsStandard ();
+    HelpVersion ( fullpath, KAppVersion() );
+
+    return rc;
+}
+
+
+/* Version  EXTERN
+ *  return 4-part version code: 0xMMmmrrrr, where
+ *      MM = major release
+ *      mm = minor release
+ *    rrrr = bug-fix release
+ */
+ver_t CC KAppVersion ( void )
+{
+    return SAMLINE_VERS;
+}
+
+
+static const char * get_str_option( const Args * args, const char * name, uint32_t idx, const char * dflt )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    if ( ( rc == 0 )&&( count > idx ) )
+    {
+        const char * res = NULL;
+        ArgsOptionValue( args, name, idx, (const void **)&res );
+        return res;
+    }
+    else
+        return dflt;
+}
+
+
+static uint32_t get_uint32_option( const Args * args, const char * name, uint32_t idx, const uint32_t dflt )
+{
+    const char * s = get_str_option( args, name, idx, NULL );
+    if ( s == NULL )
+        return dflt;
+    return atoi( s );
+}
+
+static uint32_t get_bool_option( const Args * args, const char * name )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    return ( rc == 0 && count > 0 );
+}
+
+typedef struct alignment
+{
+    const char * qname;
+    const char * refname;
+    const char * refalias;
+    const char * cigar_str;
+    const char * refbases;
+    char read[ 4096 ];
+    char sam[ 4096 ];
+    
+    int reverse, secondary, bad, dup, prop, first, last;
+
+    uint32_t refpos, mapq, bases_in_ref, reflen;    
+    
+    struct cigar_t * cigar;
+} alignment;
+
+typedef struct gen_context
+{
+    const char * insbases;
+    const char * config;
+    uint32_t flags, header;
+    int32_t tlen;
+    
+    alignment alig[ 2 ];
+} gen_context;
+
+
+static rc_t CC write_to_FILE ( void *f, const char *buffer, size_t bytes, size_t *num_writ )
+{
+    * num_writ = fwrite ( buffer, 1, bytes, f );
+    if ( * num_writ != bytes )
+        return RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+    return 0;
+}
+
+
+static size_t random_string( char * buffer, size_t buflen, const char * char_set, size_t length )
+{
+    size_t res = 0;
+    if ( buffer != NULL && buflen > 0 )
+    {
+        const char dflt_charset[] = "0123456789"
+                                    "abcdefghijklmnopqrstuvwxyz"
+                                    "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+        const char * cs = ( char_set == NULL ) ? dflt_charset : char_set;
+        size_t charset_len = strlen( cs ) - 1;
+        while ( res < length && res < ( buflen - 1 ) )
+        {
+            size_t rand_idx = ( double ) rand() / RAND_MAX * charset_len;
+            buffer[ res++ ] = cs[ rand_idx ];
+        }
+        buffer[ res ] = 0;
+    }
+    return res;
+}
+
+
+static size_t random_quality( char * buffer, size_t buflen, size_t length )
+{
+    const char qualities[] = "!\"#$%&'()*+,-./0123456789:;<=>?"
+                             "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
+                             "`abcdefghijklmnopqrstuvwxyz{|}~";
+    return random_string( buffer, buflen, qualities, length );
+}
+
+static uint32_t sam_flags( const alignment * alig, const alignment * other, int first, int last )
+{
+    uint32_t res = 0;
+    if ( first || last ) res |= 0x01;                            /* multiple fragments */
+    if ( alig->prop != 0 ) res |= 0x02;                        /* each fragment properly aligned */
+    if ( alig->refpos == 0 ) res |= 0x04;                         /* this fragment is unmapped */
+    if ( other != NULL && other->refpos == 0 ) res |= 0x08;     /* next fragment is unmapped */
+    if ( alig->reverse ) res |= 0x10;                            /* this fragment is reversed */
+    if ( other != NULL && other->reverse ) res |= 0x20;         /* next fragment is reversed */
+    if ( first ) res |= 0x40;                                    /* this is the first fragment */
+    if ( last ) res |= 0x80;                                     /* this is the last fragment */
+    if ( alig->secondary != 0 ) res |= 0x100;                    /* this is a secondary alignment */    
+    if ( alig->bad != 0 ) res |= 0x200;                         /* this is did not pass quality controls */    
+    if ( alig->dup != 0 ) res |= 0x400;                        /* this is PCR or optical duplicate */    
+    return res;
+}
+
+
+static size_t produce_sam( char * buffer, size_t buflen,
+                           const gen_context * gctx, const alignment * alig, const alignment * other )
+{
+    size_t res = 0;
+    if ( buffer != NULL ) buffer[ 0 ] = 0;
+    
+    if ( buffer != NULL && gctx != NULL && alig != NULL )
+    {
+        char merged_cigar_str[ 4096 ];
+        char quality[ 4096 ];
+        int first = 0;
+        int last = 0;
+        const char * r_next = "*";
+        uint32_t r_pos = 0;
+        struct cigar_t * merged_cigar = merge_cigar_t( alig->cigar );
+
+        random_quality( quality, sizeof quality, cigar_t_readlen( merged_cigar ) )    ;
+        cigar_t_string( merged_cigar_str, sizeof merged_cigar_str, merged_cigar );
+        
+        if ( other != NULL && other->refname != NULL && other->refpos != 0 )
+        {
+            r_next = other->refalias == NULL ? other->refname : other->refalias;
+            first = ( alig->refpos < other->refpos );
+            last = !first;
+            r_pos = other->refpos;
+        }
+        else
+        {
+            first = alig->first;
+            last  = alig->last;
+        }
+
+        string_printf ( buffer, buflen, &res,
+                        "%s\t%d\t%s\t%d\t%d\t%s\t%s\t%d\t%d\t%s\t%s",
+                        alig->qname,
+                        sam_flags( alig, other, first, last ),
+                        alig->refalias == NULL ? alig->refname : alig->refalias,
+                        alig->refpos,
+                        alig->mapq,
+                        merged_cigar_str,
+                        r_next,
+                        r_pos,
+                        gctx->tlen,
+                        alig->read,
+                        quality );
+
+        free_cigar_t( merged_cigar );
+    }
+    return res;
+}
+
+static void show_alig_details( const alignment * alig )
+{
+    KOutMsg ( "QNAME    : %s\n", alig->qname );
+    KOutMsg ( "REFNAME  : %s\n", alig->refname );
+    KOutMsg ( "REFALIAS : %s\n", alig->refalias == NULL ? "n/a" : alig->refalias );
+    KOutMsg ( "REFPOS   : %d\n", alig->refpos );
+    KOutMsg ( "CIGAR    : %s\n", alig->cigar_str );
+    KOutMsg ( "MAPQ     : %d\n", alig->mapq );
+    KOutMsg ( "REVERSE  : %s\n", alig->reverse ? "YES" : "NO" );
+    KOutMsg ( "SECONDARY: %s\n", alig->secondary ? "YES" : "NO" );
+    KOutMsg ( "BAD      : %s\n", alig->bad ? "YES" : "NO" );
+    KOutMsg ( "DUPLICATE: %s\n", alig->dup ? "YES" : "NO" );
+    KOutMsg ( "PROPERLY : %s\n", alig->prop ? "YES" : "NO" );
+    KOutMsg ( "FIRST    : %s\n", alig->first ? "YES" : "NO" );
+    KOutMsg ( "LAST     : %s\n", alig->last ? "YES" : "NO" );    
+    KOutMsg ( "REFLEN   : %d\n", alig->reflen );
+    KOutMsg ( "READLEN  : %d\n", cigar_t_readlen( alig->cigar ) );    
+    KOutMsg ( "INSLEN   : %d\n", cigar_t_inslen( alig->cigar ) );
+    KOutMsg ( "REFBASES : %s\n", alig->refbases );
+    KOutMsg ( "READ     : %s\n", alig->read );
+    KOutMsg ( "SAM      : %s\n", alig->sam );
+    
+}
+
+static void show_details( const gen_context * gctx )
+{
+    KOutMsg ( "INSBASES : %s\n", gctx->insbases );
+    KOutMsg ( "TLEN     : %d\n", gctx->tlen );
+    KOutMsg ( "CONFIG   : %s\n", gctx->config );
+    if ( gctx->tlen != 0 )
+    {
+        KOutMsg ( "----- ALIGNMENT #1 -----\n" );
+        show_alig_details( &gctx->alig[ 0 ] );
+        KOutMsg ( "----- ALIGNMENT #2 -----\n" );
+        show_alig_details( &gctx->alig[ 1 ] );
+    }
+    else
+        show_alig_details( &gctx->alig[ 0 ] );
+}
+
+
+static void show_mdtag( const gen_context * gctx )
+{
+    struct cigar_t * cigar;
+    
+    KOutMsg ( "calculating MD-TAG:\n" );
+    KOutMsg ( "READ     : %s\n", gctx->alig[0].read );
+    KOutMsg ( "REFBASES : %s\n", gctx->alig[0].refbases );
+
+    cigar = make_cigar_t( gctx->alig[0].cigar_str );
+    if ( cigar != NULL )
+    {
+        struct cigar_t *merged_cigar = merge_cigar_t( cigar );
+        if ( merged_cigar != NULL )
+        {
+            char merged_cigar_str[ 4096 ];
+            char the_tag[ 4096 ];
+            
+            cigar_t_string( merged_cigar_str, sizeof merged_cigar_str, merged_cigar );
+            md_tag( the_tag, sizeof the_tag, merged_cigar, gctx->alig[0].read, gctx->alig[0].refbases );
+                
+            KOutMsg ( "CIGAR    : %s\n", merged_cigar_str );
+            KOutMsg ( "MD-TAG   : %s\n", the_tag );
+                
+            free_cigar_t( merged_cigar );
+        }
+        free_cigar_t( cigar );
+    }
+}
+
+static void explain_flags( const uint32_t flags )
+{
+    if ( ( flags & 0x01 ) == 0x01 )
+        KOutMsg ( "0x001 ... multiple fragments\n" );
+    if ( ( flags & 0x02 ) == 0x02 )
+        KOutMsg ( "0x002 ... each fragment properly aligned\n" );
+    if ( ( flags & 0x04 ) == 0x04 )
+        KOutMsg ( "0x004 ... this fragment is unmapped\n" );
+    if ( ( flags & 0x08 ) == 0x08 )
+        KOutMsg ( "0x008 ... next fragment is unmapped\n" );
+    if ( ( flags & 0x10 ) == 0x10 )
+        KOutMsg ( "0x010 ... this fragment is reversed\n" );
+    if ( ( flags & 0x20 ) == 0x20 )
+        KOutMsg ( "0x020 ... next fragment is reversed\n" );
+    if ( ( flags & 0x40 ) == 0x40 )
+        KOutMsg ( "0x040 ... this is the first fragment\n" );
+    if ( ( flags & 0x80 ) == 0x80 )
+        KOutMsg ( "0x080 ... this is the last fragment\n" );
+    if ( ( flags & 0x100 ) == 0x100 )
+        KOutMsg ( "0x100 ... this is a secondary alignment\n" );
+    if ( ( flags & 0x200 ) == 0x200 )
+        KOutMsg ( "0x200 ... this is did not pass quality controls\n" );
+    if ( ( flags & 0x400 ) == 0x400 )
+        KOutMsg ( "0x400 ... this is PCR or optical duplicate\n" );
+}
+
+
+static size_t write_config_line( KFile * dst, size_t at, const char * alias, const char * canonical )
+{
+    size_t num_in_buffer, res = 0;
+    char buffer[ 4096 ];
+    rc_t rc = string_printf ( buffer, sizeof buffer, &num_in_buffer, "%s\t%s\n", alias, canonical );
+    if ( rc == 0 )
+    {
+        size_t written_to_file;
+        rc = KFileWriteAll ( dst, at, buffer, num_in_buffer, &written_to_file );
+        if ( rc == 0 )
+            res = at + written_to_file;
+    }
+    return res;
+}
+
+
+static void write_config_file( const char * filename, const alignment * alig0, const alignment * alig1 )
+{
+    KDirectory *dir;
+    rc_t rc = KDirectoryNativeDir( &dir );
+    if ( rc == 0 )
+    {
+        KFile * dst;
+        rc = KDirectoryCreateFile ( dir, &dst, false, 0664, kcmInit, filename );
+        if ( rc == 0 )
+        {
+            size_t pos = 0;
+            const char * alias0 = NULL;
+            const char * alias1 = NULL;
+            const char * canonical0 = NULL;
+            const char * canonical1 = NULL;
+
+            if ( alig0 != 0 )
+            {
+                canonical0 = alig0->refname == NULL ? DFLT_REFNAME : alig0->refname;
+                alias0 = alig0->refalias == NULL ? canonical0 : alig0->refalias;
+            }
+
+            if ( alig1 != 0 )
+            {
+                canonical1 = alig1->refname == NULL ? DFLT_REFNAME : alig1->refname;
+                alias1 = alig1->refalias == NULL ? canonical1 : alig1->refalias;
+            }
+
+            pos = write_config_line( dst, pos, alias0, canonical0 );
+            if ( ( strcmp( alias0, alias1 ) != 0 ) )
+                write_config_line( dst, pos, alias1, canonical1 );
+            
+            KFileRelease( dst );            
+        }
+        KDirectoryRelease( dir );
+    }
+}
+
+
+static void generate_alignment( const gen_context * gctx )
+{
+    /* write reference names into config-file for bam-load */
+    if ( gctx->config != NULL )
+        write_config_file( gctx->config, &gctx->alig[ 0 ], &gctx->alig[ 1 ] );
+    
+    /* procude SAM-header on stdout */
+    if ( gctx->header )
+    {
+        const char * refname0 = gctx->alig[ 0 ].refalias;
+        const char * refname1 = gctx->alig[ 1 ].refalias;
+        int bases_in_ref0 = gctx->alig[ 0 ].bases_in_ref;
+
+        if ( refname0 == NULL ) refname0 = gctx->alig[ 0 ].refname;
+        if ( refname1 == NULL ) refname1 = gctx->alig[ 1 ].refname;
+        
+        KOutMsg( "@HD\tVN:1.3\n" );
+        KOutMsg( "@SQ\tSN:%s\tAS:%s\tLN:%d\n", refname0, refname0, bases_in_ref0 );
+        if ( refname1 != NULL && ( strcmp( refname0, refname1 ) != 0 ) )
+        {
+            int bases_in_ref1 = gctx->alig[ 1 ].bases_in_ref;
+            KOutMsg( "@SQ\tSN:%s\tAS:%s\tLN:%d\n", refname1, refname1, bases_in_ref1 );
+        }
+    }
+
+    /* produces SAM-line for 1st alignment */
+    KOutMsg( "%s\n", gctx->alig[ 0 ].sam );
+    
+    /* produces SAM-line for 2nd alignment ( mate ) */
+    if ( gctx->tlen != 0 )
+        KOutMsg( "%s\n", gctx->alig[ 1 ].sam );
+}
+
+
+static void read_alig_context( Args * args, alignment * alig, uint32_t idx )
+{
+    alig->qname     = get_str_option( args, OPTION_QNAME,       idx,    idx == 0 ? "1" : "2" );
+    alig->refname   = get_str_option( args, OPTION_REFNAME,     idx,    idx == 0 ? DFLT_REFNAME : NULL );
+    alig->refalias  = get_str_option( args, OPTION_REFALIAS,    idx,    NULL );
+    alig->refpos    = get_uint32_option( args, OPTION_REFPOS,   idx,    idx == 0 ? DFLT_REFPOS : 0 );
+    alig->cigar_str = get_str_option( args, OPTION_CIGAR,       idx,    DFLT_CIGAR );
+    alig->mapq      = get_uint32_option( args, OPTION_MAPQ,     idx,    DFLT_MAPQ );
+    
+    alig->reverse   = get_uint32_option( args, OPTION_REVERSE,  idx,    0 );
+    alig->secondary = get_uint32_option( args, OPTION_SEC,      idx,    0 );
+    alig->bad       = get_uint32_option( args, OPTION_BAD,      idx,    0 );
+    alig->dup       = get_uint32_option( args, OPTION_DUP,      idx,    0 );
+    alig->prop      = get_uint32_option( args, OPTION_PROP,     idx,    0 );
+    alig->first     = get_uint32_option( args, OPTION_FIRST,    idx,    0 );
+    alig->last      = get_uint32_option( args, OPTION_LAST,     idx,    0 );
+    
+    /* precalculate values need in all functions */
+    alig->cigar     = make_cigar_t( alig->cigar_str );
+    alig->reflen    = cigar_t_reflen( alig->cigar );
+}
+
+static void release_alig( alignment * alig )
+{
+    if ( alig->refbases != NULL ) free( ( void* ) alig->refbases );
+    free_cigar_t( alig->cigar );
+}
+
+static void read_context( Args * args, gen_context * gctx )
+{
+    alignment *alig0, *alig1;
+
+    gctx->insbases  = get_str_option( args, OPTION_INSBASES,  0,   DFLT_INSBASES );
+    gctx->flags     = get_uint32_option( args, OPTION_FLAGS,  0,   0 );
+    gctx->header    = get_bool_option( args, OPTION_HEADER );
+    gctx->config    = get_str_option( args, OPTION_CONFIG,    0,   NULL );
+    gctx->tlen       = 0;
+    
+    read_alig_context( args, &gctx->alig[ 0 ], 0 );
+    read_alig_context( args, &gctx->alig[ 1 ], 1 );
+
+    alig0 = &gctx->alig[ 0 ];
+    alig1 = &gctx->alig[ 1 ];
+    
+    if ( gctx->alig[ 1 ].refpos > 0 )
+    {
+        if ( gctx->alig[ 1 ].refname == NULL )
+            gctx->alig[ 1 ].refname = gctx->alig[ 0 ].refname;
+        if ( gctx->alig[ 1 ].refalias == NULL )
+            gctx->alig[ 1 ].refalias = gctx->alig[ 0 ].refalias;
+
+        uint32_t end = alig1->refpos + alig1->reflen;
+        gctx->tlen = ( end - alig0->refpos );
+        
+        alig0->refbases = read_refbases( alig0->refname, alig0->refpos, alig0->reflen, &alig0->bases_in_ref );
+        alig1->refbases = read_refbases( alig1->refname, alig1->refpos, alig1->reflen, &alig1->bases_in_ref );
+
+        cigar_t_2_read( alig0->read, sizeof alig0->read, alig0->cigar, alig0->refbases, gctx->insbases );
+        cigar_t_2_read( alig1->read, sizeof alig1->read, alig1->cigar, alig1->refbases, gctx->insbases );
+        
+        produce_sam( alig0->sam, sizeof alig0->sam, gctx, alig0, alig1 );
+        produce_sam( alig1->sam, sizeof alig1->sam, gctx, alig1, alig0 );
+    }
+    else
+    {
+        alig0->refbases = read_refbases( alig0->refname, alig0->refpos, alig0->reflen, &alig0->bases_in_ref );
+        alig1->refbases = NULL;
+        alig1->bases_in_ref    = 0;
+        
+        cigar_t_2_read( alig0->read, sizeof alig0->read, alig0->cigar, alig0->refbases, gctx->insbases );
+        alig1->read[ 0 ] = 0;
+        
+        produce_sam( alig0->sam, sizeof alig0->sam, gctx, alig0, alig1 );
+        alig1->sam[ 0 ] = 0;
+    }
+}
+
+rc_t CC KMain( int argc, char *argv [] )
+{
+    rc_t rc = KOutHandlerSet ( write_to_FILE, stdout );
+    if ( rc == 0 )
+    {
+        Args * args;
+
+        int n_options = sizeof Options / sizeof Options[ 0 ];
+        rc = ArgsMakeAndHandle( &args, argc, argv, 1,  Options, n_options );
+        if ( rc == 0 )
+        {
+            gen_context gctx;
+            
+            read_context( args, &gctx );
+            
+            if ( get_bool_option( args, OPTION_SHOW ) )
+                show_details( &gctx );
+            else if ( get_bool_option( args, OPTION_REF ) )
+                KOutMsg ( "%s\n", gctx.alig[ 0 ].refbases );
+            else if ( get_bool_option( args, OPTION_MDTAG ) )
+                show_mdtag( &gctx );
+            else if ( gctx.flags > 0 )
+                explain_flags( gctx.flags );
+            else
+                generate_alignment( &gctx );
+
+            release_alig( &gctx.alig[ 0 ] );
+            if ( gctx.tlen != 0 )
+                release_alig( &gctx.alig[ 1 ] );
+            
+            ArgsWhack( args );
+        }
+    }
+    return rc;
+}
+
diff --git a/test/samline/bx_tag_test.py b/test/samline/bx_tag_test.py
new file mode 100755
index 0000000..3448d52
--- /dev/null
+++ b/test/samline/bx_tag_test.py
@@ -0,0 +1,27 @@
+#!/opt/python-all/bin/python
+from sam import *
+
+REF   = "NC_011752.1"
+ALIAS = "c1"
+CSRA1 = "X.CSRA"
+
+def load( L ) :
+    R1 = bam_load( L, CSRA1, "--make-spots-with-secondary -E0 -Q0" )
+    print "bam-load = %d"%( R1 )
+
+def load_and_print( L ) :
+    load( L )
+    sam_dump( CSRA1 )
+
+
+def test1() :
+    A1 = make_prim( "A1", 0, REF, ALIAS, 17000, 20, "60M" )
+    A2 = make_prim( "A2", 0, REF, ALIAS, 12500, 20, "50M" )
+    A1.pair_with( A2 )
+
+    A1.set_tags( "BX:Z:i_am_a_BX_tag" )
+    
+    load_and_print( [ A1, A2 ] )
+
+
+test1()
diff --git a/test/samline/ca_test.py b/test/samline/ca_test.py
new file mode 100755
index 0000000..c8e30e3
--- /dev/null
+++ b/test/samline/ca_test.py
@@ -0,0 +1,80 @@
+#!/opt/python-all/bin/python
+from sam import *
+
+def dump( acc ) :
+    print "%s.SEQ"%(acc)
+    vdb_dump( acc, "-C SPOT_ID,READ -l0 -f tab" )
+    print "%s.PRIM"%( acc )
+    vdb_dump( acc, "-T PRIMARY_ALIGNMENT -C ALIGN_ID,READ -l0, -f tab" )
+    print "%s.SEC"%( acc )
+    vdb_dump( acc, "-T SECONDARY_ALIGNMENT -C ALIGN_ID,READ -l0 -f tab" )
+
+REF   = "NC_011752.1"
+ALIAS = "c1"
+CSRA1 = "AFTER_BAM_LOAD.CSRA"
+CSRA2 = "AFTER_SRA_SORT.CSRA"
+
+def load_sort( L ) :
+    R1 = bam_load( L, CSRA1, "--make-spots-with-secondary -L 3 -E0 -Q0" )
+    if R1 == 1 :
+        print "bam-load = OK"
+        R2 = sra_sort( CSRA1, CSRA2 )
+        if R2 == 1 :
+            print "sra-sort = OK"
+        else :
+            print "sra-sort = FAILED"
+    else :
+        print "bam-load = FAILED"
+        
+def load_sort_print( L ) :
+    load_sort( L )
+    dump( CSRA1 )
+    dump( CSRA2 )
+
+
+def test1() :
+    print "test #1 --------------------------------------------------"
+    print "...having a single recondary alignmnet without a primary it belongs to"
+    A1 = make_prim( "A1", 0, REF, ALIAS, 17000, 20, "60M" )
+    A2 = make_prim( "A2", 0, REF, ALIAS, 12500, 20, "50M" )
+    A1.pair_with( A2 )
+
+    A3 = make_prim( "A3", 0, REF, ALIAS, 33000, 20, "60M" )
+    U1 = make_unaligned( "U1", 0, "ACTTTAGTAAGGGGTTNN" )
+
+    A4 = make_sec( "A4", 0, REF, ALIAS, 19000, 20, "60M" )
+    A4.link_to( A1 )
+
+    A5 = make_sec( "A5", 0, REF, ALIAS, 22000, 20, "30M" )
+    
+    load_sort_print( [ A1, A2, A3, A4, U1, A5 ] )
+
+# the resulting X.CSRA and S.CSRA produce errors in seq_restore_read_impl2
+def test2() :
+    print "test #2 --------------------------------------------------"
+    print "...having a pair of a prim. and a sec. alignment"
+    print "= SEQUENCE-table cannot reconstruct READ"
+    A1 = make_prim( "A1", 0, REF, ALIAS, 17000, 20, "60M" )
+    A2 = make_sec( "A2", 0, REF, ALIAS, 12500, 20, "50M" )
+    A1.pair_with( A2 )
+
+    load_sort_print( [ A1, A2 ] )
+
+# the resulting X.CSRA produces errors in seq_restore_read_impl2
+# but S.CSRA sefaults in vdb-dump!
+def test3() :
+    print "test #3 --------------------------------------------------"
+    A1 = make_prim( "A1", 0, REF, ALIAS, 1000, 20, "53M" )
+    A2 = make_sec( "A2", 0, REF, ALIAS, 3500, 20, "50M" )
+    A1.pair_with( A2 )
+
+    A3 = make_sec( "A3", 0, REF, ALIAS, 6800, 20, "55M" )
+    A3.flags |= FLAG_NEXT_UNMAPPED
+
+    load_sort_print( [ A3, A1, A2 ] )
+
+
+test1()
+test2()
+test3()
+
diff --git a/test/samline/cigar.c b/test/samline/cigar.c
new file mode 100644
index 0000000..6193699
--- /dev/null
+++ b/test/samline/cigar.c
@@ -0,0 +1,446 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/printf.h>
+#include <klib/out.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "cigar.h"
+
+struct cigar_t
+{
+    char * op;
+    int * count;
+    size_t size, length;
+};
+
+
+static void init_cigar_t( struct cigar_t * c, size_t size )
+{
+    if ( c != NULL )
+    {
+        c->size = 0;
+        c->length = 0;
+        c->op = malloc( sizeof( c->op[ 0 ] ) * size );
+        if ( c->op != NULL )
+        {
+            c->count = malloc( sizeof( c->count[ 0 ] ) * size );
+            if ( c->count != NULL )
+                c->size = size;
+            else
+                free( ( void * ) c->op );
+        }
+    }
+}
+
+
+static void resize_cigar_t( struct cigar_t * c, size_t new_size )
+{
+    if ( c != NULL )
+    {
+        if ( c->size == 0 )
+            init_cigar_t( c, new_size );
+        else if ( c->size < new_size )
+        {
+            char * temp_op = c->op;
+            c->op = realloc( c->op, sizeof( c->op[ 0 ] ) * new_size );
+            if ( c->op != NULL )
+            {
+                int * temp_count = c->count;
+                c->count = realloc( c->count, sizeof( c->count[ 0 ] ) * new_size );
+                if ( c->count != NULL )
+                    c->size = new_size;
+                else
+                    c->count = temp_count;
+            }
+            else
+                c->op = temp_op;
+        }
+    }
+}
+
+static void append_to_cigar_t( struct cigar_t * c, char op, int count )
+{
+    if ( c->length < c->size )
+    {
+        c->op[ c->length ] = op;
+        c->count[ c->length ++ ] = count;
+    }
+}
+
+void parse_cigar_t( struct cigar_t * c, const char * cigar_str )
+{
+    if ( c != NULL && cigar_str != NULL && cigar_str[ 0 ] != 0 )
+    {
+        resize_cigar_t( c, strlen( cigar_str ) );
+        if ( c->size > 0 )
+        {
+            int count = 0;
+            while ( *cigar_str != 0 && c->length < c->size )
+            {
+                if ( isdigit( *cigar_str ) )
+                {
+                    count = ( count * 10 ) + ( *cigar_str - '0' );
+                }
+                else
+                {
+                    if ( count == 0 ) count = 1;
+                    append_to_cigar_t( c, *cigar_str, count );
+                    count = 0;
+                }
+                cigar_str++;
+            }
+        }
+    }
+}
+
+
+struct cigar_t * make_cigar_t( const char * cigar_str )
+{
+    struct cigar_t * res = malloc( sizeof * res );
+    if ( res != NULL )
+    {
+        size_t size;
+        if ( cigar_str != NULL && cigar_str[ 0 ] != 0 )
+            size = strlen( cigar_str );
+        else
+            size = 1024;
+        init_cigar_t( res, size );
+        if ( res->size == size )
+            parse_cigar_t( res, cigar_str );
+    }
+    return res;
+}
+
+
+void free_cigar_t( struct cigar_t * c )
+{
+    if ( c != NULL )
+    {
+        if ( c->op != NULL )
+        {
+            free( ( void * ) c->op );
+            c->op = NULL;
+        }
+        if ( c->count != NULL )
+        {
+            free( ( void * ) c->count );
+            c->count = NULL;
+        }
+        free( ( void * ) c );
+    }
+}
+
+
+int cigar_t_reflen( const struct cigar_t * c )
+{
+    int res = 0;
+    if ( c != NULL )
+    {
+        int i;
+        for ( i = 0; i < c->length; ++i )
+        {
+            switch( c->op[ i ] )
+            {
+                case 'A'    : res += c->count[ i ]; break;
+                case 'C'    : res += c->count[ i ]; break;
+                case 'G'    : res += c->count[ i ]; break;
+                case 'T'    : res += c->count[ i ]; break;
+
+                case 'D'    : res += c->count[ i ]; break;
+                case 'M'    : res += c->count[ i ]; break;            
+            }
+        }
+    }
+    return res;
+}
+
+
+int cigar_t_readlen( const struct cigar_t * c )
+{
+    int res = 0;
+    if ( c != NULL )
+    {
+        int i;
+        for ( i = 0; i < c->length; ++i )
+        {
+            if ( c->op[ i ] != 'D' )
+                res += c->count[ i ];
+        }
+    }
+    return res;
+}
+
+
+int cigar_t_inslen( const struct cigar_t * c )
+{
+    int res = 0;
+    if ( c != NULL )
+    {
+        int i;
+        for ( i = 0; i < c->length; ++i )
+        {
+            if ( c->op[ i ] == 'I' )
+                res += c->count[ i ];
+        }
+    }
+    return res;
+}
+
+
+size_t cigar_t_string( char * buffer, size_t buf_len, const struct cigar_t * c )
+{
+    size_t res = 0;
+    if ( buffer != NULL && buf_len > 0 && c != NULL && c->length > 0 )
+    {
+        int i;
+        for ( i = 0; i < c->length && res < buf_len; ++i )
+        {
+            size_t num_writ;
+            string_printf( &buffer[ res ], buf_len - res, &num_writ,
+                        "%d%c", c->count[ i ], c->op[ i ] );
+            res += num_writ;
+        }
+        if ( res < buf_len )
+            buffer[ res ] = 0;
+    }
+    return res;
+}
+
+
+void debug_cigar_t( const struct cigar_t * c )
+{
+    if ( c != NULL )
+    {
+        int i;
+        for ( i = 0; i < c->length; ++i )
+            KOutMsg( "c[%d]: %d x %c\n", i, c->count[ i ], c->op[ i ] );
+    }
+}
+
+static int can_merge( char op1, char op2 )
+{
+    char mop1 = op1;
+    char mop2 = op2;
+    if ( mop1 == 'A' || mop1 == 'C' || mop1 == 'G' || mop1 == 'T' )
+        mop1 = 'M';
+    if ( mop2 == 'A' || mop2 == 'C' || mop2 == 'G' || mop2 == 'T' )
+        mop2 = 'M';
+    return ( mop1 == mop2 );
+}
+
+
+struct cigar_t * merge_cigar_t( const struct cigar_t * c )
+{
+    struct cigar_t * res = NULL;
+    if ( c != NULL && c -> length > 0 )
+    {
+        res = malloc( sizeof * res );
+        if ( res != NULL )
+        {
+            init_cigar_t( res, c->size );
+            if ( res->size == c->size )
+            {
+                int i, last;
+                append_to_cigar_t( res, c->op[ 0 ], c->count[ 0 ] );
+                for ( i = 1; i < c->length; ++i )
+                {
+                    last = res->length - 1;
+                    if ( can_merge( c->op[ i ], res->op[ last ] ) )
+                    {
+                        res->count[ last ] += c->count[ i ];
+                        res->op[ last ] = 'M';
+                    }
+                    else
+                        append_to_cigar_t( res, c->op[ i ], c->count[ i ] );    
+                }
+            }
+        }
+    }
+    return res;
+}
+
+
+static void append_base( char * buffer, size_t buf_len, size_t * buf_idx, int count, char c )
+{
+    int i;
+    for ( i = 0; i < count && *buf_idx < buf_len; ++i )
+        buffer[ (*buf_idx)++ ] = c;
+}
+
+static void append_bases( char * buffer, size_t buf_len, size_t * buf_idx, int count,
+                          const char * src, int src_len, int *src_idx )
+{
+    int i;
+    for ( i = 0; i < count && *buf_idx < buf_len && *src_idx < src_len; ++i )
+        buffer[ (*buf_idx)++ ] = src[ (*src_idx)++ ];
+}
+
+
+size_t cigar_t_2_read( char * buffer, size_t buf_len,
+                       const struct cigar_t * c, const char * ref_bases, const char * ins_bases )
+{
+    size_t res = 0;
+    if ( buffer != NULL && buf_len > 0 && c != NULL )
+    {
+        int readlen = cigar_t_readlen( c );
+        if ( readlen > 0 )
+        {
+            int needed_ref_bases = cigar_t_reflen( c );
+            int available_ref_bases = ref_bases != NULL ? strlen( ref_bases ) : 0;
+            if ( available_ref_bases >= needed_ref_bases )
+            {
+                int needed_ins_bases = cigar_t_inslen( c );
+                int available_ins_bases = ins_bases != NULL ? strlen( ins_bases ) : 0;    
+                if ( available_ins_bases >= needed_ins_bases )
+                {
+                    int ref_idx = 0;
+                    int ins_idx = 0;
+                    int cigar_idx;
+                    for ( cigar_idx = 0; cigar_idx < c->length; ++cigar_idx )
+                    {
+                        int count = c->count[ cigar_idx ];
+                        switch ( c->op[ cigar_idx ] )
+                        {
+                            case 'A' : append_base( buffer, buf_len, &res, count, 'A' );
+                                        ref_idx += count;
+                                        break;
+
+                            case 'C' : append_base( buffer, buf_len, &res, count, 'C' );
+                                        ref_idx += count;
+                                        break;
+
+                            case 'G' : append_base( buffer, buf_len, &res, count, 'G' );
+                                        ref_idx += count;                                                
+                                        break;
+
+                            case 'T' : append_base( buffer, buf_len, &res, count, 'T' );
+                                        ref_idx += count;                                                
+                                        break;
+
+                            case 'D' : ref_idx += count;
+                                        break;
+                            
+                            case 'I' : append_bases( buffer, buf_len, &res, count,
+                                                      ins_bases, available_ins_bases, &ins_idx );
+                                        break;
+
+                            case 'M' : append_bases( buffer, buf_len, &res, count,
+                                                      ref_bases, available_ref_bases, &ref_idx );
+                                        break;
+                        }
+                    }
+                    if ( res < buf_len )
+                        buffer[ res ] = 0;
+                }
+            }
+        }
+    }
+    return res;
+}
+
+
+static void print_matchcount( char * buffer, size_t buf_len, size_t *buf_idx, int *match_count )
+{
+    size_t num_writ;
+    string_printf( &buffer[ *buf_idx ], buf_len - *buf_idx, &num_writ,    "%d", *match_count );
+    *match_count = 0;
+    *buf_idx += num_writ;
+}
+
+static void md_delete( char * buffer, size_t buf_len, size_t *buf_idx, int count, int *match_count,
+                        const char * reference, int *ref_idx )
+{
+    if ( *match_count > 0 )
+        print_matchcount( buffer, buf_len, buf_idx, match_count );
+        
+    if ( *buf_idx + count + 1 < buf_len )
+    {
+        int i;
+        buffer[ (*buf_idx)++ ] = '^';
+        for ( i = 0; i < count; ++i )
+            buffer[ (*buf_idx)++ ] = reference[ (*ref_idx)++ ];
+    }
+}
+
+static void md_match( char * buffer, size_t buf_len, size_t *buf_idx, int count, int *match_count,
+                      const char * read, int *read_idx, const char *reference, int *ref_idx )
+{
+    int i;
+    for ( i = 0; i < count; ++i )
+    {
+        if ( read[ (*read_idx)++ ] == reference[ *ref_idx ] )
+        {
+            (*match_count)++;
+        }
+        else
+        {
+            print_matchcount( buffer, buf_len, buf_idx, match_count );
+            if ( *buf_idx < buf_len )
+                buffer[ (*buf_idx)++ ] = reference[ *ref_idx ];
+        }
+        (*ref_idx)++;
+    }
+}
+
+size_t md_tag( char * buffer, size_t buf_len,
+               const struct cigar_t * c, const char * read, const char * reference )
+{
+    size_t res = 0;
+    if ( buffer != NULL && buf_len > 0 && c != NULL )
+    {
+        int read_idx = 0;
+        int ref_idx = 0;
+        int match_count = 0;
+        int cigar_idx;
+        for ( cigar_idx = 0; cigar_idx < c->length; ++cigar_idx )
+        {
+            int count = c->count[ cigar_idx ];
+            switch ( c->op[ cigar_idx ] )
+            {
+                case 'D' :     md_delete( buffer, buf_len, &res, count, &match_count,    
+                                       reference, &ref_idx );
+                            break;
+                
+                case 'I' : read_idx += count; break;
+
+                case 'M' : md_match( buffer, buf_len, &res, count, &match_count,
+                                      read, &read_idx, reference, &ref_idx );
+                            break;
+            }
+        }
+        if ( match_count > 0 )
+            print_matchcount( buffer, buf_len, &res, &match_count );
+            
+        if ( res < buf_len )
+            buffer[ res ] = 0;
+    }
+    return res;
+}
diff --git a/test/samline/cigar.h b/test/samline/cigar.h
new file mode 100644
index 0000000..75bb6a8
--- /dev/null
+++ b/test/samline/cigar.h
@@ -0,0 +1,59 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_cigar_
+#define _h_cigar_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct cigar_t;
+
+struct cigar_t * make_cigar_t( const char * cigar_str );
+void free_cigar_t( struct cigar_t * c );
+
+int cigar_t_reflen( const struct cigar_t * c );
+int cigar_t_readlen( const struct cigar_t * c );
+int cigar_t_inslen( const struct cigar_t * c );
+
+size_t cigar_t_string( char * buffer, size_t buf_len, const struct cigar_t * c );
+
+struct cigar_t * merge_cigar_t( const struct cigar_t * c );
+
+size_t md_tag( char * buffer, size_t buf_len,
+               const struct cigar_t * c, const char * read, const char * reference );
+
+void debug_cigar_t( const struct cigar_t * c );
+
+size_t cigar_t_2_read( char * buffer, size_t buf_len,
+                       const struct cigar_t * c, const char * ref_bases, const char * ins_bases );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/test/samline/example.sh b/test/samline/example.sh
new file mode 100755
index 0000000..4c385f3
--- /dev/null
+++ b/test/samline/example.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+execute()
+{
+    echo "------------------------------------------------------"
+    echo $1
+    eval $1
+    echo "."
+}
+
+# call: produce_SAM "$CONFIG" "$SAMFILE"
+produce_SAM()
+{
+    SAMLINE_BINARY="samline"
+    REFNAME="NC_011752.1"
+    REFPOS1=1000
+    REFPOS2=3500
+    CIGAR1="30MAAA20M"
+    CIGAR2="50M2D10M"
+    execute "$SAMLINE_BINARY -r $REFNAME -p $REFPOS1 -p $REFPOS2 -c $CIGAR1 -c $CIGAR2 -n $1 -d > $2"
+}
+
+# call: convert_SAM_to_BAM "$SAMFILE" "$BAMFILE"
+convert_SAM_to_BAM()
+{
+    SAMTOOLS_BINARY="/netopt/ncbi_tools64/samtools/bin/samtools"
+    execute "$SAMTOOLS_BINARY view -bS $1 > $2"
+}
+
+# call: load_BAM_to_CSRA "$CONFIG" "$BAMFILE" "$TEMP_DIR"
+load_BAM_to_CSRA()
+{
+    BAMLOAD_BINARY="bam-load"
+    execute "$BAMLOAD_BINARY -L 3 -o $3 -k $1 -E0 -Q0 $2"
+}
+
+# call: load_SAM_to_CSRA "$CONFIG" "$SAMFILE" "$TEMP_DIR"
+load_SAM_to_CSRA()
+{
+    BAMLOAD_BINARY="bam-load"
+    execute "cat $2 | $BAMLOAD_BINARY -L 3 -o $3 -k $1 -E0 -Q0 /dev/stdin"
+}
+
+# call: kar_CSRA "$FINAL_CSRA" "$TEMP_DIR"
+kar_CSRA()
+{
+    KAR_BINARY="kar"
+    execute "$KAR_BINARY --create $1 -d $2 -f"
+}
+
+SAMFILE="temp.SAM"
+CONFIG="temp.kfg"
+TEMP_DIR="temp_csra"
+FINAL_CSRA="test.csra"
+
+produce_SAM "$CONFIG" "$SAMFILE"
+load_SAM_to_CSRA "$CONFIG" "$SAMFILE" "$TEMP_DIR"
+kar_CSRA "$FINAL_CSRA" "$TEMP_DIR"
+
+execute "rm -rf $TEMP_DIR $SAMFILE $CONFIG"
+execute "vdb-dump $FINAL_CSRA --info"
diff --git a/test/samline/refbases.c b/test/samline/refbases.c
new file mode 100644
index 0000000..45d375d
--- /dev/null
+++ b/test/samline/refbases.c
@@ -0,0 +1,184 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/rc.h>
+
+#include <kfs/directory.h>
+
+#include <vdb/manager.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <string.h>
+
+#include "refbases.h"
+
+static uint32_t read_uint32( const VCursor * cur, uint32_t col_idx )
+{
+    uint32_t elem_bits, boff, row_len;
+    const uint32_t * value;
+    rc_t rc = VCursorCellDataDirect ( cur, 1, col_idx, &elem_bits, (const void**)&value, &boff, &row_len );
+    if ( rc == 0 )
+        return *value;
+    return 0;
+}
+
+static uint32_t read_buffer( const VCursor * cur, char * buffer, int64_t row_id,
+                             uint32_t offset, size_t buflen, uint32_t col_idx )
+{
+    uint32_t elem_bits, boff, row_len, res = 0;
+    const char * value;
+    rc_t rc = VCursorCellDataDirect ( cur, row_id, col_idx, &elem_bits, (const void**)&value, &boff, &row_len );
+    if ( rc == 0 && row_len > offset )
+    {
+        res = ( row_len - offset );
+        if ( res > buflen ) res = buflen;
+        memcpy ( buffer, &value[ offset ], res );
+    }
+    return res;
+}
+
+
+static uint32_t read_bases( const VCursor * cur, char * buffer, uint32_t ref_pos_1_based, 
+                            uint32_t ref_len, uint32_t col_idx, uint32_t max_seq_len )
+{
+    uint32_t res = 0, n_read = 1;
+    uint32_t row_id = ( ( ref_pos_1_based - 1 ) / max_seq_len ) + 1;
+    uint32_t offset = ( ref_pos_1_based - 1 ) - ( ( row_id - 1 ) * max_seq_len );
+    size_t buflen = ref_len;
+    while ( res < ref_len && n_read > 0 )
+    {
+        n_read = read_buffer( cur, &buffer[ res ], row_id++, offset, buflen, col_idx );
+        res += n_read;
+        buflen -= n_read;
+        offset = 0;
+    }
+    return res;
+}
+
+
+char * read_refbases( const char * refname, uint32_t ref_pos_1_based, uint32_t ref_len, uint32_t * bases_in_ref )
+{
+    char * res = NULL;
+    KDirectory * dir;
+    rc_t rc = KDirectoryNativeDir( &dir );
+    if ( rc == 0 )
+    {
+        const VDBManager * mgr;
+        rc = VDBManagerMakeRead ( &mgr, dir );
+        if ( rc == 0 )
+        {
+            const VTable * tab;
+            rc = VDBManagerOpenTableRead( mgr, &tab, NULL, "%s", refname );
+            if ( rc == 0 )
+            {
+                const VCursor * cur;
+                rc = VTableCreateCursorRead( tab, &cur );
+                if ( rc == 0 )
+                {
+                    uint32_t base_count_idx, read_idx, max_seq_len_idx;
+                    rc = VCursorAddColumn( cur, &base_count_idx, "BASE_COUNT" );
+                    if ( rc == 0 )
+                    {
+                        rc = VCursorAddColumn( cur, &read_idx, "READ" );
+                        if ( rc == 0 )
+                        {
+                            rc = VCursorAddColumn( cur, &max_seq_len_idx, "MAX_SEQ_LEN" );
+                            if ( rc == 0 )
+                            {
+                                rc = VCursorOpen ( cur );
+                                if ( rc == 0 )
+                                {
+                                    uint32_t base_count = read_uint32( cur, base_count_idx );
+                                    if ( bases_in_ref != NULL )
+                                        *bases_in_ref = base_count;
+                                    uint32_t max_seq_len = read_uint32( cur, max_seq_len_idx );
+                                    if ( base_count > ( ref_pos_1_based + ref_len ) && max_seq_len > 0 )
+                                    {
+                                        res = malloc( ref_len + 1 );
+                                        if ( res != NULL )
+                                        {
+                                            uint32_t n_read = read_bases( cur, res, ref_pos_1_based,
+                                                                          ref_len, read_idx, max_seq_len );
+                                            res[ n_read ] = 0;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    VCursorRelease( cur );
+                }
+                VTableRelease( tab );
+            }
+            VDBManagerRelease( mgr );
+        }
+        KDirectoryRelease( dir );
+    }
+    return res;
+}
+
+
+uint32_t ref_len( const char * refname )
+{
+    uint32_t res = 0;
+    KDirectory * dir;
+    rc_t rc = KDirectoryNativeDir( &dir );
+    if ( rc == 0 )
+    {
+        const VDBManager * mgr;
+        rc = VDBManagerMakeRead ( &mgr, dir );
+        if ( rc == 0 )
+        {
+            const VTable * tab;
+            rc = VDBManagerOpenTableRead( mgr, &tab, NULL, "%s", refname );
+            if ( rc == 0 )
+            {
+                const VCursor * cur;
+                rc = VTableCreateCursorRead( tab, &cur );
+                if ( rc == 0 )
+                {
+                    uint32_t base_count_idx;
+                    rc = VCursorAddColumn( cur, &base_count_idx, "BASE_COUNT" );
+                    if ( rc == 0 )
+                    {
+                        rc = VCursorOpen ( cur );
+                        if ( rc == 0 )
+                            res = read_uint32( cur, base_count_idx );
+                    }
+                    VCursorRelease( cur );
+                }
+                VTableRelease( tab );
+            }
+            VDBManagerRelease( mgr );
+        }
+        KDirectoryRelease( dir );
+    }
+    return res;
+}
diff --git a/test/samline/refbases.h b/test/samline/refbases.h
new file mode 100644
index 0000000..e229559
--- /dev/null
+++ b/test/samline/refbases.h
@@ -0,0 +1,43 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_refbases_
+#define _h_refbases_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+char * read_refbases( const char * refname, uint32_t ref_pos_1_based,
+                      uint32_t ref_len, uint32_t * bases_in_ref );
+                      
+uint32_t ref_len( const char * refname );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/test/samline/reject_multi_refnames.sh b/test/samline/reject_multi_refnames.sh
new file mode 100755
index 0000000..bd554e2
--- /dev/null
+++ b/test/samline/reject_multi_refnames.sh
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+execute()
+{
+    echo "------------------------------------------------------"
+    echo $1
+    eval $1
+    echo "."
+}
+
+# call: produce_SAM "$SAMFILE" "$CONFIG"
+produce_SAM()
+{
+    SAMLINE_BINARY="samline"
+    
+    OUTFILE=$1
+    CONFIG=$2
+
+    REFNAME="NC_011752.1"
+    REFALIAS0="c1"
+    REFALIAS1="c2"
+    REFPOS0=1000
+    REFPOS1=3500
+    CIGAR0="50M"
+    CIGAR1="50M"
+    
+    ALIG0="-r $REFNAME -b $REFALIAS0 -p $REFPOS0 -c $CIGAR0"
+    ALIG1="-r $REFNAME -b $REFALIAS1 -p $REFPOS1 -c $CIGAR1"
+    #ALIG0="-r $REFNAME -p $REFPOS0 -c $CIGAR0"
+    #ALIG1="-r $REFNAME -p $REFPOS1 -c $CIGAR1"
+    WRITE_CONFIG="-n $CONFIG"
+    WRITE_HDR="-d" 
+    
+    execute "$SAMLINE_BINARY $ALIG0 $ALIG1 $WRITE_HDR $WRITE_CONFIG > $OUTFILE"
+}
+
+# call: load_SAM_to_CSRA "$CONFIG" "$SAMFILE" "$TEMP_DIR"
+load_SAM_to_CSRA()
+{
+    BAMLOAD_BINARY="bam-load"
+    execute "cat $2 | $BAMLOAD_BINARY -L 5 -o $3 -k $1 -E0 -Q0 /dev/stdin" # --allow-multi-map"
+}
+
+# call: kar_CSRA "$FINAL_CSRA" "$TEMP_DIR"
+kar_CSRA()
+{
+    KAR_BINARY="kar"
+    execute "$KAR_BINARY --create $1 -d $2 -f"
+}
+
+PREFIX="RMF"
+SAMFILE="${PREFIX}.SAM"
+CONFIG="${PREFIX}.kfg"
+TEMP_DIR="${PREFIX}_csra"
+FINAL_CSRA="${PREFIX}.csra"
+
+#produce_SAM "$SAMFILE" "$CONFIG"
+#execute "rm -rf $TEMP_DIR"
+load_SAM_to_CSRA "$CONFIG" "$SAMFILE" "$TEMP_DIR"
+#kar_CSRA "$FINAL_CSRA" "$TEMP_DIR"
+#execute "rm -rf $TEMP_DIR"
+#execute "vdb-dump $FINAL_CSRA --info"
\ No newline at end of file
diff --git a/test/samline/sam.py b/test/samline/sam.py
new file mode 100644
index 0000000..67d7284
--- /dev/null
+++ b/test/samline/sam.py
@@ -0,0 +1,339 @@
+import subprocess
+import os
+import shutil
+
+'''---------------------------------------------------------------
+helper function: generate READ from cigar,refname,refpos
+---------------------------------------------------------------'''
+def cigar2read( cigar, pos, ref ):
+    cmd = "sampart -f read -c %s -p %d -r %s"%( cigar, pos, ref )
+    return subprocess.check_output( cmd, shell = True )
+
+'''---------------------------------------------------------------
+helper function: generate random QUALITY of given length
+---------------------------------------------------------------'''
+def rnd_qual( l ):
+    cmd = "sampart -f qual -l %d -s 7"%( l )
+    return subprocess.check_output( cmd, shell = True )
+
+'''---------------------------------------------------------------
+helper function: transform cigar with given inserts into
+a 'clean' cigar, bam-load does accept
+---------------------------------------------------------------'''
+def merge_cigar( cigar ):
+    cmd = "sampart -f cigar -c %s"%( cigar )
+    return subprocess.check_output( cmd, shell = True )
+
+'''---------------------------------------------------------------
+helper function: to get length of a reference ( from the RefSeq-Acc )
+---------------------------------------------------------------'''
+def ref_len( ref ):
+    cmd = "sampart -f rlen -r %s"%( ref )
+    return int( subprocess.check_output( cmd, shell = True ) )
+
+'''---------------------------------------------------------------
+helper function: remove a file, without error if it does not exist
+---------------------------------------------------------------'''
+def rm_file( filename ) :
+    try:
+        os.remove( filename )
+    except:
+        pass
+
+'''---------------------------------------------------------------
+helper function: remove a direcotry, without error if it does not exist
+---------------------------------------------------------------'''
+def rm_dir( dirname ) :
+    try:
+        shutil.rmtree( dirname, ignore_errors=True )
+    except:
+        pass
+
+def load_file( filename ) :
+    if os.path.isfile( filename ) :
+        with open( filename, "r" ) as the_file:
+            return the_file.read()
+    return ""
+
+def print_file( filename ) :
+    s = load_file( filename )
+    if len( s ) > 0 :
+        print s
+
+def print_txt( txt ) :
+    if len( txt ) > 0 :
+        print txt
+
+def print_txt_list( list ) :
+    for a in list :
+        print_txt( a )
+
+'''===============================================================
+preform a bam-load on a python-list of SAM-objects
+    will create temporary files and directory ( x.sam, x.kfg, x_csra )
+    writes the content of the python-list into x.sam
+    writes a config file into x.kfg
+    performs bam-load, and prints it's output
+    kar's the created directory into the given output-file
+    can be asked to keep the temporary files
+    list ........ list of SAM-objects
+    output....... name of cSRA-file to be created
+    params....... parameters passed into bam-load
+    keep_files... False/True for debugging temp. files
+==============================================================='''
+def bam_load( list, output, params, keep_files = False ) :
+    res = 0
+    txt1=""
+    txt2=""
+    try :
+        rm_dir( "x_csra" )
+        rm_file( output )
+        rm_file( "err.txt" )
+        save_sam( list, "x.sam" )
+        save_config( list, "x.kfg" )
+        cmd = "bam-load %s -o x_csra -k x.kfg x.sam 2>err.txt"%( params )
+        txt1 = subprocess.check_output( cmd, shell=True )
+        cmd = "kar --create %s -d x_csra -f 2>err.txt"%( output )
+        txt2 = subprocess.check_output( cmd, shell=True )
+        if not keep_files :
+            rm_dir( "x_csra" )
+            rm_file( "x.sam" )
+            rm_file( "x.kfg" )
+        res = 1
+    except :
+        pass
+    print_txt_list( [ load_file( "err.txt" ), txt1, txt2 ] )
+    rm_file( "err.txt" )
+    return res
+
+
+'''===============================================================
+preform a sra-sort on a given cSRA-file
+    will create a temporary directory ( x_csra )
+    performs sra-sort, and prints it's output
+    kar's the created directory into the given output-file
+    can be asked to keep the temporary files
+    list ........ list of SAM-objects
+    output....... name of cSRA-file to be created
+    params....... parameters passed into bam-load
+    keep_files... False/True for debugging temp. files
+==============================================================='''
+def sra_sort( input, output, params = "", keep_files = False ) :
+    res = 0
+    txt1 = ""
+    txt2 = ""
+    try :
+        rm_dir( "s_csra" )
+        rm_file( output )
+        rm_file( "err.txt" )
+        cmd = "sra-sort %s s_csra -f %s 2>err.txt"%( input, params )
+        txt1 = subprocess.check_output( cmd, shell=True )
+        cmd = "kar --create %s -d s_csra -f 2>err.txt"%( output )
+        txt2 = subprocess.check_output( cmd, shell=True )
+        if not keep_files :
+            rm_dir( "s_csra" )
+        res = 1
+    except :
+        pass
+    print_txt_list( [ load_file( "err.txt" ), txt1, txt2 ] )
+    rm_file( "err.txt" )
+    return res
+
+
+def vdb_dump( accession, params = "" ) :
+    try :
+        cmd = "vdb-dump %s %s"%( accession, params )
+        txt = subprocess.check_output( cmd, stderr=subprocess.STDOUT, shell=True )
+        print txt
+        return 1
+    except :
+        pass
+    return 0
+
+def sam_dump( accession, params = "" ) :
+    try :
+        cmd = "sam-dump %s %s"%( accession, params )
+        txt = subprocess.check_output( cmd, stderr=subprocess.STDOUT, shell=True )
+        print txt
+        return 1
+    except :
+        pass
+    return 0
+
+'''===============================================================
+all 11 different SAM-Flags
+==============================================================='''
+FLAG_MULTI = 0x01
+FLAG_PROPPER = 0x02
+FLAG_UNMAPPED = 0x04
+FLAG_NEXT_UNMAPPED = 0x08
+FLAG_REVERSED = 0x010
+FLAG_NEXT_REVERSED = 0x020
+FLAG_FIRST = 0x040
+FLAG_LAST = 0x080
+FLAG_SECONDARY = 0x0100
+FLAG_BAD = 0x0200
+FLAG_PCR = 0x0400
+
+
+'''===============================================================
+    make a primary SAM-alignment
+==============================================================='''
+def make_prim( qname, flags, refname, refalias, pos, mapq, cigar, rnxt = "*", pnxt = "0" ) :
+    return SAM( qname, flags | FLAG_PROPPER, refname, refalias, pos, mapq, merge_cigar( cigar ), 
+        cigar2read( cigar, pos, refname ), rnxt, pnxt )
+
+
+'''===============================================================
+    make a secondary SAM-alignment
+==============================================================='''
+def make_sec( qname, flags, refname, refalias, pos, mapq, cigar, rnxt = "*", pnxt = "0" ) :
+    return SAM( qname, flags | FLAG_SECONDARY, refname, refalias, pos, mapq, merge_cigar( cigar ), 
+        cigar2read( cigar, pos, refname ), rnxt, pnxt )
+
+
+'''===============================================================
+    make a unaligned SAM
+==============================================================='''
+def make_unaligned( qname, flags, seq ) :
+    return SAM( qname, flags | FLAG_UNMAPPED, "-", "-", 0, 255, "*", seq, "-", 0 )
+
+
+'''---------------------------------------------------------------
+helper function: walk the list of SAM-objects, create a dictionary
+    key: refalias, value: refname
+    ( used in extract_headers and produce_config )
+---------------------------------------------------------------'''
+def make_refdict( list ) :
+    res = {}
+    for a in list :
+        res[ a.refalias ] = a.refname
+    return res
+
+'''---------------------------------------------------------------
+helper function: create SAM-headers from a list of SAM-objects
+    as a list of strings
+    used in print_sam and save_sam
+---------------------------------------------------------------'''
+def extract_headers( list ) :
+    reflist = make_refdict( list )
+    res = [ "@HD\tVN:1.3" ]
+    for k, v in reflist.items():
+        l = ref_len( v )
+        res.append( "@SQ\tSN:%s\tAS:%s\tLN:%d"%( k, k, l ) )
+    return res
+
+'''---------------------------------------------------------------
+helper function: create a config-file for bam-load out of
+    a list of SAM-objects
+    used in save_config
+---------------------------------------------------------------'''
+def produce_config( list ) :
+    reflist = make_refdict( list )
+    res = []
+    for k, v in reflist.items():
+        if k != "*" and k != "-" :
+            res.append( "%s\t%s"%( k, v ) )
+    return res
+
+'''---------------------------------------------------------------
+helper function: save config file created from list of SAM-objects
+    used in bam_load
+---------------------------------------------------------------'''
+def save_config( list, filename ) :
+    with open( filename, "w" ) as f:
+        for s in produce_config( list ) :
+            f.write( "%s\n"%( s ) )
+
+'''---------------------------------------------------------------
+helper function: prints a list of SAM-objects
+---------------------------------------------------------------'''
+def print_sam( list ):
+    for s in extract_headers( list ) :
+        print s
+    for s in list :
+        print s
+
+'''---------------------------------------------------------------
+helper function: save a list of SAM-objects as file
+    used in bam_load
+---------------------------------------------------------------'''
+def save_sam( list, filename ) :
+    with open( filename, "w" ) as f:
+        for s in extract_headers( list ) :
+            f.write( "%s\n"%( s ) )
+        for s in list :
+            f.write( "%s\n"%( s ) )
+
+'''===============================================================
+    SAM-object
+==============================================================='''
+class SAM:
+
+    def __init__( self, qname, flags, refname, refalias, pos, mapq, cigar, seq, rnxt, pnxt, tags="" ) :
+        self.qname = qname
+        self.flags = flags
+        self.refname = refname        
+        self.refalias = refalias
+        self.pos = pos
+        self.mapq = mapq
+        self.cigar = cigar
+        self.seq = seq
+        self.qual = rnd_qual( len( self.seq ) )
+        self.nxt_ref = rnxt
+        self.nxt_pos = pnxt
+        self.tlen = 0
+        self.tags = tags
+
+    def __str__( self ):
+        if len( self.tags ) > 0 :
+            return "%s\t%d\t%s\t%s\t%d\t%s\t%s\t%s\t%d\t%s\t%s\t%s"%( self.qname,
+                self.flags, self.refalias, self.pos, self.mapq, self.cigar, self.nxt_ref,
+                self.nxt_pos, self.tlen, self.seq, self.qual, self.tags )
+        else :
+            return "%s\t%d\t%s\t%s\t%d\t%s\t%s\t%s\t%d\t%s\t%s"%( self.qname,
+                self.flags, self.refalias, self.pos, self.mapq, self.cigar, self.nxt_ref,
+                self.nxt_pos, self.tlen, self.seq, self.qual )
+
+    def set_flag( self, flagbit, state ) :
+        if state :
+            self.flags |= flagbit
+        else :
+            self.flags &= ~flagbit
+
+    def set_tags( self, tag ) :
+        self.tags = tag
+
+    def add_tag( self, tag ) :
+        if len( self.tags ) > 0 :
+            self.tags += ";"
+            self.tags += tag
+        else :
+            self.tags = tag
+
+    def pair_with( self, other ) :
+        self.nxt_ref = other.refalias
+        self.nxt_pos = other.pos
+        other.nxt_ref = self.refalias
+        other.nxt_pos = self.pos
+        self.flags |= FLAG_MULTI
+        other.flags |= FLAG_MULTI
+        self.set_flag( FLAG_FIRST, True )
+        other.set_flag( FLAG_FIRST, False )
+        self.set_flag( FLAG_LAST, False )
+        other.set_flag( FLAG_LAST, True )
+        self.set_flag( FLAG_NEXT_UNMAPPED, other.flags & FLAG_UNMAPPED )
+        self.set_flag( FLAG_NEXT_REVERSED, other.flags & FLAG_REVERSED )
+        other.set_flag( FLAG_NEXT_UNMAPPED, self.flags & FLAG_UNMAPPED )
+        other.set_flag( FLAG_NEXT_REVERSED, self.flags & FLAG_REVERSED )
+        other.qname = self.qname
+
+    def link_to( self, other ) :
+        self.flags |= FLAG_MULTI
+        self.set_flag( FLAG_FIRST, other.flags & FLAG_FIRST )
+        self.set_flag( FLAG_LAST, other.flags & FLAG_LAST )
+        self.set_flag( FLAG_NEXT_UNMAPPED, other.flags & FLAG_UNMAPPED )
+        self.set_flag( FLAG_NEXT_REVERSED, other.flags & FLAG_REVERSED )
+        self.nxt_ref = other.refalias
+        self.nxt_pos = other.pos
+        self.qname = other.qname
diff --git a/test/samline/samline.vers b/test/samline/samline.vers
new file mode 100644
index 0000000..3eefcb9
--- /dev/null
+++ b/test/samline/samline.vers
@@ -0,0 +1 @@
+1.0.0
diff --git a/test/samline/sampart.c b/test/samline/sampart.c
new file mode 100644
index 0000000..e07c3f5
--- /dev/null
+++ b/test/samline/sampart.c
@@ -0,0 +1,304 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include "sampart.vers.h"
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+
+#include <klib/out.h>
+#include <klib/rc.h>
+#include <klib/printf.h>
+#include <klib/text.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "refbases.h"
+#include "cigar.h"
+
+#define DFLT_FUNCTION       "read"
+#define DFLT_REFNAME        "NC_011752.1"
+#define DFLT_REFPOS         10000
+#define DFLT_CIGAR          "50M"
+#define DFLT_INSBASES       "ACGTACGTACGT"
+#define DFLT_LEN            50
+#define DFLT_SEED           7
+
+static const char * function_usage[]       = { "which function to execute ( read, qual, cigar, rlen )", NULL };
+static const char * refname_usage[]        = { "the ref-seq-id to use 'NC_011752.1'", NULL };
+static const char * refpos_usage[]         = { "the position on the reference 0-based", NULL };
+static const char * cigar_usage[]          = { "the cigar-string to use", NULL };
+static const char * insbases_usage[]       = { "what bases to insert ( if needed )", NULL };
+static const char * len_usage[]            = { "length of random quality", NULL };
+static const char * seed_usage[]           = { "seed for random", NULL };
+
+#define OPTION_FUNCTION       "function"
+#define OPTION_REFNAME        "refname"
+#define OPTION_REFPOS         "refpos"
+#define OPTION_CIGAR          "cigar"
+#define OPTION_INSBASES       "insbases"
+#define OPTION_LEN            "len"
+#define OPTION_SEED           "seed"
+
+#define ALIAS_FUNCTION       "f"
+#define ALIAS_REFNAME        "r"
+#define ALIAS_REFPOS         "p"
+#define ALIAS_CIGAR          "c"
+#define ALIAS_INSBASES       "i"
+#define ALIAS_LEN            "l"
+#define ALIAS_SEED           "s"
+
+OptDef Options[] =
+{
+    { OPTION_FUNCTION,  ALIAS_FUNCTION, NULL, function_usage,  1,    true,     false },
+    { OPTION_REFNAME,   ALIAS_REFNAME,  NULL, refname_usage,   1,    true,     false },
+    { OPTION_REFPOS,    ALIAS_REFPOS,   NULL, refpos_usage,    1,    true,     false },
+    { OPTION_CIGAR,     ALIAS_CIGAR,    NULL, cigar_usage,     1,    true,     false },
+    { OPTION_INSBASES,  ALIAS_INSBASES, NULL, insbases_usage,  1,    true,     false },
+    { OPTION_LEN,       ALIAS_LEN,      NULL, len_usage,       1,    true,     false },
+    { OPTION_SEED,      ALIAS_SEED,     NULL, seed_usage,      1,    true,     false }
+};
+
+const char UsageDefaultName[] = "sampart";
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    return KOutMsg( "\nUsage:\n %s [options]\n\n", progname );
+}
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    int i, n_options;
+    rc_t rc;
+
+    if ( args == NULL )
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+        rc = ArgsProgram ( args, &fullpath, &progname );
+
+    if ( rc != 0 )
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary ( progname );
+    KOutMsg ( "Options:\n" );
+
+    n_options = sizeof Options / sizeof Options[ 0 ];
+    for ( i = 0; i < n_options; ++i )
+    {
+        OptDef * o = &Options[ i ];
+        HelpOptionLine( o->aliases, o->name, NULL, o->help );
+    }
+
+    KOutMsg ( "\n" );
+    HelpOptionsStandard ();
+    HelpVersion ( fullpath, KAppVersion() );
+
+    return rc;
+}
+
+
+/* Version  EXTERN
+ *  return 4-part version code: 0xMMmmrrrr, where
+ *      MM = major release
+ *      mm = minor release
+ *    rrrr = bug-fix release
+ */
+ver_t CC KAppVersion ( void )
+{
+    return SAMPART_VERS;
+}
+
+static const char * get_str_option( const Args * args, const char * name, uint32_t idx, const char * dflt )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    if ( ( rc == 0 )&&( count > idx ) )
+    {
+        const char * res = NULL;
+        ArgsOptionValue( args, name, idx, (const void **)&res );
+        return res;
+    }
+    else
+        return dflt;
+}
+
+static uint32_t get_uint32_option( const Args * args, const char * name, uint32_t idx, const uint32_t dflt )
+{
+    const char * s = get_str_option( args, name, idx, NULL );
+    if ( s == NULL )
+        return dflt;
+    return atoi( s );
+}
+
+static rc_t CC write_to_FILE ( void *f, const char *buffer, size_t bytes, size_t *num_writ )
+{
+    * num_writ = fwrite ( buffer, 1, bytes, f );
+    if ( * num_writ != bytes )
+        return RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+    return 0;
+}
+
+static rc_t make_read( const Args * args )
+{
+    rc_t rc = 0;
+    const char * cigar_str = get_str_option( args, OPTION_CIGAR, 0, DFLT_CIGAR );
+    struct cigar_t * cigar = make_cigar_t( cigar_str );
+    if ( cigar != NULL )
+    {
+        uint32_t reflen        = cigar_t_reflen( cigar );
+        uint32_t refpos        = get_uint32_option( args, OPTION_REFPOS, 0, DFLT_REFPOS );
+        const char * refname   = get_str_option( args, OPTION_REFNAME, 0, DFLT_REFNAME );
+        const char * refbases  = read_refbases( refname, refpos, reflen, NULL );
+        if ( refbases != NULL )
+        {
+            int read_len = cigar_t_readlen( cigar );
+            char * buffer = malloc( read_len + 1 );
+            if ( buffer != NULL )
+            {
+                const char * ins_bases  = get_str_option( args, OPTION_INSBASES, 0, DFLT_INSBASES );
+                cigar_t_2_read( buffer, read_len + 1, cigar, refbases, ins_bases );
+                rc = KOutMsg( "%s", buffer );
+                free( buffer );
+            }
+            free( ( void * )refbases );
+        }
+        free_cigar_t( cigar );
+    }
+    return rc;
+}
+
+
+static size_t random_string( char * buffer, size_t buflen, const char * char_set, size_t length )
+{
+    size_t res = 0;
+    if ( buffer != NULL && buflen > 0 )
+    {
+        const char dflt_charset[] = "0123456789"
+                                    "abcdefghijklmnopqrstuvwxyz"
+                                    "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+        const char * cs = ( char_set == NULL ) ? dflt_charset : char_set;
+        size_t charset_len = strlen( cs ) - 1;
+        while ( res < length && res < ( buflen - 1 ) )
+        {
+            size_t rand_idx = ( double ) rand() / RAND_MAX * charset_len;
+            buffer[ res++ ] = cs[ rand_idx ];
+        }
+        buffer[ res ] = 0;
+    }
+    return res;
+}
+
+
+static size_t random_quality( char * buffer, size_t buflen, size_t length )
+{
+    const char qualities[] = "!\"#$%&'()*+,-./0123456789:;<=>?"
+                             "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
+                             "`abcdefghijklmnopqrstuvwxyz{|}~";
+    return random_string( buffer, buflen, qualities, length );
+}
+
+
+static rc_t make_quality( const Args * args )
+{
+    rc_t rc = 0;
+    uint32_t len  = get_uint32_option( args, OPTION_LEN, 0, DFLT_LEN );
+    uint32_t seed = get_uint32_option( args, OPTION_SEED, 0, DFLT_SEED );
+    char * buffer = malloc( len + 1 );
+    if ( buffer != NULL )
+    {
+        if ( seed > 0 ) srand( seed );
+        random_quality( buffer, len + 1, len );
+        rc = KOutMsg( "%s", buffer );
+        free( buffer );
+    }
+    return rc;
+}
+
+static rc_t make_cigar( const Args * args )
+{
+    rc_t rc = 0;
+    const char * cigar_str = get_str_option( args, OPTION_CIGAR, 0, DFLT_CIGAR );
+    struct cigar_t * cigar = make_cigar_t( cigar_str );
+    if ( cigar != NULL )
+    {
+        char buffer[ 4096 ];
+        struct cigar_t * merged_cigar = merge_cigar_t( cigar );
+        cigar_t_string( buffer, sizeof buffer, merged_cigar );
+        rc = KOutMsg( "%s", buffer );
+        free_cigar_t( merged_cigar );
+        free_cigar_t( cigar );
+    }
+    return rc;
+}
+
+static rc_t get_ref_len( const Args * args )
+{
+    rc_t rc = 0;
+    const char * refname = get_str_option( args, OPTION_REFNAME, 0, DFLT_REFNAME );
+    if ( refname != NULL )
+        rc = KOutMsg( "%d", ref_len( refname ) );
+    return rc;
+}
+
+static const char function_read[] = "read";
+static const char function_qual[] = "qual";
+static const char function_cigar[] = "cigar";
+static const char function_rlen[] = "rlen";
+
+rc_t CC KMain( int argc, char *argv [] )
+{
+    rc_t rc = KOutHandlerSet ( write_to_FILE, stdout );
+    if ( rc == 0 )
+    {
+        Args * args;
+
+        int n_options = sizeof Options / sizeof Options[ 0 ];
+        rc = ArgsMakeAndHandle( &args, argc, argv, 1,  Options, n_options );
+        if ( rc == 0 )
+        {
+            const char * function = get_str_option( args, OPTION_FUNCTION, 0, DFLT_FUNCTION );
+
+            if ( 0 == strcase_cmp ( function, string_size( function ), function_read, 4, 4 ) )
+                rc = make_read( args );
+            else if ( 0 == strcase_cmp ( function, string_size( function ), function_qual, 4, 4 ) )
+                rc = make_quality( args );
+            else if ( 0 == strcase_cmp ( function, string_size( function ), function_cigar, 5, 5 ) )
+                rc = make_cigar( args );
+            else if ( 0 == strcase_cmp ( function, string_size( function ), function_rlen, 4, 4 ) )
+                rc = get_ref_len( args );
+            else
+                rc = KOutMsg( "unknown function '%s'\n", function );
+            ArgsWhack( args );
+        }
+    }
+    return rc;
+}
diff --git a/test/samline/sampart.vers b/test/samline/sampart.vers
new file mode 100644
index 0000000..3eefcb9
--- /dev/null
+++ b/test/samline/sampart.vers
@@ -0,0 +1 @@
+1.0.0
diff --git a/test/samline/sec_align_problem.sh b/test/samline/sec_align_problem.sh
new file mode 100755
index 0000000..59f6be3
--- /dev/null
+++ b/test/samline/sec_align_problem.sh
@@ -0,0 +1,76 @@
+#!/bin/bash
+
+execute()
+{
+    echo "------------------------------------------------------"
+    echo $1
+    eval $1
+    echo "."
+}
+
+# this will produce 2 files: 
+#   a) a config-file for bam-load with the used reference
+#   b) a SAM-file with header-line containing the lonely sec. alignment
+# call: produce_SAM "$CONFIG" "$SAMFILE"
+produce_SAM1()
+{
+    SAMLINE_BINARY="samline"
+    QNAME="--qname 1"
+    REFNAME="-r NC_011752.1"
+    REFPOS="-p 6800"
+    CIGAR="-c 55M"
+    SECONDARY="-2 1"
+    #FIRST="--first 1"
+    WITH_HEADERS="-d"
+    CREATE_CONFIG="-n $1"
+    execute "$SAMLINE_BINARY $QNAME $REFNAME $REFPOS $CIGAR $SECONDARY $FIRST $WITH_HEADERS $CREATE_CONFIG > $2"
+}
+
+# this will produce 1 file with these 2 primary mates
+# call: produce_SAM "$SAMFILE"
+produce_SAM2()
+{
+    SAMLINE_BINARY="samline"
+    QNAME="--qname 2"
+    REFNAME="-r NC_011752.1"
+    REFPOS1="-p 1000"
+    REFPOS2="-p 3500"
+    CIGAR1="-c 30MAAA20M"
+    CIGAR2="-c 50M2D10M"
+    SEC1="-2 0"
+    SEC2="-2 1"
+    execute "$SAMLINE_BINARY $QNAME $REFNAME $REFPOS1 $REFPOS2 $CIGAR1 $CIGAR2 $SEC1 $SEC2 >> $1"
+}
+
+# call: load_SAM_to_CSRA "$CONFIG" "$SAMFILE" "$TEMP_DIR"
+load_SAM_to_CSRA()
+{
+    BAMLOAD_BINARY="bam-load"
+    execute "cat $2 | $BAMLOAD_BINARY --make-spots-with-secondary -L 3 -o $3 -k $1 -E0 -Q0 /dev/stdin"
+}
+
+# call: kar_CSRA "$FINAL_CSRA" "$TEMP_DIR"
+kar_CSRA()
+{
+    KAR_BINARY="kar"
+    execute "$KAR_BINARY --create $1 -d $2 -f"
+}
+
+SAMFILE="p1.SAM"
+CONFIG="p1.cfg"
+TEMP_DIR="p1_csra"
+FINAL_CSRA="p1.csra"
+TEMP_SORTED_CSRA="p2_csra"
+SORTED_CSRA="p2.csra"
+
+produce_SAM1 "$CONFIG" "$SAMFILE"
+produce_SAM2 "$SAMFILE"
+load_SAM_to_CSRA "$CONFIG" "$SAMFILE" "$TEMP_DIR"
+kar_CSRA "$FINAL_CSRA" "$TEMP_DIR"
+#execute "vdb-dump $FINAL_CSRA --info"
+#execute "sra-stat $FINAL_CSRA"
+execute "sra-sort $FINAL_CSRA $TEMP_SORTED_CSRA -f"
+kar_CSRA "$SORTED_CSRA" "$TEMP_SORTED_CSRA"
+#execute "vdb-dump $SORTED_CSRA --info"
+#execute "sra-stat $SORTED_CSRA"
+#execute "rm -rf $TEMP_DIR $TEMP_SORTED_CSRA $SAMFILE $CONFIG"
diff --git a/test/search/Makefile b/test/search/Makefile
deleted file mode 100644
index 5cff1cd..0000000
--- a/test/search/Makefile
+++ /dev/null
@@ -1,61 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-
-MODULE = test/search
-
-TEST_TOOLS = \
-	test-agrep
-
-include $(TOP)/build/Makefile.env
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: $(TEST_TOOLS)
-
-clean: stdclean
-
-#-------------------------------------------------------------------------------
-# test-agrep
-#
-TEST_AGREP_SRC = \
-	test-agrep agrep-main search-vdb
-
-TEST_AGREP_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_AGREP_SRC))
-
-TEST_AGREP_LIB = \
-	-skapp \
-	-sncbi-vdb \
-	-sktst
-
-$(TEST_BINDIR)/test-agrep: $(TEST_AGREP_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_AGREP_LIB)
-
-agrep: test-agrep
-	$(TEST_BINDIR)/$^
diff --git a/test/search/PerfCounter.h b/test/search/PerfCounter.h
deleted file mode 100644
index ff081be..0000000
--- a/test/search/PerfCounter.h
+++ /dev/null
@@ -1,211 +0,0 @@
-// PerfCounter.h
-
-#ifndef countof
-#define countof(arr) (sizeof(arr)/sizeof(arr[0]))
-#endif
-#include <stdio.h>
-
-#ifndef _WIN32
-#include <time.h>
-
-static struct ::timespec timespec_substract(struct ::timespec const& left, struct ::timespec const& right)
-{
-    struct ::timespec res;
-    if ((left.tv_nsec - right.tv_nsec) < 0)
-    {
-        res.tv_sec = left.tv_sec - right.tv_sec - 1;
-        res.tv_nsec = 1000000000 + left.tv_nsec - right.tv_nsec;
-    }
-    else
-    {
-        res.tv_sec = left.tv_sec - right.tv_sec;
-        res.tv_nsec = left.tv_nsec - right.tv_nsec;
-    }
-    return res;
-}
-
-static struct ::timespec timespec_add(struct ::timespec const& x, struct ::timespec const& y)
-{
-    struct ::timespec res;
-    if ((x.tv_nsec + y.tv_nsec) >= 1000000000)
-    {
-        res.tv_sec = x.tv_sec + y.tv_sec + 1;
-        res.tv_nsec = x.tv_nsec + y.tv_nsec - 1000000000;
-    }
-    else
-    {
-        res.tv_sec = x.tv_sec + y.tv_sec;
-        res.tv_nsec = x.tv_nsec + y.tv_nsec;
-    }
-    return res;
-}
-
-static bool timespec_is_zero(struct ::timespec const& x)
-{
-    return !(x.tv_sec || x.tv_nsec);
-}
-
-class CPerfCounter
-{
-    struct ::timespec m_nLastStarted;
-    struct ::timespec m_nCount;
-	long long m_nMeasureCount; // how many times Resume[/Pause] was called
-	char m_szName[32];
-public:
-	CPerfCounter(char const* pszName) : m_nMeasureCount(0)
-	{
-        m_nLastStarted.tv_sec = 0;
-        m_nLastStarted.tv_nsec = 0;
-
-        m_nCount.tv_sec = 0;
-        m_nCount.tv_nsec = 0;
-
-		strncpy(m_szName, pszName, countof(m_szName));
-		m_szName[countof(m_szName) - 1] = 0;
-	}
-    struct ::timespec const& GetTotalCount() const
-	{
-		return m_nCount;
-	}
-    size_t GetSimpleCount() const
-    {
-        return (size_t)(m_nCount.tv_sec*1000000000 + m_nCount.tv_nsec);
-    }
-    double GetSeconds() const
-    {
-        return m_nCount.tv_sec + m_nCount.tv_nsec/1000000000.;
-    }
-
-	void Resume()
-	{	
-		if (timespec_is_zero(m_nLastStarted))
-        {
-            ::clock_gettime(CLOCK_REALTIME, &m_nLastStarted);
-            ++m_nMeasureCount;
-        }
-		else
-			printf("ERROR: the counter [%s] has been resumed already\n", m_szName);
-	}
-	void Pause()
-	{
-		if (!timespec_is_zero(m_nLastStarted))
-		{
-            struct ::timespec nCurrent;
-            ::clock_gettime(CLOCK_REALTIME, &nCurrent);
-            m_nCount = timespec_add(m_nCount, timespec_substract(nCurrent, m_nLastStarted));
-			m_nLastStarted.tv_sec = 0;
-            m_nLastStarted.tv_nsec = 0;
-		}
-		else
-			printf("ERROR: the counter [%s] has been paused already\n", m_szName);
-	}
-	void Print() const
-	{
-        printf("[%s]: %ld.%09ld s; measure count=%lld%s\n", m_szName, GetTotalCount().tv_sec, GetTotalCount().tv_nsec,
-			m_nMeasureCount, !timespec_is_zero(m_nLastStarted) ? " (still running)" : "");
-	}
-	void Reset()
-	{
-        m_nLastStarted.tv_sec = 0;
-        m_nLastStarted.tv_nsec = 0;
-
-        m_nCount.tv_sec = 0;
-        m_nCount.tv_nsec = 0;
-
-		m_nMeasureCount = 0;
-	}
-};
-#else
-//#include <undefwin.h>
-#include <Windows.h>
-class CPerfCounter
-{
-	__int64 m_nLastStarted;
-	__int64 m_nCount;
-	__int64 m_nMeasureCount; // how many times Resume[/Pause] was called
-	char m_szName[32];
-public:
-	CPerfCounter(char const* pszName) : m_nLastStarted(0), m_nCount(0), m_nMeasureCount(0)
-	{
-		strncpy(m_szName, pszName, countof(m_szName));
-		m_szName[countof(m_szName) - 1] = 0;
-	}
-	CPerfCounter(char const* pszName, __int64 nLastStarted, __int64 nCount, __int64 nMeasureCount) : m_nLastStarted(nLastStarted), m_nCount(nCount), m_nMeasureCount(nMeasureCount)
-	{
-		strncpy(m_szName, pszName, countof(m_szName));
-		m_szName[countof(m_szName) - 1] = 0;
-	}
-	__int64 GetTotalCount() const
-	{
-		if (!m_nLastStarted)
-			return m_nCount;
-		else
-		{
-			__int64 nCurrent = 0;
-			::QueryPerformanceCounter((LARGE_INTEGER*)(&nCurrent));
-			return m_nCount + nCurrent - m_nLastStarted;
-		}
-	}
-    size_t GetSimpleCount() const
-    {
-        return (size_t)GetTotalCount();
-    }
-
-    double GetSeconds() const
-    {
-        __int64 nFreq = 0;
-        ::QueryPerformanceFrequency((LARGE_INTEGER*)(&nFreq));
-        return nFreq ? (double)GetTotalCount()/(double)nFreq : -1.;
-    }
-
-	void Resume()
-	{	
-		if (!m_nLastStarted)
-		{
-			::QueryPerformanceCounter((LARGE_INTEGER*)(&m_nLastStarted));
-			++m_nMeasureCount;
-		}
-		else
-			printf("ERROR: the counter [%s] has been resumed already\n", m_szName);
-	}
-	void Pause()
-	{
-		if (m_nLastStarted)
-		{
-			__int64 nCurrent = 0;
-			::QueryPerformanceCounter((LARGE_INTEGER*)(&nCurrent));
-			m_nCount += nCurrent - m_nLastStarted;
-			m_nLastStarted = 0;
-		}
-		else
-			printf("ERROR: the counter [%s] has been paused already\n", m_szName);
-	}
-	void Print() const
-	{
-		__int64 nFreq = 0;
-		::QueryPerformanceFrequency((LARGE_INTEGER*)(&nFreq));
-		printf("[%s]: %I64d (%I64d ms); measure count=%I64d%s\n", m_szName, GetTotalCount(), GetTotalCount()/(nFreq/1000),
-			m_nMeasureCount, m_nLastStarted ? " (still running)" : "");
-	}
-	void Reset()
-	{
-		m_nLastStarted = 0;
-		m_nCount = 0;
-		m_nMeasureCount = 0;
-	}
-};
-#endif
-
-class CPCount
-{
-	CPerfCounter& m_count;
-public:
-	CPCount(CPerfCounter& count) : m_count(count)
-	{
-		m_count.Resume();
-	}
-	~CPCount()
-	{
-		m_count.Pause();
-	}
-};
\ No newline at end of file
diff --git a/test/search/agrep-main.c b/test/search/agrep-main.c
deleted file mode 100644
index 3266d8f..0000000
--- a/test/search/agrep-main.c
+++ /dev/null
@@ -1,346 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-#define index strchr
-#include <search/extern.h>
-#include <sysalloc.h>
-#include "../../libs/search/search-priv.h"
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <string.h>
-/*#include <unistd.h>*/
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <vdb/manager.h> /* VDBManager */
-#include <vdb/table.h> /* VTable */
-#include <vdb/cursor.h> /* VCursor */
-
-
-#ifndef min
-#define min(a, b) ((b) < (a) ? (b) : (a))
-#endif
-
-
-typedef struct AgrepBestMatch
-{
-    int32_t nScore;
-    int32_t indexStart;
-    int32_t nMatchLength;
-} AgrepBestMatch;
-
-typedef struct agrepinfo {
-    char const* buf;
-    int32_t linenum;
-    size_t original_length;
-    AgrepBestMatch* pBestMatch;
-} agrepinfo;
-
-
-rc_t agrep_callback_find_best( void const* cbinfo_void, AgrepMatch const* match, AgrepContinueFlag *cont )
-{
-    agrepinfo const* cbinfo = (agrepinfo *)cbinfo_void;
-    *cont = AGREP_CONTINUE;
-    if (cbinfo->pBestMatch->nScore > match->score)
-    {
-        cbinfo->pBestMatch->nScore = match->score;
-        cbinfo->pBestMatch->indexStart = match->position;
-        cbinfo->pBestMatch->nMatchLength = match->length;
-    }
-
-    return 0;
-}
-
-rc_t agrep_callback( void const* cbinfo_void, AgrepMatch const* match, AgrepContinueFlag *cont )
-{
-    agrepinfo const* cbinfo = (agrepinfo *)cbinfo_void;
-    int32_t const nLine = cbinfo->linenum;
-    int32_t const indexStart = match->position;
-    int32_t const nMatchLength = match->length;
-    size_t const nOriginalLen = cbinfo->original_length;
-    char const* pszBuf = cbinfo->buf;
-    int const bIsCutInBetween = (indexStart + nMatchLength) > nOriginalLen;
-    *cont = AGREP_CONTINUE;
-
-    printf("line=%d, pos=%d, len=%d, end=%d, score=%d: %.*s%s%.*s\n",
-        nLine, indexStart, nMatchLength,
-        (indexStart + nMatchLength) % (int32_t)nOriginalLen,
-        match->score,
-        (int)(min(nMatchLength, nOriginalLen - indexStart)), pszBuf + indexStart,
-        bIsCutInBetween ? "|" : "",
-        (int)(bIsCutInBetween ? nMatchLength - (nOriginalLen - indexStart) : 0), pszBuf);
-    return 0;
-}
-
-
-rc_t agrep_2na_callback( void const* cbinfo, AgrepMatch const* match, AgrepContinueFlag *cont )
-{
-    char const* p;
-    static char *buf = NULL;
-    static int32_t buflen = 0;
-    int32_t i;
-
-    *cont = AGREP_CONTINUE;
-    if (buf == NULL || buflen < match->length) {
-        free(buf);
-        buf = malloc(match->length+1);
-        buflen = match->length;
-    }
-    p = ((agrepinfo const *)cbinfo)->buf + match->position;
-    for (i=0; i<match->length; i++) {
-        buf[i] = "ACGTN"[(size_t)p[i]];
-    }
-    buf[match->length] = '\0';
-
-    /* TODO: this probably requires the same processing as in agrep_callback */
-    printf("%d,%d,%d: %s\n", ((agrepinfo const *)cbinfo)->linenum, match->position, match->score, buf);
-    return 0;
-}
-
-
-#define BUF_SIZE 4096
-
-LIB_EXPORT int32_t CC agrep ( AgrepFlags alg, char const* pattern, FILE* fp, int32_t print, 
-        int32_t printcontext, int32_t k, int32_t findall, int32_t simulate )
-{
-    AgrepParams *self = NULL;
-    int32_t count;
-    size_t len;
-    AgrepFlags mode = alg;
-    AgrepMatch match;
-    agrepinfo info;
-    char szBuf[BUF_SIZE];
-
-    AgrepCallArgs args;
-
-    int32_t linenum = 0;
-    char const* na = "ACGTN";
-    size_t const nPatternSize = strlen(pattern);
-    size_t const nBufSize = BUF_SIZE;
-    size_t const nMaxTextLen = nBufSize-nPatternSize-1;
-    size_t nExtendBufSize;
-
-    int32_t i;
-
-    AgrepMake(&self, mode, pattern);
-
-    count = 0;
-
-    while (!feof(fp) && fgets(szBuf, nMaxTextLen, fp))
-    {
-        ++linenum;
-        len = strlen(szBuf);
-        if (szBuf[len-1] == '\n')
-        {
-            szBuf[len-1] = '\0';
-            --len;
-        }
-
-        /* Make szBuf somewhat circular to be able to find pattern cut in between */
-        nExtendBufSize = nPatternSize <= len ? nPatternSize : len;
-        memcpy(szBuf+len, szBuf, nExtendBufSize - 1);
-        szBuf[len + nExtendBufSize - 1] = '\0';
-
-        if (simulate)
-        {
-            for (i = 0; szBuf[i]; ++i)
-            {
-                if (NULL != index(na, szBuf[i]))
-                {
-                    szBuf[i] = index(na, szBuf[i]) - na;
-                }
-            }
-        }
-        
-        if (findall)
-        {
-            AgrepBestMatch best_match = {9999, 0, 0}; /* TODO: it's not C89*/
-
-            info.buf = szBuf;
-            info.linenum = linenum;
-            info.original_length = len;
-            info.pBestMatch = &best_match;
-
-            args.self = self;
-            args.threshold = k;
-            args.buf = szBuf;
-            args.buflen = len + nPatternSize;
-            args.cb = simulate ? agrep_2na_callback : agrep_callback_find_best;
-            args.cbinfo = (void *)&info;
-
-            AgrepFindAll(&args);
-
-            if (!simulate) /* output best match */
-            {
-                printf("line=%d, pos=%d, len=%d, end=%d, score=%d: %.*s%s%.*s\n",
-                    linenum, best_match.indexStart, best_match.nMatchLength,
-                    (best_match.indexStart + best_match.nMatchLength) % (int32_t)len,
-                    best_match.nScore,
-                    (int)(min(best_match.nMatchLength, (int32_t)len - best_match.indexStart)), szBuf + best_match.indexStart,
-                    (best_match.indexStart + best_match.nMatchLength) > (int32_t)len ? "|" : "",
-                    (int)((best_match.indexStart + best_match.nMatchLength) > (int32_t)len ? best_match.nMatchLength - ((int32_t)len - best_match.indexStart) : 0), szBuf);
-            }
-        }
-        else if (AgrepFindFirst(self, k, szBuf, len + nPatternSize, &match))
-        {
-            ++count;
-            if (print)
-            {
-                printf("%s\n", szBuf);
-            }
-            if (printcontext)
-            {
-                printf("%.*s\n", match.length, szBuf + match.position);
-            }
-        }
-    }
-
-    return count;
-}
-
-int main_agrep_test( int ac, char const** av )
-{
-    char const* file;
-    FILE *fp;
-    int32_t count;
-    int32_t slow = 0;
-    char const* pattern;
-    int32_t print = 1;
-    int32_t printcontext = 0;
-    char *digits = "0123456789";
-    int32_t k=0;
-    AgrepFlags alg = AGREP_ALG_WUMANBER | AGREP_EXTEND_BETTER | AGREP_LEFT_MAINTAIN_SCORE;
-    AgrepFlags mode = 0;
-    int32_t findall = 0;
-    int32_t simulate = 0;
-
-    while (ac > 2 && av[1][0] == '-') {
-        if (!strcmp("--4na", av[1])) {
-            mode |= AGREP_PATTERN_4NA;
-            ac--; av++;
-            continue;
-        }
-        if (!strcmp("--extend", av[1])) {
-            mode |= AGREP_EXTEND_SAME;
-            ac--; av++;
-            continue;
-        }
-        if (!strcmp("--better", av[1])) {
-            mode |= AGREP_EXTEND_BETTER;
-            ac--; av++;
-            continue;
-        }
-        if (!strcmp("--maintain", av[1])) {
-            mode |= AGREP_LEFT_MAINTAIN_SCORE;
-            ac--; av++;
-            continue;
-        }
-
-        if (!strcmp("--anchor", av[1])) {
-            mode |= AGREP_ANCHOR_LEFT;
-            ac--; av++;
-            continue;
-        }
-        
-        if (!strcmp("--2na", av[1])) {
-            simulate = 1;
-            mode |= AGREP_TEXT_EXPANDED_2NA | AGREP_PATTERN_4NA;
-            ac--; av++;
-            continue;
-        }
-        if (!strcmp("-a", av[1])) {
-            findall = 1;
-            printcontext = 1;
-            ac--; av++;
-            continue;
-        }
-        if (NULL != index(digits, av[1][1])) {
-            k = atoi(++av[1]);
-            ac--; av++;
-            continue;
-        }
-        if (!strcmp(av[1], "--myers")) {
-            alg = AGREP_ALG_MYERS;
-            ac--; av++;
-            continue;
-        }
-        if (!strcmp(av[1], "--dp")) {
-            alg = AGREP_ALG_DP;
-            ac--; av++;
-            continue;
-        }
-        if (!strcmp(av[1], "--myersunlimited")) {
-            alg = AGREP_ALG_MYERS_UNLTD;
-            ac--; av++;
-            continue;
-        }
-        if (!strcmp(av[1], "--myersunltd")) {
-            alg = AGREP_ALG_MYERS_UNLTD;
-            ac--; av++;
-            continue;
-        }
-        if (!strcmp(av[1], "--wu")) {
-            alg = AGREP_ALG_WUMANBER;
-            ac--; av++;
-            continue;
-        }
-        if (!strcmp(av[1], "--wumanber")) {
-            alg = AGREP_ALG_WUMANBER;
-            ac--; av++;
-            continue;
-        }
-
-        if (!strcmp(av[1], "--slow")) {
-            slow = 1;
-            ac--; av++;
-            continue;
-        }
-        if (!strcmp(av[1], "-c")) {
-            print = 0;
-            ac--; av++;
-            continue;
-        }
-        if (!strcmp(av[1], "-x")) {
-            printcontext = 1;
-            print = 0;
-            ac--; av++;
-            continue;
-        }
-        fprintf(stderr, "Unknown switch: %s\n", av[1]);
-        ac--; av++;
-    }
-
-    pattern = av[1];
-    file = av[2];
-  
-    mode |= AGREP_MODE_ASCII; /* since we open file in text mode, force AGREP_MODE_ASCII */
-    fp = fopen(file, "r");
-    count = agrep(alg|mode, pattern, fp, print, printcontext, k, findall, simulate);
-
-    fclose(fp);
-
-    return 0;
-}
diff --git a/test/search/search-vdb.cpp b/test/search/search-vdb.cpp
deleted file mode 100644
index 1269707..0000000
--- a/test/search/search-vdb.cpp
+++ /dev/null
@@ -1,512 +0,0 @@
-// search-vdb.cpp
-
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "search-vdb.h"
-
-#include <sysalloc.h>
-
-#include <search/extern.h>
-#include <search/grep.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <set>
-#include <algorithm>
-
-#ifndef min
-#define min(a, b) ((b) < (a) ? (b) : (a))
-#endif
-
-#define RELEASE_VDB_HANDLE(Type, pObject)\
-    {\
-        if (pObject)\
-        {\
-            ::Type##Release(pObject);\
-            pObject = NULL;\
-        }\
-    }
-
-namespace VDBSearchTest
-{
-    // Structures required for libs/search
-
-    struct agrepinfo
-    {
-        AgrepBestMatch* pBestMatch; // TODO: remove this redundant reference and use AgrepBestMatch directly
-    };
-
-    // callback required for libs/search
-    rc_t agrep_callback_find_best(void const* cbinfo_void, ::AgrepMatch const* match, ::AgrepContinueFlag* cont)
-    {
-        agrepinfo const* cbinfo = (agrepinfo*)cbinfo_void;
-        *cont = AGREP_CONTINUE;
-        if (cbinfo->pBestMatch->nScore > match->score && match->position < cbinfo->pBestMatch->nTrimLen)
-        {
-            cbinfo->pBestMatch->nScore = match->score;
-            cbinfo->pBestMatch->indexStart = match->position;
-            cbinfo->pBestMatch->nMatchLength = match->length;
-        }
-
-        return 0;
-    }
-
-/////////////////////////////////////////////////////////////////
-
-    CFindLinker::CFindLinker()
-        : m_pVDBManager(NULL), m_pVDBTable(NULL)
-    {
-    }
-
-    CFindLinker::~CFindLinker()
-    {
-        ReleaseVDB();
-    }
-
-    void CFindLinker::ReleaseVDB()
-    {
-        cursorRead.Release();
-        //cursorWrite.Release();
-        RELEASE_VDB_HANDLE(VTable,     m_pVDBTable);
-
-        if (m_pVDBManager)
-        {
-            //rc_t rc = ::VDBManagerLock(m_pVDBManager, m_sTableName.c_str());
-            //PROCESS_RC_WARNING(rc, "VDBManagerLock");
-        }
-
-        RELEASE_VDB_HANDLE(VDBManager, m_pVDBManager);
-    }
-
-    bool CFindLinker::InitVDBRead(char const* pszTableName)
-    {
-        rc_t rc = 0;
-        m_sTableName = pszTableName;
-
-        rc = ::VDBManagerMakeRead(const_cast<const VDBManager**>(&m_pVDBManager), NULL);
-        //rc = ::VDBManagerMakeUpdate(&m_pVDBManager, NULL);
-        PROCESS_RC_ERROR(rc, "VDBManagerMakeRead");
-
-        rc = ::VDBManagerOpenTableRead(m_pVDBManager, const_cast<const VTable**>(&m_pVDBTable), NULL, pszTableName);
-        PROCESS_RC_ERROR(rc, "VDBManagerOpenTableRead");
-
-        rc = ::VTableCreateCursorRead(m_pVDBTable, &cursorRead.PtrConstRef());
-        PROCESS_RC_ERROR(rc, "VTableCreateCursorRead");
-
-        //std::cout << "Opened table \"" << pszTableName << "\"" << std::endl;
-
-        return true;
-    }
-
-#if 0
-    bool CFindLinker::InitVDB(char const* pszTableName)
-    {
-        rc_t rc = 0;
-        m_sTableName = pszTableName;
-
-        rc = ::VDBManagerMakeUpdate(&m_pVDBManager, NULL);
-        PROCESS_RC_ERROR(rc, "VDBManagerMakeUpdate");
-
-        rc = ::VDBManagerUnlock(m_pVDBManager, pszTableName);
-        PROCESS_RC_WARNING(rc, "VDBManagerUnlock");
-
-        rc = ::VDBManagerOpenTableUpdate(m_pVDBManager, &m_pVDBTable, NULL, pszTableName);
-        PROCESS_RC_ERROR(rc, "VDBManagerOpenTableUpdate");
-
-        rc = ::VTableCreateCursorRead(m_pVDBTable, &cursorRead.PtrConstRef());
-        PROCESS_RC_ERROR(rc, "VTableCreateCursorRead");
-
-        rc = ::VTableCreateCursorWrite(m_pVDBTable, &cursorWrite.PtrRef(), kcmInsert);
-        PROCESS_RC_ERROR(rc, "VTableCreateCursorWrite");
-
-        //std::cout << "Opened table \"" << pszTableName << "\"" << std::endl;
-
-        return true;
-    }
-#endif
-
-    bool CFindLinker::InitColumnIndex()
-    {
-        char const* ColumnNamesRead[] = {
-            COLUMN_READ
-            ,COLUMN_READ_START
-            ,COLUMN_READ_LEN
-            ,COLUMN_TRIM_START
-            ,COLUMN_TRIM_LEN
-        };
-        //char const* ColumnNamesWrite[] = {
-        //    COLUMN_READ_START
-        //    ,COLUMN_READ_LEN
-        //};
-
-        return cursorRead.InitColumnIndex(ColumnNamesRead, countof(ColumnNamesRead));
-                //&& cursorWrite.InitColumnIndex(ColumnNamesWrite, countof(ColumnNamesWrite));
-
-    }
-
-    bool CFindLinker::OpenCursor()
-    {
-        rc_t rc = ::VCursorOpen(cursorRead.PtrConstRef());
-        PROCESS_RC_ERROR(rc, "VCursorOpen");
-        return true;
-    }
-
-    char const* PrepareReadForSearch(char const* pszRead, size_t nReadBufSize, size_t nLinkerLen, int32_t nTrimStart, int32_t nTrimLen, char* pszReadTrimmed, size_t nReadTrimmedSize)
-    {
-        size_t nTrimmedLen = min((size_t)nTrimLen, nReadTrimmedSize - 1);
-        strncpy(pszReadTrimmed, pszRead + nTrimStart, nTrimmedLen);
-        pszReadTrimmed[nTrimmedLen] = '\0';
-
-        size_t nExtendBufSize = min(nLinkerLen, nTrimmedLen);
-        if (nTrimmedLen + nExtendBufSize > nReadTrimmedSize)
-            nExtendBufSize = nReadTrimmedSize - nTrimmedLen;
-
-        memcpy(pszReadTrimmed + nTrimmedLen, pszReadTrimmed, nExtendBufSize - 1);
-        pszReadTrimmed[nTrimmedLen + nExtendBufSize - 1] = '\0';
-        return pszReadTrimmed;
-    }
-
-    void PrintCharRange(char const* pszStr, size_t nCount)
-    {
-        for (size_t i = 0; i < nCount; ++i)
-        {
-            std::cout << pszStr[i];
-        }
-    }
-
-    void PrintFindBestResult(AgrepBestMatch const& bm, int64_t idRow, int32_t nTrimStart, int32_t nTrimLen, size_t nLinkerLen, char const* pszReadTrimmed, char const* pszRead, char const* pszLinker)
-    {
-        std::cout << std::endl
-            << "row_id=" << idRow;
-        if (bm.nScore == AgrepBestMatch::NOT_FOUND)
-        {
-            std::cout << " (NOT FOUND)";
-        }
-        else
-        {
-            std::cout << std::endl
-            << COLUMN_READ << " [" << nTrimStart << ", " << (nTrimStart + nTrimLen) << "]: " << pszRead << std::endl
-            << "Linker found: " << pszLinker
-            << ", start=" << bm.indexStart + nTrimStart << ", len=" << bm.nMatchLength
-            << ", end=" << (bm.indexStart + bm.nMatchLength) % nTrimLen + nTrimStart
-            << ", score=" << bm.nScore << " (" << (int)(100. * (double)bm.nScore/nLinkerLen) << "%): ";
-
-            PrintCharRange(pszReadTrimmed + bm.indexStart, min(bm.nMatchLength, nTrimLen - bm.indexStart));
-            bool bCutInBetween = (bm.indexStart + bm.nMatchLength) > nTrimLen;
-            if (bCutInBetween)
-            {
-                std::cout << "|";
-                PrintCharRange(pszReadTrimmed, bm.nMatchLength - (nTrimLen - bm.indexStart));
-            }
-        }
-        std::cout << std::endl;
-    }
-
-    enum CFindLinker::SearchResult CFindLinker::SearchSingleRow(::AgrepFlags flags, int64_t idRow)
-    {
-        size_t const BUF_SIZE = 4096;
-        char szRead[BUF_SIZE], szReadTrimmed[BUF_SIZE];
-        uint32_t nItemsRead, nReadLen, nLinkerLen;
-        int32_t bufReadLen[4], bufReadStart[4], nTrimStart, nTrimLen;
-
-        if (!ReadItems(idRow, COLUMN_READ,            szRead,      countof(szRead), &nReadLen))
-            return CFindLinker::SEARCH_RESULT_ERROR;
-
-        if (!ReadItems(idRow, COLUMN_READ_START,      bufReadStart,   countof(bufReadStart), &nItemsRead))
-            return CFindLinker::SEARCH_RESULT_ERROR;
-        //std::cout << "items read = " << nItemsRead << std::endl;
-        //assert(nItemsRead == countof(bufReadStart));
-        //int32_t nVDBLinkerStart = bufReadStart[2];
-
-        if (!ReadItems(idRow, COLUMN_READ_LEN,        bufReadLen,   countof(bufReadLen), &nItemsRead))
-            return CFindLinker::SEARCH_RESULT_ERROR;
-        //assert(nItemsRead == countof(bufReadLen));
-        //int32_t nVDBLinkerLen = bufReadLen[2];
-
-        if (!ReadItems(idRow, COLUMN_TRIM_START,      &nTrimStart, 1, &nItemsRead))
-            return CFindLinker::SEARCH_RESULT_ERROR;
-
-        if (!ReadItems(idRow, COLUMN_TRIM_LEN,        &nTrimLen,   1, &nItemsRead))
-            return CFindLinker::SEARCH_RESULT_ERROR;
-        // fix case when trim is not set properly (len == 0)
-        if (nTrimLen == 0)
-        {
-            nTrimStart = 0;
-            nTrimLen = nReadLen;
-        }
-
-        static char const* arrLinkers[] = {
-            "GTTGGAACCGAAAGGGTTTGAATTCAAACCCTTTCGGTTCCAAC"
-            ,"TCGTATAACTTCGTATAATGTATGCTATACGAAGTTATTACG"
-            ,"CGTAATAACTTCGTATAGCATACATTATACGAAGTTATACGA"
-        };
-
-        // TODO: do something with hardcoded flags
-        static CAgrepMyersSearch arrLinkerSearch[] = {
-            CAgrepMyersSearch(AGREP_MODE_ASCII|AGREP_ALG_MYERS,  arrLinkers[0])
-            ,CAgrepMyersSearch(AGREP_MODE_ASCII|AGREP_ALG_MYERS, arrLinkers[1])
-            ,CAgrepMyersSearch(AGREP_MODE_ASCII|AGREP_ALG_MYERS, arrLinkers[2])
-        };
-
-        AgrepBestMatch bmBest = {AgrepBestMatch::NOT_FOUND, 0, 0};
-        char const* pszBestLinker = NULL;
-
-        for (size_t iLinker = 0; iLinker < countof(arrLinkers); ++iLinker)
-        {
-            char const* pszLinker = arrLinkers[iLinker];
-            nLinkerLen = strlen(pszLinker);
-
-            // Make szBuf somewhat circular to be able to find pattern cut in between
-            // And also here we enforce using trimmed region of the pszRead
-            char const* pszReadTrimmed = PrepareReadForSearch(szRead, countof(szRead), nLinkerLen, nTrimStart, nTrimLen, szReadTrimmed, countof(szReadTrimmed));;
-            AgrepBestMatch bm = {AgrepBestMatch::NOT_FOUND, 0, 0, nTrimLen};
-
-            arrLinkerSearch[iLinker].FindBest(pszReadTrimmed, countof(szRead)-nTrimStart, idRow, nTrimLen, &bm);
-
-            if (bm.nScore != AgrepBestMatch::NOT_FOUND)
-            {
-                if (bmBest.nScore == AgrepBestMatch::NOT_FOUND || bm.nScore < bmBest.nScore)
-                {
-                    bmBest = bm;
-                    pszBestLinker = pszLinker;
-                }
-            }
-        }
-
-        if (bmBest.nScore != AgrepBestMatch::NOT_FOUND)
-        {
-            //std::cout << "id=" << idRow << ", linker=\"" << pszBestLinker << "\", start=" << bmBest.indexStart << ", read=\"" << szRead << "\"" << std::endl;
-            nLinkerLen = strlen(pszBestLinker);
-
-            double nScoreAgrep = (double)bmBest.nScore/nLinkerLen;
-            if (0.22 < nScoreAgrep && nScoreAgrep < 0.333)
-            {
-                size_t start;
-                size_t len = FindLongestCommonSubstring(szReadTrimmed, pszBestLinker, nTrimLen+nLinkerLen, nLinkerLen, &start, NULL);
-                double nScoreSubstr = (double)len/nLinkerLen;
-                char szBuf[512] = "";
-                string_printf(szBuf, countof(szBuf), NULL, "start=%zu, len=%zu: \"%.*s\", %d%%", start, len, len, szReadTrimmed+start, (int)(100.*nScoreSubstr));
-                if (nScoreSubstr > 0.3)
-                {
-                    PrintFindBestResult(bmBest, idRow, nTrimStart, nTrimLen, strlen(pszBestLinker), szReadTrimmed, szRead, pszBestLinker);
-                    std::cout << "Approved by substring search: " << szBuf << std::endl;
-                }
-                else
-                {
-                    bmBest.nScore = AgrepBestMatch::NOT_FOUND;
-                    //PrintFindBestResult(bmBest, idRow, nTrimStart, nTrimLen, strlen(pszBestLinker), szReadTrimmed, szRead, pszBestLinker);
-                    //std::cout << "Declined by substring search: " << szBuf << std::endl;
-                }
-
-            }
-            else
-                PrintFindBestResult(bmBest, idRow, nTrimStart, nTrimLen, strlen(pszBestLinker), szReadTrimmed, szRead, pszBestLinker);
-
-
-            // Write results
-            //std::cout
-            //    << "Stored start: " << nVDBLinkerStart << std::endl
-            //    << "Stored end:   " << nVDBLinkerLen << std::endl
-            //    << "New start:    " << bmBest.indexStart + nTrimStart << std::endl
-            //    << "New len:      " << bmBest.nMatchLength << std::endl;
-
-            //rc_t rc = ::VCursorOpenRow(cursorWrite.PtrRef());
-            //PROCESS_RC_WARNING(rc, "VCursorOpenRow [for writing]")
-            //if (rc == 0)
-            //{
-            //    bufReadStart[2] = bmBest.indexStart + nTrimStart;
-            //    bufReadLen[2] = bmBest.nMatchLength;
-            //    rc = ::VCursorWrite(cursorWrite.PtrRef(), cursorRead.GetColumnIndex(COLUMN_READ_START), 8 * sizeof(bufReadStart[0]), bufReadStart, 0, countof(bufReadStart));
-            //    PROCESS_RC_WARNING(rc, "VCursorWrite (start)")
-            //    rc = ::VCursorWrite(cursorWrite.PtrRef(), cursorRead.GetColumnIndex(COLUMN_READ_LEN), 8 * sizeof(bufReadLen[0]), bufReadLen, 0, countof(bufReadLen));
-            //    PROCESS_RC_WARNING(rc, "VCursorWrite (len)")
-            //}
-            //if (rc == 0)
-            //{
-            //    rc = ::VCursorCommitRow(cursorWrite.PtrRef());
-            //    PROCESS_RC_WARNING(rc, "VCursorCommitRow")
-            //}
-            //if (rc == 0)
-            //{
-            //    rc = ::VCursorCloseRow(cursorWrite.PtrRef());
-            //    PROCESS_RC_WARNING(rc, "VCursorCloseRow")
-            //}
-
-        }
-
-        return bmBest.nScore == AgrepBestMatch::NOT_FOUND ?
-            CFindLinker::SEARCH_RESULT_NOT_FOUND : CFindLinker::SEARCH_RESULT_FOUND;
-    }
-
-    bool CFindLinker::Run(::AgrepFlags flags, char const* pszTableName)
-    {
-        if (!InitVDBRead(pszTableName))
-            return false;
-
-        if (!InitColumnIndex())
-            return false;
-
-        if (!OpenCursor())
-            return false;
-
-        int64_t idRow = 0;
-        uint64_t nRowCount = 0;
-
-        rc_t rc = ::VCursorIdRange(cursorRead.PtrConstRef(), 0, &idRow, &nRowCount);
-        PROCESS_RC_ERROR(rc, "VCursorIdRange");
-
-        size_t nCountFound = 0;
-        // Trying random row ids to figure out if it worth full scan to find linkers
-        std::set<int64_t> arrIDsToTry;
-        
-        size_t const nTrialSize = min(100, nRowCount);
-        size_t nThreshold = 0.25*nTrialSize;
-        bool bDoTrial = (nRowCount >= nTrialSize*1000.);
-        bDoTrial = false; // TODO: debug
-
-        if (bDoTrial)
-        {
-            // generating nTrialSize unique ids to try
-
-            while (arrIDsToTry.size() < nTrialSize)
-            {
-                arrIDsToTry.insert((double)rand()/(double)RAND_MAX*nRowCount);
-            }
-            // Trial scan of random rows
-
-            for (std::set<int64_t>::const_iterator cit = arrIDsToTry.begin(); cit != arrIDsToTry.end(); ++cit)
-            {
-                int64_t const& id = *cit;
-                enum CFindLinker::SearchResult search_res = SearchSingleRow(flags, id);
-                if (search_res == CFindLinker::SEARCH_RESULT_ERROR)
-                    return false;
-                else if (search_res == CFindLinker::SEARCH_RESULT_FOUND)
-                    ++nCountFound;
-
-                if (nCountFound >= nThreshold)
-                    break;
-            }
-        }
-
-        if (nCountFound >= nThreshold || !bDoTrial)
-        {
-            nCountFound = 0;
-            for (/*nRowCount = min(10, nRowCount)*/; (uint64_t)idRow < nRowCount; ++idRow )
-            {
-                enum CFindLinker::SearchResult search_res = SearchSingleRow(flags, idRow);
-                if (search_res == CFindLinker::SEARCH_RESULT_ERROR)
-                    return false;
-                else if (search_res == CFindLinker::SEARCH_RESULT_FOUND)
-                    ++nCountFound;
-            }
-            std::cout
-                << "Run \"" << pszTableName
-                << "\": found " << nCountFound << "/" << nRowCount
-                << " (" << (int)(100.*nCountFound/(double)nRowCount)  << "%)" << std::endl;
-
-        }
-        else
-        {
-            std::cout
-                << "SKIPPED (row count: " << nRowCount << "): Run \"" << pszTableName
-                << "\": found " << nCountFound << "/" << arrIDsToTry.size()
-                << " (" << (int)(100.*nCountFound/(double)arrIDsToTry.size())  << "%)" << std::endl;
-        }
-
-        ReleaseVDB();
-        return true;
-    }
-
-    /////////////////////////////
-    CAgrepMyersSearch::CAgrepMyersSearch(::AgrepFlags flags, char const* pszLinker)
-        : m_nLinkerLen (strlen(pszLinker))
-    {
-        ::AgrepMake(&m_self, flags, pszLinker);
-    }
-    CAgrepMyersSearch::~CAgrepMyersSearch()
-    {
-        ::AgrepWhack(m_self);
-    }
-
-    void CAgrepMyersSearch::FindBest(char const* pszReadTrimmed, size_t nReadBufSize, int64_t idRow, int32_t nTrimLen, AgrepBestMatch* pBestMatch) const
-    {
-        // Initializing Agrep structures
-        agrepinfo info = {pBestMatch};
-
-        ::AgrepCallArgs args;
-
-        args.self      = m_self;
-        args.threshold = (int32_t)(0.33*m_nLinkerLen);
-        args.buf       = pszReadTrimmed;
-        args.buflen    = min(nTrimLen + m_nLinkerLen, nReadBufSize);
-        args.cb        = agrep_callback_find_best;
-        args.cbinfo    = (void*)&info;
-
-        // Run the search algorithm
-        ::AgrepFindAll(&args);
-    }
-
-///////////////////////////////////////
-
-    CVDBCursor::CVDBCursor() : m_pVDBCursor(NULL)
-    {
-    }
-    CVDBCursor::~CVDBCursor()
-    {
-        Release();
-    }
-    void CVDBCursor::Release()
-    {
-        RELEASE_VDB_HANDLE(VCursor, m_pVDBCursor);
-    }
-
-    VCursor*& CVDBCursor::PtrRef()
-    {
-        return m_pVDBCursor;
-    }
-    VCursor const*& CVDBCursor::PtrConstRef()
-    {
-        return const_cast<VCursor const*&>(m_pVDBCursor);
-    }
-
-    bool CVDBCursor::InitColumnIndex(char const* const* ColumnNames, size_t nCount)
-    {
-        for (size_t i = 0; i < nCount; ++i)
-        {
-            rc_t rc = ::VCursorAddColumn(m_pVDBCursor, &m_mapColumnIndex[ColumnNames[i]], ColumnNames[i] );
-            PROCESS_RC_WARNING(rc, ColumnNames[i]);
-        }
-        return true;
-    }
-    uint32_t CVDBCursor::GetColumnIndex(char const* pszColumnName) const
-    {
-        MapColumnIndex::const_iterator cit = m_mapColumnIndex.find(pszColumnName);
-        assert(cit != m_mapColumnIndex.end());
-        return (*cit).second;
-    }
-}
\ No newline at end of file
diff --git a/test/search/search-vdb.h b/test/search/search-vdb.h
deleted file mode 100644
index 3abcf2c..0000000
--- a/test/search/search-vdb.h
+++ /dev/null
@@ -1,229 +0,0 @@
-// search-vdb.h
-
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _SEARCH_VDB_H_
-#define _SEARCH_VDB_H_
-
-#include <string>
-#include <map>
-#include <iostream>
-
-#include "../../libs/search/search-priv.h"
-
-#include <vdb/manager.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <klib/printf.h>
-
-#ifndef countof
-#define countof(arr) (sizeof(arr)/sizeof(arr[0]))
-#endif
-
-#define PROCESS_RC_ERROR(rc, descr)\
-    {\
-        if (rc)\
-        {\
-            char szBufErr[512] = "";\
-            rc_t res = string_printf(szBufErr, countof(szBufErr), NULL, "ERROR: %s failed with error 0x%08x (%d) [%R]", descr, rc, rc, rc);\
-            if (res == rcBuffer || res == rcInsufficient)\
-                szBufErr[countof(szBufErr) - 1] = '\0';\
-            std::cout << szBufErr << std::endl;\
-            return false;\
-        }\
-    }
-
-#define PROCESS_RC_WARNING(rc, descr)\
-    {\
-        if (rc)\
-        {\
-            char szBufErr[512] = "";\
-            rc_t res = string_printf(szBufErr, countof(szBufErr), NULL, "WARNING: %s failed with error 0x%08x (%d) [%R]", descr, rc, rc, rc);\
-            if (res == rcBuffer || res == rcInsufficient)\
-                szBufErr[countof(szBufErr) - 1] = '\0';\
-            std::cout << szBufErr << std::endl;\
-        }\
-    }
-
-#if 0
-namespace SearchTimeTest
-{
-
-#ifdef WIN32
-    typedef int time_res_t;
-#else
-    typedef size_t time_res_t;
-#endif
-
-    time_res_t TimeTest(char const* TableName, int enumAlgorithm);
-}
-#endif
-
-namespace VDBSearchTest
-{
-    /* remove trailing '\n' from char reads */
-    template<typename T> class CPostReadAction
-    {
-        T* m_pBuf;
-        uint32_t m_nCount;
-    public:
-        CPostReadAction(T* pBuf, uint32_t nCount) : m_pBuf(pBuf), m_nCount(nCount) {}
-        void operator()() const;
-    };
-    template<typename T> inline void CPostReadAction<T>::operator()() const
-    {
-    }
-    template<> inline void CPostReadAction<char>::operator()() const
-    {
-        m_pBuf[m_nCount] = '\0';
-    }
-    template<> inline void CPostReadAction<unsigned char>::operator()() const
-    {
-        m_pBuf[m_nCount] = '\0';
-    }
-
-    char const COLUMN_READ[]            = "READ";
-    char const COLUMN_READ_2NA_PACKED[] = "(INSDC:2na:packed)READ";
-    char const COLUMN_READ_2NA_BIN[]    = "(INSDC:2na:bin)READ";
-//    char const COLUMN_READ_4NA_PACKED[] = "(INSDC:4na:packed)READ";
-//    char const COLUMN_READ_4NA_BIN[]    = "(INSDC:4na:bin)READ";
-    char const COLUMN_LINKER_SEQUENCE[] = "LINKER_SEQUENCE";
-    char const COLUMN_READ_START[]      = "READ_START";
-    char const COLUMN_READ_LEN[]        = "READ_LEN";
-    char const COLUMN_TRIM_START[]      = "TRIM_START";
-    char const COLUMN_TRIM_LEN[]        = "TRIM_LEN";
-
-/////////////////////
-    struct AgrepBestMatch
-    {
-        enum {NOT_FOUND = 9999};
-
-        int32_t nScore;
-        int32_t indexStart;
-        int32_t nMatchLength;
-
-        int32_t nTrimLen;
-    };
-
-    class CAgrepMyersSearch // this class is to reuse allocated AgrepParams instead of malloc/free it for every search
-    {
-    public:
-        CAgrepMyersSearch(::AgrepFlags flags, char const* pszLinker);
-        CAgrepMyersSearch(CAgrepMyersSearch const& rhs);
-        CAgrepMyersSearch& operator=(CAgrepMyersSearch const& rhs);
-
-        ~CAgrepMyersSearch();
-
-        void FindBest(char const* pszReadTrimmed, size_t nReadBufSize, int64_t idRow, int32_t nTrimLen, AgrepBestMatch* pBestMatch) const;
-        void FindBest2NAPacked(unsigned char const* p2NAPacked, size_t nReadBufSize, int64_t idRow, int32_t nTrimLen, AgrepBestMatch* pBestMatch) const;
-    private:
-        ::AgrepParams* m_self;
-        size_t m_nLinkerLen;
-    };
-
-    class CVDBCursor
-    {
-    public:
-
-        CVDBCursor();
-        CVDBCursor(CVDBCursor const& o);
-        CVDBCursor& operator=(CVDBCursor const& o);
-        ~CVDBCursor();
-
-        VCursor*& PtrRef();
-        VCursor const*& PtrConstRef();
-
-        bool InitColumnIndex(char const* const* ColumnNames, size_t nCount);
-        uint32_t GetColumnIndex(char const* pszColumnName) const;
-
-        void Release();
-
-    private:
-        typedef std::map<std::string, uint32_t> MapColumnIndex;
-        MapColumnIndex m_mapColumnIndex;
-
-        VCursor* m_pVDBCursor;
-    };
-
-    class CFindLinker
-    {
-    public:
-#if 0
-#ifdef WIN32
-        friend int ::SearchTimeTest::TimeTest(char const* TableName, int enumAlgorithm);
-#else
-        friend size_t ::SearchTimeTest::TimeTest(char const* TableName, int enumAlgorithm);
-#endif
-#endif
-
-        CFindLinker();
-        ~CFindLinker();
-
-        bool Run(::AgrepFlags flags, char const* pszTableName);
-
-    private:
-        VDBManager*       m_pVDBManager;
-        VTable*           m_pVDBTable;
-
-        CVDBCursor cursorRead;
-        CVDBCursor cursorWrite;
-
-        std::string m_sTableName;
-
-        typedef std::map<std::string, uint32_t> MapColumnIndex;
-        MapColumnIndex m_mapColumnIndex;
-
-        enum SearchResult
-        {
-            SEARCH_RESULT_ERROR
-            ,SEARCH_RESULT_NOT_FOUND
-            ,SEARCH_RESULT_FOUND
-        };
-
-        bool InitVDB(char const* pszTableName);
-        bool InitVDBRead(char const* pszTableName);
-        void ReleaseVDB();
-        bool InitColumnIndex();
-        bool OpenCursor();
-        enum SearchResult SearchSingleRow(::AgrepFlags flags, int64_t idRow);
-
-    public:
-        template<typename T> bool ReadItems(int64_t idRow, char const* pszColumnName, T* pBuf, uint32_t nBufLen, uint32_t* pnItemsRead)
-        {
-            uint32_t idxCol = cursorRead.GetColumnIndex(pszColumnName);
-
-            rc_t rc = ::VCursorReadDirect(cursorRead.PtrConstRef(), idRow, idxCol, 8*sizeof(T), pBuf, nBufLen, pnItemsRead);
-            PROCESS_RC_ERROR(rc, "VCursorReadDirect")
-
-            CPostReadAction<T>(pBuf, *pnItemsRead)();
-
-            return true;
-        }
-    };
-}
-
-#endif
\ No newline at end of file
diff --git a/test/search/test-agrep.cpp b/test/search/test-agrep.cpp
deleted file mode 100644
index 8176470..0000000
--- a/test/search/test-agrep.cpp
+++ /dev/null
@@ -1,928 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for search
-*/
-
-#include <ktst/unit_test.hpp>
-#include <kapp/main.h> /* KMain */
-
-//#include <../libs/search/search-priv.h>
-#include <search/nucstrstr.h>
-#include <search/smith-waterman.h>
-
-#include <stdexcept>
-#include <limits>
-
-#include <stdio.h>
-
-#include "search-vdb.h"
-#include <search/ref-variation.h>
-
-#undef max
-
-using namespace std;
-
-static rc_t argsHandler(int argc, char* argv[]);
-TEST_SUITE_WITH_ARGS_HANDLER(TestSuiteSearch, argsHandler);
-
-static rc_t argsHandler(int argc, char* argv[]) {
-    Args* args = NULL;
-    rc_t rc = ArgsMakeAndHandle(&args, argc, argv, 0, NULL, 0);
-    ArgsWhack(args);
-    return rc;
-}
-
-void trim_eol(char* psz)
-{
-    size_t len = strlen(psz);
-    if (psz[len - 2] == '\n' || psz[len - 2] == '\r')
-        psz[len - 2] = '\0';
-    else if (psz[len - 1] == '\n' || psz[len - 1] == '\r')
-        psz[len - 1] = '\0';
-}
-
-#if 0
-#include "PerfCounter.h"
-#include <klib/checksum.h>
-
-TEST_CASE(TempCRC)
-{
-    std::cout << "Testing crc32 speed..." << std::endl;
-    size_t const size = (size_t)10 << 20;
-    char* buf = new char [size];
-    CPerfCounter counter( "CRC32" );
-
-    for ( size_t i = 0; i < size; ++i )
-    {
-        buf[i] = i;
-    }
-
-    size_t const ALIGN_BYTES = _ARCH_BITS / 8;
-
-    printf ("allocated %saligned (address=%p)\n", (int)((size_t)buf % ALIGN_BYTES) ? "un" : "", buf);
-
-    size_t offset = 2;
-    uint32_t crc32;
-
-    {
-        CPCount count(counter);
-        crc32 = ::CRC32 ( 0, buf + offset, size - offset );
-    }
-
-    printf ("Caclulated CRC32: 0x%08X (%.2lf MB/s)\n", crc32, (size >> 20)/counter.GetSeconds());
-
-    delete[]buf;
-}
-#endif
-
-class AgrepFixture
-{
-public:
-	AgrepFixture()
-	: agrep_params ( 0 )
-	{
-	}
-	~AgrepFixture()
-	{
-		::AgrepWhack ( agrep_params );
-	}
-	
-	rc_t Setup ( const char* pattern, AgrepFlags flags )
-	{
-		pattern_len = strlen ( pattern );
-		return ::AgrepMake ( & agrep_params, AGREP_MODE_ASCII | flags, pattern );
-	}
-	
-	bool FindFirst ( const string& text, int32_t threshold )
-	{
-		return ::AgrepFindFirst ( agrep_params, threshold, text . c_str (), text . size (), & match_info ) != 0;	
-	}
-
-	bool FindBest ( const string& text, int32_t threshold )
-	{
-		return ::AgrepFindBest ( agrep_params, threshold, text . c_str (), text . size (), & match_info ) != 0;	
-	}
-
-
-public:	
-	size_t pattern_len;
-	::AgrepParams* agrep_params;
-    ::AgrepMatch match_info;
-};
-
-FIXTURE_TEST_CASE ( AgrepDPTest, AgrepFixture )
-{
-    REQUIRE_RC ( Setup ( "MATCH", AGREP_ALG_DP ) );
-
-    // Complete match
-    {
-        REQUIRE ( FindFirst ( "MATCH", 0 ) );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.length );
-        REQUIRE_EQ ( 0, match_info.position );
-        REQUIRE_EQ ( 0, match_info.score );
-    }
-
-    // Complete substring match
-    {
-        REQUIRE ( FindFirst ( "xxMATCHvv", 0 ) );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.length );
-        REQUIRE_EQ ( 2, match_info.position );
-        REQUIRE_EQ ( 0, match_info.score );
-    }
-    // 1 Deletion
-    {
-        REQUIRE ( FindFirst ( "xxxMACHvv", 1 ) );
-        REQUIRE_EQ ( pattern_len - 1, (size_t)match_info.length );
-        REQUIRE_EQ ( 3, match_info.position );
-        REQUIRE_EQ ( 1, match_info.score );
-    }
-
-    // 2 Insertions
-    {
-        REQUIRE ( FindFirst ( "xxxMAdTCaHvv", 2 ) );
-        REQUIRE_EQ ( pattern_len + 2, (size_t)match_info.length );
-        REQUIRE_EQ ( 3, match_info.position );
-        REQUIRE_EQ ( 2, match_info.score );
-    }
-
-    // 3 Mismatches
-    {
-        REQUIRE ( FindFirst ( "xATxx", 5 ) );
-        REQUIRE_EQ ( pattern_len /*2*/, (size_t)match_info.length ); // FIXME: 2 looks correct here
-        REQUIRE_EQ ( 0, match_info.position );                       // 1
-        REQUIRE_EQ ( 3, match_info.score );                          // 2
-    }
-    
-    // Best match
-    {
-        REQUIRE ( FindBest ( "MTCH__MITCH_MTACH_MATCH_MATCH", 1 ) );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.length );
-        REQUIRE_EQ ( 18, match_info.position );
-        REQUIRE_EQ ( 0, match_info.score );
-    }
-    // First match
-    {
-        REQUIRE ( FindFirst ( "MTCH__MITCH_MTACH_MATCH_MATCH", 1 ) );
-        REQUIRE_EQ ( pattern_len - 1, (size_t)match_info.length );
-        REQUIRE_EQ ( 0, match_info.position );
-        REQUIRE_EQ ( 1, match_info.score );
-    }
-
-    // Match anything
-    {
-        // threshold >= pattern_len seems to specify that a complete mismatch is acceptable
-        // by implementation, the algorithm reports the result to be "found" at the tail portion of the reference string
-        // for this degenerate case, the expected behavior is not clear, so I'll just document the reality here:
-        const string text = "xyzvuwpiuuuu";
-        REQUIRE ( FindFirst ( "xyzvuwpiuuuu", pattern_len ) );
-        REQUIRE_EQ ( pattern_len + 1, (size_t)match_info.length );
-        REQUIRE_EQ ( text . size () - ( pattern_len + 1 ), (size_t)match_info.position );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.score );
-    }
-
-    // Not found
-    {
-        REQUIRE ( ! FindFirst ( "xyzvuwpiu", 4 ) );
-    }
-}
-
-FIXTURE_TEST_CASE ( AgrepWumanberTest, AgrepFixture )
-{
-    REQUIRE_RC ( Setup ( "MATCH", AGREP_ALG_WUMANBER ) );
-	
-    // Complete match
-    {
-        REQUIRE ( FindFirst ( "MATCH", 0 ) );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.length );
-        REQUIRE_EQ ( 0, match_info.position );
-        REQUIRE_EQ ( 0, match_info.score );
-    }
-
-    // Complete substring match
-    {
-        REQUIRE ( FindFirst ( "xxMATCHvv", 0 ) );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.length );
-        REQUIRE_EQ ( 2, match_info.position );
-        REQUIRE_EQ ( 0, match_info.score );
-    }
-    // 1 Deletion
-    {
-        REQUIRE ( FindFirst ( "xxxMACHvv", 1 ) );
-        REQUIRE_EQ ( pattern_len - 1, (size_t)match_info.length );
-        REQUIRE_EQ ( 3, match_info.position );
-        REQUIRE_EQ ( 1, match_info.score );
-    }
-
-    // 2 Insertions
-    {
-        REQUIRE ( FindFirst ( "xxxMAdTCaHvv", 2 ) );
-        REQUIRE_EQ ( pattern_len + 2, (size_t)match_info.length );
-        REQUIRE_EQ ( 3, match_info.position );
-        REQUIRE_EQ ( 2, match_info.score );
-    }
-
-    // 3 Mismatches
-    {
-        REQUIRE ( FindFirst ( "xATxx", 5 ) );
-        REQUIRE_EQ ( pattern_len /*2*/, (size_t)match_info.length ); // FIXME: 2 looks correct here
-        REQUIRE_EQ ( 0, match_info.position );                       // 1   
-        REQUIRE_EQ ( 3, match_info.score );                          // 2
-    }
-    
-    // Best match
-    {
-        REQUIRE ( FindBest ( "MTCH__MITCH_MTACH_MATCH_MATCH", 1 ) );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.length );
-        REQUIRE_EQ ( 18, match_info.position );
-        REQUIRE_EQ ( 0, match_info.score );
-    }
-    // First match
-    {
-        REQUIRE ( FindFirst ( "MTCH__MITCH_MTACH_MATCH_MATCH", 1 ) );
-        REQUIRE_EQ ( pattern_len - 1, (size_t)match_info.length );
-        REQUIRE_EQ ( 0, match_info.position );
-        REQUIRE_EQ ( 1, match_info.score );
-    }
-
-    // Match anything
-    {   // threshold >= pattern_len seems to specify that a complete mismatch is acceptable
-        const string text = "xyzvuwpiuuuu";
-        REQUIRE ( FindFirst ( text, pattern_len ) );
-        REQUIRE_EQ ( text . size (), (size_t)match_info.length ); 
-        REQUIRE_EQ ( 0, match_info.position );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.score );
-    }
-
-    // Not found
-    {
-        REQUIRE ( ! FindFirst ( "xyzvuwpiu", 4 ) );
-    }
-}
-
-FIXTURE_TEST_CASE ( AgrepMyersTest, AgrepFixture )
-{
-    REQUIRE_RC ( Setup ( "MATCH", AGREP_ALG_MYERS ) );
-	
-    // Complete match
-    {
-        REQUIRE ( FindFirst ( "MATCH", 0 ) );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.length );
-        REQUIRE_EQ ( 0, match_info.position );
-        REQUIRE_EQ ( 0, match_info.score );
-    }
-
-    // Complete substring match
-    {
-        REQUIRE ( FindFirst ( "xxMATCHvv", 0 ) );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.length );
-        REQUIRE_EQ ( 2, match_info.position );
-        REQUIRE_EQ ( 0, match_info.score );
-    }
-    // 1 Deletion
-    {
-        REQUIRE ( FindFirst ( "xxxMACHvv", 1 ) );
-        REQUIRE_EQ ( pattern_len - 1, (size_t)match_info.length );
-        REQUIRE_EQ ( 3, match_info.position );
-        REQUIRE_EQ ( 1, match_info.score );
-    }
-
-    // 2 Insertions
-    {
-        REQUIRE ( FindFirst ( "xxxMAdTCaHvv", 2 ) );
-//        REQUIRE_EQ ( pattern_len + 2, (size_t)match_info.length );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.length ); //FIXME: different from other algorithms
-        REQUIRE_EQ ( 3, match_info.position );
-        REQUIRE_EQ ( 2, match_info.score );
-    }
-
-    // 3 Mismatches
-    {
-        REQUIRE ( FindFirst ( "xATxx", 5 ) );
-        REQUIRE_EQ ( 2, match_info.length  ); 
-        REQUIRE_EQ ( 1, match_info.position ); 
-        REQUIRE_EQ ( 3, match_info.score );
-    }
-    
-    // Best match
-    {
-        REQUIRE ( FindBest ( "MTCH__MITCH_MTACH_MATCH_MATCH", 1 ) );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.length );
-        REQUIRE_EQ ( 18, match_info.position );
-        REQUIRE_EQ ( 0, match_info.score );
-    }
-    // First match
-    {
-        REQUIRE ( FindFirst ( "MTCH__MITCH_MTACH_MATCH_MATCH", 1 ) );
-        REQUIRE_EQ ( pattern_len - 1, (size_t)match_info.length );
-        REQUIRE_EQ ( 0, match_info.position );
-        REQUIRE_EQ ( 1, match_info.score );
-    }
-
-    // Match anything
-    {   // threshold >= pattern_len seems to specify that a complete mismatch is acceptable
-        const string text = "xyzvuwpiuuuu";
-        REQUIRE ( FindFirst ( text, pattern_len ) );
-//        REQUIRE_EQ ( text . size (), (size_t)match_info.length ); 
-        REQUIRE_EQ ( 1, match_info.length ); //FIXME: different from other algorithms
-        REQUIRE_EQ ( 0, match_info.position );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.score );
-    }
-
-    // Not found
-    {
-        REQUIRE ( ! FindFirst ( "xyzvuwpiu", 4 ) );
-    }
-}
-
-FIXTURE_TEST_CASE ( AgrepMyersUnltdTest, AgrepFixture )
-{
-    REQUIRE_RC ( Setup ( "MATCH", AGREP_ALG_MYERS_UNLTD ) );
-	
-    // Complete match
-    {
-        REQUIRE ( FindFirst ( "MATCH", 0 ) );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.length );
-        REQUIRE_EQ ( 0, match_info.position );
-        REQUIRE_EQ ( 0, match_info.score );
-    }
-
-    // Complete substring match
-    {
-        REQUIRE ( FindFirst ( "xxMATCHvv", 0 ) );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.length );
-        REQUIRE_EQ ( 2, match_info.position );
-        REQUIRE_EQ ( 0, match_info.score );
-    }
-    // 1 Deletion
-    {
-        REQUIRE ( FindFirst ( "xxxMACHvv", 1 ) );
-        REQUIRE_EQ ( pattern_len - 1, (size_t)match_info.length );
-        REQUIRE_EQ ( 3, match_info.position );
-        REQUIRE_EQ ( 1, match_info.score );
-    }
-
-    // 2 Insertions
-    {
-        REQUIRE ( FindFirst ( "xxxMAdTCaHvv", 2 ) );
-//        REQUIRE_EQ ( pattern_len + 2, (size_t)match_info.length );
-        REQUIRE_EQ ( (size_t)pattern_len - 1, (size_t)match_info.length ); //FIXME: different from other algorithms
-        REQUIRE_EQ ( (int32_t)3, match_info.position );
-        REQUIRE_EQ ( (int32_t)2, match_info.score );
-    }
-
-    // 3 Mismatches
-    {
-        REQUIRE ( FindFirst ( "xATxx", 5 ) );
-        REQUIRE_EQ ( 2, match_info.length ); 
-        REQUIRE_EQ ( 1, match_info.position ); 
-        REQUIRE_EQ ( 3, match_info.score );
-    }
-    
-    // Best match
-    {
-        REQUIRE ( FindBest ( "MTCH__MITCH_MTACH_MATCH_MATCH", 1 ) );
-        REQUIRE ( (size_t)match_info.length == pattern_len );
-        REQUIRE ( match_info.position == 18 );
-        REQUIRE ( match_info.score == 0 );
-    }
-    // First match
-    {
-        REQUIRE ( FindFirst ( "MTCH__MITCH_MTACH_MATCH_MATCH", 1 ) );
-        REQUIRE ( (size_t)match_info.length == pattern_len - 1 );
-        REQUIRE ( match_info.position == 0 );
-        REQUIRE ( match_info.score == 1 );
-    }
-
-    // Match anything
-    {   // threshold >= pattern_len seems to specify that a complete mismatch is acceptable
-        const string text = "xyzvuwpiuuuu";
-        REQUIRE ( FindFirst ( text, pattern_len ) );
-//        REQUIRE_EQ ( text . size (), (size_t)match_info.length ); 
-        REQUIRE_EQ ( 1, match_info.length ); //FIXME: different from other algorithms
-        REQUIRE_EQ ( 0, match_info.position );
-        REQUIRE_EQ ( pattern_len, (size_t)match_info.score );
-    }
-
-    // Not found
-    {
-        REQUIRE ( ! FindFirst ( "xyzvuwpiu", 4 ) );
-    }
-}
-
-
-TEST_CASE(SearchCompare)
-{
-    //std::cout << "This is search algorithm time comparison test" << std::endl << std::endl;
-    std::cout << "SearchCompare test is currently OFF" << std::endl;
-
-    /*
-    TimeTest("SRR067432", SearchTimeTest::ALGORITHM_AGREP);
-    TimeTest("SRR067432", SearchTimeTest::ALGORITHM_LCS_DP);
-    TimeTest("SRR067432", SearchTimeTest::ALGORITHM_NUCSTRSTR);
-    TimeTest("SRR067432", SearchTimeTest::ALGORITHM_LCS_SAIS);*/
-
-    //std::cout << std::endl << "Time comparison test acomplished" << std::endl;
-}
-
-TEST_CASE(TestCaseAgrep)
-{
-    std::cout << "TestCaseAgrep test is currently OFF" << std::endl;
-    //VDBSearchTest::CFindLinker().Run(AGREP_MODE_ASCII|AGREP_ALG_MYERS, "SRR067432");//"SRR068408");
-    //VDBSearchTest::CFindLinker().Run(AGREP_MODE_ASCII|AGREP_ALG_MYERS, "SRR067408_extr");
-
-/*
-    char const pszRunNamesFile[] = "454Runs.txt";
-    FILE* fRuns = fopen(pszRunNamesFile, "r");
-    if (!fRuns)
-    {
-        printf("Failed to open file: %s\n", pszRunNamesFile);
-        return;
-    }
-    bool bSkipping = true;
-    for (; !feof(fRuns); )
-    {
-        char szRuns[512] = "";
-        char* psz = fgets(szRuns, sizeof(szRuns), fRuns);
-        if (!psz)
-            break;
-        trim_eol(psz);
-        if (bSkipping && !strcmp(psz, "SRR067408"))
-        {
-            bSkipping = false;
-        }
-        if (bSkipping)
-            continue;
-        VDBSearchTest::CFindLinker().Run(AGREP_MODE_ASCII|AGREP_ALG_MYERS, psz);
-    }*/
-}
-
-// Fgrep
-
-static void RunFgrep ( FgrepFlags p_alg )
-{   // VDB-2669: creates uninitialized memory
-    Fgrep* fg;
-    const char* queries[] = { "RRRRRAH" };
-    if ( FgrepMake ( & fg, FGREP_MODE_ASCII | p_alg, queries, 1 ) ) // this used to leave uninitialized memory ...
-        throw logic_error ( "RunFgrep: FgrepMake() failed" );
-    
-    const std::string str ( 1000, 'A' );
-    FgrepMatch matchinfo;
-    if ( 0 != FgrepFindFirst ( fg, str . data (), str . size (), & matchinfo ) ) // ... the use of which showed up in valgrind here, and sometimes caused a crash
-        throw logic_error ( "RunFgrep: FgrepFindFirst() found a false match" );
-    
-    FgrepFree ( fg );
-}
-
-TEST_CASE ( DumbGrep_Crash )
-{
-    RunFgrep ( FGREP_ALG_DUMB );
-}
-
-TEST_CASE ( BoyerMooreGrep_Crash )
-{
-    RunFgrep ( FGREP_ALG_BOYERMOORE );
-}
-
-TEST_CASE ( AhoGrep_Crash )
-{
-    RunFgrep ( FGREP_ALG_AHOCORASICK );
-}
-
-// Smith-Waterman
-
-class SmithWatermanFixture
-{
-public:
-	SmithWatermanFixture()
-	:  m_self ( 0 ),
-       m_pattern_len ( 0 )
-	{
-	}
-	~SmithWatermanFixture()
-	{
-		::SmithWatermanWhack ( m_self );
-	}
-	
-	rc_t Setup ( const string& p_query )
-	{
-        m_pattern_len = p_query . size (); 
-		return ::SmithWatermanMake ( & m_self, p_query . data() );
-	}
-	
-	bool FindFirst ( const string& p_text, uint32_t p_threshold = numeric_limits<uint32_t>::max() )
-	{
-		return ::SmithWatermanFindFirst ( m_self,  p_threshold, p_text . c_str (), p_text . size (), & m_match_info ) == 0;	
-	}
-
-public:	
-	::SmithWaterman*       m_self;
-	size_t                 m_pattern_len;
-    ::SmithWatermanMatch   m_match_info;
-};
-
-FIXTURE_TEST_CASE ( SmithWatermanTest, SmithWatermanFixture )
-{
-    REQUIRE_RC ( Setup ( "MATCH" ) );
-
-    // VDB-3034: crash on query of length 0, when called right after initialization of the search object
-    {
-        REQUIRE(!FindFirst(""));
-    }
-
-	// threshold in FirstMatch varies from 0 (a complete mismatch is acceptable) to 2*m_pattern_len (perfect match)
-    
-    // Complete match
-    {
-        REQUIRE ( FindFirst ( "MATCH" ) );
-        REQUIRE_EQ ( m_pattern_len,  ( size_t ) m_match_info.length );
-        REQUIRE_EQ ( 0, m_match_info.position );
-        REQUIRE_EQ ( 2 * m_pattern_len, ( size_t ) m_match_info.score );
-    }
-    // Complete substring match
-    {
-        REQUIRE ( FindFirst ( "xxMATCHvv", 0 ) );
-        REQUIRE_EQ ( m_pattern_len, (size_t)m_match_info.length );
-        REQUIRE_EQ ( 2, m_match_info.position );
-        REQUIRE_EQ ( 2 * m_pattern_len, ( size_t ) m_match_info.score );
-    }
-    // 1 Deletion
-    {
-        REQUIRE ( FindFirst ( "xxxMACHvv", 7 ) );
-        REQUIRE_EQ ( m_pattern_len - 1, (size_t)m_match_info.length );
-        REQUIRE_EQ ( 3, m_match_info.position );
-        REQUIRE_EQ ( 7, m_match_info.score );
-    }
-
-    // 2 Insertions
-    {
-        REQUIRE ( FindFirst ( "xxxMAdTCaHvv", 8 ) );
-        REQUIRE_EQ ( m_pattern_len + 2, (size_t)m_match_info.length );
-        REQUIRE_EQ ( 3, m_match_info.position );
-        REQUIRE_EQ ( 8, m_match_info.score );
-    }
-
-    // 3 Mismatches
-    {
-        REQUIRE ( FindFirst ( "xATxx", 4 ) );
-        REQUIRE_EQ ( 2, m_match_info.length );
-        REQUIRE_EQ ( 1, m_match_info.position );
-        REQUIRE_EQ ( 4, m_match_info.score );
-    }
-    
-    // First match
-    {
-        REQUIRE ( FindFirst ( "MTCH__MITCH_MTACH_MATCH_MATCH" ) );
-        REQUIRE_EQ ( m_pattern_len, (size_t)m_match_info.length );
-        REQUIRE_EQ ( 18, m_match_info.position );
-        REQUIRE_EQ ( 2 * m_pattern_len,  (size_t)m_match_info.score );
-    }
-
-    // Match anything
-    {   // threshold is from 0 (a complete mismatch is acceptable) to 2*m_pattern_len (perfect match)
-        const string text = "xyzvuwpiuuuu";
-        REQUIRE ( FindFirst ( text, 0 ) );
-        REQUIRE_EQ ( 0, m_match_info.length ); 
-        REQUIRE_EQ ( 0, m_match_info.position );
-        REQUIRE_EQ ( 0, m_match_info.score );
-    }
-
-    // Not found
-    {
-        REQUIRE ( ! FindFirst ( "xyzvuwpiu", 1 ) );
-    }
-
-}
-
-// Ref-Variation
-#if 0
-static 
-void 
-PrintMatrix ( const INSDC_dna_text* p_ref, const INSDC_dna_text* p_query, const int p_matrix[], size_t p_rows, size_t p_cols )
-{
-    cout << "    ";
-    while ( *p_query )
-    {
-        cout << " " << *p_query;
-        ++p_query;
-    }
-    cout << endl;
-    for ( size_t i = 0; i < p_rows - 1; ++i ) // skip row 0 ( all 0s )
-    {
-        cout << i << " " << p_ref[i] << ": ";
-        for ( size_t j = 0; j < p_cols - 1; ++j ) // skip the 0 at the start
-        {
-            cout << p_matrix [ ( i + 1 ) * p_cols + j + 1 ] << " ";
-        }
-        cout << endl;
-    }
-}
-#endif
-
-TEST_CASE ( RefVariation_crash)
-{
-    RefVariation* self;
-    INSDC_dna_text ref[] = "ACGTACGTACGTACGTACGTACGTACGTACGT";
-    REQUIRE_RC_FAIL ( RefVariationIUPACMake ( &self, ref, string_size ( ref ), 0, 0, "", 0, ::refvarAlgSW ) );
-}
-
-#ifdef _WIN32
-#define PRSIZET "I"
-#else
-#define PRSIZET "z"
-#endif
-
-string print_refvar_obj (::RefVariation const* obj)
-{
-    size_t allele_len = 0, allele_start = 0, allele_len_on_ref = 0;
-    char const* allele = NULL;
-    ::RefVariationGetAllele( obj, & allele, & allele_len, & allele_start );
-    ::RefVariationGetAlleleLenOnRef ( obj, & allele_len_on_ref );
-
-    //printf ("<no ref name>:%"PRSIZET"u:%"PRSIZET"u:%.*s\n", allele_start, allele_len_on_ref, (int)allele_len, allele);
-        
-    return string ( allele, allele_len );
-}
-
-#undef PRSIZET
-
-
-string vrefvar_bounds (::RefVarAlg alg, char const* ref,
-    size_t ref_len, size_t pos, size_t len_on_ref,
-    char const* query, size_t query_len)
-{
-
-    ::RefVariation* obj;
-
-    rc_t rc = ::RefVariationIUPACMake ( & obj, ref, ref_len, pos, len_on_ref, query, query_len, alg );
-
-    string ret = print_refvar_obj ( obj );
-
-    if ( rc == 0 )
-        ::RefVariationRelease( obj );
-        
-    return ret;
-}
-
-string vrefvar_bounds_n(::RefVarAlg alg)
-{
-    //                  01234567890123456789
-    char const ref[] = "NNNNNNNNNNTAACCCTAAC";
-    //                       CCCCTTAGG-
-
-    size_t pos = 5, len_on_ref = 10;
-    char const query[] = "CCCCTTAGG";
-
-    return vrefvar_bounds ( alg, ref, strlen(ref), pos, len_on_ref, query, strlen(query) );
-}
-
-string vrefvar_bounds_0(::RefVarAlg alg)
-{
-    //                  01234567890123456789
-    char const ref[] = "TAACCCTAAC";
-    //                  TTAGG-
-
-    size_t pos = 0, len_on_ref = 5;
-    char const query[] = "TAGG";
-
-    return vrefvar_bounds ( alg, ref, strlen(ref), pos, len_on_ref, query, strlen(query) );
-}
-
-string vrefvar_bounds_N0(::RefVarAlg alg)
-{
-    //                  01234567890123456789
-    char const ref[] = "NNNNNTAACCCTAAC";
-    //                  CCCCTTTAGG-
-
-    size_t pos = 0, len_on_ref = 10;
-    char const query[] = "CCCCTTAGG";
-
-    return vrefvar_bounds ( alg, ref, strlen(ref), pos, len_on_ref, query, strlen(query) );
-}
-
-TEST_CASE ( RefVariation_bounds_N )
-{
-    //printf ("TODO: this test is derived from the real example which hangs up now (2015-12-14):\n");
-    //printf ("echo \"67068302 NC_000001.10:9995:10:CCCCTTAGG\" | var-expand --algorithm=sw\n");
-    
-    REQUIRE_EQ ( string ( "NNNNNCCCCTTAGGCTAA" ), vrefvar_bounds_n ( ::refvarAlgSW ) );
-    REQUIRE_EQ ( string ( "CCCCTTAGGC" ), vrefvar_bounds_n ( ::refvarAlgRA ) );
-
-    REQUIRE_EQ ( string ( "AGGC" ), vrefvar_bounds_0 ( ::refvarAlgSW ) );
-    REQUIRE_EQ ( string ( "TAGG" ), vrefvar_bounds_0 ( ::refvarAlgRA ) );
-
-    REQUIRE_EQ ( string ( "CCCCTTAGGCTAA" ), vrefvar_bounds_N0 ( ::refvarAlgSW ) );
-    REQUIRE_EQ ( string ( "CCCCTTAGGC" ), vrefvar_bounds_N0 ( ::refvarAlgRA ) );
-}
-
-// Nucstrstr
-static 
-void 
-ConvertAsciiTo2NAPacked ( const string& p_read, unsigned char* pBuf2NA, size_t nBuf2NASize )
-{
-    static unsigned char map [ 1 << ( sizeof ( char ) * 8 ) ];
-    map['A'] = map['a'] = 0;
-    map['C'] = map['c'] = 1;
-    map['G'] = map['g'] = 2;
-    map['T'] = map['t'] = 3;
-    
-    static size_t shiftLeft [ 4 ] = { 6, 4, 2, 0 };
-
-    fill ( pBuf2NA, pBuf2NA + nBuf2NASize, 0 );
-    
-    for ( size_t iChar = 0; iChar < p_read . size (); ++iChar )
-    {
-        size_t iByte = iChar / 4;
-        if ( iByte > nBuf2NASize )
-        {
-            assert ( false );
-            break;
-        }
-
-        pBuf2NA[iByte] |= map [ size_t ( p_read [ iChar ] ) ] << shiftLeft [ iChar % 4 ];
-    }
-}
-
-static
-int
-RunNucStrtr ( const string& p_ref, const string& p_query, bool p_positional )
-{
-    unsigned char buf2na [ 1024 ];
-    ConvertAsciiTo2NAPacked ( p_ref, buf2na, sizeof ( buf2na ) );
-    
-    NucStrstr *nss;
-    if ( NucStrstrMake ( & nss, p_positional ? 1 : 0, p_query . c_str (), p_query . size () ) != 0 )
-        throw logic_error ( "RunNucStrtr: NucStrstrMake() failed" );
-    unsigned int selflen = 0u;
-    // NB: for now, all searches start are from the beginning ( nucstrstr.h says "may be >= 4"; not sure what that means )
-    const unsigned int pos = 0;
-    int ret = NucStrstrSearch ( nss, ( const void * ) buf2na, pos, p_ref . size () - pos, & selflen );
-    NucStrstrWhack ( nss );
-    return ret;
-}
-
-TEST_CASE ( Nucstrstr_NonPositional_NotFound )
-{
-    REQUIRE_EQ ( 0, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGT", "ACTA", false ) );
-}
-
-TEST_CASE ( Nucstrstr_NonPositional_Found_AtStart )
-{
-    REQUIRE_NE ( 0, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGT", "ACGTACGTACG", false ) );
-}
-
-TEST_CASE ( Nucstrstr_NonPositional_Found_InMiddle )
-{
-    REQUIRE_NE ( 0, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGT", "GTACGTACG", false ) );
-}
-
-TEST_CASE ( Nucstrstr_Positional_NoExpr_NotFound )
-{
-    REQUIRE_EQ ( 0, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGT", "ACCGT", true ) );
-}
-
-TEST_CASE ( Nucstrstr_Positional_NoExpr_Found_AtStart )
-{
-    REQUIRE_EQ ( 1, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGT", "ACGTACGTACG", true ) );
-}
-
-TEST_CASE ( Nucstrstr_Positional_NoExpr_Found_InMiddle )
-{
-    REQUIRE_EQ ( 4, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGT", "TACGTACG", true ) );
-}
-
-TEST_CASE ( Nucstrstr_Positional_Not_False )
-{
-    REQUIRE_EQ ( 0, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGT", "!TACGTACG", true ) );
-}
-TEST_CASE ( Nucstrstr_Positional_Not_True )
-{   // "!" returns only 0 or 1, not the position
-    REQUIRE_EQ ( 1, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGT", "!AG", true ) );
-}
-
-TEST_CASE ( Nucstrstr_Positional_Caret_Found )
-{   
-    REQUIRE_EQ ( 1, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGT", "^AC", true ) );
-}
-TEST_CASE ( Nucstrstr_Positional_Caret_NotFound )
-{   
-    REQUIRE_EQ ( 0, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGT", "^C", true ) );
-}
-
-TEST_CASE ( Nucstrstr_Positional_Dollar_Found )
-{   
-    REQUIRE_EQ ( 33, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGTTGCA", "TGCA$", true ) );
-}
-TEST_CASE ( Nucstrstr_Positional_Dollar_NotFound )
-{   
-    REQUIRE_EQ ( 0, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGTTGCAA", "TGCA$", true ) );
-}
-
-TEST_CASE ( Nucstrstr_Positional_OR_Found_1 )
-{   
-    REQUIRE_EQ ( 4, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGTTGCA", "TGAA|TACG", true ) );
-}
-TEST_CASE ( Nucstrstr_Positional_OR_Found_2 )
-{   
-    REQUIRE_EQ ( 4, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGTTGCA", "TGAA||TACG", true ) );
-}
-TEST_CASE ( Nucstrstr_Positional_OR_Found_FirstMatchPositionReported )
-{   
-    REQUIRE_EQ ( 2, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGTTGCA", "TGAA|CGT|TACG", true ) );
-}
-TEST_CASE ( Nucstrstr_Positional_OR_NotFound )
-{   
-    REQUIRE_EQ ( 0, RunNucStrtr ( "ACGTACGTACGTACGTACGTACGTACGTACGTTGCA", "TGAA|TACA", true ) );
-}
-
-TEST_CASE ( Nucstrstr_Positional_AND_Found_LastMatchPositionReported )
-{   
-    REQUIRE_EQ ( 4, RunNucStrtr ( "ACGTACGT", "CGTA&TACG", true ) );
-}
-TEST_CASE ( Nucstrstr_Positional_AND_NotFound )
-{   
-    REQUIRE_EQ ( 0, RunNucStrtr ( "ACGTACGT", "TACG&TACA", true ) );
-}
-
-TEST_CASE ( Nucstrstr_Positional_AND_OR_Found_1 )
-{   
-    REQUIRE_EQ ( 3, RunNucStrtr ( "ACGTACGT", "CGTA&TACC|GTAC", true ) );
-}
-TEST_CASE ( Nucstrstr_Positional_AND_OR_Found_2 )
-{   
-    REQUIRE_EQ ( 3, RunNucStrtr ( "ACGTACGT", "CGTA&(TACC|GTAC)", true ) );
-}
-TEST_CASE ( Nucstrstr_Positional_AND_OR_Found_3 )
-{   
-    REQUIRE_EQ ( 2, RunNucStrtr ( "ACGTACGT", "(TACC|GTAC)&&CGTA", true ) );
-}
-
-TEST_CASE ( Nucstrstr_Positional_AND_OR_NOT_NotFound )
-{   
-    REQUIRE_EQ ( 0, RunNucStrtr ( "ACGTACGT", "(TACC|GTAC)&&!CGTA", true ) );
-}
-TEST_CASE ( Nucstrstr_Positional_AND_OR_NOT_Found )
-{   
-    REQUIRE_EQ ( 1, RunNucStrtr ( "ACGTACGT", "(TACC|GTAC)&&!CATA", true ) );
-}
-
-TEST_CASE ( Nucstrstr_Positional_Error )
-{   
-    REQUIRE_THROW ( RunNucStrtr ( "ACGTACGT", "(TACC", true ) );
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-search";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc = TestSuiteSearch(argc, argv);
-    return rc;
-}
-
-} // end of extern "C"
diff --git a/test/sra-pileup/Makefile b/test/sra-pileup/Makefile
new file mode 100644
index 0000000..4ad3ec3
--- /dev/null
+++ b/test/sra-pileup/Makefile
@@ -0,0 +1,49 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/sra-pileup
+
+TEST_TOOLS = 
+
+include $(TOP)/build/Makefile.env
+
+$(TEST_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+runtests: check_exit_code
+
+#-------------------------------------------------------------------------------
+# scripted tests
+#
+
+check_exit_code:
+	@ python $(TOP)/build/check-exit-code.py $(BINDIR)/sra-pileup
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
diff --git a/test/srapath/Makefile b/test/srapath/Makefile
new file mode 100644
index 0000000..5402a5e
--- /dev/null
+++ b/test/srapath/Makefile
@@ -0,0 +1,49 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/srapath
+
+TEST_TOOLS = 
+
+include $(TOP)/build/Makefile.env
+
+$(TEST_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+runtests: check_exit_code
+
+#-------------------------------------------------------------------------------
+# scripted tests
+#
+
+check_exit_code:
+	@ python $(TOP)/build/check-exit-code.py $(BINDIR)/srapath
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
diff --git a/test/sraxf/Makefile b/test/sraxf/Makefile
deleted file mode 100644
index 3083aee..0000000
--- a/test/sraxf/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-
-MODULE = test/sraxf
-
-TEST_TOOLS = \
-	test-fix_read_seg \
-
-include $(TOP)/build/Makefile.env
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: $(TEST_TOOLS)
-
-clean: stdclean
-
-#----------------------------------------------------------------
-# fix_read_seg-test
-#
-
-SRATEST_SRC = \
-	fix_read_seg-test
-
-SRATEST_OBJ = \
-	$(addsuffix .$(OBJX),$(SRATEST_SRC))
-
-SRATEST_LIB = \
-	-skapp \
-	-sktst \
-	-sncbi-vdb \
-
-$(TEST_BINDIR)/test-fix_read_seg: $(SRATEST_OBJ)
-	$(LP) --exe -o $@ $^ $(SRATEST_LIB)
-
diff --git a/test/sraxf/fix_read_seg-test.cpp b/test/sraxf/fix_read_seg-test.cpp
deleted file mode 100644
index 561d41d..0000000
--- a/test/sraxf/fix_read_seg-test.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-#include <klib/text.h> /* uint16_t */
-#include <assert.h>
-#include <math.h>
-
-#include <ktst/unit_test.hpp> /* TEST_SUITE */
-#include <kapp/main.h> /* KAppVersion */
-
-#include <os-native.h> /* lround on Windows, uint16_t */
-#include <string.h> /* memset */
-
-#include "../../libs/sraxf/fix_read_seg_impl.h"
-
-ver_t CC KAppVersion ( void ) { return 0; }
-rc_t CC Usage ( const Args * args ) { return 0; }
-const char UsageDefaultName[] = "";
-rc_t UsageSummary (const char * progname) { return 0; }
-
-TEST_SUITE(FixReadSegTestSuite);
-
-TEST_CASE(_0_reads) {
-    uint16_t rs_src[] = { 0 };
-    uint32_t nreads = 0;
-    uint32_t rs_dst[] = { 0 };
-    fix_read_seg_impl(rs_src, nreads, 0, rs_dst);
-}
-
-TEST_CASE(_1_empty_read) {
-    uint16_t rs_src[] = { 0, 0 };
-    uint32_t nreads = 1;
-    uint32_t rs_dst[] = { 0, 0 };
-    fix_read_seg_impl(rs_src, nreads, 0, rs_dst);
-}
-
-TEST_CASE(_1_read) {
-    uint16_t rs_src[] = { 2, 0 };
-    uint32_t nreads = 1;
-    uint32_t spot_len = 1;
-    uint32_t dst[] = { 1, 0 };
-    fix_read_seg_impl(rs_src, nreads, spot_len, dst);
-    CHECK_EQ(dst[0], (uint32_t)0);
-    CHECK_EQ(dst[1], (uint32_t)1);
-}
-
-TEST_CASE(total_0_read_2) {
-    uint16_t rs_src[] = { 9, 0, 8, 0 };
-    uint32_t nreads = 2;
-    uint32_t spot_len = 1;
-    uint32_t dst[] = { 2, 2, 2, 2 };
-    fix_read_seg_impl(rs_src, nreads, spot_len, dst);
-    CHECK_EQ(dst[0], (uint32_t)0);
-    CHECK_EQ(dst[1], (uint32_t)1);
-    CHECK_EQ(dst[2], (uint32_t)1);
-    CHECK_EQ(dst[3], (uint32_t)0);
-
-    spot_len = 2;
-    memset(dst, 2, sizeof dst);
-    fix_read_seg_impl(rs_src, nreads, spot_len, dst);
-    CHECK_EQ(dst[0], (uint32_t)0);
-    CHECK_EQ(dst[1], (uint32_t)1);
-    CHECK_EQ(dst[2], (uint32_t)1);
-    CHECK_EQ(dst[3], (uint32_t)1);
-}
-
-TEST_CASE(total_eq_spotlen_read_1) {
-    uint16_t rs_src[] = { 9, 1 };
-    uint32_t nreads = 1;
-    uint32_t spot_len = 1;
-    uint32_t dst[] = { 2, 2, 2, 2 };
-    fix_read_seg_impl(rs_src, nreads, spot_len, dst);
-    CHECK_EQ(dst[0], (uint32_t)0);
-    CHECK_EQ(dst[1], (uint32_t)1);
-}
-
-TEST_CASE(total_eq_spotlen_read_2) {
-    uint16_t rs_src[] = { 9, 1, 8, 2 };
-    uint32_t nreads = 2;
-    uint32_t spot_len = 3;
-    uint32_t dst[] = { 7, 7, 7, 7 };
-    fix_read_seg_impl(rs_src, nreads, spot_len, dst);
-    CHECK_EQ(dst[0], (uint32_t)0);
-    CHECK_EQ(dst[1], (uint32_t)1);
-    CHECK_EQ(dst[2], (uint32_t)1);
-    CHECK_EQ(dst[3], (uint32_t)2);
-}
-
-TEST_CASE(total_gt_spotlen_read_1) {
-    uint16_t rs_src[] = { 9, 9 };
-    uint32_t nreads = 1;
-    uint32_t spot_len = 1;
-    uint32_t dst[] = { 7, 7, 7, 7 };
-    fix_read_seg_impl(rs_src, nreads, spot_len, dst);
-    CHECK_EQ(dst[0], (uint32_t)0);
-    CHECK_EQ(dst[1], (uint32_t)1);
-}
-
-TEST_CASE(total_gt_spotlen_read_2) {
-    uint16_t rs_src[] = { 9, 9, 8, 9 };
-    uint32_t nreads = 2;
-    uint32_t spot_len = 1;
-    uint32_t dst[] = { 7, 7, 7, 7 };
-    fix_read_seg_impl(rs_src, nreads, spot_len, dst);
-    CHECK_EQ(dst[0], (uint32_t)0);
-    CHECK_EQ(dst[1], (uint32_t)1);
-    CHECK_EQ(dst[2], (uint32_t)1);
-    CHECK_EQ(dst[3], (uint32_t)0);
-}
-
-TEST_CASE(total_lt_spotlen_read_1) {
-    uint16_t rs_src[] = { 9, 1 };
-    uint32_t nreads = 1;
-    uint32_t spot_len = 9;
-    uint32_t dst[] = { 7, 7, 7, 7 };
-    fix_read_seg_impl(rs_src, nreads, spot_len, dst);
-    CHECK_EQ(dst[0], (uint32_t)0);
-    CHECK_EQ(dst[1], (uint32_t)9);
-}
-
-TEST_CASE(total_lt_spotlen_read_2) {
-    uint16_t rs_src[] = { 9, 1, 8, 1 };
-    uint32_t nreads = 2;
-    uint32_t spot_len = 9;
-    uint32_t dst[] = { 7, 7, 7, 7 };
-    fix_read_seg_impl(rs_src, nreads, spot_len, dst);
-    CHECK_EQ(dst[0], (uint32_t)0);
-    CHECK_EQ(dst[1], (uint32_t)1);
-    CHECK_EQ(dst[2], (uint32_t)1);
-    CHECK_EQ(dst[3], (uint32_t)8);
-}
-
-rc_t CC KMain ( int argc, char *argv [] )
-{ return FixReadSegTestSuite(argc, argv); }
diff --git a/test/tarballs/build.xml b/test/tarballs/build.xml
new file mode 100644
index 0000000..ffe59c7
--- /dev/null
+++ b/test/tarballs/build.xml
@@ -0,0 +1,27 @@
+<project>
+    <property name="sourcename" value="sratoolkit.current-win64.zip" />
+    <property name="url" value="http://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/current/" />
+    <property name="workdir" value=".\temp" />
+    <property name="targetname" value="current-win64" />
+    
+    <target name="tarballs">
+        <delete dir="${workdir}" failonerror="false"/>
+        <mkdir dir="${workdir}"/>
+        <get src="${url}/${sourcename}" dest="${workdir}/${sourcename}" />
+        <unzip src="${workdir}/${sourcename}" dest="${workdir}" />
+        <delete dir="${workdir}/${sourcename}" />
+        <dirset id="tgt" dir="${workdir}" includes="*-win64"/>
+        <property name="target" refid="tgt"/>
+        <move file="${workdir}/${target}" tofile="${workdir}/${targetname}"/>
+        
+        <echo message="Target directory is ${workdir}/${targetname}"/>
+        
+        <exec executable="cmd" failonerror="true" >
+            <arg value="/c"/>
+            <arg value="test-tarballs.bat"/>
+            <arg value="${workdir}\${targetname}\bin"/>
+        </exec>
+        
+        <delete dir="${workdir}" failonerror="false"/>
+    </target>
+</project>
diff --git a/test/tarballs/test-tarballs.bat b/test/tarballs/test-tarballs.bat
new file mode 100644
index 0000000..7cd7051
--- /dev/null
+++ b/test/tarballs/test-tarballs.bat
@@ -0,0 +1,40 @@
+:: ===========================================================================
+::
+::                            PUBLIC DOMAIN NOTICE
+::               National Center for Biotechnology Information
+::
+::  This software/database is a "United States Government Work" under the
+::  terms of the United States Copyright Act.  It was written as part of
+::  the author's official duties as a United States Government employee and
+::  thus cannot be copyrighted.  This software/database is freely available
+::  to the public for use. The National Library of Medicine and the U.S.
+::  Government have not placed any restriction on its use or reproduction.
+::
+::  Although all reasonable efforts have been taken to ensure the accuracy
+::  and reliability of the software and data, the NLM and the U.S.
+::  Government do not and cannot warrant the performance or results that
+::  may be obtained by using this software or data. The NLM and the U.S.
+::  Government disclaim all warranties, express or implied, including
+::  warranties of performance, merchantability or fitness for any particular
+::  purpose.
+::
+::  Please cite the author in any work or product based on this material.
+::
+:: ===========================================================================
+
+echo on
+Setlocal
+Setlocal EnableDelayedExpansion
+
+set TOOLS=abi-dump align-info blastn_vdb cache-mgr fastq-dump illumina-dump kar kdbmeta latf-load prefetch rcexplain sam-dump sff-dump ^
+          sra-kar sra-pileup sra-stat srapath tblastn_vdb test-sra vdb-config vdb-copy vdb-decrypt vdb-dump vdb-encrypt vdb-lock ^
+          vdb-unlock vdb-validate   
+
+:: vdb-passwd is obsolete but still in the package
+
+set FAILED=
+
+for %%t in ( %TOOLS% ) do ( echo | set /p=%%t & %1\%%t -h >NUL & ( if errorlevel 1 ( echo | set /p=failed! & set FAILED=!FAILED! %%t ) ) & echo. )
+
+if "%FAILED%" NEQ "" ( echo. & echo FAILED: %FAILED% & exit /b 1 )
+
diff --git a/test/tarballs/test-tarballs.sh b/test/tarballs/test-tarballs.sh
new file mode 100755
index 0000000..5818921
--- /dev/null
+++ b/test/tarballs/test-tarballs.sh
@@ -0,0 +1,97 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+#
+#  Download and test SRA Toolkit tarballs (see VDB-1345)
+#  Errors are reported to the specified email
+#
+# Parameters:
+# $1 - working dir (will contain a copy of the latest md5sum.txt file)
+#
+# return codes:
+# 0 - tests passed
+# 1 - wget failed
+# 2 - gunzip failed
+# 3 - tar failed
+# 4 - one of the tools failed
+
+WORKDIR=$1
+if [ "${WORKDIR}" == "" ]
+then
+    WORKDIR="./temp"
+fi
+
+TOOLS="abi-dump abi-load align-info bam-load blastn_vdb cache-mgr cg-load fastq-dump fastq-load helicos-load illumina-dump \
+illumina-load kar kdbmeta latf-load prefetch rcexplain sam-dump sff-dump sff-load sra-kar sra-pileup \
+sra-sort sra-stat srapath srf-load tblastn_vdb test-sra vdb-config vdb-copy vdb-decrypt vdb-dump vdb-encrypt vdb-lock \
+vdb-unlock vdb-validate"
+
+# vdb-passwd is obsolete but still in the package
+
+case $(uname) in
+Linux)
+    python -mplatform | grep Ubuntu && OS=ubuntu64 || OS=centos_linux64
+    TOOLS="${TOOLS} pacbio-load remote-fuser"
+    ;;
+Darwin)
+    OS=mac64
+    ;;
+esac
+
+TARBALLS_URL=http://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/current/
+TARGET=sratoolkit.current-${OS}
+
+mkdir -p ${WORKDIR}
+cd ${WORKDIR}
+
+wget -nv ${TARBALLS_URL}${TARGET}.tar.gz || exit 1
+gunzip -f ${TARGET}.tar.gz || exit 2
+PACKAGE=$(tar tf ${TARGET}.tar | head -n 1)
+rm -rf ${PACKAGE}
+tar xvf ${TARGET}.tar || exit 3
+
+FAILED=""
+for tool in ${TOOLS} 
+do
+    echo $tool
+    ${PACKAGE}/bin/$tool -h 
+    if [ "$?" != "0" ]
+    then
+        echo "$(pwd)/${PACKAGE}/bin/$tool failed" 
+        FAILED="${FAILED} $tool" 
+    fi
+done
+
+if [ "${FAILED}" != "" ]
+then
+    echo "The following tools failed: ${FAILED}"
+    exit 4
+fi
+
+rm -rf ${PACKAGE} ${TARGET}.tar
+cd -
+
+
+
diff --git a/test/vcf-loader/Makefile b/test/vcf-loader/Makefile
new file mode 100644
index 0000000..d5de406
--- /dev/null
+++ b/test/vcf-loader/Makefile
@@ -0,0 +1,70 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/vcf-loader
+
+TEST_TOOLS = \
+    test-vcf-loader 
+
+include $(TOP)/build/Makefile.env
+
+
+# make sure runs are not cached in the user repository when running tests
+ifeq ($(wildcard ../../../asm-trace),)
+	ifeq (,$(VDB_CONFIG))
+		VDB_CONFIG = $(shell pwd)/../only-remote-repository.kfg
+	endif
+endif
+
+
+$(TEST_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
+
+#-------------------------------------------------------------------------------
+# white-box test
+#
+INCDIRS += -I$(TOP)/tools/vcf-loader
+
+VCF_TEST_SRC = \
+	test-vcf-loader
+
+VCF_TEST_OBJ = \
+	$(addsuffix .$(OBJX),$(VCF_TEST_SRC))
+
+VCF_TEST_LIB = \
+	-skapp \
+	-sktst \
+	-sncbi-wvdb \
+    -svcfloader 
+
+$(TEST_BINDIR)/test-vcf-loader: $(VCF_TEST_OBJ)
+	$(LP) --exe -o $@ $^ $(VCF_TEST_LIB)
diff --git a/test/vcf-loader/test-vcf-loader.cpp b/test/vcf-loader/test-vcf-loader.cpp
new file mode 100644
index 0000000..145960e
--- /dev/null
+++ b/test/vcf-loader/test-vcf-loader.cpp
@@ -0,0 +1,864 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+/**
+* tests for VCF reader
+*/
+
+#include <ktst/unit_test.hpp>
+
+#include <klib/out.h>
+#include <klib/namelist.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+
+#include <align/writer-reference.h>
+
+#include <sysalloc.h>
+#include <stdexcept>
+#include <sstream>
+#include <memory.h>
+
+extern "C" {
+#include "../../tools/vcf-loader/vcf-grammar.h"
+#include "../../tools/vcf-loader/vcf-parse.h"
+#include "../../tools/vcf-loader/vcf-reader.h"
+#include "../../tools/vcf-loader/vcf-database.h"
+}
+
+using namespace std;
+using namespace ncbi::NK;
+
+TEST_SUITE(VcfLoaderTestSuite);
+
+// test fixture for scanner tests
+class VcfScanFixture
+{
+public:
+    VcfScanFixture() 
+    : consumed(0)
+    {
+        pb.self = this;
+        pb.input = Input;
+    }
+    ~VcfScanFixture() 
+    {
+        VCFScan_yylex_destroy(&pb);
+    }
+    void InitScan(const char* p_input, bool trace=false)
+    {
+        input = p_input;
+        VCFScan_yylex_init(&pb, trace);
+    }
+    int Scan()
+    {
+        int tokenId=VCF_lex(&sym, pb.scanner);
+        
+        if (tokenId != 0)
+            tokenText=string(input.c_str() + sym.tokenStart, sym.tokenLength);
+            
+        return tokenId;
+    }
+    static size_t CC Input(VCFParseBlock* sb, char* buf, size_t max_size)
+    {
+        VcfScanFixture* self = (VcfScanFixture*)sb->self;
+        if (self->input.size() < self->consumed)
+            return 0;
+
+        size_t to_copy = min(self->input.size() - self->consumed, max_size);
+        if (to_copy == 0)
+            return 0;
+
+        memcpy(buf, self->input.c_str(), to_copy);
+        if (to_copy < max_size && buf[to_copy-1] != '\n')
+        {
+            buf[to_copy] = '\n';
+            ++to_copy;
+        }
+        self->consumed += to_copy;
+        return to_copy;
+    }
+
+    string input;
+    size_t consumed;
+    VCFParseBlock pb;
+    VCFToken sym;
+    string tokenText;
+};
+
+#define REQUIRE_TOKEN(tok)              REQUIRE_EQUAL(Scan(), (int)tok);
+#define REQUIRE_TOKEN_TEXT(tok, text)   REQUIRE_TOKEN(tok); REQUIRE_EQ(tokenText, string(text));
+
+#define REQUIRE_TOKEN_COORD(tok, text, line, col)  \
+    REQUIRE_TOKEN_TEXT(tok, text); \
+    REQUIRE_EQ(pb.lastToken->line_no, (size_t)line); \
+    REQUIRE_EQ(pb.lastToken->column_no, (size_t)col);
+
+FIXTURE_TEST_CASE(EmptyInput, VcfScanFixture)
+{   
+    InitScan("");
+    REQUIRE_TOKEN(0); 
+}
+FIXTURE_TEST_CASE(MetaLineSimple, VcfScanFixture)
+{   
+    InitScan("##fileformat=VCFv4.1\n");
+    REQUIRE_TOKEN_TEXT(vcfMETAKEY_FORMAT, "fileformat"); 
+    REQUIRE_TOKEN_TEXT('=', "="); 
+    REQUIRE_TOKEN_TEXT(vcfMETAVALUE, "VCFv4.1"); 
+    REQUIRE_TOKEN(vcfENDLINE);
+    REQUIRE_TOKEN(0); 
+}
+FIXTURE_TEST_CASE(MetaLineComposite, VcfScanFixture)
+{   
+    InitScan("##fileformat=<key1=val1,key2=val2>\n");
+    REQUIRE_TOKEN_TEXT(vcfMETAKEY, "fileformat"); 
+    REQUIRE_TOKEN_TEXT('=', "="); 
+    REQUIRE_TOKEN_TEXT('<', "<"); 
+    REQUIRE_TOKEN_TEXT(vcfMETAKEY, "key1"); 
+    REQUIRE_TOKEN_TEXT('=', "="); 
+    REQUIRE_TOKEN_TEXT(vcfMETAVALUE, "val1"); 
+    REQUIRE_TOKEN_TEXT(',', ","); 
+    REQUIRE_TOKEN_TEXT(vcfMETAKEY, "key2"); 
+    REQUIRE_TOKEN_TEXT('=', "="); 
+    REQUIRE_TOKEN_TEXT(vcfMETAVALUE, "val2"); 
+    REQUIRE_TOKEN_TEXT('>', ">"); 
+    REQUIRE_TOKEN(vcfENDLINE);
+    REQUIRE_TOKEN(0); 
+}
+FIXTURE_TEST_CASE(HeaderLine, VcfScanFixture)
+{   
+    InitScan("#CHROM\tPOS\n");
+    REQUIRE_TOKEN_TEXT(vcfHEADERITEM, "CHROM");
+    REQUIRE_TOKEN_TEXT(vcfHEADERITEM, "POS");
+    REQUIRE_TOKEN(vcfENDLINE);
+    REQUIRE_TOKEN(0); 
+}
+FIXTURE_TEST_CASE(DataItems, VcfScanFixture)
+{   
+    InitScan("20\tNS=3;DP=14;AF=0.5;DB;H2\n");
+    REQUIRE_TOKEN_TEXT(vcfDATAITEM, "20"); 
+    REQUIRE_TOKEN_TEXT(vcfDATAITEM, "NS=3;DP=14;AF=0.5;DB;H2"); 
+    REQUIRE_TOKEN(vcfENDLINE);
+    REQUIRE_TOKEN(0); 
+}
+FIXTURE_TEST_CASE(DataLine_TrailingTab, VcfScanFixture)
+{   
+    InitScan("20\tNS=3;DP=14;AF=0.5;DB;H2\t\n");
+    REQUIRE_TOKEN_TEXT(vcfDATAITEM, "20"); 
+    REQUIRE_TOKEN_TEXT(vcfDATAITEM, "NS=3;DP=14;AF=0.5;DB;H2"); 
+    REQUIRE_TOKEN(vcfENDLINE);
+    REQUIRE_TOKEN(0); 
+}
+FIXTURE_TEST_CASE(DataLine_EOF, VcfScanFixture)
+{   
+    InitScan("20\tNS=3;DP=14;AF=0.5;DB;H2");
+    REQUIRE_TOKEN_TEXT(vcfDATAITEM, "20"); 
+    REQUIRE_TOKEN_TEXT(vcfDATAITEM, "NS=3;DP=14;AF=0.5;DB;H2"); 
+    REQUIRE_TOKEN(vcfENDLINE);
+    REQUIRE_TOKEN(0); 
+}
+
+// parser tests
+
+class VcfParseFixture 
+{
+public:
+    VcfParseFixture()
+    : expectError(false)
+    {
+        pb.self = this;
+        pb.input = Input;
+        pb.error = Error;
+        pb.metaLine = AddMetaLine;
+        pb.openMetaLine = OpenMetaLine;
+        pb.closeMetaLine = CloseMetaLine;
+        pb.keyValue = KeyValue;
+        pb.headerItem = HeaderItem;
+        pb.openDataLine = OpenDataLine;
+        pb.dataItem = DataItem;
+        pb.closeDataLine = CloseDataLine;
+    }
+    ~VcfParseFixture()
+    {
+        VCFScan_yylex_destroy(&pb);
+    }
+    
+protected:
+    static size_t Input(VCFParseBlock* pb, char* buf, size_t max_size)
+    {
+        VcfParseFixture& self = *reinterpret_cast<VcfParseFixture*>(pb->self);
+        self.input.read(buf, max_size);
+        return self.input.gcount();
+    }
+    static void Error(VCFParseBlock* pb, const char* message)
+    {
+        VcfParseFixture& self = *reinterpret_cast<VcfParseFixture*>(pb->self);
+        if (!self.expectError)
+            throw logic_error(string("VcfParseFixture::Error:") + message);
+    }
+    
+    string TokenToString(const VCFToken& t)
+    {
+        return string(input.str().c_str() + t.tokenStart, t.tokenLength);
+    }
+    
+    static void AddMetaLine(VCFParseBlock* pb, VCFToken* key, VCFToken* value)
+    {
+        VcfParseFixture& self = *reinterpret_cast<VcfParseFixture*>(pb->self);
+        MetaLine::value_type p;
+        p.first = self.TokenToString(*key);
+        if (value)
+            p.second = self.TokenToString(*value);
+        MetaLine ml;
+        ml.push_back(p);
+        self.meta.push_back(ml);
+    }
+    static void OpenMetaLine(VCFParseBlock* pb, VCFToken* key)
+    {
+        AddMetaLine(pb, key, NULL);
+    }
+    static void CloseMetaLine(VCFParseBlock* pb)
+    {
+    }
+    static void KeyValue(VCFParseBlock* pb, VCFToken* key, VCFToken* value)
+    {
+        VcfParseFixture& self = *reinterpret_cast<VcfParseFixture*>(pb->self);
+        MetaLine::value_type p;
+        p.first  = self.TokenToString(*key);
+        p.second = self.TokenToString(*value);
+
+        self.meta.back().push_back(p);
+    }
+    static void HeaderItem(VCFParseBlock* pb, VCFToken* value)
+    {
+        VcfParseFixture& self = *reinterpret_cast<VcfParseFixture*>(pb->self);
+        self.header.push_back(self.TokenToString(*value));
+    }
+    static void OpenDataLine(VCFParseBlock* pb)
+    {
+        VcfParseFixture& self = *reinterpret_cast<VcfParseFixture*>(pb->self);
+        self.data.push_back(DataLine());
+    }
+    static void DataItem(VCFParseBlock* pb, VCFToken* value)
+    {
+        VcfParseFixture& self = *reinterpret_cast<VcfParseFixture*>(pb->self);
+        self.data.back().push_back(self.TokenToString(*value));
+    }
+    static void CloseDataLine(VCFParseBlock* pb)
+    {
+    }
+    
+    void InitScan(const char* p_input, bool trace=false)
+    {
+        input.str(p_input);
+        VCFScan_yylex_init(&pb, trace);
+    }
+    
+public:
+    VCFParseBlock pb;
+    
+    istringstream input;
+    
+    typedef vector<pair<string, string> > MetaLine;
+    vector<MetaLine> meta;    
+    
+    vector<string> header;  // all tokens from the header line
+    
+    typedef vector<string> DataLine;
+    vector<DataLine> data; 
+    
+    bool expectError;
+};
+
+// parser tests
+FIXTURE_TEST_CASE(EmptyFile, VcfParseFixture)
+{
+    InitScan("");
+    expectError = true;
+    REQUIRE_EQ( VCF_parse(&pb), 0 ); // EOF
+}
+
+// meta lines 
+FIXTURE_TEST_CASE(FormatLineOnly, VcfParseFixture)
+{
+    InitScan("##fileformat=VCFv4.0\n"
+             "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\n"
+             "1\t2827693\t.\tCCGTC\tC\t.\tPASS\tSVTYPE=DEL\n");
+    REQUIRE_EQ( VCF_parse(&pb), 1 );
+    REQUIRE_EQ( meta.size(), (size_t)1 ); 
+    REQUIRE_EQ( meta[0].size(), (size_t)1 ); 
+    REQUIRE_EQ( meta[0][0].first,   string("fileformat") ); 
+    REQUIRE_EQ( meta[0][0].second,  string("VCFv4.0") ); 
+}
+
+FIXTURE_TEST_CASE(MetaLines, VcfParseFixture)
+{
+    InitScan("##fileformat=VCFv4.0\n"
+             "##fileDate=20090805\n"
+             "##source=myImputationProgramV3.1\n"
+             "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\n"
+             "1\t2827693\t.\tCCGTC\tC\t.\tPASS\tSVTYPE=DEL\n");
+    REQUIRE_EQ( VCF_parse(&pb), 1 ); // EOF
+    REQUIRE_EQ( meta.size(), (size_t)3 ); 
+
+    REQUIRE_EQ( meta[0].size(), (size_t)1 ); 
+    REQUIRE_EQ( meta[0][0].first,   string("fileformat") ); 
+    REQUIRE_EQ( meta[0][0].second,  string("VCFv4.0") ); 
+    
+    REQUIRE_EQ( meta[1].size(), (size_t)1 ); 
+    REQUIRE_EQ( meta[1][0].first,   string("fileDate") ); 
+    REQUIRE_EQ( meta[1][0].second,  string("20090805") ); 
+
+    REQUIRE_EQ( meta[2].size(), (size_t)1 ); 
+    REQUIRE_EQ( meta[2][0].first,   string("source") ); 
+    REQUIRE_EQ( meta[2][0].second,  string("myImputationProgramV3.1") ); 
+}
+
+FIXTURE_TEST_CASE(Header, VcfParseFixture)
+{
+    InitScan("##fileformat=VCFv4.0\n"
+             "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\n"
+             "1\t2827693\t.\tCCGTC\tC\t.\tPASS\tSVTYPE=DEL\n");
+    REQUIRE_EQ( VCF_parse(&pb), 1 ); 
+    REQUIRE_EQ( header.size(), (size_t)8 ); 
+    REQUIRE_EQ( header[0], string("CHROM") );
+    REQUIRE_EQ( header[1], string("POS") );
+    REQUIRE_EQ( header[2], string("ID") );
+    REQUIRE_EQ( header[3], string("REF") );
+    REQUIRE_EQ( header[4], string("ALT") );
+    REQUIRE_EQ( header[5], string("QUAL") );
+    REQUIRE_EQ( header[6], string("FILTER") );
+    REQUIRE_EQ( header[7], string("INFO") );
+}
+
+FIXTURE_TEST_CASE(MetaHeaderData, VcfParseFixture)
+{
+    InitScan(
+        "##fileformat=VCFv4.0\n"
+        "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tNA00001\n"
+        "1\t2827693\t.\tCCGTC\tC\t.\tPASS\tSVTYPE=DEL;END=2827680;BKPTID=Pindel_LCS_D1099159;HOMLEN=1;HOMSEQ=C;SVLEN=-66\tGT:GQ\t1/1:13.9\n");
+    REQUIRE_EQ( VCF_parse(&pb), 1 ); 
+    REQUIRE_EQ( data.size(), (size_t)1 ); 
+    
+    REQUIRE_EQ( data[0].size(), (size_t)10 ); 
+    REQUIRE_EQ( data[0][0], string("1") ); 
+    REQUIRE_EQ( data[0][1], string("2827693") ); 
+    REQUIRE_EQ( data[0][2], string(".") ); 
+    REQUIRE_EQ( data[0][3], string("CCGTC") ); 
+}
+
+FIXTURE_TEST_CASE(InfoLine, VcfParseFixture)
+{
+    InitScan("##fileformat=VCFv4.0\n"
+             "##INFO=<ID=DP,Number=1,Type=Integer,Description=\"Total Depth\">\n"
+             "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tNA00001\n"
+             "1\t2827693\t.\tCCGTC\tC\t.\tPASS\tSVTYPE=DEL\n");
+        
+    REQUIRE_EQ( VCF_parse(&pb), 1 ); 
+    REQUIRE_EQ( meta.size(), (size_t)2 ); 
+    REQUIRE_EQ( meta[1].size(), (size_t)5 ); 
+    MetaLine& ml = meta[1];
+    REQUIRE_EQ( ml[0].first,   string("INFO") ); 
+    REQUIRE_EQ( ml[0].second,  string() ); 
+    REQUIRE_EQ( ml[1].first,   string("ID") ); 
+    REQUIRE_EQ( ml[1].second,  string("DP") ); 
+    REQUIRE_EQ( ml[2].first,   string("Number") ); 
+    REQUIRE_EQ( ml[2].second,  string("1") ); 
+    REQUIRE_EQ( ml[3].first,   string("Type") ); 
+    REQUIRE_EQ( ml[3].second,  string("Integer") ); 
+    REQUIRE_EQ( ml[4].first,   string("Description") ); 
+    REQUIRE_EQ( ml[4].second,  string("\"Total Depth\"") ); 
+}
+
+
+// data lines 
+FIXTURE_TEST_CASE(MultiipleDataLines, VcfParseFixture)
+{
+    InitScan(
+        "##fileformat=VCFv4.0\n"
+        "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tNA00001\n"
+        "1\t2827693\n"
+        "2\t3\n");
+    REQUIRE_EQ( VCF_parse(&pb), 1 ); 
+    REQUIRE_EQ( data.size(), (size_t)2 ); 
+    
+    REQUIRE_EQ( data[0].size(), (size_t)2 ); 
+    REQUIRE_EQ( data[0][0], string("1") ); 
+    REQUIRE_EQ( data[0][1], string("2827693") ); 
+
+    REQUIRE_EQ( data[1].size(), (size_t)2 ); 
+    REQUIRE_EQ( data[1][0], string("2") ); 
+    REQUIRE_EQ( data[1][1], string("3") ); 
+}
+
+// VcfReader
+
+class VcfReaderFixture
+{
+public:
+    VcfReaderFixture()
+    : reader(0), messages(0), messageCount(0)
+    {
+        if (KDirectoryNativeDir(&wd) != 0)
+            throw logic_error(string("VcfReaderFixture: KDirectoryNativeDir failed"));
+            
+        if (VcfReaderMake((const VcfReader**)&reader) != 0)
+            throw logic_error(string("VcfReaderFixture: VcfReaderMake failed"));
+    }
+    ~VcfReaderFixture()
+    {
+        KDirectoryRemove(wd, true, filename.c_str());
+            
+        if (reader != 0 && VcfReaderWhack(reader) != 0)
+            throw logic_error(string("~VcfReaderFixture: VcfReaderWhack failed"));
+            
+        if (KDirectoryRelease(wd) != 0)
+            throw logic_error(string("~VcfReaderFixture: KDirectoryRelease failed"));
+    }
+    
+    rc_t CreateFile(const char* p_filename, const char* contents)
+    {   
+        KDirectoryRemove(wd, true, p_filename);
+        
+        filename = p_filename;
+        
+        KFile* file;
+        rc_t rc = KDirectoryCreateFile(wd, &file, true, 0664, kcmInit, p_filename);
+        if (rc == 0)
+        {
+            size_t num_writ=0;
+            rc = KFileWrite(file, 0, contents, strlen(contents), &num_writ);
+            if (rc == 0)
+                rc = KFileRelease(file);
+            else
+                KFileRelease(file);
+        }
+        return rc;
+    }
+    
+    rc_t ParseFile(const char* p_filename)
+    {
+        messages = 0;
+        messageCount = 0;
+        
+        KFile* file;
+        rc_t rc = KDirectoryOpenFileRead(wd, (const KFile**)&file, p_filename);
+        if (rc == 0)
+        {   
+            rc = VcfReaderParse(reader, file, &messages);
+            if (messages != NULL)
+            {
+                rc_t rc2 = VNameListCount(messages, &messageCount);
+                if (rc == 0)
+                    rc = rc2;
+            }
+            
+            if (rc == 0)
+                rc = KFileRelease(file);
+            else
+                KFileRelease(file);
+        }
+        return rc;
+    }
+    
+    KDirectory* wd;
+    VcfReader *reader;
+    string filename;
+    const struct VNamelist* messages;
+    uint32_t messageCount;
+};
+
+FIXTURE_TEST_CASE(VcfReader_EmptyFile, VcfReaderFixture)
+{
+    REQUIRE_RC(CreateFile(GetName(), "")); 
+    REQUIRE_RC_FAIL(ParseFile(GetName())); 
+    REQUIRE_NOT_NULL(messages);
+    REQUIRE_EQ(1u, messageCount);
+    const char* msg;
+    REQUIRE_RC(VNameListGet ( messages, 0, &msg ));
+    REQUIRE_EQ(string("Empty file"), string(msg)); 
+}
+
+static string StringToSTL(const String& str)
+{
+    return string(str.addr, str.len);
+}
+
+FIXTURE_TEST_CASE(VcfReader_Parse, VcfReaderFixture)
+{   
+    REQUIRE_RC(CreateFile(GetName(), 
+        // this is taken from the spec:
+        //  http://www.1000genomes.org/wiki/analysis/variant-call-format/vcf-variant-call-format-version-42 
+        "##fileformat=VCFv4.2\n"
+        "##fileDate=20090805\n"
+        "##source=myImputationProgramV3.1\n"
+        "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\n"
+        "20\t14370\trs6054257\tG\tA\t29\tPASS\tNS=3;DP=14;AF=0.5;DB;H2\n"
+        "20\t17330\t.\tT\tA\t3\tq10\tNS=3;DP=11;AF=0.017\n"
+        ));
+    REQUIRE_RC(ParseFile(GetName())); 
+        
+    uint32_t count;
+    REQUIRE_RC(VcfReaderGetDataLineCount(reader, &count));
+    REQUIRE_EQ(2u, count);
+    
+    const VcfDataLine* line;
+    REQUIRE_RC(VcfReaderGetDataLine(reader, 0, &line));
+    REQUIRE_NOT_NULL(line);
+    REQUIRE_EQ(string("20"),        StringToSTL(line->chromosome));
+    REQUIRE_EQ(14370u,              line->position);   
+    REQUIRE_EQ(string("rs6054257"), StringToSTL(line->id));
+    REQUIRE_EQ(string("G"),         StringToSTL(line->refBases));
+    REQUIRE_EQ(string("A"),         StringToSTL(line->altBases));
+    REQUIRE_EQ(29u,                 (unsigned int)line->quality);   
+    REQUIRE_EQ(string("PASS"),      StringToSTL(line->filter));
+    REQUIRE_EQ(string("NS=3;DP=14;AF=0.5;DB;H2"), StringToSTL(line->info));
+    
+    REQUIRE_RC(VcfReaderGetDataLine(reader, 1, &line));
+    REQUIRE_NOT_NULL(line);
+    REQUIRE_EQ(string("20"),    StringToSTL(line->chromosome));
+    REQUIRE_EQ(17330u,          line->position);   
+    REQUIRE_EQ(string("."),     StringToSTL(line->id));
+    REQUIRE_EQ(string("T"),     StringToSTL(line->refBases));
+    REQUIRE_EQ(string("A"),     StringToSTL(line->altBases));
+    REQUIRE_EQ(3u,              (unsigned int)line->quality);   
+    REQUIRE_EQ(string("q10"),   StringToSTL(line->filter));
+    REQUIRE_EQ(string("NS=3;DP=11;AF=0.017"), StringToSTL(line->info));
+
+    REQUIRE_RC(VcfReaderGetDataLine(reader, 2, &line));
+    REQUIRE_NULL(line);
+}
+
+FIXTURE_TEST_CASE(VcfReader_Parse_GenotypeFields, VcfReaderFixture)
+{   
+    REQUIRE_RC(CreateFile(GetName(), 
+        "##fileformat=VCFv4.2\n"
+        "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\n"
+        "20\t14370\trs6054257\tG\tA\t29\tPASS\tNS=3;DP=14;AF=0.5;DB;H2\tblah1\t2blah\tetc...\n"
+        ));
+    REQUIRE_RC(ParseFile(GetName())); 
+        
+    const VcfDataLine* line;
+    REQUIRE_RC(VcfReaderGetDataLine(reader, 0, &line));
+    REQUIRE_NOT_NULL(line);
+    
+    uint32_t fieldCount;
+    REQUIRE_RC( VNameListCount(line->genotypeFields, &fieldCount) );    
+    REQUIRE_EQ(3u, fieldCount);
+    
+    const char* name;
+    
+    REQUIRE_RC(VNameListGet ( line->genotypeFields, 0, &name ));
+    REQUIRE_NOT_NULL(name);
+    REQUIRE_EQ(string("blah1"), string(name));
+    
+    REQUIRE_RC(VNameListGet ( line->genotypeFields, 1, &name ));
+    REQUIRE_NOT_NULL(name);
+    REQUIRE_EQ(string("2blah"), string(name));
+
+    REQUIRE_RC(VNameListGet ( line->genotypeFields, 2, &name ));
+    REQUIRE_NOT_NULL(name);
+    REQUIRE_EQ(string("etc..."), string(name));
+}
+
+FIXTURE_TEST_CASE(VcfReader_Parse_Errors, VcfReaderFixture)
+{   
+    REQUIRE_RC(CreateFile(GetName(), 
+        "##fileformat=VCFv4.2\n"
+        "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\n"
+        "20\t14370\trs6054257\tG\tA\t1000\tPASS\tNS=3;DP=14;AF=0.5;DB;H2\tblah1\t2blah\tetc...\n"
+        "20\t14370\trs6054257\tG\tA\t10\tPASS\n"
+        )); // 1. 1000 is too much for a quality
+            // 2. not all mandatory fields present
+    REQUIRE_RC_FAIL(ParseFile(GetName())); 
+    REQUIRE_EQ(2u, messageCount);
+    const char* msg;
+    REQUIRE_RC(VNameListGet ( messages, 0, &msg ));
+    REQUIRE_EQ(string("line 3 column 24: invalid numeric value for 'quality'"), string(msg));
+    REQUIRE_RC(VNameListGet ( messages, 1, &msg ));
+    REQUIRE_EQ(string("line 4 column 31: one or more of the 8 mandatory columns are missing"), string(msg));
+}
+
+// VcfDatabase
+class VcfDatabaseFixture : public VcfReaderFixture
+{
+public:
+    VcfDatabaseFixture()
+    {
+        if (VDBManagerMakeUpdate(&m_vdbMgr, wd) != 0)
+            throw logic_error(string("VcfDatabaseFixture(): VDBManagerMakeUpdate failed"));
+    }
+    ~VcfDatabaseFixture()
+    {
+        if (VDBManagerRelease(m_vdbMgr) != 0)
+            throw logic_error(string("~VcfDatabaseFixture: VDBManagerRelease failed"));
+    }
+    
+    void Setup(const string& p_caseName)
+    {
+        m_dbName = p_caseName+".db";
+        m_cfgName = p_caseName+".cfg";
+        
+        KDirectoryRemove(wd, true, m_dbName.c_str());
+        
+        if (VDBManagerMakeSchema(m_vdbMgr, &m_schema) != 0)
+            throw logic_error(string("VcfDatabaseFixture::Setup: VDBManagerMakeSchema failed"));
+        
+        if (VSchemaParseText ( m_schema, "vcf_schema", schema_text, string_measure(schema_text, NULL) ) != 0)
+            throw logic_error(string("VcfDatabaseFixture::Setup: VSchemaParseText failed"));
+
+        if (VDBManagerCreateDB(m_vdbMgr, &m_db, m_schema, "vcf", kcmCreate | kcmMD5, m_dbName.c_str()) != 0)
+            throw logic_error(string("VcfDatabaseFixture::Setup: VDBManagerCreateDB failed"));
+        
+        if (CreateFile(m_cfgName.c_str(), "20	CM000682.1"))
+            throw logic_error(string("VcfDatabaseFixture::Setup: CreateFile failed"));
+    }
+    void Teardown()
+    {
+        if (VDatabaseRelease(m_db) != 0)
+            throw logic_error(string("VcfDatabaseFixture::Teardown: VDatabaseRelease failed"));
+        if (VSchemaRelease(m_schema) != 0)
+            throw logic_error(string("VcfDatabaseFixture::Teardown: VSchemaRelease failed"));
+        // this remove fails on Windows for unexplained reasons ("access denied" to <dbname>/tbl/REFERENCE/col), so ignore the result:
+        KDirectoryRemove(wd, true, m_dbName.c_str());
+        if (KDirectoryRemove(wd, true, m_cfgName.c_str()) != 0)
+            throw logic_error(string("VcfDatabaseFixture::Teardown: KDirectoryRemove(m_cfgName) failed"));
+    }
+    
+protected:
+    static const char schema_text[];
+    static const uint32_t basesPerRow = 5000;
+    
+    VDBManager* m_vdbMgr;
+    VSchema* m_schema;
+    VDatabase* m_db;
+    string m_cfgName;
+    string m_dbName;
+};
+
+const char VcfDatabaseFixture::schema_text[] =
+"version 1; "
+
+"include 'align/align.vschema';"
+
+" table variant #1 { "
+"     extern    column U32 ref_id = .ref_id;"
+"     physical  column U32 .ref_id = ref_id;"
+
+"     extern    column U32 position = .position;"
+"     physical  column U32 .position = position;"
+
+"     extern    column U32 length = .length;"
+"     physical  column U32 .length = length;"
+
+"     extern    column ascii sequence = .sequence;"
+"     physical  column ascii .sequence = sequence;"
+
+" };"
+
+" table variant_phase #1 { "
+"     extern    column U32 variant_id = .variant_id;"
+"     physical  column U32 .variant_id = variant_id;"
+
+"     extern    column U32 phase = .phase;"
+"     physical  column U32 .phase = phase;"
+" };"
+
+" table alignment #1 { "
+"     extern    column U32 align_id = .align_id;"
+"     physical  column U32 .align_id = align_id;"
+
+"     extern    column U32 ref_id = .ref_id;"
+"     physical  column U32 .ref_id = ref_id;"
+
+"     extern    column U32 position = .position;"
+"     physical  column U32 .position = position;"
+
+"     extern    column U32 phase = .phase;"
+"     physical  column U32 .phase = phase;"
+
+"     extern    column ascii cigar = .cigar;"
+"     physical  column ascii .cigar = cigar;"
+
+"     extern    column ascii mismatch = .mismatch;"
+"     physical  column ascii .mismatch = mismatch;"
+
+" };"
+
+"database vcf #1 { "
+"    table NCBI:align:tbl:reference #2  REFERENCE;"
+"    table variant #1                   VARIANT;"
+"    table variant_phase #1             VARIANT_PHASE;"
+"    table alignment #1                 ALIGNMENT;"
+"};";
+
+FIXTURE_TEST_CASE(VcfDatabase_GetReference, VcfDatabaseFixture)
+{
+    // this would be better done as a unit test on the ReferenceSeq interface
+    // (there is no appropriate suite for that at this point)
+    Setup(GetName());
+    const ReferenceMgr* refMgr;
+    REQUIRE_RC(ReferenceMgr_Make(&refMgr, m_db, m_vdbMgr, 0, m_cfgName.c_str(), NULL, 0, 0, 0));
+    const ReferenceSeq* seq;
+    bool dummy1 = false;
+    bool dummy2 = false;
+    REQUIRE_RC(ReferenceMgr_GetSeq(refMgr, &seq, "20", &dummy1, false, &dummy2));
+    
+    INSDC_coord_zero coord = 14370;
+    int64_t ref_id;
+    INSDC_coord_zero ref_start;
+    uint64_t global_ref_start;
+    REQUIRE_RC(ReferenceSeq_TranslateOffset_int(seq, coord, &ref_id, &ref_start, &global_ref_start));
+    REQUIRE_EQ(ref_id, (int64_t)(1 + coord / basesPerRow));
+    REQUIRE_EQ(ref_start, (INSDC_coord_zero)(coord % basesPerRow));
+    REQUIRE_EQ(global_ref_start, (uint64_t)coord);
+
+    REQUIRE_RC(ReferenceSeq_Release(seq));
+    REQUIRE_RC(ReferenceMgr_Release(refMgr, true, NULL, false, NULL));
+    Teardown();
+}
+
+FIXTURE_TEST_CASE(VcfDatabaseBasic, VcfDatabaseFixture)
+{
+    Setup(GetName());
+
+    REQUIRE_RC(CreateFile(GetName(), 
+        // this is taken from the spec:
+        //  http://www.1000genomes.org/wiki/analysis/variant-call-format/vcf-variant-call-format-version-42 
+        "##fileformat=VCFv4.2\n"
+        "##fileDate=20090805\n"
+        "##source=myImputationProgramV3.1\n"
+        "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\n"
+        "20\t14370\trs6054257\tG\tCCCC\t29\tPASS\tNS=3;DP=14;AF=0.5;DB;H2\n"
+        "20\t17330\t.\tT\tA\t3\tq10\tNS=3;DP=11;AF=0.017\n"
+        ));
+    REQUIRE_RC(ParseFile(GetName())); 
+
+    REQUIRE_RC(VcfDatabaseSave(reader, m_cfgName.c_str(), m_db));
+
+    // verify
+    const VTable *tbl;
+    REQUIRE_RC(VDBManagerOpenTableRead(m_vdbMgr, &tbl, m_schema, (m_dbName+"/tbl/VARIANT").c_str()));
+    VCursor *cur;
+    REQUIRE_RC(VTableCreateCursorRead( tbl, (const VCursor**)&cur ));
+    
+    uint32_t ref_id_idx, position_idx, length_idx, sequence_idx;
+    REQUIRE_RC(VCursorAddColumn( cur, &ref_id_idx, "ref_id" ));
+    REQUIRE_RC(VCursorAddColumn( cur, &position_idx, "position" ));
+    REQUIRE_RC(VCursorAddColumn( cur, &length_idx, "length" ));
+    REQUIRE_RC(VCursorAddColumn( cur, &sequence_idx, "sequence" ));    
+    
+    REQUIRE_RC(VCursorOpen( cur ));
+    
+    char buf[256];
+    uint32_t row_len;
+    const uint32_t elemBits = 8;
+
+    int64_t rowId = 1;
+    REQUIRE_RC(VCursorReadDirect(cur, rowId, 1, elemBits, buf, sizeof(buf), &row_len ));    
+    REQUIRE_EQ(8u, row_len);
+    REQUIRE_EQ(3u, *(uint32_t*)buf);
+    
+    REQUIRE_RC(VCursorReadDirect(cur, rowId, 2, elemBits, buf, sizeof(buf), &row_len ));    
+    REQUIRE_EQ(sizeof(INSDC_coord_zero), (size_t)row_len);
+    REQUIRE_EQ((INSDC_coord_zero)(14370u % basesPerRow), *(INSDC_coord_zero*)buf);
+    
+    REQUIRE_RC(VCursorReadDirect(cur, rowId, 3, elemBits, buf, sizeof(buf), &row_len ));    
+    REQUIRE_EQ(sizeof(uint32_t), (size_t)row_len);
+    REQUIRE_EQ(4u, *(uint32_t*)buf);
+
+    REQUIRE_RC(VCursorReadDirect(cur, rowId, 4, elemBits, buf, sizeof(buf), &row_len ));    
+    REQUIRE_EQ(4u, row_len);
+    REQUIRE_EQ(string(buf, 4), string("CCCC"));
+
+    rowId = 2;
+    REQUIRE_RC(VCursorReadDirect(cur, rowId, 1, elemBits, buf, sizeof(buf), &row_len ));    
+    REQUIRE_EQ(8u, row_len);
+    REQUIRE_EQ(4u, *(uint32_t*)buf);
+    
+    REQUIRE_RC(VCursorReadDirect(cur, rowId, 2, elemBits, buf, sizeof(buf), &row_len ));    
+    REQUIRE_EQ(sizeof(INSDC_coord_zero), (size_t)row_len);
+    REQUIRE_EQ((INSDC_coord_zero)(17330u % basesPerRow), *(INSDC_coord_zero*)buf);
+    
+    REQUIRE_RC(VCursorReadDirect(cur, rowId, 3, elemBits, buf, sizeof(buf), &row_len ));    
+    REQUIRE_EQ(sizeof(uint32_t), (size_t)row_len);
+    REQUIRE_EQ(1u, *(uint32_t*)buf);
+
+    REQUIRE_RC(VCursorReadDirect(cur, rowId, 4, elemBits, buf, sizeof(buf), &row_len ));    
+    REQUIRE_EQ(1u, row_len);
+    REQUIRE_EQ(string(buf, 1), string("A"));
+
+    rowId = 3;
+    REQUIRE_RC_FAIL(VCursorReadDirect(cur, rowId, 1, elemBits, buf, sizeof(buf), &row_len ));    
+    
+    REQUIRE_RC(VCursorRelease(cur));
+    REQUIRE_RC(VTableRelease(tbl));
+    Teardown();
+}
+
+//////////////////////////////////////////// Main
+#include <kapp/args.h>
+#include <kfg/config.h>
+
+extern "C"
+{
+
+ver_t CC KAppVersion ( void )
+{
+    return 0x1000000;
+}
+
+const char UsageDefaultName[] = "vcf-loader-test";
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg ( "Usage:\n" "\t%s [options] -o path\n\n", progname );
+}
+
+rc_t CC Usage( const Args* args )
+{
+    return 0;
+}
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    // need user settings to pick up the correct schema include directory,
+    // so do not disable them
+    //KConfigDisableUserSettings();
+    
+    rc_t rc = VcfLoaderTestSuite(argc, argv);
+    return rc;
+}
+
+}
+
diff --git a/test/vdb-copy/Makefile b/test/vdb-copy/Makefile
new file mode 100644
index 0000000..6e52fe4
--- /dev/null
+++ b/test/vdb-copy/Makefile
@@ -0,0 +1,49 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/vdb-copy
+
+TEST_TOOLS = 
+
+include $(TOP)/build/Makefile.env
+
+$(TEST_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+runtests: check_exit_code
+
+#-------------------------------------------------------------------------------
+# scripted tests
+#
+
+check_exit_code:
+	@ python $(TOP)/build/check-exit-code.py $(BINDIR)/vdb-copy
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
diff --git a/test/vdb-dump/Makefile b/test/vdb-dump/Makefile
new file mode 100644
index 0000000..3b8aef7
--- /dev/null
+++ b/test/vdb-dump/Makefile
@@ -0,0 +1,78 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/vdb-dump
+
+TEST_TOOLS =
+
+include $(TOP)/build/Makefile.env
+
+.PHONY: $(TEST_TOOLS)
+
+runtests: vdb-dump
+
+#-------------------------------------------------------------------------------
+# vdb-dump-makedb
+# Create test databases
+MAKEDB_SRC = \
+	makedb
+
+MAKEDB_OBJ = \
+	$(addsuffix .$(OBJX),$(MAKEDB_SRC))
+
+MAKEDB_LIB = \
+    -skapp \
+	-sktst \
+    -sncbi-wvdb
+
+$(TEST_BINDIR)/vdb-dump-makedb: $(MAKEDB_OBJ)
+	$(LP) --exe -o $@ $^ $(MAKEDB_LIB)
+
+makedb: $(TEST_BINDIR)/vdb-dump-makedb
+	@ cd $(SRCDIR); rm -rf data; mkdir -p data; $(TEST_BINDIR)/vdb-dump-makedb
+
+#-------------------------------------------------------------------------------
+# run tests for vdb-dump
+vdb-dump: makedb
+	@ rm -rf actual
+	@ mkdir -p actual
+	@ echo "testing vdb-dump..."
+	@ # output format
+	@ $(BINDIR)/vdb-dump SRR056386 -R 1 -C READ -f tab >actual/1.0.stdout && diff expected/1.0.stdout actual/1.0.stdout
+	@ $(BINDIR)/vdb-dump SRR056386 -R 1 -C READ -f tab -I >actual/1.1.stdout && diff expected/1.1.stdout actual/1.1.stdout
+	@ # nested databases
+	@ $(BINDIR)/vdb-dump -E data/NestedDatabase >actual/2.0.stdout && diff expected/2.0.stdout actual/2.0.stdout
+	@ $(BINDIR)/vdb-dump -T SUBDB_1.SUBSUBDB_1.TABLE1 data/NestedDatabase >actual/2.1.stdout && diff expected/2.1.stdout actual/2.1.stdout
+	@ $(BINDIR)/vdb-dump -T SUBDB_1.SUBSUBDB_2.TABLE2 data/NestedDatabase >actual/2.2.stdout && diff expected/2.2.stdout actual/2.2.stdout
+	@ rm -rf actual
+	@ rm -rf data
+	@ python $(TOP)/build/check-exit-code.py $(BINDIR)/vdb-dump
+	@ echo "...all tests passed"
+
+.PHONY: kar
+
diff --git a/test/vdb-dump/expected/1.0.stdout b/test/vdb-dump/expected/1.0.stdout
new file mode 100644
index 0000000..8645a27
--- /dev/null
+++ b/test/vdb-dump/expected/1.0.stdout
@@ -0,0 +1 @@
+TCAGAATTACTTGAGGCTGCACACCATTCAAGTTGTCATGAGACACGTCATCAAGAGGCACTTCCACGTCGACATCTGCGGCAGTCTAACCGTCTGTATTAATGTTGTAATTACTTTCCATTTACTGATTTGATGTTAAAACAAATTTAATTAATTTATAACAATTTAACTTAAATCCTTCTTAATCTCTTTAAATGAACTGAGGGGGTTTTGGGGGTTTTTGGGGTTTTTGGGGGTTTTTGGGGGTCGTGCCACGCTTACCGTACATCCGCCTTGGCCTGAGACTGCCAAAGGGCACCACAGGGGGGGGATTAAGGGGN
diff --git a/test/vdb-dump/expected/1.1.stdout b/test/vdb-dump/expected/1.1.stdout
new file mode 100644
index 0000000..77cc039
--- /dev/null
+++ b/test/vdb-dump/expected/1.1.stdout
@@ -0,0 +1 @@
+1	TCAGAATTACTTGAGGCTGCACACCATTCAAGTTGTCATGAGACACGTCATCAAGAGGCACTTCCACGTCGACATCTGCGGCAGTCTAACCGTCTGTATTAATGTTGTAATTACTTTCCATTTACTGATTTGATGTTAAAACAAATTTAATTAATTTATAACAATTTAACTTAAATCCTTCTTAATCTCTTTAAATGAACTGAGGGGGTTTTGGGGGTTTTTGGGGTTTTTGGGGGTTTTTGGGGGTCGTGCCACGCTTACCGTACATCCGCCTTGGCCTGAGACTGCCAAAGGGCACCACAGGGGGGGGATTAAGGGGN
diff --git a/test/vdb-dump/expected/2.0.stdout b/test/vdb-dump/expected/2.0.stdout
new file mode 100644
index 0000000..96d6437
--- /dev/null
+++ b/test/vdb-dump/expected/2.0.stdout
@@ -0,0 +1,15 @@
+enumerating the tables of database 'data/NestedDatabase'
+db  : SUBDB_1
+   db  : SUBSUBDB_1
+      tbl : TABLE1
+   db  : SUBSUBDB_2
+      tbl : TABLE2
+   tbl : TABLE1
+db  : SUBDB_2
+   db  : SUBSUBDB_1
+      tbl : TABLE1
+   db  : SUBSUBDB_2
+      tbl : TABLE2
+   tbl : TABLE2
+tbl : TABLE1
+tbl : TABLE2
diff --git a/test/vdb-dump/expected/2.1.stdout b/test/vdb-dump/expected/2.1.stdout
new file mode 100644
index 0000000..aacb50a
--- /dev/null
+++ b/test/vdb-dump/expected/2.1.stdout
@@ -0,0 +1,4 @@
+col: 1-1/1
+
+col: 1-1/2
+
diff --git a/test/vdb-dump/expected/2.2.stdout b/test/vdb-dump/expected/2.2.stdout
new file mode 100644
index 0000000..0114a14
--- /dev/null
+++ b/test/vdb-dump/expected/2.2.stdout
@@ -0,0 +1,4 @@
+col: 2-2/1
+
+col: 2-2/2
+
diff --git a/test/vdb-dump/makedb.cpp b/test/vdb-dump/makedb.cpp
new file mode 100644
index 0000000..d32998b
--- /dev/null
+++ b/test/vdb-dump/makedb.cpp
@@ -0,0 +1,229 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+/**
+* Create test databases for vdb-dump
+*/
+
+#include <fstream>
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+
+using namespace std;
+
+#define CHECK_RC(call) { rc_t rc = call; if ( rc != 0 ) return rc; }
+
+rc_t
+AddRow ( VCursor* p_curs, int64_t p_rowId, uint32_t p_colIdx, const string& p_value )
+{
+    CHECK_RC ( VCursorSetRowId ( p_curs, p_rowId ) );
+    CHECK_RC ( VCursorOpenRow ( p_curs ) );
+    CHECK_RC ( VCursorWrite ( p_curs, p_colIdx, 8, p_value.c_str(), 0, p_value.size() ) );
+    CHECK_RC ( VCursorCommitRow ( p_curs ) );
+    CHECK_RC ( VCursorCloseRow ( p_curs ) );
+    CHECK_RC ( VCursorCommit ( p_curs ) );
+    return 0;
+}
+
+rc_t
+NestedDatabase()
+{
+    const string ScratchDir         = "./data/";
+    const string DefaultSchemaText  =
+        "table table1 #1.0.0 { column ascii col; };\n"
+        "table table2 #1.0.0 { column ascii col; };\n"
+
+        "database database1_1 #1 { table table1 #1 TABLE1; };\n"
+        "database database1_2 #1 { table table2 #1 TABLE2; };\n"
+
+        "database database1 #1\n"
+        "{\n"
+        " database database1_1 #1 SUBSUBDB_1;\n"
+        " database database1_2 #1 SUBSUBDB_2;\n"
+        " table table1 #1 TABLE1;\n"
+        "};\n"
+
+        "database database2 #1\n"
+        "{\n"
+        " database database1_1 #1 SUBSUBDB_1;\n"
+        " database database1_2 #1 SUBSUBDB_2;\n"
+        " table table2 #1 TABLE2;\n"
+        "};\n"
+
+        "database root_database #1\n"
+        "{\n"
+        " database database1 #1 SUBDB_1;\n"
+        " database database2 #1 SUBDB_2;\n"
+        " table table1 #1 TABLE1;\n"
+        " table table2 #1 TABLE2;\n"
+        " };\n"
+    ;
+    const string DefaultDatabase    = "root_database";
+
+    VDBManager* mgr;
+    CHECK_RC ( VDBManagerMakeUpdate ( & mgr, NULL ) );
+    VSchema* schema;
+    CHECK_RC ( VDBManagerMakeSchema ( mgr, & schema ) );
+    CHECK_RC ( VSchemaParseText ( schema, NULL, DefaultSchemaText.c_str(), DefaultSchemaText.size() ) );
+
+    VDatabase* db;
+    CHECK_RC ( VDBManagerCreateDB ( mgr,
+                                    & db,
+                                    schema,
+                                    DefaultDatabase . c_str(),
+                                    kcmInit + kcmMD5,
+                                    "%s",
+                                    ( ScratchDir + "NestedDatabase" ) . c_str() ) );
+
+    {   // SUBDB_1
+        VDatabase *db1;
+        CHECK_RC ( VDatabaseCreateDB ( db, & db1, "SUBDB_1", kcmInit + kcmMD5, "SUBDB_1" ) );
+        {   // SUBSUBDB_1
+            VDatabase *db1_1;
+            CHECK_RC ( VDatabaseCreateDB ( db1, & db1_1, "SUBSUBDB_1", kcmInit + kcmMD5, "SUBSUBDB_1" ) );
+            {   // TABLE1
+                VTable *tab;
+                CHECK_RC ( VDatabaseCreateTable ( db1_1, & tab, "TABLE1", kcmInit + kcmMD5, "TABLE1" ) );
+                VCursor *curs;
+                CHECK_RC ( VTableCreateCursorWrite ( tab, & curs, kcmInsert ) ) ;
+                uint32_t idx;
+                CHECK_RC ( VCursorAddColumn ( curs, & idx, "col" ) );
+                CHECK_RC ( VCursorOpen ( curs ) );
+                CHECK_RC ( AddRow ( curs, 1, idx, "1-1/1" ) );
+                CHECK_RC ( AddRow ( curs, 2, idx, "1-1/2" ) );
+                CHECK_RC ( VCursorRelease ( curs ) );
+                CHECK_RC ( VTableRelease ( tab ) );
+            }
+            CHECK_RC ( VDatabaseRelease ( db1_1 ) );
+        }
+        {   // SUBSUBDB_2
+            VDatabase *db1_2;
+            CHECK_RC ( VDatabaseCreateDB ( db1, & db1_2, "SUBSUBDB_2", kcmInit + kcmMD5, "SUBSUBDB_2" ) );
+            {   // TABLE2
+                VTable *tab;
+                CHECK_RC ( VDatabaseCreateTable ( db1_2, & tab, "TABLE2", kcmInit + kcmMD5, "TABLE2" ) );
+                VCursor *curs;
+                CHECK_RC ( VTableCreateCursorWrite ( tab, & curs, kcmInsert ) ) ;
+                uint32_t idx;
+                CHECK_RC ( VCursorAddColumn ( curs, & idx, "col" ) );
+                CHECK_RC ( VCursorOpen ( curs ) );
+                CHECK_RC ( AddRow ( curs, 1, idx, "2-2/1" ) );
+                CHECK_RC ( AddRow ( curs, 2, idx, "2-2/2" ) );
+                CHECK_RC ( VCursorRelease ( curs ) );
+                CHECK_RC ( VTableRelease ( tab ) );
+            }
+            CHECK_RC ( VDatabaseRelease ( db1_2 ) );
+        }
+        {   // TABLE1
+            VTable *tab;
+            CHECK_RC ( VDatabaseCreateTable ( db1, & tab, "TABLE1", kcmInit + kcmMD5, "TABLE1" ) );
+            CHECK_RC ( VTableRelease ( tab ) );
+        }
+        CHECK_RC ( VDatabaseRelease ( db1 ) );
+    }
+    {   // SUBDB_2
+        VDatabase *db2;
+        CHECK_RC ( VDatabaseCreateDB ( db, & db2, "SUBDB_2", kcmInit + kcmMD5, "SUBDB_2" ) );
+        {   // SUBSUBDB_1
+            VDatabase *db2_1;
+            CHECK_RC ( VDatabaseCreateDB ( db2, & db2_1, "SUBSUBDB_1", kcmInit + kcmMD5, "SUBSUBDB_1" ) );
+            {   // TABLE1
+                VTable *tab;
+                CHECK_RC ( VDatabaseCreateTable ( db2_1, & tab, "TABLE1", kcmInit + kcmMD5, "TABLE1" ) );
+                CHECK_RC ( VTableRelease ( tab ) );
+            }
+            CHECK_RC ( VDatabaseRelease ( db2_1 ) );
+        }
+        {   // SUBSUBDB_2
+            VDatabase *db2_2;
+            CHECK_RC ( VDatabaseCreateDB ( db2, & db2_2, "SUBSUBDB_2", kcmInit + kcmMD5, "SUBSUBDB_2" ) );
+            {   // TABLE2
+                VTable *tab;
+                CHECK_RC ( VDatabaseCreateTable ( db2_2, & tab, "TABLE2", kcmInit + kcmMD5, "TABLE2" ) );
+                CHECK_RC ( VTableRelease ( tab ) );
+            }
+            CHECK_RC ( VDatabaseRelease ( db2_2 ) );
+        }
+        {   // TABLE2
+            VTable *tab;
+            CHECK_RC ( VDatabaseCreateTable ( db2, & tab, "TABLE2", kcmInit + kcmMD5, "TABLE2" ) );
+            CHECK_RC ( VTableRelease ( tab ) );
+        }
+        CHECK_RC ( VDatabaseRelease ( db2 ) );
+    }
+
+    {   // TABLE1
+        VTable *tab;
+        CHECK_RC ( VDatabaseCreateTable ( db, & tab, "TABLE1", kcmInit + kcmMD5, "TABLE1" ) );
+        CHECK_RC ( VTableRelease ( tab ) );
+    }
+    {   // TABLE2
+        VTable *tab;
+        CHECK_RC ( VDatabaseCreateTable ( db, & tab, "TABLE2", kcmInit + kcmMD5, "TABLE2" ) );
+        CHECK_RC ( VTableRelease ( tab ) );
+    }
+
+    CHECK_RC ( VSchemaRelease ( schema ) );
+    CHECK_RC ( VDatabaseRelease ( db ) );
+    CHECK_RC ( VDBManagerRelease ( mgr ) );
+    return 0;
+}
+
+//////////////////////////////////////////// Main
+extern "C"
+{
+
+#include <kapp/args.h>
+#include <kfg/config.h>
+
+ver_t CC KAppVersion ( void )
+{
+    return 0x1000000;
+}
+rc_t CC UsageSummary (const char * progname)
+{
+    return 0;
+}
+
+rc_t CC Usage ( const Args * args )
+{
+    return 0;
+}
+
+const char UsageDefaultName[] = "makedb";
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    KConfigDisableUserSettings();
+
+    return NestedDatabase();
+}
+
+}
diff --git a/test/vdb-validate/Makefile b/test/vdb-validate/Makefile
new file mode 100644
index 0000000..934a9f2
--- /dev/null
+++ b/test/vdb-validate/Makefile
@@ -0,0 +1,66 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/vdb-validate
+
+TEST_TOOLS = \
+
+ALL_TOOLS = \
+	$(TEST_TOOLS) \
+
+include $(TOP)/build/Makefile.env
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+.PHONY: $(TEST_TOOLS)
+
+clean: stdclean
+
+#-------------------------------------------------------------------------------
+# ref-variation tool tests
+#
+runtests: vdb-validate
+
+vdb-validate: $(BINDIR)/vdb-validate
+	@ echo "Starting vdb-validate tests..."
+	@ rm -rf actual/
+	@ mkdir actual/
+	@ ./runtestcase.sh "$(BINDIR)/vdb-validate db/sdc_len_mismatch.csra" no_sdc_checks 0
+	@ ./runtestcase.sh "$(BINDIR)/vdb-validate db/sdc_tmp_mismatch.csra --sdc:rows 100%" sdc_tmp_mismatch 3
+	@ ./runtestcase.sh "$(BINDIR)/vdb-validate db/sdc_pa_longer.csra --sdc:rows 100%" sdc_pa_longer_1 3
+	@ ./runtestcase.sh "$(BINDIR)/vdb-validate db/sdc_pa_longer.csra --sdc:rows 100% --sdc:plen_thold 50%" sdc_pa_longer_2 3
+	@ ./runtestcase.sh "$(BINDIR)/vdb-validate db/sdc_pa_longer.csra --sdc:rows 100% --sdc:plen_thold 51%" sdc_pa_longer_3 0
+	@ ./runtestcase.sh "$(BINDIR)/vdb-validate db/sdc_len_mismatch.csra --sdc:rows 100% --sdc:plen_thold 1%" sdc_len_mismatch_1 3
+	@ ./runtestcase.sh "$(BINDIR)/vdb-validate db/sdc_len_mismatch.csra --sdc:rows 100% --sdc:plen_thold 100%" sdc_len_mismatch_2 3
+	@ ./runtestcase.sh "$(BINDIR)/vdb-validate db/sdc_seq_cmp_read_len_corrupt.csra --sdc:seq-rows 100%" sdc_seq_cmp_read_len_corrupt 3
+	@ ./runtestcase.sh "$(BINDIR)/vdb-validate db/sdc_seq_cmp_read_len_fixed.csra --sdc:seq-rows 100%" sdc_seq_cmp_read_len_fixed 0
+	@ ./runtestcase.sh "$(BINDIR)/vdb-validate db/blob-row-gap.kar" ROW_GAP 0
+	@ echo "All vdb-validate tests succeed"
+	@ rm -rf actual/
+
diff --git a/test/vdb-validate/db/blob-row-gap.kar b/test/vdb-validate/db/blob-row-gap.kar
new file mode 100644
index 0000000..9b6bdd8
Binary files /dev/null and b/test/vdb-validate/db/blob-row-gap.kar differ
diff --git a/test/vdb-validate/db/sdc_len_mismatch.csra b/test/vdb-validate/db/sdc_len_mismatch.csra
new file mode 100644
index 0000000..52afee0
Binary files /dev/null and b/test/vdb-validate/db/sdc_len_mismatch.csra differ
diff --git a/test/vdb-validate/db/sdc_pa_longer.csra b/test/vdb-validate/db/sdc_pa_longer.csra
new file mode 100644
index 0000000..3e767a5
Binary files /dev/null and b/test/vdb-validate/db/sdc_pa_longer.csra differ
diff --git a/test/vdb-validate/db/sdc_seq_cmp_read_len_corrupt.csra b/test/vdb-validate/db/sdc_seq_cmp_read_len_corrupt.csra
new file mode 100644
index 0000000..e26e354
Binary files /dev/null and b/test/vdb-validate/db/sdc_seq_cmp_read_len_corrupt.csra differ
diff --git a/test/vdb-validate/db/sdc_seq_cmp_read_len_fixed.csra b/test/vdb-validate/db/sdc_seq_cmp_read_len_fixed.csra
new file mode 100644
index 0000000..0810af0
Binary files /dev/null and b/test/vdb-validate/db/sdc_seq_cmp_read_len_fixed.csra differ
diff --git a/test/vdb-validate/db/sdc_tmp_mismatch.csra b/test/vdb-validate/db/sdc_tmp_mismatch.csra
new file mode 100644
index 0000000..a34c387
Binary files /dev/null and b/test/vdb-validate/db/sdc_tmp_mismatch.csra differ
diff --git a/test/vdb-validate/expected/ROW_GAP b/test/vdb-validate/expected/ROW_GAP
new file mode 100644
index 0000000..17532f7
--- /dev/null
+++ b/test/vdb-validate/expected/ROW_GAP
@@ -0,0 +1,42 @@
+info: Database 'blob-row-gap.kar' metadata: md5 ok
+info: Table 'FEATURE' metadata: md5 ok
+info: Column 'FEAT_TYPE': checksums ok
+info: Column 'LOC_LEN': checksums ok
+info: Column 'LOC_ROW_ID': checksums ok
+info: Column 'LOC_SEQ_TYPE': checksums ok
+info: Column 'LOC_START': checksums ok
+info: Column 'LOC_STRAND': checksums ok
+info: Column 'PRODUCT_LEN': checksums ok
+info: Column 'PRODUCT_ROW_ID': checksums ok
+info: Column 'PRODUCT_SEQ_TYPE': checksums ok
+info: Column 'PRODUCT_START': checksums ok
+info: Column 'SEQ_FEAT': checksums ok
+info: Table 'GI_IDX' metadata: md5 ok
+info: Column 'NUC_ROW_ID': checksums ok
+info: Column 'PROT_ROW_ID': checksums ok
+info: Table 'PROTEIN' metadata: md5 ok
+info: Column 'DESCR': checksums ok
+info: Column 'FEAT_PRODUCT_ROW_ID': checksums ok
+info: Column 'FEAT_ROW_END': checksums ok
+info: Column 'FEAT_ROW_START': checksums ok
+info: Column 'GI': checksums ok
+info: Column 'HASH': checksums ok
+info: Column 'PROTEIN': checksums ok
+info: Column 'PROTEIN_LEN': checksums ok
+info: Column 'PROTEIN_NAME': checksums ok
+info: Column 'TITLE': checksums ok
+info: Table 'PROT_ACC_IDX' metadata: md5 ok
+info: Column 'PROTEIN_ROW_ID': checksums ok
+info: Table 'SEQUENCE' metadata: md5 ok
+info: Column 'ALTREAD': checksums ok
+info: Column 'CLIP_LEN': checksums ok
+info: Column 'CONTIG_NAME': checksums ok
+info: Column 'DESCR': checksums ok
+info: Column 'FEAT_ROW_END': checksums ok
+info: Column 'FEAT_ROW_START': checksums ok
+info: Column 'GI': checksums ok
+info: Column 'HASH': checksums ok
+info: Column 'PROT_COUNT': checksums ok
+info: Column 'READ': checksums ok
+info: Column 'TITLE': checksums ok
+info: Database 'blob-row-gap.kar' is consistent
diff --git a/test/vdb-validate/expected/no_sdc_checks b/test/vdb-validate/expected/no_sdc_checks
new file mode 100644
index 0000000..53e5c2c
--- /dev/null
+++ b/test/vdb-validate/expected/no_sdc_checks
@@ -0,0 +1,23 @@
+info: Database 'sdc_len_mismatch.csra' metadata: md5 ok
+info: Table 'PRIMARY_ALIGNMENT' metadata: md5 ok
+info: Column 'HAS_MISMATCH': checksums ok
+info: Column 'HAS_REF_OFFSET': checksums ok
+info: Column 'REF_LEN': checksums ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Table 'REFERENCE' metadata: md5 ok
+info: Column 'CGRAPH_HIGH': checksums ok
+info: Column 'CGRAPH_MISMATCHES': checksums ok
+info: Column 'CS_KEY': checksums ok
+info: Column 'PRIMARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SECONDARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SEQ_LEN': checksums ok
+info: Column 'SEQ_START': checksums ok
+info: Table 'SECONDARY_ALIGNMENT' metadata: md5 ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Table 'SEQUENCE' metadata: md5 ok
+info: Column 'PRIMARY_ALIGNMENT_ID': checksums ok
+info: Column 'QUALITY': checksums ok
+info: Column 'READ_LEN': checksums ok
+info: Database 'db/sdc_len_mismatch.csra': SEQUENCE.PRIMARY_ALIGNMENT_ID <-> PRIMARY_ALIGNMENT.SEQ_SPOT_ID referential integrity ok
+info: Database 'db/sdc_len_mismatch.csra': REFERENCE.PRIMARY_ALIGNMENT_IDS <-> PRIMARY_ALIGNMENT.REF_ID referential integrity ok
+info: Database 'sdc_len_mismatch.csra' is consistent
diff --git a/test/vdb-validate/expected/sdc_len_mismatch_1 b/test/vdb-validate/expected/sdc_len_mismatch_1
new file mode 100644
index 0000000..7ae23b4
--- /dev/null
+++ b/test/vdb-validate/expected/sdc_len_mismatch_1
@@ -0,0 +1,24 @@
+info: Database 'sdc_len_mismatch.csra' metadata: md5 ok
+info: Table 'PRIMARY_ALIGNMENT' metadata: md5 ok
+info: Column 'HAS_MISMATCH': checksums ok
+info: Column 'HAS_REF_OFFSET': checksums ok
+info: Column 'REF_LEN': checksums ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Table 'REFERENCE' metadata: md5 ok
+info: Column 'CGRAPH_HIGH': checksums ok
+info: Column 'CGRAPH_MISMATCHES': checksums ok
+info: Column 'CS_KEY': checksums ok
+info: Column 'PRIMARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SECONDARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SEQ_LEN': checksums ok
+info: Column 'SEQ_START': checksums ok
+info: Table 'SECONDARY_ALIGNMENT' metadata: md5 ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Table 'SEQUENCE' metadata: md5 ok
+info: Column 'PRIMARY_ALIGNMENT_ID': checksums ok
+info: Column 'QUALITY': checksums ok
+info: Column 'READ_LEN': checksums ok
+info: Database 'db/sdc_len_mismatch.csra': SEQUENCE.PRIMARY_ALIGNMENT_ID <-> PRIMARY_ALIGNMENT.SEQ_SPOT_ID referential integrity ok
+info: Database 'db/sdc_len_mismatch.csra': REFERENCE.PRIMARY_ALIGNMENT_IDS <-> PRIMARY_ALIGNMENT.REF_ID referential integrity ok
+err: data inconsistent while validating database - Database 'db/sdc_len_mismatch.csra': Limit violation (pa_longer_sa): there are at least 1 alignments where HAS_REF_OFFSET column is longer in PRIMARY_ALIGNMENT than in SECONDARY_ALIGNMENT
+err: data inconsistent while validating database - Database 'sdc_len_mismatch.csra' check failed
diff --git a/test/vdb-validate/expected/sdc_len_mismatch_2 b/test/vdb-validate/expected/sdc_len_mismatch_2
new file mode 100644
index 0000000..313eb27
--- /dev/null
+++ b/test/vdb-validate/expected/sdc_len_mismatch_2
@@ -0,0 +1,24 @@
+info: Database 'sdc_len_mismatch.csra' metadata: md5 ok
+info: Table 'PRIMARY_ALIGNMENT' metadata: md5 ok
+info: Column 'HAS_MISMATCH': checksums ok
+info: Column 'HAS_REF_OFFSET': checksums ok
+info: Column 'REF_LEN': checksums ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Table 'REFERENCE' metadata: md5 ok
+info: Column 'CGRAPH_HIGH': checksums ok
+info: Column 'CGRAPH_MISMATCHES': checksums ok
+info: Column 'CS_KEY': checksums ok
+info: Column 'PRIMARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SECONDARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SEQ_LEN': checksums ok
+info: Column 'SEQ_START': checksums ok
+info: Table 'SECONDARY_ALIGNMENT' metadata: md5 ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Table 'SEQUENCE' metadata: md5 ok
+info: Column 'PRIMARY_ALIGNMENT_ID': checksums ok
+info: Column 'QUALITY': checksums ok
+info: Column 'READ_LEN': checksums ok
+info: Database 'db/sdc_len_mismatch.csra': SEQUENCE.PRIMARY_ALIGNMENT_ID <-> PRIMARY_ALIGNMENT.SEQ_SPOT_ID referential integrity ok
+info: Database 'db/sdc_len_mismatch.csra': REFERENCE.PRIMARY_ALIGNMENT_IDS <-> PRIMARY_ALIGNMENT.REF_ID referential integrity ok
+err: data inconsistent while validating database - Database 'db/sdc_len_mismatch.csra': PRIMARY_ALIGNMENT:2 HAS_REF_OFFSET length (23) less than SECONDARY_ALIGNMENT:2 HAS_REF_OFFSET length (52)
+err: data inconsistent while validating database - Database 'sdc_len_mismatch.csra' check failed
diff --git a/test/vdb-validate/expected/sdc_pa_longer_1 b/test/vdb-validate/expected/sdc_pa_longer_1
new file mode 100644
index 0000000..ecd7ac8
--- /dev/null
+++ b/test/vdb-validate/expected/sdc_pa_longer_1
@@ -0,0 +1,26 @@
+info: Database 'sdc_pa_longer.csra' metadata: md5 ok
+info: Table 'PRIMARY_ALIGNMENT' metadata: md5 ok
+info: Column 'HAS_MISMATCH': checksums ok
+info: Column 'HAS_REF_OFFSET': checksums ok
+info: Column 'REF_LEN': checksums ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Table 'REFERENCE' metadata: md5 ok
+info: Column 'CGRAPH_HIGH': checksums ok
+info: Column 'CS_KEY': checksums ok
+info: Column 'PRIMARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SECONDARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SEQ_LEN': checksums ok
+info: Column 'SEQ_START': checksums ok
+info: Table 'SECONDARY_ALIGNMENT' metadata: md5 ok
+info: Column 'HAS_REF_OFFSET': checksums ok
+info: Column 'REF_LEN': checksums ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Column 'TMP_HAS_MISMATCH': checksums ok
+info: Table 'SEQUENCE' metadata: md5 ok
+info: Column 'PRIMARY_ALIGNMENT_ID': checksums ok
+info: Column 'QUALITY': checksums ok
+info: Column 'READ_LEN': checksums ok
+info: Database 'db/sdc_pa_longer.csra': SEQUENCE.PRIMARY_ALIGNMENT_ID <-> PRIMARY_ALIGNMENT.SEQ_SPOT_ID referential integrity ok
+info: Database 'db/sdc_pa_longer.csra': REFERENCE.PRIMARY_ALIGNMENT_IDS <-> PRIMARY_ALIGNMENT.REF_ID referential integrity ok
+err: data inconsistent while validating database - Database 'db/sdc_pa_longer.csra': Limit violation (pa_longer_sa): there are at least 1 alignments where HAS_REF_OFFSET column is longer in PRIMARY_ALIGNMENT than in SECONDARY_ALIGNMENT
+err: data inconsistent while validating database - Database 'sdc_pa_longer.csra' check failed
diff --git a/test/vdb-validate/expected/sdc_pa_longer_2 b/test/vdb-validate/expected/sdc_pa_longer_2
new file mode 100644
index 0000000..ecd7ac8
--- /dev/null
+++ b/test/vdb-validate/expected/sdc_pa_longer_2
@@ -0,0 +1,26 @@
+info: Database 'sdc_pa_longer.csra' metadata: md5 ok
+info: Table 'PRIMARY_ALIGNMENT' metadata: md5 ok
+info: Column 'HAS_MISMATCH': checksums ok
+info: Column 'HAS_REF_OFFSET': checksums ok
+info: Column 'REF_LEN': checksums ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Table 'REFERENCE' metadata: md5 ok
+info: Column 'CGRAPH_HIGH': checksums ok
+info: Column 'CS_KEY': checksums ok
+info: Column 'PRIMARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SECONDARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SEQ_LEN': checksums ok
+info: Column 'SEQ_START': checksums ok
+info: Table 'SECONDARY_ALIGNMENT' metadata: md5 ok
+info: Column 'HAS_REF_OFFSET': checksums ok
+info: Column 'REF_LEN': checksums ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Column 'TMP_HAS_MISMATCH': checksums ok
+info: Table 'SEQUENCE' metadata: md5 ok
+info: Column 'PRIMARY_ALIGNMENT_ID': checksums ok
+info: Column 'QUALITY': checksums ok
+info: Column 'READ_LEN': checksums ok
+info: Database 'db/sdc_pa_longer.csra': SEQUENCE.PRIMARY_ALIGNMENT_ID <-> PRIMARY_ALIGNMENT.SEQ_SPOT_ID referential integrity ok
+info: Database 'db/sdc_pa_longer.csra': REFERENCE.PRIMARY_ALIGNMENT_IDS <-> PRIMARY_ALIGNMENT.REF_ID referential integrity ok
+err: data inconsistent while validating database - Database 'db/sdc_pa_longer.csra': Limit violation (pa_longer_sa): there are at least 1 alignments where HAS_REF_OFFSET column is longer in PRIMARY_ALIGNMENT than in SECONDARY_ALIGNMENT
+err: data inconsistent while validating database - Database 'sdc_pa_longer.csra' check failed
diff --git a/test/vdb-validate/expected/sdc_pa_longer_3 b/test/vdb-validate/expected/sdc_pa_longer_3
new file mode 100644
index 0000000..d2d2288
--- /dev/null
+++ b/test/vdb-validate/expected/sdc_pa_longer_3
@@ -0,0 +1,26 @@
+info: Database 'sdc_pa_longer.csra' metadata: md5 ok
+info: Table 'PRIMARY_ALIGNMENT' metadata: md5 ok
+info: Column 'HAS_MISMATCH': checksums ok
+info: Column 'HAS_REF_OFFSET': checksums ok
+info: Column 'REF_LEN': checksums ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Table 'REFERENCE' metadata: md5 ok
+info: Column 'CGRAPH_HIGH': checksums ok
+info: Column 'CS_KEY': checksums ok
+info: Column 'PRIMARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SECONDARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SEQ_LEN': checksums ok
+info: Column 'SEQ_START': checksums ok
+info: Table 'SECONDARY_ALIGNMENT' metadata: md5 ok
+info: Column 'HAS_REF_OFFSET': checksums ok
+info: Column 'REF_LEN': checksums ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Column 'TMP_HAS_MISMATCH': checksums ok
+info: Table 'SEQUENCE' metadata: md5 ok
+info: Column 'PRIMARY_ALIGNMENT_ID': checksums ok
+info: Column 'QUALITY': checksums ok
+info: Column 'READ_LEN': checksums ok
+info: Database 'db/sdc_pa_longer.csra': SEQUENCE.PRIMARY_ALIGNMENT_ID <-> PRIMARY_ALIGNMENT.SEQ_SPOT_ID referential integrity ok
+info: Database 'db/sdc_pa_longer.csra': REFERENCE.PRIMARY_ALIGNMENT_IDS <-> PRIMARY_ALIGNMENT.REF_ID referential integrity ok
+info: Database 'db/sdc_pa_longer.csra': SEQUENCE and SECONDARY_ALIGNMENT tables data integrity checks ok
+info: Database 'sdc_pa_longer.csra' is consistent
diff --git a/test/vdb-validate/expected/sdc_seq_cmp_read_len_corrupt b/test/vdb-validate/expected/sdc_seq_cmp_read_len_corrupt
new file mode 100644
index 0000000..8cd413b
--- /dev/null
+++ b/test/vdb-validate/expected/sdc_seq_cmp_read_len_corrupt
@@ -0,0 +1,44 @@
+info: Database 'sdc_seq_cmp_read_len_corrupt.csra' metadata: md5 ok
+info: Table 'PRIMARY_ALIGNMENT' metadata: md5 ok
+info: Column 'GLOBAL_REF_START': checksums ok
+info: Column 'HAS_MISMATCH': checksums ok
+info: Column 'HAS_REF_OFFSET': checksums ok
+info: Column 'MISMATCH': checksums ok
+info: Column 'REF_LEN': checksums ok
+info: Column 'REF_ORIENTATION': checksums ok
+info: Column 'SEQ_READ_ID': checksums ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Table 'REFERENCE' metadata: md5 ok
+info: Column 'CGRAPH_HIGH': checksums ok
+info: Column 'CGRAPH_MISMATCHES': checksums ok
+info: Column 'CS_KEY': checksums ok
+info: Column 'OVERLAP_REF_POS': checksums ok
+info: Column 'PRIMARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SECONDARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SEQ_LEN': checksums ok
+info: Column 'SEQ_START': checksums ok
+info: Table 'SECONDARY_ALIGNMENT' metadata: md5 ok
+info: Column 'GLOBAL_REF_START': checksums ok
+info: Column 'HAS_REF_OFFSET': checksums ok
+info: Column 'MATE_REF_ORIENTATION': checksums ok
+info: Column 'MATE_REF_POS': checksums ok
+info: Column 'REF_LEN': checksums ok
+info: Column 'REF_ORIENTATION': checksums ok
+info: Column 'SEQ_READ_ID': checksums ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Column 'TEMPLATE_LEN': checksums ok
+info: Column 'TMP_HAS_MISMATCH': checksums ok
+info: Column 'TMP_MISMATCH': checksums ok
+info: Table 'SEQUENCE' metadata: md5 ok
+info: Column 'CMP_READ': checksums ok
+info: Column 'PRIMARY_ALIGNMENT_ID': checksums ok
+info: Column 'QUALITY': checksums ok
+info: Column 'READ_LEN': checksums ok
+info: Column 'READ_START': checksums ok
+info: Column 'READ_TYPE': checksums ok
+info: Column 'SPOT_GROUP': checksums ok
+info: Database 'db/sdc_seq_cmp_read_len_corrupt.csra': SEQUENCE.PRIMARY_ALIGNMENT_ID <-> PRIMARY_ALIGNMENT.SEQ_SPOT_ID referential integrity ok
+info: Database 'db/sdc_seq_cmp_read_len_corrupt.csra': REFERENCE.PRIMARY_ALIGNMENT_IDS <-> PRIMARY_ALIGNMENT.REF_ID referential integrity ok
+warn: Database 'db/sdc_seq_cmp_read_len_corrupt.csra' has secondary alignments without primary
+err: data inconsistent while validating database - Database 'db/sdc_seq_cmp_read_len_corrupt.csra': SEQUENCE:1 CMP_READ length (75) does not match sum of unaligned READ_LEN values (150)
+err: data inconsistent while validating database - Database 'sdc_seq_cmp_read_len_corrupt.csra' check failed
diff --git a/test/vdb-validate/expected/sdc_seq_cmp_read_len_fixed b/test/vdb-validate/expected/sdc_seq_cmp_read_len_fixed
new file mode 100644
index 0000000..98afa93
--- /dev/null
+++ b/test/vdb-validate/expected/sdc_seq_cmp_read_len_fixed
@@ -0,0 +1,43 @@
+info: Database 'sdc_seq_cmp_read_len_fixed.csra' metadata: md5 ok
+info: Table 'PRIMARY_ALIGNMENT' metadata: md5 ok
+info: Column 'GLOBAL_REF_START': checksums ok
+info: Column 'HAS_MISMATCH': checksums ok
+info: Column 'HAS_REF_OFFSET': checksums ok
+info: Column 'MISMATCH': checksums ok
+info: Column 'REF_LEN': checksums ok
+info: Column 'REF_ORIENTATION': checksums ok
+info: Column 'SEQ_READ_ID': checksums ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Table 'REFERENCE' metadata: md5 ok
+info: Column 'CGRAPH_HIGH': checksums ok
+info: Column 'CGRAPH_MISMATCHES': checksums ok
+info: Column 'CS_KEY': checksums ok
+info: Column 'PRIMARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SECONDARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SEQ_LEN': checksums ok
+info: Column 'SEQ_START': checksums ok
+info: Table 'SECONDARY_ALIGNMENT' metadata: md5 ok
+info: Column 'GLOBAL_REF_START': checksums ok
+info: Column 'HAS_REF_OFFSET': checksums ok
+info: Column 'MATE_REF_ORIENTATION': checksums ok
+info: Column 'MATE_REF_POS': checksums ok
+info: Column 'REF_LEN': checksums ok
+info: Column 'REF_ORIENTATION': checksums ok
+info: Column 'SEQ_READ_ID': checksums ok
+info: Column 'SEQ_SPOT_ID': checksums ok
+info: Column 'TEMPLATE_LEN': checksums ok
+info: Column 'TMP_HAS_MISMATCH': checksums ok
+info: Column 'TMP_MISMATCH': checksums ok
+info: Table 'SEQUENCE' metadata: md5 ok
+info: Column 'CMP_READ': checksums ok
+info: Column 'PRIMARY_ALIGNMENT_ID': checksums ok
+info: Column 'QUALITY': checksums ok
+info: Column 'READ_LEN': checksums ok
+info: Column 'READ_START': checksums ok
+info: Column 'READ_TYPE': checksums ok
+info: Column 'SPOT_GROUP': checksums ok
+info: Database 'db/sdc_seq_cmp_read_len_fixed.csra': SEQUENCE.PRIMARY_ALIGNMENT_ID <-> PRIMARY_ALIGNMENT.SEQ_SPOT_ID referential integrity ok
+info: Database 'db/sdc_seq_cmp_read_len_fixed.csra': REFERENCE.PRIMARY_ALIGNMENT_IDS <-> PRIMARY_ALIGNMENT.REF_ID referential integrity ok
+warn: Database 'db/sdc_seq_cmp_read_len_fixed.csra' has secondary alignments without primary
+info: Database 'db/sdc_seq_cmp_read_len_fixed.csra': SEQUENCE and SECONDARY_ALIGNMENT tables data integrity checks ok
+info: Database 'sdc_seq_cmp_read_len_fixed.csra' is consistent
diff --git a/test/vdb-validate/expected/sdc_tmp_mismatch b/test/vdb-validate/expected/sdc_tmp_mismatch
new file mode 100644
index 0000000..5893d4e
--- /dev/null
+++ b/test/vdb-validate/expected/sdc_tmp_mismatch
@@ -0,0 +1,16 @@
+info: Database 'sdc_tmp_mismatch.csra' metadata: md5 ok
+info: Table 'PRIMARY_ALIGNMENT' metadata: md5 ok
+info: Table 'REFERENCE' metadata: md5 ok
+info: Column 'CGRAPH_HIGH': checksums ok
+info: Column 'CS_KEY': checksums ok
+info: Column 'OVERLAP_REF_POS': checksums ok
+info: Column 'PRIMARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SECONDARY_ALIGNMENT_IDS': checksums ok
+info: Column 'SEQ_LEN': checksums ok
+info: Column 'SEQ_START': checksums ok
+info: Table 'SECONDARY_ALIGNMENT' metadata: md5 ok
+info: Table 'SEQUENCE' metadata: md5 ok
+info: Database 'db/sdc_tmp_mismatch.csra': SEQUENCE.PRIMARY_ALIGNMENT_ID <-> PRIMARY_ALIGNMENT.SEQ_SPOT_ID referential integrity ok
+info: Database 'db/sdc_tmp_mismatch.csra': REFERENCE.PRIMARY_ALIGNMENT_IDS <-> PRIMARY_ALIGNMENT.REF_ID referential integrity ok
+err: data inconsistent while validating database - Database 'db/sdc_tmp_mismatch.csra': SECONDARY_ALIGNMENT:1 TMP_MISMATCH column contains '='
+err: data inconsistent while validating database - Database 'sdc_tmp_mismatch.csra' check failed
diff --git a/test/vdb-validate/runtestcase.sh b/test/vdb-validate/runtestcase.sh
new file mode 100755
index 0000000..84ba505
--- /dev/null
+++ b/test/vdb-validate/runtestcase.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+#echo "$0 $*"
+
+TEST_CMD=$1
+CASEID=$2
+RC=$3
+
+CMD="$TEST_CMD > \"actual/$CASEID.tmp\" 2>&1"
+#echo $CMD
+eval $CMD
+rc="$?"
+
+if [ "$rc" != "$RC" ] ; then
+    echo "command \"$TEST_CMD\" returned $rc, expected $RC"
+    echo "command executed:"
+    echo $CMD
+
+	echo "command output:"
+    cat actual/$CASEID.tmp
+    exit 2
+fi
+
+# remove first two columns from output: datetime and progname 
+cat "actual/$CASEID.tmp" | awk '{if(substr($2,1,12) == "vdb-validate"){$2=$1="";} print $0}' > "actual/$CASEID"
+rm "actual/$CASEID.tmp"
+
+# remove trailing white spaces
+sed -i -e 's/^[ \t]*//g' "actual/$CASEID"
+# remove file names and line numbers
+sed -i -e 's/: .*:[0-9]*:[^ ]*:/:/g' "actual/$CASEID"
+
+diff expected/$CASEID actual/$CASEID
+rc="$?"
+
+if [ "$rc" != "0" ] ; then
+    exit 3
+fi
+
diff --git a/test/vdb/Makefile b/test/vdb/Makefile
deleted file mode 100644
index 7a0aaf9..0000000
--- a/test/vdb/Makefile
+++ /dev/null
@@ -1,225 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-
-MODULE = test/vdb
-
-TEST_TOOLS = \
-	test-vdb \
-	test-wvdb \
-	test-dependencies \
-	test-sparse-col-rw \
-	test-sparse-col-rd \
-	test-blob-val \
-	test-VDB-3060
-    
-include $(TOP)/build/Makefile.env
-
-
-# make sure runs are not cached in the user repository when running tests
-ifeq ($(wildcard ../../../asm-trace),)
-	ifeq (,$(VDB_CONFIG))
-		VDB_CONFIG = $(shell pwd)/../only-remote-repository.kfg
-	endif
-endif
-
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-runtests: setup 
-
-setup:
-	@ mkdir -p db
-
-.PHONY: $(TEST_TOOLS) setup
-
-clean: stdclean
-
-
-#-------------------------------------------------------------------------------
-# test-vdb
-#
-TEST_VDB_SRC = \
-	test-vdb
-
-TEST_VDB_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_VDB_SRC))
-
-TEST_VDB_LIB = \
-	-skapp \
-	-sktst \
-	-sncbi-vdb \
-
-$(TEST_BINDIR)/test-vdb: $(TEST_VDB_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_VDB_LIB)
-
-vdb: test-vdb
-	$(TEST_BINDIR)/test-vdb    
-
-valgrind_vdb: std
-	valgrind --ncbi --show-reachable=no $(TEST_BINDIR)/test-vdb    
-
-#-------------------------------------------------------------------------------
-# test-dependencies
-#
-TEST_DEPS_SRC = \
-	test-dependencies
-
-TEST_DEPS_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_DEPS_SRC))
-
-TEST_DEPS_LIB = \
-	-skapp \
-	-sktst \
-	-sncbi-vdb \
-
-$(TEST_BINDIR)/test-dependencies: $(TEST_DEPS_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_DEPS_LIB)
-
-valgrind_deps: std
-	valgrind --ncbi --show-reachable=no $(TEST_BINDIR)/test-dependencies    
-
-#-------------------------------------------------------------------------------
-# test-wvdb
-#
-TEST_WVDB_SRC = \
-	test-wvdb
-
-TEST_WVDB_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_WVDB_SRC))
-
-TEST_WVDB_LIB = \
-	-skapp \
-	-sktst \
-	-sncbi-wvdb \
-
-$(TEST_BINDIR)/test-wvdb: $(TEST_WVDB_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_WVDB_LIB)
-
-wvdb: test-wvdb
-	$(TEST_BINDIR)/test-wvdb    
-
-valgrind_wvdb: std
-	valgrind --ncbi --show-reachable=no $(TEST_BINDIR)/test-wvdb    
-
-#-------------------------------------------------------------------------------
-# test-sparse-col
-#  We will compile the same test file first in read/write mode, create DB and
-#  run tests using libncbi-wvdb library; then compile the same test with -DREAD_ONLY 
-#  and link it against read-only lincbi-vdb library
-TEST_SPARSE_COL_SRC = \
-	test-sparse-col
-
-TEST_SPARSE_COL_OBJ_RW = \
-	$(addsuffix .$(OBJX),$(TEST_SPARSE_COL_SRC)-rw)
-	
-TEST_SPARSE_COL_OBJ_RD = \
-	$(addsuffix .$(OBJX),$(TEST_SPARSE_COL_SRC)-rd)
-
-TEST_SPARSE_COL_LIB = \
-	-skapp \
-	-sktst \
-
-$(TEST_SPARSE_COL_OBJ_RW): $(TEST_SPARSE_COL_SRC).cpp
-	$(CP) -o $@ $(OPT) $< $(LOC_INFO) -D__file_ext__=cpp
-
-$(TEST_SPARSE_COL_OBJ_RD): $(TEST_SPARSE_COL_SRC).cpp
-	$(CP) -o $@ $(OPT) $< $(LOC_INFO) -D__file_ext__=cpp -DREAD_ONLY	
-
-$(TEST_BINDIR)/test-sparse-col-rw: $(TEST_SPARSE_COL_OBJ_RW)
-	$(LP) --exe -o $@ $^ $(TEST_SPARSE_COL_LIB) -sncbi-wvdb
-
-$(TEST_BINDIR)/test-sparse-col-rd: $(TEST_SPARSE_COL_OBJ_RD)
-	$(LP) --exe -o $@ $^ $(TEST_SPARSE_COL_LIB) -sncbi-vdb
-
-sparse-col: test-sparse-col-rw test-sparse-col-rd
-	$(TEST_BINDIR)/test-sparse-col-rw
-	$(TEST_BINDIR)/test-sparse-col-rd
-
-valgrind_sparse-col: std
-	valgrind --ncbi --show-reachable=no $(TEST_BINDIR)/test-sparse-col-rw
-	valgrind --ncbi --show-reachable=no $(TEST_BINDIR)/test-sparse-col-rd   
-	
-#-------------------------------------------------------------------------------
-# test-blob-val
-#
-TEST_BLOB_VAL_SRC = \
-	test-blob-val
-
-TEST_BLOB_VAL_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_BLOB_VAL_SRC))
-	
-TEST_BLOB_VAL_LIB = \
-	-skapp \
-	-sktst \
-	-sncbi-vdb \
-
-$(TEST_BINDIR)/test-blob-val: $(TEST_BLOB_VAL_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_BLOB_VAL_LIB)
-
-blob-val: test-blob-val
-	$(TEST_BINDIR)/test-blob-val
-
-#-------------------------------------------------------------------------------
-# SYS-224064
-#
-SYS_224064_SRC = \
-	SYS-224064
-
-SYS_224064_OBJ = \
-	$(addsuffix .$(OBJX),$(SYS_224064_SRC))
-
-SYS_224064_LIB = \
-	-sncbi-vdb \
-
-$(TEST_BINDIR)/SYS-224064: $(SYS_224064_OBJ)
-	$(LP) --exe -o $@ $^ $(SYS_224064_LIB)
-
-SYS-224064: makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-
-#-------------------------------------------------------------------------------
-# VDB-3060
-#
-VDB_3060_SRC = \
-	test-VDB-3060
-
-VDB_3060_OBJ = \
-	$(addsuffix .$(OBJX),$(VDB_3060_SRC))
-
-VDB_3060_LIB = \
-	-skapp \
-	-sktst \
-	-sncbi-vdb \
-
-$(TEST_BINDIR)/test-VDB-3060: $(VDB_3060_OBJ)
-	$(LP) --exe -o $@ $^ $(VDB_3060_LIB)
-
-VDB-3060: test-VDB-3060
-	$(TEST_BINDIR)/test-VDB-3060
diff --git a/test/vdb/SYS-224064.cpp b/test/vdb/SYS-224064.cpp
deleted file mode 100644
index ec2ae39..0000000
--- a/test/vdb/SYS-224064.cpp
+++ /dev/null
@@ -1,237 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb/manager.h>
-#include <vdb/database.h> 
-#include <vdb/table.h> 
-#include <vdb/cursor.h> 
-#include <vdb/vdb-priv.h>
-#include <sra/sraschema.h> // VDBManagerMakeSRASchema
-#include <vdb/schema.h> /* VSchemaRelease */
-
-#include <ktst/unit_test.hpp> // TEST_CASE
-#include <kfg/config.h> 
-#include <klib/printf.h>
-
-#include <iostream>
-#include <string>
-
-#define NCBI_TRACES01_PATH "/panfs/traces01"
-
-static
-std :: string print_err ( const char * expr, rc_t rc )
-{
-    size_t num_writ;
-    char buffer [ 4096 ];
-    rc_t rc2 = string_printf ( buffer, sizeof buffer, & num_writ, "%s: rc = %R", expr, rc );
-    if ( rc2 != 0 )
-        return std :: string ( "wow!" );
-    return std :: string ( buffer, num_writ );
-}
-
-#define CALL( x ) \
-    if ( ( rc = x ) != 0 ) throw print_err ( #x, rc )
-
-#define _ASSERT( x ) \
-    if ( ! ( x ) ) throw std :: string ( # x )
-
-using namespace std;
-
-int LowLevelTest(void)
-{
-    rc_t rc = 0;
-
-    cout << "LowLevelTest for memory overuse..." << endl;
-    const char* file_name = NCBI_TRACES01_PATH
-        "/compress/1KG/CEU/NA12249/exome.ILLUMINA.MOSAIK.csra";
-    const VDBManager* mgr = 0;
-    CALL(VDBManagerMakeRead(&mgr, 0));
-        
-    const VDatabase* db = 0;
-    CALL(VDBManagerOpenDBRead(mgr, &db, 0, file_name));
-        
-    const VTable* ref_table = 0;
-    CALL(VDatabaseOpenTableRead(db, &ref_table, "REFERENCE"));
-    
-    const VCursor* ref_cursor = 0;
-    CALL(VTableCreateCursorRead(ref_table, &ref_cursor));
-    CALL(VCursorPermitPostOpenAdd(ref_cursor));
-    CALL(VCursorOpen(ref_cursor));
-    
-    uint32_t align_column;
-    CALL(VCursorAddColumn(ref_cursor, &align_column, "PRIMARY_ALIGNMENT_IDS"));
-    
-    const VTable* align_table = 0;
-    CALL(VDatabaseOpenTableRead(db, &align_table, "PRIMARY_ALIGNMENT"));
-
-    const VCursor* align_cursor = 0;
-    CALL(VTableCreateCursorRead(align_table, &align_cursor));
-    CALL(VCursorPermitPostOpenAdd(align_cursor));
-    CALL(VCursorOpen(align_cursor));
-    
-    uint32_t spot_id_column;
-    CALL(VCursorAddColumn(align_cursor, &spot_id_column,
-                          "SEQ_SPOT_ID"));
-    uint32_t read_id_column;
-    CALL(VCursorAddColumn(align_cursor, &read_id_column,
-                          "SEQ_READ_ID"));
-
-    const VTable* seq_table = 0;
-    CALL(VDatabaseOpenTableRead(db, &seq_table, "SEQUENCE"));
-
-    const VCursor* seq_cursor = 0;
-    CALL(VTableCreateCursorRead(seq_table, &seq_cursor));
-    CALL(VCursorPermitPostOpenAdd(seq_cursor));
-    CALL(VCursorOpen(seq_cursor));
-    
-    uint32_t trim_len_column;
-    CALL(VCursorAddColumn(seq_cursor, &trim_len_column, "TRIM_LEN"));
-    
-    for ( int64_t ref_row = 582444; ref_row <= 582444; ++ref_row ) {
-        const int64_t* align_rows = 0;
-        size_t align_count = 0;
-        {
-            const void* data;
-            uint32_t bit_offset, bit_length;
-            uint32_t elem_count;
-            CALL(VCursorCellDataDirect(ref_cursor, ref_row,
-                                       align_column,
-                                       &bit_length, &data, &bit_offset,
-                                       &elem_count));
-            _ASSERT(bit_length == 8*sizeof(int64_t));
-            _ASSERT(bit_offset == 0);
-            align_rows = static_cast<const int64_t*>(data);
-            align_count = elem_count;
-        }
-        
-        for ( size_t i = 0; i < align_count; ++i ) {
-            int64_t align_row = align_rows[i];
-            int64_t spot_id = 0;
-            uint32_t read_id = 0;
-            {
-                const void* data;
-                uint32_t bit_offset, bit_length;
-                uint32_t elem_count;
-                CALL(VCursorCellDataDirect(align_cursor, align_row,
-                                           spot_id_column,
-                                           &bit_length, &data, &bit_offset,
-                                           &elem_count));
-                _ASSERT(bit_length == 8*sizeof(int64_t));
-                _ASSERT(bit_offset == 0);
-                _ASSERT(elem_count == 1);
-                spot_id = *static_cast<const int64_t*>(data);
-                _ASSERT(spot_id);
-            }
-            {
-                const void* data;
-                uint32_t bit_offset, bit_length;
-                uint32_t elem_count;
-                CALL(VCursorCellDataDirect(align_cursor, align_row,
-                                           read_id_column,
-                                           &bit_length, &data, &bit_offset,
-                                           &elem_count));
-                _ASSERT(bit_length == 8*sizeof(uint32_t));
-                _ASSERT(bit_offset == 0);
-                _ASSERT(elem_count == 1);
-                read_id = *static_cast<const uint32_t*>(data);
-                _ASSERT(read_id);
-            }
-
-            uint32_t trim_len = 0;
-            if ( 1 )
-            {
-                const void* data;
-                uint32_t bit_offset, bit_length;
-                uint32_t elem_count;
-                CALL(VCursorCellDataDirect(seq_cursor, spot_id,
-                                           trim_len_column,
-                                           &bit_length, &data, &bit_offset,
-                                           &elem_count));
-                _ASSERT(bit_length == 8*sizeof(uint32_t));
-                _ASSERT(bit_offset == 0);
-                _ASSERT(elem_count == 1);
-                trim_len = *static_cast<const uint32_t*>(data);
-            }
-
-            cout << " " << align_row << ":" << spot_id << "." << read_id
-                 << endl;
-        }
-    }
-    CALL(VCursorRelease(seq_cursor));
-    CALL(VTableRelease(seq_table));
-    CALL(VCursorRelease(align_cursor));
-    CALL(VTableRelease(align_table));
-    CALL(VCursorRelease(ref_cursor));
-    CALL(VTableRelease(ref_table));
-    CALL(VDatabaseRelease(db));
-    CALL(VDBManagerRelease(mgr));
-    cout << "LowLevelTest done" << endl;
-    return 0;
-}
-
-int main ( int argc, char * argv [] )
-{
-    int status = 7;
-
-    try
-    {
-        status = LowLevelTest ();
-    }
-    catch ( std :: string & x )
-    {
-        std :: cerr
-            << "failed: "
-            << x
-            << endl
-            ;
-    }
-    catch ( const char x [] )
-    {
-        std :: cerr
-            << "failed: "
-            << x
-            << endl
-            ;
-    }
-    catch ( std :: exception & x )
-    {
-        std :: cerr
-            << "failed: "
-            << x . what ()
-            << endl
-            ;
-    }
-    catch ( ... )
-    {
-        std :: cerr
-            << "failed: "
-            << "unknown exception"
-            << endl
-            ;
-    }
-
-    return status;
-}
diff --git a/test/vdb/db/blob_val_inv_chsum.sra b/test/vdb/db/blob_val_inv_chsum.sra
deleted file mode 100644
index 5585592..0000000
Binary files a/test/vdb/db/blob_val_inv_chsum.sra and /dev/null differ
diff --git a/test/vdb/kfg/empty/empty.kfg b/test/vdb/kfg/empty/empty.kfg
deleted file mode 100644
index 115a058..0000000
--- a/test/vdb/kfg/empty/empty.kfg
+++ /dev/null
@@ -1,3 +0,0 @@
-repository/remote/main/NCBI/apps/sra/volumes/fuse1000 = "sra-instant/reads/ByRun/sra"
-repository/remote/main/NCBI/apps/refseq/volumes/refseq = "refseq"
-repository/remote/main/NCBI/root = "http://ftp-trace.ncbi.nlm.nih.gov/sra"
diff --git a/test/vdb/kfg/linux/test-dependencies.kfg b/test/vdb/kfg/linux/test-dependencies.kfg
deleted file mode 100644
index 3a0e575..0000000
--- a/test/vdb/kfg/linux/test-dependencies.kfg
+++ /dev/null
@@ -1,3 +0,0 @@
-repository/site/main/tracearc/apps/sra/volumes/ncbi = "sra17:sra16:sra15:sra14:sra13:sra12:sra11:sra10:sra9:sra8:sra7:sra6:sra5:sra4:sra3:sra2:sra1:sra0"
-repository/site/main/tracearc/apps/refseq/volumes/refseq = "refseq"
-repository/site/main/tracearc/root = "/netmnt/traces04"
diff --git a/test/vdb/kfg/mac/test-dependencies.kfg b/test/vdb/kfg/mac/test-dependencies.kfg
deleted file mode 100644
index 407f738..0000000
--- a/test/vdb/kfg/mac/test-dependencies.kfg
+++ /dev/null
@@ -1,3 +0,0 @@
-repository/site/main/tracearc/apps/sra/volumes/ncbi = "sra17:sra16:sra15:sra14:sra13:sra12:sra11:sra10:sra9:sra8:sra7:sra6:sra5:sra4:sra3:sra2:sra1:sra0"
-repository/site/main/tracearc/apps/refseq/volumes/refseq = "refseq"
-repository/site/main/tracearc/root = "/net/traces04"
diff --git a/test/vdb/kfg/win/test-dependencies.kfg b/test/vdb/kfg/win/test-dependencies.kfg
deleted file mode 100644
index ade9ac6..0000000
--- a/test/vdb/kfg/win/test-dependencies.kfg
+++ /dev/null
@@ -1,3 +0,0 @@
-repository/site/main/tracearc/apps/sra/volumes/ncbi = "sra17:sra16:sra15:sra14:sra13:sra12:sra11:sra10:sra9:sra8:sra7:sra6:sra5:sra4:sra3:sra2:sra1:sra0"
-repository/site/main/tracearc/apps/refseq/volumes/refseq = "refseq"
-repository/site/main/tracearc/root = "//traces04"
diff --git a/test/vdb/test-VDB-3060.cpp b/test/vdb/test-VDB-3060.cpp
deleted file mode 100644
index d3ac905..0000000
--- a/test/vdb/test-VDB-3060.cpp
+++ /dev/null
@@ -1,380 +0,0 @@
-// ===========================================================================
-//
-//                            PUBLIC DOMAIN NOTICE
-//               National Center for Biotechnology Information
-//
-//  This software/database is a "United States Government Work" under the
-//  terms of the United States Copyright Act.  It was written as part of
-//  the author's official duties as a United States Government employee and
-//  thus cannot be copyrighted.  This software/database is freely available
-//  to the public for use. The National Library of Medicine and the U.S.
-//  Government have not placed any restriction on its use or reproduction.
-//
-//  Although all reasonable efforts have been taken to ensure the accuracy
-//  and reliability of the software and data, the NLM and the U.S.
-//  Government do not and cannot warrant the performance or results that
-//  may be obtained by using this software or data. The NLM and the U.S.
-//  Government disclaim all warranties, express or implied, including
-//  warranties of performance, merchantability or fitness for any particular
-//  purpose.
-//
-//  Please cite the author in any work or product based on this material.
-//
-// ===========================================================================
-
-#include <vdb/manager.h> // VDBManager
-#include <vdb/vdb-priv.h>
-
-#include <ktst/unit_test.hpp> // TEST_CASE
-#include <vfs/path.h>
-#include <vfs/manager.h>
-#include <klib/text.h> 
-#include <klib/out.h> 
-#include <klib/printf.h> 
-#include <kfs/directory.h> 
-#include <kfg/config.h> 
-
-#include <sysalloc.h>
-#include <cstdlib>
-#include <stdexcept>
-
-using namespace std;
-
-TEST_SUITE( VDB_3060 )
-
-std::string original_value = std::string( "" );
-
-const VDBManager * vdb_mgr = NULL;
-VFSManager * vfs_mgr = NULL;
-
-static rc_t make_global_managers( void )
-{
-    rc_t rc = VDBManagerMakeRead( &vdb_mgr, NULL );
-    if ( rc != 0 )
-        std::cout << "VDB-3060.VdbFixture: VDBManagerMakeRead() failed" << std::endl;
-    else
-    {
-        rc = VFSManagerMake ( &vfs_mgr );
-        if ( rc != 0 )
-            std::cout << "VdbFixture: VFSManagerMake() failed" << std::endl;
-    }
-    return rc;
-}
-
-static void release_global_managers( void )
-{
-    VFSManagerRelease ( vfs_mgr );
-    VDBManagerRelease ( vdb_mgr );
-}
-
-
-/*
-    test VDBManagerGetCacheRoot() with invalid and valid parameters
-    print the currently stored value
-    store this value in the global: original_value
-*/
-TEST_CASE( GetCacheRoot_1 )
-{
-    VPath const * vpath = NULL;
-    rc_t rc = VDBManagerGetCacheRoot( NULL, &vpath );
-    if ( rc == 0 )
-        FAIL( "FAIL: VDBManagerGetCacheRoot( NULL, &vpath ) succeed" );
-    rc = VDBManagerGetCacheRoot( vdb_mgr, NULL );
-    if ( rc == 0 )
-        FAIL( "FAIL: VDBManagerGetCacheRoot( mgr, NULL ) succeed" );
-    rc = VDBManagerGetCacheRoot( vdb_mgr, &vpath );
-    if ( rc != 0 )
-        FAIL( "FAIL: VDBManagerGetCacheRoot( mgr, &vpath ) failed" );
-    if ( vpath == NULL )
-        FAIL( "FAIL: VDBManagerGetCacheRoot( mgr, &vpath ) returned vpath == NULL " );
-
-    String const * spath = NULL;
-    rc = VPathMakeString ( vpath, &spath );
-    if ( rc != 0 )
-        FAIL( "FAIL: VPathMakeString( vpath, &spatch ) failed" );
-    
-    original_value = std::string( spath->addr, spath->size );
-    std::cout << "original value: " << original_value << std::endl;
-    
-    if ( spath != NULL )
-        StringWhack( spath );
-
-    if ( vpath != NULL )
-        VPathRelease( vpath );
-}
-
-const char other_path[] = "/some/other/path";
-
-/*
-    test VDBManagerSetCacheRoot() with invalid and valid parameters
-    set the value to "/home/raetzw/somepath"
-*/
-TEST_CASE( SetCacheRoot_1 )
-{
-    rc_t rc = VDBManagerSetCacheRoot( vdb_mgr, NULL );
-    if ( rc == 0 )
-        FAIL( "FAIL: VDBManagerSetCacheRoot( mgr, NULL ) succeed" );
-
-    VPath * vpath;
-    rc = VFSManagerMakePath ( vfs_mgr, &vpath, other_path );
-    if ( rc != 0 )
-        FAIL( "FAIL: VFSManagerMakePath() failed" );
-        
-    rc = VDBManagerSetCacheRoot( NULL, vpath );
-    if ( rc == 0 )
-        FAIL( "FAIL: VDBManagerSetCacheRoot( NULL, vpath ) succeed" );
-        
-    rc = VDBManagerSetCacheRoot( vdb_mgr, vpath );
-    if ( rc != 0 )
-        FAIL( "FAIL: VDBManagerSetCacheRoot( mgr, vpath ) failed" );
-
-    if ( vpath != NULL )
-        VPathRelease( vpath );
-}
-
-
-/*
-    call VDBManagerGetCacheRoot() to verify that the new value
-    is indeed the value we did set in the test-case above
-*/
-TEST_CASE( GetCacheRoot_2 )
-{
-    VPath const * vpath = NULL;
-    rc_t rc = VDBManagerGetCacheRoot( vdb_mgr, &vpath );
-    if ( rc != 0 )
-        FAIL( "FAIL: VDBManagerGetCacheRoot( mgr, &vpath ) failed" );
-    if ( vpath == NULL )
-        FAIL( "FAIL: VDBManagerGetCacheRoot( mgr, &vpath ) returned vpath == NULL " );
-
-    String const * spath = NULL;
-    rc = VPathMakeString ( vpath, &spath );
-    if ( rc != 0 )
-        FAIL( "FAIL: VPathMakeString( vpath, &spatch ) failed" );
-    
-    std::string s1 = std::string( spath->addr, spath->size );
-    std::string s2 = std::string( other_path );
-    std::cout << "after setting different value: " << s1;
-    if ( s1 == s2 )
-        std::cout << " - as expected" << std::endl;
-    else
-    {
-        std::cout << " - we did not expected this!" << std::endl;
-        FAIL( "FAIL: unexpected value after setting a new cache-root" );
-    }
-    
-    if ( spath != NULL )
-        StringWhack( spath );
-
-    if ( vpath != NULL )
-        VPathRelease( vpath );
-}
-
-
-/*
-    put the value stored in the global 'original_value' back in place
-*/
-TEST_CASE( SetCacheRoot_2 )
-{
-    VPath * vpath;
-    rc_t rc = VFSManagerMakePath ( vfs_mgr, &vpath, original_value.c_str() );
-    if ( rc != 0 )
-        FAIL( "FAIL: VFSManagerMakePath() failed" );
-        
-    rc = VDBManagerSetCacheRoot( vdb_mgr, vpath );
-    if ( rc != 0 )
-        FAIL( "FAIL: VDBManagerSetCacheRoot( mgr, vpath ) failed" );
-
-    if ( vpath != NULL )
-        VPathRelease( vpath );
-}
-
-
-/*
-    check if the original value is back in place
-*/
-TEST_CASE( GetCacheRoot_3 )
-{
-    VPath const * vpath = NULL;
-    rc_t rc = VDBManagerGetCacheRoot( vdb_mgr, &vpath );
-    if ( rc != 0 )
-        FAIL( "FAIL: VDBManagerGetCacheRoot( mgr, &vpath ) failed" );
-    if ( vpath == NULL )
-        FAIL( "FAIL: VDBManagerGetCacheRoot( mgr, &vpath ) returned vpath == NULL " );
-
-    String const * spath = NULL;
-    rc = VPathMakeString ( vpath, &spath );
-    if ( rc != 0 )
-        FAIL( "FAIL: VPathMakeString( vpath, &spath ) failed" );
-    
-    std::string s = std::string( spath->addr, spath->size );
-    std::cout << "reverted to original value of: " << s << std::endl;
-
-    if ( s != original_value )
-        FAIL( "FAIL: did not restore original value" );
-        
-    if ( spath != NULL )
-        StringWhack( spath );
-
-    if ( vpath != NULL )
-        VPathRelease( vpath );
-}
-
-TEST_CASE( tow_managers )
-{
-    const VDBManager * vdb_mgr2 = NULL;
-    VPath const * vpath1 = NULL;
-    VPath const * vpath2 = NULL;
-    VPath * vpath_new = NULL;
-    String const * spath1 = NULL;
-    String const * spath2 = NULL;
-    rc_t rc;
-    
-    rc = VFSManagerMakePath ( vfs_mgr, &vpath_new, "something_different" );
-    if ( rc != 0 )
-        FAIL( "FAIL: VFSManagerMakePath( vpath_new ) failed" );
-
-    rc = VDBManagerMakeRead( &vdb_mgr2, NULL );
-    if ( rc != 0 )
-        FAIL( "FAIL: VDBManagerMakeRead( &vdb_mgr2 ) failed" );
-
-    rc = VDBManagerSetCacheRoot( vdb_mgr2, vpath_new );
-    if ( rc != 0 )
-        FAIL( "FAIL: VDBManagerSetCacheRoot( vdb_mgr, vpath_new ) failed" );
-
-    rc = VDBManagerGetCacheRoot( vdb_mgr, &vpath1 );
-    if ( rc != 0 )
-        FAIL( "FAIL: VDBManagerGetCacheRoot( vdb_mgr, &vpath1 ) failed" );
-
-    rc = VDBManagerGetCacheRoot( vdb_mgr2, &vpath2 );
-    if ( rc != 0 )
-        FAIL( "FAIL: VDBManagerGetCacheRoot( vdb_mgr1, &vpath2 ) failed" );
-
-    rc = VPathMakeString ( vpath1, &spath1 );
-    if ( rc != 0 )
-        FAIL( "FAIL: VPathMakeString( vpath1, &spath1 ) failed" );
-
-    rc = VPathMakeString ( vpath2, &spath2 );
-    if ( rc != 0 )
-        FAIL( "FAIL: VPathMakeString( vpath2, &spath2 ) failed" );
-
-    std::string s1 = std::string( spath1->addr, spath1->size );
-    std::string s2 = std::string( spath2->addr, spath2->size );
-    if ( s1 != s2 )
-        FAIL( "FAIL: cache-root values do not match" );
-    else
-        std::cout << "cache-root values are the same" << std::endl;
-        
-    if ( spath1 != NULL ) StringWhack( spath1 );
-    if ( spath2 != NULL ) StringWhack( spath2 );
-    if ( vpath_new != NULL ) VPathRelease( vpath_new );    
-    if ( vpath1 != NULL ) VPathRelease( vpath1 );
-    if ( vpath2 != NULL ) VPathRelease( vpath2 );
-    if ( vdb_mgr2 != NULL ) VDBManagerRelease ( vdb_mgr2 );
-}
-
-char * org_home;
-const char HomeSub[] = "test_root_history";
-char new_home[ 1024 ];
-char new_home_buffer[ 1024 ]; /* buffer for putenv has to stay alive! */
-
-
-rc_t write_root( KConfig *cfg, const char * base, const char * cat, const char * sub_cat )
-{
-    char key[ 256 ];
-    size_t num_writ;
-    rc_t rc = string_printf ( key, sizeof key, &num_writ, "/repository/user/%s/%s/root", cat, sub_cat );
-    if ( rc == 0 )
-    {
-        char value[ 256 ];
-        rc = string_printf ( value, sizeof value, &num_writ, "%s/ncbi/%s", base, sub_cat );
-        if ( rc == 0 )
-            rc = KConfigWriteString( cfg, key, value );
-    }
-    return rc;
-}
-
-
-rc_t write_dflt_path( KConfig *cfg, const char * base )
-{
-    char value[ 256 ];
-    size_t num_writ;
-    rc_t rc = string_printf ( value, sizeof value, &num_writ, "%s/ncbi", base );
-    if ( rc == 0 )
-        rc = KConfigWriteString( cfg, "/repository/user/default-path", value );
-    return rc;
-}
-
-rc_t create_test_config( const char * base )
-{
-    KConfig *cfg;
-    rc_t rc = KConfigMake ( &cfg, NULL );
-    if ( rc == 0 )
-    {
-        rc = write_root( cfg, base, "main", "public" );
-        if ( rc == 0 )
-            rc = write_root( cfg, base, "protected", "dbGaP-2956" );
-        if ( rc == 0 )
-            rc = write_root( cfg, base, "protected", "dbGaP-4831" );
-        if ( rc == 0 )
-            rc = write_dflt_path( cfg, base );
-        if ( rc == 0 )
-            rc = KConfigCommit ( cfg );
-        KConfigRelease ( cfg );
-    }
-    return rc;
-}
-
-rc_t prepare_test( const char * sub )
-{
-    org_home = getenv( "HOME" );
-    size_t num_writ;
-    rc_t rc = string_printf ( new_home, sizeof new_home, &num_writ, "%s/%s", org_home, sub );
-    if ( rc == 0 )
-        rc = string_printf ( new_home_buffer, sizeof new_home_buffer, &num_writ, "HOME=%s", new_home );
-    if ( rc == 0 )
-        rc = putenv( new_home_buffer );
-    if ( rc == 0 )
-        rc = create_test_config( org_home );
-    return rc;
-}
-
-void finish_test()
-{
-    /* clear the temp. home-directory */
-    KDirectory * dir;
-    rc_t rc = KDirectoryNativeDir( &dir );
-    if ( rc == 0 )
-    {
-        rc = KDirectoryRemove( dir, true, "%s/%s", org_home, HomeSub );
-        KDirectoryRelease( dir );
-    }
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void ) { return 0x1000000; }
-rc_t CC UsageSummary ( const char * progname ) { return 0; }
-rc_t CC Usage ( const Args * args ) { return 0; }
-const char UsageDefaultName[] = "test-VDB-3060";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t rc = prepare_test( HomeSub );
-    if ( rc == 0 )
-    {
-        rc = make_global_managers();
-        if ( rc == 0 )
-        {
-            rc = VDB_3060( argc, argv );
-            release_global_managers();
-        }
-    }
-    finish_test();
-    return rc;
-}
-
-}
diff --git a/test/vdb/test-blob-val.cpp b/test/vdb/test-blob-val.cpp
deleted file mode 100644
index 4a143de..0000000
--- a/test/vdb/test-blob-val.cpp
+++ /dev/null
@@ -1,185 +0,0 @@
-// ===========================================================================
-//
-//                            PUBLIC DOMAIN NOTICE
-//               National Center for Biotechnology Information
-//
-//  This software/database is a "United States Government Work" under the
-//  terms of the United States Copyright Act.  It was written as part of
-//  the author's official duties as a United States Government employee and
-//  thus cannot be copyrighted.  This software/database is freely available
-//  to the public for use. The National Library of Medicine and the U.S.
-//  Government have not placed any restriction on its use or reproduction.
-//
-//  Although all reasonable efforts have been taken to ensure the accuracy
-//  and reliability of the software and data, the NLM and the U.S.
-//  Government do not and cannot warrant the performance or results that
-//  may be obtained by using this software or data. The NLM and the U.S.
-//  Government disclaim all warranties, express or implied, including
-//  warranties of performance, merchantability or fitness for any particular
-//  purpose.
-//
-//  Please cite the author in any work or product based on this material.
-//
-// ===========================================================================
-
-#include <vdb/manager.h> // VDBManager
-#include <vdb/database.h> 
-#include <vdb/table.h> 
-#include <vdb/cursor.h> 
-#include <vdb/schema.h> /* VSchemaRelease */
-#include <vdb/vdb-priv.h>
-
-extern "C" {
-    #include <../libs/vdb/table-priv.h>
-}
-
-#include <kdb/meta.h>
-#include <kdb/table.h>
-
-#include <klib/rc.h>
-
-#include <ktst/unit_test.hpp> // TEST_CASE
-
-#include <sysalloc.h>
-
-#include <sstream>
-#include <cstdlib>
-
-using namespace std;
-
-TEST_SUITE( BlobValidationTestSuite )
-
-class VDB_Fixture
-{
-public:
-    VDB_Fixture()
-    : m_rdb(NULL)
-    {
-        THROW_ON_RC ( KDirectoryNativeDir ( & m_wd ) );
-        THROW_ON_RC ( VDBManagerMakeRead ( & m_mgr, m_wd ) );
-    }
-    ~VDB_Fixture()
-    {
-        VDBManagerRelease ( m_mgr );
-        KDirectoryRelease ( m_wd );
-    }
-
-    const VCursor* OpenSequenceTblCursor ()
-    {
-        assert ( m_rdb == NULL );
-
-        // MakeDatabase
-        {
-            const VDBManager* mgr;
-            THROW_ON_RC ( VDBManagerMakeRead ( & mgr, NULL ) );
-
-            THROW_ON_RC ( VDBManagerOpenDBRead ( mgr,
-                                              & m_rdb,
-                                              NULL,
-                                              "%s",
-                                              m_databaseName . c_str () ) );
-            THROW_ON_RC ( VDBManagerRelease ( mgr ) );
-        }
-
-        // MakeCursor
-        const VCursor* cursor;
-        {
-            THROW_ON_RC ( VDatabaseOpenTableRead( m_rdb, & m_tbl, "%s", "SEQUENCE" ) );
-            THROW_ON_RC ( VTableCreateCursorRead ( m_tbl, & cursor ) );
-
-        }
-
-        return cursor;
-    }
-
-    void Release ( const VCursor* cursor )
-    {
-        THROW_ON_RC ( VCursorRelease ( cursor ) );
-        THROW_ON_RC ( VTableRelease ( m_tbl ) );
-        THROW_ON_RC ( VDatabaseRelease ( m_rdb ) );
-        m_rdb = NULL;
-    }
-
-
-    KDirectory* m_wd;
-
-    const VDBManager* m_mgr;
-    string m_databaseName;
-
-    const VDatabase* m_rdb;
-    const VTable* m_tbl;
-};
-
-FIXTURE_TEST_CASE ( BlobValidationDisabled, VDB_Fixture)
-{
-    m_databaseName = "./db/blob_val_inv_chsum.sra";
-
-    uint32_t columnIdx;
-    uint32_t elem_bits;
-    const uint32_t *col_data;
-    uint32_t boff;
-    uint32_t row_len;
-    const VCursor * cursor;
-    // open cursor, disable validation, make sure we can read data
-    cursor = OpenSequenceTblCursor();
-    REQUIRE_RC ( VCursorAddColumn ( cursor, & columnIdx, "READ_LEN" ) );
-    REQUIRE_RC ( VCursorOpen ( cursor ) );
-    ((VTable*)m_tbl)->blob_validation = false;
-    REQUIRE_RC ( VCursorCellDataDirect ( cursor, 1, columnIdx, &elem_bits, (const void**)&col_data, &boff, &row_len ) );
-    REQUIRE_EQ ( (int)row_len, 2 );
-    REQUIRE_EQ ( (int)col_data[0], 60 );
-    REQUIRE_EQ ( (int)col_data[1], 50 );
-    Release ( cursor );
-}
-
-FIXTURE_TEST_CASE ( BlobValidationEnabled, VDB_Fixture)
-{
-    m_databaseName = "./db/blob_val_inv_chsum.sra";
-
-    uint32_t columnIdx;
-    uint32_t elem_bits;
-    const uint32_t *col_data;
-    uint32_t boff;
-    uint32_t row_len;
-    const VCursor * cursor;
-    // open cursor, enable validation, make sure error is thrown, because blob checksum is set to 0
-    cursor = OpenSequenceTblCursor();
-    REQUIRE_RC ( VCursorAddColumn ( cursor, & columnIdx, "READ_LEN" ) );
-    REQUIRE_RC ( VCursorOpen ( cursor ) );
-    ((VTable*)m_tbl)->blob_validation = true;
-    REQUIRE_RC_FAIL ( VCursorCellDataDirect ( cursor, 1, columnIdx, &elem_bits, (const void**)&col_data, &boff, &row_len ) );
-    Release ( cursor );
-}
-
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h> 
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-blob-val";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=BlobValidationTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/vdb/test-dependencies.cpp b/test/vdb/test-dependencies.cpp
deleted file mode 100644
index 3ea7c30..0000000
--- a/test/vdb/test-dependencies.cpp
+++ /dev/null
@@ -1,452 +0,0 @@
-#include <ktst/unit_test.hpp> // TEST_SUITE
-
-#include <kapp/args.h> // KAppVersion
-
-#include <klib/debug.h>
-
-#include <vdb/vdb-priv.h> // VDBManagerMakeReadWithVFSManager
-#include <vdb/manager.h> // VDBManager
-#include <vdb/database.h> /* VDatabase */
-#include <vdb/dependencies.h> /* VDBDependencies */
-#include <vdb/schema.h> /* VSchema */
-
-#include <kfg/config.h> // KConfigDisableUserSettings
-
-#include <vfs/manager.h> // VFSManager
-#include <vfs/manager-priv.h> // VFSManagerGetConfig
-#include <vfs/resolver.h> // VResolverRelease
-#include <vfs/path.h> // VPathMake
-
-#include <kfs/file.h> // KFileRelease
-
-#include <sra/sraschema.h>
-
-#include <sysalloc.h>
-
-#include <stdlib.h> // free
-
-#include <stdio.h> // puts
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 != 0 && rc == 0) { rc = rc2; } obj = NULL; } while (false)
-
-class DepFixture {
-    rc_t StringRelease(String *self) {
-        free(self);
-        return 0;
-    }
-protected:
-    DepFixture(const char *path)
-        : mgr(NULL)
-        , vmgr(NULL)
-        , resolver(NULL)
-        , siteless(false)
-    {
-        rc_t rc = 0;
-
-        KDirectory *wd = NULL;
-        if (KDirectoryNativeDir(&wd)) {
-            FAIL("failed to KDirectoryNativeDir");
-        }
-
-        const KDirectory *dir = NULL;
-        KConfig *cfg = NULL;
-
-        if (KDirectoryOpenDirRead(wd, &dir, false, path)) {
-            FAIL("failed to KDirectoryOpenDirRead()");
-        }
-        if (KConfigMake(&cfg, dir)) {
-            FAIL("failed to KConfigMake()");
-        }
-        RELEASE(KDirectory, dir);
-        if (VFSManagerMakeFromKfg(&vmgr, cfg)) {
-            FAIL("failed to VFSManagerMakeFromKfg()");
-        }
-        if (VFSManagerGetResolver(vmgr, &resolver)) {
-            FAIL("failed to VFSManagerGetResolver");
-        }
-
-        String *result = NULL;
-        rc = KConfigReadString(cfg, "repository/site/main/tracearc/root",
-            &result);
-        if (rc != 0) {
-            if (rc == SILENT_RC(rcKFG, rcNode, rcOpening, rcPath, rcNotFound)) {
-                rc = 0;
-                siteless = true;
-            }
-            else {
-                FAIL(
-              "failed to KConfigReadString(repository/site/main/tracearc/root)");
-            }
-        }
-        else {
-            assert(result);
-            KPathType t = KDirectoryPathType(wd, result->addr);
-            if (t != kptDir) {
-                siteless = true;
-            }
-        }
-        RELEASE(String, result);
-
-        RELEASE(KConfig, cfg);
-        if (VDBManagerMakeReadWithVFSManager(&mgr, NULL, vmgr)) {
-            FAIL("failed to VDBManagerMakeReadWithVFSManager()");
-        }
-
-        RELEASE(KDirectory, wd);
-    }
-
-    ~DepFixture(void) {
-        rc_t rc = 0;
-        RELEASE(VResolver, resolver);
-        RELEASE(VDBManager, mgr);
-        RELEASE(VFSManager, vmgr);
-    }
-public:
-    const VDBManager *mgr;
-    VFSManager *vmgr;
-    VResolver *resolver;
-    bool siteless;
-};
-class EmptyFixture : public DepFixture {
-public:
-    EmptyFixture() : DepFixture("kfg/empty") {}
-};
-
-class RefseqFixture : public DepFixture {
-
-  #if LINUX
-    #define PATH "kfg/linux"
-  #elif MAC
-    #define PATH "kfg/mac"
-  #elif WINDOWS
-    #define PATH "kfg/win"
-  #endif
-
-public:
-    RefseqFixture() : DepFixture(PATH) {}
-};
-
-static rc_t argsHandler(int argc, char* argv[]);
-TEST_SUITE_WITH_ARGS_HANDLER(TestDependenciesSuite, argsHandler);
-
-FIXTURE_TEST_CASE(TestNoDeps, RefseqFixture) {
-    if (siteless) {
-        TEST_MESSAGE("Test skipped because site repository does not exist");
-        return;
-    }
-
-    rc_t rc = 0;
-
-    const VDatabase *db = NULL;
-    const char SRR600096[] = "SRR600096";
-    REQUIRE_RC(VDBManagerOpenDBRead(mgr, &db, NULL, SRR600096));
-    RELEASE(VDatabase, db);
-
-    VPath* acc = NULL;
-    REQUIRE_RC(VFSManagerMakePath(vmgr, &acc, SRR600096));
-    const VPath *local = NULL;
-    REQUIRE_RC(VResolverLocal(resolver, acc, &local));
-    RELEASE(VPath, acc);
-    const String *s = NULL;
-    REQUIRE_RC(VPathMakeString(local, &s));
-    REQUIRE(s && s->addr);
-
-    REQUIRE_RC(VDBManagerOpenDBRead(mgr, &db, NULL, s->addr));
-
-    const VDBDependencies *dep = NULL;
-
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, true));
-    uint32_t count = 1;
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)0);
-    RELEASE(VDBDependencies, dep);
-
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, false));
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)0);
-    RELEASE(VDBDependencies, dep);
-
-    RELEASE(VDatabase, db);
-    free(const_cast<String*>(s));
-    RELEASE(VPath, local);
-}
-
-FIXTURE_TEST_CASE(Test1NoDep, EmptyFixture) {
-    rc_t rc = 0;
-
-    const char SRR619505[] = "SRR619505";
-
-    VPath *acc = NULL;
-    REQUIRE_RC(VFSManagerMakePath(vmgr, &acc, SRR619505));
-    const VPath *local = NULL;
-    REQUIRE_RC_FAIL(VResolverLocal(resolver, acc, &local));
-    RELEASE(VPath, acc);
-
-    const VDatabase *db = NULL;
-    REQUIRE_RC(VDBManagerOpenDBRead(mgr, &db, NULL, SRR619505));
-
-    const VDBDependencies *dep = NULL;
-
-    //                                             missing
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, true));
-    uint32_t count = 1;
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)1);
-    RELEASE(VDBDependencies, dep);
-
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, false));
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)1);
-    RELEASE(VDBDependencies, dep);
-
-    RELEASE(VDatabase, db);
-    RELEASE(VPath, local);
-}
-
-FIXTURE_TEST_CASE(TestManyNoDep, EmptyFixture) {
-    rc_t rc = 0;
-
-    const char SRR543323[] = "SRR543323";
-
-    VPath* acc = NULL;
-    REQUIRE_RC(VFSManagerMakePath(vmgr, &acc, SRR543323));
-    const VPath *local = NULL;
-    REQUIRE_RC_FAIL(VResolverLocal(resolver, acc, &local));
-    RELEASE(VPath, acc);
-
-	struct VSchema *schema;
-	REQUIRE_RC(VDBManagerMakeSRASchema(mgr, &schema));
-
-    const VDatabase *db = NULL;
-    REQUIRE_RC(VDBManagerOpenDBRead(mgr, &db, schema, SRR543323));
-    REQUIRE_RC(VSchemaRelease(schema));
-
-    const VDBDependencies *dep = NULL;
-
-    //                                             missing
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, true));
-    uint32_t count = 1;
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)21);
-    RELEASE(VDBDependencies, dep);
-
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, false));
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)21);
-    RELEASE(VDBDependencies, dep);
-
-    RELEASE(VDatabase, db);
-    RELEASE(VPath, local);
-}
-
-FIXTURE_TEST_CASE(TestDoubleNoDep, EmptyFixture) {
-    rc_t rc = 0;
-
-    const char SRR353827[] = "SRR353827";
-
-    VPath* acc = NULL;
-    REQUIRE_RC(VFSManagerMakePath(vmgr, &acc, SRR353827));
-    const VPath *local = NULL;
-    REQUIRE_RC_FAIL(VResolverLocal(resolver, acc, &local));
-    RELEASE(VPath, acc);
-
-    const VDatabase *db = NULL;
-    REQUIRE_RC(VDBManagerOpenDBRead(mgr, &db, NULL, SRR353827));
-
-    const VDBDependencies *dep = NULL;
-
-    //                                             missing
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, true));
-    uint32_t count = 1;
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)1);
-    RELEASE(VDBDependencies, dep);
-
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, false));
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)2);
-    RELEASE(VDBDependencies, dep);
-
-    RELEASE(VDatabase, db);
-    RELEASE(VPath, local);
-}
-
-FIXTURE_TEST_CASE(TestDoubleYesDep, RefseqFixture) {
-    if (siteless) {
-        TEST_MESSAGE("Test skipped because site repository does not exist");
-        return;
-    }
-
-    rc_t rc = 0;
-
-    const VDatabase *db = NULL;
-    const char SRR353827[] = "SRR353827";
-    REQUIRE_RC(VDBManagerOpenDBRead(mgr, &db, NULL, SRR353827));
-    RELEASE(VDatabase, db);
-
-    VPath* acc = NULL;
-    REQUIRE_RC(VFSManagerMakePath(vmgr, &acc, SRR353827));
-    const VPath *local = NULL;
-    REQUIRE_RC(VResolverLocal(resolver, acc, &local));
-    RELEASE(VPath, acc);
-    const String *s = NULL;
-    REQUIRE_RC(VPathMakeString(local, &s));
-    REQUIRE(s && s->addr);
-
-    REQUIRE_RC(VDBManagerOpenDBRead(mgr, &db, NULL, s->addr));
-
-    const VDBDependencies *dep = NULL;
-
-    //                                             missing
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, true));
-    uint32_t count = 1;
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)0);
-    RELEASE(VDBDependencies, dep);
-
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, false));
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)2);
-    RELEASE(VDBDependencies, dep);
-
-    RELEASE(VDatabase, db);
-    free(const_cast<String*>(s));
-    RELEASE(VPath, local);
-}
-
-FIXTURE_TEST_CASE(TestManyYesDep, RefseqFixture) {
-    if (siteless) {
-        TEST_MESSAGE("Test skipped because site repository does not exist");
-        return;
-    }
-
-    rc_t rc = 0;
-
-    const VDatabase *db = NULL;
-    const char SRR543323[] = "SRR543323";
-    REQUIRE_RC(VDBManagerOpenDBRead(mgr, &db, NULL, SRR543323));
-    RELEASE(VDatabase, db);
-
-    VPath* acc = NULL;
-    REQUIRE_RC(VFSManagerMakePath(vmgr, &acc, SRR543323));
-    const VPath *local = NULL;
-    REQUIRE_RC(VResolverLocal(resolver, acc, &local));
-    RELEASE(VPath, acc);
-    const String *s = NULL;
-    REQUIRE_RC(VPathMakeString(local, &s));
-    REQUIRE(s && s->addr);
-
-    REQUIRE_RC(VDBManagerOpenDBRead(mgr, &db, NULL, s->addr));
-
-    const VDBDependencies *dep = NULL;
-
-    //                                             missing
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, true));
-    uint32_t count = 1;
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)0);
-    RELEASE(VDBDependencies, dep);
-
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, false));
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)21);
-    RELEASE(VDBDependencies, dep);
-
-    RELEASE(VDatabase, db);
-    free(const_cast<String*>(s));
-    RELEASE(VPath, local);
-}
-
-FIXTURE_TEST_CASE(Test1YesDep, RefseqFixture) {
-    if (siteless) {
-        TEST_MESSAGE("Test skipped because site repository does not exist");
-        return;
-    }
-
-    rc_t rc = 0;
-
-    const VDatabase *db = NULL;
-    const char SRR619505[] = "SRR619505";
-    REQUIRE_RC(VDBManagerOpenDBRead(mgr, &db, NULL, SRR619505));
-    RELEASE(VDatabase, db);
-
-    VPath* acc = NULL;
-    REQUIRE_RC(VFSManagerMakePath(vmgr, &acc, SRR619505));
-    const VPath *local = NULL;
-    REQUIRE_RC(VResolverLocal(resolver, acc, &local));
-    RELEASE(VPath, acc);
-    const String *s = NULL;
-    REQUIRE_RC(VPathMakeString(local, &s));
-    REQUIRE(s && s->addr);
-
-    REQUIRE_RC(VDBManagerOpenDBRead(mgr, &db, NULL, s->addr));
-
-    const VDBDependencies *dep = NULL;
-
-    //                                             missing
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, true));
-    uint32_t count = 1;
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)0);
-    RELEASE(VDBDependencies, dep);
-
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, false));
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)1);
-    RELEASE(VDBDependencies, dep);
-
-    RELEASE(VDatabase, db);
-    free(const_cast<String*>(s));
-    RELEASE(VPath, local);
-}
-
-FIXTURE_TEST_CASE(Test1LocalDep, EmptyFixture) {
-    rc_t rc = 0;
-
-    const char SRR413283[] = "SRR413283";
-
-    VPath* acc = NULL;
-    REQUIRE_RC(VFSManagerMakePath(vmgr, &acc, SRR413283));
-    const VPath *local = NULL;
-    REQUIRE_RC_FAIL(VResolverLocal(resolver, acc, &local));
-    RELEASE(VPath, acc);
-
-    const VDatabase *db = NULL;
-    REQUIRE_RC(VDBManagerOpenDBRead(mgr, &db, NULL, SRR413283));
-
-    const VDBDependencies *dep = NULL;
-
-    //                                             missing
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, true));
-    uint32_t count = 1;
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)0);
-    RELEASE(VDBDependencies, dep);
-
-    REQUIRE_RC(VDatabaseListDependencies(db, &dep, false));
-    REQUIRE_RC(VDBDependenciesCount(dep, &count));
-    CHECK_EQUAL(count, (uint32_t)1);
-    RELEASE(VDBDependencies, dep);
-
-    RELEASE(VDatabase, db);
-    RELEASE(VPath, local);
-}
-
-static rc_t argsHandler(int argc, char* argv[]) {
-    Args* args = NULL;
-    rc_t rc = ArgsMakeAndHandle(&args, argc, argv, 0, NULL, 0);
-    ArgsWhack(args);
-    return rc;
-}
-
-extern "C" {
-    ver_t CC KAppVersion(void) { return 0x1000000; }
-    const char UsageDefaultName[] = "test-dependencies";
-    rc_t CC UsageSummary(const char *progname) { return 0; }
-    rc_t CC Usage(const Args *args) { return 0; }
-    rc_t CC KMain(int argc, char *argv[]) {
-        KConfigDisableUserSettings();
-        return TestDependenciesSuite(argc, argv);
-    }
-}
diff --git a/test/vdb/test-sparse-col.cpp b/test/vdb/test-sparse-col.cpp
deleted file mode 100644
index f1858d6..0000000
--- a/test/vdb/test-sparse-col.cpp
+++ /dev/null
@@ -1,358 +0,0 @@
-// ===========================================================================
-//
-//                            PUBLIC DOMAIN NOTICE
-//               National Center for Biotechnology Information
-//
-//  This software/database is a "United States Government Work" under the
-//  terms of the United States Copyright Act.  It was written as part of
-//  the author's official duties as a United States Government employee and
-//  thus cannot be copyrighted.  This software/database is freely available
-//  to the public for use. The National Library of Medicine and the U.S.
-//  Government have not placed any restriction on its use or reproduction.
-//
-//  Although all reasonable efforts have been taken to ensure the accuracy
-//  and reliability of the software and data, the NLM and the U.S.
-//  Government do not and cannot warrant the performance or results that
-//  may be obtained by using this software or data. The NLM and the U.S.
-//  Government disclaim all warranties, express or implied, including
-//  warranties of performance, merchantability or fitness for any particular
-//  purpose.
-//
-//  Please cite the author in any work or product based on this material.
-//
-// ===========================================================================
-
-#include <vdb/manager.h> // VDBManager
-#include <vdb/database.h> 
-#include <vdb/table.h> 
-#include <vdb/cursor.h> 
-#include <vdb/schema.h> /* VSchemaRelease */
-#include <vdb/vdb-priv.h>
-
-#include <sra/sraschema.h> // VDBManagerMakeSRASchema
-
-#include <kdb/meta.h>
-#include <kdb/table.h>
-
-#include <klib/rc.h>
-
-#include <ktst/unit_test.hpp> // TEST_CASE
-
-#include <sysalloc.h>
-
-#include <sstream>
-#include <cstdlib>
-
-using namespace std;
-
-/*
- * We will compile this test file first in read/write mode, create DB and
- * run tests using libncbi-wvdb library; then compile it again, but with -DREAD_ONLY
- * and link it against read-only lincbi-vdb library and run tests
- *
- * NB: rw mode test creates DB, rd mode deletes it.
- */
-
-TEST_SUITE( SparseColTestSuite )
-
-const string ScratchDir = "./db/";
-
-class VDB_Fixture
-{
-public:
-    VDB_Fixture()
-#if !READ_ONLY
-    : m_wdb(NULL), m_rdb(NULL)
-#else
-    : m_rdb(NULL)
-#endif
-    {
-        THROW_ON_RC ( KDirectoryNativeDir ( & m_wd ) );
-#if !READ_ONLY
-        THROW_ON_RC ( VDBManagerMakeUpdate ( & m_mgr, m_wd ) );
-#else
-        THROW_ON_RC ( VDBManagerMakeRead ( & m_mgr, m_wd ) );
-#endif
-    }
-    ~VDB_Fixture()
-    {
-#if READ_ONLY
-        RemoveDatabase ();
-#endif
-        VDBManagerRelease ( m_mgr );
-        KDirectoryRelease ( m_wd );
-    }
-    void RemoveDatabase()
-    {   
-        if ( ! m_databaseName . empty () )
-        {
-            KDirectoryRemove ( m_wd, true, m_databaseName . c_str () );
-        }
-    }
-    
-#if !READ_ONLY
-    VCursor* CreateDatabase()
-    {
-        const string schemaText =
-        "table t1 #1\n"
-        "{\n"
-        "    column ascii COL1;\n"
-        "    column ascii COL2;\n"
-        "};\n"
-
-        "database db #1\n"
-        "{\n"
-        "    table t1 #1 T1;\n"
-        "};\n"
-        ;
-        const char * schemaSpec = "db";
-
-        assert ( m_wdb == NULL );
-
-        // MakeDatabase
-        {
-            VDBManager* mgr;
-            THROW_ON_RC ( VDBManagerMakeUpdate ( & mgr, NULL ) );
-            VSchema* schema;
-            THROW_ON_RC ( VDBManagerMakeSchema ( mgr, & schema ) );
-            THROW_ON_RC ( VSchemaParseText(schema, NULL, schemaText . c_str(), schemaText . size () ) );
-
-            THROW_ON_RC ( VDBManagerCreateDB ( mgr,
-                                              & m_wdb,
-                                              schema,
-                                              schemaSpec,
-                                              kcmInit + kcmMD5,
-                                              "%s",
-                                              m_databaseName . c_str () ) );
-            THROW_ON_RC ( VSchemaRelease ( schema ) );
-            THROW_ON_RC ( VDBManagerRelease ( mgr ) );
-        }
-
-        // MakeCursor
-        VCursor* cursor;
-        {
-            VTable* table;
-            THROW_ON_RC ( VDatabaseCreateTable ( m_wdb, & table, "T1", kcmCreate | kcmMD5, "%s", "T1" ) );
-            THROW_ON_RC ( VTableCreateCursorWrite ( table, & cursor, kcmInsert ) );
-            THROW_ON_RC ( VTableRelease ( table ) );
-        }
-
-        return cursor;
-    }
-
-    void CommitDatabase ( VCursor * cursor )
-    {
-        assert ( m_wdb != NULL );
-
-        THROW_ON_RC ( VCursorCommit ( cursor ) );    // this returns rcVDB,rcBlob,rcValidating,rcBlob,rcCorrupt if the schema does not support
-                                                        // writing to the LABEL column from the code
-        THROW_ON_RC ( VCursorRelease ( cursor ) );
-
-        THROW_ON_RC ( VDatabaseRelease ( m_wdb ) );
-
-        m_wdb = NULL;
-    }
-
-    void WriteRow ( VCursor * cursor, uint32_t column_idx, int64_t row_id, std::string data )
-    {
-        THROW_ON_RC ( VCursorSetRowId ( cursor, row_id ) );
-        THROW_ON_RC ( VCursorOpenRow ( cursor ) );
-        THROW_ON_RC ( VCursorWrite ( cursor, column_idx, 8, data.c_str(), 0, data.size() ) );
-        THROW_ON_RC ( VCursorCommitRow ( cursor ) );
-        THROW_ON_RC ( VCursorCloseRow ( cursor ) );
-        THROW_ON_RC ( VCursorFlushPage ( cursor ) );
-    }
-#endif
-
-    const VCursor* OpenDatabaseRead ()
-    {
-        assert ( m_rdb == NULL );
-
-        // MakeDatabase
-        {
-#if !READ_ONLY
-            VDBManager* mgr;
-            THROW_ON_RC ( VDBManagerMakeUpdate ( & mgr, NULL ) );
-#else
-            const VDBManager* mgr;
-            THROW_ON_RC ( VDBManagerMakeRead ( & mgr, NULL ) );
-#endif
-
-            THROW_ON_RC ( VDBManagerOpenDBRead ( mgr,
-                                              & m_rdb,
-                                              NULL,
-                                              "%s",
-                                              m_databaseName . c_str () ) );
-            THROW_ON_RC ( VDBManagerRelease ( mgr ) );
-        }
-
-        // MakeCursor
-        const VCursor* cursor;
-        {
-            const VTable* table;
-            THROW_ON_RC ( VDatabaseOpenTableRead( m_rdb, & table, "%s", "T1" ) );
-            THROW_ON_RC ( VTableCreateCursorRead ( table, & cursor ) );
-            THROW_ON_RC ( VTableRelease ( table ) );
-        }
-
-        return cursor;
-    }
-
-    void ReleaseDatabase ( const VCursor* cursor )
-    {
-        THROW_ON_RC ( VCursorRelease ( cursor ) );
-
-        THROW_ON_RC ( VDatabaseRelease ( m_rdb ) );
-    }
-
-#if !READ_ONLY
-    void WriteColumn ( int64_t rows[], int rows_size, const char * col, bool static_col )
-    {
-        uint32_t columnIdx;
-        RemoveDatabase();
-
-        VCursor * wcursor = CreateDatabase();
-
-        // AddColumns
-        THROW_ON_RC ( VCursorAddColumn ( wcursor, & columnIdx, "%s", col ) );
-        THROW_ON_RC ( VCursorOpen ( wcursor ) );
-
-        for ( int i = 0; i < rows_size; ++i)
-        {
-            int64_t row_id = rows[i];
-            ostringstream out;
-            out << row_id;
-
-            WriteRow ( wcursor, columnIdx, row_id, static_col ? "abcd" : out.str() );
-        }
-
-        CommitDatabase(wcursor);
-    }
-#endif
-
-    void RunChecks ( int64_t rows[], int rows_size, const char * col )
-    {
-        uint32_t columnIdx;
-        const VCursor * rcursor = OpenDatabaseRead();
-        THROW_ON_RC ( VCursorAddColumn ( rcursor, & columnIdx, "%s", col ) );
-        THROW_ON_RC ( VCursorOpen ( rcursor ) );
-
-        int64_t row_id;
-        THROW_ON_RC ( VCursorRowId ( rcursor, &row_id ) );
-        if ( rows[0] != row_id )
-            FAIL("rows[i] != row_id");
-
-        for ( int i = 1; i < rows_size; ++i) {
-            THROW_ON_RC ( VCursorFindNextRowId ( rcursor, 0, &row_id ) );
-            if ( rows[i] != row_id )
-                FAIL("rows[i] != row_id");
-
-            THROW_ON_RC ( VCursorRowId ( rcursor, &row_id ) );
-
-            THROW_ON_RC ( VCursorFindNextRowIdDirect ( rcursor, 0, row_id + 1, &row_id ) );
-            if ( rows[i] != row_id )
-                FAIL("rows[i] != row_id");
-
-            THROW_ON_RC ( VCursorSetRowId ( rcursor, row_id ) );
-        }
-        ReleaseDatabase(rcursor);
-    }
-
-
-
-
-    KDirectory* m_wd;
-
-#if READ_ONLY
-    const
-#endif
-    VDBManager* m_mgr;
-    string m_databaseName;
-
-#if !READ_ONLY
-    VDatabase* m_wdb;
-#endif
-    const VDatabase* m_rdb;
-};
-
-FIXTURE_TEST_CASE ( SparseColNormal, VDB_Fixture)
-{
-    int64_t rows[] = { 3, 4, 5, 100, 1000000 };
-    int rows_size = sizeof rows / sizeof rows[0];
-
-    m_databaseName = ScratchDir + GetName();
-
-#if !READ_ONLY
-    WriteColumn ( rows, rows_size, "COL1", false );
-#endif
-
-    RunChecks ( rows, rows_size, "COL1" );
-}
-
-FIXTURE_TEST_CASE ( SparseColStatic, VDB_Fixture)
-{
-    int64_t rows[] = { 2, 3, 4, 5 };
-    int rows_size = sizeof rows / sizeof rows[0];
-
-    m_databaseName = ScratchDir + GetName();
-
-#if !READ_ONLY
-    WriteColumn ( rows, rows_size, "COL1", true );
-#endif
-
-    RunChecks ( rows, rows_size, "COL1" );
-}
-
-FIXTURE_TEST_CASE ( SparseColEmpty, VDB_Fixture)
-{
-    m_databaseName = ScratchDir + GetName();
-
-#if !READ_ONLY
-    int64_t rows[] = { 2, 3, 4, 5 };
-    int rows_size = sizeof rows / sizeof rows[0];
-
-    WriteColumn ( rows, rows_size, "COL1", true );
-#endif
-
-    const VCursor * rcursor = OpenDatabaseRead();
-    REQUIRE_RC ( VCursorOpen ( rcursor ) );
-
-    rc_t rc;
-    int64_t row_id;
-    rc = VCursorFindNextRowId ( rcursor, 0, &row_id );
-    if ( rc == 0 || GetRCState ( rc ) != rcEmpty || GetRCObject ( rc ) != rcCursor )
-        FAIL("expected to fail with rcCursor rcNotFound");
-}
-
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h> 
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-sparse-col";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=SparseColTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/vdb/test-vdb.cpp b/test/vdb/test-vdb.cpp
deleted file mode 100644
index ade9640..0000000
--- a/test/vdb/test-vdb.cpp
+++ /dev/null
@@ -1,624 +0,0 @@
-// ===========================================================================
-//
-//                            PUBLIC DOMAIN NOTICE
-//               National Center for Biotechnology Information
-//
-//  This software/database is a "United States Government Work" under the
-//  terms of the United States Copyright Act.  It was written as part of
-//  the author's official duties as a United States Government employee and
-//  thus cannot be copyrighted.  This software/database is freely available
-//  to the public for use. The National Library of Medicine and the U.S.
-//  Government have not placed any restriction on its use or reproduction.
-//
-//  Although all reasonable efforts have been taken to ensure the accuracy
-//  and reliability of the software and data, the NLM and the U.S.
-//  Government do not and cannot warrant the performance or results that
-//  may be obtained by using this software or data. The NLM and the U.S.
-//  Government disclaim all warranties, express or implied, including
-//  warranties of performance, merchantability or fitness for any particular
-//  purpose.
-//
-//  Please cite the author in any work or product based on this material.
-//
-// ===========================================================================
-
-#include <vdb/manager.h> // VDBManager
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/blob.h>
-#include <vdb/vdb-priv.h>
-#include <vdb/blob.h>
-#include <sra/sraschema.h> // VDBManagerMakeSRASchema
-#include <vdb/schema.h> /* VSchemaRelease */
-
-extern "C" {
-    #include <../libs/vdb/blob-priv.h>
-    #include <../libs/vdb/page-map.h>
-}
-
-#include <ktst/unit_test.hpp> // TEST_CASE
-#include <kfg/config.h>
-
-#include <sysalloc.h>
-#include <cstdlib>
-#include <stdexcept>
-
-using namespace std;
-
-TEST_SUITE( VdbTestSuite )
-
-extern "C" rc_t VDBManagerRunPeriodicTasks(const VDBManager*);
-
-TEST_CASE( VdbMgr ) {
-    const VDBManager *mgr = NULL;
-    rc_t rc = VDBManagerMakeRead(NULL, NULL);
-    if (rc == 0)
-        FAIL( "FAIL: VDBManagerMakeRead(NULL) succeed" );
-
-    rc = VDBManagerMakeRead(&mgr, NULL);
-    if (rc != 0)
-        FAIL( "failed to make VDB manager" );
-
-    rc = VDBManagerAddRef(mgr);
-    if (rc != 0)
-        FAIL( "failed to AddRef VDB manager" );
-
-    rc = VDBManagerRelease(mgr);
-    if (rc != 0)
-        FAIL( "failed to release VDB manager" );
-
-    rc = VDBManagerVersion(mgr, NULL);
-    if (rc == 0)
-        FAIL( "FAIL: VDBManagerVersion(mgr, NULL) succeed" );
-
-    uint32_t version = 0;
-    rc = VDBManagerVersion(NULL, &version);
-    if (rc == 0)
-        FAIL( "FAIL: VDBManagerVersion(NULL) succeed" );
-
-    rc = VDBManagerVersion(mgr, &version);
-    if (rc == 0)
-        CHECK_GE( version, (uint32_t)0x2000000 );
-    else
-        FAIL( "failed to get VDB manager Version" );
-
-    rc = VDBManagerRunPeriodicTasks(NULL);
-    if (rc == 0)
-        FAIL( "FAIL: VDBManagerRunPeriodicTasks(NULL) succeed" );
-
-    rc = VDBManagerRunPeriodicTasks(mgr);
-    if (rc != 0)
-        FAIL( "failed VDBManagerRunPeriodicTasks" );
-
-    // In the following, NULL and "" are interpreted as "."
-
-    // VDBManagerAddSchemaIncludePath
-    REQUIRE_RC(VDBManagerAddSchemaIncludePath(mgr, NULL));
-    REQUIRE_RC(VDBManagerAddSchemaIncludePath(mgr, ""));
-#ifndef WINDOWS
-    REQUIRE_RC(VDBManagerAddSchemaIncludePath(mgr, "/"));
-    REQUIRE_RC(VDBManagerAddSchemaIncludePath(mgr, "/usr"));
-#else
-    REQUIRE_RC_FAIL(VDBManagerAddSchemaIncludePath(mgr, "/"));
-    REQUIRE_RC_FAIL(VDBManagerAddSchemaIncludePath(mgr, "/usr"));
-#endif
-
-    // VDBManagerAddLoadLibraryPath
-    REQUIRE_RC(VDBManagerAddLoadLibraryPath(mgr, NULL));
-    REQUIRE_RC(VDBManagerAddLoadLibraryPath(mgr, ""));
-#ifndef WINDOWS
-    REQUIRE_RC(VDBManagerAddLoadLibraryPath(mgr, "/"));
-    REQUIRE_RC(VDBManagerAddLoadLibraryPath(mgr, "/usr"));
-#else
-    REQUIRE_RC_FAIL(VDBManagerAddLoadLibraryPath(mgr, "/"));
-    REQUIRE_RC_FAIL(VDBManagerAddLoadLibraryPath(mgr, "/usr"));
-#endif
-    //
-
-    struct Test { int i; };
-    Test t;
-    t.i = 12345;
-    rc = VDBManagerGetUserData(mgr, NULL);
-    if (rc == 0)
-        FAIL( "FAIL: VDBManagerGetUserData(mgr, NULL) succeed" );
-    void *data = NULL;
-    rc = VDBManagerGetUserData(NULL, &data);
-    if (rc == 0)
-        FAIL( "FAIL: VDBManagerGetUserData(NULL) succeed" );
-    rc = VDBManagerGetUserData(mgr, &data);
-    if (rc != 0)
-        FAIL( "failed VDBManagerGetUserData" );
-    if (data != NULL)
-        FAIL( "VDBManagerGetUserData != NULL" );
-
-    rc = VDBManagerSetUserData(NULL, &t, free);
-    if (rc == 0)
-        FAIL( "FAIL: VDBManagerSetUserData(NULL) succeed" );
-    rc = VDBManagerSetUserData(mgr, &t, NULL);
-    if (rc != 0)
-        FAIL( "failed VDBManagerSetUserData" );
-    rc = VDBManagerGetUserData(mgr, &data);
-    if (rc != 0)
-        FAIL( "failed VDBManagerGetUserData after Set" );
-    if (data == NULL)
-        FAIL( "VDBManagerGetUserData == NULL after Get" );
-    else {
-        Test *r = static_cast<Test*>(data);
-        CHECK_EQUAL( r->i, 12345 );
-    }
-
-    Test *pt = static_cast<Test*>(malloc(sizeof *pt));
-    rc = VDBManagerSetUserData(mgr, pt, free);
-    if (rc != 0)
-        FAIL( "failed VDBManagerSetUserData(free)" );
-
-    //
-    rc = VDBManagerRelease(mgr);
-    if (rc != 0)
-        FAIL( "failed to release VDB manager" );
-    mgr = NULL;
-
-}
-#if 0
-//#if _ARCH_BITS != 32
-TEST_CASE(SimultaneousCursors)
-{   // SRA-1669 WGS ALWZ01 cannot open multiple cursors with SEQUENCE.CONTIG_NAME column simultaneously (Win32)
-
-    for ( int i = 0; i < 1; ++i ) {
-        const VDBManager* mgr = 0;
-        REQUIRE_RC(VDBManagerMakeRead(&mgr, 0));
-        const VDatabase* db = 0;
-        REQUIRE_RC(VDBManagerOpenDBRead(mgr, &db, 0, "ALWZ01"));
-        const VTable* table = 0;
-        REQUIRE_RC(VDatabaseOpenTableRead(db, &table, "SEQUENCE"));
-        const size_t CURSOR_CNT = 10;
-        const VCursor* cursors[CURSOR_CNT] = {};
-        for ( size_t i = 0; i < CURSOR_CNT; ++i ) {
-            const VCursor* cursor = 0;
-            REQUIRE_RC(VTableCreateCursorRead(table, &cursor));
-            cursors[i] = cursor;
-            REQUIRE_RC(VCursorPermitPostOpenAdd(cursor));
-            REQUIRE_RC(VCursorOpen(cursor));
-            uint32_t col_index;
-            REQUIRE_RC(VCursorAddColumn(cursor, &col_index, "CONTIG_NAME"));
-        }
-        for ( size_t i = 0; i < CURSOR_CNT; ++i ) {
-            REQUIRE_RC(VCursorRelease(cursors[i]));
-        }
-        REQUIRE_RC(VTableRelease(table));
-        REQUIRE_RC(VDatabaseRelease(db));
-        REQUIRE_RC(VDBManagerRelease(mgr));
-    }
-}
-#endif
-
-class VdbFixture
-{
-public:
-    VdbFixture()
-    : mgr(0), curs(0), col_idx(~0)
-    {
-        if ( VDBManagerMakeRead(&mgr, NULL) != 0 )
-            throw logic_error ( "VdbFixture: VDBManagerMakeRead failed" );
-    }
-
-    ~VdbFixture()
-    {
-        if ( mgr && VDBManagerRelease ( mgr ) != 0 )
-            throw logic_error ( "~VdbFixture: VDBManagerRelease failed" );
-        if ( curs && VCursorRelease ( curs ) != 0 )
-            throw logic_error ( "~VdbFixture: VCursorRelease failed" );
-    }
-
-    rc_t Setup( const char * acc, const char* column = "READ_LEN" )
-    {
-        const VDatabase *db = NULL;
-        rc_t rc = VDBManagerOpenDBRead ( mgr, &db, NULL, acc );
-        rc_t rc2;
-
-        const VTable *tbl = NULL;
-        if (rc == 0)
-        {
-            rc = VDatabaseOpenTableRead ( db, &tbl, "SEQUENCE" );
-        }
-        else
-        {
-            rc = VDBManagerOpenTableRead ( mgr, &tbl, NULL, acc );
-            if (rc != 0)
-            {
-                VSchema *schema = NULL;
-                rc = VDBManagerMakeSRASchema(mgr, &schema);
-                if ( rc != 0 )
-                {
-                    return rc;
-                }
-
-                rc = VDBManagerOpenTableRead ( mgr, &tbl, schema, acc );
-
-                rc2 = VSchemaRelease ( schema );
-                if ( rc == 0 )
-                    rc = rc2;
-            }
-        }
-
-        if ( rc == 0 )
-        {
-            rc = VTableCreateCursorRead(tbl, &curs);
-            if ( rc == 0 )
-            {
-                col_idx = ~0;
-                rc = VCursorAddColumn ( curs, &col_idx, column );
-                if ( rc == 0 )
-                {
-                    rc = VCursorOpen(curs);
-                }
-            }
-        }
-
-        rc2 = VTableRelease ( tbl );
-        if ( rc == 0 )
-            rc = rc2;
-
-        if ( db != NULL )
-        {
-            rc2 = VDatabaseRelease ( db );
-            if ( rc == 0 )
-               rc = rc2;
-        }
-
-        return rc;
-    }
-
-    bool CheckBlobRange ( int64_t p_rowId, int64_t p_first, uint64_t p_count )
-    {
-        THROW_ON_RC ( VCursorSetRowId ( curs, p_rowId ) );
-        THROW_ON_RC ( VCursorOpenRow ( curs ) );
-
-        struct VBlob const *blob;
-        THROW_ON_RC ( VCursorGetBlob ( curs, &blob, col_idx ) );
-
-        bool ret = true;
-
-        int64_t first;
-        uint64_t count;
-        THROW_ON_RC ( VBlobIdRange ( blob, &first, &count ) );
-        if ( p_first != first )
-        {
-            cout << "CheckBlobRange(" << p_rowId << " ) : expected first = " << p_first << ", actual = " << first << endl;
-            ret = false;
-        }
-        if ( p_count != count )
-        {
-            cout << "CheckBlobRange(" << p_rowId << " ) : expected count = " << p_count << ", actual = " << count << endl;
-            ret = false;
-        }
-
-        THROW_ON_RC ( VCursorCloseRow (curs ) );
-        THROW_ON_RC ( VBlobRelease ( (struct VBlob *) blob ) );
-        return ret;
-    }
-
-
-    const VDBManager * mgr;
-    const VCursor * curs;
-    uint32_t col_idx;
-};
-
-FIXTURE_TEST_CASE(TestCursorIsStatic_SingleRowRun1, VdbFixture)
-{
-    REQUIRE_RC ( Setup ( "SRR002749", "READ_LEN" ) );
-    bool is_static = false;
-    REQUIRE_RC ( VCursorIsStaticColumn ( curs, col_idx, &is_static) );
-    REQUIRE ( is_static );
-}
-FIXTURE_TEST_CASE(TestCursorIsStatic_VariableREAD_LEN, VdbFixture)
-{
-    REQUIRE_RC ( Setup ( "SRR050566", "READ_LEN" ) );
-    bool is_static = true;
-    REQUIRE_RC ( VCursorIsStaticColumn ( curs, col_idx, &is_static) );
-    REQUIRE ( ! is_static );
-}
-#if 0
-FIXTURE_TEST_CASE(TestCursorIsStatic_SingleRowRun2, VdbFixture)
-{
-    REQUIRE_RC ( Setup ( "SRR053325", "READ_LEN" ) );
-    bool is_static = false;
-    REQUIRE_RC ( VCursorIsStaticColumn ( curs, col_idx, &is_static) );
-    REQUIRE ( is_static );
-}
-#endif
-FIXTURE_TEST_CASE(TestCursorIsStatic_FixedREAD_LEN_MultipleRows, VdbFixture)
-{
-    REQUIRE_RC ( Setup ( "SRR125365", "READ_LEN" ) );
-    bool is_static = false;
-    REQUIRE_RC ( VCursorIsStaticColumn ( curs, col_idx, &is_static) );
-    REQUIRE ( is_static );
-}
-FIXTURE_TEST_CASE(TestCursorIsStatic_DB_FixedREAD_LEN_MultipleRows, VdbFixture)
-{
-    REQUIRE_RC ( Setup ( "SRR600096", "READ_LEN" ) );
-    bool is_static = false;
-    REQUIRE_RC ( VCursorIsStaticColumn ( curs, col_idx, &is_static) );
-    REQUIRE ( is_static );
-}
-FIXTURE_TEST_CASE(TestCursorIsStatic_DB_VariableREAD_LEN_MultipleRows, VdbFixture)
-{
-    REQUIRE_RC ( Setup ( "SRR619505", "READ_LEN" ) );
-    bool is_static = true;
-    REQUIRE_RC ( VCursorIsStaticColumn ( curs, col_idx, &is_static) );
-    REQUIRE ( ! is_static );
-}
-
-/////////////////// VBlob
-
-FIXTURE_TEST_CASE(VCursor_GetBlob_SRA, VdbFixture)
-{   // multiple fragments per row (some are technical), multiple rows per blob
-    REQUIRE_RC ( Setup ( "SRR000123", "READ" ) );
-    REQUIRE_RC ( VCursorOpen (curs ) );
-
-    {
-        REQUIRE_RC ( VCursorSetRowId (curs, 1 ) );
-        REQUIRE_RC ( VCursorOpenRow (curs ) );
-
-        struct VBlob const *blob;
-        REQUIRE_RC ( VCursorGetBlob ( curs, &blob, col_idx ) );
-
-        int64_t first;
-        uint64_t count;
-        REQUIRE_RC ( VBlobIdRange ( blob, &first, &count ) );
-        REQUIRE_EQ ( (int64_t)1, first );
-        REQUIRE_EQ ( (uint64_t)4, count );
-
-        REQUIRE_EQ ( (size_t)858, BlobBufferBytes ( blob ) );
-
-        //TODO: use row map to convert an offset into a rowId
-        REQUIRE_NOT_NULL ( blob->pm );
-        REQUIRE ( ! blob->pm->random_access );
-        REQUIRE_EQ ( (int)PageMap::eBlobPageMapOptimizedNone, (int)blob->pm->optimized );
-
-        REQUIRE_EQ ( (pm_size_t)4, blob->pm->leng_recs ); // not expanded ?
-        REQUIRE_NOT_NULL ( blob->pm->length );   // array of lengths, size blob->pm->leng_recs
-        REQUIRE_EQ ( (elem_count_t)157, blob->pm->length[0] );
-        REQUIRE_EQ ( (elem_count_t)280, blob->pm->length[1] );
-        REQUIRE_EQ ( (elem_count_t)168, blob->pm->length[2] );
-        REQUIRE_EQ ( (elem_count_t)253, blob->pm->length[3] );
-
-        REQUIRE_NOT_NULL ( blob->pm->leng_run ); // array of run lengths, size blob->pm->leng_recs
-        REQUIRE_EQ ( (row_count_t)1, blob->pm->leng_run[0] );
-        REQUIRE_EQ ( (row_count_t)1, blob->pm->leng_run[1] );
-        REQUIRE_EQ ( (row_count_t)1, blob->pm->leng_run[2] );
-        REQUIRE_EQ ( (row_count_t)1, blob->pm->leng_run[3] );
-        //NOTE: very unlikely to happen for READ column, but if leng_run > 1, the corresponding fragments should all appear in the search results
-
-        REQUIRE_EQ ( (pm_size_t)4, blob->pm->data_recs );
-
-        REQUIRE_EQ ( (row_count_t)4,  blob->pm->row_count );
-        REQUIRE_EQ ( (row_count_t)0,  blob->pm->pre_exp_row_count );
-
-        REQUIRE_RC ( VCursorCloseRow (curs ) );
-        REQUIRE_RC ( VBlobRelease ( (struct VBlob *) blob ) );
-    }
-
-    {
-        REQUIRE_RC ( VCursorSetRowId (curs, 5 ) );
-        REQUIRE_RC ( VCursorOpenRow (curs ) );
-
-        struct VBlob const *blob;
-
-        int64_t first;
-        uint64_t count;
-        REQUIRE_RC ( VCursorGetBlob ( curs, &blob, col_idx ) );
-        REQUIRE_RC ( VBlobIdRange ( blob, &first, &count ) );
-        REQUIRE_EQ ( (int64_t)5, first );
-        REQUIRE_EQ ( (uint64_t)4, count );
-
-        REQUIRE_EQ ( (size_t)1221, BlobBufferBytes ( blob ) );
-
-        //TODO: use row map to convert an offset into a rowId
-
-        REQUIRE_RC ( VCursorCloseRow (curs ) );
-        REQUIRE_RC ( VBlobRelease ( (struct VBlob *) blob ) );
-    }
-}
-
-FIXTURE_TEST_CASE(VCursor_GetBlob_WGS, VdbFixture)
-{   // single fragment per row, multiple rows per blob
-    REQUIRE_RC ( Setup ( "ALWZ01", "READ" ) );
-    REQUIRE_RC ( VCursorOpen (curs ) );
-
-    {
-        REQUIRE_RC ( VCursorSetRowId (curs, 1 ) );
-        REQUIRE_RC ( VCursorOpenRow (curs ) );
-
-        struct VBlob const *blob;
-        REQUIRE_RC ( VCursorGetBlob ( curs, &blob, col_idx ) );
-
-        int64_t first;
-        uint64_t count;
-        REQUIRE_RC ( VBlobIdRange ( blob, &first, &count ) );
-        REQUIRE_EQ ( (int64_t)1, first );
-        REQUIRE_EQ ( (uint64_t)4, count );
-
-        REQUIRE_EQ ( (size_t)948, BlobBufferBytes ( blob ) );
-
-        //TODO: use row map to convert an offset into a rowId
-        REQUIRE_NOT_NULL ( blob->pm );
-        REQUIRE ( ! blob->pm->random_access );
-        REQUIRE_EQ ( (int)PageMap::eBlobPageMapOptimizedNone, (int)blob->pm->optimized );
-
-        REQUIRE_EQ ( (pm_size_t)4, blob->pm->leng_recs ); // not expanded ?
-        REQUIRE_NOT_NULL ( blob->pm->length );   // array of lengths, size blob->pm->leng_recs
-        REQUIRE_EQ ( (elem_count_t)227, blob->pm->length[0] );
-        REQUIRE_EQ ( (elem_count_t)245, blob->pm->length[1] );
-        REQUIRE_EQ ( (elem_count_t)211, blob->pm->length[2] );
-        REQUIRE_EQ ( (elem_count_t)265, blob->pm->length[3] );
-
-        REQUIRE_NOT_NULL ( blob->pm->leng_run ); // array of run lengths, size blob->pm->leng_recs
-        REQUIRE_EQ ( (row_count_t)1, blob->pm->leng_run[0] );
-        REQUIRE_EQ ( (row_count_t)1, blob->pm->leng_run[1] );
-        REQUIRE_EQ ( (row_count_t)1, blob->pm->leng_run[2] );
-        REQUIRE_EQ ( (row_count_t)1, blob->pm->leng_run[3] );
-        //NOTE: very unlikely to happen for READ column, but if leng_run > 1, the corresponding fragments should all appear in the search results
-
-        REQUIRE_EQ ( (pm_size_t)4, blob->pm->data_recs );
-
-        REQUIRE_EQ ( (row_count_t)4,  blob->pm->row_count );
-        REQUIRE_EQ ( (row_count_t)0,  blob->pm->pre_exp_row_count );
-
-        REQUIRE_RC ( VCursorCloseRow (curs ) );
-        REQUIRE_RC ( VBlobRelease ( (struct VBlob *) blob ) );
-    }
-
-    {
-        REQUIRE_RC ( VCursorSetRowId (curs, 5 ) );
-        REQUIRE_RC ( VCursorOpenRow (curs ) );
-
-        struct VBlob const *blob;
-
-        int64_t first;
-        uint64_t count;
-        REQUIRE_RC ( VCursorGetBlob ( curs, &blob, col_idx ) );
-        REQUIRE_RC ( VBlobIdRange ( blob, &first, &count ) );
-        REQUIRE_EQ ( (int64_t)5, first );
-        REQUIRE_EQ ( (uint64_t)4, count );
-
-        REQUIRE_EQ ( (size_t)1184, BlobBufferBytes ( blob ) );
-
-        //TODO: use row map to convert an offset into a rowId
-
-        REQUIRE_RC ( VCursorCloseRow (curs ) );
-        REQUIRE_RC ( VBlobRelease ( (struct VBlob *) blob ) );
-    }
-}
-
-FIXTURE_TEST_CASE(VCursor_GetBlob_SequentialAccess, VdbFixture)
-{   // VDB-2858: sequential access to blobs broken
-    REQUIRE_RC ( Setup ( "ALAI01", "READ" ) );
-    REQUIRE_RC ( VCursorOpen (curs ) );
-
-    int64_t first;
-    uint64_t count;
-
-    REQUIRE_RC ( VCursorIdRange (curs, 0, &first, &count ) );
-
-    int64_t rowId = 1;
-    while (true)
-    {
-        REQUIRE_RC ( VCursorSetRowId ( curs, rowId ) );
-        REQUIRE_RC ( VCursorOpenRow ( curs ) );
-
-        struct VBlob const *blob;
-        if ( VCursorGetBlob ( curs, &blob, col_idx ) != 0 )
-        {
-            break;
-        }
-
-        REQUIRE_RC ( VBlobIdRange ( blob, &first, &count ) );
-        REQUIRE_EQ ( rowId, first );
-
-        REQUIRE_RC ( VCursorCloseRow (curs ) );
-        REQUIRE_RC ( VBlobRelease ( (struct VBlob *) blob ) );
-
-        rowId += count;
-    }
-}
-
-FIXTURE_TEST_CASE(VCursor_GetBlob_RandomAccess, VdbFixture)
-{
-    REQUIRE_RC ( Setup ( "SRR000001", "READ" ) );
-    REQUIRE_RC ( VCursorOpen (curs ) );
-
-    // when accessing randomly, blob sizes stay very small
-    REQUIRE ( CheckBlobRange ( 1, 1, 4 ) );
-    REQUIRE ( CheckBlobRange ( 1000, 1000, 1 ) );
-    REQUIRE ( CheckBlobRange ( 14, 14, 1 ) );
-    REQUIRE ( CheckBlobRange ( 1200, 1200, 1 ) );
-    REQUIRE ( CheckBlobRange ( 14000, 14000, 1 ) );
-    REQUIRE ( CheckBlobRange ( 14001, 14001, 4 ) ); // sequential access starts growing the blob
-    REQUIRE ( CheckBlobRange ( 1400, 1400, 1 ) ); // back to random
-    REQUIRE ( CheckBlobRange ( 140000, 140000, 1 ) );
-    REQUIRE ( CheckBlobRange ( 14001, 14001, 1 ) );
-}
-
-FIXTURE_TEST_CASE(PageMapIterator_WGS, VdbFixture)
-{   // single fragment per row, multiple rows per blob
-    REQUIRE_RC ( Setup ( "ALWZ01", "READ" ) );
-    REQUIRE_RC ( VCursorOpen (curs ) );
-
-    {
-        REQUIRE_RC ( VCursorSetRowId (curs, 1 ) );
-        REQUIRE_RC ( VCursorOpenRow (curs ) );
-
-        struct VBlob const *blob;
-        REQUIRE_RC ( VCursorGetBlob ( curs, &blob, col_idx ) );
-
-        PageMapIterator pmIt;
-        REQUIRE_RC ( PageMapNewIterator ( (const PageMap*)blob->pm, &pmIt, 0, 4 ) );
-        REQUIRE_EQ ( (elem_count_t)227, PageMapIteratorDataLength ( &pmIt ) );
-        REQUIRE_EQ ( (elem_count_t)0, PageMapIteratorDataOffset ( &pmIt ) );
-        REQUIRE_EQ ( (row_count_t)1, PageMapIteratorRepeatCount ( &pmIt ) );
-
-        REQUIRE ( PageMapIteratorNext ( &pmIt ) );
-        REQUIRE_EQ ( (elem_count_t)245, PageMapIteratorDataLength ( &pmIt ) );
-        REQUIRE_EQ ( (elem_count_t)227, PageMapIteratorDataOffset ( &pmIt ) );
-        REQUIRE_EQ ( (row_count_t)1, PageMapIteratorRepeatCount ( &pmIt ) );
-
-        REQUIRE ( PageMapIteratorNext ( &pmIt ) );
-        REQUIRE_EQ ( (elem_count_t)211, PageMapIteratorDataLength ( &pmIt ) );
-        REQUIRE_EQ ( (elem_count_t)227+245, PageMapIteratorDataOffset ( &pmIt ) );
-        REQUIRE_EQ ( (row_count_t)1, PageMapIteratorRepeatCount ( &pmIt ) );
-
-        REQUIRE ( PageMapIteratorNext ( &pmIt ) );
-        REQUIRE_EQ ( (elem_count_t)265, PageMapIteratorDataLength ( &pmIt ) );
-        REQUIRE_EQ ( (elem_count_t)227+245+211, PageMapIteratorDataOffset ( &pmIt ) );
-        REQUIRE_EQ ( (row_count_t)1, PageMapIteratorRepeatCount ( &pmIt ) );
-
-        REQUIRE ( ! PageMapIteratorNext ( &pmIt ) );
-
-        REQUIRE_RC ( VCursorCloseRow (curs ) );
-        REQUIRE_RC ( VBlobRelease ( (struct VBlob *) blob ) );
-    }
-}
-
-FIXTURE_TEST_CASE ( VCursor_FindNextRowIdDirect, VdbFixture )
-{
-    REQUIRE_RC ( Setup ( "SRR000001", "READ" ) );
-    REQUIRE_RC ( VCursorOpen (curs ) );
-    int64_t next;
-    REQUIRE_RC ( VCursorFindNextRowIdDirect ( curs, col_idx, 1, & next ) );
-    REQUIRE_EQ ( (int64_t)1, next ) ;
-    REQUIRE_RC ( VCursorFindNextRowIdDirect ( curs, col_idx, 2, & next ) );
-    REQUIRE_EQ ( (int64_t)2, next ) ; // VDB-3075: next == 1
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-vdb";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=VdbTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/vdb/test-wvdb.cpp b/test/vdb/test-wvdb.cpp
deleted file mode 100644
index 3d70580..0000000
--- a/test/vdb/test-wvdb.cpp
+++ /dev/null
@@ -1,525 +0,0 @@
-// ===========================================================================
-//
-//                            PUBLIC DOMAIN NOTICE
-//               National Center for Biotechnology Information
-//
-//  This software/database is a "United States Government Work" under the
-//  terms of the United States Copyright Act.  It was written as part of
-//  the author's official duties as a United States Government employee and
-//  thus cannot be copyrighted.  This software/database is freely available
-//  to the public for use. The National Library of Medicine and the U.S.
-//  Government have not placed any restriction on its use or reproduction.
-//
-//  Although all reasonable efforts have been taken to ensure the accuracy
-//  and reliability of the software and data, the NLM and the U.S.
-//  Government do not and cannot warrant the performance or results that
-//  may be obtained by using this software or data. The NLM and the U.S.
-//  Government disclaim all warranties, express or implied, including
-//  warranties of performance, merchantability or fitness for any particular
-//  purpose.
-//
-//  Please cite the author in any work or product based on this material.
-//
-// ===========================================================================
-
-#include <klib/log.h>
-
-#include <vdb/manager.h> // VDBManager
-#include <vdb/database.h>
-#include <vdb/table.h>
-#include <vdb/cursor.h>
-#include <vdb/schema.h> /* VSchemaRelease */
-#include <vdb/vdb-priv.h>
-
-#include <sra/sraschema.h> // VDBManagerMakeSRASchema
-
-#include <kdb/meta.h>
-#include <kdb/table.h>
-
-#include <ktst/unit_test.hpp> // TEST_CASE
-
-#include <sysalloc.h>
-
-#include <sstream>
-#include <cstdlib>
-
-using namespace std;
-
-TEST_SUITE( WVdbTestSuite )
-
-const string ScratchDir = "./db/";
-
-class WVDB_Fixture
-{
-public:
-    WVDB_Fixture()
-    {
-        THROW_ON_RC ( KDirectoryNativeDir ( & m_wd ) );
-        THROW_ON_RC ( VDBManagerMakeUpdate ( & m_mgr, m_wd ) );
-    }
-    ~WVDB_Fixture()
-    {
-        VDBManagerRelease ( m_mgr );
-        RemoveDatabase();
-        KDirectoryRelease ( m_wd );
-    }
-    void RemoveDatabase()
-    {
-        if ( ! m_databaseName . empty () )
-        {
-            KDirectoryRemove ( m_wd, true, m_databaseName . c_str () );
-        }
-    }
-
-    KDirectory* m_wd;
-    VDBManager* m_mgr;
-    string m_databaseName;
-};
-
-
-// this test case is not very useful but is here as a blueprint for other write-side tests
-FIXTURE_TEST_CASE ( BlobCorruptOnCommit, WVDB_Fixture)
-{
-    m_databaseName = ScratchDir + GetName();
-    RemoveDatabase();
-
-    const string schemaText =
-"function < type T > T echo #1.0 < T val > ( * any row_len ) = vdb:echo;\n"
-"table spotdesc #1\n"
-"{\n"
-"    extern column ascii LABEL = out_label;\n"
-"};\n"
-"table reference #1 = spotdesc #1\n"
-"{\n"
-
-//  this will break the test
-//"    ascii out_label = < ascii > echo < \"reference\" > ();\n"
-
-// this will work
-"    physical column ascii .LABEL = in_label;\n"
-"    ascii in_label = LABEL;\n"
-"    ascii out_label = .LABEL | < ascii > echo < 'label' > ();\n"
-
-"};\n"
-"database db #1\n"
-"{\n"
-"    table reference #1 REFERENCE;\n"
-"};\n"
-;
-    const char * schemaSpec = "db";
-
-    // MakeDatabase
-    VDatabase* db;
-    {
-        VDBManager* mgr;
-        REQUIRE_RC ( VDBManagerMakeUpdate ( & mgr, NULL ) );
-        VSchema* schema;
-        REQUIRE_RC ( VDBManagerMakeSchema ( mgr, & schema ) );
-        REQUIRE_RC ( VSchemaParseText(schema, NULL, schemaText . c_str(), schemaText . size () ) );
-
-        REQUIRE_RC ( VDBManagerCreateDB ( mgr,
-                                          & db,
-                                          schema,
-                                          schemaSpec,
-                                          kcmInit + kcmMD5,
-                                          "%s",
-                                          m_databaseName . c_str () ) );
-        REQUIRE_RC ( VSchemaRelease ( schema ) );
-        REQUIRE_RC ( VDBManagerRelease ( mgr ) );
-    }
-
-    // MakeCursor
-    VCursor* cursor;
-    {
-        VTable* table;
-        REQUIRE_RC ( VDatabaseCreateTable ( db, & table, "REFERENCE", kcmCreate | kcmMD5, "%s", "REFERENCE" ) );
-        REQUIRE_RC ( VTableCreateCursorWrite ( table, & cursor, kcmInsert ) );
-        REQUIRE_RC ( VTableRelease ( table ) );
-    }
-
-    // AddColumns
-    uint32_t columnIdx;
-    REQUIRE_RC ( VCursorAddColumn ( cursor, & columnIdx, "%s", "LABEL" ) );
-
-    REQUIRE_RC ( VCursorOpen ( cursor  ) );
-
-    for ( int i = 0; i < 4096; ++i)
-    {
-        ostringstream out;
-        out << rand();
-
-        REQUIRE_RC ( VCursorOpenRow ( cursor ) );
-        REQUIRE_RC ( VCursorWrite ( cursor, columnIdx, 8, out.str().c_str(), 0, out.str().size() ) );
-        REQUIRE_RC ( VCursorCommitRow ( cursor ) );
-        REQUIRE_RC ( VCursorCloseRow ( cursor ) );
-
-        //REQUIRE_RC ( VCursorFlushPage ( cursor ) ); // kaboom
-    }
-
-    REQUIRE_RC ( VCursorCommit ( cursor ) );    // this returns rcVDB,rcBlob,rcValidating,rcBlob,rcCorrupt if the schema does not support
-                                                // writing to the LABEL column from the code
-    REQUIRE_RC ( VCursorRelease ( cursor ) );
-
-    REQUIRE_RC ( VDatabaseRelease ( db ) );
-}
-
-FIXTURE_TEST_CASE ( ColumnOpenMetadata, WVDB_Fixture )
-{   // setting column metadata in a freshly created VDatabase
-    m_databaseName = ScratchDir + GetName();
-    RemoveDatabase();
-
-    string schemaText = "table table1 #1.0.0 { column ascii column1; };"
-                        "database root_database #1 { table table1 #1 TABLE1; } ;";
-
-    const char* TableName = "TABLE1";
-    const char* ColumnName = "column1";
-
-    VDatabase* db;
-    {
-        VSchema* schema;
-        REQUIRE_RC ( VDBManagerMakeSchema ( m_mgr, & schema ) );
-        REQUIRE_RC ( VSchemaParseText ( schema, NULL, schemaText . c_str (), schemaText . size () ) );
-
-        REQUIRE_RC ( VDBManagerCreateDB ( m_mgr,
-                                          & db,
-                                          schema,
-                                          "root_database",
-                                          kcmInit + kcmMD5,
-                                          "%s",
-                                          m_databaseName . c_str () ) );
-
-        VTable* table;
-        REQUIRE_RC ( VDatabaseCreateTable ( db , & table, TableName, kcmInit + kcmMD5, TableName ) );
-
-        VCursor* cursor;
-        REQUIRE_RC ( VTableCreateCursorWrite ( table, & cursor, kcmInsert ) );
-        uint32_t column_idx;
-        REQUIRE_RC ( VCursorAddColumn ( cursor, & column_idx, ColumnName ) );
-        REQUIRE_RC ( VCursorOpen ( cursor ) );
-
-        // need to insert 2 rows with different values to make the column physical
-        REQUIRE_RC ( VCursorOpenRow ( cursor ) );
-        REQUIRE_RC ( VCursorWrite ( cursor, column_idx, 8, "blah", 0, 4 ) );
-        REQUIRE_RC ( VCursorCommitRow ( cursor ) );
-        REQUIRE_RC ( VCursorCloseRow ( cursor ) );
-
-        REQUIRE_RC ( VCursorOpenRow ( cursor ) );
-        REQUIRE_RC ( VCursorWrite ( cursor, column_idx, 8, "eeee", 0, 4 ) );
-        REQUIRE_RC ( VCursorCommitRow ( cursor ) );
-        REQUIRE_RC ( VCursorCloseRow ( cursor ) );
-
-        REQUIRE_RC ( VCursorCommit ( cursor ) );
-
-        REQUIRE_RC ( VCursorRelease ( cursor ) );
-        REQUIRE_RC ( VTableRelease ( table ) );
-        REQUIRE_RC ( VSchemaRelease ( schema ) );
-    }
-    // update the column's metadata without re-opening the database
-    {
-        VTable* table;
-        REQUIRE_RC ( VDatabaseOpenTableUpdate ( db , & table, TableName ) );
-        KTable* ktbl;
-        REQUIRE_RC ( VTableOpenKTableUpdate ( table, & ktbl ) );
-        KColumn* col;
-        REQUIRE_RC ( KTableOpenColumnUpdate ( ktbl, & col, ColumnName ) );
-
-        // finally, open the metadata
-        KMetadata *meta;
-        REQUIRE_RC ( KColumnOpenMetadataUpdate ( col, &meta ) );
-
-        KMDataNode* node;
-        REQUIRE_RC ( KMetadataOpenNodeUpdate ( meta, & node, "key" ) );
-        const char* MetadataValue = "metavalue";
-        REQUIRE_RC ( KMDataNodeWrite ( node, MetadataValue, string_size ( MetadataValue ) ) );
-        REQUIRE_RC ( KMDataNodeRelease ( node ) );
-
-        REQUIRE_RC ( KMetadataRelease ( meta ) );
-        REQUIRE_RC ( KColumnRelease ( col ) );
-        REQUIRE_RC ( KTableRelease ( ktbl ) );
-        REQUIRE_RC ( VTableRelease ( table ) );
-        REQUIRE_RC ( VDatabaseRelease ( db ) );
-    }
-}
-
-FIXTURE_TEST_CASE ( VTableDropColumn_PhysicalColumn, WVDB_Fixture )
-{
-    m_databaseName = ScratchDir + GetName();
-    RemoveDatabase();
-
-    string schemaText = "table table1 #1.0.0 { column ascii column1; column ascii column2; };"
-                        "database root_database #1 { table table1 #1 TABLE1; } ;";
-
-    const char* TableName = "TABLE1";
-    const char* ColumnName1 = "column1";
-    const char* ColumnName2 = "column2";
-
-    VDatabase* db;
-    {
-        VSchema* schema;
-        REQUIRE_RC ( VDBManagerMakeSchema ( m_mgr, & schema ) );
-        REQUIRE_RC ( VSchemaParseText ( schema, NULL, schemaText . c_str (), schemaText . size () ) );
-
-        REQUIRE_RC ( VDBManagerCreateDB ( m_mgr,
-                                          & db,
-                                          schema,
-                                          "root_database",
-                                          kcmInit + kcmMD5,
-                                          "%s",
-                                          m_databaseName . c_str () ) );
-
-        VTable* table;
-        REQUIRE_RC ( VDatabaseCreateTable ( db , & table, TableName, kcmInit + kcmMD5, TableName ) );
-
-        VCursor* cursor;
-        REQUIRE_RC ( VTableCreateCursorWrite ( table, & cursor, kcmInsert ) );
-        uint32_t column_idx1;
-        uint32_t column_idx2;
-        REQUIRE_RC ( VCursorAddColumn ( cursor, & column_idx1, ColumnName1 ) );
-        REQUIRE_RC ( VCursorAddColumn ( cursor, & column_idx2, ColumnName2 ) );
-        REQUIRE_RC ( VCursorOpen ( cursor ) );
-
-        // need to insert 2 rows with different values to make the column physical
-        REQUIRE_RC ( VCursorOpenRow ( cursor ) );
-        REQUIRE_RC ( VCursorWrite ( cursor, column_idx1, 8, "blah", 0, 4 ) );
-        REQUIRE_RC ( VCursorWrite ( cursor, column_idx2, 8, "blah", 0, 4 ) );
-        REQUIRE_RC ( VCursorCommitRow ( cursor ) );
-        REQUIRE_RC ( VCursorCloseRow ( cursor ) );
-
-        REQUIRE_RC ( VCursorOpenRow ( cursor ) );
-        REQUIRE_RC ( VCursorWrite ( cursor, column_idx1, 8, "eeee", 0, 4 ) );
-        REQUIRE_RC ( VCursorWrite ( cursor, column_idx2, 8, "eeee", 0, 4 ) );
-        REQUIRE_RC ( VCursorCommitRow ( cursor ) );
-        REQUIRE_RC ( VCursorCloseRow ( cursor ) );
-
-        REQUIRE_RC ( VCursorCommit ( cursor ) );
-
-        REQUIRE_RC ( VCursorRelease ( cursor ) );
-        REQUIRE_RC ( VTableRelease ( table ) );
-        REQUIRE_RC ( VSchemaRelease ( schema ) );
-    }
-    // drop column1
-    {
-        VTable* table;
-        REQUIRE_RC ( VDatabaseOpenTableUpdate ( db , & table, TableName ) );
-        REQUIRE_RC ( VTableDropColumn ( table, ColumnName1 ) );
-        REQUIRE_RC ( VTableRelease ( table ) );
-    }
-    // finally, check resulted db
-    {
-        VTable* table;
-        REQUIRE_RC ( VDatabaseOpenTableUpdate ( db , & table, TableName ) );
-        const VCursor* cursor;
-        REQUIRE_RC ( VTableCreateCursorRead ( (const VTable*) table, & cursor ) );
-        uint32_t column_idx1;
-        uint32_t column_idx2;
-        REQUIRE_RC ( VCursorOpen ( cursor ) );
-
-        KLogLevel logLevel = KLogLevelGet();
-        REQUIRE_RC ( KLogLevelSet ( klogFatal ) );
-        REQUIRE_RC_FAIL ( VCursorAddColumn ( cursor, & column_idx1, ColumnName1 ) );
-        REQUIRE_RC ( KLogLevelSet ( logLevel ) );
-        REQUIRE_RC ( VCursorAddColumn ( cursor, & column_idx2, ColumnName2 ) );
-
-        REQUIRE_RC ( VCursorRelease ( cursor ) );
-        REQUIRE_RC ( VTableRelease ( table ) );
-    }
-    REQUIRE_RC ( VDatabaseRelease ( db ) );
-}
-
-FIXTURE_TEST_CASE ( VTableDropColumn_MetadataColumn_VDB_2735, WVDB_Fixture )
-{
-    m_databaseName = ScratchDir + GetName();
-    RemoveDatabase();
-
-    string schemaText = "table table1 #1.0.0 { column ascii column1; column ascii column2; };"
-                        "database root_database #1 { table table1 #1 TABLE1; } ;";
-
-    const char* TableName = "TABLE1";
-    const char* ColumnName1 = "column1";
-    const char* ColumnName2 = "column2";
-
-    VDatabase* db;
-    {
-        VSchema* schema;
-        REQUIRE_RC ( VDBManagerMakeSchema ( m_mgr, & schema ) );
-        REQUIRE_RC ( VSchemaParseText ( schema, NULL, schemaText . c_str (), schemaText . size () ) );
-
-        REQUIRE_RC ( VDBManagerCreateDB ( m_mgr,
-                                          & db,
-                                          schema,
-                                          "root_database",
-                                          kcmInit + kcmMD5,
-                                          "%s",
-                                          m_databaseName . c_str () ) );
-
-        VTable* table;
-        REQUIRE_RC ( VDatabaseCreateTable ( db , & table, TableName, kcmInit + kcmMD5, TableName ) );
-
-        VCursor* cursor;
-        REQUIRE_RC ( VTableCreateCursorWrite ( table, & cursor, kcmInsert ) );
-        uint32_t column_idx1;
-        uint32_t column_idx2;
-        REQUIRE_RC ( VCursorAddColumn ( cursor, & column_idx1, ColumnName1 ) );
-        REQUIRE_RC ( VCursorAddColumn ( cursor, & column_idx2, ColumnName2 ) );
-        REQUIRE_RC ( VCursorOpen ( cursor ) );
-
-        // need to insert 2 rows with same values to keep the column in metadata
-        REQUIRE_RC ( VCursorOpenRow ( cursor ) );
-        REQUIRE_RC ( VCursorWrite ( cursor, column_idx1, 8, "blah", 0, 4 ) );
-        REQUIRE_RC ( VCursorWrite ( cursor, column_idx2, 8, "blah", 0, 4 ) );
-        REQUIRE_RC ( VCursorCommitRow ( cursor ) );
-        REQUIRE_RC ( VCursorCloseRow ( cursor ) );
-
-        REQUIRE_RC ( VCursorOpenRow ( cursor ) );
-        REQUIRE_RC ( VCursorWrite ( cursor, column_idx1, 8, "blah", 0, 4 ) );
-        REQUIRE_RC ( VCursorWrite ( cursor, column_idx2, 8, "blah", 0, 4 ) );
-        REQUIRE_RC ( VCursorCommitRow ( cursor ) );
-        REQUIRE_RC ( VCursorCloseRow ( cursor ) );
-
-        REQUIRE_RC ( VCursorCommit ( cursor ) );
-
-        REQUIRE_RC ( VCursorRelease ( cursor ) );
-        REQUIRE_RC ( VTableRelease ( table ) );
-        REQUIRE_RC ( VSchemaRelease ( schema ) );
-    }
-    // drop column1
-    {
-        VTable* table;
-        REQUIRE_RC ( VDatabaseOpenTableUpdate ( db , & table, TableName ) );
-        REQUIRE_RC ( VTableDropColumn ( table, ColumnName1 ) );
-        REQUIRE_RC ( VTableRelease ( table ) );
-    }
-    // finally, check resulted db
-    {
-        VTable* table;
-        REQUIRE_RC ( VDatabaseOpenTableUpdate ( db , & table, TableName ) );
-        const VCursor* cursor;
-        REQUIRE_RC ( VTableCreateCursorRead ( (const VTable*) table, & cursor ) );
-        uint32_t column_idx1;
-        uint32_t column_idx2;
-        REQUIRE_RC ( VCursorOpen ( cursor ) );
-
-        KLogLevel logLevel = KLogLevelGet();
-        REQUIRE_RC ( KLogLevelSet ( klogFatal ) );
-        REQUIRE_RC_FAIL ( VCursorAddColumn ( cursor, & column_idx1, ColumnName1 ) );
-        REQUIRE_RC ( KLogLevelSet ( logLevel ) );
-        REQUIRE_RC ( VCursorAddColumn ( cursor, & column_idx2, ColumnName2 ) );
-
-        REQUIRE_RC ( VCursorRelease ( cursor ) );
-        REQUIRE_RC ( VTableRelease ( table ) );
-    }
-    REQUIRE_RC ( VDatabaseRelease ( db ) );
-}
-
-FIXTURE_TEST_CASE ( VCursor_FindNextRowIdDirect, WVDB_Fixture )
-{
-    m_databaseName = ScratchDir + GetName();
-    RemoveDatabase();
-
-    string schemaText = "table table1 #1.0.0 { column ascii column1; };"
-                        "database root_database #1 { table table1 #1 TABLE1; } ;";
-
-    const char* TableName = "TABLE1";
-    const char* ColumnName = "column1";
-
-    {
-        VDatabase* db;
-        VSchema* schema;
-        REQUIRE_RC ( VDBManagerMakeSchema ( m_mgr, & schema ) );
-        REQUIRE_RC ( VSchemaParseText ( schema, NULL, schemaText . c_str (), schemaText . size () ) );
-
-        REQUIRE_RC ( VDBManagerCreateDB ( m_mgr,
-                                          & db,
-                                          schema,
-                                          "root_database",
-                                          kcmInit + kcmMD5,
-                                          "%s",
-                                          m_databaseName . c_str () ) );
-
-        VTable* table;
-        REQUIRE_RC ( VDatabaseCreateTable ( db , & table, TableName, kcmInit + kcmMD5, TableName ) );
-
-        VCursor* cursor;
-        REQUIRE_RC ( VTableCreateCursorWrite ( table, & cursor, kcmInsert ) );
-        uint32_t column_idx;
-        REQUIRE_RC ( VCursorAddColumn ( cursor, & column_idx, ColumnName ) );
-        REQUIRE_RC ( VCursorOpen ( cursor ) );
-
-        // insert some rows
-        REQUIRE_RC ( VCursorOpenRow ( cursor ) );
-        REQUIRE_RC ( VCursorWrite ( cursor, column_idx, 8, "blah", 0, 4 ) );
-        REQUIRE_RC ( VCursorCommitRow ( cursor ) );
-        REQUIRE_RC ( VCursorCloseRow ( cursor ) );
-
-        REQUIRE_RC ( VCursorOpenRow ( cursor ) );
-        REQUIRE_RC ( VCursorWrite ( cursor, column_idx, 8, "eeee", 0, 4 ) );
-        REQUIRE_RC ( VCursorCommitRow ( cursor ) );
-        REQUIRE_RC ( VCursorCloseRow ( cursor ) );
-
-        REQUIRE_RC ( VCursorCommit ( cursor ) );
-
-        REQUIRE_RC ( VCursorRelease ( cursor ) );
-        REQUIRE_RC ( VTableReindex ( table ) );
-        REQUIRE_RC ( VTableRelease ( table ) );
-        REQUIRE_RC ( VSchemaRelease ( schema ) );
-        REQUIRE_RC ( VDatabaseRelease ( db ) );
-    }
-    {   // reopen
-        const VDatabase* db;
-        VDBManagerOpenDBRead ( m_mgr, & db, NULL, m_databaseName . c_str () );
-
-        const VTable* table;
-        REQUIRE_RC ( VDatabaseOpenTableRead ( db , & table, TableName ) );
-
-        const VCursor* cursor;
-        REQUIRE_RC ( VTableCreateCursorRead ( table, & cursor ) );
-
-        uint32_t column_idx;
-        REQUIRE_RC ( VCursorAddColumn ( cursor, & column_idx, ColumnName ) );
-        REQUIRE_RC ( VCursorOpen ( cursor ) );
-
-        int64_t next;
-        REQUIRE_RC ( VCursorFindNextRowIdDirect ( cursor, column_idx, 1, & next ) );
-        REQUIRE_EQ ( (int64_t)1, next ) ;
-        REQUIRE_RC ( VCursorFindNextRowIdDirect ( cursor, column_idx, 2, & next ) );
-        REQUIRE_EQ ( (int64_t)2, next ) ; // VDB-3075: next == 1
-
-        REQUIRE_RC ( VCursorRelease ( cursor ) );
-        REQUIRE_RC ( VTableRelease ( table ) );
-        REQUIRE_RC ( VDatabaseRelease ( db ) );
-    }
-
-}
-
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "test-wvdb";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=WVdbTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/vfs/Makefile b/test/vfs/Makefile
deleted file mode 100644
index c849c6a..0000000
--- a/test/vfs/Makefile
+++ /dev/null
@@ -1,130 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-
-MODULE = test/vfs
-
-TEST_TOOLS = \
-    test-caching \
-    test-vfsmanager \
-    test-path-c \
-    test-path \
-    test-resolver
-
-
-include $(TOP)/build/Makefile.env
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: $(TEST_TOOLS)
-
-clean: stdclean
-
-#-------------------------------------------------------------------------------
-# C test on VPath (aka test-vfs on Windows)
-#
-
-TEST_SRC = \
-	path-test
-
-TEST_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_SRC))
-
-TEST_LIB = \
-	-skapp \
-	-sncbi-vdb \
-
-$(TEST_BINDIR)/test-path-c: $(TEST_OBJ)
-	$(LD) --exe -o $@ $^ $(TEST_LIB)
-
-#----------------------------------------------------------------
-# C++ test on VPath
-#
-
-PATHTEST_SRC = \
-	pathtest 
-
-PATHTEST_OBJ = \
-	$(addsuffix .$(OBJX),$(PATHTEST_SRC))
-
-PATHTEST_LIB = \
-	-skapp \
-	-sktst \
-	-sncbi-vdb \
-
-$(TEST_BINDIR)/test-path: $(PATHTEST_OBJ)
-	$(LP) --exe -o $@ $^ $(PATHTEST_LIB)
-
-#----------------------------------------------------------------
-# test-caching
-
-CACHING_SRC = \
-	test-caching
-
-CACHING_OBJ = \
-	$(addsuffix .$(OBJX),$(CACHING_SRC))
-
-$(TEST_BINDIR)/test-caching: $(CACHING_OBJ)
-	$(LP) --exe -o $@ $^ $(PATHTEST_LIB)
-
-#----------------------------------------------------------------
-# C++ test on VFSManager
-#
-
-MANAGERTEST_SRC = \
-	managertest 
-
-MANAGERTEST_OBJ = \
-	$(addsuffix .$(OBJX),$(MANAGERTEST_SRC))
-
-MANAGERTEST_LIB = \
-	-skapp \
-	-sktst \
-	-sncbi-vdb \
-
-$(TEST_BINDIR)/test-vfsmanager: $(MANAGERTEST_OBJ)
-	$(LP) --exe -o $@ $^ $(MANAGERTEST_LIB)
-
-
-#----------------------------------------------------------------
-# C++ test on VResolver
-#
-
-RESOLVERTEST_SRC = \
-	resolvertest 
-
-RESOLVERTEST_OBJ = \
-	$(addsuffix .$(OBJX),$(RESOLVERTEST_SRC))
-
-RESOLVERTEST_LIB = \
-	-skapp \
-	-sktst \
-	-sncbi-vdb \
-
-$(TEST_BINDIR)/test-resolver: $(RESOLVERTEST_OBJ)
-	$(LP) --exe -o $@ $^ $(RESOLVERTEST_LIB)
diff --git a/test/vfs/caching-kfg/incomplete.kfg b/test/vfs/caching-kfg/incomplete.kfg
deleted file mode 100644
index 31db5ff..0000000
--- a/test/vfs/caching-kfg/incomplete.kfg
+++ /dev/null
@@ -1,4 +0,0 @@
-/repository/remote/main/CGI/resolver-cgi = "http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi"
-/TEST_ROOT = "/tmp/$(USER)"
-/TEST_SUBROOT = "$(TEST_ROOT)/$(BUILD)"
-/repository/user/main/public/root = "$(TEST_SUBROOT)/test-caching"
diff --git a/test/vfs/managertest.cpp b/test/vfs/managertest.cpp
deleted file mode 100644
index dee82c7..0000000
--- a/test/vfs/managertest.cpp
+++ /dev/null
@@ -1,490 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-/**
-* Unit tests for VFSManager interface
-*/
-
-#include <ktst/unit_test.hpp>
-
-#include <klib/text.h>
-#include <klib/rc.h>
-
-#include <vfs/manager.h>
-#include <vfs/manager-priv.h>
-#include <vfs/path.h>
-
-#include <kfg/config.h>
-#include <kfg/keystore.h>
-#include <kfg/kfg-priv.h>
-
-#include <kfs/directory.h>
-#include <kfs/file.h>
-
-#include <cstdlib>
-#include <stdexcept>
-
-#include <string.h>
-
-#include <sysalloc.h>
-
-TEST_SUITE(VManagerTestSuite);
-
-using namespace std;
-
-const char* pwFileName="pwfile";
-const char* password = "password";
-
-class MgrFixture
-{
-public:
-    static const int BufSize = 1024;
-
-public:
-    MgrFixture()
-        : wd ( 0 )
-        , mgr ( 0 )
-        , vpath(0)
-        , num_read(0)
-        , num_writ ( 0 )
-    {
-        if (KDirectoryNativeDir ( &wd ) != 0)
-           throw logic_error("MgrFixture: KDirectoryNativeDir failed");   
-    
-        if (VFSManagerMake(&mgr) != 0 || mgr == 0)
-           throw logic_error("MgrFixture: VFSManagerMake failed");    
-        
-        // stick a reference to our pwfile into the VFSManager's configuration 
-        // (no easy way to do that through putenv that would work on Windows dynamic since
-        // vfs.dll would have its own copy of environment)
-        const KConfig* kfg = VFSManagerGetConfig(mgr);
-        if (!kfg)
-           throw logic_error("MgrFixture: VFSManagerGetConfig failed");    
-        KConfigNode* node;
-        if (KConfigOpenNodeUpdate((KConfig*)kfg, &node, KFG_KRYPTO_PWFILE) != 0)
-           throw logic_error("MgrFixture: KConfigOpenNodeUpdate failed");    
-           
-        if (KConfigNodeWrite(node, pwFileName, strlen(pwFileName)) != 0)
-           throw logic_error("MgrFixture: KConfigNodeWrite failed");   
-        if (KConfigNodeRelease(node) != 0)
-           throw logic_error("MgrFixture: KConfigNodeRelease failed");   
-
-        // make sure pwfile contains the correct password (some tests might update it)
-        CreateFile(pwFileName, password);
-    }
-    ~MgrFixture()
-    {
-        if (KDirectoryRemove(wd, true, pwFileName))
-           throw logic_error("~MgrFixture: KDirectoryRemove failed");   
-        if (vpath && VPathRelease(vpath) != 0)
-           throw logic_error("~MgrFixture: VPathRelease failed");
-        if (mgr && VFSManagerRelease(mgr) != 0)
-           throw logic_error("~MgrFixture: VFSManagerRelease failed");
-        if (KDirectoryRelease(wd) != 0)
-           throw logic_error("~MgrFixture: KDirectoryRelease failed");   
-    }
-    
-    void CreateFile(const string& name, const string& content)
-    {
-        KFile* f;
-        if (KDirectoryCreateFile(wd, &f, false, 0660, kcmInit, name.c_str()) != 0)
-           throw logic_error("CreateFile: KDirectoryCreateFile failed");   
-        if (KFileWrite(f, 0, content.c_str(), content.size(), &num_writ) != 0 || num_writ != content.size())
-           throw logic_error("CreateFile: KDirectoryOpenFileWrite failed");   
-        if (KFileRelease(f) != 0)
-           throw logic_error("CreateFile: KFileRelease failed");   
-    }
-    string ReadContent(const KFile* file)
-    {
-        if (KFileReadAll ( file, 0, buf, BufSize, &num_read ) != 0)
-           throw logic_error("ReadContent: KFileReadAll failed");   
-        return string(buf, num_read);
-    }
-
-    KDirectory* wd;
-    VFSManager* mgr;
-    VPath* vpath;
-
-    // for use in KFileReadAll et al
-    char buf[BufSize];
-    size_t num_read;
-    size_t num_writ;
-};
-
-TEST_CASE(Make_Basic)
-{
-    VFSManager* mgr;
-    REQUIRE_RC(VFSManagerMake(&mgr));
-    REQUIRE_RC(VFSManagerRelease(mgr));
-}
-
-/////////////// Accessing encrypted objects
-string protectedFileContent = "contents of a single-file object";
-
-FIXTURE_TEST_CASE(OpenFileRead_Decrypt, MgrFixture)
-{
-    REQUIRE_RC(VFSManagerMakePath ( mgr, &vpath, "./ncbi/protected1/SRR999997.ncbi_enc")); // an encrypted copy of ./ncbi/protected1/SRR999997
-    
-    // read contents of an encrypted file
-    const KFile *f;
-    REQUIRE_RC(VFSManagerOpenFileReadDecrypt (mgr, &f, vpath));    
-    
-    REQUIRE_EQ(protectedFileContent, ReadContent(f));
-
-    REQUIRE_RC(KFileRelease(f));
-}
-FIXTURE_TEST_CASE(OpenDirRead_Decrypt, MgrFixture)
-{
-    REQUIRE_RC(VFSManagerMakePath ( mgr, &vpath, "./ncbi_enc")); // this is an encrypted kar archive of directory ./ncbi
-    
-    const KDirectory *dir;
-    REQUIRE_RC(VFSManagerOpenDirectoryReadDirectoryRelativeDecrypt (mgr, wd, &dir, vpath));    
-    
-    // read contents of a file inside an encrypted archive
-    const KFile *f;
-    KDirectoryOpenFileRead(dir, &f, "protected1/SRR999997");
-    REQUIRE_EQ(protectedFileContent, ReadContent(f));
-    REQUIRE_RC(KFileRelease(f));
-    
-    REQUIRE_RC(KDirectoryRelease(dir));
-}
-
-FIXTURE_TEST_CASE(CreateFile_Encrypt, MgrFixture)
-{
-    string uri = string("ncbi-file:") + GetName() + "?enc&pwfile=pwfile";
-    REQUIRE_RC(VFSManagerMakePath ( mgr, &vpath, uri.c_str())); 
-    
-    // create with encryption
-    KFile* f;
-    REQUIRE_RC(VFSManagerCreateFile(mgr, &f, false, 0660, kcmInit, vpath));
-    string content="this is supposed to be encrypted";
-    REQUIRE_RC(KFileWrite(f, 0, content.c_str(), content.size(), &num_writ));
-    REQUIRE_EQ(content.size(), num_writ);
-    REQUIRE_RC(KFileRelease(f));
-    
-    // open as unencrypted - should fail
-    KDirectoryOpenFileRead(wd, (const KFile**)&f, GetName());
-    REQUIRE_NE(content, ReadContent(f));
-    REQUIRE_RC(KFileRelease(f));
-    
-    // open as encrypted
-    REQUIRE_RC(VFSManagerOpenFileReadDecrypt (mgr, (const KFile**)&f, vpath));    
-    REQUIRE_EQ(content, ReadContent(f));
-    REQUIRE_RC(KFileRelease(f));
-    
-    REQUIRE_RC(KDirectoryRemove(wd, true, GetName()));
-}
-
-FIXTURE_TEST_CASE(OpenFileWriteFile_Encrypt_NotEncrypted, MgrFixture)
-{   // attempt to open an unencrypted file for encypted writing
-    // create unencrypted
-    CreateFile(GetName(), "garbage");
-
-    string uri = string("ncbi-file:") + GetName() + "?enc&pwfile=pwfile";
-    REQUIRE_RC(VFSManagerMakePath ( mgr, &vpath, uri.c_str())); 
-
-    // open as encrypted - fail
-    KFile* f;
-    // this will output an error message from KEncFileMakeIntValidSize:
-    REQUIRE_RC_FAIL(VFSManagerOpenFileWrite(mgr, &f, false, vpath)); 
-    REQUIRE_RC(KFileRelease(f));
-
-    REQUIRE_RC(KDirectoryRemove(wd, true, GetName()));
-}
-
-FIXTURE_TEST_CASE(OpenFileWriteFile_Encrypt, MgrFixture)
-{   // open an encrypted file for encypted writing
-    string uri = string("ncbi-file:") + GetName() + "?enc&pwfile=pwfile";
-    REQUIRE_RC(VFSManagerMakePath ( mgr, &vpath, uri.c_str())); 
-
-    // create encrypted
-    KFile* f;
-    REQUIRE_RC(VFSManagerCreateFile(mgr, &f, false, 0660, kcmInit, vpath));
-    string content="old encrypted content";
-    REQUIRE_RC(KFileWrite(f, 0, content.c_str(), content.size(), &num_writ));
-    REQUIRE_EQ(content.size(), num_writ);
-    REQUIRE_RC(KFileRelease(f));
-
-    // open, overwrite
-    REQUIRE_RC(VFSManagerOpenFileWrite(mgr, &f, false, vpath));
-    content="new and shiny and encrypted";
-    REQUIRE_RC(KFileWrite(f, 0, content.c_str(), content.size(), &num_writ));
-    REQUIRE_EQ(content.size(), num_writ);
-    REQUIRE_RC(KFileRelease(f));
-    
-    // open as unencrypted - fail
-    KDirectoryOpenFileRead(wd, (const KFile**)&f, GetName());
-    REQUIRE_NE(content, ReadContent(f));
-    REQUIRE_RC(KFileRelease(f));
-    
-    // open as encrypted
-    REQUIRE_RC(VFSManagerOpenFileReadDecrypt (mgr, (const KFile**)&f, vpath));    
-    REQUIRE_EQ(content, ReadContent(f));
-    REQUIRE_RC(KFileRelease(f));
-
-    REQUIRE_RC(KDirectoryRemove(wd, true, GetName()));
-}
-
-/////////////// Managing password file
-FIXTURE_TEST_CASE(GetKryptoPassword, MgrFixture)
-{
-    REQUIRE_RC(VFSManagerGetKryptoPassword(mgr, buf, BufSize, &num_read));
-    REQUIRE_EQ(string("password"), string(buf, num_read));
-}
-
-FIXTURE_TEST_CASE(UpdateKryptoPassword_NoOutput, MgrFixture)
-{
-    string newPwd("new_pwd1");
-    rc_t rc = VFSManagerUpdateKryptoPassword(mgr, newPwd.c_str(), newPwd.size(), 0, 0);
-// directory permissions are not looked at on Windows    
-#if !WINDOWS    
-    REQUIRE_EQ(rc, RC(rcVFS, rcEncryptionKey, rcUpdating, rcDirectory, rcExcessive));
-#else
-    REQUIRE_EQ(rc, (rc_t)0);
-#endif    
-
-    REQUIRE_RC(VFSManagerGetKryptoPassword(mgr, buf, BufSize, &num_read));
-    REQUIRE_EQ(newPwd, string(buf, num_read));
-}
-FIXTURE_TEST_CASE(UpdateKryptoPassword_Output, MgrFixture)
-{
-    string newPwd("new_pwd2");
-    // VFSManagerUpdateKryptoPassword returns the directory containing the password file,
-    // to help instruct user to chmod if permissions are too lax
-    rc_t rc = VFSManagerUpdateKryptoPassword(mgr, newPwd.c_str(), newPwd.size(), buf, BufSize);
-// directory permissions are not looked at on Windows    
-#if !WINDOWS    
-    REQUIRE_EQ(rc, RC(rcVFS, rcEncryptionKey, rcUpdating, rcDirectory, rcExcessive));
-#else
-    REQUIRE_EQ(rc, (rc_t)0);
-#endif    
-    REQUIRE_EQ(string("."), string(buf));
-    
-    REQUIRE_RC(VFSManagerGetKryptoPassword(mgr, buf, BufSize, &num_read));
-    REQUIRE_EQ(newPwd, string(buf, num_read));
-}
-
-//TODO: VFSManagerWGAValidateHack
-
-//
-//  Object Id / Object name bindings
-//
-
-class ObjIdBindingFixture : public MgrFixture 
-{
-public:
-    static char bindings[1024];
-    
-    ObjIdBindingFixture()
-    {
-    }
-    ~ObjIdBindingFixture()
-    {
-        const char* bFile = VFSManagerGetBindingsFile(mgr);
-        if (bFile != NULL)
-            KDirectoryRemove(wd, true, bFile);
-        VFSManagerSetBindingsFile(mgr, NULL);
-    }
-    void SetUp(const string& bindingsFileName)
-    {
-        string bFile = string("./") + bindingsFileName;
-        if (string_copy(bindings, sizeof(bindings), bFile.c_str(), bFile.length()) != bFile.length())
-           throw logic_error("ObjIdBindingFixture::SetUp: string_copy failed");   
-        VFSManagerSetBindingsFile(mgr, bindings);
-        KDirectoryRemove(wd, true, bindings);
-    }
-    rc_t Register(uint32_t id, const char* uri)
-    {
-        VPath* p;
-        if (VFSManagerMakePath(mgr, &p, uri) != 0)
-           throw logic_error("ObjIdBindingFixture::Register: VFSManagerMakePath failed");   
-        rc_t rc = VFSManagerRegisterObject(mgr, id, p);
-        if (VPathRelease(p) != 0)
-           throw logic_error("ObjIdBindingFixture::Register: VPathRelease failed");   
-        return rc;
-    }
-    rc_t GetById(uint32_t id, string& uri)
-    {
-        VPath* vp;
-        rc_t rc = VFSManagerGetObject(mgr, id, &vp);
-        if (rc == 0)
-        {
-            if (vp == 0)
-                throw logic_error("ObjIdBindingFixture::GetById: VFSManagerGetObject returned NULL");   
-                
-            const String* p;
-            if (VPathMakeString(vp, &p) != 0 || p == 0)
-                throw logic_error("ObjIdBindingFixture::GetById: VPathMakeString failed");   
-                
-            uri = string(p->addr, p->size);
-            
-            free((void*)p);
-            if (VPathRelease(vp) != 0)
-                throw logic_error("ObjIdBindingFixture::GetById: VPathRelease failed");   
-        }
-        return rc;
-    }
-    rc_t GetByUri(const string& uri, uint32_t& id)
-    {
-        VPath* p;
-        if (VFSManagerMakePath(mgr, &p, uri.c_str()) != 0)
-            throw logic_error("ObjIdBindingFixture::GetByUri: VFSManagerMakePath failed"); 
-        rc_t rc = VFSManagerGetObjectId(mgr, p, &id);
-        if (VPathRelease(p) != 0)
-            throw logic_error("ObjIdBindingFixture::GetById: VPathRelease failed");   
-        return rc;
-    }
-};
-
-char ObjIdBindingFixture::bindings[];
-
-FIXTURE_TEST_CASE(ObjIdRegister, ObjIdBindingFixture)
-{
-    SetUp(GetName());
-    
-    REQUIRE_RC(Register(1, "ncbi-acc:acc1"));
-    REQUIRE_RC(Register(2, "ncbi-file:acc2"));
-}
-FIXTURE_TEST_CASE(ObjIdRegister_Found_Same, ObjIdBindingFixture)
-{
-    SetUp(GetName());
-    
-    REQUIRE_RC(Register(1, "ncbi-acc:acc1"));
-    REQUIRE_RC(Register(2, "ncbi-file:acc2"));
-    REQUIRE_RC(Register(1, "ncbi-acc:acc1")); // same name, no problem
-}
-FIXTURE_TEST_CASE(ObjIdRegister_Found_Different, ObjIdBindingFixture)
-{
-    SetUp(GetName());
-    
-    REQUIRE_RC(Register(1, "ncbi-acc:acc1"));
-    REQUIRE_RC(Register(2, "ncbi-file:acc2"));
-    REQUIRE_RC_FAIL(Register(1, "ncbi-acc:acc11")); // name differs
-}
-FIXTURE_TEST_CASE(ObjIdById_Found, ObjIdBindingFixture)
-{
-    SetUp(GetName());
-    
-    REQUIRE_RC(Register(123, "ncbi-file:acc123"));
-    REQUIRE_RC(Register(12, "ncbi-acc:acc12"));
-    REQUIRE_RC(Register(1, "ncbi-acc:acc1"));
-    
-    string uri;
-    
-    REQUIRE_RC(GetById(123, uri));
-    REQUIRE_EQ(uri, string("ncbi-file:acc123"));
-    
-    REQUIRE_RC(GetById(12, uri));
-    REQUIRE_EQ(uri, string("ncbi-acc:acc12"));
-    
-    REQUIRE_RC(GetById(1, uri));
-    REQUIRE_EQ(uri, string("ncbi-acc:acc1"));
-}
-FIXTURE_TEST_CASE(ObjIdById_NotFound, ObjIdBindingFixture)
-{
-    SetUp(GetName());
-    
-    REQUIRE_RC(Register(100, "ncbi-acc:acc1"));
-    REQUIRE_RC(Register(200, "ncbi-file:acc2"));
-    
-    string uri;
-    
-    REQUIRE_RC_FAIL(GetById(100200, uri));
-}
-FIXTURE_TEST_CASE(ObjId_DefaultLocation, ObjIdBindingFixture)
-{
-    VFSManagerSetBindingsFile(mgr, NULL);
-    REQUIRE_RC_FAIL(VFSManagerGetObject(mgr, 1, &vpath)); // this will fail but set VFSManagerBindings to default
-    const char* bindings = VFSManagerGetBindingsFile(mgr);
-    REQUIRE_NOT_NULL(bindings);
-    
-    // verify default location
-    String* home;
-    REQUIRE_RC(KConfigReadString(VFSManagerGetConfig(mgr), "NCBI_HOME", &home));
-    REQUIRE_NOT_NULL(home);
-    REQUIRE_EQ(string(bindings), string(home->addr, home->size) + "/objid.mapping"); 
-    StringWhack(home);
-}
-
-FIXTURE_TEST_CASE(ObjIdByName_Found, ObjIdBindingFixture)
-{
-    SetUp(GetName());
-    
-    REQUIRE_RC(Register(11, "ncbi-acc:acc11"));
-    REQUIRE_RC(Register(21, "ncbi-file:acc21"));
-    REQUIRE_RC(Register(1, "ncbi-acc:acc1"));
-    
-    uint32_t id;
-    
-    REQUIRE_RC(GetByUri(string("ncbi-acc:acc11"), id));
-    REQUIRE_EQ((uint32_t)11, id);
-
-    REQUIRE_RC(GetByUri(string("ncbi-file:acc21"), id));
-    REQUIRE_EQ((uint32_t)21, id);
-    
-    REQUIRE_RC(GetByUri(string("ncbi-acc:acc1"), id));
-    REQUIRE_EQ((uint32_t)1, id);
-}
-FIXTURE_TEST_CASE(ObjIdByName_NotFound, ObjIdBindingFixture)
-{
-    SetUp(GetName());
-    
-    REQUIRE_RC(Register(1, "ncbi-acc:acc1"));
-    REQUIRE_RC(Register(2, "ncbi-file:acc2"));
-    
-    uint32_t id;
-    REQUIRE_RC_FAIL(GetByUri(string("ncbi-acc:acc2"), id));
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-const char UsageDefaultName[] = "test-manager";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=VManagerTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/test/vfs/ncbi/protected1/SRR999997 b/test/vfs/ncbi/protected1/SRR999997
deleted file mode 100644
index 2d8b9a7..0000000
--- a/test/vfs/ncbi/protected1/SRR999997
+++ /dev/null
@@ -1 +0,0 @@
-contents of a single-file object
\ No newline at end of file
diff --git a/test/vfs/ncbi/protected1/SRR999997.ncbi_enc b/test/vfs/ncbi/protected1/SRR999997.ncbi_enc
deleted file mode 100644
index f039593..0000000
Binary files a/test/vfs/ncbi/protected1/SRR999997.ncbi_enc and /dev/null differ
diff --git a/test/vfs/ncbi_enc b/test/vfs/ncbi_enc
deleted file mode 100644
index f16fe6b..0000000
Binary files a/test/vfs/ncbi_enc and /dev/null differ
diff --git a/test/vfs/path-test.c b/test/vfs/path-test.c
deleted file mode 100644
index 2290580..0000000
--- a/test/vfs/path-test.c
+++ /dev/null
@@ -1,765 +0,0 @@
-/*===========================================================================
- *
- *                            PUBLIC DOMAIN NOTICE
- *               National Center for Biotechnology Information
- *
- *  This software/database is a "United States Government Work" under the
- *  terms of the United States Copyright Act.  It was written as part of
- *  the author's official duties as a United States Government employee and
- *  thus cannot be copyrighted.  This software/database is freely available
- *  to the public for use. The National Library of Medicine and the U.S.
- *  Government have not placed any restriction on its use or reproduction.
- *
- *  Although all reasonable efforts have been taken to ensure the accuracy
- *  and reliability of the software and data, the NLM and the U.S.
- *  Government do not and cannot warrant the performance or results that
- *  may be obtained by using this software or data. The NLM and the U.S.
- *  Government disclaim all warranties, express or implied, including
- *  warranties of performance, merchantability or fitness for any particular
- *  purpose.
- *
- *  Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- */
-
-#include <vfs/extern.h>
-
-#undef LIB_EXPORT
-#define LIB_EXPORT /* ignore me */
-#undef VFS_EXTERN
-#define VFS_EXTERN /* ignore me */
-
-#include "../libs/vfs/path.c"
-
-#include <klib/out.h>
-#include <klib/status.h> /* STSMSG */
-
-#include <kfg/config.h>
-#include <kapp/args.h>
-#include <kapp/main.h>
-
-static
-const char *VPathGetAccTypeStr ( const VPath * self )
-{
-    switch ( self -> acc_code >> 8 )
-    {
-    case 0x000:
-        return "";
-
-    case 0x015:
-    case 0x026:
-    case 0x106:
-    case 0x126:
-        return " ( appREFSEQ )";
-
-    case 0x109:
-        if ( ( self -> acc_code & 0xF ) != 0 )
-                return " ( appNANNOT )";
-        if ( self -> path . addr [ 0 ] == 'G' &&
-             self -> path . addr [ 1 ] == 'C' &&
-             ( self -> path . addr [ 2 ] == 'A' || self -> path . addr [ 2 ] == 'F' ) &&
-             self -> path . addr [ 3 ] == '_' )
-        {
-            return " ( appNANNOT )";
-        }
-        return " ( appREFSEQ )";
-
-    case 0x036:
-    case 0x037:
-    case 0x038:
-    case 0x039:
-        if ( ( (self -> acc_code >> 4) & 0xF ) == 0 )
-            return " ( appSRA )";
-            
-        {
-            const char pileup_ext[] = ".pileup";
-            size_t pileup_ext_size = sizeof( pileup_ext ) / sizeof( pileup_ext[0] ) - 1;
-            size_t path_size = self -> path . size;
-            
-            
-            if ( path_size > pileup_ext_size && memcmp(&self -> path . addr[path_size - pileup_ext_size], pileup_ext, pileup_ext_size) == 0)
-            {
-                return " ( appSRAPileup )";
-            }
-        }
-            
-        return " ( appAny )";
-
-    case 0x042:
-    case 0x048:
-    case 0x049:
-    case 0x142:
-    case 0x148:
-    case 0x149:
-        return " ( appWGS )";
-
-    case 0x029:
-        if ( self -> acc_code == 0x02910 )
-        {
-            if ( self -> path . addr [ 0 ] == 'N' &&
-                 self -> path . addr [ 1 ] == 'A' )
-            {
-                return " ( appNANNOT )";
-            }
-        }
-
-        /* no break */
-    default:
-        return " ( unrecognized )";
-    }
-}
-
-
-static
-const char *VPathGetSchemeTypeStr ( const VPath * self )
-{
-    switch ( self -> scheme_type )
-    {
-#define CASE( x ) \
-        case x: return # x
-
-    CASE ( vpuri_none );
-    CASE ( vpuri_not_supported );
-    CASE ( vpuri_ncbi_file );
-    CASE ( vpuri_file );
-    CASE ( vpuri_ncbi_acc );
-    CASE ( vpuri_http );
-    CASE ( vpuri_ftp );
-    CASE ( vpuri_ncbi_legrefseq );
-    CASE ( vpuri_ncbi_obj );
-    CASE ( vpuri_fasp );
-
-#undef CASE
-    }
-
-    return "<INVALID>";
-}
-
-
-static
-const char *VPathGetPathTypeStr ( const VPath * self )
-{
-    switch ( self -> path_type )
-    {
-#define CASE( x ) \
-        case x: return # x
-
-    CASE ( vpInvalid );
-    CASE ( vpOID );
-    CASE ( vpAccession );
-    CASE ( vpNameOrOID );
-    CASE ( vpNameOrAccession );
-    CASE ( vpName );
-    CASE ( vpRelPath );
-    CASE ( vpFullPath );
-    CASE ( vpUNCPath );
-    CASE ( vpHostName );
-    CASE ( vpEndpoint );
-
-#undef CASE
-    }
-
-    return "<INVALID>";
-}
-
-
-static
-const char *VPathGetHostTypeStr ( const VPath * self )
-{
-    switch ( self -> host_type )
-    {
-#define CASE( x ) \
-        case x: return # x
-
-    CASE ( vhDNSName );
-    CASE ( vhIPv4 );
-    CASE ( vhIPv6 );
-
-#undef CASE
-    }
-
-    return "<INVALID>";
-}
-
-static
-void VPathDisplay ( const VPath * self )
-{
-    if ( self == NULL ) {
-        STSMSG(1, ( "<null>\n" ) );
-        STSMSG(1, ( "\n" ) );
-    }
-    else
-    {
-        size_t num_read;
-        char buffer [ 8192 ];
-        rc_t rc = VPathReadUri ( self, buffer, sizeof buffer, & num_read );
-        uint32_t size = ( rc == 0 ) ? ( uint32_t ) num_read
-            : ( GetRCState ( rc ) == rcInsufficient ) ? sizeof buffer : 0;
-
-        STSMSG(1, ("data        :  %lu bits, %lu bytes ( including NUL )\n"
-            , self -> data . elem_bits, self -> data . elem_count));
-        STSMSG(1, ("scheme      : '%S' ( size = %zu, len = %u )\n"
-            , & self -> scheme, self -> scheme . size, self -> scheme . len));
-        STSMSG(1, ("auth        : '%S' ( size = %zu, len = %u )\n"
-            , & self -> auth, self -> auth . size, self -> auth . len));
-        STSMSG(1, ("host        : '%S' ( size = %zu, len = %u )\n"
-            , & self -> host, self -> host . size, self -> host . len));
-        STSMSG(1, ("portname    : '%S' ( size = %zu, len = %u )\n"
-        , & self -> portname, self -> portname . size, self -> portname . len));
-        STSMSG(1, ("path        : '%S' ( size = %zu, len = %u )\n"
-        , & self -> path, self -> path . size, self -> path . len));
-        STSMSG(1, ("query       : '%S' ( size = %zu, len = %u )\n"
-            , & self -> query, self -> query . size, self -> query . len));
-        STSMSG(1, ("fragment    : '%S' ( size = %zu, len = %u )\n"
-            , & self -> fragment, self -> fragment . size, self -> fragment . len));
-        STSMSG(1, ("obj_id      :  %u\n", self -> obj_id));
-        STSMSG(1, ("acc_code    :  0x%X%s\n"
-            , self -> acc_code, VPathGetAccTypeStr ( self )));
-        STSMSG(1, ("ipv4        :  %u.%u.%u.%u\n"
-            , ( self -> ipv4 >> 24 ) & 0xFF, ( self -> ipv4 >> 16 ) & 0xFF,
-                ( self -> ipv4 >> 8 ) & 0xFF, ( self -> ipv4 >> 0 ) & 0xFF));
-        STSMSG(1, ("ipv6        :  %04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X\n"
-                   , self -> ipv6 [ 0 ], self -> ipv6 [ 1 ], self -> ipv6 [ 2 ], self -> ipv6 [ 3 ],
-                     self -> ipv6 [ 4 ], self -> ipv6 [ 5 ], self -> ipv6 [ 6 ], self -> ipv6 [ 7 ]));
-        STSMSG(1, ("portnum     :  %u\n"                   , self -> portnum));
-
-        STSMSG(1, ("scheme_type :  %u ( %s )\n"
-            , self -> scheme_type, VPathGetSchemeTypeStr ( self )));
-        STSMSG(1, ("path_type   :  %u ( %s )\n"
-            , self -> path_type, VPathGetPathTypeStr ( self )));
-        STSMSG(1, ("host_type   :  %u ( %s )\n"
-            , self -> host_type, VPathGetHostTypeStr ( self )));
-        STSMSG(1, ("from_uri    :  %s\n"
-            , self -> from_uri ? "true" : "false"));
-        STSMSG(1, ("\n"));
-        STSMSG(1, ("read back   : '%.*s' ( rc = %R, num_read = %zu )\n"
-            , size, buffer, rc, num_read));
-        STSMSG(1, ("\n"));
-    }
-}
-
-static
-rc_t ParseUrlTest ( const VFSManager * vfs )
-{
-    rc_t rc;
-    size_t i;
-    
-    static const char *test_urls [] =
-    {
-        /* accessions */
-        "SRR123456",
-        "SRR1234567",
-        "SRR12345678",
-        "SRR123456789",
-        "SRR123456.pileup",
-        "SRR1234567.pileup",
-        "SRR12345678.pileup",
-        "SRR123456789.pileup",
-        "J01415",
-        "J01415.2",
-        "CM000071",
-        "CM000039.2",
-        "NC_000012.10",
-        "NW_003315935.1",
-        "GPC_000000393.1",
-        "AAAB01",
-        "AAAA01000001",
-        "NZ_AAEW01",
-        "NZ_AAEW01000001",
-        "NA000008777.1",
-
-        "SRRR876",
-        "SRR000123.sra",
-
-        "ncbi-acc:SRR000123",
-        "ncbi-acc:NZ_AAEW01000001",
-
-        "ncbi-obj:12345",
-        "ncbi-obj:00123",
-        "123456",
-        "0987655",
-
-        "GCA_012345678.1",
-        "GCA_012345678.1_S",
-
-        /* <scheme>://<host>[:<port>]/<path>[?<query>][#<fragment>]*/
-        /*0*/ "http://www.abc.com/library/index.html?x&y=123&z=test#ignore-me",
-        /*1*/ "http://www.abc.com:123/library/index.html?x&y=123&z=test#ignore-me",
-        /*2*/ "HTTP://www.abc.com:123/library/index.html?x&y=123&z=test#ignore-me",
-
-        /* <scheme>://<host>[:<port>]/<path>[#<fragment>]*/
-        /*3*/ "http://www.abc.com/library/index.html#ignore-me",
-        /*4*/ "http://www.abc.com:123/library/index.html#ignore-me",
-
-        /* <scheme>://<host>[:<port>]/<path>[?<query>]*/
-        /*5*/ "http://www.abc.com/library/index.html?x&y=123&z=test",
-        /*6*/ "http://www.abc.com:123/library/index.html?x&y=123&z=test",
-
-        /* <scheme>://<host>[:<port>]/<path>*/
-        /*7*/ "http://www.abc.com/library/index.html",
-        /*8*/ "http://www.abc.com:80/library/index.html",
-
-        /* <scheme>://<host>[:<port>]*/
-        /*9*/ "http://www.abc.com",
-        /*10*/ "http://www.abc.com:80",
-
-        /* /<path>[#fragment]*/
-        /*11*/ "/library/index.html#ignore-me",
-
-        /* /<path>[?query]*/
-        /*12*/ "/library/index.html?x&y=123&z=test",
-        /*13*/ "///library",
-
-        /* having a login */
-        "ftp://anonftp@ftp.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/SRR053/SRR053325/SRR053325.sra",
-
-        /* having the fasp weirdness */
-        "fasp://anonftp@ftp.ncbi.nlm.nih.gov:/sra/sra-instant/reads/ByRun/sra/SRR/SRR053/SRR053325/SRR053325.sra",
-
-        /* some unc paths */
-        "//this/is/a/really/nice/UNC/path",
-        "ncbi-file://here/is/another",
-        "ncbi-file://here/is/yet/another#fraggy-the-bear",
-
-        /* now what does this produce, and why? */
-        "ncbi-file:///c/scanned-data/0001/file.sra?enc&pwd-file=/c/Users/JamesMcCoy/ncbi.pwd",
-
-        /* modification to accept bad paths because the FS does */
-        "/path/10315_3#63.bam"
-    };
-    const size_t num_urls = sizeof test_urls / sizeof test_urls [ 0 ];
-    
-    static const char *fail_url [] = 
-    {
-        /*<scheme>:/<path>*/
-        /*0*/ "http:/library/index.html",
-        /*1*/ "http//library/index.html",
-
-        /*<scheme>:/[#fragment]*/
-        /*2*/ "http:#ignore-me",
-
-        /*<scheme>:/[#query]*/
-        /*3*/ "http:?x&y=123&z=test",
-
-        /*<scheme>*/
-        /*4*/ "http",
-        /*5*/ "ftp",
-
-        /* <host>[:<port>]*/
-        /*6*/ "www.abc.com",
-        /*7*/ "www.abc.com:80",
-
-        /* <scheme>://<host>[:<port>]*/
-        /*8*/ "ftp://www.abc.com"
-        
-            
-    };
-    const size_t num_fail_urls = sizeof fail_url / sizeof fail_url [ 0 ];
-    
-    static const char *sys_path [] = 
-    {
-#if WINDOWS
-        "C:\\Program Files\\Wonderful\\Bob-o-matic",
-#endif
-        "//this/is/a/really/nice/UNC/path",
-        "SRR000123"
-    };
-    const size_t num_sys_paths = sizeof sys_path / sizeof sys_path [ 0 ];
-    
-    for ( i = 0; i < num_urls; ++ i )
-    {
-        VPath *vpath;
-        
-        String url;
-        StringInitCString ( & url, test_urls [ i ] );
-        
-        rc  = VFSManagerMakePath ( vfs, & vpath, "%S", & url );
-        if ( rc == 0 )
-        {
-            STSMSG(1,  ( "%s - VFSManagerMakePath succeeded -- %zu: %S\n"
-                       , __func__, i, & url ) );
-            VPathDisplay ( vpath );
-            VPathRelease ( vpath );
-        }
-        else
-        {
-            STSMSG(1, ( "%s: VFSManagerMakePath failed on iteration: '%zu' url: %S\n", __func__, i, & url));
-            STSMSG(1, ( "with rc=%R\n", rc));
-            STSMSG(1, ( "\n" ));
-            STSMSG(1, ( "%s: VFSManagerMakePath failed on iteration: '%zu' url: %S\n", __func__, i, & url ));
-            STSMSG(1, ( "with rc=%R\n", rc ));
-            STSMSG(1, ( "\n" ));
-            return rc;
-        }
-    }
-    
-    
-    for ( i = 0; i < num_fail_urls; ++ i )
-    {
-        VPath *vpath;
-        
-        String url;
-        StringInitCString ( & url, fail_url [ i ] );
-        
-        rc  = VFSManagerMakePath ( vfs, & vpath, "%S", & url );
-        if ( rc != 0 )
-        {
-            STSMSG(1,  ( "%s - VFSManagerMakePath succeeded in catching error-- %zu: %S\n", __func__, i, & url));
-            STSMSG(1,  ( "with rc=%R\n", rc ));
-            STSMSG(1, ( "\n" ));
-        }
-        else
-        {
-            STSMSG(1, ( "%s: VFSManagerMakePath failed catching error on iteration: '%zu' url: %S\n"
-                       , __func__, i, & url ) );
-            VPathDisplay ( vpath );
-            VPathRelease ( vpath );
-        }
-    }
-
-    for ( i = 0; i < num_sys_paths; ++ i )
-    {
-        VPath *vpath;
-
-        size_t num_read;
-        char buffer [ 4096 ];
-        
-        String sys;
-        StringInitCString ( & sys, sys_path [ i ] );
-        
-        rc  = VFSManagerMakeSysPath ( vfs, & vpath, sys_path [ i ] );
-        if ( rc == 0 )
-        {
-            STSMSG(1,  ( "%s - VFSManagerMakeSysPath succeeded -- %zu: %S\n"
-                       , __func__, i, & sys ) );
-            VPathDisplay ( vpath );
-            rc = VPathReadSysPath ( vpath, buffer, sizeof buffer, & num_read );
-            STSMSG(1,  ( "read sys    : '%.*s' ( rc = %R, num_read = %zu )\n"
-                       , ( uint32_t ) num_read, buffer
-                       , rc
-                       , num_read
-                 ) );
-            STSMSG(1,  ( "\n" ));
-
-            VPathRelease ( vpath );
-        }
-        else
-        {
-            STSMSG(1, ( "%s: VFSManagerMakeSysPath failed on iteration: '%zu' path: %S\n", __func__, i, & sys ));
-            STSMSG(1, ( "with rc=%R\n", rc ));
-            STSMSG(1,  ( "\n" ));
-            return rc;
-        }
-    }
-    
-    return 0;
-}
-
-static
-rc_t ModifyPathTest ( const VFSManager * vfs )
-{
-    rc_t rc;
-    size_t i;
-    static const char *test_urls [] =
-    {
-        /* simple accessions */
-        "SRR123456",
-        "SRR123456.pileup",
-        "NZ_AAEW01000001",
-        "NA000008777.1",
-        "GCA_012345678.1_S",
-
-        /* oid */
-        "ncbi-obj:123456",
-
-        /* names */
-        "SRR000123.sra",
-        "123456",
-
-        /* urls */
-        "http://www.abc.com/library/index.html",
-        "http://www.abc.com/library/index.html?x&y=123&z=test#ignore-me",
-
-        /* having auth portion */
-        "ftp://anonftp@ftp.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/SRR053/SRR053325/SRR053325.sra",
-
-        /* unc */
-        "//this/is/a/really/nice/UNC/path",
-        "ncbi-file://here/is/another",
-        "ncbi-file://here/is/yet/another#fraggy-the-bear",
-
-        /* degenerate fs paths */
-        "/path/10315_3#63.bam"
-    };
-    const size_t num_urls = sizeof test_urls / sizeof test_urls [ 0 ];
-
-    static const char *fail_url [] = 
-    {
-        /* host */
-        "http://www.abc.com",
-        "http://www.abc.com:80"
-    };
-    const size_t num_fail_urls = sizeof fail_url / sizeof fail_url [ 0 ];
-
-    static const char *test_ext [] =
-    {
-        ".vdbcache",
-        "_underscore_ext",
-        "",
-        NULL
-    };
-    const size_t num_ext = sizeof test_ext / sizeof test_ext [ 0 ];
-    
-    for ( i = 0; i < num_urls; ++ i )
-    {
-        VPath * orig;
-        
-        String url;
-        StringInitCString ( & url, test_urls [ i ] );
-        
-        rc  = VFSManagerMakePath ( vfs, & orig, "%S", & url );
-        if ( rc == 0 )
-        {
-            size_t j;
-            for ( j = 0; j < num_ext; ++ j )
-            {
-                VPath * vpath;
-                rc = VFSManagerMakePathWithExtension ( vfs, & vpath, orig, test_ext [ j ] );
-                if ( rc == 0 )
-                {
-                    STSMSG(1,  ( "%s - VFSManagerMakePathWithExtension succeeded -- %zu:%zu: '%S' + '%s'\n"
-                               , __func__, i, j, & url, test_ext [ j ] ) );
-                    VPathDisplay ( vpath );
-                    VPathRelease ( vpath );
-                }
-                else
-                {
-                    STSMSG(1, ( "%s: VFSManagerMakePathWithExtension failed on iteration: '%zu:%zu' url: '%S' + '%s'\n", __func__, i, j, & url, test_ext [ j ]));
-                    STSMSG(1, ( "with rc=%R\n", rc ));
-                    STSMSG(1, ( "\n" ));
-                    return rc;
-                }
-            }
-
-            VPathRelease ( orig );
-        }
-    }
-    
-    for ( i = 0; i < num_fail_urls; ++ i )
-    {
-        VPath * orig;
-        
-        String url;
-        StringInitCString ( & url, fail_url [ i ] );
-        
-        rc  = VFSManagerMakePath ( vfs, & orig, "%S", & url );
-        if ( rc == 0 )
-        {
-            size_t j;
-            for ( j = 0; j < num_ext; ++ j )
-            {
-                VPath * vpath;
-                rc = VFSManagerMakePathWithExtension ( vfs, & vpath, orig, test_ext [ j ] );
-                if ( rc != 0 )
-                {
-                    STSMSG(1,  ( "%s - VFSManagerMakePathWithExtension properly caught error -- %zu:%zu: '%S' + '%s'\n", __func__, i, j, & url, test_ext [ j ]));
-                    STSMSG(1,  ( "with rc=%R\n", rc ) );
-                    STSMSG(1,  ( "\n" ) );
-                    rc = 0;
-                }
-                else
-                {
-                    STSMSG(1, ( "%s: VFSManagerMakePathWithExtension failed to catch error on iteration: '%zu:%zu' url: '%S' + '%s'\n"
-                              , __func__, i, j, & url, test_ext [ j ] ));
-                    VPathDisplay ( vpath );
-                    VPathRelease ( vpath );
-                }
-            }
-
-            VPathRelease ( orig );
-        }
-    }
-
-    return 0;
-}
-
-static
-rc_t ExtractAccessionTest ( const VFSManager * vfs )
-{
-    rc_t rc;
-    size_t i;
-    static const char *test_urls [] =
-    {
-        /* simple accessions */
-        "SRR123456",
-        "SRR123456.pileup",
-        "NZ_AAEW01000001",
-        "NA000008777.1",
-        "GCA_012345678.1_S",
-
-        /* oid */
-        "ncbi-obj:123456",
-
-        /* names */
-        "SRR000123.sra",
-        "SRR000123.sra.ncbi_enc",
-        "SRR000123.vdbcache",
-        "SRR000123.pileup.sra",
-        "SRR000123.pileup.sra.ncbi_enc",
-        "SRR000123.pileup.vdbcache",
-
-        /* unc */
-        "//this/is/a/really/nice/UNC/path",
-        "ncbi-file://here/is/another",
-        "ncbi-file://here/is/yet/another#fraggy-the-bear",
-
-        "ftp://anonftp@ftp.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/SRR053/SRR053325/SRR053325.sra",
-        "ncbi-file://here/is/yet/another/NA000008777.1.vdbcache#fraggy-the-bear"
-    };
-    const size_t num_urls = sizeof test_urls / sizeof test_urls [ 0 ];
-
-    static const char *fail_url [] = 
-    {
-        /* urls */
-        "http://www.abc.com/library/index.html",
-        "http://www.abc.com/library/index.html?x&y=123&z=test#ignore-me",
-
-        /* host */
-        "http://www.abc.com",
-        "http://www.abc.com:80",
-
-        /* degenerate fs paths */
-        "123456",
-        "/path/10315_3#63.bam"
-    };
-    const size_t num_fail_urls = sizeof fail_url / sizeof fail_url [ 0 ];
-    
-    for ( i = 0; i < num_urls; ++ i )
-    {
-        VPath * orig;
-
-        String url;
-        StringInitCString ( & url, test_urls [ i ] );
-
-        rc  = VFSManagerMakePath ( vfs, & orig, "%S", & url );
-        if ( rc == 0 )
-        {
-            VPath * vpath;
-            rc = VFSManagerExtractAccessionOrOID ( vfs, & vpath, orig );
-            if ( rc == 0 )
-            {
-                STSMSG(1,  ( "%s - VFSManagerExtractAccessionOrOID succeeded -- %zu: '%S'\n"
-                           , __func__, i, & url ) );
-                VPathDisplay ( vpath );
-                VPathRelease ( vpath );
-            }
-            else
-            {
-                STSMSG(1, ( "%s: VFSManagerExtractAccessionOrOID failed on iteration: '%zu' url: '%S'\n", __func__, i, & url));
-                STSMSG(1, ( "with rc=%R\n", rc ));
-                STSMSG(1, ( "\n" ));
-                return rc;
-            }
-
-            VPathRelease ( orig );
-        }
-    }
-
-    for ( i = 0; i < num_fail_urls; ++ i )
-    {
-        VPath * orig;
-
-        String url;
-        StringInitCString ( & url, fail_url [ i ] );
-
-        rc  = VFSManagerMakePath ( vfs, & orig, "%S", & url );
-        if ( rc == 0 )
-        {
-            VPath * vpath;
-            rc = VFSManagerExtractAccessionOrOID ( vfs, & vpath, orig );
-            if ( rc != 0 )
-            {
-                STSMSG(1,  ( "%s - VFSManagerExtractAccessionOrOID properly caught error -- %zu: '%S'\n", __func__, i, & url));
-                STSMSG(1,  ( "with rc=%R\n", rc ) );
-                STSMSG(1,  ( "\n" ) );
-                rc = 0;
-            }
-            else
-            {
-                STSMSG(1, ( "%s: VFSManagerExtractAccessionOrOID failed to catch error on iteration: '%zu' url: '%S'\n"
-                          , __func__, i, & url ));
-                VPathDisplay ( vpath );
-                VPathRelease ( vpath );
-            }
-
-            VPathRelease ( orig );
-        }
-    }
-
-    return 0;
-}
-
-
-/* Version  EXTERN
- *  return 4-part version code: 0xMMmmrrrr, where
- *      MM = major release
- *      mm = minor release 
- *    rrrr = bug-fix release
- */
-ver_t CC KAppVersion ( void )
-{
-    return 0;
-}
-
-
-/* Usage
- *  This function is called when the command line argument
- *  handling sees -? -h or --help
- */
-rc_t CC UsageSummary ( const char *progname )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "path-test";
-
-rc_t CC Usage ( const Args *args )
-{
-    return 0;
-}
-
-    
-static
-rc_t run ( const char *progname )
-{
-    VFSManager * vfs;
-    rc_t rc = VFSManagerMake ( & vfs );
-    if ( rc == 0 )
-    {
-        rc = ParseUrlTest ( vfs );
-        if ( rc == 0 )
-            rc = ModifyPathTest ( vfs );
-        if ( rc == 0 )
-            rc = ExtractAccessionTest ( vfs );
-        VFSManagerRelease ( vfs );
-    }
-    return rc;
-}
-
-/* KMain
- */
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    Args *args;
-    rc_t rc = ArgsMakeAndHandle ( & args, argc, argv, 0 );
-    if ( rc == 0 )
-    {
-        KConfigDisableUserSettings ();
-        rc = run ( argv [ 0 ] );
-        ArgsWhack ( args );
-    }
-
-    return rc;
-}
diff --git a/test/vfs/pathtest.cpp b/test/vfs/pathtest.cpp
deleted file mode 100644
index 0095b77..0000000
--- a/test/vfs/pathtest.cpp
+++ /dev/null
@@ -1,737 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ==============================================================================
-*
-*/
-
-/**
-* Unit tests for VPath interface
-*/
-
-
-#include "../../libs/vfs/path-priv.h"
-
-#include <klib/text.h>
-
-#include <ktst/unit_test.hpp>
-
-#include <vfs/manager.h>
-#include <vfs/path.h>
-#include <vfs/path-priv.h>
-
-#include <stdexcept>
-
-#include <cstdlib>
-
-#include <climits> /* PATH_MAX */
-#ifndef PATH_MAX
-#define PATH_MAX 4096
-#endif
-
-#include <sysalloc.h>
-
-
-#define IGNORE_FAILURE_VDB_1551 0
-
-
-TEST_SUITE(VPathTestSuite);
-
-using namespace std;
-
-class PathFixture
-{
-public:
-    PathFixture()
-        : path(0)
-        , vfs ( 0 )
-    {
-        rc_t rc = VFSManagerMake ( & vfs );
-        if ( rc != 0 )
-            throw logic_error ( "PathFixture: VFSManagerMake failed" );
-    }
-    ~PathFixture()
-    {
-        VFSManagerRelease ( vfs );
-        if (path && VPathRelease(path) != 0)
-           throw logic_error("~PathFixture: VPathRelease failed");
-    }
-    string PathToString(const string& p_path)
-    {
-        if (VFSManagerMakePath(vfs, &path, p_path.c_str()))
-           throw logic_error("PathToString: VPathMake failed");
-        const String* uri;
-        if ( VPathMakeString(path, &uri) != 0 )
-           throw logic_error("PathToString: VPathMakeString failed");
-        
-        string ret = string(uri->addr, uri->size);
-        
-        free((void*)uri);
-        if (VPathRelease(path))
-           throw logic_error("PathToString: VPathRelease failed");
-        path = 0;
-          
-        return ret;
-    }
-    
-    VPath* path;
-    VFSManager * vfs;
-    
-    static const int BufSize = 1024;
-    char buf[BufSize]; 
-    size_t num_read;
-};
-
-FIXTURE_TEST_CASE(ReadPath, PathFixture)
-{
-    REQUIRE_RC(VFSManagerMakePath ( vfs, &path, "ncbi-file:qq?enc"));
-
-    REQUIRE_RC(VPathReadPath(path, buf, BufSize, &num_read));
-    REQUIRE_EQ(string(buf, num_read), string("qq"));
-}
-
-FIXTURE_TEST_CASE(MakeStringPlain, PathFixture)
-{
-    string filename = "filename";
-    REQUIRE_EQ(PathToString(filename), filename);
-}
-
-FIXTURE_TEST_CASE(MakeStringScheme, PathFixture)
-{
-    string filename = "ncbi-acc:filename";
-    REQUIRE_EQ(PathToString(filename), filename);
-}
-
-FIXTURE_TEST_CASE(MakeStringBadScheme, PathFixture)
-{
-    string filename = "ncbi-file:filename";
-    REQUIRE_EQ(PathToString(filename), filename);
-}
-
-FIXTURE_TEST_CASE(GetScheme, PathFixture)
-{
-    REQUIRE_RC(VFSManagerMakePath ( vfs, &path, "ncbi-file:qq?enc"));
-
-    String sch;
-    REQUIRE_RC(VPathGetScheme(path, &sch));
-    REQUIRE_EQ(string(sch.addr, sch.size), string("ncbi-file"));
-}
-
-FIXTURE_TEST_CASE(GetScheme_t, PathFixture)
-{
-    REQUIRE_RC(VFSManagerMakePath ( vfs, &path, "ncbi-file:qq?enc"));
-
-    VPUri_t uri_type;
-    REQUIRE_RC(VPathGetScheme_t(path, &uri_type));
-    REQUIRE_EQ(uri_type, (VPUri_t)vpuri_ncbi_file);
-}
-
-FIXTURE_TEST_CASE(GetScheme_NcbiObj, PathFixture)
-{
-    REQUIRE_RC(VFSManagerMakePath ( vfs, &path, "ncbi-obj:12/1/345"));
-    
-    VPUri_t uri_type;
-    REQUIRE_RC(VPathGetScheme_t(path, &uri_type));
-    REQUIRE_EQ(uri_type, (VPUri_t)vpuri_ncbi_obj);
-
-    String sch;
-    REQUIRE_RC(VPathGetScheme(path, &sch));
-    REQUIRE_EQ(string(sch.addr, sch.size), string("ncbi-obj"));
-    
-    REQUIRE_RC(VPathReadPath(path, buf, BufSize, &num_read));
-    REQUIRE_EQ(string(buf, num_read), string("12/1/345"));
-}
-
-#if WINDOWS
-
-//  VPathMakeSysPath
-
-FIXTURE_TEST_CASE( VFS_Native2Internal_1, PathFixture )
-{
-    cout << "VFSManagerMakeSysPath(native) -> VPathMakeString(internal)\n";
-    REQUIRE_RC(
-        VFSManagerMakeSysPath( vfs, &path, "C:\\somepath\\somefile.something"));
-    
-    const String *uri = NULL;
-    REQUIRE_RC( VPathMakeString( path, &uri ) );
-    REQUIRE_NOT_NULL( uri );
-    REQUIRE_EQ( string( "/C/somepath/somefile.something" ),
-                string( uri->addr, uri->size ) );
-}
-
-FIXTURE_TEST_CASE( VFS_Native2Internal_2, PathFixture )
-{
-    cout << "VFSManagerMakeSysPath(native) -> VPathReadPath(internal)" << endl;
-    REQUIRE_RC( VFSManagerMakeSysPath ( vfs, &path, "C:\\somepath\\somefile.something" ) );
-
-    char buffer[ 1024 ];
-    size_t num_writ;
-    REQUIRE_RC( VPathReadPath( path, buffer, sizeof buffer, &num_writ ) );
-    REQUIRE_EQ( string( "/C/somepath/somefile.something" ), string ( buffer, num_writ ) );
-}
-
-FIXTURE_TEST_CASE(VFS_Native2InternalNetwork, PathFixture) {
-    const string n("\\\\abc\\def\\ghi\\000379\\SRR388696");
-    const string p("//abc/def/ghi/000379/SRR388696");
-
-    {
-        REQUIRE_RC(VFSManagerMakeSysPath(vfs, &path, n.c_str()));
-
-        const String *uri = NULL;
-        REQUIRE_RC(VPathMakeString(path, &uri));
-        REQUIRE_NOT_NULL(uri);
-#if IGNORE_FAILURE_VDB_1551
-        REQUIRE_EQ(p, string(uri->addr, uri->size));
-#endif
-
-        char buffer[PATH_MAX] = "";
-        size_t num_writ = 0;
-        REQUIRE_RC(VPathReadPath(path, buffer, sizeof buffer, &num_writ));
-#if IGNORE_FAILURE_VDB_1551
-        REQUIRE_EQ(p, string(buffer, num_writ));
-#endif
-
-        REQUIRE_RC(VPathRelease(path));
-        path = NULL;
-    }
-    {
-        REQUIRE_RC( VFSManagerMakePath(vfs, &path, p.c_str()));
-
-        const String *uri = NULL;
-        REQUIRE_RC(VPathMakeSysPath(path, &uri));
-        REQUIRE_NOT_NULL(uri);
-#if IGNORE_FAILURE_VDB_1551
-        REQUIRE_EQ(n, string(uri->addr, uri->size));
-
-        char buffer[PATH_MAX] = "";
-        size_t num_writ = 0;
-        REQUIRE_RC(VPathReadSysPath(path, buffer, sizeof buffer, &num_writ));
-        REQUIRE_EQ(n, string(buffer, num_writ));
-#endif
-    }
-}
-
-//  VPathMakePath
-
-FIXTURE_TEST_CASE( VFS_Internal2Native_1, PathFixture )
-{
-    cout << "VFSManagerMakePath(internal) -> VPathReadSysPath(native)" << endl;
-    REQUIRE_RC( VFSManagerMakePath ( vfs, &path, "/C/somepath/somefile.something" ) );
-
-    const String * uri;
-    REQUIRE_RC( VPathMakeSysPath( path, &uri ) );
-    REQUIRE_NOT_NULL( uri );
-    REQUIRE_EQ( string( "C:\\somepath\\somefile.something" ), string ( uri->addr, uri->size ) );
-}
-
-FIXTURE_TEST_CASE( VFS_Internal2Native_2, PathFixture )
-{
-    cout << "VFSManagerMakePath(internal) -> VPathReadSysPath(native)" << endl;
-    REQUIRE_RC( VFSManagerMakePath ( vfs, &path, "/C/somepath/somefile.something" ) );
-
-    char buffer[ 1024 ];
-    size_t num_writ;
-    REQUIRE_RC( VPathReadSysPath( path, buffer, sizeof buffer, &num_writ ) );
-    REQUIRE_EQ( string( "C:\\somepath\\somefile.something" ), string ( buffer, num_writ ) );
-}
-
-#endif // WINDOWS
-
-//TODO:
-//  VPathGetPath
-
-// Functions from path-priv.h
-    
-FIXTURE_TEST_CASE(Option_Encrypt, PathFixture)
-{
-    REQUIRE_RC(VFSManagerMakePath ( vfs, &path, "ncbi-file:qq?enc"));
-    
-    REQUIRE_RC(VPathOption (path, vpopt_encrypted, buf, BufSize, &num_read));
-    REQUIRE_EQ(num_read, (size_t)0);
-}
-
-//TODO:
-// VPathMakeFmt
-// VPathMakeVFmt
-// VPathMakeRelative 
-// VPathMakeRelativeFmt 
-// VPathVMakeRelativeFmt 
-// VPathMakeCurrentPath 
-// VPathMakeURI 
-// VPathGetCWD
-
-FIXTURE_TEST_CASE(MarkHighReliability, PathFixture)
-{
-    REQUIRE_RC ( VFSManagerMakePath ( vfs, &path, "ncbi-file:qq?enc" ) );
-    REQUIRE ( ! VPathIsHighlyReliable ( path ) );
-    
-    REQUIRE_RC ( VPathMarkHighReliability(path, true) );
-    REQUIRE ( VPathIsHighlyReliable ( path ) );
-    
-    REQUIRE_RC ( VPathMarkHighReliability(path, false) );
-    REQUIRE ( ! VPathIsHighlyReliable ( path ) );
-}
-
-FIXTURE_TEST_CASE(NAME_SERVER_PROTECTED_HTTP, PathFixture) {
-    {
-#define HOST "gap-download.ncbi.nlm.nih.gov"
-#define PATH "/1234ABCD-22BB-CC33-4C4C-D5E6F7890A1B/SRR123456.sra"
-#define URL "http://" HOST PATH
-#define TIC "1A2B3C4D-2B3C-4D5E-6F78-90A1B23C4D5E"
-        String download_ticket, url;
-        CONST_STRING(&download_ticket, TIC);
-        CONST_STRING(&url, URL);
-        REQUIRE_RC(VPathMakeFmt(&path, "%S?tic=%S", &url, &download_ticket));
-        REQUIRE(path);
-    }
-/*  {   TODO VFSManagerExtractAccessionOrOID should extract SRR123456
-        VPath *acc_or_oid = NULL;
-        REQUIRE_RC(VFSManagerExtractAccessionOrOID(vfs, &acc_or_oid, path));
-        REQUIRE(acc_or_oid);
-        REQUIRE_RC(VPathRelease(acc_or_oid));
-        acc_or_oid = NULL;
-    }*/
-    REQUIRE(!VPathIsAccessionOrOID(path));
-    REQUIRE(VPathIsFSCompatible(path));
-    REQUIRE(VPathFromUri(path));
-    REQUIRE(!VPathIsHighlyReliable(path));
-
-    size_t num_read = 0;
-    {
-        const string e(URL "?tic=" TIC);
-        char buffer[4096] = "";
-        REQUIRE_RC(VPathReadUri(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-        {
-            const String *str = NULL;
-            REQUIRE_RC(VPathMakeUri(path, &str));
-            REQUIRE(str);
-            REQUIRE_EQ(string(str->addr), e);
-            REQUIRE_EQ(str->size, e.size());
-            REQUIRE_EQ(str->size, (size_t)str->len);
-            free(const_cast<String*>(str));
-        }
-        {
-            const String *str = NULL;
-            REQUIRE_RC(VPathMakeString(path, &str));
-            REQUIRE(str);
-            REQUIRE_EQ(string(str->addr), e);
-            REQUIRE_EQ(str->size, e.size());
-            REQUIRE_EQ(str->size, (size_t)str->len);
-            free(const_cast<String*>(str));
-        }
-    }
-    {
-        char buffer[4096] = "";
-        const string e("http");
-        REQUIRE_RC(VPathReadScheme(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-        {
-            String str;
-            REQUIRE_RC(VPathGetScheme(path, &str));
-            REQUIRE_EQ(string(str.addr, 0, str.len), e);
-            REQUIRE_EQ(str.size, e.size());
-            REQUIRE_EQ(str.size, (size_t)str.len);
-        }
-    }
-    {
-        char buffer[4096] = "";
-        const string e;
-        REQUIRE_RC(VPathReadAuth(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-        {
-            String str;
-            REQUIRE_RC(VPathGetAuth(path, &str));
-            REQUIRE(! str.addr);
-            REQUIRE_EQ(str.size, e.size());
-            REQUIRE_EQ(str.size, (size_t)str.len);
-        }
-    }
-    {
-        char buffer[4096] = "";
-        const string e(HOST);
-        REQUIRE_RC(VPathReadHost(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-        {
-            String str;
-            REQUIRE_RC(VPathGetHost(path, &str));
-            REQUIRE_EQ(string(str.addr, 0, str.len), e);
-            REQUIRE_EQ(str.size, e.size());
-            REQUIRE_EQ(str.size, (size_t)str.len);
-        }
-    }
-    {
-        char buffer[4096] = "";
-        const string e;
-        REQUIRE_RC(VPathReadPortName(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-        {
-            String str;
-            REQUIRE_RC(VPathGetPortName(path, &str));
-            REQUIRE(! str.addr);
-            REQUIRE_EQ(str.size, e.size());
-            REQUIRE_EQ(str.size, (size_t)str.len);
-            REQUIRE( ! VPathGetPortNum(path));
-        }
-    }
-    {
-        char buffer[4096] = "";
-        const string e(PATH);
-        REQUIRE_RC(VPathReadPath(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-        {
-            String str;
-            REQUIRE_RC(VPathGetPath(path, &str));
-            REQUIRE_EQ(string(str.addr, 0, str.len), e);
-            REQUIRE_EQ(str.size, e.size());
-            REQUIRE_EQ(str.size, (size_t)str.len);
-        }
-    }
-    {
-        char buffer[4096] = "";
-        const string e(PATH);
-        REQUIRE_RC(VPathReadSysPath(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-        {
-            const String *s = NULL;
-            REQUIRE_RC(VPathMakeSysPath(path, &s));
-            REQUIRE(s);
-            REQUIRE_EQ(string(s->addr), e);
-            REQUIRE_EQ(s->size, e.size());
-            REQUIRE_EQ(s->size, (size_t)s->len);
-            free(const_cast<String*>(s));
-        }
-    }
-    {
-        char buffer[4096] = "";
-        const string e("tic=" TIC);
-        REQUIRE_RC(VPathReadQuery(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size()); REQUIRE_EQ(string(buffer), e);
-        {
-            String str;
-            REQUIRE_RC(VPathGetQuery(path, &str));
-            REQUIRE_EQ(string(str.addr, 0, str.len), e);
-            REQUIRE_EQ(str.size, e.size());
-            REQUIRE_EQ(str.size, (size_t)str.len);
-        }
-    }
-    {
-        char buffer[4096] = "";
-        const string e(TIC);
-        REQUIRE_RC
-            (VPathReadParam(path, "tic", buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size()); REQUIRE_EQ(string(buffer), e);
-        {
-            String str;
-            REQUIRE_RC(VPathGetParam(path, "tic", &str));
-            REQUIRE_EQ(string(str.addr, 0, str.len), e);
-            REQUIRE_EQ(str.size, e.size());
-            REQUIRE_EQ(str.size, (size_t)str.len);
-        }
-    }
-        REQUIRE(num_read);
-    {
-        char buffer[4096] = "";
-        const string e;
-        REQUIRE_RC_FAIL
-            (VPathReadParam(path, "ti", buffer, sizeof buffer, &num_read));
-        REQUIRE(! num_read);
-        {
-            String str;
-            REQUIRE_RC_FAIL(VPathGetParam(path, "ti", &str));
-        }
-    }
-    {
-        char buffer[4096] = "";
-        const string e;
-        REQUIRE_RC(VPathReadFragment(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size()); REQUIRE_EQ(string(buffer), e);
-        {
-            String str;
-            REQUIRE_RC(VPathGetFragment(path, &str));
-            REQUIRE_EQ(str.addr, (const char*)NULL);
-            REQUIRE_EQ(str.size, e.size());
-            REQUIRE_EQ(str.size, (size_t)str.len);
-        }
-    }
-
-    REQUIRE( ! VPathGetOid(path));
-}
-
-FIXTURE_TEST_CASE(NAME_SERVER_PROTECTED_FASP, PathFixture) {
-    {
-#undef URL
-#define URL "fasp://dbtest@gap-download.ncbi.nlm.nih.gov:data/sracloud/1234ABCD-22BB-CC33-4C4C-D5E6F7890A1B/SRR123456.sra"
-        String download_ticket, url;
-        CONST_STRING(&download_ticket, TIC);
-        CONST_STRING(&url, URL);
-        REQUIRE_RC(VPathMakeFmt(&path, "%S?tic=%S", &url, &download_ticket));
-        REQUIRE(path);
-    }
-    {
-        const string e(URL "?tic=" TIC);
-        char buffer[4096] = "";
-        size_t num_read = 0;
-        REQUIRE_RC(VPathReadUri(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-}
-
-FIXTURE_TEST_CASE(FILENAME, PathFixture) {
-#undef PATH
-#define PATH "file.txt"
-    REQUIRE_RC(VFSManagerMakePath(vfs, &path, "%s", PATH));
-    REQUIRE(path);
-    {
-        char buffer[4096] = "";
-        const string e("file");
-        REQUIRE_RC(VPathReadScheme(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-    {
-        char buffer[4096] = "";
-        const string e(PATH);
-        REQUIRE_RC(VPathReadPath(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-}
-
-FIXTURE_TEST_CASE(SPACE_IN_FILENAME, PathFixture) {
-#undef PATH
-#define PATH "file elif.txt"
-    REQUIRE_RC(VFSManagerMakePath(vfs, &path, "%s", PATH));
-    REQUIRE(path);
-    {
-        char buffer[4096] = "";
-        const string e("file");
-        REQUIRE_RC(VPathReadScheme(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-    {
-        char buffer[4096] = "";
-        const string e(PATH);
-        REQUIRE_RC(VPathReadPath(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-}
-
-FIXTURE_TEST_CASE(CYRYLLIC_WIN_IN_FILENAME, PathFixture) {
-#undef PATH
-#define PATH "./:OJDF800"
-    REQUIRE_RC(VFSManagerMakePath(vfs, &path, "%s", PATH));
-    REQUIRE(path);
-    {
-        char buffer[4096] = "";
-        const string e("file");
-        REQUIRE_RC(VPathReadScheme(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-    {
-        char buffer[4096] = "";
-        const string e(PATH);
-        REQUIRE_RC(VPathReadPath(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-}
-
-FIXTURE_TEST_CASE(CYRYLLIC_IN_FILENAME, PathFixture) {
-#undef PATH
-//   #define PATH "��.txt"
-#define PATH "\xC4\xB0\xB9\xBB.txt"
-    REQUIRE_RC(VFSManagerMakePath(vfs, &path, "%s", PATH));
-    REQUIRE(path);
-    {
-        char buffer[4096] = "";
-        const string e("file");
-        REQUIRE_RC(VPathReadScheme(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-    {
-        char buffer[4096] = "";
-        const string e(PATH);
-        REQUIRE_RC(VPathReadPath(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-}
-
-FIXTURE_TEST_CASE(TAB_IN_FILENAME, PathFixture) {
-#undef PATH
-#define PATH "file\telif.txt"
-    REQUIRE_RC(VFSManagerMakePath(vfs, &path, "%s", PATH));
-    REQUIRE(path);
-    {
-        char buffer[4096] = "";
-        const string e("file");
-        REQUIRE_RC(VPathReadScheme(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-    {
-        char buffer[4096] = "";
-        const string e(PATH);
-        REQUIRE_RC(VPathReadPath(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-}
-
-FIXTURE_TEST_CASE(POUNT_IN_FILENAME, PathFixture) {
-#undef PATH
-#define PATH "./file#elif.txt"
-    REQUIRE_RC(VFSManagerMakePath(vfs, &path, "%s", PATH));
-    REQUIRE(path);
-    {
-        char buffer[4096] = "";
-        const string e("file");
-        REQUIRE_RC(VPathReadScheme(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-    {
-        char buffer[4096] = "";
-        const string e(PATH);
-        REQUIRE_RC(VPathReadPath(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-}
-
-FIXTURE_TEST_CASE(QUESTION_IN_FILENAME, PathFixture) {
-#undef PATH
-#define PATH "./file?elif.txt"
-    REQUIRE_RC(VFSManagerMakePath(vfs, &path, "%s", PATH));
-    REQUIRE(path);
-    {
-        char buffer[4096] = "";
-        const string e("file");
-        REQUIRE_RC(VPathReadScheme(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-    {
-        char buffer[4096] = "";
-        const string e(PATH);
-        REQUIRE_RC(VPathReadPath(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-}
-
-FIXTURE_TEST_CASE(COLON_IN_FILENAME, PathFixture) {
-#undef PATH
-#define PATH "./file:elif.txt"
-    REQUIRE_RC(VFSManagerMakePath(vfs, &path, "%s", PATH));
-    REQUIRE(path);
-    {
-        char buffer[4096] = "";
-        const string e("file");
-        REQUIRE_RC(VPathReadScheme(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-    {
-        char buffer[4096] = "";
-        const string e(PATH);
-        REQUIRE_RC(VPathReadPath(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-}
-
-FIXTURE_TEST_CASE(UTF8_FILENAME, PathFixture) {
-#undef PATH
-#define PATH "f\xD0\xA4" "e.txt"
-    REQUIRE_RC(VFSManagerMakePath(vfs, &path, "%s", PATH));
-    REQUIRE(path);
-    {
-        char buffer[4096] = "";
-        const string e("file");
-        REQUIRE_RC(VPathReadScheme(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-    {
-        char buffer[4096] = "";
-        const string e(PATH);
-        REQUIRE_RC(VPathReadPath(path, buffer, sizeof buffer, &num_read));
-        REQUIRE_EQ(num_read, e.size());
-        REQUIRE_EQ(string(buffer), e);
-    }
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <klib/rc.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-const char UsageDefaultName[] = "test-path";
-
-static void clear_recorded_errors( void )
-{
-    rc_t rc;
-    const char * filename;
-    const char * funcname;
-    uint32_t line_nr;
-    while ( GetUnreadRCInfo ( &rc, &filename, &funcname, &line_nr ) )
-    {
-    }
-}
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    rc_t rc=VPathTestSuite(argc, argv);
-    clear_recorded_errors();
-    return rc;
-}
-
-}
diff --git a/test/vfs/resolvertest.cpp b/test/vfs/resolvertest.cpp
deleted file mode 100644
index 6c63893..0000000
--- a/test/vfs/resolvertest.cpp
+++ /dev/null
@@ -1,344 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ==============================================================================
-*
-*/
-
-/**
-* Unit tests for VResolver interface
-*/
-
-
-#include <klib/text.h>
-
-#include <ktst/unit_test.hpp>
-
-#include <kfg/config.h>
-#include <kfs/file.h>
-#include <kfs/directory.h>
-
-#include <vfs/manager.h>
-#include <vfs/manager-priv.h> /* VFSManagerMakeFromKfg */
-#include <vfs/resolver.h>
-#include <vfs/path.h>
-
-#include <cstdlib>
-#include <fstream>
-#include <stdexcept>
-
-#include <climits> /* PATH_MAX */
-
-#include <sysalloc.h>
-
-TEST_SUITE(VResolverTestSuite);
-
-using namespace std;
-
-static string ToString(const VPath* path)
-{
-    const String * s;
-    if ( VPathMakeString (path, &s) != 0 )
-        throw logic_error ( "ToString(VPath) failed" );
-    string ret = string(s->addr, s->size);
-    free((void*)s);
-    return ret;
-}
-
-class ResolverFixture
-{
-public:
-    ResolverFixture()
-        : vfs ( 0 )
-        , resolver ( 0 )
-        , query ( 0 )
-        , local ( 0 )
-        , remote ( 0 )
-        , cache ( 0 )
-    {
-        rc_t rc = VFSManagerMake ( & vfs );
-        if ( rc != 0 )
-            throw logic_error ( "ResolverFixture: VFSManagerMake failed" );
-        rc = VFSManagerGetResolver ( vfs, & resolver );
-        if ( rc != 0 )
-            throw logic_error ( "ResolverFixture: VFSManagerGetResolver failed" );
-    }
-
-    ~ResolverFixture()
-    {
-        VResolverRelease ( resolver );
-        VFSManagerRelease ( vfs );
-    }
-    
-    VFSManager * vfs;
-    VResolver * resolver;
-    VPath * query;
-    const VPath * local;
-    const VPath * remote;
-    const VPath * cache;
-};
-
-FIXTURE_TEST_CASE ( VDB_2936_resolve_local_WGS_without_version, ResolverFixture )
-{
-    String acc;
-    CONST_STRING ( & acc, "JBBO01" );
-
-    REQUIRE_RC ( VFSManagerMakePath ( vfs, & query, "%S", & acc ) );
-    try
-    {
-        rc_t rc2 = VResolverQuery ( resolver, eProtocolHttp, query, & local, 0, 0 );
-        if ( rc2 == 0 )
-        {
-            try
-            {
-                String path;
-                REQUIRE_RC ( VPathGetPath ( local, & path ) );
-                if ( path . size > acc . size )
-                    REQUIRE_EQ ( path . addr [ path . size - acc . size - 1 ], '/' );
-                else
-                    REQUIRE_EQ ( path . size, acc . size );
-
-                String sub;
-                StringSubstr ( & path, & sub, path . len - acc . len, 0 );
-                REQUIRE_EQ ( StringCompare ( & acc, & sub ), ( int ) 0 );
-            }
-            catch ( ... )
-            {
-                VPathRelease ( local ); local = 0;
-                throw;
-            }
-
-            VPathRelease ( local ); local = 0;
-        }
-    }
-    catch ( ... )
-    {
-        VPathRelease ( query ); query = 0;
-        throw;
-    }
-
-    VPathRelease ( query ); query = 0;
-}
-
-FIXTURE_TEST_CASE ( VDB_2936_resolve_local_WGS_with_version, ResolverFixture )
-{
-    String acc;
-    CONST_STRING ( & acc, "JBBO01.1" );
-
-    REQUIRE_RC ( VFSManagerMakePath ( vfs, & query, "%S", & acc ) );
-    try
-    {
-        rc_t rc2 = VResolverQuery ( resolver, eProtocolHttp, query, & local, 0, 0 );
-        if ( rc2 == 0 )
-        {
-            try
-            {
-                String path;
-                REQUIRE_RC ( VPathGetPath ( local, & path ) );
-                if ( path . size > acc . size )
-                    REQUIRE_EQ ( path . addr [ path . size - acc . size - 1 ], '/' );
-                else
-                    REQUIRE_EQ ( path . size, acc . size );
-
-                String sub;
-                StringSubstr ( & path, & sub, path . len - acc . len, 0 );
-                REQUIRE_EQ ( StringCompare ( & acc, & sub ), ( int ) 0 );
-            }
-            catch ( ... )
-            {
-                VPathRelease ( local ); local = 0;
-                throw;
-            }
-
-            VPathRelease ( local ); local = 0;
-        }
-    }
-    catch ( ... )
-    {
-        VPathRelease ( query ); query = 0;
-        throw;
-    }
-
-    VPathRelease ( query ); query = 0;
-}
-
-class ResolverFixtureCustomConfig
-{
-public:
-    ResolverFixtureCustomConfig()
-        : vfs ( 0 )
-        , resolver ( 0 )
-    {
-    }
-
-    ~ResolverFixtureCustomConfig()
-    {
-        if (vfs && VFSManagerRelease(vfs) != 0)
-            throw logic_error ( "~ResolverFixtureCustomConfig: VFSManagerRelease failed" );
-
-        if (resolver && VResolverRelease(resolver) != 0)
-            throw logic_error ( "~ResolverFixtureCustomConfig: VResolverRelease failed" );
-
-        remove(m_configName.c_str());
-    }
-
-    void Configure(const string& name, const string& config_content)
-    {
-        m_configName = name+".kfg";
-        std::ofstream f(m_configName.c_str());
-        f   << config_content;
-        f.close();
-
-        KDirectory *wd;
-        if (KDirectoryNativeDir(&wd))
-            throw logic_error ( "ResolverFixtureCustomConfig::Configure: KDirectoryNativeDir failed" );
-
-        KConfig *cfg;
-        if (KConfigMake(&cfg, wd))
-            throw logic_error ( "ResolverFixtureCustomConfig::Configure: KConfigMake failed" );
-
-        if (VFSManagerMakeFromKfg(&vfs, cfg))
-            throw logic_error ( "ResolverFixtureCustomConfig::Configure: VFSManagerMakeFromKfg failed" );
-
-        if (VFSManagerGetResolver ( vfs, & resolver ))
-            throw logic_error ( "ResolverFixtureCustomConfig::Configure: VFSManagerGetResolver failed" );
-
-        if (KConfigRelease(cfg))
-            throw logic_error ( "ResolverFixtureCustomConfig::Configure: KConfigRelease failed" );
-
-        if (KDirectoryRelease(wd))
-            throw logic_error ( "ResolverFixtureCustomConfig::Configure: KDirectoryRelease failed" );
-    }
-
-    string Resolve(const string& p_accession)
-    {
-        VPath * query;
-        const VPath * local;
-        string result;
-        if ( VFSManagerMakePath ( vfs, & query, "%s", p_accession.c_str() ) )
-            throw logic_error ( "ResolverFixtureCustomConfig::Resolve: VFSManagerMakePath failed" );
-        try
-        {
-            if ( VResolverQuery ( resolver, eProtocolHttp, query, & local, 0, 0 ) )
-                throw logic_error ( "ResolverFixtureCustomConfig::Resolve: VResolverQuery failed" );
-            try
-            {
-                result = ToString(local);
-            }
-            catch ( ... )
-            {
-                VPathRelease ( local ); local = 0;
-                throw;
-            }
-
-            VPathRelease ( local ); local = 0;
-        }
-        catch ( ... )
-        {
-            VPathRelease ( query ); query = 0;
-            throw;
-        }
-
-        VPathRelease ( query ); query = 0;
-        return result;
-    }
-
-    VFSManager * vfs;
-    VResolver * resolver;
-
-    string m_configName;
-};
-
-FIXTURE_TEST_CASE(VDB_2963_resolve_local_new_wgs, ResolverFixtureCustomConfig)
-{
-    string config =
-            "repository/user/main/public/root=\"./repo\"\n"
-            "repository/user/main/public/apps/wgs/volumes/wgs=\"wgs\"\n"
-            "repository/user/main/public/apps/wgs/volumes/wgs2=\"wgs2\"\n"
-            ;
-    Configure(GetName(), config);
-
-    REQUIRE_EQ ( Resolve ( "YYZZ99" ), string("./repo/wgs2/WGS/YY/ZZ/YYZZ99") );
-    REQUIRE_EQ ( Resolve ( "YYZZ20" ), string("./repo/wgs2/WGS/YY/ZZ/YYZZ20") );
-    REQUIRE_EQ ( Resolve ( "YYZZ10" ), string("./repo/wgs/WGS/YY/ZZ/YYZZ10") );
-}
-
-FIXTURE_TEST_CASE(VDB_2963_resolve_local_no_new_wgs, ResolverFixtureCustomConfig)
-{
-    string config =
-            "repository/user/main/public/root=\"./repo\"\n"
-            "repository/user/main/public/apps/wgs/volumes/wgs=\"wgs\"\n"
-            ;
-    Configure(GetName(), config);
-
-    REQUIRE_EQ ( Resolve ( "YYZZ99" ), string("./repo/wgs/WGS/YY/ZZ/YYZZ99") );
-    REQUIRE_EQ ( Resolve ( "YYZZ10" ), string("./repo/wgs/WGS/YY/ZZ/YYZZ10") );
-
-    try {
-        Resolve ( "YYZZ20" );
-        REQUIRE ( false ); // should throw earlier
-    } catch (...) { }
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <klib/rc.h>
-
-    ver_t CC KAppVersion ( void )
-    {
-        return 0x1000000;
-    }
-
-    rc_t CC UsageSummary (const char * progname)
-    {
-        return 0;
-    }
-
-    rc_t CC Usage ( const Args * args )
-    {
-        return 0;
-    }
-
-    const char UsageDefaultName[] = "test-resolver";
-
-    static void clear_recorded_errors ( void )
-    {
-        rc_t rc;
-        const char * filename;
-        const char * funcname;
-        uint32_t line_nr;
-        while ( GetUnreadRCInfo ( &rc, &filename, &funcname, &line_nr ) )
-        {
-        }
-    }
-
-    rc_t CC KMain ( int argc, char *argv [] )
-    {
-        rc_t rc = VResolverTestSuite ( argc, argv );
-        clear_recorded_errors();
-        return rc;
-    }
-
-}
diff --git a/test/vfs/test-caching.cpp b/test/vfs/test-caching.cpp
deleted file mode 100644
index 31e5426..0000000
--- a/test/vfs/test-caching.cpp
+++ /dev/null
@@ -1,615 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfg/config.h> /* KConfig */
-#include <kfs/directory.h> /* KDirectory */
-#include <ktst/unit_test.hpp> // TEST_SUITE
-#include <sra/sraschema.h> // VDBManagerMakeSRASchema
-#include <vdb/cursor.h> /* VCursor */
-#include <vdb/manager.h> /* VDBManager */
-#include <vdb/table.h> /* VTable */
-#include <vdb/vdb-priv.h> /* VDBManagerMakeReadWithVFSManager */
-#include <vfs/manager.h> /* VFSManager */
-#include <vfs/manager-priv.h> /* VFSManagerMakeFromKfg */
-#include <vfs/resolver.h> /* VResolverCacheEnable */
-#include <vdb/database.h> /* VDatabase */
-#include <vdb/schema.h> /* VSchema */
-
-#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
-    if (rc2 != 0 && rc == 0) { rc = rc2; } obj = NULL; } while (false)
-
-rc_t StringRelease ( String * self ) { free ( self ); return 0; }
-
-TEST_SUITE(CachingSuite);
-
-typedef enum {
-/* SETTERS */
-    eNone                            =      0,
-    eAppsRefseq                      =      1,
-    eAppsSra                         =      2,
-    eAppsWgs                         =      4,
-    
-    eUserCacheDisabledSetFalse       =   0x20, //                 10b
-    eUserCacheDisabledSetTrue        =   0x30, //                 11b
-
-    eUserPublicCacheEnabledSetFalse  =   0x80, //               1000b
-    eUserPublicCacheEnabledSetTrue   =   0xC0, //               1100b
-
-    eUserPublicDisabledSetFalse      =  0x200, //            10 0000b
-    eUserPublicDisabledSetTrue       =  0x300, //            11 0000b
-
-    eAppRefseqDisabledSetFalse       =  0x800, //          1000 0000b
-    eAppRefseqDisabledSetTrue        =  0xC00, //          1100 0000b
-
-    eAppSraDisabledSetFalse          = 0x2000, //       10 0000 0000b
-    eAppSraDisabledSetTrue           = 0x3000, //       11 0000 0000b
-
-    eAppRefseqCacheEnabledSetFalse   = 0x8000, //     1000 0000 0000b
-    eAppRefseqCacheEnabledSetTrue    = 0xC000, //     1100 0000 0000b
-
-    eAppSraCacheEnabledSetFalse      =0x20000, //  10 0000 0000 0000b
-    eAppSraCacheEnabledSetTrue       =0x30000, //  11 0000 0000 0000b
-
-    eResolverAlwaysEnable            =0x40000, // 100 0000 0000 0000b
-    eResolverAlwaysDisable           =0x80000, //1000 0000 0000 0000b
-
-/* GETTERS */
-    eUserCacheDisabled = eUserCacheDisabledSetFalse,
-    eUserCacheDisabledTrue           =   0x10,  //                 1
-
-    eUserPublicCacheEnabled = eUserPublicCacheEnabledSetFalse,
-    eUserPublicCacheEnabledTrue      =   0x40,  //               100b
-
-    eUserPublicDisabled = eUserPublicDisabledSetFalse,
-    eUserPublicDisabledTrue          =  0x100,  //             1 000b
-
-    eAppRefseqDisabled = eAppRefseqDisabledSetFalse,
-    eAppRefseqDisabledTrue           =  0x400,  //           100 000b
-
-    eAppSraDisabled = eAppSraDisabledSetFalse,
-    eAppSraDisabledTrue              = 0x1000,  //      01 0000 0000b
-
-    eAppRefseqCacheEnabled = eAppRefseqCacheEnabledSetFalse,
-    eAppRefseqCacheEnabledTrue       = 0x4000,  //     100 0000 0000b
-
-    eAppSraCacheEnabled = eAppSraCacheEnabledSetFalse,
-    eAppSraCacheEnabledTrue          =0x10000,  //  1 0000 0000 0000b
-} E;
-
-class SET {
-public:
-    static rc_t set ( KConfig * self, int e ) {
-        if ( e == 0 ){
-            return 0;
-        }
-        rc_t rc = 0;
-        if ( e & eAppsRefseq ) {
-            rc = KConfigWriteString ( self,
-               "/repository/user/main/public/apps/refseq/volumes/refseq",
-                "refseq" );
-        }
-        if ( e & eAppsSra ) {
-            rc = KConfigWriteString ( self,
-               "/repository/user/main/public/apps/sra/volumes/sraFlat", "sra" );
-        }
-        if ( e & eAppsWgs ) {
-            rc = KConfigWriteString ( self,
-               "/repository/user/main/public/apps/wgs/volumes/wgsFlat", "wgs" );
-        }
-        if ( rc == 0 && e & eUserCacheDisabled ) {
-            const char * v = e & eUserCacheDisabledTrue ? "true" : "false";
-            rc = KConfigWriteString ( self,
-                "/repository/user/cache-disabled", v );
-        }
-        if ( rc == 0 && e & eUserPublicCacheEnabled ) {
-            const char * v = e & eUserPublicCacheEnabledTrue ? "true" : "false";
-            rc = KConfigWriteString ( self,
-                "/repository/user/main/public/cache-enabled", v );
-        }
-        if ( rc == 0 && e & eUserPublicDisabled ) {
-            const char * v = e & eUserPublicDisabledTrue ? "true" : "false";
-            rc = KConfigWriteString ( self,
-                "/repository/user/main/public/disabled", v );
-        }
-        if ( rc == 0 && e & eAppRefseqDisabled ) {
-            const char * v = e & eAppRefseqDisabledTrue ? "true" : "false";
-            rc = KConfigWriteString ( self,
-                "/repository/user/main/public/apps/refseq/disabled", v );
-        }
-        if ( rc == 0 && e & eAppSraDisabled ) {
-            const char * v = e & eAppSraDisabledTrue ? "true" : "false";
-            rc = KConfigWriteString ( self,
-                "/repository/user/main/public/apps/sra/disabled", v );
-        }
-        if ( rc == 0 && e & eAppRefseqCacheEnabled ) {
-            const char * v = e & eAppRefseqCacheEnabledTrue ? "true" : "false";
-            rc = KConfigWriteString ( self,
-                "/repository/user/main/public/apps/refseq/cache-enabled", v );
-        }
-        if ( rc == 0 && e & eAppSraCacheEnabled ) {
-            const char * v = e & eAppSraCacheEnabledTrue ? "true" : "false";
-            rc = KConfigWriteString ( self,
-                "/repository/user/main/public/apps/sra/cache-enabled", v );
-        }
-        return rc;
-    }
-
-    static rc_t set ( const VFSManager * self, int e ) {
-        if ( ( e & eResolverAlwaysEnable ) && ( e & eResolverAlwaysDisable ) ) {
-            assert (0);
-        }
-        if ( e & eResolverAlwaysEnable ) {
-            return enbl ( self, vrAlwaysEnable );
-        }
-        else if ( e & eResolverAlwaysDisable ) {
-            return enbl ( self, vrAlwaysDisable );
-        }
-        else {
-            return 0;
-        }
-    }
-
-    static rc_t resetSingleton ( const VFSManager * self ) {
-        return enbl ( self, vrUseConfig ); // VResolverEnableState IS STICKY !!!
-    }
-
-private:
-    static rc_t enbl ( const VFSManager * self,  VResolverEnableState enable ) {
-        VResolver * resolver = NULL;
-        rc_t rc = VFSManagerGetResolver ( self, & resolver );
-        if ( rc == 0 ) {
-            VResolverCacheEnable ( resolver, enable );
-        }
-        RELEASE ( VResolver, resolver );
-        return rc;
-    }
-};
-
-typedef enum {
-    eRefseq,
-    eSra,
-    eWgs,
-} EType;
-
-class Test : protected ncbi::NK::TestCase {
-    TestCase * _dad;
-
-public:
-    Test ( TestCase * dad, bool caching, int v, EType type )
-        : TestCase ( dad -> GetName () ), _dad ( dad )
-    {
-#define WGS "AFVF01"
-        const char * acc = type == eRefseq ? "KC702199.1" :
-                           type == eSra    ? "SRR053325" : WGS ".1"; 
-        rc_t rc = 0;
-        KDirectory * native  = NULL;
-        REQUIRE_RC ( KDirectoryNativeDir ( & native ) );
-        const KDirectory * dir = NULL;
-        REQUIRE_RC
-            ( KDirectoryOpenDirRead ( native, &dir, false, "caching-kfg" ) );
-        KConfig * cfg = NULL;
-        REQUIRE_RC ( KConfigMake ( & cfg, dir ) );
-        REQUIRE_RC ( SET :: set ( cfg, v ) );
-//KConfigPrint(cfg, 0);
-        String * test_root = NULL;
-        REQUIRE_RC ( KConfigReadString ( cfg, "/TEST_ROOT", & test_root ) );
-        String * user_root = NULL;
-        REQUIRE_RC ( KConfigReadString
-            ( cfg, "/repository/user/main/public/root", & user_root ) );
-
-        // KConfigReadString creates NULL-terminated strings
-        REQUIRE ( user_root );
-        REQUIRE_RC ( KDirectoryRemove ( native, true, user_root -> addr ) );
-
-        VFSManager * vfs = NULL;
-
-        REQUIRE_RC ( VFSManagerMakeFromKfg ( & vfs, cfg ) );
-        REQUIRE_RC ( SET :: resetSingleton ( vfs ) );
-
-        REQUIRE_RC ( SET :: set ( vfs, v ) );
-        const VDBManager * mgr = NULL;
-        REQUIRE_RC ( VDBManagerMakeReadWithVFSManager ( & mgr, NULL, vfs ) );
-        VSchema * schema = NULL;
-        REQUIRE_RC ( VDBManagerMakeSRASchema ( mgr, & schema ) );
-
-        // KConfigReadString creates NULL-terminated strings
-        REQUIRE ( user_root ); 
-        REQUIRE_EQ ( KDirectoryPathType ( native, user_root -> addr ),
-                     ( KPathType ) kptNotFound );
-        const VDatabase * db = NULL;
-        const VTable * tbl = NULL;
-        if ( type == eWgs ) {
-            REQUIRE_RC ( VDBManagerOpenDBRead ( mgr, & db, NULL, acc ) );
-        }
-        else {
-            REQUIRE_RC ( VDBManagerOpenTableRead ( mgr, & tbl, schema, acc ) );
-        }
-
-        // KConfigReadString creates NULL-terminated strings
-        REQUIRE ( user_root ); 
-        if ( caching ) {
-            REQUIRE_EQ ( KDirectoryPathType ( native, user_root -> addr ),
-                         ( KPathType ) kptDir );
-            switch ( type ) {
-            case eRefseq:
-                REQUIRE_EQ ( KDirectoryPathType ( native, "%s/refseq/%s.cache",
-                             user_root -> addr, acc ), ( KPathType ) kptFile );
-                break;
-            case eSra:
-                REQUIRE_EQ ( KDirectoryPathType ( native, "%s/sra/%s.sra.cache",
-                             user_root -> addr, acc ), ( KPathType ) kptFile );
-                break;
-            case eWgs:
-                REQUIRE_EQ ( KDirectoryPathType ( native, "%s/wgs/%s.cache",
-                             user_root -> addr, WGS ), ( KPathType ) kptFile );
-                break;
-            default:
-                assert ( 0 ) ;
-                break;
-            }
-        }
-        else {
-            REQUIRE_EQ ( KDirectoryPathType ( native, user_root -> addr ),
-                         ( KPathType ) kptNotFound );
-        }
-        RELEASE ( VDatabase, db );
-        RELEASE ( VSchema, schema );
-        RELEASE ( VTable, tbl );
-
-        REQUIRE_RC ( SET :: resetSingleton ( vfs ) );
-        RELEASE ( VFSManager, vfs );
-
-        RELEASE ( VDBManager, mgr );
-        RELEASE ( KDirectory, dir );
-
-        // KConfigReadString creates NULL-terminated strings
-        REQUIRE ( user_root ); 
-        REQUIRE_RC ( KDirectoryRemove ( native, true, user_root -> addr ) );
-        REQUIRE_EQ ( KDirectoryPathType ( native, user_root -> addr ),
-                     ( KPathType ) kptNotFound );
-
-        RELEASE ( String, user_root );
-        REQUIRE_RC ( KConfigReadString ( cfg, "/TEST_SUBROOT", & user_root ) );
-
-        // KConfigReadString creates NULL-terminated strings
-        REQUIRE ( user_root );
-        REQUIRE_RC ( KDirectoryRemove ( native, false, user_root -> addr ) );
-        RELEASE ( String, user_root );
-
-        // KConfigReadString creates NULL-terminated strings
-        REQUIRE ( test_root ); 
-        KDirectoryRemove ( native, false, test_root -> addr );
-        // might fail when there is another test build running parallelly
-
-        RELEASE ( String, test_root );
-        RELEASE ( KConfig, cfg );
-        RELEASE ( KDirectory, native );
-        REQUIRE_RC ( rc );
-}
-
-  ~Test ( void ) {
-      assert( _dad );
-      _dad->ErrorCounterAdd(GetErrorCounter());
-    }
-};
-
-class NonCaching : private Test {
-public:
-    NonCaching ( TestCase * dad, int v = eNone, EType type = eSra )
-        : Test ( dad, false, v, type )
-    {}
-};
-
-class Caching : private Test {
-public:
-    Caching (TestCase * dad, int v, EType type = eSra )
-        : Test ( dad, true, v, type )
-    {}
-};
-
-TEST_CASE ( SRR_INCOMPLETE_USER_REPO ) {
-    NonCaching ( this );
-}
-TEST_CASE ( REFSEQ_INCOMPLETE_USER_REPO ) {
-    NonCaching ( this, eNone, eRefseq );
-}
-TEST_CASE ( WGS_INCOMPLETE_USER_REPO ) {
-    NonCaching ( this, eNone, eWgs );
-}
-
-TEST_CASE ( REFSEQ_BAD_APP_IN_USER_REPO ) {
-    NonCaching ( this, eAppsSra , eRefseq );
-}
-TEST_CASE ( WGS_BAD_APP_IN_USER_REPO ) {
-    NonCaching ( this, eAppsSra , eWgs );
-}
-
-TEST_CASE ( SRR_COMPLETE_USER_REPO ) {
-    Caching ( this, eAppsSra );
-}
-TEST_CASE ( REFSEQ_COMPLETE_USER_REPO ) {
-    Caching ( this, eAppsRefseq, eRefseq );
-}
-TEST_CASE ( WGS_COMPLETE_USER_REPO ) {
-    Caching ( this, eAppsWgs, eWgs );
-}
-
-TEST_CASE ( SRR_CASHING_DISABLED_BY_VDB_CONFIG_GRF ) {
-    NonCaching ( this, eAppsSra | eUserCacheDisabledSetTrue );
-}
-TEST_CASE ( REFSEQ_CASHING_DISABLED_BY_VDB_CONFIG_GRF ) {
-    NonCaching ( this, eAppsRefseq | eUserCacheDisabledSetTrue, eRefseq );
-}
-TEST_CASE ( WGS_DISABLED_BY_VDB_CONFIG_GRF ) {
-    NonCaching ( this, eAppsWgs | eUserCacheDisabledSetTrue, eWgs );
-}
-
-TEST_CASE ( SRR_CASHING_ENABLED_BY_VDB_CONFIG_GRF ) {
-    Caching ( this, eAppsSra | eUserCacheDisabledSetFalse );
-}
-TEST_CASE ( REFSEQ_CASHING_ENABLED_BY_VDB_CONFIG_GRF ) {
-    Caching ( this, eAppsRefseq | eUserCacheDisabledSetFalse, eRefseq );
-}
-TEST_CASE ( WGS_CASHING_ENABLED_BY_VDB_CONFIG_GRF ) {
-    Caching ( this, eAppsWgs | eUserCacheDisabledSetFalse, eWgs );
-}
-
-TEST_CASE ( SRR_CASHING_ENABLED_BY_VDB_CONFIG_TXT ) {
-    Caching ( this, eAppsSra | eUserPublicCacheEnabledSetTrue );
-}
-TEST_CASE ( REFSEQ_CASHING_ENABLED_BY_VDB_CONFIG_TXT ) {
-    Caching ( this, eAppsRefseq | eUserPublicCacheEnabledSetTrue, eRefseq );
-}
-TEST_CASE ( WGS_CASHING_ENABLED_BY_VDB_CONFIG_TXT ) {
-    Caching ( this, eAppsWgs | eUserPublicCacheEnabledSetTrue, eWgs );
-}
-
-TEST_CASE ( SRR_CASHING_DISABLED_BY_VDB_CONFIG_TXT ) {
-    NonCaching ( this, eAppsSra | eUserPublicCacheEnabledSetFalse );
-}
-TEST_CASE ( REFSEQ_CASHING_DISABLED_BY_VDB_CONFIG_TXT ) {
-    NonCaching ( this, eAppsRefseq | eUserPublicCacheEnabledSetFalse, eRefseq );
-}
-TEST_CASE ( WGS_CASHING_DISABLED_BY_VDB_CONFIG_TXT ) {
-    NonCaching ( this, eAppsWgs | eUserPublicCacheEnabledSetFalse, eWgs );
-}
-
-TEST_CASE ( SRR_CASHING_ENABLED_BY_VDB_CONFIG_TXT_AND_GRF ) {
-    Caching ( this, eAppsSra | eUserCacheDisabledSetFalse |
-                               eUserPublicCacheEnabledSetTrue );
-}
-TEST_CASE ( REFSEQ_CASHING_ENABLED_BY_VDB_CONFIG_TXT_AND_GRF ) {
-    Caching ( this, eAppsRefseq | eUserCacheDisabledSetFalse |
-                                  eUserPublicCacheEnabledSetTrue, eRefseq );
-}
-TEST_CASE ( WGS_CASHING_ENABLED_BY_VDB_CONFIG_TXT_AND_GRF ) {
-    Caching ( this, eAppsWgs | eUserCacheDisabledSetFalse |
-                               eUserPublicCacheEnabledSetTrue, eWgs );
-}
-
-TEST_CASE ( SRR_USER_REPO_DISABLED ) {
-    NonCaching ( this, eAppsSra | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetTrue );
-}
-TEST_CASE ( REFSEQ_USER_REPO_DISABLED ) {
-    NonCaching ( this, eAppsRefseq | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetTrue, eRefseq );
-}
-TEST_CASE ( WGS_USER_REPO_DISABLED ) {
-    NonCaching ( this, eAppsWgs | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetTrue, eWgs );
-}
-
-TEST_CASE ( SRR_CASHING_AND_REPO_ENABLED ) {
-    Caching ( this, eAppsSra | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse );
-}
-TEST_CASE ( REFSEQ_CASHING_AND_REPO_ENABLED ) {
-    Caching ( this, eAppsRefseq | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse, eRefseq );
-}
-TEST_CASE ( WGS_CASHING_AND_REPO_ENABLED ) {
-    Caching ( this, eAppsWgs | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse, eWgs );
-}
-
-TEST_CASE ( SRR_CASHING_AND_REPO_ENABLED_DISABLE_REFSEQ_APP ) {
-    Caching ( this, eAppsSra | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppRefseqDisabledSetTrue );
-}
-TEST_CASE ( REFSEQ_CASHING_AND_REPO_ENABLED_DISABLE_REFSEQ_APP ) {
-    NonCaching ( this, eAppsRefseq | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppRefseqDisabledSetTrue, eRefseq );
-}
-TEST_CASE ( WGS_CASHING_AND_REPO_ENABLED_DISABLE_REFSEQ_APP ) {
-    Caching ( this, eAppsWgs | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppRefseqDisabledSetTrue, eWgs );
-}
-
-TEST_CASE ( SRR_CASHING_AND_REPO_ENABLED_DISABLE_SRA_APP ) {
-    NonCaching ( this, eAppsSra | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppSraDisabledSetTrue );
-}
-TEST_CASE ( REFSEQ_CASHING_AND_REPO_ENABLED_DISABLE_SRA_APP ) {
-    Caching ( this, eAppsRefseq | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppSraDisabledSetTrue, eRefseq );
-}
-TEST_CASE ( WGS_CASHING_AND_REPO_ENABLED_DISABLE_SRA_APP ) {
-    Caching ( this, eAppsWgs | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppSraDisabledSetTrue, eWgs );
-}
-
-TEST_CASE ( SRR_CASHING_AND_REPO_ENABLED_DISABLE_SRA_APP_CACHE ) {
-    NonCaching ( this, eAppsSra | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppSraCacheEnabledSetFalse );
-}
-TEST_CASE ( REFSEQ_CASHING_AND_REPO_ENABLED_DISABLE_SRA_APP_CACHE ) {
-    Caching ( this, eAppsRefseq | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppSraCacheEnabledSetTrue | eAppSraCacheEnabledSetFalse, eRefseq );
-}
-TEST_CASE ( WGS_CASHING_AND_REPO_ENABLED_DISABLE_SRA_APP_CACHE ) {
-    Caching ( this, eAppsWgs | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppSraCacheEnabledSetTrue | eAppSraCacheEnabledSetFalse, eWgs );
-}
-
-TEST_CASE ( SRR_CASHING_ENABLED_BY_VDB_CONFIG_GRF_DISABLED_BY_TXT ) {
-    NonCaching ( this, eAppsSra | eUserCacheDisabledSetFalse |
-                                  eUserPublicCacheEnabledSetFalse );
-}
-TEST_CASE ( REFSEQ_CASHING_ENABLED_BY_VDB_CONFIG_GRF_DISABLED_BY_TXT ) {
-    NonCaching ( this, eAppsRefseq | eUserCacheDisabledSetFalse |
-                                     eUserPublicCacheEnabledSetFalse, eRefseq );
-}
-TEST_CASE ( WGS_CASHING_ENABLED_BY_VDB_CONFIG_GRF_DISABLED_BY_TXT ) {
-    NonCaching ( this, eAppsWgs | eUserCacheDisabledSetFalse |
-                                  eUserPublicCacheEnabledSetFalse, eWgs );
-}
-
-TEST_CASE ( SRR_CASHING_DISABLED_BY_VDB_CONFIG_TXT_AND_GRF ) {
-     NonCaching ( this, eAppsSra | eUserCacheDisabledSetTrue |
-                                   eUserPublicCacheEnabledSetFalse );
-}
-TEST_CASE ( REFSEQ_CASHING_DISABLED_BY_VDB_CONFIG_TXT_AND_GRF ) {
-    NonCaching ( this, eAppsRefseq | eUserCacheDisabledSetTrue |
-                                     eUserPublicCacheEnabledSetFalse, eRefseq );
-}
-TEST_CASE ( WGS_CASHING_DISABLED_BY_VDB_CONFIG_TXT_AND_GRF ) {
-    NonCaching ( this, eAppsWgs | eUserCacheDisabledSetTrue |
-                                  eUserPublicCacheEnabledSetFalse, eWgs );
-}
-
-TEST_CASE ( SRR_CASHING_DISABLED_BY_VDB_CONFIG_GRF_ENABLED_BY_TXT ) {
-     NonCaching ( this, eAppsSra | eUserCacheDisabledSetTrue |
-                                   eUserPublicCacheEnabledSetTrue );
-}
-TEST_CASE ( REFSEQ_CASHING_DISABLED_BY_VDB_CONFIG_GRF_ENABLED_BY_TXT ) {
-    NonCaching ( this, eAppsRefseq | eUserCacheDisabledSetTrue |
-                                     eUserPublicCacheEnabledSetTrue, eRefseq );
-}
-TEST_CASE ( WGS_CASHING_DISABLED_BY_VDB_CONFIG_GRF_ENABLED_BY_TXT ) {
-    NonCaching ( this, eAppsWgs | eUserCacheDisabledSetTrue |
-                                  eUserPublicCacheEnabledSetTrue, eWgs );
-}
-
-TEST_CASE ( SRR_APP_DISABLED ) {
-    NonCaching ( this, eAppsSra | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppRefseqDisabledSetFalse | eAppSraDisabledSetTrue |
-        eAppRefseqCacheEnabledSetTrue | eAppSraCacheEnabledSetTrue );
-}
-TEST_CASE ( REFSEQ_SRR_APP_DISABLED ) {
-    Caching ( this, eAppsRefseq | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppRefseqDisabledSetFalse | eAppSraDisabledSetTrue |
-        eAppRefseqCacheEnabledSetTrue | eAppSraCacheEnabledSetTrue, eRefseq );
-}
-
-TEST_CASE ( SRR_APP_DISABLED_ALWASY_ENABLE ) {
-    NonCaching ( this, eAppsSra | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppRefseqDisabledSetFalse | eAppSraDisabledSetTrue |
-        eAppRefseqCacheEnabledSetTrue | eAppSraCacheEnabledSetTrue |
-        eResolverAlwaysEnable );
-}
-
-TEST_CASE ( SRR_CASHING_AND_REPO_AND_APP_ENABLED ) {
-    Caching ( this, eAppsSra | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppRefseqDisabledSetFalse | eAppSraDisabledSetFalse |
-        eAppRefseqCacheEnabledSetTrue | eAppSraCacheEnabledSetTrue );
-}
-TEST_CASE ( REFSEQ_CASHING_AND_REPO_AND_APP_ENABLED ) {
-    Caching ( this, eAppsRefseq | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppRefseqDisabledSetFalse | eAppSraDisabledSetFalse |
-        eAppRefseqCacheEnabledSetTrue | eAppSraCacheEnabledSetTrue, eRefseq );
-}
-TEST_CASE ( WGS_CASHING_AND_REPO_AND_APP_ENABLED ) {
-    Caching ( this, eAppsWgs | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppRefseqDisabledSetFalse | eAppSraDisabledSetFalse |
-        eAppRefseqCacheEnabledSetTrue | eAppSraCacheEnabledSetTrue, eWgs );
-}
-
-TEST_CASE ( SRR_CASHING_ALWAYS_DISABLE ) {
-    NonCaching ( this, eAppsSra | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppRefseqDisabledSetFalse | eAppSraDisabledSetFalse |
-        eAppRefseqCacheEnabledSetTrue | eAppSraCacheEnabledSetTrue |
-        eResolverAlwaysDisable );
-}
-TEST_CASE ( REFSEQ_CASHING_ALWAYS_DISABLE ) {
-    NonCaching ( this, eAppsRefseq | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppRefseqDisabledSetFalse | eAppSraDisabledSetFalse |
-        eAppRefseqCacheEnabledSetTrue | eAppSraCacheEnabledSetTrue |
-        eResolverAlwaysDisable, eRefseq );
-}
-TEST_CASE ( WGS_CASHING_ALWAYS_DISABLE ) {
-    NonCaching ( this, eAppsWgs | eUserCacheDisabledSetFalse |
-        eUserPublicCacheEnabledSetTrue | eUserPublicDisabledSetFalse |
-        eAppRefseqDisabledSetFalse | eAppSraDisabledSetFalse |
-        eAppRefseqCacheEnabledSetTrue | eAppSraCacheEnabledSetTrue |
-        eResolverAlwaysDisable, eWgs );
-}
-
-TEST_CASE ( SRR_NON_CACHING ) {
-    NonCaching ( this, eAppsSra | eUserCacheDisabledSetTrue |
-        eUserPublicCacheEnabledSetFalse | eUserPublicDisabledSetFalse |
-        eAppRefseqDisabledSetTrue | eAppSraDisabledSetFalse |
-        eAppRefseqCacheEnabledSetFalse | eAppSraCacheEnabledSetFalse );
-}
-TEST_CASE ( SRR_ALWAYS_ENABLE ) {
-    Caching ( this, eAppsSra | eUserCacheDisabledSetTrue |
-        eUserPublicCacheEnabledSetFalse | eUserPublicDisabledSetFalse |
-        eAppRefseqDisabledSetTrue | eAppSraDisabledSetFalse |
-        eAppRefseqCacheEnabledSetFalse | eAppSraCacheEnabledSetFalse |
-        eResolverAlwaysEnable );
-}
-
-TEST_CASE ( REFSEQ_APP_CACHE_DISABLE ) {
-    NonCaching ( this, eAppsRefseq | eAppRefseqCacheEnabledSetFalse, eRefseq );
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-extern "C" {
-    ver_t CC KAppVersion ( void ) {
-        return 0;
-    }
-    rc_t CC KMain ( int argc, char * argv [] ) {
-        return CachingSuite ( argc, argv );
-    }
-}
diff --git a/test/vschema/Makefile b/test/vschema/Makefile
new file mode 100644
index 0000000..0c9ba93
--- /dev/null
+++ b/test/vschema/Makefile
@@ -0,0 +1,117 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: runtests
+
+TOP ?= $(abspath ../..)
+
+MODULE = test/vschema
+
+include $(TOP)/build/Makefile.env
+
+clean: stdclean
+
+#-------------------------------------------------------------------------------
+# bio-end schema tests
+#
+runtests: \
+	bio-end-tests \
+    idx-text-tests
+
+#-------------------------------------------------------------------------------
+# bio-end-tests
+#
+TEST_BIO_END_MAKEINPUTS_SRC = \
+	bio-end/makeinputs
+
+TEST_BIO_END_MAKEINPUTS_OBJ = \
+	$(addsuffix .$(OBJX),$(TEST_BIO_END_MAKEINPUTS_SRC))
+
+TEST_BIO_END_MAKEINPUTS_LIB =   \
+	-L$(LIBDIR) \
+	-sgeneral-writer
+
+
+bio-end-makeinputs: $(TEST_BIO_END_MAKEINPUTS_OBJ)
+	$(LP) --exe -o ./bio-end-makeinputs $^ $(TEST_BIO_END_MAKEINPUTS_LIB)
+	@rm bio-end-makeinputs.exe.d $(TEST_BIO_END_MAKEINPUTS_OBJ)
+
+bio-end-tests: bio-end-makeinputs
+	@mkdir -p $(SRCDIR)/bio-end/input && ./bio-end-makeinputs && rm ./bio-end-makeinputs
+	@# test cases
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) $(SRCDIR)/bio-end bio-end excl-1 0 n
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) $(SRCDIR)/bio-end bio-end excl-2 0 n
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) $(SRCDIR)/bio-end bio-end excl-3 0 n
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) $(SRCDIR)/bio-end bio-end excl-4 0 n
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) $(SRCDIR)/bio-end bio-end incl-1 0 n
+	@rm -f $(SRCDIR)/bio-end/input/*.gl
+	@echo "bio-end tests executed successfuly"
+
+#-------------------------------------------------------------------------------
+# idx-text-tests
+#
+TEST_IDX_TEXT_MAKEINPUTS_SRC = \
+	idx-text/makeinputs
+
+TEST_IDX_TEXT_MAKEINPUTS_OBJ = \
+	$(addsuffix .$(OBJX),$(TEST_IDX_TEXT_MAKEINPUTS_SRC))
+
+TEST_IDX_TEXT_MAKEINPUTS_LIB =   \
+	-L$(LIBDIR) \
+	-sgeneral-writer
+
+idx-text-makeinputs: $(TEST_IDX_TEXT_MAKEINPUTS_OBJ)
+	$(LP) --exe -o ./idx-text-makeinputs $^ $(TEST_IDX_TEXT_MAKEINPUTS_LIB)
+	@rm idx-text-makeinputs.exe.d $(TEST_IDX_TEXT_MAKEINPUTS_OBJ)
+
+
+TEST_IDX_TEXT_CHECKLOOKUP_SRC = \
+	idx-text/checklookup
+
+TEST_IDX_TEXT_CHECKLOOKUP_OBJ = \
+	$(addsuffix .$(OBJX),$(TEST_IDX_TEXT_CHECKLOOKUP_SRC))
+
+TEST_IDX_TEXT_CHECKLOOKUP_LIB =   \
+	-L$(LIBDIR) \
+	-sncbi-vdb
+
+idx-text-checklookup: $(TEST_IDX_TEXT_CHECKLOOKUP_OBJ)
+	$(LP) --exe -o ./idx-text-checklookup $^ $(TEST_IDX_TEXT_CHECKLOOKUP_LIB)
+	@rm idx-text-checklookup.exe.d $(TEST_IDX_TEXT_CHECKLOOKUP_OBJ)
+
+
+idx-text-tests: idx-text-makeinputs idx-text-checklookup
+	@mkdir -p $(SRCDIR)/idx-text/input && ./idx-text-makeinputs && rm ./idx-text-makeinputs
+	@# test cases
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) $(SRCDIR)/idx-text idx-text ci-1 0 y ./idx-text-checklookup
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) $(SRCDIR)/idx-text idx-text ci-2 0 y ./idx-text-checklookup
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) $(SRCDIR)/idx-text idx-text ci-3 0 y ./idx-text-checklookup
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) $(SRCDIR)/idx-text idx-text ci-4 0 y ./idx-text-checklookup
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) $(SRCDIR)/idx-text idx-text ci-5 0 n
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) $(SRCDIR)/idx-text idx-text cs-1 0 y ./idx-text-checklookup
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) $(SRCDIR)/idx-text idx-text cs-2 0 y ./idx-text-checklookup
+	@$(SRCDIR)/runtestcase.sh $(BINDIR) $(SRCDIR)/idx-text idx-text cs-3 0 n
+	@rm -f ./idx-text-checklookup
+	@rm -f $(SRCDIR)/idx-text/input/*.gl
+	@echo "idx-text tests executed successfuly"
diff --git a/test/vschema/bio-end/bio-end-excl.vschema b/test/vschema/bio-end/bio-end-excl.vschema
new file mode 100644
index 0000000..3e91875
--- /dev/null
+++ b/test/vschema/bio-end/bio-end-excl.vschema
@@ -0,0 +1,44 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+include 'insdc/insdc.vschema';
+include 'insdc/sra.vschema';
+include 'ncbi/sra.vschema';
+
+table bio_end:test:table1 #1
+{
+    column INSDC:coord:zero             out_read_start;
+    column INSDC:coord:len              out_read_len;
+    column INSDC:SRA:xread_type         out_read_type;
+
+    readonly column INSDC:coord:zero    bio_end
+        = NCBI:SRA:bio_end < false > ( out_read_start, out_read_type, out_read_len );
+}
+
+database bio_end:test:database1 #1
+{
+    table bio_end:test:table1 #1 table1;
+}
diff --git a/test/vschema/bio-end/bio-end-incl.vschema b/test/vschema/bio-end/bio-end-incl.vschema
new file mode 100644
index 0000000..c071196
--- /dev/null
+++ b/test/vschema/bio-end/bio-end-incl.vschema
@@ -0,0 +1,44 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+include 'insdc/insdc.vschema';
+include 'insdc/sra.vschema';
+include 'ncbi/sra.vschema';
+
+table bio_end:test:table1 #1
+{
+    column INSDC:coord:zero             out_read_start;
+    column INSDC:coord:len              out_read_len;
+    column INSDC:SRA:xread_type         out_read_type;
+
+    readonly column INSDC:coord:zero    bio_end
+        = NCBI:SRA:bio_end < true > ( out_read_start, out_read_type, out_read_len );
+}
+
+database bio_end:test:database1 #1
+{
+    table bio_end:test:table1 #1 table1;
+}
diff --git a/test/vschema/bio-end/expected/excl-1.stdout b/test/vschema/bio-end/expected/excl-1.stdout
new file mode 100644
index 0000000..702409a
--- /dev/null
+++ b/test/vschema/bio-end/expected/excl-1.stdout
@@ -0,0 +1,5 @@
+       bio_end: 12
+  out_read_len: 4, 4, 4
+out_read_start: 0, 4, 8
+ out_read_type: SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL, SRA_READ_TYPE_BIOLOGICAL
+
diff --git a/test/vschema/bio-end/expected/excl-2.stdout b/test/vschema/bio-end/expected/excl-2.stdout
new file mode 100644
index 0000000..2667e5c
--- /dev/null
+++ b/test/vschema/bio-end/expected/excl-2.stdout
@@ -0,0 +1,5 @@
+       bio_end: 8
+  out_read_len: 4, 4, 4
+out_read_start: 0, 4, 8
+ out_read_type: SRA_READ_TYPE_TECHNICAL, SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+
diff --git a/test/vschema/bio-end/expected/excl-3.stdout b/test/vschema/bio-end/expected/excl-3.stdout
new file mode 100644
index 0000000..b428943
--- /dev/null
+++ b/test/vschema/bio-end/expected/excl-3.stdout
@@ -0,0 +1,5 @@
+       bio_end: 8
+  out_read_len: 4, 4, 4, 0, 0
+out_read_start: 0, 4, 8, 12, 12
+ out_read_type: SRA_READ_TYPE_TECHNICAL, SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL, SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+
diff --git a/test/vschema/bio-end/expected/excl-4.stdout b/test/vschema/bio-end/expected/excl-4.stdout
new file mode 100644
index 0000000..43e18a6
--- /dev/null
+++ b/test/vschema/bio-end/expected/excl-4.stdout
@@ -0,0 +1,5 @@
+       bio_end: 13
+  out_read_len: 4, 4, 4, 1, 0
+out_read_start: 0, 4, 8, 12, 13
+ out_read_type: SRA_READ_TYPE_TECHNICAL, SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL, SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+
diff --git a/test/vschema/bio-end/expected/incl-1.stdout b/test/vschema/bio-end/expected/incl-1.stdout
new file mode 100644
index 0000000..6ec1b01
--- /dev/null
+++ b/test/vschema/bio-end/expected/incl-1.stdout
@@ -0,0 +1,5 @@
+       bio_end: 7
+  out_read_len: 4, 4, 4
+out_read_start: 0, 4, 8
+ out_read_type: SRA_READ_TYPE_TECHNICAL, SRA_READ_TYPE_BIOLOGICAL, SRA_READ_TYPE_TECHNICAL
+
diff --git a/test/vschema/bio-end/makeinputs.cpp b/test/vschema/bio-end/makeinputs.cpp
new file mode 100644
index 0000000..bb34391
--- /dev/null
+++ b/test/vschema/bio-end/makeinputs.cpp
@@ -0,0 +1,129 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+/**
+ * Unit tests for Bio-end function
+ */
+#include "../../../tools/general-loader/general-writer.hpp"
+
+#define TEST_SUITE "bio-end"
+
+using namespace ncbi;
+
+const char* tableName = "table1";
+
+void run( const char * p_caseId, bool inclusive, const int32_t coord_start[], const int32_t coord_len[], const int8_t coord_type[], int segments_number )
+{
+    std::string output_path = std::string ( TEST_SUITE "/input/" ) + p_caseId + ".gl";
+    std::string db_path = std::string ( TEST_SUITE "/actual/" ) + p_caseId + "/db";
+    std::string schema_path = inclusive ? TEST_SUITE "/bio-end-incl.vschema" : TEST_SUITE "/bio-end-excl.vschema";
+    
+    GeneralWriter *gw;
+    try
+    {
+        gw = new GeneralWriter ( output_path );
+        
+        gw -> setRemotePath ( db_path );
+        gw -> useSchema ( schema_path, "bio_end:test:database1" );
+        
+        int table_id = gw -> addTable ( tableName );
+        int column_read_start_id = gw -> addIntegerColumn ( table_id, "out_read_start", 32 );
+        int column_read_len_id = gw -> addIntegerColumn ( table_id, "out_read_len", 32 );
+        int column_read_type_id = gw -> addIntegerColumn ( table_id, "out_read_type", 8 );
+        
+        gw -> open ();
+        
+        
+#define write(column_id, column_bits, data) gw -> write ( column_id, column_bits, &data[0], segments_number );
+        write ( column_read_start_id, 32, coord_start );
+        write ( column_read_len_id, 32, coord_len );
+        write ( column_read_type_id, 8, coord_type );
+#undef write
+        
+        gw -> nextRow(table_id);
+        
+        gw -> endStream ();
+        
+        delete gw;
+        
+    }
+    catch ( ... )
+    {
+        delete gw;
+        throw;
+    }
+}
+
+int main()
+{
+    {
+        int32_t coord_start[]   = {0, 4, 8};
+        int32_t coord_len[]     = {4, 4, 4};
+        int8_t  coord_type[]    = {1, 0, 1};
+        const char * test_case_id = "excl-1";
+        bool inclusive = false;
+        
+        run( test_case_id, inclusive, coord_start, coord_len, coord_type, sizeof coord_type / sizeof coord_type[0] );
+    }
+    {
+        int32_t coord_start[]   = {0, 4, 8};
+        int32_t coord_len[]     = {4, 4, 4};
+        int8_t  coord_type[]    = {0, 1, 0};
+        const char * test_case_id = "excl-2";
+        bool inclusive = false;
+        
+        run( test_case_id, inclusive, coord_start, coord_len, coord_type, sizeof coord_type / sizeof coord_type[0] );
+    }
+    {
+        int32_t coord_start[]   = {0, 4, 8, 12, 12};
+        int32_t coord_len[]     = {4, 4, 4, 0,  0};
+        int8_t  coord_type[]    = {0, 1, 0, 1,  0};
+        const char * test_case_id = "excl-3";
+        bool inclusive = false;
+        
+        run( test_case_id, inclusive, coord_start, coord_len, coord_type, sizeof coord_type / sizeof coord_type[0] );
+    }
+    {
+        int32_t coord_start[]   = {0, 4, 8, 12, 13};
+        int32_t coord_len[]     = {4, 4, 4, 1,  0};
+        int8_t  coord_type[]    = {0, 1, 0, 1,  0};
+        const char * test_case_id = "excl-4";
+        bool inclusive = false;
+        
+        run( test_case_id, inclusive, coord_start, coord_len, coord_type, sizeof coord_type / sizeof coord_type[0] );
+    }
+    {
+        int32_t coord_start[]   = {0, 4, 8};
+        int32_t coord_len[]     = {4, 4, 4};
+        int8_t  coord_type[]    = {0, 1, 0};
+        const char * test_case_id = "incl-1";
+        bool inclusive = true;
+        
+        run( test_case_id, inclusive, coord_start, coord_len, coord_type, sizeof coord_type / sizeof coord_type[0] );
+    }
+    
+    return 0;
+}
diff --git a/test/vschema/idx-text/checklookup.cpp b/test/vschema/idx-text/checklookup.cpp
new file mode 100644
index 0000000..7d6a877
--- /dev/null
+++ b/test/vschema/idx-text/checklookup.cpp
@@ -0,0 +1,335 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+/**
+ * Perform checks of function idx:text:lookup on created databases,
+ * because it requires passing parameter through cursor parameter QUERY_NAME
+ */
+
+#include <klib/log.h>
+#include <klib/writer.h>
+#include <kfs/directory.h>
+#include <vdb/manager.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <vdb/vdb-priv.h>
+
+#include <iostream>
+#include <map>
+
+#define TEST_SUITE "idx-text"
+#define TABLE_NAME "table1"
+
+struct RowRange {
+    int64_t start_id;
+    int64_t stop_id;
+};
+
+struct TestCase {
+    const char* path;
+    std::map<std::string, RowRange> key_ranges;
+};
+
+static std::map<std::string, TestCase> test_cases;
+static const char* test_case_name;
+
+rc_t runChecks(const TestCase& test_case, const VCursor * cursor, uint32_t name_idx, uint32_t name_range_idx)
+{
+    rc_t rc;
+    int64_t first_id;
+    uint64_t count_id;
+    
+    rc = VCursorIdRange( cursor, name_idx, &first_id, &count_id );
+    if (rc != 0)
+    {
+        LOGERR( klogInt, rc, "VCursorIdRange() failed" );
+        return rc;
+    }
+    
+    for (uint64_t row_id = first_id; row_id < first_id + count_id; ++row_id)
+    {
+        const char * name = NULL;
+        uint32_t name_len;
+        RowRange *row_range;
+        
+        rc = VCursorCellDataDirect( cursor, row_id, name_idx, NULL, (void const **)&name, NULL, &name_len );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VCursorCellDataDirect() failed" );
+            return rc;
+        }
+        
+        if ( name_len == 0 )
+            continue;
+
+        rc = VCursorParamsSet( ( struct VCursorParams const * )cursor, "QUERY_NAME", "%.*s", name_len, name );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VCursorParamsSet() failed" );
+            return rc;
+        }
+        
+        rc = VCursorCellDataDirect( cursor, row_id, name_range_idx, NULL, (void const **)&row_range, NULL, NULL );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VCursorCellDataDirect() failed" );
+            return rc;
+        }
+        
+        std::string name_str(name, name_len);
+        
+        if (test_case.key_ranges.find(name_str) == test_case.key_ranges.end())
+        {
+            PLOGMSG( klogInt, (klogErr, "Unexpected name '$(NAME)' in test case '$(TC_NAME)'", "TC_NAME=%s,NAME=%s", test_case_name, name_str.c_str()) );
+            return 1;
+        }
+        
+        RowRange row_range_exp = test_case.key_ranges.find(name_str)->second;
+        if (row_range->start_id != row_range_exp.start_id || row_range->stop_id != row_range_exp.stop_id)
+        {
+            PLOGMSG( klogInt, (klogErr, "Row range for name '$(NAME)' in test case '$(TC_NAME)' does not match. Expected: $(EXP_S)-$(EXP_F), actual: $(ACT_S)-$(ACT_F)",
+                               "TC_NAME=%s,NAME=%s,EXP_S=%ld,EXP_F=%ld,ACT_S=%ld,ACT_F=%ld",
+                               test_case_name, name_str.c_str(), row_range_exp.start_id, row_range_exp.stop_id, row_range->start_id, row_range->stop_id) );
+            return 1;
+        }
+    }
+    
+    return rc;
+}
+
+rc_t run(const TestCase& test_case)
+{
+    rc_t rc;
+    KDirectory * cur_dir;
+    const VDBManager * manager;
+    const VDatabase * database;
+    const VTable * table;
+    const VCursor * cursor;
+    uint32_t name_idx;
+    uint32_t name_range_idx;
+    
+    rc = KDirectoryNativeDir( &cur_dir );
+    if ( rc != 0 )
+        LOGERR( klogInt, rc, "KDirectoryNativeDir() failed" );
+    else
+    {
+        rc = VDBManagerMakeRead ( &manager, cur_dir );
+        if ( rc != 0 )
+            LOGERR( klogInt, rc, "VDBManagerMakeRead() failed" );
+        else
+        {
+            rc = VDBManagerOpenDBRead( manager, &database, NULL, "%s", test_case.path );
+            if (rc != 0)
+                LOGERR( klogInt, rc, "VDBManagerOpenDBRead() failed" );
+            else
+            {
+                rc = VDatabaseOpenTableRead( database, &table, "%s", TABLE_NAME );
+                if ( rc != 0 )
+                    LOGERR( klogInt, rc, "VDatabaseOpenTableRead() failed" );
+                else
+                {
+                    rc = VTableCreateCursorRead( table, &cursor );
+                    if ( rc != 0 )
+                        LOGERR( klogInt, rc, "VTableCreateCursorRead() failed" );
+                    else
+                    {
+                        /* add columns to cursor */
+                        rc = VCursorAddColumn( cursor, &name_idx, "(utf8)NAME" );
+                        if ( rc != 0 )
+                            LOGERR( klogInt, rc, "VCursorAddColumn() failed" );
+                        else
+                        {
+                            rc = VCursorAddColumn( cursor, &name_range_idx, "NAME_RANGE" );
+                            if ( rc != 0 )
+                                LOGERR( klogInt, rc, "VCursorAddColumn() failed" );
+                            else
+                            {
+                                rc = VCursorOpen( cursor );
+                                if (rc != 0)
+                                    LOGERR( klogInt, rc, "VCursorOpen() failed" );
+                                else
+                                    rc = runChecks( test_case, cursor, name_idx, name_range_idx );
+                            }
+                        }
+                        VCursorRelease( cursor );
+                    }
+                    VTableRelease( table );
+                }
+                VDatabaseRelease( database );
+            }
+            
+            VDBManagerRelease( manager );
+        }
+        KDirectoryRelease( cur_dir );
+    }
+    return rc;
+}
+
+/* New test cases should go here */
+void initTestCases()
+{
+    {
+        std::map<std::string, RowRange> key_ranges;
+        {
+            RowRange range = {2, 5};
+            key_ranges["a"] = range;
+            key_ranges["A"] = range;
+        }
+        {
+            RowRange range = {7, 7};
+            key_ranges["b"] = range;
+        }
+        
+        TestCase tc = { TEST_SUITE "/actual/ci-1/db", key_ranges };
+        test_cases["ci-1"] = tc;
+    }
+    
+    {
+        std::map<std::string, RowRange> key_ranges;
+        {
+            RowRange range = {1, 5};
+            key_ranges["abcdefghi"] = range;
+            key_ranges["abcdefGHI"] = range;
+            key_ranges["ABcdefghi"] = range;
+        }
+        {
+            RowRange range = {6, 6};
+            key_ranges["ABcdefghi1234567890"] = range;
+        }
+        
+        TestCase tc = { TEST_SUITE "/actual/ci-2/db", key_ranges };
+        test_cases["ci-2"] = tc;
+    }
+    
+    {
+        std::map<std::string, RowRange> key_ranges;
+        {
+            RowRange range = {1, 4};
+            key_ranges["abcdefghi"] = range;
+            key_ranges["abcdefGHI"] = range;
+            key_ranges["ABcdefghi"] = range;
+        }
+        
+        TestCase tc = { TEST_SUITE "/actual/ci-3/db", key_ranges };
+        test_cases["ci-3"] = tc;
+    }
+    
+    {
+        std::map<std::string, RowRange> key_ranges;
+        {
+            RowRange range = {1, 4};
+            key_ranges["abcdefghi"] = range;
+            key_ranges["abcdefGHI"] = range;
+            key_ranges["ABcdefghi"] = range;
+        }
+        
+        TestCase tc = { TEST_SUITE "/actual/ci-4/db", key_ranges };
+        test_cases["ci-4"] = tc;
+    }
+    
+    {
+        std::map<std::string, RowRange> key_ranges;
+        {
+            RowRange range = {1, 3};
+            key_ranges["abcdefghi"] = range;
+        }
+        
+        {
+            RowRange range = {4, 4};
+            key_ranges["abcdefGHI"] = range;
+        }
+        
+        {
+            RowRange range = {5, 5};
+            key_ranges["ABcdefghi"] = range;
+        }
+        
+        {
+            RowRange range = {6, 6};
+            key_ranges["ABcdefghi1234567890"] = range;
+        }
+        
+        TestCase tc = { TEST_SUITE "/actual/cs-1/db", key_ranges };
+        test_cases["cs-1"] = tc;
+    }
+    
+    {
+        std::map<std::string, RowRange> key_ranges;
+        {
+            RowRange range = {1, 3};
+            key_ranges["abcdefghi"] = range;
+        }
+        
+        {
+            RowRange range = {4, 4};
+            key_ranges["abcdefGHI"] = range;
+        }
+        
+        {
+            RowRange range = {5, 5};
+            key_ranges["ABcdefghi"] = range;
+        }
+        
+        {
+            RowRange range = {6, 6};
+            key_ranges["ABcdefghi1234567890"] = range;
+        }
+        
+        TestCase tc = { TEST_SUITE "/actual/cs-2/db", key_ranges };
+        test_cases["cs-2"] = tc;
+    }
+}
+
+int main(int argc, const char* argv[])
+{
+    /* init logging */
+    KLogLibHandlerSetStdErr();
+    KLogHandlerSetStdErr();
+    KWrtInit("checklookup", 0);
+    
+    initTestCases();
+    
+    if (argc < 2)
+    {
+        std::cerr << "Please specify test case name" << std::endl;
+        return 1;
+    }
+    
+    test_case_name = argv[1];
+    if (test_cases.find(test_case_name) == test_cases.end())
+    {
+        std::cerr << "Unknown test case name: " << test_case_name << std::endl;
+        return 2;
+    }
+    
+    rc_t rc = run(test_cases[test_case_name]);
+    if (rc != 0)
+        return 3;
+    
+    std::cout << "Success" << std::endl;
+    return 0;
+}
diff --git a/test/vschema/idx-text/expected/ci-1.stdout b/test/vschema/idx-text/expected/ci-1.stdout
new file mode 100644
index 0000000..0f8a271
--- /dev/null
+++ b/test/vschema/idx-text/expected/ci-1.stdout
@@ -0,0 +1,21 @@
+      NAME: 
+NAME_RANGE: 
+
+      NAME: a
+NAME_RANGE: 
+
+      NAME: a
+NAME_RANGE: 
+
+      NAME: a
+NAME_RANGE: 
+
+      NAME: A
+NAME_RANGE: 
+
+      NAME: 
+NAME_RANGE: 
+
+      NAME: b
+NAME_RANGE: 
+
diff --git a/test/vschema/idx-text/expected/ci-2.stdout b/test/vschema/idx-text/expected/ci-2.stdout
new file mode 100644
index 0000000..cbeb94d
--- /dev/null
+++ b/test/vschema/idx-text/expected/ci-2.stdout
@@ -0,0 +1,18 @@
+      NAME: abcdefghi
+NAME_RANGE: 
+
+      NAME: abcdefghi
+NAME_RANGE: 
+
+      NAME: abcdefghi
+NAME_RANGE: 
+
+      NAME: abcdefGHI
+NAME_RANGE: 
+
+      NAME: ABcdefghi
+NAME_RANGE: 
+
+      NAME: ABcdefghi1234567890
+NAME_RANGE: 
+
diff --git a/test/vschema/idx-text/expected/ci-3.stdout b/test/vschema/idx-text/expected/ci-3.stdout
new file mode 100644
index 0000000..fa546e0
--- /dev/null
+++ b/test/vschema/idx-text/expected/ci-3.stdout
@@ -0,0 +1,12 @@
+      NAME: abcdefghi
+NAME_RANGE: 
+
+      NAME: abcdefghi
+NAME_RANGE: 
+
+      NAME: abcdefGHI
+NAME_RANGE: 
+
+      NAME: ABcdefghi
+NAME_RANGE: 
+
diff --git a/test/vschema/idx-text/expected/ci-4.stdout b/test/vschema/idx-text/expected/ci-4.stdout
new file mode 100644
index 0000000..fa546e0
--- /dev/null
+++ b/test/vschema/idx-text/expected/ci-4.stdout
@@ -0,0 +1,12 @@
+      NAME: abcdefghi
+NAME_RANGE: 
+
+      NAME: abcdefghi
+NAME_RANGE: 
+
+      NAME: abcdefGHI
+NAME_RANGE: 
+
+      NAME: ABcdefghi
+NAME_RANGE: 
+
diff --git a/test/vschema/idx-text/expected/ci-5.stdout b/test/vschema/idx-text/expected/ci-5.stdout
new file mode 100644
index 0000000..dfb77ec
--- /dev/null
+++ b/test/vschema/idx-text/expected/ci-5.stdout
@@ -0,0 +1,15 @@
+      NAME: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [...]
+NAME_RANGE: 
+
+      NAME: Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [...]
+NAME_RANGE: 
+
+      NAME: 
+NAME_RANGE: 
+
+      NAME: aaa
+NAME_RANGE: 
+
+      NAME: 
+NAME_RANGE: 
+
diff --git a/test/vschema/idx-text/expected/cs-1.stdout b/test/vschema/idx-text/expected/cs-1.stdout
new file mode 100644
index 0000000..cbeb94d
--- /dev/null
+++ b/test/vschema/idx-text/expected/cs-1.stdout
@@ -0,0 +1,18 @@
+      NAME: abcdefghi
+NAME_RANGE: 
+
+      NAME: abcdefghi
+NAME_RANGE: 
+
+      NAME: abcdefghi
+NAME_RANGE: 
+
+      NAME: abcdefGHI
+NAME_RANGE: 
+
+      NAME: ABcdefghi
+NAME_RANGE: 
+
+      NAME: ABcdefghi1234567890
+NAME_RANGE: 
+
diff --git a/test/vschema/idx-text/expected/cs-2.stdout b/test/vschema/idx-text/expected/cs-2.stdout
new file mode 100644
index 0000000..cbeb94d
--- /dev/null
+++ b/test/vschema/idx-text/expected/cs-2.stdout
@@ -0,0 +1,18 @@
+      NAME: abcdefghi
+NAME_RANGE: 
+
+      NAME: abcdefghi
+NAME_RANGE: 
+
+      NAME: abcdefghi
+NAME_RANGE: 
+
+      NAME: abcdefGHI
+NAME_RANGE: 
+
+      NAME: ABcdefghi
+NAME_RANGE: 
+
+      NAME: ABcdefghi1234567890
+NAME_RANGE: 
+
diff --git a/test/vschema/idx-text/expected/cs-3.stdout b/test/vschema/idx-text/expected/cs-3.stdout
new file mode 100644
index 0000000..a0dea33
--- /dev/null
+++ b/test/vschema/idx-text/expected/cs-3.stdout
@@ -0,0 +1,18 @@
+      NAME: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [...]
+NAME_RANGE: 
+
+      NAME: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [...]
+NAME_RANGE: 
+
+      NAME: Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [...]
+NAME_RANGE: 
+
+      NAME: 
+NAME_RANGE: 
+
+      NAME: aaa
+NAME_RANGE: 
+
+      NAME: 
+NAME_RANGE: 
+
diff --git a/test/vschema/idx-text/idx-text.vschema b/test/vschema/idx-text/idx-text.vschema
new file mode 100644
index 0000000..7ec91c5
--- /dev/null
+++ b/test/vschema/idx-text/idx-text.vschema
@@ -0,0 +1,105 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+version 1;
+
+include 'vdb/vdb.vschema';
+
+/* ======= case insensitive - lower ======= */
+table idx_text:ci_lower:test:table #1
+{
+    extern column utf8  NAME = out_name_utf8;
+    physical utf8 .NAME = idx:text:insert  < 'i_name', CASE_INSENSITIVE_LOWER > ( NAME );
+
+    utf8 out_name_utf8 = idx:text:project < 'i_name', CASE_INSENSITIVE_LOWER > ( .NAME );
+
+    // Mechanism to seach for NAME
+    readonly column vdb:row_id_range NAME_RANGE
+        = idx:text:lookup < 'i_name', 'QUERY_NAME', CASE_INSENSITIVE_LOWER > ();
+}
+
+database idx_text:ci_lower:test:database #1
+{
+    table idx_text:ci_lower:test:table #1 table1;
+}
+
+/* ======= case insensitive - upper ======= */
+table idx_text:ci_upper:test:table #1
+{
+    extern column utf8  NAME = out_name_utf8;
+    physical utf8 .NAME = idx:text:insert  < 'i_name', CASE_INSENSITIVE_UPPER > ( NAME );
+
+    utf8 out_name_utf8 = idx:text:project < 'i_name', CASE_INSENSITIVE_UPPER > ( .NAME );
+
+    // Mechanism to seach for NAME
+    readonly column vdb:row_id_range NAME_RANGE
+        = idx:text:lookup < 'i_name', 'QUERY_NAME', CASE_INSENSITIVE_UPPER > ();
+}
+
+database idx_text:ci_upper:test:database #1
+{
+    table idx_text:ci_upper:test:table #1 table1;
+}
+
+/* ======= case sensitive ======= */
+table idx_text:cs:test:table #1
+{
+    extern column utf8  NAME = out_name_utf8;
+    physical utf8 .NAME = idx:text:insert  < 'i_name', CASE_SENSITIVE > ( NAME );
+
+    utf8 out_name_utf8 = idx:text:project < 'i_name', CASE_SENSITIVE > ( .NAME );
+
+    ascii out_name = cast ( out_name_utf8 );
+
+    // Mechanism to seach for NAME
+    readonly column vdb:row_id_range NAME_RANGE
+        = idx:text:lookup < 'i_name', 'QUERY_NAME', CASE_SENSITIVE > ();
+}
+
+database idx_text:cs:test:database #1
+{
+    table idx_text:cs:test:table #1 table1;
+}
+
+/* ======= default: case sensitive ======= */
+table idx_text:default_cs:test:table #1
+{
+    extern column utf8  NAME = out_name_utf8;
+    physical utf8 .NAME = idx:text:insert  < 'i_name' > ( NAME );
+
+    utf8 out_name_utf8 = idx:text:project < 'i_name' > ( .NAME );
+
+    ascii out_name = cast ( out_name_utf8 );
+
+    // Mechanism to seach for NAME
+    readonly column vdb:row_id_range NAME_RANGE
+        = idx:text:lookup < 'i_name', 'QUERY_NAME' > ();
+}
+
+database idx_text:default_cs:test:database #1
+{
+    table idx_text:default_cs:test:table #1 table1;
+}
\ No newline at end of file
diff --git a/test/vschema/idx-text/makeinputs.cpp b/test/vschema/idx-text/makeinputs.cpp
new file mode 100644
index 0000000..50ebe97
--- /dev/null
+++ b/test/vschema/idx-text/makeinputs.cpp
@@ -0,0 +1,182 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+/**
+ * Unit tests for text index functionality
+ */
+#include "../../../tools/general-loader/general-writer.hpp"
+
+#include <string>
+
+#define TEST_SUITE "idx-text"
+
+using namespace ncbi;
+
+const char* tableName = "table1";
+
+enum TestCaseType
+{
+    caseInsensitiveLower,
+    caseInsensitiveUpper,
+    caseSensitive,
+    defaultCaseSensitive
+};
+
+void run( const char * p_caseId, TestCaseType test_case_type, const std::string names[], int names_len )
+{
+    std::string output_path = std::string ( TEST_SUITE "/input/" ) + p_caseId + ".gl";
+    std::string db_path = std::string ( TEST_SUITE "/actual/" ) + p_caseId + "/db";
+    std::string schema_path = TEST_SUITE "/idx-text.vschema";
+    
+    GeneralWriter *gw;
+    try
+    {
+        const char* db_schema;
+        switch (test_case_type) {
+            case caseInsensitiveLower:
+                db_schema = "idx_text:ci_lower:test:database";
+                break;
+            case caseInsensitiveUpper:
+                db_schema = "idx_text:ci_upper:test:database";
+                break;
+            case caseSensitive:
+                db_schema = "idx_text:cs:test:database";
+                break;
+            case defaultCaseSensitive:
+                db_schema = "idx_text:default_cs:test:database";
+                break;
+            default:
+                assert(false);
+        }
+        gw = new GeneralWriter ( output_path );
+        
+        gw -> setRemotePath ( db_path );
+        gw -> useSchema ( schema_path, db_schema );
+        
+        int table_id = gw -> addTable ( tableName );
+        int column_name_id = gw -> addColumn ( table_id, "NAME", 8 );
+        
+        gw -> open ();
+        
+        for (int i = 0; i < names_len; ++i)
+        {
+            if ( names[i].size() > 0 )
+                gw -> write ( column_name_id, 8, names[i].c_str(), names[i].size() );
+            else
+                gw -> columnDefault ( column_name_id, 8, names[i].c_str(), names[i].size() );
+            
+            gw -> nextRow(table_id);
+        }
+        
+        gw -> endStream ();
+        
+        delete gw;
+        
+    }
+    catch ( ... )
+    {
+        delete gw;
+        throw;
+    }
+}
+
+int main()
+{
+    {
+        std::string names[]   = {"", "a", "a", "a", "A", "", "b"};
+        const char * test_case_id = "ci-1";
+        
+        run( test_case_id, caseInsensitiveLower, names, sizeof names / sizeof names[0] );
+    }
+
+    {
+        std::string names[]   = {"abcdefghi", "abcdefghi", "abcdefghi", "abcdefGHI", "ABcdefghi", "ABcdefghi1234567890"};
+        const char * test_case_id = "ci-2";
+        
+        run( test_case_id, caseInsensitiveLower, names, sizeof names / sizeof names[0] );
+    }
+    
+    {
+        std::string names[]   = {"abcdefghi", "abcdefghi", "abcdefGHI", "ABcdefghi"};
+        const char * test_case_id = "ci-3";
+        
+        run( test_case_id, caseInsensitiveLower, names, sizeof names / sizeof names[0] );
+    }
+    
+    {
+        std::string names[]   = {"abcdefghi", "abcdefghi", "abcdefGHI", "ABcdefghi"};
+        const char * test_case_id = "ci-4";
+        
+        run( test_case_id, caseInsensitiveUpper, names, sizeof names / sizeof names[0] );
+    }
+    
+    {
+        std::string names[]   = {
+            // very long name - 1025 characters
+            "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [...]
+            "Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [...]
+            "",
+            "aaa",
+            ""
+        };
+        const char * test_case_id = "ci-5";
+
+        run( test_case_id, caseInsensitiveLower, names, sizeof names / sizeof names[0] );
+    }
+
+    {
+        std::string names[]   = {"abcdefghi", "abcdefghi", "abcdefghi", "abcdefGHI", "ABcdefghi", "ABcdefghi1234567890"};
+        const char * test_case_id = "cs-1";
+        
+        run( test_case_id, caseSensitive, names, sizeof names / sizeof names[0] );
+    }
+    
+    {
+        std::string names[]   = {"abcdefghi", "abcdefghi", "abcdefghi", "abcdefGHI", "ABcdefghi", "ABcdefghi1234567890"};
+        const char * test_case_id = "cs-2";
+        
+        run( test_case_id, defaultCaseSensitive, names, sizeof names / sizeof names[0] );
+    }
+    
+    {
+        std::string names[]   = {
+            // very long name - 1024 characters
+            "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [...]
+            // very long name - 1023 characters
+            "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [...]
+            // very long name - 1025 characters
+	        "Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [...]
+            "",
+            "aaa",
+            ""
+        };
+        const char * test_case_id = "cs-3";
+
+        run( test_case_id, caseSensitive, names, sizeof names / sizeof names[0] );
+    }
+
+    return 0;
+}
diff --git a/test/vschema/runtestcase.sh b/test/vschema/runtestcase.sh
new file mode 100755
index 0000000..33f89ce
--- /dev/null
+++ b/test/vschema/runtestcase.sh
@@ -0,0 +1,126 @@
+#!/bin/bash
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+#echo "$0 $*"
+
+# $1 - path to sra-tools executables (general-loader, vdb-dump)
+# $2 - work directory (expected results under expected/, actual results and temporaries created under actual/)
+# $3 - test case ID (expect a file input/$3.gl to exist)
+# $4 - expected return coode
+# $5, $6, ... - command line options for general-loader
+#
+# return codes:
+# 0 - passed
+# 1 - could not create temp dir
+# 2 - unexpected return code from general-loader
+# 3 - vdb-dump failed on the output of general-loader
+# 4 - outputs differ
+
+BINDIR=$1
+WORKDIR=$2
+SUITEID=$3
+CASEID=$4
+RC=$5
+EXTRA_CHECKER_PRESENT=$6
+if [ "$EXTRA_CHECKER_PRESENT" == "y" ] ; then
+    EXTRA_CHECKER=$7
+    shift 7
+else
+    EXTRA_CHECKER=
+    shift 6
+fi
+CMDLINE=$*
+
+DUMP="$BINDIR/vdb-dump"
+LOAD="$BINDIR/general-loader"
+TEMPDIR=$WORKDIR/actual/$CASEID
+
+echo "running test $SUITEID:$CASEID"
+
+mkdir -p $TEMPDIR
+rm -rf $TEMPDIR/*
+if [ "$?" != "0" ] ; then
+    exit 1
+fi
+
+CMD="cat $SUITEID/input/$CASEID.gl | $LOAD $CMDLINE 1>$TEMPDIR/load.stdout 2>$TEMPDIR/load.stderr"
+#echo $CMD
+eval $CMD
+rc="$?"
+if [ "$rc" != "$RC" ] ; then
+    echo "$LOAD returned $rc, expected $RC"
+    echo "command executed:"
+    echo $CMD
+
+    cat $TEMPDIR/load.stdout
+    cat $TEMPDIR/load.stderr
+    exit 2
+fi
+
+if [ "$rc" == "0" ] ; then
+    CMD="$DUMP $TEMPDIR/db 1>$TEMPDIR/dump.stdout 2>$TEMPDIR/dump.stderr"
+    #echo $CMD
+    eval $CMD || exit 3
+    diff $WORKDIR/expected/$CASEID.stdout $TEMPDIR/dump.stdout >$TEMPDIR/diff
+    rc="$?"
+else    
+    # remove timestamps
+    sed -i -e 's/^....-..-..T..:..:.. //g' $TEMPDIR/load.stderr
+    # remove pathnames
+    sed -i -e 's=/.*/==g' $TEMPDIR/load.stderr
+    # remove source locations
+    sed -i -e 's=: .*:[0-9]*:[^ ]*:=:=g' $TEMPDIR/load.stderr
+    # remove version number
+    sed -i -e 's=latf-load\(\.[0-9]*\)*=latf-load=g' $TEMPDIR/load.stderr
+    diff $WORKDIR/expected/$CASEID.stderr $TEMPDIR/load.stderr >$TEMPDIR/diff
+    rc="$?"
+fi
+
+if [ "$rc" != "0" ] ; then
+    echo "command executed:"
+    echo $CMD
+
+    cat $TEMPDIR/diff
+    exit 4
+fi    
+
+if [ "$EXTRA_CHECKER_PRESENT" == "y" ] ; then
+    CMD="$EXTRA_CHECKER $CASEID 1>$TEMPDIR/extra_checker.stdout 2>$TEMPDIR/extra_checker.stderr"
+    eval $CMD
+    rc="$?"
+
+    if [ "$rc" != "0" ] ; then
+        echo "command executed:"
+        echo $CMD
+
+        cat $TEMPDIR/extra_checker.stdout
+        cat $TEMPDIR/extra_checker.stderr
+
+        exit 5
+    fi
+fi
+
+rm -rf $TEMPDIR
+
+exit 0
diff --git a/test/vxf/Makefile b/test/vxf/Makefile
deleted file mode 100644
index 064aab3..0000000
--- a/test/vxf/Makefile
+++ /dev/null
@@ -1,62 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-default: runtests
-
-TOP ?= $(abspath ../..)
-
-MODULE = test/vxf
-
-TEST_TOOLS = \
-	wb-test-vxf
-
-include $(TOP)/build/Makefile.env
-
-$(TEST_TOOLS): makedirs
-	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
-
-.PHONY: $(TEST_TOOLS)
-
-clean: stdclean
-
-#-------------------------------------------------------------------------------
-# white-box test
-#
-TEST_SRC = \
-	wb-test-vxf \
-	wb-irzip-impl
-
-TEST_OBJ = \
-	$(addsuffix .$(OBJX),$(TEST_SRC))
-
-TEST_LIBS = \
-    -skapp \
-    -sktst \
-	-sncbi-vdb \
-	-sxml2 \
-	-sm
-
-$(TEST_BINDIR)/wb-test-vxf: $(TEST_OBJ)
-	$(LP) --exe -o $@ $^ $(TEST_LIBS)
-
diff --git a/test/vxf/wb-irzip-impl.c b/test/vxf/wb-irzip-impl.c
deleted file mode 100644
index 4e834eb..0000000
--- a/test/vxf/wb-irzip-impl.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "wb-irzip-impl.h"
-
-/* this generates many pairs of encode/decode functions for different datatypes */
-#define iunzip_func_v0 test_iunzip_func_v0
-#define vdb_izip test_vdb_izip
-#define vdb_iunzip test_vdb_iunzip
-
-#include "../libs/vxf/irzip.c"
-
-#define STYPE uint64_t
-rc_t doEncode_u64(uint8_t dst[], size_t dsize, size_t *used, int64_t *Min, int64_t *Slope, uint8_t *series_count,uint8_t *planes, const STYPE Y[], unsigned N)
-{
-    return encode_u64(dst, dsize, used, Min, Slope, series_count, planes, Y, N);
-}
-rc_t doDecode_u64(STYPE Y[], unsigned N, int64_t* min, int64_t* slope, uint8_t series_count, uint8_t planes, const uint8_t src[], size_t ssize)
-{
-    return decode_u64(Y, N, min, slope, series_count, planes, src, ssize);
-}
-#undef STYPE 
-
-#define STYPE uint32_t
-rc_t doEncode_u32(uint8_t dst[], size_t dsize, size_t *used, int64_t *Min, int64_t *Slope, uint8_t *series_count,uint8_t *planes, const STYPE Y[], unsigned N)
-{
-    return encode_u32(dst, dsize, used, Min, Slope, series_count, planes, Y, N);
-}
-rc_t doDecode_u32(STYPE Y[], unsigned N, int64_t* min, int64_t* slope, uint8_t series_count, uint8_t planes, const uint8_t src[], size_t ssize)
-{
-    return decode_u32(Y, N, min, slope, series_count, planes, src, ssize);
-}
-#undef STYPE 
-
-#define STYPE int32_t
-rc_t doEncode_i32(uint8_t dst[], size_t dsize, size_t *used, int64_t *Min, int64_t *Slope, uint8_t *series_count,uint8_t *planes, const STYPE Y[], unsigned N)
-{
-    return encode_i32(dst, dsize, used, Min, Slope, series_count, planes, Y, N);
-}
-rc_t doDecode_i32(STYPE Y[], unsigned N, int64_t* min, int64_t* slope, uint8_t series_count, uint8_t planes, const uint8_t src[], size_t ssize)
-{
-    return decode_i32(Y, N, min, slope, series_count, planes, src, ssize);
-}
-#undef STYPE 
-
-#define STYPE int64_t
-rc_t doEncode_i64(uint8_t dst[], size_t dsize, size_t *used, int64_t *Min, int64_t *Slope, uint8_t *series_count,uint8_t *planes, const STYPE Y[], unsigned N)
-{
-    return encode_i64(dst, dsize, used, Min, Slope, series_count, planes, Y, N);
-}
-rc_t doDecode_i64(STYPE Y[], unsigned N, int64_t* min, int64_t* slope, uint8_t series_count, uint8_t planes, const uint8_t src[], size_t ssize)
-{
-    return decode_i64(Y, N, min, slope, series_count, planes, src, ssize);
-}
-#undef STYPE 
-
-rc_t CC iunzip_func_v0(
-                      void *Self,
-                      const VXformInfo *info,
-                      VBlobResult *dst,
-                      const VBlobData *src
-                      )
-{
-    return RC ( rcVDB, rcFunction, rcExecuting, rcInterface, rcUnsupported ); /* should not be hit in this test */
-}
diff --git a/test/vxf/wb-irzip-impl.h b/test/vxf/wb-irzip-impl.h
deleted file mode 100644
index ca57297..0000000
--- a/test/vxf/wb-irzip-impl.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _h_irzip_impl_
-#define _h_irzip_impl_
-
-#include <klib/rc.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* uint64 */
-rc_t doEncode_u64(uint8_t dst[], size_t dsize, size_t *used, int64_t *Min, int64_t *Slope, uint8_t *series_count,uint8_t *planes, const uint64_t Y[], unsigned N);
-rc_t doDecode_u64(uint64_t Y[], unsigned N, int64_t* min, int64_t* slope, uint8_t series_count, uint8_t planes, const uint8_t src[], size_t ssize);
-
-/* int64 */
-rc_t doEncode_i64(uint8_t dst[], size_t dsize, size_t *used, int64_t *Min, int64_t *Slope, uint8_t *series_count,uint8_t *planes, const int64_t Y[], unsigned N);
-rc_t doDecode_i64(int64_t Y[], unsigned N, int64_t* min, int64_t* slope, uint8_t series_count, uint8_t planes, const uint8_t src[], size_t ssize);
-
-/* uint32 */
-rc_t doEncode_u32(uint8_t dst[], size_t dsize, size_t *used, int64_t *Min, int64_t *Slope, uint8_t *series_count,uint8_t *planes, const uint32_t Y[], unsigned N);
-rc_t doDecode_u32(uint32_t  Y[], unsigned N, int64_t* min, int64_t* slope, uint8_t series_count, uint8_t planes, const uint8_t src[], size_t ssize);
-
-/* int32 */
-rc_t doEncode_i32(uint8_t dst[], size_t dsize, size_t *used, int64_t *Min, int64_t *Slope, uint8_t *series_count,uint8_t *planes, const int32_t Y[], unsigned N);
-rc_t doDecode_i32(int32_t  Y[], unsigned N, int64_t* min, int64_t* slope, uint8_t series_count, uint8_t planes, const uint8_t src[], size_t ssize);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/test/vxf/wb-test-vxf.cpp b/test/vxf/wb-test-vxf.cpp
deleted file mode 100644
index 6711998..0000000
--- a/test/vxf/wb-test-vxf.cpp
+++ /dev/null
@@ -1,268 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <ktst/unit_test.hpp>
-
-TEST_SUITE(VxfTestSuite);
-
-#include "wb-irzip-impl.h"
-
-////////////////////////////////////////// IZIP encoding tests
-
-// test fixture for scanner tests
-class EncoderFixture
-{
-public:
-    EncoderFixture()
-    : dSize(BufSize), used(0), series_count(0), planes(0)
-    {
-        min[0] = min[1] = 0;
-        slope[0] = slope[1] = 0;
-    }
-
-    static const int BufSize = 102400;
-    uint8_t dst[BufSize];
-    size_t dSize;
-    size_t used;
-    int64_t min[2];
-    int64_t slope[2];
-    uint8_t series_count;
-    uint8_t planes;
-};
-
-#define ARR_SIZE(a) (sizeof(a) / sizeof(a[0]))
-
-#define REQUIRE_EQ_ARR(a, b, size)  \
-    for (size_t i=0; i < size; ++i) \
-    {                               \
-        REQUIRE_EQUAL(a[i], b[i]);  \
-    }
-
-// exposes an assert failure when encoding unsigned 64 bit integers (#VDB-539), case 1
-FIXTURE_TEST_CASE(IRZIP_u64_assert1, EncoderFixture)
-{
-    uint64_t y[]={
-        UINT64_C(353878216), 
-        UINT64_C(353878152), 
-        UINT64_C(353877873), 
-        UINT64_C(353877162), 
-        UINT64_C(353876785), 
-        UINT64_C(353875727), 
-        UINT64_C(353874605), 
-        UINT64_C(353873979), 
-        UINT64_C(353873604), 
-        UINT64_C(353872503)
-    };
-    uint64_t decoded[ARR_SIZE(y)];
-    REQUIRE_RC(doEncode_u64(dst, dSize, &used, min, slope, &series_count, &planes, y, ARR_SIZE(y)));
-    REQUIRE_RC(doDecode_u64(decoded, ARR_SIZE(y), min, slope, series_count, planes, dst, used));
-    REQUIRE_EQ_ARR(y, decoded, ARR_SIZE(y));
-}
-
-// exposes an assert failure when encoding unsigned 64 bit integers (#VDB-539), case 2
-FIXTURE_TEST_CASE(IRZIP_u64_assert2, EncoderFixture)
-{
-    uint64_t y[]={
-        UINT64_C(353878216), 
-        UINT64_C(353878152), 
-        UINT64_C(        0), 
-        UINT64_C(        0), 
-        UINT64_C(        0), 
-        UINT64_C(        0), 
-        UINT64_C(        0), 
-        UINT64_C(        0), 
-        UINT64_C(        0), 
-        UINT64_C(        0)
-    };
-    uint64_t decoded[ARR_SIZE(y)];
-    REQUIRE_RC(doEncode_u64(dst, dSize, &used, min, slope, &series_count, &planes, y, ARR_SIZE(y)));
-    REQUIRE_RC(doDecode_u64(decoded, ARR_SIZE(y), min, slope, series_count, planes, dst, used));
-    REQUIRE_EQ_ARR(y, decoded, ARR_SIZE(y));
-}
-
-// tries to expose the same assert failure as above (#VDB-539), using 32 bit integers (#VDB-539), case 1
-FIXTURE_TEST_CASE(IRZIP_u32_assert1, EncoderFixture)
-{
-    uint32_t y[]={
-        78216, 
-        78152, 
-        77873, 
-        77162, 
-        76785, 
-        75727, 
-        74605, 
-        73979, 
-        73604, 
-        72503
-    };
-    uint32_t decoded[ARR_SIZE(y)];
-    REQUIRE_RC(doEncode_u32(dst, dSize, &used, min, slope, &series_count, &planes, y, ARR_SIZE(y)));
-    REQUIRE_RC(doDecode_u32(decoded, ARR_SIZE(y), min, slope, series_count, planes, dst, used));
-    REQUIRE_EQ_ARR(y, decoded, ARR_SIZE(y));
-}
-
-// tries to expose the same assert failure as above (#VDB-539), using 32 bit integers (#VDB-539), case 2
-FIXTURE_TEST_CASE(IRZIP_u32_assert2, EncoderFixture)
-{
-    uint32_t y[]={
-        78216, 
-        78152, 
-        0, 
-        0, 
-        0, 
-        0, 
-        0, 
-        0, 
-        0, 
-        0
-    };
-    uint32_t decoded[ARR_SIZE(y)];
-    REQUIRE_RC(doEncode_u32(dst, dSize, &used, min, slope, &series_count, &planes, y, ARR_SIZE(y)));
-    REQUIRE_RC(doDecode_u32(decoded, ARR_SIZE(y), min, slope, series_count, planes, dst, used));
-    REQUIRE_EQ_ARR(y, decoded, ARR_SIZE(y));
-}
-
-// exposes an assert failure when encoding unsigned 64 bit integers, case 3
-FIXTURE_TEST_CASE(IRZIP_u64_assert3, EncoderFixture)
-{
-    uint64_t y[]={
-        UINT64_C( 388750),
-        UINT64_C( 490295),
-        UINT64_C( 813277),
-        UINT64_C( 725540),
-        UINT64_C(  85294),
-        UINT64_C( 178363),
-        UINT64_C(1607062),
-        UINT64_C( 825545),
-        UINT64_C( 474451),
-        UINT64_C( 745337),
-    };
-    uint64_t decoded[ARR_SIZE(y)];
-    REQUIRE_RC(doEncode_u64(dst, dSize, &used, min, slope, &series_count, &planes, y, ARR_SIZE(y)));
-    REQUIRE_RC(doDecode_u64(decoded, ARR_SIZE(y), min, slope, series_count, planes, dst, used));
-    REQUIRE_EQ_ARR(y, decoded, ARR_SIZE(y));
-}
-
-// exposes an assert failure when encoding unsigned 64 bit integers, case 4
-FIXTURE_TEST_CASE(IRZIP_u64_assert4, EncoderFixture)
-{
-    uint64_t y[]={
-        UINT64_C(    2800167),
-        UINT64_C(47247557592),
-        UINT64_C(64427423880),
-        UINT64_C(30067744899),
-        UINT64_C(64427423881),
-        UINT64_C(21477638667),
-        UINT64_C( 8592622326),
-        UINT64_C(12887443839),
-        UINT64_C( 8592622323),
-        UINT64_C(12887443837),
-        UINT64_C(     773768),
-        UINT64_C(60132272802),
-        UINT64_C(25772592326),
-        UINT64_C( 4297746473),
-        UINT64_C(21477638660),
-    };
-    uint64_t decoded[ARR_SIZE(y)];
-    REQUIRE_RC(doEncode_u64(dst, dSize, &used, min, slope, &series_count, &planes, y, ARR_SIZE(y)));
-    REQUIRE_RC(doDecode_u64(decoded, ARR_SIZE(y), min, slope, series_count, planes, dst, used));
-    REQUIRE_EQ_ARR(y, decoded, ARR_SIZE(y));
-}
-
-
-// encoding/decoding of signed 64 bit integers
-FIXTURE_TEST_CASE(IRZIP_i64_assert1, EncoderFixture)
-{
-    int64_t y[]={
-        INT64_C( 353878216), 
-        INT64_C(-353878152), 
-        INT64_C( 353877873), 
-        INT64_C(-353877162), 
-        INT64_C(-353876785), 
-        INT64_C( 353875727), 
-        INT64_C(-353874605), 
-        INT64_C( 353873979), 
-        INT64_C(-353873604), 
-        INT64_C( 353872503)
-    };
-    int64_t decoded[ARR_SIZE(y)];
-    REQUIRE_RC(doEncode_i64(dst, dSize, &used, min, slope, &series_count, &planes, y, ARR_SIZE(y)));
-    REQUIRE_RC(doDecode_i64(decoded, ARR_SIZE(y), min, slope, series_count, planes, dst, used));
-    REQUIRE_EQ_ARR(y, decoded, ARR_SIZE(y));
-}
-
-// encoding/decoding of signed 32 bit integers
-FIXTURE_TEST_CASE(IRZIP_i32_assert1, EncoderFixture)
-{
-    int32_t y[]={
-        78216, 
-        78152, 
-        -77873, 
-        -77162, 
-        -76785, 
-        75727, 
-        74605, 
-        -73979, 
-        -73604, 
-        72503
-    };
-    int32_t decoded[ARR_SIZE(y)];
-    REQUIRE_RC(doEncode_i32(dst, dSize, &used, min, slope, &series_count, &planes, y, ARR_SIZE(y)));
-    REQUIRE_RC(doDecode_i32(decoded, ARR_SIZE(y), min, slope, series_count, planes, dst, used));
-    REQUIRE_EQ_ARR(y, decoded, ARR_SIZE(y));
-}
-
-//////////////////////////////////////////// Main
-extern "C"
-{
-
-#include <kapp/args.h>
-#include <kfg/config.h>
-
-ver_t CC KAppVersion ( void )
-{
-    return 0x1000000;
-}
-rc_t CC UsageSummary (const char * progname)
-{
-    return 0;
-}
-
-rc_t CC Usage ( const Args * args )
-{
-    return 0;
-}
-
-const char UsageDefaultName[] = "wb-test-vxf";
-
-rc_t CC KMain ( int argc, char *argv [] )
-{
-    KConfigDisableUserSettings();
-    rc_t rc=VxfTestSuite(argc, argv);
-    return rc;
-}
-
-}
diff --git a/tools/.gitignore b/tools/.gitignore
new file mode 100644
index 0000000..f523b36
--- /dev/null
+++ b/tools/.gitignore
@@ -0,0 +1,6 @@
+pileupcomp
+avg-qual
+sra-rewrite
+core.*
+gmon.out
+
diff --git a/tools/Makefile b/tools/Makefile
new file mode 100644
index 0000000..64e774d
--- /dev/null
+++ b/tools/Makefile
@@ -0,0 +1,92 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+by_default: default
+
+TOP ?= $(abspath ..)
+MODULE = tools
+
+include $(TOP)/build/Makefile.shell
+
+include $(TOP)/build/Makefile.config
+
+#-------------------------------------------------------------------------------
+# default
+#
+SUBDIRS =             \
+	util              \
+	align-cache       \
+	kar               \
+	kqsh              \
+	vdb-dump          \
+	sra-dump          \
+	sra-pileup        \
+	bam-loader        \
+	fastq-loader      \
+	srapath           \
+	sra-stat          \
+	vdb-copy          \
+	rd-filter-redact  \
+	vdb-config        \
+	align-info        \
+	qual-recalib-stat \
+	prefetch          \
+	vdb-decrypt       \
+	vdb-validate      \
+	sra-sort          \
+	cache-mgr         \
+	vcf-loader        \
+	copycat           \
+	sra-load          \
+	ccextract         \
+	pacbio-load       \
+	fuse              \
+	vdb-diff          \
+	kget              \
+	ngs-pileup        \
+	general-loader    \
+	ref-variation     \
+	fastdump          \
+
+ifneq (win,$(BUILD_OS))
+ifneq (rwin,$(BUILD_OS))
+	SUBDIRS += cg-load pileup-stats
+endif
+endif
+
+# common targets for non-leaf Makefiles; must follow a definition of SUBDIRS
+include $(TOP)/build/Makefile.targets
+
+$(SUBDIRS):
+	@ $(MAKE) -C $@
+
+.PHONY: default $(SUBDIRS) 
+
+#-------------------------------------------------------------------------------
+# pass-through
+#
+out debug profile release GCC ICC VC++:
+	@ $(MAKE) TOP=$(TOP) -f $(TOP)/build/Makefile.env $@
+
+.PHONY: out debug profile release GCC ICC VC++
diff --git a/tools/agp-load/AGP.py b/tools/agp-load/AGP.py
new file mode 100644
index 0000000..83538be
--- /dev/null
+++ b/tools/agp-load/AGP.py
@@ -0,0 +1,668 @@
+#!python
+# =============================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# =============================================================================
+
+
+import tarfile
+import gzip
+import os
+from eutils import EUtils
+
+class _loc:
+    def __init__(self, mol, start, last):
+        self.mol = mol
+        self.start = start
+        self.last = last
+
+    def dir(self):
+        if self.last < self.start:
+            return -1
+        else:
+            return 1
+
+    def length(self):
+        if self.last < self.start:
+            return (self.start - self.last) + 1
+        else:
+            return (self.last - self.start) + 1
+
+    def split(self, at):
+        if self.last < self.start:
+            left = _loc(self.mol, self.start, self.start - at + 1)
+            right = _loc(self.mol, self.start - at, self.last)
+        else:
+            left = _loc(self.mol, self.start, self.start + at - 1)
+            right = _loc(self.mol, self.start + at, self.last)
+        return left, right
+
+    def merge(self, other):
+        if self.mol != other.mol:
+            return None
+        if self.last + self.dir() != other.start:
+            return None
+        return _loc(self.mol, self.start, other.last)
+
+    def __str__(self):
+        return "\t".join([self.mol, str(self.start), str(self.last)])
+
+class map_pair:
+    def __init__(self, first, second):
+        if first.last >= first.start:
+            self.first = first
+            self.second = second
+        else:
+            self.first = _loc(first.mol, first.last, first.start)
+            self.second = _loc(second.mol, second.last, second.start)
+
+    def dir(self):
+        return self.second.dir()
+
+    def agp(self):
+        r = [self.first.mol, self.first.start, self.first.last, 0, 'O', self.second.mol, self.second.start, self.second.last, 1]
+        if r[7] < r[6]:
+            r[6], r[7], r[8] = r[7], r[6], -1
+        return r
+
+    def merge(self, other):
+        if self.dir() != other.dir(): return None
+        first = self.first.merge(other.first)
+        if first == None: return None
+        second = self.second.merge(other.second)
+        if second == None: return None
+        return map_pair(first, second)
+
+    @classmethod
+    def cmp(cls, a, b):
+        if a.first.mol < b.first.mol: return -1
+        if a.first.mol > b.first.mol: return 1
+        apos = a.first.start if a.first.start < a.first.last else a.first.last
+        bpos = b.first.start if b.first.start < b.first.last else b.first.last
+        if apos < bpos: return -1
+        if apos > bpos: return 1
+        return 0
+
+class _loc_pair:
+    def __init__(self, first):
+        self.first = first
+        self.second = []
+
+    def add(self, second):
+        self.second.append(second)
+
+    def split(self, at):
+        cut = at - self.first.start
+        l1, r1 = self.first.split(cut)
+        left = _loc_pair(l1)
+        right = _loc_pair(r1)
+        for s in self.second:
+            l2, r2 = s.split(cut)
+            assert(l1.length() == l2.length())
+            assert(r1.length() == r2.length())
+            left.add(l2)
+            right.add(r2)
+        return left, right
+
+    def __str__(self):
+        rslt = ''
+        for s in self.second:
+            rslt += "\t".join(map((lambda a: str(a)), [self.first, s]))+"\n"
+        return rslt
+
+    def agp(self, rev=False):
+        rslt = []
+        for s in self.second:
+            start, last, dir = s.start, s.last, 1
+            if last < start:
+                start, last, dir = last, start, -1
+            r = [s.mol, start, last, 0, "O", self.first.mol, self.first.start, self.first.last, dir] if rev else [self.first.mol, self.first.start, self.first.last, 0, "O", s.mol, start, last, dir]
+            rslt.append(r)
+        return rslt
+
+    @classmethod
+    def make_pair(cls, first, second):
+        rslt = _loc_pair(first)
+        rslt.add(second)
+        return rslt
+
+class _loc_set:
+    def __init__(self):
+        self.set = []
+
+    def _overlap(self, first):
+        f = 0
+        e = len(self.set)
+        while f < e:
+            m = f + (e - f)/2
+            fnd = self.set[m]
+            if fnd.first.start > first.last:
+                e = m
+                continue
+            if fnd.first.last < first.start:
+                f = m + 1
+                continue
+            return m, None
+        return None, f
+
+    def _add(self, first, second):
+        m, f = self._overlap(first)
+        if m == None:
+            self.set.insert(f, _loc_pair.make_pair(first, second))
+            return None
+        if first.start == self.set[m].first.start and first.last == self.set[m].first.last:
+            self.set[m].add(second)
+            return None
+        return m
+
+    def split(self, at):
+        """ Search the list for the record that overlaps the split point, then
+            split that record. No split occurs if the split point is not fully
+            inside any record, in particular, the start is not 'inside'
+        """
+        f = 0
+        e = len(self.set)
+        while f < e:
+            m = f + (e - f)/2
+            fnd = self.set[m]
+            if fnd.first.start > at:
+                e = m
+                continue
+            if fnd.first.last < at:
+                f = m + 1
+                continue
+            if fnd.first.start < at:
+                l, r = fnd.split(at)
+                self.set[m:m+1] = [l, r]
+            break
+
+    def add(self, first, second):
+        if len(self.set) == 0:
+            self.set.append(_loc_pair.make_pair(first, second))
+            return
+        else:
+            assert(first.mol == self.set[0].first.mol)
+        self.split(first.start)
+        self.split(first.last + 1)
+        m = self._add(first, second)
+        if m == None: return
+        if self.set[m].first.start > first.start:
+            cut = self.set[m].first.start - first.start
+            l1, r1 = first.split(cut)
+            l2, r2 = second.split(cut)
+            self._add(l1, l2)
+            self.add(r1, r2)
+            return
+        if self.set[m].first.last < first.last:
+            cut = (first.last) - (self.set[m].first.last)
+            l1, r1 = first.split(first.length() - cut)
+            l2, r2 = second.split(second.length() - cut)
+            self._add(r1, r2)
+            self.add(l1, l2)
+            return
+
+    def intersect(self, other):
+        if len(self.set) == 0 or len(other.set) == 0: return
+        assert(self.set[0].first.mol == other.set[0].first.mol)
+        for r in self.set:
+            other.split(r.first.start)
+            other.split(r.first.last + 1)
+        for r in other.set:
+            self.split(r.first.start)
+            self.split(r.first.last + 1)
+        i, j = 0, 0
+        while i < len(self.set) and j < len(other.set):
+            if self.set[i].first.start == other.set[j].first.start:
+                assert(self.set[i].first.length() == other.set[j].first.length())
+                i += 1
+                j += 1
+                continue
+            if self.set[i].first.start < other.set[j].first.start:
+                del self.set[i]
+            else:
+                del other.set[j]
+        del self.set[i:]
+        del other.set[j:]
+
+    def agp(self, rev=False):
+        rslt = []
+        for r in self.set:
+            rslt.extend(r.agp(rev))
+        if rev:
+            def cmp(a, b):
+                if a[0] < b[0]: return -1
+                if a[0] > b[0]: return 1
+                if a[1] < b[1]: return -1
+                if a[1] > b[1]: return 1
+            rslt.sort(cmp)
+        return rslt
+
+    def __str__(self):
+        return reduce((lambda a, b: a + str(b)), self.set, '')
+
+
+def _loadFile(fh, file, func):
+    def loadTarFile(fh, file, func):
+        with tarfile.open(mode='r', fileobj=fh) as tar:
+            for f in tar:
+                i = tar.extractfile(f)
+                _loadFile(i, os.path.join(file, f.name), func)
+                i.close()
+
+    def loadText(fh, file, func):
+        for i, line in enumerate(fh):
+            func(line, "{}:{}".format(file, i))
+
+    try:
+        loadTarFile(fh, file, func)
+        return
+    except tarfile.ReadError:
+        pass
+    try:
+        with gzip.GzipFile(fileobj=fh) as gz:
+            loadText(gz, file[:-3] if file.endswith(".gz") else file, func)
+            return
+    except IOError:
+        pass
+    loadText(fh, file, func)
+
+
+class AGP:
+    def loadFile(self, fname):
+        """ AGP Fields:
+            object
+            beg
+            end
+            partno      # not used, zero'ed out when flattened
+            type        # gaps are ignored, infer them from the gaps between subobjects
+            subobject
+            sub_beg
+            sub_end
+            strand
+            source      # ADDED, <file name>:<line number>, this is just for debugging
+        """
+        recs = []
+        def cb(line, src):
+            if line[0] == '#': return
+            fld = line[:-1].split("\t")
+            if len(fld) != 9: return
+            if fld[4] == "N" or fld[4] == "U": return
+            fld[0] = fld[0]
+            fld[1] = int(fld[1])
+            fld[2] = int(fld[2])
+            fld[3] = int(fld[3])
+            fld[6] = int(fld[6])
+            fld[7] = int(fld[7])
+            fld[8] = -1 if fld[8] == '-' else 1
+            fld.append(src)
+            assert(fld[2] - fld[1] == fld[7] - fld[6]) # lengths are the same
+            recs.append(fld)
+        with open(fname, "r") as fh:
+            _loadFile(fh, fname, cb)
+        self._data.extend(recs)
+
+    def __init__(self):
+        self._data = []
+
+    def _topLevelObjects(self):
+        sub = dict.fromkeys(v[5] for v in self._data)
+        return dict.fromkeys(v[0] for v in self._data if v[0] not in sub)
+
+    def topLevelObjects(self):
+        return sorted(self._topLevelObjects().keys())
+
+    def _index(self):
+        """ Sorted by
+                object (fld[0]),
+                beg (fld[1]),
+                end (fld[2]) desc
+        """
+        def index_cmp(a, b):
+            if self._data[a][0] < self._data[b][0]:
+                return -1
+            if self._data[b][0] < self._data[a][0]:
+                return 1
+            if self._data[a][1] < self._data[b][1]:
+                return -1
+            if self._data[b][1] < self._data[a][1]:
+                return 1
+            if self._data[a][2] < self._data[b][2]:
+                return 1
+            if self._data[b][2] < self._data[a][2]:
+                return -1
+            return a - b
+        return sorted(range(len(self._data)), index_cmp)
+
+    def _clean(self):
+        """ Returns a cleansed version of the input data
+            without any redundant or duplicate records
+        """
+        rslt = []
+        for i in self._index():
+            v = self._data[i]
+            if len(rslt) == 0:
+                rslt.append(v)
+                continue
+            u = rslt[-1]
+            if v[0] != u[0]: # different object
+                rslt.append(v)
+                continue
+            if v[1] > u[2]:  # starts after the previous one ended
+                rslt.append(v)
+                continue
+            if v[2] > u[2]:  # it's an error if it overlaps the previous one
+                print("The record from {}".format(v[9]))
+                print("\t".join(v))
+                print("conflicts with the record from {}".format(rslt[-1][9]))
+                print("\t".join(rslt[-1]))
+                assert("The AGP data contains errors:")
+        return rslt
+
+    def _flattened(self, args):
+        """ yields list of flattened AGP """
+        index = {}
+        for v in self._clean():
+            if v[0] in index:
+                index[v[0]].append(v)
+            else:
+                index[v[0]] = [v]
+        isflat = {k:False for k in index}
+        def flatten(k):
+            flat = []
+            for v in index[k]:
+                sub = v[5]
+                if sub not in index: # has no subparts
+                    flat.append(v[0:3] + [0] + v[4:-1])
+                    continue
+                assert(v[8] > 0) # multipart objects aren't reversable?
+                if not isflat[sub]: flatten(sub)
+                for f in index[sub]:
+                    if f[2] < v[6] or f[1] > v[7]:
+                        continue
+                    # parts aren't splitable
+                    assert(f[1] >= v[6] and f[2] <= v[7])
+                    n = [v[0], f[1]+v[1]-1, f[2]+v[1]-1, 0] + f[4:]
+                    flat.append(n)
+            index[k] = flat
+            isflat[k] = True
+        for k in args:
+            flatten(k)
+            yield index[k]
+
+    def flattened(self, args=[]):
+        objects = self._topLevelObjects() if len(args) == 0 else args
+        for l in self._flattened(objects):
+            for r in l:
+                yield r
+
+    def _leaves(self):
+        rslt = {}
+        for l in self._flattened(self._topLevelObjects().keys()):
+            for r in l[:]:
+                if r[5] not in rslt:
+                    rslt[r[5]] = _loc_set()
+                if r[8] < 0:
+                    other = _loc(r[0], r[2], r[1])
+                else:
+                    other = _loc(r[0], r[1], r[2])
+                rslt[r[5]].add(_loc(r[5], r[6], r[7]), other)
+        return rslt
+
+    def remap(self, other):
+        def getSummary(acc):
+            while True:
+                summary = EUtils.summary(acc)
+                if summary:
+                    return summary
+
+        superceeds_memo = {}
+        def superceeds(a, b):
+            try: return superceeds_memo[b] == a
+            except KeyError:
+                pass
+            assemblyacc = None
+            accessionversion = None
+            replacedby = None
+            try:
+                assemblyacc = getSummary(a)['assemblyacc']
+                accessionversion = getSummary(a)['accessionversion']
+                replacedby = getSummary(b)['replacedby']
+            except KeyError:
+                pass
+            if replacedby == None:
+                superceeds_memo[b] = None
+                return False
+            if replacedby == assemblyacc or replacedby == accessionversion:
+                superceeds_memo[b] = a
+                return True
+            return False
+
+        def compact(l):
+            last = None
+            for r in sorted(l, map_pair.cmp):
+                if last == None:
+                    last = r
+                    continue
+                x = last.merge(r)
+                if x:
+                    last = x
+                    continue
+                y = last.agp()
+                last = r
+                yield y
+            if last != None: yield last.agp()
+
+        def remapper():
+            s = self._leaves()
+            o = other._leaves()
+            for k in sorted(s.keys()):
+                if k not in o: continue
+                s[k].intersect(o[k])
+                n = len(s[k].set)
+                assert(n == len(o[k].set))
+                for i in range(0, n):
+                    src = s[k].set[i]
+                    dst = o[k].set[i]
+                    assert(src.first.start == dst.first.start)
+                    assert(src.first.last  == dst.first.last )
+                    src = src.second
+                    dst = dst.second
+                    if len(src) == 1 and len(dst) == 1:
+                        yield map_pair(dst[0], src[0])
+                    else:
+                        recs = [(r1, r2) for r1 in src for r2 in dst if superceeds(r2.mol, r1.mol)]
+                        for r in recs:
+                            yield map_pair(r[1], r[0])
+
+        return compact(remapper())
+
+
+if __name__ == "__main__":
+    import sys
+    import subprocess
+    import time
+
+
+    def complement(b):
+        if b == 'A': return 'T'
+        if b == 'C': return 'G'
+        if b == 'G': return 'C'
+        if b == 'T': return 'A'
+        return 'N'
+
+    def clean(b):
+        if b == 'A': return 'A'
+        if b == 'C': return 'C'
+        if b == 'G': return 'G'
+        if b == 'T': return 'T'
+        return 'N'
+
+    def fetchFasta(acc, end):
+        sleep = 0
+        while True:
+            fasta = ''
+            defline = None
+            sleep += 1
+            try:
+                for line in EUtils.fasta(acc):
+                    if line.startswith(">"):
+                        if defline == None:
+                            defline = line
+                        else:
+                            break
+                    else:
+                        fasta += line
+                if defline != None:
+                    if end <= len(fasta):
+                        return (defline, fasta)
+                    msg = "got truncated response for {}; retrying in a moment".format(acc)
+                else:
+                    msg = "got no response for {}; retrying in a moment".format(acc)
+            except KeyboardInterrupt:
+                sys.stderr.write(" cancelled\n")
+                exit(0)
+            except:
+                msg = "error fetching {}; retrying in a moment".format(acc)
+                pass
+            if sleep > 10:
+                sys.stderr.write(" too many retries; try again later.\n")
+                exit(1)
+            sys.stderr.write(msg)
+            sys.stderr.flush()
+            time.sleep(sleep)
+            sys.stderr.write("\033[{}D\033[K".format(len(msg)))
+            sys.stderr.flush()
+
+
+    cache = {}
+    def fetchObject(acc, start=0, end=-1, rev=False):
+        global cache
+        if acc in cache:
+            fasta = cache[acc]
+        else:
+            (defline, fasta) = fetchFasta(acc, end)
+            cache[acc] = fasta
+        if end < 0: end = len(fasta)
+        assert(end <= len(fasta))
+        assert(start >= 0)
+        assert(start < end)
+        if not rev:
+            return ''.join(map(clean, list(fasta[start:end])))
+        rslt = list(fasta[start:end])
+        i = 0
+        j = len(rslt)
+        while (i < j):
+            j -= 1
+            A = complement(rslt[i])
+            B = complement(rslt[j])
+            rslt[j] = A
+            rslt[i] = B
+            i += 1
+        return ''.join(rslt)
+
+    def usage():
+        print("{} [[ test | dump ] <agp source file> | remap <from agp> <to agp>]".format(sys.argv[0]))
+        exit(1)
+
+    agps = []
+    try:
+        for file in sys.argv[2:]:
+            agp = AGP()
+            agp.loadFile(file)
+            agps.append(agp)
+    except IndexError:
+        usage()
+
+    if len(agps) == 2:
+        for r in agps[0].remap(agps[1]):
+            print(r)
+        exit(0)
+
+    def unflat(agp):
+        un = {}
+        for r in agp.flattened():
+            try: un[r[0]].append(r)
+            except KeyError:
+                un[r[0]] = [r]
+        return un
+
+    def test(agp):
+        flat = unflat(agp)
+        seqID = sorted(flat.keys())
+        for object in seqID:
+            next = 1
+            test = ''
+            sys.stderr.write("reconstructing {}  ".format(object))
+            sys.stderr.flush()
+            part = 0
+            count = len(flat[object])
+            progress = ''
+            for r in flat[object]:
+                erase = len(progress)
+                progress = '.'*int((part * 100.0) / count)
+                sys.stderr.write("\x08"*erase + progress)
+                read = fetchObject(r[5], r[6] - 1, r[7], r[8] < 0)
+                test += "N"*(r[1] - next)
+                test += read
+                part += 1
+                next = r[2] + 1
+            sys.stderr.write(" ")
+            cache = {}
+            (dummy, gold) = fetchFasta(object, next)
+            gold = ''.join(map(clean, list(gold)))
+            if len(test) < len(gold):
+                test += "N"*(len(gold)-len(test))
+            if gold == test:
+                sys.stderr.write(" PASSED\n".format(object))
+            else:
+                sys.stderr.write(" FAILED\n".format(object))
+                with open("{}.reconstructed.fasta".format(object), 'w') as fh:
+                    fh.write(">{}\n".format(object))
+                    i = 0
+                    while i < len(test):
+                        fh.write("{}\n".format(test[i:i+70]))
+                        i += 70
+                with open("{}.expected.fasta".format(object), 'w') as fh:
+                    fh.write(">{}\n".format(object))
+                    i = 0
+                    while i < len(gold):
+                        fh.write("{}\n".format(gold[i:i+70]))
+                        i += 70
+                exit(1)
+        sys.stderr.write("All passed\n")
+
+    def dump(agp):
+        flat = unflat(agp)
+        seqID = sorted(flat.keys())
+        for object in seqID:
+            for r in flat[object]:
+                print("\t".join(map((lambda x: str(x)), r)))
+
+    if sys.argv[1] == "test":
+        test(agps[0])
+    elif sys.argv[1] == "dump":
+        dump(agps[0])
+    elif sys.argv[1] == "remap" and len(agps) == 2:
+        for r in agps[0].remap(agps[1]):
+            print(r)
+    else:
+        usage()
diff --git a/tools/agp-load/agp-load.py b/tools/agp-load/agp-load.py
new file mode 100644
index 0000000..c6b11a5
--- /dev/null
+++ b/tools/agp-load/agp-load.py
@@ -0,0 +1,173 @@
+#!python
+"""The loader requires the following arguments:
+* for source: -name=<build name> <AGP file> [<AGP file>...]
+* for result: -name=<build name> <AGP file> [<AGP file>...]
+* -output=<output directory>
+
+<AGP file> can be an AGP file or a tar containing, possibly gzip'ed, AGP files.
+<build name> is stored in the output database (see below)
+
+Example:
+  python agp-load.py -name=GRCh37 GRCh37.tar -name=GRCh38.p2 GRCh38.tar -output=37_to_38.remap
+
+The loader generates three tables containing AGP data.
+# SOURCE: the build being remapped from
+# RESULT: the build being remapped to
+# REMAP: the remapping
+
+SOURCE and RESULT will have a metadata node BuildName containing the given build
+names. This AGP data is only for components, i.e. it doesn't specify gaps, as
+they can be implied.
+
+To produce approximately valid AGP from a loaded database:
+  vdb-dump 37_to_38.remap -T REMAP -f tab -b1 -C "SEQID,START,LENGTH,COMPONENT,OFFSET,REVERSED" | awk 'BEGIN{OFS="\\t"; P[""]=0}{print $1, $2, $2+$3-1, ++P[$1], "O", $4, $5, $5+$3-1, 1-($6*2)}'
+"""
+# =============================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# =============================================================================
+
+import sys
+import traceback
+from AGP import AGP
+from GeneralWriter import GeneralWriter
+from array import array
+
+usage = "Usage: {} -help | [ -output=<name of output object> -name=<build name> <AGP files> -name=<build name> <AGP files> ]\n".format(sys.argv[0])
+build = []
+output = None
+
+for arg in sys.argv[1:]:
+    if arg[0] == '-':
+        if arg == "-help":
+            sys.stderr.write(usage)
+            sys.stderr.write(__doc__)
+            exit(0)
+        if arg[0:8] == "-output=":
+            output = arg[8:]
+        elif arg[0:6] == "-name=":
+            build.append({"name": arg[6:], "files": []})
+        else:
+            sys.stderr.write(usage)
+            exit(3)
+    else:
+        build[-1]["files"].append(arg)
+
+if output == None:
+    sys.stderr.write("output must be specified\n")
+    sys.stderr.write(usage);
+    exit(3)
+
+if len(build) != 2:
+    sys.stderr.write("Two builds must be specified\n")
+    sys.stderr.write(usage);
+    exit(3)
+
+if len(build[0]["files"]) == 0 or len(build[1]["files"]) == 0:
+    sys.stderr.write("AGP file lists must be specified\n")
+    sys.stderr.write(usage);
+    exit(3)
+
+if build[0]["name"] == build[1]["name"]:
+    sys.stderr.write("Build names must be unique\n")
+    exit(3)
+
+
+def loadFiles(list):
+    agp = AGP()
+    for f in list:
+        agp.loadFile(f)
+    return agp
+
+def assemblyTblDef():
+    return {
+        'SEQID': {
+            'elem_bits': 8,
+        },
+        'START': {
+            'elem_bits': 32,
+        },
+        'LENGTH': {
+            'elem_bits': 32,
+        },
+        'COMPONENT': {
+            'elem_bits': 8,
+        },
+        'OFFSET': {
+            'elem_bits': 32,
+        },
+        'REVERSED': {
+            'elem_bits': 8,
+        },
+    }
+
+tbl = {
+    'SOURCE': assemblyTblDef(),
+    'RESULT': assemblyTblDef(),
+    'REMAP': assemblyTblDef(),
+}
+
+gw = GeneralWriter(  output
+                   , 'agp.vschema'
+                   , 'NCBI:refseq:db:remap'
+                   , 'agp-load.py'
+                   , '1.0.0'
+                   , tbl)
+
+def logMessage(msg):
+    sys.stderr.write("{}\n".format(msg))
+
+def writeAGP(listOfAGP, tbl):
+    for r in listOfAGP:
+        tbl['SEQID'    ]['data'] = str(r[0]).encode('ascii')
+        tbl['START'    ]['data'] = array('I', [int(r[1])])
+        tbl['LENGTH'   ]['data'] = array('I', [int(r[2] - r[1])])
+        tbl['COMPONENT']['data'] = str(r[5]).encode('ascii')
+        tbl['OFFSET'   ]['data'] = array('I', [int(r[6])])
+        tbl['REVERSED' ]['data'] = array('b', [1 if r[8] < 0 else 0])
+        gw.write(tbl)
+
+def main():
+    gw.writeTableMetadata(tbl['SOURCE'], "BuildName", build[0]["name"])
+    gw.writeTableMetadata(tbl['RESULT'], "BuildName", build[1]["name"])
+
+    logMessage("loading {} ...".format(build[0]["name"]))
+    build[0]["object"] = loadFiles(build[0]["files"])
+    writeAGP(build[0]["object"].flattened(), tbl["SOURCE"])
+    logMessage("loaded {}".format(build[0]["name"]))
+
+    logMessage("loading {} ...".format(build[1]["name"]))
+    build[1]["object"] = loadFiles(build[1]["files"])
+    writeAGP(build[1]["object"].flattened(), tbl["RESULT"])
+    logMessage("loaded {}".format(build[1]["name"]))
+
+    logMessage("generating remapping data ...")
+    writeAGP(build[0]["object"].remap(build[1]["object"]), tbl["REMAP"])
+    logMessage("loaded remapping data")
+
+def cleanup():
+    logMessage("done")
+    pass
+
+main()
+gw = None
+cleanup()
diff --git a/tools/agp-load/agp.vschema b/tools/agp-load/agp.vschema
new file mode 100644
index 0000000..8ce7fa4
--- /dev/null
+++ b/tools/agp-load/agp.vschema
@@ -0,0 +1,45 @@
+/*============================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ *============================================================================
+ */
+version 1;
+
+include 'vdb/vdb.vschema';
+
+table NCBI:refseq:tbl:assembly #1.0.0
+{
+    extern column <ascii> zip_encoding SEQID;     /* the accession of the refseq being assembled           */
+    extern column <U32> izip_encoding  START;     /* the start and                                         */
+    extern column <U32> izip_encoding  LENGTH;    /*               length of the region                    */
+    extern column <ascii> zip_encoding COMPONENT; /* the accession sourcing the sequence                   */
+    extern column <U32> izip_encoding  OFFSET;    /* the offset in the component, length is the same       */
+    extern column bool_encoding        REVERSED;  /* is the source sequence to be reverse-complemented     */
+};
+
+database NCBI:refseq:db:remap #1.0.0
+{
+    table NCBI:refseq:tbl:assembly #1.0.0 SOURCE;   /* how to assemble the source from its base components  */
+    table NCBI:refseq:tbl:assembly #1.0.0 RESULT;   /* how to assemble the result from its base components  */
+    table NCBI:refseq:tbl:assembly #1.0.0 REMAP;    /* how to assemble the result from the source,          */
+                                                    /* and how to remap alignments from source to result    */
+};
diff --git a/tools/agp-load/eutils.py b/tools/agp-load/eutils.py
new file mode 100644
index 0000000..8ac15a1
--- /dev/null
+++ b/tools/agp-load/eutils.py
@@ -0,0 +1,112 @@
+#!python
+# =============================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# =============================================================================
+"""
+    Utility class for getting sequence and metadata for accessions via eutils.
+"""
+
+import httplib
+import json
+
+class EUtils:
+    @classmethod
+    def _response(cls, function, *args):
+        """ Builds URL and gets it """
+        url = "/entrez/eutils/{}.fcgi?".format(function)+"&".join(args)
+        try:
+            eutils = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov")
+            eutils.request('GET', url)
+            return eutils.getresponse()
+        except:
+            return None
+
+    @classmethod
+    def _giList(cls, acc):
+        """ gets gi for accession """
+        response = EUtils._response("esearch", "db=nuccore", "retmode=json", "term={}".format(acc))
+        if response:
+            return json.load(response)['esearchresult']['idlist']
+        return None
+
+    @classmethod
+    def summary(cls, acc):
+        """
+            Retrieves the metadata for an accession
+            Returns a dictionary
+        """
+        gi = EUtils._giList(acc)
+        if gi:
+            response = EUtils._response("esummary", "db=nuccore", "retmode=json", "id={}".format(gi[0]))
+            if response:
+                return json.load(response)["result"]["{}".format(gi[0])]
+        return None
+
+    @classmethod
+    def fasta(cls, acc):
+        """
+            Retrieves the FASTA sequence for an accession
+            Returns a generator on the lines of the FASTA sequence
+        """
+        gi = EUtils._giList(acc)
+        if gi:
+            response = EUtils._response("efetch", "db=nuccore", "retmode=text", "rettype=fasta", "id={}".format(gi[0]))
+            def lines():
+                buf = response.read(4096)
+                at = 0
+                while len(buf) > 0:
+                    if at >= 4096:
+                        buf = buf[4096:]
+                        at -= 4096
+                    next = buf.find("\n", at)
+                    if next < 0:
+                        more = response.read(4096)
+                        if more:
+                            buf += more
+                            continue
+                        line = buf[at:]
+                        buf = ""
+                        at = 0
+                        yield line
+                    else:
+                        line = buf[at:next]
+                        at = next + 1
+                        yield line
+            return lines()
+        return None
+
+if __name__ == "__main__":
+    import sys
+
+    if sys.argv[1] == "summary":
+        for acc in sys.argv[2:]:
+            summary = EUtils.summary(acc)
+            if summary:
+                for k in sorted(summary):
+                    print("{}: {}".format(k,summary[k]))
+            else:
+                print("Nothing found for {}".format(acc))
+    elif sys.argv[1] == "fasta":
+        for acc in sys.argv[2:]:
+            for line in EUtils.fasta(acc):
+                print(line)
diff --git a/tools/align-cache/Makefile b/tools/align-cache/Makefile
new file mode 100644
index 0000000..bc0a781
--- /dev/null
+++ b/tools/align-cache/Makefile
@@ -0,0 +1,78 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/align-cache
+
+INT_TOOLS = 
+
+EXT_TOOLS = \
+	align-cache
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# align-cache
+#
+ALIGN_CACHE_SRC = \
+	align-cache \
+	helper
+
+ALIGN_CACHE_OBJ = \
+	$(addsuffix .$(OBJX),$(ALIGN_CACHE_SRC))
+
+ALIGN_CACHE_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-wvdb \
+	-sm \
+	-sload
+
+$(BINDIR)/align-cache: $(ALIGN_CACHE_OBJ)
+	$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(ALIGN_CACHE_LIB)
diff --git a/tools/align-cache/align-cache.cpp b/tools/align-cache/align-cache.cpp
new file mode 100644
index 0000000..c988f27
--- /dev/null
+++ b/tools/align-cache/align-cache.cpp
@@ -0,0 +1,552 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "helper.h"
+
+#include <stdio.h>
+#include <iostream>
+
+#include <kapp/main.h>
+#include <klib/rc.h>
+#include <klib/log.h>
+
+
+namespace AlignCache
+{
+    struct Params
+    {
+        // Command line Params:
+        char const* dbPathSrc;
+        char const* dbPathDst;
+        
+        // Command line options
+        int64_t     id_spread_threshold;
+        size_t      cursor_cache_size;
+        size_t      min_cache_count;
+
+        // Internal parameters
+        bool cache_alignment_count;
+    } g_Params =
+    {
+        // Command line Params:
+        "",
+        "",
+        // Command line options
+        50000,
+#if _ARCH_BITS == 64
+        16UL << 30,  // 16 GB
+#else
+        1024UL << 20, // 1 GB
+#endif
+        100000,
+        // Internal parameters
+        true
+    };
+
+    char const OPTION_ID_SPREAD_THRESHOLD[] = "threshold";
+    char const ALIAS_ID_SPREAD_THRESHOLD[]  = "t";
+    char const* USAGE_ID_SPREAD_THRESHOLD[]  = { "cache PRIMARY_ALIGNMENT records with difference between values of ALIGN_ID and MATE_ALIGN_ID >= the value of 'threshold' option", NULL };
+
+    char const OPTION_CURSOR_CACHE_SIZE[] = "cursor-cache";
+    //char const ALIAS_CURSOR_CACHE_SIZE[]  = "c";
+    char const* USAGE_CURSOR_CACHE_SIZE[]  = { "the size of the read cursor in Megabytes", NULL };
+
+    char const OPTION_MIN_CACHE_COUNT[] = "min-cache-count";
+    //char const ALIAS_MIN_CACHE_COUNT[]  = "";
+    char const* USAGE_MIN_CACHE_COUNT[]  = { "if the number of primary alignment ids in the src db selected for caching is less than <min-cache-count>, the cache db will not be created at all", NULL };
+
+    ::OptDef Options[] =
+    {
+        { OPTION_ID_SPREAD_THRESHOLD, ALIAS_ID_SPREAD_THRESHOLD, NULL, USAGE_ID_SPREAD_THRESHOLD, 1, true, false },
+        { OPTION_CURSOR_CACHE_SIZE, NULL, NULL, USAGE_CURSOR_CACHE_SIZE, 1, true, false },
+        { OPTION_MIN_CACHE_COUNT, NULL, NULL, USAGE_MIN_CACHE_COUNT, 1, true, false },
+    };
+
+    struct PrimaryAlignmentData
+    {
+        uint64_t                    prev_key;
+        VDBObjects::CVCursor const* pCursorPA;
+        uint32_t const*             pColumnIndex;
+        uint32_t const*             pColumnIndexCache;
+        size_t const                column_count;
+        VDBObjects::CVCursor*       pCursorPACache;
+        //size_t                      count;
+        //size_t const                total_count;
+        KApp::CProgressBar*         pProgressBar;
+    };
+
+    //size_t print_percent ( size_t count, size_t total_count )
+    //{
+    //    size_t const total_points = 10000;
+    //    if ( total_count >= total_points && !(count % (total_count / total_points)) )
+    //    {
+    //        size_t points = (size_t)(total_points*count/total_count);
+    //        std::cout
+    //            << (100*points/total_points)
+    //            << "."
+    //            << ( 1000*points/total_points % 10 )
+    //            << ( 10000*points/total_points % 10 )
+    //            << "% ("
+    //            << count
+    //            << "/"
+    //            << total_count
+    //            << ")"
+    //            << std::endl;
+    //        return points;
+    //    }
+    //    else
+    //        return 0;
+    //}
+
+    template <typename T>
+    void copy_single_int_field (
+        VDBObjects::CVCursor const& curFrom,
+        VDBObjects::CVCursor& curTo,
+        int64_t row_id,
+        uint32_t column_index_from,
+        uint32_t column_index_to
+        )
+    {
+        T val;
+        curFrom.ReadItems ( row_id, column_index_from, & val, sizeof (T) );
+        curTo.Write ( column_index_to, & val, 1 );
+    }
+
+    void copy_str_field (
+        VDBObjects::CVCursor const& curFrom,
+        VDBObjects::CVCursor& curTo,
+        int64_t row_id,
+        uint32_t column_index_from,
+        uint32_t column_index_to
+        )
+    {
+        char val[4096];
+        uint32_t item_count = curFrom.ReadItems ( row_id, column_index_from, val, sizeof (val) );
+        curTo.Write ( column_index_to, val, item_count );
+    }
+
+
+    rc_t KVectorCallbackPrimaryAlignment ( uint64_t key, bool value, void *user_data )
+    {
+        if ( ::Quitting() )
+        {
+            LOGMSG ( klogWarn, "Interrupted" );
+            return 1;
+        }
+
+        assert ( value );
+        PrimaryAlignmentData* p = (PrimaryAlignmentData*)user_data;
+        int64_t prev_row_id = (int64_t)p->prev_key;
+        int64_t row_id = (int64_t)key;
+        VDBObjects::CVCursor& cur_cache = *p->pCursorPACache;
+        
+        p->pProgressBar->Process ( 1, false );
+
+        //++p->count;
+        //print_percent (p->count, p->total_count);
+
+        // Filling gaps between actually cached rows with zero-length records
+        if ( p->prev_key )
+        {
+            if ( row_id - prev_row_id > 1)
+            {
+                cur_cache.OpenRow ();
+                cur_cache.CommitRow ();
+                if (row_id - prev_row_id > 2)
+                    cur_cache.RepeatRow ( row_id - prev_row_id - 2 ); // -2 due to the first zero-row has been written in the previous line
+                cur_cache.CloseRow ();
+            }
+        }
+
+        // Caching (copying) actual record from PRIMARY_ALIGNMENT table
+        {
+            // The very first visit - need to set starting row_id
+            if ( p->prev_key == 0 )
+                cur_cache.SetRowId ( row_id );
+
+            VDBObjects::CVCursor const& cur_pa = *p->pCursorPA;
+            uint32_t const* ColIndexPA = p->pColumnIndex;
+            uint32_t const* ColIndexCache = p->pColumnIndexCache;
+
+            cur_cache.OpenRow ();
+
+            // MATE_ALIGN_ID
+            size_t column_index = 0;
+            copy_single_int_field <int64_t> (cur_pa, cur_cache, row_id, ColIndexPA[column_index], ColIndexCache[column_index] );
+
+            // SAM_FLAGS
+            ++ column_index;
+            copy_single_int_field <uint32_t> (cur_pa, cur_cache, row_id, ColIndexPA[column_index], ColIndexCache[column_index] );
+
+            // TEMPLATE_LEN
+            ++ column_index;
+            copy_single_int_field <int32_t> (cur_pa, cur_cache, row_id, ColIndexPA[column_index], ColIndexCache[column_index] );
+
+            // MATE_REF_NAME
+            ++ column_index;
+            copy_str_field (cur_pa, cur_cache, row_id, ColIndexPA[column_index], ColIndexCache[column_index] );
+
+            // MATE_REF_POS
+            ++ column_index;
+            copy_single_int_field <uint32_t> (cur_pa, cur_cache, row_id, ColIndexPA[column_index], ColIndexCache[column_index] );
+
+            // SAM_QUALITY
+            ++ column_index;
+            copy_str_field (cur_pa, cur_cache, row_id, ColIndexPA[column_index], ColIndexCache[column_index] );
+
+            // RD_FILTER
+            ++ column_index;
+            copy_single_int_field <uint8_t> (cur_pa, cur_cache, row_id, ColIndexPA[column_index], ColIndexCache[column_index] );
+
+            // SPOT_GROUP
+            ++ column_index;
+            copy_str_field (cur_pa, cur_cache, row_id, ColIndexPA[column_index], ColIndexCache[column_index] );
+
+            if ( g_Params.cache_alignment_count )
+            {
+                // ALIGNMENT_COUNT
+                ++ column_index;
+                copy_single_int_field <uint8_t> (cur_pa, cur_cache, row_id, ColIndexPA[column_index], ColIndexCache[column_index] );
+            }
+
+            cur_cache.CommitRow ();
+            cur_cache.CloseRow ();
+
+            p->prev_key = key;
+        }
+
+        return 0;
+    }
+
+    bool ProcessSequenceRow ( int64_t idRow, VDBObjects::CVCursor const& cursor, KLib::CKVector& vect, uint32_t idxCol )
+    {
+        int64_t buf[3]; // TODO: find out the real type of this array
+        uint32_t items_read_count = cursor.ReadItems ( idRow, idxCol, buf, countof(buf) );
+        if ( items_read_count == 2 )
+        {
+            int64_t id1 = buf[0];
+            int64_t id2 = buf[1];
+            int64_t diff = id1 >= id2 ? id1 - id2 : id2 - id1;
+
+            if (id1 && id2 && diff > g_Params.id_spread_threshold)
+            {
+                vect.SetBool(id1, true);
+                vect.SetBool(id2, true);
+                return true;
+            }
+        }
+        return false;
+    }
+
+    size_t FillKVectorWithAlignIDs (VDBObjects::CVDatabase const& vdb, size_t cache_size, KLib::CKVector& vect )
+    {
+        char const* ColumnNamesSequence[] =
+        {
+            "PRIMARY_ALIGNMENT_ID"
+        };
+        uint32_t ColumnIndexSequence [ countof (ColumnNamesSequence) ];
+
+        VDBObjects::CVTable table = vdb.OpenTable("SEQUENCE");
+
+        VDBObjects::CVCursor cursor = table.CreateCursorRead ( cache_size );
+        cursor.InitColumnIndex (ColumnNamesSequence, ColumnIndexSequence, countof(ColumnNamesSequence), false);
+        cursor.Open();
+
+        int64_t idRow = 0;
+        uint64_t nRowCount = 0;
+        size_t count = 0;
+
+        cursor.GetIdRange (idRow, nRowCount);
+
+        for (; (uint64_t)idRow < nRowCount; ++idRow )
+        {
+            if ( ::Quitting() )
+            {
+                LOGMSG ( klogWarn, "Interrupted" );
+                return 0;
+            }
+
+            if ( ProcessSequenceRow (idRow, cursor, vect, ColumnIndexSequence[0]) )
+                ++count;
+        }
+
+        return count;
+    }
+
+    void CachePrimaryAlignment (VDBObjects::CVDBManager& mgr, VDBObjects::CVDatabase const& vdb, size_t cache_size, KLib::CKVector const& vect, size_t vect_size, KApp::CProgressBar& progress_bar)
+    {
+        // Defining the set of columns to be copied from PRIMARY_ALIGNMENT table
+        // to the new cache table
+        // ALIGNMENT_COUNT is the optional column, it must be at the end of this array
+#define DECLARE_PA_COLUMNS( arrName, column_suffix ) char const* arrName[] =\
+        {\
+            "MATE_ALIGN_ID"     column_suffix,\
+            "SAM_FLAGS"         column_suffix,\
+            "TEMPLATE_LEN"      column_suffix,\
+            "MATE_REF_NAME"     column_suffix,\
+            "MATE_REF_POS"      column_suffix,\
+            "SAM_QUALITY"       column_suffix,\
+            "RD_FILTER"         column_suffix,\
+            "SPOT_GROUP"        column_suffix,\
+            "ALIGNMENT_COUNT"   column_suffix\
+        }
+
+        DECLARE_PA_COLUMNS (ColumnNamesPrimaryAlignment, "");
+        DECLARE_PA_COLUMNS (ColumnNamesPrimaryAlignmentCache, "_CACHE");
+#undef DECLARE_PA_COLUMNS
+
+        uint32_t ColumnIndexPrimaryAlignment [ countof (ColumnNamesPrimaryAlignment) ];
+        uint32_t ColumnIndexPrimaryAlignmentCache [ countof (ColumnNamesPrimaryAlignmentCache) ];
+
+        // Openning cursor to iterate through PRIMARY_ALIGNMENT table
+        VDBObjects::CVTable tablePA = vdb.OpenTable("PRIMARY_ALIGNMENT");
+        VDBObjects::CVCursor cursorPA = tablePA.CreateCursorRead ( cache_size );
+        cursorPA.PermitPostOpenAdd();
+        cursorPA.InitColumnIndex ( ColumnNamesPrimaryAlignment, ColumnIndexPrimaryAlignment, countof(ColumnNamesPrimaryAlignment) - 1, false );
+        cursorPA.Open();
+
+        // Check if we can read ALIGNMENT_COUNT parameter
+        try
+        {
+            cursorPA.InitColumnIndex(
+                ColumnNamesPrimaryAlignment + countof(ColumnNamesPrimaryAlignment) - 1,
+                ColumnIndexPrimaryAlignment + countof(ColumnIndexPrimaryAlignment) - 1,
+                1, false
+            );
+        }
+        catch (Utils::CErrorMsg const& e)
+        {
+            if (e.getRC() == RC ( rcVDB, rcCursor, rcUpdating, rcColumn, rcNotFound ) )
+                g_Params.cache_alignment_count = false;
+            else
+                throw;
+        }
+
+        // Creating new cache table (with the same name - PRIMARY_ALIGNMENT but in the separate DB file)
+        char const schema_path[] = "align/mate-cache.vschema";
+
+        VDBObjects::CVSchema schema = mgr.MakeSchema ();
+        schema.VSchemaParseFile ( schema_path );
+        char szCacheDBName[256] = "";
+        string_printf (szCacheDBName, countof (szCacheDBName), NULL, "%s", g_Params.dbPathDst );
+        VDBObjects::CVDatabase dbCache = mgr.CreateDB ( schema, "NCBI:align:db:mate_cache #1", kcmParents | kcmInit | kcmMD5, szCacheDBName );
+        VDBObjects::CVTable tableCache = dbCache.CreateTable ( "PRIMARY_ALIGNMENT" );
+
+        VDBObjects::CVCursor cursorCache = tableCache.CreateCursorWrite ( kcmInsert );
+        cursorCache.InitColumnIndex ( ColumnNamesPrimaryAlignmentCache, ColumnIndexPrimaryAlignmentCache, countof (ColumnNamesPrimaryAlignmentCache) - (size_t) (!g_Params.cache_alignment_count), true );
+        cursorCache.Open ();
+
+        //PrimaryAlignmentData data = { 0, &cursorPA, ColumnIndexPrimaryAlignment, ColumnIndexPrimaryAlignmentCache, countof (ColumnNamesPrimaryAlignment), &cursorCache, 0, vect_size };
+        progress_bar.Append (vect_size);
+        PrimaryAlignmentData data =
+        {
+            0,
+            &cursorPA,
+            ColumnIndexPrimaryAlignment,
+            ColumnIndexPrimaryAlignmentCache,
+            countof (ColumnNamesPrimaryAlignment),
+            &cursorCache,
+            &progress_bar
+        };
+
+        // process each saved primary_alignment_id
+        vect.VisitBool ( KVectorCallbackPrimaryAlignment, & data );
+        cursorCache.Commit ();
+    }
+
+    int create_cache_db_impl()
+    {
+        // Adding 0% mark at the very beginning of the program
+        KApp::CProgressBar progress_bar(1);
+        progress_bar.Process ( 0, true );
+
+        VDBObjects::CVDBManager mgr;
+        mgr.Make();
+
+        VDBObjects::CVDatabase vdb = mgr.OpenDB (g_Params.dbPathSrc);
+
+        // Scan SEQUENCE table to find mate_alignment_ids that have to be cached
+        KLib::CKVector vect;
+        size_t count = FillKVectorWithAlignIDs ( vdb, g_Params.cursor_cache_size, vect );
+
+        if ( count*2 >= g_Params.min_cache_count )
+        {
+            // For each id in vect cache the PRIMARY_ALIGNMENT record
+            CachePrimaryAlignment ( mgr, vdb, g_Params.cursor_cache_size, vect, count*2, progress_bar );
+        }
+        else
+        {
+            if ( ::Quitting() == 0 )
+            {
+                PLOGMSG ( klogWarn,
+                    ( klogWarn, 
+                    "The cache db will not be created because there is not "
+                    "enough records to cache: $(COUNT) is found and minimum $(MIN_COUNT) is required. "
+                    "The minimum required number can be changed via $(OPTION_MIN_CACHE_COUNT) parameter.",
+                    "COUNT=%zu,MIN_COUNT=%zu,OPTION_MIN_CACHE_COUNT=%s",
+                    count*2, g_Params.min_cache_count, OPTION_MIN_CACHE_COUNT
+                    ));
+            }
+        }
+
+        mgr.Release (); // should not be necessary - destructor should do job
+        return 0;
+    }
+
+    // interpret exception processed by Utils::HandleException:
+    // filter out some errors like invalid db - users don't want to
+    // see such errors as actual errors
+    int InterpretException ( int64_t rcCodeUtil, bool bSilent, char const* szErrDesc )
+    {
+        if ( rcCodeUtil == Utils::rcUnknown ||
+             rcCodeUtil == Utils::rcErrorStdExc ||
+             rcCodeUtil == Utils::rcInvalid)
+        {
+            if ( ! bSilent )
+                LOGMSG ( klogErr, szErrDesc );
+
+            return 3;
+        }
+        else if (rcCodeUtil == SILENT_RC( rcDB,rcMgr,rcOpening,rcDatabase,rcIncorrect ) ||
+            rcCodeUtil == SILENT_RC( rcVFS,rcTree,rcResolving,rcPath,rcNotFound ))
+        {
+            if ( ! bSilent )
+                LOGMSG ( klogWarn, szErrDesc );
+            return 0;
+        }
+        else
+        {
+            if ( ! bSilent )
+                LOGMSG ( klogErr, szErrDesc );
+            return 3;
+        }
+    }
+
+    int create_cache_db_impl_safe ()
+    {
+        try
+        {
+            return create_cache_db_impl ();
+        }
+        catch (...)
+        {
+            char szErrDesc [512];
+            int64_t rc = Utils::HandleException ( true, szErrDesc, countof(szErrDesc) );
+            return InterpretException ( rc, false, szErrDesc );
+        }
+    }
+
+    int create_cache_db (int argc, char** argv)
+    {
+        try
+        {
+            KApp::CArgs args (argc, argv, Options, countof (Options), ::XMLLogger_Args, ::XMLLogger_ArgsQty);
+            KApp::CXMLLogger xml_logger ( args );
+            uint32_t param_count = args.GetParamCount ();
+            if ( param_count != 2 )
+            {
+                MiniUsage (args.GetArgs());
+                return 0;
+            }
+
+            g_Params.dbPathSrc = args.GetParamValue (0);
+            g_Params.dbPathDst = args.GetParamValue (1);
+
+            if (args.GetOptionCount (OPTION_ID_SPREAD_THRESHOLD))
+                g_Params.id_spread_threshold = args.GetOptionValueUInt<int64_t> ( OPTION_ID_SPREAD_THRESHOLD, 0 );
+
+            if (args.GetOptionCount (OPTION_CURSOR_CACHE_SIZE))
+                g_Params.cursor_cache_size = 1024*1024 * args.GetOptionValueUInt<size_t> ( OPTION_CURSOR_CACHE_SIZE, 0 );
+
+            if (args.GetOptionCount (OPTION_MIN_CACHE_COUNT))
+                g_Params.min_cache_count = args.GetOptionValueUInt <size_t> ( OPTION_MIN_CACHE_COUNT, 0 );
+
+            return create_cache_db_impl_safe ();
+        }
+        catch (...) // here we handle only exceptions in CArgs or CXMLLogger
+        {
+            return Utils::HandleException ( false, NULL, 0 );
+        }
+    }
+}
+
+
+extern "C"
+{
+    const char UsageDefaultName[] = "align-cache";
+    rc_t CC UsageSummary (const char * progname)
+    {
+        printf (
+        "Usage:\n"
+        "  %s [options] <src-db-path> <new-cache-db-path>\n"
+        "\n"
+        "Summary:\n"
+        "  Create a cache file for given database <src-db-path>\n"
+        "  PRIMARY_ALIGNMENT table and save it into <new-cache-db-path>\n"
+        "\n", progname);
+        return 0;
+    }
+    const char* param_usage_src[] = { "Path to the database", NULL };
+    const char* param_usage_dst[] = { "Path to the new cache database to be created", NULL };
+    rc_t CC Usage (::Args const* args)
+    {
+        rc_t rc = 0;
+        const char* progname = UsageDefaultName;
+        const char* fullpath = UsageDefaultName;
+
+        if (args == NULL)
+            rc = RC(rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
+        else
+            rc = ArgsProgram(args, &fullpath, &progname);
+
+        UsageSummary (progname);
+
+        printf("Parameters:\n");
+
+        HelpParamLine ("src-db-path", param_usage_src);
+        HelpParamLine ("new-cache-db-path", param_usage_dst);
+
+        printf ("\nOptions:\n");
+
+        HelpOptionLine (AlignCache::ALIAS_ID_SPREAD_THRESHOLD, AlignCache::OPTION_ID_SPREAD_THRESHOLD, "value", AlignCache::USAGE_ID_SPREAD_THRESHOLD);
+        HelpOptionLine (NULL, AlignCache::OPTION_CURSOR_CACHE_SIZE, "value in MB", AlignCache::USAGE_CURSOR_CACHE_SIZE);
+        HelpOptionLine (NULL, AlignCache::OPTION_MIN_CACHE_COUNT, "count", AlignCache::USAGE_MIN_CACHE_COUNT);
+        XMLLogger_Usage();
+
+        printf ("\n");
+
+        HelpOptionsStandard ();
+
+        HelpVersion (fullpath, KAppVersion());
+
+        return rc;
+    }
+
+    rc_t CC KMain(int argc, char* argv[])
+    {
+        return AlignCache::create_cache_db (argc, argv);
+    }
+}
diff --git a/tools/align-cache/helper.cpp b/tools/align-cache/helper.cpp
new file mode 100644
index 0000000..1b02c48
--- /dev/null
+++ b/tools/align-cache/helper.cpp
@@ -0,0 +1,923 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+// helper.cpp
+
+#include "helper.h"
+
+#include <algorithm>
+#include <stdio.h>
+#include <iostream>
+
+#include <vdb/vdb-priv.h>
+#include <klib/rc.h>
+
+#ifdef _WIN32
+#pragma warning (disable:4503)
+#endif
+
+// TODO: remove printfs
+namespace KLib
+{
+    CKVector::CKVector() : m_pSelf(NULL)
+    {
+        Make();
+    }
+
+    CKVector::~CKVector()
+    {
+        Release();
+    }
+
+    void CKVector::Make()
+    {
+        if (m_pSelf)
+            throw Utils::CErrorMsg (0, "Duplicated call to KVectorMake");
+
+        rc_t rc = ::KVectorMake(&m_pSelf);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KVectorMake");
+#if DEBUG_PRINT != 0
+        printf("Created KVector %p\n", m_pSelf);
+#endif
+    }
+
+    void CKVector::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing KVector %p\n", m_pSelf);
+#endif
+            ::KVectorRelease(m_pSelf);
+            m_pSelf = NULL;
+        }
+    }
+
+    size_t const RECORD_SIZE_IN_BITS = 2;
+    uint64_t const BIT_SET_MASK = 0x2;
+    uint64_t const BIT_VALUE_MASK = 0x1;
+    uint64_t const BIT_RECORD_MASK = BIT_SET_MASK | BIT_VALUE_MASK;
+
+    void CKVector::SetBool(uint64_t key, bool value)
+    {
+#if USING_UINT64_BITMAP == 1
+        uint64_t stored_bits = 0;
+        uint64_t key_qword = key / 64;
+        uint64_t key_bit = key % 64;
+        rc_t rc = ::KVectorGetU64 ( m_pSelf, key_qword, &stored_bits );
+        bool first_time = rc == RC ( rcCont, rcVector, rcAccessing, rcItem, rcNotFound ); // 0x1e615458
+        if ( !first_time && rc )
+            throw Utils::CErrorMsg(rc, "KVectorGetU64");
+
+        uint64_t new_bit = (uint64_t)value << key_bit;
+        uint64_t stored_bit = (uint64_t)1 << key_bit & stored_bits;
+
+        if ( first_time || new_bit != stored_bit )
+        {
+            if ( new_bit )
+                stored_bits |= new_bit;
+            else
+                stored_bits &= ~new_bit;
+
+            rc_t rc = ::KVectorSetU64 ( m_pSelf, key_qword, stored_bits );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "KVectorSetU64");
+        }
+#elif USING_UINT64_BITMAP == 2
+        uint64_t stored_bits = 0;
+        uint64_t key_qword = key / (sizeof(stored_bits) * 8 / RECORD_SIZE_IN_BITS);
+        uint64_t bit_offset_in_qword = (key % (sizeof(stored_bits) * 8 / RECORD_SIZE_IN_BITS)) * RECORD_SIZE_IN_BITS;
+        rc_t rc = ::KVectorGetU64 ( m_pSelf, key_qword, &stored_bits );
+        bool first_time = rc == RC ( rcCont, rcVector, rcAccessing, rcItem, rcNotFound ); // 0x1e615458;
+        if ( !first_time && rc )
+            throw Utils::CErrorMsg(rc, "KVectorGetU64");
+
+        uint64_t new_bit_record = (BIT_SET_MASK | (uint64_t)value) << bit_offset_in_qword;
+        uint64_t stored_bit_record = (uint64_t)BIT_RECORD_MASK << bit_offset_in_qword & stored_bits;
+
+        if ( first_time || new_bit_record != stored_bit_record )
+        {
+            stored_bits &= ~((uint64_t)BIT_RECORD_MASK << bit_offset_in_qword); // clear stored record to assign a new value by bitwise OR
+            stored_bits |= new_bit_record;
+
+            rc_t rc = ::KVectorSetU64 ( m_pSelf, key_qword, stored_bits );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "KVectorSetU64");
+        }
+#else
+
+        rc_t rc = ::KVectorSetBool ( m_pSelf, key, value );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KVectorSetBool");
+#endif
+    }
+
+    struct UserDataU64toBool
+    {
+        rc_t ( * f ) ( uint64_t key, bool value, void *user_data );
+        void* user_data;
+    };
+#if USING_UINT64_BITMAP == 1
+    rc_t VisitU64toBoolAdapter ( uint64_t key, uint64_t value, void *user_data )
+    {
+        rc_t ( * bool_callback ) ( uint64_t key, bool value, void *user_data );
+        bool_callback = ((UserDataU64toBool*) user_data) -> f;
+        void* original_user_data = ((UserDataU64toBool*) user_data) -> user_data;
+
+        rc_t rc = 0;
+        for ( size_t i = 0; i < sizeof (value) * 8; ++i )
+        {
+            rc = bool_callback ( key * 64 + i, (bool) ((uint64_t)1 << i & value), original_user_data );
+            if ( rc )
+                return rc;
+        }
+        return rc;
+    }
+#elif USING_UINT64_BITMAP == 2
+    rc_t VisitU64toBoolAdapter ( uint64_t key, uint64_t value, void *user_data )
+    {
+        rc_t ( * bool_callback ) ( uint64_t key, bool value, void *user_data );
+        bool_callback = ((UserDataU64toBool*) user_data) -> f;
+        void* original_user_data = ((UserDataU64toBool*) user_data) -> user_data;
+
+        rc_t rc = 0;
+        for ( size_t i = 0; i < sizeof (value) * 8 / RECORD_SIZE_IN_BITS; ++i )
+        {
+            uint64_t key_bool = key * sizeof(value) * 8 / RECORD_SIZE_IN_BITS + i;
+            uint64_t record = value >> i * RECORD_SIZE_IN_BITS & BIT_RECORD_MASK;
+            if ( record & BIT_SET_MASK )
+            {
+                rc = bool_callback ( key_bool, (bool) (record & BIT_VALUE_MASK), original_user_data );
+                if ( rc )
+                    return rc;
+            }
+        }
+        return rc;
+    }
+#endif
+
+    void CKVector::VisitBool(rc_t ( * f ) ( uint64_t key, bool value, void *user_data ), void *user_data) const
+    {
+#if USING_UINT64_BITMAP == 1
+        UserDataU64toBool user_data_adapter = { f, user_data };
+        ::KVectorVisitU64 ( m_pSelf, false, VisitU64toBoolAdapter, &user_data_adapter );
+#elif USING_UINT64_BITMAP == 2
+        UserDataU64toBool user_data_adapter = { f, user_data };
+        ::KVectorVisitU64 ( m_pSelf, false, VisitU64toBoolAdapter, &user_data_adapter );
+#else
+        ::KVectorVisitBool ( m_pSelf, false, f, user_data );
+#endif
+    }
+}
+
+///////////////////////////////////////////////////////////////
+
+namespace VDBObjects
+{
+    CVCursor::CVCursor() : m_pSelf(NULL)
+    {}
+
+    CVCursor::~CVCursor()
+    {
+        Release();
+    }
+
+    CVCursor::CVCursor(CVCursor const& x)
+    {
+        Clone(x);
+    }
+
+    CVCursor& CVCursor::operator=(CVCursor const& x)
+    {
+        if (m_pSelf)
+            Release();
+
+        Clone(x);
+        return *this;
+    }
+
+    void CVCursor::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing VCursor %p\n", m_pSelf);
+#endif
+            ::VCursorRelease(m_pSelf);
+            m_pSelf = NULL;
+        }
+    }
+
+    void CVCursor::Clone(CVCursor const& x)
+    {
+        m_pSelf = x.m_pSelf;
+        ::VCursorAddRef ( m_pSelf );
+#if DEBUG_PRINT != 0
+        printf ("CLONING VCursor %p\n", m_pSelf);
+#endif
+    }
+
+    void CVCursor::Open() const
+    {
+        rc_t rc = ::VCursorOpen(m_pSelf);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorOpen");
+    }
+
+    void CVCursor::PermitPostOpenAdd() const
+    {
+        rc_t rc = ::VCursorPermitPostOpenAdd ( m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorPermitPostOpenAdd");
+    }
+
+    void CVCursor::InitColumnIndex(char const* const* ColumnNames, uint32_t* pColumnIndex, size_t nCount, bool set_default)
+    {
+        for (size_t i = 0; i < nCount; ++i)
+        {
+            rc_t rc = ::VCursorAddColumn(m_pSelf, & pColumnIndex[i], ColumnNames[i] );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "VCursorAddColumn - [%s]", ColumnNames[i]);
+
+            if ( set_default )
+            {
+                VTypedecl type;
+                VTypedesc desc;
+                uint32_t idx = pColumnIndex[i];
+
+                rc = ::VCursorDatatype ( m_pSelf, idx, & type, & desc );
+                if (rc)
+                    throw Utils::CErrorMsg(rc, "VCursorDatatype (column idx=%u [%s])", idx, ColumnNames[i]);
+
+                uint32_t elem_bits = ::VTypedescSizeof ( & desc );
+                if (rc)
+                    throw Utils::CErrorMsg(rc, "VTypedescSizeof (column idx=%u [%s])", idx, ColumnNames[i]);
+                rc = ::VCursorDefault ( m_pSelf, idx, elem_bits, "", 0, 0 );
+                if (rc)
+                    throw Utils::CErrorMsg(rc, "VCursorDefault (column idx=%u [%s])", idx, ColumnNames[i]);
+            }
+        }
+    }
+
+    void CVCursor::GetIdRange(int64_t& idFirstRow, uint64_t& nRowCount) const
+    {
+        rc_t rc = ::VCursorIdRange(m_pSelf, 0, &idFirstRow, &nRowCount);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorIdRange");
+    }
+
+    int64_t CVCursor::GetRowId () const
+    {
+        int64_t row_id;
+        rc_t rc = ::VCursorRowId ( m_pSelf, & row_id );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorRowId");
+
+        return row_id;
+    }
+
+    void CVCursor::SetRowId (int64_t row_id) const
+    {
+        rc_t rc = ::VCursorSetRowId ( m_pSelf, row_id );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorSetRowId (%ld)", row_id);
+    }
+
+    void CVCursor::OpenRow () const
+    {
+        rc_t rc = ::VCursorOpenRow ( m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorOpenRow");
+    }
+
+    void CVCursor::CommitRow ()
+    {
+        rc_t rc = ::VCursorCommitRow ( m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorCommitRow");
+    }
+
+    void CVCursor::RepeatRow ( uint64_t count )
+    {
+        rc_t rc = ::VCursorRepeatRow ( m_pSelf, count );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorRepeatRow (%lu)", count);
+    }
+
+    void CVCursor::CloseRow () const
+    {
+        rc_t rc = ::VCursorCloseRow ( m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorCloseRow");
+    }
+
+    void CVCursor::Commit ()
+    {
+        rc_t rc = ::VCursorCommit ( m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorCommit");
+    }
+
+///////////////////////////////////////////////////////////////////////////////////
+
+    CVTable::CVTable() : m_pSelf(NULL)
+    {
+    }
+    
+    CVTable::~CVTable()
+    {
+        Release();
+    }
+
+    CVTable::CVTable(CVTable const& x)
+    {
+        Clone(x);
+    }
+
+    CVTable& CVTable::operator=(CVTable const& x)
+    {
+        if (m_pSelf)
+            Release();
+
+        Clone(x);
+        return *this;
+    }
+
+    void CVTable::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing VTable %p\n", m_pSelf);
+#endif
+            ::VTableRelease(m_pSelf);
+            m_pSelf = NULL;
+        }
+    }
+
+    void CVTable::Clone(CVTable const& x)
+    {
+        m_pSelf = x.m_pSelf;
+        ::VTableAddRef ( m_pSelf );
+#if DEBUG_PRINT != 0
+        printf ("CLONING VTable %p\n", m_pSelf);
+#endif
+    }
+
+    CVCursor CVTable::CreateCursorRead ( size_t cache_size ) const
+    {
+        CVCursor cursor;
+        rc_t rc = ::VTableCreateCachedCursorRead(m_pSelf, const_cast<VCursor const**>(& cursor.m_pSelf), cache_size);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VTableCreateCachedCursorRead (%zu)", cache_size);
+
+#if DEBUG_PRINT != 0
+        printf("Created cursor (rd) %p\n", cursor.m_pSelf);
+#endif
+        return cursor;
+    }
+
+    CVCursor CVTable::CreateCursorWrite (::KCreateMode mode)
+    {
+        CVCursor cursor;
+        rc_t rc = ::VTableCreateCursorWrite ( m_pSelf, & cursor.m_pSelf, mode );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VTableCreateCursorWrite");
+
+#if DEBUG_PRINT != 0
+        printf("Created cursor (wr) %p\n", cursor.m_pSelf);
+#endif
+        return cursor;
+    }
+
+//////////////////////////////////////////////////////////////////////
+
+    CVDatabase::CVDatabase() : m_pSelf(NULL)
+    {}
+
+    CVDatabase::~CVDatabase()
+    {
+        Release();
+    }
+
+    CVDatabase::CVDatabase(CVDatabase const& x)
+    {
+        Clone(x);
+    }
+
+    CVDatabase& CVDatabase::operator=(CVDatabase const& x)
+    {
+        if (m_pSelf)
+            Release();
+
+        Clone(x);
+        return *this;
+    }
+
+    void CVDatabase::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing VDatabase %p\n", m_pSelf);
+#endif
+            ::VDatabaseRelease(m_pSelf);
+            m_pSelf = NULL;
+        }
+    }
+
+    void CVDatabase::Clone(CVDatabase const& x)
+    {
+        m_pSelf = x.m_pSelf;
+        ::VDatabaseAddRef ( m_pSelf );
+#if DEBUG_PRINT != 0
+        printf ("CLONING VDatabase %p\n", m_pSelf);
+#endif
+    }
+
+    CVTable CVDatabase::OpenTable(char const* pszTableName) const
+    {
+        CVTable table;
+        rc_t rc = ::VDatabaseOpenTableRead(m_pSelf, const_cast<VTable const**>(& table.m_pSelf), pszTableName);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDatabaseOpenTableRead (%s)", pszTableName);
+
+#if DEBUG_PRINT != 0
+        printf("Opened table %p (%s)\n", table.m_pSelf, pszTableName);
+#endif
+        return table;
+    }
+
+    CVTable CVDatabase::CreateTable ( char const* pszTableName )
+    {
+        CVTable table;
+        //rc_t rc = ::VDatabaseCreateTableDefault ( m_pSelf, & table.m_pSelf, pszTableName, pszTableName );
+        rc_t rc = ::VDatabaseCreateTableByMask ( m_pSelf, & table.m_pSelf, pszTableName, 0, 0, pszTableName );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDatabaseCreateTableDefault (%s)", pszTableName);
+
+#if DEBUG_PRINT != 0
+        printf("Created table %p (%s)\n", table.m_pSelf, pszTableName);
+#endif
+        return table;
+    }
+
+    void CVDatabase::ColumnCreateParams ( ::KCreateMode cmode, ::KChecksum checksum, size_t pgsize )
+    {
+        rc_t rc = ::VDatabaseColumnCreateParams ( m_pSelf, cmode, checksum, pgsize );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDatabaseColumnCreateParams");
+    }
+
+//////////////////////////////////////////////////////////////////////
+
+    CVSchema::CVSchema() : m_pSelf (NULL)
+    {
+    }
+    CVSchema::~CVSchema()
+    {
+        Release();
+    }
+
+    CVSchema::CVSchema(CVSchema const& x)
+    {
+        Clone (x);
+    }
+
+    CVSchema& CVSchema::operator=(CVSchema const& x)
+    {
+        Clone (x);
+        return *this;
+    }
+
+    void CVSchema::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing VSchema %p\n", m_pSelf);
+#endif
+            ::VSchemaRelease ( m_pSelf );
+            m_pSelf = NULL;
+        }
+    }
+
+    void CVSchema::Clone ( CVSchema const& x )
+    {
+        if (false && m_pSelf)
+        {
+            assert(0);
+            Release();
+        }
+        m_pSelf = x.m_pSelf;
+        ::VSchemaAddRef ( m_pSelf );
+#if DEBUG_PRINT != 0
+        printf ("CLONING VSchema %p\n", m_pSelf);
+#endif
+    }
+    
+    void CVSchema::VSchemaParseFile ( char const* pszFilePath )
+    {
+        rc_t rc = ::VSchemaParseFile ( m_pSelf, pszFilePath );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VSchemaParseFile (%s)", pszFilePath);
+    }
+
+//////////////////////////////////////////////////////////////////////
+
+    CVDBManager::CVDBManager() : m_pSelf(NULL)
+    {}
+
+    CVDBManager::~CVDBManager()
+    {
+        Release();
+    }
+
+    void CVDBManager::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing VDBManager %p\n", m_pSelf);
+#endif
+            ::VDBManagerRelease(m_pSelf);
+            m_pSelf = NULL;
+        }
+    }
+
+#if MANAGER_WRITABLE != 0
+    void CVDBManager::Make()
+    {
+        assert(m_pSelf == NULL);
+        if (m_pSelf)
+            throw Utils::CErrorMsg(0, "Double call to VDBManagerMakeUpdate");
+
+        rc_t rc = ::VDBManagerMakeUpdate ( & m_pSelf, NULL );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDBManagerMakeUpdate");
+
+	    /*rc = VDBManagerDisablePagemapThread ( m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDBManagerDisablePagemapThread");*/
+
+#if DEBUG_PRINT != 0
+        printf("Created VDBManager (wr) %p\n", m_pSelf);
+#endif
+    }
+#else
+    void CVDBManager::Make()
+    {
+        assert(m_pSelf == NULL);
+        if (m_pSelf)
+            throw Utils::CErrorMsg(0, "Double call to VDBManagerMakeRead");
+
+        rc_t rc = ::VDBManagerMakeRead(const_cast<VDBManager const**>(&m_pSelf), NULL);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDBManagerMakeRead");
+
+#if DEBUG_PRINT != 0
+        printf("Created VDBManager (rd) %p\n", m_pSelf);
+#endif
+    }
+#endif
+
+    CVDatabase CVDBManager::OpenDB(char const* pszDBName) const
+    {
+        CVDatabase vdb;
+        rc_t rc = ::VDBManagerOpenDBRead(m_pSelf, const_cast<VDatabase const**>(& vdb.m_pSelf), NULL, pszDBName);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDBManagerOpenDBRead (%s)", pszDBName);
+
+#if DEBUG_PRINT != 0
+        printf("Opened database %p (%s)\n", vdb.m_pSelf, pszDBName);
+#endif
+        return vdb;
+    }
+#if MANAGER_WRITABLE != 0
+    CVDatabase CVDBManager::CreateDB ( CVSchema const& schema, char const* pszTypeDesc, ::KCreateMode cmode, char const* pszPath )
+    {
+        CVDatabase vdb;
+        rc_t rc = ::VDBManagerCreateDB ( m_pSelf, & vdb.m_pSelf, schema.m_pSelf, pszTypeDesc, cmode, pszPath );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDBManagerCreateDB (%s)", pszPath);
+
+#if DEBUG_PRINT != 0
+        printf("Created database %p (%s)\n", vdb.m_pSelf, pszPath);
+#endif
+        // set creation mode of objects ( tables, columns, etc. ) to
+        // create new or re-initialize existing, plus attach md5 checksums
+        // to all files.
+        // set blob creation mode to record 32-bit CRC within blob
+        // continue to use default page size...
+        vdb.ColumnCreateParams ( kcmInit | kcmMD5, kcsCRC32, 0 );
+        return vdb;
+    }
+#endif
+
+    CVSchema CVDBManager::MakeSchema () const
+    {
+        CVSchema schema;
+        rc_t rc = ::VDBManagerMakeSchema ( m_pSelf, & schema.m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDBManagerMakeSchema");
+
+#if DEBUG_PRINT != 0
+        printf("Created Schema %p\n", schema.m_pSelf);
+#endif
+        return schema;
+    }
+}
+
+namespace KApp
+{
+    CArgs::CArgs (int argc, char** argv, ::OptDef const* pOptions, size_t option_count)
+        : m_pSelf(NULL)
+    {
+        MakeAndHandle ( argc, argv, pOptions, option_count );
+    }
+
+    CArgs::CArgs (int argc, char** argv, ::OptDef const* pOptions1, size_t option_count1, ::OptDef const* pOptions2, size_t option_count2)
+        : m_pSelf(NULL)
+    {
+        MakeAndHandle ( argc, argv, pOptions1, option_count1, pOptions2, option_count2 );
+    }
+
+    CArgs::~CArgs()
+    {
+        Release();
+    }
+
+    void CArgs::MakeAndHandle (int argc, char** argv, ::OptDef const* pOptions, size_t option_count)
+    {
+        if (m_pSelf)
+            throw Utils::CErrorMsg (0, "Duplicated call to ArgsMakeAndHandle");
+
+        rc_t rc = ::ArgsMakeAndHandle (&m_pSelf, argc, argv, 1, pOptions, option_count);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "ArgsMakeAndHandle");
+#if DEBUG_PRINT != 0
+        printf("Created Args %p\n", m_pSelf);
+#endif
+    }
+    void CArgs::MakeAndHandle ( int argc, char** argv, ::OptDef const* pOptions1, size_t option_count1, ::OptDef const* pOptions2, size_t option_count2 )
+    {
+        if (m_pSelf)
+            throw Utils::CErrorMsg (0, "Duplicated call to ArgsMakeAndHandle");
+
+        rc_t rc = ::ArgsMakeAndHandle (&m_pSelf, argc, argv, 2, pOptions1, option_count1, pOptions2, option_count2);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "ArgsMakeAndHandle(2)");
+#if DEBUG_PRINT != 0
+        printf("Created Args(2) %p\n", m_pSelf);
+#endif
+    }
+
+    void CArgs::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing Args %p\n", m_pSelf);
+#endif
+            ::ArgsRelease (m_pSelf);
+            m_pSelf = NULL;
+        }
+    }
+
+    ::Args const* CArgs::GetArgs () const
+    {
+        return m_pSelf;
+    }
+
+    uint32_t CArgs::GetParamCount () const
+    {
+        uint32_t ret = 0;
+        rc_t rc = ::ArgsParamCount ( m_pSelf, &ret );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "ArgsParamCount");
+
+        return ret;
+    }
+
+    char const* CArgs::GetParamValue ( uint32_t iteration ) const
+    {
+        void const* ret = NULL;
+        rc_t rc = ::ArgsParamValue ( m_pSelf, iteration, & ret );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "ArgsParamValue");
+
+        return static_cast <char const*> (ret);
+    }
+
+    uint32_t CArgs::GetOptionCount ( char const* option_name ) const
+    {
+        uint32_t ret = 0;
+        rc_t rc = ::ArgsOptionCount ( m_pSelf, option_name, &ret );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "ArgsOptionCount (%s)", option_name);
+
+        return ret;
+    }
+
+    char const* CArgs::GetOptionValue ( char const* option_name, uint32_t iteration ) const
+    {
+        void const* ret = NULL;
+        rc_t rc = ::ArgsOptionValue ( m_pSelf, option_name, iteration, & ret );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "ArgsOptionValue (%s)", option_name);
+
+        return static_cast <char const*> (ret);
+    }
+
+////////////////////////////////
+
+    CProgressBar::CProgressBar ( uint64_t size )
+    {
+        Make ( size );
+    }
+
+    CProgressBar::~CProgressBar ()
+    {
+        Release ();
+    }
+
+    void CProgressBar::Make ( uint64_t size )
+    {
+        rc_t rc = ::KLoadProgressbar_Make ( &m_pSelf, size );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KLoadProgressbar_Make");
+#if DEBUG_PRINT != 0
+        printf ( "Created ProgressBar %p\n", m_pSelf );
+#endif
+    }
+    void CProgressBar::Release ()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing ProgressBar %p\n", m_pSelf);
+#endif
+            ::KLoadProgressbar_Release ( m_pSelf, true );
+            m_pSelf = NULL;
+        }
+    }
+
+    void CProgressBar::Append ( uint64_t chunk )
+    {
+        rc_t rc = ::KLoadProgressbar_Append ( m_pSelf, chunk );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KLoadProgressbar_Append");
+    }
+
+    void CProgressBar::Process ( uint64_t chunk, bool force_report )
+    {
+        rc_t rc = ::KLoadProgressbar_Process ( m_pSelf, chunk, force_report );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KLoadProgressbar_Process");
+    }
+
+///////////////////////////////////////////
+    CXMLLogger::CXMLLogger ( CArgs const& args )
+    {
+        Make ( args );
+    }
+
+    CXMLLogger::~CXMLLogger ()
+    {
+        Release ();
+    }
+
+    void CXMLLogger::Make ( CArgs const& args )
+    {
+        rc_t rc = ::XMLLogger_Make ( &m_pSelf, NULL, args.m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "XMLLogger_Make");
+#if DEBUG_PRINT != 0
+        printf ( "Created XMLLogger %p\n", m_pSelf );
+#endif
+    }
+
+    void CXMLLogger::Release ()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing XMLLogger %p\n", m_pSelf);
+#endif
+            ::XMLLogger_Release ( m_pSelf );
+            m_pSelf = NULL;
+        }
+    }
+}
+
+namespace Utils
+{
+    CErrorMsg::CErrorMsg(rc_t rc, char const* fmt_str, ...)
+        : m_rc(rc)
+    {
+        va_list args;
+        va_start(args, fmt_str);
+        string_vprintf (m_szDescr, countof(m_szDescr), NULL, fmt_str, args);
+        va_end(args);
+    }
+
+    rc_t CErrorMsg::getRC() const
+    {
+        return m_rc;
+    }
+    char const* CErrorMsg::what() const throw()
+    {
+        return m_szDescr;
+    }
+
+    int64_t HandleException ( bool bSilent, char* pErrDesc, size_t sizeErrDesc )
+    {
+        try
+        {
+            throw;
+        }
+        catch (Utils::CErrorMsg const& e)
+        {
+            char szBufErr[512];
+            if ( pErrDesc == NULL )
+            {
+                pErrDesc = szBufErr;
+                sizeErrDesc = countof(szBufErr);
+            }
+            size_t rc = e.getRC();
+            rc_t res;
+            if (rc != 0)
+                res = string_printf(pErrDesc, sizeErrDesc, NULL, "%s failed with code 0x%08x (%u) [%R]", e.what(), rc, rc, rc);
+            else
+                res = string_printf(pErrDesc, sizeErrDesc, NULL, "%s", e.what());
+            if (res == rcBuffer || res == rcInsufficient)
+                pErrDesc [sizeErrDesc - 1] = '\0';
+
+            if ( ! bSilent )
+                LOGMSG ( klogErr, pErrDesc );
+
+            return rc;
+        }
+        catch (std::exception const& e)
+        {
+            char szBufErr[512];
+            if ( pErrDesc == NULL )
+            {
+                pErrDesc = szBufErr;
+                sizeErrDesc = countof(szBufErr);
+            }
+            rc_t res = string_printf(pErrDesc, sizeErrDesc, NULL, "std::exception: %s", e.what());
+            if (res == rcBuffer || res == rcInsufficient)
+                pErrDesc [sizeErrDesc - 1] = '\0';
+
+            if ( ! bSilent )
+                LOGMSG ( klogErr, pErrDesc );
+
+            return Utils::rcErrorStdExc;
+        }
+        catch (...)
+        {
+            char szBufErr[512];
+            if ( pErrDesc == NULL )
+            {
+                pErrDesc = szBufErr;
+                sizeErrDesc = countof(szBufErr);
+            }
+            rc_t res = string_printf(pErrDesc, sizeErrDesc, NULL, "Unexpected exception occured");
+            if (res == rcBuffer || res == rcInsufficient)
+                pErrDesc [sizeErrDesc - 1] = '\0';
+            
+            if ( ! bSilent )
+                LOGMSG ( klogErr, pErrDesc );
+
+            return Utils::rcUnknown;
+        }
+
+        assert ( false );
+        return Utils::rcInvalid; // this shall never be reached
+    }
+}
diff --git a/tools/align-cache/helper.h b/tools/align-cache/helper.h
new file mode 100644
index 0000000..1fe213f
--- /dev/null
+++ b/tools/align-cache/helper.h
@@ -0,0 +1,390 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+// helper.h
+#include <exception>
+#include <string.h>
+
+#include <stdint.h>
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <klib/printf.h>
+#include <klib/vector.h>
+#include <kapp/args.h>
+#include <kapp/progressbar.h>
+#include <kapp/log-xml.h>
+
+
+#ifndef countof
+#define countof(arr) (sizeof(arr)/sizeof(arr[0]))
+#endif
+
+#ifdef _WIN32
+#pragma warning (disable:4503)
+#endif
+
+#define USING_UINT64_BITMAP 0
+#define MANAGER_WRITABLE 1
+#define DEBUG_PRINT 0
+
+namespace KLib
+{
+    class CKVector
+    {
+    public:
+        CKVector();
+        CKVector (CKVector const& x);
+        CKVector& operator= (CKVector const& x);
+        ~CKVector();
+
+        void SetBool (uint64_t key, bool value);
+        void VisitBool (rc_t ( * f ) ( uint64_t key, bool value, void *user_data ), void *user_data) const;
+
+    private:
+        void Make();
+        void Release();
+
+        ::KVector* m_pSelf;
+    };
+}
+
+namespace Utils
+{
+    class CErrorMsg : public std::exception
+    {
+    public:
+        CErrorMsg(rc_t rc, char const* fmt_str, ...);
+
+        rc_t getRC() const;
+        virtual char const* what() const throw();
+
+    private:
+        char m_szDescr[256];
+        rc_t m_rc;
+    };
+
+    template <typename T> T atoi_t ( char const* str_val )
+    {
+        if ( str_val [0] == '\0' )
+            throw Utils::CErrorMsg(0, "atoi_t: invalid input string (empty)");
+
+        size_t i = 0;
+        char sign = '+';
+        if ( str_val[0] == '-' || str_val[0] == '+' )
+        {
+            ++i;
+            sign = str_val[0];
+        }
+
+        T ret = 0;
+        for (; str_val[i] != '\0'; ++i )
+        {
+            if ( str_val[i] < '0' || str_val[i] > '9' )
+                throw Utils::CErrorMsg(0, "atoi_t: invalid input string \"%s\" (invalid character: '%c' at pos=%zu)", str_val, str_val[i], i+1);
+            ret = ret*10 + str_val[i] - '0';
+        }
+
+        return sign == '-' ? -ret : ret;
+    }
+
+    template <typename T> T atou_t ( char const* str_val )
+    {
+        if ( str_val [0] == '\0' )
+            throw Utils::CErrorMsg(0, "atou_t: invalid input string (empty)");
+
+        T ret = 0;
+        for ( size_t i = 0; str_val[i] != '\0'; ++i )
+        {
+            if ( str_val[i] < '0' || str_val[i] > '9' )
+                throw Utils::CErrorMsg(0, "atoi_t: invalid input string \"%s\" (invalid character: '%c' at pos=%zu)", str_val, str_val[i], i+1);
+            ret = ret*10 + str_val[i] - '0';
+        }
+
+        return ret;
+    }
+
+    enum ErrorHandlerCode
+    {
+        rcUnknown     = -2,
+        rcErrorStdExc = -1,
+        rcInvalid     = -99
+        // value > 0 means rc_t returned from a VDB-function
+        // zero shall not be returned
+    };
+
+    // This function must be called inside catch block only
+    // if bSilent == true then produce no output, only return ErrorHandlerCode
+    // pErrDesc and sizeErrDesc - the buffer to write error description to (NULL - OK)
+    int64_t HandleException ( bool bSilent, char* pErrDesc, size_t sizeErrDesc );
+}
+
+namespace VDBObjects
+{
+    /* functor to remove trailing '\n' from char reads */
+    template<typename T> class CPostReadAction
+    {
+        T* m_pBuf;
+        uint32_t m_nCount;
+    public:
+        CPostReadAction(T* pBuf, uint32_t nCount) : m_pBuf(pBuf), m_nCount(nCount) {}
+        void operator()() const;
+    };
+    template<typename T> inline void CPostReadAction<T>::operator()() const {}
+    template<> inline void CPostReadAction<char>::operator()() const { m_pBuf[m_nCount] = '\0'; }
+    template<> inline void CPostReadAction<unsigned char>::operator()() const { m_pBuf[m_nCount] = '\0'; }
+
+    class CVCursor;
+    class CVTable;
+    class CVDatabase;
+    class CVSchema;
+
+/////////////////////////////////////////////////////////////////////////////////
+
+    class CVDBManager
+    {
+    public:
+        CVDBManager();
+        ~CVDBManager();
+        CVDBManager(CVDBManager const& x);
+        CVDBManager& operator=(CVDBManager const& x);
+
+        void Make();
+        void Release();
+        CVDatabase OpenDB ( char const* pszDBName ) const;
+        CVDatabase CreateDB ( CVSchema const& schema, char const* pszTypeDesc, ::KCreateMode cmode, char const* pszPath );
+        CVSchema MakeSchema () const;
+
+    private:
+        ::VDBManager* m_pSelf;
+    };
+
+/////////////////////////////////////////////////////////////////////////////////
+
+    class CVSchema
+    {
+    public:
+        friend CVSchema CVDBManager::MakeSchema () const;
+        friend CVDatabase CVDBManager::CreateDB ( CVSchema const& schema, char const* pszTypeDesc, ::KCreateMode cmode, char const* pszPath );
+
+        CVSchema();
+        ~CVSchema();
+        CVSchema(CVSchema const& x);
+        CVSchema& operator=(CVSchema const& x);
+
+        void Make();
+        void Release();
+        void VSchemaParseFile(char const* pszFilePath);
+
+    private:
+        void Clone ( CVSchema const& x );
+        ::VSchema* m_pSelf;
+    };
+
+/////////////////////////////////////////////////////////////////////////////////
+
+    class CVDatabase
+    {
+    public:
+        friend CVDatabase CVDBManager::OpenDB ( char const* pszDBName ) const;
+        friend CVDatabase CVDBManager::CreateDB ( CVSchema const& schema, char const* pszTypeDesc, ::KCreateMode cmode, char const* pszPath );
+
+        CVDatabase();
+        ~CVDatabase();
+        CVDatabase(CVDatabase const& x);
+        CVDatabase& operator=(CVDatabase const& x);
+
+        void Release();
+        CVTable OpenTable ( char const* pszTableName ) const;
+        CVTable CreateTable ( char const* pszTableName );
+        void ColumnCreateParams ( ::KCreateMode cmode, ::KChecksum checksum, size_t pgsize );
+
+    private:
+        void Clone(CVDatabase const& x);
+        ::VDatabase* m_pSelf;
+    };
+
+//////////////////////////////////////////////////////////////
+
+    class CVTable
+    {
+    public:
+        friend CVTable CVDatabase::OpenTable(char const* pszTableName) const;
+        friend CVTable CVDatabase::CreateTable ( char const* pszTableName );
+
+        CVTable();
+        ~CVTable();
+        CVTable(CVTable const& x);
+        CVTable& operator=(CVTable const& x);
+
+        void Release();
+        CVCursor CreateCursorRead ( size_t cache_size ) const;
+        CVCursor CreateCursorWrite ( ::KCreateMode mode );
+
+    private:
+        void Clone(CVTable const& x);
+        ::VTable* m_pSelf;
+    };
+
+////////////////////////////////////////////////////////////////////////////
+
+    class CVCursor
+    {
+    public:
+        friend CVCursor CVTable::CreateCursorRead ( size_t cache_size ) const;
+        friend CVCursor CVTable::CreateCursorWrite (::KCreateMode mode);
+
+        CVCursor();
+        ~CVCursor();
+        CVCursor(CVCursor const& x);
+        CVCursor& operator=(CVCursor const& x);
+
+        void Release();
+        void PermitPostOpenAdd() const;
+#if MANAGER_WRITABLE != 0
+        void InitColumnIndex(char const* const* ColumnNames, uint32_t* pColumnIndex, size_t nCount, bool set_default);
+#else
+        void InitColumnIndex(char const* const* ColumnNames, uint32_t* pColumnIndex, size_t nCount);
+#endif
+        void Open() const;
+        void GetIdRange(int64_t& idFirstRow, uint64_t& nRowCount) const;
+
+        template <typename T> uint32_t ReadItems (int64_t idRow, uint32_t idxCol, T* pBuf, uint32_t nBufLen) const
+        {
+            uint32_t nItemsRead = 0;
+
+            rc_t rc = ::VCursorReadDirect(m_pSelf, idRow, idxCol, 8*sizeof(T), pBuf, nBufLen, &nItemsRead);
+            if (rc)
+                throw Utils::CErrorMsg(rc, "VCursorReadDirect: row_id=%ld, idxCol=%u", idRow, idxCol);
+
+            //CPostReadAction<T>(pBuf, nItemsRead)();
+
+            return nItemsRead;
+        }
+
+        template <typename T> void Write (uint32_t idxCol, T const* pBuf, uint64_t count)
+        {
+            rc_t rc = ::VCursorWrite ( m_pSelf, idxCol, 8 * sizeof(T), pBuf, 0, count );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "VCursorWrite: idxCol=%u", idxCol);
+        }
+
+        int64_t GetRowId () const;
+        void SetRowId (int64_t row_id) const;
+        void OpenRow () const;
+        void CommitRow ();
+        void RepeatRow ( uint64_t count );
+        void CloseRow () const;
+        void Commit ();
+
+    private:
+        void Clone(CVCursor const& x);
+        ::VCursor* m_pSelf;
+    };
+}
+
+///////////////////////
+
+namespace KApp
+{
+    class CArgs;
+    class CXMLLogger
+    {
+    public:
+        CXMLLogger ( CArgs const& args );
+        CXMLLogger (CXMLLogger const& x);
+        CXMLLogger& operator= (CXMLLogger const& x);
+        ~CXMLLogger ();
+
+        void Make ( CArgs const& args );
+
+    private:
+        void Release ();
+
+        XMLLogger const* m_pSelf;
+    };
+
+/////////////////////////////////////////
+
+    class CArgs
+    {
+    public:
+        friend void CXMLLogger::Make ( CArgs const& args );
+
+        CArgs ( int argc, char** argv, ::OptDef const* pOptions, size_t option_count );
+        CArgs ( int argc, char** argv, ::OptDef const* pOptions1, size_t option_count1, ::OptDef const* pOptions2, size_t option_count2 );
+        CArgs ( CArgs const& x );
+        CArgs& operator= ( CArgs const& x );
+        ~CArgs ();
+
+        ::Args const* GetArgs () const;
+        uint32_t GetParamCount () const;
+        char const* GetParamValue ( uint32_t iteration ) const;
+        uint32_t GetOptionCount ( char const* option_name ) const;
+        char const* GetOptionValue ( char const* option_name, uint32_t iteration ) const;
+
+        template <typename T> T GetOptionValueInt ( char const* option_name, uint32_t iteration ) const
+        {
+            char const* str_val = GetOptionValue ( option_name, iteration );
+            return Utils::atoi_t <T> ( str_val );
+        }
+        template <typename T> T GetOptionValueUInt ( char const* option_name, uint32_t iteration ) const
+        {
+            char const* str_val = GetOptionValue ( option_name, iteration );
+            return Utils::atou_t <T> ( str_val );
+        }
+
+    private:
+
+        void MakeAndHandle ( int argc, char** argv, ::OptDef const* pOptions, size_t option_count );
+        // TODO: it's better to make ::ArgsMakeAndHandle be able to take va_list
+        void MakeAndHandle ( int argc, char** argv, ::OptDef const* pOptions1, size_t option_count1, ::OptDef const* pOptions2, size_t option_count2 );
+        void Release ();
+
+        ::Args* m_pSelf;
+    };
+
+    class CProgressBar
+    {
+    public:
+        CProgressBar ( uint64_t size );
+        CProgressBar ( CProgressBar const& x );
+        CProgressBar& operator= ( CProgressBar const& x );
+        ~CProgressBar ();
+
+        void Append ( uint64_t chunk );
+        void Process ( uint64_t chunk, bool force_report );
+
+    private:
+        void Make ( uint64_t size );
+        void Release ();
+
+        KLoadProgressbar const* m_pSelf;
+    };
+}
diff --git a/tools/align-info/Makefile b/tools/align-info/Makefile
new file mode 100644
index 0000000..b6d9fcd
--- /dev/null
+++ b/tools/align-info/Makefile
@@ -0,0 +1,76 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/align-info
+
+INT_TOOLS =
+
+EXT_TOOLS = \
+	align-info
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# align-info
+#
+ALIGN_INFO_SRC = \
+	align-info
+
+ALIGN_INFO_OBJ = \
+	$(addsuffix .$(OBJX),$(ALIGN_INFO_SRC))
+
+ALIGN_INFO_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lm
+
+$(BINDIR)/align-info: $(ALIGN_INFO_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(ALIGN_INFO_LIB)
diff --git a/tools/align-info/align-info.c b/tools/align-info/align-info.c
new file mode 100644
index 0000000..bba4cc1
--- /dev/null
+++ b/tools/align-info/align-info.c
@@ -0,0 +1,571 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <sra/sraschema.h> /* VDBManagerMakeSRASchema */
+
+#include <vdb/manager.h> /* VDBManager */
+#include <vdb/database.h> /* VDatabase */
+#include <vdb/dependencies.h> /* VDBDependencies */
+#include <vdb/table.h> /* VTable */
+#include <vdb/schema.h> /* VSchema */
+#include <vdb/cursor.h> /* VCursor */
+#include <vdb/vdb-priv.h> /* VDBManagerOpenKDBManagerRead */
+
+#include <kapp/main.h>
+
+#include <kfg/config.h> /* KConfig */
+
+#include <kdb/manager.h> /* KDBManagerRelease */
+#include <kdb/namelist.h> /* KMDataNodeListChild */
+#include <kdb/meta.h> /* KMetadata */
+
+#include <klib/container.h> /* BSTree */
+#include <klib/sort.h> /* ksort */
+#include <klib/out.h> /* OUTMSG */
+#include <klib/log.h> /* LOGERR */
+#include <klib/debug.h> /* DBGMSG */
+#include <klib/rc.h> /* RC */
+
+#include <assert.h>
+#include <stdio.h> /* sscanf */
+#include <stdlib.h> /* free */
+#include <string.h> /* strcmp */
+
+#define DISP_RC(rc, msg) (void)((rc == 0) ? 0 : LOGERR(klogInt, rc, msg))
+#define DISP_RC2(rc, name, msg) (void)((rc == 0) ? 0 : \
+    PLOGERR(klogInt, (klogInt,rc, "$(msg): $(name)","msg=%s,name=%s",msg,name)))
+#define DESTRUCT(type, obj) do { rc_t rc2 = type##Release(obj); \
+    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
+
+typedef struct Params {
+    const char* dbPath;
+
+    bool paramBamHeader;
+    bool paramQuality;
+    bool paramRef;
+
+    bool paramHeaders;
+} Params;
+
+#define ALIAS_ALL    "a"
+#define OPTION_ALL   "all"
+static const char* USAGE_ALL[] = { "print all information", NULL };
+
+#define ALIAS_BAM    "b"
+#define OPTION_BAM   "bam"
+static const char* USAGE_BAM[] = { "print bam header (if present)", NULL };
+
+#define ALIAS_QUA    "Q"
+#define OPTION_QUA   "qual"
+static const char* USAGE_QUA[]
+                       = { "print quality statistics (if present)", NULL };
+
+#define ALIAS_REF    "r"
+#define OPTION_REF   "ref"
+static const char* USAGE_REF[] = { "print refseq information [default]", NULL };
+
+#define ALIAS_HEA   "H"
+#define OPTION_HEA  "headers"
+static const char* USAGE_HEA[] = { "print headers for output blocks", NULL };
+
+OptDef Options[] =
+{
+      { OPTION_ALL, ALIAS_ALL, NULL, USAGE_ALL, 1, false, false }
+    , { OPTION_BAM, ALIAS_BAM, NULL, USAGE_BAM, 1, false, false }
+    , { OPTION_QUA, ALIAS_QUA, NULL, USAGE_QUA, 1, false, false }
+    , { OPTION_REF, ALIAS_REF, NULL, USAGE_REF, 1, false, false }
+    , { OPTION_HEA, ALIAS_HEA, NULL, USAGE_HEA, 1, false, false }
+};
+
+rc_t CC UsageSummary (const char * progname) {
+    return KOutMsg (
+        "Usage:\n"
+        "  %s [options] <db-path>\n"
+        "\n"
+        "Summary:\n"
+        "  Print database alignment information\n"
+        "\n", progname);
+ }
+
+static const char* param_usage[] = { "Path to the database", NULL };
+
+rc_t CC Usage(const Args* args) { 
+    rc_t rc = 0 ;
+
+    const char* progname = UsageDefaultName;
+    const char* fullpath = UsageDefaultName;
+
+    if (args == NULL)
+    {    rc = RC(rcExe, rcArgv, rcAccessing, rcSelf, rcNull); }
+    else
+    {    rc = ArgsProgram(args, &fullpath, &progname); }
+
+    UsageSummary(progname);
+
+    KOutMsg("Parameters:\n");
+
+    HelpParamLine ("db-path", param_usage);
+
+    KOutMsg ("\nOptions:\n");
+
+    HelpOptionLine (ALIAS_ALL, OPTION_ALL, NULL, USAGE_ALL);
+    HelpOptionLine (ALIAS_REF, OPTION_REF, NULL, USAGE_REF);
+    HelpOptionLine (ALIAS_BAM, OPTION_BAM, NULL, USAGE_BAM);
+    HelpOptionLine (ALIAS_QUA, OPTION_QUA, NULL, USAGE_QUA);
+    HelpOptionLine (ALIAS_HEA, OPTION_HEA, NULL, USAGE_HEA);
+
+    KOutMsg ("\n");
+
+    HelpOptionsStandard ();
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+const char UsageDefaultName[] = "align-info";
+
+static rc_t bam_header(const VDatabase* db) {
+    rc_t rc = 0;
+    const char path[] = "BAM_HEADER";
+    const KMetadata* meta = NULL;
+    const KMDataNode* node = NULL;
+    char* buffer = NULL;
+    assert(db);
+    if (rc == 0) {
+        rc = VDatabaseOpenMetadataRead(db, &meta);
+        DISP_RC(rc, "while calling VDatabaseOpenMetadataRead");
+    }
+    if (rc == 0) {
+        rc = KMetadataOpenNodeRead(meta, &node, "%s", path);
+        if (GetRCState(rc) == rcNotFound)
+        {   rc = 0; }
+        else {
+            DISP_RC2(rc, path, "while calling KMetadataOpenNodeRead");
+            if (rc == 0) {
+                int i = 0;
+                size_t bsize = 0;
+                size_t size = 1024;
+                for (i = 0; i < 2; ++i) {
+                    free(buffer);
+                    bsize = size + 1;
+                    buffer = malloc(bsize);
+                    if (buffer == NULL) {
+                        rc = RC(rcExe, rcStorage, rcAllocating,
+                            rcMemory, rcExhausted);
+                    }
+                    else {
+                        rc = KMDataNodeReadCString(node, buffer, bsize, &size);
+                        if (rc == 0) {
+                            break;
+                        }
+                        else if (i == 0
+                            && GetRCObject(rc) == (enum RCObject)rcBuffer
+                            && GetRCState (rc) ==          rcInsufficient)
+                        {
+                            rc = 0;
+                        }
+                    }
+                    DISP_RC2(rc, path, "while calling KMDataNodeReadCString");
+                }
+            }
+        }
+    }
+    if (rc == 0 && buffer)
+    {   OUTMSG(("BAM_HEADER: {\n%s}\n\n", buffer)); }
+    DESTRUCT(KMDataNode, node);
+    DESTRUCT(KMetadata, meta);
+    free(buffer);
+    return rc;
+}
+
+static int64_t CC sort_callback(const void* p1, const void* p2, void* data) {
+    int i1 = *(int*) p1;
+    int i2 = *(int*) p2;
+    return i1 - i2;
+}
+static rc_t qual_stats(const Params* prm, const VDatabase* db) {
+    rc_t rc = 0;
+    const char tblName[] = "SEQUENCE";
+    const VTable* tbl = NULL;
+    const KMetadata* meta = NULL;
+    const KMDataNode* node = NULL;
+    assert(prm && db);
+    if (rc == 0) {
+        rc = VDatabaseOpenTableRead(db, &tbl, "%s", tblName);
+        DISP_RC2(rc, tblName, "while calling VDatabaseOpenTableRead");
+    }
+    if (rc == 0) {
+        rc = VTableOpenMetadataRead(tbl, &meta);
+        DISP_RC2(rc, tblName, "while calling VTableOpenMetadataRead");
+    }
+    if (rc == 0) {
+        bool found = false;
+        const char path[] = "STATS/QUALITY";
+        rc = KMetadataOpenNodeRead(meta, &node, path);
+        if (rc == 0)
+        {   found = true; }
+        else if (GetRCState(rc) == rcNotFound)
+        {   rc = 0; }
+        DISP_RC2(rc, path, "while calling KMetadataOpenNodeRead");
+        if (found) {
+            uint32_t i = 0;
+            int nbr = 0;
+            uint32_t count = 0;
+            KNamelist* names = NULL;
+            int* quals = NULL;
+            if (rc == 0) {
+                rc = KMDataNodeListChild(node, &names);
+                DISP_RC2(rc, path, "while calling KMDataNodeListChild");
+            }
+            if (rc == 0) {
+                rc = KNamelistCount(names, &count);
+                DISP_RC2(rc, path, "while calling KNamelistCount");
+                if (rc == 0 && count > 0) {
+                    quals = calloc(count, sizeof *quals);
+                    if (quals == NULL) {
+                        rc = RC(rcExe,
+                            rcStorage, rcAllocating, rcMemory, rcExhausted);
+                    }
+                }
+            }
+            for (i = 0; i < count && rc == 0; ++i) {
+             /* uint64_t u = 0;
+                const KMDataNode* n = NULL; */
+                const char* nodeName = NULL;
+                const char* name = NULL;
+                rc = KNamelistGet(names, i, &nodeName);
+                DISP_RC2(rc, path, "while calling KNamelistGet");
+                if (rc)
+                {   break; }
+                name = nodeName;
+             /* rc = KMDataNodeOpenNodeRead(node, &n, name);
+                DISP_RC(rc, name);
+                if (rc == 0) {
+                    rc = KMDataNodeReadAsU64(n, &u);
+                    DISP_RC(rc, name);
+                } */
+                if (rc == 0) {
+                    char* c = strchr(name, '_');
+                    if (c != NULL && *(c + 1) != '\0') {
+                        name = c + 1;
+                        if (sscanf(name, "%d", &quals[i]) != 1) {
+                            rc = RC(rcExe,
+                                rcNode, rcParsing, rcName, rcUnexpected);
+                            PLOGERR(klogInt,
+                                (klogInt, rc, "$(name)", "name=%s", nodeName));
+                        }
+                    }
+                    /* OUTMSG(("QUALITY %s %lu\n", name, u)); */
+                }
+             /* DESTRUCT(KMDataNode, n); */
+            }
+            if (rc == 0 && count > 0)
+            {   ksort(quals, count, sizeof *quals, sort_callback, NULL); }
+
+            if (rc == 0) {
+                if (prm->paramHeaders) {
+                    OUTMSG(("Quality statistics - rows per value\n"));
+                    OUTMSG(("Quality values:"));
+                    for (i = 0; i <= 40; ++i) {
+                        OUTMSG(("\t%d", i));
+                    }
+                    OUTMSG(("\n"));
+                }
+                OUTMSG(("%s", prm->dbPath));
+            }
+
+            for (i = 0, nbr = 0; i < count && rc == 0; ++i, ++nbr) {
+                uint64_t u = 0;
+                char name[64];
+                const KMDataNode* n = NULL;
+                sprintf(name, "PHRED_%d", quals[i]);
+                rc = KMDataNodeOpenNodeRead(node, &n, "%s", name);
+                DISP_RC(rc, name);
+                if (rc == 0) {
+                    rc = KMDataNodeReadAsU64(n, &u);
+                    DISP_RC(rc, name);
+                    if (rc == 0) {
+                        while (nbr < quals[i]) {
+                            OUTMSG(("\t0"));
+                            ++nbr;
+                        }
+                        OUTMSG(("\t%lu", u));
+                    /*  OUTMSG(("QUALITY %d %lu\n", quals[i], u)); */
+                    }
+                }
+                DESTRUCT(KMDataNode, n);
+            }
+            while (rc == 0 && nbr <= 40) {
+                OUTMSG(("\t0"));
+                nbr++;
+            }
+            if (rc == 0) {
+                OUTMSG(("\n"));
+            }
+            DESTRUCT(KNamelist, names);
+        }
+    }
+    DESTRUCT(KMDataNode, node);
+    DESTRUCT(KMetadata, meta);
+    DESTRUCT(VTable, tbl);
+    return rc;
+}
+
+static rc_t align_info(const Params* prm) {
+    rc_t rc = 0;
+
+    const VDatabase* db = NULL;
+    const VDBManager* mgr = NULL;
+    const KDBManager *kmgr = NULL;
+    VSchema* schema = NULL;
+    bool is_db = false;
+
+    if (prm == NULL)
+    {   return RC(rcExe, rcQuery, rcExecuting, rcParam, rcNull); }
+
+    if (rc == 0) {
+        rc = VDBManagerMakeRead(&mgr, NULL);
+        DISP_RC(rc, "while calling VDBManagerMakeRead");
+    }
+
+    if (rc == 0) {
+        rc = VDBManagerOpenKDBManagerRead(mgr, &kmgr);
+        DISP_RC(rc, "while calling VDBManagerOpenKDBManagerRead");
+    }
+
+    if (rc == 0) {
+        rc = VDBManagerMakeSRASchema(mgr, &schema);
+        DISP_RC(rc, "while calling VDBManagerMakeSRASchema");
+    }
+
+    if (rc == 0) {
+        rc = VDBManagerOpenDBRead(mgr, &db, schema, "%s", prm->dbPath);
+        if (rc == 0) {
+            is_db = true;
+        }
+        else if (rc == SILENT_RC(rcDB, rcMgr, rcOpening, rcDatabase, rcIncorrect)) {
+            PLOGMSG(klogWarn, (klogWarn,
+                "'$(path)' is not a database", "path=%s", prm->dbPath));
+            rc = 0;
+        }
+        else {
+            PLOGERR(klogErr,
+                (klogErr, rc, "$(path)", "path=%s", prm->dbPath));
+        }
+    }
+
+    if (is_db) {
+        if (rc == 0) {
+            if (prm->paramRef) {
+                const VDBDependencies* dep = NULL;
+                uint32_t count = 0;
+                int i = 0;
+                if (prm->paramHeaders) {
+                    OUTMSG(("Alignments:\n"));
+                }
+                rc = VDatabaseListDependencies(db, &dep, false);
+                DISP_RC2(rc, prm->dbPath,
+                    "while calling VDatabaseListDependencies");
+                if (rc == 0) {
+                    rc = VDBDependenciesCount(dep, &count);
+                    DISP_RC2(rc, prm->dbPath,
+                        "while calling VDBDependenciesCount");
+                }
+                for (i = 0; i < count && rc == 0; ++i) {
+                    bool circular = false;
+                    const char* name = NULL;
+                    const char* path = NULL;
+                    const char* remote = NULL;
+                    bool local = false;
+                    const char* seqId = NULL;
+                    rc = VDBDependenciesCircular(dep, &circular, i);
+                    if (rc != 0) {
+                        DISP_RC2(rc, prm->dbPath,
+                            "while calling VDBDependenciesCircular");
+                        break;
+                    }
+                    rc = VDBDependenciesName(dep, &name, i);
+                    if (rc != 0) {
+                        DISP_RC2(rc, prm->dbPath,
+                            "while calling VDBDependenciesName");
+                        break;
+                    }
+                    rc = VDBDependenciesPath(dep, &path, i);
+                    if (rc != 0) {
+                        DISP_RC2(rc, prm->dbPath,
+                            "while calling VDBDependenciesPath");
+                        break;
+                    }
+                    rc = VDBDependenciesLocal(dep, &local, i);
+                    if (rc != 0) {
+                        DISP_RC2(rc, prm->dbPath,
+                            "while calling VDBDependenciesLocal");
+                        break;
+                    }
+                    rc = VDBDependenciesSeqId(dep, &seqId, i);
+                    if (rc != 0) {
+                        DISP_RC2(rc, prm->dbPath,
+                            "while calling VDBDependenciesSeqId");
+                        break;
+                    }
+                    rc = VDBDependenciesPathRemote(dep, &remote, i);
+                    if (rc != 0) {
+                        DISP_RC2(rc, prm->dbPath,
+                            "while calling VDBDependenciesRemote");
+                        break;
+                    }
+                    OUTMSG(("%s,%s,%s,%s", seqId, name,
+                        (circular ? "true" : "false"),
+                        (local ? "local" : "remote")));
+                    if (path && path[0]) {
+                        OUTMSG((":%s", path));
+                    }
+                    else if (remote && remote[0]) {
+                        OUTMSG(("::%s", remote));
+                    }
+                    OUTMSG(("\n"));
+                }
+                DESTRUCT(VDBDependencies, dep);
+                if (prm->paramHeaders) {
+                    OUTMSG(("\n"));
+                }
+            }
+
+            if (prm->paramBamHeader) {
+                rc_t rc3 = bam_header(db);
+                if (rc3 != 0 && rc == 0)
+                {   rc = rc3; }
+            }
+
+            if (prm->paramQuality) {
+                rc_t rc3 = qual_stats(prm, db);
+                if (rc3 != 0 && rc == 0)
+                {   rc = rc3; }
+            }
+        }
+
+    }
+
+    DESTRUCT(VSchema, schema);
+    DESTRUCT(KDBManager, kmgr);
+    DESTRUCT(VDBManager, mgr);
+    DESTRUCT(VDatabase, db);
+
+    return rc;
+}
+
+rc_t CC KMain(int argc, char* argv[]) {
+    rc_t rc = 0;
+    Args* args = NULL;
+
+    Params prm;
+    memset(&prm, 0, sizeof prm);
+
+    do {
+        uint32_t pcount = 0;
+
+        rc = ArgsMakeAndHandle(&args, argc, argv, 1,
+            Options, sizeof Options / sizeof (OptDef));
+        if (rc) {
+            LOGERR(klogErr, rc, "While calling ArgsMakeAndHandle");
+            break;
+        }
+        rc = ArgsParamCount(args, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "While calling ArgsParamCount");
+            break;
+        }
+        if (pcount < 1) {
+            MiniUsage(args);
+            DESTRUCT(Args, args);
+            exit(1);
+            break;
+        }
+        if (pcount > 1) {
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcAmbiguous);
+            LOGERR(klogErr, rc, "Too many database parameters");
+            break;
+        }
+        rc = ArgsParamValue(args, 0, (const void **)&prm.dbPath);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure retrieving database name");
+            break;
+        }
+
+        rc = ArgsOptionCount (args, OPTION_ALL, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure to get '" OPTION_ALL "' argument");
+            break;
+        }
+        if (pcount)
+        {   prm.paramBamHeader = prm.paramQuality = prm.paramRef = true; }
+
+        rc = ArgsOptionCount (args, OPTION_BAM, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure to get '" OPTION_BAM "' argument");
+            break;
+        }
+        if (pcount)
+        {   prm.paramBamHeader = true; }
+
+        rc = ArgsOptionCount (args, OPTION_QUA, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure to get '" OPTION_QUA "' argument");
+            break;
+        }
+        if (pcount)
+        {   prm.paramQuality = true; }
+
+        rc = ArgsOptionCount (args, OPTION_REF, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure to get '" OPTION_REF "' argument");
+            break;
+        }
+        if (pcount)
+        {   prm.paramRef = true; }
+
+        if (!prm.paramBamHeader && !prm.paramQuality && !prm.paramRef)
+        {   prm.paramRef = true; }
+
+        rc = ArgsOptionCount (args, OPTION_HEA, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure to get '" OPTION_HEA "' argument");
+            break;
+        }
+        if (pcount) {
+            prm.paramHeaders = true;
+        }
+    } while (false);
+
+    if (rc == 0)
+    {   rc = align_info(&prm); }
+
+    DESTRUCT(Args, args);
+    return rc;
+}
+
+/************************************* EOF ************************************/
diff --git a/tools/bam-loader/Globals.h b/tools/bam-loader/Globals.h
new file mode 100644
index 0000000..6031eaf
--- /dev/null
+++ b/tools/bam-loader/Globals.h
@@ -0,0 +1,93 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+enum LoaderModes {
+    mode_Archive,
+    mode_Remap
+};
+
+typedef struct globals
+{
+    char const *inpath;
+    char const *outpath;
+    char const *outname;
+    char const *firstOut;
+    char const *tmpfs;
+    
+    struct KFile *noMatchLog;
+    
+    char const *schemaPath;
+    char const *schemaIncludePath;
+    
+    char const *refXRefPath;
+    
+    char const *QualQuantizer;
+    
+    char const *refFilter;
+
+    char const** refFiles; /* NULL-terminated array pointing to argv */
+    
+    char const *headerText;
+    
+    uint64_t maxAlignCount;
+    size_t cache_size;
+
+    unsigned errCount;
+    unsigned maxErrCount;
+    unsigned maxWarnCount_NoMatch;
+    unsigned maxWarnCount_DupConflict;
+    unsigned pid;
+    unsigned minMatchCount; /* minimum number of matches to count as an alignment */
+    int minMapQual;
+    enum LoaderModes mode;
+    enum LoaderModes globalMode;
+    uint32_t maxSeqLen;
+    bool omit_aligned_reads;
+    bool omit_reference_reads;
+    bool no_real_output;
+    bool expectUnsorted;
+    bool requireSorted;
+    bool noVerifyReferences;
+    bool onlyVerifyReferences;
+    bool useQUAL;
+    bool limit2config;
+    bool editAlignedQual;
+    bool keepMismatchQual;
+    bool acceptBadDups; /* accept spots with inconsistent PCR duplicate flags */
+    bool acceptNoMatch; /* accept without any matching bases */
+    bool noSpotAssembly;
+    uint8_t alignedQualValue;
+    bool allUnaligned; /* treat all records as unaligned */
+    bool noColorSpace;
+    bool noSecondary;
+    bool hasTI;
+    bool acceptHardClip;
+    bool allowMultiMapping; /* allow multiple reference names to map to the same real reference */
+    bool assembleWithSecondary;
+    bool deferSecondary;
+} Globals;
+
+extern Globals G;
diff --git a/tools/bam-loader/KFileHelper.c b/tools/bam-loader/KFileHelper.c
new file mode 100644
index 0000000..b9c65c0
--- /dev/null
+++ b/tools/bam-loader/KFileHelper.c
@@ -0,0 +1,142 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "KFileHelper.h"
+#include <string.h>
+
+rc_t BufferedKFileGets(KDataBuffer *buf, unsigned offset, unsigned *nread, BufferedKFile *strm) {
+    unsigned i;
+    unsigned n;
+    int ch;
+    rc_t rc;
+    
+    do {
+        if (strm->cur != strm->inbuf) {
+            ch = strm->buf[strm->cur];
+            
+            if (ch == '\r' || ch == '\n')
+                ++strm->cur;
+            else
+                break;
+        }
+        else {
+            size_t numread;
+            
+            rc = KFileRead(strm->kfp, strm->fpos, strm->buf, sizeof(strm->buf), &numread);
+            if (rc) return -1;
+            
+            strm->cur = 0;
+            strm->inbuf = numread;
+            strm->fpos += numread;
+            if (numread == 0) {
+                *nread = 0;
+                return 0;
+            }
+        }
+    } while (1);
+    
+    for (n = 0, i = offset; ; ++i, ++n) {
+        if (strm->cur != strm->inbuf) {
+            ch = strm->buf[strm->cur++];
+        }
+        else {
+            size_t numread;
+            
+            rc = KFileRead(strm->kfp, strm->fpos, strm->buf, sizeof(strm->buf), &numread);
+            if (rc) return rc;
+            
+            strm->cur = 0;
+            strm->inbuf = numread;
+            if (numread == 0) break;
+            strm->fpos += numread;
+            ch = strm->buf[strm->cur++];
+        }
+        if (ch == '\r' || ch == '\n') break;
+        if (i >= buf->elem_count) {
+            rc = KDataBufferResize(buf, buf->elem_count ? buf->elem_count * 2 : 1024);
+            if (rc) return rc;
+        }
+        ((char *)buf->base)[i] = ch;
+    }
+    *nread = n;
+    return 0;
+}
+
+rc_t BufferedKFileOpen(const KDirectory *directory, BufferedKFile *rslt, const char *fileName, ...) {
+    va_list va;
+    rc_t rc;
+
+    memset(rslt, 0, sizeof(rslt) - sizeof(rslt->buf));
+
+    va_start(va, fileName);
+    rc = KDirectoryVOpenFileRead(directory, &rslt->kfp, fileName, va);
+    va_end(va);
+    
+    return rc;
+}
+
+rc_t BufferedKFileClose(BufferedKFile *strm) {
+    return KFileRelease(strm->kfp);
+}
+
+rc_t LoadFile(KDataBuffer *dst, uint64_t *lineCount, const KDirectory *dir, const char *fileName, ...) {
+    BufferedKFile strm;
+    rc_t rc;
+    unsigned line = 0;
+
+    memset(&strm, 0, sizeof(strm) - sizeof(strm.buf));
+    {
+        va_list va;
+
+        va_start(va, fileName);
+        rc = KDirectoryVOpenFileRead(dir, &strm.kfp, fileName, va);
+        va_end(va);
+    }
+    if (rc == 0) {
+        unsigned offset = 0;
+        unsigned i;
+        
+        while ((rc = BufferedKFileGets(dst, offset, &i, &strm)) == 0 && i) {
+            offset += i;
+            if (offset + 1 >= dst->elem_count) {
+                rc = KDataBufferResize(dst, offset + 1);
+                if (rc)
+                    break;
+            }
+            ((char *)dst->base)[offset++] = '\0';
+            ++line;
+        }
+        BufferedKFileClose(&strm);
+        if (rc == 0)
+            rc = KDataBufferResize(dst, offset);
+    }
+    if (rc != 0) {
+        KDataBufferResize(dst, 0);
+        line = 0;
+    }
+    if (lineCount) *lineCount = line;
+    return rc;
+}
diff --git a/tools/bam-loader/KFileHelper.h b/tools/bam-loader/KFileHelper.h
new file mode 100644
index 0000000..4551952
--- /dev/null
+++ b/tools/bam-loader/KFileHelper.h
@@ -0,0 +1,48 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef BAM_LOAD_KFILEHELPER_H_
+#define BAM_LOAD_KFILEHELPER_H_ 1
+#include <klib/data-buffer.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+typedef struct BufferedKFile BufferedKFile;
+
+#define KFILE_BUF_SIZE (4096)
+struct BufferedKFile {
+    uint64_t fpos;
+    const KFile *kfp;
+    unsigned inbuf;
+    unsigned cur;
+    char buf[KFILE_BUF_SIZE];
+};
+
+rc_t BufferedKFileGets(KDataBuffer *buf, unsigned offset, unsigned *nread, BufferedKFile *strm);
+rc_t BufferedKFileOpen(const KDirectory *directory, BufferedKFile *rslt, const char *fileName, ...);
+rc_t BufferedKFileClose(BufferedKFile *strm);
+rc_t LoadFile(KDataBuffer *dst, uint64_t *lineCount, const KDirectory *dir, const char *fileName, ...);
+#endif
diff --git a/tools/bam-loader/KVPFile.c b/tools/bam-loader/KVPFile.c
new file mode 100644
index 0000000..c9d60cd
--- /dev/null
+++ b/tools/bam-loader/KVPFile.c
@@ -0,0 +1,355 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "KVPFile.h"
+
+#include <kfs/file.h>
+#include <klib/rc.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#define USE_KDB_BTREE 1
+
+#if USE_KDB_BTREE
+#include <kdb/btree.h>
+#else
+#include "hashtable.h"
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#endif
+
+
+
+#if USE_KDB_BTREE
+
+/* going to make an index with:                                                                        
+ *  a) backing file                                                                                     
+ *  b) page size is fixed at 32K, otherwise the page size would have to be stored somewhere             
+ *  c) page cache - need cache limit in bytes                                                           
+ *  d) 2 chunked value streams - need key chunking and value chunking                                   
+ *  e) B-Tree-ish index, requiring a comparison function. this interface uses opaque keys.              
+ *     the "matched-count" parameter is useful for trie traversal, but this will be built-in            
+ */
+rc_t KVPFileMake ( KVPFile **rslt, KFile *file, size_t climit,
+    size_t kchunk_size, size_t vchunk_size,
+    size_t min_ksize, size_t max_ksize, size_t min_vsize, size_t max_vsize,
+    KVPFileCompareFunc cmp )
+{
+    return KBTreeMakeUpdate ( ( KBTree** ) rslt, file, climit, false, kbtOpaqueKey,
+        kchunk_size, vchunk_size, min_ksize, max_ksize, min_vsize, max_vsize, cmp );
+}
+
+
+/* this whacker works fine
+ */
+rc_t KVPFileWhack ( KVPFile *xself, bool commit )
+{
+    KBTree *self = ( KBTree* ) xself;
+
+    rc_t rc = 0;
+
+    if ( self != NULL )
+    {
+        /* drop the backing file unless commiting */
+        if ( ! commit )
+            rc = KBTreeDropBacking ( self );
+
+        /* drop the b-tree */
+        rc = KBTreeRelease ( self );
+    }
+
+    return rc;
+}
+
+
+/* whacker */
+void KVPValueWhack ( KVPValue *self )
+{
+    KBTreeValueWhack ( self );
+}
+
+/* return the pointer to thingie */
+rc_t KVPValueAccessRead ( const KVPValue *self, const void **mem, size_t *bytes )
+{
+    return KBTreeValueAccessRead ( self, mem, bytes );
+}
+
+rc_t KVPValueAccessUpdate ( KVPValue *self, void **mem, size_t *bytes )
+{
+    return KBTreeValueAccessUpdate ( self, mem, bytes );
+}
+
+
+/* find will not modify the index in any way
+ *  returns a pointer into a page, meaning that the values cannot exceed 32K in size
+ *  this is done
+ */
+rc_t KVPFileFind ( const KVPFile *self, KVPValue *val, const void *key, size_t ksize )
+{
+    return KBTreeFind ( ( const KBTree* ) self, val, key, ksize );
+}
+
+
+
+/* find or insert will return an existing or create a new entry
+ * note that the new entry is initially zeroed
+ */
+rc_t KVPFileFindOrInsert ( KVPFile *self, KVPValue *val,
+                          bool *was_inserted, size_t alloc_size,
+                          const void *key, size_t ksize )
+{
+    return KBTreeEntry ( ( KBTree* ) self, val, was_inserted, alloc_size, key, ksize );
+}
+
+rc_t KVPFileForEach ( const KVPFile *self,
+                      void ( CC * f )( const void *key, size_t ksize, KVPValue *val, void *ctx ),
+                      void *ctx )
+{
+    return KBTreeForEach((KBTree *)self, 0, f, ctx);
+}
+
+
+#else
+typedef struct KTempMMap {
+    void *base;
+    size_t sz;
+    int fd;
+    unsigned elemsize;
+    unsigned fileNo;
+} KTempMMap;
+
+static rc_t KTempMMapMake(KTempMMap *rslt, size_t initSize, size_t elemSize)
+{
+    char fname[4096];
+    
+    memset(rslt, 0, sizeof(*rslt));
+    rslt->elemsize = elemSize;
+    
+    sprintf(fname, "/tmp/kvp.%u.XXXXXX", getpid());
+    rslt->fd = mkstemp(fname);
+    if (rslt->fd < 0) {
+        perror(fname);
+        return RC(rcApp, rcFile, rcCreating, rcFile, rcUnknown);
+    }    
+    unlink(fname);
+
+    if (ftruncate(rslt->fd, initSize * elemSize) != 0)
+        return RC(rcApp, rcFile, rcResizing, rcFile, rcUnknown);
+    
+    rslt->sz = initSize;
+    
+    rslt->base = mmap(0, initSize * elemSize, PROT_READ | PROT_WRITE, MAP_SHARED, rslt->fd, 0);
+    if (rslt->base == MAP_FAILED)
+        return RC(rcApp, rcMemMap, rcCreating, rcMemory, rcInsufficient);
+    
+    return 0;
+}
+
+static rc_t KTempMMapWhack(KTempMMap *self)
+{
+    close(self->fd);
+    madvise(self->base, self->sz, MADV_DONTNEED);
+    munmap(self->base, self->sz);
+    return 0;
+}
+
+static void *KTempMMapPointer(KTempMMap *self, size_t offset, size_t count)
+{
+    void *temp;
+    size_t newsz;
+    
+    if (offset + count <= self->sz)
+        return &((uint8_t *)self->base)[offset * self->elemsize];
+
+    newsz = self->sz;
+    while (newsz < offset + count)
+        newsz <<= 1;
+    
+    if (ftruncate(self->fd, newsz * self->elemsize) != 0)
+        return NULL;
+
+    temp = mmap(0, newsz * self->elemsize, PROT_READ | PROT_WRITE, MAP_SHARED, self->fd, 0);
+    if (temp == MAP_FAILED)
+        return NULL;
+    
+    munmap(self->base, self->sz);
+    self->base = temp;
+    self->sz = newsz;
+    
+    return &((uint8_t *)self->base)[offset * self->elemsize];
+}
+
+typedef struct key_t {
+    uint8_t len;
+    char key[255];
+} my_key_t;
+
+struct KVPFile {
+    HashTable *ht;
+    size_t next_obj;
+    KTempMMap keys;
+    KTempMMap values;
+};
+
+typedef struct KVPValueImpl KVPValueImpl;
+struct KVPValueImpl
+{
+    KVPFile * file;
+    size_t offset;
+    size_t size;
+};
+
+static int KeyComp(const void *id, const void *key, uint32_t len, void *ctx)
+{
+    KVPFile *self = ctx;
+    const my_key_t *test = KTempMMapPointer(&self->keys, (intptr_t)id, 1);
+    int r = memcmp(test->key, key, test->len < len ? test->len : len);
+    if (r == 0)
+        r = test->len - len;
+    return r;
+}
+
+rc_t KVPFileMake(KVPFile **rslt,
+                 KFile *file,
+                 size_t climit,
+                 size_t kchunk_size, size_t vchunk_size,
+                 size_t min_ksize, size_t max_ksize,
+                 size_t min_vsize, size_t max_vsize,
+                 KVPFileCompareFunc cmp
+                 )
+{
+    rc_t rc;
+    KVPFile *self = calloc(1, sizeof(*self));
+    
+    if (self == NULL)
+        return RC(rcApp, rcMemMap, rcAllocating, rcMemory, rcExhausted);
+    
+    rc = KTempMMapMake(&self->keys, 256, sizeof(my_key_t));
+    if (rc == 0) {
+        rc = KTempMMapMake(&self->values, 256, max_vsize);
+        if (rc == 0) {
+            rc = HashTableMake(&self->ht, 256, KeyComp, self);
+            if (rc == 0) {
+                *rslt = self;
+                return 0;
+            }
+            KTempMMapWhack(&self->values);
+        }
+        KTempMMapWhack(&self->keys);
+    }
+    free(self);
+    return rc;
+}
+
+rc_t KVPFileWhack(KVPFile *self, bool commit)
+{
+    if (self) {
+        KTempMMapWhack(&self->values);
+        KTempMMapWhack(&self->keys);
+        HashTableWhack(self->ht, 0, 0);
+        free(self);
+    }
+    return 0;
+}
+
+rc_t KVPFileFind(const KVPFile *self, KVPValue *xval, const void *key, size_t ksize)
+{
+    KVPValueImpl *val = ( KVPValueImpl* ) xval;
+    const HashTableIterator iter = HashTableLookup(self->ht, key, ksize);
+    if (HashTableIteratorHasValue(&iter)) {
+        val->file = (void *)self;
+        val->offset = (intptr_t)HashTableIteratorGetValue(&iter);
+        val->size = 1;
+        return 0;
+    }
+    return RC(rcApp, rcMemMap, rcReading, rcId, rcNotFound);
+}
+
+rc_t KVPFileFindOrInsert(KVPFile *self, KVPValue *xval,
+                         bool *was_inserted, size_t alloc_size,
+                         const void *key, size_t ksize
+                         )
+{
+    KVPValueImpl *val = ( KVPValueImpl* ) xval;
+    HashTableIterator iter = HashTableLookup(self->ht, key, ksize);
+    
+    if (HashTableIteratorHasValue(&iter)) {
+        val->file = (void *)self;
+        val->offset = (intptr_t)HashTableIteratorGetValue(&iter);
+        val->size = 1;
+        *was_inserted = false;
+        return 0;
+    }
+    else {
+        size_t new_id = self->next_obj++;
+        my_key_t *new_key = KTempMMapPointer(&self->keys, new_id, 1);
+        
+        new_key->len = ksize;
+        memcpy(new_key->key, key, ksize);
+        
+        *was_inserted = true;
+        val->file = (void *)self;
+        val->offset = new_id;
+        val->size = 1;
+        HashTableIteratorSetValue(&iter, (void *)(val->offset));
+    }
+    return 0;
+}
+
+static rc_t KVPValueAccess(const KVPValueImpl *value, void **mem, size_t *bytes)
+{
+    KVPFile *self = value->file;
+    void *temp = KTempMMapPointer(&self->values, value->offset, value->size);
+    
+    if (temp != NULL) {
+        *bytes = self->values.elemsize * value->size;
+        *mem = temp;
+        return 0;
+    }
+    *bytes = 0;
+    *mem = NULL;
+    return RC(rcApp, rcMemMap, rcReading, rcMemory, rcNotFound);
+}
+
+rc_t KVPValueAccessRead(const KVPValue *self, const void **mem, size_t *bytes)
+{
+    return KVPValueAccess((const KVPValueImpl*)self, (void **)mem, bytes);
+}
+
+rc_t KVPValueAccessUpdate(KVPValue *self, void **mem, size_t *bytes)
+{
+    return KVPValueAccess((KVPValueImpl*)self, mem, bytes);
+}
+
+void KVPValueWhack(KVPValue *self)
+{
+}
+
+#endif /* USE_KDB_BTREE */
diff --git a/tools/bam-loader/KVPFile.h b/tools/bam-loader/KVPFile.h
new file mode 100644
index 0000000..01de157
--- /dev/null
+++ b/tools/bam-loader/KVPFile.h
@@ -0,0 +1,164 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_KVPFile_
+#define _h_KVPFile_
+
+#ifndef _h_kdb_btree_
+#include <kdb/btree.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* this can be made to work as we go forward
+ */
+typedef struct KVPFile KVPFile;
+
+
+/* generic comparison function
+ *  size_t indicates bytes
+ */
+typedef KBTreeCompareFunc KVPFileCompareFunc;
+
+
+/* going to make an index with:                                                                        
+ *  a) backing file                                                                                     
+ *  b) page size is fixed at 32K, otherwise the page size would have to be stored somewhere             
+ *  c) page cache - need cache limit in bytes                                                           
+ *  d) 2 chunked value streams - need key chunking and value chunking                                   
+ *  e) B-Tree-ish index, requiring a comparison function. this interface uses opaque keys.              
+ *     the "matched-count" parameter is useful for trie traversal, but this will be built-in            
+ *                                                                                                      
+ *  "rslt" [ OUT ] - return of Ken's object                                                             
+ *                                                                                                      
+ *  "file" [ IN ] - open file with read/write permissions.                                              
+ *   NB - a reference will be attached to this file, so you still own it                                
+ *                                                                                                      
+ *  "climit" [ IN ] - cache limit in bytes. the internal page cache will                                
+ *   retain UP TO ( but not exceeding ) the limit specified. for 32K pages,                             
+ *   this means than the byte values 0..0x7FFF will result in NO CACHE.                                 
+ *   internally, this limit is converted to a page count by simple division,                            
+ *   i.e. cpage-limit = climit / PGSIZE.                                                                
+ *                                                                                                      
+ *  "kchunk_size" [ IN ] and "vchunk_size" [ IN ] - the "chunking" ( alignment )                        
+ *   factor for storing keys and values, respectively. rounded up to the nearest                        
+ *   power of 2 that will hold the bytes specified.                                                     
+ *                                                                                                      
+ *  "min_ksize" [ IN ] and "max_ksize" [ IN ] - specifies the allowed key sizes. if                     
+ *   unknown, a min of 1 and a max of ~ ( size_t ) 0 will allow for any size. if fixed,                 
+ *   min_ksize == max_ksize will indicate this, and the size will be used exactly as                    
+ *   chunking factor ( see "kchunk_size" above ).                                                       
+ *                                                                                                      
+ *  "min_vsize" [ IN ] and "max_vsize" [ IN ] - specifies allowed value sizes. see above.               
+ *                                                                                                      
+ *  "cmp" [ IN ] - comparison callback function for opaque keys. later, we'll want to                   
+ *   make use of key type knowledge to improve traversal ( callbacks are expensive ), but               
+ *   for now, we can treat them as opaque.                                                              
+ */
+rc_t KVPFileMake ( KVPFile **rslt, struct KFile *file, size_t climit,
+                  size_t kchunk_size, size_t vchunk_size,
+                  size_t min_ksize, size_t max_ksize, size_t min_vsize, size_t max_vsize,
+                  KVPFileCompareFunc cmp );
+
+
+
+/* this whacker works fine
+ *
+ * "commit" [ IN ] - if false, tells the underlying pagefile
+ *  to forget its backing before whacking the cache.
+ */
+rc_t KVPFileWhack ( KVPFile *self, bool commit );
+
+
+/* results point directly into pages, and thus require a reference
+ * I'm going to invent a structure to use and some functions - the
+ * structure itself may change, but we should be able to make it work
+ *
+ * it will be an defined structure, although it may be defined simply as
+ * an array of 3 size_t to make it opaque. if it were made an allocation,
+ * then we'd have to have a special allocator in order to keep the noise
+ * down. maybe that's the way to go, but it means more code. for now,...
+ */
+typedef struct KBTreeValue KVPValue;
+
+
+/* whacker */
+void KVPValueWhack ( KVPValue *self );
+
+/* return the pointer to thingie */
+rc_t KVPValueAccessRead ( const KVPValue *self, const void **mem, size_t *bytes );
+rc_t KVPValueAccessUpdate ( KVPValue *self, void **mem, size_t *bytes );
+
+
+/* find will not modify the index in any way
+ *  returns a pointer into a page, meaning that the values cannot exceed 32K in size
+ *  this is done
+ *
+ *  "val" [ OUT ] - pointer to an uninitialized block that will contain
+ *   information on how to access data within a page. note that the value
+ *   is "live", and if accessed for update will cause the page to be modified.
+ *   it is not clear whether this is desired or side-effect behavior, so I'm
+ *   leaving it alone for now.
+ *
+ *  "key" [ IN ] and "ksize" [ IN ] - opaque key description
+ */
+rc_t KVPFileFind ( const KVPFile *self, KVPValue *val, const void *key, size_t ksize );
+
+
+
+/* find or insert will return an existing or create a new entry
+ * note that the new entry is initially zeroed
+ *
+ *  "val" [ OUT ] - pointer to uninitialized block that will contain value data.
+ *   since the intention is to modify the value, access to val will most certainly
+ *   be via "KVPValueAccessUpdate" which will dirty the page regardless.
+ *
+ *  "was_inserted" [ OUT ] - if true, the returned value was the result of an
+ *   insertion and can be guaranteed to be all 0 bits. otherwise, the returned
+ *   value will be whatever was there previously.
+ *
+ *  "alloc_size" [ IN ] - the number of value bytes to allocate upon insertion,
+ *   i.e. if the key was not found. this value must agree with the limits specified
+ *   in Make.
+ *
+ *  "key" [ IN ] and "ksize" [ IN ] - opaque key description
+ */
+rc_t KVPFileFindOrInsert ( KVPFile *self, KVPValue *val,
+                          bool *was_inserted, size_t alloc_size,
+                          const void *key, size_t ksize );
+
+rc_t KVPFileForEach ( const KVPFile *self,
+    void ( CC * f )( const void *key, size_t ksize, KVPValue *val, void *ctx ),
+    void *ctx);
+    
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _h_KVPFile_ */
diff --git a/tools/bam-loader/Makefile b/tools/bam-loader/Makefile
new file mode 100644
index 0000000..deb525a
--- /dev/null
+++ b/tools/bam-loader/Makefile
@@ -0,0 +1,111 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/bam-loader
+
+INT_TOOLS = \
+	samview
+
+EXT_TOOLS = \
+	bam-load 
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+ifeq (win,$(OS))
+all std:
+	@ echo "not building bam-load under Windows"
+else
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+endif
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# bam-load
+#
+BAMLOAD_SRC = \
+	bam-loader \
+	bam \
+	alignment-writer \
+	reference-writer \
+	sequence-writer \
+	loader-imp \
+	mem-bank \
+	low-match-count
+
+BAMLOAD_OBJ = \
+	$(addsuffix .$(OBJX),$(BAMLOAD_SRC))
+
+BAMLOAD_LIB = \
+	-lkapp \
+	-stk-version \
+	-lload \
+	-sncbi-wvdb \
+	-lm
+
+$(BINDIR)/bam-load: $(BAMLOAD_OBJ)
+	$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(BAMLOAD_LIB)
+
+
+#-------------------------------------------------------------------------------
+# samview
+#
+SAMVIEW_SRC = \
+	bam \
+	samview
+
+SAMVIEW_OBJ = \
+	$(addsuffix .$(OBJX),$(SAMVIEW_SRC))
+
+SAMVIEW_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lm
+
+$(BINDIR)/samview: $(SAMVIEW_OBJ)
+	$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(SAMVIEW_LIB)
+
diff --git a/tools/bam-loader/alignment-writer.c b/tools/bam-loader/alignment-writer.c
new file mode 100644
index 0000000..6e93b7f
--- /dev/null
+++ b/tools/bam-loader/alignment-writer.c
@@ -0,0 +1,267 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <sysalloc.h>
+#include <klib/out.h>
+
+#include <vdb/vdb-priv.h>
+
+#include "alignment-writer.h"
+#include "Globals.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+enum e_tables {
+    tblPrimary,
+    tblSecondary,
+    tblN
+};
+
+struct s_alignment {
+    VDatabase *db;
+    TableWriterAlgn const *tbl[tblN];
+    int64_t rowId;
+    int st;
+};
+
+Alignment *AlignmentMake(VDatabase *db) {
+    Alignment *self = calloc(1, sizeof(*self));
+    
+    if (self) {
+        self->db = db;
+        VDatabaseAddRef(self->db);
+    }
+    return self;
+}
+
+static rc_t SetColumnDefaults(TableWriterAlgn const *tbl)
+{
+    return 0;
+}
+
+static rc_t WritePrimaryRecord(Alignment *const self, AlignmentRecord *const data)
+{
+    if (self->tbl[tblPrimary] == NULL) {
+        rc_t rc = TableWriterAlgn_Make(&self->tbl[tblPrimary], self->db,
+                                       ewalgn_tabletype_PrimaryAlignment,
+                                       ewalgn_co_TMP_KEY_ID + 
+                                       (G.expectUnsorted ? ewalgn_co_unsorted : 0));
+        if (rc)
+            return rc;
+        rc = SetColumnDefaults(self->tbl[tblPrimary]);
+        if (rc)
+            return rc;
+    }
+    return TableWriterAlgn_Write(self->tbl[tblPrimary], &data->data, &data->alignId);
+}
+
+static rc_t WriteSecondaryRecord(Alignment *const self, AlignmentRecord *const data)
+{
+    if (self->tbl[tblSecondary] == NULL) {
+        rc_t rc = TableWriterAlgn_Make(&self->tbl[tblSecondary], self->db,
+                                       ewalgn_tabletype_SecondaryAlignment,
+                                       ewalgn_co_TMP_KEY_ID + 
+                                       (G.expectUnsorted ? ewalgn_co_unsorted : 0));
+        if (rc)
+            return rc;
+        rc = SetColumnDefaults(self->tbl[tblSecondary]);
+        if (rc)
+            return rc;
+    }
+#if 1
+    /* try to make consistent with cg-load */
+    if (data->mate_ref_pos == 0) {
+        data->data.mate_ref_orientation.elements = 0;
+    }
+#endif
+    return TableWriterAlgn_Write(self->tbl[tblSecondary], &data->data, &data->alignId);
+}
+
+rc_t AlignmentWriteRecord(Alignment *const self, AlignmentRecord *const data)
+{
+    return data->isPrimary ? WritePrimaryRecord(self, data) : WriteSecondaryRecord(self, data);
+}
+
+rc_t AlignmentStartUpdatingSpotIds(Alignment *const self)
+{
+    return 0;
+}
+
+rc_t AlignmentGetSpotKey(Alignment *const self, uint64_t * keyId)
+{
+    rc_t rc;
+    
+    switch (self->st) {
+    case 0:
+        if (self->tbl[tblPrimary]) {
+            rc = TableWriterAlgn_TmpKeyStart(self->tbl[tblPrimary]);
+            if (rc)
+                break;
+        }
+        self->rowId = 0;
+        ++self->st;
+    case 1:
+        if (self->tbl[tblPrimary]) {
+            rc = TableWriterAlgn_TmpKey(self->tbl[tblPrimary], ++self->rowId, keyId);
+            if (rc == 0)
+                break;
+            ++self->st;
+            if (GetRCState(rc) != rcNotFound || GetRCObject(rc) != rcRow || self->tbl[tblSecondary] == NULL)
+                break;
+        }
+        else
+            ++self->st;
+    case 2:
+        rc = TableWriterAlgn_TmpKeyStart(self->tbl[tblSecondary]);
+        if (rc)
+            break;
+        self->rowId = 0;
+        ++self->st;
+    case 3:
+        rc = TableWriterAlgn_TmpKey(self->tbl[tblSecondary], ++self->rowId, keyId);
+        if (rc == 0)
+            break;
+        if (GetRCState(rc) != rcNotFound || GetRCObject(rc) != rcRow)
+            break;
+        ++self->st;
+        break;
+    default:
+        rc = RC(rcAlign, rcTable, rcUpdating, rcError, rcIgnored);
+        break;
+    }
+    return rc;
+}
+
+rc_t AlignmentWriteSpotId(Alignment * const self, int64_t const spotId)
+{
+    switch (self->st) {
+    case 1:
+        return TableWriterAlgn_Write_SpotId(self->tbl[tblPrimary], self->rowId, spotId);
+    case 3:
+        return TableWriterAlgn_Write_SpotId(self->tbl[tblSecondary], self->rowId, spotId);
+    default:
+        return RC(rcAlign, rcTable, rcUpdating, rcSelf, rcInconsistent);
+    }
+}
+
+rc_t AlignmentWhack(Alignment * const self, bool const commit) 
+{
+    rc_t const rc = self->tbl[tblPrimary] ? TableWriterAlgn_Whack(self->tbl[tblPrimary], commit, NULL) : 0;
+    rc_t const rc2 = self->tbl[tblSecondary] ? TableWriterAlgn_Whack(self->tbl[tblSecondary], commit | (rc == 0), NULL) : 0;
+
+    VDatabaseRelease(self->db);
+    free(self);
+    return rc ? rc : rc2;
+}
+
+static size_t LayoutStorage(void *const buffer, unsigned const readlen,
+                            void const **const p_ref_offset,
+                            void const **const p_ref_offset_type,
+                            void const **const p_mismatch,
+                            void const **const p_has_ref_offset,
+                            void const **const p_has_mismatch
+                            )
+{
+    int32_t *const ref_offset = buffer;
+    uint8_t *const ref_offset_type = (uint8_t *)&ref_offset[readlen];
+    char *const mismatch = (char *)&ref_offset_type[readlen];
+    bool *const has_ref_offset = (bool *)&mismatch[readlen];
+    bool *const has_mismatch   = (bool *)&has_ref_offset[readlen];
+    void *const endp = &has_mismatch[readlen];
+
+    if (p_ref_offset     ) *p_ref_offset      = ref_offset;
+    if (p_ref_offset_type) *p_ref_offset_type = ref_offset_type;
+    if (p_mismatch       ) *p_mismatch        = mismatch;
+    if (p_has_ref_offset ) *p_has_ref_offset  = has_ref_offset;
+    if (p_has_mismatch   ) *p_has_mismatch    = has_mismatch;
+    
+    return (char const *)endp - (char const *)buffer;
+}
+
+rc_t AlignmentRecordInit(AlignmentRecord *const self, unsigned const readlen)
+{
+    KDataBuffer buffer = self->buffer;
+
+    buffer.elem_bits = 8;
+    {
+        size_t const need = LayoutStorage(0, readlen, 0, 0, 0, 0, 0);
+        rc_t const rc = KDataBufferResize(&buffer, need);
+        if (rc) return rc;
+    }
+    memset(self, 0, sizeof(*self));
+    self->buffer = buffer;
+    
+    self->data.seq_read_id.buffer = &self->read_id;
+    self->data.seq_read_id.elements = 1;
+    self->data.ref_id.buffer = &self->ref_id;
+    self->data.ref_id.elements = 1;
+    if (G.expectUnsorted) {
+        self->data.ref_start.buffer = &self->ref_start;
+        self->data.ref_start.elements = 1;
+    }
+    else {
+        self->data.global_ref_start.buffer = &self->global_ref_start;
+        self->data.global_ref_start.elements = 1;
+    }
+    self->data.ref_orientation.buffer = &self->ref_orientation;
+    self->data.ref_orientation.elements = 1;
+    self->data.mapq.buffer = &self->mapq;
+    self->data.mapq.elements = 1;
+    self->data.tmp_key_id.buffer = &self->tmp_key_id;
+    self->data.tmp_key_id.elements = 1;
+    
+    self->data.read_start.buffer = &self->read_start;
+    self->data.read_start.elements = 1;
+    self->data.read_len.buffer = &self->read_len;
+    self->data.read_len.elements = 1;
+    
+    self->data.mate_ref_orientation.buffer = &self->mate_ref_orientation;
+    self->data.mate_ref_orientation.elements = 1;
+    self->data.mate_ref_id.buffer = &self->mate_ref_id;
+    self->data.mate_ref_id.elements = 1;
+    self->data.mate_ref_pos.buffer = &self->mate_ref_pos;
+    self->data.mate_ref_pos.elements = 1;
+    self->data.mate_align_id.buffer = &self->mate_align_id;
+    self->data.mate_align_id.elements = 1;
+    self->data.template_len.buffer = &self->template_len;
+    self->data.template_len.elements = 1;
+
+    LayoutStorage(buffer.base, readlen,
+                  &self->data.ref_offset.buffer,
+                  &self->data.ref_offset_type.buffer,
+                  &self->data.mismatch.buffer,
+                  &self->data.has_ref_offset.buffer,
+                  &self->data.has_mismatch.buffer);
+
+    self->data.has_mismatch.elements = readlen;
+    self->data.has_ref_offset.elements = readlen;
+    
+    return 0;
+}
diff --git a/tools/bam-loader/alignment-writer.h b/tools/bam-loader/alignment-writer.h
new file mode 100644
index 0000000..bdbfcfa
--- /dev/null
+++ b/tools/bam-loader/alignment-writer.h
@@ -0,0 +1,101 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef BAM_LOAD_ALIGNMENT_WRITER_H_
+#define BAM_LOAD_ALIGNMENT_WRITER_H_ 1
+
+#include <klib/data-buffer.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+
+#include <insdc/insdc.h>
+
+#include <align/writer-alignment.h>
+
+typedef struct s_alignment Alignment;
+typedef struct AlignmentRecord AlignmentRecord;
+
+struct AlignmentRecord {
+    KDataBuffer buffer;
+    TableWriterAlgnData data;
+    int64_t alignId;
+    bool isPrimary;
+
+    INSDC_coord_one read_id;
+    int64_t ref_id;
+    INSDC_coord_zero ref_start;
+    uint64_t global_ref_start;
+    bool ref_orientation;
+    uint32_t mapq;
+    uint64_t tmp_key_id;
+
+    INSDC_coord_zero read_start;
+    INSDC_coord_len read_len;
+
+    bool mate_ref_orientation;
+    int64_t mate_ref_id;
+    INSDC_coord_zero mate_ref_pos;
+    int64_t mate_align_id;
+    int32_t template_len;
+};
+
+#define AR_REF_ID(X) ((X).ref_id)
+#define AR_REF_START(X) ((X).global_ref_start)
+#define AR_REF_LEN(X) ((X).ref_len)
+#define AR_REF_ORIENT(X) ((X).ref_orientation)
+#define AR_READNO(X) ((X).read_id)
+#define AR_MAPQ(X) ((X).mapq)
+#define AR_KEY(X) ((X).tmp_key_id)
+
+#define AR_BASECOUNT(X) ((X).data.has_mismatch.elements)
+#define AR_HAS_MISMATCH(X) ((bool *)((X).data.has_mismatch.buffer))
+#define AR_HAS_OFFSET(X) ((bool *)((X).data.has_ref_offset.buffer))
+
+#define AR_NUM_MISMATCH(X) ((X).data.mismatch.elements)
+#define AR_MISMATCH(X) ((char *)((X).data.mismatch.buffer))
+
+#define AR_NUM_OFFSET(X) ((X).data.ref_offset.elements)
+#define AR_OFFSET(X) ((INSDC_coord_zero *)((X).data.ref_offset.buffer))
+#define AR_OFFSET_TYPE(X) ((uint8_t *)((X).data.ref_offset_type.buffer))
+
+#define AR_LINKAGE_GROUP(X) ((X).data.linkageGroup)
+
+Alignment *AlignmentMake(VDatabase *db);
+
+rc_t AlignmentWriteRecord(Alignment *self, AlignmentRecord *data);
+
+rc_t AlignmentStartUpdatingSpotIds(Alignment *self);
+
+rc_t AlignmentGetSpotKey(Alignment *self, uint64_t *keyId);
+
+rc_t AlignmentWriteSpotId(Alignment *self, int64_t spotId);
+
+rc_t AlignmentWhack(Alignment *self, bool commit);
+
+rc_t AlignmentRecordInit(AlignmentRecord *self, unsigned readlen);
+
+#endif
diff --git a/tools/bam-loader/analysis.c b/tools/bam-loader/analysis.c
new file mode 100644
index 0000000..cccc329
--- /dev/null
+++ b/tools/bam-loader/analysis.c
@@ -0,0 +1,157 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <klib/rc.h>
+#include <klib/data-buffer.h>
+#include <klib/sort.h>
+
+#include "KFileHelper.h"
+#include "analysis.h"
+#include "Globals.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+static rc_t ParseAnalysis(Analysis *rslt, unsigned lines, char *src) {
+    unsigned i;
+    
+    rslt->N = lines;
+    memset(&rslt->line[0], 0, lines * sizeof(rslt->line[0]));
+    
+    for (i = 0; i != lines; ++i) {
+        char *endp;
+        char *tab;
+        
+        endp = strchr(src, 0);
+        assert(endp);
+        
+        rslt->line[i].name = src;
+        tab = strchr(src, '\t');
+        if (!tab) break;
+        src = tab + 1;
+        tab[0] = '\0';
+        
+        rslt->line[i].refID = src;
+        tab = strchr(src, '\t');
+        if (!tab) break;
+        src = tab + 1;
+        tab[0] = '\0';
+        
+        tab = strchr(src, '\t');
+        if (!tab) break;
+        src = tab + 1;
+        
+        rslt->line[i].bamFile = src;
+        tab = strchr(src, '\t');
+        if (!tab) break;
+        src = tab + 1;
+        tab[0] = '\0';
+        
+        rslt->line[i].asoFile = src;
+        tab = strchr(src, '\t');
+        if (!tab) break;
+        tab[0] = '\0';
+        
+        src = endp + 1;
+    }
+    for (i = 0; i != lines; ++i) {
+        if (rslt->line[i].name == NULL ||
+            rslt->line[i].refID == NULL ||
+            rslt->line[i].bamFile == NULL ||
+            rslt->line[i].asoFile == NULL
+            )
+        {
+            return RC(rcApp, rcFile, rcReading, rcData, rcCorrupt);
+        }
+    }
+    return 0;
+}
+
+static int CC CompAnalysisLineBamFile(const void *A, const void *B, void *ignore) {
+    const AnalysisLine *a = A;
+    const AnalysisLine *b = B;
+    int rslt = strcmp(a->bamFile, b->bamFile);
+    
+    if (rslt == 0)
+        rslt = strcmp(a->name, b->name);
+    return rslt;
+}
+
+const char *AnalysisNextBAMFile(const char *last) {
+    unsigned i;
+    if (last == NULL) {
+        return G.analysis->line[0].bamFile;
+    }
+    for (i = 1; i < G.analysis->N; ++i) {
+        if (strcmp(last, G.analysis->line[i].bamFile) > 0) {
+            return G.analysis->line[i].bamFile;
+        }
+    }
+    return NULL;
+}
+
+AnalysisLine *AnalysisMatch(const char *bamFile, const char *name) {
+    unsigned i;
+    
+    for (i = 0; i != G.analysis->N; ++i) {
+        if (strcmp(bamFile, G.analysis->line[i].bamFile) == 0 &&
+            strcmp(name, G.analysis->line[i].name) == 0
+            )
+        {
+            return &G.analysis->line[i];
+        }
+    }
+    return NULL;
+}
+
+rc_t LoadAnalysis(const char *fileName) {
+    rc_t rc;
+    KDataBuffer buf;
+    uint64_t lines;
+    
+    memset(&buf, 0, sizeof(buf));
+    buf.elem_bits = 8;
+    
+    rc = LoadFile(&buf, &lines, G.inDir, fileName);
+    if (rc == 0) {
+        if (lines > 0 && buf.elem_count > 0) {
+            G.analysis = malloc(sizeof(*G.analysis) + (lines - 1) * sizeof(G.analysis->line[0]) + buf.elem_count);
+            if (G.analysis)
+                memcpy(&G.analysis->line[lines], buf.base, buf.elem_count);
+            else
+                rc = RC(rcApp, rcFile, rcReading, rcMemory, rcExhausted);
+        }
+        else
+            rc = RC(rcApp, rcFile, rcReading, rcData, rcEmpty);
+    }
+    KDataBufferWhack(&buf);
+    if (rc == 0) {
+        rc = ParseAnalysis(G.analysis, lines, (char *)&G.analysis->line[lines]);
+    }
+    return rc;
+}
+
diff --git a/tools/bam-loader/analysis.h b/tools/bam-loader/analysis.h
new file mode 100644
index 0000000..766a652
--- /dev/null
+++ b/tools/bam-loader/analysis.h
@@ -0,0 +1,49 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef BAM_LOAD_ANALYSIS_H_
+#define BAM_LOAD_ANALYSIS_H_ 1
+#include <klib/rc.h>
+
+typedef struct s_analysis_line {
+    const char *name;
+    const char *refID;
+    const char *bamFile;
+    const char *asoFile;
+    uint64_t    startPos;
+} AnalysisLine;
+
+typedef struct s_analysis {
+    unsigned N;
+    AnalysisLine line[1];
+} Analysis;
+
+const char *AnalysisNextBAMFile(const char *last);
+
+AnalysisLine *AnalysisMatch(const char *bamFile, const char *name);
+
+rc_t LoadAnalysis(const char *fileName);
+#endif
diff --git a/tools/bam-loader/bam-alignment.h b/tools/bam-loader/bam-alignment.h
new file mode 100644
index 0000000..14aae6d
--- /dev/null
+++ b/tools/bam-loader/bam-alignment.h
@@ -0,0 +1,74 @@
+/* ===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+struct bam_alignment_s {
+    uint8_t rID[4];
+    uint8_t pos[4];
+    uint8_t read_name_len;
+    uint8_t mapQual;
+    uint8_t bin[2];
+    uint8_t n_cigars[2];
+    uint8_t flags[2];
+    uint8_t read_len[4];
+    uint8_t mate_rID[4];
+    uint8_t mate_pos[4];
+    uint8_t ins_size[4];
+    char read_name[1 /* read_name_len */];
+/* if you change length of read_name,
+ * adjust calculation of offsets in BAM_AlignmentSetOffsets */
+/*  uint32_t cigar[n_cigars];
+ *  uint8_t seq[(read_len + 1) / 2];
+ *  uint8_t qual[read_len];
+ *  uint8_t extra[...];
+ */
+};
+
+typedef union bam_alignment_u {
+    struct bam_alignment_s cooked;
+    uint8_t raw[sizeof(struct bam_alignment_s)];
+} bam_alignment;
+
+struct offset_size_s {
+    unsigned offset;
+    unsigned size; /* this is the total length of the tag; length of data is size - 3 */
+};
+
+struct BAM_Alignment {
+    struct BAM_File *parent;
+    bam_alignment const *data;
+    uint8_t *storage;
+
+	uint64_t keyId;
+	bool wasInserted;
+
+    unsigned datasize;
+    unsigned cigar;
+    unsigned seq;
+    unsigned qual;
+    unsigned numExtra;
+    unsigned hasColor;
+    struct offset_size_s extra[1];
+};
diff --git a/tools/bam-loader/bam-loader.c b/tools/bam-loader/bam-loader.c
new file mode 100644
index 0000000..ee9188c
--- /dev/null
+++ b/tools/bam-loader/bam-loader.c
@@ -0,0 +1,1270 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/text.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <klib/rc.h>
+#include <klib/printf.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kapp/log-xml.h>
+#include <align/writer-refseq.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+#include <limits.h>
+
+#include "Globals.h"
+#include "loader-imp.h"
+
+/*: ARGS
+Summary:
+	Load a BAM formatted data file
+
+Usage:
+    --help                          display this text and quit
+    --version                       display the version string and quit
+    [global-options] [options] <file...> [ --remap [options] <file>... ]...
+
+//:global-options
+Global Options:
+
+* options effecting logging
+  log-level <level>                 logging level values: [fatal|sys|int|err|warn|info|0-5] default: info
+  xml-log <filename>                produce an XML-formatted log file
+
+* options effecting performance optimisation
+  tmpfs <directory>                 where to store temparary files, default: '/tmp'
+  cache-size <mbytes>               the limit in MB for temparary files
+
+* options effecting error limits
+  max-err-count <number>            the maximum number of errors to ignore
+  max-warning-dup-flag <count>      the limit for number of duplicate flag mismatch warnings
+
+//:options
+Options:
+  output <name>                     name of the output, required
+  config <file>                     reference configuration file (See Configuration)
+  header <file>                     file containing the SAM header
+  remap                             special option to enable processing sets of remapped files. remap MUST be given between each set, all regular options can be respecified, in fact the output must be unique for each set. This is for when a set of reads are aligned multiple times, for example against different reference builds or with different aligners. This mode ensures that spot ids are the same across the several outputs.
+
+Debugging Options:
+  only-verify                       exit after verifying existence of references
+  max-rec-count <number>            exit after processing this many records (per file)
+  nomatch-log <path>                log alignments with no matching bases
+
+Filtering Options:
+  minimum-match <number>            minimum number of matches for an alignment
+  no-secondary                      ignore alignments marked as secondary
+  accept-dups                       accept spots with inconsistent PCR duplicate flags
+  accept-nomatch                    accept alignments with no matching bases
+  ref-config                        limit processing to references in the config file, ignoring all others
+  ref-filter <name>                 limit processing to the given reference, ignoring all others
+  min-mapq <number>                 filter secondary alignments by minimum mapping quality
+
+Rare or Esoteric Options:
+  input <directory>                 where to find fasta files
+  ref-file <file>                   fasta file with references
+  unsorted                          expect unsorted input (requires more memory)
+  sorted                            require sorted input
+  TI                                look for trace id optional tag
+  unaligned <file>                  file without aligned reads
+
+Deprecated Options:
+  use-OQ                            use OQ option column for quality values instead of QUAL
+  no-verify                         skip verify existence of references from the BAM file
+  accept-hard-clip                  allow hard clipping in CIGAR
+  allow-multi-map                   allow the same reference to be mapped to multiple names in the input files
+  edit-aligned-qual <number>        convert quality at aligned positions to this value
+  cs                                turn on awareness of colorspace
+  qual-quant                        quality scores quantization level
+  keep-mismatch-qual                don't quantized quality at mismatched positions
+
+
+Example:
+    bam-load -o /tmp/SRZ123456 -k analysis.bam.cfg 123456.bam
+*/
+
+/* MARK: Arguments and Usage */
+static char const option_input[] = "input";
+static char const option_output[] = "output";
+static char const option_tmpfs[] = "tmpfs";
+static char const option_config[] = "config";
+static char const option_min_mapq[] = "min-mapq";
+static char const option_qual_compress[] = "qual-quant";
+static char const option_cache_size[] = "cache-size";
+static char const option_unsorted[] = "unsorted";
+static char const option_sorted[] = "sorted";
+static char const option_max_err_count[] = "max-err-count";
+static char const option_max_rec_count[] = "max-rec-count";
+static char const option_no_verify[] = "no-verify";
+static char const option_only_verify[] = "only-verify";
+static char const option_use_qual[] = "use-QUAL";
+static char const option_ref_filter[] = "ref-filter";
+static char const option_ref_config[] = "ref-config";
+static char const option_edit_aligned_qual[] = "edit-aligned-qual";
+static char const option_unaligned[] = "unaligned";
+static char const option_accept_dup[] = "accept-dups";
+static char const option_accept_nomatch[] = "accept-nomatch";
+static char const option_nomatch_log[] = "nomatch-log";
+static char const option_keep_mismatch_qual[] = "keep-mismatch-qual";
+static char const option_min_match[] = "minimum-match";
+static char const option_header[] = "header";
+static char const option_no_cs[] = "no-cs";
+static char const option_no_secondary[] = "no-secondary";
+static char const option_ref_file[] = "ref-file";
+static char const option_TI[] = "TI";
+static char const option_max_warn_dup_flag[] = "max-warning-dup-flag";
+static char const option_accept_hard_clip[] = "accept-hard-clip";
+static char const option_allow_multi_map[] = "allow-multi-map";
+static char const option_allow_secondary[] = "make-spots-with-secondary";
+static char const option_defer_secondary[] = "defer-secondary";
+
+#define OPTION_INPUT option_input
+#define OPTION_OUTPUT option_output
+#define OPTION_TMPFS option_tmpfs
+#define OPTION_CONFIG option_config
+#define OPTION_MINMAPQ option_min_mapq
+#define OPTION_QCOMP option_qual_compress
+#define OPTION_CACHE_SIZE option_cache_size
+#define OPTION_MAX_ERR_COUNT option_max_err_count
+#define OPTION_MAX_REC_COUNT option_max_rec_count
+#define OPTION_UNALIGNED option_unaligned
+#define OPTION_ACCEPT_DUP option_accept_dup
+#define OPTION_ACCEPT_NOMATCH option_accept_nomatch
+#define OPTION_NOMATCH_LOG option_nomatch_log
+#define OPTION_MIN_MATCH option_min_match
+#define OPTION_HEADER option_header
+#define OPTION_NO_CS option_no_cs
+#define OPTION_NO_SECONDARY option_no_secondary
+#define OPTION_REF_FILE option_ref_file
+#define OPTION_TI option_TI
+#define OPTION_MAX_WARN_DUP_FLAG option_max_warn_dup_flag
+#define OPTION_ACCEPT_HARD_CLIP option_accept_hard_clip
+#define OPTION_ALLOW_MULTI_MAP option_allow_multi_map
+#define OPTION_ALLOW_SECONDARY option_allow_secondary
+#define OPTION_DEFER_SECONDARY option_defer_secondary
+
+#define ALIAS_INPUT  "i"
+#define ALIAS_OUTPUT "o"
+#define ALIAS_TMPFS "t"
+#define ALIAS_CONFIG "k"
+#define ALIAS_MINMAPQ "q"
+#define ALIAS_QCOMP "Q"
+#define ALIAS_MAX_ERR_COUNT "E"
+#define ALIAS_UNALIGNED "u"
+#define ALIAS_ACCEPT_DUP "d"
+#define ALIAS_NO_SECONDARY "P"
+#define ALIAS_REF_FILE "r"
+
+static
+char const * input_usage[] = 
+{
+    "Path where to get fasta files from.",
+    NULL
+};
+
+static
+char const * output_usage[] = 
+{
+    "Path and Name of the output database.",
+    NULL
+};
+
+static
+char const * tmpfs_usage[] = 
+{
+    "Path to be used for scratch files.",
+    NULL
+};
+
+static
+char const * config_usage[] = 
+{
+    "Path to configuration file:",
+    "maps the input BAM file's reference names to the equivalent GenBank accession.",
+    "It is a tab-delimited text file with unix line endings (\\n - LF) with the following fields in this order:",
+    "#1 reference name as it occurs in the BAM file's SN field of @SQ header record;",
+    "#2 INSDC reference ID",
+    NULL
+};
+
+static
+char const * min_mapq_usage[] = 
+{
+    "Filter secondary alignments by minimum mapping quality.",
+    NULL
+};
+
+static
+char const * qcomp_usage[] = 
+{
+    "Quality scores quantization level, can be a number (0: none, 1: 2bit, 2: 1bit), or a string like '1:10,10:20,20:30,30:-' (which is equivalent to 1) (nb. the endpoint is exclusive).",
+    NULL
+};
+
+static
+char const * unsorted_usage[] = 
+{
+    "Tell the loader to expect unsorted input (requires more memory)",
+    NULL
+};
+
+static
+char const * sorted_usage[] =
+{
+    "Tell the loader to require sorted input",
+    NULL
+};
+
+static
+char const * cache_size_usage[] = 
+{
+    "Set the cache size in MB for the temporary indices",
+    NULL
+};
+
+static
+char const * mrc_usage[] = 
+{
+    "Set the maximum number of records to process from the BAM file",
+    NULL
+};
+
+static
+char const * mec_usage[] = 
+{
+    "Set the maximum number of errors to ignore from the BAM file",
+    NULL
+};
+
+static
+char const * no_verify_usage[] = 
+{
+    "Skip verify existence of references from the BAM file",
+    NULL
+};
+
+static
+char const * only_verify_usage[] = 
+{
+    "Exit after verifying existence of references from the BAM file",
+    NULL
+};
+
+static
+char const * use_QUAL_usage[] = 
+{
+    "use QUAL column for quality values (default is to use OQ if it is available)",
+    NULL
+};
+
+static
+char const * use_ref_filter[] = 
+{
+    "Only process alignments to the given reference",
+    NULL
+};
+
+static
+char const * use_ref_config[] = 
+{
+    "Only process alignments to references in the config file",
+    NULL
+};
+
+static
+char const * use_edit_aligned_qual[] = 
+{
+    "Convert quality at aligned positions to this value",
+    NULL
+};
+
+static
+char const * use_keep_mismatch_qual[] = 
+{
+    "Don't quantized quality at mismatched positions",
+    NULL
+};
+
+static
+char const * use_unaligned[] = 
+{
+    "Specify file without aligned reads",
+    NULL
+};
+
+static
+char const * use_accept_dups[] = 
+{
+    "Accept spots inconsistent PCR duplicate flags",
+    NULL
+};
+
+static
+char const * use_accept_nomatch[] = 
+{
+    "Accept alignments with no matching bases",
+    NULL
+};
+
+static
+char const * use_nomatch_log[] = 
+{
+    "Where to write info for alignments with no matching bases",
+    NULL
+};
+
+static
+char const * use_min_match[] = 
+{
+    "minimum number of matches for an alignment",
+    NULL
+};
+
+static
+char const * use_header[] = 
+{
+    "path to a file containing the SAM header to store in the resulting cSRA, recommended in case of multiple input BAMs",
+    NULL
+};
+
+static
+char const * use_no_cs[] = 
+{
+    "turn off awareness of colorspace",
+    NULL
+};
+
+static
+char const * use_no_secondary[] = 
+{
+    "ignore alignments marked as secondary",
+    NULL
+};
+
+static
+char const * use_ref_file[] = 
+{
+    "path to a fasta file with references",
+    NULL
+};
+
+static
+char const * use_TI[] = 
+{
+    "for trace alignments",
+    NULL
+};
+
+static
+char const * use_max_dup_warnings[] = 
+{
+    "set limit for number of duplicate flag mismatch warnings",
+    NULL
+};
+
+static
+char const * use_accept_hard_clip[] = 
+{
+    "accept hard clipping in CIGAR",
+    NULL
+};
+
+static
+char const * use_allow_multi_map[] =
+{
+    "allow the same reference to be mapped to multiple names in the input files",
+    "(default is disallow, old behaviors was to allow it)",
+    NULL
+};
+
+static
+char const * use_allow_secondary[] =
+{
+    "use secondary alignments for constructing spots",
+    NULL
+};
+
+static
+char const * use_defer_secondary[] =
+{
+    "defer processing of secondary alignments until the end of the file",
+    NULL
+};
+
+OptDef Options[] = 
+{
+    /* order here is same as in param array below!!! */
+    { OPTION_INPUT, ALIAS_INPUT,  NULL,  input_usage, 1, true,  false },
+    { OPTION_OUTPUT, ALIAS_OUTPUT, NULL, output_usage, 1, true,  true },
+    { OPTION_CONFIG, ALIAS_CONFIG,  NULL,  config_usage, 1, true, false },
+    { OPTION_HEADER, NULL, NULL, use_header, 1, true, false },
+    { OPTION_TMPFS, ALIAS_TMPFS, NULL, tmpfs_usage, 1, true,  false },
+    { OPTION_UNALIGNED, ALIAS_UNALIGNED, NULL, use_unaligned, 256, true, false },
+    { OPTION_ACCEPT_DUP, ALIAS_ACCEPT_DUP, NULL, use_accept_dups, 1, false, false },
+    { OPTION_ACCEPT_NOMATCH, NULL, NULL, use_accept_nomatch, 1, false, false },
+    { OPTION_NOMATCH_LOG, NULL, NULL, use_nomatch_log, 1, true, false },
+    { OPTION_QCOMP, ALIAS_QCOMP, NULL, qcomp_usage, 1, true,  false },
+    { OPTION_MINMAPQ, ALIAS_MINMAPQ, NULL, min_mapq_usage, 1, true,  false },
+    { OPTION_CACHE_SIZE, NULL, NULL, cache_size_usage, 1, true,  false },
+    { OPTION_NO_CS, NULL, NULL, use_no_cs, 1, false,  false },
+    { OPTION_MIN_MATCH, NULL, NULL, use_min_match, 1, true, false },
+    { OPTION_NO_SECONDARY, ALIAS_NO_SECONDARY, NULL, use_no_secondary, 1, false, false },
+    { option_unsorted, NULL, NULL, unsorted_usage, 1, false,  false },
+    { option_sorted, NULL, NULL, sorted_usage, 1, false,  false },
+    { option_no_verify, NULL, NULL, no_verify_usage, 1, false,  false },
+    { option_only_verify, NULL, NULL, only_verify_usage, 1, false,  false },
+    { option_use_qual, NULL, NULL, use_QUAL_usage, 1, false,  false },
+    { option_ref_config, NULL, NULL, use_ref_config, 1, false,  false },
+    { option_ref_filter, NULL, NULL, use_ref_filter, 1, true,  false },
+    { option_edit_aligned_qual, NULL, NULL, use_edit_aligned_qual, 1, true, false },
+    { option_keep_mismatch_qual, NULL, NULL, use_keep_mismatch_qual, 1, false,  false },
+    { OPTION_MAX_REC_COUNT, NULL, NULL, mrc_usage, 1, true,  false },
+    { OPTION_MAX_ERR_COUNT, ALIAS_MAX_ERR_COUNT, NULL, mec_usage, 1, true,  false },
+    { OPTION_REF_FILE, ALIAS_REF_FILE, NULL, use_ref_file, 0, true, false },
+    { OPTION_TI, NULL, NULL, use_TI, 1, false, false },
+    { OPTION_MAX_WARN_DUP_FLAG, NULL, NULL, use_max_dup_warnings, 1, true, false },
+    { OPTION_ACCEPT_HARD_CLIP, NULL, NULL, use_accept_hard_clip, 1, false, false },
+    { OPTION_ALLOW_MULTI_MAP, NULL, NULL, use_allow_multi_map, 1, false, false },
+    { OPTION_ALLOW_SECONDARY, NULL, NULL, use_allow_secondary, 1, false, false },
+    { OPTION_DEFER_SECONDARY, NULL, NULL, use_defer_secondary, 1, false, false }
+};
+
+const char* OptHelpParam[] =
+{
+    /* order here is same as in OptDef array above!!! */
+    "path",				/* input */
+    "path",				/* output */
+    "path-to-file",		/* config */
+    "path-to-file",		/* header */
+    "path",				/* tmpfs */
+    "path-to-file",		/* unaligned */
+    NULL,				/* accept dups */
+    NULL,				/* accept no-match */
+    "path-to-file",		/* no-match log */
+    "level",			/* quality compression */
+    "phred-score",		/* min. mapq */
+    "mbytes",			/* cache size */
+    NULL,				/* no colorspace */
+    "count",			/* min. match count */
+    NULL,				/* no secondary */
+    NULL,				/* unsorted */
+    NULL,				/* sorted */
+    NULL,				/* no verify ref's */
+    NULL,				/* quit after verify ref's */
+    NULL,				/* force QUAL */
+    NULL,				/* ref's from config */
+    "name",				/* only this ref */
+    "new-value",		/* value for aligned qualities */
+    NULL,				/* no quantize mismatch qualities */
+    "number",			/* max. record count to process */
+    "number",			/* max. error count */
+    "path-to-file",		/* reference fasta file */
+    NULL,				/* use XT->TI */
+    "count",			/* max. duplicate warning count */
+    NULL,				/* allow hard clipping */
+    NULL,				/* allow multimapping */
+    NULL,				/* allow secondary */
+    NULL				/* defer secondary */
+};
+
+rc_t UsageSummary (char const * progname)
+{
+    return KOutMsg (
+        "Usage:\n"
+        "\t%s [options] <bam-file>\n"
+        "\n"
+        "Summary:\n"
+        "\tLoad a BAM formatted data file\n"
+        "\n"
+        "Example:\n"
+        "\t%s -o /tmp/SRZ123456 -k analysis.bam.cfg 123456.bam\n"
+        "\n"
+        ,progname, progname);
+}
+
+char const UsageDefaultName[] = "bam-load";
+
+rc_t CC Usage (const Args * args)
+{
+    rc_t rc;
+    int i;
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    const size_t argsQty = sizeof(Options) / sizeof(Options[0]);
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary (progname);
+
+    for(i = 0; i < argsQty; i++ ) {
+        if( Options[i].required && Options[i].help[0] != NULL ) {
+            HelpOptionLine(Options[i].aliases, Options[i].name, OptHelpParam[i], Options[i].help);
+        }
+    }
+    OUTMSG(("\nOptions:\n"));
+    for(i = 0; i < argsQty; i++ ) {
+        if( !Options[i].required && Options[i].help[0] != NULL ) {
+            HelpOptionLine(Options[i].aliases, Options[i].name, OptHelpParam[i], Options[i].help);
+        }
+    }
+    XMLLogger_Usage();
+    OUTMSG(("\n"));
+    HelpOptionsStandard ();
+    HelpVersion (fullpath, KAppVersion());
+    return rc;
+}
+
+/* MARK: Definitions and Globals */
+
+#define SCHEMAFILE "align/align.vschema"
+
+Globals G;
+
+#ifdef _WIN32
+#include <process.h>
+#else
+#include <unistd.h>
+#endif
+static void set_pid(void)
+{
+    G.pid = getpid();
+}
+
+static rc_t PathWithBasePath(char rslt[], size_t sz, char const path[], char const base[])
+{
+    size_t const plen = strlen(path);
+    bool const hasBase = base && base[0];
+    bool const isBareName = strchr(path, '/') == NULL;
+    
+    if (isBareName && hasBase) {
+        if (string_printf(rslt, sz, NULL, "%s/%s", base, path) == 0)
+            return 0;
+    }
+    else if (plen < sz) {
+        strncpy(rslt, path, sz);
+        return 0;
+    }
+    {
+        rc_t const rc = RC(rcApp, rcArgv, rcAccessing, rcBuffer, rcInsufficient);
+        (void)LOGERR(klogErr, rc, "The path to the file is too long");
+        return rc;
+    }
+}
+
+static rc_t OpenFile(KFile const **kf, char const path[], char const base[])
+{
+    char fname[4096];
+    rc_t rc = PathWithBasePath(fname, sizeof(fname), path, base);
+    
+    if (rc == 0) {
+        KDirectory *dir;
+        
+        rc = KDirectoryNativeDir(&dir);
+        if (rc == 0) {
+            rc = KDirectoryOpenFileRead(dir, kf, "%s", fname);
+            KDirectoryRelease(dir);
+        }
+    }
+    return rc;
+}
+
+static rc_t LoadHeader(char const **rslt, char const path[], char const base[])
+{
+    KFile const *kf;
+    rc_t rc = OpenFile(&kf, path, base);
+    
+    *rslt = NULL;
+    if (rc == 0) {
+        uint64_t fsize;
+        rc = KFileSize(kf, &fsize);
+        if (rc == 0) {
+            char *fdata = malloc(fsize+1);
+            
+            if (fdata) {
+                size_t nread;
+                rc = KFileRead(kf, 0, fdata, fsize, &nread);
+                if (rc == 0) {
+                    if (nread) {
+                        fdata[nread] = '\0';
+                        *rslt = fdata;
+                    }
+                    else {
+                        free(fdata);
+                        rc = RC(rcApp, rcArgv, rcAccessing, rcFile, rcEmpty);
+                        (void)PLOGERR(klogErr, (klogErr, rc, "File '$(file)' is empty", "file=%s", path));
+                    }
+                }
+                else {
+                    (void)PLOGERR(klogErr, (klogErr, rc, "Failed to read file '$(file)'", "file=%s", path));
+                }
+            }
+            else {
+                rc = RC(rcApp, rcArgv, rcAccessing, rcMemory, rcExhausted);
+                (void)PLOGERR(klogErr, (klogErr, rc, "Failed to read file '$(file)'", "file=%s", path));
+            }
+        }
+        KFileRelease(kf);
+    }
+    else {
+        (void)PLOGERR(klogErr, (klogErr, rc, "Failed to open file '$(file)'", "file=%s", path));
+    }
+    return rc;
+}
+
+static rc_t main_help_vers(int argc, char * argv[])
+{
+    Args *args = NULL;
+    rc_t const rc = ArgsMakeAndHandle (&args, argc, argv, 2, Options,
+        sizeof Options / sizeof (OptDef), XMLLogger_Args, XMLLogger_ArgsQty);
+    ArgsWhack(args);
+    return rc;
+}
+
+static rc_t getArgValue(Args *const args, char const *name, int index, char const **result)
+{
+    void const *value;
+    rc_t const rc = ArgsOptionValue(args, name, index, &value);
+    if (rc) return rc;
+    free((void *)*result);
+    *result = strdup(value);
+    assert(*result);
+    return 0;
+}
+
+static rc_t main_1(int argc, char *argv[], bool const continuing, unsigned const load)
+{
+    Args *args;
+    rc_t rc;
+    unsigned n_aligned = 0;
+    unsigned n_unalgnd = 0;
+    char *aligned[256];
+    char *unalgnd[256];
+    char *name_buffer = NULL;
+    unsigned next_name = 0;
+    unsigned nbsz = 0;
+    char const *value;
+    char *dummy;
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 1, Options, sizeof(Options)/sizeof(Options[0]));
+    while (rc == 0) {
+        uint32_t pcount;
+
+        rc = ArgsOptionCount(args, option_only_verify, &pcount);
+        if (rc)
+            break;
+        G.onlyVerifyReferences |= (pcount > 0);
+        
+        rc = ArgsOptionCount(args, option_no_verify, &pcount);
+        if (rc)
+            break;
+        G.noVerifyReferences |= (pcount > 0);
+        
+        rc = ArgsOptionCount(args, option_use_qual, &pcount);
+        if (rc)
+            break;
+        G.useQUAL |= (pcount > 0);
+        
+        rc = ArgsOptionCount(args, option_ref_config, &pcount);
+        if (rc)
+            break;
+        G.limit2config |= (pcount > 0);
+        
+        rc = ArgsOptionCount(args, OPTION_REF_FILE, &pcount);
+        if (rc)
+            break;
+        if (pcount && G.refFiles) {
+            int i;
+
+            for (i = 0; G.refFiles[i]; ++i)
+                free((void *)G.refFiles[i]);
+            free((void *)G.refFiles);
+        }
+        G.refFiles = calloc(pcount + 1, sizeof(*(G.refFiles)));
+        if (!G.refFiles) {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcMemory, rcExhausted);
+            break;
+        }
+        while(pcount-- > 0) {
+            rc = getArgValue(args, OPTION_REF_FILE, pcount, &G.refFiles[pcount]);
+            if (rc)
+                break;
+        }
+
+        rc = ArgsOptionCount (args, OPTION_TMPFS, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = getArgValue(args, OPTION_TMPFS, 0, &G.tmpfs);
+            if (rc)
+                break;
+        }
+        else if (pcount > 1)
+        {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcExcessive);
+            OUTMSG (("Single parameter required\n"));
+            MiniUsage (args);
+            break;
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_INPUT, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = getArgValue(args, OPTION_INPUT, 0, &G.inpath);
+            if (rc)
+                break;
+        }
+        else if (pcount > 1)
+        {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcExcessive);
+            OUTMSG (("Single input parameter required\n"));
+            MiniUsage (args);
+            break;
+        }
+        
+        rc = ArgsOptionCount (args, option_ref_filter, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = getArgValue(args, option_ref_filter, 0, &G.refFilter);
+            if (rc)
+                break;
+        }
+        else if (pcount > 1)
+        {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcExcessive);
+            OUTMSG (("Single parameter required\n"));
+            MiniUsage (args);
+            break;
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_CONFIG, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = getArgValue(args, OPTION_CONFIG, 0, &G.refXRefPath);
+            if (rc)
+                break;
+        }
+        else if (pcount > 1)
+        {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcExcessive);
+            OUTMSG (("Single input parameter required\n"));
+            MiniUsage (args);
+            break;
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_OUTPUT, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = getArgValue(args, OPTION_OUTPUT, 0, &G.outpath);
+            if (rc)
+                break;
+            if (load == 0) {
+                G.firstOut = strdup(G.outpath);
+            }
+            value = strrchr(G.outpath, '/');
+            G.outname = value ? (value + 1) : G.outpath;
+        }
+        else if (pcount > 1)
+        {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcExcessive);
+            OUTMSG (("Single output parameter required\n"));
+            MiniUsage (args);
+            break;
+        }
+        else if (!G.onlyVerifyReferences) {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcInsufficient);
+            OUTMSG (("Output parameter required\n"));
+            MiniUsage (args);
+            break;
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_MINMAPQ, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue(args, OPTION_MINMAPQ, 0, (const void **)&value);
+            if (rc)
+                break;
+            G.minMapQual = strtoul(value, &dummy, 0);
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_QCOMP, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = getArgValue(args, OPTION_QCOMP, 0, &G.QualQuantizer);
+            if (rc)
+                break;
+        }
+
+        rc = ArgsOptionCount (args, option_edit_aligned_qual, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue (args, option_edit_aligned_qual, 0, (const void **)&value);
+            if (rc)
+                break;
+            G.alignedQualValue = strtoul(value, &dummy, 0);
+            if (G.alignedQualValue == 0) {
+                rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcIncorrect);
+                OUTMSG (("edit-aligned-qual: bad value\n"));
+                MiniUsage (args);
+                break;
+            }
+            G.editAlignedQual = true;
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_CACHE_SIZE, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue (args, OPTION_CACHE_SIZE, 0, (const void **)&value);
+            if (rc)
+                break;
+            G.cache_size = strtoul(value, &dummy, 0) * 1024UL * 1024UL;
+            if (G.cache_size == 0) {
+                rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcIncorrect);
+                OUTMSG (("cache-size: bad value\n"));
+                MiniUsage (args);
+                break;
+            }
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_MAX_WARN_DUP_FLAG, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue (args, OPTION_MAX_WARN_DUP_FLAG, 0, (const void **)&value);
+            if (rc)
+                break;
+            G.maxWarnCount_DupConflict = strtoul(value, &dummy, 0);
+        }
+        
+        rc = ArgsOptionCount (args, option_unsorted, &pcount);
+        if (rc)
+            break;
+        G.expectUnsorted |= (pcount > 0);
+        
+        rc = ArgsOptionCount (args, option_sorted, &pcount);
+        if (rc)
+            break;
+        G.requireSorted |= (pcount > 0);
+        
+        rc = ArgsOptionCount (args, OPTION_MAX_REC_COUNT, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue (args, OPTION_MAX_REC_COUNT, 0, (const void **)&value);
+            if (rc)
+                break;
+            G.maxAlignCount = strtoul(value, &dummy, 0);
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_MAX_ERR_COUNT, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue (args, OPTION_MAX_ERR_COUNT, 0, (const void **)&value);
+            if (rc)
+                break;
+            G.maxErrCount = strtoul(value, &dummy, 0);
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_MIN_MATCH, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue (args, OPTION_MIN_MATCH, 0, (const void **)&value);
+            if (rc)
+                break;
+            G.minMatchCount = strtoul(value, &dummy, 0);
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_ACCEPT_DUP, &pcount);
+        if (rc)
+            break;
+        G.acceptBadDups |= (pcount > 0);
+        
+        rc = ArgsOptionCount (args, OPTION_ACCEPT_NOMATCH, &pcount);
+        if (rc)
+            break;
+        G.acceptNoMatch |= (pcount > 0);
+        
+        rc = ArgsOptionCount (args, option_keep_mismatch_qual, &pcount);
+        if (rc)
+            break;
+        G.keepMismatchQual |= (pcount > 0);
+        
+        rc = ArgsOptionCount (args, OPTION_NO_CS, &pcount);
+        if (rc)
+            break;
+        G.noColorSpace |= (pcount > 0);
+        
+        rc = ArgsOptionCount (args, OPTION_NO_SECONDARY, &pcount);
+        if (rc)
+            break;
+        G.noSecondary |= (pcount > 0);
+        
+        rc = ArgsOptionCount (args, OPTION_TI, &pcount);
+        if (rc)
+            break;
+        G.hasTI |= (pcount > 0);
+        
+        rc = ArgsOptionCount (args, OPTION_ACCEPT_HARD_CLIP, &pcount);
+        if (rc)
+            break;
+        G.acceptHardClip |= (pcount > 0);
+        
+        rc = ArgsOptionCount (args, OPTION_ALLOW_MULTI_MAP, &pcount);
+        if (rc)
+            break;
+        G.allowMultiMapping |= (pcount > 0);
+        
+        rc = ArgsOptionCount (args, OPTION_ALLOW_SECONDARY, &pcount);
+        if (rc)
+            break;
+        G.assembleWithSecondary |= (pcount > 0);
+        
+        rc = ArgsOptionCount (args, OPTION_DEFER_SECONDARY, &pcount);
+        if (rc)
+            break;
+        G.deferSecondary |= (pcount > 0);
+        
+        rc = ArgsOptionCount (args, OPTION_NOMATCH_LOG, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            KDirectory *dir;
+            
+            rc = ArgsOptionValue (args, OPTION_NOMATCH_LOG, 0, (const void **)&value);
+            if (rc) break;
+            rc = KDirectoryNativeDir(&dir);
+            if (rc) break;
+            rc = KDirectoryCreateFile(dir, &G.noMatchLog, 0, 0664, kcmInit, "%s", value);
+            KDirectoryRelease(dir);
+            if (rc) break;
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_HEADER, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1) {
+            rc = ArgsOptionValue (args, OPTION_HEADER, 0, (const void **)&value);
+            if (rc) break;
+            free((void *)G.headerText);
+            rc = LoadHeader(&G.headerText, value, G.inpath);
+            if (rc) break;
+        }
+        
+        rc = ArgsParamCount (args, &pcount);
+        if (rc) break;
+        if (pcount == 0)
+        {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcInsufficient);
+            MiniUsage (args);
+            break;
+        }
+        else if (pcount > sizeof(aligned)/sizeof(aligned[0])) {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcExcessive);
+            (void)PLOGERR(klogErr, (klogErr, rc, "$(count) input files is too many, $(max) is the limit",
+                        "count=%u,max=%u", (unsigned)pcount, (unsigned)(sizeof(aligned)/sizeof(aligned[0]))));
+            break;
+        }
+        else {
+            unsigned need = G.inpath ? (strlen(G.inpath) + 1) * pcount : 0;
+            unsigned i;
+            
+            for (i = 0; i < pcount; ++i) {
+                rc = ArgsParamValue(args, i, (const void **)&value);
+                if (rc) break;
+                need += strlen(value) + 1;
+            }
+            nbsz = need;
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_UNALIGNED, &pcount);
+        if (rc)
+            break;
+        if (pcount > 0)
+        {
+            unsigned need = G.inpath ? (strlen(G.inpath) + 1) * pcount : 0;
+            unsigned i;
+            
+            for (i = 0; i < pcount; ++i) {
+                rc = ArgsOptionValue(args, OPTION_UNALIGNED, i, (const void **)&value);
+                if (rc) break;
+                need += strlen(value) + 1;
+            }
+            if (rc) break;
+            nbsz += need;
+        }
+        
+        name_buffer = malloc(nbsz);
+        if (name_buffer == NULL) {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcMemory, rcExhausted);
+            break;
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_UNALIGNED, &pcount);
+        if (rc == 0) {
+            unsigned i;
+            
+            for (i = 0; i < pcount; ++i) {
+                rc = ArgsOptionValue(args, OPTION_UNALIGNED, i, (const void **)&value);
+                if (rc) break;
+                
+                unalgnd[n_unalgnd++] = name_buffer + next_name;
+                rc = PathWithBasePath(name_buffer + next_name, nbsz - next_name, value, G.inpath);
+                if (rc) break;
+                next_name += strlen(name_buffer + next_name) + 1;
+            }
+            if (rc) break;
+        }
+        else
+            break;
+        
+        rc = ArgsParamCount (args, &pcount);
+        if (rc == 0) {
+            unsigned i;
+            
+            for (i = 0; i < pcount; ++i) {
+                rc = ArgsParamValue(args, i, (const void **)&value);
+                if (rc) break;
+                
+                aligned[n_aligned++] = name_buffer + next_name;
+                rc = PathWithBasePath(name_buffer + next_name, nbsz - next_name, value, G.inpath);
+                if (rc) break;
+                next_name += strlen(name_buffer + next_name) + 1;
+            }
+        }
+        else
+            break;
+
+        rc = run(argv[0], n_aligned, (char const **)aligned, n_unalgnd, (char const **)unalgnd, continuing);
+        break;
+    }
+    free(name_buffer);
+
+    if (rc) {
+        (void)PLOGERR(klogErr, (klogErr, rc, "load failed",
+                "severity=total,status=failure,accession=%s,errors=%u", G.outname, G.errCount));
+    } else {
+        (void)PLOGMSG(klogInfo, (klogInfo, "loaded",
+                "severity=total,status=success,accession=%s,errors=%u", G.outname, G.errCount));
+    }
+    ArgsWhack(args);
+    return rc;
+}
+
+static void cleanupGlobal(void)
+{
+    if (G.refFiles) {
+        int i;
+
+        for (i = 0; G.refFiles[i]; ++i)
+            free((void *)G.refFiles[i]);
+        free((void *)G.refFiles);
+    }
+    free((void *)G.tmpfs);
+    free((void *)G.inpath);
+    free((void *)G.refFilter);
+    free((void *)G.refXRefPath);
+    free((void *)G.outpath);
+    free((void *)G.firstOut);
+    free((void *)G.headerText);
+    free((void *)G.QualQuantizer);
+    free((void *)G.schemaPath);
+}
+
+static int find_arg(char const *const *const query, int const first, int const argc, char **const argv)
+{
+    int i;
+
+    for (i = first; i < argc; ++i) {
+        int j;
+
+        for (j = 0; query[j] != NULL; ++j) {
+            if (strcmp(argv[i], query[j]) == 0)
+                return i;
+        }
+    }
+    return 0;
+}
+
+static bool has_arg(char const *const *const query, int const argc, char **const argv)
+{
+    return find_arg(query, 1, argc, argv) > 0;
+}
+
+static const char *logger_options[] = { "--xml-log-fd", "--xml-log", "-z" };
+static XMLLogger const *make_logger(int *argc, char *argv[])
+{
+    XMLLogger const *rslt = NULL;
+    char *argf[4];
+    int i;
+
+    argf[0] = argv[0];
+    argf[1] = NULL;
+    argf[2] = NULL;
+    argf[3] = NULL;
+
+    for (i = 1; i < *argc; ++i) {
+        int remove = 0;
+
+        if (strcmp(argv[i], logger_options[2]) == 0) {
+            argf[1] = argv[i];
+            argf[2] = argv[i + 1];
+            remove = 2;
+        }
+        else {
+            int j;
+
+            for (j = 0; j < 2; ++j) {
+                if (strstr(argv[i], logger_options[j]) == argv[i]) {
+                    int const n = strlen(logger_options[j]);
+
+                    if (argv[i][n] == '\0') {
+                        argf[1] = argv[i];
+                        argf[2] = argv[i + 1];
+                        remove = 2;
+                    }
+                    else if (argv[i][n] == '=') {
+                        argv[i][n] = '\0';
+                        argf[1] = argv[i];
+                        argf[2] = argv[i] + n + 1;
+                        remove = 1;
+                    }
+                    break;
+                }
+            }
+        }
+        if (argf[1] != NULL) {
+            Args *args = NULL;
+
+            ArgsMakeAndHandle(&args, 3, argf, 1, XMLLogger_Args, XMLLogger_ArgsQty);
+            if (args) {
+                XMLLogger_Make(&rslt, NULL, args);
+                ArgsWhack(args);
+            }
+        }
+        if (remove) {
+            *argc -= remove;
+            memmove(argv + i, argv + i + remove, (*argc + 1) * sizeof(argv[0]));
+            break;
+        }
+    }
+    return rslt;
+}
+
+rc_t CC KMain(int argc, char *argv[])
+{
+    static const char *help[] = { "--help", "-h", "-?", NULL };
+    static const char *vers[] = { "--version", "-V", NULL };
+
+    bool const has_help = has_arg(help, argc, argv);
+    bool const has_vers = has_arg(vers, argc, argv);
+    XMLLogger const *logger = NULL;
+    int argfirst = 0;
+    int arglast = 0;
+    rc_t rc = 0;
+    unsigned load = 0;
+
+    if (has_help) {
+        argc = 2;
+        argv[1] = "--help";
+        return main_help_vers(argc, argv);
+    }
+    if (has_vers) {
+        argc = 2;
+        argv[1] = "--vers";
+        return main_help_vers(argc, argv);
+    }
+
+    logger = make_logger(&argc, argv);
+
+    memset(&G, 0, sizeof(G));
+    G.mode = mode_Archive;
+    G.globalMode = mode_Archive;
+    G.maxSeqLen = TableWriterRefSeq_MAX_SEQ_LEN;
+    G.schemaPath = strdup(SCHEMAFILE);
+    G.omit_aligned_reads = true;
+    G.omit_reference_reads = true;
+    G.minMapQual = 0; /* accept all */
+    G.tmpfs = strdup("/tmp");
+    G.cache_size = ((size_t)16) << 30;
+    G.maxErrCount = 1000;
+    G.minMatchCount = 10;
+    
+    set_pid();
+
+    for (arglast = 1; arglast < argc; ++arglast) {
+        if (strcmp(argv[arglast], "--remap") == 0) {
+            argv[arglast] = argv[0];
+            G.globalMode = mode_Remap;
+            rc = main_1(arglast - argfirst, argv + argfirst, true, load);
+            if (rc)
+                break;
+            G.mode = mode_Remap;
+            argfirst = arglast;
+            ++load;
+        }
+    }
+    rc = main_1(arglast - argfirst, argv + argfirst, false, load);
+    XMLLogger_Release(logger);
+    cleanupGlobal();
+    return rc;
+}
diff --git a/tools/bam-loader/bam-priv.h b/tools/bam-loader/bam-priv.h
new file mode 100644
index 0000000..c10eda3
--- /dev/null
+++ b/tools/bam-loader/bam-priv.h
@@ -0,0 +1,196 @@
+/* ===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "bam.h"
+#include "bam-alignment.h"
+
+typedef struct BAMIndex BAMIndex;
+typedef struct BufferedFile BufferedFile;
+typedef struct SAMFile SAMFile;
+typedef struct BGZFile BGZFile;
+
+#define ZLIB_BLOCK_SIZE  (64u * 1024u)
+#define RGLR_BUFFER_SIZE (16u * ZLIB_BLOCK_SIZE)
+#define PIPE_BUFFER_SIZE (4096u)
+
+typedef uint8_t zlib_block_t[ZLIB_BLOCK_SIZE];
+
+typedef struct RawFile_vt_s {
+    rc_t (*FileRead)(void *, zlib_block_t, unsigned *);
+    uint64_t (*FileGetPos)(void const *);
+    float (*FileProPos)(void const *);
+    uint64_t (*FileGetSize)(void const *);
+    rc_t (*FileSetPos)(void *, uint64_t);
+    void (*FileWhack)(void *);
+} RawFile_vt;
+
+/* MARK: SAMFile */
+
+struct BufferedFile {
+    KFile const *kf;
+    void *buf;
+    uint64_t fmax;      /* file size if known or 0 */
+    uint64_t fpos;      /* position in file of first byte in buffer */
+    size_t bpos;        /* position in buffer of read head */
+    size_t bmax;        /* number of valid bytes in buffer */
+    size_t size;        /* maximum number of that can be read into buffer */
+};
+
+struct SAMFile {
+    BufferedFile file;
+    int putback;
+    rc_t last;
+};
+
+struct BGZFile {
+    BufferedFile file;
+    z_stream zs;
+};
+
+struct BAM_File {
+    union {
+        BGZFile bam;
+        SAMFile sam;
+    } file;
+    RawFile_vt vt;
+
+    KFile *defer;
+    
+    BAMRefSeq *refSeq;          /* pointers into headerData1 except name points into headerData2 */ 
+    BAMReadGroup *readGroup;    /* pointers into headerData1 */
+    char const *version;
+    char const *header;
+    void *headerData1;          /* gets used for refSeq and readGroup */
+    void *headerData2;          /* gets used for refSeq */
+    BAM_Alignment *nocopy;       /* used to hold current record for BAM_FileRead2 */
+
+    uint64_t fpos_cur;
+    uint64_t deferPos;
+    
+    unsigned refSeqs;
+    unsigned readGroups;
+    unsigned bufSize;           /* current size of uncompressed buffer */
+    unsigned bufCurrent;        /* location in uncompressed buffer of read head */
+    bool eof;
+    bool isSAM;
+    zlib_block_t buffer;        /* uncompressed buffer */
+};
+
+#define CG_NUM_SEGS 4
+
+#ifdef __GNUC__
+static inline int getRefSeqId(BAM_Alignment const *) __attribute__((always_inline));
+static inline int getPosition(BAM_Alignment const *) __attribute__((always_inline));
+static inline int getReadNameLength(BAM_Alignment const *) __attribute__((always_inline));
+static inline int getBin(BAM_Alignment const *) __attribute__((always_inline));
+static inline int getMapQual(BAM_Alignment const *) __attribute__((always_inline));
+static inline int getCigarCount(BAM_Alignment const *) __attribute__((always_inline));
+static inline int getFlags(BAM_Alignment const *) __attribute__((always_inline));
+static inline unsigned getReadLen(BAM_Alignment const *) __attribute__((always_inline));
+static inline int getMateRefSeqId(BAM_Alignment const *) __attribute__((always_inline));
+static inline int getMatePos(BAM_Alignment const *) __attribute__((always_inline));
+static inline int getInsertSize(BAM_Alignment const *) __attribute__((always_inline));
+static inline char const *getReadName(BAM_Alignment const *) __attribute__((always_inline));
+static inline void const *getCigarBase(BAM_Alignment const *) __attribute__((always_inline));
+static inline uint16_t LE2HUI16(void const *) __attribute__((always_inline));
+static inline uint32_t LE2HUI32(void const *) __attribute__((always_inline));
+static inline uint64_t LE2HUI64(void const *) __attribute__((always_inline));
+static inline  int16_t  LE2HI16(void const *) __attribute__((always_inline));
+static inline  int32_t  LE2HI32(void const *) __attribute__((always_inline));
+static inline  int64_t  LE2HI64(void const *) __attribute__((always_inline));
+#endif /* __GNUC__ */
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+static inline uint16_t LE2HUI16(void const *X) { uint16_t y; memcpy(&y, X, sizeof(y)); return y; }
+static inline uint32_t LE2HUI32(void const *X) { uint32_t y; memcpy(&y, X, sizeof(y)); return y; }
+static inline uint64_t LE2HUI64(void const *X) { uint64_t y; memcpy(&y, X, sizeof(y)); return y; }
+static inline  int16_t  LE2HI16(void const *X) {  int16_t y; memcpy(&y, X, sizeof(y)); return y; }
+static inline  int32_t  LE2HI32(void const *X) {  int32_t y; memcpy(&y, X, sizeof(y)); return y; }
+static inline  int64_t  LE2HI64(void const *X) {  int64_t y; memcpy(&y, X, sizeof(y)); return y; }
+#endif
+#if __BYTE_ORDER == __BIG_ENDIAN
+static inline uint16_t LE2HUI16(void const *X) { uint16_t y; memcpy(&y, X, sizeof(y)); return (uint16_t)bswap_16(y); }
+static inline uint32_t LE2HUI32(void const *X) { uint32_t y; memcpy(&y, X, sizeof(y)); return (uint32_t)bswap_32(y); }
+static inline uint64_t LE2HUI64(void const *X) { uint64_t y; memcpy(&y, X, sizeof(y)); return (uint64_t)bswap_64(y); }
+static inline  int16_t  LE2HI16(void const *X) {  int16_t y; memcpy(&y, X, sizeof(y)); return ( int16_t)bswap_16(y); }
+static inline  int32_t  LE2HI32(void const *X) {  int32_t y; memcpy(&y, X, sizeof(y)); return ( int32_t)bswap_32(y); }
+static inline  int64_t  LE2HI64(void const *X) {  int64_t y; memcpy(&y, X, sizeof(y)); return ( int64_t)bswap_64(y); }
+#endif
+
+static inline int getRefSeqId(BAM_Alignment const *const self) {
+    return LE2HI32(self->data->cooked.rID);
+}
+
+static inline int getPosition(BAM_Alignment const *const self) {
+    return LE2HI32(self->data->cooked.pos);
+}
+
+static inline int getReadNameLength(BAM_Alignment const *const self) {
+    return self->data->cooked.read_name_len;
+}
+
+static inline int getBin(BAM_Alignment const *const self) {
+    return LE2HUI16(self->data->cooked.bin);
+}
+
+static inline int getMapQual(BAM_Alignment const *const self) {
+    return self->data->cooked.mapQual;
+}
+
+static inline int getCigarCount(BAM_Alignment const *const self) {
+    return LE2HUI16(self->data->cooked.n_cigars);
+}
+
+static inline int getFlags(BAM_Alignment const *const self) {
+    return LE2HUI16(self->data->cooked.flags);
+}
+
+static inline unsigned getReadLen(BAM_Alignment const *const self) {
+    return LE2HUI32(self->data->cooked.read_len);
+}
+
+static inline int getMateRefSeqId(BAM_Alignment const *const self) {
+    return LE2HI32(self->data->cooked.mate_rID);
+}
+
+static inline int getMatePos(BAM_Alignment const *const self) {
+    return LE2HI32(self->data->cooked.mate_pos);
+}
+
+static inline int getInsertSize(BAM_Alignment const *const self) {
+    return LE2HI32(self->data->cooked.ins_size);
+}
+
+static inline char const *getReadName(BAM_Alignment const *const self) {
+    return &self->data->cooked.read_name[0];
+}
+
+static inline void const *getCigarBase(BAM_Alignment const *const self)
+{
+    return &self->data->raw[self->cigar];
+}
+
+static bool BAM_AlignmentShouldDefer(BAM_Alignment const *);
diff --git a/tools/bam-loader/bam-reader.c b/tools/bam-loader/bam-reader.c
new file mode 100644
index 0000000..ca397e9
--- /dev/null
+++ b/tools/bam-loader/bam-reader.c
@@ -0,0 +1,1104 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+ 
+typedef struct BamReaderFile    BamReaderFile;
+typedef struct BamRecord        BamRecord;
+typedef struct BamSequence      BamSequence;
+typedef struct BamAlignment     BamAlignment;
+typedef struct BamCGData        BamCGData;
+typedef struct BamReferenceInfo BamReferenceInfo;
+
+#define READERFILE_IMPL     BamReaderFile
+#define RECORD_IMPL         BamRecord
+#define SEQUENCE_IMPL       BamSequence
+#define ALIGNMENT_IMPL      BamAlignment
+#define CGDATA_IMPL         BamCGData
+#define REFERENCEINFO_IMPL  BamReferenceInfo
+
+#include "bam-reader.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include <loader/common-reader-priv.h>
+
+struct BamSequence
+{
+    Sequence    dadSeq;
+    Alignment   dadAlign;
+    CGData      dadCG;
+    KRefcount   refcount;
+    
+    const BAMAlignment* bam;    
+    uint16_t flags;
+};
+
+struct BamRecord
+{
+    Record  dad;
+
+    BamSequence seq;
+    Rejected*   rej; 
+};
+/*TODO: remove when done refactoring */
+const BAMAlignment *ToBamAlignment(const Record* record)
+{
+   assert(record);
+   return ((const BamRecord*)record)->seq.bam;
+}
+
+static rc_t BamSequenceInit(BamSequence* self);
+
+/*--------------------------------------------------------------------------
+ * BamRecord
+ */
+static rc_t BamRecordAddRef   ( const BamRecord* self );
+static rc_t BamRecordRelease  ( const BamRecord* self );
+static rc_t BamRecordGetSequence  ( const BamRecord* self, const Sequence** result);
+static rc_t BamRecordGetAlignment ( const BamRecord* self, const Alignment** result);
+static rc_t BamRecordGetRejected  ( const BamRecord* self, const Rejected** result);
+
+static Record_vt_v1 BamRecord_vt = 
+{
+    1, 0, 
+    /* start minor version == 0 */
+    BamRecordAddRef,
+    BamRecordRelease,
+    BamRecordGetSequence,
+    BamRecordGetAlignment,
+    BamRecordGetRejected,
+    /* end minor version == 0 */
+};
+
+static rc_t CC BamRecordInit ( BamRecord* self )
+{
+    assert(self);
+    self->dad.vt.v1 = & BamRecord_vt; 
+    self->rej = 0;
+    return BamSequenceInit(& self->seq);
+}
+
+static rc_t BamRecordWhack( const BamRecord* self )
+{
+    rc_t rc = 0;
+    assert(self);
+    
+    rc = BAMAlignmentRelease(self->seq.bam);
+
+    if (rc != 0)
+        RejectedRelease(self->rej);
+    else
+        rc = RejectedRelease(self->rej);
+
+    free ( (BamRecord*) self );
+    
+    return rc;
+}
+
+static rc_t BamRecordAddRef( const BamRecord* self )
+{
+    assert(self);
+    KRefcountAdd( & self->seq.refcount, "BamRecord" );
+    /* TODO: handle rc from KRefcountAdd */
+    return 0;
+}
+
+static rc_t BamRecordRelease( const BamRecord* cself )
+{
+    if ( cself != NULL )
+    {
+        BamRecord *self = ( BamRecord* ) cself;
+        switch ( KRefcountDrop ( & self ->seq.refcount, "BamRecord" ) )
+        {
+        case krefWhack:
+            BamRecordWhack( self );
+            break;
+        default:
+            /* TODO: handle other values */
+            break;
+        }
+    }
+    return 0;
+}
+
+static rc_t BamRecordGetSequence( const BamRecord* self, const Sequence** result )
+{
+    rc_t rc = 0;
+    assert(result);
+    rc = BamRecordAddRef(self);
+    if (rc == 0)
+        *result = (const Sequence*) & self->seq;
+    else
+        *result = 0;
+    return rc;
+}
+
+static rc_t BamRecordGetAlignment( const BamRecord* self, const Alignment** result)
+{
+    rc_t rc = 0;
+    assert(result);
+
+    /* do not allow access is flagged as unmapped*/
+    if ((self->seq.flags & BAMFlags_SelfIsUnmapped) != 0)
+        *result = 0;
+    else
+    {
+        rc = BamRecordAddRef(self);
+        if (rc == 0)
+            *result = (const Alignment*) & self->seq.dadAlign;
+        else
+            *result = 0;
+    }
+    return rc;
+}
+
+static rc_t BamRecordGetRejected( const BamRecord* self, const Rejected** result)
+{
+    rc_t rc = 0;
+    assert(result);
+    *result = 0;
+    if (self->rej != 0)
+    {
+        rc = RejectedAddRef(self->rej);
+        if (rc == 0)
+            *result = self->rej;
+    }
+    return rc;
+}
+
+/*--------------------------------------------------------------------------
+ * BamSequence forwards
+ */
+static rc_t BamSequenceAddRef                   ( const BamSequence* self );
+static rc_t BamSequenceRelease                  ( const BamSequence* self );
+static rc_t BamSequenceGetReadLength            ( const BamSequence *self, uint32_t *length );
+static rc_t BamSequenceGetRead                  ( const BamSequence *self, char *sequence );
+static rc_t BamSequenceGetRead2                 ( const BamSequence *self, char *sequence, uint32_t start, uint32_t stop );
+static rc_t BamSequenceGetQuality               ( const BamSequence *self, const int8_t **quality, uint8_t *offset, int *qualType );
+static rc_t BamSequenceGetSpotGroup             ( const BamSequence *self, const char **name, size_t *length );
+static rc_t BamSequenceGetSpotName              ( const BamSequence *self, const char **name, size_t *length );
+static bool BamSequenceIsColorSpace             ( const BamSequence *self );
+static rc_t BamSequenceGetCSKey                 ( const BamSequence *self, char cskey[1] );
+static rc_t BamSequenceGetCSReadLength          ( const BamSequence *self, uint32_t *length );
+static rc_t BamSequenceGetCSRead                ( const BamSequence *self, char *sequence );
+static rc_t BamSequenceGetCSQuality             ( const BamSequence *self, const int8_t **quality, uint8_t *offset, int *qualType );
+static bool BamSequenceRecordWasPaired          ( const BamSequence *self );
+static int  BamSequenceRecordOrientationSelf    ( const BamSequence *self );
+static int  BamSequenceRecordOrientationMate    ( const BamSequence *self );
+static bool BamSequenceRecordIsFirst            ( const BamSequence *self );
+static bool BamSequenceRecordIsSecond           ( const BamSequence *self );
+static bool BamSequenceRecordIsDuplicate        ( const BamSequence *self );
+static bool BamSequenceIsLowQuality             ( const BamSequence *self ); 
+static rc_t BamSequenceGetTI                    ( const BamSequence *self, uint64_t *ti );
+
+/*--------------------------------------------------------------------------
+ * BamCGData
+ */
+
+static rc_t BamCGDataAddRef         ( const BamCGData* self );
+static rc_t BamCGDataRelease        ( const BamCGData* self );
+static rc_t BamCGDataGetSeqQual     ( const BamCGData* self, char sequence[/* 35 */], uint8_t quality[/* 35 */] );
+static rc_t BamCGDataGetCigar       ( const BamCGData* self, uint32_t *cigar, uint32_t cig_max, uint32_t *cig_act );
+static rc_t BamCGDataGetAlignGroup  ( const BamCGData* self, char buffer[], size_t max_size, size_t *act_size );
+
+/* CGGetAlignGroup
+ */
+rc_t CC CGDataGetAlignGroup ( const CGData* self,
+                              char buffer[],
+                              size_t max_size,
+                              size_t *act_size );
+
+static CGData_vt_v1 BamCGData_vt = {
+    1, 0, 
+    /* start minor version == 0 */
+    BamCGDataAddRef,
+    BamCGDataRelease,
+    
+    BamCGDataGetSeqQual,
+    BamCGDataGetCigar,
+    BamCGDataGetAlignGroup
+    /* end minor version == 0 */
+};
+
+static const BamSequence*
+BamCGDataToSequence(const BamCGData* cg) 
+{
+    return ( const BamSequence * ) ( (uint8_t*)cg- offsetof ( BamSequence, dadCG) );
+}
+
+static rc_t BamCGDataAddRef  ( const BamCGData* self )
+{
+    return BamSequenceAddRef(BamCGDataToSequence(self));
+}
+
+static rc_t BamCGDataRelease ( const BamCGData* self )
+{
+    return BamSequenceRelease(BamCGDataToSequence(self));
+}
+
+static rc_t BamCGDataGetSeqQual ( const BamCGData* self, char sequence[/* 35 */], uint8_t quality[/* 35 */] )
+{
+    return BAMAlignmentGetCGSeqQual(BamCGDataToSequence(self)->bam, sequence, quality);
+}
+
+static rc_t BamCGDataGetCigar ( const BamCGData* self, uint32_t *cigar, uint32_t cig_max, uint32_t *cig_act )
+{
+    return BAMAlignmentGetCGCigar(BamCGDataToSequence(self)->bam, cigar, cig_max, cig_act);
+}
+
+static rc_t BamCGDataGetAlignGroup ( const BamCGData* self, char buffer[], size_t max_size, size_t *act_size )
+{
+    return BAMAlignmentGetCGAlignGroup(BamCGDataToSequence(self)->bam, buffer, max_size, act_size);
+}
+
+/*--------------------------------------------------------------------------
+ * BamAlignment
+ */
+
+static rc_t BamAlignmentAddRef  ( const BamAlignment* self );
+static rc_t BamAlignmentRelease ( const BamAlignment* self );
+
+static rc_t BamAlignmentGetRefSeqId         ( const BamAlignment *self, int32_t *refSeqId );
+static rc_t BamAlignmentGetMateRefSeqId     ( const BamAlignment *self, int32_t *refSeqId );
+static rc_t BamAlignmentGetPosition         ( const BamAlignment *self, int64_t *pos );
+static rc_t BamAlignmentGetMatePosition     ( const BamAlignment *self, int64_t *pos );
+static rc_t BamAlignmentGetMapQuality       ( const BamAlignment *self, uint8_t *qual );
+static rc_t BamAlignmentGetAlignmentDetail  ( const BamAlignment *self, AlignmentDetail *rslt, uint32_t count, uint32_t *actual, int32_t *firstMatch, int32_t *lastMatch );
+static rc_t BamAlignmentGetAlignOpCount     ( const BamAlignment *self, uint32_t *n );
+static rc_t BamAlignmentGetInsertSize       ( const BamAlignment *self, int64_t *size );
+static rc_t BamAlignmentGetCGData           ( const BamAlignment *self, const CGData** cg);
+static rc_t BamAlignmentGetBAMCigar         ( const BamAlignment *self, uint32_t const **rslt, uint32_t *length );
+static bool BamAlignmentIsSecondary         ( const BamAlignment *self );
+
+static Alignment_vt_v1 BamAlignment_vt = {
+    1, 0, 
+    /* start minor version == 0 */
+    BamAlignmentAddRef,
+    BamAlignmentRelease,
+    BamAlignmentGetRefSeqId,
+    BamAlignmentGetMateRefSeqId,
+    BamAlignmentGetPosition,
+    BamAlignmentGetMatePosition,
+    BamAlignmentGetMapQuality,
+    BamAlignmentGetAlignmentDetail,
+    BamAlignmentGetAlignOpCount,
+    BamAlignmentGetInsertSize,
+    BamAlignmentGetCGData,
+    BamAlignmentGetBAMCigar,
+    BamAlignmentIsSecondary,
+    /* end minor version == 0 */
+};
+
+static const BamSequence*
+BamAlignmentToSequence(const BamAlignment* align) 
+{
+    return ( const BamSequence * ) ( (uint8_t*)align - offsetof ( BamSequence, dadAlign ) );
+}
+
+static rc_t BamAlignmentAddRef  ( const BamAlignment* self )
+{
+    return BamSequenceAddRef(BamAlignmentToSequence(self));
+}
+
+static rc_t BamAlignmentRelease ( const BamAlignment* self )
+{
+    return BamSequenceRelease(BamAlignmentToSequence(self));
+}
+
+static rc_t BamAlignmentGetRefSeqId        ( const BamAlignment *self, int32_t *refSeqId )
+{
+    return BAMAlignmentGetRefSeqId(BamAlignmentToSequence(self)->bam, refSeqId);
+}
+
+static rc_t BamAlignmentGetMateRefSeqId    ( const BamAlignment *self, int32_t *refSeqId )
+{
+    return BAMAlignmentGetMateRefSeqId(BamAlignmentToSequence(self)->bam, refSeqId);
+}
+
+static rc_t BamAlignmentGetPosition        ( const BamAlignment *self, int64_t *pos )
+{
+    return BAMAlignmentGetPosition(BamAlignmentToSequence(self)->bam, pos);
+}
+
+static rc_t BamAlignmentGetMatePosition     ( const BamAlignment *self, int64_t *pos )
+{
+    return BAMAlignmentGetMatePosition(BamAlignmentToSequence(self)->bam, pos);
+}
+
+static rc_t BamAlignmentGetMapQuality      ( const BamAlignment *self, uint8_t *qual )
+{
+    return BAMAlignmentGetMapQuality(BamAlignmentToSequence(self)->bam, qual);
+}
+
+static rc_t BamAlignmentGetAlignmentDetail ( const BamAlignment *self, AlignmentDetail *rslt, uint32_t count, uint32_t *actual, int32_t *firstMatch, int32_t *lastMatch )
+{
+    return BAMAlignmentGetAlignmentDetail ( BamAlignmentToSequence(self)->bam, (BAMAlignmentDetail*)rslt, count, actual, firstMatch, lastMatch );
+}
+
+static rc_t BamAlignmentGetAlignOpCount    ( const BamAlignment *self, uint32_t *n )
+{
+    return BAMAlignmentGetCigarCount ( BamAlignmentToSequence(self)->bam, n );
+}
+
+static rc_t BamAlignmentGetInsertSize      ( const BamAlignment *self, int64_t *size )
+{
+    return BAMAlignmentGetInsertSize ( BamAlignmentToSequence(self)->bam, size );
+}
+
+static rc_t BamAlignmentGetCGData ( const BamAlignment *self, const CGData** cg)
+{
+    rc_t rc = 0;
+    if (BAMAlignmentHasCGData(BamAlignmentToSequence(self)->bam))
+    {
+        rc_t rc = BamAlignmentAddRef(self);
+        if (rc == 0)
+            *cg = (const CGData*) & BamAlignmentToSequence(self)->dadCG;
+        else
+            *cg = 0;
+    }
+    else
+        *cg = 0;
+    return rc;
+}
+
+static rc_t BamAlignmentGetBAMCigar        ( const BamAlignment *self, uint32_t const **rslt, uint32_t *length )
+{
+    return BAMAlignmentGetRawCigar(BamAlignmentToSequence(self)->bam, rslt, length);
+}
+
+static bool BamAlignmentIsSecondary( const BamAlignment *self )
+{
+    return (BamAlignmentToSequence(self)->flags & BAMFlags_IsNotPrimary) != 0;
+}
+
+/*--------------------------------------------------------------------------
+ * BamSequence 
+ */
+
+static Sequence_vt_v1 BamSequence_vt = 
+{
+    1, 0, 
+    /* start minor version == 0 */
+    BamSequenceAddRef,
+    BamSequenceRelease,
+    BamSequenceGetReadLength,
+    BamSequenceGetRead,  
+    BamSequenceGetRead2,
+    BamSequenceGetQuality,
+    BamSequenceGetSpotGroup,
+    BamSequenceGetSpotName, 
+    BamSequenceIsColorSpace,
+    BamSequenceGetCSKey,
+    BamSequenceGetCSReadLength,
+    BamSequenceGetCSRead,
+    BamSequenceGetCSQuality,
+    BamSequenceRecordWasPaired,
+    BamSequenceRecordOrientationSelf,
+    BamSequenceRecordOrientationMate,
+    BamSequenceRecordIsFirst,
+    BamSequenceRecordIsSecond,
+    BamSequenceRecordIsDuplicate,
+    BamSequenceIsLowQuality,
+    BamSequenceGetTI,
+    /* end minor version == 0 */
+};
+
+static
+rc_t
+BamSequenceInit(BamSequence* self)
+{
+    self->dadSeq.vt.v1 = & BamSequence_vt;
+    self->dadAlign.vt.v1 = & BamAlignment_vt;
+    self->dadCG.vt.v1 = & BamCGData_vt;
+    KRefcountInit ( & self -> refcount, 1, "BamSequence", "BamSequenceInit", "");
+    self->bam= 0;
+    self->flags = 0;
+
+    return 0;
+}
+
+static const BamRecord*
+BamSequenceToRecord(const BamSequence* seq) 
+{
+    return ( const BamRecord * ) ( (uint8_t*)seq - offsetof ( BamRecord, seq ) );
+}
+
+static rc_t BamSequenceAddRef( const BamSequence* self )
+{
+    switch (KRefcountAdd( & self->refcount, "BamSequence" ))
+    {
+    case krefLimit:
+        return RC ( RC_MODULE, rcData, rcAttaching, rcRange, rcExcessive );
+    case krefNegative:
+        return RC ( RC_MODULE, rcData, rcAttaching, rcRefcount, rcInvalid );
+    }
+    return 0;
+}
+
+static rc_t BamSequenceRelease( const BamSequence* self )
+{
+    if ( self != NULL )
+    {
+        switch ( KRefcountDrop ( & self -> refcount, "BamSequence" ) )
+        {
+        case krefWhack:
+            return BamRecordWhack ( BamSequenceToRecord(self) );
+
+        case krefNegative:
+            return RC ( RC_MODULE, rcData, rcDestroying, rcSelf, rcDestroyed );
+        }
+    }
+
+    return 0;
+
+}
+
+static rc_t BamSequenceGetReadLength ( const BamSequence *self, uint32_t *length )
+{
+    assert(self);
+    assert(self->bam);
+    return BAMAlignmentGetReadLength(self->bam, length);
+}
+
+static rc_t BamSequenceGetRead ( const BamSequence *self, char *sequence )
+{
+    assert(self);
+    assert(self->bam);
+    assert(sequence);
+    return BAMAlignmentGetSequence(self->bam, sequence);
+}
+
+static rc_t BamSequenceGetRead2 ( const BamSequence *self, char *sequence, uint32_t start, uint32_t stop )
+{
+    assert(self);
+    assert(self->bam);
+    assert(sequence);
+    return BAMAlignmentGetSequence2(self->bam, sequence, start, stop);
+}
+
+static rc_t BamSequenceGetQuality ( const BamSequence *self, const int8_t **quality, uint8_t *offset, int *qualType )
+{
+    assert(self);
+    assert(self->bam);
+    assert(quality);
+    assert(offset);
+    assert(qualType);
+    {
+        rc_t rc = BAMAlignmentGetQuality2(self->bam, (const uint8_t **)quality, offset);
+        if (rc != 0)
+        {
+            *quality = NULL;
+            *offset = 0;
+            *qualType = 0;
+        }
+        else
+            *qualType = QT_Phred;
+        return rc;
+    }
+}
+
+static rc_t BamSequenceGetSpotGroup ( const BamSequence *self, const char **name, size_t *length )
+{
+    assert(self);
+    assert(self->bam);
+    assert(name);
+    {
+        rc_t rc = BAMAlignmentGetReadGroupName ( self->bam, name );
+        if (rc != 0)
+        {
+            *name = NULL;
+            *length = 0;
+        }
+        else
+            *length = string_size(*name);
+        return rc;
+    }
+}
+
+static rc_t BamSequenceGetSpotName ( const BamSequence *self, const char **name, size_t *length )
+{
+    assert(self);
+    assert(self->bam);
+    assert(name);
+    {
+        rc_t rc = BAMAlignmentGetReadName ( self->bam, name );
+        if (rc != 0)
+        {
+            *name = NULL;
+            *length = 0;
+        }
+        else
+            *length = string_size(*name);
+        return rc;
+    }
+}
+
+static bool BamSequenceIsColorSpace ( const BamSequence *self )
+{
+    assert(self);
+    assert(self->bam);
+    return BAMAlignmentHasColorSpace(self->bam);
+}
+
+static rc_t BamSequenceGetCSKey ( const BamSequence *self, char cskey[1] )
+{
+    assert(self);
+    assert(self->bam);
+    return BAMAlignmentGetCSKey(self->bam, cskey);
+}
+
+static rc_t BamSequenceGetCSReadLength     ( const BamSequence *self, uint32_t *length )
+{
+    assert(self);
+    assert(self->bam);
+    assert(length);
+    return BAMAlignmentGetCSSeqLen(self->bam, length);
+}
+
+static rc_t BamSequenceGetCSRead ( const BamSequence *self, char *sequence )
+{
+    assert(self);
+    assert(self->bam);
+    assert(sequence);
+    {
+        uint32_t length;
+        rc_t rc = BAMAlignmentGetCSSeqLen(self->bam, &length);
+        return rc ? rc : BAMAlignmentGetCSSequence(self->bam, sequence, length);
+    }
+}
+
+static rc_t BamSequenceGetCSQuality ( const BamSequence *self, const int8_t **quality, uint8_t *offset, int *qualType )
+{
+    assert(self);
+    assert(self->bam);
+    assert(quality);
+    assert(offset);
+    assert(qualType);
+    {
+        rc_t rc = BAMAlignmentGetCSQuality(self->bam, (const uint8_t **)quality, offset);
+        if (rc != 0)
+        {
+            *quality = NULL;
+            *offset = 0;
+            *qualType = 0;
+        }
+        else
+            *qualType = QT_Phred;
+        return rc;
+    }
+}
+
+static bool BamSequenceRecordWasPaired ( const BamSequence *self )
+{
+    return self->flags & BAMFlags_WasPaired;
+}
+
+static int BamSequenceRecordOrientationSelf ( const BamSequence *self )
+{
+    return (self->flags & BAMFlags_SelfIsReverse) ? ReadOrientationReverse : ReadOrientationForward;
+}
+
+static int BamSequenceRecordOrientationMate ( const BamSequence *self )
+{
+    return (self->flags & BAMFlags_MateIsReverse) ? ReadOrientationReverse : ReadOrientationForward;;
+}
+
+static bool BamSequenceRecordIsFirst ( const BamSequence *self )
+{
+    return self->flags & BAMFlags_IsFirst;
+}
+
+static bool BamSequenceRecordIsSecond ( const BamSequence *self )
+{
+    return self->flags & BAMFlags_IsSecond;
+}
+
+static bool BamSequenceRecordIsDuplicate ( const BamSequence *self )
+{
+    return self->flags & BAMFlags_IsDuplicate;
+}
+
+static bool BamSequenceIsLowQuality ( const BamSequence *self )
+{
+    return self->flags & BAMFlags_IsLowQuality;
+}
+
+static rc_t BamSequenceGetTI ( const BamSequence *self, uint64_t *ti )
+{
+    return BAMAlignmentGetTI(self->bam, ti);
+}
+
+ /*--------------------------------------------------------------------------
+ * BamReferenceInfo forwards
+ */
+static rc_t BamReferenceAddRef                  ( const BamReferenceInfo* self );
+static rc_t BamReferenceRelease                 ( const BamReferenceInfo* self );
+static rc_t BamReferenceInfoGetRefSeqCount      ( const BamReferenceInfo* self, uint32_t* count );
+static rc_t BamReferenceInfoGetRefSeq           ( const BamReferenceInfo* self, uint32_t n, ReferenceSequence* result );
+static rc_t BamReferenceInfoGetReadGroupCount   ( const BamReferenceInfo* self, uint32_t* count );
+static rc_t BamReferenceInfoGetReadGroup        ( const BamReferenceInfo* self, unsigned n, ReadGroup* result );
+static rc_t BamReferenceInfoGetReadGroupByName  ( const BamReferenceInfo* self, const char* name, ReadGroup* result );
+
+static ReferenceInfo_vt_v1 BamReferenceInfo_vt = 
+{
+    1, 0, 
+    /* start minor version == 0 */
+    BamReferenceAddRef,
+    BamReferenceRelease,
+    BamReferenceInfoGetRefSeqCount,
+    BamReferenceInfoGetRefSeq,
+    BamReferenceInfoGetReadGroupCount,
+    BamReferenceInfoGetReadGroup,
+    BamReferenceInfoGetReadGroupByName,
+    /* end minor version == 0 */
+};
+
+/*--------------------------------------------------------------------------
+ * BamReaderFile
+ */
+static rc_t BamReaderFileWhack                      ( BamReaderFile* self );
+static rc_t BamReaderFileGetRecord                  ( const BamReaderFile *self, const Record** result );
+static float BamReaderFileGetProportionalPosition   ( const BamReaderFile *self );
+static rc_t BamReaderFileGetReferenceInfo           ( const BamReaderFile *self, const ReferenceInfo** result );
+
+static ReaderFile_vt_v1 BamReaderFile_vt = 
+{
+    1, 0, 
+    /* start minor version == 0 */
+    BamReaderFileWhack,
+    BamReaderFileGetRecord,
+    BamReaderFileGetProportionalPosition,
+    BamReaderFileGetReferenceInfo,
+    /* end minor version == 0 */
+};
+
+struct BamReaderFile
+{
+    ReaderFile dad;
+    ReferenceInfo refInfo;
+    
+    const BAMFile* reader;
+};
+
+const BAMFile* ToBam(const ReaderFile* reader)
+{
+   assert(reader);
+   return ((const BamReaderFile*)reader)->reader;
+}
+
+float BamReaderFileGetProportionalPosition ( const BamReaderFile *f )
+{
+    BamReaderFile* self = (BamReaderFile*) f;
+    return BAMFileGetProportionalPosition(self->reader);
+} 
+
+rc_t BamReaderFileGetReferenceInfo ( const BamReaderFile *self, const ReferenceInfo** result )
+{
+    *result = & self->refInfo;
+    return ReaderFileAddRef( & self->dad );
+}
+
+rc_t BamReaderFileWhack( BamReaderFile* f )
+{
+    BamReaderFile* self = (BamReaderFile*) f;
+    
+    BAMFileRelease(self->reader);
+    
+    free ( (void*)self->dad.pathname );
+    free ( self );
+    
+    return 0;   
+}
+
+rc_t BamReaderFileGetRecord ( const BamReaderFile *f, const Record** result )
+{
+    rc_t rc;
+    BamReaderFile* self = (BamReaderFile*) f;
+
+    BamRecord* record = (BamRecord*)malloc(sizeof(BamRecord));
+    if (record == NULL)
+    {
+        rc = RC ( RC_MODULE, rcData, rcAllocating, rcMemory, rcExhausted );
+        return 0;
+    }
+    rc = BamRecordInit(record);
+    if (rc != 0)
+    {
+        free(record);
+        return rc;
+    }
+    
+    rc = BAMFileRead2(self->reader, &record->seq.bam);
+    if (rc)
+    {
+        if (GetRCModule(rc) == rcAlign && GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound)
+        {   /* end of input */
+            rc = 0; 
+        }
+        *result = 0;
+        BamRecordRelease(record);
+    }    
+    else
+    {
+        *result = (const Record*)record;
+        BAMAlignmentGetFlags(record->seq.bam, &record->seq.flags);
+    }
+        
+    return rc;
+}
+
+rc_t CC BamReaderFileMake( const ReaderFile **reader, char const headerText[], char const path[])
+{
+    rc_t rc;
+    BamReaderFile* self = (BamReaderFile*) malloc ( sizeof * self );
+    if ( self == NULL )
+    {
+        rc = RC ( RC_MODULE, rcFileFormat, rcAllocating, rcMemory, rcExhausted );
+        *reader = 0;
+    }
+    else
+    {
+        rc = ReaderFileInit ( self );
+        self->dad.vt.v1 = & BamReaderFile_vt;
+        self->refInfo.vt.v1 = & BamReferenceInfo_vt;
+
+        self->dad.pathname = string_dup(path, strlen(path)+1);
+        if ( self->dad.pathname == NULL )
+        {
+            rc = RC ( RC_MODULE, rcFileFormat, rcAllocating, rcMemory, rcExhausted );
+        }
+        
+        rc = BAMFileMakeWithHeader ( &self->reader, headerText, "%s", self->dad.pathname );
+        
+        if (rc != 0)
+        {
+            BamReaderFileWhack( self );
+            *reader = 0;
+        }
+        else
+        {
+            *reader = (const ReaderFile *) self;
+        }
+    }
+ 
+    return rc;
+}
+
+/*--------------------------------------------------------------------------
+ * BamReferenceInfo
+ */
+static const BamReaderFile*
+BamRefInfoToReader(const BamReferenceInfo* ref) 
+{
+    return ( const BamReaderFile * ) ( (uint8_t*)ref - offsetof ( BamReaderFile, refInfo ) );
+}
+
+rc_t BamReferenceAddRef ( const BamReferenceInfo* self )
+{
+    return ReaderFileAddRef( & BamRefInfoToReader(self)->dad );
+}
+
+rc_t BamReferenceRelease ( const BamReferenceInfo* self )
+{
+    return ReaderFileRelease ( & BamRefInfoToReader(self)->dad );
+}
+
+rc_t BamReferenceInfoGetRefSeqCount ( const BamReferenceInfo* self, uint32_t* count )
+{
+    return BAMFileGetRefSeqCount( BamRefInfoToReader(self)->reader, count );
+}
+
+rc_t BamReferenceInfoGetRefSeq ( const BamReferenceInfo *self, uint32_t n, ReferenceSequence *result )
+{
+    const BAMRefSeq *refSeq;
+    rc_t rc = BAMFileGetRefSeq( BamRefInfoToReader(self)->reader, n, &refSeq );
+    if (rc != 0 || refSeq == NULL)
+    {
+        return RC ( RC_MODULE, rcHeader, rcAccessing, rcParam, rcOutofrange );
+    }
+    
+    result->length = refSeq->length;
+    result->name = refSeq->name;
+    result->checksum = refSeq->checksum;
+    
+    return 0;
+}
+
+rc_t BamReferenceInfoGetReadGroupCount ( const BamReferenceInfo *self, uint32_t *count )
+{
+    return BAMFileGetReadGroupCount ( BamRefInfoToReader(self)->reader, count );
+}
+
+rc_t BamReferenceInfoGetReadGroup ( const BamReferenceInfo *self, unsigned n, ReadGroup* result )
+{
+    const BAMReadGroup *rg;
+    rc_t rc = BAMFileGetReadGroup( BamRefInfoToReader(self)->reader, n, &rg );
+    if (rc != 0 || rg == NULL)
+    {
+        return RC ( RC_MODULE, rcHeader, rcAccessing, rcParam, rcOutofrange );
+    }
+        
+    result->name = rg->name;
+    result->platform = rg->platform;
+    
+    return 0;
+}
+
+rc_t BamReferenceInfoGetReadGroupByName ( const BamReferenceInfo *self, const char *name, ReadGroup *result )
+{
+    const BAMReadGroup *rg;
+    rc_t rc = BAMFileGetReadGroupByName( BamRefInfoToReader(self)->reader, name, &rg );
+    if (rc != 0 || rg == NULL)
+    {
+        return RC ( RC_MODULE, rcHeader, rcAccessing, rcParam, rcOutofrange );
+    }
+    
+    result->name = rg->name;
+    result->platform = rg->platform;
+    
+    return 0;
+}
+
+
+
+
+
+ 
+#ifdef TENTATIVE 
+/**************************** future parsing-on-a-thread code *****************************************/
+
+#include "bam-reader.h"
+
+#include <atomic32.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <klib/rc.h>
+#include <kproc/lock.h>
+#include <kproc/cond.h>
+#include <kproc/thread.h>
+
+#define BUFFER_COUNT (3)
+
+struct BAMReader
+{
+    atomic32_t refcount;
+    const BAMFile* file;
+    
+    KLock *lock;
+    KCondition *have_data;
+    KCondition *need_data;
+    KThread *th;
+
+    const BAMAlignment* que[BUFFER_COUNT];
+    unsigned volatile nque;
+    rc_t volatile rc;
+    
+    bool eof;
+};
+
+static rc_t BAMReaderThreadMain(KThread const *const th, void *const vp);
+
+#define END_OF_DATA RC(rcAlign, rcFile, rcReading, rcRow, rcNotFound)
+
+rc_t BAMReaderMake( const BAMReader **result,
+                    char const headerText[],
+                    char const path[] )
+{
+    rc_t rc;
+    BAMReader *self = malloc(sizeof(BAMReader));
+    if ( self == NULL )
+    {
+        *result = NULL;
+        return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
+    }
+    else
+    {
+        atomic32_set( & self->refcount, 1 );
+        rc = BAMFileMakeWithHeader( & self->file, headerText, "%s", path);
+        if ( rc != 0 )
+        {
+            free(self);
+            *result = 0;
+        }
+        else
+            *result = self;
+    }
+    
+    self->nque = 0;
+    self->rc = 0;
+    self->eof = false;
+    
+    rc = KLockMake(&self->lock);
+    if (rc == 0) 
+    {
+        rc = KConditionMake(&self->have_data);
+        if (rc == 0) 
+        {
+            rc = KConditionMake(&self->need_data);
+            if (rc == 0) 
+            {
+                rc = KThreadMake(&self->th, BAMReaderThreadMain, self);
+                if (rc == 0) 
+                    return 0;
+                KConditionRelease(self->need_data);
+            }
+            KConditionRelease(self->have_data);
+        }
+        KLockRelease(self->lock);
+    }
+    
+    return rc;
+}           
+
+static void BAMReaderWhack(BAMReader *const self)
+{
+    KThreadCancel(self->th);
+    KThreadWait(self->th, NULL);
+    BAMFileRelease(self->file);
+    KConditionRelease(self->need_data);
+    KConditionRelease(self->have_data);
+    KLockRelease(self->lock);
+    KThreadRelease(self->th);
+}
+        
+
+/* AddRef
+ * Release
+ */
+rc_t BAMReaderAddRef ( const BAMReader *self )
+{
+    if (self != NULL)
+        atomic32_inc(&((BAMReader *)self)->refcount);
+    return 0;
+}
+
+rc_t BAMReaderRelease ( const BAMReader *cself )
+{
+    BAMReader *self = (BAMReader *)cself;
+    
+    if (cself != NULL) 
+    {
+        if (atomic32_dec_and_test(&self->refcount)) 
+        {
+            BAMReaderWhack(self);
+            free(self);
+        }
+    }
+    return 0;
+}
+
+/* GetBAMFile
+ */
+const BAMFile* BAMReaderGetBAMFile ( const BAMReader *self )
+{
+    if (self == NULL)
+        return NULL;
+    return self->file;
+}
+
+static rc_t BAMReaderThreadMain(KThread const *const th, void *const vp)
+{
+    BAMReader *const self = (BAMReader *)vp;
+    rc_t rc = 0;
+    const BAMAlignment* rec;
+    
+    KLockAcquire(self->lock);
+    do 
+    {
+        while (self->nque == BUFFER_COUNT)
+            KConditionWait(self->need_data, self->lock);
+
+        {
+            rc = BAMFileRead( self->file, &rec);
+            if (rc == END_OF_DATA)
+            {
+                rec = NULL;
+                rc = 0;
+            }
+            else if (rc)
+                break;
+
+            self->que[self->nque] = rec;
+            ++self->nque;
+            KConditionSignal(self->have_data);
+        }
+    }
+    while (rec);
+    self->rc = rc;
+    KLockUnlock(self->lock);
+    return 0;
+}
+
+/* Read
+ *  read an aligment
+ *
+ *  "result" [ OUT ] - return param for BAMAlignment object
+ *   must be released with BAMAlignmentRelease
+ *
+ *  returns RC(..., ..., ..., rcRow, rcNotFound) at end
+ */
+rc_t BAMReaderRead ( const BAMReader *cself, const BAMAlignment **result )
+{
+    rc_t rc;
+    BAMReader *self = (BAMReader *)cself;
+    
+    if (self == NULL)
+        return RC(rcAlign, rcFile, rcReading, rcParam, rcNull);
+    if (self->eof)
+        return RC(rcAlign, rcFile, rcReading, rcData, rcInsufficient);
+        
+    KLockAcquire(self->lock);
+    if ((rc = self->rc) == 0) 
+    {
+        while (self->nque == 0 && (rc = self->rc) == 0)
+            KConditionWait(self->have_data, self->lock);
+        if (rc == 0) 
+        {
+            *result = self->que[0];
+            
+            if (*result) 
+            {
+                --self->nque;
+                memmove(&self->que[0], &self->que[1], self->nque * sizeof(self->que[0]));
+                KConditionSignal(self->need_data);
+            }
+            else 
+            {
+                self->eof = true;
+                rc = END_OF_DATA;
+            }
+        }
+    }
+    KLockUnlock(self->lock);
+
+    return rc;
+}
+
+#endif
+
+
diff --git a/tools/bam-loader/bam-reader.h b/tools/bam-loader/bam-reader.h
new file mode 100644
index 0000000..5247563
--- /dev/null
+++ b/tools/bam-loader/bam-reader.h
@@ -0,0 +1,98 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_bam_reader_
+#define _h_bam_reader_
+
+#include <klib/rc.h>
+#include <kfs/directory.h>
+
+#include <align/extern.h>
+#include <align/bam.h>
+
+#include <loader/common-reader-priv.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+rc_t CC BamReaderFileMake( const ReaderFile **self, char const headerText[], char const path[] );
+
+/* temporary crutches for refactoring: */
+const BAMFile* ToBam(const ReaderFile *self); 
+const BAMAlignment *ToBamAlignment(const Record* record);
+
+#if 0
+#ifdef TENTATIVE
+/*--------------------------------------------------------------------------
+ * BAMReader, a parsing thread adapter for BAMFile.
+ * Creates a thread that does reading and parsing of BAM files, provides access to parsed data one record at a time. 
+ */
+typedef struct BAMReader BAMReader;
+
+rc_t BAMReaderMake( const BAMReader **result,
+                    char const headerText[],
+                    char const path[] );
+
+/* AddRef
+ * Release
+ */
+rc_t BAMReaderAddRef ( const BAMReader *self );
+rc_t AMReaderRelease ( const BAMReader *self );
+
+/* GetBAMFile
+ */
+const BAMFile* BAMReaderGetBAMFile ( const BAMReader *self );
+
+/* Read
+ *  read an aligment
+ *
+ *  "result" [ OUT ] - return param for BAMAlignment object
+ *   must be released with BAMAlignmentRelease
+ *
+ *  returns RC(..., ..., ..., rcRow, rcNotFound) at end
+ */
+rc_t BAMReaderRead ( const BAMReader *self, const BAMAlignment **result );
+
+#else /*TENTATIVE*/
+
+/* use BAMFile directly, as in the earlier version */
+typedef struct BAMFile BAMReader;
+
+#define BAMReaderMake 			BAMFileMakeWithHeader
+#define BAMReaderAddRef 		BAMFileAddRef
+#define BAMReaderRelease 		BAMFileRelease
+#define BAMReaderGetBAMFile(p) 	(p)
+#define BAMReaderRead 			BAMFileRead
+
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _h_bam_reader_ */
diff --git a/tools/bam-loader/bam.c b/tools/bam-loader/bam.c
new file mode 100644
index 0000000..c32ad49
--- /dev/null
+++ b/tools/bam-loader/bam.c
@@ -0,0 +1,4075 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <klib/defs.h>
+#include <klib/debug.h>
+#include <klib/sort.h>
+#include <klib/rc.h>
+#include <kfs/file.h>
+#include <kfs/directory.h>
+#include <kfs/mmap.h>
+#include <klib/printf.h>
+#include <klib/log.h>
+#include <klib/text.h>
+#include <klib/refcount.h>
+#include <sysalloc.h>
+
+#include <atomic32.h>
+#include <strtol.h>
+
+#include <vfs/path.h>
+#include <vfs/path-priv.h>
+#include <kfs/kfs-priv.h>
+
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <math.h>
+#include <assert.h>
+#if 1
+/*_DEBUGGING*/
+#include <stdio.h>
+#include <os-native.h>
+#endif
+
+#include <endian.h>
+#include <byteswap.h>
+
+#include <zlib.h>
+
+#include "bam-priv.h"
+
+static rc_t BufferedFileRead(BufferedFile *const self)
+{
+    uint64_t const fpos = self->fpos + self->bmax;
+    rc_t const rc = KFileRead(self->kf, fpos, self->buf, self->size, &self->bmax);
+    if (rc) {
+        DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("Error %R read %u bytes from SAM/BAM file at position %lu\n", rc, self->bmax, fpos));
+        return rc;
+    }
+    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("Read %u bytes from SAM/BAM file at position %lu\n", self->bmax, fpos));
+    self->fpos = fpos;
+    self->bpos = 0;
+    return 0;
+}
+
+static rc_t BufferedFileInit(BufferedFile *const self, KFile const *const kf)
+{
+    rc_t const rc = KFileSize(kf, &self->fmax);
+    if (rc || self->fmax == 0) {
+        self->fmax = 0;
+        self->size = PIPE_BUFFER_SIZE;
+    }
+    else
+        self->size = self->fmax < RGLR_BUFFER_SIZE ? self->fmax : RGLR_BUFFER_SIZE;
+
+    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("File size is %lu; Read buffer is %lu\n", self->fmax, self->size));
+    self->buf = malloc(self->size);
+    self->fpos = 0;
+    self->bpos = 0;
+    self->bmax = 0;
+    self->kf = kf;
+    KFileAddRef(kf);
+
+    return self->buf != NULL ? 0 : RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
+}
+
+static void BufferedFileWhack(BufferedFile *const self)
+{
+    KFileRelease(self->kf);
+    free(self->buf);
+}
+
+static uint64_t BufferedFileGetPos(BufferedFile const *const self)
+{
+    return self->fpos + self->bpos;
+}
+
+static float BufferedFileProPos(BufferedFile const *const self)
+{
+    return self->fmax == 0 ? -1.0 : (BufferedFileGetPos(self) / (double)self->fmax);
+}
+
+static rc_t BufferedFileSetPos(BufferedFile *const self, uint64_t const pos)
+{
+    if (pos >= self->fpos && pos < self->fpos + self->bmax) {
+        self->bpos = (size_t)(pos - self->fpos);
+    }
+    else if (pos < self->fmax) {
+        self->fpos = pos;
+        self->bpos = 0;
+        self->bmax = 0;
+    }
+    else
+        return RC(rcAlign, rcFile, rcPositioning, rcParam, rcInvalid);
+    return 0;
+}
+
+static uint64_t BufferedFileGetSize(BufferedFile const *const self)
+{
+    return self->fmax;
+}
+
+static int SAMFileRead1(SAMFile *const self)
+{
+    if (self->putback < 0) {
+        if (self->file.bpos == self->file.bmax) {
+            rc_t const rc = BufferedFileRead(&self->file);
+            
+            self->last = rc;
+            if (rc || self->file.bmax == 0) return -1;
+        }
+        return ((char const *)self->file.buf)[self->file.bpos++];
+    }
+    else {
+        int const x = self->putback;
+        self->putback = -1;
+        return x;
+    }
+}
+
+static rc_t SAMFileLastError(SAMFile const *const self)
+{
+    return self->last ? self->last : SILENT_RC(rcAlign, rcFile, rcReading, rcData, rcInsufficient);
+}
+
+static void SAMFilePutBack(SAMFile *const self, int ch)
+{
+    if (self->file.bpos > 0)
+        --self->file.bpos;
+    else
+        self->putback = ch;
+}
+
+static rc_t SAMFileInit(SAMFile *self, RawFile_vt *vt)
+{
+    static RawFile_vt const my_vt = {
+        (rc_t (*)(void *, zlib_block_t, unsigned *))NULL,
+        (uint64_t (*)(void const *))BufferedFileGetPos,
+        (float (*)(void const *))BufferedFileProPos,
+        (uint64_t (*)(void const *))BufferedFileGetSize,
+        (rc_t (*)(void *, uint64_t))BufferedFileSetPos,
+        (void (*)(void *))NULL
+    };
+    
+    self->putback = -1;
+    self->last = 0;
+    *vt = my_vt;
+    
+    return 0;
+}
+
+/* MARK: BGZFile *** Start *** */
+
+#define VALIDATE_BGZF_HEADER 1
+#if (ZLIB_VERNUM < 0x1230)
+#undef VALIDATE_BGZF_HEADER
+#warning "zlib too old, inflateGetHeader not available, not validating BGZF headers"
+#else
+#endif
+
+static rc_t BGZFileGetMoreBytes(BGZFile *self)
+{
+    rc_t const rc = BufferedFileRead(&self->file);
+    if (rc)
+        return rc;
+    
+    if (self->file.bmax == 0)
+        return RC(rcAlign, rcFile, rcReading, rcData, rcInsufficient);
+
+    self->zs.avail_in = (uInt)(self->file.bmax);
+    self->zs.next_in = (Bytef *)self->file.buf;
+    
+    return 0;
+}
+
+static rc_t BGZFileRead(BGZFile *self, zlib_block_t dst, unsigned *pNumRead)
+{
+#if VALIDATE_BGZF_HEADER
+    uint8_t extra[256];
+    gz_header head;
+#endif
+    rc_t rc = 0;
+    unsigned loops;
+    int zr;
+    
+    *pNumRead = 0;
+    if (self->file.bmax == 0 || self->zs.avail_in == 0) {
+        rc = BGZFileGetMoreBytes(self);
+        if (rc)
+            return rc;
+    }
+
+#if VALIDATE_BGZF_HEADER
+    memset(&head, 0, sizeof(head));
+    head.extra = extra;
+    head.extra_max = sizeof(extra);
+    
+    zr = inflateGetHeader(&self->zs, &head);
+    assert(zr == Z_OK);
+#endif
+    
+    self->zs.next_out = (Bytef *)dst;
+    self->zs.avail_out = sizeof(zlib_block_t);
+
+    for (loops = 0; loops != 2; ++loops) {
+        {
+            uLong const initial = self->zs.total_in;
+            
+            zr = inflate(&self->zs, Z_FINISH);
+            {
+                uLong const final = self->zs.total_in;
+                uLong const len = final - initial;
+                
+                self->file.bpos += len;
+            }
+        }
+        assert(self->zs.avail_in == self->file.bmax - self->file.bpos);
+        
+        switch (zr) {
+        case Z_OK:
+        case Z_BUF_ERROR:
+            rc = BGZFileGetMoreBytes(self);
+            if ( rc != 0 )
+            {
+                if ((int)GetRCObject(rc) == rcData && GetRCState(rc) == rcInsufficient)
+                {
+                    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("EOF in Zlib block after %lu bytes\n", self->file.fpos + self->file.bpos));
+                    rc = RC(rcAlign, rcFile, rcReading, rcFile, rcTooShort);
+                }
+                return rc;
+            }
+            break;
+        case Z_STREAM_END:
+            DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("Zlib block size (before/after): %u/%u\n", self->zs.total_in, self->zs.total_out));
+#if VALIDATE_BGZF_HEADER
+            if (head.done) {
+                unsigned const extra_len = head.extra_len;
+                unsigned i;
+                unsigned bsize = 0;
+                
+                DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("GZIP Header extra length: %u\n", extra_len));
+                for (i = 0; i < extra_len; ) {
+                    uint8_t const si1 = extra[i + 0];
+                    uint8_t const si2 = extra[i + 1];
+                    unsigned const slen = LE2HUI16(&extra[i + 2]);
+                    
+                    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("GZIP Header extra: %c%c(%u)\n", si1, si2, slen));
+                    if (si1 == 'B' && si2 == 'C') {
+                        bsize = 1 + LE2HUI16(&extra[i + 4]);
+                        DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("BGZF Header extra field BC: bsize %u\n", bsize));
+                        break;
+                    }
+                    i += slen + 4;
+                }
+                if (bsize == 0 || bsize != self->zs.total_in) {
+                    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("BGZF Header extra field BC not found\n"));
+                    rc = RC(rcAlign, rcFile, rcReading, rcFormat, rcInvalid); /* not BGZF */
+                }
+            }
+            else {
+                DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("GZIP Header not found\n"));
+                rc = RC(rcAlign, rcFile, rcReading, rcFile, rcCorrupt);
+            }
+#endif
+            *pNumRead = (unsigned)self->zs.total_out; /* <= 64k */
+            zr = inflateReset(&self->zs);
+            assert(zr == Z_OK);
+            return rc;
+        default:
+            DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("Unexpected Zlib result %i: %s\n", zr, self->zs.msg ? self->zs.msg : "unknown"));
+            return RC(rcAlign, rcFile, rcReading, rcFile, rcCorrupt);
+        }
+    }
+    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BGZF), ("Failed reading BAM file after %lu bytes\n", self->file.fpos + self->file.bpos));
+    return RC(rcAlign, rcFile, rcReading, rcFile, rcTooShort);
+}
+
+static void BGZFileWhack(BGZFile *self)
+{
+    inflateEnd(&self->zs);
+}
+
+static rc_t BGZFileInit(BGZFile *const self, RawFile_vt *const vt)
+{
+    int i;
+    static RawFile_vt const my_vt = {
+        (rc_t (*)(void *, zlib_block_t, unsigned *))BGZFileRead,
+        (uint64_t (*)(void const *))BufferedFileGetPos,
+        (float (*)(void const *))BufferedFileProPos,
+        (uint64_t (*)(void const *))BufferedFileGetSize,
+        (rc_t (*)(void *, uint64_t))BufferedFileSetPos,
+        (void (*)(void *))BGZFileWhack
+    };
+    
+    *vt = my_vt;
+
+    i = inflateInit2(&self->zs, MAX_WBITS + 16); /* max + enable gzip headers */
+    switch (i) {
+    case Z_OK:
+        break;
+    case Z_MEM_ERROR:
+        return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
+    default:
+        return RC(rcAlign, rcFile, rcConstructing, rcNoObj, rcUnexpected);
+    }
+    
+    return 0;
+}
+
+static const char cigarChars[] = {
+    ct_Match,
+    ct_Insert,
+    ct_Delete,
+    ct_Skip,
+    ct_SoftClip,
+    ct_HardClip,
+    ct_Padded,
+    ct_Equal,
+    ct_NotEqual
+    /* ct_Overlap must not appear in actual BAM file */
+};
+
+static inline int opt_tag_cmp(char const a[2], char const b[2])
+{
+    int const d0 = (int)a[0] - (int)b[0];
+    return d0 ? d0 : ((int)a[1] - (int)b[1]);
+}
+
+static int64_t OptTag_sort(void const *A, void const *B, void *ctx)
+{
+    BAM_Alignment const *const self = ctx;
+    unsigned const a_off = ((struct offset_size_s const *)A)->offset;
+    unsigned const b_off = ((struct offset_size_s const *)B)->offset;
+    char const *const a = (char const *)&self->data->raw[a_off];
+    char const *const b = (char const *)&self->data->raw[b_off];
+    int const diff = opt_tag_cmp(a, b);
+    
+    if ( diff != 0 )
+        return diff;
+    else if ( a < b )
+        return -1;
+    else
+        return a > b;
+}
+
+static unsigned tag_findfirst(BAM_Alignment const *const self, char const tag[2])
+{
+    unsigned f = 0;
+    unsigned e = self->numExtra;
+    
+    while (f < e) {
+        unsigned const m = f + ((e - f) >> 1);
+        char const *const mtag = (char const *)&self->data->raw[self->extra[m].offset];
+        int const d = opt_tag_cmp(tag, mtag);
+        
+        if (d > 0)
+            f = m + 1;
+        else
+            e = m;
+    }
+    return f;
+}
+
+static unsigned tag_runlength(BAM_Alignment const *const self,
+                              char const tag[2],
+                              unsigned const at)
+{
+    unsigned n;
+    
+    for (n = 0; n + at < self->numExtra; ++n) {
+        if (opt_tag_cmp(tag, (char const *)&self->data->raw[self->extra[n + at].offset]) != 0)
+            break;
+    }
+    return n;
+}
+
+static struct offset_size_s const *tag_search(BAM_Alignment const *const self,
+                                              char const tag[2],
+                                              int const which)
+{
+    unsigned const fnd = tag_findfirst(self, tag);
+    unsigned const run = tag_runlength(self, tag, fnd);
+    unsigned const want = which < 0 ? (run + which) : which;
+    
+    return run == 0 ? NULL : &self->extra[fnd + (want % run)];
+}
+
+static char const *get_RG(BAM_Alignment const *cself)
+{
+    struct offset_size_s const *const x = tag_search(cself, "RG", 0);
+    return (char const *)(x && cself->data->raw[x->offset + 2] == 'Z' ? &cself->data->raw[x->offset + 3] : NULL);
+}
+
+static struct offset_size_s const *get_CS_info(BAM_Alignment const *cself)
+{
+    return tag_search(cself, "CS", 0);
+}
+
+static struct offset_size_s const *get_CQ_info(BAM_Alignment const *cself)
+{
+    return tag_search(cself, "CQ", 0);
+}
+
+static char const *get_CS(BAM_Alignment const *cself)
+{
+    struct offset_size_s const *const x = get_CS_info(cself);
+    return (char const *)(x && cself->data->raw[x->offset + 2] == 'Z' ? &cself->data->raw[x->offset + 3] : NULL);
+}
+
+static uint8_t const *get_CQ(BAM_Alignment const *cself)
+{
+    struct offset_size_s const *const x = get_CQ_info(cself);
+    return (uint8_t const *)(x && cself->data->raw[x->offset + 2] == 'Z' ? &cself->data->raw[x->offset + 3] : NULL);
+}
+
+static struct offset_size_s const *get_OQ_info(BAM_Alignment const *cself)
+{
+    return tag_search(cself, "OQ", 0);
+}
+
+static uint8_t const *get_OQ(BAM_Alignment const *cself)
+{
+    struct offset_size_s const *const x = get_OQ_info(cself);
+    return (uint8_t const *)(x && cself->data->raw[x->offset + 2] == 'Z' ? &cself->data->raw[x->offset + 3] : NULL);
+}
+
+static char const *get_XT(BAM_Alignment const *cself)
+{
+    struct offset_size_s const *const x = tag_search(cself, "XT", 0);
+    return (char const *)(x && cself->data->raw[x->offset + 2] == 'Z' ? &cself->data->raw[x->offset + 3] : NULL);
+}
+
+static uint8_t const *get_XS(BAM_Alignment const *cself)
+{
+    struct offset_size_s const *const x = tag_search(cself, "XS", -1); /* want last one */
+    return (uint8_t const *)(x && cself->data->raw[x->offset + 2] == 'A' ? &cself->data->raw[x->offset + 3] : NULL);
+}
+
+static struct offset_size_s const *get_CG_ZA_info(BAM_Alignment const *cself)
+{
+    struct offset_size_s const *const x = tag_search(cself, "ZA", 0);
+    return x;
+}
+
+static struct offset_size_s const *get_CG_ZI_info(BAM_Alignment const *cself)
+{
+    struct offset_size_s const *const x = tag_search(cself, "ZI", 0);
+    return x;
+}
+
+static struct offset_size_s const *get_CG_GC_info(BAM_Alignment const *cself)
+{
+    struct offset_size_s const *const x = tag_search(cself, "GC", 0);
+    return x;
+}
+
+static struct offset_size_s const *get_CG_GS_info(BAM_Alignment const *cself)
+{
+    struct offset_size_s const *const x = tag_search(cself, "GS", 0);
+    return x;
+}
+
+static struct offset_size_s const *get_CG_GQ_info(BAM_Alignment const *cself)
+{
+    struct offset_size_s const *const x = tag_search(cself, "GQ", 0);
+    return x;
+}
+
+static char const *get_BX(BAM_Alignment const *cself)
+{
+    struct offset_size_s const *const x = tag_search(cself, "BX", 0);
+    return (char const *)(x && cself->data->raw[x->offset + 2] == 'Z' ? &cself->data->raw[x->offset + 3] : NULL);
+}
+
+/* MARK: BAM_File Reading functions */
+
+/* returns (rcData, rcInsufficient) if eof */
+static rc_t BAM_FileFillBuffer(BAM_File *self)
+{
+    rc_t const rc = self->vt.FileRead(&self->file, self->buffer, &self->bufSize);
+    if (rc)
+        return rc;
+    if (self->bufSize == 0 || self->bufSize <= self->bufCurrent)
+        return RC(rcAlign, rcFile, rcReading, rcData, rcInsufficient);
+    return 0;
+}
+
+static rc_t BAM_FileReadn(BAM_File *self, const unsigned len, uint8_t dst[/* len */]) {
+    rc_t rc;
+    unsigned cur;
+    unsigned n = 0;
+    
+    if (len == 0)
+        return 0;
+    
+    for (cur = 0; ; cur += n) {
+        if (self->bufSize > self->bufCurrent) {
+            n = self->bufSize - self->bufCurrent;
+            if (cur + n > len)
+                n = len - cur;
+            memcpy(&dst[cur], &self->buffer[self->bufCurrent], n);
+            self->bufCurrent += n;
+        }
+        if (self->bufCurrent != self->bufSize && self->bufSize != 0)
+            return 0;
+        if (self->bufSize != 0) {
+            /* a seek has not just been done so update the file position.
+             * if we didn't and a request for the position is made before the
+             * next read, we will not have the position of the next read.
+             *
+             * if a seek had just been done then
+             *    self->fpos_cur == BGZFileGetPos(&self->file)
+             * is already true.
+             */
+            self->fpos_cur = self->vt.FileGetPos(&self->file);
+            self->bufCurrent = 0;
+            self->bufSize = 0;
+            if (cur + n == len)
+                return 0;
+        }
+
+        rc = BAM_FileFillBuffer(self);
+        if (rc)
+            return rc;
+    }
+}
+
+static void const *BAM_FilePeek(BAM_File const *const self, unsigned const offset)
+{
+    return &self->buffer[self->bufCurrent + offset];
+}
+
+static unsigned BAM_FileMaxPeek(BAM_File const *self)
+{
+    return self->bufSize > self->bufCurrent ? self->bufSize - self->bufCurrent : 0;
+}
+
+static int32_t BAM_FilePeekI32(BAM_File *self)
+{
+    return LE2HI32(BAM_FilePeek(self, 0));
+}
+
+static rc_t BAM_FileReadI32(BAM_File *self, int32_t *rhs)
+{
+    uint8_t buf[sizeof(int32_t)];
+    rc_t rc = BAM_FileReadn(self, sizeof(int32_t), buf);
+    
+    if (rc == 0)
+        *rhs = LE2HI32(buf);
+    return rc;
+}
+
+/* MARK: BAM File header parsing functions */
+
+static unsigned ParseHD(char const **rslt, unsigned const hlen, char hdata[])
+{
+    unsigned i;
+    unsigned tag;
+    unsigned value;
+    int st = 0;
+    int ws = 1;
+
+    for (i = 0; i < hlen; ++i) {
+        char const cc = hdata[i];
+        
+        if (ws && isspace(cc))
+            continue;
+        ws = 0;
+        
+        switch (st) {
+        case 0:
+            tag = i;
+            ++st;
+            break;
+        case 1:
+            if (isspace(cc))
+                return 0;
+            ++st;
+            break;
+        case 2:
+            if (cc != ':')
+                continue;
+            hdata[i] = '\0';
+            value = i + 1;
+            ++st;
+            break;
+        case 3:
+            if (cc == '\t' || cc == '\r' || cc == '\n') {
+                hdata[i] = '\0';
+                
+                if (strcmp(&hdata[tag], "VN") == 0)
+                    *rslt = &hdata[value];
+                
+                ++st;
+                ws = 1;
+            }
+            break;
+        case 4:
+            if (cc == '@')
+                return i;
+            tag = i;
+            st = 1;
+            break;
+        }
+    }
+    return st == 4 ? i : 0;
+}
+
+static unsigned ParseSQ(BAMRefSeq *rs, unsigned const hlen, char hdata[])
+{
+    unsigned i;
+    unsigned tag;
+    unsigned value;
+    int st = 0;
+    int ws = 1;
+    
+    for (i = 0; i < hlen; ++i) {
+        char const cc = hdata[i];
+        
+        if (ws && isspace(cc))
+            continue;
+        ws = 0;
+        
+        switch (st) {
+        case 0:
+            tag = i;
+            ++st;
+            break;
+        case 1:
+            if (isspace(cc))
+                return 0;
+            ++st;
+            break;
+        case 2:
+#define HACKAMATIC 1
+#if HACKAMATIC
+            if (cc != ':') {
+                if (i + 1 >= hlen || hdata[i+1] != ':')
+                    return 0;
+                else
+                    ++i;
+            }
+#else
+            if (cc != ':')
+                continue;
+#endif
+            hdata[i] = '\0';
+            value = i + 1;
+            ++st;
+            break;
+        case 3:
+            if (cc == '\t' || cc == '\r' || cc == '\n') {
+                unsigned j;
+                
+                hdata[i] = '\0';
+                
+                while (value < i && isspace(hdata[value]))
+                    ++value;
+                for (j = i; value < j && isspace(hdata[j - 1]); )
+                    hdata[--j] = '\0';
+                
+                if (strcmp(&hdata[tag], "SN") == 0)
+                    rs->name = &hdata[value];
+                else if (strcmp(&hdata[tag], "LN") == 0)
+                    rs->length = strtou64(&hdata[value], NULL, 10);
+                else if (strcmp(&hdata[tag], "AS") == 0)
+                    rs->assemblyId = &hdata[value];
+#if HACKAMATIC
+                else if (strcmp(&hdata[tag], "M5") == 0 || strcmp(&hdata[tag], "MD5") == 0)
+#else
+                else if (strcmp(&hdata[tag], "M5") == 0)
+#endif
+#undef HACKAMATIC
+                {
+                    unsigned len = j - value;
+                    
+                    if ((hdata[value] == '\'' || hdata[value] == '"') && hdata[value + len - 1] == hdata[value]) {
+                        ++value;
+                        len -= 2;
+                    }
+                    if (len == 32) {
+                        rs->checksum = &rs->checksum_array[0];
+                        for (j = 0; j != 16; ++j) {
+                            int const ch1 = toupper(hdata[value + j * 2 + 0]);
+                            int const ch2 = toupper(hdata[value + j * 2 + 1]);
+                            
+                            if (isxdigit(ch1) && isxdigit(ch2)) {
+                                rs->checksum_array[j] =
+                                    ((ch1 > '9' ? (ch1 - ('A' - 10)) : (ch1 - '0')) << 4) +
+                                     (ch2 > '9' ? (ch2 - ('A' - 10)) : (ch2 - '0'));
+                            }
+                            else {
+                                rs->checksum = NULL;
+                                break;
+                            }
+                        }
+                    }
+                }
+                else if (strcmp(&hdata[tag], "UR") == 0)
+                    rs->uri = &hdata[value];
+                else if (strcmp(&hdata[tag], "SP") == 0)
+                    rs->species = &hdata[value];
+                
+                ++st;
+                ws = 1;
+            }
+            break;
+        case 4:
+            if (cc == '@')
+                return i;
+            tag = i;
+            st = 1;
+            break;
+        }
+    }
+    return st == 4 ? i : 0;
+}
+
+static unsigned ParseRG(BAMReadGroup *dst, unsigned const hlen, char hdata[])
+{
+    unsigned i;
+    unsigned tag;
+    unsigned value;
+    int st = 0;
+    int ws = 1;
+    
+    for (i = 0; i < hlen; ++i) {
+        char const cc = hdata[i];
+        
+        if (ws && isspace(cc))
+            continue;
+        ws = 0;
+        
+        switch (st) {
+        case 0:
+            tag = i;
+            ++st;
+            break;
+        case 1:
+            if (isspace(cc))
+                return 0;
+            ++st;
+            break;
+        case 2:
+            if (cc != ':')
+                continue;
+            hdata[i] = '\0';
+            value = i + 1;
+            ++st;
+            break;
+        case 3:
+            if (cc == '\t' || cc == '\r' || cc == '\n') {
+                unsigned j = i;
+
+                hdata[i] = '\0';
+
+                while (value < i && isspace(hdata[value]))
+                    ++value;
+                while (value < j && isspace(hdata[j - 1]))
+                    hdata[--j] = '\0';
+                
+                if ((hdata[value] == '\"' || hdata[value] == '\'') && hdata[value] == hdata[j - 1]) {
+                    ++value;
+                    hdata[j - 1] = '\0';
+                }
+                if (strcmp(&hdata[tag], "ID") == 0)
+                    dst->name = &hdata[value];
+                else if (strcmp(&hdata[tag], "SM") == 0)
+                    dst->sample = &hdata[value];
+                else if (strcmp(&hdata[tag], "LB") == 0)
+                    dst->library = &hdata[value];
+                else if (strcmp(&hdata[tag], "DS") == 0)
+                    dst->description = &hdata[value];
+                else if (strcmp(&hdata[tag], "PU") == 0)
+                    dst->unit = &hdata[value];
+                else if (strcmp(&hdata[tag], "PI") == 0)
+                    dst->insertSize = &hdata[value];
+                else if (strcmp(&hdata[tag], "CN") == 0)
+                    dst->center = &hdata[value];
+                else if (strcmp(&hdata[tag], "DT") == 0)
+                    dst->runDate = &hdata[value];
+                else if (strcmp(&hdata[tag], "PL") == 0)
+                    dst->platform = &hdata[value];
+                
+                ++st;
+                ws = 1;
+            }
+            break;
+        case 4:
+            if (cc == '@')
+                return i;
+            tag = i;
+            st = 1;
+            break;
+        }
+    }
+    return st == 4 ? i : 0;
+}
+
+static bool ParseHeader(BAM_File *self, char hdata[], size_t hlen) {
+    unsigned rg = 0;
+    unsigned sq = 0;
+    unsigned i;
+    unsigned tag;
+    int st = 0;
+    int ws = 1;
+    
+    for (i = 0; i < hlen; ++i) {
+        char const cc = hdata[i];
+        
+        if (ws && isspace(cc))
+            continue;
+        ws = 0;
+        
+        switch (st) {
+        case 0:
+            if (cc == '@')
+                ++st;
+            else
+                return false;
+            break;
+        case 1:
+            if (isspace(cc))
+                return false;
+            tag = i;
+            ++st;
+            break;
+        case 2:
+            if (isspace(cc)) {
+                hdata[i] = '\0';
+                if (i - tag == 2) {
+                    if (strcmp(&hdata[tag], "HD") == 0) {
+                        unsigned const used = ParseHD(&self->version, hlen - i - 1, &hdata[i + 1]);
+                        if (used == 0) return false;
+                        i += used;
+                        st = 0;
+                        break;
+                    }
+                    if (strcmp(&hdata[tag], "SQ") == 0) {
+                        unsigned const used = ParseSQ(&self->refSeq[sq++], hlen - i - 1, &hdata[i + 1]);
+                        if (used == 0) return false;
+                        i += used;
+                        st = 0;
+                        break;
+                    }
+                    if (strcmp(&hdata[tag], "RG") == 0) {
+                        unsigned const used = ParseRG(&self->readGroup[rg++], hlen - i - 1, &hdata[i + 1]);
+                        if (used == 0) return false;
+                        i += used;
+                        st = 0;
+                        break;
+                    }
+                }
+                if (st == 2) {
+                    ++st;
+                    ws = 0;
+                }
+            }
+            else if (i - tag > 2)
+                ++st;
+            break;
+        case 3:
+            if (cc == '\r' || cc == '\n') {
+                st = 0;
+                ws = 1;
+            }
+            break;
+        }
+    }
+    return true;
+}
+
+static int64_t comp_ReadGroup(const void *A, const void *B, void *ignored) {
+    BAMReadGroup const *const a = A;
+    BAMReadGroup const *const b = B;
+
+    /* make null names sort to the bottom */
+    if (a->name == NULL || b->name == NULL)
+        return 0;
+    if (a->name == NULL)
+        return 1;
+    if (b->name == NULL)
+        return -1;
+    
+    /* make empty names sort to the bottom */
+    if (a->name[0] == '\0' || b->name[0] == '\0')
+        return 0;
+    if (a->name[0] == '\0')
+        return 1;
+    if (b->name[0] == '\0')
+        return -1;
+    
+    return strcmp(a->name, b->name);
+}
+
+static int64_t comp_RefSeqName(const void *A, const void *B, void *ignored) {
+    BAMRefSeq const *const a = A;
+    BAMRefSeq const *const b = B;
+    
+    /* make null names sort to the bottom */
+    if (a->name == NULL || b->name == NULL)
+        return 0;
+    if (a->name == NULL)
+        return 1;
+    if (b->name == NULL)
+        return -1;
+    
+    /* make empty names sort to the bottom */
+    if (a->name[0] == '\0' || b->name[0] == '\0')
+        return 0;
+    if (a->name[0] == '\0')
+        return 1;
+    if (b->name[0] == '\0')
+        return -1;
+    {
+        int const cmp = strcmp(a->name, b->name);
+        return cmp != 0 ? cmp : (int64_t)a->id - (int64_t)b->id;
+    }
+}
+
+static unsigned MeasureHeader(unsigned *RG, unsigned *SQ, char const text[])
+{
+    unsigned size;
+    unsigned cur = 0;
+
+    for (size = 0; ; ++size) {
+        int const ch = text[size];
+
+        if (ch == '\0')
+            return size;
+        if (ch == '\n') {
+            cur = 0;
+            continue;
+        }
+        if (++cur == 3) {
+            if (text[size - 1] == 'R' && ch == 'G') {
+                ++*RG;
+                continue;
+            }
+            if (text[size - 1] == 'S' && ch == 'Q') {
+                ++*SQ;
+                continue;
+            }
+        }
+    }
+}
+
+static rc_t ProcessHeaderText(BAM_File *self, char const text[], bool makeCopy)
+{
+    unsigned RG = 0;
+    unsigned SQ = 0;
+    unsigned const size = MeasureHeader(&RG, &SQ, text);
+    unsigned i;
+
+    if (SQ) {
+        self->refSeq = calloc(SQ, sizeof(self->refSeq[0]));
+        if (self->refSeq == NULL)
+            return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
+    }
+    self->refSeqs = SQ;
+
+    if (RG) {
+        self->readGroup = calloc(RG, sizeof(self->readGroup[0]));
+        if (self->readGroup == NULL)
+            return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
+    }
+    self->readGroups = RG;
+
+    if (makeCopy) {
+        void *const tmp = malloc(size + 1);
+        if (tmp == NULL)
+            return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
+        self->header = tmp;  /* a const copy of the original */
+        memcpy(tmp, text, size + 1);
+    }
+    else
+        self->header = text;
+    {
+    char *const copy = malloc(size + 1); /* an editable copy */
+    if (copy == NULL)
+        return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
+    self->headerData1 = copy; /* so it's not leaked */
+    memcpy(copy, text, size + 1);
+    
+    {
+    bool const parsed = ParseHeader(self, copy, size);
+    if (!parsed)
+        return RC(rcAlign, rcFile, rcParsing, rcData, rcInvalid);
+    }
+    }
+    for (i = 0; i < self->readGroups; ++i)
+        self->readGroup[i].id = i;
+    
+    ksort(self->readGroup, self->readGroups, sizeof(self->readGroup[0]), comp_ReadGroup, NULL);
+    
+    /* remove read groups with missing and empty names */
+    for (i = self->readGroups; i != 0; ) {
+        BAMReadGroup const *const rg = &self->readGroup[--i];
+        char const *const name = rg->name;
+        if (name == NULL || name[0] == '\0') {
+            (void)PLOGMSG(klogWarn, (klogWarn, "Read Group #$(rg) is missing ID in SAM header", "rg=%i", (int)rg->id));
+            --self->readGroups;
+        }
+    }
+    
+    /* check for duplicate read groups names */
+    for (i = 1; i < self->readGroups; ++i) {
+        BAMReadGroup const *const a = &self->readGroup[i - 1];
+        BAMReadGroup const *const b = &self->readGroup[i - 0];
+        
+        if (strcmp(a->name, b->name) == 0) {
+            (void)PLOGMSG(klogWarn, (klogWarn, "Read Groups #$(r1) and #$(r2) have the same ID '$(id)' in SAM header",
+                                     "r1=%i,r2=%i,id=%s", (int)a->id, (int)b->id, a->name));
+        }
+    }
+
+    /* these id's are temporary, for reporting only
+     * in BAM, they'll get the id from the second part of the header
+     * in SAM, they'll get reassigned in alphabetical order
+     */
+    for (i = 0; i < self->refSeqs; ++i)
+        self->refSeq[i].id = i;
+    
+    ksort(self->refSeq, self->refSeqs, sizeof(self->refSeq[0]), comp_RefSeqName, NULL);
+    
+    /* remove references with missing and empty names */
+    for (i = self->refSeqs; i != 0; ) {
+        BAMRefSeq const *const ref = &self->refSeq[--i];
+        char const *const name = ref->name;
+        if (name == NULL || name[0] == '\0') {
+            (void)PLOGMSG(klogWarn, (klogWarn, "Reference #$(rg) is missing name in SAM header", "rg=%i", (int)ref->id));
+            --self->refSeqs;
+        }
+    }
+    
+    /* check for and remove duplicate reference names */
+    for (i = self->refSeqs; i > 1; --i) {
+        BAMRefSeq *const a = &self->refSeq[i - 2];
+        BAMRefSeq *const b = &self->refSeq[i - 1];
+        
+        if (strcmp(a->name, b->name) == 0) {
+            (void)PLOGMSG(klogWarn, (klogWarn, "References #$(r1) and #$(r2) have the same name '$(id)' in SAM header",
+                                     "r1=%i,r2=%i,id=%s", (int)a->id, (int)b->id, a->name));
+            memmove(a, b, (self->refSeqs - i + 1) * sizeof(self->refSeq[0]));
+            --self->refSeqs;
+        }
+    }
+    
+    /* check for zero-length references */
+    for (i = 0; i != self->refSeqs; ++i) {
+        BAMRefSeq const *const rs = &self->refSeq[i];
+        
+        if (rs->length == 0)
+            (void)PLOGMSG(klogWarn, (klogWarn, "Reference '$(ref)' has zero length", "ref=%s", rs->name));
+    }
+
+    return 0;
+}
+
+static rc_t ReadMagic(BAM_File *self)
+{
+    uint8_t sig[4];
+    rc_t rc = BAM_FileReadn(self, 4, sig);
+    
+    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("BAM signature: '%c%c%c' %u\n", sig[0], sig[1], sig[2], sig[3]));
+    if (rc == 0 && (sig[0] != 'B' || sig[1] != 'A' || sig[2] != 'M' || sig[3] != 1))
+        rc = RC(rcAlign, rcFile, rcReading, rcHeader, rcBadVersion);
+    return rc;
+}
+
+static rc_t ReadHeaders(BAM_File *self,
+                        char **headerText, size_t *headerTextLen,
+                        char **refData, unsigned *numrefs)
+{
+    unsigned hlen;
+    char *htxt = NULL;
+    unsigned nrefs;
+    char *rdat = NULL;
+    unsigned rdsz;
+    unsigned rdms;
+    unsigned i;
+    int32_t i32;
+    rc_t rc = BAM_FileReadI32(self, &i32);
+    
+    if (rc) return rc;
+
+    if (i32 < 0) {
+        rc = RC(rcAlign, rcFile, rcReading, rcHeader, rcInvalid);
+        goto BAILOUT;
+    }
+    hlen = i32;
+    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("BAM Header text size: %u\n", hlen));
+
+    htxt = malloc(hlen + 1);
+    if (htxt == NULL) {
+        rc = RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
+        goto BAILOUT;
+    }
+    
+    rc = BAM_FileReadn(self, hlen, (uint8_t *)htxt); if (rc) goto BAILOUT;
+    htxt[hlen] = '\0';
+
+    rc = BAM_FileReadI32(self, &i32); if (rc) goto BAILOUT;
+    if (i32 < 0) {
+        rc = RC(rcAlign, rcFile, rcReading, rcHeader, rcInvalid);
+        goto BAILOUT;
+    }
+    nrefs = i32;
+    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("BAM Header reference count: %u\n", nrefs));
+    if (nrefs) {
+        rdms = nrefs * 16;
+        if (rdms < 4096)
+            rdms = 4096;
+        rdat = malloc(rdms);
+        if (rdat == NULL) {
+            rc = RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
+            goto BAILOUT;
+        }
+        for (i = rdsz = 0; i < nrefs; ++i) {
+            rc = BAM_FileReadI32(self, &i32); if (rc) goto BAILOUT;
+            if (i32 <= 0) {
+                rc = RC(rcAlign, rcFile, rcReading, rcHeader, rcInvalid);
+                goto BAILOUT;
+            }
+            if (rdsz + i32 + 8 > rdms) {
+                void *tmp;
+                
+                do { rdms <<= 1; } while (rdsz + i32 + 8 > rdms);
+                tmp = realloc(rdat, rdms);
+                if (tmp == NULL) {
+                    rc = RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
+                    goto BAILOUT;
+                }
+                rdat = tmp;
+            }
+            memcpy(rdat + rdsz, &i32, 4);
+            rdsz += 4;
+            rc = BAM_FileReadn(self, i32, (uint8_t *)&rdat[rdsz]); if (rc) goto BAILOUT;
+            rdsz += i32;
+            rc = BAM_FileReadI32(self, &i32); if (rc) goto BAILOUT;
+            memcpy(rdat + rdsz, &i32, 4);
+            rdsz += 4;
+        }
+    }
+    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("BAM Header reference size: %u\n", rdsz));
+    
+    *headerText = htxt;
+    *headerTextLen = hlen;
+    *refData = rdat;
+    *numrefs = nrefs;
+    return 0;
+    
+BAILOUT:
+    if (htxt)
+        free(htxt);
+    if (rdat)
+        free(rdat);
+    
+    return rc;
+}
+
+static unsigned FindRefSeqByName(char const name[], bool match, unsigned const N, BAMRefSeq const refSeq[])
+{
+    unsigned f = 0;
+    unsigned e = N;
+        
+    while (f < e) {
+        unsigned const m = f + ((e - f) >> 1);
+        int const cmp = strcmp(name, refSeq[m].name);
+            
+        if (cmp < 0)
+            e = m;
+        else if (cmp > 0)
+            f = m + 1;
+        else
+            return m;
+    }
+    return match ? N : f;
+}
+
+static void FindAndSetupRefSeq(BAMRefSeq *rs, unsigned const refSeqs, BAMRefSeq const refSeq[])
+{
+    unsigned const fnd = FindRefSeqByName(rs->name, true, refSeqs, refSeq);
+    if (fnd != refSeqs) {
+        rs->assemblyId = refSeq[fnd].assemblyId;
+        rs->uri = refSeq[fnd].uri;
+        rs->species = refSeq[fnd].species;
+        if (refSeq[fnd].checksum) {
+            rs->checksum = &rs->checksum_array[0];
+            memcpy(rs->checksum_array, refSeq[fnd].checksum_array, 16);
+        }
+        else
+            rs->checksum = NULL;
+    }
+}
+
+static rc_t ProcessBAMHeader(BAM_File *self, char const headerText[])
+{
+    unsigned i;
+    unsigned cp;
+    char *htxt;
+    char *rdat;
+    size_t hlen;
+    unsigned nrefs;
+    BAMRefSeq *refSeq;
+    rc_t rc = ReadMagic(self);
+
+    if (rc) return rc;
+
+    rc = ReadHeaders(self, &htxt, &hlen, &rdat, &nrefs);
+    if (rc) return rc;
+    
+    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("BAM Data records start at: %lu+%u\n", self->fpos_cur, self->bufCurrent));
+
+    if (nrefs) {
+        refSeq = calloc(nrefs, sizeof(self->refSeq[0]));
+        if (refSeq == NULL)
+            return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
+    }
+
+    if (headerText) {
+        free(htxt);
+        rc = ProcessHeaderText(self, headerText, true);
+    }
+    else
+        rc = ProcessHeaderText(self, htxt, false);
+
+    if (rc) return rc;
+        
+    for (i = cp = 0; i < nrefs; ++i) {
+        unsigned const nlen = LE2HUI32(rdat + cp);
+        char *const name = rdat + cp + 4;
+        unsigned const rlen = LE2HUI32(rdat + cp + nlen + 4);
+        
+        cp += nlen + 8;
+        name[nlen] = '\0';
+
+        refSeq[i].id = i;
+        refSeq[i].name = name;
+        refSeq[i].length = rlen;
+        FindAndSetupRefSeq(&refSeq[i], self->refSeqs, self->refSeq);
+    }
+    free(self->refSeq);
+    self->refSeq = refSeq;
+    self->refSeqs = nrefs;
+    self->headerData2 = rdat; /* so it's not leaked */
+    
+    return 0;
+}
+
+static rc_t ProcessSAMHeader(BAM_File *self, char const substitute[])
+{
+    SAMFile *const file = &self->file.sam;
+    size_t headerSize = 0;
+    char *headerText = NULL;
+    rc_t rc;
+    int st = 0;
+    
+    for ( ; ; ) {
+        void *const tmp = headerText;
+        int const ch = SAMFileRead1(file);
+        
+        if (ch == -1)
+            return SAMFileLastError(file);
+        
+        if (st == 0) {
+            if (ch != '@') {
+                SAMFilePutBack(file, ch);
+                break;
+            }
+            st = 1;
+        }
+        headerText = realloc(headerText, headerSize + 2);
+        if (headerText == NULL) {
+            free(tmp);
+            return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
+        }
+        headerText[headerSize++] = ch;
+        headerText[headerSize] = '\0';
+        if (ch == '\n')
+            st = 0;
+    }
+
+    if (substitute)
+        rc = ProcessHeaderText(self, substitute, true);
+    else if (headerText)
+        rc = ProcessHeaderText(self, headerText, false);
+    else {
+        rc = RC(rcAlign, rcFile, rcConstructing, rcHeader, rcNotFound);
+        (void)LOGERR(klogErr, rc, "SAM header required");
+    }
+    if (rc == 0) {
+        unsigned i;
+
+        for (i = 0; i < self->refSeqs; ++i)
+            self->refSeq[i].id = i;
+    }
+    return rc;
+}
+
+/* MARK: BAM File destructor */
+
+static void BAM_FileWhack(BAM_File *self) {
+    if (self->refSeqs > 0 && self->refSeq)
+        free(self->refSeq);
+    if (self->readGroup)
+        free(self->readGroup);
+    if (self->header)
+        free((void *)self->header);
+    if (self->headerData1)
+        free((void *)self->headerData1);
+    if (self->headerData2)
+        free((void *)self->headerData2);
+    if (self->nocopy)
+        free(self->nocopy);
+    if (self->vt.FileWhack)
+        self->vt.FileWhack(&self->file);
+    KFileRelease(self->defer);
+    BufferedFileWhack(&self->file.bam.file);
+}
+
+/* MARK: BAM File constructors */
+
+/* file is retained */
+static rc_t BAM_FileMakeWithKFileAndHeader(BAM_File **cself,
+                                           KFile const *file,
+                                           char const *headerText)
+{
+    BAM_File *self = calloc(1, sizeof(*self));
+    rc_t rc;
+    
+    if (self == NULL)
+        return RC(rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted);
+    
+    rc = BufferedFileInit(&self->file.bam.file, file);
+    if (rc) {
+        free(self);
+        return rc;
+    }
+    
+    rc = BGZFileInit(&self->file.bam, &self->vt);
+    if (rc == 0) {
+        rc = ProcessBAMHeader(self, headerText);
+        if (rc == 0) {
+            *cself = self;
+            return 0;
+        }
+    }
+    BGZFileWhack(&self->file.bam);
+
+    self->file.sam.file.bpos = 0;
+    rc = SAMFileInit(&self->file.sam, &self->vt);
+    if (rc == 0) {
+        self->isSAM = true;
+        rc = ProcessSAMHeader(self, headerText);
+        if (rc == 0) {
+            *cself = self;
+            return 0;
+        }
+    }
+    BufferedFileWhack(&self->file.sam.file);
+    free(self);
+
+    return rc;
+}
+
+rc_t BAM_FileMake(const BAM_File **cself,
+                  KFile *defer,
+                  char const headerText[],
+                  char const path[], ... )
+{
+    KDirectory *dir;
+    va_list args;
+    rc_t rc;
+    const KFile *kf;
+    
+    if (cself == NULL)
+        return RC(rcAlign, rcFile, rcOpening, rcParam, rcNull);
+    *cself = NULL;
+
+    if (strcmp(path, "/dev/stdin") == 0) {
+        rc = KFileMakeStdIn(&kf);
+    }
+    else {
+        rc = KDirectoryNativeDir(&dir);
+        if (rc) return rc;
+        va_start(args, path);
+        rc = KDirectoryVOpenFileRead(dir, &kf, path, args);
+        va_end(args);
+        KDirectoryRelease(dir);
+    }
+    if (rc == 0) {
+        BAM_File *self = NULL;
+        rc = BAM_FileMakeWithKFileAndHeader(&self, kf, headerText);
+        if (rc == 0) {
+            assert(self != NULL);
+            KFileAddRef(defer);
+            self->defer = defer;
+        }
+        *cself = self;
+        KFileRelease(kf);
+    }
+    return rc;
+}
+
+/* MARK: BAM File ref-counting */
+
+rc_t BAM_FileAddRef(const BAM_File *cself) {
+    return 0;
+}
+
+rc_t BAM_FileRelease(const BAM_File *cself) {
+    BAM_File *self = (BAM_File *)cself;
+    
+    if (cself != NULL) {
+        BAM_FileWhack(self);
+        free(self);
+    }
+    return 0;
+}
+
+/* MARK: BAM File positioning */
+
+float BAM_FileGetProportionalPosition(const BAM_File *self)
+{
+    return self->vt.FileProPos(&self->file);
+}
+
+rc_t BAM_FileGetPosition(const BAM_File *self, BAM_FilePosition *pos) {
+    *pos = (self->fpos_cur << 16) | self->bufCurrent;
+    return 0;
+}
+
+static void BAM_FileAdvance(BAM_File *const self, unsigned distance)
+{
+    self->bufCurrent += distance;
+    if (self->bufCurrent == self->bufSize) {
+        self->fpos_cur = self->vt.FileGetPos(&self->file);
+        self->bufCurrent = 0;
+        self->bufSize = 0;
+    }
+}
+
+/* MARK: BAM Alignment contruction */
+
+static int TagTypeSize(int const type)
+{
+    switch (type) {
+        case dt_ASCII:      /* A */
+        case dt_INT8:       /* c */
+        case dt_UINT8:      /* C */
+            return 1;
+
+        case dt_INT16:      /* s */
+        case dt_UINT16:     /* S */
+            return 2;
+
+        case dt_INT:        /* i */
+        case dt_UINT:       /* I */
+        case dt_FLOAT32:    /* f */
+            return 4;
+#if 0
+        case dt_FLOAT64:    /* d */
+            return 8;
+#endif
+        case dt_CSTRING:    /* Z */
+        case dt_HEXSTRING:  /* H */
+            return -'S';
+
+        case dt_NUM_ARRAY:  /* B */
+            return -'A';
+    }
+    return 0;
+}
+
+static void ColorCheck(BAM_Alignment *const self, char const tag[2], unsigned const len)
+{
+    if (tag[0] == 'C' && len != 0) {
+        int const ch = tag[1];
+        int const flag = ch == 'Q' ? 2 : ch == 'S' ? 1 : 0;
+        
+        if (flag)
+            self->hasColor ^= (len << 2) | flag;
+    }
+}
+
+static rc_t ParseOptData(BAM_Alignment *const self, size_t const maxsize,
+                         size_t const xtra, size_t const datasize)
+{
+    size_t const maxExtra = (maxsize - (sizeof(*self) - sizeof(self->extra))) / sizeof(self->extra[0]);
+    char const *const base = (char const *)self->data->raw;
+    unsigned i = 0;
+    unsigned len;
+    unsigned offset;
+    
+    self->numExtra = 0;
+    for (len = 0, offset = (unsigned)xtra; offset < datasize; offset += len) {
+        int const valuelen1 = TagTypeSize(base[offset + 2]);
+        unsigned valuelen;
+        
+        if (valuelen1 < 0) {
+            char const *const value = &base[offset + 3];
+            
+            if (-valuelen1 == 'S') {
+                valuelen = 0;
+                while (value[valuelen] != '\0') {
+                    ++valuelen;
+                    if (offset + valuelen >= datasize) {
+                        rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
+                        return rc;
+                    }
+                }
+                ColorCheck(self, base + offset, valuelen);
+                ++valuelen;
+            }
+            else {
+                int const elem_size = TagTypeSize(value[0]);
+                
+                assert(-valuelen1 == 'A');
+                if (elem_size <= 0) {
+                    rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcUnexpected);
+                    return rc;
+                }
+                else {
+                    int const elem_count = LE2HI32(&value[1]);
+                    
+                    valuelen = elem_size * elem_count + 1 + 4;
+                    if (offset + valuelen >= datasize) {
+                        rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
+                        return rc;
+                    }
+                }
+            }
+        }
+        else if (valuelen1 == 0) {
+            rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcUnexpected);
+            return rc;
+        }
+        else
+            valuelen = valuelen1;
+        
+        len = valuelen + 3;
+        if (i < maxExtra) {
+            self->extra[i].offset = offset;
+            self->extra[i].size   = len;
+        }
+        ++i;
+    }
+    self->numExtra = i;
+    if (2 <= i && i <= maxExtra)
+        ksort(self->extra, i, sizeof(self->extra[0]), OptTag_sort, self);
+
+    return 0;
+}
+
+static rc_t ParseOptDataLog(BAM_Alignment *const self, unsigned const maxsize,
+                            unsigned const xtra, unsigned const datasize)
+{
+    unsigned const maxExtra = (maxsize - (sizeof(*self) - sizeof(self->extra))) / sizeof(self->extra[0]);
+    char const *const base = (char const *)self->data->raw;
+    unsigned i = 0;
+    unsigned len;
+    unsigned offset;
+    
+    self->numExtra = 0;
+    for (len = 0, offset = (unsigned)xtra; offset < datasize; offset += len) {
+        int const type = base[offset + 2];
+        int const valuelen1 = TagTypeSize(type);
+        unsigned valuelen;
+        
+        if (valuelen1 > 0)
+            valuelen = valuelen1;
+        else if (valuelen1 < 0) {
+            char const *const value = &base[offset + 3];
+            
+            if (-valuelen1 == 'S') {
+                valuelen = 0;
+                while (value[valuelen] != '\0') {
+                    ++valuelen;
+                    if (offset + valuelen >= datasize) {
+                        rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
+                        (void)LOGERR(klogErr, rc,
+                                     "Parsing BAM optional fields: "
+                                     "unterminated string");
+                        return rc;
+                    }
+                }
+                ColorCheck(self, base + offset, valuelen);
+                ++valuelen;
+            }
+            else {
+                int const elem_type = value[0];
+                int const elem_size = TagTypeSize(elem_type);
+                
+                assert(-valuelen1 == 'A');
+                if (elem_size <= 0) {
+                    rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcUnexpected);
+                    (void)LOGERR(klogErr, rc,
+                                 "Parsing BAM optional fields: "
+                                 "unknown array type");
+                    return rc;
+                }
+                else {
+                    int const elem_count = LE2HI32(&value[1]);
+                    
+                    valuelen = elem_size * elem_count + 1 + 4;
+                    if (offset + valuelen >= datasize) {
+                        rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
+                        (void)LOGERR(klogErr, rc,
+                                     "Parsing BAM optional fields: "
+                                     "array too big");
+                        return rc;
+                    }
+                }
+            }
+        }
+        else {
+            rc_t const rc = RC(rcAlign, rcFile, rcReading, rcData, rcUnexpected);
+            (void)LOGERR(klogErr, rc,
+                                    "Parsing BAM optional fields: "
+                                    "unknown type");
+            return rc;
+        }
+        
+        len = valuelen + 3;
+        if (i < maxExtra) {
+            self->extra[i].offset = offset;
+            self->extra[i].size   = len;
+        }
+        ++i;
+    }
+    self->numExtra = i;
+    if (2 <= i && i <= maxExtra)
+        ksort(self->extra, i, sizeof(self->extra[0]), OptTag_sort, self);
+    
+    return 0;
+}
+
+static unsigned BAM_AlignmentSize(unsigned const max_extra_tags)
+{
+    BAM_Alignment const *const y = NULL;
+    
+    return sizeof(*y) + (max_extra_tags ? max_extra_tags - 1 : 0) * sizeof(y->extra);
+}
+
+static unsigned BAM_AlignmentSetOffsets(BAM_Alignment *const self)
+{
+    unsigned const nameLen = getReadNameLength(self);
+    unsigned const cigCnt  = getCigarCount(self);
+    unsigned const readLen = getReadLen(self);
+    unsigned const cigar   = (unsigned)(&((struct bam_alignment_s const *)NULL)->read_name[nameLen] - (const char *)NULL);
+    unsigned const seq     = cigar + 4 * cigCnt;
+    unsigned const qual    = seq + (readLen + 1) / 2;
+    unsigned const xtra    = qual + readLen;
+    
+    self->cigar = cigar;
+    self->seq   = seq;
+    self->qual  = qual;
+    
+    return xtra;
+}
+
+static bool BAM_AlignmentInit(BAM_Alignment *const self, unsigned const maxsize,
+                             unsigned const datasize, void const *const data)
+{
+    memset(self, 0, sizeof(*self));
+    self->data = data;
+    self->datasize = datasize;
+    {
+        unsigned const xtra = BAM_AlignmentSetOffsets(self);
+        
+        if (   datasize >= xtra
+            && datasize >= self->cigar
+            && datasize >= self->seq
+            && datasize >= self->qual)
+        {
+            rc_t const rc = ParseOptData(self, maxsize, xtra, datasize);
+
+            if (rc == 0)
+                return true;
+        }
+        return false;
+    }
+}
+
+static void BAM_AlignmentDebugPrint(BAM_Alignment const *const self)
+{
+    DBGMSG(DBG_ALIGN, DBG_FLAG(DBG_ALIGN_BAM), ("{"
+                                                    "\"BAM record\": "
+                                                    "{ "
+                                                        "\"size\": %u, "
+                                                        "\"name length\": %u, "
+                                                        "\"cigar count\": %u, "
+                                                        "\"read length\": %u, "
+                                                        "\"extra count\": %u "
+                                                    "}"
+                                                "}\n",
+                                                (unsigned)self->datasize,
+                                                (unsigned)getReadNameLength(self),
+                                                (unsigned)getCigarCount(self),
+                                                (unsigned)getReadLen(self),
+                                                (unsigned)self->numExtra));
+}
+
+static bool BAM_AlignmentInitLog(BAM_Alignment *const self, unsigned const maxsize,
+                                unsigned const datasize, void const *const data)
+{
+    memset(self, 0, sizeof(*self));
+    self->data = data;
+    self->datasize = datasize;
+    {
+        unsigned const xtra = BAM_AlignmentSetOffsets(self);
+        
+        if (   datasize >= xtra
+            && datasize >= self->cigar
+            && datasize >= self->seq
+            && datasize >= self->qual)
+        {
+            rc_t const rc = ParseOptDataLog(self, maxsize, xtra, datasize);
+            
+            if (rc == 0) {
+                BAM_AlignmentDebugPrint(self);
+                return true;
+            }
+        }
+        return false;
+    }
+}
+
+static void BAM_AlignmentLogParseError(BAM_Alignment const *self)
+{
+    char const *const reason = self->cigar > self->datasize ? "BAM Record CIGAR too long"
+                             : self->seq   > self->datasize ? "BAM Record SEQ too long"
+                             : self->qual  > self->datasize ? "BAM Record QUAL too long"
+                             : self->qual + getReadLen(self) > self->datasize ? "BAM Record EXTRA too long"
+                             : "BAM Record EXTRA parsing failure";
+    
+    LOGERR(klogErr, RC(rcAlign, rcFile, rcReading, rcRow, rcInvalid), reason);
+}
+
+/* MARK: BAM Alignment readers */
+
+/* returns
+ *  (rcAlign, rcFile, rcReading, rcBuffer, rcNotAvailable)
+ * or
+ *  (rcAlign, rcFile, rcReading, rcBuffer, rcInsufficient)
+ * if should read with copy
+ */
+static
+rc_t BAM_FileReadNoCopy(BAM_File *const self, unsigned actsize[], BAM_Alignment rhs[],
+                       unsigned const maxsize)
+{
+    unsigned const maxPeek = BAM_FileMaxPeek(self);
+    bool isgood;
+
+    *actsize = 0;
+    
+    if (maxPeek == 0) {
+        rc_t const rc = BAM_FileFillBuffer(self);
+
+        if (rc == 0)
+            return BAM_FileReadNoCopy(self, actsize, rhs, maxsize);
+
+        if ((int)GetRCObject(rc) == rcData && GetRCState(rc) == rcInsufficient)
+        {
+            self->eof = true;
+            return SILENT_RC(rcAlign, rcFile, rcReading, rcRow, rcNotFound);
+        }
+        return rc;
+    }
+    if (maxPeek < 4)
+        return SILENT_RC(rcAlign, rcFile, rcReading, rcBuffer, rcNotAvailable);
+    else {
+        int32_t const i32 = BAM_FilePeekI32(self);
+
+        if (i32 <= 0)
+            return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
+        
+        if (maxPeek < i32 + 4)
+        return SILENT_RC(rcAlign, rcFile, rcReading, rcBuffer, rcNotAvailable);
+
+        isgood = BAM_AlignmentInitLog(rhs, maxsize, i32, BAM_FilePeek(self, 4));
+        rhs[0].parent = self;
+    }
+    *actsize = BAM_AlignmentSize(rhs[0].numExtra);
+    if (isgood && *actsize > maxsize)
+        return SILENT_RC(rcAlign, rcFile, rcReading, rcBuffer, rcInsufficient);
+
+    BAM_FileAdvance(self, 4 + rhs->datasize);
+    return isgood ? 0 : RC(rcAlign, rcFile, rcReading, rcRow, rcInvalid);
+}
+
+static
+unsigned BAM_AlignmentSizeFromData(unsigned const datasize, void const *data)
+{
+    BAM_Alignment temp;
+    
+    BAM_AlignmentInit(&temp, sizeof(temp), datasize, data);
+    
+    return BAM_AlignmentSize(temp.numExtra);
+}
+
+static bool BAM_AlignmentIsEmpty(BAM_Alignment const *const self)
+{
+    if (getReadNameLength(self) == 0)
+        return true;
+    if (getReadName(self)[0] == '\0')
+        return true;
+    if (self->hasColor == 3)
+        return false;
+    if (getReadLen(self) != 0)
+        return false;
+    if (getCigarCount(self) != 0)
+        return false;
+    return true;
+}
+
+static
+rc_t BAM_FileReadCopy(BAM_File *const self, BAM_Alignment const *rslt[], bool const log)
+{
+    void *storage;
+    void const *data;
+    unsigned datasize;
+    rc_t rc;
+    
+    rslt[0] = NULL;
+    {
+        int32_t i32;
+
+        rc = BAM_FileReadI32(self, &i32);
+        if ( rc != 0 )
+        {
+            if ((int)GetRCObject(rc) == rcData && GetRCState(rc) == rcInsufficient)
+            {
+                self->eof = true;
+                rc = SILENT_RC(rcAlign, rcFile, rcReading, rcRow, rcNotFound);
+            }
+            return rc;
+        }
+        if (i32 <= 0)
+            return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
+        
+        datasize = i32;
+    }
+    if (BAM_FileMaxPeek(self) < datasize) {
+        data = storage = malloc(datasize);
+        if (storage == NULL)
+            return RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
+        
+        rc = BAM_FileReadn(self, datasize, storage);
+    }
+    else {
+        storage = NULL;
+        data = (bam_alignment *)&self->buffer[self->bufCurrent];
+        
+        BAM_FileAdvance(self, datasize);
+    }
+    if (rc == 0) {
+        unsigned const rsltsize = BAM_AlignmentSizeFromData(datasize, data);
+        BAM_Alignment *const y = malloc(rsltsize);
+
+        if (y) {
+            if ((log ? BAM_AlignmentInitLog : BAM_AlignmentInit)(y, rsltsize, datasize, data)) {
+                if (storage != NULL)
+                    y->storage = storage;
+
+                y->parent = self;
+                rslt[0] = y;
+
+                if (BAM_AlignmentIsEmpty(y))
+                    return RC(rcAlign, rcFile, rcReading, rcRow, rcEmpty);
+                return 0;
+            }
+            rc = RC(rcAlign, rcFile, rcReading, rcRow, rcInvalid);
+            free(y);
+        }
+        else
+            rc = RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
+    }
+    free(storage);
+
+    return rc;
+}
+
+/* MARK: SAM code */
+
+static void SAM2BAM_ConvertShort(void *const Dst, int value)
+{
+    uint8_t *const dst = Dst;
+    dst[0] = (uint8_t)(value >> 0);
+    dst[1] = (uint8_t)(value >> 8);
+}
+
+static void SAM2BAM_ConvertInt(void *const Dst, int value)
+{
+    uint8_t *const dst = Dst;
+    dst[0] = (uint8_t)(value >>  0);
+    dst[1] = (uint8_t)(value >>  8);
+    dst[2] = (uint8_t)(value >> 16);
+    dst[3] = (uint8_t)(value >> 24);
+}
+
+static int SAM2BAM_CIGAR_OpCount(char const cigar[])
+{
+    unsigned i;
+    unsigned n = 0;
+    int st = 0;
+    
+    if (cigar[0] == '*' && cigar[1] == '\0')
+        return 0;
+    
+    for (i = 0; ; ++i) {
+        int const ch = cigar[i];
+        
+        if (ch == '\0')
+            break;
+
+        if (st == 0) {
+            if (!isdigit(ch))
+                return -1;
+            st = 1;
+        }
+        else if (!isdigit(ch)) {
+            ++n;
+            st = 0;
+        }
+    }
+    return st == 0 ? n : -1;
+}
+
+static int SAM2BAM_ConvertCIGAR1(uint8_t dst[4], char const value[])
+{
+    int len = 0;
+    int code = 0;
+    unsigned i = 0;
+    
+    if (value[0] == '\0')
+        return 0;
+    
+    for ( ; ; ) {
+        int const ch = value[i++];
+        
+        if (!isdigit(ch)) {
+            switch (ch) {
+            case 'M':
+                code = 0;
+                break;
+            case 'I':
+                code = 1;
+                break;
+            case 'D':
+                code = 2;
+                break;
+            case 'N':
+                code = 3;
+                break;
+            case 'S':
+                code = 4;
+                break;
+            case 'H':
+                code = 5;
+                break;
+            case 'P':
+                code = 6;
+                break;
+            case '=':
+                code = 7;
+                break;
+            case 'X':
+                code = 8;
+                break;
+            default:
+                return -1;
+            }
+            break;
+        }
+        len = (len * 10) + (ch - '0');
+        if (len >= (1 << 24))
+            return -2;
+    }
+    SAM2BAM_ConvertInt(dst, (len << 4) | code);
+    return i;
+}
+
+static rc_t SAM2BAM_ConvertCIGAR(unsigned const insize, void /* inout */ *const data, void const *const endp)
+{
+    char *const value = data;
+    uint8_t *const dst = (void *)(value + insize);
+    unsigned j = 0;
+    unsigned i;
+
+    for (i = 0; i < insize; ++j) {
+        if ((void const *)(dst + j * 4 + 4) >= endp)
+            return RC(rcAlign, rcFile, rcReading, rcBuffer, rcInsufficient);
+        {
+        int const k = SAM2BAM_ConvertCIGAR1(dst + j * 4, value + i);
+        if (k > 0)
+            i += k;
+        else
+            return k == 0 ? 0 : RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
+        }
+    }
+    memmove(data, dst, 4 * j);
+    return 0;
+}
+
+static int SAM2BAM_ConvertBase(int base)
+{
+    static char const tr[] = {
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,0x0, -1, -1,
+        -1,0x1,0xE,0x2,0xD, -1, -1,0x4,0xB, -1, -1,0xC, -1,0x3,0xF, -1,
+        -1, -1,0x5,0x6,0x8, -1,0x7,0x9, -1,0xA, -1, -1, -1, -1, -1, -1,
+        -1,0x1,0xE,0x2,0xD, -1, -1,0x4,0xB, -1, -1,0xC, -1,0x3,0xF, -1,
+        -1, -1,0x5,0x6,0x8, -1,0x7,0x9, -1,0xA, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+    };
+    return tr[base];
+}
+
+static rc_t SAM2BAM_ConvertSEQ(unsigned const insize, void /* inout */ *const data, void const *const endp)
+{
+    char const *const value = data;
+    uint8_t *const dst = data;
+    unsigned const n = insize & ~((unsigned)1);
+    unsigned j = 0;
+    unsigned i;
+
+    for (i = 0; i < n; i += 2, ++j) {
+        int const hi = SAM2BAM_ConvertBase(value[i + 0]);
+        int const lo = SAM2BAM_ConvertBase(value[i + 1]);
+        
+        if (hi < 0 || lo < 0)
+            return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
+
+        dst[j] = (hi << 4) | lo;
+    }
+    if (n != insize) {
+        int const hi = SAM2BAM_ConvertBase(value[n]);
+        int const lo = 0;
+        
+        if (hi < 0 || lo < 0)
+            return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
+        
+        dst[j] = (hi << 4) | lo;
+    }
+    return 0;
+}
+
+static rc_t SAM2BAM_ConvertQUAL(unsigned const insize, void /* inout */ *const data, void const *const endp)
+{
+    char const *const value = data;
+    uint8_t *const dst = data;
+    unsigned i;
+
+    for (i = 0; i < insize; ++i) {
+        int const ch = value[i];
+        
+        if (ch < '!' || ch > '~')
+            return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
+        dst[i] = ch - 33;
+    }
+    return 0;
+}
+
+static int SAM2BAM_ScanValue(void *const dst, char const *src, bool isFloat, bool isArray)
+{
+    int i = 0;
+    int sgn = 0;
+    uint64_t mantissa = 0;
+    int shift = 0;
+    int exponent = 0;
+    int st = 0;
+
+    if (isArray) {
+        int const ch = src[i++];
+        if (ch != ',')
+            return -1;
+    }
+    for ( ; ; ++i) {
+        int const ch = src[i];
+        int const value = ch - '0';
+
+        if (ch == '\0')
+            break;
+        if (isArray && ch == ',')
+            break;
+        switch (st) {
+        case 0:
+            ++st;
+            if (ch == '-') {
+                sgn = -1;
+                break;
+            }
+            else if (ch == '+') {
+                sgn = 1;
+                break;
+            }
+            /* fallthrough; */
+        case 1:
+            if (ch == '.') {
+                st = 2;
+                break;
+            }
+            if (ch == 'e' || ch == 'E') {
+                st = 3;
+                break;
+            }
+            if (value < 0 || value > 9)
+                return -1;
+            mantissa = mantissa * 10 + value;
+            break;
+        case 2:
+            if (ch == 'e' || ch == 'E') {
+                st = 3;
+                break;
+            }
+            if (value < 0 || value > 9)
+                return -1;
+            mantissa = mantissa * 10 + value;
+            ++shift;
+            break;
+        case 3:
+            ++st;
+            if (ch == '-') {
+                ++st;
+                break;
+            }
+            else if (ch == '+') {
+                break;
+            }
+            /* fallthrough; */
+        case 4:
+            if (value < 0 || value > 9)
+                return -1;
+            exponent = exponent * 10 + value;
+            break;
+        case 5:
+            if (value < 0 || value > 9)
+                return -1;
+            exponent = exponent * 10 - value;
+            break;
+        }
+    }
+    {
+        double const value = mantissa * pow(10, exponent - shift) * (sgn ? sgn : 1);
+        union { int i; float f; } x;
+        if (isFloat)
+            x.f = value;
+        else
+            x.i = floor(value);
+        SAM2BAM_ConvertInt(dst, x.i);
+    }
+    return i;
+}
+
+static int SAM2BAM_ConvertEXTRA(unsigned const insize, void /* inout */ *const data, void const *const endp)
+{
+    if (insize < 5) /* XX:T:\0 */
+        return -1;
+    {
+        char const *const src = data;
+
+        if (src[2] != ':' || src[4] != ':')
+            return -3;
+        {
+            int const type = src[3];
+            char *const dst = data;
+
+            dst[2] = type;
+
+            switch (type) {
+            case 'A':
+                dst[3] = src[5];
+                return 4;
+            case 'H':
+            case 'Z':
+                memmove(dst + 3, src + 5, insize - 5);
+                dst[insize - 2] = '\0';
+                return insize - 1;
+            case 'i':
+            case 'f': {
+                if ((void const *)&dst[7] >= endp)
+                    return -2;
+                {
+                    int const n = SAM2BAM_ScanValue(&dst[3], src + 5, type == 'f', false);
+                    return (n < 0 || n + 5 != insize) ? -4 : 7;
+                }
+            }
+            case 'B':
+                break;
+            default:
+                return -3;
+            }
+
+            if (insize < 8) /* XX:B:T,x\0 */
+                return -1;
+
+            switch (src[5]) {
+            case 'c':
+            case 'C':
+            case 's':
+            case 'S':
+            case 'i':
+            case 'I':
+            case 'f':
+                break;
+            default:
+                return -3;
+            }
+            {
+                uint8_t *const scratch = (void *)(src + insize);
+                int const subtype = src[5] == 'f' ? 'f' : 'i';
+                unsigned i;
+                unsigned j;
+
+                dst[3] = subtype;
+                for (i = 6, j = 0; i < insize; ++j) {
+                    if ((void const *)(scratch + 4 * j + 4) >= endp)
+                        return -2;
+                    {
+                        int const n = SAM2BAM_ScanValue(scratch + 4 * j, src + i, subtype == 'f', true);
+                        if (n < 0)
+                            return -4;
+                        i += n;
+                    }
+                }
+                SAM2BAM_ConvertInt(&dst[4], j);
+                memmove(&dst[8], scratch, 4 * j);
+                return 8 + 4 * j;
+            }
+        }
+    }
+}
+
+static rc_t BAM_FileReadSAM(BAM_File *const self, BAM_Alignment const **const rslt)
+{
+    void const *const endp = self->buffer + sizeof(self->buffer);
+    struct bam_alignment_s *raw = (void *)self->buffer;
+    struct {
+        int namelen;
+        int FLAG;
+        int RNAME;
+        int POS;
+        int MAPQ;
+        int cigars;
+        int RNEXT;
+        int PNEXT;
+        int TLEN;
+        
+        int readlen;
+        
+        char *QNAME;
+        uint32_t *CIGAR; /* probably not aligned */
+        uint8_t *SEQ;
+        uint8_t *QUAL;
+        char *EXTRA;
+    } temp;
+    unsigned field = 1;
+    char *scratch = &raw->read_name[0];
+    int *intScratch = NULL;
+    int sgn = 1;
+    unsigned i = 0;
+    int n = 0;
+    
+    memset(raw, 0, sizeof(*raw));
+    memset(&temp, 0, sizeof(temp));
+    temp.QNAME = scratch;
+    
+    for ( ; ; ) {
+        int const ch = SAMFileRead1(&self->file.sam);
+        if (ch < 0) {
+            rc_t const rc = SAMFileLastError(&self->file.sam);
+            return (i == 0 && field == 1 && (rc == 0 || GetRCState(rc) == rcInsufficient)) ? SILENT_RC(rcAlign, rcFile, rcReading, rcRow, rcNotFound) : rc;
+        }
+        if ((void const *)&scratch[i] >= endp)
+            return RC(rcAlign, rcFile, rcReading, rcBuffer, rcInsufficient);
+
+        if (!(ch == '\t' || ch == '\n')) {
+            if (field != 0) {
+                if (intScratch == NULL) {
+                    scratch[i] = ch;
+                }
+                else {
+                    int const value = ch - '0';
+                    if (ch == '-' && i == 0) {
+                        sgn = -1;
+                    }
+                    else if (ch == '-' && i == 0) {
+                        sgn = 1;
+                    }
+                    else {
+                        if (value < 0 || value > 9) {
+                            LOGERR(klogErr, RC(rcAlign, rcFile, rcReading, rcRow, rcInvalid), "SAM Record error parsing integer field");
+                            return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
+                        }
+                        *intScratch = *intScratch * 10 + value * sgn;
+                    }
+                }
+            }
+            ++i;
+            continue;
+        }
+        if (intScratch == NULL)
+            scratch[i] = '\0';
+        else {
+            intScratch = NULL;
+            sgn = 1;
+        }
+        switch (field) {
+            case 0:
+                if (ch == '\n')
+                    return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
+                break;
+            case 1:
+                if (i == 1 && scratch[0] == '*') {
+                    temp.namelen = 0;
+                }
+                else {
+                    temp.namelen = i + 1; /* includes NULL terminator */
+                    scratch += i + 1;     /* don't want to overwrite it */
+                    if (temp.namelen > 255) {
+                        LOGERR(klogErr, RC(rcAlign, rcFile, rcReading, rcRow, rcInvalid), "SAM Record error QNAME is too long");
+                        field = 0;
+                    }
+                }
+                temp.CIGAR = (void *)scratch;
+                intScratch = &temp.FLAG;
+                break;
+            case 2:
+                break;
+            case 3:
+                if (i == 1 && scratch[0] == '*')
+                    temp.RNAME = -1;
+                else {
+                    unsigned const id = FindRefSeqByName(scratch, true, self->refSeqs, self->refSeq);
+                    if (id < self->refSeqs)
+                        temp.RNAME = id;
+                    else {
+                        LOGERR(klogErr, RC(rcAlign, rcFile, rcReading, rcRow, rcInvalid), "SAM Record missing reference");
+                        field = 0;
+                    }
+                }
+                intScratch = &temp.POS;
+                break;
+            case 4:
+                intScratch = &temp.MAPQ;
+                break;
+            case 5:
+                if (temp.MAPQ > 255) {
+                    LOGERR(klogErr, RC(rcAlign, rcFile, rcReading, rcRow, rcInvalid), "SAM Record error MAPQ > 255");
+                    field = 0;
+                }
+                break;
+            case 6:
+                temp.cigars = SAM2BAM_CIGAR_OpCount(scratch);
+                if (temp.cigars < 0) {
+                    LOGERR(klogErr, RC(rcAlign, rcFile, rcReading, rcRow, rcInvalid), "SAM Record error parsing CIGAR");
+                    field = 0;
+                }
+                else if (temp.cigars > 0) {
+                    scratch += 4 * temp.cigars;
+                    temp.SEQ = (uint8_t *)scratch;
+                    {
+                        rc_t const rc = SAM2BAM_ConvertCIGAR(i, temp.CIGAR, endp);
+                        if (rc) {
+                            LOGERR(klogErr, rc, "SAM Record error parsing CIGAR");
+                            field = 0;
+                        }
+                    }
+                }
+                else
+                    temp.SEQ = (uint8_t *)scratch;
+                break;
+            case 7:
+                if (i == 1 && scratch[0] == '*')
+                    temp.RNEXT = -1;
+                else if (i == 1 && scratch[0] == '=')
+                    temp.RNEXT = temp.RNAME;
+                else {
+                    unsigned const id = FindRefSeqByName(scratch, true, self->refSeqs, self->refSeq);
+                    if (id < self->refSeqs)
+                        temp.RNEXT = id;
+                    else {
+                        LOGERR(klogErr, RC(rcAlign, rcFile, rcReading, rcRow, rcInvalid), "SAM Record missing reference");
+                        field = 0;
+                    }
+                }
+                intScratch = &temp.PNEXT;
+                break;
+            case 8:
+                intScratch = &temp.TLEN;
+                break;
+            case 9:
+                break;
+            case 10:
+                if (i == 1 && scratch[0] == '*')
+                    temp.readlen = 0;
+                else {
+                    temp.readlen = i;
+                    scratch += (temp.readlen + 1) / 2;
+                    temp.QUAL = (uint8_t *)scratch;
+                    {
+                        rc_t const rc = SAM2BAM_ConvertSEQ(i, temp.SEQ, endp);
+                        if (rc) {
+                            LOGERR(klogErr, rc, "SAM Record error converting SEQ");
+                            field = 0;
+                        }
+                    }
+                }
+                break;
+            case 11:
+                if (temp.readlen == 0)
+                    break;
+                if (i == 1 && scratch[0] == '*')
+                    memset(temp.QUAL, 0xFF, temp.readlen);
+                else if (i == temp.readlen) {
+                    rc_t const rc = SAM2BAM_ConvertQUAL(i, temp.QUAL, endp);
+                    if (rc) {
+                        LOGERR(klogErr, rc, "SAM Record error converting QUAL");
+                        field = 0;
+                    }
+                }
+                else {
+                    LOGERR(klogErr, RC(rcAlign, rcFile, rcReading, rcRow, rcInvalid), "SAM Record error length of SEQ != length of QUAL");
+                    field = 0;
+                }
+                scratch += temp.readlen;
+                break;
+            default:
+            {
+                int const n = SAM2BAM_ConvertEXTRA(i, scratch, endp);
+                if (n < 0) {
+                    LOGERR(klogErr, RC(rcAlign, rcFile, rcReading, rcRow, rcInvalid), "SAM Record error parsing optional field");
+                    field = 0;
+                }
+                else {
+                    if (n == 0)
+                        --field;
+                    else
+                        scratch += n;
+                }
+                break;
+            }
+        }
+        if (ch == '\n') {
+            if (field < 11) {
+                rc_t const rc = RC(rcAlign, rcFile, rcReading, rcRow, rcTooShort);
+                LOGERR(klogErr, rc, "SAM Record error too few fields");
+                return rc;
+            }
+            break;
+        }
+        i = 0;
+        if (field > 0)
+            ++field;
+    }
+
+    SAM2BAM_ConvertInt(raw->rID, temp.RNAME);
+    SAM2BAM_ConvertInt(raw->pos, temp.POS - 1);
+    raw->read_name_len = temp.namelen;
+    raw->mapQual = temp.MAPQ;
+    SAM2BAM_ConvertShort(raw->n_cigars, temp.cigars);
+    SAM2BAM_ConvertShort(raw->flags, temp.FLAG);
+    SAM2BAM_ConvertInt(raw->read_len, temp.readlen);
+    SAM2BAM_ConvertInt(raw->mate_rID, temp.RNEXT);
+    SAM2BAM_ConvertInt(raw->mate_pos, temp.PNEXT - 1);
+    SAM2BAM_ConvertInt(raw->ins_size, temp.TLEN);
+    {    
+        unsigned const datasize = (char *)scratch - (char *)self->buffer;
+        unsigned const rsltsize = BAM_AlignmentSizeFromData(datasize, self->buffer);
+        BAM_Alignment *const y = malloc(rsltsize);
+    
+        if (y == NULL)
+            return RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
+
+        if (BAM_AlignmentInitLog(y, rsltsize, datasize, self->buffer)) {
+            y->parent = self;
+            rslt[0] = y;
+        
+            if (BAM_AlignmentIsEmpty(y))
+                return RC(rcAlign, rcFile, rcReading, rcRow, rcEmpty);
+            return 0;
+        }
+        free(y);
+    }
+    return RC(rcAlign, rcFile, rcReading, rcRow, rcInvalid);
+}
+
+static rc_t read2(BAM_File *const self, BAM_Alignment const **const rhs)
+{
+    unsigned actsize = 0;
+    rc_t rc;
+    
+    if (self->bufCurrent >= self->bufSize && self->eof)
+        return SILENT_RC(rcAlign, rcFile, rcReading, rcRow, rcNotFound);
+
+    if (self->isSAM) {
+        rc = BAM_FileReadSAM(self, rhs);
+        if (rc != 0 && GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound)
+            self->eof = true;
+        return rc;
+    }
+    if (self->nocopy == NULL) {
+        size_t const size = 64u * 1024u;
+        void *const temp = malloc(size);
+
+        if (temp == NULL)
+            return RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
+
+        self->nocopy = temp;
+    }
+
+    rc = BAM_FileReadNoCopy(self, &actsize, self->nocopy, 64u * 1024u);
+    if (rc == 0) {
+        *rhs = self->nocopy;
+        if (BAM_AlignmentIsEmpty(self->nocopy)) {
+            rc = RC(rcAlign, rcFile, rcReading, rcRow, rcEmpty);
+            LOGERR(klogWarn, rc, "BAM Record contains no alignment or sequence data");
+        }
+    }
+    else if ((int)GetRCObject(rc) == rcBuffer && GetRCState(rc) == rcInsufficient)
+    {
+        return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
+    }
+    else if ((int)GetRCObject(rc) == rcBuffer && GetRCState(rc) == rcNotAvailable)
+    {
+        rc = BAM_FileReadCopy(self, rhs, true);
+    }
+    else if ((int)GetRCObject(rc) == rcRow && GetRCState(rc) == rcInvalid) {
+        BAM_AlignmentLogParseError(self->nocopy);
+    }
+    return rc;
+}
+
+static rc_t readDefer(BAM_File *const self, BAM_Alignment const **const rslt)
+{
+    uint32_t datasize = 0;
+    size_t nread = 0;
+    rc_t rc = 0;
+
+    rc = KFileReadAll(self->defer, self->deferPos, &datasize, 4, &nread);
+    if (rc) return rc;
+    if (nread == 0) {
+        KFileRelease(self->defer);
+        self->defer = NULL;
+        return SILENT_RC(rcAlign, rcFile, rcReading, rcRow, rcNotFound);
+    }
+    assert(nread == 4);
+    assert(datasize < 64u * 1024u);
+    if (self->nocopy == NULL) {
+        size_t const size = 64u * 1024u;
+        void *const temp = malloc(size);
+
+        if (temp == NULL)
+            return RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
+
+        self->nocopy = temp;
+    }
+
+    rc = KFileReadAll(self->defer, self->deferPos + 4, self->buffer, datasize, &nread);
+    if (rc) return rc;
+    assert(nread == datasize);
+    self->deferPos += 4 + datasize;
+    
+    BAM_AlignmentInitLog(self->nocopy, 64u * 1024u, datasize, self->buffer);
+    self->nocopy->parent = self;
+    *rslt = self->nocopy;
+    if (BAM_AlignmentIsEmpty(self->nocopy)) {
+        rc = RC(rcAlign, rcFile, rcReading, rcRow, rcEmpty);
+        LOGERR(klogWarn, rc, "BAM Record contains no alignment or sequence data");
+    }
+    return rc;
+}
+
+static rc_t writeExactly(KFile *const f, uint64_t const pos, void const *const data, size_t const size) {
+    char const *const p = (char const *)data;
+    size_t written = 0;
+
+    while (written < size) {
+        size_t num_writ = 0;
+        rc_t const rc = KFileWrite(f, pos + written, p + written, size - written, &num_writ);
+        if (rc) return rc;
+        written += num_writ;
+    }
+    return 0;
+}
+
+static rc_t writeDefer(BAM_File *const self, BAM_Alignment const *const algn)
+{
+    rc_t rc = 0;
+
+    rc = writeExactly(self->defer, self->deferPos, &algn->datasize, 4);
+    if (rc) return rc;
+    rc = writeExactly(self->defer, self->deferPos + 4, algn->data, algn->datasize);
+    if (rc) return rc;
+    self->deferPos += 4 + algn->datasize;
+    return 0;
+}
+
+rc_t BAM_FileRead2(const BAM_File *cself, const BAM_Alignment **rhs)
+{
+    BAM_File *const self = (BAM_File *)cself;
+    
+    if (self == NULL || rhs == NULL)
+        return RC(rcAlign, rcFile, rcReading, rcParam, rcNull);
+    
+    *rhs = NULL;
+
+    if (self->eof && self->defer != NULL) {
+        return readDefer(self, rhs);
+    }
+    for ( ; ; ) {
+        rc_t const rc = read2(self, rhs);
+        if (rc != 0) {
+            if (self->eof && self->defer != NULL) {
+                self->deferPos = 0;
+                return readDefer(self, rhs);
+            }
+            return rc;
+        }
+        if (self->defer && BAM_AlignmentShouldDefer(*rhs)) {
+            rc_t const rc = writeDefer(self, *rhs);
+            if (rc) return rc;
+        }
+        else
+            break;
+    }
+    return 0;
+}
+
+rc_t BAM_FileRead(const BAM_File *cself, const BAM_Alignment **rhs)
+{
+    assert(!"deprecated");
+    abort();
+}
+
+/* MARK: BAM File header info accessor */
+
+rc_t BAM_FileGetRefSeqById(const BAM_File *cself, int32_t id, const BAMRefSeq **rhs)
+{
+    *rhs = NULL;
+    if (id >= 0 && id < cself->refSeqs)
+        *rhs = &cself->refSeq[id];
+    return 0;
+}
+
+rc_t BAM_FileGetReadGroupByName(const BAM_File *cself, const char *name, const BAMReadGroup **rhs)
+{
+    BAMReadGroup rg;
+    
+    *rhs = NULL;
+
+    rg.name = name;
+    if (rg.name != NULL)
+        *rhs = kbsearch(&rg, cself->readGroup, cself->readGroups, sizeof(rg), comp_ReadGroup, NULL);
+
+    return 0;
+}
+
+rc_t BAM_FileGetRefSeqCount(const BAM_File *cself, unsigned *rhs)
+{
+    *rhs = cself->refSeqs;
+    return 0;
+}
+
+rc_t BAM_FileGetRefSeq(const BAM_File *cself, unsigned i, const BAMRefSeq **rhs)
+{
+    *rhs = NULL;
+    if (i < cself->refSeqs)
+        *rhs = &cself->refSeq[i];
+    return 0;
+}
+
+rc_t BAM_FileGetReadGroupCount(const BAM_File *cself, unsigned *rhs)
+{
+    *rhs = cself->readGroups;
+    return 0;
+}
+
+rc_t BAM_FileGetReadGroup(const BAM_File *cself, unsigned i, const BAMReadGroup **rhs)
+{
+    *rhs = NULL;
+    if (i < cself->readGroups)
+        *rhs = &cself->readGroup[i];
+    return 0;
+}
+
+rc_t BAM_FileGetHeaderText(BAM_File const *cself, char const **header, size_t *header_len)
+{
+    *header = cself->header;
+    *header_len = *header ? string_size( *header ) : 0;
+    return 0;
+}
+
+/* MARK: BAM Alignment destructor */
+
+static rc_t BAM_AlignmentWhack(BAM_Alignment *self)
+{
+    if (self != self->parent->nocopy) {
+        free(self->storage);
+        free(self);
+    }
+    return 0;
+}
+
+/* MARK: BAM Alignment ref-counting */
+
+rc_t BAM_AlignmentAddRef(const BAM_Alignment *cself)
+{
+    return 0;
+}
+
+rc_t BAM_AlignmentRelease(const BAM_Alignment *cself)
+{
+    BAM_AlignmentWhack((BAM_Alignment *)cself);
+
+    return 0;
+}
+
+rc_t BAM_AlignmentCopy(const BAM_Alignment *self, BAM_Alignment **rslt)
+{
+    unsigned const rsltsize = BAM_AlignmentSize(self->numExtra);
+    unsigned const padded = (rsltsize + 15UL) & ~15UL;
+    void *const tmp = malloc(padded + self->datasize);
+    void *const tmp2 = &((char *)tmp)[padded];
+
+    assert(tmp != NULL);
+    if (tmp == NULL) {
+        LOGMSG(klogFatal, "OUT OF MEMORY");
+        abort();
+    }
+    memcpy(tmp, self, rsltsize);
+    memcpy(tmp2, self->data, self->datasize);
+    *rslt = tmp;
+    (**rslt).data = tmp2;
+    (**rslt).storage = NULL;
+
+    return 0;
+}
+
+static bool BAM_AlignmentShouldDefer(BAM_Alignment const *const self)
+{
+    int const flags = getFlags(self);
+    if (flags & BAMFlags_SelfIsUnmapped)
+        return false;
+    if (flags & BAMFlags_IsNotPrimary)
+        return true;
+    if (flags & BAMFlags_IsSupplemental)
+        return true;
+    return false;
+}
+
+#if 0
+uint16_t BAM_AlignmentIffyFields(const BAM_Alignment *self)
+{
+}
+
+uint16_t BAM_AlignmentBadFields(const BAM_Alignment *self)
+{
+}
+#endif
+
+/* MARK: BAM Alignment accessors */
+
+static uint32_t BAM_AlignmentGetCigarElement(const BAM_Alignment *self, unsigned i)
+{
+    return LE2HUI32(&((uint8_t const *)getCigarBase(self))[i * 4]);
+}
+
+rc_t BAM_AlignmentGetRefSeqId(const BAM_Alignment *cself, int32_t *rhs)
+{
+    *rhs = getRefSeqId(cself);
+    return 0;
+}
+
+rc_t BAM_AlignmentGetPosition(const BAM_Alignment *cself, int64_t *rhs)
+{
+    *rhs = getPosition(cself);
+    return 0;
+}
+
+bool BAM_AlignmentIsMapped(const BAM_Alignment *cself)
+{
+    if (((getFlags(cself) & BAMFlags_SelfIsUnmapped) == 0) && getRefSeqId(cself) >= 0 && getPosition(cself) >= 0)
+        return true;
+    return false;
+}
+
+/* static bool BAM_AlignmentIsMateMapped(const BAM_Alignment *cself)
+{
+    if (((getFlags(cself) & BAMFlags_MateIsUnmapped) == 0) && getMateRefSeqId(cself) >= 0 && getMatePos(cself) >= 0)
+        return true;
+    return false;
+} */
+
+rc_t BAM_AlignmentGetAlignmentDetail(
+                                                  const BAM_Alignment *self,
+                                                  BAM_AlignmentDetail *rslt, uint32_t count, uint32_t *actual,
+                                                  int32_t *pfirst, int32_t *plast
+                                                  )
+{
+    unsigned i;
+    unsigned ccnt; /* cigar count */
+    int32_t  gpos; /* refSeq pos in global coordinates */
+    unsigned rpos; /* read pos (always local coordinates) */
+    uint32_t rlen; /* read length */
+    int32_t first = -1;
+    int32_t last = -1;
+
+    if (!self)
+        return RC(rcAlign, rcFile, rcReading, rcSelf, rcNull);
+
+    rlen = getReadLen(self);
+    ccnt = getCigarCount(self);
+    gpos = getPosition(self);
+    
+    if (gpos < 0)
+        ccnt = 0;
+    
+    if (actual)
+        *actual = ccnt;
+    
+    if (pfirst)
+        *pfirst = -1;
+
+    if (plast)
+        *plast = -1;
+
+    if (ccnt == 0)
+        return 0;
+    
+    if (rslt == NULL) {
+        if (actual == NULL)
+            return RC(rcAlign, rcFile, rcReading, rcParam, rcNull);
+        count = 0;
+    }
+    
+    if (count < ccnt)
+        return RC(rcAlign, rcFile, rcReading, rcBuffer, rcInsufficient);
+        
+    for (rpos = 0, i = 0; i != ccnt; ++i) {
+        uint32_t len = BAM_AlignmentGetCigarElement(self, i);
+        int op = len & 0x0F;
+        
+        if (op > sizeof(cigarChars))
+            return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
+        
+        op = cigarChars[op];
+        len >>= 4;
+        
+        rslt[i].refSeq_pos = gpos;
+        rslt[i].read_pos = rpos;
+        rslt[i].length = len;
+        rslt[i].type = (BAMCigarType)op;
+        
+        switch ((BAMCigarType)op) {
+        case ct_Match:
+        case ct_Equal:
+            if (first == -1)
+                first = i;
+            last = i;
+            gpos += len;
+            rpos += len;
+            break;
+        case ct_Insert:
+        case ct_SoftClip:
+            gpos += len;
+            break;
+        case ct_Delete:
+        case ct_Skip:
+            rpos += len;
+            break;
+        case ct_HardClip:
+        case ct_Padded:
+            rslt[i].refSeq_pos = -1;
+            rslt[i].read_pos = -1;
+            break;
+        default:
+            break;
+        }
+        
+        if (rslt[i].read_pos > rlen)
+            return RC(rcAlign, rcFile, rcReading, rcData, rcInvalid);
+    }
+    if (pfirst)
+        *pfirst = first;
+    
+    if (plast)
+        *plast = last;
+    
+    return 0;
+}
+
+static
+unsigned ReferenceLengthFromCIGAR(const BAM_Alignment *self)
+{
+    unsigned i;
+    unsigned n = getCigarCount(self);
+    unsigned y;
+    
+    for (i = 0, y = 0; i != n; ++i) {
+        uint32_t const len = BAM_AlignmentGetCigarElement(self, i);
+        
+        switch (cigarChars[len & 0x0F]) {
+        case ct_Match:
+        case ct_Equal:
+        case ct_NotEqual:
+        case ct_Delete:
+        case ct_Skip:
+            y += len >> 4;
+            break;
+        default:
+            break;
+        }
+    }
+    return y;
+}
+
+static unsigned SequenceLengthFromCIGAR(const BAM_Alignment *self)
+{
+    unsigned i;
+    unsigned n = getCigarCount(self);
+    unsigned y;
+    
+    for (i = 0, y = 0; i != n; ++i) {
+        uint32_t const len = BAM_AlignmentGetCigarElement(self, i);
+        
+        switch (cigarChars[len & 0x0F]) {
+        case ct_Match:
+        case ct_Equal:
+        case ct_NotEqual:
+        case ct_Insert:
+        case ct_SoftClip:
+            y += len >> 4;
+            break;
+        default:
+            break;
+        }
+    }
+    return y;
+}
+
+rc_t BAM_AlignmentGetPosition2(const BAM_Alignment *cself, int64_t *rhs, uint32_t *length)
+{
+    *rhs = getPosition(cself);
+    if (*rhs >= 0)
+        *length = ReferenceLengthFromCIGAR(cself);
+    return 0;
+}
+
+rc_t BAM_AlignmentGetReadGroupName(const BAM_Alignment *cself, const char **rhs)
+{
+    *rhs = get_RG(cself);
+    return 0;
+}
+
+rc_t BAM_AlignmentGetReadName(const BAM_Alignment *cself, const char **rhs)
+{
+    *rhs = getReadName(cself);
+    return 0;
+}
+
+rc_t BAM_AlignmentGetReadName2(const BAM_Alignment *cself, const char **rhs, size_t *length)
+{
+    *length = getReadNameLength(cself) - 1;
+    *rhs = getReadName(cself);
+    return 0;
+}
+
+rc_t BAM_AlignmentGetReadName3(const BAM_Alignment *cself, const char **rhs, size_t *length)
+{
+    char const *const name = getReadName(cself);
+    size_t len = getReadNameLength(cself);
+    size_t i;
+    
+    for (i = len; i; ) {
+        int const ch = name[--i];
+        
+        if (ch == '/') {
+            len = i;
+            break;
+        }
+        if (!isdigit(ch))
+            break;
+    }
+    *rhs = name;
+    *length = len;
+
+    return 0;
+}
+
+rc_t BAM_AlignmentGetFlags(const BAM_Alignment *cself, uint16_t *rhs)
+{
+    *rhs = getFlags(cself);
+    return 0;
+}
+
+rc_t BAM_AlignmentGetMapQuality(const BAM_Alignment *cself, uint8_t *rhs)
+{
+    *rhs = getMapQual(cself);
+    return 0;
+}
+
+rc_t BAM_AlignmentGetCigarCount(const BAM_Alignment *cself, unsigned *rhs)
+{
+    *rhs = getCigarCount(cself);
+    return 0;
+}
+
+rc_t BAM_AlignmentGetRawCigar(const BAM_Alignment *cself, uint32_t const *rslt[], uint32_t *length)
+{
+    *rslt = getCigarBase(cself);
+    *length = getCigarCount(cself);
+    return 0;
+}
+
+rc_t BAM_AlignmentGetCigar(const BAM_Alignment *cself, uint32_t i, BAMCigarType *type, uint32_t *length)
+{
+    uint32_t x;
+    
+    if (i >= getCigarCount(cself))
+        return RC(rcAlign, rcFile, rcReading, rcParam, rcInvalid);
+
+    x = BAM_AlignmentGetCigarElement(cself, i);
+    *type = (BAMCigarType)(cigarChars[x & 0x0F]);
+    *length = x >> 4;
+    return 0;
+}
+
+rc_t BAM_AlignmentGetReadLength(const BAM_Alignment *cself, uint32_t *rhs)
+{
+    *rhs = getReadLen(cself);
+    return 0;
+}
+
+static int get1Base(BAM_Alignment const *const self, unsigned const i)
+{
+/*
+ *   =    A    C    M    G    R    S    V    T    W    Y    H    K    D    B    N
+ * 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
+ * 1111 1000 0100 1100 0010 1010 0110 1110 0001 1001 0101 1101 0011 1011 0111 0000
+ *   N    T    G    K    C    Y    S    B    A    W    R    D    M    H    V    =
+ */
+    static const char  tr[16] = "=ACMGRSVTWYHKDBN";
+/*  static const char ctr[16] = "=TGKCYSBAWRDMHVN"; */
+    uint8_t const *const seq = &self->data->raw[self->seq];
+    unsigned const b4na2 = seq[i >> 1];
+    unsigned const b4na = (i & 1) == 0 ? (b4na2 >> 4) : (b4na2 & 0x0F);
+    
+    return tr[b4na];
+}
+
+static int get1Qual(BAM_Alignment const *const self, unsigned const i)
+{
+    uint8_t const *const src = &self->data->raw[self->qual];
+    
+    return src[i];
+}
+
+rc_t BAM_AlignmentGetSequence2(const BAM_Alignment *cself, char *rhs, uint32_t start, uint32_t stop)
+{
+    unsigned const n = getReadLen(cself);
+    unsigned si, di;
+    
+    if (stop == 0 || stop > n)
+        stop = n;
+    
+    for (di = 0, si = start; si != stop; ++si, ++di) {
+        rhs[di] = get1Base(cself, si);
+    }
+    return 0;
+}
+
+rc_t BAM_AlignmentGetSequence(const BAM_Alignment *cself, char *rhs)
+{
+    return BAM_AlignmentGetSequence2(cself, rhs, 0, 0);
+}
+
+bool BAM_AlignmentHasColorSpace(BAM_Alignment const *cself)
+{
+    return get_CS(cself) != NULL;
+}
+
+rc_t BAM_AlignmentGetCSKey(BAM_Alignment const *cself, char rhs[1])
+{
+    char const *const vCS = get_CS(cself);
+    
+    if (vCS)
+        rhs[0] = vCS[0];
+    return 0;
+}
+
+rc_t BAM_AlignmentGetCSSeqLen(BAM_Alignment const *cself, uint32_t *rhs)
+{
+    struct offset_size_s const *const vCS = get_CS_info(cself);
+    
+    *rhs = vCS ? vCS->size - 5 : 0;
+    return 0;
+}
+
+rc_t BAM_AlignmentGetCSSequence(BAM_Alignment const *cself, char rhs[], uint32_t seqlen)
+{
+    char const *const vCS = get_CS(cself);
+    
+    if (vCS) {
+        unsigned i;
+        
+        for (i = 0;i != seqlen; ++i) {
+            char const ch = vCS[i+1];
+            
+            rhs[i] = (ch == '4') ? '.' : ch;
+        }
+    }
+    return 0;
+}
+
+rc_t BAM_AlignmentGetQuality(const BAM_Alignment *cself, const uint8_t **rhs)
+{
+    *rhs = &cself->data->raw[cself->qual];
+    return 0;
+}
+
+rc_t BAM_AlignmentGetQuality2(BAM_Alignment const *cself, uint8_t const **rhs, uint8_t *offset)
+{
+    uint8_t const *const OQ = get_OQ(cself);
+    
+    if (OQ) {
+        struct offset_size_s const *const oq = get_OQ_info(cself);
+        
+        if (oq->size - 4 == getReadLen(cself)) {
+            *offset = 33;
+            *rhs = OQ;
+        }
+        else
+            return RC(rcAlign, rcRow, rcReading, rcData, rcInconsistent);
+    }
+    else {
+        *offset = 0;
+        *rhs = &cself->data->raw[cself->qual];
+    }
+    return 0;
+}
+
+rc_t BAM_AlignmentGetCSQuality(BAM_Alignment const *cself, uint8_t const **rhs, uint8_t *offset)
+{
+    struct offset_size_s const *const cs = get_CS_info(cself);
+    struct offset_size_s const *const cq = get_CQ_info(cself);
+    uint8_t const *const CQ = get_CQ(cself);
+    
+    if (cs && cq && CQ) {
+        if (cs->size == cq->size) {
+            *offset = 33;
+            *rhs = CQ + 1;
+            return 0;
+        }
+        if (cs->size == cq->size + 1) {
+            *offset = 33;
+            *rhs = CQ;
+            return 0;
+        }
+        return RC(rcAlign, rcRow, rcReading, rcData, rcInconsistent);
+    }
+    *offset = 0;
+    *rhs = &cself->data->raw[cself->qual];
+    return 0;
+}
+
+rc_t BAM_AlignmentGetMateRefSeqId(const BAM_Alignment *cself, int32_t *rhs)
+{
+    *rhs = getMateRefSeqId(cself);
+    return 0;
+}
+
+rc_t BAM_AlignmentGetMatePosition(const BAM_Alignment *cself, int64_t *rhs)
+{
+    *rhs = getMatePos(cself);
+    return 0;
+}
+
+rc_t BAM_AlignmentGetInsertSize(const BAM_Alignment *cself, int64_t *rhs)
+{
+    *rhs = getInsertSize(cself);
+    return 0;
+}
+
+static int FormatOptData(BAM_Alignment const *const self,
+                         size_t const maxsize,
+                         char buffer[])
+{
+    char const *const base = (char const *)&self->data->raw[self->qual + getReadLen(self)];
+    unsigned i;
+    unsigned offset;
+    unsigned cur = 0;
+    int j;
+    
+    for (i = 0, offset = 0; i < self->numExtra; ++i) {
+        int type;
+        union { float f; uint32_t i; } fi;
+        
+        if (cur + 7 > maxsize)
+            return -1;
+        buffer[cur++] = '\t';
+        buffer[cur++] = base[offset++];
+        buffer[cur++] = base[offset++];
+        buffer[cur++] = ':';
+        type = base[offset++];
+
+        switch (type) {
+            case dt_ASCII:      /* A */
+                buffer[cur++] = 'A';
+                buffer[cur++] = ':';
+                buffer[cur++] = base[offset++];
+                break;
+
+            case dt_INT8:       /* c */
+                buffer[cur++] = 'i';
+                buffer[cur++] = ':';
+                j = snprintf(buffer + cur, maxsize - cur, "%i", (int)*((int8_t const *)(base + offset)));
+                if ((cur += j) >= maxsize)
+                    return -1;
+                offset += 1;
+                break;
+
+            case dt_UINT8:      /* C */
+                buffer[cur++] = 'i';
+                buffer[cur++] = ':';
+                j = snprintf(buffer + cur, maxsize - cur, "%u", (unsigned)*((uint8_t const *)(base + offset)));
+                if ((cur += j) >= maxsize)
+                    return -1;
+                offset += 1;
+                break;
+                
+            case dt_INT16:      /* s */
+                buffer[cur++] = 'i';
+                buffer[cur++] = ':';
+                j = snprintf(buffer + cur, maxsize - cur, "%i", (int)LE2HI16(base + offset));
+                if ((cur += j) >= maxsize)
+                    return -1;
+                offset += 2;
+                break;
+
+            case dt_UINT16:     /* S */
+                buffer[cur++] = 'i';
+                buffer[cur++] = ':';
+                j = snprintf(buffer + cur, maxsize - cur, "%u", (unsigned)LE2HUI16(base + offset));
+                if ((cur += j) >= maxsize)
+                    return -1;
+                offset += 2;
+                break;
+                
+            case dt_INT:        /* i */
+                buffer[cur++] = 'i';
+                buffer[cur++] = ':';
+                j = snprintf(buffer + cur, maxsize - cur, "%i", (int)LE2HI32(base + offset));
+                if ((cur += j) >= maxsize)
+                    return -1;
+                offset += 4;
+                break;
+
+            case dt_UINT:       /* I */
+                buffer[cur++] = 'i';
+                buffer[cur++] = ':';
+                j = snprintf(buffer + cur, maxsize - cur, "%i", (int)LE2HI32(base + offset));
+                if ((cur += j) >= maxsize)
+                    return -1;
+                offset += 4;
+                break;
+
+            case dt_FLOAT32:    /* f */
+                buffer[cur++] = 'f';
+                buffer[cur++] = ':';
+                fi.i = LE2HUI32(base + offset);
+                j = snprintf(buffer + cur, maxsize - cur, "%f", fi.f);
+                if ((cur += j) >= maxsize)
+                    return -1;
+                while (buffer[cur - 1] == '0')
+                    --cur;
+                if (buffer[cur - 1] == '.')
+                    --cur;
+                offset += 4;
+                break;
+
+            case dt_HEXSTRING:  /* H */
+            case dt_CSTRING:    /* Z */
+                buffer[cur++] = type == dt_CSTRING ? 'Z' : 'H';
+                buffer[cur++] = ':';
+                for ( ; ; ) {
+                    int const ch = base[offset++];
+                    
+                    if (ch == '\0')
+                        break;
+                    if (cur >= maxsize)
+                        return -1;
+                    buffer[cur++] = ch;
+                }
+                break;
+
+            case dt_NUM_ARRAY:  /* B */
+                buffer[cur++] = 'B';
+                buffer[cur++] = ':';
+                {
+                    int const elemtype = base[offset++];
+                    unsigned const elemcount = LE2HUI32(base + offset);
+                    unsigned k;
+
+                    if (cur + 2 >= maxsize)
+                        return -1;
+                    buffer[cur++] = elemtype;
+                    offset += 4;
+                    for (k = 0; k < elemcount; ++k) {
+                        buffer[cur++] = ',';
+                        switch (elemtype) {
+                            case dt_INT8:
+                                j = snprintf(buffer + cur, maxsize - cur, "%i", (int)*((int8_t const *)(base + offset)));
+                                if ((cur += j) >= maxsize)
+                                    return -1;
+                                offset += 1;
+                                break;
+                                
+                            case dt_UINT8:
+                                j = snprintf(buffer + cur, maxsize - cur, "%u", (unsigned)*((uint8_t const *)(base + offset)));
+                                if ((cur += j) >= maxsize)
+                                    return -1;
+                                offset += 1;
+                                break;
+                                
+                            case dt_INT16:
+                                j = snprintf(buffer + cur, maxsize - cur, "%i", (int)LE2HI16(base + offset));
+                                if ((cur += j) >= maxsize)
+                                    return -1;
+                                offset += 2;
+                                break;
+                                
+                            case dt_UINT16:
+                                j = snprintf(buffer + cur, maxsize - cur, "%u", (unsigned)LE2HUI16(base + offset));
+                                if ((cur += j) >= maxsize)
+                                    return -1;
+                                offset += 2;
+                                break;
+                                
+                            case dt_INT:
+                                j = snprintf(buffer + cur, maxsize - cur, "%i", (int)LE2HI32(base + offset));
+                                if ((cur += j) >= maxsize)
+                                    return -1;
+                                offset += 4;
+                                break;
+                                
+                            case dt_UINT:
+                                j = snprintf(buffer + cur, maxsize - cur, "%u", (unsigned)LE2HUI32(base + offset));
+                                if ((cur += j) >= maxsize)
+                                    return -1;
+                                offset += 4;
+                                break;
+                                
+                            case dt_FLOAT32:
+                                fi.i = LE2HUI32(base + offset);
+                                j = snprintf(buffer + cur, maxsize - cur, "%f", fi.f);
+                                if ((cur += j) >= maxsize)
+                                    return -1;
+                                while (buffer[cur - 1] == '0')
+                                    --cur;
+                                if (buffer[cur - 1] == '.')
+                                    --cur;
+                                offset += 4;
+                                break;
+
+                            default:
+                                return -1;
+                                break;
+                        }
+                    }
+                }
+                break;
+
+            default:
+                return -1;
+                break;
+        }
+    }
+    return cur;
+}
+
+static rc_t FormatSAM(BAM_Alignment const *self,
+                      size_t *const actsize,
+                      size_t const maxsize,
+                      char *const buffer)
+{
+    int i = 0;
+    size_t cur = 0;
+    unsigned j;
+    int const refSeqId = getRefSeqId(self);
+    int const refPos = getPosition(self);
+    unsigned const cigCount = getCigarCount(self);
+    uint32_t const *const cigar = getCigarBase(self);
+    int const mateRefSeqId = getMateRefSeqId(self);
+    int const mateRefPos = getMatePos(self);
+    unsigned const readlen = getReadLen(self);
+
+    i = snprintf(&buffer[cur], maxsize - cur,
+                 "%s\t%i\t%s\t%i\t%i\t",
+                 getReadName(self),
+                 getFlags(self),
+                 refSeqId < 0 ? "*" : self->parent->refSeq[refSeqId].name,
+                 refPos < 0 ? 0 : refPos + 1,
+                 getMapQual(self)
+                 );
+    if ((cur += i) > maxsize)
+        return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
+
+    if (cigCount > 0) {
+        for (j = 0; j < cigCount; ++j) {
+            uint32_t const el = cigar[j];
+            BAMCigarType const type = (BAMCigarType)(cigarChars[el & 0x0F]);
+            unsigned const length = el >> 4;
+
+            i = snprintf(&buffer[cur], maxsize - cur, "%u%c", length, type);
+            if ((cur += i) > maxsize)
+                return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
+        }
+    }
+    else {
+        if ((cur + 1) > maxsize)
+            return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
+        buffer[cur++] = '*';
+    }
+    i = snprintf(&buffer[cur], maxsize - cur,
+                 "\t%s\t%i\t%i\t",
+                 mateRefSeqId < 0 ? "*" : mateRefSeqId == refSeqId ? "=" : self->parent->refSeq[mateRefSeqId].name,
+                 mateRefPos < 0 ? 0 : mateRefPos + 1,
+                 getInsertSize(self)
+                 );
+    if ((cur += i) > maxsize)
+        return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
+    if (readlen) {
+        uint8_t const *const qual = &self->data->raw[self->qual];
+        
+        if (cur + 2 * readlen + 1 > maxsize)
+            return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
+        BAM_AlignmentGetSequence(self, &buffer[cur]);
+        cur += readlen;
+        buffer[cur] = '\t';
+        ++cur;
+        
+        for (j = 0; j < readlen; ++j) {
+            if (qual[j] != 0xFF)
+                goto HAS_QUAL;
+        }
+        if (1) {
+            buffer[cur++] = '*';
+        }
+        else {
+    HAS_QUAL:
+            for (j = 0; j < readlen; ++j)
+                buffer[cur++] = qual[j] + 33;
+        }
+    }
+    else {
+        i = snprintf(&buffer[cur], maxsize - cur, "*\t*");
+        if ((cur += i) > maxsize)
+            return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
+    }
+    i = FormatOptData(self, maxsize - cur, &buffer[cur]);
+    if (i < 0)
+        return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
+    if ((cur += i) + 2 > maxsize)
+        return RC(rcAlign, rcRow, rcReading, rcData, rcExcessive);
+    buffer[cur++] = '\n';
+    buffer[cur] = '\0';
+    *actsize = cur;
+
+    return 0;
+}
+
+#define FORMAT_SAM_SCRATCH_SIZE ((size_t)(64u * 1024u))
+static rc_t FormatSAMBuffer(BAM_Alignment const *self,
+                            size_t actSize[],
+                            size_t const maxsize,
+                            char *const buffer)
+{
+    char scratch[FORMAT_SAM_SCRATCH_SIZE];
+    size_t actsize = 0;
+    rc_t const rc = FormatSAM(self, &actsize, FORMAT_SAM_SCRATCH_SIZE, scratch);
+
+    actSize[0] = actsize;
+    if (rc) return rc;
+    
+    if (actsize > maxsize)
+        return RC(rcAlign, rcReading, rcRow, rcBuffer, rcInsufficient);
+
+    memcpy(buffer, scratch, actsize);
+    return 0;
+}
+
+rc_t BAM_AlignmentFormatSAM(BAM_Alignment const *self,
+                                         size_t *const actSize,
+                                         size_t const maxsize,
+                                         char *const buffer)
+{
+    if (self == NULL)
+        return RC(rcAlign, rcReading, rcRow, rcSelf, rcNull);
+    if (buffer == NULL)
+        return RC(rcAlign, rcReading, rcRow, rcParam, rcNull);
+    else {
+        size_t actsize = 0;
+        rc_t const rc = (maxsize < FORMAT_SAM_SCRATCH_SIZE ? FormatSAMBuffer : FormatSAM)(self, &actsize, maxsize, buffer);
+
+        if (actSize)
+            *actSize = actsize;
+        return rc;
+    }
+}
+
+typedef struct OptForEach_ctx_s {
+    BAMOptData *val;
+    BAMOptData **alloced;
+    size_t valsize;
+    rc_t rc;
+    BAMOptionalDataFunction user_f;
+    void *user_ctx;
+} OptForEach_ctx_t;
+
+static bool i_OptDataForEach(BAM_Alignment const *cself, void *Ctx, char const tag[2], BAMOptDataValueType type, unsigned count, void const *value, unsigned size)
+{
+    OptForEach_ctx_t *ctx = (OptForEach_ctx_t *)Ctx;
+    size_t const need = (size_t)&((BAMOptData const *)NULL)->u.f64[(count * size + sizeof(double) - 1)/sizeof(double)];
+    
+    if (need > ctx->valsize) {
+        void *const temp = realloc(ctx->alloced, need);
+        if (temp == NULL) {
+            ctx->rc = RC(rcAlign, rcFile, rcReading, rcMemory, rcExhausted);
+            return true;
+        }
+        *ctx->alloced = ctx->val = temp;
+        ctx->valsize = need;
+    }
+    ctx->val->type = type;
+    ctx->val->element_count = (type == dt_CSTRING || type == dt_HEXSTRING) ? size - 1 : count;
+    
+    memcpy(ctx->val->u.u8, value, size * count);
+#if __BYTE_ORDER == __BIG_ENDIAN
+    {{
+        unsigned di;
+        uint32_t elem_count = ctx->val->element_count;
+        
+        switch (size) {
+        case 2:
+            for (di = 0; di != elem_count; ++di)
+                ctx->val->u.u16[di] = LE2HUI16(&ctx->val->u.u16[di]);
+            break;
+        case 4:
+            for (di = 0; di != elem_count; ++di)
+                ctx->val->u.u32[di] = LE2HUI32(&ctx->val->u.u32[di]);
+            break;
+        case 8:
+            for (di = 0; di != elem_count; ++di)
+                ctx->val->u.u64[di] = LE2HUI64(&ctx->val->u.u64[di]);
+            break;
+        }
+    }}
+#endif
+    ctx->rc = ctx->user_f(ctx->user_ctx, tag, ctx->val);
+    return ctx->rc != 0;
+}
+
+rc_t BAM_AlignmentOptDataForEach(const BAM_Alignment *cself, void *user_ctx, BAMOptionalDataFunction f)
+{
+    union u {
+        BAMOptData value;
+        uint8_t storage[4096];
+    } value_auto;
+    OptForEach_ctx_t ctx;
+    rc_t rc = 0;
+    unsigned i;
+    
+    ctx.val = &value_auto.value;
+    ctx.alloced = NULL;
+    ctx.valsize = sizeof(value_auto);
+    ctx.rc = 0;
+    ctx.user_f = f;
+    ctx.user_ctx = user_ctx;
+    
+    for (i = 0; i != cself->numExtra; ++i) {
+        char const *const tag = (char const *)&cself->data->raw[cself->extra[i].offset];
+        uint8_t type = tag[2];
+        uint8_t const *const vp = (uint8_t const *)&tag[3];
+        unsigned len = cself->extra[i].size - 3;
+        unsigned size = cself->extra[i].size - 3;
+        unsigned count = 1;
+        unsigned offset = 0;
+        
+        if (type == dt_NUM_ARRAY) {
+            unsigned elem_size = 0;
+            uint32_t elem_count = 0;
+            
+            offset = len = 5;
+            switch (vp[0]) {
+            case dt_INT8:
+            case dt_UINT8:
+                elem_size = 1;
+                break;
+            case dt_INT16:
+            case dt_UINT16:
+                elem_size = 2;
+                break;
+            case dt_FLOAT32:
+            case dt_INT:
+            case dt_UINT:
+                elem_size = 4;
+                break;
+#if 0
+            case dt_FLOAT64:
+                elem_size = 8;
+                break;
+#endif
+            default:
+                rc = RC(rcAlign, rcFile, rcReading, rcData, rcUnexpected);
+                break;
+            }
+            if (rc)
+                break;
+            elem_count = LE2HUI32(&vp[1]);
+            len += elem_size * elem_count;
+            type = vp[0];
+            count = elem_count;
+            size = elem_size;
+            break;
+        }
+        if (i_OptDataForEach(cself, &ctx, tag, type, count, &vp[offset], size))
+            break;
+    }
+    rc = rc ? rc : ctx.rc;
+    if (ctx.alloced)
+        free(ctx.alloced);
+    return rc;
+}
+
+/* MARK: Complete Genomics stuff */
+
+bool BAM_AlignmentHasCGData(BAM_Alignment const *self)
+{
+    return get_CG_GC_info(self) && get_CG_GS_info(self) && get_CG_GQ_info(self);
+}
+
+rc_t BAM_AlignmentCGReadLength(BAM_Alignment const *self, uint32_t *readlen)
+{
+    struct offset_size_s const *const GCi = get_CG_GC_info(self);
+    struct offset_size_s const *const GSi = get_CG_GS_info(self);
+    struct offset_size_s const *const GQi = get_CG_GQ_info(self);
+    
+    if (GCi && GSi && GQi) {
+        char const *GS = (char const *)&self->data->raw[GSi->offset + 3];
+        char const *GQ = (char const *)&self->data->raw[GQi->offset + 3];
+        char const *GC = (char const *)&self->data->raw[GCi->offset + 3];
+        unsigned oplen = 0;
+        unsigned i;
+        unsigned di = 0;
+        unsigned si = 0;
+        
+        for (i = 0; ; ++i) {
+            int const ch = GC[i];
+            
+            if (ch == '\0')
+                break;
+            if (isdigit(ch)) {
+                oplen = oplen * 10 + (ch - '0');
+            }
+            else if (ch != 'S' && ch != 'G')
+                return RC(rcAlign, rcRow, rcReading, rcData, rcUnexpected);
+            else {
+                unsigned const jmax = (ch == 'G') ? (oplen * 2) : oplen;
+                unsigned j;
+                
+                if (ch == 'S') {
+                    ;
+                }
+                else {
+                    for (j = 0; j < jmax; ++j) {
+                        int const base = *GS++;
+                        int const qual = *GQ++;
+                        
+                        switch (base) {
+                            case 'A':
+                            case 'C':
+                            case 'M':
+                            case 'G':
+                            case 'R':
+                            case 'S':
+                            case 'V':
+                            case 'T':
+                            case 'W':
+                            case 'Y':
+                            case 'H':
+                            case 'K':
+                            case 'D':
+                            case 'B':
+                            case 'N':
+                                break;
+                            default:
+                                return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
+                        }
+                        if (qual < 33)
+                            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
+                    }
+                }
+                si += oplen;
+                di += jmax;
+                oplen = 0;
+            }
+        }
+        if (*GS != '\0' || *GQ != '\0' || si != getReadLen(self))
+            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
+        
+        *readlen = di;
+        return 0;
+    }
+    return SILENT_RC(rcAlign, rcRow, rcReading, rcData, rcNotFound);
+}
+
+static unsigned BAM_AlignmentParseCGTag(BAM_Alignment const *self, size_t const max_cg_segs, unsigned cg_segs[/* max_cg_segs */])
+{
+    struct offset_size_s const *const GCi = get_CG_GC_info(self);
+    char const *cur = (char const *)&self->data->raw[GCi->offset + 3];
+    unsigned i = 0;
+    int last_op = 0;
+
+    memset(cg_segs, 0, max_cg_segs * sizeof(cg_segs[0]));
+    
+    while (*cur != '\0' && i < max_cg_segs) {
+        char *endp;
+        unsigned const op_len = (unsigned)strtol(cur, &endp, 10);
+        int const op = *endp;
+        
+        cur = endp + 1;
+        if (op == last_op)
+            cg_segs[i - 1] += op_len;
+        else
+            cg_segs[i++] = op_len;
+        last_op = op;
+    }
+    return i;
+}
+
+static
+rc_t ExtractInt32(BAM_Alignment const *self, int32_t *result,
+                  struct offset_size_s const *const tag)
+{
+    int64_t y;
+    int const type = self->data->raw[tag->offset + 2];
+    void const *const pvalue = &self->data->raw[tag->offset + 3];
+    
+    switch (type) {
+    case 'c':
+        if (tag->size == 4)
+            y = *((int8_t const *)pvalue);
+        else
+            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
+        break;
+    case 'C':
+        if (tag->size == 4)
+            y = *((uint8_t const *)pvalue);
+        else
+            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
+        break;
+    case 's':
+        if (tag->size == 5)
+            y = LE2HI16(pvalue);
+        else
+            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
+        break;
+    case 'S':
+        if (tag->size == 5)
+            y = LE2HUI16(pvalue);
+        else
+            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
+        break;
+    case 'i':
+        if (tag->size == 7)
+            y = LE2HI32(pvalue);
+        else
+            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
+        break;
+    case 'I':
+        if (tag->size == 7)
+            y = LE2HUI32(pvalue);
+        else
+            return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
+        break;
+    default:
+        return SILENT_RC(rcAlign, rcRow, rcReading, rcData, rcNotFound);
+    }
+    if (INT32_MIN <= y && y <= INT32_MAX) {
+        *result = (int32_t)y;
+        return 0;
+    }
+    return RC(rcAlign, rcRow, rcReading, rcData, rcInvalid);
+}
+
+rc_t BAM_AlignmentGetCGAlignGroup(BAM_Alignment const *self,
+                                    char buffer[],
+                                    size_t max_size,
+                                    size_t *act_size)
+{
+    struct offset_size_s const *const ZA = get_CG_ZA_info(self);
+    struct offset_size_s const *const ZI = get_CG_ZI_info(self);
+    
+    if (ZA && ZI) {
+        rc_t rc;
+        int32_t za;
+        int32_t zi;
+        
+        rc = ExtractInt32(self, &za, ZA); if (rc) return rc;
+        rc = ExtractInt32(self, &zi, ZI); if (rc) return rc;
+        return string_printf(buffer, max_size, act_size, "%i_%i", zi, za);
+    }
+    return SILENT_RC(rcAlign, rcRow, rcReading, rcData, rcNotFound);
+}
+
+rc_t BAM_AlignmentGetCGSeqQual(BAM_Alignment const *self,
+                                 char sequence[],
+                                 uint8_t quality[])
+{
+    struct offset_size_s const *const GCi = get_CG_GC_info(self);
+    struct offset_size_s const *const GSi = get_CG_GS_info(self);
+    struct offset_size_s const *const GQi = get_CG_GQ_info(self);
+    
+    if (GCi && GSi && GQi) {
+        char const *GS = (char const *)&self->data->raw[GSi->offset + 3];
+        char const *GQ = (char const *)&self->data->raw[GQi->offset + 3];
+        char const *GC = (char const *)&self->data->raw[GCi->offset + 3];
+        unsigned oplen = 0;
+        unsigned di = 0;
+        unsigned si = 0;
+        
+        for ( ; ; ) {
+            int const ch = *GC++;
+
+            if (ch == '\0')
+                break;
+            if (isdigit(ch)) {
+                oplen = oplen * 10 + (ch - '0');
+                continue;
+            }
+            if (ch == 'S') {
+                unsigned i;
+                
+                for (i = 0; i < oplen; ++i, ++di, ++si) {
+                    unsigned const base = get1Base(self, si);
+                    unsigned const qual = get1Qual(self, si);
+                    
+                    sequence[di] = base;
+                    quality [di] = qual;
+                }
+            }
+            else {
+                unsigned i;
+                
+                for (i = 0; i < oplen * 2; ++i, ++di) {
+                    unsigned const base = *GS++;
+                    unsigned const qual = *GQ++ - 33;
+                    
+                    sequence[di] = base;
+                    quality [di] = qual;
+                }
+                si += oplen;
+            }
+            oplen = 0;
+        }
+        return 0;
+    }
+    return SILENT_RC(rcAlign, rcRow, rcReading, rcData, rcNotFound);
+}
+
+
+static unsigned splice(uint32_t cigar[], unsigned n, unsigned at, unsigned out, unsigned in, uint32_t const new_values[/* in */])
+{
+    assert(at + out <= n);
+    memmove(&cigar[at + in], &cigar[at + out], (n - at - out) * 4);
+    if (in)
+        memcpy(&cigar[at], new_values, in * 4);
+    return n + in - out;
+}
+
+#define OPCODE_2_FIX (0xF)
+
+static unsigned insert_B(unsigned const T, unsigned const G, unsigned const n, uint32_t cigar[/* n */])
+{
+    unsigned i;
+    unsigned pos;
+    
+    for (pos = i = 0; i < n; ++i) {
+        int const opcode = cigar[i] & 0xF;
+        
+        switch (opcode) {
+        case 0:
+        case 1:
+        case 4:
+        case 7:
+        case 8:
+            {{
+                unsigned const len = cigar[i] >> 4;
+                unsigned const nxt = pos + len;
+                
+                if (pos <= T && T <= nxt) {
+                    unsigned const l = T - pos;
+                    unsigned const r = len - l;
+                    uint32_t op[4];
+                    
+                    op[0] = (l << 4) | opcode;
+                    op[1] = (G << 4) | 9; /* B */
+                    op[2] = (G << 4) | 0; /* M this is not backwards */
+                    op[3] = (r << 4) | opcode;
+                    
+                    return splice(cigar, n, i, 1,
+                                   4 - (l == 0 ? 1 : 0) - (r == 0 ? 1 : 0),
+                                  op + (l == 0 ? 1 : 0));
+                }
+                pos = nxt;
+            }}
+            break;
+        default:
+            break;
+        }
+    }
+    return n;
+}
+
+static unsigned canonicalize(uint32_t cigar[], unsigned n)
+{
+    unsigned i;
+    
+    /* remove zero-length and P operations */
+    for (i = n; i > 0; ) {
+        --i;
+        if (cigar[i] >> 4 == 0 || (cigar[i] & 0xF) == 6)
+            n = splice(cigar, n, i, 1, 0, NULL);
+    }
+    /* merge adjacent operations of the same type */
+    for (i = 1; i < n; ) {
+        unsigned const opL = cigar[i-1] & 0xF;
+        unsigned const opI = cigar[ i ] & 0xF;
+        
+        if (opI == opL) {
+            unsigned const oplen = (cigar[i] >> 4) + (cigar[i-1] >> 4);
+            uint32_t const op = (oplen << 4) | opI;
+
+            n = splice(cigar, n, i-1, 2, 1, &op);
+        }
+        else
+            ++i;
+    }
+    return n;
+}
+
+static unsigned GetCGCigar(BAM_Alignment const *self, unsigned const N, uint32_t cigar[/* N */])
+{
+    unsigned i;
+    unsigned S;
+    unsigned n = getCigarCount(self);
+    unsigned seg[64];
+    unsigned const segs = BAM_AlignmentParseCGTag(self, sizeof(seg)/sizeof(seg[0]), seg);
+    unsigned const gaps = (segs - 1) >> 1;
+    
+    if (2 * gaps + 1 != segs)
+        return RC(rcAlign, rcRow, rcReading, rcData, rcUnexpected);
+    
+    if (N < n + 2 * gaps)
+        return RC(rcAlign, rcRow, rcReading, rcBuffer, rcInsufficient);
+    
+    memcpy(cigar, getCigarBase(self), n * 4);
+
+    if (n > 1)
+        n = canonicalize(cigar, n); /* just in case */
+    
+    for (i = 0, S = 0; i < gaps; ++i) {
+        unsigned const s = seg[2 * i + 0];
+        unsigned const g = seg[2 * i + 1];
+
+        S += s + g;
+        if (g > 0)
+            n = insert_B(S, g, n, cigar);
+        S += g;
+    }
+    return n;
+}
+
+rc_t BAM_AlignmentGetCGCigar(BAM_Alignment const *self,
+                               uint32_t *cigar,
+                               uint32_t cig_max,
+                               uint32_t *cig_act)
+{
+    struct offset_size_s const *const GCi = get_CG_GC_info(self);
+    
+    *cig_act = 0;
+    
+    if (GCi) {
+        *cig_act = GetCGCigar(self, cig_max, cigar);
+        return 0;
+    }
+    return SILENT_RC(rcAlign, rcRow, rcReading, rcData, rcNotFound);
+}
+
+/* MARK: end CG stuff */
+
+rc_t BAM_AlignmentGetTI(BAM_Alignment const *self, uint64_t *ti)
+{
+    char const *const TI = get_XT(self);
+    long long unsigned temp;
+    
+    if (TI && sscanf(TI, "ti|%llu", &temp) == 1) {
+        *ti = (uint64_t)temp;
+        return 0;
+    }
+    return SILENT_RC(rcAlign, rcRow, rcReading, rcData, rcNotFound);
+}
+
+rc_t BAM_AlignmentGetRNAStrand(BAM_Alignment const *const self, uint8_t *const rslt)
+{
+    if (rslt) {
+        uint8_t const *const XS = get_XS(self);
+        
+	    *rslt = XS ? XS[0] : ' ';
+    }
+    return 0;
+}
+
+rc_t BAM_AlignmentGetLinkageGroup(BAM_Alignment const *self,
+                                  char const **name)
+{
+    *name = get_BX(self);
+    return 0;
+}
diff --git a/tools/bam-loader/bam.h b/tools/bam-loader/bam.h
new file mode 100644
index 0000000..b4e1d53
--- /dev/null
+++ b/tools/bam-loader/bam.h
@@ -0,0 +1,592 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+/*--------------------------------------------------------------------------
+ * BAM_Alignment
+ */
+typedef struct BAM_Alignment BAM_Alignment;
+
+/* AddRef
+ * Release
+ */
+rc_t BAM_AlignmentAddRef ( const BAM_Alignment *self );
+rc_t BAM_AlignmentRelease ( const BAM_Alignment *self );
+
+rc_t BAM_AlignmentCopy(const BAM_Alignment *self, BAM_Alignment **rslt);
+
+/* GetReadLength
+ *  get the sequence length
+ *  i.e. the number of elements of both sequence and quality
+ *
+ *  "length" [ OUT ] - length in bases of query sequence and quality
+ */
+rc_t BAM_AlignmentGetReadLength ( const BAM_Alignment *self, uint32_t *length );
+
+
+/* GetSequence
+ *  get the sequence data [0..ReadLength)
+ *  caller provides buffer of ReadLength bytes
+ *
+ *  "sequence" [ OUT ] - pointer to a buffer of at least ReadLength bytes
+ */
+rc_t BAM_AlignmentGetSequence ( const BAM_Alignment *self, char *sequence );
+
+/* GetSequence2
+ *  get the sequence data [0..ReadLength)
+ *  caller provides buffer of ReadLength bytes
+ *
+ *  "sequence" [ OUT ] - pointer to a buffer of at least ReadLength bytes
+ *
+ *  "start" [ IN ] and "stop" [ IN ] - zero-based coordinates, half-closed interval
+ */
+rc_t BAM_AlignmentGetSequence2 ( const BAM_Alignment *self, char *sequence, uint32_t start, uint32_t stop);
+
+    
+/* GetQuality
+ *  get the raw quality data [0..ReadLength)
+ *  values are unsigned with 0xFF == missing
+ *
+ *  "quality" [ OUT ] - return param for quality sequence
+ *   held internally, validity is guaranteed for the life of the BAM_Alignment
+ */
+rc_t BAM_AlignmentGetQuality ( const BAM_Alignment *self, const uint8_t **quality );
+
+/* GetQuality2
+ *  get the raw quality data [0..ReadLength) from OQ if possible else from QUAL
+ *  values are unsigned with 0xFF == missing
+ *
+ *  "quality" [ OUT ] - return param for quality sequence
+ *   held internally, validity is guaranteed for the life of the BAM_Alignment
+ */
+rc_t BAM_AlignmentGetQuality2(const BAM_Alignment *self, const uint8_t **quality, uint8_t *offset);
+
+/* GetRefSeqId
+ *  get id of reference sequence
+ *  pass result into BAM_FileGetRefSeqById to get the Reference Sequence record
+ *
+ *  "refSeqId" [ OUT ] - zero-based id of reference sequence
+ *   returns -1 if set as invalid within BAM ( rc may be zero )
+ */
+rc_t BAM_AlignmentGetRefSeqId ( const BAM_Alignment *self, int32_t *refSeqId );
+
+/* GetMateRefSeqId
+ *  get id of mate's reference sequence
+ *  pass result into BAM_FileGetRefSeqById to get the Reference Sequence record
+ *
+ *  "refSeqId" [ OUT ] - zero-based id of reference sequence
+ *   returns -1 if invalid
+ */
+rc_t BAM_AlignmentGetMateRefSeqId ( const BAM_Alignment *self, int32_t *refSeqId );
+
+
+/* GetPosition
+ *  get the aligned position on the ref. seq.
+ *
+ *  "n" [ IN ] - zero-based position index for cases of multiple alignments
+ *
+ *  "pos" [ OUT ] - zero-based position on reference sequence
+ *  returns -1 if invalid
+ */
+rc_t BAM_AlignmentGetPosition ( const BAM_Alignment *self, int64_t *pos );
+    
+/* GetPosition2
+ *  get the aligned start position on the ref. seq.
+ *  get the aligned length on the ref. seq.
+ *
+ *  "n" [ IN ] - zero-based position index for cases of multiple alignments
+ *
+ *  "pos" [ OUT ] - zero-based position on reference sequence
+ *  returns -1 if invalid
+ *
+ *  "length" [ OUT ] - length of alignment on reference sequence
+ *  returns 0 if invalid
+ */
+rc_t BAM_AlignmentGetPosition2 ( const BAM_Alignment *self, int64_t *pos, uint32_t *length );
+    
+
+/* GetMatePosition
+ *  starting coordinate of mate's alignment on ref. seq.
+ *
+ *  "pos" [ OUT ] - zero-based position on reference sequence
+ *  returns -1 if invalid
+ */
+rc_t BAM_AlignmentGetMatePosition ( const BAM_Alignment *self, int64_t *pos );
+
+
+/* IsMapped
+ *  is the alignment mapped to something
+ */
+bool BAM_AlignmentIsMapped ( const BAM_Alignment *self );
+
+
+/* GetReadGroupName
+ *  get the name of the read group (i.e. accession)
+ *  pass result into BAM_FileGetReadGroupByName to get the Read Group record
+ *
+ *  "name" [ OUT ] - return param for NUL-terminated read group name
+ *   held internally, validity is guaranteed for the life of the BAM_Alignment
+ */
+rc_t BAM_AlignmentGetReadGroupName ( const BAM_Alignment *self, const char **name );
+
+
+/* GetReadName
+ *  get the read name (i.e. spot name)
+ * GetReadName2
+ *  get the read name and length in bytes
+ *
+ *  "name" [ OUT ] - return param for NUL-terminated read name
+ *   held internally, validity is guaranteed for the life of the BAM_Alignment
+ *
+ *  "length" [ OUT ] - return the number of bytes in "name"
+ *   excluding terminating NUL.
+ */
+rc_t BAM_AlignmentGetReadName ( const BAM_Alignment *self, const char **name );
+rc_t BAM_AlignmentGetReadName2 ( const BAM_Alignment *self, const char **name, size_t *length );
+    
+    
+/* GetReadName3
+ *  get the read name and length in bytes
+ *  applies fixups to name
+ *
+ *  "name" [ OUT ] - return param for read name
+ *   held internally, validity is guaranteed for the life of the BAM_Alignment
+ *
+ *  "length" [ OUT ] - return the number of bytes in "name"
+ */
+rc_t BAM_AlignmentGetReadName3 ( const BAM_Alignment *self, const char **name, size_t *length );
+
+/* HasColorSpace
+ *  Does the alignment have colorspace info
+ */
+bool BAM_AlignmentHasColorSpace ( const BAM_Alignment *self );
+
+/* GetCSKey
+ *  get the colorspace key
+ *
+ *  "cskey" [ OUT ] - return param 
+ */
+rc_t BAM_AlignmentGetCSKey ( const BAM_Alignment *self, char cskey[1] );
+
+rc_t BAM_AlignmentGetCSSeqLen ( const BAM_Alignment *self, uint32_t *seqLen );
+/* GetCSSequence
+ *  get the colorspace sequence data [0..seqLen)
+ *  caller provides buffer of seqLen bytes
+ *
+ *  "csseq" [ OUT ] - pointer to a buffer of at least seqLen bytes
+ *  "seqLen" [ IN ] - length of sequence from BAM_AlignmentGetCSSeqLen
+ */
+rc_t BAM_AlignmentGetCSSequence ( const BAM_Alignment *self, char *csseq, uint32_t seqLen );
+
+rc_t BAM_AlignmentGetCSQuality(BAM_Alignment const *cself, uint8_t const **quality, uint8_t *offset);
+
+
+/* GetFlags
+ *  return the raw "flags" bitmap word
+ *
+ *  "flags" [ OUT ] - return parameter for bitmap word
+ */
+enum BAMFlags
+{
+    BAMFlags_bit_WasPaired = 0,  /* was paired when sequenced */
+    BAMFlags_bit_IsMappedAsPair,
+    BAMFlags_bit_SelfIsUnmapped,
+    BAMFlags_bit_MateIsUnmapped,
+    BAMFlags_bit_SelfIsReverse,
+    BAMFlags_bit_MateIsReverse,
+    BAMFlags_bit_IsFirst,        /* and mate exists */
+    BAMFlags_bit_IsSecond,       /* and mate exists */
+    BAMFlags_bit_IsNotPrimary,   /* a read having split hits may have multiple primary alignments */
+    BAMFlags_bit_IsLowQuality,   /* fails platform/vendor quality checks */
+    BAMFlags_bit_IsDuplicate,    /* PCR or optical dup */
+    BAMFlags_bit_IsSupplemental,
+    
+    BAMFlags_WasPaired      = (1 << BAMFlags_bit_WasPaired),
+    BAMFlags_IsMappedAsPair	= (1 << BAMFlags_bit_IsMappedAsPair),
+    BAMFlags_SelfIsUnmapped	= (1 << BAMFlags_bit_SelfIsUnmapped),
+    BAMFlags_MateIsUnmapped	= (1 << BAMFlags_bit_MateIsUnmapped),
+    BAMFlags_SelfIsReverse  = (1 << BAMFlags_bit_SelfIsReverse),
+    BAMFlags_MateIsReverse  = (1 << BAMFlags_bit_MateIsReverse),
+    BAMFlags_IsFirst        = (1 << BAMFlags_bit_IsFirst),
+    BAMFlags_IsSecond       = (1 << BAMFlags_bit_IsSecond),
+    BAMFlags_IsNotPrimary   = (1 << BAMFlags_bit_IsNotPrimary),
+    BAMFlags_IsLowQuality   = (1 << BAMFlags_bit_IsLowQuality),
+    BAMFlags_IsDuplicate    = (1 << BAMFlags_bit_IsDuplicate),
+    BAMFlags_IsSupplemental = (1 << BAMFlags_bit_IsSupplemental)
+};
+
+rc_t BAM_AlignmentGetFlags ( const BAM_Alignment *self, uint16_t *flags );
+
+
+/* GetMapQuality
+ *  return the quality score of mapping
+ *
+ *  "qual" [ OUT ] - return param for quality score
+ */
+rc_t BAM_AlignmentGetMapQuality ( const BAM_Alignment *self, uint8_t *qual );
+
+
+/* GetAlignmentDetail
+ *  get the alignment details
+ *
+ *  "rslt" [ OUT, NULL OKAY ] and "count" [ IN ] - array to hold detail records
+ *
+ *  "actual" [ OUT, NULL OKAY ] - number of elements written to "rslt"
+ *   required if "rslt" is not NULL
+ *
+ *  "firstMatch" [ OUT, NULL OKAY ] - zero-based index into "rslt" of the first match to the refSeq
+ *   or < 0 if invalid
+ *
+ *  "lastMatch" [ OUT, NULL OKAY ] - zero-based index into "rslt" of the last match to the refSeq
+ *   or < 0 if invalid
+ */
+typedef uint32_t BAMCigarType;
+enum BAMCigarTypes
+{
+    ct_Match    = 'M', /* 0 */
+    ct_Insert   = 'I', /* 1 */
+    ct_Delete   = 'D', /* 2 */
+    ct_Skip     = 'N', /* 3 */
+    ct_SoftClip = 'S', /* 4 */
+    ct_HardClip = 'H', /* 5 */
+    ct_Padded   = 'P', /* 6 */
+    ct_Equal    = '=', /* 7 */
+    ct_NotEqual = 'X', /* 8 */
+    ct_Overlap  = 'B' /* Complete Genomics extension */
+};
+
+typedef struct BAM_AlignmentDetail BAM_AlignmentDetail;
+struct BAM_AlignmentDetail
+{
+    int64_t refSeq_pos; /* position on refSeq where this alignment region starts or -1 if NA */
+    int32_t read_pos;   /* position on read where this alignment region starts or -1 if NA */
+    uint32_t length;    /* length of alignment region */
+    BAMCigarType type;  /* type of alignment */
+};
+
+rc_t BAM_AlignmentGetAlignmentDetail ( const BAM_Alignment *self,
+    BAM_AlignmentDetail *rslt, uint32_t count, uint32_t *actual,
+    int32_t *firstMatch, int32_t *lastMatch );
+
+
+/* GetCigarCount
+ *  the number of CIGAR elements
+ *  a CIGAR element consists of the pair of matching op code and op length
+ *
+ *  "n" [ OUT ] - return param for cigar count
+ */
+rc_t BAM_AlignmentGetCigarCount ( const BAM_Alignment *self, uint32_t *n );
+
+
+rc_t BAM_AlignmentGetRawCigar(const BAM_Alignment *cself, uint32_t const **rslt, uint32_t *length);
+
+/* GetCigar
+ *  get CIGAR element n [0..GetCigarCount)
+ */
+rc_t BAM_AlignmentGetCigar ( const BAM_Alignment *self,
+    uint32_t n, BAMCigarType *type, uint32_t *length );
+
+
+/* GetInsertSize
+ *  distance in bases to start of mate's alignment on ref. seq.
+ *
+ *  "size" [ OUT ] - >0 for first in pair, <0 for second
+ */
+rc_t BAM_AlignmentGetInsertSize ( const BAM_Alignment *self, int64_t *size );
+
+rc_t BAM_AlignmentFormatSAM(const BAM_Alignment *self,
+                            size_t *actsize,
+                            size_t maxsize,
+                            char *buffer);
+
+/* OptDataForEach
+ *  DANGER
+ *  these optional fields are the weakest part of BAM.
+ *
+ *  It is probably best to not use this info.
+ *  You can't count on them being there.
+ *  Moreover, you might need to interpret the types correctly.
+ */
+typedef uint32_t BAMOptDataValueType;
+enum BAMOptDataValueTypes
+{
+    dt_CSTRING = 'Z',
+    dt_INT8 = 'c',
+    dt_UINT8 = 'C',
+    dt_INT16 = 's',     
+    dt_UINT16 = 'S',    
+    dt_INT = 'i',
+    dt_UINT = 'I',
+    dt_FLOAT32 = 'f',
+#if 0
+    dt_FLOAT64 = 'd', /* removed? not in Dec 19 2013 version of SAMv1.pdf */
+#endif
+    dt_ASCII = 'A',
+    dt_HEXSTRING = 'H',
+    dt_NUM_ARRAY = 'B'
+};
+
+#define OPT_TAG_X "X?" /* end user data */
+#define OPT_TAG_Y "Y?" /* end user data */
+#define OPT_TAG_Z "Z?" /* end user data */
+
+#define OPT_TAG_ReadGroup   "RG" /* Read Group; same as BAM_AlignmentGetReadGroupName */
+#define OPT_TAG_Library     "LB" /* LIbrary; also BAMReadGroup */
+#define OPT_TAG_Unit        "PU" /* Platform specific Unit; also BAMReadGroup */
+#define OPT_TAG_Program     "PG" /* Alignment software name */
+#define OPT_TAG_AlignScore  "AS" /* Alignment Score (MapQuality?) */
+#define OPT_TAG_SecQual     "SQ" /* second called base:2 and quality:6; length == ReadLength? warning */
+#define OPT_TAG_MateMapQual "MQ" /* map Quality of mate */
+#define OPT_TAG_NumMismatch "NM" /* Number of Mismatches */
+#define OPT_TAG_Hits0       "H0" /* Number of perfect hits */
+#define OPT_TAG_Hits1       "H1" /* Number of off-by-one */
+#define OPT_TAG_Hits2       "H2" /* Number of off-by-two */
+#define OPT_TAG_CondQual    "UQ" /* conditional Quality of read */
+#define OPT_TAG_CondQPair   "PQ" /* conditional Quality of pair */
+#define OPT_TAG_ReadHits    "NH" /* Number of times this read (spot) aligns */
+#define OPT_TAG_ReadHits2   "IH" /* Number of times this read (spot) aligns that are in this file */
+#define OPT_TAG_HitIndex    "HI" /* n-th hit for this read in this file */
+#define OPT_TAG_Match2      "MD" /* another sort of matching string like CIGAR but different? */
+#define OPT_TAG_ColorKey    "CS" /* primer and first color */
+#define OPT_TAG_ColorQual   "CQ" /* quality of above */
+#define OPT_TAG_ColorMisses "CM" /* Number of color-space Mismatches */
+#define OPT_TAG_SeqOverlap  "GS" 
+#define OPT_TAG_QualOverlap "GQ" 
+#define OPT_TAG_OverlapDesc "GC"
+#define OPT_TAG_MateSeq     "R2" /* sequence of the mate */
+#define OPT_TAG_MateQual    "Q2" /* quality scores of the mate */
+#define OPT_TAG_OtherQual   "S2"
+#define OPT_TAG_NextHitRef  "CC" /* Reference name of the next hit */
+#define OPT_TAG_NextHitPos  "CP" /* coordinate of the next hit */
+#define OPT_TAG_SingleMapQ  "SM" /* quality of mapping as if not paired */
+#define OPT_TAG_AM          "AM"
+#define OPT_TAG_MAQFlag     "MQ"
+
+
+struct BAMOptData
+{
+    BAMOptDataValueType type;
+    uint32_t element_count;
+    union {
+        int8_t i8[8];
+        uint8_t u8[8];
+        int16_t i16[4];
+        uint16_t u16[4];
+        int32_t i32[2];
+        uint32_t u32[2];
+        int64_t i64[2];
+        uint64_t u64[2];
+        float f32[2];
+        double f64[1];
+        char asciiz[8];
+    } u;
+};
+
+typedef struct BAMOptData BAMOptData;
+
+typedef rc_t ( * BAMOptionalDataFunction )
+    ( void *ctx, const char tag[2], const BAMOptData *value );
+
+rc_t BAM_AlignmentOptDataForEach
+    ( const BAM_Alignment *self, void *ctx, BAMOptionalDataFunction callback );
+
+    
+bool BAM_AlignmentHasCGData(BAM_Alignment const *self);
+
+rc_t BAM_AlignmentCGReadLength(BAM_Alignment const *self, uint32_t *readlen);
+
+rc_t BAM_AlignmentGetCGSeqQual(BAM_Alignment const *self,
+                                 char sequence[],
+                                 uint8_t quality[]);
+
+rc_t BAM_AlignmentGetCGCigar(BAM_Alignment const *self,
+                               uint32_t *cigar,
+                               uint32_t cig_max,
+                               uint32_t *cig_act);
+    
+rc_t BAM_AlignmentGetTI(BAM_Alignment const *self, uint64_t *ti);
+
+/* strand = '+', '-', or ' ' */
+rc_t BAM_AlignmentGetRNAStrand(BAM_Alignment const *self, uint8_t *strand);
+
+rc_t BAM_AlignmentGetCGAlignGroup(BAM_Alignment const *self,
+                                              char buffer[],
+                                              size_t max_size,
+                                              size_t *act_size);
+
+rc_t BAM_AlignmentGetLinkageGroup(BAM_Alignment const *self,
+                                  char const **name);
+    
+    
+/*--------------------------------------------------------------------------
+ * BAM_File
+ */
+typedef struct BAM_File BAM_File;
+
+typedef struct BAMRefSeq BAMRefSeq;
+struct BAMRefSeq
+{
+    uint64_t length;
+    const char *name; /* not null unique */
+    const char *assemblyId;
+    const uint8_t *checksum;
+    const char *uri;
+    const char *species;
+    uint32_t id;
+    uint8_t checksum_array[16];
+};
+
+typedef struct BAMReadGroup BAMReadGroup;
+struct BAMReadGroup
+{
+    const char *name; /* not null unique, accession e.g. SRR001138 */
+    const char *sample; /* not null */
+    const char *library;
+    const char *description;
+    const char *unit; /* platform specific identifier, e.g. BI.080214_SL-XAJ_0001_FC2044KAAXX.7 */
+    const char *insertSize;
+    const char *center; /* e.g. BI */
+    const char *runDate;
+    const char *platform; /* e.g. ILLUMINA */
+    uint32_t id;
+};
+
+
+/* 64-bit structure stored as an integer
+ * The high-order 48 bits store the position in the file at which a 
+ * compressed block starts.  The low-order 16 bits store the position
+ * in the decompressed block at which a record starts.  This is the
+ * way that positions are represented in BAM indices.
+ */
+typedef uint64_t BAM_FilePosition;
+
+
+/* Make
+ *  open the BAM file specified by path
+ *
+ *  "path" [ IN ] - NUL terminated string or format
+ */
+rc_t BAM_FileMake(const BAM_File **result,
+                  KFile *defer,
+                  char const headerText[],
+                  char const path[], ... );
+
+/* AddRef
+ * Release
+ */
+rc_t BAM_FileAddRef ( const BAM_File *self );
+rc_t BAM_FileRelease ( const BAM_File *self );
+
+
+/* GetPosition
+ *  get the position of the about-to-be read alignment
+ *  this position can be stored
+ *  this position can be passed into SetPosition to seek to the same alignment
+ *
+ *  "pos" [ OUT ] - return parameter for position
+ */
+rc_t BAM_FileGetPosition ( const BAM_File *self, BAM_FilePosition *pos );
+
+
+/* GetProportionalPosition
+ *  get the aproximate proportional position in the input file
+ *  this is intended to be useful for computing progress
+ *
+ * NB - does not return rc_t
+ */
+float BAM_FileGetProportionalPosition ( const BAM_File *self );
+
+    
+/* Read
+ *  read an aligment
+ *
+ *  "result" [ OUT ] - return param for BAM_Alignment object
+ *   must be released with BAM_AlignmentRelease, is invalidated or contents
+ *   change on next call to BAM_FileRead2. Unlike with BAM_FileRead, no attempt is
+ *   made to preserve this object.
+ *
+ *  returns:
+ *    RC(..., ..., ..., rcRow, rcNotFound) at end
+ *    RC(..., ..., ..., rcRow, rcInvalid) and RC(..., ..., ..., rcRow, rcEmpty)
+ *      are not fatal and are resumable
+ *
+ *  tries to use static buffers and will log messages about parsing errors
+ */
+rc_t BAM_FileRead2 ( const BAM_File *self, const BAM_Alignment **result );
+
+
+/* GetRefSeqCount
+ *  get the number of Reference Sequences refered to in the header
+ *  this is not necessarily the number of Reference Sequences referenced
+ *  by the alignments
+ */
+rc_t BAM_FileGetRefSeqCount ( const BAM_File *self, uint32_t *count );
+
+
+/* GetRefSeq
+ *  get the n'th Ref. Seq. where n is [0..RefSeqCount)
+ *  the resulting pointer is static-like; it is freed when the BAM_File is.
+ *  IOW, it is good for precisely at long as the BAM_File is.
+ */
+rc_t BAM_FileGetRefSeq ( const BAM_File *self, uint32_t n, const BAMRefSeq **result );
+
+
+/* GetRefSeqById
+ *  get a Ref. Seq. by its id
+ *  the resulting pointer is static-like; it is freed when the BAM_File is.
+ *  IOW, it is good for precisely at long as the BAM_File is.
+ */
+rc_t BAM_FileGetRefSeqById ( const BAM_File *self, int32_t id, const BAMRefSeq **result );
+
+
+/* GetReadGroupCount
+ *  get the number of Read Groups (accessions, etc.) refered to in the header
+ *  this is not necessarily the number of Read Groups referenced
+ *  by the alignments
+ */
+rc_t BAM_FileGetReadGroupCount ( const BAM_File *self, uint32_t *count );
+
+/* GetReadGroup
+ *  get the n'th Read Group where n is [0..ReadGroupCount)
+ *  the resulting pointer is static-like; it is freed when the BAM_File is.
+ *  IOW, it is good for precisely at long as the BAM_File is.
+ */
+rc_t BAM_FileGetReadGroup ( const BAM_File *self, unsigned n, const BAMReadGroup **result );
+    
+/* GetHeaderText
+ *  get the text of the BAM header file
+ *  the resulting pointer is static-like; it is freed when the BAM_File is.
+ *  IOW, it is good for precisely at long as the BAM_File is.
+ */
+rc_t BAM_FileGetHeaderText(BAM_File const *cself, char const **header, size_t *header_len);
+    
+
+/* GetReadGroupByName
+ *  get a Read Group by its name
+ *  the resulting pointer is static-like; it is freed when the BAM_File is.
+ *  IOW, it is good for precisely at long as the BAM_File is.
+ */
+rc_t BAM_FileGetReadGroupByName ( const BAM_File *self,
+    const char *name, const BAMReadGroup **result );
diff --git a/tools/bam-loader/config-file.cpp b/tools/bam-loader/config-file.cpp
new file mode 100644
index 0000000..9eca698
--- /dev/null
+++ b/tools/bam-loader/config-file.cpp
@@ -0,0 +1,195 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+#include "config-file.hpp"
+#include <string>
+#include <vector>
+#include <iostream>
+#include <fstream>
+#include <cctype>
+#include <sstream>
+
+/*
+ * Config file:
+ *  The config file consists of lines containing whitespace (ASCII 9 or 32)
+ *  seperated fields.  The fields are:
+ *      NAME (unique)
+ *      SEQID
+ *      extra (optional)
+ */
+
+/// reads a line with leading and trailing whitespace trimmed;
+/// ignores lines consisting entirely of whitespace;
+static std::string const getline(std::istream &is)
+{
+    std::string line("");
+    auto ws = true;
+    size_t len = 0;
+    
+    for ( ; ; ) {
+        auto const ch = is.get();
+        if (ch < 0)
+            break;
+        if (ws && isspace(ch))
+            continue;
+        
+        if (ch == '\n' || ch == '\r')
+            break;
+        
+        ws = false;
+        line.push_back(ch);
+        if (!isspace(ch))
+            len = line.size();
+    }
+    line.erase(len);
+    
+    return line;
+}
+
+template <typename T>
+struct Range {
+    T start, end;
+    
+    Range(T const init) : start(init), end(init) {}
+    T const size() const {
+        return start < end ? (end - start) : 0;
+    }
+};
+
+struct Parse {
+    Range<std::string::size_type> name;
+    Range<std::string::size_type> seqid;
+    Range<std::string::size_type> extra;
+    
+    Parse()
+    : name(std::string::npos)
+    , seqid(std::string::npos)
+    , extra(std::string::npos)
+    {}
+    bool good() const {
+        return name.size() > 0 && seqid.size() > 0;
+    }
+};
+
+static Parse parseLine(std::string const &in) {
+    static std::string const whitespace(" \t");
+    Parse rslt;
+
+    if (in[0] != '#') {
+        rslt.name.start = 0;
+
+        rslt.name.end = in.find_first_of(whitespace);
+        if (rslt.name.end != std::string::npos) {
+            rslt.seqid.start = in.find_first_not_of(whitespace, rslt.name.end);
+            if (rslt.seqid.start != std::string::npos) {
+                rslt.seqid.end = in.find_first_of(whitespace, rslt.seqid.start);
+                if (rslt.seqid.end == std::string::npos)
+                    rslt.seqid.end = in.size();
+                else {
+                    rslt.extra.start = in.find_first_not_of(whitespace, rslt.seqid.end);
+                    rslt.extra.end = in.size();
+                }
+            }
+        }
+    }
+    
+    return rslt;
+}
+
+static ConfigFile::Line makeLine(std::string const &in, Parse const &parse) {
+    ConfigFile::Line rslt;
+    
+    rslt.NAME = in.substr(parse.name.start, parse.name.size());
+    rslt.SEQID = in.substr(parse.seqid.start, parse.seqid.size());
+    if (parse.extra.size() > 0)
+        rslt.EXTRA = in.substr(parse.extra.start, parse.extra.size());
+    else
+        rslt.EXTRA = "";
+    
+    return rslt;
+}
+
+static ConfigFile::Unparsed makeUnparsed(unsigned const lineno, std::string const &line) {
+    ConfigFile::Unparsed rslt;
+    
+    rslt.lineno = lineno;
+    rslt.line = line;
+    
+    return rslt;
+}
+
+ConfigFile::ConfigFile(std::istream &is) {
+    unsigned lineno = 0;
+    
+    while (is.good()) {
+        auto const in = getline(is);
+        if (in.size() == 0) {
+            break;
+        }
+        ++lineno;
+
+        auto const parse = parseLine(in);
+        if (parse.good())
+            lines.push_back(makeLine(in, parse));
+        else
+            unparsed.push_back(makeUnparsed(lineno, in));
+    }
+    if (is.eof())
+        msg = "no errors";
+    else
+        msg = "error reading input";
+    
+    std::ostringstream oss;
+    oss << msg << "; lines read: " << lineno;
+    msg = oss.str();
+}
+
+ConfigFile ConfigFile::load(std::string const &filename) {
+    std::ifstream ifs(filename);
+
+    return ifs.is_open() ? ConfigFile::load(ifs) : ConfigFile();
+}
+
+void ConfigFile::printDescription(std::ostream &os, bool const detail) const {
+    os << "Loaded " << lines.size() << " records" << std::endl;
+    if (detail) {
+        for (auto i = lines.begin(); i != lines.end(); ++i)
+            os << i->NAME << '\t' << i->SEQID << '\t' << i->EXTRA << std::endl;
+    }
+    os << "Unparsed lines: " << unparsed.size() << std::endl;
+    if (detail) {
+        for (auto i = unparsed.begin(); i != unparsed.end(); ++i)
+            os << i->lineno << '\t' << i->line << std::endl;
+    }
+    os << msg << std::endl;
+}
+
+#ifdef TESTING
+int main(int argc, char *argv[]) {
+    auto const config = argc > 1 ? ConfigFile::load(argv[1]) : ConfigFile::load(std::cin);
+    
+    config.printDescription(std::cout, true);
+}
+#endif
diff --git a/tools/bam-loader/config-file.hpp b/tools/bam-loader/config-file.hpp
new file mode 100644
index 0000000..dbb15f4
--- /dev/null
+++ b/tools/bam-loader/config-file.hpp
@@ -0,0 +1,65 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+#include <string>
+#include <vector>
+#include <iostream>
+
+/*
+ * Config file:
+ *  The config file consists of lines containing whitespace (ASCII 9 or 32)
+ *  seperated fields.  The fields are:
+ *      NAME (unique)
+ *      SEQID
+ *      extra (optional)
+ */
+
+class ConfigFile {
+    ConfigFile() {}
+    ConfigFile(std::istream &is);
+public:
+    struct Line {
+        std::string NAME;
+        std::string SEQID;
+        std::string EXTRA;
+    };
+    struct Unparsed {
+        unsigned lineno;
+        std::string line;
+    };
+    
+    std::vector<Line const> lines;
+    std::vector<Unparsed const> unparsed;
+    std::string msg;
+
+    ~ConfigFile() {}
+    
+    void printDescription(std::ostream &, bool detail = false) const;
+
+    static ConfigFile load(std::istream &is) {
+        return ConfigFile(is);
+    }
+    static ConfigFile load(std::string const &filename);
+};
diff --git a/tools/bam-loader/fasta-file.cpp b/tools/bam-loader/fasta-file.cpp
new file mode 100644
index 0000000..013cee8
--- /dev/null
+++ b/tools/bam-loader/fasta-file.cpp
@@ -0,0 +1,257 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+#include "fasta-file.hpp"
+#include <string>
+#include <vector>
+#include <iostream>
+#include <fstream>
+#include <cctype>
+
+/*
+ * Fasta files:
+ *  Fasta file consists of one of more sequences.  A sequence in a fasta file
+ *  consists of a seqid line followed by lines containing the bases of the
+ *  sequence.  A seqid line starts with '>' and the next word (whitespace
+ *  delimited) is the seqid.
+ */
+
+struct tmpSequence {
+    std::string SEQID;
+    std::string SEQID_LINE;
+    size_t data_start;
+    unsigned data_size;
+    bool hadErrors;
+};
+
+/// reads a line with leading and trailing whitespace trimmed;
+/// ignores lines consisting entirely of whitespace;
+static std::string const getline(std::istream &is)
+{
+    std::string line("");
+    auto ws = true;
+    size_t len = 0;
+    
+    for ( ; ; ) {
+        auto const ch = is.get();
+        if (ch < 0)
+            break;
+        if (ws && isspace(ch))
+            continue;
+        
+        if (ch == '\n' || ch == '\r')
+            break;
+        
+        ws = false;
+        line.push_back(ch);
+        if (!isspace(ch))
+            len = line.size();
+    }
+    line.erase(len);
+    
+    return line;
+}
+
+static bool cleanCopyFastaSequence(char *const dst,
+                                   char const *const src,
+                                   unsigned const len)
+{
+    static char const tr[] = {
+        ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
+        ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
+        ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','.',' ',
+        ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
+        ' ','A','B','C','D',' ',' ','G','H',' ',' ','K',' ','M','N',' ',
+        ' ',' ','R','S','T',' ','V','W','N','Y',' ',' ',' ',' ',' ',' ',
+        ' ','A','B','C','D',' ',' ','G','H',' ',' ','K',' ','M','N',' ',
+        ' ',' ','R','S','T',' ','V','W','N','Y',' ',' ',' ',' ',' ',' ',
+        ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
+        ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
+        ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
+        ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
+        ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
+        ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
+        ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
+        ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
+    };
+
+    auto hadErrors = false;
+
+    for (unsigned i = 0; i < len; ++i) {
+        int const ch = src[i]; // .ACMGRSVTWYHKDBN and lower case
+
+        if (ch != ' ')
+            dst[i] = ch;
+        else {
+            dst[i] = 'N';
+            hadErrors = true;
+        }
+    }
+
+    return hadErrors;
+}
+
+static bool readFile(std::istream &is,
+                     char *&data,
+                     size_t &size,
+                     size_t &limit,
+                     std::vector<tmpSequence> &sequences
+                     )
+{
+    static std::string const whitespace("\t ");
+    tmpSequence sequence;
+    auto st = 0;
+
+    for ( ; ; ) {
+        auto line = getline(is);
+
+        switch (st) {
+            case 1:
+                if (line[0] == '>') {
+                    auto const seqidstart = line.find_first_not_of(whitespace, 1);
+
+                    if (seqidstart != std::string::npos) {
+                        sequence.SEQID_LINE.push_back(' ');
+                        sequence.SEQID_LINE.append(line, seqidstart, std::string::npos);
+                    }
+                    break;
+                }
+                ++st;
+                /* fallthrough */
+            case 2:
+                if (line[0] == '>' || line.size() == 0) {
+                    sequences.push_back(sequence);
+                    st = 0;
+                    /* fallthrough */
+                }
+                else {
+                    auto const start = line.find_first_not_of(whitespace);
+                    auto const len = line.size() - start;
+
+                    if (size + len > limit) {
+                        do { limit <<= 1; } while (size + len > limit);
+                        auto const tmp = realloc(reinterpret_cast<void *>(data), limit);
+
+                        if (!tmp) throw std::bad_alloc();
+                        data = reinterpret_cast<char *>(tmp);
+                    }
+
+                    sequence.hadErrors |= cleanCopyFastaSequence(data + size, line.data() + start, len);
+                    size += len;
+                    sequence.data_size += len;
+                    break;
+                }
+            case 0:
+                if (line.size() == 0)
+                    return true;
+
+                if (line[0] == '>') {
+                    auto const seqidstart = line.find_first_not_of(whitespace, 1);
+                    if (seqidstart != std::string::npos) {
+                        auto const seqidend = line.find_first_of(whitespace, seqidstart);
+
+                        sequence.SEQID_LINE = std::string(line, seqidstart);
+                        sequence.SEQID = std::string(line, seqidstart, seqidend - seqidstart);
+                        sequence.data_start = size;
+                        sequence.data_size = 0;
+                        sequence.hadErrors = false;
+                        ++st;
+                        break;
+                    }
+                }
+            default:
+                return false;
+        }
+    }
+}
+
+FastaFile::FastaFile(std::istream &is) : data(nullptr)
+{
+    std::vector<tmpSequence> tmp;
+    size_t limit = 1024u * 1024u;
+    size_t size = 0;
+    auto data = reinterpret_cast<char *>(malloc(limit));
+
+    if (!data)
+        throw std::bad_alloc();
+    
+    if (readFile(is, data, size, limit, tmp) && is.eof()) {
+        this->data = realloc(reinterpret_cast<void *>(data), size);
+        if (!this->data) throw std::bad_alloc();
+
+        for (auto i = tmp.begin(); i != tmp.end(); ++i) {
+            Sequence seq;
+
+            seq.SEQID = i->SEQID;
+            seq.SEQID_LINE = i->SEQID_LINE;
+            seq.data = data + i->data_start;
+            seq.length = i->data_size;
+            seq.hadErrors = i->hadErrors;
+
+            sequences.push_back(seq);
+        }
+    }
+    else {
+        free(data);
+    }
+}
+
+FastaFile FastaFile::load(std::string const filename)
+{
+    std::ifstream ifs(filename);
+
+    return ifs.is_open() ? FastaFile::load(ifs) : FastaFile();
+}
+
+#ifdef TESTING
+void wait(std::string const &msg = "Waiting") {
+    std::string s;
+    
+    std::cout << msg << "... [Press enter]" << std::endl;
+    std::getline(std::cin, s);
+}
+
+void test(std::string const &filename) {
+    auto const test = FastaFile::load(filename);
+    
+    std::cout << "Loaded " << test.sequences.size() << " sequences" << std::endl;
+    
+    size_t total = 0;
+    for (auto i = test.sequences.begin(); i != test.sequences.end(); ++i)
+        total += i->length;
+    
+    std::cout << "Loaded " << total << " bases" << std::endl;
+    
+//    wait("Run leaks");
+}
+
+int main(int argc, char *argv[])
+{
+    if (argc > 1) {
+        test(argv[1]);
+    }
+//    wait("Run leaks again");
+}
+#endif
diff --git a/tools/bam-loader/fasta-file.hpp b/tools/bam-loader/fasta-file.hpp
new file mode 100644
index 0000000..543c4b0
--- /dev/null
+++ b/tools/bam-loader/fasta-file.hpp
@@ -0,0 +1,63 @@
+/*==============================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ */
+
+#include <string>
+#include <vector>
+#include <iostream>
+
+/*
+ * Fasta files:
+ *  Fasta file consists of one of more sequences.  A sequence in a fasta file
+ *  consists of a seqid line followed by lines containing the bases of the
+ *  sequence.  A seqid line starts with '>' and the next word (whitespace
+ *  delimited) is the seqid.
+ */
+
+class FastaFile {
+    FastaFile() : data(NULL) {}
+    FastaFile(std::istream &is);
+
+    void *data;
+public:
+    struct Sequence {
+        std::string SEQID;
+        std::string SEQID_LINE;
+        char const *data;
+        unsigned length;
+        bool hadErrors; // erroneous base values are replaced with N
+    };
+
+    std::vector<Sequence const> sequences;
+
+    ~FastaFile() {
+        free(data);
+        data = nullptr;
+    }
+
+    static FastaFile load(std::istream &is) {
+        return FastaFile(is);
+    }
+    static FastaFile load(std::string const filename);
+};
diff --git a/tools/bam-loader/hashtable.c b/tools/bam-loader/hashtable.c
new file mode 100644
index 0000000..ee8f8e6
--- /dev/null
+++ b/tools/bam-loader/hashtable.c
@@ -0,0 +1,878 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <klib/rc.h>
+
+#include <stddef.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#if TESTING
+#include <stdio.h>
+#include <string.h>
+#endif
+
+#include "hashtable.h"
+
+typedef struct HTBucket HTBucket;
+typedef struct HTEntry HTEntry;
+
+#define HASH_TABLE_ENTRIES_MAX (0x80000)
+#define HASH_TABLE_PREALLOC_MAX 1
+
+struct HTEntry {
+    const void *payload;
+    uint32_t hashValue;
+};
+
+struct HTBucket {
+    HTBucket *overflow;
+    uint32_t used;      /* one bit per entry */
+    HTEntry entry[32];
+};
+
+struct HashTable {
+    size_t hashMask;    /* the "size" of the table is hashMask + 1 */
+    size_t entryCount;  /* total number of entries in table */
+
+    HashTableKeyCompFunc comp_func;
+    const void *ctx;
+    
+#if HASH_TABLE_PREALLOC_MAX
+    HTBucket table[HASH_TABLE_ENTRIES_MAX];
+#else
+    HTBucket *table;
+#endif
+};
+
+typedef struct HashTableRealIterator {
+    HashTable *table;
+    HTBucket *bucket;
+    uint32_t slot;
+    uint32_t hashValue;
+} HashTableRealIterator;
+
+typedef union HashTableImplIterator {
+    HashTableRealIterator real;
+    HashTableIterator user;
+} HashTableImplIterator;
+
+static unsigned FirstSet(unsigned bits)
+{
+    assert(bits != 0);
+    if ((bits & 0xFFFF) != 0) {
+        if ((bits & 0xFF) != 0) {
+            if ((bits & 0xF) != 0) {
+                if ((bits & 0x3) != 0) {
+                    if ((bits & 0x1) != 0)
+                        return 0;
+                    else
+                        return 1;
+                }
+                else if ((bits & 0x4) != 0)
+                    return 2;
+                else
+                    return 3;
+            }
+            else if ((bits & 0x30) != 0) {
+                if ((bits & 0x10) != 0)
+                    return 4;
+                else
+                    return 5;
+            }
+            else if ((bits & 0x40) != 0)
+                return 6;
+            else
+                return 7;
+        }
+        else if ((bits & 0xF00) != 0) {
+            if ((bits & 0x300) != 0) {
+                if ((bits & 0x100) != 0)
+                    return 8;
+                else
+                    return 9;
+            }
+            else if ((bits & 0x400) != 0)
+                return 10;
+            else
+                return 11;
+        }
+        else if ((bits & 0x3000) != 0) {
+            if ((bits & 0x1000) != 0)
+                return 12;
+            else
+                return 13;
+        }
+        else if ((bits & 0x4000) != 0)
+            return 14;
+        else
+            return 15; 
+    }
+    else if ((bits & 0xFF0000) != 0) {
+        if ((bits & 0xF0000) != 0) {
+            if ((bits & 0x30000) != 0) {
+                if ((bits & 0x10000) != 0)
+                    return 16;
+                else
+                    return 17;
+            }
+            else if ((bits & 0x40000) != 0)
+                return 18;
+            else
+                return 19;
+        }
+        else if ((bits & 0x300000) != 0) {
+            if ((bits & 0x100000) != 0)
+                return 20;
+            else
+                return 21;
+        }
+        else if ((bits & 0x400000) != 0)
+            return 22;
+        else
+            return 23;
+    }
+    else if ((bits & 0xF000000) != 0) {
+        if ((bits & 0x3000000) != 0) {
+            if ((bits & 0x1000000) != 0)
+                return 24;
+            else
+                return 25;
+        }
+        else if ((bits & 0x4000000) != 0)
+            return 26;
+        else
+            return 27;
+    }
+    else if ((bits & 0x30000000) != 0) {
+        if ((bits & 0x10000000) != 0)
+            return 28;
+        else
+            return 29;
+    }
+    else if ((bits & 0x40000000) != 0)
+        return 30;
+    else
+        return 31;
+    
+}
+
+static rc_t HTBucketNextOpenSlot(HTBucket *self, HTBucket **rslt, unsigned *slot)
+{
+    while (self->used == 0xFFFFFFFF) {
+        if (self->overflow != NULL) {
+            self = self->overflow;
+            continue;
+        }
+        self->overflow = malloc(sizeof(*self->overflow));
+        if (self->overflow == NULL)
+            return RC(rcCont, rcBuffer, rcAllocating, rcMemory, rcExhausted);
+        self->overflow->overflow = NULL;
+        self->overflow->used = 0;
+        *rslt = self->overflow;
+        *slot = 0;
+        return 0;
+    }
+    *rslt = self;
+    *slot = FirstSet(~self->used);
+    
+    return 0;
+}
+
+static rc_t HTBucketInsert(HTBucket *self, const HTEntry *entry)
+{
+    HTBucket *found;
+    unsigned slot;
+    rc_t rc = HTBucketNextOpenSlot(self, &found, &slot);
+    
+    if (rc)
+        return rc;
+    found->used |= (1 << slot);
+    found->entry[slot] = *entry;
+    return 0;
+}
+
+static bool HTBucketFreeSlot(HTBucket *self, unsigned slot)
+{
+    unsigned i;
+    
+    self->used &= ~(1 << slot);
+#if _DEBUGGING
+    self->entry[slot].payload = NULL;
+#endif
+    if (self->overflow == NULL)
+        return true;
+    
+    /* pull something out of the overflow */
+    i = FirstSet(self->overflow->used);
+    self->entry[slot] = self->overflow->entry[i];
+    self->used |= (1 << slot);
+    HTBucketFreeSlot(self->overflow, i);
+    if (self->overflow->used == 0) {
+        free(self->overflow);
+        self->overflow = NULL;
+    }
+    return false;
+}
+
+static void HTBucketForEach(const HTBucket *self, void (*fn)(void *payload, void *ctx), void *ctx)
+{
+    do {
+        uint32_t bits = self->used;
+        unsigned i;
+        
+        for (i = 0; i != 32 && bits != 0; ++i, bits >>= 1) {
+            if ((bits & 1) == 0)
+                continue;
+            fn((void *)self->entry[i].payload, ctx);
+        }
+        self = self->overflow;
+    } while (self != NULL);
+}
+
+static bool HTBucketDoUntil(const HTBucket *self, bool (*fn)(void *payload, void *ctx), void *ctx)
+{
+    do {
+        uint32_t bits = self->used;
+        unsigned i;
+        
+        for (i = 0; i != 32 && bits != 0; ++i, bits >>= 1) {
+            if ((bits & 1) == 0)
+                continue;
+            if (fn((void *)self->entry[i].payload, ctx))
+                return true;
+        }
+        self = self->overflow;
+    } while (self != NULL);
+    return false;
+}
+
+static bool HTBucketValidate(const HTBucket *self, uint32_t hash, uint32_t mask)
+{
+    do {
+        uint32_t bits = self->used;
+        unsigned i;
+        
+        for (i = 0; i != 32 && bits != 0; ++i, bits >>= 1) {
+            const HTEntry *entry = &self->entry[i];
+            bool is_free = (bits & 1) == 0;
+#if _DEBUGGING
+            bool is_null = entry->payload == NULL;
+            
+            if (is_free != is_null)
+                return true;
+#endif
+            if (is_free)
+                continue;
+            if ((entry->hashValue & mask) != hash)
+                return true;
+        }
+        if (self->overflow && self->overflow->used == 0)
+            return true;
+        self = self->overflow;
+    } while (self != NULL);
+    return false;
+}
+
+static void HTBucketWhack(HTBucket *self, void (*fn)(void *payload, void *ctx), void *ctx)
+{
+    uint32_t bits;
+    unsigned i;
+    
+    if (self->overflow) {
+        HTBucketWhack(self->overflow, fn, ctx);
+        free(self->overflow);
+    }
+    for (i = 0, bits = self->used; i != 32 && bits != 0 && fn; ++i, bits >>= 1) {
+        if ((bits & 1) == 0)
+            continue;
+        fn((void *)self->entry[i].payload, ctx);
+    }
+}
+
+static uint32_t GetHashValue(const uint8_t *key, unsigned len)
+{
+    /*
+     * My basic hash function is Pearson's hash.
+     * The tables below contain each value between 0 and 255 inclusive, in
+     * random order.  The tables were generated with the following perl script.
+     *
+     *   #!perl -w
+     *   my @x = (0 .. 255); # each value between 0 and 255 inclusive
+     *   foreach (0 .. 10000) { # randomize the order
+     *       my $i = $_ % 256;                    # a sequential index
+     *       my $r = rand(256);                   # a random index
+     *       ($x[$i], $x[$r]) = ($x[$r], $x[$i]); # swap x[i] and x[r]
+     *   }
+     *   print join(', ', map { sprintf '%3u', $_; } @x);
+     *
+     * You can generate lots of different 8-bit hash functions this way.
+     *
+     * I generate four 8-bit hashes and combine them to make a 32-bit one.
+     * Even though I may not use all bits for the hash (e.g. the limit on the
+     * table's size is much less than UINT32_MAX), computing and storing the
+     * full hash reduces the number of string compares I have to do when buckets
+     * have lots of items in them.
+     */
+    static const uint8_t T1[] = {
+         64, 186,  39, 203,  54, 211,  98,  32,  26,  23, 219,  94,  77,  60,  56, 184,
+        129, 242,  10,  91,  84, 192,  19, 197, 231, 133, 125, 244,  48, 176, 160, 164,
+         17,  41,  57, 137,  44, 196, 116, 146, 105,  40, 122,  47, 220, 226, 213, 212,
+        107, 191,  52, 144,   9, 145,  81, 101, 217, 206,  85, 134, 143,  58, 128,  20,
+        236, 102,  83, 149, 148, 180, 167, 163,  12, 239,  31,   0,  73, 152,   1,  15,
+         75, 200,   4, 165,   5,  66,  25, 111, 255,  70, 174, 151,  96, 126, 147,  34,
+        112, 161, 127, 181, 237,  78,  37,  74, 222, 123,  21, 132,  95,  51, 141,  45,
+         61, 131, 193,  68,  62, 249, 178,  33,   7, 195, 228,  82,  27,  46, 254,  90,
+        185, 240, 246, 124, 205, 182,  42,  22, 198,  69, 166,  92, 169, 136, 223, 245,
+        118,  97, 115,  80, 252, 209,  49,  79, 221,  38,  28,  35,  36, 208, 187, 248,
+        158, 201, 202, 168,   2,  18, 189, 119, 216, 214,  11,   6,  89,  16, 229, 109,
+        120,  43, 162, 106, 204,   8, 199, 235, 142, 210,  86, 153, 227, 230,  24, 100,
+        224, 113, 190, 243, 218, 215, 225, 173,  99, 238, 138,  59, 183, 154, 171, 232,
+        157, 247, 233,  67,  88,  50, 253, 251, 140, 104, 156, 170, 150, 103, 117, 110,
+        155,  72, 207, 250, 159, 194, 177, 130, 135,  87,  71, 175,  14,  55, 172, 121,
+        234,  13,  30, 241,  93, 188,  53, 114,  76,  29,  65,   3, 179, 108,  63, 139
+    };
+    static const uint8_t T2[] = {
+        119, 174,  44, 225,  94, 226, 141, 197,  35, 241, 179, 154,  26, 161, 129,  10,
+        104,  53,  97,  12, 243,  80,  51, 123, 185,  13,  66, 214, 114,  17,  74, 165,
+        110, 143, 170, 222, 242,  73,  40, 101,  56, 163,  68,  86, 198,   9,  21,  90,
+          8,   1, 146, 121, 103,  70,   5, 160, 149,  50, 145, 236, 100,  75, 148,  58,
+         55,  15,  33, 131, 127, 186,   6, 109, 115,   2, 108,  52, 209, 128, 208,  47,
+        220, 173,  45,  72, 156, 212, 152, 102,  77,  36, 134, 137, 162,  54, 235, 167,
+         28, 255, 155, 240, 135, 176, 246, 244,  22, 157,  20, 224, 210, 192,  71, 140,
+         14, 211, 251, 204,  30, 213, 132, 248, 178, 187, 142,  62, 215, 106, 229, 125,
+         41, 216,  49,  29,  98,  32,  18, 237,  79, 206,  63, 227,  25,  99, 150, 223,
+        171, 118,   4, 139,  81,   0, 133,  95, 188, 120,  27, 124,  61, 195, 231, 207,
+         31, 202,  91, 252,  46,  39, 250, 144, 238, 254, 219, 200, 130, 201,  48, 107,
+        205, 177,  88,  16, 147, 221, 164, 184,  89,  67, 190,  11, 175,  42, 136, 189,
+        245, 117,  83,   3, 180, 172,  76,  43, 183,  84, 218, 169, 253, 159, 196,  59,
+        193, 249, 181, 116, 153,  24,  87, 239, 138, 199, 111,  82,  69, 105,  78, 151,
+        122, 168, 126,  85, 228, 233,  34, 113, 194, 191,  19, 230, 182,  96, 217,  38,
+        234, 232,  92,  23,  57, 203,  65,  60,  64,  37, 158, 247,  93, 166, 112,   7
+    };
+    static const uint8_t T3[] = {
+        103,  33, 228,  32, 183, 231, 139,  60,  67,  80, 184, 100,  70,  19,  14,  58,
+        104,  48, 140,  10,  91, 137,  31,  96, 102, 180,  77, 121, 251, 167,  37, 206,
+         79, 151, 109,  15,  92, 174, 108,  16,  95, 145,  18, 236,  49, 177, 135,   0,
+        165,  86,  83, 107, 144,  44,  27, 116, 168, 193, 119, 230,  56,  97, 138, 149,
+        132,  21, 176,  39, 205,  12,  69, 179, 210,  25, 213, 194, 239, 209, 248,  28,
+         93,  38, 224,  66, 105, 160,  40,  17,  23, 129, 212,   8, 178, 118, 163,  73,
+          3,  63,  57,  94, 254, 186, 131, 166,  61, 191, 133, 192,  78, 114, 250, 200,
+        222, 136, 188, 204, 101,  11, 247, 146, 142, 152, 171, 157, 110, 141, 199,  29,
+        147,  88, 211, 240, 164, 196, 189,  50,  65, 112, 219, 237, 197, 115, 126, 154,
+        246, 170, 227, 235,  42, 148,  84, 201, 242,  85,  35,   6, 173, 122, 215, 218,
+         75,  82,   1, 169, 143, 195,  51, 155,  54,   9,  71,  24,  53,   7,  47, 229,
+        158,  26, 245,  89, 150, 181, 255, 249, 221, 217, 223,  76,  90,  36, 216, 130,
+        220, 125, 182,  55, 202, 234, 203, 123,  34, 172,  74,  30,   4, 241, 162, 233,
+         64,  62, 127,  20,  52, 106, 190, 253, 185, 111, 232,   2, 187,  13,  68, 117,
+        128,  98, 208,  41, 159,  46, 207, 244, 226,  22, 252, 214,   5, 243,  99, 113,
+        120, 225, 175, 124, 134, 161, 156,  45,  72,  87,  43,  59, 198, 153, 238,  81
+    };
+    static const uint8_t T4[] = {
+        103, 124,  53, 254,  91, 106, 131,  69, 158,  23, 249, 171, 241,  30, 194, 217,
+         64, 123, 129, 118,  35,  16, 209, 190, 155, 104, 148, 163,  78, 188, 174, 245,
+        218, 125, 210, 250, 107, 212, 117,  17, 109,  44,  71,  38, 253, 177,  11, 114,
+         60, 192, 133, 219,  97, 246,  41, 228, 127, 151,  62, 213, 224, 234, 138, 162,
+         31, 110, 222, 141,  25, 135,  18,  49, 132, 242, 203, 207,  68, 130, 116,  59,
+         63,  67, 169, 147,  94,   0, 134,  77,  51, 128, 247,  21,  88, 145, 122,  19,
+         40,  58,   9,  39, 252,   8, 156, 126, 146,  80, 159, 201, 186, 175,  74,  89,
+         54, 173, 208,  86, 239,   6,  61, 139,  66,  87, 150, 231,  82,  42, 197, 202,
+        199, 196, 121, 112, 161,  99,  90, 144, 105, 195, 255,  27,   3, 216, 187, 172,
+         12,   4, 221, 182, 215, 214,  76,  98,  15,  33,  47, 200, 113, 140, 227, 191,
+        100,  24, 251, 185, 152, 237, 235,  92,  96,   1, 193,   2, 154,  72, 198, 223,
+         28,  46,  13,  56, 153, 232, 233, 143, 108, 184,  43, 119,  84, 189, 120, 211,
+         10, 164,  73, 230, 149, 238,  20,  37,  95, 166, 240,  29, 204, 167, 243, 236,
+         45, 170, 220,   5,   7,  50, 160,  83, 157,  22, 168, 111,  55, 137, 206,  36,
+         85, 180,  79, 142, 102, 181,  14, 115,  57,  34,  75, 244, 248,  48,  93, 183,
+        229, 101, 205,  70, 226, 225, 165, 176, 136, 179,  52,  32,  26,  81,  65, 178
+    };
+    unsigned h1 = 0;
+    unsigned h2 = 0;
+    unsigned h3 = 0;
+    unsigned h4 = 0;
+    unsigned i;
+    
+    for (i = 0; i != len; ++i) {
+        uint8_t ch = key[i];
+        h1 = T1[h1 ^ ch];
+        h2 = T2[h2 ^ ch];
+        h3 = T3[h3 ^ ch];
+        h4 = T4[h4 ^ ch];
+    }
+    
+    return (h4 << 24) | (h3 << 16) | (h2 << 8) | h1;
+}
+
+rc_t HashTableMake(HashTable **rslt, uint32_t initialSize, HashTableKeyCompFunc kf, const void *ctx)
+{
+    HashTable *self;
+    unsigned i;
+
+    *rslt = NULL;
+    
+    if (initialSize == 0)
+        initialSize = 2;
+    else {
+        uint32_t m;
+        
+        for (m = 2; m < initialSize; m <<= 1)
+            ;
+        initialSize = m;
+        
+        if (initialSize > HASH_TABLE_ENTRIES_MAX)
+            initialSize = HASH_TABLE_ENTRIES_MAX;
+    }
+    
+    self = malloc(sizeof(*self));
+    if (self == NULL)
+        return RC(rcCont, rcSelf, rcAllocating, rcMemory, rcExhausted);
+    
+#if HASH_TABLE_PREALLOC_MAX
+#else
+    self->table = malloc(initialSize * sizeof(self->table[0]));
+    if (self == NULL) {
+        free(self);
+        return RC(rcCont, rcSelf, rcAllocating, rcMemory, rcExhausted);
+    }
+#endif
+    
+    for (i = 0; i != initialSize; ++i) {
+        self->table[i].used = 0;
+        self->table[i].overflow = NULL;
+    }
+    
+    self->hashMask = initialSize - 1;
+    self->entryCount = 0;
+    
+    self->comp_func = kf;
+    self->ctx = ctx;
+
+    *rslt = self;
+    
+    return 0;
+}
+
+static bool HashTableValidate(const HashTable *self)
+{
+    unsigned i;
+    
+    for (i = 0; i != self->hashMask + 1; ++i) {
+        if (HTBucketValidate(&self->table[i], i, self->hashMask))
+            return true;
+    }
+    return false;
+}
+
+static rc_t HashTableExpand(HashTable *self)
+{
+    const uint32_t mask = (self->hashMask << 1) | 1;
+    size_t size;
+    unsigned i;
+#if HASH_TABLE_PREALLOC_MAX
+#else
+    HTBucket *temp;
+#endif
+    
+    /* the table must be smaller than the limit */
+    if (self->hashMask >= HASH_TABLE_ENTRIES_MAX - 1)
+        return 0;
+    
+    size = self->hashMask + 1;
+    
+    /* the density of used slots needs to be high enough */
+    if (self->entryCount * 4 < size * 3 * 32)
+        return 0;
+    
+#if HASH_TABLE_PREALLOC_MAX
+#else
+    temp = realloc(self->table, size * 2);
+    if (temp == NULL)
+        return RC(rcCont, rcTable, rcResizing, rcMemory, rcExhausted);
+    self->table = temp;
+#endif
+    
+    /* move any items that should be moved
+     * to the new buckets (about half should)
+     */
+    for (i = 0; i != size; ++i) {
+        HTBucket *bucket = &self->table[i];
+        HTBucket *other  = &self->table[i + size];
+        
+        other->overflow = NULL;
+        other->used = 0;
+        do {
+            unsigned j;
+            uint32_t bits = bucket->used;
+            
+            for (j = 0; j != 32 && bits != 0; ++j, bits >>= 1) {
+                /* slot j occupied? */
+                if ((bits & 1) != 0) {
+                    HTEntry *entry = &bucket->entry[j];
+                    
+                    assert((entry->hashValue & self->hashMask) == i);
+                    
+                    while ((entry->hashValue & mask) != i) {
+                        rc_t rc;
+
+                        /* move to new bucket */
+                        assert((entry->hashValue & mask) == i + size);
+                        
+                        rc = HTBucketInsert(other, entry);
+                        if (rc) return rc;
+                        if (HTBucketFreeSlot(bucket, j))
+                            break;
+                        
+                        /* FreeSlot decided to reuse the slot
+                         * for something from the overflow,
+                         * so process the new thing
+                         */
+                        assert((entry->hashValue & self->hashMask) == i);
+                    }
+                }
+            }
+            bucket = bucket->overflow;
+        } while (bucket);
+    }
+    self->hashMask = mask;
+#if 0
+    HashTableValidate(self);
+#endif    
+    return 0;
+}
+
+static rc_t HashTableShrink(HashTable *self)
+{
+    const uint32_t mask = self->hashMask >> 1;
+    size_t size;
+    unsigned i;
+    unsigned j;
+    
+    if (self->hashMask > 255)
+        return 0;
+    
+    size = self->hashMask + 1;
+    
+    if (self->entryCount * 4 >= size * 3 * 32)
+        return 0;
+    
+    for (j = 0, i = mask + 1; i != size; ++i, ++j) {
+        HTBucket *bucket = &self->table[i];
+        HTBucket *other  = &self->table[j];
+        
+        do {
+            unsigned k;
+            uint32_t bits = bucket->used;
+            
+            for (k = 0; k != 32 && bits != 0; ++k, bits >>= 1) {
+                if ((bits & 1) != 0) {
+                    rc_t rc;
+                    HTEntry *entry = &bucket->entry[k];
+                    
+                    assert((entry->hashValue & self->hashMask) == i);
+                    assert((entry->hashValue & mask) == j);
+                        
+                    rc = HTBucketInsert(other, entry);
+                    if (rc) return rc;
+                }
+            }
+            bucket = bucket->overflow;
+        } while (bucket);
+    }
+    self->hashMask = mask;
+#if 0
+    HashTableValidate(self);
+#endif    
+    return 0;
+}
+
+static bool HashTableFindSlot(const HashTable *self,
+                              const void *key,
+                              uint32_t key_len,
+                              HashTableRealIterator *iter
+                              )
+{
+    uint32_t h = GetHashValue(key, key_len);
+    const HTBucket *bucket = &self->table[h & self->hashMask];
+    const HTBucket *open_bucket = NULL;
+    int slot = 0;
+    
+    iter->hashValue = h;
+    do {
+        unsigned i;
+        uint32_t bits = bucket->used;
+        
+        for (i = 0; i != 32 && (bits != 0 || open_bucket == NULL); ++i, bits >>= 1) {
+            if ((bits & 1) == 0) {
+                if (open_bucket == NULL) {
+                    open_bucket = bucket;
+                    slot = i;
+                }
+                continue;
+            }
+            if (bucket->entry[i].hashValue != h)
+                continue;
+            if (self->comp_func(bucket->entry[i].payload, key, key_len, (void *)self->ctx) != 0)
+                continue;
+            
+            iter->bucket = (HTBucket *)bucket;
+            iter->slot = i;
+            return true;
+        }
+        if (bucket->overflow == NULL)
+            break;
+        bucket = bucket->overflow;
+    } while (1);
+    if (open_bucket == NULL) {
+        iter->bucket = (HTBucket *)bucket;
+        iter->slot = 32;
+    }
+    else {
+        iter->bucket = (HTBucket *)open_bucket;
+        iter->slot = slot;
+    }
+
+    return false;
+}
+
+HashTableIterator HashTableLookup(HashTable *self, const void *key, uint32_t key_length)
+{
+    HashTableImplIterator rslt;
+    
+    rslt.real.table = self;
+    HashTableFindSlot(self, key, key_length, &rslt.real);
+    
+    return rslt.user;
+}
+
+void HashTableRemove(HashTable *self, const HashTableIterator *iter,
+                        HashTableFreeFunc whack, void *ctx)
+{
+    const HashTableRealIterator *i = &((const HashTableImplIterator *)iter)->real;
+    uint32_t hv;
+    
+    assert(i->table == self);
+    if (i->slot > 32)
+        return;
+    if ((i->bucket->used & (1 << i->slot)) == 0)
+        return;
+    
+    hv = i->hashValue;
+    assert(hv == i->bucket->entry[i->slot].hashValue);
+    
+    if (whack)
+        whack((void *)i->bucket->entry[i->slot].payload, ctx);
+    
+    HTBucketFreeSlot(i->bucket, i->slot);
+    if (i->bucket->used == 0) {
+        HTBucket *parent = &self->table[hv & self->hashMask];
+        
+        if (i->bucket != parent) {
+            while (parent->overflow != i->bucket)
+                parent = parent->overflow;
+            assert(parent->overflow == i->bucket);
+            assert(i->bucket->overflow == NULL);
+            parent->overflow = NULL;
+            free(i->bucket);
+        }
+    }
+    --self->entryCount;
+}
+
+void HashTableForEach(const HashTable *self, void (*fn)(void *payload, void *ctx), void *ctx)
+{
+    unsigned i;
+    
+    for (i = 0; i != self->hashMask + 1; ++i) {
+        HTBucketForEach(&self->table[i], fn, ctx);
+    }
+}
+
+bool HashTableDoUntil(const HashTable *self, bool (*fn)(void *payload, void *ctx), void *ctx)
+{
+    unsigned i;
+    
+    for (i = 0; i != self->hashMask + 1; ++i) {
+        if (HTBucketDoUntil(&self->table[i], fn, ctx))
+            return true;
+    }
+    return false;
+}
+
+void HashTableWhack(HashTable *self, HashTableFreeFunc fn, void *ctx)
+{
+    unsigned i;
+    
+    if (self) {
+        for (i = 0; i != self->hashMask + 1; ++i)
+            HTBucketWhack(&self->table[i], fn, ctx);
+#if HASH_TABLE_PREALLOC_MAX
+#else
+        free(self->table);
+#endif
+        free(self);
+    }
+}
+
+bool HashTableIteratorHasValue(const HashTableIterator *iter)
+{
+    const HashTableRealIterator *i = &((const HashTableImplIterator *)iter)->real;
+    
+    if (i->slot < 32 && (i->bucket->used & (1 << i->slot)) != 0)
+        return true;
+    return false;
+}
+
+const void *HashTableIteratorGetValue(const HashTableIterator *iter)
+{
+    const HashTableRealIterator *i = &((const HashTableImplIterator *)iter)->real;
+    return i->bucket->entry[i->slot].payload;
+}
+
+rc_t HashTableIteratorSetValue(HashTableIterator *iter, const void *value)
+{
+    HashTableRealIterator *i = &((HashTableImplIterator *)iter)->real;
+    HashTable *self = i->table;
+    
+    if (i->slot >= 32) {
+        rc_t rc;
+        
+        assert(i->bucket->used == 0xFFFFFFFF);
+        rc = HashTableExpand(self);
+        if (rc)
+            return rc;
+        rc = HTBucketNextOpenSlot(&self->table[i->hashValue & self->hashMask], &i->bucket, &i->slot);
+        if (rc)
+            return rc;
+    }
+    assert((i->bucket->used & (1 << i->slot)) == 0);
+    i->bucket->entry[i->slot].hashValue = i->hashValue;
+    i->bucket->entry[i->slot].payload = value;
+    i->bucket->used |= (1 << i->slot);
+    ++self->entryCount;
+    return 0;
+}
+
+#define TESTING 0
+#if TESTING
+#include <stdio.h>
+#include <string.h>
+
+struct pstring {
+    uint8_t len;
+    char str[255];
+};
+
+static int comp_func(const void *Obj, const void *key, uint32_t len, void *ignore)
+{
+    const struct pstring *obj = Obj;
+    return obj->len == len ? memcmp(obj->str, key, len) : obj->len - len;
+}
+
+static void print_key(void *Obj, void *ignore)
+{
+    const struct pstring *obj = Obj;
+    
+    printf("%s\n", obj->str);
+    return;
+}
+
+static struct pstring **LoadTestData(unsigned *count) {
+    FILE *fp = fopen("spot_name.txt", "r");
+    unsigned N = 0;
+    unsigned bytes = 0;
+    struct pstring **rslt;
+    
+    *count = 0;
+    if (fp == NULL) {
+        perror("failed to open test data file");
+        return NULL;
+    }
+    do {
+        char buf[256];
+        int i = fscanf(fp, " %256s ", buf);
+        if (i != 1)
+            break;
+        ++N;
+        bytes += strlen(buf);
+    } while (1);
+    rewind(fp);
+    
+    rslt = malloc(N * (sizeof(*rslt) + 2) + bytes);
+    if (rslt) {
+        unsigned i;
+        char *cp = (char *)&rslt[N];
+        
+        for (i = 0; i != N; ++i) {
+            rslt[i] = (struct pstring *)cp;
+            fscanf(fp, " %s ", rslt[i]->str);
+            rslt[i]->len = strlen(rslt[i]->str);
+            cp += rslt[i]->len + 2;
+        }
+        *count = N;
+    }
+    fclose(fp);
+    return rslt;
+}
+
+bool is_not_consistent(void *payload, void *context)
+{
+    return payload == NULL;
+}
+
+void test(void) {
+    HashTable *ht;
+    struct pstring **testdata;
+    unsigned N;
+    unsigned i;
+    
+    srand(time(0));
+    
+    testdata = LoadTestData(&N);
+   
+    if (HashTableMake(&ht, 0, comp_func, 0) != 0)
+        return;
+    
+    for (i = 0; i != N; ++i) {
+        const struct pstring *val = testdata[i % N];
+        HashTableIterator iter = HashTableLookup(ht, val->str, val->len);
+        
+        if (HashTableIteratorHasValue(&iter)) {
+            HashTableRemove(ht, &iter, 0, 0);
+        }
+        else {
+            HashTableIteratorSetValue(&iter, val);
+        }
+    }
+#if 1
+    HashTableValidate(ht);
+#else
+    HashTableForEach(ht, print_key, 0);
+#endif
+    HashTableWhack(ht, 0, 0);
+}
+#endif
+
diff --git a/tools/bam-loader/hashtable.h b/tools/bam-loader/hashtable.h
new file mode 100644
index 0000000..e77ee9c
--- /dev/null
+++ b/tools/bam-loader/hashtable.h
@@ -0,0 +1,55 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct HashTable HashTable;
+typedef struct HashTableIterator HashTableIterator;
+
+typedef int (*HashTableKeyCompFunc)(const void *value, const void *key, uint32_t key_length, void *context);
+typedef void (*HashTableFreeFunc)(void *value, void *context);
+
+struct HashTableIterator {
+    const void *root;
+    const void *bucket;
+    uint64_t id;
+};
+
+rc_t HashTableMake(HashTable **rslt, uint32_t initialSize, HashTableKeyCompFunc kf, const void *context);
+
+void HashTableForEach(const HashTable *self, void (*fn)(void *value, void *context), void *context);
+
+bool HashTableDoUntil(const HashTable *self, bool (*fn)(void *value, void *context), void *context);
+
+HashTableIterator HashTableLookup(HashTable *self, const void *key, uint32_t key_length);
+
+void HashTableWhack(HashTable *self, HashTableFreeFunc fn, void *context);
+
+void HashTableRemove(HashTable *self, const HashTableIterator *iter, HashTableFreeFunc whack, void *context);
+
+bool HashTableIteratorHasValue(const HashTableIterator *iter);
+
+const void *HashTableIteratorGetValue(const HashTableIterator *iter);
+
+rc_t HashTableIteratorSetValue(HashTableIterator *iter, const void *value);
diff --git a/tools/bam-loader/loader-imp.c b/tools/bam-loader/loader-imp.c
new file mode 100644
index 0000000..36cc676
--- /dev/null
+++ b/tools/bam-loader/loader-imp.c
@@ -0,0 +1,3086 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+/* #include "bam-load.vers.h" */
+
+#include <klib/callconv.h>
+#include <klib/data-buffer.h>
+#include <klib/text.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <klib/rc.h>
+#include <klib/sort.h>
+#include <klib/printf.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kdb/btree.h>
+#include <kdb/manager.h>
+#include <kdb/database.h>
+#include <kdb/table.h>
+#include <kdb/meta.h>
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <vdb/vdb-priv.h>
+
+#include <insdc/insdc.h>
+#include <insdc/sra.h>
+#include <align/dna-reverse-cmpl.h>
+#include <align/align.h>
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <kapp/loader-file.h>
+#include <kapp/loader-meta.h>
+#include <kapp/log-xml.h>
+#include <kapp/progressbar.h>
+
+#include <kproc/queue.h>
+#include <kproc/thread.h>
+#include <kproc/timeout.h>
+#include <os-native.h>
+
+#include <sysalloc.h>
+#include <atomic32.h>
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+#include <limits.h>
+#include <time.h>
+#include <zlib.h>
+#include "bam.h"
+#include "bam-alignment.h"
+#include "Globals.h"
+#include "sequence-writer.h"
+#include "reference-writer.h"
+#include "alignment-writer.h"
+#include "mem-bank.h"
+#include "low-match-count.h"
+
+#define THREADING_BAMREAD 1              /*** Reading BAM and SAM are moved to a separate thread ***/
+#if THREADING_BAMREAD
+#define THREADING_BAMREAD_PRIME_NAME2KEY 1 /*** Only valid when THREADING_BAMREAD==1. Will prime Name2Key on BAM/SAM thread ***/
+#endif
+
+#define NUM_ID_SPACES (256u)
+
+#define MMA_NUM_CHUNKS_BITS (20u)
+#define MMA_NUM_SUBCHUNKS_BITS ((32u)-(MMA_NUM_CHUNKS_BITS))
+#define MMA_SUBCHUNK_SIZE (1u << MMA_NUM_CHUNKS_BITS)
+#define MMA_SUBCHUNK_COUNT (1u << MMA_NUM_SUBCHUNKS_BITS)
+
+typedef struct {
+    int fd;
+    size_t elemSize;
+    off_t fsize;
+    uint8_t *current;
+    struct mma_map_s {
+        struct mma_submap_s {
+            uint8_t *base;
+        } submap[MMA_SUBCHUNK_COUNT];
+    } map[NUM_ID_SPACES];
+} MMArray;
+
+typedef struct {
+    uint32_t primaryId[2];
+    uint32_t spotId;
+    uint32_t fragmentId;
+	uint8_t  fragment_len[2]; /*** lowest byte of fragment length to prevent different sizes of primary and secondary alignments **/
+    uint8_t  platform;
+    uint8_t  pId_ext[2];
+    uint8_t  spotId_ext;
+    uint8_t  alignmentCount[2]; /* 0..254; 254: saturated max; 255: special meaning "too many" */
+    uint8_t  unmated: 1,
+             pcr_dup: 1,
+             unaligned_1: 1,
+             unaligned_2: 1,
+             hardclipped: 1,
+			 primary_is_set: 1;
+} ctx_value_t;
+
+#define CTX_VALUE_SET_P_ID(O,N,V) do { int64_t tv = (V); (O).primaryId[N] = (uint32_t)tv; (O).pId_ext[N] = tv >> 32; } while(0);
+#define CTX_VALUE_GET_P_ID(O,N) ((((int64_t)((O).pId_ext[N])) << 32) | (O).primaryId[N])
+
+#define CTX_VALUE_SET_S_ID(O,V) do { int64_t tv = (V); (O).spotId = (uint32_t)tv; (O).spotId_ext = tv >> 32; } while(0);
+#define CTX_VALUE_GET_S_ID(O) ((((int64_t)(O).spotId_ext) << 32) | (O).spotId)
+
+typedef struct FragmentInfo {
+    uint64_t ti;
+    uint32_t readlen;
+    uint8_t  lglen;
+    uint8_t  aligned;
+    uint8_t  is_bad;
+    uint8_t  orientation;
+    uint8_t  otherReadNo;
+    uint8_t  sglen;
+    uint8_t  cskey;
+} FragmentInfo;
+
+typedef struct KeyToID {
+    KBTree *key2id[NUM_ID_SPACES];
+    char *key2id_names;
+
+    uint32_t idCount[NUM_ID_SPACES];
+    uint32_t key2id_hash[NUM_ID_SPACES];
+
+    unsigned key2id_max;
+    unsigned key2id_name_max;
+    unsigned key2id_name_alloc;
+    unsigned key2id_count;
+
+    unsigned key2id_name[NUM_ID_SPACES];
+    /* this array is kept in name order */
+    /* this maps the names to key2id and idCount */
+    unsigned key2id_oid[NUM_ID_SPACES];
+} KeyToID;
+
+typedef struct context_t {
+    KeyToID keyToID;
+    const KLoadProgressbar *progress[4];
+    MMArray *id2value;
+    MemBank *frags;
+    int64_t spotId;
+    int64_t primaryId;
+    int64_t secondId;
+    uint64_t alignCount;
+
+    unsigned pass;
+    bool isColorSpace;
+} context_t;
+
+static char const *Print_ctx_value_t(ctx_value_t const *const self)
+{
+    static char buffer[16384];
+    rc_t rc = string_printf(buffer, sizeof(buffer), NULL, "pid: { %lu, %lu }, sid: %lu, fid: %u, alc: { %u, %u }, flg: %x", CTX_VALUE_GET_P_ID(*self, 0), CTX_VALUE_GET_P_ID(*self, 1), CTX_VALUE_GET_S_ID(*self), self->fragmentId, self->alignmentCount[0], self->alignmentCount[1], *(self->alignmentCount + sizeof(self->alignmentCount)/sizeof(self->alignmentCount[0])));
+
+    if (rc)
+        return 0;
+    return buffer;
+}
+
+static rc_t MMArrayMake(MMArray **rslt, int fd, uint32_t elemSize)
+{
+    MMArray *const self = calloc(1, sizeof(*self));
+
+    if (self == NULL)
+        return RC(rcExe, rcMemMap, rcConstructing, rcMemory, rcExhausted);
+    self->elemSize = (elemSize + 3) & ~(3u); /** align to 4 byte **/
+    self->fd = fd;
+    *rslt = self;
+    return 0;
+}
+
+#define PERF 0
+#define PROT 0
+
+static rc_t MMArrayGet(MMArray *const self, void **const value, uint64_t const element)
+{
+    size_t const chunk = MMA_SUBCHUNK_SIZE * self->elemSize;
+    unsigned const bin_no = element >> 32;
+    unsigned const subbin = ((uint32_t)element) >> MMA_NUM_CHUNKS_BITS;
+    unsigned const in_bin = (uint32_t)element & (MMA_SUBCHUNK_SIZE - 1);
+
+    if (bin_no >= sizeof(self->map)/sizeof(self->map[0]))
+        return RC(rcExe, rcMemMap, rcConstructing, rcId, rcExcessive);
+
+    if (self->map[bin_no].submap[subbin].base == NULL) {
+        off_t const cur_fsize = self->fsize;
+        off_t const new_fsize = cur_fsize + chunk;
+
+        if (ftruncate(self->fd, new_fsize) != 0)
+            return RC(rcExe, rcFile, rcResizing, rcSize, rcExcessive);
+        else {
+            void *const base = mmap(NULL, chunk, PROT_READ|PROT_WRITE,
+                                    MAP_FILE|MAP_SHARED, self->fd, cur_fsize);
+
+            self->fsize = new_fsize;
+            if (base == MAP_FAILED) {
+                PLOGMSG(klogErr, (klogErr, "Failed to construct map for bin $(bin), subbin $(subbin)", "bin=%u,subbin=%u", bin_no, subbin));
+                return RC(rcExe, rcMemMap, rcConstructing, rcMemory, rcExhausted);
+            }
+            else {
+#if PERF
+                static unsigned mapcount = 0;
+
+                (void)PLOGMSG(klogInfo, (klogInfo, "Number of mmaps: $(cnt)", "cnt=%u", ++mapcount));
+#endif
+                self->map[bin_no].submap[subbin].base = base;
+            }
+        }
+    }
+    uint8_t *const next = self->map[bin_no].submap[subbin].base;
+#if PROT
+    if (next != self->current) {
+        void *const current = self->current;
+
+        if (current)
+            mprotect(current, chunk, PROT_NONE);
+
+        mprotect(self->current = next, chunk, PROT_READ|PROT_WRITE);
+    }
+#endif
+    *value = &next[(size_t)in_bin * self->elemSize];
+    return 0;
+}
+
+static rc_t MMArrayGetRead(MMArray *const self, void const **const value, uint64_t const element)
+{
+    unsigned const bin_no = element >> 32;
+    unsigned const subbin = ((uint32_t)element) >> MMA_NUM_CHUNKS_BITS;
+    unsigned const in_bin = (uint32_t)element & (MMA_SUBCHUNK_SIZE - 1);
+
+    if (bin_no >= sizeof(self->map)/sizeof(self->map[0]))
+        return RC(rcExe, rcMemMap, rcConstructing, rcId, rcExcessive);
+
+    if (self->map[bin_no].submap[subbin].base == NULL)
+        return RC(rcExe, rcMemMap, rcReading, rcId, rcInvalid);
+
+    uint8_t *const next = self->map[bin_no].submap[subbin].base;
+#if PROT
+    size_t const chunk = MMA_SUBCHUNK_SIZE * self->elemSize;
+    if (next != self->current) {
+        void *const current = self->current;
+
+        if (current)
+            mprotect(current, chunk, PROT_NONE);
+
+        mprotect(self->current = next, chunk, PROT_READ);
+    }
+#endif
+    *value = &next[(size_t)in_bin * self->elemSize];
+    return 0;
+}
+
+static void MMArrayLock(MMArray *const self)
+{
+#if PROT
+    size_t const chunk = MMA_SUBCHUNK_SIZE * self->elemSize;
+    void *const current = self->current;
+
+    self->current = NULL;
+    if (current)
+        mprotect(current, chunk, PROT_NONE);
+#endif
+}
+
+static void MMArrayClear(MMArray *self)
+{
+    size_t const chunk = MMA_SUBCHUNK_SIZE * self->elemSize;
+    unsigned i;
+
+    for (i = 0; i != sizeof(self->map)/sizeof(self->map[0]); ++i) {
+        unsigned j;
+
+        for (j = 0; j != sizeof(self->map[0].submap)/sizeof(self->map[0].submap[0]); ++j) {
+            if (self->map[i].submap[j].base) {
+#if PROT
+                mprotect(self->map[i].submap[j].base, chunk, PROT_READ|PROT_WRITE);
+#endif
+            	memset(self->map[i].submap[j].base, 0, chunk);
+#if PROT
+                mprotect(self->map[i].submap[j].base, chunk, PROT_NONE);
+#endif
+            }
+        }
+    }
+#if PROT
+    self->current = NULL;
+#endif
+}
+
+static void MMArrayWhack(MMArray *self)
+{
+    size_t const chunk = MMA_SUBCHUNK_SIZE * self->elemSize;
+    unsigned i;
+
+    for (i = 0; i != sizeof(self->map)/sizeof(self->map[0]); ++i) {
+        unsigned j;
+
+        for (j = 0; j != sizeof(self->map[0].submap)/sizeof(self->map[0].submap[0]); ++j) {
+            if (self->map[i].submap[j].base)
+            	munmap(self->map[i].submap[j].base, chunk);
+        }
+    }
+    close(self->fd);
+    free(self);
+}
+
+static rc_t OpenKBTree(KBTree **const rslt, unsigned n, unsigned max)
+{
+    size_t const cacheSize = (((G.cache_size - (G.cache_size / 2) - (G.cache_size / 8)) / max)
+                            + 0xFFFFF) & ~((size_t)0xFFFFF);
+    KFile *file = NULL;
+    KDirectory *dir;
+    char fname[4096];
+    rc_t rc;
+
+    rc = KDirectoryNativeDir(&dir);
+    if (rc)
+        return rc;
+
+    rc = string_printf(fname, sizeof(fname), NULL, "%s/key2id.%u.%u", G.tmpfs, G.pid, n); if (rc) return rc;
+    rc = KDirectoryCreateFile(dir, &file, true, 0600, kcmInit, "%s", fname);
+    KDirectoryRemove(dir, 0, "%s", fname);
+    KDirectoryRelease(dir);
+    if (rc == 0) {
+        rc = KBTreeMakeUpdate(rslt, file, cacheSize,
+                              false, kbtOpaqueKey,
+                              1, 255, sizeof ( uint32_t ),
+                              NULL
+                              );
+        KFileRelease(file);
+#if PERF
+        if (rc == 0) {
+            static unsigned treecount = 0;
+
+            (void)PLOGMSG(klogInfo, (klogInfo, "Number of trees: $(cnt)", "cnt=%u", ++treecount));
+        }
+#endif
+    }
+    return rc;
+}
+
+static rc_t GetKeyIDOld(KeyToID *const ctx, uint64_t *const rslt, bool *const wasInserted, char const key[], char const name[], unsigned const namelen)
+{
+    unsigned const keylen = strlen(key);
+    rc_t rc;
+    uint64_t tmpKey;
+
+    if (ctx->key2id_count == 0) {
+        rc = OpenKBTree(&ctx->key2id[0], 1, 1);
+        if (rc) return rc;
+        ctx->key2id_count = 1;
+    }
+    if (memcmp(key, name, keylen) == 0) {
+        /* qname starts with read group; no append */
+        tmpKey = ctx->idCount[0];
+        rc = KBTreeEntry(ctx->key2id[0], &tmpKey, wasInserted, name, namelen);
+    }
+    else {
+        char sbuf[4096];
+        char *buf = sbuf;
+        char *hbuf = NULL;
+        size_t bsize = sizeof(sbuf);
+        size_t actsize;
+
+        if (keylen + namelen + 2 > bsize) {
+            hbuf = malloc(bsize = keylen + namelen + 2);
+            if (hbuf == NULL)
+                return RC(rcExe, rcName, rcAllocating, rcMemory, rcExhausted);
+            buf = hbuf;
+        }
+        rc = string_printf(buf, bsize, &actsize, "%s\t%.*s", key, (int)namelen, name);
+
+        tmpKey = ctx->idCount[0];
+        rc = KBTreeEntry(ctx->key2id[0], &tmpKey, wasInserted, buf, actsize);
+        if (hbuf)
+            free(hbuf);
+    }
+    if (rc == 0) {
+        *rslt = tmpKey;
+        if (*wasInserted)
+            ++ctx->idCount[0];
+    }
+    return rc;
+}
+
+static unsigned HashKey(void const *const key, unsigned const keylen)
+{
+#if 0
+    /* There is nothing special about this hash. It was randomly generated. */
+    static const uint8_t T1[] = {
+         64, 186,  39, 203,  54, 211,  98,  32,  26,  23, 219,  94,  77,  60,  56, 184,
+        129, 242,  10,  91,  84, 192,  19, 197, 231, 133, 125, 244,  48, 176, 160, 164,
+         17,  41,  57, 137,  44, 196, 116, 146, 105,  40, 122,  47, 220, 226, 213, 212,
+        107, 191,  52, 144,   9, 145,  81, 101, 217, 206,  85, 134, 143,  58, 128,  20,
+        236, 102,  83, 149, 148, 180, 167, 163,  12, 239,  31,   0,  73, 152,   1,  15,
+         75, 200,   4, 165,   5,  66,  25, 111, 255,  70, 174, 151,  96, 126, 147,  34,
+        112, 161, 127, 181, 237,  78,  37,  74, 222, 123,  21, 132,  95,  51, 141,  45,
+         61, 131, 193,  68,  62, 249, 178,  33,   7, 195, 228,  82,  27,  46, 254,  90,
+        185, 240, 246, 124, 205, 182,  42,  22, 198,  69, 166,  92, 169, 136, 223, 245,
+        118,  97, 115,  80, 252, 209,  49,  79, 221,  38,  28,  35,  36, 208, 187, 248,
+        158, 201, 202, 168,   2,  18, 189, 119, 216, 214,  11,   6,  89,  16, 229, 109,
+        120,  43, 162, 106, 204,   8, 199, 235, 142, 210,  86, 153, 227, 230,  24, 100,
+        224, 113, 190, 243, 218, 215, 225, 173,  99, 238, 138,  59, 183, 154, 171, 232,
+        157, 247, 233,  67,  88,  50, 253, 251, 140, 104, 156, 170, 150, 103, 117, 110,
+        155,  72, 207, 250, 159, 194, 177, 130, 135,  87,  71, 175,  14,  55, 172, 121,
+        234,  13,  30, 241,  93, 188,  53, 114,  76,  29,  65,   3, 179, 108,  63, 139
+    };
+    unsigned h = 0x55;
+    unsigned i = keylen;
+
+    do { h = T1[h ^ ((uint8_t)i)]; } while ((i >>= 8) != 0);
+
+    for (i = 0; i != keylen; ++i)
+        h = T1[h ^ ((uint8_t const *)key)[i]];
+
+    return h;
+#else
+    /* FNV-1a hash with folding */
+    uint64_t h = 0xcbf29ce484222325;
+    unsigned i;
+
+    for (i = 0; i < keylen; ++i) {
+        uint8_t const octet = ((uint8_t const *)key)[i];
+        h = (h ^ octet) * 0x100000001b3ull;
+    }
+    return ((uint32_t)(h ^ (h >> 32))) % NUM_ID_SPACES;
+#endif
+}
+
+#define USE_ILLUMINA_NAMING_CORRECTION 1
+
+static size_t GetFixedNameLength(char const name[], size_t const namelen)
+{
+#if USE_ILLUMINA_NAMING_CORRECTION
+    /*** Check for possible fixes to illumina names ****/
+    size_t newlen=namelen;
+    /*** First get rid of possible "/1" "/2" "/3" at the end - violates SAM spec **/
+    if(newlen > 2  && name[newlen-2] == '/' &&  (name[newlen-1] == '1' || name[newlen-1] == '2' || name[newlen-1] == '3')){
+        newlen -=2;
+    }
+    if(newlen > 2 && name[newlen-2] == '#' &&  (name[newlen-1] == '0')){ /*** Now, find "#0" ***/
+        newlen -=2;
+    } else if(newlen>10){ /*** find #ACGT ***/
+        int i=newlen;
+        for(i--;i>4;i--){ /*** stopping at 4 since the rest of record should still contain :x:y ***/
+            char a=toupper(name[i]);
+            if(a != 'A' && a != 'C' && a !='G' && a !='T'){
+                break;
+            }
+        }
+        if (name[i] == '#'){
+            switch (newlen-i) { /** allowed values for illumina barcodes :5,6,8 **/
+                case 5:
+                case 6:
+                case 8:
+                    newlen=i;
+                    break;
+                default:
+                    break;
+            }
+        }
+    }
+    if(newlen < namelen){ /*** check for :x:y at the end now - to make sure it is illumina **/
+        int i=newlen;
+        for(i--;i>0 && isdigit(name[i]);i--){}
+        if(name[i]==':'){
+            for(i--;i>0 && isdigit(name[i]);i--){}
+            if(name[i]==':' && newlen > 0){ /*** some name before :x:y should still exist **/
+                /*** looks like illumina ***/
+                return newlen;
+            }
+        }
+    }
+#endif
+    return namelen;
+}
+
+static
+rc_t GetKeyID(KeyToID *const ctx,
+              uint64_t *const rslt,
+              bool *const wasInserted,
+              char const key[],
+              char const name[],
+              size_t const o_namelen)
+{
+    size_t const namelen = GetFixedNameLength(name, o_namelen);
+
+    if (ctx->key2id_max == 1)
+        return GetKeyIDOld(ctx, rslt, wasInserted, key, name, namelen);
+    else {
+        unsigned const keylen = strlen(key);
+        unsigned const h = HashKey(key, keylen);
+        unsigned f;
+        unsigned e = ctx->key2id_count;
+        uint64_t tmpKey;
+
+        *rslt = 0;
+        {{
+            uint32_t const bucket_value = ctx->key2id_hash[h];
+            unsigned const n  = (uint8_t) bucket_value;
+            unsigned const i1 = (uint8_t)(bucket_value >>  8);
+            unsigned const i2 = (uint8_t)(bucket_value >> 16);
+            unsigned const i3 = (uint8_t)(bucket_value >> 24);
+
+            if (n > 0 && strcmp(key, ctx->key2id_names + ctx->key2id_name[i1]) == 0) {
+                f = i1;
+                /*
+                ctx->key2id_hash[h] = (i3 << 24) | (i2 << 16) | (i1 << 8) | n;
+                 */
+                goto GET_ID;
+            }
+            if (n > 1 && strcmp(key, ctx->key2id_names + ctx->key2id_name[i2]) == 0) {
+                f = i2;
+                ctx->key2id_hash[h] = (i3 << 24) | (i1 << 16) | (i2 << 8) | n;
+                goto GET_ID;
+            }
+            if (n > 2 && strcmp(key, ctx->key2id_names + ctx->key2id_name[i3]) == 0) {
+                f = i3;
+                ctx->key2id_hash[h] = (i2 << 24) | (i1 << 16) | (i3 << 8) | n;
+                goto GET_ID;
+            }
+        }}
+        f = 0;
+        while (f < e) {
+            unsigned const m = (f + e) / 2;
+            unsigned const oid = ctx->key2id_oid[m];
+            int const diff = strcmp(key, ctx->key2id_names + ctx->key2id_name[oid]);
+
+            if (diff < 0)
+                e = m;
+            else if (diff > 0)
+                f = m + 1;
+            else {
+                f = oid;
+                goto GET_ID;
+            }
+        }
+        if (ctx->key2id_count < ctx->key2id_max) {
+            unsigned const name_max = ctx->key2id_name_max + keylen + 1;
+            KBTree *tree;
+            rc_t rc = OpenKBTree(&tree, ctx->key2id_count + 1, 1); /* ctx->key2id_max); */
+
+            if (rc) return rc;
+
+            if (ctx->key2id_name_alloc < name_max) {
+                unsigned alloc = ctx->key2id_name_alloc;
+                void *tmp;
+
+                if (alloc == 0)
+                    alloc = 4096;
+                while (alloc < name_max)
+                    alloc <<= 1;
+                tmp = realloc(ctx->key2id_names, alloc);
+                if (tmp == NULL)
+                    return RC(rcExe, rcName, rcAllocating, rcMemory, rcExhausted);
+                ctx->key2id_names = tmp;
+                ctx->key2id_name_alloc = alloc;
+            }
+            if (f < ctx->key2id_count) {
+                memmove(&ctx->key2id_oid[f + 1], &ctx->key2id_oid[f], (ctx->key2id_count - f) * sizeof(ctx->key2id_oid[f]));
+            }
+            ctx->key2id_oid[f] = ctx->key2id_count;
+            ++ctx->key2id_count;
+            f = ctx->key2id_oid[f];
+            ctx->key2id_name[f] = ctx->key2id_name_max;
+            ctx->key2id_name_max = name_max;
+
+            memcpy(&ctx->key2id_names[ctx->key2id_name[f]], key, keylen + 1);
+            ctx->key2id[f] = tree;
+            ctx->idCount[f] = 0;
+            if ((uint8_t)ctx->key2id_hash[h] < 3) {
+                unsigned const n = (uint8_t)ctx->key2id_hash[h] + 1;
+
+                ctx->key2id_hash[h] = (((ctx->key2id_hash[h] & ~(0xFFu)) | f) << 8) | n;
+            }
+            else {
+                /* the hash function isn't working too well
+                 * keep the 3 mru
+                 */
+                ctx->key2id_hash[h] = (((ctx->key2id_hash[h] & ~(0xFFu)) | f) << 8) | 3;
+            }
+        GET_ID:
+            tmpKey = ctx->idCount[f];
+            rc = KBTreeEntry(ctx->key2id[f], &tmpKey, wasInserted, name, namelen);
+            if (rc == 0) {
+                *rslt = (((uint64_t)f) << 32) | tmpKey;
+                if (*wasInserted)
+                    ++ctx->idCount[f];
+                assert(tmpKey < ctx->idCount[f]);
+            }
+            return rc;
+        }
+        return RC(rcExe, rcTree, rcAllocating, rcConstraint, rcViolated);
+    }
+}
+
+static rc_t OpenMMapFile(context_t *const ctx, KDirectory *const dir)
+{
+    int fd;
+    char fname[4096];
+    rc_t rc = string_printf(fname, sizeof(fname), NULL, "%s/id2value.%u", G.tmpfs, G.pid);
+
+    if (rc)
+        return rc;
+
+    fd = open(fname, O_RDWR|O_TRUNC|O_CREAT, S_IRUSR|S_IWUSR);
+    if (fd < 0)
+        return RC(rcExe, rcFile, rcCreating, rcFile, rcNotFound);
+    unlink(fname);
+    return MMArrayMake(&ctx->id2value, fd, sizeof(ctx_value_t));
+}
+
+static rc_t TmpfsDirectory(KDirectory **const rslt)
+{
+    KDirectory *dir;
+    rc_t rc = KDirectoryNativeDir(&dir);
+    if (rc == 0) {
+        rc = KDirectoryOpenDirUpdate(dir, rslt, false, "%s", G.tmpfs);
+        KDirectoryRelease(dir);
+    }
+    return rc;
+}
+
+static rc_t SetupContext(context_t *ctx, unsigned numfiles)
+{
+    rc_t rc = 0;
+
+    // memset(ctx, 0, sizeof(*ctx));
+
+    if (G.mode == mode_Archive) {
+        KDirectory *dir;
+        size_t fragSize[2];
+
+        fragSize[1] = (G.cache_size / 8);
+        fragSize[0] = fragSize[1] * 4;
+
+        rc = TmpfsDirectory(&dir);
+        if (rc == 0)
+            rc = OpenMMapFile(ctx, dir);
+        if (rc == 0)
+            rc = MemBankMake(&ctx->frags, dir, G.pid, fragSize);
+        KDirectoryRelease(dir);
+    }
+    else if (G.mode == mode_Remap) {
+        KeyToID const save1 = ctx->keyToID;
+        MMArray *const save2 = ctx->id2value;
+        int64_t const save3 = ctx->spotId;
+
+        memset(ctx, 0, sizeof(*ctx));
+        ctx->keyToID = save1;
+        ctx->id2value = save2;
+        ctx->spotId = save3;
+    }
+
+    rc = KLoadProgressbar_Make(&ctx->progress[0], 0); if (rc) return rc;
+    rc = KLoadProgressbar_Make(&ctx->progress[1], 0); if (rc) return rc;
+    rc = KLoadProgressbar_Make(&ctx->progress[2], 0); if (rc) return rc;
+    rc = KLoadProgressbar_Make(&ctx->progress[3], 0); if (rc) return rc;
+
+    KLoadProgressbar_Append(ctx->progress[0], 100 * numfiles);
+
+    return rc;
+}
+
+static void ContextReleaseMemBank(context_t *ctx)
+{
+    MemBankRelease(ctx->frags);
+    ctx->frags = NULL;
+}
+
+static void ContextRelease(context_t *ctx, bool continuing)
+{
+    KLoadProgressbar_Release(ctx->progress[0], true);
+    KLoadProgressbar_Release(ctx->progress[1], true);
+    KLoadProgressbar_Release(ctx->progress[2], true);
+    KLoadProgressbar_Release(ctx->progress[3], true);
+    if (!continuing)
+        MMArrayWhack(ctx->id2value);
+    else
+        MMArrayClear(ctx->id2value);
+}
+
+static
+void COPY_QUAL(uint8_t D[], uint8_t const S[], unsigned const L, bool const R)
+{
+    if (R) {
+        unsigned i;
+        unsigned j;
+
+        for (i = 0, j = L - 1; i != L; ++i, --j)
+            D[i] = S[j];
+    }
+    else
+        memcpy(D, S, L);
+}
+
+static
+void COPY_READ(INSDC_dna_text D[], INSDC_dna_text const S[], unsigned const L, bool const R)
+{
+    static INSDC_dna_text const compl[] = {
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 , '.',  0 ,
+        '0', '1', '2', '3',  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 , 'T', 'V', 'G', 'H',  0 ,  0 , 'C',
+        'D',  0 ,  0 , 'M',  0 , 'K', 'N',  0 ,
+         0 ,  0 , 'Y', 'S', 'A', 'A', 'B', 'W',
+         0 , 'R',  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 , 'T', 'V', 'G', 'H',  0 ,  0 , 'C',
+        'D',  0 ,  0 , 'M',  0 , 'K', 'N',  0 ,
+         0 ,  0 , 'Y', 'S', 'A', 'A', 'B', 'W',
+         0 , 'R',  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0
+    };
+    if (R) {
+        unsigned i;
+        unsigned j;
+
+        for (i = 0, j = L - 1; i != L; ++i, --j)
+            D[i] = compl[((uint8_t const *)S)[j]];
+    }
+    else
+        memcpy(D, S, L);
+}
+
+static KFile *MakeDeferralFile() {
+    if (G.deferSecondary) {
+        char template[4096];
+        int fd;
+        KFile *f;
+        KDirectory *d;
+        size_t nwrit;
+
+        KDirectoryNativeDir(&d);
+        string_printf(template, sizeof(template), &nwrit, "%s/defer.XXXXXX", G.tmpfs);
+        fd = mkstemp(template);
+        KDirectoryOpenFileWrite(d, &f, true, template);
+        close(fd);
+        unlink(template);
+        return f;
+    }
+    return NULL;
+}
+
+static rc_t OpenBAM(const BAM_File **bam, VDatabase *db, const char bamFile[])
+{
+    rc_t rc = 0;
+
+    if (strcmp(bamFile, "/dev/stdin") == 0) {
+        rc = BAM_FileMake(bam, MakeDeferralFile(), G.headerText, "/dev/stdin");
+    }
+    else {
+        rc = BAM_FileMake(bam, MakeDeferralFile(), G.headerText, "%s", bamFile);
+    }
+    if (rc) {
+        (void)PLOGERR(klogErr, (klogErr, rc, "Failed to open '$(file)'", "file=%s", bamFile));
+    }
+    else if (db) {
+        KMetadata *dbmeta;
+
+        rc = VDatabaseOpenMetadataUpdate(db, &dbmeta);
+        if (rc == 0) {
+            KMDataNode *node;
+
+            rc = KMetadataOpenNodeUpdate(dbmeta, &node, "BAM_HEADER");
+            KMetadataRelease(dbmeta);
+            if (rc == 0) {
+                char const *header;
+                size_t size;
+
+                rc = BAM_FileGetHeaderText(*bam, &header, &size);
+                if (rc == 0) {
+                    rc = KMDataNodeWrite(node, header, size);
+                }
+                KMDataNodeRelease(node);
+            }
+        }
+    }
+
+    return rc;
+}
+
+static rc_t VerifyReferences(BAM_File const *bam, Reference const *ref)
+{
+    rc_t rc = 0;
+    uint32_t n;
+    unsigned i;
+
+    BAM_FileGetRefSeqCount(bam, &n);
+    for (i = 0; i != n; ++i) {
+        BAMRefSeq const *refSeq;
+
+        BAM_FileGetRefSeq(bam, i, &refSeq);
+        if (G.refFilter && strcmp(refSeq->name, G.refFilter) != 0)
+            continue;
+
+        rc = ReferenceVerify(ref, refSeq->name, refSeq->length, refSeq->checksum);
+        if (rc) {
+            if (GetRCObject(rc) == rcChecksum && GetRCState(rc) == rcUnequal) {
+#if NCBI
+                (void)PLOGMSG(klogWarn, (klogWarn, "Reference: '$(name)', Length: $(len); checksums do not match", "name=%s,len=%u", refSeq->name, (unsigned)refSeq->length));
+#endif
+            }
+            else if (GetRCObject(rc) == rcSize && GetRCState(rc) == rcUnequal) {
+                (void)PLOGMSG(klogWarn, (klogWarn, "Reference: '$(name)', Length: $(len); lengths do not match", "name=%s,len=%u", refSeq->name, (unsigned)refSeq->length));
+            }
+            else if (GetRCObject(rc) == rcSize && GetRCState(rc) == rcEmpty) {
+                (void)PLOGMSG(klogWarn, (klogWarn, "Reference: '$(name)', Length: $(len); fasta file is empty", "name=%s,len=%u", refSeq->name, (unsigned)refSeq->length));
+            }
+            else if (GetRCObject(rc) == rcId && GetRCState(rc) == rcNotFound) {
+                (void)PLOGMSG(klogWarn, (klogWarn, "Reference: '$(name)', Length: $(len); no match found", "name=%s,len=%u", refSeq->name, (unsigned)refSeq->length));
+            }
+            else {
+                (void)PLOGERR(klogWarn, (klogWarn, rc, "Reference: '$(name)', Length: $(len); error", "name=%s,len=%u", refSeq->name, (unsigned)refSeq->length));
+            }
+        }
+        else if (G.onlyVerifyReferences) {
+            (void)PLOGMSG(klogInfo, (klogInfo, "Reference: '$(name)', Length: $(len); match found", "name=%s,len=%u", refSeq->name, (unsigned)refSeq->length));
+        }
+    }
+    return 0;
+}
+
+static uint8_t GetMapQ(BAM_Alignment const *rec)
+{
+    uint8_t mapQ;
+
+    BAM_AlignmentGetMapQuality(rec, &mapQ);
+    return mapQ;
+}
+
+static bool EditAlignedQualities(uint8_t qual[], bool const hasMismatch[], unsigned readlen)
+{
+    unsigned i;
+    bool changed = false;
+
+    for (i = 0; i < readlen; ++i) {
+        uint8_t const q_0 = qual[i];
+        uint8_t const q_1= hasMismatch[i] ? G.alignedQualValue : q_0;
+        
+        if (q_0 != q_1) {
+            changed = true;
+            break;
+        }
+    }
+    if (!changed)
+        return false;
+    for (i = 0; i < readlen; ++i) {
+        uint8_t const q_0 = qual[i];
+        uint8_t const q_1= hasMismatch[i] ? G.alignedQualValue : q_0;
+
+        qual[i] = q_1;
+    }
+    return true;
+}
+
+static bool EditUnalignedQualities(uint8_t qual[], bool const hasMismatch[], unsigned readlen)
+{
+    unsigned i;
+    bool changed = false;
+
+    for (i = 0; i < readlen; ++i) {
+        uint8_t const q_0 = qual[i];
+        uint8_t const q_1 = (q_0 & 0x7F) | (hasMismatch[i] ? 0x80 : 0);
+        
+        if (q_0 != q_1) {
+            changed = true;
+            break;
+        }
+    }
+    if (!changed)
+        return false;
+    for (i = 0; i < readlen; ++i) {
+        uint8_t const q_0 = qual[i];
+        uint8_t const q_1 = (q_0 & 0x7F) | (hasMismatch[i] ? 0x80 : 0);
+
+        qual[i] = q_1;
+    }
+    return true;
+}
+
+static bool platform_cmp(char const platform[], char const test[])
+{
+    unsigned i;
+
+    for (i = 0; ; ++i) {
+        int ch1 = test[i];
+        int ch2 = toupper(platform[i]);
+
+        if (ch1 != ch2)
+            break;
+        if (ch1 == 0)
+            return true;
+    }
+    return false;
+}
+
+static
+INSDC_SRA_platform_id GetINSDCPlatform(BAM_File const *bam, char const name[]) {
+    if (name) {
+        BAMReadGroup const *rg;
+
+        BAM_FileGetReadGroupByName(bam, name, &rg);
+        if (rg && rg->platform) {
+            switch (toupper(rg->platform[0])) {
+            case 'C':
+                if (platform_cmp(rg->platform, "COMPLETE GENOMICS"))
+                    return SRA_PLATFORM_COMPLETE_GENOMICS;
+                if (platform_cmp(rg->platform, "CAPILLARY"))
+                    return SRA_PLATFORM_CAPILLARY;
+                break;
+            case 'H':
+                if (platform_cmp(rg->platform, "HELICOS"))
+                    return SRA_PLATFORM_HELICOS;
+                break;
+            case 'I':
+                if (platform_cmp(rg->platform, "ILLUMINA"))
+                    return SRA_PLATFORM_ILLUMINA;
+                if (platform_cmp(rg->platform, "IONTORRENT"))
+                    return SRA_PLATFORM_ION_TORRENT;
+                break;
+            case 'L':
+                if (platform_cmp(rg->platform, "LS454"))
+                    return SRA_PLATFORM_454;
+                break;
+            case 'N':
+                if (platform_cmp(name, "NANOPORE"))
+                    return SRA_PLATFORM_OXFORD_NANOPORE;
+                break;
+            case 'O':
+                if (platform_cmp(name, "OXFORD_NANOPORE"))
+                    return SRA_PLATFORM_OXFORD_NANOPORE;
+                break;
+            case 'P':
+                if (platform_cmp(rg->platform, "PACBIO"))
+                    return SRA_PLATFORM_PACBIO_SMRT;
+                break;
+            case 'S':
+                if (platform_cmp(rg->platform, "SOLID"))
+                    return SRA_PLATFORM_ABSOLID;
+                if (platform_cmp(name, "SANGER"))
+                    return SRA_PLATFORM_CAPILLARY;
+                break;
+            default:
+                break;
+            }
+        }
+    }
+    return SRA_PLATFORM_UNDEFINED;
+}
+
+static
+rc_t CheckLimitAndLogError(void)
+{
+    unsigned const count = ++G.errCount;
+
+    if (G.maxErrCount > 0 && count > G.maxErrCount) {
+        (void)PLOGERR(klogErr, (klogErr, SILENT_RC(rcAlign, rcFile, rcReading, rcError, rcExcessive), "Number of errors $(cnt) exceeds limit of $(max): Exiting", "cnt=%u,max=%u", count, G.maxErrCount));
+        return RC(rcAlign, rcFile, rcReading, rcError, rcExcessive);
+    }
+    return 0;
+}
+
+static
+void RecordNoMatch(char const readName[], char const refName[], uint32_t const refPos)
+{
+    if (G.noMatchLog) {
+        static uint64_t lpos = 0;
+        char logbuf[256];
+        size_t len;
+
+        if (string_printf(logbuf, sizeof(logbuf), &len, "%s\t%s\t%u\n", readName, refName, refPos) == 0) {
+            KFileWrite(G.noMatchLog, lpos, logbuf, len, NULL);
+            lpos += len;
+        }
+    }
+}
+
+static LowMatchCounter *lmc = NULL;
+
+static
+rc_t LogNoMatch(char const readName[], char const refName[], unsigned rpos, unsigned matches)
+{
+    rc_t const rc = CheckLimitAndLogError();
+    static unsigned count = 0;
+
+    if (lmc == NULL)
+        lmc = LowMatchCounterMake();
+    assert(lmc != NULL);
+    LowMatchCounterAdd(lmc, refName);
+
+    ++count;
+    if (rc) {
+        (void)PLOGMSG(klogInfo, (klogInfo, "This is the last warning; this class of warning occurred $(occurred) times",
+                                 "occurred=%u", count));
+        (void)PLOGMSG(klogErr, (klogErr, "Spot '$(name)' contains too few ($(count)) matching bases to reference '$(ref)' at $(pos)",
+                                 "name=%s,ref=%s,pos=%u,count=%u", readName, refName, rpos, matches));
+        return rc;
+    }
+    if (G.maxWarnCount_NoMatch == 0 || count < G.maxWarnCount_NoMatch)
+        (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)' contains too few ($(count)) matching bases to reference '$(ref)' at $(pos)",
+                                 "name=%s,ref=%s,pos=%u,count=%u", readName, refName, rpos, matches));
+    return 0;
+}
+
+struct rlmc_context {
+    KMDataNode *node;
+    unsigned node_number;
+    rc_t rc;
+};
+
+static void RecordLowMatchCount(void *Ctx, char const name[], unsigned const count)
+{
+    struct rlmc_context *const ctx = Ctx;
+
+    if (ctx->rc == 0) {
+        KMDataNode *sub = NULL;
+
+        ctx->rc = KMDataNodeOpenNodeUpdate(ctx->node, &sub, "LOW_MATCH_COUNT_%u", ++ctx->node_number);
+        if (ctx->rc == 0) {
+            uint32_t const count_temp = count;
+            ctx->rc = KMDataNodeWriteAttr(sub, "REFNAME", name);
+            if (ctx->rc == 0)
+                ctx->rc = KMDataNodeWriteB32(sub, &count_temp);
+            
+            KMDataNodeRelease(sub);
+        }
+    }
+}
+
+static rc_t RecordLowMatchCounts(KMDataNode *const node)
+{
+    struct rlmc_context ctx;
+
+    assert(lmc != NULL);
+    if (node) {
+        ctx.node = node;
+        ctx.node_number = 0;
+        ctx.rc = 0;
+
+        LowMatchCounterEach(lmc, &ctx, RecordLowMatchCount);
+    }
+    return ctx.rc;
+}
+
+static
+rc_t LogDupConflict(char const readName[])
+{
+    rc_t const rc = CheckLimitAndLogError();
+    static unsigned count = 0;
+
+    ++count;
+    if (rc) {
+        (void)PLOGMSG(klogInfo, (klogInfo, "This is the last warning; this class of warning occurred $(occurred) times",
+                                 "occurred=%u", count));
+        (void)PLOGERR(klogWarn, (klogWarn, SILENT_RC(rcApp, rcFile, rcReading, rcData, rcInconsistent),
+                                 "Spot '$(name)' is both a duplicate and NOT a duplicate!",
+                                 "name=%s", readName));
+    }
+    else if (G.maxWarnCount_DupConflict == 0 || count < G.maxWarnCount_DupConflict)
+        (void)PLOGERR(klogWarn, (klogWarn, SILENT_RC(rcApp, rcFile, rcReading, rcData, rcInconsistent),
+                                 "Spot '$(name)' is both a duplicate and NOT a duplicate!",
+                                 "name=%s", readName));
+    return rc;
+}
+
+static char const *const CHANGED[] = {
+    "FLAG changed",
+    "QUAL changed",
+    "SEQ changed",
+    "record made unaligned",
+    "record made unfragmented",
+    "mate alignment lost",
+    "record discarded",
+    "reference name changed",
+    "CIGAR changed"
+};
+
+#define FLAG_CHANGED (0)
+#define QUAL_CHANGED (1)
+#define SEQ_CHANGED (2)
+#define MAKE_UNALIGNED (3)
+#define MAKE_UNFRAGMENTED (4)
+#define MATE_LOST (5)
+#define DISCARDED (6)
+#define REF_NAME_CHANGED (7)
+#define CIGAR_CHANGED (8)
+
+static char const *const REASONS[] = {
+/* FLAG changed */
+    "0x400 and 0x200 both set",                 /*  0 */
+    "conflicting PCR Dup flags",                /*  1 */
+    "primary alignment already exists",         /*  2 */
+    "was already recorded as unaligned",        /*  3 */
+/* QUAL changed */
+    "original quality used",                    /*  4 */
+    "unaligned colorspace",                     /*  5 */
+    "aligned bases",                            /*  6 */
+    "unaligned bases",                          /*  7 */
+    "reversed",                                 /*  8 */
+/* unaligned */
+    "low MAPQ",                                 /*  9 */
+    "low match count",                          /* 10 */
+    "missing alignment info",                   /* 11 */
+    "missing reference position",               /* 12 */
+    "invalid alignment info",                   /* 13 */
+    "invalid reference position",               /* 14 */
+    "invalid reference",                        /* 15 */
+    "unaligned reference",                      /* 16 */
+    "unknown reference",                        /* 17 */
+    "hard-clipped colorspace",                  /* 18 */
+/* unfragmented */
+    "missing fragment info",                    /* 19 */
+    "too many fragments",                       /* 20 */
+/* mate info lost */
+    "invalid mate reference",                   /* 21 */
+    "missing mate alignment info",              /* 22 */
+    "unknown mate reference",                   /* 23 */
+/* discarded */
+    "conflicting PCR duplicate",                /* 24 */
+    "conflicting fragment info",                /* 25 */
+    "reference is skipped",                     /* 26 */
+/* reference name changed */
+    "reference was named more than once",       /* 27 */
+/* CIGAR changed */
+    "alignment overhanging end of reference",   /* 28 */
+/* discarded */
+    "hard-clipped secondary alignment",         /* 29 */
+    "low-matching secondary alignment",         /* 30 */
+};
+
+static struct {
+    unsigned what, why;
+} const CHANGES[] = {
+    {FLAG_CHANGED,  0},
+    {FLAG_CHANGED,  1},
+    {FLAG_CHANGED,  2},
+    {FLAG_CHANGED,  3},
+    {QUAL_CHANGED,  4},
+    {QUAL_CHANGED,  5},
+    {QUAL_CHANGED,  6},
+    {QUAL_CHANGED,  7},
+    {QUAL_CHANGED,  8},
+    {SEQ_CHANGED,  8},
+    {MAKE_UNALIGNED,  9},
+    {MAKE_UNALIGNED, 10},
+    {MAKE_UNALIGNED, 11},
+    {MAKE_UNALIGNED, 12},
+    {MAKE_UNALIGNED, 13},
+    {MAKE_UNALIGNED, 14},
+    {MAKE_UNALIGNED, 15},
+    {MAKE_UNALIGNED, 16},
+    {MAKE_UNALIGNED, 17},
+    {MAKE_UNALIGNED, 18},
+    {MAKE_UNFRAGMENTED, 19},
+    {MAKE_UNFRAGMENTED, 20},
+    {MATE_LOST, 21},
+    {MATE_LOST, 22},
+    {MATE_LOST, 23},
+    {DISCARDED, 24},
+    {DISCARDED, 25},
+    {DISCARDED, 26},
+    {DISCARDED, 17},
+    {REF_NAME_CHANGED, 27},
+    {CIGAR_CHANGED, 28},
+    {DISCARDED, 29},
+    {DISCARDED, 30},
+};
+
+#define NUMBER_OF_CHANGES ((unsigned)(sizeof(CHANGES)/sizeof(CHANGES[0])))
+static unsigned change_counter[NUMBER_OF_CHANGES];
+
+static void LOG_CHANGE(unsigned const change)
+{
+    ++change_counter[change];
+}
+
+static void PrintChangeReport(void)
+{
+    unsigned i;
+
+    for (i = 0; i != NUMBER_OF_CHANGES; ++i) {
+        if (change_counter[i] > 0) {
+            char const *const what = CHANGED[CHANGES[i].what];
+            char const *const why  = REASONS[CHANGES[i].why];
+
+            PLOGMSG(klogInfo, (klogInfo, "$(what) $(times) times because $(reason)", "what=%s,reason=%s,times=%u", what, why, change_counter[i]));
+        }
+    }
+}
+
+static rc_t RecordChange(KMDataNode *const node,
+                         char const node_name[],
+                         unsigned const node_number,
+                         char const what[],
+                         char const why[],
+                         unsigned const count)
+{
+    KMDataNode *sub = NULL;
+    rc_t const rc_sub = KMDataNodeOpenNodeUpdate(node, &sub, "%s_%u", node_name, node_number);
+
+    if (rc_sub) return rc_sub;
+    {
+        uint32_t const count_temp = count;
+        rc_t const rc_attr1 = KMDataNodeWriteAttr(sub, "change", what);
+        rc_t const rc_attr2 = KMDataNodeWriteAttr(sub, "reason", why);
+        rc_t const rc_value = KMDataNodeWriteB32(sub, &count_temp);
+        
+        KMDataNodeRelease(sub);
+        if (rc_attr1) return rc_attr1;
+        if (rc_attr2) return rc_attr2;
+        if (rc_value) return rc_value;
+        
+        return 0;
+    }
+}
+
+static rc_t RecordChanges(KMDataNode *const node, char const name[])
+{
+    if (node) {
+        unsigned i;
+        unsigned j = 0;
+
+        for (i = 0; i != NUMBER_OF_CHANGES; ++i) {
+            if (change_counter[i] > 0) {
+                char const *const what = CHANGED[CHANGES[i].what];
+                char const *const why  = REASONS[CHANGES[i].why];
+                rc_t const rc = RecordChange(node, name, ++j, what, why, change_counter[i]);
+
+                if (rc) return rc;
+            }
+        }
+    }
+    return 0;
+}
+
+#define FLAG_CHANGED_400_AND_200   do { LOG_CHANGE( 0); } while(0)
+#define FLAG_CHANGED_PCR_DUP       do { LOG_CHANGE( 1); } while(0)
+#define FLAG_CHANGED_PRIMARY_DUP   do { LOG_CHANGE( 2); } while(0)
+#define FLAG_CHANGED_WAS_UNALIGNED do { LOG_CHANGE( 3); } while(0)
+#define QUAL_CHANGED_OQ            do { LOG_CHANGE( 4); } while(0)
+#define QUAL_CHANGED_UNALIGNED_CS  do { LOG_CHANGE( 5); } while(0)
+#define QUAL_CHANGED_ALIGNED_EDIT  do { LOG_CHANGE( 6); } while(0)
+#define QUAL_CHANGED_UNALIGN_EDIT  do { LOG_CHANGE( 7); } while(0)
+#define QUAL_CHANGED_REVERSED      do { LOG_CHANGE( 8); } while(0)
+#define SEQ__CHANGED_REV_COMP      do { LOG_CHANGE( 9); } while(0)
+#define UNALIGNED_LOW_MAPQ         do { LOG_CHANGE(10); } while(0)
+#define UNALIGNED_LOW_MATCH_COUNT  do { LOG_CHANGE(11); } while(0)
+#define UNALIGNED_MISSING_INFO     do { LOG_CHANGE(12); } while(0)
+#define UNALIGNED_MISSING_REF_POS  do { LOG_CHANGE(13); } while(0)
+#define UNALIGNED_INVALID_INFO     do { LOG_CHANGE(14); } while(0)
+#define UNALIGNED_INVALID_REF_POS  do { LOG_CHANGE(15); } while(0)
+#define UNALIGNED_INVALID_REF      do { LOG_CHANGE(16); } while(0)
+#define UNALIGNED_UNALIGNED_REF    do { LOG_CHANGE(17); } while(0)
+#define UNALIGNED_UNKNOWN_REF      do { LOG_CHANGE(18); } while(0)
+#define UNALIGNED_HARD_CLIPPED_CS  do { LOG_CHANGE(19); } while(0)
+#define UNFRAGMENT_MISSING_INFO    do { LOG_CHANGE(20); } while(0)
+#define UNFRAGMENT_TOO_MANY        do { LOG_CHANGE(21); } while(0)
+#define MATE_INFO_LOST_INVALID     do { LOG_CHANGE(22); } while(0)
+#define MATE_INFO_LOST_MISSING     do { LOG_CHANGE(23); } while(0)
+#define MATE_INFO_LOST_UNKNOWN_REF do { LOG_CHANGE(24); } while(0)
+#define DISCARD_PCR_DUP            do { LOG_CHANGE(25); } while(0)
+#define DISCARD_BAD_FRAGMENT_INFO  do { LOG_CHANGE(26); } while(0)
+#define DISCARD_SKIP_REFERENCE     do { LOG_CHANGE(27); } while(0)
+#define DISCARD_UNKNOWN_REFERENCE  do { LOG_CHANGE(28); } while(0)
+#define RENAMED_REFERENCE          do { LOG_CHANGE(29); } while(0)
+#define OVERHANGING_ALIGNMENT      do { LOG_CHANGE(30); } while(0)
+#define DISCARD_HARDCLIP_SECONDARY do { LOG_CHANGE(31); } while(0)
+#define DISCARD_BAD_SECONDARY      do { LOG_CHANGE(32); } while(0)
+
+static bool isHardClipped(unsigned const ops, uint32_t const cigar[/* ops */])
+{
+    unsigned i;
+
+    for (i = 0; i < ops; ++i) {
+        uint32_t const op = cigar[i];
+        int const code = op & 0x0F;
+
+        if (code == 5)
+            return true;
+    }
+    return false;
+}
+
+static rc_t FixOverhangingAlignment(KDataBuffer *cigBuf, uint32_t *opCount, uint32_t refPos, uint32_t refLen, uint32_t readlen)
+{
+    uint32_t const *cigar = cigBuf->base;
+    int refend = refPos;
+    int seqpos = 0;
+    unsigned i;
+
+    for (i = 0; i < *opCount; ++i) {
+        uint32_t const op = cigar[i];
+        int const len = op >> 4;
+        int const code = op & 0x0F;
+
+        switch (code) {
+        case 0: /* M */
+        case 7: /* = */
+        case 8: /* X */
+            seqpos += len;
+            refend += len;
+            break;
+        case 2: /* D */
+        case 3: /* N */
+            refend += len;
+            break;
+        case 1: /* I */
+        case 4: /* S */
+        case 9: /* B */
+            seqpos += len;
+        default:
+            break;
+        }
+        if (refend > refLen) {
+            int const chop = refend - refLen;
+            int const newlen = len - chop;
+            int const left = seqpos - chop;
+            if (left * 2 > readlen) {
+                int const clip = readlen - left;
+                rc_t rc;
+
+                *opCount = i + 2;
+                rc = KDataBufferResize(cigBuf, *opCount);
+                if (rc) return rc;
+                ((uint32_t *)cigBuf->base)[i  ] = (newlen << 4) | code;
+                ((uint32_t *)cigBuf->base)[i+1] = (clip << 4) | 4;
+                OVERHANGING_ALIGNMENT;
+                break;
+            }
+        }
+    }
+    return 0;
+}
+
+static context_t GlobalContext;
+
+#if THREADING_BAMREAD
+
+timeout_t bamq_tm;
+KQueue *bamq;
+static rc_t run_bamread_thread(const KThread *self, void *const file)
+{
+    rc_t rc = 0;
+    size_t NR = 0;
+
+    while (rc == 0) {
+        BAM_Alignment const *crec = NULL;
+        BAM_Alignment *rec = NULL;
+
+        ++NR;
+        rc = BAM_FileRead2(file, &crec);
+        if ((int)GetRCObject(rc) == rcRow && (int)GetRCState(rc) == rcEmpty) {
+            rc = CheckLimitAndLogError();
+            continue;
+        }
+        if ((int)GetRCObject(rc) == rcRow && (int)GetRCState(rc) == rcNotFound) {
+            /* EOF */
+            rc = 0;
+            break;
+        }
+        if (rc) break;
+        rc = BAM_AlignmentCopy(crec, &rec);
+        BAM_AlignmentRelease(crec);
+        if (rc) break;
+
+#if THREADING_BAMREAD_PRIME_NAME2KEY
+        {
+            static char const dummy[] = "";
+            char const *spotGroup;
+            char const *name;
+            size_t namelen;
+
+            BAM_AlignmentGetReadName2(rec, &name, &namelen);
+            BAM_AlignmentGetReadGroupName(rec, &spotGroup);
+            rc = GetKeyID(&GlobalContext.keyToID, &rec->keyId, &rec->wasInserted, spotGroup ? spotGroup : dummy, name, namelen);
+            if (rc) break;
+        }
+#endif
+        for ( ; ; ) {
+            rc = KQueuePush(bamq, rec, &bamq_tm);
+            if (rc == 0 || (int)GetRCObject(rc) != rcTimeout)
+                break;
+        }
+    }
+    KQueueSeal(bamq);
+    if (rc) {
+        (void)LOGERR(klogErr, rc, "bamread_thread done");
+    }
+    else {
+        (void)PLOGMSG(klogInfo, (klogInfo, "bamread_thread done; read $(NR) records", "NR=%lu", NR));
+    }
+    return rc;
+}
+#endif
+
+
+
+static rc_t ProcessBAM(char const bamFile[], context_t *ctx, VDatabase *db,
+                       Reference *ref, Sequence *seq, Alignment *align,
+                       bool *had_alignments, bool *had_sequences)
+{
+    const BAM_File *bam;
+    const BAM_Alignment *rec;
+    KDataBuffer buf;
+    KDataBuffer fragBuf;
+    KDataBuffer cigBuf;
+    rc_t rc;
+    int32_t lastRefSeqId = -1;
+    bool wasRenamed = false;
+    size_t rsize;
+    uint64_t keyId = 0;
+    uint64_t reccount = 0;
+    char spotGroup[512];
+    size_t namelen;
+    float progress = 0.0;
+    unsigned warned = 0;
+    long     fcountBoth=0;
+    long     fcountOne=0;
+    int skipRefSeqID = -1;
+    int unmapRefSeqId = -1;
+    uint64_t recordsRead = 0;
+    uint64_t recordsProcessed = 0;
+    uint64_t filterFlagConflictRecords=0; /*** counts number of conflicts between flags 0x400 and 0x200 ***/
+#define MAX_WARNINGS_FLAG_CONFLICT 10000 /*** maximum errors to report ***/
+
+    bool isColorSpace = false;
+    bool isNotColorSpace = G.noColorSpace;
+    char alignGroup[32];
+    size_t alignGroupLen;
+    AlignmentRecord data;
+#if THREADING_BAMREAD
+	KThread *bamread_thread=NULL;
+#endif
+    KDataBuffer seqBuffer;
+    KDataBuffer qualBuffer;
+    SequenceRecord srec;
+    SequenceRecordStorage srecStorage;
+
+    memset(&data, 0, sizeof(data));
+    memset(&srec, 0, sizeof(srec));
+
+    srec.ti             = srecStorage.ti;
+    srec.readStart      = srecStorage.readStart;
+    srec.readLen        = srecStorage.readLen;
+    srec.orientation    = srecStorage.orientation;
+    srec.is_bad         = srecStorage.is_bad;
+    srec.alignmentCount = srecStorage.alignmentCount;
+    srec.aligned        = srecStorage.aligned;
+    srec.cskey          = srecStorage. cskey;
+
+    rc = OpenBAM(&bam, db, bamFile);
+    if (rc) return rc;
+    if (!G.noVerifyReferences && ref != NULL) {
+        rc = VerifyReferences(bam, ref);
+        if (G.onlyVerifyReferences) {
+            BAM_FileRelease(bam);
+            return rc;
+        }
+    }
+    if (ctx->keyToID.key2id_max == 0) {
+        uint32_t rgcount;
+        unsigned rgi;
+        
+        BAM_FileGetReadGroupCount(bam, &rgcount);
+        if (rgcount > (sizeof(ctx->keyToID.key2id)/sizeof(ctx->keyToID.key2id[0]) - 1))
+            ctx->keyToID.key2id_max = 1;
+        else
+            ctx->keyToID.key2id_max = sizeof(ctx->keyToID.key2id)/sizeof(ctx->keyToID.key2id[0]);
+
+        for (rgi = 0; rgi != rgcount; ++rgi) {
+            BAMReadGroup const *rg;
+
+            BAM_FileGetReadGroup(bam, rgi, &rg);
+            if (rg && rg->platform && platform_cmp(rg->platform, "CAPILLARY")) {
+                G.hasTI = true;
+                break;
+            }
+        }
+    }
+
+    rc = KDataBufferMake(&cigBuf, 32, 0);
+    if (rc)
+        return rc;
+
+    rc = KDataBufferMake(&fragBuf, 8, 1024);
+    if (rc)
+        return rc;
+
+    rc = KDataBufferMake(&buf, 16, 0);
+    if (rc)
+        return rc;
+
+    rc = KDataBufferMake(&seqBuffer, 8, 4096);
+    if (rc)
+        return rc;
+
+    rc = KDataBufferMake(&qualBuffer, 8, 4096);
+    if (rc)
+        return rc;
+
+    if (rc == 0) {
+        (void)PLOGMSG(klogInfo, (klogInfo, "Loading '$(file)'", "file=%s", bamFile));
+    }
+
+#if THREADING_BAMREAD
+	TimeoutInit(&bamq_tm,10000);
+	rc = KQueueMake (&bamq,4096);
+	if(rc) return rc;
+	rc = KThreadMake(&bamread_thread, run_bamread_thread, (void*)bam);
+	if(rc) return rc;
+#endif
+
+    while (rc == 0 && (rc = Quitting()) == 0) {
+        bool aligned;
+        uint32_t readlen;
+        uint16_t flags;
+        int64_t rpos=0;
+        char *seqDNA;
+        const BAMRefSeq *refSeq;
+        ctx_value_t *value;
+        bool wasInserted;
+        int32_t refSeqId=-1;
+        uint8_t *qual;
+        bool mated;
+        const char *name;
+        char cskey = 0;
+        bool originally_aligned;
+        bool isPrimary;
+        uint32_t opCount;
+        bool hasCG = false;
+        uint64_t ti = 0;
+        uint32_t csSeqLen = 0;
+        int lpad = 0;
+        int rpad = 0;
+        bool hardclipped = false;
+        bool revcmp = false;
+        char const *BX = NULL;
+
+#if THREADING_BAMREAD
+        for ( ; ; ) {
+            rc = KQueuePop(bamq, (void **)&rec, &bamq_tm);
+            if (rc == 0) break;
+            if ((int)GetRCObject(rc) == rcTimeout)
+                rc = 0;
+            else {
+                rc_t rc2 = 0;
+                if ((int)GetRCObject(rc) == rcData && (int)GetRCState(rc) == rcDone)
+                    (void)LOGMSG(klogDebug, "KQueuePop Done");
+                else
+                    (void)PLOGERR(klogWarn, (klogWarn, rc, "KQueuePop Error", NULL));
+                KThreadWait(bamread_thread, &rc2);
+                if (rc2 != 0)
+                    rc = rc2;
+                KThreadRelease(bamread_thread);
+                bamread_thread = NULL;
+                break;
+            }
+        }
+#else
+        rc = BAM_FileRead2(bam, &rec);
+#endif
+
+        if (rc) {
+            if (   (GetRCModule(rc) == rcCont && (int)GetRCObject(rc) == rcData && GetRCState(rc) == rcDone)
+                || (GetRCModule(rc) == rcAlign && GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound))
+            {
+                (void)PLOGMSG(klogInfo, (klogInfo, "EOF '$(file)'; processed $(proc)", "file=%s,read=%lu,proc=%lu", bamFile, (unsigned long)recordsRead, (unsigned long)recordsProcessed));
+                rc = 0;
+            }
+            else if (GetRCModule(rc) == rcAlign && GetRCObject(rc) == rcRow && GetRCState(rc) == rcEmpty) {
+                ++recordsRead;
+                (void)PLOGERR(klogWarn, (klogWarn, rc, "File '$(file)'; record $(recno)", "file=%s,recno=%lu", bamFile, recordsRead));
+                rc = CheckLimitAndLogError();
+                goto LOOP_END;
+            }
+            else {
+                (void)PLOGERR(klogInfo, (klogInfo, rc, "Error '$(file)'; read $(read); processed $(proc)", "file=%s,read=%lu,proc=%lu", bamFile, (unsigned long)recordsRead, (unsigned long)recordsProcessed));
+            }
+            break;
+        }
+        ++recordsRead;
+        
+        BAM_AlignmentGetReadName2(rec, &name, &namelen);
+#if THREADING_BAMREAD_PRIME_NAME2KEY
+		keyId = rec->keyId;
+		wasInserted = rec->wasInserted;
+#else
+		rc = GetKeyID(&ctx->keyToID, &keyId, &wasInserted, spotGroup, name, namelen);
+        if (rc) {
+            (void)PLOGERR(klogErr, (klogErr, rc, "KBTreeEntry: failed on key '$(key)'", "key=%.*s", namelen, name));
+            goto LOOP_END;
+        }
+#endif
+        {
+            float const new_value = BAM_FileGetProportionalPosition(bam) * 100.0;
+            float const delta = new_value - progress;
+            if (delta > 1.0) {
+                KLoadProgressbar_Process(ctx->progress[0], delta, false);
+                progress = new_value;
+            }
+        }
+
+        BAM_AlignmentGetLinkageGroup(rec, &BX);
+
+        if (!G.noColorSpace) {
+            if (BAM_AlignmentHasColorSpace(rec)) {
+                if (isNotColorSpace) {
+MIXED_BASE_AND_COLOR:
+                    rc = RC(rcApp, rcFile, rcReading, rcData, rcInconsistent);
+                    (void)PLOGERR(klogErr, (klogErr, rc, "File '$(file)' contains base space and color space", "file=%s", bamFile));
+                    goto LOOP_END;
+                }
+                /* COLORSPACE is disabled!
+                 * ctx->isColorSpace = isColorSpace = true; */
+            }
+            else if (isColorSpace)
+                goto MIXED_BASE_AND_COLOR;
+            else
+                isNotColorSpace = true;
+        }
+        BAM_AlignmentGetFlags(rec, &flags);
+        isPrimary = (flags & (BAMFlags_IsNotPrimary|BAMFlags_IsSupplemental)) == 0 ? true : false;
+        if (!isPrimary && G.noSecondary)
+            goto LOOP_END;
+
+        {
+            char const *rgname;
+
+            BAM_AlignmentGetReadGroupName(rec, &rgname);
+            if (rgname)
+                strcpy(spotGroup, rgname);
+            else
+                spotGroup[0] = '\0';
+        }
+
+        rc = BAM_AlignmentCGReadLength(rec, &readlen);
+        if (rc != 0 && GetRCState(rc) != rcNotFound) {
+            (void)LOGERR(klogErr, rc, "Invalid CG data");
+            goto LOOP_END;
+        }
+        if (rc == 0) {
+            hasCG = true;
+            BAM_AlignmentGetCigarCount(rec, &opCount);
+            rc = KDataBufferResize(&cigBuf, opCount * 2 + 5);
+            if (rc) {
+                (void)LOGERR(klogErr, rc, "Failed to resize CIGAR buffer");
+                goto LOOP_END;
+            }
+        }
+        else {
+            uint32_t const *tmp;
+
+            BAM_AlignmentGetRawCigar(rec, &tmp, &opCount);
+            rc = KDataBufferResize(&cigBuf, opCount);
+            if (rc) {
+                (void)LOGERR(klogErr, rc, "Failed to resize CIGAR buffer");
+                goto LOOP_END;
+            }
+            memcpy(cigBuf.base, tmp, opCount * sizeof(uint32_t));
+            {
+                hardclipped = isHardClipped(opCount, cigBuf.base);
+                if (hardclipped) {
+                    if (isPrimary) {
+                        if (!G.acceptHardClip) {
+                            rc = RC(rcApp, rcFile, rcReading, rcConstraint, rcViolated);
+                            (void)PLOGERR(klogErr, (klogErr, rc, "File '$(file)' contains hard clipped primary alignments", "file=%s", bamFile));
+                            goto LOOP_END;
+                        }
+                    }
+                    else if (!G.acceptHardClip) { /* convert to soft clip */
+                        uint32_t *const cigar = cigBuf.base;
+                        uint32_t const lOp = cigar[0];
+                        uint32_t const rOp = cigar[opCount - 1];
+
+                        lpad = (lOp & 0xF) == 5 ? (lOp >> 4) : 0;
+                        rpad = (rOp & 0xF) == 5 ? (rOp >> 4) : 0;
+
+                        if (lpad + rpad == 0) {
+                            rc = RC(rcApp, rcFile, rcReading, rcData, rcInvalid);
+                            (void)PLOGERR(klogErr, (klogErr, rc, "File '$(file)' contains invalid CIGAR", "file=%s", bamFile));
+                            goto LOOP_END;
+                        }
+                        if (lpad != 0) {
+                            uint32_t const new_lOp = (((uint32_t)lpad) << 4) | 4;
+                            cigar[0] = new_lOp;
+                        }
+                        if (rpad != 0) {
+                            uint32_t const new_rOp = (((uint32_t)rpad) << 4) | 4;
+                            cigar[opCount - 1] = new_rOp;
+                        }
+                    }
+                }
+            }
+		    if(G.deferSecondary && !isPrimary ){	/*** try to see if hard-clipped secondary alignment can be salvaged **/
+				ctx_value_t *tmp_value; 
+				rc_t rc2=MMArrayGetRead(ctx->id2value, (void **)&tmp_value, keyId);
+				if(rc2==0){
+					int i=((flags&BAMFlags_WasPaired) && (flags&BAMFlags_IsSecond))?0:1;
+					BAM_AlignmentGetReadLength(rec, &readlen);
+					if(readlen + lpad + rpad < tmp_value->fragment_len[i]){
+						opCount++;
+						rc = KDataBufferResize(&cigBuf, opCount);
+						if (rc) {
+							(void)LOGERR(klogErr, rc, "Failed to resize CIGAR buffer");
+							goto LOOP_END;
+						}
+						if(rpad > 0 && lpad==0){
+							uint32_t * cigar = cigBuf.base;
+							lpad =  tmp_value->fragment_len[i] - readlen - rpad;
+							memmove(cigar+1,cigar,(opCount-1)*sizeof(*cigar));
+							cigar[0] =  (((uint32_t)lpad) << 4) | 4;
+						} else {
+							uint32_t *const cigar = cigBuf.base;
+							rpad += tmp_value->fragment_len[i] - readlen - lpad;
+							cigar[opCount - 1] =  (((uint32_t)rpad) << 4) | 4;
+						}
+					}
+				}
+			}
+        }
+        if (hasCG) {
+            rc = AlignmentRecordInit(&data, readlen);
+            if (rc == 0)
+                rc = KDataBufferResize(&buf, readlen);
+            if (rc) {
+                (void)LOGERR(klogErr, rc, "Failed to resize record buffer");
+                goto LOOP_END;
+            }
+
+            seqDNA = buf.base;
+            qual = (uint8_t *)&seqDNA[readlen];
+
+            rc = BAM_AlignmentGetCGSeqQual(rec, seqDNA, qual);
+            if (rc == 0) {
+                rc = BAM_AlignmentGetCGCigar(rec, cigBuf.base, cigBuf.elem_count, &opCount);
+            }
+            if (rc) {
+                (void)LOGERR(klogErr, rc, "Failed to read CG data");
+                goto LOOP_END;
+            }
+            data.data.align_group.elements = 0;
+            data.data.align_group.buffer = alignGroup;
+            if (BAM_AlignmentGetCGAlignGroup(rec, alignGroup, sizeof(alignGroup), &alignGroupLen) == 0)
+                data.data.align_group.elements = alignGroupLen;
+        }
+        else {
+            BAM_AlignmentGetReadLength(rec, &readlen);
+            rc = AlignmentRecordInit(&data, readlen + lpad + rpad);
+            if (rc == 0)
+                rc = KDataBufferResize(&buf, readlen + lpad + rpad);
+            if (rc) {
+                (void)LOGERR(klogErr, rc, "Failed to resize record buffer");
+                goto LOOP_END;
+            }
+
+            seqDNA = buf.base;
+            qual = (uint8_t *)&seqDNA[(readlen | csSeqLen) + lpad + rpad];
+            memset(seqDNA, 'N', (readlen | csSeqLen) + lpad + rpad);
+            memset(qual, 0, (readlen | csSeqLen) + lpad + rpad);
+
+            BAM_AlignmentGetSequence(rec, seqDNA + lpad);
+            if (G.useQUAL) {
+                uint8_t const *squal;
+
+                BAM_AlignmentGetQuality(rec, &squal);
+                memcpy(qual + lpad, squal, readlen);
+            }
+            else {
+                uint8_t const *squal;
+                uint8_t qoffset = 0;
+                unsigned i;
+
+                rc = BAM_AlignmentGetQuality2(rec, &squal, &qoffset);
+                if (rc) {
+                    (void)PLOGERR(klogErr, (klogErr, rc, "Spot '$(name)': length of original quality does not match sequence", "name=%s", name));
+                    goto LOOP_END;
+                }
+                if (qoffset) {
+                    for (i = 0; i != readlen; ++i)
+                        qual[i + lpad] = squal[i] - qoffset;
+                    QUAL_CHANGED_OQ;
+                }
+                else
+                    memcpy(qual + lpad, squal, readlen);
+            }
+            readlen = readlen + lpad + rpad;
+            data.data.align_group.elements = 0;
+            data.data.align_group.buffer = alignGroup;
+        }
+        if (G.hasTI) {
+            rc = BAM_AlignmentGetTI(rec, &ti);
+            if (rc)
+                ti = 0;
+            rc = 0;
+        }
+
+        rc = KDataBufferResize(&seqBuffer, readlen);
+        if (rc) {
+            (void)LOGERR(klogErr, rc, "Failed to resize record buffer");
+            goto LOOP_END;
+        }
+        rc = KDataBufferResize(&qualBuffer, readlen);
+        if (rc) {
+            (void)LOGERR(klogErr, rc, "Failed to resize record buffer");
+            goto LOOP_END;
+        }
+        AR_REF_ORIENT(data) = (flags & BAMFlags_SelfIsReverse) == 0 ? false : true;
+        originally_aligned = (flags & BAMFlags_SelfIsUnmapped) == 0;
+        aligned = originally_aligned;
+
+        rpos = -1;
+        if (aligned) {
+            BAM_AlignmentGetPosition(rec, &rpos);
+            BAM_AlignmentGetRefSeqId(rec, &refSeqId);
+            if (refSeqId != lastRefSeqId) {
+                refSeq = NULL;
+                BAM_FileGetRefSeqById(bam, refSeqId, &refSeq);
+            }
+        }
+
+        revcmp = (isColorSpace && !aligned) ? false : AR_REF_ORIENT(data);
+        (void)PLOGMSG(klogDebug, (klogDebug, "Read '$(name)' is $(or) at $(ref):$(pos)", "name=%s,or=%s,ref=%s,pos=%i", name, revcmp ? "reverse" : "forward", refSeq ? refSeq->name : "(none)", rpos));
+        COPY_READ(seqBuffer.base, seqDNA, readlen, revcmp);
+        COPY_QUAL(qualBuffer.base, qual, readlen, revcmp);
+
+        AR_MAPQ(data) = GetMapQ(rec);
+        if (!isPrimary && AR_MAPQ(data) < G.minMapQual)
+            goto LOOP_END;
+
+        if (aligned && align == NULL) {
+            rc = RC(rcApp, rcFile, rcReading, rcData, rcInconsistent);
+            (void)PLOGERR(klogErr, (klogErr, rc, "File '$(file)' contains aligned records", "file=%s", bamFile));
+            goto LOOP_END;
+        }
+        while (aligned) {
+            if (rpos >= 0 && refSeqId >= 0) {
+                if (refSeqId == skipRefSeqID) {
+                    DISCARD_SKIP_REFERENCE;
+                    goto LOOP_END;
+                }
+                if (refSeqId == unmapRefSeqId) {
+                    aligned = false;
+                    UNALIGNED_UNALIGNED_REF;
+                    break;
+                }
+                unmapRefSeqId = -1;
+                if (refSeq == NULL) {
+                    rc = SILENT_RC(rcApp, rcFile, rcReading, rcData, rcInconsistent);
+                    (void)PLOGERR(klogWarn, (klogWarn, rc, "File '$(file)': Spot '$(name)' refers to an unknown Reference number $(refSeqId)", "file=%s,refSeqId=%i,name=%s", bamFile, (int)refSeqId, name));
+                    rc = CheckLimitAndLogError();
+                    DISCARD_UNKNOWN_REFERENCE;
+                    goto LOOP_END;
+                }
+                else {
+                    bool shouldUnmap = false;
+
+                    if (G.refFilter && strcmp(G.refFilter, refSeq->name) != 0) {
+                        (void)PLOGMSG(klogInfo, (klogInfo, "Skipping Reference '$(name)'", "name=%s", refSeq->name));
+                        skipRefSeqID = refSeqId;
+                        DISCARD_SKIP_REFERENCE;
+                        goto LOOP_END;
+                    }
+
+                    rc = ReferenceSetFile(ref, refSeq->name, refSeq->length, refSeq->checksum, &shouldUnmap, &wasRenamed);
+                    if (rc == 0) {
+                        lastRefSeqId = refSeqId;
+                        if (shouldUnmap) {
+                            aligned = false;
+                            unmapRefSeqId = refSeqId;
+                            UNALIGNED_UNALIGNED_REF;
+                        }
+                        break;
+                    }
+                    if (GetRCObject(rc) == rcConstraint && GetRCState(rc) == rcViolated) {
+                        int const level = G.limit2config ? klogWarn : klogErr;
+
+                        (void)PLOGMSG(level, (level, "Could not find a Reference to match { name: '$(name)', length: $(rlen) }", "name=%s,rlen=%u", refSeq->name, (unsigned)refSeq->length));
+                    }
+                    else if (!G.limit2config)
+                        (void)PLOGERR(klogErr, (klogErr, rc, "File '$(file)': Spot '$(sname)' refers to an unknown Reference '$(rname)'", "file=%s,rname=%s,sname=%s", bamFile, refSeq->name, name));
+                    if (G.limit2config) {
+                        rc = 0;
+                        UNALIGNED_UNKNOWN_REF;
+                    }
+                    goto LOOP_END;
+                }
+            }
+            else if (refSeqId < 0) {
+                (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)' was marked aligned, but reference id = $(id) is invalid", "name=%.*s,id=%i", namelen, name, refSeqId));
+                if ((rc = CheckLimitAndLogError()) != 0) goto LOOP_END;
+                UNALIGNED_INVALID_REF;
+            }
+            else {
+                (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)' was marked aligned, but reference position = $(pos) is invalid", "name=%.*s,pos=%i", namelen, name, rpos));
+                if ((rc = CheckLimitAndLogError()) != 0) goto LOOP_END;
+                UNALIGNED_INVALID_REF_POS;
+            }
+
+            aligned = false;
+        }
+        if (!aligned && (G.refFilter != NULL || G.limit2config)) {
+            assert(!"this shouldn't happen");
+            goto LOOP_END;
+        }
+
+        AR_KEY(data) = keyId;
+
+        rc = MMArrayGet(ctx->id2value, (void **)&value, keyId);
+        if (rc) {
+            (void)PLOGERR(klogErr, (klogErr, rc, "MMArrayGet: failed on id '$(id)'", "id=%u", keyId));
+            goto LOOP_END;
+        }
+
+
+        mated = false;
+        if (flags & BAMFlags_WasPaired) {
+            if ((flags & BAMFlags_IsFirst) != 0)
+                AR_READNO(data) |= 1;
+            if ((flags & BAMFlags_IsSecond) != 0)
+                AR_READNO(data) |= 2;
+            switch (AR_READNO(data)) {
+            case 1:
+            case 2:
+                mated = true;
+                break;
+            case 0:
+                if ((warned & 1) == 0) {
+                    (void)LOGMSG(klogWarn, "Spots without fragment info have been encountered");
+                    warned |= 1;
+                }
+                UNFRAGMENT_MISSING_INFO;
+                break;
+            case 3:
+                if ((warned & 2) == 0) {
+                    (void)LOGMSG(klogWarn, "Spots with more than two fragments have been encountered");
+                    warned |= 2;
+                }
+                UNFRAGMENT_TOO_MANY;
+                break;
+            }
+        }
+        if (!mated)
+            AR_READNO(data) = 1;
+
+        if (wasInserted) {
+            if (G.mode == mode_Remap) {
+                (void)PLOGERR(klogErr, (klogErr, rc = RC(rcApp, rcFile, rcReading, rcData, rcInconsistent),
+                                         "Spot '$(name)' is a new spot, not a remapping",
+                                         "name=%s", name));
+                goto LOOP_END;
+            }
+            memset(value, 0, sizeof(*value));
+            value->unmated = !mated;
+            if (isPrimary || G.assembleWithSecondary || G.deferSecondary) {
+                value->pcr_dup = (flags & BAMFlags_IsDuplicate) == 0 ? 0 : 1;
+                value->platform = GetINSDCPlatform(bam, spotGroup);
+                value->primary_is_set = 1;
+            }
+        }
+        else if (isPrimary || G.assembleWithSecondary || G.deferSecondary) {
+            int o_pcr_dup = value->pcr_dup;
+            int const n_pcr_dup = (flags & BAMFlags_IsDuplicate) == 0 ? 0 : 1;
+
+            if (!value->primary_is_set) {
+                o_pcr_dup = n_pcr_dup;
+                value->primary_is_set = 1;
+            }
+
+            value->pcr_dup = o_pcr_dup & n_pcr_dup;
+            if (o_pcr_dup != (o_pcr_dup & n_pcr_dup)) {
+                FLAG_CHANGED_PCR_DUP;
+            }
+            if (mated && value->unmated) {
+                (void)PLOGERR(klogWarn, (klogWarn, SILENT_RC(rcApp, rcFile, rcReading, rcData, rcInconsistent),
+                                         "Spot '$(name)', which was first seen without mate info, now has mate info",
+                                         "name=%s", name));
+                rc = CheckLimitAndLogError();
+                DISCARD_BAD_FRAGMENT_INFO;
+                goto LOOP_END;
+            }
+            else if (!mated && !value->unmated) {
+                (void)PLOGERR(klogWarn, (klogWarn, SILENT_RC(rcApp, rcFile, rcReading, rcData, rcInconsistent),
+                                         "Spot '$(name)', which was first seen with mate info, now has no mate info",
+                                         "name=%s", name));
+                rc = CheckLimitAndLogError();
+                DISCARD_BAD_FRAGMENT_INFO;
+                goto LOOP_END;
+            }
+        }
+        if (isPrimary) {
+            switch (AR_READNO(data)) {
+            case 1:
+                if (CTX_VALUE_GET_P_ID(*value, 0) != 0) {
+                    isPrimary = false;
+                    FLAG_CHANGED_PRIMARY_DUP;
+                }
+                else if (aligned && value->unaligned_1) {
+                    (void)PLOGMSG(klogWarn, (klogWarn, "Read 1 of spot '$(name)', which was unmapped, is now being mapped at position $(pos) on reference '$(ref)'; this alignment will be considered as secondary", "name=%s,ref=%s,pos=%u", name, refSeq->name, rpos));
+                    isPrimary = false;
+                    FLAG_CHANGED_WAS_UNALIGNED;
+                }
+                break;
+            case 2:
+                if (CTX_VALUE_GET_P_ID(*value, 1) != 0) {
+                    isPrimary = false;
+                    FLAG_CHANGED_PRIMARY_DUP;
+                }
+                else if (aligned && value->unaligned_2) {
+                    (void)PLOGMSG(klogWarn, (klogWarn, "Read 2 of spot '$(name)', which was unmapped, is now being mapped at position $(pos) on reference '$(ref)'; this alignment will be considered as secondary", "name=%s,ref=%s,pos=%u", name, refSeq->name, rpos));
+                    isPrimary = false;
+                    FLAG_CHANGED_WAS_UNALIGNED;
+                }
+                break;
+            default:
+                break;
+            }
+        }
+        if (hardclipped) {
+            value->hardclipped = 1;
+        }
+#if 0 /** EY TO REVIEW **/
+        if (!isPrimary && value->hardclipped) {
+            DISCARD_HARDCLIP_SECONDARY;
+            goto LOOP_END;
+        }
+#endif
+
+        ++recordsProcessed;
+
+        data.isPrimary = isPrimary;
+        if (aligned) {
+            uint32_t matches = 0;
+            uint32_t misses = 0;
+            uint8_t rna_orient = ' ';
+
+            FixOverhangingAlignment(&cigBuf, &opCount, rpos, refSeq->length, readlen);
+            BAM_AlignmentGetRNAStrand(rec, &rna_orient);
+            {
+                int const intronType = rna_orient == '+' ? NCBI_align_ro_intron_plus :
+                                       rna_orient == '-' ? NCBI_align_ro_intron_minus :
+                                                   hasCG ? NCBI_align_ro_complete_genomics :
+                                                           NCBI_align_ro_intron_unknown;
+                rc = ReferenceRead(ref, &data, rpos, cigBuf.base, opCount, seqDNA, readlen, intronType, &matches, &misses);
+            }
+            if (rc == 0) {
+                int const i= AR_READNO(data) - 1;
+                int const clipped_rl = (uint8_t)readlen;
+                if (i >= 0 && i < 2) {
+                    int const rl = value->fragment_len[i];
+
+                    if (rl == 0)
+                        value->fragment_len[i] = clipped_rl;
+                    else if (rl != clipped_rl) {
+                        if (isPrimary) {
+                            rc = RC(rcApp, rcFile, rcReading, rcConstraint, rcViolated);
+                            (void)PLOGERR(klogErr, (klogErr, rc, "Primary alignment for '$(name)' has different length ($(len)) than previously recorded secondary alignment. Try to defer secondary alignment processing.",
+                                                    "name=%s,len=%d", name, readlen));
+                        }
+                        else {
+                            rc = SILENT_RC(rcApp, rcFile, rcReading, rcConstraint, rcViolated);
+                            (void)PLOGERR(klogWarn, (klogWarn, rc, "Secondary alignment for '$(name)' has different length ($(len)) than previously recorded primary alignment; discarding secondary alignment.",
+                                                     "name=%s,len=%d", name, readlen));
+                            DISCARD_BAD_SECONDARY;
+                            rc = CheckLimitAndLogError();
+                        }
+                        goto LOOP_END;
+                    }
+                }
+            }
+            if (rc == 0 && (matches < G.minMatchCount || (matches == 0 && !G.acceptNoMatch))) {
+                if (isPrimary) {
+                    if (misses > matches) {
+                        RecordNoMatch(name, refSeq->name, rpos);
+                        rc = LogNoMatch(name, refSeq->name, (unsigned)rpos, (unsigned)matches);
+                        if (rc)
+                            goto LOOP_END;
+                    }
+                }
+                else {
+                    (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)' contains too few ($(count)) matching bases to reference '$(ref)' at $(pos); discarding secondary alignment",
+                                             "name=%s,ref=%s,pos=%u,count=%u", name, refSeq->name, (unsigned)rpos, (unsigned)matches));
+                    DISCARD_BAD_SECONDARY;
+                    rc = 0;
+                    goto LOOP_END;
+                }
+            }
+            if (rc) {
+                aligned = false;
+
+                if (((int)GetRCObject(rc)) == ((int)rcData) && GetRCState(rc) == rcNotAvailable) {
+                    /* because of code above converting hard clips to soft clips, this should be unreachable */
+                    abort();
+                }
+                else if (((int)GetRCObject(rc)) == ((int)rcData)) {
+                    UNALIGNED_INVALID_INFO;
+                    (void)PLOGERR(klogWarn, (klogWarn, rc, "Spot '$(name)': bad alignment to reference '$(ref)' at $(pos)", "name=%s,ref=%s,pos=%u", name, refSeq->name, rpos));
+                    /* Data errors may get reset; alignment will be unmapped at any rate */
+                    rc = CheckLimitAndLogError();
+                }
+                else {
+                    UNALIGNED_INVALID_REF_POS;
+                    (void)PLOGERR(klogWarn, (klogWarn, rc, "Spot '$(name)': error reading reference '$(ref)' at $(pos)", "name=%s,ref=%s,pos=%u", name, refSeq->name, rpos));
+                    rc = CheckLimitAndLogError();
+                }
+                if (rc) goto LOOP_END;
+            }
+        }
+
+        if (!aligned && isPrimary) {
+            switch (AR_READNO(data)) {
+            case 1:
+                value->unaligned_1 = 1;
+                break;
+            case 2:
+                value->unaligned_2 = 1;
+                break;
+            default:
+                break;
+            }
+        }
+        if (isPrimary) {
+            switch (AR_READNO(data)) {
+            case 1:
+                if (CTX_VALUE_GET_P_ID(*value, 0) == 0 && aligned) {
+                    data.alignId = ++ctx->primaryId;
+                    CTX_VALUE_SET_P_ID(*value, 0, data.alignId);
+                }
+                break;
+            case 2:
+                if (CTX_VALUE_GET_P_ID(*value, 1) == 0 && aligned) {
+                    data.alignId = ++ctx->primaryId;
+                    CTX_VALUE_SET_P_ID(*value, 1, data.alignId);
+                }
+                break;
+            default:
+                break;
+            }
+        }
+        if (G.mode == mode_Archive)
+            goto WRITE_SEQUENCE;
+        else
+            goto WRITE_ALIGNMENT;
+        if (0) {
+WRITE_SEQUENCE:
+            if (mated) {
+                int64_t const spotId = CTX_VALUE_GET_S_ID(*value);
+                uint32_t const fragmentId = value->fragmentId;
+                bool const spotHasBeenWritten = (spotId != 0);
+                bool const spotHasFragmentInfo = (fragmentId != 0);
+                bool const spotIsFirstSeen = (spotHasBeenWritten || spotHasFragmentInfo) ? false : true;
+                
+                if (spotHasBeenWritten) {
+                    /* do nothing */
+                }
+                else if (spotIsFirstSeen) {
+                    /* start spot assembly */
+                    unsigned sz;
+                    FragmentInfo fi;
+                    int32_t mate_refSeqId = -1;
+                    int64_t pnext = 0;
+
+                    if (!isPrimary) {
+                        if ( (!G.assembleWithSecondary || hardclipped) && !G.deferSecondary ) { 
+                            goto WRITE_ALIGNMENT;
+                        }
+                        (void)PLOGMSG(klogDebug, (klogDebug, "Spot '$(name)' (id $(id)) is being constructed from secondary alignment information", "id=%lx,name=%s", keyId, name));
+                    }
+                    memset(&fi, 0, sizeof(fi));
+
+                    fi.aligned = isPrimary ? aligned : 0;
+                    fi.ti = ti;
+                    fi.orientation = AR_REF_ORIENT(data);
+                    fi.otherReadNo = AR_READNO(data);
+                    fi.sglen = strlen(spotGroup);
+                    fi.lglen = BX ? strlen(BX) : 0;
+                    fi.readlen = readlen;
+                    fi.cskey = cskey;
+                    fi.is_bad = (flags & BAMFlags_IsLowQuality) != 0;
+                    sz = sizeof(fi) + 2*fi.readlen + fi.sglen + fi.lglen;
+                    if (align) {
+                        BAM_AlignmentGetMateRefSeqId(rec, &mate_refSeqId);
+                        BAM_AlignmentGetMatePosition(rec, &pnext);
+                    }
+                    if(align && mate_refSeqId == refSeqId && pnext > 0 && pnext!=rpos /*** weird case in some bams**/){
+                        rc = MemBankAlloc(ctx->frags, &value->fragmentId, sz, 0, false);
+                        fcountBoth++;
+                    } else {
+                        rc = MemBankAlloc(ctx->frags, &value->fragmentId, sz, 0, true);
+                        fcountOne++;
+                    }
+                    if (rc) {
+                        (void)LOGERR(klogErr, rc, "KMemBankAlloc failed");
+                        goto LOOP_END;
+                    }
+                    /*printf("IN:%10d\tcnt2=%ld\tcnt1=%ld\n",value->fragmentId,fcountBoth,fcountOne);*/
+                    
+                    rc = KDataBufferResize(&fragBuf, sz);
+                    if (rc) {
+                        (void)LOGERR(klogErr, rc, "Failed to resize fragment buffer");
+                        goto LOOP_END;
+                    }
+                    {{
+                        uint8_t *dst = (uint8_t*) fragBuf.base;
+                        
+                        memcpy(dst,&fi,sizeof(fi));
+                        dst += sizeof(fi);
+                        memcpy(dst, seqBuffer.base, readlen);
+                        dst += readlen;
+                        memcpy(dst, qualBuffer.base, readlen);
+                        dst += fi.readlen;
+                        memcpy(dst,spotGroup,fi.sglen);
+                        dst += fi.sglen;
+                        memcpy(dst, BX, fi.lglen);
+                    }}
+                    rc = MemBankWrite(ctx->frags, value->fragmentId, 0, fragBuf.base, sz, &rsize);
+                    if (rc) {
+                        (void)PLOGERR(klogErr, (klogErr, rc, "KMemBankWrite failed writing fragment $(id)", "id=%u", value->fragmentId));
+                        goto LOOP_END;
+                    }
+                    if (revcmp) {
+                        QUAL_CHANGED_REVERSED;
+                        SEQ__CHANGED_REV_COMP;
+                    }
+                }
+                else if (spotHasFragmentInfo) {
+                    /* continue spot assembly */
+                    FragmentInfo *fip;
+                    {
+                        size_t size1;
+                        size_t size2;
+                        
+                        rc = MemBankSize(ctx->frags, fragmentId, &size1);
+                        if (rc) {
+                            (void)PLOGERR(klogErr, (klogErr, rc, "KMemBankSize failed on fragment $(id)", "id=%u", fragmentId));
+                            goto LOOP_END;
+                        }
+                        
+                        rc = KDataBufferResize(&fragBuf, size1);
+                        fip = (FragmentInfo *)fragBuf.base;
+                        if (rc) {
+                            (void)PLOGERR(klogErr, (klogErr, rc, "Failed to resize fragment buffer", ""));
+                            goto LOOP_END;
+                        }
+                        
+                        rc = MemBankRead(ctx->frags, fragmentId, 0, fragBuf.base, size1, &size2);
+                        if (rc) {
+                            (void)PLOGERR(klogErr, (klogErr, rc, "KMemBankRead failed on fragment $(id)", "id=%u", fragmentId));
+                            goto LOOP_END;
+                        }
+                        assert(size1 == size2);
+                    }
+                    if (AR_READNO(data) == fip->otherReadNo) {
+                        /* is a repeat of the same read; do nothing */
+                    }
+                    else {
+                        /* mate found; finish spot assembly */
+                        unsigned read1 = 0;
+                        unsigned read2 = 1;
+                        uint8_t  *src  = (uint8_t*) fip + sizeof(*fip);
+                        
+                        if (!isPrimary) {
+                            if ((!G.assembleWithSecondary || hardclipped) && !G.deferSecondary ) {
+                                goto WRITE_ALIGNMENT;
+                            }
+                            (void)PLOGMSG(klogDebug, (klogDebug, "Spot '$(name)' (id $(id)) is being constructed from secondary alignment information", "id=%lx,name=%s", keyId, name));
+                        }
+                        rc = KDataBufferResize(&seqBuffer, readlen + fip->readlen);
+                        if (rc) {
+                            (void)LOGERR(klogErr, rc, "Failed to resize record buffer");
+                            goto LOOP_END;
+                        }
+                        rc = KDataBufferResize(&qualBuffer, readlen + fip->readlen);
+                        if (rc) {
+                            (void)LOGERR(klogErr, rc, "Failed to resize record buffer");
+                            goto LOOP_END;
+                        }
+                        if (AR_READNO(data) < fip->otherReadNo) {
+                            read1 = 1;
+                            read2 = 0;
+                        }
+
+                        memset(&srecStorage, 0, sizeof(srecStorage));
+                        srec.numreads = 2;
+                        srec.readLen[read1] = fip->readlen;
+                        srec.readLen[read2] = readlen;
+                        srec.readStart[1] = srec.readLen[0];
+                        {
+                            char const *const s1 = (void *)src;
+                            char const *const s2 = seqBuffer.base;
+                            char *const d = seqBuffer.base;
+                            char *const d1 = d + srec.readStart[read1];
+                            char *const d2 = d + srec.readStart[read2];
+
+                            srec.seq = seqBuffer.base;
+                            if (d2 != s2) {
+                                memcpy(d2, s2, readlen);
+                            }
+                            memcpy(d1, s1, fip->readlen);
+                            src += fip->readlen;
+                        }
+                        {
+                            char const *const s1 = (void *)src;
+                            char const *const s2 = qualBuffer.base;
+                            char *const d = qualBuffer.base;
+                            char *const d1 = d + srec.readStart[read1];
+                            char *const d2 = d + srec.readStart[read2];
+
+                            srec.qual = qualBuffer.base;
+                            if (d2 != s2) {
+                                memcpy(d2, s2, readlen);
+                            }
+                            memcpy(d1, s1, fip->readlen);
+                            src += fip->readlen;
+                        }
+
+                        srec.ti[read1] = fip->ti;
+                        srec.ti[read2] = ti;
+
+                        srec.aligned[read1] = fip->aligned;
+                        srec.aligned[read2] = isPrimary ? aligned : 0;
+
+                        srec.is_bad[read1] = fip->is_bad;
+                        srec.is_bad[read2] = (flags & BAMFlags_IsLowQuality) != 0;
+
+                        srec.orientation[read1] = fip->orientation;
+                        srec.orientation[read2] = AR_REF_ORIENT(data);
+
+                        srec.cskey[read1] = fip->cskey;
+                        srec.cskey[read2] = cskey;
+
+                        srec.keyId = keyId;
+
+                        srec.spotGroup = spotGroup;
+                        srec.spotGroupLen = strlen(spotGroup);
+
+                        srec.linkageGroup = BX;
+                        srec.linkageGroupLen = BX ? strlen(BX) : 0;
+
+                        srec.seq = seqBuffer.base;
+                        srec.qual = qualBuffer.base;
+
+                        rc = SequenceWriteRecord(seq, &srec, isColorSpace, value->pcr_dup, value->platform);
+                        if (rc) {
+                            (void)LOGERR(klogErr, rc, "SequenceWriteRecord failed");
+                            goto LOOP_END;
+                        }
+                        CTX_VALUE_SET_S_ID(*value, ++ctx->spotId);
+                        if(fragmentId & 1){
+                            fcountOne--;
+                        } else {
+                            fcountBoth--;
+                        }
+                        /*	printf("OUT:%9d\tcnt2=%ld\tcnt1=%ld\n",fragmentId,fcountBoth,fcountOne);*/
+                        rc = MemBankFree(ctx->frags, fragmentId);
+                        if (rc) {
+                            (void)PLOGERR(klogErr, (klogErr, rc, "KMemBankFree failed on fragment $(id)", "id=%u", fragmentId));
+                            goto LOOP_END;
+                        }
+                        value->fragmentId = 0;
+                        if (revcmp) {
+                            QUAL_CHANGED_REVERSED;
+                            SEQ__CHANGED_REV_COMP;
+                        }
+                        if (value->pcr_dup && (srec.is_bad[0] || srec.is_bad[1])) {
+                            FLAG_CHANGED_400_AND_200;
+                            filterFlagConflictRecords++;
+                            if (filterFlagConflictRecords < MAX_WARNINGS_FLAG_CONFLICT) {
+                                (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)': both 0x400 and 0x200 flag bits set, only 0x400 will be saved", "name=%s", name));
+                            }
+                            else if (filterFlagConflictRecords == MAX_WARNINGS_FLAG_CONFLICT) {
+                                (void)PLOGMSG(klogWarn, (klogWarn, "Last reported warning: Spot '$(name)': both 0x400 and 0x200 flag bits set, only 0x400 will be saved", "name=%s", name));
+                            }
+                        }
+                    }
+                }
+                else {
+                    (void)PLOGMSG(klogErr, (klogErr, "Spot '$(name)' has caused the loader to enter an illogical state", "name=%s", name));
+                    assert("this should never happen");
+                }
+            }
+            else if (CTX_VALUE_GET_S_ID(*value) == 0) {
+                /* new unmated fragment - no spot assembly */
+                if (!isPrimary) {
+                    if ((!G.assembleWithSecondary || hardclipped) && !G.deferSecondary ) {
+                        goto WRITE_ALIGNMENT;
+                    }
+                    (void)PLOGMSG(klogDebug, (klogDebug, "Spot '$(name)' (id $(id)) is being constructed from secondary alignment information", "id=%lx,name=%s", keyId, name));
+                }
+                memset(&srecStorage, 0, sizeof(srecStorage));
+                srec.numreads = 1;
+
+                srec.readLen[0] = readlen;
+                srec.ti[0] = ti;
+                srec.aligned[0] = isPrimary ? aligned : 0;
+                srec.is_bad[0] = (flags & BAMFlags_IsLowQuality) != 0;
+                srec.orientation[0] = AR_REF_ORIENT(data);
+                srec.cskey[0] = cskey;
+
+                srec.keyId = keyId;
+
+                srec.spotGroup = spotGroup;
+                srec.spotGroupLen = strlen(spotGroup);
+
+                srec.linkageGroup = BX;
+                srec.linkageGroupLen = BX ? strlen(BX) : 0;
+
+                srec.seq = seqBuffer.base;
+                srec.qual = qualBuffer.base;
+
+                rc = SequenceWriteRecord(seq, &srec, isColorSpace, value->pcr_dup, value->platform);
+                if (rc) {
+                    (void)PLOGERR(klogErr, (klogErr, rc, "SequenceWriteRecord failed", ""));
+                    goto LOOP_END;
+                }
+                CTX_VALUE_SET_S_ID(*value, ++ctx->spotId);
+                value->fragmentId = 0;
+                if (value->pcr_dup && srec.is_bad[0]) {
+                    FLAG_CHANGED_400_AND_200;
+                    filterFlagConflictRecords++;
+                    if (filterFlagConflictRecords < MAX_WARNINGS_FLAG_CONFLICT) {
+                        (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)': both 0x400 and 0x200 flag bits set, only 0x400 will be saved", "name=%s", name));
+                    }
+                    else if (filterFlagConflictRecords == MAX_WARNINGS_FLAG_CONFLICT) {
+                        (void)PLOGMSG(klogWarn, (klogWarn, "Last reported warning: Spot '$(name)': both 0x400 and 0x200 flag bits set, only 0x400 will be saved", "name=%s", name));
+                    }
+                }
+                if (revcmp) {
+                    QUAL_CHANGED_REVERSED;
+                    SEQ__CHANGED_REV_COMP;
+                }
+            }
+        }
+WRITE_ALIGNMENT:
+        if (aligned) {
+            if (mated && !isPrimary) {
+                int32_t bam_mrid;
+                int64_t mpos;
+                int64_t mrid = 0;
+                int64_t tlen;
+
+                BAM_AlignmentGetMatePosition(rec, &mpos);
+                BAM_AlignmentGetMateRefSeqId(rec, &bam_mrid);
+                BAM_AlignmentGetInsertSize(rec, &tlen);
+
+                if (mpos >= 0 && bam_mrid >= 0 && tlen != 0) {
+                    BAMRefSeq const *mref;
+
+                    BAM_FileGetRefSeq(bam, bam_mrid, &mref);
+                    if (mref) {
+                        rc_t rc_temp = ReferenceGet1stRow(ref, &mrid, mref->name);
+                        if (rc_temp == 0) {
+                            data.mate_ref_pos = mpos;
+                            data.template_len = tlen;
+                            data.mate_ref_orientation = (flags & BAMFlags_MateIsReverse) ? 1 : 0;
+                        }
+                        else {
+                            (void)PLOGERR(klogWarn, (klogWarn, rc_temp, "Failed to get refID for $(name)", "name=%s", mref->name));
+                            MATE_INFO_LOST_UNKNOWN_REF;
+                        }
+                        data.mate_ref_id = mrid;
+                    }
+                    else {
+                        MATE_INFO_LOST_INVALID;
+                    }
+                }
+                else if (mpos >= 0 || bam_mrid >= 0 || tlen != 0) {
+                    MATE_INFO_LOST_MISSING;
+                }
+            }
+
+            if (wasRenamed) {
+                RENAMED_REFERENCE;
+            }
+            if (value->alignmentCount[AR_READNO(data) - 1] < 254)
+                ++value->alignmentCount[AR_READNO(data) - 1];
+            ++ctx->alignCount;
+
+            assert(keyId >> 32 < ctx->keyToID.key2id_count);
+            assert((uint32_t)keyId < ctx->keyToID.idCount[keyId >> 32]);
+
+            if (BX) {
+                AR_LINKAGE_GROUP(data).elements = strlen(BX);
+                AR_LINKAGE_GROUP(data).buffer = BX;
+            }
+
+            rc = AlignmentWriteRecord(align, &data);
+            if (rc == 0) {
+                if (!isPrimary)
+                    data.alignId = ++ctx->secondId;
+
+                rc = ReferenceAddAlignId(ref, data.alignId, isPrimary);
+                if (rc) {
+                    (void)PLOGERR(klogErr, (klogErr, rc, "ReferenceAddAlignId failed", ""));
+                }
+                else {
+                    *had_alignments = true;
+                }
+            }
+            else {
+                (void)PLOGERR(klogErr, (klogErr, rc, "AlignmentWriteRecord failed", ""));
+            }
+        }
+        /**************************************************************/
+
+    LOOP_END:
+        BAM_AlignmentRelease(rec);
+        ++reccount;
+        if (G.maxAlignCount > 0 && reccount >= G.maxAlignCount)
+            break;
+        if (rc == 0)
+            *had_sequences = true;
+    }
+    if (filterFlagConflictRecords > 0) {
+        (void)PLOGMSG(klogWarn, (klogWarn, "$(cnt1) out of $(cnt2) records contained warning : both 0x400 and 0x200 flag bits set, only 0x400 will be saved", "cnt1=%lu,cnt2=%lu", filterFlagConflictRecords,recordsProcessed));
+    }
+    if (rc == 0 && recordsProcessed == 0) {
+        (void)LOGMSG(klogWarn, (G.limit2config || G.refFilter != NULL) ?
+                     "All records from the file were filtered out" :
+                     "The file contained no records that were processed.");
+        rc = RC(rcAlign, rcFile, rcReading, rcData, rcEmpty);
+    }
+#if THREADING_BAMREAD
+	KQueueSeal(bamq);
+	KQueueRelease(bamq); bamq=NULL;
+	if(bamread_thread) {
+		rc_t rc1;
+		KThreadWait(bamread_thread,&rc1);
+		if(rc == 0){
+			rc=rc1;
+		}
+		KThreadRelease(bamread_thread);
+	}
+#endif
+    BAM_FileRelease(bam);
+    MMArrayLock(ctx->id2value);
+    KDataBufferWhack(&buf);
+    KDataBufferWhack(&fragBuf);
+    KDataBufferWhack(&cigBuf);
+    KDataBufferWhack(&data.buffer);
+    return rc;
+}
+
+static rc_t WriteSoloFragments(context_t *ctx, Sequence *seq)
+{
+    uint32_t i;
+    unsigned j;
+    uint64_t idCount = 0;
+    rc_t rc;
+    KDataBuffer fragBuf;
+    SequenceRecordStorage srecStorage;
+    SequenceRecord srec;
+
+    ++ctx->pass;
+    memset(&srec, 0, sizeof(srec));
+
+    srec.ti             = srecStorage.ti;
+    srec.readStart      = srecStorage.readStart;
+    srec.readLen        = srecStorage.readLen;
+    srec.orientation    = srecStorage.orientation;
+    srec.is_bad         = srecStorage.is_bad;
+    srec.alignmentCount = srecStorage.alignmentCount;
+    srec.aligned        = srecStorage.aligned;
+    srec.cskey          = srecStorage. cskey;
+
+    rc = KDataBufferMake(&fragBuf, 8, 0);
+    if (rc) {
+        (void)LOGERR(klogErr, rc, "KDataBufferMake failed");
+        return rc;
+    }
+    for (idCount = 0, j = 0; j < ctx->keyToID.key2id_count; ++j) {
+        idCount += ctx->keyToID.idCount[j];
+    }
+    KLoadProgressbar_Append(ctx->progress[ctx->pass - 1], idCount);
+
+    for (idCount = 0, j = 0; j < ctx->keyToID.key2id_count; ++j) {
+        for (i = 0; i != ctx->keyToID.idCount[j]; ++i, ++idCount) {
+            uint64_t const keyId = ((uint64_t)j << 32) | i;
+            ctx_value_t *value;
+            size_t rsize;
+            size_t sz;
+            char const *src;
+            FragmentInfo const *fip;
+
+            rc = MMArrayGet(ctx->id2value, (void **)&value, keyId);
+            if (rc)
+                break;
+            KLoadProgressbar_Process(ctx->progress[ctx->pass - 1], 1, false);
+            if (value->fragmentId == 0)
+                continue;
+
+            rc = MemBankSize(ctx->frags, value->fragmentId, &sz);
+            if (rc) {
+                (void)LOGERR(klogErr, rc, "KMemBankSize failed");
+                break;
+            }
+            rc = KDataBufferResize(&fragBuf, (size_t)sz);
+            if (rc) {
+                (void)LOGERR(klogErr, rc, "KDataBufferResize failed");
+                break;
+            }
+            rc = MemBankRead(ctx->frags, value->fragmentId, 0, fragBuf.base, sz, &rsize);
+            if (rc) {
+                (void)LOGERR(klogErr, rc, "KMemBankRead failed");
+                break;
+            }
+            assert( rsize == sz );
+
+            fip = fragBuf.base;
+            src = (char const *)&fip[1];
+
+            memset(&srecStorage, 0, sizeof(srecStorage));
+            if (value->unmated) {
+                srec.numreads = 1;
+                srec.readLen[0] = fip->readlen;
+                srec.ti[0] = fip->ti;
+                srec.aligned[0] = fip->aligned;
+                srec.is_bad[0] = fip->is_bad;
+                srec.orientation[0] = fip->orientation;
+                srec.cskey[0] = fip->cskey;
+            }
+            else {
+                unsigned const read = ((fip->aligned && CTX_VALUE_GET_P_ID(*value, 0) == 0) || value->unaligned_2) ? 1 : 0;
+
+                srec.numreads = 2;
+                srec.readLen[read] = fip->readlen;
+                srec.readStart[1] = srec.readLen[0];
+                srec.ti[read] = fip->ti;
+                srec.aligned[read] = fip->aligned;
+                srec.is_bad[read] = fip->is_bad;
+                srec.orientation[read] = fip->orientation;
+                srec.cskey[0] = srec.cskey[1] = 'N';
+                srec.cskey[read] = fip->cskey;
+            }
+            srec.seq = (char *)src;
+            srec.qual = (uint8_t *)(src + fip->readlen);
+            srec.spotGroup = (char *)(src + 2 * fip->readlen);
+            srec.spotGroupLen = fip->sglen;
+            srec.linkageGroup = (char *)(src + 2 * fip->readlen * fip->sglen);
+            srec.linkageGroupLen = fip->lglen;
+            srec.keyId = keyId;
+            rc = SequenceWriteRecord(seq, &srec, ctx->isColorSpace, value->pcr_dup, value->platform);
+            if (rc) {
+                (void)LOGERR(klogErr, rc, "SequenceWriteRecord failed");
+                break;
+            }
+            /*rc = KMemBankFree(frags, id);*/
+            CTX_VALUE_SET_S_ID(*value, ++ctx->spotId);
+        }
+    }
+    MMArrayLock(ctx->id2value);
+    KDataBufferWhack(&fragBuf);
+    return rc;
+}
+
+static rc_t SequenceUpdateAlignInfo(context_t *ctx, Sequence *seq)
+{
+    rc_t rc = 0;
+    uint64_t row;
+    uint64_t keyId;
+
+    ++ctx->pass;
+    KLoadProgressbar_Append(ctx->progress[ctx->pass - 1], ctx->spotId + 1);
+
+    for (row = 1; row <= ctx->spotId; ++row) {
+        ctx_value_t *value;
+
+        rc = SequenceReadKey(seq, row, &keyId);
+        if (rc) {
+            (void)PLOGERR(klogErr, (klogErr, rc, "Failed to get key for row $(row)", "row=%u", (unsigned)row));
+            break;
+        }
+        rc = MMArrayGet(ctx->id2value, (void **)&value, keyId);
+        if (rc) {
+            (void)PLOGERR(klogErr, (klogErr, rc, "Failed to read info for row $(row), index $(idx)", "row=%u,idx=%u", (unsigned)row, (unsigned)keyId));
+            break;
+        }
+        if (G.mode == mode_Remap) {
+            CTX_VALUE_SET_S_ID(*value, row);
+        }
+        if (row != CTX_VALUE_GET_S_ID(*value)) {
+            rc = RC(rcApp, rcTable, rcWriting, rcData, rcUnexpected);
+            (void)PLOGMSG(klogErr, (klogErr, "Unexpected spot id $(spotId) for row $(row), index $(idx)", "spotId=%u,row=%u,idx=%u", (unsigned)CTX_VALUE_GET_S_ID(*value), (unsigned)row, (unsigned)keyId));
+            break;
+        }
+        {{
+            int64_t primaryId[2];
+            int const logLevel = klogWarn; /*G.assembleWithSecondary ? klogWarn : klogErr;*/
+
+            primaryId[0] = CTX_VALUE_GET_P_ID(*value, 0);
+            primaryId[1] = CTX_VALUE_GET_P_ID(*value, 1);
+
+            if (primaryId[0] == 0 && value->alignmentCount[0] != 0) {
+                rc = RC(rcApp, rcTable, rcWriting, rcConstraint, rcViolated);
+                (void)PLOGERR(logLevel, (logLevel, rc, "Spot id $(id) read 1 never had a primary alignment", "id=%lx", keyId));
+            }
+            if (!value->unmated && primaryId[1] == 0 && value->alignmentCount[1] != 0) {
+                rc = RC(rcApp, rcTable, rcWriting, rcConstraint, rcViolated);
+                (void)PLOGERR(logLevel, (logLevel, rc, "Spot id $(id) read 2 never had a primary alignment", "id=%lx", keyId));
+            }
+            if (rc != 0 && logLevel == klogErr)
+                break;
+
+            rc = SequenceUpdateAlignData(seq, row, value->unmated ? 1 : 2,
+                                         primaryId,
+                                         value->alignmentCount);
+        }}
+        if (rc) {
+            (void)LOGERR(klogErr, rc, "Failed updating Alignment data in sequence table");
+            break;
+        }
+        KLoadProgressbar_Process(ctx->progress[ctx->pass - 1], 1, false);
+    }
+    MMArrayLock(ctx->id2value);
+    return rc;
+}
+
+static rc_t AlignmentUpdateSpotInfo(context_t *ctx, Alignment *align)
+{
+    rc_t rc;
+    uint64_t keyId;
+
+    ++ctx->pass;
+
+    KLoadProgressbar_Append(ctx->progress[ctx->pass - 1], ctx->alignCount);
+
+    rc = AlignmentStartUpdatingSpotIds(align);
+    while (rc == 0 && (rc = Quitting()) == 0) {
+        ctx_value_t *value;
+
+        rc = AlignmentGetSpotKey(align, &keyId);
+        if (rc) {
+            if (GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound)
+                rc = 0;
+            break;
+        }
+        assert(keyId >> 32 < ctx->keyToID.key2id_count);
+        assert((uint32_t)keyId < ctx->keyToID.idCount[keyId >> 32]);
+        rc = MMArrayGet(ctx->id2value, (void **)&value, keyId);
+        if (rc == 0) {
+            int64_t const spotId = CTX_VALUE_GET_S_ID(*value);
+
+            if (spotId == 0) {
+                rc = RC(rcApp, rcTable, rcWriting, rcConstraint, rcViolated);
+                (void)PLOGERR(klogErr, (klogErr, rc, "Spot '$(id)' was never assigned a spot id, probably has no primary alignments", "id=%lx", keyId));
+                break;
+            }
+            rc = AlignmentWriteSpotId(align, spotId);
+        }
+        KLoadProgressbar_Process(ctx->progress[ctx->pass - 1], 1, false);
+    }
+    MMArrayLock(ctx->id2value);
+    return rc;
+}
+
+
+static rc_t ArchiveBAM(VDBManager *mgr, VDatabase *db,
+                       unsigned bamFiles, char const *bamFile[],
+                       unsigned seqFiles, char const *seqFile[],
+                       bool *has_alignments,
+                       bool continuing)
+{
+    rc_t rc = 0;
+    rc_t rc2;
+    Reference ref;
+    Sequence seq;
+    Alignment *align;
+    static context_t *ctx = &GlobalContext;
+    bool has_sequences = false;
+    unsigned i;
+
+    *has_alignments = false;
+    rc = ReferenceInit(&ref, mgr, db);
+    if (rc)
+        return rc;
+
+    if (G.onlyVerifyReferences) {
+        for (i = 0; i < bamFiles && rc == 0; ++i) {
+            rc = ProcessBAM(bamFile[i], NULL, db, &ref, NULL, NULL, NULL, NULL);
+        }
+        ReferenceWhack(&ref, false);
+        return rc;
+    }
+    SequenceInit(&seq, db);
+    align = AlignmentMake(db);
+
+    rc = SetupContext(ctx, bamFiles + seqFiles);
+    if (rc)
+        return rc;
+
+    ctx->pass = 1;
+    for (i = 0; i < bamFiles && rc == 0; ++i) {
+        bool this_has_alignments = false;
+        bool this_has_sequences = false;
+
+        rc = ProcessBAM(bamFile[i], ctx, db, &ref, &seq, align, &this_has_alignments, &this_has_sequences);
+        *has_alignments |= this_has_alignments;
+        has_sequences |= this_has_sequences;
+    }
+    for (i = 0; i < seqFiles && rc == 0; ++i) {
+        bool this_has_alignments = false;
+        bool this_has_sequences = false;
+
+        rc = ProcessBAM(seqFile[i], ctx, db, &ref, &seq, align, &this_has_alignments, &this_has_sequences);
+        *has_alignments |= this_has_alignments;
+        has_sequences |= this_has_sequences;
+    }
+    if (!continuing) {
+/*** No longer need memory for key2id ***/
+        for (i = 0; i != ctx->keyToID.key2id_count; ++i) {
+            KBTreeDropBacking(ctx->keyToID.key2id[i]);
+            KBTreeRelease(ctx->keyToID.key2id[i]);
+            ctx->keyToID.key2id[i] = NULL;
+        }
+        free(ctx->keyToID.key2id_names);
+        ctx->keyToID.key2id_names = NULL;
+/*******************/
+    }
+
+    if (has_sequences) {
+        if (rc == 0 && (rc = Quitting()) == 0) {
+            if (G.mode == mode_Archive) {
+                (void)LOGMSG(klogInfo, "Writing unpaired sequences");
+                rc = WriteSoloFragments(ctx, &seq);
+                ContextReleaseMemBank(ctx);
+            }
+            if (rc == 0) {
+                rc = SequenceDoneWriting(&seq);
+                if (rc == 0) {
+                    (void)LOGMSG(klogInfo, "Updating sequence alignment info");
+                    rc = SequenceUpdateAlignInfo(ctx, &seq);
+                }
+            }
+        }
+    }
+
+    if (*has_alignments && rc == 0 && (rc = Quitting()) == 0) {
+        (void)LOGMSG(klogInfo, "Writing alignment spot ids");
+        rc = AlignmentUpdateSpotInfo(ctx, align);
+    }
+    rc2 = AlignmentWhack(align, *has_alignments && rc == 0 && (rc = Quitting()) == 0);
+    if (rc == 0)
+        rc = rc2;
+
+    rc2 = ReferenceWhack(&ref, *has_alignments && rc == 0 && (rc = Quitting()) == 0);
+    if (rc == 0)
+        rc = rc2;
+
+    SequenceWhack(&seq, rc == 0);
+
+    ContextRelease(ctx, continuing);
+
+    if (rc == 0) {
+        (void)LOGMSG(klogInfo, "Successfully loaded all files");
+    }
+    return rc;
+}
+
+rc_t WriteLoaderSignature(KMetadata *meta, char const progName[])
+{
+    KMDataNode *node;
+    rc_t rc = KMetadataOpenNodeUpdate(meta, &node, "/");
+
+    if (rc == 0) {
+        rc = KLoaderMeta_Write(node, progName, __DATE__, "BAM", KAppVersion());
+        KMDataNodeRelease(node);
+    }
+    if (rc) {
+        (void)LOGERR(klogErr, rc, "Cannot update loader meta");
+    }
+    return rc;
+}
+
+rc_t OpenPath(char const path[], KDirectory **dir)
+{
+    KDirectory *p;
+    rc_t rc = KDirectoryNativeDir(&p);
+
+    if (rc == 0) {
+        rc = KDirectoryOpenDirUpdate(p, dir, false, "%s", path);
+        KDirectoryRelease(p);
+    }
+    return rc;
+}
+
+static
+rc_t ConvertDatabaseToUnmapped(VDatabase *db)
+{
+    VTable* tbl;
+    rc_t rc = VDatabaseOpenTableUpdate(db, &tbl, "SEQUENCE");
+    if (rc == 0)
+    {
+        VTableRenameColumn(tbl, false, "CMP_ALTREAD", "ALTREAD");
+        VTableRenameColumn(tbl, false, "CMP_READ", "READ");
+        VTableRenameColumn(tbl, false, "CMP_ALTCSREAD", "ALTCSREAD");
+        VTableRenameColumn(tbl, false, "CMP_CSREAD", "CSREAD");
+        rc = VTableRelease(tbl);
+    }
+    return rc;
+}
+
+rc_t run(char const progName[],
+         unsigned bamFiles, char const *bamFile[],
+         unsigned seqFiles, char const *seqFile[],
+         bool continuing)
+{
+    VDBManager *mgr;
+    rc_t rc;
+    rc_t rc2;
+    char const *db_type = G.expectUnsorted ? "NCBI:align:db:alignment_unsorted" : "NCBI:align:db:alignment_sorted";
+
+    rc = VDBManagerMakeUpdate(&mgr, NULL);
+    if (rc) {
+        (void)LOGERR (klogErr, rc, "failed to create VDB Manager!");
+    }
+    else {
+        bool has_alignments = false;
+
+        /* VDBManagerDisableFlushThread(mgr); */
+        rc = VDBManagerDisablePagemapThread(mgr);
+        if (rc == 0)
+        {
+            if (G.onlyVerifyReferences) {
+                rc = ArchiveBAM(mgr, NULL, bamFiles, bamFile, 0, NULL, &has_alignments, continuing);
+            }
+            else {
+                VSchema *schema;
+
+                rc = VDBManagerMakeSchema(mgr, &schema);
+                if (rc) {
+                    (void)LOGERR (klogErr, rc, "failed to create schema");
+                }
+                else {
+                    (void)(rc = VSchemaAddIncludePath(schema, "%s", G.schemaIncludePath));
+                    rc = VSchemaParseFile(schema, "%s", G.schemaPath);
+                    if (rc) {
+                        (void)PLOGERR(klogErr, (klogErr, rc, "failed to parse schema file $(file)", "file=%s", G.schemaPath));
+                    }
+                    else {
+                        VDatabase *db;
+
+                        rc = VDBManagerCreateDB(mgr, &db, schema, db_type,
+                                                kcmInit + kcmMD5, "%s", G.outpath);
+                        VSchemaRelease(schema);
+                        if (rc == 0) {
+                            rc = ArchiveBAM(mgr, db, bamFiles, bamFile, seqFiles, seqFile, &has_alignments, continuing);
+                            if (rc == 0)
+                                PrintChangeReport();
+                            if (rc == 0 && !has_alignments) {
+                                rc = ConvertDatabaseToUnmapped(db);
+                            }
+                            else if (rc == 0 && lmc != NULL) {
+                                VTable *tbl = NULL;
+                                KTable *ktbl = NULL;
+                                KMetadata *meta = NULL;
+                                KMDataNode *node = NULL;
+
+                                VDatabaseOpenTableUpdate(db, &tbl, "REFERENCE");
+                                VTableOpenKTableUpdate(tbl, &ktbl);
+                                VTableRelease(tbl);
+
+                                KTableOpenMetadataUpdate(ktbl, &meta);
+                                KTableRelease(ktbl);
+
+                                KMetadataOpenNodeUpdate(meta, &node, "LOW_MATCH_COUNT");
+                                KMetadataRelease(meta);
+
+                                RecordLowMatchCounts(node);
+
+                                KMDataNodeRelease(node);
+
+                                LowMatchCounterFree(lmc);
+                                lmc = NULL;
+                            }
+                            VDatabaseRelease(db);
+
+                            if (rc == 0 && G.globalMode == mode_Remap && !continuing) {
+                                VTable *tbl = NULL;
+
+                                VDBManagerOpenDBUpdate(mgr, &db, NULL, G.firstOut);
+                                VDatabaseOpenTableUpdate(db, &tbl, "SEQUENCE");
+                                VDatabaseRelease(db);
+                                VTableDropColumn(tbl, "TMP_KEY_ID");
+                                VTableDropColumn(tbl, "READ");
+                                VTableDropColumn(tbl, "ALTREAD");
+                                VTableRelease(tbl);
+                            }
+
+                            if (rc == 0) {
+                                KMetadata *meta = NULL;
+
+                                {
+                                    KDBManager *kmgr = NULL;
+
+                                    rc = VDBManagerOpenKDBManagerUpdate(mgr, &kmgr);
+                                    if (rc == 0) {
+                                        KDatabase *kdb;
+
+                                        rc = KDBManagerOpenDBUpdate(kmgr, &kdb, "%s", G.outpath);
+                                        if (rc == 0) {
+                                            rc = KDatabaseOpenMetadataUpdate(kdb, &meta);
+                                            KDatabaseRelease(kdb);
+                                        }
+                                        KDBManagerRelease(kmgr);
+                                    }
+                                }
+                                if (rc == 0) {
+                                    rc = WriteLoaderSignature(meta, progName);
+                                    if (rc == 0) {
+                                        KMDataNode *changes = NULL;
+                                        
+                                        rc = KMetadataOpenNodeUpdate(meta, &changes, "CHANGES");
+                                        if (rc == 0)
+                                            RecordChanges(changes, "CHANGE");
+                                        KMDataNodeRelease(changes);
+                                    }
+                                    KMetadataRelease(meta);
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        rc2 = VDBManagerRelease(mgr);
+        if (rc2)
+            (void)LOGERR(klogWarn, rc2, "Failed to release VDB Manager");
+        if (rc == 0)
+            rc = rc2;
+    }
+    return rc;
+}
diff --git a/tools/bam-loader/loader-imp.h b/tools/bam-loader/loader-imp.h
new file mode 100644
index 0000000..d90625f
--- /dev/null
+++ b/tools/bam-loader/loader-imp.h
@@ -0,0 +1,30 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+rc_t run(char const argv0[],
+         unsigned countAligned, char const *bamFile[],
+         unsigned countUnaligned, char const *unaligned[],
+         bool continuing);
diff --git a/tools/bam-loader/low-match-count.cpp b/tools/bam-loader/low-match-count.cpp
new file mode 100644
index 0000000..48f9f44
--- /dev/null
+++ b/tools/bam-loader/low-match-count.cpp
@@ -0,0 +1,72 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+extern "C" {
+#include "low-match-count.h"
+}
+
+#include <map>
+#include <string>
+
+struct LowMatchCounter {
+    typedef unsigned counter_t;
+    typedef std::map<std::string, counter_t> map_t;
+
+    map_t counter;
+
+    void add(std::string const &name) {
+        ++counter[name];
+    }
+
+    void each(void *ctx, callback_f callback) const {
+        map_t::const_iterator i;
+
+        for (i = counter.begin(); i != counter.end(); ++i) {
+            char const *const name = i->first.c_str();
+            callback(ctx, name, i->second);
+        }
+    }
+};
+
+extern "C" {
+
+LowMatchCounter *LowMatchCounterMake() {
+    return new LowMatchCounter;
+}
+
+void LowMatchCounterAdd(LowMatchCounter *const self, char const *const name) {
+    self->add(name);
+}
+
+void LowMatchCounterEach(LowMatchCounter const *const self, void *callback_ctx, callback_f callback) {
+    self->each(callback_ctx, callback);
+}
+
+void LowMatchCounterFree(LowMatchCounter *const self) {
+    delete self;
+}
+
+}
diff --git a/tools/bam-loader/low-match-count.h b/tools/bam-loader/low-match-count.h
new file mode 100644
index 0000000..76b9b85
--- /dev/null
+++ b/tools/bam-loader/low-match-count.h
@@ -0,0 +1,33 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef void (*callback_f)(void *ctx, char const *name, unsigned count);
+typedef struct LowMatchCounter LowMatchCounter;
+
+LowMatchCounter *LowMatchCounterMake();
+void LowMatchCounterAdd(LowMatchCounter *, char const *);
+void LowMatchCounterEach(LowMatchCounter const *, void *, callback_f);
+void LowMatchCounterFree(LowMatchCounter *);
diff --git a/tools/bam-loader/mem-bank.cpp b/tools/bam-loader/mem-bank.cpp
new file mode 100644
index 0000000..75d8eda
--- /dev/null
+++ b/tools/bam-loader/mem-bank.cpp
@@ -0,0 +1,477 @@
+/* ===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <klib/defs.h>
+#include <klib/rc.h>
+
+extern "C" {
+#include "mem-bank.h"
+}
+
+#define USE_KMEMBANK 0
+
+#if USE_KMEMBANK
+#include <kfs/file.h>
+#include <kfs/directory.h>
+#include <kfs/pagefile.h>
+#include <kfs/pmem.h>
+#include <klib/log.h>
+#include <klib/printf.h>
+
+#define FRAG_CHUNK_SIZE (128)
+
+struct MemBank {
+    KMemBank *fragsOne;
+    KMemBank *fragsBoth;
+};
+
+static rc_t OpenMBankFile(KMemBank **const mbank, KDirectory *const dir, int const pid, char const *const suffix, size_t const climit)
+{
+    KFile *file = NULL;
+    char fname[4096];
+    rc_t rc = string_printf(fname, sizeof(fname), NULL, "frag_data%s.%u", suffix, pid);
+    
+    if (rc)
+        return rc;
+    
+    rc = KDirectoryCreateFile(dir, &file, true, 0600, kcmInit, "%s", fname);
+    KDirectoryRemove(dir, 0, "%s", fname);
+    if (rc == 0) {
+        KPageFile *backing;
+        
+        rc = KPageFileMakeUpdate(&backing, file, climit, false);
+        KFileRelease(file);
+        if (rc == 0) {
+            rc = KMemBankMake(mbank, FRAG_CHUNK_SIZE, 0, backing);
+            KPageFileRelease(backing);
+        }
+    }
+    return rc;
+}
+
+static rc_t MemBank_Make(MemBank **rslt, KDirectory *const dir, int const pid, size_t const climits[2])
+{
+    KMemBank *fragsOne;
+    
+    rc_t rc = OpenMBankFile(&fragsOne, dir, pid, "One", climits[0]);
+    if (rc == 0) {
+        KMemBank *fragsBoth;
+        
+        rc = OpenMBankFile(&fragsBoth, dir, pid, "Both", climits[1]);
+        
+        if (rc == 0) {
+            MemBank *const self = reinterpret_cast<MemBank *>(malloc(sizeof(self)));
+
+            if (self) {
+                self->fragsOne = fragsOne;
+                self->fragsBoth = fragsBoth;
+
+                *rslt = self;
+                return 0;
+            }
+            rc = RC(rcApp, rcFile, rcConstructing, rcMemory, rcExhausted);
+            KMemBankRelease(fragsBoth);
+        }
+        KMemBankRelease(fragsOne);
+    }
+    return rc;
+}
+
+void MemBank_Release(MemBank *const self)
+{
+    KMemBankRelease(self->fragsBoth);
+    KMemBankRelease(self->fragsOne);
+    free(self);
+}
+
+rc_t MemBank_Alloc(MemBank *const self, uint32_t *const Id, size_t const size, bool const clear, bool const longlived)
+{
+    uint64_t id = 0;
+    KMemBank *const mbank = longlived ? self->fragsOne : self->fragsBoth;
+    rc_t rc = KMemBankAlloc(mbank, &id, size, clear);
+    uint32_t const id_out = (uint32_t)((id << 1) + (longlived ? 1 : 0));
+
+    if ((uint64_t)id_out != ((id << 1) + (longlived ? 1 : 0))) {
+        PLOGMSG(klogFatal, (klogFatal, "membank '$(which)': id space overflow", longlived ? "fragsOne" : "fragsBoth"));
+        abort();
+    }
+    Id[0] = id_out;
+    return rc;
+}
+
+rc_t MemBank_Write(MemBank *const self, uint32_t const id, uint64_t const pos, void const *const buffer, size_t const size, size_t *const num_writ)
+{
+    uint64_t const myId = id >> 1;
+    bool const longlived = (id & 1) ? true : false;
+    KMemBank *const mbank = longlived ? self->fragsOne : self->fragsBoth;
+    
+    return KMemBankWrite(mbank, myId, pos, buffer, size, num_writ);
+}
+
+rc_t MemBank_Size(MemBank const *const self, uint32_t const id, size_t *const rslt)
+{
+    uint64_t const myId = id >> 1;
+    bool const longlived = (id & 1) ? true : false;
+    KMemBank const *const mbank = longlived ? self->fragsOne : self->fragsBoth;
+    uint64_t size;
+    rc_t const rc = KMemBankSize(mbank, myId, &size);
+    
+    *rslt = size;
+    return rc;
+}
+
+rc_t MemBank_Read(MemBank const *const self, uint32_t const id, uint64_t const pos, void *const buffer, size_t const bsize, size_t *const num_read)
+{
+    uint64_t const myId = id >> 1;
+    bool const longlived = (id & 1) ? true : false;
+    KMemBank *const mbank = longlived ? self->fragsOne : self->fragsBoth;
+
+    return KMemBankRead(mbank, myId, pos, buffer, bsize, num_read);
+}
+
+rc_t MemBank_Free(MemBank *const self, uint32_t const id)
+{
+    uint64_t const myId = id >> 1;
+    bool const longlived = (id & 1) ? true : false;
+    KMemBank *const mbank = longlived ? self->fragsOne : self->fragsBoth;
+
+    return KMemBankFree(mbank, myId);
+}
+
+#else
+
+#include <map>
+#include <set>
+#include <vector>
+#include <iostream>
+#include <stdexcept>
+#include <algorithm>
+
+class pmem
+{
+    struct allocation {
+        void *memory;
+        size_t size;
+        
+        allocation(int = 0) : memory(0), size(0) {}
+    };
+    typedef std::map<uint32_t, struct allocation> my_map_t;
+    typedef std::set<uint32_t> my_set_t;
+    my_map_t in_use;
+    my_set_t no_use;
+    my_map_t::size_type max_in_use;
+    my_set_t::size_type max_no_use;
+    my_map_t::size_type total_allocs;
+    my_map_t::size_type total_frees;
+    
+    void *get(uint32_t const id) const
+    {
+        my_map_t::const_iterator const i = in_use.find(id);
+        
+        if (i == in_use.end())
+            throw std::runtime_error("attempt to access invalid id");
+        
+        return i->second.memory;
+    }
+public:
+    pmem(int = 0)
+    : max_in_use(0)
+    , max_no_use(0)
+    , total_allocs(0)
+    , total_frees(0)
+    {}
+    ~pmem() {
+        my_map_t::iterator i;
+        
+        for (i = in_use.begin(); i != in_use.end(); ++i) {
+            free(i->second.memory);
+            ++total_frees;
+        }
+#if 0
+        std::cerr << "max. used: " << max_in_use << std::endl;
+        std::cerr << "max. free: " << max_no_use << std::endl;
+        std::cerr << "num alloc: " << total_allocs << std::endl;
+        std::cerr << "num frees: " << total_frees << std::endl;
+#endif
+    }
+    
+    void Write(uint32_t id, size_t const offset, size_t const size, void const *const data) const
+    {
+        if (offset + size <= this->Size(id)) {
+            char *dst = reinterpret_cast<char *>(get(id)) + offset;
+            char const *src = reinterpret_cast<char const *>(data);
+            
+            std::copy(src, src + size, dst);
+            return;
+        }
+        throw std::runtime_error("attempt to write more than was allocated");
+    }
+    uint32_t Alloc(size_t const size, bool const clear = true)
+    {
+        my_map_t::key_type new_key;
+        
+        if (no_use.begin() == no_use.end()) {
+            my_map_t::size_type const new_id = in_use.size() + 1;
+
+            if (max_in_use < new_id)
+                max_in_use = new_id;
+            
+            new_key = (my_map_t::key_type)new_id;
+            if (new_key < new_id)
+                throw std::runtime_error("pmem overflow");
+        }
+        else {
+            my_set_t::const_iterator const j = no_use.begin();
+            
+            new_key = *j;
+            no_use.erase(j);
+        }
+        my_map_t::iterator const i = in_use.insert(my_map_t::value_type(new_key, 0)).first;
+        
+        void *const alloc = calloc(1, size);
+        if (alloc) {
+            i->second.memory = alloc;
+            i->second.size = size;
+            
+            ++total_allocs;
+            return i->first;
+        }
+        throw std::bad_alloc();
+    }
+    void Free(uint32_t const id)
+    {
+        my_map_t::iterator const i = in_use.find(id);
+        
+        if (i == in_use.end())
+            throw std::runtime_error("attempt to free invalid id");
+        
+        void *const alloc = i->second.memory;
+
+        no_use.insert(id);
+        if (max_no_use < no_use.size())
+            max_no_use = no_use.size();
+
+        in_use.erase(i);
+        free(alloc);
+        ++total_frees;
+    }
+    size_t Size(uint32_t const id) const
+    {
+        my_map_t::const_iterator const i = in_use.find(id);
+        
+        if (i == in_use.end())
+            throw std::runtime_error("attempt to access invalid or freed id");
+        
+        return i->second.size;
+    }
+    void const *Read(uint32_t const id) const
+    {
+        return get(id);
+    }
+};
+
+rc_t MemBank_Make(MemBank **bank, struct KDirectory * = 0, int = 0, size_t const * = 0)
+{
+    try {
+        pmem *const rslt = new pmem;
+        
+        *bank = reinterpret_cast<MemBank *>(rslt);
+        return 0;
+    }
+    catch (std::bad_alloc const &e) {
+        return RC(rcApp, rcFile, rcConstructing, rcMemory, rcExhausted);
+    }
+    catch (std::exception const &e) {
+        std::cout << e.what() << std::endl;
+        abort();
+    }
+    catch (...) {
+        std::cout << "this is bad!" << std::endl;
+        abort();
+    }
+}
+
+void MemBank_Release(MemBank *const self)
+{
+    delete reinterpret_cast<pmem *>(self);
+}
+
+rc_t MemBank_Alloc(MemBank *const Self, uint32_t *const id, size_t const bytes, bool const clear, bool const longlived)
+{
+    try {
+        pmem *const self = reinterpret_cast<pmem *>(Self);
+        
+        *id = self->Alloc(bytes, clear);
+        return 0;
+    }
+    catch (std::bad_alloc const &e) {
+        return RC(rcApp, rcFile, rcAllocating, rcMemory, rcExhausted);
+    }
+    catch (std::exception const &e) {
+        std::cerr << e.what() << std::endl;
+        abort();
+    }
+    catch (...) {
+        std::cout << "this is bad!" << std::endl;
+        abort();
+    }
+}
+
+rc_t MemBank_Write(MemBank *const Self, uint32_t const id, uint64_t const pos, void const *const buffer, size_t const bsize, size_t *const num_writ)
+{
+    try {
+        pmem *const self = reinterpret_cast<pmem *>(Self);
+        
+        *num_writ = 0;
+
+        size_t const size = self->Size((uint32_t)id);
+        
+        if (pos >= size)
+            return 0;
+        
+        size_t const actsize = (bsize + pos > size) ? (size - pos) : size;
+        
+        *num_writ = actsize;
+        self->Write(id, pos, actsize, buffer);
+        
+        return 0;
+    }
+    catch (std::exception const &e) {
+        std::cerr << e.what() << std::endl;
+        abort();
+    }
+    catch (...) {
+        std::cout << "this is bad!" << std::endl;
+        abort();
+    }
+}
+
+rc_t MemBank_Size(MemBank const *const Self, uint32_t const id, size_t *const size)
+{
+    try {
+        pmem const *const self = reinterpret_cast<pmem const *>(Self);
+        
+        *size = self->Size(id);
+        return 0;
+    }
+    catch (std::exception const &e) {
+        std::cerr << e.what() << std::endl;
+        abort();
+    }
+    catch (...) {
+        std::cout << "this is bad!" << std::endl;
+        abort();
+    }
+}
+
+rc_t MemBank_Read(MemBank const *const Self, uint32_t const id, uint64_t const pos, void *const buffer, size_t const bsize, size_t *const num_read)
+{
+    try {
+        pmem const *const self = reinterpret_cast<pmem const *>(Self);
+        
+        *num_read = 0;
+        
+        size_t const size = self->Size(id);
+        char const *data = reinterpret_cast<char const *>(self->Read(id)) + pos;
+        
+        if (pos >= size)
+            return 0;
+        
+        size_t const actsize = (bsize + pos > size) ? (size - pos) : size;
+        
+        *num_read = actsize;
+        
+        char *dst = reinterpret_cast<char *>(buffer);
+        std::copy(data, data + actsize, dst);
+        
+        return 0;
+    }
+    catch (std::exception const &e) {
+        std::cerr << e.what() << std::endl;
+        abort();
+    }
+    catch (...) {
+        std::cout << "this is bad!" << std::endl;
+        abort();
+    }
+}
+
+rc_t MemBank_Free(MemBank *const Self, uint32_t const id)
+{
+    try {
+        pmem *const self = reinterpret_cast<pmem *>(Self);
+        
+        self->Free(id);
+        return 0;
+    }
+    catch (std::exception const &e) {
+        std::cerr << e.what() << std::endl;
+        abort();
+    }
+    catch (...) {
+        std::cout << "this is bad!" << std::endl;
+        abort();
+    }
+}
+#endif
+
+extern "C" {
+    rc_t MemBankMake(MemBank **bank, struct KDirectory *dir, int pid, size_t const climits[2])
+    {
+      return MemBank_Make(bank, dir, pid, climits);
+    }
+    
+    void MemBankRelease(MemBank *const self)
+    {
+        MemBank_Release(self);
+    }
+    
+    rc_t MemBankAlloc(MemBank *const Self, uint32_t *const id, size_t const bytes, bool const clear, bool const longlived)
+    {
+        return MemBank_Alloc(Self, id, bytes, clear, longlived);
+    }
+    
+    rc_t MemBankWrite(MemBank *const Self, uint32_t const id, uint64_t const pos, void const *const buffer, size_t const bsize, size_t *const num_writ)
+    {
+        return MemBank_Write(Self, id, pos, buffer, bsize, num_writ);
+    }
+    
+    rc_t MemBankSize(MemBank const *const Self, uint32_t const id, size_t *const size)
+    {
+        return MemBank_Size(Self, id, size);
+    }
+    
+    rc_t MemBankRead(MemBank const *const Self, uint32_t const id, uint64_t const pos, void *const buffer, size_t const bsize, size_t *const num_read)
+    {
+        return MemBank_Read(Self, id, pos, buffer, bsize, num_read);
+    }
+    
+    rc_t MemBankFree(MemBank *const Self, uint32_t const id)
+    {
+        return MemBank_Free(Self, id);
+    }
+}
+
diff --git a/tools/bam-loader/mem-bank.h b/tools/bam-loader/mem-bank.h
new file mode 100644
index 0000000..6d9257a
--- /dev/null
+++ b/tools/bam-loader/mem-bank.h
@@ -0,0 +1,41 @@
+/* ===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct MemBank MemBank;
+
+rc_t MemBankMake(MemBank **rslt, struct KDirectory *dir, int pid, size_t const climits[2]);
+
+void MemBankRelease(MemBank *self);
+
+rc_t MemBankAlloc(MemBank *self, uint32_t *id, size_t size, bool clear, bool longlived);
+
+rc_t MemBankWrite(MemBank *self, uint32_t id, uint64_t pos, void const *buffer, size_t size, size_t *num_writ);
+
+rc_t MemBankSize(MemBank const *self, uint32_t id, size_t *rslt);
+
+rc_t MemBankRead(MemBank const *self, uint32_t id, uint64_t pos, void *buffer, size_t bsize, size_t *num_read);
+
+rc_t MemBankFree(MemBank *self, uint32_t id);
diff --git a/tools/bam-loader/reference-writer.c b/tools/bam-loader/reference-writer.c
new file mode 100644
index 0000000..f43c54a
--- /dev/null
+++ b/tools/bam-loader/reference-writer.c
@@ -0,0 +1,620 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <kfs/file.h>
+
+#include <kapp/main.h> /* for Quitting */
+
+#include <vdb/schema.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+
+#include <align/writer-refseq.h>
+
+#include "reference-writer.h"
+#include "Globals.h"
+
+#include <stdlib.h>
+#include <limits.h>
+#include <string.h>
+#include <assert.h>
+#include <ctype.h>
+
+#define SORTED_OPEN_TABLE_LIMIT (2)
+/*#define SORTED_CACHE_SIZE ((2 * 1024 * 1024)/(SORTED_OPEN_TABLE_LIMIT)) TODO: use line below until switch to unsorted is fixed */
+#define SORTED_CACHE_SIZE (350 * 1024 * 1024)
+
+#ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
+#define UNSORTED_OPEN_TABLE_LIMIT (8)
+#define UNSORTED_CACHE_SIZE ((1024 * 1024 * 1024)/(UNSORTED_OPEN_TABLE_LIMIT))
+#else
+#define UNSORTED_OPEN_TABLE_LIMIT (255)
+#define UNSORTED_CACHE_SIZE (350 * 1024 * 1024)
+#endif
+
+#if _DEBUGGING
+#define DUMP_CONFIG 1
+#endif
+
+struct overlap_s {
+    uint32_t min; /* minimum start pos of any alignment that ends in this chunk */
+    uint32_t max; /* maximum end pos of any alignment that starts before this chunk and ends in this chunk */
+};
+
+struct s_reference_info {
+    unsigned name;          /* offset of start of name in ref_names */
+    unsigned id;
+    unsigned lastOffset;
+};
+
+extern void ReferenceMgr_DumpConfig(ReferenceMgr const *const self);
+
+rc_t ReferenceInit(Reference *self, const VDBManager *mgr, VDatabase *db)
+{
+    rc_t rc;
+    size_t const cache = G.expectUnsorted ? UNSORTED_CACHE_SIZE : SORTED_CACHE_SIZE;
+    unsigned const open_count = G.expectUnsorted ? UNSORTED_OPEN_TABLE_LIMIT : SORTED_OPEN_TABLE_LIMIT;
+    
+    memset(self, 0, sizeof(*self));
+    
+    self->coverage.elem_bits = self->mismatches.elem_bits = self->indels.elem_bits = 32;
+    self->pri_align.elem_bits = self->sec_align.elem_bits = 64;
+    self->pri_overlap.elem_bits = self->sec_overlap.elem_bits = sizeof(struct overlap_s) * 8;
+    self->ref_names.elem_bits = 8;
+    self->ref_info.elem_bits = 8 * sizeof(struct s_reference_info);
+    
+    rc = ReferenceMgr_Make(&self->mgr, db, mgr, ewrefmgr_co_Coverage,
+                           G.refXRefPath, G.inpath,
+                           G.maxSeqLen, cache, open_count);
+    if (rc == 0) {
+        unsigned i;
+        
+        for (i = 0; G.refFiles[i]; ++i) {
+            rc = ReferenceMgr_FastaPath(self->mgr, G.refFiles[i]);
+            if (rc) {
+                (void)PLOGERR(klogWarn, (klogWarn, rc, "fasta file '$(file)'", "file=%s", G.refFiles[i]));
+                break;
+            }
+        }
+#if DUMP_CONFIG
+        if (rc == 0) {
+            ReferenceMgr_DumpConfig(self->mgr);
+        }
+#endif
+    }
+    return rc;
+}
+
+static
+rc_t Unsorted(Reference *self) {
+    if (G.requireSorted) {
+        rc_t const rc = RC(rcApp, rcFile, rcReading, rcConstraint, rcViolated);
+        (void)LOGERR(klogWarn, rc, "Alignments are unsorted");
+        return rc;
+    }
+    /* do not ever change this message */
+    (void)LOGMSG(klogWarn, "Alignments are unsorted");
+
+    self->out_of_order = true;
+    
+    ReferenceMgr_SetCache(self->mgr, UNSORTED_CACHE_SIZE, UNSORTED_OPEN_TABLE_LIMIT);
+    
+    KDataBufferWhack(&self->sec_align);
+    KDataBufferWhack(&self->pri_align);
+    KDataBufferWhack(&self->mismatches);
+    KDataBufferWhack(&self->indels);
+    KDataBufferWhack(&self->coverage);
+    KDataBufferWhack(&self->pri_overlap);
+    KDataBufferWhack(&self->sec_overlap);
+
+    return 0;
+}
+
+#define BAIL_ON_FAIL(STMT) do { rc_t const rc__ = (STMT); if (rc__) return rc__; } while(0)
+
+static rc_t FlushBuffers(Reference *self, unsigned upto, bool full, bool final)
+{
+    if (!self->out_of_order && upto > 0) {
+        unsigned offset = 0;
+        unsigned *const miss = (unsigned *)self->mismatches.base;
+        unsigned *const indel = (unsigned *)self->indels.base;
+        unsigned *const cov = (unsigned *)self->coverage.base;
+        struct overlap_s *const pri_overlap = (struct overlap_s *)self->pri_overlap.base;
+        struct overlap_s *const sec_overlap = (struct overlap_s *)self->sec_overlap.base;
+        unsigned chunk = 0;
+        
+        while ((self->curPos + offset + (full ? 0 : G.maxSeqLen)) <= upto) {
+            ReferenceSeqCoverage data;
+            unsigned const curPos = self->curPos + offset;
+            unsigned const n = self->endPos > (curPos + G.maxSeqLen) ?
+                               G.maxSeqLen : (self->endPos - curPos);
+            unsigned const m = curPos + n > upto ? upto - curPos : n;
+            unsigned i;
+            unsigned hi;
+            unsigned lo;
+            
+            if (n == 0) break;
+            
+            memset(&data, 0, sizeof(data));
+            
+            data.ids[ewrefcov_primary_table].elements = self->pri_align.elem_count;
+            data.ids[ewrefcov_primary_table].buffer = self->pri_align.base;
+            data.overlap_ref_pos[ewrefcov_primary_table] = pri_overlap[chunk].min;
+            data.overlap_ref_len[ewrefcov_primary_table] = pri_overlap[chunk].max ? pri_overlap[chunk].max - curPos : 0;
+            
+            data.ids[ewrefcov_secondary_table].elements = self->sec_align.elem_count;
+            data.ids[ewrefcov_secondary_table].buffer = self->sec_align.base;
+            data.overlap_ref_pos[ewrefcov_secondary_table] = sec_overlap[chunk].min;
+            data.overlap_ref_len[ewrefcov_secondary_table] = sec_overlap[chunk].max ? sec_overlap[chunk].max - curPos : 0;
+            
+            for (hi = 0, lo = UINT_MAX, i = 0; i != m; ++i) {
+                unsigned const coverage = cov[offset + i];
+                
+                if (hi < coverage)
+                    hi = coverage;
+                if (lo > coverage)
+                    lo = coverage;
+            }
+            data.low  = lo > 255 ? 255 : lo;
+            data.high = hi > 255 ? 255 : hi;
+            
+            for (i = 0; i != m; ++i)
+                data.mismatches += miss[offset + i];
+
+            for (i = 0; i != m; ++i)
+                data.indels += indel[offset + i];
+            
+            {
+                rc_t rc = ReferenceSeq_AddCoverage(self->rseq, curPos, &data);
+                
+                if (rc) {
+                    return Unsorted(self);
+                }
+            }
+            
+            KDataBufferResize(&self->pri_align, 0);
+            KDataBufferResize(&self->sec_align, 0);
+            offset += n;
+            ++chunk;
+        }
+        if (!final && offset > 0) {
+            unsigned const newChunkCount = (unsigned)self->pri_overlap.elem_count - chunk;
+            unsigned const newBaseCount = self->endPos - self->curPos - offset;
+            
+            memmove(self->pri_overlap.base, pri_overlap + chunk, newChunkCount * sizeof(pri_overlap[0]));
+            memmove(self->sec_overlap.base, sec_overlap + chunk, newChunkCount * sizeof(sec_overlap[0]));
+            memmove(self->mismatches.base, miss + offset, newBaseCount * sizeof(miss[0]));
+            memmove(self->indels.base, indel + offset, newBaseCount * sizeof(indel[0]));
+            memmove(self->coverage.base, cov + offset, newBaseCount * sizeof(cov[0]));
+
+            KDataBufferResize(&self->pri_overlap, newChunkCount);
+            KDataBufferResize(&self->sec_overlap, newChunkCount);
+            
+            self->curPos += offset;
+        }
+    }
+    return 0;
+}
+
+static int str__cmp(char const A[], char const B[])
+{
+    unsigned i;
+    
+    for (i = 0; ; ++i) {
+        int const a = A[i];
+        int const b = B[i];
+        
+        if (a != b)
+            return a - b;
+        if (a == 0)
+            return 0;
+    }
+}
+
+static int str__equal(char const A[], char const B[])
+{
+    unsigned i;
+    
+    for (i = 0; ; ++i) {
+        int const a = A[i];
+        int const b = B[i];
+        
+        if (a != b)
+            return 0;
+        if (a == 0)
+            return 1;
+    }
+}
+
+static unsigned str__len(char const A[])
+{
+    unsigned i;
+    
+    for (i = 0; ; ++i) {
+        int const a = A[i];
+        
+        if (a == 0)
+            return i;
+    }
+}
+
+static unsigned bsearch_name(char const qry[], char const names[],
+                             unsigned const count,
+                             struct s_reference_info const refInfo[],
+                             int found[])
+{
+    unsigned f = 0;
+    unsigned e = count;
+    
+    while (f < e) {
+        unsigned const m = f + ((e - f) >> 1);
+        char const *const name = &names[refInfo[m].name];
+        int const diff = str__cmp(qry, name);
+        
+        if (diff < 0)
+            e = m;
+        else if (diff > 0)
+            f = m + 1;
+        else {
+            found[0] = 1;
+            return m;
+        }
+    }
+    return f;
+}
+
+static struct s_reference_info s_reference_info_make(unsigned const name, unsigned const id)
+{
+    struct s_reference_info rslt;
+    
+    rslt.name = name;
+    rslt.id = id;
+    rslt.lastOffset = 0;
+    
+    return rslt;
+}
+
+static unsigned GetLastOffset(Reference const *const self)
+{
+    if (self->last_id < self->ref_info.elem_count) {
+        struct s_reference_info const *const refInfoBase = self->ref_info.base;
+        return refInfoBase[self->last_id].lastOffset;
+    }
+    return 0;
+}
+
+static void SetLastOffset(Reference *const self, unsigned const newValue)
+{
+    if (self->last_id < self->ref_info.elem_count) {
+        struct s_reference_info *const refInfoBase = self->ref_info.base;
+        refInfoBase[self->last_id].lastOffset = newValue;
+    }
+}
+
+rc_t ReferenceSetFile(Reference *const self, char const id[],
+                      uint64_t const length, uint8_t const md5[16],
+                      bool *const shouldUnmap,
+                      bool *const wasRenamed)
+{
+    ReferenceSeq const *rseq;
+    int found = 0;
+    unsigned at = 0;
+
+    if (self->last_id < self->ref_info.elem_count) {
+        struct s_reference_info const *const refInfoBase = self->ref_info.base;
+        struct s_reference_info const refInfo = refInfoBase[self->last_id];
+        char const *const nameBase = self->ref_names.base;
+        char const *const last = nameBase + refInfo.id;
+        
+        if (str__equal(id, last)) {
+            return 0;
+        }
+    }
+
+    BAIL_ON_FAIL(FlushBuffers(self, self->length, true, true));
+    BAIL_ON_FAIL(ReferenceMgr_GetSeq(self->mgr, &rseq, id, shouldUnmap, G.allowMultiMapping, wasRenamed));
+    
+    self->rseq = rseq;
+
+    at = bsearch_name(id, self->ref_names.base, self->ref_info.elem_count, self->ref_info.base, &found);
+    if (!found) {
+        unsigned const len = str__len(id);
+        unsigned const name_at = self->ref_names.elem_count;
+        unsigned const id_at = name_at;
+        struct s_reference_info const new_elem = s_reference_info_make(name_at, id_at);
+        rc_t const rc = KDataBufferResize(&self->ref_names, name_at + len + 1);
+        
+        if (rc)
+            return rc;
+        else {
+            unsigned const count = (unsigned)self->ref_info.elem_count;
+            rc_t const rc = KDataBufferResize(&self->ref_info, count + 1);
+            struct s_reference_info *const refInfoBase = self->ref_info.base;
+            
+            if (rc)
+                return rc;
+            
+            memmove(((char *)self->ref_names.base) + name_at, id, len + 1);
+            memmove(refInfoBase + at + 1, refInfoBase + at, (count - at) * sizeof(*refInfoBase));
+            refInfoBase[at] = new_elem;
+        }
+        (void)PLOGMSG(klogInfo, (klogInfo, "Processing Reference '$(id)'", "id=%s", id));
+        if (*wasRenamed) {
+            char const *actid = NULL;
+            ReferenceSeq_GetID(rseq, &actid);
+            (void)PLOGMSG(klogInfo, (klogInfo, "Reference '$(id)' was renamed to '$(actid)'", "id=%s,actid=%s", id, actid));
+        }
+    }
+    else if (!self->out_of_order)
+        Unsorted(self);
+        
+    self->last_id = at;
+    self->curPos = self->endPos = 0;
+    self->length = (unsigned)length;
+    KDataBufferResize(&self->pri_overlap, 0);
+    KDataBufferResize(&self->sec_overlap, 0);
+
+    return 0;
+}
+
+rc_t ReferenceVerify(Reference const *const self,
+                     char const id[],
+                     uint64_t const length,
+                     uint8_t const md5[16])
+{
+    bool wasRenamed = false;
+    return ReferenceMgr_Verify(self->mgr, id, (unsigned)length, md5, G.allowMultiMapping, &wasRenamed);
+}
+
+rc_t ReferenceGet1stRow(Reference const *self, int64_t *refID, char const refName[])
+{
+    ReferenceSeq const *rseq;
+    bool shouldUnmap = false;
+    bool wasRenamed = false;
+    rc_t rc = ReferenceMgr_GetSeq(self->mgr, &rseq, refName, &shouldUnmap, G.allowMultiMapping, &wasRenamed);
+
+    if( rc == 0 ) {
+        rc = ReferenceSeq_Get1stRow(rseq, refID);
+        ReferenceSeq_Release(rseq);
+    }
+    return rc;
+}
+
+static
+rc_t ReferenceAddCoverage(Reference *const self,
+                          unsigned const refStart,
+                          unsigned const refLength,
+                          uint32_t const mismatches,
+                          uint32_t const indels,
+                          bool const isPrimary
+                          )
+{
+    unsigned const refEnd = refStart + refLength;
+
+    if (refEnd > self->endPos || self->endPos == 0) {
+        unsigned const t1 = refEnd + (G.maxSeqLen - 1);
+        unsigned const adjust = t1 % G.maxSeqLen;
+        unsigned const t2 = t1 - adjust;
+        unsigned const newEndPos = t2 != 0 ? t2 : G.maxSeqLen;
+        unsigned const baseCount = self->endPos - self->curPos;
+        unsigned const newBaseCount = newEndPos - self->curPos;
+
+        BAIL_ON_FAIL(KDataBufferResize(&self->coverage, newBaseCount));
+        BAIL_ON_FAIL(KDataBufferResize(&self->mismatches, newBaseCount));
+        BAIL_ON_FAIL(KDataBufferResize(&self->indels, newBaseCount));
+        
+        memset(&((unsigned *)self->coverage.base)[baseCount], 0, (newBaseCount - baseCount) * sizeof(unsigned));
+        memset(&((unsigned *)self->mismatches.base)[baseCount], 0, (newBaseCount - baseCount) * sizeof(unsigned));
+        memset(&((unsigned *)self->indels.base)[baseCount], 0, (newBaseCount - baseCount) * sizeof(unsigned));
+        self->endPos = newEndPos;
+    }
+    if ((refEnd - self->curPos) / G.maxSeqLen >= self->pri_overlap.elem_count) {
+        unsigned const chunks = (refEnd - self->curPos) / G.maxSeqLen + 1;
+        unsigned const end = (unsigned)self->pri_overlap.elem_count;
+        
+        BAIL_ON_FAIL(KDataBufferResize(&self->pri_overlap, chunks));
+        BAIL_ON_FAIL(KDataBufferResize(&self->sec_overlap, chunks));
+        
+        memset(&((struct overlap_s *)self->pri_overlap.base)[end], 0, (chunks - end) * sizeof(struct overlap_s));
+        memset(&((struct overlap_s *)self->sec_overlap.base)[end], 0, (chunks - end) * sizeof(struct overlap_s));
+    }
+    BAIL_ON_FAIL(FlushBuffers(self, refStart, false, false));
+    if (!self->out_of_order) {
+        unsigned const startBase = refStart - self->curPos;
+        unsigned const endChunk = (startBase + refLength) / G.maxSeqLen;
+        KDataBuffer *const overlapBuffer = isPrimary ? &self->pri_overlap : &self->sec_overlap;
+        unsigned *const cov = &((unsigned *)self->coverage.base)[startBase];
+        unsigned i;
+        
+        ((unsigned *)self->mismatches.base)[startBase] += mismatches;
+        ((unsigned *)self->indels.base)[startBase] += indels;
+        
+        if (((struct overlap_s *)overlapBuffer->base)[endChunk].min == 0 || 
+            ((struct overlap_s *)overlapBuffer->base)[endChunk].min > refStart)
+        {
+            ((struct overlap_s *)overlapBuffer->base)[endChunk].min = refStart;
+        }
+        if (endChunk != 0 &&
+            ((struct overlap_s *)overlapBuffer->base)[endChunk].max < refStart + refLength)
+        {
+            ((struct overlap_s *)overlapBuffer->base)[endChunk].max = refStart + refLength;
+        }
+        
+        for (i = 0; i != refLength; ++i) {
+            if (cov[i] < UINT_MAX)
+                ++cov[i];
+        }
+    }
+    return 0;
+}
+
+static void GetCounts(AlignmentRecord const *data, unsigned const seqLen,
+                      unsigned *const nMatch,
+                      unsigned *const nMiss,
+                      unsigned *const nIndels)
+{
+    bool const *const has_mismatch = data->data.has_mismatch.buffer;
+    bool const *const has_offset = data->data.has_ref_offset.buffer;
+    int32_t const *const ref_offset = data->data.ref_offset.buffer;
+    uint8_t const *const ref_offset_type = data->data.ref_offset_type.buffer;
+    unsigned misses = 0;
+    unsigned matchs = 0;
+    unsigned insert = 0;
+    unsigned delete = 0;
+    unsigned j = 0;
+    unsigned i;
+    
+    for (i = 0; i < seqLen; ) {
+        if (has_offset[i]) {
+            int const offs = ref_offset[j];
+            int const type = ref_offset_type[j];
+            
+            ++j;
+            if (type == 0) {
+                if (offs < 0)
+                    ++insert;
+                else
+                    ++delete;
+            }
+            if (offs < 0) {
+                i += (unsigned)(-offs);
+                continue;
+            }
+        }
+        if (has_mismatch[i])
+            ++misses;
+        else
+            ++matchs;
+        ++i;
+    }
+    *nMatch = matchs;
+    *nMiss  = misses;
+    *nIndels = insert + delete;
+}
+
+rc_t ReferenceRead(Reference *self, AlignmentRecord *data, uint64_t const pos,
+                   uint32_t const rawCigar[], uint32_t const cigCount,
+                   char const seqDNA[], uint32_t const seqLen,
+                   uint8_t rna_orient, uint32_t *matches, uint32_t *misses)
+{
+    unsigned nmis = 0;
+    unsigned nmatch = 0;
+    unsigned indels = 0;
+       
+    *matches = 0;
+    BAIL_ON_FAIL(ReferenceSeq_Compress(self->rseq,
+                                       (G.acceptHardClip ? ewrefmgr_co_AcceptHardClip : 0) + ewrefmgr_cmp_Binary,
+                                       (INSDC_coord_len)pos,
+                                       seqDNA, seqLen,
+                                       rawCigar, cigCount,
+                                       0, NULL, 0, 0, NULL, 0,
+                                       rna_orient,
+                                       &data->data));
+
+    GetCounts(data, seqLen, &nmatch, &nmis, &indels);
+    *matches = nmatch;
+	*misses  = nmis;
+/* removed before more comlete implementation - EY 
+    if (!G.acceptNoMatch && data->data.ref_len == 0)
+        return RC(rcApp, rcFile, rcReading, rcConstraint, rcViolated);
+***********************/
+    
+    if (!self->out_of_order && pos < GetLastOffset(self)) {
+        return Unsorted(self);
+    }
+    if (!self->out_of_order) {
+        SetLastOffset(self, data->data.effective_offset);
+        
+        /* if (G.acceptNoMatch || nmatch >= G.minMatchCount)    --- removed before more comlete implementation - EY ***/
+            return ReferenceAddCoverage(self, data->data.effective_offset,
+                                        data->data.ref_len, nmis, indels,
+                                        data->isPrimary);
+       /* else return RC(rcApp, rcFile, rcReading, rcConstraint, rcViolated); --- removed before more comlete implementation - EY ***/
+    }
+    return 0;
+}
+
+rc_t ReferenceGetSequence(Reference *self, char *rslt, unsigned position, unsigned nCIGAR, unsigned *CIGAR)
+{
+    return ReferenceSeq_Read(self->rseq, rslt, position, nCIGAR, CIGAR);
+}
+
+static rc_t IdVecAppend(KDataBuffer *vec, uint64_t id)
+{
+    uint64_t const end = vec->elem_count;
+    
+    BAIL_ON_FAIL(KDataBufferResize(vec, end + 1));
+    ((uint64_t *)vec->base)[end] = id;
+    return 0;
+}
+
+rc_t ReferenceAddAlignId(Reference *self,
+                         int64_t align_id,
+                         bool is_primary
+                         )
+{
+    if (self->out_of_order)
+        return 0;
+    return IdVecAppend(is_primary ? &self->pri_align : &self->sec_align, align_id);
+}
+
+rc_t ReferenceWhack(Reference *self, bool commit)
+{
+    rc_t rc = 0;
+    
+    if (self) {
+#if DUMP_CONFIG
+        if (self->mgr)
+            ReferenceMgr_DumpConfig(self->mgr);
+#endif
+        if (commit) {
+            rc = FlushBuffers(self, self->length, true, true);
+            if (rc != 0)
+                commit = false;
+        }
+        KDataBufferWhack(&self->sec_align);
+        KDataBufferWhack(&self->pri_align);
+        KDataBufferWhack(&self->mismatches);
+        KDataBufferWhack(&self->indels);
+        KDataBufferWhack(&self->coverage);
+        KDataBufferWhack(&self->pri_overlap);
+        KDataBufferWhack(&self->sec_overlap);
+        KDataBufferWhack(&self->ref_names);
+        KDataBufferWhack(&self->ref_info);
+        if (self->rseq)
+            rc = ReferenceSeq_Release(self->rseq);
+        if (self->out_of_order) {
+            (void)LOGMSG(klogInfo, "Starting coverage calculation");
+            rc = ReferenceMgr_Release(self->mgr, commit, NULL, true, Quitting);
+        }
+        else {
+            rc = ReferenceMgr_Release(self->mgr, commit, NULL, false, Quitting);
+        }
+    }
+    return rc;
+}
diff --git a/tools/bam-loader/reference-writer.h b/tools/bam-loader/reference-writer.h
new file mode 100644
index 0000000..1c798f5
--- /dev/null
+++ b/tools/bam-loader/reference-writer.h
@@ -0,0 +1,78 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef BAM_LOAD_REFERENCE_WRITER_H_
+#define BAM_LOAD_REFERENCE_WRITER_H_ 1
+
+#include <vdb/manager.h>
+#include <vdb/database.h>
+#include <klib/data-buffer.h>
+
+#include <align/writer-reference.h>
+#include "alignment-writer.h"
+
+typedef struct s_reference {
+    const ReferenceMgr *mgr;
+    const ReferenceSeq *rseq;
+    int64_t lastRefId;
+    unsigned curPos;
+    unsigned endPos;
+    unsigned length;
+    unsigned last_id;            /* == ref_info.elem_count if no last id */
+
+    KDataBuffer coverage;
+    KDataBuffer mismatches;
+    KDataBuffer indels;
+    KDataBuffer pri_align;
+    KDataBuffer sec_align;
+    KDataBuffer pri_overlap;
+    KDataBuffer sec_overlap;
+    KDataBuffer ref_names;
+    KDataBuffer ref_info;
+
+    bool out_of_order;
+} Reference;
+
+rc_t ReferenceInit(Reference *self, const VDBManager *mgr, VDatabase *db);
+rc_t ReferenceSetFile(Reference *self, char const id[],
+                      uint64_t length, uint8_t const md5[16],
+                      bool *shouldUnmap,
+                      bool *wasRenamed);
+rc_t ReferenceVerify(Reference const *self, char const id[], uint64_t length, uint8_t const md5[16]);
+rc_t ReferenceGet1stRow(Reference const *self, int64_t *refID, char const refName[]);
+rc_t ReferenceAddAlignId(Reference *self,
+                         int64_t align_id,
+                         bool is_primary
+                         );
+rc_t ReferenceRead(Reference *self, AlignmentRecord *data, uint64_t pos,
+                   uint32_t const rawCigar[], uint32_t cigCount,
+                   char const seqDNA[], uint32_t seqLen,
+                   uint8_t rna_orient, uint32_t *matches, uint32_t *misses);
+rc_t ReferenceWhack(Reference *self, bool commit);
+
+rc_t ReferenceGetSequence(Reference *self, char *rslt, unsigned position, unsigned nCIGAR, unsigned *CIGAR);
+
+#endif
diff --git a/tools/bam-loader/samview.c b/tools/bam-loader/samview.c
new file mode 100644
index 0000000..44fed67
--- /dev/null
+++ b/tools/bam-loader/samview.c
@@ -0,0 +1,104 @@
+/* ===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <kapp/args.h>
+#include <kapp/main.h>
+#include <klib/log.h>
+#include <kfs/file.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "bam.h"
+
+#include <klib/rc.h>
+
+static void writeHeader(BAM_File const *const bam)
+{
+    char const *header = NULL;
+    size_t hsize = 0;
+
+    BAM_FileGetHeaderText(bam, &header, &hsize);
+    fwrite(header, 1, hsize, stdout);
+}
+
+static rc_t writeSAM(BAM_Alignment const *const rec)
+{
+    static char buffer[64*1024];
+    size_t actsize = 0;
+    rc_t const rc = BAM_AlignmentFormatSAM(rec, &actsize, sizeof(buffer), buffer);
+
+    if (rc == 0)
+        fwrite(buffer, 1, actsize, stdout);
+
+    return rc;
+}
+
+static
+void samview(char const path[])
+{
+    BAM_File const *bam = NULL;
+    rc_t rc = BAM_FileMake(&bam, NULL, NULL, path);
+
+    if (rc == 0) {
+        BAM_Alignment const *rec = NULL;
+
+        writeHeader(bam);
+        while ((rc = BAM_FileRead2(bam, &rec)) == 0) {
+            rc_t const rc2 = writeSAM(rec);
+            BAM_AlignmentRelease(rec);
+            if (rc2)
+                break;
+        }
+        BAM_FileRelease(bam);
+        if (GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound)
+            rc = 0;
+    }
+    if (rc)
+        LOGERR(klogWarn, rc, "Final RC");
+}
+
+rc_t CC UsageSummary(char const *name)
+{
+    return 0;
+}
+
+rc_t CC Usage(Args const *args)
+{
+    return 0;
+}
+
+rc_t CC KMain(int argc, char *argv[])
+{
+    if (argc == 1) {
+        samview("/dev/stdin");
+        return 0;
+    }
+    while (--argc) {
+        samview(*++argv);
+    }
+    return 0;
+}
diff --git a/tools/bam-loader/sequence-writer.c b/tools/bam-loader/sequence-writer.c
new file mode 100644
index 0000000..7c45292
--- /dev/null
+++ b/tools/bam-loader/sequence-writer.c
@@ -0,0 +1,497 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include <vdb/database.h>
+#include <vdb/vdb-priv.h>
+
+#include <kdb/manager.h>
+
+#include <insdc/sra.h>
+#include <insdc/insdc.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <assert.h>
+#include <ctype.h>
+
+#include "Globals.h"
+#include <align/writer-sequence.h>
+#include "sequence-writer.h"
+
+/* MARK: Sequence Object */
+
+Sequence *SequenceInit(Sequence *self, VDatabase *db) {
+    memset(self, 0, sizeof(*self));
+    self->db = db;
+    VDatabaseAddRef(db);
+    return self;
+}
+
+static rc_t getTable(Sequence *self, bool color)
+{
+    int const options = (color ? ewseq_co_ColorSpace : 0)
+                      | (G.hasTI ? ewseq_co_TI : 0)
+                      | (G.globalMode == mode_Remap ? (ewseq_co_SaveRead | ewseq_co_KeepKey) : 0)
+                      | ewseq_co_NoLabelData
+                      | ewseq_co_SpotGroup;
+
+    if (self->tbl) return 0;
+
+    return TableWriterSeq_Make(&self->tbl, self->db,
+                               options,
+                               G.QualQuantizer);
+}
+
+static rc_t writeRecordX(Sequence *self,
+                         SequenceRecord const *rec,
+                         bool color,
+                         bool isDup,
+                         INSDC_SRA_platform_id platform
+                         )
+{
+    rc_t rc = 0;
+    uint8_t nreads = rec->numreads;
+    unsigned i;
+    unsigned seqLen;
+    int64_t dummyRowId;
+
+    uint8_t readInfo[4096];
+    void *h_readInfo = NULL;
+
+    INSDC_coord_zero *readStart = (void *)readInfo;
+    INSDC_coord_len *readLen;
+    uint8_t *alcnt;
+    INSDC_SRA_xread_type *readType;
+    INSDC_SRA_read_filter *readFilter;
+    bool *mask = NULL;
+    size_t const elemSize = sizeof(alcnt[0]) + sizeof(readType[0])
+                          + sizeof(readStart[0]) + sizeof(readLen[0])
+                          + sizeof(readFilter[0]);
+
+    TableWriterSeqData data;
+
+    assert(G.mode == mode_Archive);
+
+    for (i = seqLen = 0; i != nreads; ++i) {
+        seqLen += rec->readLen[i];
+    }
+
+    if (nreads * elemSize + G.keepMismatchQual * seqLen * sizeof(mask[0]) > sizeof(readInfo))
+    {
+        h_readInfo = malloc(nreads * elemSize + G.keepMismatchQual * seqLen * sizeof(mask[0]));
+        if (h_readInfo == NULL)
+            return RC(rcAlign, rcTable, rcWriting, rcMemory, rcExhausted);
+        readStart = h_readInfo;
+    }
+    readLen = (INSDC_coord_len *)&readStart[nreads];
+    alcnt = (uint8_t *)&readLen[nreads];
+    readType = (INSDC_SRA_xread_type *)&alcnt[nreads];
+    readFilter = (INSDC_SRA_read_filter *)&readType[nreads];
+
+    if (G.keepMismatchQual) {
+        mask = (bool *)&readFilter[nreads];
+
+        for (i = 0; i != seqLen; ++i) {
+            mask[i] = (rec->qual[i] & 0x80) != 0;
+        }
+    }
+
+    for (i = 0; i != nreads; ++i) {
+        int const count = rec->aligned[i] ? 1 : 0;
+        int const len = rec->readLen[i];
+        int const start = rec->readStart[i];
+        int const type = len == 0 ? SRA_READ_TYPE_TECHNICAL : SRA_READ_TYPE_BIOLOGICAL;
+        int const dir = len == 0 ? 0 : rec->orientation[i] ? SRA_READ_TYPE_REVERSE : SRA_READ_TYPE_FORWARD;
+        int const filter = isDup ? SRA_READ_FILTER_CRITERIA : rec->is_bad[i] ? SRA_READ_FILTER_REJECT : SRA_READ_FILTER_PASS;
+
+        alcnt[i] = count;
+        readLen[i] = len;
+        readStart[i] = start;
+        readType[i] = type | dir;
+        readFilter[i] = filter;
+    }
+
+    memset(&data, 0, sizeof(data));
+
+    data.sequence.buffer = rec->seq;
+    data.sequence.elements = seqLen;
+
+    data.quality.buffer = rec->qual;
+    data.quality.elements = seqLen;
+
+    if (G.keepMismatchQual) {
+        data.no_quantize_mask.buffer = mask;
+        data.no_quantize_mask.elements = seqLen;
+    }
+
+    data.alignment_count.buffer = alcnt;
+    data.alignment_count.elements = nreads;
+
+    data.nreads = nreads;
+
+    data.read_type.buffer = readType;
+    data.read_type.elements = nreads;
+
+    data.read_start.buffer = readStart;
+    data.read_start.elements = nreads;
+
+    data.read_len.buffer = readLen;
+    data.read_len.elements = nreads;
+
+    data.tmp_key_id = rec->keyId;
+
+    data.spot_group.buffer = rec->spotGroup;
+    data.spot_group.elements = rec->spotGroupLen;
+
+    data.cskey.buffer = rec->cskey;
+    data.cskey.elements = nreads;
+
+    data.read_filter.buffer = readFilter;
+    data.read_filter.elements = nreads;
+
+    data.platform.buffer = &platform;
+    data.platform.elements = 1;
+
+    data.ti.buffer = rec->ti;
+    data.ti.elements = nreads;
+
+    if (!G.no_real_output) {
+        rc = getTable(self, color);
+        if (rc == 0) {
+            rc = TableWriterSeq_Write(self->tbl, &data, &dummyRowId);
+        }
+    }
+
+    if (h_readInfo)
+        free(h_readInfo);
+
+    return rc;
+}
+
+static unsigned totalSequenceLength(SequenceRecord const *const rec)
+{
+    unsigned const nreads = rec->numreads;
+    unsigned rslt = 0;
+    unsigned i;
+
+    for (i = 0; i < nreads; ++i)
+        rslt += rec->readLen[i];
+
+    return rslt;
+}
+
+static rc_t writeRecord2(Sequence *self,
+                         SequenceRecord const *rec,
+                         bool color,
+                         bool isDup,
+                         INSDC_SRA_platform_id platform
+                         )
+{
+    INSDC_SRA_xread_type readType[2];
+    INSDC_SRA_read_filter readFilter[2];
+    uint8_t alcnt[2];
+
+    rc_t rc = 0;
+    unsigned const nreads = rec->numreads;
+    unsigned const seqLen = totalSequenceLength(rec);
+    unsigned i;
+    bool fullyUnaligned = true;
+
+    TableWriterSeqData data;
+
+    assert(G.mode == mode_Archive);
+
+    for (i = 0; i != nreads; ++i) {
+        int const count = rec->aligned[i] ? 1 : 0;
+        int const len = rec->readLen[i];
+        int const type = len == 0 ? SRA_READ_TYPE_TECHNICAL : SRA_READ_TYPE_BIOLOGICAL;
+        int const dir = len == 0 ? 0 : rec->orientation[i] ? SRA_READ_TYPE_REVERSE : SRA_READ_TYPE_FORWARD;
+        int const filter = isDup ? SRA_READ_FILTER_CRITERIA : rec->is_bad[i] ? SRA_READ_FILTER_REJECT : SRA_READ_FILTER_PASS;
+
+        if (rec->aligned[i])
+            fullyUnaligned = false;
+        alcnt[i] = count;
+        readType[i] = type | dir;
+        readFilter[i] = filter;
+    }
+
+    memset(&data, 0, sizeof(data));
+
+    data.sequence.buffer = rec->seq;
+    data.sequence.elements = seqLen;
+
+    data.quality.buffer = rec->qual;
+    data.quality.elements = seqLen;
+
+    data.alignment_count.buffer = alcnt;
+    data.alignment_count.elements = nreads;
+
+    data.nreads = nreads;
+
+    data.read_type.buffer = readType;
+    data.read_type.elements = nreads;
+
+    data.read_start.buffer = rec->readStart;
+    data.read_start.elements = nreads;
+
+    data.read_len.buffer = rec->readLen;
+    data.read_len.elements = nreads;
+
+    data.tmp_key_id = rec->keyId;
+
+    data.spot_group.buffer = rec->spotGroup;
+    data.spot_group.elements = rec->spotGroupLen;
+
+    data.cskey.buffer = rec->cskey;
+    data.cskey.elements = nreads;
+
+    data.read_filter.buffer = readFilter;
+    data.read_filter.elements = nreads;
+
+    data.platform.buffer = &platform;
+    data.platform.elements = 1;
+
+    data.ti.buffer = rec->ti;
+    data.ti.elements = nreads;
+
+    if (fullyUnaligned && rec->linkageGroup && rec->linkageGroupLen > 0) {
+        data.linkageGroup.buffer = rec->linkageGroup;
+        data.linkageGroup.elements = rec->linkageGroupLen;
+    }
+    if (!G.no_real_output) {
+        rc = getTable(self, color);
+        if (rc == 0) {
+            int64_t dummyRowId;
+            rc = TableWriterSeq_Write(self->tbl, &data, &dummyRowId);
+        }
+    }
+
+    return rc;
+}
+
+rc_t SequenceWriteRecord(Sequence *self,
+                         SequenceRecord const *rec,
+                         bool color,
+                         bool isDup,
+                         INSDC_SRA_platform_id platform
+                         )
+{
+    if (rec->numreads <= 2 && !G.keepMismatchQual) {
+        return writeRecord2(self, rec, color, isDup, platform);
+    }
+    else {
+        return writeRecordX(self, rec, color, isDup, platform);
+    }
+}
+
+static rc_t ReadSequenceData(TableWriterSeqData *const data, VCursor const *const curs, int64_t const row, uint32_t const colId[])
+{
+    int i;
+    
+    memset(data, 0, sizeof(*data));
+    
+    for (i = 0; i <= 8; ++i) {
+        uint32_t elem_bits = 0;
+        uint32_t row_len = 0;
+        uint32_t boff = 0;
+        void const *base = NULL;
+        rc_t const rc = VCursorCellDataDirect(curs, row, colId[i], &elem_bits, &base, &boff, &row_len);
+        if (rc == 0) {
+            TableWriterData *tdata = NULL;
+            
+            switch (i) {
+                case 0:
+                    assert(elem_bits == sizeof(data->tmp_key_id) * 8);
+                    assert(row_len == 1);
+                    memcpy(&data->tmp_key_id, base, sizeof(data->tmp_key_id));
+                    break;
+                case 1:
+                    tdata = &data->sequence;
+                    break;
+                case 2:
+                    tdata = &data->quality;
+                    break;
+                case 3:
+                    tdata = &data->read_type;
+                    break;
+                case 4:
+                    tdata = &data->read_start;
+                    break;
+                case 5:
+                    tdata = &data->read_len;
+                    break;
+                case 6:
+                    tdata = &data->spot_group;
+                    break;
+                case 7:
+                    tdata = &data->read_filter;
+                    break;
+                case 8:
+                    tdata = &data->platform;
+                    break;
+                default:
+                    assert(!"reachable");
+                    break;
+            }
+            if (tdata) {
+                tdata->buffer = base;
+                tdata->elements = row_len;
+            }
+        }
+        else
+            return rc;
+    }
+    return 0;
+}
+
+rc_t SequenceDoneWriting(Sequence *self)
+{
+    if (G.mode == mode_Remap) {
+        /* copy the SEQUENCE table from the first output */
+        VDBManager *mgr = NULL;
+        rc_t rc;
+        
+        getTable(self, false);
+
+        rc = VDatabaseOpenManagerUpdate(self->db, &mgr);
+        assert(rc == 0);
+        
+        if (rc == 0) {
+            VDatabase const *db = NULL;
+            
+            rc = VDBManagerOpenDBRead(mgr, &db, NULL, G.firstOut);
+            assert(rc == 0);
+            
+            VDBManagerRelease(mgr);
+            if (rc == 0) {
+                VTable const *tbl = NULL;
+                
+                rc = VDatabaseOpenTableRead(db, &tbl, "SEQUENCE");
+                assert(rc == 0);
+                VDatabaseRelease(db);
+                if (rc == 0) {
+                    VCursor const *curs = NULL;
+                    rc = VTableCreateCursorRead(tbl, &curs);
+                    assert(rc == 0);
+                    VTableRelease(tbl);
+                    if (rc == 0) {
+                        uint32_t colId[9];
+                        
+                        rc = VCursorAddColumn(curs, &colId[0], "TMP_KEY_ID");
+                        assert(rc == 0);
+                        rc = VCursorAddColumn(curs, &colId[1], "(INSDC:dna:text)READ");
+                        assert(rc == 0);
+                        rc = VCursorAddColumn(curs, &colId[2], "QUALITY");
+                        assert(rc == 0);
+                        rc = VCursorAddColumn(curs, &colId[3], "READ_TYPE");
+                        assert(rc == 0);
+                        rc = VCursorAddColumn(curs, &colId[4], "READ_START");
+                        assert(rc == 0);
+                        rc = VCursorAddColumn(curs, &colId[5], "READ_LEN");
+                        assert(rc == 0);
+                        rc = VCursorAddColumn(curs, &colId[6], "SPOT_GROUP");
+                        assert(rc == 0);
+                        rc = VCursorAddColumn(curs, &colId[7], "READ_FILTER");
+                        assert(rc == 0);
+                        rc = VCursorAddColumn(curs, &colId[8], "PLATFORM");
+                        assert(rc == 0);
+                        if (rc == 0) {
+                            rc = VCursorOpen(curs);
+                            assert(rc == 0);
+                            if (rc == 0) {
+                                int64_t first;
+                                uint64_t count;
+                                uint64_t row;
+                                TableWriterSeqData data;
+                                
+                                rc = VCursorIdRange(curs, colId[0], &first, &count);
+                                assert(rc == 0);
+                                for (row = 0; row < count; ++row) {
+                                    int64_t dummyRowId = 0;
+                                    
+                                    rc = ReadSequenceData(&data, curs, row+first, colId);
+                                    assert(rc == 0);
+                                    if (rc) return rc;
+
+                                    data.nreads = data.read_start.elements;
+
+                                    rc = TableWriterSeq_Write(self->tbl, &data, &dummyRowId);
+                                    assert(rc == 0);
+                                    if (rc) return rc;
+                                }
+                            }
+                        }
+                        VCursorRelease(curs);
+                    }
+                }
+            }
+        }
+    }
+    return TableWriterSeq_TmpKeyStart(self->tbl);
+}
+
+rc_t SequenceReadKey(const Sequence *cself, int64_t row, uint64_t *keyId)
+{
+    return TableWriterSeq_TmpKey(cself->tbl, row, keyId);
+}
+
+rc_t SequenceUpdateAlignData(Sequence *self, int64_t rowId, unsigned nreads,
+                             int64_t const primeId[/* nreads */],
+                             uint8_t const algnCnt[/* nreads */])
+{
+    TableWriterData data[2];
+    
+    data[0].buffer = primeId; data[0].elements = nreads;
+    data[1].buffer = algnCnt; data[1].elements = nreads;
+
+    return TableWriterSeq_WriteAlignmentData(self->tbl, rowId, &data[0], &data[1]);
+}
+
+void SequenceWhack(Sequence *self, bool commit) {
+    uint64_t dummyRows;
+    
+    if (self->tbl == NULL)
+        return;
+    
+    (void)TableWriterSeq_Whack(self->tbl, commit, &dummyRows);
+    if (G.mode == mode_Remap) {
+        /* This only happens for the second and subsequent loads.
+         * Cleaning up the first load is handled by the bam-load itself
+         * when everything is done.
+         */
+        VTable *tbl = NULL;
+        rc_t rc = VDatabaseOpenTableUpdate(self->db, &tbl, "SEQUENCE");
+        assert(rc == 0);
+        VTableDropColumn(tbl, "TMP_KEY_ID");
+        VTableDropColumn(tbl, "READ");
+        VTableRelease(tbl);
+    }
+    VDatabaseRelease(self->db);
+}
diff --git a/tools/bam-loader/sequence-writer.h b/tools/bam-loader/sequence-writer.h
new file mode 100644
index 0000000..a847db8
--- /dev/null
+++ b/tools/bam-loader/sequence-writer.h
@@ -0,0 +1,89 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef BAM_LOAD_SEQUENCE_WRITER_H_
+#define BAM_LOAD_SEQUENCE_WRITER_H_ 1
+
+#include <vdb/manager.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+
+#include <klib/text.h>
+#include <klib/data-buffer.h>
+
+struct TableWriterSeq;
+
+typedef struct s_sequence_record {
+    char *seq;
+    uint8_t *qual;
+    uint32_t *readStart;
+    uint32_t *readLen;
+    uint8_t *orientation;
+    uint8_t *is_bad;
+    uint8_t *alignmentCount;
+    char const *spotGroup;
+    char const *linkageGroup;
+    bool *aligned;
+    char *cskey;
+    uint64_t *ti;
+    uint64_t keyId;
+    unsigned spotGroupLen;
+    unsigned linkageGroupLen;
+    unsigned numreads;
+} SequenceRecord;
+
+typedef struct s_sequence_record_storage {
+    uint64_t ti[2];
+    uint32_t readStart[2];
+    uint32_t readLen[2];
+    uint8_t orientation[2];
+    uint8_t is_bad[2];
+    uint8_t alignmentCount[2];
+    bool aligned[2];
+    char cskey[2];
+} SequenceRecordStorage;
+
+typedef struct s_sequence {
+    VDatabase *db;
+    struct TableWriterSeq const *tbl;
+} Sequence;
+
+Sequence *SequenceInit(Sequence *self, VDatabase *db);
+
+rc_t SequenceWriteRecord(Sequence *self, SequenceRecord const *rec,
+                         bool color, bool isDup, INSDC_SRA_platform_id platform);
+
+rc_t SequenceDoneWriting(Sequence *self);
+rc_t SequenceReadKey(const Sequence *self, int64_t row, uint64_t *key);
+rc_t SequenceUpdateAlignData(Sequence *self, int64_t row, unsigned nreads,
+                             const int64_t primeId[/* nreads */],
+                             const uint8_t alignCount[/* nreads */]);
+
+void SequenceWhack(Sequence *self, bool commit);
+
+
+#endif /* ndef BAM_LOAD_SEQUENCE_WRITER_H_ */
diff --git a/tools/cache-mgr/Makefile b/tools/cache-mgr/Makefile
new file mode 100644
index 0000000..1a0d8dd
--- /dev/null
+++ b/tools/cache-mgr/Makefile
@@ -0,0 +1,76 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/cache-mgr
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+	cache-mgr
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# cache-mgr
+#
+TOOL_SRC = \
+	cache-mgr
+
+TOOL_OBJ = \
+	$(addsuffix .$(OBJX),$(TOOL_SRC))
+
+TOOL_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lm
+
+$(BINDIR)/cache-mgr: $(TOOL_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(TOOL_LIB)
+
diff --git a/tools/cache-mgr/cache-mgr.c b/tools/cache-mgr/cache-mgr.c
new file mode 100644
index 0000000..7d33977
--- /dev/null
+++ b/tools/cache-mgr/cache-mgr.c
@@ -0,0 +1,1415 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+
+#include <klib/container.h>
+#include <klib/vector.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/debug.h>
+#include <klib/status.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <klib/rc.h>
+#include <klib/namelist.h>
+
+#include <kfg/config.h>
+#include <kfg/repository.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/cacheteefile.h>
+#include <kfs/defs.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+#include <strtol.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+static const char * report_usage[]  = { "report objects in cache", NULL };
+static const char * rreport_usage[] = { "report status of repositories", NULL };
+static const char * unlock_usage[]  = { "remove lock-files", NULL };
+static const char * clear_usage[]   = { "clear cache", NULL };
+static const char * enable_usage[]  = { "enable repository [user/site/rem]", NULL };
+static const char * disable_usage[] = { "disable repository [user/site/rem]", NULL };
+static const char * detail_usage[]  = { "show detailed report", NULL };
+static const char * tstzero_usage[] = { "test for zero blocks (for report function)", NULL };
+static const char * urname_usage[]  = { "restrict to this user-repository", NULL };
+static const char * max_rem_usage[] = { "remove until reached that many bytes", NULL };
+static const char * rem_dir_usage[] = { "remove directories, not only files", NULL };
+
+#define OPTION_CREPORT  "report"
+#define ALIAS_CREPORT   "r"
+
+#define OPTION_UNLOCK   "unlock"
+#define ALIAS_UNLOCK    "u"
+
+#define OPTION_CLEAR    "clear"
+#define ALIAS_CLEAR     "c"
+
+#define OPTION_ENABLE   "enable"
+#define ALIAS_ENABLE    "e"
+
+#define OPTION_DISABLE  "disable"
+#define ALIAS_DISABLE   "d"
+
+#define OPTION_RREPORT  "rep-report"
+#define ALIAS_RREPORT   "o"
+
+#define OPTION_DETAIL   "details"
+#define ALIAS_DETAIL    "t"
+
+#define OPTION_URNAME   "user-repo-name"
+#define ALIAS_URNAME    "p"
+
+#define OPTION_MAXREM   "max-remove"
+#define ALIAS_MAXREM    "m"
+
+#define OPTION_REMDIR   "remove-dirs"
+#define ALIAS_REMDIR    "i"
+
+#define OPTION_TSTZERO  "test-zero"
+#define ALIAS_TSTZERO   "z"
+
+OptDef ToolOptions[] =
+{
+    { OPTION_CREPORT,   ALIAS_CREPORT,  NULL,   report_usage,   1,  false,  false },
+    { OPTION_RREPORT,   ALIAS_RREPORT,  NULL,   rreport_usage,  1,  false,  false },
+    { OPTION_DETAIL,    ALIAS_DETAIL,   NULL,   detail_usage,   1,  false,  false },
+    { OPTION_TSTZERO,   ALIAS_TSTZERO,  NULL,   tstzero_usage,  1,  false,  false },    
+    { OPTION_UNLOCK,    ALIAS_UNLOCK,   NULL,   unlock_usage,   1,  false,  false },
+    { OPTION_CLEAR,     ALIAS_CLEAR,    NULL,   clear_usage,    1,  false,  false },
+    { OPTION_MAXREM,    ALIAS_MAXREM,   NULL,   max_rem_usage,  1,  true,   false },
+    { OPTION_REMDIR,    ALIAS_REMDIR,   NULL,   rem_dir_usage,  1,  false,  false },
+    { OPTION_ENABLE,    ALIAS_ENABLE,   NULL,   enable_usage,   1,  true,   false },
+    { OPTION_DISABLE,   ALIAS_DISABLE,  NULL,   disable_usage,  1,  true,   false },
+    { OPTION_URNAME,    ALIAS_URNAME,   NULL,   urname_usage,   1,  true,   false }
+};
+
+const char UsageDefaultName[] = "cache-mgr";
+
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s [path_to_cache] options\n"
+                    "\n", progname);
+}
+
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if ( args == NULL )
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+    {
+        rc = ArgsProgram ( args, &fullpath, &progname );
+
+        if ( rc != 0 )
+            progname = fullpath = UsageDefaultName;
+
+        rc = UsageSummary ( progname );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc,
+                     "UsageSummary() failed in $(func)", "func=%s", __func__ ) );
+
+        }
+        else
+            rc = KOutMsg ( "Options:\n" );
+
+        if ( rc == 0 )
+        {
+            uint32_t idx, count = sizeof ToolOptions / sizeof ToolOptions [ 0 ];
+            for ( idx = 0; idx < count; ++idx )
+            {
+                OptDef * o = &ToolOptions[ idx ];
+                HelpOptionLine ( o->aliases, o->name, NULL, o->help );
+            }
+        }
+
+        if ( rc == 0 )
+            rc = KOutMsg ( "\n" );
+
+        if ( rc == 0 )
+        {
+            HelpOptionsStandard ();
+            HelpVersion ( fullpath, KAppVersion() );
+        }
+    }
+    return rc;
+}
+
+typedef enum tool_main_function
+{
+    tf_report,
+    tf_rreport,
+    tf_unlock,
+    tf_clear,
+    tf_enable,
+    tf_disable,
+    tf_unknown
+} tool_main_function;
+
+
+typedef struct tool_options
+{
+    uint64_t max_remove;
+
+    VNamelist * paths;
+    const char * user_repo_name;
+
+    uint32_t path_count;
+    tool_main_function main_function;
+    KRepCategory category;
+
+    bool detailed;
+    bool tstzero;
+    bool remove_dirs;
+} tool_options;
+
+
+static rc_t init_tool_options( tool_options * options )
+{
+    rc_t rc = VNamelistMake ( &options->paths, 5 );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc,
+                 "VNamelistMake() failed in $(func)", "func=%s", __func__ ) );
+    }
+    else
+    {
+        options->path_count = 0;
+        options->main_function = tf_unknown;
+        options->user_repo_name = NULL;
+        options->max_remove = 0;
+    }
+    return rc;
+}
+
+
+static rc_t clear_tool_options( tool_options * options )
+{
+    rc_t rc = VNamelistRelease ( options->paths );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc,
+                 "VNamelistRelease() failed in $(func)", "func=%s", __func__ ) );
+    }
+
+    if ( options->user_repo_name != NULL )
+    {
+        free( (void*) options->user_repo_name );
+        options->user_repo_name = NULL;
+    }
+    return rc;
+}
+
+
+static bool get_bool_option( const Args * args, const char * name )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc,
+                 "ArgsOptionCount() failed in $(func)", "func=%s", __func__ ) );
+        return false;
+    }
+    return ( count > 0 );
+}
+
+
+static bool string_cmp_1( const char * s1, const char * s2 )
+{
+    int cmp = string_cmp( s1, string_size( s1 ), s2, string_size( s2 ), -1 );
+    return ( cmp == 0 );
+}
+
+
+static KRepCategory get_repo_select( const Args * args, const char * name )
+{
+    KRepCategory res = krepBadCategory;
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc,
+                 "ArgsOptionCount() failed in $(func)", "func=%s", __func__ ) );
+    }
+    else if ( count > 0 )
+    {
+        const char * s = NULL;
+        rc = ArgsOptionValue( args, name, 0, (const void **)&s );
+        if ( rc == 0 && s != NULL )
+        {
+            if ( string_cmp_1 ( s, "user" ) )
+                res = krepUserCategory;
+            else if ( string_cmp_1 ( s, "site" ) )
+                res = krepSiteCategory;
+            else if ( string_cmp_1 ( s, "rem" ) )
+                res = krepRemoteCategory;
+        }
+    }
+    return res;
+}
+
+
+static rc_t get_user_repo_name( const Args * args, const char ** name )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, OPTION_URNAME, &count );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc,
+                 "ArgsOptionCount( $(option) ) failed in $(func)", "option=%s,func=%s", OPTION_URNAME, __func__ ) );
+    }
+    else if ( count > 0 )
+    {
+        const char * s = NULL;
+        rc = ArgsOptionValue( args, OPTION_URNAME, 0, (const void **)&s );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc,
+                     "ArgsOptionValue( $(option), 0 ) failed in $(func)", "option=%s,func=%s", OPTION_URNAME, __func__ ) );
+        }
+        else if ( s != NULL )
+            *name = string_dup_measure ( s, NULL );
+    }
+    return rc;
+}
+
+
+static rc_t get_max_remove( const Args * args, uint64_t * max_rem )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, OPTION_MAXREM, &count );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc,
+                 "ArgsOptionCount( $(option) ) failed in $(func)", "option=%s,func=%s", OPTION_MAXREM, __func__ ) );
+    }
+    else if ( count > 0 )
+    {
+        const char * s = NULL;
+        rc = ArgsOptionValue( args, OPTION_MAXREM, 0, (const void **)&s );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc,
+                     "ArgsOptionValue( $(option), 0 ) failed in $(func)", "option=%s,func=%s", OPTION_MAXREM, __func__ ) );
+        }
+        else if ( s != NULL )
+        {
+            char *endp;
+            *max_rem = strtou64( s, &endp, 10 );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t add_tool_options_path( tool_options * options, const char * path )
+{
+    rc_t rc = VNamelistAppend ( options->paths, path );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc,
+                 "VNamelistAppend( $(name) ) failed in $(func)", "name=%s, func=%s", path, __func__ ) );
+    }
+    if ( rc == 0 )
+        options->path_count++;
+    return rc;
+}
+
+
+static rc_t get_tool_options( Args * args, tool_options * options )
+{
+    uint32_t idx, count;
+
+    rc_t rc = ArgsParamCount( args, &count );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc,
+                 "ArgsParamCount() failed in $(func)", "func=%s", __func__ ) );
+    }
+    else if ( count > 0 )
+    {
+        for ( idx = 0; idx < count && rc == 0; ++idx )
+        {
+            const char *value = NULL;
+            rc = ArgsParamValue( args, idx, (const void **)&value );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogErr, ( klogErr, rc,
+                         "ArgsParamValue( $(idx) ) failed in $(func)", "idx=%d,func=%s", idx, __func__ ) );
+            }
+            else if ( value != NULL )
+                rc = add_tool_options_path( options, value );
+        }
+    }
+
+    options->main_function = tf_unknown;
+    options->detailed = get_bool_option( args, OPTION_DETAIL );
+    options->tstzero = get_bool_option( args, OPTION_TSTZERO );
+    options->remove_dirs = get_bool_option( args, OPTION_REMDIR );
+
+    if ( get_bool_option( args, OPTION_CREPORT ) )
+        options->main_function = tf_report;
+    else if ( get_bool_option( args, OPTION_RREPORT ) )
+        options->main_function = tf_rreport;
+    else if ( get_bool_option( args, OPTION_UNLOCK ) )
+        options->main_function = tf_unlock;
+    else if ( get_bool_option( args, OPTION_CLEAR ) )
+        options->main_function = tf_clear;
+    else
+    {
+        options->category = get_repo_select( args, OPTION_ENABLE );
+        if ( options->category != krepBadCategory )
+            options->main_function = tf_enable;
+
+        if ( options->category == krepBadCategory )
+        {
+            options->category = get_repo_select( args, OPTION_DISABLE );
+            if ( options->category != krepBadCategory )
+                options->main_function = tf_disable;
+        }
+    }
+
+    if ( rc == 0 )
+        rc = get_user_repo_name( args, &options->user_repo_name );
+    if ( rc == 0 )
+        rc = get_max_remove( args, &options->max_remove );
+    return rc;
+}
+
+
+typedef struct visit_ctx
+{
+    KDirectory * dir;
+    KConfig * cfg;
+    const KRepositoryMgr * repo_mgr;
+
+    const tool_options * options;
+    const char * path;
+    void * data;
+    uint32_t path_type;
+    bool terminate;
+} visit_ctx;
+
+
+typedef rc_t ( *on_path_t )( visit_ctx * obj );
+
+
+static rc_t foreach_path_obj( visit_ctx * ctx, on_path_t func )
+{
+    rc_t rc = 0;
+    ctx->path_type = ( KDirectoryPathType ( ctx->dir, "%s", ctx->path ) & ~ kptAlias );
+    if ( ctx->path_type == kptDir )
+    {
+        KNamelist * path_objects;
+        rc = KDirectoryList ( ctx->dir, &path_objects, NULL, NULL, "%s", ctx->path );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc,
+                     "KDirectoryList( $(path) ) failed in $(func)", "path=%s,func=%s", ctx->path, __func__ ) );
+        }
+        else
+        {
+            uint32_t idx, count;
+            rc = KNamelistCount ( path_objects, &count );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogErr, ( klogErr, rc,
+                         "KNamelistCount() failed in $(func)", "func=%s", __func__ ) );
+            }
+            for ( idx = 0; idx < count && rc == 0 && !ctx->terminate; ++idx )
+            {
+                const char * obj_name = NULL;
+                rc = KNamelistGet ( path_objects, idx, &obj_name );
+                if ( rc != 0 )
+                {
+                    PLOGERR( klogErr, ( klogErr, rc,
+                             "KNamelistGet( $(idx) ) failed in $(func)", "idx=%d,func=%s", idx, __func__ ) );
+                }
+                else if ( obj_name != NULL )
+                {
+                    char obj_path[ 4096 ];
+                    rc = KDirectoryResolvePath ( ctx->dir, true, obj_path, sizeof obj_path, "%s/%s", ctx->path, obj_name );
+                    if ( rc != 0 )
+                    {
+                        PLOGERR( klogErr, ( klogErr, rc,
+                                 "KDirectoryResolvePath( $(path) ) failed in $(func)", "path=%s,func=%s", ctx->path, __func__ ) );
+                    }
+                    else
+                    {
+                        visit_ctx octx;
+                        octx.dir = ctx->dir;
+                        octx.options = ctx->options;
+                        octx.path = obj_path;
+                        octx.data = ctx->data;
+                        octx.path_type = ( KDirectoryPathType ( ctx->dir, "%s", obj_path ) & ~ kptAlias );
+                        if ( octx.path_type == kptDir )
+                        {
+                            rc = foreach_path_obj( &octx, func );   /* recursion !!! */
+                        }
+                        else if ( octx.path_type == kptFile )
+                        {
+                            rc = func( &octx );
+                        }
+                    }
+                }
+            }
+
+            {
+                rc_t rc2 = KNamelistRelease ( path_objects );
+                if ( rc2 != 0 )
+                {
+                    PLOGERR( klogErr, ( klogErr, rc2,
+                             "KNamelistRelease() failed in $(func)", "func=%s", __func__ ) );
+                }
+            }
+        }
+    }
+    if ( rc == 0 && ( ctx->path_type == kptDir || ctx->path_type == kptFile ) && !ctx->terminate )
+    {
+        /* at the very end of it, call the function for the path itself */
+        rc = func( ctx );
+    }
+    return rc;
+}
+
+
+static rc_t foreach_path( visit_ctx * octx, on_path_t func )
+{
+    rc_t rc = 0;
+    uint32_t idx;
+
+    octx->terminate = false;
+    for ( idx = 0; idx < octx->options->path_count && rc == 0 && !octx->terminate; ++idx )
+    {
+        rc = VNameListGet ( octx->options->paths, idx, &octx->path );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc,
+                     "VNameListGet( $(idx) ) failed in $(func)", "idx=%u,func=%s", idx, __func__ ) );
+        }
+        else if ( octx->path != NULL )
+        {
+            rc = foreach_path_obj( octx, func );
+        }
+    }
+    return rc;
+}
+
+
+static bool string_ends_in( const char * str, const char * end )
+{
+    bool res = false;
+    if ( str != NULL && end != NULL )
+    {
+        uint32_t l_str = string_len( str, string_size( str ) );
+        uint32_t l_end = string_len( end, string_size( end ) );
+        if ( l_str >= l_end && l_end > 0 )
+        {
+            const char * p = str + ( l_str - l_end );
+            res = ( string_cmp ( p, l_end, end, l_end, l_end ) == 0 );
+        }
+    }
+    return res;
+}
+
+
+/***************************************************************************************************************/
+
+typedef struct report_data
+{
+    uint32_t partial_count;
+    uint32_t full_count;
+    uint32_t lock_count;
+    uint64_t file_size;
+    uint64_t used_file_size;
+} report_data;
+
+
+static rc_t on_report_cache_file( visit_ctx * obj )
+{
+    rc_t rc = 0;
+    uint64_t file_size = 0;
+    uint64_t used_size = 0;
+    uint64_t checked_blocks = 0;
+    uint64_t empty_blocks = 0;
+    float completeness = 0.0;
+    
+    bool locked = false;
+    report_data * data = obj->data;
+
+    data->partial_count++;
+    rc = KDirectoryFileSize ( obj->dir, &file_size, "%s", obj->path );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc,
+                 "KDirectoryFileSize( $(path) ) failed in $(func)", "path=%s,func=%s", obj->path, __func__ ) );
+    }
+    else
+    {
+        struct KFile const *f;
+
+        data->file_size += file_size;
+        rc = KDirectoryOpenFileRead ( obj->dir, &f, "%s", obj->path );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc,
+                     "KDirectoryOpenFileRead( $(path) ) failed in $(func)", "path=%s,func=%s", obj->path, __func__ ) );
+        }
+        else
+        {
+            rc = GetCacheCompleteness( f, &completeness, &used_size ); /* libs/kfs/cacheteefile.c */
+            if ( rc != 0 )
+            {
+                PLOGERR( klogErr, ( klogErr, rc,
+                         "GetCacheCompleteness( $(path) ) failed in $(func)", "path=%s,func=%s", obj->path, __func__ ) );
+            }
+            else
+            {
+                data->used_file_size += used_size;
+            }
+            
+            if ( rc == 0 && obj->options->tstzero )
+            {
+                rc = Has_Cache_Zero_Blocks( f, &checked_blocks, &empty_blocks ); /* libs/kfs/cacheteefile.c */
+                if ( rc != 0 )
+                {
+                    PLOGERR( klogErr, ( klogErr, rc,
+                             "Has_Cache_Zero_Blocks( $(path) ) failed in $(func)", "path=%s,func=%s", obj->path, __func__ ) );
+                }
+            }
+            
+            KFileRelease( f );
+        }
+    }
+    if ( rc == 0 )
+    {
+        uint32_t pt = ( KDirectoryPathType ( obj->dir, "%s.lock", obj->path ) & ~ kptAlias );
+        locked = ( pt == kptFile );
+    }
+
+    if ( rc == 0 && obj->options->detailed )
+    {
+        if ( locked )
+            rc = KOutMsg( "%s complete by %.02f %% [%,lu of %,lu]bytes locked\n",
+                          obj->path, completeness, used_size, file_size );
+        else
+            rc = KOutMsg( "%s complete by %.02f %% [%,lu of %,lu]bytes\n",
+                          obj->path, completeness, used_size, file_size );
+    }
+    
+    if ( rc == 0 && obj->options->tstzero )
+    {
+        rc = KOutMsg( "%s has %lu blocks set in bitmap where %lu are empty\n",
+                          obj->path, checked_blocks, empty_blocks );
+    }
+    
+    return rc;
+}
+
+
+static rc_t on_report_full_file( visit_ctx * obj )
+{
+    rc_t rc = 0;
+    uint64_t file_size = 0;
+    report_data * data = obj->data;
+
+    data->full_count++;
+    rc = KDirectoryFileSize ( obj->dir, &file_size, "%s", obj->path );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc,
+                 "KDirectoryFileSize( $(path) ) failed in $(func)", "path=%s,func=%s", obj->path, __func__ ) );
+    }
+    else
+    {
+        data->file_size += file_size;
+        data->used_file_size += file_size;
+        if ( obj->options->detailed )
+            rc = KOutMsg( "%s complete file of %,lu bytes\n", obj->path, file_size );
+    }
+    return rc;
+}
+
+
+static rc_t on_report_path( visit_ctx * obj )
+{
+    rc_t rc = 0;
+    if ( obj->path_type == kptFile )
+    {
+        report_data * data = obj->data;
+        if ( string_ends_in( obj->path, ".cache" ) )
+        {
+            rc = on_report_cache_file( obj );
+        }
+        else if ( string_ends_in( obj->path, ".lock" ) )
+        {
+            data->lock_count ++;
+        }
+        else if ( string_ends_in( obj->path, ".sra" ) )
+        {
+            rc = on_report_full_file( obj );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t perform_report( visit_ctx * octx )
+{
+    rc_t rc = 0;
+    report_data data;
+
+    memset( &data, 0, sizeof data );
+    octx->data = &data;
+
+    if ( octx->options->detailed )
+        rc = KOutMsg( "\n-----------------------------------\n" );
+    if ( rc == 0 )
+        rc = foreach_path( octx, on_report_path );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "-----------------------------------\n" );
+    if ( rc == 0 )
+        rc = KOutMsg( "%,u cached file(s)\n", data.partial_count );
+    if ( rc == 0 )
+        rc = KOutMsg( "%,u complete file(s)\n", data.full_count );
+    if ( rc == 0 )
+        rc = KOutMsg( "%,lu bytes in cached files\n", data.file_size );
+    if ( rc == 0 )
+        rc = KOutMsg( "%,lu bytes used in cached files\n", data.used_file_size );
+    if ( rc == 0 )
+        rc = KOutMsg( "%,u lock files\n", data.lock_count );
+
+    return rc;
+}
+
+
+/***************************************************************************************************************/
+typedef rc_t ( CC * get_repo_cb )( const KRepositoryMgr *self, KRepositoryVector *repos );
+
+const char MAIN_CAT_USER[] = "user";
+const char MAIN_CAT_SITE[] = "site";
+const char MAIN_CAT_REMOTE[] = "remote";
+
+const char SUB_CAT_UNKNOWN[] = "unknown";
+const char SUB_CAT_MAIN[] = "main";
+const char SUB_CAT_AUX[]  = "aux";
+const char SUB_CAT_PROT[] = "protected";
+
+
+static rc_t report_repo( visit_ctx * octx, KRepCategory category )
+{
+    rc_t rc, rc1;
+    KRepositoryVector repos;
+    const char * hint;
+
+    VectorInit ( &repos, 0, 5 );
+
+    switch ( category )
+    {
+        case krepUserCategory   : hint = MAIN_CAT_USER;
+                                   rc = KRepositoryMgrUserRepositories( octx->repo_mgr, &repos );
+                                   break;
+
+        case krepSiteCategory   : hint = MAIN_CAT_SITE;
+                                   rc = KRepositoryMgrSiteRepositories( octx->repo_mgr, &repos );
+                                   break;
+
+        case krepRemoteCategory : hint = MAIN_CAT_REMOTE;
+                                   rc = KRepositoryMgrRemoteRepositories( octx->repo_mgr, &repos );
+                                   break;
+    }
+
+    if ( rc != 0 )
+    {
+        if ( rc == SILENT_RC( rcKFG, rcNode, rcOpening, rcPath, rcNotFound ) )
+        {
+            KOutMsg("\n%s:\n", hint);
+            KOutMsg("\tnot found in configuration\n");
+            rc = 0;
+        }
+        else
+        {
+            PLOGERR( klogErr, ( klogErr, rc,
+                 "KRepositoryMgr<$(hint)>repositories() failed in $(func)",
+                 "hint=%s,func=%s", hint, __func__ ) );
+        }
+    }
+    else
+    {
+        uint32_t idx;
+        bool disabled = KRepositoryMgrCategoryDisabled ( octx->repo_mgr, category );
+
+        rc = KOutMsg( "\n%s:\n", hint );
+        if ( rc == 0 && disabled )
+            rc = KOutMsg( "\tglobally disabled\n" );
+
+        for ( idx = 0; idx < VectorLength( &repos ) && rc == 0; ++idx )
+        {
+            const KRepository *repo = VectorGet( &repos, idx );
+            if ( repo != NULL )
+            {
+                char repo_name[ 1024 ];
+                rc = KRepositoryDisplayName ( repo, repo_name, sizeof repo_name, NULL );
+                if ( rc != 0 )
+                {
+                    PLOGERR( klogErr, ( klogErr, rc,
+                             "KRepositoryName() for $(hint) failed in $(func)", "hint=%s,func=%s", hint, __func__ ) );
+                }
+                else
+                {
+                    KRepSubCategory sub_cat = KRepositorySubCategory ( repo );
+                    bool disabled = KRepositoryDisabled ( repo );
+                    bool cache_enabled = KRepositoryCacheEnabled ( repo );
+                    const char * sub_cat_ptr = SUB_CAT_UNKNOWN;
+                    switch( sub_cat )
+                    {
+                        case krepMainSubCategory        : sub_cat_ptr = SUB_CAT_MAIN; break;
+                        case krepAuxSubCategory         : sub_cat_ptr = SUB_CAT_AUX; break;
+                        case krepProtectedSubCategory   : sub_cat_ptr = SUB_CAT_PROT; break;
+                        default                         : sub_cat_ptr = SUB_CAT_UNKNOWN; break;
+                    }
+
+                    rc = KOutMsg( "\t%s.%s: %s, cache-%s",
+                            sub_cat_ptr, repo_name,
+                            ( disabled ? "disabled" : "enabled" ),
+                            ( cache_enabled ? "enabled" : "disabled" ) );
+                    if ( rc == 0 )
+                    {
+                        if ( octx->options->detailed )
+                        {
+                            /* it is OK if we cannot find the root of a repository... */
+                            char where[ 4096 ];
+                            rc1 = KRepositoryRoot ( repo, where, sizeof where, NULL );
+                            if ( rc1 == 0 )
+                                rc = KOutMsg( ", at %s", where );
+                            else
+                            {
+                                rc1 = KRepositoryResolver ( repo, where, sizeof where, NULL );
+                                if ( rc1 == 0 )
+                                    rc = KOutMsg( ", at %s", where );
+                            }
+                        }
+                                            }
+                    if ( rc == 0 )
+                        rc = KOutMsg( "\n" );
+                }
+            }
+        }
+    }
+    {
+        rc1 = KRepositoryVectorWhack ( &repos );
+        if ( rc1 != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc1,
+                     "KRepositoryVectorWhack() for $(hint) failed in $(func)", "hint=%s,func=%s", hint, __func__ ) );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t perform_rreport( visit_ctx * octx )
+{
+    rc_t rc = report_repo( octx, krepUserCategory );
+
+    if ( rc == 0 )
+        rc = report_repo( octx, krepSiteCategory );
+
+    if ( rc == 0 )
+        rc = report_repo( octx, krepRemoteCategory );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "\n" );
+
+    return rc;
+}
+
+
+/***************************************************************************************************************/
+
+
+typedef struct unlock_data
+{
+    uint32_t lock_count;
+} unlock_data;
+
+
+static rc_t on_unlock_path( visit_ctx * obj )
+{
+    rc_t rc = 0;
+    if ( obj->path_type == kptFile && string_ends_in( obj->path, ".lock" ) )
+    {
+        unlock_data * data = obj->data;
+        rc = KDirectoryRemove ( obj->dir, false, "%s", obj->path );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc,
+                     "KDirectoryRemove( $(path) ) failed in $(func)", "path=%s,func=%s", obj->path, __func__ ) );
+        }
+        else
+        {
+            data->lock_count++;
+            rc = KOutMsg( "%s deleted\n", obj->path );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t perform_unlock( visit_ctx * octx )
+{
+    rc_t rc = 0;
+    unlock_data data;
+
+    memset( &data, 0, sizeof data );
+    octx->data = &data;
+    if ( rc == 0 )
+        rc = foreach_path( octx, on_unlock_path );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "-----------------------------------\n" );
+    if ( rc == 0 )
+        rc = KOutMsg( "%,u lock-files removed\n", data.lock_count );
+
+    return rc;
+}
+
+
+/***************************************************************************************************************/
+
+
+typedef struct clear_data
+{
+    uint32_t removed_files;
+    uint32_t removed_directories;
+    uint64_t removed_size;
+} clear_data;
+
+
+static rc_t on_clear_path( visit_ctx * obj )
+{
+    rc_t rc = 0;
+    clear_data * data = obj->data;
+
+    /* the caller is written to first hit the files/subdirs, then the directory that contains them */
+    if ( obj->path_type == kptDir )
+    {
+        if ( obj->options->remove_dirs )
+        {
+            rc = KDirectoryRemove ( obj->dir, false, "%s", obj->path );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogErr, ( klogErr, rc,
+                         "KDirectoryRemove( $(path) ) failed in $(func)", "path=%s,func=%s", obj->path, __func__ ) );
+            }
+            else
+                data->removed_directories++;
+        }
+    }
+    else if ( obj->path_type == kptFile )
+    {
+        uint64_t file_size;
+        rc = KDirectoryFileSize ( obj->dir, &file_size, "%s", obj->path );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc,
+                     "KDirectoryFileSize( $(path) ) failed in $(func)", "path=%s,func=%s", obj->path, __func__ ) );
+        }
+        else
+        {
+            rc = KDirectoryRemove ( obj->dir, false, "%s", obj->path );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogErr, ( klogErr, rc,
+                         "KDirectoryRemove( $(path) ) failed in $(func)", "path=%s,func=%s", obj->path, __func__ ) );
+            }
+            else
+            {
+                if ( obj->options->detailed )
+                    rc = KOutMsg( "FILE: '%s' removed (%,lu bytes)\n", obj->path, file_size );
+                data->removed_files++;
+                data->removed_size += file_size;
+                if ( obj->options->max_remove > 0 && data->removed_size >= obj->options->max_remove )
+                {
+                    obj->terminate = true;
+                    KOutMsg( "the maximum of %,lu bytes to be removed is reached now\n", obj->options->max_remove );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t perform_clear( visit_ctx * octx )
+{
+    rc_t rc = 0;
+    clear_data data;
+
+    memset( &data, 0, sizeof data );
+    octx->data = &data;
+
+    if ( octx->options->max_remove > 0 )
+        rc = KOutMsg( "removing max %,u bytes\n", octx->options->max_remove );
+    if ( rc == 0 )
+        rc = foreach_path( octx, on_clear_path );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "-----------------------------------\n" );
+    if ( rc == 0 )
+        rc = KOutMsg( "%,u files removed\n", data.removed_files );
+    if ( rc == 0 )
+        rc = KOutMsg( "%,u directories removed\n", data.removed_directories );
+    if ( rc == 0 )
+        rc = KOutMsg( "%,lu bytes removed\n", data.removed_size );
+
+    return rc;
+}
+
+
+/***************************************************************************************************************/
+
+/*
+static rc_t enable_disable_repo( bool disabled, get_repo_cb getter, const char * hint )
+{
+    KConfig * cfg;
+    rc_t rc = KConfigMake ( &cfg, NULL );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc,
+                 "KConfigMake() failed in $(func)", "func=%s", __func__ ) );
+    }
+    else
+    {
+        const KRepositoryMgr *repo_mgr;
+        rc = KConfigMakeRepositoryMgrRead ( cfg, &repo_mgr );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc,
+                     "KConfigMakeRepositoryMgrRead() failed in $(func)", "func=%s", __func__ ) );
+        }
+        else
+        {
+            uint32_t idx;
+            KRepositoryVector repos;
+            VectorInit ( &repos, 0, 5 );
+            rc = getter ( repo_mgr, &repos );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogErr, ( klogErr, rc,
+                         "KRepositoryMgr<$(hint)>repositories() failed in $(func)", "hint=%s,func=%s", hint, __func__ ) );
+            }
+            for ( idx = 0; idx < VectorLength( &repos ) && rc == 0; ++idx )
+            {
+                const KRepository *repo = VectorGet( &repos, idx );
+                if ( repo != NULL )
+                {
+                    rc = KRepositorySetDisabled ( repo, disabled );
+                    if ( rc != 0 )
+                    {
+                        PLOGERR( klogErr, ( klogErr, rc,
+                                 "KRepositorySetDisabled() failed in $(func)", "func=%s", __func__ ) );
+                    }
+                }
+            }
+            if ( rc == 0 )
+            {
+                if ( disabled )
+                    KOutMsg( "%s repositories disabled\n", hint );
+                else
+                    KOutMsg( "%s repositories enabled\n", hint );
+            }
+            {
+                rc_t rc2 = KRepositoryVectorWhack ( &repos );
+                if ( rc2 != 0 )
+                {
+                    PLOGERR( klogErr, ( klogErr, rc2,
+                             "KRepositoryVectorWhack() failed in $(func)", "func=%s", __func__ ) );
+                }
+                rc2 = KRepositoryMgrRelease ( repo_mgr );
+                if ( rc2 != 0 )
+                {
+                    PLOGERR( klogErr, ( klogErr, rc2,
+                             "KRepositoryMgrRelease() failed in $(func)", "func=%s", __func__ ) );
+                }
+
+            }
+        }
+
+        {
+            rc_t rc2 = KConfigRelease ( cfg );
+            if ( rc2 != 0 )
+            {
+                PLOGERR( klogErr, ( klogErr, rc2,
+                         "KConfigRelease() failed in $(func)", "func=%s", __func__ ) );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t enable_disable_user_repo( bool disabled )
+{
+    return enable_disable_repo( disabled, KRepositoryMgrUserRepositories, "user" );
+}
+
+
+static rc_t enable_disable_site_repo( bool disabled )
+{
+    return enable_disable_repo( disabled, KRepositoryMgrSiteRepositories, "site" );
+}
+
+
+static rc_t enable_disable_remote_repo( bool disabled )
+{
+    return enable_disable_repo( disabled, KRepositoryMgrRemoteRepositories, "remote" );
+}
+*/
+
+/***************************************************************************************************************/
+
+
+static rc_t perform_set_disable( visit_ctx * octx, bool disabled )
+{
+    rc_t rc;
+    if ( octx->options->category == krepBadCategory )
+        rc = KOutMsg( "enable unknown category\n" );
+    else
+    {
+        rc = KRepositoryMgrCategorySetDisabled ( octx->repo_mgr, octx->options->category, disabled );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc,
+                     "KRepositoryMgrCategorySetDisabled() failed in $(func)", "func=%s", __func__ ) );
+        }
+        else
+        {
+            rc = KConfigCommit ( octx->cfg );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogErr, ( klogErr, rc,
+                         "KConfigCommit() failed in $(func)", "func=%s", __func__ ) );
+            }
+        }
+    }
+    return rc;
+}
+
+
+/***************************************************************************************************************/
+
+
+static rc_t perform( tool_options * options, Args * args )
+{
+    visit_ctx octx;
+    rc_t rc2, rc = KDirectoryNativeDir( &octx.dir );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc,
+                 "KDirectoryNativeDir() failed in $(func)", "func=%s", __func__ ) );
+    }
+    else
+    {
+        rc = KConfigMake ( &octx.cfg, NULL );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc,
+                     "KConfigMake() failed in $(func)", "func=%s", __func__ ) );
+        }
+        else
+        {
+            rc = KConfigMakeRepositoryMgrRead ( octx.cfg, &octx.repo_mgr );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogErr, ( klogErr, rc,
+                         "KConfigMakeRepositoryMgrRead() failed in $(func)", "func=%s", __func__ ) );
+            }
+            else
+            {
+                octx.options = options;
+                octx.data = NULL;
+                switch( options->main_function )
+                {
+                    case tf_report  : rc = perform_report( &octx ); break;
+                    case tf_rreport : rc = perform_rreport( &octx ); break;
+                    case tf_unlock  : rc = perform_unlock( &octx ); break;
+                    case tf_clear   : rc = perform_clear( &octx ); break;
+                    case tf_enable  : rc = perform_set_disable( &octx, false ); break;
+                    case tf_disable : rc = perform_set_disable( &octx, true ); break;
+                    case tf_unknown : rc = Usage( args ); break;
+                }
+
+                rc2 = KRepositoryMgrRelease ( octx.repo_mgr );
+                if ( rc2 != 0 )
+                {
+                    PLOGERR( klogErr, ( klogErr, rc2,
+                             "KRepositoryMgrRelease() failed in $(func)", "func=%s", __func__ ) );
+                }
+            }
+
+            rc2 = KConfigRelease ( octx.cfg );
+            if ( rc2 != 0 )
+            {
+                PLOGERR( klogErr, ( klogErr, rc2,
+                         "KConfigRelease() failed in $(func)", "func=%s", __func__ ) );
+            }
+        }
+
+        rc2 = KDirectoryRelease( octx.dir );
+        if ( rc2 != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc2,
+                     "KDirectoryRelease() failed in $(func)", "func=%s", __func__ ) );
+        }
+    }
+    return rc;
+}
+
+
+/***************************************************************************
+    Main:
+***************************************************************************/
+
+static rc_t CC on_history_path( const String * part, void *data )
+{
+    tool_options * options = data;
+    rc_t rc = add_tool_options_path( options, part->addr );
+    if ( options -> detailed )
+        KOutMsg( "source: %S\n", part );
+    return rc;
+}
+
+static rc_t get_cache_path_from_repo_mgr( tool_options * options )
+{
+    KConfig * cfg;
+    rc_t rc = KConfigMake ( &cfg, NULL );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc,
+                 "KConfigMake() failed in $(func)", "func=%s", __func__ ) );
+    }
+    else
+    {
+        const KRepositoryMgr *repo_mgr;
+        rc = KConfigMakeRepositoryMgrRead ( cfg, &repo_mgr );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc,
+                     "KConfigMakeRepositoryMgrRead() failed in $(func)", "func=%s", __func__ ) );
+        }
+        else
+        {
+            KRepositoryVector repos;
+            VectorInit ( &repos, 0, 5 );
+            rc = KRepositoryMgrUserRepositories ( repo_mgr, &repos );
+            if ( rc != 0 )
+            {
+                rc = 0; /* we do not have a user-repository, but that is OK, the caller will display the lack of it ... */
+            }
+            else
+            {
+                uint32_t idx;
+                for ( idx = 0; idx < VectorLength( &repos ) && rc == 0; ++idx )
+                {
+                    bool add = true;
+                    KRepository * repo = VectorGet ( &repos, idx );
+                    if ( repo != NULL )
+                    {
+                        if ( options->user_repo_name != NULL )
+                        {
+                            char name[ 1024 ];
+                            rc = KRepositoryName( repo, name, sizeof name, NULL );
+                            if ( rc != 0 )
+                            {
+                                PLOGERR( klogErr, ( klogErr, rc,
+                                         "KRepositoryName( for repo # $(idx) ) failed in $(func)", "idx=%u,func=%s", idx, __func__ ) );
+                            }
+                            else
+                                add = string_cmp_1( options->user_repo_name, name );
+                        }
+                        if ( add )
+                        {
+                            rc_t rc1;
+                            char path[ 4096 ];
+                            size_t path_size;
+                            rc = KRepositoryRoot ( repo, path, sizeof path, &path_size );
+                            if ( rc != 0 )
+                            {
+                                PLOGERR( klogErr, ( klogErr, rc,
+                                         "KRepositoryRoot( for repo # $(idx) ) failed in $(func)", "idx=%u,func=%s", idx, __func__ ) );
+                            }
+                            else
+                            {
+                                path[ path_size ] = 0;
+                                rc = add_tool_options_path( options, path );
+                                if ( options->detailed )
+                                    KOutMsg( "source: %s\n", path );
+                            }
+                            rc1 = KRepositoryRootHistory ( repo, path, sizeof path, &path_size );
+                            if ( rc1 == 0 ) /* it is not an error if we have no repository-root */
+                            {
+                                path[ path_size ] = 0;
+                                foreach_Str_part( path, ':', on_history_path, options );
+                            }
+                        }
+                    }
+                }
+                {
+                    rc_t rc2 = KRepositoryVectorWhack ( &repos );
+                    if ( rc2 != 0 )
+                    {
+                        PLOGERR( klogErr, ( klogErr, rc2,
+                                 "KRepositoryVectorWhack() failed in $(func)", "func=%s", __func__ ) );
+                    }
+                }
+            }
+            {
+                rc_t rc2 = KRepositoryMgrRelease ( repo_mgr );
+                if ( rc2 != 0 )
+                {
+                    PLOGERR( klogErr, ( klogErr, rc2,
+                             "KRepositoryMgrRelease() failed in $(func)", "func=%s", __func__ ) );
+                }
+            }
+        }
+        {
+            rc_t rc2 = KConfigRelease ( cfg );
+            if ( rc2 != 0 )
+            {
+                PLOGERR( klogErr, ( klogErr, rc2,
+                         "KConfigRelease() failed in $(func)", "func=%s", __func__ ) );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t CC write_to_FILE ( void *f, const char *buffer, size_t bytes, size_t *num_writ )
+{
+    * num_writ = fwrite ( buffer, 1, bytes, f );    /* hardcoded value for stdout == 1 */
+    if ( * num_writ != bytes )
+        return RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+    return 0;
+}
+
+
+static rc_t explain_no_cache_found ( void )
+{
+    rc_t rc = KOutMsg( "this tool was not able to find the location of the cache\n" );
+    if ( rc == 0 )
+        rc = KOutMsg( "solution A : specify the cache-path at the commandline like 'cache-mgr ~/my_cache -r'\n" );
+    if ( rc == 0 )
+        rc = KOutMsg( "solution B : fix your broken configuration-setup ( use vdb-config )\n" );
+    return rc;
+}
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    rc_t rc = KOutHandlerSet ( write_to_FILE, stdout );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc,
+                 "KOutHandlerSet() failed in $(func)", "func=%s", __func__ ) );
+    }
+    else
+    {
+        Args * args;
+        rc = ArgsMakeAndHandle ( &args, argc, argv, 1,
+                                 ToolOptions, sizeof ToolOptions / sizeof ToolOptions [ 0 ] );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc,
+                     "ArgsMakeAndHandle() failed in $(func)", "func=%s", __func__ ) );
+        }
+        else
+        {
+            tool_options options;
+            rc = init_tool_options( &options );
+            if ( rc == 0 )
+            {
+                rc = get_tool_options( args, &options );
+                if ( rc == 0 )
+                {
+                    bool cache_paths_needed = false;
+                    switch( options.main_function )
+                    {
+                        case tf_report  : ;
+                        case tf_unlock  : ;
+                        case tf_clear   : cache_paths_needed = true; break;
+                        case tf_rreport : ;
+                        case tf_enable  : ;
+                        case tf_disable : ;
+                        case tf_unknown : ; break;
+                    }
+
+                    if ( options.path_count == 0 && cache_paths_needed )
+                        rc = get_cache_path_from_repo_mgr( &options );
+
+                    if ( rc == 0 )
+                    {
+                        if ( options.path_count == 0 && cache_paths_needed )
+                        {
+                            rc = explain_no_cache_found ();
+                        }
+                        else
+                            rc = perform( &options, args );
+                    }
+                }
+                clear_tool_options( &options );
+            }
+        }
+        {
+            rc_t rc2 = ArgsWhack ( args );
+            if ( rc2 != 0 )
+            {
+                PLOGERR( klogErr, ( klogErr, rc2,
+                         "ArgsWhack() failed in $(func)", "func=%s", __func__ ) );
+            }
+        }
+    }
+
+    return rc;
+}
+
diff --git a/tools/ccextract/Makefile b/tools/ccextract/Makefile
new file mode 100644
index 0000000..d5eb330
--- /dev/null
+++ b/tools/ccextract/Makefile
@@ -0,0 +1,90 @@
+# ==============================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/ccextract
+
+INT_TOOLS =
+
+EXT_TOOLS = ccextract
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+ifeq (1,$(HAVE_XML2))
+
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+else
+
+all std: $(ALL_TOOLS)
+
+$(ALL_TOOLS):
+	@ echo "NOTE - $(@F) cannot be built:"                          \
+	       "It requires our internal library 'libkxml'"             \
+	       "which requires 'libxml2' and its development headers."
+endif
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# ccextract
+#  Copy files from one directory to another while cataloging the contents.
+#  XML files can be redirected as well.
+#
+CCEXTRACT_SRC = \
+	ccextract
+
+CCEXTRACT_OBJ = \
+	$(addsuffix .$(OBJX),$(CCEXTRACT_SRC))
+
+CCEXTRACT_LIB = \
+	-lkapp \
+	-stk-version \
+    -lkxfs \
+    -lkxml \
+	-sncbi-vdb
+
+$(BINDIR)/ccextract: $(CCEXTRACT_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(CCEXTRACT_LIB)
diff --git a/tools/ccextract/ccextract.c b/tools/ccextract/ccextract.c
new file mode 100644
index 0000000..025a749
--- /dev/null
+++ b/tools/ccextract/ccextract.c
@@ -0,0 +1,1272 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <vfs/manager.h>
+#include <vfs/path.h>
+#include <vfs/manager-priv.h>
+#include <vfs/path-priv.h>
+#include <kxml/xml.h>
+#include <kfs/defs.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/nullfile.h>
+#include <kfs/teefile.h>
+#include <klib/defs.h>
+#include <klib/rc.h>
+#include <klib/text.h>
+#include <klib/container.h>
+#include <klib/vector.h>
+#include <klib/out.h>
+#include <klib/log.h>
+#include <klib/debug.h>
+#include <kapp/args.h>
+#include <kapp/main.h>
+
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+
+/*
+ * some program globals
+ */
+const char * program_name = "ccextract"; /* default it but try to set it */
+const char * full_path = "ccextract"; /* default it but try to set it */
+
+
+#define OPTION_XML     "copycat-xml"
+#define OPTION_FORCE   "force"
+#define OPTION_DIR     "directory"
+
+#define ALIAS_XML     "x"
+#define ALIAS_FORCE   "f"
+#define ALIAS_DIR     "d"
+
+
+static
+const char * xml_usage[] = 
+{ "XML generated by 'copycat''", NULL };
+static
+const char * force_usage[] = 
+{ "force overwrite of existing files", NULL };
+static
+const char * dir_usage[] = 
+{ "location of output dbase directory", NULL };
+
+const char UsageDefaultName [] = "ccextract";
+
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg (
+        "\n"
+        "Usage:\n"
+        "  %s [options] [-d|--directory <directory>] -x|--copycat-xml <XML-file>\\\n"
+        "          source-archive | [path [...]]"
+        "\n"
+        "Summary:\n"
+        "  Copies files and/or directories, creating a catalog of the copied files.\n",
+        progname);
+}
+
+
+
+/*  ----------------------------------------------------------------------
+ */
+static
+const char * first_usage[] = 
+{
+    "The path to a archive file ",
+    NULL
+};
+
+static
+const char * second_usage[] = 
+{
+    "A file by path or ID to extract",
+    "If none are given all files are extracted",
+    NULL
+};
+
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+
+    UsageSummary (progname);
+
+    KOutMsg ("Parameters:\n");
+
+    HelpParamLine ("source-file-path", first_usage);
+    HelpParamLine ("extract-path", second_usage);
+
+    KOutMsg ("Options:\n");
+
+    HelpOptionLine (ALIAS_XML, OPTION_XML, "XML-file", xml_usage);
+    HelpOptionLine (ALIAS_DIR, OPTION_DIR, "directoy-path", dir_usage);
+    HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, force_usage);
+
+    HelpOptionsStandard ();
+/*                     1         2         3         4         5         6         7         8 */
+/*            12345678901234567890123456789012345678901234567890123456789012345678901234567890 */
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+
+/*  ----------------------------------------------------------------------
+ */
+static
+OptDef Options[] = 
+{
+    /* name            alias max times oparam required fmtfunc help text loc */
+    { OPTION_XML,   ALIAS_XML,   NULL, xml_usage,   1, true,  true },
+    { OPTION_DIR,   ALIAS_DIR,   NULL, dir_usage,   1, true,  false },
+    { OPTION_FORCE, ALIAS_FORCE, NULL, force_usage, 0, false, false }
+};
+
+
+/*  ----------------------------------------------------------------------
+ */
+static struct
+{
+    const char       * dirstr;
+    VPath            * dirpath;
+    KDirectory       * dir;           /* extraction target directory */
+
+    const char       * xmlstr;
+    VPath            * xmlpath;
+    const KFile      * xml;
+
+    const char       * arcstr;
+
+    /* root directory for XFS is archive as a directory but located below the archive */
+    const char       * rootstr;
+    const KDirectory * root;
+
+    /* base is the directory made from the archive - xtoc/xfs is a bit incoherent here */
+    const char       * basestr;
+    VPath            * basepath;
+    const KDirectory * base;
+
+
+    VFSManager * vfsmgr;
+
+    Vector       pathstr;
+    Vector       pathvpath;
+    BSTree       pathtree;
+
+
+
+
+    KFile *      null;
+
+
+
+
+    bool         force;
+    uint32_t     cm;
+} options;
+
+
+/*  ----------------------------------------------------------------------
+ */
+typedef struct extnode
+{
+    BSTNode       node;
+    const VPath * path;
+    uint64_t      offset;
+} extnode;
+
+
+/*  ----------------------------------------------------------------------
+ */
+static
+rc_t extnode_make (extnode ** new_node, const VPath * path, uint64_t offset)
+{
+    rc_t rc;
+
+    if (new_node == NULL)
+    {
+        rc = RC (rcExe, rcTree, rcConstructing, rcParam, rcNull);
+        LOGERR (klogInt, rc, "missing new_node for making node");
+    }
+    else
+    {
+        *new_node = NULL;
+
+        if (path == NULL)
+        {
+            rc = RC (rcExe, rcTree, rcConstructing, rcParam, rcNull);
+            LOGERR (klogInt, rc, "missing path for making node");
+        }
+        else if (path == NULL)
+        {
+            rc = RC (rcExe, rcTree, rcConstructing, rcParam, rcNull);
+            LOGERR (klogInt, rc, "missing path for making node");
+        }
+        else
+        {
+            extnode * node;
+
+            node = malloc (sizeof *node);
+            if (node == NULL)
+            {
+                rc = RC (rcExe, rcTree, rcConstructing, rcMemory, rcExhausted);
+                LOGERR (klogFatal, rc, "unable to get memory to make a VPath node");
+            }
+            else
+            {
+                rc = VPathAddRef (path);
+                if (rc == 0)
+                {
+                    node->path = path;
+                    node->offset = offset;
+                    *new_node = node;
+                    return 0;
+                }
+                free (node);
+            }
+        }
+    }
+    return rc;
+}
+
+
+/*  ----------------------------------------------------------------------
+ */
+static
+void CC extnode_whack (BSTNode * n, void * data)
+{
+    if (n)
+    {
+        VPathRelease (((extnode*)n)->path);
+        free (n);
+    }
+}
+
+
+/*  ----------------------------------------------------------------------
+ */
+static
+int64_t CC extnode_sort (const BSTNode * item, const BSTNode * n)
+{
+    const extnode * l;
+    const extnode * r;
+    int64_t       ii;
+
+    l = (const extnode *)item;
+    r = (const extnode *)n;
+
+    if (l->offset < r->offset)
+        ii = -1;
+
+    else if (l->offset > r->offset)
+        ii = 1;
+
+    else
+    {
+        size_t lz;
+        size_t rz;
+        char lbuff [8192];
+        char rbuff [8192];
+        rc_t lrc;
+        rc_t rrc;
+
+        lrc = VPathReadPath (l->path, lbuff, sizeof (lbuff), &lz);
+        if (lrc)
+        {
+            LOGERR (klogInt, lrc, "failed to etract item path");
+            lz = 0;
+        }
+
+        rrc = VPathReadPath (r->path, rbuff, sizeof (rbuff), &rz);
+        if (lrc)
+        {
+            LOGERR (klogInt, rrc, "failed to etract node path");
+            rz = 0;
+        }
+
+        ii = string_cmp (lbuff, lz, rbuff, rz, lz + rz);
+    }
+    return ii;
+}
+
+
+/*  ----------------------------------------------------------------------
+ */
+typedef struct rc_data
+{
+    rc_t rc;
+} rc_data;
+
+
+/*  ----------------------------------------------------------------------
+ */
+static
+bool CC extract_one (BSTNode * n, void * data_)
+{
+    extnode * node;
+    rc_data * data = data_;
+    rc_t rc;
+    size_t z;
+    char buff [8193];
+
+    assert (n);
+    assert (data);
+
+    node = (extnode*)n;
+
+    rc = VPathReadPath (node->path, buff, sizeof (buff) - 1, &z);
+    if (rc)
+        LOGERR (klogErr, rc, "error pulling path for an extraction");
+    else
+    {
+        const KFile * sfile;
+
+        buff[z] = '\0';
+
+/*
+ * use base unless we have to revert to root.
+ * base allows more control over options like password where the outside
+ * archive might have a different password than an inner file
+ */
+#if 1 
+        rc = VFSManagerOpenFileReadDirectoryRelative (options.vfsmgr, options.base,
+                                                          &sfile, node->path);
+#else
+        rc = VFSManagerOpenFileReadDirectoryRelative (options.vfsmgr, options.root,
+                                                      &sfile, node->path);
+#endif
+        if (rc)
+            LOGERR (klogErr, rc, "error opening file within the archive");
+        else
+        {
+            KFile * dfile;
+
+/*             KOutMsg ("%s: %s %x\n", __func__, node->path, options.cm); */
+            rc = KDirectoryCreateFile (options.dir, &dfile, false, 0640, options.cm, "%s", buff);
+            if (rc)
+                PLOGERR (klogErr, (klogErr, rc, "failed to create file '$(P)'", "P=%s", buff));
+            else
+            {
+                const KFile * teefile;
+
+                rc = KFileMakeTeeRead (&teefile, sfile, dfile);
+                if (rc)
+                    PLOGERR (klogErr, (klogErr, rc, "failed pipefitting file '$(P)'", "P=%s", buff));
+                else
+                {
+                    KFileAddRef (sfile);
+                    KFileAddRef (dfile);
+                    rc = KFileRelease (teefile);
+                    if (rc)
+                    PLOGERR (klogErr, (klogErr, rc, "failed copying file '$(P)'", "P=%s", buff));
+                }
+            }
+            KFileRelease (sfile);
+        }
+        KFileRelease (sfile);
+    }
+    data->rc = rc;
+    return (rc != 0);
+}
+
+
+/*  ----------------------------------------------------------------------
+ */
+static
+rc_t extract ()
+{
+    rc_data data;
+    bool failed;
+
+    /* done sequentially - this will cause back ups on reads if both
+     * containers and their contents are extracted
+     *
+     * we are also using a DoUntil approach that quits at the first failed
+     * extract
+     */
+    failed = BSTreeDoUntil (&options.pathtree, false, extract_one, &data);
+    
+    if (failed)
+        LOGERR (klogErr, data.rc, "failure extracting a file");
+
+    return data.rc;
+}
+
+
+/*  ----------------------------------------------------------------------
+ */
+#if 0
+static
+int CC sort_pathpath_cmp (const void ** litem, const void ** ritem, void * data)
+{
+    uint64_t lloc, rloc;
+
+    {
+        const VPath * lpath;
+        size_t z;
+        rc_t rc;
+        char pbuff [8192];
+
+        lpath = *litem;
+
+        rc = VPathReadPath (lpath, pbuff, sizeof pbuff, &z);
+        if (rc == 0)
+        {
+            switch (KDirectoryPathType (options.base, "%s", pbuff))
+            {
+            default:
+                lloc = 0;
+                break;
+            case kptFile:
+                rc = KDirectoryFileLocator (options.base, &lloc, "%s", pbuff);
+                break;
+            }
+            if (rc == 0)
+            {
+                const VPath * rpath;
+
+                rpath = *ritem;
+                rc = VPathReadPath (rpath, pbuff, sizeof pbuff, &z);
+                if (rc == 0)
+                {
+                    switch (KDirectoryPathType (options.base, "%s", pbuff))
+                    {
+                    default:
+                        rloc = 0;
+                        break;
+                    case kptFile:
+                        rc = KDirectoryFileLocator (options.base, &rloc, "%s", pbuff);
+                        break;
+                    }
+                }
+            }
+        }
+        if (rc) /* surrender */
+            lloc = rloc = 0;
+    }
+    
+    {
+        int cmp;
+
+        if (lloc < rloc)
+            cmp = -1;
+        else if (lloc > rloc)
+            cmp = 1;
+        else
+        {
+            assert (lloc == rloc);
+            cmp = 0;
+        };
+
+        return cmp;
+    }
+}
+#endif
+
+
+#if 0
+/*  ----------------------------------------------------------------------
+ */
+static
+bool CC build_tree_add (void * _item, void * _data)
+{
+    build_tree_data * data = _data;
+    return false;
+}
+
+
+/*  ----------------------------------------------------------------------
+ */
+static
+rc_t build_tree ()
+{
+    
+    rc_t rc;
+    rc_data data;
+    bool did_until = false;
+
+    BSTreeInit (&options.pathtree);
+
+    VectorDoUntil (options.pathpath, false, build_tree_add, &data);
+}
+#endif
+
+/*  ----------------------------------------------------------------------
+ */
+static
+rc_t insert_path (const VPath * vpath, uint64_t offset)
+{
+    extnode * node;
+    rc_t rc;
+
+    rc = extnode_make (&node, vpath, offset);
+    if (rc == 0)
+    {
+        rc = BSTreeInsert (&options.pathtree, &node->node, extnode_sort);
+        if (rc)
+            LOGERR (klogInt, rc, "error inserting tree node");
+        else
+            return 0;
+
+        extnode_whack (&node->node, NULL);
+    }
+    return rc;
+}
+
+
+/* ----------------------------------------------------------------------
+ */
+static
+rc_t walk_path_file (char * path, size_t z, uint64_t * offset, KPathType kpt)
+{
+    uint64_t this_offset;
+    char * pc;
+    rc_t rc;
+
+    assert (path);
+    assert (offset);
+
+    this_offset = 0;
+    rc = 0;
+    if (kpt == kptFile)
+    {
+        rc = KDirectoryFileLocator (options.base, &this_offset, "%s", path);
+        if (rc)
+            PLOGERR (klogErr,
+                     (klogErr, rc, "failure walking path '$(P)'",
+                      "P=%s", path));
+    }
+    if (rc == 0)
+    {
+        pc = string_rchr (path, z, '/');
+        if (pc)
+        {
+            uint64_t that_offset;
+            KPathType lkpt;
+
+            *pc = '\0';
+            lkpt = KDirectoryPathType (options.base, "%s", path);
+
+            switch (lkpt)
+            {
+            default:
+                rc = RC (rcExe, rcPath, rcAccessing, rcPath, rcInvalid);
+                break;
+            case kptNotFound:
+            case kptZombieFile:
+                rc = RC (rcExe, rcPath, rcAccessing, rcPath, rcNotFound);
+                break;
+
+            case kptBadPath:
+                rc = RC (rcExe, rcPath, rcAccessing, rcPath, rcInvalid);
+                break;
+
+            case kptFile:
+            case kptDir:
+                /* we should always hit here */
+                rc = walk_path_file (path, z, &that_offset, lkpt);
+                if (rc == 0)
+                {
+                    this_offset += that_offset;
+                }
+                break;
+
+            case kptCharDev:
+            case kptBlockDev:
+            case kptFIFO:
+                rc = RC (rcExe, rcPath, rcAccessing, rcPath, rcIncorrect);
+                break;
+            }
+            *pc = '/';
+        }
+    }
+    *offset = this_offset;
+    return rc;
+}
+
+
+/*  ----------------------------------------------------------------------
+ */
+static
+rc_t walk_path_tree (char * path, size_t z)
+{
+    return 0;
+}
+
+
+/*  ----------------------------------------------------------------------
+ * signature is because this is called by VectorDoUntil
+ */
+static
+void CC handle_path (void * item_, void * data_)
+{
+    if ((item_ != NULL) && (data_ != NULL))
+    {
+        VPath * vpath = item_;
+        rc_data * data = data_;
+        size_t z;
+        rc_t rc;
+        char pbuff [8193];
+/*         char tbuff [8193]; */
+
+        if (data->rc)
+            return;
+
+        /* -1 saves room for a guaranteed NUL */
+        rc = VPathReadPath (vpath, pbuff, sizeof (pbuff) - 1, &z);
+        if (rc)
+            LOGERR (klogErr, rc, "failed to pull path out of VPath");
+
+        else if (z)
+        {
+            KPathType kpt;
+
+            /* force a NUL just in case: we saved room for it */
+            pbuff[z] = '\0';
+
+            /* what type of path is this? */
+            kpt = KDirectoryPathType (options.base, "%s", pbuff);
+
+#if 0
+/* ain't doing this now, and may never because of the root versus base problems */
+            /* dereference links until we're done */
+            while (kpt & kptAlias)
+            {
+                rc = KDirectoryResolveAlias (options.base, true,
+                                             tbuff, sizeof tbuff, "%s", pbuff);
+                if (rc)
+                {
+                    PLOGERR (klogErr,
+                             (klogErr, rc, "error resolving path '$(P)'",
+                              "P=%s", pbuff));
+                    break;
+                }
+                else
+                {
+                    memcpy (tbuff, pbuff, sizeof pbuff);
+                    z = string_size (pbuff);
+                    kpt = KDirectoryPathType (options.root, "%s", pbuff);
+                }
+            }
+#endif
+            /* if we didn't crash this path dereferecing it. */
+            if (rc == 0)
+            {
+                if (kpt & kptAlias)
+                    kpt = kptAlias;
+
+                switch (kpt)
+                {
+                default:
+                    rc = RC (rcExe, rcPath, rcAccessing, rcPath, rcInvalid);
+                    PLOGERR (klogErr,
+                             (klogErr, rc, "unknown problem with path '$(P)'",
+                              "P=%s", pbuff));
+                    break;
+                case kptNotFound:
+                    PLOGERR (klogErr,
+                             (klogErr, rc, "path is a not found in archive '$(P)'",
+                              "P=%s", pbuff));
+                    break;
+
+                case kptZombieFile:
+                    rc = RC (rcExe, rcPath, rcAccessing, rcPath, rcNotFound);
+                    PLOGERR (klogErr,
+                             (klogErr, rc, "path is a not in archive but should be '$(P)'",
+                              "P=%s", pbuff));
+                    break;
+
+                case kptBadPath:
+                    rc = RC (rcExe, rcPath, rcAccessing, rcPath, rcInvalid);
+                    PLOGERR (klogErr,
+                             (klogErr, rc, "unusable path form '$(P)'",
+                              "P=%s", pbuff));
+                    break;
+
+                case kptFile:
+                {
+                    uint64_t offset = 0;
+                    rc = walk_path_file (pbuff, z, &offset, kptFile);
+                    if (rc)
+                        PLOGERR (klogErr,
+                                 (klogErr, rc, "couldn't walk path '$(P)'",
+                                  "P=%s", pbuff));
+                    else
+                    {
+                        rc = insert_path (vpath, offset);
+                        if (rc)
+                            PLOGERR (klogErr,
+                                     (klogErr, rc, "couldn't sort path '$(P)'",
+                                      "P=%s", pbuff));
+                    }
+                    break;
+                }
+                case kptDir:
+                    rc = walk_path_tree (pbuff, z);
+                    break;
+
+                case kptCharDev:
+                case kptBlockDev:
+                case kptFIFO:
+                case kptAlias:
+                    rc = RC (rcExe, rcPath, rcAccessing, rcPath, rcIncorrect);
+                    PLOGERR (klogErr,
+                             (klogErr, rc, "unusable path target type '$(P)'",
+                              "P=%s", pbuff));
+                    break;
+                }
+            }
+        }
+        data->rc = rc;
+    }
+}
+
+
+/*  ----------------------------------------------------------------------
+ */
+static
+rc_t build_tree_then_run ()
+{
+    rc_data data;
+
+    data.rc = 0;
+
+    BSTreeInit (&options.pathtree);
+
+    VectorForEach (&options.pathvpath, false, handle_path, &data);
+
+    if (data.rc == 0)
+        data.rc = extract();
+
+    BSTreeWhack (&options.pathtree, extnode_whack, NULL);
+    
+    return data.rc;
+}
+
+/*  ----------------------------------------------------------------------
+ */
+static
+void CC build_vpath_one (void * item, void * data)
+{
+    const char * path;
+    rc_data * prc;
+
+    path = item;
+    prc = data;
+
+    if (prc->rc == 0)
+    {
+        static const char ccid [] = "copycat-id:";
+        const size_t cz = sizeof (ccid) - 1;
+        size_t pz;
+        const char * hier;
+        const char * ppath;
+        VPath * vpath;
+        rc_t rc;
+        char vbuff [8193];
+
+        rc = 0;
+        ppath = path;
+        pz = string_size (path);
+        hier = string_chr (path, pz, ':');
+
+        if ((hier != NULL) &&
+            (0 == string_cmp (path, (hier+1) - path, ccid, cz /*sizeof (ccid) - 1*/, cz)))
+        {
+            static const char nfile[] = "ncbi-file:";
+            char * qmark;
+            size_t s, r/*, q */;
+            char ibuff [8192];
+            char rbuff [8192];
+
+            ++hier;
+            s = hier - path;
+            r = string_copy (ibuff, sizeof (ibuff), hier, pz - s);
+
+            qmark = string_chr (ibuff, r, '?');
+            if (qmark == NULL) /* this is more future with parts */
+                qmark = string_chr (ibuff, r, '#');
+
+            if (qmark != NULL)
+                *qmark = '\0';
+
+            rc = KDirectoryResolveAlias (options.root, true, rbuff, sizeof (rbuff), "%s", ibuff);
+
+            if (rc)
+                PLOGERR (klogErr, (klogErr, rc, "error resolving file id '$(I)", "I=%s", ibuff));
+
+            else 
+            {
+                char * slash;
+                size_t z;
+
+                slash = string_chr (rbuff+1, sizeof (rbuff), '/');
+                if (slash == NULL)
+                    /* we won't extract the root */
+                    return;
+
+                ++slash;
+
+                z = string_size (slash);
+                if (z == 0)
+                    return;
+
+                if (qmark)
+                {
+                    s = string_copy (vbuff, sizeof (vbuff), nfile, sizeof (nfile));
+                    r = string_copy (vbuff + s, sizeof (vbuff) - s, slash, z);
+                    /*q = */string_copy (vbuff + s + r, (sizeof (vbuff) - s) - r, qmark, pz - (qmark - path));
+                }
+                else
+                {
+                    s = string_copy (vbuff, sizeof (vbuff), slash, z);
+                }
+                ppath = vbuff;
+            }
+        }
+
+        if (rc == 0)
+        {
+            rc = VFSManagerMakePath (options.vfsmgr, &vpath, "%s", ppath);
+            if (rc)
+                ;
+            else
+            {
+                rc = VectorAppend (&options.pathvpath, NULL, vpath);
+                if (rc)
+                {
+                    VPathRelease (vpath);
+                }
+            }
+        }
+        
+        prc->rc = rc;
+    }
+}
+
+
+/*  ----------------------------------------------------------------------
+ */
+static
+void CC build_vpath_whack (void * item, void * data)
+{
+    VPath * p;
+
+    p = item;
+
+    VPathRelease ( p );
+}
+
+/*  ----------------------------------------------------------------------
+ * pull paramstring 1-N and comnvert then to internal VPaths
+ */
+static
+rc_t build_vpath_then_run ()
+{
+    rc_data data;
+
+    data.rc = 0;
+
+    VectorInit (&options.pathvpath, 0, VectorLength (&options.pathstr));
+
+    VectorForEach (&options.pathstr, false, build_vpath_one, &data);
+
+    if (data.rc == 0)
+        build_tree_then_run();
+
+    VectorWhack (&options.pathvpath, build_vpath_whack, NULL);
+
+    return data.rc;
+}
+
+
+/*  ----------------------------------------------------------------------
+ * SCHEME:PATH/FILE?QUERY
+ *
+ * form_one is just a file
+ * form_two is just a path and a file (can ignore scheme until more schemes supported)
+ * form_three is all parts except path present which for here acts like form_one
+ * form_four is all four parts
+ *
+ * path is the directory path leading to root
+ * root will be the directory containing the archive
+ * base will be the archive as a directory
+ */
+static
+rc_t open_root_then_run ()
+{
+    static const char dot[] = ".";
+    char         rootstr [8192];
+    char         basestr [8192];
+    const char * colon;
+    rc_t rc;
+
+    colon = strchr (options.arcstr, ':');
+    if (colon == NULL) /* no scheme so it has to be a plain path */
+    {
+        char * last_slash;
+
+        strcpy (basestr, options.arcstr);
+        last_slash = strrchr (basestr, '/');
+
+        if (last_slash == NULL) /* in this directory */
+        {
+            options.rootstr = dot;
+            options.basestr = options.arcstr;
+            /* done */
+        }
+        else
+        {
+            *last_slash = '\0';
+            options.rootstr = basestr;
+            options.basestr = last_slash + 1;
+            /* done */
+        }
+    }
+    else
+    {
+        char * end_of_root;
+        char * last_slash;
+
+        strcpy (rootstr, colon+1);
+
+        end_of_root = strchr (rootstr, '?');
+
+        if (end_of_root == NULL)
+            end_of_root = strchr (rootstr, '#');
+
+        if (end_of_root)
+            *end_of_root = '\0';
+
+        options.rootstr = rootstr;
+
+        last_slash = strchr (rootstr, '/');
+        if (last_slash == NULL)
+        {
+            /* no path */
+            options.rootstr = dot;
+            options.basestr = options.arcstr;
+            /* done */
+        }
+        else
+        {
+            size_t x,z;
+
+            *last_slash = '\0';
+            options.rootstr = rootstr;
+
+            /* scheme */
+            z = string_size (rootstr);
+
+            x = string_copy (basestr, sizeof (basestr), options.arcstr, (colon + 1) - options.arcstr);
+            strcpy (basestr + x, options.arcstr + x + z + 1);
+            options.basestr = basestr;
+            /* done */
+        }
+    }
+    {
+        KDirectory * cwd;
+
+        rc = VFSManagerGetCWD (options.vfsmgr, &cwd);
+        if (rc)
+            ;
+        else
+        {
+            rc = KDirectoryOpenXTocDirRead (cwd, &options.root, true,
+                                            options.xml, "%s", options.rootstr);
+            if (rc)
+                PLOGERR (klogErr, (klogErr, rc,
+                                   "failed to open XFS from '$(P)' using '$(P)'",
+                                   "P=%s", options.basestr, options.xmlstr));
+            else
+            {
+                rc = VFSManagerMakePath (options.vfsmgr, &options.basepath, "%s", options.basestr);
+                if (rc)
+                    PLOGERR (klogErr, (klogErr, rc,
+                                       "failed to make vpath from '$(P)'",
+                                       "P=%s", options.basestr));
+                else
+                {
+                    rc = VFSManagerOpenDirectoryRead (options.vfsmgr,
+                                                      &options.base,
+                                                      options.basepath);
+                    if (rc == 0)
+                    {
+                        rc = build_vpath_then_run ();
+
+                        KDirectoryRelease (options.base);
+                    }
+                    KDirectoryRelease (options.root);
+                }
+                VPathRelease (options.basepath);
+            }
+            KDirectoryRelease (cwd);
+        }
+    }
+    return rc;
+}
+
+
+/*  ----------------------------------------------------------------------
+ */
+static
+rc_t open_xml_then_run()
+{
+    rc_t rc;
+
+    rc = VFSManagerMakePath (options.vfsmgr, &options.xmlpath, "%s", options.xmlstr);
+    if (rc)
+        PLOGERR (klogInt,
+                 (klogInt, rc, "failed to create path for '$(P)'",
+                  "P=%s", options.xmlstr));
+    else
+    {
+        rc = VFSManagerOpenFileRead (options.vfsmgr, &options.xml, options.xmlpath);
+        if (rc)
+            LOGERR (klogErr, rc, "Failed to open output directoryCopycat XML file");
+        else
+        {
+            rc = open_root_then_run ();
+        }
+        VPathRelease (options.xmlpath);
+    }
+    return rc;
+}
+
+
+/*  ----------------------------------------------------------------------
+ */
+static
+rc_t open_dir_then_run()
+{
+    rc_t rc;
+
+    rc = VFSManagerMakePath (options.vfsmgr, &options.dirpath, "%s", options.dirstr);
+    if (rc)
+        PLOGERR (klogInt,
+                 (klogInt, rc, "failed to create path for '$(P)'",
+                  "P=%s", options.dirstr));
+    else
+    {
+        rc = VFSManagerOpenDirectoryUpdate (options.vfsmgr, &options.dir, options.dirpath);
+        if (rc)
+            LOGERR (klogErr, rc, "Failed to open output directory");
+        else
+        {
+            rc = open_xml_then_run();
+            KDirectoryRelease (options.dir);
+        }
+        VPathRelease (options.dirpath);
+    }
+    return rc;
+}
+
+
+/*  ----------------------------------------------------------------------
+ */
+static
+rc_t open_mgr_then_run()
+{
+    rc_t rc;
+
+    rc = VFSManagerMake (&options.vfsmgr);
+    if (rc)
+        LOGERR (klogInt, rc, "failed to create VFS manager");
+    else
+    {
+        rc = open_dir_then_run ();
+    }
+    return rc;
+}
+
+
+/*  ----------------------------------------------------------------------
+ * KMain
+ *
+ * Figure out what is on the command line
+ */
+rc_t KMain ( int argc, char *argv [] )
+{
+    Args * args;
+    rc_t rc;
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 1, Options, sizeof Options / sizeof (OptDef));
+    if (rc == 0)
+    {
+        /* use do {} while; for easy outs */
+        do
+        {
+            const char * pc;
+            uint32_t pcount;
+
+            rc = ArgsProgram (args, &full_path, &program_name);
+            if (rc)
+            {
+                PLOGERR (klogFatal,
+                         (klogFatal, rc,  "failed to set name to $'(N)'",
+                          "N=%s", program_name));
+                break;
+            }
+
+            rc = ArgsOptionCount (args, OPTION_FORCE, &pcount);
+            if (rc)
+            {
+                LOGERR (klogFatal, rc, "failed to check force option");
+                break;
+            }
+            if (pcount)
+            {
+                options.force = true;
+                options.cm = kcmParents | kcmInit;
+            }
+            else
+            {
+                options.force = true;
+                options.cm = kcmParents | kcmCreate;
+            }
+
+            rc = ArgsOptionCount (args, OPTION_XML, &pcount);
+            if (rc)
+            {
+                LOGERR (klogFatal, rc, "failed to check XML option");
+                break;
+            }
+            if (pcount)
+            {
+                rc = ArgsOptionValue (args, OPTION_XML, 0, (const void **)&options.xmlstr);
+                if (rc)
+                {
+                    LOGERR (klogFatal, rc, "failed to get XML value");
+                    break;
+                }
+            }
+            else
+            {
+                rc = RC (rcExe, rcArgv, rcParsing, rcParam, rcNull);
+                LOGERR (klogFatal, rc, "missing required copycat-xml option");
+                MiniUsage(args);
+                break;
+            }
+
+            rc = ArgsOptionCount (args, OPTION_DIR, &pcount);
+            if (rc)
+            {
+                LOGERR (klogFatal, rc, "failed to check directory option");
+                break;
+            }
+            if (pcount)
+            {
+                rc = ArgsOptionValue (args, OPTION_DIR, 0, (const void **)&options.dirstr);
+                if (rc)
+                {
+                    LOGERR (klogFatal, rc, "failed to get directory value");
+                    break;
+                }
+            }
+            else
+            {
+                options.dirstr = ".";
+            }
+
+
+            rc = ArgsParamCount (args, &pcount);
+            if (rc)
+            {
+                LOGERR (klogFatal, rc, "failed to count parameters");
+                break;
+            }
+            if (pcount == 0)
+            {
+                rc = RC ( rcExe, rcArgv, rcReading, rcParam, rcInsufficient );
+                LOGERR (klogFatal, rc, "Missing archive parameter");
+                MiniUsage (args);
+                break;
+            }
+
+            {
+                uint32_t block;
+
+                block = 1;
+                if (pcount > 2)
+                    block = pcount - 1;
+
+                VectorInit (&options.pathstr, 0, block);
+            }
+
+            rc = ArgsParamValue (args, 0, (const void **)&options.arcstr);
+            if (rc)
+                LOGERR (klogFatal, rc, "failed to retrieve archive parameter");
+            else
+            {
+                if (pcount == 1)
+                {
+                    rc = VectorAppend (&options.pathstr, NULL, ".");
+                    if (rc)
+                        LOGERR (klogFatal, rc, "failed to set default path parameter");
+                }
+                else
+                {
+                    uint32_t ix;
+
+                    for (ix = 1; ix < pcount; ++ix)
+                    {
+                        rc = ArgsParamValue (args, ix, (const void **)&pc);
+                        if (rc)
+                        {
+                            PLOGERR (klogFatal, 
+                                     (klogFatal, rc, "unable to extract path parameter '$(K)",
+                                      "K=%u", ix));
+                            break;
+                        }
+                        rc = VectorAppend (&options.pathstr, NULL, pc);
+                        if (rc)
+                        {
+                            PLOGERR (klogFatal, 
+                                     (klogFatal, rc, "failed to add path '$(P)' to list",
+                                      "P=%s", pc));
+                            break;
+                        }
+                    }
+                }
+            }
+            if (rc == 0)
+                open_mgr_then_run();
+
+            VectorWhack (&options.pathstr, NULL, NULL);
+
+        } while (0);
+        ArgsWhack (args);
+    }                
+    return rc;
+}
diff --git a/tools/cg-load/.gitignore b/tools/cg-load/.gitignore
new file mode 100644
index 0000000..718f861
--- /dev/null
+++ b/tools/cg-load/.gitignore
@@ -0,0 +1,2 @@
+*.vers.h
+*.sh
diff --git a/tools/cg-load/Makefile b/tools/cg-load/Makefile
new file mode 100644
index 0000000..810a0c3
--- /dev/null
+++ b/tools/cg-load/Makefile
@@ -0,0 +1,96 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/cg-load
+
+INT_TOOLS =
+
+EXT_TOOLS = \
+	cg-load
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# cg-load
+#
+CGLOAD_SRC = \
+	cg-load \
+	factory-evidence-intervals \
+	factory-evidence-dnbs \
+	factory-mappings \
+	factory-reads \
+	factory-tag-lfr \
+	f1_3 \
+	f1_5 \
+	f1_7 \
+	f2_0 \
+	f2_2 \
+	f2_5 \
+	file \
+	file-version-factory \
+	formats \
+	writer-algn \
+	writer-evidence-dnbs \
+	writer-evidence-intervals \
+	writer-seq \
+
+CGLOAD_OBJ = \
+	$(addsuffix .$(OBJX),$(CGLOAD_SRC))
+
+CGLOAD_LIB = \
+	-lkapp \
+	-stk-version \
+	-lload \
+	-sncbi-wvdb \
+	-lm
+
+$(BINDIR)/cg-load: $(CGLOAD_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(CGLOAD_LIB)
+
diff --git a/tools/cg-load/cg-load.c b/tools/cg-load/cg-load.c
new file mode 100644
index 0000000..b472f59
--- /dev/null
+++ b/tools/cg-load/cg-load.c
@@ -0,0 +1,1270 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+
+#include "debug.h" /* DEBUG_MSG */
+#include "file.h" /* FGroupMAP_LoadReads */
+#include "formats.h" /* get_cg_reads_ngaps */
+
+#include <kapp/log-xml.h> /* XMLLogger */
+#include <kapp/loader-meta.h> /* KLoaderMeta_Write */
+#include <kapp/main.h> /* KAppVersion */
+
+#include <kdb/manager.h> /* kptDatabase */
+#include <kdb/meta.h> /* KMetadata */
+
+#include <kfs/arc.h> /* KDirectoryOpenArcDirRead */
+#include <kfs/tar.h> /* KArcParseTAR */
+
+#include <klib/out.h> /* OUTMSG */
+#include <klib/printf.h> /* string_printf */
+#include <klib/status.h> /* STSMSG */
+
+#include <vdb/schema.h> /* VDBManagerMakeSchema */
+
+#include <sysalloc.h> /* malloc */
+
+#include <assert.h>
+#include <errno.h>
+
+typedef struct SParam_struct
+{
+    const char* argv0;
+
+    KDirectory* input_dir;
+    const KDirectory *map_dir;
+    const KDirectory *asm_dir;
+    KDirectory* output_dir;
+
+    const char* map_path;
+    const char* asm_path;
+    const char* schema;
+    const char* refseqcfg;
+    const char* refseqpath;
+    const char* library;
+    char const** refFiles; /* NULL-terminated array pointing to argv */
+    /* mostly for debugging */
+    uint32_t refseq_chunk;
+    const char* out;
+    uint32_t force;
+    uint32_t force_refw;
+    uint32_t force_readw;
+    uint32_t no_read_ahead;
+    const char* qual_quant;
+    uint32_t no_spot_group;
+    uint32_t min_mapq;
+    uint32_t single_mate;
+    uint32_t cluster_size;
+    uint32_t load_other_evidence;
+
+    uint32_t read_len;
+} SParam;
+
+typedef struct DB_Handle_struct {
+    VDBManager* mgr;
+    VSchema* schema;
+    VDatabase* db;
+    const ReferenceMgr* rmgr;
+    const CGWriterSeq* wseq;
+    TReadsData* reads;
+    const CGWriterAlgn* walgn;
+    TMappingsData* mappings;
+    const CGWriterEvdInt* wev_int;
+    TEvidenceIntervalsData* ev_int;
+    const CGWriterEvdDnbs* wev_dnb;
+    TEvidenceDnbsData* ev_dnb;
+} DB_Handle;
+
+static
+rc_t DB_Init(const SParam* p, DB_Handle* h)
+{
+    rc_t rc;
+
+    if( (rc = VDBManagerMakeUpdate(&h->mgr, NULL)) != 0 ) {
+        LOGERR(klogErr, rc, "failed to create VDB Manager");
+
+    }
+    else if( (rc = VDBManagerMakeSchema(h->mgr, &h->schema)) != 0 ) {
+        LOGERR(klogErr, rc, "failed to create schema");
+
+    }
+    else if( (rc = VSchemaParseFile(h->schema, "%s", p->schema)) != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to parse schema file '$(schema)'", PLOG_S(schema), p->schema));
+
+    }
+    else if( (rc = VDBManagerCreateDB(h->mgr, &h->db, h->schema, "NCBI:align:db:alignment_evidence",
+                                        p->force ? kcmInit : kcmCreate, p->out)) != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to create database at '$(path)'", PLOG_S(path), p->out));
+
+    }
+    else if( (rc = ReferenceMgr_Make(&h->rmgr, h->db, h->mgr, (p->force_refw ? ewrefmgr_co_allREADs : 0),
+                        p->refseqcfg, p->refseqpath, p->refseq_chunk, 350 * 1024 * 1024, 0)) != 0 ) {
+        LOGERR(klogErr, rc, "failed to create reference manager");
+
+    }
+    else if( (rc = CGWriterAlgn_Make(&h->walgn, &h->mappings, h->db, h->rmgr, p->min_mapq, p->single_mate, p->cluster_size)) != 0 ) {
+        LOGERR(klogErr, rc, "failed to create alignment writer");
+
+    }
+    else if ((rc = CGWriterSeq_Make(&h->wseq, &h->reads, h->db,
+            (p->force_readw ? ewseq_co_SaveRead : 0) |
+                (p->no_spot_group ? 0 : ewseq_co_SpotGroup), p->qual_quant,
+            p->read_len))
+        != 0)
+    {
+        LOGERR(klogErr, rc, "failed to create sequence writer");
+
+    } else if( p->asm_path && (rc = CGWriterEvdInt_Make(&h->wev_int, &h->ev_int, h->db, h->rmgr, 0)) != 0 ) {
+        LOGERR(klogErr, rc, "failed to create evidence intervals writer");
+    }
+    else if (p->asm_path
+        && (rc = CGWriterEvdDnbs_Make
+            (&h->wev_dnb, &h->ev_dnb, h->db, h->rmgr, 0, p->read_len)) != 0)
+    {
+        LOGERR(klogErr, rc, "failed to create evidence dnbs writer");
+    }
+    else {
+        const char** r = p->refFiles;
+        while( rc == 0 && *r != NULL ) {
+            if( (rc = ReferenceMgr_FastaPath(h->rmgr, *r++)) != 0 ) {
+                PLOGERR(klogInfo, (klogInfo, rc, "fasta file '$(file)'", "file=%s", r[-1]));
+            }
+        }
+    }
+    return rc;
+}
+
+static
+rc_t DB_Fini(const SParam* p, DB_Handle* h, bool drop)
+{
+    rc_t rc = 0, rc2;
+
+    /* THIS FUNCTION MAKES NO ATTEMPT TO PRESERVE INITIAL ERROR CODES
+       EACH SUCCESSIVE ERROR OVERWRITES THE PREVIOUS CODE */
+    if( h != NULL ) {
+        PLOGMSG(klogInfo, (klogInfo, "DB_Fini was called with drop=$(drop)",
+            "drop=%s", drop ? "true" : "false"));
+
+        PLOGMSG(klogInfo, (klogInfo, "Fini SEQUENCE", "severity=status"));
+        if( (rc2 = CGWriterSeq_Whack(h->wseq, !drop, NULL)) != 0) {
+            LOGERR(klogErr, rc2, "Failed SEQUENCE release");
+            if (!drop) {
+                drop = true;
+                rc = rc2;
+            }
+        }
+        h->wseq = NULL;
+        h->reads = NULL;
+        PLOGMSG(klogInfo, (klogInfo, "Fini (PRI&SEC)_ALIGNMENT", "severity=status"));
+        if( (rc2 = CGWriterAlgn_Whack(h->walgn, !drop, NULL, NULL)) != 0) {
+            LOGERR(klogErr, rc2, "Failed (PRI&SEC)_ALIGNMENT release");
+            if (!drop) {
+                drop = true;
+                rc = rc2;
+            }
+        }
+        h->walgn = NULL;
+        h->mappings = NULL;
+        PLOGMSG(klogInfo, (klogInfo, "Fini EVIDENCE_INTERVAL", "severity=status"));
+        if( (rc2 = CGWriterEvdInt_Whack(h->wev_int, !drop, NULL)) != 0) {
+            LOGERR(klogErr, rc2, "Failed EVIDENCE_INTERVAL release");
+            if (!drop) {
+                drop = true;
+                rc = rc2;
+            }
+        }
+        h->wev_int = NULL;
+        h->ev_int = NULL;
+        PLOGMSG(klogInfo, (klogInfo, "Fini EVIDENCE_ALIGNMENT", "severity=status"));
+        if( (rc2 = CGWriterEvdDnbs_Whack(h->wev_dnb, !drop, NULL)) != 0) {
+            LOGERR(klogErr, rc2, "Failed EVIDENCE_ALIGNMENT release");
+            if (!drop) {
+                drop = true;
+                rc = rc2;
+            }
+        }
+        h->wev_dnb = NULL;
+        h->ev_dnb = NULL;
+        PLOGMSG(klogInfo, (klogInfo, "Fini calculating reference coverage", "severity=status"));
+        if( (rc2 = ReferenceMgr_Release
+            (h->rmgr, !drop, NULL, drop ? false : true, Quitting)) != 0)
+        {
+            LOGERR(klogErr, rc2, "Failed calculating reference coverage");
+            if (!drop) {
+                drop = true;
+                rc = rc2;
+            }
+        }
+        h->rmgr = NULL;
+        if( rc == 0 )
+        {
+            KMetadata* meta;
+            if( (rc = VDatabaseOpenMetadataUpdate(h->db, &meta)) == 0 ) {
+                KMDataNode *node;
+                if( (rc = KMetadataOpenNodeUpdate(meta, &node, "/")) == 0 ) {
+                    if( (rc = KLoaderMeta_Write(node, p->argv0, __DATE__, "Complete Genomics", KAppVersion())) != 0 ) {
+                        LOGERR(klogErr, rc, "Cannot update loader meta");
+                    }
+                    KMDataNodeRelease(node);
+                }
+                KMetadataRelease(meta);
+            }
+        }
+        PLOGERR(klogInfo, (klogInfo, rc, "Fini VDatabaseRelease", "severity=status"));
+        VDatabaseRelease(h->db);
+        h->db = NULL;
+        VSchemaRelease(h->schema);
+        h->schema = NULL;
+        if( drop || rc != 0 ) {
+            rc2 = VDBManagerDrop(h->mgr, kptDatabase, "%s", p->out);
+            /*if( GetRCState(rc2) == rcNotFound ) {
+                // WHAT WOULD BE THE POINT OF RESETTING "rc" TO ZERO?
+                rc = 0;
+            } else*/ if( rc2 != 0 ) {
+                if ( rc == 0 )
+                    rc = rc2;
+                PLOGERR(klogErr, (klogErr, rc2, "cannot drop db at '$(path)'", PLOG_S(path), p->out));
+            }
+        }
+        VDBManagerRelease(h->mgr);
+        h->mgr = NULL;
+    }
+    return rc;
+}
+
+typedef struct FGroupKey_struct {
+    CG_EFileType type;
+    const CGFIELD_ASSEMBLY_ID_TYPE* assembly_id;
+    union {
+        struct {
+            const CGFIELD_SLIDE_TYPE* slide;
+            const CGFIELD_LANE_TYPE* lane;
+            const CGFIELD_BATCH_FILE_NUMBER_TYPE* batch_file_number;
+        } map;
+        struct {
+            const CGFIELD_SAMPLE_TYPE* sample;
+            const CGFIELD_CHROMOSOME_TYPE* chromosome;
+        } asmb;
+    } u;
+} FGroupKey;
+
+static
+rc_t CC FGroupKey_Make(FGroupKey* key,
+    const CGLoaderFile* file, const SParam* param)
+{
+    rc_t rc = 0;
+    CG_EFileType ftype;
+
+    if( (rc = CGLoaderFile_GetType(file, &ftype)) == 0 ) {
+        switch(ftype) {
+            case cg_eFileType_READS:
+            case cg_eFileType_MAPPINGS:
+            case cg_eFileType_TAG_LFR:
+                key->type = cg_eFileType_READS;
+                if ((rc = CGLoaderFile_GetAssemblyId(file, &key->assembly_id)) == 0 &&
+                    (rc = CGLoaderFile_GetSlide(file, &key->u.map.slide)) == 0 &&
+                    (rc = CGLoaderFile_GetLane(file, &key->u.map.lane)) == 0)
+                {
+                    rc = CGLoaderFile_GetBatchFileNumber(file,
+                        &key->u.map.batch_file_number);
+                }
+                break;
+            case cg_eFileType_EVIDENCE_INTERVALS:
+            case cg_eFileType_EVIDENCE_DNBS:
+                if( param->asm_path != NULL ) {
+                    /* do not pick up ASM files if not requested */
+                    key->type = cg_eFileType_EVIDENCE_INTERVALS;
+                    if( (rc = CGLoaderFile_GetAssemblyId(file, &key->assembly_id)) == 0 &&
+                        (rc = CGLoaderFile_GetSample(file, &key->u.asmb.sample)) == 0 ) {
+                        rc = CGLoaderFile_GetChromosome(file, &key->u.asmb.chromosome);
+                    }
+                    break;
+                }
+            default:
+                rc = RC(rcExe, rcQueue, rcInserting, rcItem, rcIgnored);
+                break;
+        }
+    }
+    return rc;
+}
+static
+rc_t CC FGroupKey_Validate(const FGroupKey* key)
+{
+    rc_t rc = 0;
+    DEBUG_MSG(5, ("KEY: "));
+    switch( key->type ) {
+        case cg_eFileType_READS:
+            DEBUG_MSG(5, ("%s:%s:%s:%04u", key->assembly_id, key->u.map.slide, key->u.map.lane, key->u.map.batch_file_number));
+            if( !key->assembly_id || !key->u.map.slide || !key->u.map.lane || !key->u.map.batch_file_number ) {
+                rc = RC(rcExe, rcQueue, rcValidating, rcId, rcIncomplete);
+            }
+            break;
+        case cg_eFileType_EVIDENCE_INTERVALS:
+            DEBUG_MSG(5, ("%s:%s:%s", key->assembly_id, key->u.asmb.sample, key->u.asmb.chromosome));
+            if( !key->assembly_id || !key->u.asmb.sample || !key->u.asmb.chromosome ) {
+                rc = RC(rcExe, rcQueue, rcValidating, rcId, rcIncomplete);
+            }
+            break;
+        default:
+            DEBUG_MSG(5, ("CORRUPT!!"));
+            rc = RC(rcExe, rcQueue, rcValidating, rcId, rcWrongType);
+            break;
+    }
+    return rc;
+}
+
+typedef struct FGroupMAP_struct {
+    BSTNode dad;
+    FGroupKey key;
+    const CGLoaderFile* seq;
+    const CGLoaderFile* align;
+    const CGLoaderFile* tagLfr;
+} FGroupMAP;
+
+static
+void FGroupMAP_CloseFiles(FGroupMAP *g)
+{
+    CGLoaderFile_Close(g->seq);
+    CGLoaderFile_Close(g->align);
+    CGLoaderFile_Close(g->tagLfr);
+}
+
+static void CC FGroupMAP_Whack(BSTNode *node, void *data) {
+    FGroupMAP* n = (FGroupMAP*)node;
+
+    CGLoaderFile_Release(n->seq   , false);
+    CGLoaderFile_Release(n->align , false);
+    CGLoaderFile_Release(n->tagLfr, false);
+
+    free(node);
+}
+
+static
+int64_t CC FGroupMAP_Cmp( const void *item, const BSTNode *node )
+{
+    const FGroupKey* i = (const FGroupKey*)item;
+    const FGroupMAP* n = (const FGroupMAP*)node;
+
+    int64_t r = strcmp(i->assembly_id, n->key.assembly_id);
+    if( r == 0 ) {
+        if( i->type == n->key.type ) {
+            switch( i->type ) {
+                case cg_eFileType_READS:
+                    if( (r = strcmp(i->u.map.slide, n->key.u.map.slide)) == 0 ) {
+                        if( (r = strcmp(i->u.map.lane, n->key.u.map.lane)) == 0 ) {
+                            r = (int64_t)(*(i->u.map.batch_file_number)) - (int64_t)(*(n->key.u.map.batch_file_number));
+                        }
+                    }
+                    break;
+                case cg_eFileType_EVIDENCE_INTERVALS:
+                    if( (r = strcmp(i->u.asmb.sample, n->key.u.asmb.sample)) == 0 ) {
+                        r = strcmp(i->u.asmb.chromosome, n->key.u.asmb.chromosome);
+                    }
+                    break;
+                default:
+                    r = -1;
+                    break;
+            }
+        } else {
+            r = -1;
+        }
+    }
+    return r;
+}
+
+static
+int64_t CC FGroupMAP_Sort( const BSTNode *item, const BSTNode *n )
+{
+    return FGroupMAP_Cmp(&((const FGroupMAP*)item)->key, n);
+}
+
+typedef struct FGroupMAP_FindData_struct {
+    FGroupKey key;
+    int64_t rowid;
+} FGroupMAP_FindData;
+
+static
+bool CC FGroupMAP_FindRowId( BSTNode *node, void *data )
+{
+    FGroupMAP_FindData* d = (FGroupMAP_FindData*)data;
+    const FGroupMAP* n = (const FGroupMAP*)node;
+
+    if( FGroupMAP_Cmp(&d->key, node) == 0 ) {
+        if( CGLoaderFile_GetStartRow(n->seq, &d->rowid) == 0 ) {
+            return true;
+        }
+    }
+    return false;
+}
+
+static
+rc_t CC FGroupMAP_Set(FGroupMAP* g, const CGLoaderFile* file)
+{
+    rc_t rc = 0;
+    CG_EFileType ftype;
+
+    if( (rc = CGLoaderFile_GetType(file, &ftype)) == 0 ) {
+        if( g->key.type == cg_eFileType_READS ) {
+            if( ftype == cg_eFileType_READS ) {
+                if( g->seq == NULL ) {
+                    g->seq = file;
+                } else {
+                    rc = RC(rcExe, rcQueue, rcInserting, rcItem, rcDuplicate);
+                }
+            } else if( ftype == cg_eFileType_MAPPINGS ) {
+                if( g->align == NULL ) {
+                    g->align = file;
+                } else {
+                    rc = RC(rcExe, rcQueue, rcInserting, rcItem, rcDuplicate);
+                }
+            }
+            else if (ftype == cg_eFileType_TAG_LFR) {
+                if (g->tagLfr == NULL) {
+                    g->tagLfr = file;
+                } else {
+                    rc = RC(rcExe, rcQueue, rcInserting, rcItem, rcDuplicate);
+                }
+            } else {
+                rc = RC(rcExe, rcQueue, rcInserting, rcItem, rcWrongType);
+            }
+        } else if( g->key.type == cg_eFileType_EVIDENCE_INTERVALS ) {
+            if( ftype == cg_eFileType_EVIDENCE_INTERVALS ) {
+                if( g->seq != NULL ) {
+                    rc = RC(rcExe, rcQueue, rcInserting, rcItem, rcDuplicate);
+                } else {
+                    g->seq = file;
+                }
+            } else if( ftype == cg_eFileType_EVIDENCE_DNBS ) {
+                if( g->align == NULL ) {
+                    g->align = file;
+                } else {
+                    rc = RC(rcExe, rcQueue, rcInserting, rcItem, rcDuplicate);
+                }
+            } else {
+                rc = RC(rcExe, rcQueue, rcInserting, rcItem, rcWrongType);
+            }
+        } else {
+            rc = RC(rcExe, rcQueue, rcInserting, rcType, rcUnexpected);
+        }
+    }
+    return rc;
+}
+
+static
+void CC FGroupMAP_Validate( BSTNode *n, void *data )
+{
+    const FGroupMAP* g = (const FGroupMAP*)n;
+    rc_t rc = 0, *rc_out = (rc_t*)data;
+    const char* rnm = NULL, *mnm = NULL;
+
+    rc = FGroupKey_Validate(&g->key);
+    if( g->seq != NULL ) {
+        CGLoaderFile_Filename(g->seq, &rnm);
+        rnm = rnm ? strrchr(rnm, '/') : rnm;
+        DEBUG_MSG(5, (" READS(%s)", rnm));
+    }
+    if( g->align ) {
+        CGLoaderFile_Filename(g->align, &mnm);
+        mnm = mnm ? strrchr(mnm, '/') : mnm;
+        DEBUG_MSG(5, (" MAPPINGS(%s)", mnm));
+    }
+    if (g->tagLfr != NULL) {
+        CGLoaderFile_Filename(g->tagLfr, &mnm);
+        mnm = mnm ? strrchr(mnm, '/') : mnm;
+        DEBUG_MSG(5, (" TAG_LFR(%s)", mnm));
+    }
+    DEBUG_MSG(5, ("\n"));
+    if( rc == 0 && g->seq == NULL ) {
+        rc = RC(rcExe, rcQueue, rcValidating, rcItem, rcIncomplete);
+    }
+
+    /* THIS USED TO WIPE OUT THE "rc" ON EACH ENTRY */
+    if( rc != 0)  {
+        PLOGERR(klogErr, (klogErr, rc,  "file pair $(f1)[mandatory], $(f2)[optional]", PLOG_2(PLOG_S(f1),PLOG_S(f2)), rnm, mnm));
+        if ( * rc_out == 0 )
+            *rc_out = rc;
+#if 0
+    } else {
+        *rc_out = RC(0, 0, 0, 0, 0);
+#endif
+    }
+}
+
+typedef struct DirVisit_Data_Struct {
+    const SParam* param;
+    BSTree* tree;
+    const KDirectory* dir;
+    uint32_t format_version;
+} DirVisit_Data;
+
+/* you cannot addref to this dir object cause it's created on stack silently */
+static
+rc_t CC DirVisitor(const KDirectory *dir, uint32_t type, const char *name, void *data)
+{
+    rc_t rc = 0;
+    DirVisit_Data* d = (DirVisit_Data*)data;
+
+    assert(d);
+
+    if( (type & ~kptAlias) == kptFile ) {
+        if (strcmp(&name[strlen(name) - 4], ".tsv") == 0 ||
+            strcmp(&name[strlen(name) - 8], ".tsv.bz2") == 0 ||
+            strcmp(&name[strlen(name) - 7], ".tsv.gz") == 0)
+        {
+            char buf[4096] = "";
+            const CGLoaderFile* file = NULL;
+            FGroupKey key;
+            if( (rc = KDirectoryResolvePath(dir, true, buf, sizeof(buf), "%s", name)) == 0 &&
+                (rc = CGLoaderFile_Make(&file, d->dir, buf, NULL, !d->param->no_read_ahead)) == 0 &&
+                (rc = FGroupKey_Make(&key, file, d->param)) == 0 )
+            {
+                FGroupMAP* found = (FGroupMAP*)BSTreeFind(d->tree, &key, FGroupMAP_Cmp);
+
+                assert(file && file->cg_file);
+                if (file->cg_file->type == cg_eFileType_READS ||
+                    file->cg_file->type == cg_eFileType_MAPPINGS)
+                {
+                    if (d->format_version == 0) {
+                        d->format_version = file->cg_file->format_version;
+                    }
+                    else if (d->format_version != file->cg_file->format_version)
+                    {
+                        rc = RC(rcExe, rcFile, rcInserting,
+                            rcData, rcInconsistent);
+                        PLOGERR(klogErr, (klogErr, rc, "READS or MAPPINGS "
+                            "format_version mismatch: $(o) vs. $(n)",
+                            "o=%d,n=%d",
+                            d->format_version, file->cg_file->format_version));
+                    }
+                }
+
+                if (rc == 0) {
+                    if (d->param != NULL && ! d->param->load_other_evidence &&
+                        strstr(buf, "/EVIDENCE") != NULL &&
+                        strstr(buf, "/EVIDENCE/") == NULL)
+                    {
+                        DEBUG_MSG(5, ("file %s recognized as %s: ignored\n",
+                            name, buf));
+                        rc = CGLoaderFile_Release(file, true);
+                        file = NULL;
+                    }
+                    else {
+                        DEBUG_MSG(5, ("file %s recognized as %s\n", name, buf));
+                        if (found != NULL) {
+                            rc = FGroupMAP_Set(found, file);
+                        }
+                        else {
+                            FGroupMAP* x = calloc(1, sizeof(*x));
+                            if (x == NULL) {
+                                rc = RC(rcExe,
+                                    rcFile, rcInserting, rcMemory, rcExhausted);
+                            }
+                            else {
+                                memcpy(&x->key, &key, sizeof(key));
+                                if ((rc = FGroupMAP_Set(x, file)) == 0) {
+                                    rc = BSTreeInsertUnique(d->tree,
+                                        &x->dad, NULL, FGroupMAP_Sort);
+                                }
+                            }
+                        }
+                    }
+                }
+            } else if( GetRCObject(rc) == rcItem && GetRCState(rc) == rcIgnored ) {
+                DEBUG_MSG(5, ("file %s ignored\n", name));
+                rc = CGLoaderFile_Release(file, true);
+                file = NULL;
+            }
+            if( rc != 0 && file != NULL ) {
+                CGLoaderFile_LOG(file, klogErr, rc, NULL, NULL);
+                CGLoaderFile_Release(file, true);
+            }
+        } else if( strcmp(&name[strlen(name) - 4], ".tar") == 0 ) {
+            const KDirectory* tmp = d->dir;
+            if( (rc = KDirectoryOpenArcDirRead(dir, &d->dir, true, name, tocKFile, KArcParseTAR, NULL, NULL)) == 0 ) {
+                rc = KDirectoryVisit(d->dir, true, DirVisitor, d, ".");
+                KDirectoryRelease(d->dir);
+            }
+            d->dir = tmp;
+        }
+    }
+    return rc;
+}
+
+typedef struct FGroupMAP_LoadData_struct {
+    rc_t rc;
+    const SParam* param;
+    DB_Handle db;
+    const BSTree* reads;
+} FGroupMAP_LoadData;
+
+typedef enum {
+    eCtxRead,
+    eCtxLfr,
+    eCtxMapping
+} TCtx;
+static bool _FGroupMAPDone(FGroupMAP *self, TCtx ctx, FGroupMAP_LoadData* d) {
+    /* (rcData rcDone) is always set on reads file EOF */
+    bool eofLfr = true;
+    bool eofMapping = true;
+    assert(self && d);
+    if (d->rc == 0 ||
+        GetRCState(d->rc) != rcDone || GetRCObject(d->rc) != (enum RCObject)rcData)
+    {
+        return false;
+    }
+    d->rc = 0;
+    if (d->rc == 0 && self->tagLfr != NULL) {
+        d->rc = CGLoaderFile_IsEof(self->tagLfr, &eofLfr);
+    }
+    if (d->rc == 0 && self->align != NULL) {
+        d->rc = CGLoaderFile_IsEof(self->align, &eofMapping);
+    }
+    if (d->rc == 0) {
+        switch (ctx) {
+            case eCtxRead:
+                if (!eofLfr) {
+                    /* not EOF */
+                    d->rc = RC(rcExe, rcFile, rcReading, rcData, rcUnexpected);
+                    CGLoaderFile_LOG(self->align, klogErr, d->rc,
+                        "extra tag LFRs, possible that corresponding "
+                        "reads file is truncated", NULL);
+                }
+                else if (!eofMapping) {
+                    /* not EOF */
+                    d->rc = RC(rcExe, rcFile, rcReading, rcData, rcUnexpected);
+                    CGLoaderFile_LOG(self->align, klogErr, d->rc,
+                        "extra mappings, possible that corresponding "
+                        "reads file is truncated", NULL);
+                }
+                break;
+            case eCtxLfr:
+            case eCtxMapping:
+                d->rc = RC(rcExe, rcFile, rcReading, rcCondition, rcInvalid);
+                break;
+            default:
+                assert(0);
+                break;
+        }
+    }
+    if (d->rc == 0) {
+        /* mappings and lfr file EOF detected ok */
+        DEBUG_MSG(5, (" done\n", FGroupKey_Validate(&self->key)));
+    }
+    return true;
+}
+
+bool CC FGroupMAP_LoadReads( BSTNode *node, void *data )
+{
+    TCtx ctx = eCtxRead;
+    FGroupMAP* n = (FGroupMAP*)node;
+    FGroupMAP_LoadData* d = (FGroupMAP_LoadData*)data;
+
+    bool done = false;
+
+    DEBUG_MSG(5, (" started\n", FGroupKey_Validate(&n->key)));
+    while (!done && d->rc == 0) {
+        ctx = eCtxRead;
+        d->rc = CGLoaderFile_GetRead(n->seq, d->db.reads);
+        if (d->rc == 0 && n->tagLfr != NULL) {
+            ctx = eCtxLfr;
+            d->rc = CGLoaderFile_GetTagLfr(n->tagLfr, d->db.reads);
+        }
+        if (d->rc == 0) {
+            if ((d->db.reads->flags
+                   & (cg_eLeftHalfDnbNoMatches | cg_eLeftHalfDnbMapOverflow))
+                &&
+                (d->db.reads->flags
+                   & (cg_eRightHalfDnbNoMatches | cg_eRightHalfDnbMapOverflow)))
+            {
+                d->db.mappings->map_qty = 0;
+            } else {
+                ctx = eCtxMapping;
+                d->rc = CGLoaderFile_GetMapping(n->align, d->db.mappings);
+            }
+/* alignment written 1st than sequence -> primary_alignment_id must be set!! */
+            if (d->rc == 0 &&
+                (d->rc = CGWriterAlgn_Write(d->db.walgn, d->db.reads)) == 0)
+            {
+                d->rc = CGWriterSeq_Write(d->db.wseq);
+            }
+        }
+        done = _FGroupMAPDone(n, ctx, d);
+        d->rc = d->rc ? d->rc : Quitting();
+    }
+    if( d->rc != 0 ) {
+        CGLoaderFile_LOG(n->seq, klogErr, d->rc, NULL, NULL);
+        CGLoaderFile_LOG(n->align, klogErr, d->rc, NULL, NULL);
+    }
+
+    FGroupMAP_CloseFiles(n);
+    return d->rc != 0;
+}
+
+bool CC FGroupMAP_LoadEvidence( BSTNode *node, void *data )
+{
+    FGroupMAP* n = (FGroupMAP*)node;
+    FGroupMAP_LoadData* d = (FGroupMAP_LoadData*)data;
+
+    DEBUG_MSG(5, ("' started\n", FGroupKey_Validate(&n->key)));
+     while( d->rc == 0 ) {
+        if( (d->rc = CGLoaderFile_GetEvidenceIntervals(n->seq, d->db.ev_int)) == 0 ) {
+            int64_t evint_rowid;
+            if( n->align != NULL ) {
+                d->rc = CGLoaderFile_GetEvidenceDnbs(n->align, d->db.ev_int->interval_id, d->db.ev_dnb);
+            } else {
+		d->db.ev_dnb->qty = 0; /***weird, but the easiest place to fix ***/
+	    }
+            /* interval written 1st than dnbs which uses interval as reference */
+            if( d->rc == 0 ) {
+                d->rc = CGWriterEvdInt_Write(d->db.wev_int, d->db.ev_dnb, &evint_rowid);
+            }
+            if( d->rc == 0 && n->align != NULL ) {
+                /* attach dnbs to reads */
+                uint16_t i;
+                FGroupMAP_FindData found;
+
+                found.key.type = cg_eFileType_READS;
+                d->rc = CGLoaderFile_GetAssemblyId(n->align, &found.key.assembly_id);
+                for(i = 0; d->rc == 0 && i < d->db.ev_dnb->qty; i++) {
+                    found.key.u.map.slide = d->db.ev_dnb->dnbs[i].slide;
+                    found.key.u.map.lane = d->db.ev_dnb->dnbs[i].lane;
+                    found.key.u.map.batch_file_number = &d->db.ev_dnb->dnbs[i].file_num_in_lane;
+                    if( BSTreeDoUntil(d->reads, false, FGroupMAP_FindRowId, &found) ) {
+                        d->rc = CGWriterEvdDnbs_SetSEQ(d->db.wev_dnb, i, found.rowid);
+                    } else {
+                        d->rc = RC(rcExe, rcFile, rcWriting, rcData, rcInconsistent);
+                    }
+                }
+            }
+            if( d->rc == 0 && n->align != NULL ) {
+                d->rc = CGWriterEvdDnbs_Write(d->db.wev_dnb, d->db.ev_int, evint_rowid);
+            }
+        }
+        if( GetRCState(d->rc) == rcDone && GetRCObject(d->rc) == (enum RCObject)rcData ) {
+            bool eof = false;
+            d->rc = 0;
+            if( n->align == NULL || ((d->rc = CGLoaderFile_IsEof(n->align, &eof)) == 0 && eof) ) {
+                /* dnbs file EOF detected ok */
+                DEBUG_MSG(5, ("' done\n", FGroupKey_Validate(&n->key)));
+                break;
+            } else if( d->rc == 0 ) {
+                /* not EOF */
+                d->rc = RC(rcExe, rcFile, rcReading, rcData, rcUnexpected);
+                CGLoaderFile_LOG(n->align, klogErr, d->rc,
+                    "extra dnbs, possible that corresponding intervals file is truncated", NULL);
+            }
+        }
+        d->rc = d->rc ? d->rc : Quitting();
+    }
+    if( d->rc != 0 ) {
+        CGLoaderFile_LOG(n->seq, klogErr, d->rc, NULL, NULL);
+        CGLoaderFile_LOG(n->align, klogErr, d->rc, NULL, NULL);
+    }
+    FGroupMAP_CloseFiles(n);
+    return d->rc != 0;
+}
+
+
+static const char * lib_dst = "extra/library";
+
+static rc_t copy_library( const KDirectory * src_dir, KDirectory * dst_dir,
+                          const char * in_path, const char * out_path )
+{
+    rc_t rc;
+    size_t l = string_size( out_path ) + string_size( lib_dst ) + 2;
+    char * dst = malloc( l );
+    if ( dst == NULL )
+        rc = RC( rcExe, rcFile, rcCopying, rcMemory, rcExhausted );
+    else
+    {
+        size_t written;
+        rc = string_printf( dst, l, &written, "%s/%s", out_path, lib_dst );
+        if ( rc == 0 )
+            rc = KDirectoryCopy( src_dir, dst_dir, true, in_path, dst );
+        free( dst );
+    }
+    return rc;
+}
+
+
+static rc_t open_dir_or_tar( const KDirectory *dir, const KDirectory **sub, const char * name )
+{
+    rc_t rc1, rc2;
+    rc1 = KDirectoryOpenDirRead( dir, sub, true, "%s", name );
+    if ( rc1 != 0 )
+    {
+        rc2 = KDirectoryOpenTarArchiveRead( dir, sub, true, "%s", name );
+        if ( rc2 == 0 )
+            rc1 = rc2;
+    }
+    return rc1;
+}
+
+static rc_t Load( SParam* param )
+{
+    rc_t rc = 0, rc1 = 0;
+    BSTree slides, evidence;
+    
+
+    param->map_dir = NULL;
+    param->asm_dir = NULL;
+    param->output_dir = ( KDirectory * )param->input_dir;
+    BSTreeInit( &slides );
+    BSTreeInit( &evidence );
+
+    rc = open_dir_or_tar( param->input_dir, &param->map_dir, param->map_path );
+    if ( rc == 0 )
+    {
+        DirVisit_Data dv;
+
+        dv.param = param;
+        dv.tree = &slides;
+        dv.dir = param->map_dir;
+        dv.format_version = 0;
+        rc = KDirectoryVisit( param->map_dir, true, DirVisitor, &dv, NULL );
+        if ( rc == 0 )
+        {
+            if ( param->asm_path != NULL )
+            {
+                rc_t rc2 = open_dir_or_tar( param->input_dir, &param->asm_dir, param->asm_path );
+                if ( rc2 == 0 )
+                {
+                    dv.tree = &evidence;
+                    dv.dir = param->asm_dir;
+                    rc = KDirectoryVisit( param->asm_dir, true, DirVisitor, &dv, NULL );
+                }
+            }
+
+            if (rc == 0) {
+                param->read_len = get_cg_read_len(dv.format_version);
+            }
+
+            if ( rc == 0 )
+            {
+                /* SHOULD HAVE A BSTreeEmpty FUNCTION OR SOMETHING...
+                   MAKE ONE HERE - WITH KNOWLEDGE THAT TREE IS NOT NULL: */
+#ifndef BSTreeEmpty
+#define BSTreeEmpty( bst ) \
+    ( ( bst ) -> root == NULL )
+#endif
+                if ( BSTreeEmpty ( & slides ) && BSTreeEmpty ( & evidence ) )
+                    rc = RC( rcExe, rcFile, rcReading, rcData, rcInsufficient );
+                else
+                {
+                    /* CORRECTED SETTING OF "rc" IN "FGroupMAP_Validate" */
+                    assert ( rc == 0 );
+                    BSTreeForEach( &slides, false, FGroupMAP_Validate, &rc );
+                    BSTreeForEach( &evidence, false, FGroupMAP_Validate, &rc );
+                }
+
+                if ( rc == 0 )
+                {
+                    FGroupMAP_LoadData data;
+
+                    PLOGMSG( klogInfo, ( klogInfo, "file set validation complete", "severity=status" ) );
+                    memset( &data, 0, sizeof( data ) );
+                    data.rc = 0;
+                    data.param = param;
+                    data.reads = &slides;
+                    rc = DB_Init( param, &data.db );
+                    if ( rc == 0 )
+                    {
+                        BSTreeDoUntil( &slides, false, FGroupMAP_LoadReads, &data );
+                        rc = data.rc;
+                        if ( rc == 0 )
+                        {
+                            PLOGMSG( klogInfo, ( klogInfo, "MAP loaded", "severity=status" ) );
+                            BSTreeDoUntil( &evidence, false, FGroupMAP_LoadEvidence, &data );
+                            rc = data.rc;
+                            if ( rc == 0 )
+                                PLOGMSG( klogInfo, ( klogInfo, "ASM loaded", "severity=status" ) );
+                        }
+                    }
+                    rc1 = DB_Fini( param, &data.db, rc != 0 );
+                    if ( rc == 0 )
+                        rc = rc1;
+                }
+            }
+        }
+
+        /* copy the extra library ( file or recursive directory ) */
+        if ( rc == 0 && param->library != NULL )
+        {
+            const KDirectory *lib_src;
+            rc = open_dir_or_tar( param->input_dir, &lib_src, param->library );
+            if ( rc == 0 )
+            {
+                rc = copy_library( param->input_dir, param->output_dir,
+                                   param->library, param->out );
+                if ( rc == 0 )
+                    STSMSG( 0, ( "extra lib copied" ) );
+                else
+                    LOGERR( klogErr, rc, "failed to copy extra library" );
+                KDirectoryRelease( lib_src );
+            }
+/*
+            else
+            {
+                rc = copy_library( param->input_dir, param->output_dir,
+                                   ".", param->out );
+                if ( rc == 0 )
+                    STSMSG( 0, ( "extra lib copied" ) );
+                else
+                    LOGERR( klogErr, rc, "failed to copy extra library" );
+            }
+*/
+        }
+        KDirectoryRelease( param->map_dir );
+        KDirectoryRelease( param->asm_dir );
+    }
+    BSTreeWhack( &slides, FGroupMAP_Whack, NULL );
+    BSTreeWhack( &evidence, FGroupMAP_Whack, NULL );
+    return rc;
+}
+
+const char* map_usage[] = {"MAP input directory path containing files", NULL};
+const char* asm_usage[] = {"ASM input directory path containing files", NULL};
+const char* load_extra_evidence_usage[]
+    = { "load extra evidence files", NULL};
+const char* schema_usage[] = {"database schema file name", NULL};
+const char* output_usage[] = {"output database path", NULL};
+const char* force_usage[] = {"force output overwrite", NULL};
+const char* refseqcfg_usage[] = {"path to a file with reference-to-accession list", NULL};
+const char* refseqpath_usage[] = {"path to a directory with reference sequences in fasta", NULL};
+const char* refseqchunk_usage[] = {NULL, "hidden param to override REFERENCE table seq chunk size for testing", NULL};
+const char* reffile_usage[] = {"path to fasta file with references", NULL};
+const char* forceref_usage[] = {"force reference sequence write", NULL};
+const char* forceread_usage[] = {"force reads write", NULL};
+const char* qualquant_usage[] = {"quality scores quantization level, can be a number (0: none, 1: 2bit, 2: 1bit), or a string like '1:10,10:20,20:30,30:-' (which is equivalent to 1)", NULL};
+const char* nospotgroup_usage[] = {"do not write source file key to SPOT_GROUP column", NULL};
+const char* min_mapq_usage[] = {"filter secondary mappings by minimum weight (phred)", NULL};
+const char* no_secondary_usage[] = {"preserve only one mapping per half-DNB based on weight", NULL};
+const char* single_mate_usage[] = {"if secondary mates have duplicates preserve only one in each pair based on weight", NULL};
+const char* cluster_size_usage[] = {"defines cluster window on the reference, records only 1 placement from given cluster size; default is zero which means ignore", NULL};
+const char* no_read_ahead_usage[] = {"disable input files threaded caching", NULL};
+const char* library_usage[] = {"copy extra file/directory into output", NULL};
+
+/* this enum must have same order as MainArgs array below */
+enum OptDefIndex {
+    eopt_MapInput = 0,
+    eopt_AsmInput,
+    eopt_LoadExtraEvidence,
+    eopt_Schema,
+    eopt_RefSeqConfig,
+    eopt_RefSeqPath,
+    eopt_RefSeqChunk,
+    eopt_RefFile,
+    eopt_Output,
+    eopt_Force,
+    eopt_ForceRef,
+    eopt_ForceRead,
+    eopt_QualQuantization,
+    eopt_NoSpotGroup,
+    eopt_MinMapQ,
+    eopt_No2nd_ary,
+    eopt_SingleMate,
+    eopt_ClusterSize,
+    eopt_noReadAhead,
+    eopt_Library
+};
+
+OptDef MainArgs[] =
+{
+    /* if you change order in this array, rearrange enum above accordingly! */
+    { "map",              "m",  NULL, map_usage,            1, true,  true  },
+    { "asm",              "a",  NULL, asm_usage,            1, true,  false },
+    { "load-extra-evidence", NULL, NULL,
+                                 load_extra_evidence_usage, 1, false, false },
+    { "schema",           "s",  NULL, schema_usage,         1, true,  false },
+    { "refseq-config",    "k",  NULL, refseqcfg_usage,      1, true,  false },
+    { "refseq-path",      "i",  NULL, refseqpath_usage,     1, true,  false },
+    { "refseq-chunk",     "C",  NULL, refseqchunk_usage,    1, true,  false },
+    { "ref-file",         "r",  NULL, reffile_usage,        1, true,  false },
+    { "output",           "o",  NULL, output_usage,         1, true,  true  },
+    { "force",            "f",  NULL, force_usage,          1, false, false },
+    { "write-reference",  "g",  NULL, forceref_usage,       1, false, false },
+    { "write-read",       "w",  NULL, forceread_usage,      1, false, false },
+    { "qual-quant",       "Q",  NULL, qualquant_usage,      1, true,  false },
+    { "no-spotgroup",     "G",  NULL, nospotgroup_usage,    1, false, false },
+    { "min-mapq",         "q",  NULL, min_mapq_usage,       1, true,  false },
+    { "no-secondary",     "P",  NULL, no_secondary_usage,   1, false, false },
+    { "single-mate",      NULL, NULL, single_mate_usage,    1, false, false },
+    { "cluster-size",     NULL, NULL, cluster_size_usage,   1, true,  false },
+    { "input-no-threads", "t",  NULL, no_read_ahead_usage,  1, false, false },
+    { "library",          "l",  NULL, library_usage,        1, true,  false }
+};
+const size_t MainArgsQty = sizeof(MainArgs) / sizeof(MainArgs[0]);
+
+rc_t UsageSummary (char const * progname)
+{
+    OUTMSG((
+        "Usage:\n"
+        "\t%s [options] -m map-dir -o path-to-run\n"
+        "\n"
+        "Summary:\n"
+        "\tLoad a Complete Genomics formatted data files\n"
+        "\n"
+        "Example:\n"
+        "\t%s -m build36/MAP -o /tmp/SRZ123456\n"
+        "\n"
+        ,progname, progname));
+    return 0;
+}
+
+char const UsageDefaultName[] = "cg-load";
+
+rc_t CC Usage( const Args* args )
+{
+    rc_t rc;
+    int i;
+    const char* progname = UsageDefaultName;
+    const char* fullname = UsageDefaultName;
+
+    rc = ArgsProgram(args, &fullname, &progname);
+
+    UsageSummary(progname);
+
+    for(i = 0; i < MainArgsQty; i++ ) {
+        if( MainArgs[i].required && MainArgs[i].help[0] != NULL ) {
+            HelpOptionLine(MainArgs[i].aliases, MainArgs[i].name, NULL, MainArgs[i].help);
+        }
+    }
+    OUTMSG(("\nOptions:\n"));
+    for(i = 0; i < MainArgsQty; i++ ) {
+        if( !MainArgs[i].required && MainArgs[i].help[0] != NULL ) {
+            HelpOptionLine(MainArgs[i].aliases, MainArgs[i].name, NULL, MainArgs[i].help);
+        }
+    }
+    XMLLogger_Usage();
+    OUTMSG(("\n"));
+    HelpOptionsStandard();
+    HelpVersion(fullname, KAppVersion());
+    return rc;
+}
+
+rc_t CC KMain( int argc, char* argv[] )
+{
+    rc_t rc = 0;
+    Args* args = NULL;
+    const char* errmsg = NULL, *refseq_chunk = NULL, *min_mapq = NULL, *cluster_size = NULL;
+    const XMLLogger* xml_logger = NULL;
+    SParam params;
+    memset(&params, 0, sizeof(params));
+    params.schema = "align/align.vschema";
+
+    params.argv0 = argv[0];
+    
+    if( (rc = ArgsMakeAndHandle(&args, argc, argv, 2, MainArgs, MainArgsQty, XMLLogger_Args, XMLLogger_ArgsQty)) == 0 ) {
+        uint32_t count;
+        if( (rc = ArgsParamCount (args, &count)) != 0 || count != 0 ) {
+            rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+            ArgsParamValue(args, 0, (const void **)&errmsg);
+        
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_Output].name, &count)) != 0 || count != 1 ) {
+            rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, count ? rcExcessive : rcInsufficient);
+            errmsg = MainArgs[eopt_Output].name;
+        } else if( (rc = ArgsOptionValue(args, MainArgs[eopt_Output].name, 0, (const void **)&params.out)) != 0 ) {
+            errmsg = MainArgs[eopt_Output].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_MapInput].name, &count)) != 0 || count != 1 ) {
+            rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, count ? rcExcessive : rcInsufficient);
+            errmsg = MainArgs[eopt_MapInput].name;
+        } else if( (rc = ArgsOptionValue(args, MainArgs[eopt_MapInput].name, 0, (const void **)&params.map_path)) != 0 ) {
+            errmsg = MainArgs[eopt_MapInput].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_Schema].name, &count)) != 0 || count > 1 ) {
+            rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, count ? rcExcessive : rcInsufficient);
+            errmsg = MainArgs[eopt_Schema].name;
+        } else if( count > 0 && (rc = ArgsOptionValue(args, MainArgs[eopt_Schema].name, 0, (const void **)&params.schema)) != 0 ) {
+            errmsg = MainArgs[eopt_Schema].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_AsmInput].name, &count)) != 0 || count > 1 ) {
+            rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+            errmsg = MainArgs[eopt_AsmInput].name;
+        } else if( count > 0 && (rc = ArgsOptionValue(args, MainArgs[eopt_AsmInput].name, 0, (const void **)&params.asm_path)) != 0 ) {
+            errmsg = MainArgs[eopt_AsmInput].name;
+
+        }
+        else if ((rc = ArgsOptionCount(args,
+            MainArgs[eopt_LoadExtraEvidence].name,
+            &params.load_other_evidence)) != 0 )
+        {
+            errmsg = MainArgs[eopt_LoadExtraEvidence].name;
+
+        }
+        else if( (rc = ArgsOptionCount(args, MainArgs[eopt_RefSeqConfig].name, &count)) != 0 || count > 1 ) {
+            rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+            errmsg = MainArgs[eopt_RefSeqConfig].name;
+        } else if( count > 0 && (rc = ArgsOptionValue(args, MainArgs[eopt_RefSeqConfig].name, 0, (const void **)&params.refseqcfg)) != 0 ) {
+            errmsg = MainArgs[eopt_RefSeqConfig].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_RefSeqPath].name, &count)) != 0 || count > 1 ) {
+            rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+            errmsg = MainArgs[eopt_RefSeqPath].name;
+        } else if( count > 0 && (rc = ArgsOptionValue(args, MainArgs[eopt_RefSeqPath].name, 0, (const void **)&params.refseqpath)) != 0 ) {
+            errmsg = MainArgs[eopt_RefSeqPath].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_Library].name, &count)) != 0 || count > 1 ) {
+            rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+            errmsg = MainArgs[eopt_Library].name;
+        } else if( count > 0 && (rc = ArgsOptionValue(args, MainArgs[eopt_Library].name, 0, (const void **)&params.library)) != 0 ) {
+            errmsg = MainArgs[eopt_Library].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_RefSeqChunk].name, &count)) != 0 || count > 1 ) {
+            rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+            errmsg = MainArgs[eopt_RefSeqChunk].name;
+        } else if( count > 0 && (rc = ArgsOptionValue(args, MainArgs[eopt_RefSeqChunk].name, 0, (const void **)&refseq_chunk)) != 0 ) {
+            errmsg = MainArgs[eopt_RefSeqChunk].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_Force].name, &params.force)) != 0 ) {
+            errmsg = MainArgs[eopt_Force].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_ForceRef].name, &params.force_refw)) != 0 ) {
+            errmsg = MainArgs[eopt_ForceRef].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_ForceRead].name, &params.force_readw)) != 0 ) {
+            errmsg = MainArgs[eopt_ForceRead].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_noReadAhead].name, &params.no_read_ahead)) != 0 ) {
+            errmsg = MainArgs[eopt_noReadAhead].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_NoSpotGroup].name, &params.no_spot_group)) != 0 ) {
+            errmsg = MainArgs[eopt_NoSpotGroup].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_No2nd_ary].name, &params.min_mapq)) != 0 ) {
+            errmsg = MainArgs[eopt_No2nd_ary].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_QualQuantization].name, &count)) != 0 || count > 1 ) {
+            rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+            errmsg = MainArgs[eopt_QualQuantization].name;
+        } else if( count > 0 && (rc = ArgsOptionValue(args, MainArgs[eopt_QualQuantization].name, 0, (const void **)&params.qual_quant)) != 0 ) {
+            errmsg = MainArgs[eopt_QualQuantization].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_MinMapQ].name, &count)) != 0 || count > 1 ) {
+            rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+            errmsg = MainArgs[eopt_MinMapQ].name;
+        } else if( count > 0 && (rc = ArgsOptionValue(args, MainArgs[eopt_MinMapQ].name, 0, (const void **)&min_mapq)) != 0 ) {
+            errmsg = MainArgs[eopt_MinMapQ].name;
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_ClusterSize].name, &count)) != 0 || count > 1 ) {
+            rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+            errmsg = MainArgs[eopt_ClusterSize].name;
+        } else if( count > 0 && (rc = ArgsOptionValue(args, MainArgs[eopt_ClusterSize].name, 0, (const void **)&cluster_size)) != 0 ) {
+            errmsg = MainArgs[eopt_ClusterSize].name;
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_SingleMate].name, &params.single_mate)) != 0 ) {
+            errmsg = MainArgs[eopt_SingleMate].name;
+
+        } else {
+            do {
+                long val = 0;
+                char* end = NULL;
+                uint32_t count;
+
+                if( (rc = ArgsOptionCount(args, MainArgs[eopt_RefFile].name, &count)) != 0 ) {
+                    break;
+                } else {
+                    params.refFiles = calloc(count + 1, sizeof(*(params.refFiles)));
+                    if( params.refFiles == NULL ) {
+                        rc = RC(rcApp, rcArgv, rcReading, rcMemory, rcExhausted);
+                        break;
+                    }
+                    while(rc == 0 && count-- > 0) {
+                        rc = ArgsOptionValue(args, MainArgs[eopt_RefFile].name, count, (const void **)&params.refFiles[count]);
+                    }
+                }
+
+                if( refseq_chunk != NULL ) {
+                    errno = 0;
+                    val = strtol(refseq_chunk, &end, 10);
+                    if( errno != 0 || refseq_chunk == end || *end != '\0' || val < 0 || val > UINT32_MAX ) {
+                        rc = RC(rcExe, rcArgv, rcReading, rcParam, rcInvalid);
+                        break;
+                    }
+                    params.refseq_chunk = val;
+                }
+                if( params.min_mapq > 0 ) {
+                    params.min_mapq = ~0;
+                } else if( min_mapq != NULL ) {
+                    errno = 0;
+                    val = strtol(min_mapq, &end, 10);
+                    if( errno != 0 || min_mapq == end || *end != '\0' || val < 0 || val > 255 ) {
+                        rc = RC(rcExe, rcArgv, rcReading, rcParam, rcInvalid);
+                        break;
+                    }
+                    params.min_mapq = val;
+                }
+
+                if ( cluster_size )
+                    params.cluster_size = atoi( cluster_size );
+                else
+                    params.cluster_size = 0;
+
+                rc = KDirectoryNativeDir( &params.input_dir );
+                if ( rc != 0 )
+                    errmsg = "current directory";
+                else
+                {
+                    rc = XMLLogger_Make( &xml_logger, params.input_dir, args );
+                    if ( rc != 0 )
+                        errmsg = "XML logging";
+                    else
+                        rc = Load( &params );
+                }
+            } while( false );
+            KDirectoryRelease( params.input_dir );
+
+            free(params.refFiles);
+            params.refFiles = NULL;
+        }
+    }
+    /* find accession as last part of path for internal XML logging */
+    refseq_chunk = params.out ? strrchr(params.out, '/') : "/???";
+    if( refseq_chunk ++ == NULL )
+        refseq_chunk = params.out;
+
+    if( argc < 2 )
+        MiniUsage(args);
+    else if( rc != 0 )
+    {
+        if( errmsg )
+        {
+            MiniUsage(args);
+            LOGERR(klogErr, rc, errmsg);
+        }
+        else
+        {
+            PLOGERR(klogErr, (klogErr, rc, "load failed: $(accession)",
+                   "severity=total,status=failure,accession=%s", refseq_chunk));
+        }
+    }
+    else
+    {
+        PLOGMSG(klogInfo, (klogInfo, "loaded",
+                "severity=total,status=success,accession=%s", refseq_chunk));
+    }
+    ArgsWhack(args);
+    XMLLogger_Release(xml_logger);
+    return rc;
+}
diff --git a/tools/cg-load/debug.h b/tools/cg-load/debug.h
new file mode 100644
index 0000000..2d732c4
--- /dev/null
+++ b/tools/cg-load/debug.h
@@ -0,0 +1,34 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_cg_load_debug_h_
+#define _tools_cg_load_debug_h_
+
+#include <klib/debug.h>
+
+#define DEBUG_MSG_PASTE(a,b) a##b
+#define DEBUG_MSG(flag,msg) DBGMSG(DBG_APP,DBG_FLAG(DEBUG_MSG_PASTE(DBG_APP_,flag)), msg)
+
+#endif /* _tools_cg_load_debug_h_ */
diff --git a/tools/cg-load/defs.h b/tools/cg-load/defs.h
new file mode 100644
index 0000000..d470e96
--- /dev/null
+++ b/tools/cg-load/defs.h
@@ -0,0 +1,163 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_cg_load_defs_h_
+#define _tools_cg_load_defs_h_
+
+
+#include <stdint.h> /* uint64_t */
+
+
+#define CG_FORMAT_2_5 0x02050000
+
+
+/* buffers and sizes */
+
+/*
+#define CG_CHROMOSOME_NAME (8) make if fit NC_003977 */
+#define CG_CHROMOSOME_NAME (10)
+
+#define CG_SLIDE (32)
+#define CG_LANE (8)
+
+#define CG_READS_NREADS (2)
+
+#define CG_READS15_SPOT_LEN 70
+#define CG_READS25_SPOT_LEN 60
+
+#define CG_READS15_NGAPS 3
+#define CG_READS25_NGAPS 2
+
+#define CG_MAPPINGS_MAX (2048)
+#define CG_EVDNC_PLOIDY (3)
+#define CG_EVDNC_INTERVALID_LEN (32)
+#define CG_EVDNC_SPOT_LEN (10 * 1024)
+#define CG_TAG_LFR_DATA_LEN (10)
+
+/* CG_EVDNC_ALLELE_NUM is 3 in v.1.5; 4 in v.2 */
+#define CG_EVDNC_ALLELE_NUM (4)
+
+#define CG_EVDNC_ALLELE_LEN (10 * 1024)
+#define CG_EVDNC_ALLELE_CIGAR_LEN (10 * 1024)
+
+typedef char CGFIELD_LIBRARY_TYPE;
+typedef char CGFIELD_SAMPLE_TYPE;
+typedef char CGFIELD_SLIDE_TYPE;
+typedef char CGFIELD_LANE_TYPE;
+typedef char CGFIELD_CHROMOSOME_TYPE;
+typedef char CGFIELD_ASSEMBLY_ID_TYPE;
+typedef char CGFIELD_SOFTWARE_VERSION_TYPE;
+typedef char CGFIELD_DBSNP_BUILD_TYPE;
+typedef char CGFIELD_COSMIC_TYPE;
+typedef char CGFIELD_PFAM_DATE_TYPE;
+typedef char CGFIELD_MIRBASE_VERSION_TYPE;
+typedef char CGFIELD_DGV_VERSION_TYPE;
+typedef char CGFIELD_GENERATED_AT_TYPE;
+typedef char CGFIELD_GENERATED_BY_TYPE;
+typedef char CGFIELD_GENE_ANNOTATIONS_TYPE;
+typedef char CGFIELD_GENOME_REFERENCE_TYPE;
+typedef uint32_t CGFIELD_BATCH_FILE_NUMBER_TYPE;
+typedef uint64_t CGFIELD_BATCH_OFFSET_TYPE;
+typedef uint32_t CGFIELD_FIELD_SIZE_TYPE;
+typedef uint32_t CGFIELD_MAX_PLOIDY_TYPE;
+typedef uint16_t CGFIELD_WINDOW_SHIFT_TYPE;
+typedef uint16_t CGFIELD_WINDOW_WIDTH_TYPE;
+typedef uint16_t CGFIELD_NUMBER_LEVELS_TYPE;
+typedef uint16_t CGFIELD_MEAN_LEVEL_X_TYPE;
+typedef uint16_t CGFIELD_WELL_ID;
+
+/******************************************************************************/
+
+typedef enum CG_EFileType_enum {
+    cg_eFileType_Unknown = 0,
+    cg_eFileType_READS = 1,
+    cg_eFileType_MAPPINGS,
+    cg_eFileType_LIB_DNB,
+    cg_eFileType_LIB_MATE_GAPS,
+    cg_eFileType_LIB_SEQDEP_GAPS,
+    cg_eFileType_REFMETRICS,
+    cg_eFileType_IDENTIFIER_MAPPING,
+    cg_eFileType_DBSNP_TO_CGI,
+    cg_eFileType_GENE_ANNOTATION,
+    cg_eFileType_SUMMARY_REPORT,
+    cg_eFileType_VAR_ANNOTATION,
+    cg_eFileType_GENE_VAR_SUMMARY_REPORT,
+    cg_eFileType_EVIDENCE_CORRELATION,
+    cg_eFileType_EVIDENCE_DNBS,
+    cg_eFileType_EVIDENCE_INTERVALS,
+    cg_eFileType_COVERAGE_DISTRIBUTION,
+    cg_eFileType_COVERAGE_BY_GC,
+    cg_eFileType_DEPTH_OF_COVERAGE,
+    cg_eFileType_INDEL_LENGTH_CODING,
+    cg_eFileType_INDEL_LENGTH,
+    cg_eFileType_SUBSTITUTION_LENGTH_CODING,
+    cg_eFileType_SUBSTITUTION_LENGTH,
+    cg_eFileType_CNV_SEGMENTS,
+    cg_eFileType_TUMOR_CNV_SEGMENTS,
+    cg_eFileType_CNV_DETAILS_SCORES,
+    cg_eFileType_TUMOR_DETAILS_SCORES,
+    cg_eFileType_NONDIPLOID_SOMATIC_CNV_SEGMENTS,
+    cg_eFileType_NONDIPLOID_SOMATIC_CNV_DETAILS,
+    cg_eFileType_JUNCTIONS,
+    cg_eFileType_JUNCTION_DNBS,
+    cg_eFileType_SV_EVENTS,
+    cg_eFileType_VAR_OLPL,
+    cg_eFileType_MEI,
+    cg_eFileType_TUMOR_CNV_DETAILS,
+    cg_eFileType_DIPLOID_SOMATIC_CNV_SEGMENTS,
+    cg_eFileType_COVERAGE_DISTRIBUTION_CODING,
+    cg_eFileType_COVERAGE_BY_GC_CODING,
+    cg_eFileType_LIB_SMALL_GAPS_ROLLUP,
+    cg_eFileType_DIPLOID_SOMATIC_CNV_DETAIL_SCORES,
+
+    cg_eFileType_TAG_LFR,
+    cg_eFileType_Last
+} CG_EFileType;
+
+typedef enum {
+    cg_eLibraryType_Unknown,
+    cg_eLibraryType_PureLFR,
+    cg_eLibraryType_MixedLFR,
+    cg_eLibraryType_MixedSTD,
+    cg_eLibraryType_Standard,
+} CG_ELibraryType;
+
+typedef enum CG_EMappingsFlags_enum {
+    cg_eLastDNBRecord = 0x01,
+    cg_eLeftHalfDnbMap = 0x00,
+    cg_eRightHalfDnbMap = 0x02,
+    cg_eFwdDnbStrand = 0x00,
+    cg_eRevDnbStrand = 0x04
+} CG_EMappingsFlags;
+
+typedef enum CG_EReadsFlags_enum {
+    cg_eLeftHalfDnbNoMatches = 0x01,
+    cg_eLeftHalfDnbMapOverflow = 0x02,
+    cg_eRightHalfDnbNoMatches = 0x04,
+    cg_eRightHalfDnbMapOverflow = 0x08
+} CG_EReadsFlags;
+
+
+#endif /* _tools_cg_load_defs_h_ */
diff --git a/tools/cg-load/f1_3.c b/tools/cg-load/f1_3.c
new file mode 100644
index 0000000..3b0d400
--- /dev/null
+++ b/tools/cg-load/f1_3.c
@@ -0,0 +1,77 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+#include "factory-reads.h"
+#include "factory-mappings.h"
+#include "factory-evidence-intervals.h"
+#include "factory-evidence-dnbs.h"
+
+#include "file.h"
+
+static const CGFileTypeFactory cg_ETypeXX_names[] = {
+    { "READS", cg_eFileType_READS, CGReads13_Make },
+    { "MAPPINGS", cg_eFileType_MAPPINGS, CGMappings13_Make },
+    { "LIB-DNB", cg_eFileType_LIB_DNB, NULL },
+    { "LIB-MATE-GAPS", cg_eFileType_LIB_MATE_GAPS, NULL },
+    { "LIB-SEQDEP-GAPS", cg_eFileType_LIB_SEQDEP_GAPS, NULL },
+    { "REFMETRICS", cg_eFileType_REFMETRICS, NULL },
+    { "DBSNP-TO-CGI", cg_eFileType_DBSNP_TO_CGI, NULL },
+    { "GENE-ANNOTATION", cg_eFileType_GENE_ANNOTATION, NULL },
+    { "SUMMARY-REPORT", cg_eFileType_SUMMARY_REPORT, NULL },
+    { "VAR-ANNOTATION", cg_eFileType_VAR_ANNOTATION, NULL },
+    { "GENE-VAR-SUMMARY-REPORT", cg_eFileType_GENE_VAR_SUMMARY_REPORT, NULL },
+    { "EVIDENCE-CORRELATION", cg_eFileType_EVIDENCE_CORRELATION, NULL },
+    { "EVIDENCE-DNBS", cg_eFileType_EVIDENCE_DNBS, CGEvidenceDnbs13_Make },
+    { "EVIDENCE-INTERVALS",
+                cg_eFileType_EVIDENCE_INTERVALS, CGEvidenceIntervals13_Make },
+    { "COVERAGE-DISTRIBUTION", cg_eFileType_COVERAGE_DISTRIBUTION, NULL },
+    { "COVERAGE-BY-GC", cg_eFileType_COVERAGE_BY_GC, NULL },
+    { "DEPTH-OF-COVERAGE", cg_eFileType_DEPTH_OF_COVERAGE, NULL },
+    { "INDEL-LENGTH-CODING", cg_eFileType_INDEL_LENGTH_CODING, NULL },
+    { "INDEL-LENGTH", cg_eFileType_INDEL_LENGTH, NULL },
+    { "SUBSTITUTION-LENGTH-CODING",
+                cg_eFileType_SUBSTITUTION_LENGTH_CODING, NULL },
+    { "SUBSTITUTION-LENGTH", cg_eFileType_SUBSTITUTION_LENGTH, NULL },
+    { "CNV_SEGMENTS", cg_eFileType_CNV_SEGMENTS, NULL },
+    { "CNV-SEGMENTS", cg_eFileType_CNV_SEGMENTS, NULL },
+    { "TUMOR_CNV_SEGMENTS", cg_eFileType_TUMOR_CNV_SEGMENTS, NULL },
+    { "CNV_DETAILS_SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
+    { "CNV-DETAIL-SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
+    { "CNV_DETAIL_SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL }, /*VDB-1404*/
+    { "TUMOR_DETAILS_SCORES", cg_eFileType_TUMOR_DETAILS_SCORES, NULL },
+    { "JUNCTIONS", cg_eFileType_JUNCTIONS, NULL },
+    { "JUNCTION-DNBS", cg_eFileType_JUNCTION_DNBS, NULL },
+    /* undocumented */
+    { "VAR-OLPL", cg_eFileType_VAR_OLPL, NULL }
+    
+};
+
+rc_t CGFile13_Make(const CGFileType** self,
+    const char* type, const CGLoaderFile* file)
+{
+    return CGLoaderFileMakeCGFileType(file, type,
+        cg_ETypeXX_names, sizeof cg_ETypeXX_names / sizeof cg_ETypeXX_names[0],
+        self);
+}
diff --git a/tools/cg-load/f1_5.c b/tools/cg-load/f1_5.c
new file mode 100644
index 0000000..3a0dab8
--- /dev/null
+++ b/tools/cg-load/f1_5.c
@@ -0,0 +1,78 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+#include "factory-evidence-dnbs.h"
+#include "factory-evidence-intervals.h"
+#include "factory-mappings.h"
+#include "factory-reads.h"
+#include "factory-tag-lfr.h"
+
+#include "file.h"
+
+static const CGFileTypeFactory cg_ETypeXX_names[] = {
+    { "READS", cg_eFileType_READS, CGReads15_Make },
+    { "MAPPINGS", cg_eFileType_MAPPINGS, CGMappings15_Make },
+    { "LIB-DNB", cg_eFileType_LIB_DNB, NULL },
+    { "LIB-MATE-GAPS", cg_eFileType_LIB_MATE_GAPS, NULL },
+    { "LIB-SEQDEP-GAPS", cg_eFileType_LIB_SEQDEP_GAPS, NULL },
+    { "REFMETRICS", cg_eFileType_REFMETRICS, NULL },
+    { "DBSNP-TO-CGI", cg_eFileType_DBSNP_TO_CGI, NULL },
+    { "GENE-ANNOTATION", cg_eFileType_GENE_ANNOTATION, NULL },
+    { "SUMMARY-REPORT", cg_eFileType_SUMMARY_REPORT, NULL },
+    { "VAR-ANNOTATION", cg_eFileType_VAR_ANNOTATION, NULL },
+    { "GENE-VAR-SUMMARY-REPORT", cg_eFileType_GENE_VAR_SUMMARY_REPORT, NULL },
+    { "EVIDENCE-CORRELATION", cg_eFileType_EVIDENCE_CORRELATION, NULL },
+    { "EVIDENCE-DNBS", cg_eFileType_EVIDENCE_DNBS, CGEvidenceDnbs15_Make },
+    { "EVIDENCE-INTERVALS",
+                cg_eFileType_EVIDENCE_INTERVALS, CGEvidenceIntervals15_Make },
+    { "COVERAGE-DISTRIBUTION", cg_eFileType_COVERAGE_DISTRIBUTION, NULL },
+    { "COVERAGE-BY-GC", cg_eFileType_COVERAGE_BY_GC, NULL },
+    { "DEPTH-OF-COVERAGE", cg_eFileType_DEPTH_OF_COVERAGE, NULL },
+    { "INDEL-LENGTH-CODING", cg_eFileType_INDEL_LENGTH_CODING, NULL },
+    { "INDEL-LENGTH", cg_eFileType_INDEL_LENGTH, NULL },
+    { "SUBSTITUTION-LENGTH-CODING",
+                cg_eFileType_SUBSTITUTION_LENGTH_CODING, NULL },
+    { "SUBSTITUTION-LENGTH", cg_eFileType_SUBSTITUTION_LENGTH, NULL },
+    { "CNV_SEGMENTS", cg_eFileType_CNV_SEGMENTS, NULL },
+    { "CNV-SEGMENTS", cg_eFileType_CNV_SEGMENTS, NULL },
+    { "TUMOR_CNV_SEGMENTS", cg_eFileType_TUMOR_CNV_SEGMENTS, NULL },
+    { "CNV_DETAILS_SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
+    { "CNV-DETAIL-SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
+    { "TUMOR_DETAILS_SCORES", cg_eFileType_TUMOR_DETAILS_SCORES, NULL },
+    { "JUNCTIONS", cg_eFileType_JUNCTIONS, NULL },
+    { "JUNCTION-DNBS", cg_eFileType_JUNCTION_DNBS, NULL },
+    /* undocumented */
+    { "VAR-OLPL", cg_eFileType_VAR_OLPL, NULL },
+    
+    { "TAG_LFR", cg_eFileType_TAG_LFR, CGTagLfr15_Make },    
+};
+
+rc_t CGFile15_Make(const CGFileType** self,
+    const char* type, const CGLoaderFile* file)
+{
+    return CGLoaderFileMakeCGFileType(file, type,
+        cg_ETypeXX_names, sizeof cg_ETypeXX_names / sizeof cg_ETypeXX_names[0],
+        self);
+}
diff --git a/tools/cg-load/f1_7.c b/tools/cg-load/f1_7.c
new file mode 100644
index 0000000..1970d79
--- /dev/null
+++ b/tools/cg-load/f1_7.c
@@ -0,0 +1,97 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+
+#include "factory-reads.h"              /* CGReads15_Make */
+#include "factory-mappings.h"           /* CGMappings15_Make */
+#include "factory-evidence-intervals.h" /* CGEvidenceIntervals15_Make */
+#include "factory-evidence-dnbs.h"      /* CGEvidenceDnbs15_Make */
+#include "factory-tag-lfr.h"            /* CGTagLfr15_Make */
+
+
+#include "file.h" /* CGFileType */
+
+
+/* File format v1.7
+   Software    v1.12
+#FORMAT_VERSION 1.7  */
+
+
+static const CGFileTypeFactory cg_ETypeXX_names[] = {
+    { "READS", cg_eFileType_READS, CGReads15_Make },
+    { "MAPPINGS", cg_eFileType_MAPPINGS, CGMappings15_Make },
+    { "LIB-DNB", cg_eFileType_LIB_DNB, NULL },
+    { "LIB-MATE-GAPS", cg_eFileType_LIB_MATE_GAPS, NULL },
+    { "LIB-SEQDEP-GAPS", cg_eFileType_LIB_SEQDEP_GAPS, NULL },
+    { "REFMETRICS", cg_eFileType_REFMETRICS, NULL },
+    { "DBSNP-TO-CGI", cg_eFileType_DBSNP_TO_CGI, NULL },
+    { "GENE-ANNOTATION", cg_eFileType_GENE_ANNOTATION, NULL },
+    { "SUMMARY-REPORT", cg_eFileType_SUMMARY_REPORT, NULL },
+    { "VAR-ANNOTATION", cg_eFileType_VAR_ANNOTATION, NULL },
+    { "GENE-VAR-SUMMARY-REPORT", cg_eFileType_GENE_VAR_SUMMARY_REPORT, NULL },
+    { "EVIDENCE-CORRELATION", cg_eFileType_EVIDENCE_CORRELATION, NULL },
+    { "EVIDENCE-DNBS", cg_eFileType_EVIDENCE_DNBS, CGEvidenceDnbs15_Make },
+    { "EVIDENCE-INTERVALS",
+                cg_eFileType_EVIDENCE_INTERVALS, CGEvidenceIntervals15_Make },
+    { "DEPTH-OF-COVERAGE", cg_eFileType_DEPTH_OF_COVERAGE, NULL },
+    { "INDEL-LENGTH-CODING", cg_eFileType_INDEL_LENGTH_CODING, NULL },
+    { "INDEL-LENGTH", cg_eFileType_INDEL_LENGTH, NULL },
+    { "SUBSTITUTION-LENGTH-CODING",
+                cg_eFileType_SUBSTITUTION_LENGTH_CODING, NULL },
+    { "SUBSTITUTION-LENGTH", cg_eFileType_SUBSTITUTION_LENGTH, NULL },
+    { "CNV_SEGMENTS", cg_eFileType_CNV_SEGMENTS, NULL },
+    { "CNV-SEGMENTS", cg_eFileType_CNV_SEGMENTS, NULL },
+    { "TUMOR_CNV_SEGMENTS", cg_eFileType_TUMOR_CNV_SEGMENTS, NULL },
+    { "CNV_DETAILS_SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
+    { "CNV-DETAIL-SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
+    { "TUMOR_DETAILS_SCORES", cg_eFileType_TUMOR_DETAILS_SCORES, NULL },
+    { "JUNCTIONS", cg_eFileType_JUNCTIONS, NULL },
+    { "JUNCTION-DNBS", cg_eFileType_JUNCTION_DNBS, NULL },
+    { "VAR-OLPL"     , cg_eFileType_VAR_OLPL, NULL },
+    { "MEI"          , cg_eFileType_MEI     , NULL },
+
+    { "COVERAGE-BY-GC"       , cg_eFileType_COVERAGE_BY_GC       , NULL },
+    { "COVERAGE-DISTRIBUTION", cg_eFileType_COVERAGE_DISTRIBUTION, NULL },
+
+    /* semi-documented:
+       mentioned in "Data File Formats.File format v1.7.Software v1.12 */
+    { "COVERAGE-BY-GC-CODING", cg_eFileType_COVERAGE_BY_GC       , NULL },
+    { "COVERAGE-DISTRIBUTION-CODING",
+                               cg_eFileType_COVERAGE_DISTRIBUTION, NULL },
+
+    /* undocumented */
+    { "VAR-OLPL", cg_eFileType_VAR_OLPL, NULL },
+    
+    { "TAG_LFR", cg_eFileType_TAG_LFR, CGTagLfr15_Make },    
+};
+
+
+rc_t CGFile17_Make(const CGFileType** self,
+    const char* type, const CGLoaderFile* file)
+{
+    return CGLoaderFileMakeCGFileType(file, type,
+        cg_ETypeXX_names, sizeof cg_ETypeXX_names / sizeof cg_ETypeXX_names[0],
+        self);
+}
diff --git a/tools/cg-load/f2_0.c b/tools/cg-load/f2_0.c
new file mode 100644
index 0000000..ca5b938
--- /dev/null
+++ b/tools/cg-load/f2_0.c
@@ -0,0 +1,98 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+#include "factory-evidence-dnbs.h"
+#include "factory-evidence-intervals.h"
+#include "factory-mappings.h"
+#include "factory-reads.h"
+#include "factory-tag-lfr.h"
+
+#include "file.h"
+
+static const CGFileTypeFactory cg_ETypeXX_names[] = {
+    { "READS", cg_eFileType_READS, CGReads20_Make },
+    { "MAPPINGS", cg_eFileType_MAPPINGS, CGMappings20_Make },
+    { "LIB-DNB", cg_eFileType_LIB_DNB, NULL },
+    { "LIB-MATE-GAPS", cg_eFileType_LIB_MATE_GAPS, NULL },
+    { "LIB-SEQDEP-GAPS", cg_eFileType_LIB_SEQDEP_GAPS, NULL },
+    { "REFMETRICS", cg_eFileType_REFMETRICS, NULL },
+    { "DBSNP-TO-CGI", cg_eFileType_DBSNP_TO_CGI, NULL },
+    { "GENE-ANNOTATION", cg_eFileType_GENE_ANNOTATION, NULL },
+    { "SUMMARY-REPORT", cg_eFileType_SUMMARY_REPORT, NULL },
+    { "VAR-ANNOTATION", cg_eFileType_VAR_ANNOTATION, NULL },
+    { "GENE-VAR-SUMMARY-REPORT", cg_eFileType_GENE_VAR_SUMMARY_REPORT, NULL },
+    { "EVIDENCE-CORRELATION", cg_eFileType_EVIDENCE_CORRELATION, NULL },
+    { "EVIDENCE-DNBS", cg_eFileType_EVIDENCE_DNBS, CGEvidenceDnbs20_Make },
+    { "EVIDENCE-INTERVALS",
+                cg_eFileType_EVIDENCE_INTERVALS, CGEvidenceIntervals20_Make },
+    { "COVERAGE-DISTRIBUTION", cg_eFileType_COVERAGE_DISTRIBUTION, NULL },
+    { "COVERAGE-BY-GC", cg_eFileType_COVERAGE_BY_GC, NULL },
+    { "DEPTH-OF-COVERAGE", cg_eFileType_DEPTH_OF_COVERAGE, NULL },
+    { "INDEL-LENGTH-CODING", cg_eFileType_INDEL_LENGTH_CODING, NULL },
+    { "INDEL-LENGTH", cg_eFileType_INDEL_LENGTH, NULL },
+    { "SUBSTITUTION-LENGTH-CODING",
+                cg_eFileType_SUBSTITUTION_LENGTH_CODING, NULL },
+    { "SUBSTITUTION-LENGTH", cg_eFileType_SUBSTITUTION_LENGTH, NULL },
+    { "CNV_SEGMENTS", cg_eFileType_CNV_SEGMENTS, NULL },
+    { "CNV-SEGMENTS", cg_eFileType_CNV_SEGMENTS, NULL },
+    { "TUMOR_CNV_SEGMENTS", cg_eFileType_TUMOR_CNV_SEGMENTS, NULL },
+    { "TUMOR-CNV-SEGMENTS", cg_eFileType_TUMOR_CNV_SEGMENTS, NULL },
+    { "CNV_DETAILS_SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
+    { "CNV-DETAILS-SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
+    { "CNV-DETAIL-SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
+    { "TUMOR_DETAILS_SCORES", cg_eFileType_TUMOR_DETAILS_SCORES, NULL },
+    { "TUMOR-DETAILS-SCORES", cg_eFileType_TUMOR_DETAILS_SCORES, NULL },
+    { "JUNCTIONS", cg_eFileType_JUNCTIONS, NULL },
+    { "JUNCTION-DNBS", cg_eFileType_JUNCTION_DNBS, NULL },
+    { "SV-EVENTS", cg_eFileType_SV_EVENTS, NULL },
+    { "VAR-OLPL", cg_eFileType_VAR_OLPL, NULL },
+    { "MEI", cg_eFileType_MEI, NULL },    
+    /* from the documentation */
+    { "TUMOR-CNV-DETAILS", cg_eFileType_TUMOR_CNV_DETAILS, NULL },
+    { "DIPLOID-SOMATIC-CNV-SEGMENTS",
+        cg_eFileType_DIPLOID_SOMATIC_CNV_SEGMENTS, NULL },
+    { "COVERAGE-DISTRIBUTION-CODING",
+        cg_eFileType_COVERAGE_DISTRIBUTION_CODING, NULL },
+    { "COVERAGE-BY-GC-CODING", cg_eFileType_COVERAGE_BY_GC_CODING, NULL },
+    { "LIB-SMALL-GAPS-ROLLUP", cg_eFileType_LIB_SMALL_GAPS_ROLLUP, NULL },
+
+    { "TAG_LFR", cg_eFileType_TAG_LFR, CGTagLfr15_Make },    
+
+    /* VDB-1383 */
+    { "NONDIPLOID-SOMATIC-CNV-SEGMENTS",
+                cg_eFileType_NONDIPLOID_SOMATIC_CNV_SEGMENTS, NULL },
+    { "NONDIPLOID-SOMATIC-CNV-DETAILS",
+                cg_eFileType_NONDIPLOID_SOMATIC_CNV_DETAILS, NULL },
+    { "DIPLOID-SOMATIC-CNV-DETAIL-SCORES",
+                 cg_eFileType_DIPLOID_SOMATIC_CNV_DETAIL_SCORES, NULL },
+};
+
+rc_t CGFile20_Make(const CGFileType** self,
+    const char* type, const CGLoaderFile* file)
+{
+    return CGLoaderFileMakeCGFileType(file, type,
+        cg_ETypeXX_names, sizeof cg_ETypeXX_names / sizeof cg_ETypeXX_names[0],
+        self);
+}
diff --git a/tools/cg-load/f2_2.c b/tools/cg-load/f2_2.c
new file mode 100644
index 0000000..774f36f
--- /dev/null
+++ b/tools/cg-load/f2_2.c
@@ -0,0 +1,98 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+#include "factory-evidence-dnbs.h"
+#include "factory-evidence-intervals.h"
+#include "factory-mappings.h"
+#include "factory-reads.h"
+#include "factory-tag-lfr.h"
+
+#include "file.h"
+
+static const CGFileTypeFactory cg_ETypeXX_names[] = {
+    { "READS", cg_eFileType_READS, CGReads22_Make },
+    { "MAPPINGS", cg_eFileType_MAPPINGS, CGMappings22_Make },
+    { "LIB-DNB", cg_eFileType_LIB_DNB, NULL },
+    { "LIB-MATE-GAPS", cg_eFileType_LIB_MATE_GAPS, NULL },
+    { "LIB-SEQDEP-GAPS", cg_eFileType_LIB_SEQDEP_GAPS, NULL },
+    { "REFMETRICS", cg_eFileType_REFMETRICS, NULL },
+    { "IDENTIFIER-MAPPING", cg_eFileType_IDENTIFIER_MAPPING, NULL },
+    { "DBSNP-TO-CGI", cg_eFileType_DBSNP_TO_CGI, NULL },
+    { "GENE-ANNOTATION", cg_eFileType_GENE_ANNOTATION, NULL },
+    { "SUMMARY-REPORT", cg_eFileType_SUMMARY_REPORT, NULL },
+    { "VAR-ANNOTATION", cg_eFileType_VAR_ANNOTATION, NULL },
+    { "GENE-VAR-SUMMARY-REPORT", cg_eFileType_GENE_VAR_SUMMARY_REPORT, NULL },
+    { "EVIDENCE-CORRELATION", cg_eFileType_EVIDENCE_CORRELATION, NULL },
+    { "EVIDENCE-DNBS", cg_eFileType_EVIDENCE_DNBS, CGEvidenceDnbs22_Make },
+    { "EVIDENCE-INTERVALS",
+                cg_eFileType_EVIDENCE_INTERVALS, CGEvidenceIntervals22_Make },
+    { "COVERAGE-DISTRIBUTION", cg_eFileType_COVERAGE_DISTRIBUTION, NULL },
+    { "COVERAGE-BY-GC", cg_eFileType_COVERAGE_BY_GC, NULL },
+    { "DEPTH-OF-COVERAGE", cg_eFileType_DEPTH_OF_COVERAGE, NULL },
+    { "INDEL-LENGTH-CODING", cg_eFileType_INDEL_LENGTH_CODING, NULL },
+    { "INDEL-LENGTH", cg_eFileType_INDEL_LENGTH, NULL },
+    { "SUBSTITUTION-LENGTH-CODING",
+                cg_eFileType_SUBSTITUTION_LENGTH_CODING, NULL },
+    { "SUBSTITUTION-LENGTH", cg_eFileType_SUBSTITUTION_LENGTH, NULL },
+    { "CNV_SEGMENTS", cg_eFileType_CNV_SEGMENTS, NULL },
+    { "CNV-SEGMENTS", cg_eFileType_CNV_SEGMENTS, NULL },
+    { "TUMOR_CNV_SEGMENTS", cg_eFileType_TUMOR_CNV_SEGMENTS, NULL },
+    { "TUMOR-CNV-SEGMENTS", cg_eFileType_TUMOR_CNV_SEGMENTS, NULL },
+    { "CNV_DETAILS_SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
+    { "CNV-DETAILS-SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
+    { "CNV-DETAIL-SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
+    { "TUMOR_DETAILS_SCORES", cg_eFileType_TUMOR_DETAILS_SCORES, NULL },
+    { "TUMOR-DETAILS-SCORES", cg_eFileType_TUMOR_DETAILS_SCORES, NULL },
+    { "NONDIPLOID-SOMATIC-CNV-SEGMENTS",
+                cg_eFileType_NONDIPLOID_SOMATIC_CNV_SEGMENTS, NULL },
+    { "NONDIPLOID-SOMATIC-CNV-DETAILS",
+                cg_eFileType_NONDIPLOID_SOMATIC_CNV_DETAILS, NULL },
+    { "JUNCTIONS", cg_eFileType_JUNCTIONS, NULL },
+    { "JUNCTION-DNBS", cg_eFileType_JUNCTION_DNBS, NULL },
+    { "SV-EVENTS", cg_eFileType_SV_EVENTS, NULL },
+    { "VAR-OLPL", cg_eFileType_VAR_OLPL, NULL },
+    { "MEI", cg_eFileType_MEI, NULL },
+    /* from Standard Sequencing Service Data File Formats file test */
+    { "TUMOR-CNV-DETAILS", cg_eFileType_TUMOR_CNV_DETAILS, NULL },
+    { "DIPLOID-SOMATIC-CNV-SEGMENTS",
+                cg_eFileType_DIPLOID_SOMATIC_CNV_SEGMENTS, NULL },
+    { "COVERAGE-DISTRIBUTION-CODING",
+                cg_eFileType_COVERAGE_DISTRIBUTION_CODING, NULL },
+    { "COVERAGE-BY-GC-CODING", cg_eFileType_COVERAGE_BY_GC_CODING, NULL },
+    { "LIB-SMALL-GAPS-ROLLUP", cg_eFileType_LIB_SMALL_GAPS_ROLLUP, NULL },
+    /* from Cancer Sequencing Service Data File Formats file test */
+    { "DIPLOID-SOMATIC-CNV-DETAILSCORES",
+                cg_eFileType_DIPLOID_SOMATIC_CNV_DETAIL_SCORES, NULL },
+
+    { "TAG_LFR", cg_eFileType_TAG_LFR, CGTagLfr15_Make },    
+};
+
+rc_t CGFile22_Make(const CGFileType** self,
+    const char* type, const CGLoaderFile* file)
+{
+    return CGLoaderFileMakeCGFileType(file, type,
+        cg_ETypeXX_names, sizeof cg_ETypeXX_names / sizeof cg_ETypeXX_names[0],
+        self);
+}
diff --git a/tools/cg-load/f2_5.c b/tools/cg-load/f2_5.c
new file mode 100644
index 0000000..48c414d
--- /dev/null
+++ b/tools/cg-load/f2_5.c
@@ -0,0 +1,98 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+#include "factory-evidence-dnbs.h"
+#include "factory-evidence-intervals.h"
+#include "factory-mappings.h"
+#include "factory-reads.h"
+#include "factory-tag-lfr.h"
+
+#include "file.h"
+
+static const CGFileTypeFactory cg_ETypeXX_names[] = {
+    { "READS"                  , cg_eFileType_READS,        CGReads25_Make },
+    { "MAPPINGS"               , cg_eFileType_MAPPINGS,     CGMappings25_Make },
+    { "LIB-DNB"                , cg_eFileType_LIB_DNB,                   NULL },
+    { "LIB-MATE-GAPS"          , cg_eFileType_LIB_MATE_GAPS,             NULL },
+    { "LIB-SEQDEP-GAPS"        , cg_eFileType_LIB_SEQDEP_GAPS,           NULL },
+    { "REFMETRICS"             , cg_eFileType_REFMETRICS,                NULL },
+    { "IDENTIFIER-MAPPING"     , cg_eFileType_IDENTIFIER_MAPPING,        NULL },
+    { "DBSNP-TO-CGI"           , cg_eFileType_DBSNP_TO_CGI,              NULL },
+    { "GENE-ANNOTATION"        , cg_eFileType_GENE_ANNOTATION,           NULL },
+    { "SUMMARY-REPORT"         , cg_eFileType_SUMMARY_REPORT,            NULL },
+    { "VAR-ANNOTATION"         , cg_eFileType_VAR_ANNOTATION,            NULL },
+    { "GENE-VAR-SUMMARY-REPORT", cg_eFileType_GENE_VAR_SUMMARY_REPORT,   NULL },
+    { "EVIDENCE-CORRELATION"   , cg_eFileType_EVIDENCE_CORRELATION,      NULL },
+    { "EVIDENCE-DNBS", cg_eFileType_EVIDENCE_DNBS, CGEvidenceDnbs25_Make },
+    { "EVIDENCE-INTERVALS"    , cg_eFileType_EVIDENCE_INTERVALS,
+                                                   CGEvidenceIntervals25_Make },
+    { "COVERAGE-DISTRIBUTION" , cg_eFileType_COVERAGE_DISTRIBUTION,      NULL },
+    { "COVERAGE-BY-GC"        , cg_eFileType_COVERAGE_BY_GC,             NULL },
+    { "DEPTH-OF-COVERAGE"     , cg_eFileType_DEPTH_OF_COVERAGE,          NULL },
+    { "INDEL-LENGTH-CODING"   , cg_eFileType_INDEL_LENGTH_CODING,        NULL },
+    { "INDEL-LENGTH"          , cg_eFileType_INDEL_LENGTH,               NULL },
+    { "SUBSTITUTION-LENGTH-CODING"
+                              , cg_eFileType_SUBSTITUTION_LENGTH_CODING, NULL },
+    { "SUBSTITUTION-LENGTH"   , cg_eFileType_SUBSTITUTION_LENGTH,        NULL },
+    { "CNV_SEGMENTS"          , cg_eFileType_CNV_SEGMENTS,               NULL },
+    { "CNV-SEGMENTS"          , cg_eFileType_CNV_SEGMENTS,               NULL },
+    { "TUMOR_CNV_SEGMENTS"    , cg_eFileType_TUMOR_CNV_SEGMENTS,         NULL },
+    { "TUMOR-CNV-SEGMENTS"    , cg_eFileType_TUMOR_CNV_SEGMENTS,         NULL },
+    { "CNV_DETAILS_SCORES"    , cg_eFileType_CNV_DETAILS_SCORES,         NULL },
+    { "CNV-DETAILS-SCORES"    , cg_eFileType_CNV_DETAILS_SCORES,         NULL },
+    { "CNV-DETAIL-SCORES"     , cg_eFileType_CNV_DETAILS_SCORES,         NULL },
+    { "TUMOR_DETAILS_SCORES"  , cg_eFileType_TUMOR_DETAILS_SCORES,       NULL },
+    { "TUMOR-DETAILS-SCORES"  , cg_eFileType_TUMOR_DETAILS_SCORES,       NULL },
+    { "NONDIPLOID-SOMATIC-CNV-SEGMENTS",
+                           cg_eFileType_NONDIPLOID_SOMATIC_CNV_SEGMENTS, NULL },
+    { "NONDIPLOID-SOMATIC-CNV-DETAILS",
+                           cg_eFileType_NONDIPLOID_SOMATIC_CNV_DETAILS,  NULL },
+    { "JUNCTIONS"        , cg_eFileType_JUNCTIONS,                       NULL },
+    { "JUNCTION-DNBS"    , cg_eFileType_JUNCTION_DNBS,                   NULL },
+    { "SV-EVENTS"        , cg_eFileType_SV_EVENTS,                       NULL },
+    { "VAR-OLPL"         , cg_eFileType_VAR_OLPL,                        NULL },
+    { "MEI"              , cg_eFileType_MEI,                             NULL },
+    /* from Standard Sequencing Service Data File Formats file test */
+    { "TUMOR-CNV-DETAILS", cg_eFileType_TUMOR_CNV_DETAILS,               NULL },
+    { "DIPLOID-SOMATIC-CNV-SEGMENTS"
+                         , cg_eFileType_DIPLOID_SOMATIC_CNV_SEGMENTS,    NULL },
+    { "COVERAGE-DISTRIBUTION-CODING"
+                            , cg_eFileType_COVERAGE_DISTRIBUTION_CODING, NULL },
+    { "COVERAGE-BY-GC-CODING", cg_eFileType_COVERAGE_BY_GC_CODING,       NULL },
+    { "LIB-SMALL-GAPS-ROLLUP", cg_eFileType_LIB_SMALL_GAPS_ROLLUP,       NULL },
+    /* from Cancer Sequencing Service Data File Formats file test */
+    { "DIPLOID-SOMATIC-CNV-DETAILSCORES"
+                       , cg_eFileType_DIPLOID_SOMATIC_CNV_DETAIL_SCORES, NULL },
+
+    { "TAG_LFR"        , cg_eFileType_TAG_LFR,                CGTagLfr25_Make },
+};
+
+rc_t CGFile25_Make(const CGFileType** self,
+    const char* type, const CGLoaderFile* file)
+{
+    return CGLoaderFileMakeCGFileType(file, type,
+        cg_ETypeXX_names, sizeof cg_ETypeXX_names / sizeof cg_ETypeXX_names[0],
+        self);
+}
diff --git a/tools/cg-load/factory-cmn.h b/tools/cg-load/factory-cmn.h
new file mode 100644
index 0000000..d86258e
--- /dev/null
+++ b/tools/cg-load/factory-cmn.h
@@ -0,0 +1,61 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_cg_load_factory_cmh_h_
+#define _tools_cg_load_factory_cmh_h_
+
+#include <klib/defs.h>
+#include "defs.h"
+
+typedef CGFIELD_LIBRARY_TYPE CGFIELD15_LIBRARY[32];
+typedef CGFIELD_SAMPLE_TYPE CGFIELD15_SAMPLE[32];
+typedef CGFIELD_SLIDE_TYPE CGFIELD15_SLIDE[CG_SLIDE];
+typedef CGFIELD_LANE_TYPE CGFIELD15_LANE[CG_LANE];
+typedef CGFIELD_CHROMOSOME_TYPE CGFIELD15_CHROMOSOME[CG_CHROMOSOME_NAME];
+typedef CGFIELD_ASSEMBLY_ID_TYPE CGFIELD15_ASSEMBLY_ID[44];
+
+/* VDB-951: make it process invalid #SOFTWARE_VERSION value
+typedef CGFIELD_SOFTWARE_VERSION_TYPE CGFIELD15_SOFTWARE_VERSION[16];*/
+typedef CGFIELD_SOFTWARE_VERSION_TYPE CGFIELD15_SOFTWARE_VERSION[38];
+
+typedef CGFIELD_DBSNP_BUILD_TYPE CGFIELD15_DBSNP_BUILD[8];
+typedef CGFIELD_COSMIC_TYPE CGFIELD15_COSMIC[8];
+typedef CGFIELD_PFAM_DATE_TYPE CGFIELD15_PFAM_DATE[16];
+typedef CGFIELD_MIRBASE_VERSION_TYPE CGFIELD15_MIRBASE_VERSION[8];
+typedef CGFIELD_DGV_VERSION_TYPE CGFIELD15_DGV_VERSION[16];
+typedef CGFIELD_GENERATED_AT_TYPE CGFIELD15_GENERATED_AT[32];
+typedef CGFIELD_GENERATED_BY_TYPE CGFIELD15_GENERATED_BY[32];
+typedef CGFIELD_GENE_ANNOTATIONS_TYPE CGFIELD15_GENE_ANNOTATIONS[16];
+typedef CGFIELD_GENOME_REFERENCE_TYPE CGFIELD15_GENOME_REFERENCE[16];
+typedef CGFIELD_BATCH_FILE_NUMBER_TYPE CGFIELD15_BATCH_FILE_NUMBER;
+typedef CGFIELD_BATCH_OFFSET_TYPE CGFIELD15_BATCH_OFFSET;
+typedef CGFIELD_FIELD_SIZE_TYPE CGFIELD15_FIELD_SIZE;
+typedef CGFIELD_MAX_PLOIDY_TYPE CGFIELD15_MAX_PLOIDY;
+typedef CGFIELD_WINDOW_SHIFT_TYPE CGFIELD15_WINDOW_SHIFT;
+typedef CGFIELD_WINDOW_WIDTH_TYPE CGFIELD15_WINDOW_WIDTH;
+typedef CGFIELD_NUMBER_LEVELS_TYPE CGFIELD15_NUMBER_LEVELS;
+typedef CGFIELD_MEAN_LEVEL_X_TYPE CGFIELD15_MEAN_LEVEL_X;
+
+#endif /* _tools_cg_load_factory_cmh_h_ */
diff --git a/tools/cg-load/factory-evidence-dnbs.c b/tools/cg-load/factory-evidence-dnbs.c
new file mode 100644
index 0000000..b48af38
--- /dev/null
+++ b/tools/cg-load/factory-evidence-dnbs.c
@@ -0,0 +1,625 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+#include "debug.h"
+
+#include "factory-cmn.h"
+#include "factory-evidence-dnbs.h"
+
+typedef struct CGEvidenceDnbs15 CGEvidenceDnbs15;
+#define CGFILETYPE_IMPL CGEvidenceDnbs15
+#include "file.h"
+
+#include <klib/printf.h>
+#include <klib/rc.h>
+
+#include <sysalloc.h>
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct CGEvidenceDnbs15 {
+    CGFileType dad;
+    const CGLoaderFile* file;
+    uint64_t records;
+    /* headers */
+    CGFIELD15_ASSEMBLY_ID assembly_id;
+    CGFIELD15_CHROMOSOME chromosome;
+    CGFIELD15_GENERATED_AT generated_at;
+    CGFIELD15_GENERATED_BY generated_by;
+    CGFIELD15_SAMPLE sample;
+    CGFIELD15_SOFTWARE_VERSION software_version;
+};
+
+void CGEvidenceDnbs15_Release(const CGEvidenceDnbs15* cself, uint64_t* records)
+{
+    if( cself != NULL ) {
+        CGEvidenceDnbs15* self = (CGEvidenceDnbs15*)cself;
+        if( records != NULL ) {
+            *records = cself->records;
+        }
+        free(self);
+    }
+}
+
+static
+rc_t CC CGEvidenceDnbs15_Header(const CGEvidenceDnbs15* cself, const char* buf, const size_t len)
+{
+    rc_t rc = 0;
+    size_t slen;
+    CGEvidenceDnbs15* self = (CGEvidenceDnbs15*)cself;
+
+    if( strncmp("ASSEMBLY_ID\t", buf, slen = 12) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->assembly_id, sizeof(self->assembly_id));
+    } else if( strncmp("CHROMOSOME\t", buf, slen = 11) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->chromosome, sizeof(self->chromosome));
+    } else if( strncmp("GENERATED_AT\t", buf, slen = 13) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->generated_at, sizeof(self->generated_at));
+    } else if( strncmp("GENERATED_BY\t", buf, slen = 13) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->generated_by, sizeof(self->generated_by));
+    } else if( strncmp("SAMPLE\t", buf, slen = 7) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->sample, sizeof(self->sample));
+    } else if( strncmp("SOFTWARE_VERSION\t", buf, slen = 17) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->software_version, sizeof(self->software_version));
+    } else {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcName, rcUnrecognized);
+    }
+    return rc;
+}
+
+static rc_t CC CGEvidenceDnbs25_Header(
+    const CGEvidenceDnbs15* cself, const char* buf, const size_t len)
+{
+    rc_t rc = 0;
+    size_t slen;
+    CGEvidenceDnbs15* self = (CGEvidenceDnbs15*)cself;
+
+    /* from SRA-2617 files */
+    if      (strncmp("APPROVAL\t", buf, slen = 9) == 0) {
+    }
+    else if (strncmp("TITLE\t", buf, slen = 6) == 0) {
+    }
+    else if (strncmp("ADDRESS\t", buf, slen = 8) == 0) {
+    }
+
+    /* From Table 1: Header Metadata Present in all Data Files */
+    else if (strncmp("CUSTOMER_SAMPLE_ID\t", buf, slen = 19) == 0) {
+    }
+    else if (strncmp("SAMPLE_SOURCE\t", buf, slen = 14) == 0) {
+    }
+    else if (strncmp("REPORTED_GENDER\t", buf, slen = 16) == 0) {
+    }
+    else if (strncmp("CALLED_GENDER\t", buf, slen = 14) == 0) {
+    }
+    else if (strncmp("TUMOR_STATUS\t", buf, slen = 13) == 0) {
+    }
+    else if (strncmp("LIBRARY_TYPE\t", buf, slen = 13) == 0) {
+    }
+    else if (strncmp("LIBRARY_SOURCE\t", buf, slen = 13) == 0) {
+    }
+
+    else if (strncmp("ASSEMBLY_ID\t", buf, slen = 12) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->assembly_id, sizeof(self->assembly_id));
+    }
+    else if (strncmp("CHROMOSOME\t", buf, slen = 11) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->chromosome, sizeof(self->chromosome));
+    }
+    else if (strncmp("GENERATED_AT\t", buf, slen = 13) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->generated_at, sizeof(self->generated_at));
+    }
+    else if (strncmp("GENERATED_BY\t", buf, slen = 13) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->generated_by, sizeof(self->generated_by));
+    }
+    else if (strncmp("SAMPLE\t", buf, slen = 7) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->sample, sizeof(self->sample));
+    }
+    else if (strncmp("SOFTWARE_VERSION\t", buf, slen = 17) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->software_version, sizeof(self->software_version));
+    }
+    else {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcName, rcUnrecognized);
+    }
+
+    return rc;
+}
+
+static
+rc_t CGEvidenceDnbs15_GetAssemblyId(const CGEvidenceDnbs15* cself, const CGFIELD_ASSEMBLY_ID_TYPE** assembly_id)
+{
+    if( cself->assembly_id[0] == '\0' ) {
+        return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
+    }
+    *assembly_id = cself->assembly_id;
+    return 0;
+}
+
+static
+rc_t CGEvidenceDnbs15_GetSample(const CGEvidenceDnbs15* cself, const CGFIELD_SAMPLE_TYPE** sample)
+{
+    if( cself->sample[0] == '\0' ) {
+        return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
+    }
+    *sample = cself->sample;
+    return 0;
+}
+
+static
+rc_t CGEvidenceDnbs15_GetChromosome(const CGEvidenceDnbs15* cself, const CGFIELD_CHROMOSOME_TYPE** chromosome)
+{
+    if( cself->chromosome[0] == '\0' ) {
+        return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
+    }
+    *chromosome = cself->chromosome;
+    return 0;
+}
+
+static rc_t CC CGEvidenceDnbs_Read(
+    const CGEvidenceDnbs15* cself, const char* interval_id,
+    TEvidenceDnbsData* data, int score_allele_num)
+{
+    rc_t rc = 0;
+    TEvidenceDnbsData_dnb* m = NULL;
+    static TEvidenceDnbsData_dnb next_rec;
+    static char next_interval_id[32] = "";
+
+    /* local copy of unused TEvidenceDnbsData_dnb struct elements */
+    char reference_alignment[CG_EVDNC_ALLELE_CIGAR_LEN];
+    INSDC_coord_zero mate_offset_in_reference;
+    char mate_reference_alignment[CG_EVDNC_ALLELE_CIGAR_LEN];
+    uint16_t score_allele[4] = {0, 0, 0, 0}; /* v1.5 has ScoreAllele[012]; v2.0 - [0123] */
+    char qual[CG_EVDNC_SPOT_LEN];
+
+    strcpy(data->interval_id, interval_id);
+    data->qty = 0;
+    /* already read one rec for this interval_id */
+    if( next_interval_id[0] != '\0' ) {
+        if( strcmp(next_interval_id, interval_id) != 0 ) {
+            /* nothing todo since next interval id is different */
+            return rc;
+        }
+        m = &data->dnbs[data->qty++];
+        memcpy(m, &next_rec, sizeof(next_rec));
+        DEBUG_MSG(10, ("%3u evidenceDnbs: '%s'\t'%s'\t'%s'\t'%s'\t%u\t%lu\t%hu\t%c\t%c\t%i\t'%.*s'"
+                        "\t%i\tnot_used\t0\tnot_used\t%c\t0\t0\t0\t'%.*s'\t'--'\n",
+            data->qty, next_interval_id, m->chr, m->slide, m->lane, m->file_num_in_lane,
+            m->dnb_offset_in_lane_file, m->allele_index, m->side, m->strand, m->offset_in_allele,
+            m->allele_alignment_length, m->allele_alignment, m->offset_in_reference,
+            m->mapping_quality, m->read_len, m->read));
+    }
+    do {
+        int i = 0;
+        char tmp[2];
+        CG_LINE_START(cself->file, b, len, p);
+        if( b == NULL || len == 0 ) {
+            next_interval_id[0] = '\0';
+            break; /* EOF */
+        }
+        if( data->qty >= data->max_qty ) {
+            TEvidenceDnbsData_dnb* x;
+            data->max_qty += 100;
+            x = realloc(data->dnbs, sizeof(*(data->dnbs)) * data->max_qty);
+            if( x == NULL ) {
+                rc = RC(rcRuntime, rcFile, rcReading, rcMemory, rcExhausted);
+                break;
+            }
+            data->dnbs = x;
+        }
+        m = &data->dnbs[data->qty++];
+
+        /*DEBUG_MSG(10, ("%2hu evidenceDnbs: '%.*s'\n", data->qty, len, b));*/
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, next_interval_id, sizeof(next_interval_id));
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, m->chr, sizeof(m->chr));
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, m->slide, sizeof(m->slide));
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, m->lane, sizeof(m->lane));
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2u32(b, p - b, &m->file_num_in_lane);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2u64(b, p - b, &m->dnb_offset_in_lane_file);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2u16(b, p - b, &m->allele_index);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, tmp, sizeof(tmp));
+        if( tmp[0] != 'L' && tmp[0] != 'R' ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+        }
+        m->side = tmp[0];
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, tmp, sizeof(tmp));
+        if( tmp[0] != '+' && tmp[0] != '-' ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+        }
+        m->strand = tmp[0];
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i32(b, p - b, &m->offset_in_allele);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, m->allele_alignment, sizeof(m->allele_alignment));
+        m->allele_alignment_length = p - b;
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i32(b, p - b, &m->offset_in_reference);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, reference_alignment, sizeof(reference_alignment));
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i32(b, p - b, &mate_offset_in_reference);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, mate_reference_alignment, sizeof(mate_reference_alignment));
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, tmp, sizeof(tmp));
+        if( tmp[0] < 33 || tmp[0] > 126 ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+        }
+        m->mapping_quality = tmp[0];
+        for (i = 0; i < score_allele_num; ++i) {
+            CG_LINE_NEXT_FIELD(b, len, p);
+            rc = str2u16(b, p - b, &score_allele[i]);
+	    if(rc){
+		score_allele[i] =0;
+		rc =0;
+	    }
+        }
+        CG_LINE_NEXT_FIELD(b, len, p);
+        m->read_len = p - b;
+        rc = str2buf(b, m->read_len, m->read, sizeof(m->read));
+        CG_LINE_LAST_FIELD(b, len, p);
+        if( m->read_len != p - b ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInconsistent);
+        } else {
+            rc = str2buf(b, p - b, qual, sizeof(qual));
+        }
+        ((CGEvidenceDnbs15*)cself)->records++;
+        if( strcmp(next_interval_id, data->interval_id) != 0 ) {
+            if (score_allele_num == 3) {
+              DEBUG_MSG(10, ("%3u evidenceDnbs: '%s'\t'%s'\t'%s'\t'%s'\t%u\t%lu\t%hu\t%c\t%c\t%i\t'%.*s'"
+                            "\t%i\t'%s'\t%i\t'%s'\t%c\t%hu\t%hu\t%hu\t'%.*s'\t'%s'\n",
+                data->qty, next_interval_id, m->chr, m->slide, m->lane, m->file_num_in_lane,
+                m->dnb_offset_in_lane_file, m->allele_index, m->side, m->strand, m->offset_in_allele,
+                m->allele_alignment_length, m->allele_alignment, m->offset_in_reference,
+                reference_alignment, mate_offset_in_reference, mate_reference_alignment,
+                m->mapping_quality, score_allele[0], score_allele[1], score_allele[2], m->read_len, m->read, qual));
+            }
+            else if (score_allele_num == 4) {
+              DEBUG_MSG(10, ("%3u evidenceDnbs: '%s'\t'%s'\t'%s'\t'%s'\t%u\t%lu\t%hu\t%c\t%c\t%i\t'%.*s'"
+                            "\t%i\t'%s'\t%i\t'%s'\t%c\t%hu\t%hu\t%hu\t%hu\t'%.*s'\t'%s'\n",
+                data->qty, next_interval_id, m->chr, m->slide, m->lane, m->file_num_in_lane,
+                m->dnb_offset_in_lane_file, m->allele_index, m->side, m->strand, m->offset_in_allele,
+                m->allele_alignment_length, m->allele_alignment, m->offset_in_reference,
+                reference_alignment, mate_offset_in_reference, mate_reference_alignment,
+                m->mapping_quality, score_allele[0], score_allele[1], score_allele[2], score_allele[3], m->read_len, m->read, qual));
+            }
+            else { assert(0); }
+        }
+        CG_LINE_END();
+        if( next_interval_id[0] == '\0' ) {
+            break;
+        }
+        if( strcmp(next_interval_id, data->interval_id) != 0 ) {
+            /* next record is from next interval, remeber it and stop */
+            memcpy(&next_rec, m, sizeof(next_rec));
+            data->qty--;
+            break;
+        }
+    } while( rc == 0 );
+    return rc;
+}
+
+static rc_t CC CGEvidenceDnbs25_Read(const CGEvidenceDnbs15 *cself,
+     const char *interval_id, TEvidenceDnbsData *data)
+{
+    const int score_allele_num = 4;
+    rc_t rc = 0;
+    TEvidenceDnbsData_dnb* m = NULL;
+    static TEvidenceDnbsData_dnb next_rec;
+    static char next_interval_id[32] = "";
+
+    /* local copy of unused TEvidenceDnbsData_dnb struct elements */
+    char reference_alignment[CG_EVDNC_ALLELE_CIGAR_LEN];
+    INSDC_coord_zero mate_offset_in_reference;
+    char mate_reference_alignment[CG_EVDNC_ALLELE_CIGAR_LEN];
+    uint16_t score_allele[4] = {0, 0, 0, 0}; /* v >= 2.0 has ScoreAllele[0-3] */
+    char qual[CG_EVDNC_SPOT_LEN];
+
+    bool lfr = false;
+    assert(cself->file->cg_file);
+    lfr = cself->file->cg_file->libraryType == cg_eLibraryType_PureLFR;
+
+    strcpy(data->interval_id, interval_id);
+    data->qty = 0;
+    /* already read one rec for this interval_id */
+    if( next_interval_id[0] != '\0' ) {
+        if( strcmp(next_interval_id, interval_id) != 0 ) {
+            /* nothing todo since next interval id is different */
+            return rc;
+        }
+        m = &data->dnbs[data->qty++];
+        memcpy(m, &next_rec, sizeof(next_rec));
+        DEBUG_MSG(10, ("%3u evidenceDnbs: '%s'\t'%s'\t'%s'\t'%s'\t%u\t%lu\t%hu\t%c\t%c\t%i\t'%.*s'"
+                        "\t%i\tnot_used\t0\tnot_used\t%c\t0\t0\t0\t'%.*s'\t'--'\n",
+            data->qty, next_interval_id, m->chr, m->slide, m->lane, m->file_num_in_lane,
+            m->dnb_offset_in_lane_file, m->allele_index, m->side, m->strand, m->offset_in_allele,
+            m->allele_alignment_length, m->allele_alignment, m->offset_in_reference,
+            m->mapping_quality, m->read_len, m->read));
+    }
+    do {
+        int i = 0;
+        char tmp[2];
+        CG_LINE_START(cself->file, b, len, p);
+        if( b == NULL || len == 0 ) {
+            next_interval_id[0] = '\0';
+            break; /* EOF */
+        }
+        if( data->qty >= data->max_qty ) {
+            TEvidenceDnbsData_dnb* x;
+            data->max_qty += 100;
+            x = realloc(data->dnbs, sizeof(*(data->dnbs)) * data->max_qty);
+            if( x == NULL ) {
+                rc = RC(rcRuntime, rcFile, rcReading, rcMemory, rcExhausted);
+                break;
+            }
+            data->dnbs = x;
+        }
+        m = &data->dnbs[data->qty++];
+
+        /*DEBUG_MSG(10, ("%2hu evidenceDnbs: '%.*s'\n", data->qty, len, b));*/
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, next_interval_id, sizeof(next_interval_id));
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, m->chr, sizeof(m->chr));
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, m->slide, sizeof(m->slide));
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, m->lane, sizeof(m->lane));
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2u32(b, p - b, &m->file_num_in_lane);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2u64(b, p - b, &m->dnb_offset_in_lane_file);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2u16(b, p - b, &m->allele_index);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, tmp, sizeof(tmp));
+        if( tmp[0] != 'L' && tmp[0] != 'R' ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+        }
+        m->side = tmp[0];
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, tmp, sizeof(tmp));
+        if( tmp[0] != '+' && tmp[0] != '-' ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+        }
+        m->strand = tmp[0];
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i32(b, p - b, &m->offset_in_allele);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, m->allele_alignment, sizeof(m->allele_alignment));
+        m->allele_alignment_length = p - b;
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i32(b, p - b, &m->offset_in_reference);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, reference_alignment, sizeof(reference_alignment));
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i32(b, p - b, &mate_offset_in_reference);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, mate_reference_alignment, sizeof(mate_reference_alignment));
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, tmp, sizeof(tmp));
+        if( tmp[0] < 33 || tmp[0] > 126 ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+        }
+        m->mapping_quality = tmp[0];
+        for (i = 0; i < score_allele_num; ++i) {
+            CG_LINE_NEXT_FIELD(b, len, p);
+            rc = str2u16(b, p - b, &score_allele[i]);
+	        if (rc != 0) {
+		        score_allele[i] = 0;
+		        rc = 0;
+	        }
+        }
+        CG_LINE_NEXT_FIELD(b, len, p);
+        m->read_len = p - b;
+        rc = str2buf(b, m->read_len, m->read, sizeof(m->read));
+
+        /* Scores */
+        if (lfr) {
+            CG_LINE_NEXT_FIELD(b, len, p);
+        }
+        else {
+            CG_LINE_LAST_FIELD(b, len, p);
+        }
+        if (m->read_len != p - b) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInconsistent);
+        }
+        else {
+            rc = str2buf(b, p - b, qual, sizeof(qual));
+        }
+
+        if (lfr) {
+         /* Standard Sequencing Service Data File Formats (File format v2.5)
+            states that Scores is the last column in evidenceDnbs file
+            but in 2.5 submission mentioned in SRA-2617
+            there are additionally wellId and wellScore columns.
+            #LIBRARY_TYPE is Pure LFR for this submission. */
+
+            /* wellId */
+            CG_LINE_NEXT_FIELD(b, len, p);
+            rc = str2u16(b, p - b, &m->wellId);
+            if (rc == 0 && (m->wellId < 0 || m->wellId > 384)) {
+                rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+            }
+
+            /* wellScore */
+            CG_LINE_LAST_FIELD(b, len, p);
+        }
+
+        ((CGEvidenceDnbs15*)cself)->records++;
+        if( strcmp(next_interval_id, data->interval_id) != 0 ) {
+            if (score_allele_num == 3) {
+              DEBUG_MSG(10, ("%3u evidenceDnbs: '%s'\t'%s'\t'%s'\t'%s'\t%u\t%lu\t%hu\t%c\t%c\t%i\t'%.*s'"
+                            "\t%i\t'%s'\t%i\t'%s'\t%c\t%hu\t%hu\t%hu\t'%.*s'\t'%s'\n",
+                data->qty, next_interval_id, m->chr, m->slide, m->lane, m->file_num_in_lane,
+                m->dnb_offset_in_lane_file, m->allele_index, m->side, m->strand, m->offset_in_allele,
+                m->allele_alignment_length, m->allele_alignment, m->offset_in_reference,
+                reference_alignment, mate_offset_in_reference, mate_reference_alignment,
+                m->mapping_quality, score_allele[0], score_allele[1], score_allele[2], m->read_len, m->read, qual));
+            }
+            else if (score_allele_num == 4) {
+              DEBUG_MSG(10, ("%3u evidenceDnbs: '%s'\t'%s'\t'%s'\t'%s'\t%u\t%lu\t%hu\t%c\t%c\t%i\t'%.*s'"
+                            "\t%i\t'%s'\t%i\t'%s'\t%c\t%hu\t%hu\t%hu\t%hu\t'%.*s'\t'%s'\n",
+                data->qty, next_interval_id, m->chr, m->slide, m->lane, m->file_num_in_lane,
+                m->dnb_offset_in_lane_file, m->allele_index, m->side, m->strand, m->offset_in_allele,
+                m->allele_alignment_length, m->allele_alignment, m->offset_in_reference,
+                reference_alignment, mate_offset_in_reference, mate_reference_alignment,
+                m->mapping_quality, score_allele[0], score_allele[1], score_allele[2], score_allele[3], m->read_len, m->read, qual));
+            }
+            else { assert(0); }
+        }
+        CG_LINE_END();
+        if( next_interval_id[0] == '\0' ) {
+            break;
+        }
+        if( strcmp(next_interval_id, data->interval_id) != 0 ) {
+            /* next record is from next interval, remeber it and stop */
+            memcpy(&next_rec, m, sizeof(next_rec));
+            data->qty--;
+            break;
+        }
+    } while( rc == 0 );
+    return rc;
+}
+
+static
+rc_t CC CGEvidenceDnbs15_Read(const CGEvidenceDnbs15* self, const char* interval_id, TEvidenceDnbsData* data)
+{   return CGEvidenceDnbs_Read(self, interval_id, data, 3); }
+
+static
+rc_t CC CGEvidenceDnbs20_Read(const CGEvidenceDnbs15* self, const char* interval_id, TEvidenceDnbsData* data)
+{   return CGEvidenceDnbs_Read(self, interval_id, data, 4); }
+
+static const CGFileType_vt CGEvidenceDnbs15_vt =
+{
+    CGEvidenceDnbs15_Header,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    CGEvidenceDnbs15_Read,
+    NULL, /* tag_lfr */
+    CGEvidenceDnbs15_GetAssemblyId,
+    NULL,
+    NULL,
+    NULL,
+    CGEvidenceDnbs15_GetSample,
+    CGEvidenceDnbs15_GetChromosome,
+    CGEvidenceDnbs15_Release
+};
+
+static const CGFileType_vt CGEvidenceDnbs20_vt =
+{
+    CGEvidenceDnbs15_Header,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    CGEvidenceDnbs20_Read,
+    NULL, /* tag_lfr */
+    CGEvidenceDnbs15_GetAssemblyId,
+    NULL,
+    NULL,
+    NULL,
+    CGEvidenceDnbs15_GetSample,
+    CGEvidenceDnbs15_GetChromosome,
+    CGEvidenceDnbs15_Release
+};
+
+static const CGFileType_vt CGEvidenceDnbs25_vt = {
+    CGEvidenceDnbs25_Header,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    CGEvidenceDnbs25_Read,
+    NULL, /* tag_lfr */
+    CGEvidenceDnbs15_GetAssemblyId,
+    NULL,
+    NULL,
+    NULL,
+    CGEvidenceDnbs15_GetSample,
+    CGEvidenceDnbs15_GetChromosome,
+    CGEvidenceDnbs15_Release
+};
+
+static
+rc_t CC CGEvidenceDnbs_Make(const CGFileType** cself, const CGLoaderFile* file,
+                              const CGFileType_vt* vt)
+{
+    rc_t rc = 0;
+    CGEvidenceDnbs15* obj = NULL;
+
+    assert(vt);
+
+    if( cself == NULL || file == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcParam, rcNull);
+    } else {
+        *cself = NULL;
+        if( (obj = calloc(1, sizeof(*obj))) == NULL ) {
+            rc = RC(rcRuntime, rcFile, rcConstructing, rcMemory, rcExhausted);
+        } else {
+            obj->file = file;
+            obj->dad.type = cg_eFileType_EVIDENCE_DNBS;
+            obj->dad.vt = vt;
+        }
+    }
+    if( rc == 0 ) {
+        *cself = &obj->dad;
+    } else {
+        CGEvidenceDnbs15_Release(obj, NULL);
+    }
+    return rc;
+}
+
+rc_t CC CGEvidenceDnbs15_Make(const CGFileType** self, const CGLoaderFile* file)
+{   return CGEvidenceDnbs_Make(self, file, &CGEvidenceDnbs15_vt); }
+
+rc_t CC CGEvidenceDnbs13_Make(const CGFileType** self, const CGLoaderFile* file)
+{   return CGEvidenceDnbs15_Make(self, file); }
+
+rc_t CC CGEvidenceDnbs20_Make(const CGFileType** self, const CGLoaderFile* file)
+{   return CGEvidenceDnbs_Make(self, file, &CGEvidenceDnbs20_vt); }
+
+rc_t CC CGEvidenceDnbs22_Make(const CGFileType** self, const CGLoaderFile* file)
+{   return CGEvidenceDnbs_Make(self, file, &CGEvidenceDnbs20_vt); }
+
+rc_t CC CGEvidenceDnbs25_Make(const CGFileType** self, const CGLoaderFile* file)
+{
+    return CGEvidenceDnbs_Make(self, file, &CGEvidenceDnbs25_vt);
+}
diff --git a/tools/cg-load/factory-evidence-dnbs.h b/tools/cg-load/factory-evidence-dnbs.h
new file mode 100644
index 0000000..1fa0194
--- /dev/null
+++ b/tools/cg-load/factory-evidence-dnbs.h
@@ -0,0 +1,46 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_cg_load_factory_evidence_dnbs_h_
+#define _tools_cg_load_factory_evidence_dnbs_h_
+
+#include <klib/defs.h>
+
+struct CGFileType;
+struct CGLoaderFile;
+
+rc_t CC CGEvidenceDnbs13_Make(const struct CGFileType** self,
+                              const struct CGLoaderFile* file);
+rc_t CC CGEvidenceDnbs15_Make(const struct CGFileType** self,
+                              const struct CGLoaderFile* file);
+rc_t CC CGEvidenceDnbs20_Make(const struct CGFileType** self,
+                              const struct CGLoaderFile* file);
+rc_t CC CGEvidenceDnbs22_Make(const struct CGFileType** self,
+                              const struct CGLoaderFile* file);
+rc_t CC CGEvidenceDnbs25_Make(const struct CGFileType** self,
+                              const struct CGLoaderFile* file);
+
+
+#endif /* _tools_cg_load_factory_evidence_dnbs_h_ */
diff --git a/tools/cg-load/factory-evidence-intervals.c b/tools/cg-load/factory-evidence-intervals.c
new file mode 100644
index 0000000..339a02d
--- /dev/null
+++ b/tools/cg-load/factory-evidence-intervals.c
@@ -0,0 +1,396 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+#include "debug.h"
+#include "factory-cmn.h"
+#include "factory-evidence-intervals.h"
+
+typedef struct CGEvidenceIntervals15 CGEvidenceIntervals15;
+#define CGFILETYPE_IMPL CGEvidenceIntervals15
+#include "file.h"
+
+#include <klib/printf.h>
+#include <klib/rc.h>
+
+#include <sysalloc.h>
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct CGEvidenceIntervals15 {
+    CGFileType dad;
+    const CGLoaderFile* file;
+    uint64_t records;
+    /* headers */
+    CGFIELD15_ASSEMBLY_ID assembly_id;
+    CGFIELD15_CHROMOSOME chromosome;
+    CGFIELD15_GENERATED_AT generated_at;
+    CGFIELD15_GENERATED_BY generated_by;
+    CGFIELD15_SAMPLE sample;
+    CGFIELD15_SOFTWARE_VERSION software_version;
+};
+
+static
+rc_t CC CGEvidenceIntervals15_Header(const CGEvidenceIntervals15* cself, const char* buf, const size_t len)
+{
+    rc_t rc = 0;
+    size_t slen;
+    CGEvidenceIntervals15* self = (CGEvidenceIntervals15*)cself;
+
+    if( strncmp("ASSEMBLY_ID\t", buf, slen = 12) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->assembly_id, sizeof(self->assembly_id));
+    } else if( strncmp("CHROMOSOME\t", buf, slen = 11) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->chromosome, sizeof(self->chromosome));
+    } else if( strncmp("GENERATED_AT\t", buf, slen = 13) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->generated_at, sizeof(self->generated_at));
+    } else if( strncmp("GENERATED_BY\t", buf, slen = 13) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->generated_by, sizeof(self->generated_by));
+    } else if( strncmp("SAMPLE\t", buf, slen = 7) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->sample, sizeof(self->sample));
+    } else if( strncmp("SOFTWARE_VERSION\t", buf, slen = 17) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->software_version, sizeof(self->software_version));
+    } else {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcName, rcUnrecognized);
+    }
+    return rc;
+}
+
+static rc_t CC CGEvidenceIntervals25_Header(const CGEvidenceIntervals15* cself,
+    const char* buf, const size_t len)
+{
+    rc_t rc = 0;
+    size_t slen = 0;
+    CGEvidenceIntervals15* self = (CGEvidenceIntervals15*)cself;
+
+    /* from SRA-2617 files */
+    if      (strncmp("APPROVAL\t", buf, slen = 9) == 0) {
+    }
+    else if (strncmp("TITLE\t", buf, slen = 6) == 0) {
+    }
+    else if (strncmp("ADDRESS\t", buf, slen = 8) == 0) {
+    }
+
+    /* From Table 1: Header Metadata Present in all Data Files */
+    else if (strncmp("CUSTOMER_SAMPLE_ID\t", buf, slen = 19) == 0) {
+    }
+    else if (strncmp("SAMPLE_SOURCE\t", buf, slen = 14) == 0) {
+    }
+    else if (strncmp("REPORTED_GENDER\t", buf, slen = 16) == 0) {
+    }
+    else if (strncmp("CALLED_GENDER\t", buf, slen = 14) == 0) {
+    }
+    else if (strncmp("TUMOR_STATUS\t", buf, slen = 13) == 0) {
+    }
+    else if (strncmp("LIBRARY_TYPE\t", buf, slen = 13) == 0) {
+    }
+    else if (strncmp("LIBRARY_SOURCE\t", buf, slen = 13) == 0) {
+    }
+
+    else if (strncmp("ASSEMBLY_ID\t", buf, slen = 12) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->assembly_id, sizeof(self->assembly_id));
+    }
+    else if (strncmp("CHROMOSOME\t", buf, slen = 11) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->chromosome, sizeof(self->chromosome));
+    }
+    else if (strncmp("GENERATED_AT\t", buf, slen = 13) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->generated_at, sizeof(self->generated_at));
+    }
+    else if (strncmp("GENERATED_BY\t", buf, slen = 13) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->generated_by, sizeof(self->generated_by));
+    }
+    else if (strncmp("SAMPLE\t", buf, slen = 7) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->sample, sizeof(self->sample));
+    }
+    else if (strncmp("SOFTWARE_VERSION\t", buf, slen = 17) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->software_version, sizeof(self->software_version));
+    }
+    else {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcName, rcUnrecognized);
+    }
+
+    return rc;
+}
+
+static
+rc_t CGEvidenceIntervals15_GetAssemblyId(const CGEvidenceIntervals15* cself, const CGFIELD_ASSEMBLY_ID_TYPE** assembly_id)
+{
+    if( cself->assembly_id[0] == '\0' ) {
+        return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
+    }
+    *assembly_id = cself->assembly_id;
+    return 0;
+}
+
+static
+rc_t CGEvidenceIntervals15_GetSample(const CGEvidenceIntervals15* cself, const CGFIELD_SAMPLE_TYPE** sample)
+{
+    if( cself->sample[0] == '\0' ) {
+        return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
+    }
+    *sample = cself->sample;
+    return 0;
+}
+
+static
+rc_t CGEvidenceIntervals15_GetChromosome(const CGEvidenceIntervals15* cself, const CGFIELD_CHROMOSOME_TYPE** chromosome)
+{
+    if( cself->chromosome[0] == '\0' ) {
+        return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
+    }
+    *chromosome = cself->chromosome;
+    return 0;
+}
+
+static
+rc_t CC CGEvidenceIntervals15_Read(const CGEvidenceIntervals15* cself, TEvidenceIntervalsData* data)
+{
+    rc_t rc = 0;
+
+    CG_LINE_START(cself->file, b, len, p);
+    if( b == NULL || len == 0) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcDone);
+        break;
+    }
+    /*DEBUG_MSG(10, ("evidenceIntervals: '%.*s'\n", len, b));*/
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->interval_id, sizeof(data->interval_id));
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->chr, sizeof(data->chr));
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2i32(b, p - b, &data->offset);
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2u32(b, p - b, &data->length);
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2u16(b, p - b, &data->ploidy);
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->allele_indexes, sizeof(data->allele_indexes));
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2i32(b, p - b, &data->score);
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->allele[0], sizeof(data->allele[0]));
+    data->allele_length[0] = p - b;
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->allele[1], sizeof(data->allele[1]));
+    data->allele_length[1] = p - b;
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->allele[2], sizeof(data->allele[2]));
+    data->allele_length[2] = p - b;
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->allele_alignment[1], sizeof(data->allele_alignment[1]));
+    data->allele_alignment_length[1] = p - b;
+    CG_LINE_LAST_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->allele_alignment[2], sizeof(data->allele_alignment[2]));
+    data->allele_alignment_length[2] = p - b;
+    ((CGEvidenceIntervals15*)cself)->records++;
+    DEBUG_MSG(10, ("evidenceIntervals: '%s'\t'%s'\t%i\t%u\t%u\t%s\t%u\t'%s'\t'%s'\t'%s'\t'%s'\t'%s'\n",
+        data->interval_id, data->chr, data->offset, data->length, data->ploidy,
+        data->allele_indexes, data->score, data->allele[0], data->allele[1], data->allele[2],
+        data->allele_alignment[1], data->allele_alignment[2]));
+    CG_LINE_END();
+    return rc;
+}
+
+static
+rc_t CC CGEvidenceIntervals20_Read(const CGEvidenceIntervals15* cself, TEvidenceIntervalsData* data)
+{
+    rc_t rc = 0;
+
+    CG_LINE_START(cself->file, b, len, p);
+    if( b == NULL || len == 0) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcDone);
+        break;
+    }
+    /*DEBUG_MSG(10, ("evidenceIntervals: '%.*s'\n", len, b));*/
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->interval_id, sizeof(data->interval_id));
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->chr, sizeof(data->chr));
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2i32(b, p - b, &data->offset);
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2u32(b, p - b, &data->length);
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2u16(b, p - b, &data->ploidy);
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->allele_indexes, sizeof(data->allele_indexes));
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2i32(b, p - b, &data->scoreVAF);
+    data->score = data->scoreVAF; /***TODO: do we need re-calculation? ***/
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2i32(b, p - b, &data->scoreEAF);
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->allele[0], sizeof(data->allele[0]));
+    data->allele_length[0] = p - b;
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->allele[1], sizeof(data->allele[1]));
+    data->allele_length[1] = p - b;
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->allele[2], sizeof(data->allele[2]));
+    data->allele_length[2] = p - b;
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->allele[3], sizeof(data->allele[3]));
+    data->allele_length[3] = p - b;
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->allele_alignment[1], sizeof(data->allele_alignment[1]));
+    data->allele_alignment_length[1] = p - b;
+    CG_LINE_NEXT_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->allele_alignment[2], sizeof(data->allele_alignment[2]));
+    data->allele_alignment_length[2] = p - b;
+    CG_LINE_LAST_FIELD(b, len, p);
+    rc = str2buf(b, p - b, data->allele_alignment[3], sizeof(data->allele_alignment[3]));
+    data->allele_alignment_length[3] = p - b;
+    ((CGEvidenceIntervals15*)cself)->records++;
+    DEBUG_MSG(10, (
+        "evidenceIntervals: '%s'\t'%s'\t%i\t%u\t%u\t%s\t%u\t%u\t'%s'\t'%s'\t'%s'\t'%s'\t'%s'\t'%s'\t'%s'\n",
+        data->interval_id, data->chr, data->offset, data->length, data->ploidy,
+        data->allele_indexes, data->scoreVAF, data->scoreEAF,
+        data->allele[0], data->allele[1], data->allele[2], data->allele[3],
+        data->allele_alignment[1], data->allele_alignment[2], data->allele_alignment[3]));
+    CG_LINE_END();
+    return rc;
+}
+
+static
+void CC CGEvidenceIntervals15_Release(const CGEvidenceIntervals15* cself, uint64_t* records)
+{
+    if( cself != NULL ) {
+        CGEvidenceIntervals15* self = (CGEvidenceIntervals15*)cself;
+        if( records != NULL ) {
+            *records = cself->records;
+        }
+        free(self);
+    }
+}
+
+static const CGFileType_vt CGEvidenceIntervals15_vt =
+{
+    CGEvidenceIntervals15_Header,
+    NULL,
+    NULL,
+    NULL,
+    CGEvidenceIntervals15_Read,
+    NULL,
+    NULL, /* tag_lfr */
+    CGEvidenceIntervals15_GetAssemblyId,
+    NULL,
+    NULL,
+    NULL,
+    CGEvidenceIntervals15_GetSample,
+    CGEvidenceIntervals15_GetChromosome,
+    CGEvidenceIntervals15_Release
+};
+
+static const CGFileType_vt CGEvidenceIntervals20_vt =
+{
+    CGEvidenceIntervals15_Header,
+    NULL,
+    NULL,
+    NULL,
+    CGEvidenceIntervals20_Read,
+    NULL,
+    NULL, /* tag_lfr */
+    CGEvidenceIntervals15_GetAssemblyId,
+    NULL,
+    NULL,
+    NULL,
+    CGEvidenceIntervals15_GetSample,
+    CGEvidenceIntervals15_GetChromosome,
+    CGEvidenceIntervals15_Release
+};
+
+static const CGFileType_vt CGEvidenceIntervals25_vt = {
+    CGEvidenceIntervals25_Header,
+    NULL,
+    NULL,
+    NULL,
+    CGEvidenceIntervals20_Read,
+    NULL,
+    NULL, /* tag_lfr */
+    CGEvidenceIntervals15_GetAssemblyId,
+    NULL,
+    NULL,
+    NULL,
+    CGEvidenceIntervals15_GetSample,
+    CGEvidenceIntervals15_GetChromosome,
+    CGEvidenceIntervals15_Release
+};
+
+static
+rc_t CGEvidenceIntervals_Make(const CGFileType** cself, const CGLoaderFile* file, const CGFileType_vt* vt)
+{
+    rc_t rc = 0;
+    CGEvidenceIntervals15* obj = NULL;
+
+    assert(vt);
+
+    if( cself == NULL || file == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcParam, rcNull);
+    }
+    if( rc == 0 ) {
+        *cself = NULL;
+        if( (obj = calloc(1, sizeof(*obj))) == NULL ) {
+            rc = RC(rcRuntime, rcFile, rcConstructing, rcMemory, rcExhausted);
+        } else {
+            obj->file = file;
+            obj->dad.type = cg_eFileType_EVIDENCE_INTERVALS;
+            obj->dad.vt = vt;
+        }
+    }
+    if( rc == 0 ) {
+        *cself = &obj->dad;
+    } else {
+        CGEvidenceIntervals15_Release(obj, NULL);
+    }
+    return rc;
+}
+
+rc_t CGEvidenceIntervals15_Make(const CGFileType** self,
+    const CGLoaderFile* file)
+{   return CGEvidenceIntervals_Make(self, file, &CGEvidenceIntervals15_vt); }
+
+rc_t CGEvidenceIntervals13_Make(const CGFileType** self,
+    const CGLoaderFile* file)
+{   return CGEvidenceIntervals15_Make(self, file); }
+
+rc_t CGEvidenceIntervals20_Make(const CGFileType** self,
+    const CGLoaderFile* file)
+{   return CGEvidenceIntervals_Make(self, file, &CGEvidenceIntervals20_vt); }
+
+rc_t CGEvidenceIntervals22_Make(const CGFileType** self,
+    const CGLoaderFile* file)
+{   return CGEvidenceIntervals20_Make(self, file); }
+
+rc_t CGEvidenceIntervals25_Make(const CGFileType **self,
+    const CGLoaderFile *file)
+{
+    return CGEvidenceIntervals_Make(self, file, &CGEvidenceIntervals25_vt);
+}
diff --git a/tools/cg-load/factory-evidence-intervals.h b/tools/cg-load/factory-evidence-intervals.h
new file mode 100644
index 0000000..4f781f1
--- /dev/null
+++ b/tools/cg-load/factory-evidence-intervals.h
@@ -0,0 +1,46 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_cg_load_factory_evidence_intervals_h_
+#define _tools_cg_load_factory_evidence_intervals_h_
+
+#include <klib/defs.h>
+
+struct CGFileType;
+struct CGLoaderFile;
+
+rc_t CGEvidenceIntervals13_Make(const struct CGFileType** self,
+                                const struct CGLoaderFile* file);
+rc_t CGEvidenceIntervals15_Make(const struct CGFileType** self,
+                                const struct CGLoaderFile* file);
+rc_t CGEvidenceIntervals20_Make(const struct CGFileType** self,
+                                const struct CGLoaderFile* file);
+rc_t CGEvidenceIntervals22_Make(const struct CGFileType** self,
+                                const struct CGLoaderFile* file);
+rc_t CGEvidenceIntervals25_Make(const struct CGFileType** self,
+                                const struct CGLoaderFile* file);
+
+
+#endif /* _tools_cg_load_factory_evidence_intervals_h_ */
diff --git a/tools/cg-load/factory-file.h b/tools/cg-load/factory-file.h
new file mode 100644
index 0000000..c19c398
--- /dev/null
+++ b/tools/cg-load/factory-file.h
@@ -0,0 +1,47 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_cg_load_factory_file_h_
+#define _tools_cg_load_factory_file_h_
+
+#include <klib/defs.h>
+
+struct CGFileType;
+struct CGLoaderFile;
+
+rc_t CGFile13_Make(const struct CGFileType** self,
+                   const char* type, const struct CGLoaderFile* file);
+rc_t CGFile15_Make(const struct CGFileType** self,
+                   const char* type, const struct CGLoaderFile* file);
+rc_t CGFile17_Make(const struct CGFileType** self,
+                   const char* type, const struct CGLoaderFile* file);
+rc_t CGFile20_Make(const struct CGFileType** self,
+                   const char* type, const struct CGLoaderFile* file);
+rc_t CGFile22_Make(const struct CGFileType** self,
+                   const char* type, const struct CGLoaderFile* file);
+rc_t CGFile25_Make(const struct CGFileType** self,
+                   const char* type, const struct CGLoaderFile* file);
+
+#endif /* _tools_cg_load_factory_file_h_ */
diff --git a/tools/cg-load/factory-mappings.c b/tools/cg-load/factory-mappings.c
new file mode 100644
index 0000000..8434c84
--- /dev/null
+++ b/tools/cg-load/factory-mappings.c
@@ -0,0 +1,539 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+
+#include "debug.h"
+#include "factory-cmn.h"
+#include "factory-mappings.h"
+
+typedef struct CGMappings15 CGMappings15;
+#define CGFILETYPE_IMPL CGMappings15
+#include "file.h"
+
+#include <klib/printf.h>
+#include <klib/rc.h>
+
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+
+struct CGMappings15 {
+    CGFileType dad;
+    const CGLoaderFile* file;
+    uint64_t records;
+    /* headers */
+    CGFIELD15_ASSEMBLY_ID assembly_id;
+    CGFIELD15_BATCH_FILE_NUMBER batch_file_number;
+    CGFIELD15_GENERATED_AT generated_at;
+    CGFIELD15_GENERATED_BY generated_by;
+    CGFIELD15_LANE lane;
+    CGFIELD15_LIBRARY library;
+    CGFIELD15_SAMPLE sample;
+    CGFIELD15_SLIDE slide;
+    CGFIELD15_SOFTWARE_VERSION software_version;
+};
+
+void CGMappings15_Release(const CGMappings15* cself, uint64_t* records)
+{
+    if( cself != NULL ) {
+        CGMappings15* self = (CGMappings15*)cself;
+        if( records != NULL ) {
+            *records = cself->records;
+        }
+        free(self);
+    }
+}
+
+static
+rc_t CC CGMappings15_Header(const CGMappings15* cself, const char* buf, const size_t len)
+{
+    rc_t rc = 0;
+    size_t slen;
+    CGMappings15* self = (CGMappings15*)cself;
+
+    if( strncmp("ASSEMBLY_ID\t", buf, slen = 12) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->assembly_id, sizeof(self->assembly_id));
+    } else if( strncmp("BATCH_FILE_NUMBER\t", buf, slen = 18) == 0 ) {
+        rc = str2u32(&buf[slen], len - slen, &self->batch_file_number);
+        if( self->batch_file_number < 1 ) {
+            rc = RC(rcRuntime, rcFile, rcConstructing, rcItem, rcOutofrange);
+        }
+    } else if( strncmp("GENERATED_AT\t", buf, slen = 13) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->generated_at, sizeof(self->generated_at));
+    } else if( strncmp("GENERATED_BY\t", buf, slen = 13) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->generated_by, sizeof(self->generated_by));
+    } else if( strncmp("LANE\t", buf, slen = 5) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->lane, sizeof(self->lane));
+    } else if( strncmp("LIBRARY\t", buf, slen = 8) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->library, sizeof(self->library));
+    } else if( strncmp("SAMPLE\t", buf, slen = 7) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->sample, sizeof(self->sample));
+    } else if( strncmp("SLIDE\t", buf, slen = 6) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->slide, sizeof(self->slide));
+    } else if( strncmp("SOFTWARE_VERSION\t", buf, slen = 17) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->software_version, sizeof(self->software_version));
+    } else {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcName, rcUnrecognized);
+    }
+    return rc;
+}
+
+static rc_t CC CGMappings25_Header(const CGMappings15* cself,
+    const char* buf, const size_t len)
+{
+    rc_t rc = 0;
+    size_t slen = 0;
+    CGMappings15* self = (CGMappings15*)cself;
+
+    /* from SRA-2617 files */
+    if      (strncmp("APPROVAL\t", buf, slen = 9) == 0) {
+    }
+    else if (strncmp("TITLE\t", buf, slen = 6) == 0) {
+    }
+    else if (strncmp("ADDRESS\t", buf, slen = 8) == 0) {
+    }
+
+    /* From Table 1: Header Metadata Present in all Data Files */
+    else if (strncmp("CUSTOMER_SAMPLE_ID\t", buf, slen = 19) == 0) {
+    }
+    else if (strncmp("SAMPLE_SOURCE\t", buf, slen = 14) == 0) {
+    }
+    else if (strncmp("REPORTED_GENDER\t", buf, slen = 16) == 0) {
+    }
+    else if (strncmp("CALLED_GENDER\t", buf, slen = 14) == 0) {
+    }
+    else if (strncmp("TUMOR_STATUS\t", buf, slen = 13) == 0) {
+    }
+    else if (strncmp("LIBRARY_TYPE\t", buf, slen = 13) == 0) {
+    }
+    else if (strncmp("LIBRARY_SOURCE\t", buf, slen = 13) == 0) {
+    }
+
+    else if (strncmp("ASSEMBLY_ID\t", buf, slen = 12) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->assembly_id, sizeof(self->assembly_id));
+    }
+    else if (strncmp("BATCH_FILE_NUMBER\t", buf, slen = 18) == 0) {
+        rc = str2u32(&buf[slen], len - slen, &self->batch_file_number);
+        if (self->batch_file_number < 1 ) {
+            rc = RC(rcRuntime, rcFile, rcConstructing, rcItem, rcOutofrange);
+        }
+    }
+    else if (strncmp("GENERATED_AT\t", buf, slen = 13) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->generated_at, sizeof(self->generated_at));
+    }
+    else if (strncmp("GENERATED_BY\t", buf, slen = 13) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->generated_by, sizeof(self->generated_by));
+    }
+    else if (strncmp("LANE\t", buf, slen = 5) == 0) {
+        rc = str2buf(&buf[slen], len - slen, self->lane, sizeof(self->lane));
+    }
+    else if (strncmp("LIBRARY\t", buf, slen = 8) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->library, sizeof(self->library));
+    }
+    else if (strncmp("SAMPLE\t", buf, slen = 7) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->sample, sizeof(self->sample));
+    }
+    else if (strncmp("SLIDE\t", buf, slen = 6) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->slide, sizeof(self->slide));
+    }
+    else if (strncmp("SOFTWARE_VERSION\t", buf, slen = 17) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->software_version, sizeof(self->software_version));
+    }
+    else {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcName, rcUnrecognized);
+    }
+
+    return rc;
+}
+
+static
+rc_t CGMappings15_GetAssemblyId(const CGMappings15* cself, const CGFIELD_ASSEMBLY_ID_TYPE** assembly_id)
+{
+    if( cself->assembly_id[0] == '\0' ) {
+        return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
+    }
+    *assembly_id = cself->assembly_id;
+    return 0;
+}
+
+static
+rc_t CGMappings15_GetSlide(const CGMappings15* cself, const CGFIELD_SLIDE_TYPE** slide)
+{
+    if( cself->slide[0] == '\0' ) {
+        return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
+    }
+    *slide = cself->slide;
+    return 0;
+}
+
+static
+rc_t CGMappings15_GetLane(const CGMappings15* cself, const CGFIELD_LANE_TYPE** lane)
+{
+    if( cself->lane[0] == '\0' ) {
+        return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
+    }
+    *lane = cself->lane;
+    return 0;
+}
+
+static
+rc_t CGMappings15_GetBatchFileNumber(const CGMappings15* cself, const CGFIELD_BATCH_FILE_NUMBER_TYPE** batch_file_number)
+{
+    *batch_file_number = &cself->batch_file_number;
+    return 0;
+}
+
+static
+rc_t CC CGMappings15_Read(const CGMappings15* cself, TMappingsData* data)
+{
+    rc_t rc = 0;
+    TMappingsData_map* m = NULL;
+
+    data->map_qty = 0;
+    do {
+        char tmp[2];
+        CG_LINE_START(cself->file, b, len, p);
+        if( b == NULL || len == 0 ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInsufficient);
+            break;
+        }
+        m = &data->map[data->map_qty];
+        m->saved = false;
+        /*DEBUG_MSG(10, ("mappings %4u: '%.*s'\n", data->map_qty, len, b));*/
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2u16(b, p - b, &m->flags);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, m->chr, sizeof(m->chr));
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i32(b, p - b, &m->offset);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i16(b, p - b, &m->gap[0]);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i16(b, p - b, &m->gap[1]);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i16(b, p - b, &m->gap[2]);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, tmp, sizeof(tmp));
+        if( tmp[0] < 33 || tmp[0] > 126 ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+        }
+        m->weight = tmp[0];
+        CG_LINE_LAST_FIELD(b, len, p);
+        if( (rc = str2u32(b, p - b, &m->mate)) != 0 ) {
+        } else if( m->flags > 7 ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+        } else if( ++data->map_qty >= CG_MAPPINGS_MAX ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcBuffer, rcInsufficient);
+        }
+        ((CGMappings15*)cself)->records++;
+        DEBUG_MSG(10, ("mappings %4u:  %u\t'%s'\t%u\t%i\t%i\t%i\t%c\t%u\n",
+                        data->map_qty - 1, m->flags, m->chr, m->offset,
+                        m->gap[0], m->gap[1], m->gap[2], m->weight, m->mate));
+        CG_LINE_END();
+    } while( rc == 0 && !(m->flags & cg_eLastDNBRecord) );
+    if (rc == 0) {
+        unsigned i;
+        unsigned const n = data->map_qty;
+        
+        for (i = 0; i != n && rc == 0; ++i) {
+            unsigned const mate = data->map[i].mate;
+            
+            if (mate > n)
+                data->map[i].mate = i;
+        }
+    }
+    return rc;
+}
+
+static
+rc_t CC CGMappings22_Read(const CGMappings15* cself, TMappingsData* data)
+{
+    rc_t rc = 0;
+    TMappingsData_map* m = NULL;
+
+    data->map_qty = 0;
+    do {
+        char tmp[2];
+        char armWeight = '\0';
+        CG_LINE_START(cself->file, b, len, p);
+        if( b == NULL || len == 0 ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInsufficient);
+            break;
+        }
+        m = &data->map[data->map_qty];
+        m->saved = false;
+        /*DEBUG_MSG(10, ("mappings %4u: '%.*s'\n", data->map_qty, len, b));*/
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2u16(b, p - b, &m->flags);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, m->chr, sizeof(m->chr));
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i32(b, p - b, &m->offset);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i16(b, p - b, &m->gap[0]);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i16(b, p - b, &m->gap[1]);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i16(b, p - b, &m->gap[2]);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, tmp, sizeof(tmp));
+        if( tmp[0] < 33 || tmp[0] > 126 ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+        }
+        m->weight = tmp[0];
+        CG_LINE_NEXT_FIELD(b, len, p);
+        if( (rc = str2u32(b, p - b, &m->mate)) != 0 ) {
+        } else if( m->flags > 7 ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+        } else if( ++data->map_qty >= CG_MAPPINGS_MAX ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcBuffer, rcInsufficient);
+        }
+        CG_LINE_LAST_FIELD(b, len, p);
+        rc = str2buf(b, p - b, tmp, sizeof(tmp));
+        if (tmp[0] < 33 || tmp[0] > 126)
+        {   rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange); }
+        armWeight = tmp[0]; /* ignore armWeight */
+        ((CGMappings15*)cself)->records++;
+        DEBUG_MSG(10, ("mappings %4u:  %u\t'%s'\t%u\t%i\t%i\t%i\t%c\t%u\t%c\n",
+            data->map_qty - 1, m->flags, m->chr, m->offset,
+            m->gap[0], m->gap[1], m->gap[2], m->weight, m->mate, armWeight));
+        armWeight += 0; /* shut up used variable warning in release build */
+        CG_LINE_END();
+    } while( rc == 0 && !(m->flags & cg_eLastDNBRecord) );
+    if (rc == 0) {
+        unsigned i;
+        unsigned const n = data->map_qty;
+        
+        for (i = 0; i != n && rc == 0; ++i) {
+            unsigned const mate = data->map[i].mate;
+            
+            if (mate > n)
+                data->map[i].mate = n;
+        }
+    }
+    return rc;
+}
+
+static rc_t CC CGMappings25_Read(
+    const CGMappings15 *cself, TMappingsData *data)
+{
+    rc_t rc = 0;
+    TMappingsData_map* m = NULL;
+
+    assert(cself);
+
+    data->map_qty = 0;
+    do {
+        char tmp[2];
+        char armWeight = '\0';
+        CG_LINE_START(cself->file, b, len, p);
+        if( b == NULL || len == 0 ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInsufficient);
+            break;
+        }
+        m = &data->map[data->map_qty];
+        m->saved = false;
+        /*DEBUG_MSG(10, ("mappings %4u: '%.*s'\n", data->map_qty, len, b));*/
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2u16(b, p - b, &m->flags);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, m->chr, sizeof(m->chr));
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i32(b, p - b, &m->offset);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i16(b, p - b, &m->gap[0]);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i16(b, p - b, &m->gap[1]);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2i16(b, p - b, &m->gap[2]);
+        CG_LINE_NEXT_FIELD(b, len, p);
+        rc = str2buf(b, p - b, tmp, sizeof(tmp));
+        if( tmp[0] < 33 || tmp[0] > 126 ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+        }
+        m->weight = tmp[0];
+        CG_LINE_NEXT_FIELD(b, len, p);
+        if( (rc = str2u32(b, p - b, &m->mate)) != 0 ) {
+        } else if( m->flags > 7 ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+        } else if( ++data->map_qty >= CG_MAPPINGS_MAX ) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcBuffer, rcInsufficient);
+        }
+        CG_LINE_LAST_FIELD(b, len, p);
+        rc = str2buf(b, p - b, tmp, sizeof(tmp));
+        if (rc == 0 && (tmp[0] < 33 || tmp[0] > 126)) {
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+        }
+        armWeight = tmp[0]; /* ignore armWeight */
+        ((CGMappings15*)cself)->records++;
+        DEBUG_MSG(10, ("mappings %4u:  %u\t'%s'\t%u\t%i\t%i\t%i\t%c\t%u\t%c\n",
+            data->map_qty - 1, m->flags, m->chr, m->offset,
+            m->gap[0], m->gap[1], m->gap[2], m->weight, m->mate, armWeight));
+        armWeight += 0; /* shut up used variable warning in release build */
+
+        if (rc == 0) {
+            assert(m->gap[2] == 0);
+            if (m->gap[2] != 0) {
+                rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+            }
+            if (m->flags & cg_eRevDnbStrand) {
+                assert(m->gap[0] == -1);
+                if (m->gap[0] != -1) {
+                    rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+                }
+            }
+            else {
+                assert(m->gap[1] == -1);
+                if (m->gap[1] != -1) {
+                    rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+                }
+            }
+            if (rc != 0) {
+                LOGERR(klogErr, rc,
+                    "Bad gap value in mapping file (File format >= v2.5)");
+            }
+        }
+
+        CG_LINE_END();
+    } while( rc == 0 && !(m->flags & cg_eLastDNBRecord) );
+    if (rc == 0) {
+        unsigned i;
+        unsigned const n = data->map_qty;
+        
+        for (i = 0; i != n && rc == 0; ++i) {
+            unsigned const mate = data->map[i].mate;
+            
+            if (mate > n)
+                data->map[i].mate = n;
+        }
+    }
+    return rc;
+}
+
+static const CGFileType_vt CGMappings15_vt =
+{
+    CGMappings15_Header,
+    NULL,
+    NULL,
+    CGMappings15_Read,
+    NULL,
+    NULL,
+    NULL, /* tag_lfr */
+    CGMappings15_GetAssemblyId,
+    CGMappings15_GetSlide,
+    CGMappings15_GetLane,
+    CGMappings15_GetBatchFileNumber,
+    NULL,
+    NULL,
+    CGMappings15_Release
+};
+
+static const CGFileType_vt CGMappings22_vt =
+{
+    CGMappings15_Header,
+    NULL,
+    NULL,
+    CGMappings22_Read,
+    NULL,
+    NULL,
+    NULL, /* tag_lfr */
+    CGMappings15_GetAssemblyId,
+    CGMappings15_GetSlide,
+    CGMappings15_GetLane,
+    CGMappings15_GetBatchFileNumber,
+    NULL,
+    NULL,
+    CGMappings15_Release
+};
+
+static const CGFileType_vt CGMappings25_vt = {
+    CGMappings25_Header,
+    NULL,
+    NULL,
+    CGMappings25_Read,
+    NULL,
+    NULL,
+    NULL, /* tag_lfr */
+    CGMappings15_GetAssemblyId,
+    CGMappings15_GetSlide,
+    CGMappings15_GetLane,
+    CGMappings15_GetBatchFileNumber,
+    NULL,
+    NULL,
+    CGMappings15_Release
+};
+
+static
+rc_t CC CGMappings_Make(const CGFileType** cself,
+    const CGLoaderFile* file, const CGFileType_vt* vt)
+{
+    rc_t rc = 0;
+    CGMappings15* obj = NULL;
+    
+    if( cself == NULL || file == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcParam, rcNull);
+    } else {
+        *cself = NULL;
+        if( (obj = calloc(1, sizeof(*obj))) == NULL ) {
+            rc = RC(rcRuntime, rcFile, rcConstructing, rcMemory, rcExhausted);
+        } else {
+            obj->file = file;
+            obj->dad.type = cg_eFileType_MAPPINGS;
+            obj->dad.vt = vt;
+        }
+    }
+    if( rc == 0 ) {
+        *cself = &obj->dad;
+    } else {
+        CGMappings15_Release(obj, NULL);
+    }
+    return rc;
+}
+
+rc_t CC CGMappings15_Make(const CGFileType** self, const CGLoaderFile* file)
+{   return CGMappings_Make(self, file, &CGMappings15_vt); }
+
+rc_t CC CGMappings13_Make(const CGFileType** self, const CGLoaderFile* file)
+{   return CGMappings15_Make(self, file); }
+
+rc_t CC CGMappings20_Make(const CGFileType** self, const CGLoaderFile* file)
+{   return CGMappings15_Make(self, file); }
+
+rc_t CC CGMappings22_Make(const CGFileType** self, const CGLoaderFile* file)
+{   return CGMappings_Make(self, file, &CGMappings22_vt); }
+
+rc_t CC CGMappings25_Make(const CGFileType **self, const CGLoaderFile *file)
+{
+    return CGMappings_Make(self, file, &CGMappings25_vt);
+}
diff --git a/tools/cg-load/factory-mappings.h b/tools/cg-load/factory-mappings.h
new file mode 100644
index 0000000..428352b
--- /dev/null
+++ b/tools/cg-load/factory-mappings.h
@@ -0,0 +1,46 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_cg_load_factory_mappings_h_
+#define _tools_cg_load_factory_mappings_h_
+
+#include <klib/defs.h>
+
+struct CGFileType;
+struct CGLoaderFile;
+
+rc_t CC CGMappings13_Make(const struct CGFileType** self,
+                          const struct CGLoaderFile* file);
+rc_t CC CGMappings15_Make(const struct CGFileType** self,
+                          const struct CGLoaderFile* file);
+rc_t CC CGMappings20_Make(const struct CGFileType** self,
+                          const struct CGLoaderFile* file);
+rc_t CC CGMappings22_Make(const struct CGFileType** self,
+                          const struct CGLoaderFile* file);
+rc_t CC CGMappings25_Make(const struct CGFileType** self,
+                          const struct CGLoaderFile* file);
+
+
+#endif /* _tools_cg_load_factory_mappings_h_ */
diff --git a/tools/cg-load/factory-reads.c b/tools/cg-load/factory-reads.c
new file mode 100644
index 0000000..be194e5
--- /dev/null
+++ b/tools/cg-load/factory-reads.c
@@ -0,0 +1,448 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+#include "debug.h"
+#include "factory-cmn.h"
+#include "factory-reads.h"
+
+typedef struct CGReads15 CGReads15;
+#define CGFILETYPE_IMPL CGReads15
+#include "file.h"
+
+#include <klib/printf.h>
+#include <klib/rc.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+struct CGReads15 {
+    CGFileType dad;
+    const CGLoaderFile* file;
+    int64_t start_rowid;
+    char spot_group[512];
+    uint64_t records;
+    /* headers */
+    CGFIELD15_ASSEMBLY_ID assembly_id;
+    CGFIELD15_BATCH_FILE_NUMBER batch_file_number;
+    CGFIELD15_BATCH_OFFSET batch_offset;
+    CGFIELD15_FIELD_SIZE field_size;
+    CGFIELD15_GENERATED_AT generated_at;
+    CGFIELD15_GENERATED_BY generated_by;
+    CGFIELD15_LANE lane;
+    CGFIELD15_LIBRARY library;
+    CGFIELD15_SAMPLE sample;
+    CGFIELD15_SLIDE slide;
+    CGFIELD15_SOFTWARE_VERSION software_version;
+};
+
+static
+rc_t CC CGReads15_Header(const CGReads15* cself, const char* buf, const size_t len)
+{
+    rc_t rc = 0;
+    size_t slen;
+    CGReads15* self = (CGReads15*)cself;
+
+    if( strncmp("ASSEMBLY_ID\t", buf, slen = 12) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->assembly_id, sizeof(self->assembly_id));
+    } else if( strncmp("BATCH_FILE_NUMBER\t", buf, slen = 18) == 0 ) {
+        rc = str2u32(&buf[slen], len - slen, &self->batch_file_number);
+        if( self->batch_file_number < 1 ) {
+            rc = RC(rcRuntime, rcFile, rcConstructing, rcItem, rcOutofrange);
+        }
+    } else if( strncmp("BATCH_OFFSET\t", buf, slen = 13) == 0 ) {
+        rc = str2u64(&buf[slen], len - slen, &self->batch_offset);
+    } else if( strncmp("FIELD_SIZE\t", buf, slen = 11) == 0 ) {
+        rc = str2u32(&buf[slen], len - slen, &self->field_size);
+    } else if( strncmp("GENERATED_AT\t", buf, slen = 13) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->generated_at, sizeof(self->generated_at));
+    } else if( strncmp("GENERATED_BY\t", buf, slen = 13) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->generated_by, sizeof(self->generated_by));
+    } else if( strncmp("LANE\t", buf, slen = 5) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->lane, sizeof(self->lane));
+    } else if( strncmp("LIBRARY\t", buf, slen = 8) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->library, sizeof(self->library));
+    } else if( strncmp("SAMPLE\t", buf, slen = 7) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->sample, sizeof(self->sample));
+    } else if( strncmp("SLIDE\t", buf, slen = 6) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->slide, sizeof(self->slide));
+    } else if( strncmp("SOFTWARE_VERSION\t", buf, slen = 17) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->software_version, sizeof(self->software_version));
+    } else {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcName, rcUnrecognized);
+    }
+    return rc;
+}
+
+static rc_t CC CGReads25_Header(const CGReads15* cself,
+    const char* buf, const size_t len)
+{
+    rc_t rc = 0;
+    size_t slen = 0;
+    CGReads15* self = (CGReads15*)cself;
+
+    /* from SRA-2617 files */
+    if      (strncmp("APPROVAL\t", buf, slen = 9) == 0) {
+    }
+    else if (strncmp("TITLE\t", buf, slen = 6) == 0) {
+    }
+    else if (strncmp("ADDRESS\t", buf, slen = 8) == 0) {
+    }
+
+    /* From Table 1: Header Metadata Present in all Data Files */
+    else if (strncmp("CUSTOMER_SAMPLE_ID\t", buf, slen = 19) == 0) {
+    }
+    else if (strncmp("SAMPLE_SOURCE\t", buf, slen = 14) == 0) {
+    }
+    else if (strncmp("REPORTED_GENDER\t", buf, slen = 16) == 0) {
+    }
+    else if (strncmp("CALLED_GENDER\t", buf, slen = 14) == 0) {
+    }
+    else if (strncmp("TUMOR_STATUS\t", buf, slen = 13) == 0) {
+    }
+    else if (strncmp("LIBRARY_TYPE\t", buf, slen = 13) == 0) {
+    }
+    else if (strncmp("LIBRARY_SOURCE\t", buf, slen = 13) == 0) {
+    }
+
+    else if (strncmp("ASSEMBLY_ID\t", buf, slen = 12) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->assembly_id, sizeof(self->assembly_id));
+    }
+    else if (strncmp("BATCH_FILE_NUMBER\t", buf, slen = 18) == 0) {
+        rc = str2u32(&buf[slen], len - slen, &self->batch_file_number);
+        if (self->batch_file_number < 1) {
+            rc = RC(rcRuntime, rcFile, rcConstructing, rcItem, rcOutofrange);
+        }
+    }
+    else if (strncmp("BATCH_OFFSET\t", buf, slen = 13) == 0) {
+        rc = str2u64(&buf[slen], len - slen, &self->batch_offset);
+    }
+    else if (strncmp("FIELD_SIZE\t", buf, slen = 11) == 0) {
+        rc = str2u32(&buf[slen], len - slen, &self->field_size);
+    }
+    else if (strncmp("GENERATED_AT\t", buf, slen = 13) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->generated_at, sizeof(self->generated_at));
+    }
+    else if (strncmp("GENERATED_BY\t", buf, slen = 13) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->generated_by, sizeof(self->generated_by));
+    }
+    else if (strncmp("LANE\t", buf, slen = 5) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->lane, sizeof(self->lane));
+    }
+    else if (strncmp("LIBRARY\t", buf, slen = 8) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->library, sizeof(self->library));
+    }
+    else if (strncmp("SAMPLE\t", buf, slen = 7) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->sample, sizeof(self->sample));
+    }
+    else if (strncmp("SLIDE\t", buf, slen = 6) == 0) {
+        rc = str2buf(&buf[slen], len - slen, self->slide, sizeof(self->slide));
+    }
+    else if (strncmp("SOFTWARE_VERSION\t", buf, slen = 17) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->software_version, sizeof(self->software_version));
+    }
+    else {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcName, rcUnrecognized);
+    }
+
+    return rc;
+}
+
+static
+rc_t CGReads15_GetAssemblyId(const CGReads15* cself, const CGFIELD_ASSEMBLY_ID_TYPE** assembly_id)
+{
+    if( cself->assembly_id[0] == '\0' ) {
+        return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
+    }
+    *assembly_id = cself->assembly_id;
+    return 0;
+}
+
+static
+rc_t CGReads15_GetSlide(const CGReads15* cself, const CGFIELD_SLIDE_TYPE** slide)
+{
+    if( cself->slide[0] == '\0' ) {
+        return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
+    }
+    *slide = cself->slide;
+    return 0;
+}
+
+static
+rc_t CGReads15_GetLane(const CGReads15* cself, const CGFIELD_LANE_TYPE** lane)
+{
+    if( cself->lane[0] == '\0' ) {
+        return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
+    }
+    *lane = cself->lane;
+    return 0;
+}
+
+static
+rc_t CGReads15_GetBatchFileNumber(const CGReads15* cself, const CGFIELD_BATCH_FILE_NUMBER_TYPE** batch_file_number)
+{
+    *batch_file_number = &cself->batch_file_number;
+    return 0;
+}
+
+
+static rc_t CC CGReads15_Read(const CGReads15* cself, TReadsData* data) {
+    rc_t rc = 0;
+
+    if (cself->start_rowid == 0) {
+        ((CGReads15*)cself)->start_rowid = data->rowid;
+    }
+    CG_LINE_START(cself->file, b, len, p);
+    if (b == NULL || len == 0) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcDone);
+        break;
+    }
+    /*DEBUG_MSG(10, ("reads: '%.*s'\n", len, b));*/
+    CG_LINE_NEXT_FIELD(b, len, p);
+    if ((rc = str2u16(b, p - b, &data->flags)) != 0) {
+    }
+    else if (data->flags > 10) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+    }
+    else if ((data->flags & 0x03) == 3 || (data->flags & 0x07) == 7) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInvalid);
+    }
+    CG_LINE_NEXT_FIELD(b, len, p);
+    data->seq.sequence.elements = p - b;
+    if (data->seq.sequence.elements != CG_READS15_SPOT_LEN) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInvalid);
+    }
+    else {
+        rc = str2buf(b, data->seq.sequence.elements,
+            data->read, sizeof(data->read));
+        /* clear cache, set in algnment writer */
+        data->reverse[0] = '\0';
+        data->reverse[CG_READS15_SPOT_LEN / 2] = '\0';
+    }
+    CG_LINE_LAST_FIELD(b, len, p);
+    data->seq.quality.elements = p - b;
+    if (data->seq.quality.elements != CG_READS15_SPOT_LEN) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInvalid);
+    }
+    else {
+        rc = str2buf(b, data->seq.quality.elements,
+            data->qual, sizeof(data->qual));
+    }
+    data->seq.spot_len = CG_READS15_SPOT_LEN;
+
+    data->reads_format = 0x01050000;
+
+    if (cself->records == 0) {
+        size_t w;
+        
+#if 0
+    rc = string_printf(((CGReads15*)cself)->spot_group,
+        sizeof(cself->spot_group), &w, "%s:%s:%s:%04u", cself->assembly_id,
+        cself->slide, cself->lane, cself->batch_file_number);
+#else
+        rc = string_printf(((CGReads15*)cself)->spot_group,
+            sizeof(cself->spot_group), &w, "%s-%s", cself->slide, cself->lane);
+#endif
+        data->seq.spot_group.buffer = cself->spot_group;
+        data->seq.spot_group.elements = w;
+    }
+    ((CGReads15*)cself)->records++;
+    DEBUG_MSG(10,
+        ("reads:  %u\t'%s'\t'%s'\n", data->flags, data->read, data->qual));
+    CG_LINE_END();
+
+    return rc;
+}
+
+static rc_t CC CGReads25_Read(const CGReads15* cself, TReadsData* data) {
+    rc_t rc = 0;
+
+    if (cself->start_rowid == 0) {
+        ((CGReads15*)cself)->start_rowid = data->rowid;
+    }
+    CG_LINE_START(cself->file, b, len, p);
+    if (b == NULL || len == 0) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcDone);
+        break;
+    }
+    /*DEBUG_MSG(10, ("reads: '%.*s'\n", len, b));*/
+    CG_LINE_NEXT_FIELD(b, len, p);
+    if ((rc = str2u16(b, p - b, &data->flags)) != 0) {
+    }
+    else if (data->flags > 10) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+    }
+    else if ((data->flags & 0x03) == 3 || (data->flags & 0x07) == 7) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInvalid);
+    }
+    CG_LINE_NEXT_FIELD(b, len, p);
+    data->seq.sequence.elements = p - b;
+    if (data->seq.sequence.elements != CG_READS25_SPOT_LEN) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInvalid);
+    }
+    else {
+        rc = str2buf(b, data->seq.sequence.elements,
+            data->read, sizeof(data->read));
+        /* clear cache, set in algnment writer */
+        data->reverse[0] = '\0';
+        data->reverse[CG_READS25_SPOT_LEN / 2] = '\0';
+    }
+    CG_LINE_LAST_FIELD(b, len, p);
+    data->seq.quality.elements = p - b;
+    if (data->seq.quality.elements != CG_READS25_SPOT_LEN) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInvalid);
+    }
+    else {
+        rc = str2buf(b, data->seq.quality.elements,
+            data->qual, sizeof(data->qual));
+    }
+    data->seq.spot_len = CG_READS25_SPOT_LEN;
+
+    data->reads_format = 0x02050000;
+
+    if (cself->records == 0) {
+        size_t w;
+        
+        rc = string_printf(((CGReads15*)cself)->spot_group,
+            sizeof(cself->spot_group), &w, "%s-%s", cself->slide, cself->lane);
+        data->seq.spot_group.buffer = cself->spot_group;
+        data->seq.spot_group.elements = w;
+    }
+    ((CGReads15*)cself)->records++;
+    DEBUG_MSG(10,
+        ("reads:  %u\t'%s'\t'%s'\n", data->flags, data->read, data->qual));
+    CG_LINE_END();
+
+    return rc;
+}
+
+
+static
+rc_t CGReads15_GetStartRow(const CGReads15* cself, int64_t* rowid)
+{
+    *rowid = cself->start_rowid;
+    return 0;
+}
+
+static
+void CC CGReads15_Release(const CGReads15* cself, uint64_t* records)
+{
+    if( cself != NULL ) {
+        CGReads15* self = (CGReads15*)cself;
+        if( records != NULL ) {
+            *records = cself->records;
+        }
+        free(self);
+    }
+}
+
+static const CGFileType_vt CGReads15_vt =
+{
+    CGReads15_Header,
+    CGReads15_Read,
+    CGReads15_GetStartRow,
+    NULL,
+    NULL,
+    NULL,
+    NULL, /* tag_lfr */
+    CGReads15_GetAssemblyId,
+    CGReads15_GetSlide,
+    CGReads15_GetLane,
+    CGReads15_GetBatchFileNumber,
+    NULL,
+    NULL,
+    CGReads15_Release
+};
+
+static const CGFileType_vt CGReads25_vt = {
+    CGReads25_Header,
+    CGReads25_Read,
+    CGReads15_GetStartRow,
+    NULL,
+    NULL,
+    NULL,
+    NULL, /* tag_lfr */
+    CGReads15_GetAssemblyId,
+    CGReads15_GetSlide,
+    CGReads15_GetLane,
+    CGReads15_GetBatchFileNumber,
+    NULL,
+    NULL,
+    CGReads15_Release
+};
+
+static rc_t CC CGReads_Make(const CGFileType** cself,
+    const CGLoaderFile* file, const CGFileType_vt *vt)
+{
+    rc_t rc = 0;
+    CGReads15* obj = NULL;
+    
+    if( cself == NULL || file == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcParam, rcNull);
+    }
+    if( rc == 0 ) {
+        *cself = NULL;
+        if( (obj = calloc(1, sizeof(*obj))) == NULL ) {
+            rc = RC(rcRuntime, rcFile, rcConstructing, rcMemory, rcExhausted);
+        } else {
+            obj->file = file;
+            obj->dad.type = cg_eFileType_READS;
+            obj->dad.vt = vt;
+        }
+    }
+    if( rc == 0 ) {
+        *cself = &obj->dad;
+    } else {
+        CGReads15_Release(obj, NULL);
+    }
+    return rc;
+}
+
+rc_t CC CGReads15_Make(const CGFileType** cself, const CGLoaderFile* file)
+{
+    return CGReads_Make(cself, file, &CGReads15_vt);
+}
+
+rc_t CC CGReads13_Make(const CGFileType** self, const CGLoaderFile* file)
+{   return CGReads15_Make(self, file); }
+
+rc_t CC CGReads20_Make(const CGFileType** self, const CGLoaderFile* file)
+{   return CGReads15_Make(self, file); }
+
+rc_t CC CGReads22_Make(const CGFileType** self, const CGLoaderFile* file)
+{   return CGReads15_Make(self, file); }
+
+rc_t CC CGReads25_Make(const CGFileType **self, const CGLoaderFile *file) {
+    return CGReads_Make(self, file, &CGReads25_vt);
+}
diff --git a/tools/cg-load/factory-reads.h b/tools/cg-load/factory-reads.h
new file mode 100644
index 0000000..84bde21
--- /dev/null
+++ b/tools/cg-load/factory-reads.h
@@ -0,0 +1,46 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_cg_load_factory_reads_h_
+#define _tools_cg_load_factory_reads_h_
+
+#include <klib/defs.h>
+
+struct CGFileType;
+struct CGLoaderFile;
+
+rc_t CC CGReads13_Make(const struct CGFileType** self,
+                       const struct CGLoaderFile* file);
+rc_t CC CGReads15_Make(const struct CGFileType** self,
+                       const struct CGLoaderFile* file);
+rc_t CC CGReads20_Make(const struct CGFileType** self,
+                       const struct CGLoaderFile* file);
+rc_t CC CGReads22_Make(const struct CGFileType** self,
+                       const struct CGLoaderFile* file);
+rc_t CC CGReads25_Make(const struct CGFileType** self,
+                       const struct CGLoaderFile* file);
+
+
+#endif /* _tools_cg_load_factory_reads_h_ */
diff --git a/tools/cg-load/factory-tag-lfr.c b/tools/cg-load/factory-tag-lfr.c
new file mode 100644
index 0000000..c986f64
--- /dev/null
+++ b/tools/cg-load/factory-tag-lfr.c
@@ -0,0 +1,376 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+#include "debug.h"
+#include "factory-cmn.h"
+#include "factory-tag-lfr.h"
+
+typedef struct CGTagLfr CGTagLfr;
+#define CGFILETYPE_IMPL CGTagLfr
+#include "file.h"
+
+#include <klib/printf.h>
+#include <klib/rc.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+struct CGTagLfr {
+    CGFileType dad;
+    const CGLoaderFile* file;
+    int64_t start_rowid;
+    char spot_group[512];
+    uint64_t records;
+    /* headers */
+    CGFIELD15_ASSEMBLY_ID assembly_id;
+    CGFIELD15_BATCH_FILE_NUMBER batch_file_number;
+    CGFIELD15_BATCH_OFFSET batch_offset;
+    CGFIELD15_FIELD_SIZE field_size;
+    CGFIELD15_GENERATED_AT generated_at;
+    CGFIELD15_GENERATED_BY generated_by;
+    CGFIELD15_LANE lane;
+    CGFIELD15_LIBRARY library;
+    CGFIELD15_SAMPLE sample;
+    CGFIELD15_SLIDE slide;
+    CGFIELD15_SOFTWARE_VERSION software_version;
+    CGFIELD_WELL_ID wellId;
+};
+
+
+static rc_t CC CGTagLfr15_Header(const CGTagLfr* cself,
+    const char* buf, const size_t len)
+{
+    rc_t rc = 0;
+    size_t slen;
+    CGTagLfr* self = (CGTagLfr*)cself;
+
+    if( strncmp("ASSEMBLY_ID\t", buf, slen = 12) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->assembly_id, sizeof(self->assembly_id));
+    } else if( strncmp("BATCH_FILE_NUMBER\t", buf, slen = 18) == 0 ) {
+        rc = str2u32(&buf[slen], len - slen, &self->batch_file_number);
+        if( self->batch_file_number < 1 ) {
+            rc = RC(rcRuntime, rcFile, rcConstructing, rcItem, rcOutofrange);
+        }
+    } else if( strncmp("BATCH_OFFSET\t", buf, slen = 13) == 0 ) {
+        rc = str2u64(&buf[slen], len - slen, &self->batch_offset);
+    } else if( strncmp("FIELD_SIZE\t", buf, slen = 11) == 0 ) {
+        rc = str2u32(&buf[slen], len - slen, &self->field_size);
+    } else if( strncmp("GENERATED_AT\t", buf, slen = 13) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->generated_at, sizeof(self->generated_at));
+    } else if( strncmp("GENERATED_BY\t", buf, slen = 13) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->generated_by, sizeof(self->generated_by));
+    } else if( strncmp("LANE\t", buf, slen = 5) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->lane, sizeof(self->lane));
+    } else if( strncmp("LIBRARY\t", buf, slen = 8) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->library, sizeof(self->library));
+    } else if( strncmp("SAMPLE\t", buf, slen = 7) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->sample, sizeof(self->sample));
+    } else if( strncmp("SLIDE\t", buf, slen = 6) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->slide, sizeof(self->slide));
+    } else if( strncmp("SOFTWARE_VERSION\t", buf, slen = 17) == 0 ) {
+        rc = str2buf(&buf[slen], len - slen, self->software_version, sizeof(self->software_version));
+    } else {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcName, rcUnrecognized);
+    }
+    return rc;
+}
+
+static rc_t CC CGTagLfr25_Header(const CGTagLfr* cself,
+    const char* buf, const size_t len)
+{
+    rc_t rc = 0;
+    size_t slen;
+    CGTagLfr* self = (CGTagLfr*)cself;
+
+    /* from SRA-2617 files */
+    if      (strncmp("APPROVAL\t", buf, slen = 9) == 0) {
+    }
+    else if (strncmp("TITLE\t", buf, slen = 6) == 0) {
+    }
+    else if (strncmp("ADDRESS\t", buf, slen = 8) == 0) {
+    }
+
+    /* From Table 1: Header Metadata Present in all Data Files */
+    else if (strncmp("CUSTOMER_SAMPLE_ID\t", buf, slen = 19) == 0) {
+    }
+    else if (strncmp("SAMPLE_SOURCE\t", buf, slen = 14) == 0) {
+    }
+    else if (strncmp("REPORTED_GENDER\t", buf, slen = 16) == 0) {
+    }
+    else if (strncmp("CALLED_GENDER\t", buf, slen = 14) == 0) {
+    }
+    else if (strncmp("TUMOR_STATUS\t", buf, slen = 13) == 0) {
+    }
+    else if (strncmp("LIBRARY_TYPE\t", buf, slen = 13) == 0) {
+    }
+    else if (strncmp("LIBRARY_SOURCE\t", buf, slen = 13) == 0) {
+    }
+
+    else if (strncmp("ASSEMBLY_ID\t", buf, slen = 12) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->assembly_id, sizeof(self->assembly_id));
+    }
+    else if (strncmp("BATCH_FILE_NUMBER\t", buf, slen = 18) == 0) {
+        rc = str2u32(&buf[slen], len - slen, &self->batch_file_number);
+        if (self->batch_file_number < 1) {
+            rc = RC(rcRuntime, rcFile, rcConstructing, rcItem, rcOutofrange);
+        }
+    }
+    else if (strncmp("BATCH_OFFSET\t", buf, slen = 13) == 0) {
+        rc = str2u64(&buf[slen], len - slen, &self->batch_offset);
+    }
+    else if (strncmp("FIELD_SIZE\t", buf, slen = 11) == 0) {
+        rc = str2u32(&buf[slen], len - slen, &self->field_size);
+    }
+    else if (strncmp("GENERATED_AT\t", buf, slen = 13) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->generated_at, sizeof(self->generated_at));
+    }
+    else if (strncmp("GENERATED_BY\t", buf, slen = 13) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->generated_by, sizeof(self->generated_by));
+    }
+    else if (strncmp("LANE\t", buf, slen = 5) == 0) {
+        rc = str2buf(&buf[slen], len - slen, self->lane, sizeof(self->lane));
+    }
+    else if (strncmp("LIBRARY\t", buf, slen = 8) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->library, sizeof(self->library));
+    }
+    else if (strncmp("SAMPLE\t", buf, slen = 7) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->sample, sizeof(self->sample));
+    }
+    else if (strncmp("SLIDE\t", buf, slen = 6) == 0) {
+        rc = str2buf(&buf[slen], len - slen, self->slide, sizeof(self->slide));
+    }
+    else if (strncmp("SOFTWARE_VERSION\t", buf, slen = 17) == 0) {
+        rc = str2buf(&buf[slen], len - slen,
+            self->software_version, sizeof(self->software_version));
+    }
+    else {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcName, rcUnrecognized);
+    }
+
+    return rc;
+}
+
+
+static rc_t CGTagLfr15_GetAssemblyId(const CGTagLfr* cself,
+    const CGFIELD_ASSEMBLY_ID_TYPE** assembly_id)
+{
+    if( cself->assembly_id[0] == '\0' ) {
+        return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
+    }
+    *assembly_id = cself->assembly_id;
+    return 0;
+}
+
+static rc_t CGTagLfr15_GetSlide(const CGTagLfr* cself,
+    const CGFIELD_SLIDE_TYPE** slide)
+{
+    if( cself->slide[0] == '\0' ) {
+        return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
+    }
+    *slide = cself->slide;
+    return 0;
+}
+
+static rc_t CGTagLfr15_GetLane(const CGTagLfr* cself,
+    const CGFIELD_LANE_TYPE** lane)
+{
+    if( cself->lane[0] == '\0' ) {
+        return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
+    }
+    *lane = cself->lane;
+    return 0;
+}
+
+static rc_t CGTagLfr15_GetBatchFileNumber(const CGTagLfr* cself,
+    const CGFIELD_BATCH_FILE_NUMBER_TYPE** batch_file_number)
+{
+    *batch_file_number = &cself->batch_file_number;
+    return 0;
+}
+
+static rc_t CGTagLfr15_GetStartRow(
+    const CGTagLfr* cself, int64_t* rowid)
+{
+    *rowid = cself->start_rowid;
+    return 0;
+}
+
+static rc_t CC CGTagLfr15_GetTagLfr(
+    const CGFILETYPE_IMPL* cself, TReadsData* data)
+{
+    rc_t rc = 0;
+    uint16_t wellScore = 0;
+    if( cself->start_rowid == 0 ) {
+        ((CGTagLfr*)cself)->start_rowid = data->rowid;
+    }
+    CG_LINE_START(cself->file, b, len, p);
+    if( b == NULL || len == 0) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInsufficient);
+        break;
+    }
+    /* reads */
+    CG_LINE_NEXT_FIELD(b, len, p);
+    if (p - b != CG_TAG_LFR_DATA_LEN) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInvalid);
+    }
+    /* scores */
+    CG_LINE_NEXT_FIELD(b, len, p);
+    if (p - b != CG_TAG_LFR_DATA_LEN) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInvalid);
+    }
+
+    /* wellId */
+    CG_LINE_NEXT_FIELD(b, len, p);
+    if ((rc = str2u16(b, p - b, &((CGTagLfr*)cself)->wellId)) != 0) {
+    }
+    else if (cself->wellId < 0 || cself->wellId > 384) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
+    }
+
+    /* wellScore */
+    CG_LINE_LAST_FIELD(b, len, p);
+    rc = str2u16(b, p - b, &wellScore);
+
+    if (rc == 0) {
+        size_t w = 0;
+        if (cself->wellId != 0) {
+            rc = string_printf(((CGTagLfr*)cself)->spot_group,
+                sizeof(cself->spot_group), &w, "%s-%s#%03d",
+                cself->slide, cself->lane, cself->wellId);
+        }
+        else {
+            rc = string_printf(((CGTagLfr*)cself)->spot_group,
+                sizeof(cself->spot_group), &w, "%s-%s",
+                cself->slide, cself->lane);
+        }
+        data->seq.spot_group.buffer = cself->spot_group;
+        data->seq.spot_group.elements = w;
+    }
+
+    ((CGTagLfr*)cself)->records++;
+
+    DEBUG_MSG(10, ("tag-lfr:  '%.*s'\t%d\n",
+        (int32_t)data->seq.spot_group.elements, data->seq.spot_group.buffer, 
+        cself->wellId));
+
+    CG_LINE_END();
+
+    return rc;
+}
+
+static
+void CC CGTagLfr15_Release(const CGTagLfr* cself, uint64_t* records)
+{
+    if( cself != NULL ) {
+        CGTagLfr* self = (CGTagLfr*)cself;
+        if( records != NULL ) {
+            *records = cself->records;
+        }
+        free(self);
+    }
+}
+
+static const CGFileType_vt CGTagLfr15_vt =
+{
+    CGTagLfr15_Header,
+    NULL,
+    CGTagLfr15_GetStartRow,
+    NULL,
+    NULL,
+    NULL,
+    CGTagLfr15_GetTagLfr, /* tag_lfr */
+    CGTagLfr15_GetAssemblyId,
+    CGTagLfr15_GetSlide,
+    CGTagLfr15_GetLane,
+    CGTagLfr15_GetBatchFileNumber,
+    NULL,
+    NULL,
+    CGTagLfr15_Release
+};
+
+static const CGFileType_vt CGTagLfr25_vt =
+{
+    CGTagLfr25_Header,
+    NULL,
+    CGTagLfr15_GetStartRow,
+    NULL,
+    NULL,
+    NULL,
+    CGTagLfr15_GetTagLfr, /* tag_lfr */
+    CGTagLfr15_GetAssemblyId,
+    CGTagLfr15_GetSlide,
+    CGTagLfr15_GetLane,
+    CGTagLfr15_GetBatchFileNumber,
+    NULL,
+    NULL,
+    CGTagLfr15_Release
+};
+
+static rc_t CC CGTagLfr_Make(const CGFileType **cself,
+    const CGLoaderFile *file, const CGFileType_vt *vt)
+{
+    rc_t rc = 0;
+    CGTagLfr* obj = NULL;
+    
+    if( cself == NULL || file == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcParam, rcNull);
+    }
+    if( rc == 0 ) {
+        *cself = NULL;
+        if( (obj = calloc(1, sizeof(*obj))) == NULL ) {
+            rc = RC(rcRuntime, rcFile, rcConstructing, rcMemory, rcExhausted);
+        } else {
+            obj->file = file;
+            obj->dad.type = cg_eFileType_TAG_LFR;
+            obj->dad.vt = vt;
+        }
+    }
+    if( rc == 0 ) {
+        *cself = &obj->dad;
+    } else {
+        CGTagLfr15_Release(obj, NULL);
+    }
+    return rc;
+}
+
+rc_t CC CGTagLfr15_Make(const CGFileType **cself,
+    const CGLoaderFile *file)
+{
+    return CGTagLfr_Make(cself, file, &CGTagLfr15_vt);
+}
+
+rc_t CC CGTagLfr25_Make(const CGFileType **cself,
+    const CGLoaderFile *file)
+{
+    return CGTagLfr_Make(cself, file, &CGTagLfr25_vt);
+}
diff --git a/tools/cg-load/factory-tag-lfr.h b/tools/cg-load/factory-tag-lfr.h
new file mode 100644
index 0000000..95a706e
--- /dev/null
+++ b/tools/cg-load/factory-tag-lfr.h
@@ -0,0 +1,41 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_cg_load_factory_tag_lfr_h_
+#define _tools_cg_load_factory_tag_lfr_h_
+
+
+#include <klib/defs.h>
+
+struct CGFileType;
+struct CGLoaderFile;
+
+rc_t CC CGTagLfr15_Make(const struct CGFileType** self,
+                      const struct CGLoaderFile* file);
+rc_t CC CGTagLfr25_Make(const struct CGFileType** self,
+                      const struct CGLoaderFile* file);
+
+
+#endif /* _tools_cg_load_factory_tag_lfr_h_ */
diff --git a/tools/cg-load/file-version-factory.c b/tools/cg-load/file-version-factory.c
new file mode 100644
index 0000000..662e552
--- /dev/null
+++ b/tools/cg-load/file-version-factory.c
@@ -0,0 +1,163 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+#include "factory-file.h" /* CGFile15_Make ... */
+
+typedef struct CGIgnored CGIgnored;
+#define CGFILETYPE_IMPL CGIgnored
+#include "file.h" /* CGLoaderFile */
+
+#include <sysalloc.h>
+
+#include <assert.h>
+
+rc_t CGLoaderFile_CreateCGFile(CGLoaderFile* self,
+    uint32_t FORMAT_VERSION, const char* TYPE)
+{
+    assert(self && !self->cg_file);
+
+    switch (FORMAT_VERSION) {
+        case 0x01030000:
+            return CGFile13_Make(&self->cg_file, TYPE, self);
+        case 0x01050000:
+        case 0x01060000:
+            return CGFile15_Make(&self->cg_file, TYPE, self);
+        case 0x01070000:
+            return CGFile17_Make(&self->cg_file, TYPE, self);
+        case 0x02000000:
+            return CGFile20_Make(&self->cg_file, TYPE, self);
+        case 0x02020000:
+            return CGFile22_Make(&self->cg_file, TYPE, self);
+        case 0x02050000:
+            return CGFile25_Make(&self->cg_file, TYPE, self);
+        default: {
+            const char* name = NULL;
+            rc_t rc = CGLoaderFile_Filename(self, &name);
+            if (rc != 0 || name == NULL)
+            {   name = " | UNKNOWN | "; }
+            rc = RC(rcRuntime, rcFile, rcConstructing, rcData, rcBadVersion);
+            PLOGERR(klogErr, (klogErr, rc,
+                "Unexpected #FORMAT_VERSION value '$(FORMAT_VERSION)' "
+                "in CG file '$(name)'",
+                "FORMAT_VERSION=%X,name=%s", FORMAT_VERSION, name));
+            return rc;
+        }
+    }
+}
+
+struct CGIgnored {
+    CGFileType dad;
+};
+
+static
+void CC CGIgnored_Release(const CGIgnored* cself, uint64_t* records)
+{
+    if( cself != NULL ) {
+        CGIgnored* self = (CGIgnored*)cself;
+        if( records != NULL ) {
+            *records = 0;
+        }
+        free(self);
+    }
+}
+
+static
+rc_t CC CGIgnored_Header(const CGIgnored* cself,
+    const char* buf, const size_t len)
+{
+    return 0;
+}
+
+static const CGFileType_vt CGIgnored_vt =
+{
+    CGIgnored_Header,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL, /* tag_lfr */
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    CGIgnored_Release
+};
+
+rc_t CGLoaderFileMakeCGFileType(const CGLoaderFile* self, const char* type,
+    const CGFileTypeFactory* factory, size_t factories,
+    const CGFileType** ftype)
+{
+    rc_t rc = 0;
+    CGIgnored* obj = NULL;
+    uint32_t i;
+
+    if (self == NULL || type == NULL ||
+        factory == NULL || factories == 0 || ftype == NULL)
+    {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcParam, rcNull);
+    }
+    else {
+        *ftype = NULL;
+
+        for (i = 0; i < factories; ++i) {
+            if (strcmp(type, factory[i].name) == 0) {
+                if (factory[i].make != NULL) {
+                    return factory[i].make(ftype, self);
+                } else if( (obj = calloc(1, sizeof(*obj))) == NULL ) {
+                    rc = RC(rcRuntime,
+                        rcFile, rcConstructing, rcMemory, rcExhausted);
+                } else {
+                    obj->dad.vt = &CGIgnored_vt;
+                    obj->dad.type = factory[i].type;
+                }
+                break;
+            }
+        }
+
+        if( obj == NULL ) {
+            const char* name = NULL;
+            rc = CGLoaderFile_Filename(self, &name);
+            if (rc != 0 || name == NULL)
+            {   name = " | UNKNOWN | "; }
+
+            rc = RC(rcRuntime, rcFile, rcConstructing, rcItem, rcUnrecognized);
+            PLOGERR(klogErr, (klogErr, rc,
+                "Unexpected header #TYPE value '$(TYPE)' in CG file '$(name)'",
+                "TYPE=%s,name=%s", type, name));
+        }
+    }
+
+    if( rc == 0 ) {
+        *ftype = &obj->dad;
+    }
+    else {
+        CGIgnored_Release(obj, NULL);
+    }
+
+    return rc;
+}
diff --git a/tools/cg-load/file.c b/tools/cg-load/file.c
new file mode 100644
index 0000000..1fcecff
--- /dev/null
+++ b/tools/cg-load/file.c
@@ -0,0 +1,516 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+
+
+#include "debug.h"
+#include "defs.h"
+#include "factory-file.h"
+#include "file.h"
+
+#include <kapp/loader-file.h>
+
+#include <kfs/directory.h>
+
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <klib/status.h>
+
+#include <strtol.h>
+#include <sysalloc.h>
+
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+rc_t CGLoaderFile_IsEof(const CGLoaderFile* cself, bool* eof)
+{
+    return KLoaderFile_IsEof(cself ? cself->file : NULL, eof);
+}
+
+rc_t CGLoaderFile_Close(const CGLoaderFile* cself)
+{
+    const char* nm;
+
+    if( KLoaderFile_FullName(cself ? cself->file : NULL, &nm) == 0 ) {
+        PLOGMSG(klogInfo, (klogInfo, "File $(file) done", "severity=status,file=%s", nm));
+    }
+    return KLoaderFile_Close(cself ? cself->file : NULL);
+}
+
+rc_t CGLoaderFile_Line(const CGLoaderFile* cself, uint64_t* line)
+{
+    return KLoaderFile_Line(cself ? cself->file : NULL, line);
+}
+
+
+rc_t CGLoaderFile_Readline(const CGLoaderFile* cself,
+    const void** buffer, size_t* length)
+{
+    return KLoaderFile_Readline(cself ? cself->file : NULL, buffer, length);
+}
+
+rc_t CGLoaderFile_Filename(
+    const CGLoaderFile* cself, const char** name)
+{
+    return KLoaderFile_Name(cself ? cself->file : NULL, name);
+}
+
+rc_t CGLoaderFile_LOG(const CGLoaderFile* cself, KLogLevel lvl,
+    rc_t rc, const char *msg, const char *fmt, ...)
+{
+    if( cself != NULL ) {
+        va_list args;
+        va_start(args, fmt);
+        rc = KLoaderFile_VLOG(cself->file, lvl, rc, msg, fmt, args);
+        va_end(args);
+    }
+    return rc;
+}
+
+rc_t CGLoaderFile_Release(const CGLoaderFile* cself, bool ignored)
+{
+    rc_t rc = 0;
+
+    if( cself ) {
+        CGLoaderFile* self = (CGLoaderFile*)cself;
+        /* may return md5 check error here */
+        if( self->cg_file && self->cg_file->vt->destroy ) {
+            uint64_t recs = 0;
+            self->cg_file->vt->destroy(self->cg_file, &recs);
+            if( rc == 0 && !ignored ) {
+                const char* name = NULL;
+                CGLoaderFile_Filename(cself, &name);
+                STSMSG(0, ("file %s %lu records", name, recs));
+            }
+        }
+        rc = KLoaderFile_Release(self->file, ignored);
+        free(self);
+    }
+    return rc;
+}
+
+static rc_t parse_version(const char* buf, size_t len, uint32_t* v) {
+    rc_t rc = 0;
+    int i = 0;
+    int64_t q;
+    char* end = (char*)buf;
+    const size_t sz = sizeof(*v) / sizeof(char);
+
+    *v = 0;
+    do {
+        if( i == sz ) {
+            rc = RC(rcRuntime, rcHeader, rcConstructing, rcFile, rcBadVersion);
+        } else {
+            q = strtoi64(end, &end, 10);
+            if( q < 0 || q > 255 ) {
+                rc = RC(rcRuntime, rcHeader, rcConstructing, rcFile, rcBadVersion);
+            } else if( *end == '.' ) {
+                end++;
+            } else if( end - buf < len ) {
+                rc = RC(rcRuntime, rcHeader, rcConstructing, rcFile, rcBadVersion);
+            }
+            *v = *v | ((uint8_t)q << ((sz - ++i) * 8));
+        }
+    } while( rc == 0 && end - buf < len);
+    return rc;
+}
+
+static
+rc_t _CGLoaderFileParseLibraryType(const CGLoaderFile *self,
+    const char *buf, size_t len, uint32_t *t)
+{
+    char libraryType[64] = "";
+    rc_t rc = str2buf(buf, len, libraryType, sizeof(libraryType));
+    if (rc != 0) {
+        return rc;
+    }
+    assert(t);
+    /* From Standard Sequencing Service Data File Formats. File format v2.5 */
+    switch (libraryType[0]) {
+        case 'P': {
+            const char n[] = "PureLFR" ; /* From File format v2.5  */
+            const char s[] = "Pure LFR"; /* From submission in SRA-2617 */
+            if (string_cmp(n, sizeof n - 1, libraryType,
+                    string_measure(libraryType, NULL), sizeof n - 1) == 0
+              ||string_cmp(s, sizeof s - 1, libraryType,
+                    string_measure(libraryType, NULL), sizeof s - 1) == 0)
+            {
+                *t = cg_eLibraryType_PureLFR;
+            }
+            else {
+                rc = RC(rcRuntime, rcFile, rcConstructing,
+                    rcData, rcUnrecognized);
+            }
+            break;
+        }
+        case 'M': {
+            const char l[] = "Mixed-LFR";
+            const char s[] = "Mixed-STD";
+            if (string_cmp(l, sizeof l - 1, libraryType,
+                string_measure(libraryType, NULL), sizeof l - 1) == 0)
+            {
+                *t = cg_eLibraryType_MixedLFR;
+            }
+            else if (string_cmp(s, sizeof s - 1, libraryType,
+                string_measure(libraryType, NULL), sizeof s - 1) == 0)
+            {
+                *t = cg_eLibraryType_MixedSTD;
+            }
+            else {
+                rc = RC(rcRuntime, rcFile, rcConstructing,
+                    rcData, rcUnrecognized);
+            }
+            break;
+        }
+        case 'S': {
+            const char a[] = "Standard";
+            if (string_cmp(a, sizeof a - 1, libraryType,
+                string_measure(libraryType, NULL), sizeof a - 1) == 0)
+            {
+                *t = cg_eLibraryType_Standard;
+            }
+            else {
+                rc = RC(rcRuntime, rcFile, rcConstructing,
+                    rcData, rcUnrecognized);
+            }
+            break;
+        }
+        default:
+            rc = RC(rcRuntime, rcFile, rcConstructing,
+                rcData, rcUnrecognized);
+            break;
+    }
+    if (rc != 0) {
+        CGLoaderFile_LOG(self, klogErr, rc,
+            "unexpected LIBRARY_TYPE value <$(t)>", "t=%s", libraryType);
+    }
+    return rc;
+}
+
+static
+rc_t CGLoaderFile_header(const CGLoaderFile* cself)
+{
+    rc_t rc = 0;
+
+    if( cself->cg_file == NULL ) {
+        CGLoaderFile* self = (CGLoaderFile*)cself;
+        const char* buf;
+        size_t len;
+        uint32_t fver = 0;
+        char type[64] = "";
+        uint32_t libraryType = cg_eLibraryType_Unknown;
+
+        do {
+            if ((rc = CGLoaderFile_Readline(self, (const void**)&buf, &len))
+                == 0)
+            {
+                if( buf == NULL ) {
+                    rc = RC(rcRuntime, rcFile, rcConstructing, rcData, rcTooShort);
+                } else if( len == 0 ) {
+                    /* empty line: skip */
+                } else if( buf[0] == '>' ) {
+                    /* start of records */
+                    break;
+                }
+                else if( buf[0] == '#' ) {
+                    len--; buf++;
+                    if      (strncmp("FORMAT_VERSION\t", buf, 15) == 0) {
+                        rc = parse_version(&buf[15], len - 15, &fver);
+                    }
+                    else if (strncmp("LIBRARY_TYPE\t", buf, 13) == 0) {
+                        rc = _CGLoaderFileParseLibraryType(cself,
+                            &buf[13], len - 13, &libraryType);
+                    }
+                    else if (strncmp("TYPE\t", buf, 5) == 0) {
+                        rc = str2buf(&buf[5], len - 5, type, sizeof(type));
+                    }
+                }
+                else {
+                    rc = RC(rcRuntime, rcFile, rcConstructing,
+                        rcData, rcUnrecognized);
+                }
+            }
+        } while (rc == 0 && self->cg_file == NULL);
+
+        if (rc == 0) {
+            rc = CGLoaderFile_CreateCGFile(self, fver, type);
+
+            if( rc == 0 ) {
+                CGFileType* f = (CGFileType*)self->cg_file;
+                f->format_version = fver;
+                f->libraryType    = libraryType;
+
+                if (f->type == cg_eFileType_Unknown ||
+                    !f->vt || !f->vt->header)
+                {
+                    rc = RC(rcRuntime, rcFile, rcConstructing,
+                        rcInterface, rcIncomplete);
+                }
+            }
+            if( rc == 0 ) {
+                /* we need to restart file for loading all header by sub class */
+                KLoaderFile_Reset(self->file);
+            }
+            while (rc == 0) {
+                if( (rc = CGLoaderFile_Readline(self, (const void**)&buf, &len)) == 0 ) {
+                    if( buf == NULL ) {
+                        rc = RC(rcRuntime, rcFile, rcConstructing, rcData, rcTooShort);
+                    } else if( len == 0 ) {
+                        /* empty line: skip */
+                    } else if( buf[0] == '>' ) {
+                        /* start of records */
+                        break;
+                    } else if( buf[0] == '#' ) {
+                        if( strncmp("FORMAT_VERSION\t", &buf[1], 15) != 0 && strncmp("TYPE\t", &buf[1], 5) != 0 ) {
+                            rc = cself->cg_file->vt->header(cself->cg_file, &buf[1], len - 1);
+                        }
+                    } else {
+                        rc = RC(rcRuntime, rcFile, rcConstructing, rcData, rcUnrecognized);
+                    }
+                }
+            }
+        }
+        /* close file after file is processed, but stay at data start */
+        KLoaderFile_SetReadAhead(self->file, self->read_ahead);
+        KLoaderFile_Close(self->file);
+    }
+
+    return rc;
+}
+
+rc_t CGLoaderFile_Make(const CGLoaderFile** cself, const KDirectory* dir, const char* filename,
+                       const uint8_t* md5_digest, bool read_ahead)
+{
+    rc_t rc = 0;
+    CGLoaderFile* obj = NULL;
+
+    if( cself == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcSelf, rcNull);
+    } else if( (obj = calloc(1, sizeof(*obj))) == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcConstructing, rcMemory, rcExhausted);
+    } else if( (rc = KLoaderFile_Make(&obj->file, dir, filename, md5_digest, false)) == 0 ) {
+        obj->read_ahead = read_ahead;
+    }
+    if( rc == 0 ) {
+        *cself = obj;
+    } else {
+        CGLoaderFile_Release(obj, true);
+    }
+    return rc;
+}
+
+rc_t CGLoaderFile_GetType(const CGLoaderFile* cself, CG_EFileType* type)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || type == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcClassifying, rcParam, rcNull);
+    } else if( (rc = CGLoaderFile_header(cself)) == 0 ) {
+        *type = cself->cg_file->type;
+    }
+    return rc;
+}
+
+rc_t CGLoaderFile_GetRead(const CGLoaderFile* cself, TReadsData* data)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || data == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcParam, rcNull);
+    } else if( cself->cg_file->type != cg_eFileType_READS ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcUnsupported);
+    } else if( cself->cg_file->vt->reads == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcIncomplete);
+    } else if( (rc = CGLoaderFile_header(cself)) == 0 ) {
+        rc = cself->cg_file->vt->reads(cself->cg_file, data);
+    }
+    return rc;
+}
+
+rc_t CGLoaderFile_GetTagLfr(const CGLoaderFile* cself, TReadsData* data)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || data == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcParam, rcNull);
+    } else if( cself->cg_file->type != cg_eFileType_TAG_LFR ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcUnsupported);
+    } else if( cself->cg_file->vt->tag_lfr == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcIncomplete);
+    } else if( (rc = CGLoaderFile_header(cself)) == 0 ) {
+        rc = cself->cg_file->vt->tag_lfr(cself->cg_file, data);
+    }
+    return rc;
+}
+
+rc_t CGLoaderFile_GetStartRow(const CGLoaderFile* cself, int64_t* rowid)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || rowid == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcParam, rcNull);
+    } else if( cself->cg_file->type != cg_eFileType_READS ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcUnsupported);
+    } else if( cself->cg_file->vt->get_start_row == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcIncomplete);
+    } else if( (rc = CGLoaderFile_header(cself)) == 0 ) {
+        rc = cself->cg_file->vt->get_start_row(cself->cg_file, rowid);
+    }
+    return rc;
+}
+
+rc_t CGLoaderFile_GetMapping(const CGLoaderFile* cself, TMappingsData* data)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || data == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcParam, rcNull);
+    } else if( cself->cg_file->type != cg_eFileType_MAPPINGS ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcUnsupported);
+    } else if( cself->cg_file->vt->mappings == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcIncomplete);
+    } else if( (rc = CGLoaderFile_header(cself)) == 0 ) {
+        rc = cself->cg_file->vt->mappings(cself->cg_file, data);
+    }
+    return rc;
+}
+
+rc_t CGLoaderFile_GetEvidenceIntervals(const CGLoaderFile* cself, TEvidenceIntervalsData* data)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || data == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcParam, rcNull);
+    } else if( cself->cg_file->type != cg_eFileType_EVIDENCE_INTERVALS ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcUnsupported);
+    } else if( cself->cg_file->vt->evidence_intervals == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcIncomplete);
+    } else if( (rc = CGLoaderFile_header(cself)) == 0 ) {
+        rc = cself->cg_file->vt->evidence_intervals(cself->cg_file, data);
+    }
+    return rc;
+}
+
+rc_t CGLoaderFile_GetEvidenceDnbs(const CGLoaderFile* cself, const char* interval_id, TEvidenceDnbsData* data)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || interval_id == NULL || data == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcParam, rcNull);
+    } else if( cself->cg_file->type != cg_eFileType_EVIDENCE_DNBS ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcUnsupported);
+    } else if( cself->cg_file->vt->evidence_dnbs == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcIncomplete);
+    } else if( (rc = CGLoaderFile_header(cself)) == 0 ) {
+        rc = cself->cg_file->vt->evidence_dnbs(cself->cg_file, interval_id, data);
+    }
+    return rc;
+}
+
+rc_t CGLoaderFile_GetAssemblyId(const CGLoaderFile* cself, const CGFIELD_ASSEMBLY_ID_TYPE** assembly_id)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || assembly_id == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcParam, rcNull);
+    } else if( cself->cg_file->vt->assembly_id == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcUnsupported);
+    } else if( (rc = CGLoaderFile_header(cself)) == 0 ) {
+        rc = cself->cg_file->vt->assembly_id(cself->cg_file, assembly_id);
+    }
+    return rc;
+}
+
+rc_t CGLoaderFile_GetSlide(const CGLoaderFile* cself, const CGFIELD_SLIDE_TYPE** slide)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || slide == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcParam, rcNull);
+    } else if( cself->cg_file->vt->slide == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcUnsupported);
+    } else if( (rc = CGLoaderFile_header(cself)) == 0 ) {
+        rc = cself->cg_file->vt->slide(cself->cg_file, slide);
+    }
+    return rc;
+}
+
+rc_t CGLoaderFile_GetLane(const CGLoaderFile* cself, const CGFIELD_LANE_TYPE** lane)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || lane == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcParam, rcNull);
+    } else if( cself->cg_file->vt->lane == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcUnsupported);
+    } else if( (rc = CGLoaderFile_header(cself)) == 0 ) {
+        rc = cself->cg_file->vt->lane(cself->cg_file, lane);
+    }
+    return rc;
+}
+
+rc_t CGLoaderFile_GetBatchFileNumber(const CGLoaderFile* cself, const CGFIELD_BATCH_FILE_NUMBER_TYPE** batch_file_number)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || batch_file_number == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcParam, rcNull);
+    } else if( cself->cg_file->vt->batch_file_number == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcUnsupported);
+    } else if( (rc = CGLoaderFile_header(cself)) == 0 ) {
+        rc = cself->cg_file->vt->batch_file_number(cself->cg_file, batch_file_number);
+    }
+    return rc;
+}
+
+rc_t CGLoaderFile_GetSample(const CGLoaderFile* cself, const CGFIELD_SAMPLE_TYPE** sample)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || sample == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcParam, rcNull);
+    } else if( cself->cg_file->vt->sample == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcUnsupported);
+    } else if( (rc = CGLoaderFile_header(cself)) == 0 ) {
+        rc = cself->cg_file->vt->sample(cself->cg_file, sample);
+    }
+    return rc;
+}
+
+rc_t CGLoaderFile_GetChromosome(const CGLoaderFile* cself, const CGFIELD_CHROMOSOME_TYPE** chromosome)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || chromosome == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcParam, rcNull);
+    } else if( cself->cg_file->vt->chromosome == NULL ) {
+        rc = RC(rcRuntime, rcFile, rcReading, rcInterface, rcUnsupported);
+    } else if( (rc = CGLoaderFile_header(cself)) == 0 ) {
+        rc = cself->cg_file->vt->chromosome(cself->cg_file, chromosome);
+    }
+    return rc;
+}
diff --git a/tools/cg-load/file.h b/tools/cg-load/file.h
new file mode 100644
index 0000000..1efeed4
--- /dev/null
+++ b/tools/cg-load/file.h
@@ -0,0 +1,334 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_cg_load_file_h_
+#define _tools_cg_load_file_h_
+
+#include <kfs/file.h>
+#include <kfs/directory.h>
+
+#include <klib/container.h>
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include "defs.h"
+#include "writer-seq.h"
+#include "writer-algn.h"
+#include "writer-evidence-intervals.h"
+#include "writer-evidence-dnbs.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <strtol.h>
+
+
+/* some usefull utils */
+/* strchr but in fixed size buffer (not asciiZ!) */
+static __inline__ const char* str_chr(const char* str, const size_t len, char sep)
+{
+    const char* end = str + len;
+    while( str < end ) {
+        if( *str == sep ) {
+            break;
+        }
+        str++;
+    }
+    return str == end ? NULL : str;
+}
+
+static __inline__
+rc_t str2buf(const char* str, const size_t len, char* buf, const size_t buf_sz)
+{
+    if( buf_sz <= len ) {
+        rc_t rc = RC(rcRuntime, rcString, rcCopying, rcBuffer, rcInsufficient);
+        if (rc != 0) {
+            PLOGERR(klogErr, (klogErr, rc,  "'$(str)': $(sz) <= $(len)",
+                "str=%.*s,sz=%lu,len=%lu", len, str, buf_sz, len));
+        }
+        return rc;
+    }
+    memcpy(buf, str, len);
+    buf[len] = '\0';
+    return 0;
+}
+
+static __inline__
+rc_t str2unsigned(const char* str, const size_t len, uint64_t max, uint64_t* value)
+{
+    char* end;
+    int64_t q;
+
+    if( len == 0 ) {
+        return RC(rcRuntime, rcString, rcConverting, rcData, rcTooShort);
+    }
+    q = strtou64(str, &end, 10);
+    if( end - str != len ) {
+        return RC(rcRuntime, rcString, rcConverting, rcData, rcInvalid);
+    }
+    if( q < 0 || ( uint64_t ) q > max ) {
+        return RC(rcRuntime, rcString, rcConverting, rcData, rcOutofrange);
+    }
+    *value = q;
+    return 0;
+}
+static __inline__
+rc_t str2u64(const char* str, const size_t len, uint64_t* value)
+{
+    rc_t rc;
+    uint64_t q;
+
+    if( (rc = str2unsigned(str, len, -1, &q)) == 0 ) {
+        *value = q;
+    }
+    return rc;
+}
+
+static __inline__
+rc_t str2signed(const char* str, const size_t len, int64_t min, int64_t max, int64_t* value)
+{
+    char* end;
+    int64_t q;
+
+    if( len == 0 ) {
+        return RC(rcRuntime, rcString, rcConverting, rcData, rcTooShort);
+    }
+    q = strtoi64(str, &end, 10);
+    if( end - str != len ) {
+        return RC(rcRuntime, rcString, rcConverting, rcData, rcInvalid);
+    }
+    if( q < min || q > max ) {
+        return RC(rcRuntime, rcString, rcConverting, rcData, rcOutofrange);
+    }
+    *value = q;
+    return 0;
+}
+static __inline__
+rc_t str2i64(const char* str, const size_t len, int64_t* value)
+{
+    rc_t rc;
+    int64_t q;
+
+#if _ARCH_BITS == 32
+    if( (rc = str2signed(str, len, -0x7FFFFFFFFFFFFFFFLL, 0x7FFFFFFFFFFFFFFFLL, &q)) == 0 ) {
+        *value = q;
+    }
+#else
+    if( (rc = str2signed(str, len, -0x7FFFFFFFFFFFFFFFL, 0x7FFFFFFFFFFFFFFFL, &q)) == 0 ) {
+        *value = q;
+    }
+#endif
+    return rc;
+}
+static __inline__
+rc_t str2i32(const char* str, const size_t len, int32_t* value)
+{
+    rc_t rc;
+    int64_t q;
+
+    if( (rc = str2signed(str, len, -0x7FFFFFFF - 1, 0x7FFFFFFF, &q)) == 0 ) {
+        *value = ( int32_t ) q;
+    }
+    return rc;
+}
+static __inline__
+rc_t str2u32(const char* str, const size_t len, uint32_t* value)
+{
+    rc_t rc;
+    uint64_t q;
+
+    if( (rc = str2unsigned(str, len, 0xFFFFFFFF, &q)) == 0 ) {
+        *value = ( uint32_t ) q;
+    }
+    return rc;
+}
+static __inline__
+rc_t str2i16(const char* str, const size_t len, int16_t* value)
+{
+    rc_t rc;
+    int64_t q;
+
+    if( (rc = str2signed(str, len, -0x7FFF - 1, 0x7FFF, &q)) == 0 ) {
+        *value = ( int16_t ) q;
+    }
+    return rc;
+}
+static __inline__
+rc_t str2u16(const char* str, const size_t len, uint16_t* value)
+{
+    rc_t rc;
+    uint64_t q;
+
+    if( (rc = str2unsigned(str, len, 0xFFFF, &q)) == 0 ) {
+        *value = ( uint16_t ) q;
+    }
+    return rc;
+}
+#define CG_LINE_START(file, buf, len, res) \
+    do { \
+        const char* buf, *res; \
+        size_t len; \
+        if( (rc = CGLoaderFile_Readline(file, (const void**)&buf, &len)) != 0 ) { \
+            break; \
+        } \
+        res = buf - 1;
+
+#define CG_LINE_NEXT_FIELD(buf, len, res) \
+    if( rc != 0 ) { \
+        break; \
+    } else { \
+        len -= ++res - buf; \
+        buf = res; \
+        if( (res = str_chr(buf, len, '\t')) == NULL ) { \
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcCorrupt); \
+            break; \
+        } \
+    }
+
+#define CG_LINE_LAST_FIELD(buf, len, res) \
+    if( rc != 0 ) { \
+        break; \
+    } else { \
+        len -= ++res - buf; \
+        buf = res; \
+        res = buf + len; \
+        if( str_chr(buf, len, '\t') != NULL ) { \
+            rc = RC(rcRuntime, rcFile, rcReading, rcData, rcCorrupt); \
+            break; \
+        } \
+    }
+
+#define CG_LINE_END() \
+    } while(false)
+
+#ifndef CGFILETYPE_IMPL
+#define CGFILETYPE_IMPL CGFileType
+#endif
+
+typedef struct CGFileType CGFileType;
+
+typedef struct CGFileType_vt_struct {
+    rc_t ( CC *header ) (const CGFILETYPE_IMPL* self, const char* buf, const size_t len);
+
+    rc_t ( CC *reads ) (const CGFILETYPE_IMPL* cself, TReadsData* data);
+    rc_t ( CC *get_start_row ) (const CGFILETYPE_IMPL* cself, int64_t* rowid);
+    rc_t ( CC *mappings ) (const CGFILETYPE_IMPL* cself, TMappingsData* data);
+    rc_t ( CC *evidence_intervals )(const CGFILETYPE_IMPL* cself, TEvidenceIntervalsData* data);
+    rc_t ( CC *evidence_dnbs )(const CGFILETYPE_IMPL* cself, const char* interval_id, TEvidenceDnbsData* data);
+    rc_t ( CC *tag_lfr )(const CGFILETYPE_IMPL* cself, TReadsData* data);
+
+    rc_t ( CC *assembly_id) (const CGFILETYPE_IMPL* self, const CGFIELD_ASSEMBLY_ID_TYPE** assembly_id);
+    rc_t ( CC *slide) (const CGFILETYPE_IMPL* self, const CGFIELD_SLIDE_TYPE** slide);
+    rc_t ( CC *lane) (const CGFILETYPE_IMPL* self, const CGFIELD_LANE_TYPE** lane);
+    rc_t ( CC *batch_file_number) (const CGFILETYPE_IMPL* self, const CGFIELD_BATCH_FILE_NUMBER_TYPE** batch_file_number);
+    rc_t ( CC *sample) (const CGFILETYPE_IMPL* self, const CGFIELD_SAMPLE_TYPE** sample);
+    rc_t ( CC *chromosome) (const CGFILETYPE_IMPL* self, const CGFIELD_CHROMOSOME_TYPE** chromosome);
+
+    void ( CC *destroy ) (const CGFILETYPE_IMPL* self, uint64_t* records);
+} CGFileType_vt;
+
+struct CGFileType {
+    uint32_t format_version;
+    CG_EFileType type;
+    CG_ELibraryType libraryType;
+    const CGFileType_vt* vt;
+};
+
+typedef struct CGLoaderFile
+{
+    bool read_ahead;
+    const struct KLoaderFile *file;
+    const CGFileType* cg_file;
+} CGLoaderFile;
+
+typedef struct CGFileTypeFactory {
+    const char* name;
+    CG_EFileType type;
+    rc_t ( CC *make ) (const CGFileType** self, const CGLoaderFile* file);
+} CGFileTypeFactory;
+
+rc_t CGLoaderFile_Make(const CGLoaderFile **cself, const KDirectory* dir, const char* filename,
+                       const uint8_t* md5_digest, bool read_ahead);
+
+rc_t CGLoaderFile_Release(const CGLoaderFile* cself, bool ignored);
+
+/* returns true if eof is reached and buffer is empty */
+rc_t CGLoaderFile_IsEof(const CGLoaderFile* cself, bool* eof);
+
+/* closes the underlying file */
+rc_t CGLoaderFile_Close(const CGLoaderFile* cself);
+
+/* returns current 1-based line number in file */
+rc_t CGLoaderFile_Line(const CGLoaderFile* cself, uint64_t* line);
+
+rc_t CGLoaderFile_Filename(const CGLoaderFile *cself, const char** name);
+
+rc_t CGLoaderFile_LOG(const CGLoaderFile* cself, KLogLevel lvl, rc_t rc, const char *msg, const char *fmt, ...);
+
+rc_t CGLoaderFile_GetType(const CGLoaderFile* cself, CG_EFileType* type);
+
+rc_t CGLoaderFile_GetRead(const CGLoaderFile* cself, TReadsData* data);
+rc_t CGLoaderFile_GetStartRow(const CGLoaderFile* cself, int64_t* rowid);
+
+rc_t CGLoaderFile_GetTagLfr(const CGLoaderFile* cself, TReadsData* data);
+
+rc_t CGLoaderFile_GetMapping(const CGLoaderFile* cself, TMappingsData* data);
+
+rc_t CGLoaderFile_GetEvidenceIntervals(const CGLoaderFile* cself, TEvidenceIntervalsData* data);
+
+rc_t CGLoaderFile_GetEvidenceDnbs(const CGLoaderFile* cself, const char* interval_id, TEvidenceDnbsData* data);
+
+rc_t CGLoaderFile_GetAssemblyId(const CGLoaderFile* cself, const CGFIELD_ASSEMBLY_ID_TYPE** assembly_id);
+rc_t CGLoaderFile_GetSlide(const CGLoaderFile* cself, const CGFIELD_SLIDE_TYPE** slide);
+rc_t CGLoaderFile_GetLane(const CGLoaderFile* cself, const CGFIELD_LANE_TYPE** lane);
+rc_t CGLoaderFile_GetBatchFileNumber(const CGLoaderFile* cself, const CGFIELD_BATCH_FILE_NUMBER_TYPE** batch_file_number);
+rc_t CGLoaderFile_GetSample(const CGLoaderFile* cself, const CGFIELD_SAMPLE_TYPE** sample);
+rc_t CGLoaderFile_GetChromosome(const CGLoaderFile* cself, const CGFIELD_CHROMOSOME_TYPE** chromosome);
+
+
+/* Readline
+ *  makes next line from a file available in buffer.
+ *  eligable EOL symbols are: \n (unix), \r (older mac), \r\n (win)
+ *  EOL symbol(s) never included in buffer length.
+ *  line is \0 terminated.
+ *  if there is no EOL at EOF - not an error.
+ *  fails if internal buffer is insufficient.
+ *  buffer is NULL on EOF
+ *  rc state of (rcString rcTooLong) means line was too long
+ *              you may copy line and readline again for the tail of the line
+ *
+ *  "buffer" [ OUT ] and "length" [ OUT ] - returned line and it's length
+ */
+rc_t CGLoaderFile_Readline(const CGLoaderFile* cself, const void** buffer, size_t* length);
+
+rc_t CGLoaderFile_CreateCGFile(CGLoaderFile* self,
+    uint32_t FORMAT_VERSION, const char* TYPE);
+
+rc_t CGLoaderFileMakeCGFileType(const CGLoaderFile* self, const char* type,
+    const CGFileTypeFactory* factory, size_t factories,
+    const CGFileType** ftype);
+
+#endif /* _tools_cg_load_file_h_ */
diff --git a/tools/cg-load/formats.c b/tools/cg-load/formats.c
new file mode 100644
index 0000000..e3808cc
--- /dev/null
+++ b/tools/cg-load/formats.c
@@ -0,0 +1,54 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+
+#include "defs.h" /* CG_FORMAT_2_5 */
+#include "formats.h" /* get_cg_reads_ngaps */
+
+#include <assert.h>
+
+
+/* CG native format files have some changes since version 2.5 */
+
+
+uint32_t get_cg_reads_ngaps(uint32_t reads_format) {
+    assert(reads_format);
+
+    return reads_format < CG_FORMAT_2_5 ? 3 : 2;
+}
+
+/* IN FORMAT VERSION 2.5 SPOT LENGTH WAS CHANGES FROM 70 to 60 */
+uint32_t get_cg_read_len(uint32_t reads_format) {
+    uint32_t spot_len = CG_READS15_SPOT_LEN;
+
+    assert(reads_format);
+
+    if (reads_format >= CG_FORMAT_2_5) {
+        spot_len = CG_READS25_SPOT_LEN;
+    }
+
+    return spot_len / 2;
+}
diff --git a/tools/cg-load/formats.h b/tools/cg-load/formats.h
new file mode 100644
index 0000000..d378442
--- /dev/null
+++ b/tools/cg-load/formats.h
@@ -0,0 +1,41 @@
+#ifndef _tools_cg_load_formats_h_
+#define _tools_cg_load_formats_h_
+
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+
+#include <stdint.h> /* uint32_t */
+
+
+/* CG native format files have some changes since version 2.5 */
+
+
+uint32_t get_cg_reads_ngaps(uint32_t reads_format);
+uint32_t get_cg_read_len   (uint32_t reads_format);
+
+
+#endif /* _tools_cg_load_formats_h_ */
diff --git a/tools/cg-load/writer-algn.c b/tools/cg-load/writer-algn.c
new file mode 100644
index 0000000..4015250
--- /dev/null
+++ b/tools/cg-load/writer-algn.c
@@ -0,0 +1,825 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+
+#include "debug.h" /* DEBUG_MSG */
+#include "defs.h" /* cg_eRightHalfDnbMap */
+#include "formats.h" /* get_cg_reads_ngaps */
+#include "writer-algn.h" /* CGWriterAlgn */
+
+#include <align/align.h> /* NCBI_align_ro_complete_genomics */
+#include <align/dna-reverse-cmpl.h> /* DNAReverseCompliment */
+
+#include <klib/log.h> /* PLOGERR */
+#include <klib/rc.h>
+#include <klib/sort.h> /* ksort */
+
+#include <sysalloc.h>
+
+#include <assert.h>
+#include <math.h> /* pow */
+#include <string.h> /* strcmp */
+
+
+typedef struct CGWriterAlgn_match_struct {
+    /* filled out by ReferenceMgr_Compress */
+    INSDC_coord_zero read_start;
+    INSDC_coord_len read_len;
+    bool has_ref_offset[CG_READS15_SPOT_LEN];
+    int32_t ref_offset[CG_READS15_SPOT_LEN];
+    uint8_t ref_offset_type[CG_READS15_SPOT_LEN];
+    bool has_mismatch[CG_READS15_SPOT_LEN];
+    char mismatch[CG_READS15_SPOT_LEN];
+    int64_t ref_id;
+    INSDC_coord_zero ref_start;
+    /* fill oud here */
+    int64_t seq_spot_id;
+    INSDC_coord_one seq_read_id;
+    bool ref_orientation;
+    uint32_t mapq;
+    /* used only only in secondary */
+    bool mate_ref_orientation;
+    int64_t mate_ref_id;
+    INSDC_coord_zero mate_ref_pos;
+    INSDC_coord_zero template_len;
+    INSDC_coord_len ref_len;
+} CGWriterAlgn_match;
+
+struct CGWriterAlgn {
+    const ReferenceMgr* rmgr;
+    const TableWriterAlgn* primary;
+    const TableWriterAlgn* secondary;
+    TableWriterAlgnData algn[CG_MAPPINGS_MAX];
+    CGWriterAlgn_match match[CG_MAPPINGS_MAX];
+    TMappingsData data;
+    uint32_t min_mapq;
+    bool single_mate;
+    uint64_t forced_pairs_cnt;
+    uint64_t dropped_mates_cnt;
+};
+    
+
+static uint32_t global_cluster_size;
+
+rc_t CGWriterAlgn_Make(const CGWriterAlgn** cself, TMappingsData** data, VDatabase* db, const ReferenceMgr* rmgr,
+                       uint32_t min_mapq, bool single_mate, uint32_t cluster_size)
+{
+    rc_t rc = 0;
+    CGWriterAlgn* self;
+
+    if( cself == NULL || db == NULL ) {
+        return RC(rcExe, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    self = calloc(1, sizeof(*self));
+    if( self == NULL ) {
+        rc = RC(rcExe, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+    } else {
+        if( (rc = TableWriterAlgn_Make(&self->primary, db,
+                            ewalgn_tabletype_PrimaryAlignment, ewalgn_co_SEQ_SPOT_ID | ewalgn_co_unsorted)) != 0 ){
+            LOGERR(klogErr, rc, "primary alignment table");
+        } else if( (rc = TableWriterAlgn_Make(&self->secondary, db,
+                            ewalgn_tabletype_SecondaryAlignment, ewalgn_co_SEQ_SPOT_ID | ewalgn_co_unsorted)) != 0 ) {
+            LOGERR(klogErr, rc, "secondary alignment table");
+        } else {
+            int i;
+            /* interconnect buffers */
+            for(i = 0; i < CG_MAPPINGS_MAX; i++) {
+                self->algn[i].seq_spot_id.buffer = &self->match[i].seq_spot_id;
+                self->algn[i].seq_spot_id.elements = 1;
+                
+                self->algn[i].seq_read_id.buffer = &self->match[i].seq_read_id;
+                self->algn[i].seq_read_id.elements = 1;
+
+                self->algn[i].read_start.buffer = &self->match[i].read_start;
+                
+                self->algn[i].read_len.buffer = &self->match[i].read_len;
+                
+                self->algn[i].has_ref_offset.buffer = self->match[i].has_ref_offset;
+                
+                self->algn[i].ref_offset.buffer = self->match[i].ref_offset;
+                
+                self->algn[i].ref_offset_type.buffer = self->match[i].ref_offset_type;
+                
+                self->algn[i].ref_id.buffer = &self->match[i].ref_id;
+                
+                self->algn[i].ref_start.buffer = &self->match[i].ref_start;
+                
+                self->algn[i].has_mismatch.buffer = self->match[i].has_mismatch;
+                
+                self->algn[i].mismatch.buffer = self->match[i].mismatch;
+                
+                self->algn[i].ref_orientation.buffer = &self->match[i].ref_orientation;
+                self->algn[i].ref_orientation.elements = 1;
+                
+                self->algn[i].mapq.buffer = &self->match[i].mapq;
+                self->algn[i].mapq.elements = 1;
+                
+                self->algn[i].mate_ref_orientation.buffer = &self->match[i].mate_ref_orientation;
+                self->algn[i].mate_ref_orientation.elements = 1;
+                
+                self->algn[i].mate_ref_id.buffer = &self->match[i].mate_ref_id;
+                self->algn[i].mate_ref_id.elements = 1;
+                
+                self->algn[i].mate_ref_pos.buffer = &self->match[i].mate_ref_pos;
+                self->algn[i].mate_ref_pos.elements = 1;
+                
+                self->algn[i].template_len.buffer = &self->match[i].template_len;
+                self->algn[i].template_len.elements = 1;
+            }
+            self->rmgr = rmgr;
+            self->min_mapq = min_mapq;
+            self->single_mate = single_mate;
+            global_cluster_size = cluster_size;
+            *data = &self->data;
+        }
+    }
+    if( rc == 0 ) {
+        *cself = self;
+    } else {
+        CGWriterAlgn_Whack(self, false, NULL, NULL);
+    }
+    return rc;
+}
+
+rc_t CGWriterAlgn_Whack(const CGWriterAlgn* cself, bool commit, uint64_t* rows_1st, uint64_t* rows_2nd)
+{
+    rc_t rc = 0;
+    if( cself != NULL ) {
+        CGWriterAlgn* self = (CGWriterAlgn*)cself;
+        rc_t rc1 = TableWriterAlgn_Whack(cself->primary, commit, rows_1st);
+        rc_t rc2 = TableWriterAlgn_Whack(cself->secondary, commit, rows_2nd);
+        if( self->forced_pairs_cnt > 0 ) {
+            PLOGMSG(klogInfo, (klogInfo, "$(forced_pairs_cnt) forced pairs to PRIMARY", "forced_pairs_cnt=%lu", self->forced_pairs_cnt));
+        }
+        if( self->dropped_mates_cnt > 0 ) {
+            PLOGMSG(klogInfo, (klogInfo, "$(dropped_mates_cnt) dropped duplicate mates in SECONDARY", "dropped_mates_cnt=%lu", self->dropped_mates_cnt));
+        }
+        rc = rc1 ? rc1 : rc2;
+        free(self);
+    }
+    return rc;
+}
+
+static
+rc_t CGWriterAlgn_Save(CGWriterAlgn *const self,
+                       TReadsData *const rd,
+                       TableWriterAlgn const *const writer,
+                       uint32_t const mate,
+                       int64_t *const rowid)
+{
+    rc_t rc = 0;
+    TMappingsData_map *const map = &self->data.map[mate];
+
+    if( !map->saved ) {
+        CGWriterAlgn_match *const match = &self->match[mate];
+        TableWriterAlgnData *const algn = &self->algn[mate];
+
+        uint32_t g = 0;
+
+        uint32_t* cigar = NULL;
+        uint32_t left_cigar15 []={  5 << 4, 0, 10 << 4, 0, 10 << 4, 0,10 << 4 };
+        uint32_t right_cigar15[]={ 10 << 4, 0, 10 << 4, 0, 10 << 4, 0, 5 << 4 };
+        uint32_t left_cigar25 []={ 10 << 4, 0, 10 << 4, 0, 10 << 4, 0, 0 };
+        uint32_t right_cigar25[]={ 10 << 4, 0, 10 << 4, 0, 10 << 4, 0, 0 };
+        uint32_t *left_cigar  = NULL;
+        uint32_t *right_cigar = NULL;
+        uint32_t cg_reads_ngaps = 0;
+
+        const char *read = NULL;
+        uint32_t read_len = 0;
+
+        assert(rd);
+
+        cg_reads_ngaps = get_cg_reads_ngaps(rd->reads_format);
+
+        read_len = rd->seq.spot_len / 2;
+        if (cg_reads_ngaps == 3) {
+            left_cigar  = left_cigar15;
+            right_cigar = right_cigar15;
+        }
+        else if (cg_reads_ngaps == 2) {
+            left_cigar  = left_cigar25;
+            right_cigar = right_cigar25;
+        }
+        else {
+            assert(0);
+        }
+
+        if (match->seq_read_id == 2) {
+            read = &((const char*)(rd->seq.sequence.buffer))[read_len];
+            cigar = right_cigar;
+            g = read_len;
+        }
+        else {
+            read = rd->seq.sequence.buffer;
+            cigar = left_cigar;
+            g = 0;
+        }
+        if (match->ref_orientation) {
+            if( rd->reverse[g] == '\0' ) {
+                if( (rc = DNAReverseCompliment(read, &rd->reverse[g], read_len)) != 0) {
+                    return rc;
+                }
+                DEBUG_MSG(10, ("'%.*s' -> cg_eRevDnbStrand: '%.*s'\n", read_len, read, read_len, &rd->reverse[g]));
+            }
+            read = &rd->reverse[g];
+            cigar = (cigar == left_cigar) ? right_cigar : left_cigar;
+        }
+        for(g = 0; g < cg_reads_ngaps; g++) {
+            if( map->gap[g] > 0 ) {
+                cigar[g * 2 + 1] = (map->gap[g] << 4) | 3; /* 'xN' */
+            } else if( map->gap[g] < 0 ) {
+                cigar[g * 2 + 1] = (-map->gap[g] << 4) | 9; /* 'xB' */
+            } else {
+                cigar[g * 2 + 1] = 0; /* '0M' */
+            }
+        }
+        algn->ploidy = 0;
+        if( (rc = ReferenceMgr_Compress(self->rmgr, ewrefmgr_cmp_Binary,
+                    map->chr, map->offset, read, read_len, cigar, 7, 0, NULL, 0, 0, NULL, 0, NCBI_align_ro_complete_genomics, algn)) != 0 ) {
+            PLOGERR(klogErr, (klogErr, rc, "compression failed $(id) $(o)",
+                    PLOG_2(PLOG_S(id),PLOG_I32(o)), map->chr, map->offset));
+        }
+        else {
+#if 1
+            /* this is to try represent these alignments as unmated to match cgatools
+             * axf uses the row length of MATE_REF_ORIENTATION as the indicator of 
+             * mate presence
+             */
+            unsigned const save = algn->mate_ref_orientation.elements;
+            
+            if (map->mate == mate)
+                algn->mate_ref_orientation.elements = 0;
+            
+            rc = TableWriterAlgn_Write(writer, algn, rowid);
+            
+            if (map->mate == mate)
+                algn->mate_ref_orientation.elements = save;
+#else
+            rc = TableWriterAlgn_Write(writer, algn, rowid);
+#endif
+            map->saved = true;
+        }
+    }
+
+    return rc;
+}
+
+#if 1
+static
+double JointQ(double const Q1, double const Q2)
+{
+    double const P1 =   1.0 - pow(10.0, Q1/-10.0);  /* prob that  1  is not incorrect */
+    double const P2 =   1.0 - pow(10.0, Q2/-10.0);  /* prob that  2  is not incorrect */
+    double const Pj =   1.0 - P1*P2;                /* prob that 1+2   is   incorrect */
+    double const Q  = -10.0 * log10(Pj);
+    
+    return Q;
+}
+
+static
+unsigned FindBestPair(TMappingsData *const data)
+{
+    unsigned const N = data->map_qty;
+    unsigned i;
+    double maxq;
+    unsigned best = N;
+    
+    /* pick best of the reciprocal pairs */
+    for (i = 0, maxq = -1.0; i != N; ++i) {
+        unsigned const mate = data->map[i].mate;
+        bool const is_left = (data->map[i].flags & cg_eRightHalfDnbMap) == 0;
+        
+        if (mate < N && mate != i && data->map[mate].mate == i && is_left) {
+            double const Q1 = (int)data->map[i].weight - 33;
+            double const Q2 = (int)data->map[mate].weight - 33;
+            double const q = JointQ(Q1, Q2);
+
+            assert(Q1 >= 0);
+            assert(Q2 >= 0);
+            assert(q >= 0);
+            if (maxq < q) {
+                maxq = q;
+                best = i;
+            }
+        }
+    }
+    if (best < N)
+        return best;
+    
+    /* no reciprocal pairs, pick best of any pair */
+    for (i = 0, maxq = 0.0; i != N; ++i) {
+        unsigned const mate = data->map[i].mate;
+        if (mate < N && mate != i) {
+            double const Q1 = (int)data->map[i].weight - 33;
+            double const Q2 = (int)data->map[mate].weight - 33;
+            double const q = JointQ(Q1, Q2);
+            
+            assert(Q1 >= 0);
+            assert(Q2 >= 0);
+            assert(q >= 0);
+            if (maxq < q) {
+                maxq = q;
+                best = i;
+            }
+        }
+    }
+    if (best == N) {
+        /* no pair with a joint Q > 0; pick best mapping */
+        for (i = 0, maxq = 0.0; i != N; ++i) {
+            unsigned const mate = data->map[i].mate;
+            if (mate < N && mate != i) {
+                double const q = (int)data->map[i].weight - 33;
+                
+                if (maxq < q) {
+                    maxq = q;
+                    best = i;
+                }
+            }
+        }
+        if (best == N) {
+            /* no mapping with Q > 0; pick first */
+            for (i = 0, maxq = 0.0; i != N; ++i) {
+                unsigned const mate = data->map[i].mate;
+                if (mate < N && mate != i) {
+                    best = i;
+                    break;
+                }
+            }
+            if (best == N) {
+                /* give up */
+                return N;
+            }
+        }
+    }
+    {
+        /* make the pair reciprocal */
+        unsigned const mate = data->map[best].mate;
+        
+        if (mate < N) {
+            data->map[mate].mate = best;
+            return (data->map[best].flags & cg_eRightHalfDnbMap) ? mate : best;
+        }
+        return N;
+    }
+}
+
+static
+unsigned FindBestLeft(TMappingsData *const data)
+{
+    unsigned const N = data->map_qty;
+    unsigned i;
+    unsigned best;
+    int maxq;
+    
+    for (best = N, maxq = -1, i = 0; i != N; ++i) {
+        int const q = (int)data->map[i].weight;
+        
+        if ((data->map[i].flags & cg_eRightHalfDnbMap) == 0 && maxq < q) {
+            maxq = q;
+            best = i;
+        }
+    }
+    return best;
+}
+
+static
+unsigned FindBestRight(TMappingsData *const data)
+{
+    unsigned const N = data->map_qty;
+    unsigned i;
+    unsigned best;
+    int maxq;
+    
+    for (best = N, maxq = -1, i = 0; i != N; ++i) {
+        int const q = (int)data->map[i].weight;
+        
+        if ((data->map[i].flags & cg_eRightHalfDnbMap) != 0 && maxq < q) {
+            maxq = q;
+            best = i;
+        }
+    }
+    return best;
+}
+
+static
+bool check_in_cluster(TMappingsData_map const *const a, TMappingsData_map const *const b)
+{
+	if (   (a->flags & cg_eRightHalfDnbMap) == (b->flags & cg_eRightHalfDnbMap)
+        && (strcmp(a->chr, b->chr) == 0)
+        && abs((int)a->offset - (int)b->offset) <= global_cluster_size)
+    {
+        return true;
+	}
+	return false;
+}
+
+static
+int64_t clustering_sort_cb(void const *const A, void const *const B, void *const ctx)
+{
+    TMappingsData const *const data = (TMappingsData const *)ctx;
+    unsigned const ia = *(unsigned const *)A;
+    unsigned const ib = *(unsigned const *)B;
+    TMappingsData_map const *const a = &data->map[ia];
+    TMappingsData_map const *const b = &data->map[ib];
+    int64_t res;
+    unsigned j = 0;
+    
+	res = (int64_t)(a->flags & cg_eRightHalfDnbMap) - (int64_t)(b->flags & cg_eRightHalfDnbMap); /**** separate by DNP side ***/
+	if (res) return res;
+    
+    res = strcmp(a->chr, b->chr); /* same chromosome ? **/
+	if (res) return res;
+    
+	res = (a->offset - b->offset) / (global_cluster_size + 1); /***  is it within the range ***/
+	if (res) return res;
+    
+	/**cluster is defined here; now pick the winner **/
+	res = (int64_t)a->saved - (int64_t)b->saved; /*** if already saved **/
+	if (res) return -res;
+    
+	res = (int64_t)a->weight - (int64_t)b->weight; /*** has  higher score **/
+	if (res) return -res;
+
+    res = 0;
+    assert(data->cg_reads_ngaps);
+    for (j = 0; j != data->cg_reads_ngaps; ++j) {
+        res += (int64_t)(a->gap[j]) - (int64_t)(b->gap[j]);
+    } /** has lower projection on the reference **/
+
+    return res;
+}
+
+static
+void cluster_mates(TMappingsData *const data)
+{
+    unsigned index[CG_MAPPINGS_MAX];
+    unsigned i;
+    unsigned j;
+    
+    for (i = 0; i != data->map_qty; ++i)
+        index[i] = i;
+    
+    ksort(index, data->map_qty, sizeof(index[0]), clustering_sort_cb, data);
+    for (i = 0, j = 1; j != data->map_qty; ++j) {
+        unsigned const ii = index[i];
+        unsigned const ij = index[j];
+        TMappingsData_map *const a = &data->map[ij];
+        TMappingsData_map const *const b = &data->map[ii];
+        
+        if (check_in_cluster(a, b)) {
+            unsigned const a_mate = a->mate;
+            unsigned const b_mate = b->mate;
+            
+            if (   a_mate == ij /** remove singletons **/
+                || a_mate == b_mate) /** or cluster originator has the same mate **/
+            {
+                a->saved = true;
+                DEBUG_MSG(10, ("mapping %u was dropped as a part of cluster at mapping %u\n", ij, ii));
+            }
+        }
+        else
+            i = j;
+    }
+}
+
+static
+INSDC_coord_zero template_length(unsigned const self_left,
+                                 unsigned const mate_left,
+                                 unsigned const self_len,
+                                 unsigned const mate_len,
+                                 unsigned const read_id)
+{
+    /* adapted from libs/axf/template_len.c */
+    unsigned const self_right = self_left + self_len;
+    unsigned const mate_right = mate_left + mate_len;
+    unsigned const  leftmost  = (self_left  < mate_left ) ? self_left  : mate_left;
+    unsigned const rightmost  = (self_right > mate_right) ? self_right : mate_right;
+    unsigned const tlen = rightmost - leftmost;
+    
+    /* The standard says, "The leftmost segment has a plus sign and the rightmost has a minus sign." */
+    if (   (self_left <= mate_left && self_right >= mate_right)     /* mate fully contained within self or */
+        || (mate_left <= self_left && mate_right >= self_right))    /* self fully contained within mate; */
+    {
+        if (self_left < mate_left || (read_id == 1 && self_left == mate_left))
+            return (INSDC_coord_zero)tlen;
+        else
+            return -(INSDC_coord_zero)tlen;
+    }
+    else if (   (self_right == mate_right && mate_left == leftmost) /* both are rightmost, but mate is leftmost */
+             ||  self_right == rightmost)
+    {
+        return -(INSDC_coord_zero)tlen;
+    }
+    else
+        return (INSDC_coord_zero)tlen;
+}
+
+static
+rc_t CGWriterAlgn_Write_int(CGWriterAlgn *const self, TReadsData *const read)
+{
+    TMappingsData *const data = &self->data;
+    unsigned const N = data->map_qty;
+    rc_t rc = 0;
+
+    if (N != 0) {
+        unsigned left_prime = N;
+        unsigned right_prime = N;
+        unsigned i;
+        unsigned countLeft  = 0;
+        unsigned countRight = 0;
+
+        assert(read);
+
+        data->cg_reads_ngaps = get_cg_reads_ngaps(read->reads_format);
+        assert(data->cg_reads_ngaps);
+
+        for (i = 0; i != N; ++i) {
+            char const *const refname = data->map[i].chr;
+            unsigned j;
+            INSDC_coord_len reflen = read->seq.spot_len / 2;
+            ReferenceSeq const *rseq;
+            bool shouldUnmap = false;
+            bool wasRenamed = false;
+            
+            memset(&self->match[i], 0, sizeof(self->match[i]));
+            
+            rc = ReferenceMgr_GetSeq(self->rmgr, &rseq, refname, &shouldUnmap, true, &wasRenamed);
+            if (rc) {
+                (void)PLOGERR(klogErr, (klogErr, rc, "Failed accessing Reference '$(ref)'", "ref=%s", refname));
+                break;
+            }
+            assert(shouldUnmap == false);
+            rc = ReferenceSeq_Get1stRow(rseq, &self->match[i].ref_id); /* if the above worked, this is infallible */
+            assert(rc == 0);
+            ReferenceSeq_Release(rseq);
+            
+            for (j = 0; j != data->cg_reads_ngaps; ++j) {
+                reflen += data->map[i].gap[j];
+            }
+            
+            self->match[i].seq_spot_id = read->rowid;
+            self->match[i].mapq = data->map[i].weight - 33;
+            self->match[i].ref_orientation = (data->map[i].flags & cg_eRevDnbStrand) ? true : false;
+            self->match[i].ref_len = reflen;
+            
+            if (data->map[i].flags & cg_eRightHalfDnbMap) {
+                self->match[i].seq_read_id = 2;
+                ++countRight;
+            }
+            else {
+                self->match[i].seq_read_id = 1;
+                ++countLeft;
+            }
+        }
+
+        if (countLeft > 0 && countRight > 0) {
+            left_prime = FindBestPair(data);
+            if (left_prime < N) {
+                right_prime = data->map[left_prime].mate;
+            }
+            else { /* force the pairing */
+                left_prime = FindBestLeft(data);
+                right_prime = FindBestRight(data);
+                data->map[left_prime].mate = right_prime;
+                data->map[right_prime].mate = left_prime;
+            }
+            for (i = 0; i != N; ++i) {
+                unsigned const mate = data->map[i].mate;
+                
+                if (mate < N && mate != i) {
+                    INSDC_coord_zero const tlen = (self->match[i].ref_id == self->match[mate].ref_id)
+                                                ? template_length(data->map[i].offset,
+                                                                  data->map[mate].offset,
+                                                                  self->match[i].ref_len,
+                                                                  self->match[mate].ref_len,
+                                                                  self->match[i].seq_read_id)
+                                                : 0;
+
+                    self->match[i].mate_ref_id = self->match[mate].ref_id;
+                    self->match[i].mate_ref_orientation = self->match[mate].ref_orientation;
+                    self->match[i].mate_ref_pos = data->map[mate].offset;
+                    self->match[i].template_len = tlen;
+                }
+            }
+        }
+        else if (countLeft > 0) {
+            left_prime = FindBestLeft(data);
+        }
+        else {
+            assert(countRight > 0);
+            right_prime = FindBestRight(data);
+        }
+        
+        read->align_count[0] = countLeft  < 254 ? countLeft  : 255;
+        read->align_count[1] = countRight < 254 ? countRight : 255;
+        if (rc == 0 && left_prime < N) {
+            rc = CGWriterAlgn_Save(self, read, self->primary, left_prime,
+                                   &read->prim_algn_id[0]);
+            read->prim_is_reverse[0] = self->match[left_prime].ref_orientation;
+            data->map[left_prime].saved = 1;
+        }
+        if (rc == 0 && right_prime < N) {
+            rc = CGWriterAlgn_Save(self, read, self->primary, right_prime,
+                                   &read->prim_algn_id[1]);
+            read->prim_is_reverse[1] = self->match[right_prime].ref_orientation;
+            data->map[right_prime].saved = 1;
+        }
+        if (global_cluster_size > 0 && data->map_qty > 1 + (left_prime < N ? 1 : 0) + (right_prime < N ? 1 : 0)) {
+            cluster_mates(data);
+        }
+        for (i = 0; i != N && rc == 0; ++i) {
+            if (data->map[i].saved || self->match[i].mapq < self->min_mapq)
+                continue;
+            rc = CGWriterAlgn_Save(self, read, self->secondary, i, NULL);
+        }
+    }
+    return rc;
+}
+
+rc_t CGWriterAlgn_Write(const CGWriterAlgn* cself, TReadsData* read)
+{
+    assert(cself != NULL);
+    assert(read != NULL);
+    assert(read->seq.sequence.buffer != NULL
+        && read->seq.sequence.elements == read->seq.spot_len
+        && (read->seq.sequence.elements == CG_READS15_SPOT_LEN ||
+            read->seq.sequence.elements == CG_READS25_SPOT_LEN));
+    
+    memset(read->prim_algn_id, 0, sizeof(read->prim_algn_id));
+    memset(read->align_count, 0, sizeof(read->align_count));
+    memset(read->prim_is_reverse, 0, sizeof(read->prim_is_reverse));
+    
+    return CGWriterAlgn_Write_int((CGWriterAlgn *)cself, read);
+}
+
+#else
+
+rc_t CGWriterAlgn_Write(const CGWriterAlgn* cself, TReadsData* read)
+{
+    if( cself->data.map_qty != 0 ) {
+        /* primary is-found indicator: weights are ASCII-33 so they can't be 0 if found */
+        uint8_t left_weight = 0, right_weight = 0, pair_weight = 0;
+        uint32_t i, left_prim = 0, right_prim = 0, paired = 0;
+
+        CGWriterAlgn* self = (CGWriterAlgn*)cself;
+        TMappingsData* data = &self->data;
+
+        /* find best left, right and pair */
+        for(i = 0; i < data->map_qty; i++) {
+            int k = (data->map[i].flags & cg_eRightHalfDnbMap) ? 1 : 0;
+            if( read->align_count[k] < 254 ) {
+                read->align_count[k]++;
+            }
+            if( k == 0 ) {
+                if( left_weight < data->map[i].weight ) {
+                    left_prim = i;
+                    left_weight = data->map[i].weight;
+                }
+            } else {
+                if( right_weight < data->map[i].weight ) {
+                    right_prim = i;
+                    right_weight = data->map[i].weight;
+                }
+            }
+            if( i != data->map[i].mate && pair_weight < data->map[i].weight ) {
+                if( data->map[i].mate < data->map_qty ) {
+                    /* note pair's left mate id */
+                    paired = k == 0 ? i : data->map[i].mate;
+                    pair_weight = data->map[i].weight;
+                } else {
+                    /* fail safe in case mate id is out of map boundaries */
+                    data->map[i].mate = i;
+                }
+            }
+        }
+        /* choose primary pair */
+        if( left_weight > right_weight && data->map[left_prim].mate != left_prim ) {
+            /* left is better and has a mate -> choose left pair */
+            right_prim = data->map[left_prim].mate;
+            right_weight = data->map[right_prim].weight;
+        } else if( right_weight > left_weight && data->map[right_prim].mate != right_prim ) {
+            /* right is better and has a mate -> choose right pair */
+            left_prim = data->map[right_prim].mate;
+            left_weight = data->map[left_prim].weight;
+        } else if( pair_weight > 0 ) {
+            /* use paired as primary */
+            left_prim = paired;
+            left_weight = data->map[left_prim].weight;
+            right_prim = data->map[left_prim].mate;
+            right_weight = data->map[right_prim].weight;
+        } else if( left_weight > 0 && right_weight > 0 ) {
+            /* force best left and right to be mates */
+            data->map[left_prim].mate = right_prim;
+            data->map[right_prim].mate = left_prim;
+            self->forced_pairs_cnt++;
+            DEBUG_MSG(10, ("forced pair: %u %u\n", left_prim, right_prim));
+        }
+#if _DEBUGGING
+        DEBUG_MSG(10, ("alignment_count [%hu,%hu]", read->align_count[0], read->align_count[1]));
+        DEBUG_MSG(10, (" left primary: "));
+        if( left_weight > 0 ) {
+            DEBUG_MSG(10, ("weight %hu [%c], id %u", left_weight, left_weight, left_prim));
+        } else {
+            DEBUG_MSG(10, ("none"));
+        }
+        DEBUG_MSG(10, ("; right primary: "));
+        if( right_weight > 0 ) {
+            DEBUG_MSG(10, ("weight %hu [%c], id %u", right_weight, right_weight, right_prim));
+        } else {
+            DEBUG_MSG(10, ("none"));
+        }
+        DEBUG_MSG(10, ("\n"));
+#endif
+        assert((left_weight == 0 && read->align_count[0] == 0) || (left_weight > 0 && read->align_count[0] > 0));
+        assert((right_weight == 0 && read->align_count[1] == 0) || (right_weight > 0 && read->align_count[1] > 0));
+
+        /* write left primary */
+        if( rc == 0 && left_weight > 0 ) {
+            rc = CGWriterAlgn_Save(self, read, self->primary, left_prim, &read->prim_algn_id[0]);
+            read->prim_is_reverse[0] = cself->match[left_prim].ref_orientation;
+        }
+        /* write right primary */
+        if( rc == 0 && right_weight > 0 ) {
+            rc = CGWriterAlgn_Save(self, read, self->primary, right_prim, &read->prim_algn_id[1]);
+            read->prim_is_reverse[1] = cself->match[right_prim].ref_orientation;
+        }
+        DEBUG_MSG(10, ("prim_algn_rowid [%li,%li], ", read->prim_algn_id[0], read->prim_algn_id[1]));
+        DEBUG_MSG(10, ("prim_is_reverse [%hu,%hu]\n", read->prim_is_reverse[0], read->prim_is_reverse[1]));
+        if( rc == 0 ) {
+            /* others go to secondary */
+            int64_t row;
+            
+            rc = TableWriterAlgn_GetNextRowId(cself->secondary, &row);
+            if( global_cluster_size > 0  && data->map_qty > 1) {
+                cluster_mates(data);
+            }
+            if( cself->single_mate ) {
+                /* we need to re-mate in case original mate's weight is lower */
+                for(i = 0; rc == 0 && i < data->map_qty; i++ ) {
+                    if( !data->map[i].saved && data->map[i].weight >= cself->min_mapq ) {
+                        uint32_t mate = data->map[i].mate;
+                        if( mate != i && data->map[mate].mate != i ) {
+                            self->dropped_mates_cnt++;
+                            if( data->map[data->map[mate].mate].weight < data->map[i].weight ) {
+                                /* do not save my mate's mate */
+                                DEBUG_MSG(10, ("mate %u dropped as pair of %u\n", data->map[mate].mate, mate));
+                                data->map[data->map[mate].mate].saved = true;
+                                /* repoint mate to me */
+                                data->map[mate].mate = i;
+                            } else {
+                                /* do not save me */
+                                DEBUG_MSG(10, ("mate %u dropped as pair of %u\n", i, mate));
+                                data->map[i].saved = true;
+                            }
+                        }
+                    }
+                }
+            }
+            for(i = 0; rc == 0 && i < data->map_qty; i++ ) {
+                if( !data->map[i].saved && data->map[i].weight >= cself->min_mapq ) {
+                    uint32_t mate = data->map[i].mate;
+                    /* no mate or mate is under-weigth */
+                    if( mate == i || data->map[mate].weight < cself->min_mapq ||
+                       /* or mate was saved in primary */
+                       (left_weight > 0 && mate == left_prim) || (right_weight > 0 && mate == right_prim) ) {
+                        self->match[i].mate_align_id = 0;
+                        rc = CGWriterAlgn_Save(self, read, self->secondary, i, NULL);
+                        row++;
+                    } else {
+                        self->match[mate].mate_align_id = row++;
+                        self->match[i].mate_align_id = row++;
+                        if( (rc = CGWriterAlgn_Save(self, read, self->secondary, i, NULL)) == 0 ) {
+                            rc = CGWriterAlgn_Save(self, read, self->secondary, mate, NULL);
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+#endif
diff --git a/tools/cg-load/writer-algn.h b/tools/cg-load/writer-algn.h
new file mode 100644
index 0000000..b852c4d
--- /dev/null
+++ b/tools/cg-load/writer-algn.h
@@ -0,0 +1,63 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_cg_load_writer_algn_h_
+#define _tools_cg_load_writer_algn_h_
+
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/manager.h>
+#include <insdc/insdc.h>
+#include <align/writer-alignment.h>
+#include <align/writer-reference.h>
+
+#include "writer-seq.h"
+
+typedef struct TMappingsData_map_struct {
+    bool saved;
+    uint16_t flags;
+    char chr[CG_CHROMOSOME_NAME];
+    INSDC_coord_zero offset;
+    int16_t gap[CG_READS15_NGAPS];
+    uint8_t weight;
+    uint32_t mate;
+} TMappingsData_map;
+
+typedef struct TMappingsData_struct {
+    uint16_t map_qty;
+    TMappingsData_map map[CG_MAPPINGS_MAX];
+    uint32_t cg_reads_ngaps;
+} TMappingsData;
+
+typedef struct CGWriterAlgn CGWriterAlgn;
+
+rc_t CGWriterAlgn_Make(const CGWriterAlgn** cself, TMappingsData** data, VDatabase* db, const ReferenceMgr* rmgr,
+                       uint32_t min_mapq, bool single_mate, uint32_t cluster_size);
+
+rc_t CGWriterAlgn_Whack(const CGWriterAlgn* cself, bool commit, uint64_t* rows_1st, uint64_t* rows_2nd);
+
+rc_t CGWriterAlgn_Write(const CGWriterAlgn* cself, TReadsData* read);
+
+#endif /* _tools_cg_load_writer_algn_h_ */
diff --git a/tools/cg-load/writer-evidence-dnbs.c b/tools/cg-load/writer-evidence-dnbs.c
new file mode 100644
index 0000000..81d538f
--- /dev/null
+++ b/tools/cg-load/writer-evidence-dnbs.c
@@ -0,0 +1,246 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "debug.h"
+#include "defs.h"
+#include "writer-evidence-dnbs.h"
+#include "writer-evidence-intervals.h"
+
+#include <align/align.h>
+#include <align/dna-reverse-cmpl.h>
+#include <align/writer-alignment.h>
+
+#include <insdc/insdc.h>
+
+#include <kfs/file.h>
+
+#include <klib/container.h>
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include <vdb/database.h>
+#include <vdb/table.h>
+
+#include <sysalloc.h>
+
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+typedef struct CGWriterEvdDnb_match_struct {
+
+    int64_t seq_spot_id;
+    INSDC_coord_one seq_read_id;
+
+    /* filled out by ReferenceMgr_Compress */
+    INSDC_coord_zero read_start;
+    INSDC_coord_len read_len;
+    bool has_ref_offset[CG_EVDNC_ALLELE_LEN];
+    int32_t ref_offset[CG_EVDNC_ALLELE_LEN];
+    uint8_t ref_offset_type[CG_EVDNC_ALLELE_LEN];
+    int64_t ref_id;
+    INSDC_coord_zero ref_start;
+    bool has_mismatch[CG_EVDNC_ALLELE_LEN];
+    char mismatch[CG_EVDNC_ALLELE_LEN];
+
+    bool ref_orientation;
+    uint32_t ref_ploidy;
+    uint32_t mapq;
+
+} CGWriterEvdDnb_match;
+
+struct CGWriterEvdDnbs {
+    const ReferenceMgr* rmgr;
+    const TableWriterAlgn* writer;
+
+    TableWriterAlgnData algn;
+    CGWriterEvdDnb_match match;
+    
+    TEvidenceDnbsData data;
+
+    uint64_t bad_allele_index;
+    uint32_t read_len;
+};
+
+rc_t CGWriterEvdDnbs_Make(const CGWriterEvdDnbs **cself,
+    TEvidenceDnbsData **data, VDatabase *db, const ReferenceMgr *rmgr,
+    const uint32_t options, uint32_t read_len)
+{
+    rc_t rc = 0;
+    CGWriterEvdDnbs* self;
+
+    if( cself == NULL || db == NULL ) {
+        return RC(rcExe, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    self = calloc(1, sizeof(*self));
+    if( self == NULL ) {
+        rc = RC(rcExe, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+    } else {
+        if( (rc = TableWriterAlgn_Make(&self->writer, db, ewalgn_tabletype_EvidenceAlignment, ewalgn_co_SEQ_SPOT_ID)) == 0 ) {
+            self->algn.seq_spot_id.buffer = &self->match.seq_spot_id;
+            self->algn.seq_spot_id.elements = 1;
+            self->algn.seq_read_id.buffer = &self->match.seq_read_id;
+            self->algn.seq_read_id.elements = 1;
+
+            self->algn.read_start.buffer = &self->match.read_start;
+            self->algn.read_len.buffer = &self->match.read_len;
+            self->algn.has_ref_offset.buffer = self->match.has_ref_offset;
+            self->algn.ref_offset.buffer = self->match.ref_offset;
+            self->algn.ref_offset_type.buffer = self->match.ref_offset_type;
+            self->algn.ref_id.buffer = &self->match.ref_id;
+            self->algn.ref_id.elements = 1;
+            self->algn.ref_start.buffer = &self->match.ref_start;
+            self->algn.ref_start.elements = 1;
+            self->algn.has_mismatch.buffer = self->match.has_mismatch;
+            self->algn.mismatch.buffer = self->match.mismatch;
+            self->algn.ref_orientation.buffer = &self->match.ref_orientation;
+            self->algn.ref_orientation.elements = 1;
+            self->algn.ref_ploidy.buffer = &self->match.ref_ploidy;
+            self->algn.ref_ploidy.elements = 1;
+            self->algn.mapq.buffer = &self->match.mapq;
+            self->algn.mapq.elements = 1;
+            self->rmgr = rmgr;
+
+            /* set to 1st row for evidence_interval to collect ids */
+            self->data.last_rowid = 1;
+
+            self->read_len = read_len;
+
+            *data = &self->data;
+        }
+    }
+    if( rc == 0 ) {
+        *cself = self;
+    } else {
+        CGWriterEvdDnbs_Whack(self, false, NULL);
+    }
+    return rc;
+}
+
+rc_t CGWriterEvdDnbs_Whack(const CGWriterEvdDnbs* cself, bool commit, uint64_t* rows)
+{
+    rc_t rc = 0;
+    if( cself != NULL ) {
+        CGWriterEvdDnbs* self = (CGWriterEvdDnbs*)cself;
+        if( self->bad_allele_index > 0 ) {
+            PLOGMSG(klogInfo, (klogInfo, "$(bad_allele_index) bad allele_indexes in evidence dnbs",
+                    "bad_allele_index=%lu", self->bad_allele_index));
+        }
+        rc = TableWriterAlgn_Whack(cself->writer, commit, rows);
+        free(self->data.dnbs);
+        free(self);
+    }
+    return rc;
+}
+
+rc_t CGWriterEvdDnbs_SetSEQ(const CGWriterEvdDnbs* cself, uint16_t dnb, const int64_t seq_spot_id_1st)
+{
+    rc_t rc = 0;
+    CGWriterEvdDnbs* self =(CGWriterEvdDnbs*)cself;
+
+    assert(cself != NULL);
+
+    self->data.dnbs[dnb].seq_spot_id = seq_spot_id_1st + self->data.dnbs[dnb].dnb_offset_in_lane_file;
+
+    return rc;
+}
+
+rc_t CGWriterEvdDnbs_Write(const CGWriterEvdDnbs* cself, const TEvidenceIntervalsData* ref, int64_t ref_rowid)
+{
+    rc_t rc = 0;
+    uint16_t i;
+    int64_t last_rowid;
+    CGWriterEvdDnbs* self =(CGWriterEvdDnbs*)cself;
+
+    assert(cself != NULL);
+    assert(ref != NULL);
+
+    for(i = 0; rc == 0 && i < cself->data.qty; i++) {
+
+        /* align against allele */
+        uint16_t ai = cself->data.dnbs[i].allele_index;
+        self->match.ref_ploidy = ref->allele_indexes_to_read_number[ai];
+        if( self->match.ref_ploidy == 0 ) {
+            DEBUG_MSG(3, ("bad allele_index for interval %s %s[%hu]\n", cself->data.dnbs[i].chr, cself->data.interval_id, i + 1));
+            self->bad_allele_index++;
+            continue;
+        }
+        else {
+            const char *read = NULL;
+            char reversed[CG_READS15_SPOT_LEN] = "";
+            uint32_t read_len = cself->read_len;
+
+            assert(read_len == CG_READS15_SPOT_LEN / 2
+                || read_len == CG_READS25_SPOT_LEN / 2);
+
+            if( cself->data.dnbs[i].side == 'L' ) {
+                self->match.seq_read_id = 1;
+                read = cself->data.dnbs[i].read;
+            } else {
+                self->match.seq_read_id = 2;
+                read = &cself->data.dnbs[i].read[read_len];
+            }
+            if( cself->data.dnbs[i].strand == '-' ) {
+                if( (rc = DNAReverseCompliment(read, reversed, read_len)) != 0 ) {
+                    break;
+                }
+                read = reversed;
+                self->match.ref_orientation = true;
+            } else {
+                self->match.ref_orientation = false;
+            }
+            self->algn.ploidy = 0;
+            if( (rc = ReferenceMgr_Compress(cself->rmgr, 0, cself->data.dnbs[i].chr,
+                                            cself->data.dnbs[i].offset_in_reference, read, read_len,
+                                            cself->data.dnbs[i].allele_alignment, cself->data.dnbs[i].allele_alignment_length,
+                                            ref->offset,
+                                            ref->allele[ai], ref->allele_length[ai],
+					    cself->data.dnbs[i].offset_in_allele,
+                                            ref->allele_alignment[ai], ref->allele_alignment_length[ai],
+                                            NCBI_align_ro_complete_genomics, &self->algn)) == 0 ) {
+                self->match.mapq = cself->data.dnbs[i].mapping_quality - 33;
+                /* pointer to SEQUENCE table spot and read */
+                self->match.seq_spot_id = cself->data.dnbs[i].seq_spot_id;
+                self->match.ref_id = ref_rowid;
+                self->match.ref_start = cself->data.dnbs[i].offset_in_allele;
+                DEBUG_MSG(3, ("REF_ID: %li, REF_START: %i, REF_PLOIDY: %hu\n",
+                    self->match.ref_id, self->match.ref_start, self->match.ref_ploidy));
+                rc = TableWriterAlgn_Write(cself->writer, &self->algn, &last_rowid);
+		if( rc == 0 && self->data.last_rowid++ != last_rowid ) {
+		    rc = RC(rcExe, rcTable, rcWriting, rcData, rcInconsistent);
+		}
+            } else if( GetRCObject(rc) == rcOffset && GetRCState(rc) == rcOutofrange ) {
+                PLOGERR(klogErr, (klogErr, rc, "evidence dnb for $(chr) interval $(interval) OffsetInReference $(offset) skipped",
+                    "chr=%s,interval=%s,offset=%i", ref->chr, ref->interval_id, cself->data.dnbs[i].offset_in_reference));
+                rc = 0;
+            }
+        }
+    }
+    return rc;
+}
diff --git a/tools/cg-load/writer-evidence-dnbs.h b/tools/cg-load/writer-evidence-dnbs.h
new file mode 100644
index 0000000..f0c17af
--- /dev/null
+++ b/tools/cg-load/writer-evidence-dnbs.h
@@ -0,0 +1,97 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_cg_load_writer_evidence_dnbs_h_
+#define _tools_cg_load_writer_evidence_dnbs_h_
+
+
+#include "defs.h"
+#include "factory-cmn.h"
+
+#include <insdc/insdc.h>
+
+#include <sra/sradb.h>
+
+#include <vdb/database.h>
+
+
+struct ReferenceMgr;
+
+
+typedef struct TEvidenceDnbsData_dnb_struct {
+
+    /* translated:
+       slide+lane+file_num_in_lane+dnb_offset_in_lane_file --> SEQ_SPOT_ID */
+    int64_t seq_spot_id;
+
+    char chr[CG_CHROMOSOME_NAME];
+    char slide[CG_SLIDE];
+    char lane[CG_LANE];
+    CGFIELD15_BATCH_FILE_NUMBER file_num_in_lane;
+    uint64_t dnb_offset_in_lane_file; /* zero-based */
+    uint16_t allele_index;
+    char side;
+    char strand;
+    INSDC_coord_zero offset_in_allele;
+    char allele_alignment[CG_EVDNC_ALLELE_CIGAR_LEN];
+    /* strlen for allele_alignment[] buffer */
+    size_t allele_alignment_length;
+    uint8_t mapping_quality;
+    INSDC_coord_zero offset_in_reference;
+    /* moved into reading function since it is not used after reading anyway
+    char reference_alignment[CG_EVDNC_ALLELE_CIGAR_LEN];
+    INSDC_coord_zero mate_offset_in_reference;
+    char mate_reference_alignment[CG_EVDNC_ALLELE_CIGAR_LEN];
+    uint16_t score_allele[3];*/
+    char read[CG_EVDNC_SPOT_LEN];
+    size_t read_len;
+    /*char qual[CG_EVDNC_SPOT_LEN];
+    */
+    CGFIELD_WELL_ID wellId;
+} TEvidenceDnbsData_dnb;
+
+typedef struct TEvidenceDnbsData {
+    char interval_id[CG_EVDNC_INTERVALID_LEN];
+    uint16_t qty;
+    uint16_t max_qty;
+    TEvidenceDnbsData_dnb* dnbs;
+    int64_t last_rowid; /* last used rowid in this table */
+} TEvidenceDnbsData;
+
+typedef struct CGWriterEvdDnbs CGWriterEvdDnbs;
+
+struct TEvidenceIntervalsData;
+
+rc_t CGWriterEvdDnbs_Make(const CGWriterEvdDnbs **cself,
+    TEvidenceDnbsData **data, VDatabase *db, const struct ReferenceMgr *rmgr,
+    const uint32_t options, uint32_t read_len);
+
+rc_t CGWriterEvdDnbs_Whack(const CGWriterEvdDnbs* cself, bool commit, uint64_t* rows);
+
+rc_t CGWriterEvdDnbs_SetSEQ(const CGWriterEvdDnbs* cself, uint16_t dnb, const int64_t seq_spot_id_1st);
+
+rc_t CGWriterEvdDnbs_Write(const CGWriterEvdDnbs* cself, const struct TEvidenceIntervalsData* ref, int64_t ref_rowid);
+
+#endif /* _tools_cg_load_writer_evidence_dnbs_h_ */
diff --git a/tools/cg-load/writer-evidence-intervals.c b/tools/cg-load/writer-evidence-intervals.c
new file mode 100644
index 0000000..e5efd8f
--- /dev/null
+++ b/tools/cg-load/writer-evidence-intervals.c
@@ -0,0 +1,263 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "debug.h"
+#include "defs.h"
+#include "file.h"
+#include "writer-evidence-dnbs.h"
+#include "writer-evidence-intervals.h"
+
+#include <align/align.h>
+
+#include <kfs/file.h>
+#include <klib/log.h>
+#include <klib/printf.h>
+#include <klib/rc.h>
+
+#include <vdb/table.h>
+
+#include <sysalloc.h>
+
+#include <assert.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+typedef struct CGWriterEvdInt_match_struct {
+
+    /* filled out by ReferenceMgr_Compress */
+    INSDC_coord_zero read_start[CG_EVDNC_PLOIDY];
+    INSDC_coord_len read_len[CG_EVDNC_PLOIDY];
+    bool has_ref_offset[CG_EVDNC_ALLELE_LEN];
+    int32_t ref_offset[CG_EVDNC_ALLELE_LEN];
+    uint8_t ref_offset_type[CG_EVDNC_ALLELE_LEN];
+    bool has_mismatch[CG_EVDNC_ALLELE_LEN];
+    char mismatch[CG_EVDNC_ALLELE_LEN];
+    int64_t ref_id;
+    INSDC_coord_zero ref_start;
+    bool ref_orientation;
+    uint32_t mapq;
+
+} CGWriterEvdInt_match;
+
+struct CGWriterEvdInt {
+    const ReferenceMgr* rmgr;
+    const TableWriterAlgn* writer;
+    TableWriterAlgnData algn;
+    TEvidenceIntervalsData data;
+    CGWriterEvdInt_match match;
+    int64_t* dnbs_ids;
+    uint64_t dnbs_ids_max;
+};
+
+rc_t CGWriterEvdInt_Make(const CGWriterEvdInt** cself, TEvidenceIntervalsData** data,
+                         VDatabase* db, const ReferenceMgr* rmgr, const uint32_t options)
+{
+    rc_t rc = 0;
+    CGWriterEvdInt* self;
+
+    if( cself == NULL || db == NULL ) {
+        return RC(rcExe, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    self = calloc(1, sizeof(*self));
+    if( self == NULL ) {
+        rc = RC(rcExe, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+    } else {
+        if( (rc = TableWriterAlgn_Make(&self->writer, db, ewalgn_tabletype_EvidenceInterval, 0)) == 0 ) {
+            self->algn.read_start.buffer = &self->match.read_start;
+            self->algn.read_len.buffer = &self->match.read_len;
+            self->algn.has_ref_offset.buffer = self->match.has_ref_offset;
+            self->algn.ref_offset.buffer = self->match.ref_offset;
+            self->algn.ref_offset_type.buffer = self->match.ref_offset_type;
+            self->algn.has_mismatch.buffer = self->match.has_mismatch;
+            self->algn.mismatch.buffer = self->match.mismatch;
+            self->algn.ref_id.buffer = &self->match.ref_id;
+            self->algn.ref_id.elements = 1;
+            self->algn.ref_start.buffer = &self->match.ref_start;
+            self->algn.ref_start.elements = 1;
+            self->match.ref_orientation = false;
+            self->algn.ref_orientation.buffer = &self->match.ref_orientation;
+            self->algn.ref_orientation.elements = 1;
+            self->algn.mapq.buffer = &self->match.mapq;
+            self->algn.mapq.elements = 1;
+            self->algn.alingment_ids.buffer = self->dnbs_ids;
+            self->rmgr = rmgr;
+            *data = &self->data;
+        }
+    }
+    if( rc == 0 ) {
+        *cself = self;
+    } else {
+        CGWriterEvdInt_Whack(self, false, NULL);
+    }
+    return rc;
+}
+
+rc_t CGWriterEvdInt_Whack(const CGWriterEvdInt* cself, bool commit, uint64_t* rows)
+{
+    rc_t rc = 0;
+    if( cself != NULL ) {
+        CGWriterEvdInt* self = (CGWriterEvdInt*)cself;
+        rc = TableWriterAlgn_Whack(cself->writer, commit, rows);
+        free(self->dnbs_ids);
+        free(self);
+    }
+    return rc;
+}
+
+rc_t CGWriterEvdInt_Write(const CGWriterEvdInt* cself, const TEvidenceDnbsData* dnbs, int64_t* rowid)
+{
+    rc_t rc = 0;
+    CGWriterEvdInt* self = (CGWriterEvdInt*)cself;
+    
+    assert(cself != NULL);
+
+    memset(self->data.allele_indexes_to_read_number, 0, sizeof(self->data.allele_indexes_to_read_number));
+    if( self->data.ploidy == 1 ) {
+
+        uint32_t i = self->data.allele_indexes[0] - '0';
+
+        if( self->data.allele_indexes[1] != '\0' || i > 2 ) {
+            rc = RC(rcExe, rcFormatter, rcWriting, rcData, rcOutofrange);
+        } else if( self->data.allele_alignment_length[i] == 0 ) {
+            rc = RC(rcExe, rcFormatter, rcWriting, rcData, rcEmpty);
+        } else {
+            if( i == 0 ) {
+                rc = string_printf(self->data.allele_alignment[0], sizeof(self->data.allele_alignment[0]),
+                                   &self->data.allele_alignment_length[0], "%uM", self->data.length);
+            }
+            if( rc == 0 ) {
+                self->algn.ploidy = 0;
+                rc = ReferenceMgr_Compress(cself->rmgr, ewrefmgr_cmp_Exact, self->data.chr, self->data.offset, self->data.allele[i], self->data.allele_length[i],
+                                           self->data.allele_alignment[i], self->data.allele_alignment_length[i],
+                                           0, NULL, 0, 0, NULL, 0, NCBI_align_ro_intron_unknown, &self->algn);
+                self->data.allele_indexes_to_read_number[i] = 1; /* 1st read */
+            }
+        }
+
+    } else if( self->data.ploidy == 2 ) {  /** possibilities: 0;1 1;2 and 1;1 - single ploidy but recorded as dual **/
+        uint32_t i1 = self->data.allele_indexes[0] - '0';
+        uint32_t i2 = self->data.allele_indexes[2] - '0';
+
+        if( self->data.allele_indexes[1] != ';' || self->data.allele_indexes[3] != '\0' || i1 > 2 || i2 > 2) {
+            rc = RC(rcExe, rcFormatter, rcWriting, rcData, rcOutofrange);
+        } else {
+            if( i1 == 0 || i2 == 0 ) {
+                rc = string_printf(self->data.allele_alignment[0], sizeof(self->data.allele_alignment[0]),
+                                   &self->data.allele_alignment_length[0], "%uM", self->data.length);
+            }
+            if( self->data.allele_alignment_length[i1] == 0 || self->data.allele_alignment_length[i2] == 0 ) {
+                rc = RC(rcExe, rcFormatter, rcWriting, rcData, rcEmpty);
+            }
+            if( rc == 0 ) {
+                self->algn.ploidy = 0;
+                rc = ReferenceMgr_Compress(cself->rmgr, ewrefmgr_cmp_Exact, self->data.chr, self->data.offset, self->data.allele[i1], self->data.allele_length[i1],
+                                           self->data.allele_alignment[i1], self->data.allele_alignment_length[i1],
+                                           0, NULL, 0, 0, NULL, 0, NCBI_align_ro_intron_unknown, &self->algn);
+                self->data.allele_indexes_to_read_number[i1] = 1; /* 1st read */
+            }
+            if( rc == 0 ) {
+		if ( i2 != i1 ) {
+			rc = ReferenceMgr_Compress(cself->rmgr, ewrefmgr_cmp_Exact, self->data.chr, self->data.offset, self->data.allele[i2], self->data.allele_length[i2],
+                                           self->data.allele_alignment[i2], self->data.allele_alignment_length[i2],
+                                           0, NULL, 0, 0, NULL, 0, NCBI_align_ro_intron_unknown, &self->algn);
+			self->data.allele_indexes_to_read_number[i2] = 2; /* 2nd read */
+		} else {
+			self->data.ploidy = 1;
+		}
+            }
+        }
+
+    }  else if( self->data.ploidy == 3 ) { /** possibilities: 0;1;2 1;2;3 **/
+        uint32_t i1 = self->data.allele_indexes[0] - '0';
+        uint32_t i2 = self->data.allele_indexes[2] - '0';
+        uint32_t i3 = self->data.allele_indexes[4] - '0';
+
+
+        if( self->data.allele_indexes[1] != ';'  || self->data.allele_indexes[3] != ';' || self->data.allele_indexes[5] != '\0' || i1 > 3 || i2 > 3 || i3 > 3) {
+            rc = RC(rcExe, rcFormatter, rcWriting, rcData, rcOutofrange);
+        } else {
+            if( i1 == 0 || i2 == 0 || i3 == 0) {
+                rc = string_printf(self->data.allele_alignment[0], sizeof(self->data.allele_alignment[0]),
+                                   &self->data.allele_alignment_length[0], "%uM", self->data.length);
+            }
+            if( self->data.allele_alignment_length[i1] == 0 || self->data.allele_alignment_length[i2] == 0 || self->data.allele_alignment_length[i3]==0) {
+                rc = RC(rcExe, rcFormatter, rcWriting, rcData, rcEmpty);
+            }
+            if( rc == 0 ) {
+                self->algn.ploidy = 0;
+                rc = ReferenceMgr_Compress(cself->rmgr, ewrefmgr_cmp_Exact, self->data.chr, self->data.offset, self->data.allele[i1], self->data.allele_length[i1],
+                                           self->data.allele_alignment[i1], self->data.allele_alignment_length[i1],
+                                           0, NULL, 0, 0, NULL, 0, NCBI_align_ro_intron_unknown, &self->algn);
+                self->data.allele_indexes_to_read_number[i1] = 1; /* 1st read */
+            }
+            if( rc == 0 ) {
+                rc = ReferenceMgr_Compress(cself->rmgr, ewrefmgr_cmp_Exact, self->data.chr, self->data.offset, self->data.allele[i2], self->data.allele_length[i2],
+                                           self->data.allele_alignment[i2], self->data.allele_alignment_length[i2],
+                                           0, NULL, 0, 0, NULL, 0, NCBI_align_ro_intron_unknown, &self->algn);
+                self->data.allele_indexes_to_read_number[i2] = 2; /* 2nd read */
+            }
+            if( rc == 0 ) {
+                rc = ReferenceMgr_Compress(cself->rmgr, ewrefmgr_cmp_Exact, self->data.chr, self->data.offset, self->data.allele[i3], self->data.allele_length[i3],
+                                           self->data.allele_alignment[i3], self->data.allele_alignment_length[i3],
+                                           0, NULL, 0, 0, NULL, 0, NCBI_align_ro_intron_unknown, &self->algn);
+                self->data.allele_indexes_to_read_number[i3] = 3; /* 3rd read */
+            }
+        }
+
+    } else {
+        rc = RC(rcExe, rcFormatter, rcWriting, rcData, rcUnrecognized);
+    }
+    if( rc == 0 ) { /*** a bit careful here - were are predicting what EvidenceDnb writer will do ***/
+	uint32_t i,valid_qty;
+	for(valid_qty = i = 0;i< dnbs->qty;i++){
+		if(self->data.allele_indexes_to_read_number[dnbs->dnbs[i].allele_index] > 0){
+			valid_qty++;
+		}
+	}
+        if( self->dnbs_ids_max < valid_qty ) {
+            void* p = realloc(self->dnbs_ids, sizeof(*(self->dnbs_ids)) * valid_qty);
+            if( p == NULL ) {
+                rc = RC(rcExe, rcFormatter, rcWriting, rcMemory, rcExhausted);
+            } else {
+                self->dnbs_ids = p;
+                self->dnbs_ids_max = valid_qty;
+                self->algn.alingment_ids.buffer = self->dnbs_ids;
+            }
+        }
+        if( rc == 0 ) {
+            self->algn.alingment_ids.elements = valid_qty;
+	    for(i=0;i<valid_qty;i++){
+		self->dnbs_ids[i] = dnbs->last_rowid + i;
+            }
+        }
+    }
+    if( rc == 0 ) {
+        self->match.mapq = self->data.score;
+        rc = TableWriterAlgn_Write(self->writer, &self->algn, rowid);
+    }
+    return rc;
+}
diff --git a/tools/cg-load/writer-evidence-intervals.h b/tools/cg-load/writer-evidence-intervals.h
new file mode 100644
index 0000000..7a8f586
--- /dev/null
+++ b/tools/cg-load/writer-evidence-intervals.h
@@ -0,0 +1,68 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_cg_load_writer_evidence_intervals
+#define _tools_cg_load_writer_evidence_intervals
+
+#include <vdb/database.h>
+#include <vdb/manager.h>
+#include <insdc/insdc.h>
+
+#include "defs.h"
+#include <align/writer-alignment.h>
+#include <align/writer-reference.h>
+
+typedef struct TEvidenceIntervalsData {
+    char interval_id[CG_EVDNC_INTERVALID_LEN];
+    char chr[CG_CHROMOSOME_NAME];
+    INSDC_coord_zero offset;
+    INSDC_coord_len length;
+    uint16_t ploidy;
+    char allele_indexes[16];
+    /* translation from allele_indexes into read id for use in dnbs */
+    uint8_t allele_indexes_to_read_number[CG_EVDNC_ALLELE_NUM];
+    int32_t score;
+    int32_t scoreVAF;
+    int32_t scoreEAF;
+    char allele[CG_EVDNC_ALLELE_NUM][CG_EVDNC_ALLELE_LEN];
+    /* strlen for allele[3][] buffers */
+    size_t allele_length[CG_EVDNC_ALLELE_NUM];
+    char allele_alignment[CG_EVDNC_ALLELE_NUM][CG_EVDNC_ALLELE_CIGAR_LEN];
+    /* strlen for allele_alignment[3][] buffers */
+    size_t allele_alignment_length[CG_EVDNC_ALLELE_NUM];
+} TEvidenceIntervalsData;
+
+typedef struct CGWriterEvdInt CGWriterEvdInt;
+
+struct TEvidenceDnbsData;
+
+rc_t CGWriterEvdInt_Make(const CGWriterEvdInt** cself, TEvidenceIntervalsData** data,
+                         VDatabase* db, const ReferenceMgr* rmgr, const uint32_t options);
+
+rc_t CGWriterEvdInt_Whack(const CGWriterEvdInt* cself, bool commit, uint64_t* rows);
+
+rc_t CGWriterEvdInt_Write(const CGWriterEvdInt* cself, const struct TEvidenceDnbsData* dnbs, int64_t* rowid);
+
+#endif /* _tools_cg_load_writer_evidence_intervals */
diff --git a/tools/cg-load/writer-seq.c b/tools/cg-load/writer-seq.c
new file mode 100644
index 0000000..c936fbc
--- /dev/null
+++ b/tools/cg-load/writer-seq.c
@@ -0,0 +1,155 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "debug.h"
+#include "defs.h"
+#include "writer-seq.h"
+
+#include <insdc/insdc.h>
+
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include <sysalloc.h>
+
+#include <assert.h>
+#include <stdlib.h>
+
+const INSDC_SRA_platform_id DFTL_platform = SRA_PLATFORM_COMPLETE_GENOMICS;
+const char DFTL_label[] = "LeftRight";
+const INSDC_coord_zero DFTL_label_start[CG_READS_NREADS] = {0, 4};
+const INSDC_coord_len DFTL_label_len[CG_READS_NREADS] =    {4, 5};
+
+INSDC_coord_zero DFTL_read_start[CG_READS_NREADS] =  {0, 35};
+INSDC_coord_len  DFTL_read_len  [CG_READS_NREADS] = {35, 35};
+
+const INSDC_SRA_read_filter DFTL_read_filter[CG_READS_NREADS] =  {SRA_READ_FILTER_PASS, SRA_READ_FILTER_PASS};
+
+struct CGWriterSeq {
+    const TableWriterSeq* base;
+    TReadsData data;
+};
+
+rc_t CGWriterSeq_Make(const CGWriterSeq** cself,
+    TReadsData** data, VDatabase* db, const uint32_t options,
+    const char* quality_quantization, uint32_t read_len)
+{
+    rc_t rc = 0;
+    CGWriterSeq* self;
+
+    assert(read_len == CG_READS15_SPOT_LEN / 2
+        || read_len == CG_READS25_SPOT_LEN / 2);
+
+    if( cself == NULL || db == NULL ) {
+        return RC(rcExe, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    self = calloc(1, sizeof(*self));
+    if( self == NULL ) {
+        rc = RC(rcExe, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+    } else {
+        TableWriterData p;
+        p.buffer = &DFTL_platform;
+        p.elements = 1;
+        if( (rc = TableWriterSeq_Make(&self->base, db, options | ewseq_co_AlignData | ewseq_co_SpotGroup, quality_quantization)) != 0 ) {
+            LOGERR(klogErr, rc, "sequence table");
+        }
+        else if ((rc =
+            TableWriteSeq_WriteDefault(self->base, ewseq_cn_PLATFORM, &p)) == 0)
+        {
+            int i = 0;
+            for (i = 0; i < CG_READS_NREADS; ++i) {
+                DFTL_read_len[i] = read_len;
+            }
+            DFTL_read_start[1] = read_len;
+
+            /* attach data pointer to data */
+            self->data.seq.nreads = CG_READS_NREADS;
+            self->data.seq.alignment_count.buffer = self->data.align_count;
+            self->data.seq.alignment_count.elements = CG_READS_NREADS;
+            self->data.seq.primary_alignment_id.buffer = self->data.prim_algn_id;
+            self->data.seq.primary_alignment_id.elements = CG_READS_NREADS;
+            self->data.seq.sequence.buffer = self->data.read;
+            self->data.seq.quality.buffer = self->data.qual;
+            self->data.seq.label.buffer = DFTL_label;
+            self->data.seq.label.elements = sizeof(DFTL_label) - 1;
+            self->data.seq.label_start.buffer = DFTL_label_start;
+            self->data.seq.label_start.elements = CG_READS_NREADS;
+            self->data.seq.label_len.buffer = DFTL_label_len;
+            self->data.seq.label_len.elements = CG_READS_NREADS;
+            self->data.seq.read_type.buffer = self->data.read_type;
+            self->data.seq.read_type.elements = CG_READS_NREADS;
+            self->data.seq.read_start.buffer = DFTL_read_start;
+            self->data.seq.read_start.elements = CG_READS_NREADS;
+            self->data.seq.read_len.buffer = DFTL_read_len;
+            self->data.seq.read_len.elements = CG_READS_NREADS;
+            self->data.seq.read_filter.buffer = DFTL_read_filter;
+            self->data.seq.read_filter.elements = CG_READS_NREADS;
+
+            /* set to 1st row for aligment to refer */
+            self->data.rowid = 1;
+            *data = &self->data;
+        }
+    }
+    if( rc == 0 ) {
+        *cself = self;
+    } else {
+        CGWriterSeq_Whack(self, false, NULL);
+    }
+    return rc;
+}
+
+rc_t CGWriterSeq_Whack(const CGWriterSeq* cself, bool commit, uint64_t* rows)
+{
+    rc_t rc = 0;
+    if( cself != NULL ) {
+        CGWriterSeq* self = (CGWriterSeq*)cself;
+        rc = TableWriterSeq_Whack(cself->base, commit, rows);
+        free(self);
+    }
+    return rc;
+}
+
+rc_t CGWriterSeq_Write(const CGWriterSeq* cself)
+{
+    uint64_t i;
+    int64_t r;
+    rc_t rc;
+    INSDC_quality_phred* b;
+    CGWriterSeq* self = (CGWriterSeq*)cself;
+
+    assert(cself != NULL);
+
+    b = (INSDC_quality_phred*)(self->data.seq.quality.buffer);
+    for(i = 0; i < cself->data.seq.quality.elements; i++ ) {
+        b[i] -= 33;
+    }
+    for(i = 0; i < CG_READS_NREADS; i++) {
+        self->data.read_type[i] = SRA_READ_TYPE_BIOLOGICAL |
+            (cself->data.prim_is_reverse[i] ? SRA_READ_TYPE_REVERSE : SRA_READ_TYPE_FORWARD);
+    }
+    rc = TableWriterSeq_Write(cself->base, &cself->data.seq, &r);
+    return rc ? rc : (self->data.rowid++ == r ? 0 : RC(rcExe, rcTable, rcWriting, rcData, rcInconsistent));
+}
diff --git a/tools/cg-load/writer-seq.h b/tools/cg-load/writer-seq.h
new file mode 100644
index 0000000..5cc899e
--- /dev/null
+++ b/tools/cg-load/writer-seq.h
@@ -0,0 +1,62 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_cg_load_writer_seq_h_
+#define _tools_cg_load_writer_seq_h_
+
+#include <insdc/insdc.h>
+#include <vdb/database.h>
+#include <sra/sradb.h>
+#include <align/writer-sequence.h>
+
+typedef struct TReadsData_struct {
+    uint32_t reads_format;
+
+    uint16_t flags;
+    char read[CG_READS15_SPOT_LEN + 1];
+    char qual[CG_READS15_SPOT_LEN + 1];
+
+    /* reverse read cache by half-dnb */
+    INSDC_dna_text reverse[CG_READS15_SPOT_LEN];
+
+    TableWriterSeqData seq;
+    int64_t rowid;
+    uint8_t align_count[CG_READS_NREADS];
+    int64_t prim_algn_id[CG_READS_NREADS];
+    bool prim_is_reverse[CG_READS_NREADS];
+    SRAReadTypes read_type[CG_READS_NREADS];
+} TReadsData;
+
+typedef struct CGWriterSeq CGWriterSeq;
+
+rc_t CGWriterSeq_Make(const CGWriterSeq** cself,
+    TReadsData** data, VDatabase* db, const uint32_t options,
+    const char* quality_quantization, uint32_t read_len);
+
+rc_t CGWriterSeq_Whack(const CGWriterSeq* cself, bool commit, uint64_t* rows);
+
+rc_t CGWriterSeq_Write(const CGWriterSeq* cself);
+
+#endif /* _tools_cg_load_writer_seq_h_ */
diff --git a/tools/copycat/Makefile b/tools/copycat/Makefile
new file mode 100644
index 0000000..985c064
--- /dev/null
+++ b/tools/copycat/Makefile
@@ -0,0 +1,100 @@
+# ==============================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/copycat
+
+INT_TOOLS =
+
+EXT_TOOLS = copycat
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+ifeq (1,$(HAVE_MAGIC))
+
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+else
+
+all std: $(ALL_TOOLS)
+
+$(ALL_TOOLS):
+	@ echo "NOTE - $(@F) cannot be built:"                          \
+	       "It requires our internal library 'libkff'"              \
+	       "which requires 'libmagic' and its development headers."
+endif
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# copycat
+#  Copy files from one directory to another while cataloging the contents.
+#  XML files can be redirected as well.
+#
+COPYCAT_SRC = \
+	copycat \
+	ccfileformat \
+	cccat \
+	cctree \
+	cctree-dump \
+	cctar  \
+	ccsra \
+	ccsubchunk \
+	ccfile
+
+COPYCAT_OBJ = \
+	$(addsuffix .$(OBJX),$(COPYCAT_SRC))
+
+COPYCAT_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-vdb \
+	-skff \
+	-smagic-static
+
+
+$(BINDIR)/copycat: $(COPYCAT_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(COPYCAT_LIB)
+	@ cp $(SRCDIR)/magic $(BINDIR)
diff --git a/tools/copycat/ccbuffer.c b/tools/copycat/ccbuffer.c
new file mode 100644
index 0000000..b628c2b
--- /dev/null
+++ b/tools/copycat/ccbuffer.c
@@ -0,0 +1,153 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <assert.h>
+#include <atomic.h>
+#include <stdlib.h>
+
+
+/* #include <os-native.h> */
+
+/* #include <klib/rc.h> */
+/* #include <kapp/main.h> */
+/* #include <kcont/queue.h> */
+
+#include "copycat-priv.h"
+
+/* ==========
+ * Buffer is a generic buffer to be used to pass data between co-routines or 
+ * threads.
+ */
+struct Buffer
+{
+    /* standard SRA tool kit type reference counter: zero when free and 
+     * in the queue of the BufferMgr */
+    atomic32_t	refcount;
+    /* keep track of manager - by adding a reference when allocated it keeps
+     * the manager alive long enough to free all buffers */
+    BufferMgr *	mgr;
+    /* how large is the payload for the buffer */
+    size_t	payload_size;
+    /* how large is the content of the payload? */
+    size_t	payload_content;
+    /* the payload of the packet is the rest of the packet (and not normally 
+     * a single byte) */
+    char	payload [1];
+};
+
+/* ----------
+ * Constructor/initializer for a buffer: called only from a BufferMgr
+ * Return: rc_t
+ *  buff          pointer to a pointer to hold a reference to the new Buffer
+ *  payload_size  how large to make the data portion of the Buffer
+ *  mgr           a reference back to the manager that will control this buffer
+ */
+rc_t BufferMake (Buffer ** buff, size_t payload_size, BufferMgr * mgr)
+{
+    Buffer * self = NULL;
+    rc_t rc = 0;
+
+    assert (mgr != NULL);
+
+    self = malloc (payload_size + sizeof (Buffer) - 1);
+    if (self == NULL)
+    {
+	rc = RC (rcExe, rcBuffer, rcAllocating, rcMemory, rcExhausted);
+    }
+    else
+    {
+	/* non-standard for SRA Toolkit; refcount is 0 while not allocated */
+	atomic32_set (&self->refcount, 0);
+	self->mgr = mgr;
+	self->payload_size = payload_size;
+	self->payload_content = 0;
+    }
+    *buff = self;
+    return rc;
+}
+
+rc_t BufferAddRef (const Buffer * self)
+{
+    if (self != NULL)
+	atomic32_inc (&((Buffer*)self)->refcount);
+    return 0;
+}
+
+rc_t BufferRelease (const Buffer * cself)
+{
+    Buffer * self = (Buffer *)cself;
+    rc_t rc = 0;
+
+    if (self != NULL)
+    {
+	if (atomic32_dec_and_test (&self->refcount))
+	{
+	    if (self->mgr == NULL)
+		free (self);
+	    else
+	    {
+		/* refcount reaching 0 means to put back in the free_q for the BufferMgr */
+		rc = BufferMgrPutBuffer (self->mgr, self, NULL);
+
+		/* if failed return ownership to last releaser */
+		if (rc != 0)
+		    atomic32_set (&self->refcount, 1);
+	    }
+	}
+    }
+    return rc;
+}
+
+size_t BufferPayloadGetSize (const Buffer * self)
+{
+    assert (self != NULL);
+    return self->payload_size;
+}
+size_t BufferContentGetSize (const Buffer * self)
+{
+    assert (self != NULL);
+    return self->payload_content;
+}
+rc_t BufferContentSetSize (Buffer * self, size_t z)
+{
+    rc_t rc = 0;
+    assert (self != NULL);
+    assert (z <= self->payload_size);
+    self->payload_content = z;
+    return rc;
+}
+/* is it too redundant to have a read and write version? */
+const void * BufferPayload (const Buffer * self)
+{
+    assert (self != NULL);
+    return (const void*)self->payload;
+}
+void * BufferPayloadWrite (Buffer * self)
+{
+    assert (self != NULL);
+    return (void*)self->payload;
+}
+
diff --git a/tools/copycat/ccbuffermgr.c b/tools/copycat/ccbuffermgr.c
new file mode 100644
index 0000000..8323929
--- /dev/null
+++ b/tools/copycat/ccbuffermgr.c
@@ -0,0 +1,234 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <stdlib.h>
+#include <assert.h>
+
+#include <atomic.h>
+/* #include <os-native.h> */
+
+/* #include <klib/rc.h> */
+/* #include <kapp/main.h> */
+#include <kcont/queue.h>
+#include <kapp/log.h>
+
+#include "copycat-priv.h"
+
+/* ==========
+ * BufferMgr
+ */
+struct BufferMgr
+{
+    atomic32_t	refcount;
+    uint32_t	timeout;
+    KQueue *	free_q;
+};
+
+
+/* Standard SRA type constructor:
+ * construction of the manager also creates the buffers per specification in the parameters
+ *  buffmgr    where to put a reference to the new BufferMgr
+ *  buffcount  how many Buffers to make as well
+ *  buffsize   how large a payload is desired for the Buffers
+ *  timeout    number of milliseconds of wait time for the operations for this BufferMgr
+ */
+rc_t BufferMgrMake (BufferMgr ** buffmgr, uint32_t buffcount, size_t buffsize, uint32_t timeout)
+{
+    rc_t rc = 0;
+    BufferMgr * self;
+
+    *buffmgr = NULL;
+    self = malloc ( sizeof * self );
+
+    if ( self == NULL)
+    {
+	rc = RC (rcExe, rcBuffer, rcAllocating, rcMemory, rcExhausted);
+	LOGERR (klogErr, rc, "BufferMgrMake: error allocating for buffer manager");
+    }
+    else
+    {
+	atomic32_set (&self->refcount, 1);
+	self->timeout = timeout; /* default timeout */
+	rc = KQueueMake (&self->free_q, buffcount);
+
+	if (rc != 0)
+	    LOGERR (klogErr, rc, "BufferMgrMake: error making KQueue");
+	else
+	{
+	    uint32_t ix;
+	    union
+	    {
+		Buffer * b;
+		void * v;
+	    } bp;
+	    timeout_t tm;
+
+	    for (ix = 0; ix < buffcount; ++ix)
+	    {
+		bp.v = NULL;
+		rc = TimeoutInit (&tm, timeout);
+
+		if (rc == 0)
+		{
+		    rc = BufferMake (&bp.b, buffsize, self);
+		    if (rc == 0)
+		    {
+			rc = KQueuePush (self->free_q, bp.v, &tm);
+			if (rc != 0)
+			    free (bp.v);
+		    }
+		    if (rc != 0)
+			break;
+		}
+	    }
+	    if (ix == buffcount)
+	    {
+		atomic32_set (&self->refcount, 1);
+		*buffmgr = self;
+		return 0;
+	    }
+	    else
+	    {
+		/* failure so undo all */
+		rc_t rc_sub = 0;
+
+		while (rc_sub)
+		{
+		    rc_sub = TimeoutInit (&tm, timeout);
+		    if (rc_sub == 0)
+		    {
+			rc_sub = KQueuePop (self->free_q, &bp.v, &tm);
+			if (rc_sub == 0)
+			    if (bp.v != NULL)
+				free (bp.v);
+		    }
+		}
+	    }	
+	    KQueueRelease (self->free_q);
+	}
+	free (self);
+    }
+    return rc;
+}
+
+rc_t BufferMgrAddRef (const BufferMgr * self)
+{
+    if (self != NULL)
+	atomic32_inc (&((BufferMgr*)self)->refcount);
+    return 0;
+}
+
+rc_t BufferMgrRelease (BufferMgr *self)
+{
+    rc_t rc = 0;
+    void * bp;
+    timeout_t tm;
+    if ( self != NULL )
+    {
+        if ( atomic32_dec_and_test (&self->refcount))
+        {
+	    /* release all allocated buffers here */
+	    while (rc)
+	    {
+		rc = TimeoutInit (&tm, self->timeout);
+		if (rc == 0)
+		{
+		    rc = KQueuePop (self->free_q, &bp, &tm);
+		    if (rc == 0)
+			if (bp != NULL)
+			    free (bp);
+		}
+	    }
+	    if (rc == 0)
+		free (self);
+        }
+    }
+    return rc;
+}
+rc_t BufferMgrPutBuffer (BufferMgr * self, Buffer * buff, timeout_t * tm)
+{
+    rc_t rc = 0;
+    timeout_t t;
+
+    assert (self != NULL);
+    assert (buff != NULL);
+
+    if (tm == NULL)
+    {
+	tm = &t;
+	rc = TimeoutInit (tm, self->timeout);
+    }
+
+    if (rc == 0)
+    {
+	rc = KQueuePush (self->free_q, buff, tm);
+	if (rc == 0)
+	{
+	    /* take ownership of the buffer removing keep alive reference */
+	    BufferMgrRelease (self);
+	}
+    }
+    if (rc != 0)
+	/* assign ownership back to the caller */
+	BufferAddRef(buff);
+
+    return rc;
+}
+rc_t BufferMgrGetBuffer (BufferMgr * self, Buffer ** buff, timeout_t * tm)
+{
+    rc_t rc = 0, orc;
+    timeout_t t;
+    void * bp;
+
+    assert (self != NULL);
+    assert (buff != NULL);
+
+    if (tm == NULL)
+    {
+	tm = &t;
+	rc = TimeoutInit (tm, self->timeout);
+    }
+
+    if (rc == 0)
+    {
+	*buff = NULL;
+
+	rc = KQueuePop (self->free_q, &bp, tm);
+	if (rc == 0)
+	{
+	    /* add a keep alive reference to the buffer */
+	    rc = BufferMgrAddRef (self);
+            if (rc)
+                LOGERR (klogInt, rc, "Error adding reference to buffer manager");
+            else
+                *buff = bp;
+
+	    rc = BufferAddRef(*buff);
+            if (orc)
+                LOGERR (klogInt, rc, "Error adding reference to a buffer");
+	}
+    }
+    return rc;
+}
diff --git a/tools/copycat/ccbufferq.c b/tools/copycat/ccbufferq.c
new file mode 100644
index 0000000..0d3b4cb
--- /dev/null
+++ b/tools/copycat/ccbufferq.c
@@ -0,0 +1,175 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <stdlib.h>
+#include <assert.h>
+
+#include <atomic.h>
+#include <os-native.h>
+
+#include <klib/rc.h>
+#include <kapp/log.h>
+#include <kcont/queue.h>
+
+#include "copycat-priv.h"
+
+
+
+struct BufferQ
+{
+    atomic32_t	refcount;	/* how many references to this object */
+    uint32_t	timeout;	/* default timeout in millisecs */
+    KQueue *	q;		/* The underlying thread safe queue */
+};
+
+rc_t BufferQAddRef (const BufferQ * self)
+{
+    if (self != NULL)
+	atomic32_inc (&((BufferQ*)self)->refcount);
+    return 0;
+}
+
+rc_t BufferQRelease (const BufferQ *cself)
+{
+    BufferQ * self  = (BufferQ*)cself;
+    rc_t rc = 0;
+    if ( self != NULL )
+    {
+        if ( atomic32_dec_and_test (&self->refcount))
+        {
+	    const Buffer * b;
+	    while (rc == 0)
+	    {
+		rc = BufferQPopBuffer (self, &b, NULL);
+		BufferRelease (b);
+	    }
+/* this might need rework especially if KQueue changes */
+	    if ((GetRCState(rc) == rcExhausted) && (GetRCObject(rc) == rcTimeout))
+		rc = 0;
+	    if (rc == 0)
+	    {
+		rc = KQueueRelease (self->q);
+		if (rc == 0)
+		{
+		    free (self);
+		    return 0;
+		}
+	    }
+	    atomic32_inc (&((BufferQ*)self)->refcount);
+        }
+    }
+    return rc;
+}
+
+
+rc_t BufferQMake (BufferQ ** q, uint32_t timeout, uint32_t length)
+{
+    rc_t rc = 0;
+    BufferQ * self;
+
+    assert (q != NULL);
+
+    self = malloc (sizeof * self);
+    if (self == NULL)
+	rc = RC (rcExe, rcQueue, rcAllocating, rcMemory, rcExhausted);
+    else
+    {
+	rc = KQueueMake (&self->q, length);
+	if (rc == 0)
+	{
+	    self->timeout = timeout;
+	    atomic32_set (&self->refcount, 1);
+	    *q = self;
+	}
+    }
+
+    return rc;
+}
+
+rc_t BufferQPushBuffer (BufferQ * self, const Buffer * buff, timeout_t * tm)
+{
+    rc_t rc = 0;
+    timeout_t t;
+
+    assert (self != NULL);
+    assert (buff != NULL);
+
+    if (tm == NULL)	/* do we need the default timeout? */
+    {
+	tm = &t;
+	rc = TimeoutInit (tm, self->timeout);
+    }
+
+    if (rc == 0)
+    {
+	rc = KQueuePush (self->q, buff, tm);
+	if (rc == 0)
+	{
+	    /* share ownership of the buffer removing keep alive reference */
+	    rc = BufferAddRef (buff);
+	}
+    }
+
+    return rc;
+}
+rc_t BufferQPopBuffer (BufferQ * self, const Buffer ** buff, timeout_t * tm)
+{
+    rc_t rc = 0;
+    timeout_t t;
+    void * p;
+    LOGMSG (klogDebug10, "BufferQPopBuffer");
+    assert (self != NULL);
+    assert (buff != NULL);
+
+    if (tm == NULL)
+    {
+	LOGMSG (klogDebug10, "BufferQPopBuffer tm was NULL");
+	tm = &t;
+	rc = TimeoutInit (tm, self->timeout);
+    }
+
+    if (rc == 0)
+    {
+	LOGMSG (klogDebug10, "BufferQPopBuffer call KQueuePop");
+	rc = KQueuePop (self->q, &p, tm);
+	PLOGMSG (klogDebug10, "BufferQPopBuffer back from KQueuePop $(rc)", PLOG_U32(rc), rc);
+	if (rc == 0)
+	    *buff = p;
+	else
+	{
+	    *buff = NULL;
+	}
+    }
+    LOGMSG (klogDebug10, "leave BufferQPopBuffer");
+    return rc;
+}
+rc_t BufferQSeal (BufferQ * self)
+{
+    return KQueueSeal (self->q);
+}
+bool BufferQSealed (BufferQ *self)
+{
+    return KQueueSealed (self->q);
+}
diff --git a/tools/copycat/cccat.c b/tools/copycat/cccat.c
new file mode 100644
index 0000000..f86c6bf
--- /dev/null
+++ b/tools/copycat/cccat.c
@@ -0,0 +1,1797 @@
+/*===========================================================================
+ *
+ *                            Public DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "copycat-priv.h"
+#include "cctree-priv.h"
+
+#include <vfs/path.h>
+#include <vfs/path-priv.h>
+#include <krypto/key.h>
+#include <krypto/encfile.h>
+#include <krypto/encfile-priv.h>
+#include <krypto/wgaencrypt.h>
+#include <kfs/kfs-priv.h>
+#include <kfs/file.h>
+#include <kfs/teefile.h>
+#include <kfs/gzip.h>
+#include <kfs/bzip.h>
+#include <kfs/md5.h>
+#include <kfs/countfile.h>
+#include <kfs/readheadfile.h>
+#include <kfs/buffile.h>
+#include <kfs/crc.h>
+#include <klib/checksum.h>
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <klib/text.h>
+
+#include <os-native.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+/* make it last include */
+#include "debug.h"
+
+#define EXAMINE_KAR_FILES 0
+#define DECRYPT_FAIL_AS_PLAIN_FILE 0
+/* the readhead file isn't working yet */
+#define USE_KBUFFILE 1
+
+static
+const VPath * src_path = NULL;
+
+static
+const VPath * dst_path = NULL;
+
+static
+bool do_encrypt = false;
+static
+bool do_decrypt = false;
+static
+bool wga_pw_read = false;
+static
+bool src_pw_read = false;
+static
+bool dst_pw_read = false;
+
+static
+char wga_pwd [256];
+static
+char src_pwd [256];
+static
+char dst_pwd [256];
+
+static
+size_t wga_pwd_sz;
+static
+size_t src_pwd_sz;
+static
+size_t dst_pwd_sz;
+
+static
+KKey src_key;
+
+static
+KKey dst_key;
+
+static
+KDirectory * cwd = NULL;
+
+
+static
+rc_t get_password (const VPath * path, char * pw, size_t pwz, size_t * num_read, KKey * key, bool * read)
+{
+    const KFile * pwfile;
+    size_t z;
+    rc_t rc;
+    char obuff [8096];
+
+    if (VPathOption (path, vpopt_encrypted, obuff, sizeof obuff, &z) == 0)
+    {
+        if (VPathOption (path, vpopt_pwpath, obuff, sizeof obuff, &z) == 0)
+            rc = KDirectoryOpenFileRead (cwd, &pwfile, "%s", obuff);
+
+        else if (VPathOption (path, vpopt_pwfd, obuff, sizeof obuff, &z) == 0)
+            rc = KFileMakeFDFileRead (&pwfile, atoi (obuff));
+
+        else
+            rc = RC (rcExe, rcPath, rcAccessing, rcParam, rcUnsupported);
+        if (rc == 0)
+        {
+            rc = KFileRead (pwfile, 0, pw, pwz, num_read);
+
+            if (rc == 0)
+            {
+                char * pc;
+
+                if (*num_read < pwz)
+                    pw[*num_read] = '\0';
+
+                pc = string_chr (pw, *num_read, '\r');
+                if (pc)
+                {
+                    *pc = '\0';
+                    *num_read = pc - pw;
+                }
+
+                pc = string_chr (pw, *num_read, '\n');
+                if (pc)
+                {
+                    *pc = '\0';
+                    *num_read = pc - pw;
+                }
+
+                *read = true;
+                rc = KKeyInitRead (key, kkeyAES128, pw, *num_read);
+            }
+
+            KFileRelease (pwfile);
+        }
+    }
+    else
+        rc = RC (rcExe, rcPath, rcAccessing, rcFunction, rcNotFound);
+    return rc;
+}
+
+
+static
+rc_t wga_password (const VPath * path, char * pw, size_t pwz, size_t * num_read, bool * read)
+{
+    const KFile * pwfile;
+    size_t z;
+    rc_t rc;
+    char obuff [8096];
+
+    if (VPathOption (path, vpopt_encrypted, obuff, sizeof obuff, &z) == 0)
+    {
+        if (VPathOption (path, vpopt_pwpath, obuff, sizeof obuff, &z) == 0)
+            rc = KDirectoryOpenFileRead (cwd, &pwfile, "%s", obuff);
+
+        else if (VPathOption (path, vpopt_pwfd, obuff, sizeof obuff, &z) == 0)
+            rc = KFileMakeFDFileRead (&pwfile, atoi (obuff));
+
+        else
+            rc = RC (rcExe, rcPath, rcAccessing, rcParam, rcUnsupported);
+        if (rc == 0)
+        {
+            rc = KFileRead (pwfile, 0, pw, pwz, num_read);
+
+            if (rc == 0)
+            {
+                char * pc;
+
+                if (*num_read < pwz)
+                    pw[*num_read] = '\0';
+
+                pc = string_chr (pw, *num_read, '\r');
+                if (pc)
+                {
+                    *pc = '\0';
+                    *num_read = pc - pw;
+                }
+
+                pc = string_chr (pw, *num_read, '\n');
+                if (pc)
+                {
+                    *pc = '\0';
+                    *num_read = pc - pw;
+                }
+
+                *read = true;
+            }
+
+            KFileRelease (pwfile);
+        }
+    }
+    else
+        rc = RC (rcExe, rcPath, rcAccessing, rcFunction, rcNotFound);
+    return rc;
+}
+
+
+/*--------------------------------------------------------------------------
+ * copycat
+ */
+static
+rc_t ccat_cache ( CCCachedFileNode **np, const KFile *sf,
+                  enum CCType ntype, CCFileNode *node, const char *name )
+{
+    rc_t rc;
+    KFile *out;
+
+    /* create path */
+    char path [ 256 ];
+    int len = snprintf ( path, sizeof path, "%s", name );
+
+    DEBUG_STATUS (("%s: name '%s'\n", __func__, name));
+
+    if ( len < 0 || len >= sizeof path )
+        return RC ( rcExe, rcFile, rcWriting, rcPath, rcExcessive );
+
+    /* look for a name that has not yet been written */
+    if ( CCTreeFind ( ctree, path ) != NULL )
+    {
+        uint32_t i;
+        const char *ext = strrchr ( name, '.' );
+        if ( ext != NULL )
+        {
+            for ( i = 2; ; ++ i )
+            {
+                len = snprintf ( path, sizeof path, "%.*s-%u%s", ( int ) ( ext - name ), name, i, ext );
+                if ( len < 0 || len >= sizeof path )
+                    return RC ( rcExe, rcFile, rcWriting, rcPath, rcExcessive );
+                if ( CCTreeFind ( ctree, path ) == NULL )
+                    break;
+            }
+        }
+        else
+        {
+            for ( i = 2; ; ++ i )
+            {
+                len = snprintf ( path, sizeof path, "%s-%u", name, i );
+                if ( len < 0 || len >= sizeof path )
+                    return RC ( rcExe, rcFile, rcWriting, rcPath, rcExcessive );
+                if ( CCTreeFind ( ctree, path ) == NULL )
+                    break;
+            }
+        }
+    }
+
+    /* create an output file */
+    rc = KDirectoryCreateFile ( cdir, & out, false, 0640, cm, "%s", path );
+    if ( rc != 0 && GetRCState ( rc ) == rcUnauthorized )
+    {
+        /* respond to a file that has no write privs */
+        uint32_t access;
+        rc_t rc2 = KDirectoryAccess ( cdir, & access, "%s", path );
+        if ( rc2 == 0 )
+        {
+            rc2 = KDirectorySetAccess ( cdir, false, 0640, 0777, "%s", path );
+            if ( rc2 == 0 )
+            {
+                rc = KDirectoryCreateFile ( cdir, & out, false, 0640, cm, "%s", path );
+                if ( rc != 0 )
+                    KDirectorySetAccess ( cdir, false, access, 0777, "%s", path );
+            }
+        }
+    }
+
+    if ( rc != 0 )
+        PLOGERR ( klogErr,  (klogErr, rc, "failed to create cached file '$(path)'", "path=%s", path ));
+    else
+    {
+        const KFile *tee;
+        rc = KFileMakeTeeRead ( & tee, sf, out );
+        if ( rc != 0 )
+            PLOGERR ( klogInt,  (klogInt, rc, "failed to create cache tee file on '$(path)'", "path=%s", path ));
+        else
+        {
+            KFileAddRef ( sf );
+            KFileAddRef ( out );
+            rc = KFileRelease ( tee );
+            if ( rc != 0 )
+                PLOGERR ( klogInt,  (klogInt, rc, "failed to close cache tee file on '$(path)'", "path=%s", path ));
+        }
+
+        KFileRelease ( out );
+
+        if ( rc == 0 )
+        {
+            rc = CCCachedFileNodeMake ( np, path, ntype, node );
+            if ( rc != 0 )
+                LOGERR ( klogInt, rc, "failed to create cached file node" );
+            else
+            {
+                rc = KDirectorySetAccess ( cdir, false, 0440, 0777, "%s", path );
+
+                /* create named entry in ctree */
+                rc = CCTreeInsert ( ctree, 0, ccFile, NULL, path );
+                if ( rc != 0 )
+                    LOGERR ( klogInt, rc, "failed to record cached file" );
+            }
+        }
+    }
+
+    return rc;
+}
+
+
+static
+rc_t ccat_extract_path (char * path, size_t pathz, const char * name)
+{
+    rc_t rc = 0;
+    int len;
+
+    DEBUG_STATUS (("%s: name '%s'\n", __func__, name));
+
+    if (extract_dir)
+        len = snprintf ( path, pathz, "%s%s", epath, name );
+    else
+        len = snprintf ( path, pathz, "%s", name );
+    DEBUG_STATUS (("%s: path '%s'\n",__func__, path));
+
+    if ( len < 0 || len >= pathz )
+        return RC ( rcExe, rcFile, rcWriting, rcPath, rcExcessive );
+
+    /* look for a name that has not yet been written */
+    if ( CCTreeFind ( etree, path ) != NULL )
+    {
+        uint32_t i;
+        const char *ext = strrchr ( name, '.' );
+        if ( ext != NULL )
+        {
+            for ( i = 2; ; ++ i )
+            {
+                len = snprintf ( path, pathz, "%.*s-%u%s", ( int ) ( ext - name ), name, i, ext );
+                if ( len < 0 || len >= pathz )
+                    return RC ( rcExe, rcFile, rcWriting, rcPath, rcExcessive );
+                if ( CCTreeFind ( etree, path ) == NULL )
+                    break;
+            }
+        }
+        else
+        {
+            for ( i = 2; ; ++ i )
+            {
+                len = snprintf ( path, pathz, "%s-%u", name, i );
+                if ( len < 0 || len >= pathz )
+                    return RC ( rcExe, rcFile, rcWriting, rcPath, rcExcessive );
+                if ( CCTreeFind ( etree, path ) == NULL )
+                    break;
+            }
+        }
+    }
+    DEBUG_STATUS (("%s: rc '%u(%R)' path '%s'\n",__func__, rc, rc, path));
+    return rc;
+}
+
+
+static
+rc_t ccat_extract (const KFile *sf, const char * path)
+{
+    rc_t rc;
+    KFile *out;
+
+    rc = KDirectoryCreateFile ( edir, & out, false, 0640, cm, "%s", path );
+    if ( rc != 0 && GetRCState ( rc ) == rcUnauthorized )
+    {
+        /* respond to a file that has no write privs */
+        uint32_t access;
+        rc_t rc2 = KDirectoryAccess ( edir, & access, "%s", path );
+        if ( rc2 == 0 )
+        {
+            rc2 = KDirectorySetAccess ( edir, false, 0640, 0777, "%s", path );
+            if ( rc2 == 0 )
+            {
+                rc = KDirectoryCreateFile ( edir, & out, false, 0640, cm, "%s", path );
+                DBG_KFILE(("%s: called KDirectoryCreateFile rc %R path %s\n",__func__,rc,path));
+                DBG_KFile(out);
+                if ( rc != 0 )
+                    KDirectorySetAccess ( edir, false, access, 0777, "%s", path );
+            }
+        }
+    }
+    if ( rc != 0 )
+        PLOGERR ( klogErr,
+                  ( klogErr, rc,
+                    "failed to create extracted file '$(path)'",
+                    "path=%s", path ));
+    else
+    {
+        const KFile *tee;
+        rc = KFileMakeTeeRead ( & tee, sf, out );
+        DBG_KFILE(("%s: called KFileMakeTeeRead rc %R \n",__func__,rc));
+        DBG_KFile(tee);
+        if ( rc != 0 )
+            PLOGERR ( klogInt,  ( klogInt, rc, "failed to create extract tee file on '$(path)'", "path=%s", path ));
+        else
+        {
+            KFileAddRef ( sf );
+            KFileAddRef ( out );
+            rc = KFileRelease ( tee );
+            if ( rc != 0 )
+                PLOGERR (klogInt,
+                         (klogInt, rc,
+                          "failed to close extract tee file on '$(path)'",
+                          "path=%s", path));
+            else if (!xml_dir)
+            {
+                CCCachedFileNode * np;
+
+                rc = CCCachedFileNodeMake (&np, path, ccCached, NULL );
+                if ( rc != 0 )
+                    LOGERR ( klogInt, rc, "failed to create cached extract file node" );
+                else
+                {
+                    rc = CCTreeInsert (etree, 0, ccFile, NULL, path);
+                    if ( rc != 0 )
+                        LOGERR ( klogInt, rc, "failed to record cached extract file" );
+                }
+            }
+        }
+        KFileRelease ( out );
+    }
+
+    return rc;
+}
+
+static
+rc_t ccat_arc ( CCContainerNode **np, const KFile *sf, KTime_t mtime,
+                enum CCType ntype, CCFileNode *node, const char *name, uint32_t type_id )
+{
+    rc_t rc /*, orc */;
+
+    /* ensure we handle this type of archive */
+    switch ( type_id )
+    {
+    case ccfftaSra:
+#if ! EXAMINE_KAR_FILES
+        * np = NULL;
+        return 0;
+#endif
+    case ccfftaHD5:
+        * np = NULL;
+        return 0;
+    case ccfftaTar:
+        break;
+    default:
+        /* don't recognize archive format - treat as a normal file */
+        PLOGMSG ( klogWarn, ( klogWarn, "archive '$(name)' type '$(ftype)' will not be analyzed: "
+                              "unknown format", "name=%s,ftype=%s", name, node -> ftype ));
+        * np = NULL;
+        return 0;
+    }
+
+    /* create container node */
+    rc = CCContainerNodeMake ( np, ntype, node );
+    if ( rc != 0 )
+        LOGERR ( klogInt, rc, "failed to create container node" );
+    else
+    {
+        CCContainerNode *cont = * np;
+
+        /* orc = 0; */
+        switch ( type_id )
+        {
+        case ccfftaTar:
+            /* orc = */ ccat_tar ( cont, sf, name );
+            break;
+        case ccfftaSra:
+            /* orc = */ ccat_sra (cont, sf, name);
+            break;
+        }
+    }
+
+    return rc;
+}
+
+static
+rc_t ccat_enc ( CCContainerNode **np, const KFile *sf, KTime_t mtime,
+                enum CCType ntype, CCFileNode *node, const char *name,
+                uint32_t type_id )
+{
+    rc_t rc = 0;
+    const KFile *df;
+    uint64_t expected = SIZE_UNKNOWN;      /* assume we won't know */
+
+    switch ( type_id )
+    {
+    case ccffteNCBI:
+        if (!src_pw_read)
+        {
+            rc = get_password (src_path, src_pwd, sizeof src_pwd, &src_pwd_sz, &src_key, &src_pw_read);
+            if (rc)
+            {
+            validate_instead:
+                rc = KFileAddRef (sf);
+                if (rc == 0)
+                {
+                    PLOGMSG ( klogWarn, ( klogWarn, "file '$(name)' type '$(ftype)' will be validated but not be decoded: "
+                                          "no password given", "name=%s,ftype=%s", name, node -> ftype ));
+                    /* can't decompress it - treat it as a normal file */
+                    rc = KEncFileValidate (sf);
+                    if (rc)
+                    {
+                        memmove (node->ftype + sizeof "Errored" - 1, node->ftype, strlen (node->ftype));
+                        memmove (node->ftype, "Errored", sizeof "Errored" - 1);
+                    }
+                    * np = NULL;
+                    return 0;
+                }
+                return rc;
+            }
+        }
+        rc = KEncFileMakeRead (&df, sf, &src_key);
+        if (rc)
+            goto validate_instead;
+        break;
+
+    case ccffteWGA:
+        if (!wga_pw_read)
+            rc = wga_password (src_path, wga_pwd, sizeof wga_pwd, &wga_pwd_sz, &wga_pw_read);
+        if (rc == 0)
+        {
+            rc = KFileMakeWGAEncRead (&df, sf, wga_pwd, wga_pwd_sz);
+            break;
+        }
+        /* can't decompress it - treat it as a normal file */
+        PLOGMSG ( klogWarn, ( klogWarn, "file '$(name)' type '$(ftype)' will not be decoded: "
+                              "no password given", "name=%s,ftype=%s", name, node -> ftype ));
+        * np = NULL;
+        return 0;
+        
+    default:
+        /* can't decrypt it - treat it as a normal file */
+        PLOGMSG ( klogWarn, ( klogWarn, "file '$(name)' type '$(ftype)' will not be decoded: "
+                              "unknown encoding format", "name=%s,ftype=%s", name, node -> ftype ));
+        * np = NULL;
+        return 0;
+    }
+
+    if ( rc != 0 )
+        PLOGERR ( klogInt,  (klogInt, rc, "failed to decode file '$(path)'", "path=%s", name ));
+    else
+    {
+        rc = CCContainerNodeMake ( np, ntype, node );
+        if ( rc != 0 )
+            LOGERR ( klogInt, rc, "failed to create container node" );
+        else
+        {
+            CCContainerNode *cont = * np;
+            CCFileNode *nnode;
+
+            /* now create a new contained file node */
+            rc = CCFileNodeMake ( & nnode, expected );
+            if ( rc != 0 )
+                LOGERR ( klogInt, rc, "failed to create contained file node" );
+            else
+            {
+                int len;
+                char newname [ 256 ];
+
+                /* invent a new name for file */
+                const char *ext = strrchr ( name, '.' );
+                if ( ext == NULL )
+                    len = snprintf ( newname, sizeof newname, "%s", name );
+                else
+                    len = snprintf ( newname, sizeof newname, "%.*s", ( int ) ( ext - name ), name );
+
+                if ( len < 0 || len >= sizeof newname )
+                {
+                    rc = RC ( rcExe, rcNode, rcConstructing, rcName, rcExcessive );
+                    LOGERR ( klogErr, rc, "failed to create contained file node" );
+                }
+                else
+                {
+                    void * save;
+                    const KFile * cf;
+                    /* rc_t krc; */
+
+                    copycat_log_set (&node->logs, &save);
+
+                    rc = CCFileMakeRead (&cf, df, &node->rc);
+                    if (rc == 0)
+                    {
+                        /* recurse with buffer on decoding */
+                        /* krc = */ ccat_buf ( & cont -> sub, cf, mtime,
+                                         ccContFile, nnode, newname);
+
+                        KFileRelease (cf);
+                        /* if successful, "node" ( allocated locally above )
+                           will have been entered into "cont->sub" */
+                    }
+
+                    copycat_log_set (&save, NULL);
+                }
+            }
+        }
+
+        KFileRelease ( df );
+    }
+
+    return rc;
+}
+
+static
+rc_t ccat_cmp ( CCContainerNode **np, const KFile *sf, KTime_t mtime,
+                enum CCType ntype, CCFileNode *node, const char *name, uint32_t type_id )
+{
+    const KFile *zf;    
+    /* use a variable incase we ever get a compression that can be queried 
+     * about file size */
+    uint64_t expected = SIZE_UNKNOWN;
+    rc_t rc;
+
+    switch ( type_id )
+    {
+
+    case ccfftcGzip:
+        /* this code attaches a new reference to "sf" */
+        rc = KFileMakeGzipForRead ( & zf, sf );
+        break;
+    case ccfftcBzip2:
+        /* this code attaches a new reference to "sf" */
+        rc = KFileMakeBzip2ForRead ( & zf, sf );
+        break;
+    default:
+        /* can't decompress it - treat it as a normal file */
+        PLOGMSG ( klogWarn, ( klogWarn, "file '$(name)' type '$(ftype)' will not be decompressed: "
+                              "unknown compression format", "name=%s,ftype=%s", name, node -> ftype ));
+        * np = NULL;
+        return 0;
+    }
+
+    if ( rc != 0 )
+        PLOGERR ( klogInt,  (klogInt, rc, "failed to decompress file '$(path)'", "path=%s", name ));
+    else
+    {
+        rc = CCContainerNodeMake ( np, ntype, node );
+        if ( rc != 0 )
+            LOGERR ( klogInt, rc, "failed to create container node" );
+        else
+        {
+            CCContainerNode *cont = * np;
+            CCFileNode *nnode;
+
+            /* now create a new contained file node */
+            rc = CCFileNodeMake ( & nnode, expected );
+            if ( rc != 0 )
+                LOGERR ( klogInt, rc, "failed to create contained file node" );
+            else
+            {
+                int len;
+                char newname [ 256 ];
+
+                /* invent a new name for file */
+                const char *ext = strrchr ( name, '.' );
+                if ( ext == NULL )
+                    len = snprintf ( newname, sizeof newname, "%s", name );
+                else if ( strcasecmp ( ext, ".tgz" ) == 0 )
+                    len = snprintf ( newname, sizeof newname, "%.*s.tar", ( int ) ( ext - name ), name );
+                else
+                    len = snprintf ( newname, sizeof newname, "%.*s", ( int ) ( ext - name ), name );
+
+                if ( len < 0 || len >= sizeof newname )
+                {
+                    rc = RC ( rcExe, rcNode, rcConstructing, rcName, rcExcessive );
+                    LOGERR ( klogErr, rc, "failed to create contained file node" );
+                }
+                else
+                {
+                    void * save;
+                    const KFile * cf;
+                    /* rc_t krc; */
+
+                    copycat_log_set (&nnode->logs, &save);
+
+                    rc = CCFileMakeRead (&cf, zf, &node->rc);
+                    if (rc == 0)
+                    {
+                        /* recurse with buffer on decompression */
+                        /* krc = */ ccat_buf (& cont -> sub, cf, mtime,
+                                        ccContFile, nnode, newname);
+
+                        KFileRelease (cf);
+                        /* if successful, "node" ( allocated locally above )
+                           will have been entered into "cont->sub" */
+                    }
+
+                    copycat_log_set (save, NULL);
+                }
+            }
+        }
+
+        KFileRelease ( zf );
+    }
+
+    return rc;
+}
+
+static
+rc_t ccat_path_append (const char * name)
+{
+    size_t z;
+    z = string_size (name);
+    DEBUG_STATUS (("%s:in epath %s name %s z %zu \n",__func__, epath, name, z));
+    if (ehere + z + 1 >= epath + sizeof (epath))
+        return RC (rcExe, rcNoTarg, rcConcatenating, rcBuffer, rcTooShort);
+    memcpy(ehere, name, z);
+    ehere += z;
+    *ehere++ = '/';
+    *ehere = '\0';
+    DEBUG_STATUS (("%s: out name %s epath %s\n",__func__,name, epath));
+    return 0;
+}
+
+static
+rc_t ccat_main ( CCTree *tree, const KFile *sf, KTime_t mtime,
+                 enum CCType ntype, CCFileNode *node, const char *name )
+{
+    /* the pointer e_go_back allows us to remove additions to the stored
+     * path built up as we descend into deeper container/archive/directories */
+    char * e_go_back = ehere;
+
+    /* determine file type based upon contents and name */
+    uint32_t type_id, class_id;
+/*     rc_t orc; */
+    rc_t rc = CCFileFormatGetType ( filefmt, sf, name,
+                                    node -> ftype, sizeof node -> ftype, & type_id, & class_id );
+
+    DEBUG_STATUS (("%s: name '%s' type '%s'\n",__func__,name,node->ftype));
+
+    if ( rc != 0 )
+        PLOGERR ( klogErr,  (klogErr, rc, "failed to determine type of file '$(path)'", "path=%s", name ));
+    else
+    {
+        /* file could be a container */
+        CCContainerNode *cont;
+        CCCachedFileNode *cfile;
+
+        /* assume this node will get name */
+        void *entry = node;
+
+        bool xml_insert = false;
+        bool tee_done = false;
+        /* create path */
+        const char * basename;
+        char path [ 8192 + 256 ];
+
+        if ((basename = strrchr (name, '/')) != NULL)
+            ++basename;
+        else
+            basename = name;
+
+
+        /* look for special files */
+        switch ( class_id )
+        {
+        case ccffcEncoded:
+            rc = ccat_path_append (name);
+            if (rc == 0)
+            {
+                rc = ccat_enc ( & cont, sf, mtime, ntype, node, basename, type_id );
+                if ( rc == 0 && cont != NULL )
+                {
+                    ntype = ccContainer;
+                    entry = cont;
+                }
+            }
+            ehere = e_go_back;
+            *ehere = '\0';
+            break;
+        case ccffcCompressed:
+            rc = ccat_path_append (name);
+            if (rc == 0)
+            {
+                rc = ccat_cmp ( & cont, sf, mtime, ntype, node, basename, type_id );
+                if ( rc == 0 && cont != NULL )
+                {
+                    ntype = ccContainer;
+                    entry = cont;
+                }
+            }
+            ehere = e_go_back;
+            *ehere = '\0';
+            break;
+        case ccffcArchive:
+            rc = ccat_path_append (name);
+            if (rc == 0)
+            {
+                rc = ccat_arc ( & cont, sf, mtime, ntype, node, basename, type_id );
+                if ( rc == 0 && cont != NULL )
+                {
+                    ntype = ccArchive;
+                    entry = cont;
+                }
+            }
+            ehere = e_go_back;
+            *ehere = '\0';
+            break;
+        case ccffcCached:
+            if ( cdir != NULL )
+            {
+                rc = ccat_cache ( & cfile, sf, ntype, node, basename );
+                if ( rc == 0 && cont != NULL )
+                {
+                    tee_done = true;
+                    ntype = ccCached;
+                    entry = cfile;
+                }
+            }
+            /* fall through */
+        default:
+            rc = ccat_extract_path (path, sizeof path, name);
+            DEBUG_STATUS (("%s: extract_path '%s'\n",__func__,path));
+            if ((edir != NULL) && (! tee_done))
+            {
+                rc = ccat_extract (sf, path);
+                if (rc == 0)
+                    tee_done = true;
+            }
+            if (rc == 0)
+            {
+                xml_insert = true;
+            }
+            if (!tee_done)
+            {
+                const KFile * cf;
+
+                rc = CCFileMakeRead (&cf, sf, &node->rc);
+                if (rc == 0)
+                {
+                    const KFile * tee;
+
+                    rc = KFileMakeTeeRead (&tee, cf, fnull);
+                    if (rc == 0)
+                    {
+                        rc = KFileAddRef (fnull);
+
+                        KFileRelease (tee);
+                    }
+                }
+            }
+            break;
+        }
+
+        /* create entry into tree */
+        if ( rc == 0 )
+        {
+            if (! xml_dir)
+            {
+                DEBUG_STATUS (("%s: ready to insert '%s'\n",__func__,name));
+                rc = CCTreeInsert ( tree, mtime, ntype, entry, name );
+                /* if we are extracting create a name node with other information being incorrect */
+                if (edir != NULL)
+                {
+                }
+            }
+            else if (xml_insert)
+            {
+                DEBUG_STATUS (("%s: ready to insert '%s' for '%s'\n",__func__,path, name));
+                rc = CCTreeInsert (etree, mtime, ntype, entry, path);
+            }
+
+            if ( rc != 0 )
+                PLOGERR (klogInt,  (klogInt, rc,
+                                    "failed to enter node '$(name)'",
+                                    "name=%s", name ));
+        }
+    }
+
+    return rc;
+}
+
+static
+rc_t ccat_sz ( CCTree *tree, const KFile *sf, KTime_t mtime,
+               enum CCType ntype, CCFileNode *node, const char *name )
+{
+    /* create a counting file to fill out its size */
+    const KFile *sz;
+    rc_t rc, orc;
+
+    rc = KFileMakeCounterRead ( & sz, sf, & node -> size, & node -> lines, true );
+
+
+    if ( rc != 0 )
+        PLOGERR ( klogInt,  (klogInt, rc, "failed to create counting wrapper for '$(path)'", "path=%s", name ));
+    else
+    {
+        /* give the wrapper its own reference
+           rather than taking the one we gave it */
+        rc = KFileAddRef ( sf );
+        if (rc)
+            PLOGERR (klogInt, 
+                     (klogInt, rc, "Error in reference counting for '$(path)'", "path=%s", name ));
+        else
+            /* the main catalog function */
+            rc = ccat_main ( tree, sz, mtime, ntype, node, name );
+
+        /* release the sizer */
+        orc = KFileRelease ( sz );
+        if (orc)
+        {
+            PLOGERR (klogInt, 
+                     (klogInt, orc, "Error in closing byte counting for '$(path)'", "path=%s", name ));
+            if (rc == 0)
+                rc = orc;
+        }
+    }
+
+    return rc;
+}
+
+rc_t ccat_md5 ( CCTree *tree, const KFile *sf, KTime_t mtime,
+                enum CCType ntype, CCFileNode *node, const char *name )
+{
+    /* all files have an MD5 hash for identification.
+       the following code is for expediency.
+       we already have a formatter for output,
+       and to reuse it we simply pipe its output
+       to /dev/null, so to speak */
+    KMD5SumFmt *fmt;
+    rc_t rc, orc;
+
+    /* NEW - there are some cases where md5sums would not be useful
+       and only take up CPU power. */
+    if ( no_md5 )
+        return ccat_sz ( tree, sf, mtime, ntype, node, name );
+
+    /* normal md5 path */
+    rc = KMD5SumFmtMakeUpdate ( & fmt, fnull );
+    if ( rc != 0 )
+        PLOGERR ( klogInt,  (klogInt, rc, "failed to create md5sum formatter for '$(path)'", "path=%s", name ));
+    else
+    {
+        const KFile *md5;
+
+        /* give another fnull reference to formatter */
+        rc = KFileAddRef ( fnull );
+        if (rc)
+            LOGERR (klogInt, rc, "Error referencing MD5 format file");
+        else
+        {
+
+            /* this is the wrapper that calculates MD5 */
+            rc = KFileMakeNewMD5Read ( & md5, sf, fmt, name );
+            if ( rc != 0 )
+                PLOGERR ( klogInt,  (klogInt, rc, "failed to create md5 wrapper for '$(path)'", "path=%s", name ));
+            else
+            {
+                /* give the wrapper its own reference
+                   rather than taking the one we gave it */
+                rc = KFileAddRef ( sf );
+                if (rc)
+                    PLOGERR (klogInt,
+                             (klogInt, rc,
+                              "failure in reference counting file for '$(path)'",
+                              "path=%s", name ));
+                else
+                {
+                    /* continue on to obtaining file size */
+                    rc = ccat_sz ( tree, md5, mtime, ntype, node, name );
+
+                    /* this will drop the MD5 calculator, but not
+                       its source file, and cause the digest to be
+                       written to its formatter */
+                    orc = KFileRelease ( md5 );
+                    if (orc)
+                    {
+                        PLOGERR (klogInt,
+                                 (klogInt, rc,
+                                  "failure in release reference counting file for '$(path)'",
+                                  "path=%s", name ));
+                        if (rc == 0)
+                            rc = orc;
+                    }
+
+                    /* if there were no errors, read the MD5 from formatter.
+                       this must be done AFTER releasing the MD5 file,
+                       or nothing will ever get written */
+                    if ( rc == 0 )
+                    {
+                        bool bin;
+                        rc = KMD5SumFmtFind ( fmt, name, node -> _md5, & bin );
+                    }
+                }
+            }
+        }
+
+        /* dump the formatter, but not fnull */
+        orc = KMD5SumFmtRelease ( fmt );
+        if (orc)
+        {
+            PLOGERR (klogInt,
+                     (klogInt, rc,
+                      "failure in releasing  MD5 format file for '$(path)'",
+                      "path=%s", name ));
+            if (rc == 0)
+                rc = orc;
+        }
+    }
+
+    return rc;
+}
+
+/* buffered recursion entrypoint */
+rc_t ccat_buf ( CCTree *tree, const KFile *sf, KTime_t mtime,
+                enum CCType ntype, CCFileNode *node, const char *name )
+{
+    /* create a buffered file to counter random access */
+    const KFile *buf;
+    rc_t rc, orc;
+
+#if USE_KBUFFILE
+    rc = KBufFileMakeRead (&buf, sf, 2 * 32 * 1024);
+#else
+    rc = KFileMakeReadHead (&buf, sf, 4096);
+#endif
+    if ( rc != 0 )
+        PLOGERR ( klogInt,  (klogInt, rc,
+                             "failed to create buffer for '$(path)'",
+                             "path=%s", name ));
+    else
+    {
+        /* skip ccat */
+        rc = ccat_md5 ( tree, buf, mtime, ntype, node, name );
+
+        /* release the buffer */
+        orc = KFileRelease ( buf );
+        if (orc)
+        {
+            PLOGERR (klogInt, (klogInt, orc, "Error closing buffer for '$(path)'", "path=%s", name ));
+            if (rc == 0)
+                rc = orc;
+        }
+    }
+    return rc;
+}
+
+
+typedef struct copycat_pb
+{
+    CCTree * tree;
+    const KFile * sf;
+    KFile * df;
+    KTime_t mtime;
+    enum CCType ntype;
+    CCFileNode * node;
+    const char * name;
+} copycat_pb;
+
+
+rc_t copycat_add_tee (const copycat_pb * ppb)
+{
+    const KFile * tee;
+    rc_t rc, orc;
+
+    rc = KFileMakeTeeRead (&tee, ppb->sf, ppb->df);
+    if (rc)
+        PLOGERR (klogInt,  
+                 (klogInt, rc, "failed to create encrypter for '$(path)'",
+                  "path=%s", ppb->name ));
+    else
+    {
+        rc = KFileAddRef (ppb->df);
+        if (rc)
+            LOGERR (klogInt, rc, "Reference counting error");
+        else
+        {
+            rc = KFileAddRef (ppb->sf);
+            if (rc)
+                LOGERR (klogInt, rc, "Reference counting error");
+            else
+            {
+                orc = ccat_md5 (ppb->tree, tee, ppb->mtime, ppb->ntype, ppb->node, ppb->name);
+
+                /* report? */
+                orc = KFileRelease (tee);
+                if (orc)
+                    PLOGERR (klogInt, 
+                             (klogInt, orc,
+                              "Error in closing byte counting for '$(path)'",
+                              "path=%s", ppb->name ));
+
+/*                 orc = KFileRelease (ppb->sf); */
+/*                 if (orc) */
+/*                     PLOGERR (klogInt,  */
+/*                              (klogInt, orc, */
+/*                               "Error in closing byte counting of tee source for '$(path)'", */
+/*                               "path=%s", ppb->name )); */
+            }
+/*             orc = KFileRelease (ppb->df); */
+/*             if (orc) */
+/*                 PLOGERR (klogInt,  */
+/*                          (klogInt, orc, */
+/*                           "Error in closing byte counting of tee destination for '$(path)'", */
+/*                           "path=%s", ppb->name )); */
+        }       
+    }
+    return rc;
+}
+
+
+static
+rc_t copycat_add_node (const copycat_pb * ppb)
+{
+    rc_t rc;
+
+    rc = ccat_path_append (ppb->name);
+    if (rc == 0)
+    {
+        CCContainerNode *cont;
+
+        /* make a container node for the encrypted output file */
+        rc = CCContainerNodeMake (&cont, ccFile, ppb->node);
+        if (rc)
+        {
+            PLOGERR (klogInt,
+                     (klogInt, rc, "error creating container node for '$(path)'",
+                      "path=%s", ppb->name));
+        }
+        else
+        {
+            copycat_pb pb = *ppb;
+            uint64_t expected = /*(ppb->node->expected != SIZE_UNKNOWN)
+                                  ? ppb->node->expected :*/ SIZE_UNKNOWN;
+            pb.tree = &cont->sub;
+
+            /* this will be the node for the unencrypted version of the output file */
+            rc = CCFileNodeMake (&pb.node, expected );
+            if (rc)
+                LOGERR (klogInt, rc, "failed to create contained node");
+            else
+            {
+                void * save;
+                size_t len;
+                size_t elen;
+                size_t clen;
+                rc_t orc;
+                char name [ 1024 ];
+
+                len = strlen (pb.name);
+                elen = strlen (ncbi_encryption_extension);
+                clen = len - elen;
+
+                /* 
+                 *if the name had .ncbi_enc at the end remove it
+                 * for the inner node.
+                 */
+                if (strcmp (ncbi_encryption_extension, pb.name + clen) == 0)
+                {
+                    memcpy (name, pb.name, clen);
+                    name[clen] = '\0';
+                }
+                /*
+                 * if it did not, prepend '.' to the name
+                 */
+                else
+                {
+                    name[0] = '.';
+                    if (len > sizeof name - 2)
+                        len = sizeof name - 2;
+                    strncpy (name+1, pb.name, len);
+                    name[len+1] = '\0';
+                }
+                pb.name = name;
+
+                copycat_log_set (&pb.node->logs, &save);
+
+                rc = copycat_add_tee (&pb);
+
+                copycat_log_set (save, NULL);
+
+                orc = CCTreeInsert (ppb->tree, ppb->mtime, ccContainer, cont, ppb->name);
+
+                if (rc == 0)
+                    rc = orc;
+            }
+        }
+    }
+    return rc;
+}
+
+/* -----
+ * copycat_add_enc
+ *
+ * add an encryptor to the copy chain
+ */
+rc_t copycat_add_enc (const copycat_pb * ppb)
+{
+    copycat_pb pb = *ppb;
+    rc_t rc = 0;
+
+    if (!dst_pw_read)
+        rc = get_password (dst_path, dst_pwd, sizeof dst_pwd, &dst_pwd_sz, &dst_key, &dst_pw_read);
+    if (rc)
+        return rc;
+
+    rc = KEncFileMakeWrite (&pb.df, ppb->df, &dst_key);
+    if (rc)
+        PLOGERR (klogInt,
+                 (klogInt, rc, "failed to create encrypter for '$(path)'",
+                  "path=%s", pb.name ));
+    else
+    {
+        strncpy (pb.node->ftype, "Encoded/NCBI", sizeof pb.node->ftype);
+
+
+        /* add the container to the cataloging tree */
+        rc = copycat_add_node (&pb);
+        if (rc == 0)
+        {
+            rc = KFileRelease (pb.df);
+            if (rc)
+            {
+                PLOGERR (klogInt, 
+                         (klogInt, rc,
+                          "Error in closing byte counting for '$(path)'",
+                          "path=%s", pb.name ));
+            }
+        }
+    }
+    return rc;
+}
+
+
+/* -----
+ * copycat_add_sz
+ *
+ * if we are encrypting the output we need to do an actual byte count across the
+ * write side of the encryption so we add a filter into the copy chain.  If we
+ * are not encrypting we do this calculation in the ccat chain for the outside file
+ * and never reach this function.
+ */
+rc_t copycat_add_sz (const copycat_pb * ppb)
+{
+    /* create a counting file to fill out its size */
+    copycat_pb pb = *ppb;
+    rc_t rc, orc;
+
+    rc = KFileMakeCounterWrite (&pb.df, ppb->df, &pb.node->size, &pb.node->lines, true);
+    if (rc)
+        PLOGERR (klogInt,
+                 (klogInt, rc,
+                  "failed to create counting wrapper for '$(path)'",
+                  "path=%s", pb.name ));
+    else
+    {
+        /* give the wrapper its own reference
+           rather than taking the one we gave it */
+        rc = KFileAddRef ( ppb->df );
+        if (rc)
+            PLOGERR (klogInt, 
+                     (klogInt, rc, "Error in reference counting for '$(path)'",
+                      "path=%s", pb.name));
+        else
+            rc = copycat_add_enc (&pb);
+
+        /* release the sizer */
+        orc = KFileRelease (pb.df);
+        if (orc)
+        {
+            PLOGERR (klogInt, 
+                     (klogInt, orc, "Error in closing byte counting "
+                      "(probable read error) for '$(path)'", "path=%s",
+                      pb.name ));
+            /* a failure in the counter destructor might mean a failure
+             * in the copy so return the error */
+            if (rc == 0)
+                rc = orc;
+        }
+    }
+
+    return rc;
+}
+
+
+/* -----
+ * copycat_add_md5
+ *
+ * if we are encrypting the output we need to do an md5 calculation across the
+ * write side of the encryption so we add a filter into the copy chain.  If we
+ * are not encrypting we do the md5 calculation in the ccat chain for the outside file
+ * and never reach this function.
+ */
+rc_t copycat_add_md5 (const copycat_pb * ppb)
+{
+    /* all files have an MD5 hash for identification.
+       the following code is for expediency.
+       we already have a formatter for output,
+       and to reuse it we simply pipe its output
+       to /dev/null, so to speak */
+    KMD5SumFmt *fmt;
+    rc_t rc;
+
+    if ( no_md5 )
+        return copycat_add_sz (ppb);
+
+    rc = KMD5SumFmtMakeUpdate (&fmt, fnull);
+    if ( rc != 0 )
+        PLOGERR (klogInt,
+                 (klogInt, rc,
+                  "failed to create md5sum formatter for '$(path)'",
+                  "path=%s", ppb->name ));
+    else
+    {
+        rc_t orc;
+        /* give another fnull reference to formatter */
+        rc = KFileAddRef (fnull);
+        if (rc)
+            LOGERR (klogInt, rc, "Error referencing MD5 format file");
+        else
+        {
+            copycat_pb pb = *ppb;
+
+            /* this is the wrapper that calculates MD5 */
+            rc = KMD5FileMakeWrite ((struct KMD5File**)&pb.df, ppb->df, fmt, ppb->name );
+            if ( rc != 0 )
+                PLOGERR (klogInt,
+                         (klogInt, rc,
+                          "failed to create md5 wrapper for '$(path)'",
+                          "path=%s", ppb->name ));
+            else
+            {
+                /* give the wrapper its own reference
+                   rather than taking the one we gave it */
+                rc = KFileAddRef (ppb->df);
+                if (rc)
+                    PLOGERR (klogInt,
+                             (klogInt, rc,
+                              "failure in reference counting file for '$(path)'",
+                              "path=%s", ppb->name ));
+                else
+                    /* continue on to obtaining file size */
+                    rc = copycat_add_sz (&pb);
+
+                /* this will drop the MD5 calculator, but not
+                   its source file, and cause the digest to be
+                   written to its formatter */
+                orc = KFileRelease (pb.df);
+                if (orc)
+                {
+                    PLOGERR (klogInt,
+                             (klogInt, orc,
+                              "failure in releasing md5 calculation file for '$(path)'",
+                              "path=%s", ppb->name ));
+                }
+
+                /* if there were no errors, read the MD5 from formatter.
+                   this must be done AFTER releasing the MD5 file,
+                   or nothing will ever get written */
+                if (orc == 0)
+                {
+                    bool bin;
+                    orc = KMD5SumFmtFind (fmt, ppb->name, ppb->node->_md5, &bin);
+                    if (orc)
+                        PLOGERR (klogWarn,
+                                 (klogWarn, orc,
+                                  "Error in obtaining the MD5 for '$(path)'",
+                                  "path=%s", pb.name));
+                }
+            }
+        }
+
+        /* dump the formatter, but not fnull */
+        orc = KMD5SumFmtRelease (fmt);
+        if (orc)
+        {
+            PLOGERR (klogInt,
+                     (klogInt, rc,
+                      "failure in releasing  MD5 format file for '$(path)'",
+                      "path=%s", ppb->name ));
+            /* we can 'forget' this error after logging it */
+            if (rc == 0)
+                rc = orc;
+        }
+    }
+
+    return rc;
+}
+
+/* -----
+ * copycat_add_crc
+ *
+ * this is the first function in building the write side of the copy chain
+ *
+ * We calculate a crc on the outgoing file and none of the interior files
+ * and we do that at this point in the chain regardless of whether we will
+ * encrypt the outgoing file.
+ *
+ * We'll add the crc calculator to the write side stream and then decide
+ * whether to add an encryptor into the chain.  We add one to the write side
+ * of the chain if we have an encrypting password or jump to finishing the
+ * copy chain if we do not
+ */
+rc_t copycat_add_crc (const  copycat_pb * ppb)
+{
+    /* external files have a CRC32 checksum
+       the following code is for expediency.
+       we already have a formatter for output,
+       and to reuse it we simply pipe its output
+       to /dev/null, so to speak */
+    rc_t rc;
+    KCRC32SumFmt * fmt; 
+
+    rc = KCRC32SumFmtMakeUpdate ( &fmt, fnull );
+    if ( rc != 0 )
+        PLOGERR (klogInt,
+                 (klogInt, rc,
+                  "failed to create crc32sum formatter for '$(path)'",
+                  "path=%s", ppb->name ));
+    else
+    {
+        rc_t orc = 0;
+
+        /* give another fnull reference to formatter */
+        rc = KFileAddRef ( fnull );
+        if (rc)
+            PLOGERR (klogInt,
+                     (klogInt, rc, 
+                      "error in reference counting crc formatter fnull for '$(path)'",
+                      "path=%s", ppb->name ));
+        else
+        {
+            copycat_pb pb = *ppb;
+
+            /* this is the wrapper that calculates CRC32 */
+            rc = KCRC32FileMakeWrite ( (KCRC32File**)&pb.df, ppb->df, fmt, ppb->name );
+            if ( rc != 0 )
+                PLOGERR (klogInt,
+                         (klogInt, rc,
+                          "failed to create crc32 wrapper for '$(path)'",
+                          "path=%s", ppb->name ));
+            else
+            {
+                /* give the wrapper its own reference
+                   rather than taking the one we gave it */
+                rc = KFileAddRef (ppb->df);
+                if (rc)
+                    PLOGERR (klogInt,
+                             (klogInt, rc, 
+                              "error in reference counting file for '$(path)'",
+                              "path=%s", ppb->name ));
+                else if (do_encrypt)
+                {
+                    /* add in the size of the enc header */
+                    if (pb.node->expected != SIZE_UNKNOWN)
+                    {
+                        uint64_t temp;
+
+                        temp = pb.node->expected; /* current expected count */
+
+                        temp += (ENC_DATA_BLOCK_SIZE - 1); /* add enough to fill last block */
+                        temp /= ENC_DATA_BLOCK_SIZE; /* how many blocks */
+                        temp *= sizeof (KEncFileBlock); /* size of encrypted blocks */
+                        temp += sizeof (KEncFileHeader) + sizeof (KEncFileFooter);
+                        pb.node->expected = temp;
+                    }
+                    rc = copycat_add_md5 (&pb);
+                }
+                else
+                    rc = copycat_add_tee (&pb);
+
+                /* this will drop the CRC calculator, but not
+                   its source file, and cause the CRC to be
+                   written to its formatter */
+                orc = KFileRelease (pb.df);
+                if (orc)
+                {
+                    LOGERR (klogErr, orc, "Failed to close out crc calculator");
+                    /* an error here implies an error in the copy so report it */
+                    rc = orc;
+                }
+            }
+            /* if there were no errors, read the CRC from formatter.
+               this must be done AFTER releasing the CRC file,
+               or nothing will ever get written */
+            if ( rc == 0 )
+            {
+                bool bin;
+                orc = KCRC32SumFmtFind ( fmt, ppb->name, &pb.node->crc32, &bin );
+                if (orc)
+                    PLOGERR (klogWarn,
+                             (klogWarn, orc,
+                              "Failed to obtain the CRC for '$(path)'",
+                              "path=%s", pb.name));
+                /* an error here isn't an error in copy */
+            }
+        }
+        /* dump the formatter, but not fnull */
+        orc = KCRC32SumFmtRelease ( fmt );
+        if (orc)
+            LOGERR (klogWarn, orc, "Failed to close off CRC storage");
+        /* this error we do not need to track */
+        if (rc == 0)
+            rc = orc;
+    }
+    return rc;
+}
+
+
+/* -----
+ * copycat_add_buf2
+ *
+ * This function adds buffering to the outermostDecrypted file read so that we
+ * can read the first portion of the file for file type analysis and then
+ * re-read it for cataloging.
+ *
+ * At this point the only file type analysis needed is to determine
+ * whether we have in incoming encrypted file We've already checked for
+ * the existence of the key or we wouldn't get here.
+ */
+rc_t copycat_add_buf2 (const copycat_pb * ppb)
+{
+    copycat_pb pb = *ppb;
+    rc_t rc = 0;
+
+    /* create a buffered file to allow re-reading of the first 128 bytes
+     * a tad overkill */
+#if USE_KBUFFILE
+    rc = KBufFileMakeRead (&pb.sf, ppb->sf, 2*32*1024);
+#else
+    rc = KFileMakeReadHead (&pb.sf, ppb->sf, 4*1024);
+#endif
+    if (rc)
+    {
+        PLOGERR (klogInt,  
+                 (klogInt, rc,
+                  "failed to create buffer for '$(path)'",
+                  "path=%s", pb.name ));
+    }
+    else
+    {
+        rc_t orc;
+
+        rc = copycat_add_crc (&pb);
+
+        orc = KFileRelease (pb.sf);
+        if (orc)
+            PLOGERR (klogInt,  
+                     (klogInt, orc,
+                      "failed to read buffer for '$(path)'",
+                      "path=%s", pb.name ));
+    }
+    return rc;
+}
+
+
+/* -----
+ * copycat_add_dec
+ *
+ * add a decryption to the read side of the copy chain.
+ * no other decisions made here
+ */
+rc_t copycat_add_dec_ncbi (const copycat_pb * ppb)
+{
+    copycat_pb pb = *ppb;
+    rc_t rc = 0;
+
+    if (!src_pw_read)
+        rc = get_password (src_path, src_pwd, sizeof src_pwd, &src_pwd_sz, &src_key, &src_pw_read);
+
+    if (rc == 0)
+    {
+        rc = KEncFileMakeRead (&pb.sf, ppb->sf, &src_key);
+        if (rc)
+            PLOGERR (klogInt,  
+                     (klogInt, rc,
+                      "failed to create decrypter for '$(path)'",
+                      "path=%s", pb.name ));
+    }
+    if (rc == 0)
+    {
+        rc_t orc;
+
+        /* this decryption won't know its output size until it gets there */
+        pb.node->expected = SIZE_UNKNOWN;
+        rc = copycat_add_buf2 (&pb);
+        orc = KFileRelease (pb.sf);
+        if (orc)
+            PLOGERR (klogInt,  
+                     (klogInt, orc,
+                      "failed to close decrypter for '$(path)'",
+                      "path=%s", pb.name ));
+    }
+    return rc;
+}
+
+rc_t copycat_add_dec_wga (const copycat_pb * ppb)
+{
+    copycat_pb pb = *ppb;
+    rc_t rc = 0;
+
+    if (!src_pw_read)
+        rc = wga_password (src_path, src_pwd, sizeof src_pwd, &src_pwd_sz, &src_pw_read);
+
+    if (rc == 0)
+    {
+        rc = KFileMakeWGAEncRead (&pb.sf, ppb->sf, src_pwd, src_pwd_sz);
+        if (rc)
+            PLOGERR (klogInt,  
+                     (klogInt, rc,
+                      "failed to create decrypter for '$(path)'",
+                      "path=%s", pb.name ));
+    }
+    if (rc == 0)
+    {
+        rc_t orc;
+
+        if (pb.node->expected != SIZE_UNKNOWN)
+            pb.node->expected -= 128; /* subtract off the size of the WGA header */
+        rc = copycat_add_buf2 (&pb);
+        orc = KFileRelease (pb.sf);
+        if (orc)
+            PLOGERR (klogInt,  
+                     (klogInt, orc,
+                      "failed to close decrypter for '$(path)'",
+                      "path=%s", pb.name ));
+    }
+    return rc;
+}
+
+/* -----
+ * copycat_add_dec
+ *
+ * At this point the only file type analysis needed is to determine
+ * whether we have in incoming encrypted file We've already checked for
+ * the existence of the key or we wouldn't get here.
+ */
+rc_t copycat_add_dec (const copycat_pb * ppb)
+{
+    copycat_pb pb = *ppb;
+    rc_t rc = 0;
+    size_t num_read;
+    uint8_t buff [128];
+
+    rc = KFileReadAll (pb.sf, 0, buff, sizeof buff, &num_read);
+    if (rc)
+        PLOGERR (klogInt,  
+                 (klogInt, rc,
+                  "failed to read buffer for '$(path)'",
+                  "path=%s", pb.name ));
+    else
+    {
+        rc_t orc;
+
+        /* 
+         * if we have an encrypted file add decryption to the chain
+         * if not jump sraight to the write side of the chain
+         */
+        if (CCFileFormatIsNCBIEncrypted (buff))
+            rc = copycat_add_dec_ncbi (&pb);
+        else if (KFileIsWGAEnc (buff, num_read) == 0)
+            rc = copycat_add_dec_wga (&pb);
+        else
+            rc = copycat_add_crc (&pb);
+
+        orc = KFileRelease (pb.sf);
+        if (orc)
+            PLOGERR (klogInt,  
+                     (klogInt, orc,
+                      "failed to read buffer for '$(path)'",
+                      "path=%s", pb.name ));
+    }
+    return rc;
+}
+
+
+/* -----
+ * copycat
+ *
+ * The copycat function is the actual copy and catalog function.
+ * All before this function is called is building toward this.
+ *
+ * The functions prefixed copycat_add_ are functions used in building the 
+ * chain of KFS and other filters for doing the copy function.  Some 
+ * cataloging is included where the output file is encoded and to
+ * generate the CRC unique to the outer file in the catalog.
+ * The ccat_add_ functions are filters toward the leafs in the catlog 
+ * portion of the program.
+ *
+ * Much of this could be inlined but the indention creep across the screen
+ * and the handling of levels of indention would get intense.  Also some
+ * filters are skipped which also would have made it more unweildy to 
+ * write and maintain.
+ *
+ * In this function we build a node for cataloging the outermost layer of
+ * the output file which may differ from the file as read here if a
+ * decryption and/or encryption is added.
+ *
+ * We then
+ */
+rc_t copycat (CCTree *tree, KTime_t mtime, KDirectory * _cwd,
+              const VPath * src, const KFile *sf,
+              const VPath * dst,  KFile *df,
+              const char *spath, const char *name,
+              uint64_t expected, bool _do_decrypt, bool _do_encrypt)
+{
+    void * save;
+    copycat_pb pb;
+    rc_t rc;
+
+    DEBUG_STATUS (("%s: copy file %s\n",__func__, spath));
+
+    cwd = _cwd;
+    src_path = src;
+    dst_path = dst;
+
+    src_pw_read = false;
+
+    do_decrypt = _do_decrypt;
+    do_encrypt = _do_encrypt;
+
+    /* -----
+     * Create a cataloging node for the outer most file as written
+     */
+    rc = CCFileNodeMake ( &pb.node, expected );
+    if (rc)
+    {
+        LOGERR ( klogInt, rc, "failed to allocate file node" );
+        return rc;
+    }
+
+    pb.tree = tree;
+    pb.mtime = mtime;
+    pb.ntype = ccFile;
+    pb.name = name;
+
+
+    copycat_log_set (&pb.node->logs, &save);
+
+    if (out_block)
+    {
+        rc = KBufWriteFileMakeWrite (&pb.df, df, out_block);
+        if (rc)
+        {
+            PLOGERR (klogInt,  
+                     (klogInt, rc,
+                      "failed to create buffer for '$(path)'",
+                      "path=%s", pb.name ));
+            return rc;
+        }
+    }
+    else
+    {
+        pb.df = df;
+    }
+
+    if (in_block)
+    {
+        rc = KBufReadFileMakeRead (&pb.sf, sf, in_block);
+    }
+    else
+    {
+#if USE_KBUFFILE
+        rc = KBufFileMakeRead (&pb.sf, sf, 2*32*1024);
+#else
+        rc = KFileMakeReadHead (&pb.sf, sf, 4*1024);
+#endif
+    }
+    if (rc)
+    {
+        PLOGERR (klogInt,  
+                 (klogInt, rc,
+                  "failed to create buffer for '$(path)'",
+                  "path=%s", spath ));
+        return rc;
+    }
+    else
+    {
+        /* 
+         * if we have a decryption password prepare a decryption read path
+         * if not jump to preparing the write path
+         */
+        rc = do_decrypt
+            ? copycat_add_dec (&pb)
+            : copycat_add_crc (&pb);
+    }
+    copycat_log_set (save, NULL);
+
+    return rc;
+}
diff --git a/tools/copycat/cccopier.c b/tools/copycat/cccopier.c
new file mode 100644
index 0000000..07c6a21
--- /dev/null
+++ b/tools/copycat/cccopier.c
@@ -0,0 +1,217 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <stdlib.h>
+#include <atomic.h>
+
+#include <kapp/main.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/md5.h>
+#include <kapp/log.h>
+
+#include "copycat-priv.h"
+
+
+struct Copier
+{
+    atomic32_t refcount;
+    BufferQ * q;	/* input q for buffers to copy to file */
+    KFile * f;		/* output file (actually a KMD5File) */
+    uint64_t o;		/* how far into the output file are we */
+};
+
+
+rc_t CopierRelease (const Copier * cself)
+{
+    rc_t rc = 0;
+    Copier * self = (Copier*)cself;
+
+    if (self != NULL)
+    {
+	if (atomic32_dec_and_test (&self->refcount))
+	{
+	    rc = KFileRelease (self->f);
+	    if (rc == 0)
+	    {
+		rc = BufferQRelease (self->q);
+		if (rc == 0)
+		{
+		    free (self);
+		}
+	    }
+	}
+    }
+    return rc;
+}
+
+rc_t CopierAddRef (const Copier * self)
+{
+    if (self != NULL)
+	atomic32_inc (&((Copier*)self)->refcount);
+    return 0;
+}
+
+static
+rc_t CopierMakeF (Copier * cp, KDirectory * dir, const char * path)
+{
+    rc_t rc, orc;
+    KFile * fm;
+
+    rc = KDirectoryCreateFile (dir, &fm, true, 0666, kcmCreate|kcmParents,
+				"%s.md5", path);
+    if (rc == 0)
+    {
+	KMD5SumFmt * md5f;
+	rc = KMD5SumFmtMakeUpdate (&md5f, fm);
+	if (rc == 0)
+	{
+	    KFile * f;
+	    rc = KDirectoryCreateFile (dir, &f, false, 0666, kcmCreate, 
+                                    "%s", path);
+	    if (rc == 0)
+	    {
+		KMD5File * fmd5;
+		rc = KMD5FileMakeWrite (&fmd5, f, md5f, path);
+		if (rc == 0)
+		{
+		    cp->f = KMD5FileToKFile (fmd5);
+		    orc = KMD5SumFmtRelease (md5f);
+                    if (orc)
+                        LOGERR (klogInt, orc, "Failure releasing MD5 format");
+		    cp->o = 0; /* start of file */
+		    return rc;
+		}
+		orc = KFileRelease (f);
+                if (orc)
+                    LOGERR (klogInt, orc, "Failure releasing Copier file");
+	    }
+	    orc = KMD5SumFmtRelease (md5f);
+            if (orc)
+                LOGERR (klogInt, orc, "Failure releasing MD5 format");
+	}
+	orc = KFileRelease (fm);
+        if (orc)
+            LOGERR (klogInt, orc, "Failure releasing MD5SUM file");
+    }
+    return rc;
+}
+
+rc_t CopierMake (Copier ** c, KDirectory * dir, const char * path, uint32_t timeout, uint32_t length)
+{
+    rc_t rc = 0, orc;
+    Copier * self;
+
+    self = malloc (sizeof *self);
+    if (self == NULL)
+    {
+	rc = RC (rcExe, rcNoTarg, rcAllocating, rcMemory, rcExhausted);
+    }
+    else
+    {
+	atomic32_set (&self->refcount, 1);
+	self->f = NULL;
+	self->q = NULL;
+	rc = CopierMakeF (self, dir, path);
+	if (rc == 0)
+	{
+	    rc = BufferQMake (&self->q, timeout, length);
+	    if (rc == 0)
+	    {
+		*c = self;
+		atomic32_set (&self->refcount, 1);
+		return rc;
+	    }	    
+	}
+	orc = CopierRelease (self);
+        if (orc)
+            LOGERR (klogInt, orc, "Error releasing Copier");
+    }
+    return rc;
+}
+
+rc_t CopierDoOne (Copier * self)
+{
+    rc_t rc = 0;
+    const Buffer * b;
+
+    LOGMSG (klogDebug10, "CopierDoOne");
+    rc = Quitting();
+    if (rc == 0)
+    {
+	LOGMSG (klogDebug10, "call BufferQPopBuffer");
+	rc = BufferQPopBuffer (self->q, &b, NULL);
+	if (rc == 0)
+	{
+	    size_t w;
+	    size_t z;
+	    LOGMSG (klogDebug10, "call BufferContentGetSize");
+	    z = BufferContentGetSize (b);
+	    rc = KFileWrite (self->f, self->o, b, z, &w);
+	    self->o += w;
+	    if (w != z)
+		rc = RC (rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete);
+	    else
+		rc = BufferRelease (b);
+	}
+	/* ow this is ugly! */
+	/* is the rc a "exhausted" on a timeout? */
+	else if ((GetRCObject(rc) == rcTimeout) && (GetRCState(rc) == rcExhausted))
+	{
+	    rc = 0;
+	    LOGMSG (klogDebug10, "CopierDoOne timeout");
+	    /* if so is the queue also sealed? */
+	    if (BufferQSealed (self->q) == true)
+	    {
+		LOGMSG (klogDebug10, "CopierDoOne sealed");
+		/* if both then we are done and so signal */
+		rc = KFileRelease (self->f);
+		PLOGMSG (klogDebug10, "CopierDoOne back from KFileRelease $(rc)",PLOG_U32(rc),rc);
+		if (rc == 0)
+		{
+		    self->f = NULL;
+		    rc = BufferQRelease (self->q);
+		    if (rc == 0)
+		    {
+			self->q = NULL;
+			rc = RC (rcExe, rcNoTarg, rcCopying, rcNoTarg, rcDone );
+		    }
+		}
+	    }
+	}
+	else
+	    LOGMSG (klogDebug10, "CopierDoOne pop failure");
+
+    }
+    else
+	LOGMSG (klogDebug10, "CopierDoOne: quitting");
+    return rc;
+}
+
+BufferQ * CopierGetQ (Copier *self)
+{
+    return (self->q);
+}
+
diff --git a/tools/copycat/cccopy.c b/tools/copycat/cccopy.c
new file mode 100644
index 0000000..36f6447
--- /dev/null
+++ b/tools/copycat/cccopy.c
@@ -0,0 +1,347 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <assert.h>
+#include <atomic.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <kapp/log.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/md5.h>
+#include <kfs/teefile.h>
+#include "copycat.h"
+
+
+/* ======================================================================
+ * CCCopy does up the copy portion of the copycat tool's functionality
+ * and sets up CCCat that does the Catalog portion.
+ */
+struct CCCopy
+{
+    atomic32_t refcount;
+    const KDirectory * in;
+    KDirectory * out;
+    KDirectory * xml;
+    KMD5SumFmt * md5;
+    CCFileFormat * ff;
+    CCTree * tree;
+    uint32_t	timeout;
+    bool force;
+    char path[4096];
+};
+
+rc_t CCCopyAddRef (const CCCopy * self)
+{
+    if (self != NULL)
+	atomic32_inc (&((CCCopy*)self)->refcount);
+    return 0;
+}
+
+rc_t CCCopyRelease (const CCCopy * cself)
+{
+    CCCopy * self = (CCCopy *)cself;
+    rc_t rc = 0;
+    LOGMSG (klogDebug9, "Enter: CCCopyRelease");
+
+    if (self != NULL)
+    {
+	if (atomic32_dec_and_test (&self->refcount))
+	{
+	    KDirectoryRelease (self->in);
+	    KDirectoryRelease (self->out);
+	    KDirectoryRelease (self->xml);
+	    KMD5SumFmtRelease (self->md5);
+	    CCFileFormatRelease (self->ff);
+	    free (self);
+	}
+    }
+    return rc;
+}
+
+rc_t CCCopyMake (CCCopy ** p, const KDirectory * in,  KDirectory * out, 
+		  KDirectory * xml, bool force, KMD5SumFmt * md5,
+		  CCFileFormat * ff, CCTree * tree, const char * path)
+{
+    rc_t rc;
+    size_t pathlen;
+    CCCopy * self;
+    char relpath [4096];
+
+    assert (in != NULL);
+    assert (out != NULL);
+    assert (xml != NULL);
+    assert (path != NULL);
+
+    rc = KDirectoryResolvePath (in, false, relpath, sizeof relpath, "%s", path);
+    if (rc != 0)
+    {
+	pLOGERR (klogErr, rc, "unable to resolve path $(P)", PLOG_S(P), path);
+	return rc;
+    }
+    if ((relpath[0] == '.') && (relpath[1] == '.') && (relpath[2] == '/'))
+    {
+	rc = RC (rcExe, rcDirectory, rcResolving, rcPath, rcOutOfKDirectory);
+	pLOGERR (klogErr, rc, "Path must resolve to current directory or subdirectories $(P)",
+		 PLOG_S(P), relpath);
+	return rc;
+    }
+
+    pathlen = strlen(relpath);
+    self = malloc (sizeof (*self) - sizeof (*self->path) + pathlen + 1);
+    if (self == NULL)
+	rc = RC (rcExe, rcNoTarg, rcAllocating, rcMemory, rcExhausted);
+    else
+    {
+	atomic32_set (&self->refcount, 1);
+	KDirectoryAddRef (in);
+	KDirectoryAddRef (out);
+	KDirectoryAddRef (xml);
+	KMD5SumFmtAddRef (md5);
+	CCFileFormatAddRef (ff);
+	self->in = in;
+	self->out = out;
+	self->xml = xml;
+	self->force = force;
+	self->md5 = md5;
+	self->ff = ff;
+	self->tree = tree;
+	memcpy (self->path, relpath, pathlen+1);
+	*p = self;
+    }
+    return rc;
+}
+static
+rc_t CCCopyDoFile (CCCopy * self)
+{
+    const KFile * original;
+    rc_t rc = 0;
+    enum KCreateMode mode;
+    
+    PLOGMSG (klogDebug9, "CCCopyDoFile $(f)", PLOG_S(f), self->path);
+
+    if (! self->force)
+    {
+	/* if not forced replace mode we fail on existing file */
+	mode = kcmCreate;
+    }
+    else
+    {
+	uint32_t tt;
+
+	tt = KDirectoryPathType (self->out, "%s", self->path);
+	switch (tt)
+	{
+	default:
+	    PLOGMSG (klogWarn, "File exists and will be replaced in output directory $(f)",
+		     PLOG_S(f), self->path);
+	    break;
+	    /* if the path to the file or the file do not exist no warning */
+	case kptNotFound:
+	case kptBadPath:
+	    break;
+	}
+	tt = KDirectoryPathType (self->xml, "%s", self->path);
+	switch (tt)
+	{
+	default:
+	    PLOGMSG (klogWarn, "File exists and might be replaced in xml directory $(f)",
+		     PLOG_S(f), self->path);
+	    break;
+	    /* if the path to the file or the file do not exist no warning */
+	case kptNotFound:
+	case kptBadPath:
+	    break;
+	}
+
+	/* forced mode we create with init instead of create forcing a delete/create effect */
+	mode = kcmInit;
+    }
+
+    /* open original source for read */
+    rc = KDirectoryOpenFileRead (self->in, &original, "%s", self->path);
+    if (rc == 0)
+    {
+	KFile * copy;
+
+	/* create copy output for write */
+	rc = KDirectoryCreateFile (self->out, &copy, false, 0644, mode|kcmParents,
+                                "%s", self->path);
+	if (rc == 0)
+	{
+	    KFile * fm;
+
+	    /* create parallel <path>.md5 */
+	    rc = KDirectoryCreateFile (self->out, &fm, true, 0644, mode, "%s.md5",
+				       self->path);
+	    if (rc == 0)
+	    {
+		KMD5SumFmt * md5f;
+
+		/* make the .md5 an MD5 sum format file */
+		rc = KMD5SumFmtMakeUpdate (&md5f, fm);
+		if (rc == 0)
+		{
+		    union u
+		    {
+			KFile * kf;
+			KMD5File * mf;
+		    } outf;
+
+		    /* combine the copy and MD5 file into our special KFile */
+		    rc = KMD5FileMakeWrite (&outf.mf, copy, md5f, self->path);
+		    if (rc == 0)
+		    {
+			const KFile * inf;
+
+			/* release this outside reference to the MD5SumFMT leaving
+			 * only the one internal to the KMD5File */
+			KMD5SumFmtRelease (md5f);
+
+			/* create the KTeeFile that copies reads from the
+			 * original as writes to the copy.  Reads will be
+			 * made by the cataloging process */
+			rc = KFileMakeTeeRead (&inf, original, outf.kf);
+			if (rc == 0)
+			{
+			    CCCat * po;
+			    KTime_t mtime;
+
+			    /* try to get a modification time for this pathname */
+			    rc = KDirectoryDate (self->in, &mtime, "%s", self->path);
+			    if (rc != 0)
+				mtime = 0;	/* default to ? 0? */
+
+			    /* create the cataloger giving it the infile which
+			     * is the KTeeFile, Indirectory, the XML directory,
+			     * and the original path for the file */
+
+			    rc = CCCatMake (&po, self->in, self->xml, inf, self->md5,
+					    self->ff, mtime, self->tree, false, 0, self->path);
+			    if (rc == 0)
+			    {
+				/* do the catalog (and thus copy) */
+				rc = CCCatDo(po);
+				/* release the cataloger object */
+				CCCatRelease (po);
+			    }
+			    else
+				pLOGERR (klogDebug6, rc, "failure in CCCatMake $(P)",
+				     PLOG_S(P), self->path);
+			    /* release the infile which will complete a  copy 
+			     * regardless of the state of the cataloger */
+			    KFileRelease (inf);
+/* 			    return rc; */
+			}
+			else
+			{
+			    KFileRelease (outf.kf);
+			    KFileRelease (original);
+			    pLOGERR (klogDebug4, rc, "failure with kfilemaketeeread $(P)",
+				     PLOG_S(P), self->path);
+			} /* rc = KFileMakeTeeRead (&inf, original, outf.kf);*/
+		    }
+		    else
+		    {
+			KFileRelease (copy);
+			KMD5SumFmtRelease (md5f);
+			pLOGERR (klogDebug4, rc, "failure with KMD5FileMakeWrite $(P)",
+				 PLOG_S(P), self->path);
+		    } /* KMD5FileMakeWrite (&outf.mf, copy, md5f, self->path); */
+		} /* KDirectoryCreateFile (self->out, &fm, true, 0644, mode, "%s.md5", */
+		else
+		    pLOGERR (klogDebug4, rc, "failure with KMD5SumFmtMakeUpdate $(P)",
+			     PLOG_S(P), self->path);
+
+		KFileRelease (fm);
+	    } /* KDirectoryCreateFile (self->out, &fm, true, 0644, mode, "%s.md5", */
+	    else
+		pLOGERR (klogDebug4, rc, "failure with KDirectoryCreateFile $(P).md5",
+			 PLOG_S(P), self->path);
+	    KFileRelease (copy);
+	} /* rc = KDirectoryVCreateFile (self->out, &copy, false, 0644, mode|kcmParents, */
+	else
+	    pLOGERR (klogDebug4, rc, "failure with KDirectoryVCreateFile $(P)",
+		     PLOG_S(P), self->path);
+	KFileRelease (original);
+    } /* rc = KDirectoryVOpenFileRead (self->in, &original, self->path, NULL); */
+    else
+	pLOGERR (klogDebug4, rc, "failure with KDirectoryVOpenFileRead $(pP)",
+		 PLOG_S(P), self->path);
+    return rc;
+}
+
+static
+rc_t CCCopyDoDirectory (CCCopy * self)
+{
+    rc_t rc = 0;
+    PLOGMSG (klogInfo, "CCCopyDoDirectory $(d)", PLOG_S(d), self->path);
+
+    rc = RC (rcExe, rcDirectory, rcCopying, rcParam, rcUnsupported);
+    return rc;
+}
+rc_t CCCopyDo (CCCopy * self)
+{
+    rc_t rc = 0;
+    enum KPathType type;
+
+    assert (self != NULL);
+    assert (self->path != NULL);
+
+    type = KDirectoryPathType (self->in, "%s", self->path);
+    switch (type & ~kptAlias)
+    {
+    case kptNotFound:
+	rc = RC (rcExe, rcPath, rcAccessing, rcPath, rcNotFound);
+	break;
+    default:
+    case kptBadPath:
+	rc = RC (rcExe, rcPath, rcAccessing, rcPath, rcInvalid);
+	break;
+    case kptFile:
+	rc = CCCopyDoFile (self);
+	break;
+    case kptDir:
+#if 0
+	rc = CCCopyDoDirectory (self);
+#else
+	rc = PLOGMSG (klogInfo, "Ignoring directory $(p)",PLOG_S(p),self->path);
+#endif
+	break;
+    case kptCharDev:
+	rc = PLOGMSG (klogInfo, "Ignoring kptCharDev $(p)",PLOG_S(p),self->path);
+	break;
+    case kptBlockDev:
+	rc = PLOGMSG (klogInfo, "Ignoring kptBlockDev $(p)",PLOG_S(p),self->path);
+	break;
+    case kptFIFO:
+	rc = PLOGMSG (klogInfo, "Ignoring kptFIFO $(p)",PLOG_S(p),self->path);
+	break;
+    }
+    return rc;
+}
+
diff --git a/tools/copycat/ccfile.c b/tools/copycat/ccfile.c
new file mode 100644
index 0000000..22ea5ee
--- /dev/null
+++ b/tools/copycat/ccfile.c
@@ -0,0 +1,271 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ */
+
+#include <klib/log.h>
+#include <klib/debug.h>
+#include <klib/rc.h>
+#include <kfs/file.h>
+#include <kfs/countfile.h>
+#include <sysalloc.h>
+
+#include <assert.h>
+#include <stdlib.h>
+
+/* ======================================================================
+ * CCFile
+ */
+/* -----
+ * define the specific types to be used in the templatish/inheritancish
+ * definition of vtables and their elements
+ */
+typedef struct CCFile CCFile;
+#define KFILE_IMPL struct CCFile
+#include <kfs/impl.h>
+
+
+/*-----------------------------------------------------------------------
+ * CCFile
+ */
+struct CCFile
+{
+    KFile	dad;
+    KFile *	original;
+    rc_t *      prc;
+};
+
+
+/* ----------------------------------------------------------------------
+ * Destroy
+ *
+ */
+static
+rc_t CC CCFileDestroy (CCFile *self)
+{
+    rc_t rc = KFileRelease (self->original);
+    free (self);
+    return rc;
+}
+
+/* ----------------------------------------------------------------------
+ * GetSysFile
+ *  returns an underlying system file object
+ *  and starting offset to contiguous region
+ *  suitable for memory mapping, or NULL if
+ *  no such file is available.
+ *
+ * bytes could not be counted if memory mapped so this is disallowed
+ */
+
+static
+struct KSysFile *CC CCFileGetSysFile (const CCFile *self, uint64_t *offset)
+{
+    return KFileGetSysFile (self->original, offset);
+}
+
+/* ----------------------------------------------------------------------
+ * RandomAccess
+ *
+ *  returns 0 if random access, error code otherwise
+ */
+static
+rc_t CC CCFileRandomAccess (const CCFile *self)
+{
+    assert (self != NULL);
+    assert (self->original != NULL);
+    return KFileRandomAccess (self->original);
+}
+
+/* ----------------------------------------------------------------------
+ * Type
+ *  returns a KFileDesc
+ *  not intended to be a content type,
+ *  but rather an implementation class
+ */
+static
+uint32_t CC CCFileType (const CCFile *self)
+{
+    return KFileType (self->original);
+}
+
+/* ----------------------------------------------------------------------
+ * Size
+ *  returns size in bytes of file
+ *
+ *  "size" [ OUT ] - return parameter for file size
+ */
+static
+rc_t CC CCFileSize (const CCFile *self, uint64_t *size)
+{
+    return KFileSize (self->original, size);
+}
+
+/* ----------------------------------------------------------------------
+ * SetSize
+ *  sets size in bytes of file
+ *
+ *  "size" [ IN ] - new file size
+ */
+static
+rc_t CC CCFileSetSize (CCFile *self, uint64_t size)
+{
+    return KFileSetSize (self->original, size);
+}
+
+/* ----------------------------------------------------------------------
+ * Read
+ *  read file from known position
+ *
+ *  "pos" [ IN ] - starting position within file
+ *
+ *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
+ *
+ *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
+ *  giving number of bytes actually read
+ */
+static
+rc_t CC CCFileRead	(const CCFile *self,
+                         uint64_t pos,
+                         void *buffer,
+                         size_t bsize,
+                         size_t *num_read)
+{
+    rc_t	rc;
+    
+    rc = KFileRead (self->original, pos, buffer, bsize, num_read);
+    if (*self->prc == 0)
+        *((CCFile*)self)->prc = rc;
+    return rc;
+}
+
+/* ----------------------------------------------------------------------
+ * Write
+ *  write file at known position
+ *
+ *  "pos" [ IN ] - starting position within file
+ *
+ *  "buffer" [ IN ] and "size" [ IN ] - data to be written
+ *
+ *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
+ *  giving number of bytes actually written
+ *
+ */
+static
+rc_t CC CCFileWrite (CCFile *self, uint64_t pos,
+                     const void *buffer, size_t bsize,
+                     size_t *num_writ)
+{
+    rc_t rc;
+
+    rc = KFileWrite (self->original, pos, buffer, bsize, num_writ);
+    if (*self->prc == 0)
+        *self->prc = rc;
+    return rc;
+}
+
+static const KFile_vt_v1 vtCCFile =
+{
+    /* version */
+    1, 1,
+
+    /* 1.0 */
+    CCFileDestroy,
+    CCFileGetSysFile,
+    CCFileRandomAccess,
+    CCFileSize,
+    CCFileSetSize,
+    CCFileRead,
+    CCFileWrite,
+
+    /* 1.1 */
+    CCFileType
+};
+
+/* ----------------------------------------------------------------------
+ * CCFileMake
+ *  create a new file object
+ */
+
+static
+rc_t CCFileMake (CCFile ** pself,
+                 KFile * original,
+                 rc_t * prc)
+{
+    CCFile * self;
+    rc_t rc;
+    /* needs to be better */
+    assert (pself);
+    assert (original);
+    assert (prc);
+
+    self = malloc (sizeof (CCFile));
+    if (self == NULL)	/* allocation failed */
+    {
+	/* fail */
+	rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
+    }
+    else
+    {
+	rc = KFileInit (&self->dad,			/* initialize base class */
+			(const KFile_vt*)&vtCCFile,/* VTable for CCFile */
+            "CCFile", "no-name",
+			original->read_enabled,
+			original->write_enabled);
+	if (rc == 0)
+	{
+            rc = KFileAddRef (original);
+            if (rc == 0)
+            {
+                self->original = original;
+                self->prc = prc;
+                *pself = self;
+                return *prc = 0;
+            }
+	}
+	/* fail */
+	free (self);
+    }
+    *pself = NULL;
+    *prc = rc;
+    return rc;
+}
+
+LIB_EXPORT rc_t CC CCFileMakeRead (const KFile ** self, const KFile * original,
+                                   rc_t * prc)
+{
+    return CCFileMake ((CCFile **)self, (KFile*)original, prc);
+}
+LIB_EXPORT rc_t CC CCFileMakeUpdate (KFile ** self, KFile * original,
+                                     rc_t * prc)
+{
+    return CCFileMake ((CCFile **)self, (KFile*)original, prc);
+}
+LIB_EXPORT rc_t CC CCFileMakeWrite (KFile ** self, KFile * original,
+                                    rc_t * prc)
+{
+    return CCFileMake ((CCFile **)self, (KFile*)original, prc);
+}
+
+/* end of file countfile.c */
+
diff --git a/tools/copycat/ccfileformat.c b/tools/copycat/ccfileformat.c
new file mode 100644
index 0000000..58ca4db
--- /dev/null
+++ b/tools/copycat/ccfileformat.c
@@ -0,0 +1,405 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <klib/rc.h>
+#include <klib/debug.h>
+#include <klib/log.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <kfs/file.h>
+#include <kfs/fileformat.h>
+#include <kfs/ffext.h>
+#include <kfs/ffmagic.h>
+#include <krypto/wgaencrypt.h>
+#include <kfg/config.h>
+#include <atomic32.h>
+#include <stddef.h>
+#include "copycat-priv.h"
+#include "debug.h"
+
+bool CCFileFormatIsNCBIEncrypted ( void  * buffer )
+{
+    static const char file_sig[] = "NCBInenc";
+
+    return (memcmp (buffer, file_sig, sizeof file_sig - 1) == 0);
+}
+bool CCFileFormatIsKar ( void  * buffer )
+{
+    static const char file_sig[] = "NCBI.sra";
+
+    return (memcmp (buffer, file_sig, sizeof file_sig - 1) == 0);
+}
+
+
+
+
+CCFileFormat *filefmt;
+
+/* ======================================================================
+ * Process does up the copy portion of the copycat tool's functionality
+ * and sets up ProcessOne that does the Catalog portion.
+ */
+struct CCFileFormat
+{
+    KFileFormat * magic;
+    KFileFormat * ext;
+    atomic32_t	  refcount;
+};
+
+static const char magictable [] = 
+{
+    "Generic Format for Sequence Data (SRF)\tSequenceReadFormat\n"
+    "GNU tar archive\tTapeArchive\n"
+    "POSIX tar archive\tTapeArchive\n"
+    "POSIX tar archive (GNU)\tTapeArchive\n"
+    "Standard Flowgram Format (SFF)\tStandardFlowgramFormat\n"
+    "NCBI kar sequence read archive\tSequenceReadArchive\n"
+    "tar archive\tTapeArchive\n"
+    "XML document text\tExtensibleMarkupLanguage\n"
+    "bzip2 compressed data\tBzip\n"
+    "Zip archive data\tWinZip\n"
+    "gzip compressed data\tGnuZip\n"
+};
+static const char exttable [] = 
+{
+    "Unknown\tUnknown\n"
+    "bam\tBinaryAlignmentMap\n"
+    "bz2\tBzip\n"
+    "gz\tGnuZip\n"
+    "tgz\tGnuZip\n"
+    "sff\tStandardFlowgramFormat\n"
+    "sra\tSequenceReadArchive\n"
+    "srf\tSequenceReadFormat\n"
+    "tar\tTapeArchive\n"
+    "xml\tExtensibleMarkupLanguage\n"
+    "h5\tHD5\n"
+};
+
+static const char classtable [] = 
+{
+    "Archive\n"
+    "Cached\n"
+    "Compressed\n"
+    "Read\n"
+};
+    
+static const char formattable [] = 
+{
+    "BinaryAlignmentMap\tRead\n"
+    "Bzip\tCompressed\n"
+    "GnuZip\tCompressed\n"
+    "WinZip\tRead\n"
+    "ExtensibleMarkupLanguage\tCached\n"
+    "SequenceReadFormat\tRead\n"
+    "SequenceReadArchive\tArchive\n"
+    "StandardFlowgramFormat\tRead\n"
+    "TapeArchive\tArchive\n"
+    "HD5\tArchive\n"
+};
+
+static const char magicpath [] = "/usr/share/misc/magic";
+
+rc_t CCFileFormatAddRef (const CCFileFormat * self)
+{
+    if (self != NULL)
+        atomic32_inc (&((CCFileFormat*)self)->refcount);
+    return 0;
+}
+
+rc_t CCFileFormatRelease (const CCFileFormat * cself)
+{
+    rc_t rc = 0;
+    CCFileFormat *self;
+
+    self = (CCFileFormat *)cself; /* mutable field is ref count */
+    if (self != NULL)
+    {
+        if (atomic32_dec_and_test (&self->refcount))
+        {
+            DEBUG_STATUS(("%s call KFileFormatRelease for extentions\n", __func__));
+            rc = KFileFormatRelease (self->ext);
+            if (rc == 0)
+            {
+                DEBUG_STATUS(("%s call KFileFormatRelease for magic\n", __func__));
+                rc = KFileFormatRelease (self->magic);
+                if (rc == 0)
+                {
+                    free (self);
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t CCFileFormatMake (CCFileFormat ** p)
+{
+    rc_t rc;
+    CCFileFormat * self;
+
+    DEBUG_ENTRY();
+
+    self = malloc (sizeof *self);
+
+    if (self == NULL)
+    {
+        rc = RC (rcExe, rcFileFormat, rcCreating, rcMemory, rcExhausted);
+    }
+    else
+    {
+        /* magic file has to be located next to the executable */
+        KConfig* kfg;
+        rc = KConfigMake ( &kfg, NULL );
+        if ( rc == 0 )
+        {
+            String* bindir;
+            rc = KConfigReadString ( kfg, "vdb/lib/paths/kfg", &bindir );
+            KConfigRelease ( kfg );
+            if ( rc == 0 )
+            {
+                char magicpath[1024];
+                size_t num_writ;
+                rc = string_printf ( magicpath, sizeof ( magicpath ), &num_writ, "%S/magic", bindir );
+                StringWhack ( bindir );
+                if ( rc == 0 )
+                {
+                    rc = KExtFileFormatMake (&self->ext, exttable, sizeof (exttable) - 1,
+                                             formattable, sizeof (formattable) - 1);
+                    if (rc == 0)
+                    {
+                        rc = KMagicFileFormatMake (&self->magic, magicpath, magictable,
+                                                   sizeof (magictable) - 1, 
+                                                   formattable, sizeof (formattable) - 1);
+                        if (rc == 0)
+                        {
+                            atomic32_set (&self->refcount , 1);
+                            *p = self;
+                            return 0;
+                        }
+                    }
+                }
+            }
+        }
+        free (self);
+    }
+    *p = NULL;
+    return rc;
+}
+
+rc_t CCFileFormatGetType (const CCFileFormat * self, const KFile * file,
+     const char * path, char * buffer, size_t buffsize, uint32_t * ptype, uint32_t * pclass)
+{
+    static const char u_u[] = "Unknown/Unknown";
+    rc_t rc, orc;
+
+    int ret;
+    size_t mtz;
+    size_t etz;
+    size_t num_read;
+    KFileFormatType mtype;
+    KFileFormatType etype;
+    KFileFormatClass mclass;
+    KFileFormatClass eclass;
+    char	mclassbuf	[256];
+    char	mtypebuf	[256];
+    char	eclassbuf	[256];
+    char	etypebuf	[256];
+    uint8_t	preread	[8192];
+
+    DEBUG_ENTRY();
+    DEBUG_STATUS(("%s: getting type for (%s)\n",__func__,path));
+
+    /* initially assume that we don't know the type or class
+     * these are just treated as files with no special processing
+     * more than we that we don't know the type or class */
+
+    *pclass = *ptype = 0;
+    strncpy (buffer, u_u, buffsize);
+    buffer[buffsize-1] = '\0'; /* in case we got truncated in the copy above */
+
+    orc = KFileRead (file, 0, preread, sizeof (preread), &num_read);
+    if (orc == 0)
+    {
+        if (CCFileFormatIsKar (preread))
+        {
+            *pclass = ccffcArchive;
+            *ptype = ccfftaSra;
+            strncpy (buffer, "Archive/SequenceReadArchive", buffsize);
+            return 0;
+        }
+        if (CCFileFormatIsNCBIEncrypted (preread))
+        {
+            *pclass = ccffcEncoded;
+            *ptype = ccffteNCBI;
+            strncpy (buffer, "Encoded/NCBI", buffsize);
+            return 0;
+        }
+        /* Sorta kinda hack to see if the file is WGA encrypted 
+         * We short cut the other stuff if it is WGA encoded
+         */
+        if (KFileIsWGAEnc (preread, num_read) == 0)
+        {
+            *pclass = ccffcEncoded;
+            *ptype = ccffteWGA;
+            strncpy (buffer, "Encoded/WGA", buffsize);
+            return 0;
+        }
+        
+
+        rc = KFileFormatGetTypePath (self->ext, NULL, path, &etype, &eclass,
+                                 etypebuf, sizeof (etypebuf), &etz);
+        if (rc == 0)
+        {
+
+            rc = KFileFormatGetTypeBuff (self->magic, preread, num_read, &mtype, 
+                                         &mclass, mtypebuf, sizeof (mtypebuf), &mtz);
+            if (rc == 0)
+            {
+                rc = KFileFormatGetClassDescr (self->ext, eclass, eclassbuf, sizeof (eclassbuf));
+                if (rc == 0)
+                {
+                    rc = KFileFormatGetClassDescr (self->magic, mclass, mclassbuf, sizeof (mclassbuf));
+                    if (rc == 0)
+                    {
+                        DEBUG_STATUS(("%s: (%s) %s/%s<=%s/%s\n", __func__,
+                                      path, mclassbuf, mtypebuf, eclassbuf, etypebuf));
+
+                        /* first handle known special cases */
+                        if ((strcmp("WinZip", mtypebuf) == 0) &&
+                            (strcmp("GnuZip", etypebuf) == 0))
+                        {
+                            /* we've gotten in too many Zip files with extension gz */
+                            PLOGMSG (klogWarn, 
+                                     (klogWarn, "File '$(path)' is in unzupported winzip/pkzip format",
+                                      "path=%s", path));
+                        }
+                        else if (!strcmp("BinaryAlignmentMap", etypebuf) && !strcmp ("GnuZip", mtypebuf))
+                        {
+				/*** bam files have gnuzip magic, we need to treat them as data files ***/
+				strcpy (mclassbuf, eclassbuf );
+				strcpy (mtypebuf, etypebuf);
+				mtype = etype;
+                                mclass = eclass;
+			}
+                        else if ((strcmp("SequenceReadArchive", etypebuf) == 0) &&
+                                 (strcmp("Unknown", mtypebuf) == 0))
+                        {
+                            /* magic might not detect SRA/KAR files yet */
+                            DEBUG_STATUS(("%s: (%s) %s/%s<=%s/%s\n", __func__,
+                                          path, mclassbuf, mtypebuf, eclassbuf, etypebuf));
+                            strcpy (mclassbuf, eclassbuf);
+                            strcpy (mtypebuf, etypebuf);
+                            mtype = etype;
+                            mclass = eclass;
+                        }
+                        else if ((strcmp("HD5", etypebuf) == 0) &&
+                                 (strcmp("Unknown", mtypebuf) == 0))
+                        {
+                            DEBUG_STATUS(("%s:5 (%s) %s/%s<=%s/%s\n", __func__,
+                                          path, mclassbuf, mtypebuf, eclassbuf, etypebuf));
+                            strcpy (mclassbuf, eclassbuf);
+                            strcpy (mtypebuf, etypebuf);
+                            mtype = etype;
+                            mclass = eclass;
+                        }
+
+                        /* now that we've fixed a few cases use the magic derived
+                         * class and type as the extensions could be wrong and can
+                         * cause failures */
+                        if (strcmp ("Archive", mclassbuf) == 0)
+                        {       
+                            *pclass = ccffcArchive;
+                            if (strcmp ("TapeArchive", mtypebuf) == 0)
+                                *ptype = ccfftaTar;
+                            else if (strcmp ("SequenceReadArchive", mtypebuf) == 0)
+                                *ptype = ccfftaSra;
+                        }
+                        else if (strcmp("Compressed", mclassbuf) == 0)
+                        {
+                            *pclass = ccffcCompressed;
+                            if (strcmp ("Bzip", mtypebuf) == 0)
+                            {
+                                *ptype = ccfftcBzip2;
+                                if ( no_bzip2 )
+                                    * pclass = *ptype = 0;
+                            }
+                            else if (strcmp ("GnuZip", mtypebuf) == 0)
+                                *ptype = ccfftcGzip;
+                        }
+
+                        /* Hmmm... we are using extension to determine XML though
+                         * Probably okay */
+                        else if (strcmp ("Cached", eclassbuf) == 0)
+                        {
+                            *pclass = ccffcCached;
+                            if (strcmp ("ExtensibleMarkupLanguage", etypebuf) == 0)
+                                *ptype = ccfftxXML;
+                            strcpy (mclassbuf, eclassbuf);
+                            strcpy (mtypebuf, etypebuf);
+
+                        }
+
+                        /* build the eventual filetype string - vaguely mime type like */
+#if 1
+                        ret = snprintf (buffer, buffsize, "%s/%s", mclassbuf, mtypebuf);
+                        if (ret >= buffsize)
+                        {
+                            ret = buffsize-1;
+                            buffer[buffsize-1] = '\0';
+                        }
+                        
+#else
+                        ecz = strlen (eclassbuf);
+                        num_read = (ecz < buffsize) ? ecz : buffsize;
+                        strncpy (buffer, eclassbuf, buffsize);
+                        if (num_read >= (buffsize-2))
+                            buffer [num_read] = '\0';
+                        else
+                        {
+                            buffer [num_read++] = '/';
+                            strncpy (buffer+num_read, etypebuf, 
+                                     buffsize - num_read);
+                        }
+                        buffer[buffsize-1] = '\0';
+                        /* 			    buffer [num_read++] = '/'; */
+#endif
+                    }
+                }
+            }
+        }
+        if (rc)
+        {
+            *pclass = *ptype = 0;
+            strncpy (buffer, u_u, buffsize);
+            buffer[buffsize-1] = '\0'; /* in case we got truncated in the copy above */
+        }
+    }
+    return orc;
+}
diff --git a/tools/copycat/ccproc.c b/tools/copycat/ccproc.c
new file mode 100644
index 0000000..a0f64fe
--- /dev/null
+++ b/tools/copycat/ccproc.c
@@ -0,0 +1,319 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <assert.h>
+#include <atomic.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <kapp/log.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/md5.h>
+#include <kfs/teefile.h>
+#include "copycat.h"
+
+
+/* ======================================================================
+ * Process does up the copy portion of the copycat tool's functionality
+ * and sets up ProcessOne that does the Catalog portion.
+ */
+struct Process
+{
+    atomic32_t refcount;
+    const KDirectory * in;
+    KDirectory * out;
+    KDirectory * xml;
+    KMD5SumFmt * md5;
+    CCFileFormat * ff;
+    uint32_t	timeout;
+    bool force;
+    char path[4096];
+};
+
+rc_t ProcessAddRef (const Process * self)
+{
+    if (self != NULL)
+	atomic32_inc (&((Process*)self)->refcount);
+    return 0;
+}
+
+rc_t ProcessRelease (const Process * cself)
+{
+    Process * self = (Process *)cself;
+    rc_t rc = 0;
+    LOGMSG (klogDebug10, "Enter: ProcessRelease");
+
+    if (self != NULL)
+    {
+	if (atomic32_dec_and_test (&self->refcount))
+	{
+	    KDirectoryRelease (self->in);
+	    KDirectoryRelease (self->out);
+	    KDirectoryRelease (self->xml);
+	    KMD5SumFmtRelease (self->md5);
+	    CCFileFormatRelease (self->ff);
+	    free (self);
+	}
+    }
+    return rc;
+}
+
+rc_t ProcessMake (Process ** p, const KDirectory * in,  KDirectory * out, 
+		  KDirectory * xml, bool force, KMD5SumFmt * md5,
+		  CCFileFormat * ff, const char * path)
+{
+    rc_t rc;
+    size_t pathlen;
+    Process * self;
+    char relpath [4096];
+
+    assert (in != NULL);
+    assert (out != NULL);
+    assert (xml != NULL);
+    assert (path != NULL);
+
+    rc = KDirectoryResolvePath (in, false, relpath, sizeof relpath, "%s", path);
+    if (rc != 0)
+    {
+	pLOGERR (klogErr, rc, "unable to resolve path $(P)", PLOG_S(P), path);
+	return rc;
+    }
+    if ((relpath[0] == '.') && (relpath[1] == '.') && (relpath[2] == '/'))
+    {
+	rc = RC (rcExe, rcDirectory, rcResolving, rcPath, rcOutOfKDirectory);
+	pLOGERR (klogErr, rc, "Path must resolve to current directory or subdirectories $(P)",
+		 PLOG_S(P), relpath);
+	return rc;
+    }
+
+    pathlen = strlen(relpath);
+    self = malloc (sizeof (*self) - sizeof (*self->path) + pathlen + 1);
+    if (self == NULL)
+	rc = RC (rcExe, rcNoTarg, rcAllocating, rcMemory, rcExhausted);
+    else
+    {
+	atomic32_set (&self->refcount, 1);
+	KDirectoryAddRef (in);
+	KDirectoryAddRef (out);
+	KDirectoryAddRef (xml);
+	KMD5SumFmtAddRef (md5);
+	CCFileFormatAddRef (ff);
+	self->in = in;
+	self->out = out;
+	self->xml = xml;
+	self->force = force;
+	self->md5 = md5;
+	self->ff = ff;
+	memcpy (self->path, relpath, pathlen+1);
+	*p = self;
+    }
+    return rc;
+}
+static
+rc_t ProcessDoFile (Process * self)
+{
+    const KFile * original;
+    rc_t rc = 0;
+    enum KCreateMode mode;
+    
+    PLOGMSG (klogDebug10, "ProcessDoFile $(f)", PLOG_S(f), self->path);
+
+
+    if (! self->force)
+    {
+	/* if not forced replace mode we fail on existing file */
+	mode = kcmCreate;
+    }
+    else
+    {
+	uint32_t tt;
+
+	tt = KDirectoryPathType (self->out, "%s", self->path);
+	switch (tt)
+	{
+	default:
+	    PLOGMSG (klogWarn, "File exists and will be replaced in output directory $(f)",
+		     PLOG_S(f), self->path);
+	    break;
+	    /* if the path to the file or the file do not exist no warning */
+	case kptNotFound:
+	case kptBadPath:
+	    break;
+	}
+	tt = KDirectoryPathType (self->xml, "%s", self->path);
+	switch (tt)
+	{
+	default:
+	    PLOGMSG (klogWarn, "File exists and might be replaced in xml directory $(f)",
+		     PLOG_S(f), self->path);
+	    break;
+	    /* if the path to the file or the file do not exist no warning */
+	case kptNotFound:
+	case kptBadPath:
+	    break;
+	}
+
+	/* forced mode we create with init instead of create forcing a delete/create effect */
+	mode = kcmInit;
+    }
+
+    /* open originial source for read */
+    rc = KDirectoryOpenFileRead (self->in, &original, "%s", self->path);
+    if (rc == 0)
+    {
+	KFile * copy;
+
+	/* create copy output for write */
+	rc = KDirectoryCreateFile (self->out, &copy, false, 0644, mode|kcmParents,
+                               "%s", self->path);
+	if (rc == 0)
+	{
+	    KFile * fm;
+
+	    /* create parallel <path>.md5 */
+	    rc = KDirectoryCreateFile (self->out, &fm, true, 0644, mode, "%s.md5",
+				       self->path);
+	    if (rc == 0)
+	    {
+		KMD5SumFmt * md5f;
+
+		/* make the .md5 an MD5 sum format file */
+		rc = KMD5SumFmtMakeUpdate (&md5f, fm);
+		if (rc == 0)
+		{
+		    union u
+		    {
+			KFile * kf;
+			KMD5File * mf;
+		    } outf;
+
+		    /* combine the copy and MD5 file into our special KFile */
+		    rc = KMD5FileMakeWrite (&outf.mf, copy, md5f, self->path);
+		    if (rc == 0)
+		    {
+			const KFile * inf;
+
+			/* release this outside reference to the MD5SumFMT leaving
+			 * only the one internal to the KMD5File */
+			KMD5SumFmtRelease (md5f);
+
+			/* create the KTeeFile that copies reads from the
+			 * original as writes to the copy.  Reads will be
+			 * made by the cataloging process */
+			rc = KFileMakeTeeRead (&inf, original, outf.kf);
+			if (rc == 0)
+			{
+			    ProcessOne * po;
+
+			    /* create the cataloger giving it the infile which
+			     * is the KTeeFile, Indirectory, the XML directory,
+			     * and the original path for the file */
+			    rc = ProcessOneMake (&po, self->in, self->xml, inf,
+						 self->md5, self->ff, self->path);
+			    if (rc == 0)
+			    {
+				/* do the catalog (and thus copy) */
+				rc = ProcessOneDo(po);
+				/* release the cataloger object */
+				ProcessOneRelease (po);
+			    }
+			    /* release the infile which will complete a  copy 
+			     * regardless of the state of the cataloger */
+			    KFileRelease (inf);
+/* 			    return rc; */
+			}
+			else
+			{
+			    KFileRelease (outf.kf);
+			    KFileRelease (original);
+			} /* rc = KFileMakeTeeRead (&inf, original, outf.kf);*/
+		    }
+		    else
+		    {
+			KFileRelease (copy);
+			KMD5SumFmtRelease (md5f);
+		    } /* KMD5FileMakeWrite (&outf.mf, copy, md5f, self->path); */
+		} /* KDirectoryCreateFile (self->out, &fm, true, 0644, mode, "%s.md5", */
+		KFileRelease (fm);
+	    } /* KDirectoryCreateFile (self->out, &fm, true, 0644, mode, "%s.md5", */
+	    KFileRelease (copy);
+	} /* rc = KDirectoryVCreateFile (self->out, &copy, false, 0644, mode|kcmParents, */
+	KFileRelease (original);
+    } /* rc = KDirectoryVOpenFileRead (self->in, &original, self->path, NULL); */
+    return rc;
+}
+
+static
+rc_t ProcessDoDirectory (Process * self)
+{
+    rc_t rc = 0;
+    PLOGMSG (klogInfo, "ProcessDoDirectory $(d)", PLOG_S(d), self->path);
+
+    rc = RC (rcExe, rcDirectory, rcCopying, rcParam, rcUnsupported);
+    return rc;
+}
+rc_t ProcessDo (Process * self)
+{
+    rc_t rc = 0;
+    enum KPathType type;
+
+    assert (self != NULL);
+    assert (self->path != NULL);
+
+    type = KDirectoryPathType (self->in, "%s", self->path);
+    switch (type & ~kptAlias)
+    {
+    case kptNotFound:
+	rc = RC (rcExe, rcPath, rcAccessing, rcPath, rcNotFound);
+	break;
+    default:
+    case kptBadPath:
+	rc = RC (rcExe, rcPath, rcAccessing, rcPath, rcInvalid);
+	break;
+    case kptFile:
+	rc = ProcessDoFile (self);
+	break;
+    case kptDir:
+#if 0
+	rc = ProcessDoDirectory (self);
+#else
+	rc = PLOGMSG (klogInfo, "Ignoring directory $(p)",PLOG_S(p),self->path);
+#endif
+	break;
+    case kptCharDev:
+	rc = PLOGMSG (klogInfo, "Ignoring kptCharDev $(p)",PLOG_S(p),self->path);
+	break;
+    case kptBlockDev:
+	rc = PLOGMSG (klogInfo, "Ignoring kptBlockDev $(p)",PLOG_S(p),self->path);
+	break;
+    case kptFIFO:
+	rc = PLOGMSG (klogInfo, "Ignoring kptFIFO $(p)",PLOG_S(p),self->path);
+	break;
+    }
+    return rc;
+}
+
diff --git a/tools/copycat/ccprocone.c b/tools/copycat/ccprocone.c
new file mode 100644
index 0000000..57c971f
--- /dev/null
+++ b/tools/copycat/ccprocone.c
@@ -0,0 +1,217 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <assert.h>
+#include <atomic.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <kapp/log.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/md5.h>
+#include <kfs/teefile.h>
+#include <kfs/buffile.h>
+/* #include <klib/rc.h> */
+
+#include "copycat.h"
+
+/* ==========
+ * Process is a generic buffer to be used to pass data between co-routines or 
+ * threads.
+ */
+
+struct ProcessOne
+{
+    atomic32_t	refcount;	/* how many references to this object */
+    const KDirectory * dir;
+    KDirectory * xml;
+    const KFile * file;
+    CCFileFormat * ff;
+    KMD5SumFmt *md5;
+    char path [4096];
+};
+
+rc_t ProcessOneMake (ProcessOne ** ppo, const KDirectory * dir, KDirectory * xml,
+		     const KFile * file, KMD5SumFmt *md5, CCFileFormat * ff,
+		     const char * path)
+{
+    ProcessOne * self;
+    rc_t rc = 0;
+    size_t pathlen;
+
+    PLOGMSG (klogDebug10, "ProcessOneMake $(f)", PLOG_S(f), path);
+    /* legit seeming inputs? these could be replaced with RC returns */
+    assert (ppo != NULL);
+    assert (file != NULL);
+    assert (path != NULL);
+
+    /* allocate the object */
+    pathlen = strlen (path);
+    self = malloc (sizeof (*self) - sizeof(self->path) + pathlen + 1);
+    if (self == NULL)
+    {
+	rc = RC (rcExe, rcNoTarg, rcAllocating, rcMemory, rcExhausted);
+    }
+    else
+    {
+	atomic32_set (&self->refcount, 1);
+	KDirectoryAddRef (dir);
+	KDirectoryAddRef (xml);
+	KMD5SumFmtAddRef (md5);
+	CCFileFormatAddRef (ff);
+	KFileAddRef (file);
+	self->dir = dir;
+	self->xml = xml;
+	self->md5 = md5;
+	self->file = file;
+	self->ff = ff;
+	memcpy (self->path, path, pathlen);
+	self->path[pathlen] = '\0';
+	rc = 0;
+    }
+    *ppo = self;
+    return rc;
+}
+
+rc_t ProcessOneAddRef (const ProcessOne * self)
+{
+    if (self != NULL)
+	atomic32_inc (&((ProcessOne*)self)->refcount);
+    return 0;
+}
+rc_t ProcessOneRelease (const ProcessOne * cself)
+{
+    ProcessOne * self = (ProcessOne *)cself;
+    rc_t rc = 0;
+
+    if (self != NULL)
+    {
+	PLOGMSG (klogDebug10, "ProcessOneRelease $(f)", PLOG_S(f), self->path);
+	if (atomic32_dec_and_test (&self->refcount))
+	{
+	    KDirectoryRelease (self->dir);
+	    KDirectoryRelease (self->xml);
+	    KMD5SumFmtRelease (self->md5);
+	    CCFileFormatRelease (self->ff);
+	    KFileRelease (self->file);
+	    free (self);
+	}
+    }
+    return rc;
+}
+const char * typeToString (enum KPathType type)
+{
+    switch (type)
+    {
+    default:
+	return "bad-KPathType";
+    case kptNotFound:
+	return "not-found";
+    case kptBadPath:
+	return "bad-path";
+    case kptFile:
+	return "file";
+    case kptDir:
+	return "directory";
+    case kptCharDev:
+	return "character-device";
+    case kptBlockDev:
+	return "block-device";
+    case kptFIFO:
+	return "fifo";
+    case kptAlias|kptNotFound:
+	return "link-to-not-found";
+    case kptAlias|kptBadPath:
+	return "link-to-bad-path";
+    case kptAlias|kptFile:
+	return "link-to-file";
+    case kptAlias|kptDir:
+	return "link-to-directory";
+    case kptAlias|kptCharDev:
+	return "link-to-character-device";
+    case kptAlias|kptBlockDev:
+	return "link-to-block-device";
+    case kptAlias|kptFIFO:
+	return "link-to-fifo";
+    }
+}
+rc_t ProcessOneDoFile (ProcessOne * self)
+{
+    rc_t rc = 0;
+    KFile * mfile;
+    
+    PLOGMSG (klogInfo, "ProcessOneDoFile: $(F)", PLOG_S(F), self->path);
+
+
+    rc = KFileMakeNewMD5Read (&mfile, self->file, self->md5, self->path);
+    if (rc == 0)
+    {
+	const KFile * bfile;
+	rc = KFileMakeBuf (&bfile, mfile, 64*1024);
+	if (rc == 0)
+	{
+	    /* add more here */
+
+	    KFileRelease (bfile);
+	}
+	else
+	{
+	    pLOGERR (klogErr, rc, "Failure to initiate buffer $(F)", PLOG_S(F), self->path);
+	    KFileRelease (mfile);
+	}
+    }
+    else
+	pLOGERR (klogErr, rc, "Failure to initiate MD5 summing $(F)", PLOG_S(F), self->path);
+
+    return rc;
+}
+rc_t ProcessOneDo (ProcessOne * self)
+{
+    static const char F[] = PLOG_2(PLOG_S(p),PLOG_S(t));
+    enum KPathType type;
+    rc_t rc = 0;
+    
+    type = KDirectoryPathType (self->dir, "%s", self->path);
+
+    switch (type)
+    {
+    case kptFile:
+	rc = ProcessOneDoFile (self);
+ 	break;
+/*     case kptDir: */
+/* 	break; */
+/*     case kptAlias|kptFile: */
+/* 	break; */
+/*     case kptAlias|kptDir: */
+/* 	break; */
+    default:
+	PLOGMSG (klogInfo, "+ Skipping $(p) of type $(t)", F, self->path, typeToString(type));
+	break;
+    }
+    return rc;
+}
diff --git a/tools/copycat/ccread.c b/tools/copycat/ccread.c
new file mode 100644
index 0000000..fedaef7
--- /dev/null
+++ b/tools/copycat/ccread.c
@@ -0,0 +1,302 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <stdlib.h>
+#include <assert.h>
+#include <atomic.h>
+#include <kapp/main.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/md5.h>
+#include <kapp/log.h>
+#include "copycat-priv.h"
+
+
+struct Reader
+{
+    atomic32_t refcount;
+    const KFile * f;	/* input file */
+    uint64_t o;		/* how far into the input file are we */
+    BufferQ * out;	/* two output queues to copy everything read */
+    BufferQ * xml;
+    BufferMgr * mgr;	/* a manager for allocating a throttling buffer set */
+};
+
+rc_t ReaderRelease (const Reader * cself)
+{
+    rc_t rc = 0;
+    Reader * self = (Reader*)cself;
+
+    if (self != NULL)
+    {
+	if (atomic32_dec_and_test (&self->refcount))
+	{
+	    /* might already have been released */
+	    rc = KFileRelease (self->f);
+	    if (rc == 0)
+	    {
+		rc = BufferQRelease (self->out);
+		if (rc == 0)
+		{
+		    rc = BufferQRelease (self->xml);
+		    if (rc == 0)
+		    {
+			rc = BufferMgrRelease (self->mgr);
+			if (rc == 0)
+			    free (self);
+			else
+			    atomic32_set (&self->refcount, 1);
+		    }
+		}
+	    }
+	}
+    }
+    return rc;
+}
+
+rc_t ReaderAddRef (const Reader * self)
+{
+    if (self != NULL)
+	atomic32_inc (&((Reader*)self)->refcount);
+    return 0;
+}
+
+rc_t ReaderMake (Reader ** r, const KDirectory * d, const char * path, Copier * p,
+		 Cataloger * g, uint32_t c, uint32_t z, uint32_t t)
+{
+    rc_t rc = 0;
+    Reader * self;
+
+    self = malloc (sizeof * self);
+    if (self == NULL)
+    {
+	rc = RC (rcExe, rcNoTarg, rcAllocating, rcMemory, rcExhausted);
+	LOGERR (klogErr, rc, "ReaderMake: error allocating Reader");
+    }
+    else
+    {
+	atomic32_set (&self->refcount, 1);
+	self->o = 0;
+
+	rc = KDirectoryOpenFileRead (d, &self->f, "%s", path);
+	if (rc != 0)
+	{
+	    pLOGERR (klogErr, rc,
+		     "ReaderMake: error open file for read $(f)",
+		     PLOG_S(f), path);
+	}
+	else
+	{
+	    self->out = CopierGetQ(p);
+	    if (self->out == NULL)
+	    {
+		rc = RC (rcExe, rcNoTarg, rcAccessing, rcBuffer, rcCorrupt);
+		LOGERR (klogErr, rc, "ReaderMake: corrupt Copier queue");
+	    }
+	    else
+	    {
+		rc = BufferQAddRef (self->out);
+		if (rc == 0)
+		{
+		    self->xml = CatalogerGetQ(g);
+		    if (self->xml == NULL)
+		    {
+			rc = RC (rcExe, rcNoTarg, rcCreating, rcQueue, rcCorrupt);
+			LOGERR (klogErr, rc, "ReaderMake: corrupt Cataloger queue");
+		    }
+		    else
+		    {
+			rc = BufferQAddRef (self->xml);
+			if (rc == 0)
+			{
+			    rc = BufferMgrMake (&self->mgr, c, z, t);
+			    if (rc == 0)
+			    {
+				atomic32_set (&self->refcount, 1);
+				*r = self;
+				return 0;
+			    }
+			    LOGERR (klogErr, rc, "ReaderMake: error creating buffer manager");
+			    BufferQRelease (self->xml);
+			}
+			LOGERR (klogErr, rc, "ReaderMake: error setting reference to xml queue");
+		    }
+		    LOGERR (klogErr, rc, "ReaderMake: error setting reference to xml queue");
+		    BufferQRelease (self->out);
+		}
+		LOGERR (klogErr, rc, "ReaderMake: error setting reference to out queue");
+	    }
+	    KFileRelease (self->f);
+	}
+	free (self);
+    }
+    return rc;
+}
+
+rc_t ReaderDoOne (Reader * self)
+{
+    rc_t rc = 0;
+
+    assert (self != NULL);
+    assert (self->mgr != NULL);
+
+    rc = Quitting();
+    if (rc == 0)
+    {
+	Buffer * b = NULL;
+
+	rc = BufferMgrGetBuffer (self->mgr, &b, NULL);
+	if (rc != 0)
+	{
+	    /* -----
+	     * if we couldn't get a buffer because we timeout, we don't want to
+	     * signal a failure, so reset the rc and exit with no error
+	     */
+	    if ((GetRCState(rc) == rcExhausted) && (GetRCObject(rc) == rcTimeout))
+	    {
+		rc = 0;
+		LOGMSG (klogInfo,
+			"ReaderDoOne: timeout getting a buffer");
+	    }
+	    else
+		LOGERR (klogErr, rc,
+			"ReaderDoOne: error getting a buffer");
+
+	}
+	else
+	{
+	    size_t t;
+	    size_t r;
+	    char * p;
+
+	    /* -----
+	     * get the limits/values of the buffer we got
+	     */
+	    t = BufferPayloadGetSize (b);
+	    p = BufferPayloadWrite (b);
+	    assert (t > 0);
+	    assert (b != NULL);
+	    
+	    /* attempt to read from the file */
+	    rc = KFileRead (self->f, self->o, p, t, &r);
+	    if (rc == 0)
+	    {
+		PLOGMSG (klogDebug10, 
+			 "ReaderDoOne: back from KFileRead $(z)",
+			 PLOG_U32(z),
+			 r);
+		/* if we have a read of some length send it to our two 
+		 * processor friends: copy and catalog
+		 */
+		if (r != 0)
+		{
+		    self->o += r;
+		    rc = BufferContentSetSize (b, r);
+		    if (rc == 0)
+		    {
+			rc = BufferQPushBuffer (self->out, b, NULL);
+			if (rc == 0)
+			{
+			    rc = BufferQPushBuffer (self->xml, b, NULL);
+			    if (rc != 0)
+				LOGERR (klogErr, rc,
+					"ReaderDoOne: Failure to send bugger to xml queue");
+			}
+			else
+			    LOGERR (klogErr, rc,
+				    "ReaderDoOne: Failure to send bugger to out queue");
+		    }
+		    else
+			LOGERR (klogErr, rc,
+				"ReaderDoOne: Failure to set size of buffer");
+		}
+		/* if we had a successful read of 'nothing' we are at end of file */
+		else
+		{
+		    /* drop the file */
+		    rc = KFileRelease (self->f);
+		    if (rc == 0)
+		    {
+			self->f = NULL;
+			/* seal off and release the two queues */
+			rc = BufferQSeal (self->out);
+			if (rc == 0)
+			{
+			    rc = BufferQRelease (self->out);
+			    if (rc == 0)
+			    {
+				self->out = NULL;
+				rc = BufferQSeal (self->xml);
+				if (rc == 0)
+				{
+				    rc = BufferQRelease (self->xml);
+				    if (rc == 0)
+				    {
+					self->xml = NULL;
+					rc = BufferMgrRelease (self->mgr);
+					if (rc == 0)
+					{
+					    self->mgr = NULL;
+					    rc = RC (rcExe, rcProcess, rcReading, rcThread, rcDone);
+					}
+					else
+					    LOGERR (klogErr, rc,
+						    "ReaderDoOne: Failure to release buffer manager");
+				    }
+				    else
+					LOGERR (klogErr, rc,
+						"ReaderDoOne: Failure to release buffer xml queue");
+				}
+				else
+				    LOGERR (klogErr, rc,
+					    "ReaderDoOne: Failure to seal buffer xml queue");
+			    }
+			    else
+				LOGERR (klogErr, rc,
+					"ReaderDoOne: Failure to release buffer out queue");
+			}
+			else
+			    LOGERR (klogErr, rc,
+				    "ReaderDoOne: Failure to seal buffer out queue");
+		    }
+		    else
+			LOGMSG (klogErr,
+				"ReaderDoOne: Failure to close input file");
+		}
+	    }
+	    else
+		LOGERR (klogErr, rc,
+			"ReaderDoOne: file read error");
+	    BufferRelease (b);
+	}
+    }
+    else
+    {
+	LOGMSG (klogInt, "ReaderDoOne: Reader quitting");
+    }
+    return rc;
+}
+
+
diff --git a/tools/copycat/ccsra.c b/tools/copycat/ccsra.c
new file mode 100644
index 0000000..4c3d270
--- /dev/null
+++ b/tools/copycat/ccsra.c
@@ -0,0 +1,1239 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "copycat-priv.h"
+
+#include <klib/rc.h>
+#include <kfs/arc.h>
+#include <kfs/sra.h>
+#include <kfs/toc.h>
+#include <kfs/file.h>
+#include <kfs/subfile.h>
+#include <klib/namelist.h>
+#include <klib/vector.h>
+#include <klib/status.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/debug.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <os-native.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+
+typedef struct CCNodeSraDir CCNodeSraDir;
+#define KDIR_IMPL struct CCNodeSraDir
+#include <kfs/impl.h>
+
+/* must be after kfs/impl */
+#include "debug.h"
+
+struct CCNodeSraDir
+{
+    KDirectory dad;
+    const KFile * file;
+    const char * dir_name;
+    const char * sub_name;
+    size_t name_size;
+
+};
+
+static bool CCNodeSraDirLegalPath (const CCNodeSraDir * self, const char * path)
+{
+    if (*path == '/')
+        return (strncmp (self->sub_name, path+1, self->name_size + 1) == 0);
+    else
+        return (strncmp (self->sub_name, path, self->name_size + 1) == 0);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirDestroy
+ */
+static rc_t CC CCNodeSraDirDestroy (CCNodeSraDir *self)
+{
+    if (self)
+    {
+        KFileRelease (self->file);
+        free (self);
+    }
+    return 0;
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirList
+ *  create a directory listing
+ *
+ *  "list" [ OUT ] - return parameter for list object
+ *
+ *  "path" [ IN, NULL OKAY ] - optional parameter for target
+ *  directory. if NULL, interpreted to mean "."
+ */
+static
+rc_t CC CCNodeSraDirList (const CCNodeSraDir *self,
+                          KNamelist **listp,
+                          bool (CC* f) (const KDirectory *dir, const char *name, void *data),
+                          void *data,
+                          const char *path,
+                          va_list args)
+{
+    assert (0);
+
+    return 0;
+}
+
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirVisit
+ *  visit each path under designated directory,
+ *  recursively if so indicated
+ *
+ *  "recurse" [ IN ] - if non-zero, recursively visit sub-directories
+ *
+ *  "f" [ IN ] and "data" [ IN, OPAQUE ] - function to execute
+ *  on each path. receives a base directory and relative path
+ *  for each entry, where each path is also given the leaf name
+ *  for convenience. if "f" returns non-zero, the iteration will
+ *  terminate and that value will be returned. NB - "dir" will not
+ *  be the same as "self".
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native character set
+ */
+static 
+rc_t CC CCNodeSraDirVisit (const CCNodeSraDir *self, 
+                           bool recurse,
+                           rc_t (CC* f) (const KDirectory *, uint32_t, const char *, void *), 
+                           void *data,
+                           const char *path,
+                           va_list args)
+{
+    assert (0);
+
+    return 0;
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirVisitUpdate
+ */
+static rc_t CC CCNodeSraDirVisitUpdate (CCNodeSraDir *self,
+                                        bool recurse,
+                                        rc_t (CC*f) (KDirectory *,uint32_t,const char *,void *),
+                                        void *data,
+                                        const char *path,
+                                        va_list args)
+{
+    return RC (rcFS, rcDirectory, rcUpdating, rcSelf, rcUnsupported);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirPathType
+ *  returns a KPathType
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native character set
+ * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
+ */
+static uint32_t CC CCNodeSraDirPathType (const CCNodeSraDir *self, const char *path, va_list args)
+{
+    if (CCNodeSraDirLegalPath (self, path))
+        return kptFile;
+    return kptNotFound;
+}
+
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirRelativePath
+ *  makes "path" relative to "root"
+ *  both "root" and "path" MUST be absolute
+ *  both "root" and "path" MUST be canonical, i.e. have no "//", "/./" or "/../" sequences
+ */
+/*
+static
+rc_t CCNodeSraDirRelativePath (const CCNodeSraDir *self, enum RCContext ctx,
+                               const char *root, char *path, size_t path_max)
+{
+    assert (0);
+    return 0;
+}
+*/
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirResolvePath
+ *
+ *  resolves path to an absolute or directory-relative path
+ *
+ * [IN]  const CCNodeSraDir *self		Objected oriented self
+ * [IN]	 bool 		absolute	if non-zero, always give a path starting
+ *  					with '/'. NB - if the directory is 
+ *					chroot'd, the absolute path
+ *					will still be relative to directory root.
+ * [OUT] char *		resolved	buffer for NUL terminated result path in 
+ *					directory-native character set
+ * [IN]	 size_t		rsize		limiting size of resolved buffer
+ * [IN]  const char *	path		NUL terminated string in directory-native
+ *					character set denoting target path. 
+ *					NB - need not exist.
+ *
+ * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
+ */
+static rc_t CC CCNodeSraDirResolvePath (const CCNodeSraDir *self,
+                                        bool absolute,
+                                        char *resolved,
+                                        size_t rsize,
+                                        const char *path_fmt,
+                                        va_list args)
+{
+    char path[4096];
+    int size = args ?
+        vsnprintf ( path, sizeof path, path_fmt, args ) :
+        snprintf  ( path, sizeof path, "%s", path_fmt );
+    if ( size < 0 || size >= (int) sizeof path )
+        return RC (rcFS, rcNoTarg, rcAccessing, rcPath, rcExcessive );
+    if (absolute && (path[0] != '/'))
+    {
+        string_printf (resolved, rsize, NULL, "/%s", path);
+    }       
+    else
+        string_copy (resolved, rsize, path, self->name_size+1);
+    return 0;
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirResolveAlias
+ *  resolves an alias path to its immediate target
+ *  NB - the resolved path may be yet another alias
+ *
+ *  "alias" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting an object presumed to be an alias.
+ *
+ *  "resolved" [ OUT ] and "rsize" [ IN ] - buffer for
+ *  NUL terminated result path in directory-native character set
+ *
+ * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
+ */
+static rc_t CC CCNodeSraDirResolveAlias (const CCNodeSraDir * self, 
+                                         bool absolute,
+                                         char * resolved,
+                                         size_t rsize,
+                                         const char *alias,
+                                         va_list args)
+{
+    assert (0);
+    return 0;
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirRename
+ *  rename an object accessible from directory, replacing
+ *  any existing target object of the same type
+ *
+ *  "from" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting existing object
+ *
+ *  "to" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting existing object
+ */
+static
+rc_t CC CCNodeSraDirRename (CCNodeSraDir *self, bool force, const char *from, const char *to)
+{
+    assert (self != NULL);
+    assert (from != NULL);
+    assert (to != NULL);
+
+    return RC (rcFS, rcNoTarg, rcUpdating, rcSelf, rcUnsupported);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirRemove
+ *  remove an accessible object from its directory
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target object
+ *
+ *  "force" [ IN ] - if non-zero and target is a directory,
+ *  remove recursively
+ */
+static
+rc_t CC CCNodeSraDirRemove (CCNodeSraDir *self, bool force, const char *path, va_list args)
+{
+    assert (self != NULL);
+    assert (path != NULL);
+
+    return RC (rcFS, rcNoTarg, rcUpdating, rcSelf, rcUnsupported);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirClearDir
+ *  remove all directory contents
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target directory
+ *
+ *  "force" [ IN ] - if non-zero and directory entry is a
+ *  sub-directory, remove recursively
+ */
+static
+rc_t CC CCNodeSraDirClearDir (CCNodeSraDir *self, bool force, const char *path, va_list args)
+{
+    assert (self != NULL);
+    assert (path != NULL);
+
+    return RC (rcFS, rcNoTarg, rcUpdating, rcSelf, rcUnsupported);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirAccess
+ *  get access to object
+ *
+ *  "access" [ OUT ] - return parameter for Unix access mode
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target object
+ * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
+ */
+static rc_t CC CCNodeSraDirVAccess (const CCNodeSraDir *self,
+                                    uint32_t *access,
+                                    const char *path,
+                                    va_list args)
+{
+    assert (self != NULL);
+    assert (access != NULL);
+    assert (path != NULL);
+
+    return RC (rcFS, rcNoTarg, rcReading, rcSelf, rcUnsupported);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirSetAccess
+ *  set access to object a la Unix "chmod"
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target object
+ *
+ *  "access" [ IN ] and "mask" [ IN ] - definition of change
+ *  where "access" contains new bit values and "mask defines
+ *  which bits should be changed.
+ *
+ *  "recurse" [ IN ] - if non zero and "path" is a directory,
+ *  apply changes recursively.
+ */
+static rc_t CC CCNodeSraDirSetAccess (CCNodeSraDir *self,
+                                      bool recurse,
+                                      uint32_t access,
+                                      uint32_t mask,
+                                      const char *path,
+                                      va_list args)
+{
+    assert (self != NULL);
+    assert (path != NULL);
+
+    return RC (rcFS, rcNoTarg, rcUpdating, rcSelf, rcUnsupported);
+}
+
+
+static	rc_t CC CCNodeSraDirVDate (const CCNodeSraDir *self,
+                                   KTime_t *date,
+                                   const char *path,
+                                   va_list args)
+{
+    assert (self != NULL);
+    assert (date != NULL);
+    assert (path != NULL);
+
+    return RC (rcFS, rcNoTarg, rcReading, rcSelf, rcUnsupported);
+}
+static	rc_t CC CCNodeSraDirSetDate		(CCNodeSraDir *self,
+                                                 bool recurse,
+                                                 KTime_t date,
+                                                 const char *path,
+                                                 va_list args)
+{
+    assert (self != NULL);
+    assert (path != NULL);
+
+    return RC (rcFS, rcNoTarg, rcUpdating, rcSelf, rcUnsupported);
+}
+
+static
+struct KSysDir *CC CCNodeSraDirGetSysDir ( const CCNodeSraDir *self )
+{
+    return NULL;
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirCreateAlias
+ *  creates a path alias according to create mode
+ *
+ *  "targ" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target object
+ *
+ *  "alias" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target alias
+ *
+ *  "access" [ IN ] - standard Unix directory access mode
+ *  used when "mode" has kcmParents set and alias path does
+ *  not exist.
+ *
+ *  "mode" [ IN ] - a creation mode (see explanation above).
+ */
+static
+rc_t CC CCNodeSraDirCreateAlias (CCNodeSraDir *self,
+                                 uint32_t access,
+                                 KCreateMode mode,
+                                 const char *targ,
+                                 const char *alias)
+{
+    assert (self != NULL);
+    assert (targ != NULL);
+    assert (alias != NULL);
+
+    return RC (rcFS, rcNoTarg, rcCreating, rcSelf, rcUnsupported);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirOpenFileRead
+ *  opens an existing file with read-only access
+ *
+ *  "f" [ OUT ] - return parameter for newly opened file
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target file
+ * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
+ */
+static
+rc_t CC CCNodeSraDirOpenFileRead	(const CCNodeSraDir *self,
+					 const KFile **f,
+					 const char *path_fmt,
+					 va_list args)
+{
+    rc_t	rc;
+    char path[4096];
+    int size;
+
+    assert (self != NULL);
+    assert (f != NULL);
+    assert (path_fmt != NULL);
+
+    size = args ?
+        vsnprintf ( path, sizeof path, path_fmt, args ) :
+        snprintf  ( path, sizeof path, "%s", path_fmt );
+    if ( size < 0 || size >= (int) sizeof path )
+        return RC (rcFS, rcNoTarg, rcAccessing, rcPath, rcExcessive );
+
+    if (CCNodeSraDirLegalPath (self, path))
+    {
+        rc = KFileAddRef (self->file);
+        if (rc == 0)
+        {
+            *f = self->file;
+            return 0;
+        }
+        return rc;
+    }
+    else
+        rc = RC (rcFS, rcNoTarg, rcAccessing, rcPath, rcNotFound);
+    *f = NULL;
+    return rc;
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirOpenFileWrite
+ *  opens an existing file with write access
+ *
+ *  "f" [ OUT ] - return parameter for newly opened file
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target file
+ *
+ *  "update" [ IN ] - if non-zero, open in read/write mode
+ *  otherwise, open in write-only mode
+ */
+static
+rc_t CC CCNodeSraDirOpenFileWrite	(CCNodeSraDir *self,
+					 KFile **f,
+					 bool update,
+					 const char *path,
+					 va_list args)
+{
+    assert (self != NULL);
+    assert (f != NULL);
+    assert (path != NULL);
+
+    return RC (rcFS, rcNoTarg, rcCreating, rcSelf, rcUnsupported);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirCreateFile
+ *  opens a file with write access
+ *
+ *  "f" [ OUT ] - return parameter for newly opened file
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target file
+ *
+ *  "access" [ IN ] - standard Unix access mode, e.g. 0664
+ *
+ *  "update" [ IN ] - if non-zero, open in read/write mode
+ *  otherwise, open in write-only mode
+ *
+ *  "mode" [ IN ] - a creation mode (see explanation above).
+ */
+static
+rc_t CC CCNodeSraDirCreateFile	(CCNodeSraDir *self,
+                                 KFile **f,
+                                 bool update,
+                                 uint32_t access,
+                                 KCreateMode cmode,
+                                 const char *path,
+                                 va_list args)
+{
+    assert (self != NULL);
+    assert (f != NULL);
+    assert (path != NULL);
+
+    return RC (rcFS, rcNoTarg, rcCreating, rcSelf, rcUnsupported);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirFileLocator
+ *  returns locator in bytes of target file
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target file
+ *
+ *  "locator" [ OUT ] - return parameter for file locator
+ * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
+ */
+static
+rc_t CC CCNodeSraDirFileLocator		(const CCNodeSraDir *self,
+					 uint64_t *locator,
+					 const char *path_fmt,
+					 va_list args)
+{
+    char path[4096];
+    int size;
+
+    assert (self != NULL);
+    assert (locator != NULL);
+    assert (path_fmt != NULL);
+
+    size = args ?
+        vsnprintf ( path, sizeof path, path_fmt, args ) :
+        snprintf  ( path, sizeof path, "%s", path_fmt );
+    if ( size < 0 || size >= (int) sizeof path )
+        return RC (rcFS, rcNoTarg, rcAccessing, rcPath, rcExcessive );
+
+    *locator = 0;       /* undefined for this situation */
+    if (CCNodeSraDirLegalPath (self, path))
+        return 0;
+    return RC (rcFS, rcNoTarg, rcAccessing, rcPath, rcNotFound);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirFileSize
+ *  returns size in bytes of target file
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target file
+ *
+ *  "size" [ OUT ] - return parameter for file size
+ * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
+ */
+static
+rc_t CC CCNodeSraDirFileSize		(const CCNodeSraDir *self,
+					 uint64_t *size,
+					 const char *path_fmt,
+					 va_list args)
+{
+    char path[4096];
+    int path_size;
+
+    assert (self != NULL);
+    assert (size != NULL);
+    assert (path_fmt != NULL);
+
+    path_size = args ?
+        vsnprintf ( path, sizeof path, path_fmt, args ) :
+        snprintf  ( path, sizeof path, "%s", path_fmt );
+    if ( path_size < 0 || path_size >= (int) sizeof path )
+        return RC (rcFS, rcNoTarg, rcAccessing, rcPath, rcExcessive );
+
+    if (CCNodeSraDirLegalPath (self, path))
+        return (KFileSize (self->file, size)); /* we have to assume physical and logical size are the same */
+
+    *size = 0;
+    return RC (rcFS, rcNoTarg, rcAccessing, rcPath, rcNotFound);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirFileSize
+ *  returns size in bytes of target file
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target file
+ *
+ *  "size" [ OUT ] - return parameter for file size
+ * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
+ */
+static
+rc_t CC CCNodeSraDirFilePhysicalSize (const CCNodeSraDir *self,
+                                      uint64_t *size,
+                                      const char *path_fmt,
+                                      va_list args)
+{
+    char path[4096];
+    int path_size;
+
+    assert (self != NULL);
+    assert (size != NULL);
+    assert (path_fmt != NULL);
+
+    path_size = args ?
+        vsnprintf ( path, sizeof path, path_fmt, args ) :
+        snprintf  ( path, sizeof path, "%s", path_fmt );
+    if ( path_size < 0 || path_size >= (int) sizeof path )
+        return RC (rcFS, rcNoTarg, rcAccessing, rcPath, rcExcessive );
+
+    if (CCNodeSraDirLegalPath (self, path))
+        return (KFileSize (self->file, size)); /* we have to assume physical and logical size are the same */
+
+    *size = 0;
+    return RC (rcFS, rcNoTarg, rcAccessing, rcPath, rcNotFound);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirSetFileSize
+ *  sets size in bytes of target file
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target file
+ *
+ *  "size" [ IN ] - new file size
+ */
+static
+rc_t CC CCNodeSraDirSetFileSize	(CCNodeSraDir *self,
+                                 uint64_t size,
+                                 const char *path,
+                                 va_list args)
+{
+    assert (self != NULL);
+    assert (path != NULL);
+
+    return RC (rcFS, rcNoTarg, rcWriting, rcSelf, rcUnsupported);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirOpenDirRead
+ *
+ *  opens a sub-directory
+ *
+ * [IN]  const CCNodeSraDir *	self	Object Oriented C CCNodeSraDir self
+ * [OUT] const KDirectory **	subp	Where to put the new KDirectory/CCNodeSraDir
+ * [IN]  bool			chroot	Create a chroot cage for this new subdirectory
+ * [IN]  const char *		path	Path to the directory to open
+ * [IN]  va_list		args	So far the only use of args is possible additions to path
+ */
+static 
+rc_t CC CCNodeSraDirOpenDirRead	(const CCNodeSraDir *self,
+                                 const KDirectory **subp,
+                                 bool chroot,
+                                 const char *path,
+                                 va_list args)
+{
+    assert (self != NULL);
+    assert (subp != NULL);
+    assert (path != NULL);
+
+    return RC (rcFS, rcNoTarg, rcReading, rcSelf, rcUnsupported);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirOpenDirUpdate
+ *  opens a sub-directory
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target directory
+ *
+ *  "chroot" [ IN ] - if non-zero, the new directory becomes
+ *  chroot'd and will interpret paths beginning with '/'
+ *  relative to itself.
+ */
+static
+rc_t CC CCNodeSraDirOpenDirUpdate	(CCNodeSraDir *self,
+					 KDirectory ** subp, 
+					 bool chroot, 
+					 const char *path, 
+					 va_list args)
+{
+    assert (self != NULL);
+    assert (subp != NULL);
+    assert (path != NULL);
+
+    return RC (rcFS, rcNoTarg, rcUpdating, rcSelf, rcUnsupported);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirCreateDir
+ *  create a sub-directory
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target directory
+ *
+ *  "access" [ IN ] - standard Unix directory permissions
+ *
+ *  "mode" [ IN ] - a creation mode (see explanation above).
+ */
+static
+rc_t CC CCNodeSraDirCreateDir	(CCNodeSraDir *self,
+                                 uint32_t access,
+                                 KCreateMode mode,
+                                 const char *path,
+                                 va_list args)
+{
+    assert (self != NULL);
+    assert (path != NULL);
+
+    return RC (rcFS, rcNoTarg, rcCreating, rcSelf, rcUnsupported);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirDestroyFile
+ */
+static
+rc_t CC CCNodeSraDirDestroyFile	(CCNodeSraDir *self,
+                                 KFile * f)
+{
+    assert (self != NULL);
+    assert (f != NULL);
+
+    return RC (rcFS, rcNoTarg, rcDestroying, rcSelf, rcUnsupported);
+}
+
+/* ----------------------------------------------------------------------
+ * CCNodeSraDirFileContiguous
+ *  
+ *
+ *  "path" [ IN ] - NUL terminated string in directory-native
+ *  character set denoting target file
+ *
+ *  "contiguous" [ OUT ] - return parameter for file status
+ * NOTE: Does not meet a design target of on stack (localized variable) allocation of single 4kb path
+ */
+static
+rc_t CC CCNodeSraDirFileContiguous (const CCNodeSraDir *self,
+                                    bool * contiguous,
+                                    const char *path_fmt,
+                                    va_list args)
+{
+    char path[4096];
+    int size;
+
+    assert (self);
+    assert (contiguous);
+    assert (path_fmt);
+
+    size = args ?
+        vsnprintf ( path, sizeof path, path_fmt, args ) :
+        snprintf  ( path, sizeof path, "%s", path_fmt );
+    if ( size < 0 || size >= (int) sizeof path )
+        return RC (rcFS, rcNoTarg, rcAccessing, rcPath, rcExcessive );
+
+    if (CCNodeSraDirLegalPath (self, path))
+    {
+        *contiguous = true;
+        return 0;
+    }
+    *contiguous = false;
+    return RC (rcFS, rcNoTarg, rcAccessing, rcPath, rcNotFound);
+}
+
+
+static KDirectory_vt_v1 CCNodeSraDir_vt = 
+{
+    /* version 1.0 */
+    1, 3,
+
+    /* start minor version 0 methods*/
+    CCNodeSraDirDestroy,
+    CCNodeSraDirList,
+    CCNodeSraDirVisit,
+    CCNodeSraDirVisitUpdate,
+    CCNodeSraDirPathType,
+    CCNodeSraDirResolvePath,
+    CCNodeSraDirResolveAlias,
+    CCNodeSraDirRename,
+    CCNodeSraDirRemove,
+    CCNodeSraDirClearDir,
+    CCNodeSraDirVAccess,
+    CCNodeSraDirSetAccess,
+    CCNodeSraDirCreateAlias,
+    CCNodeSraDirOpenFileRead,
+    CCNodeSraDirOpenFileWrite,
+    CCNodeSraDirCreateFile,
+    CCNodeSraDirFileSize,
+    CCNodeSraDirSetFileSize,
+    CCNodeSraDirOpenDirRead,
+    CCNodeSraDirOpenDirUpdate,
+    CCNodeSraDirCreateDir,
+    CCNodeSraDirDestroyFile,
+    /* end minor version 0 methods*/
+    /* start minor version 1 methods*/
+    CCNodeSraDirVDate,
+    CCNodeSraDirSetDate,
+    CCNodeSraDirGetSysDir,
+    /* end minor version 2 methods*/
+    CCNodeSraDirFileLocator,
+    /* end minor version 2 methods*/
+    /* end minor version 3 methods*/
+    CCNodeSraDirFilePhysicalSize,
+    CCNodeSraDirFileContiguous
+    /* end minor version 3 methods*/
+};
+static const char root_name[] = "/";
+static
+rc_t KDirectoryMakeSraNodeDir (const KDirectory ** pself, const KFile * file,
+                               const char * name)
+{
+    CCNodeSraDir * self;
+    size_t name_size;
+    rc_t rc;
+
+    assert (pself);
+
+    name_size = string_size (name);
+    self = malloc (sizeof (*self) + name_size + 1);
+    if (self == NULL)
+        rc = RC (rcExe, rcNoTarg, rcAllocating, rcMemory, rcExhausted);
+    else
+    {
+        rc = KFileAddRef (file);
+        if (rc == 0)
+        {
+            rc_t orc;
+            self->file = file;
+            self->dir_name = root_name;
+            self->sub_name = (const char *)(self+1);
+            self->name_size = name_size;
+            strcpy ((char*)self->sub_name, name);
+            rc = KDirectoryInit (&self->dad, (const KDirectory_vt*)&CCNodeSraDir_vt,
+                                 "CCSraNodeDir", root_name, false);
+            if (rc == 0)
+            {
+                *pself = &self->dad;
+                return 0;
+            }
+            orc = KFileRelease (file);
+            if (orc)
+            {
+                PLOGERR (klogErr,
+                         (klogErr, orc,
+                          "Error releaseing sub file '$(F) in a KAR archive",
+                          "F=%s", name));
+                if (rc == 0)
+                    rc = orc;
+            }
+        }
+    }
+    return rc;
+}
+
+
+typedef struct list_item
+{
+    KPathType      type;
+    uint32_t       access;
+    uint64_t       size;
+    uint64_t       loc;
+    KTime_t        mtime;
+    char *         path;
+    char *         link;
+
+} list_item;
+
+static
+void CC list_item_whack (void * item, void * data)
+{
+    free (item);
+}
+static
+int64_t CC list_item_cmp (const void * item, const void * n)
+{
+    const list_item * l = item;
+    const list_item * r = n;
+
+/* a bit of a hack to get around issue with CCTree
+ * it has to have a directory say "dir" inserted before
+ * a file within it say dir/file
+ */
+
+    /* dirs before others */
+    if ((l->type == kptDir) && (r->type != kptDir))
+        return -1;
+    if ((r->type == kptDir) && (l->type != kptDir))
+        return 1;
+    
+    /* then by location */
+    if (l->loc > r->loc)
+        return 1;
+    if (l->loc < r->loc)
+        return -1;
+
+    /* if a file is zero sized, but it before a non-zero sized file */
+    if ((l->size == 0) && (r->size > 0))
+        return -1;
+    if ((r->size == 0) && (l->size > 0))
+        return 1;
+
+    /* if type is the same, location is the same and size is the same
+     * go alphabetically.  This puts dirs before sub dirs since
+     * strcmp says "dir" comes before "dir/dir"
+     */
+    return (strcmp (l->path, r->path));
+}
+
+
+typedef struct list_adata
+{
+    Vector list;
+    Vector sort;
+    bool has_zombies;
+} list_adata;
+
+
+static rc_t list_adata_init (list_adata * self)
+{
+    VectorInit (&self->list, 0, 512);
+    VectorInit (&self->sort, 0, 512);
+    self->has_zombies = false;
+    return 0;
+}
+
+
+static void list_adata_whack (list_adata * self)
+{
+    VectorWhack (&self->list, NULL, NULL);
+    VectorWhack (&self->sort, list_item_whack, NULL);
+}
+
+
+/* filter will let us add the add to and extract by name things to kar */
+static
+rc_t step_through_dir (const KDirectory * dir, const char * path,
+                       rc_t (*action)(const KDirectory *, const char *, void *),
+                       void * adata)
+{
+    rc_t rc;
+    KNamelist * names;
+
+    STSMSG (4, ("step_through_dir %s\n", path));
+
+    rc = KDirectoryList (dir, &names, NULL, NULL, "%s", path);
+    if (rc == 0)
+    {
+        uint32_t limit;
+        rc = KNamelistCount (names, &limit);
+        if (rc == 0)
+        {
+            uint32_t idx;
+            size_t pathlen;
+
+            pathlen = strlen(path);
+            for (idx = 0; (rc == 0) && (idx < limit); idx ++)
+            {
+                const char * name;
+                rc = KNamelistGet (names, idx, &name);
+                if (rc == 0)
+                {
+                    size_t namelen = strlen (name);
+                    size_t new_pathlen = pathlen + 1 + namelen;
+                    char * new_path = malloc (new_pathlen + 1);
+
+                    if (new_path != NULL)
+                    {
+                        char * recur_path;
+                        if (pathlen == 0)
+                        {
+                            memcpy (new_path, name, namelen);
+                            new_path[namelen] = '\0';
+                        }
+                        else
+                        {
+                            memcpy (new_path, path, pathlen);
+                            new_path[pathlen] = '/';
+                            memcpy (new_path + pathlen + 1, name, namelen);
+                            new_path[pathlen+1+namelen] = '\0';
+                        }
+                        recur_path = malloc (pathlen + 1 + namelen + 1);
+                        if (recur_path != NULL)
+                        {
+                            rc = KDirectoryResolvePath (dir, false, recur_path,
+                                                         pathlen + 1 + namelen + 1,
+                                                         "%s", new_path);
+
+                            if (rc == 0)
+                                rc = action (dir, recur_path, adata);
+
+                            free (recur_path);
+                        }
+                        free (new_path);
+                    }
+                }
+            }
+        }
+        KNamelistRelease (names);
+    }
+    return rc;
+}
+static
+rc_t list_action (const KDirectory * dir, const char * path, void * _adata)
+{
+    rc_t           rc = 0;
+    list_adata *   data = _adata;
+    list_item *    item = NULL;
+    KPathType      type  = KDirectoryPathType (dir, "%s", path);
+    size_t         pathlen = strlen (path);
+    size_t         linklen = 0;
+    char           link [2 * 4096]; /* we'll truncate? */
+
+    if (type & kptAlias)
+    {
+        rc = KDirectoryVResolveAlias (dir, false, link, sizeof (link),
+                                      path, NULL);
+        if (rc == 0)
+            linklen = strlen (link);
+    }
+
+    if (rc == 0)
+    {
+        item = calloc (sizeof (*item) + pathlen + linklen + 2, 1); /* usually one too many */
+        if (item == NULL)
+        {
+            rc = RC (rcExe, rcNoTarg, rcAllocating, rcMemory, rcExhausted);
+        }
+        else
+        {
+            do
+            {
+                item->path = (char *)(item+1);
+                strcpy (item->path, path);
+                item->type = type;
+                rc = KDirectoryAccess (dir, &item->access, "%s", path);
+                if (rc) break;
+
+                rc = KDirectoryDate (dir, &item->mtime, "%s", path);
+                if (rc) break;
+
+                if (type & kptAlias)
+                {
+                    item->link = item->path + pathlen + 1;
+                    strcpy (item->link, link);
+                }
+                else switch (type & ~kptAlias)
+                {
+                case kptNotFound:
+                    rc = RC (rcExe, rcDirectory, rcAccessing, rcPath, rcNotFound);
+                    break;
+                case kptBadPath:
+                    rc = RC (rcExe, rcDirectory, rcAccessing, rcPath, rcInvalid);
+                    break;
+                case kptZombieFile:
+                    data->has_zombies = true;
+                case kptFile:
+                    rc = KDirectoryFileSize (dir, &item->size, "%s", path);
+                    if (rc == 0)
+                        rc = KDirectoryFileLocator (dir, &item->loc, "%s", path);
+                    DBGMSG (DBG_APP, 1, ("%s: found file %s size %lu at %lu\n",
+                                         __func__, item->path, item->size, item->loc));
+                    break;
+                case kptDir:
+                    DBGMSG (DBG_APP, 1, ("%s: found directory %s\n",
+                                         __func__, item->path));
+                    break;
+                default:
+                    DBGMSG (DBG_APP, 1, ("%s: found unknown %s\n",
+                                         __func__, item->path));
+                    break;
+                }
+            } while (0);
+        }
+    }
+    if (rc == 0)
+    {
+        VectorAppend (&data->list, NULL, item);
+        VectorInsert (&data->sort, item, NULL, list_item_cmp);
+
+        if (type == kptDir)
+            rc = step_through_dir (dir, path, list_action, data);
+    }
+    return rc;
+}
+
+
+typedef struct CCSra
+{
+    CCTree * tree;
+    const KDirectory * ndir;
+    const KDirectory * adir;
+    const KFile * file;
+} CCSra;
+
+
+static
+rc_t CCSraInit (CCSra ** pself, CCTree * tree, const KFile * sf, const char * name)
+{
+    CCSra * self;
+    rc_t rc;
+
+    assert (pself);
+    assert (sf);
+    assert (name);
+
+    self = malloc (sizeof (*self));
+    if (self == NULL)
+        rc = RC (rcExe, rcMemory, rcAllocating, rcMemory, rcExhausted);
+    else
+    {
+        KFileAddRef (self->file = sf);
+
+        rc = KDirectoryMakeSraNodeDir (&self->ndir, sf, name);
+        if (rc == 0)
+        {
+            rc = KDirectoryOpenSraArchiveReadUnbounded (self->ndir, &self->adir, true, "%s", name);
+            if (rc == 0)
+            {
+                self->tree = tree;
+                *pself = self;
+                return 0;
+            }
+            KDirectoryRelease (self->ndir);
+        }
+        free (self);
+    }
+    return rc; /* error out */
+}
+
+static
+bool CC CCSraOneItem (void * item_, void * data_)
+{
+    CCSra * self = data_;
+    list_item * item = item_;
+    rc_t rc;
+
+    DBGMSG (DBG_APP, 1, ("%s: %s\n", __func__, item->path));
+
+
+    switch (item->type)
+    {
+    default:
+        DBGMSG (DBG_APP, 1, ("%s: item->type not processed (%d)\n", __func__, item->type));
+        rc = 0;
+        break;
+    case kptFile:
+    {
+        CCArcFileNode * node;
+        rc = CCArcFileNodeMake (&node, item->loc, item->size);
+        if (rc == 0)
+        {
+            const KFile * sfile;
+            rc = KFileMakeSubRead (&sfile, self->file, item->loc, item->size);
+            if (rc == 0)
+            {
+                void * save;
+
+                copycat_log_set (&node->dad.logs, &save);
+
+                rc = ccat_md5 (self->tree, sfile, item->mtime, ccArcFile, &node->dad,
+                               item->path);
+
+                copycat_log_set (save, NULL);
+
+                KFileRelease (sfile);
+            }
+        }
+        DBGMSG (DBG_APP, 1, ("%s: kptFile processed %lu at %lu\n", __func__, item->size, item->loc));
+        break;
+    }
+    case kptDir:
+    {
+        CCTree * node;
+        rc = CCTreeMake (&node);
+        if (rc == 0)
+        {
+            rc = CCTreeInsert (self->tree, item->mtime, ccDirectory, node, item->path);
+            DBGMSG (DBG_APP, 1, ("%s: insert directory %s\n", __func__, item->path));
+        }
+        break;
+    }
+    }
+    DBGMSG (DBG_APP, 1, ("%s: exiting rc (%R) (%d)\n", __func__, rc, (rc !=0)));
+    return (rc != 0);
+}
+
+static
+void CCSraWhack (CCSra * self)
+{
+    rc_t rc, orc;
+    rc = KDirectoryRelease (self->ndir);
+    orc = KDirectoryRelease (self->adir);
+    if (rc == 0)
+        rc = orc;
+    orc = KFileRelease (self->file);
+    if (rc == 0)
+        rc = orc;
+    if (rc)
+        LOGERR(klogWarn, rc, "error releaseing CCSra");
+    free (self);
+}
+rc_t ccat_sra ( CCContainerNode *np, const KFile *sf, const char *name )
+{
+    rc_t rc;
+    CCSra * sra;
+
+    rc = CCSraInit (&sra, &np->sub, sf, name);
+
+    if (rc == 0)
+    {
+        list_adata ldata;
+
+        list_adata_init (&ldata);
+        rc = step_through_dir (sra->adir, ".", list_action, &ldata);
+        if (rc == 0)
+        {
+            DBGMSG (DBG_APP, 1, ("Vector sizes list (%u) sort (%u)\n", 
+                                 VectorLength(&ldata.list),
+                                 VectorLength(&ldata.sort)));
+            VectorDoUntil (&ldata.sort, false, CCSraOneItem, sra);
+/*             VectorDoUntil (&ldata.list, false, CCSraOneItem, sra); */
+        }
+        list_adata_whack (&ldata);
+        CCSraWhack (sra);
+    }
+    DBGMSG (DBG_APP, 1, ("Done with %s\n", name));
+    return rc;
+}
+
diff --git a/tools/copycat/ccsubchunk.c b/tools/copycat/ccsubchunk.c
new file mode 100644
index 0000000..c46a661
--- /dev/null
+++ b/tools/copycat/ccsubchunk.c
@@ -0,0 +1,390 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ */
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <klib/rc.h>
+#include <kfs/file.h>
+#include <kfs/subfile.h>
+#include <kfs/arc.h>	/* definition of chunks */
+#include "copycat-priv.h"
+/* ======================================================================
+ * KSubChunkedFile
+ *  a chunked file inside an archive not general purpose yet
+ */
+
+/* -----
+ * define the specific types to be used in the templatish/inheritancish
+ * definition of vtables and their elements
+ */
+#define KFILE_IMPL struct KSubChunkFile
+#include <kfs/impl.h>
+
+static rc_t KSubChunkFileDestroy (KSubChunkFile *self);
+static struct KSysFile *KSubChunkFileGetSysFile (const KSubChunkFile *self,
+					    uint64_t *offset);
+static rc_t KSubChunkFileRandomAccess (const KSubChunkFile *self);
+static uint32_t KSubChunkFileType (const KSubChunkFile *self);
+static rc_t KSubChunkFileSize (const KSubChunkFile *self, uint64_t *size);
+static rc_t KSubChunkFileSetSize (KSubChunkFile *self, uint64_t size);
+static rc_t KSubChunkFileRead (const KSubChunkFile *self, uint64_t pos,
+			  void *buffer, size_t bsize, size_t *num_read);
+static rc_t KSubChunkFileWrite (KSubChunkFile *self, uint64_t pos, const void *buffer,
+			   size_t size, size_t *num_writ);
+
+
+static const KFile_vt_v1 vtKSubChunkFile =
+{
+    /* version */
+    1, 1,
+
+    /* 1.0 */
+    KSubChunkFileDestroy,
+    KSubChunkFileGetSysFile,
+    KSubChunkFileRandomAccess,
+    KSubChunkFileSize,
+    KSubChunkFileSetSize,
+    KSubChunkFileRead,
+    KSubChunkFileWrite,
+
+    /* 1.1 */
+    KSubChunkFileType
+};
+
+/*-----------------------------------------------------------------------
+ * KSubChunkFile
+ *  an archive file including tar and sra
+ */
+struct KSubChunkFile
+{
+    KFile		dad;
+    uint64_t		size;
+    const KFile *	original;
+    uint32_t		num_chunks;
+    const KTocChunk 	chunks [1];
+};
+
+/* ----------------------------------------------------------------------
+ * KSubChunkFileMake
+ *  create a new file object
+ */
+
+rc_t KFileMakeChunkRead (const struct KFile ** pself,
+			 const struct KFile * original,
+			 uint64_t size,
+			 uint32_t num_chunks,
+			 struct KTocChunk * chunks)
+{
+    rc_t	rc;
+    KSubChunkFile *	self;
+
+    /* -----
+     */
+    assert (pself != NULL);
+    assert (original != NULL);
+
+    *pself = NULL;
+    rc = 0;
+    /* -----
+     * get space for the object
+     */
+    self = malloc (sizeof (KSubChunkFile) + ((num_chunks-1) * sizeof (KTocChunk)));
+    if (self == NULL)	/* allocation failed */
+    {
+        /* fail */
+        rc = RC (rcFS, rcFile, rcConstructing, rcMemory, rcExhausted);
+    }
+    else
+    {
+        rc = KFileInit (&self->dad,				/* initialize base class */
+			(const KFile_vt*)&vtKSubChunkFile, 	/* VTable for KSubChunkFile */
+                    "KSubChunkFile", "no-name",
+                        true,false);				/* read allowed,write disallowed */
+	if (rc == 0)
+	{
+	    KFileAddRef (original);
+	    /* succeed */
+	    self->size = size;
+	    self->original = original;
+	    self->num_chunks = num_chunks;
+	    memcpy ((struct KTocChunk*)self->chunks, chunks, num_chunks * sizeof (KTocChunk));
+	    *pself = &self->dad;
+	    return 0;
+	}
+	/* fail */
+	free (self);
+    }
+    return rc;
+}
+
+/* ----------------------------------------------------------------------
+ * Destroy
+ *
+ */
+static
+rc_t KSubChunkFileDestroy (KSubChunkFile *self)
+{
+    assert (self != NULL);
+    KFileRelease (self->original);
+    free (self);
+    return 0;
+}
+
+/* ----------------------------------------------------------------------
+ * GetSysFile
+ *  returns an underlying system file object
+ *  and starting offset to contiguous region
+ *  suitable for memory mapping, or NULL if
+ *  no such file is available.
+ *
+ * We cant allow memory mapping a tee file as the read?writes ar needed
+ * to trigger the writes to the copy KFile
+ */
+
+static
+struct KSysFile *KSubChunkFileGetSysFile (const KSubChunkFile *self, uint64_t *offset)
+{
+    /* parameters must be non-NULL */
+    assert (self != NULL);
+    assert (offset != NULL);
+
+    /* not implmenting at this time */
+    return NULL;
+}
+
+/* ----------------------------------------------------------------------
+ * RandomAccess
+ *
+ *  returns 0 if random access, error code otherwise
+ *
+ * Update needs to be able to seek both original and copy while read
+ * only needs to be able to seek the original.
+ */
+static
+rc_t KSubChunkFileRandomAccess (const KSubChunkFile *self)
+{
+    assert (self != NULL);
+    return KFileRandomAccess (self->original);
+}
+
+/* ----------------------------------------------------------------------
+ * Type
+ *  returns a KFileDesc
+ *  not intended to be a content type,
+ *  but rather an implementation class
+ */
+static
+uint32_t KSubChunkFileType (const KSubChunkFile *self)
+{
+    return KFileType (self->original);
+}
+
+
+/* ----------------------------------------------------------------------
+ * Size
+ *  returns size in bytes of file
+ *
+ *  "size" [ OUT ] - return parameter for file size
+ */
+static
+rc_t KSubChunkFileSize (const KSubChunkFile *self, uint64_t *size)
+{
+    assert (self != NULL);
+    assert (size != NULL);
+
+    *size = self->size;
+
+    return 0;;
+}
+
+/* ----------------------------------------------------------------------
+ * SetSize
+ *  sets size in bytes of file
+ *
+ *  "size" [ IN ] - new file size
+ */
+static
+rc_t KSubChunkFileSetSize (KSubChunkFile *self, uint64_t size)
+{
+    return RC (rcFS, rcFile, rcUpdating, rcSelf, rcUnsupported);
+}
+
+/* ----------------------------------------------------------------------
+ * Read
+ *  read file from known position
+ *
+ *  "pos" [ IN ] - starting position within file
+ *
+ *  "buffer" [ OUT ] and "bsize" [ IN ] - return buffer for read
+ *
+ *  "num_read" [ OUT, NULL OKAY ] - optional return parameter
+ *  giving number of bytes actually read
+ */
+static
+rc_t	KSubChunkFileRead	(const KSubChunkFile *self,
+				 uint64_t pos,
+				 void *buffer,
+				 size_t bsize,
+				 size_t *num_read)
+{
+    size_t	count;		/* how many to read/write in an action */
+    uint8_t *	pbuff;		/* access the buffer as an array of bytes */
+    uint64_t	end;		/* this will be set to the end offset */
+    uint32_t	num_chunks;
+    const KTocChunk * pchunk;
+    rc_t	rc;		/* general purpose return from calls and pass along */
+
+    assert (self != NULL);
+    assert (buffer != NULL);
+    assert (num_read != NULL);
+    assert (bsize != 0);
+
+    /* -----
+     * assume no read/write will happen or rather start with having read none;
+     * this write could be superfluous but we need to prepare *num_read for += operations
+     */
+    *num_read = 0;
+
+    pbuff = buffer;
+    end = pos + bsize;	
+    num_chunks = self->num_chunks;
+    pchunk = self->chunks;
+
+    /* -----
+     * step through the chunks
+     */
+    for (rc = 0; (num_chunks) && (pos < end); --num_chunks, ++pchunk)
+    {
+	uint64_t 	cend;		/* end offset of this chunk */
+
+	/* -----
+	 * determine the end of this chunk
+	 */
+	cend = pchunk->logical_position + pchunk->size;
+
+	/* -----
+	 * if this chunk is entirely before the current position
+	 * we are looking for
+	 * skip to the next (if any) chunk
+	 */
+	if (pos > cend)
+	    continue;
+
+	/* -----
+	 * handle any needed zero fill section before the next chunk
+	 */
+	if (pos < pchunk->logical_position)
+	{
+	    /* -----
+	     * try to fake-read as many bytes of zero as possible
+	     * so start assuming you need enough zeros to reach the next chunk
+	     * but cut it back to the remaining requested if that was too many
+	     */
+	    count = pchunk->logical_position - pos;
+	    if (count > bsize)
+		count = bsize;
+
+	    /* fake read the zeros */
+	    memset (pbuff, 0, count);
+
+	    /* update tracking variables */
+	    pbuff += count;
+	    pos += count;
+	    *num_read += count;
+	}
+
+	/* -----
+	 * handle a chunk section
+	 *
+	 * if we are here, then we still have bytes to get and
+	 * pos >= pchunk_logical_position
+	 *
+	 * Get the most we can from this chunk.
+	 * If there are enough bytes in this chunk to finish the read: do so.
+	 * Else read through the end of the chunk
+	 */
+	count = (end <= cend) ? end - pos : cend - pos;
+
+	/* -----
+	 * a little tricky is we call by value the wanted count and the function
+	 * called will over write that with the actual read count
+	 */
+	rc = KFileRead (self->original, 
+			pchunk->source_position + (pchunk->logical_position - pos), 
+			pbuff, count, &count);
+
+	*num_read += count;
+	if (rc != 0)
+	{
+	    /* failure so abort */
+	    break;
+	}
+	pbuff += count;
+	pos += count;
+	*num_read += count;
+    }
+    /* -----
+     * If eveything so far is okay but we have more bytes to read
+     * yet no more chunks; then fill to the end with zeroes
+     */
+    if ((rc == 0) && (pos < end))
+    {
+	count = end - pos;
+	memset (pbuff, 0, count);
+	*num_read += count;
+    }
+    return rc;
+}
+
+/* ----------------------------------------------------------------------
+ * Write
+ *  write file at known position
+ *
+ *  "pos" [ IN ] - starting position within file
+ *
+ *  "buffer" [ IN ] and "size" [ IN ] - data to be written
+ *
+ *  "num_writ" [ OUT, NULL OKAY ] - optional return parameter
+ *  giving number of bytes actually written
+ *
+ * Unsupported as we now treat archives as READ ONLY
+ */
+static
+rc_t	KSubChunkFileWrite (KSubChunkFile *self, uint64_t pos,
+		       const void *buffer, size_t bsize,
+		       size_t *num_writ)
+{
+    assert (self != NULL);
+    assert (buffer != NULL);
+    assert (num_writ != NULL);
+
+    *num_writ = 0;
+    return RC (rcFS, rcFile, rcWriting, rcSelf, rcUnsupported);
+}
+
+/* end of file subfile.c */
+
diff --git a/tools/copycat/cctar.c b/tools/copycat/cctar.c
new file mode 100644
index 0000000..6dfc3cf
--- /dev/null
+++ b/tools/copycat/cctar.c
@@ -0,0 +1,2199 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "copycat-priv.h"
+#include "debug.h"
+
+#include <klib/rc.h>
+#include <kfs/arc.h>
+#include <kfs/toc.h>
+#include <kfs/file.h>
+#include <kfs/subfile.h>
+#include <klib/out.h>
+#include <klib/log.h>
+#include <klib/debug.h>
+#include <os-native.h>
+
+#include <strtol.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+/* ======================================================================
+ *
+ * ======================================================================
+ */
+
+#define	OFFSET_OF(structure,member) ((size_t)((&(((structure*)0)->member))-(0)))
+#define PASTE_2(a,b)   a##b
+#define PASTE_3(a,b,c) a##b##c
+#define STRINGIFY(a)   #a
+#ifdef sun
+#undef sun
+#endif
+typedef struct sparse_data
+{
+    struct sparse_data*	next;
+    uint64_t		offset;
+    uint64_t		size;
+} sparse_data;
+
+typedef struct CCTar
+{
+    CCFileNode *        tar_node; /* so we can flag errors */
+    CCTree *		tree;
+    const KFile *	file;
+    const char *	name;
+    sparse_data * 	sparse_q;
+    struct KTocChunk *	chunks;		/* table of chunks: logical_position, source_position, size */
+    size_t		tar_length;	/* how long should the tar file for proper format */
+    size_t		buffer_length;	/* how long is the window into the buffer */
+    uint32_t		num_chunks;
+    uint64_t		position;	/* current position in the file */
+    uint64_t		position_new;	/* next current position in the file */
+    uint64_t		position_limit;	/* max_position read */
+
+    uint64_t            cursor;         /* where we are by parsing the tar */
+
+    bool		found_zero_block;
+    bool		found_second_zero_block;
+    uint8_t		buffer [8 * 1024];
+
+} CCTar;
+
+
+
+static
+rc_t CCTarMake (CCTar ** pself, CCTree * tree, const KFile * sf,
+                const char * name, CCFileNode * fnode)
+{
+    rc_t rc;
+    CCTar * self;
+
+    /* instead of setting individual fields to 9 allocate it as zeroed */
+    self = calloc (1, sizeof * self);
+    if (self == NULL)
+    {
+        rc = RC (rcExe, 0,0,rcMemory, rcExhausted);
+        PLOGERR (klogErr,
+                 (klogErr, rc,
+                  "No memory for tar parse object for $(P)", PLOG_S(P), name));
+        free (self);
+        *pself = NULL;
+        return rc;
+    }
+    self->tree = tree;
+    self->file = sf;
+    self->name = name;
+    self->tar_length = 1024; /* at init we expect at least two zero blocks */
+    *pself = self;
+    return 0;
+}
+
+
+static
+rc_t CCTarWhack (const CCTar * cself)
+{
+    free ((void*)cself); /* cast away const */
+    return 0;
+}
+
+
+/* ======================================================================
+ * Header format structures
+ *
+ * Tar (tape archiver) started possibly as a unix utility in BSD rivalling
+ * the cpio from the AT&T System III.  The exact derivation is unimportant
+ * and some names might be slightly misleading based on historical 
+ * inaccuracies but successful implmentation is not dependant on such 
+ * accuracy in historical trivia but rather on accuracy in technical details.
+ *
+ * Posix attempted to standardize the growingly divergent variants of tar
+ * but it has led to only slightly more standardized variants with vaguely
+ * compatible extensions.
+ *
+ * For the purposes of this implmentation we will refer to the known to the
+ * author versions of tar and include the tar like aspects of the posix pax 
+ * replacement for tar.
+ *
+ * Cpio support could be added if desired with only some difficulty.
+ *
+ * Supported known variants for this implmentation will be:
+ * 	V7 	- the oldest known common base defitions for a tar header
+ *		   block ( possibly from Unix V7?)
+ *    	POSIX	- Posix.1-1988 initial restandardization of a header block
+ *		  This versio introduced the ustar name for a tar header
+ *		  and includes that term as a "magic" constant.
+ *	PAX	- Posix.1.2001 headers for pax a tar derivative that us a
+ *		  peaceful attempt to unify the tar and cpio formats apparently.
+ *		  It isn't different than POSIX in the ustar block but instead
+ *		  is an introduction of two new values of a link field in the
+ *		  tar header that defines what comes next (see headers defined
+ *		  below).
+ *	SUN	- an extension to the POSIX tar header format from SunOS 5
+ *	STAR 85	- pre-POSIX extensions to tar from Heorg Schilling (ask him its
+ *		  the bestest most greatest tar until STAR94)
+ *	STAR 94	- A redo of star based on the POSIX ustar tar header.  A less
+ *		  broken than most implmentation of a POSIX/ustar tar header
+ *		  based tar. Schilling says its the only real implmentation of
+ *		  a ustar based tar but it isn't fully compliant by design.
+ *	GNU 89	- a selected variant of tar from FSF/GNU that is a broken 
+ *		  implementation of a POSIX/ustar header based tar.
+ *	GNU 01	- A slight redo of the FSF/GNU tar format.  There are actually
+ *		  evolving variants all of which are still somewhat broken
+ *		  implementations of a ustar based tar header format.
+ *
+ * Along with these variants of a tar/ustar semi-standard tar header there are
+ * other header blocks and other significant blocks that are also tracked in
+ * this implmentation of a tar reader.
+ *	ZERO BLOCK - a block of 512 zero bytes that is supposed to be padding at
+ *		  the end of a tar file to meet some super blocksize.  Based on
+ *		  where it fits in it would be found when looking for a header
+ *		  for the next file included in a tar archive.
+ *	RAW	- a convention to mean a header block of a type that has not been 
+ *		  determined.
+ */
+#define TYPES() \
+    type_(UNDEFINED) type_(ZERO_BLOCK) type_(CPIO) type_(V7) type_(POSIX) \
+        type_(SUN) type_(STAR_85) type_(STAR_94)  type_(GNU_89) type_(SPARSE)
+
+
+#define type_(e) PASTE_2(TAR_,e),
+
+typedef enum tar_header_type
+{
+    TYPES()
+    TAR_TYPE_COUNT
+} tar_header_type;
+
+#undef type_
+#define type_(e) STRINGIFY(e),
+static const char *	get_type_string(tar_header_type t)
+{
+    static const char * type_error = "Error";
+    static const char * type_strings[] = 
+        {
+            TYPES()
+        };
+    if ((t < 0) || (t >= TAR_TYPE_COUNT))
+	return type_error;
+    return type_strings[t];
+}
+#undef type_
+#undef TYPES
+
+
+/* =============================================================================
+ * Tar headers are almost ASCII based but definitely byte/octet based so all
+ * elements are best defined as arrays of char and use casts to signed and unsigned
+ * where appropriate in interpretation..
+ * 
+ * All Tar files or streams are divided into blocks of 512 bytes
+ * This is significant in the file data in that the last block 
+ * of a file is supposed to be padded with NUL to fill out a block
+ * and then be followed by two blocks of all NUL bytes.
+ * headers are also 512 bytes with various but fairly consistent 
+ * interpretations of what is where with in that block
+ *
+ * Most tar utilities further define super blocks consisting of a number of blocks
+ * typically 10 of them for a length of 5120 bytes.  This is irrelevant for this
+ * implmentation.  By definition a tar file ends with two "zero blocks" and enough
+ * more after that to fill one of these super blocks.  We ignore all aspects of 
+ * this.
+ */
+#define TAR_BLOCK_SIZE		(512)
+typedef char tar_raw_block [TAR_BLOCK_SIZE];
+#define BLOCKS_FOR_BYTES(byte_count)	((byte_count+TAR_BLOCK_SIZE-1)/TAR_BLOCK_SIZE)
+
+/* --------------------------------------------------------------------------------
+ * lengths of various tar header fields
+ */
+
+/* --------------------
+ * Tar file names are always 100 bytes long and include preceding 
+ * path names.  The utilities do not precluded paths that put the 
+ * files outside of the "base" where the tar file was created.
+ *
+ * To handle tar files made by older tar utilities if the last 
+ * character is '/' then the file should be assumed to be a directory.
+ *
+ * This 'type' is used for both the name of the object being archived
+ * and the link target if it is a hard or soft link.
+ */
+#define	TAR_NAME_LEN		(100)
+typedef char	tar_file_name	[TAR_NAME_LEN];
+
+/* --------------------
+ * Tar mode strings are always 8 bytes long.
+ *
+ * 9 file access permissions bits and three execution mode bits.
+ *
+ * Zero '0' not NUL pre-fill unused bytes.  a user permision of 0644 would be stored as
+ * "0000644" with a NUL terminator.
+ *
+ * The format is 7 octal ASCII bytes with only the last 4 being 
+ * significant.  That is the first three are always '0'.  The 8th 
+ * byte is NUL.
+ *
+ * Older utilities might put preceding ' ' characters or
+ * instead of pre-fill have post fill ' ' or NUL.
+ */
+#define TAR_MODE_LEN		(8)
+typedef char	tar_file_mode	[TAR_MODE_LEN];
+/* -----
+ * These are the bits if the mode is in binary (octal defines for ease of interpretation)
+ * they match the st_mode field from the stat()/fstat() struct stat.
+ *
+ * GNU tar puts the file type bits from the stat structure in the mode of the tar file.
+ * Other tar implmentations might as well though no where is this dktefined as required or
+ * recommended or even supported.
+ */
+#define	TAR_SUID_BIT	(04000)	/* set UID on execution */
+#define	TAR_GUID_BIT	(02000)	/* set GID on execution */
+#define	TAR_STICKY_BIT	(01000)	/* save text / sticky bit */
+/* file permissions */
+#define	TAR_MODE_OREAD	(00400)	/* read by owner */
+#define	TAR_MODE_OWRITE	(00200)	/* write by owner */
+#define	TAR_MODE_OEXEC	(00100)	/* execute by owner */
+#define	TAR_MODE_GREAD	(00040)	/* read by group */
+#define	TAR_MODE_GWRITE	(00020)	/* write by group */
+#define	TAR_MODE_GEXEC	(00010)	/* execute by group */
+#define	TAR_MODE_WREAD	(00004)	/* read by other */
+#define	TAR_MODE_WWRITE	(00002)	/* write by other */
+#define	TAR_MODE_WEXEC	(00001)	/* execute by other */
+
+/* -----
+ * These are the bits once converted into ASCII
+ * with in an ASCII byte these bits are actually usable so no conversion needed
+ * '0' = 0x30 / 060
+ * '1' = 0x31 / 061
+ * '2' = 0x32 / 062
+ * '3' = 0x33 / 063
+ * '4' = 0x34 / 064
+ * '5' = 0x35 / 065
+ * '6' = 0x36 / 066
+ * '7' = 0x37 / 067
+ */
+#define	TAR_MODE_READ		(0x01)
+#define	TAR_MODE_WRITE		(0x02)
+#define	TAR_MODE_EXEC		(0x04)
+#define TAR_MODE_STICKY		(0x01)
+#define TAR_MODE_GUID		(0x02)
+#define TAR_MODE_SUID		(0x04)
+#define	TAR_MODE_OWNER_BYTE	(6)
+#define	TAR_MODE_GROUP_BYTE	(5)
+#define	TAR_MODE_WORLD_BYTE	(4)
+#define	TAR_MODE_USER_BYTE	(3)
+#define	TAR_MODE_EXEC_BYTE	(2)
+
+/* --------------------
+ * Tar user (and group) numeric IDs are put into 8 bytes.
+ *
+ * There is a '0' prefill and as terminating NUL.
+ *
+ * Older utilities might put preceding ' ' characters or
+ * instead of pre-fill have post fill ' ' or NUL.
+ */
+#define TAR_ID_LEN		(8)
+typedef	char	tar_id		[TAR_ID_LEN];
+
+/* --------------------
+ * Tar file size elements are 12 bytes long with 11 used
+ * for octal characters making the maximum size of a file
+ * for pure classic or Posix tar limited to 8 GBytes.  
+ * Various tar utilities handle longer files in different
+ * ways if at all.
+ *
+ * A length of 100 bytes would be stored as "00000000144".
+ *
+ * Links and some other special values are archived with a
+ * length of zero and thus no data blocks.
+ *
+ * There is a '0' prefill and as terminating NUL.
+ *
+ * Older utilities might put preceding ' ' characters or
+ * instead of pre-fill have post fill ' ' or NUL.
+ *
+ * GNU tar implmentations use alternative intrpretatopms of
+ * this and possibly other fields using mime base 64 or
+ * base 256 (big endian nonstandard sized binary)
+ */
+#define	TAR_SIZE_LEN		(12)
+typedef char	tar_size	[TAR_SIZE_LEN];
+#define MAX_TAR_FILE_SIZE	(077777777777)
+
+/* --------------------
+ * Tar file modification/access/creation times are 12 bytes
+ * long.  This holds 11 octal ASCII digits representing the
+ * number of seconds since 01/01/1970 00:00 UTC.
+ *
+ * There is a '0' prefill and as terminating NUL.
+ *
+ * Older utilities might put preceding ' ' characters or
+ * instead of pre-fill have post fill ' ' or NUL.
+ */
+#define TAR_TIME_LEN		(12)
+typedef	char	tar_time	[TAR_TIME_LEN];
+
+/* --------------------
+ * Tar has a weak checksum protection of part of the tar header
+ * that is 8 bytes long and again uses 7 ASCII octal digits.
+ *
+ * There is a '0' prefill and as terminating NUL.
+ *
+ * Older utilities might put preceding ' ' characters or
+ * instead of pre-fill have post fill ' ' or NUL.
+ */
+#define TAR_CSUM_LEN		(8)
+typedef	char	tar_csum	[TAR_CSUM_LEN];
+#define	csum_blanks		("       ")
+
+/* --------------------
+ * The tar link is a single byte that expresses the type of file
+ * or special value represented by this entry.
+ */
+typedef	char	tar_link;
+
+#define LINKS()                   \
+    link_('\0',OLDNORMAL_FILE)    \
+    link_('0',NORMAL_FILE)        \
+    link_('1',HARD_LINK)          \
+    link_('2',SYMBOLIC_LINK)      \
+    link_('3',CHARACTER_SPECIAL)  \
+    link_('4',BLOCK_SPECIAL)      \
+    link_('5',DIRECTORY)          \
+    link_('6',FIFO)               \
+    link_('7',CONTIGUOUS_FILE)    \
+    link_('A',SOLARIS_ACL)        \
+    link_('D',GNU_DUMPDIR)        \
+    link_('E',SOLARIS_ACL_FILE)   \
+    link_('I',INODE_METADATA)     \
+    link_('K',NEXT_LONG_LINK)     \
+    link_('L',NEXT_LONG_NAME)     \
+    link_('M',MULTI_VOLUME)       \
+    link_('N',GNU1989_LONG_NAMES) \
+    link_('S',SPARSE)             \
+    link_('V',VOLUME_NAME)        \
+    link_('X',SUN_XHDR)           \
+    link_('g',PAX_GLOBAL_XHDR)    \
+    link_('x',PAX_XHDR)
+
+#define link_(v,n)      PASTE_2(LINK_,n) = v,
+
+enum e_tar_link
+{
+    LINKS()
+    LINK_TYPE_COUNT
+};
+#undef link_
+
+#define link_(v,n) {STRINGIFY(n), v},
+struct nv_pair
+{
+    const char * name;
+    tar_link  link;
+};
+static const char * get_link_string(tar_link l)
+{
+    static const struct nv_pair pairs[] = 
+        {
+            LINKS()
+            {NULL, 0}
+        };
+    unsigned int ix;
+
+    for (ix = 0; ix < LINK_TYPE_COUNT; ++ix)
+        if (pairs[ix].link == l)
+            return pairs[ix].name;
+    return "UNDEFINED";
+}
+#undef link_
+#undef LINKS
+
+
+/* --------------------
+ * The tar magic string is 6 bytes long.
+ */
+#define	TAR_MAGIC_LEN		(6)
+typedef char	tar_magic	[TAR_MAGIC_LEN];
+#define	POSIX_MAGIC_CONST	"ustar"		/* includes terminating NUL */
+
+/* --------------------
+ * The tar version string is two bytes long and uses both bytes
+ */
+#define	TAR_VERSION_LEN		(2)
+typedef	char	tar_version	[TAR_VERSION_LEN];
+#define	POSIX_VERSION_CONST	"00"		/* does not include terminating NUL */
+
+/* --------------------
+ * The Posix strong user/group name is 32 bytes long
+ */
+#define TAR_STRNAME_LEN		(32)
+typedef	char	tar_strname	[TAR_STRNAME_LEN];
+
+/* --------------------
+ * The dev? strings are 8 bytes long
+ */
+#define	TAR_DEV_LEN		(8)
+typedef	char	tar_dev		[TAR_DEV_LEN];
+
+/* --------------------
+ * Posix prefix is 155 bytes that can be put before the name to give a path of
+ * 255 bytes instad of the smaller limit of 99.
+ */
+#define	TAR_PREFIX_LEN		(155)
+typedef	char	tar_prefix	[TAR_PREFIX_LEN];
+
+/*
+ * Sun extensions
+ */
+
+/* --------------------
+ */
+typedef	char sun_extnum;
+#define	SUN_FULLSIZE_LEN	(10)
+typedef	char	sun_fullsize	[SUN_FULLSIZE_LEN];
+
+/* --------------------
+ * star extensions
+ *
+ * star85 is old star from 1985
+ */
+typedef	char	star85_version;
+#define	STAR85_FILETYPE_LEN	(8)
+typedef char	star85_filetype	[STAR85_FILETYPE_LEN];
+#define	STAR85_TYPE_LEN		(12)
+typedef	char	star85_type	[STAR85_TYPE_LEN];
+#define	STAR85_RDEV_LEN		(12)
+typedef	char	star85_rdev	[STAR85_RDEV_LEN];
+/* ignoring the 11 byte rdev with minor bits */
+#define	STAR85_UNAME_LEN	(16)
+typedef	char	star85_uname	[STAR85_UNAME_LEN];
+#define	STAR85_GNAME_LEN	(15)
+typedef	char	star85_gname	[STAR85_GNAME_LEN];
+#define	STAR_XMAGIC_LEN		(4)
+typedef	char	star_magic	[STAR_XMAGIC_LEN];
+#define	STAR_MAGIC_CONST	("tar")
+#define	NSTAR_PREFIX_LEN	(1)
+typedef	char	nstar_prefix	[NSTAR_PREFIX_LEN];
+
+/* --------------------
+ * gnu extensions
+ */
+#define	GNU89_MAGIC_LEN		(8)
+typedef	char	gnu89_magic	[GNU89_MAGIC_LEN];
+#define	GNU_89_MAGIC_CONST	"ustar  "		/* includes terminating NUL */
+#define	GNU_89_GNUMAGIC_CONST	"GNUtar "		/* includes terminating NUL */
+#define GNU89_LONGNAMES_LEN	(4)
+typedef char	gnu89_longnames	[GNU89_LONGNAMES_LEN];
+
+
+/* --------------------
+ * shared between the feuding star and gnu tar
+ */
+typedef	char	tar_isextended ;
+typedef struct	tar_sparse
+{
+    tar_size	offset;
+    tar_size	num_bytes;
+} tar_sparse;
+#define	GNU_SPARSES_IN_EXTRA_HEADER		(16)
+#define	GNU_SPARSES_IN_OLD_HEADER		(4)
+#define	GNU_SPARSES_IN_SPARSE_HEADER		(21)
+#define	STAR_SPARSES_IN_HEADER			(4)
+#define	STAR_SPARSES_IN_EXT_HEADER		(21)
+
+
+/* ----------------------------------------
+ * The various tar header formats
+ *
+ * Note that in all the tar, posix and pax formats the first 257 bytes are
+ * the same.  In all posix ad almost compliant formats the first
+ * 345 bytes are the same (except GNU 89).  It is abuse of the 155
+ * bytes of the prefix that make star and gnu truly not posix compliant
+ * Sun used the 12 bytes after the prefix so is still psox compliant.
+ */
+typedef	struct	tar_v7_header
+{
+    /* type		member name			 and offset */
+    tar_file_name	name;				/*   0 */
+    tar_file_mode	mode;				/* 100 */
+    tar_id		uid;				/* 108 */
+    tar_id		gid;				/* 116 */
+    tar_size		size;				/* 124 */
+    tar_time		mtime;				/* 136 */
+    tar_csum		csum;				/* 148 */
+    tar_link		link;				/* 156 */
+    tar_file_name	linkname;			/* 157 */
+    /* end of header					// 257 */
+} tar_v7_header;
+
+typedef struct tar_posix_header
+{
+    /* type		member name			 and offset */
+    tar_file_name	name;				/*   0 */
+    tar_file_mode	mode;				/* 100 */
+    tar_id		uid;				/* 108 */
+    tar_id		gid;				/* 116 */
+    tar_size		size;				/* 124 */
+    tar_time		mtime;				/* 136 */
+    tar_csum		csum;				/* 148 */
+    tar_link		link;				/* 156 */
+    tar_file_name	linkname;			/* 157 */
+    tar_magic		magic;				/* 257 */
+    tar_version		version;			/* 263 */
+    tar_strname		uname;				/* 265 */
+    tar_strname		gname;				/* 297 */
+    tar_dev		devmajor;			/* 329 */
+    tar_dev		devminor;			/* 337 */
+    tar_prefix		prefix;				/* 345 */
+    /* end of header					// 500 */
+} tar_posix_header, tar_pax_header;
+
+typedef struct tar_sun_header
+{
+    /* type		member name			 and offset */
+    tar_file_name	name;				/*   0 */
+    tar_file_mode	mode;				/* 100 */
+    tar_id		uid;				/* 108 */
+    tar_id		gid;				/* 116 */
+    tar_size		size;				/* 124 */
+    tar_time		mtime;				/* 136 */
+    tar_csum		csum;				/* 148 */
+    tar_link		link;				/* 156 */
+    tar_file_name	linkname;			/* 157 */
+    tar_magic		magic;				/* 257 */
+    tar_version		version;			/* 263 */
+    tar_strname		uname;				/* 265 */
+    tar_strname		gname;				/* 297 */
+    tar_dev		devmajor;			/* 329 */
+    tar_dev		devminor;			/* 337 */
+    tar_prefix		prefix;				/* 345 */
+    sun_extnum		extnum;				/* 500 non-conformant */
+    sun_extnum		extcount;			/* 501 non-conformant */
+    sun_fullsize	fullsize;			/* 502 non-conformant */
+    /* end of header					// 512 non-conformant */
+} tar_sun_header;
+
+typedef struct tar_star_85_header
+{
+    /* type		member name			 and offset */
+    tar_file_name	name;				/*   0 */
+    tar_file_mode	mode;				/* 100 */
+    tar_id		uid;				/* 108 */
+    tar_id		gid;				/* 116 */
+    tar_size		size;				/* 124 */
+    tar_time		mtime;				/* 136 */
+    tar_csum		csum;				/* 148 */
+    tar_link		link;				/* 156 */
+    tar_file_name	linkname;			/* 157 */
+    star85_version	starversion;			/* 257 non-conformant */
+    star85_filetype	starfiletype;			/* 258 internal type of file? non-conformant */
+    star85_type		startype;			/* 266 type of file (UNIX)? non-conformant */
+    star85_rdev		rdev;				/* 278 non-conformant */
+    tar_time		atime;				/* 290 non-conformant */
+    tar_time		ctime;				/* 302 non-conformant */
+    star85_uname	uname;				/* 314 non-conformant */
+    star85_gname	gname;				/* 330 non-conformant */
+    tar_prefix		prefix;				/* 345 non-conformant */
+    char		___fill0[8];			/* 500 non-conformant */
+    star_magic		xmagic;				/* 508 non-conformant */
+    /* end of header					// 512 non-conformant */
+} tar_star_85_header;
+typedef struct tar_star_94_header
+{
+    /* type		member name			 and offset */
+    tar_file_name	name;				/*   0 */
+    tar_file_mode	mode;				/* 100 */
+    tar_id		uid;				/* 108 */
+    tar_id		gid;				/* 116 */
+    tar_size		size;				/* 124 */
+    tar_time		mtime;				/* 136 */
+    tar_csum		csum;				/* 148 */
+    tar_link		link;				/* 156 */
+    tar_file_name	linkname;			/* 157 */
+    tar_magic		magic;				/* 257 */
+    tar_version		version;			/* 263 */
+    tar_strname		uname;				/* 265 */
+    tar_strname		gname;				/* 297 */
+    tar_dev		devmajor;			/* 329 */
+    tar_dev		devminor;			/* 337 */
+    nstar_prefix	prefix;				/* 345 */
+    char		___fill0;			/* 346 */
+    char		___fill1[8];			/* 347 */
+    tar_isextended	isextended;			/* 355 non-conformant */
+    tar_sparse 		sparse[STAR_SPARSES_IN_HEADER];	/* 356 non-conformant */
+    tar_size		realsize;			/* 452 non-conformant */
+    tar_size		offset;				/* 464 non-conformant */
+    tar_time		atime;				/* 476 non-conformant */
+    tar_time		ctime;				/* 488 non-conformant */
+    char		___fill2[8];			/* 500 */
+    star_magic		xmagic;				/* 508 non-conformant */
+    /* end of header					// 512 */
+} tar_star_94_header;
+
+typedef struct tar_gnu_89_header
+{
+    /* type		member name			 and offset */
+    tar_file_name	name;				/*   0 */
+    tar_file_mode	mode;				/* 100 */
+    tar_id		uid;				/* 108 */
+    tar_id		gid;				/* 116 */
+    tar_size		size;				/* 124 */
+    tar_time		mtime;				/* 136 */
+    tar_csum		csum;				/* 148 */
+    tar_link		link;				/* 156 */
+    tar_file_name	linkname;			/* 157 */
+    gnu89_magic		magic;				/* 257 non-conformant */
+    tar_strname		uname;				/* 265 */
+    tar_strname		gname;				/* 297 */
+    tar_dev		devmajor;			/* 329 */
+    tar_dev		devminor;			/* 337 */
+    tar_time		atime;				/* 345 non-conformant */
+    tar_time		ctime;				/* 357 non-conformant */
+    tar_size		offset;				/* 369 non-conformant */
+    gnu89_longnames	longnames;			/* 381 non-conformant */
+    char		___fill0[1];			/* 385 */
+    tar_sparse		sparse	[GNU_SPARSES_IN_OLD_HEADER];/* 386 optional sparse */
+    tar_isextended	isextended;			/* 482 non-conformant */
+    tar_size		realsize;			/* 483 non-conformant */
+    /* end of header					// 495 */
+} tar_gnu_89_header;
+
+typedef struct tar_gnu_99_header
+{
+    /* type		member name			 and offset */
+    tar_file_name	name;				/*   0 */
+    tar_file_mode	mode;				/* 100 */
+    tar_id		uid;				/* 108 */
+    tar_id		gid;				/* 116 */
+    tar_size		size;				/* 124 */
+    tar_time		mtime;				/* 136 */
+    tar_csum		csum;				/* 148 */
+    tar_link		link;				/* 156 */
+    tar_file_name	linkname;			/* 157 */
+    gnu89_magic		magic;				/* 257 non-conformant */
+    tar_strname		uname;				/* 265 */
+    tar_strname		gname;				/* 297 */
+    tar_dev		devmajor;			/* 329 */
+    tar_dev		devminor;			/* 337 */
+    tar_time		atime;				/* 345 non-conformant */
+    tar_time		ctime;				/* 357 non-conformant */
+    tar_size		offset;				/* 369 non-conformant */
+    gnu89_longnames	longnames;			/* 381 non-conformant */
+    char		___fill0[1];			/* 385 */
+    tar_sparse		sparse	[GNU_SPARSES_IN_OLD_HEADER];/* 386 non-conformant optional sparse */
+    tar_isextended	isextended;			/* 482 non-conformant */
+    tar_size		realsize;			/* 483 non-conformant */
+    /* end of header					// 495 */
+} tar_gnu_99_header;
+
+typedef struct tar_sparse_header
+{
+    /* type		member name			 and offset */
+    tar_sparse		sparse	[STAR_SPARSES_IN_EXT_HEADER];/* 0 */
+    tar_isextended	isextended;			/* 504 */
+} tar_sparse_header;					/* 505 end of header */
+
+typedef struct tar_cpio_header
+{
+    /* type		member name			 and offset */
+    char		magic		[6];		/*   0	must be "070707" */
+#define	TAR_CPIO_MAGIC_CONST ("070707")
+    char		dev		[6];		/*   6  (dev,ino) is unique for each file in archive */
+    char		ino		[6];		/*  12  see dev */
+    char		mode		[6];		/*  18 */
+    char		uid		[6];		/*  24 */
+    char		gif		[6];		/*  30 */
+    char		nlink		[6];		/*  36 */
+    char		rdev		[6];		/*  42 */
+    char		mtime		[11];		/*  48 */
+    char		namesize	[6];		/*  59 */
+    char		filesize	[6];		/*  65 */
+    char		buff		[1];		/*  71  name and file data */
+} tar_cpio_header;
+
+typedef union tar_header
+{
+    /* ----------
+     * The TAR header is to be zero filled by definition but some tar
+     * programs use ' ' instead.
+     *
+     * accept zeros ('0'), spaces (' ') or NULs (0x00) as equivalent where reasonable
+     *
+     * This name refers to the entire header as a single undifferentiated
+     * sequence of bytes.
+     */
+    tar_raw_block	raw;		/* tar block as an array of bytes: used for 0 blocks here */
+    tar_cpio_header	cpio;		/* cpio not really tar */
+    tar_v7_header	tar;		/* classic header back to the beginnings of memory */
+    tar_posix_header	posix;		/* ustar or Posix 1003.1 header */
+    tar_sun_header	suntar;		/* Sun Microsystems tar header */
+    tar_star_85_header	star_85;	/* star header from 1985 (pre-Posix) */
+    tar_star_94_header	star_94;	/* star header from 1994 (post-Posix) */
+    tar_gnu_89_header	gnu_89;		/* gnu header from circa 1989 (post-posix but broken) */
+    tar_gnu_99_header	gnu_99;         /* gnu header from ???? */
+    tar_sparse_header	sparse;		/* star / gnu extended sparses header */
+} tar_header;
+
+
+/* ======================================================================
+ * local module-wide function like macros
+ */
+/* -----
+ * offset of is the count of bytes between the base of a structure and 
+ * a particular member of that structure
+ */
+#define	OFFSET_OF(structure,member) ((size_t)((&(((structure*)0)->member))-(0)))
+
+
+/* ======================================================================
+ * compilation unit local functions
+ */
+
+/* ======================================================================
+ * return the RFC 2045 base 64 value for a byte character 
+ * -1 for any out of range
+ *
+ * base 64 uses A-Z as 0-25, a-z as 26-51, 0-9 as 52-61, + as 62 and / as 63
+ */
+static int64_t decode_base64char (uint8_t byte)
+{
+    /* 
+     * trade off of space for table versus time to upsize the return
+     * and reupsize where it is used
+     */
+    static const int8_t table[] = 
+	{
+	    /*
+	     * 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
+	     */
+	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 00 */
+	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 10 */
+	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63, /* 20 */
+	    52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1, /* 30 */
+	    -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14, /* 40 */
+	    15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1, /* 50 */
+	    -1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, /* 60 */
+	    41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1, /* 70 */
+	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 80 */
+	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 90 */
+	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* A0 */
+	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* B0 */
+	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* C0 */
+	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* D0 */
+	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* E0 */
+	    -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1  /* F0 */
+	};
+    return table[byte];
+}
+
+
+/* ======================================================================
+ * return the RFC 2045 base 64 value of a string at <str> of length <len>
+ *
+ * Interpreted the specification to mean that you simply ignore any out
+ * of range characters.  They are not treated as bytes of 0 as that would
+ * mean a shift of earlier bytes.
+ *
+ * Each character is 6 bits of the final value.
+ */
+static int64_t decode_base64string (const uint8_t* str, size_t len)
+{
+    int64_t 	result = 0;
+    int64_t 	temp = 0;
+    size_t 	ix;
+
+    for (ix = 0; ix < len; ++ix)
+    {
+	if ((temp = decode_base64char(str[ix])) >= 0)
+	{
+	    result <<= 6; /* result *= 64 */
+	    result += temp;
+	}
+    }
+    return result;
+}
+
+
+/* ======================================================================
+ * tar_strtoll
+ *
+ * This function will convert a string in a tar header into a 64 signed
+ * integer.
+ *
+ * The original tar header used just octal numbers in ascii in fixed length
+ * fields.  As normal in the computer software world these "obviously plenty
+ * big" fields became way too small.
+ *
+ * GNU tar invented two approaches to make these numeric fields "bigger" but
+ * only prolonged the pain by squeezing the new numbers into the same fields.
+ *
+ * In the tar v7 and ustar based tar headers the fields are:
+ *	Name	Size	Octal Range	Interpretation
+ *	mode	8	0-2097151 	bit flags
+ *	uid	8	0-2097151
+ *	gid	8	0-2097151
+ *	size	12	0-8589934591	up to 8 Giga-Byte files
+ *	mtime	12	0-8589934591 	1970/01/01 00:00:00 GMT-2242/03/16 12:56:31 GMT
+ *	
+ *	atime	12	0-8589934591 	1970/01/01 00:00:00 GMT-2242/03/16 12:56:31 GMT
+ *	ctime	12	0-8589934591 	1970/01/01 00:00:00 GMT-2242/03/16 12:56:31 GMT
+ *
+ * GNU's first and already obsolete approach was to put Mime base-64 numbers
+ * With these the first byte is '+' or '-' to signal it isn't octal ASCII.
+ *
+ * GNU's second approach is base-256 which is a big endian binary string of lengths other
+ * than the 1, 2, 4 or 8 bytes of the standard integer types.  In this approach the first
+ * byte is either 0x80 for a positive number or 0xFF for a negative number.
+ */
+
+static int64_t tar_strtoll (const uint8_t * str, size_t len)
+{
+    int64_t	result = 0;
+    bool negative = false;
+    uint8_t temp_buff[24];	/* long enough to hold all octal bytes for 64 bit numbers */
+
+    /* -----
+     * force a NUL in case the source doesn't have one; this is for
+     * strtoll() on ASCII Octal
+     */
+    if ( len >= sizeof temp_buff )
+        len = sizeof temp_buff - 1;
+    memcpy (temp_buff, str, len);
+    temp_buff[ len ] = 0x00;
+
+    /* -----
+     * Most are going to be simple ASCII octal using '0'-'7' with NUL terminator
+     * leading 0 is not required but of course is accepted to match tar 
+     * header specifications
+     */
+    if (((temp_buff[0] >= '0')&&(temp_buff[0] <= '7'))||(temp_buff[0] == ' '))
+    {
+        /* use stdlib strtoll - longest expected goes a few bits into the upper longword */
+        result = strtoi64((char*)temp_buff,NULL,8);
+    }
+    /* -----
+     * "base-256" well that is "binary" big endian of some length
+     *
+     * For fields longer than eight bytes upper bytes will shift out of 
+     * significance into the bit bucket.
+     */
+    else if ((temp_buff[0] == 0x80)||(temp_buff[0] == 0xFF)) /* from GNU tar */
+    {
+        unsigned int ix;
+        negative = (bool)((temp_buff[0] == 0xFF) ? true : false);
+        result = temp_buff[0] & 0x7F; /* toss first flag bit */
+        for (ix = 1; ix < len; ++ix)
+        {
+            result <<= 8; /* result *= 256; */
+            result += temp_buff[ix];
+        }
+        if (negative)
+            result = -result;
+    }
+    /* -----
+     * "base-64" an already dumped idea from GNU tar
+     */
+    else if ((temp_buff[0] == '+')||(temp_buff[0] == '-')) /* from GNU tar */
+    {
+        int64_t temp;
+        negative = (bool)((temp_buff[0] == '-') ? true : false);
+        temp = decode_base64string(temp_buff+1,len-1);
+        /* potential overflow */
+        result = negative ? -temp : temp;
+    }
+
+    /* -----
+     * look for an empty field of all NUL
+     */
+    else if (temp_buff[0] == 0x00)
+    {
+        unsigned int ix;
+        for (ix = 1; ix < len; ++ix)
+        {
+            if (temp_buff[ix] != 0x00)
+                goto fail;
+        }
+    }
+    /* -----
+     * no idea what it is then
+     */
+    else
+    {
+    fail:
+        result = 0; /* as good a guess as any */
+        PLOGMSG (klogErr, (klogErr, "unknown integer storage type $(B0)$(B1)$(B2)$(B3)$(B4)$(B5)$(B6)$(B7)",
+                           "B0=%c,B1=%c,B2=%c,B3=%c,B4=%c,B5=%c,B6=%c,B7=%c",
+                           temp_buff[0],temp_buff[1],temp_buff[2],temp_buff[3],
+                           temp_buff[4],temp_buff[5],temp_buff[6],temp_buff[7]));
+    }
+    return result;
+}
+
+
+
+/* ======================================================================
+ * tar_header_type
+ * determine most probable tar header block type
+ */
+static tar_header_type	what_header_type(const tar_header* header)
+{
+    /* -----
+     * we'll assume its bad until we find a better guess
+     */
+    tar_header_type type = TAR_UNDEFINED;
+
+    /* -----
+     * look for a cpio header though we aren't expecting to support it quite yet
+     */
+    if (strncmp(header->cpio.magic, TAR_CPIO_MAGIC_CONST, sizeof(header->cpio.magic)) == 0)
+    {
+	type = TAR_CPIO;
+    }
+    /* -----
+     * look for extended headers of some type
+     *
+     * look for posix based extensions as hopefully most likely
+     */
+    else if (strcmp(header->posix.magic, POSIX_MAGIC_CONST) == 0)
+    {
+	/* -----
+	 * we have a post posix standard tar header but we aren't done yet
+	 *
+	 * First we look for star extensions to the header
+	 */
+	if (strcmp(header->star_94.xmagic, STAR_MAGIC_CONST) == 0)
+	{
+
+	    /* -----
+	     * we have either an old or new star archive
+	     */
+	    if (strcmp(header->star_94.magic, POSIX_MAGIC_CONST) == 0)
+	    {
+		/* -----
+		 * we have a new star type archive
+		 */
+		type = TAR_STAR_94;
+	    }
+	    else
+	    {
+		/* -----
+		 * we have a old star type archive
+		 */
+		type = TAR_STAR_85;
+	    }
+	}
+	/* -----
+	 * Next we look for SunOS5 extensions to the header
+	 */
+	else if (header->suntar.extnum &&
+		 header->suntar.extcount &&
+		 header->suntar.fullsize)
+	{
+	    type = TAR_SUN;
+	}
+	/* -----
+	 * Else it seems to be the generic Posix tar header
+	 */
+	else
+	{
+	    type = TAR_POSIX;
+	}
+    }
+    /* -----
+     * Not a proper magic for a POSIX ustar header so look for the improper magic of GNU's tar
+     */
+    else if (strcmp(header->star_94.magic, GNU_89_MAGIC_CONST) == 0)
+    {
+	/* we have an old GNU not really posix compliant archive type */
+	type = TAR_GNU_89;
+    }
+    /* -----
+     * If there is anything else there we don't know what to do with it
+     */
+    else if (header->posix.magic[0] != 0)
+    {
+	/* -----
+	 * Log an anomaly showing what we found in the magic field
+	 */
+	char temp_str	[9];
+	memset(temp_str,0,sizeof(temp_str));
+	strncpy(temp_str,header->posix.magic,8);
+	type = TAR_UNDEFINED;
+    }
+    /* -----
+     * not knowing what we have lets see if it is a block of all zeroes
+     * knowing we can ignore it
+     */
+    else
+    {
+	/* -----
+	 * If this were a legitimate V7 (well just old style)
+	 * tar header the first character would be non-NUL
+	 * and the link would be on eof the old types
+	 */
+	if ((header->raw[0]>= ' ')&&(header->raw[0] <= '~'))
+	{
+	    switch (header->tar.link)
+	    {
+	    case LINK_OLDNORMAL_FILE:
+	    case LINK_NORMAL_FILE:
+	    case LINK_HARD_LINK:
+	    case LINK_SYMBOLIC_LINK:
+	    case LINK_CHARACTER_SPECIAL:
+	    case LINK_BLOCK_SPECIAL:
+	    case LINK_DIRECTORY:
+	    case LINK_FIFO:
+	    case LINK_CONTIGUOUS_FILE:
+		/* GNU TAR will do this to us */
+	    case LINK_NEXT_LONG_LINK:
+	    case LINK_NEXT_LONG_NAME:
+	    case LINK_GNU1989_LONG_NAMES:
+		type = TAR_V7;
+		break;
+	    default:
+		break;
+	    }
+	}
+	else
+	{
+	    /* -----
+	     * look for anything not zero
+	     */
+	    unsigned int ix;
+
+	    for (ix = 0; ix < sizeof(tar_header); ++ix)
+	    {
+		if (header->raw[ix])
+		{
+		    /* -----
+		     * non-zero so quit looking
+		     */
+		    break;
+		}
+	    }
+	    /* -----
+	     * if we got to the end we know they are all zero so say so
+	     */
+	    if (ix == sizeof(tar_header))
+	    {
+		type = TAR_ZERO_BLOCK;
+	    }
+	}
+    }
+    return type;
+}
+
+
+/* ======================================================================
+ */
+
+static rc_t	sparse_data_make (sparse_data ** new_item, uint64_t offset, uint64_t size)
+{
+    sparse_data * p;
+
+    p = malloc (sizeof (sparse_data));
+    if (p != NULL)
+    {
+	p->offset = offset;
+	p->size = size;
+	p->next = NULL;
+	*new_item = p;
+	return 0;
+    }
+    else
+	return -1;
+}
+
+static rc_t	sparse_data_push(sparse_data ** q, uint64_t offset, uint64_t size)
+{
+    if (q == NULL)
+    {
+	return -1;
+    }
+    else if (*q == NULL)
+    {
+	return sparse_data_make (q, offset, size);
+    }
+    else 
+    {
+	return sparse_data_push (&((*q)->next), offset, size);
+    }
+}
+
+static rc_t	sparse_data_pop (sparse_data ** q, sparse_data **item)
+{
+    if ((q == NULL) || (item == NULL))
+    {
+	return -1;
+    }
+    else
+    {
+	*item = *q;
+	*q = (*item)->next;
+	(*item)->next = NULL;
+	return 0;
+    }
+}
+
+static rc_t	sparse_data_kill (sparse_data ** q)
+{
+    if (q == NULL)
+    {
+	return -1;
+    }
+    if (*q == NULL)
+    {
+	return 0;
+    }
+    if ((*q)->next != NULL)
+    {
+	return sparse_data_kill(&(*q)->next);
+    }
+    free (*q);
+    *q = NULL;
+    return 0;
+}
+
+/* ======================================================================
+ * local module-wide variables (reduction in parameter pushing)
+ *
+ * Module shared variables; kinda like C++ class elements
+ */
+
+static rc_t make_chunk_list(CCTar * self, uint64_t file_offset)
+{
+    uint64_t		count = self->num_chunks;
+    uint64_t		source_position = file_offset;
+    uint64_t		ix;
+    sparse_data * 	psd;
+    rc_t		rc;
+
+    if (self->chunks)
+	free (self->chunks); /* shouldn't happen */
+    self->chunks = malloc( (size_t)( count * sizeof(KTocChunk) ) );
+    if (self->chunks == NULL)
+	return -1;
+
+
+    for (ix = 0; ix < count; ++ix)
+    {
+	rc = sparse_data_pop (&self->sparse_q, &psd);
+	if (rc != 0)
+	    return rc;
+	self->chunks[ix].logical_position = psd->offset;
+	self->chunks[ix].source_position = source_position;
+	self->chunks[ix].size = psd->size;
+	source_position += psd->size;
+	sparse_data_kill(&psd);
+    }
+    return 0;
+}
+
+static void whack_chunk_list(CCTar * self)
+{
+    free (self->chunks);
+    self->chunks = NULL;
+    self->num_chunks = 0;
+}
+
+#if HANDLING_EXTENDED_HEADERS
+/* ======================================================================
+ * mini class for handling pax/posix/ustar 
+ * extended headers and global extended headers
+ *
+ * Many of the values are included to get past range limits imposed by the ustar format
+ * particular for string length and charcter set or shortish integral values.  <ekyword>
+ * and <value> below are UTF-8.
+ *
+ * values in the header are string values written as with a 'printf' using the form
+ *	printf("%d %s=%s\n",<length>,<keyword>,<value>)
+ *
+ * <length> is described ambiguously as 
+ *	"The <length> field shall be the decimal length of the extended header record in octets,
+ *	 including the trailing <newline>."
+ * So does that include the length of <length>? or not?
+ *
+ * The field <keyword> is allowed in a pax Extended Header include but are not limited to
+ *	atime		time_t but with fractional seconds maybe
+ *	charset		enumeration list
+ *	comment		human readable comments
+ *	gid		integer gid allowing numbers greater than ustar limit of 2097151 (07777777)
+ *	gname		over rides xhdr gid and ustar gname and gid
+ *	linkpath
+ *	mtime		time_t but with franctional seconds maybe
+ *	path
+ *	realtime.<ANY>
+ *	security.<ANY>
+ *	size
+ *	uid		integer uid allowing numbers greater than ustar limit of 2097151 (07777777)
+ *	uname
+ * Any other keywords desired can be included but might not be meaningful to many applications.
+ * Keyword can have pretty much any character in it except '='.
+ *
+ * <value> is a UTF-8 string that ends with the '\n'.
+ * 
+ *
+ * charset is limited to (omit the quotation marks)
+ *      <value>			  Formal Standard
+ * "ISO-IR 646 1990"		ISO/IEC 646:1990
+ * "ISO-IR 8859 1 1998"		ISO/IEC 8859-1:1998
+ * "ISO-IR 8859 2 1999"		ISO/IEC 8859-2:1999
+ * "ISO-IR 8859 3 1999"		ISO/IEC 8859-3:1999
+ * "ISO-IR 8859 4 1998"		ISO/IEC 8859-4:1998
+ * "ISO-IR 8859 5 1999"		ISO/IEC 8859-5:1999
+ * "ISO-IR 8859 6 1999"		ISO/IEC 8859-6:1999
+ * "ISO-IR 8859 7 1987"		ISO/IEC 8859-7:1987
+ * "ISO-IR 8859 8 1999"		ISO/IEC 8859-8:1999
+ * "ISO-IR 8859 9 1999"		ISO/IEC 8859-9:1999
+ * "ISO-IR 8859 10 1998"	ISO/IEC 8859-10:1998
+ * "ISO-IR 8859 13 1998"	ISO/IEC 8859-13:1998
+ * "ISO-IR 8859 14 1998"	ISO/IEC 8859-14:1998
+ * "ISO-IR 8859 15 1999"	ISO/IEC 8859-15:1999
+ * "ISO-IR 10646 2000"		ISO/IEC 10646:2000
+ * "ISO-IR 10646 2000 UTF-8"	ISO/IEC 10646, UTF-8 encoding
+ * "BINARY"			None.
+ */
+typedef enum pax_charset
+{
+    PAX_CS_NOT_SPECIFIED,
+    PAX_CS_ISO_IR_646_1990,
+    PAX_CS_ISO_IR_8859_1_1998,
+    PAX_CS_ISO_IR_8859_2_1999,
+    PAX_CS_ISO_IR_8859_3_1999,
+    PAX_CS_ISO_IR_8859_4_1998,
+    PAX_CS_ISO_IR_8859_5_1999,
+    PAX_CS_ISO_IR_8859_6_1999,
+    PAX_CS_PAX_CS_ISO_IR_8859_7_1997,
+    PAX_CS_ISO_IR_8859_8_1999,
+    PAX_CS_ISO_IR_8859_9_1999,
+    PAX_CS_ISO_IR_8859_10_1998,
+    PAX_CS_ISO_IR_8859_13_1998,
+    PAX_CS_ISO_IR_8859_14_1998,
+    PAX_CS_ISO_IR_8859_15_1998,
+    PAX_CS_ISO_IR_1064_2000,
+    PAX_CS_ISO_IR_1064_2000_UTF_8,
+    PAX_CS_BINARY
+} pax_charset;
+
+static const char * pax_charset_strings[] = 
+{
+    "Not Specified",
+    "ISO-IR 646 1990",
+    "ISO-IR 8859 1 1998",
+    "ISO-IR 8859 2 1999",
+    "ISO-IR 8859 3 1999",
+    "ISO-IR 8859 4 1998",
+    "ISO-IR 8859 5 1999",
+    "ISO-IR 8859 6 1999",
+    "ISO-IR 8859 7 1987",
+    "ISO-IR 8859 8 1999",
+    "ISO-IR 8859 9 1999",
+    "ISO-IR 8859 10 1998",
+    "ISO-IR 8859 13 1998",
+    "ISO-IR 8859 14 1998",
+    "ISO-IR 8859 15 1999",
+    "ISO-IR 10646 2000",
+    "ISO-IR 10646 2000 UTF-8",
+    "BINARY",
+    NULL
+};
+
+static pax_charset pax_xhdr_parse_charset_string(char*string)
+{
+    int ix;		/* index */
+    const char * ps;	/* pointer to string */
+
+    for (ps = pax_charset_strings[ix= 0]; ps; ps = pax_charset_strings[++ix])
+	if (strcmp(ps,string) == 0)
+	    return ix;
+    return PAX_CS_NOT_SPECIFIED;	/* matched none so set it to not specified */
+}
+
+typedef struct pax_xheader pax_xheader;
+struct pax_xheader
+{
+    char *	path;		/* supercedes .posix.name */
+    char *	linkpath;	/* supercedes .posix.linkname */
+    char *	uname;		/* user name supercedes .posix.uname uid and .posix.uid */
+    char *	gname;		/* group name supercedes .posix.gname gid and .posix.gid */
+    time_t	atime;		/* supercedes .posix.atime */
+    time_t	mtime;		/* supercedes .posix.mtime */
+    uid_t	uid;		/* supercedes .posix.uid */
+    gid_t	gid;		/* supercedes .posix.gname */
+    off_t	size;		/* supercedes .posix.size */
+    pax_charset	charset;	/* not supported by us? */
+};
+
+static pax_xheader *	pax_xhdr_create (void)
+{
+    pax_xheader * pxv = malloc (sizeof(pax_xheader));
+    memset (pxv,0,sizeof(pax_xheader));
+    return pxv;
+}
+
+static void	pax_xhdr_delete(pax_xheader * self)
+{
+    if (self->path)
+	free (self->path);
+    if (self->linkpath)
+	free (self->linkpath);
+    if (self->uname)
+	free (self->uname);
+    if (self->gname)
+	free (self->gname);
+    free (self);
+}
+
+static rc_t  pax_xhdr_set_general_string (char ** str, const char * val)
+{
+    size_t	len;	/* how much memory */
+    char      *	nl;	/* point to any new line in source */
+    rc_t	rc = 0;	/* return code; assume success */
+
+    if (*str)		/* if already set, free the old value */
+	free (*str);
+    nl = strchr (val, '\n');
+    if (nl)
+    {
+	len = nl - val + 1; /* +1 for NUL */
+    }
+    else
+    {
+	len = strlen (val) + 1;
+    }
+    *str = malloc (len);
+    if (*str)
+    {
+	strncpy (*str, val, len-1);
+	(*str)[len-1] = '\0'; /* if it was a '\n' terminated value this is needed not worth the check if needed */
+    }
+    else
+    {
+	rc = RC(rcFS/*?*/,rcAllocating,0/*?*/,rcNoObj/*?*/,rcNull); /* well its not 0 */
+    }
+    return rc;
+}
+
+/* ----------
+ * new_path points to a string that ends with either a '\n' or a NUL
+ */
+LIB_EXPORT rc_t CC pax_xhdr_set_path(pax_xheader * self, char * new_path)
+{
+    return pax_xhdr_set_general_string(&(self->path),new_path);
+}
+
+/* ----------
+ * new_path points to a string that ends with either a '\n' or a NUL
+ */
+LIB_EXPORT rc_t CC pax_xhdr_set_linkpath(pax_xheader * self, char * new_path)
+{
+    return pax_xhdr_set_general_string(&(self->linkpath),new_path);
+}
+
+/* ----------
+ * new_name points to a string that ends with either a '\n' or a NUL
+ */
+LIB_EXPORT rc_t CC pax_xhdr_set_uname(pax_xheader * self, char * new_name)
+{
+    return pax_xhdr_set_general_string(&(self->uname),new_name);
+}
+
+/* ----------
+ * new_name points to a string that ends with either a '\n' or a NUL
+ */
+LIB_EXPORT rc_t CC pax_xhdr_set_gname(pax_xheader * self, char * new_name)
+{
+    return pax_xhdr_set_general_string(&(self->gname),new_name);
+}
+
+LIB_EXPORT bool CC pax_xhdr_get_general_string (char**src, char**dst, size_t max)
+{
+    if (strlen(*src) > max-1)	/* fail if too big for target */
+    {
+	return false;
+    }
+    strcpy(*dst,*src);
+    return true;
+}
+
+LIB_EXPORT rc_t CC pax_xhdr_get_path(pax_xheader * self, char ** path, size_t max)
+{
+    return (pax_xhdr_get_general_string(&self->path,path,max))? 0 : ~0;
+}
+
+LIB_EXPORT rc_t CC pax_xhdr_get_linkpath(pax_xheader * self, char ** path, size_t max)
+{
+    return (pax_xhdr_get_general_string(&self->linkpath,path,max))? 0 : ~0;
+}
+
+LIB_EXPORT rc_t CC pax_xhdr_get_uname(pax_xheader * self, char ** name, size_t max)
+{
+    return (pax_xhdr_get_general_string(&self->uname,name,max))? 0 : ~0;
+}
+
+LIB_EXPORT rc_t CC pax_xhdr_get_gname(pax_xheader * self, char ** name, size_t max)
+{
+    return (pax_xhdr_get_general_string(&self->gname,name,max))? 0 : ~0;
+}
+
+/* ----------
+ * The mtime and atime <value> is defined as
+ *	The pax utility shall write an mtime record for each file in write
+ *	or copy modes if the file's modification time cannot be represented
+ *	exactly in the ustar header logical record described in ustar
+ *	Interchange Format. This can occur if the time is out of ustar range,
+ *	or if the file system of the underlying implementation supports
+ *	non-integer time granularities and the time is not an integer. All of
+ *	these time records shall be formatted as a decimal representation of
+ *	the time in seconds since the Epoch. If a period ( '.' ) decimal
+ *	point character is present, the digits to the right of the point shall
+ *	represent the units of a subsecond timing granularity, where the first
+ *	digit is tenths of a second and each subsequent digit is a tenth of
+ *	the previous digit. In read or copy mode, the pax utility shall
+ *	truncate the time of a file to the greatest value that is not greater
+ *	than the input header file time. In write or copy mode, the pax
+ *	utility shall output a time exactly if it can be represented exactly
+ *	as a decimal number, and otherwise shall generate only enough digits
+ *	so that the same time shall be recovered if the file is extracted on a
+ *	system whose underlying implementation supports the same time
+ *	granularity.
+ *
+ * So...
+ * Looks like for our purposes we ignore anything after a possible decimal
+ * point and just use the integer part of whatever is there and just not be
+ * to worried about it since we aren't creating any of this, just reading ie.
+ */
+static rc_t	pax_xhdr_set_general_time (const char * ts, time_t * tt)
+{
+    uint64_t temp = strtou64(ts,NULL,10); /* tosses decimal part for us */
+
+    if (temp)
+        *tt = (time_t)temp;
+    return temp ? 0 : ~0;
+}
+
+/* ======================================================================
+ * This is the data accumulated for each entry in a tar file.
+ */
+static struct	tar_entry_data
+{
+    /* -----
+     * We are not using linux (or other O/S specific) type here because the ranges
+     * for the system creating the archive might have larger types than the system
+     * we are running on.  We'll leave it to the outside caller of this program to
+     * "make it fit".
+     */
+
+    
+    entry_type	type;
+
+    char *	path;
+    char *	link;
+
+    uint64_t	size;
+    uint64_t	offset;
+
+    mode_t	mode;
+
+    char *	uname;
+    uid_t	uid;
+
+    char *	gname;
+    gid_t	gid;
+
+    time_t	mtime;
+    time_t	atime;
+    time_t	ctime;
+
+} tar_entry_data;
+#endif
+
+/* ======================================================================
+ *
+ * offset is the byte position within the tar file
+ * hard_limit is the byte position with in the tar file that is not mapped
+ *
+ * This is the ugliest function/method in the whole module.  The extensions
+ * to the tar header are not done in a consistent manner so convolutions
+ * have to be made to support all manner of extensions.
+ */
+static rc_t		process_one_entry		(CCTar * self)
+{
+    rc_t 		rc;
+    char		full_path	[4096];
+    char		full_link	[4096];
+    /* uint64_t		data_offset; */
+    uint64_t		data_position;
+    uint64_t		data_size;
+    int64_t		virtual_data_size;
+    tar_header_type	type;
+    tar_link		link;
+    time_t		mtime;
+    /* mode_t		mode; */
+    uint64_t		current_position;
+    union
+    {
+        const uint8_t *		b;
+        const tar_header *	h;
+    } 			current_header;
+    bool		done;
+    bool		gnu_sparse;
+/*     bool		found_zero_block; */
+
+    DEBUG_ENTRY();
+
+    rc = 0;
+    /* data_offset = */ data_position = virtual_data_size = data_size = 0;
+    type = TAR_UNDEFINED;
+    link = LINK_OLDNORMAL_FILE;
+    mtime = 0;
+    /* mode = 0; */
+    current_position = self->position;
+    done = false;
+    gnu_sparse = false;
+/*     found_zero_block = false; */
+
+    /* -----
+     * clear the full name and link name entries
+     */
+    memset(full_path,0,sizeof(full_path));
+    memset(full_link,0,sizeof(full_link));
+
+    /* -----
+     * set the header at the current TAR block.
+     * That is the map starts at position buffer_start and we are at 
+     * current_position into the file so we take the map as a pointer
+     * and add to it the difference between our current position and the map's
+     * initial position (first header is at map + 0 - 0)
+     */
+    current_header.b = self->buffer;
+
+    /* -----
+     * start processing
+     */
+    do
+    {
+        /* -----
+         * what we will do depends upon the type of this block
+         */
+        type = gnu_sparse ? TAR_SPARSE : what_header_type(current_header.h);
+        if (self->found_zero_block)
+	{
+	    if (self->found_second_zero_block == true)
+	    {
+		type = TAR_ZERO_BLOCK; /* skip anyway */
+	    }
+	    else if (type == TAR_ZERO_BLOCK)
+	    {
+		self->found_second_zero_block = true;
+	    }
+	    else
+	    {
+		rc = RC (rcExe, rcArc, rcParsing, rcFormat, rcUnexpected );
+
+		LOGERR (klogErr, rc,
+			"Found Extra Header after a block of zeros");
+
+                KOutMsg ("header '%lu' position '%lu' limit '%lu'\n", 
+                         self->position + (current_header.b - self->buffer)
+                         ,self->position, self-> position_limit);
+
+		return rc;
+	    }
+        }
+        switch (type)
+        {
+        case TAR_ZERO_BLOCK:
+            self->found_zero_block = true;
+            self->position_new += 512;
+            self->cursor = self->position_new;
+            done = true;
+            return 0;
+        case TAR_SPARSE:
+        {
+            /* -----
+             * If there is an extension header we'll have different work to do
+             */
+            int64_t  ix;
+            uint64_t of;
+            uint64_t sz;
+	    
+            for (ix = 0; ix< GNU_SPARSES_IN_EXTRA_HEADER; ++ix)
+            {
+                rc_t ret;
+                of = tar_strtoll((const uint8_t*)current_header.h->sparse.sparse[ix].offset,
+                                 TAR_SIZE_LEN);
+                sz = tar_strtoll((const uint8_t*)current_header.h->sparse.sparse[ix].num_bytes,
+                                 TAR_SIZE_LEN);
+                if (sz == 0)
+                {
+                    break;
+                }
+                ret = sparse_data_push (&self->sparse_q, of, sz);
+                if (ret)
+                {
+                    sparse_data_kill(&self->sparse_q);
+                    rc = RC (rcExe, rcArc, rcParsing, rcFormat, rcUnexpected );
+                    LOGERR (klogErr, rc, "Problems parsing sparse header");
+                    return rc;
+                }
+                ++self->num_chunks;
+            }
+        }
+        break;
+
+        default:
+            PLOGERR (klogErr,
+                     (klogErr, RC (rcFS, rcArc, rcParsing, rcFormat, rcUnknown),
+                      "unsupported header type $(type) $(string)",
+                      "type=%d,string=%s",
+                      type, get_type_string(type)));
+	    done = true;
+	    break;
+
+        case TAR_GNU_89:
+        case TAR_V7:
+ 	case TAR_POSIX:
+            /* -----
+             * almost anything we do will depend upon the size of the data for this block
+             *
+             * this will be wrong if we ever support cpio...
+             */
+            data_size = (tar_strtoll((uint8_t*)current_header.h->tar.size,TAR_SIZE_LEN));
+            mtime = (tar_strtoll((uint8_t*)current_header.h->tar.mtime,TAR_TIME_LEN));
+            /* mode = (tar_strtoll((uint8_t*)current_header.h->tar.mode,TAR_MODE_LEN)); */
+        }
+        /* -----
+         * Sometimes we are done just by identifying the header type.
+         * If so we break the loop here.
+         */
+        if (done)
+        {
+            /* -----
+             * point at the next header block
+             * Add the size of the header itself plus enough block sizes of data to cover
+             * any associated data.
+             */
+            size_t header_plus_data_block_size = (1+BLOCKS_FOR_BYTES(data_size))*TAR_BLOCK_SIZE;
+            current_position += header_plus_data_block_size;
+            current_header.b += header_plus_data_block_size;
+            break;
+        }
+
+        /* -----
+         * several extensions to USTAR/TAR format headers involve
+         * prepending another header type to give a name longer 
+         * than will fit in tthe header itself.  If we had one of
+         * those use that name.  But if the full path has not been
+         * set use the path from this header.
+         */
+        if (full_path[0] == 0) /* if full_path wasn't filled in by an 'L' long name */
+        {
+            /* -----
+             * if there is a prefix (POSIX style) use it
+             * copy the prefix and then concatenate the name field
+             */
+            if (current_header.h->posix.prefix[0])
+            {
+                /* -----
+                 * copy in the prefix, force a NUL just in case. then add a directory divider 
+                 */
+                strncpy(full_path,current_header.h->posix.prefix,TAR_PREFIX_LEN);
+                full_path[TAR_PREFIX_LEN] = 0x00;
+                strcat(full_path,"/");
+            }
+            strncat(full_path,current_header.h->tar.name,TAR_NAME_LEN);
+        }
+        link = current_header.h->tar.link;
+        switch (link)
+        {
+        case LINK_SPARSE:
+            /* -----
+             * If there is an extension header we'll have different work to do
+             */
+            if (current_header.h->gnu_89.isextended)
+            {
+                /* -----
+                 * If we have an extended header the following makes sure there is room
+                 */
+                if (current_position + (2 * sizeof(tar_header)) > self->position_limit)
+                {
+                    rc = RC (rcExe, rcArc, rcParsing, rcBuffer, rcTooShort);
+                    LOGERR (klogErr, rc, "Tar parsing buffer is too small to parse this file");
+                    return rc;
+                }
+                done = false;
+                gnu_sparse = true;	/* next block will be part of the header and not data */
+                data_position = current_position + 2 * sizeof(tar_header);
+            }
+            else
+            {
+                done = true;
+                gnu_sparse = false;
+                data_position = current_position + sizeof(tar_header);
+            }
+
+            done = (bool)! current_header.h->gnu_89.isextended;
+            {
+                int32_t ix;
+                rc_t	ret;
+
+                virtual_data_size = (tar_strtoll((uint8_t*)current_header.h->gnu_89.realsize,TAR_SIZE_LEN));
+
+                for (ix = 0; ix< GNU_SPARSES_IN_OLD_HEADER; ++ix)
+                {
+                    uint64_t sposition = tar_strtoll((const uint8_t*)current_header.h->gnu_89.sparse[ix].offset,
+                                                     TAR_SIZE_LEN);
+                    uint64_t ssize = tar_strtoll((const uint8_t*)current_header.h->gnu_89.sparse[ix].num_bytes,
+                                                 TAR_SIZE_LEN);
+                    if (ssize == 0)
+                    {
+                        break;
+                    }
+
+                    ret = sparse_data_push (&self->sparse_q, sposition, ssize);
+                    if (ret) 
+                    {
+                        sparse_data_kill(&self->sparse_q);
+                        LOGERR (klogErr, rc, "Error parsing in header sparse data");
+                        return rc;
+                    }
+                    ++self->num_chunks;
+                }
+            }
+            data_position = current_position + sizeof(tar_header);
+            break;
+
+        case LINK_OLDNORMAL_FILE:		/* deprecated normal file */
+            /* -----
+             * this should only happen with LINK_OLDNORMAL_FILE
+             *
+             * If the type is file but the last character in the path is "/"
+             * treat it as a directory instead
+             */
+            if (full_path[strlen(full_path)-2] == '\\')
+            {
+                link = LINK_DIRECTORY;
+            }
+            /* fall through */
+        case LINK_NORMAL_FILE:
+        case LINK_CONTIGUOUS_FILE:
+        case LINK_DIRECTORY:
+            data_position = current_position + sizeof(tar_header);
+            done = true;
+            break;
+
+        case LINK_HARD_LINK:
+        case LINK_SYMBOLIC_LINK:
+            if (full_link[0] == 0)
+            {
+                strncpy(full_link,current_header.h->tar.linkname,TAR_NAME_LEN);
+            }
+            done = true;
+            break;
+
+            /* ----------
+             * These types we ignore
+             */
+        case LINK_CHARACTER_SPECIAL:
+        case LINK_BLOCK_SPECIAL:
+        case LINK_FIFO:
+        case LINK_INODE_METADATA:
+            /* -----
+             * Nothing to be done
+             */
+            PLOGMSG (klogInfo,
+                     (klogInfo,
+                      "ignored link type ($(type)) $(typestring) at $(position)",
+                      "type=$%X,typestring=%s,position=%lld",
+                      (unsigned)(current_header.h->tar.link),
+                      get_link_string(current_header.h->tar.link),
+                      (uint64_t)(current_position)+(uint64_t)(OFFSET_OF(tar_v7_header,link)))); 
+            data_size = 0;
+            done = true;
+            break;
+
+	case LINK_PAX_GLOBAL_XHDR:
+	case LINK_GNU_DUMPDIR: /* we are just gonna ignore this and not treat it like LINK_DIRECTORY */
+	case LINK_SOLARIS_ACL_FILE:
+	case LINK_VOLUME_NAME:
+	case LINK_MULTI_VOLUME:
+            done = true;
+            break;
+
+	case LINK_SOLARIS_ACL:
+	case LINK_PAX_XHDR:	/* posix extended */
+	    break;
+
+        case LINK_NEXT_LONG_LINK:	/* long link name */
+            /* -----
+             * Long link name needs access now to its full set of data blocks, request a window shift 
+             * if it is not currently accessible
+             */
+            if (current_position + sizeof(tar_header) + data_size >  self->position_limit)
+            {
+                rc = RC (rcExe, rcArc, rcParsing, rcBuffer, rcTooShort);
+                LOGERR (klogErr, rc, "Tar parsing buffer is too small to parse this file");
+                return rc;
+            }
+
+            strncpy(full_link, (char*)(current_header.b + sizeof(tar_header)), data_size);
+            /* 	    (void)PLOGMSG ((klogDebug1,"Full linkpath is ($path)","path=%s",full_link)); */
+            break;
+        case LINK_NEXT_LONG_NAME:	/* long path name */
+            /* -----
+             * Long path name needs access now to its full set of data blocks, request a window shift 
+             * if it is not currently accessible
+             */
+            if (current_position + sizeof(tar_header) + data_size > self->position_limit)
+            {
+                rc = RC (rcExe, rcArc, rcParsing, rcBuffer, rcTooShort);
+                LOGERR (klogErr, rc, "Tar parsing buffer is too small to parse this file");
+                return rc;
+            }
+
+            strncpy(full_path, (char*)(current_header.b + sizeof(tar_header)), data_size);
+            break;
+        }
+	
+        /* -----
+         * move the current header position to past the data blocks
+         */
+        if (link == LINK_SPARSE)
+        {
+            current_position += sizeof (tar_header);
+            current_header.b += sizeof(tar_header);
+
+        }
+        else
+        {
+            current_position += sizeof (tar_header)+ ((data_size+TAR_BLOCK_SIZE-1)/TAR_BLOCK_SIZE)*TAR_BLOCK_SIZE;
+            current_header.b += sizeof(tar_header) + ((data_size+TAR_BLOCK_SIZE-1)/TAR_BLOCK_SIZE)*TAR_BLOCK_SIZE;
+        }
+        /* -----
+         * if that is past the currently available
+         * quit the parse of this entry asn ask for a window shift, yeah, we'll redo work
+         * but its far simpler code to just start over than track being in the middle
+         */
+        if ((!done) && (current_position >= self->position_limit))
+        {
+            rc = RC (rcExe, rcArc, rcParsing, rcBuffer, rcTooShort);
+            LOGERR (klogErr, rc, "Tar parsing buffer is too small to parse this file");
+            return rc;
+        }
+    } while (! done);
+
+    /* -----
+     * generate output for this entry
+     */
+    switch (type)
+    {
+    default:
+    case TAR_UNDEFINED:
+        rc = RC (rcFS, rcArc, rcParsing, rcData, rcUnsupported);
+        PLOGERR (klogErr,
+                 (klogErr, rc, "Unhandled Header Block $(typeint)",
+                  "typeint=%u",type));
+        return rc;
+    case TAR_ZERO_BLOCK:
+        /* ignored */
+        break;
+
+    case TAR_CPIO:
+    case TAR_V7:
+    case TAR_POSIX:
+        /* case TAR_PAX: */
+    case TAR_SUN:
+    case TAR_STAR_85:
+    case TAR_STAR_94:
+    case TAR_GNU_89:
+        /*case TAR_GNU_01: */
+    case TAR_SPARSE:
+        /* -----
+         * TODO:
+         *	implement a header checksum routine call it here, and return -1 if the check sum fails
+         */
+        if (gnu_sparse)
+        {
+            link = LINK_SPARSE;	/* faking it for the next section */
+        }
+    
+        switch (link)
+        {
+        case LINK_OLDNORMAL_FILE:
+        case LINK_NORMAL_FILE:
+        case LINK_CONTIGUOUS_FILE:
+	{
+	    uint64_t start;
+	    CCArcFileNode * node;
+
+	    start = data_size ? data_position : 0;
+            /* 	    LOGMSG (klogDebug3, "KArcTOCCreateFile"); */
+            DEBUG_MSG (3, ("about to CreateFile '':$(linkint)\n",
+                      PLOG_2(PLOG_C(link),PLOG_X8(linkint)),
+                      link,link));
+            /* now create a new contained file node */
+            rc = CCArcFileNodeMake ( & node, start, data_size );
+            if ( rc != 0 )
+                LOGERR ( klogInt, rc, "failed to create contained file node" );
+            else
+            {
+		const KFile * sfile;
+		rc = KFileMakeSubRead (&sfile, self->file, start, data_size);
+		if (rc != 0)
+		    LOGERR ( klogInt, rc, "failed to create sub file reader" );
+		else
+		{
+                    void * save;
+                    rc_t orc;
+
+                    copycat_log_set (&node->dad.logs, &save);
+
+		    rc = ccat_md5 ( self->tree, sfile, mtime,
+                                    ccArcFile, &node->dad, full_path);
+
+                    copycat_log_set (save, NULL);
+
+		    orc = KFileRelease (sfile);
+                    if (orc)
+                    {
+                        PLOGERR (klogInt,
+                                 (klogInt, orc,
+                                  "Failure handling a file '$(F) inside of a tar file",
+                                  "F=%s", full_path));
+                        if (rc == 0)
+                            rc = orc;
+                    }
+
+                    self->cursor += node->dad.size;
+
+		}
+		/* if successful, "node" ( allocated locally above )
+		   will have been entered into "cont->sub" */
+	    }
+	    break;
+	}
+	case LINK_HARD_LINK:
+	{
+            DEBUG_MSG (3, ("KArcTOCCreateHardLink"));
+/* 	    rc_t CCTreeSymlink ( CCTree *self, const char *targ, const char *alias ); */
+ 	    rc = CCTreeLink (self->tree, mtime, full_link, full_path);
+	    break;
+	}
+	case LINK_SYMBOLIC_LINK:
+	{
+	    CCSymlinkNode * node;
+
+            DEBUG_MSG (3, ("KArcTOCCreateSoftLink"));
+
+            rc = CCSymlinkNodeMake (&node, full_link);
+            if ( rc != 0 )
+                LOGERR ( klogInt, rc, "failed to create sym link node" );
+	    if ( rc == 0 )
+	    {
+		rc = CCTreeInsert (self->tree, mtime, ccSymlink, node, full_path );
+		if ( rc != 0 )
+		    PLOGERR ( klogInt,  (klogInt, rc, "failed to enter node '$(name)'", "name=%s", full_path ));
+	    }
+	    break;
+	}
+/*
+static
+rc_t KSubChunkFileMake (KSubChunkFile ** pself,
+			const KFile * original,
+			uint64_t size,
+			uint32_t num_chunks)
+*/
+	case LINK_SPARSE:
+	{
+	    CChunkFileNode * node;
+
+            DEBUG_MSG (3, ("LINK_SPARSE KArcTOCCreateChunkedFile"));
+	    rc = CChunkFileNodeMake (&node, virtual_data_size);
+	    if (rc != 0)
+                LOGERR ( klogInt, rc, "failed to create contained chunked file node" );
+            else
+            {
+		const KFile * sfile;
+                void * save;
+
+                copycat_log_set (&node->dad.logs, &save);
+
+		make_chunk_list(self, data_position);
+		whack_chunk_list (self);
+		rc = KFileMakeChunkRead (&sfile, self->file, virtual_data_size, self->num_chunks, self->chunks);
+		if (rc != 0)
+		    LOGERR ( klogInt, rc, "failed to create sub chunk file reader" );
+		else
+		{
+		    rc = ccat_md5 ( self->tree, sfile, mtime,
+                                    ccChunkFile, &node->dad, full_path);
+		    KFileRelease (sfile);
+		}
+		/* if successful, "node" ( allocated locally above )
+		   will have been entered into "cont->sub" */
+
+                copycat_log_set (save, NULL);
+	    }
+	    break;
+	}
+	case LINK_CHARACTER_SPECIAL:
+	case LINK_BLOCK_SPECIAL:
+	case LINK_FIFO:
+	case LINK_VOLUME_NAME:
+	case LINK_SOLARIS_ACL:
+	case LINK_GNU_DUMPDIR:
+	case LINK_SUN_XHDR:
+	case LINK_INODE_METADATA:
+            DEBUG_MSG (1, ("Ignored Entry Type %: named %s",
+		      get_link_string(link),
+		      full_path));
+	    break;
+	case LINK_DIRECTORY:
+	{
+	    CCTree * node;
+            DEBUG_MSG (3, ("KArcTOCCreateDir"));
+
+	    rc = CCTreeMake (&node);
+	    if (rc != 0)
+		LOGERR (klogInt, rc, "failed to make directory node");
+	    else
+	    {
+		rc = CCTreeInsert (self->tree, mtime, ccDirectory, node, full_path);
+		if ( rc != 0 )
+		    PLOGERR ( klogInt,  (klogInt, rc, "failed to enter node '$(name)'", "name=%s", full_path ));
+	    }
+	    break;
+	}
+
+	default:
+	    PLOGMSG (klogInfo,
+		      (klogInfo,
+                       " type ($(type)) name ($(name() link ($(link)) size ($(size)) position ($(position))",
+                       "type=%s,name=%s,link=%s,size=%lld,position=%lld",
+                       get_type_string(type),
+                       full_path,
+                       full_link,
+                       data_size,
+                       data_position));
+	    break;
+	}
+	break;
+    }	
+    self->position_new = current_position;
+    return 0;
+}
+
+static
+rc_t CCTarFillBuffer (CCTar * self)
+{
+    rc_t rc;
+    size_t to_read;
+    size_t to_copy;
+    size_t read;
+    size_t copy_offset;
+
+    assert (self);
+    assert (self->position <= self->position_new);
+
+    /* bring in what we still need from what we already have */
+
+    /* if we are restarting beyond what is in the buffer */
+    if (self->position_new >= self->position_limit)
+    {
+        self->position_limit = self->position_new;
+        to_read = sizeof (self->buffer);
+        to_copy = 0;
+    }
+    /* else we are going to copy some then read some */
+    else
+    {
+        to_copy = self->position_limit - self->position_new;
+        to_read = sizeof (self->buffer) - to_copy;
+        copy_offset = self->position_new - self->position;
+        memmove (self->buffer, self->buffer + copy_offset, to_copy);
+    }
+
+
+    self->position = self->position_new;
+    self->buffer_length = to_copy;
+/*     memset (self->buffer + to_copy, 0, to_read); */
+    rc = KFileReadAll (self->file, self->position_limit, self->buffer + to_copy, to_read, &read);
+    if ((rc == 0) && (read != 0))
+    {
+        self->buffer_length += read;
+        self->position_limit += read;
+    }
+
+    return rc;
+}
+
+
+rc_t ccat_tar ( CCContainerNode *np, const KFile *sf, const char *name )
+{
+    rc_t rc;
+    CCTar * tar;
+    CCFileNode * fnode = np->entry; /* we want the base class FileNode only */
+
+    rc = CCTarMake (&tar, &np->sub, sf, name, fnode);
+    if (rc == 0)
+    {
+        do
+        {
+            rc = CCTarFillBuffer (tar);
+            if (rc != 0) /* this would be a hard 'system' error */
+                break;
+
+            if (tar->position == tar->position_limit) /* EOF */
+                break;
+
+            rc = process_one_entry (tar);
+            if (rc != 0)
+                break;
+
+        } while (!tar->found_second_zero_block);
+
+        /* tar file needs two 512 zero blocks at end
+         * it's a format error if not found */
+        if ( ! tar->found_second_zero_block )
+        {
+            rc_t lrc = RC (rcExe, rcArc, rcAccessing, rcFormat, rcTooShort);
+            fnode->err = true;
+            /* we won't fail copycat over this format error */
+            PLOGERR (klogErr,
+                     (klogErr, lrc,
+                      "tar file '$(F)' missing terminating zero blocks",
+                      "F=%s", name));
+        }
+
+        CCTarWhack (tar);
+    }
+    return rc;
+}
+
diff --git a/tools/copycat/cctree-dump.c b/tools/copycat/cctree-dump.c
new file mode 100644
index 0000000..6545ae2
--- /dev/null
+++ b/tools/copycat/cctree-dump.c
@@ -0,0 +1,1030 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "cctree-priv.h"
+#include "copycat-priv.h"
+#include <klib/printf.h>
+#include <klib/rc.h>
+#include <kapp/main.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <time.h>
+
+
+/*--------------------------------------------------------------------------
+ * fowards
+ */
+static bool CCNameDump ( BSTNode *n, void *data );
+
+
+/*--------------------------------------------------------------------------
+ * CCDumper
+ */
+typedef struct CCDumper CCDumper;
+struct CCDumper
+{
+    rc_t ( * flush ) ( void*, const void*, size_t );
+    void *out;
+
+    const char *sep;
+
+#if ! STORE_ID_IN_NODE
+    uint32_t id;
+#endif
+    uint32_t indent;
+    rc_t rc;
+
+    size_t total;
+    char buffer [ 4096 ];
+};
+
+
+/* Init
+ *  sets up block
+ */
+static
+void CCDumperInit ( CCDumper *self,
+    rc_t ( * flush ) ( void *out, const void *buffer, size_t size ), void *out )
+{
+    self -> flush = flush;
+    self -> out = out;
+    self -> sep = "";
+#if ! STORE_ID_IN_NODE
+    self -> id = 0;
+#endif
+    self -> indent = 0;
+    self -> rc = 0;
+    self -> total = 0;
+}
+
+
+/* Flush
+ */
+static
+rc_t CCDumperFlush ( CCDumper *self )
+{
+    rc_t rc = ( * self -> flush ) ( self -> out, self -> buffer, self -> total );
+    if ( rc == 0 )
+        self -> total = 0;
+    return rc;
+}
+
+static
+rc_t CCDumperFlushLine ( CCDumper *self )
+{
+#if ! _DEBUGGING
+    if ( self -> total < sizeof self -> buffer / 2 )
+        return 0;
+#endif
+    return CCDumperFlush ( self );
+}
+
+
+/* Whack
+ *  flushes buffer if necessary
+ */
+static
+rc_t CCDumperWhack ( CCDumper *self )
+{
+    if ( self -> rc == 0 && self -> total != 0 )
+        return CCDumperFlush ( self );
+    return 0;
+}
+
+
+/* Write
+ *  writes data to buffer, flushes as necessary
+ */
+static
+rc_t CCDumperWrite ( CCDumper *self, const char *buffer, size_t size )
+{
+    rc_t rc;
+    size_t total, num_writ;
+
+    for ( rc = 0, total = 0; total < size; total += num_writ )
+    {
+        if ( self -> total == sizeof self -> buffer )
+        {
+            rc = CCDumperFlush ( self );
+            if ( rc != 0 )
+                break;
+        }
+
+        num_writ = size - total;
+        if ( num_writ > sizeof self -> buffer - self -> total )
+            num_writ = sizeof self -> buffer - self -> total;
+
+        memcpy ( & self -> buffer [ self -> total ], & buffer [ total ], num_writ );
+        self -> total += num_writ;
+    }
+
+    return rc;
+}
+
+/* IndentLevel
+ *  increase or decrease indentation level
+ */
+static
+void CCDumperIncIndentLevel ( CCDumper *self )
+{
+    ++ self -> indent;
+}
+
+static
+void CCDumperDecIndentLevel ( CCDumper *self )
+{
+    if ( self -> indent > 0 )
+        -- self -> indent;
+}
+
+
+/* Indent
+ *  writes indentation spacing
+ */
+static
+rc_t CCDumperIndent ( CCDumper *self )
+{
+    rc_t rc;
+    uint32_t total, num_writ;
+
+    /* use 2 spaces per tab */
+    const char *tabs = "                                ";
+
+    for ( rc = 0, total = 0; total < self -> indent; total += num_writ )
+    {
+        num_writ = ( ( self -> indent - total - 1 ) & 0xF ) + 1;
+        rc = CCDumperWrite ( self, tabs, num_writ + num_writ );
+        if ( rc != 0 )
+            break;
+    }
+
+    return rc;
+}
+
+/* Sep
+ *  write separator string
+ */
+static
+rc_t CCDumperSep ( CCDumper *self )
+{
+    if ( self -> sep == NULL )
+        return 0;
+
+    return CCDumperWrite ( self, self -> sep, strlen ( self -> sep ) );
+}
+
+/* Print
+ *  \t - indent
+ *  \n - end of line
+ *  %d - integer
+ *  %u - unsigned
+ *  %ld - int64_t
+ *  %lu - uint64_t
+ *  %f - double
+ *  %s - null-terminated C-string
+ *  %p - separator
+ *  %S - String*
+ *  %I - unique id
+ *  %T - timestamp
+ *  %M - MD5 digest
+ *  %C - CRC32
+ *  %N - CCName*
+ *  %F - full CCName*
+ */
+static
+rc_t StringPrint ( const String *self, CCDumper *d )
+{
+/* BUFF_WARNING_TRACK has to be larger than all size differences
+ * between a special character and its encoding in XML
+ * 8 is big enough for all I know about when writing this with some
+ * safety margin
+ */
+#define BUFF_WARNING_TRACK 8
+#define BUFF_SIZE (256)
+#define REPLACE_COPY(C,S) \
+    case C: \
+        sp++;\
+        count--;\
+        memcpy (bp,(S),sizeof(S)-1);\
+        bp += sizeof(S)-1;\
+        break
+
+    char buff [256 + 5];
+    char * bp;
+    const char * sp;
+    size_t count;
+    rc_t rc = 0;
+
+    /* start at the beginnings of the string and buffer */
+    sp = self->addr;
+    bp = buff;
+
+    count = self->size;
+
+    while (count > 0)
+    {
+        if ((bp - buff) > (BUFF_SIZE - BUFF_WARNING_TRACK))
+        {
+            rc = CCDumperWrite (d, buff, bp-buff);
+            if (rc)
+                return rc;
+            bp = buff;
+        }
+        switch (*sp)
+        {
+            /* just copy most characters */
+        default:
+            *bp++ = *sp++;
+            count --;
+            break;
+
+            REPLACE_COPY('<',"<");
+            REPLACE_COPY('>',">");
+            REPLACE_COPY('&',"&");
+            REPLACE_COPY('"',""");
+            REPLACE_COPY('\'',"'");
+
+        }
+    }
+    if (bp > buff)
+        rc = CCDumperWrite (d, buff, bp-buff);
+    return rc;
+
+}
+
+static
+rc_t CCNamePrint ( const CCName *self, CCDumper *d )
+{
+    return StringPrint ( & self -> name, d );
+}
+
+static
+rc_t CCNamePrintFull ( const CCName *self, CCDumper *d )
+{
+    if ( self -> dad != NULL )
+    {
+        rc_t rc = CCNamePrintFull ( self -> dad, d );
+        if ( rc == 0 )
+            rc = CCDumperWrite ( d, "/", 1 );
+        if ( rc != 0 )
+            return rc;
+    }
+    return CCNamePrint ( self, d );
+}
+
+static
+rc_t KTimePrint ( KTime_t self, CCDumper *d )
+{
+    int len;
+    char buffer [ 64 ];
+    time_t t = ( time_t ) self;
+
+    struct tm gmt;
+    gmtime_r ( & t, & gmt );
+    len = sprintf ( buffer, "%04d-%02d-%02dT%02d:%02d:%02dZ"
+                    , gmt . tm_year + 1900
+                    , gmt . tm_mon + 1
+                    , gmt . tm_mday
+                    , gmt . tm_hour
+                    , gmt . tm_min
+                    , gmt . tm_sec
+        );
+
+    return CCDumperWrite ( d, buffer, len );
+}
+
+static
+rc_t MD5Print ( const uint8_t *digest, CCDumper *d )
+{
+    int i, len;
+    char buff [ 36 ];
+
+    for ( i = len = 0; i < 16; ++ i )
+        len += sprintf ( & buff [ len ], "%02x", digest [ i ] );
+
+    return CCDumperWrite ( d, buff, 32 );
+}
+
+static
+rc_t CCDumperVPrint ( CCDumper *self, const char *fmt, va_list args )
+{
+    rc_t rc;
+    const char *start, *end;
+
+    for ( rc = 0, start = end = fmt; * end != 0; ++ end )
+    {
+        int len;
+        size_t size;
+        char buffer [ 256 ];
+
+        switch ( * end )
+        {
+        case '\t':
+            if ( end > start )
+                rc = CCDumperWrite ( self, start, end - start );
+            if ( rc == 0 )
+                rc = CCDumperIndent ( self );
+            start = end + 1;
+            break;
+        case '\n':
+            rc = CCDumperWrite ( self, start, end - start + 1 );
+            if ( rc == 0 )
+                rc = CCDumperFlushLine ( self );
+            start = end + 1;
+            break;
+        case '%':
+            if ( end > start )
+            {
+                rc = CCDumperWrite ( self, start, end - start );
+                if ( rc != 0 )
+                    break;
+            }
+            switch ( * ( ++ end ) )
+            {
+            case 'd':
+                len = sprintf ( buffer, "%d", va_arg ( args, int ) );
+                rc = CCDumperWrite ( self, buffer, len );
+                break;
+            case 'u':
+                len = sprintf ( buffer, "%u", va_arg ( args, unsigned int ) );
+                rc = CCDumperWrite ( self, buffer, len );
+                break;
+            case 'x':
+                len = sprintf ( buffer, "%x", va_arg ( args, unsigned int ) );
+                rc = CCDumperWrite ( self, buffer, len );
+                break;
+            case 'f':
+                len = sprintf ( buffer, "%f", va_arg ( args, double ) );
+                rc = CCDumperWrite ( self, buffer, len );
+                break;
+            case 'l':
+                switch ( * ( ++ end ) )
+                {
+                case 'd':
+                    rc = string_printf ( buffer, sizeof buffer, & size, "%ld", va_arg ( args, int64_t ) );
+                    if ( rc == 0 )
+                        rc = CCDumperWrite ( self, buffer, size );
+                    break;
+                case 'u':
+                    rc = string_printf ( buffer, sizeof buffer, & size, "%lu", va_arg ( args, uint64_t ) );
+                    if ( rc == 0 )
+                        rc = CCDumperWrite ( self, buffer, size );
+                    break;
+                }
+                break;
+            case 's':
+                len = sprintf ( buffer, "%s", va_arg ( args, const char* ) );
+                rc = CCDumperWrite ( self, buffer, len );
+                break;
+            case 'p':
+                rc = CCDumperSep ( self );
+                break;
+            case 'S':
+                rc = StringPrint ( va_arg ( args, const String* ), self );
+                break;
+            case 'I':
+#if STORE_ID_IN_NODE
+                len = sprintf ( buffer, "%u", va_arg ( args, uint32_t ) );
+#else
+                len = sprintf ( buffer, "%u", ++ self -> id );
+#endif
+                rc = CCDumperWrite ( self, buffer, len );
+                break;
+            case 'T':
+                rc = KTimePrint ( va_arg ( args, KTime_t ), self );
+                break;
+            case 'M':
+                rc = MD5Print ( va_arg ( args, const uint8_t* ), self );
+                break;
+            case 'C':
+                len = sprintf ( buffer, "%08x", va_arg ( args, unsigned int ) );
+                rc = CCDumperWrite ( self, buffer, len );
+                break;
+            case 'N':
+                rc = CCNamePrint ( va_arg ( args, const CCName* ), self );
+                break;
+            case 'F':
+                rc = CCNamePrintFull ( va_arg ( args, const CCName* ), self );
+                break;
+            case '%':
+                rc = CCDumperWrite ( self, "%", 1 );
+                break;
+            }
+            start = end + 1;
+            break;
+        }
+
+        if ( rc != 0 )
+            break;
+    }
+
+    if ( rc == 0 && end > start )
+    {
+        rc = CCDumperWrite ( self, start, end - start );
+        if ( rc == 0 )
+            rc = CCDumperFlushLine ( self );
+    }
+
+    return rc;
+}
+
+static
+rc_t CCDumperPrint ( CCDumper *self, const char *fmt, ... )
+{
+    rc_t rc;
+    va_list args;
+
+    va_start ( args, fmt );
+    rc = CCDumperVPrint ( self, fmt, args );
+    va_end ( args );
+
+    return rc;
+}
+
+
+/*--------------------------------------------------------------------------
+ * CCFileNode
+ *  a node with a size and modification timestamp
+ *  has a file type determined by magic/etc.
+ *  has an md5 checksum
+ *
+ *  how would an access mode be used? access mode of a file is
+ *  whatever the filesystem says it is, and within an archive,
+ *  it's read-only based upon access mode of outer file...
+ */
+
+/* Dump
+ */
+static
+rc_t CCFileNodeDumpCmn ( const CCFileNode *self, const char *tag,
+    const CCName *name, const String *cached, CCDumper *d )
+{
+    rc_t rc = CCDumperPrint ( d,
+                              "\t<%s "             /* node class */
+                              "id=\"%I\" "         /* unique id  */
+                              "path=\"%F\" "       /* full path  */
+                              "name=\"%N\" "       /* node name  */
+                              , tag
+#if STORE_ID_IN_NODE
+                              , self -> id
+#endif
+                              , name
+                              , name );
+    if ( rc == 0 && cached != NULL )
+        rc = CCDumperPrint ( d,
+                             "cached=\"%S\" "     /* cached name */
+                             , cached );
+    if ( rc == 0 )
+        rc = CCDumperPrint ( d, 
+                             "size=\"%lu\" "
+                             , self->size );
+    if (( rc == 0 ) && ( self->size > 0 ) && ( self->lines != 0 ))
+        rc = CCDumperPrint ( d, 
+                             "lines=\"%lu\" "
+                             , self->lines );
+    if ( rc == 0 )
+        rc = CCDumperPrint ( d,
+                             "mtime=\"%T\" "      /* mod time   */
+                             , name -> mtime );
+    if ( rc == 0 )
+    {
+        if ( self -> rc )
+            rc = CCDumperPrint ( d,
+                                 "filetype=\"Errored%s\" "   /* file type  */
+                                 , self -> ftype );
+        else
+            rc = CCDumperPrint ( d,
+                                 "filetype=\"%s\" "   /* file type  */
+                                 , self -> ftype );
+    }
+    if ( rc == 0 && ! no_md5 )
+        rc = CCDumperPrint ( d,
+                             "md5=\"%M\" "         /* md5 digest */
+                             , self -> _md5 );
+
+    return rc;
+}
+
+typedef struct dump_log_data
+{
+    rc_t rc;
+    CCDumper * d;
+} dump_log_data;
+
+static
+rc_t CCNodeDumpLog ( void * n, CCDumper * d )
+{
+    String s;
+
+    StringInitCString (&s, n); /* cast after add gets past node */
+
+    return CCDumperPrint ( d, "\t<CCError>%S</CCError>\n", &s );
+}
+
+
+static
+rc_t CCFileNodeDump ( const CCFileNode *cself, const char *tag,
+    const CCName *name, const String *cached, CCDumper *d, bool close )
+{
+    rc_t rc;
+    bool trunc;
+    CCFileNode * self = (CCFileNode *)cself;
+
+    trunc = ((self->expected != SIZE_UNKNOWN) && 
+             (self->expected != self->size));
+
+    rc = CCFileNodeDumpCmn ( self, tag, name, cached, d );
+    if ( rc == 0 && self -> crc32 != 0 )
+        rc = CCDumperPrint ( d, " crc32=\"%C\"", self -> crc32 );
+    if ( rc == 0 )
+    {
+        if (self->err || trunc || (self->logs.head != NULL))
+        {
+            do
+            {
+                rc = CCDumperPrint (d, ">\n");
+                if (rc) break;
+
+                if (trunc)
+                {
+                    rc = CCDumperPrint (d, "\t<CCErrSize expected=\"%lu\">"
+                                        "Error in file size expected %lu but got %lu"
+                                        "</CCErrSize>\n", self->expected,
+                                        self->expected, self->size);
+                    if (rc) break;
+                }
+                
+                if (self->err)
+                {
+                    if (self->logs.head != NULL)
+                    {
+                        SLNode* log;
+
+                        while ((log = SLListPopHead (&self->logs)) != NULL)
+                        {
+                            CCNodeDumpLog (log+1, d);
+                            free (log);
+                        }
+                    }
+                    else
+                        rc = CCDumperPrint (d, "\t<CCErr>Not specified</CCErr>\n");
+                }
+                if (rc) break;
+
+                if (close)
+                    rc = CCDumperPrint (d, "\t</%s>\n", tag);
+            } while (0);
+        }
+        else if (close)
+            rc = CCDumperPrint (d, "/>\n");
+        else
+            rc = CCDumperPrint (d, ">\n");                
+    }
+    return rc;
+}
+
+/*--------------------------------------------------------------------------
+ * CCArcFileNode
+ *  a file with an offset into another file
+ */
+
+/* Dump
+ */
+static
+rc_t CCArcFileNodeDump ( const CCArcFileNode *cself, const char *tag,
+    const CCName *name, const String *cached, CCDumper *d, bool close )
+{
+    rc_t rc;
+    bool trunc;
+    CCArcFileNode * self = (CCArcFileNode *)cself;
+
+    trunc = ((self->dad.expected != SIZE_UNKNOWN) && 
+             (self->dad.expected != self->dad.size));
+
+    rc = CCFileNodeDumpCmn ( & self -> dad, tag, name, cached, d );
+    if ( rc == 0 )
+    {
+        if (!xml_dir)
+            rc = CCDumperPrint ( d, " offset=\"%lu\"", self->offset);
+        if (rc == 0) do
+        {
+            if (self->dad.err || trunc || (self->dad.logs.head != NULL))
+            {
+                rc = CCDumperPrint (d, ">\n");
+                if (rc) break;
+
+                if (trunc)
+                {
+                    rc = CCDumperPrint (d, "\t<CCErrSize expected=\"%lu\">"
+                                        "Error in file size expected %lu but got %lu"
+                                        "</CCErrSize>\n", self->dad.expected,
+                                        self->dad.expected, self->dad.size);
+                    if (rc) break;
+                }
+
+                if (self->dad.err)
+                {
+                    if (self->dad.logs.head != NULL)
+                    {
+                        SLNode* log;
+
+                        while ((log = SLListPopHead (&self->dad.logs)) != NULL)
+                        {
+                            CCNodeDumpLog (log+1, d);
+                            free (log);
+                        }
+                    }
+                    else
+                        rc = CCDumperPrint (d, "\t<CCErr>Not specified</CCErr>\n");
+                }
+                if (rc) break;
+
+                if (close)
+                    rc = CCDumperPrint (d, "\t</%s>\n", tag);
+            }
+            else if (close)
+                rc = CCDumperPrint (d, "/>\n");
+            else
+                rc = CCDumperPrint (d, ">\n");                
+        } while (0);
+    }
+    return rc;
+}
+
+
+/*--------------------------------------------------------------------------
+ * CChunkFileNode
+ *  a file with one or more chunks (offset/size) into another file
+ */
+
+/* Dump
+ */
+static
+bool CChunkDump ( SLNode *n, void *data )
+{
+    CCDumper *d = data;
+    const CChunk *self = ( const CChunk* ) n;
+
+    d -> rc = CCDumperPrint ( d, "\t<chunk offset=\"%lu\" size=\"%lu\"/>\n",
+                              self -> offset, self -> size );
+
+    return ( d -> rc != 0 ) ? true : false;
+}
+
+static
+rc_t CChunkFileNodeDump ( const CChunkFileNode *self, const char *tag,
+    const CCName *name, const String *cached, CCDumper *d, bool close )
+{
+    rc_t rc = CCFileNodeDumpCmn ( & self -> dad, tag, name, cached, d );
+    if ( rc == 0 )
+        rc = CCDumperPrint ( d, " size=\"%lu\">\n", self -> dad . size );
+    CCDumperIncIndentLevel ( d );
+    if ( rc == 0 )
+    {
+        if ( SLListDoUntil ( & self -> chunks, CChunkDump, d ) )
+            rc = d -> rc;
+    }
+    CCDumperDecIndentLevel ( d );
+    if ( rc == 0 && close )
+        rc = CCDumperPrint ( d, "\t</%s>\n", tag );
+
+    return rc;
+}
+
+
+/*--------------------------------------------------------------------------
+ * CCCachedFileNode
+ *  a file wrapper with cached file name
+ */
+
+/* Dump
+ */
+#if 0 /* why is this commented out... */
+static
+rc_t CCCachedFileNodeDump ( const CCCachedFileNode *self,
+    const CCName *name, CCDumper *d )
+{
+    rc_t rc;
+    const void *entry = self -> entry;
+
+    switch ( self -> type )
+    {
+    case ccFile:
+    case ccContFile:
+        rc = CCFileNodeDump ( entry, "file", name, & self -> cached, d, true );
+        break;
+    case ccArcFile:
+        rc = CCArcFileNodeDump ( entry, "file", name, & self -> cached, d, true );
+        break;
+    case ccChunkFile:
+        rc = CChunkFileNodeDump ( entry, "file", name, & self -> cached, d, true );
+        break;
+    default:
+        rc = RC ( rcExe, rcTree, rcWriting, rcNode, rcUnrecognized );
+    }
+
+    return rc;
+}
+#endif
+
+/*--------------------------------------------------------------------------
+ * CCContainerNode
+ *  a container/archive file entry
+ *  a file with sub-entries
+ */
+
+/* Dump
+ */
+static
+rc_t CCContainerNodeDump ( const CCContainerNode *self, const char *node,
+    const CCName *name, CCDumper *d )
+{
+    rc_t rc;
+    const void *entry = self -> entry;
+
+    switch ( self -> type )
+    {
+    case ccFile:
+    case ccContFile:
+        rc = CCFileNodeDump ( entry, node, name, NULL, d, false );
+        break;
+    case ccArcFile:
+        rc = CCArcFileNodeDump ( entry, node, name, NULL, d, false );
+        break;
+    case ccChunkFile:
+        rc = CChunkFileNodeDump ( entry, node, name, NULL, d, false );
+        break;
+    default:
+        rc = RC ( rcExe, rcTree, rcWriting, rcNode, rcUnrecognized );
+    }
+
+    if ( rc != 0 )
+        return rc;
+
+    CCDumperIncIndentLevel ( d );
+
+    if ( BSTreeDoUntil ( & self -> sub, false, CCNameDump, d ) )
+        rc = d -> rc;
+
+    CCDumperDecIndentLevel ( d );
+
+    if ( rc == 0 )
+        rc = CCDumperPrint ( d, "\t</%s>\n", node );
+
+    return rc;
+}
+
+
+/*--------------------------------------------------------------------------
+ * CCSymlinkNode
+ *  a directory entry with a substitution path
+ */
+
+/* Dump
+ */
+static
+rc_t CCSymlinkNodeDump ( const CCSymlinkNode *self, const CCName *name, CCDumper *d, bool replaced )
+{
+    const char * tag = replaced ? "replaced-symlink" : "symlink";
+    return CCDumperPrint ( d, "\t<%s name=\"%N\" mtime=\"%T\">%S</%s>\n",
+                           tag, name, name -> mtime, & self -> path, tag );
+}
+
+
+/*--------------------------------------------------------------------------
+ * CCTreeNode
+ *  doesn't actually exist, but is treated separately from tree
+ */
+
+/* Dump
+ */
+static
+rc_t CCTreeNodeDump ( const CCTree *self, const CCName *name, CCDumper *d, bool replaced )
+{
+    const char * tag = replaced ? "replaced-directory" : "directory";
+    rc_t rc = CCDumperPrint ( d, "\t<%s name=\"%N\" mtime=\"%T\">\n",
+                              tag, name, name -> mtime );
+
+    CCDumperIncIndentLevel ( d );
+
+    if ( rc == 0 && BSTreeDoUntil ( self, false, CCNameDump, d ) )
+        rc = d -> rc;
+
+    CCDumperDecIndentLevel ( d );
+
+    if ( rc == 0 )
+        rc = CCDumperPrint ( d, "\t</%s>\n", tag );
+
+    return rc;
+}
+
+
+/*--------------------------------------------------------------------------
+ * CCName
+ *  the main entrypoint
+ */
+
+/* Dump
+ */
+static
+bool CCNameDump ( BSTNode *n, void *data )
+{
+    CCDumper * d = data;
+    const CCName * self = (const CCName*)n;
+    void * entry = self->entry;
+    uint32_t type = self->type;
+    bool replaced = false;
+
+    if (type == ccReplaced)
+    {
+        const CCReplacedNode * node = entry;
+        type = node->type;
+        entry = node->entry;
+        replaced = true;
+    }
+
+    if (type == ccCached)
+    {
+        const CCCachedFileNode * node = entry;
+        type = node->type;
+        entry = node->entry;
+    }
+
+    if ( type == ccHardlink )
+    {
+        do
+        {
+            /* if for some reason the link is broken */
+            if ( self -> entry == NULL )
+                return false;
+            self = self -> entry;
+        }
+        while ( self -> type == ccHardlink );
+
+        entry = self -> entry;
+        type = self -> type;
+        self = ( const CCName* ) n;
+    }
+
+    switch ( type )
+    {
+    case ccFile:
+    case ccContFile:
+        d -> rc = CCFileNodeDump ( entry, replaced ? "replaced-file" : "file", self, NULL, d, true );
+        break;
+    case ccArcFile:
+        d -> rc = CCArcFileNodeDump ( entry, replaced ? "replaced-file" : "file", self, NULL, d, true );
+        break;
+    case ccChunkFile:
+        d -> rc = CChunkFileNodeDump ( entry, replaced ? "replaced-file" : "file", self, NULL, d, true );
+        break;
+    case ccContainer:
+        d -> rc = CCContainerNodeDump ( entry, replaced ? "replaced-container" : "container", self, d );
+        break;
+    case ccArchive:
+        d -> rc = CCContainerNodeDump ( entry, replaced ? "replaced-archive" : "archive", self, d );
+        break;
+    case ccSymlink:
+        d -> rc = CCSymlinkNodeDump ( entry, self, d, replaced );
+        break;
+    case ccDirectory:
+        d -> rc = CCTreeNodeDump ( entry, self, d, replaced );
+        break;
+    case ccCached:
+#if 0
+        d -> rc = CCCachedFileNodeDump ( entry, self, d );
+#else
+        d -> rc = RC ( rcExe, rcTree, rcWriting, rcNode, rcCorrupt );
+#endif
+        break;
+    default:
+        d -> rc = RC ( rcExe, rcTree, rcWriting, rcNode, rcUnrecognized );
+    }
+
+    return ( d -> rc != 0 ) ? true : false;
+}
+
+    
+
+/*--------------------------------------------------------------------------
+ * CCTree
+ *  a binary search tree with CCNodes
+ */
+
+/* Dump
+ *  dump tree using provided callback function
+ *
+ *  "write" [ IN, NULL OKAY ] and "out" [ IN, OPAQUE ] - callback function
+ *  for writing. if "write" is NULL, print to stdout.
+ */
+static
+rc_t CCTreeDumpInt2 ( const CCTree *self, CCDumper *d, SLList * logs )
+{
+    rc_t rc = 0;
+
+    /* print logs attached to this node */
+    if (logs->head != NULL)
+    {
+        SLNode * log;
+        while ((log = SLListPopHead (logs)) != NULL)
+        {
+            CCNodeDumpLog (log+1, d);
+            free (log);
+        }
+    }
+
+    CCDumperIncIndentLevel ( d );
+
+    if ( BSTreeDoUntil ( self, false, CCNameDump, d ) )
+        rc = d -> rc;
+
+    CCDumperDecIndentLevel ( d );
+    
+    return rc;
+}
+
+/* print root node and call out to print what that contains */
+static
+rc_t CCTreeDumpInt ( const CCTree *self, CCDumper *d, SLList * logs )
+{
+    ver_t v = KAppVersion ();
+    rc_t rc = CCDumperPrint ( d, "<ROOT version=\"%u.%u.%u\">\n",
+                              VersionGetMajor(v),
+                              VersionGetMinor(v),
+                              VersionGetRelease(v));
+    if ( rc == 0 )
+    {
+        rc = CCTreeDumpInt2 ( self, d, logs );
+
+        if ( rc == 0 )
+            CCDumperPrint ( d, "</ROOT>\n" );
+    }
+    return rc;
+}
+
+static
+rc_t write_FILE ( void *out, const void *buffer, size_t bytes )
+{
+    size_t num_writ;
+
+    if ( bytes == 0 )
+        return 0;
+
+    num_writ = fwrite ( buffer, 1, bytes, out );
+    if ( num_writ == bytes )
+        return 0;
+    if ( num_writ != 0 )
+        return RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+    if ( buffer == NULL )
+        return RC ( rcExe, rcFile, rcWriting, rcParam, rcNull );
+
+    return RC ( rcExe, rcFile, rcWriting, rcNoObj, rcUnknown );
+}
+
+rc_t CCTreeDump ( const CCTree *self,
+    rc_t ( * write ) ( void *out, const void *buffer, size_t bytes ),
+                  void *out, SLList * logs )
+{
+    rc_t rc, rc2;
+    CCDumper d;
+
+    if ( write == NULL )
+    {
+        write = write_FILE;
+        out = stdout;
+    }
+
+    CCDumperInit ( & d, write, out );
+
+    rc = CCTreeDumpInt ( self, & d, logs );
+
+    rc2 = CCDumperWhack ( & d );
+
+    return rc ? rc : rc2;
+}
diff --git a/tools/copycat/cctree-priv.h b/tools/copycat/cctree-priv.h
new file mode 100644
index 0000000..897576e
--- /dev/null
+++ b/tools/copycat/cctree-priv.h
@@ -0,0 +1,351 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_cctree_priv_
+#define _h_cctree_priv_
+
+#ifndef _h_klib_container_
+#include <klib/container.h>
+#endif
+
+#ifndef _h_klib_text_
+#include <klib/text.h>
+#endif
+
+#ifndef _h_kfs_directory_
+#include <kfs/directory.h>
+#endif
+
+#define STORE_ID_IN_NODE 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+typedef struct BSTree CCTree;
+typedef struct CCName CCName;
+
+
+/*--------------------------------------------------------------------------
+ * CCType
+ *  enum describing entry type
+ */
+enum CCType
+{
+    ccFile,
+    ccContFile,
+    ccArcFile,
+    ccChunkFile,
+    ccContainer,
+    ccArchive,
+    ccSymlink,
+    ccHardlink,
+    ccDirectory,
+    ccCached,
+    ccReplaced  /* a name attached to a replaced file (name twice in tar for example) */
+};
+
+
+/*--------------------------------------------------------------------------
+ * CCFileNode
+ *  a node with a size and modification timestamp
+ *  has a file type determined by magic/etc.
+ *  has an md5 checksum
+ *
+ *  how would an access mode be used? access mode of a file is
+ *  whatever the filesystem says it is, and within an archive,
+ *  it's read-only based upon access mode of outer file...
+ */
+typedef struct CCFileNode CCFileNode;
+struct CCFileNode
+{
+    uint64_t expected;  /* size expected (0 if not known) */
+/* #define SIZE_UNKNOWN    (UINT64_MAX) */
+#define SIZE_UNKNOWN    ((uint64_t)(int64_t)-1)
+    uint64_t size;      /* actual size */
+    uint64_t lines;     /* linecount if ASCII */
+    uint32_t crc32;
+#if STORE_ID_IN_NODE
+    uint32_t id;
+#endif
+    rc_t rc;
+    bool err;          /* errors found while reading/parsing */
+    char ftype [ 252 ];
+    uint8_t _md5 [ 32 ];
+    SLList logs;
+};
+
+
+/* Make
+ *  creates an object with provided properties
+ *  md5 digest needs to be filled in afterward
+ */
+rc_t CCFileNodeMake ( CCFileNode **n, uint64_t expected );
+
+/* Whack
+ */
+#define CCFileNodeWhack( self ) \
+    free ( self )
+
+
+/*--------------------------------------------------------------------------
+ * CCArcFileNode
+ *  a file with an offset into another file
+ */
+typedef struct CCArcFileNode CCArcFileNode;
+struct CCArcFileNode
+{
+    CCFileNode dad;
+    uint64_t offset;
+};
+
+/* Make
+ *  creates an object with provided properties
+ *  md5 digest needs to be filled in afterward
+ */
+rc_t CCArcFileNodeMake ( CCArcFileNode **n,
+    uint64_t offset, uint64_t size );
+
+/* Whack
+ */
+#define CCArcFileNodeWhack( self ) \
+    free ( self )
+
+
+/*--------------------------------------------------------------------------
+ * CChunkFileNode
+ *  a file with one or more chunks (offset/size) into another file
+ */
+typedef struct CChunk CChunk;
+struct CChunk
+{
+    SLNode n;
+    uint64_t offset;
+    uint64_t size;
+};
+
+typedef struct CChunkFileNode CChunkFileNode;
+struct CChunkFileNode
+{
+    CCFileNode dad;
+    SLList chunks;
+};
+
+/* Make
+ *  creates an object with provided properties
+ *  md5 digest needs to be filled in afterward
+ */
+rc_t CChunkFileNodeMake ( CChunkFileNode **n, uint64_t size );
+
+/* AddChunk
+ *  adds a chunk to the chunk file
+ */
+rc_t CChunkFileNodeAddChunk ( CChunkFileNode *self,
+    uint64_t offset, uint64_t size );
+
+/* Whack
+ */
+void CChunkFileNodeWhack ( CChunkFileNode *self );
+
+
+/*--------------------------------------------------------------------------
+ * CCCachedFileNode
+ *  a file wrapper with cached file name
+ */
+typedef struct CCCachedFileNode CCCachedFileNode;
+struct CCCachedFileNode
+{
+    /* cached name */
+    String cached;
+
+    /* container CCFileNode */
+    void *entry;
+    uint32_t type;
+};
+
+/* Make
+ *  creates a cached file wrapper
+ */
+rc_t CCCachedFileNodeMake ( CCCachedFileNode **n,
+    const char *path, enum CCType type, const void *entry );
+
+/* Whack
+ */
+void CCCachedFileNodeWhack ( CCCachedFileNode *self );
+
+
+/*--------------------------------------------------------------------------
+ * CCSymlinkNode
+ *  a directory entry with a substitution path
+ */
+typedef struct CCSymlinkNode CCSymlinkNode;
+struct CCSymlinkNode
+{
+    String path;
+};
+
+/* Make
+ *  creates a symlink object
+ */
+rc_t CCSymlinkNodeMake ( CCSymlinkNode **n, const char *path );
+
+/* Whack
+ */
+#define CCSymlinkNodeWhack( self ) \
+    free ( self )
+
+
+/*--------------------------------------------------------------------------
+ * CCTree
+ *  a binary search tree with CCNodes
+ */
+
+/* Make
+ *  make a root tree or sub-directory
+ */
+rc_t CCTreeMake ( CCTree **t );
+
+/* Insert
+ *  create an entry into a tree
+ *  parses path into required sub-directories
+ *
+ *  "mtime" [ IN ] - modification timestamp
+ *
+ *  "type" [ IN ] and "entry" [ IN ] - typed entry
+ *
+ *  "path" [ IN ] - vararg-style path of the entry, relative
+ *  to "self".
+ *
+ * NB - '..' is not allowed in this implementation.
+ */
+rc_t CCTreeInsert ( CCTree *self, KTime_t mtime,
+    enum CCType type, const void *entry, const char *path, ... );
+
+/* Find
+ *  find a named node
+ *  returns NULL if not found
+ */
+const CCName *CCTreeFind ( const CCTree *self, const char *path, ... );
+
+
+/* Link
+ *  create a symlink to existing node
+ */
+rc_t CCTreeLink ( CCTree *self, KTime_t mtime,
+    const char *targ, const char *alias );
+
+
+/* Whack
+ */
+void CCTreeWhack ( CCTree *self );
+
+/* Dump
+ *  dump tree using provided callback function
+ *
+ *  "write" [ IN, NULL OKAY ] and "out" [ IN, OPAQUE ] - callback function
+ *  for writing. if "write" is NULL, print to stdout.
+ */
+rc_t CCTreeDump ( const CCTree *self,
+                  rc_t ( * write ) ( void *out, const void *buffer, size_t bytes ),
+                  void *out, SLList * logs );
+
+
+/*--------------------------------------------------------------------------
+ * CCContainerNode
+ *  its entry is a container file, i.e. an archive or else processed
+ *  with some sort of envelope such as compression. its sub nodes
+ *  are the contents and have their own names.
+ */
+typedef struct CCContainerNode CCContainerNode;
+struct CCContainerNode
+{
+    /* contents */
+    CCTree sub;
+
+    /* container CCFileNode */
+    void *entry;
+    uint32_t type;
+};
+
+/* Make
+ *  creates an archive object
+ */
+rc_t CCContainerNodeMake ( CCContainerNode **n,
+    enum CCType type, const void *entry );
+
+/* Whack
+ */
+void CCContainerNodeWhack ( CCContainerNode *self );
+
+
+/*--------------------------------------------------------------------------
+ * CCReplacedNode
+ * its entry is any other type.  when a name shows up twice in a tar file
+ * the first version is replaced.
+ */
+typedef struct CCReplacedNode CCReplacedNode;
+struct CCReplacedNode
+{
+    /* container CCFileNode */
+    void *entry;
+    uint32_t type;
+};
+
+/* Make
+ */
+rc_t CCReplacedNodeMake ( CCReplacedNode **n,
+    enum CCType type, const void *entry );
+
+/* Whack
+ */
+void CCReplacedNodeWhack ( CCReplacedNode *self );
+
+
+
+/*--------------------------------------------------------------------------
+ * CCName
+ *  an entry name in a CCTree
+ */
+struct CCName
+{
+    BSTNode n;
+    CCName *dad;
+    KTime_t mtime;
+    void *entry;
+    String name;
+    uint32_t type;
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _h_cctree_priv_ */
diff --git a/tools/copycat/cctree.c b/tools/copycat/cctree.c
new file mode 100644
index 0000000..f3bdaa2
--- /dev/null
+++ b/tools/copycat/cctree.c
@@ -0,0 +1,754 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "copycat-priv.h"
+#include "cctree-priv.h"
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+
+/*--------------------------------------------------------------------------
+ * CCFileNode
+ *  a node with a size and modification timestamp
+ *  has a file type determined by magic/etc.
+ *  has an md5 checksum
+ *
+ *  how would an access mode be used? access mode of a file is
+ *  whatever the filesystem says it is, and within an archive,
+ *  it's read-only based upon access mode of outer file...
+ */
+
+static
+void CCFileNodeInit ( CCFileNode *self, uint64_t expected )
+{
+#if STORE_ID_IN_NODE
+    static uint32_t file_id;
+    self -> id = ++ file_id;
+#endif
+    self -> expected = expected;
+    self -> size = 0;   /* we learn this with the counter file */
+    self -> lines = 0;   /* we learn this with the counter file */
+    self -> crc32 = 0;
+    self -> rc = 0;
+    self -> err = false;
+    memset ( self -> ftype, 0, sizeof self -> ftype );
+    memset ( self -> _md5, 0, sizeof self -> _md5 );
+    SLListInit ( &self->logs );
+}
+
+/* Make
+ *  creates an object with provided properties
+ *  md5 digest needs to be filled in afterward
+ */
+rc_t CCFileNodeMake ( CCFileNode **np, uint64_t expected )
+{
+    CCFileNode *n = malloc ( sizeof * n );
+    if ( n == NULL )
+        return RC ( rcExe, rcTree, rcInserting, rcMemory, rcExhausted );
+
+    CCFileNodeInit ( n, expected );
+
+    * np = n;
+    return 0;
+}
+
+/*--------------------------------------------------------------------------
+ * CCArcFileNode
+ *  a file with an offset into another file
+ */
+
+/* Make
+ *  creates an object with provided properties
+ *  md5 digest needs to be filled in afterward
+ */
+rc_t CCArcFileNodeMake ( CCArcFileNode **np,
+    uint64_t offset, uint64_t expected )
+{
+    CCArcFileNode *n = malloc ( sizeof * n );
+    if ( n == NULL )
+        return RC ( rcExe, rcTree, rcInserting, rcMemory, rcExhausted );
+
+    CCFileNodeInit ( & n -> dad, expected );
+    n -> offset = offset;
+
+    * np = n;
+    return 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ * CChunkFileNode
+ *  a file with one or more chunks (offset/size) into another file
+ */
+
+/* Whack
+ */
+static
+void CChunkWhack ( SLNode *n, void *ignore )
+{
+    free ( n );
+}
+
+void CChunkFileNodeWhack ( CChunkFileNode *self )
+{
+    if ( self != NULL )
+    {
+        SLListWhack ( & self -> chunks, CChunkWhack, NULL );
+        CCFileNodeWhack ( & self -> dad );
+    }
+}
+
+/* Make
+ *  creates an object with provided properties
+ *  md5 digest needs to be filled in afterward
+ */
+rc_t CChunkFileNodeMake ( CChunkFileNode **np, uint64_t expected )
+{
+    CChunkFileNode *n = malloc ( sizeof * n );
+    if ( n == NULL )
+        return RC ( rcExe, rcTree, rcInserting, rcMemory, rcExhausted );
+
+    CCFileNodeInit ( & n -> dad, expected );
+    SLListInit ( & n -> chunks );
+
+    * np = n;
+    return 0;
+}
+
+/* AddChunk
+ *  adds a chunk to the chunk file
+ */
+rc_t CChunkFileNodeAddChunk ( CChunkFileNode *self,
+    uint64_t offset, uint64_t size )
+{
+    CChunk *c = malloc ( sizeof * c );
+    if ( c == NULL )
+        return RC ( rcExe, rcTree, rcInserting, rcMemory, rcExhausted );
+
+    c -> offset = offset;
+    c -> size = size;
+
+    SLListPushTail ( & self -> chunks, & c -> n );
+    return 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ * CCCachedFileNode
+ *  a file wrapper with cached file name
+ */
+
+/* Make
+ *  creates a cached file wrapper
+ */
+rc_t CCCachedFileNodeMake ( CCCachedFileNode **np, const char *path,
+    enum CCType type, const void *entry )
+{
+    CCCachedFileNode *n = malloc ( sizeof * n + strlen ( path ) + 1 );
+    if ( n == NULL )
+        return RC ( rcExe, rcTree, rcInserting, rcMemory, rcExhausted );
+
+    strcpy ( ( char* ) ( n + 1 ), path );
+    StringInitCString ( & n -> cached, ( char* ) ( n + 1 ) );
+    n -> entry = ( void* ) entry;
+    n -> type = type;
+
+    * np = n;
+    return 0;
+}
+
+/* Whack
+ */
+void CCCachedFileNodeWhack ( CCCachedFileNode *self )
+{
+    if ( self != NULL )
+    {
+        switch ( self -> type )
+        {
+        case ccFile:
+            CCFileNodeWhack ( self -> entry );
+            break;
+        case ccArcFile:
+            CCArcFileNodeWhack ( self -> entry );
+            break;
+        case ccChunkFile:
+            CChunkFileNodeWhack ( self -> entry );
+            break;
+        }
+        free ( self );
+    }
+}
+
+
+/*--------------------------------------------------------------------------
+ * CCSymlinkNode
+ *  a directory entry with a substitution path
+ */
+
+/* Make
+ *  creates a symlink object
+ */
+rc_t CCSymlinkNodeMake ( CCSymlinkNode **np, const char *path )
+{
+    CCSymlinkNode *n = malloc ( sizeof * n + strlen ( path ) + 1 );
+    if ( n == NULL )
+        return RC ( rcExe, rcTree, rcInserting, rcMemory, rcExhausted );
+
+    strcpy ( ( char* ) ( n + 1 ), path );
+    StringInitCString ( & n -> path, ( char* ) ( n + 1 ) );
+
+    * np = n;
+    return 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ * CCName
+ *  an entry name in a CCTree
+ */
+
+
+/* Whack
+ */
+static
+void CCNameWhack ( BSTNode *n, void *ignore )
+{
+    CCName *self = ( CCName* ) n;
+    if ( self -> entry != NULL ) switch ( self -> type )
+    {
+    case ccFile:
+    case ccContFile:
+        CCFileNodeWhack ( self -> entry );
+        break;
+    case ccArcFile:
+        CCArcFileNodeWhack ( self -> entry );
+        break;
+    case ccChunkFile:
+        CChunkFileNodeWhack ( self -> entry );
+        break;
+    case ccContainer:
+        CCContainerNodeWhack ( self -> entry );
+        break;
+    case ccSymlink:
+        CCSymlinkNodeWhack ( self -> entry );
+        break;
+    case ccHardlink:
+        break;
+    case ccDirectory:
+        CCTreeWhack ( self -> entry );
+        break;
+    }
+
+    free ( self );
+}
+
+
+/* Make
+ *  make a node name
+ */
+static
+rc_t CCNameMake ( CCName **np, KTime_t mtime, CCName *dad,
+    const String *name, enum CCType type, const void *entry )
+{
+    CCName *n = malloc ( sizeof * n + name -> size + 1 );
+    if ( n == NULL )
+        return RC ( rcExe, rcTree, rcInserting, rcMemory, rcExhausted );
+
+    string_copy ( ( char* ) ( n + 1 ), name -> size + 1, name -> addr, name -> size );
+    n -> mtime = mtime;
+    n -> dad = dad;
+    n -> entry = ( void* ) entry;
+    StringInit ( & n -> name, ( char* ) ( n + 1 ), name -> size, name -> len );
+    n -> type = ( uint32_t ) type;
+
+    * np = n;
+    return 0;
+}
+
+/* Cmp
+ * Sort
+ */
+static
+int64_t CCNameCmp ( const void *item, const BSTNode *n )
+{
+    const String *a = item;
+    const CCName *b = ( const CCName* ) n;
+    return StringCompare ( a, & b -> name );
+}
+
+static
+int64_t CCNameSort ( const BSTNode *item, const BSTNode *n )
+{
+    const CCName *a = ( const CCName* ) item;
+    const CCName *b = ( const CCName* ) n;
+    int64_t cmp = StringCompare ( & a -> name, & b -> name );
+    if (cmp != 0)
+        return cmp;
+#if 0
+    if (b->type == ccReplaced)
+        return 1;
+#endif
+    return 1; /* make new item always greater than existing n */
+}
+
+
+/*--------------------------------------------------------------------------
+ * CCContainerNode
+ *  an archive file entry
+ *  a file with a sub-directory
+ */
+
+
+/* Whack
+ */
+void CCContainerNodeWhack ( CCContainerNode *self )
+{
+    if ( self != NULL )
+    {
+        BSTreeWhack ( & self -> sub, CCNameWhack, NULL );
+        switch ( self -> type )
+        {
+        case ccFile:
+            CCFileNodeWhack ( self -> entry );
+            break;
+        case ccArcFile:
+            CCArcFileNodeWhack ( self -> entry );
+            break;
+        case ccChunkFile:
+            CChunkFileNodeWhack ( self -> entry );
+            break;
+        }
+        free ( self );
+    }
+}
+
+/* Make
+ *  creates an archive object
+ */
+rc_t CCContainerNodeMake ( CCContainerNode **np,
+    enum CCType type, const void *entry )
+{
+    CCContainerNode *n = malloc ( sizeof * n );
+    if ( n == NULL )
+        return RC ( rcExe, rcTree, rcInserting, rcMemory, rcExhausted );
+
+    BSTreeInit ( & n -> sub );
+    n -> entry = ( void* ) entry;
+    n -> type = ( uint32_t ) type;
+
+    * np = n;
+    return 0;
+}
+
+
+
+/*--------------------------------------------------------------------------
+ * CCReplacedNode
+ *  an archive file entry
+ *  a file with a sub-directory
+ */
+
+
+/* Whack
+ */
+void CCReplacedNodeWhack ( CCReplacedNode *self )
+{
+    if ( self != NULL )
+    {
+        switch ( self -> type )
+        {
+        case ccFile:
+            CCFileNodeWhack ( self -> entry );
+            break;
+        case ccArcFile:
+            CCArcFileNodeWhack ( self -> entry );
+            break;
+        case ccChunkFile:
+            CChunkFileNodeWhack ( self -> entry );
+            break;
+        }
+        free ( self );
+    }
+}
+
+/* Make
+ *  creates an archive object
+ */
+rc_t CCReplacedNodeMake ( CCReplacedNode **np,
+    enum CCType type, const void *entry )
+{
+    CCReplacedNode *n = malloc ( sizeof * n );
+    if ( n == NULL )
+        return RC ( rcExe, rcTree, rcInserting, rcMemory, rcExhausted );
+
+    n -> entry = ( void* ) entry;
+    n -> type = ( uint32_t ) type;
+
+    * np = n;
+    return 0;
+}
+
+
+
+/*--------------------------------------------------------------------------
+ * CCTree
+ *  a binary search tree with CCNodes
+ */
+
+
+/* Whack
+ */
+void CCTreeWhack ( CCTree *self )
+{
+    if ( self != NULL )
+    {
+        BSTreeWhack ( self, CCNameWhack, NULL );
+        free ( self );
+    }
+}
+
+
+/* Make
+ *  make a root tree or sub-directory
+ */
+rc_t CCTreeMake ( CCTree **tp )
+{
+    CCTree *t = malloc ( sizeof * t );
+    if ( t == NULL )
+        return RC ( rcExe, rcTree, rcInserting, rcMemory, rcExhausted );
+
+    BSTreeInit ( t );
+
+    * tp = t;
+    return 0;
+}
+
+
+/* Insert
+ *  create an entry into a tree
+ *  parses path into required sub-directories
+ */
+static
+void CCTreePatchSubdirPath ( BSTNode *n, void *data )
+{
+    CCName *sym = ( CCName* ) n;
+    sym -> dad = data;
+}
+
+static
+rc_t CCTreeVInsert ( CCTree *self, KTime_t mtime,
+    enum CCType type, const void *entry, const char *fmt, va_list args )
+{
+    rc_t rc;
+    size_t sz;
+    String name;
+    CCName *dad, *sym;
+
+    char path [ 4096 ];
+    int i, j, len = vsnprintf ( path, sizeof path, fmt, args );
+    if ( len < 0 || len >= sizeof path )
+        return RC ( rcExe, rcTree, rcInserting, rcPath, rcExcessive );
+
+    while ( len > 0 && path [ len - 1 ] == '/' )
+        path [ -- len ] = 0;
+
+    /* create/navigate path */
+    for ( dad = NULL, i = 0; i < len; i = j + 1 )
+    {
+        for ( j = i; j < len; ++ j )
+        {
+            if ( path [ j ] == '/' )
+            {
+                /* detect non-empty names */
+                sz = j - i;
+                if ( sz != 0 )
+                {
+                    CCTree *dir;
+
+                    /* ignore '.' */
+                    if ( sz == 1 && path [ i ] == '.' )
+                        break;
+
+                    /* '..' is not allowed */
+                    if ( sz == 2 && path [ i ] == '.' && path [ i + 1 ] == '.' )
+                        return RC ( rcExe, rcTree, rcInserting, rcPath, rcIncorrect );
+
+                    /* get name of directory */
+                    StringInit ( & name, & path [ i ], sz, string_len ( & path [ i ], sz ) );
+
+                    /* find existing */
+                    sym = ( CCName* ) BSTreeFind ( self, & name, CCNameCmp );
+
+                    /* handle a hard link */
+                    while ( sym != NULL && sym -> type == ccHardlink )
+                        sym = sym -> entry;
+
+                    /* should be a directory-ish thing */
+                    if ( sym != NULL )
+                    {
+                        switch ( sym -> type )
+                        {
+                        case ccContainer:
+                        case ccArchive:
+                            self = & ( ( CCContainerNode* ) sym -> entry ) -> sub;
+                            break;
+                        case ccDirectory:
+                            self = sym -> entry;
+                            break;
+                        default:
+                            return RC ( rcExe, rcTree, rcInserting, rcPath, rcIncorrect );
+                        }
+
+                        dad = sym;
+                        break;
+                    }
+
+                    /* create new sub-directory */
+                    rc = CCTreeMake ( & dir );
+                    if ( rc != 0 )
+                        return rc;
+
+                    /* create directory name */
+                    rc = CCNameMake ( & sym, mtime, dad, & name, ccDirectory, dir );
+                    if ( rc != 0 )
+                    {
+                        CCTreeWhack ( dir );
+                        return rc;
+                    }
+
+                    /* enter it into current directory
+                       don't need to validate it's unique */
+                    BSTreeInsert ( self, & sym -> n, CCNameSort );
+                    dad = sym;
+                    self = dir;
+                }
+                break;
+            }
+        }
+
+        if ( j == len )
+            break;
+    }
+
+    /* create entry name */
+    if ( i >= len )
+        return RC ( rcExe, rcTree, rcInserting, rcPath, rcIncorrect );
+    sz = len - i;
+    StringInit ( & name, & path [ i ], sz, string_len ( & path [ i ], sz ) );
+
+
+    /* create named entry */
+    rc = CCNameMake ( & sym, mtime, dad, & name, type, entry );
+    if ( rc == 0 )
+    {
+#if 0
+        /* enter it into tree */
+        rc = BSTreeInsertUnique ( self, & sym -> n, NULL, CCNameSort );
+        if ( rc != 0 )
+            free ( sym );
+#else
+        BSTNode * n = BSTreeFind (self, &sym->name, CCNameCmp);
+        if (n != NULL)
+        {
+            CCReplacedNode * rn;
+            CCName * nn = (CCName*)n;
+
+            switch (nn->type)
+            {
+            case ccDirectory:
+                if (sym->type == ccDirectory)
+                {
+                    /* better would be to capture directory traits then goto */
+                    nn->mtime = sym->mtime;
+
+                    /* we aren't yet handling a directory duplicate other than tar files */
+
+                    if (((CCContainerNode*)sym->entry)->sub.root != NULL)
+                        rc = RC (rcExe, rcTree, rcInserting, rcNode, rcIncorrect);
+
+                    goto skip_insert;
+                }
+            default:
+                rc = CCReplacedNodeMake (&rn, nn->type, nn->entry);
+                if (rc == 0)
+                {
+                    nn->type = ccReplaced;
+                    nn->entry = rn;
+                }
+            }
+        }
+        if (rc == 0)
+            rc = BSTreeInsert (self, &sym->n, CCNameSort);
+    skip_insert:
+        if (rc)
+            free (sym);
+#endif
+        /* if this guy has children, become dad */
+        else if ( entry != NULL ) switch ( type )
+        {
+        case ccContainer:
+        case ccArchive:
+            BSTreeForEach ( & ( ( CCContainerNode* ) entry ) -> sub, false, CCTreePatchSubdirPath, sym );
+            break;
+        case ccDirectory:
+            BSTreeForEach ( entry, false, CCTreePatchSubdirPath, sym );
+            break;
+	default: /* shushing warnings */
+	    break;
+        }
+    }
+
+    return rc;
+}
+
+rc_t CCTreeInsert ( CCTree *self, KTime_t mtime,
+    enum CCType type, const void *entry, const char *path, ... )
+{
+    rc_t rc;
+    va_list args;
+
+    va_start ( args, path );
+    rc = CCTreeVInsert ( self, mtime, type, entry, path, args );
+    va_end ( args );
+
+    return rc;
+}
+
+/* Find
+ *  find a named node
+ *  returns NULL if not found
+ */
+static
+const CCName *CCTreeVFind ( const CCTree *self, const char *fmt, va_list args )
+{
+    size_t sz;
+    String name;
+    CCName /* *dad, */ *sym;
+
+    char path [ 4096 ];
+    int i, j, len = vsnprintf ( path, sizeof path, fmt, args );
+    if ( len < 0 || len >= sizeof path )
+        return NULL;
+
+    while ( len > 0 && path [ len - 1 ] == '/' )
+        path [ -- len ] = 0;
+
+    /* create/navigate path */
+    for ( /* dad = NULL, */ i = 0; i < len; i = j + 1 )
+    {
+        for ( j = i; j < len; ++ j )
+        {
+            if ( path [ j ] == '/' )
+            {
+                /* detect non-empty names */
+                sz = j - i;
+                if ( sz != 0 )
+                {
+                    /* ignore '.' */
+                    if ( sz == 1 && path [ i ] == '.' )
+                        break;
+
+                    /* '..' is not allowed */
+                    if ( sz == 2 && path [ i ] == '.' && path [ i + 1 ] == '.' )
+                        return NULL;
+
+                    /* get name of directory */
+                    StringInit ( & name, & path [ i ], sz, string_len ( & path [ i ], sz ) );
+
+                    /* find existing */
+                    sym = ( CCName* ) BSTreeFind ( self, & name, CCNameCmp );
+
+                    /* handle hard-link */
+                    while ( sym != NULL && sym -> type == ccHardlink )
+                        sym = sym -> entry;
+
+                    /* handle not found */
+                    if ( sym == NULL )
+                        return NULL;
+
+                    /* loop or return the found object */
+                    switch ( sym -> type )
+                    {
+                    case ccContainer:
+                    case ccArchive:
+                        self = & ( ( CCContainerNode* ) sym -> entry ) -> sub;
+                        break;
+                    case ccDirectory:
+                        self = sym -> entry;
+                        break;
+                    default:
+                        return NULL;
+                    }
+                    
+                    /* dad = sym; */
+                    break;
+                }
+            }
+        }
+
+        if ( j == len )
+            break;
+    }
+
+    if ( i >= len )
+        return NULL;
+
+    sz = len - i;
+    StringInit ( & name, & path [ i ], sz, string_len ( & path [ i ], sz ) );
+    return ( const CCName* ) BSTreeFind ( self, & name, CCNameCmp );
+}
+
+
+const CCName *CCTreeFind ( const CCTree *self, const char *path, ... )
+{
+    va_list args;
+    const CCName *name;
+
+    va_start ( args, path );
+    name = CCTreeVFind ( self, path, args );
+    va_end ( args );
+
+    return name;
+}
+
+
+/* Link
+ *  create a symlink to existing node
+ */
+rc_t CCTreeLink ( CCTree *self, KTime_t mtime,
+    const char *targ, const char *alias )
+{
+    const CCName *orig = CCTreeFind ( self, targ );
+    if ( orig == NULL )
+        return RC ( rcExe, rcTree, rcInserting, rcPath, rcNotFound );
+
+    return CCTreeInsert ( self, mtime, ccHardlink, orig, alias );
+}
diff --git a/tools/copycat/copycat-priv.h b/tools/copycat/copycat-priv.h
new file mode 100644
index 0000000..77efc7c
--- /dev/null
+++ b/tools/copycat/copycat-priv.h
@@ -0,0 +1,229 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+
+#ifndef _h_copycat_priv_
+#define _h_copycat_priv_
+
+#ifndef _h_cctree_priv_
+#include "cctree-priv.h"
+#endif
+
+#ifndef _h_kfs_directory_
+#include <kfs/directory.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+    struct KFile;
+struct KTocChunk;
+
+/*--------------------------------------------------------------------------
+ * globals
+ */
+extern uint32_t in_block;
+extern uint32_t out_block;
+extern int verbose;             /* program-wide access to verbosity level */
+extern CCTree *ctree;           /* tree of nodes as seen while cataloging the input */
+extern CCTree *etree;           /* tree of nodes as extracted */
+extern KDirectory *cdir;        /* here we 'cache' XML files that get tweaked and passed to laoders */
+extern KDirectory *edir;        /* here we extract non container/archive files for use if we can't
+                                 * load without unpacking */ 
+extern bool extract_dir;        /* if set we are adding directories on extraction to match our 
+                                 * normal output XML */
+extern bool xml_dir;            /* if set we will output XML to match our extracted files not
+                                 * the original packed submission */
+extern bool no_bzip2;           /* if true, don't try to decompress bzipped files */
+extern bool no_md5;             /* if true, don't calculate md5 sums */
+extern char epath [8192];       /* we build a path down through containes/archives */
+extern char * ehere;            /* the pointer to the next character in epath during descent */
+extern KCreateMode cm;          
+extern struct KFile *fnull;     /* global reference to "/dev/null" or bit bucket KFile */
+
+extern void * dump_out;
+extern char ncbi_encryption_extension[];
+extern char wga_encryption_extension[];
+
+rc_t CC copycat_log_writer (void * self, const char * buffer, size_t buffer_size,
+                            size_t * num_writ);
+rc_t CC copycat_log_lib_writer  (void * self, const char * buffer, size_t buffer_size,
+                                 size_t * num_writ);
+
+/*--------------------------------------------------------------------------
+ * copycat
+ */
+typedef struct ccat_pb
+{
+    CCTree * tree;
+    const struct KFile * sf;
+    KTime_t mtime;
+    enum CCType ntype;
+    CCFileNode * node;
+    const char * name;
+} ccat_pb;
+
+/* ccat
+ *  non-buffered recursive entrypoint
+ *
+ *  "tree" [ IN ] - immediate parent of node
+ *
+ *  "src" [ IN ] - file to be analyzed
+ *
+ *  "mtime" [ IN ] - modification time of "src"
+ *
+ *  "ntype" [ IN ] and "node" [ IN ] - file node and type
+ *
+ *  "name" [ IN ] - file leaf name
+ *
+ * use this call if buffering of the parent provides buffering of the child
+ * such as archive formats with no compression such as kar or tar
+ */
+rc_t ccat_md5 ( CCTree *tree, const struct KFile *sf, KTime_t mtime,
+                enum CCType ntype, CCFileNode *node, const char *name );
+
+/* ccat_buf
+ *  buffered recursive entrypoint
+ *
+ *  "bsize" [ IN ] - requested buffer size
+ *
+ * use this call when recursing on a type where buffering of the parent won't 
+ * help such as decompression or decryption
+ */
+rc_t ccat_buf ( CCTree *tree, const struct KFile *sf, KTime_t mtime,
+                enum CCType ntype, CCFileNode *node, const char *name);
+
+
+/* -----
+ * copycat
+ *
+ * The copycat function is the actual copy and catalog function.
+ * All before this function is called is building toward this.
+ */
+struct VPath;
+rc_t copycat (CCTree *tree, KTime_t mtime, KDirectory * cwd,
+              const struct VPath * src, const struct KFile *sf, 
+              const struct VPath * dst, struct KFile *df,
+              const char *spath, const char *name, 
+              uint64_t expected_size, bool do_decrypt, bool do_encrypt);
+
+/*--------------------------------------------------------------------------
+ * CCFileFormat
+ */
+typedef struct CCFileFormat CCFileFormat;
+extern CCFileFormat *filefmt;
+
+typedef enum CCFileFormatClass
+{
+    ccffcError = -1,
+    ccffcUnknown,
+    ccffcCompressed,
+    ccffcArchive,
+    ccffcCached,
+    ccffcEncoded
+} CCFileFormatClass;
+
+typedef enum CCFileFormatTypeCompressed
+{
+    ccfftcError = -1,
+    ccfftcUnknown,
+    ccfftcGzip,
+    ccfftcBzip2,
+    ccfftcZip
+} CCFileFormatTypeCompressed;
+
+typedef enum CCFileFormatTypeArchive
+{
+    ccfftaError = -1,
+    ccfftaUnknown,
+    ccfftaTar,
+    ccfftaSra,
+    ccfftaHD5
+} CCFileFormatTypeArchive;
+
+typedef enum CCFileFormatTypeXML
+{
+    ccfftxError = -1,
+    ccfftxUnknown,
+    ccfftxXML
+} CCFileFormatTypeXML;
+
+typedef enum CCFileFormatTypeEncoded
+{
+    ccffteError = -1,
+    ccffteUnknown,
+    ccffteNCBIErrored,
+    ccffteNCBI,
+    ccffteWGAErrored,
+    ccffteWGA
+} CCFileFormatTypeEncoded;
+
+rc_t CCFileFormatMake ( CCFileFormat ** p );
+rc_t CCFileFormatRelease ( const CCFileFormat *self );
+rc_t CCFileFormatGetType ( const CCFileFormat *self, struct KFile const *file,
+    const char *path, char *buffer, size_t buffsize,
+    uint32_t *type, uint32_t *class );
+
+
+rc_t ccat_tar ( CCContainerNode *np, const struct KFile *sf, const char *name );
+rc_t ccat_sra ( CCContainerNode *np, const struct KFile *sf, const char *name );
+
+typedef struct KSubChunkFile KSubChunkFile;
+
+rc_t KFileMakeChunkRead (const struct KFile ** pself,
+			 const struct KFile * original,
+			 uint64_t size,
+			 uint32_t num_chunks,
+			 struct KTocChunk * chunks);
+
+bool CCFileFormatIsNCBIEncrypted ( void  * buffer );
+bool CCFileFormatIsWGAEncrypted ( void  * buffer );
+/*
+ * Use as DEBUG_STATUS(("format",arg,...))
+ */
+#define DEBUG_STATUS(msg)  DBGMSG(DBG_APP,1,msg)
+
+
+rc_t copycat_log_set (void * new, void ** prev);
+
+
+struct KFile;
+rc_t CC CCFileMakeRead (const struct KFile ** self,
+                        const struct KFile * original, rc_t * prc);
+rc_t CC CCFileMakeUpdate (struct KFile ** self,
+                          struct KFile * original, rc_t * prc);
+rc_t CC CCFileMakeWrite (struct KFile ** self,
+                         struct KFile * original, rc_t * prc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _h_copycat_priv_ */
diff --git a/tools/copycat/copycat.c b/tools/copycat/copycat.c
new file mode 100644
index 0000000..2ecc360
--- /dev/null
+++ b/tools/copycat/copycat.c
@@ -0,0 +1,1251 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "copycat-priv.h"
+#include "cctree-priv.h"
+
+#include <vfs/manager.h>
+#include <vfs/path.h>
+#include <vfs/path-priv.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/nullfile.h>
+#include <kfs/crc.h>
+#include <klib/checksum.h>
+#include <klib/writer.h>
+#include <klib/log.h>
+#include <klib/status.h>
+#include <klib/debug.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <klib/text.h>
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/rc.h>
+#include <klib/vector.h>
+
+#include <strtol.h>
+
+#include <time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+/*
+ * some program globals
+ */
+const char * program_name = "copycat"; /* default it but try to set it */
+const char * full_path = "copycat"; /* default it but try to set it */
+int verbose = 0;
+KFile *fnull;
+
+/* cache information */
+CCTree *ctree;
+KDirectory *cdir;
+
+uint32_t in_block = 0;
+uint32_t out_block = 0;
+
+CCTree *etree;
+KDirectory * edir; /* extracted file base kdir */
+char epath[8192];
+char * ehere;
+bool xml_dir = false;
+bool extract_dir = false;
+bool no_bzip2 = false;
+bool no_md5 = false;
+void * dump_out;
+const char * xml_base = NULL;
+
+char ncbi_encryption_extension[] = ".nenc";
+char wga_encryption_extension[] = ".ncbi_enc";
+
+static
+KWrtWriter  log_writer;
+static
+KWrtWriter  log_lib_writer;
+static
+void * log_data;
+static
+void * log_lib_data;
+
+rc_t CC copycat_log_writer (void * self, const char * buffer, size_t buffer_size,
+                            size_t * num_writ)
+{
+    if (self)
+    {
+        void * bf = malloc (sizeof (SLNode) + buffer_size);
+        if (bf)
+        {
+            const char * ps, * pc;
+            size_t z;
+            ps = strchr (buffer, ' ');
+            if (ps)
+            {
+                ++ps;
+                pc = strchr (ps, '-');
+                if (pc == NULL)
+                    pc = strchr (ps, ':');
+                if (pc)
+                    pc = pc + 2;
+                else
+                    pc = ps;
+            }
+            else
+                pc = buffer;
+            z = buffer_size - (pc - buffer);
+            memcpy ( (void*)(((SLNode*)bf)+1), pc, z);
+            ((char*)(((SLNode*)bf)+1))[z-1] = '\0';
+            SLListPushTail (self, bf);
+        }
+    }
+    return (log_writer != NULL)
+        ? log_writer (log_data, buffer, buffer_size, num_writ) : 0;
+}
+rc_t CC copycat_log_lib_writer  (void * self, const char * buffer, size_t buffer_size,
+                                 size_t * num_writ)
+{
+    if (self)
+    {
+        void * bf = malloc (sizeof (SLNode) + buffer_size);
+        if (bf)
+        {
+            const char * ps, * pc;
+            size_t z;
+            ps = strchr (buffer, ' ');
+            if (ps)
+            {
+                ++ps;
+                pc = strchr (ps, ':');
+                if (pc)
+                    pc = pc + 2;
+                else
+                    pc = ps;
+            }
+            else
+                pc = buffer;
+            z = buffer_size - (pc - buffer);
+            memcpy ( (void*)(((SLNode*)bf)+1), pc, z);
+            ((char*)(((SLNode*)bf)+1))[z-1] = '\0';
+            SLListPushTail (self, bf);
+        }
+    }
+    return (log_lib_writer != NULL)
+        ? log_lib_writer (log_lib_data, buffer, buffer_size, num_writ) : 0;
+}
+
+static
+rc_t copycat_log_unset ()
+{
+    rc_t rc_l, rc_ll;
+
+    rc_l = KLogHandlerSet (log_writer, log_data);
+    rc_ll = KLogHandlerSet (log_lib_writer, log_lib_data);
+
+    return (rc_l != 0) ? rc_l : rc_ll;
+}
+
+rc_t copycat_log_set (void * new, void ** prev)
+{
+    rc_t rc;
+
+    if (prev)
+        *prev = KLogDataGet();
+
+    rc = KLogHandlerSet (copycat_log_writer, new);
+    if (rc == 0)
+        rc = KLogLibHandlerSet (copycat_log_lib_writer, new);
+
+    if (rc)
+        copycat_log_unset ();
+
+    return rc;
+}
+
+/* global create mode */
+KCreateMode cm = kcmParents | kcmCreate;
+
+#define OPTION_CACHE   "cache-dir"
+#define OPTION_FORCE   "force"
+#define OPTION_DEST    "output"
+#define OPTION_EXTRACT "extract"
+#define OPTION_EXTDIR  "extract-to-dir"
+#define OPTION_XMLDIR  "xml-dir"
+#define OPTION_DECPWD  "decryption-password"
+#define OPTION_ENCPWD  "encryption-password"
+#define OPTION_XMLBASE "xml-base-node"
+#define OPTION_INBLOCK "input-buffer"
+#define OPTION_OUTBLOCK "output-buffer"
+#define OPTION_NOBZIP2 "no-bzip2"
+#define OPTION_NOMD5   "no-md5"
+
+#define ALIAS_CACHE   "x"
+#define ALIAS_FORCE   "f"
+#define ALIAS_DEST    "o"
+#define ALIAS_EXTRACT "e"
+#define ALIAS_EXTDIR  "E"
+#define ALIAS_XMLDIR  "X"
+#define ALIAS_DECPWD  ""
+#define ALIAS_ENCPWD  ""
+#define ALIAS_XMLBASE ""
+#define ALIAS_INBLOCK ""
+#define ALIAS_OUTBLOCK ""
+#define ALIAS_NOBZIP2 ""
+#define ALIAS_NOMD5   ""
+
+
+
+static
+const char * extract_usage[] = 
+{ "location of extracted files", NULL };
+static
+const char * cache_usage[] = 
+{ "location of output cached files", NULL };
+static
+const char * force_usage[] = 
+{ "force overwrite of existing files", NULL };
+static
+const char * dest_usage[] = 
+{ "location of output", NULL };
+static
+const char * xmldir_usage[] = 
+{ "XML matches extracted files", NULL };
+static
+const char * extdir_usage[] = 
+{ "extracted directories match normal XML", NULL };
+static
+const char * xmlbase_usage[] = 
+{ "use this to base the XML not destination; can only be used with a single source", NULL };
+static
+const char * inblock_usage[] = 
+{ "system file reads are of blocks of this size", NULL };
+static
+const char * outblock_usage[] = 
+{ "system file writes are of blocks of this size", NULL };
+static
+const char * no_bzip2_usage[] = 
+{ "do not decompress files compressed with bzip2", NULL };
+const char * no_md5_usage[] = 
+{ "do not calculate md5 hashes", NULL };
+
+
+const char UsageDefaultName [] = "copycat";
+
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg (
+        "\n"
+        "Usage:\n"
+        "  %s [options] src-file dst-file\n"
+        "  %s [options] src-file [src-file...] dst-dir\n"
+        "  %s [options] -o dst-dir src-file [src-file...]\n"
+        "\n"
+        "Summary:\n"
+        "  Copies files and/or directories, creating a catalog of the copied files.\n",
+        progname, progname, progname);
+}
+
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+
+    UsageSummary (progname);
+
+    HelpOptionLine (ALIAS_CACHE, OPTION_CACHE, "dir-path", cache_usage);
+    HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, force_usage);
+    HelpOptionLine (ALIAS_DEST, OPTION_DEST, "file-path", dest_usage);
+    HelpOptionLine (ALIAS_EXTRACT, OPTION_EXTRACT, "dir-path", extract_usage);
+    HelpOptionLine (ALIAS_EXTDIR, OPTION_EXTDIR, NULL, extdir_usage);
+    HelpOptionLine (ALIAS_XMLDIR, OPTION_XMLDIR, NULL, xmldir_usage);
+    HelpOptionLine (ALIAS_INBLOCK, OPTION_INBLOCK, "size-in-KB", inblock_usage);
+    HelpOptionLine (ALIAS_OUTBLOCK,OPTION_OUTBLOCK, "size-in-KB", outblock_usage);
+    HelpOptionLine (ALIAS_NOBZIP2,OPTION_NOBZIP2, NULL, no_bzip2_usage);
+    HelpOptionLine (ALIAS_NOMD5,OPTION_NOMD5, NULL, no_md5_usage);
+    HelpOptionsStandard ();
+
+
+
+/*                     1         2         3         4         5         6         7         8 */
+/*            12345678901234567890123456789012345678901234567890123456789012345678901234567890 */
+    OUTMSG (("Use:\n"
+             " Copy and catalog:\n"
+             "  Some quick examples:\n"
+             "    %s dir/file.tar other-dir/file.tar\n"
+             "      copy file.tar from dir to other-dir and write the catalog to stdout\n"
+             "    %s dir/file.tar otherdir/\n"
+             "      the same\n", progname,progname));
+    OUTMSG (("    %s \"ncbi-file:dir/file.tar.nenc?encrypt&pwfile=pw other-dir.file.tar\n"
+             "      copy and decrypt file.tar.nenc from dir to other-dir and catalog\n"
+             "    %s dir/file.tar \"ncbi-file:other-dir/file.tar.nenc?encrypt&pwfile=pw\n"
+             "      copy and encrypt file.tar from dir to other-dir/file.tar.nenc and catalog\n"
+             "    %s \"ncbi-file:dir/file.tar.nenc?encrypt&pwfile=pw1 \\\n"
+             "                   \"ncbi-file:other-dir/file.tar.nenc?encrypt&pwfile=pw2\n"
+             "      copy the file as above while changing the encryption\n"
+             "\n", progname, progname, progname));
+    OUTMSG (("Use:\n"
+             "  Copy source file[s] to a destination file or directory.\n"
+             "  File names can either be typical path names or they can be URLs (IRLs) using\n"
+             "  the standard \"file\" or extended \"ncbi-file\" schemes.\n"
+             "  The catalog is XML output sent by default to stdout.\n"
+             "  As UTF-8 is accepted in the paths they are IRLs for International Resource\n"
+             "  Locators.\n"
+             "\n"));
+    OUTMSG (("  If the specified destination does not exist, there could be an ambiguity\n"
+             "  whether the destination is supposed to be a file or directory.  If the\n"
+             "  entered path ends in a '/' character or if there is more than one source\n"
+             "  it is assumed to mean a directory and is created as such.  If neither of\n"
+             "  of those apply it is assumed to be a file.\n"
+             "\n"));
+    OUTMSG (("  The sources or destination may also be special Unix devices:\n"
+             "    /dev/stdin is supported as a source.\n"
+             "    /dev/stdout and /dev/stderr is supported as a destination.\n"
+             "  Other file descriptor devices can be used in the form:\n"
+             "    /dev/fd/<fd-number>\n"));
+    OUTMSG (("  For example /dev/stdin is synonymous with /dev/fd/0 as a source.\n"
+             "  If /dev/stdout or /dev/fd/1 is used as the destination then the XML\n"
+             "  output is redirected to /dev/stderr (/dev/fd/2).\n"
+             "  Device /dev/null as the destination is treated as a file with only one\n"
+             "  source but as a directory if more than one source.  Using this device\n"
+             "  means no actual file will be copied but the cataloging will be done but\n"
+             "  " OPTION_XMLBASE " must be used.\n"
+             "\n"));
+    OUTMSG (("  These special devices can be entered using the URL (IRL) schemes if\n"
+             "  desired.  This allows the use of 'query' decorators.\n"
+             "  \n"));
+    OUTMSG (("  If a query is added to the URL it will need to be enclosed within '\"\'\n"
+             "  characters on a command line to prevent premature interpretation.\n"
+             "  The query for the 'ncbi-file' extension to the 'file' scheme allows\n"
+             "  encryption and decryption.  The supported query is introduced by the\n"
+             "  standard URI/IRI syntax of a '?' character with a '&' character\n"
+             "  separating individual query-entries.\n"
+             "\n"));
+    OUTMSG (("  The supported query entries are:\n"
+             "    'encrypt' or 'enc' to mean the input may be encrypted or the output\n"
+             "      will be encrypted,\n"
+             "    'pwfile=<path>' gives the path to file containing the password.\n"
+             "    'pwfd=<FD>' gives the numerical file descriptor from which to read\n"
+             "      the password,\n"
+             "\n"));
+    OUTMSG (("  In this program the encrypted input can apply to a file contained within\n"
+             "  the source rather than just the source file itself.  The tool is fully\n"
+             "  compatible with all versions of NCBI encryption.\n"
+             "\n"
+             "  If the output is to be encrypted only the newer FIPS compliant encryption\n"
+             "  will be used and applies to the whole file.\n"
+             "\n"));
+    OUTMSG (("NOTE: Not all combinations of URL specifications will work at this point.\n"
+             "\n"
+             "NOTE: using the same file descriptor for multiple sources or overlapping with\n"
+             "      stdin/stdout/stderr may cause undefined behavior including hanging the\n"
+             "      the program.\n"
+             "\n"));
+    OUTMSG (("  The '-x' option allows small files that are typed as eligible for\n"
+             "  caching to be copied to the cache directory provided. the directory\n"
+             "  will be created if necessary.\n"
+             "  the intent is to capture top-level files, such that files are copied\n"
+             "  into the flat cache directory without regard to where they were found\n"
+             "  in the input hierarchy. in the case of name conflict, output files will\n"
+             "  be renamed.\n"
+             "\n"));
+    OUTMSG (("  To prevent internal decompression of bzipped files, use the option\n"
+             "    '--no-bzip2'\n"
+             "\n"));
+    OUTMSG (("  To prevent calculation of MD5 hashes, use the option\n"
+             "    '--no-md5'\n"
+             "\n"));
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+static
+OptDef Options[] = 
+{
+    /* name            alias max times oparam required fmtfunc help text loc */
+    { OPTION_EXTRACT, ALIAS_EXTRACT, NULL, extract_usage, 1, true,  false },
+    { OPTION_EXTDIR,  ALIAS_EXTDIR,  NULL, extdir_usage,  0, false, false },
+    { OPTION_XMLDIR,  ALIAS_XMLDIR,  NULL, xmldir_usage,  0, false, false },
+    { OPTION_CACHE,   ALIAS_CACHE,   NULL, cache_usage,   1, true,  false },
+    { OPTION_FORCE,   ALIAS_FORCE,   NULL, force_usage,   0, false, false },
+    { OPTION_DEST,    ALIAS_DEST,    NULL, dest_usage,    1, true,  false },
+    { OPTION_XMLBASE, ALIAS_XMLBASE, NULL, xmlbase_usage, 1, true,  false },
+    { OPTION_INBLOCK, ALIAS_OUTBLOCK,NULL, inblock_usage, 1, true,  false },
+    { OPTION_OUTBLOCK,ALIAS_OUTBLOCK,NULL, outblock_usage,1, true,  false },
+    { OPTION_NOBZIP2, ALIAS_NOBZIP2, NULL, no_bzip2_usage,0, false, false },
+    { OPTION_NOMD5,   ALIAS_NOMD5,   NULL, no_md5_usage,  0, false, false }
+};
+
+/* file2file
+ */
+static
+rc_t copycat_file2file (CCTree * tree,
+                        SLList * logs,
+                        VFSManager * mgr,
+                        VPath * _src,
+                        VPath * _dst,
+                        const char * leaf)
+{
+    size_t sz;
+    rc_t rc;
+    bool do_encrypt;
+    bool do_decrypt;
+    char spath [8192];
+
+    do_decrypt = (VPathOption (_src, vpopt_encrypted, spath, sizeof spath, &sz) == 0);
+    do_encrypt = (VPathOption (_dst, vpopt_encrypted, spath, sizeof spath, &sz) == 0);
+
+    /* we can't use the automagical nature of the VPath and its query part 
+     * because copycat needs to peek under the hood; but we want the automagical
+     * ability to handle it's path part.
+     */
+
+    rc = VPathReadPath (_src, spath, sizeof spath, &sz);
+    if (rc)
+        LOGERR (klogInt, rc, "error rereading built source path");
+    else
+    {
+        char dpath [8192];
+        size_t dz;
+
+        rc = VPathReadPath (_dst, dpath, sizeof dpath, &dz);
+        if (rc)
+            LOGERR (klogInt, rc, "error rereading built source path");
+        else
+        {
+            KDirectory * cwd;
+
+            rc = VFSManagerGetCWD (mgr, &cwd);
+            if (rc)
+                LOGERR (klogInt, rc, "error pulling directory out of manager");
+            else
+            {
+                KTime_t mtime = 0;
+                bool src_dev = false;
+                bool dst_dev = false;
+
+                if (strncmp (spath, "/dev/", sizeof "/dev/"-1) == 0)
+                {
+                    /* get date from file system
+                       [this won't be either the submitter original date
+                       nor the mod-date within the file system, unless
+                       the date gets reset...] */
+                    mtime = time (NULL);
+                    src_dev = true;
+                }
+                else
+                {
+                    rc = KDirectoryDate (cwd, &mtime, "%s", spath);
+                    if (rc)
+                    {
+                        PLOGERR (klogErr,
+                                 (klogErr, rc,
+                                  "failed to determine modtime for '$(path)' continuing", "path=%s", spath ));
+                        mtime = time (NULL);
+                        rc = 0;
+                    }
+                }
+                if (strncmp (dpath, "/dev/", sizeof "/dev/" - 1) == 0)
+                {
+                    if (strcmp(dpath, "/dev/stdout") == 0 ||
+                        strcmp(dpath, "/dev/fd/1") == 0)
+                    {
+                        dump_out = stderr;
+                    }
+                    dst_dev = true;
+
+                    if (src_dev && (xml_base == NULL))
+                    {
+                        rc = RC (rcExe, rcArgv, rcAccessing, rcParam, rcNull);
+                        LOGERR (klogErr, rc, "Must provide " OPTION_XMLBASE
+                                " when using a device stream as output");
+                    }
+                }
+                if (rc == 0)
+                {
+                    char * sleaf;
+                    char * dleaf;
+                    char * ext;
+                    VPath * src;
+                    size_t xz;
+                    char xpath [8192]; /* way over sized - its a leaf only */
+
+                    sleaf = strrchr (spath, '/');
+                    if (sleaf++ == NULL)
+                        sleaf = spath;
+
+                    dleaf = strrchr (dpath, '/');
+                    if (dleaf++ == NULL)
+                        dleaf = dpath;
+
+                    xz = strlen (leaf);
+                    memcpy (xpath, leaf, xz + 1);
+
+                    /* if we are encrypting the output make sure we have an encryption
+                     * extension on the destination.
+                     */
+                    if (do_decrypt)
+                    {
+                        ext = strrchr (xpath, '.');
+                        if (ext == NULL)
+                            ext = xpath;
+                        if ((strcmp (ext, ncbi_encryption_extension) == 0) ||
+                            (strcmp (ext, wga_encryption_extension) == 0))
+                            *ext = '\0';
+                    }
+                    else
+                        ext = xpath + strlen (xpath);
+
+                    if (do_encrypt)
+                    {
+                        strcpy (ext, ncbi_encryption_extension);
+
+                        if (!dst_dev)
+                        {
+                            ext = strrchr (dleaf, '.');
+                            if (ext == NULL)
+                                ext = dleaf + strlen (dleaf);
+
+                            if (strcmp (ext, ncbi_encryption_extension) != 0)
+                                strcat (ext, ncbi_encryption_extension);
+                        }
+                    }
+
+                    rc = VFSManagerMakePath (mgr, &src, "%s", spath);
+                    if (rc)
+                        LOGERR (klogErr, rc, "error rebuilding source path");
+                    else
+                    {
+                        VPath * dst;
+
+                        rc = VFSManagerMakePath (mgr, &dst, "%s", dpath);
+                        if (rc)
+                            LOGERR (klogErr, rc, "error rebuilding source path");
+                        else
+                        {
+
+                            /* never allow overwrite of something already there */
+                            if (CCTreeFind (tree, xpath) != NULL ) /* dleaf? xpath? */
+                            {
+                                rc = RC ( rcExe, rcFile, rcCopying, rcPath, rcExists );
+                                PLOGERR ( klogInt,  (klogInt, rc, "will not overwrite "
+                                                     "just-created '$(path)'", "path=%s", xpath ));
+                            }
+                            else
+                            {
+                                const KFile * sf;
+
+                                rc = VFSManagerOpenFileRead (mgr, &sf, src);
+                                if (rc)
+                                    PLOGERR (klogFatal,
+                                             (klogFatal, rc,
+                                              "error opening input '$(P)'", "P=%s", spath));
+                                else
+                                {
+                                    uint64_t expected;
+
+                                    rc = KFileSize (sf, &expected);
+                                    if (rc)
+                                    {
+                                        if (GetRCState (rc) == rcUnsupported)
+                                        {
+                                            expected = rcUnsupported;
+                                            rc = 0;
+                                        }
+                                    }
+                                    if (rc == 0)
+                                    {
+                                        KFile * df;
+
+                                        rc = VFSManagerCreateFile (mgr, &df, false, 0640, cm, dst);
+                                        if (GetRCState (rc) == rcUnauthorized)
+                                        {
+                                            uint32_t access;
+                                            rc_t orc;
+
+                                            orc = KDirectoryAccess (cwd, &access, "%s", dpath);
+                                            if (orc == 0)
+                                            {
+                                                orc = KDirectorySetAccess (cwd, false, 0640, 0777, "%s", dpath);
+                                                if (orc == 0)
+                                                {
+                                                    rc = VFSManagerCreateFile (mgr, &df, false, 0640, cm, dst);
+                                                    if (rc)
+                                                        KDirectorySetAccess (cwd, false, access, 0777, "%s", dpath);
+                                                }
+                                            }
+                                        }
+                                        if (rc)
+                                            PLOGERR (klogErr,
+                                                     (klogErr, rc, "failed to creat destination file '$(path)'",
+                                                      "path=%s", dpath));
+                                        else
+                                        {
+                                            rc_t orc;
+
+                                            log_writer = KLogWriterGet();
+                                            log_lib_writer = KLogLibWriterGet();
+                                            log_data = KLogDataGet();
+                                            log_lib_data = KLogLibDataGet();
+
+                                            rc = copycat_log_set (logs, NULL);
+                                            if (rc == 0)
+                                            {
+                                                DEBUG_STATUS (("\n-----\n%s: call copycat (tree(%p), mtime(%lu),"
+                                                               " cwd(%p), _src(%p), sf(%p), _dst(%p), df(%p), "
+                                                               "spath(%s), leaf(%s), expected(%lu), do_decrypt(%d)"
+                                                               " do_encrypt(%d))\n\n", __func__,
+                                                               tree, mtime, cwd, _src, sf, _dst, df, spath,
+                                                               xpath, expected, do_decrypt, do_encrypt));
+                                                rc = copycat (tree, mtime, cwd, _src, sf, _dst, df, spath,
+                                                              xpath, expected, do_decrypt, do_encrypt);
+
+                                                orc = copycat_log_unset();
+                                            }
+
+                                            if (rc)
+                                                LOGERR (klogFatal, rc, "copycat function failed");
+                                            else
+                                                rc = orc;
+
+                                            KFileRelease (df);
+                                        }
+                                    }
+                                    KFileRelease (sf);
+                                }
+                            }
+                            VPathRelease (dst);
+                        }
+                        VPathRelease (src);
+                    }
+                }
+                KDirectoryRelease (cwd);
+            }
+        }
+    }
+    return rc;
+}
+
+
+/* files2dir
+ */
+static
+rc_t copycat_files2dir (CCTree * tree, SLList * logs, VFSManager * mgr, Vector * v, VPath * dst)
+{
+    size_t dz;
+    uint32_t ix;
+    rc_t rc;
+    char dbuff [8192];
+
+    /* xml-base only works for a single file */
+    if ((VectorLength (v) > 1) && (xml_base != NULL))
+    {
+        rc = RC (rcExe, rcArgv, rcParsing, rcParam, rcIncorrect);
+        LOGERR (klogErr, rc, "Can only use " OPTION_XMLBASE " with a single source file");
+        return rc;
+    }
+
+    /* get the path out of the destination VPath */
+    rc = VPathReadPath (dst, dbuff, sizeof dbuff, &dz);
+    if (rc)
+        return rc;
+
+    for (ix = 0; ix < VectorLength (v); ++ix)
+    {
+        VPath * new_dst;
+        VPath * src;
+        char * sleaf;
+        size_t sz;
+        char sbuff [8192];
+
+        src = (VPath*) VectorGet (v, ix);
+        if (src == NULL) /* warn? error? abort? */
+            continue;
+
+
+        rc = VPathReadPath (src, sbuff, sizeof sbuff, &sz);
+        if (rc)
+            return rc;
+
+        sleaf = strrchr (sbuff, '/');
+        if (sleaf++ == NULL)
+            sleaf = sbuff;
+
+        /* the special case destination is the null device which we treat 
+         * as if it was a directory at first and then as a file
+         */
+        if (strcmp (dbuff, "/dev/null") == 0)
+        {
+            rc = VPathAddRef (dst);
+            if (rc != 0)
+                break;
+            new_dst = dst;
+        }
+        else
+        {
+            DEBUG_STATUS(("%s: %s (%lu)\n", __func__, dbuff, dz));
+
+            /* fix up the destination path if it's missing a final '/'
+             * this is inside the loop because of the null device special case
+             */
+            if (dbuff [dz-1] != '/')
+            {
+                dbuff [dz++] = '/';
+                dbuff [dz] = '\0';
+            }
+
+            /* append source leaf to destination path */
+            string_copy (dbuff + dz, sizeof dbuff - dz, sleaf, strlen (sleaf));
+
+            DEBUG_STATUS(("%s: %s\n", __func__, dbuff));
+
+            /* make a new VPath - no URI stuff gets transferred here */
+            rc = VFSManagerMakePath (mgr, &new_dst, "%s", dbuff);
+            if (rc)
+                break;
+        }
+
+        /* do this one file copy and catalog now */
+        rc = copycat_file2file (tree, logs, mgr, src, new_dst, xml_base ? xml_base : sleaf);
+
+        VPathRelease (new_dst);
+    }
+    return rc;
+}
+
+
+/* run
+ *
+ * dest will be set if the -o option was used.
+ * 
+ */
+static
+rc_t copycat_run ( CCTree *tree, SLList * logs, VFSManager * mgr, 
+                   const char *cache, VPath * _dest, const char *extract, 
+                   Vector * v)
+{
+    rc_t rc;
+    int dest_type;
+    KDirectory * cwd;
+    VPath * dest;
+    size_t sz;
+    const char * pleaf;
+    char pbuff [4096];
+
+    /* =====
+     * directories aren't yet using the VFSManager to open them
+     * because we have to get more under the covers for our cataloging
+     */
+
+    rc = VFSManagerGetCWD (mgr, &cwd);
+    if (rc)
+        return rc;
+
+    /* if there's a cache path, create directory */
+    if ( cache != NULL )
+    {
+        rc = KDirectoryCreateDir ( cwd, 0775, kcmParents | kcmOpen, "%s", cache );
+        if ( rc == 0 )
+            rc = KDirectoryOpenDirUpdate ( cwd, & cdir, true, "%s", cache );
+        if ( rc != 0 )
+        {
+            PLOGERR (klogErr,
+                     (klogErr, rc, "failed to open cache directory '$(path)'",
+                      "path=%s", cache ));
+            return rc;
+        }
+    }
+    else
+        cdir = NULL;
+
+    /* if there's a extract path, create directory */
+    if ( extract != NULL )
+    {
+        rc = KDirectoryCreateDir (cwd, 0775, kcmParents | kcmOpen, "%s", extract);
+        if ( rc == 0 )
+            rc = KDirectoryOpenDirUpdate (cwd, & edir, true, "%s", extract);
+        if ( rc != 0 )
+        {
+            PLOGERR (klogErr, 
+                     (klogErr, rc,
+                      "failed to open extract directory '$(path)'",
+                      "path=%s", extract ));
+            return rc;
+        }
+    }
+    else
+        edir = NULL;
+
+    dest = _dest;
+    if (dest == NULL)
+    {
+        rc = VectorRemove (v, VectorLength(v) - 1, (void**)&dest);
+        if (rc)
+            return rc;
+    }
+
+    rc = VPathReadPath (dest, pbuff, sizeof pbuff, &sz);
+    if (rc)
+        return rc;
+
+    if (xml_base)
+        pleaf = xml_base;
+    else
+    {
+        pleaf = strrchr (pbuff, '/');
+        if (pleaf++ == NULL)
+            pleaf = pbuff;
+    }
+
+
+    /* check destination type */
+    dest_type = KDirectoryPathType (cwd, "%s", pbuff);
+    DEBUG_STATUS(("%s: checked destination type for '%s' got '%u'\n", __func__, pbuff, dest_type));
+    switch (dest_type & ~ kptAlias)
+    {
+    case kptNotFound:
+        /* this is the potentially ambiguous situation 
+         * if only two arguments and the last isn't definitively a directory 
+         * we assume its supposed to be a file.
+         *
+         * If the target does not exist but it's path ends in '/' or if
+         * there is more than one source we know it is supposed to be a 
+         * directory.
+         */
+        if ((pbuff[sz-1] != '/')
+/*              ((pbuff[sz-1] != '.') */
+
+
+
+/*              ( */
+/* )) */
+            && (VectorLength (v) == 1))
+        {
+            return copycat_file2file (tree, logs, mgr, VectorGet (v, 0), dest, pleaf);
+        }
+
+        /* create a directory at the given path */
+        rc = KDirectoryCreateDir ( cwd, 0775, kcmParents | kcmOpen, "%s", pbuff );
+        if ( rc != 0 )
+            return rc;
+
+        /* fall through */
+    case kptDir:
+        return copycat_files2dir (tree, logs, mgr, v, dest);
+
+
+    case kptCharDev:
+        /*
+         * special case NULL device can act like a directory here
+         * all other 'devices' we treat as a file
+         */
+        if ( strcmp ( pbuff, "/dev/null" ) == 0 )
+        {
+#if 0
+            if (VectorLength (v) > 1)
+#endif
+                return copycat_files2dir (tree, logs, mgr, v, dest);
+        }
+        /* fall through */
+    case kptBlockDev:
+    case kptFIFO:
+    case kptFile:
+        if (VectorLength (v) == 1)
+            return copycat_file2file (tree, logs, mgr, VectorGet (v, 0), dest, pleaf);
+
+        rc = RC (rcExe, rcDirectory, rcAccessing, rcPath, rcNotFound);
+        PLOGERR (klogFatal,
+                 (klogFatal, rc, "copying multiple files, but target argument "
+                  "[$(D)] is not a directory", "D=%s", pbuff));
+        return rc;
+    }
+
+    fprintf ( stderr, "%s: '%s': specified destination path is not a directory\n", program_name, pbuff );
+    return RC ( rcExe, rcDirectory, rcAccessing, rcPath, rcIncorrect );
+}
+/* dump
+ */
+static
+rc_t copycat_fwrite ( void *out, const void *buffer, size_t bytes )
+{
+    size_t writ = fwrite ( buffer, 1, bytes, out );
+    if ( writ != bytes )
+        return RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+    return 0;
+}
+
+static
+rc_t copycat_dump ( const CCTree *tree, SLList * logs )
+{
+    return CCTreeDump ( tree, copycat_fwrite, dump_out, logs );
+}
+
+static
+void param_whack (void * path, void * ignored)
+{
+    (void)VPathRelease ((const VPath*)path);
+}
+
+/* KMain
+ */
+
+rc_t KMain ( int argc, char *argv [] )
+{
+    Args * args;
+    rc_t rc, orc;
+
+    KStsHandlerSetStdErr();
+    KStsLibHandlerSetStdErr();
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 1, Options, sizeof Options / sizeof (OptDef));
+    if (rc == 0)
+    {
+        /* CS-101: DO WHILE ( 0 ) LOOPS ARE CUTE FOR AVOIDING GOTO,
+           BUT IT MEANS YOU HAVE TO PUT ALL OF YOUR CLEANUP OUTSIDE
+           OF THE LOOP, IN ORDER TO BREAK OUT IN A NON-STRUCTURED WAY */
+        do
+        {
+            const char * dest;
+            const char * cache;
+            const char * extract = NULL;
+
+            uint32_t pcount;
+            CCTree * tree;
+            VFSManager * mgr = NULL;
+            VPath * dp = NULL;
+            Vector params = { NULL, 0, 0, 0};
+            uint32_t ix;
+
+            rc = ArgsProgram (args, &full_path, &program_name);
+            if (rc)
+                break;
+
+            extract_dir = false;
+            xml_dir = false;
+            memset (epath, 0, sizeof (epath));
+            ehere = epath;
+
+            rc = ArgsOptionCount (args, OPTION_CACHE, &pcount);
+            if (rc)
+                break;
+            if (pcount)
+            {
+                rc = ArgsOptionValue (args, OPTION_CACHE, 0, (const void **)&cache);
+                if (rc)
+                    break;
+            }
+            else
+                cache = NULL;
+
+            rc = ArgsOptionCount (args, OPTION_DEST, &pcount);
+            if (rc)
+                break;
+            if (pcount)
+            {
+                rc = ArgsOptionValue (args, OPTION_DEST, 0, (const void **)&dest);
+                if (rc)
+                    break;
+            }
+            else
+            {
+                dest = NULL;
+            }
+
+            rc = ArgsOptionCount (args, OPTION_EXTRACT, &pcount);
+            if (rc)
+                break;
+            if (pcount)
+            {
+                rc = ArgsOptionValue (args, OPTION_EXTRACT, 0, (const void **)&extract);
+                if (rc)
+                    break;
+            }
+
+            rc = ArgsOptionCount (args, OPTION_EXTDIR, &pcount);
+            if (rc)
+                break;
+            extract_dir = pcount > 0;
+
+            rc = ArgsOptionCount (args, OPTION_XMLDIR, &pcount);
+            if (rc)
+                break;
+            xml_dir = pcount > 0;
+
+            rc = ArgsOptionCount (args, OPTION_FORCE, &pcount);
+            if (rc)
+                break;
+            if (pcount)
+                cm = kcmParents | kcmInit;
+
+            rc = ArgsOptionCount (args, OPTION_XMLBASE, &pcount);
+            if (pcount == 1)
+            {
+                rc = ArgsOptionValue (args, OPTION_XMLBASE, 0, (const void **)&xml_base);
+                if (rc)
+                    break;
+
+                /* we might want a few more checks here... */
+                if (strchr (xml_base, '/') != NULL)
+                {
+                    rc = RC (rcExe, rcArgv, rcAccessing, rcParam, rcInvalid);
+                    break;
+                }
+            }
+
+            rc = ArgsOptionCount (args, OPTION_INBLOCK, &pcount);
+            if (pcount == 1)
+            {
+                const char * start;
+                char * end;
+                uint32_t val;
+
+                rc = ArgsOptionValue (args, OPTION_INBLOCK, 0, (const void **)&start);
+                if (rc)
+                    break;
+
+                val = strtou32 (start, &end, 10);
+
+                if (*end != '\0')
+                {
+                    rc = RC (rcExe, rcArgv, rcAccessing, rcParam, rcInvalid);
+                    break;
+                }
+                in_block = val * 1024;
+            }
+
+            rc = ArgsOptionCount (args, OPTION_OUTBLOCK, &pcount);
+            if (pcount == 1)
+            {
+                const char * start;
+                char * end;
+                uint32_t val;
+
+                rc = ArgsOptionValue (args, OPTION_OUTBLOCK, 0, (const void **)&start);
+                if (rc)
+                    break;
+
+                val = strtou32 (start, &end, 10);
+
+                if (*end != '\0')
+                {
+                    rc = RC (rcExe, rcArgv, rcAccessing, rcParam, rcInvalid);
+                    break;
+                }
+                out_block = val * 1024;
+            }
+
+            rc = ArgsOptionCount ( args, OPTION_NOBZIP2, & pcount );
+            if ( pcount > 0 )
+            {
+                no_bzip2 = true;
+            }
+
+            rc = ArgsOptionCount ( args, OPTION_NOMD5, & pcount );
+            if ( pcount > 0 )
+            {
+                no_md5 = true;
+            }
+
+            /* all parameters plus the possible dest option parameter */
+            rc = ArgsParamCount (args, &pcount);
+            if (rc)
+                break;
+
+            if (pcount == 0)
+            {
+                rc = RC ( rcExe, rcArgv, rcReading, rcParam, rcInsufficient );
+                MiniUsage (args);
+                break;
+            }
+
+            if ((dest == NULL) && (extract == NULL) && (pcount < 2))
+            {
+                rc = RC ( rcExe, rcArgv, rcReading, rcParam, rcInvalid );
+                if (pcount)
+                    LOGERR (klogFatal, rc, "missing source and destination arguments\n");
+                else
+                    LOGERR (klogFatal, rc, "missing destination argument[s]\n");
+                break;
+            }
+
+            VectorInit (&params, 0, 8); /* 8 is arbirary - seems long enough for no realloc */
+
+            rc = VFSManagerMake (&mgr);
+            if (rc)
+            {
+                LOGERR (klogFatal, rc,
+                        "unable to build file system manager");
+                break;
+            }
+
+            for (ix = 0; ix < pcount; ++ix)
+            {
+                VPath * kp;
+                const char * pc;
+
+                rc = ArgsParamValue (args, ix, (const void **)&pc);
+                if (rc)
+                {
+                    LOGERR (klogFatal, rc, "unable to extract path parameter");
+                    break;
+                }
+
+                rc = VFSManagerMakePath (mgr, &kp, "%s", pc);
+                if (rc)
+                {
+                    LOGERR (klogFatal, rc, "unable to build path parameter");
+                    break;
+                }
+
+                rc = VectorSet (&params, ix, kp);
+                if (rc)
+                {
+                    LOGERR (klogFatal, rc, "unable to stow path parameter");
+                    break;
+                }
+            }
+            if (rc == 0)
+            {
+                if (dest)
+                {
+                    rc = VFSManagerMakePath (mgr, &dp, "%s", dest);
+                    if (rc)
+                    {
+                        LOGERR (klogFatal, rc, "unable to build dest parameter");
+                        break;
+                    }
+                }
+                DEBUG_STATUS(("%s: Create file tree\n", __func__));
+                rc = CCTreeMake (&tree);
+                if (rc)
+                {
+                    LOGERR ( klogInt, rc, "failed to create parse tree" );
+                }
+                else
+                {
+                    DEBUG_STATUS(("%s: Create cache file tree\n", __func__));
+
+                    rc = CCTreeMake (&ctree);
+                    if (rc)
+                    {
+                        LOGERR ( klogInt, rc, "failed to create cache tree" );
+                    }
+                    else
+                    {
+                        DEBUG_STATUS(("%s: Create extracted file tree\n",
+                                      __func__));
+
+                        rc = CCTreeMake (&etree);
+                        if (rc)
+                        {
+                            LOGERR ( klogInt, rc,
+                                     "failed to create extract tree" );
+                        }
+                        else
+                        {
+                            DEBUG_STATUS(("%s: Create  NULL output file\n",
+                                          __func__));
+                            rc = KFileMakeNullUpdate (&fnull);
+                            if (rc)
+                                LOGERR (klogInt, rc,
+                                        "failed to create null output");
+                            else
+                            {
+                                DEBUG_STATUS(("%s: Open File Format Tester\n",
+                                              __func__));
+
+                                rc = CCFileFormatMake ( & filefmt );
+                                if ( rc != 0 )
+                                    LOGERR (klogInt, rc,
+                                            "failed to create file format" );
+                                else
+                                {
+                                    SLList logs;
+
+                                    DEBUG_STATUS(("%s: Initialize CRC32\n",
+                                                  __func__));
+
+                                    SLListInit (&logs);
+                                    CRC32Init ();
+
+                                    DEBUG_STATUS(("%s: Copy and catalog\n",
+                                                  __func__));
+
+                                    dump_out = stdout; /* kludge */
+
+                                    rc = copycat_run (tree, &logs, mgr, cache,
+                                                      dp, extract, &params);
+                                    if ( rc == 0 )
+                                        rc = copycat_dump ( xml_dir ? etree : tree, &logs );
+                                    DEBUG_STATUS(("%s: Output XML\n", __func__));
+
+
+                                    CCFileFormatRelease ( filefmt );
+                                }
+
+                                DEBUG_STATUS(("%s: Release NULL output file\n", __func__));
+
+                                orc = KFileRelease ( fnull ), fnull = NULL;
+                                if (rc == 0)
+                                    rc = orc;
+                            } 
+                            DEBUG_STATUS(("%s: Whack extracted file tree;\n", __func__));
+                            CCTreeWhack (etree);
+                        }
+                        DEBUG_STATUS(("%s: Whack cache file tree;\n", __func__));
+                        CCTreeWhack (ctree);
+                    }
+                    DEBUG_STATUS(("%s: Whack file tree;\n", __func__));
+                    CCTreeWhack (tree);
+                }
+
+                VPathRelease (dp);
+            }
+            VFSManagerRelease (mgr);
+            VectorWhack (&params, param_whack, NULL);
+        } while (0);
+    }
+    ArgsWhack (args);
+    orc = KDirectoryRelease (cdir); /* class extren should be NULL if never used */
+    if (orc)
+    {
+        LOGERR (klogInt, rc, "Error shutting file system access");
+        if (rc == 0)
+            rc = orc;
+    }
+    DEBUG_STATUS(("%s: exit rc %R(%x);\n", __func__, rc, rc));
+    return rc;
+}
+
diff --git a/tools/copycat/debug.h b/tools/copycat/debug.h
new file mode 100644
index 0000000..b47d440
--- /dev/null
+++ b/tools/copycat/debug.h
@@ -0,0 +1,75 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+
+#ifndef _h_copycat_debug_
+#define _h_copycat_debug_
+
+#include <klib/debug.h>
+
+#ifndef _h_kfs_impl_
+#include <kfs/impl.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define DEBUG_MSG_PASTE(a,b) a##b
+#define DEBUG_MSG(flag,msg) DBGMSG(DBG_APP,DBG_FLAG(DEBUG_MSG_PASTE(DBG_APP_,flag)), msg)
+#define DEBUG_ENTRY() DEBUG_MSG(10,("Enter: %s\n", __func__))
+
+/*--------------------------------------------------------------------------
+ * application debug stuff
+ */
+
+/* redefine some application flags to be more specialized rather than just numbers */
+#define DBG_CC          DBG_APP
+#define DBG_CC_FILE     DBG_APP_1
+#define DBG_CC_CCTREE   DBG_APP_2
+
+#define DBG_KFILE(msg)  DBGMSG (DBG_CC, DBG_FLAG(DBG_CC_FILE), msg)
+
+#if _DEBUGGING
+#define DBG_KFile(p)    \
+    { DBG_KFILE(("%s: KFile * %p\n", __func__, (p)));   \
+        if (p) { \
+            DBG_KFILE(("  vt:            %p\n",(p)->vt)); \
+            DBG_KFILE(("  dir:            %p\n",(p)->dir)); \
+            DBG_KFILE(("  ref:           %u\n",*(unsigned*)&(p)->refcount));  \
+            DBG_KFILE(("  read_enabled:  %u\n",*(unsigned*)&(p)->read_enabled)); \
+            DBG_KFILE(("  write_enabled: %u\n",*(unsigned*)&(p)->write_enabled));}}
+#else
+#define DBG_KFile(p) 
+#endif
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _h_copycat_debug_ */
diff --git a/tools/copycat/magic b/tools/copycat/magic
new file mode 100644
index 0000000..1f6abea
--- /dev/null
+++ b/tools/copycat/magic
@@ -0,0 +1,18398 @@
+
+#------------------------------------------------------------------------------
+# $File: acorn,v 1.5 2009/09/19 16:28:07 christos Exp $
+# acorn:  file(1) magic for files found on Acorn systems
+#
+
+# RISC OS Chunk File Format
+# From RISC OS Programmer's Reference Manual, Appendix D
+# We guess the file type from the type of the first chunk.
+0	lelong		0xc3cbc6c5	RISC OS Chunk data
+>12	string		OBJ_		\b, AOF object
+>12	string		LIB_		\b, ALF library
+
+# RISC OS AIF, contains "SWI OS_Exit" at offset 16.
+16	lelong		0xef000011	RISC OS AIF executable
+
+# RISC OS Draw files
+# From RISC OS Programmer's Reference Manual, Appendix E
+0	string 		Draw		RISC OS Draw file data
+
+# RISC OS new format font files
+# From RISC OS Programmer's Reference Manual, Appendix E
+0	string		FONT\0		RISC OS outline font data,
+>5	byte		x		version %d
+0	string		FONT\1		RISC OS 1bpp font data,
+>5	byte		x		version %d
+0	string		FONT\4		RISC OS 4bpp font data
+>5	byte		x		version %d
+
+# RISC OS Music files
+# From RISC OS Programmer's Reference Manual, Appendix E
+0	string		Maestro\r	RISC OS music file
+>8	byte		x		version %d
+
+>8	byte		x		type %d
+
+# Digital Symphony data files
+# From: Bernard Jungen (bern8817 at euphonynet.be)
+0		string	\x02\x01\x13\x13\x13\x01\x0d\x10	Digital Symphony sound sample (RISC OS),
+>8		byte	x	version %d,
+>9		pstring	x	named "%s",
+>(9.b+19)	byte	=0	8-bit logarithmic
+>(9.b+19)	byte	=1	LZW-compressed linear
+>(9.b+19)	byte	=2	8-bit linear signed
+>(9.b+19)	byte	=3	16-bit linear signed
+>(9.b+19)	byte	=4	SigmaDelta-compressed linear
+>(9.b+19)	byte	=5	SigmaDelta-compressed logarithmic
+>(9.b+19)	byte	>5	unknown format
+
+0	string	\x02\x01\x13\x13\x14\x12\x01\x0b	Digital Symphony song (RISC OS),
+>8	byte	x	version %d,
+>9	byte	=1	1 voice,
+>9	byte	!1	%d voices,
+>10	leshort	=1	1 track,
+>10	leshort	!1	%d tracks,
+>12	leshort	=1	1 pattern
+>12	leshort	!1	%d patterns
+
+0	string	\x02\x01\x13\x13\x10\x14\x12\x0e
+>9	byte	=0	Digital Symphony sequence (RISC OS),
+>>8	byte	x	version %d,
+>>10	byte	=1	1 line,
+>>10	byte	!1	%d lines,
+>>11	leshort	=1	1 position
+>>11	leshort	!1	%d positions
+>9	byte	=1	Digital Symphony pattern data (RISC OS),
+>>8	byte	x	version %d,
+>>10	leshort	=1	1 pattern
+>>10	leshort	!1	%d patterns
+
+#------------------------------------------------------------------------------
+# $File: adi,v 1.4 2009/09/19 16:28:07 christos Exp $
+# adi: file(1) magic for ADi's objects
+# From Gregory McGarry <g.mcgarry at ieee.org>
+#
+0	leshort		0x521c		COFF DSP21k
+>18	lelong		&02		executable,
+>18	lelong		^02
+>>18	lelong		&01		static object,
+>>18	lelong		^01		relocatable object,
+>18	lelong		&010		stripped
+>18	lelong		^010		not stripped
+
+#------------------------------------------------------------------------------
+# $File: adventure,v 1.10 2009/09/19 16:28:07 christos Exp $
+# adventure: file(1) magic for Adventure game files
+#
+# from Allen Garvin <earendil at faeryland.tamu-commerce.edu>
+# Edited by Dave Chapeskie <dchapes at ddm.on.ca> Jun 28, 1998
+# Edited by Chris Chittleborough <cchittleborough at yahoo.com.au>, March 2002
+#
+# ALAN
+# I assume there are other, lower versions, but these are the only ones I
+# saw in the archive.
+0	beshort	0x0206	ALAN game data
+>2	byte	<10	version 2.6%d
+
+
+# Infocom (see z-machine)
+#------------------------------------------------------------------------------
+# Z-machine:  file(1) magic for Z-machine binaries.
+#
+# This will match ${TEX_BASE}/texmf/omega/ocp/char2uni/inbig5.ocp which
+# appears to be a version-0 Z-machine binary.
+#
+# The (false match) message is to correct that behavior.  Perhaps it is
+# not needed.
+#
+16	belong&0xfe00f0f0	0x3030	Infocom game data
+>0	ubyte			0	(false match)
+>0	ubyte			>0	(Z-machine %d,
+>>2	ubeshort		x	Release %d /
+>>18	string			>\0	Serial %.6s)
+
+#------------------------------------------------------------------------------
+# Glulx:  file(1) magic for Glulx binaries.
+#
+# I haven't checked for false matches yet.
+#
+0	string			Glul	Glulx game data
+>4	beshort			x	(Version %d
+>>6	byte			x	\b.%d
+>>8	byte			x	\b.%d)
+>36	string			Info	Compiled by Inform
+
+
+
+# For Quetzal and blorb magic see iff
+
+
+# TADS (Text Adventure Development System)
+#  All files are machine-independent (games compile to byte-code) and are tagged
+#  with a version string of the form "V2.<digit>.<digit>\0" (but TADS 3 is
+#  on the way).
+#  Game files start with "TADS2 bin\n\r\032\0" then the compiler version.
+0	string	TADS2\ bin	TADS
+>9	belong  !0x0A0D1A00	game data, CORRUPTED
+>9	belong	 0x0A0D1A00
+>>13	string	>\0		%s game data
+#  Resource files start with "TADS2 rsc\n\r\032\0" then the compiler version.
+0	string	TADS2\ rsc	TADS
+>9	belong  !0x0A0D1A00	resource data, CORRUPTED
+>9	belong	 0x0A0D1A00
+>>13	string	>\0		%s resource data
+#  Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian
+#  2-byte length N, the N-char name of the game file *without* a NUL (darn!),
+# "TADS2 save\n\r\032\0" and the interpreter version. 
+0	string	TADS2\ save/g	TADS
+>12	belong	!0x0A0D1A00	saved game data, CORRUPTED
+>12	belong	 0x0A0D1A00
+>>(16.s+32) string >\0		%s saved game data
+#  Other saved game files start with "TADS2 save\n\r\032\0" and the interpreter
+#  version.
+0	string	TADS2\ save	TADS
+>10	belong	!0x0A0D1A00	saved game data, CORRUPTED
+>10	belong	 0x0A0D1A00
+>>14	string	>\0		%s saved game data
+
+# Danny Milosavljevic <danny.milo at gmx.net>
+# this are adrift (adventure game standard) game files, extension .taf
+# depending on version magic continues with 0x93453E6139FA (V 4.0)
+# 0x9445376139FA (V 3.90)
+# 0x9445366139FA (V 3.80)
+# this is from source (http://www.adrift.org.uk/) and I have some taf
+# files, and checked them.
+#0	belong	0x3C423FC9
+#>4	belong	0x6A87C2CF	Adrift game file
+#!:mime	application/x-adrift
+
+#------------------------------------------------------------------------------
+# $File: allegro,v 1.4 2009/09/19 16:28:07 christos Exp $
+# allegro:  file(1) magic for Allegro datafiles
+# Toby Deshane <hac at shoelace.digivill.net>
+#
+0 belong 0x736C6821   Allegro datafile (packed)
+0 belong 0x736C682E   Allegro datafile (not packed/autodetect)
+0 belong 0x736C682B   Allegro datafile (appended exe data)
+
+#------------------------------------------------------------------------------
+# $File: alliant,v 1.7 2009/09/19 16:28:07 christos Exp $
+# alliant:  file(1) magic for Alliant FX series a.out files
+#
+# If the FX series is the one that had a processor with a 68K-derived
+# instruction set, the "short" should probably become "beshort" and the
+# "long" should probably become "belong".
+# If it's the i860-based one, they should probably become either the
+# big-endian or little-endian versions, depending on the mode they ran
+# the 860 in....
+#
+0	short		0420		0420 Alliant virtual executable
+>2	short		&0x0020		common library
+>16	long		>0		not stripped
+0	short		0421		0421 Alliant compact executable
+>2	short		&0x0020		common library
+>16	long		>0		not stripped
+
+#------------------------------------------------------------------------------
+# $File: alpha,v 1.7 2009/09/19 16:28:07 christos Exp $
+# alpha architecture description
+#
+
+0	leshort		0603		COFF format alpha
+>22	leshort&030000	!020000		executable
+>24	leshort		0410		pure
+>24	leshort		0413		paged
+>22	leshort&020000	!0		dynamically linked
+>16	lelong		!0		not stripped
+>16	lelong		0		stripped
+>22	leshort&030000	020000		shared library
+>24	leshort		0407		object
+>27	byte		x		- version %d
+>26	byte		x		.%d
+>28	byte		x		-%d
+
+# Basic recognition of Digital UNIX core dumps - Mike Bremford <mike at opac.bl.uk>
+#
+# The actual magic number is just "Core", followed by a 2-byte version
+# number; however, treating any file that begins with "Core" as a Digital
+# UNIX core dump file may produce too many false hits, so we include one
+# byte of the version number as well; DU 5.0 appears only to be up to
+# version 2.
+#
+0	string		Core\001	Alpha COFF format core dump (Digital UNIX)
+>24	string		>\0		\b, from '%s'
+0	string		Core\002	Alpha COFF format core dump (Digital UNIX)
+>24	string		>\0		\b, from '%s'
+
+
+#------------------------------------------------------------------------------
+# $File: amanda,v 1.5 2009/09/19 16:28:07 christos Exp $
+# amanda:  file(1) magic for amanda file format
+#
+0	string	AMANDA:\ 		AMANDA 
+>8	string	TAPESTART\ DATE		tape header file,
+>>23	string	X
+>>>25	string	>\ 			Unused %s
+>>23	string	>\ 			DATE %s
+>8	string	FILE\ 			dump file,
+>>13	string	>\ 			DATE %s
+
+#------------------------------------------------------------------------------
+# $File: amigaos,v 1.14 2009/09/19 16:28:07 christos Exp $
+# amigaos:  file(1) magic for AmigaOS binary formats:
+
+#
+# From ignatios at cs.uni-bonn.de (Ignatios Souvatzis)
+#
+0	belong		0x000003fa	AmigaOS shared library
+0	belong		0x000003f3	AmigaOS loadseg()ble executable/binary
+0	belong		0x000003e7	AmigaOS object/library data
+#
+0	beshort		0xe310		Amiga Workbench
+>2	beshort		1		
+>>48	byte		1		disk icon
+>>48	byte		2		drawer icon
+>>48	byte		3		tool icon
+>>48	byte		4		project icon
+>>48	byte		5		garbage icon
+>>48	byte		6		device icon
+>>48	byte		7		kickstart icon
+>>48	byte		8		workbench application icon
+>2	beshort		>1		icon, vers. %d
+#
+# various sound formats from the Amiga
+# G=F6tz Waschk <waschk at informatik.uni-rostock.de>
+#
+0	string		FC14		Future Composer 1.4 Module sound file
+0	string		SMOD		Future Composer 1.3 Module sound file
+0	string		AON4artofnoise	Art Of Noise Module sound file
+1	string		MUGICIAN/SOFTEYES Mugician Module sound file
+58	string		SIDMON\ II\ -\ THE	Sidmon 2.0 Module sound file
+0	string		Synth4.0	Synthesis Module sound file
+0	string		ARP.		The Holy Noise Module sound file
+0	string		BeEp\0		JamCracker Module sound file
+0	string		COSO\0		Hippel-COSO Module sound file
+# Too simple (short, pure ASCII, deep), MPi
+#26	string		V.3		Brian Postma's Soundmon Module sound file v3
+#26	string		BPSM		Brian Postma's Soundmon Module sound file v3
+#26	string		V.2		Brian Postma's Soundmon Module sound file v2
+
+# The following are from: "Stefan A. Haubenthal" <polluks at web.de>
+0	beshort		0x0f00		AmigaOS bitmap font
+0	beshort		0x0f03		AmigaOS outline font
+0	belong		0x80001001	AmigaOS outline tag
+0	string		##\ version	catalog translation
+0	string		EMOD\0		Amiga E module
+8	string		ECXM\0		ECX module
+0	string/c	@database	AmigaGuide file
+
+# Amiga disk types
+# 
+0	string		RDSK		Rigid Disk Block
+>160	string		x		on %.24s
+0	string		DOS\0		Amiga DOS disk
+0	string		DOS\1		Amiga FFS disk
+0	string		DOS\2		Amiga Inter DOS disk
+0	string		DOS\3		Amiga Inter FFS disk
+0	string		DOS\4		Amiga Fastdir DOS disk
+0	string		DOS\5		Amiga Fastdir FFS disk
+0	string		KICK		Kickstart disk
+
+# From: Alex Beregszaszi <alex at fsn.hu>
+0	string		LZX		LZX compressed archive (Amiga)
+
+
+#------------------------------------------------------------------------------
+# $File: animation,v 1.39 2009/09/27 19:02:12 christos Exp $
+# animation:  file(1) magic for animation/movie formats
+#
+# animation formats
+# MPEG, FLI, DL originally from vax at ccwf.cc.utexas.edu (VaX#n8)
+# FLC, SGI, Apple originally from Daniel Quinlan (quinlan at yggdrasil.com)
+
+# SGI and Apple formats
+0	string		MOVI		Silicon Graphics movie file
+!:mime	video/x-sgi-movie
+4       string          moov            Apple QuickTime
+!:mime	video/quicktime
+>12     string          mvhd            \b movie (fast start)
+>12     string          mdra            \b URL
+>12     string          cmov            \b movie (fast start, compressed header)
+>12     string          rmra            \b multiple URLs
+4       string          mdat            Apple QuickTime movie (unoptimized)
+!:mime	video/quicktime
+#4       string          wide            Apple QuickTime movie (unoptimized)
+#!:mime	video/quicktime
+#4       string          skip            Apple QuickTime movie (modified)
+#!:mime	video/quicktime
+#4       string          free            Apple QuickTime movie (modified)
+#!:mime	video/quicktime
+4       string          idsc            Apple QuickTime image (fast start)
+!:mime	image/x-quicktime
+#4       string          idat            Apple QuickTime image (unoptimized)
+#!:mime	image/x-quicktime
+4       string          pckg            Apple QuickTime compressed archive
+!:mime	application/x-quicktime-player
+4	string/W	jP		JPEG 2000 image
+!:mime	image/jp2
+4	string		ftyp		ISO Media
+>8	string		isom		\b, MPEG v4 system, version 1
+!:mime	video/mp4
+>8	string		iso2		\b, MPEG v4 system, part 12 revision
+>8	string		mp41		\b, MPEG v4 system, version 1
+!:mime	video/mp4
+>8	string		mp42		\b, MPEG v4 system, version 2
+!:mime	video/mp4
+>8	string		mp7t		\b, MPEG v4 system, MPEG v7 XML
+>8	string		mp7b		\b, MPEG v4 system, MPEG v7 binary XML
+>8	string/W	jp2		\b, JPEG 2000
+!:mime	image/jp2
+>8	string		3gp		\b, MPEG v4 system, 3GPP
+!:mime	video/3gpp
+>>11	byte		4		\b v4 (H.263/AMR GSM 6.10)
+>>11	byte		5		\b v5 (H.263/AMR GSM 6.10)
+>>11	byte		6		\b v6 (ITU H.264/AMR GSM 6.10)
+>8	string		mmp4		\b, MPEG v4 system, 3GPP Mobile
+!:mime	video/mp4
+>8	string		avc1		\b, MPEG v4 system, 3GPP JVT AVC
+!:mime	video/3gpp
+>8	string/W	M4A		\b, MPEG v4 system, iTunes AAC-LC
+!:mime	audio/mp4
+>8	string/W	M4V		\b, MPEG v4 system, iTunes AVC-LC
+!:mime	video/mp4
+>8	string/W	M4P		\b, MPEG v4 system, iTunes AES encrypted
+>8	string/W	M4B		\b, MPEG v4 system, iTunes bookmarked
+>8	string/W	qt		\b, Apple QuickTime movie
+!:mime	video/quicktime
+
+# MPEG sequences
+# Scans for all common MPEG header start codes
+0	 belong		    0x00000001     
+>4	 byte&0x1F	    0x07	   JVT NAL sequence, H.264 video
+>>5      byte               66             \b, baseline
+>>5      byte               77             \b, main
+>>5      byte               88             \b, extended
+>>7      byte               x              \b @ L %u
+0        belong&0xFFFFFF00  0x00000100     
+>3       byte               0xBA           MPEG sequence
+!:mime  video/mpeg
+>>4      byte               &0x40          \b, v2, program multiplex
+>>4      byte               ^0x40          \b, v1, system multiplex
+>3       byte               0xBB           MPEG sequence, v1/2, multiplex (missing pack header)
+>3       byte&0x1F          0x07           MPEG sequence, H.264 video
+>>4      byte               66             \b, baseline
+>>4      byte               77             \b, main
+>>4      byte               88             \b, extended
+>>6      byte               x              \b @ L %u
+>3       byte               0xB0           MPEG sequence, v4
+!:mime  video/mpeg4-generic
+>>5      belong             0x000001B5
+>>>9     byte               &0x80
+>>>>10   byte&0xF0          16             \b, video
+>>>>10   byte&0xF0          32             \b, still texture
+>>>>10   byte&0xF0          48             \b, mesh
+>>>>10   byte&0xF0          64             \b, face
+>>>9     byte&0xF8          8              \b, video
+>>>9     byte&0xF8          16             \b, still texture
+>>>9     byte&0xF8          24             \b, mesh
+>>>9     byte&0xF8          32             \b, face
+>>4      byte               1              \b, simple @ L1
+>>4      byte               2              \b, simple @ L2
+>>4      byte               3              \b, simple @ L3
+>>4      byte               4              \b, simple @ L0
+>>4      byte               17             \b, simple scalable @ L1
+>>4      byte               18             \b, simple scalable @ L2
+>>4      byte               33             \b, core @ L1
+>>4      byte               34             \b, core @ L2
+>>4      byte               50             \b, main @ L2
+>>4      byte               51             \b, main @ L3
+>>4      byte               53             \b, main @ L4
+>>4      byte               66             \b, n-bit @ L2
+>>4      byte               81             \b, scalable texture @ L1
+>>4      byte               97             \b, simple face animation @ L1
+>>4      byte               98             \b, simple face animation @ L2
+>>4      byte               99             \b, simple face basic animation @ L1
+>>4      byte               100            \b, simple face basic animation @ L2
+>>4      byte               113            \b, basic animation text @ L1
+>>4      byte               114            \b, basic animation text @ L2
+>>4      byte               129            \b, hybrid @ L1
+>>4      byte               130            \b, hybrid @ L2
+>>4      byte               145            \b, advanced RT simple @ L!
+>>4      byte               146            \b, advanced RT simple @ L2
+>>4      byte               147            \b, advanced RT simple @ L3
+>>4      byte               148            \b, advanced RT simple @ L4
+>>4      byte               161            \b, core scalable @ L1
+>>4      byte               162            \b, core scalable @ L2
+>>4      byte               163            \b, core scalable @ L3
+>>4      byte               177            \b, advanced coding efficiency @ L1
+>>4      byte               178            \b, advanced coding efficiency @ L2
+>>4      byte               179            \b, advanced coding efficiency @ L3
+>>4      byte               180            \b, advanced coding efficiency @ L4
+>>4      byte               193            \b, advanced core @ L1
+>>4      byte               194            \b, advanced core @ L2
+>>4      byte               209            \b, advanced scalable texture @ L1
+>>4      byte               210            \b, advanced scalable texture @ L2
+>>4      byte               211            \b, advanced scalable texture @ L3
+>>4      byte               225            \b, simple studio @ L1
+>>4      byte               226            \b, simple studio @ L2
+>>4      byte               227            \b, simple studio @ L3
+>>4      byte               228            \b, simple studio @ L4
+>>4      byte               229            \b, core studio @ L1
+>>4      byte               230            \b, core studio @ L2
+>>4      byte               231            \b, core studio @ L3
+>>4      byte               232            \b, core studio @ L4
+>>4      byte               240            \b, advanced simple @ L0
+>>4      byte               241            \b, advanced simple @ L1
+>>4      byte               242            \b, advanced simple @ L2
+>>4      byte               243            \b, advanced simple @ L3
+>>4      byte               244            \b, advanced simple @ L4
+>>4      byte               245            \b, advanced simple @ L5
+>>4      byte               247            \b, advanced simple @ L3b
+>>4      byte               248            \b, FGS @ L0
+>>4      byte               249            \b, FGS @ L1
+>>4      byte               250            \b, FGS @ L2
+>>4      byte               251            \b, FGS @ L3
+>>4      byte               252            \b, FGS @ L4
+>>4      byte               253            \b, FGS @ L5
+>3       byte               0xB5           MPEG sequence, v4
+>>4      byte               &0x80
+>>>5     byte&0xF0          16             \b, video (missing profile header)
+>>>5     byte&0xF0          32             \b, still texture (missing profile header)
+>>>5     byte&0xF0          48             \b, mesh (missing profile header)
+>>>5     byte&0xF0          64             \b, face (missing profile header)
+>>4      byte&0xF8          8              \b, video (missing profile header)
+>>4      byte&0xF8          16             \b, still texture (missing profile header)
+>>4      byte&0xF8          24             \b, mesh (missing profile header)
+>>4      byte&0xF8          32             \b, face (missing profile header)
+>3       byte               0xB3           MPEG sequence
+>>12     belong             0x000001B8     \b, v1, progressive Y'CbCr 4:2:0 video
+>>12     belong             0x000001B2     \b, v1, progressive Y'CbCr 4:2:0 video
+>>12     belong             0x000001B5     \b, v2,
+>>>16    byte&0x0F          1              \b HP
+>>>16    byte&0x0F          2              \b Spt
+>>>16    byte&0x0F          3              \b SNR
+>>>16    byte&0x0F          4              \b MP
+>>>16    byte&0x0F          5              \b SP
+>>>17    byte&0xF0          64             \b at HL
+>>>17    byte&0xF0          96             \b at H-14
+>>>17    byte&0xF0          128            \b at ML
+>>>17    byte&0xF0          160            \b at LL
+>>>17    byte               &0x08          \b progressive
+>>>17    byte               ^0x08          \b interlaced
+>>>17    byte&0x06          2              \b Y'CbCr 4:2:0 video
+>>>17    byte&0x06          4              \b Y'CbCr 4:2:2 video
+>>>17    byte&0x06          6              \b Y'CbCr 4:4:4 video
+>>11     byte               &0x02
+>>>75    byte               &0x01
+>>>>140  belong             0x000001B8     \b, v1, progressive Y'CbCr 4:2:0 video
+>>>>140  belong             0x000001B2     \b, v1, progressive Y'CbCr 4:2:0 video
+>>>>140  belong             0x000001B5     \b, v2,
+>>>>>144 byte&0x0F          1              \b HP
+>>>>>144 byte&0x0F          2              \b Spt
+>>>>>144 byte&0x0F          3              \b SNR
+>>>>>144 byte&0x0F          4              \b MP
+>>>>>144 byte&0x0F          5              \b SP
+>>>>>145 byte&0xF0          64             \b at HL
+>>>>>145 byte&0xF0          96             \b at H-14
+>>>>>145 byte&0xF0          128            \b at ML
+>>>>>145 byte&0xF0          160            \b at LL
+>>>>>145 byte               &0x08          \b progressive
+>>>>>145 byte               ^0x08          \b interlaced
+>>>>>145 byte&0x06          2              \b Y'CbCr 4:2:0 video
+>>>>>145 byte&0x06          4              \b Y'CbCr 4:2:2 video
+>>>>>145 byte&0x06          6              \b Y'CbCr 4:4:4 video
+>>76    belong             0x000001B8     \b, v1, progressive Y'CbCr 4:2:0 video
+>>76    belong             0x000001B2     \b, v1, progressive Y'CbCr 4:2:0 video
+>>76    belong             0x000001B5     \b, v2,
+>>>80   byte&0x0F          1              \b HP
+>>>80   byte&0x0F          2              \b Spt
+>>>80   byte&0x0F          3              \b SNR
+>>>80   byte&0x0F          4              \b MP
+>>>80   byte&0x0F          5              \b SP
+>>>81   byte&0xF0          64             \b at HL
+>>>81   byte&0xF0          96             \b at H-14
+>>>81   byte&0xF0          128            \b at ML
+>>>81   byte&0xF0          160            \b at LL
+>>>81   byte               &0x08          \b progressive
+>>>81   byte               ^0x08          \b interlaced
+>>>81   byte&0x06          2              \b Y'CbCr 4:2:0 video
+>>>81   byte&0x06          4              \b Y'CbCr 4:2:2 video
+>>>81   byte&0x06          6              \b Y'CbCr 4:4:4 video
+>>4      belong&0xFFFFFF00  0x78043800     \b, HD-TV 1920P
+>>>7     byte&0xF0          0x10           \b, 16:9
+>>4      belong&0xFFFFFF00  0x50002D00     \b, SD-TV 1280I
+>>>7     byte&0xF0          0x10           \b, 16:9
+>>4      belong&0xFFFFFF00  0x30024000     \b, PAL Capture
+>>>7     byte&0xF0          0x10           \b, 4:3
+>>4      beshort&0xFFF0     0x2C00         \b, 4CIF
+>>>5     beshort&0x0FFF     0x01E0         \b NTSC
+>>>5     beshort&0x0FFF     0x0240         \b PAL
+>>>7     byte&0xF0          0x20           \b, 4:3
+>>>7     byte&0xF0          0x30           \b, 16:9
+>>>7     byte&0xF0          0x40           \b, 11:5
+>>>7     byte&0xF0          0x80           \b, PAL 4:3
+>>>7     byte&0xF0          0xC0           \b, NTSC 4:3
+>>4      belong&0xFFFFFF00  0x2801E000     \b, LD-TV 640P
+>>>7     byte&0xF0          0x10           \b, 4:3
+>>4      belong&0xFFFFFF00  0x1400F000     \b, 320x240
+>>>7     byte&0xF0          0x10           \b, 4:3
+>>4      belong&0xFFFFFF00  0x0F00A000     \b, 240x160
+>>>7     byte&0xF0          0x10           \b, 4:3
+>>4      belong&0xFFFFFF00  0x0A007800     \b, 160x120
+>>>7     byte&0xF0          0x10           \b, 4:3
+>>4      beshort&0xFFF0     0x1600         \b, CIF
+>>>5     beshort&0x0FFF     0x00F0         \b NTSC
+>>>5     beshort&0x0FFF     0x0120         \b PAL
+>>>7     byte&0xF0          0x20           \b, 4:3
+>>>7     byte&0xF0          0x30           \b, 16:9
+>>>7     byte&0xF0          0x40           \b, 11:5
+>>>7     byte&0xF0          0x80           \b, PAL 4:3
+>>>7     byte&0xF0          0xC0           \b, NTSC 4:3
+>>>5     beshort&0x0FFF     0x0240         \b PAL 625
+>>>>7    byte&0xF0          0x20           \b, 4:3
+>>>>7    byte&0xF0          0x30           \b, 16:9
+>>>>7    byte&0xF0          0x40           \b, 11:5
+>>4      beshort&0xFFF0     0x2D00         \b, CCIR/ITU
+>>>5     beshort&0x0FFF     0x01E0         \b NTSC 525
+>>>5     beshort&0x0FFF     0x0240         \b PAL 625
+>>>7     byte&0xF0          0x20           \b, 4:3
+>>>7     byte&0xF0          0x30           \b, 16:9
+>>>7     byte&0xF0          0x40           \b, 11:5
+>>4      beshort&0xFFF0     0x1E00         \b, SVCD
+>>>5     beshort&0x0FFF     0x01E0         \b NTSC 525
+>>>5     beshort&0x0FFF     0x0240         \b PAL 625
+>>>7     byte&0xF0          0x20           \b, 4:3
+>>>7     byte&0xF0          0x30           \b, 16:9
+>>>7     byte&0xF0          0x40           \b, 11:5
+>>7      byte&0x0F          1              \b, 23.976 fps
+>>7      byte&0x0F          2              \b, 24 fps
+>>7      byte&0x0F          3              \b, 25 fps
+>>7      byte&0x0F          4              \b, 29.97 fps
+>>7      byte&0x0F          5              \b, 30 fps
+>>7      byte&0x0F          6              \b, 50 fps
+>>7      byte&0x0F          7              \b, 59.94 fps
+>>7      byte&0x0F          8              \b, 60 fps
+>>11     byte               &0x04          \b, Constrained
+
+# MPEG ADTS Audio (*.mpx/mxa/aac)
+# from dreesen at math.fu-berlin.de
+# modified to fully support MPEG ADTS
+
+# MP3, M1A
+# modified by Joerg Jenderek
+# GRR the original test are too common for many DOS files
+# so don't accept as MP3 until we've tested the rate
+0       beshort&0xFFFE  0xFFFA
+# rates
+>2      byte&0xF0       0x10           MPEG ADTS, layer III, v1,  32 kbps
+!:mime	audio/mpeg
+>2      byte&0xF0       0x20           MPEG ADTS, layer III, v1,  40 kbps
+!:mime	audio/mpeg
+>2      byte&0xF0       0x30           MPEG ADTS, layer III, v1,  48 kbps
+!:mime	audio/mpeg
+>2      byte&0xF0       0x40           MPEG ADTS, layer III, v1,  56 kbps
+!:mime	audio/mpeg
+>2      byte&0xF0       0x50           MPEG ADTS, layer III, v1,  64 kbps
+!:mime	audio/mpeg
+>2      byte&0xF0       0x60           MPEG ADTS, layer III, v1,  80 kbps
+!:mime	audio/mpeg
+>2      byte&0xF0       0x70           MPEG ADTS, layer III, v1,  96 kbps
+!:mime	audio/mpeg
+>2      byte&0xF0       0x80           MPEG ADTS, layer III, v1, 112 kbps
+!:mime	audio/mpeg
+>2      byte&0xF0       0x90           MPEG ADTS, layer III, v1, 128 kbps
+!:mime	audio/mpeg
+>2      byte&0xF0       0xA0           MPEG ADTS, layer III, v1, 160 kbps
+!:mime	audio/mpeg
+>2      byte&0xF0       0xB0           MPEG ADTS, layer III, v1, 192 kbps
+!:mime	audio/mpeg
+>2      byte&0xF0       0xC0           MPEG ADTS, layer III, v1, 224 kbps
+!:mime	audio/mpeg
+>2      byte&0xF0       0xD0           MPEG ADTS, layer III, v1, 256 kbps
+!:mime	audio/mpeg
+>2      byte&0xF0       0xE0           MPEG ADTS, layer III, v1, 320 kbps
+!:mime	audio/mpeg
+# timing
+>2      byte&0x0C       0x00           \b, 44.1 kHz
+>2      byte&0x0C       0x04           \b, 48 kHz
+>2      byte&0x0C       0x08           \b, 32 kHz
+# channels/options
+>3      byte&0xC0       0x00           \b, Stereo
+>3      byte&0xC0       0x40           \b, JntStereo
+>3      byte&0xC0       0x80           \b, 2x Monaural
+>3      byte&0xC0       0xC0           \b, Monaural
+#>1     byte            ^0x01          \b, Data Verify
+#>2     byte            &0x02          \b, Packet Pad
+#>2     byte            &0x01          \b, Custom Flag
+#>3     byte            &0x08          \b, Copyrighted
+#>3     byte            &0x04          \b, Original Source
+#>3     byte&0x03       1              \b, NR: 50/15 ms
+#>3     byte&0x03       3              \b, NR: CCIT J.17
+
+# MP2, M1A
+0       beshort&0xFFFE  0xFFFC         MPEG ADTS, layer II, v1
+!:mime	audio/mpeg
+# rates
+>2      byte&0xF0       0x10           \b,  32 kbps
+>2      byte&0xF0       0x20           \b,  48 kbps
+>2      byte&0xF0       0x30           \b,  56 kbps
+>2      byte&0xF0       0x40           \b,  64 kbps
+>2      byte&0xF0       0x50           \b,  80 kbps
+>2      byte&0xF0       0x60           \b,  96 kbps
+>2      byte&0xF0       0x70           \b, 112 kbps
+>2      byte&0xF0       0x80           \b, 128 kbps
+>2      byte&0xF0       0x90           \b, 160 kbps
+>2      byte&0xF0       0xA0           \b, 192 kbps
+>2      byte&0xF0       0xB0           \b, 224 kbps
+>2      byte&0xF0       0xC0           \b, 256 kbps
+>2      byte&0xF0       0xD0           \b, 320 kbps
+>2      byte&0xF0       0xE0           \b, 384 kbps
+# timing
+>2      byte&0x0C       0x00           \b, 44.1 kHz
+>2      byte&0x0C       0x04           \b, 48 kHz
+>2      byte&0x0C       0x08           \b, 32 kHz
+# channels/options
+>3      byte&0xC0       0x00           \b, Stereo
+>3      byte&0xC0       0x40           \b, JntStereo
+>3      byte&0xC0       0x80           \b, 2x Monaural
+>3      byte&0xC0       0xC0           \b, Monaural
+#>1     byte            ^0x01          \b, Data Verify
+#>2     byte            &0x02          \b, Packet Pad
+#>2     byte            &0x01          \b, Custom Flag
+#>3     byte            &0x08          \b, Copyrighted
+#>3     byte            &0x04          \b, Original Source
+#>3     byte&0x03       1              \b, NR: 50/15 ms
+#>3     byte&0x03       3              \b, NR: CCIT J.17
+
+# MPA, M1A
+# updated by Joerg Jenderek
+# GRR the original test are too common for many DOS files, so test 32 <= kbits <= 448
+# GRR this test is still too general as it catches a BOM of UTF-16 files (0xFFFE)
+# FIXME: Almost all little endian UTF-16 text with BOM are clobbered by these entries
+#0	beshort&0xFFFE		0xFFFE	
+#>2	ubyte&0xF0	>0x0F		
+#>>2	ubyte&0xF0	<0xE1		MPEG ADTS, layer I, v1
+## rate
+#>>>2      byte&0xF0       0x10           \b,  32 kbps
+#>>>2      byte&0xF0       0x20           \b,  64 kbps
+#>>>2      byte&0xF0       0x30           \b,  96 kbps
+#>>>2      byte&0xF0       0x40           \b, 128 kbps
+#>>>2      byte&0xF0       0x50           \b, 160 kbps
+#>>>2      byte&0xF0       0x60           \b, 192 kbps
+#>>>2      byte&0xF0       0x70           \b, 224 kbps
+#>>>2      byte&0xF0       0x80           \b, 256 kbps
+#>>>2      byte&0xF0       0x90           \b, 288 kbps
+#>>>2      byte&0xF0       0xA0           \b, 320 kbps
+#>>>2      byte&0xF0       0xB0           \b, 352 kbps
+#>>>2      byte&0xF0       0xC0           \b, 384 kbps
+#>>>2      byte&0xF0       0xD0           \b, 416 kbps
+#>>>2      byte&0xF0       0xE0           \b, 448 kbps
+## timing
+#>>>2      byte&0x0C       0x00           \b, 44.1 kHz
+#>>>2      byte&0x0C       0x04           \b, 48 kHz
+#>>>2      byte&0x0C       0x08           \b, 32 kHz
+## channels/options
+#>>>3      byte&0xC0       0x00           \b, Stereo
+#>>>3      byte&0xC0       0x40           \b, JntStereo
+#>>>3      byte&0xC0       0x80           \b, 2x Monaural
+#>>>3      byte&0xC0       0xC0           \b, Monaural
+##>1     byte            ^0x01          \b, Data Verify
+##>2     byte            &0x02          \b, Packet Pad
+##>2     byte            &0x01          \b, Custom Flag
+##>3     byte            &0x08          \b, Copyrighted
+##>3     byte            &0x04          \b, Original Source
+##>3     byte&0x03       1              \b, NR: 50/15 ms
+##>3     byte&0x03       3              \b, NR: CCIT J.17
+
+# MP3, M2A
+0       beshort&0xFFFE  0xFFF2         MPEG ADTS, layer III, v2
+!:mime	audio/mpeg
+# rate
+>2      byte&0xF0       0x10           \b,   8 kbps
+>2      byte&0xF0       0x20           \b,  16 kbps
+>2      byte&0xF0       0x30           \b,  24 kbps
+>2      byte&0xF0       0x40           \b,  32 kbps
+>2      byte&0xF0       0x50           \b,  40 kbps
+>2      byte&0xF0       0x60           \b,  48 kbps
+>2      byte&0xF0       0x70           \b,  56 kbps
+>2      byte&0xF0       0x80           \b,  64 kbps
+>2      byte&0xF0       0x90           \b,  80 kbps
+>2      byte&0xF0       0xA0           \b,  96 kbps
+>2      byte&0xF0       0xB0           \b, 112 kbps
+>2      byte&0xF0       0xC0           \b, 128 kbps
+>2      byte&0xF0       0xD0           \b, 144 kbps
+>2      byte&0xF0       0xE0           \b, 160 kbps
+# timing
+>2      byte&0x0C       0x00           \b, 22.05 kHz
+>2      byte&0x0C       0x04           \b, 24 kHz
+>2      byte&0x0C       0x08           \b, 16 kHz
+# channels/options
+>3      byte&0xC0       0x00           \b, Stereo
+>3      byte&0xC0       0x40           \b, JntStereo
+>3      byte&0xC0       0x80           \b, 2x Monaural
+>3      byte&0xC0       0xC0           \b, Monaural
+#>1     byte            ^0x01          \b, Data Verify
+#>2     byte            &0x02          \b, Packet Pad
+#>2     byte            &0x01          \b, Custom Flag
+#>3     byte            &0x08          \b, Copyrighted
+#>3     byte            &0x04          \b, Original Source
+#>3     byte&0x03       1              \b, NR: 50/15 ms
+#>3     byte&0x03       3              \b, NR: CCIT J.17
+
+# MP2, M2A
+0       beshort&0xFFFE  0xFFF4         MPEG ADTS, layer II, v2
+# rate 
+>2      byte&0xF0       0x10           \b,   8 kbps
+>2      byte&0xF0       0x20           \b,  16 kbps 
+>2      byte&0xF0       0x30           \b,  24 kbps
+>2      byte&0xF0       0x40           \b,  32 kbps
+>2      byte&0xF0       0x50           \b,  40 kbps
+>2      byte&0xF0       0x60           \b,  48 kbps
+>2      byte&0xF0       0x70           \b,  56 kbps
+>2      byte&0xF0       0x80           \b,  64 kbps
+>2      byte&0xF0       0x90           \b,  80 kbps
+>2      byte&0xF0       0xA0           \b,  96 kbps
+>2      byte&0xF0       0xB0           \b, 112 kbps
+>2      byte&0xF0       0xC0           \b, 128 kbps
+>2      byte&0xF0       0xD0           \b, 144 kbps
+>2      byte&0xF0       0xE0           \b, 160 kbps
+# timing
+>2      byte&0x0C       0x00           \b, 22.05 kHz
+>2      byte&0x0C       0x04           \b, 24 kHz
+>2      byte&0x0C       0x08           \b, 16 kHz
+# channels/options
+>3      byte&0xC0       0x00           \b, Stereo
+>3      byte&0xC0       0x40           \b, JntStereo
+>3      byte&0xC0       0x80           \b, 2x Monaural
+>3      byte&0xC0       0xC0           \b, Monaural
+#>1     byte            ^0x01          \b, Data Verify
+#>2     byte            &0x02          \b, Packet Pad
+#>2     byte            &0x01          \b, Custom Flag
+#>3     byte            &0x08          \b, Copyrighted
+#>3     byte            &0x04          \b, Original Source
+#>3     byte&0x03       1              \b, NR: 50/15 ms
+#>3     byte&0x03       3              \b, NR: CCIT J.17
+
+# MPA, M2A
+0       beshort&0xFFFE  0xFFF6         MPEG ADTS, layer I, v2
+!:mime	audio/mpeg
+# rate
+>2      byte&0xF0       0x10           \b,  32 kbps
+>2      byte&0xF0       0x20           \b,  48 kbps
+>2      byte&0xF0       0x30           \b,  56 kbps
+>2      byte&0xF0       0x40           \b,  64 kbps
+>2      byte&0xF0       0x50           \b,  80 kbps
+>2      byte&0xF0       0x60           \b,  96 kbps
+>2      byte&0xF0       0x70           \b, 112 kbps
+>2      byte&0xF0       0x80           \b, 128 kbps
+>2      byte&0xF0       0x90           \b, 144 kbps
+>2      byte&0xF0       0xA0           \b, 160 kbps
+>2      byte&0xF0       0xB0           \b, 176 kbps
+>2      byte&0xF0       0xC0           \b, 192 kbps
+>2      byte&0xF0       0xD0           \b, 224 kbps
+>2      byte&0xF0       0xE0           \b, 256 kbps
+# timing
+>2      byte&0x0C       0x00           \b, 22.05 kHz
+>2      byte&0x0C       0x04           \b, 24 kHz
+>2      byte&0x0C       0x08           \b, 16 kHz
+# channels/options
+>3      byte&0xC0       0x00           \b, Stereo
+>3      byte&0xC0       0x40           \b, JntStereo
+>3      byte&0xC0       0x80           \b, 2x Monaural
+>3      byte&0xC0       0xC0           \b, Monaural
+#>1     byte            ^0x01          \b, Data Verify
+#>2     byte            &0x02          \b, Packet Pad
+#>2     byte            &0x01          \b, Custom Flag
+#>3     byte            &0x08          \b, Copyrighted
+#>3     byte            &0x04          \b, Original Source
+#>3     byte&0x03       1              \b, NR: 50/15 ms
+#>3     byte&0x03       3              \b, NR: CCIT J.17
+
+# MP3, M25A
+0       beshort&0xFFFE  0xFFE2         MPEG ADTS, layer III,  v2.5
+!:mime	audio/mpeg
+# rate  
+>2      byte&0xF0       0x10           \b,   8 kbps
+>2      byte&0xF0       0x20           \b,  16 kbps
+>2      byte&0xF0       0x30           \b,  24 kbps
+>2      byte&0xF0       0x40           \b,  32 kbps
+>2      byte&0xF0       0x50           \b,  40 kbps
+>2      byte&0xF0       0x60           \b,  48 kbps
+>2      byte&0xF0       0x70           \b,  56 kbps
+>2      byte&0xF0       0x80           \b,  64 kbps
+>2      byte&0xF0       0x90           \b,  80 kbps
+>2      byte&0xF0       0xA0           \b,  96 kbps
+>2      byte&0xF0       0xB0           \b, 112 kbps
+>2      byte&0xF0       0xC0           \b, 128 kbps
+>2      byte&0xF0       0xD0           \b, 144 kbps
+>2      byte&0xF0       0xE0           \b, 160 kbps
+# timing
+>2      byte&0x0C       0x00           \b, 11.025 kHz
+>2      byte&0x0C       0x04           \b, 12 kHz
+>2      byte&0x0C       0x08           \b, 8 kHz
+# channels/options
+>3      byte&0xC0       0x00           \b, Stereo
+>3      byte&0xC0       0x40           \b, JntStereo
+>3      byte&0xC0       0x80           \b, 2x Monaural
+>3      byte&0xC0       0xC0           \b, Monaural
+#>1     byte            ^0x01          \b, Data Verify
+#>2     byte            &0x02          \b, Packet Pad
+#>2     byte            &0x01          \b, Custom Flag
+#>3     byte            &0x08          \b, Copyrighted
+#>3     byte            &0x04          \b, Original Source
+#>3     byte&0x03       1              \b, NR: 50/15 ms
+#>3     byte&0x03       3              \b, NR: CCIT J.17
+
+# AAC (aka MPEG-2 NBC audio) and MPEG-4 audio
+
+# Stored AAC streams (instead of the MP4 format)
+0       string          ADIF           MPEG ADIF, AAC
+!:mime	audio/x-hx-aac-adif
+>4      byte            &0x80
+>>13    byte            &0x10          \b, VBR
+>>13    byte            ^0x10          \b, CBR
+>>16    byte&0x1E       0x02           \b, single stream
+>>16    byte&0x1E       0x04           \b, 2 streams
+>>16    byte&0x1E       0x06           \b, 3 streams
+>>16    byte            &0x08          \b, 4 or more streams
+>>16    byte            &0x10          \b, 8 or more streams
+>>4    byte            &0x80          \b, Copyrighted
+>>13   byte            &0x40          \b, Original Source
+>>13   byte            &0x20          \b, Home Flag
+>4      byte            ^0x80
+>>4     byte            &0x10          \b, VBR
+>>4     byte            ^0x10          \b, CBR
+>>7     byte&0x1E       0x02           \b, single stream
+>>7     byte&0x1E       0x04           \b, 2 streams
+>>7     byte&0x1E       0x06           \b, 3 streams
+>>7     byte            &0x08          \b, 4 or more streams
+>>7     byte            &0x10          \b, 8 or more streams
+>>4    byte            &0x40          \b, Original Stream(s)
+>>4    byte            &0x20          \b, Home Source
+
+# Live or stored single AAC stream (used with MPEG-2 systems)
+0       beshort&0xFFF6  0xFFF0         MPEG ADTS, AAC
+!:mime	audio/x-hx-aac-adts
+>1      byte            &0x08          \b, v2
+>1      byte            ^0x08          \b, v4
+# profile
+>>2     byte            &0xC0          \b LTP
+>2      byte&0xc0       0x00           \b Main
+>2      byte&0xc0       0x40           \b LC
+>2      byte&0xc0       0x80           \b SSR
+# timing
+>2      byte&0x3c       0x00           \b, 96 kHz
+>2      byte&0x3c       0x04           \b, 88.2 kHz
+>2      byte&0x3c       0x08           \b, 64 kHz
+>2      byte&0x3c       0x0c           \b, 48 kHz
+>2      byte&0x3c       0x10           \b, 44.1 kHz
+>2      byte&0x3c       0x14           \b, 32 kHz
+>2      byte&0x3c       0x18           \b, 24 kHz
+>2      byte&0x3c       0x1c           \b, 22.05 kHz
+>2      byte&0x3c       0x20           \b, 16 kHz
+>2      byte&0x3c       0x24           \b, 12 kHz
+>2      byte&0x3c       0x28           \b, 11.025 kHz
+>2      byte&0x3c       0x2c           \b, 8 kHz
+# channels
+>2      beshort&0x01c0  0x0040         \b, monaural
+>2      beshort&0x01c0  0x0080         \b, stereo
+>2      beshort&0x01c0  0x00c0         \b, stereo + center
+>2      beshort&0x01c0  0x0100         \b, stereo+center+LFE
+>2      beshort&0x01c0  0x0140         \b, surround
+>2      beshort&0x01c0  0x0180         \b, surround + LFE
+>2      beshort         &0x01C0        \b, surround + side
+#>1     byte            ^0x01           \b, Data Verify
+#>2     byte            &0x02           \b, Custom Flag
+#>3     byte            &0x20           \b, Original Stream
+#>3     byte            &0x10           \b, Home Source
+#>3     byte            &0x08           \b, Copyrighted
+
+# Live MPEG-4 audio streams (instead of RTP FlexMux)
+0       beshort&0xFFE0  0x56E0         MPEG-4 LOAS
+!:mime	audio/x-mp4a-latm
+#>1     beshort&0x1FFF  x              \b, %u byte packet
+>3      byte&0xE0       0x40
+>>4     byte&0x3C       0x04           \b, single stream
+>>4     byte&0x3C       0x08           \b, 2 streams
+>>4     byte&0x3C       0x0C           \b, 3 streams
+>>4     byte            &0x08          \b, 4 or more streams
+>>4     byte            &0x20          \b, 8 or more streams
+>3      byte&0xC0       0
+>>4     byte&0x78       0x08           \b, single stream
+>>4     byte&0x78       0x10           \b, 2 streams
+>>4     byte&0x78       0x18           \b, 3 streams
+>>4     byte            &0x20          \b, 4 or more streams
+>>4     byte            &0x40          \b, 8 or more streams
+# This magic isn't strong enough (matches plausible ISO-8859-1 text)
+#0       beshort         0x4DE1         MPEG-4 LO-EP audio stream
+#!:mime	audio/x-mp4a-latm
+
+# Summary: FLI animation format
+# Created by: Daniel Quinlan <quinlan at yggdrasil.com>
+# Modified by (1): Abel Cheung <abelcheung at gmail.com> (avoid over-generic detection)
+4	leshort		0xAF11
+# standard FLI always has 320x200 resolution and 8 bit color
+>8	leshort		320
+>>10	leshort		200
+>>>12	leshort		8			FLI animation, 320x200x8
+!:mime	video/x-fli
+>>>>6	leshort		x			\b, %d frames
+# frame speed is multiple of 1/70s
+>>>>16	leshort		x			\b, %d/70s per frame
+
+# Summary: FLC animation format
+# Created by: Daniel Quinlan <quinlan at yggdrasil.com>
+# Modified by (1): Abel Cheung <abelcheung at gmail.com> (avoid over-generic detection)
+4	leshort		0xAF12
+# standard FLC always use 8 bit color
+>12	leshort		8			FLC animation
+!:mime	video/x-flc
+>>8	leshort		x			\b, %d
+>>10	leshort		x			\bx%dx8
+>>6	uleshort	x			\b, %d frames
+>>16	uleshort	x			\b, %dms per frame
+
+# DL animation format
+# XXX - collision with most `mips' magic
+#
+# I couldn't find a real magic number for these, however, this
+# -appears- to work.  Note that it might catch other files, too, so be
+# careful!
+#
+# Note that title and author appear in the two 20-byte chunks
+# at decimal offsets 2 and 22, respectively, but they are XOR'ed with
+# 255 (hex FF)!  The DL format is really bad.
+#
+#0	byte	1	DL version 1, medium format (160x100, 4 images/screen)
+#!:mime	video/x-unknown
+#>42	byte	x	- %d screens,
+#>43	byte	x	%d commands
+#0	byte	2	DL version 2
+#!:mime	video/x-unknown
+#>1	byte	1	- large format (320x200,1 image/screen),
+#>1	byte	2	- medium format (160x100,4 images/screen),
+#>1	byte	>2	- unknown format,
+#>42	byte	x	%d screens,
+#>43	byte	x	%d commands
+# Based on empirical evidence, DL version 3 have several nulls following the
+# \003.  Most of them start with non-null values at hex offset 0x34 or so.
+#0	string	\3\0\0\0\0\0\0\0\0\0\0\0	DL version 3
+
+# iso 13818 transport stream
+#
+# from Oskar Schirmer <schirmer at scara.com> Feb 3, 2001 (ISO 13818.1)
+# (the following is a little bit restrictive and works fine for a stream
+#  that starts with PAT properly. it won't work for stream data, that is
+#  cut from an input device data right in the middle, but this shouldn't
+#  disturb)
+# syncbyte      8 bit	0x47
+# error_ind     1 bit	-
+# payload_start 1 bit	1
+# priority      1 bit	-
+# PID          13 bit	0x0000
+# scrambling    2 bit	-
+# adaptfld_ctrl 2 bit	1 or 3
+# conti_count   4 bit	0
+0	belong&0xFF5FFF1F	0x47400010	MPEG transport stream data
+>188	byte			!0x47		CORRUPTED
+
+# DIF digital video file format <mpruett at sgi.com>
+0	belong&0xffffff00	0x1f070000      DIF
+>4	byte			&0x01		(DVCPRO) movie file
+>4	byte			^0x01		(DV) movie file
+>3	byte			&0x80		(PAL)
+>3	byte			^0x80		(NTSC)
+
+# Microsoft Advanced Streaming Format (ASF) <mpruett at sgi.com>
+0	belong			0x3026b275	Microsoft ASF
+!:mime  video/x-ms-asf
+
+# MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
+0	string			\x8aMNG		MNG video data,
+!:mime	video/x-mng
+>4	belong			!0x0d0a1a0a	CORRUPTED,
+>4	belong			0x0d0a1a0a
+>>16    belong	x				%ld x
+>>20    belong	x				%ld
+
+# JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
+0	string			\x8bJNG		JNG video data,
+!:mime	video/x-jng
+>4	belong			!0x0d0a1a0a	CORRUPTED,
+>4	belong			0x0d0a1a0a
+>>16    belong	x				%ld x
+>>20    belong	x				%ld
+
+# Vivo video (Wolfram Kleff)
+3	string		\x0D\x0AVersion:Vivo	Vivo video data
+
+# VRML (Virtual Reality Modelling Language)
+0       string/w        #VRML\ V1.0\ ascii	VRML 1 file
+!:mime	model/vrml
+0	string/w	#VRML\ V2.0\ utf8	ISO/IEC 14772 VRML 97 file
+!:mime	model/vrml
+
+# X3D (Extensible 3D) [http://www.web3d.org/specifications/x3d-3.0.dtd]
+# From Michel Briand <michelbriand at free.fr>
+0	string		\<?xml\ version="
+!:strength +1
+>20	search/1000/cw  \<!DOCTYPE\ X3D		X3D (Extensible 3D) model xml text
+!:mime model/x3d
+
+#---------------------------------------------------------------------------
+# HVQM4: compressed movie format designed by Hudson for Nintendo GameCube
+# From Mark Sheppard <msheppard at climax.co.uk>, 2002-10-03
+#
+0	string		HVQM4		%s
+>6	string		>\0		v%s
+>0	byte		x		GameCube movie,
+>0x34	ubeshort	x		%d x
+>0x36	ubeshort	x		%d,
+>0x26	ubeshort	x		%dµs,
+>0x42	ubeshort	0		no audio
+>0x42	ubeshort	>0		%dHz audio
+
+# From: "Stefan A. Haubenthal" <polluks at web.de>
+0	string		DVDVIDEO-VTS	Video title set,
+>0x21	byte		x		v%x
+0	string		DVDVIDEO-VMG	Video manager,
+>0x21	byte		x		v%x
+
+# From: Behan Webster <behanw at websterwood.com>
+# NuppelVideo used by Mythtv (*.nuv)
+# Note: there are two identical stanzas here differing only in the
+# initial string matched. It used to be done with a regex, but we're
+# trying to get rid of those.
+0	string		NuppelVideo	MythTV NuppelVideo
+>12	string		x		v%s
+>20	lelong		x		(%d
+>24	lelong		x		\bx%d),
+>36	string		P		\bprogressive,
+>36	string		I		\binterlaced,
+>40	ledouble	x		\baspect:%.2f,
+>48	ledouble	x		\bfps:%.2f
+0	string		MythTV		MythTV NuppelVideo
+>12	string		x		v%s
+>20	lelong		x		(%d
+>24	lelong		x		\bx%d),
+>36	string		P		\bprogressive,
+>36	string		I		\binterlaced,
+>40	ledouble	x		\baspect:%.2f,
+>48	ledouble	x		\bfps:%.2f
+
+#						MPEG file
+# MPEG sequences
+# FIXME: This section is from the old magic.mime file and needs integrating with the rest
+0       belong             0x000001BA
+>4      byte               &0x40
+!:mime	video/mp2p
+>4      byte               ^0x40
+!:mime	video/mpeg
+0       belong             0x000001BB
+!:mime	video/mpeg
+0       belong             0x000001B0
+!:mime	video/mp4v-es
+0       belong             0x000001B5
+!:mime	video/mp4v-es
+0       belong             0x000001B3
+!:mime	video/mpv
+0       belong&0xFF5FFF1F  0x47400010
+!:mime	video/mp2t
+0       belong             0x00000001
+>4      byte&0x1F	   0x07
+!:mime	video/h264
+
+# Type: Bink Video
+# URL:  http://wiki.multimedia.cx/index.php?title=3DBink_Container
+# From: <hoehle at users.sourceforge.net>  2008-07-18
+0	string		BIK	Bink Video
+>3	regex		=[a-z]	rev.%s
+#>4	ulelong		x	size %d
+>20	ulelong		x	\b, %d
+>24	ulelong		x	\bx%d
+>8	ulelong		x	\b, %d frames
+>32	ulelong		x	at rate %d/
+>28	ulelong		>1	\b%d
+>40	ulelong		=0	\b, no audio
+>40	ulelong		!0	\b, %d audio track
+>>40	ulelong		!1	\bs
+# follow properties of the first audio track only
+>>48	uleshort	x	%dHz
+>>51	byte&0x20	0	mono
+>>51	byte&0x20	!0	stereo
+#>>51	byte&0x10	0	FFT
+#>>51	byte&0x10	!0	DCT
+
+#------------------------------------------------------------------------------
+# $File: apl,v 1.6 2009/09/19 16:28:07 christos Exp $
+# apl:  file(1) magic for APL (see also "pdp" and "vax" for other APL
+#       workspaces)
+#
+0	long		0100554		APL workspace (Ken's original?)
+
+#------------------------------------------------------------------------------
+# $File: apple,v 1.23 2009/09/19 16:28:08 christos Exp $
+# apple:  file(1) magic for Apple file formats
+#
+0	search/1	FiLeStArTfIlEsTaRt	binscii (apple ][) text
+0	string		\x0aGL			Binary II (apple ][) data
+0	string		\x76\xff		Squeezed (apple ][) data
+0	string		NuFile			NuFile archive (apple ][) data
+0	string		N\xf5F\xe9l\xe5		NuFile archive (apple ][) data
+0	belong		0x00051600		AppleSingle encoded Macintosh file
+0	belong		0x00051607		AppleDouble encoded Macintosh file
+
+# Type: Apple Emulator 2IMG format
+# From: Radek Vokal <rvokal at redhat.com>
+0	string		2IMG	Apple ][ 2IMG Disk Image
+>4	string		XGS!	\b, XGS
+>4	string		CTKG	\b, Catakig
+>4	string		ShIm	\b, Sheppy's ImageMaker
+>4	string		WOOF	\b, Sweet 16
+>4	string		B2TR	\b, Bernie ][ the Rescue
+>4	string		!nfc	\b, ASIMOV2
+>4	string		x	\b, Unknown Format
+>0xc	byte		00	\b, DOS 3.3 sector order
+>>0x10	byte		00	\b, Volume 254
+>>0x10	byte&0x7f	x	\b, Volume %u
+>0xc	byte		01	\b, ProDOS sector order
+>>0x14	short		x	\b, %u Blocks
+>0xc	byte		02	\b, NIB data
+
+# magic for Newton PDA package formats
+# from Ruda Moura <ruda at helllabs.org>
+0	string	package0	Newton package, NOS 1.x,
+>12	belong	&0x80000000	AutoRemove,
+>12	belong	&0x40000000	CopyProtect,
+>12	belong	&0x10000000	NoCompression,
+>12	belong	&0x04000000	Relocation,
+>12	belong	&0x02000000	UseFasterCompression,
+>16	belong	x		version %d
+
+0	string	package1	Newton package, NOS 2.x,
+>12	belong	&0x80000000	AutoRemove,
+>12	belong	&0x40000000	CopyProtect,
+>12	belong	&0x10000000	NoCompression,
+>12	belong	&0x04000000	Relocation,
+>12	belong	&0x02000000	UseFasterCompression,
+>16	belong	x		version %d
+
+0	string	package4	Newton package,
+>8	byte	8		NOS 1.x,
+>8	byte	9		NOS 2.x,
+>12	belong	&0x80000000	AutoRemove,
+>12	belong	&0x40000000	CopyProtect,
+>12	belong	&0x10000000	NoCompression,
+
+# The following entries for the Apple II are for files that have
+# been transferred as raw binary data from an Apple, without having
+# been encapsulated by any of the above archivers.
+#
+# In general, Apple II formats are hard to identify because Apple DOS
+# and especially Apple ProDOS have strong typing in the file system and
+# therefore programmers never felt much need to include type information
+# in the files themselves.
+#
+# Eric Fischer <enf at pobox.com>
+
+# AppleWorks word processor:
+#
+# This matches the standard tab stops for an AppleWorks file, but if
+# a file has a tab stop set in the first four columns this will fail.
+#
+# The "O" is really the magic number, but that's so common that it's
+# necessary to check the tab stops that follow it to avoid false positives.
+
+4       string          O====   AppleWorks word processor data
+>85     byte&0x01       >0      \b, zoomed
+>90     byte&0x01       >0      \b, paginated
+>92     byte&0x01       >0      \b, with mail merge
+#>91    byte            x       \b, left margin %d
+
+# AppleWorks database:
+#
+# This isn't really a magic number, but it's the closest thing to one
+# that I could find.  The 1 and 2 really mean "order in which you defined
+# categories" and "left to right, top to bottom," respectively; the D and R
+# mean that the cursor should move either down or right when you press Return.
+
+#30	string		\x01D	AppleWorks database data
+#30	string		\x02D	AppleWorks database data
+#30	string		\x01R	AppleWorks database data
+#30	string		\x02R	AppleWorks database data
+
+# AppleWorks spreadsheet:
+#
+# Likewise, this isn't really meant as a magic number.  The R or C means
+# row- or column-order recalculation; the A or M means automatic or manual
+# recalculation.
+
+#131	string		RA	AppleWorks spreadsheet data
+#131	string		RM	AppleWorks spreadsheet data
+#131	string		CA	AppleWorks spreadsheet data
+#131	string		CM	AppleWorks spreadsheet data
+
+# Applesoft BASIC:
+#
+# This is incredibly sloppy, but will be true if the program was
+# written at its usual memory location of 2048 and its first line
+# number is less than 256.  Yuck.
+
+0       belong&0xff00ff 0x80000 Applesoft BASIC program data
+#>2     leshort         x       \b, first line number %d
+
+# ORCA/EZ assembler:
+# 
+# This will not identify ORCA/M source files, since those have
+# some sort of date code instead of the two zero bytes at 6 and 7
+# XXX Conflicts with ELF
+#4       belong&0xff00ffff       0x01000000      ORCA/EZ assembler source data
+#>5      byte                    x               \b, build number %d
+
+# Broderbund Fantavision
+#
+# I don't know what these values really mean, but they seem to recur.
+# Will they cause too many conflicts?
+
+# Probably :-)
+#2	belong&0xFF00FF		0x040008	Fantavision movie data
+
+# Some attempts at images.
+#
+# These are actually just bit-for-bit dumps of the frame buffer, so
+# there's really no reasonably way to distinguish them except for their
+# address (if preserved) -- 8192 or 16384 -- and their length -- 8192
+# or, occasionally, 8184.
+#
+# Nevertheless this will manage to catch a lot of images that happen
+# to have a solid-colored line at the bottom of the screen.
+
+# GRR: Magic too weak
+#8144	string	\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F	Apple II image with white background
+#8144	string	\x55\x2A\x55\x2A\x55\x2A\x55\x2A	Apple II image with purple background
+#8144	string	\x2A\x55\x2A\x55\x2A\x55\x2A\x55	Apple II image with green background
+#8144	string	\xD5\xAA\xD5\xAA\xD5\xAA\xD5\xAA	Apple II image with blue background
+#8144	string	\xAA\xD5\xAA\xD5\xAA\xD5\xAA\xD5	Apple II image with orange background
+
+# Beagle Bros. Apple Mechanic fonts
+
+0	belong&0xFF00FFFF	0x6400D000	Apple Mechanic font
+
+# Apple Universal Disk Image Format (UDIF) - dmg files.
+# From Johan Gade.
+# These entries are disabled for now until we fix the following issues.
+#
+# Note there might be some problems with the "VAX COFF executable" 
+# entry. Note this entry should be placed before the mac filesystem section, 
+# particularly the "Apple Partition data" entry.
+#
+# The intended meaning of these tests is, that the file is only of the 
+# specified type if both of the lines are correct - i.e. if the first
+# line matches and the second doesn't then it is not of that type.
+#
+#0	long	0x7801730d
+#>4	long	0x62626060	UDIF read-only zlib-compressed image (UDZO)
+#
+# Note that this entry is recognized correctly by the "Apple Partition 
+# data" entry - however since this entry is more specific - this
+# information seems to be more useful.
+#0	long	0x45520200
+#>0x410	string	disk\ image	UDIF read/write image (UDRW)
+
+# From: Toby Peterson <toby at apple.com>
+0	string	bplist00	Apple binary property list
+
+# Apple binary property list (bplist)
+#  Assumes version bytes are hex.
+#  Provides content hints for version 0 files. Assumes that the root
+#  object is the first object (true for CoreFoundation implementation).
+# From: David Remahl <dremahl at apple.com>
+0		string	bplist
+>6		byte	x	\bCoreFoundation binary property list data, version 0x%c
+>>7		byte	x	\b%c
+>6		string		00		\b
+>>8		byte&0xF0	0x00	\b
+>>>8	byte&0x0F	0x00	\b, root type: null
+>>>8	byte&0x0F	0x08	\b, root type: false boolean
+>>>8	byte&0x0F	0x09	\b, root type: true boolean
+>>8		byte&0xF0	0x10	\b, root type: integer
+>>8		byte&0xF0	0x20	\b, root type: real
+>>8		byte&0xF0	0x30	\b, root type: date
+>>8		byte&0xF0	0x40    \b, root type: data
+>>8		byte&0xF0	0x50	\b, root type: ascii string
+>>8		byte&0xF0	0x60	\b, root type: unicode string
+>>8		byte&0xF0	0x80	\b, root type: uid (CORRUPT)
+>>8		byte&0xF0	0xa0	\b, root type: array
+>>8		byte&0xF0	0xd0	\b, root type: dictionary
+
+# Apple/NeXT typedstream data
+#  Serialization format used by NeXT and Apple for various
+#  purposes in YellowStep/Cocoa, including some nib files.
+# From: David Remahl <dremahl at apple.com>
+2		string		typedstream	NeXT/Apple typedstream data, big endian
+>0		byte		x		\b, version %hhd
+>0		byte		<5		\b
+>>13	byte		0x81	\b
+>>>14	ubeshort	x		\b, system %hd
+2		string		streamtyped NeXT/Apple typedstream data, little endian
+>0		byte		x		\b, version %hhd
+>0		byte		<5		\b
+>>13	byte		0x81	\b
+>>>14	uleshort	x		\b, system %hd
+
+#------------------------------------------------------------------------------
+# CAF: Apple CoreAudio File Format
+#
+# Container format for high-end audio purposes.
+# From: David Remahl <dremahl at apple.com>
+#
+0	string		caff		CoreAudio Format audio file
+>4	beshort		<10		version %d
+>6	beshort		x
+
+
+#------------------------------------------------------------------------------
+# Keychain database files
+0	string		kych		Mac OS X Keychain File
+
+#------------------------------------------------------------------------------
+# Code Signing related file types
+0	belong		0xfade0c00	Mac OS X Code Requirement
+>8	belong		1			(opExpr)
+>4	belong		x			- %d bytes
+
+0	belong		0xfade0c01	Mac OS X Code Requirement Set
+>8	belong		>1			containing %d items
+>4	belong		x			- %d bytes
+
+0	belong		0xfade0c02	Mac OS X Code Directory
+>8	belong		x			version %x
+>12	belong		>0			flags 0x%x
+>4	belong		x			- %d bytes
+
+0	belong		0xfade0cc0	Mac OS X Detached Code Signature (non-executable)
+>4	belong		x			- %d bytes
+
+0	belong		0xfade0cc1	Mac OS X Detached Code Signature
+>8	belong		>1			(%d elements)
+>4	belong		x			- %d bytes
+
+# From: "Nelson A. de Oliveira" <naoliv at gmail.com>
+# .vdi
+4	string innotek\ VirtualBox\ Disk\ Image %s
+
+#------------------------------------------------------------------------------
+# $File: applix,v 1.5 2009/09/19 16:28:08 christos Exp $
+# applix:  file(1) magic for Applixware
+# From: Peter Soos <sp at osb.hu>
+#
+0	string		*BEGIN		Applixware
+>7	string		WORDS			Words Document
+>7	string		GRAPHICS		Graphic
+>7	string		RASTER			Bitmap
+>7	string		SPREADSHEETS		Spreadsheet
+>7	string		MACRO			Macro
+>7	string		BUILDER			Builder Object
+
+#------------------------------------------------------------------------------
+# $File: archive,v 1.55 2009/12/04 15:00:47 christos Exp $
+# archive:  file(1) magic for archive formats (see also "msdos" for self-
+#           extracting compressed archives)
+#
+# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc.
+# pre-POSIX "tar" archives are handled in the C code.
+
+# POSIX tar archives
+257	string		ustar\0		POSIX tar archive
+!:mime	application/x-tar # encoding: posix
+257	string		ustar\040\040\0	GNU tar archive
+!:mime	application/x-tar # encoding: gnu
+
+# cpio archives
+#
+# Yes, the top two "cpio archive" formats *are* supposed to just be "short".
+# The idea is to indicate archives produced on machines with the same
+# byte order as the machine running "file" with "cpio archive", and
+# to indicate archives produced on machines with the opposite byte order
+# from the machine running "file" with "byte-swapped cpio archive".
+#
+# The SVR4 "cpio(4)" hints that there are additional formats, but they
+# are defined as "short"s; I think all the new formats are
+# character-header formats and thus are strings, not numbers.
+0	short		070707		cpio archive
+!:mime	application/x-cpio
+0	short		0143561		byte-swapped cpio archive
+!:mime	application/x-cpio # encoding: swapped
+0	string		070707		ASCII cpio archive (pre-SVR4 or odc)
+0	string		070701		ASCII cpio archive (SVR4 with no CRC)
+0	string		070702		ASCII cpio archive (SVR4 with CRC)
+
+# Debian package (needs to go before regular portable archives)
+#
+0	string		=!<arch>\ndebian
+!:mime	application/x-debian-package
+>8	string		debian-split	part of multipart Debian package
+>8	string		debian-binary	Debian binary package
+>8	string		!debian
+>68	string		>\0		(format %s)
+# These next two lines do not work, because a bzip2 Debian archive
+# still uses gzip for the control.tar (first in the archive).  Only
+# data.tar varies, and the location of its filename varies too.
+# file/libmagic does not current have support for ascii-string based
+# (offsets) as of 2005-09-15.
+#>81	string		bz2		\b, uses bzip2 compression
+#>84	string		gz		\b, uses gzip compression
+#>136	ledate		x		created: %s
+
+# other archives
+0	long		0177555		very old archive
+0	short		0177555		very old PDP-11 archive
+0	long		0177545		old archive
+0	short		0177545		old PDP-11 archive
+0	long		0100554		apl workspace
+0	string		=<ar>		archive
+!:mime	application/x-archive
+
+# MIPS archive (needs to go before regular portable archives)
+#
+0	string	=!<arch>\n__________E	MIPS archive
+>20	string	U			with MIPS Ucode members
+>21	string	L			with MIPSEL members
+>21	string	B			with MIPSEB members
+>19	string	L			and an EL hash table
+>19	string	B			and an EB hash table
+>22	string	X			-- out of date
+
+0	search/1	-h-		Software Tools format archive text
+
+#
+# XXX - why are there multiple <ar> thingies?  Note that 0x213c6172 is
+# "!<ar", so, for new-style (4.xBSD/SVR2andup) archives, we have:
+#
+# 0	string		=!<arch>		current ar archive
+# 0	long		0x213c6172	archive file
+#
+# and for SVR1 archives, we have:
+#
+# 0	string		\<ar>		System V Release 1 ar archive
+# 0	string		=<ar>		archive
+#
+# XXX - did Aegis really store shared libraries, breakpointed modules,
+# and absolute code program modules in the same format as new-style
+# "ar" archives?
+#
+0	string		=!<arch>		current ar archive
+!:mime	application/x-archive
+>8	string		__.SYMDEF	random library
+>0	belong		=65538		- pre SR9.5
+>0	belong		=65539		- post SR9.5
+>0	beshort		2		- object archive
+>0	beshort		3		- shared library module
+>0	beshort		4		- debug break-pointed module
+>0	beshort		5		- absolute code program module
+0	string		\<ar>		System V Release 1 ar archive
+0	string		=<ar>		archive
+#
+# XXX - from "vax", which appears to collect a bunch of byte-swapped
+# thingies, to help you recognize VAX files on big-endian machines;
+# with "leshort", "lelong", and "string", that's no longer necessary....
+#
+0	belong		0x65ff0000	VAX 3.0 archive
+0	belong		0x3c61723e	VAX 5.0 archive
+#
+0	long		0x213c6172	archive file
+0	lelong		0177555		very old VAX archive
+0	leshort		0177555		very old PDP-11 archive
+#
+# XXX - "pdp" claims that 0177545 can have an __.SYMDEF member and thus
+# be a random library (it said 0xff65 rather than 0177545).
+#
+0	lelong		0177545		old VAX archive
+>8	string		__.SYMDEF	random library
+0	leshort		0177545		old PDP-11 archive
+>8	string		__.SYMDEF	random library
+#
+# From "pdp" (but why a 4-byte quantity?)
+#
+0	lelong		0x39bed		PDP-11 old archive
+0	lelong		0x39bee		PDP-11 4.0 archive
+
+# ARC archiver, from Daniel Quinlan (quinlan at yggdrasil.com)
+#
+# The first byte is the magic (0x1a), byte 2 is the compression type for
+# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS
+# filename of the first file (null terminated).  Since some types collide
+# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%),
+# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%).  0x01 collides with terminfo.
+0	lelong&0x8080ffff	0x0000081a	ARC archive data, dynamic LZW
+!:mime	application/x-arc
+0	lelong&0x8080ffff	0x0000091a	ARC archive data, squashed
+!:mime	application/x-arc
+0	lelong&0x8080ffff	0x0000021a	ARC archive data, uncompressed
+!:mime	application/x-arc
+0	lelong&0x8080ffff	0x0000031a	ARC archive data, packed
+!:mime	application/x-arc
+0	lelong&0x8080ffff	0x0000041a	ARC archive data, squeezed
+!:mime	application/x-arc
+0	lelong&0x8080ffff	0x0000061a	ARC archive data, crunched
+!:mime	application/x-arc
+# [JW] stuff taken from idarc, obviously ARC successors:
+0	lelong&0x8080ffff	0x00000a1a	PAK archive data
+!:mime	application/x-arc
+0	lelong&0x8080ffff	0x0000141a	ARC+ archive data
+!:mime	application/x-arc
+0	lelong&0x8080ffff	0x0000481a	HYP archive data
+!:mime	application/x-arc
+
+# Acorn archive formats (Disaster prone simpleton, m91dps at ecs.ox.ac.uk)
+# I can't create either SPARK or ArcFS archives so I have not tested this stuff
+# [GRR:  the original entries collide with ARC, above; replaced with combined
+#  version (not tested)]
+#0	byte		0x1a		RISC OS archive (spark format)
+0	string		\032archive	RISC OS archive (ArcFS format)
+0       string          Archive\000     RISC OS archive (ArcFS format)
+
+# All these were taken from idarc, many could not be verified. Unfortunately,
+# there were many low-quality sigs, i.e. easy to trigger false positives.
+# Please notify me of any real-world fishy/ambiguous signatures and I'll try
+# to get my hands on the actual archiver and see if I find something better. [JW]
+# probably many can be enhanced by finding some 0-byte or control char near the start
+
+# idarc calls this Crush/Uncompressed... *shrug*
+0	string	CRUSH Crush archive data
+# Squeeze It (.sqz)
+0	string	HLSQZ Squeeze It archive data
+# SQWEZ
+0	string	SQWEZ SQWEZ archive data
+# HPack (.hpk)
+0	string	HPAK HPack archive data
+# HAP
+0	string	\x91\x33HF HAP archive data
+# MD/MDCD
+0	string	MDmd MDCD archive data
+# LIM
+0	string	LIM\x1a LIM archive data
+# SAR
+3	string	LH5 SAR archive data
+# BSArc/BS2
+0	string	\212\3SB \0 BSArc/BS2 archive data
+# MAR
+2	string	=-ah MAR archive data
+# ACB
+0	belong&0x00f800ff	0x00800000 ACB archive data
+# CPZ
+# TODO, this is what idarc says: 0	string	\0\0\0 CPZ archive data
+# JRC
+0	string	JRchive JRC archive data
+# Quantum
+0	string	DS\0 Quantum archive data
+# ReSOF
+0	string	PK\3\6 ReSOF archive data
+# QuArk
+0	string	7\4 QuArk archive data
+# YAC
+14	string	YC YAC archive data
+# X1
+0	string	X1 X1 archive data
+0	string	XhDr X1 archive data
+# CDC Codec (.dqt)
+0	belong&0xffffe000	0x76ff2000 CDC Codec archive data
+# AMGC
+0	string	\xad6" AMGC archive data
+# NuLIB
+0	string	NõFélå NuLIB archive data
+# PakLeo
+0	string	LEOLZW PAKLeo archive data
+# ChArc
+0	string	SChF ChArc archive data
+# PSA
+0	string	PSA PSA archive data
+# CrossePAC
+0	string	DSIGDCC CrossePAC archive data
+# Freeze
+0	string	\x1f\x9f\x4a\x10\x0a Freeze archive data
+# KBoom
+0	string	¨MP¨ KBoom archive data
+# NSQ, must go after CDC Codec
+0	string	\x76\xff NSQ archive data
+# DPA
+0	string	Dirk\ Paehl DPA archive data
+# BA
+# TODO: idarc says "bytes 0-2 == bytes 3-5"
+# TTComp
+0	string	\0\6 TTComp archive data
+# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation?
+0	string	ESP ESP archive data
+# ZPack
+0	string	\1ZPK\1 ZPack archive data
+# Sky
+0	string	\xbc\x40 Sky archive data
+# UFA
+0	string	UFA UFA archive data
+# Dry
+0	string	=-H2O DRY archive data
+# FoxSQZ
+0	string	FOXSQZ FoxSQZ archive data
+# AR7
+0	string	,AR7 AR7 archive data
+# PPMZ
+0	string	PPMZ PPMZ archive data
+# MS Compress
+4	string	\x88\xf0\x27 MS Compress archive data
+# updated by Joerg Jenderek
+>9	string	\0		
+>>0	string	KWAJ		
+>>>7	string	\321\003	MS Compress archive data
+>>>>14	ulong	>0		\b, original size: %ld bytes
+>>>>18		ubyte	>0x65  	
+>>>>>18		string	x    	\b, was %.8s
+>>>>>(10.b-4)	string	x    	\b.%.3s
+# MP3 (archiver, not lossy audio compression)
+0	string	MP3\x1a MP3-Archiver archive data
+# ZET
+0	string	OZÝ ZET archive data
+# TSComp
+0	string	\x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data
+# ARQ
+0	string	gW\4\1 ARQ archive data
+# Squash
+3	string	OctSqu Squash archive data
+# Terse
+0	string	\5\1\1\0 Terse archive data
+# PUCrunch
+0	string	\x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data
+# UHarc
+0	string	UHA UHarc archive data
+# ABComp
+0	string	\2AB ABComp archive data
+0	string	\3AB2 ABComp archive data
+# CMP
+0	string	CO\0 CMP archive data
+# Splint
+0	string	\x93\xb9\x06 Splint archive data
+# InstallShield
+0	string	 \x13\x5d\x65\x8c InstallShield Z archive Data
+# Gather
+1	string	GTH Gather archive data
+# BOA
+0	string	BOA BOA archive data
+# RAX
+0	string	ULEB\xa RAX archive data
+# Xtreme
+0	string	ULEB\0 Xtreme archive data
+# Pack Magic
+0	string	@â\1\0 Pack Magic archive data
+# BTS
+0	belong&0xfeffffff	0x1a034465 BTS archive data
+# ELI 5750
+0	string	Ora\  ELI 5750 archive data
+# QFC
+0	string	\x1aFC\x1a QFC archive data
+0	string	\x1aQF\x1a QFC archive data
+# PRO-PACK
+0	string	RNC PRO-PACK archive data
+# 777
+0	string	777 777 archive data
+# LZS221
+0	string	sTaC LZS221 archive data
+# HPA
+0	string	HPA HPA archive data
+# Arhangel
+0	string	LG Arhangel archive data
+# EXP1, uses bzip2
+0	string	0123456789012345BZh EXP1 archive data
+# IMP
+0	string	IMP\xa IMP archive data
+# NRV
+0	string	\x00\x9E\x6E\x72\x76\xFF NRV archive data
+# Squish
+0	string	\x73\xb2\x90\xf4 Squish archive data
+# Par
+0	string	PHILIPP Par archive data
+0	string	PAR Par archive data
+# HIT
+0	string	UB HIT archive data
+# SBX
+0	belong&0xfffff000	0x53423000 SBX archive data
+# NaShrink
+0	string	NSK NaShrink archive data
+# SAPCAR
+0	string	#\ CAR\ archive\ header SAPCAR archive data
+0	string	CAR\ 2.00RG SAPCAR archive data
+# Disintegrator
+0	string	DST Disintegrator archive data
+# ASD
+0	string	ASD ASD archive data
+# InstallShield CAB
+0	string	ISc( InstallShield CAB
+# TOP4
+0	string	T4\x1a TOP4 archive data
+# BatComp left out: sig looks like COM executable
+# so TODO: get real 4dos batcomp file and find sig
+# BlakHole
+0	string	BH\5\7 BlakHole archive data
+# BIX
+0	string	BIX0 BIX archive data
+# ChiefLZA
+0	string	ChfLZ ChiefLZA archive data
+# Blink
+0	string	Blink Blink archive data
+# Logitech Compress
+0	string	\xda\xfa Logitech Compress archive data
+# ARS-Sfx (FIXME: really a SFX? then goto COM/EXE)
+1	string	(C)\ STEPANYUK ARS-Sfx archive data
+# AKT/AKT32
+0	string	AKT32 AKT32 archive data
+0	string	AKT AKT archive data
+# NPack
+0	string	MSTSM NPack archive data
+# PFT
+0	string	\0\x50\0\x14 PFT archive data
+# SemOne
+0	string	SEM SemOne archive data
+# PPMD
+0	string	\x8f\xaf\xac\x84 PPMD archive data
+# FIZ
+0	string	FIZ FIZ archive data
+# MSXiE
+0	belong&0xfffff0f0	0x4d530000 MSXiE archive data
+# DeepFreezer
+0	belong&0xfffffff0	0x797a3030 DeepFreezer archive data
+# DC
+0	string	=<DC- DC archive data
+# TPac
+0	string	\4TPAC\3 TPac archive data
+# Ai
+0	string	Ai\1\1\0 Ai archive data
+0	string	Ai\1\0\0 Ai archive data
+# Ai32
+0	string	Ai\2\0 Ai32 archive data
+0	string	Ai\2\1 Ai32 archive data
+# SBC
+0	string	SBC SBC archive data
+# Ybs
+0	string	YBS Ybs archive data
+# DitPack
+0	string	\x9e\0\0 DitPack archive data
+# DMS
+0	string	DMS! DMS archive data
+# EPC
+0	string	\x8f\xaf\xac\x8c EPC archive data
+# VSARC
+0	string	VS\x1a VSARC archive data
+# PDZ
+0	string	PDZ PDZ archive data
+# ReDuq
+0	string	rdqx ReDuq archive data
+# GCA
+0	string	GCAX GCA archive data
+# PPMN
+0	string	pN PPMN archive data
+# WinImage
+3	string	WINIMAGE WinImage archive data
+# Compressia
+0	string	CMP0CMP Compressia archive data
+# UHBC
+0	string	UHB UHBC archive data
+# WinHKI
+0	string	\x61\x5C\x04\x05 WinHKI archive data
+# WWPack data file
+0	string	WWP WWPack archive data
+# BSN (BSA, PTS-DOS)
+0	string	\xffBSG BSN archive data
+1	string	\xffBSG BSN archive data
+3	string	\xffBSG BSN archive data
+1	string	\0\xae\2 BSN archive data
+1	string	\0\xae\3 BSN archive data
+1	string	\0\xae\7 BSN archive data
+# AIN
+0	string	\x33\x18 AIN archive data
+0	string	\x33\x17 AIN archive data
+# XPA32
+0	string	xpa\0\1 XPA32 archive data
+# SZip (TODO: doesn't catch all versions)
+0	string	SZ\x0a\4 SZip archive data
+# XPack DiskImage
+0	string	jm XPack DiskImage archive data
+# XPack Data
+0	string	xpa XPack archive data
+# XPack Single Data
+0	string	Í\ jm XPack single archive data
+
+# TODO: missing due to unknown magic/magic at end of file:
+#DWC
+#ARG
+#ZAR
+#PC/3270
+#InstallIt
+#RKive
+#RK
+#XPack Diskimage
+
+# These were inspired by idarc, but actually verified
+# Dzip archiver (.dz)
+0	string	DZ Dzip archive data
+>2	byte	x \b, version %i
+>3	byte	x \b.%i
+# ZZip archiver (.zz)
+0	string	ZZ\ \0\0 ZZip archive data
+0	string	ZZ0 ZZip archive data
+# PAQ archiver (.paq)
+0	string	\xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data
+0	string	PAQ PAQ archive data
+>3	byte&0xf0	0x30
+>>3	byte	x (v%c)
+# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP)
+0xe	string	\x1aJar\x1b JAR (ARJ Software, Inc.) archive data
+0	string	JARCS JAR (ARJ Software, Inc.) archive data
+
+# ARJ archiver (jason at jarthur.Claremont.EDU)
+0	leshort		0xea60		ARJ archive data
+!:mime	application/x-arj
+>5	byte		x		\b, v%d,
+>8	byte		&0x04		multi-volume,
+>8	byte		&0x10		slash-switched,
+>8	byte		&0x20		backup,
+>34	string		x		original name: %s,
+>7	byte		0		os: MS-DOS
+>7	byte		1		os: PRIMOS
+>7	byte		2		os: Unix
+>7	byte		3		os: Amiga
+>7	byte		4		os: Macintosh
+>7	byte		5		os: OS/2
+>7	byte		6		os: Apple ][ GS
+>7	byte		7		os: Atari ST
+>7	byte		8		os: NeXT
+>7	byte		9		os: VAX/VMS
+>3	byte		>0		%d]
+# [JW] idarc says this is also possible
+2	leshort		0xea60		ARJ archive data
+
+# HA archiver (Greg Roelofs, newt at uchicago.edu)
+# This is a really bad format. A file containing HAWAII will match this...
+#0	string		HA		HA archive data,
+#>2	leshort		=1		1 file,
+#>2	leshort		>1		%u files,
+#>4	byte&0x0f	=0		first is type CPY
+#>4	byte&0x0f	=1		first is type ASC
+#>4	byte&0x0f	=2		first is type HSC
+#>4	byte&0x0f	=0x0e		first is type DIR
+#>4	byte&0x0f	=0x0f		first is type SPECIAL
+# suggestion: at least identify small archives (<1024 files)
+0  belong&0xffff00fc 0x48410000 HA archive data
+>2	leshort		=1		1 file,
+>2	leshort		>1		%u files,
+>4	byte&0x0f	=0		first is type CPY
+>4	byte&0x0f	=1		first is type ASC
+>4	byte&0x0f	=2		first is type HSC
+>4	byte&0x0f	=0x0e		first is type DIR
+>4	byte&0x0f	=0x0f		first is type SPECIAL
+
+# HPACK archiver (Peter Gutmann, pgut1 at cs.aukuni.ac.nz)
+0	string		HPAK		HPACK archive data
+
+# JAM Archive volume format, by Dmitry.Kohmanyuk at UA.net
+0	string		\351,\001JAM\ 		JAM archive,
+>7	string		>\0			version %.4s
+>0x26	byte		=0x27			-
+>>0x2b	string          >\0			label %.11s,
+>>0x27	lelong		x			serial %08x,
+>>0x36	string		>\0			fstype %.8s
+
+# LHARC/LHA archiver (Greg Roelofs, newt at uchicago.edu)
+2	string		-lh0-		LHarc 1.x/ARX archive data [lh0]
+!:mime	application/x-lharc
+2	string		-lh1-		LHarc 1.x/ARX archive data [lh1]
+!:mime	application/x-lharc
+2	string		-lz4-		LHarc 1.x archive data [lz4]
+!:mime	application/x-lharc
+2	string		-lz5-		LHarc 1.x archive data [lz5]
+!:mime	application/x-lharc
+#	[never seen any but the last; -lh4- reported in comp.compression:]
+2	string		-lzs-		LHa/LZS archive data [lzs]
+!:mime	application/x-lha
+2	string		-lh\40-		LHa 2.x? archive data [lh ]
+!:mime	application/x-lha
+2	string		-lhd-		LHa 2.x? archive data [lhd]
+!:mime	application/x-lha
+2	string		-lh2-		LHa 2.x? archive data [lh2]
+!:mime	application/x-lha
+2	string		-lh3-		LHa 2.x? archive data [lh3]
+!:mime	application/x-lha
+2	string		-lh4-		LHa (2.x) archive data [lh4]
+!:mime	application/x-lha
+2	string		-lh5-		LHa (2.x) archive data [lh5]
+!:mime	application/x-lha
+2	string		-lh6-		LHa (2.x) archive data [lh6]
+!:mime	application/x-lha
+2	string		-lh7-		LHa (2.x)/LHark archive data [lh7]
+!:mime	application/x-lha
+>20	byte		x		- header level %d
+# taken from idarc [JW]
+2   string      -lZ         PUT archive data
+2   string      -lz         LZS archive data 
+2   string      -sw1-       Swag archive data
+
+# RAR archiver (Greg Roelofs, newt at uchicago.edu)
+0	string		Rar!		RAR archive data,
+!:mime	application/x-rar
+>44	byte		x		v%0x,
+>10	byte		>0		flags:
+>>10	byte		&0x01		Archive volume,
+>>10	byte		&0x02		Commented,
+>>10	byte		&0x04		Locked,
+>>10	byte		&0x08		Solid,
+>>10	byte		&0x20		Authenticated,
+>35	byte		0		os: MS-DOS
+>35	byte		1		os: OS/2
+>35	byte		2		os: Win32
+>35	byte		3		os: Unix
+# some old version? idarc says:
+0   string      RE\x7e\x5e  RAR archive data
+
+# SQUISH archiver (Greg Roelofs, newt at uchicago.edu)
+0	string		SQSH		squished archive data (Acorn RISCOS)
+
+# UC2 archiver (Greg Roelofs, newt at uchicago.edu)
+# [JW] see exe section for self-extracting version
+0	string		UC2\x1a		UC2 archive data
+
+# PKZIP multi-volume archive
+0	string		PK\x07\x08PK\x03\x04	Zip multi-volume archive data, at least PKZIP v2.50 to extract
+!:mime	application/zip
+
+# ZIP archives (Greg Roelofs, c/o zip-bugs at wkuvx1.wku.edu)
+0	string		PK\003\004
+>30	ubelong		!0x6d696d65
+>>4	byte		0x00		Zip archive data
+!:mime	application/zip
+>>4	byte		0x09		Zip archive data, at least v0.9 to extract
+!:mime	application/zip
+>>4	byte		0x0a		Zip archive data, at least v1.0 to extract
+!:mime	application/zip
+>>4	byte		0x0b		Zip archive data, at least v1.1 to extract
+!:mime	application/zip
+>>0x161	string		WINZIP          Zip archive data, WinZIP self-extracting
+!:mime	application/zip
+>>4	byte		0x14		Zip archive data, at least v2.0 to extract
+!:mime	application/zip
+>>4     byte            0x2d            Zip64 archive data, at least v3.0 to extract
+!:mime  application/zip
+
+# OpenOffice.org / KOffice / StarOffice documents
+# Listed here because they ARE zip files
+#
+# From: Abel Cheung <abel at oaka.org>
+>30	string		mimetype
+
+# KOffice (1.2 or above) formats
+>>50	string	vnd.kde.		KOffice (>=1.2)
+>>>58	string	karbon			Karbon document
+>>>58	string	kchart			KChart document
+>>>58	string	kformula		KFormula document
+>>>58	string	kivio			Kivio document
+>>>58	string	kontour			Kontour document
+>>>58	string	kpresenter		KPresenter document
+>>>58	string	kspread			KSpread document
+>>>58	string	kword			KWord document
+
+# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7)
+>>50	string	vnd.sun.xml.		OpenOffice.org 1.x
+>>>62	string	writer			Writer
+>>>>68	byte	!0x2e			document
+>>>>68	string	.template		template
+>>>>68	string	.global			global document
+>>>62	string	calc			Calc
+>>>>66	byte	!0x2e			spreadsheet
+>>>>66	string	.template		template
+>>>62	string	draw			Draw
+>>>>66	byte	!0x2e			document
+>>>>66	string	.template		template
+>>>62	string	impress			Impress
+>>>>69	byte	!0x2e			presentation
+>>>>69	string	.template		template
+>>>62	string	math			Math document
+>>>62	string	base			Database file
+
+# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8)
+# http://lists.oasis-open.org/archives/office/200505/msg00006.html
+>>50	string	vnd.oasis.opendocument.	OpenDocument
+>>>73	string	text
+>>>>77	byte	!0x2d			Text
+!:mime	application/vnd.oasis.opendocument.text
+>>>>77	string	-template		Text Template
+!:mime	application/vnd.oasis.opendocument.text-template
+>>>>77	string	-web			HTML Document Template
+!:mime	application/vnd.oasis.opendocument.text-web
+>>>>77	string	-master			Master Document
+!:mime	application/vnd.oasis.opendocument.text-master
+>>>73	string	graphics
+>>>>81	byte	!0x2d			Drawing
+!:mime	application/vnd.oasis.opendocument.graphics
+>>>>81	string	-template		Template
+!:mime	application/vnd.oasis.opendocument.graphics-template
+>>>73	string	presentation
+>>>>85	byte	!0x2d			Presentation
+!:mime	application/vnd.oasis.opendocument.presentation
+>>>>85	string	-template		Template
+!:mime	application/vnd.oasis.opendocument.presentation-template
+>>>73	string	spreadsheet
+>>>>84	byte	!0x2d			Spreadsheet
+!:mime	application/vnd.oasis.opendocument.spreadsheet
+>>>>84	string	-template		Template
+!:mime	application/vnd.oasis.opendocument.spreadsheet-template
+>>>73	string	chart
+>>>>78	byte	!0x2d			Chart
+!:mime	application/vnd.oasis.opendocument.chart
+>>>>78	string	-template		Template
+!:mime	application/vnd.oasis.opendocument.chart-template
+>>>73	string	formula
+>>>>80	byte	!0x2d			Formula
+!:mime	application/vnd.oasis.opendocument.formula
+>>>>80	string	-template		Template
+!:mime	application/vnd.oasis.opendocument.formula-template
+>>>73	string	database		Database
+!:mime	application/vnd.oasis.opendocument.database
+>>>73	string	image
+>>>>78	byte	!0x2d			Image
+!:mime	application/vnd.oasis.opendocument.image
+>>>>78	string	-template		Template
+!:mime	application/vnd.oasis.opendocument.image-template
+
+# Zoo archiver
+20	lelong		0xfdc4a7dc	Zoo archive data
+!:mime	application/x-zoo
+>4	byte		>48		\b, v%c.
+>>6	byte		>47		\b%c
+>>>7	byte		>47		\b%c
+>32	byte		>0		\b, modify: v%d
+>>33	byte		x		\b.%d+
+>42	lelong		0xfdc4a7dc	\b,
+>>70	byte		>0		extract: v%d
+>>>71	byte		x		\b.%d+
+
+# Shell archives
+10	string		#\ This\ is\ a\ shell\ archive	shell archive text
+!:mime	application/octet-stream
+
+#
+# LBR. NB: May conflict with the questionable 
+#          "binary Computer Graphics Metafile" format.
+#
+0       string  \0\ \ \ \ \ \ \ \ \ \ \ \0\0    LBR archive data
+#
+# PMA (CP/M derivative of LHA)
+#
+2       string          -pm0-           PMarc archive data [pm0]
+2       string          -pm1-           PMarc archive data [pm1]
+2       string          -pm2-           PMarc archive data [pm2]
+2       string          -pms-           PMarc SFX archive (CP/M, DOS)
+5       string          -pc1-           PopCom compressed executable (CP/M)
+
+# From Rafael Laboissiere <rafael at laboissiere.net>
+# The Project Revision Control System (see
+# http://prcs.sourceforge.net) generates a packaged project
+# file which is recognized by the following entry: 
+0	leshort		0xeb81	PRCS packaged project
+
+# Microsoft cabinets 
+# by David Necas (Yeti) <yeti at physics.muni.cz>
+#0	string	MSCF\0\0\0\0	Microsoft cabinet file data,
+#>25	byte	x		v%d
+#>24	byte	x		\b.%d
+# MPi: All CABs have version 1.3, so this is pointless.
+# Better magic in debian-additions.
+
+# GTKtalog catalogs 
+# by David Necas (Yeti) <yeti at physics.muni.cz>
+4	string	gtktalog\ 	GTKtalog catalog data,
+>13	string	3		version 3
+>>14	beshort	0x677a		(gzipped)
+>>14	beshort	!0x677a		(not gzipped)
+>13	string	>3		version %s
+
+############################################################################
+# Parity archive reconstruction file, the 'par' file format now used on Usenet.
+0       string          PAR\0	PARity archive data
+>48	leshort		=0	- Index file
+>48	leshort		>0	- file number %d
+
+# Felix von Leitner <felix-file at fefe.de>
+0	string	d8:announce	BitTorrent file
+!:mime	application/x-bittorrent
+
+# Atari MSA archive - Teemu Hukkanen <tjhukkan at iki.fi>
+0       beshort 0x0e0f          Atari MSA archive data
+>2      beshort x       	\b, %d sectors per track
+>4      beshort 0       	\b, 1 sided
+>4      beshort 1       	\b, 2 sided
+>6      beshort x       	\b, starting track: %d
+>8      beshort x       	\b, ending track: %d
+
+# Alternate ZIP string (amc at arwen.cs.berkeley.edu)
+0	string	PK00PK\003\004	Zip archive data
+
+# ACE archive (from http://www.wotsit.org/download.asp?f=ace)
+# by Stefan `Sec` Zehl <sec at 42.org>
+7	string		**ACE**		ACE archive data
+>15	byte	>0		version %d
+>16	byte	=0x00		\b, from MS-DOS
+>16	byte	=0x01		\b, from OS/2
+>16	byte	=0x02		\b, from Win/32
+>16	byte	=0x03		\b, from Unix
+>16	byte	=0x04		\b, from MacOS
+>16	byte	=0x05		\b, from WinNT
+>16	byte	=0x06		\b, from Primos
+>16	byte	=0x07		\b, from AppleGS
+>16	byte	=0x08		\b, from Atari
+>16	byte	=0x09		\b, from Vax/VMS
+>16	byte	=0x0A		\b, from Amiga
+>16	byte	=0x0B		\b, from Next
+>14	byte	x		\b, version %d to extract
+>5	leshort &0x0080		\b, multiple volumes,
+>>17	byte	x		\b (part %d),
+>5	leshort &0x0002		\b, contains comment
+>5	leshort	&0x0200		\b, sfx
+>5	leshort	&0x0400		\b, small dictionary
+>5	leshort	&0x0800		\b, multi-volume
+>5	leshort	&0x1000		\b, contains AV-String
+>>30	string	\x16*UNREGISTERED\x20VERSION*	(unregistered)
+>5	leshort &0x2000		\b, with recovery record
+>5	leshort &0x4000		\b, locked
+>5	leshort &0x8000		\b, solid
+# Date in MS-DOS format (whatever that is)
+#>18	lelong	x		Created on
+
+# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann
+# <doj at cubic.org>
+0x1A	string	sfArk		sfArk compressed Soundfont
+>0x15	string	2
+>>0x1	string	>\0		Version %s
+>>0x2A	string	>\0		: %s
+
+# DR-DOS 7.03 Packed File *.??_
+0	string	Packed\ File\ 	Personal NetWare Packed File
+>12	string	x    		\b, was "%.12s"
+
+# EET archive
+# From: Tilman Sauerbeck <tilman at code-monkey.de>
+0	belong	0x1ee7ff00	EET archive
+!:mime	application/x-eet
+
+# rzip archives
+0	string	RZIP		rzip compressed data
+>4	byte	x		- version %d
+>5	byte	x		\b.%d
+>6	belong	x		(%d bytes)
+
+# From: "Robert Dale" <robdale at gmail.com>
+0	belong	123		dar archive,
+>4	belong	x		label "%.8x
+>>8	belong	x		%.8x
+>>>12	beshort	x		%.4x"
+>14	byte	0x54		end slice
+>14	beshort	0x4e4e		multi-part
+>14	beshort	0x4e53		multi-part, with -S
+
+# Symbian installation files
+#  http://www.thouky.co.uk/software/psifs/sis.html
+#  http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf
+8	lelong	0x10000419	Symbian installation file
+!:mime	application/vnd.symbian.install
+>4	lelong	0x1000006D	(EPOC release 3/4/5)
+>4	lelong	0x10003A12	(EPOC release 6)
+0	lelong	0x10201A7A	Symbian installation file (Symbian OS 9.x)
+!:mime	x-epoc/x-sisx-app
+
+# From "Nelson A. de Oliveira" <naoliv at gmail.com>
+0	string	MPQ\032		MoPaQ (MPQ) archive
+
+# From: Dirk Jagdmann <doj at cubic.org>
+# xar archive format: http://code.google.com/p/xar/
+0	string	xar!		xar archive
+>6	beshort	x		- version %ld
+
+# From: "Nelson A. de Oliveira" <naoliv at gmail.com>
+# .kgb
+0	string KGB_arch		KGB Archiver file
+>10	string x		with compression level %.1s
+
+# xar (eXtensible ARchiver) archive
+# From: "David Remahl" <dremahl at apple.com>
+0	string	xar!		xar archive
+#>4	beshort	x		header size %d
+>6	beshort	x		version %d,
+#>8	quad	x		compressed TOC: %d,
+#>16	quad	x		uncompressed TOC: %d,
+>24	belong	0		no checksum
+>24	belong	1		SHA-1 checksum
+>24	belong	2		MD5 checksum
+
+#------------------------------------------------------------------------------
+# $File: asterix,v 1.5 2009/09/19 16:28:08 christos Exp $
+# asterix:  file(1) magic for Aster*x; SunOS 5.5.1 gave the 4-character
+# strings as "long" - we assume they're just strings:
+# From: guy at netapp.com (Guy Harris)
+#
+0	string		*STA		Aster*x
+>7	string		WORD			Words Document
+>7	string		GRAP			Graphic
+>7	string		SPRE			Spreadsheet
+>7	string		MACR			Macro
+0	string		2278		Aster*x Version 2
+>29	byte		0x36			Words Document
+>29	byte		0x35			Graphic
+>29	byte		0x32			Spreadsheet
+>29	byte		0x38			Macro
+
+
+#------------------------------------------------------------------------------
+# $File: att3b,v 1.8 2009/09/19 16:28:08 christos Exp $
+# att3b:  file(1) magic for AT&T 3B machines
+#
+# The `versions' should be un-commented if they work for you.
+# (Was the problem just one of endianness?)
+#
+# 3B20
+#
+# The 3B20 conflicts with SCCS.
+#0	beshort		0550		3b20 COFF executable
+#>12	belong		>0		not stripped
+#>22	beshort		>0		- version %ld
+#0	beshort		0551		3b20 COFF executable (TV)
+#>12	belong		>0		not stripped
+#>22	beshort		>0		- version %ld
+#
+# WE32K
+#
+0	beshort		0560		WE32000 COFF
+>18	beshort		^00000020	object
+>18	beshort		&00000020	executable
+>12	belong		>0		not stripped
+>18	beshort		^00010000	N/A on 3b2/300 w/paging
+>18	beshort		&00020000	32100 required
+>18	beshort		&00040000	and MAU hardware required
+>20	beshort		0407		(impure)
+>20	beshort		0410		(pure)
+>20	beshort		0413		(demand paged)
+>20	beshort		0443		(target shared library)
+>22	beshort		>0		- version %ld
+0	beshort		0561		WE32000 COFF executable (TV)
+>12	belong		>0		not stripped
+#>18	beshort		&00020000	- 32100 required
+#>18	beshort		&00040000	and MAU hardware required
+#>22	beshort		>0		- version %ld
+#
+# core file for 3b2 
+0	string		\000\004\036\212\200	3b2 core file
+>364	string		>\0		of '%s'
+
+#------------------------------------------------------------------------------
+# $File: audio,v 1.59 2009/11/04 17:27:37 christos Exp $
+# audio:  file(1) magic for sound formats (see also "iff")
+#
+# Jan Nicolai Langfeldt (janl at ifi.uio.no), Dan Quinlan (quinlan at yggdrasil.com),
+# and others
+#
+
+# Sun/NeXT audio data
+0	string		.snd		Sun/NeXT audio data:
+>12	belong		1		8-bit ISDN mu-law,
+!:mime	audio/basic
+>12	belong		2		8-bit linear PCM [REF-PCM],
+!:mime	audio/basic
+>12	belong		3		16-bit linear PCM,
+!:mime	audio/basic
+>12	belong		4		24-bit linear PCM,
+!:mime	audio/basic
+>12	belong		5		32-bit linear PCM,
+!:mime	audio/basic
+>12	belong		6		32-bit IEEE floating point,
+!:mime	audio/basic
+>12	belong		7		64-bit IEEE floating point,
+!:mime	audio/basic
+>12	belong		8		Fragmented sample data,
+>12	belong		10		DSP program,
+>12	belong		11		8-bit fixed point,
+>12	belong		12		16-bit fixed point,
+>12	belong		13		24-bit fixed point,
+>12	belong		14		32-bit fixed point,
+>12	belong		18		16-bit linear with emphasis,
+>12	belong		19		16-bit linear compressed,
+>12	belong		20		16-bit linear with emphasis and compression,
+>12	belong		21		Music kit DSP commands,
+>12	belong		23		8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.),
+!:mime  audio/x-adpcm
+>12	belong		24		compressed (8-bit CCITT G.722 ADPCM)
+>12	belong		25		compressed (3-bit CCITT G.723.3 ADPCM),
+>12	belong		26		compressed (5-bit CCITT G.723.5 ADPCM),
+>12	belong		27		8-bit A-law (CCITT G.711),
+>20	belong		1		mono,
+>20	belong		2		stereo,
+>20	belong		4		quad,
+>16	belong		>0		%d Hz
+
+# DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
+# that uses little-endian encoding and has a different magic number
+0	lelong		0x0064732E	DEC audio data:
+>12	lelong		1		8-bit ISDN mu-law,
+!:mime	audio/x-dec-basic
+>12	lelong		2		8-bit linear PCM [REF-PCM],
+!:mime	audio/x-dec-basic
+>12	lelong		3		16-bit linear PCM,
+!:mime	audio/x-dec-basic
+>12	lelong		4		24-bit linear PCM,
+!:mime	audio/x-dec-basic
+>12	lelong		5		32-bit linear PCM,
+!:mime	audio/x-dec-basic
+>12	lelong		6		32-bit IEEE floating point,
+!:mime	audio/x-dec-basic
+>12	lelong		7		64-bit IEEE floating point,
+!:mime	audio/x-dec-basic
+>12	belong		8		Fragmented sample data,
+>12	belong		10		DSP program,
+>12	belong		11		8-bit fixed point,
+>12	belong		12		16-bit fixed point,
+>12	belong		13		24-bit fixed point,
+>12	belong		14		32-bit fixed point,
+>12	belong		18		16-bit linear with emphasis,
+>12	belong		19		16-bit linear compressed,
+>12	belong		20		16-bit linear with emphasis and compression,
+>12	belong		21		Music kit DSP commands,
+>12	lelong		23		8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.),
+!:mime	audio/x-dec-basic
+>12	belong		24		compressed (8-bit CCITT G.722 ADPCM)
+>12	belong		25		compressed (3-bit CCITT G.723.3 ADPCM),
+>12	belong		26		compressed (5-bit CCITT G.723.5 ADPCM),
+>12	belong		27		8-bit A-law (CCITT G.711),
+>20	lelong		1		mono,
+>20	lelong		2		stereo,
+>20	lelong		4		quad,
+>16	lelong		>0		%d Hz
+
+# Creative Labs AUDIO stuff
+0	string	MThd			Standard MIDI data
+!:mime	audio/midi
+>8 	beshort	x			(format %d)
+>10	beshort	x			using %d track
+>10	beshort		>1		\bs
+>12	beshort&0x7fff	x		at 1/%d
+>12	beshort&0x8000	>0		SMPTE
+
+0	string	CTMF			Creative Music (CMF) data
+!:mime	audio/x-unknown
+0	string	SBI			SoundBlaster instrument data
+!:mime	audio/x-unknown
+0	string	Creative\ Voice\ File	Creative Labs voice data
+!:mime	audio/x-unknown
+# is this next line right?  it came this way...
+>19	byte	0x1A
+>23	byte	>0			- version %d
+>22	byte	>0			\b.%d
+
+# first entry is also the string "NTRK"
+0	belong		0x4e54524b	MultiTrack sound data
+>4	belong		x		- version %ld
+
+# Extended MOD format (*.emd) (Greg Roelofs, newt at uchicago.edu); NOT TESTED
+# [based on posting 940824 by "Dirk/Elastik", husberg at lehtori.cc.tut.fi]
+0	string		EMOD		Extended MOD sound data,
+>4	byte&0xf0	x		version %d
+>4	byte&0x0f	x		\b.%d,
+>45	byte		x		%d instruments
+>83	byte		0		(module)
+>83	byte		1		(song)
+
+# Real Audio (Magic .ra\0375)
+0	belong		0x2e7261fd	RealAudio sound file
+!:mime	audio/x-pn-realaudio
+0	string		.RMF		RealMedia file
+!:mime	application/vnd.rn-realmedia
+#video/x-pn-realvideo
+#video/vnd.rn-realvideo
+#application/vnd.rn-realmedia
+#	sigh, there are many mimes for that but the above are the most common.
+
+# MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert at dialin.ind.net]
+# Oct 31, 1995
+# fixed by <doj at cubic.org> 2003-06-24
+# Too short...
+#0	string		MTM		MultiTracker Module sound file
+#0	string		if		Composer 669 Module sound data
+#0	string		JN		Composer 669 Module sound data (extended format)
+0	string		MAS_U		ULT(imate) Module sound data
+
+#0	string		FAR		Module sound data
+#>4	string		>\15		Title: "%s"
+
+0x2c	string		SCRM		ScreamTracker III Module sound data
+>0	string		>\0		Title: "%s"
+
+# Gravis UltraSound patches
+# From <ache at nagual.ru>
+
+0	string		GF1PATCH110\0ID#000002\0	GUS patch
+0	string		GF1PATCH100\0ID#000002\0	Old GUS	patch
+
+# mime types according to http://www.geocities.com/nevilo/mod.htm:
+#	audio/it	.it
+#	audio/x-zipped-it	.itz
+#	audio/xm	fasttracker modules
+#	audio/x-s3m	screamtracker modules
+#	audio/s3m	screamtracker modules
+#	audio/x-zipped-mod	mdz
+#	audio/mod	mod
+#	audio/x-mod	All modules (mod, s3m, 669, mtm, med, xm, it, mdz, stm, itz, xmz, s3z)
+
+#
+# Taken from loader code from mikmod version 2.14
+# by Steve McIntyre (stevem at chiark.greenend.org.uk)
+# <doj at cubic.org> added title printing on 2003-06-24
+0	string	MAS_UTrack_V00
+>14	string	>/0		ultratracker V1.%.1s module sound data
+!:mime	audio/x-mod
+#audio/x-tracker-module
+
+0	string	UN05		MikMod UNI format module sound data
+
+0	string	Extended\ Module: Fasttracker II module sound data
+!:mime	audio/x-mod
+#audio/x-tracker-module
+>17	string	>\0		Title: "%s"
+
+21	string/c	=!SCREAM!	Screamtracker 2 module sound data
+!:mime	audio/x-mod
+#audio/x-screamtracker-module
+21	string	BMOD2STM	Screamtracker 2 module sound data
+!:mime	audio/x-mod
+#audio/x-screamtracker-module
+1080	string	M.K.		4-channel Protracker module sound data
+!:mime	audio/x-mod
+#audio/x-protracker-module
+>0	string	>\0		Title: "%s"
+1080	string	M!K!		4-channel Protracker module sound data
+!:mime	audio/x-mod
+#audio/x-protracker-module
+>0	string	>\0		Title: "%s"
+1080	string	FLT4		4-channel Startracker module sound data
+!:mime	audio/x-mod
+#audio/x-startracker-module
+>0	string	>\0		Title: "%s"
+1080	string	FLT8		8-channel Startracker module sound data
+!:mime	audio/x-mod
+#audio/x-startracker-module
+>0	string	>\0		Title: "%s"
+1080	string	4CHN		4-channel Fasttracker module sound data
+!:mime	audio/x-mod
+#audio/x-fasttracker-module
+>0	string	>\0		Title: "%s"
+1080	string	6CHN		6-channel Fasttracker module sound data
+!:mime	audio/x-mod
+#audio/x-fasttracker-module
+>0	string	>\0		Title: "%s"
+1080	string	8CHN		8-channel Fasttracker module sound data
+!:mime	audio/x-mod
+#audio/x-fasttracker-module
+>0	string	>\0		Title: "%s"
+1080	string	CD81		8-channel Octalyser module sound data
+!:mime	audio/x-mod
+#audio/x-octalysertracker-module
+>0	string	>\0		Title: "%s"
+1080	string	OKTA		8-channel Octalyzer module sound data
+!:mime	audio/x-mod
+#audio/x-octalysertracker-module
+>0	string	>\0		Title: "%s"
+# Not good enough.
+#1082	string	CH
+#>1080	string	>/0		%.2s-channel Fasttracker "oktalyzer" module sound data
+1080	string	16CN		16-channel Taketracker module sound data
+!:mime	audio/x-mod
+#audio/x-taketracker-module
+>0	string	>\0		Title: "%s"
+1080	string	32CN		32-channel Taketracker module sound data
+!:mime	audio/x-mod
+#audio/x-taketracker-module
+>0	string	>\0		Title: "%s"
+
+# TOC sound files -Trevor Johnson <trevor at jpj.net>
+#
+0       string          TOC             TOC sound file
+
+# sidfiles <pooka at iki.fi>
+# added name,author,(c) and new RSID type by <doj at cubic.org> 2003-06-24
+0	string		SIDPLAY\ INFOFILE	Sidplay info file
+
+0	string		PSID			PlaySID v2.2+ (AMIGA) sidtune
+>4	beshort		>0			w/ header v%d,
+>14	beshort		=1			single song,
+>14	beshort		>1			%d songs,
+>16	beshort		>0			default song: %d
+>0x16	string		>\0			name: "%s"
+>0x36	string		>\0			author: "%s"
+>0x56	string		>\0			copyright: "%s"
+
+0	string		RSID			RSID sidtune PlaySID compatible
+>4	beshort		>0			w/ header v%d,
+>14	beshort		=1			single song,
+>14	beshort		>1			%d songs,
+>16	beshort		>0			default song: %d
+>0x16	string		>\0			name: "%s"
+>0x36	string		>\0			author: "%s"
+>0x56	string		>\0			copyright: "%s"
+
+# IRCAM <mpruett at sgi.com>
+# VAX and MIPS files are little-endian; Sun and NeXT are big-endian
+0	belong		0x64a30100		IRCAM file (VAX)
+0	belong		0x64a30200		IRCAM file (Sun)
+0	belong		0x64a30300		IRCAM file (MIPS little-endian)
+0	belong		0x64a30400		IRCAM file (NeXT)
+
+# NIST SPHERE <mpruett at sgi.com>
+0	string		NIST_1A\n\ \ \ 1024\n	NIST SPHERE file
+
+# Sample Vision <mpruett at sgi.com>
+0	string		SOUND\ SAMPLE\ DATA\ 	Sample Vision file
+
+# Audio Visual Research <tonigonenstein at users.sourceforge.net>
+0	string		2BIT			Audio Visual Research file,
+>12	beshort		=0			mono,
+>12	beshort		=-1			stereo,
+>14	beshort		x			%d bits
+>16	beshort		=0			unsigned,
+>16	beshort		=-1			signed,
+>22	belong&0x00ffffff	x		%d Hz,
+>18	beshort		=0			no loop,
+>18	beshort		=-1			loop,
+>21	ubyte		<128			note %d,
+>22	byte		=0			replay 5.485 KHz
+>22	byte		=1			replay 8.084 KHz
+>22	byte		=2			replay 10.971 KHz
+>22	byte		=3			replay 16.168 KHz
+>22	byte		=4			replay 21.942 KHz
+>22	byte		=5			replay 32.336 KHz
+>22	byte		=6			replay 43.885 KHz
+>22	byte		=7			replay 47.261 KHz
+
+# SGI SoundTrack <mpruett at sgi.com>
+0	string		_SGI_SoundTrack		SGI SoundTrack project file
+# ID3 version 2 tags <waschk at informatik.uni-rostock.de>
+0	string		ID3	Audio file with ID3 version 2
+>3	byte		x	\b.%d
+>4	byte		x	\b.%d
+>>5	byte		&0x80	\b, unsynchronized frames
+>>5	byte		&0x40	\b, extended header
+>>5	byte		&0x20	\b, experimental
+>>5	byte		&0x10	\b, footer present
+>(6.I)	indirect	x	\b, contains: 
+
+# NSF (NES sound file) magic
+0	string		NESM\x1a	NES Sound File
+>14	string		>\0		("%s" by
+>46	string		>\0		%s, copyright
+>78	string		>\0		%s),
+>5	byte		x		version %d,
+>6	byte		x		%d tracks,
+>122	byte&0x2	=1		dual PAL/NTSC
+>122	byte&0x1	=1		PAL
+>122	byte&0x1	=0		NTSC
+
+# Impulse tracker module (audio/x-it)
+0	string		IMPM		Impulse Tracker module sound data -
+!:mime	audio/x-mod
+>4	string		>\0		"%s"
+>40	leshort		!0		compatible w/ITv%x
+>42	leshort		!0		created w/ITv%x
+
+# Imago Orpheus module (audio/x-imf)
+60	string		IM10		Imago Orpheus module sound data -
+>0	string		>\0		"%s"
+
+# From <collver1 at attbi.com>
+# These are the /etc/magic entries to decode modules, instruments, and
+# samples in Impulse Tracker's native format.
+
+0	string		IMPS		Impulse Tracker Sample
+>18	byte		&2		16 bit
+>18	byte		^2		8 bit
+>18	byte		&4		stereo
+>18	byte		^4		mono
+0	string		IMPI		Impulse Tracker Instrument
+>28	leshort		!0		ITv%x
+>30	byte		!0		%d samples
+
+# Yamaha TX Wave:  file(1) magic for Yamaha TX Wave audio files
+# From <collver1 at attbi.com>
+0	string		LM8953		Yamaha TX Wave
+>22	byte		0x49		looped
+>22	byte		0xC9		non-looped
+>23	byte		1		33kHz
+>23	byte		2		50kHz
+>23	byte		3		16kHz
+
+# scream tracker:  file(1) magic for Scream Tracker sample files
+#
+# From <collver1 at attbi.com>
+76	string		SCRS		Scream Tracker Sample
+>0	byte		1		sample
+>0	byte		2		adlib melody
+>0	byte		>2		adlib drum
+>31	byte		&2		stereo
+>31	byte		^2		mono
+>31	byte		&4		16bit little endian
+>31	byte		^4		8bit
+>30	byte		0		unpacked
+>30	byte		1		packed
+
+# audio
+# From: Cory Dikkers <cdikkers at swbell.net>
+0	string		MMD0		MED music file, version 0
+0	string		MMD1		OctaMED Pro music file, version 1
+0	string		MMD3		OctaMED Soundstudio music file, version 3
+0	string		OctaMEDCmpr	OctaMED Soundstudio compressed file
+0	string		MED		MED_Song
+0	string		SymM		Symphonie SymMOD music file
+#
+0	string		THX		AHX version
+>3	byte		=0		1 module data
+>3	byte		=1		2 module data
+#
+0	string		OKTASONG	Oktalyzer module data
+#
+0	string		DIGI\ Booster\ module\0	%s
+>20	byte		>0		%c
+>>21	byte		>0		\b%c
+>>>22	byte		>0		\b%c
+>>>>23	byte		>0		\b%c
+>610	string		>\0		\b, "%s"
+#
+0	string		DBM0	   	DIGI Booster Pro Module
+>4	byte		>0		V%X.
+>>5	byte		x		\b%02X
+>16	string		>\0		\b, "%s"
+#
+0	string		FTMN		FaceTheMusic module
+>16	string		>\0d		\b, "%s"
+
+# From: <doj at cubic.org> 2003-06-24
+0	string		AMShdr\32	Velvet Studio AMS Module v2.2
+0	string		Extreme		Extreme Tracker AMS Module v1.3
+0	string		DDMF		Xtracker DMF Module
+>4	byte		x		v%i
+>0xD	string		>\0		Title: "%s"
+>0x2B	string		>\0		Composer: "%s"
+0	string		DSM\32		Dynamic Studio Module DSM
+0	string		SONG		DigiTrekker DTM Module
+0	string		DMDL		DigiTrakker MDL Module
+0	string		PSM\32		Protracker Studio PSM Module
+44	string		PTMF		Poly Tracker PTM Module
+>0	string		>\32		Title: "%s"
+0	string		MT20		MadTracker 2.0 Module MT2
+0	string		RAD\40by\40REALiTY!! RAD Adlib Tracker Module RAD
+0	string		RTMM		RTM Module
+0x426	string		MaDoKaN96	XMS Adlib Module
+>0	string		>\0		Composer: "%s"
+0	string		AMF		AMF Module
+>4	string		>\0		Title: "%s"
+0	string		MODINFO1	Open Cubic Player Module Inforation MDZ
+0	string		Extended\40Instrument: Fast Tracker II Instrument
+
+# From: Takeshi Hamasaki <hma at syd.odn.ne.jp>
+# NOA Nancy Codec file
+0	string		\210NOA\015\012\032	NOA Nancy Codec Movie file
+# Yamaha SMAF format
+0	string		MMMD		Yamaha SMAF file
+# Sharp Jisaku Melody format for PDC
+0	string		\001Sharp\040JisakuMelody	SHARP Cell-Phone ringing Melody
+>20	string		Ver01.00	Ver. 1.00
+>>32	byte		x		, %d tracks
+
+# Free lossless audio codec <http://flac.sourceforge.net>
+# From: Przemyslaw Augustyniak <silvathraec at rpg.pl>
+0	string			fLaC		FLAC audio bitstream data
+!:mime	audio/x-flac
+>4	byte&0x7f		>0		\b, unknown version
+>4	byte&0x7f		0		\b
+# some common bits/sample values
+>>20	beshort&0x1f0		0x030		\b, 4 bit
+>>20	beshort&0x1f0		0x050		\b, 6 bit
+>>20	beshort&0x1f0		0x070		\b, 8 bit
+>>20	beshort&0x1f0		0x0b0		\b, 12 bit
+>>20	beshort&0x1f0		0x0f0		\b, 16 bit
+>>20	beshort&0x1f0		0x170		\b, 24 bit
+>>20	byte&0xe		0x0		\b, mono
+>>20	byte&0xe		0x2		\b, stereo
+>>20	byte&0xe		0x4		\b, 3 channels
+>>20	byte&0xe		0x6		\b, 4 channels
+>>20	byte&0xe		0x8		\b, 5 channels
+>>20	byte&0xe		0xa		\b, 6 channels
+>>20	byte&0xe		0xc		\b, 7 channels
+>>20	byte&0xe		0xe		\b, 8 channels
+# some common sample rates
+>>17	belong&0xfffff0		0x0ac440	\b, 44.1 kHz
+>>17	belong&0xfffff0		0x0bb800	\b, 48 kHz
+>>17	belong&0xfffff0		0x07d000	\b, 32 kHz
+>>17	belong&0xfffff0		0x056220	\b, 22.05 kHz
+>>17	belong&0xfffff0		0x05dc00	\b, 24 kHz
+>>17	belong&0xfffff0		0x03e800	\b, 16 kHz
+>>17	belong&0xfffff0		0x02b110	\b, 11.025 kHz
+>>17	belong&0xfffff0		0x02ee00	\b, 12 kHz
+>>17	belong&0xfffff0		0x01f400	\b, 8 kHz
+>>17	belong&0xfffff0		0x177000	\b, 96 kHz
+>>17	belong&0xfffff0		0x0fa000	\b, 64 kHz
+>>21	byte&0xf		>0		\b, >4G samples
+>>21	byte&0xf		0		\b
+>>>22	belong			>0		\b, %u samples
+>>>22	belong			0		\b, length unknown
+
+# (ISDN) VBOX voice message file (Wolfram Kleff)
+0       string          VBOX            VBOX voice message data
+
+# ReBorn Song Files (.rbs)
+# David J. Singer <doc at deadvirgins.org.uk>
+8       string          RB40             RBS Song file
+>29     string          ReBorn           created by ReBorn
+>37     string          Propellerhead    created by ReBirth
+
+# Synthesizer Generator and Kimwitu share their file format
+0	string		A#S#C#S#S#L#V#3	    Synthesizer Generator or Kimwitu data
+# Kimwitu++ uses a slightly different magic
+0	string		A#S#C#S#S#L#HUB	    Kimwitu++ data
+
+# From "Simon Hosie
+0       string  TFMX-SONG       TFMX module sound data
+
+# Monkey's Audio compressed audio format (.ape)
+# From danny.milo at gmx.net (Danny Milosavljevic)
+# New version from Abel Cheung <abel (@) oaka.org>
+0		string		MAC\040		Monkey's Audio compressed format
+>4		uleshort	>0x0F8B		version %d
+>>(0x08.l)	uleshort	=1000		with fast compression
+>>(0x08.l)	uleshort	=2000		with normal compression
+>>(0x08.l)	uleshort	=3000		with high compression
+>>(0x08.l)	uleshort	=4000		with extra high compression
+>>(0x08.l)	uleshort	=5000		with insane compression
+>>(0x08.l+18)	uleshort	=1		\b, mono
+>>(0x08.l+18)	uleshort	=2		\b, stereo
+>>(0x08.l+20)	ulelong		x		\b, sample rate %d
+>4		uleshort	<0x0F8C		version %d
+>>6		uleshort	=1000		with fast compression
+>>6		uleshort	=2000		with normal compression
+>>6		uleshort	=3000		with high compression
+>>6		uleshort	=4000		with extra high compression
+>>6		uleshort	=5000		with insane compression
+>>10		uleshort	=1		\b, mono
+>>10		uleshort	=2		\b, stereo
+>>12		ulelong		x		\b, sample rate %d
+
+# adlib sound files
+# From Gürkan Sengün <gurkan at linuks.mine.nu>, http://www.linuks.mine.nu
+0    	string		RAWADATA	RdosPlay RAW
+
+1068	string		RoR		AMUSIC Adlib Tracker
+
+0	string		JCH		EdLib
+
+0	string		mpu401tr	MPU-401 Trakker
+
+0	string		SAdT		Surprise! Adlib Tracker
+>4	byte		x		Version %d
+
+0	string		XAD!		eXotic ADlib
+
+0	string		ofTAZ!		eXtra Simple Music
+
+# Spectrum 128 tunes (.ay files).
+# From: Emanuel Haupt <ehaupt at critical.ch>
+0	string		ZXAYEMUL	Spectrum 128 tune
+
+0	string		\0BONK		BONK,
+#>5	byte		x		version %d
+>14	byte		x		%d channel(s),
+>15	byte		=1		lossless,
+>15	byte		=0		lossy,
+>16	byte		x		mid-side
+
+384	string		LockStream	LockStream Embedded file (mostly MP3 on old Nokia phones)
+
+# format VQF (proprietary codec for sound)
+# some infos on the header file available at :
+# http://www.twinvq.org/english/technology_format.html
+0	string		TWIN97012000	VQF data
+>27	short		0		\b, Mono
+>27	short		1		\b, Stereo
+>31	short 		>0		\b, %d kbit/s
+>35	short 		>0		\b, %d kHz
+
+# Nelson A. de Oliveira (naoliv at gmail.com)
+# .eqf
+0	string	Winamp\ EQ\ library\ file	%s
+# it will match only versions like v<digit>.<digit>
+# Since I saw only eqf files with version v1.1 I think that it's OK
+>23	string	x	\b%.4s
+# .preset
+0	string	[Equalizer\ preset]	XMMS equalizer preset
+# .m3u
+0	search/1	#EXTM3U 	M3U playlist text
+# .pls
+0	search/1	[playlist]	PLS playlist text
+# licq.conf
+1	string	[licq]			LICQ configuration file
+
+# Atari ST audio files by Dirk Jagdmann <doj at cubic.org>
+0	string		ICE!		SNDH Atari ST music
+0	string		SC68\ Music-file\ /\ (c)\ (BeN)jami	sc68 Atari ST music
+
+# musepak support From: "Jiri Pejchal" <jiri.pejchal at gmail.com>
+0       string          MP+     Musepack audio
+>3      byte            255     \b, SV pre8
+>3      byte&0xF        0x6     \b, SV 6
+>3      byte&0xF        0x8     \b, SV 8
+>3      byte&0xF        0x7     \b, SV 7
+>>3     byte&0xF0       0x0     \b.0
+>>3     byte&0xF0       0x10    \b.1
+>>3     byte&0xF0       240     \b.15
+>>10    byte&0xF0       0x0     \b, no profile
+>>10    byte&0xF0       0x10    \b, profile 'Unstable/Experimental'
+>>10    byte&0xF0       0x50    \b, quality 0
+>>10    byte&0xF0       0x60    \b, quality 1
+>>10    byte&0xF0       0x70    \b, quality 2 (Telephone)
+>>10    byte&0xF0       0x80    \b, quality 3 (Thumb)
+>>10    byte&0xF0       0x90    \b, quality 4 (Radio)
+>>10    byte&0xF0       0xA0    \b, quality 5 (Standard)
+>>10    byte&0xF0       0xB0    \b, quality 6 (Xtreme)
+>>10    byte&0xF0       0xC0    \b, quality 7 (Insane)
+>>10    byte&0xF0       0xD0    \b, quality 8 (BrainDead)
+>>10    byte&0xF0       0xE0    \b, quality 9
+>>10    byte&0xF0       0xF0    \b, quality 10
+>>27    byte            0x0     \b, Buschmann 1.7.0-9, Klemm 0.90-1.05
+>>27    byte            102     \b, Beta 1.02
+>>27    byte            104     \b, Beta 1.04
+>>27    byte            105     \b, Alpha 1.05
+>>27    byte            106     \b, Beta 1.06
+>>27    byte            110     \b, Release 1.1
+>>27    byte            111     \b, Alpha 1.11
+>>27    byte            112     \b, Beta 1.12
+>>27    byte            113     \b, Alpha 1.13
+>>27    byte            114     \b, Beta 1.14
+>>27    byte            115     \b, Alpha 1.15
+
+# IMY
+# from http://filext.com/detaillist.php?extdetail=IMY
+# http://cellphones.about.com/od/cellularfaqs/f/rf_imelody.htm
+# http://download.ncl.ie/doc/api/ie/ncl/media/music/IMelody.html
+# http://www.wx800.com/msg/download/irda/iMelody.pdf
+0	string	BEGIN:IMELODY	iMelody Ringtone Format
+
+# From: "Mateus Caruccio" <mateus at caruccio.com>
+# guitar pro v3,4,5 from http://filext.com/file-extension/gp3
+0	string	\030FICHIER\ GUITAR\ PRO\ v3.	Guitar Pro Ver. 3 Tablature
+
+# From: "Leslie P. Polzer" <leslie.polzer at gmx.net>
+60	string	SONG		SoundFX Module sound file
+
+# Type: Adaptive Multi-Rate Codec
+# URL:  http://filext.com/detaillist.php?extdetail=AMR
+# From: Russell Coker <russell at coker.com.au>
+0	string	#!AMR		Adaptive Multi-Rate Codec (GSM telephony)
+
+#----------------------------------------------------------------
+# $File: basis,v 1.4 2009/09/19 16:28:08 christos Exp $
+# basis: file(1) magic for BBx/Pro5-files
+#      Oliver Dammer <dammer at olida.de>	 2005/11/07
+# http://www.basis.com business-basic-files.
+#
+0	string		\074\074bbx\076\076	BBx
+>7	string		\000			indexed file
+>7	string		\001			serial file
+>7	string		\002			keyed file
+>>13	short		0			(sort)
+>7	string		\004			program
+>>18	byte		x			(LEVEL %d)
+>>>23	string		>\000			psaved
+>7	string		\006			mkeyed file
+>>13	short		0			(sort)
+>>8	string		\000			(mkey)
+
+#------------------------------------------------------------------------------
+# $File: bflt,v 1.4 2009/09/19 16:28:08 christos Exp $
+# bFLT: file(1) magic for BFLT uclinux binary files
+#
+# From Philippe De Muyter <phdm at macqel.be>
+#
+0	string		bFLT		BFLT executable
+>4	belong		x		- version %ld
+>4	belong		4
+>>36	belong&0x1	0x1		ram
+>>36	belong&0x2	0x2		gotpic
+>>36	belong&0x4	0x4		gzip
+>>36	belong&0x8	0x8		gzdata
+
+#------------------------------------------------------------------------------
+# $File: blender,v 1.5 2009/09/19 16:28:08 christos Exp $
+# blender: file(1) magic for Blender 3D related files
+#
+# Native format rule v1.2. For questions use the developers list 
+# http://lists.blender.org/mailman/listinfo/bf-committers
+# GLOB chunk was moved near start and provides subversion info since 2.42 
+
+0		string	=BLENDER	Blender3D,
+>7		string	=_		saved as 32-bits
+>>8		string	=v		little endian
+>>>9		byte	x		with version %c.
+>>>10		byte	x		\b%c
+>>>11		byte	x		\b%c
+>>>0x40		string	=GLOB		\b.
+>>>>0x58	leshort	x		\b%.4d
+>>8		string	=V		big endian
+>>>9		byte	x		with version %c.
+>>>10		byte	x		\b%c
+>>>11		byte	x		\b%c
+>>>0x40		string	=GLOB		\b.
+>>>>0x58	beshort	x		\b%.4d
+>7		string	=-		saved as 64-bits
+>>8		string	=v		little endian
+>>9		byte	x		with version %c.
+>>10		byte	x		\b%c
+>>11		byte	x		\b%c
+>>0x44		string	=GLOB		\b.
+>>>0x60		leshort	x		\b%.4d
+>>8		string	=V		big endian
+>>>9		byte	x		with version %c.
+>>>10		byte	x		\b%c
+>>>11		byte	x		\b%c
+>>>0x44		string	=GLOB		\b.
+>>>>0x60	beshort	x		\b%.4d
+
+# Scripts that run in the embeded Python interpreter
+0		string	#!BPY		Blender3D BPython script
+
+#------------------------------------------------------------------------------
+# $File: blit,v 1.8 2009/09/19 16:28:08 christos Exp $
+# blit:  file(1) magic for 68K Blit stuff as seen from 680x0 machine
+#
+# Note that this 0407 conflicts with several other a.out formats...
+#
+# XXX - should this be redone with "be" and "le", so that it works on
+# little-endian machines as well?  If so, what's the deal with
+# "VAX-order" and "VAX-order2"?
+#
+#0	long		0407		68K Blit (standalone) executable
+#0	short		0407		VAX-order2 68K Blit (standalone) executable
+0	short		03401		VAX-order 68K Blit (standalone) executable
+0	long		0406		68k Blit mpx/mux executable
+0	short		0406		VAX-order2 68k Blit mpx/mux executable
+0	short		03001		VAX-order 68k Blit mpx/mux executable
+# Need more values for WE32 DMD executables.
+# Note that 0520 is the same as COFF
+#0	short		0520		tty630 layers executable
+
+#------------------------------------------------------------------------------
+# $File: bout,v 1.5 2009/09/19 16:28:08 christos Exp $
+# i80960 b.out objects and archives
+#
+0	long		0x10d		i960 b.out relocatable object
+>16	long		>0		not stripped
+#
+# b.out archive (hp-rt on i960)
+0	string		=!<bout>	b.out archive
+>8	string		__.SYMDEF	random library
+
+#------------------------------------------------------------------------------
+# $File: bsdi,v 1.5 2009/09/19 16:28:08 christos Exp $
+# bsdi:  file(1) magic for BSD/OS (from BSDI) objects
+#
+
+0	lelong		0314		386 compact demand paged pure executable
+>16	lelong		>0		not stripped
+>32	byte		0x6a		(uses shared libs)
+
+0	lelong		0407		386 executable
+>16	lelong		>0		not stripped
+>32	byte		0x6a		(uses shared libs)
+
+0	lelong		0410		386 pure executable
+>16	lelong		>0		not stripped
+>32	byte		0x6a		(uses shared libs)
+
+0	lelong		0413		386 demand paged pure executable
+>16	lelong		>0		not stripped
+>32	byte		0x6a		(uses shared libs)
+
+# same as in SunOS 4.x, except for static shared libraries
+0	belong&077777777	0600413		sparc demand paged
+>0	byte		&0x80
+>>20	belong		<4096		shared library
+>>20	belong		=4096		dynamically linked executable
+>>20	belong		>4096		dynamically linked executable
+>0	byte		^0x80		executable
+>16	belong		>0		not stripped
+>36	belong		0xb4100001	(uses shared libs)
+
+0	belong&077777777	0600410		sparc pure
+>0	byte		&0x80		dynamically linked executable
+>0	byte		^0x80		executable
+>16	belong		>0		not stripped
+>36	belong		0xb4100001	(uses shared libs)
+
+0	belong&077777777	0600407		sparc
+>0	byte		&0x80		dynamically linked executable
+>0	byte		^0x80		executable
+>16	belong		>0		not stripped
+>36	belong		0xb4100001	(uses shared libs)
+
+#------------------------------------------------------------------------------
+# $File: btsnoop,v 1.5 2009/09/19 16:28:08 christos Exp $
+# BTSnoop:  file(1) magic for BTSnoop files
+#
+# From <marcel at holtmann.org>
+0	string		btsnoop\0		BTSnoop
+>8	belong		x			version %d,
+>12	belong		1001			Unencapsulated HCI
+>12	belong		1002			HCI UART (H4)
+>12	belong		1003			HCI BCSP
+>12	belong		1004			HCI Serial (H5)
+>>12	belong		x			type %d
+
+#------------------------------------------------------------------------------
+# $File: c-lang,v 1.14 2009/09/19 16:28:08 christos Exp $
+# c-lang:  file(1) magic for C programs (or REXX)
+#
+
+# XPM icons (Greg Roelofs, newt at uchicago.edu)
+# if you uncomment "/*" for C/REXX below, also uncomment this entry
+#0	string		/*\ XPM\ */	X pixmap image data
+#!:mime	image/x-xpmi
+
+# 3DS (3d Studio files) Conflicts with diff output 0x3d '='
+#16	beshort		0x3d3d		image/x-3ds
+
+# this first will upset you if you're a PL/1 shop...
+# in which case rm it; ascmagic will catch real C programs
+#0	search/1	/*		C or REXX program text
+#0	search/1	//		C++ program text
+
+# From: Mikhail Teterin <mi at aldan.algebra.com> 
+0	string		cscope		cscope reference data
+>7	string		x		version %.2s
+# We skip the path here, because it is often long (so file will
+# truncate it) and mostly redundant.
+# The inverted index functionality was added some time betwen
+# versions 11 and 15, so look for -q if version is above 14:
+>7	string		>14
+>>10	search/100	\ -q\ 		with inverted index
+>10	search/100	\ -c\ 		text (non-compressed)
+
+#------------------------------------------------------------------------------
+# $File: c64,v 1.5 2009/09/19 16:28:08 christos Exp $
+# c64:  file(1) magic for various commodore 64 related files
+#
+# From: Dirk Jagdmann <doj at cubic.org>
+
+0x16500	belong		0x12014100	D64 Image
+0x16500	belong		0x12014180	D71 Image
+0x61800 belong		0x28034400	D81 Image
+0	string		C64\40CARTRIDGE	CCS C64 Emultar Cartridge Image
+0	belong		0x43154164	X64 Image
+
+0	string		GCR-1541	GCR Image
+>8	byte		x		version: %i
+>9	byte		x		tracks: %i
+
+9	string		PSUR		ARC archive (c64)
+2	string		-LH1-		LHA archive (c64)
+
+0	string		C64File		PC64 Emulator file
+>8	string		>\0		"%s"
+0	string		C64Image	PC64 Freezer Image
+
+0	beshort		0x38CD		C64 PCLink Image
+0	string		CBM\144\0\0	Power 64 C64 Emulator Snapshot
+
+0	belong		0xFF424CFF	WRAptor packer (c64)
+
+0	string		C64S\x20tape\x20file	T64 tape Image
+>32	leshort		x		Version:0x%x
+>36	leshort		!0		Entries:%i
+>40	string		x		Name:%.24s
+
+0	string		C64\x20tape\x20image\x20file\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0	T64 tape Image
+>32	leshort		x		Version:0x%x
+>36	leshort		!0		Entries:%i
+>40	string		x		Name:%.24s
+
+0	string		C64S\x20tape\x20image\x20file\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0	T64 tape Image
+>32	leshort		x		Version:0x%x
+>36	leshort		!0		Entries:%i
+>40	string		x		Name:%.24s
+
+#------------------------------------------------------------------------------
+# $File: cad,v 1.9 2009/09/19 16:28:08 christos Exp $
+# autocad:  file(1) magic for cad files
+#
+
+# AutoCAD DWG versions R13/R14 (www.autodesk.com)
+# Written December 01, 2003 by Lester Hightower
+# Based on the DWG File Format Specifications at http://www.opendwg.org/
+0	string	       \101\103\061\060\061		   AutoCAD
+>5	string	       \062\000\000\000\000		   DWG ver. R13
+>5	string	       \064\000\000\000\000		   DWG ver. R14
+
+# Microstation DGN/CIT Files (www.bentley.com)
+# Last updated July 29, 2005 by Lester Hightower
+# DGN is the default file extension of Microstation/Intergraph CAD files.
+# CIT is the proprietary raster format (similar to TIFF) used to attach
+# raster underlays to Microstation DGN (vector) drawings.
+# 
+# http://www.wotsit.org/search.asp
+# http://filext.com/detaillist.php?extdetail=DGN
+# http://filext.com/detaillist.php?extdetail=CIT
+#
+# http://www.bentley.com/products/default.cfm?objectid=97F351F5-9C35-4E5E-89C2
+# 3F86C928&method=display&p_objectid=97F351F5-9C35-4E5E-89C280A93F86C928
+# http://www.bentley.com/products/default.cfm?objectid=A5C2FD43-3AC9-4C71-B682
+# 721C479F&method=display&p_objectid=A5C2FD43-3AC9-4C71-B682C7BE721C479F
+0	string	\010\011\376			Microstation
+>3	string	\002
+>>30	string	\026\105			DGNFile
+>>30	string	\034\105			DGNFile
+>>30	string	\073\107			DGNFile
+>>30	string	\073\110			DGNFile
+>>30	string	\106\107			DGNFile
+>>30	string	\110\103			DGNFile
+>>30	string	\120\104			DGNFile
+>>30	string	\172\104			DGNFile
+>>30	string	\172\105			DGNFile
+>>30	string	\172\106			DGNFile
+>>30	string	\234\106			DGNFile
+>>30	string	\273\105			DGNFile
+>>30	string	\306\106			DGNFile
+>>30	string	\310\104			DGNFile
+>>30	string	\341\104			DGNFile
+>>30	string	\372\103			DGNFile
+>>30	string	\372\104			DGNFile
+>>30	string	\372\106			DGNFile
+>>30	string	\376\103			DGNFile
+>4	string	\030\000\000			CITFile
+>4	string	\030\000\003			CITFile
+
+# AutoCad, from Nahuel Greco
+# AutoCAD DWG versions R12/R13/R14 (www.autodesk.com)
+0	string AC1012	AutoCad (release 12)
+0	string AC1013	AutoCad (release 13)
+0	string AC1014	AutoCad (release 14)
+
+# CAD: file(1) magic for computer aided design files
+# Phillip Griffith <phillip dot griffith at gmail dot com>
+# AutoCAD magic taken from the Open Design Alliance's OpenDWG specifications.
+#
+0	belong	0x08051700	Bentley/Intergraph MicroStation DGN cell library
+0	belong	0x0809fe02	Bentley/Intergraph MicroStation DGN vector CAD
+0	belong	0xc809fe02	Bentley/Intergraph MicroStation DGN vector CAD
+0	beshort	0x0809		Bentley/Intergraph MicroStation
+>0x02	byte	0xfe
+>>0x04	beshort	0x1800		CIT raster CAD
+0	string	AC1012		AutoDesk AutoCAD R13
+0	string	AC1014		AutoDesk AutoCAD R14 
+0	string	AC1015		AutoDesk AutoCAD R2000
+
+#------------------------------------------------------------------------------
+# $File: cafebabe,v 1.8 2009/09/19 16:28:08 christos Exp $
+# Cafe Babes unite!
+#
+# Since Java bytecode and Mach-O fat-files have the same magic number, the test
+# must be performed in the same "magic" sequence to get both right.  The long
+# at offset 4 in a mach-O fat file tells the number of architectures; the short at
+# offset 4 in a Java bytecode file is the JVM minor version and the
+# short at offset 6 is the JVM major version.  Since there are only 
+# only 18 labeled Mach-O architectures at current, and the first released 
+# Java class format was version 43.0, we can safely choose any number
+# between 18 and 39 to test the number of architectures against
+# (and use as a hack). Let's not use 18, because the Mach-O people
+# might add another one or two as time goes by...
+#
+0	belong		0xcafebabe
+!:mime	application/x-java-applet
+>4	belong		>30		compiled Java class data,
+>>6	beshort		x	        version %d.
+>>4	beshort		x       	\b%d
+# Which is which?
+#>>4	belong		0x032d		(Java 1.0)
+#>>4	belong		0x032d		(Java 1.1)
+>>4	belong		0x002e		(Java 1.2)
+>>4	belong		0x002f		(Java 1.3)
+>>4	belong		0x0030		(Java 1.4)
+>>4	belong		0x0031		(Java 1.5)
+>>4	belong		0x0032		(Java 1.6)
+
+
+0	belong		0xcafebabe
+>4	belong		1		Mach-O fat file with 1 architecture
+>4	belong		>1
+>>4	belong		<20		Mach-O fat file with %ld architectures
+
+0	belong		0xcafed00d	JAR compressed with pack200,
+>>5	byte		x		version %d.
+>>4	byte		x		\b%d
+!:mime	application/x-java-pack200
+
+#------------------------------------------------------------------------------
+# $File: cddb,v 1.4 2009/09/19 16:28:08 christos Exp $
+# CDDB: file(1) magic for CDDB(tm) format CD text data files
+#
+# From <steve at gracenote.com>
+#
+# This is the /etc/magic entry to decode datafiles as used by
+# CDDB-enabled CD player applications.
+#
+
+0	search/1/w	#\040xmcd	CDDB(tm) format CD text data
+
+#------------------------------------------------------------------------------
+# $File: chord,v 1.4 2009/09/19 16:28:08 christos Exp $
+# chord: file(1) magic for Chord music sheet typesetting utility input files
+#
+# From Philippe De Muyter <phdm at macqel.be>
+# File format is actually free, but many distributed files begin with `{title'
+#
+0	string		{title		Chord text file
+
+
+#------------------------------------------------------------------------------
+# $File: cisco,v 1.4 2009/09/19 16:28:08 christos Exp $
+# cisco:  file(1) magic for cisco Systems routers
+#
+# Most cisco file-formats are covered by the generic elf code
+#
+# Microcode files are non-ELF, 0x8501 conflicts with NetBSD/alpha.
+0	belong&0xffffff00	0x85011400  cisco IOS microcode
+>7	string		>\0		    for '%s'
+0	belong&0xffffff00	0x8501cb00  cisco IOS experimental microcode
+>7	string		>\0		    for '%s'
+
+#------------------------------------------------------------------------------
+# $File: citrus,v 1.4 2009/09/19 16:28:08 christos Exp $
+# citrus locale declaration
+#
+
+0	string		RuneCT		Citrus locale declaration for LC_CTYPE
+
+
+#------------------------------------------------------------------------------
+# $File: clarion,v 1.4 2009/09/19 16:28:08 christos Exp $
+# clarion:  file(1) magic for # Clarion Personal/Professional Developer
+# (v2 and above)
+# From: Julien Blache <jb at jblache.org>
+
+# Database files
+# signature
+0	leshort	0x3343	Clarion Developer (v2 and above) data file
+# attributes
+>2	leshort	&0x0001	\b, locked
+>2	leshort	&0x0004	\b, encrypted
+>2	leshort	&0x0008	\b, memo file exists
+>2	leshort	&0x0010	\b, compressed
+>2	leshort	&0x0040	\b, read only
+# number of records
+>5	lelong	x	\b, %ld records
+
+# Memo files
+0	leshort	0x334d	Clarion Developer (v2 and above) memo data
+
+# Key/Index files
+# No magic? :(
+
+# Help files
+0	leshort	0x49e0	Clarion Developer (v2 and above) help data
+
+#------------------------------------------------------------------------------
+# $File: claris,v 1.5 2009/09/19 16:28:08 christos Exp $
+# claris:  file(1) magic for claris
+# "H. Nanosecond" <aldomel at ix.netcom.com>
+# Claris Works a word processor, etc.
+# Version 3.0
+
+# .pct claris works clip art files
+#0000000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
+#*
+#0001000 #010 250 377 377 377 377 000 213 000 230 000 021 002 377 014 000
+#null to byte 1000 octal
+514	string	\377\377\377\377\000	Claris clip art?
+>0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0	yes.
+514	string	\377\377\377\377\001	Claris clip art?
+>0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0	yes.
+
+# Claris works files
+# .cwk
+0	string	\002\000\210\003\102\117\102\117\000\001\206 Claris works document
+# .plt
+0	string	\020\341\000\000\010\010	Claris Works pallete files .plt
+
+# .msp a dictionary file I am not sure about this I have only one .msp file
+0	string	\002\271\262\000\040\002\000\164	Claris works dictionary
+
+# .usp are user dictionary bits
+# I am not sure about a magic header:
+#0000000 001 123 160 146 070 125 104 040 136 123 015 012 160 157 144 151
+#        soh   S   p   f   8   U   D  sp   ^   S  cr  nl   p   o   d   i
+#0000020 141 164 162 151 163 164 040 136 123 015 012 144 151 166 040 043
+#          a   t   r   i   s   t  sp   ^   S  cr  nl   d   i   v  sp   #
+
+# .mth Thesaurus
+# starts with \0 but no magic header
+
+# .chy Hyphenation file
+# I am not sure: 000 210 034 000 000
+
+# other claris files
+#./windows/claris/useng.ndx: data
+#./windows/claris/xtndtran.l32: data
+#./windows/claris/xtndtran.lst: data
+#./windows/claris/clworks.lbl: data
+#./windows/claris/clworks.prf: data
+#./windows/claris/userd.spl: data
+
+#------------------------------------------------------------------------------
+# $File: clipper,v 1.6 2009/09/19 16:28:08 christos Exp $
+# clipper:  file(1) magic for Intergraph (formerly Fairchild) Clipper.
+#
+# XXX - what byte order does the Clipper use?
+#
+# XXX - what's the "!" stuff:
+#
+# >18	short		!074000,000000	C1 R1 
+# >18	short		!074000,004000	C2 R1
+# >18	short		!074000,010000	C3 R1
+# >18	short		!074000,074000	TEST
+#
+# I shall assume it's ANDing the field with the first value and
+# comparing it with the second, and rewrite it as:
+#
+# >18	short&074000	000000		C1 R1 
+# >18	short&074000	004000		C2 R1
+# >18	short&074000	010000		C3 R1
+# >18	short&074000	074000		TEST
+#
+# as SVR3.1's "file" doesn't support anything of the "!074000,000000"
+# sort, nor does SunOS 4.x, so either it's something Intergraph added
+# in CLIX, or something AT&T added in SVR3.2 or later, or something
+# somebody else thought was a good idea; it's not documented in the
+# man page for this version of "magic", nor does it appear to be
+# implemented (at least not after I blew off the bogus code to turn
+# old-style "&"s into new-style "&"s, which just didn't work at all).
+#
+0	short		0575		CLIPPER COFF executable (VAX #)
+>20	short		0407		(impure)
+>20	short		0410		(5.2 compatible)
+>20	short		0411		(pure)
+>20	short		0413		(demand paged)
+>20	short		0443		(target shared library)
+>12	long		>0		not stripped
+>22	short		>0		- version %ld
+0	short		0577		CLIPPER COFF executable
+>18	short&074000	000000		C1 R1 
+>18	short&074000	004000		C2 R1
+>18	short&074000	010000		C3 R1
+>18	short&074000	074000		TEST
+>20	short		0407		(impure)
+>20	short		0410		(pure)
+>20	short		0411		(separate I&D)
+>20	short		0413		(paged)
+>20	short		0443		(target shared library)
+>12	long		>0		not stripped
+>22	short		>0		- version %ld
+>48	long&01		01		alignment trap enabled
+>52	byte		1		-Ctnc
+>52	byte		2		-Ctsw
+>52	byte		3		-Ctpw
+>52	byte		4		-Ctcb
+>53	byte		1		-Cdnc
+>53	byte		2		-Cdsw
+>53	byte		3		-Cdpw
+>53	byte		4		-Cdcb
+>54	byte		1		-Csnc
+>54	byte		2		-Cssw
+>54	byte		3		-Cspw
+>54	byte		4		-Cscb
+4	string		pipe		CLIPPER instruction trace
+4	string		prof		CLIPPER instruction profile
+
+#------------------------------------------------------------------------------
+# $File: commands,v 1.36 2010/01/24 18:41:11 christos Exp $
+# commands:  file(1) magic for various shells and interpreters
+#
+#0	string		:			shell archive or script for antique kernel text
+0	string/w	#!\ /bin/sh		POSIX shell script text executable
+!:mime	text/x-shellscript
+0	string/w	#!\ /bin/csh		C shell script text executable
+!:mime	text/x-shellscript
+# korn shell magic, sent by George Wu, gwu at clyde.att.com
+0	string/w	#!\ /bin/ksh		Korn shell script text executable
+!:mime	text/x-shellscript
+0	string/w 	#!\ /bin/tcsh		Tenex C shell script text executable
+!:mime	text/x-shellscript
+0	string/w 	#!\ /usr/local/tcsh	Tenex C shell script text executable
+!:mime	text/x-shellscript
+0	string/w	#!\ /usr/local/bin/tcsh	Tenex C shell script text executable
+!:mime	text/x-shellscript
+
+#
+# zsh/ash/ae/nawk/gawk magic from cameron at cs.unsw.oz.au (Cameron Simpson)
+0	string/w	#!\ /bin/zsh		Paul Falstad's zsh script text executable
+!:mime	text/x-shellscript
+0	string/w	#!\ /usr/bin/zsh	Paul Falstad's zsh script text executable
+!:mime	text/x-shellscript
+0	string/w	#!\ /usr/local/bin/zsh	Paul Falstad's zsh script text executable
+!:mime	text/x-shellscript
+0	string/w	#!\ /usr/local/bin/ash	Neil Brown's ash script text executable
+!:mime	text/x-shellscript
+0	string/w	#!\ /usr/local/bin/ae	Neil Brown's ae script text executable
+!:mime	text/x-shellscript
+0	string/w	#!\ /bin/nawk		new awk script text executable
+!:mime	text/x-nawk
+0	string/w	#!\ /usr/bin/nawk	new awk script text executable
+!:mime	text/x-nawk
+0	string/w	#!\ /usr/local/bin/nawk	new awk script text executable
+!:mime	text/x-nawk
+0	string/w	#!\ /bin/gawk		GNU awk script text executable
+!:mime	text/x-gawk
+0	string/w	#!\ /usr/bin/gawk	GNU awk script text executable
+!:mime	text/x-gawk
+0	string/w	#!\ /usr/local/bin/gawk	GNU awk script text executable
+!:mime	text/x-gawk
+#
+0	string/w	#!\ /bin/awk		awk script text executable
+!:mime	text/x-awk
+0	string/w	#!\ /usr/bin/awk	awk script text executable
+!:mime	text/x-awk
+# update to distinguish from *.vcf files
+# this is broken because postscript has /EBEGIN{ for example.
+#0	search/Ww	BEGIN {			awk script text
+
+# AT&T Bell Labs' Plan 9 shell
+0	string/w	#!\ /bin/rc	Plan 9 rc shell script text executable
+
+# bash shell magic, from Peter Tobias (tobias at server.et-inf.fho-emden.de)
+0	string/w	#!\ /bin/bash	Bourne-Again shell script text executable
+!:mime	text/x-shellscript
+0	string/w	#!\ /usr/local/bin/bash	Bourne-Again shell script text executable
+!:mime	text/x-shellscript
+
+# using env
+0	string/t		#!/usr/bin/env		a
+>15	string/t		>\0			%s script text executable
+0	string/t		#!\ /usr/bin/env	a
+>16	string/t		>\0			%s script text executable
+
+# PHP scripts
+# Ulf Harnhammar <ulfh at update.uu.se>
+0	search/1/c	=<?php			PHP script text
+!:mime	text/x-php
+0	search/1	=<?\n			PHP script text
+!:mime	text/x-php
+0	search/1	=<?\r			PHP script text
+!:mime	text/x-php
+0	search/1/w	#!\ /usr/local/bin/php	PHP script text executable
+!:mime	text/x-php
+0	search/1/w	#!\ /usr/bin/php	PHP script text executable
+!:mime	text/x-php
+
+0	string		Zend\x00		PHP script Zend Optimizer data
+
+0	string		$!			DCL command file
+
+#----------------------------------------------------------------------------
+# $File: communications,v 1.5 2009/09/19 16:28:08 christos Exp $
+# communication
+
+# TTCN is the Tree and Tabular Combined Notation described in ISO 9646-3.
+# It is used for conformance testing of communication protocols.
+# Added by W. Borgert <debacle at debian.org>.
+0	string		$Suite			TTCN Abstract Test Suite
+>&1	string		$SuiteId
+>>&1	string		>\n			%s
+>&2	string		$SuiteId
+>>&1	string		>\n			%s
+>&3	string		$SuiteId
+>>&1	string		>\n			%s
+
+# MSC (message sequence charts) are a formal description technique,
+# described in ITU-T Z.120, mainly used for communication protocols.
+# Added by W. Borgert <debacle at debian.org>.
+0	string		mscdocument	Message Sequence Chart (document)
+0	string		msc		Message Sequence Chart (chart)
+0	string		submsc		Message Sequence Chart (subchart)
+
+#------------------------------------------------------------------------------
+# $File: compress,v 1.42 2009/09/19 16:28:08 christos Exp $
+# compress:  file(1) magic for pure-compression formats (no archives)
+#
+# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
+#
+# Formats for various forms of compressed data
+# Formats for "compress" proper have been moved into "compress.c",
+# because it tries to uncompress it to figure out what's inside.
+
+# standard unix compress
+0	string		\037\235	compress'd data
+!:mime	application/x-compress
+!:apple	LZIVZIVU
+>2	byte&0x80	>0		block compressed
+>2	byte&0x1f	x		%d bits
+
+# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver)
+#   Edited by Chris Chittleborough <cchittleborough at yahoo.com.au>, March 2002
+#	* Original filename is only at offset 10 if "extra field" absent
+#	* Produce shorter output - notably, only report compression methods
+#	  other than 8 ("deflate", the only method defined in RFC 1952).
+0       string          \037\213        gzip compressed data
+!:mime	application/x-gzip
+>2	byte		<8		\b, reserved method
+>2	byte		>8		\b, unknown method
+>3	byte		&0x01		\b, ASCII
+>3	byte		&0x02		\b, has CRC
+>3	byte		&0x04		\b, extra field
+>3	byte&0xC	=0x08
+>>10	string		x		\b, was "%s"
+>3	byte		&0x10		\b, has comment
+>9	byte		=0x00		\b, from FAT filesystem (MS-DOS, OS/2, NT)
+>9	byte		=0x01		\b, from Amiga
+>9	byte		=0x02		\b, from VMS
+>9	byte		=0x03		\b, from Unix
+>9	byte		=0x04		\b, from VM/CMS
+>9	byte		=0x05		\b, from Atari
+>9	byte		=0x06		\b, from HPFS filesystem (OS/2, NT)
+>9	byte		=0x07		\b, from MacOS
+>9	byte		=0x08		\b, from Z-System
+>9	byte		=0x09		\b, from CP/M
+>9	byte		=0x0A		\b, from TOPS/20
+>9	byte		=0x0B		\b, from NTFS filesystem (NT)
+>9	byte		=0x0C		\b, from QDOS
+>9	byte		=0x0D		\b, from Acorn RISCOS
+>3	byte		&0x10		\b, comment
+>3	byte		&0x20		\b, encrypted
+>4	ledate		>0		\b, last modified: %s
+>8	byte		2		\b, max compression
+>8	byte		4		\b, max speed
+
+# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis
+0	string		\037\036	packed data
+!:mime	application/octet-stream
+>2	belong		>1		\b, %d characters originally
+>2	belong		=1		\b, %d character originally
+#
+# This magic number is byte-order-independent.
+0	short		0x1f1f		old packed data
+!:mime	application/octet-stream
+
+# XXX - why *two* entries for "compacted data", one of which is
+# byte-order independent, and one of which is byte-order dependent?
+#
+0	short		0x1fff		compacted data
+!:mime	application/octet-stream
+# This string is valid for SunOS (BE) and a matching "short" is listed
+# in the Ultrix (LE) magic file.
+0	string		\377\037	compacted data
+!:mime	application/octet-stream
+0	short		0145405		huf output
+!:mime	application/octet-stream
+
+# bzip2
+0	string		BZh		bzip2 compressed data
+!:mime	application/x-bzip2
+>3	byte		>47		\b, block size = %c00k
+
+# lzip
+0	string		LZIP		lzip compressed data
+!:mime application/x-lzip
+>4	byte		x		\b, version: %d
+
+# squeeze and crunch
+# Michael Haardt <michael at cantor.informatik.rwth-aachen.de>
+0	beshort		0x76FF		squeezed data,
+>4	string		x		original name %s
+0	beshort		0x76FE		crunched data,
+>2	string		x		original name %s
+0	beshort		0x76FD		LZH compressed data,
+>2	string		x		original name %s
+
+# Freeze
+0	string		\037\237	frozen file 2.1
+0	string		\037\236	frozen file 1.0 (or gzip 0.5)
+
+# SCO compress -H (LZH)
+0	string		\037\240	SCO compress -H (LZH) data
+
+# European GSM 06.10 is a provisional standard for full-rate speech
+# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse
+# excitation/long term prediction) coding at 13 kbit/s.
+#
+# There's only a magic nibble (4 bits); that nibble repeats every 33
+# bytes.  This isn't suited for use, but maybe we can use it someday.
+#
+# This will cause very short GSM files to be declared as data and
+# mismatches to be declared as data too!
+#0	byte&0xF0	0xd0		data
+#>33	byte&0xF0	0xd0
+#>66	byte&0xF0	0xd0
+#>99	byte&0xF0	0xd0
+#>132	byte&0xF0	0xd0		GSM 06.10 compressed audio
+
+# bzip	a block-sorting file compressor
+#	by Julian Seward <sewardj at cs.man.ac.uk> and others
+#
+#0	string		BZ		bzip compressed data
+#>2	byte		x		\b, version: %c
+#>3	string		=1		\b, compression block size 100k
+#>3	string		=2		\b, compression block size 200k
+#>3	string		=3		\b, compression block size 300k
+#>3	string		=4		\b, compression block size 400k
+#>3	string		=5		\b, compression block size 500k
+#>3	string		=6		\b, compression block size 600k
+#>3	string		=7		\b, compression block size 700k
+#>3	string		=8		\b, compression block size 800k
+#>3	string		=9		\b, compression block size 900k
+
+# lzop from <markus.oberhumer at jk.uni-linz.ac.at>
+0	string		\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a	lzop compressed data
+>9	beshort		<0x0940
+>>9	byte&0xf0	=0x00		- version 0.
+>>9	beshort&0x0fff	x		\b%03x,
+>>13	byte		1		LZO1X-1,
+>>13	byte		2		LZO1X-1(15),
+>>13	byte		3		LZO1X-999,
+## >>22	bedate		>0		last modified: %s,
+>>14	byte		=0x00		os: MS-DOS
+>>14	byte		=0x01		os: Amiga
+>>14	byte		=0x02		os: VMS
+>>14	byte		=0x03		os: Unix
+>>14	byte		=0x05		os: Atari
+>>14	byte		=0x06		os: OS/2
+>>14	byte		=0x07		os: MacOS
+>>14	byte		=0x0A		os: Tops/20
+>>14	byte		=0x0B		os: WinNT
+>>14	byte		=0x0E		os: Win32
+>9	beshort		>0x0939
+>>9	byte&0xf0	=0x00		- version 0.
+>>9	byte&0xf0	=0x10		- version 1.
+>>9	byte&0xf0	=0x20		- version 2.
+>>9	beshort&0x0fff	x		\b%03x,
+>>15	byte		1		LZO1X-1,
+>>15	byte		2		LZO1X-1(15),
+>>15	byte		3		LZO1X-999,
+## >>25	bedate		>0		last modified: %s,
+>>17	byte		=0x00		os: MS-DOS
+>>17	byte		=0x01		os: Amiga
+>>17	byte		=0x02		os: VMS
+>>17	byte		=0x03		os: Unix
+>>17	byte		=0x05		os: Atari
+>>17	byte		=0x06		os: OS/2
+>>17	byte		=0x07		os: MacOS
+>>17	byte		=0x0A		os: Tops/20
+>>17	byte		=0x0B		os: WinNT
+>>17	byte		=0x0E		os: Win32
+
+# 4.3BSD-Quasijarus Strong Compression
+# http://minnie.tuhs.org/Quasijarus/compress.html
+0	string		\037\241	Quasijarus strong compressed data
+
+# From: Cory Dikkers <cdikkers at swbell.net>
+0	string		XPKF		Amiga xpkf.library compressed data
+0	string		PP11		Power Packer 1.1 compressed data
+0	string		PP20		Power Packer 2.0 compressed data,
+>4	belong		0x09090909	fast compression
+>4	belong		0x090A0A0A	mediocre compression
+>4	belong		0x090A0B0B	good compression
+>4	belong		0x090A0C0C	very good compression
+>4	belong		0x090A0C0D	best compression
+
+# 7-zip archiver, from Thomas Klausner (wiz at danbala.tuwien.ac.at)
+# http://www.7-zip.org or DOC/7zFormat.txt 
+#
+0	string		7z\274\257\047\034	7-zip archive data,
+>6	byte		x			version %d
+>7	byte		x			\b.%d
+
+# Type: LZMA
+# URL:  http://www.7-zip.org/sdk.html
+# From: Robert Millan <rmh at aybabtu.com> and Reuben Thomas <rrt at sc3d.org>
+# Commented out because apparently not reliable (according to Debian
+# bug #364260)
+#0	string		]\000\000\200\000	LZMA compressed data
+
+# Type: LZMA
+0	lelong&0xffffff	=0x5d
+>12	leshort		=0xff			LZMA compressed data,
+>>5	lequad		=0xffffffffffffffff	streamed
+>>5	lequad		!0xffffffffffffffff	non-streamed, size %lld
+!:mime	application/x-lzma
+
+# http://tukaani.org/xz/xz-file-format.txt
+0	ustring		\xFD7zXZ\x00		xz compressed data
+!:mime	application/x-xz
+
+# AFX compressed files (Wolfram Kleff)
+2	string		-afx-		AFX compressed file data
+
+# Supplementary magic data for the file(1) command to support
+# rzip(1).  The format is described in magic(5).
+#
+# Copyright (C) 2003 by Andrew Tridgell.  You may do whatever you want with
+# this file.
+#
+0	string		RZIP		rzip compressed data
+>4	byte		x		- version %d
+>5	byte		x		\b.%d
+>6	belong		x		(%d bytes)
+
+# Type: XZ
+# URL: http://tukaani.org/xz/
+0	string		\xfd\x37\x7a\x58\x5a\x00	XZ compressed data
+!:mime application/x-xz
+
+#------------------------------------------------------------------------------
+# $File: console,v 1.16 2009/09/19 16:28:08 christos Exp $
+# Console game magic
+# Toby Deshane <hac at shoelace.digivill.net>
+#    ines:  file(1) magic for Marat's iNES Nintendo Entertainment System
+#           ROM dump format
+
+0 string NES\032 iNES ROM dump,
+>4 byte  x     %dx16k PRG
+>5 byte  x     \b, %dx8k CHR
+>6 byte&0x01  =0x1  \b, [Vert.]
+>6 byte&0x01  =0x0  \b, [Horiz.]
+>6 byte&0x02  =0x2  \b, [SRAM]
+>6 byte&0x04  =0x4  \b, [Trainer]
+>6 byte&0x04  =0x8  \b, [4-Scr]
+
+#------------------------------------------------------------------------------
+# gameboy:  file(1) magic for the Nintendo (Color) Gameboy raw ROM format
+#
+0x104 belong 0xCEED6666 Gameboy ROM:
+>0x134 string >\0 "%.16s"
+>0x146 byte 0x03  \b,[SGB]
+>0x147 byte 0x00  \b, [ROM ONLY]
+>0x147 byte 0x01  \b, [ROM+MBC1]
+>0x147 byte 0x02  \b, [ROM+MBC1+RAM]
+>0x147 byte 0x03  \b, [ROM+MBC1+RAM+BATT]
+>0x147 byte 0x05  \b, [ROM+MBC2]
+>0x147 byte 0x06  \b, [ROM+MBC2+BATTERY]
+>0x147 byte 0x08  \b, [ROM+RAM]
+>0x147 byte 0x09  \b, [ROM+RAM+BATTERY]
+>0x147 byte 0x0B  \b, [ROM+MMM01]
+>0x147 byte 0x0C  \b, [ROM+MMM01+SRAM]
+>0x147 byte 0x0D  \b, [ROM+MMM01+SRAM+BATT]
+>0x147 byte 0x0F  \b, [ROM+MBC3+TIMER+BATT]
+>0x147 byte 0x10  \b, [ROM+MBC3+TIMER+RAM+BATT]
+>0x147 byte 0x11  \b, [ROM+MBC3]
+>0x147 byte 0x12  \b, [ROM+MBC3+RAM]
+>0x147 byte 0x13  \b, [ROM+MBC3+RAM+BATT]
+>0x147 byte 0x19  \b, [ROM+MBC5]
+>0x147 byte 0x1A  \b, [ROM+MBC5+RAM]
+>0x147 byte 0x1B  \b, [ROM+MBC5+RAM+BATT]
+>0x147 byte 0x1C  \b, [ROM+MBC5+RUMBLE]
+>0x147 byte 0x1D  \b, [ROM+MBC5+RUMBLE+SRAM]
+>0x147 byte 0x1E  \b, [ROM+MBC5+RUMBLE+SRAM+BATT]
+>0x147 byte 0x1F  \b, [Pocket Camera]
+>0x147 byte 0xFD  \b, [Bandai TAMA5]
+>0x147 byte 0xFE  \b, [Hudson HuC-3]
+>0x147 byte 0xFF  \b, [Hudson HuC-1]
+
+>0x148 byte 0     \b, ROM: 256Kbit
+>0x148 byte 1     \b, ROM: 512Kbit
+>0x148 byte 2     \b, ROM: 1Mbit
+>0x148 byte 3     \b, ROM: 2Mbit
+>0x148 byte 4     \b, ROM: 4Mbit
+>0x148 byte 5     \b, ROM: 8Mbit
+>0x148 byte 6     \b, ROM: 16Mbit
+>0x148 byte 0x52  \b, ROM: 9Mbit
+>0x148 byte 0x53  \b, ROM: 10Mbit
+>0x148 byte 0x54  \b, ROM: 12Mbit
+
+>0x149 byte 1     \b, RAM: 16Kbit
+>0x149 byte 2     \b, RAM: 64Kbit
+>0x149 byte 3     \b, RAM: 128Kbit
+>0x149 byte 4     \b, RAM: 1Mbit
+
+#>0x14e long  x     \b, CRC: %x
+
+#------------------------------------------------------------------------------
+# genesis:  file(1) magic for the Sega MegaDrive/Genesis raw ROM format
+#
+0x100 string SEGA  Sega MegaDrive/Genesis raw ROM dump
+>0x120 string >\0 Name: "%.16s"
+>0x110 string >\0 %.16s
+>0x1B0 string RA with SRAM
+
+#------------------------------------------------------------------------------
+# genesis:  file(1) magic for the Super MegaDrive ROM dump format
+#
+0x280 string EAGN  Super MagicDrive ROM dump
+>0 byte x %dx16k blocks
+>2 byte 0 \b, last in series or standalone
+>2 byte >0 \b, split ROM
+>8 byte 0xAA
+>9 byte 0xBB
+
+#------------------------------------------------------------------------------
+# genesis:  file(1) alternate magic for the Super MegaDrive ROM dump format
+#
+0x280 string EAMG  Super MagicDrive ROM dump
+>0 byte x %dx16k blocks
+>2 byte x \b, last in series or standalone
+>8 byte 0xAA
+>9 byte 0xBB
+
+#------------------------------------------------------------------------------
+# smsgg:  file(1) magic for Sega Master System and Game Gear ROM dumps
+#
+# Does not detect all images.  Very preliminary guesswork.  Need more data
+# on format.
+#
+# FIXME: need a little more info...;P
+#
+#0 byte 0xF3
+#>1 byte 0xED  Sega Master System/Game Gear ROM dump
+#>1 byte 0x31  Sega Master System/Game Gear ROM dump
+#>1 byte 0xDB  Sega Master System/Game Gear ROM dump
+#>1 byte 0xAF  Sega Master System/Game Gear ROM dump
+#>1 byte 0xC3  Sega Master System/Game Gear ROM dump
+
+#------------------------------------------------------------------------------
+# dreamcast:  file(1) uncertain magic for the Sega Dreamcast VMU image format
+#
+0 belong 0x21068028   Sega Dreamcast VMU game image
+0 string LCDi         Dream Animator file
+
+#------------------------------------------------------------------------------
+# v64: file(1) uncertain magic for the V64 format N64 ROM dumps
+#
+0 belong 0x37804012    V64 Nintendo 64 ROM dump
+
+# From: "Nelson A. de Oliveira" <naoliv at gmail.com>
+# Nintendo .nds
+192	string	\044\377\256Qi\232	Nintendo DS Game ROM Image
+# Nintendo .gba
+0	string	\056\000\000\352$\377\256Qi	Nintendo Game Boy Advance ROM Image
+
+#------------------------------------------------------------------------------
+# msx: file(1) magic for MSX game cartridge dumps
+# Too simple - MPi
+#0 beshort 0x4142 MSX game cartridge dump 
+
+#------------------------------------------------------------------------------
+# Sony Playstation executables (Adam Sjoegren <asjo at diku.dk>) :
+0	string	PS-X\ EXE	Sony Playstation executable
+#  Area:
+>113	string	x		(%s)
+
+#------------------------------------------------------------------------------
+# Microsoft Xbox executables .xbe (Esa Hyytiä <ehyytia at cc.hut.fi>)
+0       string          XBEH            XBE, Microsoft Xbox executable
+# probabilistic checks whether signed or not
+>0x0004 ulelong =0x0
+>>&2    ulelong =0x0
+>>>&2   ulelong =0x0  \b, not signed
+>0x0004 ulelong >0
+>>&2    ulelong >0
+>>>&2   ulelong >0    \b, signed
+# expect base address of 0x10000
+>0x0104               ulelong =0x10000
+>>(0x0118-0x0FF60)    ulelong&0x80000007  0x80000007 \b, all regions
+>>(0x0118-0x0FF60)    ulelong&0x80000007  !0x80000007
+>>>(0x0118-0x0FF60)   ulelong >0           (regions:
+>>>>(0x0118-0x0FF60)  ulelong &0x00000001  NA
+>>>>(0x0118-0x0FF60)  ulelong &0x00000002  Japan
+>>>>(0x0118-0x0FF60)  ulelong &0x00000004  Rest_of_World
+>>>>(0x0118-0x0FF60)  ulelong &0x80000000  Manufacturer
+>>>(0x0118-0x0FF60)   ulelong >0           \b)
+
+# --------------------------------
+# Microsoft Xbox data file formats
+0       string          XIP0            XIP, Microsoft Xbox data
+0       string          XTF0            XTF, Microsoft Xbox data
+
+# Atari Lynx cartridge dump (EXE/BLL header)
+# From: "Stefan A. Haubenthal" <polluks at web.de>
+
+0	beshort		0x8008		Lynx cartridge,
+>2	beshort		x		RAM start $%04x
+>6	string		BS93
+
+# Opera file system that is used on the 3DO console
+# From: Serge van den Boom <svdb at stack.nl>
+0	string		\x01ZZZZZ\x01	3DO "Opera" file system
+
+# From Gürkan Sengün <gurkan at linuks.mine.nu>, www.linuks.mine.nu
+0	string		GBS		Nintendo Gameboy Music/Audio Data
+12	string		GameBoy\ Music\ Module	Nintendo Gameboy Music Module
+
+# Playstations Patch Files from: From: Thomas Klausner <tk at giga.or.at>
+0	string	PPF30			Playstation Patch File version 3.0
+>5	byte	0			\b, PPF 1.0 patch
+>5	byte	1			\b, PPF 2.0 patch
+>5	byte	2			\b, PPF 3.0 patch
+>>56	byte	0			\b, Imagetype BIN (any)
+>>56	byte	1			\b, Imagetype GI (PrimoDVD)
+>>57	byte	0			\b, Blockcheck disabled
+>>57	byte	1			\b, Blockcheck enabled
+>>58	byte	0			\b, Undo data not available
+>>58	byte	1			\b, Undo data available
+>6	string	x			\b, description: %s
+
+0	string	PPF20			Playstation Patch File version 2.0
+>5	byte	0			\b, PPF 1.0 patch
+>5	byte	1			\b, PPF 2.0 patch
+>>56	lelong	>0			\b, size of file to patch %d
+>6	string	x			\b, description: %s
+
+0	string	PPF10			Playstation Patch File version 1.0
+>5	byte	0			\b, Simple Encoding
+>6	string	x			\b, description: %s
+
+# From: Daniel Dawson <ddawson at icehouse.net>
+# SNES9x .smv "movie" file format.
+0		string		SMV\x1A	SNES9x input recording
+>0x4		lelong		x	\b, version %d
+# version 4 is latest so far 
+>0x4		lelong		<5
+>>0x8		ledate		x	\b, recorded at %s
+>>0xc		lelong		>0	\b, rerecorded %d times
+>>0x10		lelong		x	\b, %d frames long
+>>0x14		byte		>0	\b, data for controller(s):
+>>>0x14		byte		&0x1	#1
+>>>0x14		byte		&0x2	#2
+>>>0x14		byte		&0x4	#3
+>>>0x14		byte		&0x8	#4
+>>>0x14		byte		&0x10	#5
+>>0x15		byte		^0x1	\b, begins from snapshot
+>>0x15		byte		&0x1	\b, begins from reset
+>>0x15		byte		^0x2	\b, NTSC standard
+>>0x15		byte		&0x2	\b, PAL standard
+>>0x17		byte		&0x1    \b, settings:
+# WIP1Timing not used as of version 4
+>>>0x4		lelong		<4
+>>>>0x17	byte		&0x2	WIP1Timing
+>>>0x17		byte		&0x4	Left+Right
+>>>0x17		byte		&0x8	VolumeEnvX
+>>>0x17		byte		&0x10	FakeMute
+>>>0x17		byte		&0x20	SyncSound
+# New flag as of version 4
+>>>0x4		lelong		>3
+>>>>0x17	byte		&0x80	NoCPUShutdown
+>>0x4		lelong		<4
+>>>0x18		lelong		>0x23
+>>>>0x20	leshort		!0
+>>>>>0x20	lestring16	x	\b, metadata: "%s"
+>>0x4		lelong		>3
+>>>0x24		byte		>0	\b, port 1:
+>>>>0x24	byte		1	joypad
+>>>>0x24	byte		2	mouse
+>>>>0x24	byte		3	SuperScope
+>>>>0x24	byte		4	Justifier
+>>>>0x24	byte		5	multitap
+>>>0x24		byte		>0	\b, port 2:
+>>>>0x25	byte		1	joypad
+>>>>0x25	byte		2	mouse
+>>>>0x25	byte		3	SuperScope
+>>>>0x25	byte		4	Justifier
+>>>>0x25	byte		5	multitap
+>>>0x18		lelong		>0x43
+>>>>0x40	leshort		!0
+>>>>>0x40	lestring16	x	\b, metadata: "%s"
+>>0x17		byte		&0x40   \b, ROM:
+>>>(0x18.l-26)	lelong		x	CRC32 0x%08x
+>>>(0x18.l-23)	string		x	"%s"
+
+
+#------------------------------------------------------------------------------
+# $File: convex,v 1.7 2009/09/19 16:28:08 christos Exp $
+# convex:  file(1) magic for Convex boxes
+#
+# Convexes are big-endian.
+#
+# /*\
+#  * Below are the magic numbers and tests added for Convex.
+#  * Added at beginning, because they are expected to be used most.
+# \*/
+0	belong	0507	Convex old-style object
+>16	belong	>0	not stripped
+0	belong	0513	Convex old-style demand paged executable
+>16	belong	>0	not stripped
+0	belong	0515	Convex old-style pre-paged executable
+>16	belong	>0	not stripped
+0	belong	0517	Convex old-style pre-paged, non-swapped executable
+>16	belong	>0	not stripped
+0	belong	0x011257	Core file
+#
+# The following are a series of dump format magic numbers.  Each one
+# corresponds to a drastically different dump format.  The first on is
+# the original dump format on a 4.1 BSD or earlier file system.  The
+# second marks the change between the 4.1 file system and the 4.2 file
+# system.  The Third marks the changing of the block size from 1K
+# to 2K to be compatible with an IDC file system.  The fourth indicates
+# a dump that is dependent on Convex Storage Manager, because data in
+# secondary storage is not physically contained within the dump.
+# The restore program uses these number to determine how the data is
+# to be extracted.
+#
+24	belong	=60013	dump format, 4.2 or 4.3 BSD (IDC compatible)
+24	belong	=60014	dump format, Convex Storage Manager by-reference dump
+#
+# what follows is a bunch of bit-mask checks on the flags field of the opthdr.
+# If there is no `=' sign, assume just checking for whether the bit is set?
+#
+0	belong	0601		Convex SOFF
+>88	belong&0x000f0000	=0x00000000	c1
+>88	belong			&0x00010000	c2
+>88	belong			&0x00020000	c2mp
+>88	belong			&0x00040000	parallel
+>88	belong			&0x00080000	intrinsic
+>88	belong			&0x00000001	demand paged
+>88	belong			&0x00000002	pre-paged
+>88	belong			&0x00000004	non-swapped
+>88	belong			&0x00000008	POSIX
+#
+>84	belong			&0x80000000	executable
+>84	belong			&0x40000000	object
+>84	belong&0x20000000	=0		not stripped
+>84	belong&0x18000000	=0x00000000	native fpmode
+>84	belong&0x18000000	=0x10000000	ieee fpmode
+>84	belong&0x18000000	=0x18000000	undefined fpmode
+#
+0	belong			0605		Convex SOFF core
+#
+0	belong			0607		Convex SOFF checkpoint
+>88	belong&0x000f0000	=0x00000000	c1
+>88	belong			&0x00010000	c2
+>88	belong			&0x00020000	c2mp
+>88	belong			&0x00040000	parallel
+>88	belong			&0x00080000	intrinsic
+>88	belong			&0x00000008	POSIX
+#
+>84	belong&0x18000000	=0x00000000	native fpmode
+>84	belong&0x18000000	=0x10000000	ieee fpmode
+>84	belong&0x18000000	=0x18000000	undefined fpmode
+
+#------------------------------------------------------------------------------
+# $File: cracklib,v 1.7 2009/09/19 16:28:08 christos Exp $
+# cracklib:  file (1) magic for cracklib v2.7
+
+0	lelong	0x70775631	Cracklib password index, little endian
+>4	long	>0		(%i words)
+>4	long	0		("64-bit")
+>>8	long	>-1		(%i words)
+0	belong	0x70775631	Cracklib password index, big endian
+>4	belong	>-1		(%i words)
+# really bellong 0x0000000070775631
+0	search/1	\0\0\0\0pwV1	Cracklib password index, big endian ("64-bit")
+>12	belong	>0		(%i words)
+
+# ----------------------------------------------------------------------------
+# $File: ctags,v 1.6 2009/09/19 16:28:08 christos Exp $
+# ctags:  file (1) magic for Exuberant Ctags files
+# From: Alexander Mai <mai at migdal.ikp.physik.tu-darmstadt.de>
+0	search/1	=!_TAG	Exuberant Ctags tag file text
+
+#------------------------------------------------------------------------------
+# $File: dact,v 1.4 2009/09/19 16:28:08 christos Exp $
+# dact:  file(1) magic for DACT compressed files
+#
+0	long		0x444354C3	DACT compressed data
+>4	byte		>-1		(version %i.
+>5	byte		>-1		$BS%i.
+>6	byte		>-1		$BS%i)
+>7	long		>0		$BS, original size: %i bytes
+>15	long		>30		$BS, block size: %i bytes
+
+#------------------------------------------------------------------------------
+# $File: database,v 1.24 2009/09/19 16:28:08 christos Exp $
+# database:  file(1) magic for various databases
+#
+# extracted from header/code files by Graeme Wilford (eep2gw at ee.surrey.ac.uk)
+#
+#
+# GDBM magic numbers
+#  Will be maintained as part of the GDBM distribution in the future.
+#  <downsj at teeny.org>
+0	belong	0x13579ace	GNU dbm 1.x or ndbm database, big endian
+!:mime	application/x-gdbm
+0	lelong	0x13579ace	GNU dbm 1.x or ndbm database, little endian
+!:mime	application/x-gdbm
+0	string	GDBM		GNU dbm 2.x database
+!:mime	application/x-gdbm
+#
+# Berkeley DB
+#
+# Ian Darwin's file /etc/magic files: big/little-endian version.
+#
+# Hash 1.85/1.86 databases store metadata in network byte order.
+# Btree 1.85/1.86 databases store the metadata in host byte order.
+# Hash and Btree 2.X and later databases store the metadata in host byte order.
+
+0	long	0x00061561	Berkeley DB
+!:mime	application/x-dbm
+>8	belong	4321
+>>4	belong	>2		1.86
+>>4	belong	<3		1.85
+>>4	belong	>0		(Hash, version %d, native byte-order)
+>8	belong	1234
+>>4	belong	>2		1.86
+>>4	belong	<3		1.85
+>>4	belong	>0		(Hash, version %d, little-endian)
+
+0	belong	0x00061561	Berkeley DB
+>8	belong	4321
+>>4	belong	>2		1.86
+>>4	belong	<3		1.85
+>>4	belong	>0		(Hash, version %d, big-endian)
+>8	belong	1234
+>>4	belong	>2		1.86
+>>4	belong	<3		1.85
+>>4	belong	>0		(Hash, version %d, native byte-order)
+
+0	long	0x00053162	Berkeley DB 1.85/1.86
+>4	long	>0		(Btree, version %d, native byte-order)
+0	belong	0x00053162	Berkeley DB 1.85/1.86
+>4	belong	>0		(Btree, version %d, big-endian)
+0	lelong	0x00053162	Berkeley DB 1.85/1.86
+>4	lelong	>0		(Btree, version %d, little-endian)
+
+12	long	0x00061561	Berkeley DB
+>16	long	>0		(Hash, version %d, native byte-order)
+12	belong	0x00061561	Berkeley DB
+>16	belong	>0		(Hash, version %d, big-endian)
+12	lelong	0x00061561	Berkeley DB
+>16	lelong	>0		(Hash, version %d, little-endian)
+
+12	long	0x00053162	Berkeley DB
+>16	long	>0		(Btree, version %d, native byte-order)
+12	belong	0x00053162	Berkeley DB
+>16	belong	>0		(Btree, version %d, big-endian)
+12	lelong	0x00053162	Berkeley DB
+>16	lelong	>0		(Btree, version %d, little-endian)
+
+12	long	0x00042253	Berkeley DB
+>16	long	>0		(Queue, version %d, native byte-order)
+12	belong	0x00042253	Berkeley DB
+>16	belong	>0		(Queue, version %d, big-endian)
+12	lelong	0x00042253	Berkeley DB
+>16	lelong	>0		(Queue, version %d, little-endian)
+
+# From Max Bowsher.
+12	long	0x00040988	Berkeley DB
+>16	long	>0		(Log, version %d, native byte-order)
+12	belong	0x00040988	Berkeley DB 
+>16	belong	>0		(Log, version %d, big-endian)
+12	lelong	0x00040988	Berkeley DB
+>16	lelong	>0		(Log, version %d, little-endian)
+
+#
+#
+# Round Robin Database Tool by Tobias Oetiker <oetiker at ee.ethz.ch>
+0	string/b	RRD\0		RRDTool DB
+>4	string/b	x		version %s
+#----------------------------------------------------------------------
+# ROOT: file(1) magic for ROOT databases
+#
+0       string  root\0  ROOT file
+>4      belong  x       Version %d
+>33     belong  x       (Compression: %d)
+
+# XXX: Weak magic.
+# Alex Ott <ott at jet.msk.su>
+## Paradox file formats
+#2	  leshort	0x0800	Paradox 
+#>0x39	  byte		3	v. 3.0 
+#>0x39	  byte		4	v. 3.5 
+#>0x39	  byte		9	v. 4.x 
+#>0x39	  byte		10	v. 5.x 
+#>0x39	  byte		11	v. 5.x 
+#>0x39	  byte		12	v. 7.x 
+#>>0x04	  byte		0	indexed .DB data file 
+#>>0x04	  byte		1	primary index .PX file 
+#>>0x04	  byte		2	non-indexed .DB data file 
+#>>0x04	  byte		3	non-incrementing secondary index .Xnn file 
+#>>0x04	  byte		4	secondary index .Ynn file 
+#>>0x04	  byte		5	incrementing secondary index .Xnn file 
+#>>0x04	  byte		6	non-incrementing secondary index .XGn file 
+#>>0x04	  byte		7	secondary index .YGn file 
+#>>>0x04	  byte		8	incrementing secondary index .XGn file 
+
+## XBase database files
+#0      byte       0x02	
+#>8     leshort	  >0
+#>>12   leshort    0	FoxBase 
+#!:mime	application/x-dbf
+#>>>0x04	lelong		0		(no records)
+#>>>0x04	lelong		>0		(%ld records)
+#
+#0      byte       0x03	
+#!:mime	application/x-dbf
+#>8     leshort	  >0
+#>>12   leshort    0	FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo 
+#>>>0x04	lelong		0		(no records)
+#>>>0x04	lelong		>0		(%ld records)
+#
+#0      byte       0x04	
+#!:mime	application/x-dbf
+#>8     leshort	  >0
+#>>12   leshort    0	dBASE IV no memo file 
+#>>>0x04	lelong		0		(no records)
+#>>>0x04	lelong		>0		(%ld records)
+#
+#0      byte       0x05	
+#!:mime	application/x-dbf
+#>8     leshort	  >0
+#>>12   leshort    0	dBASE V no memo file 
+#>>>0x04	lelong		0		(no records)
+#>>>0x04	lelong		>0		(%ld records)
+#
+#0      byte       0x30
+#!:mime	application/x-dbf
+#>8     leshort	  >0
+#>>12   leshort    0	Visual FoxPro 
+#>>>0x04	lelong		0		(no records)
+#>>>0x04	lelong		>0		(%ld records)
+#
+#0      byte       0x43
+#!:mime	application/x-dbf
+#>8     leshort	  >0
+#>>12   leshort    0	FlagShip with memo var size 
+#>>>0x04	lelong		0		(no records)
+#>>>0x04	lelong		>0		(%ld records)
+#
+#0      byte       0x7b
+#!:mime	application/x-dbf
+#>8     leshort	  >0
+#>>12   leshort    0	dBASEIV with memo 
+#>>>0x04	lelong		0		(no records)
+#>>>0x04	lelong		>0		(%ld records)
+#
+#0      byte       0x83	
+#!:mime	application/x-dbf
+#>8     leshort	  >0
+#>>12   leshort    0	FoxBase+, dBaseIII+ with memo 
+#>>>0x04	lelong		0		(no records)
+#>>>0x04	lelong		>0		(%ld records)
+#
+#0      byte       0x8b
+#!:mime	application/x-dbf
+#>8     leshort	  >0
+#>>12   leshort    0	dBaseIV with memo 
+#>>>0x04	lelong		0		(no records)
+#>>>0x04	lelong		>0		(%ld records)
+#
+#0      byte       0x8e	
+#!:mime	application/x-dbf
+#>8     leshort	  >0
+#>>12   leshort    0	dBaseIV with SQL Table 
+#>>>0x04	lelong		0		(no records)
+#>>>0x04	lelong		>0		(%ld records)
+#
+#0      byte       0xb3
+#!:mime	application/x-dbf
+#>8     leshort	  >0
+#>>12   leshort    0	FlagShip with .dbt memo 
+#>>>0x04	lelong		0		(no records)
+#>>>0x04	lelong		>0		(%ld records)
+#
+#0      byte       0xf5
+#!:mime	application/x-dbf
+#>8     leshort	  >0
+#>>12   leshort    0	FoxPro with memo 
+#>>>0x04	lelong		0		(no records)
+#>>>0x04	lelong		>0		(%ld records)
+#
+#0	leshort		0x0006		DBase 3 index file
+
+# MS Access database
+4	string	Standard\ Jet\ DB	Microsoft Access Database
+!:mime	application/x-msaccess
+
+# TDB database from Samba et al - Martin Pool <mbp at samba.org>
+0	string	TDB\ file		TDB database
+>32	lelong	0x2601196D		version 6, little-endian
+>>36	lelong	x			hash size %d bytes
+
+# SE Linux policy database
+0       lelong  0xf97cff8c      SE Linux policy
+>16     lelong  x               v%d
+>20     lelong  1      MLS
+>24     lelong  x       %d symbols
+>28     lelong  x       %d ocons
+
+# ICE authority file data (Wolfram Kleff)
+2	string		ICE		ICE authority data
+
+# X11 Xauthority file (Wolfram Kleff)
+10	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
+11	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
+12	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
+13	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
+14	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
+15	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
+16	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
+17	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
+18	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
+
+# From: Maxime Henrion <mux at FreeBSD.org>
+# PostgreSQL's custom dump format, Maxime Henrion <mux at FreeBSD.org>
+0	string		PGDMP		PostgreSQL custom database dump
+>5	byte		x		- v%d
+>6	byte		x		\b.%d
+>5	beshort		<0x101		\b-0
+>5	beshort		>0x100
+>>7	byte		x		\b-%d
+
+# Type: Advanced Data Format (ADF) database
+# URL:  http://www.grc.nasa.gov/WWW/cgns/adf/
+# From: Nicolas Chauvat <nicolas.chauvat at logilab.fr>
+0	string	@(#)ADF\ Database	CGNS Advanced Data Format
+
+# Tokyo Cabinet magic data
+# http://tokyocabinet.sourceforge.net/index.html
+0	string		ToKyO\ CaBiNeT\n	Tokyo Cabinet
+>14	string		x			\b (%s)
+>32	byte		0			\b, Hash
+!:mime	application/x-tokyocabinet-hash
+>32	byte		1			\b, B+ tree
+!:mime	application/x-tokyocabinet-btree
+>32	byte		2			\b, Fixed-length
+!:mime	application/x-tokyocabinet-fixed
+>32	byte		3			\b, Table
+!:mime	application/x-tokyocabinet-table
+>33	byte		&1			\b, [open]
+>33	byte		&2			\b, [fatal]
+>34	byte		x			\b, apow=%d
+>35	byte		x			\b, fpow=%d
+>36	byte		&0x01			\b, [large]
+>36	byte		&0x02			\b, [deflate]
+>36	byte		&0x04			\b, [bzip]
+>36	byte		&0x08			\b, [tcbs]
+>36	byte		&0x10			\b, [excodec]
+>40	lequad		x			\b, bnum=%lld
+>48	lequad		x			\b, rnum=%lld
+>56	lequad		x			\b, fsiz=%lld
+
+#------------------------------------------------------------------------------
+# $File: diamond,v 1.7 2009/09/19 16:28:08 christos Exp $
+# diamond:  file(1) magic for Diamond system
+#
+# ... diamond is a multi-media mail and electronic conferencing system....
+#
+# XXX - I think it was either renamed Slate, or replaced by Slate....
+#
+#	The full deal is too long...
+#0	string	<list>\n<protocol\ bbn-multimedia-format>	Diamond Multimedia Document
+0	string	=<list>\n<protocol\ bbn-m	Diamond Multimedia Document
+
+#------------------------------------------------------------------------------
+# $File: diff,v 1.10 2009/09/19 16:28:08 christos Exp $
+# diff:  file(1) magic for diff(1) output
+#
+0	search/1	diff\ 		diff output text
+!:mime	text/x-diff
+0	search/1	***\ 		diff output text
+!:mime	text/x-diff
+0	search/1	Only\ in\ 	diff output text
+!:mime	text/x-diff
+0	search/1	Common\ subdirectories:\ 	diff output text
+!:mime	text/x-diff
+
+0	search/1	Index:		RCS/CVS diff output text
+!:mime	text/x-diff
+
+# bsdiff:  file(1) magic for bsdiff(1) output
+0	string		BSDIFF40	bsdiff(1) patch file
+
+# unified diff
+0	search/4096	---\ 
+>&0	search/1024 \n
+>>&0	search/1 +++\ 
+>>>&0	search/1024 \n
+>>>>&0	search/1 @@	unified diff output text
+!:mime	text/x-diff
+!:strength + 30
+#------------------------------------------------------------------------------
+# $File: digital,v 1.8 2009/09/19 16:28:08 christos Exp $
+#  Digital UNIX - Info
+#
+0	string	=!<arch>\n________64E	Alpha archive
+>22	string	X			-- out of date
+#
+# Alpha COFF Based Executables
+# The stripped stuff really needs to be an 8 byte (64 bit) compare,
+# but this works
+0	leshort		0x183		COFF format alpha
+>22	leshort&020000	&010000		sharable library,
+>22	leshort&020000	^010000		dynamically linked,
+>24	leshort		0410		pure
+>24	leshort		0413		demand paged
+>8	lelong		>0		executable or object module, not stripped
+>8	lelong		0
+>>12	lelong		0		executable or object module, stripped
+>>12	lelong		>0		executable or object module, not stripped
+>27     byte            >0              - version %d.
+>26     byte            >0              %d-
+>28     leshort         >0              %d
+#
+# The next is incomplete, we could tell more about this format,
+# but its not worth it.
+0	leshort		0x188	Alpha compressed COFF
+0	leshort		0x18f	Alpha u-code object
+#
+#
+# Some other interesting Digital formats,
+0	string	\377\377\177		ddis/ddif
+0	string	\377\377\174		ddis/dots archive
+0	string	\377\377\176		ddis/dtif table data
+0	string	\033c\033		LN03 output
+0	long	04553207		X image
+#
+0	string	=!<PDF>!\n		profiling data file
+#
+# Locale data tables (MIPS and Alpha).
+#
+0	short		0x0501		locale data table
+>6	short		0x24		for MIPS
+>6	short		0x40		for Alpha
+
+#------------------------------------------------------------------------------
+# $File: dolby,v 1.5 2009/09/19 16:28:08 christos Exp $
+# ATSC A/53 aka AC-3 aka Dolby Digital <ashitaka at gmx.at>
+# from http://www.atsc.org/standards/a_52a.pdf
+# corrections, additions, etc. are always welcome!
+#
+# syncword
+0       beshort         0x0b77  ATSC A/52 aka AC-3 aka Dolby Digital stream,
+# fscod
+>4      byte&0xc0       0x00    48 kHz,
+>4      byte&0xc0       0x40    44.1 kHz,
+>4      byte&0xc0       0x80    32 kHz,
+# is this one used for 96 kHz?
+>4      byte&0xc0       0xc0    reserved frequency,
+#
+>5	byte&7 = 0		\b, complete main (CM)
+>5	byte&7 = 1		\b, music and effects (ME)
+>5	byte&7 = 2		\b, visually impaired (VI)
+>5	byte&7 = 3		\b, hearing impaired (HI)
+>5	byte&7 = 4		\b, dialogue (D)
+>5	byte&7 = 5		\b, commentary (C)
+>5	byte&7 = 6		\b, emergency (E)
+# acmod
+>6      byte&0xe0       0x00    1+1 front,
+>6      byte&0xe0       0x20    1 front/0 rear,
+>6      byte&0xe0       0x40    2 front/0 rear,
+>6      byte&0xe0       0x60    3 front/0 rear,
+>6      byte&0xe0       0x80    2 front/1 rear,
+>6      byte&0xe0       0xa0    3 front/1 rear,
+>6      byte&0xe0       0xc0    2 front/2 rear,
+>6      byte&0xe0       0xe0    3 front/2 rear,
+# lfeon (these may be incorrect)
+>7      byte&0x40       0x00    LFE off,
+>7      byte&0x40       0x40    LFE on,
+#
+>4	byte&0x3e = 0x00	\b, 32 kbit/s
+>4	byte&0x3e = 0x02        \b, 40 kbit/s
+>4	byte&0x3e = 0x04        \b, 48 kbit/s
+>4	byte&0x3e = 0x06        \b, 56 kbit/s
+>4	byte&0x3e = 0x08        \b, 64 kbit/s
+>4	byte&0x3e = 0x0a        \b, 80 kbit/s
+>4	byte&0x3e = 0x0c        \b, 96 kbit/s
+>4	byte&0x3e = 0x0e        \b, 112 kbit/s
+>4	byte&0x3e = 0x10        \b, 128 kbit/s
+>4	byte&0x3e = 0x12        \b, 160 kbit/s
+>4	byte&0x3e = 0x14        \b, 192 kbit/s
+>4	byte&0x3e = 0x16        \b, 224 kbit/s
+>4	byte&0x3e = 0x18        \b, 256 kbit/s
+>4	byte&0x3e = 0x1a        \b, 320 kbit/s
+>4	byte&0x3e = 0x1c        \b, 384 kbit/s
+>4	byte&0x3e = 0x1e        \b, 448 kbit/s
+>4	byte&0x3e = 0x20        \b, 512 kbit/s
+>4	byte&0x3e = 0x22        \b, 576 kbit/s
+>4	byte&0x3e = 0x24        \b, 640 kbit/s
+# dsurmod (these may be incorrect)
+>6      beshort&0x0180  0x0000  Dolby Surround not indicated
+>6      beshort&0x0180  0x0080  not Dolby Surround encoded
+>6      beshort&0x0180  0x0100  Dolby Surround encoded
+>6      beshort&0x0180  0x0180  reserved Dolby Surround mode
+
+#------------------------------------------------------------------------------
+# $File: dump,v 1.11 2009/09/19 16:28:09 christos Exp $
+# dump:  file(1) magic for dump file format--for new and old dump filesystems
+#
+# We specify both byte orders in order to recognize byte-swapped dumps.
+#
+24	belong	60012		new-fs dump file (big endian),
+>4	bedate	x		Previous dump %s,
+>8	bedate	x		This dump %s,
+>12	belong	>0		Volume %ld,
+>692	belong	0		Level zero, type:
+>692	belong	>0		Level %d, type:
+>0	belong	1		tape header,
+>0	belong	2		beginning of file record,
+>0	belong	3		map of inodes on tape,
+>0	belong	4		continuation of file record,
+>0	belong	5		end of volume,
+>0	belong	6		map of inodes deleted,
+>0	belong	7		end of medium (for floppy),
+>676	string	>\0		Label %s,
+>696	string	>\0		Filesystem %s,
+>760	string	>\0		Device %s,
+>824	string	>\0		Host %s,
+>888	belong	>0		Flags %x
+
+24	belong	60011		old-fs dump file (big endian),
+#>4	bedate	x		Previous dump %s,
+#>8	bedate	x		This dump %s,
+>12	belong	>0		Volume %ld,
+>692	belong	0		Level zero, type:
+>692	belong	>0		Level %d, type:
+>0	belong	1		tape header,
+>0	belong	2		beginning of file record,
+>0	belong	3		map of inodes on tape,
+>0	belong	4		continuation of file record,
+>0	belong	5		end of volume,
+>0	belong	6		map of inodes deleted,
+>0	belong	7		end of medium (for floppy),
+>676	string	>\0		Label %s,
+>696	string	>\0		Filesystem %s,
+>760	string	>\0		Device %s,
+>824	string	>\0		Host %s,
+>888	belong	>0		Flags %x
+
+24	lelong	60012		new-fs dump file (little endian),
+>4	ledate	x		This dump %s,
+>8	ledate	x		Previous dump %s,
+>12	lelong	>0		Volume %ld,
+>692	lelong	0		Level zero, type:
+>692	lelong	>0		Level %d, type:
+>0	lelong	1		tape header,
+>0	lelong	2		beginning of file record,
+>0	lelong	3		map of inodes on tape,
+>0	lelong	4		continuation of file record,
+>0	lelong	5		end of volume,
+>0	lelong	6		map of inodes deleted,
+>0	lelong	7		end of medium (for floppy),
+>676	string	>\0		Label %s,
+>696	string	>\0		Filesystem %s,
+>760	string	>\0		Device %s,
+>824	string	>\0		Host %s,
+>888	lelong	>0		Flags %x
+
+24	lelong	60011		old-fs dump file (little endian),
+#>4	ledate	x		Previous dump %s,
+#>8	ledate	x		This dump %s,
+>12	lelong	>0		Volume %ld,
+>692	lelong	0		Level zero, type:
+>692	lelong	>0		Level %d, type:
+>0	lelong	1		tape header,
+>0	lelong	2		beginning of file record,
+>0	lelong	3		map of inodes on tape,
+>0	lelong	4		continuation of file record,
+>0	lelong	5		end of volume,
+>0	lelong	6		map of inodes deleted,
+>0	lelong	7		end of medium (for floppy),
+>676	string	>\0		Label %s,
+>696	string	>\0		Filesystem %s,
+>760	string	>\0		Device %s,
+>824	string	>\0		Host %s,
+>888	lelong	>0		Flags %x
+
+18	leshort	60011		old-fs dump file (16-bit, assuming PDP-11 endianness),
+>2	medate	x		Previous dump %s,
+>6	medate	x		This dump %s,
+>10	leshort	>0		Volume %ld,
+>0	leshort	1		tape header.
+>0	leshort	2		beginning of file record.
+>0	leshort	3		map of inodes on tape.
+>0	leshort	4		continuation of file record.
+>0	leshort	5		end of volume.
+>0	leshort	6		map of inodes deleted.
+>0	leshort	7		end of medium (for floppy).
+
+24	belong	0x19540119	new-fs dump file (ufs2, big endian),
+>896	beqdate	x		Previous dump %s,
+>904	beqdate	x		This dump %s,
+>12	belong	>0		Volume %ld,
+>692	belong	0		Level zero, type:
+>692	belong	>0		Level %d, type:
+>0	belong	1		tape header,
+>0	belong	2		beginning of file record,
+>0	belong	3		map of inodes on tape,
+>0	belong	4		continuation of file record,
+>0	belong	5		end of volume,
+>0	belong	6		map of inodes deleted,
+>0	belong	7		end of medium (for floppy),
+>676	string	>\0		Label %s,
+>696	string	>\0		Filesystem %s,
+>760	string	>\0		Device %s,
+>824	string	>\0		Host %s,
+>888	belong	>0		Flags %x
+
+24	lelong	0x19540119	new-fs dump file (ufs2, little endian),
+>896	leqdate	x		This dump %s,
+>904	leqdate	x		Previous dump %s,
+>12	lelong	>0		Volume %ld,
+>692	lelong	0		Level zero, type:
+>692	lelong	>0		Level %d, type:
+>0	lelong	1		tape header,
+>0	lelong	2		beginning of file record,
+>0	lelong	3		map of inodes on tape,
+>0	lelong	4		continuation of file record,
+>0	lelong	5		end of volume,
+>0	lelong	6		map of inodes deleted,
+>0	lelong	7		end of medium (for floppy),
+>676	string	>\0		Label %s,
+>696	string	>\0		Filesystem %s,
+>760	string	>\0		Device %s,
+>824	string	>\0		Host %s,
+>888	lelong	>0		Flags %x
+
+#------------------------------------------------------------------------------
+# $File: dyadic,v 1.4 2009/09/19 16:28:09 christos Exp $
+# Dyadic: file(1) magic for Dyalog APL.
+#
+0 	byte	0xaa
+>1	byte	<4		Dyalog APL
+>>1	byte	0x00		incomplete workspace
+>>1	byte	0x01		component file
+>>1	byte	0x02		external variable
+>>1	byte	0x03		workspace
+>>2	byte	x		version %d
+>>3	byte	x		.%d
+
+#------------------------------------------------------------------------------
+# $File: editors,v 1.8 2009/09/19 16:28:09 christos Exp $
+# T602 editor documents 
+# by David Necas <yeti at physics.muni.cz>
+0	string	@CT\ 	T602 document data,
+>4	string	0	Kamenicky
+>4	string	1	CP 852
+>4	string	2	KOI8-CS
+>4	string	>2	unknown encoding
+
+# Vi IMproved Encrypted file 
+# by David Necas <yeti at physics.muni.cz>
+0	string	VimCrypt~	Vim encrypted file data
+# Vi IMproved Swap file
+# by Sven Wegener <swegener at gentoo.org>
+0	string	b0VIM\ 		Vim swap file
+>&0	string	>\0		\b, version %s
+
+#------------------------------------------------------------------------------
+# $File: efi,v 1.4 2009/09/19 16:28:09 christos Exp $
+# efi:  file(1) magic for Universal EFI binaries
+
+0	lelong	0x0ef1fab9
+>4	lelong	1		Universal EFI binary with 1 architecture
+>>&0	lelong	7		\b, i386
+>>&0	lelong	0x01000007	\b, x86_64
+>4	lelong	2		Universal EFI binary with 2 architectures
+>>&0	lelong	7		\b, i386
+>>&0	lelong	0x01000007	\b, x86_64
+>>&20	lelong	7		\b, i386
+>>&20	lelong	0x01000007	\b, x86_64
+>4	lelong	>2		Universal EFI binary with %ld architectures
+
+#------------------------------------------------------------------------------
+# $File: elf,v 1.53 2009/09/19 16:28:09 christos Exp $
+# elf:  file(1) magic for ELF executables
+#
+# We have to check the byte order flag to see what byte order all the
+# other stuff in the header is in.
+#
+# What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
+#
+# Created by: unknown
+# Modified by (1): Daniel Quinlan <quinlan at yggdrasil.com>
+# Modified by (2): Peter Tobias <tobias at server.et-inf.fho-emden.de> (core support)
+# Modified by (3): Christian 'Dr. Disk' Hechelmann <drdisk at ds9.au.s.shuttle.de> (fix of core support)
+# Modified by (4): <gerardo.cacciari at gmail.com> (VMS Itanium)
+# Modified by (5): Matthias Urlichs <smurf at debian.org> (Listing of many architectures)
+0	string		\177ELF		ELF
+>4	byte		0		invalid class
+>4	byte		1		32-bit
+>4	byte		2		64-bit
+>5	byte		0		invalid byte order
+>5	byte		1		LSB
+>>16	leshort		0		no file type,
+!:strength *2
+!:mime	application/octet-stream
+>>16	leshort		1		relocatable,
+!:mime	application/x-object
+>>16	leshort		2		executable,
+!:mime	application/x-executable
+>>16	leshort		3		shared object,
+!:mime	application/x-sharedlib
+>>16	leshort		4		core file
+!:mime	application/x-coredump
+# Core file detection is not reliable.
+#>>>(0x38+0xcc) string	>\0		of '%s'
+#>>>(0x38+0x10) lelong	>0		(signal %d),
+>>16	leshort		&0xff00		processor-specific,
+>>18	leshort		0		no machine,
+>>18	leshort		1		AT&T WE32100 - invalid byte order,
+>>18	leshort		2		SPARC - invalid byte order,
+>>18	leshort		3		Intel 80386,
+>>18	leshort		4		Motorola
+>>>36	lelong		&0x01000000	68000 - invalid byte order,
+>>>36	lelong		&0x00810000	CPU32 - invalid byte order,
+>>>36	lelong		0		68020 - invalid byte order,
+>>18	leshort		5		Motorola 88000 - invalid byte order,
+>>18	leshort		6		Intel 80486,
+>>18	leshort		7		Intel 80860,
+# The official e_machine number for MIPS is now #8, regardless of endianness.
+# The second number (#10) will be deprecated later. For now, we still
+# say something if #10 is encountered, but only gory details for #8.
+>>18	leshort		8		MIPS,
+>>>36	lelong		&0x20		N32
+>>18	leshort		10		MIPS,
+>>>36	lelong		&0x20		N32
+>>18	leshort		8
+# only for 32-bit
+>>>4	byte		1
+>>>>36  lelong&0xf0000000	0x00000000	MIPS-I
+>>>>36  lelong&0xf0000000	0x10000000	MIPS-II
+>>>>36  lelong&0xf0000000	0x20000000	MIPS-III
+>>>>36  lelong&0xf0000000	0x30000000	MIPS-IV
+>>>>36  lelong&0xf0000000	0x40000000	MIPS-V
+>>>>36  lelong&0xf0000000	0x50000000	MIPS32
+>>>>36  lelong&0xf0000000	0x60000000	MIPS64
+>>>>36  lelong&0xf0000000	0x70000000	MIPS32 rel2
+>>>>36  lelong&0xf0000000	0x80000000	MIPS64 rel2
+# only for 64-bit
+>>>4	byte		2
+>>>>48  lelong&0xf0000000	0x00000000	MIPS-I
+>>>>48  lelong&0xf0000000	0x10000000	MIPS-II
+>>>>48  lelong&0xf0000000	0x20000000	MIPS-III
+>>>>48  lelong&0xf0000000	0x30000000	MIPS-IV
+>>>>48  lelong&0xf0000000	0x40000000	MIPS-V
+>>>>48  lelong&0xf0000000	0x50000000	MIPS32
+>>>>48  lelong&0xf0000000	0x60000000	MIPS64
+>>>>48  lelong&0xf0000000	0x70000000	MIPS32 rel2
+>>>>48  lelong&0xf0000000	0x80000000	MIPS64 rel2
+>>18	leshort		9		Amdahl - invalid byte order,
+>>18	leshort		10		MIPS (deprecated),
+>>18	leshort		11		RS6000 - invalid byte order,
+>>18	leshort		15		PA-RISC - invalid byte order,
+>>>50	leshort		0x0214		2.0
+>>>48	leshort		&0x0008		(LP64),
+>>18	leshort		16		nCUBE,
+>>18	leshort		17		Fujitsu VPP500,
+>>18	leshort		18		SPARC32PLUS - invalid byte order,
+>>18	leshort		20		PowerPC,
+>>18	leshort		22		IBM S/390,
+>>18	leshort		36		NEC V800,
+>>18	leshort		37		Fujitsu FR20,
+>>18	leshort		38		TRW RH-32,
+>>18	leshort		39		Motorola RCE,
+>>18	leshort		40		ARM,
+>>18	leshort		41		Alpha,
+>>18	leshort		0xa390		IBM S/390 (obsolete),
+>>18	leshort		42		Renesas SH,
+>>18	leshort		43		SPARC V9 - invalid byte order,
+>>18	leshort		44		Siemens Tricore Embedded Processor,
+>>18	leshort		45		Argonaut RISC Core, Argonaut Technologies Inc.,
+>>18	leshort		46		Renesas H8/300,
+>>18	leshort		47		Renesas H8/300H,
+>>18	leshort		48		Renesas H8S,
+>>18	leshort		49		Renesas H8/500,
+>>18	leshort		50		IA-64,
+>>18	leshort		51		Stanford MIPS-X,
+>>18	leshort		52		Motorola Coldfire,
+>>18	leshort		53		Motorola M68HC12,
+>>18	leshort		54		Fujitsu MMA,
+>>18	leshort		55		Siemens PCP,
+>>18	leshort		56		Sony nCPU,
+>>18	leshort		57		Denso NDR1,
+>>18	leshort		58		Start*Core,
+>>18	leshort		59		Toyota ME16,
+>>18	leshort		60		ST100,
+>>18	leshort		61		Tinyj emb.,
+>>18	leshort		62		x86-64,
+>>18	leshort		63		Sony DSP,
+>>18	leshort		66		FX66,
+>>18	leshort		67		ST9+ 8/16 bit,
+>>18	leshort		68		ST7 8 bit,
+>>18	leshort		69		MC68HC16,
+>>18	leshort		70		MC68HC11,
+>>18	leshort		71		MC68HC08,
+>>18	leshort		72		MC68HC05,
+>>18	leshort		73		SGI SVx,
+>>18	leshort		74		ST19 8 bit,
+>>18	leshort		75		Digital VAX,
+>>18	leshort		76		Axis cris,
+>>18	leshort		77		Infineon 32-bit embedded,
+>>18	leshort		78		Element 14 64-bit DSP,
+>>18	leshort		79		LSI Logic 16-bit DSP,
+>>18	leshort		80		MMIX,
+>>18	leshort		81		Harvard machine-independent,
+>>18	leshort		82		SiTera Prism,
+>>18	leshort		83		Atmel AVR 8-bit,
+>>18	leshort		84		Fujitsu FR30,
+>>18	leshort		85		Mitsubishi D10V,
+>>18	leshort		86		Mitsubishi D30V,
+>>18	leshort		87		NEC v850,
+>>18	leshort		88		Renesas M32R,
+>>18	leshort		89		Matsushita MN10300,
+>>18	leshort		90		Matsushita MN10200,
+>>18	leshort		91		picoJava,
+>>18	leshort		92		OpenRISC,
+>>18	leshort		93		ARC Cores Tangent-A5,
+>>18	leshort		94		Tensilica Xtensa,
+>>18	leshort		97		NatSemi 32k,
+>>18	leshort		106		Analog Devices Blackfin,
+>>18	leshort		113		Altera Nios II,
+>>18	leshort		0xae		META,
+>>18	leshort		0x3426		OpenRISC (obsolete),
+>>18	leshort		0x8472		OpenRISC (obsolete),
+>>18	leshort		0x9026		Alpha (unofficial),
+>>20	lelong		0		invalid version
+>>20	lelong		1		version 1
+>>36	lelong		1		MathCoPro/FPU/MAU Required
+>5	byte		2		MSB
+>>16	beshort		0		no file type,
+!:mime	application/octet-stream
+>>16	beshort		1		relocatable,
+!:mime	application/x-object
+>>16	beshort		2		executable,
+!:mime	application/x-executable
+>>16	beshort		3		shared object,
+!:mime	application/x-sharedlib
+>>16	beshort		4		core file,
+!:mime	application/x-coredump
+#>>>(0x38+0xcc) string	>\0		of '%s'
+#>>>(0x38+0x10) belong	>0		(signal %d),
+>>16	beshort		&0xff00		processor-specific,
+>>18	beshort		0		no machine,
+>>18	beshort		1		AT&T WE32100,
+>>18	beshort		2		SPARC,
+>>18	beshort		3		Intel 80386 - invalid byte order,
+>>18	beshort		4		Motorola
+>>>36	belong		&0x01000000	68000,
+>>>36	belong		&0x00810000	CPU32,
+>>>36	belong		0		68020,
+>>18	beshort		5		Motorola 88000,
+>>18	beshort		6		Intel 80486 - invalid byte order,
+>>18	beshort		7		Intel 80860,
+# only for MIPS - see comment in little-endian section above.
+>>18	beshort		8		MIPS,
+>>>36	belong		&0x20		N32
+>>18	beshort		10		MIPS,
+>>>36	belong		&0x20		N32
+>>18	beshort		8
+# only for 32-bit
+>>>4	byte		1
+>>>>36  belong&0xf0000000	0x00000000	MIPS-I
+>>>>36  belong&0xf0000000	0x10000000	MIPS-II
+>>>>36  belong&0xf0000000	0x20000000	MIPS-III
+>>>>36  belong&0xf0000000	0x30000000	MIPS-IV
+>>>>36  belong&0xf0000000	0x40000000	MIPS-V
+>>>>36  belong&0xf0000000	0x50000000	MIPS32
+>>>>36  belong&0xf0000000	0x60000000	MIPS64
+>>>>36  belong&0xf0000000	0x70000000	MIPS32 rel2
+>>>>36  belong&0xf0000000	0x80000000	MIPS64 rel2
+# only for 64-bit
+>>>4	byte		2
+>>>>48	belong&0xf0000000	0x00000000	MIPS-I
+>>>>48	belong&0xf0000000	0x10000000	MIPS-II
+>>>>48	belong&0xf0000000	0x20000000	MIPS-III
+>>>>48	belong&0xf0000000	0x30000000	MIPS-IV
+>>>>48	belong&0xf0000000	0x40000000	MIPS-V
+>>>>48	belong&0xf0000000	0x50000000	MIPS32
+>>>>48	belong&0xf0000000	0x60000000	MIPS64
+>>>>48	belong&0xf0000000	0x70000000	MIPS32 rel2
+>>>>48	belong&0xf0000000	0x80000000	MIPS64 rel2
+>>18	beshort		9		Amdahl,
+>>18	beshort		10		MIPS (deprecated),
+>>18	beshort		11		RS6000,
+>>18	beshort		15		PA-RISC
+>>>50	beshort		0x0214		2.0
+>>>48	beshort		&0x0008		(LP64)
+>>18	beshort		16		nCUBE,
+>>18	beshort		17		Fujitsu VPP500,
+>>18	beshort		18		SPARC32PLUS,
+>>>36	belong&0xffff00	0x000100	V8+ Required,
+>>>36	belong&0xffff00	0x000200	Sun UltraSPARC1 Extensions Required,
+>>>36	belong&0xffff00	0x000400	HaL R1 Extensions Required,
+>>>36	belong&0xffff00	0x000800	Sun UltraSPARC3 Extensions Required,
+>>18	beshort		20		PowerPC or cisco 4500,
+>>18	beshort		21		64-bit PowerPC or cisco 7500,
+>>18	beshort		22		IBM S/390,
+>>18	beshort		23		Cell SPU,
+>>18	beshort		24		cisco SVIP,
+>>18	beshort		25		cisco 7200,
+>>18	beshort		36		NEC V800 or cisco 12000,
+>>18	beshort		37		Fujitsu FR20,
+>>18	beshort		38		TRW RH-32,
+>>18	beshort		39		Motorola RCE,
+>>18	beshort		40		ARM,
+>>18	beshort		41		Alpha,
+>>18	beshort		42		Renesas SH,
+>>18	beshort		43		SPARC V9,
+>>>48	belong&0xffff00	0x000200	Sun UltraSPARC1 Extensions Required,
+>>>48	belong&0xffff00	0x000400	HaL R1 Extensions Required,
+>>>48	belong&0xffff00	0x000800	Sun UltraSPARC3 Extensions Required,
+>>>48	belong&0x3	0		total store ordering,
+>>>48	belong&0x3	1		partial store ordering,
+>>>48	belong&0x3	2		relaxed memory ordering,
+>>18	beshort		44		Siemens Tricore Embedded Processor,
+>>18	beshort		45		Argonaut RISC Core, Argonaut Technologies Inc.,
+>>18	beshort		46		Renesas H8/300,
+>>18	beshort		47		Renesas H8/300H,
+>>18	beshort		48		Renesas H8S,
+>>18	beshort		49		Renesas H8/500,
+>>18	beshort		50		IA-64,
+>>18	beshort		51		Stanford MIPS-X,
+>>18	beshort		52		Motorola Coldfire,
+>>18	beshort		53		Motorola M68HC12,
+>>18	beshort		73		Cray NV1,
+>>18	beshort		75		Digital VAX,
+>>18	beshort		88		Renesas M32R,
+>>18	leshort		92		OpenRISC,
+>>18	leshort		0x3426		OpenRISC (obsolete),
+>>18	leshort		0x8472		OpenRISC (obsolete),
+>>18	beshort		94		Tensilica Xtensa,
+>>18	beshort		97		NatSemi 32k,
+>>18	beshort		0x18ad		AVR32 (unofficial),
+>>18	beshort		0x9026		Alpha (unofficial),
+>>18	beshort		0xa390		IBM S/390 (obsolete),
+>>20	belong		0		invalid version
+>>20	belong		1		version 1
+>>36	belong		1		MathCoPro/FPU/MAU Required
+# Up to now only 0, 1 and 2 are defined; I've seen a file with 0x83, it seemed
+# like proper ELF, but extracting the string had bad results.
+>4      byte            <0x80
+>>8	string		>\0		(%s)
+>8	string		\0
+>>7	byte		0		(SYSV)
+>>7	byte		1		(HP-UX)
+>>7	byte		2		(NetBSD)
+>>7	byte		3		(GNU/Linux)
+>>7	byte		4		(GNU/Hurd)
+>>7	byte		5		(86Open)
+>>7	byte		6		(Solaris)
+>>7	byte		7		(Monterey)
+>>7	byte		8		(IRIX)
+>>7	byte		9		(FreeBSD)
+>>7	byte		10		(Tru64)
+>>7	byte		11		(Novell Modesto)
+>>7	byte		12		(OpenBSD)
+>8      string          \2
+>>7     byte            13              (OpenVMS)
+>>7	byte		97		(ARM)
+>>7	byte		255		(embedded)
+
+#------------------------------------------------------------------------------
+# $File: encore,v 1.6 2009/09/19 16:28:09 christos Exp $
+# encore:  file(1) magic for Encore machines
+#
+# XXX - needs to have the byte order specified (NS32K was little-endian,
+# dunno whether they run the 88K in little-endian mode or not).
+#
+0	short		0x154		Encore
+>20	short		0x107		executable
+>20	short		0x108		pure executable
+>20	short		0x10b		demand-paged executable
+>20	short		0x10f		unsupported executable
+>12	long		>0		not stripped
+>22	short		>0		- version %ld
+>22	short		0		-
+#>4	date		x		stamp %s
+0	short		0x155		Encore unsupported executable
+>12	long		>0		not stripped
+>22	short		>0		- version %ld
+>22	short		0		-
+#>4	date		x		stamp %s
+
+#------------------------------------------------------------------------------
+# $File: epoc,v 1.7 2009/09/19 16:28:09 christos Exp $
+# EPOC : file(1) magic for EPOC documents [Psion Series 5/Osaris/Geofox 1]
+# Stefan Praszalowicz <hpicollo at worldnet.fr> and Peter Breitenlohner <peb at mppmu.mpg.de>
+# Useful information for improving this file can be found at:
+# http://software.frodo.looijaard.name/psiconv/formats/Index.html
+#------------------------------------------------------------------------------
+0	lelong		0x10000037	Psion Series 5
+>4	lelong		0x10000039	font file
+>4	lelong		0x1000003A	printer driver
+>4	lelong		0x1000003B	clipboard
+>4	lelong		0x10000042	multi-bitmap image
+!:mime image/x-epoc-mbm
+>4	lelong		0x1000006A	application information file
+>4	lelong		0x1000006D
+>>8	lelong		0x1000007D	Sketch image
+!:mime image/x-epoc-sketch
+>>8	lelong		0x1000007E	voice note
+>>8	lelong		0x1000007F	Word file
+!:mime application/x-epoc-word
+>>8	lelong		0x10000085	OPL program (TextEd)
+!:mime application/x-epoc-opl
+>>8	lelong		0x10000088	Sheet file
+!:mime application/x-epoc-sheet
+>>8	lelong		0x100001C4	EasyFax initialisation file
+>4	lelong		0x10000073	OPO module
+!:mime application/x-epoc-opo
+>4	lelong		0x10000074	OPL application
+!:mime application/x-epoc-app
+>4	lelong		0x1000008A	exported multi-bitmap image
+
+0	lelong		0x10000041	Psion Series 5 ROM multi-bitmap image
+
+0	lelong		0x10000050	Psion Series 5
+>4	lelong		0x1000006D	database
+>4	lelong		0x100000E4	ini file
+
+0	lelong		0x10000079	Psion Series 5 binary:
+>4	lelong		0x00000000	DLL
+>4	lelong		0x10000049	comms hardware library
+>4	lelong		0x1000004A	comms protocol library
+>4	lelong		0x1000005D	OPX
+>4	lelong		0x1000006C	application
+>4	lelong		0x1000008D	DLL
+>4	lelong		0x100000AC	logical device driver
+>4	lelong		0x100000AD	physical device driver
+>4	lelong		0x100000E5	file transfer protocol
+>4	lelong		0x100000E5	file transfer protocol
+>4	lelong		0x10000140	printer definition
+>4	lelong		0x10000141	printer definition
+
+0	lelong		0x1000007A	Psion Series 5 executable
+
+#------------------------------------------------------------------------------
+# $File: erlang,v 1.5 2009/09/19 16:28:09 christos Exp $
+# erlang:  file(1) magic for Erlang JAM and BEAM files
+# URL:  http://www.erlang.org/faq/x779.html#AEN812
+
+# OTP R3-R4
+0	string	\0177BEAM!	Old Erlang BEAM file
+>6	short	>0		- version %d
+
+# OTP R5 and onwards
+0	string	FOR1
+>8	string	BEAM		Erlang BEAM file
+
+# 4.2 version may have a copyright notice!
+4	string	Tue\ Jan\ 22\ 14:32:44\ MET\ 1991	Erlang JAM file - version 4.2
+79	string	Tue\ Jan\ 22\ 14:32:44\ MET\ 1991	Erlang JAM file - version 4.2
+
+4	string	1.0\ Fri\ Feb\ 3\ 09:55:56\ MET\ 1995	Erlang JAM file - version 4.3
+
+#------------------------------------------------------------------------------
+# $File: esri,v 1.4 2009/09/19 16:28:09 christos Exp $
+# ESRI Shapefile format (.shp .shx .dbf=DBaseIII)
+# Based on info from
+# <URL:http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf>
+0	belong	9994	ESRI Shapefile
+>4	belong	=0
+>8	belong	=0
+>12	belong	=0
+>16	belong	=0
+>20	belong	=0
+>28	lelong	x	version %d
+>24	belong	x	length %d
+>32	lelong	=0	type Null Shape
+>32	lelong	=1	type Point
+>32	lelong	=3	type PolyLine
+>32	lelong	=5	type Polygon
+>32	lelong	=8	type MultiPoint
+>32	lelong	=11	type PointZ
+>32	lelong	=13	type PolyLineZ
+>32	lelong	=15	type PolygonZ
+>32	lelong	=18	type MultiPointZ
+>32	lelong	=21	type PointM
+>32	lelong	=23	type PolyLineM
+>32	lelong	=25	type PolygonM
+>32	lelong	=28	type MultiPointM
+>32	lelong	=31	type MultiPatch
+
+#------------------------------------------------------------------------------
+# $File: fcs,v 1.4 2009/09/19 16:28:09 christos Exp $
+# fcs: file(1) magic for FCS (Flow Cytometry Standard) data files
+# From Roger Leigh <roger at whinlatter.uklinux.net>
+0       string          FCS1.0          Flow Cytometry Standard (FCS) data, version 1.0
+0       string          FCS2.0          Flow Cytometry Standard (FCS) data, version 2.0
+0       string          FCS3.0          Flow Cytometry Standard (FCS) data, version 3.0
+
+
+#------------------------------------------------------------------------------
+# $File: filesystems,v 1.55 2010/01/16 17:45:12 chl Exp $
+# filesystems:  file(1) magic for different filesystems
+#
+0	string	\366\366\366\366	PC formatted floppy with no filesystem
+# Sun disk labels
+# From /usr/include/sun/dklabel.h:
+0774	beshort		0xdabe		
+# modified by Joerg Jenderek, because original test
+# succeeds for Cabinet archive dao360.dl_ with negative blocks
+>0770	long		>0		Sun disk label
+>>0	string		x		'%s
+>>>31	string		>\0		\b%s
+>>>>63	string		>\0		\b%s
+>>>>>95	string		>\0		\b%s
+>>0	string		x		\b'
+>>0734	short		>0		%d rpm,
+>>0736	short		>0		%d phys cys,
+>>0740	short		>0		%d alts/cyl,
+>>0746	short		>0		%d interleave,
+>>0750	short		>0		%d data cyls,
+>>0752	short		>0		%d alt cyls,
+>>0754	short		>0		%d heads/partition,
+>>0756	short		>0		%d sectors/track,
+>>0764	long		>0		start cyl %ld,
+>>0770	long		x		%ld blocks
+# Is there a boot block written 1 sector in?
+>512    belong&077777777	0600407	\b, boot block present
+# Joerg Jenderek: Smart Boot Manager backup file is 41 byte header + first sectors of disc
+# (http://btmgr.sourceforge.net/docs/user-guide-3.html)
+0		string	SBMBAKUP_	Smart Boot Manager backup file
+>9		string	x		\b, version %-5.5s
+>>14		string	=_		
+>>>15		string	x		%-.1s
+>>>>16		string	=_		\b.
+>>>>>17		string	x		\b%-.1s
+>>>>>>18	string	=_		\b.
+>>>>>>>19	string	x		\b%-.1s
+>>>22		ubyte	0		
+>>>>21		ubyte	x		\b, from drive 0x%x
+>>>22		ubyte	>0		
+>>>>21		string	x		\b, from drive %s
+
+# Joerg Jenderek
+# DOS Emulator image is 128 byte, null right padded header + harddisc image
+0	string	DOSEMU\0			
+>0x27E	leshort	0xAA55			
+#offset is 128
+>>19	ubyte	128			
+>>>(19.b-1)	ubyte	0x0	DOS Emulator image
+>>>>7	ulelong	>0		\b, %u heads
+>>>>11	ulelong	>0		\b, %d sectors/track
+>>>>15	ulelong	>0		\b, %d cylinders
+
+# updated by Joerg Jenderek at Sep 2007
+# only for sector sizes with 512 or more Bytes
+0x1FE	leshort	0xAA55			x86 boot sector
+# to do also for sectors < than 512 Bytes and some other files, GRR
+#30	search/481	\x55\xAA	x86 boot sector
+# not for BeOS floppy 1440k, MBRs
+#(11.s-2) uleshort	0xAA55		x86 boot sector
+>2	string	OSBS			\b, OS/BS MBR
+# J\xf6rg Jenderek <joerg dot jenderek at web dot de>
+>0x8C	string	Invalid\ partition\ table	\b, MS-DOS MBR
+# dr-dos with some upper-, lowercase variants
+>0x9D	string	Invalid\ partition\ table$	
+>>181	string	No\ Operating\ System$		
+>>>201	string	Operating\ System\ load\ error$	\b, DR-DOS MBR, Version 7.01 to 7.03
+>0x9D	string	Invalid\ partition\ table$	
+>>181	string	No\ operating\ system$		
+>>>201	string	Operating\ system\ load\ error$	\b, DR-DOS MBR, Version 7.01 to 7.03
+>342	string	Invalid\ partition\ table$	
+>>366	string	No\ operating\ system$		
+>>>386	string	Operating\ system\ load\ error$	\b, DR-DOS MBR, version 7.01 to 7.03
+>295	string	NEWLDR\0				
+>>302	string	Bad\ PT\ $				
+>>>310	string	No\ OS\ $				
+>>>>317	string	OS\ load\ err$				
+>>>>>329	string	Moved\ or\ missing\ IBMBIO.LDR\n\r	
+>>>>>>358	string	Press\ any\ key\ to\ continue.\n\r$	
+>>>>>>>387	string	Copyright\ (c)\ 1984,1998	
+>>>>>>>>411	string	Caldera\ Inc.\0		\b, DR-DOS MBR (IBMBIO.LDR)
+>0x10F	string	Ung\201ltige\ Partitionstabelle	\b, MS-DOS MBR, german version 4.10.1998, 4.10.2222
+>>0x1B8	ubelong	>0				\b, Serial 0x%-.4x
+>0x8B	string	Ung\201ltige\ Partitionstabelle	\b, MS-DOS MBR, german version 5.00 to 4.00.950
+>271	string	Invalid\ partition\ table\0		
+>>295	string	Error\ loading\ operating\ system\0	
+>>>326	string	Missing\ operating\ system\0		\b, mbr
+#
+>139	string	Invalid\ partition\ table\0		
+>>163	string	Error\ loading\ operating\ system\0	
+>>>194	string	Missing\ operating\ system\0		\b, Microsoft Windows XP mbr
+# http://www.heise.de/ct/05/09/006/ page 184
+#HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\DosDevices\?:=Serial4Bytes+8Bytes
+>>>>0x1B8	ulelong	>0				\b,Serial 0x%-.4x
+>300	string	Invalid\ partition\ table\0	
+>>324	string	Error\ loading\ operating\ system\0
+>>>355	string	Missing\ operating\ system\0		\b, Microsoft Windows XP MBR
+#??>>>389	string	Invalid\ system\ disk		
+>>>>0x1B8	ulelong	>0				\b, Serial 0x%-.4x
+>300	string	Ung\201ltige\ Partitionstabelle
+#split string to avoid error: String too long
+>>328	string	Fehler\ beim\ Laden\ 	
+>>>346	string	des\ Betriebssystems	
+>>>>366	string	Betriebssystem\ nicht\ vorhanden	\b, Microsoft Windows XP MBR (german)
+>>>>>0x1B8	ulelong	>0				\b, Serial 0x%-.4x
+#>0x145	string	Default:\ F				\b, FREE-DOS MBR
+#>0x14B	string	Default:\ F				\b, FREE-DOS 1.0 MBR
+>0x145	search/7	Default:\ F			\b, FREE-DOS MBR
+#>>313		string	F0\ .\ .\ .			
+#>>>322		string	disk\ 1				
+#>>>>382	string	FAT3				
+>64	string	no\ active\ partition\ found	
+>>96	string	read\ error\ while\ reading\ drive	\b, FREE-DOS Beta 0.9 MBR
+# Ranish Partition Manager http://www.ranish.com/part/
+>387	search/4	\0\ Error!\r			
+>>378	search/7	Virus! 				
+>>>397	search/4	Booting\ 			
+>>>>408	search/4	HD1/\0	 			\b, Ranish MBR (
+>>>>>416	string	Writing\ changes...		\b2.37
+>>>>>>438	ubyte		x			\b,0x%x dots
+>>>>>>440	ubyte		>0			\b,virus check
+>>>>>>441	ubyte		>0			\b,partition %c
+#2.38,2.42,2.44
+>>>>>416	string	!Writing\ changes...		\b
+>>>>>>418	ubyte	1				\bvirus check,
+>>>>>>419	ubyte	x				\b0x%x seconds
+>>>>>>420	ubyte&0x0F	>0			\b,partition
+>>>>>>>420	ubyte&0x0F	<5			\b %x
+>>>>>>>420	ubyte&0x0F	0Xf			\b ask
+>>>>>420	ubyte		x			\b)
+#
+>271	string	Operating\ system\ loading 		
+>>296	string	error\r					\b, SYSLINUX MBR (2.10)
+# http://www.acronis.de/
+>362	string	MBR\ Error\ \0\r			
+>>376	string	ress\ any\ key\ to\ 			
+>>>392	string	boot\ from\ floppy...\0			\b, Acronis MBR
+# added by Joerg Jenderek
+# http://www.visopsys.org/
+# http://partitionlogic.org.uk/
+>309	string	No\ bootable\ partition\ found\r	
+>>339	string	I/O\ Error\ reading\ boot\ sector\r	\b, Visopsys MBR
+>349	string	No\ bootable\ partition\ found\r	
+>>379	string	I/O\ Error\ reading\ boot\ sector\r	\b, simple Visopsys MBR
+# bootloader, bootmanager
+>0x40	string	SBML				
+# label with 11 characters of FAT 12 bit filesystem
+>>43	string	SMART\ BTMGR			
+>>>430	string	SBMK\ Bad!\r			\b, Smart Boot Manager
+# OEM-ID not always "SBM"
+#>>>>3	strings	SBM				
+>>>>6	string	>\0                             \b, version %s
+>382	string	XOSLLOADXCF			\b, eXtended Operating System Loader
+>6	string	LILO				\b, LInux i386 boot LOader
+>>120	string	LILO				\b, version 22.3.4 SuSe
+>>172	string	LILO				\b, version 22.5.8 Debian
+# updated by Joerg Jenderek at Oct 2008
+# variables according to grub-0.97/stage1/stage1.S or
+# http://www.gnu.org/software/grub/manual/grub.html#Embedded-data
+# usual values are marked with comments to get only informations of strange GRUB loaders
+>342		search/60	\0Geom\0	
+#>0		ulelong		x		%x=0x009048EB ,	0x2a9048EB  0
+>>0x41		ubyte		<2		
+>>>0x3E		ubyte		>2		\b; GRand Unified Bootloader
+# 0x3 for 0.5.95,0.93,0.94,0.96 0x4 for 1.90 
+>>>>0x3E	ubyte		x		\b, stage1 version 0x%x
+#If it is 0xFF, use a drive passed by BIOS
+>>>>0x40	ubyte		<0xFF		\b, boot drive 0x%x
+# in most case 0,1,0x2e for GRUB 0.5.95
+>>>>0x41	ubyte		>0		\b, LBA flag 0x%x
+>>>>0x42	uleshort	<0x8000		\b, stage2 address 0x%x
+#>>>>0x42	uleshort	=0x8000		\b, stage2 address 0x%x (usual)
+>>>>0x42	uleshort	>0x8000		\b, stage2 address 0x%x
+#>>>>0x44	ulelong		=1		\b, 1st sector stage2 0x%x (default)
+>>>>0x44	ulelong		>1		\b, 1st sector stage2 0x%x
+>>>>0x48	uleshort	<0x800		\b, stage2 segment 0x%x
+#>>>>0x48	uleshort	=0x800		\b, stage2 segment 0x%x (usual)
+>>>>0x48	uleshort	>0x800		\b, stage2 segment 0x%x
+>>>>402		string	Geom\0Hard\ Disk\0Read\0\ Error\0
+>>>>>394	string	stage1			\b, GRUB version 0.5.95
+>>>>382		string	Geom\0Hard\ Disk\0Read\0\ Error\0
+>>>>>376	string	GRUB\ \0		\b, GRUB version 0.93 or 1.94
+>>>>383		string	Geom\0Hard\ Disk\0Read\0\ Error\0
+>>>>>377	string	GRUB\ \0		\b, GRUB version 0.94
+>>>>385		string	Geom\0Hard\ Disk\0Read\0\ Error\0
+>>>>>379	string	GRUB\ \0		\b, GRUB version 0.95 or 0.96
+>>>>391		string	Geom\0Hard\ Disk\0Read\0\ Error\0
+>>>>>385	string	GRUB\ \0		\b, GRUB version 0.97
+#unkown version
+>>>343		string	Geom\0Read\0\ Error\0	
+>>>>321		string	Loading\ stage1.5	\b, GRUB version x.y
+>>>380		string	Geom\0Hard\ Disk\0Read\0\ Error\0
+>>>>374		string	GRUB\ \0		\b, GRUB version n.m
+# http://syslinux.zytor.com/
+>478	string	Boot\ failed\r			
+>>495	string	LDLINUX\ SYS			\b, SYSLINUX bootloader (1.62)
+>480	string	Boot\ failed\r			
+>>495	string	LDLINUX\ SYS			\b, SYSLINUX bootloader (2.06 or 2.11)
+>484	string	Boot\ error\r			\b, SYSLINUX bootloader (3.11)
+>395	string	chksum\0\ ERROR!\0		\b, Gujin bootloader
+# http://www.bcdwb.de/bcdw/index_e.htm
+>3	string	BCDL				
+>>498	string	BCDL\ \ \ \ BIN			\b, Bootable CD Loader (1.50Z)
+# mbr partition table entries
+# OEM-ID does not contain MicroSoft,NEWLDR,DOS,SYSLINUX,or MTOOLs
+>3			string		!MS
+>>3			string		!SYSLINUX
+>>>3			string		!MTOOL
+>>>>3			string		!NEWLDR
+>>>>>5			string		!DOS
+# not FAT (32 bit)
+>>>>>>82		string		!FAT32
+#not Linux kernel
+>>>>>>>514		string		!HdrS
+#not BeOS
+>>>>>>>>422		string		!Be\ Boot\ Loader
+# active flag 0 or 0x80 and type > 0
+>>>>>>>>>446		ubyte		<0x81	
+>>>>>>>>>>446		ubyte&0x7F	0	
+>>>>>>>>>>>450		ubyte		>0	\b; partition 1: ID=0x%x
+>>>>>>>>>>>>446		ubyte		0x80	\b, active
+>>>>>>>>>>>>447		ubyte		x	\b, starthead %u
+#>>>>>>>>>>>>448		ubyte		x	\b, start C_S: 0x%x
+#>>>>>>>>>>>>448		ubeshort&1023	x	\b, startcylinder? %d
+>>>>>>>>>>>>454		ulelong		x	\b, startsector %u
+>>>>>>>>>>>>458		ulelong		x	\b, %u sectors
+#
+>>>>>>>>>462		ubyte		<0x81	
+>>>>>>>>>>462		ubyte&0x7F	0		
+>>>>>>>>>>>466		ubyte		>0	\b; partition 2: ID=0x%x
+>>>>>>>>>>>>462		ubyte		0x80	\b, active
+>>>>>>>>>>>>463		ubyte		x	\b, starthead %u
+#>>>>>>>>>>>>464		ubyte		x	\b, start C_S: 0x%x
+#>>>>>>>>>>>>464		ubeshort&1023	x	\b, startcylinder? %d
+>>>>>>>>>>>>470		ulelong		x	\b, startsector %u
+>>>>>>>>>>>>474		ulelong		x	\b, %u sectors
+#
+>>>>>>>>>478		ubyte		<0x81		
+>>>>>>>>>>478		ubyte&0x7F	0		
+>>>>>>>>>>>482		ubyte		>0	\b; partition 3: ID=0x%x
+>>>>>>>>>>>>478		ubyte		0x80	\b, active
+>>>>>>>>>>>>479		ubyte		x	\b, starthead %u
+#>>>>>>>>>>>>480		ubyte		x	\b, start C_S: 0x%x
+#>>>>>>>>>>>>481		ubyte		x	\b, start C2S: 0x%x
+#>>>>>>>>>>>>480		ubeshort&1023	x	\b, startcylinder? %d
+>>>>>>>>>>>>486		ulelong		x	\b, startsector %u
+>>>>>>>>>>>>490		ulelong		x	\b, %u sectors
+#
+>>>>>>>>>494		ubyte		<0x81	
+>>>>>>>>>>494		ubyte&0x7F	0		
+>>>>>>>>>>>498		ubyte		>0	\b; partition 4: ID=0x%x
+>>>>>>>>>>>>494		ubyte		0x80	\b, active
+>>>>>>>>>>>>495		ubyte		x	\b, starthead %u
+#>>>>>>>>>>>>496		ubyte		x	\b, start C_S: 0x%x
+#>>>>>>>>>>>>496		ubeshort&1023	x	\b, startcylinder? %d
+>>>>>>>>>>>>502		ulelong		x	\b, startsector %u
+>>>>>>>>>>>>506		ulelong		x	\b, %u sectors
+# mbr partition table entries end
+# http://www.acronis.de/
+#FAT label=ACRONIS\ SZ
+#OEM-ID=BOOTWIZ0
+>442	string	Non-system\ disk,\ 	
+>>459	string	press\ any\ key...\x7\0		\b, Acronis Startup Recovery Loader
+# DOS names like F11.SYS are 8 right space padded bytes+3 bytes
+>>>477		ubyte&0xDF	>0		
+>>>>477		string		x 		\b %-.3s
+>>>>>480	ubyte&0xDF	>0		
+>>>>>>480	string		x 		\b%-.5s
+>>>>485		ubyte&0xDF	>0		
+>>>>>485	string		x 		\b.%-.3s
+#
+>185	string	FDBOOT\ Version\ 			
+>>204	string	\rNo\ Systemdisk.\ 			
+>>>220	string	Booting\ from\ harddisk.\n\r		
+>>>245	string	Cannot\ load\ from\ harddisk.\n\r	
+>>>>273 string	Insert\ Systemdisk\ 			
+>>>>>291 string and\ press\ any\ key.\n\r		\b, FDBOOT harddisk Bootloader
+>>>>>>200 string	>\0                             \b, version %-3s
+>242	string	Bootsector\ from\ C.H.\ Hochst\204	
+>>278	string	No\ Systemdisk.\ 			
+>>>293	string	Booting\ from\ harddisk.\n\r		
+>>>441	string	Cannot\ load\ from\ harddisk.\n\r	
+>>>>469 string	Insert\ Systemdisk\ 			
+>>>>>487 string and\ press\ any\ key.\n\r		\b, WinImage harddisk Bootloader
+>>>>>>209 string	>\0                             \b, version %-4.4s
+>(1.b+2)	ubyte		0xe			
+>>(1.b+3)	ubyte		0x1f			
+>>>(1.b+4)	ubyte		0xbe			
+>>>>(1.b+5)	ubyte		0x77			
+>>>>(1.b+6)	ubyte		0x7c			
+>>>>>(1.b+7)	ubyte		0xac			
+>>>>>>(1.b+8)	ubyte		0x22			
+>>>>>>>(1.b+9)	ubyte		0xc0			
+>>>>>>>>(1.b+10)	ubyte	0x74			
+>>>>>>>>>(1.b+11)	ubyte	0xb			
+>>>>>>>>>>(1.b+12)	ubyte	0x56			
+>>>>>>>>>>(1.b+13)	ubyte	0xb4			\b, mkdosfs boot message display
+>214	string	Please\ try\ to\ install\ FreeDOS\ 	\b, DOS Emulator boot message display
+#>>244	string	from\ dosemu-freedos-*-bin.tgz\r	
+#>>>170	string	Sorry,\ could\ not\ load\ an\ 		
+#>>>>195	string	operating\ system.\r\n		
+#
+>103	string	This\ is\ not\ a\ bootable\ disk.\ 	
+>>132	string	Please\ insert\ a\ bootable\ 		
+>>>157	string	floppy\ and\r\n				
+>>>>169	string	press\ any\ key\ to\ try\ again...\r	\b, FREE-DOS message display
+#
+>66	string	Solaris\ Boot\ Sector    		
+>>99	string	Incomplete\ MDBoot\ load.		
+>>>89	string	Version 				\b, Sun Solaris Bootloader
+>>>>97	byte	x					version %c
+#
+>408	string	OS/2\ !!\ SYS01475\r\0			
+>>429	string	OS/2\ !!\ SYS02025\r\0			
+>>>450	string	OS/2\ !!\ SYS02027\r\0			
+>>>469	string	OS2BOOT\ \ \ \ 				\b, IBM OS/2 Warp bootloader
+#
+>409	string	OS/2\ !!\ SYS01475\r\0			
+>>430	string	OS/2\ !!\ SYS02025\r\0			
+>>>451	string	OS/2\ !!\ SYS02027\r\0			
+>>>470	string	OS2BOOT\ \ \ \ 				\b, IBM OS/2 Warp Bootloader
+>112		string	This\ disk\ is\ not\ bootable\r			
+>>142		string	If\ you\ wish\ to\ make\ it\ bootable		
+>>>176		string	run\ the\ DOS\ program\ SYS\  			
+>>>200		string	after\ the\r					
+>>>>216		string	system\ has\ been\ loaded\r\n			
+>>>>>242	string	Please\ insert\ a\ DOS\ diskette\ 		
+>>>>>271	string	into\r\n\ the\ drive\ and\ 			
+>>>>>>292	string	strike\ any\ key...\0		\b, IBM OS/2 Warp message display
+# XP
+>430	string	NTLDR\ is\ missing\xFF\r\n		
+>>449	string	Disk\ error\xFF\r\n			
+>>>462	string	Press\ any\ key\ to\ restart\r		\b, Microsoft Windows XP Bootloader
+# DOS names like NTLDR,CMLDR,$LDR$ are 8 right space padded bytes+3 bytes
+>>>>417		ubyte&0xDF	>0			
+>>>>>417	string		x			%-.5s
+>>>>>>422	ubyte&0xDF	>0			
+>>>>>>>422	string		x 			\b%-.3s
+>>>>>425	ubyte&0xDF	>0			
+>>>>>>425	string		>\ 			\b.%-.3s
+#
+>>>>371		ubyte		>0x20			
+>>>>>368	ubyte&0xDF	>0			
+>>>>>>368	string		x 			%-.5s
+>>>>>>>373	ubyte&0xDF	>0			
+>>>>>>>>373	string		x 			\b%-.3s
+>>>>>>376	ubyte&0xDF	>0			
+>>>>>>>376	string		x 			\b.%-.3s
+#
+>430	string	NTLDR\ nicht\ gefunden\xFF\r\n		
+>>453	string	Datentr\204gerfehler\xFF\r\n		
+>>>473	string	Neustart\ mit\ beliebiger\ Taste\r	\b, Microsoft Windows XP Bootloader (german)
+>>>>417		ubyte&0xDF	>0			
+>>>>>417	string		x			%-.5s
+>>>>>>422	ubyte&0xDF	>0			
+>>>>>>>422	string		x 			\b%-.3s
+>>>>>425	ubyte&0xDF	>0			
+>>>>>>425	string		>\ 			\b.%-.3s
+# offset variant
+>>>>379	string	\0					
+>>>>>368	ubyte&0xDF	>0			
+>>>>>>368	string		x 			%-.5s
+>>>>>>>373	ubyte&0xDF	>0			
+>>>>>>>>373	string		x 			\b%-.3s
+#
+>430	string	NTLDR\ fehlt\xFF\r\n			
+>>444	string	Datentr\204gerfehler\xFF\r\n		
+>>>464	string	Neustart\ mit\ beliebiger\ Taste\r	\b, Microsoft Windows XP Bootloader (2.german)
+>>>>417		ubyte&0xDF	>0			
+>>>>>417	string		x			%-.5s
+>>>>>>422	ubyte&0xDF	>0			
+>>>>>>>422	string		x 			\b%-.3s
+>>>>>425	ubyte&0xDF	>0			
+>>>>>>425	string		>\ 			\b.%-.3s
+# variant
+>>>>371		ubyte		>0x20			
+>>>>>368	ubyte&0xDF	>0			
+>>>>>>368	string		x 			%-.5s
+>>>>>>>373	ubyte&0xDF	>0			
+>>>>>>>>373	string		x 			\b%-.3s
+>>>>>>376	ubyte&0xDF	>0			
+>>>>>>>376	string		x 			\b.%-.3s
+#
+>430	string	NTLDR\ fehlt\xFF\r\n			
+>>444	string	Medienfehler\xFF\r\n			
+>>>459	string	Neustart:\ Taste\ dr\201cken\r		\b, Microsoft Windows XP Bootloader (3.german)
+>>>>371		ubyte		>0x20			
+>>>>>368	ubyte&0xDF	>0			
+>>>>>>368	string		x 			%-.5s
+>>>>>>>373	ubyte&0xDF	>0			
+>>>>>>>>373	string		x 			\b%-.3s
+>>>>>>376	ubyte&0xDF	>0			
+>>>>>>>376	string		x 			\b.%-.3s
+# variant
+>>>>417		ubyte&0xDF	>0			
+>>>>>417	string		x			%-.5s
+>>>>>>422	ubyte&0xDF	>0			
+>>>>>>>422	string		x 			\b%-.3s
+>>>>>425	ubyte&0xDF	>0			
+>>>>>>425	string		>\ 			\b.%-.3s
+#
+>430	string	Datentr\204ger\ entfernen\xFF\r\n	
+>>454	string	Medienfehler\xFF\r\n			
+>>>469	string	Neustart:\ Taste\ dr\201cken\r		\b, Microsoft Windows XP Bootloader (4.german)
+>>>>379		string		\0			
+>>>>>368	ubyte&0xDF	>0			
+>>>>>>368	string		x 			%-.5s
+>>>>>>>373	ubyte&0xDF	>0			
+>>>>>>>>373	string		x 			\b%-.3s
+>>>>>>376	ubyte&0xDF	>0			
+>>>>>>>376	string		x 			\b.%-.3s
+# variant
+>>>>417		ubyte&0xDF	>0			
+>>>>>417	string		x			%-.5s
+>>>>>>422	ubyte&0xDF	>0			
+>>>>>>>422	string		x 			\b%-.3s
+>>>>>425	ubyte&0xDF	>0			
+>>>>>>425	string		>\ 			\b.%-.3s
+#
+
+#>3	string	NTFS\ \ \ \ 				
+>389	string	Fehler\ beim\ Lesen\ 
+>>407	string	des\ Datentr\204gers
+>>>426	string	NTLDR\ fehlt				
+>>>>440	string	NTLDR\ ist\ komprimiert
+>>>>>464 string	Neustart\ mit\ Strg+Alt+Entf\r		\b, Microsoft Windows XP Bootloader NTFS (german)
+#>3	string	NTFS\ \ \ \ 				
+>313	string	A\ disk\ read\ error\ occurred.\r
+>>345	string	A\ kernel\ file\ is\ missing\ 	
+>>>370	string	from\ the\ disk.\r		
+>>>>484	string	NTLDR\ is\ compressed		
+>>>>>429 string	Insert\ a\ system\ diskette\ 	
+>>>>>>454 string and\ restart\r\nthe\ system.\r		\b, Microsoft Windows XP Bootloader NTFS
+# DOS loader variants different languages,offsets
+>472	ubyte&0xDF	>0
+>>389	string	Invalid\ system\ disk\xFF\r\n		
+>>>411	string	Disk\ I/O\ error			
+>>>>428	string	Replace\ the\ disk,\ and\ 		
+>>>>>455 string	press\ any\ key				\b, Microsoft Windows 98 Bootloader
+#IO.SYS
+>>>>>>472	ubyte&0xDF	>0			
+>>>>>>>472	string		x 			\b %-.2s
+>>>>>>>>474	ubyte&0xDF	>0			
+>>>>>>>>>474	string		x 			\b%-.5s
+>>>>>>>>>>479	ubyte&0xDF	>0			
+>>>>>>>>>>>479 string		x 			\b%-.1s
+>>>>>>>480	ubyte&0xDF	>0			
+>>>>>>>>480	string		x 			\b.%-.3s
+#MSDOS.SYS
+>>>>>>>483	ubyte&0xDF	>0			\b+
+>>>>>>>>483	string		x 			\b%-.5s
+>>>>>>>>>488	ubyte&0xDF	>0			
+>>>>>>>>>>488	string		x 			\b%-.3s
+>>>>>>>>491	ubyte&0xDF	>0			
+>>>>>>>>>491	string		x 			\b.%-.3s
+#
+>>390	string	Invalid\ system\ disk\xFF\r\n		
+>>>412	string	Disk\ I/O\ error\xFF\r\n		
+>>>>429	string	Replace\ the\ disk,\ and\ 		
+>>>>>451 string	then\ press\ any\ key\r			\b, Microsoft Windows 98 Bootloader
+>>388	string	Ungueltiges\ System\ \xFF\r\n		
+>>>410	string	E/A-Fehler\ \ \ \ \xFF\r\n		
+>>>>427	string	Datentraeger\ wechseln\ und\ 		
+>>>>>453 string	Taste\ druecken\r			\b, Microsoft Windows 95/98/ME Bootloader (german)
+#WINBOOT.SYS only not spaces (0xDF)
+>>>>>>497	ubyte&0xDF	>0			
+>>>>>>>497	string		x 			%-.5s
+>>>>>>>>502	ubyte&0xDF	>0			
+>>>>>>>>>502	string		x 			\b%-.1s
+>>>>>>>>>>503	ubyte&0xDF	>0			
+>>>>>>>>>>>503	string		x 			\b%-.1s
+>>>>>>>>>>>>504	ubyte&0xDF	>0			
+>>>>>>>>>>>>>504 string		x 			\b%-.1s
+>>>>>>505	ubyte&0xDF	>0			
+>>>>>>>505	string		x 			\b.%-.3s
+#IO.SYS
+>>>>>>472	ubyte&0xDF	>0			or
+>>>>>>>472	string		x 			\b %-.2s
+>>>>>>>>474	ubyte&0xDF	>0			
+>>>>>>>>>474	string		x 			\b%-.5s
+>>>>>>>>>>479	ubyte&0xDF	>0			
+>>>>>>>>>>>479 string		x 			\b%-.1s
+>>>>>>>480	ubyte&0xDF	>0			
+>>>>>>>>480	string		x 			\b.%-.3s
+#MSDOS.SYS
+>>>>>>>483	ubyte&0xDF	>0			\b+
+>>>>>>>>483	string		x 			\b%-.5s
+>>>>>>>>>488	ubyte&0xDF	>0			
+>>>>>>>>>>488	string		x 			\b%-.3s
+>>>>>>>>491	ubyte&0xDF	>0			
+>>>>>>>>>491	string		x 			\b.%-.3s
+#
+>>390	string	Ungueltiges\ System\ \xFF\r\n		
+>>>412	string	E/A-Fehler\ \ \ \ \xFF\r\n		
+>>>>429	string	Datentraeger\ wechseln\ und\ 		
+>>>>>455 string	Taste\ druecken\r			\b, Microsoft Windows 95/98/ME Bootloader (German)
+#WINBOOT.SYS only not spaces (0xDF)
+>>>>>>497	ubyte&0xDF	>0			
+>>>>>>>497	string		x 			%-.7s
+>>>>>>>>504	ubyte&0xDF	>0			
+>>>>>>>>>504	string		x 			\b%-.1s
+>>>>>>505	ubyte&0xDF	>0			
+>>>>>>>505	string		x 			\b.%-.3s
+#IO.SYS
+>>>>>>472	ubyte&0xDF	>0			or
+>>>>>>>472	string		x 			\b %-.2s
+>>>>>>>>474	ubyte&0xDF	>0			
+>>>>>>>>>474	string		x 			\b%-.6s
+>>>>>>>480	ubyte&0xDF	>0			
+>>>>>>>>480	string		x 			\b.%-.3s
+#MSDOS.SYS
+>>>>>>>483	ubyte&0xDF	>0			\b+
+>>>>>>>>483	string		x 			\b%-.5s
+>>>>>>>>>488	ubyte&0xDF	>0			
+>>>>>>>>>>488	string		x 			\b%-.3s
+>>>>>>>>491	ubyte&0xDF	>0			
+>>>>>>>>>491	string		x 			\b.%-.3s
+#
+>>389	string	Ungueltiges\ System\ \xFF\r\n		
+>>>411	string	E/A-Fehler\ \ \ \ \xFF\r\n		
+>>>>428	string	Datentraeger\ wechseln\ und\ 		
+>>>>>454 string	Taste\ druecken\r			\b, Microsoft Windows 95/98/ME Bootloader (GERMAN)
+# DOS names like IO.SYS,WINBOOT.SYS,MSDOS.SYS,WINBOOT.INI are 8 right space padded bytes+3 bytes
+>>>>>>472	string		x 			%-.2s
+>>>>>>>474	ubyte&0xDF	>0			
+>>>>>>>>474	string		x 			\b%-.5s
+>>>>>>>>479	ubyte&0xDF	>0			
+>>>>>>>>>479	string		x 			\b%-.1s
+>>>>>>480	ubyte&0xDF	>0			
+>>>>>>>480	string		x 			\b.%-.3s
+>>>>>>483	ubyte&0xDF	>0			\b+
+>>>>>>>483	string		x 			\b%-.5s
+>>>>>>>488	ubyte&0xDF	>0			
+>>>>>>>>488	string		x 			\b%-.2s
+>>>>>>>>490	ubyte&0xDF	>0			
+>>>>>>>>>490	string		x 			\b%-.1s
+>>>>>>>491	ubyte&0xDF	>0			
+>>>>>>>>491	string		x 			\b.%-.3s
+>479	ubyte&0xDF	>0
+>>416	string	Kein\ System\ oder\ 			
+>>>433	string	Laufwerksfehler				
+>>>>450	string	Wechseln\ und\ Taste\ dr\201cken	\b, Microsoft DOS Bootloader (german)
+#IO.SYS
+>>>>>479	string		x 			\b %-.2s
+>>>>>>481	ubyte&0xDF	>0			
+>>>>>>>481	string		x 			\b%-.6s
+>>>>>487	ubyte&0xDF	>0			
+>>>>>>487	string		x 			\b.%-.3s
+#MSDOS.SYS
+>>>>>>490	ubyte&0xDF	>0			\b+
+>>>>>>>490	string		x 			\b%-.5s
+>>>>>>>>495	ubyte&0xDF	>0			
+>>>>>>>>>495	string		x 			\b%-.3s
+>>>>>>>498	ubyte&0xDF	>0			
+>>>>>>>>498	string		x 			\b.%-.3s
+#
+>376	search/41	Non-System\ disk\ or\ 		
+>>395	search/41	disk\ error\r			
+>>>407	search/41	Replace\ and\ 			
+>>>>419	search/41	press\ 				\b,
+>>>>419	search/41	strike\ 			\b, old
+>>>>426	search/41	any\ key\ when\ ready\r		MS or PC-DOS bootloader
+#449			Disk\ Boot\ failure\r		MS 3.21
+#466			Boot\ Failure\r			MS 3.30
+>>>>>468 search/18	\0				
+#IO.SYS,IBMBIO.COM
+>>>>>>&0	string		x 			\b %-.2s
+>>>>>>>&-20	ubyte&0xDF	>0			
+>>>>>>>>&-1	string		x 			\b%-.4s
+>>>>>>>>>&-16	ubyte&0xDF	>0			
+>>>>>>>>>>&-1	string		x 			\b%-.2s
+>>>>>>&8	ubyte&0xDF	>0			\b.
+>>>>>>>&-1	string		x 			\b%-.3s
+#MSDOS.SYS,IBMDOS.COM
+>>>>>>&11	ubyte&0xDF	>0			\b+
+>>>>>>>&-1	string		x 			\b%-.5s
+>>>>>>>>&-6	ubyte&0xDF	>0			
+>>>>>>>>>&-1	string		x 			\b%-.1s
+>>>>>>>>>>&-5	ubyte&0xDF	>0			
+>>>>>>>>>>>&-1	string		x 			\b%-.2s
+>>>>>>>&7	ubyte&0xDF	>0			\b.
+>>>>>>>>&-1	string		x 			\b%-.3s
+>441	string	Cannot\ load\ from\ harddisk.\n\r
+>>469	string	Insert\ Systemdisk\ 			
+>>>487	string	and\ press\ any\ key.\n\r		\b, MS (2.11) DOS bootloader
+#>43	string	\224R-LOADER\ \ SYS			=label					
+>54	string	SYS
+>>324	string	VASKK
+>>>495	string	NEWLDR\0				\b, DR-DOS Bootloader (LOADER.SYS)
+#
+>98	string	Press\ a\ key\ to\ retry\0\r		
+>>120	string	Cannot\ find\ file\ \0\r		
+>>>139	string	Disk\ read\ error\0\r			
+>>>>156	string	Loading\ ...\0				\b, DR-DOS (3.41) Bootloader
+#DRBIOS.SYS
+>>>>>44		ubyte&0xDF	>0			
+>>>>>>44	string		x			\b %-.6s
+>>>>>>>50	ubyte&0xDF	>0			
+>>>>>>>>50	string		x 			\b%-.2s
+>>>>>>52	ubyte&0xDF	>0			
+>>>>>>>52	string		x 			\b.%-.3s
+#
+>70	string	IBMBIO\ \ COM				
+>>472	string	Cannot\ load\ DOS!\ 			
+>>>489	string	Any\ key\ to\ retry			\b, DR-DOS Bootloader
+>>471	string	Cannot\ load\ DOS\ 			
+>>487	string	press\ key\ to\ retry			\b, Open-DOS Bootloader
+#??
+>444	string	KERNEL\ \ SYS					
+>>314	string	BOOT\ error!				\b, FREE-DOS Bootloader
+>499	string	KERNEL\ \ SYS				
+>>305	string	BOOT\ err!\0				\b, Free-DOS Bootloader
+>449	string	KERNEL\ \ SYS				
+>>319	string	BOOT\ error!				\b, FREE-DOS 0.5 Bootloader
+#
+>449	string	Loading\ FreeDOS			
+>>0x1AF		ulelong		>0			\b, FREE-DOS 0.95,1.0 Bootloader
+>>>497		ubyte&0xDF	>0			
+>>>>497		string		x 			\b %-.6s
+>>>>>503	ubyte&0xDF	>0			
+>>>>>>503	string		x 			\b%-.1s
+>>>>>>>504	ubyte&0xDF	>0			
+>>>>>>>>504	string		x 			\b%-.1s
+>>>>505		ubyte&0xDF	>0			
+>>>>>505	string		x 			\b.%-.3s
+#
+>331	string	Error!.0				\b, FREE-DOS 1.0 bootloader
+#
+>125	string	Loading\ FreeDOS...\r			
+>>311	string	BOOT\ error!\r				\b, FREE-DOS bootloader
+>>>441		ubyte&0xDF	>0			
+>>>>441		string		x 			\b %-.6s
+>>>>>447	ubyte&0xDF	>0			
+>>>>>>447	string		x 			\b%-.1s
+>>>>>>>448	ubyte&0xDF	>0			
+>>>>>>>>448	string		x 			\b%-.1s
+>>>>449		ubyte&0xDF	>0			
+>>>>>449	string		x 			\b.%-.3s
+>124	string	FreeDOS\0				
+>>331	string	\ err\0					\b, FREE-DOS BETa 0.9 Bootloader
+# DOS names like KERNEL.SYS,KERNEL16.SYS,KERNEL32.SYS,METAKERN.SYS are 8 right space padded bytes+3 bytes
+>>>497		ubyte&0xDF	>0			
+>>>>497		string		x 			\b %-.6s
+>>>>>503	ubyte&0xDF	>0			
+>>>>>>503	string		x 			\b%-.1s
+>>>>>>>504	ubyte&0xDF	>0			
+>>>>>>>>504	string		x 			\b%-.1s
+>>>>505		ubyte&0xDF	>0			
+>>>>>505	string		x 			\b.%-.3s
+>>333	string	\ err\0					\b, FREE-DOS BEta 0.9 Bootloader
+>>>497		ubyte&0xDF	>0			
+>>>>497		string		x 			\b %-.6s
+>>>>>503	ubyte&0xDF	>0			
+>>>>>>503	string		x 			\b%-.1s
+>>>>>>>504	ubyte&0xDF	>0			
+>>>>>>>>504	string		x 			\b%-.1s
+>>>>505		ubyte&0xDF	>0			
+>>>>>505	string		x 			\b.%-.3s
+>>334	string	\ err\0					\b, FREE-DOS Beta 0.9 Bootloader
+>>>497		ubyte&0xDF	>0			
+>>>>497		string		x 			\b %-.6s
+>>>>>503	ubyte&0xDF	>0			
+>>>>>>503	string		x 			\b%-.1s
+>>>>>>>504	ubyte&0xDF	>0			
+>>>>>>>>504	string		x 			\b%-.1s
+>>>>505		ubyte&0xDF	>0			
+>>>>>505	string		x 			\b.%-.3s
+>336	string	Error!\ 				
+>>343	string	Hit\ a\ key\ to\ reboot.		\b, FREE-DOS Beta 0.9sr1 Bootloader
+>>>497		ubyte&0xDF	>0			
+>>>>497		string		x 			\b %-.6s
+>>>>>503	ubyte&0xDF	>0			
+>>>>>>503	string		x 			\b%-.1s
+>>>>>>>504	ubyte&0xDF	>0			
+>>>>>>>>504	string		x 			\b%-.1s
+>>>>505		ubyte&0xDF	>0			
+>>>>>505	string		x 			\b.%-.3s
+# added by Joerg Jenderek
+# http://www.visopsys.org/
+# http://partitionlogic.org.uk/
+# OEM-ID=Visopsys
+>478		ulelong	0					
+>>(1.b+326)	string	I/O\ Error\ reading\ 			
+>>>(1.b+344)	string	Visopsys\ loader\r			
+>>>>(1.b+361)	string	Press\ any\ key\ to\ continue.\r	\b, Visopsys loader
+# http://alexfru.chat.ru/epm.html#bootprog
+>494	ubyte	>0x4D					
+>>495	string	>E					
+>>>495	string	<S					
+#OEM-ID is not reliable
+>>>>3	string	BootProg				
+# It just looks for a program file name at the root directory
+# and loads corresponding file with following execution.
+# DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes
+>>>>499			ubyte&0xDF	>0		\b, COM/EXE Bootloader
+>>>>>499		string		x 		\b %-.1s
+>>>>>>500		ubyte&0xDF	>0		
+>>>>>>>500		string		x 		\b%-.1s
+>>>>>>>>501		ubyte&0xDF	>0		
+>>>>>>>>>501		string		x 		\b%-.1s
+>>>>>>>>>>502		ubyte&0xDF	>0		
+>>>>>>>>>>>502		string		x 		\b%-.1s
+>>>>>>>>>>>>503		ubyte&0xDF	>0		
+>>>>>>>>>>>>>503	string		x 		\b%-.1s
+>>>>>>>>>>>>>>504	ubyte&0xDF	>0		
+>>>>>>>>>>>>>>>504	string		x 		\b%-.1s
+>>>>>>>>>>>>>>>>505	ubyte&0xDF	>0		
+>>>>>>>>>>>>>>>>>505	string		x 		\b%-.1s
+>>>>>>>>>>>>>>>>>>506	ubyte&0xDF	>0		
+>>>>>>>>>>>>>>>>>>>506	string		x 		\b%-.1s
+#name extension
+>>>>>507		ubyte&0xDF	>0		\b.
+>>>>>>507		string		x 		\b%-.1s
+>>>>>>>508		ubyte&0xDF	>0		
+>>>>>>>>508		string		x 		\b%-.1s
+>>>>>>>>>509		ubyte&0xDF	>0		
+>>>>>>>>>>509		string		x 		\b%-.1s
+#If the boot sector fails to read any other sector,
+#it prints a very short message ("RE") to the screen and hangs the computer.
+#If the boot sector fails to find needed program in the root directory,
+#it also hangs with another message ("NF").
+>>>>>492		string		RENF		\b, FAT (12 bit)
+>>>>>495		string		RENF		\b, FAT (16 bit)
+# http://alexfru.chat.ru/epm.html#bootprog
+>494	ubyte	>0x4D					
+>>495	string	>E					
+>>>495	string	<S					
+#OEM-ID is not reliable
+>>>>3	string	BootProg				
+# It just looks for a program file name at the root directory
+# and loads corresponding file with following execution.
+# DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes
+>>>>499			ubyte&0xDF	>0		\b, COM/EXE Bootloader
+>>>>>499		string		x 		\b %-.1s
+>>>>>>500		ubyte&0xDF	>0		
+>>>>>>>500		string		x 		\b%-.1s
+>>>>>>>>501		ubyte&0xDF	>0		
+>>>>>>>>>501		string		x 		\b%-.1s
+>>>>>>>>>>502		ubyte&0xDF	>0		
+>>>>>>>>>>>502		string		x 		\b%-.1s
+>>>>>>>>>>>>503		ubyte&0xDF	>0		
+>>>>>>>>>>>>>503	string		x 		\b%-.1s
+>>>>>>>>>>>>>>504	ubyte&0xDF	>0		
+>>>>>>>>>>>>>>>504	string		x 		\b%-.1s
+>>>>>>>>>>>>>>>>505	ubyte&0xDF	>0		
+>>>>>>>>>>>>>>>>>505	string		x 		\b%-.1s
+>>>>>>>>>>>>>>>>>>506	ubyte&0xDF	>0		
+>>>>>>>>>>>>>>>>>>>506	string		x 		\b%-.1s
+#name extension
+>>>>>507		ubyte&0xDF	>0		\b.
+>>>>>>507		string		x 		\b%-.1s
+>>>>>>>508		ubyte&0xDF	>0		
+>>>>>>>>508		string		x 		\b%-.1s
+>>>>>>>>>509		ubyte&0xDF	>0		
+>>>>>>>>>>509		string		x 		\b%-.1s
+#If the boot sector fails to read any other sector,
+#it prints a very short message ("RE") to the screen and hangs the computer.
+#If the boot sector fails to find needed program in the root directory,
+#it also hangs with another message ("NF").
+>>>>>492		string		RENF		\b, FAT (12 bit)
+>>>>>495		string		RENF		\b, FAT (16 bit)
+# x86 bootloader end
+# updated by Joerg Jenderek at Sep 2007
+>3	ubyte	0			
+#no active flag
+>>446	ubyte	0			
+# partition 1 not empty
+>>>450	ubyte	>0			
+# partitions 3,4 empty
+>>>>482		ubyte	0			
+>>>>>498	ubyte	0			
+# partition 2 ID=0,5,15
+>>>>>>466	ubyte	<0x10			
+>>>>>>>466	ubyte	0x05			\b, extended partition table
+>>>>>>>466	ubyte	0x0F			\b, extended partition table (LBA)
+>>>>>>>466	ubyte	0x0			\b, extended partition table (last)	
+# JuMP short     bootcodeoffset NOP assembler instructions will usually be EB xx 90
+# http://mirror.href.com/thestarman/asm/2bytejumps.htmm#FWD
+# older drives may use Near JuMP instruction E9 xx xx
+>0		lelong&0x009000EB	0x009000EB 
+>0		lelong&0x000000E9	0x000000E9 
+# minimal short forward jump found 03cx??
+# maximal short forward jump is 07fx
+>1		ubyte			<0xff	\b, code offset 0x%x
+# mtools-3.9.8/msdos.h
+# usual values are marked with comments to get only informations of strange FAT systems
+# valid sectorsize must be a power of 2 from 32 to 32768
+>>11		uleshort&0x000f	x		
+>>>11		uleshort	<32769		
+>>>>11		uleshort	>31		
+>>>>>21		ubyte&0xf0	0xF0		
+>>>>>>3		string		>\0		\b, OEM-ID "%8.8s"
+#http://mirror.href.com/thestarman/asm/debug/debug2.htm#IHC
+>>>>>>>8	string		IHC		\b cached by Windows 9M
+>>>>>>11	uleshort	>512		\b, Bytes/sector %u
+#>>>>>>11	uleshort	=512		\b, Bytes/sector %u=512 (usual)
+>>>>>>11	uleshort	<512		\b, Bytes/sector %u
+>>>>>>13	ubyte		>1		\b, sectors/cluster %u
+#>>>>>>13	ubyte		=1		\b, sectors/cluster %u (usual on Floppies)
+>>>>>>14	uleshort	>32		\b, reserved sectors %u
+#>>>>>>14	uleshort	=32		\b, reserved sectors %u (usual Fat32)
+#>>>>>>14	uleshort	>1		\b, reserved sectors %u
+#>>>>>>14	uleshort	=1		\b, reserved sectors %u (usual FAT12,FAT16)
+>>>>>>14	uleshort	<1		\b, reserved sectors %u
+>>>>>>16	ubyte		>2		\b, FATs %u
+#>>>>>>16	ubyte		=2		\b, FATs %u (usual)
+>>>>>>16	ubyte		=1		\b, FAT  %u
+>>>>>>16	ubyte		>0
+>>>>>>17	uleshort	>0		\b, root entries %u
+#>>>>>>17	uleshort	=0		\b, root entries %u=0 (usual Fat32)
+>>>>>>19	uleshort	>0		\b, sectors %u (volumes <=32 MB) 
+#>>>>>>19	uleshort	=0		\b, sectors %u=0 (usual Fat32)
+>>>>>>21	ubyte		>0xF0		\b, Media descriptor 0x%x
+#>>>>>>21	ubyte		=0xF0		\b, Media descriptor 0x%x (usual floppy)
+>>>>>>21	ubyte		<0xF0		\b, Media descriptor 0x%x
+>>>>>>22	uleshort	>0		\b, sectors/FAT %u
+#>>>>>>22	uleshort	=0		\b, sectors/FAT %u=0 (usual Fat32)
+>>>>>>26	ubyte		>2		\b, heads %u
+#>>>>>>26	ubyte		=2		\b, heads %u (usual floppy)
+>>>>>>26	ubyte		=1		\b, heads %u
+#skip for Digital Research DOS (version 3.41) 1440 kB Bootdisk
+>>>>>>38	ubyte		!0x70		
+>>>>>>>28	ulelong		>0		\b, hidden sectors %u
+#>>>>>>>28	ulelong		=0		\b, hidden sectors %u (usual floppy)
+>>>>>>>32	ulelong		>0		\b, sectors %u (volumes > 32 MB) 
+#>>>>>>>32	ulelong		=0		\b, sectors %u (volumes > 32 MB)
+# FAT<32 specific 
+>>>>>>82	string		!FAT32
+#>>>>>>>36	ubyte		0x80		\b, physical drive 0x%x=0x80 (usual harddisk)
+#>>>>>>>36	ubyte		0		\b, physical drive 0x%x=0 (usual floppy)
+>>>>>>>36	ubyte		!0x80		
+>>>>>>>>36	ubyte		!0		\b, physical drive 0x%x
+>>>>>>>37	ubyte		>0		\b, reserved 0x%x
+#>>>>>>>37	ubyte		=0		\b, reserved 0x%x
+>>>>>>>38	ubyte		>0x29		\b, dos < 4.0 BootSector (0x%x)
+>>>>>>>38	ubyte		<0x29		\b, dos < 4.0 BootSector (0x%x)
+>>>>>>>38	ubyte		=0x29
+>>>>>>>>39	ulelong		x		\b, serial number 0x%x
+>>>>>>>>43	string		<NO\ NAME	\b, label: "%11.11s"
+>>>>>>>>43	string		>NO\ NAME	\b, label: "%11.11s"
+>>>>>>>>43	string		=NO\ NAME	\b, unlabeled
+>>>>>>>54	string		FAT		\b, FAT
+>>>>>>>>54	string		FAT12		\b (12 bit)
+>>>>>>>>54	string		FAT16		\b (16 bit)
+# FAT32 specific
+>>>>>>82	string		FAT32		\b, FAT (32 bit)
+>>>>>>>36	ulelong		x		\b, sectors/FAT %u
+>>>>>>>40	uleshort	>0		\b, extension flags %u
+#>>>>>>>40	uleshort	=0		\b, extension flags %u
+>>>>>>>42	uleshort	>0		\b, fsVersion %u
+#>>>>>>>42	uleshort	=0		\b, fsVersion %u (usual)
+>>>>>>>44	ulelong		>2		\b, rootdir cluster %u
+#>>>>>>>44	ulelong		=2		\b, rootdir cluster %u
+#>>>>>>>44	ulelong		=1		\b, rootdir cluster %u
+>>>>>>>48	uleshort	>1		\b, infoSector %u
+#>>>>>>>48	uleshort	=1		\b, infoSector %u (usual)
+>>>>>>>48	uleshort	<1		\b, infoSector %u
+>>>>>>>50	uleshort	>6		\b, Backup boot sector %u
+#>>>>>>>50	uleshort	=6		\b, Backup boot sector %u (usual) 
+>>>>>>>50	uleshort	<6		\b, Backup boot sector %u
+>>>>>>>54	ulelong		>0		\b, reserved1 0x%x
+>>>>>>>58	ulelong		>0		\b, reserved2 0x%x
+>>>>>>>62	ulelong		>0		\b, reserved3 0x%x
+# same structure as FAT1X 
+>>>>>>>64	ubyte		>0x80		\b, physical drive 0x%x
+#>>>>>>>64	ubyte		=0x80		\b, physical drive 0x%x=80 (usual harddisk)
+>>>>>>>64	ubyte&0x7F	>0		\b, physical drive 0x%x
+#>>>>>>>64	ubyte		=0		\b, physical drive 0x%x=0 (usual floppy)
+>>>>>>>65	ubyte		>0		\b, reserved 0x%x
+>>>>>>>66	ubyte		>0x29		\b, dos < 4.0 BootSector (0x%x)
+>>>>>>>66	ubyte		<0x29		\b, dos < 4.0 BootSector (0x%x)
+>>>>>>>66	ubyte		=0x29
+>>>>>>>>67	ulelong		x		\b, serial number 0x%x
+>>>>>>>>71	string		<NO\ NAME	\b, label: "%11.11s"
+>>>>>>>71	string		>NO\ NAME	\b, label: "%11.11s"
+>>>>>>>71	string		=NO\ NAME	\b, unlabeled
+### FATs end
+>0x200	lelong	0x82564557		\b, BSD disklabel
+# FATX 
+0		string		FATX		FATX filesystem data
+
+
+# Minix filesystems - Juan Cespedes <cespedes at debian.org>
+0x410	leshort		0x137f
+!:strength / 2
+>0x402	beshort		< 100
+>0x402	beshort		> -1		Minix filesystem, V1, %d zones
+>0x1e	string		minix		\b, bootable
+0x410	beshort		0x137f
+!:strength / 2
+>0x402	beshort		< 100
+>0x402	beshort		> -1		Minix filesystem, V1 (big endian), %d zones
+>0x1e	string		minix		\b, bootable
+0x410	leshort		0x138f
+!:strength / 2
+>0x402	beshort		< 100
+>0x402	beshort		> -1		Minix filesystem, V1, 30 char names, %d zones
+>0x1e	string		minix		\b, bootable
+0x410	beshort		0x138f
+!:strength / 2
+>0x402	beshort		< 100
+>0x402	beshort		> -1		Minix filesystem, V1, 30 char names (big endian), %d zones
+>0x1e	string		minix		\b, bootable
+0x410	leshort		0x2468
+>0x402	beshort		< 100
+>>0x402	beshort		> -1		Minix filesystem, V2, %d zones
+>0x1e	string		minix		\b, bootable
+0x410	beshort		0x2468
+>0x402	beshort		< 100
+>0x402	beshort		> -1		Minix filesystem, V2 (big endian), %d zones
+>0x1e	string		minix		\b, bootable
+
+0x410	leshort		0x2478
+>0x402	beshort		< 100
+>0x402	beshort		> -1		Minix filesystem, V2, 30 char names, %d zones
+>0x1e	string		minix		\b, bootable
+0x410	leshort		0x2478
+>0x402	beshort		< 100
+>0x402	beshort		> -1		Minix filesystem, V2, 30 char names, %d zones
+>0x1e	string		minix		\b, bootable
+0x410	beshort		0x2478
+>0x402	beshort		!0		Minix filesystem, V2, 30 char names (big endian), %d zones
+>0x1e	string		minix		\b, bootable
+0x410	leshort		0x4d5a
+>0x402	beshort		!0		Minix filesystem, V3, %d zones
+>0x1e	string		minix		\b, bootable
+
+# romfs filesystems - Juan Cespedes <cespedes at debian.org>
+0	string		-rom1fs-	romfs filesystem, version 1
+>8	belong	x			%d bytes,
+>16	string	x			named %s.
+
+# netboot image - Juan Cespedes <cespedes at debian.org>
+0	lelong		0x1b031336L	Netboot image,
+>4	lelong&0xFFFFFF00	0
+>>4	lelong&0x100	0x000		mode 2
+>>4	lelong&0x100	0x100		mode 3
+>4	lelong&0xFFFFFF00	!0	unknown mode
+
+0x18b	string	OS/2	OS/2 Boot Manager
+
+# updated by Joerg Jenderek at Oct 2008!!
+# http://syslinux.zytor.com/iso.php
+0	ulelong	0x7c40eafa		isolinux Loader
+# http://syslinux.zytor.com/pxe.php
+0	ulelong	0x007c05ea		pxelinux Loader
+0	ulelong	0x60669c66		pxelinux Loader
+
+# added by Joerg Jenderek
+# In the second sector (+0x200) are variables according to grub-0.97/stage2/asm.S or
+# grub-1.94/kern/i386/pc/startup.S
+# http://www.gnu.org/software/grub/manual/grub.html#Embedded-data
+# usual values are marked with comments to get only informations of strange GRUB loaders
+0x200	uleshort		0x70EA		
+# found only version 3.{1,2}
+>0x206		ubeshort	>0x0300		
+# GRUB version (0.5.)95,0.93,0.94,0.96,0.97 > "00"
+>>0x212 	ubyte		>0x29		
+>>>0x213 	ubyte		>0x29		
+# not iso9660_stage1_5
+#>>>0	ulelong&0x00BE5652	0x00BE5652	
+>>>>0x213 	ubyte		>0x29		GRand Unified Bootloader
+# config_file for stage1_5 is 0xffffffff + default "/boot/grub/stage2"
+>>>>0x217 	ubyte		0xFF		stage1_5
+>>>>0x217 	ubyte		<0xFF		stage2
+>>>>0x206	ubyte		x		\b version %u
+>>>>0x207	ubyte		x		\b.%u
+# module_size for 1.94
+>>>>0x208	ulelong		<0xffffff	\b, installed partition %u
+#>>>>0x208	ulelong		=0xffffff	\b, %u (default)
+>>>>0x208	ulelong		>0xffffff	\b, installed partition %u
+# GRUB 0.5.95 unofficial
+>>>>0x20C	ulelong&0x2E300000 0x2E300000	
+# 0=stage2	1=ffs	2=e2fs	3=fat	4=minix	5=reiserfs
+>>>>>0x20C	ubyte		x		\b, identifier 0x%x
+#>>>>>0x20D	ubyte		=0		\b, LBA flag 0x%x (default)
+>>>>>0x20D	ubyte		>0		\b, LBA flag 0x%x
+# GRUB version as string
+>>>>>0x20E 	string		>\0		\b, GRUB version %-s
+# for stage1_5 is 0xffffffff + config_file "/boot/grub/stage2" default
+>>>>>>0x215 	ulong		0xffffffff	
+>>>>>>>0x219 	string		>\0		\b, configuration file %-s
+>>>>>>0x215 	ulong		!0xffffffff	
+>>>>>>>0x215 	string		>\0		\b, configuration file %-s
+# newer GRUB versions
+>>>>0x20C	ulelong&0x2E300000 !0x2E300000	
+##>>>>>0x20C	ulelong		=0		\b, saved entry %d (usual)
+>>>>>0x20C	ulelong		>0		\b, saved entry %d
+# for 1.94 contains kernel image size
+# for 0.93,0.94,0.96,0.97
+# 0=stage2	1=ffs	2=e2fs	3=fat	4=minix	5=reiserfs	6=vstafs	7=jfs	8=xfs	9=iso9660	a=ufs2	
+>>>>>0x210	ubyte		x		\b, identifier 0x%x
+# The flag for LBA forcing is in most cases 0
+#>>>>>0x211	ubyte		=0		\b, LBA flag 0x%x (default)
+>>>>>0x211	ubyte		>0		\b, LBA flag 0x%x
+# GRUB version as string
+>>>>>0x212 	string		>\0		\b, GRUB version %-s
+# for stage1_5 is 0xffffffff + config_file "/boot/grub/stage2" default
+>>>>>0x217 	ulong		0xffffffff	
+>>>>>>0x21b 	string		>\0		\b, configuration file %-s
+>>>>>0x217 	ulong		!0xffffffff	
+>>>>>>0x217 	string		>\0		\b, configuration file %-s
+
+9564	lelong		0x00011954	Unix Fast File system [v1] (little-endian),
+>8404	string		x		last mounted on %s,
+#>9504	ledate		x		last checked at %s,
+>8224	ledate		x		last written at %s,
+>8401	byte		x		clean flag %d,
+>8228	lelong		x		number of blocks %d,
+>8232	lelong		x		number of data blocks %d,
+>8236	lelong		x		number of cylinder groups %d,
+>8240	lelong		x		block size %d,
+>8244	lelong		x		fragment size %d,
+>8252	lelong		x		minimum percentage of free blocks %d,
+>8256	lelong		x		rotational delay %dms,
+>8260	lelong		x		disk rotational speed %drps,
+>8320	lelong		0		TIME optimization
+>8320	lelong		1		SPACE optimization
+
+42332	lelong		0x19540119	Unix Fast File system [v2] (little-endian)
+>&-1164	string		x		last mounted on %s,
+>&-696	string		>\0		volume name %s,
+>&-304	leqldate	x		last written at %s,
+>&-1167	byte		x		clean flag %d,
+>&-1168	byte		x		readonly flag %d,
+>&-296	lequad		x		number of blocks %lld,
+>&-288	lequad		x		number of data blocks %lld,
+>&-1332	lelong		x		number of cylinder groups %d,
+>&-1328	lelong		x		block size %d,
+>&-1324	lelong		x		fragment size %d,
+>&-180	lelong		x		average file size %d,
+>&-176	lelong		x		average number of files in dir %d,
+>&-272	lequad		x		pending blocks to free %lld,
+>&-264	lelong		x		pending inodes to free %ld,
+>&-664	lequad		x		system-wide uuid %0llx,
+>&-1316	lelong		x		minimum percentage of free blocks %d,
+>&-1248	lelong		0		TIME optimization
+>&-1248	lelong		1		SPACE optimization
+
+66908	lelong		0x19540119	Unix Fast File system [v2] (little-endian)
+>&-1164	string		x		last mounted on %s,
+>&-696	string		>\0		volume name %s,
+>&-304	leqldate	x		last written at %s,
+>&-1167	byte		x		clean flag %d,
+>&-1168	byte		x		readonly flag %d,
+>&-296	lequad		x		number of blocks %lld,
+>&-288	lequad		x		number of data blocks %lld,
+>&-1332	lelong		x		number of cylinder groups %d,
+>&-1328	lelong		x		block size %d,
+>&-1324	lelong		x		fragment size %d,
+>&-180	lelong		x		average file size %d,
+>&-176	lelong		x		average number of files in dir %d,
+>&-272	lequad		x		pending blocks to free %lld,
+>&-264	lelong		x		pending inodes to free %ld,
+>&-664	lequad		x		system-wide uuid %0llx,
+>&-1316	lelong		x		minimum percentage of free blocks %d,
+>&-1248	lelong		0		TIME optimization
+>&-1248	lelong		1		SPACE optimization
+
+9564	belong		0x00011954	Unix Fast File system [v1] (big-endian),
+>7168   belong		0x4c41424c	Apple UFS Volume
+>>7186  string		x		named %s,
+>>7176  belong		x		volume label version %d,
+>>7180  bedate		x		created on %s,
+>8404	string		x		last mounted on %s,
+#>9504	bedate		x		last checked at %s,
+>8224	bedate		x		last written at %s,
+>8401	byte		x		clean flag %d,
+>8228	belong		x		number of blocks %d,
+>8232	belong		x		number of data blocks %d,
+>8236	belong		x		number of cylinder groups %d,
+>8240	belong		x		block size %d,
+>8244	belong		x		fragment size %d,
+>8252	belong		x		minimum percentage of free blocks %d,
+>8256	belong		x		rotational delay %dms,
+>8260	belong		x		disk rotational speed %drps,
+>8320	belong		0		TIME optimization
+>8320	belong		1		SPACE optimization
+
+42332	belong		0x19540119	Unix Fast File system [v2] (big-endian)
+>&-1164	string		x		last mounted on %s,
+>&-696	string		>\0		volume name %s,
+>&-304	beqldate	x		last written at %s,
+>&-1167	byte		x		clean flag %d,
+>&-1168	byte		x		readonly flag %d,
+>&-296	bequad		x		number of blocks %lld,
+>&-288	bequad		x		number of data blocks %lld,
+>&-1332	belong		x		number of cylinder groups %d,
+>&-1328	belong		x		block size %d,
+>&-1324	belong		x		fragment size %d,
+>&-180	belong		x		average file size %d,
+>&-176	belong		x		average number of files in dir %d,
+>&-272	bequad		x		pending blocks to free %lld,
+>&-264	belong		x		pending inodes to free %ld,
+>&-664	bequad		x		system-wide uuid %0llx,
+>&-1316	belong		x		minimum percentage of free blocks %d,
+>&-1248	belong		0		TIME optimization
+>&-1248	belong		1		SPACE optimization
+
+66908	belong		0x19540119	Unix Fast File system [v2] (big-endian)
+>&-1164	string		x		last mounted on %s,
+>&-696	string		>\0		volume name %s,
+>&-304	beqldate	x		last written at %s,
+>&-1167	byte		x		clean flag %d,
+>&-1168	byte		x		readonly flag %d,
+>&-296	bequad		x		number of blocks %lld,
+>&-288	bequad		x		number of data blocks %lld,
+>&-1332	belong		x		number of cylinder groups %d,
+>&-1328	belong		x		block size %d,
+>&-1324	belong		x		fragment size %d,
+>&-180	belong		x		average file size %d,
+>&-176	belong		x		average number of files in dir %d,
+>&-272	bequad		x		pending blocks to free %lld,
+>&-264	belong		x		pending inodes to free %ld,
+>&-664	bequad		x		system-wide uuid %0llx,
+>&-1316	belong		x		minimum percentage of free blocks %d,
+>&-1248	belong		0		TIME optimization
+>&-1248	belong		1		SPACE optimization
+
+# ext2/ext3 filesystems - Andreas Dilger <adilger at dilger.ca>
+# ext4 filesystem - Eric Sandeen <sandeen at sandeen.net>
+0x438   leshort         0xEF53          Linux
+>0x44c  lelong          x               rev %d
+>0x43e  leshort         x               \b.%d
+# No journal?  ext2
+>0x45c  lelong          ^0x0000004      ext2 filesystem data
+>>0x43a leshort         ^0x0000001      (mounted or unclean)
+# Has a journal?  ext3 or ext4
+>0x45c  lelong          &0x0000004
+#  and small INCOMPAT?
+>>0x460 lelong          <0x0000040
+#   and small RO_COMPAT?
+>>>0x464 lelong         <0x0000008      ext3 filesystem data
+#   else large RO_COMPAT?
+>>>0x464 lelong         >0x0000007      ext4 filesystem data
+#  else large INCOMPAT?
+>>0x460 lelong          >0x000003f      ext4 filesystem data
+# General flags for any ext* fs
+>0x460  lelong          &0x0000004      (needs journal recovery)
+>0x43a  leshort         &0x0000002      (errors)
+# INCOMPAT flags
+>0x460  lelong          &0x0000001      (compressed)
+#>0x460 lelong          &0x0000002      (filetype)
+#>0x460 lelong          &0x0000010      (meta bg)
+>0x460  lelong          &0x0000040      (extents)
+>0x460  lelong          &0x0000080      (64bit)
+#>0x460 lelong          &0x0000100      (mmp)
+#>0x460 lelong          &0x0000200      (flex bg)
+# RO_INCOMPAT flags
+#>0x464 lelong          &0x0000001      (sparse super)
+>0x464  lelong          &0x0000002      (large files)
+>0x464  lelong          &0x0000008      (huge files)
+#>0x464 lelong          &0x0000010      (gdt checksum)
+#>0x464 lelong          &0x0000020      (many subdirs)
+#>0x463 lelong          &0x0000040      (extra isize)
+
+# SGI disk labels - Nathan Scott <nathans at debian.org>
+0	belong		0x0BE5A941	SGI disk label (volume header)
+
+# SGI XFS filesystem - Nathan Scott <nathans at debian.org>
+0	belong		0x58465342	SGI XFS filesystem data
+>0x4	belong		x		(blksz %d,
+>0x68	beshort		x		inosz %d,
+>0x64	beshort		^0x2004		v1 dirs)
+>0x64	beshort		&0x2004		v2 dirs)
+
+############################################################################
+# Minix-ST kernel floppy
+0x800	belong		0x46fc2700	Atari-ST Minix kernel image
+>19	string		\240\5\371\5\0\011\0\2\0	\b, 720k floppy
+>19	string		\320\2\370\5\0\011\0\1\0	\b, 360k floppy
+
+############################################################################
+# Hmmm, is this a better way of detecting _standard_ floppy images ?
+19	string		\320\2\360\3\0\011\0\1\0	DOS floppy 360k
+>0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
+19	string		\240\5\371\3\0\011\0\2\0	DOS floppy 720k
+>0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
+19	string		\100\013\360\011\0\022\0\2\0	DOS floppy 1440k
+>0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
+
+19	string		\240\5\371\5\0\011\0\2\0	DOS floppy 720k, IBM
+>0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
+19	string		\100\013\371\5\0\011\0\2\0	DOS floppy 1440k, mkdosfs
+>0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
+
+19	string		\320\2\370\5\0\011\0\1\0	Atari-ST floppy 360k
+19	string		\240\5\371\5\0\011\0\2\0	Atari-ST floppy 720k
+
+#  Valid media descriptor bytes for MS-DOS:
+#
+#     Byte   Capacity   Media Size and Type
+#     -------------------------------------------------
+#
+#     F0     2.88 MB    3.5-inch, 2-sided, 36-sector
+#     F0     1.44 MB    3.5-inch, 2-sided, 18-sector
+#     F9     720K       3.5-inch, 2-sided, 9-sector
+#     F9     1.2 MB     5.25-inch, 2-sided, 15-sector
+#     FD     360K       5.25-inch, 2-sided, 9-sector
+#     FF     320K       5.25-inch, 2-sided, 8-sector
+#     FC     180K       5.25-inch, 1-sided, 9-sector
+#     FE     160K       5.25-inch, 1-sided, 8-sector
+#     FE     250K       8-inch, 1-sided, single-density
+#     FD     500K       8-inch, 2-sided, single-density
+#     FE     1.2 MB     8-inch, 2-sided, double-density
+#     F8     -----      Fixed disk 
+#
+#     FC     xxxK       Apricot 70x1x9 boot disk.
+#
+# Originally a bitmap:
+#  xxxxxxx0	Not two sided
+#  xxxxxxx1	Double sided
+#  xxxxxx0x	Not 8 SPT
+#  xxxxxx1x	8 SPT
+#  xxxxx0xx	Not Removable drive
+#  xxxxx1xx	Removable drive
+#  11111xxx	Must be one.
+#
+# But now it's rather random:
+#  111111xx	Low density disk
+#        00	SS, Not 8 SPT
+#        01	DS, Not 8 SPT
+#        10	SS, 8 SPT
+#        11	DS, 8 SPT
+#
+#  11111001	Double density 3� floppy disk, high density 5�
+#  11110000	High density 3� floppy disk
+#  11111000	Hard disk any format
+#
+
+# CDROM Filesystems
+# Modified for UDF by gerardo.cacciari at gmail.com
+32769	string    CD001
+!:mime	application/x-iso9660-image
+>38913	string   !NSR0      ISO 9660 CD-ROM filesystem data
+>38913	string    NSR0      UDF filesystem data
+>>38917	string    1         (version 1.0)
+>>38917	string    2         (version 1.5)
+>>38917	string    3         (version 2.0)
+>>38917	byte     >0x33      (unknown version, ID 0x%X)
+>>38917	byte     <0x31      (unknown version, ID 0x%X)
+# "application id" which appears to be used as a volume label
+#>32808	string/T  >\0       '%s'
+>34816	string    \000CD001\001EL\ TORITO\ SPECIFICATION    (bootable)
+37633	string    CD001     ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
+!:mime	application/x-iso9660-image
+32776	string    CDROM     High Sierra CD-ROM filesystem data
+
+# .cso files
+0    string    CISO	Compressed ISO CD image
+
+# cramfs filesystem - russell at coker.com.au
+0       lelong    0x28cd3d45      Linux Compressed ROM File System data, little endian
+>4      lelong  x size %lu
+>8      lelong  &1 version #2
+>8      lelong  &2 sorted_dirs
+>8      lelong  &4 hole_support
+>32     lelong  x CRC 0x%x,
+>36     lelong  x edition %lu,
+>40     lelong  x %lu blocks,
+>44     lelong  x %lu files
+
+0       belong    0x28cd3d45      Linux Compressed ROM File System data, big endian
+>4      belong  x size %lu
+>8      belong  &1 version #2
+>8      belong  &2 sorted_dirs
+>8      belong  &4 hole_support
+>32     belong  x CRC 0x%x,
+>36     belong  x edition %lu,
+>40     belong  x %lu blocks,
+>44     belong  x %lu files
+
+# reiserfs - russell at coker.com.au
+0x10034		string	ReIsErFs	ReiserFS V3.5
+0x10034		string	ReIsEr2Fs	ReiserFS V3.6
+>0x1002c 	leshort	x		block size %d
+>0x10032	leshort	&2		(mounted or unclean)
+>0x10000	lelong	x		num blocks %d
+>0x10040	lelong	1		tea hash
+>0x10040	lelong	2		yura hash
+>0x10040	lelong	3		r5 hash
+
+# JFFS - russell at coker.com.au
+0	lelong	0x34383931	Linux Journalled Flash File system, little endian
+0	belong	0x34383931	Linux Journalled Flash File system, big endian
+
+# EST flat binary format (which isn't, but anyway)
+# From: Mark Brown <broonie at sirena.org.uk>
+0	string	ESTFBINR	EST flat binary
+
+# Aculab VoIP firmware
+# From: Mark Brown <broonie at sirena.org.uk>
+0	string	VoIP\ Startup\ and	Aculab VoIP firmware
+>35	string	x	format %s
+
+# From: Mark Brown <broonie at sirena.org.uk> [old]
+# From: Behan Webster <behanw at websterwood.com>
+0	belong	0x27051956	u-boot legacy uImage,
+>32	string	x		%s,
+>28	byte	0		Invalid os/
+>28	byte	1		OpenBSD/
+>28	byte	2		NetBSD/
+>28	byte	3		FreeBSD/
+>28	byte	4		4.4BSD/
+>28	byte	5		Linux/
+>28	byte	6		SVR4/
+>28	byte	7		Esix/
+>28	byte	8		Solaris/
+>28	byte	9		Irix/
+>28	byte	10		SCO/
+>28	byte	11		Dell/
+>28	byte	12		NCR/
+>28	byte	13		LynxOS/
+>28	byte	14		VxWorks/
+>28	byte	15		pSOS/
+>28	byte	16		QNX/
+>28	byte	17		Firmware/
+>28	byte	18		RTEMS/
+>28	byte	19		ARTOS/
+>28	byte	20		Unity OS/
+>28	byte	21		INTEGRITY/
+>29	byte	0		\bInvalid CPU,
+>29	byte	1		\bAlpha,
+>29	byte	2		\bARM,
+>29	byte	3		\bIntel x86,
+>29	byte	4		\bIA64,
+>29	byte	5		\bMIPS,
+>29	byte	6		\bMIPS 64-bit,
+>29	byte	7		\bPowerPC,
+>29	byte	8		\bIBM S390,
+>29	byte	9		\bSuperH,
+>29	byte	10		\bSparc,
+>29	byte	11		\bSparc 64-bit,
+>29	byte	12		\bM68K,
+>29	byte	13		\bNios-32,
+>29	byte	14		\bMicroBlaze,
+>29	byte	15		\bNios-II,
+>29	byte	16		\bBlackfin,
+>29	byte	17		\bAVR32,
+>29	byte	18		\bSTMicroelectronics ST200,
+>30	byte	0		Invalid Image
+>30	byte	1		Standalone Program
+>30	byte	2		OS Kernel Image
+>30	byte	3		RAMDisk Image
+>30	byte	4		Multi-File Image
+>30	byte	5		Firmware Image
+>30	byte	6		Script File
+>30	byte	7		Filesystem Image (any type)
+>30	byte	8		Binary Flat Device Tree BLOB
+>31	byte	0		(Not compressed),
+>31	byte	1		(gzip),
+>31	byte	2		(bzip2),
+>31	byte	3		(lzma),
+>12	belong	x		%d bytes,
+>8	bedate	x		%s,
+>16	belong	x		Load Address: 0x%08X,
+>20	belong	x		Entry Point: 0x%08X,
+>4	belong	x		Header CRC: 0x%08X,
+>24	belong	x		Data CRC: 0x%08X
+
+# JFFS2 file system
+0	leshort	0x1984		Linux old jffs2 filesystem data little endian
+0	leshort	0x1985		Linux jffs2 filesystem data little endian
+
+# Squashfs
+0	string	sqsh	Squashfs filesystem, big endian,
+>28	beshort	x	version %d.
+>30	beshort x	\b%d,
+>28	beshort <3
+>>8	belong	x	%d bytes,
+>28	beshort >2
+>>28 beshort <4
+>>>63	bequad x	%lld bytes,
+>>28 beshort >3
+>>>40	bequad x	%lld bytes,
+#>>67	belong	x	%d bytes,
+>4	belong	x	%d inodes,
+>28	beshort <2
+>>32	beshort	x	blocksize: %d bytes,
+>28	beshort >1
+>>28 beshort <4
+>>>51	belong	x	blocksize: %d bytes,
+>>28 beshort >3
+>>>12	belong	x	blocksize: %d bytes,
+>28 beshort <4
+>>39	bedate	x	created: %s
+>28 beshort >3
+>>8	bedate	x	created: %s
+0	string	hsqs	Squashfs filesystem, little endian,
+>28	leshort	x	version %d.
+>30	leshort	x	\b%d,
+>28	leshort <3
+>>8	lelong	x	%d bytes,
+>28	leshort >2
+>>28 leshort <4
+>>>63	lequad x	%lld bytes,
+>>28 leshort >3
+>>>40	lequad x	%lld bytes,
+#>>63	lelong	x	%d bytes,
+>4	lelong	x	%d inodes,
+>28	leshort <2
+>>32	leshort	x	blocksize: %d bytes,
+>28	leshort >1
+>>28 leshort <4
+>>>51	lelong	x	blocksize: %d bytes,
+>>28 leshort >3
+>>>12	lelong	x	blocksize: %d bytes,
+>28 leshort <4
+>>39	ledate	x	created: %s
+>28 leshort >3
+>>8	ledate	x	created: %s
+
+0	string		td\000		floppy image data (TeleDisk)
+
+# AFS Dump Magic
+# From: Ty Sarna <tsarna at sarna.org> 
+0       string                  \x01\xb3\xa1\x13\x22    AFS Dump
+>&0     belong                  x                       (v%d)
+>>&0    byte                    0x76
+>>>&0   belong                  x                       Vol %d,
+>>>>&0  byte                    0x6e
+>>>>>&0 string                  x                       %s
+>>>>>>&1        byte            0x74
+>>>>>>>&0       beshort         2
+>>>>>>>>&4      bedate          x                       on: %s
+>>>>>>>>&0      bedate          =0                      full dump
+>>>>>>>>&0      bedate          !0                      incremental since: %s
+
+#----------------------------------------------------------
+#delta ISO    Daniel Novotny (dnovotny at redhat.com)
+0	string  DISO	Delta ISO data
+>4	belong  x	version %d
+
+# VMS backup savesets - gerardo.cacciari at gmail.com
+#
+4            string  \x01\x00\x01\x00\x01\x00
+>(0.s+16)    string  \x01\x01
+>>&(&0.b+8)  byte    0x42       OpenVMS backup saveset data
+>>>40        lelong  x          (block size %d,
+>>>49        string  >\0        original name '%s',
+>>>2         short   1024       VAX generated)
+>>>2         short   2048       AXP generated)
+>>>2         short   4096       I64 generated)
+
+# Summary: Oracle Clustered Filesystem
+# Created by: Aaron Botsis <redhat at digitalmafia.org>
+8	string		OracleCFS	Oracle Clustered Filesystem,
+>4	long		x		rev %d
+>0	long		x		\b.%d,
+>560	string		x		label: %.64s,
+>136	string		x		mountpoint: %.128s
+
+# Summary: Oracle ASM tagged volume
+# Created by: Aaron Botsis <redhat at digitalmafia.org>
+32	string		ORCLDISK	Oracle ASM Volume,
+>40	string		x		Disk Name: %0.12s
+32	string		ORCLCLRD	Oracle ASM Volume (cleared),
+>40	string		x		Disk Name: %0.12s
+
+# Oracle Clustered Filesystem - Aaron Botsis <redhat at digitalmafia.org>
+8	string		OracleCFS	Oracle Clustered Filesystem,
+>4	long		x		rev %d
+>0	long		x		\b.%d,
+>560	string		x		label: %.64s,
+>136	string		x		mountpoint: %.128s
+
+# Oracle ASM tagged volume - Aaron Botsis <redhat at digitalmafia.org>
+32	string		ORCLDISK	Oracle ASM Volume,
+>40	string		x		Disk Name: %0.12s
+32	string		ORCLCLRD	Oracle ASM Volume (cleared),
+>40	string		x		Disk Name: %0.12s
+
+# Compaq/HP RILOE floppy image
+# From: Dirk Jagdmann <doj at cubic.org>
+0	string	CPQRFBLO	Compaq/HP RILOE floppy image
+
+#------------------------------------------------------------------------------
+# Files-11 On-Disk Structure (OpenVMS file system) - gerardo.cacciari at gmail.com
+# These bits come from LBN 1 (home block) of ODS-2 and ODS-5 volumes, which is
+# mapped to VBN 2 of [000000]INDEXF.SYS;1
+#
+1008    string          DECFILE11B      Files-11 On-Disk Structure
+>525    byte            x               Level %d
+>525    byte            x               (ODS-%d OpenVMS file system),
+>984    string          x               volume label is '%-12.12s'
+
+# From: Thomas Klausner <wiz at NetBSD.org>
+# http://filext.com/file-extension/DAA
+# describes the daa file format. The magic would be:
+0	string		DAA\x0\x0\x0\x0\x0	PowerISO Direct-Access-Archive
+
+# From Albert Cahalan <acahalan at gmail.com>
+# really le32 operation,destination,payloadsize (but quite predictable)
+# 01 00 00 00 00 00 00 c0 00 02 00 00
+0	string		\1\0\0\0\0\0\0\300\0\2\0\0	Marvell Libertas firmware
+
+# From Eric Sandeen
+# GFS2
+0x10000         belong          0x01161970      Linux
+>0x10018        belong          0x0000051d      GFS1 Filesystem
+>>0x10024        belong          x               (blocksize %d,
+>>0x10060        string          >\0             lockproto %s)
+>0x10018        belong          0x00000709      GFS2 Filesystem
+>>0x10024        belong          x               (blocksize %d,
+>>0x10060        string          >\0             lockproto %s)
+
+# BTRFS
+0x10040         string          _BHRfS_M        BTRFS Filesystem
+>0x1012b        string          >\0             (label "%s",
+>0x10090        lelong          x               sectorsize %d,
+>0x10094        lelong          x               nodesize %d,
+>0x10098        lelong          x               leafsize %d)
+
+
+# dvdisaster's .ecc
+# From: "Nelson A. de Oliveira" <naoliv at gmail.com>
+0	string	*dvdisaster*	dvdisaster error correction file
+
+# xfs metadump image 
+# mb_magic XFSM at 0; superblock magic XFSB at 1 << mb_blocklog
+# but can we do the << ?  For now it's always 512 (0x200) anyway.
+0	string XFSM
+>0x200	string XFSB	XFS filesystem metadump image
+
+
+#------------------------------------------------------------------------------
+# $File: filesystems,v 1.55 2010/01/16 17:45:12 chl Exp $
+# filesystems:  file(1) magic for different filesystems
+#
+0	string	\366\366\366\366	PC formatted floppy with no filesystem
+# Sun disk labels
+# From /usr/include/sun/dklabel.h:
+0774	beshort		0xdabe		
+# modified by Joerg Jenderek, because original test
+# succeeds for Cabinet archive dao360.dl_ with negative blocks
+>0770	long		>0		Sun disk label
+>>0	string		x		'%s
+>>>31	string		>\0		\b%s
+>>>>63	string		>\0		\b%s
+>>>>>95	string		>\0		\b%s
+>>0	string		x		\b'
+>>0734	short		>0		%d rpm,
+>>0736	short		>0		%d phys cys,
+>>0740	short		>0		%d alts/cyl,
+>>0746	short		>0		%d interleave,
+>>0750	short		>0		%d data cyls,
+>>0752	short		>0		%d alt cyls,
+>>0754	short		>0		%d heads/partition,
+>>0756	short		>0		%d sectors/track,
+>>0764	long		>0		start cyl %ld,
+>>0770	long		x		%ld blocks
+# Is there a boot block written 1 sector in?
+>512    belong&077777777	0600407	\b, boot block present
+# Joerg Jenderek: Smart Boot Manager backup file is 41 byte header + first sectors of disc
+# (http://btmgr.sourceforge.net/docs/user-guide-3.html)
+0		string	SBMBAKUP_	Smart Boot Manager backup file
+>9		string	x		\b, version %-5.5s
+>>14		string	=_		
+>>>15		string	x		%-.1s
+>>>>16		string	=_		\b.
+>>>>>17		string	x		\b%-.1s
+>>>>>>18	string	=_		\b.
+>>>>>>>19	string	x		\b%-.1s
+>>>22		ubyte	0		
+>>>>21		ubyte	x		\b, from drive 0x%x
+>>>22		ubyte	>0		
+>>>>21		string	x		\b, from drive %s
+
+# Joerg Jenderek
+# DOS Emulator image is 128 byte, null right padded header + harddisc image
+0	string	DOSEMU\0			
+>0x27E	leshort	0xAA55			
+#offset is 128
+>>19	ubyte	128			
+>>>(19.b-1)	ubyte	0x0	DOS Emulator image
+>>>>7	ulelong	>0		\b, %u heads
+>>>>11	ulelong	>0		\b, %d sectors/track
+>>>>15	ulelong	>0		\b, %d cylinders
+
+# updated by Joerg Jenderek at Sep 2007
+# only for sector sizes with 512 or more Bytes
+0x1FE	leshort	0xAA55			x86 boot sector
+# to do also for sectors < than 512 Bytes and some other files, GRR
+#30	search/481	\x55\xAA	x86 boot sector
+# not for BeOS floppy 1440k, MBRs
+#(11.s-2) uleshort	0xAA55		x86 boot sector
+>2	string	OSBS			\b, OS/BS MBR
+# J\xf6rg Jenderek <joerg dot jenderek at web dot de>
+>0x8C	string	Invalid\ partition\ table	\b, MS-DOS MBR
+# dr-dos with some upper-, lowercase variants
+>0x9D	string	Invalid\ partition\ table$	
+>>181	string	No\ Operating\ System$		
+>>>201	string	Operating\ System\ load\ error$	\b, DR-DOS MBR, Version 7.01 to 7.03
+>0x9D	string	Invalid\ partition\ table$	
+>>181	string	No\ operating\ system$		
+>>>201	string	Operating\ system\ load\ error$	\b, DR-DOS MBR, Version 7.01 to 7.03
+>342	string	Invalid\ partition\ table$	
+>>366	string	No\ operating\ system$		
+>>>386	string	Operating\ system\ load\ error$	\b, DR-DOS MBR, version 7.01 to 7.03
+>295	string	NEWLDR\0				
+>>302	string	Bad\ PT\ $				
+>>>310	string	No\ OS\ $				
+>>>>317	string	OS\ load\ err$				
+>>>>>329	string	Moved\ or\ missing\ IBMBIO.LDR\n\r	
+>>>>>>358	string	Press\ any\ key\ to\ continue.\n\r$	
+>>>>>>>387	string	Copyright\ (c)\ 1984,1998	
+>>>>>>>>411	string	Caldera\ Inc.\0		\b, DR-DOS MBR (IBMBIO.LDR)
+>0x10F	string	Ung\201ltige\ Partitionstabelle	\b, MS-DOS MBR, german version 4.10.1998, 4.10.2222
+>>0x1B8	ubelong	>0				\b, Serial 0x%-.4x
+>0x8B	string	Ung\201ltige\ Partitionstabelle	\b, MS-DOS MBR, german version 5.00 to 4.00.950
+>271	string	Invalid\ partition\ table\0		
+>>295	string	Error\ loading\ operating\ system\0	
+>>>326	string	Missing\ operating\ system\0		\b, mbr
+#
+>139	string	Invalid\ partition\ table\0		
+>>163	string	Error\ loading\ operating\ system\0	
+>>>194	string	Missing\ operating\ system\0		\b, Microsoft Windows XP mbr
+# http://www.heise.de/ct/05/09/006/ page 184
+#HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\DosDevices\?:=Serial4Bytes+8Bytes
+>>>>0x1B8	ulelong	>0				\b,Serial 0x%-.4x
+>300	string	Invalid\ partition\ table\0	
+>>324	string	Error\ loading\ operating\ system\0
+>>>355	string	Missing\ operating\ system\0		\b, Microsoft Windows XP MBR
+#??>>>389	string	Invalid\ system\ disk		
+>>>>0x1B8	ulelong	>0				\b, Serial 0x%-.4x
+>300	string	Ung\201ltige\ Partitionstabelle
+#split string to avoid error: String too long
+>>328	string	Fehler\ beim\ Laden\ 	
+>>>346	string	des\ Betriebssystems	
+>>>>366	string	Betriebssystem\ nicht\ vorhanden	\b, Microsoft Windows XP MBR (german)
+>>>>>0x1B8	ulelong	>0				\b, Serial 0x%-.4x
+#>0x145	string	Default:\ F				\b, FREE-DOS MBR
+#>0x14B	string	Default:\ F				\b, FREE-DOS 1.0 MBR
+>0x145	search/7	Default:\ F			\b, FREE-DOS MBR
+#>>313		string	F0\ .\ .\ .			
+#>>>322		string	disk\ 1				
+#>>>>382	string	FAT3				
+>64	string	no\ active\ partition\ found	
+>>96	string	read\ error\ while\ reading\ drive	\b, FREE-DOS Beta 0.9 MBR
+# Ranish Partition Manager http://www.ranish.com/part/
+>387	search/4	\0\ Error!\r			
+>>378	search/7	Virus! 				
+>>>397	search/4	Booting\ 			
+>>>>408	search/4	HD1/\0	 			\b, Ranish MBR (
+>>>>>416	string	Writing\ changes...		\b2.37
+>>>>>>438	ubyte		x			\b,0x%x dots
+>>>>>>440	ubyte		>0			\b,virus check
+>>>>>>441	ubyte		>0			\b,partition %c
+#2.38,2.42,2.44
+>>>>>416	string	!Writing\ changes...		\b
+>>>>>>418	ubyte	1				\bvirus check,
+>>>>>>419	ubyte	x				\b0x%x seconds
+>>>>>>420	ubyte&0x0F	>0			\b,partition
+>>>>>>>420	ubyte&0x0F	<5			\b %x
+>>>>>>>420	ubyte&0x0F	0Xf			\b ask
+>>>>>420	ubyte		x			\b)
+#
+>271	string	Operating\ system\ loading 		
+>>296	string	error\r					\b, SYSLINUX MBR (2.10)
+# http://www.acronis.de/
+>362	string	MBR\ Error\ \0\r			
+>>376	string	ress\ any\ key\ to\ 			
+>>>392	string	boot\ from\ floppy...\0			\b, Acronis MBR
+# added by Joerg Jenderek
+# http://www.visopsys.org/
+# http://partitionlogic.org.uk/
+>309	string	No\ bootable\ partition\ found\r	
+>>339	string	I/O\ Error\ reading\ boot\ sector\r	\b, Visopsys MBR
+>349	string	No\ bootable\ partition\ found\r	
+>>379	string	I/O\ Error\ reading\ boot\ sector\r	\b, simple Visopsys MBR
+# bootloader, bootmanager
+>0x40	string	SBML				
+# label with 11 characters of FAT 12 bit filesystem
+>>43	string	SMART\ BTMGR			
+>>>430	string	SBMK\ Bad!\r			\b, Smart Boot Manager
+# OEM-ID not always "SBM"
+#>>>>3	strings	SBM				
+>>>>6	string	>\0                             \b, version %s
+>382	string	XOSLLOADXCF			\b, eXtended Operating System Loader
+>6	string	LILO				\b, LInux i386 boot LOader
+>>120	string	LILO				\b, version 22.3.4 SuSe
+>>172	string	LILO				\b, version 22.5.8 Debian
+# updated by Joerg Jenderek at Oct 2008
+# variables according to grub-0.97/stage1/stage1.S or
+# http://www.gnu.org/software/grub/manual/grub.html#Embedded-data
+# usual values are marked with comments to get only informations of strange GRUB loaders
+>342		search/60	\0Geom\0	
+#>0		ulelong		x		%x=0x009048EB ,	0x2a9048EB  0
+>>0x41		ubyte		<2		
+>>>0x3E		ubyte		>2		\b; GRand Unified Bootloader
+# 0x3 for 0.5.95,0.93,0.94,0.96 0x4 for 1.90 
+>>>>0x3E	ubyte		x		\b, stage1 version 0x%x
+#If it is 0xFF, use a drive passed by BIOS
+>>>>0x40	ubyte		<0xFF		\b, boot drive 0x%x
+# in most case 0,1,0x2e for GRUB 0.5.95
+>>>>0x41	ubyte		>0		\b, LBA flag 0x%x
+>>>>0x42	uleshort	<0x8000		\b, stage2 address 0x%x
+#>>>>0x42	uleshort	=0x8000		\b, stage2 address 0x%x (usual)
+>>>>0x42	uleshort	>0x8000		\b, stage2 address 0x%x
+#>>>>0x44	ulelong		=1		\b, 1st sector stage2 0x%x (default)
+>>>>0x44	ulelong		>1		\b, 1st sector stage2 0x%x
+>>>>0x48	uleshort	<0x800		\b, stage2 segment 0x%x
+#>>>>0x48	uleshort	=0x800		\b, stage2 segment 0x%x (usual)
+>>>>0x48	uleshort	>0x800		\b, stage2 segment 0x%x
+>>>>402		string	Geom\0Hard\ Disk\0Read\0\ Error\0
+>>>>>394	string	stage1			\b, GRUB version 0.5.95
+>>>>382		string	Geom\0Hard\ Disk\0Read\0\ Error\0
+>>>>>376	string	GRUB\ \0		\b, GRUB version 0.93 or 1.94
+>>>>383		string	Geom\0Hard\ Disk\0Read\0\ Error\0
+>>>>>377	string	GRUB\ \0		\b, GRUB version 0.94
+>>>>385		string	Geom\0Hard\ Disk\0Read\0\ Error\0
+>>>>>379	string	GRUB\ \0		\b, GRUB version 0.95 or 0.96
+>>>>391		string	Geom\0Hard\ Disk\0Read\0\ Error\0
+>>>>>385	string	GRUB\ \0		\b, GRUB version 0.97
+#unkown version
+>>>343		string	Geom\0Read\0\ Error\0	
+>>>>321		string	Loading\ stage1.5	\b, GRUB version x.y
+>>>380		string	Geom\0Hard\ Disk\0Read\0\ Error\0
+>>>>374		string	GRUB\ \0		\b, GRUB version n.m
+# http://syslinux.zytor.com/
+>478	string	Boot\ failed\r			
+>>495	string	LDLINUX\ SYS			\b, SYSLINUX bootloader (1.62)
+>480	string	Boot\ failed\r			
+>>495	string	LDLINUX\ SYS			\b, SYSLINUX bootloader (2.06 or 2.11)
+>484	string	Boot\ error\r			\b, SYSLINUX bootloader (3.11)
+>395	string	chksum\0\ ERROR!\0		\b, Gujin bootloader
+# http://www.bcdwb.de/bcdw/index_e.htm
+>3	string	BCDL				
+>>498	string	BCDL\ \ \ \ BIN			\b, Bootable CD Loader (1.50Z)
+# mbr partition table entries
+# OEM-ID does not contain MicroSoft,NEWLDR,DOS,SYSLINUX,or MTOOLs
+>3			string		!MS
+>>3			string		!SYSLINUX
+>>>3			string		!MTOOL
+>>>>3			string		!NEWLDR
+>>>>>5			string		!DOS
+# not FAT (32 bit)
+>>>>>>82		string		!FAT32
+#not Linux kernel
+>>>>>>>514		string		!HdrS
+#not BeOS
+>>>>>>>>422		string		!Be\ Boot\ Loader
+# active flag 0 or 0x80 and type > 0
+>>>>>>>>>446		ubyte		<0x81	
+>>>>>>>>>>446		ubyte&0x7F	0	
+>>>>>>>>>>>450		ubyte		>0	\b; partition 1: ID=0x%x
+>>>>>>>>>>>>446		ubyte		0x80	\b, active
+>>>>>>>>>>>>447		ubyte		x	\b, starthead %u
+#>>>>>>>>>>>>448		ubyte		x	\b, start C_S: 0x%x
+#>>>>>>>>>>>>448		ubeshort&1023	x	\b, startcylinder? %d
+>>>>>>>>>>>>454		ulelong		x	\b, startsector %u
+>>>>>>>>>>>>458		ulelong		x	\b, %u sectors
+#
+>>>>>>>>>462		ubyte		<0x81	
+>>>>>>>>>>462		ubyte&0x7F	0		
+>>>>>>>>>>>466		ubyte		>0	\b; partition 2: ID=0x%x
+>>>>>>>>>>>>462		ubyte		0x80	\b, active
+>>>>>>>>>>>>463		ubyte		x	\b, starthead %u
+#>>>>>>>>>>>>464		ubyte		x	\b, start C_S: 0x%x
+#>>>>>>>>>>>>464		ubeshort&1023	x	\b, startcylinder? %d
+>>>>>>>>>>>>470		ulelong		x	\b, startsector %u
+>>>>>>>>>>>>474		ulelong		x	\b, %u sectors
+#
+>>>>>>>>>478		ubyte		<0x81		
+>>>>>>>>>>478		ubyte&0x7F	0		
+>>>>>>>>>>>482		ubyte		>0	\b; partition 3: ID=0x%x
+>>>>>>>>>>>>478		ubyte		0x80	\b, active
+>>>>>>>>>>>>479		ubyte		x	\b, starthead %u
+#>>>>>>>>>>>>480		ubyte		x	\b, start C_S: 0x%x
+#>>>>>>>>>>>>481		ubyte		x	\b, start C2S: 0x%x
+#>>>>>>>>>>>>480		ubeshort&1023	x	\b, startcylinder? %d
+>>>>>>>>>>>>486		ulelong		x	\b, startsector %u
+>>>>>>>>>>>>490		ulelong		x	\b, %u sectors
+#
+>>>>>>>>>494		ubyte		<0x81	
+>>>>>>>>>>494		ubyte&0x7F	0		
+>>>>>>>>>>>498		ubyte		>0	\b; partition 4: ID=0x%x
+>>>>>>>>>>>>494		ubyte		0x80	\b, active
+>>>>>>>>>>>>495		ubyte		x	\b, starthead %u
+#>>>>>>>>>>>>496		ubyte		x	\b, start C_S: 0x%x
+#>>>>>>>>>>>>496		ubeshort&1023	x	\b, startcylinder? %d
+>>>>>>>>>>>>502		ulelong		x	\b, startsector %u
+>>>>>>>>>>>>506		ulelong		x	\b, %u sectors
+# mbr partition table entries end
+# http://www.acronis.de/
+#FAT label=ACRONIS\ SZ
+#OEM-ID=BOOTWIZ0
+>442	string	Non-system\ disk,\ 	
+>>459	string	press\ any\ key...\x7\0		\b, Acronis Startup Recovery Loader
+# DOS names like F11.SYS are 8 right space padded bytes+3 bytes
+>>>477		ubyte&0xDF	>0		
+>>>>477		string		x 		\b %-.3s
+>>>>>480	ubyte&0xDF	>0		
+>>>>>>480	string		x 		\b%-.5s
+>>>>485		ubyte&0xDF	>0		
+>>>>>485	string		x 		\b.%-.3s
+#
+>185	string	FDBOOT\ Version\ 			
+>>204	string	\rNo\ Systemdisk.\ 			
+>>>220	string	Booting\ from\ harddisk.\n\r		
+>>>245	string	Cannot\ load\ from\ harddisk.\n\r	
+>>>>273 string	Insert\ Systemdisk\ 			
+>>>>>291 string and\ press\ any\ key.\n\r		\b, FDBOOT harddisk Bootloader
+>>>>>>200 string	>\0                             \b, version %-3s
+>242	string	Bootsector\ from\ C.H.\ Hochst\204	
+>>278	string	No\ Systemdisk.\ 			
+>>>293	string	Booting\ from\ harddisk.\n\r		
+>>>441	string	Cannot\ load\ from\ harddisk.\n\r	
+>>>>469 string	Insert\ Systemdisk\ 			
+>>>>>487 string and\ press\ any\ key.\n\r		\b, WinImage harddisk Bootloader
+>>>>>>209 string	>\0                             \b, version %-4.4s
+>(1.b+2)	ubyte		0xe			
+>>(1.b+3)	ubyte		0x1f			
+>>>(1.b+4)	ubyte		0xbe			
+>>>>(1.b+5)	ubyte		0x77			
+>>>>(1.b+6)	ubyte		0x7c			
+>>>>>(1.b+7)	ubyte		0xac			
+>>>>>>(1.b+8)	ubyte		0x22			
+>>>>>>>(1.b+9)	ubyte		0xc0			
+>>>>>>>>(1.b+10)	ubyte	0x74			
+>>>>>>>>>(1.b+11)	ubyte	0xb			
+>>>>>>>>>>(1.b+12)	ubyte	0x56			
+>>>>>>>>>>(1.b+13)	ubyte	0xb4			\b, mkdosfs boot message display
+>214	string	Please\ try\ to\ install\ FreeDOS\ 	\b, DOS Emulator boot message display
+#>>244	string	from\ dosemu-freedos-*-bin.tgz\r	
+#>>>170	string	Sorry,\ could\ not\ load\ an\ 		
+#>>>>195	string	operating\ system.\r\n		
+#
+>103	string	This\ is\ not\ a\ bootable\ disk.\ 	
+>>132	string	Please\ insert\ a\ bootable\ 		
+>>>157	string	floppy\ and\r\n				
+>>>>169	string	press\ any\ key\ to\ try\ again...\r	\b, FREE-DOS message display
+#
+>66	string	Solaris\ Boot\ Sector    		
+>>99	string	Incomplete\ MDBoot\ load.		
+>>>89	string	Version 				\b, Sun Solaris Bootloader
+>>>>97	byte	x					version %c
+#
+>408	string	OS/2\ !!\ SYS01475\r\0			
+>>429	string	OS/2\ !!\ SYS02025\r\0			
+>>>450	string	OS/2\ !!\ SYS02027\r\0			
+>>>469	string	OS2BOOT\ \ \ \ 				\b, IBM OS/2 Warp bootloader
+#
+>409	string	OS/2\ !!\ SYS01475\r\0			
+>>430	string	OS/2\ !!\ SYS02025\r\0			
+>>>451	string	OS/2\ !!\ SYS02027\r\0			
+>>>470	string	OS2BOOT\ \ \ \ 				\b, IBM OS/2 Warp Bootloader
+>112		string	This\ disk\ is\ not\ bootable\r			
+>>142		string	If\ you\ wish\ to\ make\ it\ bootable		
+>>>176		string	run\ the\ DOS\ program\ SYS\  			
+>>>200		string	after\ the\r					
+>>>>216		string	system\ has\ been\ loaded\r\n			
+>>>>>242	string	Please\ insert\ a\ DOS\ diskette\ 		
+>>>>>271	string	into\r\n\ the\ drive\ and\ 			
+>>>>>>292	string	strike\ any\ key...\0		\b, IBM OS/2 Warp message display
+# XP
+>430	string	NTLDR\ is\ missing\xFF\r\n		
+>>449	string	Disk\ error\xFF\r\n			
+>>>462	string	Press\ any\ key\ to\ restart\r		\b, Microsoft Windows XP Bootloader
+# DOS names like NTLDR,CMLDR,$LDR$ are 8 right space padded bytes+3 bytes
+>>>>417		ubyte&0xDF	>0			
+>>>>>417	string		x			%-.5s
+>>>>>>422	ubyte&0xDF	>0			
+>>>>>>>422	string		x 			\b%-.3s
+>>>>>425	ubyte&0xDF	>0			
+>>>>>>425	string		>\ 			\b.%-.3s
+#
+>>>>371		ubyte		>0x20			
+>>>>>368	ubyte&0xDF	>0			
+>>>>>>368	string		x 			%-.5s
+>>>>>>>373	ubyte&0xDF	>0			
+>>>>>>>>373	string		x 			\b%-.3s
+>>>>>>376	ubyte&0xDF	>0			
+>>>>>>>376	string		x 			\b.%-.3s
+#
+>430	string	NTLDR\ nicht\ gefunden\xFF\r\n		
+>>453	string	Datentr\204gerfehler\xFF\r\n		
+>>>473	string	Neustart\ mit\ beliebiger\ Taste\r	\b, Microsoft Windows XP Bootloader (german)
+>>>>417		ubyte&0xDF	>0			
+>>>>>417	string		x			%-.5s
+>>>>>>422	ubyte&0xDF	>0			
+>>>>>>>422	string		x 			\b%-.3s
+>>>>>425	ubyte&0xDF	>0			
+>>>>>>425	string		>\ 			\b.%-.3s
+# offset variant
+>>>>379	string	\0					
+>>>>>368	ubyte&0xDF	>0			
+>>>>>>368	string		x 			%-.5s
+>>>>>>>373	ubyte&0xDF	>0			
+>>>>>>>>373	string		x 			\b%-.3s
+#
+>430	string	NTLDR\ fehlt\xFF\r\n			
+>>444	string	Datentr\204gerfehler\xFF\r\n		
+>>>464	string	Neustart\ mit\ beliebiger\ Taste\r	\b, Microsoft Windows XP Bootloader (2.german)
+>>>>417		ubyte&0xDF	>0			
+>>>>>417	string		x			%-.5s
+>>>>>>422	ubyte&0xDF	>0			
+>>>>>>>422	string		x 			\b%-.3s
+>>>>>425	ubyte&0xDF	>0			
+>>>>>>425	string		>\ 			\b.%-.3s
+# variant
+>>>>371		ubyte		>0x20			
+>>>>>368	ubyte&0xDF	>0			
+>>>>>>368	string		x 			%-.5s
+>>>>>>>373	ubyte&0xDF	>0			
+>>>>>>>>373	string		x 			\b%-.3s
+>>>>>>376	ubyte&0xDF	>0			
+>>>>>>>376	string		x 			\b.%-.3s
+#
+>430	string	NTLDR\ fehlt\xFF\r\n			
+>>444	string	Medienfehler\xFF\r\n			
+>>>459	string	Neustart:\ Taste\ dr\201cken\r		\b, Microsoft Windows XP Bootloader (3.german)
+>>>>371		ubyte		>0x20			
+>>>>>368	ubyte&0xDF	>0			
+>>>>>>368	string		x 			%-.5s
+>>>>>>>373	ubyte&0xDF	>0			
+>>>>>>>>373	string		x 			\b%-.3s
+>>>>>>376	ubyte&0xDF	>0			
+>>>>>>>376	string		x 			\b.%-.3s
+# variant
+>>>>417		ubyte&0xDF	>0			
+>>>>>417	string		x			%-.5s
+>>>>>>422	ubyte&0xDF	>0			
+>>>>>>>422	string		x 			\b%-.3s
+>>>>>425	ubyte&0xDF	>0			
+>>>>>>425	string		>\ 			\b.%-.3s
+#
+>430	string	Datentr\204ger\ entfernen\xFF\r\n	
+>>454	string	Medienfehler\xFF\r\n			
+>>>469	string	Neustart:\ Taste\ dr\201cken\r		\b, Microsoft Windows XP Bootloader (4.german)
+>>>>379		string		\0			
+>>>>>368	ubyte&0xDF	>0			
+>>>>>>368	string		x 			%-.5s
+>>>>>>>373	ubyte&0xDF	>0			
+>>>>>>>>373	string		x 			\b%-.3s
+>>>>>>376	ubyte&0xDF	>0			
+>>>>>>>376	string		x 			\b.%-.3s
+# variant
+>>>>417		ubyte&0xDF	>0			
+>>>>>417	string		x			%-.5s
+>>>>>>422	ubyte&0xDF	>0			
+>>>>>>>422	string		x 			\b%-.3s
+>>>>>425	ubyte&0xDF	>0			
+>>>>>>425	string		>\ 			\b.%-.3s
+#
+
+#>3	string	NTFS\ \ \ \ 				
+>389	string	Fehler\ beim\ Lesen\ 
+>>407	string	des\ Datentr\204gers
+>>>426	string	NTLDR\ fehlt				
+>>>>440	string	NTLDR\ ist\ komprimiert
+>>>>>464 string	Neustart\ mit\ Strg+Alt+Entf\r		\b, Microsoft Windows XP Bootloader NTFS (german)
+#>3	string	NTFS\ \ \ \ 				
+>313	string	A\ disk\ read\ error\ occurred.\r
+>>345	string	A\ kernel\ file\ is\ missing\ 	
+>>>370	string	from\ the\ disk.\r		
+>>>>484	string	NTLDR\ is\ compressed		
+>>>>>429 string	Insert\ a\ system\ diskette\ 	
+>>>>>>454 string and\ restart\r\nthe\ system.\r		\b, Microsoft Windows XP Bootloader NTFS
+# DOS loader variants different languages,offsets
+>472	ubyte&0xDF	>0
+>>389	string	Invalid\ system\ disk\xFF\r\n		
+>>>411	string	Disk\ I/O\ error			
+>>>>428	string	Replace\ the\ disk,\ and\ 		
+>>>>>455 string	press\ any\ key				\b, Microsoft Windows 98 Bootloader
+#IO.SYS
+>>>>>>472	ubyte&0xDF	>0			
+>>>>>>>472	string		x 			\b %-.2s
+>>>>>>>>474	ubyte&0xDF	>0			
+>>>>>>>>>474	string		x 			\b%-.5s
+>>>>>>>>>>479	ubyte&0xDF	>0			
+>>>>>>>>>>>479 string		x 			\b%-.1s
+>>>>>>>480	ubyte&0xDF	>0			
+>>>>>>>>480	string		x 			\b.%-.3s
+#MSDOS.SYS
+>>>>>>>483	ubyte&0xDF	>0			\b+
+>>>>>>>>483	string		x 			\b%-.5s
+>>>>>>>>>488	ubyte&0xDF	>0			
+>>>>>>>>>>488	string		x 			\b%-.3s
+>>>>>>>>491	ubyte&0xDF	>0			
+>>>>>>>>>491	string		x 			\b.%-.3s
+#
+>>390	string	Invalid\ system\ disk\xFF\r\n		
+>>>412	string	Disk\ I/O\ error\xFF\r\n		
+>>>>429	string	Replace\ the\ disk,\ and\ 		
+>>>>>451 string	then\ press\ any\ key\r			\b, Microsoft Windows 98 Bootloader
+>>388	string	Ungueltiges\ System\ \xFF\r\n		
+>>>410	string	E/A-Fehler\ \ \ \ \xFF\r\n		
+>>>>427	string	Datentraeger\ wechseln\ und\ 		
+>>>>>453 string	Taste\ druecken\r			\b, Microsoft Windows 95/98/ME Bootloader (german)
+#WINBOOT.SYS only not spaces (0xDF)
+>>>>>>497	ubyte&0xDF	>0			
+>>>>>>>497	string		x 			%-.5s
+>>>>>>>>502	ubyte&0xDF	>0			
+>>>>>>>>>502	string		x 			\b%-.1s
+>>>>>>>>>>503	ubyte&0xDF	>0			
+>>>>>>>>>>>503	string		x 			\b%-.1s
+>>>>>>>>>>>>504	ubyte&0xDF	>0			
+>>>>>>>>>>>>>504 string		x 			\b%-.1s
+>>>>>>505	ubyte&0xDF	>0			
+>>>>>>>505	string		x 			\b.%-.3s
+#IO.SYS
+>>>>>>472	ubyte&0xDF	>0			or
+>>>>>>>472	string		x 			\b %-.2s
+>>>>>>>>474	ubyte&0xDF	>0			
+>>>>>>>>>474	string		x 			\b%-.5s
+>>>>>>>>>>479	ubyte&0xDF	>0			
+>>>>>>>>>>>479 string		x 			\b%-.1s
+>>>>>>>480	ubyte&0xDF	>0			
+>>>>>>>>480	string		x 			\b.%-.3s
+#MSDOS.SYS
+>>>>>>>483	ubyte&0xDF	>0			\b+
+>>>>>>>>483	string		x 			\b%-.5s
+>>>>>>>>>488	ubyte&0xDF	>0			
+>>>>>>>>>>488	string		x 			\b%-.3s
+>>>>>>>>491	ubyte&0xDF	>0			
+>>>>>>>>>491	string		x 			\b.%-.3s
+#
+>>390	string	Ungueltiges\ System\ \xFF\r\n		
+>>>412	string	E/A-Fehler\ \ \ \ \xFF\r\n		
+>>>>429	string	Datentraeger\ wechseln\ und\ 		
+>>>>>455 string	Taste\ druecken\r			\b, Microsoft Windows 95/98/ME Bootloader (German)
+#WINBOOT.SYS only not spaces (0xDF)
+>>>>>>497	ubyte&0xDF	>0			
+>>>>>>>497	string		x 			%-.7s
+>>>>>>>>504	ubyte&0xDF	>0			
+>>>>>>>>>504	string		x 			\b%-.1s
+>>>>>>505	ubyte&0xDF	>0			
+>>>>>>>505	string		x 			\b.%-.3s
+#IO.SYS
+>>>>>>472	ubyte&0xDF	>0			or
+>>>>>>>472	string		x 			\b %-.2s
+>>>>>>>>474	ubyte&0xDF	>0			
+>>>>>>>>>474	string		x 			\b%-.6s
+>>>>>>>480	ubyte&0xDF	>0			
+>>>>>>>>480	string		x 			\b.%-.3s
+#MSDOS.SYS
+>>>>>>>483	ubyte&0xDF	>0			\b+
+>>>>>>>>483	string		x 			\b%-.5s
+>>>>>>>>>488	ubyte&0xDF	>0			
+>>>>>>>>>>488	string		x 			\b%-.3s
+>>>>>>>>491	ubyte&0xDF	>0			
+>>>>>>>>>491	string		x 			\b.%-.3s
+#
+>>389	string	Ungueltiges\ System\ \xFF\r\n		
+>>>411	string	E/A-Fehler\ \ \ \ \xFF\r\n		
+>>>>428	string	Datentraeger\ wechseln\ und\ 		
+>>>>>454 string	Taste\ druecken\r			\b, Microsoft Windows 95/98/ME Bootloader (GERMAN)
+# DOS names like IO.SYS,WINBOOT.SYS,MSDOS.SYS,WINBOOT.INI are 8 right space padded bytes+3 bytes
+>>>>>>472	string		x 			%-.2s
+>>>>>>>474	ubyte&0xDF	>0			
+>>>>>>>>474	string		x 			\b%-.5s
+>>>>>>>>479	ubyte&0xDF	>0			
+>>>>>>>>>479	string		x 			\b%-.1s
+>>>>>>480	ubyte&0xDF	>0			
+>>>>>>>480	string		x 			\b.%-.3s
+>>>>>>483	ubyte&0xDF	>0			\b+
+>>>>>>>483	string		x 			\b%-.5s
+>>>>>>>488	ubyte&0xDF	>0			
+>>>>>>>>488	string		x 			\b%-.2s
+>>>>>>>>490	ubyte&0xDF	>0			
+>>>>>>>>>490	string		x 			\b%-.1s
+>>>>>>>491	ubyte&0xDF	>0			
+>>>>>>>>491	string		x 			\b.%-.3s
+>479	ubyte&0xDF	>0
+>>416	string	Kein\ System\ oder\ 			
+>>>433	string	Laufwerksfehler				
+>>>>450	string	Wechseln\ und\ Taste\ dr\201cken	\b, Microsoft DOS Bootloader (german)
+#IO.SYS
+>>>>>479	string		x 			\b %-.2s
+>>>>>>481	ubyte&0xDF	>0			
+>>>>>>>481	string		x 			\b%-.6s
+>>>>>487	ubyte&0xDF	>0			
+>>>>>>487	string		x 			\b.%-.3s
+#MSDOS.SYS
+>>>>>>490	ubyte&0xDF	>0			\b+
+>>>>>>>490	string		x 			\b%-.5s
+>>>>>>>>495	ubyte&0xDF	>0			
+>>>>>>>>>495	string		x 			\b%-.3s
+>>>>>>>498	ubyte&0xDF	>0			
+>>>>>>>>498	string		x 			\b.%-.3s
+#
+>376	search/41	Non-System\ disk\ or\ 		
+>>395	search/41	disk\ error\r			
+>>>407	search/41	Replace\ and\ 			
+>>>>419	search/41	press\ 				\b,
+>>>>419	search/41	strike\ 			\b, old
+>>>>426	search/41	any\ key\ when\ ready\r		MS or PC-DOS bootloader
+#449			Disk\ Boot\ failure\r		MS 3.21
+#466			Boot\ Failure\r			MS 3.30
+>>>>>468 search/18	\0				
+#IO.SYS,IBMBIO.COM
+>>>>>>&0	string		x 			\b %-.2s
+>>>>>>>&-20	ubyte&0xDF	>0			
+>>>>>>>>&-1	string		x 			\b%-.4s
+>>>>>>>>>&-16	ubyte&0xDF	>0			
+>>>>>>>>>>&-1	string		x 			\b%-.2s
+>>>>>>&8	ubyte&0xDF	>0			\b.
+>>>>>>>&-1	string		x 			\b%-.3s
+#MSDOS.SYS,IBMDOS.COM
+>>>>>>&11	ubyte&0xDF	>0			\b+
+>>>>>>>&-1	string		x 			\b%-.5s
+>>>>>>>>&-6	ubyte&0xDF	>0			
+>>>>>>>>>&-1	string		x 			\b%-.1s
+>>>>>>>>>>&-5	ubyte&0xDF	>0			
+>>>>>>>>>>>&-1	string		x 			\b%-.2s
+>>>>>>>&7	ubyte&0xDF	>0			\b.
+>>>>>>>>&-1	string		x 			\b%-.3s
+>441	string	Cannot\ load\ from\ harddisk.\n\r
+>>469	string	Insert\ Systemdisk\ 			
+>>>487	string	and\ press\ any\ key.\n\r		\b, MS (2.11) DOS bootloader
+#>43	string	\224R-LOADER\ \ SYS			=label					
+>54	string	SYS
+>>324	string	VASKK
+>>>495	string	NEWLDR\0				\b, DR-DOS Bootloader (LOADER.SYS)
+#
+>98	string	Press\ a\ key\ to\ retry\0\r		
+>>120	string	Cannot\ find\ file\ \0\r		
+>>>139	string	Disk\ read\ error\0\r			
+>>>>156	string	Loading\ ...\0				\b, DR-DOS (3.41) Bootloader
+#DRBIOS.SYS
+>>>>>44		ubyte&0xDF	>0			
+>>>>>>44	string		x			\b %-.6s
+>>>>>>>50	ubyte&0xDF	>0			
+>>>>>>>>50	string		x 			\b%-.2s
+>>>>>>52	ubyte&0xDF	>0			
+>>>>>>>52	string		x 			\b.%-.3s
+#
+>70	string	IBMBIO\ \ COM				
+>>472	string	Cannot\ load\ DOS!\ 			
+>>>489	string	Any\ key\ to\ retry			\b, DR-DOS Bootloader
+>>471	string	Cannot\ load\ DOS\ 			
+>>487	string	press\ key\ to\ retry			\b, Open-DOS Bootloader
+#??
+>444	string	KERNEL\ \ SYS					
+>>314	string	BOOT\ error!				\b, FREE-DOS Bootloader
+>499	string	KERNEL\ \ SYS				
+>>305	string	BOOT\ err!\0				\b, Free-DOS Bootloader
+>449	string	KERNEL\ \ SYS				
+>>319	string	BOOT\ error!				\b, FREE-DOS 0.5 Bootloader
+#
+>449	string	Loading\ FreeDOS			
+>>0x1AF		ulelong		>0			\b, FREE-DOS 0.95,1.0 Bootloader
+>>>497		ubyte&0xDF	>0			
+>>>>497		string		x 			\b %-.6s
+>>>>>503	ubyte&0xDF	>0			
+>>>>>>503	string		x 			\b%-.1s
+>>>>>>>504	ubyte&0xDF	>0			
+>>>>>>>>504	string		x 			\b%-.1s
+>>>>505		ubyte&0xDF	>0			
+>>>>>505	string		x 			\b.%-.3s
+#
+>331	string	Error!.0				\b, FREE-DOS 1.0 bootloader
+#
+>125	string	Loading\ FreeDOS...\r			
+>>311	string	BOOT\ error!\r				\b, FREE-DOS bootloader
+>>>441		ubyte&0xDF	>0			
+>>>>441		string		x 			\b %-.6s
+>>>>>447	ubyte&0xDF	>0			
+>>>>>>447	string		x 			\b%-.1s
+>>>>>>>448	ubyte&0xDF	>0			
+>>>>>>>>448	string		x 			\b%-.1s
+>>>>449		ubyte&0xDF	>0			
+>>>>>449	string		x 			\b.%-.3s
+>124	string	FreeDOS\0				
+>>331	string	\ err\0					\b, FREE-DOS BETa 0.9 Bootloader
+# DOS names like KERNEL.SYS,KERNEL16.SYS,KERNEL32.SYS,METAKERN.SYS are 8 right space padded bytes+3 bytes
+>>>497		ubyte&0xDF	>0			
+>>>>497		string		x 			\b %-.6s
+>>>>>503	ubyte&0xDF	>0			
+>>>>>>503	string		x 			\b%-.1s
+>>>>>>>504	ubyte&0xDF	>0			
+>>>>>>>>504	string		x 			\b%-.1s
+>>>>505		ubyte&0xDF	>0			
+>>>>>505	string		x 			\b.%-.3s
+>>333	string	\ err\0					\b, FREE-DOS BEta 0.9 Bootloader
+>>>497		ubyte&0xDF	>0			
+>>>>497		string		x 			\b %-.6s
+>>>>>503	ubyte&0xDF	>0			
+>>>>>>503	string		x 			\b%-.1s
+>>>>>>>504	ubyte&0xDF	>0			
+>>>>>>>>504	string		x 			\b%-.1s
+>>>>505		ubyte&0xDF	>0			
+>>>>>505	string		x 			\b.%-.3s
+>>334	string	\ err\0					\b, FREE-DOS Beta 0.9 Bootloader
+>>>497		ubyte&0xDF	>0			
+>>>>497		string		x 			\b %-.6s
+>>>>>503	ubyte&0xDF	>0			
+>>>>>>503	string		x 			\b%-.1s
+>>>>>>>504	ubyte&0xDF	>0			
+>>>>>>>>504	string		x 			\b%-.1s
+>>>>505		ubyte&0xDF	>0			
+>>>>>505	string		x 			\b.%-.3s
+>336	string	Error!\ 				
+>>343	string	Hit\ a\ key\ to\ reboot.		\b, FREE-DOS Beta 0.9sr1 Bootloader
+>>>497		ubyte&0xDF	>0			
+>>>>497		string		x 			\b %-.6s
+>>>>>503	ubyte&0xDF	>0			
+>>>>>>503	string		x 			\b%-.1s
+>>>>>>>504	ubyte&0xDF	>0			
+>>>>>>>>504	string		x 			\b%-.1s
+>>>>505		ubyte&0xDF	>0			
+>>>>>505	string		x 			\b.%-.3s
+# added by Joerg Jenderek
+# http://www.visopsys.org/
+# http://partitionlogic.org.uk/
+# OEM-ID=Visopsys
+>478		ulelong	0					
+>>(1.b+326)	string	I/O\ Error\ reading\ 			
+>>>(1.b+344)	string	Visopsys\ loader\r			
+>>>>(1.b+361)	string	Press\ any\ key\ to\ continue.\r	\b, Visopsys loader
+# http://alexfru.chat.ru/epm.html#bootprog
+>494	ubyte	>0x4D					
+>>495	string	>E					
+>>>495	string	<S					
+#OEM-ID is not reliable
+>>>>3	string	BootProg				
+# It just looks for a program file name at the root directory
+# and loads corresponding file with following execution.
+# DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes
+>>>>499			ubyte&0xDF	>0		\b, COM/EXE Bootloader
+>>>>>499		string		x 		\b %-.1s
+>>>>>>500		ubyte&0xDF	>0		
+>>>>>>>500		string		x 		\b%-.1s
+>>>>>>>>501		ubyte&0xDF	>0		
+>>>>>>>>>501		string		x 		\b%-.1s
+>>>>>>>>>>502		ubyte&0xDF	>0		
+>>>>>>>>>>>502		string		x 		\b%-.1s
+>>>>>>>>>>>>503		ubyte&0xDF	>0		
+>>>>>>>>>>>>>503	string		x 		\b%-.1s
+>>>>>>>>>>>>>>504	ubyte&0xDF	>0		
+>>>>>>>>>>>>>>>504	string		x 		\b%-.1s
+>>>>>>>>>>>>>>>>505	ubyte&0xDF	>0		
+>>>>>>>>>>>>>>>>>505	string		x 		\b%-.1s
+>>>>>>>>>>>>>>>>>>506	ubyte&0xDF	>0		
+>>>>>>>>>>>>>>>>>>>506	string		x 		\b%-.1s
+#name extension
+>>>>>507		ubyte&0xDF	>0		\b.
+>>>>>>507		string		x 		\b%-.1s
+>>>>>>>508		ubyte&0xDF	>0		
+>>>>>>>>508		string		x 		\b%-.1s
+>>>>>>>>>509		ubyte&0xDF	>0		
+>>>>>>>>>>509		string		x 		\b%-.1s
+#If the boot sector fails to read any other sector,
+#it prints a very short message ("RE") to the screen and hangs the computer.
+#If the boot sector fails to find needed program in the root directory,
+#it also hangs with another message ("NF").
+>>>>>492		string		RENF		\b, FAT (12 bit)
+>>>>>495		string		RENF		\b, FAT (16 bit)
+# http://alexfru.chat.ru/epm.html#bootprog
+>494	ubyte	>0x4D					
+>>495	string	>E					
+>>>495	string	<S					
+#OEM-ID is not reliable
+>>>>3	string	BootProg				
+# It just looks for a program file name at the root directory
+# and loads corresponding file with following execution.
+# DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes
+>>>>499			ubyte&0xDF	>0		\b, COM/EXE Bootloader
+>>>>>499		string		x 		\b %-.1s
+>>>>>>500		ubyte&0xDF	>0		
+>>>>>>>500		string		x 		\b%-.1s
+>>>>>>>>501		ubyte&0xDF	>0		
+>>>>>>>>>501		string		x 		\b%-.1s
+>>>>>>>>>>502		ubyte&0xDF	>0		
+>>>>>>>>>>>502		string		x 		\b%-.1s
+>>>>>>>>>>>>503		ubyte&0xDF	>0		
+>>>>>>>>>>>>>503	string		x 		\b%-.1s
+>>>>>>>>>>>>>>504	ubyte&0xDF	>0		
+>>>>>>>>>>>>>>>504	string		x 		\b%-.1s
+>>>>>>>>>>>>>>>>505	ubyte&0xDF	>0		
+>>>>>>>>>>>>>>>>>505	string		x 		\b%-.1s
+>>>>>>>>>>>>>>>>>>506	ubyte&0xDF	>0		
+>>>>>>>>>>>>>>>>>>>506	string		x 		\b%-.1s
+#name extension
+>>>>>507		ubyte&0xDF	>0		\b.
+>>>>>>507		string		x 		\b%-.1s
+>>>>>>>508		ubyte&0xDF	>0		
+>>>>>>>>508		string		x 		\b%-.1s
+>>>>>>>>>509		ubyte&0xDF	>0		
+>>>>>>>>>>509		string		x 		\b%-.1s
+#If the boot sector fails to read any other sector,
+#it prints a very short message ("RE") to the screen and hangs the computer.
+#If the boot sector fails to find needed program in the root directory,
+#it also hangs with another message ("NF").
+>>>>>492		string		RENF		\b, FAT (12 bit)
+>>>>>495		string		RENF		\b, FAT (16 bit)
+# x86 bootloader end
+# updated by Joerg Jenderek at Sep 2007
+>3	ubyte	0			
+#no active flag
+>>446	ubyte	0			
+# partition 1 not empty
+>>>450	ubyte	>0			
+# partitions 3,4 empty
+>>>>482		ubyte	0			
+>>>>>498	ubyte	0			
+# partition 2 ID=0,5,15
+>>>>>>466	ubyte	<0x10			
+>>>>>>>466	ubyte	0x05			\b, extended partition table
+>>>>>>>466	ubyte	0x0F			\b, extended partition table (LBA)
+>>>>>>>466	ubyte	0x0			\b, extended partition table (last)	
+# JuMP short     bootcodeoffset NOP assembler instructions will usually be EB xx 90
+# http://mirror.href.com/thestarman/asm/2bytejumps.htmm#FWD
+# older drives may use Near JuMP instruction E9 xx xx
+>0		lelong&0x009000EB	0x009000EB 
+>0		lelong&0x000000E9	0x000000E9 
+# minimal short forward jump found 03cx??
+# maximal short forward jump is 07fx
+>1		ubyte			<0xff	\b, code offset 0x%x
+# mtools-3.9.8/msdos.h
+# usual values are marked with comments to get only informations of strange FAT systems
+# valid sectorsize must be a power of 2 from 32 to 32768
+>>11		uleshort&0x000f	x		
+>>>11		uleshort	<32769		
+>>>>11		uleshort	>31		
+>>>>>21		ubyte&0xf0	0xF0		
+>>>>>>3		string		>\0		\b, OEM-ID "%8.8s"
+#http://mirror.href.com/thestarman/asm/debug/debug2.htm#IHC
+>>>>>>>8	string		IHC		\b cached by Windows 9M
+>>>>>>11	uleshort	>512		\b, Bytes/sector %u
+#>>>>>>11	uleshort	=512		\b, Bytes/sector %u=512 (usual)
+>>>>>>11	uleshort	<512		\b, Bytes/sector %u
+>>>>>>13	ubyte		>1		\b, sectors/cluster %u
+#>>>>>>13	ubyte		=1		\b, sectors/cluster %u (usual on Floppies)
+>>>>>>14	uleshort	>32		\b, reserved sectors %u
+#>>>>>>14	uleshort	=32		\b, reserved sectors %u (usual Fat32)
+#>>>>>>14	uleshort	>1		\b, reserved sectors %u
+#>>>>>>14	uleshort	=1		\b, reserved sectors %u (usual FAT12,FAT16)
+>>>>>>14	uleshort	<1		\b, reserved sectors %u
+>>>>>>16	ubyte		>2		\b, FATs %u
+#>>>>>>16	ubyte		=2		\b, FATs %u (usual)
+>>>>>>16	ubyte		=1		\b, FAT  %u
+>>>>>>16	ubyte		>0
+>>>>>>17	uleshort	>0		\b, root entries %u
+#>>>>>>17	uleshort	=0		\b, root entries %u=0 (usual Fat32)
+>>>>>>19	uleshort	>0		\b, sectors %u (volumes <=32 MB) 
+#>>>>>>19	uleshort	=0		\b, sectors %u=0 (usual Fat32)
+>>>>>>21	ubyte		>0xF0		\b, Media descriptor 0x%x
+#>>>>>>21	ubyte		=0xF0		\b, Media descriptor 0x%x (usual floppy)
+>>>>>>21	ubyte		<0xF0		\b, Media descriptor 0x%x
+>>>>>>22	uleshort	>0		\b, sectors/FAT %u
+#>>>>>>22	uleshort	=0		\b, sectors/FAT %u=0 (usual Fat32)
+>>>>>>26	ubyte		>2		\b, heads %u
+#>>>>>>26	ubyte		=2		\b, heads %u (usual floppy)
+>>>>>>26	ubyte		=1		\b, heads %u
+#skip for Digital Research DOS (version 3.41) 1440 kB Bootdisk
+>>>>>>38	ubyte		!0x70		
+>>>>>>>28	ulelong		>0		\b, hidden sectors %u
+#>>>>>>>28	ulelong		=0		\b, hidden sectors %u (usual floppy)
+>>>>>>>32	ulelong		>0		\b, sectors %u (volumes > 32 MB) 
+#>>>>>>>32	ulelong		=0		\b, sectors %u (volumes > 32 MB)
+# FAT<32 specific 
+>>>>>>82	string		!FAT32
+#>>>>>>>36	ubyte		0x80		\b, physical drive 0x%x=0x80 (usual harddisk)
+#>>>>>>>36	ubyte		0		\b, physical drive 0x%x=0 (usual floppy)
+>>>>>>>36	ubyte		!0x80		
+>>>>>>>>36	ubyte		!0		\b, physical drive 0x%x
+>>>>>>>37	ubyte		>0		\b, reserved 0x%x
+#>>>>>>>37	ubyte		=0		\b, reserved 0x%x
+>>>>>>>38	ubyte		>0x29		\b, dos < 4.0 BootSector (0x%x)
+>>>>>>>38	ubyte		<0x29		\b, dos < 4.0 BootSector (0x%x)
+>>>>>>>38	ubyte		=0x29
+>>>>>>>>39	ulelong		x		\b, serial number 0x%x
+>>>>>>>>43	string		<NO\ NAME	\b, label: "%11.11s"
+>>>>>>>>43	string		>NO\ NAME	\b, label: "%11.11s"
+>>>>>>>>43	string		=NO\ NAME	\b, unlabeled
+>>>>>>>54	string		FAT		\b, FAT
+>>>>>>>>54	string		FAT12		\b (12 bit)
+>>>>>>>>54	string		FAT16		\b (16 bit)
+# FAT32 specific
+>>>>>>82	string		FAT32		\b, FAT (32 bit)
+>>>>>>>36	ulelong		x		\b, sectors/FAT %u
+>>>>>>>40	uleshort	>0		\b, extension flags %u
+#>>>>>>>40	uleshort	=0		\b, extension flags %u
+>>>>>>>42	uleshort	>0		\b, fsVersion %u
+#>>>>>>>42	uleshort	=0		\b, fsVersion %u (usual)
+>>>>>>>44	ulelong		>2		\b, rootdir cluster %u
+#>>>>>>>44	ulelong		=2		\b, rootdir cluster %u
+#>>>>>>>44	ulelong		=1		\b, rootdir cluster %u
+>>>>>>>48	uleshort	>1		\b, infoSector %u
+#>>>>>>>48	uleshort	=1		\b, infoSector %u (usual)
+>>>>>>>48	uleshort	<1		\b, infoSector %u
+>>>>>>>50	uleshort	>6		\b, Backup boot sector %u
+#>>>>>>>50	uleshort	=6		\b, Backup boot sector %u (usual) 
+>>>>>>>50	uleshort	<6		\b, Backup boot sector %u
+>>>>>>>54	ulelong		>0		\b, reserved1 0x%x
+>>>>>>>58	ulelong		>0		\b, reserved2 0x%x
+>>>>>>>62	ulelong		>0		\b, reserved3 0x%x
+# same structure as FAT1X 
+>>>>>>>64	ubyte		>0x80		\b, physical drive 0x%x
+#>>>>>>>64	ubyte		=0x80		\b, physical drive 0x%x=80 (usual harddisk)
+>>>>>>>64	ubyte&0x7F	>0		\b, physical drive 0x%x
+#>>>>>>>64	ubyte		=0		\b, physical drive 0x%x=0 (usual floppy)
+>>>>>>>65	ubyte		>0		\b, reserved 0x%x
+>>>>>>>66	ubyte		>0x29		\b, dos < 4.0 BootSector (0x%x)
+>>>>>>>66	ubyte		<0x29		\b, dos < 4.0 BootSector (0x%x)
+>>>>>>>66	ubyte		=0x29
+>>>>>>>>67	ulelong		x		\b, serial number 0x%x
+>>>>>>>>71	string		<NO\ NAME	\b, label: "%11.11s"
+>>>>>>>71	string		>NO\ NAME	\b, label: "%11.11s"
+>>>>>>>71	string		=NO\ NAME	\b, unlabeled
+### FATs end
+>0x200	lelong	0x82564557		\b, BSD disklabel
+# FATX 
+0		string		FATX		FATX filesystem data
+
+
+# Minix filesystems - Juan Cespedes <cespedes at debian.org>
+0x410	leshort		0x137f
+!:strength / 2
+>0x402	beshort		< 100		Minix filesystem, V1, %d zones
+>0x1e	string		minix		\b, bootable
+0x410	beshort		0x137f
+!:strength / 2
+>0x402	beshort		< 100		Minix filesystem, V1 (big endian), %d zones
+>0x1e	string		minix		\b, bootable
+0x410	leshort		0x138f
+!:strength / 2
+>0x402	beshort		< 100		Minix filesystem, V1, 30 char names, %d zones
+>0x1e	string		minix		\b, bootable
+0x410	beshort		0x138f
+!:strength / 2
+>0x402	beshort		< 100		Minix filesystem, V1, 30 char names (big endian), %d zones
+>0x1e	string		minix		\b, bootable
+0x410	leshort		0x2468
+>0x402	beshort		< 100		Minix filesystem, V2, %d zones
+>0x1e	string		minix		\b, bootable
+0x410	beshort		0x2468
+>0x402	beshort		< 100		Minix filesystem, V2 (big endian), %d zones
+>0x1e	string		minix		\b, bootable
+
+0x410	leshort		0x2478
+>0x402	beshort		< 100		Minix filesystem, V2, 30 char names, %d zones
+>0x1e	string		minix		\b, bootable
+0x410	leshort		0x2478
+>0x402	beshort		< 100		Minix filesystem, V2, 30 char names, %d zones
+>0x1e	string		minix		\b, bootable
+0x410	beshort		0x2478
+>0x402	beshort		!0		Minix filesystem, V2, 30 char names (big endian), %d zones
+>0x1e	string		minix		\b, bootable
+0x410	leshort		0x4d5a
+>0x402	beshort		!0		Minix filesystem, V3, %d zones
+>0x1e	string		minix		\b, bootable
+
+# romfs filesystems - Juan Cespedes <cespedes at debian.org>
+0	string		-rom1fs-	romfs filesystem, version 1
+>8	belong	x			%d bytes,
+>16	string	x			named %s.
+
+# netboot image - Juan Cespedes <cespedes at debian.org>
+0	lelong		0x1b031336L	Netboot image,
+>4	lelong&0xFFFFFF00	0
+>>4	lelong&0x100	0x000		mode 2
+>>4	lelong&0x100	0x100		mode 3
+>4	lelong&0xFFFFFF00	!0	unknown mode
+
+0x18b	string	OS/2	OS/2 Boot Manager
+
+# updated by Joerg Jenderek at Oct 2008!!
+# http://syslinux.zytor.com/iso.php
+0	ulelong	0x7c40eafa		isolinux Loader
+# http://syslinux.zytor.com/pxe.php
+0	ulelong	0x007c05ea		pxelinux Loader
+0	ulelong	0x60669c66		pxelinux Loader
+
+# added by Joerg Jenderek
+# In the second sector (+0x200) are variables according to grub-0.97/stage2/asm.S or
+# grub-1.94/kern/i386/pc/startup.S
+# http://www.gnu.org/software/grub/manual/grub.html#Embedded-data
+# usual values are marked with comments to get only informations of strange GRUB loaders
+0x200	uleshort		0x70EA		
+# found only version 3.{1,2}
+>0x206		ubeshort	>0x0300		
+# GRUB version (0.5.)95,0.93,0.94,0.96,0.97 > "00"
+>>0x212 	ubyte		>0x29		
+>>>0x213 	ubyte		>0x29		
+# not iso9660_stage1_5
+#>>>0	ulelong&0x00BE5652	0x00BE5652	
+>>>>0x213 	ubyte		>0x29		GRand Unified Bootloader
+# config_file for stage1_5 is 0xffffffff + default "/boot/grub/stage2"
+>>>>0x217 	ubyte		0xFF		stage1_5
+>>>>0x217 	ubyte		<0xFF		stage2
+>>>>0x206	ubyte		x		\b version %u
+>>>>0x207	ubyte		x		\b.%u
+# module_size for 1.94
+>>>>0x208	ulelong		<0xffffff	\b, installed partition %u
+#>>>>0x208	ulelong		=0xffffff	\b, %u (default)
+>>>>0x208	ulelong		>0xffffff	\b, installed partition %u
+# GRUB 0.5.95 unofficial
+>>>>0x20C	ulelong&0x2E300000 0x2E300000	
+# 0=stage2	1=ffs	2=e2fs	3=fat	4=minix	5=reiserfs
+>>>>>0x20C	ubyte		x		\b, identifier 0x%x
+#>>>>>0x20D	ubyte		=0		\b, LBA flag 0x%x (default)
+>>>>>0x20D	ubyte		>0		\b, LBA flag 0x%x
+# GRUB version as string
+>>>>>0x20E 	string		>\0		\b, GRUB version %-s
+# for stage1_5 is 0xffffffff + config_file "/boot/grub/stage2" default
+>>>>>>0x215 	ulong		0xffffffff	
+>>>>>>>0x219 	string		>\0		\b, configuration file %-s
+>>>>>>0x215 	ulong		!0xffffffff	
+>>>>>>>0x215 	string		>\0		\b, configuration file %-s
+# newer GRUB versions
+>>>>0x20C	ulelong&0x2E300000 !0x2E300000	
+##>>>>>0x20C	ulelong		=0		\b, saved entry %d (usual)
+>>>>>0x20C	ulelong		>0		\b, saved entry %d
+# for 1.94 contains kernel image size
+# for 0.93,0.94,0.96,0.97
+# 0=stage2	1=ffs	2=e2fs	3=fat	4=minix	5=reiserfs	6=vstafs	7=jfs	8=xfs	9=iso9660	a=ufs2	
+>>>>>0x210	ubyte		x		\b, identifier 0x%x
+# The flag for LBA forcing is in most cases 0
+#>>>>>0x211	ubyte		=0		\b, LBA flag 0x%x (default)
+>>>>>0x211	ubyte		>0		\b, LBA flag 0x%x
+# GRUB version as string
+>>>>>0x212 	string		>\0		\b, GRUB version %-s
+# for stage1_5 is 0xffffffff + config_file "/boot/grub/stage2" default
+>>>>>0x217 	ulong		0xffffffff	
+>>>>>>0x21b 	string		>\0		\b, configuration file %-s
+>>>>>0x217 	ulong		!0xffffffff	
+>>>>>>0x217 	string		>\0		\b, configuration file %-s
+
+9564	lelong		0x00011954	Unix Fast File system [v1] (little-endian),
+>8404	string		x		last mounted on %s,
+#>9504	ledate		x		last checked at %s,
+>8224	ledate		x		last written at %s,
+>8401	byte		x		clean flag %d,
+>8228	lelong		x		number of blocks %d,
+>8232	lelong		x		number of data blocks %d,
+>8236	lelong		x		number of cylinder groups %d,
+>8240	lelong		x		block size %d,
+>8244	lelong		x		fragment size %d,
+>8252	lelong		x		minimum percentage of free blocks %d,
+>8256	lelong		x		rotational delay %dms,
+>8260	lelong		x		disk rotational speed %drps,
+>8320	lelong		0		TIME optimization
+>8320	lelong		1		SPACE optimization
+
+42332	lelong		0x19540119	Unix Fast File system [v2] (little-endian)
+>&-1164	string		x		last mounted on %s,
+>&-696	string		>\0		volume name %s,
+>&-304	leqldate	x		last written at %s,
+>&-1167	byte		x		clean flag %d,
+>&-1168	byte		x		readonly flag %d,
+>&-296	lequad		x		number of blocks %lld,
+>&-288	lequad		x		number of data blocks %lld,
+>&-1332	lelong		x		number of cylinder groups %d,
+>&-1328	lelong		x		block size %d,
+>&-1324	lelong		x		fragment size %d,
+>&-180	lelong		x		average file size %d,
+>&-176	lelong		x		average number of files in dir %d,
+>&-272	lequad		x		pending blocks to free %lld,
+>&-264	lelong		x		pending inodes to free %ld,
+>&-664	lequad		x		system-wide uuid %0llx,
+>&-1316	lelong		x		minimum percentage of free blocks %d,
+>&-1248	lelong		0		TIME optimization
+>&-1248	lelong		1		SPACE optimization
+
+66908	lelong		0x19540119	Unix Fast File system [v2] (little-endian)
+>&-1164	string		x		last mounted on %s,
+>&-696	string		>\0		volume name %s,
+>&-304	leqldate	x		last written at %s,
+>&-1167	byte		x		clean flag %d,
+>&-1168	byte		x		readonly flag %d,
+>&-296	lequad		x		number of blocks %lld,
+>&-288	lequad		x		number of data blocks %lld,
+>&-1332	lelong		x		number of cylinder groups %d,
+>&-1328	lelong		x		block size %d,
+>&-1324	lelong		x		fragment size %d,
+>&-180	lelong		x		average file size %d,
+>&-176	lelong		x		average number of files in dir %d,
+>&-272	lequad		x		pending blocks to free %lld,
+>&-264	lelong		x		pending inodes to free %ld,
+>&-664	lequad		x		system-wide uuid %0llx,
+>&-1316	lelong		x		minimum percentage of free blocks %d,
+>&-1248	lelong		0		TIME optimization
+>&-1248	lelong		1		SPACE optimization
+
+9564	belong		0x00011954	Unix Fast File system [v1] (big-endian),
+>7168   belong		0x4c41424c	Apple UFS Volume
+>>7186  string		x		named %s,
+>>7176  belong		x		volume label version %d,
+>>7180  bedate		x		created on %s,
+>8404	string		x		last mounted on %s,
+#>9504	bedate		x		last checked at %s,
+>8224	bedate		x		last written at %s,
+>8401	byte		x		clean flag %d,
+>8228	belong		x		number of blocks %d,
+>8232	belong		x		number of data blocks %d,
+>8236	belong		x		number of cylinder groups %d,
+>8240	belong		x		block size %d,
+>8244	belong		x		fragment size %d,
+>8252	belong		x		minimum percentage of free blocks %d,
+>8256	belong		x		rotational delay %dms,
+>8260	belong		x		disk rotational speed %drps,
+>8320	belong		0		TIME optimization
+>8320	belong		1		SPACE optimization
+
+42332	belong		0x19540119	Unix Fast File system [v2] (big-endian)
+>&-1164	string		x		last mounted on %s,
+>&-696	string		>\0		volume name %s,
+>&-304	beqldate	x		last written at %s,
+>&-1167	byte		x		clean flag %d,
+>&-1168	byte		x		readonly flag %d,
+>&-296	bequad		x		number of blocks %lld,
+>&-288	bequad		x		number of data blocks %lld,
+>&-1332	belong		x		number of cylinder groups %d,
+>&-1328	belong		x		block size %d,
+>&-1324	belong		x		fragment size %d,
+>&-180	belong		x		average file size %d,
+>&-176	belong		x		average number of files in dir %d,
+>&-272	bequad		x		pending blocks to free %lld,
+>&-264	belong		x		pending inodes to free %ld,
+>&-664	bequad		x		system-wide uuid %0llx,
+>&-1316	belong		x		minimum percentage of free blocks %d,
+>&-1248	belong		0		TIME optimization
+>&-1248	belong		1		SPACE optimization
+
+66908	belong		0x19540119	Unix Fast File system [v2] (big-endian)
+>&-1164	string		x		last mounted on %s,
+>&-696	string		>\0		volume name %s,
+>&-304	beqldate	x		last written at %s,
+>&-1167	byte		x		clean flag %d,
+>&-1168	byte		x		readonly flag %d,
+>&-296	bequad		x		number of blocks %lld,
+>&-288	bequad		x		number of data blocks %lld,
+>&-1332	belong		x		number of cylinder groups %d,
+>&-1328	belong		x		block size %d,
+>&-1324	belong		x		fragment size %d,
+>&-180	belong		x		average file size %d,
+>&-176	belong		x		average number of files in dir %d,
+>&-272	bequad		x		pending blocks to free %lld,
+>&-264	belong		x		pending inodes to free %ld,
+>&-664	bequad		x		system-wide uuid %0llx,
+>&-1316	belong		x		minimum percentage of free blocks %d,
+>&-1248	belong		0		TIME optimization
+>&-1248	belong		1		SPACE optimization
+
+# ext2/ext3 filesystems - Andreas Dilger <adilger at dilger.ca>
+# ext4 filesystem - Eric Sandeen <sandeen at sandeen.net>
+0x438   leshort         0xEF53          Linux
+>0x44c  lelong          x               rev %d
+>0x43e  leshort         x               \b.%d
+# No journal?  ext2
+>0x45c  lelong          ^0x0000004      ext2 filesystem data
+>>0x43a leshort         ^0x0000001      (mounted or unclean)
+# Has a journal?  ext3 or ext4
+>0x45c  lelong          &0x0000004
+#  and small INCOMPAT?
+>>0x460 lelong          <0x0000040
+#   and small RO_COMPAT?
+>>>0x464 lelong         <0x0000008      ext3 filesystem data
+#   else large RO_COMPAT?
+>>>0x464 lelong         >0x0000007      ext4 filesystem data
+#  else large INCOMPAT?
+>>0x460 lelong          >0x000003f      ext4 filesystem data
+# General flags for any ext* fs
+>0x460  lelong          &0x0000004      (needs journal recovery)
+>0x43a  leshort         &0x0000002      (errors)
+# INCOMPAT flags
+>0x460  lelong          &0x0000001      (compressed)
+#>0x460 lelong          &0x0000002      (filetype)
+#>0x460 lelong          &0x0000010      (meta bg)
+>0x460  lelong          &0x0000040      (extents)
+>0x460  lelong          &0x0000080      (64bit)
+#>0x460 lelong          &0x0000100      (mmp)
+#>0x460 lelong          &0x0000200      (flex bg)
+# RO_INCOMPAT flags
+#>0x464 lelong          &0x0000001      (sparse super)
+>0x464  lelong          &0x0000002      (large files)
+>0x464  lelong          &0x0000008      (huge files)
+#>0x464 lelong          &0x0000010      (gdt checksum)
+#>0x464 lelong          &0x0000020      (many subdirs)
+#>0x463 lelong          &0x0000040      (extra isize)
+
+# SGI disk labels - Nathan Scott <nathans at debian.org>
+0	belong		0x0BE5A941	SGI disk label (volume header)
+
+# SGI XFS filesystem - Nathan Scott <nathans at debian.org>
+0	belong		0x58465342	SGI XFS filesystem data
+>0x4	belong		x		(blksz %d,
+>0x68	beshort		x		inosz %d,
+>0x64	beshort		^0x2004		v1 dirs)
+>0x64	beshort		&0x2004		v2 dirs)
+
+############################################################################
+# Minix-ST kernel floppy
+0x800	belong		0x46fc2700	Atari-ST Minix kernel image
+>19	string		\240\5\371\5\0\011\0\2\0	\b, 720k floppy
+>19	string		\320\2\370\5\0\011\0\1\0	\b, 360k floppy
+
+############################################################################
+# Hmmm, is this a better way of detecting _standard_ floppy images ?
+19	string		\320\2\360\3\0\011\0\1\0	DOS floppy 360k
+>0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
+19	string		\240\5\371\3\0\011\0\2\0	DOS floppy 720k
+>0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
+19	string		\100\013\360\011\0\022\0\2\0	DOS floppy 1440k
+>0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
+
+19	string		\240\5\371\5\0\011\0\2\0	DOS floppy 720k, IBM
+>0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
+19	string		\100\013\371\5\0\011\0\2\0	DOS floppy 1440k, mkdosfs
+>0x1FE	leshort		0xAA55		\b, x86 hard disk boot sector
+
+19	string		\320\2\370\5\0\011\0\1\0	Atari-ST floppy 360k
+19	string		\240\5\371\5\0\011\0\2\0	Atari-ST floppy 720k
+
+#  Valid media descriptor bytes for MS-DOS:
+#
+#     Byte   Capacity   Media Size and Type
+#     -------------------------------------------------
+#
+#     F0     2.88 MB    3.5-inch, 2-sided, 36-sector
+#     F0     1.44 MB    3.5-inch, 2-sided, 18-sector
+#     F9     720K       3.5-inch, 2-sided, 9-sector
+#     F9     1.2 MB     5.25-inch, 2-sided, 15-sector
+#     FD     360K       5.25-inch, 2-sided, 9-sector
+#     FF     320K       5.25-inch, 2-sided, 8-sector
+#     FC     180K       5.25-inch, 1-sided, 9-sector
+#     FE     160K       5.25-inch, 1-sided, 8-sector
+#     FE     250K       8-inch, 1-sided, single-density
+#     FD     500K       8-inch, 2-sided, single-density
+#     FE     1.2 MB     8-inch, 2-sided, double-density
+#     F8     -----      Fixed disk 
+#
+#     FC     xxxK       Apricot 70x1x9 boot disk.
+#
+# Originally a bitmap:
+#  xxxxxxx0	Not two sided
+#  xxxxxxx1	Double sided
+#  xxxxxx0x	Not 8 SPT
+#  xxxxxx1x	8 SPT
+#  xxxxx0xx	Not Removable drive
+#  xxxxx1xx	Removable drive
+#  11111xxx	Must be one.
+#
+# But now it's rather random:
+#  111111xx	Low density disk
+#        00	SS, Not 8 SPT
+#        01	DS, Not 8 SPT
+#        10	SS, 8 SPT
+#        11	DS, 8 SPT
+#
+#  11111001	Double density 3� floppy disk, high density 5�
+#  11110000	High density 3� floppy disk
+#  11111000	Hard disk any format
+#
+
+# CDROM Filesystems
+# Modified for UDF by gerardo.cacciari at gmail.com
+32769	string    CD001
+!:mime	application/x-iso9660-image
+>38913	string   !NSR0      ISO 9660 CD-ROM filesystem data
+>38913	string    NSR0      UDF filesystem data
+>>38917	string    1         (version 1.0)
+>>38917	string    2         (version 1.5)
+>>38917	string    3         (version 2.0)
+>>38917	byte     >0x33      (unknown version, ID 0x%X)
+>>38917	byte     <0x31      (unknown version, ID 0x%X)
+# "application id" which appears to be used as a volume label
+>32808	string    >\0       '%s'
+>34816	string    \000CD001\001EL\ TORITO\ SPECIFICATION    (bootable)
+37633	string    CD001     ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
+!:mime	application/x-iso9660-image
+32776	string    CDROM     High Sierra CD-ROM filesystem data
+
+# .cso files
+0    string    CISO	Compressed ISO CD image
+
+# cramfs filesystem - russell at coker.com.au
+0       lelong    0x28cd3d45      Linux Compressed ROM File System data, little endian
+>4      lelong  x size %lu
+>8      lelong  &1 version #2
+>8      lelong  &2 sorted_dirs
+>8      lelong  &4 hole_support
+>32     lelong  x CRC 0x%x,
+>36     lelong  x edition %lu,
+>40     lelong  x %lu blocks,
+>44     lelong  x %lu files
+
+0       belong    0x28cd3d45      Linux Compressed ROM File System data, big endian
+>4      belong  x size %lu
+>8      belong  &1 version #2
+>8      belong  &2 sorted_dirs
+>8      belong  &4 hole_support
+>32     belong  x CRC 0x%x,
+>36     belong  x edition %lu,
+>40     belong  x %lu blocks,
+>44     belong  x %lu files
+
+# reiserfs - russell at coker.com.au
+0x10034		string	ReIsErFs	ReiserFS V3.5
+0x10034		string	ReIsEr2Fs	ReiserFS V3.6
+>0x1002c 	leshort	x		block size %d
+>0x10032	leshort	&2		(mounted or unclean)
+>0x10000	lelong	x		num blocks %d
+>0x10040	lelong	1		tea hash
+>0x10040	lelong	2		yura hash
+>0x10040	lelong	3		r5 hash
+
+# JFFS - russell at coker.com.au
+0	lelong	0x34383931	Linux Journalled Flash File system, little endian
+0	belong	0x34383931	Linux Journalled Flash File system, big endian
+
+# EST flat binary format (which isn't, but anyway)
+# From: Mark Brown <broonie at sirena.org.uk>
+0	string	ESTFBINR	EST flat binary
+
+# Aculab VoIP firmware
+# From: Mark Brown <broonie at sirena.org.uk>
+0	string	VoIP\ Startup\ and	Aculab VoIP firmware
+>35	string	x	format %s
+
+# From: Mark Brown <broonie at sirena.org.uk> [old]
+# From: Behan Webster <behanw at websterwood.com>
+0	belong	0x27051956	u-boot legacy uImage,
+>32	string	x		%s,
+>28	byte	0		Invalid os/
+>28	byte	1		OpenBSD/
+>28	byte	2		NetBSD/
+>28	byte	3		FreeBSD/
+>28	byte	4		4.4BSD/
+>28	byte	5		Linux/
+>28	byte	6		SVR4/
+>28	byte	7		Esix/
+>28	byte	8		Solaris/
+>28	byte	9		Irix/
+>28	byte	10		SCO/
+>28	byte	11		Dell/
+>28	byte	12		NCR/
+>28	byte	13		LynxOS/
+>28	byte	14		VxWorks/
+>28	byte	15		pSOS/
+>28	byte	16		QNX/
+>28	byte	17		Firmware/
+>28	byte	18		RTEMS/
+>28	byte	19		ARTOS/
+>28	byte	20		Unity OS/
+>28	byte	21		INTEGRITY/
+>29	byte	0		\bInvalid CPU,
+>29	byte	1		\bAlpha,
+>29	byte	2		\bARM,
+>29	byte	3		\bIntel x86,
+>29	byte	4		\bIA64,
+>29	byte	5		\bMIPS,
+>29	byte	6		\bMIPS 64-bit,
+>29	byte	7		\bPowerPC,
+>29	byte	8		\bIBM S390,
+>29	byte	9		\bSuperH,
+>29	byte	10		\bSparc,
+>29	byte	11		\bSparc 64-bit,
+>29	byte	12		\bM68K,
+>29	byte	13		\bNios-32,
+>29	byte	14		\bMicroBlaze,
+>29	byte	15		\bNios-II,
+>29	byte	16		\bBlackfin,
+>29	byte	17		\bAVR32,
+>29	byte	18		\bSTMicroelectronics ST200,
+>30	byte	0		Invalid Image
+>30	byte	1		Standalone Program
+>30	byte	2		OS Kernel Image
+>30	byte	3		RAMDisk Image
+>30	byte	4		Multi-File Image
+>30	byte	5		Firmware Image
+>30	byte	6		Script File
+>30	byte	7		Filesystem Image (any type)
+>30	byte	8		Binary Flat Device Tree BLOB
+>31	byte	0		(Not compressed),
+>31	byte	1		(gzip),
+>31	byte	2		(bzip2),
+>31	byte	3		(lzma),
+>12	belong	x		%d bytes,
+>8	bedate	x		%s,
+>16	belong	x		Load Address: 0x%08X,
+>20	belong	x		Entry Point: 0x%08X,
+>4	belong	x		Header CRC: 0x%08X,
+>24	belong	x		Data CRC: 0x%08X
+
+# JFFS2 file system
+0	leshort	0x1984		Linux old jffs2 filesystem data little endian
+0	leshort	0x1985		Linux jffs2 filesystem data little endian
+
+# Squashfs
+0	string	sqsh	Squashfs filesystem, big endian,
+>28	beshort	x	version %d.
+>30	beshort x	\b%d,
+>28	beshort <3
+>>8	belong	x	%d bytes,
+>28	beshort >2
+>>28 beshort <4
+>>>63	bequad x	%lld bytes,
+>>28 beshort >3
+>>>40	bequad x	%lld bytes,
+#>>67	belong	x	%d bytes,
+>4	belong	x	%d inodes,
+>28	beshort <2
+>>32	beshort	x	blocksize: %d bytes,
+>28	beshort >1
+>>28 beshort <4
+>>>51	belong	x	blocksize: %d bytes,
+>>28 beshort >3
+>>>12	belong	x	blocksize: %d bytes,
+>28 beshort <4
+>>39	bedate	x	created: %s
+>28 beshort >3
+>>8	bedate	x	created: %s
+0	string	hsqs	Squashfs filesystem, little endian,
+>28	leshort	x	version %d.
+>30	leshort	x	\b%d,
+>28	leshort <3
+>>8	lelong	x	%d bytes,
+>28	leshort >2
+>>28 leshort <4
+>>>63	lequad x	%lld bytes,
+>>28 leshort >3
+>>>40	lequad x	%lld bytes,
+#>>63	lelong	x	%d bytes,
+>4	lelong	x	%d inodes,
+>28	leshort <2
+>>32	leshort	x	blocksize: %d bytes,
+>28	leshort >1
+>>28 leshort <4
+>>>51	lelong	x	blocksize: %d bytes,
+>>28 leshort >3
+>>>12	lelong	x	blocksize: %d bytes,
+>28 leshort <4
+>>39	ledate	x	created: %s
+>28 leshort >3
+>>8	ledate	x	created: %s
+
+0	string		td\000		floppy image data (TeleDisk)
+
+# AFS Dump Magic
+# From: Ty Sarna <tsarna at sarna.org> 
+0       string                  \x01\xb3\xa1\x13\x22    AFS Dump
+>&0     belong                  x                       (v%d)
+>>&0    byte                    0x76
+>>>&0   belong                  x                       Vol %d,
+>>>>&0  byte                    0x6e
+>>>>>&0 string                  x                       %s
+>>>>>>&1        byte            0x74
+>>>>>>>&0       beshort         2
+>>>>>>>>&4      bedate          x                       on: %s
+>>>>>>>>&0      bedate          =0                      full dump
+>>>>>>>>&0      bedate          !0                      incremental since: %s
+
+#----------------------------------------------------------
+#delta ISO    Daniel Novotny (dnovotny at redhat.com)
+0	string  DISO	Delta ISO data
+>4	belong  x	version %d
+
+# VMS backup savesets - gerardo.cacciari at gmail.com
+#
+4            string  \x01\x00\x01\x00\x01\x00
+>(0.s+16)    string  \x01\x01
+>>&(&0.b+8)  byte    0x42       OpenVMS backup saveset data
+>>>40        lelong  x          (block size %d,
+>>>49        string  >\0        original name '%s',
+>>>2         short   1024       VAX generated)
+>>>2         short   2048       AXP generated)
+>>>2         short   4096       I64 generated)
+
+# Summary: Oracle Clustered Filesystem
+# Created by: Aaron Botsis <redhat at digitalmafia.org>
+8	string		OracleCFS	Oracle Clustered Filesystem,
+>4	long		x		rev %d
+>0	long		x		\b.%d,
+>560	string		x		label: %.64s,
+>136	string		x		mountpoint: %.128s
+
+# Summary: Oracle ASM tagged volume
+# Created by: Aaron Botsis <redhat at digitalmafia.org>
+32	string		ORCLDISK	Oracle ASM Volume,
+>40	string		x		Disk Name: %0.12s
+32	string		ORCLCLRD	Oracle ASM Volume (cleared),
+>40	string		x		Disk Name: %0.12s
+
+# Oracle Clustered Filesystem - Aaron Botsis <redhat at digitalmafia.org>
+8	string		OracleCFS	Oracle Clustered Filesystem,
+>4	long		x		rev %d
+>0	long		x		\b.%d,
+>560	string		x		label: %.64s,
+>136	string		x		mountpoint: %.128s
+
+# Oracle ASM tagged volume - Aaron Botsis <redhat at digitalmafia.org>
+32	string		ORCLDISK	Oracle ASM Volume,
+>40	string		x		Disk Name: %0.12s
+32	string		ORCLCLRD	Oracle ASM Volume (cleared),
+>40	string		x		Disk Name: %0.12s
+
+# Compaq/HP RILOE floppy image
+# From: Dirk Jagdmann <doj at cubic.org>
+0	string	CPQRFBLO	Compaq/HP RILOE floppy image
+
+#------------------------------------------------------------------------------
+# Files-11 On-Disk Structure (OpenVMS file system) - gerardo.cacciari at gmail.com
+# These bits come from LBN 1 (home block) of ODS-2 and ODS-5 volumes, which is
+# mapped to VBN 2 of [000000]INDEXF.SYS;1
+#
+1008    string          DECFILE11B      Files-11 On-Disk Structure
+>525    byte            x               Level %d
+>525    byte            x               (ODS-%d OpenVMS file system),
+>984    string          x               volume label is '%-12.12s'
+
+# From: Thomas Klausner <wiz at NetBSD.org>
+# http://filext.com/file-extension/DAA
+# describes the daa file format. The magic would be:
+0	string		DAA\x0\x0\x0\x0\x0	PowerISO Direct-Access-Archive
+
+# From Albert Cahalan <acahalan at gmail.com>
+# really le32 operation,destination,payloadsize (but quite predictable)
+# 01 00 00 00 00 00 00 c0 00 02 00 00
+0	string		\1\0\0\0\0\0\0\300\0\2\0\0	Marvell Libertas firmware
+
+# From Eric Sandeen
+# GFS2
+0x10000         belong          0x01161970      Linux
+>0x10018        belong          0x0000051d      GFS1 Filesystem
+>>0x10024        belong          x               (blocksize %d,
+>>0x10060        string          >\0             lockproto %s)
+>0x10018        belong          0x00000709      GFS2 Filesystem
+>>0x10024        belong          x               (blocksize %d,
+>>0x10060        string          >\0             lockproto %s)
+
+# BTRFS
+0x10040         string          _BHRfS_M        BTRFS Filesystem
+>0x1012b        string          >\0             (label "%s",
+>0x10090        lelong          x               sectorsize %d,
+>0x10094        lelong          x               nodesize %d,
+>0x10098        lelong          x               leafsize %d)
+
+
+# dvdisaster's .ecc
+# From: "Nelson A. de Oliveira" <naoliv at gmail.com>
+0	string	*dvdisaster*	dvdisaster error correction file
+
+# xfs metadump image 
+# mb_magic XFSM at 0; superblock magic XFSB at 1 << mb_blocklog
+# but can we do the << ?  For now it's always 512 (0x200) anyway.
+0	string XFSM
+>0x200	string XFSB	XFS filesystem metadump image
+
+
+#------------------------------------------------------------------------------
+# $File: flash,v 1.9 2009/11/08 01:30:01 christos Exp $
+# flash:	file(1) magic for Macromedia Flash file format
+#
+# See
+#
+#	http://www.macromedia.com/software/flash/open/
+#
+0	string		FWS		Macromedia Flash data,
+>3	byte		x		version %d
+!:mime	application/x-shockwave-flash
+0	string		CWS		Macromedia Flash data (compressed),
+!:mime	application/x-shockwave-flash
+>3	byte		x		version %d
+# From: Cal Peake <cp at absolutedigital.net>
+0	string		FLV		Macromedia Flash Video
+!:mime	video/x-flv
+
+#
+# Yosu Gomez
+0       string AGD2\xbe\xb8\xbb\xcd\x00 Macromedia Freehand 7 Document
+0       string AGD3\xbe\xb8\xbb\xcc\x00 Macromedia Freehand 8 Document
+# From Dave Wilson
+0	string AGD4\xbe\xb8\xbb\xcb\x00	Macromedia Freehand 9 Document
+
+#------------------------------------------------------------------------------
+# $File: fonts,v 1.21 2009/12/06 23:17:52 rrt Exp $
+# fonts:  file(1) magic for font data
+#
+0	search/1	FONT		ASCII vfont text
+0	short		0436		Berkeley vfont data
+0	short		017001		byte-swapped Berkeley vfont data
+
+# PostScript fonts (must precede "printer" entries), quinlan at yggdrasil.com
+0	string		%!PS-AdobeFont-1.	PostScript Type 1 font text
+>20	string		>\0			(%s)
+6	string		%!PS-AdobeFont-1.	PostScript Type 1 font program data
+0	string		%!FontType1	PostScript Type 1 font program data
+6	string		%!FontType1	PostScript Type 1 font program data
+0	string		%!PS-Adobe-3.0\ Resource-Font	PostScript Type 1 font text
+
+# X11 font files in SNF (Server Natural Format) format
+0	belong		00000004		X11 SNF font data, MSB first
+0	lelong		00000004		X11 SNF font data, LSB first
+
+# X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan at yggdrasil.com)
+0	search/1	STARTFONT\ 		X11 BDF font text
+
+# X11 fonts, from Daniel Quinlan (quinlan at yggdrasil.com)
+# PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides)
+0	string		\001fcp			X11 Portable Compiled Font data
+>12	byte		0x02			\b, LSB first
+>12	byte		0x0a			\b, MSB first
+0	string		D1.0\015		X11 Speedo font data
+
+#------------------------------------------------------------------------------
+# FIGlet fonts and controlfiles
+# From figmagic supplied with Figlet version 2.2
+# "David E. O'Brien" <obrien at FreeBSD.ORG>
+0	string		flf		FIGlet font
+>3	string		>2a		version %-2.2s
+0	string		flc		FIGlet controlfile
+>3	string		>2a		version %-2.2s
+
+# libGrx graphics lib fonts, from Albert Cahalan (acahalan at cs.uml.edu)
+# Used with djgpp (DOS Gnu C++), sometimes Linux or Turbo C++
+0	belong		0x14025919	libGrx font data,
+>8	leshort		x		%dx
+>10	leshort		x		\b%d
+>40	string		x		%s
+# Misc. DOS VGA fonts, from Albert Cahalan (acahalan at cs.uml.edu)
+0	belong		0xff464f4e	DOS code page font data collection
+7	belong		0x00454741	DOS code page font data
+7	belong		0x00564944	DOS code page font data (from Linux?)
+4098	string		DOSFONT		DOSFONT2 encrypted font data
+
+# downloadable fonts for browser (prints type) anthon at mnt.org
+0	string		PFR1		PFR1 font
+>102	string		>0		\b: %s
+
+# True Type fonts
+0	string	\000\001\000\000\000	TrueType font data
+!:mime application/x-font-ttf
+
+0	string		\007\001\001\000Copyright\ (c)\ 199	Adobe Multiple Master font
+0	string		\012\001\001\000Copyright\ (c)\ 199	Adobe Multiple Master font
+
+0	string		ttcf		TrueType font collection data
+
+# Opentype font data from Avi Bercovich
+0	string		OTTO		OpenType font data
+!:mime application/vnd.ms-opentype
+
+# Gürkan Sengün <gurkan at linuks.mine.nu>, www.linuks.mine.nu 
+0	string		SplineFontDB:	Spline Font Database 
+!:mime application/vnd.font-fontforge-sfd
+>14	string		x		version %s
+
+#------------------------------------------------------------------------------
+# $File: fortran,v 1.6 2009/09/19 16:28:09 christos Exp $
+# FORTRAN source
+0	regex/100	\^[Cc][\ \t]	FORTRAN program
+!:mime	text/x-fortran
+
+#------------------------------------------------------------------------------
+# $File: frame,v 1.12 2009/09/19 16:28:09 christos Exp $
+# frame:  file(1) magic for FrameMaker files
+#
+# This stuff came on a FrameMaker demo tape, most of which is
+# copyright, but this file is "published" as witness the following:
+#
+# Note that this is the Framemaker Maker Interchange Format, not the
+# Normal format which would be application/vnd.framemaker.
+#
+0	string		\<MakerFile	FrameMaker document
+!:mime	application/x-mif
+>11	string		5.5		 (5.5
+>11	string		5.0		 (5.0
+>11	string		4.0		 (4.0
+>11	string		3.0		 (3.0
+>11	string		2.0		 (2.0
+>11	string		1.0		 (1.0
+>14	byte		x		  %c)
+0	string		\<MIFFile	FrameMaker MIF (ASCII) file
+!:mime	application/x-mif
+>9	string		4.0		 (4.0)
+>9	string		3.0		 (3.0)
+>9	string		2.0		 (2.0)
+>9	string		1.0		 (1.x)
+0	search/1	\<MakerDictionary	FrameMaker Dictionary text
+!:mime	application/x-mif
+>17	string		3.0		 (3.0)
+>17	string		2.0		 (2.0)
+>17	string		1.0		 (1.x)
+0	string		\<MakerScreenFont	FrameMaker Font file
+!:mime	application/x-mif
+>17	string		1.01		 (%s)
+0	string		\<MML		FrameMaker MML file
+!:mime	application/x-mif
+0	string		\<BookFile	FrameMaker Book file
+!:mime	application/x-mif
+>10	string		3.0		 (3.0
+>10	string		2.0		 (2.0
+>10	string		1.0		 (1.0
+>13	byte		x		  %c)
+# XXX - this book entry should be verified, if you find one, uncomment this
+#0	string		\<Book\ 	FrameMaker Book (ASCII) file
+#!:mime	application/x-mif
+#>6	string		3.0		 (3.0)
+#>6	string		2.0		 (2.0)
+#>6	string		1.0		 (1.0)
+0	string		\<Maker	Intermediate Print File	FrameMaker IPL file
+!:mime	application/x-mif
+
+#------------------------------------------------------------------------------
+# $File: freebsd,v 1.7 2009/09/19 16:28:09 christos Exp $
+# freebsd:  file(1) magic for FreeBSD objects
+#
+# All new-style FreeBSD magic numbers are in host byte order (i.e.,
+# little-endian on x86).
+#
+# XXX - this comes from the file "freebsd" in a recent FreeBSD version of
+# "file"; it, and the NetBSD stuff in "netbsd", appear to use different
+# schemes for distinguishing between executable images, shared libraries,
+# and object files.
+#
+# FreeBSD says:
+#
+#    Regardless of whether it's pure, demand-paged, or none of the
+#    above:
+#
+#	if the entry point is < 4096, then it's a shared library if
+#	the "has run-time loader information" bit is set, and is
+#	position-independent if the "is position-independent" bit
+#	is set;
+#
+#	if the entry point is >= 4096 (or >4095, same thing), then it's
+#	an executable, and is dynamically-linked if the "has run-time
+#	loader information" bit is set.
+#
+# On x86, NetBSD says:
+#
+#    If it's neither pure nor demand-paged:
+#
+#	if it has the "has run-time loader information" bit set, it's
+#	a dynamically-linked executable;
+#
+#	if it doesn't have that bit set, then:
+#
+#	    if it has the "is position-independent" bit set, it's
+#	    position-independent;
+#
+#	    if the entry point is non-zero, it's an executable, otherwise
+#	    it's an object file.
+#
+#    If it's pure:
+#
+#	if it has the "has run-time loader information" bit set, it's
+#	a dynamically-linked executable, otherwise it's just an
+#	executable.
+#
+#    If it's demand-paged:
+#
+#	if it has the "has run-time loader information" bit set,
+#	then:
+#
+#	    if the entry point is < 4096, it's a shared library;
+#
+#	    if the entry point is = 4096 or > 4096 (i.e., >= 4096),
+#	    it's a dynamically-linked executable);
+#
+#	if it doesn't have the "has run-time loader information" bit
+#	set, then it's just an executable.
+#
+# (On non-x86, NetBSD does much the same thing, except that it uses
+# 8192 on 68K - except for "68k4k", which is presumably "68K with 4K
+# pages - SPARC, and MIPS, presumably because Sun-3's and Sun-4's
+# had 8K pages; dunno about MIPS.)
+#
+# I suspect the two will differ only in perverse and uninteresting cases
+# ("shared" libraries that aren't demand-paged and whose pages probably
+# won't actually be shared, executables with entry points <4096).
+#
+# I leave it to those more familiar with FreeBSD and NetBSD to figure out
+# what the right answer is (although using ">4095", FreeBSD-style, is
+# probably better than separately checking for "=4096" and ">4096",
+# NetBSD-style).  (The old "netbsd" file analyzed FreeBSD demand paged
+# executables using the NetBSD technique.)
+#
+0	lelong&0377777777	041400407	FreeBSD/i386
+>20	lelong			<4096
+>>3	byte&0xC0		&0x80		shared library
+>>3	byte&0xC0		0x40		PIC object
+>>3	byte&0xC0		0x00		object
+>20	lelong			>4095
+>>3	byte&0x80		0x80		dynamically linked executable
+>>3	byte&0x80		0x00		executable
+>16	lelong			>0		not stripped
+
+0	lelong&0377777777	041400410	FreeBSD/i386 pure
+>20	lelong			<4096
+>>3	byte&0xC0		&0x80		shared library
+>>3	byte&0xC0		0x40		PIC object
+>>3	byte&0xC0		0x00		object
+>20	lelong			>4095
+>>3	byte&0x80		0x80		dynamically linked executable
+>>3	byte&0x80		0x00		executable
+>16	lelong			>0		not stripped
+
+0	lelong&0377777777	041400413	FreeBSD/i386 demand paged
+>20	lelong			<4096
+>>3	byte&0xC0		&0x80		shared library
+>>3	byte&0xC0		0x40		PIC object
+>>3	byte&0xC0		0x00		object
+>20	lelong			>4095
+>>3	byte&0x80		0x80		dynamically linked executable
+>>3	byte&0x80		0x00		executable
+>16	lelong			>0		not stripped
+
+0	lelong&0377777777	041400314	FreeBSD/i386 compact demand paged
+>20	lelong			<4096
+>>3	byte&0xC0		&0x80		shared library
+>>3	byte&0xC0		0x40		PIC object
+>>3	byte&0xC0		0x00		object
+>20	lelong			>4095
+>>3	byte&0x80		0x80		dynamically linked executable
+>>3	byte&0x80		0x00		executable
+>16	lelong			>0		not stripped
+
+# XXX gross hack to identify core files
+# cores start with a struct tss; we take advantage of the following:
+# byte 7:     highest byte of the kernel stack pointer, always 0xfe
+#      8/9:   kernel (ring 0) ss value, always 0x0010
+#      10 - 27: ring 1 and 2 ss/esp, unused, thus always 0
+#      28:    low order byte of the current PTD entry, always 0 since the
+#             PTD is page-aligned
+#
+7	string	\357\020\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0	FreeBSD/i386 a.out core file
+>1039	string	>\0	from '%s'
+
+# /var/run/ld.so.hints
+# What are you laughing about?
+0	lelong			011421044151	ld.so hints file (Little Endian
+>4	lelong			>0		\b, version %d)
+>4	belong			<1		\b)
+0	belong			011421044151	ld.so hints file (Big Endian
+>4	belong			>0		\b, version %d)
+>4	belong			<1		\b)
+
+#
+# Files generated by FreeBSD scrshot(1)/vidcontrol(1) utilities
+#
+0	string	SCRSHOT_	scrshot(1) screenshot,
+>8	byte	x		version %d,
+>9	byte	2		%d bytes in header,
+>>10	byte	x		%d chars wide by
+>>11	byte	x		%d chars high
+
+#------------------------------------------------------------------------------
+# $File: fsav,v 1.11 2009/09/19 16:28:09 christos Exp $
+# fsav:  file(1) magic for datafellows fsav virus definition files
+# Anthon van der Neut (anthon at mnt.org)
+
+# ftp://ftp.f-prot.com/pub/{macrdef2.zip,nomacro.def}
+0	beshort		0x1575		fsav macro virus signatures
+>8	leshort		>0		(%d-
+>11	byte		>0		\b%02d-
+>10	byte		>0		\b%02d)
+# ftp://ftp.f-prot.com/pub/sign.zip
+#10	ubyte		<12
+#>9	ubyte		<32
+#>>8	ubyte		0x0a
+#>>>12	ubyte		0x07
+#>>>>11	uleshort	>0		fsav DOS/Windows virus signatures (%d-
+#>>>>10	byte		0		\b01-
+#>>>>10	byte		1		\b02-
+#>>>>10	byte		2		\b03-
+#>>>>10	byte		3		\b04-
+#>>>>10	byte		4		\b05-
+#>>>>10	byte		5		\b06-
+#>>>>10	byte		6		\b07-
+#>>>>10	byte		7		\b08-
+#>>>>10	byte		8		\b09-
+#>>>>10	byte		9		\b10-
+#>>>>10	byte		10		\b11-
+#>>>>10	byte		11		\b12-
+#>>>>9	ubyte		>0		\b%02d)
+# ftp://ftp.f-prot.com/pub/sign2.zip
+#0	ubyte		0x62		
+#>1	ubyte		0xF5		
+#>>2	ubyte		0x1		
+#>>>3	ubyte		0x1		
+#>>>>4	ubyte		0x0e		
+#>>>>>13		ubyte	>0		fsav virus signatures
+#>>>>>>11	ubyte	x		size 0x%02x
+#>>>>>>12	ubyte	x		\b%02x
+#>>>>>>13	ubyte	x		\b%02x bytes
+
+# Joerg Jenderek: joerg dot jenderek at web dot de
+# http://www.clamav.net/doc/latest/html/node45.html
+# .cvd files start with a 512 bytes colon separated header
+# ClamAV-VDB:buildDate:version:signaturesNumbers:functionalityLevelRequired:MD5:Signature:builder:buildTime
+# + gzipped tarball files
+0	string		ClamAV-VDB:	
+>11	string		>\0		Clam AntiVirus database %-.23s
+>>34	string		:		
+>>>35		string		!:	\b, version 
+>>>>35		string		x 	\b%-.1s
+>>>>>36		string 		!:	
+>>>>>>36	string		x 	\b%-.1s
+>>>>>>>37	string		!:	
+>>>>>>>>37	string		x 	\b%-.1s
+>>>>>>>>>38	string		!:	
+>>>>>>>>>>38	string		x 	\b%-.1s
+>512	string		\037\213	\b, gzipped
+>769	string		ustar\0		\b, tarred
+
+# Type: Grisoft AVG AntiVirus
+# From: David Newgas <david at newgas.net>
+0	string	AVG7_ANTIVIRUS_VAULT_FILE	AVG 7 Antivirus vault file data
+
+#------------------------------------------------------------------------------
+# $File: games,v 1.8 2009/09/19 16:28:09 christos Exp $
+# games:  file(1) for games
+
+# Fabio Bonelli <fabiobonelli at libero.it>
+# Quake II - III data files
+0       string  IDP2        	Quake II 3D Model file,
+>20     long    x               %lu skin(s),
+>8      long    x               (%lu x
+>12     long    x 		%lu),
+>40     long    x               %lu frame(s),
+>16     long    x               Frame size %lu bytes,
+>24     long  	x               %lu vertices/frame,
+>28     long    x            	%lu texture coordinates,
+>32     long    x               %lu triangles/frame
+
+0       string  IBSP            Quake
+>4      long    0x26            II Map file (BSP)
+>4      long    0x2E      	III Map file (BSP)
+
+0       string  IDS2            Quake II SP2 sprite file
+
+#---------------------------------------------------------------------------
+# Doom and Quake
+# submitted by Nicolas Patrois
+
+0       string  \xcb\x1dBoom\xe6\xff\x03\x01    Boom or linuxdoom demo
+# some doom lmp files don't match, I've got one beginning with \x6d\x02\x01\x01
+
+24      string  LxD\ 203        Linuxdoom save
+>0      string  x       , name=%s
+>44     string  x       , world=%s
+
+# Quake
+
+0       string  PACK    Quake I or II world or extension
+
+#0       string  -1\x0a  Quake I demo
+#>30     string  x        version %.4s
+#>61     string  x        level %s       
+
+#0       string  5\x0a   Quake I save
+
+# The levels
+
+# Quake 1
+
+0	string	5\x0aIntroduction             Quake I save: start Introduction
+0	string	5\x0athe_Slipgate_Complex     Quake I save: e1m1 The slipgate complex
+0	string	5\x0aCastle_of_the_Damned     Quake I save: e1m2 Castle of the damned
+0	string	5\x0athe_Necropolis           Quake I save: e1m3 The necropolis
+0	string	5\x0athe_Grisly_Grotto        Quake I save: e1m4 The grisly grotto
+0	string	5\x0aZiggurat_Vertigo         Quake I save: e1m8 Ziggurat vertigo (secret)
+0	string	5\x0aGloom_Keep               Quake I save: e1m5 Gloom keep
+0	string	5\x0aThe_Door_To_Chthon       Quake I save: e1m6 The door to Chthon
+0	string	5\x0aThe_House_of_Chthon      Quake I save: e1m7 The house of Chthon
+0	string	5\x0athe_Installation         Quake I save: e2m1 The installation
+0	string	5\x0athe_Ogre_Citadel         Quake I save: e2m2 The ogre citadel
+0	string	5\x0athe_Crypt_of_Decay       Quake I save: e2m3 The crypt of decay (dopefish lives!)
+0	string	5\x0aUnderearth               Quake I save: e2m7 Underearth (secret)
+0	string	5\x0athe_Ebon_Fortress        Quake I save: e2m4 The ebon fortress
+0	string	5\x0athe_Wizard's_Manse       Quake I save: e2m5 The wizard's manse
+0	string	5\x0athe_Dismal_Oubliette     Quake I save: e2m6 The dismal oubliette
+0	string	5\x0aTermination_Central      Quake I save: e3m1 Termination central
+0	string	5\x0aVaults_of_Zin            Quake I save: e3m2 Vaults of Zin
+0	string	5\x0athe_Tomb_of_Terror       Quake I save: e3m3 The tomb of terror
+0	string	5\x0aSatan's_Dark_Delight     Quake I save: e3m4 Satan's dark delight
+0	string	5\x0athe_Haunted_Halls        Quake I save: e3m7 The haunted halls (secret)
+0	string	5\x0aWind_Tunnels             Quake I save: e3m5 Wind tunnels
+0	string	5\x0aChambers_of_Torment      Quake I save: e3m6 Chambers of torment
+0	string	5\x0athe_Sewage_System        Quake I save: e4m1 The sewage system
+0	string	5\x0aThe_Tower_of_Despair     Quake I save: e4m2 The tower of despair
+0	string	5\x0aThe_Elder_God_Shrine     Quake I save: e4m3 The elder god shrine
+0	string	5\x0athe_Palace_of_Hate       Quake I save: e4m4 The palace of hate
+0	string	5\x0aHell's_Atrium            Quake I save: e4m5 Hell's atrium
+0	string	5\x0athe_Nameless_City        Quake I save: e4m8 The nameless city (secret)
+0	string	5\x0aThe_Pain_Maze            Quake I save: e4m6 The pain maze
+0	string	5\x0aAzure_Agony              Quake I save: e4m7 Azure agony
+0	string	5\x0aShub-Niggurath's_Pit     Quake I save: end Shub-Niggurath's pit
+
+# Quake DeathMatch levels
+
+0	string	5\x0aPlace_of_Two_Deaths	 Quake I save: dm1 Place of two deaths
+0	string	5\x0aClaustrophobopolis		 Quake I save: dm2 Claustrophobopolis
+0	string	5\x0aThe_Abandoned_Base		 Quake I save: dm3 The abandoned base
+0	string	5\x0aThe_Bad_Place		 Quake I save: dm4 The bad place
+0	string	5\x0aThe_Cistern		 Quake I save: dm5 The cistern
+0	string	5\x0aThe_Dark_Zone		 Quake I save: dm6 The dark zone
+
+# Scourge of Armagon
+
+0	string	5\x0aCommand_HQ               Quake I save: start Command HQ
+0	string	5\x0aThe_Pumping_Station      Quake I save: hip1m1 The pumping station
+0	string	5\x0aStorage_Facility         Quake I save: hip1m2 Storage facility
+0	string	5\x0aMilitary_Complex         Quake I save: hip1m5 Military complex (secret)
+0	string	5\x0athe_Lost_Mine            Quake I save: hip1m3 The lost mine
+0	string	5\x0aResearch_Facility        Quake I save: hip1m4 Research facility
+0	string	5\x0aAncient_Realms           Quake I save: hip2m1 Ancient realms
+0	string	5\x0aThe_Gremlin's_Domain     Quake I save: hip2m6 The gremlin's domain (secret)
+0	string	5\x0aThe_Black_Cathedral      Quake I save: hip2m2 The black cathedral
+0	string	5\x0aThe_Catacombs            Quake I save: hip2m3 The catacombs
+0	string	5\x0athe_Crypt__              Quake I save: hip2m4 The crypt
+0	string	5\x0aMortum's_Keep            Quake I save: hip2m5 Mortum's keep
+0	string	5\x0aTur_Torment              Quake I save: hip3m1 Tur torment
+0	string	5\x0aPandemonium              Quake I save: hip3m2 Pandemonium
+0	string	5\x0aLimbo                    Quake I save: hip3m3 Limbo
+0	string	5\x0athe_Edge_of_Oblivion     Quake I save: hipdm1 The edge of oblivion (secret)
+0	string	5\x0aThe_Gauntlet             Quake I save: hip3m4 The gauntlet
+0	string	5\x0aArmagon's_Lair           Quake I save: hipend Armagon's lair
+
+# Malice
+
+0	string	5\x0aThe_Academy      Quake I save: start The academy
+0	string	5\x0aThe_Lab          Quake I save: d1 The lab
+0	string	5\x0aArea_33          Quake I save: d1b Area 33
+0	string	5\x0aSECRET_MISSIONS  Quake I save: d3b Secret missions
+0	string	5\x0aThe_Hospital     Quake I save: d10 The hospital (secret)
+0	string	5\x0aThe_Genetics_Lab Quake I save: d11 The genetics lab (secret)
+0	string	5\x0aBACK_2_MALICE    Quake I save: d4b Back to Malice
+0	string	5\x0aArea44           Quake I save: d1c Area 44
+0	string	5\x0aTakahiro_Towers  Quake I save: d2 Takahiro towers
+0	string	5\x0aA_Rat's_Life     Quake I save: d3 A rat's life
+0	string	5\x0aInto_The_Flood   Quake I save: d4 Into the flood
+0	string	5\x0aThe_Flood        Quake I save: d5 The flood
+0	string	5\x0aNuclear_Plant    Quake I save: d6 Nuclear plant
+0	string	5\x0aThe_Incinerator_Plant    Quake I save: d7 The incinerator plant
+0	string	5\x0aThe_Foundry              Quake I save: d7b The foundry
+0	string	5\x0aThe_Underwater_Base      Quake I save: d8 The underwater base
+0	string	5\x0aTakahiro_Base            Quake I save: d9 Takahiro base
+0	string	5\x0aTakahiro_Laboratories    Quake I save: d12 Takahiro laboratories
+0	string	5\x0aStayin'_Alive    Quake I save: d13 Stayin' alive
+0	string	5\x0aB.O.S.S._HQ      Quake I save: d14 B.O.S.S. HQ
+0	string	5\x0aSHOWDOWN!        Quake I save: d15 Showdown!
+
+# Malice DeathMatch levels
+
+0	string	5\x0aThe_Seventh_Precinct	 Quake I save: ddm1 The seventh precinct
+0	string	5\x0aSub_Station		 Quake I save: ddm2 Sub station
+0	string	5\x0aCrazy_Eights!		 Quake I save: ddm3 Crazy eights!
+0	string	5\x0aEast_Side_Invertationa	 Quake I save: ddm4 East side invertationa
+0	string	5\x0aSlaughterhouse		 Quake I save: ddm5 Slaughterhouse
+0	string	5\x0aDOMINO			 Quake I save: ddm6 Domino
+0	string	5\x0aSANDRA'S_LADDER		 Quake I save: ddm7 Sandra's ladder
+
+
+0	string	MComprHD	MAME CHD compressed hard disk image,
+>12	belong	x		version %lu
+
+# doom - submitted by Jon Dowland
+
+0	string	=IWAD		doom main IWAD data
+>4	lelong	x		containing %d lumps
+0	string	=PWAD		doom patch PWAD data
+>4	lelong	x		containing %d lumps
+
+
+# Summary: Warcraft 3 save
+# Extension: .w3g
+# Created by: "Nelson A. de Oliveira" <naoliv at gmail.com>
+0	string		Warcraft\ III\ recorded\ game	%s
+
+
+# Summary: Warcraft 3 map
+# Extension: .w3m
+# Created by: "Nelson A. de Oliveira" <naoliv at gmail.com>
+0	string		HM3W		Warcraft III map file
+
+
+# Summary: SGF Smart Game Format
+# Extension: .sgf
+# Reference: http://www.red-bean.com/sgf/
+# Created by: Eduardo Sabbatella <eduardo_sabbatella at yahoo.com.ar>
+# Modified by (1): Abel Cheung (regex, more game format)
+# FIXME: Some games don't have GM (game type)
+0	regex		\\(;.*GM\\[[0-9]{1,2}\\]	Smart Game Format
+>2	search/0x200	GM[
+>>&0	string		1]	(Go)
+>>&0	string		2]	(Othello)
+>>&0	string		3]	(chess)
+>>&0	string		4]	(Gomoku+Renju)
+>>&0	string		5]	(Nine Men's Morris)
+>>&0	string		6]	(Backgammon)
+>>&0	string		7]	(Chinese chess)
+>>&0	string		8]	(Shogi)
+>>&0	string		9]	(Lines of Action)
+>>&0	string		10]	(Ataxx)
+>>&0	string		11]	(Hex)
+>>&0	string		12]	(Jungle)
+>>&0	string		13]	(Neutron)
+>>&0	string		14]	(Philosopher's Football)
+>>&0	string		15]	(Quadrature)
+>>&0	string		16]	(Trax)
+>>&0	string		17]	(Tantrix)
+>>&0	string		18]	(Amazons)
+>>&0	string		19]	(Octi)
+>>&0	string		20]	(Gess)
+>>&0	string		21]	(Twixt)
+>>&0	string		22]	(Zertz)
+>>&0	string		23]	(Plateau)
+>>&0	string		24]	(Yinsh)
+>>&0	string		25]	(Punct)
+>>&0	string		26]	(Gobblet)
+>>&0	string		27]	(hive)
+>>&0	string		28]	(Exxit)
+>>&0	string		29]	(Hnefatal)
+>>&0	string		30]	(Kuba)
+>>&0	string		31]	(Tripples)
+>>&0	string		32]	(Chase)
+>>&0	string		33]	(Tumbling Down)
+>>&0	string		34]	(Sahara)
+>>&0	string		35]	(Byte)
+>>&0	string		36]	(Focus)
+>>&0	string		37]	(Dvonn)
+>>&0	string		38]	(Tamsk)
+>>&0	string		39]	(Gipf)
+>>&0	string		40]	(Kropki)
+
+
+# Summary: Civilization 4 video
+# Extension: .bik
+# Created by: Abel Cheung <abelcheung at gmail.com>
+0	string	BIKi	Civilization 4 Video
+
+
+##############################################
+# NetImmerse/Gamebryo game engine entries
+
+# Summary: Gamebryo game engine file
+# Extension: .nif, .kf
+# Created by: Abel Cheung <abelcheung at gmail.com>
+0		string		Gamebryo\ File\ Format,\ Version\ 	Gamebryo game engine file
+>&0		regex		[0-9a-z.]+				\b, version %s
+
+# Summary: Gamebryo game engine file
+# Extension: .kfm
+# Created by: Abel Cheung <abelcheung at gmail.com>
+0		string		;Gamebryo\ KFM\ File\ Version\ 		Gamebryo game engine animation File
+>&0		regex		[0-9a-z.]+				\b, version %s
+
+# Summary: NetImmerse game engine file
+# Extension .nif
+# Created by: Abel Cheung <abelcheung at gmail.com>
+0		string		NetImmerse\ File\ Format,\ Versio		
+>&0		string		n\ 					NetImmerse game engine file
+>>&0		regex		[0-9a-z.]+				\b, version %s
+
+
+#------------------------------------------------------------------------------
+# $File: gcc,v 1.4 2009/09/19 16:28:09 christos Exp $
+# gcc:  file(1) magic for GCC special files
+#
+0	string		gpch		GCC precompiled header
+
+# The version field is annoying.  It's 3 characters, not zero-terminated.
+>5	byte		x			(version %c
+>6	byte		x			\b%c
+>7	byte		x			\b%c)
+
+# 67 = 'C', 111 = 'o', 43 = '+', 79 = 'O'
+>4	byte		67			for C
+>4	byte		111			for Objective C
+>4	byte		43			for C++
+>4	byte		79			for Objective C++
+
+#------------------------------------------------------------------------------
+# $File: geos,v 1.4 2009/09/19 16:28:09 christos Exp $
+# GEOS files (Vidar Madsen, vidar at gimp.org)
+# semi-commonly used in embedded and handheld systems.
+0	belong	0xc745c153	GEOS
+>40	byte	1	executable
+>40	byte	2	VMFile
+>40	byte	3	binary
+>40	byte	4	directory label
+>40	byte	<1	unknown
+>40	byte	>4	unknown
+>4	string	>\0	\b, name "%s"
+#>44	short	x	\b, version %d
+#>46	short	x	\b.%d
+#>48	short	x	\b, rev %d
+#>50	short	x	\b.%d
+#>52	short	x	\b, proto %d
+#>54	short	x	\br%d
+#>168	string	>\0	\b, copyright "%s"
+
+#------------------------------------------------------------------------------
+# $File: gimp,v 1.6 2009/09/19 16:28:09 christos Exp $
+# GIMP Gradient: file(1) magic for the GIMP's gradient data files
+# by Federico Mena <federico at nuclecu.unam.mx>
+
+0       string          GIMP\ Gradient  GIMP gradient data
+
+#------------------------------------------------------------------------------
+# XCF:  file(1) magic for the XCF image format used in the GIMP developed
+#       by Spencer Kimball and Peter Mattis
+#       ('Bucky' LaDieu, nega at vt.edu)
+
+0	string		gimp\ xcf	GIMP XCF image data,
+>9	string		file		version 0,
+>9	string		v		version
+>>10	string		>\0		%s,
+>14	belong		x		%lu x
+>18	belong		x		%lu,
+>22     belong          0               RGB Color
+>22     belong          1               Greyscale
+>22     belong          2               Indexed Color
+>22	belong		>2		Unknown Image Type.
+
+#------------------------------------------------------------------------------
+# XCF:  file(1) magic for the patterns used in the GIMP, developed
+#       by Spencer Kimball and Peter Mattis
+#       ('Bucky' LaDieu, nega at vt.edu)
+
+20      string          GPAT            GIMP pattern data,
+>24     string          x               %s
+
+#------------------------------------------------------------------------------
+# XCF:  file(1) magic for the brushes used in the GIMP, developed
+#       by Spencer Kimball and Peter Mattis
+#       ('Bucky' LaDieu, nega at vt.edu)
+
+20      string          GIMP            GIMP brush data
+
+# GIMP Curves File
+# From: "Nelson A. de Oliveira" <naoliv at gmail.com>
+0	string	#\040GIMP\040Curves\040File	GIMP curve file
+
+#------------------------------------------------------------------------------
+# $File: gnome-keyring,v 1.2 2009/09/19 16:28:09 christos Exp $
+# GNOME keyring
+# Contributed by Josh Triplett
+# FIXME: Could be simplified if pstring supported two-byte counts
+0         string   GnomeKeyring\n\r\0\n GNOME keyring
+>&0       ubyte    0                    \b, major version 0
+>>&0      ubyte    0                    \b, minor version 0
+>>>&0     ubyte    0                    \b, crypto type 0 (AEL)
+>>>&0     ubyte    >0                   \b, crypto type %hhu (unknown)
+>>>&1     ubyte    0                    \b, hash type 0 (MD5)
+>>>&1     ubyte    >0                   \b, hash type %hhu (unknown)
+>>>&2     ubelong  0xFFFFFFFF           \b, name NULL
+>>>&2     ubelong  !0xFFFFFFFF
+>>>>&-4   ubelong  >255                 \b, name too long for file's pstring type
+>>>>&-4   ubelong  <256
+>>>>>&-1  pstring  x                    \b, name "%s"
+>>>>>>&0  ubeqdate x                    \b, last modified %s
+>>>>>>&8  ubeqdate x                    \b, created %s
+>>>>>>&16 ubelong  &1
+>>>>>>>&0 ubelong  x                    \b, locked if idle for %u seconds
+>>>>>>&16 ubelong  ^1                   \b, not locked if idle
+>>>>>>&24 ubelong  x                    \b, hash iterations %u
+>>>>>>&28 ubequad  x                    \b, salt %llu
+>>>>>>&52 ubelong  x                    \b, %u item(s)
+
+#------------------------------------------------------------------------------
+# $File: gnu,v 1.11 2009/09/19 16:28:09 christos Exp $
+# gnu:  file(1) magic for various GNU tools
+#
+# GNU nlsutils message catalog file format
+#
+0	string		\336\22\4\225	GNU message catalog (little endian),
+>4	lelong		x		revision %d,
+>8	lelong		x		%d messages
+0	string		\225\4\22\336	GNU message catalog (big endian),
+>4	belong		x		revision %d,
+>8	belong		x		%d messages
+# message catalogs, from Mitchum DSouza <m.dsouza at mrc-apu.cam.ac.uk>
+0	string		*nazgul*	Nazgul style compiled message catalog
+>8	lelong		>0		\b, version %ld
+
+# GnuPG
+# The format is very similar to pgp
+0	string          \001gpg                 GPG key trust database
+>4	byte            x                       version %d
+# Note: magic.mime had 0x8501 for the next line instead of 0x8502
+0	beshort		0x8502			GPG encrypted data
+!:mime	text/PGP # encoding: data
+
+# This magic is not particularly good, as the keyrings don't have true
+# magic. Nevertheless, it covers many keyrings.
+0       beshort         0x9901                  GPG key public ring
+!:mime	application/x-gnupg-keyring
+
+# Gnumeric spreadsheet
+# This entry is only semi-helpful, as Gnumeric compresses its files, so
+# they will ordinarily reported as "compressed", but at least -z helps
+39      string          =<gmr:Workbook           Gnumeric spreadsheet
+
+# From: James Youngman <jay at gnu.org> 
+# gnu find magic
+0	string	\0LOCATE	GNU findutils locate database data
+>7	string	>\0		\b, format %s
+>7	string	02		\b (frcode)
+
+# Files produced by GNU gettext
+0	long	0xDE120495		GNU-format message catalog data
+0	long	0x950412DE		GNU-format message catalog data
+
+#------------------------------------------------------------------------------
+# $File: gnumeric,v 1.4 2009/09/19 16:28:09 christos Exp $
+# gnumeric:  file(1) magic for Gnumeric spreadsheet
+# This entry is only semi-helpful, as Gnumeric compresses its files, so
+# they will ordinarily reported as "compressed", but at least -z helps
+39	string	=<gmr:Workbook	Gnumeric spreadsheet
+!:mime	application/x-gnumeric
+
+#------------------------------------------------------------------------------
+# $File: grace,v 1.4 2009/09/19 16:28:09 christos Exp $
+# ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
+#
+# ACE/gr binary
+0	string	\000\000\0001\000\000\0000\000\000\0000\000\000\0002\000\000\0000\000\000\0000\000\000\0003		old ACE/gr binary file
+>39	byte	>0			- version %c
+# ACE/gr ascii
+0	string	#\ xvgr\ parameter\ file	ACE/gr ascii file
+0	string	#\ xmgr\ parameter\ file	ACE/gr ascii file
+0	string	#\ ACE/gr\ parameter\ file	ACE/gr ascii file
+# Grace projects
+0	string	#\ Grace\ project\ file		Grace project file
+>23	string	@version\  			(version
+>>32	byte	>0 				%c
+>>33	string	>\0 				\b.%.2s
+>>35	string	>\0 				\b.%.2s)
+# ACE/gr fit description files
+0	string	#\ ACE/gr\ fit\ description\ 	ACE/gr fit description file
+# end of ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
+
+#------------------------------------------------------------------------------
+# $File: graphviz,v 1.7 2009/09/19 16:28:09 christos Exp $
+# graphviz:  file(1) magic for http://www.graphviz.org/
+
+# FIXME: These patterns match too generally. For example, the first
+# line matches a LaTeX file containing the word "graph" (with a {
+# following later) and the second line matches this file.
+#0	regex/100	[\r\n\t\ ]*graph[\r\n\t\ ]+.*\\{	graphviz graph text
+#!:mime	text/vnd.graphviz
+#0	regex/100	[\r\n\t\ ]*digraph[\r\n\t\ ]+.*\\{	graphviz digraph text
+#!:mime	text/vnd.graphviz
+
+#------------------------------------------------------------------------------
+# $File: gringotts,v 1.5 2009/09/19 16:28:09 christos Exp $
+# gringotts:  file(1) magic for Gringotts
+# http://devel.pluto.linux.it/projects/Gringotts/
+# author: Germano Rizzo <mano at pluto.linux.it>
+#GRG3????Y
+0	string	GRG		Gringotts data file
+#file format 1
+>3	string		1		v.1, MCRYPT S2K, SERPENT crypt, SHA-256 hash, ZLib lvl.9
+#file format 2
+>3	string		2		v.2, MCRYPT S2K, 
+>>8	byte&0x70	0x00		RIJNDAEL-128 crypt,
+>>8	byte&0x70	0x10		SERPENT crypt,
+>>8	byte&0x70	0x20		TWOFISH crypt, 
+>>8	byte&0x70	0x30		CAST-256 crypt,
+>>8	byte&0x70	0x40		SAFER+ crypt,
+>>8	byte&0x70	0x50		LOKI97 crypt,
+>>8	byte&0x70	0x60		3DES crypt,
+>>8	byte&0x70	0x70		RIJNDAEL-256 crypt,
+>>8	byte&0x08	0x00		SHA1 hash,
+>>8	byte&0x08	0x08		RIPEMD-160 hash,
+>>8	byte&0x04	0x00		ZLib
+>>8	byte&0x04	0x04		BZip2
+>>8	byte&0x03	0x00		lvl.0
+>>8	byte&0x03	0x01		lvl.3
+>>8	byte&0x03	0x02		lvl.6
+>>8	byte&0x03	0x03		lvl.9
+#file format 3
+>3	string		3		v.3, OpenPGP S2K, 
+>>8	byte&0x70	0x00		RIJNDAEL-128 crypt,
+>>8	byte&0x70	0x10		SERPENT crypt,
+>>8	byte&0x70	0x20		TWOFISH crypt, 
+>>8	byte&0x70	0x30		CAST-256 crypt,
+>>8	byte&0x70	0x40		SAFER+ crypt,
+>>8	byte&0x70	0x50		LOKI97 crypt,
+>>8	byte&0x70	0x60		3DES crypt,
+>>8	byte&0x70	0x70		RIJNDAEL-256 crypt,
+>>8	byte&0x08	0x00		SHA1 hash,
+>>8	byte&0x08	0x08		RIPEMD-160 hash,
+>>8	byte&0x04	0x00		ZLib
+>>8	byte&0x04	0x04		BZip2
+>>8	byte&0x03	0x00		lvl.0
+>>8	byte&0x03	0x01		lvl.3
+>>8	byte&0x03	0x02		lvl.6
+>>8	byte&0x03	0x03		lvl.9
+#file format >3
+>3	string		>3		v.%.1s (unknown details)
+
+#------------------------------------------------------------------------------
+# $File: hitachi-sh,v 1.5 2009/09/19 16:28:09 christos Exp $
+# hitach-sh: file(1) magic for Hitachi Super-H
+#
+# Super-H COFF
+#
+0	beshort		0x0500		Hitachi SH big-endian COFF
+>18	beshort&0x0002	=0x0000		object
+>18	beshort&0x0002	=0x0002		executable
+>18	beshort&0x0008	=0x0008		\b, stripped
+>18	beshort&0x0008	=0x0000		\b, not stripped
+#
+0	leshort		0x0550		Hitachi SH little-endian COFF
+>18	leshort&0x0002	=0x0000		object
+>18	leshort&0x0002	=0x0002		executable
+>18	leshort&0x0008	=0x0008		\b, stripped
+>18	leshort&0x0008	=0x0000		\b, not stripped
+
+
+#------------------------------------------------------------------------------
+# $File: hp,v 1.23 2009/09/19 16:28:09 christos Exp $
+# hp:  file(1) magic for Hewlett Packard machines (see also "printer")
+#
+# XXX - somebody should figure out whether any byte order needs to be
+# applied to the "TML" stuff; I'm assuming the Apollo stuff is
+# big-endian as it was mostly 68K-based.
+#
+# I think the 500 series was the old stack-based machines, running a
+# UNIX environment atop the "SUN kernel"; dunno whether it was
+# big-endian or little-endian.
+#
+# Daniel Quinlan (quinlan at yggdrasil.com): hp200 machines are 68010 based;
+# hp300 are 68020+68881 based; hp400 are also 68k.  The following basic
+# HP magic is useful for reference, but using "long" magic is a better
+# practice in order to avoid collisions.
+#
+# Guy Harris (guy at netapp.com): some additions to this list came from
+# HP-UX 10.0's "/usr/include/sys/unistd.h" (68030, 68040, PA-RISC 1.1,
+# 1.2, and 2.0).  The 1.2 and 2.0 stuff isn't in the HP-UX 10.0
+# "/etc/magic", though, except for the "archive file relocatable library"
+# stuff, and the 68030 and 68040 stuff isn't there at all - are they not
+# used in executables, or have they just not yet updated "/etc/magic"
+# completely?
+#
+# 0	beshort		200		hp200 (68010) BSD binary
+# 0	beshort		300		hp300 (68020+68881) BSD binary
+# 0	beshort		0x20c		hp200/300 HP-UX binary
+# 0	beshort		0x20d		hp400 (68030) HP-UX binary
+# 0	beshort		0x20e		hp400 (68040?) HP-UX binary
+# 0	beshort		0x20b		PA-RISC1.0 HP-UX binary
+# 0	beshort		0x210		PA-RISC1.1 HP-UX binary
+# 0	beshort		0x211		PA-RISC1.2 HP-UX binary
+# 0	beshort		0x214		PA-RISC2.0 HP-UX binary
+
+#
+# The "misc" stuff needs a byte order; the archives look suspiciously
+# like the old 177545 archives (0xff65 = 0177545).
+#
+#### Old Apollo stuff
+0	beshort		0627		Apollo m68k COFF executable
+>18	beshort		^040000		not stripped
+>22	beshort		>0		- version %ld
+0	beshort		0624		apollo a88k COFF executable
+>18	beshort		^040000		not stripped
+>22	beshort		>0		- version %ld
+0       long            01203604016     TML 0123 byte-order format
+0       long            01702407010     TML 1032 byte-order format
+0       long            01003405017     TML 2301 byte-order format
+0       long            01602007412     TML 3210 byte-order format
+#### PA-RISC 1.1
+0	belong 		0x02100106	PA-RISC1.1 relocatable object
+0	belong 		0x02100107	PA-RISC1.1 executable
+>168	belong		&0x00000004	dynamically linked
+>(144)	belong		0x054ef630	dynamically linked
+>96	belong		>0		- not stripped
+
+0	belong 		0x02100108	PA-RISC1.1 shared executable
+>168	belong&0x4	0x4		dynamically linked
+>(144)	belong		0x054ef630	dynamically linked
+>96	belong		>0		- not stripped
+
+0	belong 		0x0210010b	PA-RISC1.1 demand-load executable
+>168	belong&0x4	0x4		dynamically linked
+>(144)	belong		0x054ef630	dynamically linked
+>96	belong		>0		- not stripped
+
+0	belong 		0x0210010e	PA-RISC1.1 shared library
+>96	belong		>0		- not stripped
+
+0	belong 		0x0210010d	PA-RISC1.1 dynamic load library
+>96	belong		>0		- not stripped
+
+#### PA-RISC 2.0
+0	belong		0x02140106	PA-RISC2.0 relocatable object
+
+0       belong		0x02140107	PA-RISC2.0 executable
+>168	belong		&0x00000004	dynamically linked
+>(144)	belong		0x054ef630	dynamically linked
+>96	belong		>0		- not stripped
+
+0       belong		0x02140108	PA-RISC2.0 shared executable
+>168	belong		&0x00000004	dynamically linked
+>(144)	belong		0x054ef630	dynamically linked
+>96	belong		>0		- not stripped
+
+0       belong		0x0214010b	PA-RISC2.0 demand-load executable
+>168	belong		&0x00000004	dynamically linked
+>(144)	belong		0x054ef630	dynamically linked
+>96	belong		>0		- not stripped
+
+0       belong		0x0214010e	PA-RISC2.0 shared library
+>96	belong		>0		- not stripped
+
+0       belong		0x0214010d	PA-RISC2.0 dynamic load library
+>96	belong		>0		- not stripped
+
+#### 800
+0	belong 		0x020b0106	PA-RISC1.0 relocatable object
+
+0	belong 		0x020b0107	PA-RISC1.0 executable
+>168	belong&0x4	0x4		dynamically linked
+>(144)	belong		0x054ef630	dynamically linked
+>96	belong		>0		- not stripped
+
+0	belong 		0x020b0108	PA-RISC1.0 shared executable
+>168	belong&0x4	0x4		dynamically linked
+>(144)	belong		0x054ef630	dynamically linked
+>96	belong		>0		- not stripped
+
+0	belong 		0x020b010b	PA-RISC1.0 demand-load executable
+>168	belong&0x4	0x4		dynamically linked
+>(144)	belong		0x054ef630	dynamically linked
+>96	belong		>0		- not stripped
+
+0	belong 		0x020b010e	PA-RISC1.0 shared library
+>96	belong		>0		- not stripped
+
+0	belong 		0x020b010d	PA-RISC1.0 dynamic load library
+>96	belong		>0		- not stripped
+
+0	belong		0x213c6172	archive file
+>68	belong 		0x020b0619	- PA-RISC1.0 relocatable library
+>68	belong	 	0x02100619	- PA-RISC1.1 relocatable library
+>68	belong 		0x02110619	- PA-RISC1.2 relocatable library
+>68	belong 		0x02140619	- PA-RISC2.0 relocatable library
+
+#### 500
+0	long		0x02080106	HP s500 relocatable executable
+>16	long		>0		- version %ld
+
+0	long		0x02080107	HP s500 executable
+>16	long		>0		- version %ld
+
+0	long		0x02080108	HP s500 pure executable
+>16	long		>0		- version %ld
+
+#### 200
+0	belong 		0x020c0108	HP s200 pure executable
+>4	beshort		>0		- version %ld
+>8	belong		&0x80000000	save fp regs
+>8	belong		&0x40000000	dynamically linked
+>8	belong		&0x20000000	debuggable
+>36	belong		>0		not stripped
+
+0	belong		0x020c0107	HP s200 executable
+>4	beshort		>0		- version %ld
+>8	belong		&0x80000000	save fp regs
+>8	belong		&0x40000000	dynamically linked
+>8	belong		&0x20000000	debuggable
+>36	belong		>0		not stripped
+
+0	belong		0x020c010b	HP s200 demand-load executable
+>4	beshort		>0		- version %ld
+>8	belong		&0x80000000	save fp regs
+>8	belong		&0x40000000	dynamically linked
+>8	belong		&0x20000000	debuggable
+>36	belong		>0		not stripped
+
+0	belong		0x020c0106	HP s200 relocatable executable
+>4	beshort		>0		- version %ld
+>6	beshort		>0		- highwater %d
+>8	belong		&0x80000000	save fp regs
+>8	belong		&0x20000000	debuggable
+>8	belong		&0x10000000	PIC
+
+0	belong 		0x020a0108	HP s200 (2.x release) pure executable
+>4	beshort		>0		- version %ld
+>36	belong		>0		not stripped
+
+0	belong		0x020a0107	HP s200 (2.x release) executable
+>4	beshort		>0		- version %ld
+>36	belong		>0		not stripped
+
+0	belong		0x020c010e	HP s200 shared library
+>4	beshort		>0		- version %ld
+>6	beshort		>0		- highwater %d
+>36	belong		>0		not stripped
+
+0	belong		0x020c010d	HP s200 dynamic load library
+>4	beshort		>0		- version %ld
+>6	beshort		>0		- highwater %d
+>36	belong		>0		not stripped
+
+#### MISC
+0	long		0x0000ff65	HP old archive
+0	long		0x020aff65	HP s200 old archive
+0	long		0x020cff65	HP s200 old archive
+0	long		0x0208ff65	HP s500 old archive
+
+0	long		0x015821a6	HP core file
+
+0	long		0x4da7eee8	HP-WINDOWS font
+>8	byte		>0		- version %ld
+0	string		Bitmapfile	HP Bitmapfile
+
+0	string		IMGfile	CIS 	compimg HP Bitmapfile
+# XXX - see "lif"
+#0	short		0x8000		lif file
+0	long		0x020c010c	compiled Lisp
+
+0	string		msgcat01	HP NLS message catalog,
+>8	long		>0		%d messages
+
+# Summary: HP-48/49 calculator
+# Created by: phk at data.fls.dk
+# Modified by (1): AMAKAWA Shuhei <sa264 at cam.ac.uk>
+# Modified by (2): Samuel Thibault <samuel.thibault at ens-lyon.org> (HP49 support)
+0	string		HPHP		HP
+>4	string		48		48 binary
+>4	string		49		49 binary
+>7	byte		>64		- Rev %c
+>8	leshort		0x2911		(ADR)
+>8	leshort		0x2933		(REAL)
+>8	leshort		0x2955		(LREAL)
+>8	leshort		0x2977		(COMPLX)
+>8	leshort		0x299d		(LCOMPLX)
+>8	leshort		0x29bf		(CHAR)
+>8	leshort		0x29e8		(ARRAY)
+>8	leshort		0x2a0a		(LNKARRAY)
+>8	leshort		0x2a2c		(STRING)
+>8	leshort		0x2a4e		(HXS)
+>8	leshort		0x2a74		(LIST)
+>8	leshort		0x2a96		(DIR)
+>8	leshort		0x2ab8		(ALG)
+>8	leshort		0x2ada		(UNIT)
+>8	leshort		0x2afc		(TAGGED)
+>8	leshort		0x2b1e		(GROB)
+>8	leshort		0x2b40		(LIB)
+>8	leshort		0x2b62		(BACKUP)
+>8	leshort		0x2b88		(LIBDATA)
+>8	leshort		0x2d9d		(PROG)
+>8	leshort		0x2dcc		(CODE)
+>8	leshort		0x2e48		(GNAME)
+>8	leshort		0x2e6d		(LNAME)
+>8	leshort		0x2e92		(XLIB)
+
+0	string		%%HP:		HP text
+>6	string		T(0)		- T(0)
+>6	string		T(1)		- T(1)
+>6	string		T(2)		- T(2)
+>6	string		T(3)		- T(3)
+>10	string		A(D)		A(D)
+>10	string		A(R)		A(R)
+>10	string		A(G)		A(G)
+>14	string		F(.)		F(.);
+>14	string		F(,)		F(,);
+
+
+# Summary: HP-38/39 calculator
+# Created by: Samuel Thibault <samuel.thibault at ens-lyon.org>
+0	string		HP3
+>3	string		8		HP 38
+>3	string		9		HP 39
+>4	string		Bin		binary
+>4	string		Asc		ASCII
+>7	string		A		(Directory List)
+>7	string		B		(Zaplet)
+>7	string		C		(Note)
+>7	string		D		(Program)
+>7	string		E		(Variable)
+>7	string		F		(List)
+>7	string		G		(Matrix)
+>7	string		H		(Library)
+>7	string		I		(Target List)
+>7	string		J		(ASCII Vector specification)
+>7	string		K		(wildcard)
+
+# Summary: HP-38/39 calculator
+# Created by: Samuel Thibault <samuel.thibault at ens-lyon.org>
+0	string		HP3
+>3	string		8		HP 38
+>3	string		9		HP 39
+>4	string		Bin		binary
+>4	string		Asc		ASCII
+>7	string		A		(Directory List)
+>7	string		B		(Zaplet)
+>7	string		C		(Note)
+>7	string		D		(Program)
+>7	string		E		(Variable)
+>7	string		F		(List)
+>7	string		G		(Matrix)
+>7	string		H		(Library)
+>7	string		I		(Target List)
+>7	string		J		(ASCII Vector specification)
+>7	string		K		(wildcard)
+
+# hpBSD magic numbers
+0	beshort		200		hp200 (68010) BSD
+>2	beshort		0407		impure binary
+>2	beshort		0410		read-only binary
+>2	beshort		0413		demand paged binary
+0	beshort		300		hp300 (68020+68881) BSD
+>2	beshort		0407		impure binary
+>2	beshort		0410		read-only binary
+>2	beshort		0413		demand paged binary
+#
+# From David Gero <dgero at nortelnetworks.com>
+# HP-UX 10.20 core file format from /usr/include/sys/core.h
+# Unfortunately, HP-UX uses corehead blocks without specifying the order
+# There are four we care about:
+#     CORE_KERNEL, which starts with the string "HP-UX"
+#     CORE_EXEC, which contains the name of the command
+#     CORE_PROC, which contains the signal number that caused the core dump
+#     CORE_FORMAT, which contains the version of the core file format (== 1)
+# The only observed order in real core files is KERNEL, EXEC, FORMAT, PROC
+# but we include all 6 variations of the order of the first 3, and
+# assume that PROC will always be last
+# Order 1: KERNEL, EXEC, FORMAT, PROC
+0x10		string	HP-UX
+>0		belong	2
+>>0xC		belong	0x3C
+>>>0x4C		belong	0x100
+>>>>0x58	belong	0x44
+>>>>>0xA0	belong	1
+>>>>>>0xAC	belong	4
+>>>>>>>0xB0	belong	1
+>>>>>>>>0xB4	belong	4		core file
+>>>>>>>>>0x90	string	>\0		from '%s'
+>>>>>>>>>0xC4	belong	3		- received SIGQUIT
+>>>>>>>>>0xC4	belong	4		- received SIGILL
+>>>>>>>>>0xC4	belong	5		- received SIGTRAP
+>>>>>>>>>0xC4	belong	6		- received SIGABRT
+>>>>>>>>>0xC4	belong	7		- received SIGEMT
+>>>>>>>>>0xC4	belong	8		- received SIGFPE
+>>>>>>>>>0xC4	belong	10		- received SIGBUS
+>>>>>>>>>0xC4	belong	11		- received SIGSEGV
+>>>>>>>>>0xC4	belong	12		- received SIGSYS
+>>>>>>>>>0xC4	belong	33		- received SIGXCPU
+>>>>>>>>>0xC4	belong	34		- received SIGXFSZ
+# Order 2: KERNEL, FORMAT, EXEC, PROC
+>>>0x4C		belong	1
+>>>>0x58	belong	4
+>>>>>0x5C	belong	1
+>>>>>>0x60	belong	0x100
+>>>>>>>0x6C	belong	0x44
+>>>>>>>>0xB4	belong	4		core file
+>>>>>>>>>0xA4	string	>\0		from '%s'
+>>>>>>>>>0xC4	belong	3		- received SIGQUIT
+>>>>>>>>>0xC4	belong	4		- received SIGILL
+>>>>>>>>>0xC4	belong	5		- received SIGTRAP
+>>>>>>>>>0xC4	belong	6		- received SIGABRT
+>>>>>>>>>0xC4	belong	7		- received SIGEMT
+>>>>>>>>>0xC4	belong	8		- received SIGFPE
+>>>>>>>>>0xC4	belong	10		- received SIGBUS
+>>>>>>>>>0xC4	belong	11		- received SIGSEGV
+>>>>>>>>>0xC4	belong	12		- received SIGSYS
+>>>>>>>>>0xC4	belong	33		- received SIGXCPU
+>>>>>>>>>0xC4	belong	34		- received SIGXFSZ
+# Order 3: FORMAT, KERNEL, EXEC, PROC
+0x24		string	HP-UX
+>0		belong	1
+>>0xC		belong	4
+>>>0x10		belong	1
+>>>>0x14	belong	2
+>>>>>0x20	belong	0x3C
+>>>>>>0x60	belong	0x100
+>>>>>>>0x6C	belong	0x44
+>>>>>>>>0xB4	belong	4		core file
+>>>>>>>>>0xA4	string	>\0		from '%s'
+>>>>>>>>>0xC4	belong	3		- received SIGQUIT
+>>>>>>>>>0xC4	belong	4		- received SIGILL
+>>>>>>>>>0xC4	belong	5		- received SIGTRAP
+>>>>>>>>>0xC4	belong	6		- received SIGABRT
+>>>>>>>>>0xC4	belong	7		- received SIGEMT
+>>>>>>>>>0xC4	belong	8		- received SIGFPE
+>>>>>>>>>0xC4	belong	10		- received SIGBUS
+>>>>>>>>>0xC4	belong	11		- received SIGSEGV
+>>>>>>>>>0xC4	belong	12		- received SIGSYS
+>>>>>>>>>0xC4	belong	33		- received SIGXCPU
+>>>>>>>>>0xC4	belong	34		- received SIGXFSZ
+# Order 4: EXEC, KERNEL, FORMAT, PROC
+0x64		string	HP-UX
+>0		belong	0x100
+>>0xC		belong	0x44
+>>>0x54		belong	2
+>>>>0x60	belong	0x3C
+>>>>>0xA0	belong	1
+>>>>>>0xAC	belong	4
+>>>>>>>0xB0	belong	1
+>>>>>>>>0xB4	belong	4		core file
+>>>>>>>>>0x44	string	>\0		from '%s'
+>>>>>>>>>0xC4	belong	3		- received SIGQUIT
+>>>>>>>>>0xC4	belong	4		- received SIGILL
+>>>>>>>>>0xC4	belong	5		- received SIGTRAP
+>>>>>>>>>0xC4	belong	6		- received SIGABRT
+>>>>>>>>>0xC4	belong	7		- received SIGEMT
+>>>>>>>>>0xC4	belong	8		- received SIGFPE
+>>>>>>>>>0xC4	belong	10		- received SIGBUS
+>>>>>>>>>0xC4	belong	11		- received SIGSEGV
+>>>>>>>>>0xC4	belong	12		- received SIGSYS
+>>>>>>>>>0xC4	belong	33		- received SIGXCPU
+>>>>>>>>>0xC4	belong	34		- received SIGXFSZ
+# Order 5: FORMAT, EXEC, KERNEL, PROC
+0x78		string	HP-UX
+>0		belong	1
+>>0xC		belong	4
+>>>0x10		belong	1
+>>>>0x14	belong	0x100
+>>>>>0x20	belong	0x44
+>>>>>>0x68	belong	2
+>>>>>>>0x74	belong	0x3C
+>>>>>>>>0xB4	belong	4		core file
+>>>>>>>>>0x58	string	>\0		from '%s'
+>>>>>>>>>0xC4	belong	3		- received SIGQUIT
+>>>>>>>>>0xC4	belong	4		- received SIGILL
+>>>>>>>>>0xC4	belong	5		- received SIGTRAP
+>>>>>>>>>0xC4	belong	6		- received SIGABRT
+>>>>>>>>>0xC4	belong	7		- received SIGEMT
+>>>>>>>>>0xC4	belong	8		- received SIGFPE
+>>>>>>>>>0xC4	belong	10		- received SIGBUS
+>>>>>>>>>0xC4	belong	11		- received SIGSEGV
+>>>>>>>>>0xC4	belong	12		- received SIGSYS
+>>>>>>>>>0xC4	belong	33		- received SIGXCPU
+>>>>>>>>>0xC4	belong	34		- received SIGXFSZ
+# Order 6: EXEC, FORMAT, KERNEL, PROC
+>0		belong	0x100
+>>0xC		belong	0x44
+>>>0x54		belong	1
+>>>>0x60	belong	4
+>>>>>0x64	belong	1
+>>>>>>0x68	belong	2
+>>>>>>>0x74	belong	0x2C
+>>>>>>>>0xB4	belong	4		core file
+>>>>>>>>>0x44	string	>\0		from '%s'
+>>>>>>>>>0xC4	belong	3		- received SIGQUIT
+>>>>>>>>>0xC4	belong	4		- received SIGILL
+>>>>>>>>>0xC4	belong	5		- received SIGTRAP
+>>>>>>>>>0xC4	belong	6		- received SIGABRT
+>>>>>>>>>0xC4	belong	7		- received SIGEMT
+>>>>>>>>>0xC4	belong	8		- received SIGFPE
+>>>>>>>>>0xC4	belong	10		- received SIGBUS
+>>>>>>>>>0xC4	belong	11		- received SIGSEGV
+>>>>>>>>>0xC4	belong	12		- received SIGSYS
+>>>>>>>>>0xC4	belong	33		- received SIGXCPU
+>>>>>>>>>0xC4	belong	34		- received SIGXFSZ
+
+
+
+#------------------------------------------------------------------------------
+# $File: human68k,v 1.5 2009/09/19 16:28:09 christos Exp $
+# human68k:  file(1) magic for Human68k (X680x0 DOS) binary formats
+# Magic too short!
+#0		string	HU		Human68k
+#>68		string	LZX		LZX compressed
+#>>72		string	>\0		(version %s)
+#>(8.L+74)	string	LZX		LZX compressed
+#>>(8.L+78)	string	>\0		(version %s)
+#>60		belong	>0		binded
+#>(8.L+66)	string	#HUPAIR		hupair
+#>0		string	HU		X executable
+#>(8.L+74)	string	#LIBCV1		- linked PD LIBC ver 1
+#>4		belong	>0		- base address 0x%x
+#>28		belong	>0		not stripped
+#>32		belong	>0		with debug information
+#0		beshort	0x601a		Human68k Z executable
+#0		beshort	0x6000		Human68k object file
+#0		belong	0xd1000000	Human68k ar binary archive
+#0		belong	0xd1010000	Human68k ar ascii archive
+#0		beshort	0x0068		Human68k lib archive
+#4		string	LZX		Human68k LZX compressed
+#>8		string	>\0		(version %s)
+#>4		string	LZX		R executable
+#2		string	#HUPAIR		Human68k hupair R executable
+
+#------------------------------------------------------------------------------
+# $File: ibm370,v 1.8 2009/09/19 16:28:09 christos Exp $
+# ibm370:  file(1) magic for IBM 370 and compatibles.
+#
+# "ibm370" said that 0x15d == 0535 was "ibm 370 pure executable".
+# What the heck *is* "USS/370"?
+# AIX 4.1's "/etc/magic" has
+#
+#	0	short		0535		370 sysV executable 
+#	>12	long		>0		not stripped
+#	>22	short		>0		- version %d
+#	>30	long		>0		- 5.2 format
+#	0	short		0530		370 sysV pure executable 
+#	>12	long		>0		not stripped
+#	>22	short		>0		- version %d
+#	>30	long		>0		- 5.2 format
+#
+# instead of the "USS/370" versions of the same magic numbers.
+#
+0	beshort		0537		370 XA sysV executable 
+>12	belong		>0		not stripped
+>22	beshort		>0		- version %d
+>30	belong		>0		- 5.2 format
+0	beshort		0532		370 XA sysV pure executable 
+>12	belong		>0		not stripped
+>22	beshort		>0		- version %d
+>30	belong		>0		- 5.2 format
+0	beshort		054001		370 sysV pure executable
+>12	belong		>0		not stripped
+0	beshort		055001		370 XA sysV pure executable
+>12	belong		>0		not stripped
+0	beshort		056401		370 sysV executable
+>12	belong		>0		not stripped
+0	beshort		057401		370 XA sysV executable
+>12	belong		>0		not stripped
+0       beshort		0531		SVR2 executable (Amdahl-UTS)
+>12	belong		>0		not stripped
+>24     belong		>0		- version %ld
+0	beshort		0534		SVR2 pure executable (Amdahl-UTS)
+>12	belong		>0		not stripped
+>24	belong		>0		- version %ld
+0	beshort		0530		SVR2 pure executable (USS/370)
+>12	belong		>0		not stripped
+>24	belong		>0		- version %ld
+0	beshort		0535		SVR2 executable (USS/370)
+>12	belong		>0		not stripped
+>24	belong		>0		- version %ld
+
+#------------------------------------------------------------------------------
+# $File: ibm6000,v 1.9 2009/09/19 16:28:09 christos Exp $
+# ibm6000:  file(1) magic for RS/6000 and the RT PC.
+#
+0	beshort		0x01df		executable (RISC System/6000 V3.1) or obj module
+>12	belong		>0		not stripped
+# Breaks sun4 statically linked execs.
+#0      beshort		0x0103		executable (RT Version 2) or obj module
+#>2	byte		0x50		pure
+#>28	belong		>0		not stripped
+#>6	beshort		>0		- version %ld
+0	beshort		0x0104		shared library
+0	beshort		0x0105		ctab data
+0	beshort		0xfe04		structured file
+0	string		0xabcdef	AIX message catalog
+0	belong		0x000001f9	AIX compiled message catalog
+0	string		\<aiaff>	archive
+0	string		\<bigaf>	archive (big format)
+
+
+#------------------------------------------------------------------------------
+# $File: iff,v 1.12 2009/09/19 16:28:09 christos Exp $
+# iff:	file(1) magic for Interchange File Format (see also "audio" & "images")
+#
+# Daniel Quinlan (quinlan at yggdrasil.com) -- IFF was designed by Electronic
+# Arts for file interchange.  It has also been used by Apple, SGI, and
+# especially Commodore-Amiga.
+#
+# IFF files begin with an 8 byte FORM header, followed by a 4 character
+# FORM type, which is followed by the first chunk in the FORM.
+
+0	string		FORM		IFF data
+#>4	belong		x		\b, FORM is %d bytes long
+# audio formats
+>8	string		AIFF		\b, AIFF audio
+!:mime	audio/x-aiff
+>8	string		AIFC		\b, AIFF-C compressed audio
+!:mime	audio/x-aiff
+>8	string		8SVX		\b, 8SVX 8-bit sampled sound voice
+!:mime	audio/x-aiff
+>8	string		16SV		\b, 16SV 16-bit sampled sound voice
+>8	string		SAMP		\b, SAMP sampled audio
+>8	string		MAUD		\b, MAUD MacroSystem audio
+>8	string		SMUS		\b, SMUS simple music
+>8	string		CMUS		\b, CMUS complex music
+# image formats
+>8	string		ILBMBMHD	\b, ILBM interleaved image
+>>20	beshort		x		\b, %d x
+>>22	beshort		x		%d
+>8	string		RGBN		\b, RGBN 12-bit RGB image
+>8	string		RGB8		\b, RGB8 24-bit RGB image
+>8	string		DEEP		\b, DEEP TVPaint/XiPaint image
+>8	string		DR2D		\b, DR2D 2-D object
+>8	string		TDDD		\b, TDDD 3-D rendering
+>8	string		LWOB		\b, LWOB 3-D object
+>8	string		LWO2		\b, LWO2 3-D object, v2
+>8	string		LWLO		\b, LWLO 3-D layered object
+>8	string		REAL		\b, REAL Real3D rendering
+>8	string		MC4D		\b, MC4D MaxonCinema4D rendering
+>8	string		ANIM		\b, ANIM animation
+>8	string		YAFA		\b, YAFA animation
+>8	string		SSA\ 		\b, SSA super smooth animation
+>8	string		ACBM		\b, ACBM continuous image
+>8	string		FAXX		\b, FAXX fax image
+# other formats
+>8	string		FTXT		\b, FTXT formatted text
+>8	string		CTLG		\b, CTLG message catalog
+>8	string		PREF		\b, PREF preferences
+>8	string		DTYP		\b, DTYP datatype description
+>8	string		PTCH		\b, PTCH binary patch
+>8	string		AMFF		\b, AMFF AmigaMetaFile format
+>8	string		WZRD		\b, WZRD StormWIZARD resource
+>8	string		DOC\ 		\b, DOC desktop publishing document
+
+# These go at the end of the iff rules
+#
+# I don't see why these might collide with anything else.
+#
+# Interactive Fiction related formats
+#
+>8	string		IFRS		\b, Blorb Interactive Fiction
+>>24	string		Exec		with executable chunk
+>8	string          IFZS		\b, Z-machine or Glulx saved game file (Quetzal)
+
+#------------------------------------------------------------------------------
+# $File: images,v 1.64 2009/12/06 00:38:50 christos Exp $
+# images:  file(1) magic for image formats (see also "iff", and "c-lang" for
+# XPM bitmaps)
+#
+# originally from jef at helios.ee.lbl.gov (Jef Poskanzer),
+# additions by janl at ifi.uio.no as well as others. Jan also suggested
+# merging several one- and two-line files into here.
+#
+# little magic: PCX (first byte is 0x0a)
+
+# Targa - matches `povray', `ppmtotga' and `xv' outputs
+# by Philippe De Muyter <phdm at macqel.be>
+# at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11
+# at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise
+# at 3, leshort Index is 0 for povray, ppmtotga and xv outputs
+# `xv' recognizes only a subset of the following (RGB with pixelsize = 24)
+# `tgatoppm' recognizes a superset (Index may be anything)
+1	belong&0xfff7ffff	0x01010000	Targa image data - Map
+>2	byte&8			8		- RLE
+>12	leshort			>0		%hd x
+>14	leshort			>0		%hd
+1	belong&0xfff7ffff	0x00020000	Targa image data - RGB
+>2	byte&8			8		- RLE
+>12	leshort			>0		%hd x
+>14	leshort			>0		%hd
+1	belong&0xfff7ffff	0x00030000	Targa image data - Mono
+>2	byte&8			8		- RLE
+>12	leshort			>0		%hd x
+>14	leshort			>0		%hd
+
+# PBMPLUS images
+# The next byte following the magic is always whitespace.
+# strength is changed to try these patterns before "x86 boot sector"
+0  search/1    P1      
+>3 regex       =[0-9]*\ [0-9]*     Netpbm PBM image text
+>3 regex       =[0-9]+\        \b, size = %sx
+>>3    regex       =\ [0-9]+   \b%s
+!:strength + 45
+!:mime	image/x-portable-bitmap
+0  search/1    P2      
+>3 regex       =[0-9]*\ [0-9]*     Netpbm PGM image text
+>3 regex       =[0-9]+\        \b, size = %sx
+>>3    regex       =\ [0-9]+   \b%s
+!:strength + 45
+!:mime	image/x-portable-greymap
+0	search/1	P3
+>3 regex       =[0-9]*\ [0-9]*     Netpbm PPM image text
+>3 regex       =[0-9]+\        \b, size = %sx
+>>3    regex       =\ [0-9]+   \b%s
+!:strength + 45
+!:mime	image/x-portable-pixmap
+0  string      P4      
+>3 regex       =[0-9]*\ [0-9]*     Netpbm PBM "rawbits" image data
+>3 regex       =[0-9]+\        \b, size = %sx
+>>3    regex       =\ [0-9]+   \b%s
+!:strength + 45
+!:mime	image/x-portable-bitmap
+0  string      P5      
+>3 regex       =[0-9]*\ [0-9]*     Netpbm PGM "rawbits" image data
+>3 regex       =[0-9]+\        \b, size = %sx
+>>3    regex       =\ [0-9]+   \b%s
+!:strength + 45
+!:mime	image/x-portable-greymap
+0  string      P6      
+>3 regex       =[0-9]*\ [0-9]*     Netpbm PPM "rawbits" image data
+>3 regex       =[0-9]+\        \b, size = %sx
+>>3    regex       =\ [0-9]+   \b%s
+!:strength + 45
+!:mime	image/x-portable-pixmap
+0	string		P7		Netpbm PAM image file
+!:mime	image/x-portable-pixmap
+
+# From: bryanh at giraffe-data.com (Bryan Henderson)
+0	string		\117\072	Solitaire Image Recorder format
+>4	string		\013		MGI Type 11
+>4	string		\021		MGI Type 17
+0	string		.MDA		MicroDesign data
+>21	byte		48		version 2
+>21	byte		51		version 3
+0	string		.MDP		MicroDesign page data
+>21	byte		48		version 2
+>21	byte		51		version 3
+
+# NIFF (Navy Interchange File Format, a modification of TIFF) images
+# [GRR:  this *must* go before TIFF]
+0	string		IIN1		NIFF image data
+!:mime	image/x-niff
+
+# Tag Image File Format, from Daniel Quinlan (quinlan at yggdrasil.com)
+# The second word of TIFF files is the TIFF version number, 42, which has
+# never changed.  The TIFF specification recommends testing for it.
+0	string		MM\x00\x2a	TIFF image data, big-endian
+!:mime	image/tiff
+0	string		II\x2a\x00	TIFF image data, little-endian
+!:mime	image/tiff
+
+# PNG [Portable Network Graphics, or "PNG's Not GIF"] images
+# (Greg Roelofs, newt at uchicago.edu)
+# (Albert Cahalan, acahalan at cs.uml.edu)
+#
+# 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ...
+#
+0	string		\x89PNG\x0d\x0a\x1a\x0a		PNG image data
+!:mime	image/png
+>16	belong		x		\b, %ld x
+>20	belong		x		%ld,
+>24	byte		x		%d-bit
+>25	byte		0		grayscale,
+>25	byte		2		\b/color RGB,
+>25	byte		3		colormap,
+>25	byte		4		gray+alpha,
+>25	byte		6		\b/color RGBA,
+#>26	byte		0		deflate/32K,
+>28	byte		0		non-interlaced
+>28	byte		1		interlaced
+
+# possible GIF replacements; none yet released!
+# (Greg Roelofs, newt at uchicago.edu)
+#
+# GRR 950115:  this was mine ("Zip GIF"):
+0	string		GIF94z		ZIF image (GIF+deflate alpha)
+!:mime	image/x-unknown
+#
+# GRR 950115:  this is Jeremy Wohl's Free Graphics Format (better):
+#					
+0	string		FGF95a		FGF image (GIF+deflate beta)
+!:mime	image/x-unknown
+#
+# GRR 950115:  this is Thomas Boutell's Portable Bitmap Format proposal
+# (best; not yet implemented):
+#					
+0	string		PBF		PBF image (deflate compression)
+!:mime	image/x-unknown
+
+# GIF
+0	string		GIF8		GIF image data
+!:mime	image/gif
+!:apple	8BIMGIFf
+>4	string		7a		\b, version 8%s,
+>4	string		9a		\b, version 8%s,
+>6	leshort		>0		%hd x
+>8	leshort		>0		%hd
+#>10	byte		&0x80		color mapped,
+#>10	byte&0x07	=0x00		2 colors
+#>10	byte&0x07	=0x01		4 colors
+#>10	byte&0x07	=0x02		8 colors
+#>10	byte&0x07	=0x03		16 colors
+#>10	byte&0x07	=0x04		32 colors
+#>10	byte&0x07	=0x05		64 colors
+#>10	byte&0x07	=0x06		128 colors
+#>10	byte&0x07	=0x07		256 colors
+
+# ITC (CMU WM) raster files.  It is essentially a byte-reversed Sun raster,
+# 1 plane, no encoding.
+0	string		\361\0\100\273	CMU window manager raster image data
+>4	lelong		>0		%d x
+>8	lelong		>0		%d,
+>12	lelong		>0		%d-bit
+
+# Magick Image File Format
+0	string		id=ImageMagick	MIFF image data
+
+# Artisan
+0	long		1123028772	Artisan image data
+>4	long		1		\b, rectangular 24-bit
+>4	long		2		\b, rectangular 8-bit with colormap
+>4	long		3		\b, rectangular 32-bit (24-bit with matte)
+
+# FIG (Facility for Interactive Generation of figures), an object-based format
+0	search/1	#FIG		FIG image text
+>5	string		x		\b, version %.3s
+
+# PHIGS
+0	string		ARF_BEGARF		PHIGS clear text archive
+0	string		@(#)SunPHIGS		SunPHIGS
+# version number follows, in the form m.n
+>40	string		SunBin			binary
+>32	string		archive			archive
+
+# GKS (Graphics Kernel System)
+0	string		GKSM		GKS Metafile
+>24	string		SunGKS		\b, SunGKS
+
+# CGM image files
+0	string		BEGMF		clear text Computer Graphics Metafile
+
+# MGR bitmaps  (Michael Haardt, u31b3hs at pool.informatik.rwth-aachen.de)
+0	string	yz	MGR bitmap, modern format, 8-bit aligned
+0	string	zz	MGR bitmap, old format, 1-bit deep, 16-bit aligned
+0	string	xz	MGR bitmap, old format, 1-bit deep, 32-bit aligned
+0	string	yx	MGR bitmap, modern format, squeezed
+
+# Fuzzy Bitmap (FBM) images
+0	string		%bitmap\0	FBM image data
+>30	long		0x31		\b, mono
+>30	long		0x33		\b, color
+
+# facsimile data
+1	string		PC\ Research,\ Inc	group 3 fax data
+>29	byte		0		\b, normal resolution (204x98 DPI)
+>29	byte		1		\b, fine resolution (204x196 DPI)
+# From: Herbert Rosmanith <herp at wildsau.idv.uni.linz.at>
+0	string		Sfff		structured fax file
+
+
+# PC bitmaps (OS/2, Windows BMP files)  (Greg Roelofs, newt at uchicago.edu)
+0	string		BM
+>14	leshort		12		PC bitmap, OS/2 1.x format
+!:mime	image/x-ms-bmp
+>>18	leshort		x		\b, %d x
+>>20	leshort		x		%d
+>14	leshort		64		PC bitmap, OS/2 2.x format
+!:mime	image/x-ms-bmp
+>>18	leshort		x		\b, %d x
+>>20	leshort		x		%d
+>14	leshort		40		PC bitmap, Windows 3.x format
+!:mime	image/x-ms-bmp
+>>18	lelong		x		\b, %d x
+>>22	lelong		x		%d x
+>>28	leshort		x		%d
+>14	leshort		128		PC bitmap, Windows NT/2000 format
+!:mime	image/x-ms-bmp
+>>18	lelong		x		\b, %d x
+>>22	lelong		x		%d x
+>>28	leshort		x		%d
+# Too simple - MPi
+#0	string		IC		PC icon data
+#0	string		PI		PC pointer image data
+#0	string		CI		PC color icon data
+#0	string		CP		PC color pointer image data
+# Conflicts with other entries [BABYL]
+#0	string		BA		PC bitmap array data
+
+# XPM icons (Greg Roelofs, newt at uchicago.edu)
+# note possible collision with C/REXX entry in c-lang; currently commented out
+0	search/1	/*\ XPM\ */	X pixmap image text
+
+# Utah Raster Toolkit RLE images (janl at ifi.uio.no)
+0	leshort		0xcc52		RLE image data,
+>6	leshort		x		%d x
+>8	leshort		x		%d
+>2	leshort		>0		\b, lower left corner: %d
+>4	leshort		>0		\b, lower right corner: %d
+>10	byte&0x1	=0x1		\b, clear first
+>10	byte&0x2	=0x2		\b, no background
+>10	byte&0x4	=0x4		\b, alpha channel
+>10	byte&0x8	=0x8		\b, comment
+>11	byte		>0		\b, %d color channels
+>12	byte		>0		\b, %d bits per pixel
+>13	byte		>0		\b, %d color map channels
+
+# image file format (Robert Potter, potter at cs.rochester.edu)
+0	string		Imagefile\ version-	iff image data
+# this adds the whole header (inc. version number), informative but longish
+>10	string		>\0		%s
+
+# Sun raster images, from Daniel Quinlan (quinlan at yggdrasil.com)
+0	belong		0x59a66a95	Sun raster image data
+>4	belong		>0		\b, %d x
+>8	belong		>0		%d,
+>12	belong		>0		%d-bit,
+#>16	belong		>0		%d bytes long,
+>20	belong		0		old format,
+#>20	belong		1		standard,
+>20	belong		2		compressed,
+>20	belong		3		RGB,
+>20	belong		4		TIFF,
+>20	belong		5		IFF,
+>20	belong		0xffff		reserved for testing,
+>24	belong		0		no colormap
+>24	belong		1		RGB colormap
+>24	belong		2		raw colormap
+#>28	belong		>0		colormap is %d bytes long
+
+# SGI image file format, from Daniel Quinlan (quinlan at yggdrasil.com)
+#
+# See
+#	http://reality.sgi.com/grafica/sgiimage.html
+#
+0	beshort		474		SGI image data
+#>2	byte		0		\b, verbatim
+>2	byte		1		\b, RLE
+#>3	byte		1		\b, normal precision
+>3	byte		2		\b, high precision
+>4	beshort		x		\b, %d-D
+>6	beshort		x		\b, %d x
+>8	beshort		x		%d
+>10	beshort		x		\b, %d channel
+>10	beshort		!1		\bs
+>80	string		>0		\b, "%s"
+
+0	string		IT01		FIT image data
+>4	belong		x		\b, %d x
+>8	belong		x		%d x
+>12	belong		x		%d
+#
+0	string		IT02		FIT image data
+>4	belong		x		\b, %d x
+>8	belong		x		%d x
+>12	belong		x		%d
+#
+2048	string		PCD_IPI		Kodak Photo CD image pack file
+>0xe02	byte&0x03	0x00		, landscape mode
+>0xe02	byte&0x03	0x01		, portrait mode
+>0xe02	byte&0x03	0x02		, landscape mode
+>0xe02	byte&0x03	0x03		, portrait mode
+0	string		PCD_OPA		Kodak Photo CD overview pack file
+
+# FITS format.  Jeff Uphoff <juphoff at tarsier.cv.nrao.edu>
+# FITS is the Flexible Image Transport System, the de facto standard for
+# data and image transfer, storage, etc., for the astronomical community.
+# (FITS floating point formats are big-endian.)
+0	string	SIMPLE\ \ =	FITS image data
+>109	string	8		\b, 8-bit, character or unsigned binary integer
+>108	string	16		\b, 16-bit, two's complement binary integer
+>107	string	\ 32		\b, 32-bit, two's complement binary integer
+>107	string	-32		\b, 32-bit, floating point, single precision
+>107	string	-64		\b, 64-bit, floating point, double precision
+
+# other images
+0	string	This\ is\ a\ BitMap\ file	Lisp Machine bit-array-file
+
+# From SunOS 5.5.1 "/etc/magic" - appeared right before Sun raster image
+# stuff.
+#
+0	beshort		0x1010		PEX Binary Archive
+
+# DICOM medical imaging data
+128	string	DICM			DICOM medical imaging data
+!:mime	application/dicom
+
+# XWD - X Window Dump file.
+#   As described in /usr/X11R6/include/X11/XWDFile.h
+#   used by the xwd program.
+#   Bradford Castalia, idaeim, 1/01
+4	belong	7			XWD X Window Dump image data
+>100	string	>\0			\b, "%s"
+>16	belong	x			\b, %dx
+>20	belong	x			\b%dx
+>12	belong	x			\b%d
+
+# PDS - Planetary Data System
+#   These files use Parameter Value Language in the header section.
+#   Unfortunately, there is no certain magic, but the following
+#   strings have been found to be most likely.
+0	string	NJPL1I00		PDS (JPL) image data
+2	string	NJPL1I			PDS (JPL) image data
+0	string	CCSD3ZF			PDS (CCSD) image data
+2	string	CCSD3Z			PDS (CCSD) image data
+0	string	PDS_			PDS image data
+0	string	LBLSIZE=		PDS (VICAR) image data
+
+# pM8x: ATARI STAD compressed bitmap format
+#
+# from Oskar Schirmer <schirmer at scara.com> Feb 2, 2001
+# p M 8 5/6 xx yy zz data...
+# Atari ST STAD bitmap is always 640x400, bytewise runlength compressed.
+# bytes either run horizontally (pM85) or vertically (pM86). yy is the
+# most frequent byte, xx and zz are runlength escape codes, where xx is
+# used for runs of yy.
+#
+0	string	pM85		Atari ST STAD bitmap image data (hor)
+>5	byte	0x00		(white background)
+>5	byte	0xFF		(black background)
+0	string	pM86		Atari ST STAD bitmap image data (vert)
+>5	byte	0x00		(white background)
+>5	byte	0xFF		(black background)
+
+# Gürkan Sengün <gurkan at linuks.mine.nu>, www.linuks.mine.nu
+# http://www.atarimax.com/jindroush.atari.org/afmtatr.html
+0	leshort	0x0296		Atari ATR image
+
+# XXX:
+# This is bad magic 0x5249 == 'RI' conflicts with RIFF and other
+# magic.
+# SGI RICE image file <mpruett at sgi.com>
+#0	beshort	0x5249		RICE image
+#>2	beshort	x		v%d
+#>4	beshort	x		(%d x
+#>6	beshort	x		%d)
+#>8	beshort	0		8 bit
+#>8	beshort	1		10 bit
+#>8	beshort	2		12 bit
+#>8	beshort	3		13 bit
+#>10	beshort	0		4:2:2
+#>10	beshort	1		4:2:2:4
+#>10	beshort	2		4:4:4
+#>10	beshort	3		4:4:4:4
+#>12	beshort	1		RGB
+#>12	beshort	2		CCIR601
+#>12	beshort	3		RP175
+#>12	beshort	4		YUV
+
+#------------------------------------------------------------------------------
+#
+# Marco Schmidt (marcoschmidt at users.sourceforge.net) -- an image  file format
+# for the EPOC operating system, which is used with PDAs like those from Psion
+#
+# see http://huizen.dds.nl/~frodol/psiconv/html/Index.html for a description
+# of various EPOC file formats
+
+0	string \x37\x00\x00\x10\x42\x00\x00\x10\x00\x00\x00\x00\x39\x64\x39\x47 EPOC MBM image file
+
+# PCX image files
+# From: Dan Fandrich <dan at coneharvesters.com>
+0	beshort		0x0a00	PCX ver. 2.5 image data
+0	beshort		0x0a02	PCX ver. 2.8 image data, with palette
+0	beshort		0x0a03	PCX ver. 2.8 image data, without palette
+0	beshort		0x0a04	PCX for Windows image data
+0	beshort		0x0a05	PCX ver. 3.0 image data
+>4	leshort		x      bounding box [%hd,
+>6	leshort		x      %hd] -
+>8	leshort		x      [%hd,
+>10	leshort		x      %hd],
+>65	byte		>1	%d planes each of
+>3	byte		x	%hhd-bit
+>68	byte		0	image,
+>68	byte		1	colour,
+>68	byte		2	grayscale,
+>68	byte		>2	image,
+>68	byte		<0	image,
+>12	leshort		>0	%hd x
+>>14	leshort		x      %hd dpi,
+>2	byte		0	uncompressed
+>2	byte		1	RLE compressed
+
+# Adobe Photoshop
+# From: Asbjoern Sloth Toennesen <asbjorn at lila.io>
+0	string		8BPS Adobe Photoshop Image
+!:mime	image/vnd.adobe.photoshop
+>4   beshort 2 (PSB)
+>18  belong  x \b, %d x
+>14  belong  x %d,
+>24  beshort 0 bitmap
+>24  beshort 1 grayscale
+>>12 beshort 2 with alpha
+>24  beshort 2 indexed
+>24  beshort 3 RGB
+>>12 beshort 4 \bA
+>24  beshort 4 CMYK
+>>12 beshort 5 \bA
+>24  beshort 7 multichannel
+>24  beshort 8 duotone
+>24  beshort 9 lab
+>12  beshort > 1
+>>12  beshort x \b, %dx
+>12  beshort 1 \b,
+>22  beshort x %d-bit channel
+>12  beshort > 1 \bs
+
+# XV thumbnail indicator (ThMO)
+0	string		P7\ 332		XV thumbnail image data
+
+# NITF is defined by United States MIL-STD-2500A
+0	string	NITF	National Imagery Transmission Format
+>25	string	>\0	dated %.14s
+
+# GEM Image: Version 1, Headerlen 8 (Wolfram Kleff)
+0	belong		0x00010008	GEM Image data
+>12	beshort		x		%d x
+>14	beshort		x		%d,
+>4	beshort		x		%d planes,
+>8	beshort		x		%d x
+>10	beshort		x		%d pixelsize
+
+# GEM Metafile (Wolfram Kleff)
+0	lelong		0x0018FFFF	GEM Metafile data
+>4	leshort		x		version %d
+
+#
+# SMJPEG. A custom Motion JPEG format used by Loki Entertainment
+# Software Torbjorn Andersson <d91tan at Update.UU.SE>.
+#
+0	string	\0\nSMJPEG	SMJPEG
+>8	belong	x		%d.x data
+# According to the specification you could find any number of _TXT
+# headers here, but I can't think of any way of handling that. None of
+# the SMJPEG files I tried it on used this feature. Even if such a
+# file is encountered the output should still be reasonable.
+>16	string	_SND		\b,
+>>24	beshort	>0		%d Hz
+>>26	byte	8		8-bit
+>>26	byte	16		16-bit
+>>28	string	NONE		uncompressed
+# >>28	string	APCM		ADPCM compressed
+>>27	byte	1		mono
+>>28	byte	2		stereo
+# Help! Isn't there any way to avoid writing this part twice?
+>>32	string	_VID		\b,
+# >>>48	string	JFIF		JPEG
+>>>40	belong	>0		%d frames
+>>>44	beshort	>0		(%d x
+>>>46	beshort	>0		%d)
+>16	string	_VID		\b,
+# >>32	string	JFIF		JPEG
+>>24	belong	>0		%d frames
+>>28	beshort	>0		(%d x
+>>30	beshort	>0		%d)
+
+0	string	Paint\ Shop\ Pro\ Image\ File	Paint Shop Pro Image File
+
+# "thumbnail file" (icon)
+# descended from "xv", but in use by other applications as well (Wolfram Kleff)
+0       string          P7\ 332         XV "thumbnail file" (icon) data
+
+# taken from fkiss: (<yav at mte.biglobe.ne.jp> ?)
+0       string          KiSS            KISS/GS
+>4      byte            16              color
+>>5     byte            x               %d bit
+>>8     leshort         x               %d colors
+>>10    leshort         x               %d groups
+>4      byte            32              cell
+>>5     byte            x               %d bit
+>>8     leshort         x               %d x
+>>10    leshort         x               %d
+>>12    leshort         x               +%d
+>>14    leshort         x               +%d
+
+# Webshots (www.webshots.com), by John Harrison
+0       string          C\253\221g\230\0\0\0 Webshots Desktop .wbz file
+
+# Hercules DASD image files
+# From Jan Jaeger <jj at septa.nl>
+0       string  CKD_P370        Hercules CKD DASD image file
+>8      long    x               \b, %d heads per cylinder
+>12     long    x               \b, track size %d bytes
+>16     byte    x               \b, device type 33%2.2X
+
+0       string  CKD_C370        Hercules compressed CKD DASD image file
+>8      long    x               \b, %d heads per cylinder
+>12     long    x               \b, track size %d bytes
+>16     byte    x               \b, device type 33%2.2X
+
+0       string  CKD_S370        Hercules CKD DASD shadow file
+>8      long    x               \b, %d heads per cylinder
+>12     long    x               \b, track size %d bytes
+>16     byte    x               \b, device type 33%2.2X
+
+# Squeak images and programs - etoffi at softhome.net
+0	string		\146\031\0\0	Squeak image data
+0	search/1	'From\040Squeak	Squeak program text
+
+# partimage: file(1) magic for PartImage files (experimental, incomplete)
+# Author: Hans-Joachim Baader <hjb at pro-linux.de>
+0		string	PaRtImAgE-VoLuMe	PartImage
+>0x0020		string	0.6.1		file version %s
+>>0x0060	lelong	>-1		volume %ld
+#>>0x0064 8 byte identifier
+#>>0x007c reserved
+>>0x0200	string	>\0		type %s
+>>0x1400	string	>\0		device %s,
+>>0x1600	string	>\0		original filename %s,
+# Some fields omitted
+>>0x2744	lelong	0		not compressed
+>>0x2744	lelong	1		gzip compressed
+>>0x2744	lelong	2		bzip2 compressed
+>>0x2744	lelong	>2		compressed with unknown algorithm
+>0x0020		string	>0.6.1		file version %s
+>0x0020		string	<0.6.1		file version %s
+
+# DCX is multi-page PCX, using a simple header of up to 1024
+# offsets for the respective PCX components.
+# From: Joerg Wunsch <joerg_wunsch at uriah.heep.sax.de>
+0	lelong	987654321	DCX multi-page PCX image data
+
+# Simon Walton <simonw at matteworld.com>
+# Kodak Cineon format for scanned negatives
+# http://www.kodak.com/US/en/motion/support/dlad/
+0	lelong  0xd75f2a80	Cineon image data
+>200	belong  >0		\b, %ld x
+>204	belong  >0		%ld
+
+
+# Bio-Rad .PIC is an image format used by microscope control systems
+# and related image processing software used by biologists.
+# From: Vebjorn Ljosa <vebjorn at ljosa.com>
+# BOOL values are two-byte integers; use them to rule out false positives.
+# http://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt
+# Samples: http://www.loci.wisc.edu/software/sample-data
+14 leshort <2
+>62    leshort <2
+>>54   leshort 12345       Bio-Rad .PIC Image File
+>>>0   leshort >0      %hd x
+>>>2   leshort >0      %hd,
+>>>4   leshort =1      1 image in file
+>>>4   leshort >1      %hd images in file
+
+# From Jan "Yenya" Kasprzak <kas at fi.muni.cz>
+# The description of *.mrw format can be found at
+# http://www.dalibor.cz/minolta/raw_file_format.htm
+0	string	\000MRM			Minolta Dimage camera raw image data
+
+# Summary: DjVu image / document
+# Extension: .djvu
+# Reference: http://djvu.org/docs/DjVu3Spec.djvu
+# Submitted by: Stephane Loeuillet <stephane.loeuillet at tiscali.fr>
+# Modified by (1): Abel Cheung <abelcheung at gmail.com>
+0	string	AT&TFORM
+>12	string	DJVM		DjVu multiple page document
+!:mime	image/vnd.djvu
+>12	string	DJVU		DjVu image or single page document
+!:mime	image/vnd.djvu
+>12	string	DJVI		DjVu shared document
+!:mime	image/vnd.djvu
+>12	string	THUM		DjVu page thumbnails
+!:mime	image/vnd.djvu
+
+
+# From Marc Espie
+0	lelong	20000630		OpenEXR image data
+
+# From: Tom Hilinski <tom.hilinski at comcast.net>
+# http://www.unidata.ucar.edu/packages/netcdf/
+0	string	CDF\001			NetCDF Data Format data
+
+#-----------------------------------------------------------------------
+# Hierarchical Data Format, used to facilitate scientific data exchange
+# specifications at http://hdf.ncsa.uiuc.edu/
+0	belong	0x0e031301	Hierarchical Data Format (version 4) data
+!:mime	application/x-hdf
+0	string	\211HDF\r\n\032	Hierarchical Data Format (version 5) data
+!:mime	application/x-hdf
+
+# From: Tobias Burnus <burnus at net-b.de>
+# Xara (for a while: Corel Xara) is a graphic package, see
+# http://www.xara.com/ for Windows and as GPL application for Linux
+0	string	XARA\243\243	Xara graphics file
+
+# http://www.cartesianinc.com/Tech/
+0	string	CPC\262		Cartesian Perceptual Compression image
+!:mime	image/x-cpi
+
+# From Albert Cahalan <acahalan at gmail.com>
+# puredigital used it for the CVS disposable camcorder
+#8       lelong  4       ZBM bitmap image data
+#>4      leshort x       %u x
+#>6      leshort x       %u
+
+# From Albert Cahalan <acahalan at gmail.com>
+# uncompressed 5:6:5 HighColor image for OLPC XO firmware icons
+0       string C565     OLPC firmware icon image data
+>4      leshort x       %u x
+>6      leshort x       %u
+
+# Applied Images - Image files from Cytovision
+# Gustavo Junior Alves <gjalves at gjalves.com.br>
+0	string	\xce\xda\xde\xfa	Cytovision Metaphases file
+0	string	\xed\xad\xef\xac	Cytovision Karyotype file
+0	string	\x0b\x00\x03\x00	Cytovision FISH Probe file
+0	string	\xed\xfe\xda\xbe	Cytovision FLEX file
+0	string	\xed\xab\xed\xfe	Cytovision FLEX file
+0	string	\xad\xfd\xea\xad	Cytovision RATS file
+
+# Wavelet Scalar Quantization format used in gray-scale fingerprint images
+# From Tano M Fotang <mfotang at quanteq.com>
+0	string	\xff\xa0\xff\xa8\x00	Wavelet Scalar Quantization image data
+
+# JPEG 2000 Code Stream Bitmap
+# From Petr Splichal <psplicha at redhat.com>
+0	string	\xFF\x4F\xFF\x51\x00	JPEG-2000 Code Stream Bitmap data
+
+#------------------------------------------------------------------------------
+# $File: inform,v 1.5 2009/09/19 16:28:09 christos Exp $
+# inform:  file(1) magic for Inform interactive fiction language
+
+# URL:  http://www.inform-fiction.org/
+# From: Reuben Thomas <rrt at sc3d.org>
+
+0	search/100/cW	constant\ story		Inform source text
+
+#------------------------------------------------------------------------------
+# $File: intel,v 1.8 2009/09/19 16:28:10 christos Exp $
+# intel:  file(1) magic for x86 Unix
+#
+# Various flavors of x86 UNIX executable/object (other than Xenix, which
+# is in "microsoft").  DOS is in "msdos"; the ambitious soul can do
+# Windows as well.
+#
+# Windows NT belongs elsewhere, as you need x86 and MIPS and Alpha and
+# whatever comes next (HP-PA Hummingbird?).  OS/2 may also go elsewhere
+# as well, if, as, and when IBM makes it portable.
+#
+# The `versions' should be un-commented if they work for you.
+# (Was the problem just one of endianness?)
+#
+0	leshort		0502		basic-16 executable
+>12	lelong		>0		not stripped
+#>22	leshort		>0		- version %ld
+0	leshort		0503		basic-16 executable (TV)
+>12	lelong		>0		not stripped
+#>22	leshort		>0		- version %ld
+0	leshort		0510		x86 executable
+>12	lelong		>0		not stripped
+0	leshort		0511		x86 executable (TV)
+>12	lelong		>0		not stripped
+0	leshort		=0512		iAPX 286 executable small model (COFF)
+>12	lelong		>0		not stripped
+#>22	leshort		>0		- version %ld
+0	leshort		=0522		iAPX 286 executable large model (COFF)
+>12	lelong		>0		not stripped
+#>22	leshort		>0		- version %ld
+# SGI labeled the next entry as "iAPX 386 executable" --Dan Quinlan
+0	leshort		=0514		80386 COFF executable
+>12	lelong		>0		not stripped
+>22	leshort		>0		- version %ld
+
+# rom: file(1) magic for BIOS ROM Extensions found in intel machines
+#      mapped into memory between 0xC0000 and 0xFFFFF
+# From Gürkan Sengün <gurkan at linuks.mine.nu>, www.linuks.mine.nu
+0        beshort         0x55AA       BIOS (ia32) ROM Ext.
+>5       string          USB          USB
+>7       string          LDR          UNDI image
+>30      string          IBM          IBM comp. Video
+>26      string          Adaptec      Adaptec
+>28      string          Adaptec      Adaptec
+>42      string          PROMISE      Promise
+>2       byte            x            (%d*512)
+
+#------------------------------------------------------------------------------
+# $File: interleaf,v 1.10 2009/09/19 16:28:10 christos Exp $
+# interleaf:  file(1) magic for InterLeaf TPS:
+#
+0	string		=\210OPS	Interleaf saved data
+0	string		=<!OPS		Interleaf document text
+>5	string		,\ Version\ =	\b, version
+>>17	string		>\0		%.3s
+
+#------------------------------------------------------------------------------
+# $File: island,v 1.5 2009/09/19 16:28:10 christos Exp $
+# island:  file(1) magic for IslandWite/IslandDraw, from SunOS 5.5.1
+# "/etc/magic":
+# From: guy at netapp.com (Guy Harris)
+#
+4	string		pgscriptver	IslandWrite document
+13	string		DrawFile	IslandDraw document
+
+
+#------------------------------------------------------------------------------
+# $File: ispell,v 1.8 2009/09/19 16:28:10 christos Exp $
+# ispell:  file(1) magic for ispell
+#
+# Ispell 3.0 has a magic of 0x9601 and ispell 3.1 has 0x9602.  This magic
+# will match 0x9600 through 0x9603 in *both* little endian and big endian.
+# (No other current magic entries collide.)
+#
+# Updated by Daniel Quinlan (quinlan at yggdrasil.com)
+#
+0	leshort&0xFFFC	0x9600		little endian ispell
+>0	byte		0		hash file (?),
+>0	byte		1		3.0 hash file,
+>0	byte		2		3.1 hash file,
+>0	byte		3		hash file (?),
+>2	leshort		0x00		8-bit, no capitalization, 26 flags
+>2	leshort		0x01		7-bit, no capitalization, 26 flags
+>2	leshort		0x02		8-bit, capitalization, 26 flags
+>2	leshort		0x03		7-bit, capitalization, 26 flags
+>2	leshort		0x04		8-bit, no capitalization, 52 flags
+>2	leshort		0x05		7-bit, no capitalization, 52 flags
+>2	leshort		0x06		8-bit, capitalization, 52 flags
+>2	leshort		0x07		7-bit, capitalization, 52 flags
+>2	leshort		0x08		8-bit, no capitalization, 128 flags
+>2	leshort		0x09		7-bit, no capitalization, 128 flags
+>2	leshort		0x0A		8-bit, capitalization, 128 flags
+>2	leshort		0x0B		7-bit, capitalization, 128 flags
+>2	leshort		0x0C		8-bit, no capitalization, 256 flags
+>2	leshort		0x0D		7-bit, no capitalization, 256 flags
+>2	leshort		0x0E		8-bit, capitalization, 256 flags
+>2	leshort		0x0F		7-bit, capitalization, 256 flags
+>4	leshort		>0		and %d string characters
+0	beshort&0xFFFC	0x9600		big endian ispell
+>1	byte		0		hash file (?),
+>1	byte		1		3.0 hash file,
+>1	byte		2		3.1 hash file,
+>1	byte		3		hash file (?),
+>2	beshort		0x00		8-bit, no capitalization, 26 flags
+>2	beshort		0x01		7-bit, no capitalization, 26 flags
+>2	beshort		0x02		8-bit, capitalization, 26 flags
+>2	beshort		0x03		7-bit, capitalization, 26 flags
+>2	beshort		0x04		8-bit, no capitalization, 52 flags
+>2	beshort		0x05		7-bit, no capitalization, 52 flags
+>2	beshort		0x06		8-bit, capitalization, 52 flags
+>2	beshort		0x07		7-bit, capitalization, 52 flags
+>2	beshort		0x08		8-bit, no capitalization, 128 flags
+>2	beshort		0x09		7-bit, no capitalization, 128 flags
+>2	beshort		0x0A		8-bit, capitalization, 128 flags
+>2	beshort		0x0B		7-bit, capitalization, 128 flags
+>2	beshort		0x0C		8-bit, no capitalization, 256 flags
+>2	beshort		0x0D		7-bit, no capitalization, 256 flags
+>2	beshort		0x0E		8-bit, capitalization, 256 flags
+>2	beshort		0x0F		7-bit, capitalization, 256 flags
+>4	beshort		>0		and %d string characters
+# ispell 4.0 hash files  kromJx <kromJx at crosswinds.net>
+# Ispell 4.0
+0       string          ISPL            ispell
+>4      long            x               hash file version %d,
+>8      long            x               lexletters %d,
+>12     long            x               lexsize %d,
+>16     long            x               hashsize %d,
+>20     long            x               stblsize %d
+
+#------------------------------------------------------------
+# $File: java,v 1.12 2009/09/19 16:28:10 christos Exp $
+# Java ByteCode and Mach-O binaries (e.g., Mac OS X) use the
+# same magic number, 0xcafebabe, so they are both handled
+# in the entry called "cafebabe".
+#------------------------------------------------------------
+# Java serialization
+# From Martin Pool (m.pool at pharos.com.au)
+0	beshort		0xaced		Java serialization data
+>2	beshort		>0x0004		\b, version %d
+
+0	belong		0xfeedfeed	Java KeyStore
+!:mime	application/x-java-keystore
+0	belong		0xcececece	Java JCE KeyStore
+!:mime	application/x-java-jce-keystore
+
+# Dalvik .dex format. http://retrodev.com/android/dexformat.html
+# From <mkf at google.com> "Mike Fleming"
+0	string	dex\n
+>0	regex	dex\n[0-9][0-9][0-9]\0	Dalvik dex file
+>4	string	>000			version %s
+0	string	dey\n
+>0	regex	dey\n[0-9][0-9][0-9]\0	Dalvik dex file (optimized for host)
+>4	string	>000			version %s
+
+
+#------------------------------------------------------------------------------
+# $File: jpeg,v 1.15 2009/09/19 16:28:10 christos Exp $
+# JPEG images
+# SunOS 5.5.1 had
+#
+#	0	string		\377\330\377\340	JPEG file
+#	0	string		\377\330\377\356	JPG file
+#
+# both of which turn into "JPEG image data" here.
+#
+0	beshort		0xffd8		JPEG image data
+!:mime	image/jpeg
+!:apple	8BIMJPEG
+!:strength +1
+>6	string		JFIF		\b, JFIF standard
+# The following added by Erik Rossen <rossen at freesurf.ch> 1999-09-06
+# in a vain attempt to add image size reporting for JFIF.  Note that these
+# tests are not fool-proof since some perfectly valid JPEGs are currently
+# impossible to specify in magic(4) format.
+# First, a little JFIF version info:
+>>11	byte		x		\b %d.
+>>12	byte		x		\b%02d
+# Next, the resolution or aspect ratio of the image:
+#>>13	byte		0		\b, aspect ratio
+#>>13	byte		1		\b, resolution (DPI)
+#>>13	byte		2		\b, resolution (DPCM)
+#>>4	beshort		x		\b, segment length %d
+# Next, show thumbnail info, if it exists:
+>>18	byte		!0		\b, thumbnail %dx
+>>>19	byte		x		\b%d
+
+# EXIF moved down here to avoid reporting a bogus version number,
+# and EXIF version number printing added.
+#   - Patrik R=E5dman <patrik+file-magic at iki.fi>
+>6	string		Exif		\b, EXIF standard
+# Look for EXIF IFD offset in IFD 0, and then look for EXIF version tag in EXIF IFD.
+# All possible combinations of entries have to be enumerated, since no looping
+# is possible. And both endians are possible...
+# The combinations included below are from real-world JPEGs.
+# Little-endian
+>>12	string		II		
+# IFD 0 Entry #5:
+>>>70	leshort		0x8769          
+# EXIF IFD Entry #1:
+>>>>(78.l+14)	leshort	0x9000		
+>>>>>(78.l+23)	byte	x		%c
+>>>>>(78.l+24)	byte	x		\b.%c
+>>>>>(78.l+25)	byte	!0x30		\b%c
+# IFD 0 Entry #9:
+>>>118	leshort		0x8769          
+# EXIF IFD Entry #3:
+>>>>(126.l+38)	leshort	0x9000		
+>>>>>(126.l+47)	byte	x		%c
+>>>>>(126.l+48)	byte	x		\b.%c
+>>>>>(126.l+49)	byte	!0x30		\b%c
+# IFD 0 Entry #10
+>>>130	leshort		0x8769          
+# EXIF IFD Entry #3:
+>>>>(138.l+38)	leshort	0x9000		
+>>>>>(138.l+47)	byte	x		%c
+>>>>>(138.l+48)	byte	x		\b.%c
+>>>>>(138.l+49)	byte	!0x30		\b%c
+# EXIF IFD Entry #4:
+>>>>(138.l+50)	leshort	0x9000		
+>>>>>(138.l+59)	byte	x		%c
+>>>>>(138.l+60)	byte	x		\b.%c
+>>>>>(138.l+61)	byte	!0x30		\b%c
+# EXIF IFD Entry #5:
+>>>>(138.l+62)	leshort	0x9000		
+>>>>>(138.l+71)	byte	x		%c
+>>>>>(138.l+72)	byte	x		\b.%c
+>>>>>(138.l+73)	byte	!0x30		\b%c
+# IFD 0 Entry #11
+>>>142	leshort		0x8769          
+# EXIF IFD Entry #3:
+>>>>(150.l+38)	leshort	0x9000		
+>>>>>(150.l+47)	byte	x		%c
+>>>>>(150.l+48)	byte	x		\b.%c
+>>>>>(150.l+49)	byte	!0x30		\b%c
+# EXIF IFD Entry #4:
+>>>>(150.l+50)	leshort	0x9000		
+>>>>>(150.l+59)	byte	x		%c
+>>>>>(150.l+60)	byte	x		\b.%c
+>>>>>(150.l+61)	byte	!0x30		\b%c
+# EXIF IFD Entry #5:
+>>>>(150.l+62)	leshort	0x9000		
+>>>>>(150.l+71)	byte	x		%c
+>>>>>(150.l+72)	byte	x		\b.%c
+>>>>>(150.l+73)	byte	!0x30		\b%c
+# Big-endian
+>>12	string		MM		
+# IFD 0 Entry #9:
+>>>118	beshort		0x8769          
+# EXIF IFD Entry #1:
+>>>>(126.L+14)	beshort	0x9000		
+>>>>>(126.L+23)	byte	x		%c
+>>>>>(126.L+24)	byte	x		\b.%c
+>>>>>(126.L+25)	byte	!0x30		\b%c
+# EXIF IFD Entry #3:
+>>>>(126.L+38)	beshort	0x9000		
+>>>>>(126.L+47)	byte	x		%c
+>>>>>(126.L+48)	byte	x		\b.%c
+>>>>>(126.L+49)	byte	!0x30		\b%c
+# IFD 0 Entry #10
+>>>130	beshort		0x8769          
+# EXIF IFD Entry #3:
+>>>>(138.L+38)	beshort	0x9000		
+>>>>>(138.L+47)	byte	x		%c
+>>>>>(138.L+48)	byte	x		\b.%c
+>>>>>(138.L+49)	byte	!0x30		\b%c
+# EXIF IFD Entry #5:
+>>>>(138.L+62)	beshort	0x9000		
+>>>>>(138.L+71)	byte	x		%c
+>>>>>(138.L+72)	byte	x		\b.%c
+>>>>>(138.L+73)	byte	!0x30		\b%c
+# IFD 0 Entry #11
+>>>142	beshort		0x8769          
+# EXIF IFD Entry #4:
+>>>>(150.L+50)	beshort	0x9000		
+>>>>>(150.L+59)	byte	x		%c
+>>>>>(150.L+60)	byte	x		\b.%c
+>>>>>(150.L+61)	byte	!0x30		\b%c
+# Here things get sticky.  We can do ONE MORE marker segment with
+# indirect addressing, and that's all.  It would be great if we could
+# do pointer arithemetic like in an assembler language.  Christos?
+# And if there was some sort of looping construct to do searches, plus a few
+# named accumulators, it would be even more effective...
+# At least we can show a comment if no other segments got inserted before:
+>(4.S+5)	byte		0xFE
+>>(4.S+8)	string		>\0		\b, comment: "%s"
+# FIXME: When we can do non-byte counted strings, we can use that to get
+# the string's count, and fix Debian bug #283760
+#>(4.S+5)	byte		0xFE		\b, comment
+#>>(4.S+6)	beshort		x		\b length=%d
+#>>(4.S+8)	string		>\0		\b, "%s"
+# Or, we can show the encoding type (I've included only the three most common)
+# and image dimensions if we are lucky and the SOFn (image segment) is here:
+>(4.S+5)	byte		0xC0		\b, baseline
+>>(4.S+6)	byte		x		\b, precision %d
+>>(4.S+7)	beshort		x		\b, %dx
+>>(4.S+9)	beshort		x		\b%d
+>(4.S+5)	byte		0xC1		\b, extended sequential
+>>(4.S+6)	byte		x		\b, precision %d
+>>(4.S+7)	beshort		x		\b, %dx
+>>(4.S+9)	beshort		x		\b%d
+>(4.S+5)	byte		0xC2		\b, progressive
+>>(4.S+6)	byte		x		\b, precision %d
+>>(4.S+7)	beshort		x		\b, %dx
+>>(4.S+9)	beshort		x		\b%d
+# I've commented-out quantisation table reporting.  I doubt anyone cares yet.
+#>(4.S+5)	byte		0xDB		\b, quantisation table
+#>>(4.S+6)	beshort		x		\b length=%d
+#>14	beshort		x		\b, %d x
+#>16	beshort		x		\b %d
+
+# HSI is Handmade Software's proprietary JPEG encoding scheme
+0	string		hsi1		JPEG image data, HSI proprietary
+
+# From: David Santinoli <david at santinoli.com>
+0	string		\x00\x00\x00\x0C\x6A\x50\x20\x20\x0D\x0A\x87\x0A	JPEG 2000 image data
+
+# Type: JPEG 2000 codesream
+# From: Mathieu Malaterre <mathieu.malaterre at gmail.com>
+0	belong		0xff4fff51						JPEG 2000 codestream
+45	beshort		0xff52
+
+#------------------------------------------------------------------------------
+# $File: karma,v 1.6 2009/09/19 16:28:10 christos Exp $
+# karma:  file(1) magic for Karma data files
+#
+# From <rgooch at atnf.csiro.au>
+
+0	string		KarmaRHD Version	Karma Data Structure Version
+>16	belong		x		%lu
+
+#------------------------------------------------------------------------------
+# $File: kde,v 1.4 2009/09/19 16:28:10 christos Exp $
+# kde:  file(1) magic for KDE
+
+0		string	[KDE\ Desktop\ Entry]	KDE desktop entry
+!:mime	application/x-kdelnk
+0		string	#\ KDE\ Config\ File	KDE config file
+!:mime	application/x-kdelnk
+0		string	#\ xmcd	xmcd database file for kscd
+!:mime	text/x-xmcd
+
+#------------------------------------------------------------------------------
+# $File: kml,v 1.2 2009/09/19 16:28:10 christos Exp $
+# Type: Google KML, formerly Keyhole Markup Language
+# Future development of this format has been handed
+# over to the Open Geospatial Consortium.
+# http://www.opengeospatial.org/standards/kml/
+# From: Asbjoern Sloth Toennesen <asbjorn at lila.io>
+0 string    \<?xml
+>20  search/400 \ xmlns= 
+>>&0 regex ['"]http://earth.google.com/kml Google KML document
+!:mime application/vnd.google-earth.kml+xml
+>>>&1 string 2.0' \b, version 2.0
+>>>&1 string 2.1' \b, version 2.1
+>>>&1 string 2.2' \b, version 2.2
+
+#------------------------------------------------------------------------------
+# Type: OpenGIS KML, formerly Keyhole Markup Language
+# This standard is maintained by the
+# Open Geospatial Consortium.
+# http://www.opengeospatial.org/standards/kml/
+# From: Asbjoern Sloth Toennesen <asbjorn at lila.io>
+>>&0 regex ['"]http://www.opengis.net/kml OpenGIS KML document
+!:mime application/vnd.google-earth.kml+xml
+>>>&1 string 2.2 \b, version 2.2
+
+#------------------------------------------------------------------------------
+# Type: Google KML Archive (ZIP based) 
+# http://code.google.com/apis/kml/documentation/kml_tut.html
+# From: Asbjoern Sloth Toennesen <asbjorn at lila.io>
+0 string    PK\003\004
+>4  byte    0x14
+>>30  string doc.kml Compressed Google KML Document, including resources.
+!:mime application/vnd.google-earth.kmz
+
+#------------------------------------------------------------------------------
+# $File: lecter,v 1.4 2009/09/19 16:28:10 christos Exp $
+# DEC SRC Virtual Paper: Lectern files
+# Karl M. Hegbloom <karlheg at inetarena.com>
+0	string	lect	DEC SRC Virtual Paper Lectern file
+
+#------------------------------------------------------------------------------
+# $File: lex,v 1.6 2009/09/19 16:28:10 christos Exp $
+# lex:  file(1) magic for lex
+#
+#	derived empirically, your offsets may vary!
+0	search/100	yyprevious	C program text (from lex)
+>3	search/1	>\0		 for %s
+# C program text from GNU flex, from Daniel Quinlan <quinlan at yggdrasil.com>
+0	search/100	generated\ by\ flex	C program text (from flex)
+# lex description file, from Daniel Quinlan <quinlan at yggdrasil.com>
+0	search/1	%{		lex description text
+
+#------------------------------------------------------------------------------
+# $File: lif,v 1.8 2009/09/19 16:28:10 christos Exp $
+# lif:  file(1) magic for lif
+#
+# (Daniel Quinlan <quinlan at yggdrasil.com>)
+#
+0	beshort		0x8000		lif file
+
+#------------------------------------------------------------------------------
+# $File: linux,v 1.33 2009/10/23 16:44:59 christos Exp $
+# linux:  file(1) magic for Linux files
+#
+# Values for Linux/i386 binaries, from Daniel Quinlan <quinlan at yggdrasil.com>
+# The following basic Linux magic is useful for reference, but using
+# "long" magic is a better practice in order to avoid collisions.
+#
+# 2	leshort		100		Linux/i386
+# >0	leshort		0407		impure executable (OMAGIC)
+# >0	leshort		0410		pure executable (NMAGIC)
+# >0	leshort		0413		demand-paged executable (ZMAGIC)
+# >0	leshort		0314		demand-paged executable (QMAGIC)
+#
+0	lelong		0x00640107	Linux/i386 impure executable (OMAGIC)
+>16	lelong		0		\b, stripped
+0	lelong		0x00640108	Linux/i386 pure executable (NMAGIC)
+>16	lelong		0		\b, stripped
+0	lelong		0x0064010b	Linux/i386 demand-paged executable (ZMAGIC)
+>16	lelong		0		\b, stripped
+0	lelong		0x006400cc	Linux/i386 demand-paged executable (QMAGIC)
+>16	lelong		0		\b, stripped
+#
+0	string		\007\001\000	Linux/i386 object file
+>20	lelong		>0x1020		\b, DLL library
+# Linux-8086 stuff:
+0	string		\01\03\020\04	Linux-8086 impure executable
+>28	long		!0		not stripped
+0	string		\01\03\040\04	Linux-8086 executable
+>28	long		!0		not stripped
+#
+0	string		\243\206\001\0	Linux-8086 object file
+#
+0	string		\01\03\020\20	Minix-386 impure executable
+>28	long		!0		not stripped
+0	string		\01\03\040\20	Minix-386 executable
+>28	long		!0		not stripped
+# core dump file, from Bill Reynolds <bill at goshawk.lanl.gov>
+216	lelong		0421		Linux/i386 core file
+>220	string		>\0		of '%s'
+>200	lelong		>0		(signal %d)
+#
+# LILO boot/chain loaders, from Daniel Quinlan <quinlan at yggdrasil.com>
+# this can be overridden by the DOS executable (COM) entry
+2	string		LILO		Linux/i386 LILO boot/chain loader
+#
+# PSF fonts, from H. Peter Anvin <hpa at yggdrasil.com>
+0	leshort		0x0436		Linux/i386 PC Screen Font data,
+>2	byte		0		256 characters, no directory,
+>2	byte		1		512 characters, no directory,
+>2	byte		2		256 characters, Unicode directory,
+>2	byte		3		512 characters, Unicode directory,
+>3	byte		>0		8x%d
+# Linux swap file, from Daniel Quinlan <quinlan at yggdrasil.com>
+4086	string		SWAP-SPACE	Linux/i386 swap file
+# From: Jeff Bailey <jbailey at ubuntu.com>
+# Linux swap file with swsusp1 image, from Jeff Bailey <jbailey at ubuntu.com>
+4076	string		SWAPSPACE2S1SUSPEND	Linux/i386 swap file (new style) with SWSUSP1 image
+# according to man page of mkswap (8) March 1999
+4086	string		SWAPSPACE2	Linux/i386 swap file (new style)
+>0x400	long		x		%d (4K pages)
+>0x404	long		x		size %d pages
+>>4086	string		SWAPSPACE2	
+>>>1052	string		>\0		Label %s
+# From Daniel Novotny <dnovotny at redhat.com>
+# swap file for PowerPC
+65526	string		SWAPSPACE2	Linux/ppc swap file
+16374   string          SWAPSPACE2      Linux/ia64 swap file
+# ECOFF magic for OSF/1 and Linux (only tested under Linux though)
+#
+#	from Erik Troan (ewt at redhat.com) examining od dumps, so this
+#		could be wrong
+#      updated by David Mosberger (davidm at azstarnet.com) based on
+#      GNU BFD and MIPS info found below.
+#
+0	leshort		0x0183		ECOFF alpha
+>24	leshort		0407		executable
+>24	leshort		0410		pure
+>24	leshort		0413		demand paged
+>8	long		>0		not stripped
+>8	long		0		stripped
+>23	leshort		>0		- version %ld.
+#
+# Linux kernel boot images, from Albert Cahalan <acahalan at cs.uml.edu>
+# and others such as Axel Kohlmeyer <akohlmey at rincewind.chemie.uni-ulm.de>
+# and Nicol�s Lichtmaier <nick at debian.org>
+# All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
+# Linux kernel boot images (i386 arch) (Wolfram Kleff)
+514	string		HdrS		Linux kernel
+>510	leshort		0xAA55		x86 boot executable
+>>518	leshort		>0x1ff
+>>>529	byte		0		zImage,
+>>>529	byte		1		bzImage,
+>>>(526.s+0x200) string	>\0		version %s,
+>>498	leshort		1		RO-rootFS,
+>>498	leshort		0		RW-rootFS,
+>>508	leshort		>0		root_dev 0x%X,
+>>502	leshort		>0		swap_dev 0x%X,
+>>504	leshort		>0		RAMdisksize %u KB,
+>>506	leshort		0xFFFF		Normal VGA
+>>506	leshort		0xFFFE		Extended VGA
+>>506	leshort		0xFFFD		Prompt for Videomode
+>>506	leshort		>0		Video mode %d
+# This also matches new kernels, which were caught above by "HdrS".
+0		belong	0xb8c0078e	Linux kernel
+>0x1e3		string	Loading		version 1.3.79 or older
+>0x1e9		string	Loading		from prehistoric times
+
+# System.map files - Nicol�s Lichtmaier <nick at debian.org>
+8	search/1	\ A\ _text	Linux kernel symbol map text
+
+# LSM entries - Nicol�s Lichtmaier <nick at debian.org>
+0	search/1	Begin3	Linux Software Map entry text
+0	search/1	Begin4	Linux Software Map entry text (new format)
+
+# From Matt Zimmerman, enhanced for v3 by Matthew Palmer
+0	belong	0x4f4f4f4d	User-mode Linux COW file
+>4	belong	<3		\b, version %d
+>>8	string	>\0		\b, backing file %s
+>4	belong	>2		\b, version %d
+>>32	string	>\0		\b, backing file %s
+
+############################################################################
+# Linux kernel versions
+
+0		string		\xb8\xc0\x07\x8e\xd8\xb8\x00\x90	Linux
+>497		leshort		0		x86 boot sector
+>>514		belong		0x8e	of a kernel from the dawn of time!
+>>514		belong		0x908ed8b4	version 0.99-1.1.42
+>>514		belong		0x908ed8b8	for memtest86
+
+>497		leshort		!0		x86 kernel
+>>504		leshort		>0		RAMdisksize=%u KB
+>>502		leshort		>0		swap=0x%X
+>>508		leshort		>0		root=0x%X
+>>>498		leshort		1		\b-ro
+>>>498		leshort		0		\b-rw
+>>506		leshort		0xFFFF		vga=normal
+>>506		leshort		0xFFFE		vga=extended
+>>506		leshort		0xFFFD		vga=ask
+>>506		leshort		>0		vga=%d
+>>514		belong		0x908ed881	version 1.1.43-1.1.45
+>>514		belong		0x15b281cd
+>>>0xa8e	belong		0x55AA5a5a	version 1.1.46-1.2.13,1.3.0
+>>>0xa99	belong		0x55AA5a5a	version 1.3.1,2
+>>>0xaa3	belong		0x55AA5a5a	version 1.3.3-1.3.30
+>>>0xaa6	belong		0x55AA5a5a	version 1.3.31-1.3.41
+>>>0xb2b	belong		0x55AA5a5a	version 1.3.42-1.3.45
+>>>0xaf7	belong		0x55AA5a5a	version 1.3.46-1.3.72
+>>514		string		HdrS
+>>>518		leshort		>0x1FF
+>>>>529		byte		0		\b, zImage
+>>>>529		byte		1		\b, bzImage
+>>>>(526.s+0x200) string 	>\0		\b, version %s
+
+# Linux boot sector thefts.
+0		belong		0xb8c0078e	Linux
+>0x1e6		belong		0x454c4b53	ELKS Kernel
+>0x1e6		belong		!0x454c4b53	style boot sector
+
+############################################################################
+# Linux S390 executable
+8 string \x02\x00\x00\x18\x60\x00\x00\x50\x02\x00\x00\x68\x60\x00\x00\x50\x40\x40\x40\x40\x40\x40\x40\x40 Linux S390
+>0x00010000 search/b/4096 \x00\x0a\x00\x00\x8b\xad\xcc\xcc
+# 64bit
+>>&0 string \xc1\x00\xef\xe3\xf0\x68\x00\x00 Z10 64bit kernel
+>>&0 string \xc1\x00\xef\xc3\x00\x00\x00\x00 Z9-109 64bit kernel
+>>&0 string \xc0\x00\x20\x00\x00\x00\x00\x00 Z990 64bit kernel
+>>&0 string \x00\x00\x00\x00\x00\x00\x00\x00 Z900 64bit kernel
+# 32bit
+>>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z10 32bit kernel
+>>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z9-109 32bit kernel
+>>&0 string \x80\x00\x20\x00\x00\x00\x00\x00 Z990 32bit kernel
+>>&0 string \x80\x00\x00\x00\x00\x00\x00\x00 Z900 32bit kernel
+
+############################################################################
+# Linux 8086 executable
+0	lelong&0xFF0000FF 0xC30000E9	Linux-Dev86 executable, headerless
+>5	string		.		
+>>4	string		>\0		\b, libc version %s
+
+0	lelong&0xFF00FFFF 0x4000301	Linux-8086 executable
+>2	byte&0x01	!0		\b, unmapped zero page
+>2	byte&0x20	0		\b, impure
+>2	byte&0x20	!0
+>>2	byte&0x10	!0		\b, A_EXEC
+>2	byte&0x02	!0		\b, A_PAL
+>2	byte&0x04	!0		\b, A_NSYM
+>2	byte&0x08	!0		\b, A_STAND
+>2	byte&0x40	!0		\b, A_PURE
+>2	byte&0x80	!0		\b, A_TOVLY
+>28     long            !0              \b, not stripped
+>37	string		.		
+>>36	string		>\0		\b, libc version %s
+
+# 0	lelong&0xFF00FFFF 0x10000301	ld86 I80386 executable
+# 0	lelong&0xFF00FFFF 0xB000301	ld86 M68K executable
+# 0	lelong&0xFF00FFFF 0xC000301	ld86 NS16K executable
+# 0	lelong&0xFF00FFFF 0x17000301	ld86 SPARC executable
+
+# SYSLINUX boot logo files (from 'ppmtolss16' sources)
+# http://syslinux.zytor.com/
+#
+0	lelong	=0x1413f33d		SYSLINUX' LSS16 image data
+>4	leshort	x			\b, width %d
+>6	leshort	x			\b, height %d
+
+0	string	OOOM			User-Mode-Linux's Copy-On-Write disk image
+>4	belong	x			version %d
+
+# SE Linux policy database
+# From: Mike Frysinger <vapier at gentoo.org>
+0	lelong	0xf97cff8c		SE Linux policy
+>16	lelong	x			v%d
+>20	lelong	1			MLS
+>24	lelong	x			%d symbols
+>28	lelong	x			%d ocons
+
+# Linux Logical Volume Manager (LVM) 
+# Emmanuel VARAGNAT <emmanuel.varagnat at guzu.net>
+#
+# System ID, UUID and volume group name are 128 bytes long
+# but they should never be full and initialized with zeros...
+#
+# LVM1
+#
+0x0	string	HM\001		LVM1 (Linux Logical Volume Manager), version 1
+>0x12c	string	>\0		, System ID: %s
+
+0x0	string	HM\002		LVM1 (Linux Logical Volume Manager), version 2
+>0x12c	string	>\0		, System ID: %s
+
+#  LVM2
+#
+# It seems that the label header can be in one the four first sector
+# of the disk... (from _find_labeller in lib/label/label.c of LVM2)
+#
+# 0x200 seems to be the common case
+
+0x218		 string	LVM2\ 001	LVM2 (Linux Logical Volume Manager)
+# read the offset to add to the start of the header, and the header
+# start in 0x200
+>(0x214.l+0x200) string	>\0		, UUID: %s
+
+0x018		 string	LVM2\ 001	LVM2 (Linux Logical Volume Manager)
+>(0x014.l)	 string	>\0		, UUID: %s
+
+0x418		 string	LVM2\ 001	LVM2 (Linux Logical Volume Manager)
+>(0x414.l+0x400) string	>\0		, UUID: %s
+
+0x618		 string	LVM2\ 001	LVM2 (Linux Logical Volume Manager)
+>(0x614.l+0x600) string	>\0		, UUID: %s
+
+# LVM snapshot
+# from Jason Farrel
+0	string	SnAp	LVM Snapshot (CopyOnWrite store)
+>4	lelong	!0	- valid,
+>4	lelong	0	- invalid,
+>8	lelong	x	version %d,
+>12	lelong	x	chunk_size %d
+
+# SE Linux policy database
+0	lelong	0xf97cff8c		SE Linux policy
+>16	lelong	x			v%d
+>20	lelong	1			MLS
+>24	lelong	x			%d symbols
+>28	lelong	x			%d ocons
+
+# LUKS: Linux Unified Key Setup, On-Disk Format, http://luks.endorphin.org/spec
+# Anthon van der Neut (anthon at mnt.org)
+0	string	LUKS\xba\xbe	LUKS encrypted file,
+>6	beshort x		ver %d
+>8	string	x		[%s,
+>40	string	x		%s,
+>72	string	x		%s]
+>168	string	x		UUID: %s
+
+
+# Summary: Xen saved domain file
+# Created by: Radek Vokal <rvokal at redhat.com>
+0	string		LinuxGuestRecord	Xen saved domain
+>20	search/256	(name			
+>>&1	string		x			(name %s)
+
+
+#------------------------------------------------------------------------------
+# $File: linux,v 1.33 2009/10/23 16:44:59 christos Exp $
+# linux:  file(1) magic for Linux files
+#
+# Values for Linux/i386 binaries, from Daniel Quinlan <quinlan at yggdrasil.com>
+# The following basic Linux magic is useful for reference, but using
+# "long" magic is a better practice in order to avoid collisions.
+#
+# 2	leshort		100		Linux/i386
+# >0	leshort		0407		impure executable (OMAGIC)
+# >0	leshort		0410		pure executable (NMAGIC)
+# >0	leshort		0413		demand-paged executable (ZMAGIC)
+# >0	leshort		0314		demand-paged executable (QMAGIC)
+#
+0	lelong		0x00640107	Linux/i386 impure executable (OMAGIC)
+>16	lelong		0		\b, stripped
+0	lelong		0x00640108	Linux/i386 pure executable (NMAGIC)
+>16	lelong		0		\b, stripped
+0	lelong		0x0064010b	Linux/i386 demand-paged executable (ZMAGIC)
+>16	lelong		0		\b, stripped
+0	lelong		0x006400cc	Linux/i386 demand-paged executable (QMAGIC)
+>16	lelong		0		\b, stripped
+#
+0	string		\007\001\000	Linux/i386 object file
+>20	lelong		>0x1020		\b, DLL library
+# Linux-8086 stuff:
+0	string		\01\03\020\04	Linux-8086 impure executable
+>28	long		!0		not stripped
+0	string		\01\03\040\04	Linux-8086 executable
+>28	long		!0		not stripped
+#
+0	string		\243\206\001\0	Linux-8086 object file
+#
+0	string		\01\03\020\20	Minix-386 impure executable
+>28	long		!0		not stripped
+0	string		\01\03\040\20	Minix-386 executable
+>28	long		!0		not stripped
+# core dump file, from Bill Reynolds <bill at goshawk.lanl.gov>
+216	lelong		0421		Linux/i386 core file
+>220	string		>\0		of '%s'
+>200	lelong		>0		(signal %d)
+#
+# LILO boot/chain loaders, from Daniel Quinlan <quinlan at yggdrasil.com>
+# this can be overridden by the DOS executable (COM) entry
+2	string		LILO		Linux/i386 LILO boot/chain loader
+#
+# PSF fonts, from H. Peter Anvin <hpa at yggdrasil.com>
+0	leshort		0x0436		Linux/i386 PC Screen Font data,
+>2	byte		0		256 characters, no directory,
+>2	byte		1		512 characters, no directory,
+>2	byte		2		256 characters, Unicode directory,
+>2	byte		3		512 characters, Unicode directory,
+>3	byte		>0		8x%d
+# Linux swap file, from Daniel Quinlan <quinlan at yggdrasil.com>
+4086	string		SWAP-SPACE	Linux/i386 swap file
+# From: Jeff Bailey <jbailey at ubuntu.com>
+# Linux swap file with swsusp1 image, from Jeff Bailey <jbailey at ubuntu.com>
+4076	string		SWAPSPACE2S1SUSPEND	Linux/i386 swap file (new style) with SWSUSP1 image
+# according to man page of mkswap (8) March 1999
+4086	string		SWAPSPACE2	Linux/i386 swap file (new style)
+>0x400	long		x		%d (4K pages)
+>0x404	long		x		size %d pages
+>>4086	string		SWAPSPACE2	
+>>>1052	string		>\0		Label %s
+# From Daniel Novotny <dnovotny at redhat.com>
+# swap file for PowerPC
+65526	string		SWAPSPACE2	Linux/ppc swap file
+# ECOFF magic for OSF/1 and Linux (only tested under Linux though)
+#
+#	from Erik Troan (ewt at redhat.com) examining od dumps, so this
+#		could be wrong
+#      updated by David Mosberger (davidm at azstarnet.com) based on
+#      GNU BFD and MIPS info found below.
+#
+0	leshort		0x0183		ECOFF alpha
+>24	leshort		0407		executable
+>24	leshort		0410		pure
+>24	leshort		0413		demand paged
+>8	long		>0		not stripped
+>8	long		0		stripped
+>23	leshort		>0		- version %ld.
+#
+# Linux kernel boot images, from Albert Cahalan <acahalan at cs.uml.edu>
+# and others such as Axel Kohlmeyer <akohlmey at rincewind.chemie.uni-ulm.de>
+# and Nicol�s Lichtmaier <nick at debian.org>
+# All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
+# Linux kernel boot images (i386 arch) (Wolfram Kleff)
+514	string		HdrS		Linux kernel
+>510	leshort		0xAA55		x86 boot executable
+>>518	leshort		>0x1ff
+>>>529	byte		0		zImage,
+>>>529	byte		1		bzImage,
+>>>(526.s+0x200) string	>\0		version %s,
+>>498	leshort		1		RO-rootFS,
+>>498	leshort		0		RW-rootFS,
+>>508	leshort		>0		root_dev 0x%X,
+>>502	leshort		>0		swap_dev 0x%X,
+>>504	leshort		>0		RAMdisksize %u KB,
+>>506	leshort		0xFFFF		Normal VGA
+>>506	leshort		0xFFFE		Extended VGA
+>>506	leshort		0xFFFD		Prompt for Videomode
+>>506	leshort		>0		Video mode %d
+# This also matches new kernels, which were caught above by "HdrS".
+0		belong	0xb8c0078e	Linux kernel
+>0x1e3		string	Loading		version 1.3.79 or older
+>0x1e9		string	Loading		from prehistoric times
+
+# System.map files - Nicol�s Lichtmaier <nick at debian.org>
+8	search/1	\ A\ _text	Linux kernel symbol map text
+
+# LSM entries - Nicol�s Lichtmaier <nick at debian.org>
+0	search/1	Begin3	Linux Software Map entry text
+0	search/1	Begin4	Linux Software Map entry text (new format)
+
+# From Matt Zimmerman, enhanced for v3 by Matthew Palmer
+0	belong	0x4f4f4f4d	User-mode Linux COW file
+>4	belong	<3		\b, version %d
+>>8	string	>\0		\b, backing file %s
+>4	belong	>2		\b, version %d
+>>32	string	>\0		\b, backing file %s
+
+############################################################################
+# Linux kernel versions
+
+0		string		\xb8\xc0\x07\x8e\xd8\xb8\x00\x90	Linux
+>497		leshort		0		x86 boot sector
+>>514		belong		0x8e	of a kernel from the dawn of time!
+>>514		belong		0x908ed8b4	version 0.99-1.1.42
+>>514		belong		0x908ed8b8	for memtest86
+
+>497		leshort		!0		x86 kernel
+>>504		leshort		>0		RAMdisksize=%u KB
+>>502		leshort		>0		swap=0x%X
+>>508		leshort		>0		root=0x%X
+>>>498		leshort		1		\b-ro
+>>>498		leshort		0		\b-rw
+>>506		leshort		0xFFFF		vga=normal
+>>506		leshort		0xFFFE		vga=extended
+>>506		leshort		0xFFFD		vga=ask
+>>506		leshort		>0		vga=%d
+>>514		belong		0x908ed881	version 1.1.43-1.1.45
+>>514		belong		0x15b281cd
+>>>0xa8e	belong		0x55AA5a5a	version 1.1.46-1.2.13,1.3.0
+>>>0xa99	belong		0x55AA5a5a	version 1.3.1,2
+>>>0xaa3	belong		0x55AA5a5a	version 1.3.3-1.3.30
+>>>0xaa6	belong		0x55AA5a5a	version 1.3.31-1.3.41
+>>>0xb2b	belong		0x55AA5a5a	version 1.3.42-1.3.45
+>>>0xaf7	belong		0x55AA5a5a	version 1.3.46-1.3.72
+>>514		string		HdrS
+>>>518		leshort		>0x1FF
+>>>>529		byte		0		\b, zImage
+>>>>529		byte		1		\b, bzImage
+>>>>(526.s+0x200) string 	>\0		\b, version %s
+
+# Linux boot sector thefts.
+0		belong		0xb8c0078e	Linux
+>0x1e6		belong		0x454c4b53	ELKS Kernel
+>0x1e6		belong		!0x454c4b53	style boot sector
+
+############################################################################
+# Linux 8086 executable
+0	lelong&0xFF0000FF 0xC30000E9	Linux-Dev86 executable, headerless
+>5	string		.		
+>>4	string		>\0		\b, libc version %s
+
+0	lelong&0xFF00FFFF 0x4000301	Linux-8086 executable
+>2	byte&0x01	!0		\b, unmapped zero page
+>2	byte&0x20	0		\b, impure
+>2	byte&0x20	!0
+>>2	byte&0x10	!0		\b, A_EXEC
+>2	byte&0x02	!0		\b, A_PAL
+>2	byte&0x04	!0		\b, A_NSYM
+>2	byte&0x08	!0		\b, A_STAND
+>2	byte&0x40	!0		\b, A_PURE
+>2	byte&0x80	!0		\b, A_TOVLY
+>28     long            !0              \b, not stripped
+>37	string		.		
+>>36	string		>\0		\b, libc version %s
+
+# 0	lelong&0xFF00FFFF 0x10000301	ld86 I80386 executable
+# 0	lelong&0xFF00FFFF 0xB000301	ld86 M68K executable
+# 0	lelong&0xFF00FFFF 0xC000301	ld86 NS16K executable
+# 0	lelong&0xFF00FFFF 0x17000301	ld86 SPARC executable
+
+# SYSLINUX boot logo files (from 'ppmtolss16' sources)
+# http://syslinux.zytor.com/
+#
+0	lelong	=0x1413f33d		SYSLINUX' LSS16 image data
+>4	leshort	x			\b, width %d
+>6	leshort	x			\b, height %d
+
+0	string	OOOM			User-Mode-Linux's Copy-On-Write disk image
+>4	belong	x			version %d
+
+# SE Linux policy database
+# From: Mike Frysinger <vapier at gentoo.org>
+0	lelong	0xf97cff8c		SE Linux policy
+>16	lelong	x			v%d
+>20	lelong	1			MLS
+>24	lelong	x			%d symbols
+>28	lelong	x			%d ocons
+
+# Linux Logical Volume Manager (LVM) 
+# Emmanuel VARAGNAT <emmanuel.varagnat at guzu.net>
+#
+# System ID, UUID and volume group name are 128 bytes long
+# but they should never be full and initialized with zeros...
+#
+# LVM1
+#
+0x0	string	HM\001		LVM1 (Linux Logical Volume Manager), version 1
+>0x12c	string	>\0		, System ID: %s
+
+0x0	string	HM\002		LVM1 (Linux Logical Volume Manager), version 2
+>0x12c	string	>\0		, System ID: %s
+
+#  LVM2
+#
+# It seems that the label header can be in one the four first sector
+# of the disk... (from _find_labeller in lib/label/label.c of LVM2)
+#
+# 0x200 seems to be the common case
+
+0x218		 string	LVM2\ 001	LVM2 (Linux Logical Volume Manager)
+# read the offset to add to the start of the header, and the header
+# start in 0x200
+>(0x214.l+0x200) string	>\0		, UUID: %s
+
+0x018		 string	LVM2\ 001	LVM2 (Linux Logical Volume Manager)
+>(0x014.l)	 string	>\0		, UUID: %s
+
+0x418		 string	LVM2\ 001	LVM2 (Linux Logical Volume Manager)
+>(0x414.l+0x400) string	>\0		, UUID: %s
+
+0x618		 string	LVM2\ 001	LVM2 (Linux Logical Volume Manager)
+>(0x614.l+0x600) string	>\0		, UUID: %s
+
+# LVM snapshot
+# from Jason Farrel
+0	string	SnAp	LVM Snapshot (CopyOnWrite store)
+>4	lelong	!0	- valid,
+>4	lelong	0	- invalid,
+>8	lelong	x	version %d,
+>12	lelong	x	chunk_size %d
+
+# SE Linux policy database
+0	lelong	0xf97cff8c		SE Linux policy
+>16	lelong	x			v%d
+>20	lelong	1			MLS
+>24	lelong	x			%d symbols
+>28	lelong	x			%d ocons
+
+# LUKS: Linux Unified Key Setup, On-Disk Format, http://luks.endorphin.org/spec
+# Anthon van der Neut (anthon at mnt.org)
+0	string	LUKS\xba\xbe	LUKS encrypted file,
+>6	beshort x		ver %d
+>8	string	x		[%s,
+>40	string	x		%s,
+>72	string	x		%s]
+>168	string	x		UUID: %s
+
+
+# Summary: Xen saved domain file
+# Created by: Radek Vokal <rvokal at redhat.com>
+0	string		LinuxGuestRecord	Xen saved domain
+>20	search/256	(name			
+>>&1	string		x			(name %s)
+
+
+#------------------------------------------------------------------------------
+# $File: lisp,v 1.23 2009/09/19 16:28:10 christos Exp $
+# lisp:  file(1) magic for lisp programs
+#
+# various lisp types, from Daniel Quinlan (quinlan at yggdrasil.com)
+
+# updated by Joerg Jenderek
+# GRR: This lot is too weak
+#0	string	;;			
+# windows INF files often begin with semicolon and use CRLF as line end
+# lisp files are mainly created on unix system with LF as line end
+#>2	search/4096	!\r		Lisp/Scheme program text
+#>2	search/4096	\r		Windows INF file
+
+0	search/4096	(setq\ 			Lisp/Scheme program text
+!:mime	text/x-lisp
+0	search/4096	(defvar\ 		Lisp/Scheme program text
+!:mime	text/x-lisp
+0	search/4096	(defparam\ 		Lisp/Scheme program text
+!:mime	text/x-lisp
+0	search/4096	(defun\  		Lisp/Scheme program text
+!:mime	text/x-lisp
+0	search/4096	(autoload\ 		Lisp/Scheme program text
+!:mime	text/x-lisp
+0	search/4096	(custom-set-variables\ 	Lisp/Scheme program text
+!:mime	text/x-lisp
+
+# Emacs 18 - this is always correct, but not very magical.
+0	string	\012(			Emacs v18 byte-compiled Lisp data
+!:mime	application/x-elc
+# Emacs 19+ - ver. recognition added by Ian Springer
+# Also applies to XEmacs 19+ .elc files; could tell them apart with regexs
+# - Chris Chittleborough <cchittleborough at yahoo.com.au>
+0	string	;ELC	
+>4	byte	>18			
+>4	byte    <32			Emacs/XEmacs v%d byte-compiled Lisp data
+!:mime	application/x-elc		
+
+# Files produced by CLISP Common Lisp From: Bruno Haible <haible at ilog.fr>
+0	string	(SYSTEM::VERSION\040'	CLISP byte-compiled Lisp program (pre 2004-03-27)
+0	string	(|SYSTEM|::|VERSION|\040'	CLISP byte-compiled Lisp program text
+
+0	long	0x70768BD2		CLISP memory image data
+0	long	0xD28B7670		CLISP memory image data, other endian
+
+#.com and .bin for MIT scheme 
+0	string	\372\372\372\372	MIT scheme (library?)
+
+# From: David Allouche <david at allouche.net>
+0	search/1	\<TeXmacs|	TeXmacs document text
+!:mime	text/texmacs
+
+#------------------------------------------------------------------------------
+# $File: llvm,v 1.4 2009/09/19 16:28:10 christos Exp $
+# llvm:  file(1) magic for LLVM byte-codes
+# URL:  http://llvm.cs.uiuc.edu/docs/BytecodeFormat.html#signature
+# From: Al Stone <ahs3 at fc.hp.com>
+
+0	string	llvm	LLVM byte-codes, uncompressed
+0	string	llvc0	LLVM byte-codes, null compression
+0	string	llvc1	LLVM byte-codes, gzip compression
+0	string	llvc2	LLVM byte-codes, bzip2 compression
+
+#------------------------------------------------------------------------------
+# $File: lua,v 1.5 2009/09/19 16:28:10 christos Exp $
+# lua:  file(1) magic for Lua scripting language
+# URL:  http://www.lua.org/
+# From: Reuben Thomas <rrt at sc3d.org>, Seo Sanghyeon <tinuviel at sparcs.kaist.ac.kr>
+
+# Lua scripts
+0	search/1/w	#!\ /usr/bin/lua	Lua script text executable
+!:mime	text/x-lua
+0	search/1/w	#!\ /usr/local/bin/lua	Lua script text executable
+!:mime	text/x-lua
+0	search/1	#!/usr/bin/env\ lua	Lua script text executable
+!:mime	text/x-lua
+0	search/1	#!\ /usr/bin/env\ lua	Lua script text executable
+!:mime	text/x-lua
+
+# Lua bytecode
+0	string		\033Lua			Lua bytecode,
+>4	byte		0x50			version 5.0
+>4	byte		0x51			version 5.1
+
+#------------------------------------------------------------------------------
+# $File: luks,v 1.4 2009/09/19 16:28:10 christos Exp $
+# luks:  file(1) magic for Linux Unified Key Setup
+# URL:	http://luks.endorphin.org/spec
+# From:	Anthon van der Neut <anthon at mnt.org>
+
+0	string		LUKS\xba\xbe	LUKS encrypted file,
+>6	beshort		x		ver %d
+>8	string		x		[%s,
+>40	string		x		%s,
+>72	string		x		%s]
+>168	string		x		UUID: %s
+
+#------------------------------------------------------------
+# $File: mach,v 1.9 2009/09/19 16:28:10 christos Exp $
+# Mach has two magic numbers, 0xcafebabe and 0xfeedface.
+# Unfortunately the first, cafebabe, is shared with
+# Java ByteCode, so they are both handled in the file "cafebabe".
+# The "feedface" ones are handled herein.
+#------------------------------------------------------------
+0	lelong&0xfffffffe	0xfeedface	Mach-O
+>0	byte		0xcf		64-bit
+>12	lelong		1		object
+>12	lelong		2		executable
+>12	lelong		3		fixed virtual memory shared library
+>12	lelong		4		core
+>12	lelong		5		preload executable
+>12	lelong		6		dynamically linked shared library
+>12	lelong		7		dynamic linker
+>12	lelong		8		bundle
+>12	lelong		9		dynamically linked shared library stub
+>12	lelong		>9
+>>12	lelong		x		filetype=%ld
+>4	lelong		<0
+>>4	lelong		x		architecture=%ld
+>4	lelong		1		vax
+>4	lelong		2		romp
+>4	lelong		3		architecture=3
+>4	lelong		4		ns32032
+>4	lelong		5		ns32332
+>4	lelong		6		m68k
+>4	lelong		7		i386
+>4	lelong		8		mips
+>4	lelong		9		ns32532
+>4	lelong		10		architecture=10
+>4	lelong		11		hppa
+>4	lelong		12		acorn
+>4	lelong		13		m88k
+>4	lelong		14		sparc
+>4	lelong		15		i860-big
+>4	lelong		16		i860
+>4	lelong		17		rs6000
+>4	lelong		18		ppc
+>4	lelong		16777234	ppc64
+>4	lelong		>16777234
+>>4	lelong		x		architecture=%ld
+#
+0	belong&0xfffffffe	0xfeedface	Mach-O
+>3	byte		0xcf		64-bit
+>12	belong		1		object
+>12	belong		2		executable
+>12	belong		3		fixed virtual memory shared library
+>12	belong		4		core
+>12	belong		5		preload executable
+>12	belong		6               dynamically linked shared library
+>12	belong		7               dynamic linker
+>12	belong		8		bundle
+>12	belong		9		dynamically linked shared library stub
+>12	belong		>9
+>>12	belong		x		filetype=%ld
+>4	belong		<0
+>>4	belong		x		architecture=%ld
+>4	belong		1		vax
+>4	belong		2		romp
+>4	belong		3		architecture=3
+>4	belong		4		ns32032
+>4	belong		5		ns32332
+>4	belong		6		for m68k architecture
+# from NeXTstep 3.0 <mach/machine.h>
+# i.e. mc680x0_all, ignore
+# >>8	belong		1		(mc68030)
+>>8	belong		2		(mc68040)
+>>8	belong		3		(mc68030 only)
+>4	belong		7		i386
+>4	belong		8		mips
+>4	belong		9		ns32532
+>4	belong		10		architecture=10
+>4	belong		11		hppa
+>4	belong		12		acorn
+>4	belong		13		m88k
+>4	belong		14		sparc
+>4	belong		15		i860-big
+>4	belong		16		i860
+>4	belong		17		rs6000
+>4	belong		18		ppc
+>4	belong		16777234	ppc64
+>4	belong		>16777234
+>>4	belong		x		architecture=%ld
+
+#------------------------------------------------------------------------------
+# $File: macintosh,v 1.20 2009/09/19 16:28:10 christos Exp $
+# macintosh description
+#
+# BinHex is the Macintosh ASCII-encoded file format (see also "apple")
+# Daniel Quinlan, quinlan at yggdrasil.com
+11	string	must\ be\ converted\ with\ BinHex	BinHex binary text
+!:mime	application/mac-binhex40
+>41	string	x					\b, version %.3s
+
+# Stuffit archives are the de facto standard of compression for Macintosh
+# files obtained from most archives. (franklsm at tuns.ca)
+0	string		SIT!			StuffIt Archive (data)
+!:mime	application/x-stuffit
+!:apple	SIT!SIT!
+>2	string		x			: %s
+0	string		SITD			StuffIt Deluxe (data)
+>2	string		x			: %s
+0	string		Seg			StuffIt Deluxe Segment (data)
+>2	string		x			: %s
+
+# Newer StuffIt archives (grant at netbsd.org)
+0	string		StuffIt			StuffIt Archive
+!:mime	application/x-stuffit
+!:apple	SIT!SIT!
+#>162	string		>0			: %s
+
+# Macintosh Applications and Installation binaries (franklsm at tuns.ca)
+# GRR: Too weak
+#0	string		APPL			Macintosh Application (data)
+#>2	string		x			\b: %s
+
+# Macintosh System files (franklsm at tuns.ca)
+# GRR: Too weak
+#0	string		zsys			Macintosh System File (data)
+#0	string		FNDR			Macintosh Finder (data)
+#0	string		libr			Macintosh Library (data)
+#>2	string		x			: %s
+#0	string		shlb			Macintosh Shared Library (data)
+#>2	string		x			: %s
+#0	string		cdev			Macintosh Control Panel (data)
+#>2	string		x			: %s
+#0	string		INIT			Macintosh Extension (data)
+#>2	string		x			: %s
+#0	string		FFIL			Macintosh Truetype Font (data)
+#>2	string		x			: %s
+#0	string		LWFN			Macintosh Postscript Font (data)
+#>2	string		x			: %s
+
+# Additional Macintosh Files (franklsm at tuns.ca)
+# GRR: Too weak
+#0	string		PACT			Macintosh Compact Pro Archive (data)
+#>2	string		x			: %s
+#0	string		ttro			Macintosh TeachText File (data)
+#>2	string		x			: %s
+#0	string		TEXT			Macintosh TeachText File (data)
+#>2	string		x			: %s
+#0	string		PDF			Macintosh PDF File (data)
+#>2	string		x			: %s
+
+# MacBinary format (Eric Fischer, enf at pobox.com)
+#
+# Unfortunately MacBinary doesn't really have a magic number prior
+# to the MacBinary III format.  The checksum is really the way to
+# do it, but the magic file format isn't up to the challenge.
+#
+# 0	byte		0
+# 1	byte				# filename length
+# 2	string				# filename
+# 65    string				# file type
+# 69	string				# file creator
+# 73	byte				# Finder flags
+# 74	byte		0
+# 75	beshort				# vertical posn in window
+# 77	beshort				# horiz posn in window
+# 79	beshort				# window or folder ID
+# 81    byte				# protected?
+# 82	byte		0
+# 83	belong				# length of data segment
+# 87	belong				# length of resource segment
+# 91	belong				# file creation date
+# 95	belong				# file modification date
+# 99	beshort				# length of comment after resource
+# 101	byte				# new Finder flags
+# 102	string		mBIN		# (only in MacBinary III)
+# 106	byte				# char. code of file name
+# 107	byte				# still more Finder flags
+# 116	belong				# total file length
+# 120	beshort				# length of add'l header
+# 122	byte		129		# for MacBinary II
+# 122	byte		130		# for MacBinary III
+# 123	byte		129		# minimum version that can read fmt
+# 124	beshort				# checksum
+#
+# This attempts to use the version numbers as a magic number, requiring
+# that the first one be 0x80, 0x81, 0x82, or 0x83, and that the second
+# be 0x81.  This works for the files I have, but maybe not for everyone's.
+
+# Unfortunately, this magic is quite weak - MPi
+#122	beshort&0xFCFF	0x8081		Macintosh MacBinary data
+
+# MacBinary I doesn't have the version number field at all, but MacBinary II
+# has been in use since 1987 so I hope there aren't many really old files
+# floating around that this will miss.  The original spec calls for using
+# the nulls in 0, 74, and 82 as the magic number.
+#
+# Another possibility, that would also work for MacBinary I, is to use
+# the assumption that 65-72 will all be ASCII (0x20-0x7F), that 73 will
+# have bits 1 (changed), 2 (busy), 3 (bozo), and 6 (invisible) unset,
+# and that 74 will be 0.  So something like
+# 
+# 71 	belong&0x80804EFF 0x00000000 	Macintosh MacBinary data
+# 
+# >73	byte&0x01	0x01		\b, inited
+# >73	byte&0x02	0x02		\b, changed
+# >73	byte&0x04	0x04		\b, busy
+# >73	byte&0x08	0x08		\b, bozo
+# >73	byte&0x10	0x10		\b, system
+# >73	byte&0x10	0x20		\b, bundle
+# >73	byte&0x10	0x40		\b, invisible
+# >73	byte&0x10	0x80		\b, locked
+
+#>65	string		x		\b, type "%4.4s"
+
+#>65	string		8BIM		(PhotoShop)
+#>65	string		ALB3		(PageMaker 3)
+#>65	string		ALB4		(PageMaker 4)
+#>65	string		ALT3		(PageMaker 3)
+#>65	string		APPL		(application)
+#>65	string		AWWP		(AppleWorks word processor)
+#>65	string		CIRC		(simulated circuit)
+#>65	string		DRWG		(MacDraw)
+#>65	string		EPSF		(Encapsulated PostScript)
+#>65	string		FFIL		(font suitcase)
+#>65	string		FKEY		(function key)
+#>65	string		FNDR		(Macintosh Finder)
+#>65	string		GIFf		(GIF image)
+#>65	string		Gzip		(GNU gzip)
+#>65	string		INIT		(system extension)
+#>65	string		LIB\ 		(library)
+#>65	string		LWFN		(PostScript font)
+#>65	string		MSBC		(Microsoft BASIC)
+#>65	string		PACT		(Compact Pro archive)
+#>65	string		PDF\ 		(Portable Document Format)
+#>65	string		PICT		(picture)
+#>65	string		PNTG		(MacPaint picture)
+#>65	string		PREF		(preferences)
+#>65	string		PROJ		(Think C project)
+#>65	string		QPRJ		(Think Pascal project)
+#>65	string		SCFL		(Defender scores)
+#>65	string		SCRN		(startup screen)
+#>65	string		SITD		(StuffIt Deluxe)
+#>65	string		SPn3		(SuperPaint)
+#>65	string		STAK		(HyperCard stack)
+#>65	string		Seg\ 		(StuffIt segment)
+#>65	string		TARF		(Unix tar archive)
+#>65	string		TEXT		(ASCII)
+#>65	string		TIFF		(TIFF image)
+#>65	string		TOVF		(Eudora table of contents)
+#>65	string		WDBN		(Microsoft Word word processor)
+#>65	string		WORD		(MacWrite word processor)
+#>65	string		XLS\ 		(Microsoft Excel)
+#>65	string		ZIVM		(compress (.Z))
+#>65	string		ZSYS		(Pre-System 7 system file)
+#>65	string		acf3		(Aldus FreeHand)
+#>65	string		cdev		(control panel)
+#>65	string		dfil		(Desk Acessory suitcase)
+#>65	string		libr		(library)
+#>65	string		nX^d		(WriteNow word processor)
+#>65	string		nX^w		(WriteNow dictionary)
+#>65	string		rsrc		(resource)
+#>65	string		scbk		(Scrapbook)
+#>65	string		shlb		(shared library)
+#>65	string		ttro		(SimpleText read-only)
+#>65	string		zsys		(system file)
+
+#>69	string		x		\b, creator "%4.4s"
+
+# Somewhere, Apple has a repository of registered Creator IDs.  These are
+# just the ones that I happened to have files from and was able to identify.
+
+#>69	string		8BIM		(Adobe Photoshop)
+#>69	string		ALD3		(PageMaker 3)
+#>69	string		ALD4		(PageMaker 4)
+#>69	string		ALFA		(Alpha editor)
+#>69	string		APLS		(Apple Scanner)
+#>69	string		APSC		(Apple Scanner)
+#>69	string		BRKL		(Brickles)
+#>69	string		BTFT		(BitFont)
+#>69	string		CCL2 		(Common Lisp 2)
+#>69	string		CCL\ 		(Common Lisp)
+#>69	string		CDmo		(The Talking Moose)
+#>69	string		CPCT		(Compact Pro)
+#>69	string		CSOm		(Eudora)
+#>69	string		DMOV		(Font/DA Mover)
+#>69	string		DSIM		(DigSim)
+#>69	string		EDIT		(Macintosh Edit)
+#>69	string		ERIK		(Macintosh Finder)
+#>69	string		EXTR		(self-extracting archive)
+#>69	string		Gzip		(GNU gzip)
+#>69	string		KAHL		(Think C)
+#>69	string		LWFU		(LaserWriter Utility)
+#>69	string		LZIV		(compress)
+#>69	string		MACA		(MacWrite)
+#>69	string		MACS		(Macintosh operating system)
+#>69	string		MAcK		(MacKnowledge terminal emulator)
+#>69	string		MLND		(Defender)
+#>69	string		MPNT		(MacPaint)
+#>69	string		MSBB		(Microsoft BASIC (binary))
+#>69	string		MSWD		(Microsoft Word)
+#>69	string		NCSA		(NCSA Telnet)
+#>69	string		PJMM		(Think Pascal)
+#>69	string		PSAL		(Hunt the Wumpus)
+#>69	string		PSI2		(Apple File Exchange)
+#>69	string		R*ch		(BBEdit)
+#>69	string		RMKR		(Resource Maker)
+#>69	string		RSED		(Resource Editor)
+#>69	string		Rich		(BBEdit)
+#>69	string		SIT!		(StuffIt)
+#>69	string		SPNT		(SuperPaint)
+#>69	string		Unix		(NeXT Mac filesystem)
+#>69	string		VIM!		(Vim editor)
+#>69	string		WILD		(HyperCard)
+#>69	string		XCEL		(Microsoft Excel)
+#>69	string		aCa2		(Fontographer)
+#>69	string		aca3		(Aldus FreeHand)
+#>69	string		dosa		(Macintosh MS-DOS file system)
+#>69	string		movr		(Font/DA Mover)
+#>69	string		nX^n		(WriteNow)
+#>69	string		pdos		(Apple ProDOS file system)
+#>69	string		scbk		(Scrapbook)
+#>69	string		ttxt		(SimpleText)
+#>69	string		ufox		(Foreign File Access)
+
+# Just in case...
+
+102	string		mBIN		MacBinary III data with surprising version number
+
+# sas magic from Bruce Foster (bef at nwu.edu)
+#
+#0	string		SAS		SAS
+#>8	string		x		%s
+0	string		SAS		SAS
+>24	string		DATA		data file
+>24	string		CATALOG		catalog
+>24	string		INDEX		data file index
+>24	string		VIEW		data view
+# sas 7+ magic from Reinhold Koch (reinhold.koch at roche.com)
+#
+0x54    string          SAS             SAS 7+
+>0x9C   string          DATA            data file
+>0x9C   string          CATALOG         catalog
+>0x9C   string          INDEX           data file index
+>0x9C   string          VIEW            data view
+
+# spss magic for SPSS system and portable files, 
+#	 from Bruce Foster (bef at nwu.edu).
+
+0	long		0xc1e2c3c9	SPSS Portable File
+>40	string 		x		%s
+
+0	string		$FL2		SPSS System File
+>24	string		x		%s
+
+# Macintosh filesystem data
+# From "Tom N Harris" <telliamed at mac.com>
+# Fixed HFS+ and Partition map magic: Ethan Benson <erbenson at alaska.net>
+# The MacOS epoch begins on 1 Jan 1904 instead of 1 Jan 1970, so these
+# entries depend on the data arithmetic added after v.35
+# There's also some Pascal strings in here, ditto...
+
+# The boot block signature, according to IM:Files, is 
+# "for HFS volumes, this field always contains the value 0x4C4B."
+# But if this is true for MFS or HFS+ volumes, I don't know.
+# Alternatively, the boot block is supposed to be zeroed if it's
+# unused, so a simply >0 should suffice.
+
+0x400	beshort			0xD2D7		Macintosh MFS data
+>0	beshort			0x4C4B		(bootable)
+>0x40a	beshort			&0x8000		(locked)
+>0x402	beldate-0x7C25B080	x		created: %s,
+>0x406	beldate-0x7C25B080	>0		last backup: %s,
+>0x414	belong			x		block size: %d,
+>0x412	beshort			x		number of blocks: %d,
+>0x424	pstring			x		volume name: %s
+
+# "BD" is has many false positives
+#0x400	beshort			0x4244		Macintosh HFS data
+#>0	beshort			0x4C4B		(bootable)
+#>0x40a	beshort			&0x8000		(locked)
+#>0x40a	beshort			^0x0100		(mounted)
+#>0x40a	beshort			&0x0200		(spared blocks)
+#>0x40a	beshort			&0x0800		(unclean)
+#>0x47C	beshort			0x482B		(Embedded HFS+ Volume)
+#>0x402	beldate-0x7C25B080	x		created: %s,
+#>0x406	beldate-0x7C25B080	x		last modified: %s,
+#>0x440	beldate-0x7C25B080	>0		last backup: %s,
+#>0x414	belong			x		block size: %d,
+#>0x412	beshort			x		number of blocks: %d,
+#>0x424	pstring			x		volume name: %s
+
+0x400	beshort			0x482B		Macintosh HFS Extended
+>&0	beshort			x		version %d data
+>0	beshort			0x4C4B		(bootable)
+>0x404	belong			^0x00000100	(mounted)
+>&2	belong			&0x00000200	(spared blocks)
+>&2	belong			&0x00000800	(unclean)
+>&2	belong			&0x00008000	(locked)
+>&6	string			x		last mounted by: '%.4s',
+# really, that should be treated as a belong and we print a string
+# based on the value. TN1150 only mentions '8.10' for "MacOS 8.1"
+>&14	beldate-0x7C25B080	x		created: %s,
+# only the creation date is local time, all other timestamps in HFS+ are UTC.
+>&18	bedate-0x7C25B080	x		last modified: %s,
+>&22	bedate-0x7C25B080	>0		last backup: %s,
+>&26	bedate-0x7C25B080	>0		last checked: %s,
+>&38	belong			x		block size: %d,
+>&42	belong			x		number of blocks: %d,
+>&46	belong			x		free blocks: %d
+
+# I don't think this is really necessary since it doesn't do much and 
+# anything with a valid driver descriptor will also have a valid
+# partition map
+#0		beshort		0x4552		Apple Device Driver data
+#>&24		beshort		=1		\b, MacOS
+
+# Is that the partition type a cstring or a pstring? Well, IM says "strings 
+# shorter than 32 bytes must be terminated with NULL" so I'll treat it as a 
+# cstring. Of course, partitions can contain more than four entries, but 
+# what're you gonna do?
+# GRR: This magic is too weak, it is just "PM"
+#0x200		beshort		0x504D		Apple Partition data
+#>0x2		beshort		x		(block size: %d):
+#>0x230		string		x		first type: %s,
+#>0x210		string		x		name: %s,
+#>0x254		belong		x		number of blocks: %d,
+#>0x400		beshort		0x504D		
+#>>0x430		string		x		second type: %s,
+#>>0x410		string		x		name: %s,
+#>>0x454		belong		x		number of blocks: %d,
+#>>0x600		beshort		0x504D
+#>>>0x630	string		x		third type: %s,
+#>>>0x610	string		x		name: %s,
+#>>>0x654	belong		x		number of blocks: %d,
+#>>0x800		beshort		0x504D		
+#>>>0x830	string		x		fourth type: %s,
+#>>>0x810	string		x		name: %s,
+#>>>0x854	belong		x		number of blocks: %d,
+#>>>0xa00	beshort		0x504D		
+#>>>>0xa30	string		x		fifth type: %s,
+#>>>>0xa10	string		x		name: %s,
+#>>>>0xa54	belong		x		number of blocks: %d
+#>>>0xc00	beshort		0x504D
+#>>>>0xc30	string		x		sixth type: %s,
+#>>>>0xc10	string		x		name: %s,
+#>>>>0xc54	belong		x		number of blocks: %d
+## AFAIK, only the signature is different
+#0x200		beshort		0x5453		Apple Old Partition data
+#>0x2		beshort		x		block size: %d,
+#>0x230		string		x		first type: %s,
+#>0x210		string		x		name: %s,
+#>0x254		belong		x		number of blocks: %d,
+#>0x400		beshort		0x504D		
+#>>0x430		string		x		second type: %s,
+#>>0x410		string		x		name: %s,
+#>>0x454		belong		x		number of blocks: %d,
+#>>0x800		beshort		0x504D		
+#>>>0x830	string		x		third type: %s,
+#>>>0x810	string		x		name: %s,
+#>>>0x854	belong		x		number of blocks: %d,
+#>>>0xa00	beshort		0x504D		
+#>>>>0xa30	string		x		fourth type: %s,
+#>>>>0xa10	string		x		name: %s,
+#>>>>0xa54	belong		x		number of blocks: %d
+
+# From: Remi Mommsen <mommsen at slac.stanford.edu>
+0		string		BOMStore	Mac OS X bill of materials (BOM) file
+
+#------------------------------------------------------------------------------
+# $File: magic,v 1.9 2009/09/19 16:28:10 christos Exp $
+# magic:  file(1) magic for magic files
+#
+0	string		#\ Magic	magic text file for file(1) cmd
+0	lelong		0xF11E041C	magic binary file for file(1) cmd
+>4	lelong		x		(version %d) (little endian)
+0	belong		0xF11E041C	magic binary file for file(1) cmd
+>4	belong		x		(version %d) (big endian)
+
+#------------------------------------------------------------------------------
+# $File: mail.news,v 1.17 2009/09/19 16:28:10 christos Exp $
+# mail.news:  file(1) magic for mail and news
+#
+# Unfortunately, saved netnews also has From line added in some news software.
+#0	string		From 		mail text
+# There are tests to ascmagic.c to cope with mail and news.
+0	string		Relay-Version: 	old news text
+!:mime	message/rfc822
+0	string		#!\ rnews	batched news text
+!:mime	message/rfc822
+0	string		N#!\ rnews	mailed, batched news text
+!:mime	message/rfc822
+0	string		Forward\ to 	mail forwarding text
+!:mime	message/rfc822
+0	string		Pipe\ to 	mail piping text
+!:mime	message/rfc822
+0	string		Return-Path:	smtp mail text
+!:mime	message/rfc822
+0	string		Path:		news text
+!:mime	message/news
+0	string		Xref:		news text
+!:mime	message/news
+0	string		From:		news or mail text
+!:mime	message/rfc822
+0	string		Article 	saved news text
+!:mime	message/news
+0	string		BABYL		Emacs RMAIL text
+0	string		Received:	RFC 822 mail text
+!:mime	message/rfc822
+0	string		MIME-Version:	MIME entity text
+#0	string		Content-	MIME entity text
+
+# TNEF files...
+0	lelong		0x223E9F78	Transport Neutral Encapsulation Format
+
+# From: Kevin Sullivan <ksulliva at psc.edu>
+0	string		*mbx*		MBX mail folder
+
+# From: Simon Matter <simon.matter at invoca.ch>
+0	string		\241\002\213\015skiplist\ file\0\0\0	Cyrus skiplist DB
+
+# JAM(mbp) Fidonet message area databases
+# JHR file
+0	string	JAM\0			JAM message area header file
+>12	leshort >0			(%d messages)
+
+# Squish Fidonet message area databases
+# SQD file (requires at least one message in the area)
+# XXX: Weak magic
+#256	leshort	0xAFAE4453		Squish message area data file
+#>4	leshort	>0			(%d messages)
+
+#0	string		\<!--\ MHonArc		text/html; x-type=mhonarc
+
+#------------------------------------------------------------------------------
+# $File: maple,v 1.6 2009/09/19 16:28:10 christos Exp $
+# maple:  file(1) magic for maple files
+# "H. Nanosecond" <aldomel at ix.netcom.com>
+# Maple V release 4, a multi-purpose math program
+#
+
+# maple library .lib
+0	string	\000MVR4\nI	MapleVr4 library
+
+# .ind
+# no magic for these :-(
+# they are compiled indexes for maple files
+
+# .hdb 
+0	string	\000\004\000\000	Maple help database
+
+# .mhp
+# this has the form <PACKAGE=name>
+0	string	\<PACKAGE=	Maple help file
+0	string	\<HELP\ NAME=	Maple help file
+0	string	\n\<HELP\ NAME=	Maple help file with extra carriage return at start (yuck)
+#0	string	#\ Newton	Maple help file, old style
+0	string	#\ daub	Maple help file, old style
+#0	string	#===========	Maple help file, old style
+
+# .mws
+0	string	\000\000\001\044\000\221	Maple worksheet
+#this is anomalous
+0	string	WriteNow\000\002\000\001\000\000\000\000\100\000\000\000\000\000	Maple worksheet, but weird
+# this has the form {VERSION 2 3 "IBM INTEL NT" "2.3" }\n
+# that is {VERSION major_version miunor_version computer_type version_string}
+0	string	{VERSION\ 	Maple worksheet
+>9	string	>\0	version %.1s.
+>>>11	string	>\0	%.1s
+
+# .mps
+0	string	\0\0\001$	Maple something
+# from byte 4 it is either 'nul E' or 'soh R'
+# I think 'nul E' means a file that was saved as  a different name
+# a sort of revision marking
+# 'soh R' means new 
+>4	string	\000\105	An old revision
+>4	string	\001\122	The latest save
+
+# .mpl
+# some of these are the same as .mps above
+#0000000 000 000 001 044 000 105 same as .mps
+#0000000 000 000 001 044 001 122 same as .mps
+
+0	string	#\n##\ <SHAREFILE=	Maple something
+0	string	\n#\n##\ <SHAREFILE=	Maple something
+0	string	##\ <SHAREFILE=	Maple something
+0	string	#\r##\ <SHAREFILE=	Maple something
+0	string	\r#\r##\ <SHAREFILE=	Maple something
+0	string	#\ \r##\ <DESCRIBE>	Maple something anomalous.
+
+#------------------------------------------------------------------------------
+# $File: mathcad,v 1.5 2009/09/19 16:28:10 christos Exp $
+# mathcad:  file(1) magic for Mathcad documents
+# URL:	http://www.mathsoft.com/
+# From:	Josh Triplett <josh at freedesktop.org>
+
+0	string	.MCAD\t		Mathcad document
+
+#------------------------------------------------------------------------------
+# $File: mathematica,v 1.7 2009/09/19 16:28:10 christos Exp $
+# mathematica:  file(1) magic for mathematica files
+# "H. Nanosecond" <aldomel at ix.netcom.com>
+# Mathematica a multi-purpose math program
+# versions 2.2 and 3.0
+
+#mathematica .mb
+0	string	\064\024\012\000\035\000\000\000	Mathematica version 2 notebook
+0	string	\064\024\011\000\035\000\000\000	Mathematica version 2 notebook
+
+# .ma
+# multiple possibilites:
+
+0	string	(*^\n\n::[\011frontEndVersion\ =\ 	Mathematica notebook
+#>41	string	>\0	%s
+
+#0	string	(*^\n\n::[\011palette	Mathematica notebook version 2.x
+
+#0	string	(*^\n\n::[\011Information	Mathematica notebook version 2.x
+#>675	string	>\0	%s #doesn't work well
+
+# there may be 'cr' instread of 'nl' in some does this matter?
+
+# generic:
+0	string	(*^\r\r::[\011	Mathematica notebook version 2.x
+0	string	(*^\r\n\r\n::[\011	Mathematica notebook version 2.x
+0	string	(*^\015			Mathematica notebook version 2.x
+0	string	(*^\n\r\n\r::[\011	Mathematica notebook version 2.x
+0	string	(*^\r::[\011	Mathematica notebook version 2.x
+0	string	(*^\r\n::[\011	Mathematica notebook version 2.x
+0	string	(*^\n\n::[\011	Mathematica notebook version 2.x
+0	string	(*^\n::[\011	Mathematica notebook version 2.x
+
+
+# Mathematica .mx files
+
+#0	string	(*This\ is\ a\ Mathematica\ binary\ dump\ file.\ It\ can\ be\ loaded\ with\ Get.*)	Mathematica binary file
+0	string	(*This\ is\ a\ Mathematica\ binary\ 	Mathematica binary file
+#>71	string \000\010\010\010\010\000\000\000\000\000\000\010\100\010\000\000\000	
+# >71... is optional
+>88	string	>\0	from %s
+
+
+# Mathematica files PBF:
+# 115 115 101 120 102 106 000 001 000 000 000 203 000 001 000
+0	string	MMAPBF\000\001\000\000\000\203\000\001\000	Mathematica PBF (fonts I think)
+
+# .ml files  These are menu resources I think
+# these start with "[0-9][0-9][0-9]\ A~[0-9][0-9][0-9]\ 
+# how to put that into a magic rule?
+4	string	\ A~	MAthematica .ml file
+
+# .nb files
+#too long 0	string	(***********************************************************************\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Mathematica-Compatible Notebook	Mathematica 3.0 notebook
+0	string	(***********************	Mathematica 3.0 notebook
+
+# other (* matches it is a comment start in these langs
+# GRR: Too weak; also matches other languages e.g. ML
+#0	string	(*	Mathematica, or Pascal, Modula-2 or 3 code text
+
+#########################
+# MatLab v5
+0       string  MATLAB  Matlab v5 mat-file
+>126    short   0x494d  (big endian)
+>>124   beshort x       version 0x%04x
+>126    short   0x4d49  (little endian)
+>>124   leshort x       version 0x%04x
+
+
+#------------------------------------------------------------------------------
+# $File: matroska,v 1.5 2009/09/27 19:02:12 christos Exp $
+# matroska:  file(1) magic for Matroska files
+#
+# See http://www.matroska.org/
+#
+
+# EBML id:
+0		belong		0x1a45dfa3
+# DocType id:
+>5		beshort		0x4282
+# DocType contents:
+>>8		string		matroska	Matroska data
+!:mime  video/x-matroska
+
+# EBML id:
+0		belong		0x1a45dfa3
+# DocType id:
+>0		search/4096 	\x42\x82
+# DocType contents:
+>>&1		string		webm	WebM
+!:mime  video/webm
+
+#------------------------------------------------------------------------------
+# $File: mcrypt,v 1.5 2009/09/19 16:28:10 christos Exp $
+# Mavroyanopoulos Nikos <nmav at hellug.gr>
+# mcrypt:   file(1) magic for mcrypt 2.2.x;
+0	string		\0m\3		mcrypt 2.5 encrypted data,
+>4	string		>\0		algorithm: %s,
+>>&1	leshort		>0		keysize: %d bytes,
+>>>&0	string		>\0		mode: %s,
+
+0	string		\0m\2		mcrypt 2.2 encrypted data,
+>3	byte		0		algorithm: blowfish-448,
+>3	byte		1		algorithm: DES,
+>3	byte		2		algorithm: 3DES,
+>3	byte		3		algorithm: 3-WAY,
+>3	byte		4		algorithm: GOST,
+>3	byte		6		algorithm: SAFER-SK64,
+>3	byte		7		algorithm: SAFER-SK128,
+>3	byte		8		algorithm: CAST-128,
+>3	byte		9		algorithm: xTEA,
+>3	byte		10		algorithm: TWOFISH-128,
+>3	byte		11		algorithm: RC2,
+>3	byte		12		algorithm: TWOFISH-192,
+>3	byte		13		algorithm: TWOFISH-256,
+>3	byte		14		algorithm: blowfish-128,
+>3	byte		15		algorithm: blowfish-192,
+>3	byte		16		algorithm: blowfish-256,
+>3	byte		100		algorithm: RC6,
+>3	byte		101		algorithm: IDEA,
+>4	byte		0		mode: CBC,
+>4	byte		1		mode: ECB,
+>4	byte		2		mode: CFB,
+>4	byte		3		mode: OFB,
+>4	byte		4		mode: nOFB,
+>5	byte		0		keymode: 8bit
+>5	byte		1		keymode: 4bit
+>5	byte		2		keymode: SHA-1 hash
+>5	byte		3		keymode: MD5 hash
+
+#------------------------------------------------------------------------------
+# $File: mercurial,v 1.4 2009/09/19 16:28:10 christos Exp $
+# mercurial:  file(1) magic for Mercurial changeset bundles
+# http://www.selenic.com/mercurial/wiki/
+#
+# Jesse Glick (jesse.glick at sun.com)
+#
+
+0	string		HG10		Mercurial changeset bundle
+>4	string		UN		(uncompressed)
+>4	string		GZ		(gzip compressed)
+>4	string		BZ		(bzip2 compressed)
+
+#------------------------------------------------------------------------------
+# $File: mime,v 1.5 2009/09/19 16:28:10 christos Exp $
+# mime:  file(1) magic for MIME encoded files
+#
+0	string		Content-Type:\ 
+>14	string		>\0		%s
+0	string		Content-Type:
+>13	string		>\0		%s
+
+#------------------------------------------------------------------------------
+# $File: mips,v 1.5 2009/09/19 16:28:10 christos Exp $
+# mips:  file(1) magic for Silicon Graphics (MIPS, IRIS, IRIX, etc.)
+#                         Dec Ultrix (MIPS)
+# all of SGI's *current* machines and OSes run in big-endian mode on the
+# MIPS machines, as far as I know.
+#
+# XXX - what is the blank "-" line?
+#
+# kbd file definitions
+0	string	kbd!map		kbd map file
+>8	byte	>0		Ver %d:
+>10	short	>0		with %d table(s)
+0	belong	0407		old SGI 68020 executable
+0	belong	0410		old SGI 68020 pure executable
+0	beshort	0x8765		disk quotas file
+0	beshort	0x0506		IRIS Showcase file
+>2	byte	0x49		-
+>3	byte	x		- version %ld
+0	beshort	0x0226		IRIS Showcase template
+>2	byte	0x63		-
+>3	byte	x		- version %ld
+0	belong	0x5343464d	IRIS Showcase file
+>4	byte	x		- version %ld
+0	belong	0x5443464d	IRIS Showcase template
+>4	byte	x		- version %ld
+0	belong	0xdeadbabe	IRIX Parallel Arena
+>8	belong	>0		- version %ld
+#
+0	beshort	0x0160		MIPSEB ECOFF executable
+>20	beshort	0407		(impure)
+>20	beshort	0410		(swapped)
+>20	beshort	0413		(paged)
+>8	belong	>0		not stripped
+>8	belong	0		stripped
+>22	byte	x		- version %ld
+>23	byte	x		.%ld
+#
+0	beshort	0x0162		MIPSEL-BE ECOFF executable
+>20	beshort	0407		(impure)
+>20	beshort	0410		(swapped)
+>20	beshort	0413		(paged)
+>8	belong	>0		not stripped
+>8	belong	0		stripped
+>23	byte	x		- version %d
+>22	byte	x		.%ld
+#
+0	beshort	0x6001		MIPSEB-LE ECOFF executable
+>20	beshort	03401		(impure)
+>20	beshort	04001		(swapped)
+>20	beshort	05401		(paged)
+>8	belong	>0		not stripped
+>8	belong	0		stripped
+>23	byte	x		- version %d
+>22	byte	x		.%ld
+#
+0	beshort	0x6201		MIPSEL ECOFF executable
+>20	beshort	03401		(impure)
+>20	beshort	04001		(swapped)
+>20	beshort	05401		(paged)
+>8	belong	>0		not stripped
+>8	belong	0		stripped
+>23	byte	x		- version %ld
+>22	byte	x		.%ld
+#
+# MIPS 2 additions
+#
+0	beshort	0x0163		MIPSEB MIPS-II ECOFF executable
+>20	beshort	0407		(impure)
+>20	beshort	0410		(swapped)
+>20	beshort	0413		(paged)
+>8	belong	>0		not stripped
+>8	belong	0		stripped
+>22	byte	x		- version %ld
+>23	byte	x		.%ld
+#
+0	beshort	0x0166		MIPSEL-BE MIPS-II ECOFF executable
+>20	beshort	0407		(impure)
+>20	beshort	0410		(swapped)
+>20	beshort	0413		(paged)
+>8	belong	>0		not stripped
+>8	belong	0		stripped
+>22	byte	x		- version %ld
+>23	byte	x		.%ld
+#
+0	beshort	0x6301		MIPSEB-LE MIPS-II ECOFF executable
+>20	beshort	03401		(impure)
+>20	beshort	04001		(swapped)
+>20	beshort	05401		(paged)
+>8	belong	>0		not stripped
+>8	belong	0		stripped
+>23	byte	x		- version %ld
+>22	byte	x		.%ld
+#
+0	beshort	0x6601		MIPSEL MIPS-II ECOFF executable
+>20	beshort	03401		(impure)
+>20	beshort	04001		(swapped)
+>20	beshort	05401		(paged)
+>8	belong	>0		not stripped
+>8	belong	0		stripped
+>23	byte	x		- version %ld
+>22	byte	x		.%ld
+#
+# MIPS 3 additions
+#
+0	beshort	0x0140		MIPSEB MIPS-III ECOFF executable
+>20	beshort	0407		(impure)
+>20	beshort	0410		(swapped)
+>20	beshort	0413		(paged)
+>8	belong	>0		not stripped
+>8	belong	0		stripped
+>22	byte	x		- version %ld
+>23	byte	x		.%ld
+#
+0	beshort	0x0142		MIPSEL-BE MIPS-III ECOFF executable
+>20	beshort	0407		(impure)
+>20	beshort	0410		(swapped)
+>20	beshort	0413		(paged)
+>8	belong	>0		not stripped
+>8	belong	0		stripped
+>22	byte	x		- version %ld
+>23	byte	x		.%ld
+#
+0	beshort	0x4001		MIPSEB-LE MIPS-III ECOFF executable
+>20	beshort	03401		(impure)
+>20	beshort	04001		(swapped)
+>20	beshort	05401		(paged)
+>8	belong	>0		not stripped
+>8	belong	0		stripped
+>23	byte	x		- version %ld
+>22	byte	x		.%ld
+#
+0	beshort	0x4201		MIPSEL MIPS-III ECOFF executable
+>20	beshort	03401		(impure)
+>20	beshort	04001		(swapped)
+>20	beshort	05401		(paged)
+>8	belong	>0		not stripped
+>8	belong	0		stripped
+>23	byte	x		- version %ld
+>22	byte	x		.%ld
+#
+0	beshort	0x180		MIPSEB Ucode
+0	beshort	0x182		MIPSEL-BE Ucode
+# 32bit core file
+0	belong	0xdeadadb0	IRIX core dump
+>4	belong	1		of
+>16	string	>\0		'%s'
+# 64bit core file
+0	belong	0xdeadad40	IRIX 64-bit core dump
+>4	belong	1		of
+>16	string	>\0		'%s'
+# N32bit core file
+0       belong	0xbabec0bb	IRIX N32 core dump
+>4      belong	1               of
+>16     string	>\0             '%s'
+# New style crash dump file
+0	string	\x43\x72\x73\x68\x44\x75\x6d\x70	IRIX vmcore dump of
+>36	string	>\0					'%s'
+# Trusted IRIX info
+0	string	SGIAUDIT	SGI Audit file
+>8	byte	x		- version %d
+>9	byte	x		.%ld
+#
+0	string	WNGZWZSC	Wingz compiled script
+0	string	WNGZWZSS	Wingz spreadsheet
+0	string	WNGZWZHP	Wingz help file
+#
+0	string	#Inventor V	IRIS Inventor 1.0 file
+0	string	#Inventor V2	Open Inventor 2.0 file
+# GLF is OpenGL stream encoding
+0	string	glfHeadMagic();		GLF_TEXT
+4	belong	0x7d000000		GLF_BINARY_LSB_FIRST
+4	belong	0x0000007d		GLF_BINARY_MSB_FIRST
+# GLS is OpenGL stream encoding; GLS is the successor of GLF
+0	string	glsBeginGLS(		GLS_TEXT
+4	belong	0x10000000		GLS_BINARY_LSB_FIRST
+4	belong	0x00000010		GLS_BINARY_MSB_FIRST
+
+#------------------------------------------------------------------------------
+# $File: mirage,v 1.7 2009/09/19 16:28:10 christos Exp $
+# mirage:  file(1) magic for Mirage executables
+#
+# XXX - byte order?
+#
+0	long	31415		Mirage Assembler m.out executable
+
+#-----------------------------------------------------------------------------
+# $File: misctools,v 1.10 2009/09/19 16:28:10 christos Exp $
+# misctools:  file(1) magic for miscellaneous UNIX tools.
+#
+0	search/1	%%!!			X-Post-It-Note text
+0	string/c	BEGIN:VCALENDAR		vCalendar calendar file
+0	string/c	BEGIN:VCARD		vCard visiting card
+!:mime	text/x-vcard
+
+# From: Alex Beregszaszi <alex at fsn.hu>
+4	string	gtktalog		GNOME Catalogue (gtktalog)
+>13	string	>\0			version %s
+
+# Summary: Libtool library file
+# Extension: .la
+# Submitted by: Tomasz Trojanowski <tomek at uninet.com.pl>
+0	search/80	.la\ -\ a\ libtool\ library\ file	libtool library file
+
+# Summary: Libtool object file
+# Extension: .lo
+# Submitted by: Abel Cheung <abelcheung at gmail.com>
+0	search/80	.lo\ -\ a\ libtool\ object\ file	libtool object file
+
+# From: Daniel Novotny <dnovotny at redhat.com>
+0	string	MDMP\x93\xA7	MDMP crash report data
+
+#-----------------------------------------------------------------------------
+# $File: misctools,v 1.10 2009/09/19 16:28:10 christos Exp $
+# misctools:  file(1) magic for miscellaneous UNIX tools.
+#
+0	search/1	%%!!			X-Post-It-Note text
+0	string/c	BEGIN:VCALENDAR		vCalendar calendar file
+0	string/c	BEGIN:VCARD		vCard visiting card
+!:mime	text/x-vcard
+
+# From: Alex Beregszaszi <alex at fsn.hu>
+4	string	gtktalog		GNOME Catalogue (gtktalog)
+>13	string	>\0			version %s
+
+# Summary: Libtool library file
+# Extension: .la
+# Submitted by: Tomasz Trojanowski <tomek at uninet.com.pl>
+0	search/80	.la\ -\ a\ libtool\ library\ file	libtool library file
+
+# Summary: Libtool object file
+# Extension: .lo
+# Submitted by: Abel Cheung <abelcheung at gmail.com>
+0	search/80	.lo\ -\ a\ libtool\ object\ file	libtool object file
+
+#------------------------------------------------------------------------------
+# $File: mkid,v 1.6 2009/09/19 16:28:10 christos Exp $
+# mkid:  file(1) magic for mkid(1) databases
+#
+# ID is the binary tags database produced by mkid(1).
+#
+# XXX - byte order?
+#
+0	string		\311\304	ID tags data
+>2	short		>0		version %d
+
+#------------------------------------------------------------------------------
+# $File: mlssa,v 1.4 2009/09/19 16:28:10 christos Exp $
+# mlssa: file(1) magic for MLSSA datafiles
+#
+0		lelong		0xffffabcd	MLSSA datafile,
+>4		leshort		x		algorithm %d,
+>10		lelong		x		%d samples
+
+#------------------------------------------------------------------------------
+# $File: mmdf,v 1.6 2009/09/19 16:28:10 christos Exp $
+# mmdf:  file(1) magic for MMDF mail files
+#
+0	string	\001\001\001\001	MMDF mailbox
+
+#------------------------------------------------------------------------------
+# $File: modem,v 1.4 2009/09/19 16:28:10 christos Exp $
+# modem:  file(1) magic for modem programs
+#
+# From: Florian La Roche <florian at knorke.saar.de>
+4	string		Research,	Digifax-G3-File
+>29	byte		1		, fine resolution
+>29	byte		0		, normal resolution
+
+0	short		0x0100		raw G3 data, byte-padded
+0	short		0x1400		raw G3 data
+#
+# Magic data for vgetty voice formats
+# (Martin Seine & Marc Eberhard)
+
+#
+# raw modem data version 1
+#
+0    string    RMD1      raw modem data
+>4   string    >\0       (%s /
+>20  short     >0        compression type 0x%04x)
+
+#
+# portable voice format 1
+#
+0    string    PVF1\n         portable voice format
+>5   string    >\0       (binary %s)
+
+#
+# portable voice format 2
+#
+0    string    PVF2\n         portable voice format
+>5   string >\0          (ascii %s)
+
+
+#------------------------------------------------------------------------------
+# $File: motorola,v 1.10 2009/09/19 16:28:11 christos Exp $
+# motorola:  file(1) magic for Motorola 68K and 88K binaries
+#
+# 68K
+#
+0	beshort		0520		mc68k COFF
+>18	beshort		^00000020	object
+>18	beshort		&00000020	executable
+>12	belong		>0		not stripped
+>168	string		.lowmem		Apple toolbox
+>20	beshort		0407		(impure)
+>20	beshort		0410		(pure)
+>20	beshort		0413		(demand paged)
+>20	beshort		0421		(standalone)
+0	beshort		0521		mc68k executable (shared)
+>12	belong		>0		not stripped
+0	beshort		0522		mc68k executable (shared demand paged)
+>12	belong		>0		not stripped
+#
+# Motorola/UniSoft 68K Binary Compatibility Standard (BCS)
+#
+0	beshort		0554		68K BCS executable
+#
+# 88K
+#
+# Motorola/88Open BCS
+#
+0	beshort		0555		88K BCS executable
+#
+# Motorola S-Records, from Gerd Truschinski <gt at freebsd.first.gmd.de>
+0   string      S0          Motorola S-Record; binary data in text format
+
+# ATARI ST relocatable PRG
+#
+# from Oskar Schirmer <schirmer at scara.com> Feb 3, 2001
+# (according to Roland Waldi, Oct 21, 1987)
+# besides the magic 0x601a, the text segment size is checked to be
+# not larger than 1 MB (which is a lot on ST).
+# The additional 0x601b distinction I took from Doug Lee's magic.
+0	belong&0xFFFFFFF0	0x601A0000	Atari ST M68K contiguous executable
+>2	belong			x		(txt=%ld,
+>6	belong			x		dat=%ld,
+>10	belong			x		bss=%ld,
+>14	belong			x		sym=%ld)
+0	belong&0xFFFFFFF0	0x601B0000	Atari ST M68K non-contig executable
+>2	belong			x		(txt=%ld,
+>6	belong			x		dat=%ld,
+>10	belong			x		bss=%ld,
+>14	belong			x		sym=%ld)
+
+# Atari ST/TT... program format (sent by Wolfram Kleff <kleff at cs.uni-bonn.de>)
+0       beshort         0x601A          Atari 68xxx executable,
+>2      belong          x               text len %lu,
+>6      belong          x               data len %lu,
+>10     belong          x               BSS len %lu,
+>14     belong          x               symboltab len %lu,
+>18     belong          0
+>22     belong          &0x01           fastload flag,
+>22     belong          &0x02           may be loaded to alternate RAM,
+>22     belong          &0x04           malloc may be from alternate RAM,
+>22     belong          x               flags: 0x%lX,
+>26     beshort         0               no relocation tab
+>26     beshort         !0              + relocation tab
+>30     string          SFX             [Self-Extracting LZH SFX archive]
+>38     string          SFX             [Self-Extracting LZH SFX archive]
+>44     string          ZIP!            [Self-Extracting ZIP SFX archive]
+
+0       beshort         0x0064          Atari 68xxx CPX file
+>8      beshort         x               (version %04lx)
+
+#------------------------------------------------------------------------------
+# $File: mozilla,v 1.4 2009/09/19 16:28:11 christos Exp $
+# mozilla:  file(1) magic for Mozilla XUL fastload files 
+# (XUL.mfasl and XPC.mfasl)
+# URL:	http://www.mozilla.org/
+# From:	Josh Triplett <josh at freedesktop.org>
+
+0	string	XPCOM\nMozFASL\r\n\x1A		Mozilla XUL fastload data
+
+#------------------------------------------------------------------------------
+# $File: msdos,v 1.65 2009/09/19 16:28:11 christos Exp $
+# msdos:  file(1) magic for MS-DOS files
+#
+
+# .BAT files (Daniel Quinlan, quinlan at yggdrasil.com)
+# updated by Joerg Jenderek at Oct 2008
+0	string	@			
+>1	string/cW	\ echo\ off	DOS batch file text
+!:mime	text/x-msdos-batch
+>1	string/cW	echo\ off	DOS batch file text
+!:mime	text/x-msdos-batch
+>1	string/cW	rem\ 		DOS batch file text
+!:mime	text/x-msdos-batch
+>1	string/cW	set\ 		DOS batch file text
+!:mime	text/x-msdos-batch
+
+
+# OS/2 batch files are REXX. the second regex is a bit generic, oh well
+# the matched commands seem to be common in REXX and uncommon elsewhere
+100	regex/c =^[\ \t]{0,10}call[\ \t]{1,10}rxfunc OS/2 REXX batch file text
+100	regex/c =^[\ \t]{0,10}say\ ['"]	     OS/2 REXX batch file text
+
+0	leshort		0x14c	MS Windows COFF Intel 80386 object file
+#>4	ledate		x	stamp %s
+0	leshort		0x166	MS Windows COFF MIPS R4000 object file
+#>4	ledate		x	stamp %s
+0	leshort		0x184	MS Windows COFF Alpha object file
+#>4	ledate		x	stamp %s
+0	leshort		0x268	MS Windows COFF Motorola 68000 object file
+#>4	ledate		x	stamp %s
+0	leshort		0x1f0	MS Windows COFF PowerPC object file
+#>4	ledate		x	stamp %s
+0	leshort		0x290	MS Windows COFF PA-RISC object file
+#>4	ledate		x	stamp %s
+
+# XXX - according to Microsoft's spec, at an offset of 0x3c in a
+# PE-format executable is the offset in the file of the PE header;
+# unfortunately, that's a little-endian offset, and there's no way
+# to specify an indirect offset with a specified byte order.
+# So, for now, we assume the standard MS-DOS stub, which puts the
+# PE header at 0x80 = 128.
+#
+# Required OS version and subsystem version were 4.0 on some NT 3.51
+# executables built with Visual C++ 4.0, so it's not clear that
+# they're interesting.	The user version was 0.0, but there's
+# probably some linker directive to set it.  The linker version was
+# 3.0, except for one ".exe" which had it as 4.20 (same damn linker!).
+#
+# many of the compressed formats were extraced from IDARC 1.23 source code
+#
+0	string	MZ
+!:mime	application/x-dosexec
+>0x18  leshort <0x40 MS-DOS executable
+>0 string MZ\0\0\0\0\0\0\0\0\0\0PE\0\0 \b, PE for MS Windows
+>>&18	leshort&0x2000	>0	(DLL)
+>>&88	leshort		0	(unknown subsystem)
+>>&88	leshort		1	(native)
+>>&88	leshort		2	(GUI)
+>>&88	leshort		3	(console)
+>>&88	leshort		7	(POSIX)
+>>&0	leshort		0x0	unknown processor
+>>&0	leshort		0x14c	Intel 80386
+>>&0	leshort		0x166	MIPS R4000
+>>&0	leshort		0x184	Alpha
+>>&0	leshort		0x268	Motorola 68000
+>>&0	leshort		0x1f0	PowerPC
+>>&0	leshort		0x290	PA-RISC
+>>&18	leshort&0x0100	>0	32-bit
+>>&18	leshort&0x1000	>0	system file
+>>&0xf4 search/0x140 \x0\x40\x1\x0
+>>>(&0.l+(4)) string MSCF \b, WinHKI CAB self-extracting archive
+>30		string	Copyright\ 1989-1990\ PKWARE\ Inc.	Self-extracting PKZIP archive
+!:mime	application/zip
+# Is next line correct? One might expect "Corp." not "Copr." If it is right, add a note to that effect.
+>30		string	PKLITE\ Copr.	Self-extracting PKZIP archive
+!:mime	application/zip
+
+>0x18  leshort >0x3f
+>>(0x3c.l) string PE\0\0 PE
+>>>(0x3c.l+25) byte		1 \b32 executable
+>>>(0x3c.l+25) byte		2 \b32+ executable
+# hooray, there's a DOS extender using the PE format, with a valid PE
+# executable inside (which just prints a message and exits if run in win)
+>>>(0x3c.l+92)	leshort		<10
+>>>>(8.s*16) string 32STUB for MS-DOS, 32rtm DOS extender
+>>>>(8.s*16) string !32STUB for MS Windows
+>>>>>(0x3c.l+22)	leshort&0x2000	>0	(DLL)
+>>>>>(0x3c.l+92)	leshort		0	(unknown subsystem)
+>>>>>(0x3c.l+92)	leshort		1	(native)
+>>>>>(0x3c.l+92)	leshort		2	(GUI)
+>>>>>(0x3c.l+92)	leshort		3	(console)
+>>>>>(0x3c.l+92)	leshort		7	(POSIX)
+>>>(0x3c.l+92)	leshort		10	(EFI application)
+>>>(0x3c.l+92)	leshort		11	(EFI boot service driver)
+>>>(0x3c.l+92)	leshort		12	(EFI runtime driver)
+>>>(0x3c.l+92)	leshort		13	(XBOX)
+>>>(0x3c.l+4)	leshort		0x0	unknown processor
+>>>(0x3c.l+4)	leshort		0x14c	Intel 80386
+>>>(0x3c.l+4)	leshort		0x166	MIPS R4000
+>>>(0x3c.l+4)	leshort		0x184	Alpha
+>>>(0x3c.l+4)	leshort		0x268	Motorola 68000
+>>>(0x3c.l+4)	leshort		0x1f0	PowerPC
+>>>(0x3c.l+4)	leshort		0x290	PA-RISC
+>>>(0x3c.l+4)	leshort		0x200	Intel Itanium
+>>>(0x3c.l+22)	leshort&0x0100	>0	32-bit
+>>>(0x3c.l+22)	leshort&0x1000	>0	system file
+>>>(0x3c.l+232) lelong	>0	Mono/.Net assembly
+
+>>>>(0x3c.l+0xf8)	string		UPX0 \b, UPX compressed
+>>>>(0x3c.l+0xf8)	search/0x140	PEC2 \b, PECompact2 compressed
+>>>>(0x3c.l+0xf8)	search/0x140	UPX2
+>>>>>(&0x10.l+(-4))	string		PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
+>>>>(0x3c.l+0xf8)	search/0x140	.idata
+>>>>>(&0xe.l+(-4))	string		PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
+>>>>>(&0xe.l+(-4))	string		ZZ0 \b, ZZip self-extracting archive
+>>>>>(&0xe.l+(-4))	string		ZZ1 \b, ZZip self-extracting archive
+>>>>(0x3c.l+0xf8)	search/0x140	.rsrc
+>>>>>(&0x0f.l+(-4))	string		a\\\4\5 \b, WinHKI self-extracting archive
+>>>>>(&0x0f.l+(-4))	string		Rar! \b, RAR self-extracting archive
+>>>>>(&0x0f.l+(-4))	search/0x3000	MSCF \b, InstallShield self-extracting archive
+>>>>>(&0x0f.l+(-4))	search/32	Nullsoft \b, Nullsoft Installer self-extracting archive
+>>>>(0x3c.l+0xf8)	search/0x140	.data
+>>>>>(&0x0f.l)		string		WEXTRACT \b, MS CAB-Installer self-extracting archive
+>>>>(0x3c.l+0xf8)	search/0x140	.petite\0 \b, Petite compressed
+>>>>>(0x3c.l+0xf7)	byte		x
+>>>>>>(&0x104.l+(-4))	string		=!sfx! \b, ACE self-extracting archive
+>>>>(0x3c.l+0xf8)	search/0x140	.WISE \b, WISE installer self-extracting archive
+>>>>(0x3c.l+0xf8)	search/0x140	.dz\0\0\0 \b, Dzip self-extracting archive
+>>>>(0x3c.l+0xf8)	search/0x140	.reloc
+>>>>>(&0xe.l+(-4))	search/0x180	PK\3\4 \b, ZIP self-extracting archive (WinZip)
+
+>>>>&(0x3c.l+0xf8)	search/0x100	_winzip_ \b, ZIP self-extracting archive (WinZip)
+>>>>&(0x3c.l+0xf8)	search/0x100	SharedD \b, Microsoft Installer self-extracting archive
+>>>>0x30		string		Inno \b, InnoSetup self-extracting archive
+
+>>(0x3c.l) string !PE\0\0 MS-DOS executable
+
+>>(0x3c.l)		string		NE \b, NE
+>>>(0x3c.l+0x36)	byte		0 (unknown OS)
+>>>(0x3c.l+0x36)	byte		1 for OS/2 1.x
+>>>(0x3c.l+0x36)	byte		2 for MS Windows 3.x
+>>>(0x3c.l+0x36)	byte		3 for MS-DOS
+>>>(0x3c.l+0x36)	byte		>3 (unknown OS)
+>>>(0x3c.l+0x36)	byte		0x81 for MS-DOS, Phar Lap DOS extender
+>>>(0x3c.l+0x0c)	leshort&0x8003	0x8002 (DLL)
+>>>(0x3c.l+0x0c)	leshort&0x8003	0x8001 (driver)
+>>>&(&0x24.s-1)		string		ARJSFX \b, ARJ self-extracting archive
+>>>(0x3c.l+0x70)	search/0x80	WinZip(R)\ Self-Extractor \b, ZIP self-extracting archive (WinZip)
+
+>>(0x3c.l)		string		LX\0\0 \b, LX
+>>>(0x3c.l+0x0a)	leshort		<1 (unknown OS)
+>>>(0x3c.l+0x0a)	leshort		1 for OS/2
+>>>(0x3c.l+0x0a)	leshort		2 for MS Windows
+>>>(0x3c.l+0x0a)	leshort		3 for DOS
+>>>(0x3c.l+0x0a)	leshort		>3 (unknown OS)
+>>>(0x3c.l+0x10)	lelong&0x28000	=0x8000 (DLL)
+>>>(0x3c.l+0x10)	lelong&0x20000	>0 (device driver)
+>>>(0x3c.l+0x10)	lelong&0x300	0x300 (GUI)
+>>>(0x3c.l+0x10)	lelong&0x28300	<0x300 (console)
+>>>(0x3c.l+0x08)	leshort		1 i80286
+>>>(0x3c.l+0x08)	leshort		2 i80386
+>>>(0x3c.l+0x08)	leshort		3 i80486
+>>>(8.s*16)		string		emx \b, emx
+>>>>&1			string		x %s
+>>>&(&0x54.l-3)		string		arjsfx \b, ARJ self-extracting archive
+
+# MS Windows system file, supposedly a collection of LE executables
+>>(0x3c.l)		string		W3 \b, W3 for MS Windows
+
+>>(0x3c.l)		string		LE\0\0 \b, LE executable
+>>>(0x3c.l+0x0a)	leshort		1
+# some DOS extenders use LE files with OS/2 header
+>>>>0x240		search/0x100	DOS/4G for MS-DOS, DOS4GW DOS extender
+>>>>0x240		search/0x200	WATCOM\ C/C++ for MS-DOS, DOS4GW DOS extender
+>>>>0x440		search/0x100	CauseWay\ DOS\ Extender for MS-DOS, CauseWay DOS extender
+>>>>0x40		search/0x40	PMODE/W for MS-DOS, PMODE/W DOS extender
+>>>>0x40		search/0x40	STUB/32A for MS-DOS, DOS/32A DOS extender (stub)
+>>>>0x40		search/0x80	STUB/32C for MS-DOS, DOS/32A DOS extender (configurable stub)
+>>>>0x40		search/0x80	DOS/32A for MS-DOS, DOS/32A DOS extender (embedded)
+# this is a wild guess; hopefully it is a specific signature
+>>>>&0x24		lelong		<0x50
+>>>>>(&0x4c.l)		string		\xfc\xb8WATCOM
+>>>>>>&0		search/8	3\xdbf\xb9 \b, 32Lite compressed
+# another wild guess: if real OS/2 LE executables exist, they probably have higher start EIP
+#>>>>(0x3c.l+0x1c)	lelong		>0x10000 for OS/2
+# fails with DOS-Extenders.
+>>>(0x3c.l+0x0a)	leshort		2 for MS Windows
+>>>(0x3c.l+0x0a)	leshort		3 for DOS
+>>>(0x3c.l+0x0a)	leshort		4 for MS Windows (VxD)
+>>>(&0x7c.l+0x26)	string		UPX \b, UPX compressed
+>>>&(&0x54.l-3)		string		UNACE \b, ACE self-extracting archive
+
+# looks like ASCII, probably some embedded copyright message.
+# and definitely not NE/LE/LX/PE
+>>0x3c		lelong	>0x20000000
+>>>(4.s*512)	leshort !0x014c \b, MZ for MS-DOS
+# header data too small for extended executable
+>2		long	!0
+>>0x18		leshort <0x40
+>>>(4.s*512)	leshort !0x014c
+
+>>>>&(2.s-514)	string	!LE
+>>>>>&-2	string	!BW \b, MZ for MS-DOS
+>>>>&(2.s-514)	string	LE \b, LE
+>>>>>0x240	search/0x100	DOS/4G for MS-DOS, DOS4GW DOS extender
+# educated guess since indirection is still not capable enough for complex offset
+# calculations (next embedded executable would be at &(&2*512+&0-2)
+# I suspect there are only LE executables in these multi-exe files
+>>>>&(2.s-514)	string	BW
+>>>>>0x240	search/0x100	DOS/4G ,\b LE for MS-DOS, DOS4GW DOS extender (embedded)
+>>>>>0x240	search/0x100	!DOS/4G ,\b BW collection for MS-DOS
+
+# This sequence skips to the first COFF segment, usually .text
+>(4.s*512)	leshort		0x014c \b, COFF
+>>(8.s*16)	string		go32stub for MS-DOS, DJGPP go32 DOS extender
+>>(8.s*16)	string		emx
+>>>&1		string		x for DOS, Win or OS/2, emx %s
+>>&(&0x42.l-3)	byte		x 
+>>>&0x26	string		UPX \b, UPX compressed
+# and yet another guess: small .text, and after large .data is unusal, could be 32lite
+>>&0x2c		search/0xa0	.text
+>>>&0x0b	lelong		<0x2000
+>>>>&0		lelong		>0x6000 \b, 32lite compressed
+
+>(8.s*16) string $WdX \b, WDos/X DOS extender
+
+# .EXE formats (Greg Roelofs, newt at uchicago.edu)
+#
+>0x35	string	\x8e\xc0\xb9\x08\x00\xf3\xa5\x4a\x75\xeb\x8e\xc3\x8e\xd8\x33\xff\xbe\x30\x00\x05 \b, aPack compressed
+>0xe7	string	LH/2\ Self-Extract \b, %s
+>0x1c	string	diet \b, diet compressed
+>0x1c	string	LZ09 \b, LZEXE v0.90 compressed
+>0x1c	string	LZ91 \b, LZEXE v0.91 compressed
+>0x1c	string	tz \b, TinyProg compressed
+>0x1e	string	PKLITE \b, %s compressed
+>0x64	string	W\ Collis\0\0 \b, Compack compressed
+>0x24	string	LHa's\ SFX \b, LHa self-extracting archive
+!:mime	application/x-lha
+>0x24	string	LHA's\ SFX \b, LHa self-extracting archive
+!:mime	application/x-lha
+>0x24	string	\ $ARX \b, ARX self-extracting archive
+>0x24	string	\ $LHarc \b, LHarc self-extracting archive
+>0x20	string	SFX\ by\ LARC \b, LARC self-extracting archive
+>1638	string	-lh5- \b, LHa self-extracting archive v2.13S
+>0x17888 string Rar! \b, RAR self-extracting archive
+>0x40	string aPKG \b, aPackage self-extracting archive
+
+>32	 string AIN
+>>35	 string 2		\b, AIN 2.x compressed
+>>35	 string <2		\b, AIN 1.x compressed
+>>35	 string >2		\b, AIN 1.x compressed
+>28	 string UC2X		\b, UCEXE compressed
+>28	 string WWP\  		\b, WWPACK compressed
+
+# skip to the end of the exe
+>(4.s*512)	long	x 
+>>&(2.s-517)	byte	x 
+>>>&0	string		PK\3\4 \b, ZIP self-extracting archive
+>>>&0	string		Rar! \b, RAR self-extracting archive
+>>>&0	string		=!\x11 \b, AIN 2.x self-extracting archive
+>>>&0	string		=!\x12 \b, AIN 2.x self-extracting archive
+>>>&0	string		=!\x17 \b, AIN 1.x self-extracting archive
+>>>&0	string		=!\x18 \b, AIN 1.x self-extracting archive
+>>>&7	search/400	**ACE** \b, ACE self-extracting archive
+>>>&0	search/0x480	UC2SFX\ Header \b, UC2 self-extracting archive
+
+>0x1c	string		RJSX \b, ARJ self-extracting archive
+# winarj stores a message in the stub instead of the sig in the MZ header
+>0x20	search/0xe0	aRJsfX \b, ARJ self-extracting archive
+
+# a few unknown ZIP sfxes, no idea if they are needed or if they are
+# already captured by the generic patterns above
+>122		string		Windows\ self-extracting\ ZIP	\b, ZIP self-extracting archive
+>(8.s*16)	search/0x20	PKSFX \b, ZIP self-extracting archive (PKZIP)
+# TODO: how to add this? >FileSize-34 string Windows\ Self-Installing\ Executable \b, ZIP self-extracting archive
+#
+
+# TELVOX Teleinformatica CODEC self-extractor for OS/2:
+>49801	string	\x79\xff\x80\xff\x76\xff	\b, CODEC archive v3.21
+>>49824 leshort		=1			\b, 1 file
+>>49824 leshort		>1			\b, %u files
+
+# .COM formats (Daniel Quinlan, quinlan at yggdrasil.com)
+# Uncommenting only the first two lines will cover about 2/3 of COM files,
+# but it isn't feasible to match all COM files since there must be at least
+# two dozen different one-byte "magics".
+# test too generic ?
+#0	byte		0xe9		DOS executable (COM)
+#>0x1FE leshort		0xAA55		\b, boot code
+#>6	string		SFX\ of\ LHarc	(%s)
+#0	belong	0xffffffff		DOS executable (device driver)
+#CMD640X2.SYS
+#>10	string	>\x23			
+#>>10	string	!\x2e			
+#>>>17	string	<\x5B			
+#>>>>10	string	CMD640X2.SYS			\b, name: %.8s
+#UDMA.SYS
+#>10	string	<\x41			
+#>>12	string	>\x40			
+#>>>10	string	!$			
+#>>>>12	string	UDMA.SYS			\b, name: %.8s
+#CMD640X2.SYS
+#>10	string	<\x41			
+#>>12	string	>\x40			
+#>>>10	string	!$			
+#>>>>12	string	CMD640X2.SYS			\b, name: %.8s
+#KEYB.SYS
+#>10	string	<\x41			
+#>>12	string	>\x40			
+#>>>10	string	!$			
+#>>>>12	string	KEYB.SYS			\b, name: %.8s
+#BTCDROM.SYS
+#>22	string	>\x40			
+#>>22	string	<\x5B			
+#>>>23	string	<\x5B			
+#>>>>22	string	BTCDROM.SYS			\b, name: %.8s
+#ASPICD.SYS
+#>22	string	>\x40			
+#>>22	string	<\x5B			
+#>>>23	string	<\x5B			
+#>>>>22	string	ASPICD.SYS			\b, name: %.8s
+#ATAPICD.SYS
+#>76	string	\0			
+#>>77	string	>\x40			
+#>>>77	string	<\x5B			
+#>>>>77	string	ATAPICD.SYS			\b, name: %.8s
+# test too generic ?
+#0	byte		0x8c		DOS executable (COM)
+# updated by Joerg Jenderek at Oct 2008
+#0	ulelong		0xffff10eb	DR-DOS executable (COM)
+# byte 0xeb conflicts with "sequent" magic leshort 0xn2eb
+#0	ubeshort&0xeb8d	>0xeb00		
+# DR-DOS STACKER.COM SCREATE.SYS missed
+#>0	byte		0xeb		DOS executable (COM)
+#>>0x1FE leshort		0xAA55		\b, boot code
+#>>85	string		UPX		\b, UPX compressed
+#>>4	string		\ $ARX		\b, ARX self-extracting archive
+#>>4	string		\ $LHarc	\b, LHarc self-extracting archive
+#>>0x20e string		SFX\ by\ LARC	\b, LARC self-extracting archive
+# updated by Joerg Jenderek at Oct 2008
+#0	byte		0xb8		COM executable
+#0	uleshort&0x80ff	0x00b8		
+# modified by Joerg Jenderek
+#>1	lelong		!0x21cd4cff	COM executable for DOS
+# http://syslinux.zytor.com/comboot.php
+# (32-bit COMBOOT) programs *.C32 contain 32-bit code and run in flat-memory 32-bit protected mode
+# start with assembler instructions mov eax,21cd4cffh
+0	uleshort&0xc0ff	0xc0b8		
+>1	lelong		0x21cd4cff	COM executable (32-bit COMBOOT)
+0	string	\x81\xfc		
+>4	string	\x77\x02\xcd\x20\xb9	
+>>36	string	UPX!			FREE-DOS executable (COM), UPX compressed
+252	string Must\ have\ DOS\ version DR-DOS executable (COM)
+# added by Joerg Jenderek at Oct 2008
+# GRR search is not working
+#34	search/2	UPX!		FREE-DOS executable (COM), UPX compressed
+34	string	UPX!			FREE-DOS executable (COM), UPX compressed
+35	string	UPX!			FREE-DOS executable (COM), UPX compressed
+# GRR search is not working
+#2	search/28	\xcd\x21	COM executable for MS-DOS
+#WHICHFAT.cOM
+#2	string	\xcd\x21		COM executable for DOS
+#DELTREE.cOM DELTREE2.cOM
+#4	string	\xcd\x21		COM executable for DOS
+#IFMEMDSK.cOM ASSIGN.cOM COMP.cOM
+#5	string	\xcd\x21		COM executable for DOS
+#DELTMP.COm HASFAT32.cOM
+#7	string	\xcd\x21		
+#>0	byte	!0xb8			COM executable for DOS
+#COMP.cOM MORE.COm
+#10	string	\xcd\x21		
+#>5	string	!\xcd\x21		COM executable for DOS
+#comecho.com
+#13	string	\xcd\x21		COM executable for DOS
+#HELP.COm EDIT.coM
+#18	string	\xcd\x21		COM executable for MS-DOS
+#NWRPLTRM.COm
+#23	string	\xcd\x21		COM executable for MS-DOS
+#LOADFIX.cOm LOADFIX.cOm
+#30	string	\xcd\x21		COM executable for MS-DOS
+#syslinux.com 3.11
+#70	string	\xcd\x21		COM executable for DOS
+# many compressed/converted COMs start with a copy loop instead of a jump
+0x6	search/0xa	\xfc\x57\xf3\xa5\xc3	COM executable for MS-DOS
+0x6	search/0xa	\xfc\x57\xf3\xa4\xc3	COM executable for DOS
+>0x18	search/0x10	\x50\xa4\xff\xd5\x73	\b, aPack compressed
+0x3c	string		W\ Collis\0\0		COM executable for MS-DOS, Compack compressed
+# FIXME: missing diet .com compression
+
+# miscellaneous formats
+0	string		LZ		MS-DOS executable (built-in)
+#0	byte		0xf0		MS-DOS program library data
+#
+
+# AAF files:
+# <stuartc at rd.bbc.co.uk> Stuart Cunningham
+0	string	\320\317\021\340\241\261\032\341AAFB\015\000OM\006\016\053\064\001\001\001\377			AAF legacy file using MS Structured Storage
+>30	byte	9		(512B sectors)
+>30	byte	12		(4kB sectors)
+0	string	\320\317\021\340\241\261\032\341\001\002\001\015\000\002\000\000\006\016\053\064\003\002\001\001			AAF file using MS Structured Storage
+>30	byte	9		(512B sectors)
+>30	byte	12		(4kB sectors)
+
+# Popular applications
+2080	string	Microsoft\ Word\ 6.0\ Document	%s
+!:mime	application/msword
+2080	string	Documento\ Microsoft\ Word\ 6 Spanish Microsoft Word 6 document data
+!:mime	application/msword
+# Pawel Wiecek <coven at i17linuxb.ists.pwr.wroc.pl> (for polish Word)
+2112	string	MSWordDoc			Microsoft Word document data
+!:mime	application/msword
+#
+0	belong	0x31be0000			Microsoft Word Document
+!:mime	application/msword
+#
+0	string	PO^Q`				Microsoft Word 6.0 Document
+!:mime	application/msword
+#
+0	string	\376\067\0\043			Microsoft Office Document
+!:mime	application/msword
+0	string	\333\245-\0\0\0			Microsoft Office Document
+!:mime	application/msword
+512	string		\354\245\301		Microsoft Word Document
+!:mime	application/msword
+#
+2080	string	Microsoft\ Excel\ 5.0\ Worksheet	%s
+!:mime	application/vnd.ms-excel
+
+2080	string	Foglio\ di\ lavoro\ Microsoft\ Exce	%s
+!:mime	application/vnd.ms-excel
+#
+# Pawel Wiecek <coven at i17linuxb.ists.pwr.wroc.pl> (for polish Excel)
+2114	string	Biff5		Microsoft Excel 5.0 Worksheet
+!:mime	application/vnd.ms-excel
+# Italian MS-Excel
+2121	string	Biff5		Microsoft Excel 5.0 Worksheet
+!:mime	application/vnd.ms-excel
+0	string	\x09\x04\x06\x00\x00\x00\x10\x00	Microsoft Excel Worksheet
+!:mime	application/vnd.ms-excel
+#
+0	belong	0x00001a00	Lotus 1-2-3
+!:mime	application/x-123
+>4	belong	0x00100400	wk3 document data
+>4	belong	0x02100400	wk4 document data
+>4	belong	0x07800100	fm3 or fmb document data
+>4	belong	0x07800000	fm3 or fmb document data
+#
+0	belong	0x00000200	Lotus 1-2-3
+!:mime	application/x-123
+>4	belong	0x06040600	wk1 document data
+>4	belong	0x06800200	fmt document data
+0	string		WordPro\0	Lotus WordPro
+!:mime	application/vnd.lotus-wordpro
+0	string		WordPro\r\373	Lotus WordPro
+!:mime	application/vnd.lotus-wordpro
+
+
+# Summary: Script used by InstallScield to uninstall applications
+# Extension: .isu
+# Submitted by: unknown
+# Modified by (1): Abel Cheung <abelcheung at gmail.com> (replace useless entry)
+0		string		\x71\xa8\x00\x00\x01\x02
+>12		string		Stirling\ Technologies,		InstallShield Uninstall Script
+
+# Winamp .avs
+#0	string	Nullsoft\ AVS\ Preset\ \060\056\061\032 A plug in for Winamp ms-windows Freeware media player
+0	string	Nullsoft\ AVS\ Preset\ 	Winamp plug in
+
+# Windows Metafont .WMF
+0	string	\327\315\306\232	ms-windows metafont .wmf
+0	string	\002\000\011\000	ms-windows metafont .wmf
+0	string	\001\000\011\000	ms-windows metafont .wmf
+
+#tz3 files whatever that is (MS Works files)
+0	string	\003\001\001\004\070\001\000\000	tz3 ms-works file
+0	string	\003\002\001\004\070\001\000\000	tz3 ms-works file
+0	string	\003\003\001\004\070\001\000\000	tz3 ms-works file
+
+# PGP sig files .sig
+#0 string \211\000\077\003\005\000\063\237\127 065 to  \027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\077\003\005\000\063\237\127\065\027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\077\003\005\000\063\237\127\066\027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\077\003\005\000\063\237\127\067\027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\077\003\005\000\063\237\127\070\027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\077\003\005\000\063\237\127\071\027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\225\003\005\000\062\122\207\304\100\345\042 PGP sig
+
+# windows zips files .dmf
+0	string	MDIF\032\000\010\000\000\000\372\046\100\175\001\000\001\036\001\000 MS Windows special zipped file
+
+
+#ico files
+0	string	\102\101\050\000\000\000\056\000\000\000\000\000\000\000	Icon for MS Windows
+
+# Windows icons (Ian Springer <ips at fpk.hp.com>)
+0	string	\000\000\001\000	MS Windows icon resource
+!:mime	image/x-ico
+>4	byte	1			- 1 icon
+>4	byte	>1			- %d icons
+>>6	byte	>0			\b, %dx
+>>>7	byte	>0			\b%d
+>>8	byte	0			\b, 256-colors
+>>8	byte	>0			\b, %d-colors
+
+
+# .chr files
+0	string	PK\010\010BGI	Borland font 
+>4	string	>\0	%s
+# then there is a copyright notice
+
+
+# .bgi files
+0	string	pk\010\010BGI	Borland device 
+>4	string	>\0	%s
+# then there is a copyright notice
+
+
+# Windows Recycle Bin record file (named INFO2)
+# By Abel Cheung (abelcheung AT gmail dot com)
+# Version 4 always has 280 bytes (0x118) per record, version 5 has 800 bytes
+# Since Vista uses another structure, INFO2 structure probably won't change
+# anymore. Detailed analysis in:
+# http://www.cybersecurityinstitute.biz/downloads/INFO2.pdf
+0	lelong		0x00000004
+>12	lelong		0x00000118	Windows Recycle Bin INFO2 file (Win98 or below)
+
+0	lelong		0x00000005
+>12	lelong		0x00000320	Windows Recycle Bin INFO2 file (Win2k - WinXP)
+
+
+##### put in Either Magic/font or Magic/news
+# Acroread or something	 files wrongly identified as G3	 .pfm
+# these have the form \000 \001 any? \002 \000 \000
+# or \000 \001 any? \022 \000 \000
+#0	string	\000\001 pfm?
+#>3	string	\022\000\000Copyright\	yes
+#>3	string	\002\000\000Copyright\	yes
+#>3	string	>\0	oops, not a font file. Cancel that.
+#it clashes with ttf files so put it lower down.
+
+# From Doug Lee via a FreeBSD pr
+9	string		GERBILDOC	First Choice document
+9	string		GERBILDB	First Choice database
+9	string		GERBILCLIP	First Choice database
+0	string		GERBIL		First Choice device file
+9	string		RABBITGRAPH	RabbitGraph file
+0	string		DCU1		Borland Delphi .DCU file
+0	string		=!<spell>	MKS Spell hash list (old format)
+0	string		=!<spell2>	MKS Spell hash list
+# Too simple - MPi
+#0	string		AH		Halo(TM) bitmapped font file
+0	lelong		0x08086b70	TurboC BGI file
+0	lelong		0x08084b50	TurboC Font file
+
+# WARNING: below line conflicts with Infocom game data Z-machine 3
+0	byte		0x03		DBase 3 data file
+>0x04	lelong		0		(no records)
+>0x04	lelong		>0		(%ld records)
+0	byte		0x83		DBase 3 data file with memo(s)
+>0x04	lelong		0		(no records)
+>0x04	lelong		>0		(%ld records)
+0	leshort		0x0006		DBase 3 index file
+0	string		PMCC		Windows 3.x .GRP file
+1	string		RDC-meg		MegaDots 
+>8	byte		>0x2F		version %c
+>9	byte		>0x2F		\b.%c file
+0	lelong		0x4C
+>4	lelong		0x00021401	Windows shortcut file
+
+# DOS EPS Binary File Header
+# From: Ed Sznyter <ews at Black.Market.NET>
+0	belong		0xC5D0D3C6	DOS EPS Binary File
+>4	long		>0		Postscript starts at byte %d
+>>8	long		>0		length %d
+>>>12	long		>0		Metafile starts at byte %d
+>>>>16	long		>0		length %d
+>>>20	long		>0		TIFF starts at byte %d
+>>>>24	long		>0		length %d
+
+# TNEF magic From "Joomy" <joomy at se-ed.net> 
+# Microsoft Outlook's Transport Neutral Encapsulation Format (TNEF)
+0	leshort		0x223e9f78	TNEF
+!:mime	application/vnd.ms-tnef
+
+# HtmlHelp files (.chm)
+0	string	ITSF\003\000\000\000\x60\000\000\000\001\000\000\000	MS Windows HtmlHelp Data
+
+# GFA-BASIC (Wolfram Kleff)
+2	string		GFA-BASIC3	GFA-BASIC 3 data
+
+#------------------------------------------------------------------------------
+# From Stuart Caie <kyzer at 4u.net> (developer of cabextract)
+# Microsoft Cabinet files
+0	string		MSCF\0\0\0\0	Microsoft Cabinet archive data
+!:mime application/vnd.ms-cab-compressed
+>8	lelong		x		\b, %u bytes
+>28	leshort		1		\b, 1 file
+>28	leshort		>1		\b, %u files
+
+# InstallShield Cabinet files
+0	string		ISc(		InstallShield Cabinet archive data
+>5	byte&0xf0	=0x60		version 6,
+>5	byte&0xf0	!0x60		version 4/5,
+>(12.l+40)	lelong	x		%u files
+
+# Windows CE package files
+0	string		MSCE\0\0\0\0	Microsoft WinCE install header
+>20	lelong		0		\b, architecture-independent
+>20	lelong		103		\b, Hitachi SH3
+>20	lelong		104		\b, Hitachi SH4
+>20	lelong		0xA11		\b, StrongARM
+>20	lelong		4000		\b, MIPS R4000
+>20	lelong		10003		\b, Hitachi SH3
+>20	lelong		10004		\b, Hitachi SH3E
+>20	lelong		10005		\b, Hitachi SH4
+>20	lelong		70001		\b, ARM 7TDMI
+>52	leshort		1		\b, 1 file
+>52	leshort		>1		\b, %u files
+>56	leshort		1		\b, 1 registry entry
+>56	leshort		>1		\b, %u registry entries
+
+
+# Windows Enhanced Metafile (EMF)
+# See msdn.microsoft.com/archive/en-us/dnargdi/html/msdn_enhmeta.asp 
+# for further information.
+0	ulelong 1
+>40	string	\ EMF		Windows Enhanced Metafile (EMF) image data
+>>44	ulelong x		version 0x%x
+
+# From: Alex Beregszaszi <alex at fsn.hu>
+0	string	COWD		VMWare3
+>4	byte	3		disk image
+>>32	lelong	x		(%d/
+>>36	lelong	x		\b%d/
+>>40	lelong	x		\b%d)
+>4	byte	2		undoable disk image
+>>32	string	>\0		(%s)
+
+0	string	VMDK		 VMware4 disk image
+0	string	KDMV		 VMware4 disk image
+
+#--------------------------------------------------------------------
+# Qemu Emulator Images
+# Lines written by Friedrich Schwittay (f.schwittay at yousable.de)
+# Made by reading sources and doing trial and error on existing
+# qcow files
+0	string	QFI	Qemu Image, Format: Qcow
+
+# Uncomment the following line to display Magic (only used for debugging
+# this magic number)
+#>0	string	x	, Magic: %s
+
+# There are currently 2 Versions: "1" and "2"
+# I do not use Version 2 and therefor branch here
+# but can assure: it works (tested on both versions)
+# Also my Qemu 0.9.0 which uses this Version 2 refuses
+# to start in its bios
+>0x04	belong	2	, Version: 2
+>0x04	belong	1	, Version: 1
+
+# Using the existence of the Backing File Offset to Branch or not
+# to read Backing File Information
+>>0xc	 belong	 >0	 , Backing File( Offset: %lu
+>>>(0xc.L)	 string >\0	, Path: %s
+
+# Didn't get the trick here how qemu stores the "Size" at this Position
+# There is actually something stored but nothing makes sense
+# The header in the sources talks about it
+#>>>16	 lelong	 x	 , Size: %lu
+
+# Modification time of the Backing File
+# Really useful if you want to know if your backing
+# file is still usable together with this image
+>>>20	 bedate x	, Mtime: %s )
+
+# Don't know how to calculate in Magicfiles
+# Also: this Information is not reliably
+#	stored in image-files
+>>24	 lelong	 x	 , Disk Size could be: %d * 256 bytes
+
+>4 belong  3   (v3)
+# Using the existence of the Backing File Offset to determine whether
+# to read Backing File Information
+>>8    bequad  >0   \b, has backing file
+# Note that this isn't a null-terminated string; the length is actually
+# (16.L). Assuming a null-terminated string happens to work usually, but it
+# may spew junk until it reaches a \0 in some cases. Also, since there's no
+# .Q modifier, we just use the bottom four bytes as an offset. Note that if
+# the file is over 4G, and the backing file path is stored after the first 4G,
+# the wrong filename will be printed. (This should be (8.Q), when that syntax
+# is introduced.)
+>>>(12.L)   string >\0 (path %s)
+>>24   bequad  x   \b, %lld bytes
+>>32   belong  1   \b, AES-encrypted
+
+0	string	QEVM		QEMU's suspend to disk image
+
+# QEMU QED Image
+# http://wiki.qemu.org/Features/QED/Specification
+0	string/b	QED\0		QEMU QED Image
+
+# VDI Image
+64	string/b	\x7f\x10\xda\xbe	VDI Image
+>68	string/b	\x01\x00\x01\x00	version 1.1
+>0	string		>\0			(%s)
+>368	lequad		x			 \b, %lld bytes
+
+0	string	Bochs\ Virtual\ HD\ Image	Bochs disk image,
+>32	string	x				type %s,
+>48	string	x				subtype %s
+
+0	lelong	0x02468ace			Bochs Sparse disk image
+
+# from http://filext.com by Derek M Jones <derek at knosof.co.uk>
+# False positive with PPT (also currently this string is too long)
+#0	string	\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3E\x00\x03\x00\xFE\xFF\x09\x00\x06	Microsoft Installer
+0	string	\320\317\021\340\241\261\032\341	Microsoft Office Document
+#>48	byte	0x1B					Excel Document
+#!:mime application/vnd.ms-excel
+>546	string	bjbj			Microsoft Word Document
+!:mime	application/msword
+>546	string	jbjb			Microsoft Word Document
+!:mime	application/msword
+
+0	string	\224\246\056		Microsoft Word Document
+!:mime	application/msword
+
+512	string	R\0o\0o\0t\0\ \0E\0n\0t\0r\0y	Microsoft Word Document
+!:mime	application/msword
+
+# From: "Nelson A. de Oliveira" <naoliv at gmail.com>
+# Magic type for Dell's BIOS .hdr files
+# Dell's .hdr
+0     string          $RBU
+>23   string          Dell            %s system BIOS
+>5    byte            2
+>>48  byte            x               version %d.
+>>49  byte            x               \b%d.
+>>50  byte            x               \b%d
+>5    byte            <2
+>>48  string          x               version %.3s
+
+# Type: Microsoft DirectDraw Surface
+# URL:	http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/reference/DDSFileReference/ddsfileformat.asp
+# From: Morten Hustveit <morten at debian.org>
+0	string	DDS\040\174\000\000\000 Microsoft DirectDraw Surface (DDS),
+>16	lelong	>0			%hd x
+>12	lelong	>0			%hd,
+>84	string	x			%.4s
+
+# Type: Microsoft Document Imaging Format (.mdi)
+# URL:	http://en.wikipedia.org/wiki/Microsoft_Document_Imaging_Format
+# From: Daniele Sempione <scrows at oziosi.org>
+0	short	0x5045			Microsoft Document Imaging Format
+
+# MS eBook format (.lit)
+0	string	ITOLITLS		Microsoft Reader eBook Data
+>8	lelong	x			\b, version %u
+!:mime					application/x-ms-reader
+
+#------------------------------------------------------------------------------
+# $File: msdos,v 1.65 2009/09/19 16:28:11 christos Exp $
+# msdos:  file(1) magic for MS-DOS files
+#
+
+# .BAT files (Daniel Quinlan, quinlan at yggdrasil.com)
+# updated by Joerg Jenderek at Oct 2008
+0	string	@			
+>1	string/cW	\ echo\ off	DOS batch file text
+!:mime	text/x-msdos-batch
+>1	string/cW	echo\ off	DOS batch file text
+!:mime	text/x-msdos-batch
+>1	string/cW	rem\ 		DOS batch file text
+!:mime	text/x-msdos-batch
+>1	string/cW	set\ 		DOS batch file text
+!:mime	text/x-msdos-batch
+
+
+# OS/2 batch files are REXX. the second regex is a bit generic, oh well
+# the matched commands seem to be common in REXX and uncommon elsewhere
+100	regex/c =^[\ \t]{0,10}call[\ \t]{1,10}rxfunc OS/2 REXX batch file text
+100	regex/c =^[\ \t]{0,10}say\ ['"]	     OS/2 REXX batch file text
+
+0	leshort		0x14c	MS Windows COFF Intel 80386 object file
+#>4	ledate		x	stamp %s
+0	leshort		0x166	MS Windows COFF MIPS R4000 object file
+#>4	ledate		x	stamp %s
+0	leshort		0x184	MS Windows COFF Alpha object file
+#>4	ledate		x	stamp %s
+0	leshort		0x268	MS Windows COFF Motorola 68000 object file
+#>4	ledate		x	stamp %s
+0	leshort		0x1f0	MS Windows COFF PowerPC object file
+#>4	ledate		x	stamp %s
+0	leshort		0x290	MS Windows COFF PA-RISC object file
+#>4	ledate		x	stamp %s
+
+# XXX - according to Microsoft's spec, at an offset of 0x3c in a
+# PE-format executable is the offset in the file of the PE header;
+# unfortunately, that's a little-endian offset, and there's no way
+# to specify an indirect offset with a specified byte order.
+# So, for now, we assume the standard MS-DOS stub, which puts the
+# PE header at 0x80 = 128.
+#
+# Required OS version and subsystem version were 4.0 on some NT 3.51
+# executables built with Visual C++ 4.0, so it's not clear that
+# they're interesting.	The user version was 0.0, but there's
+# probably some linker directive to set it.  The linker version was
+# 3.0, except for one ".exe" which had it as 4.20 (same damn linker!).
+#
+# many of the compressed formats were extraced from IDARC 1.23 source code
+#
+0	string	MZ
+!:mime	application/x-dosexec
+>0x18  leshort <0x40 MS-DOS executable
+>0 string MZ\0\0\0\0\0\0\0\0\0\0PE\0\0 \b, PE for MS Windows
+>>&18	leshort&0x2000	>0	(DLL)
+>>&88	leshort		0	(unknown subsystem)
+>>&88	leshort		1	(native)
+>>&88	leshort		2	(GUI)
+>>&88	leshort		3	(console)
+>>&88	leshort		7	(POSIX)
+>>&0	leshort		0x0	unknown processor
+>>&0	leshort		0x14c	Intel 80386
+>>&0	leshort		0x166	MIPS R4000
+>>&0	leshort		0x184	Alpha
+>>&0	leshort		0x268	Motorola 68000
+>>&0	leshort		0x1f0	PowerPC
+>>&0	leshort		0x290	PA-RISC
+>>&18	leshort&0x0100	>0	32-bit
+>>&18	leshort&0x1000	>0	system file
+>>&0xf4 search/0x140 \x0\x40\x1\x0
+>>>(&0.l+(4)) string MSCF \b, WinHKI CAB self-extracting archive
+>30		string	Copyright\ 1989-1990\ PKWARE\ Inc.	Self-extracting PKZIP archive
+!:mime	application/zip
+# Is next line correct? One might expect "Corp." not "Copr." If it is right, add a note to that effect.
+>30		string	PKLITE\ Copr.	Self-extracting PKZIP archive
+!:mime	application/zip
+
+>0x18  leshort >0x3f
+>>(0x3c.l) string PE\0\0 PE
+>>>(0x3c.l+25) byte		1 \b32 executable
+>>>(0x3c.l+25) byte		2 \b32+ executable
+# hooray, there's a DOS extender using the PE format, with a valid PE
+# executable inside (which just prints a message and exits if run in win)
+>>>(0x3c.l+92)	leshort		<10
+>>>>(8.s*16) string 32STUB for MS-DOS, 32rtm DOS extender
+>>>>(8.s*16) string !32STUB for MS Windows
+>>>>>(0x3c.l+22)	leshort&0x2000	>0	(DLL)
+>>>>>(0x3c.l+92)	leshort		0	(unknown subsystem)
+>>>>>(0x3c.l+92)	leshort		1	(native)
+>>>>>(0x3c.l+92)	leshort		2	(GUI)
+>>>>>(0x3c.l+92)	leshort		3	(console)
+>>>>>(0x3c.l+92)	leshort		7	(POSIX)
+>>>(0x3c.l+92)	leshort		10	(EFI application)
+>>>(0x3c.l+92)	leshort		11	(EFI boot service driver)
+>>>(0x3c.l+92)	leshort		12	(EFI runtime driver)
+>>>(0x3c.l+92)	leshort		13	(XBOX)
+>>>(0x3c.l+4)	leshort		0x0	unknown processor
+>>>(0x3c.l+4)	leshort		0x14c	Intel 80386
+>>>(0x3c.l+4)	leshort		0x166	MIPS R4000
+>>>(0x3c.l+4)	leshort		0x184	Alpha
+>>>(0x3c.l+4)	leshort		0x268	Motorola 68000
+>>>(0x3c.l+4)	leshort		0x1f0	PowerPC
+>>>(0x3c.l+4)	leshort		0x290	PA-RISC
+>>>(0x3c.l+4)	leshort		0x200	Intel Itanium
+>>>(0x3c.l+22)	leshort&0x0100	>0	32-bit
+>>>(0x3c.l+22)	leshort&0x1000	>0	system file
+>>>(0x3c.l+232) lelong	>0	Mono/.Net assembly
+
+>>>>(0x3c.l+0xf8)	string		UPX0 \b, UPX compressed
+>>>>(0x3c.l+0xf8)	search/0x140	PEC2 \b, PECompact2 compressed
+>>>>(0x3c.l+0xf8)	search/0x140	UPX2
+>>>>>(&0x10.l+(-4))	string		PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
+>>>>(0x3c.l+0xf8)	search/0x140	.idata
+>>>>>(&0xe.l+(-4))	string		PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
+>>>>>(&0xe.l+(-4))	string		ZZ0 \b, ZZip self-extracting archive
+>>>>>(&0xe.l+(-4))	string		ZZ1 \b, ZZip self-extracting archive
+>>>>(0x3c.l+0xf8)	search/0x140	.rsrc
+>>>>>(&0x0f.l+(-4))	string		a\\\4\5 \b, WinHKI self-extracting archive
+>>>>>(&0x0f.l+(-4))	string		Rar! \b, RAR self-extracting archive
+>>>>>(&0x0f.l+(-4))	search/0x3000	MSCF \b, InstallShield self-extracting archive
+>>>>>(&0x0f.l+(-4))	search/32	Nullsoft \b, Nullsoft Installer self-extracting archive
+>>>>(0x3c.l+0xf8)	search/0x140	.data
+>>>>>(&0x0f.l)		string		WEXTRACT \b, MS CAB-Installer self-extracting archive
+>>>>(0x3c.l+0xf8)	search/0x140	.petite\0 \b, Petite compressed
+>>>>>(0x3c.l+0xf7)	byte		x
+>>>>>>(&0x104.l+(-4))	string		=!sfx! \b, ACE self-extracting archive
+>>>>(0x3c.l+0xf8)	search/0x140	.WISE \b, WISE installer self-extracting archive
+>>>>(0x3c.l+0xf8)	search/0x140	.dz\0\0\0 \b, Dzip self-extracting archive
+>>>>(0x3c.l+0xf8)	search/0x140	.reloc
+>>>>>(&0xe.l+(-4))	search/0x180	PK\3\4 \b, ZIP self-extracting archive (WinZip)
+
+>>>>&(0x3c.l+0xf8)	search/0x100	_winzip_ \b, ZIP self-extracting archive (WinZip)
+>>>>&(0x3c.l+0xf8)	search/0x100	SharedD \b, Microsoft Installer self-extracting archive
+>>>>0x30		string		Inno \b, InnoSetup self-extracting archive
+
+>>(0x3c.l) string !PE\0\0 MS-DOS executable
+
+>>(0x3c.l)		string		NE \b, NE
+>>>(0x3c.l+0x36)	byte		0 (unknown OS)
+>>>(0x3c.l+0x36)	byte		1 for OS/2 1.x
+>>>(0x3c.l+0x36)	byte		2 for MS Windows 3.x
+>>>(0x3c.l+0x36)	byte		3 for MS-DOS
+>>>(0x3c.l+0x36)	byte		>3 (unknown OS)
+>>>(0x3c.l+0x36)	byte		0x81 for MS-DOS, Phar Lap DOS extender
+>>>(0x3c.l+0x0c)	leshort&0x8003	0x8002 (DLL)
+>>>(0x3c.l+0x0c)	leshort&0x8003	0x8001 (driver)
+>>>&(&0x24.s-1)		string		ARJSFX \b, ARJ self-extracting archive
+>>>(0x3c.l+0x70)	search/0x80	WinZip(R)\ Self-Extractor \b, ZIP self-extracting archive (WinZip)
+
+>>(0x3c.l)		string		LX\0\0 \b, LX
+>>>(0x3c.l+0x0a)	leshort		<1 (unknown OS)
+>>>(0x3c.l+0x0a)	leshort		1 for OS/2
+>>>(0x3c.l+0x0a)	leshort		2 for MS Windows
+>>>(0x3c.l+0x0a)	leshort		3 for DOS
+>>>(0x3c.l+0x0a)	leshort		>3 (unknown OS)
+>>>(0x3c.l+0x10)	lelong&0x28000	=0x8000 (DLL)
+>>>(0x3c.l+0x10)	lelong&0x20000	>0 (device driver)
+>>>(0x3c.l+0x10)	lelong&0x300	0x300 (GUI)
+>>>(0x3c.l+0x10)	lelong&0x28300	<0x300 (console)
+>>>(0x3c.l+0x08)	leshort		1 i80286
+>>>(0x3c.l+0x08)	leshort		2 i80386
+>>>(0x3c.l+0x08)	leshort		3 i80486
+>>>(8.s*16)		string		emx \b, emx
+>>>>&1			string		x %s
+>>>&(&0x54.l-3)		string		arjsfx \b, ARJ self-extracting archive
+
+# MS Windows system file, supposedly a collection of LE executables
+>>(0x3c.l)		string		W3 \b, W3 for MS Windows
+
+>>(0x3c.l)		string		LE\0\0 \b, LE executable
+>>>(0x3c.l+0x0a)	leshort		1
+# some DOS extenders use LE files with OS/2 header
+>>>>0x240		search/0x100	DOS/4G for MS-DOS, DOS4GW DOS extender
+>>>>0x240		search/0x200	WATCOM\ C/C++ for MS-DOS, DOS4GW DOS extender
+>>>>0x440		search/0x100	CauseWay\ DOS\ Extender for MS-DOS, CauseWay DOS extender
+>>>>0x40		search/0x40	PMODE/W for MS-DOS, PMODE/W DOS extender
+>>>>0x40		search/0x40	STUB/32A for MS-DOS, DOS/32A DOS extender (stub)
+>>>>0x40		search/0x80	STUB/32C for MS-DOS, DOS/32A DOS extender (configurable stub)
+>>>>0x40		search/0x80	DOS/32A for MS-DOS, DOS/32A DOS extender (embedded)
+# this is a wild guess; hopefully it is a specific signature
+>>>>&0x24		lelong		<0x50
+>>>>>(&0x4c.l)		string		\xfc\xb8WATCOM
+>>>>>>&0		search/8	3\xdbf\xb9 \b, 32Lite compressed
+# another wild guess: if real OS/2 LE executables exist, they probably have higher start EIP
+#>>>>(0x3c.l+0x1c)	lelong		>0x10000 for OS/2
+# fails with DOS-Extenders.
+>>>(0x3c.l+0x0a)	leshort		2 for MS Windows
+>>>(0x3c.l+0x0a)	leshort		3 for DOS
+>>>(0x3c.l+0x0a)	leshort		4 for MS Windows (VxD)
+>>>(&0x7c.l+0x26)	string		UPX \b, UPX compressed
+>>>&(&0x54.l-3)		string		UNACE \b, ACE self-extracting archive
+
+# looks like ASCII, probably some embedded copyright message.
+# and definitely not NE/LE/LX/PE
+>>0x3c		lelong	>0x20000000
+>>>(4.s*512)	leshort !0x014c \b, MZ for MS-DOS
+# header data too small for extended executable
+>2		long	!0
+>>0x18		leshort <0x40
+>>>(4.s*512)	leshort !0x014c
+
+>>>>&(2.s-514)	string	!LE
+>>>>>&-2	string	!BW \b, MZ for MS-DOS
+>>>>&(2.s-514)	string	LE \b, LE
+>>>>>0x240	search/0x100	DOS/4G for MS-DOS, DOS4GW DOS extender
+# educated guess since indirection is still not capable enough for complex offset
+# calculations (next embedded executable would be at &(&2*512+&0-2)
+# I suspect there are only LE executables in these multi-exe files
+>>>>&(2.s-514)	string	BW
+>>>>>0x240	search/0x100	DOS/4G ,\b LE for MS-DOS, DOS4GW DOS extender (embedded)
+>>>>>0x240	search/0x100	!DOS/4G ,\b BW collection for MS-DOS
+
+# This sequence skips to the first COFF segment, usually .text
+>(4.s*512)	leshort		0x014c \b, COFF
+>>(8.s*16)	string		go32stub for MS-DOS, DJGPP go32 DOS extender
+>>(8.s*16)	string		emx
+>>>&1		string		x for DOS, Win or OS/2, emx %s
+>>&(&0x42.l-3)	byte		x 
+>>>&0x26	string		UPX \b, UPX compressed
+# and yet another guess: small .text, and after large .data is unusal, could be 32lite
+>>&0x2c		search/0xa0	.text
+>>>&0x0b	lelong		<0x2000
+>>>>&0		lelong		>0x6000 \b, 32lite compressed
+
+>(8.s*16) string $WdX \b, WDos/X DOS extender
+
+# .EXE formats (Greg Roelofs, newt at uchicago.edu)
+#
+>0x35	string	\x8e\xc0\xb9\x08\x00\xf3\xa5\x4a\x75\xeb\x8e\xc3\x8e\xd8\x33\xff\xbe\x30\x00\x05 \b, aPack compressed
+>0xe7	string	LH/2\ Self-Extract \b, %s
+>0x1c	string	diet \b, diet compressed
+>0x1c	string	LZ09 \b, LZEXE v0.90 compressed
+>0x1c	string	LZ91 \b, LZEXE v0.91 compressed
+>0x1c	string	tz \b, TinyProg compressed
+>0x1e	string	PKLITE \b, %s compressed
+>0x64	string	W\ Collis\0\0 \b, Compack compressed
+>0x24	string	LHa's\ SFX \b, LHa self-extracting archive
+!:mime	application/x-lha
+>0x24	string	LHA's\ SFX \b, LHa self-extracting archive
+!:mime	application/x-lha
+>0x24	string	\ $ARX \b, ARX self-extracting archive
+>0x24	string	\ $LHarc \b, LHarc self-extracting archive
+>0x20	string	SFX\ by\ LARC \b, LARC self-extracting archive
+>1638	string	-lh5- \b, LHa self-extracting archive v2.13S
+>0x17888 string Rar! \b, RAR self-extracting archive
+>0x40	string aPKG \b, aPackage self-extracting archive
+
+>32	 string AIN
+>>35	 string 2		\b, AIN 2.x compressed
+>>35	 string <2		\b, AIN 1.x compressed
+>>35	 string >2		\b, AIN 1.x compressed
+>28	 string UC2X		\b, UCEXE compressed
+>28	 string WWP\  		\b, WWPACK compressed
+
+# skip to the end of the exe
+>(4.s*512)	long	x 
+>>&(2.s-517)	byte	x 
+>>>&0	string		PK\3\4 \b, ZIP self-extracting archive
+>>>&0	string		Rar! \b, RAR self-extracting archive
+>>>&0	string		=!\x11 \b, AIN 2.x self-extracting archive
+>>>&0	string		=!\x12 \b, AIN 2.x self-extracting archive
+>>>&0	string		=!\x17 \b, AIN 1.x self-extracting archive
+>>>&0	string		=!\x18 \b, AIN 1.x self-extracting archive
+>>>&7	search/400	**ACE** \b, ACE self-extracting archive
+>>>&0	search/0x480	UC2SFX\ Header \b, UC2 self-extracting archive
+
+>0x1c	string		RJSX \b, ARJ self-extracting archive
+# winarj stores a message in the stub instead of the sig in the MZ header
+>0x20	search/0xe0	aRJsfX \b, ARJ self-extracting archive
+
+# a few unknown ZIP sfxes, no idea if they are needed or if they are
+# already captured by the generic patterns above
+>122		string		Windows\ self-extracting\ ZIP	\b, ZIP self-extracting archive
+>(8.s*16)	search/0x20	PKSFX \b, ZIP self-extracting archive (PKZIP)
+# TODO: how to add this? >FileSize-34 string Windows\ Self-Installing\ Executable \b, ZIP self-extracting archive
+#
+
+# TELVOX Teleinformatica CODEC self-extractor for OS/2:
+>49801	string	\x79\xff\x80\xff\x76\xff	\b, CODEC archive v3.21
+>>49824 leshort		=1			\b, 1 file
+>>49824 leshort		>1			\b, %u files
+
+# .COM formats (Daniel Quinlan, quinlan at yggdrasil.com)
+# Uncommenting only the first two lines will cover about 2/3 of COM files,
+# but it isn't feasible to match all COM files since there must be at least
+# two dozen different one-byte "magics".
+# test too generic ?
+0	byte		0xe9		DOS executable (COM)
+>0x1FE leshort		0xAA55		\b, boot code
+>6	string		SFX\ of\ LHarc	(%s)
+0	belong	0xffffffff		DOS executable (device driver)
+#CMD640X2.SYS
+>10	string	>\x23			
+>>10	string	!\x2e			
+>>>17	string	<\x5B			
+>>>>10	string	x			\b, name: %.8s
+#UDMA.SYS KEYB.SYS CMD640X2.SYS
+>10	string	<\x41			
+>>12	string	>\x40			
+>>>10	string	!$			
+>>>>12	string	x			\b, name: %.8s
+#BTCDROM.SYS ASPICD.SYS
+>22	string	>\x40			
+>>22	string	<\x5B			
+>>>23	string	<\x5B			
+>>>>22	string	x			\b, name: %.8s
+#ATAPICD.SYS
+>76	string	\0			
+>>77	string	>\x40			
+>>>77	string	<\x5B			
+>>>>77	string	x			\b, name: %.8s
+# test too generic ?
+0	byte		0x8c		DOS executable (COM)
+# updated by Joerg Jenderek at Oct 2008
+0	ulelong		0xffff10eb	DR-DOS executable (COM)
+# byte 0xeb conflicts with "sequent" magic leshort 0xn2eb
+0	ubeshort&0xeb8d	>0xeb00		
+# DR-DOS STACKER.COM SCREATE.SYS missed
+>0	byte		0xeb		DOS executable (COM)
+>>0x1FE leshort		0xAA55		\b, boot code
+>>85	string		UPX		\b, UPX compressed
+>>4	string		\ $ARX		\b, ARX self-extracting archive
+>>4	string		\ $LHarc	\b, LHarc self-extracting archive
+>>0x20e string		SFX\ by\ LARC	\b, LARC self-extracting archive
+# updated by Joerg Jenderek at Oct 2008
+#0	byte		0xb8		COM executable
+0	uleshort&0x80ff	0x00b8		
+# modified by Joerg Jenderek
+>1	lelong		!0x21cd4cff	COM executable for DOS
+# http://syslinux.zytor.com/comboot.php
+# (32-bit COMBOOT) programs *.C32 contain 32-bit code and run in flat-memory 32-bit protected mode
+# start with assembler instructions mov eax,21cd4cffh
+0	uleshort&0xc0ff	0xc0b8		
+>1	lelong		0x21cd4cff	COM executable (32-bit COMBOOT)
+0	string	\x81\xfc		
+>4	string	\x77\x02\xcd\x20\xb9	
+>>36	string	UPX!			FREE-DOS executable (COM), UPX compressed
+252	string Must\ have\ DOS\ version DR-DOS executable (COM)
+# added by Joerg Jenderek at Oct 2008
+# GRR search is not working
+#34	search/2	UPX!		FREE-DOS executable (COM), UPX compressed
+34	string	UPX!			FREE-DOS executable (COM), UPX compressed
+35	string	UPX!			FREE-DOS executable (COM), UPX compressed
+# GRR search is not working
+#2	search/28	\xcd\x21	COM executable for MS-DOS
+#WHICHFAT.cOM
+2	string	\xcd\x21		COM executable for DOS
+#DELTREE.cOM DELTREE2.cOM
+4	string	\xcd\x21		COM executable for DOS
+#IFMEMDSK.cOM ASSIGN.cOM COMP.cOM
+5	string	\xcd\x21		COM executable for DOS
+#DELTMP.COm HASFAT32.cOM
+7	string	\xcd\x21		
+>0	byte	!0xb8			COM executable for DOS
+#COMP.cOM MORE.COm
+10	string	\xcd\x21		
+>5	string	!\xcd\x21		COM executable for DOS
+#comecho.com
+13	string	\xcd\x21		COM executable for DOS
+#HELP.COm EDIT.coM
+18	string	\xcd\x21		COM executable for MS-DOS
+#NWRPLTRM.COm
+23	string	\xcd\x21		COM executable for MS-DOS
+#LOADFIX.cOm LOADFIX.cOm
+30	string	\xcd\x21		COM executable for MS-DOS
+#syslinux.com 3.11
+70	string	\xcd\x21		COM executable for DOS
+# many compressed/converted COMs start with a copy loop instead of a jump
+0x6	search/0xa	\xfc\x57\xf3\xa5\xc3	COM executable for MS-DOS
+0x6	search/0xa	\xfc\x57\xf3\xa4\xc3	COM executable for DOS
+>0x18	search/0x10	\x50\xa4\xff\xd5\x73	\b, aPack compressed
+0x3c	string		W\ Collis\0\0		COM executable for MS-DOS, Compack compressed
+# FIXME: missing diet .com compression
+
+# miscellaneous formats
+0	string		LZ		MS-DOS executable (built-in)
+#0	byte		0xf0		MS-DOS program library data
+#
+
+# AAF files:
+# <stuartc at rd.bbc.co.uk> Stuart Cunningham
+0	string	\320\317\021\340\241\261\032\341AAFB\015\000OM\006\016\053\064\001\001\001\377			AAF legacy file using MS Structured Storage
+>30	byte	9		(512B sectors)
+>30	byte	12		(4kB sectors)
+0	string	\320\317\021\340\241\261\032\341\001\002\001\015\000\002\000\000\006\016\053\064\003\002\001\001			AAF file using MS Structured Storage
+>30	byte	9		(512B sectors)
+>30	byte	12		(4kB sectors)
+
+# Popular applications
+2080	string	Microsoft\ Word\ 6.0\ Document	%s
+!:mime	application/msword
+2080	string	Documento\ Microsoft\ Word\ 6 Spanish Microsoft Word 6 document data
+!:mime	application/msword
+# Pawel Wiecek <coven at i17linuxb.ists.pwr.wroc.pl> (for polish Word)
+2112	string	MSWordDoc			Microsoft Word document data
+!:mime	application/msword
+#
+0	belong	0x31be0000			Microsoft Word Document
+!:mime	application/msword
+#
+0	string	PO^Q`				Microsoft Word 6.0 Document
+!:mime	application/msword
+#
+0	string	\376\067\0\043			Microsoft Office Document
+!:mime	application/msword
+0	string	\333\245-\0\0\0			Microsoft Office Document
+!:mime	application/msword
+512	string		\354\245\301		Microsoft Word Document
+!:mime	application/msword
+#
+2080	string	Microsoft\ Excel\ 5.0\ Worksheet	%s
+!:mime	application/vnd.ms-excel
+
+2080	string	Foglio\ di\ lavoro\ Microsoft\ Exce	%s
+!:mime	application/vnd.ms-excel
+#
+# Pawel Wiecek <coven at i17linuxb.ists.pwr.wroc.pl> (for polish Excel)
+2114	string	Biff5		Microsoft Excel 5.0 Worksheet
+!:mime	application/vnd.ms-excel
+# Italian MS-Excel
+2121	string	Biff5		Microsoft Excel 5.0 Worksheet
+!:mime	application/vnd.ms-excel
+0	string	\x09\x04\x06\x00\x00\x00\x10\x00	Microsoft Excel Worksheet
+!:mime	application/vnd.ms-excel
+#
+0	belong	0x00001a00	Lotus 1-2-3
+!:mime	application/x-123
+>4	belong	0x00100400	wk3 document data
+>4	belong	0x02100400	wk4 document data
+>4	belong	0x07800100	fm3 or fmb document data
+>4	belong	0x07800000	fm3 or fmb document data
+#
+0	belong	0x00000200	Lotus 1-2-3
+!:mime	application/x-123
+>4	belong	0x06040600	wk1 document data
+>4	belong	0x06800200	fmt document data
+0	string		WordPro\0	Lotus WordPro
+!:mime	application/vnd.lotus-wordpro
+0	string		WordPro\r\373	Lotus WordPro
+!:mime	application/vnd.lotus-wordpro
+
+
+# Summary: Script used by InstallScield to uninstall applications
+# Extension: .isu
+# Submitted by: unknown
+# Modified by (1): Abel Cheung <abelcheung at gmail.com> (replace useless entry)
+0		string		\x71\xa8\x00\x00\x01\x02
+>12		string		Stirling\ Technologies,		InstallShield Uninstall Script
+
+# Winamp .avs
+#0	string	Nullsoft\ AVS\ Preset\ \060\056\061\032 A plug in for Winamp ms-windows Freeware media player
+0	string	Nullsoft\ AVS\ Preset\ 	Winamp plug in
+
+# Windows Metafont .WMF
+0	string	\327\315\306\232	ms-windows metafont .wmf
+0	string	\002\000\011\000	ms-windows metafont .wmf
+0	string	\001\000\011\000	ms-windows metafont .wmf
+
+#tz3 files whatever that is (MS Works files)
+0	string	\003\001\001\004\070\001\000\000	tz3 ms-works file
+0	string	\003\002\001\004\070\001\000\000	tz3 ms-works file
+0	string	\003\003\001\004\070\001\000\000	tz3 ms-works file
+
+# PGP sig files .sig
+#0 string \211\000\077\003\005\000\063\237\127 065 to  \027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\077\003\005\000\063\237\127\065\027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\077\003\005\000\063\237\127\066\027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\077\003\005\000\063\237\127\067\027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\077\003\005\000\063\237\127\070\027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\077\003\005\000\063\237\127\071\027\266\151\064\005\045\101\233\021\002 PGP sig
+0 string \211\000\225\003\005\000\062\122\207\304\100\345\042 PGP sig
+
+# windows zips files .dmf
+0	string	MDIF\032\000\010\000\000\000\372\046\100\175\001\000\001\036\001\000 MS Windows special zipped file
+
+
+#ico files
+0	string	\102\101\050\000\000\000\056\000\000\000\000\000\000\000	Icon for MS Windows
+
+# Windows icons (Ian Springer <ips at fpk.hp.com>)
+0	string	\000\000\001\000	MS Windows icon resource
+!:mime	image/x-ico
+>4	byte	1			- 1 icon
+>4	byte	>1			- %d icons
+>>6	byte	>0			\b, %dx
+>>>7	byte	>0			\b%d
+>>8	byte	0			\b, 256-colors
+>>8	byte	>0			\b, %d-colors
+
+
+# .chr files
+0	string	PK\010\010BGI	Borland font 
+>4	string	>\0	%s
+# then there is a copyright notice
+
+
+# .bgi files
+0	string	pk\010\010BGI	Borland device 
+>4	string	>\0	%s
+# then there is a copyright notice
+
+
+# Windows Recycle Bin record file (named INFO2)
+# By Abel Cheung (abelcheung AT gmail dot com)
+# Version 4 always has 280 bytes (0x118) per record, version 5 has 800 bytes
+# Since Vista uses another structure, INFO2 structure probably won't change
+# anymore. Detailed analysis in:
+# http://www.cybersecurityinstitute.biz/downloads/INFO2.pdf
+0	lelong		0x00000004
+>12	lelong		0x00000118	Windows Recycle Bin INFO2 file (Win98 or below)
+
+0	lelong		0x00000005
+>12	lelong		0x00000320	Windows Recycle Bin INFO2 file (Win2k - WinXP)
+
+
+##### put in Either Magic/font or Magic/news
+# Acroread or something	 files wrongly identified as G3	 .pfm
+# these have the form \000 \001 any? \002 \000 \000
+# or \000 \001 any? \022 \000 \000
+#0	string	\000\001 pfm?
+#>3	string	\022\000\000Copyright\	yes
+#>3	string	\002\000\000Copyright\	yes
+#>3	string	>\0	oops, not a font file. Cancel that.
+#it clashes with ttf files so put it lower down.
+
+# From Doug Lee via a FreeBSD pr
+9	string		GERBILDOC	First Choice document
+9	string		GERBILDB	First Choice database
+9	string		GERBILCLIP	First Choice database
+0	string		GERBIL		First Choice device file
+9	string		RABBITGRAPH	RabbitGraph file
+0	string		DCU1		Borland Delphi .DCU file
+0	string		=!<spell>	MKS Spell hash list (old format)
+0	string		=!<spell2>	MKS Spell hash list
+# Too simple - MPi
+#0	string		AH		Halo(TM) bitmapped font file
+0	lelong		0x08086b70	TurboC BGI file
+0	lelong		0x08084b50	TurboC Font file
+
+# WARNING: below line conflicts with Infocom game data Z-machine 3
+0	byte		0x03		DBase 3 data file
+>0x04	lelong		0		(no records)
+>0x04	lelong		>0		(%ld records)
+0	byte		0x83		DBase 3 data file with memo(s)
+>0x04	lelong		0		(no records)
+>0x04	lelong		>0		(%ld records)
+0	leshort		0x0006		DBase 3 index file
+0	string		PMCC		Windows 3.x .GRP file
+1	string		RDC-meg		MegaDots 
+>8	byte		>0x2F		version %c
+>9	byte		>0x2F		\b.%c file
+0	lelong		0x4C
+>4	lelong		0x00021401	Windows shortcut file
+
+# DOS EPS Binary File Header
+# From: Ed Sznyter <ews at Black.Market.NET>
+0	belong		0xC5D0D3C6	DOS EPS Binary File
+>4	long		>0		Postscript starts at byte %d
+>>8	long		>0		length %d
+>>>12	long		>0		Metafile starts at byte %d
+>>>>16	long		>0		length %d
+>>>20	long		>0		TIFF starts at byte %d
+>>>>24	long		>0		length %d
+
+# TNEF magic From "Joomy" <joomy at se-ed.net> 
+# Microsoft Outlook's Transport Neutral Encapsulation Format (TNEF)
+0	leshort		0x223e9f78	TNEF
+!:mime	application/vnd.ms-tnef
+
+# HtmlHelp files (.chm)
+0	string	ITSF\003\000\000\000\x60\000\000\000\001\000\000\000	MS Windows HtmlHelp Data
+
+# GFA-BASIC (Wolfram Kleff)
+2	string		GFA-BASIC3	GFA-BASIC 3 data
+
+#------------------------------------------------------------------------------
+# From Stuart Caie <kyzer at 4u.net> (developer of cabextract)
+# Microsoft Cabinet files
+0	string		MSCF\0\0\0\0	Microsoft Cabinet archive data
+!:mime application/vnd.ms-cab-compressed
+>8	lelong		x		\b, %u bytes
+>28	leshort		1		\b, 1 file
+>28	leshort		>1		\b, %u files
+
+# InstallShield Cabinet files
+0	string		ISc(		InstallShield Cabinet archive data
+>5	byte&0xf0	=0x60		version 6,
+>5	byte&0xf0	!0x60		version 4/5,
+>(12.l+40)	lelong	x		%u files
+
+# Windows CE package files
+0	string		MSCE\0\0\0\0	Microsoft WinCE install header
+>20	lelong		0		\b, architecture-independent
+>20	lelong		103		\b, Hitachi SH3
+>20	lelong		104		\b, Hitachi SH4
+>20	lelong		0xA11		\b, StrongARM
+>20	lelong		4000		\b, MIPS R4000
+>20	lelong		10003		\b, Hitachi SH3
+>20	lelong		10004		\b, Hitachi SH3E
+>20	lelong		10005		\b, Hitachi SH4
+>20	lelong		70001		\b, ARM 7TDMI
+>52	leshort		1		\b, 1 file
+>52	leshort		>1		\b, %u files
+>56	leshort		1		\b, 1 registry entry
+>56	leshort		>1		\b, %u registry entries
+
+
+# Windows Enhanced Metafile (EMF)
+# See msdn.microsoft.com/archive/en-us/dnargdi/html/msdn_enhmeta.asp 
+# for further information.
+0	ulelong 1
+>40	string	\ EMF		Windows Enhanced Metafile (EMF) image data
+>>44	ulelong x		version 0x%x
+
+# From: Alex Beregszaszi <alex at fsn.hu>
+0	string	COWD		VMWare3
+>4	byte	3		disk image
+>>32	lelong	x		(%d/
+>>36	lelong	x		\b%d/
+>>40	lelong	x		\b%d)
+>4	byte	2		undoable disk image
+>>32	string	>\0		(%s)
+
+0	string	VMDK		 VMware4 disk image
+0	string	KDMV		 VMware4 disk image
+
+#--------------------------------------------------------------------
+# Qemu Emulator Images
+# Lines written by Friedrich Schwittay (f.schwittay at yousable.de)
+# Made by reading sources and doing trial and error on existing
+# qcow files
+0	string	QFI	Qemu Image, Format: Qcow
+
+# Uncomment the following line to display Magic (only used for debugging
+# this magic number)
+#>0	string	x	, Magic: %s
+
+# There are currently 2 Versions: "1" and "2"
+# I do not use Version 2 and therefor branch here
+# but can assure: it works (tested on both versions)
+# Also my Qemu 0.9.0 which uses this Version 2 refuses
+# to start in its bios
+>0x04	belong	2	, Version: 2
+>0x04	belong	1	, Version: 1
+
+# Using the existence of the Backing File Offset to Branch or not
+# to read Backing File Information
+>>0xc	 belong	 >0	 , Backing File( Offset: %lu
+>>>(0xc.L)	 string >\0	, Path: %s
+
+# Didn't get the trick here how qemu stores the "Size" at this Position
+# There is actually something stored but nothing makes sense
+# The header in the sources talks about it
+#>>>16	 lelong	 x	 , Size: %lu
+
+# Modification time of the Backing File
+# Really useful if you want to know if your backing
+# file is still usable together with this image
+>>>20	 bedate x	, Mtime: %s )
+
+# Don't know how to calculate in Magicfiles
+# Also: this Information is not reliably
+#	stored in image-files
+>>24	 lelong	 x	 , Disk Size could be: %d * 256 bytes
+
+0	string	QEVM		QEMU's suspend to disk image
+
+0	string	Bochs\ Virtual\ HD\ Image	Bochs disk image,
+>32	string	x				type %s,
+>48	string	x				subtype %s
+
+0	lelong	0x02468ace			Bochs Sparse disk image
+
+# from http://filext.com by Derek M Jones <derek at knosof.co.uk>
+# False positive with PPT (also currently this string is too long)
+#0	string	\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3E\x00\x03\x00\xFE\xFF\x09\x00\x06	Microsoft Installer
+0	string	\320\317\021\340\241\261\032\341	Microsoft Office Document
+#>48	byte	0x1B					Excel Document
+#!:mime application/vnd.ms-excel
+>546	string	bjbj			Microsoft Word Document
+!:mime	application/msword
+>546	string	jbjb			Microsoft Word Document
+!:mime	application/msword
+
+0	string	\224\246\056		Microsoft Word Document
+!:mime	application/msword
+
+512	string	R\0o\0o\0t\0\ \0E\0n\0t\0r\0y	Microsoft Word Document
+!:mime	application/msword
+
+# From: "Nelson A. de Oliveira" <naoliv at gmail.com>
+# Magic type for Dell's BIOS .hdr files
+# Dell's .hdr
+0	string $RBU
+>23	string Dell			%s system BIOS
+>48	string x			version %.3s
+
+# Type: Microsoft DirectDraw Surface
+# URL:	http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/reference/DDSFileReference/ddsfileformat.asp
+# From: Morten Hustveit <morten at debian.org>
+0	string	DDS\040\174\000\000\000 Microsoft DirectDraw Surface (DDS),
+>16	lelong	>0			%hd x
+>12	lelong	>0			%hd,
+>84	string	x			%.4s
+
+# Type: Microsoft Document Imaging Format (.mdi)
+# URL:	http://en.wikipedia.org/wiki/Microsoft_Document_Imaging_Format
+# From: Daniele Sempione <scrows at oziosi.org>
+0	short	0x5045			Microsoft Document Imaging Format
+
+# MS eBook format (.lit)
+0	string	ITOLITLS		Microsoft Reader eBook Data
+>8	lelong	x			\b, version %u
+!:mime					application/x-ms-reader
+
+#------------------------------------------------------------------------------
+# $File: msvc,v 1.5 2009/09/19 16:28:11 christos Exp $
+# msvc:  file(1) magic for msvc
+# "H. Nanosecond" <aldomel at ix.netcom.com>
+# Microsoft visual C
+# 
+# I have version 1.0
+
+# .aps
+0	string	HWB\000\377\001\000\000\000	Microsoft Visual C .APS file
+
+# .ide
+#too long 0	string	\102\157\162\154\141\156\144\040\103\053\053\040\120\162\157\152\145\143\164\040\106\151\154\145\012\000\032\000\002\000\262\000\272\276\372\316	MSVC .ide
+0	string	\102\157\162\154\141\156\144\040\103\053\053\040\120\162\157	MSVC .ide
+
+# .res
+0	string	\000\000\000\000\040\000\000\000\377	MSVC .res
+0	string	\377\003\000\377\001\000\020\020\350	MSVC .res
+0	string	\377\003\000\377\001\000\060\020\350	MSVC .res
+
+#.lib
+0	string	\360\015\000\000	Microsoft Visual C library
+0	string	\360\075\000\000	Microsoft Visual C library
+0	string	\360\175\000\000	Microsoft Visual C library
+
+#.pch
+0	string	DTJPCH0\000\022\103\006\200	Microsoft Visual C .pch
+
+# .pdb
+# too long 0	string	Microsoft\ C/C++\ program\ database\ 
+0	string	Microsoft\ C/C++\ 	MSVC program database
+>18	string	program\ database\ 	
+>33	string	>\0	ver %s
+
+#.sbr
+0	string	\000\002\000\007\000	MSVC .sbr
+>5	string 	>\0	%s
+
+#.bsc
+0	string	\002\000\002\001	MSVC .bsc
+
+#.wsp
+0	string	1.00\ .0000.0000\000\003	MSVC .wsp version 1.0000.0000
+# these seem to start with the version and contain menus
+
+# ------------------------------------------------------------------------
+# $File: mup,v 1.4 2009/09/19 16:28:11 christos Exp $
+# mup: file(1) magic for Mup (Music Publisher) input file.
+#
+# From: Abel Cheung <abel (@) oaka.org>
+#
+# NOTE: This header is mainly proposed in the Arkkra mailing list,
+# and is not a mandatory header because of old mup input file
+# compatibility. Noteedit also use mup format, but is not forcing
+# user to use any header as well.
+#
+0		search/1	//!Mup		Mup music publication program input text
+>6		string		-Arkkra		(Arkkra)
+>>13		string		-		
+>>>16		string		.		
+>>>>14		string		x		\b, need V%.4s
+>>>15		string		.		
+>>>>14		string		x		\b, need V%.3s
+>6		string		-		
+>>9		string		.		
+>>>7		string		x		\b, need V%.4s
+>>8		string		.		
+>>>7		string		x		\b, need V%.3s
+
+#-----------------------------------------------------------------------------
+# $File: natinst,v 1.4 2009/09/19 16:28:11 christos Exp $
+# natinst:  file(1) magic for National Instruments Code Files
+
+#
+# From <egamez at fcfm.buap.mx> Enrique G�mez-Flores
+# version 1
+# Many formats still missing, we use, for the moment LabVIEW
+# We guess VXI format file. VISA, LabWindowsCVI, BridgeVIEW, etc, are missing
+#
+0       string          RSRC            National Instruments,
+# Check if it's a LabVIEW File
+>8      string          LV              LabVIEW File,
+# Check wich kind of file is
+>>10    string          SB              Code Resource File, data
+>>10    string          IN              Virtual Instrument Program, data
+>>10    string          AR              VI Library, data
+# This is for Menu Libraries
+>8      string          LMNULBVW        Portable File Names, data
+# This is for General Resources
+>8      string          rsc             Resources File, data
+# This is for VXI Package
+0       string          VMAP            National Instruments, VXI File, data
+
+#------------------------------------------------------------------------------
+# $File: ncr,v 1.7 2009/09/19 16:28:11 christos Exp $
+# ncr:  file(1) magic for NCR Tower objects
+#
+# contributed by
+# Michael R. Wayne  ***  TMC & Associates  ***  INTERNET: wayne at ford-vax.arpa
+# uucp: {philabs | pyramid} !fmsrl7!wayne   OR   wayne at fmsrl7.UUCP
+#
+0	beshort		000610	Tower/XP rel 2 object
+>12	   belong		>0	not stripped
+>20	   beshort		0407	executable
+>20	   beshort		0410	pure executable
+>22	   beshort		>0	- version %ld
+0	beshort		000615	Tower/XP rel 2 object
+>12	   belong		>0	not stripped
+>20	   beshort		0407	executable
+>20	   beshort		0410	pure executable
+>22	   beshort		>0	- version %ld
+0	beshort		000620	Tower/XP rel 3 object
+>12	   belong		>0	not stripped
+>20	   beshort		0407	executable
+>20	   beshort		0410	pure executable
+>22	   beshort		>0	- version %ld
+0	beshort		000625	Tower/XP rel 3 object
+>12	   belong		>0	not stripped
+>20	   beshort		0407	executable
+>20	   beshort		0410	pure executable
+>22	   beshort		>0	- version %ld
+0	beshort		000630	Tower32/600/400 68020 object
+>12	   belong		>0	not stripped
+>20	   beshort		0407	executable
+>20	   beshort		0410	pure executable
+>22	   beshort		>0	- version %ld
+0	beshort		000640	Tower32/800 68020
+>18	   beshort		&020000	w/68881 object
+>18	   beshort		&040000	compatible object
+>18	   beshort		&060000	object
+>20	   beshort		0407	executable
+>20	   beshort		0413	pure executable
+>12	   belong		>0	not stripped
+>22	   beshort		>0	- version %ld
+0	beshort		000645	Tower32/800 68010
+>18	   beshort		&040000	compatible object
+>18	   beshort		&060000 object
+>20	   beshort		0407	executable
+>20	   beshort		0413	pure executable
+>12	   belong		>0	not stripped
+>22	   beshort		>0	- version %ld
+
+#------------------------------------------------------------------------------
+# $File: netbsd,v 1.18 2009/09/19 16:28:11 christos Exp $
+# netbsd:  file(1) magic for NetBSD objects
+#
+# All new-style magic numbers are in network byte order.
+#
+
+0	lelong			000000407	a.out NetBSD little-endian object file
+>16	lelong			>0		not stripped
+0	belong			000000407	a.out NetBSD big-endian object file
+>16	belong			>0		not stripped
+
+0	belong&0377777777	041400413	a.out NetBSD/i386 demand paged
+>0	byte			&0x80		
+>>20	lelong			<4096		shared library
+>>20	lelong			=4096		dynamically linked executable
+>>20	lelong			>4096		dynamically linked executable
+>0	byte			^0x80		executable
+>16	lelong			>0		not stripped
+0	belong&0377777777	041400410	a.out NetBSD/i386 pure
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80		executable
+>16	lelong			>0		not stripped
+0	belong&0377777777	041400407	a.out NetBSD/i386
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80
+>>0	byte			&0x40		position independent
+>>20	lelong			!0		executable
+>>20	lelong			=0		object file
+>16	lelong			>0		not stripped
+0	belong&0377777777	041400507	a.out NetBSD/i386 core
+>12	string			>\0		from '%s'
+>32	lelong			!0		(signal %d)
+
+0	belong&0377777777	041600413	a.out NetBSD/m68k demand paged
+>0	byte			&0x80		
+>>20	belong			<8192		shared library
+>>20	belong			=8192		dynamically linked executable
+>>20	belong			>8192		dynamically linked executable
+>0	byte			^0x80		executable
+>16	belong			>0		not stripped
+0	belong&0377777777	041600410	a.out NetBSD/m68k pure
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80		executable
+>16	belong			>0		not stripped
+0	belong&0377777777	041600407	a.out NetBSD/m68k
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80
+>>0	byte			&0x40		position independent
+>>20	belong			!0		executable
+>>20	belong			=0		object file
+>16	belong			>0		not stripped
+0	belong&0377777777	041600507	a.out NetBSD/m68k core
+>12	string			>\0		from '%s'
+>32	belong			!0		(signal %d)
+
+0	belong&0377777777	042000413	a.out NetBSD/m68k4k demand paged
+>0	byte			&0x80		
+>>20	belong			<4096		shared library
+>>20	belong			=4096		dynamically linked executable
+>>20	belong			>4096		dynamically linked executable
+>0	byte			^0x80		executable
+>16	belong			>0		not stripped
+0	belong&0377777777	042000410	a.out NetBSD/m68k4k pure
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80		executable
+>16	belong			>0		not stripped
+0	belong&0377777777	042000407	a.out NetBSD/m68k4k
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80
+>>0	byte			&0x40		position independent
+>>20	belong			!0		executable
+>>20	belong			=0		object file
+>16	belong			>0		not stripped
+0	belong&0377777777	042000507	a.out NetBSD/m68k4k core
+>12	string			>\0		from '%s'
+>32	belong			!0		(signal %d)
+
+0	belong&0377777777	042200413	a.out NetBSD/ns32532 demand paged
+>0	byte			&0x80		
+>>20	lelong			<4096		shared library
+>>20	lelong			=4096		dynamically linked executable
+>>20	lelong			>4096		dynamically linked executable
+>0	byte			^0x80		executable
+>16	lelong			>0		not stripped
+0	belong&0377777777	042200410	a.out NetBSD/ns32532 pure
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80		executable
+>16	lelong			>0		not stripped
+0	belong&0377777777	042200407	a.out NetBSD/ns32532
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80
+>>0	byte			&0x40		position independent
+>>20	lelong			!0		executable
+>>20	lelong			=0		object file
+>16	lelong			>0		not stripped
+0	belong&0377777777	042200507	a.out NetBSD/ns32532 core
+>12	string			>\0		from '%s'
+>32	lelong			!0		(signal %d)
+
+0	belong&0377777777	045200507	a.out NetBSD/powerpc core
+>12	string			>\0		from '%s'
+
+0	belong&0377777777	042400413	a.out NetBSD/sparc demand paged
+>0	byte			&0x80		
+>>20	belong			<8192		shared library
+>>20	belong			=8192		dynamically linked executable
+>>20	belong			>8192		dynamically linked executable
+>0	byte			^0x80		executable
+>16	belong			>0		not stripped
+0	belong&0377777777	042400410	a.out NetBSD/sparc pure
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80		executable
+>16	belong			>0		not stripped
+0	belong&0377777777	042400407	a.out NetBSD/sparc
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80
+>>0	byte			&0x40		position independent
+>>20	belong			!0		executable
+>>20	belong			=0		object file
+>16	belong			>0		not stripped
+0	belong&0377777777	042400507	a.out NetBSD/sparc core
+>12	string			>\0		from '%s'
+>32	belong			!0		(signal %d)
+
+0	belong&0377777777	042600413	a.out NetBSD/pmax demand paged
+>0	byte			&0x80		
+>>20	lelong			<4096		shared library
+>>20	lelong			=4096		dynamically linked executable
+>>20	lelong			>4096		dynamically linked executable
+>0	byte			^0x80		executable
+>16	lelong			>0		not stripped
+0	belong&0377777777	042600410	a.out NetBSD/pmax pure
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80		executable
+>16	lelong			>0		not stripped
+0	belong&0377777777	042600407	a.out NetBSD/pmax
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80
+>>0	byte			&0x40		position independent
+>>20	lelong			!0		executable
+>>20	lelong			=0		object file
+>16	lelong			>0		not stripped
+0	belong&0377777777	042600507	a.out NetBSD/pmax core
+>12	string			>\0		from '%s'
+>32	lelong			!0		(signal %d)
+
+0	belong&0377777777	043000413	a.out NetBSD/vax 1k demand paged
+>0	byte			&0x80		
+>>20	lelong			<4096		shared library
+>>20	lelong			=4096		dynamically linked executable
+>>20	lelong			>4096		dynamically linked executable
+>0	byte			^0x80		executable
+>16	lelong			>0		not stripped
+0	belong&0377777777	043000410	a.out NetBSD/vax 1k pure
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80		executable
+>16	lelong			>0		not stripped
+0	belong&0377777777	043000407	a.out NetBSD/vax 1k
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80
+>>0	byte			&0x40		position independent
+>>20	lelong			!0		executable
+>>20	lelong			=0		object file
+>16	lelong			>0		not stripped
+0	belong&0377777777	043000507	a.out NetBSD/vax 1k core
+>12	string			>\0		from '%s'
+>32	lelong			!0		(signal %d)
+
+0	belong&0377777777	045400413	a.out NetBSD/vax 4k demand paged
+>0	byte			&0x80		
+>>20	lelong			<4096		shared library
+>>20	lelong			=4096		dynamically linked executable
+>>20	lelong			>4096		dynamically linked executable
+>0	byte			^0x80		executable
+>16	lelong			>0		not stripped
+0	belong&0377777777	045400410	a.out NetBSD/vax 4k pure
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80		executable
+>16	lelong			>0		not stripped
+0	belong&0377777777	045400407	a.out NetBSD/vax 4k
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80
+>>0	byte			&0x40		position independent
+>>20	lelong			!0		executable
+>>20	lelong			=0		object file
+>16	lelong			>0		not stripped
+0	belong&0377777777	045400507	a.out NetBSD/vax 4k core
+>12	string			>\0		from '%s'
+>32	lelong			!0		(signal %d)
+
+# NetBSD/alpha does not support (and has never supported) a.out objects,
+# so no rules are provided for them.  NetBSD/alpha ELF objects are 
+# dealt with in "elf".
+0	lelong		0x00070185		ECOFF NetBSD/alpha binary
+>10	leshort		0x0001			not stripped
+>10	leshort		0x0000			stripped
+0	belong&0377777777	043200507	a.out NetBSD/alpha core
+>12	string			>\0		from '%s'
+>32	lelong			!0		(signal %d)
+
+0	belong&0377777777	043400413	a.out NetBSD/mips demand paged
+>0	byte			&0x80		
+>>20	belong			<8192		shared library
+>>20	belong			=8192		dynamically linked executable
+>>20	belong			>8192		dynamically linked executable
+>0	byte			^0x80		executable
+>16	belong			>0		not stripped
+0	belong&0377777777	043400410	a.out NetBSD/mips pure
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80		executable
+>16	belong			>0		not stripped
+0	belong&0377777777	043400407	a.out NetBSD/mips
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80
+>>0	byte			&0x40		position independent
+>>20	belong			!0		executable
+>>20	belong			=0		object file
+>16	belong			>0		not stripped
+0	belong&0377777777	043400507	a.out NetBSD/mips core
+>12	string			>\0		from '%s'
+>32	belong			!0		(signal %d)
+
+0	belong&0377777777	043600413	a.out NetBSD/arm32 demand paged
+>0	byte			&0x80
+>>20	lelong			<4096		shared library
+>>20	lelong			=4096		dynamically linked executable
+>>20	lelong			>4096		dynamically linked executable
+>0	byte			^0x80		executable
+>16	lelong			>0		not stripped
+0	belong&0377777777	043600410	a.out NetBSD/arm32 pure
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80		executable
+>16	lelong			>0		not stripped
+0	belong&0377777777	043600407	a.out NetBSD/arm32
+>0	byte			&0x80		dynamically linked executable
+>0	byte			^0x80
+>>0	byte			&0x40		position independent
+>>20	lelong			!0		executable
+>>20	lelong			=0		object file
+>16	lelong			>0		not stripped
+# NetBSD/arm26 has always used ELF objects, but it shares a core file
+# format with NetBSD/arm32.
+0	belong&0377777777	043600507	a.out NetBSD/arm core
+>12	string			>\0		from '%s'
+>32	lelong			!0		(signal %d)
+
+#------------------------------------------------------------------------------
+# $File: netscape,v 1.6 2009/09/19 16:28:11 christos Exp $
+# netscape:  file(1) magic for Netscape files
+# "H. Nanosecond" <aldomel at ix.netcom.com>
+# version 3 and 4 I think
+#
+
+# Netscape Address book  .nab
+0	string \000\017\102\104\000\000\000\000\000\000\001\000\000\000\000\002\000\000\000\002\000\000\004\000 Netscape Address book
+
+# Netscape Communicator address book
+0   string   \000\017\102\111 Netscape Communicator address book
+
+# .snm Caches
+0	string		#\ Netscape\ folder\ cache	Netscape folder cache
+0	string	\000\036\204\220\000	Netscape folder cache
+# .n2p 
+# Net 2 Phone 
+#0	string	123\130\071\066\061\071\071\071\060\070\061\060\061\063\060
+0	string	SX961999	Net2phone
+
+#
+#This is files ending in .art, FIXME add more rules
+0       string          JG\004\016\0\0\0\0      ART
+
+#------------------------------------------------------------------------------
+# $File: netware,v 1.4 2009/09/19 16:28:11 christos Exp $
+# netware:  file(1) magic for NetWare Loadable Modules (NLMs)
+# From: Mads Martin Joergensen <mmj at suse.de>
+
+0	string	NetWare\ Loadable\ Module	NetWare Loadable Module
+
+#------------------------------------------------------------------------------
+# $File: news,v 1.6 2009/09/19 16:28:11 christos Exp $
+# news:  file(1) magic for SunOS NeWS fonts (not "news" as in "netnews")
+#
+0	string		StartFontMetrics	ASCII font metrics
+0	string		StartFont	ASCII font bits
+0	belong		0x137A2944	NeWS bitmap font
+0	belong		0x137A2947	NeWS font family
+0	belong		0x137A2950	scalable OpenFont binary
+0	belong		0x137A2951	encrypted scalable OpenFont binary
+8	belong		0x137A2B45	X11/NeWS bitmap font
+8	belong		0x137A2B48	X11/NeWS font family
+
+#------------------------------------------------------------------------------
+# $File: nitpicker,v 1.4 2009/09/19 16:28:11 christos Exp $
+# nitpicker:  file(1) magic for Flowfiles.
+# From: Christian Jachmann <C.Jachmann at gmx.net> http://www.nitpicker.de
+0	string	NPFF	NItpicker Flow File 
+>4	byte	x	V%d.
+>5	byte	x	%d
+>6	bedate	x	started: %s
+>10	bedate	x	stopped: %s
+>14	belong	x	Bytes: %u
+>18	belong	x	Bytes1: %u
+>22	belong	x	Flows: %u
+>26	belong	x	Pkts: %u
+
+#------------------------------------------------------------------------------
+# $File: ocaml,v 1.4 2009/09/19 16:28:11 christos Exp $
+# ocaml: file(1) magic for Objective Caml files.
+0	string	Caml1999	Objective caml
+>8	string	X		exec file
+>8	string	I		interface file (.cmi)
+>8	string	O		object file (.cmo)
+>8	string	A		library file (.cma)
+>8	string	Y		native object file (.cmx)
+>8	string	Z		native library file (.cmxa)
+>8	string	M		abstract syntax tree implementation file
+>8	string	N		abstract syntax tree interface file
+>9	string	>\0		(Version %3.3s).
+
+#------------------------------------------------------------------------------
+# $File: octave,v 1.4 2009/09/19 16:28:11 christos Exp $
+# octave binary data file(1) magic, from Dirk Eddelbuettel <edd at debian.org>
+0	string		Octave-1-L	Octave binary data (little endian)
+0	string		Octave-1-B	Octave binary data (big endian)
+
+#------------------------------------------------------------------------------
+# $File: ole2compounddocs,v 1.4 2009/09/19 16:28:11 christos Exp $
+# Microsoft OLE 2 Compound Documents : file(1) magic for Microsoft Structured
+# storage (http://en.wikipedia.org/wiki/Structured_Storage)
+# Additional tests for OLE 2 Compound Documents should be under this recipe.
+
+0   string  \320\317\021\340\241\261\032\341      OLE 2 Compound Document
+# - Microstation V8 DGN files (www.bentley.com)
+#   Last update on 10/23/2006 by Lester Hightower
+> 0x480  string  D\000g\000n\000~\000H                : Microstation V8 DGN
+# - Visio documents
+#   Last update on 10/23/2006 by Lester Hightower
+> 0x480  string  V\000i\000s\000i\000o\000D\000o\000c : Visio Document
+
+#------------------------------------------------------------------------------
+# $File: olf,v 1.4 2009/09/19 16:28:11 christos Exp $
+# olf:  file(1) magic for OLF executables
+#
+# We have to check the byte order flag to see what byte order all the
+# other stuff in the header is in.
+#
+# MIPS R3000 may also be for MIPS R2000.
+# What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
+#
+# Created by Erik Theisen <etheisen at openbsd.org>
+# Based on elf from Daniel Quinlan <quinlan at yggdrasil.com>
+0	string		\177OLF		OLF
+>4	byte		0		invalid class
+>4	byte		1		32-bit
+>4	byte		2		64-bit
+>7	byte		0		invalid os
+>7	byte		1		OpenBSD
+>7	byte		2		NetBSD
+>7	byte		3		FreeBSD
+>7	byte		4		4.4BSD
+>7	byte		5		Linux
+>7	byte		6		SVR4
+>7	byte		7		esix
+>7	byte		8		Solaris
+>7	byte		9		Irix
+>7	byte		10		SCO
+>7	byte		11		Dell
+>7	byte		12		NCR
+>5	byte		0		invalid byte order
+>5	byte		1		LSB
+>>16	leshort		0		no file type,
+>>16	leshort		1		relocatable,
+>>16	leshort		2		executable,
+>>16	leshort		3		shared object,
+# Core handling from Peter Tobias <tobias at server.et-inf.fho-emden.de>
+# corrections by Christian 'Dr. Disk' Hechelmann <drdisk at ds9.au.s.shuttle.de>
+>>16	leshort		4		core file
+>>>(0x38+0xcc) string	>\0		of '%s'
+>>>(0x38+0x10) lelong	>0		(signal %d),
+>>16	leshort		&0xff00		processor-specific,
+>>18	leshort		0		no machine,
+>>18	leshort		1		AT&T WE32100 - invalid byte order,
+>>18	leshort		2		SPARC - invalid byte order,
+>>18	leshort		3		Intel 80386,
+>>18	leshort		4		Motorola 68000 - invalid byte order,
+>>18	leshort		5		Motorola 88000 - invalid byte order,
+>>18	leshort		6		Intel 80486,
+>>18	leshort		7		Intel 80860,
+>>18	leshort		8		MIPS R3000_BE - invalid byte order,
+>>18	leshort		9		Amdahl - invalid byte order,
+>>18	leshort		10		MIPS R3000_LE,
+>>18	leshort		11		RS6000 - invalid byte order,
+>>18	leshort		15		PA-RISC - invalid byte order,
+>>18	leshort		16		nCUBE,
+>>18	leshort		17		VPP500,
+>>18	leshort		18		SPARC32PLUS,
+>>18	leshort		20		PowerPC,
+>>18	leshort		0x9026		Alpha,
+>>20	lelong		0		invalid version
+>>20	lelong		1		version 1
+>>36	lelong		1		MathCoPro/FPU/MAU Required
+>8	string		>\0		(%s)
+>5	byte		2		MSB
+>>16	beshort		0		no file type,
+>>16	beshort		1		relocatable,
+>>16	beshort		2		executable,
+>>16	beshort		3		shared object,
+>>16	beshort		4		core file,
+>>>(0x38+0xcc) string	>\0		of '%s'
+>>>(0x38+0x10) belong	>0		(signal %d),
+>>16	beshort		&0xff00		processor-specific,
+>>18	beshort		0		no machine,
+>>18	beshort		1		AT&T WE32100,
+>>18	beshort		2		SPARC,
+>>18	beshort		3		Intel 80386 - invalid byte order,
+>>18	beshort		4		Motorola 68000,
+>>18	beshort		5		Motorola 88000,
+>>18	beshort		6		Intel 80486 - invalid byte order,
+>>18	beshort		7		Intel 80860,
+>>18	beshort		8		MIPS R3000_BE,
+>>18	beshort		9		Amdahl,
+>>18	beshort		10		MIPS R3000_LE - invalid byte order,
+>>18	beshort		11		RS6000,
+>>18	beshort		15		PA-RISC,
+>>18	beshort		16		nCUBE,
+>>18	beshort		17		VPP500,
+>>18	beshort		18		SPARC32PLUS,
+>>18	beshort		20		PowerPC or cisco 4500,
+>>18	beshort		21		cisco 7500,
+>>18	beshort		24		cisco SVIP,
+>>18	beshort		25		cisco 7200,
+>>18	beshort		36		cisco 12000,
+>>18	beshort		0x9026		Alpha,
+>>20	belong		0		invalid version
+>>20	belong		1		version 1
+>>36	belong		1		MathCoPro/FPU/MAU Required
+
+#------------------------------------------------------------------------------
+# $File: os2,v 1.7 2009/09/19 16:28:11 christos Exp $
+# os2:  file(1) magic for OS/2 files
+#
+
+# Provided 1998/08/22 by
+# David Mediavilla <davidme.news at REMOVEIFNOTSPAMusa.net>
+1	search/1	InternetShortcut	MS Windows 95 Internet shortcut text
+>24	search/1	>\ 			(URL=<%s>)
+
+# OS/2 URL objects
+# Provided 1998/08/22 by
+# David Mediavilla <davidme.news at REMOVEIFNOTSPAMusa.net>
+#0	string	http:			OS/2 URL object text
+#>5	string	>\			(WWW) <http:%s>
+#0	string	mailto:			OS/2 URL object text
+#>7	string	>\			(email) <%s>
+#0	string	news:			OS/2 URL object text
+#>5	string	>\			(Usenet) <%s>
+#0	string	ftp:			OS/2 URL object text
+#>4	string	>\			(FTP) <ftp:%s>
+#0	string	file:			OS/2 URL object text
+#>5	string	>\			(Local file) <%s>
+
+# >>>>> OS/2 INF/HLP <<<<<  (source: Daniel Dissett ddissett at netcom.com)
+# Carl Hauser (chauser.parc at xerox.com) and 
+# Marcus Groeber (marcusg at ph-cip.uni-koeln.de)
+# list the following header format in inf02a.doc:
+#
+#  int16 ID;           // ID magic word (5348h = "HS")
+#  int8  unknown1;     // unknown purpose, could be third letter of ID
+#  int8  flags;        // probably a flag word...
+#                      //  bit 0: set if INF style file
+#                      //  bit 4: set if HLP style file
+#                      // patching this byte allows reading HLP files
+#                      // using the VIEW command, while help files 
+#                      // seem to work with INF settings here as well.
+#  int16 hdrsize;      // total size of header
+#  int16 unknown2;     // unknown purpose
+# 
+0   string  HSP\x01\x9b\x00 OS/2 INF
+>107 string >0                      (%s)
+0   string  HSP\x10\x9b\x00     OS/2 HLP
+>107 string >0                      (%s)
+
+# OS/2 INI (this is a guess)
+0  string   \xff\xff\xff\xff\x14\0\0\0  OS/2 INI
+
+#------------------------------------------------------------------------------
+# $File: os400,v 1.5 2009/09/19 16:28:11 christos Exp $
+# os400:  file(1) magic for IBM OS/400 files
+#
+# IBM OS/400 (i5/OS) Save file (SAVF) - gerardo.cacciari at gmail.com
+# In spite of its quite variable format (due to internal memory page
+# length differences between CISC and RISC versions of the OS) the
+# SAVF structure hasn't suitable offsets to identify the catalog
+# header in the first descriptor where there are some useful infos,
+# so we must search in a somewhat large area for a particular string
+# that represents the EBCDIC encoding of 'QSRDSSPC' (save/restore
+# descriptor space) preceded by a two byte constant.
+#
+1090	 search/7393	\x19\xDB\xD8\xE2\xD9\xC4\xE2\xE2\xD7\xC3 IBM OS/400 save file data
+>&212	 byte		0x01			 \b, created with SAVOBJ
+>&212	 byte		0x02			 \b, created with SAVLIB
+>&212	 byte		0x07			 \b, created with SAVCFG
+>&212	 byte		0x08			 \b, created with SAVSECDTA
+>&212	 byte		0x0A			 \b, created with SAVSECDTA
+>&212	 byte		0x0B			 \b, created with SAVDLO
+>&212	 byte		0x0D			 \b, created with SAVLICPGM
+>&212	 byte		0x11			 \b, created with SAVCHGOBJ
+>&213	 byte		0x44			 \b, at least V5R4 to open
+>&213	 byte		0x43			 \b, at least V5R3 to open
+>&213	 byte		0x42			 \b, at least V5R2 to open
+>&213	 byte		0x41			 \b, at least V5R1 to open
+>&213	 byte		0x40			 \b, at least V4R5 to open
+>&213	 byte		0x3F			 \b, at least V4R4 to open
+>&213	 byte		0x3E			 \b, at least V4R3 to open
+>&213	 byte		0x3C			 \b, at least V4R2 to open
+>&213	 byte		0x3D			 \b, at least V4R1M4 to open
+>&213	 byte		0x3B			 \b, at least V4R1 to open
+>&213	 byte		0x3A			 \b, at least V3R7 to open
+>&213	 byte		0x35			 \b, at least V3R6 to open
+>&213	 byte		0x36			 \b, at least V3R2 to open
+>&213	 byte		0x34			 \b, at least V3R1 to open
+>&213	 byte		0x31			 \b, at least V3R0M5 to open
+>&213	 byte		0x30			 \b, at least V2R3 to open
+
+#------------------------------------------------------------------------------
+# $File: os9,v 1.6 2009/09/19 16:28:11 christos Exp $
+#
+# Copyright (c) 1996 Ignatios Souvatzis. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+#    must display the following acknowledgement:
+#      This product includes software developed by Ignatios Souvatzis for
+#      the NetBSD project.
+# 4. The name of the author may not be used to endorse or promote products
+#    derived from this software without specific prior written permission.
+#
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#
+#
+# OS9/6809 module descriptions:
+#
+0	beshort		0x87CD	OS9/6809 module:
+#
+>6	byte&0x0f	0x00	non-executable
+>6	byte&0x0f	0x01	machine language
+>6	byte&0x0f	0x02	BASIC I-code
+>6	byte&0x0f	0x03	Pascal P-code
+>6	byte&0x0f	0x04	C I-code
+>6	byte&0x0f	0x05	COBOL I-code
+>6	byte&0x0f	0x06	Fortran I-code
+#
+>6	byte&0xf0	0x10	program executable
+>6	byte&0xf0	0x20	subroutine
+>6	byte&0xf0	0x30	multi-module
+>6	byte&0xf0	0x40	data module
+#
+>6	byte&0xf0	0xC0	system module
+>6	byte&0xf0	0xD0	file manager
+>6	byte&0xf0	0xE0	device driver
+>6	byte&0xf0	0xF0	device descriptor
+#
+# OS9/m68k stuff (to be continued)
+#
+0	beshort		0x4AFC	OS9/68K module:
+#
+# attr
+>0x14	byte&0x80	0x80	re-entrant
+>0x14	byte&0x40	0x40	ghost
+>0x14	byte&0x20	0x20	system-state
+#
+# lang:
+#
+>0x13	byte		1	machine language
+>0x13	byte		2	BASIC I-code
+>0x13	byte		3	Pascal P-code
+>0x13	byte		4	C I-code
+>0x13	byte		5	COBOL I-code
+>0x13	byte		6	Fortran I-code
+#
+#
+# type:
+#
+>0x12	byte		1	program executable
+>0x12	byte		2	subroutine
+>0x12	byte		3	multi-module
+>0x12	byte		4	data module
+>0x12	byte		11	trap library
+>0x12	byte		12	system module
+>0x12	byte		13	file manager
+>0x12	byte		14	device driver
+>0x12	byte		15	device descriptor
+
+#------------------------------------------------------------------------------
+# $File: osf1,v 1.7 2009/09/19 16:28:11 christos Exp $
+#
+# Mach magic number info
+#
+0	long		0xefbe	OSF/Rose object
+# I386 magic number info
+#
+0	short		0565	i386 COFF object
+
+#------------------------------------------------------------------------------
+# $File: palm,v 1.7 2009/09/19 16:28:11 christos Exp $
+# palm:  file(1) magic for PalmOS {.prc,.pdb}: applications, docfiles, and hacks
+#
+# Brian Lalor <blalor at hcirisc.cs.binghamton.edu>
+
+# appl
+60      belong                  0x6170706c      PalmOS application
+>0      string                  >\0             "%s"
+# TEXt
+60      belong                  0x54455874      AportisDoc file
+>0      string                  >\0             "%s"
+# HACK
+60      belong                  0x4841434b      HackMaster hack
+>0      string                  >\0             "%s"
+
+# Variety of PalmOS document types
+# Michael-John Turner <mj at debian.org>
+# Thanks to Hasan Umit Ezerce <humit at tr-net.net.tr> for his DocType
+60	string	                BVokBDIC	BDicty PalmOS document
+>0	string                  >\0             "%s"
+60	string	                DB99DBOS	DB PalmOS document
+>0	string                  >\0             "%s"
+60	string	                vIMGView	FireViewer/ImageViewer PalmOS document
+>0	string                  >\0             "%s"
+60	string	                PmDBPmDB	HanDBase PalmOS document
+>0	string                  >\0             "%s"
+60	string	                InfoINDB	InfoView PalmOS document
+>0	string                  >\0             "%s"
+60	string	                ToGoToGo	iSilo PalmOS document
+>0	string                  >\0             "%s"
+60	string	                JfDbJBas	JFile PalmOS document
+>0	string                  >\0             "%s"
+60	string	                JfDbJFil	JFile Pro PalmOS document
+>0	string                  >\0             "%s"
+60	string	                DATALSdb	List PalmOS document
+>0	string                  >\0             "%s"
+60	string	                Mdb1Mdb1	MobileDB PalmOS document
+>0	string                  >\0             "%s"
+60	string	                PNRdPPrs	PeanutPress PalmOS document
+>0	string                  >\0             "%s"
+60	string	                DataPlkr	Plucker PalmOS document
+>0	string                  >\0             "%s"
+60	string	                DataSprd	QuickSheet PalmOS document
+>0	string                  >\0             "%s"
+60	string	                SM01SMem	SuperMemo PalmOS document
+>0	string                  >\0             "%s"
+60	string	                TEXtTlDc	TealDoc PalmOS document
+>0	string                  >\0             "%s"
+60	string	                InfoTlIf	TealInfo PalmOS document
+>0	string                  >\0             "%s"
+60	string	                DataTlMl	TealMeal PalmOS document
+>0	string                  >\0             "%s"
+60	string	                DataTlPt	TealPaint PalmOS document
+>0	string                  >\0             "%s"
+60	string	                dataTDBP	ThinkDB PalmOS document
+>0	string                  >\0             "%s"
+60	string	                TdatTide	Tides PalmOS document
+>0	string                  >\0             "%s"
+60	string	                ToRaTRPW	TomeRaider PalmOS document
+>0	string                  >\0             "%s"
+
+# A GutenPalm zTXT etext for use on Palm Pilots (http://gutenpalm.sf.net)
+# For version 1.xx zTXTs, outputs version and numbers of bookmarks and
+#   annotations.
+# For other versions, just outputs version.
+#
+60		string		zTXT		A GutenPalm zTXT e-book
+>0		string		>\0		"%s"
+>(0x4E.L)	byte		0
+>>(0x4E.L+1)	byte		x		(v0.%02d)
+>(0x4E.L)	byte		1
+>>(0x4E.L+1)	byte		x		(v1.%02d)
+>>>(0x4E.L+10)	beshort		>0
+>>>>(0x4E.L+10) beshort		<2		- 1 bookmark
+>>>>(0x4E.L+10) beshort		>1		- %d bookmarks
+>>>(0x4E.L+14)	beshort		>0
+>>>>(0x4E.L+14) beshort		<2		- 1 annotation
+>>>>(0x4E.L+14) beshort		>1		- %d annotations
+>(0x4E.L)	byte		>1		(v%d.
+>>(0x4E.L+1)	byte		x		%02d)
+
+# Palm OS .prc file types
+60		string		libr		Palm OS dynamic library data
+>0		string		>\0		"%s"
+60		string		ptch		Palm OS operating system patch data
+>0		string		>\0		"%s"
+
+# Mobipocket (www.mobipocket.com), donated by Carl Witty
+60	string	                BOOKMOBI	Mobipocket E-book
+>0	string                  >\0             "%s"
+
+#------------------------------------------------------------------------------
+# $File: parix,v 1.4 2009/09/19 16:28:11 christos Exp $
+#
+# Parix COFF executables
+# From: Ignatios Souvatzis <ignatios at cs.uni-bonn.de>
+#
+0	beshort&0xfff	0xACE	PARIX
+>0	byte&0xf0	0x80	T800
+>0	byte&0xf0	0x90	T9000
+>19	byte&0x02	0x02	executable
+>19	byte&0x02	0x00	object
+>19	byte&0x0c	0x00	not stripped
+
+#------------------------------------------------------------------------------
+# $File: pbm,v 1.6 2009/09/19 16:28:11 christos Exp $
+# pbm:  file(1) magic for Portable Bitmap files
+#
+# XXX - byte order?
+#
+0	short	0x2a17	"compact bitmap" format (Poskanzer)
+
+#------------------------------------------------------------------------------
+# $File: pdf,v 1.6 2009/09/19 16:28:11 christos Exp $
+# pdf:  file(1) magic for Portable Document Format
+#
+
+0	string		%PDF-		PDF document
+!:mime	application/pdf
+>5	byte		x		\b, version %c
+>7	byte		x		\b.%c
+
+# From: Nick Schmalenberger <nick at schmalenberger.us>
+# Forms Data Format
+0       string          %FDF-           FDF document
+>5      byte            x               \b, version %c
+>7      byte            x               \b.%c
+
+#------------------------------------------------------------------------------
+# $File: pdp,v 1.8 2009/09/19 16:28:11 christos Exp $
+# pdp:  file(1) magic for PDP-11 executable/object and APL workspace
+#
+0	lelong		0101555		PDP-11 single precision APL workspace
+0	lelong		0101554		PDP-11 double precision APL workspace
+#
+# PDP-11 a.out
+#
+0	leshort		0407		PDP-11 executable
+>8	leshort		>0		not stripped
+>15	byte		>0		- version %ld
+
+0	leshort		0401		PDP-11 UNIX/RT ldp
+0	leshort		0405		PDP-11 old overlay
+
+0	leshort		0410		PDP-11 pure executable
+>8	leshort		>0		not stripped
+>15	byte		>0		- version %ld
+
+0	leshort		0411		PDP-11 separate I&D executable
+>8	leshort		>0		not stripped
+>15	byte		>0		- version %ld
+
+0	leshort		0437		PDP-11 kernel overlay
+
+# These last three are derived from 2.11BSD file(1)
+0	leshort		0413		PDP-11 demand-paged pure executable
+>8	leshort		>0		not stripped
+
+0	leshort		0430		PDP-11 overlaid pure executable
+>8	leshort		>0		not stripped
+
+0	leshort		0431		PDP-11 overlaid separate executable
+>8	leshort		>0		not stripped
+
+#------------------------------------------------------------------------------
+# $File: perl,v 1.16 2009/09/19 16:28:11 christos Exp $
+# perl:  file(1) magic for Larry Wall's perl language.
+#
+# The `eval' lines recognizes an outrageously clever hack.
+# Keith Waclena <keith at cerberus.uchicago.edu>
+# Send additions to <perl5-porters at perl.org>
+0	search/1/w	#!\ /bin/perl			Perl script text executable
+!:mime	text/x-perl
+0	search/1	eval\ "exec\ /bin/perl		Perl script text
+!:mime	text/x-perl
+0	search/1/w	#!\ /usr/bin/perl		Perl script text executable
+!:mime	text/x-perl
+0	search/1	eval\ "exec\ /usr/bin/perl	Perl script text
+!:mime	text/x-perl
+0	search/1/w	#!\ /usr/local/bin/perl		Perl script text executable
+!:mime	text/x-perl
+0	search/1	eval\ "exec\ /usr/local/bin/perl	Perl script text
+!:mime	text/x-perl
+0	search/1	eval\ '(exit\ $?0)'\ &&\ eval\ 'exec	Perl script text
+!:mime	text/x-perl
+
+
+# by Dmitry V. Levin and Alexey Tourbin
+# check the first line
+0	search/1	package
+>0	regex		\^package[\ \t]+[0-9A-Za-z_:]+\ *;	Perl5 module source text
+# not 'p', check other lines
+0	search/1	!p
+>0	regex		\^package[\ \t]+[0-9A-Za-z_:]+\ *;
+>>0	regex		\^1\ *;|\^(use|sub|my)\ .*[(;{=]	Perl5 module source text
+
+
+
+# Perl POD documents
+# From: Tom Hukins <tom at eborcom.com>
+0	search/1/W	\=pod\n		Perl POD document text
+0	search/1/W	\n\=pod\n	Perl POD document text
+0	search/1/W	\=head1\ 	Perl POD document text
+0	search/1/W	\n\=head1\ 	Perl POD document text
+0	search/1/W	\=head2\ 	Perl POD document text
+0	search/1/W	\n\=head2\ 	Perl POD document text
+
+# Perl Storable data files.
+0	string	perl-store	perl Storable (v0.6) data
+>4	byte	>0	(net-order %d)
+>>4	byte	&01	(network-ordered)
+>>4	byte	=3	(major 1)
+>>4	byte	=2	(major 1)
+
+0	string	pst0	perl Storable (v0.7) data
+>4	byte	>0
+>>4	byte	&01	(network-ordered)
+>>4	byte	=5	(major 2)
+>>4	byte	=4	(major 2)
+>>5	byte	>0	(minor %d)
+
+#------------------------------------------------------------------------------
+# $File: pgp,v 1.9 2009/09/19 16:28:11 christos Exp $
+# pgp:  file(1) magic for Pretty Good Privacy
+# see http://lists.gnupg.org/pipermail/gnupg-devel/1999-September/016052.html
+#
+0       beshort         0x9900                  PGP key public ring
+!:mime	application/x-pgp-keyring
+0       beshort         0x9501                  PGP key security ring
+!:mime	application/x-pgp-keyring
+0       beshort         0x9500                  PGP key security ring
+!:mime	application/x-pgp-keyring
+0	beshort		0xa600			PGP encrypted data
+#!:mime	application/pgp-encrypted
+#0	string		-----BEGIN\040PGP	text/PGP armored data
+!:mime	text/PGP # encoding: armored data
+#>15	string	PUBLIC\040KEY\040BLOCK-	public key block
+#>15	string	MESSAGE-		message
+#>15	string	SIGNED\040MESSAGE-	signed message
+#>15	string	PGP\040SIGNATURE-	signature
+
+2	string	---BEGIN\ PGP\ PUBLIC\ KEY\ BLOCK-	PGP public key block
+!:mime	application/pgp-keys
+0	string	-----BEGIN\040PGP\40MESSAGE-		PGP message
+!:mime	application/pgp
+0	string	-----BEGIN\040PGP\40SIGNATURE-		PGP signature
+!:mime	application/pgp-signature
+
+#------------------------------------------------------------------------------
+# $File: pkgadd,v 1.6 2009/09/19 16:28:11 christos Exp $
+# pkgadd:  file(1) magic for SysV R4 PKG Datastreams
+#
+0       string          #\ PaCkAgE\ DaTaStReAm  pkg Datastream (SVR4)
+!:mime	application/x-svr4-package
+
+#------------------------------------------------------------------------------
+# $File: plan9,v 1.5 2009/09/19 16:28:11 christos Exp $
+# plan9:  file(1) magic for AT&T Bell Labs' Plan 9 executables
+# From: "Stefan A. Haubenthal" <polluks at web.de>
+#
+0	belong		0x00000107	Plan 9 executable, Motorola 68k
+0	belong		0x000001EB	Plan 9 executable, Intel 386
+0	belong		0x00000247	Plan 9 executable, Intel 960
+0	belong		0x000002AB	Plan 9 executable, SPARC
+0	belong		0x00000407	Plan 9 executable, MIPS R3000
+0	belong		0x0000048B	Plan 9 executable, AT&T DSP 3210
+0	belong		0x00000517	Plan 9 executable, MIPS R4000 BE
+0	belong		0x000005AB	Plan 9 executable, AMD 29000
+0	belong		0x00000647	Plan 9 executable, ARM 7-something
+0	belong		0x000006EB	Plan 9 executable, PowerPC
+0	belong		0x00000797	Plan 9 executable, MIPS R4000 LE
+0	belong		0x0000084B	Plan 9 executable, DEC Alpha
+
+#------------------------------------------------------------------------------
+# $File: plus5,v 1.6 2009/09/19 16:28:11 christos Exp $
+# plus5:  file(1) magic for Plus Five's UNIX MUMPS
+#
+# XXX - byte order?  Paging Hokey....
+#
+0	short		0x259		mumps avl global
+>2	byte		>0		(V%d)
+>6	byte		>0		with %d byte name
+>7	byte		>0		and %d byte data cells
+0	short		0x25a		mumps blt global
+>2	byte		>0		(V%d)
+>8	short		>0		- %d byte blocks
+>15	byte		0x00		- P/D format
+>15	byte		0x01		- P/K/D format
+>15	byte		0x02		- K/D format
+>15	byte		>0x02		- Bad Flags
+
+#------------------------------------------------------------------------------
+# $File: printer,v 1.22 2009/09/19 16:28:11 christos Exp $
+# printer:  file(1) magic for printer-formatted files
+#
+
+# PostScript, updated by Daniel Quinlan (quinlan at yggdrasil.com)
+0	string		%!		PostScript document text
+!:mime	application/postscript
+!:apple	ASPSTEXT
+>2	string		PS-Adobe-	conforming
+>>11	string		>\0		DSC level %.3s
+>>>15	string		EPS		\b, type %s
+>>>15	string		Query		\b, type %s
+>>>15	string		ExitServer	\b, type %s
+>>>15   search/1000		%%LanguageLevel:\ 
+>>>>&0	string		>\0		\b, Level %s
+# Some PCs have the annoying habit of adding a ^D as a document separator
+0	string		\004%!		PostScript document text
+!:mime	application/postscript
+!:apple	ASPSTEXT
+>3	string		PS-Adobe-	conforming
+>>12	string		>\0		DSC level %.3s
+>>>16	string		EPS		\b, type %s
+>>>16	string		Query		\b, type %s
+>>>16	string		ExitServer	\b, type %s
+>>>16   search/1000		%%LanguageLevel:\ 
+>>>>&0	string		>\0		\b, Level %s
+0	string		\033%-12345X%!PS	PostScript document
+
+# DOS EPS Binary File Header
+# From: Ed Sznyter <ews at Black.Market.NET>
+0       belong          0xC5D0D3C6      DOS EPS Binary File
+>4      long            >0              Postscript starts at byte %d
+>>8     long            >0              length %d
+>>>12   long            >0              Metafile starts at byte %d
+>>>>16  long            >0              length %d
+>>>20   long            >0              TIFF starts at byte %d
+>>>>24  long            >0              length %d
+
+# Summary: Adobe's PostScript Printer Description File
+# Extension: .ppd
+# Reference: http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf, Section 3.8
+# Submitted by: Yves Arrouye <arrouye at marin.fdn.fr>
+#
+0	string		*PPD-Adobe:\x20	PPD file
+>&0	string		x		\b, version %s
+
+# HP Printer Job Language
+0	string		\033%-12345X at PJL	HP Printer Job Language data
+# HP Printer Job Language
+# The header found on Win95 HP plot files is the "Silliest Thing possible" 
+# (TM)
+# Every driver puts the language at some random position, with random case
+# (LANGUAGE and Language)
+# For example the LaserJet 5L driver puts the "PJL ENTER LANGUAGE" in line 10
+# From: Uwe Bonnes <bon at elektron.ikp.physik.th-darmstadt.de>
+# 
+0	string		\033%-12345X at PJL	HP Printer Job Language data
+>&0	string		>\0			%s			
+>>&0	string		>\0			%s			
+>>>&0	string		>\0			%s		
+>>>>&0	string		>\0			%s		
+#>15	string		\ ENTER\ LANGUAGE\ =
+#>31	string		PostScript		PostScript
+
+# HP Printer Control Language, Daniel Quinlan (quinlan at yggdrasil.com)
+0	string		\033E\033	HP PCL printer data
+>3	string		\&l0A		- default page size
+>3	string		\&l1A		- US executive page size
+>3	string		\&l2A		- US letter page size
+>3	string		\&l3A		- US legal page size
+>3	string		\&l26A		- A4 page size
+>3	string		\&l80A		- Monarch envelope size
+>3	string		\&l81A		- No. 10 envelope size
+>3	string		\&l90A		- Intl. DL envelope size
+>3	string		\&l91A		- Intl. C5 envelope size
+>3	string		\&l100A		- Intl. B5 envelope size
+>3	string		\&l-81A		- No. 10 envelope size (landscape)
+>3	string		\&l-90A		- Intl. DL envelope size (landscape)
+
+# IMAGEN printer-ready files:
+0	string	@document(		Imagen printer
+# this only works if "language xxx" is first item in Imagen header.
+>10	string	language\ impress	(imPRESS data)
+>10	string	language\ daisy		(daisywheel text)
+>10	string	language\ diablo	(daisywheel text)
+>10	string	language\ printer	(line printer emulation)
+>10	string	language\ tektronix	(Tektronix 4014 emulation)
+# Add any other languages that your Imagen uses - remember
+# to keep the word `text' if the file is human-readable.
+# [GRR 950115:  missing "postscript" or "ultrascript" (whatever it was called)]
+#
+# Now magic for IMAGEN font files...
+0	string		Rast		RST-format raster font data
+>45	string		>0		face %s
+# From Jukka Ukkonen
+0	string		\033[K\002\0\0\017\033(a\001\0\001\033(g	Canon Bubble Jet BJC formatted data
+
+# From <mike at flyn.org>
+# These are the /etc/magic entries to decode data sent to an Epson printer.
+0       string          \x1B\x40\x1B\x28\x52\x08\x00\x00REMOTE1P        Epson Stylus Color 460 data
+
+
+#------------------------------------------------------------------------------
+# zenographics:  file(1) magic for Zenographics ZjStream printer data
+# Rick Richardson  rickr at mn.rr.com
+0	string		JZJZ
+>0x12	string		ZZ		Zenographics ZjStream printer data (big-endian)
+0	string		ZJZJ
+>0x12	string		ZZ		Zenographics ZjStream printer data (little-endian)
+
+
+#------------------------------------------------------------------------------
+# Oak Technologies printer stream
+# Rick Richardson <rickr at mn.rr.com>
+0       string          OAK
+>0x07	byte		0
+>0x0b	byte		0	Oak Technologies printer stream
+
+# This would otherwise be recognized as PostScript - nick at debian.org
+0	string		%!VMF 		SunClock's Vector Map Format data
+
+#------------------------------------------------------------------------------
+# HP LaserJet 1000 series downloadable firmware file
+0	string	\xbe\xefABCDEFGH	HP LaserJet 1000 series downloadable firmware   
+
+# From: Paolo <oopla at users.sf.net>
+# Epson ESC/Page, ESC/PageColor 
+0	string	\x1b\x01 at EJL	Epson ESC/Page language printer data
+
+#------------------------------------------------------------------------------
+# $File: project,v 1.4 2009/09/19 16:28:11 christos Exp $
+# project:  file(1) magic for Project management
+# 
+# Magic strings for ftnchek project files. Alexander Mai
+0	string	FTNCHEK_\ P	project file for ftnchek
+>10	string	1		version 2.7
+>10	string	2		version 2.8 to 2.10
+>10	string	3		version 2.11 or later
+
+#------------------------------------------------------------------------------
+# $File: psdbms,v 1.6 2009/09/19 16:28:11 christos Exp $
+# psdbms:  file(1) magic for psdatabase
+#
+0	belong&0xff00ffff	0x56000000	ps database
+>1	string	>\0	version %s
+>4	string	>\0	from kernel %s
+
+#------------------------------------------------------------------------------
+# $File: pulsar,v 1.5 2009/09/19 16:28:12 christos Exp $
+# pulsar:  file(1) magic for Pulsar POP3 daemon binary files
+#
+# http://pulsar.sourceforge.net
+# mailto:rok.papez at lugos.si
+#
+
+0	belong	0x1ee7f11e	Pulsar POP3 daemon mailbox cache file.
+>4	ubelong	x		Version: %d.
+>8	ubelong	x		\b%d
+
+
+#------------------------------------------------------------------------------
+# $File: pyramid,v 1.7 2009/09/19 16:28:12 christos Exp $
+# pyramid:  file(1) magic for Pyramids
+#
+# XXX - byte order?
+#
+0	long		0x50900107	Pyramid 90x family executable
+0	long		0x50900108	Pyramid 90x family pure executable
+>16	long		>0		not stripped
+0	long		0x5090010b	Pyramid 90x family demand paged pure executable
+>16	long		>0		not stripped
+
+#------------------------------------------------------------------------------
+# $File: python,v 1.12 2009/10/27 14:49:57 christos Exp $
+# python:  file(1) magic for python
+#
+# From: David Necas <yeti at physics.muni.cz>
+# often the module starts with a multiline string
+0	string/t		"""	a python script text executable
+# MAGIC as specified in Python/import.c (1.5 to 2.6a1 and 3.1a0, assuming
+# that Py_UnicodeFlag is off for Python 2)
+# 20121  ( YEAR - 1995 ) + MONTH  + DAY (little endian followed by "\r\n"
+0	belong		0x994e0d0a	python 1.5/1.6 byte-compiled
+0	belong		0x87c60d0a	python 2.0 byte-compiled
+0	belong		0x2aeb0d0a	python 2.1 byte-compiled
+0	belong		0x2ded0d0a	python 2.2 byte-compiled
+0	belong		0x3bf20d0a	python 2.3 byte-compiled
+0	belong		0x6df20d0a	python 2.4 byte-compiled
+0	belong		0xb3f20d0a	python 2.5 byte-compiled
+0	belong		0xd1f20d0a	python 2.6 byte-compiled
+0	belong		0x3b0c0d0a	python 3.0 byte-compiled
+0	belong		0x4f0c0d0a	python 3.1 byte-compiled
+
+0	search/1/w	#!\ /usr/bin/python	Python script text executable
+!:mime text/x-python
+0	search/1/w	#!\ /usr/local/bin/python	Python script text executable
+!:mime text/x-python
+0	search/1	#!/usr/bin/env\ python	Python script text executable
+!:mime text/x-python
+0	search/1	#!\ /usr/bin/env\ ruby	Python script text executable
+!:mime text/x-python
+
+# from module.submodule import func1, func2
+0	regex/	\^from\\s+(\\w|\\.)+\\s+import.*$	Python script text executable
+!:strength - 20
+!:mime text/x-python
+
+# def __init__ (self, ...):
+0	search/4096	def\ __init__
+>&0	search/64 self	Python script text executable
+!:mime text/x-python
+
+# comments
+0	search/4096	'''
+>&0	regex	.*'''$	Python script text executable
+!:mime text/x-python
+
+0	search/4096	"""
+>&0	regex	.*"""$	Python script text executable
+!:mime text/x-python
+
+# try:
+# except: or finally:
+# block
+0	search/4096	try:
+>&0	regex	\^\\s*except.*:	Python script text executable
+!:mime text/x-python
+0	search/4096	try:
+>&0	search/4096	finally:	Python script text executable
+!:mime text/x-python
+
+# def name(args, args):
+0	regex	 \^(\ |\\t)*def\ +[a-zA-Z]+
+>&0	regex	\ *\\(([a-zA-Z]|,|\ )*\\):$ Python script text executable
+!:strength - 20
+!:mime text/x-python
+
+#------------------------------------------------------------------------------
+# $File: python,v 1.12 2009/10/27 14:49:57 christos Exp $
+# python:  file(1) magic for python
+#
+# From: David Necas <yeti at physics.muni.cz>
+# often the module starts with a multiline string
+0	string/t		"""	a python script text executable
+# MAGIC as specified in Python/import.c (1.5 to 2.6a1 and 3.1a0, assuming
+# that Py_UnicodeFlag is off for Python 2)
+# 20121  ( YEAR - 1995 ) + MONTH  + DAY (little endian followed by "\r\n"
+0	belong		0x994e0d0a	python 1.5/1.6 byte-compiled
+0	belong		0x87c60d0a	python 2.0 byte-compiled
+0	belong		0x2aeb0d0a	python 2.1 byte-compiled
+0	belong		0x2ded0d0a	python 2.2 byte-compiled
+0	belong		0x3bf20d0a	python 2.3 byte-compiled
+0	belong		0x6df20d0a	python 2.4 byte-compiled
+0	belong		0xb3f20d0a	python 2.5 byte-compiled
+0	belong		0xd1f20d0a	python 2.6 byte-compiled
+0	belong		0x3b0c0d0a	python 3.0 byte-compiled
+0	belong		0x4f0c0d0a	python 3.1 byte-compiled
+
+0	search/1/w	#!\ /usr/bin/python	Python script text executable
+!:mime text/x-python
+0	search/1/w	#!\ /usr/local/bin/python	Python script text executable
+!:mime text/x-python
+0	search/1	#!/usr/bin/env\ python	Python script text executable
+!:mime text/x-python
+0	search/1	#!\ /usr/bin/env\ ruby	Python script text executable
+!:mime text/x-python
+
+# from module.submodule import func1, func2
+0	regex/	\^from\\s+(\\w|\\.)+\\s+import.*$	Python script text executable
+!:strength - 20
+!:mime text/x-python
+
+# def __init__ (self, ...):
+0	search/4096	def\ __init__
+>&0	search/64 self	Python script text executable
+!:mime text/x-python
+
+# comments
+0	search/4096	'''
+>&0	regex	.*'''$	Python script text executable
+!:mime text/x-python
+
+0	search/4096	"""
+>&0	regex	.*"""$	Python script text executable
+!:mime text/x-python
+
+# try:
+# except: or finally:
+# block
+0	search/4096	try:
+>&0	regex	\^\\s*except.*:	Python script text executable
+!:mime text/x-python
+0	search/4096	try:
+>&0	search/4096	finally:	Python script text executable
+!:mime text/x-python
+
+#------------------------------------------------------------------------------
+# $File: revision,v 1.6 2009/09/19 16:28:12 christos Exp $
+# file(1) magic for revision control files
+# From Hendrik Scholz <hendrik at scholz.net>
+0	string	/1\ :pserver:	cvs password text file
+
+# Conary changesets
+# From: Jonathan Smith <smithj at rpath.com>
+0	belong	0xea3f81bb	Conary changeset data
+
+# Type: Git bundles (git-bundle)
+# From: Josh Triplett <josh at freedesktop.org>
+0	string	#\ v2\ git\ bundle\n	Git bundle
+
+# Type:	Mercurial bundles
+# From:	Seo Sanghyeon <tinuviel at sparcs.kaist.ac.kr>
+0	string	HG10		Mercurial bundle,
+>4	string	UN		uncompressed
+>4	string	BZ		bzip2 compressed
+
+#------------------------------------------------------------------------------
+# $File: riff,v 1.18 2009/09/19 16:28:12 christos Exp $
+# riff:  file(1) magic for RIFF format
+# See
+#
+#	http://www.seanet.com/users/matts/riffmci/riffmci.htm
+#
+# AVI section extended by Patrik R�dman <patrik+file-magic at iki.fi>
+#
+0	string		RIFF		RIFF (little-endian) data
+# RIFF Palette format
+>8	string		PAL		\b, palette
+>>16	leshort		x		\b, version %d
+>>18	leshort		x		\b, %d entries
+# RIFF Device Independent Bitmap format
+>8	string		RDIB		\b, device-independent bitmap
+>>16	string		BM		
+>>>30	leshort		12		\b, OS/2 1.x format
+>>>>34	leshort		x		\b, %d x
+>>>>36	leshort		x		%d
+>>>30	leshort		64		\b, OS/2 2.x format
+>>>>34	leshort		x		\b, %d x
+>>>>36	leshort		x		%d
+>>>30	leshort		40		\b, Windows 3.x format
+>>>>34	lelong		x		\b, %d x
+>>>>38	lelong		x		%d x
+>>>>44	leshort		x		%d
+# RIFF MIDI format
+>8	string		RMID		\b, MIDI
+# RIFF Multimedia Movie File format
+>8	string		RMMP		\b, multimedia movie
+# RIFF wrapper for MP3
+>8	string		RMP3		\b, MPEG Layer 3 audio
+# Microsoft WAVE format (*.wav)
+>8	string		WAVE		\b, WAVE audio
+!:mime	audio/x-wav
+>>20	leshort		1		\b, Microsoft PCM
+>>>34	leshort		>0		\b, %d bit
+>>20	leshort		2		\b, Microsoft ADPCM
+>>20	leshort		6		\b, ITU G.711 A-law
+>>20	leshort		7		\b, ITU G.711 mu-law
+>>20	leshort		17		\b, IMA ADPCM
+>>20	leshort		20		\b, ITU G.723 ADPCM (Yamaha)
+>>20	leshort		49		\b, GSM 6.10
+>>20	leshort		64		\b, ITU G.721 ADPCM
+>>20	leshort		80		\b, MPEG
+>>20	leshort		85		\b, MPEG Layer 3
+>>22	leshort		=1		\b, mono
+>>22	leshort		=2		\b, stereo
+>>22	leshort		>2		\b, %d channels
+>>24	lelong		>0		%d Hz
+# Corel Draw Picture
+>8	string		CDRA		\b, Corel Draw Picture
+!:mime	image/x-coreldraw
+# AVI == Audio Video Interleave
+>8	string		AVI\040		\b, AVI
+!:mime	video/x-msvideo
+>>12    string          LIST
+>>>20   string          hdrlavih
+>>>>&36 lelong          x               \b, %lu x
+>>>>&40 lelong          x               %lu,
+>>>>&4  lelong          >1000000        <1 fps,
+>>>>&4  lelong          1000000         1.00 fps,
+>>>>&4  lelong          500000          2.00 fps,
+>>>>&4  lelong          333333          3.00 fps,
+>>>>&4  lelong          250000          4.00 fps,
+>>>>&4  lelong          200000          5.00 fps,
+>>>>&4  lelong          166667          6.00 fps,
+>>>>&4  lelong          142857          7.00 fps,
+>>>>&4  lelong          125000          8.00 fps,
+>>>>&4  lelong          111111          9.00 fps,
+>>>>&4  lelong          100000          10.00 fps,
+# ]9.9,10.1[
+>>>>&4  lelong          <101010
+>>>>>&-4        lelong  >99010
+>>>>>>&-4       lelong  !100000         ~10 fps,
+>>>>&4  lelong          83333           12.00 fps,
+# ]11.9,12.1[
+>>>>&4  lelong          <84034
+>>>>>&-4        lelong  >82645
+>>>>>>&-4       lelong  !83333          ~12 fps,
+>>>>&4  lelong          66667           15.00 fps,
+# ]14.9,15.1[
+>>>>&4  lelong          <67114
+>>>>>&-4        lelong  >66225
+>>>>>>&-4       lelong  !66667          ~15 fps,
+>>>>&4  lelong          50000           20.00 fps,
+>>>>&4  lelong          41708           23.98 fps,
+>>>>&4  lelong          41667           24.00 fps,
+# ]23.9,24.1[
+>>>>&4  lelong          <41841
+>>>>>&-4        lelong  >41494
+>>>>>>&-4       lelong  !41708
+>>>>>>>&-4      lelong  !41667          ~24 fps,
+>>>>&4  lelong          40000           25.00 fps,
+# ]24.9,25.1[
+>>>>&4  lelong          <40161
+>>>>>&-4        lelong  >39841
+>>>>>>&-4       lelong  !40000          ~25 fps,
+>>>>&4  lelong          33367           29.97 fps,
+>>>>&4  lelong          33333           30.00 fps,
+# ]29.9,30.1[
+>>>>&4  lelong          <33445
+>>>>>&-4        lelong  >33223
+>>>>>>&-4       lelong  !33367
+>>>>>>>&-4      lelong  !33333          ~30 fps,
+>>>>&4  lelong          <32224          >30 fps,
+##>>>>&4  lelong          x               (%lu)
+##>>>>&20 lelong          x               %lu frames,
+# Note: The tests below assume that the AVI has 1 or 2 streams,
+#       "vids" optionally followed by "auds".
+#       (Should cover 99.9% of all AVIs.)
+# assuming avih length = 56
+>>>88   string  LIST
+>>>>96  string  strlstrh
+>>>>>108        string  vids    video:
+>>>>>>&0        lelong  0               uncompressed
+# skip past vids strh
+>>>>>>(104.l+108)       string  strf
+>>>>>>>(104.l+132)      lelong          1       RLE 8bpp
+>>>>>>>(104.l+132)      string/c        cvid    Cinepak
+>>>>>>>(104.l+132)      string/c        i263    Intel I.263
+>>>>>>>(104.l+132)      string/c        iv32    Indeo 3.2
+>>>>>>>(104.l+132)      string/c        iv41    Indeo 4.1
+>>>>>>>(104.l+132)      string/c        iv50    Indeo 5.0
+>>>>>>>(104.l+132)      string/c        mp42    Microsoft MPEG-4 v2
+>>>>>>>(104.l+132)      string/c        mp43    Microsoft MPEG-4 v3
+>>>>>>>(104.l+132)      string/c        fmp4    FFMpeg MPEG-4
+>>>>>>>(104.l+132)      string/c        mjpg    Motion JPEG
+>>>>>>>(104.l+132)      string/c        div3    DivX 3
+>>>>>>>>112             string/c        div3    Low-Motion
+>>>>>>>>112             string/c        div4    Fast-Motion
+>>>>>>>(104.l+132)      string/c        divx    DivX 4
+>>>>>>>(104.l+132)      string/c        dx50    DivX 5
+>>>>>>>(104.l+132)      string/c        xvid    XviD
+>>>>>>>(104.l+132)	string/c	h264	H.264
+>>>>>>>(104.l+132)      string/c        wmv3    Windows Media Video 9
+>>>>>>>(104.l+132)      string/c        h264    X.264 or H.264
+>>>>>>>(104.l+132)      lelong  0
+##>>>>>>>(104.l+132)      string  x       (%.4s)
+# skip past first (video) LIST
+>>>>(92.l+96)   string  LIST
+>>>>>(92.l+104) string  strlstrh
+>>>>>>(92.l+116)        string          auds    \b, audio:
+# auds strh length = 56:
+>>>>>>>(92.l+172)       string          strf
+>>>>>>>>(92.l+180)      leshort 0x0001  uncompressed PCM
+>>>>>>>>(92.l+180)      leshort 0x0002  ADPCM
+>>>>>>>>(92.l+180)      leshort 0x0006  aLaw
+>>>>>>>>(92.l+180)      leshort 0x0007  uLaw
+>>>>>>>>(92.l+180)      leshort 0x0050  MPEG-1 Layer 1 or 2
+>>>>>>>>(92.l+180)      leshort 0x0055  MPEG-1 Layer 3
+>>>>>>>>(92.l+180)      leshort 0x2000  Dolby AC3
+>>>>>>>>(92.l+180)      leshort 0x0161  DivX
+##>>>>>>>>(92.l+180)      leshort x       (0x%.4x)
+>>>>>>>>(92.l+182)      leshort 1       (mono,
+>>>>>>>>(92.l+182)      leshort 2       (stereo,
+>>>>>>>>(92.l+182)      leshort >2      (%d channels,
+>>>>>>>>(92.l+184)      lelong  x       %d Hz)
+# auds strh length = 64:
+>>>>>>>(92.l+180)       string          strf
+>>>>>>>>(92.l+188)      leshort 0x0001  uncompressed PCM
+>>>>>>>>(92.l+188)      leshort 0x0002  ADPCM
+>>>>>>>>(92.l+188)      leshort 0x0055  MPEG-1 Layer 3
+>>>>>>>>(92.l+188)      leshort 0x2000  Dolby AC3
+>>>>>>>>(92.l+188)      leshort 0x0161  DivX
+##>>>>>>>>(92.l+188)      leshort x       (0x%.4x)
+>>>>>>>>(92.l+190)      leshort 1       (mono,
+>>>>>>>>(92.l+190)      leshort 2       (stereo,
+>>>>>>>>(92.l+190)      leshort >2      (%d channels,
+>>>>>>>>(92.l+192)      lelong  x       %d Hz)
+# Animated Cursor format
+>8	string		ACON		\b, animated cursor
+# SoundFont 2 <mpruett at sgi.com>
+>8	string		sfbk		SoundFont/Bank
+# MPEG-1 wrapped in a RIFF, apparently
+>8      string          CDXA            \b, wrapped MPEG-1 (CDXA)
+>8	string		4XMV		\b, 4X Movie file 
+
+#
+# XXX - some of the below may only appear in little-endian form.
+#
+# Also "MV93" appears to be for one form of Macromedia Director
+# files, and "GDMF" appears to be another multimedia format.
+#
+0	string		RIFX		RIFF (big-endian) data
+# RIFF Palette format
+>8	string		PAL		\b, palette
+>>16	beshort		x		\b, version %d
+>>18	beshort		x		\b, %d entries
+# RIFF Device Independent Bitmap format
+>8	string		RDIB		\b, device-independent bitmap
+>>16	string		BM		
+>>>30	beshort		12		\b, OS/2 1.x format
+>>>>34	beshort		x		\b, %d x
+>>>>36	beshort		x		%d
+>>>30	beshort		64		\b, OS/2 2.x format
+>>>>34	beshort		x		\b, %d x
+>>>>36	beshort		x		%d
+>>>30	beshort		40		\b, Windows 3.x format
+>>>>34	belong		x		\b, %d x
+>>>>38	belong		x		%d x
+>>>>44	beshort		x		%d
+# RIFF MIDI format
+>8	string		RMID		\b, MIDI
+# RIFF Multimedia Movie File format
+>8	string		RMMP		\b, multimedia movie
+# Microsoft WAVE format (*.wav)
+>8	string		WAVE		\b, WAVE audio
+>>20	leshort		1		\b, Microsoft PCM
+>>>34	leshort		>0		\b, %d bit
+>>22	beshort		=1		\b, mono
+>>22	beshort		=2		\b, stereo
+>>22	beshort		>2		\b, %d channels
+>>24	belong		>0		%d Hz
+# Corel Draw Picture
+>8	string		CDRA		\b, Corel Draw Picture
+# AVI == Audio Video Interleave
+>8	string		AVI\040		\b, AVI
+# Animated Cursor format
+>8	string		ACON		\b, animated cursor
+# Notation Interchange File Format (big-endian only)
+>8	string		NIFF		\b, Notation Interchange File Format
+# SoundFont 2 <mpruett at sgi.com>
+>8	string		sfbk		SoundFont/Bank
+
+#------------------------------------------------------------------------------
+# $File: rpm,v 1.9 2009/11/06 13:53:52 christos Exp $
+#
+# RPM: file(1) magic for Red Hat Packages   Erik Troan (ewt at redhat.com)
+#
+0	belong		0xedabeedb	RPM
+!:mime	application/x-rpm
+>4	byte		x		v%d
+>5	byte		x		\b.%d
+>6	beshort		1		src
+>6	beshort		0		bin
+>>8	beshort		1		i386/x86_64
+>>8	beshort		2		Alpha/Sparc64
+>>8	beshort		3		Sparc
+>>8	beshort		4		MIPS
+>>8	beshort		5		PowerPC
+>>8	beshort		6		68000
+>>8	beshort		7		SGI
+>>8	beshort		8		RS6000
+>>8	beshort		9		IA64
+>>8	beshort		10		Sparc64
+>>8	beshort		11		MIPSel
+>>8	beshort		12		ARM
+>>8	beshort		13		MiNT
+>>8	beshort		14		S/390
+>>8	beshort		15		S/390x
+>>8	beshort		16		PowerPC64
+>>8	beshort		17		SuperH
+>>8	beshort		18		Xtensa
+>>8	beshort		255		noarch
+>>10	string		x		%s
+
+#delta RPM    Daniel Novotny (dnovotny at redhat.com)
+0	string	drpm	Delta RPM
+!:mime  application/x-rpm
+>12	string 	x	%s
+
+>>>8	beshort		11		MIPSel
+>>>8	beshort		12		ARM
+>>>8	beshort		13		MiNT
+>>>8	beshort		14		S/390
+>>>8	beshort		15		S/390x
+>>>8	beshort		16		PowerPC64
+>>>8	beshort		17		SuperH
+>>>8	beshort		18		Xtensa
+>>10	string		x		%s
+
+#------------------------------------------------------------------------------
+# $File: rpm,v 1.9 2009/11/06 13:53:52 christos Exp $
+#
+# RPM: file(1) magic for Red Hat Packages   Erik Troan (ewt at redhat.com)
+#
+0	belong		0xedabeedb	RPM
+!:mime	application/x-rpm
+>4	byte		x		v%d
+>5	byte		x		\b.%d
+>6	beshort		1		src
+>6	beshort		0		bin
+>>8	beshort		1		i386/x86_64
+>>8	beshort		2		Alpha/Sparc64
+>>8	beshort		3		Sparc
+>>8	beshort		4		MIPS
+>>8	beshort		5		PowerPC
+>>8	beshort		6		68000
+>>8	beshort		7		SGI
+>>8	beshort		8		RS6000
+>>8	beshort		9		IA64
+>>8	beshort		10		Sparc64
+>>8	beshort		11		MIPSel
+>>8	beshort		12		ARM
+>>8	beshort		13		MiNT
+>>8	beshort		14		S/390
+>>8	beshort		15		S/390x
+>>8	beshort		16		PowerPC64
+>>8	beshort		17		SuperH
+>>8	beshort		18		Xtensa
+>>8	beshort		255		noarch
+
+#delta RPM    Daniel Novotny (dnovotny at redhat.com)
+0	string	drpm	Delta RPM
+!:mime  application/x-rpm
+>12	string 	x	%s
+
+>>>8	beshort		11		MIPSel
+>>>8	beshort		12		ARM
+>>>8	beshort		13		MiNT
+>>>8	beshort		14		S/390
+>>>8	beshort		15		S/390x
+>>>8	beshort		16		PowerPC64
+>>>8	beshort		17		SuperH
+>>>8	beshort		18		Xtensa
+>>10	string		x		%s
+
+#------------------------------------------------------------------------------
+# $File: rtf,v 1.7 2009/09/19 16:28:12 christos Exp $
+# rtf:	file(1) magic for Rich Text Format (RTF)
+#
+# Duncan P. Simpson, D.P.Simpson at dcs.warwick.ac.uk
+#
+0	string		{\\rtf		Rich Text Format data,
+!:mime	text/rtf
+>5	string		1		version 1,
+>>6	string		\\ansi		ANSI
+>>6	string		\\mac		Apple Macintosh
+>>6	string		\\pc		IBM PC, code page 437
+>>6	string		\\pca		IBM PS/2, code page 850
+>>6	default		x		unknown character set
+>5	default		x		unknown version
+
+#------------------------------------------------------------------------------
+# $File: ruby,v 1.3 2009/09/19 16:28:12 christos Exp $
+# ruby:  file(1) magic for Ruby scripting language
+# URL:  http://www.ruby-lang.org/
+# From: Reuben Thomas <rrt at sc3d.org>
+
+# Ruby scripts
+0	search/1/w	#!\ /usr/bin/ruby	Ruby script text executable
+!:mime text/x-ruby
+0	search/1/w	#!\ /usr/local/bin/ruby	Ruby script text executable
+!:mime text/x-ruby
+0	search/1	#!/usr/bin/env\ ruby	Ruby script text executable
+!:mime text/x-ruby
+0	search/1	#!\ /usr/bin/env\ ruby	Ruby script text executable
+!:mime text/x-ruby
+
+# What looks like ruby, but does not have a shebang
+# (modules and such)
+# From: Lubomir Rintel <lkundrak at v3.sk>
+0	regex		\^[\ \t]*require[\ \t]'[A-Za-z_\/]+'
+>0	regex		include\ [A-Z]|def\ [a-z]|\ do$
+>>0	regex		\^[\ \t]*end([\ \t]*[;#].*)?$		Ruby script text
+!:mime	text/x-ruby
+0	regex		\^[\ \t]*(class|module)[\ \t][A-Z]
+>0	regex		(modul|includ)e\ [A-Z]|def\ [a-z]
+>>0	regex		\^[\ \t]*end([\ \t]*[;#].*)?$		Ruby module source text
+!:mime	text/x-ruby
+
+#------------------------------------------------------------------------------
+# $File: sc,v 1.6 2009/09/19 16:28:12 christos Exp $
+# sc:  file(1) magic for "sc" spreadsheet
+#
+38	string		Spreadsheet	sc spreadsheet file
+!:mime	application/x-sc
+
+#------------------------------------------------------------------------------
+# $File: sccs,v 1.6 2009/09/19 16:28:12 christos Exp $
+# sccs:  file(1) magic for SCCS archives
+#
+# SCCS archive structure:
+# \001h01207
+# \001s 00276/00000/00000
+# \001d D 1.1 87/09/23 08:09:20 ian 1 0
+# \001c date and time created 87/09/23 08:09:20 by ian
+# \001e
+# \001u
+# \001U
+# ... etc.
+# Now '\001h' happens to be the same as the 3B20's a.out magic number (0550).
+# *Sigh*. And these both came from various parts of the USG.
+# Maybe we should just switch everybody from SCCS to RCS!
+# Further, you can't just say '\001h0', because the five-digit number
+# is a checksum that could (presumably) have any leading digit,
+# and we don't have regular expression matching yet. 
+# Hence the following official kludge:
+8	string		\001s\ 			SCCS archive data
+
+#------------------------------------------------------------------------------
+# $File: scientific,v 1.6 2009/09/19 16:28:12 christos Exp $
+# scientific:  file(1) magic for scientific formats 
+#
+# From: Joe Krahn <krahn at niehs.nih.gov>
+
+########################################################
+# CCP4 data and plot files:
+0	string		MTZ\040		MTZ reflection file
+
+92	string		PLOT%%84	Plot84 plotting file
+>52	byte		1		, Little-endian
+>55	byte		1		, Big-endian
+
+########################################################
+# Electron density MAP/MASK formats
+
+0	string		EZD_MAP	NEWEZD Electron Density Map
+109	string		MAP\040(  Old EZD Electron Density Map
+
+0	string/c	:-)\040Origin	BRIX Electron Density Map
+>170	string		>0	, Sigma:%.12s
+#>4	string		>0	%.178s
+#>4	addr		x	%.178s
+
+7	string		18\040!NTITLE	XPLOR ASCII Electron Density Map
+9	string		\040!NTITLE\012\040REMARK	CNS ASCII electron density map
+
+208	string		MAP\040	CCP4 Electron Density Map
+# Assumes same stamp for float and double (normal case)
+>212	byte		17	\b, Big-endian
+>212	byte		34	\b, VAX format
+>212	byte		68	\b, Little-endian
+>212	byte		85	\b, Convex native
+
+############################################################
+# X-Ray Area Detector images
+0	string	R-AXIS4\ \ \ 	R-Axis Area Detector Image:
+>796	lelong	<20		Little-endian, IP #%d,
+>>768	lelong	>0		Size=%dx
+>>772	lelong	>0		\b%d
+>796	belong	<20		Big-endian, IP #%d,
+>>768	belong	>0		Size=%dx
+>>772	belong	>0		\b%d
+
+0	string	RAXIS\ \ \ \ \ 	R-Axis Area Detector Image, Win32:
+>796	lelong	<20		Little-endian, IP #%d,
+>>768	lelong	>0		Size=%dx
+>>772	lelong	>0		\b%d
+>796	belong	<20		Big-endian, IP #%d,
+>>768	belong	>0		Size=%dx
+>>772	belong	>0		\b%d
+
+
+1028	string	MMX\000\000\000\000\000\000\000\000\000\000\000\000\000	MAR Area Detector Image,
+>1072	ulong	>1		Compressed(%d),
+>1100	ulong	>1		%d headers,
+>1104	ulong	>0		%d x
+>1108	ulong	>0		%d,
+>1120	ulong	>0		%d bits/pixel
+
+# Type: GEDCOM genealogical (family history) data
+# From: Giuseppe Bilotta
+0       search/1/c	0\ HEAD         GEDCOM genealogy text
+>&0     search		1\ GEDC
+>>&0    search		2\ VERS         version
+>>>&1   search/1	>\0		%s
+# From: Phil Endecott <phil05 at chezphil.org>
+0	string	\000\060\000\040\000\110\000\105\000\101\000\104		GEDCOM data
+0	string	\060\000\040\000\110\000\105\000\101\000\104\000		GEDCOM data
+0	string	\376\377\000\060\000\040\000\110\000\105\000\101\000\104	GEDCOM data
+0	string	\377\376\060\000\040\000\110\000\105\000\101\000\104\000	GEDCOM data
+
+#------------------------------------------------------------------------------
+# $File: securitycerts,v 1.4 2009/09/19 16:28:12 christos Exp $
+0	search/1		-----BEGIN\ CERTIFICATE------	RFC1421 Security Certificate text
+0	search/1		-----BEGIN\ NEW\ CERTIFICATE	RFC1421 Security Certificate Signing Request text
+0	belong	0xedfeedfe	Sun 'jks' Java Keystore File data
+
+0	string \0volume_key	volume_key escrow packet
+
+#------------------------------------------------------------------------------
+# $File: sendmail,v 1.7 2009/09/19 16:28:12 christos Exp $
+# sendmail:  file(1) magic for sendmail config files
+#
+# XXX - byte order?
+#
+0	byte	046	  Sendmail frozen configuration 
+>16	string	>\0	  - version %s
+0	short	0x271c	  Sendmail frozen configuration
+>16	string	>\0	  - version %s
+
+#------------------------------------------------------------------------------
+# sendmail:  file(1) magic for sendmail m4(1) files
+#
+# From Hendrik Scholz <hendrik at scholz.net>
+# i.e. files in /usr/share/sendmail/cf/
+#
+0   string  divert(-1)\n    sendmail m4 text file
+
+
+#------------------------------------------------------------------------------
+# $File: sequent,v 1.8 2009/09/19 16:28:12 christos Exp $
+# sequent:  file(1) magic for Sequent machines
+#
+# Sequent information updated by Don Dwiggins <atsun!dwiggins>.
+# For Sequent's multiprocessor systems (incomplete).
+0	lelong	0x00ea        	BALANCE NS32000 .o
+>16	lelong	>0		not stripped
+>124	lelong	>0		version %ld
+0	lelong	0x10ea        	BALANCE NS32000 executable (0 @ 0)
+>16	lelong  >0            	not stripped
+>124	lelong	>0		version %ld
+0	lelong	0x20ea        	BALANCE NS32000 executable (invalid @ 0)
+>16	lelong  >0            	not stripped
+>124	lelong	>0		version %ld
+0	lelong	0x30ea        	BALANCE NS32000 standalone executable
+>16	lelong  >0          	not stripped
+>124	lelong	>0		version %ld
+#
+# Symmetry information added by Jason Merrill <jason at jarthur.claremont.edu>.
+# Symmetry magic nums will not be reached if DOS COM comes before them;
+# byte 0xeb is matched before these get a chance.
+0	leshort	0x12eb		SYMMETRY i386 .o
+>16	lelong	>0		not stripped
+>124	lelong	>0		version %ld
+0	leshort	0x22eb		SYMMETRY i386 executable (0 @ 0)
+>16	lelong	>0		not stripped
+>124	lelong	>0		version %ld
+0	leshort	0x32eb		SYMMETRY i386 executable (invalid @ 0)
+>16	lelong	>0		not stripped
+>124	lelong	>0		version %ld
+0	leshort	0x42eb		SYMMETRY i386 standalone executable
+>16	lelong	>0		not stripped
+>124	lelong	>0		version %ld
+
+#------------------------------------------------------------------------------
+# $File: sgi,v 1.17 2009/09/19 16:28:12 christos Exp $
+# sgi:  file(1) magic for Silicon Graphics applications
+
+#
+#
+# Performance Co-Pilot file types
+0	string	PmNs				PCP compiled namespace (V.0)
+0	string	PmN				PCP compiled namespace
+>3	string	>\0				(V.%1.1s)
+#3	lelong	0x84500526			PCP archive
+3	belong	0x84500526			PCP archive
+>7	byte	x				(V.%d)
+#>20	lelong	-2				temporal index
+#>20	lelong	-1				metadata
+#>20	lelong	0				log volume #0
+#>20	lelong	>0				log volume #%ld
+>20	belong	-2				temporal index
+>20	belong	-1				metadata
+>20	belong	0				log volume #0
+>20	belong	>0				log volume #%ld
+>24	string	>\0				host: %s
+0	string	PCPFolio			PCP
+>9	string	Version:			Archive Folio
+>18	string	>\0				(V.%s)
+0	string	#pmchart			PCP pmchart view
+>9	string	Version
+>17	string	>\0				(V%-3.3s)
+0	string	#kmchart			PCP kmchart view
+>9	string	Version
+>17	string	>\0				(V.%s)
+0	string	pmview				PCP pmview config
+>7	string	Version
+>15	string	>\0				(V%-3.3s)
+0	string	#pmlogger			PCP pmlogger config
+>10	string	Version
+>18	string	>\0				(V%1.1s)
+0	string	#pmdahotproc			PCP pmdahotproc config
+>13	string	Version
+>21	string	>\0				(V%-3.3s)
+0	string	PcPh				PCP Help
+>4	string	1				Index
+>4	string	2				Text
+>5	string	>\0				(V.%1.1s)
+0	string	#pmieconf-rules			PCP pmieconf rules
+>16	string	>\0				(V.%1.1s)
+3	string	pmieconf-pmie			PCP pmie config
+>17	string	>\0				(V.%1.1s)
+
+# SpeedShop data files
+0	lelong	0x13130303			SpeedShop data file
+
+# mdbm files
+0	lelong	0x01023962			mdbm file, version 0 (obsolete)
+0	string	mdbm				mdbm file,
+>5	byte	x				version %d,
+>6	byte	x				2^%d pages,
+>7	byte	x				pagesize 2^%d,
+>17	byte	x				hash %d,
+>11	byte	x				dataformat %d
+
+# Alias Maya files
+0	string	//Maya ASCII	Alias Maya Ascii File,
+>13	string	>\0	version %s
+8	string	MAYAFOR4	Alias Maya Binary File,
+>32	string	>\0	version %s scene
+8	string	MayaFOR4	Alias Maya Binary File,
+>32	string	>\0	version %s scene
+8	string	CIMG		Alias Maya Image File
+8	string	DEEP		Alias Maya Image File
+#------------------------------------------------------------------------------
+# $File: sgml,v 1.24 2009/09/19 17:31:35 christos Exp $
+# Type:	SVG Vectorial Graphics
+# From:	Noel Torres <tecnico at ejerciciosresueltos.com>
+0	string		\<?xml\ version="
+>15	string		>\0
+>>19	search/4096	\<svg			SVG Scalable Vector Graphics image
+!:mime	image/svg+xml
+>>19	search/4096	\<gnc-v2		GnuCash file
+!:mime	application/x-gnucash
+
+# Sitemap file
+0	string		\<?xml\ version="
+>15	string		>\0
+>>19	search/4096	\<urlset		XML Sitemap document text
+!:mime	application/xml-sitemap
+
+# xhtml
+0	string		\<?xml\ version="
+>15	string		>\0
+>>19	search/4096/cWbt	\<!doctype\ html	xHTML document text
+!:mime	text/html
+0	string		\<?xml\ version='
+>15	string		>\0
+>>19	search/4096/cWbt	\<!doctype\ html	xHTML document text
+!:mime	text/html
+0	string		\<?xml\ version="
+>15	string		>\0
+>>19	search/4096/cWbt	\<html	broken xHTML document text
+!:mime	text/html
+
+#------------------------------------------------------------------------------
+# sgml:  file(1) magic for Standard Generalized Markup Language
+# HyperText Markup Language (HTML) is an SGML document type,
+# from Daniel Quinlan (quinlan at yggdrasil.com)
+# adapted to string extenstions by Anthon van der Neut <anthon at mnt.org)
+0	search/1/cb	\<!doctype\ html	HTML document text
+!:mime	text/html
+0	search/1/cb	\<head			HTML document text
+!:mime	text/html
+0	search/1/cb	\<title			HTML document text
+!:mime	text/html
+0	search/1/cb	\<html			HTML document text
+!:mime	text/html
+
+# Extensible markup language (XML), a subset of SGML
+# from Marc Prud'hommeaux (marc at apocalypse.org)
+0	search/1/cwbt	\<?xml			XML document text
+!:mime	application/xml
+0	string		\<?xml\ version\ "	XML
+!:mime	application/xml
+0	string		\<?xml\ version="	XML
+!:mime	application/xml
+>15	search/1	>\0			%.3s document text
+>>23	search/1	\<xsl:stylesheet	(XSL stylesheet)
+>>24	search/1	\<xsl:stylesheet	(XSL stylesheet)
+0	string		\<?xml\ version='	XML
+!:mime	application/xml
+>15	search/1	>\0			%.3s document text
+>>23	search/1	\<xsl:stylesheet	(XSL stylesheet)
+>>24	search/1	\<xsl:stylesheet	(XSL stylesheet)
+0	search/1/wbt	\<?xml			XML document text
+!:mime	application/xml
+!:strength - 10
+0	search/1/wbt	\<?XML			broken XML document text
+!:mime	application/xml
+!:strength - 10
+
+
+# SGML, mostly from rph at sq
+0	search/1/cb	\<!doctype		exported SGML document text
+0	search/1/cb	\<!subdoc		exported SGML subdocument text
+0	search/1/cb	\<!--			exported SGML document text
+
+# Web browser cookie files
+# (Mozilla, Galeon, Netscape 4, Konqueror..)
+# Ulf Harnhammar <ulfh at update.uu.se>
+0	search/1	#\ HTTP\ Cookie\ File	Web browser cookie text
+0	search/1	#\ Netscape\ HTTP\ Cookie\ File	Netscape cookie text
+0	search/1	#\ KDE\ Cookie\ File	Konqueror cookie text
+
+#------------------------------------------------------------------------
+# $File: sharc,v 1.6 2009/09/19 16:28:12 christos Exp $
+# file(1) magic for sharc files
+#
+# SHARC DSP, MIDI SysEx and RiscOS filetype definitions added by 
+# FutureGroove Music (dsp at futuregroove.de)
+
+#------------------------------------------------------------------------
+#0	string			Draw		RiscOS Drawfile
+#0	string			PACK		RiscOS PackdDir archive
+
+#------------------------------------------------------------------------
+# SHARC DSP stuff (based on the FGM SHARC DSP SDK)
+
+#0	string			=!		Assembler source
+#0	string			Analog		ADi asm listing file
+0	string			.SYSTEM		SHARC architecture file
+0	string			.system		SHARC architecture file
+
+0	leshort			0x521C		SHARC COFF binary
+>2	leshort			>1		, %hd sections
+>>12	lelong			>0		, not stripped
+
+#------------------------------------------------------------------------------
+# $File: sinclair,v 1.5 2009/09/19 16:28:12 christos Exp $
+# sinclair:  file(1) sinclair QL
+
+# additions to /etc/magic by Thomas M. Ott (ThMO)
+
+# Sinclair QL floppy disk formats (ThMO)
+0	string	=QL5		QL disk dump data,
+>3	string	=A		720 KB,
+>3	string	=B		1.44 MB,
+>3	string	=C		3.2 MB,
+>4	string	>\0		label:%.10s
+
+# Sinclair QL OS dump (ThMO)
+# (NOTE: if `file' would be able to use indirect references in a endian format
+#	 differing from the natural host format, this could be written more
+#	 reliably and faster...)
+#
+# we *can't* lookup QL OS code dumps, because `file' is UNABLE to read more
+# than the first 8K of a file... #-(
+#
+#0		belong	=0x30000
+#>49124		belong	<47104
+#>>49128		belong	<47104
+#>>>49132	belong	<47104
+#>>>>49136	belong	<47104	QL OS dump data,
+#>>>>>49148	string	>\0	type %.3s,
+#>>>>>49142	string	>\0	version %.4s
+
+# Sinclair QL firmware executables (ThMO)
+0	string	NqNqNq`\004	QL firmware executable (BCPL)
+
+# Sinclair QL libraries (was ThMO)
+0	beshort	0xFB01		QDOS object
+>2	pstring	x		'%s'
+
+# Sinclair QL executables (was ThMO)
+4	belong	0x4AFB		QDOS executable
+>9	pstring	x		'%s'
+
+# Sinclair QL ROM (ThMO)
+0	belong	=0x4AFB0001	QL plugin-ROM data,
+>9	pstring	=\0		un-named
+>9	pstring	>\0		named: %s
+
+#------------------------------------------------------------------------------
+# $File: sketch,v 1.4 2009/09/19 16:28:12 christos Exp $
+# Sketch Drawings: http://sketch.sourceforge.net/ 
+# From: Edwin Mons <e at ik.nu>
+0	search/1	##Sketch	Sketch document text
+
+#-----------------------------------------------
+# $File: smalltalk,v 1.5 2009/09/19 16:28:12 christos Exp $
+# GNU Smalltalk image, starting at version 1.6.2
+# From: catull_us at yahoo.com
+#
+0	string	GSTIm\0\0	GNU SmallTalk
+# little-endian
+>7	byte&1	=0		LE image version
+>>10	byte	x		%d.
+>>9	byte	x		\b%d.
+>>8	byte	x		\b%d
+#>>12	lelong	x		, data: %ld
+#>>16	lelong	x		, table: %ld
+#>>20	lelong	x		, memory: %ld
+# big-endian
+>7	byte&1	=1		BE image version
+>>8	byte	x		%d.
+>>9	byte	x		\b%d.
+>>10	byte	x		\b%d
+#>>12	belong	x		, data: %ld
+#>>16	belong	x		, table: %ld
+#>>20	belong	x		, memory: %ld
+
+
+
+#------------------------------------------------------------------------------
+# $File: sniffer,v 1.14 2009/09/19 16:28:12 christos Exp $
+# sniffer:  file(1) magic for packet capture files
+#
+# From: guy at alum.mit.edu (Guy Harris)
+#
+
+#
+# Microsoft Network Monitor 1.x capture files.
+#
+0	string		RTSS		NetMon capture file
+>5	byte		x		- version %d
+>4	byte		x		\b.%d
+>6	leshort		0		(Unknown)
+>6	leshort		1		(Ethernet)
+>6	leshort		2		(Token Ring)
+>6	leshort		3		(FDDI)
+>6	leshort		4		(ATM)
+
+#
+# Microsoft Network Monitor 2.x capture files.
+#
+0	string		GMBU		NetMon capture file
+>5	byte		x		- version %d
+>4	byte		x		\b.%d
+>6	leshort		0		(Unknown)
+>6	leshort		1		(Ethernet)
+>6	leshort		2		(Token Ring)
+>6	leshort		3		(FDDI)
+>6	leshort		4		(ATM)
+
+#
+# Network General Sniffer capture files.
+# Sorry, make that "Network Associates Sniffer capture files."
+# Sorry, make that "Network General old DOS Sniffer capture files."
+#
+0	string		TRSNIFF\ data\ \ \ \ \032	Sniffer capture file
+>33	byte		2		(compressed)
+>23	leshort		x		- version %d
+>25	leshort		x		\b.%d
+>32	byte		0		(Token Ring)
+>32	byte		1		(Ethernet)
+>32	byte		2		(ARCNET)
+>32	byte		3		(StarLAN)
+>32	byte		4		(PC Network broadband)
+>32	byte		5		(LocalTalk)
+>32	byte		6		(Znet)
+>32	byte		7		(Internetwork Analyzer)
+>32	byte		9		(FDDI)
+>32	byte		10		(ATM)
+
+#
+# Cinco Networks NetXRay capture files.
+# Sorry, make that "Network General Sniffer Basic capture files."
+# Sorry, make that "Network Associates Sniffer Basic capture files."
+# Sorry, make that "Network Associates Sniffer Basic, and Windows
+# Sniffer Pro", capture files."
+# Sorry, make that "Network General Sniffer capture files."
+#
+0	string		XCP\0		NetXRay capture file
+>4	string		>\0		- version %s
+>44	leshort		0		(Ethernet)
+>44	leshort		1		(Token Ring)
+>44	leshort		2		(FDDI)
+>44	leshort		3		(WAN)
+>44	leshort		8		(ATM)
+>44	leshort		9		(802.11)
+
+#
+# "libpcap" capture files.
+# (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
+# the main program that uses that format, but there are other programs
+# that use "libpcap", or that use the same capture file format.)
+#
+0	ubelong		0xa1b2c3d4	tcpdump capture file (big-endian)
+>4	beshort		x		- version %d
+>6	beshort		x		\b.%d
+>20	belong		0		(No link-layer encapsulation
+>20	belong		1		(Ethernet
+>20	belong		2		(3Mb Ethernet
+>20	belong		3		(AX.25
+>20	belong		4		(ProNET
+>20	belong		5		(CHAOS
+>20	belong		6		(Token Ring
+>20	belong		7		(BSD ARCNET
+>20	belong		8		(SLIP
+>20	belong		9		(PPP
+>20	belong		10		(FDDI
+>20	belong		11		(RFC 1483 ATM
+>20	belong		12		(raw IP
+>20	belong		13		(BSD/OS SLIP
+>20	belong		14		(BSD/OS PPP
+>20	belong		19		(Linux ATM Classical IP
+>20	belong		50		(PPP or Cisco HDLC
+>20	belong		51		(PPP-over-Ethernet
+>20	belong		99		(Symantec Enterprise Firewall
+>20	belong		100		(RFC 1483 ATM
+>20	belong		101		(raw IP
+>20	belong		102		(BSD/OS SLIP
+>20	belong		103		(BSD/OS PPP
+>20	belong		104		(BSD/OS Cisco HDLC
+>20	belong		105		(802.11
+>20	belong		106		(Linux Classical IP over ATM
+>20	belong		107		(Frame Relay
+>20	belong		108		(OpenBSD loopback
+>20	belong		109		(OpenBSD IPsec encrypted
+>20	belong		112		(Cisco HDLC
+>20	belong		113		(Linux "cooked"
+>20	belong		114		(LocalTalk
+>20	belong		117		(OpenBSD PFLOG
+>20	belong		119		(802.11 with Prism header
+>20	belong		122		(RFC 2625 IP over Fibre Channel
+>20	belong		123		(SunATM
+>20	belong		127		(802.11 with radiotap header
+>20	belong		129		(Linux ARCNET
+>20	belong		138		(Apple IP over IEEE 1394
+>20	belong		140		(MTP2
+>20	belong		141		(MTP3
+>20	belong		143		(DOCSIS
+>20	belong		144		(IrDA
+>20	belong		147		(Private use 0
+>20	belong		148		(Private use 1
+>20	belong		149		(Private use 2
+>20	belong		150		(Private use 3
+>20	belong		151		(Private use 4
+>20	belong		152		(Private use 5
+>20	belong		153		(Private use 6
+>20	belong		154		(Private use 7
+>20	belong		155		(Private use 8
+>20	belong		156		(Private use 9
+>20	belong		157		(Private use 10
+>20	belong		158		(Private use 11
+>20	belong		159		(Private use 12
+>20	belong		160		(Private use 13
+>20	belong		161		(Private use 14
+>20	belong		162		(Private use 15
+>20	belong		163		(802.11 with AVS header
+>16	belong		x		\b, capture length %d)
+0	ulelong		0xa1b2c3d4	tcpdump capture file (little-endian)
+>4	leshort		x		- version %d
+>6	leshort		x		\b.%d
+>20	lelong		0		(No link-layer encapsulation
+>20	lelong		1		(Ethernet
+>20	lelong		2		(3Mb Ethernet
+>20	lelong		3		(AX.25
+>20	lelong		4		(ProNET
+>20	lelong		5		(CHAOS
+>20	lelong		6		(Token Ring
+>20	lelong		7		(ARCNET
+>20	lelong		8		(SLIP
+>20	lelong		9		(PPP
+>20	lelong		10		(FDDI
+>20	lelong		11		(RFC 1483 ATM
+>20	lelong		12		(raw IP
+>20	lelong		13		(BSD/OS SLIP
+>20	lelong		14		(BSD/OS PPP
+>20	lelong		19		(Linux ATM Classical IP
+>20	lelong		50		(PPP or Cisco HDLC
+>20	lelong		51		(PPP-over-Ethernet
+>20	lelong		99		(Symantec Enterprise Firewall
+>20	lelong		100		(RFC 1483 ATM
+>20	lelong		101		(raw IP
+>20	lelong		102		(BSD/OS SLIP
+>20	lelong		103		(BSD/OS PPP
+>20	lelong		104		(BSD/OS Cisco HDLC
+>20	lelong		105		(802.11
+>20	lelong		106		(Linux Classical IP over ATM
+>20	lelong		107		(Frame Relay
+>20	lelong		108		(OpenBSD loopback
+>20	lelong		109		(OpenBSD IPsec encrypted
+>20	lelong		112		(Cisco HDLC
+>20	lelong		113		(Linux "cooked"
+>20	lelong		114		(LocalTalk
+>20	lelong		117		(OpenBSD PFLOG
+>20	lelong		119		(802.11 with Prism header
+>20	lelong		122		(RFC 2625 IP over Fibre Channel
+>20	lelong		123		(SunATM
+>20	lelong		127		(802.11 with radiotap header
+>20	lelong		129		(Linux ARCNET
+>20	lelong		138		(Apple IP over IEEE 1394
+>20	lelong		140		(MTP2
+>20	lelong		141		(MTP3
+>20	lelong		143		(DOCSIS
+>20	lelong		144		(IrDA
+>20	lelong		147		(Private use 0
+>20	lelong		148		(Private use 1
+>20	lelong		149		(Private use 2
+>20	lelong		150		(Private use 3
+>20	lelong		151		(Private use 4
+>20	lelong		152		(Private use 5
+>20	lelong		153		(Private use 6
+>20	lelong		154		(Private use 7
+>20	lelong		155		(Private use 8
+>20	lelong		156		(Private use 9
+>20	lelong		157		(Private use 10
+>20	lelong		158		(Private use 11
+>20	lelong		159		(Private use 12
+>20	lelong		160		(Private use 13
+>20	lelong		161		(Private use 14
+>20	lelong		162		(Private use 15
+>20	lelong		163		(802.11 with AVS header
+>16	lelong		x		\b, capture length %d)
+
+#
+# "libpcap"-with-Alexey-Kuznetsov's-patches capture files.
+# (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
+# the main program that uses that format, but there are other programs
+# that use "libpcap", or that use the same capture file format.)
+#
+0	ubelong		0xa1b2cd34	extended tcpdump capture file (big-endian)
+>4	beshort		x		- version %d
+>6	beshort		x		\b.%d
+>20	belong		0		(No link-layer encapsulation
+>20	belong		1		(Ethernet
+>20	belong		2		(3Mb Ethernet
+>20	belong		3		(AX.25
+>20	belong		4		(ProNET
+>20	belong		5		(CHAOS
+>20	belong		6		(Token Ring
+>20	belong		7		(ARCNET
+>20	belong		8		(SLIP
+>20	belong		9		(PPP
+>20	belong		10		(FDDI
+>20	belong		11		(RFC 1483 ATM
+>20	belong		12		(raw IP
+>20	belong		13		(BSD/OS SLIP
+>20	belong		14		(BSD/OS PPP
+>16	belong		x		\b, capture length %d)
+0	ulelong		0xa1b2cd34	extended tcpdump capture file (little-endian)
+>4	leshort		x		- version %d
+>6	leshort		x		\b.%d
+>20	lelong		0		(No link-layer encapsulation
+>20	lelong		1		(Ethernet
+>20	lelong		2		(3Mb Ethernet
+>20	lelong		3		(AX.25
+>20	lelong		4		(ProNET
+>20	lelong		5		(CHAOS
+>20	lelong		6		(Token Ring
+>20	lelong		7		(ARCNET
+>20	lelong		8		(SLIP
+>20	lelong		9		(PPP
+>20	lelong		10		(FDDI
+>20	lelong		11		(RFC 1483 ATM
+>20	lelong		12		(raw IP
+>20	lelong		13		(BSD/OS SLIP
+>20	lelong		14		(BSD/OS PPP
+>16	lelong		x		\b, capture length %d)
+
+#
+# AIX "iptrace" capture files.
+#
+0	string		iptrace\ 1.0	"iptrace" capture file
+0	string		iptrace\ 2.0	"iptrace" capture file
+
+#
+# Novell LANalyzer capture files.
+#
+0	leshort		0x1001		LANalyzer capture file
+0	leshort		0x1007		LANalyzer capture file
+
+#
+# HP-UX "nettl" capture files.
+#
+0	string		\x54\x52\x00\x64\x00	"nettl" capture file
+
+#
+# RADCOM WAN/LAN Analyzer capture files.
+#
+0	string		\x42\xd2\x00\x34\x12\x66\x22\x88	RADCOM WAN/LAN Analyzer capture file
+
+#
+# NetStumbler log files.  Not really packets, per se, but about as
+# close as you can get.  These are log files from NetStumbler, a
+# Windows program, that scans for 802.11b networks.
+#
+0	string		NetS		NetStumbler log file
+>8	lelong		x		\b, %d stations found
+
+#
+# EtherPeek/AiroPeek "version 9" capture files.
+#
+0	string		\177ver		EtherPeek/AiroPeek capture file
+
+#
+# Visual Networks traffic capture files.
+#
+0	string		\x05VNF		Visual Networks traffic capture file
+
+#
+# Network Instruments Observer capture files.
+#
+0	string		ObserverPktBuffe	Network Instruments Observer capture file
+
+#
+# Files from Accellent Group's 5View products.
+#
+0	string		\xaa\xaa\xaa\xaa	5View capture file
+
+#------------------------------------------------------------------------------
+# $File: softquad,v 1.13 2009/09/19 16:28:12 christos Exp $
+# softquad:  file(1) magic for SoftQuad Publishing Software
+#
+# Author/Editor and RulesBuilder
+#
+# XXX - byte order?
+#
+0	string		\<!SQ\ DTD>	Compiled SGML rules file
+>9	string		>\0		 Type %s
+0	string		\<!SQ\ A/E>	A/E SGML Document binary
+>9	string		>\0		 Type %s
+0	string		\<!SQ\ STS>	A/E SGML binary styles file
+>9	string		>\0		 Type %s
+0	short		0xc0de		Compiled PSI (v1) data
+0	short		0xc0da		Compiled PSI (v2) data
+>3	string		>\0		(%s)
+# Binary sqtroff font/desc files...
+0	short		0125252		SoftQuad DESC or font file binary
+>2	short		>0		- version %d
+# Bitmaps...
+0	search/1	SQ\ BITMAP1	SoftQuad Raster Format text
+#0	string		SQ\ BITMAP2	SoftQuad Raster Format data
+# sqtroff intermediate language (replacement for ditroff int. lang.)
+0	string		X\ 		SoftQuad troff Context intermediate
+>2	string		495		for AT&T 495 laser printer
+>2	string		hp		for Hewlett-Packard LaserJet
+>2	string		impr		for IMAGEN imPRESS
+>2	string		ps		for PostScript
+
+# From: Michael Piefel <piefel at debian.org>
+# sqtroff intermediate language (replacement for ditroff int. lang.)
+0	string		X\ 495		SoftQuad troff Context intermediate for AT&T 495 laser printer
+0	string		X\ hp		SoftQuad troff Context intermediate for HP LaserJet
+0	string		X\ impr		SoftQuad troff Context intermediate for IMAGEN imPRESS
+0	string		X\ ps		SoftQuad troff Context intermediate for PostScript
+
+#------------------------------------------------------------------------------
+# $File: spec,v 1.4 2009/09/19 16:28:12 christos Exp $
+# spec:  file(1) magic for SPEC raw results (*.raw, *.rsf)
+#
+# Cloyce D. Spradling <cloyce at headgear.org>
+
+0	string	spec			SPEC
+>4	string	.cpu			CPU
+>>8	string	<:			\b%.4s
+>>12	string	.			raw result text
+
+17	string	version=SPECjbb		SPECjbb
+>32	string	<:			\b%.4s
+>>37	string	<:			v%.4s raw result text
+
+0	string	BEGIN\040SPECWEB	SPECweb
+>13	string	<:			\b%.2s
+>>15	string	_SSL			\b_SSL
+>>>20	string	<:			v%.4s raw result text
+>>16	string	<:			v%.4s raw result text
+
+#------------------------------------------------------------------------------
+# $File: spectrum,v 1.6 2009/09/19 16:28:12 christos Exp $
+# spectrum:  file(1) magic for Spectrum emulator files.
+#
+# John Elliott <jce at seasip.demon.co.uk>
+
+#
+# Spectrum +3DOS header
+#
+0       string          PLUS3DOS\032    Spectrum +3 data
+>15     byte            0               - BASIC program
+>15     byte            1               - number array
+>15     byte            2               - character array
+>15     byte            3               - memory block
+>>16    belong          0x001B0040      (screen)
+>15     byte            4               - Tasword document
+>15     string          TAPEFILE        - ZXT tapefile
+#
+# Tape file. This assumes the .TAP starts with a Spectrum-format header,
+# which nearly all will.
+#
+0       string          \023\000\000    Spectrum .TAP data
+>4      string          x               "%-10.10s"
+>3      byte            0               - BASIC program
+>3      byte            1               - number array
+>3      byte            2               - character array
+>3      byte            3               - memory block
+>>14    belong          0x001B0040      (screen)
+
+# The following three blocks are from pak21-spectrum at srcf.ucam.org
+# TZX tape images
+0      string          ZXTape!\x1a     Spectrum .TZX data
+>8     byte            x               version %d
+>9     byte            x               \b.%d
+
+# RZX input recording files
+0      string          RZX!            Spectrum .RZX data
+>4     byte            x               version %d
+>5     byte            x               \b.%d
+
+# Floppy disk images
+0      string          MV\ -\ CPCEMU\ Disk-Fil Amstrad/Spectrum .DSK data
+0      string          MV\ -\ CPC\ format\ Dis Amstrad/Spectrum DU54 .DSK data
+0      string          EXTENDED\ CPC\ DSK\ Fil Amstrad/Spectrum Extended .DSK data
+0      string          SINCLAIR        Spectrum .SCL Betadisk image
+
+# Hard disk images
+0      string          RS-IDE\x1a      Spectrum .HDF hard disk image
+>7     byte            x               \b, version 0x%02x
+
+#------------------------------------------------------------------------------
+# $File: sql,v 1.6 2009/09/19 16:28:12 christos Exp $
+# sql:  file(1) magic for SQL files
+#
+# From: "Marty Leisner" <mleisner at eng.mc.xerox.com>
+# Recognize some MySQL files.
+#
+0	beshort			0xfe01		MySQL table definition file
+>2	byte			x		Version %d
+0	belong&0xffffff00	0xfefe0300	MySQL MISAM index file
+>3	byte			x		Version %d
+0	belong&0xffffff00	0xfefe0700	MySQL MISAM compressed data file
+>3	byte			x		Version %d
+0	belong&0xffffff00	0xfefe0500	MySQL ISAM index file
+>3	byte			x		Version %d
+0	belong&0xffffff00	0xfefe0600	MySQL ISAM compressed data file
+>3	byte			x		Version %d
+0	string		 	\376bin		MySQL replication log
+
+#------------------------------------------------------------------------------
+# iRiver H Series database file 
+# From Ken Guest <ken at linux.ie>
+# As observed from iRivNavi.iDB and unencoded firmware
+#
+0   string		iRivDB	iRiver Database file
+>11  string	>\0	Version %s
+>39  string		iHP-100	[H Series]
+
+#------------------------------------------------------------------------------
+# SQLite database files
+# Ken Guest <ken at linux.ie>, Ty Sarna, Zack Weinberg
+#
+# Version 1 used GDBM internally; its files cannot be distinguished
+# from other GDBM files.
+#
+# Version 2 used this format:
+0	string	**\ This\ file\ contains\ an\ SQLite  SQLite 2.x database
+
+# Version 3 of SQLite allows applications to embed their own "user version"
+# number in the database.  Detect this and distinguish those files.
+
+0   string  SQLite\ format\ 3
+>60 string  _MTN               Monotone source repository
+>60 belong  !0                 SQLite 3.x database, user version %u
+>60 belong  0                  SQLite 3.x database
+
+#------------------------------------------------------------------------------
+# $File: sun,v 1.20 2009/09/19 16:28:12 christos Exp $
+# sun:  file(1) magic for Sun machines
+#
+# Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x
+# releases.  (5.x uses ELF.)
+#
+0	belong&077777777	0600413		sparc demand paged
+>0	byte		&0x80
+>>20	belong		<4096		shared library
+>>20	belong		=4096		dynamically linked executable
+>>20	belong		>4096		dynamically linked executable
+>0	byte		^0x80		executable
+>16	belong		>0		not stripped
+
+0	belong&077777777	0600410		sparc pure
+>0	byte		&0x80		dynamically linked executable
+>0	byte		^0x80		executable
+>16	belong		>0		not stripped
+
+0	belong&077777777	0600407		sparc
+>0	byte		&0x80		dynamically linked executable
+>0	byte		^0x80		executable
+>16	belong		>0		not stripped
+
+0	belong&077777777	0400413		mc68020 demand paged
+>0	byte		&0x80
+>>20	belong		<4096		shared library
+>>20	belong		=4096		dynamically linked executable
+>>20	belong		>4096		dynamically linked executable
+>0	byte		^0x80		executable
+>16	belong		>0		not stripped
+
+0	belong&077777777	0400410		mc68020 pure
+>0	byte		&0x80		dynamically linked executable
+>0	byte		^0x80		executable
+>16	belong		>0		not stripped
+
+0	belong&077777777	0400407		mc68020
+>0	byte		&0x80		dynamically linked executable
+>0	byte		^0x80		executable
+>16	belong		>0		not stripped
+
+0	belong&077777777	0200413		mc68010 demand paged
+>0	byte		&0x80
+>>20	belong		<4096		shared library
+>>20	belong		=4096		dynamically linked executable
+>>20	belong		>4096		dynamically linked executable
+>0	byte		^0x80		executable
+>16	belong		>0		not stripped
+
+0	belong&077777777	0200410		mc68010 pure
+>0	byte		&0x80		dynamically linked executable
+>0	byte		^0x80		executable
+>16	belong		>0		not stripped
+
+0	belong&077777777	0200407		mc68010
+>0	byte		&0x80		dynamically linked executable
+>0	byte		^0x80		executable
+>16	belong		>0		not stripped
+
+# reworked these to avoid anything beginning with zero becoming "old sun-2"
+0	belong		0407		old sun-2 executable
+>16	belong		>0		not stripped
+0	belong		0410		old sun-2 pure executable
+>16	belong		>0		not stripped
+0	belong		0413		old sun-2 demand paged executable
+>16	belong		>0		not stripped
+
+#
+# Core files.  "SPARC 4.x BCP" means "core file from a SunOS 4.x SPARC
+# binary executed in compatibility mode under SunOS 5.x".
+#
+0	belong		0x080456	SunOS core file
+>4	belong		432		(SPARC)
+>>132	string		>\0		from '%s'
+>>116	belong		=3		(quit)
+>>116	belong		=4		(illegal instruction)
+>>116	belong		=5		(trace trap)
+>>116	belong		=6		(abort)
+>>116	belong		=7		(emulator trap)
+>>116	belong		=8		(arithmetic exception)
+>>116	belong		=9		(kill)
+>>116	belong		=10		(bus error)
+>>116	belong		=11		(segmentation violation)
+>>116	belong		=12		(bad argument to system call)
+>>116	belong		=29		(resource lost)
+>>120	belong		x		(T=%dK,
+>>124	belong		x		D=%dK,
+>>128	belong		x		S=%dK)
+>4	belong		826		(68K)
+>>128	string		>\0		from '%s'
+>4	belong		456		(SPARC 4.x BCP)
+>>152	string		>\0		from '%s'
+# Sun SunPC
+0	long		0xfa33c08e	SunPC 4.0 Hard Disk
+0	string		#SUNPC_CONFIG	SunPC 4.0 Properties Values
+# Sun snoop (see RFC 1761, which describes the capture file format).
+#
+0	string		snoop		Snoop capture file
+>8	belong		>0		- version %ld
+>12	belong		0		(IEEE 802.3)
+>12	belong		1		(IEEE 802.4)
+>12	belong		2		(IEEE 802.5)
+>12	belong		3		(IEEE 802.6)
+>12	belong		4		(Ethernet)
+>12	belong		5		(HDLC)
+>12	belong		6		(Character synchronous)
+>12	belong		7		(IBM channel-to-channel adapter)
+>12	belong		8		(FDDI)
+>12	belong		9		(Unknown)
+
+# Microsoft ICM color profile
+36	string		acspMSFT	Microsoft ICM Color Profile
+# Sun KCMS
+36	string		acsp		Kodak Color Management System, ICC Profile
+
+#---------------------------------------------------------------------------
+# The following entries have been tested by Duncan Laurie <duncan at sun.com> (a
+# lead Sun/Cobalt developer) who agrees that they are good and worthy of
+# inclusion.
+
+# Boot ROM images for Sun/Cobalt Linux server appliances
+0       string  Cobalt\ Networks\ Inc.\nFirmware\ v     Paged COBALT boot rom
+>38     string x        V%.4s
+
+# New format for Sun/Cobalt boot ROMs is annoying, it stores the version code
+# at the very end where file(1) can't get it.
+0       string CRfs     COBALT boot rom data (Flat boot rom or file system)
+
+
+
+#------------------------------------------------------------------------
+# $File: sysex,v 1.6 2009/09/19 16:28:12 christos Exp $
+# sysex: file(1) magic for MIDI sysex files
+#
+# 
+0	byte			0xF0		SysEx File -
+
+# North American Group
+>1	byte			0x01		Sequential
+>1	byte			0x02		IDP
+>1	byte			0x03		OctavePlateau
+>1	byte			0x04		Moog
+>1	byte			0x05		Passport
+>1	byte			0x06		Lexicon
+>1	byte			0x07		Kurzweil/Future Retro
+>>3	byte			0x77		777
+>>4	byte			0x00		Bank
+>>4	byte			0x01		Song
+>>5	byte			0x0f		16
+>>5	byte			0x0e		15
+>>5	byte			0x0d		14
+>>5	byte			0x0c		13
+>>5	byte			0x0b		12
+>>5	byte			0x0a		11
+>>5	byte			0x09		10
+>>5	byte			0x08		9
+>>5	byte			0x07		8
+>>5	byte			0x06		7
+>>5	byte			0x05		6
+>>5	byte			0x04		5
+>>5	byte			0x03		4
+>>5	byte			0x02		3
+>>5	byte			0x01		2
+>>5	byte			0x00		1
+>>5	byte			0x10		(ALL)
+>>2	byte			x			\b, Channel %d
+>1	byte			0x08		Fender
+>1	byte			0x09		Gulbransen
+>1	byte			0x0a		AKG
+>1	byte			0x0b		Voyce
+>1	byte			0x0c		Waveframe
+>1	byte			0x0d		ADA
+>1	byte			0x0e		Garfield
+>1	byte			0x0f		Ensoniq
+>1	byte			0x10		Oberheim
+>>2	byte			0x06		Matrix 6 series
+>>3	byte			0x0A		Dump (All)
+>>3	byte			0x01		Dump (Bank)
+>>4 belong			0x0002040E		Matrix 1000
+>>>11 byte			<2			User bank %d
+>>>11 byte			>1			Preset bank %d
+>1	byte			0x11		Apple
+>1	byte			0x12		GreyMatter
+>1	byte			0x14		PalmTree
+>1	byte			0x15		JLCooper
+>1	byte			0x16		Lowrey
+>1	byte			0x17		AdamsSmith
+>1	byte			0x18		E-mu
+>1	byte			0x19		Harmony
+>1	byte			0x1a		ART
+>1	byte			0x1b		Baldwin
+>1	byte			0x1c		Eventide
+>1	byte			0x1d		Inventronics
+>1	byte			0x1f		Clarity
+
+# European Group
+>1	byte			0x21		SIEL
+>1	byte			0x22		Synthaxe
+>1	byte			0x24		Hohner
+>1	byte			0x25		Twister
+>1	byte			0x26		Solton
+>1	byte			0x27		Jellinghaus
+>1	byte			0x28		Southworth
+>1	byte			0x29		PPG
+>1	byte			0x2a		JEN
+>1	byte			0x2b		SSL
+>1	byte			0x2c		AudioVertrieb
+
+>1	byte			0x2f		ELKA
+>>3	byte			0x09		EK-44
+
+>1	byte			0x30		Dynacord
+>1	byte			0x31		Jomox
+>1	byte			0x33		Clavia
+>1	byte			0x39		Soundcraft
+# Some Waldorf info from http://Stromeko.Synth.net/Downloads#WaldorfDocs
+>1	byte			0x3e		Waldorf
+>>2	byte			0x00		microWave
+>>2	byte			0x0E		microwave2 / XT
+>>2	byte			0x0F		Q / Q+
+>>3	byte			=0			(default id)
+>>3 byte			>0			(
+>>>3 byte			<0x7F		\bdevice %d)
+>>>3 byte			=0x7F		\bbroadcast id)
+>>3	byte			0x7f		Microwave I
+>>>4	byte			0x00		SNDR (Sound Request)
+>>>4	byte			0x10		SNDD (Sound Dump)
+>>>4	byte			0x20		SNDP (Sound Parameter Change)
+>>>4	byte			0x30		SNDQ (Sound Parameter Inquiry)
+>>>4	byte			0x70		BOOT (Sound Reserved)
+>>>4	byte			0x01		MULR (Multi Request)
+>>>4	byte			0x11		MULD (Multi Dump)
+>>>4	byte			0x21		MULP (Multi Parameter Change)
+>>>4	byte			0x31		MULQ (Multi Parameter Inquiry)
+>>>4	byte			0x71		OS (Multi Reserved)
+>>>4	byte			0x02		DRMR (Drum Map Request)
+>>>4	byte			0x12		DRMD (Drum Map Dump)
+>>>4	byte			0x22		DRMP (Drum Map Parameter Change)
+>>>4	byte			0x32		DRMQ (Drum Map Parameter Inquiry)
+>>>4	byte			0x72		BIN (Drum Map Reserved)
+>>>4	byte			0x03		PATR (Sequencer Pattern Request)
+>>>4	byte			0x13		PATD (Sequencer Pattern Dump)
+>>>4	byte			0x23		PATP (Sequencer Pattern Parameter Change)
+>>>4	byte			0x33		PATQ (Sequencer Pattern Parameter Inquiry)
+>>>4	byte			0x73		AFM (Sequencer Pattern Reserved)
+>>>4	byte			0x04		GLBR (Global Parameter Request)
+>>>4	byte			0x14		GLBD (Global Parameter Dump)
+>>>4	byte			0x24		GLBP (Global Parameter Parameter Change)
+>>>4	byte			0x34		GLBQ (Global Parameter Parameter Inquiry)
+>>>4	byte			0x07		MODR (Mode Parameter Request)
+>>>4	byte			0x17		MODD (Mode Parameter Dump)
+>>>4	byte			0x27		MODP (Mode Parameter Parameter Change)
+>>>4	byte			0x37		MODQ (Mode Parameter Parameter Inquiry)
+>>2	byte			0x10		microQ
+>>>4	byte			0x00		SNDR (Sound Request)
+>>>4	byte			0x10		SNDD (Sound Dump)
+>>>4	byte			0x20		SNDP (Sound Parameter Change)
+>>>4	byte			0x30		SNDQ (Sound Parameter Inquiry)
+>>>4	byte			0x70		(Sound Reserved)
+>>>4	byte			0x01		MULR (Multi Request)
+>>>4	byte			0x11		MULD (Multi Dump)
+>>>4	byte			0x21		MULP (Multi Parameter Change)
+>>>4	byte			0x31		MULQ (Multi Parameter Inquiry)
+>>>4	byte			0x71		OS (Multi Reserved)
+>>>4	byte			0x02		DRMR (Drum Map Request)
+>>>4	byte			0x12		DRMD (Drum Map Dump)
+>>>4	byte			0x22		DRMP (Drum Map Parameter Change)
+>>>4	byte			0x32		DRMQ (Drum Map Parameter Inquiry)
+>>>4	byte			0x72		BIN (Drum Map Reserved)
+>>>4	byte			0x04		GLBR (Global Parameter Request)
+>>>4	byte			0x14		GLBD (Global Parameter Dump)
+>>>4	byte			0x24		GLBP (Global Parameter Parameter Change)
+>>>4	byte			0x34		GLBQ (Global Parameter Parameter Inquiry)
+>>2	byte			0x11		rackAttack
+>>>4	byte			0x00		SNDR (Sound Parameter Request)
+>>>4	byte			0x10		SNDD (Sound Parameter Dump)
+>>>4	byte			0x20		SNDP (Sound Parameter Parameter Change)
+>>>4	byte			0x30		SNDQ (Sound Parameter Parameter Inquiry)
+>>>4	byte			0x01		PRGR (Program Parameter Request)
+>>>4	byte			0x11		PRGD (Program Parameter Dump)
+>>>4	byte			0x21		PRGP (Program Parameter Parameter Change)
+>>>4	byte			0x31		PRGQ (Program Parameter Parameter Inquiry)
+>>>4	byte			0x71		OS (Program Parameter Reserved)
+>>>4	byte			0x03		PATR (Pattern Parameter Request)
+>>>4	byte			0x13		PATD (Pattern Parameter Dump)
+>>>4	byte			0x23		PATP (Pattern Parameter Parameter Change)
+>>>4	byte			0x33		PATQ (Pattern Parameter Parameter Inquiry)
+>>>4	byte			0x04		GLBR (Global Parameter Request)
+>>>4	byte			0x14		GLBD (Global Parameter Dump)
+>>>4	byte			0x24		GLBP (Global Parameter Parameter Change)
+>>>4	byte			0x34		GLBQ (Global Parameter Parameter Inquiry)
+>>>4	byte			0x05		EFXR (FX Parameter Request)
+>>>4	byte			0x15		EFXD (FX Parameter Dump)
+>>>4	byte			0x25		EFXP (FX Parameter Parameter Change)
+>>>4	byte			0x35		EFXQ (FX Parameter Parameter Inquiry)
+>>>4	byte			0x07		MODR (Mode Command Request)
+>>>4	byte			0x17		MODD (Mode Command Dump)
+>>>4	byte			0x27		MODP (Mode Command Parameter Change)
+>>>4	byte			0x37		MODQ (Mode Command Parameter Inquiry)
+>>2	byte			0x03		Wave
+>>>4	byte			0x00		SBPR (Soundprogram)
+>>>4	byte			0x01		SAPR (Performance)
+>>>4	byte			0x02		SWAVE (Wave)
+>>>4	byte			0x03		SWTBL (Wave control table)
+>>>4	byte			0x04		SVT (Velocity Curve)
+>>>4	byte			0x05		STT (Tuning Table)
+>>>4	byte			0x06		SGLB (Global Parameters)
+>>>4	byte			0x07		SARRMAP (Performance Program Change Map)
+>>>4	byte			0x08		SBPRMAP (Sound Program Change Map)
+>>>4	byte			0x09		SBPRPAR (Sound Parameter)
+>>>4	byte			0x0A		SARRPAR (Performance Parameter)
+>>>4	byte			0x0B		SINSPAR (Instrument/External Parameter)
+>>>4	byte			0x0F		SBULK (Bulk Switch on/off)
+
+# Japanese Group
+>1	byte			0x40		Kawai
+>>3	byte			0x20		K1
+>>3	byte			0x22		K4
+
+>1	byte			0x41		Roland
+>>3	byte			0x14		D-50
+>>3	byte			0x2b		U-220
+>>3	byte			0x02		TR-707
+
+>1	byte			0x42		Korg
+>>3	byte			0x19		M1
+
+>1	byte			0x43		Yamaha
+>1	byte			0x44		Casio
+>1	byte			0x46		Kamiya
+>1	byte			0x47		Akai
+>1	byte			0x48		Victor
+>1	byte			0x49		Mesosha
+>1	byte			0x4b		Fujitsu
+>1	byte			0x4c		Sony
+>1	byte			0x4e		Teac
+>1	byte			0x50		Matsushita
+>1	byte			0x51		Fostex
+>1	byte			0x52		Zoom
+>1	byte			0x54		Matsushita
+>1	byte			0x57		Acoustic tech. lab.
+
+>1	belong&0xffffff00	0x00007400	Ta Horng
+>1	belong&0xffffff00	0x00007500	e-Tek
+>1	belong&0xffffff00	0x00007600	E-Voice
+>1	belong&0xffffff00	0x00007700	Midisoft
+>1	belong&0xffffff00	0x00007800	Q-Sound
+>1	belong&0xffffff00	0x00007900	Westrex
+>1	belong&0xffffff00	0x00007a00	Nvidia*
+>1	belong&0xffffff00	0x00007b00	ESS
+>1	belong&0xffffff00	0x00007c00	Mediatrix
+>1	belong&0xffffff00	0x00007d00	Brooktree
+>1	belong&0xffffff00	0x00007e00	Otari
+>1	belong&0xffffff00	0x00007f00	Key Electronics
+>1	belong&0xffffff00	0x00010000	Shure
+>1	belong&0xffffff00	0x00010100	AuraSound
+>1	belong&0xffffff00	0x00010200	Crystal
+>1	belong&0xffffff00	0x00010300	Rockwell
+>1	belong&0xffffff00	0x00010400	Silicon Graphics
+>1	belong&0xffffff00	0x00010500	Midiman
+>1	belong&0xffffff00	0x00010600	PreSonus
+>1	belong&0xffffff00	0x00010800	Topaz
+>1	belong&0xffffff00	0x00010900	Cast Lightning
+>1	belong&0xffffff00	0x00010a00	Microsoft
+>1	belong&0xffffff00	0x00010b00	Sonic Foundry
+>1	belong&0xffffff00	0x00010c00	Line 6
+>1	belong&0xffffff00	0x00010d00	Beatnik Inc.
+>1	belong&0xffffff00	0x00010e00	Van Koerving
+>1	belong&0xffffff00	0x00010f00	Altech Systems
+>1	belong&0xffffff00	0x00011000	S & S Research
+>1	belong&0xffffff00	0x00011100	VLSI Technology
+>1	belong&0xffffff00	0x00011200	Chromatic
+>1	belong&0xffffff00	0x00011300	Sapphire
+>1	belong&0xffffff00	0x00011400	IDRC
+>1	belong&0xffffff00	0x00011500	Justonic Tuning
+>1	belong&0xffffff00	0x00011600	TorComp
+>1	belong&0xffffff00	0x00011700	Newtek Inc.
+>1	belong&0xffffff00	0x00011800	Sound Sculpture
+>1	belong&0xffffff00	0x00011900	Walker Technical
+>1	belong&0xffffff00	0x00011a00	Digital Harmony
+>1	belong&0xffffff00	0x00011b00	InVision
+>1	belong&0xffffff00	0x00011c00	T-Square
+>1	belong&0xffffff00	0x00011d00	Nemesys
+>1	belong&0xffffff00	0x00011e00	DBX
+>1	belong&0xffffff00	0x00011f00	Syndyne
+>1	belong&0xffffff00	0x00012000	Bitheadz	
+>1	belong&0xffffff00	0x00012100	Cakewalk
+>1	belong&0xffffff00	0x00012200	Staccato
+>1	belong&0xffffff00	0x00012300	National Semicon.
+>1	belong&0xffffff00	0x00012400	Boom Theory
+>1	belong&0xffffff00	0x00012500	Virtual DSP Corp
+>1	belong&0xffffff00	0x00012600	Antares
+>1	belong&0xffffff00	0x00012700	Angel Software
+>1	belong&0xffffff00	0x00012800	St Louis Music
+>1	belong&0xffffff00	0x00012900	Lyrrus dba G-VOX
+>1	belong&0xffffff00	0x00012a00	Ashley Audio
+>1	belong&0xffffff00	0x00012b00	Vari-Lite
+>1	belong&0xffffff00	0x00012c00	Summit Audio
+>1	belong&0xffffff00	0x00012d00	Aureal Semicon.
+>1	belong&0xffffff00	0x00012e00	SeaSound
+>1	belong&0xffffff00	0x00012f00	U.S. Robotics
+>1	belong&0xffffff00	0x00013000	Aurisis
+>1	belong&0xffffff00	0x00013100	Nearfield Multimedia
+>1	belong&0xffffff00	0x00013200	FM7 Inc.
+>1	belong&0xffffff00	0x00013300	Swivel Systems
+>1	belong&0xffffff00	0x00013400	Hyperactive
+>1	belong&0xffffff00	0x00013500	MidiLite
+>1	belong&0xffffff00	0x00013600	Radical
+>1	belong&0xffffff00	0x00013700	Roger Linn
+>1	belong&0xffffff00	0x00013800	Helicon
+>1	belong&0xffffff00	0x00013900	Event
+>1	belong&0xffffff00	0x00013a00	Sonic Network
+>1	belong&0xffffff00	0x00013b00	Realtime Music
+>1	belong&0xffffff00	0x00013c00	Apogee Digital
+
+>1	belong&0xffffff00	0x00202b00	Medeli Electronics
+>1	belong&0xffffff00	0x00202c00	Charlie Lab
+>1	belong&0xffffff00	0x00202d00	Blue Chip Music
+>1	belong&0xffffff00	0x00202e00	BEE OH Corp
+>1	belong&0xffffff00	0x00202f00	LG Semicon America
+>1	belong&0xffffff00	0x00203000	TESI
+>1	belong&0xffffff00	0x00203100	EMAGIC
+>1	belong&0xffffff00	0x00203200	Behringer
+>1	belong&0xffffff00	0x00203300	Access Music
+>1	belong&0xffffff00	0x00203400	Synoptic
+>1	belong&0xffffff00	0x00203500	Hanmesoft Corp
+>1	belong&0xffffff00	0x00203600	Terratec
+>1	belong&0xffffff00	0x00203700	Proel SpA
+>1	belong&0xffffff00	0x00203800	IBK MIDI
+>1	belong&0xffffff00	0x00203900	IRCAM
+>1	belong&0xffffff00	0x00203a00	Propellerhead Software
+>1	belong&0xffffff00	0x00203b00	Red Sound Systems
+>1	belong&0xffffff00	0x00203c00	Electron ESI AB
+>1	belong&0xffffff00	0x00203d00	Sintefex Audio
+>1	belong&0xffffff00	0x00203e00	Music and More
+>1	belong&0xffffff00	0x00203f00	Amsaro
+>1	belong&0xffffff00	0x00204000	CDS Advanced Technology
+>1	belong&0xffffff00	0x00204100	Touched by Sound
+>1	belong&0xffffff00	0x00204200	DSP Arts
+>1	belong&0xffffff00	0x00204300	Phil Rees Music
+>1	belong&0xffffff00	0x00204400	Stamer Musikanlagen GmbH
+>1	belong&0xffffff00	0x00204500	Soundart
+>1	belong&0xffffff00	0x00204600	C-Mexx Software
+>1	belong&0xffffff00	0x00204700	Klavis Tech.
+>1	belong&0xffffff00	0x00204800	Noteheads AB
+
+0	string			T707		Roland TR-707 Data
+
+#------------------------------------------------------------------------------
+# $File: teapot,v 1.4 2009/09/19 16:28:12 christos Exp $
+# teapot:  file(1) magic for "teapot" spreadsheet
+#
+0       string          #!teapot\012xdr      teapot work sheet (XDR format)
+
+#------------------------------------------------------------------------------
+# $File: terminfo,v 1.6 2009/09/19 16:28:12 christos Exp $
+# terminfo:  file(1) magic for terminfo
+#
+# XXX - byte order for screen images?
+#
+0	string		\032\001	Compiled terminfo entry
+0	short		0433		Curses screen image
+0	short		0434		Curses screen image
+
+#------------------------------------------------------------------------------
+# $File: tex,v 1.16 2009/09/19 16:28:12 christos Exp $
+# tex:  file(1) magic for TeX files
+#
+# XXX - needs byte-endian stuff (big-endian and little-endian DVI?)
+#
+# From <conklin at talisman.kaleida.com>
+
+# Although we may know the offset of certain text fields in TeX DVI
+# and font files, we can't use them reliably because they are not
+# zero terminated. [but we do anyway, christos]
+0	string		\367\002	TeX DVI file
+!:mime	application/x-dvi
+>16	string		>\0		(%s)
+0	string		\367\203	TeX generic font data
+0	string		\367\131	TeX packed font data
+>3	string		>\0		(%s)
+0	string		\367\312	TeX virtual font data
+0	search/1	This\ is\ TeX,	TeX transcript text
+0	search/1	This\ is\ METAFONT,	METAFONT transcript text
+
+# There is no way to detect TeX Font Metric (*.tfm) files without
+# breaking them apart and reading the data.  The following patterns
+# match most *.tfm files generated by METAFONT or afm2tfm.
+2	string		\000\021	TeX font metric data
+!:mime	application/x-tex-tfm
+>33	string		>\0		(%s)
+2	string		\000\022	TeX font metric data
+!:mime	application/x-tex-tfm
+>33	string		>\0		(%s)
+
+# Texinfo and GNU Info, from Daniel Quinlan (quinlan at yggdrasil.com)
+0	search/1	\\input\ texinfo	Texinfo source text
+!:mime	text/x-texinfo
+0	search/1	This\ is\ Info\ file	GNU Info text
+!:mime	text/x-info
+
+# TeX documents, from Daniel Quinlan (quinlan at yggdrasil.com)
+0	search/4096	\\input		TeX document text
+!:mime	text/x-tex
+!:strength - 4
+0	search/4096	\\section	LaTeX document text
+!:mime	text/x-tex
+!:strength - 1
+0	search/4096	\\setlength	LaTeX document text
+!:mime	text/x-tex
+!:strength - 4
+0	search/4096	\\documentstyle	LaTeX document text
+!:mime	text/x-tex
+!:strength - 1
+0	search/4096	\\chapter	LaTeX document text
+!:mime	text/x-tex
+!:strength - 1
+0	search/4096	\\documentclass	LaTeX 2e document text
+!:mime	text/x-tex
+!:strength - 4
+0	search/4096	\\relax		LaTeX auxiliary file
+!:mime	text/x-tex
+!:strength - 4
+0	search/4096	\\contentsline	LaTeX table of contents
+!:mime	text/x-tex
+!:strength - 4
+0	search/4096	%\ -*-latex-*-	LaTeX document text
+!:mime	text/x-tex
+
+# Tex document, from Hendrik Scholz <hendrik at scholz.net>
+0   	search/1	\\ifx		TeX document text
+
+# Index and glossary files
+0	search/4096	\\indexentry	LaTeX raw index file
+!:strength - 15
+0	search/4096	\\begin{theindex}	LaTeX sorted index
+!:strength - 15
+0	search/4096	\\glossaryentry	LaTeX raw glossary
+!:strength - 15
+0	search/4096	\\begin{theglossary}	LaTeX sorted glossary
+!:strength - 15
+0	search/4096	This\ is\ makeindex	Makeindex log file
+!:strength - 15
+
+# End of TeX
+
+#------------------------------------------------------------------------------
+# file(1) magic for BibTex text files
+# From Hendrik Scholz <hendrik at scholz.net>
+
+0	search/1/c	@article{	BibTeX text file
+0	search/1/c	@book{		BibTeX text file
+0	search/1/c	@inbook{	BibTeX text file
+0	search/1/c	@incollection{	BibTeX text file
+0	search/1/c	@inproceedings{	BibTeX text file
+0	search/1/c	@manual{	BibTeX text file
+0	search/1/c	@misc{		BibTeX text file
+0	search/1/c	@preamble{	BibTeX text file
+0	search/1/c	@phdthesis{	BibTeX text file
+0	search/1/c	@techreport{	BibTeX text file
+0	search/1/c	@unpublished{	BibTeX text file
+
+73	search/1	%%%\ \ 		BibTeX-file{ BibTex text file (with full header)
+
+73	search/1	%%%\ \ @BibTeX-style-file{   BibTeX style text file (with full header)
+
+0	search/1	%\ BibTeX\ standard\ bibliography\ 	BibTeX standard bibliography style text file
+
+0	search/1	%\ BibTeX\ `	BibTeX custom bibliography style text file
+
+0	search/1	@c\ @mapfile{	TeX font aliases text file
+
+#------------------------------------------------------------------------------
+# $File: tgif,v 1.5 2009/09/19 16:28:12 christos Exp $
+# file(1) magic for tgif(1) files
+# From Hendrik Scholz <hendrik at scholz.net>
+
+0	string	%TGIF\ x 		Tgif file version %s
+
+
+#------------------------------------------------------------------------------
+# $File: ti-8x,v 1.6 2009/09/19 16:28:12 christos Exp $
+# ti-8x: file(1) magic for the TI-8x and TI-9x Graphing Calculators.
+#
+# From: Ryan McGuire (rmcguire at freenet.columbus.oh.us).
+#
+# Update: Romain Lievin (roms at lpg.ticalc.org).
+#
+# NOTE: This list is not complete.
+# Files for the TI-80 and TI-81 are pretty rare. I'm not going to put the
+# program/group magic numbers in here because I cannot find any.
+0		string		**TI80**	TI-80 Graphing Calculator File.
+0		string		**TI81**	TI-81 Graphing Calculator File.
+#
+# Magic Numbers for the TI-73
+#
+0		string		**TI73**	TI-73 Graphing Calculator
+>0x00003B	byte		0x00		(real number)
+>0x00003B	byte		0x01		(list)
+>0x00003B	byte		0x02		(matrix)
+>0x00003B	byte		0x03		(equation)
+>0x00003B	byte		0x04		(string)
+>0x00003B	byte		0x05		(program)
+>0x00003B	byte		0x06		(assembly program)
+>0x00003B	byte		0x07		(picture)
+>0x00003B	byte		0x08		(gdb)
+>0x00003B	byte		0x0C		(complex number)
+>0x00003B	byte		0x0F		(window settings)
+>0x00003B	byte		0x10		(zoom)
+>0x00003B	byte		0x11		(table setup)
+>0x00003B	byte		0x13		(backup)
+
+# Magic Numbers for the TI-82
+#
+0		string		**TI82**	TI-82 Graphing Calculator
+>0x00003B	byte		0x00		(real)
+>0x00003B	byte		0x01		(list)
+>0x00003B	byte		0x02		(matrix)
+>0x00003B	byte		0x03		(Y-variable)
+>0x00003B	byte		0x05		(program)
+>0x00003B	byte		0x06		(protected prgm)
+>0x00003B	byte		0x07		(picture)
+>0x00003B	byte		0x08		(gdb)
+>0x00003B	byte		0x0B		(window settings)
+>0x00003B	byte		0x0C		(window settings)
+>0x00003B	byte		0x0D		(table setup)
+>0x00003B	byte		0x0E		(screenshot)
+>0x00003B	byte		0x0F		(backup)
+#
+# Magic Numbers for the TI-83
+#
+0		string		**TI83**	TI-83 Graphing Calculator
+>0x00003B	byte		0x00		(real)
+>0x00003B	byte		0x01		(list)
+>0x00003B	byte		0x02		(matrix)
+>0x00003B	byte		0x03		(Y-variable)
+>0x00003B	byte		0x04		(string)
+>0x00003B	byte		0x05		(program)
+>0x00003B	byte		0x06		(protected prgm)
+>0x00003B	byte		0x07		(picture)
+>0x00003B	byte		0x08		(gdb)
+>0x00003B	byte		0x0B		(window settings)
+>0x00003B	byte		0x0C		(window settings)
+>0x00003B	byte		0x0D		(table setup)
+>0x00003B	byte		0x0E		(screenshot)
+>0x00003B	byte		0x13		(backup)
+#
+# Magic Numbers for the TI-83+
+#
+0		string		**TI83F*	TI-83+ Graphing Calculator
+>0x00003B	byte		0x00		(real number)
+>0x00003B	byte		0x01		(list)
+>0x00003B	byte		0x02		(matrix)
+>0x00003B	byte		0x03		(equation)
+>0x00003B	byte		0x04		(string)
+>0x00003B	byte		0x05		(program)
+>0x00003B	byte		0x06		(assembly program)
+>0x00003B	byte		0x07		(picture)
+>0x00003B	byte		0x08		(gdb)
+>0x00003B	byte		0x0C		(complex number)
+>0x00003B	byte		0x0F		(window settings)
+>0x00003B	byte		0x10		(zoom)
+>0x00003B	byte		0x11		(table setup)
+>0x00003B	byte		0x13		(backup)
+>0x00003B	byte		0x15		(application variable)
+>0x00003B	byte		0x17		(group of variable)
+
+#
+# Magic Numbers for the TI-85
+#
+0		string		**TI85**	TI-85 Graphing Calculator
+>0x00003B	byte		0x00		(real number)
+>0x00003B	byte		0x01		(complex number)
+>0x00003B	byte		0x02		(real vector)
+>0x00003B	byte		0x03		(complex vector)
+>0x00003B	byte		0x04		(real list)
+>0x00003B	byte		0x05		(complex list)
+>0x00003B	byte		0x06		(real matrix)
+>0x00003B	byte		0x07		(complex matrix)
+>0x00003B	byte		0x08		(real constant)
+>0x00003B	byte		0x09		(complex constant)
+>0x00003B	byte		0x0A		(equation)
+>0x00003B	byte		0x0C		(string)
+>0x00003B	byte		0x0D		(function GDB)
+>0x00003B	byte		0x0E		(polar GDB)
+>0x00003B	byte		0x0F		(parametric GDB)
+>0x00003B	byte		0x10		(diffeq GDB)
+>0x00003B	byte		0x11		(picture)
+>0x00003B	byte		0x12		(program)
+>0x00003B	byte		0x13		(range)
+>0x00003B	byte		0x17		(window settings)
+>0x00003B	byte		0x18		(window settings)
+>0x00003B	byte		0x19		(window settings)
+>0x00003B	byte		0x1A		(window settings)
+>0x00003B	byte		0x1B		(zoom)
+>0x00003B	byte		0x1D		(backup)
+>0x00003B	byte		0x1E		(unknown)
+>0x00003B	byte		0x2A		(equation)
+>0x000032	string		ZS4		- ZShell Version 4 File.
+>0x000032	string		ZS3		- ZShell Version 3 File.
+#
+# Magic Numbers for the TI-86
+#
+0		string		**TI86**	TI-86 Graphing Calculator
+>0x00003B	byte		0x00		(real number)
+>0x00003B	byte		0x01		(complex number)
+>0x00003B	byte		0x02		(real vector)
+>0x00003B	byte		0x03		(complex vector)
+>0x00003B	byte		0x04		(real list)
+>0x00003B	byte		0x05		(complex list)
+>0x00003B	byte		0x06		(real matrix)
+>0x00003B	byte		0x07		(complex matrix)
+>0x00003B	byte		0x08		(real constant)
+>0x00003B	byte		0x09		(complex constant)
+>0x00003B	byte		0x0A		(equation)
+>0x00003B	byte		0x0C		(string)
+>0x00003B	byte		0x0D		(function GDB)
+>0x00003B	byte		0x0E		(polar GDB)
+>0x00003B	byte		0x0F		(parametric GDB)
+>0x00003B	byte		0x10		(diffeq GDB)
+>0x00003B	byte		0x11		(picture)
+>0x00003B	byte		0x12		(program)
+>0x00003B	byte		0x13		(range)
+>0x00003B	byte		0x17		(window settings)
+>0x00003B	byte		0x18		(window settings)
+>0x00003B	byte		0x19		(window settings)
+>0x00003B	byte		0x1A		(window settings)
+>0x00003B	byte		0x1B		(zoom)
+>0x00003B	byte		0x1D		(backup)
+>0x00003B	byte		0x1E		(unknown)
+>0x00003B	byte		0x2A		(equation)
+#
+# Magic Numbers for the TI-89
+#
+0		string		**TI89**	TI-89 Graphing Calculator
+>0x000048	byte		0x00		(expression)
+>0x000048	byte		0x04		(list)
+>0x000048	byte		0x06		(matrix)
+>0x000048	byte		0x0A		(data)
+>0x000048	byte		0x0B		(text)
+>0x000048	byte		0x0C		(string)
+>0x000048	byte		0x0D		(graphic data base)
+>0x000048	byte		0x0E		(figure)
+>0x000048	byte		0x10		(picture)
+>0x000048	byte		0x12		(program)
+>0x000048	byte		0x13		(function)
+>0x000048	byte		0x14		(macro)
+>0x000048	byte		0x1C		(zipped)
+>0x000048	byte		0x21		(assembler)
+#
+# Magic Numbers for the TI-92
+#
+0		string		**TI92**	TI-92 Graphing Calculator
+>0x000048	byte		0x00		(expression)
+>0x000048	byte		0x04		(list)
+>0x000048	byte		0x06		(matrix)
+>0x000048	byte		0x0A		(data)
+>0x000048	byte		0x0B		(text)
+>0x000048	byte		0x0C		(string)
+>0x000048	byte		0x0D		(graphic data base)
+>0x000048	byte		0x0E		(figure)
+>0x000048	byte		0x10		(picture)
+>0x000048	byte		0x12		(program)
+>0x000048	byte		0x13		(function)
+>0x000048	byte		0x14		(macro)
+>0x000048	byte		0x1D		(backup)
+#
+# Magic Numbers for the TI-92+/V200
+#
+0		string		**TI92P*	TI-92+/V200 Graphing Calculator
+>0x000048	byte		0x00		(expression)
+>0x000048	byte		0x04		(list)
+>0x000048	byte		0x06		(matrix)
+>0x000048	byte		0x0A		(data)
+>0x000048	byte		0x0B		(text)
+>0x000048	byte		0x0C		(string)
+>0x000048	byte		0x0D		(graphic data base)
+>0x000048	byte		0x0E		(figure)
+>0x000048	byte		0x10		(picture)
+>0x000048	byte		0x12		(program)
+>0x000048	byte		0x13		(function)
+>0x000048	byte		0x14		(macro)
+>0x000048	byte		0x1C		(zipped)
+>0x000048	byte		0x21		(assembler)
+#
+# Magic Numbers for the TI-73/83+/89/92+/V200 FLASH upgrades
+#
+0x0000016	string		Advanced	TI-XX Graphing Calculator (FLASH)
+0		string		**TIFL**	TI-XX Graphing Calculator (FLASH)
+>8		byte		>0		- Revision %d
+>>9 		byte		x		\b.%d,
+>12		byte		>0		Revision date %02x
+>>13		byte		x		\b/%02x
+>>14		beshort		x		\b/%04x,
+>17		string		>/0		name: '%s',
+>48		byte		0x74		device: TI-73,
+>48		byte		0x73		device: TI-83+,
+>48		byte		0x98		device: TI-89,
+>48		byte		0x88		device: TI-92+,
+>49		byte		0x23		type: OS upgrade,
+>49		byte		0x24		type: application,
+>49		byte		0x25		type: certificate,
+>49		byte		0x3e		type: license,
+>74		lelong		>0		size: %ld bytes
+
+# VTi & TiEmu skins (TI Graphing Calculators).
+# From: Romain Lievin (roms at lpg.ticalc.org).
+# Magic Numbers for the VTi skins
+0               string          VTI		Virtual TI skin
+>3		string		v		- Version
+>>4		byte		>0		\b %c
+>>6		byte		x		\b.%c
+# Magic Numbers for the TiEmu skins
+0		string		TiEmu		TiEmu skin
+>6              string          v               - Version
+>>7             byte            >0              \b %c
+>>9             byte            x               \b.%c
+>>10		byte		x		\b%c
+
+#------------------------------------------------------------------------------
+# $File: timezone,v 1.11 2009/09/19 16:28:12 christos Exp $
+# timezone:  file(1) magic for timezone data
+#
+# from Daniel Quinlan (quinlan at yggdrasil.com)
+# this should work on Linux, SunOS, and maybe others
+# Added new official magic number for recent versions of the Olson code
+0	string	TZif	timezone data
+>4	byte	0	\b, old version
+>4	byte	>0	\b, version %c
+>20	belong	0	\b, no gmt time flags
+>20	belong	1	\b, 1 gmt time flag
+>20	belong	>1	\b, %d gmt time flags
+>24	belong	0	\b, no std time flags
+>20	belong	1	\b, 1 std time flag
+>24	belong	>1	\b, %d std time flags
+>28	belong	0	\b, no leap seconds
+>28	belong	1	\b, 1 leap second
+>28	belong  >1	\b, %d leap seconds
+>32	belong	0	\b, no transition times
+>32	belong	1	\b, 1 transition time
+>32	belong  >1	\b, %d transition times
+>36	belong	0	\b, no abbreviation chars
+>36	belong	1	\b, 1 abbreviation char
+>36	belong	>1	\b, %d abbreviation chars
+0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0	old timezone data
+0	string	\0\0\0\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	old timezone data
+0	string  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0	old timezone data
+0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0	old timezone data
+0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0	old timezone data
+0	string	\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0	old timezone data
+
+#------------------------------------------------------------------------------
+# $File: troff,v 1.10 2009/09/19 16:28:12 christos Exp $
+# troff:  file(1) magic for *roff
+#
+# updated by Daniel Quinlan (quinlan at yggdrasil.com)
+
+# troff input
+0	search/1	.\\"		troff or preprocessor input text
+!:mime	text/troff
+0	search/1	'\\"		troff or preprocessor input text
+!:mime	text/troff
+0	search/1	'.\\"		troff or preprocessor input text
+!:mime	text/troff
+0	search/1	\\"		troff or preprocessor input text
+!:mime	text/troff
+0	search/1	'''		troff or preprocessor input text
+!:mime	text/troff
+0	regex/20	\^\\.[A-Za-z0-9][A-Za-z0-9][\ \t]	troff or preprocessor input text
+!:mime	text/troff
+0	regex/20	\^\\.[A-Za-z0-9][A-Za-z0-9]$	troff or preprocessor input text
+!:mime	text/troff
+
+# ditroff intermediate output text
+0	search/1	x\ T		ditroff output text
+>4	search/1	cat		for the C/A/T phototypesetter
+>4	search/1	ps		for PostScript
+>4	search/1	dvi		for DVI
+>4	search/1	ascii		for ASCII
+>4	search/1	lj4		for LaserJet 4
+>4	search/1	latin1		for ISO 8859-1 (Latin 1)
+>4	search/1	X75		for xditview at 75dpi
+>>7	search/1	-12		(12pt)
+>4	search/1	X100		for xditview at 100dpi
+>>8	search/1	-12		(12pt)
+
+# output data formats
+0	string		\100\357	very old (C/A/T) troff output data
+
+#------------------------------------------------------------------------------
+# $File: tuxedo,v 1.4 2009/09/19 16:28:13 christos Exp $
+# tuxedo:	file(1) magic for BEA TUXEDO data files
+#
+# from Ian Springer <ispringer at hotmail.com>
+#
+0	string		\0\0\1\236\0\0\0\0\0\0\0\0\0\0\0\0	BEA TUXEDO DES mask data
+
+#------------------------------------------------------------------------------
+# $File: typeset,v 1.8 2009/09/19 16:28:13 christos Exp $
+# typeset:  file(1) magic for other typesetting
+#
+0	string		Interpress/Xerox	Xerox InterPress data
+>16	string		/			(version
+>>17	string		>\0			%s)
+
+#------------------------------------------------------------------------------
+# $File: unicode,v 1.5 2009/09/19 16:28:13 christos Exp $
+# Unicode:  BOM prefixed text files - Adrian Havill <havill at turbolinux.co.jp>
+# GRR: These types should be recognised in file_ascmagic so these
+# encodings can be treated by text patterns.
+# Missing types are already dealt with internally.
+#
+0	string	+/v8			Unicode text, UTF-7
+0	string	+/v9			Unicode text, UTF-7
+0	string	+/v+			Unicode text, UTF-7
+0	string	+/v/			Unicode text, UTF-7
+0	string	\335\163\146\163	Unicode text, UTF-8-EBCDIC
+0	string	\376\377\000\000	Unicode text, UTF-32, big-endian
+0	string	\377\376\000\000	Unicode text, UTF-32, little-endian
+0	string	\016\376\377		Unicode text, SCSU (Standard Compression Scheme for Unicode)
+
+#------------------------------------------------------------------------------
+# $File: unknown,v 1.7 2009/09/19 16:28:13 christos Exp $
+# unknown:  file(1) magic for unknown machines
+#
+# XXX - this probably should be pruned, as it'll match PDP-11 and
+# VAX image formats.
+#
+# 0x107 is 0407; 0x108 is 0410; both are PDP-11 (executable and pure,
+# respectively).
+#
+# 0x109 is 0411; that's PDP-11 split I&D, but the PDP-11 version doesn't
+# have the "version %ld", which may be a bogus COFFism (I don't think
+# there ever was COFF for the PDP-11).
+#
+# 0x10B is 0413; that's VAX demand-paged, but this is a short, not a
+# long, as it would be on a VAX.
+#
+# 0x10C is 0414 and 0x10E is 416; those *are* unknown.
+#
+0	short		0x107		unknown machine executable
+>8	short		>0		not stripped
+>15	byte		>0		- version %ld
+0	short		0x108		unknown pure executable
+>8	short		>0		not stripped
+>15	byte		>0		- version %ld
+0	short		0x109		PDP-11 separate I&D
+>8	short		>0		not stripped
+>15	byte		>0		- version %ld
+0	short		0x10b		unknown pure executable
+>8	short		>0		not stripped
+>15	byte		>0		- version %ld
+0	long		0x10c		unknown demand paged pure executable
+>16	long		>0		not stripped
+0	long		0x10e		unknown readable demand paged pure executable
+
+#------------------------------------------------------------------------------
+# $File: uuencode,v 1.7 2009/09/19 16:28:13 christos Exp $
+# uuencode:  file(1) magic for ASCII-encoded files
+#
+
+# GRR:  the first line of xxencoded files is identical to that in uuencoded
+# files, but the first character in most subsequent lines is 'h' instead of
+# 'M'.  (xxencoding uses lowercase letters in place of most of uuencode's
+# punctuation and survives BITNET gateways better.)  If regular expressions
+# were supported, this entry could possibly be split into two with
+# "begin\040\.\*\012M" or "begin\040\.\*\012h" (where \. and \* are REs).
+0	search/1	begin\ 		uuencoded or xxencoded text
+
+# btoa(1) is an alternative to uuencode that requires less space.
+0	search/1	xbtoa\ Begin	btoa'd text
+
+# ship(1) is another, much cooler alternative to uuencode.
+# Greg Roelofs, newt at uchicago.edu
+0	search/1	$\012ship	ship'd binary text
+
+# bencode(8) is used to encode compressed news batches (Bnews/Cnews only?)
+# Greg Roelofs, newt at uchicago.edu
+0	search/1	Decode\ the\ following\ with\ bdeco	bencoded News text
+
+# BinHex is the Macintosh ASCII-encoded file format (see also "apple")
+# Daniel Quinlan, quinlan at yggdrasil.com
+11	search/1	must\ be\ converted\ with\ BinHex	BinHex binary text
+>41	search/1	x					\b, version %.3s
+
+# GRR: handle BASE64
+
+#------------------------------------------------------------------------------
+# $File: varied.out,v 1.21 2009/09/19 16:28:13 christos Exp $
+# varied.out:  file(1) magic for various USG systems
+#
+#	Herewith many of the object file formats used by USG systems.
+#	Most have been moved to files for a particular processor,
+#	and deleted if they duplicate other entries.
+#
+0	short		0610		Perkin-Elmer executable
+# AMD 29K
+0	beshort		0572		amd 29k coff noprebar executable
+0	beshort		01572		amd 29k coff prebar executable
+0	beshort		0160007		amd 29k coff archive
+# Cray
+6	beshort		0407		unicos (cray) executable
+# Ultrix 4.3
+596	string		\130\337\377\377	Ultrix core file
+>600	string		>\0		from '%s'
+# BeOS and MAcOS PEF executables
+# From: hplus at zilker.net (Jon Watte)
+0	string		Joy!peffpwpc	header for PowerPC PEF executable
+#
+# ava assembler/linker Uros Platise <uros.platise at ijs.si>
+0       string          avaobj  AVR assembler object code
+>7      string          >\0     version '%s'
+# gnu gmon magic From: Eugen Dedu <dedu at ese-metz.fr>
+0	string		gmon		GNU prof performance data
+>4	long		x		- version %ld
+# From: Dave Pearson <davep at davep.org>
+# Harbour <URL:http://www.harbour-project.org/> HRB files.
+0	string		\xc0HRB		Harbour HRB file
+>4	short		x		version %d
+
+# From: Alex Beregszaszi <alex at fsn.hu>
+# 0	string		exec 		BugOS executable
+# 0	string		pack		BugOS archive
+
+# From: Jason Spence <jspence at lightconsulting.com>
+# Generated by the "examples" in STM's ST40 devkit, and derived code.
+0	lelong		0x13a9f17e	ST40 component image format
+>4	string		>\0		\b, name '%s'
+
+
+#------------------------------------------------------------------------------
+# $File: varied.script,v 1.6 2009/09/19 16:28:13 christos Exp $
+# varied.script:  file(1) magic for various interpreter scripts
+
+0	string		#!\ /			a
+>3	string		>\0			%s script text executable
+0	string		#!\t/			a
+>3	string		>\0			%s script text executable
+0	string		#!/			a
+>2	string		>\0			%s script text executable
+0	string		#!\ 			script text executable
+>3	string		>\0			for %s
+
+# From: arno <arenevier at fdn.fr>
+# mozilla xpconnect typelib
+# see http://www.mozilla.org/scriptable/typelib_file.html
+0	string 		XPCOM\nTypeLib\r\n\032		XPConnect Typelib
+>0x10  byte        x       version %d
+>>0x11 byte        x      \b.%d
+
+#------------------------------------------------------------------------------
+# $File: vax,v 1.7 2009/09/19 16:28:13 christos Exp $
+# vax:  file(1) magic for VAX executable/object and APL workspace
+#
+0	lelong		0101557		VAX single precision APL workspace
+0	lelong		0101556		VAX double precision APL workspace
+
+#
+# VAX a.out (32V, BSD)
+#
+0	lelong		0407		VAX executable
+>16	lelong		>0		not stripped
+
+0	lelong		0410		VAX pure executable
+>16	lelong		>0		not stripped
+
+0	lelong		0413		VAX demand paged pure executable
+>16	lelong		>0		not stripped
+
+0	lelong		0420		VAX demand paged (first page unmapped) pure executable
+>16	lelong		>0		not stripped
+
+#
+# VAX COFF
+#
+# The `versions' should be un-commented if they work for you.
+# (Was the problem just one of endianness?)
+#
+0	leshort		0570		VAX COFF executable
+>12	lelong		>0		not stripped
+>22	leshort		>0		- version %ld
+0	leshort		0575		VAX COFF pure executable
+>12	lelong		>0		not stripped
+>22	leshort		>0		- version %ld
+
+#------------------------------------------------------------------------------
+# $File: vicar,v 1.4 2009/09/19 16:28:13 christos Exp $
+# vicar:  file(1) magic for VICAR files.
+#
+# From: Ossama Othman <othman at astrosun.tn.cornell.edu
+# VICAR is JPL's in-house spacecraft image processing program
+# VICAR image
+0	string	LBLSIZE=	VICAR image data
+>32	string	BYTE		\b, 8 bits  = VAX byte
+>32	string	HALF		\b, 16 bits = VAX word     = Fortran INTEGER*2
+>32	string	FULL		\b, 32 bits = VAX longword = Fortran INTEGER*4
+>32	string	REAL		\b, 32 bits = VAX longword = Fortran REAL*4
+>32	string	DOUB		\b, 64 bits = VAX quadword = Fortran REAL*8
+>32	string	COMPLEX		\b, 64 bits = VAX quadword = Fortran COMPLEX*8
+# VICAR label file
+43	string	SFDU_LABEL	VICAR label file
+
+#------------------------------------------------------------------------------
+# $File: virtual,v 1.1 2009/12/25 16:04:30 christos Exp $
+# From: James Nobis <quel at quelrod.net>
+# Microsoft hard disk images for:
+# Virtual Server
+# Virtual PC
+# http://technet.microsoft.com/en-us/virtualserver/bb676673.aspx
+# .vhd
+0	string	conectix	Microsoft Disk Image, Virtual Server or Virtual PC
+
+# Sun xVM VirtualBox Disk Image
+# string  <<< Sun xVM VirtualBox Disk Image >>>
+# .vdi
+0	string	\<\<\<\ Sun\ xVM\ VirtualBox\ Disk	Sun xVM VirtualBox Disk Image
+
+
+
+#------------------------------------------------------------------------------
+# $File: virtutech,v 1.4 2009/09/19 16:28:13 christos Exp $
+# Virtutech Compressed Random Access File Format
+#
+# From <gustav at virtutech.com>
+0      string          \211\277\036\203        Virtutech CRAFF
+>4     belong          x               v%d
+>20    belong          0               uncompressed
+>20    belong          1               bzipp2ed
+>20    belong          2               gzipped
+>24    belong          0               not clean
+
+#------------------------------------------------------------------------------
+# $File: visx,v 1.5 2009/09/19 16:28:13 christos Exp $
+# visx:  file(1) magic for Visx format files
+#
+0	short		0x5555		VISX image file
+>2	byte		0		(zero)
+>2	byte		1		(unsigned char)
+>2	byte		2		(short integer)
+>2	byte		3		(float 32)
+>2	byte		4		(float 64)
+>2	byte		5		(signed char)
+>2	byte		6		(bit-plane)
+>2	byte		7		(classes)
+>2	byte		8		(statistics)
+>2	byte		10		(ascii text)
+>2	byte		15		(image segments)
+>2	byte		100		(image set)
+>2	byte		101		(unsigned char vector)
+>2	byte		102		(short integer vector)
+>2	byte		103		(float 32 vector)
+>2	byte		104		(float 64 vector)
+>2	byte		105		(signed char vector)
+>2	byte		106		(bit plane vector)
+>2	byte		121		(feature vector)
+>2	byte		122		(feature vector library)
+>2	byte		124		(chain code)
+>2	byte		126		(bit vector)
+>2	byte		130		(graph)
+>2	byte		131		(adjacency graph)
+>2	byte		132		(adjacency graph library)
+>2	string		.VISIX		(ascii text)
+
+#------------------------------------------------------------------------------
+# $File: vms,v 1.6 2009/09/19 16:28:13 christos Exp $
+# vms:  file(1) magic for VMS executables (experimental)
+#
+# VMS .exe formats, both VAX and AXP (Greg Roelofs, newt at uchicago.edu)
+
+# GRR 950122:  I'm just guessing on these, based on inspection of the headers
+# of three executables each for Alpha and VAX architectures.  The VAX files
+# all had headers similar to this:
+#
+#   00000  b0 00 30 00 44 00 60 00  00 00 00 00 30 32 30 35  ..0.D.`.....0205
+#   00010  01 01 00 00 ff ff ff ff  ff ff ff ff 00 00 00 00  ................
+#
+0	string	\xb0\0\x30\0	VMS VAX executable
+>44032	string	PK\003\004	\b, Info-ZIP SFX archive v5.12 w/decryption
+#
+# The AXP files all looked like this, except that the byte at offset 0x22
+# was 06 in some of them and 07 in others:
+#
+#   00000  03 00 00 00 00 00 00 00  ec 02 00 00 10 01 00 00  ................
+#   00010  68 00 00 00 98 00 00 00  b8 00 00 00 00 00 00 00  h...............
+#   00020  00 00 07 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
+#   00030  00 00 00 00 01 00 00 00  00 00 00 00 00 00 00 00  ................
+#   00040  00 00 00 00 ff ff ff ff  ff ff ff ff 02 00 00 00  ................
+#
+0	belong	0x03000000	VMS Alpha executable
+>75264	string	PK\003\004	\b, Info-ZIP SFX archive v5.12 w/decryption
+
+#------------------------------------------------------------------------------
+# $File: vmware,v 1.7 2009/09/19 16:28:13 christos Exp $
+# VMware specific files (deducted from version 1.1 and log file entries)
+# Anthon van der Neut (anthon at mnt.org)
+0	belong	0x4d52564e	VMware nvram 
+
+#------------------------------------------------------------------------------
+# $File: vorbis,v 1.16 2009/09/19 16:28:13 christos Exp $
+# vorbis:  file(1) magic for Ogg/Vorbis files
+#
+# From Felix von Leitner <leitner at fefe.de>
+# Extended by Beni Cherniavsky <cben at crosswinds.net>
+# Further extended by Greg Wooledge <greg at wooledge.org>
+#
+# Most (everything but the number of channels and bitrate) is commented
+# out with `##' as it's not interesting to the average user.  The most
+# probable things advanced users would want to uncomment are probably
+# the number of comments and the encoder version.
+#
+# FIXME: The first match has been made a search, so that it can skip
+# over prepended ID3 tags. This will work for MIME type detection, but
+# won't work for detecting other properties of the file (they all need
+# to be made relative to the search). In any case, if the file has ID3
+# tags, the ID3 information will be printed, not the Ogg information,
+# so until that's fixed, this doesn't matter.
+# FIXME[2]: Disable the above for now, since search assumes text mode.
+#
+# --- Ogg Framing ---
+#0		search/1000	OggS		Ogg data
+0		string	OggS		Ogg data
+!:mime		application/ogg
+>4		byte		!0		UNKNOWN REVISION %u
+##>4		byte		0		revision 0
+>4		byte		0
+##>>14		lelong		x		(Serial %lX)
+# non-Vorbis content: FLAC (Free Lossless Audio Codec, http://flac.sourceforge.net)
+>>28		string		\x7fFLAC	\b, FLAC audio
+# non-Vorbis content: Theora
+>>28		string		\x80theora	\b, Theora video
+# non-Vorbis content: Kate
+>>28		string		\x80kate\0\0\0\0	\b, Kate
+>>>37		ubyte		x		v%u
+>>>38		ubyte		x		\b.%u,
+>>>40		byte		0		utf8 encoding,
+>>>40		byte		!0		unknown character encoding,
+>>>60		string		>\0		language %s,
+>>>60		string		\0		no language set,
+>>>76		string		>\0		category %s
+>>>76		string		\0		no category set
+# non-Vorbis content: Skeleton
+>>28		string		fishead\0	\b, Skeleton
+>>>36		short		x		v%u
+>>>40		short		x		\b.%u
+# non-Vorbis content: Speex
+>>28		string		Speex\ \ \ 	\b, Speex audio
+# non-Vorbis content: OGM
+>>28		string		\x01video\0\0\0	\b, OGM video
+>>>37		string/c	div3		(DivX 3)
+>>>37		string/c	divx		(DivX 4)
+>>>37		string/c	dx50		(DivX 5)
+>>>37		string/c	xvid		(XviD)
+# --- First vorbis packet - general header ---
+>>28		string		\x01vorbis	\b, Vorbis audio,
+>>>35		lelong		!0		UNKNOWN VERSION %lu,
+##>>>35		lelong		0		version 0,
+>>>35		lelong		0
+>>>>39		ubyte		1		mono,
+>>>>39		ubyte		2		stereo,
+>>>>39		ubyte		>2		%u channels,
+>>>>40		lelong		x		%lu Hz
+# Minimal, nominal and maximal bitrates specified when encoding
+>>>>48		string		<\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff	\b,
+# The above tests if at least one of these is specified:
+>>>>>52		lelong		!-1
+# Vorbis RC2 has a bug which puts -1000 in the min/max bitrate fields
+# instead of -1.
+# Vorbis 1.0 uses 0 instead of -1.
+>>>>>>52	lelong		!0
+>>>>>>>52	lelong		!-1000
+>>>>>>>>52	lelong		x		<%lu
+>>>>>48		lelong		!-1
+>>>>>>48	lelong		x		~%lu
+>>>>>44		lelong		!-1
+>>>>>>44	lelong		!-1000
+>>>>>>>44	lelong		!0
+>>>>>>>>44	lelong		x		>%lu
+>>>>>48		string		<\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff	bps
+# -- Second vorbis header packet - the comments
+# A kludge to read the vendor string.  It's a counted string, not a
+# zero-terminated one, so file(1) can't read it in a generic way.
+# libVorbis is the only one existing currently, so I detect specifically
+# it.  The interesting value is the cvs date (8 digits decimal).
+# Post-RC1 Ogg files have the second header packet (and thus the version)
+# in a different place, so we must use an indirect offset.
+>>>(84.b+85)		string		\x03vorbis
+>>>>(84.b+96)		string/c	Xiphophorus\ libVorbis\ I	\b, created by: Xiphophorus libVorbis I
+>>>>>(84.b+120)		string		>00000000	
+# Map to beta version numbers:
+>>>>>>(84.b+120)	string		<20000508	(<beta1, prepublic)
+>>>>>>(84.b+120)	string		20000508	(1.0 beta 1 or beta 2)
+>>>>>>(84.b+120)	string		>20000508
+>>>>>>>(84.b+120)	string		<20001031	(beta2-3)
+>>>>>>(84.b+120)	string		20001031	(1.0 beta 3)
+>>>>>>(84.b+120)	string		>20001031
+>>>>>>>(84.b+120)	string		<20010225	(beta3-4)
+>>>>>>(84.b+120)	string		20010225	(1.0 beta 4)
+>>>>>>(84.b+120)	string		>20010225
+>>>>>>>(84.b+120)	string		<20010615	(beta4-RC1)
+>>>>>>(84.b+120)	string		20010615	(1.0 RC1)
+>>>>>>(84.b+120)	string		20010813	(1.0 RC2)
+>>>>>>(84.b+120)	string		20010816	(RC2 - Garf tuned v1)
+>>>>>>(84.b+120)	string		20011014	(RC2 - Garf tuned v2)
+>>>>>>(84.b+120)	string		20011217	(1.0 RC3)
+>>>>>>(84.b+120)	string		20011231	(1.0 RC3)
+# Some pre-1.0 CVS snapshots still had "Xiphphorus"...
+>>>>>>(84.b+120)	string		>20011231	(pre-1.0 CVS)
+# For the 1.0 release, Xiphophorus is replaced by Xiph.Org
+>>>>(84.b+96)		string/c	Xiph.Org\ libVorbis\ I	\b, created by: Xiph.Org libVorbis I
+>>>>>(84.b+117)		string		>00000000	
+>>>>>>(84.b+117)	string		<20020717	(pre-1.0 CVS)
+>>>>>>(84.b+117)	string		20020717	(1.0)
+>>>>>>(84.b+117)	string		20030909	(1.0.1)
+>>>>>>(84.b+117)	string		20040629	(1.1.0 RC1)
+
+#------------------------------------------------------------------------------
+# $File: vxl,v 1.4 2009/09/19 16:28:13 christos Exp $
+# VXL: file(1) magic for VXL binary IO data files
+#
+# from Ian Scott <scottim at sf.net>
+#
+# VXL is a collection of C++ libraries for Computer Vision.
+# See the vsl chapter in the VXL Book for more info
+# http://www.isbe.man.ac.uk/public_vxl_doc/books/vxl/book.html
+# http:/vxl.sf.net
+
+2	lelong	0x472b2c4e	VXL data file,
+>0	leshort	>0		schema version no %d
+
+#------------------------------------------------------------------------------
+# $File: warc,v 1.2 2009/09/19 16:28:13 christos Exp $
+# warc:  file(1) magic for WARC files
+
+0	string	WARC/	WARC Archive
+>5	string	x	version %.4s
+
+#------------------------------------------------------------------------------
+# weak:  file(1) magic for very weak magic entries, disabled by default
+#
+# These entries are so weak that they might interfere identification of
+# other formats. Example include:
+# - Only identify for 1 or 2 bytes
+# - Match against very wide range of values
+# - Match against generic word in some spoken languages (e.g. English)
+
+# Summary: Computer Graphics Metafile
+# Extension: .cgm
+#0	beshort&0xffe0	0x0020		binary Computer Graphics Metafile
+#0	beshort		0x3020		character Computer Graphics Metafile
+
+#0	string		=!!		Bennet Yee's "face" format
+
+#------------------------------------------------------------------------------
+# $File: windows,v 1.4 2009/09/19 16:28:13 christos Exp $
+# windows:  file(1) magic for Microsoft Windows
+#
+# This file is mainly reserved for files where programs
+# using them are run almost always on MS Windows 3.x or
+# above, or files only used exclusively in Windows OS,
+# where there is no better category to allocate for.
+# For example, even though WinZIP almost run on Windows
+# only, it is better to treat them as "archive" instead.
+# For format usable in DOS, such as generic executable
+# format, please specify under "msdos" file.
+#
+
+
+# Summary: Outlook Express DBX file
+# Extension: .dbx
+# Created by: Christophe Monniez
+0	string	\xCF\xAD\x12\xFE	MS Outlook Express DBX file
+>4	byte	=0xC5			\b, message database
+>4	byte	=0xC6			\b, folder database
+>4	byte	=0xC7			\b, account information
+>4	byte	=0x30			\b, offline database
+
+
+# Summary: Windows crash dump
+# Extension: .dmp
+# Created by: Andreas Schuster (http://computer.forensikblog.de/)
+# Reference (1): http://computer.forensikblog.de/en/2008/02/64bit_magic.html
+# Modified by (1): Abel Cheung (Avoid match with first 4 bytes only)
+0	string		PAGE		
+>4	string		DUMP		MS Windows 32bit crash dump
+>>0x05c	byte            0		\b, no PAE
+>>0x05c	byte            1		\b, PAE
+>>0xf88	lelong		1		\b, full dump
+>>0xf88	lelong		2		\b, kernel dump
+>>0xf88	lelong		3		\b, small dump
+>>0x068	lelong		x		\b, %ld pages
+>4	string		DU64		MS Windows 64bit crash dump
+>>0xf98	lelong		1		\b, full dump
+>>0xf98	lelong		2		\b, kernel dump
+>>0xf98	lelong		3		\b, small dump
+>>0x090	lequad		x		\b, %lld pages
+
+
+# Summary: Vista Event Log
+# Extension: .evtx
+# Created by: Andreas Schuster (http://computer.forensikblog.de/)
+# Reference (1): http://computer.forensikblog.de/en/2007/05/some_magic.html
+0	string		ElfFile\0	MS Windows Vista Event Log
+>0x2a	leshort		x		\b, %d chunks
+>>0x10	lelong		x		\b (no. %d in use)
+>0x18	lelong		>1		\b, next record no. %d
+>0x18	lelong		=1		\b, empty
+>0x78	lelong		&1		\b, DIRTY
+>0x78	lelong		&2		\b, FULL
+
+
+# Summary: Windows 3.1 group files
+# Extension: .grp
+# Created by: unknown
+0	string		\120\115\103\103	MS Windows 3.1 group files
+
+
+# Summary: Old format help files
+# Extension: .hlp
+# Created by: Dirk Jagdmann <doj at cubic.org>
+0	lelong		0x00035f3f		MS Windows 3.x help file
+
+
+# Summary: Hyper terminal
+# Extension: .ht
+# Created by: unknown
+0	string		HyperTerminal\ 
+>15	string		1.0\ --\ HyperTerminal\ data\ file	MS Windows HyperTerminal profile
+
+
+# Summary: Windows shortcut
+# Extension: .lnk
+# Created by: unknown
+0	string		\114\0\0\0\001\024\002\0\0\0\0\0\300\0\0\0\0\0\0\106	MS Windows shortcut
+
+
+# Summary: Outlook Personal Folders
+# Created by: unknown
+0	lelong		0x4E444221	Microsoft Outlook email folder
+>10	leshort		0x0e		(<=2002)
+>10	leshort		0x17		(>=2003)
+
+
+# Summary: Windows help cache
+# Created by: unknown
+0	string		\164\146\115\122\012\000\000\000\001\000\000\000	MS Windows help cache
+
+
+# Summary: IE cache file
+# Created by: Christophe Monniez
+0	string	Client\ UrlCache\ MMF 	Internet Explorer cache file
+>20	string	>\0			version %s
+
+
+# Summary: Registry files
+# Created by: unknown
+# Modified by (1): Joerg Jenderek
+0	string		regf		MS Windows registry file, NT/2000 or above
+0	string		CREG		MS Windows 95/98/ME registry file
+0	string		SHCC3		MS Windows 3.1 registry file
+
+
+# Summary: Windows Registry text
+# Extension: .reg
+# Submitted by: Abel Cheung <abelcheung at gmail.com>
+0	string		REGEDIT4\r\n\r\n	Windows Registry text (Win95 or above)
+0	string		Windows\ Registry\ Editor\ 
+>&0	string		Version\ 5.00\r\n\r\n	Windows Registry text (Win2K or above)
+
+
+# From: Pal Tamas <folti at balabit.hu>
+# Autorun File
+0       string/c          [autorun]\r\n   Microsoft Windows Autorun file.
+!:mime	application/x-setupscript. 
+
+#------------------------------------------------------------------------------
+# $File: wireless,v 1.2 2009/09/19 16:28:13 christos Exp $
+# wireless-regdb:        file(1) magic for CRDA wireless-regdb file format
+#
+0	string	RGDB	CRDA wireless regulatory database file
+>4	belong	19	(Version 1)
+
+#------------------------------------------------------------------------------
+# $File: wordprocessors,v 1.14 2009/09/19 16:28:13 christos Exp $
+# wordprocessors:  file(1) magic fo word processors.
+#
+####### PWP file format used on Smith Corona Personal Word Processors:
+2	string	\040\040\040\040\040\040\040\040\040\040\040ML4D\040'92	Smith Corona PWP
+>24	byte	2	\b, single spaced
+>24	byte	3	\b, 1.5 spaced
+>24	byte	4	\b, double spaced
+>25	byte	0x42	\b, letter
+>25	byte	0x54	\b, legal
+>26	byte	0x46	\b, A4
+
+#WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
+0	string	\377WPC\020\000\000\000\022\012\001\001\000\000\000\000	(WP) loadable file
+>15	byte	0	Optimized for Intel
+>15	byte	1	Optimized for Non-Intel
+1	string	WPC	(Corel/WP)
+>8	short	257	WordPerfect macro
+>8	short	258	WordPerfect help file
+>8	short	259	WordPerfect keyboard file
+>8	short	266	WordPerfect document
+>8	short	267	WordPerfect dictionary
+>8	short	268	WordPerfect thesaurus
+>8	short	269	WordPerfect block
+>8	short	270	WordPerfect rectangular block
+>8	short	271	WordPerfect column block
+>8	short	272	WordPerfect printer data
+>8	short	275	WordPerfect printer data
+>8	short	276	WordPerfect driver resource data
+>8	short	279	WordPerfect hyphenation code
+>8	short	280	WordPerfect hyphenation data
+>8	short	281	WordPerfect macro resource data
+>8	short	283	WordPerfect hyphenation lex
+>8	short	285	WordPerfect wordlist
+>8	short	286	WordPerfect equation resource data
+>8	short	289	WordPerfect spell rules
+>8	short	290	WordPerfect dictionary rules
+>8	short	295	WordPerfect spell rules (Microlytics)
+>8	short	299	WordPerfect settings file
+>8	short	301	WordPerfect 4.2 document
+>8	short	325	WordPerfect dialog file
+>8	short	332	WordPerfect button bar
+>8	short	513	Shell macro
+>8	short	522	Shell definition
+>8	short	769	Notebook macro
+>8	short	770	Notebook help file
+>8	short	771	Notebook keyboard file
+>8	short	778	Notebook definition
+>8	short	1026	Calculator help file
+>8	short 	1538	Calendar help file
+>8	short 	1546	Calendar data file
+>8	short	1793	Editor macro
+>8	short	1794	Editor help file
+>8	short	1795	Editor keyboard file
+>8	short	1817	Editor macro resource file
+>8	short 	2049	Macro editor macro
+>8	short 	2050	Macro editor help file
+>8	short	2051	Macro editor keyboard file
+>8	short	2305	PlanPerfect macro
+>8	short	2306	PlanPerfect help file
+>8	short	2307	PlanPerfect keyboard file
+>8	short	2314	PlanPerfect worksheet
+>8	short	2319	PlanPerfect printer definition
+>8	short	2322	PlanPerfect graphic definition
+>8	short	2323	PlanPerfect data
+>8	short	2324	PlanPerfect temporary printer
+>8	short	2329	PlanPerfect macro resource data
+>8	byte	11	Mail
+>8	short	2818	help file
+>8	short	2821	distribution list
+>8	short	2826	out box
+>8	short	2827	in box
+>8	short	2836	users archived mailbox
+>8	short	2837	archived message database
+>8	short	2838	archived attachments
+>8	short	3083	Printer temporary file
+>8	short	3330	Scheduler help file
+>8	short	3338	Scheduler in file
+>8	short	3339	Scheduler out file
+>8	short	3594	GroupWise settings file
+>8	short	3601	GroupWise directory services
+>8	short	3627	GroupWise settings file
+>8	short	4362	Terminal resource data
+>8	short	4363	Terminal resource data
+>8	short	4395	Terminal resource data
+>8	short	4619	GUI loadable text
+>8	short	4620	graphics resource data
+>8	short	4621	printer settings file
+>8	short	4622	port definition file
+>8	short	4623	print queue parameters
+>8	short	4624	compressed file
+>8	short	5130	Network service msg file
+>8	short	5131	Network service msg file
+>8	short	5132	Async gateway login msg
+>8	short	5134	GroupWise message file
+>8	short	7956	GroupWise admin domain database
+>8	short	7957	GroupWise admin host database
+>8	short	7959	GroupWise admin remote host database
+>8	short	7960	GroupWise admin ADS deferment data file
+>8	short	8458	IntelliTAG (SGML) compiled DTD
+>8	long	18219264	WordPerfect graphic image (1.0)
+>8	long	18219520	WordPerfect graphic image (2.0)
+#end of WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
+
+# Hangul (Korean) Word Processor File
+0	string	HWP\ Document\ File	Hangul (Korean) Word Processor File 3.0
+# From: Won-Kyu Park <wkpark at kldp.org>
+512	string		R\0o\0o\0t\0	Hangul (Korean) Word Processor File 2000
+!:mime	application/x-hwp
+
+# CosmicBook, from Beno�t Rouits
+0       string  CSBK    Ted Neslson's CosmicBook hypertext file
+
+2       string  EYWR    AmigaWriter file
+
+# chi:  file(1) magic for ChiWriter files
+0       string          \\1cw\          ChiWriter file
+>5      string          >\0             version %s
+0       string          \\1cw           ChiWriter file
+
+# Quark Express from http://www.garykessler.net/library/file_sigs.html
+2	string	IIXPR3			Intel Quark Express Document (English)
+2	string	IIXPRa			Intel Quark Express Document (Korean)
+2	string	MMXPR3			Motorola Quark Express Document (English)
+!:mime	application/x-quark-xpress-3
+2	string	MMXPRa			Motorola Quark Express Document (Korean)
+
+# adobe indesign (document, whatever...) from querkan
+0	belong	0x0606edf5		Adobe InDesign
+>16	string	DOCUMENT		Document
+
+#------------------------------------------------------------------------------
+# ichitaro456: file(1) magic for Just System Word Processor Ichitaro
+#
+# Contributor kenzo-:
+# Reversed-engineered JS Ichitaro magic numbers
+#
+
+0	string		DOC
+>43	byte		0x14	Just System Word Processor Ichitaro v4
+!:mime	application/x-ichitaro4
+>144	string	JDASH		application/x-ichitaro4
+
+0	string		DOC
+>43	byte		0x15	Just System Word Processor Ichitaro v5
+!:mime	application/x-ichitaro5
+
+0	string		DOC
+>43	byte		0x16	Just System Word Processor Ichitaro v6
+!:mime	application/x-ichitaro6
+
+#------------------------------------------------------------------------------
+# $File: xdelta,v 1.4 2009/09/19 16:28:13 christos Exp $
+# file(1) magic(5) data for xdelta  Josh MacDonald <jmacd at CS.Berkeley.EDU>
+#
+0	string	%XDELTA%	XDelta binary patch file 0.14
+0	string	%XDZ000%	XDelta binary patch file 0.18
+0	string	%XDZ001%	XDelta binary patch file 0.20
+0	string	%XDZ002%	XDelta binary patch file 1.0
+0	string	%XDZ003%	XDelta binary patch file 1.0.4
+0	string	%XDZ004%	XDelta binary patch file 1.1
+
+#------------------------------------------------------------------------------
+# $File: xenix,v 1.9 2009/09/19 16:28:13 christos Exp $
+# xenix:  file(1) magic for Microsoft Xenix
+#
+# "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small
+# model" lifted from "magic.xenix", with comment "derived empirically;
+# treat as folklore until proven"
+#
+# "small model", "large model", "huge model" stuff lifted from XXX
+#
+# XXX - "x.out" collides with PDP-11 archives
+#
+0	string		core		core file (Xenix)
+0	byte		0x80		8086 relocatable (Microsoft)
+0	leshort		0xff65		x.out
+>2	string		__.SYMDEF	 randomized
+>0	byte		x		archive
+0	leshort		0x206		Microsoft a.out
+>8	leshort		1		Middle model
+>0x1e	leshort		&0x10		overlay
+>0x1e	leshort		&0x2		separate
+>0x1e	leshort		&0x4		pure
+>0x1e	leshort		&0x800		segmented
+>0x1e	leshort		&0x400		standalone
+>0x1e	leshort		&0x8		fixed-stack
+>0x1c	byte		&0x80		byte-swapped
+>0x1c	byte		&0x40		word-swapped
+>0x10	lelong		>0		not-stripped
+>0x1e	leshort		^0xc000		pre-SysV
+>0x1e	leshort		&0x4000		V2.3
+>0x1e	leshort		&0x8000		V3.0
+>0x1c	byte		&0x4		86
+>0x1c	byte		&0xb		186
+>0x1c	byte		&0x9		286
+>0x1c	byte		&0xa		386
+>0x1f	byte		<0x040		small model
+>0x1f	byte		=0x048		large model	
+>0x1f	byte		=0x049		huge model 
+>0x1e	leshort		&0x1		executable
+>0x1e	leshort		^0x1		object file
+>0x1e	leshort		&0x40		Large Text
+>0x1e	leshort		&0x20		Large Data
+>0x1e	leshort		&0x120		Huge Objects Enabled
+>0x10	lelong		>0		not stripped
+
+0	leshort		0x140		old Microsoft 8086 x.out
+>0x3	byte		&0x4		separate
+>0x3	byte		&0x2		pure
+>0	byte		&0x1		executable
+>0	byte		^0x1		relocatable
+>0x14	lelong		>0		not stripped
+
+0	lelong		0x206		b.out
+>0x1e	leshort		&0x10		overlay
+>0x1e	leshort		&0x2		separate
+>0x1e	leshort		&0x4		pure
+>0x1e	leshort		&0x800		segmented
+>0x1e	leshort		&0x400		standalone
+>0x1e	leshort		&0x1		executable
+>0x1e	leshort		^0x1		object file
+>0x1e	leshort		&0x4000		V2.3
+>0x1e	leshort		&0x8000		V3.0
+>0x1c	byte		&0x4		86
+>0x1c	byte		&0xb		186
+>0x1c	byte		&0x9		286
+>0x1c	byte		&0x29		286
+>0x1c	byte		&0xa		386
+>0x1e	leshort		&0x4		Large Text
+>0x1e	leshort		&0x2		Large Data
+>0x1e	leshort		&0x102		Huge Objects Enabled
+
+0	leshort		0x580		XENIX 8086 relocatable or 80286 small model
+
+#------------------------------------------------------------------------------
+# $File: xilinx,v 1.4 2009/09/19 16:28:13 christos Exp $
+# This is Aaron's attempt at a MAGIC file for Xilinx .bit files.
+# Xilinx-Magic at RevRagnarok.com
+# Got the info from FPGA-FAQ 0026
+#
+# First there is the sync header and its length
+0	beshort 0x0009
+>2 	belong	=0x0ff00ff0
+>>&0	belong  =0x0ff00ff0
+>>>&0	beshort =0x0000	
+>>>>&0	pstring	a	Xilinx BIT data
+# Next is a Pascal-style string with the NCD name. We want to capture that.
+>>>>0x0F	pstring	x	- from %s
+# It is followed by a NUL
+>>>>>&1	byte	0x00
+# And then 'b'
+>>>>>&2	string b
+# With the part number:
+#>>>>>&5 string	4v	(Virtex4)
+#>>>>>&5 string  2v	(Virtex II
+#>>>>>>&0	string	!p	\b)
+#>>>>>>&0	string	p	Pro)
+>>>>>&4	pstring x	- for %s
+# And then NUL / 'c' / Build Data / NUL / 'd' / Date / NUL / 'e' / Data Length
+>>>>>>&1	byte	0x00
+>>>>>>&2	string	c
+>>>>>>&4	pstring	x	- built %s
+>>>>>>>&1	byte	0x00
+>>>>>>>&2	string	d
+>>>>>>>&4	pstring	x	\b(%s)
+>>>>>>>>&1	byte	0x00
+>>>>>>>>&2	string	e
+>>>>>>>>&4	belong	x	- data length 0x%lx
+
+#------------------------------------------------------------------------------
+# $File: xo65,v 1.4 2009/09/19 16:28:13 christos Exp $
+# xo65 object files
+# From: "Ullrich von Bassewitz" <uz at cc65.org>
+#
+0	string		\x55\x7A\x6E\x61	xo65 object,
+>4	leshort		x			version %d,
+>6	leshort&0x0001 =0x0001			with debug info
+>6	leshort&0x0001 =0x0000			no debug info
+
+# xo65 library files
+0	string		\x6E\x61\x55\x7A	xo65 library,
+>4	leshort		x			version %d
+
+# o65 object files
+0	string		\x01\x00\x6F\x36\x35	o65
+>6	leshort&0x1000	=0x0000			executable,
+>6	leshort&0x1000	=0x1000			object,
+>5	byte		x			version %d,
+>6	leshort&0x8000	=0x8000			65816,
+>6	leshort&0x8000	=0x0000			6502,
+>6	leshort&0x2000	=0x2000			32 bit,
+>6	leshort&0x2000	=0x0000			16 bit,
+>6	leshort&0x4000	=0x4000			page reloc,
+>6	leshort&0x4000	=0x0000			byte reloc,
+>6	leshort&0x0003	=0x0000			alignment 1
+>6	leshort&0x0003	=0x0001			alignment 2
+>6	leshort&0x0003	=0x0002			alignment 4
+>6	leshort&0x0003	=0x0003			alignment 256
+
+#------------------------------------------------------------------------------
+# $File: xwindows,v 1.6 2009/09/19 16:28:13 christos Exp $
+# xwindows:  file(1) magic for various X/Window system file formats.
+
+# Compiled X Keymap 
+# XKM (compiled X keymap) files (including version and byte ordering)
+1	string	mkx				Compiled XKB Keymap: lsb,
+>0	byte	>0				version %d
+>0	byte	=0				obsolete
+0	string	xkm				Compiled XKB Keymap: msb,
+>3	byte	>0				version %d
+>0	byte	=0				obsolete
+
+# xfsdump archive
+0	string	xFSdump0			xfsdump archive
+>8	belong	x	(version %d)
+
+# Jaleo XFS files
+0	long	395726				Jaleo XFS file
+>4	long	x				- version %ld
+>8	long	x				- [%ld -
+>20	long	x				%ldx
+>24	long	x				%ldx
+>28	long	1008				YUV422]
+>28	long	1000				RGB24]
+
+# Xcursor data
+# X11 mouse cursor format defined in libXcursor, see
+# http://www.x.org/archive/X11R6.8.1/doc/Xcursor.3.html
+# http://cgit.freedesktop.org/xorg/lib/libXcursor/tree/include/X11/Xcursor/Xcursor.h
+0	string		Xcur		Xcursor data
+!:mime	image/x-xcursor
+>10	leshort		x		version %hd
+>>8	leshort		x		\b.%hd
+
+#------------------------------------------------------------------------------
+# $File: zilog,v 1.7 2009/09/19 16:28:13 christos Exp $
+# zilog:  file(1) magic for Zilog Z8000.
+#
+# Was it big-endian or little-endian?  My Product Specification doesn't
+# say.
+#
+0	long		0xe807		object file (z8000 a.out)
+0	long		0xe808		pure object file (z8000 a.out)
+0	long		0xe809		separate object file (z8000 a.out)
+0	long		0xe805		overlay object file (z8000 a.out)
+
+#------------------------------------------------------------------------------
+# $File: zyxel,v 1.6 2009/09/19 16:28:13 christos Exp $
+# zyxel:  file(1) magic for ZyXEL modems
+#
+# From <rob at pe1chl.ampr.org>
+# These are the /etc/magic entries to decode datafiles as used for the
+# ZyXEL U-1496E DATA/FAX/VOICE modems.  (This header conforms to a
+# ZyXEL-defined standard)
+
+0	string		ZyXEL\002	ZyXEL voice data
+>10	byte		0		- CELP encoding
+>10	byte&0x0B	1		- ADPCM2 encoding
+>10	byte&0x0B	2		- ADPCM3 encoding
+>10	byte&0x0B	3		- ADPCM4 encoding
+>10	byte&0x0B	8		- New ADPCM3 encoding
+>10	byte&0x04	4		with resync
diff --git a/tools/dbgap-mount/Makefile b/tools/dbgap-mount/Makefile
new file mode 100644
index 0000000..690d98b
--- /dev/null
+++ b/tools/dbgap-mount/Makefile
@@ -0,0 +1,119 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/dbgap-mount
+
+ifeq (win,$(OS))
+    DOCAN_LIBS = -lDOKAN
+else
+    DOCAN_LIBS = -lfuse
+endif
+
+ifeq (mac,$(OS))
+TOP = $(shell cd ../.. && pwd )
+DOCAN_LIBS = -L/usr/local/lib -losxfuse
+endif
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+	demo    \
+	dbgap-mount-tool
+    
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# tag
+#
+tag: \
+	$(addsuffix _tag,$(ALL_TOOLS))
+
+.PHONY: tag $(addsuffix _tag,$(ALL_TOOLS))
+
+
+#-------------------------------------------------------------------------------
+# demo
+#  test program for new XFS toy
+#
+ZDB_DEMO_SRC = \
+	demo
+
+ZDB_DEMO_OBJ = \
+	$(addsuffix .$(OBJX),$(ZDB_DEMO_SRC))
+
+ZDB_DEMO_LIB = -lkapp -stk-version -lncbi-vdb -lxfs $(DOCAN_LIBS)
+
+$(BINDIR)/demo: $(ZDB_DEMO_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(ZDB_DEMO_LIB)
+
+demo_tag:
+	@ $(TOP)/build/tag-module.sh $(MODULE) demo $(ZDB_DEMO_OBJ)
+
+#-------------------------------------------------------------------------------
+# demo
+#  test program for new XFS toy
+#
+ZDB_TOOL_SRC = \
+    wrap    \
+	dbgap-mount-tool
+
+ZDB_TOOL_OBJ = \
+	$(addsuffix .$(OBJX),$(ZDB_TOOL_SRC))
+
+# ZDB_TOOL_LIB = -lkapp -lncbi-vdb -lxfs $(DOCAN_LIBS)
+ZDB_TOOL_LIB = -sxfs -skapp -stk-version -sncbi-vdb -skfg $(DOCAN_LIBS)
+
+$(BINDIR)/dbgap-mount-tool: $(ZDB_TOOL_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(ZDB_TOOL_LIB)
+
+dbgap-mount-tool_tag:
+	@ $(TOP)/build/tag-module.sh $(MODULE) dbgap-mount-tool $(ZDB_TOOL_OBJ)
+
diff --git a/tools/dbgap-mount/dbgap-mount-tool.c b/tools/dbgap-mount/dbgap-mount-tool.c
new file mode 100644
index 0000000..9fd797e
--- /dev/null
+++ b/tools/dbgap-mount/dbgap-mount-tool.c
@@ -0,0 +1,561 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <kapp/main.h> /* KMain */
+#include <kapp/args.h> /* KMain */
+
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <klib/out.h> /* OUTMSG */
+#include <klib/refcount.h>
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+#include <xfs/model.h>
+#include <xfs/node.h>
+#include <xfs/tree.h>
+#include <xfs/xfs.h>
+
+#include "dbgap-mount-tool.h"
+
+#include <sysalloc.h>
+#include <stdio.h>
+#include <string.h>
+
+/******************************************************************************/
+
+/*)))
+  \\\   Celebrity is here ...
+  (((*/
+
+XFS_EXTERN rc_t CC XFS_InitAll_MHR ( const char * ConfigFile );
+XFS_EXTERN rc_t CC XFS_DisposeAll_MHR ();
+
+static
+rc_t CC
+MakeModel (
+            struct XFSModel ** Model,
+            const char * ProjectId,
+            bool ReadOnly
+)
+{
+    rc_t RCt;
+    struct XFSModel * Mod;
+    struct XFSModelNode * ModNod;
+
+    RCt = 0;
+    Mod = NULL;
+
+    RCt = XFSModelFromScratch ( & Mod, NULL );
+    if ( RCt == 0 ) {
+        RCt = XFSModelAddRootNode ( Mod, "gap-project" );
+        if ( RCt == 0 ) {
+            ModNod = ( struct XFSModelNode * ) XFSModelRootNode ( Mod );
+            if ( ModNod == NULL ) {
+                RCt = XFS_RC ( rcInvalid );
+            }
+            else {
+                RCt = XFSModelNodeSetProperty (
+                                        ModNod,
+                                        XFS_MODEL_MODE,
+                                        ( ReadOnly
+                                                ? XFS_MODEL_MODE_RO
+                                                : XFS_MODEL_MODE_RW
+                                        )
+                                        );
+                if ( RCt == 0 ) {
+                    RCt = XFSModelNodeSetProperty (
+                                            ModNod,
+                                            XFS_MODEL_PROJECTID,
+                                            ProjectId
+                                            );
+                    if ( RCt == 0 ) {
+                        * Model = Mod;
+                    }
+                }
+
+            }
+        }
+    }
+
+    return RCt;
+}
+
+
+static
+rc_t CC
+DoFukan (
+        const char * ProjectId,
+        const char * MountPoint,
+        const char * LogFile,
+        const char * ProgName,
+        bool Daemonize,
+        bool ReadOnly
+)
+{
+    rc_t RCt;
+    struct XFSModel * TheModel;
+    struct XFSTree * TheTree;
+    struct XFSControl * TheControl;
+    char Lable [ 256 ];
+    size_t NumWr;
+
+    RCt = 0;
+    TheModel = NULL;
+    TheTree = NULL;
+    TheControl = NULL;
+    * Lable = 0;
+    NumWr = 0;
+
+    XFS_CAN ( ProjectId )
+    XFS_CAN ( MountPoint )
+
+
+        /*  Some messages good to say
+         */
+    LogMsg ( klogInfo, "Start" );
+    pLogMsg ( klogInfo, "ProjectID: $(project)", "project=%s", ProjectId );
+    pLogMsg ( klogInfo, "MountPoint: $(point)", "point=%s", MountPoint );
+    if ( LogFile != NULL ) {
+        pLogMsg ( klogInfo, "LogFile: $(file)", "file=%s", LogFile );
+    }
+    pLogMsg ( klogInfo, "ReadOnly: $(ro)", "ro=%s", ( ReadOnly ? "true" : "false" ) );
+    pLogMsg ( klogInfo, "Daemonize: $(pokemon)", "pokemon=%s", ( Daemonize ? "true" : "false" ) );
+
+        /*  Initializing all depots and heavy gunz
+         */
+    RCt = XFS_InitAll_MHR ( NULL );
+    pLogMsg ( klogDebug, "[XFS_InitAll_MHR][$(rc)]", "rc=%d", RCt );
+    if ( RCt == 0 ) {
+
+        RCt = MakeModel ( & TheModel, ProjectId, ReadOnly );
+        pLogMsg ( klogDebug, "[XFSModelMake][$(rc)]", "rc=%d", RCt );
+        if ( RCt == 0 ) {
+
+            RCt = XFSTreeMake ( TheModel, & TheTree );
+            pLogMsg ( klogDebug, "[XFSTreeMake][$(rc)]", "rc=%d", RCt );
+            if ( RCt == 0 ) {
+
+                RCt = XFSControlMake ( TheTree, & TheControl );
+                pLogMsg ( klogDebug, "[XFSControlMake][$(rc)]", "rc=%d", RCt );
+                if ( RCt == 0 ) {
+
+                    XFSControlSetMountPoint ( TheControl, MountPoint );
+
+                    RCt = string_printf (
+                                        Lable,
+                                        sizeof ( Lable ) - 1,
+                                        & NumWr,
+                                        "dbGaP(%s)",
+                                        ProjectId
+                                        );
+                    XFSControlSetLabel ( TheControl, Lable );
+                    if ( LogFile != NULL ) {
+                        XFSControlSetLogFile ( TheControl, LogFile );
+                    }
+                    if ( Daemonize ) {
+                        XFSControlDaemonize ( TheControl );
+                    }
+
+                    LogMsg ( klogDebug, "[XFSStart]" );
+                    RCt = XFSStart ( TheControl );
+                    pLogMsg ( klogDebug, "[XFSStart][$(rc)]", "rc=%d", RCt );
+                    if ( RCt == 0 ) {
+                        LogMsg ( klogDebug, "[XFSStop]" );
+                        RCt = XFSStop ( TheControl );
+                        pLogMsg ( klogDebug, "[XFSStop][$(rc)]", "rc=%d", RCt );
+                    }
+                    else {
+                        LogErr ( klogFatal, RCt, "CRITICAL ERROR: Can not start MOUNTER" );
+                    }
+                }
+
+                XFSControlDispose ( TheControl );
+
+                XFSTreeRelease ( TheTree );
+            }
+
+            XFSModelRelease ( TheModel );
+        }
+
+        XFS_DisposeAll_MHR ();
+
+    }
+
+        /*  Another message good to say
+         */
+    LogMsg ( klogDebug, "[Exiting]" );
+
+    return RCt;
+}   /* DoFukan () */
+
+static
+rc_t CC
+CheckParameters (
+            struct Args * TheArgs,
+            const char ** ProjectId,
+            const char ** MountPoint,
+            bool * ReadOnly
+)
+{
+    rc_t RCt;
+    uint32_t ParamCount;
+    uint32_t Idx;
+    const char * ParamValue;
+
+    RCt = 0;
+    ParamCount = 0;
+    Idx = 0;
+    ParamValue = NULL;
+
+    XFS_CSAN ( ProjectId )
+    XFS_CSAN ( MountPoint )
+    XFS_CSA ( ReadOnly, false )
+    XFS_CAN ( TheArgs )
+    XFS_CAN ( ProjectId )
+    XFS_CAN ( MountPoint )
+    XFS_CAN ( ReadOnly )
+
+    RCt = ArgsParamCount ( TheArgs, & ParamCount );
+    if ( RCt == 0 ) {
+        if ( ParamCount != 2 && ParamCount != 3 ) {
+            RCt = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcInsufficient );
+        }
+        else {
+            if ( ParamCount == 3 ) {
+                RCt = ArgsParamValue (
+                                    TheArgs,
+                                    Idx,
+                                    ( const void ** ) & ParamValue
+                                    );
+                if ( RCt == 0 ) {
+                    if ( strcmp ( PARAM_RO, ParamValue ) == 0 ) {
+                        * ReadOnly = true;
+                    }
+                    else {
+                        if ( strcmp ( PARAM_RW, ParamValue ) == 0 ) {
+                            * ReadOnly = false;
+                        }
+                        else {
+                            RCt = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcAmbiguous );
+                        }
+                    }
+                }
+
+                Idx ++;
+            }
+
+                /*  Next Param should be ProjectId
+                 */
+            if ( RCt == 0 ) {
+                RCt = ArgsParamValue (
+                                    TheArgs,
+                                    Idx,
+                                    ( const void ** ) & ParamValue
+                                    );
+                if ( RCt == 0 ) {
+                    * ProjectId = ParamValue;
+                }
+
+                Idx ++;
+            }
+
+                /*  Next Param should be MountPoint
+                 */
+            if ( RCt == 0 ) {
+                RCt = ArgsParamValue (
+                                    TheArgs,
+                                    Idx,
+                                    ( const void ** ) & ParamValue
+                                    );
+                if ( RCt == 0 ) {
+                    * MountPoint = ParamValue;
+                }
+
+                Idx ++;
+            }
+        }
+    }
+
+    return RCt;
+}   /* CheckParameters () */
+
+static
+rc_t CC
+CheckArgs (
+        struct Args * TheArgs,
+        const char ** LogFile,
+        const char ** ProgName,
+        bool * Daemonize
+)
+{
+    rc_t RCt;
+    const char * OptValue;
+    uint32_t OptCount;
+
+    RCt = 0;
+    OptValue = NULL;
+    OptCount = 0;
+
+    XFS_CSAN ( LogFile )
+    XFS_CSAN ( ProgName )
+    XFS_CSA ( Daemonize, false )
+    XFS_CAN ( TheArgs )
+    XFS_CAN ( LogFile )
+    XFS_CAN ( ProgName )
+    XFS_CAN ( Daemonize )
+
+    RCt = ArgsOptionCount ( TheArgs, OPT_LOGFILE, & OptCount );
+    if ( RCt == 0 && OptCount == 1 ) {
+        RCt = ArgsOptionValue (
+                            TheArgs,
+                            OPT_LOGFILE,
+                            0,
+                            ( const void ** ) & OptValue
+                            );
+        if ( RCt == 0 ) {
+            * LogFile = OptValue;
+        }
+    }
+
+    RCt = ArgsOptionCount ( TheArgs, OPT_DAEMONIZE, & OptCount ); 
+    if ( RCt == 0 ) {
+        * Daemonize = OptCount == 1;
+    }
+
+    RCt = ArgsProgram ( TheArgs, & OptValue, ProgName );
+
+    return RCt;
+}   /* CheckArgs () */
+
+static
+rc_t CC
+RunApp ( struct Args * TheArgs )
+{
+    rc_t RCt;
+    const char * ProjectId;
+    const char * MountPoint;
+    const char * LogFile;
+    const char * ProgName;
+    bool ReadOnly;
+    bool Daemonize;
+
+    RCt = 0;
+    ProjectId = NULL;
+    MountPoint = NULL;
+    LogFile = NULL;
+    ProgName = NULL;
+    ReadOnly = false;
+    Daemonize = false;
+
+    XFS_CAN ( TheArgs )
+
+
+
+        /*  First we are checking parameters
+         */
+    RCt = CheckParameters (
+                        TheArgs,
+                        & ProjectId,
+                        & MountPoint,
+                        & ReadOnly
+                        );
+
+    if ( RCt == 0 ) {
+            /*  Second we are checking Arguments
+             */
+        RCt = CheckArgs ( TheArgs, & LogFile, & ProgName, & Daemonize );
+    }
+
+    if ( RCt != 0 ) {
+        UsageSummary ( ProgName == NULL ? UsageDefaultName : ProgName );
+    }
+    else {
+        RCt = DoFukan (
+                    ProjectId,
+                    MountPoint,
+                    LogFile,
+                    ProgName,
+                    Daemonize,
+                    ReadOnly
+                    );
+    }
+
+    return RCt;
+}   /* RunApp () */
+
+static
+rc_t CC
+DoUnmount ( const char * MountPoint )
+{
+    rc_t RCt;
+
+    RCt = 0;
+
+    XFS_CAN ( MountPoint )
+
+    pLogMsg ( klogDebug, "[DoUnmount] [$(point)]", "point=%s", MountPoint );
+
+    XFSUnmountAndDestroy ( MountPoint );
+
+    return RCt;
+}   /* DoUnmount () */
+
+/*)))
+  \\\   KApp and Options ...
+  (((*/
+
+struct OptDef ToolOpts [] = {
+    { OPT_DAEMONIZE, ALS_DAEMONIZE, NULL, UsgDaemonize, 1, false, false },
+    { OPT_LOGFILE, ALS_LOGFILE, NULL, UsgLogFile, 1, true, false },
+    { OPT_UNMOUNT, ALS_UNMOUNT, NULL, UsgUnmount, 1, true, false }
+};  /* OptDef */
+
+const char UsageDefaultName[] = "dbgap-mount-tool";
+
+rc_t CC
+UsageSummary ( const char * ProgName )
+{
+    return KOutMsg (
+                    "\n"
+                    "Usage:\n"
+                    "  %s [options]"
+                    " [%s|%s]"
+                    " <project-id>"
+                    " <mount-point>"
+                    "\n"
+                    "Or:\n"
+                    "  %s [options] [unmount-options]"
+                    "\n"
+                    "\n",
+                    ProgName,
+                    PARAM_RO,
+                    PARAM_RW,
+                    ProgName
+                    );
+}   /* UsageSummary () */
+
+rc_t CC
+Usage ( const struct Args * TheArgs )
+{
+    rc_t RCt;
+    const char * ProgName;
+    const char * FullPath;
+
+    RCt = 0;
+    ProgName = NULL;
+    FullPath = NULL;
+
+    if ( TheArgs == NULL ) {
+        RCt = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    }
+    else {
+        RCt = ArgsProgram ( TheArgs, & FullPath, & ProgName );
+    }
+
+    if ( RCt != 0 ) {
+        ProgName = FullPath = UsageDefaultName;
+    }
+
+    UsageSummary ( ProgName );
+
+    KOutMsg ( "Options:\n" );
+
+    HelpOptionLine (
+                ALS_DAEMONIZE,
+                OPT_DAEMONIZE,
+                PRM_DAEMONIZE,
+                UsgDaemonize
+                );
+
+    HelpOptionLine (
+                ALS_LOGFILE,
+                OPT_LOGFILE,
+                PRM_LOGFILE,
+                UsgLogFile
+                );
+
+    KOutMsg ( "\n" );
+
+    KOutMsg ( "Unmount Options:\n" );
+
+    HelpOptionLine (
+                ALS_UNMOUNT,
+                OPT_UNMOUNT,
+                PRM_UNMOUNT,
+                UsgUnmount
+                );
+
+    KOutMsg ( "\n" );
+    KOutMsg ( "Standard Options:\n" );
+    HelpOptionsStandard ();
+    HelpVersion ( FullPath, KAppVersion () );
+
+    return RCt;
+}   /* Usage () */
+
+rc_t CC
+KMain ( int ArgC, char * ArgV [] )
+{
+    rc_t RCt;
+    struct Args * TheArgs;
+    const char * MountPoint;
+
+    RCt = 0;
+    TheArgs = NULL;
+
+    RCt = ArgsMakeAndHandle (
+                           & TheArgs,
+                           ArgC,
+                           ArgV,
+                           1,
+                           ToolOpts,
+                           sizeof ( ToolOpts ) / sizeof ( OptDef )
+                           );
+    if ( RCt == 0 ) {
+            /*  First we do check if that is unmount command 
+             */
+        RCt = ArgsOptionValue (
+                            TheArgs,
+                            OPT_UNMOUNT,
+                            0,
+                            ( const void ** ) & MountPoint
+                            );
+        if ( RCt != 0 ) {
+            RCt = WrapIt ( TheArgs, RunApp );
+        }
+        else {
+            RCt = DoUnmount ( MountPoint );
+        }
+
+        ArgsWhack ( TheArgs );
+    }
+
+    return RCt;
+}
diff --git a/tools/dbgap-mount/dbgap-mount-tool.h b/tools/dbgap-mount/dbgap-mount-tool.h
new file mode 100644
index 0000000..c0ef3c6
--- /dev/null
+++ b/tools/dbgap-mount/dbgap-mount-tool.h
@@ -0,0 +1,72 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _mount_tool_h_
+#define _mount_tool_h_
+
+#include <xfs/xfs-defs.h>
+
+#ifdef __cplusplus 
+extern "C" {
+#endif /* __cplusplus */
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*)))
+ |||    Log init/dispose
+(((*/
+
+XFS_EXTERN rc_t CC WrapIt (
+                        struct Args * TheArgs,
+                        rc_t ( CC * runner ) ( struct Args * TheArgs )
+                        );
+
+/*)))
+  \\\   Argumends ... raznye
+  (((*/
+#define OPT_DAEMONIZE   "daemonize"
+#define ALS_DAEMONIZE   "d"
+#define PRM_DAEMONIZE   NULL
+static const char * UsgDaemonize [] = { "Run tool as a daemon", NULL };
+
+#define OPT_LOGFILE     "log-file"
+#define ALS_LOGFILE     "l"
+#define PRM_LOGFILE     "log-file-path"
+static const char * UsgLogFile []   = { "Log file", NULL };
+
+#define OPT_UNMOUNT     "unmount"
+#define ALS_UNMOUNT     "u"
+#define PRM_UNMOUNT     "mount-point"
+static const char * UsgUnmount []   = { "Unmount", NULL };
+
+#define PARAM_RO        "ro"
+#define PARAM_RW        "rw"
+
+#ifdef __cplusplus 
+}
+#endif /* __cplusplus */
+
+#endif /* _mount_tool_h_ */
diff --git a/tools/dbgap-mount/demo.c b/tools/dbgap-mount/demo.c
new file mode 100644
index 0000000..6f63e53
--- /dev/null
+++ b/tools/dbgap-mount/demo.c
@@ -0,0 +1,366 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <sysalloc.h>
+#include <kapp/main.h> /* KMain */
+
+#include <klib/text.h>
+#include <klib/log.h> /* LOGERR */
+#include <klib/out.h> /* OUTMSG */
+#include <klib/refcount.h>
+#include <klib/rc.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+#include <xfs/model.h>
+#include <xfs/node.h>
+#include <xfs/tree.h>
+#include <xfs/xfs.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#ifdef WINDOWS
+
+#include <windows.h>    /* Sleep () */
+
+#else
+
+#include <unistd.h>     /* sleep () */
+
+#endif /* WINDOWS */
+
+/******************************************************************************/
+
+
+#ifdef JOJOBA
+
+static
+void
+SLEPOY ( int Sec )
+{
+
+printf ( "Sleeping %d seconds\n", Sec );
+#ifdef WINDOWS
+    Sleep ( Sec * 1000 );
+#else
+    sleep ( Sec );
+#endif
+
+printf ( "    DONE [ Sleeping %d seconds ]\n", Sec );
+
+}
+
+#endif /* JOJOBA */
+
+XFS_EXTERN rc_t CC XFS_InitAll_MHR ( const char * ConfigFile );
+XFS_EXTERN rc_t CC XFS_DisposeAll_MHR ();
+
+static
+rc_t 
+MakeModel (
+            struct XFSModel ** Model,
+            const char * ProjectId,
+            bool ReadOnly
+)
+{
+    rc_t RCt;
+    struct XFSModel * Mod;
+    struct XFSModelNode * ModNod;
+
+    RCt = 0;
+    Mod = NULL;
+
+    RCt = XFSModelFromScratch ( & Mod, NULL );
+    if ( RCt == 0 ) {
+        RCt = XFSModelAddRootNode ( Mod, "gap-project" );
+        if ( RCt == 0 ) {
+            ModNod = ( struct XFSModelNode * ) XFSModelRootNode ( Mod );
+            if ( ModNod == NULL ) {
+                RCt = XFS_RC ( rcInvalid );
+            }
+            else {
+                RCt = XFSModelNodeSetProperty (
+                                        ModNod,
+                                        XFS_MODEL_MODE,
+                                        ( ReadOnly
+                                                ? XFS_MODEL_MODE_RO
+                                                : XFS_MODEL_MODE_RW
+                                        )
+                                        );
+                if ( RCt == 0 ) {
+                    RCt = XFSModelNodeSetProperty (
+                                            ModNod,
+                                            XFS_MODEL_PROJECTID,
+                                            ProjectId
+                                            );
+                    if ( RCt == 0 ) {
+                        * Model = Mod;
+                    }
+                }
+
+            }
+        }
+    }
+
+    return RCt;
+}
+
+
+static
+rc_t run (
+        const char * ProjectId,
+        const char * MountPoint,
+        bool ReadOnly,
+        bool Daemonize
+)
+{
+    rc_t RCt;
+    struct XFSModel * TheModel;
+    struct XFSTree * TheTree;
+    struct XFSControl * TheControl;
+
+    RCt = 0;
+    TheModel = NULL;
+    TheTree = NULL;
+    TheControl = NULL;
+
+    OUTMSG ( ( "<<--- run()\n" ) );
+
+    XFS_InitAll_MHR ( NULL );
+
+    RCt = MakeModel ( & TheModel, ProjectId, ReadOnly );
+
+    printf ( "HA(XFSModelMake)[RC=%d]\n", RCt );
+
+    if ( RCt == 0 ) {
+        RCt = XFSTreeMake ( TheModel, & TheTree );
+
+        printf ( "HA(XFSTreeMake)[RC=%d]\n", RCt );
+
+        if ( RCt == 0 ) {
+            printf ( "HA(XFSControlMake)[RC=%d]\n", RCt );
+
+            RCt = XFSControlMake ( TheTree, & TheControl );
+            printf ( "HE(XFSControlMake)[0x%p][RC=%d]\n", ( void * ) TheControl, RCt );
+
+            if ( RCt == 0 ) {
+
+                XFSControlSetMountPoint ( TheControl, MountPoint );
+                XFSControlSetLabel ( TheControl, "Olaffsen" );
+                XFSControlSetLogFile ( TheControl, NULL );
+
+                if ( ! Daemonize ) {
+                    XFSControlSetArg ( TheControl, "-f", "-f" );
+                }
+
+                printf ( "HA(XFSStart)\n" );
+                RCt = XFSStart ( TheControl );
+
+                printf ( "HE(XFSStart)[RC=%d]\n", RCt );
+                if ( RCt == 0 ) {
+                    printf ( "HA(XFSStop)\n" );
+                    RCt = XFSStop ( TheControl );
+                    printf ( "HE(XFSStop)[RC=%d]\n", RCt );
+                }
+                else {
+                    printf ( "Can not start FUSE\n" );
+                }
+            }
+
+            XFSControlDispose ( TheControl );
+
+            XFSTreeRelease ( TheTree );
+        }
+
+        XFSModelRelease ( TheModel );
+    }
+
+    XFS_DisposeAll_MHR ();
+
+    OUTMSG ( ( "--->> run()\n" ) );
+
+    return RCt;
+}
+
+/*  Here I will temporarily parce arguments, and will attach
+ *  toolkit ones later ... test program :)
+ */
+char ProgramName[333];
+char ProjectId [33];
+int ProjectIdInt = 0;
+char MountPoint[333];
+bool ReadOnly = true;
+bool Daemonize = false;
+bool LogToFile = false;
+char LogFile [ 777 ];
+
+#define RO_TAG   "ro"
+#define RW_TAG   "rw"
+#define DM_TAG   "-d"
+
+#define LF_TAG   "-l"
+
+static
+void
+RightUsage()
+{
+    printf("\ndbGaP mount tool demo program. Will mount and show content of cart files\n");
+    printf("\nUsage: %s [%s|%s] [%s log_file] [%s] project_id mount_point\n\n\
+Where:\n\
+    project_id - usually integer greater that zero and less than twelve\n\
+    %s - mount in read only mode\n\
+    %s - mount in read-write mode\n\
+    %s - run mounter as daemon\n\
+    mount_point - point to mount\n\
+    log_file - file to log logs\n\
+\n\n", ProgramName, RO_TAG, RW_TAG, LF_TAG, DM_TAG, RO_TAG, RW_TAG, DM_TAG );
+}   /* RightUsage() */
+
+static
+bool
+ParseArgs ( int argc, char ** argv )
+{
+    const char * PPU;
+    const char * Arg;
+    int llp;
+
+    Arg = NULL;
+    llp = 0;
+    * ProgramName = 0;
+    * ProjectId = 0;
+    ProjectIdInt = 0;
+    * MountPoint = 0;
+
+    ReadOnly = true;
+    Daemonize = false;
+
+        /* Herer wer arer extractingr programr namer
+         */
+    PPU = strrchr ( * argv, '/' );
+    if ( PPU == NULL ) {
+        PPU = * argv;
+    }
+    else {
+        PPU ++;
+    }
+    strcpy ( ProgramName, PPU );
+
+        /* Herer shouldr ber atr leastr oner argumentr - projectr idr
+         */
+    if ( argc <= 2 ) {
+        printf ( "ERROR : too few arguments\n" );
+        return false;
+    }
+
+    llp = 1;
+    Arg = * ( argv + llp );
+
+        /* firstr paramr couldr ber "ro|rw" orr "-d"
+         */
+    if ( strcmp ( Arg, RO_TAG ) == 0 ) {
+        ReadOnly = true;
+
+        llp ++;
+    }
+    else {
+        ReadOnly = false;
+        if ( strcmp ( Arg, RW_TAG ) == 0 ) {
+
+            llp ++;
+        }
+    }
+
+        /* secondr paramr "-d" orr projectr idr
+         */
+    if ( argc <= llp ) {
+        printf ( "ERROR : too few arguments\n" );
+        return false;
+    }
+    Arg = * ( argv + llp );
+    if ( strcmp ( Arg, DM_TAG ) == 0 ) {
+        Daemonize = true;
+
+        llp ++;
+    }
+
+        /* andr nowr itr isr projectr idr
+         */
+    if ( argc <= llp ) {
+        printf ( "ERROR : too few arguments\n" );
+        return false;
+    }
+    Arg = * ( argv + llp );
+    strcpy ( ProjectId, Arg );
+        /* checkr thatr integerr
+         */
+    ProjectIdInt = atol ( ProjectId );
+    if ( ProjectIdInt <= 0 ) {
+        printf ( "ERROR : invalid project_id '%s'\n", ProjectId );
+        return false;
+    }
+    llp ++;
+
+
+        /* mountr pointr ifr existsr
+         */
+    if ( llp < argc ) {
+        Arg = * ( argv + llp );
+        strcpy ( MountPoint, Arg );
+        llp ++;
+    }
+
+    printf ( "PrI [%d]\n", ProjectIdInt );
+    printf ( "MnP [%s]\n", MountPoint );
+
+
+    return true;
+}   /* ParseArgs() */
+
+
+const char UsageDefaultName[] = "Henri Fuseli";
+rc_t CC UsageSummary (const char* progname) { return 0; }
+rc_t CC Usage ( const Args * args ) { return 0; }
+
+rc_t CC KMain(int argc, char *argv[]) {
+
+    // KLogLevelSet ( klogInfo );
+    KLogLevelSet ( klogDebug );
+    // XFSLogInit ( "log.log" );
+
+    if ( ! ParseArgs ( argc, argv ) ) {
+        RightUsage();
+        return 1;
+    }
+
+    return run (
+                ProjectId,
+                MountPoint,
+                ReadOnly,
+                Daemonize
+                );
+}
diff --git a/tools/dbgap-mount/demo.mkfg b/tools/dbgap-mount/demo.mkfg
new file mode 100755
index 0000000..66ab293
--- /dev/null
+++ b/tools/dbgap-mount/demo.mkfg
@@ -0,0 +1,47 @@
+## There is description of Test model
+
+root/type="simple-container"
+root/security="r-xr-xr-x"
+root/children="project,workspace,data"
+
+project/label="Project"
+project/type="kart-collection"
+project/source="/panfs/pan1/trace_work/iskhakov/Tests/dbGaP/data/Project"
+project/security="r-xr-xr-x"
+
+workspace/label="EncryptedWorkspace"
+workspace/type="workspace"
+workspace/security="rwxrwxr-x"
+workspace/source="/panfs/pan1/trace_work/iskhakov/Tests/dbGaP/data/ENC"
+workspace/password="aaa"
+workspace/enctype="AES128"
+
+data/label="Data"
+data/type="simple-container"
+data/children="remote,dir,tar,encfile"
+
+remote/label="RemoteRepository"
+remote/type="remote-repository"
+remote/source="http://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant"
+remote/security="r-xr-xr-x"
+
+dir/label="MirroredDirectory"
+dir/type="directory"
+dir/source="/home/iskhakov/HLAM/"
+dir/security="rwxr-xr-x"
+
+tar/label="TarArchive"
+tar/type="tar-archive"
+tar/source="/home/iskhakov/HLAM/mumu.tar"
+
+readme/label="README.txt"
+readme/type="readme"
+help/text="File was automatically generated"
+help/security="r-xr--r--"
+
+encfile/label="iFILE.txt"
+encfile/type="encrypted-file"
+encfile/source="/home/iskhakov/HLAM/HURI.txt.ncbi_enc"
+encfile/security="r--r--r--"
+encfile/password="aaa"
+encfile/enctype="AES128"
diff --git a/tools/dbgap-mount/unix/wrap.c b/tools/dbgap-mount/unix/wrap.c
new file mode 100644
index 0000000..f89944f
--- /dev/null
+++ b/tools/dbgap-mount/unix/wrap.c
@@ -0,0 +1,44 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <kapp/args.h> /* KMain */
+#include <xfs/xfs-defs.h>
+
+#include <sysalloc.h>
+
+
+/* By default should call DoFukan ()
+ */
+LIB_EXPORT
+rc_t CC
+WrapIt (
+        struct Args * TheArgs,
+        rc_t ( CC * runner ) ( struct Args * TheArgs )
+)
+{
+    XFS_CAN ( TheArgs )
+    XFS_CAN ( runner )
+    return runner ( TheArgs );
+}   /* WrapIt () */
diff --git a/tools/dbgap-mount/win/wrap.c b/tools/dbgap-mount/win/wrap.c
new file mode 100644
index 0000000..1554901
--- /dev/null
+++ b/tools/dbgap-mount/win/wrap.c
@@ -0,0 +1,344 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <kapp/args.h> /* KMain */
+
+#include <klib/text.h>
+#include <klib/out.h> /* OUTMSG */
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+#include <xfs/xfs-defs.h>
+#include <xfs/xlog.h>
+
+#include "../dbgap-mount-tool.h"
+
+#include <sysalloc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/*  There is some inconvinience. Before KMain is called, some filthy
+ *  converts all cool WCHAR paths to uncool linux-style char paths
+ *  so we had to go throught all parameters and regenerate command
+ *  line with converting into path everything what looks like a path.
+ *  or ... what starts with \
+ */
+
+static
+rc_t CC
+_CharToWChar ( WCHAR * Buf, size_t BufSz, const char * Str )
+{
+    XFS_CAN ( Str )
+    XFS_CAN ( Buf )
+
+
+    return  mbstowcs ( Buf, Str, strlen ( Str ) ) == - 1
+                                            ? XFS_RC ( rcInvalid )
+                                            : 0
+                                            ;
+}   /* _CharToWChar () */
+
+LIB_EXPORT
+rc_t CC
+XFSPathInnerToNative (
+                    WCHAR * NativePathBuffer,
+                    size_t NativePathBufferSize,
+                    const char * InnerPath,
+                    ...
+                    );
+
+static
+rc_t CC
+_CheckConvert ( const char * Str, WCHAR * Buf, size_t BufSz )
+{
+    rc_t RCt = 0;
+
+    XFS_CAN ( Str )
+    XFS_CAN ( Buf )
+
+    if ( * Str == '/' || ( * Str == '.' && * ( Str + 1 ) == '/' ) ) {
+            /* That is candidate for a path */
+        RCt = XFSPathInnerToNative ( Buf, BufSz, Str );
+    }
+    else {
+            /* Just converting to WCHAR */
+        RCt = _CharToWChar ( Buf, BufSz, Str );
+    }
+
+    return RCt;
+}   /* _CheckConvert () */
+
+static
+bool CC
+_IsDaemonizeToken ( const char * Param )
+{
+    const char * Str = Param;
+
+    if ( Str != NULL ) {
+        if ( * Str == '-' ) {
+            Str ++;
+            if ( * Str == '-' ) {
+                Str ++;
+                return strcmp ( Str, OPT_DAEMONIZE ) == 0;
+            }
+            else {
+                return strcmp ( Str, ALS_DAEMONIZE ) == 0;
+            }
+        }
+    }
+
+    return false;
+}   /* _IsDaemonizeToken () */
+
+static
+rc_t CC
+_MakeCommandString (
+                struct Args * TheArgs,
+                WCHAR ** Str,
+                WCHAR ** Prog
+)
+{
+    rc_t RCt;
+    uint32_t Cnt;
+    uint32_t Idx;
+    const char * Val;
+    WCHAR BF [ 4096 ];
+    WCHAR BF1 [ 1096 ];
+
+    RCt = 0;
+    Cnt = 0;
+    Idx = 0;
+    Val = NULL;
+    * BF = 0;
+    * BF1 = 0;
+
+    XFS_CSAN ( Str )
+    XFS_CAN ( TheArgs )
+    XFS_CAN ( Str )
+
+    RCt = ArgsArgvCount ( TheArgs, & Cnt );
+    if ( RCt == 0 ) {
+        for ( Idx = 0; Idx < Cnt; Idx ++ ) {
+            ZeroMemory ( BF1, sizeof ( BF1 ) );
+
+            RCt = ArgsArgvValue ( TheArgs, Idx, & Val );
+            if ( RCt != 0 ) {
+                break;
+            }
+
+            if ( _IsDaemonizeToken ( Val ) ) {
+                continue;
+            }
+
+            RCt = _CheckConvert ( Val, BF1, sizeof ( BF1 ) );
+            if ( RCt != 0 ) {
+                break;
+            }
+
+            if ( 0 < Idx ) {
+                wcscat ( BF, L" " );
+            }
+            wcscat ( BF, BF1 );
+        }
+    }
+
+    if ( RCt == 0 ) {
+        ZeroMemory ( BF1, sizeof ( BF1 ) );
+        RCt = ArgsArgvValue ( TheArgs, 0, & Val );
+        if ( RCt == 0 ) {
+            RCt = _CheckConvert ( Val, BF1, sizeof ( BF1 ) );
+        }
+    }
+
+    * Str = _wcsdup ( BF );
+    * Prog = _wcsdup ( BF1 );
+
+    if ( * Str == NULL || * Prog == NULL ) {
+        RCt = XFS_RC ( rcExhausted );
+
+        if ( * Str != NULL ) {
+            free ( * Str );
+            * Str = NULL;
+        }
+
+        if ( * Prog != NULL ) {
+            free ( * Prog );
+            * Prog = NULL;
+        }
+    }
+
+    return 0;
+}   /* _MakeCommandString () */
+
+static
+rc_t CC
+_CreateDetached ( LPCTSTR AppName, LPTSTR Cmd )
+{
+    rc_t RCt;
+    BOOL Ret;
+    STARTUPINFO StartInfo;
+    PROCESS_INFORMATION Process;
+    int Err;
+
+    RCt = 0;
+    Ret = FALSE;
+    ZeroMemory ( & StartInfo, sizeof( StartInfo ) );
+    ZeroMemory ( & Process, sizeof( Process ) );
+    Err = 0;
+
+    Ret = CreateProcessW (
+                AppName,            // application name
+                Cmd,                // command line
+                NULL,               // process attributes
+                NULL,               // trhead attributes
+                FALSE,              // no file handler inheritance
+                DETACHED_PROCESS,   // Creation Flags
+                NULL,               // Inherit environment
+                NULL,               // Inherit CWD
+                & StartInfo,        // Startup Info
+                & Process           // Process Information
+                );
+    if ( Ret == FALSE ) {
+        Err = GetLastError ();
+        wprintf ( L"CRITICAL ERROR: Can not run in background [%s] Error[%d]\n", AppName, Err );
+        RCt = XFS_RC ( rcInvalid );
+    }
+    else {
+        wprintf ( L"RUN DETACHED\n" );
+    }
+
+    return RCt;
+}   /* _CreateDetached () */
+
+static
+rc_t CC
+RunDaemon ( struct Args * TheArgs )
+{
+    rc_t RCt;
+    WCHAR * CmdLine;
+    WCHAR * ProgName;
+
+    RCt = 0;
+    CmdLine = NULL;
+    ProgName = NULL;
+
+    RCt = _MakeCommandString ( TheArgs, & CmdLine, & ProgName );
+    if ( RCt == 0 ) {
+        RCt = _CreateDetached ( ProgName, CmdLine );        
+
+        free ( CmdLine );
+        free ( ProgName );
+    }
+
+    return 0;
+}   /* RunDaemon () */
+
+static
+rc_t CC
+_SetLog ( struct Args * TheArgs )
+{
+    rc_t RCt;
+    const char * LogFile;
+    uint32_t OptCount;
+
+    RCt = 0;
+    LogFile = NULL;
+    OptCount = 0;
+
+    XFS_CAN ( TheArgs )
+
+    if ( TheArgs != NULL ) {
+        RCt = ArgsOptionCount ( TheArgs, OPT_LOGFILE, & OptCount );
+        if ( RCt == 0 && OptCount == 1 ) {
+            RCt = ArgsOptionValue (
+                                TheArgs,
+                                OPT_LOGFILE,
+                                0,
+                                ( const void ** ) & LogFile
+                                );
+        }
+    }
+
+    if ( RCt == 0 ) {
+        if ( LogFile != NULL ) {
+            printf ( "Log File [%s]\n", LogFile );
+        }
+        else {
+/* 
+            printf ( "Log File [NULL]\n" );
+*/
+        }
+        RCt = XFSLogInit ( LogFile );
+    }
+
+    return RCt;
+}   /* _SetLog () */
+
+/* By default should call DoFukan ()
+ */
+rc_t CC
+WrapIt (
+        struct Args * TheArgs, 
+        rc_t ( CC * runner ) ( struct Args * TheArgs )
+)
+{
+    rc_t RCt;
+    uint32_t OptCount;
+
+    RCt = 0;
+    OptCount = 0;
+
+    XFS_CAN ( TheArgs );
+    XFS_CAN ( runner );
+
+    RCt = ArgsOptionCount ( TheArgs, OPT_DAEMONIZE, & OptCount );
+    if ( RCt == 0 ) {
+        if ( OptCount == 1 ) {
+                /* Here we are daemonizing
+                 */
+            RCt = RunDaemon ( TheArgs );
+        }
+        else {
+                /* Setting log file
+                 */
+            RCt = _SetLog ( TheArgs );
+            if ( RCt == 0 ) {
+                RCt = runner ( TheArgs );
+            }
+            else {
+                LogErr ( klogErr, RCt, "CRITICAL ERROR: Can not initialize log file" );
+            }
+        }
+    }
+
+        /* TODO : that is soo stupid - remove 
+         */
+    return RCt;
+}   /* WrapIt () */
diff --git a/tools/fastdump/.gitignore b/tools/fastdump/.gitignore
new file mode 100644
index 0000000..2d51571
--- /dev/null
+++ b/tools/fastdump/.gitignore
@@ -0,0 +1,3 @@
+lookup_bin.dat
+special.txt
+vdb_dump_special.txt
diff --git a/tools/fastdump/Makefile b/tools/fastdump/Makefile
new file mode 100644
index 0000000..f39d069
--- /dev/null
+++ b/tools/fastdump/Makefile
@@ -0,0 +1,89 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/fastdump
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+	fastdump
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# fastdump
+#
+TOOL_SRC = \
+	helper \
+	index \
+	lookup_writer \
+	lookup_reader \
+	file_printer \
+	merge_sorter \
+	sorter \
+	cmn_iter \
+	raw_read_iter \
+	special_iter \
+	fastq_iter \
+	join \
+	fastdump
+
+TOOL_OBJ = \
+	$(addsuffix .$(OBJX),$(TOOL_SRC))
+
+TOOL_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lm
+
+$(BINDIR)/fastdump: $(TOOL_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(TOOL_LIB)
+
diff --git a/tools/fastdump/cmn_iter.c b/tools/fastdump/cmn_iter.c
new file mode 100644
index 0000000..e1c463c
--- /dev/null
+++ b/tools/fastdump/cmn_iter.c
@@ -0,0 +1,287 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "cmn_iter.h"
+#include "helper.h"
+
+#include <klib/progressbar.h>
+#include <klib/out.h>
+#include <sra/sraschema.h>
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <vdb/database.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+typedef struct cmn_iter
+{
+    const VDBManager * mgr;
+    VSchema * schema;
+    const VDatabase * db;
+    const VTable * tbl;
+    const VCursor * cursor;
+    const char * row_range;
+    struct num_gen * ranges;
+    const struct num_gen_iter * row_iter;
+    struct progressbar * progressbar;
+    uint64_t count;
+    int64_t first, row_id;
+} cmn_iter;
+
+
+void destroy_cmn_iter( struct cmn_iter * iter )
+{
+    if ( iter != NULL )
+    {
+        if ( iter->progressbar != NULL )
+            destroy_progressbar( iter->progressbar );
+
+        if ( iter->row_iter != NULL ) num_gen_iterator_destroy( iter->row_iter );
+        if ( iter->ranges != NULL ) num_gen_destroy( iter->ranges );
+        if ( iter->cursor != NULL ) VCursorRelease( iter->cursor );
+        if ( iter->tbl != NULL ) VTableRelease( iter->tbl );
+        if ( iter->db != NULL ) VDatabaseRelease( iter->db );
+        if ( iter->schema != NULL ) VSchemaRelease( iter->schema );
+        if ( iter->mgr != NULL ) VDBManagerRelease( iter->mgr );
+        free( ( void * ) iter );
+    }
+}
+
+
+rc_t make_cmn_iter( cmn_params * params, const char * tblname, struct cmn_iter ** iter )
+{
+    rc_t rc = 0;
+    cmn_iter * i = calloc( 1, sizeof * i );
+    if ( i == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        ErrMsg( "make_cmn_iter.calloc( %d ) -> %R", ( sizeof * i ), rc );
+    }
+    else
+    {
+        rc = VDBManagerMakeRead( &i->mgr, params->dir );
+        if ( rc != 0 )
+            ErrMsg( "make_cmn_iter.VDBManagerMakeRead() -> %R\n", rc );
+        else
+        {
+            rc = VDBManagerMakeSRASchema( i->mgr, &i->schema );
+            if ( rc != 0 )
+                ErrMsg( "make_cmn_iter.VDBManagerMakeSRASchema() -> %R\n", rc );
+            else
+            {
+                rc = VDBManagerOpenDBRead( i->mgr, &i->db, i->schema, "%s", params->acc );
+                if ( rc != 0 )
+                    ErrMsg( "make_cmn_iter.VDBManagerOpenDBRead( '%s' ) -> %R\n", params->acc, rc );
+                else
+                {
+                    rc = VDatabaseOpenTableRead( i->db, &i->tbl, "%s", tblname );
+                    if ( rc != 0 )
+                        ErrMsg( "make_cmn_iter.VDBManagerOpenDBRead( '%s', '%s' ) -> %R\n", params->acc, tblname, rc );
+                    else
+                    {
+                        rc = VTableCreateCachedCursorRead( i->tbl, &i->cursor, params->cursor_cache );
+                        if ( rc != 0 )
+                            ErrMsg( "make_cmn_iter.VTableCreateCachedCursorRead() -> %R\n", rc );
+                        else
+                        {
+                            if ( rc == 0 && params->show_progress )
+                                make_progressbar( &i->progressbar, 2 );
+                            i->row_range = params->row_range;
+                            i->first = params->first;
+                            i->count = params->count;
+                            
+                            *iter = i;
+                        }
+                    }
+                }
+            }
+        }
+    }
+    if ( rc != 0 )
+        destroy_cmn_iter( i );
+    return rc;
+}
+
+
+rc_t cmn_iter_add_column( struct cmn_iter * iter, const char * name, uint32_t * id )
+{
+    return add_column( iter->cursor, name, id );
+}
+
+
+int64_t cmn_iter_row_id( const struct cmn_iter * iter )
+{
+    return iter->row_id;
+}
+
+
+uint64_t cmn_iter_row_count( struct cmn_iter * iter )
+{
+    uint64_t res = 0;
+    rc_t rc = num_gen_iterator_count( iter->row_iter, &res );
+    if ( rc != 0 )
+        ErrMsg( "make_cmn_iter.num_gen_iterator_count() -> %R\n", rc );
+    return res;
+}
+
+
+bool cmn_iter_next( struct cmn_iter * iter, rc_t * rc )
+{
+    bool res = num_gen_iterator_next( iter->row_iter, &iter->row_id, rc );
+    if ( res && iter->progressbar != NULL )
+    {
+        uint64_t percent = calc_percent( iter->count, iter->row_id, 2 );
+        update_progressbar( iter->progressbar, percent );
+    }
+    return res;
+}
+
+
+rc_t cmn_iter_range( struct cmn_iter * iter, uint32_t col_id )
+{
+    rc_t rc = VCursorOpen( iter->cursor );
+    if ( rc != 0 )
+        ErrMsg( "cmn_iter_range.VCursorOpen() -> %R", rc );
+    else
+    {
+        rc = num_gen_make_sorted( &iter->ranges, true );
+        if ( rc != 0 )
+            ErrMsg( "cmn_iter_range.num_gen_make_sorted() -> %R\n", rc );
+        else
+        {
+            if ( iter->row_range != NULL )
+            {
+                rc = num_gen_parse( iter->ranges, iter->row_range );
+                if ( rc != 0 )
+                    ErrMsg( "cmn_iter_range.num_gen_parse( %s ) -> %R\n", iter->row_range, rc );
+            }
+            else if ( iter->count > 0 )
+            {
+                rc = num_gen_add( iter->ranges, iter->first, iter->count );
+                if ( rc != 0 )
+                    ErrMsg( "cmn_iter_range.num_gen_add( %ld.%lu ) -> %R\n",
+                            iter->first, iter->count, iter->row_range, rc );
+            }
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        rc = VCursorIdRange( iter->cursor, col_id, &iter->first, &iter->count );
+        if ( rc != 0 )
+            ErrMsg( "cmn_iter_range.VCursorIdRange() -> %R", rc );
+        else
+        {
+            rc = make_row_iter( iter->ranges, iter->first, iter->count, &iter->row_iter );
+            if ( rc != 0 )
+                ErrMsg( "cmn_iter_range.make_row_iter( %s ) -> %R\n", iter->row_range, rc );
+        }
+    }
+    return rc;
+}
+
+
+rc_t cmn_read_uint64( struct cmn_iter * iter, uint32_t col_id, uint64_t *value )
+{
+    uint32_t elem_bits, boff, row_len;
+    const uint64_t * value_ptr;
+    rc_t rc = VCursorCellDataDirect( iter->cursor, iter->row_id, col_id, &elem_bits,
+                                 (const void **)&value_ptr, &boff, &row_len );
+    if ( rc != 0 )
+        ErrMsg( "VCursorCellDataDirect( #%ld ) -> %R\n", iter->row_id, rc );
+    else if ( elem_bits != 64 || boff != 0 || row_len < 1 )
+    {
+        ErrMsg( "row#%ld : bits=%d, boff=%d, len=%d\n", iter->row_id, elem_bits, boff, row_len );
+        rc = RC( rcApp, rcNoTarg, rcAccessing, rcRow, rcInvalid );
+    }
+    else
+        *value = *value_ptr;
+    return rc;
+}
+
+
+rc_t cmn_read_uint64_array( struct cmn_iter * iter, uint32_t col_id, uint64_t *value,
+                            uint32_t num_values, uint32_t * values_read )
+{
+    uint32_t elem_bits, boff, row_len;
+    const uint64_t * value_ptr;
+    rc_t rc = VCursorCellDataDirect( iter->cursor, iter->row_id, col_id, &elem_bits,
+                                 (const void **)&value_ptr, &boff, &row_len );
+    if ( rc != 0 )
+        ErrMsg( "VCursorCellDataDirect( #%ld ) -> %R\n", iter->row_id, rc );
+    else if ( elem_bits != 64 || boff != 0 || row_len < 1 )
+    {
+        ErrMsg( "row#%ld : bits=%d, boff=%d, len=%d\n", iter->row_id, elem_bits, boff, row_len );
+        rc = RC( rcApp, rcNoTarg, rcAccessing, rcRow, rcInvalid );
+    }
+    else
+    {
+        if ( row_len > num_values ) row_len = num_values;
+        * values_read = row_len;
+        memmove( (void *)value, (void *)value_ptr, row_len * 8 );
+    }
+    return rc;
+}
+
+
+rc_t cmn_read_uint32( struct cmn_iter * iter, uint32_t col_id, uint32_t *value )
+{
+    uint32_t elem_bits, boff, row_len;
+    const uint32_t * value_ptr;
+    rc_t rc = VCursorCellDataDirect( iter->cursor, iter->row_id, col_id, &elem_bits,
+                                 (const void **)&value_ptr, &boff, &row_len );
+    if ( rc != 0 )
+        ErrMsg( "VCursorCellDataDirect( #%ld ) -> %R\n", iter->row_id, rc );
+    else if ( elem_bits != 32 || boff != 0 || row_len < 1 )
+    {
+        ErrMsg( "row#%ld : bits=%d, boff=%d, len=%d\n", iter->row_id, elem_bits, boff, row_len );
+        rc = RC( rcApp, rcNoTarg, rcAccessing, rcRow, rcInvalid );
+    }
+    else
+        *value = *value_ptr;
+    return rc;
+}
+
+rc_t cmn_read_String( struct cmn_iter * iter, uint32_t col_id, String *value )
+{
+    uint32_t elem_bits, boff;
+    rc_t rc = VCursorCellDataDirect( iter->cursor, iter->row_id, col_id, &elem_bits,
+                                 (const void **)&value->addr, &boff, &value->len );
+    if ( rc != 0 )
+        ErrMsg( "VCursorCellDataDirect( #%ld ) -> %R\n", iter->row_id, rc );
+    else if ( elem_bits != 8 || boff != 0 )
+    {
+        ErrMsg( "row#%ld : bits=%d, boff=%d, len=%d\n", iter->row_id, elem_bits, boff, value->len );
+        rc = RC( rcApp, rcNoTarg, rcAccessing, rcRow, rcInvalid );
+    }
+    else
+        value->size = value->len;
+    return rc;
+}
diff --git a/tools/fastdump/cmn_iter.h b/tools/fastdump/cmn_iter.h
new file mode 100644
index 0000000..660d3ea
--- /dev/null
+++ b/tools/fastdump/cmn_iter.h
@@ -0,0 +1,81 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_cmn_iter_
+#define _h_cmn_iter_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_klib_text_
+#include <klib/text.h>
+#endif
+
+#ifndef _h_kfs_directory_
+#include <kfs/directory.h>
+#endif
+
+struct cmn_iter;
+
+typedef struct cmn_params
+{
+    KDirectory * dir;
+    const char * acc;
+    const char * row_range;
+    int64_t first;
+    uint64_t count;
+    size_t cursor_cache;
+    bool show_progress;
+} cmn_params;
+
+void destroy_cmn_iter( struct cmn_iter * iter );
+
+rc_t make_cmn_iter( cmn_params * params, const char * tblname, struct cmn_iter ** iter );
+
+rc_t cmn_iter_add_column( struct cmn_iter * iter, const char * name, uint32_t * id );
+rc_t cmn_iter_range( struct cmn_iter * iter, uint32_t col_id );
+
+bool cmn_iter_next( struct cmn_iter * iter, rc_t * rc );
+int64_t cmn_iter_row_id( const struct cmn_iter * iter );
+
+uint64_t cmn_iter_row_count( struct cmn_iter * iter );
+
+rc_t cmn_read_uint64( struct cmn_iter * iter, uint32_t col_id, uint64_t *value );
+rc_t cmn_read_uint64_array( struct cmn_iter * iter, uint32_t col_id, uint64_t *value,
+                            uint32_t num_values, uint32_t * values_read );
+rc_t cmn_read_uint32( struct cmn_iter * iter, uint32_t col_id, uint32_t *value );
+rc_t cmn_read_String( struct cmn_iter * iter, uint32_t col_id, String *value );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/fastdump/fastdump.c b/tools/fastdump/fastdump.c
new file mode 100644
index 0000000..33622b5
--- /dev/null
+++ b/tools/fastdump/fastdump.c
@@ -0,0 +1,352 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "cmn_iter.h"
+#include "file_printer.h"
+#include "raw_read_iter.h"
+#include "special_iter.h"
+#include "fastq_iter.h"
+#include "lookup_writer.h"
+#include "lookup_reader.h"
+#include "join.h"
+#include "sorter.h"
+#include "helper.h"
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/out.h>
+#include <klib/vector.h>
+#include <klib/log.h>
+#include <kfs/directory.h>
+#include <kproc/thread.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+static const char * lookup_usage[] = { "lookup file", NULL };
+#define OPTION_LOOKUP   "lookup"
+#define ALIAS_LOOKUP    "l"
+
+static const char * range_usage[] = { "row-range", NULL };
+#define OPTION_RANGE    "range"
+#define ALIAS_RANGE     "R"
+
+static const char * format_usage[] = { "format (special, fastq, lookup, default=special)", NULL };
+#define OPTION_FORMAT   "format"
+#define ALIAS_FORMAT     "f"
+
+static const char * output_usage[] = { "output-file", NULL };
+#define OPTION_OUTPUT   "out"
+#define ALIAS_OUTPUT    "o"
+
+static const char * progress_usage[] = { "show progress", NULL };
+#define OPTION_PROGRESS "progress"
+#define ALIAS_PROGRESS  "p"
+
+static const char * bufsize_usage[] = { "size of file-buffer ( default=1MB )", NULL };
+#define OPTION_BUFSIZE  "bufsize"
+#define ALIAS_BUFSIZE   "b"
+
+static const char * curcache_usage[] = { "size of cursor-cache ( default=10MB )", NULL };
+#define OPTION_CURCACHE "curcache"
+#define ALIAS_CURCACHE  "c"
+
+static const char * mem_usage[] = { "memory limit for sorting ( default=2GB )", NULL };
+#define OPTION_MEM      "mem"
+#define ALIAS_MEM       "m"
+
+static const char * temp_usage[] = { "where to put temp. files ( default=curr. dir )", NULL };
+#define OPTION_TEMP     "temp"
+#define ALIAS_TEMP      "t"
+
+static const char * threads_usage[] = { "how many thread ( default=1 )", NULL };
+#define OPTION_THREADS  "threads"
+#define ALIAS_THREADS   "e"
+
+static const char * index_usage[] = { "name of index-file", NULL };
+#define OPTION_INDEX    "index"
+#define ALIAS_INDEX     "i"
+
+OptDef ToolOptions[] =
+{
+    { OPTION_RANGE,     ALIAS_RANGE,     NULL, range_usage,      1, true,   false },
+    { OPTION_LOOKUP,    ALIAS_LOOKUP,    NULL, lookup_usage,     1, true,   false },
+    { OPTION_FORMAT,    ALIAS_FORMAT,    NULL, format_usage,     1, true,   false },
+    { OPTION_OUTPUT,    ALIAS_OUTPUT,    NULL, output_usage,     1, true,   false },
+    { OPTION_BUFSIZE,   ALIAS_BUFSIZE,   NULL, bufsize_usage,    1, true,   false },
+    { OPTION_CURCACHE,  ALIAS_CURCACHE,  NULL, curcache_usage,   1, true,   false },
+    { OPTION_MEM,       ALIAS_MEM,       NULL, mem_usage,        1, true,   false },
+    { OPTION_TEMP,      ALIAS_TEMP,      NULL, temp_usage,       1, true,   false },
+    { OPTION_THREADS,   ALIAS_THREADS,   NULL, threads_usage,    1, true,   false },
+    { OPTION_INDEX,     ALIAS_INDEX,     NULL, index_usage,      1, true,   false },
+    { OPTION_PROGRESS,  ALIAS_PROGRESS,  NULL, progress_usage,   1, false,  false }
+};
+
+const char UsageDefaultName[] = "fastdump";
+
+rc_t CC UsageSummary( const char * progname )
+{
+    return KOutMsg( "\n"
+                     "Usage:\n"
+                     "  %s <path> [options]\n"
+                     "\n", progname );
+}
+
+
+rc_t CC Usage ( const Args * args )
+{
+    rc_t rc;
+    uint32_t idx, count = ( sizeof ToolOptions ) / ( sizeof ToolOptions[ 0 ] );
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+
+    if ( args == NULL )
+        rc = RC( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+        rc = ArgsProgram( args, &fullpath, &progname );
+
+    if ( rc != 0 )
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary( progname );
+
+    KOutMsg( "Options:\n" );
+    for ( idx = 1; idx < count; ++idx ) /* start with 1, do not advertize row-range-option*/
+        HelpOptionLine( ToolOptions[ idx ].aliases, ToolOptions[ idx ].name, NULL, ToolOptions[ idx ].help );
+    
+    HelpOptionsStandard();
+    HelpVersion( fullpath, KAppVersion() );
+    return rc;
+}
+
+/* -------------------------------------------------------------------------------------------- */
+
+typedef struct fd_ctx
+{
+    cmn_params cmn;
+    const char * lookup_filename;
+    const char * output_filename;
+    const char * index_filename;
+    const char * temp_path;
+    size_t buf_size, mem_limit;
+    uint64_t num_threads;
+} fd_ctx;
+
+
+static void init_sorter_params( const fd_ctx * fd_ctx, sorter_params * sp )
+{
+    sp->dir = fd_ctx->cmn.dir;
+    sp->acc = fd_ctx->cmn.acc;
+    sp->output_filename = fd_ctx->output_filename;
+    sp->index_filename = fd_ctx->index_filename;
+    sp->temp_path = fd_ctx->temp_path;
+    sp->src = NULL; /* sorter takes ownership! */
+    sp->prefix = 0;
+    sp->mem_limit = fd_ctx->mem_limit;
+    sp->buf_size = fd_ctx->buf_size;
+    sp->cursor_cache = fd_ctx->cmn.cursor_cache;
+    sp->sort_progress = NULL;
+    sp->num_threads = 0;
+    sp->show_progress = fd_ctx->cmn.show_progress;
+}
+
+/* --------------------------------------------------------------------------------------------
+    produce the lookup-table by iterating over the PRIMARY_ALIGNMENT - table:
+   -------------------------------------------------------------------------------------------- 
+    reading SEQ_SPOT_ID, SEQ_READ_ID and RAW_READ
+    SEQ_SPOT_ID and SEQ_READ_ID is merged into a 64-bit-key
+    RAW_READ is read as 4na-unpacked ( Schema does not provide 4na-packed for this column )
+    these key-pairs are temporarely stored in a KVector until a limit is reached
+    after that limit is reached they are writen sorted into the file-system as sub-files
+    this repeats until the requested row-range is exhausted ( row_range ... NULL -> all rows )
+    These sub-files are than merge-sorted into the final output-file.
+    This output-file is a binary data-file:
+    content: [KEY][RAW_READ]
+    KEY... 64-bit value as SEQ_SPOT_ID shifted left by 1 bit, zero-bit contains SEQ_READ_ID
+    RAW_READ... 16-bit binary-chunk-lenght, followed by n bytes of packed 4na
+-------------------------------------------------------------------------------------------- */
+static rc_t single_threaded_make_lookup( fd_ctx * fd_ctx )
+{
+    sorter_params sp;
+    struct raw_read_iter * iter;
+    
+    init_sorter_params( fd_ctx, &sp );
+    rc_t rc = make_raw_read_iter( &fd_ctx->cmn, &iter );
+    if ( rc == 0 )
+    {
+        sp.src = iter; /* sorter takes ownership! */
+        rc = run_sorter( &sp ); /* sorter.c */
+    }
+    return rc;
+}
+
+
+static rc_t multi_threaded_make_lookup( fd_ctx * fd_ctx )
+{
+    sorter_params sp;
+
+    init_sorter_params( fd_ctx, &sp );
+    sp.num_threads = fd_ctx->num_threads;
+    return run_sorter_pool( &sp ); /* sorter.c */
+}
+
+
+/* --------------------------------------------------------------------------------------------
+    produce special-output ( SPOT_ID,READ,SPOT_GROUP ) by iterating over the SEQUENCE - table:
+    produce fastq-output by iterating over the SEQUENCE - table:
+   -------------------------------------------------------------------------------------------- 
+   
+-------------------------------------------------------------------------------------------- */
+
+static rc_t perform_join( fd_ctx * fd_ctx, format_t fmt )
+{
+    rc_t rc = 0;
+    if ( !file_exists( fd_ctx->cmn.dir, "%s", fd_ctx->lookup_filename ) )
+    {
+        const char * temp = fd_ctx->output_filename;
+        
+        if ( fd_ctx->cmn.show_progress )
+            KOutMsg( "lookup :" );
+        
+        fd_ctx->output_filename = fd_ctx->lookup_filename;
+        if ( fd_ctx->num_threads > 1 )
+            rc = multi_threaded_make_lookup( fd_ctx );
+        else
+            rc = single_threaded_make_lookup( fd_ctx );
+
+        fd_ctx->output_filename = temp;
+    }
+    
+    if ( rc == 0 )
+    {
+        join_params jp;
+        
+        jp.dir              = fd_ctx->cmn.dir;
+        jp.accession        = fd_ctx->cmn.acc;
+        jp.lookup_filename  = fd_ctx->lookup_filename;
+        jp.index_filename   = fd_ctx->index_filename;
+        jp.output_filename  = fd_ctx->output_filename;
+        jp.temp_path        = fd_ctx->temp_path;
+        jp.join_progress    = NULL;
+        jp.buf_size         = fd_ctx->buf_size;
+        jp.cur_cache        = fd_ctx->cmn.cursor_cache;
+        jp.show_progress    = fd_ctx->cmn.show_progress;
+        jp.num_threads      = fd_ctx->num_threads;
+        jp.first            = 0;
+        jp.count            = 0;
+        jp.fmt              = fmt;
+        
+        rc = execute_join( &jp ); /* join.c */
+    }
+    return rc;
+}
+
+
+/* -------------------------------------------------------------------------------------------- */
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    rc_t rc;
+    Args * args;
+    uint32_t num_options = sizeof ToolOptions / sizeof ToolOptions [ 0 ];
+
+    rc = ArgsMakeAndHandle ( &args, argc, argv, 1, ToolOptions, num_options );
+    if ( rc != 0 )
+        ErrMsg( "ArgsMakeAndHandle() -> %R", rc );
+    if ( rc == 0 )
+    {
+        fd_ctx fd_ctx;
+        rc = ArgsParamValue( args, 0, (const void **)&fd_ctx.cmn.acc );
+        if ( rc != 0 )
+            ErrMsg( "ArgsParamValue() -> %R", rc );
+        else
+        {
+            const char * format = get_str_option( args, OPTION_FORMAT, NULL );
+            format_t fmt = get_format_t( format );
+            char dflt_lookup[ 4096 ];
+            char dflt_index[ 4096 ];
+            char dflt_output[ 4096 ];
+            
+            dflt_lookup[ 0 ] = 0;
+            dflt_index[ 0 ] = 0;
+            dflt_output[ 0 ] = 0;
+            
+            fd_ctx.cmn.row_range = get_str_option( args, OPTION_RANGE, NULL );
+            fd_ctx.cmn.cursor_cache = get_size_t_option( args, OPTION_CURCACHE, 5 * 1024 * 1024 );            
+            fd_ctx.cmn.show_progress = get_bool_option( args, OPTION_PROGRESS );
+            fd_ctx.cmn.count = 0;
+
+            fd_ctx.temp_path = get_str_option( args, OPTION_TEMP, NULL );
+            fd_ctx.output_filename = get_str_option( args, OPTION_OUTPUT, NULL );
+            fd_ctx.lookup_filename = get_str_option( args, OPTION_LOOKUP, NULL );            
+            fd_ctx.index_filename = get_str_option( args, OPTION_INDEX, NULL );
+            fd_ctx.buf_size = get_size_t_option( args, OPTION_BUFSIZE, 1024 * 1024 );
+            fd_ctx.mem_limit = get_size_t_option( args, OPTION_MEM, 1024L * 1024 * 100 );
+            fd_ctx.num_threads = get_uint64_t_option( args, OPTION_THREADS, 1 );
+
+            if ( fd_ctx.lookup_filename == NULL )
+            {
+                rc = make_prefixed( dflt_lookup, sizeof dflt_lookup, fd_ctx.temp_path,
+                                    fd_ctx.cmn.acc, ".lookup" );
+                if ( rc == 0 )
+                    fd_ctx.lookup_filename = dflt_lookup;
+            }
+
+            if ( fd_ctx.index_filename == NULL )
+            {
+                rc = make_prefixed( dflt_index, sizeof dflt_index, fd_ctx.temp_path,
+                                    fd_ctx.cmn.acc, ".lookup.idx" );
+                if ( rc == 0 )
+                    fd_ctx.index_filename = dflt_index;
+            }
+
+            if ( fd_ctx.output_filename == NULL )
+            {
+                rc = make_prefixed( dflt_output, sizeof dflt_output, NULL,
+                                    fd_ctx.cmn.acc, ".txt" );
+                if ( rc == 0 )
+                    fd_ctx.output_filename = dflt_output;
+            }
+
+            rc = KDirectoryNativeDir( &fd_ctx.cmn.dir );
+            if ( rc != 0 )
+                ErrMsg( "KDirectoryNativeDir() -> %R", rc );
+            else
+            {
+                rc = perform_join( &fd_ctx, fmt );
+
+                if ( dflt_lookup[ 0 ] != 0 )
+                    KDirectoryRemove( fd_ctx.cmn.dir, true, "%s", dflt_lookup );
+
+                if ( dflt_index[ 0 ] != 0 )
+                    KDirectoryRemove( fd_ctx.cmn.dir, true, "%s", dflt_index );
+                
+                KDirectoryRelease( fd_ctx.cmn.dir );
+            }
+        }
+    }
+    return rc;
+}
diff --git a/tools/fastdump/fastq_iter.c b/tools/fastdump/fastq_iter.c
new file mode 100644
index 0000000..1f1afc3
--- /dev/null
+++ b/tools/fastdump/fastq_iter.c
@@ -0,0 +1,97 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "fastq_iter.h"
+#include "helper.h"
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+typedef struct fastq_iter
+{
+    struct cmn_iter * cmn;
+    uint32_t prim_alig_id, cmp_read_id, quality_id;
+} fastq_iter;
+
+
+void destroy_fastq_iter( struct fastq_iter * iter )
+{
+    if ( iter != NULL )
+    {
+        destroy_cmn_iter( iter->cmn );
+        free( ( void * ) iter );
+    }
+}
+
+rc_t make_fastq_iter( cmn_params * params, struct fastq_iter ** iter )
+{
+    rc_t rc = 0;
+    fastq_iter * i = calloc( 1, sizeof * i );
+    if ( i == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        ErrMsg( "make_fastq_iter.calloc( %d ) -> %R", ( sizeof * i ), rc );
+    }
+    else
+    {
+        rc = make_cmn_iter( params, "SEQUENCE", &i->cmn );    
+        if ( rc == 0 )
+            rc = cmn_iter_add_column( i->cmn, "PRIMARY_ALIGNMENT_ID", &i->prim_alig_id );
+        if ( rc == 0 )
+            rc = cmn_iter_add_column( i->cmn, "CMP_READ", &i->cmp_read_id );
+        if ( rc == 0 )
+            rc = cmn_iter_add_column( i->cmn, "(INSDC:quality:text:phred_33)QUALITY", &i->quality_id );
+        if ( rc == 0 )
+            rc = cmn_iter_range( i->cmn, i->prim_alig_id );
+            
+        if ( rc != 0 )
+            destroy_fastq_iter( i );
+        else
+            *iter = i;
+    }
+    return rc;
+}
+
+bool get_from_fastq_iter( struct fastq_iter * iter, fastq_rec * rec, rc_t * rc )
+{
+    bool res = cmn_iter_next( iter->cmn, rc );
+    if ( res )
+    {
+        rec->row_id = cmn_iter_row_id( iter->cmn );
+        *rc = cmn_read_uint64_array( iter->cmn, iter->prim_alig_id, rec->prim_alig_id, 2, &rec->num_reads );
+        if ( *rc == 0 )
+            *rc = cmn_read_String( iter->cmn, iter->cmp_read_id, &rec->cmp_read );
+        if ( *rc == 0 )
+            *rc = cmn_read_String( iter->cmn, iter->quality_id, &rec->quality );
+    }
+    return res;
+
+}
+
+uint64_t get_row_count_of_fastq_iter( struct fastq_iter * iter )
+{
+    return cmn_iter_row_count( iter->cmn );
+}
diff --git a/tools/fastdump/fastq_iter.h b/tools/fastdump/fastq_iter.h
new file mode 100644
index 0000000..abc32a5
--- /dev/null
+++ b/tools/fastdump/fastq_iter.h
@@ -0,0 +1,69 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_fastq_iter_
+#define _h_fastq_iter_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_klib_text_
+#include <klib/text.h>
+#endif
+
+#ifndef _h_cmn_iter_
+#include "cmn_iter.h"
+#endif
+
+struct fastq_iter;
+
+typedef struct fastq_rec
+{
+    int64_t row_id;
+    uint64_t prim_alig_id[ 2 ];
+    uint32_t num_reads;
+    String cmp_read;
+    String quality;
+} fastq_rec;
+
+void destroy_fastq_iter( struct fastq_iter * iter );
+
+rc_t make_fastq_iter( cmn_params * params, struct fastq_iter ** iter );
+
+bool get_from_fastq_iter( struct fastq_iter * iter, fastq_rec * rec, rc_t * rc );
+
+uint64_t get_row_count_of_fastq_iter( struct fastq_iter * iter );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/fastdump/file_printer.c b/tools/fastdump/file_printer.c
new file mode 100644
index 0000000..1e79216
--- /dev/null
+++ b/tools/fastdump/file_printer.c
@@ -0,0 +1,130 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "file_printer.h"
+#include "helper.h"
+
+#include <kfs/file.h>
+#include <kfs/buffile.h>
+
+
+typedef struct file_printer
+{
+    struct KFile * f;
+    SBuffer print_buffer;
+    uint64_t file_pos;
+} file_printer;
+
+
+void destroy_file_printer( struct file_printer * printer )
+{
+    if ( printer != NULL )
+    {
+        if ( printer->f != NULL ) KFileRelease( printer->f );
+        release_SBuffer( &printer->print_buffer );
+        free( ( void * ) printer );
+    }
+}
+
+
+rc_t make_file_printer( KDirectory *dir, struct file_printer ** printer,
+        size_t file_buffer_size, size_t print_buffer_size, const char * fmt, ... )
+{
+    rc_t rc;
+    struct KFile * f;
+    
+    va_list args;
+    va_start ( args, fmt );
+
+    rc = KDirectoryVCreateFile( dir, &f, false, 0664, kcmInit, fmt, args );
+    if ( rc != 0 )
+        ErrMsg( "KDirectoryVCreateFile() -> %R", rc );
+    else
+    {
+        struct KFile * temp_file = f;
+        if ( file_buffer_size > 0 )
+        {
+            rc = KBufFileMakeWrite( &temp_file, f, false, file_buffer_size );
+            KFileRelease( f );
+            if ( rc != 0 )
+                ErrMsg( "KBufFileMakeWrite() -> %R", rc );
+        }
+        if ( rc == 0 )
+        {
+            file_printer * p = calloc( 1, sizeof * p );
+            if ( p == NULL )
+            {
+                KFileRelease( temp_file );
+                rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                ErrMsg( "calloc( %d ) -> %R", ( sizeof * p ), rc );
+            }
+            else
+            {
+                rc = make_SBuffer( &p->print_buffer, print_buffer_size );
+                if ( rc != 0 )
+                    KFileRelease( temp_file );
+                else
+                {
+                    p->f = temp_file;
+                    *printer = p;
+                }
+            }
+        }
+    }
+
+    va_end ( args );
+    return rc;
+
+}
+
+
+rc_t file_print( struct file_printer * printer, const char * fmt, ... )
+{
+    rc_t rc;
+    va_list args;
+    va_start ( args, fmt );
+
+    rc = print_to_SBufferV( &printer->print_buffer, fmt, args );
+    if ( rc == 0 )
+    {
+        size_t num_writ, to_write;
+        to_write = printer->print_buffer.S.size;
+        const char * src = printer->print_buffer.S.addr;
+        rc = KFileWriteAll( printer->f, printer->file_pos, src, to_write, &num_writ );
+        if ( rc != 0 )
+            ErrMsg( "KFileWriteAll( at %lu ) -> %R", printer->file_pos, rc );
+        else if ( num_writ != to_write )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcWriting, rcFormat, rcInvalid );
+            ErrMsg( "KFileWriteAll( at %lu ) ( %d vs %d ) -> %R", printer->file_pos, to_write, num_writ, rc );
+        }
+        else
+            printer->file_pos += num_writ;
+    }
+    
+    va_end ( args );
+    return rc;
+}
diff --git a/tools/fastdump/file_printer.h b/tools/fastdump/file_printer.h
new file mode 100644
index 0000000..83b8fd3
--- /dev/null
+++ b/tools/fastdump/file_printer.h
@@ -0,0 +1,56 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_file_printer_
+#define _h_file_printer_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_kfs_directory_
+#include <kfs/directory.h>
+#endif
+
+struct file_printer;
+
+void destroy_file_printer( struct file_printer * printer );
+
+rc_t make_file_printer( KDirectory *dir, struct file_printer ** printer,
+        size_t file_buffer_size, size_t print_buffer_size, const char * fmt, ... );
+
+rc_t file_print( struct file_printer * printer, const char * fmt, ... );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/fastdump/helper.c b/tools/fastdump/helper.c
new file mode 100644
index 0000000..a5fd6ac
--- /dev/null
+++ b/tools/fastdump/helper.c
@@ -0,0 +1,673 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "helper.h"
+#include <klib/log.h>
+#include <klib/printf.h>
+#include <klib/progressbar.h>
+#include <klib/time.h>
+#include <klib/out.h>
+#include <kfs/defs.h>
+#include <kfs/file.h>
+#include <kfs/buffile.h>
+#include <kproc/thread.h>
+
+rc_t ErrMsg( const char * fmt, ... )
+{
+    rc_t rc;
+    char buffer[ 4096 ];
+    size_t num_writ;
+
+    va_list list;
+    va_start( list, fmt );
+    rc = string_vprintf( buffer, sizeof buffer, &num_writ, fmt, list );
+    if ( rc == 0 )
+        /* rc = KOutMsg( "%s\n", buffer ); */
+        /* rc = pLogErr( klogErr, 1, "$(E)", "E=%s", buffer ); */
+        rc = pLogMsg( klogErr, "$(E)", "E=%s", buffer );
+    va_end( list );
+    return rc;
+} 
+
+rc_t CC ArgsOptionCount( const struct Args * self, const char * option_name, uint32_t * count );
+rc_t CC ArgsOptionValue( const struct Args * self, const char * option_name, uint32_t iteration, const void ** value );
+
+const char * get_str_option( const struct Args *args, const char *name, const char * dflt )
+{
+    const char* res = dflt;
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    if ( rc == 0 && count > 0 )
+    {
+        rc = ArgsOptionValue( args, name, 0, (const void**)&res );
+        if ( rc != 0 ) res = dflt;
+    }
+    return res;
+}
+
+bool get_bool_option( const struct Args *args, const char *name )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    return ( rc == 0 && count > 0 );
+}
+
+
+uint64_t get_uint64_t_option( const struct Args * args, const char *name, uint64_t dflt )
+{
+    uint64_t res = dflt;
+    const char * s = get_str_option( args, name, NULL );
+    if ( s != NULL )
+    {
+        size_t l = string_size( s );
+        if ( l > 0 )
+        {
+            char * endptr;
+            res = strtol( s, &endptr, 0 );
+        }
+    }
+    return res;
+
+}
+
+size_t get_size_t_option( const struct Args * args, const char *name, size_t dflt )
+{
+    size_t res = dflt;
+    const char * s = get_str_option( args, name, NULL );
+    if ( s != NULL )
+    {
+        size_t l = string_size( s );
+        if ( l > 0 )
+        {
+            size_t multipl = 1;
+            switch( s[ l - 1 ] )
+            {
+                case 'k' :
+                case 'K' : multipl = 1024; break;
+                case 'm' :
+                case 'M' : multipl = 1024 * 1024; break;
+                case 'g' :
+                case 'G' : multipl = 1024 * 1024 * 1024; break;
+            }
+            
+            if ( multipl > 1 )
+            {
+                char * src = string_dup( s, l - 1 );
+                if ( src != NULL )
+                {
+                    char * endptr;
+                    res = strtol( src, &endptr, 0 ) * multipl;
+                    free( src );
+                }
+            }
+            else
+            {
+                char * endptr;
+                res = strtol( s, &endptr, 0 );
+            }
+        }
+    }
+    return res;
+}
+
+
+rc_t make_SBuffer( SBuffer * buffer, size_t len )
+{
+    rc_t rc = 0;
+    String * S = &buffer->S;
+    S->addr = malloc( len );
+    if ( S->addr == NULL )
+    {
+        S->size = S->len = 0;
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        ErrMsg( "malloc( %d ) -> %R", ( len ), rc );
+    }
+    else
+    {
+        S->size = 0;
+        S->len = 0;
+        buffer->buffer_size = len;
+    }
+    return rc;
+}
+
+
+void release_SBuffer( SBuffer * buffer )
+{
+    if ( buffer != NULL )
+    {
+        String * S = &buffer->S;
+        if ( S->addr != NULL )
+            free( ( void * ) S->addr );
+    }
+}
+
+
+rc_t print_to_SBufferV( SBuffer * buffer, const char * fmt, va_list args )
+{
+    char * dst = ( char * )buffer->S.addr;
+    size_t num_writ = 0;
+    
+    rc_t rc = string_vprintf( dst, buffer->buffer_size, &num_writ, fmt, args );
+    if ( rc != 0 )
+        ErrMsg( "string_vprintf() -> %R", rc );
+    buffer->S.len = buffer->S.size = num_writ;
+    
+    return rc;
+}
+
+
+rc_t print_to_SBuffer( SBuffer * buffer, const char * fmt, ... )
+{
+    rc_t rc;
+    va_list args;
+
+    va_start( args, fmt );
+    rc = print_to_SBufferV( buffer, fmt, args );
+    va_end( args );
+
+    return rc;
+}
+
+
+rc_t add_column( const VCursor * cursor, const char * name, uint32_t * id )
+{
+    rc_t rc = VCursorAddColumn( cursor, id, name );
+    if ( rc != 0 )
+        ErrMsg( "VCursorAddColumn( '%s' ) -> %R", name, rc );
+    return rc;
+}
+
+
+rc_t make_row_iter( struct num_gen * ranges, int64_t first, uint64_t count, 
+                    const struct num_gen_iter ** iter )
+{
+    rc_t rc;
+    if ( num_gen_empty( ranges ) )
+    {
+        rc = num_gen_add( ranges, first, count );
+        if ( rc != 0 )
+            ErrMsg( "num_gen_add( %li, %ld ) -> %R", first, count, rc );
+    }
+    else
+    {
+        rc = num_gen_trim( ranges, first, count );
+        if ( rc != 0 )
+            ErrMsg( "num_gen_trim( %li, %ld ) -> %R", first, count, rc );
+    }
+    rc = num_gen_iterator_make( ranges, iter );
+    if ( rc != 0 )
+        ErrMsg( "num_gen_iterator_make() -> %R", rc );
+    return rc;
+}
+
+
+rc_t split_string( String * in, String * p0, String * p1, uint32_t ch )
+{
+    rc_t rc = 0;
+    char * ch_ptr = string_chr( in->addr, in->size, ch );
+    if ( ch_ptr == NULL )
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcTransfer, rcInvalid );
+    else
+    {
+        p0->addr = in->addr;
+        p0->len  = p0->size = ( ch_ptr - p0->addr );
+        p1->addr = ch_ptr + 1;
+        p1->len  = p1->size = in->len - ( p0->len + 1 );
+    }
+    return rc;
+}
+
+
+format_t get_format_t( const char * format )
+{
+    format_t res = ft_special;
+    if ( format != NULL && format[ 0 ] != 0 )
+    {
+        String Format, FastqFormat;
+        StringInitCString( &Format, format );
+        StringInitCString( &FastqFormat, "fastq" );
+        if ( 0 == StringCaseCompare ( &Format, &FastqFormat ) )
+            res = ft_fastq;
+    }
+    return res;
+}
+
+
+uint64_t make_key( int64_t seq_spot_id, uint32_t seq_read_id )
+{
+    uint64_t key = seq_spot_id;
+    key <<= 1;
+    key |= ( seq_read_id == 2 ) ? 1 : 0;
+    return key;
+}
+
+
+void pack_4na( const String * unpacked, SBuffer * packed )
+{
+    uint32_t i;
+    char * src = ( char * )unpacked->addr;
+    char * dst = ( char * )packed->S.addr;
+    uint16_t dna_len = ( unpacked->len & 0xFFFF );
+    uint32_t len = 0;
+    dst[ len++ ] = ( dna_len >> 8 );
+    dst[ len++ ] = ( dna_len & 0xFF );
+    for ( i = 0; i < unpacked->len; ++i )
+    {
+        if ( len < packed->buffer_size )
+        {
+            char base = ( src[ i ] & 0x0F );
+            if ( 0 == ( i & 0x01 ) )
+                dst[ len ] = ( base << 4 );
+            else
+                dst[ len++ ] |= base;
+        }
+    }
+    if ( unpacked->len & 0x01 )
+        len++;
+    packed->S.size = packed->S.len = len;
+}
+
+
+static char x4na_to_ASCII[ 16 ] =
+{
+    /* 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F */
+       'N', 'A', 'C', 'N', 'G', 'N', 'N', 'N', 'T', 'N', 'N', 'N', 'N', 'N', 'N', 'N'
+};
+
+
+void unpack_4na( const String * packed, SBuffer * unpacked )
+{
+    uint32_t i;
+    char * src = ( char * )packed->addr;
+    char * dst = ( char * )unpacked->S.addr;
+    uint32_t dst_idx = 0;
+    uint16_t dna_len = src[ 0 ];
+    dna_len <<= 8;
+    dna_len |= src[ 1 ];
+    for ( i = 2; i < packed->len; ++i )
+    {
+        uint8_t packed_byte = src[ i ];
+        if ( dst_idx < unpacked->buffer_size )
+            dst[ dst_idx++ ] = x4na_to_ASCII[ ( packed_byte >> 4 ) & 0x0F ];
+        if ( dst_idx < unpacked->buffer_size )
+            dst[ dst_idx++ ] = x4na_to_ASCII[ packed_byte & 0x0F ];
+    }
+    unpacked->S.len = unpacked->S.size = dna_len;
+    dst[ dna_len + 2 ] = 0;
+}
+
+
+uint64_t calc_percent( uint64_t max, uint64_t value, uint16_t digits )
+{
+    uint64_t res = value;
+    switch ( digits )
+    {
+        case 1 : res *= 1000; break;
+        case 2 : res *= 10000; break;
+        default : res *= 100; break;
+    }
+    if ( max > 0 ) res /= max;
+    return res;
+}
+
+
+bool file_exists( const KDirectory * dir, const char * fmt, ... )
+{
+    uint32_t pt;
+    va_list list;
+    
+    va_start( list, fmt );
+    pt = KDirectoryVPathType( dir, fmt, list );
+    va_end( list );
+
+    return ( pt == kptFile ) ;
+}
+
+
+void join_and_release_threads( Vector * threads )
+{
+    uint32_t i, n = VectorLength( threads );
+    for ( i = VectorStart( threads ); i < n; ++i )
+    {
+        KThread * thread = VectorGet( threads, i );
+        if ( thread != NULL )
+        {
+            KThreadWait( thread, NULL );
+            KThreadRelease( thread );
+        }
+    }
+}
+
+
+typedef struct cf_progress
+{
+    struct progressbar * progressbar;
+    uint64_t total_size;
+    uint64_t current_size;
+    uint32_t current_percent;
+} cf_progress;
+
+rc_t CC Quitting();
+
+static rc_t copy_file( KFile * dst, const KFile * src, uint64_t * dst_pos,
+                       size_t buf_size, cf_progress * cfp )
+{
+    rc_t rc = 0;
+    char * buffer = malloc( buf_size );
+    if ( buffer == NULL )
+    {
+        rc = RC( rcExe, rcFile, rcPacking, rcMemory, rcExhausted );
+        ErrMsg( "copy_file.malloc( %d ) -> %R", buf_size, rc );
+    }
+    else
+    {
+        uint64_t src_pos = 0;
+        size_t num_trans = 1;
+        while ( rc == 0 && num_trans > 0 )
+        {
+            rc = Quitting();
+            if ( rc == 0 )
+            {
+                size_t num_read;
+                rc = KFileRead( src, src_pos, buffer, buf_size, &num_read );
+                if ( rc != 0 )
+                    ErrMsg( "copy_file.KFileRead( at %lu ) -> %R", src_pos, rc );
+                else if ( num_read > 0 )
+                {
+                    rc = KFileWrite( dst, *dst_pos, buffer, num_read, &num_trans );
+                    if ( rc != 0 )
+                        ErrMsg( "copy_file.KFileWrite( at %lu ) -> %R", *dst_pos, rc );
+                    else
+                    {
+                        *dst_pos += num_trans;
+                        src_pos += num_trans;
+                        if ( cfp != NULL && cfp->progressbar != NULL )
+                        {
+                            uint32_t percent;
+                            
+                            cfp->current_size += num_trans;
+                            percent = calc_percent( cfp->total_size, cfp->current_size, 2 );
+                            if ( percent > cfp->current_percent )
+                            {
+                                uint32_t i;
+                                for ( i = cfp->current_percent + 1; i <= percent; ++i )
+                                    update_progressbar( cfp->progressbar, i );
+                                cfp->current_percent = percent;
+                            }
+                        }
+                    }
+                }
+                else
+                    num_trans = 0;
+            }
+        }
+        free( buffer );
+    }
+    return rc;
+}
+
+
+static rc_t total_filesize( const KDirectory * dir, const VNamelist * files, uint64_t *total )
+{
+    uint32_t count;
+    rc_t rc = VNameListCount( files, &count );
+    *total = 0;
+    if ( rc != 0 )
+        ErrMsg( "VNameListCount() -> %R", rc );
+    else
+    {
+        uint32_t idx;
+        for ( idx = 0; rc == 0 && idx < count; ++idx )
+        {
+            const char * filename;
+            rc = VNameListGet( files, idx, &filename );
+            if ( rc != 0 )
+                ErrMsg( "VNameListGet( #%d) -> %R", idx, rc );
+            else
+            {
+                uint64_t size;
+                rc_t rc1 = KDirectoryFileSize( dir, &size, "%s", filename );
+                if ( rc1 == 0 )
+                    *total += size;
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t concat_files( KDirectory * dir, const VNamelist * files, size_t buf_size,
+                   const char * output, bool show_progress )
+{
+    struct KFile * dst;
+    rc_t rc = KDirectoryCreateFile( dir, &dst, false, 0664, kcmInit, "%s", output );
+    if ( rc != 0 )
+        ErrMsg( "KDirectoryCreateFile( '%s' ) -> %R", output, rc );
+    else
+    {
+        struct KFile * temp_dst;
+        rc = KBufFileMakeWrite( &temp_dst, dst, false, buf_size );
+        KFileRelease( dst );
+        if ( rc != 0 )
+            ErrMsg( "KBufFileMakeWrite() -> %R", rc );
+        else
+        {
+            cf_progress cfp;
+            uint32_t count;
+
+            dst = temp_dst;
+            if ( show_progress )
+            {
+                cfp.current_size = 0;
+                cfp.current_percent = 0;
+                rc = make_progressbar( &cfp.progressbar, 2 );
+                if ( rc == 0 )
+                    rc = total_filesize( dir, files, &cfp.total_size );
+            }
+            else
+                cfp.progressbar = NULL;
+            if ( rc == 0 )
+            {
+                rc = VNameListCount( files, &count );
+                if ( rc != 0 )
+                    ErrMsg( "VNameListCount() -> %R", rc );
+                else
+                {
+                    uint32_t idx;
+                    uint64_t dst_pos = 0;
+                    for ( idx = 0; rc == 0 && idx < count; ++idx )
+                    {
+                        const char * filename;
+                        rc = VNameListGet( files, idx, &filename );
+                        if ( rc != 0 )
+                            ErrMsg( "VNameListGet( #%d) -> %R", idx, rc );
+                        else
+                        {
+                            const struct KFile * src;
+                            rc_t rc1 = KDirectoryOpenFileRead( dir, &src, "%s", filename );
+                            if ( rc1 == 0 )
+                            {
+                                const struct KFile * temp_src;
+                                rc = KBufFileMakeRead( &temp_src, src, buf_size );
+                                KFileRelease( src );
+                                if ( rc != 0 )
+                                    ErrMsg( "KBufFileMakeRead() -> %R", rc );
+                                else
+                                {
+                                    src = temp_src;
+                                    rc = copy_file( dst, src, &dst_pos, buf_size, &cfp );
+                                }
+                                KFileRelease( src );
+                            }
+                        }
+                    }
+                }
+                
+                if ( cfp.progressbar != NULL )
+                {
+                    destroy_progressbar( cfp.progressbar );
+                    KOutMsg( "\n" );
+                }
+            }
+        }
+        KFileRelease( dst );
+    }
+    return rc;
+}
+
+rc_t delete_files( KDirectory * dir, const VNamelist * files )
+{
+    uint32_t count;
+    rc_t rc = VNameListCount( files, &count );
+    if ( rc != 0 )
+        ErrMsg( "VNameListCount() -> %R", rc );
+    else
+    {
+        uint32_t idx;
+        for ( idx = 0; rc == 0 && idx < count; ++idx )
+        {
+            const char * filename;
+            rc = VNameListGet( files, idx, &filename );
+            if ( rc != 0 )
+                ErrMsg( "VNameListGet( #%d) -> %R", idx, rc );
+            else
+            {
+                rc = KDirectoryRemove( dir, true, "%s", filename );
+                if ( rc != 0 )
+                    ErrMsg( "KDirectoryRemove( '%s' ) -> %R", filename, rc );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t CC progress_thread_func( const KThread *self, void *data )
+{
+    multi_progress * sp = data;
+    struct progressbar * progressbar;
+    uint32_t curr = 0, percent = 0;
+    rc_t rc = make_progressbar( &progressbar, 2 );
+    
+    update_progressbar( progressbar, curr );
+    while ( atomic_read( &sp->progress_done ) == 0 )
+    {
+        percent = calc_percent( sp->row_count, atomic_read( &sp->progress_rows ), 2 );
+        if ( percent > curr )
+        {
+            uint32_t i;
+            for ( i = curr + 1; i <= percent; ++i )
+                update_progressbar( progressbar, i );
+            curr = percent;
+        }
+        KSleepMs( 100 );
+    }
+    
+    percent = calc_percent( sp->row_count, atomic_read( &sp->progress_rows ), 2 );
+    if ( percent > curr )
+    {
+        uint32_t i;
+        for ( i = curr + 1; i <= percent; ++i )
+            update_progressbar( progressbar, i );
+        curr = percent;
+    }
+
+    destroy_progressbar( progressbar );
+    KOutMsg( "\n" );
+    return rc;
+}
+
+
+void init_progress_data( multi_progress * progress_data, uint64_t row_count )
+{
+    atomic_set( &progress_data->progress_done, 0 );
+    atomic_set( &progress_data->progress_rows, 0 );
+    progress_data->row_count = row_count;
+}
+
+rc_t start_multi_progress( KThread **t, multi_progress * progress_data )
+{
+    rc_t rc = KThreadMake( t, progress_thread_func, progress_data );
+    if ( rc != 0 )
+        ErrMsg( "KThreadMake( progress_thread ) -> %R", rc );
+    return rc;
+}
+
+
+void join_multi_progress( KThread *t, multi_progress * progress_data )
+{
+    if ( t != NULL )
+    {
+        atomic_set( &progress_data->progress_done, 1 );
+        KThreadWait( t, NULL );
+        KThreadRelease( t );
+    }
+}
+
+
+rc_t make_prefixed( char * buffer, size_t bufsize, const char * prefix,
+                    const char * path, const char * postfix )
+{
+    rc_t rc;
+    size_t num_writ;
+    if ( prefix != NULL )
+    {
+        uint32_t l = string_measure( prefix, NULL );
+        if ( l == 0 )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+            ErrMsg( "make_prefixed.string_measure() = 0 -> %R", rc );
+        }
+        else
+        {
+            if ( postfix == NULL )
+            {
+                if ( prefix[ l-1 ] == '/' )
+                    rc = string_printf( buffer, bufsize, &num_writ, "%s%s",  prefix, path );
+                else
+                    rc = string_printf( buffer, bufsize, &num_writ, "%s/%s", prefix, path );
+            }
+            else
+            {
+                if ( prefix[ l-1 ] == '/' )
+                    rc = string_printf( buffer, bufsize, &num_writ, "%s%s%s",  prefix, path, postfix );
+                else
+                    rc = string_printf( buffer, bufsize, &num_writ, "%s/%s%s", prefix, path, postfix );
+            }
+        }
+    }
+    else
+    {
+        if ( postfix == NULL )
+            rc = string_printf( buffer, bufsize, &num_writ, "%s", path );
+        else
+            rc = string_printf( buffer, bufsize, &num_writ, "%s%s", path, postfix );
+    }
+    
+    if ( rc != 0 )
+        ErrMsg( "make_prefixed.string_printf() -> %R", rc );
+    return rc;
+}
diff --git a/tools/fastdump/helper.h b/tools/fastdump/helper.h
new file mode 100644
index 0000000..1341812
--- /dev/null
+++ b/tools/fastdump/helper.h
@@ -0,0 +1,141 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_helper_
+#define _h_helper_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_klib_text_
+#include <klib/text.h>
+#endif
+
+#ifndef _h_klib_num_gen_
+#include <klib/num-gen.h>
+#endif
+
+#ifndef _h_vdb_cursor_
+#include <vdb/cursor.h>
+#endif
+
+#ifndef _h_kfs_directory_
+#include <kfs/directory.h>
+#endif
+
+#ifndef _h_klib_vector_
+#include <klib/vector.h>
+#endif
+
+#ifndef _h_klib_namelist_
+#include <klib/namelist.h>
+#endif
+
+/* 
+    this is in interfaces/cc/XXX/YYY/atomic.h
+    XXX ... the compiler ( cc, gcc, icc, vc++ )
+    YYY ... the architecture ( fat86, i386, noarch, ppc32, x86_64 )
+ */
+#ifndef _h_atomic_
+#include <atomic.h>
+#endif
+
+#ifndef _h_kproc_thread_
+#include <kproc/thread.h>
+#endif
+
+typedef struct SBuffer
+{
+    String S;
+    size_t buffer_size;
+} SBuffer;
+
+
+typedef enum format_t { ft_special, ft_fastq } format_t;
+
+rc_t ErrMsg( const char * fmt, ... );
+
+rc_t make_SBuffer( SBuffer * buffer, size_t len );
+void release_SBuffer( SBuffer * buffer );
+rc_t print_to_SBufferV( SBuffer * buffer, const char * fmt, va_list args );
+rc_t print_to_SBuffer( SBuffer * buffer, const char * fmt, ... );
+
+rc_t add_column( const VCursor * cursor, const char * name, uint32_t * id );
+
+rc_t make_row_iter( struct num_gen * ranges, int64_t first, uint64_t count, 
+                    const struct num_gen_iter ** iter );
+
+rc_t split_string( String * in, String * p0, String * p1, uint32_t ch );
+
+format_t get_format_t( const char * format );
+
+struct Args;
+const char * get_str_option( const struct Args *args, const char *name, const char * dflt );
+bool get_bool_option( const struct Args *args, const char *name );
+size_t get_size_t_option( const struct Args * args, const char *name, size_t dflt );
+uint64_t get_uint64_t_option( const struct Args * args, const char *name, uint64_t dflt );
+
+uint64_t make_key( int64_t seq_spot_id, uint32_t seq_read_id );
+
+void pack_4na( const String * unpacked, SBuffer * packed );
+void unpack_4na( const String * packed, SBuffer * unpacked );
+
+uint64_t calc_percent( uint64_t max, uint64_t value, uint16_t digits );
+
+bool file_exists( const KDirectory * dir, const char * fmt, ... );
+
+void join_and_release_threads( Vector * threads );
+
+rc_t concat_files( KDirectory * dir, const VNamelist * files, size_t buf_size,
+                   const char * output, bool show_progress );
+
+rc_t delete_files( KDirectory * dir, const VNamelist * files );
+
+
+typedef struct multi_progress
+{
+    atomic_t progress_done;
+    atomic_t progress_rows;
+    uint64_t row_count;
+} multi_progress;
+
+void init_progress_data( multi_progress * progress_data, uint64_t row_count );
+rc_t start_multi_progress( KThread **t, multi_progress * progress_data );
+void join_multi_progress( KThread *t, multi_progress * progress_data );
+
+rc_t make_prefixed( char * buffer, size_t bufsize, const char * prefix,
+                    const char * path, const char * postfix );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/fastdump/index.c b/tools/fastdump/index.c
new file mode 100644
index 0000000..4036233
--- /dev/null
+++ b/tools/fastdump/index.c
@@ -0,0 +1,335 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include "index.h"
+#include "helper.h"
+
+#include <kfs/file.h>
+#include <kfs/buffile.h>
+
+typedef struct index_writer
+{
+    struct KFile * f;
+    uint64_t frequency, pos, last_key;
+} index_writer;
+
+
+void release_index_writer( struct index_writer * writer )
+{
+    if ( writer != NULL )
+    {
+        if ( writer->f != NULL ) KFileRelease( writer->f );
+        free( ( void * ) writer );
+    }
+}
+
+
+static rc_t write_value( index_writer * writer, uint64_t value )
+{
+    size_t num_writ;
+    rc_t rc = KFileWrite( writer->f, writer->pos, &value, sizeof value, &num_writ );
+    if ( rc != 0 )
+        ErrMsg( "write_value.KFileWriteAll( key ) -> %R", rc );
+    else if ( num_writ != sizeof value )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcWriting, rcFormat, rcInvalid );
+        ErrMsg( "write_value.KFileWriteAll( key ) -> %R", rc );
+    }
+    else
+        writer->pos += num_writ;
+    return rc;
+}
+
+
+static rc_t write_key_and_offset( index_writer * writer, uint64_t key, uint64_t offset )
+{
+    rc_t rc = write_value( writer, key );
+    if ( rc == 0 )
+        rc = write_value( writer, offset );
+    return rc;
+}
+
+
+rc_t write_key( struct index_writer * writer, uint64_t key, uint64_t offset )
+{
+    rc_t rc = 0;
+    if ( writer == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcReading, rcParam, rcInvalid );
+        ErrMsg( "write_index_valuer() -> %R", rc );
+    }
+    else
+    {
+        if ( key > ( writer->last_key + writer->frequency ) )
+        {
+            rc = write_key_and_offset( writer, key, offset );
+            if ( rc == 0 )
+                writer->last_key = key;
+        }
+    }
+    return rc;
+}
+
+
+rc_t make_index_writer( KDirectory * dir, struct index_writer ** writer,
+                        size_t buf_size, uint64_t frequency, const char * fmt, ... )
+{
+    rc_t rc;
+    struct KFile * f;
+    
+    va_list args;
+    va_start ( args, fmt );
+
+    rc = KDirectoryVCreateFile( dir, &f, false, 0664, kcmInit, fmt, args );
+    if ( rc != 0 )
+        ErrMsg( "KDirectoryVCreateFile() -> %R", rc );
+    else
+    {
+        struct KFile * temp_file;
+        rc = KBufFileMakeWrite( &temp_file, f, false, buf_size );
+        KFileRelease( f );
+        if ( rc != 0 )
+            ErrMsg( "KBufFileMakeWrite() -> %R", rc );
+        else
+        {
+            index_writer * w = calloc( 1, sizeof * w );
+            if ( w == NULL )
+            {
+                KFileRelease( temp_file );
+                rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                ErrMsg( "calloc( %d ) -> %R", ( sizeof * w ), rc );
+            }
+            else
+            {
+                w->f = temp_file;
+                w->frequency = frequency;
+                rc = write_value( w, frequency );
+                if ( rc == 0 )
+                    rc = write_key_and_offset( w, 1, 0 );
+                    
+                if ( rc == 0 )
+                    *writer = w;
+                else
+                    release_index_writer( w );
+            }
+        }
+    }
+    va_end ( args );
+   
+    return rc;
+}
+
+
+/* ----------------------------------------------------------------------- */
+
+typedef struct index_reader
+{
+    const struct KFile * f;
+    uint64_t frequency, file_size, max_key;
+} index_reader;
+
+
+void release_index_reader( struct index_reader * reader )
+{
+    if ( reader != NULL )
+    {
+        if ( reader->f != NULL ) KFileRelease( reader->f );
+        free( ( void * ) reader );
+    }
+}
+
+
+static rc_t read_value( struct index_reader * reader, uint64_t pos, uint64_t * value )
+{
+    size_t num_read;
+    rc_t rc = KFileRead( reader->f, pos, ( void *)value, sizeof *value, &num_read );
+    if ( rc != 0 )
+        ErrMsg( "read_value.KFileRead( at %ld ) -> %R", pos, rc );
+    else if ( num_read != sizeof *value )
+        rc = RC( rcVDB, rcNoTarg, rcReading, rcFormat, rcInvalid );
+    return rc;
+}
+
+
+rc_t make_index_reader( KDirectory * dir, struct index_reader ** reader,
+                        size_t buf_size, const char * fmt, ... )
+{
+    rc_t rc;
+    const struct KFile * f;
+    
+    va_list args;
+    va_start ( args, fmt );
+    
+    rc = KDirectoryVOpenFileRead( dir, &f, fmt, args );
+    if ( rc != 0 )
+        ErrMsg( "KDirectoryVOpenFileRead() -> %R", rc );
+    else
+    {
+        const struct KFile * temp_file;
+        rc = KBufFileMakeRead( &temp_file, f, buf_size );
+        KFileRelease( f );
+        if ( rc != 0 )
+        {
+            ErrMsg( "KBufFileMakeRead() -> %R", rc );
+        }
+        else
+        {
+            index_reader * r = calloc( 1, sizeof * r );
+            if ( r == NULL )
+            {
+                KFileRelease( temp_file );
+                rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                ErrMsg( "calloc( %d ) -> %R", ( sizeof * r ), rc );
+            }
+            else
+            {
+                r->f = temp_file;
+                rc = read_value( r, 0, &r->frequency );
+                if ( rc == 0 )
+                    rc = KFileSize( temp_file, &r->file_size );
+
+                if ( rc == 0 )
+                {
+                    get_max_key( r, &r->max_key );
+                    *reader = r;
+                }
+                else
+                    release_index_reader( r );
+            }
+        }
+    }
+    va_end ( args );
+    return rc;
+}
+
+
+static uint64_t key_to_pos_guess( const struct index_reader * reader, uint64_t key )
+{
+    uint64_t chunk_id = ( key / reader->frequency );
+    return ( ( sizeof reader->frequency ) + ( chunk_id * ( 2 * ( sizeof reader->frequency ) ) ) );
+}
+
+
+static rc_t read_3( const struct index_reader * reader, uint64_t pos, uint64_t * data, size_t to_read )
+{
+    size_t num_read;
+    rc_t rc = KFileRead( reader->f, pos, ( void *)data, to_read, &num_read );
+    if ( rc != 0 )
+        ErrMsg( "read_3.KFileRead( at %ld ) -> %R", pos, rc );
+    else if ( num_read != to_read )
+        rc = RC( rcVDB, rcNoTarg, rcReading, rcFormat, rcInvalid );
+    return rc;
+}
+
+
+rc_t get_nearest_offset( const struct index_reader * reader, uint64_t key_to_find,
+                   uint64_t * key_found, uint64_t * offset )
+{
+    rc_t rc = 0;
+    if ( reader == NULL || key_found == NULL || offset == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcReading, rcParam, rcInvalid );
+        ErrMsg( "get_nearest_offset() -> %R", rc );
+    }
+    else
+    {
+        uint64_t data[ 6 ];
+        /*
+            data[ 0 ] ... key0      data[ 1 ] ... offset0
+            data[ 2 ] ... key1      data[ 3 ] ... offset1
+            data[ 4 ] ... key2      data[ 5 ] ... offset2
+        */
+        uint64_t pos = key_to_pos_guess( reader, key_to_find );
+        bool found = false;
+        while ( rc == 0 && !found && pos < reader->file_size )
+        {        
+            rc = read_3( reader, pos, data, sizeof data );
+            if ( rc == 0 )
+            {
+                if ( key_to_find >= data[ 0 ] && key_to_find < data[ 2 ] )
+                {
+                    /* key_to_find is between key0 and key1 */
+                    found = true;
+                    *key_found = data[ 0 ];
+                    *offset = data[ 1 ];
+                }
+                else if ( key_to_find >= data[ 2 ] && key_to_find < data[ 4 ] )
+                {
+                    /* key_to_find is between key1 and key2 */
+                    found = true;
+                    *key_found = data[ 2 ];
+                    *offset = data[ 3 ];
+                }
+                if ( !found )
+                {
+                    if ( key_to_find < data[ 0 ] )
+                    {
+                        /* key_to_find is smaller than our guess */
+                        if ( pos > sizeof reader->frequency )
+                            pos -= ( 2 * ( sizeof reader->frequency ) );
+                        else
+                        {
+                            found = true;
+                            *key_found = data[ 0 ];
+                            *offset = data[ 1 ];
+                        }
+                    }
+                    else if ( key_to_find > data[ 4 ] )
+                    {
+                        /* key_to_find is bigger than our guess */
+                        pos += ( 2 * ( sizeof reader->frequency ) );
+                    }
+                }
+            }
+        }
+        if ( !found )
+            rc = SILENT_RC( rcVDB, rcNoTarg, rcReading, rcId, rcNotFound );
+    }
+    return rc;
+}
+
+
+rc_t get_max_key( const struct index_reader * reader, uint64_t * max_key )
+{
+    rc_t rc = 0;
+    if ( reader == NULL || max_key == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcReading, rcParam, rcInvalid );
+        ErrMsg( "get_nearest_offset() -> %R", rc );
+    }
+    else if ( reader->max_key > 0 )
+    {
+        *max_key = reader->max_key;
+    }
+    else
+    {
+        uint64_t data[ 6 ];
+        uint64_t pos = reader->file_size - ( sizeof data );
+        rc = read_3( reader, pos, data, sizeof data );
+        if ( rc == 0 )
+             *max_key = data[ 4 ];
+    }
+    return rc;
+}
\ No newline at end of file
diff --git a/tools/fastdump/index.h b/tools/fastdump/index.h
new file mode 100644
index 0000000..0a164fa
--- /dev/null
+++ b/tools/fastdump/index.h
@@ -0,0 +1,67 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_index_
+#define _h_index_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_klib_text_
+#include <klib/text.h>
+#endif
+
+#ifndef _h_kfs_directory_
+#include <kfs/directory.h>
+#endif
+
+struct index_writer;
+
+void release_index_writer( struct index_writer * writer );
+rc_t make_index_writer( KDirectory * dir, struct index_writer ** writer,
+                        size_t buf_size, uint64_t frequency, const char * fmt, ... );
+rc_t write_key( struct index_writer * writer, uint64_t key, uint64_t offset );
+
+struct index_reader;
+
+void release_index_reader( struct index_reader * reader );
+rc_t make_index_reader( KDirectory * dir, struct index_reader ** reader,
+                        size_t buf_size, const char * fmt, ... );
+rc_t get_nearest_offset( const struct index_reader * reader, uint64_t key_to_find,
+                   uint64_t * key_found, uint64_t * offset );
+
+rc_t get_max_key( const struct index_reader * reader, uint64_t * max_key );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/fastdump/join.c b/tools/fastdump/join.c
new file mode 100644
index 0000000..3636a47
--- /dev/null
+++ b/tools/fastdump/join.c
@@ -0,0 +1,670 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "join.h"
+#include "lookup_reader.h"
+#include "index.h"
+#include "file_printer.h"
+#include "special_iter.h"
+#include "fastq_iter.h"
+#include "helper.h"
+
+#include <klib/out.h>
+#include <klib/printf.h>
+#include <klib/text.h>
+#include <kproc/thread.h>
+
+#include <stdio.h>
+
+typedef struct join
+{
+    struct lookup_reader * lookup;
+    struct file_printer * printer;
+    SBuffer B1, B2;
+} join;
+
+
+static void release_join_ctx( join * j )
+{
+    if ( j != NULL )
+    {
+        release_lookup_reader( j->lookup );
+        destroy_file_printer( j->printer );
+        release_SBuffer( &j->B1 );
+        release_SBuffer( &j->B2 );
+    }
+}
+
+
+static rc_t init_join( const join_params * jp, struct join *j, struct index_reader * index )
+{
+    rc_t rc;
+    
+    j->lookup = NULL;
+    j->printer = NULL;
+    j->B1.S.addr = NULL;
+    j->B2.S.addr = NULL;
+    
+    rc = make_lookup_reader( jp->dir, index, &j->lookup, jp->buf_size, "%s", jp->lookup_filename );
+    if ( rc == 0 )
+    {
+        if ( jp->output_filename != NULL )
+            rc = make_file_printer( jp->dir, &j->printer, jp->buf_size, 4096 * 4, "%s", jp->output_filename );
+        if ( rc != 0 )
+            ErrMsg( "init_join().make_file_printer() -> %R", rc );
+    }
+    else
+        ErrMsg( "init_join().make_lookup_reader() -> %R", rc );
+    if ( rc == 0 )
+    {
+        rc = make_SBuffer( &j->B1, 4096 );
+        if ( rc != 0 )
+            ErrMsg( "init_join().make_SBuffer( B1 ) -> %R", rc );
+    }
+    if ( rc == 0 )
+    {
+        rc = make_SBuffer( &j->B2, 4096 );
+        if ( rc != 0 )
+            ErrMsg( "init_join().make_SBuffer( B2 ) -> %R", rc );
+    }
+
+    /* the rc-code of seek_lookup_reader is not checked, because if the row-id to be seeked to is in
+       the range of the fully unaligned data - seek will fail, because the are no alignments = lookup-records
+       in this area !*/
+    if ( rc == 0 && jp->first > 1 )
+    {
+        uint64_t key_to_find = jp->first << 1;
+        uint64_t key_found = 0;
+        rc_t rc1 = seek_lookup_reader( j->lookup, key_to_find, &key_found, true );
+        if ( GetRCState( rc1 ) != rcTooBig && GetRCState( rc1 ) != rcNotFound )
+            rc = rc1;
+        if ( rc != 0 )
+            ErrMsg( "init_join().seek_lookup_reader( %lu ) -> %R", key_to_find, rc );
+    }
+    if ( rc != 0 )
+        release_join_ctx( j );
+    return rc;
+}
+
+
+static void copy_join_params( join_params * dst, const join_params * src )
+{
+    dst->dir                = src->dir;
+    dst->accession          = src->accession;
+    dst->lookup_filename    = src->lookup_filename;
+    dst->index_filename     = src->index_filename;
+    dst->output_filename    = src->output_filename;
+    dst->temp_path          = src->temp_path;
+    dst->join_progress      = src->join_progress;
+    dst->buf_size           = src->buf_size;
+    dst->cur_cache          = src->cur_cache;
+    dst->num_threads        = src->num_threads;
+    dst->first              = src->first;
+    dst->count              = src->count;
+    dst->show_progress      = src->show_progress;
+    dst->fmt                = src->fmt;
+}
+
+static void init_cmn_params( const join_params * jp, cmn_params * cmn )
+{
+    cmn->dir            = jp->dir;
+    cmn->acc            = jp->accession;
+    cmn->row_range      = NULL;
+    cmn->first          = jp->first;
+    cmn->count          = jp->count;
+    cmn->cursor_cache   = jp->cur_cache;
+    cmn->show_progress  = jp->show_progress;
+}
+
+
+static rc_t print_special_1_read( special_rec * rec, join * j )
+{
+    rc_t rc = 0;
+    int64_t row_id = rec->row_id;
+    
+    if ( rec->prim_alig_id[ 0 ] == 0 )
+    {
+        /* read is unaligned, print what is in row->cmp_read ( !!! no lookup !!! ) */
+        if ( j->printer != NULL )
+            rc = file_print( j->printer, "%ld\t%S\t%S\n", row_id, &rec->cmp_read, &rec->spot_group );
+        else
+            rc = KOutMsg( "%ld\t%S\t%S\n", row_id, &rec->cmp_read, &rec->spot_group );
+    }
+    else
+    {
+        /* read is aligned ( 1 lookup ) */
+        rc = lookup_bases( j->lookup, row_id, 1, &j->B1 );
+        if ( rc == 0 )
+        {
+            if ( j->printer != NULL )
+                rc = file_print( j->printer, "%ld\t%S\t%S\n", row_id, &j->B1.S, &rec->spot_group );
+            else
+                rc = KOutMsg( "%ld\t%S\t%S\n", row_id, &j->B1.S, &rec->spot_group );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t print_special_2_reads( special_rec * rec, join * j )
+{
+    rc_t rc = 0;
+    int64_t row_id = rec->row_id;
+    
+    if ( rec->prim_alig_id[ 0 ] == 0 )
+    {
+        if ( rec->prim_alig_id[ 1 ] == 0 )
+        {
+            /* both unaligned, print what is in row->cmp_read ( !!! no lookup !!! )*/
+            if ( j->printer != NULL )
+                rc = file_print( j->printer, "%ld\t%S\t%S\n", row_id, &rec->cmp_read, &rec->spot_group );
+            else
+                rc = KOutMsg( "%ld\t%S\t%S\n", row_id, &rec->cmp_read, &rec->spot_group );
+        }
+        else
+        {
+            /* A0 is unaligned / A1 is aligned (lookup) */
+            rc = lookup_bases( j->lookup, row_id, 2, &j->B2 );
+            if ( rc == 0 )
+            {
+                if ( j->printer != NULL )
+                    rc = file_print( j->printer, "%ld\t%S%S\t%S\n", row_id, &rec->cmp_read, &j->B2.S, &rec->spot_group );
+                else
+                    rc = KOutMsg( "%ld\t%S%S\t%S\n", row_id, &rec->cmp_read, &j->B2.S, &rec->spot_group );
+            }
+        }
+    }
+    else
+    {
+        if ( rec->prim_alig_id[ 1 ] == 0 )
+        {
+            /* A0 is aligned (lookup) / A1 is unaligned */
+            rc = lookup_bases( j->lookup, row_id, 1, &j->B1 );
+            if ( rc == 0 )
+            {
+                if ( j->printer != NULL )
+                    rc = file_print( j->printer, "%ld\t%S%S\t%S\n", row_id, &j->B1.S, &rec->cmp_read, &rec->spot_group );
+                else
+                    rc = KOutMsg( "%ld\t%S%S\t%S\n", row_id, &j->B1.S, &rec->cmp_read, &rec->spot_group );
+            }
+        }
+        else
+        {
+            /* A0 and A1 are aligned (2 lookups)*/
+            rc = lookup_bases( j->lookup, row_id, 1, &j->B1 );
+            if ( rc == 0 )
+                rc = lookup_bases( j->lookup, row_id, 2, &j->B2 );
+            if ( rc == 0 )
+            {
+                if ( j->printer != NULL )
+                    rc = file_print( j->printer, "%ld\t%S%S\t%S\n", row_id, &j->B1.S, &j->B2.S, &rec->spot_group );
+                else
+                    rc = KOutMsg( "%ld\t%S%S\t%S\n", row_id, &j->B1.S, &j->B2.S, &rec->spot_group );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t print_fastq_1_read( fastq_rec * rec, join * j, const char * acc )
+{
+    rc_t rc = 0;
+    int64_t row_id = rec->row_id;
+    
+    if ( rec->prim_alig_id[ 0 ] == 0 )
+    {
+        /* read is unaligned, print what is in row->cmp_read (no lookup)*/
+        const char * fmt = "@%s.%ld %ld length=%d\n%S\n+%s.%ld %ld length=%d\n%S\n";
+        if ( j->printer != NULL )
+            rc = file_print( j->printer, fmt,
+                acc, row_id, row_id, rec->cmp_read.len, &rec->cmp_read,
+                acc, row_id, row_id, rec->quality.len, &rec->quality );
+        else
+            rc = KOutMsg( fmt,
+                acc, row_id, row_id, rec->cmp_read.len, &rec->cmp_read,
+                acc, row_id, row_id, rec->quality.len, &rec->quality );
+    }
+    else
+    {
+        /* read is aligned, ( 1 lookup ) */    
+        rc = lookup_bases( j->lookup, row_id, 1, &j->B1 );
+        if ( rc == 0 )
+        {
+            const char * fmt = "@%s.%ld %ld length=%d\n%S\n+%s.%ld %ld length=%d\n%S\n";
+            if ( j->printer != NULL )
+                rc = file_print( j->printer, fmt,
+                    acc, row_id, row_id, j->B1.S.len, &j->B1.S,
+                    acc, row_id, row_id, rec->quality.len, &rec->quality );
+            else
+                rc = KOutMsg( fmt,
+                    acc, row_id, row_id, j->B1.S.len, &j->B1.S,
+                    acc, row_id, row_id, rec->quality.len, &rec->quality );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t print_fastq_2_reads( fastq_rec * rec, join * j, const char * acc )
+{
+    rc_t rc = 0;
+    int64_t row_id = rec->row_id;
+    
+    if ( rec->prim_alig_id[ 0 ] == 0 )
+    {
+        if ( rec->prim_alig_id[ 1 ] == 0 )
+        {
+            /* both unaligned, print what is in row->cmp_read (no lookup)*/
+            const char * fmt = "@%s.%ld %ld length=%d\n%S\n+%s.%ld %ld length=%d\n%S\n";
+            if ( j->printer != NULL )
+                rc = file_print( j->printer, fmt,
+                    acc, row_id, row_id, rec->cmp_read.len, &rec->cmp_read,
+                    acc, row_id, row_id, rec->quality.len, &rec->quality );
+            else
+                rc = KOutMsg( fmt,
+                    acc, row_id, row_id, rec->cmp_read.len, &rec->cmp_read,
+                    acc, row_id, row_id, rec->quality.len, &rec->quality );
+                
+        }
+        else
+        {
+            /* A0 is unaligned / A1 is aligned (lookup) */
+            rc = lookup_bases( j->lookup, row_id, 2, &j->B2 );
+            if ( rc == 0 )
+            {
+                const char * fmt = "@%s.%ld %ld length=%d\n%S%S\n+%s.%ld %ld length=%d\n%S\n";
+                if ( j->printer != NULL )
+                    rc = file_print( j->printer, fmt,
+                        acc, row_id, row_id, rec->cmp_read.len + j->B2.S.len, &rec->cmp_read, &j->B2.S,
+                        acc, row_id, row_id, rec->quality.len, &rec->quality );
+                else
+                    rc = KOutMsg( fmt,
+                        acc, row_id, row_id, rec->cmp_read.len + j->B2.S.len, &rec->cmp_read, &j->B2.S,
+                        acc, row_id, row_id, rec->quality.len, &rec->quality );
+            }
+        }
+    }
+    else
+    {
+        if ( rec->prim_alig_id[ 1 ] == 0 )
+        {
+            /* A0 is aligned (lookup) / A1 is unaligned */
+            rc = lookup_bases( j->lookup, row_id, 1, &j->B1 );
+            if ( rc == 0 )
+            {
+                const char * fmt = "@%s.%ld %ld length=%d\n%S%S\n+%s.%ld %ld length=%d\n%S\n";
+                if ( j->printer != NULL )
+                    rc = file_print( j->printer, fmt,
+                        acc, row_id, row_id, rec->cmp_read.len + j->B1.S.len, &j->B1.S, &rec->cmp_read,
+                        acc, row_id, row_id, rec->quality.len, &rec->quality );
+                else
+                    rc = KOutMsg( fmt,
+                        acc, row_id, row_id, rec->cmp_read.len + j->B1.S.len, &j->B1.S, &rec->cmp_read,
+                        acc, row_id, row_id, rec->quality.len, &rec->quality );
+            }
+        }
+        else
+        {
+            /* A0 and A1 are aligned (2 lookups)*/
+            rc = lookup_bases( j->lookup, row_id, 1, &j->B1 );
+            if ( rc == 0 )
+                rc = lookup_bases( j->lookup, row_id, 2, &j->B2 );
+            if ( rc == 0 )
+            {
+                const char * fmt = "@%s.%ld %ld length=%d\n%S%S\n+%s.%ld %ld length=%d\n%S\n";
+                if ( j->printer != NULL )
+                    rc = file_print( j->printer, fmt,
+                        acc, row_id, row_id, j->B1.S.len + j->B2.S.len, &j->B1.S, &j->B2.S,
+                        acc, row_id, row_id, rec->quality.len, &rec->quality );
+                else
+                    rc = KOutMsg( fmt,
+                        acc, row_id, row_id, j->B1.S.len + j->B2.S.len, &j->B1.S, &j->B2.S,
+                        acc, row_id, row_id, rec->quality.len, &rec->quality );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t extract_row_count_cmn( const join_params * jp, uint64_t * row_count )
+{
+    rc_t rc = 0;
+    cmn_params cmn;
+    
+    init_cmn_params( jp, &cmn ); /* above */
+    switch( jp->fmt )
+    {
+        case ft_special : {
+                                struct special_iter * iter;
+                                rc = make_special_iter( &cmn, &iter ); /* special_iter.c */
+                                if ( rc == 0 )
+                                {
+                                    *row_count = get_row_count_of_special_iter( iter );
+                                    destroy_special_iter( iter );
+                                }
+                           } break;
+                           
+        case ft_fastq   : {
+                                struct fastq_iter * iter;
+                                rc = make_fastq_iter( &cmn, &iter ); /* fastq_iter.c */
+                                if ( rc == 0 )
+                                {
+                                    *row_count = get_row_count_of_fastq_iter( iter );
+                                    destroy_fastq_iter( iter );
+                                }
+                           } break;
+                           
+        default : break;
+    }
+    return rc;
+}
+
+rc_t CC Quitting();
+
+static rc_t perform_special_join( const join_params * jp, struct index_reader * index )
+{
+    rc_t rc;
+    struct special_iter * iter;
+    cmn_params cmn;
+
+    init_cmn_params( jp, &cmn ); /* above */
+    rc = make_special_iter( &cmn, &iter );
+    if ( rc == 0 )
+    {
+        join j;
+        rc = init_join( jp, &j, index );
+        if ( rc == 0 )
+        {
+            special_rec rec;
+            while ( get_from_special_iter( iter, &rec, &rc ) && rc == 0 )
+            {
+                rc = Quitting();
+                if ( rc == 0 )
+                {
+                    if ( rec.num_reads == 1 )
+                        rc = print_special_1_read( &rec, &j );
+                    else
+                        rc = print_special_2_reads( &rec, &j );
+
+                    if ( jp->join_progress != NULL )
+                        atomic_inc( jp->join_progress );
+                }
+            }
+            release_join_ctx( &j );
+        }
+        else
+            ErrMsg( "init_join() -> %R", rc );
+        destroy_special_iter( iter );
+    }
+    else
+        ErrMsg( "make_special_iter() -> %R", rc );
+    return rc;
+}
+
+
+static rc_t perform_fastq_join( const join_params * jp, struct index_reader * index )
+{
+    rc_t rc;
+    struct fastq_iter * iter;
+    cmn_params cmn;
+
+    init_cmn_params( jp, &cmn ); /* above */
+    rc = make_fastq_iter( &cmn, &iter );
+    if ( rc == 0 )
+    {
+        join j;
+        
+        rc = init_join( jp, &j, index );
+        if ( rc == 0 )
+        {
+            fastq_rec rec;
+            uint64_t n = 0;
+            
+            while ( get_from_fastq_iter( iter, &rec, &rc ) && rc == 0 )
+            {
+                rc = Quitting();
+                if ( rc == 0 )
+                {
+                    if ( rec.num_reads == 1 )
+                        rc = print_fastq_1_read( &rec, &j, jp->accession );
+                    else
+                        rc = print_fastq_2_reads( &rec, &j, jp->accession );
+
+                    if ( jp->join_progress != NULL )
+                        atomic_inc( jp->join_progress );
+                    n++;
+                }
+            }
+            release_join_ctx( &j );
+        }
+        else
+            ErrMsg( "init_join() -> %R", rc );
+        destroy_fastq_iter( iter );
+    }
+    else
+        ErrMsg( "make_fastq_iter() -> %R", rc );
+    return rc;
+}
+
+
+
+/* ------------------------------------------------------------------------------------------ */
+
+typedef struct join_thread_data
+{
+    const join_params * jp;
+    int64_t first;
+    uint64_t count;
+    uint32_t idx;
+} join_thread_data;
+
+
+static const char * leaf_of( const char * src )
+{
+    const char * last_slash = string_rchr( src, string_size ( src ), '/' );
+    if ( last_slash != NULL )
+        return last_slash + 1;
+    return src;
+}
+
+static rc_t make_part_filename( const join_params * jp, char * buffer, size_t bufsize, uint32_t id )
+{
+    rc_t rc;
+    size_t num_writ;
+    if ( jp->temp_path != NULL )
+    {
+        uint32_t l = string_measure( jp->temp_path, NULL );
+        if ( l == 0 )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+            ErrMsg( "make_part_filename.string_measure() = 0 -> %R", rc );
+        }
+        else
+        {
+            const char * output_file_leaf = leaf_of( jp->output_filename ); /* above */
+            
+            if ( jp->temp_path[ l-1 ] == '/' )
+                rc = string_printf( buffer, bufsize, &num_writ, "%s%s.%d",
+                        jp->temp_path, output_file_leaf, id );
+            else
+                rc = string_printf( buffer, bufsize, &num_writ, "%s/%s.%d",
+                        jp->temp_path, output_file_leaf, id );
+        }
+    }
+    else
+        rc = string_printf( buffer, bufsize, &num_writ, "%s.%d", jp->output_filename, id );
+        
+    if ( rc != 0 )
+        ErrMsg( "make_part_filename.string_printf() -> %R", rc );
+    return rc;
+}
+
+
+static rc_t concat_part_files( const join_params * jp, uint32_t count )
+{
+    struct VNamelist * files;
+    rc_t rc = VNamelistMake( &files, count );
+    if ( rc == 0 )
+    {
+        uint32_t idx;
+        for ( idx = 0; rc == 0 && idx < count; ++idx )
+        {
+            char part_file[ 4096 ];
+            rc = make_part_filename( jp, part_file, sizeof part_file, idx ); /* above */
+            if ( rc == 0 )
+                rc = VNamelistAppend( files, part_file );
+        }
+        if ( rc == 0 )
+            rc = concat_files( jp->dir, files, jp->buf_size, jp->output_filename, jp->show_progress ); /* helper.c */
+        if ( rc == 0 )
+            rc = delete_files( jp->dir, files );
+        VNamelistRelease( files );
+    }
+    return rc;
+}
+
+/* ------------------------------------------------------------------------------------------ */
+
+static rc_t CC cmn_thread_func( const KThread *self, void *data )
+{
+    rc_t rc = 0;
+    join_thread_data * jtd = data;
+    const join_params * jp = jtd->jp;
+    struct index_reader * index = NULL;
+    
+    if ( jp->index_filename != NULL )
+    {
+        if ( file_exists( jp->dir, "%s", jp->index_filename ) )
+            rc = make_index_reader( jp->dir, &index, jp->buf_size, "%s", jp->index_filename ); /* index.c */
+    }
+
+    if ( rc == 0 && index != NULL )
+    {
+        char part_file[ 4096 ];
+        rc = make_part_filename( jp, part_file, sizeof part_file, jtd->idx ); /* above */
+        if ( rc == 0 )
+        {
+            join_params cjp;
+
+            copy_join_params( &cjp, jp );
+            cjp.num_threads = 0;
+            cjp.first = jtd->first;
+            cjp.count = jtd->count;
+            cjp.output_filename = part_file;
+            cjp.show_progress = false;
+            
+            switch( jp->fmt )
+            {
+                case ft_special : rc = perform_special_join( &cjp, index ); break; /* above */
+                case ft_fastq   : rc = perform_fastq_join( &cjp, index ); break; /* above */
+                default : break;
+                
+            }
+        }
+        release_index_reader( index ); /* index.c */    
+    }
+    
+    free( ( void * ) data );
+    return rc;
+}
+
+
+rc_t execute_join( const join_params * jp )
+{
+    rc_t rc = 0;
+    
+    if ( jp->show_progress )
+        KOutMsg( "join   :" );
+
+    if ( jp->num_threads < 2 )
+    {
+        /* on the main thread */
+        switch( jp->fmt )
+        {
+            case ft_special : rc = perform_special_join( jp, NULL ); break; /* above */
+            case ft_fastq   : rc = perform_fastq_join( jp, NULL ); break; /* above */
+            default : break;
+        }
+    }
+    else
+    {
+        uint64_t row_count = 0;
+        rc = extract_row_count_cmn( jp, &row_count ); /* above */
+        if ( rc == 0 && row_count > 0 )
+        {
+            Vector threads;
+            int64_t first = 1;
+            uint64_t i, per_thread = ( row_count / jp->num_threads ) + 1;
+            KThread * progress_thread = NULL;
+            multi_progress progress;
+
+            init_progress_data( &progress, row_count ); /* helper.c */
+            VectorInit( &threads, 0, jp->num_threads );
+            
+            if ( jp->show_progress )
+            {
+                join_params * nc_jp = ( join_params * )jp;
+                nc_jp->join_progress = &progress.progress_rows;
+                rc = start_multi_progress( &progress_thread, &progress ); /* helper.c */
+            }
+            for ( i = 0; rc == 0 && i < jp->num_threads; ++i )
+            {
+                join_thread_data * jtd = calloc( 1, sizeof * jtd );
+                if ( jtd != NULL )
+                {
+                    KThread * thread;
+                    
+                    jtd->jp = jp;
+                    jtd->first = first;
+                    jtd->count = per_thread;
+                    jtd->idx = i;
+
+                    rc = KThreadMake( &thread, cmn_thread_func, jtd );
+                    if ( rc != 0 )
+                        ErrMsg( "KThreadMake( fastq/special #%d ) -> %R", i, rc );
+                    else
+                    {
+                        rc = VectorAppend( &threads, NULL, thread );
+                        if ( rc != 0 )
+                            ErrMsg( "VectorAppend( sort-thread #%d ) -> %R", i, rc );
+                    }
+                    first += per_thread;
+                }
+            }
+            
+            join_and_release_threads( &threads ); /* helper.c */
+            join_multi_progress( progress_thread, &progress ); /* helper.c */
+            
+            if ( jp->show_progress )
+                KOutMsg( "concat :" );
+            
+            rc = concat_part_files( jp, jp->num_threads ); /* above */
+        }
+    }
+    return rc;
+}
diff --git a/tools/fastdump/join.h b/tools/fastdump/join.h
new file mode 100644
index 0000000..83cd4a0
--- /dev/null
+++ b/tools/fastdump/join.h
@@ -0,0 +1,76 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_join_
+#define _h_join_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_klib_text_
+#include <klib/text.h>
+#endif
+
+#ifndef _h_kfs_directory_
+#include <kfs/directory.h>
+#endif
+
+#ifndef _h_atomic_
+#include <atomic.h>
+#endif
+
+#ifndef _h_helper_
+#include "helper.h"
+#endif
+
+typedef struct join_params
+{
+    KDirectory * dir;
+    const char * accession;
+    const char * lookup_filename;
+    const char * index_filename;
+    const char * output_filename;
+    const char * temp_path;
+    atomic_t   * join_progress;
+    size_t buf_size, cur_cache, num_threads;
+    int64_t first;
+    uint64_t count;
+    bool show_progress;
+    format_t fmt;
+} join_params;
+
+rc_t execute_join( const join_params * jp );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/fastdump/line_iter.c b/tools/fastdump/line_iter.c
new file mode 100644
index 0000000..0ccd234
--- /dev/null
+++ b/tools/fastdump/line_iter.c
@@ -0,0 +1,199 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "line_iter.h"
+#include "helper.h"
+
+#include <kfs/file.h>
+
+#define ITER_DONE 0x01
+#define ITER_EOF  0x02
+
+typedef struct line_iter
+{
+    const struct KFile * f;
+    String buffer, content, line;
+    uint64_t pos_in_file;
+    uint32_t state;
+} line_iter;
+
+
+void release_line_iter( struct line_iter * iter )
+{
+    if ( iter != NULL )
+    {
+        if ( iter->f != NULL )
+            KFileRelease( iter->f );
+        if ( iter->buffer.addr != NULL )
+            free( ( void * ) iter->buffer.addr );
+        free( ( void * ) iter );
+    }
+}
+
+
+static void read_line_iter( struct line_iter * iter )
+{
+    if ( iter->content.size > 0 )
+        memmove( (void *)iter->buffer.addr, iter->content.addr, iter->content.size );
+    iter->content.addr = iter->buffer.addr;
+    {
+        char * dst = ( char * )iter->buffer.addr + iter->content.size;
+        size_t num_read;
+        size_t to_read = ( ( iter->buffer.size - 1 ) - iter->content.size );
+        rc_t rc = KFileRead ( iter->f, iter->pos_in_file, dst, iter->buffer.size - iter->content.size, &num_read );
+        if ( rc == 0 )
+        {
+            iter->pos_in_file += num_read;
+            iter->content.size += num_read;
+            if ( num_read < to_read )
+                iter->state |= ITER_EOF;
+        }
+        else
+            iter->state |= ITER_EOF;
+    }
+}
+
+
+static bool slice_iter_content( struct line_iter * iter, size_t by )
+{
+    size_t l;                
+    iter->line.addr = iter->content.addr;
+    iter->line.len  = by;
+    iter->line.size = by;
+    l = ( by + 1 );
+    iter->content.addr += l;
+    if ( l < iter->content.size )
+        iter->content.size -= l;
+    else
+        iter->content.size = 0;
+    return true;
+}
+
+
+bool advance_line_iter( struct line_iter * iter )
+{
+    bool res = ( 0 == ( iter->state & ITER_DONE ) );
+    if ( res )
+    {
+        if ( iter->content.size == 0 )
+            read_line_iter( iter );
+
+        if ( iter->content.size == 0 && ( iter->state & ITER_EOF ) )
+        {
+            iter->state |= ITER_DONE;
+            res = false;
+        }
+        else
+        {
+            char * newline = string_chr( iter->content.addr, iter->content.size, '\n' );
+            if ( newline == NULL )
+            {
+                if ( iter->state & ITER_EOF )
+                    res = slice_iter_content( iter, iter->content.size );
+                else
+                {
+                    read_line_iter( iter );
+                    res = advance_line_iter( iter ); /* recursion! */
+                }
+            }
+            else
+                res = slice_iter_content( iter, newline - iter->content.addr );
+        }
+    }
+    return res;
+}
+
+
+String * get_line_iter( struct line_iter * iter )
+{
+    String * res = NULL;
+    if ( iter != NULL )
+    {
+        if ( 0 == ( iter->state & ITER_DONE ) )
+            res = &iter->line;
+    }
+    return res;
+}
+
+
+bool is_line_iter_done( const struct line_iter * iter )
+{
+    if ( iter != NULL )
+        return ( iter->state & ITER_DONE );
+    return true;
+}
+
+
+rc_t make_line_iter( const KDirectory *dir, line_iter ** iter,
+                     const char * filename, size_t buffer_size )
+{
+    const struct KFile * f;
+    rc_t rc = KDirectoryOpenFileRead( dir, &f, "%s", filename );
+    if ( rc != 0 )
+        ErrMsg( "KDirectoryOpenFileRead( '%s' ) -> %R", filename, rc );
+    else
+    {
+        if ( rc == 0 )
+        {
+            line_iter * l = calloc( 1, sizeof * l );
+            if ( l == NULL )
+            {
+                KFileRelease( f );
+                rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                ErrMsg( "calloc( %d ) -> %R", ( sizeof * l ), rc );
+            }
+            else
+            {
+                l->f = f;
+                l->buffer.addr = malloc( buffer_size );
+                if ( l->buffer.addr == NULL )
+                {
+                    rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                    ErrMsg( "malloc( %d ) -> %R", ( buffer_size ), rc );
+                    KFileRelease( f );
+                    free( ( void * ) l );
+                }
+                else
+                {
+                    l->buffer.size = buffer_size;
+                    l->buffer.len = buffer_size;
+                    l->content.addr = l->buffer.addr;
+                    read_line_iter( l );
+                    if ( advance_line_iter( l ) )
+                    {
+                        *iter = l;
+                    }
+                    else
+                    {
+                        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcRange, rcInvalid );
+                        release_line_iter( l );
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
diff --git a/tools/fastdump/line_iter.h b/tools/fastdump/line_iter.h
new file mode 100644
index 0000000..b453c4d
--- /dev/null
+++ b/tools/fastdump/line_iter.h
@@ -0,0 +1,60 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_line_iter_
+#define _h_line_iter_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_klib_text_
+#include <klib/text.h>
+#endif
+
+#ifndef _h_kfs_directory_
+#include <kfs/directory.h>
+#endif
+
+struct line_iter;
+
+void release_line_iter( struct line_iter * iter );
+bool advance_line_iter( struct line_iter * iter );
+String * get_line_iter( struct line_iter * iter );
+bool is_line_iter_done( const struct line_iter * iter );
+
+rc_t make_line_iter( const KDirectory *dir, struct line_iter ** iter,
+                     const char * filename, size_t buffer_size );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/fastdump/lookup_reader.c b/tools/fastdump/lookup_reader.c
new file mode 100644
index 0000000..85f1b9f
--- /dev/null
+++ b/tools/fastdump/lookup_reader.c
@@ -0,0 +1,360 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "lookup_reader.h"
+#include "helper.h"
+
+#include <klib/printf.h>
+#include <kfs/file.h>
+#include <kfs/buffile.h>
+
+#include <string.h>
+#include <stdio.h>
+
+typedef struct lookup_reader
+{
+    const struct KFile * f;
+    const struct index_reader * index;
+    SBuffer buf;
+    uint64_t pos;
+} lookup_reader;
+
+
+void release_lookup_reader( struct lookup_reader * reader )
+{
+    if ( reader != NULL )
+    {
+        if ( reader->f != NULL ) KFileRelease( reader->f );
+        release_SBuffer( &reader->buf );
+        free( ( void * ) reader );
+    }
+}
+
+
+rc_t make_lookup_reader( const KDirectory *dir, const struct index_reader * index,
+                         struct lookup_reader ** reader, size_t buf_size, const char * fmt, ... )
+{
+    rc_t rc;
+    const struct KFile * f = NULL;
+    
+    va_list args;
+    va_start ( args, fmt );
+    
+    rc = KDirectoryVOpenFileRead( dir, &f, fmt, args );
+    if ( rc != 0 )
+    {
+        char tmp[ 4096 ];
+        size_t num_writ;
+        rc_t rc1 = string_vprintf( tmp, sizeof tmp, &num_writ, fmt, args );
+        if ( rc1 != 0 )
+            ErrMsg( "make_lookup_reader.KDirectoryVOpenFileRead( '?' ) -> %R", rc );
+        else
+            ErrMsg( "make_lookup_reader.KDirectoryVOpenFileRead( '%s' ) -> %R", tmp, rc );
+    }
+    else
+    {
+        const struct KFile * temp_file = NULL;
+        rc = KBufFileMakeRead( &temp_file, f, buf_size );
+        KFileRelease( f );
+        if ( rc != 0 )
+        {
+            ErrMsg( "make_lookup_reader.KBufFileMakeRead() -> %R", rc );
+        }
+        else
+        {
+            lookup_reader * r = calloc( 1, sizeof * r );
+            if ( r == NULL )
+            {
+                KFileRelease( temp_file );
+                rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                ErrMsg( "make_lookup_reader.calloc( %d ) -> %R", ( sizeof * r ), rc );
+            }
+            else
+            {
+                r->f = temp_file;
+                r->index = index;
+                rc = make_SBuffer( &r->buf, 4096 );
+                if ( rc == 0 )
+                    *reader = r;
+                else
+                    release_lookup_reader( r );
+            }
+        }
+    }
+    va_end ( args );
+    return rc;
+}
+
+
+static rc_t read_key_and_len( struct lookup_reader * reader, uint64_t pos, uint64_t *key, size_t *len )
+{
+    size_t num_read;
+    char buffer[ 10 ];
+    rc_t rc = KFileRead( reader->f, pos, buffer, sizeof buffer, &num_read );
+    if ( rc != 0 )
+    {
+        ErrMsg( "read_key_and_len.KFileRead( at %ld, to_read %u ) -> %R", pos, sizeof buffer, rc );
+    }
+    else if ( num_read != sizeof buffer )
+    {
+        if ( num_read == 0 )
+            rc = SILENT_RC( rcVDB, rcNoTarg, rcReading, rcId, rcNotFound );
+        else
+            rc = SILENT_RC( rcVDB, rcNoTarg, rcReading, rcFormat, rcInvalid );
+    }
+    else
+    {
+        uint16_t dna_len;
+        size_t packed_len;
+        memmove( key, buffer, sizeof *key );
+        dna_len = buffer[ 8 ];
+        dna_len <<= 8;
+        dna_len |= buffer[ 9 ];
+        packed_len = ( dna_len & 1 ) ? ( dna_len + 1 ) >> 1 : dna_len >> 1;
+        *len = ( ( sizeof *key ) + ( sizeof dna_len ) + packed_len );
+    }
+    return rc;
+}
+
+
+static bool keys_equal( uint64_t key1, uint64_t key2 )
+{
+    bool res = ( key1 == key2 );
+    if ( !res )
+        res = ( ( ( key1 & 0x01 ) == 0 ) && key2 == ( key1 + 1 ) );
+    return res;
+}
+
+static rc_t loop_until_key_found( struct lookup_reader * reader, uint64_t key_to_find,
+        uint64_t *key_found , uint64_t *offset )
+{
+    rc_t rc = 0;
+    bool done = false;
+    uint64_t curr = *offset;
+    while ( !done && rc == 0 )
+    {
+        size_t found_len;
+        rc = read_key_and_len( reader, curr, key_found, &found_len );
+        if ( keys_equal( key_to_find, *key_found ) )
+        {
+            done = true;
+            *offset = curr;
+        }
+        else if ( key_to_find > *key_found )
+            curr += found_len;
+        else
+        {
+            done = true;
+            rc = SILENT_RC( rcVDB, rcNoTarg, rcReading, rcId, rcNotFound );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t full_table_seek( struct lookup_reader * reader, uint64_t key_to_find, uint64_t * key_found )
+{
+    /* we have no index! search the whole thing... */
+    uint64_t offset = 0;
+    rc_t rc = loop_until_key_found( reader, key_to_find, key_found, &offset );
+    if ( rc == 0 )
+    {
+        if ( keys_equal( key_to_find, *key_found ) )
+            reader->pos = offset;
+        else
+        {
+            rc = RC( rcVDB, rcNoTarg, rcReading, rcId, rcNotFound );
+            ErrMsg( "seek_lookup_reader( key: %ld ) -> %R", key_to_find, rc );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t indexed_seek( struct lookup_reader * reader, uint64_t key_to_find, uint64_t * key_found, bool exactly )
+{
+    /* we have a index! find set pos to the found offset */
+    uint64_t offset = 0;
+    uint64_t max_key;
+    rc_t rc = get_max_key( reader->index, &max_key );
+    if ( rc == 0 )
+    {
+        if ( key_to_find > max_key )
+            rc = RC( rcVDB, rcNoTarg, rcReading, rcId, rcTooBig );
+        else
+        {
+            rc = get_nearest_offset( reader->index, key_to_find, key_found, &offset ); /* in index.c */
+            if ( rc == 0 )
+            {
+                if ( keys_equal( key_to_find, *key_found ) )
+                    reader->pos = offset;
+                else
+                {
+                    if ( exactly )
+                    {
+                        rc = loop_until_key_found( reader, key_to_find, key_found, &offset );
+                        if ( rc == 0 )
+                        {
+                            if ( keys_equal( key_to_find, *key_found ) )
+                                reader->pos = offset;
+                            else
+                                rc = RC( rcVDB, rcNoTarg, rcReading, rcId, rcNotFound );
+                        }
+                        else
+                            rc = RC( rcVDB, rcNoTarg, rcReading, rcId, rcNotFound );
+                    }
+                    else
+                    {
+                        reader->pos = offset;
+                        rc = RC( rcVDB, rcNoTarg, rcReading, rcId, rcNotFound );
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+rc_t seek_lookup_reader( struct lookup_reader * reader, uint64_t key_to_find, uint64_t * key_found, bool exactly )
+{
+    rc_t rc = 0;
+    if ( reader == NULL || key_found == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcReading, rcParam, rcInvalid );
+        ErrMsg( "seek_lookup_reader() -> %R", rc );
+    }
+    else
+    {
+        if ( reader->index != NULL )
+        {
+            rc = indexed_seek( reader, key_to_find, key_found, exactly );
+            if ( rc != 0 )
+                rc = full_table_seek( reader, key_to_find, key_found );
+        }
+        else
+            rc = full_table_seek( reader, key_to_find, key_found );
+    }
+    return rc;
+}
+
+
+rc_t get_packed_and_key_from_lookup_reader( struct lookup_reader * reader,
+                        uint64_t * key, SBuffer * packed_bases )
+{
+    rc_t rc;
+    if ( reader == NULL || key == NULL || packed_bases == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcReading, rcParam, rcInvalid );
+        ErrMsg( "get_packed_and_key_from_lookup_reader() -> %R", rc );
+    }
+    else
+    {
+        size_t num_read;
+        char buffer1[ 10 ];
+        rc = KFileRead( reader->f, reader->pos, buffer1, sizeof buffer1, &num_read );
+        if ( rc != 0 )
+            ErrMsg( "KFileRead( at %ld, to_read %u ) -> %R", reader->pos, sizeof buffer1, rc );
+        else if ( num_read != sizeof buffer1 )
+            rc = SILENT_RC( rcVDB, rcNoTarg, rcReading, rcFormat, rcInvalid );
+        else
+        {
+            uint16_t dna_len;
+            size_t to_read;
+            char * dst = ( char * )packed_bases->S.addr;
+            
+            memmove( key, buffer1, sizeof *key );
+
+            dna_len = buffer1[ 8 ];
+            dna_len <<= 8;
+            dna_len |= buffer1[ 9 ];
+            dst[ 0 ] = buffer1[ 8 ];
+            dst[ 1 ] = buffer1[ 9 ];
+            dst += 2;
+            to_read = ( dna_len & 1 ) ? ( dna_len + 1 ) >> 1 : dna_len >> 1;
+            if ( to_read > ( packed_bases->buffer_size - 2 ) )
+                to_read = ( packed_bases->buffer_size - 2 );
+            if ( rc == 0 )
+            {
+                rc = KFileRead( reader->f, reader->pos + 10, dst, to_read, &num_read );
+                if ( rc != 0 )
+                    ErrMsg( "KFileRead( at %ld, to_read %u ) -> %R", reader->pos + 10, to_read, rc );
+                else if ( num_read != to_read )
+                {
+                    rc = RC( rcVDB, rcNoTarg, rcReading, rcFormat, rcInvalid );
+                    ErrMsg( "KFileRead( %ld ) %d vs %d -> %R", reader->pos + 10, num_read, to_read, rc );
+                }
+                else
+                {
+                    packed_bases->S.len = packed_bases->S.size = num_read + 2;
+                    reader->pos += ( num_read + 10 );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t get_packed_from_lookup_reader( struct lookup_reader * reader,
+                        int64_t * seq_spot_id, uint32_t * seq_read_id, SBuffer * packed_bases )
+{
+    uint64_t key;
+    rc_t rc = get_packed_and_key_from_lookup_reader( reader, &key, packed_bases );
+    if ( rc == 0 )
+    {
+        *seq_spot_id = key >> 1;
+        *seq_read_id = key & 1 ? 2 : 1;
+    }
+    return rc;
+}
+
+
+rc_t get_bases_from_lookup_reader( struct lookup_reader * reader,
+                        int64_t * seq_spot_id, uint32_t * seq_read_id, SBuffer * bases )
+{
+    rc_t rc = get_packed_from_lookup_reader( reader, seq_spot_id, seq_read_id, &reader->buf );
+    if ( rc == 0 )
+        unpack_4na( &reader->buf.S, bases );
+    return rc;
+}
+
+
+rc_t lookup_bases( struct lookup_reader * lookup, int64_t row_id, uint32_t read_id, SBuffer * B )
+{
+    int64_t found_seq_spot_id;
+    uint32_t found_seq_read_id;
+    rc_t rc = get_bases_from_lookup_reader( lookup, &found_seq_spot_id, &found_seq_read_id, B );
+    if ( rc == 0 )
+    {
+        if ( found_seq_spot_id != row_id || found_seq_read_id != read_id )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcTransfer, rcInvalid );
+            ErrMsg( "id-mismatch for seq_id = %lu vs. %lu / read_id = %u vs %lu",
+                    found_seq_spot_id, row_id, found_seq_read_id, read_id );
+        }
+    }
+    return rc;
+}
diff --git a/tools/fastdump/lookup_reader.h b/tools/fastdump/lookup_reader.h
new file mode 100644
index 0000000..ecf5ce9
--- /dev/null
+++ b/tools/fastdump/lookup_reader.h
@@ -0,0 +1,75 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_lookup_reader_
+#define _h_lookup_reader_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_helper_
+#include "helper.h"
+#endif
+
+
+#ifndef _h_kfs_directory_
+#include <kfs/directory.h>
+#endif
+
+#ifndef _h_index_
+#include "index.h"
+#endif
+
+struct lookup_reader;
+
+void release_lookup_reader( struct lookup_reader * reader );
+
+rc_t make_lookup_reader( const KDirectory *dir, const struct index_reader * index,
+                         struct lookup_reader ** reader, size_t buf_size, const char * fmt, ... );
+
+rc_t seek_lookup_reader( struct lookup_reader * reader, uint64_t key, uint64_t * key_found, bool exactly );
+
+rc_t get_packed_and_key_from_lookup_reader( struct lookup_reader * reader,
+                        uint64_t * key, SBuffer * packed_bases );
+
+rc_t get_packed_from_lookup_reader( struct lookup_reader * reader,
+                        int64_t * seq_spot_id, uint32_t * seq_read_id, SBuffer * packed_bases );
+
+rc_t get_bases_from_lookup_reader( struct lookup_reader * reader,
+                        int64_t * seq_spot_id, uint32_t * seq_read_id, SBuffer * bases );
+
+rc_t lookup_bases( struct lookup_reader * lookup, int64_t row_id, uint32_t read_id, SBuffer * B );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/fastdump/lookup_writer.c b/tools/fastdump/lookup_writer.c
new file mode 100644
index 0000000..badea64
--- /dev/null
+++ b/tools/fastdump/lookup_writer.c
@@ -0,0 +1,138 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "lookup_writer.h"
+#include "helper.h"
+
+#include <kfs/file.h>
+#include <kfs/buffile.h>
+
+typedef struct lookup_writer
+{
+    struct KFile * f;
+    struct index_writer * idx;
+    SBuffer buf;
+    uint64_t pos;
+} lookup_writer;
+
+
+void release_lookup_writer( struct lookup_writer * writer )
+{
+    if ( writer != NULL )
+    {
+        if ( writer->f != NULL ) KFileRelease( writer->f );
+        release_SBuffer( &writer->buf );
+        free( ( void * ) writer );
+    }
+}
+
+
+rc_t make_lookup_writer( KDirectory *dir, struct index_writer * idx,
+                         struct lookup_writer ** writer, size_t buf_size,
+                         const char * fmt, ... )
+{
+    rc_t rc;
+    struct KFile * f;
+    
+    va_list args;
+    va_start ( args, fmt );
+
+    rc = KDirectoryVCreateFile( dir, &f, false, 0664, kcmInit, fmt, args );
+    if ( rc != 0 )
+        ErrMsg( "KDirectoryVCreateFile() -> %R", rc );
+    else
+    {
+        struct KFile * temp_file;
+        rc = KBufFileMakeWrite( &temp_file, f, false, buf_size );
+        KFileRelease( f );
+        if ( rc != 0 )
+            ErrMsg( "KBufFileMakeWrite() -> %R", rc );
+        else
+        {
+            lookup_writer * w = calloc( 1, sizeof * w );
+            if ( w == NULL )
+            {
+                KFileRelease( temp_file );
+                rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                ErrMsg( "calloc( %d ) -> %R", ( sizeof * w ), rc );
+            }
+            else
+            {
+                w->f = temp_file;
+                w->idx = idx;
+                rc = make_SBuffer( &w->buf, 4096 );
+                if ( rc == 0 )
+                    *writer = w;
+                else
+                    release_lookup_writer( w );
+            }
+        }
+    }
+    va_end ( args );
+    return rc;
+}
+
+
+rc_t write_unpacked_to_lookup_writer( struct lookup_writer * writer,
+            int64_t seq_spot_id, uint32_t seq_read_id, const String * bases_as_unpacked_4na )
+{
+    pack_4na( bases_as_unpacked_4na, &writer->buf );
+    return write_packed_to_lookup_writer( writer, make_key( seq_spot_id, seq_read_id ), &writer->buf.S );
+}
+
+rc_t write_packed_to_lookup_writer( struct lookup_writer * writer,
+            uint64_t key, const String * bases_as_packed_4na )
+{
+    size_t num_writ;
+    rc_t rc = KFileWrite( writer->f, writer->pos, &key, sizeof key, &num_writ );
+    if ( rc != 0 )
+        ErrMsg( "KFileWriteAll( key ) -> %R", rc );
+    else if ( num_writ != sizeof key )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcWriting, rcFormat, rcInvalid );
+        ErrMsg( "KFileWriteAll( key ) -> %R", rc );
+    }
+    else
+    {
+        uint64_t start_pos = writer->pos;
+        writer->pos += num_writ;
+        rc = KFileWrite( writer->f, writer->pos, bases_as_packed_4na->addr, bases_as_packed_4na->size, &num_writ );
+        if ( rc != 0 )
+            ErrMsg( "KFileWriteAll( bases ) -> %R", rc );
+        else if ( num_writ != bases_as_packed_4na->size )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcWriting, rcFormat, rcInvalid );
+            ErrMsg( "KFileWriteAll( bases ) -> %R", rc );
+        }
+        else
+        {
+            if ( writer->idx != NULL )
+                rc = write_key( writer->idx, key, start_pos );
+            writer->pos += num_writ;
+        }
+    }
+    return rc;
+}
diff --git a/tools/fastdump/lookup_writer.h b/tools/fastdump/lookup_writer.h
new file mode 100644
index 0000000..9e83051
--- /dev/null
+++ b/tools/fastdump/lookup_writer.h
@@ -0,0 +1,67 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_lookup_writer_
+#define _h_lookup_writer_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_klib_text_
+#include <klib/text.h>
+#endif
+
+#ifndef _h_kfs_directory_
+#include <kfs/directory.h>
+#endif
+
+#ifndef _h_index_
+#include "index.h"
+#endif
+
+struct lookup_writer;
+
+void release_lookup_writer( struct lookup_writer * writer );
+
+rc_t make_lookup_writer( KDirectory *dir, struct index_writer * idx, struct lookup_writer ** writer,
+                         size_t buf_size, const char * fmt, ... );
+
+rc_t write_unpacked_to_lookup_writer( struct lookup_writer * writer,
+            int64_t seq_spot_id, uint32_t seq_read_id, const String * bases_as_unpacked_4na );
+
+rc_t write_packed_to_lookup_writer( struct lookup_writer * writer,
+            uint64_t key, const String * bases_as_packed_4na );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/fastdump/merge_sorter.c b/tools/fastdump/merge_sorter.c
new file mode 100644
index 0000000..2080e8a
--- /dev/null
+++ b/tools/fastdump/merge_sorter.c
@@ -0,0 +1,173 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include "merge_sorter.h"
+#include "lookup_reader.h"
+#include "lookup_writer.h"
+#include "index.h"
+#include "helper.h"
+
+typedef struct merge_src
+{
+    struct lookup_reader * reader;
+    uint64_t key;
+    SBuffer packed_bases;
+    rc_t rc;
+} merge_src;
+
+
+typedef struct merge_sorter
+{
+    const merge_sorter_params * params;
+    merge_src * src_list;
+    struct lookup_writer * dst;
+    struct index_writer * idx;
+} merge_sorter;
+
+
+void release_merge_sorter( struct merge_sorter *ms )
+{
+    if ( ms != NULL )
+    {
+        uint32_t i;
+        release_lookup_writer( ms->dst );
+        release_index_writer( ms->idx );
+        if ( ms->src_list != NULL )
+        {
+            for ( i = 0; i < ms->params->count; ++i )
+            {
+                merge_src * src = &ms->src_list[ i ];
+                release_lookup_reader( src->reader );
+                release_SBuffer( &src->packed_bases );
+            }
+            free( ( void * ) ms->src_list );
+        }
+
+        free( ( void * ) ms );
+    }
+}
+
+
+rc_t make_merge_sorter( struct merge_sorter ** ms, const merge_sorter_params * params )
+{
+    rc_t rc = 0;
+    merge_sorter * m = calloc( 1, sizeof * m );
+    if ( m == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        ErrMsg( "calloc( %d ) -> %R", ( sizeof * m ), rc );
+    }
+    else
+    {
+        if ( params->index_filename != NULL )
+            rc = make_index_writer( params->dir, &m->idx, params->buf_size,
+                        20000, "%s", params->index_filename );
+
+        if ( rc == 0 )
+        {
+            rc = make_lookup_writer( params->dir, m->idx, &m->dst, params->buf_size,
+                        "%s", params->output_filename );
+            if ( rc == 0 )
+            {
+                m->src_list = calloc( params->count, sizeof * m->src_list );
+                if ( m->src_list == NULL )
+                {
+                    rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                    ErrMsg( "calloc( %d ) -> %R", ( ( sizeof * m->src_list ) * params->count ), rc );
+                }
+                else
+                {
+                    m->params = params;
+                    *ms = m;
+                }
+            }
+        }
+    }
+    if ( rc != 0 )
+        release_merge_sorter( m );
+    return rc;
+}
+
+
+rc_t add_merge_sorter_src( struct merge_sorter *ms, const char * filename, uint32_t id )
+{
+    rc_t rc;
+    if ( id >= ms->params->count )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+        ErrMsg( "add_merge_sorter_src() ... invalid id of %d", id );
+    }
+    else
+    {
+        merge_src * src = &ms->src_list[ id ];
+        rc = make_lookup_reader( ms->params->dir, NULL, &src->reader, ms->params->buf_size, "%s", filename );
+        if ( rc == 0 )
+        {
+            rc = make_SBuffer( &src->packed_bases, 4096 );
+            if ( rc == 0 )
+                src->rc = get_packed_and_key_from_lookup_reader( src->reader, &src->key, &src->packed_bases );
+        }
+    }
+    return rc;
+}
+
+
+static merge_src * get_min_merge_src( merge_src * src, uint32_t count )
+{
+    merge_src * res = NULL;
+    uint32_t i;
+    for ( i = 0; i < count; ++i )
+    {
+        merge_src * item = &src[ i ];
+        if ( item->rc == 0 )
+        {
+            if ( res == NULL )
+                res = item;
+            else if ( item->key < res->key )
+                res = item;
+        }
+    }
+    return res;
+} 
+
+rc_t CC Quitting();
+
+rc_t run_merge_sorter( struct merge_sorter *ms )
+{
+    rc_t rc = 0;
+    merge_src * to_write = get_min_merge_src( ms->src_list, ms->params->count );
+    while( rc == 0 && to_write != NULL )
+    {
+        rc = Quitting();
+        if ( rc == 0 )
+        {
+            rc = write_packed_to_lookup_writer( ms->dst, to_write->key, &to_write->packed_bases.S );
+            if ( rc == 0 )
+                to_write->rc = get_packed_and_key_from_lookup_reader( to_write->reader, &to_write->key, &to_write->packed_bases );
+            to_write = get_min_merge_src( ms->src_list, ms->params->count );
+        }
+    }
+    return rc;
+}
diff --git a/tools/fastdump/merge_sorter.h b/tools/fastdump/merge_sorter.h
new file mode 100644
index 0000000..fe3352c
--- /dev/null
+++ b/tools/fastdump/merge_sorter.h
@@ -0,0 +1,66 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_merge_sorter_
+#define _h_merge_sorter_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_kfs_directory_
+#include <kfs/directory.h>
+#endif
+
+struct merge_sorter;
+
+typedef struct merge_sorter_params
+{
+    KDirectory *dir;
+    const char * output_filename;
+    const char * index_filename;
+    uint32_t count;
+    size_t buf_size;
+} merge_sorter_params;
+
+
+rc_t make_merge_sorter( struct merge_sorter ** ms, const merge_sorter_params * params );
+
+rc_t add_merge_sorter_src( struct merge_sorter *ms, const char * filename, uint32_t id );
+
+void release_merge_sorter( struct merge_sorter *ms );
+
+rc_t run_merge_sorter( struct merge_sorter *ms );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/fastdump/raw_read_iter.c b/tools/fastdump/raw_read_iter.c
new file mode 100644
index 0000000..ca5ab5e
--- /dev/null
+++ b/tools/fastdump/raw_read_iter.c
@@ -0,0 +1,100 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "raw_read_iter.h"
+#include "cmn_iter.h"
+#include "helper.h"
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+typedef struct raw_read_iter
+{
+    struct cmn_iter * cmn;
+    uint32_t seq_spot_id, seq_read_id, raw_read_id;
+} raw_read_iter;
+
+
+void destroy_raw_read_iter( struct raw_read_iter * iter )
+{
+    if ( iter != NULL )
+    {
+        destroy_cmn_iter( iter->cmn );
+        free( ( void * ) iter );
+    }
+}
+
+
+rc_t make_raw_read_iter( cmn_params * params, struct raw_read_iter ** iter )
+{
+    
+    rc_t rc = 0;
+    raw_read_iter * i = calloc( 1, sizeof * i );
+    if ( i == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        ErrMsg( "make_raw_read_iter.calloc( %d ) -> %R", ( sizeof * i ), rc );
+    }
+    else
+    {
+        rc = make_cmn_iter( params, "PRIMARY_ALIGNMENT", &i->cmn );
+        if ( rc == 0 )
+            rc = cmn_iter_add_column( i->cmn, "SEQ_SPOT_ID", &i->seq_spot_id );
+        if ( rc == 0 )
+            rc = cmn_iter_add_column( i->cmn, "SEQ_READ_ID", &i->seq_read_id );
+        if ( rc == 0 )
+            rc = cmn_iter_add_column( i->cmn, "(INSDC:4na:bin)RAW_READ", &i->raw_read_id );
+        if ( rc == 0 )
+            rc = cmn_iter_range( i->cmn, i->seq_spot_id );
+
+        if ( rc != 0 )
+            destroy_raw_read_iter( i );
+        else
+            *iter = i;
+    }
+    return rc;
+}
+
+
+bool get_from_raw_read_iter( struct raw_read_iter * iter, raw_read_rec * rec, rc_t * rc )
+{
+    bool res = cmn_iter_next( iter->cmn, rc );
+    if ( res )
+    {
+        *rc = cmn_read_uint64( iter->cmn, iter->seq_spot_id, &rec->seq_spot_id );
+        if ( *rc == 0 )
+            *rc = cmn_read_uint32( iter->cmn, iter->seq_read_id, &rec->seq_read_id );
+        if ( *rc == 0 )
+            *rc = cmn_read_String( iter->cmn, iter->raw_read_id, &rec->raw_read );
+    }
+    return res;
+}
+
+
+uint64_t get_row_count_of_raw_read( struct raw_read_iter * iter )
+{
+    return cmn_iter_row_count( iter->cmn );
+}
diff --git a/tools/fastdump/raw_read_iter.h b/tools/fastdump/raw_read_iter.h
new file mode 100644
index 0000000..11d2229
--- /dev/null
+++ b/tools/fastdump/raw_read_iter.h
@@ -0,0 +1,67 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_raw_read_iter_
+#define _h_raw_read_iter_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_klib_text_
+#include <klib/text.h>
+#endif
+
+#ifndef _h_cmn_iter_
+#include "cmn_iter.h"
+#endif
+
+struct raw_read_iter;
+
+typedef struct raw_read_rec
+{
+    uint64_t seq_spot_id;
+    uint32_t seq_read_id;
+    String raw_read;
+} raw_read_rec;
+
+void destroy_raw_read_iter( struct raw_read_iter * iter );
+
+rc_t make_raw_read_iter( cmn_params * params, struct raw_read_iter ** iter );
+
+bool get_from_raw_read_iter( struct raw_read_iter * iter, raw_read_rec * rec, rc_t * rc );
+
+uint64_t get_row_count_of_raw_read( struct raw_read_iter * iter );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/fastdump/readme.txt b/tools/fastdump/readme.txt
new file mode 100644
index 0000000..20e270c
--- /dev/null
+++ b/tools/fastdump/readme.txt
@@ -0,0 +1,92 @@
+Here is an example how to use the new fastdump-tool:
+
+The usage is in 2 stages:
+( stage 1 ) create a lookup-file from the accession
+        SRRXXXXXX ---> SRRXXXXXX.lookup
+        
+( stage 2 ) create the final output from the accession using the lookupfile
+        SRRXXXXXX + SRRXXXXXX.lookup ---> SRRXXXXXX.txt
+
+
+example: accession = SRR833540
+
+================================================================================
+    stage 1:
+================================================================================
+
+(version a)
+create the lookup-file in the current directory, with memory limit of 4 GB
+
+fastdump SRR833540 -f lookup -o SRR833540.lookup -m 4G -p
+
+This will create a number of temporary files in your current directory.
+Make shure you have enough space for that. The lookup-file for this accession
+(SRR833540.lookup) will be about 121 GB in size. You will need double that space
+because of the temporary files. The tool will delete them after it created the
+lookup-file. How much memory should you give to the tool? Look at your
+available memory with 'free -h'. Give it about half as much as your free memory.
+You can give it more, but that will result in memory beeing swaped and that will
+result in a big slow down. One of our machines took about 500 minutes for this,
+without swapping. The '-p' switch turns a percent-bar on.
+
+
+
+(version b)
+create the lookup-file in the current directory, with memory limit of 4 GB on 6 threads
+
+fastdump SRR833540 -f lookup -o SRR833540.lookup -m 4G -e 6 -p
+
+This will create the same output, but much faster. But now you are using 4 GB on
+each of the 6 threads. You will need more than 4 GB * 6 = 24 GB, you will need
+about 35 GB of memory because other parts of the tool need memory too. If you do not
+have that much memory, reduce the amount of memory per thread or the number of threads
+until it fits your machine. You can check how much is actually used with 
+'top -u your_username'. If you specify 6 threads, you should see about 600% of
+CPU utilization. If you see less than that you are limited by the speed of the
+filesystem access. Make shure that SRR833540 is local on your filesystem and all
+the references it uses are locally accessible too. This took us about 110 minutes.
+
+
+How do you know the accession is local?
+
+'vdb-dump SRR833540 --info'
+
+If the path points to your local filesystem ( '/home/user/ncbi/...' etc. )
+    ---> you are good to go.
+
+If the path points to a remote url ( 'http://sra-download.ncbi...' etc. )
+    ---> download the accession first, with the prefetch-tool.
+
+How do you know that you have all references locally?
+
+'sra-pileup SRR833540 --function ref'
+
+This will list all references used by the accession.
+If the location points to your local filesystem, your are good to go. If the location
+points to a remote url, download the references with the prefetch-tool.
+
+If after prefetch the accession is still not found locally, you have a configuration issue.
+
+If you have a SSD available, that helps too!
+
+================================================================================
+    stage 2:
+================================================================================
+
+(version a)
+create the lookup-file in the current directory into a file with percent-bar
+
+fastdump SRR833540 -l SRR833540.lookup -o SRR833540.txt -p
+
+
+(version b)
+create the output on stdout ( to be piped into other tools )
+
+fastdump SRR833540 -l SRR833540.lookup
+
+The output will be in this text-format:
+ID<tab>READ<tab>SPOTGROUP
+
+If you want FASTQ instead, add the option '-f fastq'.
+
+
diff --git a/tools/fastdump/sorter.c b/tools/fastdump/sorter.c
new file mode 100644
index 0000000..21d9325
--- /dev/null
+++ b/tools/fastdump/sorter.c
@@ -0,0 +1,538 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "sorter.h"
+#include "lookup_writer.h"
+#include "lookup_reader.h"
+#include "merge_sorter.h"
+#include "helper.h"
+
+#include <klib/vector.h>
+#include <klib/printf.h>
+#include <klib/progressbar.h>
+#include <kproc/thread.h>
+
+/* 
+    this is in interfaces/cc/XXX/YYY/atomic.h
+    XXX ... the compiler ( cc, gcc, icc, vc++ )
+    YYY ... the architecture ( fat86, i386, noarch, ppc32, x86_64 )
+ */
+#include <atomic.h>
+
+
+typedef struct sorter
+{
+    sorter_params params;
+    KVector * store;
+    SBuffer buf;
+    uint64_t bytes_in_store;
+    uint32_t sub_file_id;
+} sorter;
+
+
+static void release_sorter( struct sorter * sorter )
+{
+    if ( sorter != NULL )
+    {
+        release_SBuffer( &sorter->buf );
+        if ( sorter->params.src != NULL )
+            destroy_raw_read_iter( sorter->params.src );
+        if ( sorter->store != NULL )
+            KVectorRelease( sorter->store );
+    }
+}
+
+static rc_t init_sorter( struct sorter * sorter, const sorter_params * params )
+{
+    rc_t rc = KVectorMake( &sorter->store );
+    if ( rc != 0 )
+        ErrMsg( "KVectorMake() -> %R", rc );
+    else
+    {
+        rc = make_SBuffer( &sorter->buf, 4096 );
+        if ( rc == 0 )
+        {
+            sorter->params.dir = params->dir;
+            sorter->params.output_filename = params->output_filename;
+            sorter->params.index_filename = NULL;
+            sorter->params.temp_path = params->temp_path;
+            sorter->params.src = params->src;
+            sorter->params.buf_size = params->buf_size;
+            sorter->params.mem_limit = params->mem_limit;
+            sorter->params.prefix = params->prefix;
+            sorter->bytes_in_store = 0;
+            sorter->sub_file_id = 0;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t make_subfilename( const sorter_params * params, uint32_t id, char * buffer, size_t buflen )
+{
+    rc_t rc;
+    size_t num_writ;
+    if ( params->temp_path != NULL )
+    {
+        uint32_t l = string_measure( params->temp_path, NULL );
+        if ( l == 0 )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+            ErrMsg( "make_subfilename.string_measure() = 0 -> %R", rc );
+        }
+        else
+        {
+            if ( params->temp_path[ l-1 ] == '/' )
+                rc = string_printf( buffer, buflen, &num_writ, "%ssub_%d_%d.dat",
+                        params->temp_path, params->prefix, id );
+            else
+                rc = string_printf( buffer, buflen, &num_writ, "%s/sub_%d_%d.dat",
+                        params->temp_path, params->prefix, id );
+        }
+    }
+    else
+        rc = string_printf( buffer, buflen, &num_writ, "sub_%d_%d.dat",
+                params->prefix, id );
+
+    if ( rc != 0 )
+        ErrMsg( "make_subfilename.string_printf() -> %R", rc );
+    return rc;
+}
+
+
+static rc_t make_dst_filename( const sorter_params * params, char * buffer, size_t buflen )
+{
+    rc_t rc;
+    size_t num_writ;
+    if ( params->prefix > 0 )
+    {
+        if ( params->temp_path != NULL )
+        {
+            uint32_t l = string_measure( params->temp_path, NULL );
+            if ( l == 0 )
+            {
+                rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+                ErrMsg( "make_subfilename.string_measure() = 0 -> %R", rc );
+            }
+            else
+            {
+                if ( params->temp_path[ l-1 ] == '/' )
+                    rc = string_printf( buffer, buflen, &num_writ, "%stmp_%d.dat",
+                            params->temp_path, params->prefix );
+                else
+                    rc = string_printf( buffer, buflen, &num_writ, "%s/tmp_%d.dat",
+                            params->temp_path, params->prefix );
+            }
+        }
+        else
+            rc = string_printf( buffer, buflen, &num_writ, "tmp_%d.dat", params->prefix );
+    }
+    else
+        rc = string_printf( buffer, buflen, &num_writ, "%s", params->output_filename );
+
+    if ( rc != 0 )
+        ErrMsg( "make_dst_filename.string_printf() -> %R", rc );
+    return rc;
+}
+
+
+static rc_t CC on_store_entry( uint64_t key, const void *value, void *user_data )
+{
+    const String * bases = value;
+    struct lookup_writer * writer = user_data;
+    rc_t rc = write_packed_to_lookup_writer( writer, key, bases );
+    StringWhack( bases );
+    return rc;
+}
+
+
+static rc_t save_store( struct sorter * sorter )
+{
+    rc_t rc = 0;
+    if ( sorter->bytes_in_store > 0 )
+    {
+        char buffer[ 4096 ];
+        struct lookup_writer * writer;
+        
+        if ( sorter->params.mem_limit > 0 )
+        {
+            rc = make_subfilename( &sorter->params, sorter->sub_file_id, buffer, sizeof buffer );
+            if ( rc == 0 )
+                sorter->sub_file_id++;
+        }
+        else
+            rc = make_dst_filename( &sorter->params, buffer, sizeof buffer );
+
+        if ( rc == 0 )
+            rc = make_lookup_writer( sorter->params.dir, NULL, &writer, sorter->params.buf_size, "%s", buffer );
+        
+        if ( rc == 0 )
+        {
+            rc = KVectorVisitPtr( sorter->store, false, on_store_entry, writer );
+            release_lookup_writer( writer );
+        }
+        if ( rc == 0 )
+        {
+            sorter->bytes_in_store = 0;
+            rc = KVectorRelease( sorter->store );
+            if ( rc != 0 )
+                ErrMsg( "KVectorRelease() -> %R", rc );
+            else
+            {
+                sorter->store = NULL;
+                rc = KVectorMake( &sorter->store );
+                if ( rc != 0 )
+                    ErrMsg( "KVectorMake() -> %R", rc );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t write_to_sorter( struct sorter * sorter, int64_t seq_spot_id, uint32_t seq_read_id,
+        const String * unpacked_bases )
+{
+    /* we write it to the store...*/
+    rc_t rc;
+    const String * to_store;    
+    pack_4na( unpacked_bases, &sorter->buf );
+    rc = StringCopy( &to_store, &sorter->buf.S );
+    if ( rc != 0 )
+        ErrMsg( "StringCopy() -> %R", rc );
+    else
+    {
+        uint64_t key = make_key( seq_spot_id, seq_read_id );
+        rc = KVectorSetPtr( sorter->store, key, (const void *)to_store );
+        if ( rc != 0 )
+            ErrMsg( "KVectorSetPtr() -> %R", rc );
+        else
+        {
+            size_t item_size = ( sizeof key ) + ( sizeof *to_store ) + to_store->size;
+            sorter->bytes_in_store += item_size;
+        }
+    }
+    
+    if ( rc == 0 &&
+         sorter->params.mem_limit > 0 &&
+         sorter->bytes_in_store >= sorter->params.mem_limit )
+        rc = save_store( sorter );
+    return rc;
+}
+
+
+static rc_t delete_sub_files( const sorter_params * params, uint32_t count )
+{
+    rc_t rc = 0;
+    char buffer[ 4096 ];
+    uint32_t i;
+    for ( i = 0; rc == 0 && i < count; ++ i )
+    {
+        rc = make_subfilename( params, i, buffer, sizeof buffer );
+        if ( rc == 0 )
+            rc = KDirectoryRemove( params->dir, true, "%s", buffer );
+        if ( rc != 0 )
+            ErrMsg( "KDirectoryRemove( 'sub_%d.dat' ) -> %R", i, rc );
+    }
+    return rc;
+}
+
+
+static rc_t final_merge_sort( const sorter_params * params, uint32_t count )
+{
+    rc_t rc = 0;
+    if ( count > 0 )
+    {
+        char buffer[ 4096 ];
+        rc = make_dst_filename( params, buffer, sizeof buffer );
+        if ( rc == 0 )
+        {
+            merge_sorter_params msp;
+            struct merge_sorter * ms;
+            uint32_t i;
+            
+            msp.dir = params->dir;
+            msp.output_filename = buffer;
+            msp.index_filename = params->index_filename;
+            msp.count = count;
+            msp.buf_size = params->buf_size;
+            
+            rc = make_merge_sorter( &ms, &msp );
+            for ( i = 0; rc == 0 && i < count; ++i )
+            {
+                char buffer2[ 4096 ];
+                rc = make_subfilename( params, i, buffer2, sizeof buffer2 );
+                if ( rc == 0 )
+                    rc = add_merge_sorter_src( ms, buffer2, i );
+            }
+            if ( rc == 0 )
+                rc = run_merge_sorter( ms );
+                
+            release_merge_sorter( ms );
+        }
+
+        if ( rc == 0 )
+            rc = delete_sub_files( params, count );
+    }
+    return rc;
+}
+
+rc_t CC Quitting();
+
+rc_t run_sorter( const sorter_params * params )
+{
+    sorter sorter;
+    rc_t rc = init_sorter( &sorter, params );
+    if ( rc == 0 )
+    {
+        raw_read_rec rec;
+        while ( rc == 0 && get_from_raw_read_iter( sorter.params.src, &rec, &rc ) )
+        {
+            rc = Quitting();
+            if ( rc == 0 )
+            {
+                rc = write_to_sorter( &sorter, rec.seq_spot_id, rec.seq_read_id, &rec.raw_read );
+                if ( rc == 0 && params->sort_progress != NULL )
+                    atomic_inc( params->sort_progress );
+            }
+        }
+        
+        if ( rc == 0 )
+            rc = save_store( &sorter );
+
+        if ( rc == 0 && sorter.params.mem_limit > 0 )
+            rc = final_merge_sort( params, sorter.sub_file_id );
+            
+        release_sorter( &sorter );
+    }
+    return rc;
+}
+
+/* -------------------------------------------------------------------------------------------- */
+
+static uint64_t find_out_row_count( const sorter_params * params )
+{
+    rc_t rc;
+    uint64_t res = 0;
+    struct raw_read_iter * iter;
+    cmn_params cp;
+    
+    cp.dir = params->dir;
+    cp.acc = params->acc;
+    cp.row_range = NULL;
+    cp.first = 0;
+    cp.count = 0;
+    cp.cursor_cache = params->cursor_cache;
+    cp.show_progress = false;
+
+    rc = make_raw_read_iter( &cp, &iter );
+    if ( rc == 0 )
+    {
+        res = get_row_count_of_raw_read( iter );
+        destroy_raw_read_iter( iter );
+    }
+    return res;
+}
+
+
+static rc_t make_pool_src_filename( const sorter_params * params, uint32_t id,
+            char * buffer, size_t buflen )
+{
+    rc_t rc;
+    size_t num_writ;
+    if ( params->temp_path != NULL )
+    {
+        uint32_t l = string_measure( params->temp_path, NULL );
+        if ( l == 0 )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+            ErrMsg( "make_subfilename.string_measure() = 0 -> %R", rc );
+        }
+        else
+        {
+            if ( params->temp_path[ l - 1 ] == '/' )
+                rc = string_printf( buffer, buflen, &num_writ, "%stmp_%d.dat",
+                        params->temp_path, id );
+            else
+                rc = string_printf( buffer, buflen, &num_writ, "%s/tmp_%d.dat",
+                        params->temp_path, id );
+        }
+    }
+    else
+        rc = string_printf( buffer, buflen, &num_writ, "tmp_%d.dat", id );
+
+    if ( rc != 0 )
+        ErrMsg( "make_pool_src_filename.string_printf() -> %R", rc );
+    return rc;
+}
+
+
+static rc_t delete_tmp_files( const sorter_params * params, uint32_t count )
+{
+    rc_t rc = 0;
+    char buffer[ 4096 ];
+    uint32_t i;
+    for ( i = 0; rc == 0 && i < count; ++ i )
+    {
+        make_pool_src_filename( params, i + 1, buffer, sizeof buffer );
+        if ( rc == 0 )
+            rc = KDirectoryRemove( params->dir, true, "%s", buffer );
+        if ( rc != 0 )
+            ErrMsg( "KDirectoryRemove( 'tmp_%d.dat' ) -> %R", rc );
+    }
+    return rc;
+}
+
+
+static rc_t merge_pool_files( const sorter_params * params )
+{
+    rc_t rc;
+    merge_sorter_params msp;
+    struct merge_sorter * ms;
+    
+    msp.dir = params->dir;
+    msp.output_filename = params->output_filename;
+    msp.index_filename = params->index_filename;
+    msp.count = params->num_threads;
+    msp.buf_size = params->buf_size;
+
+    rc = make_merge_sorter( &ms, &msp );
+    if ( rc == 0 )
+    {
+        uint32_t i;
+        for ( i = 0; rc == 0 && i < params->num_threads; ++i )
+        {
+            char buffer[ 4096 ];
+            rc = make_pool_src_filename( params, i + 1, buffer, sizeof buffer );
+            if ( rc == 0 )
+                rc = add_merge_sorter_src( ms, buffer, i );
+        }
+        if ( rc == 0 )
+            rc = run_merge_sorter( ms );
+        
+        release_merge_sorter( ms );
+    }
+
+    if ( rc == 0 ) 
+       rc = delete_tmp_files( params, params->num_threads );
+
+    return rc;
+}
+
+static void init_sorter_params( sorter_params * dst, const sorter_params * params, uint32_t prefix )
+{
+    dst->dir = params->dir;
+    dst->output_filename = NULL;
+    dst->index_filename = params->index_filename;
+    dst->temp_path = params->temp_path;
+    dst->src = NULL;
+    dst->prefix = prefix;
+    dst->mem_limit = params->mem_limit;
+    dst->buf_size = params->buf_size;
+}
+
+static void init_cmn_params( cmn_params * dst, const sorter_params * params, uint64_t row_count )
+{
+    dst->dir = params->dir;
+    dst->acc = params->acc;
+    dst->row_range = NULL;
+    dst->first = 1;
+    dst->count = ( row_count / params->num_threads ) + 1;
+    dst->cursor_cache = params->cursor_cache;
+    dst->show_progress = false;
+}
+
+
+static rc_t CC sort_thread_func( const KThread *self, void *data )
+{
+    rc_t rc = 0;
+    sorter_params * params = data;
+    params->index_filename = NULL;
+    rc = run_sorter( params );
+    free( data );
+    return rc;
+}
+
+
+rc_t run_sorter_pool( const sorter_params * params )
+{
+    rc_t rc = 0;
+    uint64_t row_count = find_out_row_count( params );
+    if ( row_count == 0 )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+        ErrMsg( "multi_threaded_make_lookup: row_count == 0!" );
+    }
+    else
+    {
+        cmn_params cp;
+        Vector threads;
+        KThread * progress_thread = NULL;
+        uint32_t prefix = 1;
+        multi_progress progress;
+
+        init_progress_data( &progress, row_count );
+        VectorInit( &threads, 0, params->num_threads );
+        init_cmn_params( &cp, params, row_count );
+        
+        if ( params->show_progress )
+            rc = start_multi_progress( &progress_thread, &progress );
+            
+        while ( rc == 0 && cp.first < row_count )
+        {
+            sorter_params * sp = calloc( 1, sizeof *sp );
+            if ( sp != NULL )
+            {
+                init_sorter_params( sp, params, prefix++ );
+                rc = make_raw_read_iter( &cp, &sp->src );
+                
+                if ( rc == 0 )
+                {
+                    KThread * thread;
+                    
+                    if ( params->show_progress )
+                        sp->sort_progress = &progress.progress_rows;
+                    rc = KThreadMake( &thread, sort_thread_func, sp );
+                    if ( rc != 0 )
+                        ErrMsg( "KThreadMake( sort-thread #%d ) -> %R", prefix - 1, rc );
+                    else
+                    {
+                        rc = VectorAppend( &threads, NULL, thread );
+                        if ( rc != 0 )
+                            ErrMsg( "VectorAppend( sort-thread #%d ) -> %R", prefix - 1, rc );
+                    }
+                }
+                cp.first  += cp.count;
+            }
+        }
+
+        join_and_release_threads( &threads );
+        /* all sorter-threads are done now, tell the progress-thread to terminate! */
+        join_multi_progress( progress_thread, &progress );
+        rc = merge_pool_files( params );
+    }
+    return rc;
+}
diff --git a/tools/fastdump/sorter.h b/tools/fastdump/sorter.h
new file mode 100644
index 0000000..1c0aa26
--- /dev/null
+++ b/tools/fastdump/sorter.h
@@ -0,0 +1,75 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_sorter_
+#define _h_sorter_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_klib_text_
+#include <klib/text.h>
+#endif
+
+#ifndef _h_atomic_
+#include <atomic.h>
+#endif
+
+#ifndef _h_kfs_directory_
+#include <kfs/directory.h>
+#endif
+
+#ifndef _h_raw_read_iter_
+#include "raw_read_iter.h"
+#endif
+
+
+typedef struct sorter_params
+{
+    KDirectory * dir;
+    const char * acc;    
+    const char * output_filename;
+    const char * index_filename;
+    const char * temp_path;
+    struct raw_read_iter * src;
+    size_t buf_size, mem_limit, prefix, num_threads, cursor_cache;
+    atomic_t * sort_progress;
+    bool show_progress;
+} sorter_params;
+
+rc_t run_sorter( const sorter_params * params );
+rc_t run_sorter_pool( const sorter_params * params );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/fastdump/special_iter.c b/tools/fastdump/special_iter.c
new file mode 100644
index 0000000..1187d8e
--- /dev/null
+++ b/tools/fastdump/special_iter.c
@@ -0,0 +1,98 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "special_iter.h"
+#include "helper.h"
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+typedef struct special_iter
+{
+    struct cmn_iter * cmn;
+    uint32_t prim_alig_id, cmp_read_id, spot_group_id;
+} special_iter;
+
+
+void destroy_special_iter( struct special_iter * iter )
+{
+    if ( iter != NULL )
+    {
+        destroy_cmn_iter( iter->cmn );
+        free( ( void * ) iter );
+    }
+}
+
+rc_t make_special_iter( cmn_params * params, struct special_iter ** iter )
+{
+    rc_t rc = 0;
+    special_iter * i = calloc( 1, sizeof * i );
+    if ( i == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        ErrMsg( "make_special_iter.calloc( %d ) -> %R", ( sizeof * i ), rc );
+    }
+    else
+    {
+        rc = make_cmn_iter( params, "SEQUENCE", &i->cmn );
+        if ( rc == 0 )
+            rc = cmn_iter_add_column( i->cmn, "PRIMARY_ALIGNMENT_ID", &i->prim_alig_id );
+        if ( rc == 0 )
+            rc = cmn_iter_add_column( i->cmn, "CMP_READ", &i->cmp_read_id );
+        if ( rc == 0 )
+            rc = cmn_iter_add_column( i->cmn, "SPOT_GROUP", &i->spot_group_id );
+        if ( rc == 0 )
+            rc = cmn_iter_range( i->cmn, i->prim_alig_id );
+
+        if ( rc != 0 )
+            destroy_special_iter( i );
+        else
+            *iter = i;
+    }
+    return rc;
+}
+
+
+bool get_from_special_iter( struct special_iter * iter, special_rec * rec, rc_t * rc )
+{
+    bool res = cmn_iter_next( iter->cmn, rc );
+    if ( res )
+    {
+        rec->row_id = cmn_iter_row_id( iter->cmn );
+        *rc = cmn_read_uint64_array( iter->cmn, iter->prim_alig_id, rec->prim_alig_id, 2, &rec->num_reads );
+        if ( *rc == 0 )
+            *rc = cmn_read_String( iter->cmn, iter->cmp_read_id, &rec->cmp_read );
+        if ( *rc == 0 )
+            *rc = cmn_read_String( iter->cmn, iter->spot_group_id, &rec->spot_group );
+    }
+    return res;
+
+}
+
+uint64_t get_row_count_of_special_iter( struct special_iter * iter )
+{
+    return cmn_iter_row_count( iter->cmn );
+}
diff --git a/tools/fastdump/special_iter.h b/tools/fastdump/special_iter.h
new file mode 100644
index 0000000..8bb45ba
--- /dev/null
+++ b/tools/fastdump/special_iter.h
@@ -0,0 +1,69 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_special_iter_
+#define _h_special_iter_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_klib_text_
+#include <klib/text.h>
+#endif
+
+#ifndef _h_cmn_iter_
+#include "cmn_iter.h"
+#endif
+
+struct special_iter;
+
+typedef struct special_rec
+{
+    int64_t row_id;
+    uint64_t prim_alig_id[ 2 ];
+    uint32_t num_reads;
+    String cmp_read;
+    String spot_group;
+} special_rec;
+
+void destroy_special_iter( struct special_iter * iter );
+
+rc_t make_special_iter( cmn_params * params, struct special_iter ** iter );
+
+bool get_from_special_iter( struct special_iter * iter, special_rec * rec, rc_t * rc );
+
+uint64_t get_row_count_of_special_iter( struct special_iter * iter );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/fastdump/todo.txt b/tools/fastdump/todo.txt
new file mode 100644
index 0000000..258aa29
--- /dev/null
+++ b/tools/fastdump/todo.txt
@@ -0,0 +1,3 @@
+* progress-bar in merge ( if asked for )
+* check memory if no memory-limit provided
+* check for space on scratch or current-directory
\ No newline at end of file
diff --git a/tools/fastdump/verify.sh b/tools/fastdump/verify.sh
new file mode 100755
index 0000000..345a188
--- /dev/null
+++ b/tools/fastdump/verify.sh
@@ -0,0 +1,81 @@
+#!/bin/bash
+
+execute()
+{
+    echo "------------------------------------------------------"
+    echo $1
+    eval $1
+    echo "."
+}
+
+ACC1="SRR341578"
+
+# size is about 20 MB
+# special: 2s vs 3.8s, fastq: 2.3s vs 4.7s
+ACC2="SRR1172940"
+
+# size is about 200 MB
+# special: 13s vs 48s, fastq: 17s vs 57s
+ACC3="SRR353895"
+
+# size is about 2 GB
+# special: 1m13s vs 11m25s, fastq: 1m38s vs 11m56s
+ACC4="SRR392046"
+
+#size is about 20 GB
+#special: 21m34s vs ???, fastq: 34m17s vs 124m20s
+ACC5="SRR534041"
+
+ACC_ONLY_1_READ="SRR449498"
+
+SCRATCH="/panfs/traces01/compress/qa/raetzw/fastdump/"
+THREADS="6"
+
+check_special()
+{
+    ACC="$1"
+    FASTDUMP_OUT="$SCRATCH$ACC.fastdump.special.txt"
+    VDB_DUMP_OUT="$SCRATCH$ACC.vdb_dump.special.txt"
+    
+    #remove output
+    CMD="rm -rf $FASTDUMP_OUT $VDB_DUMP_OUT"
+    execute "$CMD"
+
+    #produce the output using the lookup-file
+    CMD="time fastdump $ACC -t $SCRATCH -f special -o $FASTDUMP_OUT -e $THREADS -p"
+    execute "$CMD"
+
+    #produce the same output using vdb-dump with internal schema-joins
+    CMD="time vdb-dump $ACC -C SPOT_ID,READ,SPOT_GROUP -f tab > $VDB_DUMP_OUT"
+    execute "$CMD"
+
+    #verify that the output of fastdump via vdb-dump
+    CMD="time diff -q $FASTDUMP_OUT $VDB_DUMP_OUT"
+    execute "$CMD"
+}
+
+check_fastq()
+{
+    ACC="$1"
+    FASTDUMP_OUT="$SCRATCH$ACC.fastdump.fastq.txt"
+    VDB_DUMP_OUT="$SCRATCH$ACC.vdb_dump.fastq.txt"
+    
+    #remove output
+    CMD="rm -rf $FASTDUMP_OUT $VDB_DUMP_OUT"
+    execute "$CMD"
+
+    #produce the output using the lookup-file
+    CMD="time fastdump $ACC -t $SCRATCH -f fastq -o $FASTDUMP_OUT -e $THREADS -p"
+    execute "$CMD"
+
+    #produce the same output using vdb-dump with internal schema-joins
+    CMD="time vdb-dump $ACC -f fastq > $VDB_DUMP_OUT"
+    execute "$CMD"
+
+    #verify that the output of fastdump via vdb-dump
+    CMD="time diff -q $FASTDUMP_OUT $VDB_DUMP_OUT"
+    execute "$CMD"
+}
+
+check_special "$ACC2"
+check_fastq "$ACC2"
diff --git a/tools/fastq-dump/Makefile b/tools/fastq-dump/Makefile
new file mode 100644
index 0000000..bf9d6ae
--- /dev/null
+++ b/tools/fastq-dump/Makefile
@@ -0,0 +1,93 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+
+MODULE = tools/fastq-dump
+
+INT_TOOLS = 
+
+EXT_TOOLS = \
+	fastq-dump-new \
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# std
+#
+$(TARGDIR)/std: \
+	$(addprefix $(BINDIR)/,$(ALL_TOOLS))
+
+.PHONY: $(TARGDIR)/std
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# Common dumper definitions
+#
+DUMP_LIBS = \
+	-lncbi-ngs-c++    \
+	-lngs-c++         \
+	-lncbi-vdb-static \
+	-lkapp \
+	-stk-version
+
+#-------------------------------------------------------------------------------
+# fastq-dump
+#
+FASTQ_DUMP_SRC = \
+	args    \
+	filters \
+	fastq-dump
+
+INCDIRS += -I $(TOP)/ngs/ngs-c++
+
+FASTQ_DUMP_OBJ = \
+	$(addsuffix .$(OBJX),$(FASTQ_DUMP_SRC))
+
+$(BINDIR)/fastq-dump-new: $(FASTQ_DUMP_OBJ)
+	$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(DUMP_LIBS)
diff --git a/tools/fastq-dump/args.cpp b/tools/fastq-dump/args.cpp
new file mode 100644
index 0000000..d7455a4
--- /dev/null
+++ b/tools/fastq-dump/args.cpp
@@ -0,0 +1,622 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <sysalloc.h>
+
+#ifndef _h_klib_defs_
+#include <klib/defs.h>
+#endif
+
+#include <sstream>
+
+#include <kapp/args.h>
+#include <kapp/main.h>
+
+#include <string.h>
+
+#include "args.hpp"
+
+using namespace ngs;
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+/* AOptDef empementation                                       */
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+AOptDef :: AOptDef ()
+{
+    reset ();
+}   /* AOptDef :: AOptDef () */
+
+AOptDef :: AOptDef ( const AOptDef & OptDef )
+{
+    reset ( OptDef );
+}   /* AOptDef :: AOptDef () */
+
+AOptDef :: ~AOptDef ()
+{
+    reset ();
+}   /* AOptDef :: ~AOptDef () */
+
+AOptDef &
+AOptDef :: operator = ( const AOptDef & OptDef )
+{
+    if ( this != & OptDef ) {
+        reset ( OptDef );
+    }
+
+    return * this;
+}   /* AOptDef :: AOptDef () */
+
+void
+AOptDef :: reset ()
+{
+    _M_name . clear ();
+    _M_aliases . clear ();
+    _M_param . clear ();
+    _M_hlp . clear ();
+    _M_max_count = 0;
+    _M_need_value = true;
+    _M_required = true;
+}   /* AOptDef :: reset () */
+
+void
+AOptDef :: reset ( const AOptDef & OptDef )
+{
+    _M_name = OptDef . _M_name;
+    _M_aliases = OptDef . _M_aliases;
+    _M_param = OptDef . _M_param;
+    _M_hlp = OptDef . _M_hlp;
+    _M_max_count = OptDef . _M_max_count;
+    _M_need_value = OptDef . _M_need_value;
+    _M_required = OptDef . _M_required;
+}   /* AOptDef :: reset () */
+
+bool
+AOptDef :: good () const
+{
+    return ! _M_name . empty ();
+}   /* AOptDef :: good () */
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+/* AOPBase impementation                                       */
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+AOPBase :: AOPBase ()
+:   _M_exist ( false )
+{
+    reset ();
+}   /* AOPBase () */
+
+AOPBase :: ~AOPBase ()
+{
+    reset ();
+}   /* AOPBase :: ~AOPBase () */
+
+void
+AOPBase :: reset ( const String & , Args * , bool )
+{
+    throw ErrorMsg ( "reset: Unimpemented method" );
+}   /* AOPBase :: reset () */
+
+void
+AOPBase :: reset ()
+{
+    _M_exist = false;
+    _M_name . clear ();
+    _M_val . clear ();
+}   /* AOPBase :: reset () */
+
+void
+AOPBase :: reset ( const AOPBase & Bse )
+{
+    reset ();
+
+    _M_val = Bse . _M_val;
+    _M_name = Bse . _M_name;
+    _M_exist = Bse . _M_exist;
+}   /* AOPBase :: reset () */
+
+uint32_t
+AOPBase :: valCount () const
+{
+/* Not sure about it !!!
+    if ( ! exist () ) {
+        throw ErrorMsg ( "valCount: Value not exits" );
+    }
+
+    return _M_val . size ();
+*/
+
+    return exist () ? _M_val . size () : 0;
+}   /* AOPBase :: valCount () */
+
+const String &
+AOPBase :: val ( uint32_t idx ) const
+{
+    uint32_t cnt = valCount ();
+
+    if ( cnt <= idx ) {
+        throw ErrorMsg ( "val: Invalid index" );
+    }
+
+    return _M_val [ idx ];
+}   /* AOPBase :: val () */
+
+static
+void CC
+__handle_error ( const char * arg, void * data )
+{
+    std :: stringstream str;
+    str << "Can not convert \"" << arg << "\" to int for paramter \"" << ( char * ) data << "\"";
+    throw ErrorMsg ( str . str () );
+}   /* __handle_error () */
+
+uint32_t
+AOPBase :: uint32Val ( uint32_t idx ) const
+{
+    return AsciiToU32 (
+                    val ( idx ) . c_str (),
+                    __handle_error,
+                    ( void * ) _M_name . c_str ()
+                    );
+}   /* AOPBase :: uint32Val () */
+
+int32_t
+AOPBase :: int32Val ( uint32_t idx ) const
+{
+    return AsciiToI32 (
+                    val ( idx ) . c_str (),
+                    __handle_error,
+                    ( void * ) _M_name . c_str ()
+                    );
+}   /* AOPBase :: int32Val () */
+
+uint64_t
+AOPBase :: uint64Val ( uint32_t idx ) const 
+{
+    return AsciiToU64 (
+                    val ( idx ) . c_str (),
+                    __handle_error,
+                    ( void * ) _M_name . c_str ()
+                    );
+}   /* AOPBase :: uint64Val () */
+
+int64_t
+AOPBase :: int64Val ( uint32_t idx ) const
+{
+    return AsciiToI64 (
+                    val ( idx ) . c_str (),
+                    __handle_error,
+                    ( void * ) _M_name . c_str ()
+                    );
+}   /* AOPBase :: int64Val () */
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+/* AOptVal impementation                                       */
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+AOptVal :: AOptVal ()
+:   AOPBase ()
+{
+}   /* AOptVal :: AOptVal () */
+
+AOptVal :: AOptVal ( const AOptVal & Val )
+:   AOPBase ()
+{
+    AOPBase :: reset ( Val );
+}   /* AOptVal :: AOptVal () */
+
+AOptVal &
+AOptVal :: operator = ( const AOptVal & Val )
+{
+    if ( this != & Val ) {
+        AOPBase :: reset ( Val );
+    }
+
+    return * this;
+}   /* AOptVal :: operator = () */
+
+void
+AOptVal :: reset ( const String & Name, Args * TheArgs, bool needValue )
+{
+    AOPBase :: reset ();
+
+    if ( TheArgs == NULL ) {
+        throw ErrorMsg ( "reset: NULL args passed" );
+    }
+
+    if ( Name . empty () ) {
+        throw ErrorMsg ( "reset: Empty name passed" );
+    }
+
+    uint32_t count = 0;
+    if ( ArgsOptionCount ( TheArgs, Name . c_str (), & count ) != 0 ) {
+        throw ErrorMsg ( String ( "reset: Can not get count for option \"" ) + Name + "\"" );
+    }
+
+    if ( count == 0 ) {
+        return;
+    }
+
+    _M_val . resize ( count );
+    if ( needValue ) {
+        for ( uint32_t i = 0; i < count; i ++ ) {
+            const void * val = NULL;
+            if ( ArgsOptionValue ( TheArgs, Name . c_str (), i, & val ) != 0 ) {
+                std :: stringstream Vsg;
+                Vsg << "reset: Can not get value for option \"" << Name;
+                Vsg << "\" in series " << i;
+                throw ErrorMsg ( Vsg . str () );
+            }
+
+            _M_val [ i ] = val == NULL ? "" : static_cast <char const*> (val);
+        }
+    }
+
+    _M_name = Name;
+    _M_exist = true;
+}   /* AOptVal :: reset () */
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+/* AParVal impementation                                       */
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+AParVal :: AParVal ()
+:   AOPBase ()
+{
+}   /* AParVal :: AParVal () */
+
+AParVal :: AParVal ( const AParVal & Val )
+:   AOPBase ()
+{
+    AOPBase :: reset ( Val );
+}   /* AParVal :: AParVal () */
+
+AParVal &
+AParVal :: operator = ( const AParVal & Val )
+{
+    if ( this != & Val ) {
+        AOPBase :: reset ( Val );
+    }
+
+    return * this;
+}   /* AParVal :: operator = () */
+
+void
+AParVal :: reset ( const String & Name, Args * TheArgs, bool )
+{
+    AOPBase :: reset ();
+
+    if ( TheArgs == NULL ) {
+        throw ErrorMsg ( "reset: NULL args passed" );
+    }
+
+    uint32_t count = 0;
+    if ( ArgsParamCount ( TheArgs, & count ) != 0 ) {
+        throw ErrorMsg ( "reset: Can not get count for parameters" );
+    }
+
+    if ( count == 0 ) {
+        return;
+    }
+
+    _M_val . resize ( count );
+    for ( uint32_t i = 0; i < count; i ++ ) {
+        const void * val = NULL;
+        if ( ArgsParamValue ( TheArgs, i, & val ) != 0 ) {
+            std :: stringstream Vsg;
+            Vsg << "reset: Can not get parameter in series " << i;
+            throw ErrorMsg ( Vsg . str () );
+        }
+
+        _M_val [ i ] = static_cast <char const*> (val);
+    }
+
+    _M_name = Name;
+    _M_exist = true;
+}   /* AParVal :: reset () */
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+/* AArgs impementation                                         */
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+AArgs :: MArgs AArgs :: _sM_args;
+
+AArgs :: AArgs ()
+:   _M_args ( NULL )
+,   _M_standards_added ( false )
+,   _M_progName ( "" )
+{
+}   /* AArgs :: AArgs () */
+
+AArgs :: ~AArgs ()
+{
+    /* We are not disposing Arguments, it should be done manually */
+}   /* AArgs :: ~AArgs () */
+
+void
+AArgs :: init ( bool AddStandardOrguments )
+{
+    if ( good () ) {
+        throw ErrorMsg ( "AArgs: We are good" );
+    }
+
+    Args * TempArgs;
+    if ( ArgsMake ( & TempArgs ) != 0 ) {
+        throw ErrorMsg ( "AArgs: Can not make Args" );
+    }
+
+    if ( TempArgs == NULL ) {
+        throw ErrorMsg ( "AArgs: Can not allocate Args" );
+    }
+
+    if ( AddStandardOrguments ) {
+        try {
+            __addStdOpts ( TempArgs );
+            _M_standards_added = true;
+        }
+        catch ( ... ) {
+            __disposeArgs ( TempArgs );
+
+            throw;
+        }
+    }
+
+    _M_args = TempArgs;
+
+    try {
+        __customInit ();
+    }
+    catch ( ... ) {
+        __disposeArgs ( _M_args );
+
+        _M_args = NULL;
+
+        throw;
+    }
+
+    __regArgs ( _M_args, this );
+
+}   /* AArgs :: init () */
+
+void
+AArgs :: __customInit ()
+{
+}   /* AArgs :: __customInit () */
+
+void
+AArgs :: dispose ()
+{
+    if ( good () ) {
+        __customDispose ();
+
+        Args * TheArgs = _M_args;
+        _M_args = NULL;
+
+        _M_optDefs . clear ();
+        _M_standards_added = false;
+
+        __deregArgs ( TheArgs );
+        __disposeArgs ( TheArgs );
+
+        _M_progName . clear ();
+    }
+}   /* AArgs :: dispose () */
+
+void 
+AArgs :: __customDispose () 
+{
+}   /* AArgs :: __customDispose () */
+
+void 
+AArgs :: __disposeArgs ( Args * TheArgs )
+{
+    if ( TheArgs != NULL ) {
+        ArgsWhack ( TheArgs );
+    }
+}   /* AArgs :: __disposeArgs () */
+
+void
+AArgs :: addStdOpts ()
+{
+    if ( ! good () ) {
+        throw ErrorMsg ( "addStdOpts: Not good" );
+    }
+
+    try {
+        __addStdOpts ( _M_args );
+    }
+    catch ( ... ) {
+        dispose ();
+
+        throw;
+    }
+}   /* AArgs :: addStdOpts () */
+
+static
+void
+__toOpt ( const AOptDef & In, OptDef & Out )
+{
+    if ( ! In . good () ) {
+        throw ErrorMsg ( "__toOpt: IN is not good" );
+    }
+
+    memset ( & Out, 0, sizeof ( OptDef ) );
+
+    Out . name = In . getName ();
+    Out . aliases = In . getAliases ();
+    const char * Hlp = In . getHlp ();
+    Out . help = & Hlp;
+    Out . max_count = In . maxCount ();
+    Out . needs_value = In . needValue ();
+    Out . required = In . required ();
+}   /* __toOpt () */
+
+void
+AArgs :: addOpt ( const AOptDef & Opt )
+{
+    if ( ! good () ) {
+        throw ErrorMsg ( "addOpt: Not good " );
+    }
+
+    struct OptDef TheOpt;
+    __toOpt ( Opt, TheOpt );
+
+    if ( ArgsAddOptionArray ( _M_args, & TheOpt, 1 ) != 0 ) {
+        throw ErrorMsg ( "addOpt: Can not add option" );
+    }
+
+    _M_optDefs . insert ( _M_optDefs . end (), Opt );
+}   /* AArgs :: addOpt () */
+
+void
+AArgs :: __addStdOpts ( Args * TheArgs )
+{
+    if ( TheArgs == NULL ) {
+        throw ErrorMsg ( "__addStdOpts: Very not good" );
+    }
+
+    if ( ArgsAddStandardOptions ( TheArgs ) != 0 ) {
+        throw ErrorMsg ( "__addStdOpts: Can not add standard options" );
+    }
+}   /* AArgs :: __addStdOpts () */
+
+void
+AArgs :: parse ( int argc, char ** argv )
+{
+    if ( ! good () ) {
+        throw ErrorMsg ( "parseArgs: Not good" );
+    }
+
+    if ( ArgsParse ( _M_args, argc, argv ) != 0 ) {
+        throw ErrorMsg ( "parseArgs: Can not parse arguments" );
+    }
+
+    const char * prog;
+    if ( ArgsProgram ( _M_args, NULL, & prog ) != 0 ) {
+        throw ErrorMsg ( "parseArgs: Can not extract Progname" );
+    }
+    _M_progName =  prog;
+
+        /*) Here we should handle standard argumends
+            NOTE: help and version are managing authomatically
+         (*/
+    if ( _M_standards_added ) {
+        if ( ArgsHandleStandardOptions ( _M_args ) != 0 ) {
+            throw ErrorMsg ( "parseArgs: Can not handle standard options" );
+        }
+    }
+
+    __customParse ();
+}   /* AArgs :: parse () */
+
+void 
+AArgs :: __customParse () 
+{
+    /* nothing to do here */
+}   /* AArgs :: __customParse () */
+
+void
+AArgs :: __regArgs ( Args * TheArgs, AArgs * TheAArgs )
+{
+    if ( __getArgs ( TheArgs ) != NULL ) {
+        throw ErrorMsg ( "__regArgs: Already registered" );
+    }
+
+    _sM_args [ TheArgs ] = TheAArgs;
+}   /* AArgs :: __regArgs () */
+
+AArgs *
+AArgs :: __getArgs ( Args * TheArgs )
+{
+    if ( TheArgs != NULL ) {
+        MArgsI Iter = _sM_args . find ( TheArgs );
+        if ( Iter != _sM_args . end () ) {
+            return ( * Iter ) . second;
+        }
+    }
+    return NULL;
+}   /* AArgs :: __getArgs () */
+
+void
+AArgs :: __deregArgs ( Args * TheArgs )
+{
+    if ( TheArgs != NULL ) {
+        MArgsI Iter = _sM_args . find ( TheArgs );
+        if ( Iter != _sM_args . end () ) {
+            _sM_args . erase ( Iter );
+        }
+    }
+}   /* AArgs :: __deregArgs () */
+
+AOptVal
+AArgs :: optVal ( const char * name ) const
+{
+    if ( ! good () ) {
+        throw ErrorMsg ( "optVal: Not good" );
+    }
+
+    if ( name == NULL ) {
+        throw ErrorMsg ( "optVal: NULL name passed" );
+    }
+
+    AOptVal retVal;
+    retVal . reset ( name, _M_args, optDef ( name ) . needValue () );
+    return retVal;
+}   /* AArgs :: optVal () */
+
+AParVal
+AArgs :: parVal () const
+{
+    if ( ! good () ) {
+        throw ErrorMsg ( "parVal: Not good" );
+    }
+
+    AParVal retVal;
+    retVal . reset ( "parameters", _M_args, true );
+    return retVal;
+}   /* AArgs :: paramVal () */
+
+const AOptDef &
+AArgs :: optDef ( const String & name ) const
+{
+    if ( ! good () ) {
+        throw ErrorMsg ( "optDef: Not good" );
+    }
+
+    for (
+        VOptI S = _M_optDefs . begin ();
+        S != _M_optDefs . end ();
+        S ++
+    ) {
+        if ( ( * S ) . getName () == name ) {
+            return * S;
+        }
+    }
+
+    throw ErrorMsg ( String ( "optDef: Can not find definition for opotion \"" ) + name + "\"" );
+}   /* AArgs :: optDef () */
+
+void
+AArgs :: usage () const
+{
+    :: Usage ( _M_args );
+}   /* AArgs :: Usage () */
diff --git a/tools/fastq-dump/args.hpp b/tools/fastq-dump/args.hpp
new file mode 100644
index 0000000..8fe241e
--- /dev/null
+++ b/tools/fastq-dump/args.hpp
@@ -0,0 +1,330 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_outpost_args_
+#define _h_outpost_args_
+
+#ifndef _h_klib_defs_
+#include <klib/defs.h>
+#endif
+
+#include <vector>
+#include <map>
+
+#include <ngs/ErrorMsg.hpp>
+#include <ngs/StringRef.hpp>
+
+/* ##########################################################
+   # Big WARNING : those aren't thread safe classes
+   ########################################################## */
+
+/*))
+ // Right namespace?
+((*/
+namespace ngs {
+
+/*)))
+ ///    These are simple adapters for methods and structures introduced
+ \\\    in kapp/args.h. I agree, these are looks lame, but I will use
+ ///    them ... 
+(((*/
+
+/*))    Adapter for OptDef ... 
+ ((*/
+class AOptDef {
+private :
+    typedef struct OptDef OptDef;
+
+public :
+        /*) Various constructors and destructors 
+         (*/
+    AOptDef ();
+    AOptDef ( const AOptDef & Opt );
+    ~AOptDef ();
+
+    bool good () const;
+
+    AOptDef & operator = ( const AOptDef & Opt );
+
+    void reset ( const AOptDef & Opt );
+    void reset ();
+
+        /*) Various setters/getters
+         (*/
+    inline const char * getName ( ) const
+                {
+                    return _M_name . empty ()
+                                    ? NULL
+                                    : _M_name . c_str ()
+                                    ;
+                };
+    inline void setName ( const char * Name = NULL )
+                {
+                    if ( Name == NULL )
+                        _M_name . clear ();
+                    else 
+                        _M_name = Name;
+                };
+
+    inline const char * getAliases ( ) const
+                {
+                    return _M_aliases . empty ()
+                                    ? NULL
+                                    : _M_aliases . c_str ()
+                                    ;
+                };
+    inline void setAliases ( const char * Aliases = NULL )
+                {
+                    if ( Aliases == NULL )
+                        _M_aliases . clear ();
+                    else 
+                        _M_aliases = Aliases;
+                };
+
+    inline const char * getParam ( ) const
+                {
+                    return _M_param . empty ()
+                                    ? NULL
+                                    : _M_param . c_str ()
+                                    ;
+                };
+    inline void setParam ( const char * Param = NULL )
+                {
+                    if ( Param == NULL )
+                        _M_param . clear ();
+                    else 
+                        _M_param = Param;
+                };
+
+    inline uint16_t maxCount () const
+                {
+                    return _M_max_count;
+                };
+    inline void setMaxCount ( uint16_t MaxCount = 0 )
+                {
+                    _M_max_count = MaxCount;
+                };
+
+    inline bool needValue () const
+                {
+                    return _M_need_value;
+                };
+    inline void setNeedValue ( bool NeedValue = true )
+                {
+                    _M_need_value = NeedValue;
+                };
+
+    inline bool required () const
+                {
+                    return _M_required;
+                };
+    inline void setRequired ( bool Required = true )
+                {
+                    _M_required = Required;
+                 };
+
+    inline const char * getHlp () const
+                {
+                    return _M_hlp.c_str ();
+                };
+
+    inline void setHlp ( const String & HlpStr = "" )
+                {
+                    _M_hlp = HlpStr;
+                };
+private :
+
+    String _M_name;
+    String _M_aliases;
+    String _M_param;
+    String _M_hlp;
+    uint16_t _M_max_count;
+    bool _M_need_value;
+    bool _M_required;
+};  /* class AOptDef */
+
+/*))    Something extra for the same money
+ ((*/
+class AOPBase {
+public :
+    typedef struct Args Args;
+
+    typedef std :: vector < String > VVal;
+    typedef VVal :: const_iterator VValI;
+
+public :
+    AOPBase ();
+    virtual ~AOPBase ();
+
+    virtual void reset (
+                    const String & Name,
+                    Args * TheArgs,
+                    bool needValue
+                    ) = 0;
+
+    inline bool exist () const
+            {
+                return _M_exist;
+            };
+
+    inline const String & name () const
+            { 
+                return _M_name;
+            };
+
+    inline bool hasVal() const
+            {
+                return valCount () != 0;
+            };
+
+    uint32_t valCount () const;
+    const String & val ( uint32_t idx = 0 ) const;
+    uint32_t uint32Val ( uint32_t idx = 0 ) const;
+    int32_t int32Val ( uint32_t idx = 0 ) const;
+    uint64_t uint64Val ( uint32_t idx = 0 ) const;
+    int64_t int64Val ( uint32_t idx = 0 ) const;
+
+protected :
+    void reset ();
+    void reset ( const AOPBase & Bse );
+
+    bool _M_exist;
+
+    String _M_name;
+
+    VVal _M_val;
+};  /* class AOPBase */
+
+class AOptVal : public AOPBase {
+public :
+    AOptVal ();
+    AOptVal ( const AOptVal & Val );
+
+    AOptVal & operator = ( const AOptVal & Val );
+
+    void reset ( const String & Name, Args * TheArgs, bool needValue );
+};  /* class AOptVal */
+
+class AParVal : public AOPBase {
+public :
+    AParVal ();
+    AParVal ( const AParVal & Val );
+
+    AParVal & operator = ( const AParVal & Val );
+
+    void reset ( const String & Name, Args * TheArgs, bool needValue );
+};  /* class AParVal */
+
+/*))))  Adapter for Args structure.
+ ////
+ \\\\   Nothing new, it fully repeats behaviour of Args** methods.
+ ////   There is pattern how to use it :
+ \\\\       a.init (); // initializes Args
+ ////       for ( .... ) {
+ \\\\           a.addOpt ( Opt );
+ ////       }
+ \\\\       a.parseArgs ( argc, argv );
+ ////       a.dispose ();
+((((*/
+class AArgs {
+private :
+    typedef struct Args Args;
+
+    typedef std :: map < Args * , AArgs * > MArgs;
+    typedef MArgs :: iterator MArgsI;
+
+    typedef std :: vector < AOptDef > VOpt;
+    typedef VOpt :: const_iterator VOptI;
+
+    typedef std :: vector < String > VVal;
+    typedef VVal :: const_iterator VValI;
+
+public :
+    AArgs ();
+    virtual ~AArgs ();
+
+        /* Three general stepd to perform : init/parse/dispose
+         */
+    void init ( bool AddStandardOrguments = false );
+    void parse ( int argc, char ** argv );
+    void dispose ();
+
+        /*  Are we good ? virtual ... ouch
+         */
+    inline bool good () const { return _M_args != NULL; };
+
+        /*  Options handling
+         */
+    void addStdOpts ();
+    void addOpt ( const AOptDef & Opt );
+
+    inline size_t optDefCount () const
+            { return _M_optDefs . size (); };
+    inline const AOptDef & optDef ( size_t i )
+            { return _M_optDefs [ i ]; };
+
+        /*  Here is program name
+         */
+    inline const String & prog () const
+            { return _M_progName; };
+
+        /* Here are getters for option and paramter values 
+         */
+    AOptVal optVal ( const char * name ) const;
+    AParVal parVal () const;
+
+    void usage () const;
+
+protected :
+    virtual void __customInit ();
+    virtual void __customParse ();
+    virtual void __customDispose ();
+
+private :
+    static MArgs _sM_args;
+
+public :
+    static void __regArgs ( Args * TheArgs, AArgs * TheAArgs );
+    static AArgs * __getArgs ( Args * TheArgs ); 
+    static void __deregArgs ( Args * TheArgs ); 
+
+private :
+    const AOptDef & optDef ( const String & name ) const;
+
+    void __disposeArgs ( Args * TheArgs );
+    void __addStdOpts ( Args * TheArgs );
+
+    Args * _M_args;
+    bool _M_standards_added;
+
+    VOpt _M_optDefs;
+
+    String _M_progName;
+};  /* class AArgs */
+
+};  /* namespace ngs */
+
+#endif /* _h_outpost_args_ */
diff --git a/tools/fastq-dump/fastq-dump.cpp b/tools/fastq-dump/fastq-dump.cpp
new file mode 100644
index 0000000..a9ec0a1
--- /dev/null
+++ b/tools/fastq-dump/fastq-dump.cpp
@@ -0,0 +1,641 @@
+#include <ngs/ncbi/NGS.hpp>
+#include <ngs/ReadCollection.hpp>
+
+#include <klib/out.h>
+#include <kfc/defs.h>
+#include <kapp/main.h>
+
+#include <klib/rc.h>
+#include <kfc/rc.h>
+
+#include <sysalloc.h>
+#include <algorithm>        /* min */
+
+#include <string.h>         /* strcmp () */
+
+#include <algorithm>
+
+#include "args.hpp"
+#include "filters.hpp"
+
+#include "koutstream"
+
+namespace ngs {
+
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+/* Arguments                                                   */
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+class DumpArgs : public AArgs {
+public :
+    static const char * _sM_minSpotIdName;
+    static const char * _sM_maxSpotIdName;
+    static const char * _sM_spotIdName;
+    static const char * _sM_minReadLengthName;
+    static const char * _sM_categoryName;
+    static const char * _sM_fastaName;
+    static const char * _sM_legacyReportName;
+
+    static const int64_t _sM_minSpotIdDefValue = 1;
+    static const int64_t _sM_maxSpotIdDefValue = 0;
+
+public :
+    typedef AArgs PAPAHEN;
+    typedef Read :: ReadCategory ReadCategory;
+
+public :
+    DumpArgs ();
+    ~DumpArgs ();
+
+    inline const String & accession () const
+                { return _M_accession; };
+
+    inline int64_t minSpotId () const
+                { return _M_minSpotId; };
+    inline int64_t maxSpotId () const
+                { return _M_maxSpotId; };
+
+    inline uint64_t minReadLength () const
+                { return _M_minReadLength; };
+
+    inline ReadCategory category () const
+                { return _M_category; };
+
+    inline bool fastaDump () const
+                { return _M_fasta != 0; };
+
+    inline uint64_t fastaDumpWidth () const
+                { return _M_fasta; };
+
+    inline bool legacyReport () const
+                { return _M_legacyReport; };
+
+protected :
+    void __customInit ();
+    void __customParse ();
+    void __customDispose ();
+
+private :
+    String _M_accession;
+
+        /*) Full Spot Fulters
+         (*/
+    int64_t _M_minSpotId;      /* -N | --minSpotId < rowid > */
+    int64_t _M_maxSpotId;      /* -X | --maxSpotId < rowid > */
+    uint64_t _M_minReadLength;  /* -M | --minReadLen <len> */
+    ReadCategory _M_category;   /* -Y | --category */
+    uint64_t _M_fasta;          /* -A | --fasta */
+    bool _M_legacyReport;       /* -L | --legacy-report */
+};
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+/* DumpArgs                                                    */
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+const char * DumpArgs :: _sM_minSpotIdName = "minSpotId";
+const char * DumpArgs :: _sM_maxSpotIdName = "maxSpotId";
+const char * DumpArgs :: _sM_spotIdName = "spotId";
+const char * DumpArgs :: _sM_minReadLengthName = "minReadLength";
+const char * DumpArgs :: _sM_categoryName = "category";
+const char * DumpArgs :: _sM_fastaName = "fasta";
+const char * DumpArgs :: _sM_legacyReportName = "legacy-report";
+
+DumpArgs :: DumpArgs ()
+:   AArgs ()
+,   _M_accession ( "" )
+,   _M_minSpotId ( _sM_minSpotIdDefValue )
+,   _M_maxSpotId ( _sM_maxSpotIdDefValue )
+,   _M_minReadLength ( 0 )
+,   _M_category ( Read :: all )
+,   _M_fasta ( 0 )
+,   _M_legacyReport ( false )
+{
+}   /* DumpArgs :: DumpArgs () */
+
+DumpArgs :: ~DumpArgs ()
+{
+}   /* DumpArgs :: ~DumpArgs () */
+
+void
+DumpArgs :: __customInit ()
+{
+        /*) Here we are adding some extra options 
+         (*/
+    {
+        AOptDef TheOpt;
+
+        TheOpt . setName ( _sM_minSpotIdName );
+        TheOpt . setAliases ( "N" );
+        TheOpt . setParam ( "rowid" );
+        TheOpt . setNeedValue ( true );
+        TheOpt . setRequired ( false );
+        TheOpt . setHlp ( "Minimum spot id" );
+        TheOpt . setMaxCount ( 1 );
+
+        addOpt ( TheOpt );
+    }
+
+    {
+        AOptDef TheOpt;
+
+        TheOpt . setName ( _sM_maxSpotIdName );
+        TheOpt . setAliases ( "X" );
+        TheOpt . setParam ( "rowid" );
+        TheOpt . setNeedValue ( true );
+        TheOpt . setRequired ( false );
+        TheOpt . setHlp ( "Maximum spot id" );
+        TheOpt . setMaxCount ( 1 );
+
+        addOpt ( TheOpt );
+    }
+
+    {
+        AOptDef TheOpt;
+
+        TheOpt . setName ( _sM_spotIdName );
+        TheOpt . setAliases ( "S" );
+        TheOpt . setParam ( "rowid" );
+        TheOpt . setNeedValue ( true );
+        TheOpt . setRequired ( false );
+        TheOpt . setHlp ( "Spot id" );
+        TheOpt . setMaxCount ( 1 );
+
+        addOpt ( TheOpt );
+    }
+
+    {
+        AOptDef TheOpt;
+
+        TheOpt . setName ( _sM_minReadLengthName );
+        TheOpt . setAliases ( "M" );
+        TheOpt . setParam ( "len" );
+        TheOpt . setNeedValue ( true );
+        TheOpt . setRequired ( false );
+        TheOpt . setHlp ( "Filter by sequence length >= <len>" );
+        TheOpt . setMaxCount ( 1 );
+
+        addOpt ( TheOpt );
+    }
+
+    {
+        AOptDef TheOpt;
+
+        TheOpt . setName ( _sM_categoryName );
+        TheOpt . setAliases ( "Y" );
+        TheOpt . setParam ( "alignment" );
+        TheOpt . setNeedValue ( true );
+        TheOpt . setRequired ( false );
+        TheOpt . setHlp ( "Reads to dump. Accepts these values : <fullyAligned>, <partiallyAligned>, <aligned>, <unaligned>, <all>. Optional, default value <all> " );
+        TheOpt . setMaxCount ( 1 );
+
+        addOpt ( TheOpt );
+    }
+    
+    {
+        AOptDef TheOpt;
+
+        TheOpt . setName ( _sM_fastaName );
+        TheOpt . setAliases ( "A" );
+        TheOpt . setParam ( "width" );
+        TheOpt . setNeedValue ( true );
+        TheOpt . setRequired ( false );
+        TheOpt . setHlp ( "FASTA only, no qualities, optional line wrap width (set to zero for no wrapping)" );
+        TheOpt . setMaxCount ( 1 );
+
+        addOpt ( TheOpt );
+    }
+
+    {
+        AOptDef TheOpt;
+
+        TheOpt . setName ( _sM_legacyReportName );
+        TheOpt . setAliases ( "R" );
+        TheOpt . setNeedValue ( false );
+        TheOpt . setRequired ( false );
+        TheOpt . setHlp ( "Use legacy style 'Written spots' for tool" );
+        TheOpt . setMaxCount ( 1 );
+
+        addOpt ( TheOpt );
+    }
+}   /* DumpArgs :: __customInit () */
+
+void
+DumpArgs :: __customDispose ()
+{
+    _M_accession = "";
+    _M_minSpotId = _sM_minSpotIdDefValue;
+    _M_maxSpotId = _sM_maxSpotIdDefValue;
+    _M_minReadLength = 0;
+    _M_category = Read :: all;
+    _M_fasta = 0;
+    _M_legacyReport = false;
+}   /* DumpArgs :: __customDispose () */
+
+void
+DumpArgs :: __customParse ()
+{
+    if ( ! good () ) {
+        throw ErrorMsg ( "__customParse::reset: Not good" );
+    }
+
+    uint32_t cnt = parVal () . valCount ();
+    if ( cnt == 0 ) {
+        throw ErrorMsg ( "__customParse: Too few paramters" );
+    }
+
+    _M_accession = parVal () . val ( 0 );
+
+    if ( _M_accession . empty () ) {
+        std :: cerr << "ERROR: <accession> is not defined" << std :: endl;
+        throw ErrorMsg ( "__custromParse: ERROR: <accession> is not defined" );
+    }
+
+    AOptVal optV = optVal ( _sM_spotIdName );
+    int64_t __spotId = 0;
+
+    if ( optV . exist () ) {
+        if ( optVal ( _sM_minSpotIdName ) . exist () ) {
+            throw ErrorMsg ( String ( "__custromParse: ERROR: parameter \"" ) + _sM_spotIdName + "\" can not coexists with parameter \"" + _sM_minSpotIdName + "\"");
+        }
+
+        if ( optVal ( _sM_maxSpotIdName ) . exist () ) {
+            throw ErrorMsg ( String ( "__custromParse: ERROR: parameter \"" ) + _sM_spotIdName + "\" can not coexists with parameter \"" + _sM_maxSpotIdName + "\"");
+        }
+
+        if ( optV . valCount () != 1 ) {
+            throw ErrorMsg ( String ( "__custromParse: ERROR: Too many \"" ) + _sM_spotIdName + "\" values");
+        }
+
+        __spotId = optV . int64Val ();
+    }
+
+    optV = optVal ( _sM_minSpotIdName );
+    if ( optV . exist () ) {
+        if ( optV . valCount () != 1 ) {
+            throw ErrorMsg ( String ( "__custromParse: ERROR: Too many \"" ) + _sM_minSpotIdName + "\" values");
+        }
+
+        _M_minSpotId = optV . int64Val ();
+    }
+
+    optV = optVal ( _sM_maxSpotIdName );
+    if ( optV . exist () ) {
+        if ( optV . valCount () != 1 ) {
+            throw ErrorMsg ( String ( "__custromParse: ERROR: Too many \"" ) + _sM_maxSpotIdName + "\" values");
+        }
+
+        _M_maxSpotId = optV . int64Val ();
+    }
+
+    if ( __spotId != 0 ) {
+        _M_minSpotId = __spotId;
+        _M_maxSpotId = __spotId;
+    }
+
+    optV = optVal ( _sM_minReadLengthName );
+    if ( optV . exist () ) {
+        if ( optV . valCount () != 1 ) {
+            throw ErrorMsg ( String ( "__custromParse: ERROR: Too many \"" ) + _sM_minReadLengthName + "\" values");
+        }
+
+        _M_minReadLength = optV . uint64Val ();
+    }
+
+    _M_category = Read :: all;
+    optV = optVal ( _sM_categoryName );
+    if ( optV . exist () ) {
+        if ( optV . valCount () != 1 ) {
+            throw ErrorMsg ( String ( "__custromParse: ERROR: Too many \"" ) + _sM_categoryName + "\" values");
+        }
+
+        String __v = optV . val ();
+
+        while ( true ) {
+            if ( __v == "fullyAligned" ) {
+                _M_category = Read :: fullyAligned;
+                break;
+            }
+
+            if ( __v == "partiallyAligned" ) {
+                _M_category = Read :: partiallyAligned;
+                break;
+            }
+
+            if ( __v == "aligned" ) {
+                _M_category = Read :: aligned;
+                break;
+            }
+
+            if ( __v == "unaligned" ) {
+                _M_category = Read :: unaligned;
+                break;
+            }
+
+            if ( __v == "all" ) {
+                _M_category = Read :: all;
+                break;
+            }
+
+            throw ErrorMsg ( String ( "__customParse: ERROR: Invalid value \"" + __v + "\" for option \"" + _sM_categoryName + "\"" ) );
+        }
+    }
+
+    _M_fasta = 0;
+    optV = optVal ( _sM_fastaName );
+    if ( optV . exist () ) {
+        if ( optV . valCount () != 1 ) {
+            throw ErrorMsg ( String ( "__custromParse: ERROR: Too many \"" ) + _sM_fastaName + "\" values");
+        }
+
+        _M_fasta = optV . uint64Val ();
+    }
+
+    _M_legacyReport = optVal ( _sM_legacyReportName ) . exist ();
+
+}   /* DumpArgs :: __customParse () */
+
+}; /* namespace ngs */
+
+/*))
+ //  KMain, and all other
+((*/
+
+using namespace ngs;
+
+const char UsageDefaultName[] = "fq-d";
+
+rc_t CC
+UsageSummary ( const char * progname )
+{
+        /*) Standard usage of that program
+         (*/
+    return KOutMsg (
+                "\n"
+                "Usage:\n"
+                "  %s [Options] <Accession>\n"
+                "\n"
+                "\n"
+                "Use option --help for more information\n"
+                "\n",
+                progname
+                );
+}
+
+rc_t CC
+Usage ( const Args * a )
+{
+    if ( a == NULL ) {
+        throw ngs :: ErrorMsg ( "Usage: NULL args passed" );
+    }
+
+    const char * prog;
+
+    if ( ArgsProgram ( a, NULL, & prog ) != 0 ) {
+        throw ngs :: ErrorMsg ( "Usage: Infalid args passed" );
+    }
+
+    UsageSummary ( prog );
+
+    KOutMsg ( "OPTIONS:\n" );
+
+    HelpOptionsStandard ();
+
+    AArgs * TheArgs = AArgs :: __getArgs ( const_cast < Args * > ( a ) );
+
+    if ( TheArgs == NULL ) {
+        throw ngs :: ErrorMsg ( "Usage: Using unregistered usage" );
+    }
+
+    size_t c = TheArgs -> optDefCount ();
+    for ( size_t i = 0; i < c; i ++ ) {
+        const AOptDef & o = TheArgs -> optDef ( i );
+
+        const char * c [] = { NULL, NULL };
+        c [ 0 ] = o . getHlp ();
+
+        HelpOptionLine (
+                        o . getAliases (),
+                        o . getName (),
+                        o . getParam (),
+                        c
+                        );
+
+    }
+
+    return 0;
+}
+
+static void run ( const DumpArgs & TheArgs );
+
+rc_t
+KMain ( int argc, char * argv [] )
+{
+    try {
+        DumpArgs TheArgs;
+
+        try {
+            TheArgs . init ( true );
+            TheArgs . parse ( argc, argv );
+        }
+        catch ( ... ) {
+            UsageSummary ( TheArgs . prog () . c_str () );
+            throw;
+        }
+
+        if ( ! TheArgs . good () ) {
+            TheArgs . usage ();
+
+            return 1;
+        }
+
+        run ( TheArgs );
+
+        TheArgs . dispose ();
+    }
+    catch ( std :: exception & E ) {
+        std :: cerr << "Exception handled '" << E.what () << "'" << std :: endl;
+
+        return 1;
+    }
+    catch ( ... ) {
+        std :: cerr << "UNKNOWN exception handled" << std :: endl;
+
+        return 2;
+    }
+
+    return 0;
+}   /* KMain () */
+
+static
+void
+setupFilters ( AFilters & Filters, const DumpArgs & TheArgs )
+{
+    if ( TheArgs . minReadLength () != 0 ) {
+        Filters . addLengthFilter ( TheArgs . minReadLength () );
+    }
+}   /* setupFilters () */
+
+static
+void
+dumpFastQ (
+        int64_t SpotId,
+        const ngs :: String & CollectionName,
+        const ReadIterator & Iterator
+)
+{
+        /*)  We do not check values for arguments validity!
+         (*/
+    StringRef ReadName = Iterator . getReadName ();
+    StringRef Bases = Iterator . getReadBases ();
+    StringRef Qualities = Iterator . getReadQualities ();
+
+        /*)  First, we are doint base header
+         (*/
+    kout << "@"
+        << CollectionName
+        << '.'
+        << SpotId
+        << ' '
+        << ReadName
+        << " length="
+        << Bases . size ()
+        << '\n'
+        ;
+
+        /*)  Second is going base itsefl
+         (*/
+    kout << Bases
+        << '\n'
+        ;
+
+        /*)  Third, header for qualities
+         (*/
+    kout << '+'
+        << CollectionName
+        << '.'
+        << SpotId
+        << ' '
+        << ReadName
+        << " length="
+        << Qualities . size ()
+        << '\n'
+        ;
+
+        /*)  Finally there are qualities
+         (*/
+    kout << Qualities
+        << '\n'
+        ;
+}   /* dumpFastQ () */
+
+static
+void
+dumpFastA (
+        int64_t SpotId,
+        const ngs :: String & CollectionName,
+        const ReadIterator & Iterator,
+        uint64_t Width
+)
+{
+        /*)  We do not check values for arguments validity!
+         (*/
+    StringRef ReadName = Iterator . getReadName ();
+    StringRef Bases = Iterator . getReadBases ();
+
+    uint64_t __l = Bases . size ();
+
+        /*)  First, we are doing base header
+         (*/
+    kout << '>'
+        << CollectionName
+        << '.'
+        << SpotId
+        << ' '
+        << ReadName
+        << " length="
+        << __l
+        << '\n'
+        ;
+
+        /*)  Second is going base itself by width
+         (*/
+
+    uint64_t __p = 0;
+    const char * __s = Bases . data ();
+
+
+    if ( 0 < Width ) {
+        while ( __p < __l ) {
+            uint64_t __t = std :: min ( Width, __l - __p );
+
+            kout << std :: string ( __s, ( std :: string :: size_type ) __p, ( std :: string :: size_type ) __t ) << "\n" ;
+
+            __p += __t;
+        }
+    }
+    else {
+        kout << __s << "\n" ;
+    }
+
+}   /* dumpFastA () */
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+static
+void
+run ( const DumpArgs & TheArgs )
+{
+    if ( ! TheArgs . good () ) {
+        throw ErrorMsg ( "Invalid arguments" );
+    }
+
+    ngs :: String Acc ( TheArgs . accession () . c_str () );
+    ReadCollection RCol = ncbi :: NGS :: openReadCollection ( Acc );
+
+    int64_t minSpot = TheArgs . minSpotId ();
+    int64_t maxSpot = TheArgs . maxSpotId ();
+
+    if ( minSpot == 0 ) {
+        minSpot = 1;
+    }
+
+    if ( maxSpot == 0 ) {
+        maxSpot = RCol . getReadCount ();
+    }
+
+    if ( maxSpot < minSpot ) {
+        int64_t Id = minSpot;
+        minSpot = maxSpot;
+        maxSpot = Id;
+    }
+
+    ReadIterator Iterator = RCol.getReadRange (
+                                            minSpot,
+                                            maxSpot - minSpot + 1,
+                                            TheArgs . category ()
+                                            );
+
+    ngs :: String ReadCollectionName = RCol.getName ();
+
+    AFilters Filters ( TheArgs . accession () );
+    setupFilters ( Filters, TheArgs );
+
+    for ( int64_t llp = TheArgs . minSpotId () ; Iterator.nextRead (); llp ++ ) {
+
+        if ( Filters . checkIt ( Iterator ) ) {
+            if ( TheArgs . fastaDump () ) {
+                dumpFastA ( llp, ReadCollectionName, Iterator, TheArgs . fastaDumpWidth () );
+            }
+            else { 
+                dumpFastQ ( llp, ReadCollectionName, Iterator );
+            }
+        }
+    }
+
+    kout.flush ();
+
+    std :: cerr << Filters . report ( TheArgs . legacyReport () );
+
+}   /* run () */
+
diff --git a/tools/fastq-dump/filters.cpp b/tools/fastq-dump/filters.cpp
new file mode 100644
index 0000000..710a689
--- /dev/null
+++ b/tools/fastq-dump/filters.cpp
@@ -0,0 +1,300 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <sysalloc.h>
+
+#ifndef _h_klib_defs_
+#include <klib/defs.h>
+#endif
+
+#include <ngs/ReadCollection.hpp>
+
+#include <sstream>
+
+#include "filters.hpp"
+
+using namespace std;
+using namespace ngs;
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*))
+ //     AFilter
+((*/
+AFilter :: AFilter ()
+:   _M_rejected ( 0 )
+{
+}   /* AFilter :: AFilter () */
+
+AFilter :: ~AFilter ()
+{
+    _M_rejected = 0;
+}   /* AFilter :: ~AFilter () */
+
+bool
+AFilter :: checkIt ( const ReadIterator & pos ) const
+{
+    throw ErrorMsg ( ":: checkIt() - is not implemented for class" );
+}   /* AFilter :: checkIt () */
+
+String
+AFilter :: report () const
+{
+    if ( _M_rejected != 0 ) {
+        stringstream __s;
+        __s << "Rejected "
+            << _M_rejected
+            << ( _M_rejected == 1 ? " SPOT" : " SPOTS" )
+            ;
+        if ( reason () . empty () ) {
+            __s << " reason unknown";
+        }
+        else {
+            __s << " because " << reason ();
+        }
+
+        return __s . str ();
+    }
+    return "";
+}   /* AFilter :: report () */
+
+String
+AFilter :: reason () const
+{
+    return "";
+}   /* AFilter :: reason () */
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+/* Place for some predefined filters                             */
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*))
+ //     Num spots readed filter ... needed as counter only
+((*/
+class __NReadFilter : public AFilter {
+public :
+    __NReadFilter ( const String & source );
+
+    bool checkIt ( const ReadIterator & Rit ) const;
+
+    String report () const;
+
+private :
+    String _M_source;
+};
+
+__NReadFilter :: __NReadFilter ( const string & source )
+:   _M_source ( source )
+{
+}   /* __NReadFilter :: __NReadFilter () */
+
+bool
+__NReadFilter :: checkIt ( const ReadIterator & ) const
+{
+    reject ();
+
+    return true;
+}   /* __NReadFilter :: checkIt () */ 
+
+String
+__NReadFilter :: report () const
+{
+    stringstream __s;
+
+    __s << "Read "
+        << rejected ()
+        << ( rejected () == 1 ? " spot" : " spots" )
+        ;
+
+    if ( ! _M_source . empty () ) {
+        __s << " for " << _M_source;
+    }
+
+    return __s . str ();
+}   /* __NReadFilter :: report () */
+
+/*))
+ //     Num spots readed filter ... needed as counter only
+((*/
+class __SpotLengthFilter : public AFilter {
+public :
+    __SpotLengthFilter ( uint64_t MinLength );
+
+    bool checkIt ( const ReadIterator & Rit ) const;
+
+protected :
+    String reason () const;
+
+private :
+    uint64_t _M_minLength;
+};
+
+__SpotLengthFilter :: __SpotLengthFilter ( uint64_t MinLength )
+:   _M_minLength ( MinLength )
+{
+}   /* __SpotLengthFilter :: __SpotLengthFilter () */
+
+bool
+__SpotLengthFilter :: checkIt ( const ReadIterator & Rit ) const
+{
+    uint64_t __l = Rit . getReadBases () . size ();
+    if ( __l < _M_minLength ) {
+        reject ();
+
+        return false;
+    }
+
+    return true;
+}   /* __SpotLengthFilter :: checkIt () */ 
+
+String
+__SpotLengthFilter :: reason () const
+{
+    stringstream __s;
+
+    __s << "SPOTLEN < " << _M_minLength;
+
+    return __s . str ();
+}   /* __SpotLengthFilter :: reason () */
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+/*))
+ //     AFilters
+((*/
+AFilters :: AFilters ( const String & source )
+:   _M_source ( source )
+,   _M_confirmed ( 0 )
+{
+    init ();
+}   /* AFilters :: AFilters () */
+
+AFilters :: ~AFilters ()
+{
+    try {
+        dispose ();
+    }
+    catch ( ... ) {
+        /* Ha! */
+    }
+}   /* AFitlers :: ~AFilters () */
+
+void
+AFilters :: init ()
+{
+        /* Just dispose all previous content
+         */
+    dispose ();
+
+        /* Here we should add some mondaytory filters
+         */
+    addFilter ( new __NReadFilter ( _M_source ) );
+}   /* AFilters :: init () */
+
+void
+AFilters :: dispose ()
+{
+    for ( TVecI __b = _M_filters . begin (); __b != _M_filters . end (); __b ++ ) {
+        AFilter * __f = * __b;
+        if ( __f != NULL ) {
+            delete __f;
+        }
+        * __b = NULL;
+    }
+    _M_filters . clear ();
+
+    _M_confirmed = 0;
+}   /* AFilters :: dispose () */
+
+bool
+AFilters :: checkIt ( const ReadIterator & Rit ) const
+{
+    bool __r = __checkIt ( Rit );
+
+    if ( __r ) {
+        _M_confirmed ++;
+    }
+
+    return __r;
+}   /* AFilters :: checkIt () */
+
+bool
+AFilters :: __checkIt ( const ReadIterator & Rit ) const
+{
+    for ( TVecCI __b = _M_filters . begin (); __b != _M_filters . end (); __b ++ ) {
+        AFilter * __f = * __b;
+
+        if ( __f != NULL ) {
+            if ( ! __f -> checkIt ( Rit ) ) {
+                return false;
+            }
+        }
+    }
+
+    return true;
+}   /* AFilters :: __checkIt () */
+
+void
+AFilters :: addFilter ( AFilter * Flt )
+{
+    if ( Flt != NULL ) {
+        _M_filters . insert ( _M_filters . end (), Flt );
+    }
+}   /* AFilters :: addFilter () */
+
+void
+AFilters :: addLengthFilter ( uint64_t minLength )
+{
+    addFilter ( new __SpotLengthFilter ( minLength ) );
+}   /* AFilters :: addLengthFilter () */
+
+String
+AFilters :: report ( bool legacyStyle ) const
+{
+    stringstream __s;
+
+    if ( ! legacyStyle ) {
+        for ( TVecCI __b = _M_filters . begin (); __b != _M_filters . end (); __b ++ ) {
+            AFilter * __f = * __b;
+            if ( __f != NULL ) {
+                String __r = __f -> report ();
+                if ( ! __r . empty () ) {
+                    __s << __r << "\n";
+                }
+            }
+        }
+    }
+
+    __s << "Written " << _M_confirmed << ( _M_confirmed == 1 ? " spot" : " spots" ) << " for " << _M_source << "\n";
+
+    if ( legacyStyle ) {
+        __s << "Written " << _M_confirmed << ( _M_confirmed == 1 ? " spot" : " spots" ) << " total\n";
+    }
+
+    return __s . str ();
+}   /* AFilters :: report () */
diff --git a/tools/fastq-dump/filters.hpp b/tools/fastq-dump/filters.hpp
new file mode 100644
index 0000000..df58c56
--- /dev/null
+++ b/tools/fastq-dump/filters.hpp
@@ -0,0 +1,114 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_outpost_filters_
+#define _h_outpost_filters_
+
+#include <vector>
+
+#ifndef _h_klib_defs_
+#include <klib/defs.h>
+#endif
+
+#include <ngs/ErrorMsg.hpp>
+#include <ngs/StringRef.hpp>
+
+/*)))   Namespace
+ (((*/
+namespace ngs {
+
+/*))
+ // Some forwards
+((*/
+class ReadIterator;
+
+class AFilter {
+public :
+    AFilter ();
+    virtual ~AFilter ();
+
+    virtual bool checkIt ( const ReadIterator & pos ) const = 0;
+
+    virtual String report () const;
+
+protected :
+        /* That method should be called from 'checkIt()' for stat
+         */
+    inline void reject () const { _M_rejected ++; };
+    inline uint64_t rejected () const { return _M_rejected; };
+
+    virtual String reason () const;
+
+private :
+    mutable uint64_t _M_rejected;
+
+};  /* class AFilter */
+
+class AFilters {
+public :
+    typedef std :: vector < AFilter * > TVec;
+    typedef TVec :: const_iterator TVecCI;
+    typedef TVec :: iterator TVecI;
+
+public :
+    AFilters ( const String & source );
+    virtual ~AFilters ();
+
+    bool checkIt ( const ReadIterator & pos ) const;
+
+        /* Adds new user_defined filter ...
+         */
+    void addFilter ( AFilter * pFilter );
+
+        /* There are some standard predefined filters to add
+         */
+    void addLengthFilter ( uint64_t minLength );
+
+        /* Misc stuff
+         */
+    inline const String & source () const { return _M_source ; }
+
+    String report ( bool legacyStyle = false ) const;
+
+private :
+    void init ();
+    void dispose ();
+
+    bool __checkIt ( const ReadIterator & pos ) const;
+
+private :
+    String _M_source;
+
+    TVec _M_filters;
+
+    mutable uint64_t _M_confirmed;
+};  /* class AFilters */
+
+/*)))   Namespace
+ (((*/
+}; /* namespace ngs */
+
+#endif /* _h_outpost_filters_ */
diff --git a/tools/fastq-dump/koutstream b/tools/fastq-dump/koutstream
new file mode 100644
index 0000000..5967f6f
--- /dev/null
+++ b/tools/fastq-dump/koutstream
@@ -0,0 +1,324 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_outpost_koutstream_
+#define _h_outpost_koutstream_
+
+#ifndef _h_klib_defs_
+#include <klib/defs.h>
+#endif
+
+#include <ios>
+#include <streambuf>
+#include <ostream>
+
+#include <klib/out.h>
+#include <klib/text.h>
+
+/*)))
+ ///    Something weird. That class will throw exception if any
+ \\\    error will happen. Overwise, You may comment line to return
+ ///    error code instead.
+(((*/
+#define _DO_ALWAYS_THROW_EXCEPTION
+
+#ifdef _DO_ALWAYS_THROW_EXCEPTION
+    /* Using that forward to avoid conflicts with String */
+extern "C" {
+    KLIB_EXTERN rc_t CC string_printf (
+                                    char *dst,
+                                    size_t bsize,
+                                    size_t *num_writ,
+                                    const char *fmt,
+                                    ...
+                                    );
+}
+#endif /* _DO_ALWAYS_THROW_EXCEPTION */
+
+/*\
+|*| That address is responsible for buffered/unbuffered basic_koutbuf
+|*| Uncomment if You does not need buffering on the basic_koutbuf level
+\*/
+
+/*\
+#define _DO_USE_UNBUFFERED_KOUTBUF
+\*/
+
+/*))))
+ <<<<   Lurics:
+  >>>>  That file created because Kurt want to wrap KOutMsg to 'stream'
+ <<<<
+  >>>>  Important notice ... because it is KOutMsg, that class will
+ <<<<   associate output sequence only with KOutMsg primitive.
+  >>>>  That file contains :
+ <<<<       basic_koutbuf    - buffer
+  >>>>      basic_koutstream - stream
+ <<<<       kout - stream forward
+  >>>>
+ ((((*/
+
+/*)))
+ ///    I think that is valild name for namespace ...
+(((*/
+namespace ngs {
+
+/*))
+ // Buffer
+((*/
+
+template < typename _CharT, typename _Traits >
+class basic_koutbuf
+    : public std :: basic_streambuf < _CharT, _Traits > {
+
+public :
+    // Typos
+    typedef _CharT      char_type;
+    typedef _Traits     traits_type;
+
+    typedef typename traits_type::int_type int_type;
+
+    typedef std :: allocator < char_type > allocator_type;
+    typedef std :: basic_streambuf < char_type, traits_type > __streambuf_type;
+    typedef basic_koutbuf < char_type, traits_type > __koutbuf_type;
+
+protected :
+
+        /*\ This is not only change 
+        \*/
+#ifdef _DO_USE_UNBUFFERED_KOUTBUF
+    static const std :: streamsize _cM_buffer_size = 256;
+#else /* _DO_USE_UNBUFFERED_KOUTBUF */
+    static const std :: streamsize _cM_buffer_size = 4096 * 32;
+#endif /* _DO_USE_UNBUFFERED_KOUTBUF */
+
+    char_type * _M_char;
+
+public :
+
+        /* Constructor/destructor */
+    basic_koutbuf ()
+        : __streambuf_type ()
+        , _M_char ( allocator_type () . allocate ( _cM_buffer_size ) )
+        {
+            this -> setbuf ( _M_char, _cM_buffer_size );
+            __setp ();
+        };
+
+    ~basic_koutbuf ()
+        {
+            try {
+                __sync (); // ?? should we check retval?
+            }
+            catch ( ... ) {
+                // ???? what we should do here ????
+            }
+
+            try {
+                if ( _M_char != NULL ) {
+                    allocator_type () . deallocate (
+                                                    _M_char,
+                                                    _cM_buffer_size
+                                                    );
+                }
+            }
+            catch ( ... ) {
+                // ???? nothing to do 
+            }
+
+            _M_char = NULL;
+        };
+
+#ifdef _DO_USE_UNBUFFERED_KOUTBUF
+    std :: streamsize xsputn ( const char_type * __s, std :: streamsize __n )
+        {
+            if ( __sync () == - 1 ) {
+                return 0;
+            }
+
+            return __koutmsg ( __s, __n );
+        };
+#else /* _DO_USE_UNBUFFERED_KOUTBUF */
+    std :: streamsize xsputn ( const char_type * __s, std :: streamsize __n )
+        {
+            std :: streamsize __a = this -> epptr () - this -> pptr ();
+			
+            if ( __n < __a ) {
+                    /*)  Here we are adding string to a buffer
+                     (*/
+                traits_type :: copy ( this -> pptr (), __s, __n );
+
+                this -> pbump ( __n );
+            }
+            else {
+                    /*) We are not too effective ...
+                     (*/
+                if ( __sync () == - 1 ) {
+                    return 0;
+                }
+
+                std :: streamsize __q = 0;
+
+                while ( __q < __n ) {
+                    __a = this -> epptr () - this -> pptr ();
+                    std :: streamsize __c = std :: min (
+                                                        __n - __q,
+                                                        __a
+                                                        );
+
+                    traits_type :: copy (
+                                    this -> pbase (),
+                                    __s + __q,
+                                    __c
+                                    );
+                    this -> pbump ( __c );
+
+                    if ( __sync () == - 1 ) {
+                        return 0;
+                    }
+
+                    __q += __c;
+                }
+            }
+
+                /*) We do never fail :lol:
+                 (*/
+            return __n;
+        };
+#endif /* _DO_USE_UNBUFFERED_KOUTBUF */
+
+    int sync ()
+        {
+            return __sync ();
+        };
+
+protected :
+
+    int __sync ()
+        {
+            int __ret = 0;
+
+            std :: streamsize __l = this -> pptr () - this -> pbase ();
+
+            if ( 0 < __l ) {
+                __ret = __koutmsg ( this -> pbase (), __l );
+
+                    /*\
+                    |*| Don't really know if we shoud check result here
+                    \*/
+                __setp ();
+            }
+
+            return __ret;
+        };
+
+    int __koutmsg ( const char_type * __s, std :: streamsize __n )
+        {
+            if ( 0 < __n ) {
+                :: String __t;
+
+                StringInit ( ( & __t ), __s, __n, __n );
+
+                rc_t __rc = KOutMsg ( "%S", & __t );
+                if ( __rc != 0 ) {
+
+#ifdef _DO_ALWAYS_THROW_EXCEPTION
+
+                    /* That was requested by Kurt: I shoud throw
+                       an exception instead of sending overflow
+                       error
+                     */
+                    char __m [ 4096 ];
+                    size_t __n = 0;
+                    string_printf ( __m, sizeof ( __m ), & __n, "%R", __rc );
+                    throw ErrorMsg ( __m );
+#else
+
+                    __n = - 1;
+#endif /* _DO_ALWAYS_THROW_EXCEPTION */
+                }
+            }
+
+            return __n;
+        };
+
+    void __setp ()
+        {
+                /*) the only valid method to set _M_out_cur to zero
+                 /  also, one char reserved for a zero
+                (*/
+            this -> setp ( _M_char, _M_char + _cM_buffer_size );
+        };
+
+};  /* class basic_koutbuf */
+
+/*))
+ // Stream
+((*/
+template < typename _CharT, typename _Traits >
+class basic_koutstream :
+    public std :: basic_ostream < _CharT, _Traits > {
+
+public :
+    // Typos
+    typedef _CharT      char_type;
+    typedef _Traits     traits_type;
+
+    typedef typename traits_type::int_type int_type;
+
+    typedef basic_koutbuf < char_type, traits_type > __koutbuf_type;
+    typedef std :: basic_ostream < char_type, traits_type > __ostream_type;
+    typedef basic_koutstream < char_type, traits_type > __koutstream_type;
+
+private :
+
+    __koutbuf_type _M_koutbuf;
+
+public :
+
+        /**
+         *  Default constructor, and the only constructor
+         **/
+    basic_koutstream () : __ostream_type ( 0 ), _M_koutbuf ()
+        {
+            this -> init ( & _M_koutbuf );
+        };
+
+    virtual ~basic_koutstream ()
+        {
+        };
+
+};  /* class basic_koutstream */
+
+/*)))
+ ///  Forwards
+(((*/
+typedef basic_koutstream<char, std :: char_traits < char > > koutstream;
+
+koutstream kout;
+
+}   /* namespace ngs */
+
+#endif /* _h_outpost_koutstream_ */
diff --git a/tools/fastq-loader/.gitignore b/tools/fastq-loader/.gitignore
new file mode 100644
index 0000000..f3b5a01
--- /dev/null
+++ b/tools/fastq-loader/.gitignore
@@ -0,0 +1 @@
+fastq-grammar.output
diff --git a/tools/fastq-loader/Makefile b/tools/fastq-loader/Makefile
new file mode 100644
index 0000000..b66001e
--- /dev/null
+++ b/tools/fastq-loader/Makefile
@@ -0,0 +1,166 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/fastq-loader
+
+INT_LIBS = \
+	libfastqloader
+
+ALL_LIBS = \
+	$(INT_LIBS) \
+	$(EXT_LIBS)
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+    latf-load
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)    
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs 
+	@ $(MAKE_CMD) $(TARGDIR)/$@
+
+$(INT_LIBS): makedirs
+	@ $(MAKE_CMD) $(ILIBDIR)/$@
+
+$(EXT_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@    
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+.PHONY: all std $(ALL_LIBS) 
+
+#-------------------------------------------------------------------------------
+# std
+#
+$(TARGDIR)/std: \
+	$(addprefix $(ILIBDIR)/,$(INT_LIBS)) \
+	$(addprefix $(LIBDIR)/,$(EXT_LIBS)) \
+	$(addprefix $(BINDIR)/,$(EXT_TOOLS))
+
+.PHONY: $(TARGDIR)/std
+
+#-------------------------------------------------------------------------------
+# all
+#
+$(TARGDIR)/all: \
+	$(addprefix $(ILIBDIR)/,$(INT_LIBS)) \
+	$(addprefix $(LIBDIR)/,$(EXT_LIBS)) \
+	$(addprefix $(BINDIR)/,$(ALL_TOOLS))
+
+.PHONY: $(TARGDIR)/all
+
+#-------------------------------------------------------------------------------
+# clean
+#
+INTERM_SRC = \
+	$(SRCDIR)/fastq-lex.c \
+	$(SRCDIR)/fastq-grammar.c \
+	$(SRCDIR)/fastq-tokens.h 
+
+clean: stdclean
+
+.PHONY: clean
+
+.PRECIOUS: $(INTERM_SRC)
+
+#-------------------------------------------------------------------------------
+# fastq
+#
+$(ILIBDIR)/libfastqloader: $(ILIBDIR)/libfastqloader.$(LIBX)
+
+FASTQ_SRC = \
+    common-writer \
+    sequence-writer \
+    common-reader \
+    fastq-reader \
+	fastq-grammar \
+	fastq-lex
+
+# flex/bison should only be invoked manually in an environment that ensures the correct versions:
+# bison 2.5, flex 2.5.35
+bison:
+	bison --warnings=error -o $(SRCDIR)/fastq-grammar.c --defines=$(SRCDIR)/fastq-tokens.h -v --no-lines $(SRCDIR)/fastq-grammar.y
+
+ifeq (dbg,$(BUILD))
+    FLEX_DEBUG = -d
+endif    
+
+flex:    
+	flex $(FLEX_DEBUG) -DYY_BUF_SIZE=16777216 -t $(SRCDIR)/fastq-lex.l | grep -v '^#line' > $(SRCDIR)/fastq-lex.c
+
+FASTQ_OBJ = \
+	$(addsuffix .$(LOBX),$(FASTQ_SRC))
+
+FASTQ_LIB = \
+    -lload \
+	-dkfs \
+	-dklib \
+
+ifneq (win,$(OS))
+    FASTQ_LIB += -dkq
+endif
+
+$(ILIBDIR)/libfastqloader.$(SHLX): $(INTERM_SRC) $(FASTQ_OBJ)
+	$(LD) --dlib -o $@ $^ $(FASTQ_LIB)
+
+$(ILIBDIR)/libfastqloader.$(LIBX): $(INTERM_SRC) $(FASTQ_OBJ)
+	$(LD) --slib -o $@ $^ $(FASTQ_LIB)
+
+#------------------------------------------------------------------------------
+# fastq-load.3
+#
+FASTQ_LOAD_SRC = \
+	fastq-loader \
+    loader-imp \
+    common-writer \
+    sequence-writer \
+    common-reader \
+	$(FASTQ_SRC)
+
+FASTQ_LOAD_OBJ = \
+	$(addsuffix .$(OBJX),$(FASTQ_LOAD_SRC))
+
+FASTQ_LOADER_LIB = \
+	-skapp \
+	-stk-version \
+    -sload \
+	-sncbi-wvdb \
+	-sm
+
+$(BINDIR)/latf-load: $(FASTQ_LOAD_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(FASTQ_LOADER_LIB)
+
diff --git a/interfaces/loader/common-reader-priv.h b/tools/fastq-loader/common-reader-priv.h
similarity index 100%
rename from interfaces/loader/common-reader-priv.h
rename to tools/fastq-loader/common-reader-priv.h
diff --git a/libs/loader/common-reader.c b/tools/fastq-loader/common-reader.c
similarity index 100%
rename from libs/loader/common-reader.c
rename to tools/fastq-loader/common-reader.c
diff --git a/interfaces/loader/common-reader.h b/tools/fastq-loader/common-reader.h
similarity index 100%
rename from interfaces/loader/common-reader.h
rename to tools/fastq-loader/common-reader.h
diff --git a/tools/fastq-loader/common-writer.c b/tools/fastq-loader/common-writer.c
new file mode 100644
index 0000000..a2fc9c9
--- /dev/null
+++ b/tools/fastq-loader/common-writer.c
@@ -0,0 +1,1653 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+ 
+#include <sysalloc.h>
+#include <string.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <klib/printf.h>
+#include <klib/status.h>
+
+#include <kdb/btree.h>
+
+#include <kapp/progressbar.h>
+#include <kapp/main.h>
+
+#include <kproc/queue.h>
+#include <kproc/thread.h>
+#include <kproc/timeout.h>
+#include <os-native.h>
+
+#include <kfs/file.h>
+#include <kfs/pagefile.h>
+
+#include <vdb/manager.h>
+#include <vdb/database.h>
+
+#include "sequence-writer.h"
+#include "common-writer.h"
+#include "common-reader-priv.h"
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#define USE_READER_THREAD (1)
+
+/*--------------------------------------------------------------------------
+ * ctx_value_t, FragmentInfo
+ */
+typedef struct {
+/*    uint64_t spotId; */
+    int64_t fragmentOffset;
+    uint16_t fragmentSize;
+    uint16_t seqHash[2];
+    uint8_t  unmated: 1,
+             has_a_read: 1,
+             written: 1;
+} ctx_value_t;
+
+#define CTX_VALUE_SET_S_ID(A, B) ((void)(B))
+
+typedef struct FragmentInfo {
+    uint32_t readlen;
+    uint8_t  is_bad;
+    uint8_t  orientation;
+    uint8_t  otherReadNo;
+    uint8_t  sglen;
+    uint8_t  cskey;
+} FragmentInfo;
+
+#define MMA_ELEM_T ctx_value_t
+#include "mmarray.c"
+#undef MMA_ELEM_T
+
+rc_t OpenKBTree(const CommonWriterSettings* settings, struct KBTree **const rslt, size_t const n, size_t const max)
+{
+    size_t const cacheSize = (((settings->cache_size - (settings->cache_size / 2) - (settings->cache_size / 8)) / max)
+                            + 0xFFFFF) & ~((size_t)0xFFFFF);
+    KFile *file = NULL;
+    KDirectory *dir;
+    char fname[4096];
+    rc_t rc;
+
+    rc = KDirectoryNativeDir(&dir);
+    if (rc)
+        return rc;
+    
+    rc = string_printf(fname, sizeof(fname), NULL, "%s/key2id.%u.%u", settings->tmpfs, settings->pid, n); if (rc) return rc;
+    STSMSG(1, ("Path for scratch files: %s\n", fname));
+    rc = KDirectoryCreateFile(dir, &file, true, 0600, kcmInit, "%s", fname);
+    KDirectoryRemove(dir, 0, "%s", fname);
+    KDirectoryRelease(dir);
+    if (rc == 0) {
+        rc = KBTreeMakeUpdate(rslt, file, cacheSize,
+                              false, kbtOpaqueKey,
+                              1, 255, sizeof ( uint32_t ),
+                              NULL
+                              );
+        KFileRelease(file);
+    }
+    return rc;
+}
+
+rc_t GetKeyIDOld(const CommonWriterSettings* settings, SpotAssembler* const ctx, uint64_t *const rslt, bool *const wasInserted, char const key[], char const name[], size_t const namelen)
+{
+    size_t const keylen = strlen(key);
+    rc_t rc;
+    uint64_t tmpKey;
+
+    if (ctx->key2id_count == 0) {
+        rc = OpenKBTree(settings, &ctx->key2id[0], 1, 1);
+        if (rc) return rc;
+        ctx->key2id_count = 1;
+    }
+    if (keylen == 0 || memcmp(key, name, keylen) == 0) {
+        /* qname starts with read group; no append */
+        tmpKey = ctx->idCount[0];
+        rc = KBTreeEntry(ctx->key2id[0], &tmpKey, wasInserted, name, namelen);
+    }
+    else {
+        char sbuf[4096];
+        char *buf = sbuf;
+        char *hbuf = NULL;
+        size_t bsize = sizeof(sbuf);
+        size_t actsize;
+        
+        if (keylen + namelen + 2 > bsize) {
+            hbuf = malloc(bsize = keylen + namelen + 2);
+            if (hbuf == NULL)
+                return RC(rcExe, rcName, rcAllocating, rcMemory, rcExhausted);
+            buf = hbuf;
+        }
+        rc = string_printf(buf, bsize, &actsize, "%s\t%.*s", key, (int)namelen, name);
+        
+        tmpKey = ctx->idCount[0];
+        rc = KBTreeEntry(ctx->key2id[0], &tmpKey, wasInserted, buf, actsize);
+        if (hbuf)
+            free(hbuf);
+    }
+    if (rc == 0) {
+        *rslt = tmpKey;
+        if (*wasInserted)
+            ++ctx->idCount[0];
+    }
+    return rc;
+}
+
+static unsigned HashValue(unsigned const len, unsigned char const value[])
+{
+    /* FNV-1a hash with folding */
+    unsigned long long h = 0xcbf29ce484222325ull;
+    unsigned i;
+
+    for (i = 0; i < len; ++i) {
+        int const octet = value[i];
+        h = (h ^ octet) * 0x100000001b3ull;
+    }
+    return (unsigned)(h ^ (h >> 32));
+}
+
+static unsigned HashKey(void const *const key, size_t const keylen)
+{
+    return HashValue(keylen, key) % NUM_ID_SPACES;
+}
+
+static unsigned SeqHashKey(void const *const key, size_t const keylen)
+{
+    return HashValue(keylen, key) % 0x10000;
+}
+
+#define USE_ILLUMINA_NAMING_POUND_NUMBER_SLASH_HACK 1
+
+static size_t GetFixedNameLength(char const name[], size_t const namelen)
+{
+#if USE_ILLUMINA_NAMING_POUND_NUMBER_SLASH_HACK
+    char const *const pound = string_chr(name, namelen, '#');
+    
+    if (pound && pound + 2u < name + namelen && pound[1] >= '0' && pound[1] <= '9' && pound[2] == '/') {
+        return (size_t)(pound - name) + 2u;
+    }
+#endif
+    return namelen;
+}
+
+rc_t GetKeyID(CommonWriterSettings *const settings,
+              SpotAssembler *const ctx,
+              uint64_t *const rslt,
+              bool *const wasInserted,
+              char const key[],
+              char const name[],
+              size_t const o_namelen)
+{
+    size_t const namelen = GetFixedNameLength(name, o_namelen);
+
+    if (ctx->key2id_max == 1)
+        return GetKeyIDOld(settings, ctx, rslt, wasInserted, key, name, namelen);
+    else {
+        size_t const keylen = strlen(key);
+        unsigned const h = HashKey(key, keylen);
+        size_t f;
+        size_t e = ctx->key2id_count;
+        uint64_t tmpKey;
+        
+        *rslt = 0;
+        {{
+            uint32_t const bucket_value = ctx->key2id_hash[h];
+            unsigned const n  = (uint8_t) bucket_value;
+            unsigned const i1 = (uint8_t)(bucket_value >>  8);
+            unsigned const i2 = (uint8_t)(bucket_value >> 16);
+            unsigned const i3 = (uint8_t)(bucket_value >> 24);
+            
+            if (n > 0 && strcmp(key, ctx->key2id_names + ctx->key2id_name[i1]) == 0) {
+                f = i1;
+                /*
+                ctx->key2id_hash[h] = (i3 << 24) | (i2 << 16) | (i1 << 8) | n;
+                 */
+                goto GET_ID;
+            }
+            if (n > 1 && strcmp(key, ctx->key2id_names + ctx->key2id_name[i2]) == 0) {
+                f = i2;
+                ctx->key2id_hash[h] = (i3 << 24) | (i1 << 16) | (i2 << 8) | n;
+                goto GET_ID;
+            }
+            if (n > 2 && strcmp(key, ctx->key2id_names + ctx->key2id_name[i3]) == 0) {
+                f = i3;
+                ctx->key2id_hash[h] = (i2 << 24) | (i1 << 16) | (i3 << 8) | n;
+                goto GET_ID;
+            }
+        }}
+        f = 0;
+        while (f < e) {
+            size_t const m = (f + e) / 2;
+            size_t const oid = ctx->key2id_oid[m];
+            int const diff = strcmp(key, ctx->key2id_names + ctx->key2id_name[oid]);
+            
+            if (diff < 0)
+                e = m;
+            else if (diff > 0)
+                f = m + 1;
+            else {
+                f = oid;
+                goto GET_ID;
+            }
+        }
+        if (ctx->key2id_count < ctx->key2id_max) {
+            size_t const name_max = ctx->key2id_name_max + keylen + 1;
+            KBTree *tree;
+            rc_t rc = OpenKBTree(settings, &tree, ctx->key2id_count + 1, 1); /* ctx->key2id_max); */
+            
+            if (rc) return rc;
+            
+            if (ctx->key2id_name_alloc < name_max) {
+                size_t alloc = ctx->key2id_name_alloc;
+                void *tmp;
+                
+                if (alloc == 0)
+                    alloc = 4096;
+                while (alloc < name_max)
+                    alloc <<= 1;
+                tmp = realloc(ctx->key2id_names, alloc);
+                if (tmp == NULL)
+                    return RC(rcExe, rcName, rcAllocating, rcMemory, rcExhausted);
+                ctx->key2id_names = tmp;
+                ctx->key2id_name_alloc = alloc;
+            }
+            if (f < ctx->key2id_count) {
+                memmove(&ctx->key2id_oid[f + 1], &ctx->key2id_oid[f], (ctx->key2id_count - f) * sizeof(ctx->key2id_oid[f]));
+            }
+            ctx->key2id_oid[f] = ctx->key2id_count;
+            ++ctx->key2id_count;
+            f = ctx->key2id_oid[f];
+            ctx->key2id_name[f] = ctx->key2id_name_max;
+            ctx->key2id_name_max = name_max;
+
+            memcpy(&ctx->key2id_names[ctx->key2id_name[f]], key, keylen + 1);
+            ctx->key2id[f] = tree;
+            ctx->idCount[f] = 0;
+            if ((uint8_t)ctx->key2id_hash[h] < 3) {
+                unsigned const n = (uint8_t)ctx->key2id_hash[h] + 1;
+                
+                ctx->key2id_hash[h] = (uint32_t)((((ctx->key2id_hash[h] & ~(0xFFu)) | f) << 8) | n);
+            }
+            else {
+                /* the hash function isn't working too well
+                 * keep the 3 mru
+                 */
+                ctx->key2id_hash[h] = (uint32_t)((((ctx->key2id_hash[h] & ~(0xFFu)) | f) << 8) | 3);
+            }
+        GET_ID:
+            tmpKey = ctx->idCount[f];
+            rc = KBTreeEntry(ctx->key2id[f], &tmpKey, wasInserted, name, namelen);
+            if (rc == 0) {
+                *rslt = (((uint64_t)f) << 32) | tmpKey;
+                if (*wasInserted)
+                    ++ctx->idCount[f];
+                assert(tmpKey < ctx->idCount[f]);
+            }
+            return rc;
+        }
+        return RC(rcExe, rcTree, rcAllocating, rcConstraint, rcViolated);
+    }
+}
+
+static int openTempFile(char const path[])
+{
+    int const fd = open(path, O_RDWR|O_TRUNC|O_CREAT, S_IRUSR|S_IWUSR);
+    unlink(path);
+    return fd;
+}
+
+static rc_t OpenMMapFile(const CommonWriterSettings* settings, SpotAssembler *const ctx, KDirectory *const dir)
+{
+    char fname[4096];
+    rc_t rc = string_printf(fname, sizeof(fname), NULL, "%s/id2value.%u", settings->tmpfs, settings->pid);
+
+    if (rc == 0) {
+        int const fd = openTempFile(fname);
+        if (fd >= 0)
+            ctx->id2value = MMArrayMake(&rc, fd);
+        else
+            rc = RC(rcExe, rcFile, rcCreating, rcFile, rcNotFound);
+    }
+    return rc;
+}
+
+static rc_t OpenMBankFile(const CommonWriterSettings* settings, SpotAssembler *const ctx, KDirectory *const dir)
+{
+    char fname[4096];
+    rc_t rc = string_printf(fname, sizeof(fname), NULL, "%s/fragments.%u", settings->tmpfs, settings->pid);
+    
+    if (rc == 0) {
+        int const fd = openTempFile(fname);
+        if (fd < 0)
+            rc = RC(rcExe, rcFile, rcCreating, rcFile, rcNotFound);
+        else
+            ctx->fragmentFd = fd;
+    }
+    return rc;
+}
+
+rc_t SetupContext(const CommonWriterSettings* settings, SpotAssembler *ctx)
+{
+    rc_t rc = 0;
+
+    memset(ctx, 0, sizeof(*ctx));
+
+    ctx->fragment = calloc(FRAGMENT_HOT_COUNT, sizeof(ctx->fragment[0]));
+    assert(ctx->fragment != NULL);
+    if (ctx->fragment == NULL)
+        abort();
+
+    ctx->pass = 1;
+    
+    if (settings->mode == mode_Archive) {
+        KDirectory *dir;
+
+        STSMSG(1, ("Cache size: %uM\n", settings->cache_size / 1024 / 1024));
+        
+        rc = KLoadProgressbar_Make(&ctx->progress[0], 0); if (rc) return rc;
+        rc = KLoadProgressbar_Make(&ctx->progress[1], 0); if (rc) return rc;
+        rc = KLoadProgressbar_Make(&ctx->progress[2], 0); if (rc) return rc;
+        rc = KLoadProgressbar_Make(&ctx->progress[3], 0); if (rc) return rc;
+        
+        KLoadProgressbar_Append(ctx->progress[0], 100 * settings->numfiles);
+        
+        rc = KDirectoryNativeDir(&dir);
+        if (rc == 0)
+            rc = OpenMMapFile(settings, ctx, dir);
+        if (rc == 0)
+            rc = OpenMBankFile(settings, ctx, dir);
+        KDirectoryRelease(dir);
+    }
+    return rc;
+}
+
+void ContextReleaseMemBank(SpotAssembler *ctx)
+{
+    int i;
+
+    for (i = 0; i < FRAGMENT_HOT_COUNT; ++i)
+        free(ctx->fragment[i].data);
+
+    close(ctx->fragmentFd);
+}
+
+void ContextRelease(SpotAssembler *ctx)
+{
+    KLoadProgressbar_Release(ctx->progress[0], true);
+    KLoadProgressbar_Release(ctx->progress[1], true);
+    KLoadProgressbar_Release(ctx->progress[2], true);
+    KLoadProgressbar_Release(ctx->progress[3], true);
+    MMArrayWhack(ctx->id2value);
+    free(ctx->fragment);
+}
+
+static
+rc_t WriteSoloFragments(const CommonWriterSettings* settings, SpotAssembler* ctx, SequenceWriter *seq)
+{
+    uint32_t i;
+    unsigned j;
+    uint64_t idCount = 0;
+    rc_t rc;
+    KDataBuffer fragBuf;
+    SequenceRecord srec;
+    int const pass = ctx->pass;
+    
+    ++ctx->pass;
+    memset(&srec, 0, sizeof(srec));
+    
+    rc = KDataBufferMake(&fragBuf, 8, 0);
+    if (rc) {
+        (void)LOGERR(klogErr, rc, "KDataBufferMake failed");
+        return rc;
+    }
+    for (idCount = 0, j = 0; j < ctx->key2id_count; ++j) {
+        idCount += ctx->idCount[j];
+    }
+    KLoadProgressbar_Append(ctx->progress[pass], idCount);
+    
+    for (idCount = 0, j = 0; j < ctx->key2id_count; ++j) {
+        for (i = 0; i != ctx->idCount[j]; ++i, ++idCount) {
+            uint64_t const keyId = ((uint64_t)j << 32) | i;
+            ctx_value_t *value;
+            unsigned readLen[2];
+            unsigned read = 0;
+            FragmentInfo const *fip;
+            uint8_t const *src;
+
+            value = MMArrayGet(ctx->id2value, &rc, keyId);
+            if (value == NULL)
+                break;
+            KLoadProgressbar_Process(ctx->progress[pass], 1, false);
+
+            if (value->written)
+                continue;
+
+            assert(!value->unmated);
+            if (ctx->fragment[keyId % FRAGMENT_HOT_COUNT].id == keyId) {
+                fip = (FragmentInfo const *)ctx->fragment[keyId % FRAGMENT_HOT_COUNT].data;
+            }
+            else {
+                rc = KDataBufferResize(&fragBuf, (size_t)value->fragmentSize);
+                if (rc == 0) {
+                    int64_t const nread = pread(ctx->fragmentFd, fragBuf.base, value->fragmentSize, value->fragmentOffset);
+                    if (nread == value->fragmentSize)
+                        fip = (FragmentInfo const *)fragBuf.base;
+                    else {
+                        (void)LOGERR(klogErr, rc = RC(rcExe, rcFile, rcReading, rcData, rcNotFound), "KMemBankRead failed");
+                        break;
+                    }
+                }
+                else {
+                    (void)LOGERR(klogErr, rc, "KDataBufferResize failed");
+                    break;
+                }
+            }
+            src = (uint8_t const *)&fip[1];
+            
+            readLen[0] = readLen[1] = 0;
+            read = fip->otherReadNo - 1;
+
+            readLen[read] = fip->readlen;
+            rc = SequenceRecordInit(&srec, 2, readLen);
+            if (rc) {
+                (void)LOGERR(klogErr, rc, "SequenceRecordInit failed");
+                break;
+            }
+            
+            srec.is_bad[read] = fip->is_bad;
+            srec.orientation[read] = fip->orientation;
+            srec.cskey[read] = fip->cskey;
+            memcpy(srec.seq + srec.readStart[read], src, srec.readLen[read]);
+            src += fip->readlen;
+            
+            memcpy(srec.qual + srec.readStart[read], src, srec.readLen[read]);
+            src += fip->readlen;
+            srec.spotGroup = (char *)src;
+            srec.spotGroupLen = fip->sglen;
+            srec.keyId = keyId;
+            
+            rc = SequenceWriteRecord(seq, &srec, ctx->isColorSpace, false, settings->platform,
+                                    settings->keepMismatchQual, settings->no_real_output, settings->hasTI, settings->QualQuantizer);
+            if (rc) {
+                (void)LOGERR(klogErr, rc, "SequenceWriteRecord failed");
+                break;
+            }
+            /*rc = KMemBankFree(frags, id);*/
+            CTX_VALUE_SET_S_ID(*value, ++ctx->spotId);
+            value->written = 1;
+        }
+    }
+    /*printf("DONE_SOLO:\tcnt2=%d\tcnt1=%d\n",fcountBoth,fcountOne);*/
+    KDataBufferWhack(&fragBuf);
+    KDataBufferWhack(&srec.storage);
+    return rc;
+}
+
+void EditAlignedQualities(const CommonWriterSettings* settings, uint8_t qual[], bool const hasMismatch[], unsigned readlen) /* generic */
+{
+    unsigned i;
+    
+    for (i = 0; i < readlen; ++i) {
+        uint8_t const q = hasMismatch[i] ? settings->alignedQualValue : qual[i];
+        
+        qual[i] = q;
+    }
+}
+
+void EditUnalignedQualities(uint8_t qual[], bool const hasMismatch[], unsigned readlen) /* generic */
+{
+    unsigned i;
+    
+    for (i = 0; i < readlen; ++i) {
+        uint8_t const q = (qual[i] & 0x7F) | (hasMismatch[i] ? 0x80 : 0);
+        
+        qual[i] = q;
+    }
+}
+
+rc_t CheckLimitAndLogError(CommonWriterSettings* settings)
+{
+    ++settings->errCount;
+    if (settings->maxErrCount > 0 && settings->errCount > settings->maxErrCount) {
+        (void)PLOGERR(klogErr, (klogErr, RC(rcAlign, rcFile, rcReading, rcError, rcExcessive), 
+                                "Number of errors $(cnt) exceeds limit of $(max): Exiting", "cnt=%lu,max=%lu", 
+                                settings->errCount, settings->maxErrCount));
+        return RC(rcAlign, rcFile, rcReading, rcError, rcExcessive);
+    }
+    return 0;
+}
+
+void RecordNoMatch(const CommonWriterSettings* settings, char const readName[], char const refName[], uint32_t const refPos)
+{
+    if (settings->noMatchLog) {
+        static uint64_t lpos = 0;
+        char logbuf[256];
+        size_t len;
+        
+        if (string_printf(logbuf, sizeof(logbuf), &len, "%s\t%s\t%u\n", readName, refName, refPos) == 0) {
+            KFileWrite(settings->noMatchLog, lpos, logbuf, len, NULL);
+            lpos += len;
+        }
+    }
+}
+
+rc_t LogNoMatch(CommonWriterSettings* settings, char const readName[], char const refName[], unsigned rpos, unsigned matches)
+{
+    rc_t const rc = CheckLimitAndLogError(settings);
+    static unsigned count = 0;
+    
+    ++count;
+    if (rc) {
+        (void)PLOGMSG(klogInfo, (klogInfo, "This is the last warning; this class of warning occurred $(occurred) times",
+                                 "occurred=%u", count));
+        (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)' contains too few ($(count)) matching bases to reference '$(ref)' at $(pos)",
+                                 "name=%s,ref=%s,pos=%u,count=%u", readName, refName, rpos, matches));
+    }
+    else if (settings->maxWarnCount_NoMatch == 0 || count < settings->maxWarnCount_NoMatch)
+        (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)' contains too few ($(count)) matching bases to reference '$(ref)' at $(pos)",
+                                 "name=%s,ref=%s,pos=%u,count=%u", readName, refName, rpos, matches));
+    return rc;
+}
+
+rc_t LogDupConflict(CommonWriterSettings* settings, char const readName[])
+{
+    rc_t const rc = CheckLimitAndLogError(settings);
+    static unsigned count = 0;
+    
+    ++count;
+    if (rc) {
+        (void)PLOGMSG(klogInfo, (klogInfo, "This is the last warning; this class of warning occurred $(occurred) times",
+                                 "occurred=%u", count));
+        (void)PLOGERR(klogWarn, (klogWarn, RC(rcApp, rcFile, rcReading, rcData, rcInconsistent),
+                                 "Spot '$(name)' is both a duplicate and NOT a duplicate!",
+                                 "name=%s", readName));
+    }
+    else if (settings->maxWarnCount_DupConflict == 0 || count < settings->maxWarnCount_DupConflict)
+        (void)PLOGERR(klogWarn, (klogWarn, RC(rcApp, rcFile, rcReading, rcData, rcInconsistent),
+                                 "Spot '$(name)' is both a duplicate and NOT a duplicate!",
+                                 "name=%s", readName));
+    return rc;
+}
+
+void COPY_QUAL(uint8_t D[], uint8_t const S[], unsigned const L, bool const R)
+{
+    if (R) {
+        unsigned i;
+        unsigned j;
+        
+        for (i = 0, j = L - 1; i != L; ++i, --j)
+            D[i] = S[j];
+    }
+    else
+        memcpy(D, S, L);
+}
+
+void COPY_READ(INSDC_dna_text D[], INSDC_dna_text const S[], unsigned const L, bool const R)
+{
+    static INSDC_dna_text const compl[] = {
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 , '.',  0 , 
+        '0', '1', '2', '3',  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 , 'T', 'V', 'G', 'H',  0 ,  0 , 'C', 
+        'D',  0 ,  0 , 'M',  0 , 'K', 'N',  0 , 
+         0 ,  0 , 'Y', 'S', 'A', 'A', 'B', 'W', 
+         0 , 'R',  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 , 'T', 'V', 'G', 'H',  0 ,  0 , 'C', 
+        'D',  0 ,  0 , 'M',  0 , 'K', 'N',  0 , 
+         0 ,  0 , 'Y', 'S', 'A', 'A', 'B', 'W', 
+         0 , 'R',  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0
+    };
+    if (R) {
+        unsigned i;
+        unsigned j;
+        
+        for (i = 0, j = L - 1; i != L; ++i, --j)
+            D[i] = compl[((uint8_t const *)S)[j]];
+    }
+    else
+        memcpy(D, S, L);
+}
+
+/*--------------------------------------------------------------------------
+ * ArchiveFile
+ */
+
+void ParseSpotName(char const name[], size_t* namelen)
+{ /* remove trailing #... */
+    const char* hash = string_chr(name, *namelen, '#');
+    if (hash)
+        *namelen = hash - name;
+}
+
+static int8_t LogOddsToPhred1(int8_t logOdds)
+{ /* conversion table copied from interface/ncbi/seq.vschema */
+    static int8_t const toPhred[] = {
+                  0, 1, 1, 2, 2, 3, 3,
+         4, 4, 5, 5, 6, 7, 8, 9,10,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
+    };
+    if (logOdds < -6)
+        return 0;
+    if (logOdds > 40)
+        return 40;
+    return toPhred[logOdds + 6];
+}
+
+static void LogOddsToPhred(unsigned const readLen, uint8_t dst[], int8_t const src[], int offset)
+{
+    unsigned i;
+
+    for (i = 0; i < readLen; ++i)
+        dst[i] = LogOddsToPhred1(src[i] - offset);
+}
+
+static void PhredToPhred(unsigned const readLen, uint8_t dst[], int8_t const src[], int offset)
+{
+    unsigned i;
+
+    for (i = 0; i < readLen; ++i)
+        dst[i] = src[i] - offset;
+}
+
+struct ReadResult {
+    float progress;
+    uint64_t recordNo;
+    enum {
+        rr_undefined = 0,
+        rr_sequence,
+        rr_rejected,
+        rr_done,
+        rr_error
+    } type;
+    union {
+        struct sequence {
+            char *name;
+            char *spotGroup;
+            char *seqDNA;
+            unsigned char *quality;
+            uint64_t id;
+            unsigned readLen;
+            unsigned readNo;
+            int mated;
+            int orientation;
+            int bad;
+            int inserted;
+            int colorspace;
+            char cskey;
+        } sequence;
+        struct reject {
+            char *message;
+            uint64_t line;
+            unsigned column;
+            int fatal;
+        } reject;
+        struct error {
+            char const *message;
+            rc_t rc;
+        } error;
+    } u;
+};
+
+static char *getSpotGroup(Sequence const *const sequence)
+{
+    char *rslt = NULL;
+    char const *tmp = NULL;
+    size_t len = 0;
+
+    SequenceGetSpotGroup(sequence, &tmp, &len);
+    if (tmp) {
+        rslt = malloc(len + 1);
+        if (rslt) {
+            memcpy(rslt, tmp, len);
+            rslt[len] = '\0';
+        }
+    }
+    else {
+        rslt = malloc(1);
+        if (rslt) {
+            rslt[0] = '\0';
+        }
+    }
+    return rslt;
+}
+
+static char *getName(Sequence const *const sequence, bool const parseSpotName)
+{
+    char *rslt = NULL;
+    char const *tmp = NULL;
+    size_t len = 0;
+
+    SequenceGetSpotName(sequence, &tmp, &len);
+    if (parseSpotName)
+        ParseSpotName(tmp, &len);
+    rslt = malloc(len + 1);
+    if (rslt) {
+        memcpy(rslt, tmp, len);
+        rslt[len] = '\0';
+    }
+    return rslt;
+}
+
+static char const kReaderFileGetRecord[] = "ReaderFileGetRecord";
+static char const kRecordGetSequence[] = "RecordGetSequence";
+static char const kRecordGetRejected[] = "RecordGetRejected";
+static char const kRejectedGetError[] = "RejectedGetError";
+static char const kSequenceGetQuality[] = "SequenceGetQuality";
+static char const kGetKeyID[] = "GetKeyID";
+static char const kSequenceGetRead[] = "SequenceGetRead";
+static char const kQuitting[] = "Quitting";
+
+static void readSequence(CommonWriterSettings *const G, SpotAssembler *const ctx, Sequence const *const sequence, struct ReadResult *const rslt)
+{
+    char *seqDNA = NULL;
+    uint8_t *qual = NULL;
+    char *name = NULL;
+    char *spotGroup = NULL;
+    uint32_t readLen = 0;
+    unsigned readNo = 0;
+    int mated = 0;
+    int orientation = 0;
+    int colorspace = 0;
+    char cskey[2];
+    uint64_t keyId = 0;
+    bool wasInserted = 0;
+    bool bad = 0;
+    rc_t rc = 0;
+
+    memset(cskey, 0, sizeof(cskey));
+    colorspace = SequenceIsColorSpace(sequence);
+    orientation = SequenceGetOrientationSelf(sequence);
+    bad = SequenceIsLowQuality(sequence);
+    if (colorspace)
+        rc = SequenceGetCSReadLength(sequence, &readLen);
+    else
+        rc = SequenceGetReadLength(sequence, &readLen);
+    assert(rc == 0);
+    seqDNA = malloc(readLen);
+    qual = malloc(readLen);
+    name = getName(sequence, G->parseSpotName);
+    spotGroup = getSpotGroup(sequence);
+
+    if (   seqDNA == NULL
+        || qual == NULL
+        || name == NULL
+        || spotGroup == NULL
+        )
+    {
+        fprintf(stderr, "OUT OF MEMORY!!!");
+        abort();
+    }
+
+    if (!colorspace) {
+        rc = SequenceGetRead(sequence, seqDNA);
+    }
+    else {
+        SequenceGetCSKey(sequence, cskey);
+        rc = SequenceGetCSRead(sequence, seqDNA);
+    }
+    if (rc != 0) {
+        (void)PLOGERR(klogErr, (klogErr, rc, "Spot '$(name)': failed to get sequence", "%s", name));
+        rslt->type = rr_error;
+        rslt->u.error.rc = rc;
+        rslt->u.error.message = kSequenceGetRead;
+        goto CLEANUP;
+    }
+    {
+        int8_t const *squal = NULL;
+        uint8_t qoffset = 0;
+        int qualType = 0;
+
+        if (!colorspace || G->useQUAL)
+            rc = SequenceGetQuality(sequence, &squal, &qoffset, &qualType);
+        else {
+            rc = SequenceGetCSQuality(sequence, &squal, &qoffset, &qualType);
+            qualType = QT_Phred;
+        }
+        if (rc != 0) {
+            (void)PLOGERR(klogErr, (klogErr, rc, "Spot '$(name)': length of original quality does not match sequence", "name=%s", name));
+            rslt->type = rr_error;
+            rslt->u.error.rc = rc;
+            rslt->u.error.message = kSequenceGetQuality;
+            goto CLEANUP;
+        }
+        if (squal) {
+            if (qualType == QT_Phred)
+                PhredToPhred(readLen, qual, squal, qoffset);
+            else if (qualType == QT_LogOdds)
+                LogOddsToPhred(readLen, qual, squal, qoffset);
+            else
+                memcpy(qual, squal, readLen);
+        }
+        else if (!colorspace)
+            memset(qual, 30, readLen);
+        else
+            memset(qual, 0, readLen);
+    }
+    if (SequenceWasPaired(sequence)) {
+        if (SequenceIsFirst(sequence))
+            readNo |= 1;
+        if (SequenceIsSecond(sequence))
+            readNo |= 2;
+        if (readNo == 1 || readNo == 2)
+            mated = 1;
+    }
+    if (!mated)
+        readNo = 1;
+
+    rc = GetKeyID(G, ctx, &keyId, &wasInserted, spotGroup, name, strlen(name));
+    if (rc != 0) {
+        rslt->type = rr_error;
+        rslt->u.error.rc = rc;
+        rslt->u.error.message = kGetKeyID;
+    }
+CLEANUP:
+    if (rslt->type == rr_error) {
+        free(seqDNA);
+        free(qual);
+        free(name);
+        free(spotGroup);
+    }
+    else {
+        rslt->type = rr_sequence;
+        rslt->u.sequence.name = name;
+        rslt->u.sequence.spotGroup = spotGroup;
+        rslt->u.sequence.seqDNA = seqDNA;
+        rslt->u.sequence.quality = qual;
+        rslt->u.sequence.id = keyId;
+        rslt->u.sequence.readLen = readLen;
+        rslt->u.sequence.readNo = readNo;
+        rslt->u.sequence.mated = mated;
+        rslt->u.sequence.orientation = orientation;
+        rslt->u.sequence.bad = bad;
+        rslt->u.sequence.inserted = wasInserted;
+        rslt->u.sequence.colorspace = colorspace;
+        rslt->u.sequence.cskey = cskey[0];
+    }
+    return;
+}
+
+static void freeReadResultSequence(struct ReadResult const *const rslt)
+{
+    free(rslt->u.sequence.name);
+    free(rslt->u.sequence.spotGroup);
+    free(rslt->u.sequence.seqDNA);
+    free(rslt->u.sequence.quality);
+}
+
+static void readRejected(CommonWriterSettings *const G, SpotAssembler *const ctx, Rejected const *const reject, struct ReadResult *const rslt)
+{
+    char const *message;
+    uint64_t line = 0;
+    uint64_t col = 0;
+    bool fatal = 0;
+    rc_t const rc = RejectedGetError(reject, &message, &line, &col, &fatal);
+
+    if (rc == 0) {
+        rslt->type = rr_rejected;
+        rslt->u.reject.message = strdup(message);
+        rslt->u.reject.line = line;
+        rslt->u.reject.column = col;
+        rslt->u.reject.fatal = fatal;
+    }
+    else {
+        rslt->type = rr_error;
+        rslt->u.error.rc = rc;
+        rslt->u.error.message = kRejectedGetError;
+    }
+}
+
+static void freeReadResultRejected(struct ReadResult const *const rslt)
+{
+    free(rslt->u.reject.message);
+}
+
+static void readRecord(CommonWriterSettings *const G, SpotAssembler *const ctx, Record const *const record, struct ReadResult *const rslt)
+{
+    rc_t rc = 0;
+    Rejected const *rej = NULL;
+
+    rc = RecordGetRejected(record, &rej);
+    if (rc == 0 && rej == NULL) {
+        Sequence const *sequence = NULL;
+        rc = RecordGetSequence(record, &sequence);
+        if (rc == 0) {
+            assert(sequence != NULL);
+            readSequence(G, ctx, sequence, rslt);
+            SequenceRelease(sequence);
+            return;
+        }
+        rslt->type = rr_error;
+        rslt->u.error.rc = rc;
+        rslt->u.error.message = kRecordGetSequence;
+        return;
+    }
+    if (rc != 0) {
+        rslt->type = rr_error;
+        rslt->u.error.rc = rc;
+        rslt->u.error.message = kRecordGetRejected;
+        return;
+    }
+    assert(rej != NULL);
+    readRejected(G, ctx, rej, rslt);
+    RejectedRelease(rej);
+}
+
+static struct ReadResult *threadGetNextRecord(CommonWriterSettings *const G, SpotAssembler *const ctx, struct ReaderFile const *reader, uint64_t *reccount)
+{
+    rc_t rc = 0;
+    Record const *record = NULL;
+    struct ReadResult *const rslt = calloc(1, sizeof(*rslt));
+
+    assert(rslt != NULL);
+    if (rslt != NULL) {
+        rslt->progress = ReaderFileGetProportionalPosition(reader);
+        rslt->recordNo = ++*reccount;
+        if (G->maxAlignCount > 0 && rslt->recordNo > G->maxAlignCount) {
+            (void)PLOGMSG(klogDebug, (klogDebug, "reached limit of $(max) records read", "max=%u", (unsigned)G->maxAlignCount));
+            rslt->type = rr_done;
+            return rslt;
+        }
+        rc = ReaderFileGetRecord(reader, &record);
+        if (rc != 0) {
+            rslt->type = rr_error;
+            rslt->u.error.rc = rc;
+            rslt->u.error.message = kReaderFileGetRecord;
+            return rslt;
+        }
+        if (record != NULL) {
+            readRecord(G, ctx, record, rslt);
+            RecordRelease(record);
+            return rslt;
+        }
+        else {
+            rslt->type = rr_done;
+            return rslt;
+        }
+    }
+    abort();
+}
+
+static void freeReadResultError(struct ReadResult const *const rslt)
+{
+    (void)0;
+}
+
+static void freeReadResult(struct ReadResult const *const rslt)
+{
+    if (rslt->type == rr_sequence)
+        freeReadResultSequence(rslt);
+    else if (rslt->type == rr_rejected)
+        freeReadResultRejected(rslt);
+    else if (rslt->type == rr_error)
+        freeReadResultError(rslt);
+}
+
+struct ReadThreadContext {
+    timeout_t tm;
+    KThread *th;
+    KQueue *que;
+    CommonWriterSettings *settings;
+    SpotAssembler *ctx;
+    ReaderFile const *reader;
+    uint64_t reccount;
+};
+
+static rc_t readThread(KThread const *const th, void *const ctx)
+{
+    struct ReadThreadContext *const self = ctx;
+    timeout_t tm;
+    rc_t rc = 0;
+
+    TimeoutInit(&tm, 10000);
+    while (Quitting() == 0) {
+        struct ReadResult *const rr = threadGetNextRecord(self->settings, self->ctx, self->reader, &self->reccount);
+        int const rr_type = rr->type;
+
+        for ( ;; ) {
+            rc = KQueuePush(self->que, rr, &tm);
+            if (rc == 0)
+                break;
+            if ((int)GetRCObject(rc) == rcTimeout) {
+                continue;
+            }
+            break;
+        }
+        if (rc) {
+            (void)LOGERR(klogErr, rc, "readThread: failed to push next record into queue");
+            free(rr);
+            break;
+        }
+        else if (rr_type == rr_done) {
+            /* normal exit from end of file */
+            (void)LOGMSG(klogDebug, "readThread done : end of file");
+            break;
+        }
+    }
+    KQueueSeal(self->que);
+    return rc;
+}
+
+static struct ReadResult getNextRecord(struct ReadThreadContext *const self)
+{
+    struct ReadResult rslt;
+
+    memset(&rslt, 0, sizeof(rslt));
+#if USE_READER_THREAD
+    if (self->th == NULL) {
+        TimeoutInit(&self->tm, 1000000);
+        rslt.u.error.rc = KQueueMake(&self->que, 1024);
+        if (rslt.u.error.rc) {
+            rslt.type = rr_error;
+            rslt.u.error.message = "KQueueMake";
+            return rslt;
+        }
+        rslt.u.error.rc = KThreadMake(&self->th, readThread, (void *)self);
+        if (rslt.u.error.rc) {
+            rslt.type = rr_error;
+            rslt.u.error.message = "KThreadMake";
+            return rslt;
+        }
+    }
+    while ((rslt.u.error.rc = Quitting()) == 0) {
+        void *rr = NULL;
+        rslt.u.error.rc = KQueuePop(self->que, &rr, &self->tm);
+        if (rslt.u.error.rc == 0) {
+            memcpy(&rslt, rr, sizeof(rslt));
+            free(rr);
+            if (rslt.type == rr_done)
+                goto DONE;
+            return rslt;
+        }
+        if ((int)GetRCObject(rslt.u.error.rc) == rcTimeout) {
+            (void)LOGMSG(klogDebug, "KQueuePop timed out");
+        }
+        else {
+            (void)LOGERR(klogErr, rslt.u.error.rc, "KQueuePop failed");
+            rslt.type = rr_done;
+            goto DONE;
+        }
+    }
+    rslt.type = rr_error;
+    rslt.u.error.message = kQuitting;
+DONE:
+    {
+        rc_t rc = 0;
+        KThreadWait(self->th, &rc);
+        KThreadRelease(self->th);
+        KQueueRelease(self->que);
+        self->que = NULL;
+        self->th = NULL;
+    }
+#else
+    if ((rslt.u.error.rc = Quitting()) == 0) {
+        struct ReadResult *const rr = threadGetNextRecord(self->settings, self->ctx, self->reader, &self->reccount);
+        rslt = *rr;
+        free(rr);
+    }
+    else {
+        rslt.type = rr_error;
+        rslt.u.error.message = kQuitting;
+    }
+#endif
+    return rslt;
+}
+
+rc_t ArchiveFile(const struct ReaderFile *const reader,
+                 CommonWriterSettings *const G,
+                 struct SpotAssembler *const ctx,
+                 struct SequenceWriter *const seq,
+                 bool *const had_sequences)
+{
+    KDataBuffer buf;
+    KDataBuffer fragBuf;
+    rc_t rc;
+    SequenceRecord srec;
+    unsigned progress = 0;
+    uint64_t recordsProcessed = 0;
+    uint64_t filterFlagConflictRecords=0; /*** counts number of conflicts between flags 'duplicate' and 'lowQuality' ***/
+#define MAX_WARNINGS_FLAG_CONFLICT 10000 /*** maximum errors to report ***/
+
+    bool isColorSpace = false;
+    bool isNotColorSpace = G->noColorSpace;
+    char const *const fileName = ReaderFileGetPathname(reader);
+    struct ReadThreadContext threadCtx;
+    uint64_t fragmentsAdded = 0;
+    uint64_t spotsCompleted = 0;
+    uint64_t fragmentsEvicted = 0;
+
+    if (ctx->key2id_max == 0) {
+        ctx->key2id_max = 1;
+    }
+    
+    memset(&srec, 0, sizeof(srec));
+    memset(&threadCtx, 0, sizeof(threadCtx));
+    threadCtx.settings = G;
+    threadCtx.ctx = ctx;
+    threadCtx.reader = reader;
+
+    rc = KDataBufferMake(&fragBuf, 8, 4096);
+    if (rc)
+        return rc;
+    
+    rc = KDataBufferMake(&buf, 16, 0);
+    if (rc)
+        return rc;
+    
+    if (rc == 0) {
+        (void)PLOGMSG(klogInfo, (klogInfo, "Loading '$(file)'", "file=%s", fileName));
+    }
+    
+    *had_sequences = false;
+    
+    while (rc == 0) {
+        ctx_value_t *value;
+        struct ReadResult const rr = getNextRecord(&threadCtx);
+
+        if ((unsigned)(rr.progress * 100.0) > progress) {
+            unsigned new_value = rr.progress * 100.0;
+            KLoadProgressbar_Process(ctx->progress[0], new_value - progress, false);
+            progress = new_value;
+        }
+        if (rr.type == rr_done)
+            break;
+        if (rr.type == rr_error) {
+            rc = rr.u.error.rc;
+            if (rr.u.error.message == kQuitting) {
+                (void)LOGMSG(klogInfo, "Exiting read loop");
+                break;
+            }
+            if (rr.u.error.message == kReaderFileGetRecord) {
+                if (GetRCObject(rc) == rcRow && (GetRCState(rc) == rcInvalid || GetRCState(rc) == rcEmpty)) {
+                    (void)PLOGERR(klogWarn, (klogWarn, rc, "ArchiveFile: '$(file)' - row $(row)", "file=%s,row=%lu", fileName, rr.recordNo));
+                    rc = CheckLimitAndLogError(G);
+                }
+                /* else fail */
+            }
+            else {
+                (void)PLOGERR(klogErr, (klogErr, rc, "ArchiveFile: $(func) failed", "func=%s", rr.u.error.message));
+                rc = CheckLimitAndLogError(G);
+            }
+            goto LOOP_END;
+        }
+        if (rr.type == rr_rejected) {
+            char const *const message = rr.u.reject.message;
+            uint64_t const line = rr.u.reject.line;
+            uint64_t const col = rr.u.reject.column;
+            bool const fatal = rr.u.reject.fatal;
+
+            (void)PLOGMSG(fatal ? klogErr : klogWarn, (fatal ? klogErr : klogWarn,
+                                                       "$(file):$(l):$(c):$(msg)", "file=%s,l=%lu,c=%lu,msg=%s",
+                                                       fileName, line, col, message));
+            rc = CheckLimitAndLogError(G);
+            if (fatal)
+                rc = RC(rcExe, rcFile, rcParsing, rcFormat, rcUnsupported);
+            goto LOOP_END;
+        }
+        if (rr.type == rr_sequence) {
+            uint64_t const keyId = rr.u.sequence.id;
+            bool const wasInserted = !!rr.u.sequence.inserted;
+            bool const colorspace = !!rr.u.sequence.colorspace;
+            bool const mated = !!rr.u.sequence.mated;
+            unsigned const readNo = rr.u.sequence.readNo;
+            char const *const seqDNA = rr.u.sequence.seqDNA;
+            uint8_t const *const qual = rr.u.sequence.quality;
+            unsigned const readlen = rr.u.sequence.readLen;
+            int const readOrientation = !!rr.u.sequence.orientation;
+            bool const reverse = isColorSpace ? false : (readOrientation == ReadOrientationReverse);
+            char const cskey = rr.u.sequence.cskey;
+            bool const bad = !!rr.u.sequence.bad;
+            char const *const spotGroup = rr.u.sequence.spotGroup;
+            char const *const name = rr.u.sequence.name;
+            int const namelen = strlen(name);
+
+            if (!G->noColorSpace) {
+                if (colorspace) {
+                    if (isNotColorSpace) {
+                    MIXED_BASE_AND_COLOR:
+                        rc = RC(rcApp, rcFile, rcReading, rcData, rcInconsistent);
+                        (void)PLOGERR(klogErr, (klogErr, rc, "File '$(file)' contains base space and color space", "file=%s", fileName));
+                        goto LOOP_END;
+                    }
+                    ctx->isColorSpace = isColorSpace = true;
+                }
+                else if (isColorSpace)
+                    goto MIXED_BASE_AND_COLOR;
+                else
+                    isNotColorSpace = true;
+            }
+
+            value = MMArrayGet(ctx->id2value, &rc, keyId);
+            if (value == NULL) {
+                (void)PLOGERR(klogErr, (klogErr, rc, "MMArrayGet: failed on id '$(id)'", "id=%u", keyId));
+                goto LOOP_END;
+            }
+            if (wasInserted) {
+                memset(value, 0, sizeof(*value));
+                value->fragmentOffset = -1;
+                value->unmated = !mated;
+            }
+            else {
+                if (mated && value->unmated) {
+                    (void)PLOGERR(klogWarn, (klogWarn, RC(rcApp, rcFile, rcReading, rcData, rcInconsistent),
+                                             "Spot '$(name)', which was first seen without mate info, now has mate info",
+                                             "name=%s", name));
+                    rc = CheckLimitAndLogError(G);
+                    goto LOOP_END;
+                }
+            }
+            
+            ++recordsProcessed;
+            if (mated) {
+                if (value->written) {
+                    (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)' has already been assigned a spot id", "name=%s", name));
+                }
+                else if (!value->has_a_read) {
+                    /* new mated fragment - do spot assembly */
+                    unsigned sz;
+                    FragmentInfo fi;
+                    int64_t const victimId = ctx->fragment[keyId % FRAGMENT_HOT_COUNT].id;
+                    void *const victimData = ctx->fragment[keyId % FRAGMENT_HOT_COUNT].data;
+                    void *myData = NULL;
+
+                    ++fragmentsAdded;
+                    value->seqHash[readNo - 1] = SeqHashKey(seqDNA, readlen);
+
+                    memset(&fi, 0, sizeof(fi));
+                    fi.orientation = readOrientation;
+                    fi.otherReadNo = readNo;
+                    fi.sglen   = strlen(spotGroup);
+                    fi.readlen = readlen;
+                    fi.cskey = cskey;
+                    fi.is_bad = bad;
+                    sz = sizeof(fi) + 2*fi.readlen + fi.sglen;
+                    myData = malloc(sz);
+                    if (myData == NULL) {
+                        (void)LOGERR(klogErr, RC(rcExe, rcFile, rcReading, rcMemory, rcExhausted), "OUT OF MEMORY!");
+                        abort();
+                        goto LOOP_END;
+                    }
+                    {{
+                        uint8_t *dst = (uint8_t*)myData;
+
+                        memcpy(dst,&fi,sizeof(fi));
+                        dst += sizeof(fi);
+                        COPY_READ((char *)dst, seqDNA, fi.readlen, reverse);
+                        dst += fi.readlen;
+                        COPY_QUAL(dst, qual, fi.readlen, reverse);
+                        dst += fi.readlen;
+                        memcpy(dst,spotGroup,fi.sglen);
+                    }}
+                    ctx->fragment[keyId % FRAGMENT_HOT_COUNT].id = keyId;
+                    ctx->fragment[keyId % FRAGMENT_HOT_COUNT].data = myData;
+                    value->has_a_read = 1;
+                    value->fragmentSize = sz;
+                    *had_sequences = true;
+
+                    if (victimData != NULL) {
+                        ctx_value_t *const victim = MMArrayGet(ctx->id2value, &rc, victimId);
+                        if (victim == NULL) {
+                            (void)PLOGERR(klogErr, (klogErr, rc, "MMArrayGet: failed on id '$(id)'", "id=%u", victimId));
+                            abort();
+                            goto LOOP_END;
+                        }
+                        if (victim->fragmentOffset < 0) {
+                            int64_t const pos = ctx->nextFragment;
+                            int64_t const nwrit = pwrite(ctx->fragmentFd, victimData, victim->fragmentSize, pos);
+
+                            if (nwrit == victim->fragmentSize) {
+                                ctx->nextFragment += victim->fragmentSize;
+                                victim->fragmentOffset = pos;
+                                free(victimData);
+                                ++fragmentsEvicted;
+                            }
+                            else {
+                                (void)LOGMSG(klogFatal, "Failed to write fragment data");
+                                abort();
+                                goto LOOP_END;
+                            }
+                        }
+                        else {
+                            (void)LOGMSG(klogFatal, "PROGRAMMER ERROR!!");
+                            abort();
+                            goto LOOP_END;
+                        }
+                    }
+                }
+                else {
+                    /* might be second fragment */
+                    uint64_t const sz = value->fragmentSize;
+                    bool freeFip = false;
+                    FragmentInfo *fip = NULL;
+
+                    if (ctx->fragment[keyId % FRAGMENT_HOT_COUNT].id == keyId) {
+                        fip = ctx->fragment[keyId % FRAGMENT_HOT_COUNT].data;
+                        freeFip = true;
+                    }
+                    else {
+                        int64_t nread = 0;
+                        rc = KDataBufferResize(&fragBuf, (size_t)sz);
+                        if (rc) {
+                            (void)PLOGERR(klogErr, (klogErr, rc, "Failed to resize fragment buffer", ""));
+                            abort();
+                            goto LOOP_END;
+                        }
+                        nread = pread(ctx->fragmentFd, fragBuf.base, sz, value->fragmentOffset);
+                        if (nread == sz) {
+                            fip = (FragmentInfo *) fragBuf.base;
+                        }
+                        else {
+                            (void)PLOGMSG(klogFatal, (klogFatal, "Failed to read fragment data; spot:'$(name)'; "
+                                "size: $(size); pos: $(pos); read: $(read)", "name=%s,size=%lu,pos=%lu,read=%lu",
+                                name, sz, value->fragmentOffset, nread));
+                            abort();
+                            goto LOOP_END;
+                        }
+                    }
+                    if (readNo != fip->otherReadNo) {
+                        /* mate found */
+                        unsigned readLen[2];
+                        unsigned read1 = 0;
+                        unsigned read2 = 1;
+                        uint8_t  *src  = (uint8_t*) fip + sizeof(*fip);
+
+                        ++spotsCompleted;
+                        value->seqHash[readNo - 1] = SeqHashKey(seqDNA, readlen);
+
+                        if (readNo < fip->otherReadNo) {
+                            read1 = 1;
+                            read2 = 0;
+                        }
+                        readLen[read1] = fip->readlen;
+                        readLen[read2] = readlen;
+                        rc = SequenceRecordInit(&srec, 2, readLen);
+                        if (rc) {
+                            (void)PLOGERR(klogErr, (klogErr, rc, "Failed resizing sequence record buffer", ""));
+                            goto LOOP_END;
+                        }
+                        srec.is_bad[read1] = fip->is_bad;
+                        srec.orientation[read1] = fip->orientation;
+                        srec.cskey[read1] = fip->cskey;
+                        memcpy(srec.seq + srec.readStart[read1], src, fip->readlen);
+                        src += fip->readlen;
+                        memcpy(srec.qual + srec.readStart[read1], src, fip->readlen);
+                        src += fip->readlen;
+
+                        srec.orientation[read2] = readOrientation;
+                        COPY_READ(srec.seq + srec.readStart[read2],
+                                  seqDNA,
+                                  srec.readLen[read2],
+                                  reverse);
+                        COPY_QUAL(srec.qual + srec.readStart[read2],
+                                  qual,
+                                  srec.readLen[read2],
+                                  reverse);
+
+                        srec.keyId = keyId;
+                        srec.is_bad[read2] = bad;
+                        srec.cskey[read2] = cskey;
+
+                        srec.spotGroup = (char *)spotGroup;
+                        srec.spotGroupLen = strlen(spotGroup);
+                        rc = SequenceWriteRecord(seq, &srec, isColorSpace, false, G->platform,
+                                                 G->keepMismatchQual, G->no_real_output, G->hasTI, G->QualQuantizer);
+                        if (freeFip) {
+                            free(fip);
+                            ctx->fragment[keyId % FRAGMENT_HOT_COUNT].data = NULL;
+                        }
+                        if (rc) {
+                            (void)LOGERR(klogErr, rc, "SequenceWriteRecord failed");
+                            goto LOOP_END;
+                        }
+                        CTX_VALUE_SET_S_ID(*value, ++ctx->spotId);
+                        value->written = 1;
+                    }
+                }
+            }
+            else if (value->written) {
+                (void)PLOGMSG(klogWarn, (klogWarn, "Spot '$(name)' has already been assigned a spot id", "name=%s", name));
+            }
+            else if (value->has_a_read) {
+                if (ctx->fragment[keyId % FRAGMENT_HOT_COUNT].id == keyId) {
+                    free(ctx->fragment[keyId % FRAGMENT_HOT_COUNT].data);
+                    ctx->fragment[keyId % FRAGMENT_HOT_COUNT].data = NULL;
+                }
+                (void)PLOGERR(klogWarn, (klogWarn, RC(rcApp, rcFile, rcReading, rcData, rcInconsistent),
+                                         "Spot '$(name)', which was first seen with mate info, now has no mate info",
+                                         "name=%s", name));
+                rc = CheckLimitAndLogError(G);
+            }
+            else {
+                /* new unmated fragment - no spot assembly */
+                unsigned readLen[1];
+
+                value->seqHash[0] = SeqHashKey(seqDNA, readlen);
+
+                readLen[0] = readlen;
+                rc = SequenceRecordInit(&srec, 1, readLen);
+                if (rc) {
+                    (void)LOGERR(klogErr, rc, "Failed resizing sequence record buffer");
+                    goto LOOP_END;
+                }
+                srec.is_bad[0] = bad;
+                srec.orientation[0] = readOrientation;
+                srec.cskey[0] = cskey;
+                COPY_READ(srec.seq  + srec.readStart[0], seqDNA, readlen, false);
+                COPY_QUAL(srec.qual + srec.readStart[0], qual, readlen, false);
+                
+                srec.keyId = keyId;
+                
+                srec.spotGroup = (char *)spotGroup;
+                srec.spotGroupLen = strlen(spotGroup);
+                
+                srec.spotName = (char *)name;
+                srec.spotNameLen = namelen;
+                
+                rc = SequenceWriteRecord(seq, &srec, isColorSpace, false, G->platform,
+                                         G->keepMismatchQual, G->no_real_output, G->hasTI, G->QualQuantizer);
+                if (rc) {
+                    (void)LOGERR(klogErr, rc, "SequenceWriteRecord failed");
+                    goto LOOP_END;
+                }
+                CTX_VALUE_SET_S_ID(*value, ++ctx->spotId);
+                value->written = 1;
+                *had_sequences = true;
+            }
+        }
+        else
+            abort();
+
+LOOP_END:
+        freeReadResult(&rr);
+    }
+
+    KThreadCancel(threadCtx.th);
+    KThreadRelease(threadCtx.th);
+    KQueueRelease(threadCtx.que);
+
+    if (filterFlagConflictRecords > 0) {
+        (void)PLOGMSG(klogWarn, (klogWarn, "$(cnt1) out of $(cnt2) records contained warning : both 'duplicate' and 'lowQuality' flag bits set, only 'duplicate' will be saved", "cnt1=%lu,cnt2=%lu", filterFlagConflictRecords,recordsProcessed));
+    }
+    if (rc == 0 && recordsProcessed == 0) {
+        (void)LOGMSG(klogWarn, (G->limit2config || G->refFilter != NULL) ? 
+                     "All records from the file were filtered out" :
+                     "The file contained no records that were processed.");
+        rc = RC(rcAlign, rcFile, rcReading, rcData, rcEmpty);
+    }
+    if (rc == 0 && threadCtx.reccount > 0) {
+        uint64_t const reccount = threadCtx.reccount - 1;
+        double const percentage = ((double)G->errCount) / reccount;
+        double const allowed = G->maxErrPct/ 100.0;
+        if (percentage > allowed) {
+            rc = RC(rcExe, rcTable, rcClosing, rcData, rcInvalid);
+            (void)PLOGERR(klogErr, 
+                            (klogErr, rc,
+                             "Too many bad records: "
+                                 "records: $(records), bad records: $(bad_records), "
+                                 "bad records percentage: $(percentage), "
+                                 "allowed percentage: $(allowed)",
+                             "records=%lu,bad_records=%lu,percentage=%.2f,allowed=%.2f",
+                             reccount, G->errCount, percentage, allowed));
+        }
+    }
+    (void)PLOGMSG(klogDebug, (klogDebug, "Fragments added to spot assembler: $(added). Fragments evicted to disk: $(evicted). Spots completed: $(completed)",
+        "added=%lu,evicted=%lu,completed=%lu", fragmentsAdded, fragmentsEvicted, spotsCompleted));
+
+    KDataBufferWhack(&buf);
+    KDataBufferWhack(&fragBuf);
+    KDataBufferWhack(&srec.storage);
+    return rc;
+}
+
+/*--------------------------------------------------------------------------
+ * CommonWriter
+ */
+ 
+rc_t CommonWriterInit(CommonWriter* self, struct VDBManager *mgr, struct VDatabase *db, const CommonWriterSettings* G)
+{
+    rc_t rc = 0;
+    assert(self);
+    assert(mgr);
+    assert(db);
+    
+    memset(self, 0, sizeof(*self));
+    if (G)
+        self->settings = *G;
+
+    {
+        self->seq = malloc(sizeof(*self->seq));
+        if (self->seq == 0)
+        {
+            return RC(rcAlign, rcArc, rcAllocating, rcMemory, rcExhausted);
+        }
+        SequenceWriterInit(self->seq, db);
+        
+        rc = SetupContext(&self->settings, &self->ctx);
+    }
+    if (self->settings.tmpfs == NULL)
+        self->settings.tmpfs = "/tmp";
+
+    self->commit = true;
+    
+    return rc;
+}
+
+rc_t CommonWriterArchive(CommonWriter *const self,
+                         const struct ReaderFile *const reader)
+{
+    rc_t rc;
+    bool has_sequences = false;
+
+    assert(self);
+    rc = ArchiveFile(reader,
+                     &self->settings,
+                     &self->ctx,
+                     self->seq,
+                     &has_sequences);
+    if (rc)
+        self->commit = false;
+    else
+        self->had_sequences |= has_sequences;
+
+    self->err_count += self->settings.errCount;
+    return rc;
+}
+
+rc_t CommonWriterComplete(CommonWriter* self, bool quitting, uint64_t maxDistance)
+{
+    rc_t rc=0;
+    /*** No longer need memory for key2id ***/
+    size_t i;
+    for (i = 0; i != self->ctx.key2id_count; ++i) {
+        KBTreeDropBacking(self->ctx.key2id[i]);
+        KBTreeRelease(self->ctx.key2id[i]);
+        self->ctx.key2id[i] = NULL;
+    }
+    free(self->ctx.key2id_names);
+    self->ctx.key2id_names = NULL;
+    /*******************/
+
+    if (self->had_sequences) {
+        if (!quitting) {
+            (void)LOGMSG(klogInfo, "Writing unpaired sequences");
+            rc = WriteSoloFragments(&self->settings, &self->ctx, self->seq);
+            ContextReleaseMemBank(&self->ctx);
+            if (rc == 0) {
+                rc = SequenceDoneWriting(self->seq);
+            }
+        }
+        else
+            ContextReleaseMemBank(&self->ctx);
+    }
+
+    return rc;
+}
+
+rc_t CommonWriterWhack(CommonWriter* self)
+{
+    rc_t rc = 0;
+    assert(self);
+    
+    ContextRelease(&self->ctx);
+    
+    if (self->seq)
+    {
+        SequenceWhack(self->seq, self->commit);
+        free(self->seq);
+    }
+
+    return rc;
+}
+
diff --git a/tools/fastq-loader/common-writer.h b/tools/fastq-loader/common-writer.h
new file mode 100644
index 0000000..74a2220
--- /dev/null
+++ b/tools/fastq-loader/common-writer.h
@@ -0,0 +1,164 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+
+struct VDBManager;
+struct VDatabase;
+struct KMemBank;
+struct KBTree;
+struct KLoadProgressbar;
+struct ReaderFile;
+struct CommonWriter;
+struct SequenceWriter;
+struct AlignmentWriter;
+struct Reference;
+
+/*--------------------------------------------------------------------------
+ * CommonWriterSettings
+ */
+enum LoaderModes {
+    mode_Archive,
+    mode_Analysis
+};
+
+typedef struct CommonWriterSettings
+{
+    uint64_t numfiles;
+    char const *inpath;
+    char const *outpath;
+    char const *tmpfs;
+    
+    struct KFile *noMatchLog;
+    
+    char const *schemaPath;
+    char const *schemaIncludePath;
+    
+    char const *refXRefPath;
+    
+    char const *QualQuantizer;
+    
+    char const *refFilter;
+
+    char const* const* refFiles; /* NULL-terminated array pointing to argv */
+    
+    char const *headerText;
+    
+    uint64_t maxAlignCount;
+    size_t cache_size;
+
+    uint64_t errCount;
+    uint64_t maxErrCount;
+    uint64_t maxErrPct;
+    uint64_t maxWarnCount_NoMatch;
+    uint64_t maxWarnCount_DupConflict;
+    uint64_t pid;
+    uint64_t minMatchCount; /* minimum number of matches to count as an alignment */
+    int minMapQual;
+    enum LoaderModes mode;
+    uint32_t maxSeqLen;
+    bool omit_aligned_reads;
+    bool omit_reference_reads;
+    bool no_real_output;
+    bool expectUnsorted;
+    bool noVerifyReferences;
+    bool onlyVerifyReferences;
+    bool useQUAL;
+    bool limit2config;
+    bool editAlignedQual;
+    bool keepMismatchQual;
+    bool acceptBadDups; /* accept spots with inconsistent PCR duplicate flags */
+    bool acceptNoMatch; /* accept without any matching bases */
+    uint8_t alignedQualValue;
+    bool allUnaligned; /* treat all records as unaligned */
+    bool noColorSpace;
+    bool noSecondary;
+    bool hasTI;
+    bool acceptHardClip;
+    INSDC_SRA_platform_id platform;
+    bool parseSpotName;
+    bool compressQuality;
+    uint64_t maxMateDistance;
+} CommonWriterSettings;
+
+/*--------------------------------------------------------------------------
+ * SpotAssembler
+ */
+
+#define FRAGMENT_HOT_COUNT (1024u * 1024u)
+#define NUM_ID_SPACES (256u)
+
+typedef struct SpotAssembler {
+    const struct KLoadProgressbar *progress[4];
+    struct KBTree *key2id[NUM_ID_SPACES];
+    char *key2id_names;
+    struct MMArray *id2value;
+    int64_t spotId;
+    int64_t nextFragment;
+
+    struct {
+        int64_t id;
+        void *data;
+    } *fragment; /* [FRAGMENT_HOT_COUNT] */
+
+    uint32_t idCount[NUM_ID_SPACES];
+    uint32_t key2id_hash[NUM_ID_SPACES];
+    
+    size_t key2id_max;
+    size_t key2id_name_max;
+    size_t key2id_name_alloc;
+    size_t key2id_count;
+    
+    size_t key2id_name[NUM_ID_SPACES];
+    /* this array is kept in name order */
+    /* this maps the names to key2id and idCount */
+    size_t key2id_oid[NUM_ID_SPACES];
+
+    int fragmentFd;
+    unsigned pass;
+    bool isColorSpace;
+} SpotAssembler;
+
+/*--------------------------------------------------------------------------
+ * CommonWriter
+ */
+typedef struct CommonWriter {
+    CommonWriterSettings settings;
+    SpotAssembler ctx;
+    struct SequenceWriter* seq;
+    bool had_sequences;
+    unsigned err_count;
+    bool commit;
+} CommonWriter;
+
+rc_t CommonWriterInit(CommonWriter* self, struct VDBManager *mgr, struct VDatabase *db, const CommonWriterSettings* settings);
+
+rc_t CommonWriterArchive(CommonWriter* self, const struct ReaderFile *);
+rc_t CommonWriterComplete(CommonWriter* self, bool quitting, uint64_t maxDistance);
+
+rc_t CommonWriterWhack(CommonWriter* self);
diff --git a/tools/fastq-loader/fastq-grammar.c b/tools/fastq-loader/fastq-grammar.c
new file mode 100644
index 0000000..1c9313f
--- /dev/null
+++ b/tools/fastq-loader/fastq-grammar.c
@@ -0,0 +1,2310 @@
+/* A Bison parser, made by GNU Bison 2.5.  */
+
+/* Bison implementation for Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989-1990, 2000-2011 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 3 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, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+   
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.5"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 1
+
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+/* Substitute the variable and function names.  */
+#define yyparse         FASTQ_parse
+#define yylex           FASTQ_lex
+#define yyerror         FASTQ_error
+#define yylval          FASTQ_lval
+#define yychar          FASTQ_char
+#define yydebug         FASTQ_debug
+#define yynerrs         FASTQ_nerrs
+
+
+/* Copy the first part of user declarations.  */
+
+  
+    #include <sysalloc.h>
+    #include <ctype.h>
+    #include <stdlib.h>
+    #include <string.h>
+
+    #include "fastq-parse.h"
+
+    #define YYSTYPE FASTQToken
+    #define YYLEX_PARAM pb->scanner
+    #define YYDEBUG 1
+
+    #include "fastq-tokens.h"
+
+    static void AddQuality(FASTQParseBlock* pb, const FASTQToken* token);
+    static void SetReadNumber(FASTQParseBlock* pb, const FASTQToken* token);
+    static void SetSpotGroup(FASTQParseBlock* pb, const FASTQToken* token);
+    static void SetRead(FASTQParseBlock* pb, const FASTQToken* token);
+    
+    static void StartSpotName(FASTQParseBlock* pb, size_t offset);
+    static void GrowSpotName(FASTQParseBlock* pb, const FASTQToken* token);
+    static void StopSpotName(FASTQParseBlock* pb);
+    static void RestartSpotName(FASTQParseBlock* pb);
+    static void SaveSpotName(FASTQParseBlock* pb);
+    static void RevertSpotName(FASTQParseBlock* pb);
+
+    #define UNLEX do { if (yychar != YYEMPTY && yychar != YYEOF) FASTQ_unlex(pb, & yylval); } while (0)
+    
+    #define IS_PACBIO(pb) ((pb)->defaultReadNumber == -1)
+
+
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 1
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     fqENDOFTEXT = 0,
+     fqRUNDOTSPOT = 258,
+     fqSPOTGROUP = 259,
+     fqNUMBER = 260,
+     fqALPHANUM = 261,
+     fqWS = 262,
+     fqENDLINE = 263,
+     fqBASESEQ = 264,
+     fqCOLORSEQ = 265,
+     fqTOKEN = 266,
+     fqASCQUAL = 267,
+     fqCOORDS = 268,
+     fqUNRECOGNIZED = 269
+   };
+#endif
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+/* Copy the second part of user declarations.  */
+
+
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+    int yyi;
+#endif
+{
+  return yyi;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef EXIT_SUCCESS
+#      define EXIT_SUCCESS 0
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
+       && ! ((defined YYMALLOC || defined malloc) \
+	     && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef EXIT_SUCCESS
+#    define EXIT_SUCCESS 0
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+     && (! defined __cplusplus \
+	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
+    do									\
+      {									\
+	YYSIZE_T yynewbytes;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
+	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+	yyptr += yynewbytes / sizeof (*yyptr);				\
+      }									\
+    while (YYID (0))
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T yyi;				\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  19
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   150
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  24
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  49
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  101
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  146
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   269
+
+#define YYTRANSLATE(YYX)						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const yytype_uint8 yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,    23,     2,    21,    20,    22,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    15,     2,
+       2,    18,    17,     2,    16,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,    19,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const yytype_uint16 yyprhs[] =
+{
+       0,     0,     3,     6,     8,     9,    10,    11,    21,    25,
+      27,    29,    32,    34,    38,    43,    47,    50,    51,    55,
+      56,    61,    62,    66,    68,    70,    71,    75,    76,    81,
+      82,    86,    87,    92,    94,    96,    98,   101,   111,   116,
+     120,   121,   126,   127,   132,   135,   137,   140,   144,   146,
+     148,   151,   152,   156,   159,   163,   167,   170,   173,   174,
+     180,   181,   187,   188,   194,   195,   202,   206,   208,   210,
+     213,   216,   219,   222,   225,   228,   229,   233,   234,   239,
+     241,   242,   243,   244,   245,   246,   258,   259,   263,   264,
+     266,   268,   269,   273,   277,   279,   283,   288,   290,   293,
+     296,   300
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const yytype_int8 yyrhs[] =
+{
+      25,     0,    -1,    31,    69,    -1,    31,    -1,    -1,    -1,
+      -1,    55,    13,    26,    15,    27,    43,    15,    28,    71,
+      -1,     6,     1,    30,    -1,    29,    -1,     0,    -1,    30,
+      29,    -1,     8,    -1,    32,    30,    36,    -1,    32,    30,
+       1,    30,    -1,     1,    30,    36,    -1,     1,    30,    -1,
+      -1,    16,    33,    44,    -1,    -1,    16,     7,    34,    44,
+      -1,    -1,    17,    35,    44,    -1,    37,    -1,    40,    -1,
+      -1,     9,    38,    30,    -1,    -1,    37,     9,    39,    30,
+      -1,    -1,    10,    41,    30,    -1,    -1,    40,    10,    42,
+      30,    -1,     9,    -1,    10,    -1,    47,    -1,    47,    56,
+      -1,    47,    56,     7,     5,    15,     6,    15,     5,    65,
+      -1,    47,    56,     7,     6,    -1,    47,    56,     7,    -1,
+      -1,    47,     7,    45,    59,    -1,    -1,    47,     7,    46,
+       6,    -1,    68,     7,    -1,    68,    -1,    55,    56,    -1,
+      55,    56,     7,    -1,    55,    -1,    50,    -1,    50,     4,
+      -1,    -1,    55,    48,     4,    -1,    49,    50,    -1,    49,
+      50,     4,    -1,    49,     6,    18,    -1,    55,     7,    -1,
+      55,    13,    -1,    -1,    55,    13,    19,    51,    59,    -1,
+      -1,    55,    13,    15,    52,    55,    -1,    -1,    55,    13,
+      20,    53,    55,    -1,    -1,    55,    13,    15,    20,    54,
+      55,    -1,    55,    13,    15,    -1,     6,    -1,     5,    -1,
+      55,    19,    -1,    55,    21,    -1,    55,    20,    -1,    55,
+      15,    -1,    55,     6,    -1,    55,     5,    -1,    -1,    22,
+      57,     5,    -1,    -1,    56,    22,    58,    55,    -1,     5,
+      -1,    -1,    -1,    -1,    -1,    -1,     5,    60,    15,    61,
+       6,    62,    15,    63,     5,    64,    65,    -1,    -1,    15,
+      66,    67,    -1,    -1,     9,    -1,     5,    -1,    -1,     3,
+      20,     5,    -1,     3,    22,     5,    -1,     3,    -1,    70,
+      30,    71,    -1,    70,    30,     1,    30,    -1,    23,    -1,
+      70,    11,    -1,    72,    30,    -1,    71,    72,    30,    -1,
+      12,    -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const yytype_uint16 yyrline[] =
+{
+       0,    82,    82,    84,    89,    90,    92,    88,    95,    97,
+     101,   102,   106,   110,   111,   112,   113,   117,   117,   118,
+     118,   119,   119,   123,   124,   128,   128,   130,   130,   135,
+     135,   137,   137,   142,   143,   148,   149,   151,   153,   154,
+     156,   156,   157,   157,   158,   159,   160,   161,   162,   166,
+     167,   168,   168,   169,   170,   171,   175,   185,   187,   186,
+     193,   193,   194,   194,   195,   195,   196,   200,   201,   202,
+     203,   204,   205,   206,   207,   212,   211,   224,   223,   235,
+     236,   237,   238,   239,   240,   236,   245,   245,   246,   250,
+     251,   252,   256,   257,   258,   264,   265,   269,   270,   274,
+     275,   278
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yytname[] =
+{
+  "fqENDOFTEXT", "error", "$undefined", "fqRUNDOTSPOT", "fqSPOTGROUP",
+  "fqNUMBER", "fqALPHANUM", "fqWS", "fqENDLINE", "fqBASESEQ", "fqCOLORSEQ",
+  "fqTOKEN", "fqASCQUAL", "fqCOORDS", "fqUNRECOGNIZED", "':'", "'@'",
+  "'>'", "'='", "'_'", "'.'", "'-'", "'/'", "'+'", "$accept", "sequence",
+  "$@1", "$@2", "$@3", "endfile", "endline", "readLines", "header", "$@4",
+  "$@5", "$@6", "read", "baseRead", "$@7", "$@8", "csRead", "$@9", "$@10",
+  "inlineRead", "tagLine", "$@11", "$@12", "nameSpotGroup", "$@13",
+  "nameWS", "nameWithCoords", "$@14", "$@15", "$@16", "$@17", "name",
+  "readNumber", "$@18", "$@19", "casava1_8", "$@20", "$@21", "$@22",
+  "$@23", "$@24", "indexSequence", "$@25", "index", "runSpotRead",
+  "qualityLines", "qualityHeader", "quality", "qualityLine", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const yytype_uint16 yytoknum[] =
+{
+       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
+     265,   266,   267,   268,   269,    58,    64,    62,    61,    95,
+      46,    45,    47,    43
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint8 yyr1[] =
+{
+       0,    24,    25,    25,    26,    27,    28,    25,    25,    25,
+      29,    29,    30,    31,    31,    31,    31,    33,    32,    34,
+      32,    35,    32,    36,    36,    38,    37,    39,    37,    41,
+      40,    42,    40,    43,    43,    44,    44,    44,    44,    44,
+      45,    44,    46,    44,    44,    44,    44,    44,    44,    47,
+      47,    48,    47,    47,    47,    47,    49,    50,    51,    50,
+      52,    50,    53,    50,    54,    50,    50,    55,    55,    55,
+      55,    55,    55,    55,    55,    57,    56,    58,    56,    59,
+      60,    61,    62,    63,    64,    59,    66,    65,    65,    67,
+      67,    67,    68,    68,    68,    69,    69,    70,    70,    71,
+      71,    72
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
+{
+       0,     2,     2,     1,     0,     0,     0,     9,     3,     1,
+       1,     2,     1,     3,     4,     3,     2,     0,     3,     0,
+       4,     0,     3,     1,     1,     0,     3,     0,     4,     0,
+       3,     0,     4,     1,     1,     1,     2,     9,     4,     3,
+       0,     4,     0,     4,     2,     1,     2,     3,     1,     1,
+       2,     0,     3,     2,     3,     3,     2,     2,     0,     5,
+       0,     5,     0,     5,     0,     6,     3,     1,     1,     2,
+       2,     2,     2,     2,     2,     0,     3,     0,     4,     1,
+       0,     0,     0,     0,     0,    11,     0,     3,     0,     1,
+       1,     0,     3,     3,     1,     3,     4,     1,     2,     2,
+       3,     1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+   Performed when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const yytype_uint8 yydefact[] =
+{
+       0,    10,     0,    68,     0,    12,    17,    21,     0,     9,
+       0,     3,     0,     0,    16,     0,    19,     0,     0,     1,
+      11,    97,     2,     0,     0,    74,    73,     4,    72,    69,
+      71,    70,    25,    29,    15,    23,    24,     8,     0,    94,
+      67,    18,    35,     0,    49,    48,    45,    22,    98,     0,
+       0,    13,     0,     0,     0,    27,    31,    20,     0,     0,
+      40,    75,    36,    67,    53,     0,    50,    56,    57,     0,
+      46,    44,     0,   101,    95,     0,    14,     5,    26,    30,
+       0,     0,    92,    93,     0,     0,     0,    39,    77,    55,
+      54,    66,    58,    62,    52,    47,    96,     0,    99,     0,
+      28,    32,    79,    41,    43,    76,     0,    38,     0,    64,
+       0,     0,     0,   100,    33,    34,     0,     0,     0,    78,
+       0,    61,    59,    63,     6,    81,     0,    65,     0,     0,
+       0,     7,    82,    88,     0,    86,    37,    83,    91,     0,
+      90,    89,    87,    84,    88,    85
+};
+
+/* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int16 yydefgoto[] =
+{
+      -1,     8,    52,    99,   128,     9,    10,    11,    12,    17,
+      38,    18,    34,    35,    53,    80,    36,    54,    81,   116,
+      41,    84,    85,    42,    69,    43,    44,   111,   110,   112,
+     120,    45,    62,    86,   108,   103,   117,   129,   134,   139,
+     144,   136,   138,   142,    46,    22,    23,    74,    75
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -73
+static const yytype_int8 yypact[] =
+{
+      50,   -73,     8,   -73,     4,   -73,     1,   -73,    21,   -73,
+       7,    11,     8,    57,    59,     8,   -73,    82,    82,   -73,
+     -73,   -73,   -73,    28,    32,   -73,   -73,   -73,   -73,   -73,
+     -73,   -73,   -73,   -73,   -73,    77,    44,   -73,    82,    53,
+     -73,   -73,     5,    76,    88,    25,    93,   -73,   -73,    36,
+       8,   -73,    90,     8,     8,   -73,   -73,   -73,   101,   102,
+     103,   -73,     6,    95,   110,    78,   -73,   -73,    45,   114,
+      13,   -73,     8,   -73,   107,     8,   -73,   -73,   -73,   -73,
+       8,     8,   -73,   -73,   116,   117,   119,    84,   -73,   -73,
+     -73,    -2,   -73,   -73,   -73,   -73,   -73,     8,   -73,    85,
+     -73,   -73,   111,   -73,   -73,   -73,   112,   -73,    98,   -73,
+      98,   116,    98,   -73,   -73,   -73,   113,   115,   123,    96,
+      98,    96,   -73,    96,   -73,   -73,   118,    96,   107,   125,
+     120,   107,   -73,   121,   122,   -73,   -73,   -73,    52,   127,
+     -73,   -73,   -73,   -73,   121,   -73
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const yytype_int8 yypgoto[] =
+{
+     -73,   -73,   -73,   -73,   -73,   124,    -1,   -73,   -73,   -73,
+     -73,   -73,   126,   -73,   -73,   -73,   -73,   -73,   -73,   -73,
+     -12,   -73,   -73,   -73,   -73,   -73,    79,   -73,   -73,   -73,
+     -73,     0,    94,   -73,   -73,    24,   -73,   -73,   -73,   -73,
+     -73,    -6,   -73,   -73,   -73,   -73,   -73,    12,   -72
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -81
+static const yytype_int16 yytable[] =
+{
+      13,    14,    97,   -60,   -60,    15,    47,     1,    16,   -67,
+     -67,    24,    60,    87,    37,     5,     5,   -67,   109,   -67,
+      95,    19,    49,   -67,   -67,   -67,    57,    61,    88,   -51,
+      25,    26,    67,    50,    21,    88,     5,    72,    68,    48,
+      28,    32,    33,    65,    29,    30,    31,    61,    73,    76,
+       1,     2,    78,    79,    56,     3,     4,   140,     5,    97,
+      91,   141,    25,    26,    92,    93,     6,     7,    32,    33,
+      27,    96,    28,    58,    98,    59,    29,    30,    31,   100,
+     101,     3,    63,    25,    26,    39,    55,     3,    40,   106,
+     107,    68,    66,    28,   114,   115,   113,    29,    30,    31,
+      71,    25,    26,     3,    40,    77,    82,    83,   119,   -42,
+     121,    28,   123,    89,    90,    29,    30,    31,    94,    73,
+     127,   102,    64,   104,   105,   133,   -80,   118,   124,   126,
+     125,   132,   143,   130,    20,   122,   135,   137,   145,    70,
+     131,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      51
+};
+
+#define yypact_value_is_default(yystate) \
+  ((yystate) == (-73))
+
+#define yytable_value_is_error(yytable_value) \
+  YYID (0)
+
+static const yytype_int16 yycheck[] =
+{
+       0,     2,    74,     5,     6,     1,    18,     0,     7,     5,
+       6,    12,     7,     7,    15,     8,     8,    13,    20,    15,
+       7,     0,    23,    19,    20,    21,    38,    22,    22,     4,
+       5,     6,     7,     1,    23,    22,     8,     1,    13,    11,
+      15,     9,    10,    43,    19,    20,    21,    22,    12,    50,
+       0,     1,    53,    54,    10,     5,     6,     5,     8,   131,
+      15,     9,     5,     6,    19,    20,    16,    17,     9,    10,
+      13,    72,    15,    20,    75,    22,    19,    20,    21,    80,
+      81,     5,     6,     5,     6,     3,     9,     5,     6,     5,
+       6,    13,     4,    15,     9,    10,    97,    19,    20,    21,
+       7,     5,     6,     5,     6,    15,     5,     5,   108,     6,
+     110,    15,   112,    18,     4,    19,    20,    21,     4,    12,
+     120,     5,    43,     6,     5,     5,    15,    15,    15,     6,
+      15,     6,     5,    15,    10,   111,    15,    15,   144,    45,
+     128,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      24
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const yytype_uint8 yystos[] =
+{
+       0,     0,     1,     5,     6,     8,    16,    17,    25,    29,
+      30,    31,    32,    55,    30,     1,     7,    33,    35,     0,
+      29,    23,    69,    70,    30,     5,     6,    13,    15,    19,
+      20,    21,     9,    10,    36,    37,    40,    30,    34,     3,
+       6,    44,    47,    49,    50,    55,    68,    44,    11,    30,
+       1,    36,    26,    38,    41,     9,    10,    44,    20,    22,
+       7,    22,    56,     6,    50,    55,     4,     7,    13,    48,
+      56,     7,     1,    12,    71,    72,    30,    15,    30,    30,
+      39,    42,     5,     5,    45,    46,    57,     7,    22,    18,
+       4,    15,    19,    20,     4,     7,    30,    72,    30,    27,
+      30,    30,     5,    59,     6,     5,     5,     6,    58,    20,
+      52,    51,    53,    30,     9,    10,    43,    60,    15,    55,
+      54,    55,    59,    55,    15,    15,     6,    55,    28,    61,
+      15,    71,     6,     5,    62,    15,    65,    15,    66,    63,
+       5,     9,    67,     5,    64,    65
+};
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		(-2)
+#define YYEOF		0
+
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT		goto yyabortlab
+#define YYERROR		goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
+
+#define YYFAIL		goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
+
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    {								\
+      yychar = (Token);						\
+      yylval = (Value);						\
+      YYPOPSTACK (1);						\
+      goto yybackup;						\
+    }								\
+  else								\
+    {								\
+      yyerror (pb, YY_("syntax error: cannot back up")); \
+      YYERROR;							\
+    }								\
+while (YYID (0))
+
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (YYID (N))                                                    \
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (YYID (0))
+#endif
+
+
+/* This macro is provided for backward compatibility. */
+
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (&yylval, YYLEX_PARAM)
+#else
+# define YYLEX yylex (&yylval, pb)
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yydebug)					\
+    YYFPRINTF Args;				\
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
+do {									  \
+  if (yydebug)								  \
+    {									  \
+      YYFPRINTF (stderr, "%s ", Title);					  \
+      yy_symbol_print (stderr,						  \
+		  Type, Value, pb); \
+      YYFPRINTF (stderr, "\n");						  \
+    }									  \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, FASTQParseBlock* pb)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep, pb)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+    FASTQParseBlock* pb;
+#endif
+{
+  if (!yyvaluep)
+    return;
+  YYUSE (pb);
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+  YYUSE (yyoutput);
+# endif
+  switch (yytype)
+    {
+      default:
+	break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, FASTQParseBlock* pb)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep, pb)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+    FASTQParseBlock* pb;
+#endif
+{
+  if (yytype < YYNTOKENS)
+    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+  else
+    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep, pb);
+  YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+#else
+static void
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)				\
+do {								\
+  if (yydebug)							\
+    yy_stack_print ((Bottom), (Top));				\
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule, FASTQParseBlock* pb)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule, pb)
+    YYSTYPE *yyvsp;
+    int yyrule;
+    FASTQParseBlock* pb;
+#endif
+{
+  int yynrhs = yyr2[yyrule];
+  int yyi;
+  unsigned long int yylno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+	     yyrule - 1, yylno);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+		       &(yyvsp[(yyi + 1) - (yynrhs)])
+		       		       , pb);
+      YYFPRINTF (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (yydebug)				\
+    yy_reduce_print (yyvsp, Rule, pb); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+    const char *yystr;
+#endif
+{
+  YYSIZE_T yylen;
+  for (yylen = 0; yystr[yylen]; yylen++)
+    continue;
+  return yylen;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+    char *yydest;
+    const char *yysrc;
+#endif
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      YYSIZE_T yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+	switch (*++yyp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++yyp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (yyres)
+	      yyres[yyn] = *yyp;
+	    yyn++;
+	    break;
+
+	  case '"':
+	    if (yyres)
+	      yyres[yyn] = '\0';
+	    return yyn;
+	  }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+   about the unexpected token YYTOKEN for the state stack whose top is
+   YYSSP.
+
+   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
+   not large enough to hold the message.  In that case, also set
+   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
+   required number of bytes is too large to store.  */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+                yytype_int16 *yyssp, int yytoken)
+{
+  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+  YYSIZE_T yysize = yysize0;
+  YYSIZE_T yysize1;
+  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+  /* Internationalized format string. */
+  const char *yyformat = 0;
+  /* Arguments of yyformat. */
+  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+  /* Number of reported tokens (one for the "unexpected", one per
+     "expected"). */
+  int yycount = 0;
+
+  /* There are many possibilities here to consider:
+     - Assume YYFAIL is not used.  It's too flawed to consider.  See
+       <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+       for details.  YYERROR is fine as it does not invoke this
+       function.
+     - If this state is a consistent state with a default action, then
+       the only way this function was invoked is if the default action
+       is an error action.  In that case, don't check for expected
+       tokens because there are none.
+     - The only way there can be no lookahead present (in yychar) is if
+       this state is a consistent state with a default action.  Thus,
+       detecting the absence of a lookahead is sufficient to determine
+       that there is no unexpected or expected token to report.  In that
+       case, just report a simple "syntax error".
+     - Don't assume there isn't a lookahead just because this state is a
+       consistent state with a default action.  There might have been a
+       previous inconsistent state, consistent state with a non-default
+       action, or user semantic action that manipulated yychar.
+     - Of course, the expected token list depends on states to have
+       correct lookahead information, and it depends on the parser not
+       to perform extra reductions after fetching a lookahead from the
+       scanner and before detecting a syntax error.  Thus, state merging
+       (from LALR or IELR) and default reductions corrupt the expected
+       token list.  However, the list is correct for canonical LR with
+       one exception: it will still contain any token that will not be
+       accepted due to an error action in a later state.
+  */
+  if (yytoken != YYEMPTY)
+    {
+      int yyn = yypact[*yyssp];
+      yyarg[yycount++] = yytname[yytoken];
+      if (!yypact_value_is_default (yyn))
+        {
+          /* Start YYX at -YYN if negative to avoid negative indexes in
+             YYCHECK.  In other words, skip the first -YYN actions for
+             this state because they are default actions.  */
+          int yyxbegin = yyn < 0 ? -yyn : 0;
+          /* Stay within bounds of both yycheck and yytname.  */
+          int yychecklim = YYLAST - yyn + 1;
+          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+          int yyx;
+
+          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+                && !yytable_value_is_error (yytable[yyx + yyn]))
+              {
+                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+                  {
+                    yycount = 1;
+                    yysize = yysize0;
+                    break;
+                  }
+                yyarg[yycount++] = yytname[yyx];
+                yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+                if (! (yysize <= yysize1
+                       && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                  return 2;
+                yysize = yysize1;
+              }
+        }
+    }
+
+  switch (yycount)
+    {
+# define YYCASE_(N, S)                      \
+      case N:                               \
+        yyformat = S;                       \
+      break
+      YYCASE_(0, YY_("syntax error"));
+      YYCASE_(1, YY_("syntax error, unexpected %s"));
+      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+    }
+
+  yysize1 = yysize + yystrlen (yyformat);
+  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+    return 2;
+  yysize = yysize1;
+
+  if (*yymsg_alloc < yysize)
+    {
+      *yymsg_alloc = 2 * yysize;
+      if (! (yysize <= *yymsg_alloc
+             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+      return 1;
+    }
+
+  /* Avoid sprintf, as that infringes on the user's name space.
+     Don't have undefined behavior even if the translation
+     produced a string with the wrong number of "%s"s.  */
+  {
+    char *yyp = *yymsg;
+    int yyi = 0;
+    while ((*yyp = *yyformat) != '\0')
+      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+        {
+          yyp += yytnamerr (yyp, yyarg[yyi++]);
+          yyformat += 2;
+        }
+      else
+        {
+          yyp++;
+          yyformat++;
+        }
+  }
+  return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, FASTQParseBlock* pb)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep, pb)
+    const char *yymsg;
+    int yytype;
+    YYSTYPE *yyvaluep;
+    FASTQParseBlock* pb;
+#endif
+{
+  YYUSE (yyvaluep);
+  YYUSE (pb);
+
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+  switch (yytype)
+    {
+
+      default:
+	break;
+    }
+}
+
+
+/* Prevent warnings from -Wmissing-prototypes.  */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (FASTQParseBlock* pb);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+/*----------.
+| yyparse.  |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+    void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (FASTQParseBlock* pb)
+#else
+int
+yyparse (pb)
+    FASTQParseBlock* pb;
+#endif
+#endif
+{
+/* The lookahead symbol.  */
+int yychar;
+
+/* The semantic value of the lookahead symbol.  */
+YYSTYPE yylval;
+
+    /* Number of syntax errors so far.  */
+    int yynerrs;
+
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.
+
+       Refer to the stacks thru separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
+
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
+
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
+
+    YYSIZE_T yystacksize;
+
+  int yyn;
+  int yyresult;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken;
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yylen = 0;
+
+  yytoken = 0;
+  yyss = yyssa;
+  yyvs = yyvsa;
+  yystacksize = YYINITDEPTH;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY; /* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+  yyssp = yyss;
+  yyvsp = yyvs;
+
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyss + yystacksize - 1 <= yyssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+	/* Give user a chance to reallocate the stack.  Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *yyvs1 = yyvs;
+	yytype_int16 *yyss1 = yyss;
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  This used to be a
+	   conditional around just the two extra args, but that might
+	   be undefined if yyoverflow is a macro.  */
+	yyoverflow (YY_("memory exhausted"),
+		    &yyss1, yysize * sizeof (*yyssp),
+		    &yyvs1, yysize * sizeof (*yyvsp),
+		    &yystacksize);
+
+	yyss = yyss1;
+	yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yystacksize)
+	goto yyexhaustedlab;
+      yystacksize *= 2;
+      if (YYMAXDEPTH < yystacksize)
+	yystacksize = YYMAXDEPTH;
+
+      {
+	yytype_int16 *yyss1 = yyss;
+	union yyalloc *yyptr =
+	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+	if (! yyptr)
+	  goto yyexhaustedlab;
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+#  undef YYSTACK_RELOCATE
+	if (yyss1 != yyssa)
+	  YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) yystacksize));
+
+      if (yyss + yystacksize - 1 <= yyssp)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
+  goto yybackup;
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     lookahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+  yyn = yypact[yystate];
+  if (yypact_value_is_default (yyn))
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = YYLEX;
+    }
+
+  if (yychar <= YYEOF)
+    {
+      yychar = yytoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yytoken = YYTRANSLATE (yychar);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+    goto yydefault;
+  yyn = yytable[yyn];
+  if (yyn <= 0)
+    {
+      if (yytable_value_is_error (yyn))
+        goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  /* Shift the lookahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
+
+  yystate = yyn;
+  *++yyvsp = yylval;
+
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
+    {
+        case 2:
+
+    { UNLEX; return 1; }
+    break;
+
+  case 3:
+
+    { UNLEX; return 1; }
+    break;
+
+  case 4:
+
+    { GrowSpotName(pb, &(yyvsp[(2) - (2)])); StopSpotName(pb); }
+    break;
+
+  case 5:
+
+    { FASTQScan_inline_sequence(pb); }
+    break;
+
+  case 6:
+
+    { FASTQScan_inline_quality(pb); }
+    break;
+
+  case 7:
+
+    { UNLEX; return 1; }
+    break;
+
+  case 8:
+
+    { UNLEX; return 1; }
+    break;
+
+  case 9:
+
+    { return 0; }
+    break;
+
+  case 17:
+
+    { StartSpotName(pb, 1); }
+    break;
+
+  case 19:
+
+    { StartSpotName(pb, 1 + (yyvsp[(2) - (2)]).tokenLength); }
+    break;
+
+  case 21:
+
+    { StartSpotName(pb, 1); }
+    break;
+
+  case 23:
+
+    { pb->record->seq.is_colorspace = false; }
+    break;
+
+  case 24:
+
+    { pb->record->seq.is_colorspace = true; }
+    break;
+
+  case 25:
+
+    { SetRead(pb, & (yyvsp[(1) - (1)])); }
+    break;
+
+  case 27:
+
+    { SetRead(pb, & (yyvsp[(2) - (2)])); }
+    break;
+
+  case 29:
+
+    { SetRead(pb, & (yyvsp[(1) - (1)])); }
+    break;
+
+  case 31:
+
+    { SetRead(pb, & (yyvsp[(2) - (2)])); }
+    break;
+
+  case 33:
+
+    { SetRead(pb, & (yyvsp[(1) - (1)])); pb->record->seq.is_colorspace = false; }
+    break;
+
+  case 34:
+
+    { SetRead(pb, & (yyvsp[(1) - (1)])); pb->record->seq.is_colorspace = true; }
+    break;
+
+  case 38:
+
+    { FASTQScan_skip_to_eol(pb); }
+    break;
+
+  case 39:
+
+    { FASTQScan_skip_to_eol(pb); }
+    break;
+
+  case 40:
+
+    { GrowSpotName(pb, &(yyvsp[(1) - (2)])); StopSpotName(pb); }
+    break;
+
+  case 41:
+
+    { FASTQScan_skip_to_eol(pb); }
+    break;
+
+  case 42:
+
+    { GrowSpotName(pb, &(yyvsp[(1) - (2)])); StopSpotName(pb); }
+    break;
+
+  case 43:
+
+    { FASTQScan_skip_to_eol(pb); }
+    break;
+
+  case 44:
+
+    { FASTQScan_skip_to_eol(pb); }
+    break;
+
+  case 45:
+
+    { FASTQScan_skip_to_eol(pb); }
+    break;
+
+  case 47:
+
+    { FASTQScan_skip_to_eol(pb); }
+    break;
+
+  case 50:
+
+    { SetSpotGroup(pb, &(yyvsp[(2) - (2)])); }
+    break;
+
+  case 51:
+
+    { StopSpotName(pb); }
+    break;
+
+  case 52:
+
+    { SetSpotGroup(pb, &(yyvsp[(3) - (3)])); }
+    break;
+
+  case 54:
+
+    { SetSpotGroup(pb, &(yyvsp[(3) - (3)])); }
+    break;
+
+  case 55:
+
+    { RevertSpotName(pb); FASTQScan_skip_to_eol(pb); }
+    break;
+
+  case 56:
+
+    {   /* 'name' without coordinates attached will be ignored if followed by a name with coordinates (see the previous production).
+           however, if not followed, this will be the spot name, so we need to save the 'name's coordinates in case 
+           we need to revert to them later (see call to RevertSpotName() above) */
+        SaveSpotName(pb); 
+        GrowSpotName(pb, &(yyvsp[(2) - (2)])); /* need to account for white space but it is not part of the spot name */
+        RestartSpotName(pb); /* clean up for the potential nameWithCoords to start here */
+    }
+    break;
+
+  case 57:
+
+    { GrowSpotName(pb, &(yyvsp[(2) - (2)])); StopSpotName(pb); }
+    break;
+
+  case 58:
+
+    {   /* another variation by Illumina, this time "_" is used as " /" */
+                    GrowSpotName(pb, &(yyvsp[(2) - (3)])); 
+                    StopSpotName(pb);
+                    GrowSpotName(pb, &(yyvsp[(3) - (3)]));
+                }
+    break;
+
+  case 60:
+
+    { GrowSpotName(pb, &(yyvsp[(2) - (3)])); GrowSpotName(pb, &(yyvsp[(3) - (3)]));}
+    break;
+
+  case 62:
+
+    { GrowSpotName(pb, &(yyvsp[(2) - (3)])); GrowSpotName(pb, &(yyvsp[(3) - (3)]));}
+    break;
+
+  case 64:
+
+    { GrowSpotName(pb, &(yyvsp[(2) - (4)])); GrowSpotName(pb, &(yyvsp[(3) - (4)])); GrowSpotName(pb, &(yyvsp[(4) - (4)]));}
+    break;
+
+  case 66:
+
+    { GrowSpotName(pb, &(yyvsp[(2) - (3)])); GrowSpotName(pb, &(yyvsp[(3) - (3)])); StopSpotName(pb); }
+    break;
+
+  case 67:
+
+    { GrowSpotName(pb, &(yyvsp[(1) - (1)])); }
+    break;
+
+  case 68:
+
+    { GrowSpotName(pb, &(yyvsp[(1) - (1)])); }
+    break;
+
+  case 69:
+
+    { GrowSpotName(pb, &(yyvsp[(2) - (2)])); }
+    break;
+
+  case 70:
+
+    { GrowSpotName(pb, &(yyvsp[(2) - (2)])); }
+    break;
+
+  case 71:
+
+    { GrowSpotName(pb, &(yyvsp[(2) - (2)])); }
+    break;
+
+  case 72:
+
+    { GrowSpotName(pb, &(yyvsp[(2) - (2)])); }
+    break;
+
+  case 73:
+
+    { GrowSpotName(pb, &(yyvsp[(2) - (2)])); }
+    break;
+
+  case 74:
+
+    { GrowSpotName(pb, &(yyvsp[(2) - (2)])); }
+    break;
+
+  case 75:
+
+    {   /* in PACBIO fastq, the first '/' and the following digits are treated as a continuation of the spot name, not a read number */
+            if (IS_PACBIO(pb)) pb->spotNameDone = false; 
+            GrowSpotName(pb, &(yyvsp[(1) - (1)])); 
+        }
+    break;
+
+  case 76:
+
+    { 
+            if (!IS_PACBIO(pb)) SetReadNumber(pb, &(yyvsp[(3) - (3)])); 
+            GrowSpotName(pb, &(yyvsp[(3) - (3)])); 
+            StopSpotName(pb); 
+        }
+    break;
+
+  case 77:
+
+    { 
+            if (IS_PACBIO(pb)) pb->spotNameDone = false; 
+            GrowSpotName(pb, &(yyvsp[(2) - (2)])); 
+        }
+    break;
+
+  case 78:
+
+    { 
+            if (IS_PACBIO(pb)) StopSpotName(pb); 
+        }
+    break;
+
+  case 79:
+
+    { SetReadNumber(pb, &(yyvsp[(1) - (1)])); GrowSpotName(pb, &(yyvsp[(1) - (1)])); StopSpotName(pb); }
+    break;
+
+  case 80:
+
+    { SetReadNumber(pb, &(yyvsp[(1) - (1)])); GrowSpotName(pb, &(yyvsp[(1) - (1)])); StopSpotName(pb); }
+    break;
+
+  case 81:
+
+    { GrowSpotName(pb, &(yyvsp[(3) - (3)])); }
+    break;
+
+  case 82:
+
+    { GrowSpotName(pb, &(yyvsp[(5) - (5)])); if ((yyvsp[(5) - (5)]).tokenLength == 1 && TokenTextPtr(pb, &(yyvsp[(5) - (5)]))[0] == 'Y') pb->record->seq.lowQuality = true; }
+    break;
+
+  case 83:
+
+    { GrowSpotName(pb, &(yyvsp[(7) - (7)])); }
+    break;
+
+  case 84:
+
+    { GrowSpotName(pb, &(yyvsp[(9) - (9)])); }
+    break;
+
+  case 86:
+
+    { GrowSpotName(pb, &(yyvsp[(1) - (1)])); FASTQScan_inline_sequence(pb); }
+    break;
+
+  case 89:
+
+    { SetSpotGroup(pb, &(yyvsp[(1) - (1)])); GrowSpotName(pb, &(yyvsp[(1) - (1)])); }
+    break;
+
+  case 90:
+
+    { SetSpotGroup(pb, &(yyvsp[(1) - (1)])); GrowSpotName(pb, &(yyvsp[(1) - (1)])); }
+    break;
+
+  case 92:
+
+    { GrowSpotName(pb, &(yyvsp[(1) - (3)])); StopSpotName(pb); SetReadNumber(pb, &(yyvsp[(3) - (3)])); }
+    break;
+
+  case 93:
+
+    { GrowSpotName(pb, &(yyvsp[(1) - (3)])); StopSpotName(pb); SetReadNumber(pb, &(yyvsp[(3) - (3)])); }
+    break;
+
+  case 94:
+
+    { GrowSpotName(pb, &(yyvsp[(1) - (1)])); StopSpotName(pb); }
+    break;
+
+  case 101:
+
+    {  AddQuality(pb, & (yyvsp[(1) - (1)])); }
+    break;
+
+
+
+      default: break;
+    }
+  /* User semantic actions sometimes alter yychar, and that requires
+     that yytoken be updated with the new translation.  We take the
+     approach of translating immediately before every use of yytoken.
+     One alternative is translating here after every semantic action,
+     but that translation would be missed if the semantic action invokes
+     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
+     incorrect destructor might then be invoked immediately.  In the
+     case of YYERROR or YYBACKUP, subsequent parser actions might lead
+     to an incorrect destructor call or verbose syntax error message
+     before the lookahead is translated.  */
+  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+
+  *++yyvsp = yyval;
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTOKENS];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* Make sure we have latest lookahead translation.  See comments at
+     user semantic actions for why this is necessary.  */
+  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+#if ! YYERROR_VERBOSE
+      yyerror (pb, YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+                                        yyssp, yytoken)
+      {
+        char const *yymsgp = YY_("syntax error");
+        int yysyntax_error_status;
+        yysyntax_error_status = YYSYNTAX_ERROR;
+        if (yysyntax_error_status == 0)
+          yymsgp = yymsg;
+        else if (yysyntax_error_status == 1)
+          {
+            if (yymsg != yymsgbuf)
+              YYSTACK_FREE (yymsg);
+            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+            if (!yymsg)
+              {
+                yymsg = yymsgbuf;
+                yymsg_alloc = sizeof yymsgbuf;
+                yysyntax_error_status = 2;
+              }
+            else
+              {
+                yysyntax_error_status = YYSYNTAX_ERROR;
+                yymsgp = yymsg;
+              }
+          }
+        yyerror (pb, yymsgp);
+        if (yysyntax_error_status == 2)
+          goto yyexhaustedlab;
+      }
+# undef YYSYNTAX_ERROR
+#endif
+    }
+
+
+
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse lookahead token after an
+	 error, discard it.  */
+
+      if (yychar <= YYEOF)
+	{
+	  /* Return failure if at end of input.  */
+	  if (yychar == YYEOF)
+	    YYABORT;
+	}
+      else
+	{
+	  yydestruct ("Error: discarding",
+		      yytoken, &yylval, pb);
+	  yychar = YYEMPTY;
+	}
+    }
+
+  /* Else will try to reuse lookahead token after shifting the error
+     token.  */
+  goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yyerrorlab;
+
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+  yystate = *yyssp;
+  goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (!yypact_value_is_default (yyn))
+	{
+	  yyn += YYTERROR;
+	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+	    {
+	      yyn = yytable[yyn];
+	      if (0 < yyn)
+		break;
+	    }
+	}
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+	YYABORT;
+
+
+      yydestruct ("Error: popping",
+		  yystos[yystate], yyvsp, pb);
+      YYPOPSTACK (1);
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
+    }
+
+  *++yyvsp = yylval;
+
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yyexhaustedlab:
+  yyerror (pb, YY_("memory exhausted"));
+  yyresult = 2;
+  /* Fall through.  */
+#endif
+
+yyreturn:
+  if (yychar != YYEMPTY)
+    {
+      /* Make sure we have latest lookahead translation.  See comments at
+         user semantic actions for why this is necessary.  */
+      yytoken = YYTRANSLATE (yychar);
+      yydestruct ("Cleanup: discarding lookahead",
+                  yytoken, &yylval, pb);
+    }
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yylen);
+  YY_STACK_PRINT (yyss, yyssp);
+  while (yyssp != yyss)
+    {
+      yydestruct ("Cleanup: popping",
+		  yystos[*yyssp], yyvsp, pb);
+      YYPOPSTACK (1);
+    }
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+  if (yymsg != yymsgbuf)
+    YYSTACK_FREE (yymsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (yyresult);
+}
+
+
+
+
+
+/* values used in validating quality lines */
+#define MIN_PHRED_33    33
+#define MAX_PHRED_33    126
+#define MIN_PHRED_64    64
+#define MAX_PHRED_64    127
+#define MIN_LOGODDS     59   
+#define MAX_LOGODDS     126   
+
+void AddQuality(FASTQParseBlock* pb, const FASTQToken* token)
+{
+    uint8_t floor;
+    uint8_t ceiling;
+    const char* format;
+    switch ( pb->qualityFormat )
+    {
+    case FASTQphred33:
+        floor   = MIN_PHRED_33;
+        ceiling = MAX_PHRED_33;
+        format = "Phred33";
+        pb -> qualityAsciiOffset = 33;
+        break;
+    case FASTQphred64:
+        floor   = MIN_PHRED_64;
+        ceiling = MAX_PHRED_64;
+        format = "Phred64";
+        pb -> qualityAsciiOffset = 64;
+        break;
+    case FASTQlogodds:
+        floor   = MIN_LOGODDS;
+        ceiling = MAX_LOGODDS;
+        format = "Logodds";
+        pb -> qualityAsciiOffset = 64;
+        break;
+    default:
+        /* TODO: 
+            if qualityAsciiOffset is 0, 
+                guess based on the raw values on the first quality line:
+                    if all values are above MAX_PHRED_33, qualityAsciiOffset = 64
+                    if all values are in MIN_PHRED_33..MAX_PHRED_33, qualityAsciiOffset = 33
+                    if any value is below MIN_PHRED_33, abort
+                if the guess is 33 and proven wrong (a raw quality value >MAX_PHRED_33 is encountered and no values below MIN_PHRED_64 ever seen)
+                    reopen the file, 
+                    qualityAsciiOffset = 64
+                    try to parse again
+                    if a value below MIN_PHRED_64 seen, abort 
+        */
+        {
+            char buf[200];
+            sprintf ( buf, "Invalid quality format: %d.", pb->qualityFormat );
+            pb->fatalError = true;
+            yyerror(pb, buf);
+            return;
+        }
+    }
+    
+    {   /* make sure all qualities fall into the required range */
+        unsigned int i;
+        for (i=0; i < token->tokenLength; ++i)
+        {
+            char ch = TokenTextPtr(pb, token)[i];
+            if (ch < floor || ch > ceiling)
+            {
+                char buf[200];
+                sprintf ( buf, "Invalid quality value ('%c'=%d, position %d): for %s, valid range is from %d to %d.", 
+                                                        ch,
+                                                        ch,
+                                                        i,
+                                                        format, 
+                                                        floor, 
+                                                        ceiling);
+                pb->fatalError = true;
+                yyerror(pb, buf);
+                return;
+            }
+        }
+    }
+    
+    if (pb->qualityLength == 0)
+    {
+        pb->qualityOffset = token->tokenStart;
+        pb->qualityLength= token->tokenLength;
+    }
+    else
+    {
+        pb->qualityLength += token->tokenLength;
+    }
+}
+
+void SetReadNumber(FASTQParseBlock* pb, const FASTQToken* token)
+{   /* token is known to be numeric */
+    if (pb->defaultReadNumber != -1)
+    {   /* we will only handle 1-digit read numbers for now*/
+        if (token->tokenLength == 1)
+        {
+            switch (TokenTextPtr(pb, token)[0])
+            {
+            case '1': 
+                {
+                    pb->record->seq.readnumber = 1; 
+                    break;
+                }
+            case '0': 
+                {
+                    pb->record->seq.readnumber = pb->defaultReadNumber;
+                    break;
+                }
+            default: 
+                {   /* all secondary read numbers should be the same across an input file */
+                    uint8_t readNum = TokenTextPtr(pb, token)[0] - '0';
+                    if (pb->secondaryReadNumber == 0) /* this is the first secondary read observed */
+                    {
+                        pb->secondaryReadNumber = readNum;
+                    }
+                    else if (pb->secondaryReadNumber != readNum)
+                    {
+                        char buf[200];
+                        sprintf(buf, 
+                                "Inconsistent secondary read number: previously used %d, now seen %d", 
+                                pb->secondaryReadNumber, readNum);
+                        pb->fatalError = true;
+                        yyerror(pb, buf);
+                        return;
+                    }
+                    /* all secondary read numbers are internally represented as 2 */
+                    pb->record->seq.readnumber = 2; 
+                    
+                    break;
+                }
+            }
+        }
+        else
+            pb->record->seq.readnumber = pb->defaultReadNumber;
+    }
+}
+
+void StartSpotName(FASTQParseBlock* pb, size_t offset)
+{
+    pb->spotNameOffset = offset;
+    pb->spotNameLength = 0;
+}
+
+void SaveSpotName(FASTQParseBlock* pb)
+{
+    pb->spotNameOffset_saved = pb->spotNameOffset;
+    pb->spotNameLength_saved = pb->spotNameLength;
+}    
+
+void RestartSpotName(FASTQParseBlock* pb)
+{
+    pb->spotNameOffset += pb->spotNameLength;
+    pb->spotNameLength = 0;
+}
+
+void RevertSpotName(FASTQParseBlock* pb)
+{
+    pb->spotNameOffset = pb->spotNameOffset_saved;
+    pb->spotNameLength = pb->spotNameLength_saved;
+}
+
+void GrowSpotName(FASTQParseBlock* pb, const FASTQToken* token)
+{
+    if (!pb->spotNameDone)
+    {
+        pb->spotNameLength += token->tokenLength;
+    }
+}
+
+void StopSpotName(FASTQParseBlock* pb)
+{   /* there may be more tokens coming, they will not be a part of the spot name */
+    pb->spotNameDone = true;
+}
+
+void SetSpotGroup(FASTQParseBlock* pb, const FASTQToken* token)
+{
+    if ( ! pb->ignoreSpotGroups )
+    {   
+        unsigned int nameStart = 0;
+        /* skip possible '#' at the start of spot group name */
+        if ( TokenTextPtr ( pb, token )[0] == '#' ) 
+        {   
+            nameStart = 1;
+        }
+        
+        if ( token->tokenLength != 1+nameStart || TokenTextPtr(pb, token)[nameStart] != '0' ) /* ignore spot group 0 */
+        {
+            pb->spotGroupOffset = token->tokenStart  + nameStart;    
+            pb->spotGroupLength = token->tokenLength - nameStart;
+        }
+    }
+}
+
+void SetRead(FASTQParseBlock* pb, const FASTQToken* token)
+{ 
+    pb->readOffset = token->tokenStart;
+    pb->readLength = token->tokenLength;
+}
+
diff --git a/tools/fastq-loader/fastq-grammar.y b/tools/fastq-loader/fastq-grammar.y
new file mode 100644
index 0000000..1434c08
--- /dev/null
+++ b/tools/fastq-loader/fastq-grammar.y
@@ -0,0 +1,478 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+ 
+%{  
+    #include <sysalloc.h>
+    #include <ctype.h>
+    #include <stdlib.h>
+    #include <string.h>
+
+    #include "fastq-parse.h"
+
+    #define YYSTYPE FASTQToken
+    #define YYLEX_PARAM pb->scanner
+    #define YYDEBUG 1
+
+    #include "fastq-tokens.h"
+
+    static void AddQuality(FASTQParseBlock* pb, const FASTQToken* token);
+    static void SetReadNumber(FASTQParseBlock* pb, const FASTQToken* token);
+    static void SetSpotGroup(FASTQParseBlock* pb, const FASTQToken* token);
+    static void SetRead(FASTQParseBlock* pb, const FASTQToken* token);
+    
+    static void StartSpotName(FASTQParseBlock* pb, size_t offset);
+    static void GrowSpotName(FASTQParseBlock* pb, const FASTQToken* token);
+    static void StopSpotName(FASTQParseBlock* pb);
+    static void RestartSpotName(FASTQParseBlock* pb);
+    static void SaveSpotName(FASTQParseBlock* pb);
+    static void RevertSpotName(FASTQParseBlock* pb);
+
+    #define UNLEX do { if (yychar != YYEMPTY && yychar != YYEOF) FASTQ_unlex(pb, & yylval); } while (0)
+    
+    #define IS_PACBIO(pb) ((pb)->defaultReadNumber == -1)
+%}
+
+%pure-parser
+%parse-param {FASTQParseBlock* pb }
+%lex-param {FASTQParseBlock* pb }
+%error-verbose 
+%name-prefix "FASTQ_"
+
+%token fqRUNDOTSPOT
+%token fqSPOTGROUP
+%token fqNUMBER
+%token fqALPHANUM
+%token fqWS
+%token fqENDLINE
+%token fqBASESEQ
+%token fqCOLORSEQ
+%token fqTOKEN
+%token fqASCQUAL
+%token fqCOORDS
+%token fqUNRECOGNIZED
+%token fqENDOFTEXT 0
+
+
+%%
+
+sequence /* have to return the lookahead symbol before returning since it belongs to the next record and cannot be dropped */
+    : readLines qualityLines    { UNLEX; return 1; }
+    
+    | readLines                 { UNLEX; return 1; }
+    
+/*    | qualityLines              { UNLEX; return 1; } */
+    
+    | name                      
+        fqCOORDS                { GrowSpotName(pb, &$2); StopSpotName(pb); }
+        ':'                     { FASTQScan_inline_sequence(pb); } 
+        inlineRead              
+        ':'                     { FASTQScan_inline_quality(pb); } 
+        quality                 { UNLEX; return 1; }
+           
+    | fqALPHANUM error endline  { UNLEX; return 1; }
+           
+    | endfile                   { return 0; }
+    ;
+
+endfile
+    : fqENDOFTEXT
+    | endline endfile
+    ;
+
+endline
+    : fqENDLINE
+    ;
+
+readLines
+    : header  endline  read   
+    | header  endline error endline
+    | error   endline  read 
+    | error endline
+    ;
+
+header 
+    : '@' { StartSpotName(pb, 1); } tagLine
+    | '@' fqWS { StartSpotName(pb, 1 + $2.tokenLength); } tagLine
+    | '>' { StartSpotName(pb, 1); } tagLine
+    ;
+
+read
+    : baseRead  { pb->record->seq.is_colorspace = false; }
+    | csRead    { pb->record->seq.is_colorspace = true; }
+    ;
+
+baseRead
+    : fqBASESEQ { SetRead(pb, & $1); } 
+        endline            
+    | baseRead fqBASESEQ { SetRead(pb, & $2); } 
+        endline  
+    ;
+ 
+csRead
+    : fqCOLORSEQ { SetRead(pb, & $1); } 
+        endline           
+    | csRead fqCOLORSEQ { SetRead(pb, & $2); } 
+        endline
+    ;
+
+inlineRead
+    : fqBASESEQ                   { SetRead(pb, & $1); pb->record->seq.is_colorspace = false; }
+    | fqCOLORSEQ                  { SetRead(pb, & $1); pb->record->seq.is_colorspace = true; }
+    ;
+    
+ /*************** tag line rules *****************/
+tagLine    
+    : nameSpotGroup 
+    | nameSpotGroup readNumber
+    
+    | nameSpotGroup readNumber fqWS fqNUMBER ':' fqALPHANUM ':' fqNUMBER indexSequence
+    
+    | nameSpotGroup readNumber fqWS fqALPHANUM { FASTQScan_skip_to_eol(pb); } 
+    | nameSpotGroup readNumber fqWS { FASTQScan_skip_to_eol(pb); } 
+    
+    | nameSpotGroup fqWS  { GrowSpotName(pb, &$1); StopSpotName(pb); } casava1_8 { FASTQScan_skip_to_eol(pb); }
+    | nameSpotGroup fqWS  { GrowSpotName(pb, &$1); StopSpotName(pb); } fqALPHANUM { FASTQScan_skip_to_eol(pb); } /* no recognizable read number */
+    | runSpotRead fqWS  { FASTQScan_skip_to_eol(pb); }
+    | runSpotRead       { FASTQScan_skip_to_eol(pb); }
+    | name readNumber
+    | name readNumber fqWS  { FASTQScan_skip_to_eol(pb); } 
+    | name 
+    ;
+    
+nameSpotGroup
+    : nameWithCoords 
+    | nameWithCoords fqSPOTGROUP                { SetSpotGroup(pb, &$2); }
+    | name { StopSpotName(pb); } fqSPOTGROUP    { SetSpotGroup(pb, &$3); }
+    | nameWS nameWithCoords                                                     /* nameWS ignored */
+    | nameWS nameWithCoords fqSPOTGROUP         { SetSpotGroup(pb, &$3); }      /* nameWS ignored */
+    | nameWS fqALPHANUM '='  { RevertSpotName(pb); FASTQScan_skip_to_eol(pb); }
+    ;
+    
+nameWS
+    : name fqWS 
+    {   /* 'name' without coordinates attached will be ignored if followed by a name with coordinates (see the previous production).
+           however, if not followed, this will be the spot name, so we need to save the 'name's coordinates in case 
+           we need to revert to them later (see call to RevertSpotName() above) */
+        SaveSpotName(pb); 
+        GrowSpotName(pb, &$2); /* need to account for white space but it is not part of the spot name */
+        RestartSpotName(pb); /* clean up for the potential nameWithCoords to start here */
+    } 
+
+nameWithCoords    
+    : name fqCOORDS { GrowSpotName(pb, &$2); StopSpotName(pb); } 
+    | name fqCOORDS '_' 
+                {   /* another variation by Illumina, this time "_" is used as " /" */
+                    GrowSpotName(pb, &$2); 
+                    StopSpotName(pb);
+                    GrowSpotName(pb, &$3);
+                }    
+                casava1_8
+    | name fqCOORDS ':'     { GrowSpotName(pb, &$2); GrowSpotName(pb, &$3);} name
+    | name fqCOORDS '.'     { GrowSpotName(pb, &$2); GrowSpotName(pb, &$3);} name
+    | name fqCOORDS ':' '.' { GrowSpotName(pb, &$2); GrowSpotName(pb, &$3); GrowSpotName(pb, &$4);} name
+    | name fqCOORDS ':'     { GrowSpotName(pb, &$2); GrowSpotName(pb, &$3); StopSpotName(pb); } 
+    ;
+    
+name
+    : fqALPHANUM        { GrowSpotName(pb, &$1); }
+    | fqNUMBER          { GrowSpotName(pb, &$1); }
+    | name '_'          { GrowSpotName(pb, &$2); }
+    | name '-'          { GrowSpotName(pb, &$2); }
+    | name '.'          { GrowSpotName(pb, &$2); }
+    | name ':'          { GrowSpotName(pb, &$2); }
+    | name fqALPHANUM   { GrowSpotName(pb, &$2); }
+    | name fqNUMBER     { GrowSpotName(pb, &$2); }
+    ;
+
+readNumber
+    : '/'       
+        {   /* in PACBIO fastq, the first '/' and the following digits are treated as a continuation of the spot name, not a read number */
+            if (IS_PACBIO(pb)) pb->spotNameDone = false; 
+            GrowSpotName(pb, &$1); 
+        } 
+      fqNUMBER  
+        { 
+            if (!IS_PACBIO(pb)) SetReadNumber(pb, &$3); 
+            GrowSpotName(pb, &$3); 
+            StopSpotName(pb); 
+        }
+ 
+    | readNumber '/' 
+        { 
+            if (IS_PACBIO(pb)) pb->spotNameDone = false; 
+            GrowSpotName(pb, &$2); 
+        } 
+        name 
+        { 
+            if (IS_PACBIO(pb)) StopSpotName(pb); 
+        }
+    ;
+
+casava1_8
+    : fqNUMBER          { SetReadNumber(pb, &$1); GrowSpotName(pb, &$1); StopSpotName(pb); }
+    | fqNUMBER          { SetReadNumber(pb, &$1); GrowSpotName(pb, &$1); StopSpotName(pb); }
+     ':'                { GrowSpotName(pb, &$3); }
+     fqALPHANUM         { GrowSpotName(pb, &$5); if ($5.tokenLength == 1 && TokenTextPtr(pb, &$5)[0] == 'Y') pb->record->seq.lowQuality = true; }
+     ':'                { GrowSpotName(pb, &$7); }
+     fqNUMBER           { GrowSpotName(pb, &$9); }
+     indexSequence
+    ;
+
+indexSequence
+    :  ':' { GrowSpotName(pb, &$1); FASTQScan_inline_sequence(pb); } index
+    |
+    ;
+    
+index
+    : fqBASESEQ { SetSpotGroup(pb, &$1); GrowSpotName(pb, &$1); }
+    | fqNUMBER  { SetSpotGroup(pb, &$1); GrowSpotName(pb, &$1); }
+    |
+    ;
+
+runSpotRead
+    : fqRUNDOTSPOT '.' fqNUMBER     { GrowSpotName(pb, &$1); StopSpotName(pb); SetReadNumber(pb, &$3); }
+    | fqRUNDOTSPOT '/' fqNUMBER     { GrowSpotName(pb, &$1); StopSpotName(pb); SetReadNumber(pb, &$3); }
+    | fqRUNDOTSPOT                  { GrowSpotName(pb, &$1); StopSpotName(pb); }
+    ;
+    
+ /*************** quality rules *****************/
+
+qualityLines
+    : qualityHeader endline quality 
+    | qualityHeader endline error endline
+    ;
+
+qualityHeader
+    : '+'                 
+    | qualityHeader fqTOKEN
+    ;
+
+quality
+    : qualityLine endline           
+    | quality qualityLine endline
+    
+qualityLine
+    : fqASCQUAL                {  AddQuality(pb, & $1); }
+    ;
+
+%%
+
+/* values used in validating quality lines */
+#define MIN_PHRED_33    33
+#define MAX_PHRED_33    126
+#define MIN_PHRED_64    64
+#define MAX_PHRED_64    127
+#define MIN_LOGODDS     59   
+#define MAX_LOGODDS     126   
+
+void AddQuality(FASTQParseBlock* pb, const FASTQToken* token)
+{
+    uint8_t floor;
+    uint8_t ceiling;
+    const char* format;
+    switch ( pb->qualityFormat )
+    {
+    case FASTQphred33:
+        floor   = MIN_PHRED_33;
+        ceiling = MAX_PHRED_33;
+        format = "Phred33";
+        pb -> qualityAsciiOffset = 33;
+        break;
+    case FASTQphred64:
+        floor   = MIN_PHRED_64;
+        ceiling = MAX_PHRED_64;
+        format = "Phred64";
+        pb -> qualityAsciiOffset = 64;
+        break;
+    case FASTQlogodds:
+        floor   = MIN_LOGODDS;
+        ceiling = MAX_LOGODDS;
+        format = "Logodds";
+        pb -> qualityAsciiOffset = 64;
+        break;
+    default:
+        /* TODO: 
+            if qualityAsciiOffset is 0, 
+                guess based on the raw values on the first quality line:
+                    if all values are above MAX_PHRED_33, qualityAsciiOffset = 64
+                    if all values are in MIN_PHRED_33..MAX_PHRED_33, qualityAsciiOffset = 33
+                    if any value is below MIN_PHRED_33, abort
+                if the guess is 33 and proven wrong (a raw quality value >MAX_PHRED_33 is encountered and no values below MIN_PHRED_64 ever seen)
+                    reopen the file, 
+                    qualityAsciiOffset = 64
+                    try to parse again
+                    if a value below MIN_PHRED_64 seen, abort 
+        */
+        {
+            char buf[200];
+            sprintf ( buf, "Invalid quality format: %d.", pb->qualityFormat );
+            pb->fatalError = true;
+            yyerror(pb, buf);
+            return;
+        }
+    }
+    
+    {   /* make sure all qualities fall into the required range */
+        unsigned int i;
+        for (i=0; i < token->tokenLength; ++i)
+        {
+            char ch = TokenTextPtr(pb, token)[i];
+            if (ch < floor || ch > ceiling)
+            {
+                char buf[200];
+                sprintf ( buf, "Invalid quality value ('%c'=%d, position %d): for %s, valid range is from %d to %d.", 
+                                                        ch,
+                                                        ch,
+                                                        i,
+                                                        format, 
+                                                        floor, 
+                                                        ceiling);
+                pb->fatalError = true;
+                yyerror(pb, buf);
+                return;
+            }
+        }
+    }
+    
+    if (pb->qualityLength == 0)
+    {
+        pb->qualityOffset = token->tokenStart;
+        pb->qualityLength= token->tokenLength;
+    }
+    else
+    {
+        pb->qualityLength += token->tokenLength;
+    }
+}
+
+void SetReadNumber(FASTQParseBlock* pb, const FASTQToken* token)
+{   /* token is known to be numeric */
+    if (pb->defaultReadNumber != -1)
+    {   /* we will only handle 1-digit read numbers for now*/
+        if (token->tokenLength == 1)
+        {
+            switch (TokenTextPtr(pb, token)[0])
+            {
+            case '1': 
+                {
+                    pb->record->seq.readnumber = 1; 
+                    break;
+                }
+            case '0': 
+                {
+                    pb->record->seq.readnumber = pb->defaultReadNumber;
+                    break;
+                }
+            default: 
+                {   /* all secondary read numbers should be the same across an input file */
+                    uint8_t readNum = TokenTextPtr(pb, token)[0] - '0';
+                    if (pb->secondaryReadNumber == 0) /* this is the first secondary read observed */
+                    {
+                        pb->secondaryReadNumber = readNum;
+                    }
+                    else if (pb->secondaryReadNumber != readNum)
+                    {
+                        char buf[200];
+                        sprintf(buf, 
+                                "Inconsistent secondary read number: previously used %d, now seen %d", 
+                                pb->secondaryReadNumber, readNum);
+                        pb->fatalError = true;
+                        yyerror(pb, buf);
+                        return;
+                    }
+                    /* all secondary read numbers are internally represented as 2 */
+                    pb->record->seq.readnumber = 2; 
+                    
+                    break;
+                }
+            }
+        }
+        else
+            pb->record->seq.readnumber = pb->defaultReadNumber;
+    }
+}
+
+void StartSpotName(FASTQParseBlock* pb, size_t offset)
+{
+    pb->spotNameOffset = offset;
+    pb->spotNameLength = 0;
+}
+
+void SaveSpotName(FASTQParseBlock* pb)
+{
+    pb->spotNameOffset_saved = pb->spotNameOffset;
+    pb->spotNameLength_saved = pb->spotNameLength;
+}    
+
+void RestartSpotName(FASTQParseBlock* pb)
+{
+    pb->spotNameOffset += pb->spotNameLength;
+    pb->spotNameLength = 0;
+}
+
+void RevertSpotName(FASTQParseBlock* pb)
+{
+    pb->spotNameOffset = pb->spotNameOffset_saved;
+    pb->spotNameLength = pb->spotNameLength_saved;
+}
+
+void GrowSpotName(FASTQParseBlock* pb, const FASTQToken* token)
+{
+    if (!pb->spotNameDone)
+    {
+        pb->spotNameLength += token->tokenLength;
+    }
+}
+
+void StopSpotName(FASTQParseBlock* pb)
+{   /* there may be more tokens coming, they will not be a part of the spot name */
+    pb->spotNameDone = true;
+}
+
+void SetSpotGroup(FASTQParseBlock* pb, const FASTQToken* token)
+{
+    if ( ! pb->ignoreSpotGroups )
+    {   
+        unsigned int nameStart = 0;
+        /* skip possible '#' at the start of spot group name */
+        if ( TokenTextPtr ( pb, token )[0] == '#' ) 
+        {   
+            nameStart = 1;
+        }
+        
+        if ( token->tokenLength != 1+nameStart || TokenTextPtr(pb, token)[nameStart] != '0' ) /* ignore spot group 0 */
+        {
+            pb->spotGroupOffset = token->tokenStart  + nameStart;    
+            pb->spotGroupLength = token->tokenLength - nameStart;
+        }
+    }
+}
+
+void SetRead(FASTQParseBlock* pb, const FASTQToken* token)
+{ 
+    pb->readOffset = token->tokenStart;
+    pb->readLength = token->tokenLength;
+}
diff --git a/tools/fastq-loader/fastq-lex.c b/tools/fastq-loader/fastq-lex.c
new file mode 100644
index 0000000..54cc5d6
--- /dev/null
+++ b/tools/fastq-loader/fastq-lex.c
@@ -0,0 +1,2888 @@
+
+
+#define YY_BUF_SIZE 16777216
+#define  YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+/* %not-for-header */
+
+/* %if-c-only */
+/* %if-not-reentrant */
+/* %endif */
+/* %endif */
+/* %ok-for-header */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 35
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* %if-c++-only */
+/* %endif */
+
+/* %if-c-only */
+    
+/* %endif */
+
+/* %if-c-only */
+
+/* %endif */
+
+/* First, we deal with  platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+/* %if-c-only */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+/* %endif */
+
+/* %if-tables-serialization */
+/* %endif */
+/* end standard C headers. */
+
+/* %if-c-or-c++ */
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types. 
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t; 
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN               (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN              (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN              (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX               (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX              (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX              (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX              (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX             (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX             (4294967295U)
+#endif
+
+#endif /* ! FLEXINT_H */
+
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif	/* defined (__STDC__) */
+#endif	/* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+/* %not-for-header */
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+/* %ok-for-header */
+
+/* %not-for-header */
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+/* %ok-for-header */
+
+/* %if-reentrant */
+
+/* An opaque pointer. */
+#ifndef YY_TYPEDEF_YY_SCANNER_T
+#define YY_TYPEDEF_YY_SCANNER_T
+typedef void* yyscan_t;
+#endif
+
+/* For convenience, these vars (plus the bison vars far below)
+   are macros in the reentrant scanner. */
+#define yyin yyg->yyin_r
+#define yyout yyg->yyout_r
+#define yyextra yyg->yyextra_r
+#define yyleng yyg->yyleng_r
+#define yytext yyg->yytext_r
+#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
+#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
+#define yy_flex_debug yyg->yy_flex_debug_r
+
+/* %endif */
+
+/* %if-not-reentrant */
+/* %endif */
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yyg->yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yyg->yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE FASTQ_restart(yyin ,yyscanner )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+/* %if-not-reentrant */
+/* %endif */
+
+/* %if-c-only */
+/* %if-not-reentrant */
+/* %endif */
+/* %endif */
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+    /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
+     *       access to the local variable yy_act. Since yyless() is a macro, it would break
+     *       existing scanners that call yyless() from OUTSIDE FASTQ_lex. 
+     *       One obvious solution it to make yy_act a global. I tried that, and saw
+     *       a 5% performance hit in a non-yylineno scanner, because yy_act is
+     *       normally declared as a register variable-- so it is not worth it.
+     */
+    #define  YY_LESS_LINENO(n) \
+            do { \
+                int yyl;\
+                for ( yyl = n; yyl < yyleng; ++yyl )\
+                    if ( yytext[yyl] == '\n' )\
+                        --yylineno;\
+            }while(0)
+    
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+		*yy_cp = yyg->yy_hold_char; \
+		YY_RESTORE_YY_MORE_OFFSET \
+		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+	{
+/* %if-c-only */
+	FILE *yy_input_file;
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
+	char *yy_ch_buf;		/* input buffer */
+	char *yy_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	yy_size_t yy_buf_size;
+
+	/* Number of characters read into yy_ch_buf, not including EOB
+	 * characters.
+	 */
+	int yy_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_at_bol;
+
+    int yy_bs_lineno; /**< The line count. */
+    int yy_bs_column; /**< The column count. */
+    
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_fill_buffer;
+
+	int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via FASTQ_restart()), so that the user can continue scanning by
+	 * just pointing yyin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+
+	};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* %if-c-only Standard (non-C++) definition */
+/* %not-for-header */
+
+/* %if-not-reentrant */
+/* %endif */
+/* %ok-for-header */
+
+/* %endif */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
+                          ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
+                          : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
+
+/* %if-c-only Standard (non-C++) definition */
+
+/* %if-not-reentrant */
+/* %not-for-header */
+
+/* %ok-for-header */
+
+/* %endif */
+
+void FASTQ_restart (FILE *input_file ,yyscan_t yyscanner );
+void FASTQ__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
+YY_BUFFER_STATE FASTQ__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
+void FASTQ__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
+void FASTQ__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
+void FASTQ_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
+void FASTQ_pop_buffer_state (yyscan_t yyscanner );
+
+static void FASTQ_ensure_buffer_stack (yyscan_t yyscanner );
+static void FASTQ__load_buffer_state (yyscan_t yyscanner );
+static void FASTQ__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
+
+#define YY_FLUSH_BUFFER FASTQ__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
+
+YY_BUFFER_STATE FASTQ__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
+YY_BUFFER_STATE FASTQ__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
+YY_BUFFER_STATE FASTQ__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+
+/* %endif */
+
+void *FASTQ_alloc (yy_size_t ,yyscan_t yyscanner );
+void *FASTQ_realloc (void *,yy_size_t ,yyscan_t yyscanner );
+void FASTQ_free (void * ,yyscan_t yyscanner );
+
+#define yy_new_buffer FASTQ__create_buffer
+
+#define yy_set_interactive(is_interactive) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){ \
+        FASTQ_ensure_buffer_stack (yyscanner); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            FASTQ__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+	}
+
+#define yy_set_bol(at_bol) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){\
+        FASTQ_ensure_buffer_stack (yyscanner); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            FASTQ__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
+/* Begin user sect3 */
+
+#define FASTQ_wrap(n) 1
+#define YY_SKIP_YYWRAP
+
+#define FLEX_DEBUG
+
+typedef unsigned char YY_CHAR;
+
+typedef int yy_state_type;
+
+#define yytext_ptr yytext_r
+
+/* %if-c-only Standard (non-C++) definition */
+
+static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
+static int yy_get_next_buffer (yyscan_t yyscanner );
+static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
+
+/* %endif */
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	yyg->yytext_ptr = yy_bp; \
+/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
+	yyleng = (size_t) (yy_cp - yy_bp); \
+	yyg->yy_hold_char = *yy_cp; \
+	*yy_cp = '\0'; \
+/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
+	yyg->yy_c_buf_p = yy_cp;
+
+/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
+#define YY_NUM_RULES 34
+#define YY_END_OF_BUFFER 35
+/* This struct is not used in this scanner,
+   but its presence is necessary. */
+struct yy_trans_info
+	{
+	flex_int32_t yy_verify;
+	flex_int32_t yy_nxt;
+	};
+static yyconst flex_int16_t yy_acclist[211] =
+    {   0,
+       32,   32,   35,   12,   34,    9,   12,   34,   33,   34,
+       12,   33,   34,    6,   12,   34,    8,   12,   34,    7,
+        8,   12,   34,   12,   34,    8,   12,   34,    3,   12,
+       34,   12,   34,16394,    2,   12,   34,    1,   12,   34,
+        8,   12,   34,16394,    8,   12,   34,16394,    9,   12,
+       34,   13,   34,   12,   13,   34,   34,   34,   17,   34,
+       34,16400,   34,16398,16400,   34,16398,16400,   34,   23,
+       34,   23,   34,   27,   34,   24,   27,   34,   26,   34,
+       26,   27,   34,   27,   34,16409,   24,   27,   34,16409,
+       21,   34,   21,   34,   18,   34,   20,   34,   18,   34,
+
+       30,   34,   24,   30,   34,   29,   34,   29,   30,   34,
+       30,   34,16412,   24,   30,   34,16412,   32,   34,   31,
+       34,   31,   32,   34,    9,   33,    6,    8,    7,    8,
+        8, 8202, 8202,16394,16394,16395,    8,16395,    8,16394,
+        9,   13,   13,   17, 8208,   17, 8208,16400, 8206, 8208,
+       17, 8206, 8208,16398,16400,16398,16399,16400,16399,16400,
+       22,   22,   23,   24,   26, 8217, 8217,16409,   24,16409,
+       21,   18,   20,   18,   19,   19,   29, 8220, 8220,16412,
+       24,16412,   32,   31,   31,   32,   31,    8, 8202, 8203,
+     8202, 8203,16395, 8203, 8203, 8206, 8207, 8208,   17, 8206,
+
+     8207, 8208, 8207, 8208,   17, 8207, 8208,    8,    5,    4
+    } ;
+
+static yyconst flex_int16_t yy_accept[143] =
+    {   0,
+        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,    9,   11,   14,
+       17,   20,   24,   26,   29,   32,   35,   38,   41,   45,
+       49,   52,   54,   57,   58,   59,   61,   63,   66,   69,
+       70,   72,   74,   76,   79,   81,   84,   87,   91,   93,
+       95,   97,   99,  101,  103,  106,  108,  111,  114,  118,
+      120,  122,  125,  126,  127,  128,  129,  131,  131,  132,
+      133,  134,  135,  137,  139,  141,  142,  143,  144,  144,
+      145,  147,  148,  149,  152,  154,  156,  159,  161,  161,
+
+      162,  164,  165,  166,  167,  168,  169,  171,  172,  173,
+      174,  176,  177,  178,  179,  180,  181,  183,  184,  185,
+      187,  188,  188,  189,  191,  193,  194,  195,  196,  200,
+      203,  206,  208,  208,  209,  209,  209,  209,  210,  210,
+      211,  211
+    } ;
+
+static yyconst flex_int32_t yy_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        1,    1,    4,    5,    5,    5,    5,    5,    5,    5,
+        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
+        5,    6,    5,    5,    7,    5,    5,    5,    5,    5,
+        5,    5,    8,    5,    9,   10,    5,   11,   11,   11,
+       11,   12,   12,   12,   12,   12,   12,   13,    5,    5,
+        5,   14,    5,   15,   16,    9,   16,   17,   17,    9,
+       16,    9,    9,    9,    9,    9,    9,   18,    9,    9,
+        9,   19,   17,   16,    9,    9,    9,    9,    9,    9,
+        5,    5,    5,    5,   20,    5,   16,    9,   16,    9,
+
+        9,    9,   16,    9,    9,    9,    9,    9,    9,   18,
+        9,    9,    9,    9,    9,   16,    9,    9,    9,    9,
+        9,    9,    5,    5,    5,    5,    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
+    } ;
+
+static yyconst flex_int32_t yy_meta[21] =
+    {   0,
+        1,    1,    2,    2,    3,    3,    3,    3,    4,    5,
+        6,    6,    7,    3,    3,    8,    4,    8,    4,    9
+    } ;
+
+static yyconst flex_int16_t yy_base[162] =
+    {   0,
+        0,   13,   30,   25,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,   43,   21,   34,   60,   66,   70,    0,
+       88,   94,   36,   45,  292,  356,   20,  356,  288,    0,
+        0,   39,   43,  270,  356,   53,  356,  356,   98,   65,
+      116,  356,  285,  356,  282,  356,  122,  126,   67,  280,
+      356,  276,  356,   77,  356,  274,   81,  143,  356,  205,
+        0,   92,   95,  356,  129,  356,  196,  108,  148,  129,
+      356,  134,  137,  356,    0,    0,    0,  177,  158,  356,
+      166,  137,  152,  168,    0,    0,  356,  145,  131,  356,
+      356,  118,  179,  356,  110,    0,  181,  190,   96,  356,
+
+      356,  151,  356,  356,   90,  155,    0,  356,    0,  149,
+        0,  154,  356,  356,   84,  163,    0,  170,  356,  172,
+      356,  175,  177,  356,   68,  199,  356,   62,  356,   57,
+      356,   55,   39,   32,  184,  186,   17,  193,  195,  200,
+      356,  212,  221,  230,  239,  248,  257,  266,  272,  278,
+      285,  293,  302,  311,  319,  324,  331,  340,  344,  346,
+      348
+    } ;
+
+static yyconst flex_int16_t yy_def[162] =
+    {   0,
+      141,    1,    1,    3,  142,  142,  142,  142,  142,  142,
+      142,  142,  142,  143,  144,  144,  145,  146,  142,   19,
+      147,  147,  148,  148,  141,  141,  141,  141,  141,  149,
+      150,  150,  141,  150,  141,  151,  141,  141,  141,   39,
+      141,  141,  141,  141,  152,  141,  153,  153,   48,  154,
+      141,  154,  141,  141,  141,  141,  155,  155,  141,  141,
+      156,  141,  156,  141,  141,  141,  141,  157,  157,  158,
+      141,  158,  141,  141,  149,  150,   32,  159,  150,  141,
+      141,  151,  141,  150,   40,   41,  141,  141,  152,  141,
+      141,  152,  153,  141,  152,   48,   48,   93,  154,  141,
+
+      141,  141,  141,  141,  141,  155,   58,  141,  156,  141,
+       63,  141,  141,  141,  141,  157,   69,  158,  141,  158,
+      141,  141,  150,  141,  141,  141,  141,  141,  141,  152,
+      141,  152,  160,  123,  141,  141,  161,  141,  141,  141,
+        0,  141,  141,  141,  141,  141,  141,  141,  141,  141,
+      141,  141,  141,  141,  141,  141,  141,  141,  141,  141,
+      141
+    } ;
+
+static yyconst flex_int16_t yy_nxt[377] =
+    {   0,
+       26,   27,   28,   29,   26,   27,   30,   26,   31,   26,
+       32,   32,   33,   26,   26,   31,   34,   31,   31,   26,
+       35,   73,   36,   51,   52,   73,   37,   38,   39,  139,
+       40,   41,   42,   43,   36,   41,   51,   52,   71,   72,
+       39,  136,   40,   45,   45,   46,   45,   71,   72,   77,
+       77,  135,   48,   78,   78,   80,   81,  131,   49,  129,
+       48,   54,   55,   56,  127,   54,   53,   54,   55,   56,
+      124,   58,   59,   60,   82,   76,   97,   98,  102,   61,
+       62,   62,  102,  104,  105,   63,  114,   61,   64,   65,
+       66,   67,  104,   69,   64,   65,   66,   67,  100,   69,
+
+       80,   81,  110,  110,  111,  112,   76,   83,   84,   76,
+      114,  115,   94,   85,   76,   85,   76,   86,   87,   88,
+       91,   86,   89,   89,   91,   92,   89,   89,   94,   95,
+      102,  119,  120,   90,  102,   96,  121,  120,   73,   80,
+       81,   96,   73,   96,  102,  104,  105,   87,  107,  102,
+      114,  115,  102,  117,  124,  125,  102,  104,  105,  110,
+      110,   83,  126,  112,  112,  114,  115,   82,   80,   82,
+      127,  128,  119,  120,  121,  120,  123,  126,   84,   89,
+       89,   91,   92,  129,  130,  133,  133,  134,  134,  122,
+       97,   98,  131,  132,  137,  137,  138,  138,  113,   98,
+
+       98,  127,  128,  138,  138,  140,  140,  108,  126,  126,
+      140,  140,   44,   44,   44,   44,   44,   44,   44,   44,
+       44,   47,   47,   47,   47,   47,   47,   47,   47,   47,
+       50,   50,   50,   50,   50,   50,   50,   50,   50,   53,
+       53,   53,   53,   53,   53,   53,   53,   53,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   68,   68,   68,
+       68,   68,   68,   68,   68,   68,   70,   70,   70,   70,
+       70,   70,   70,   70,   70,   75,  103,   75,  101,   75,
+       75,   76,  100,   76,   90,   76,   82,   87,   79,   82,
+       74,  141,   82,   89,   89,   89,   89,   89,   89,   89,
+
+       89,   89,   93,   93,   93,   93,   93,   93,   93,   93,
+       93,   99,   99,   99,   99,   99,   99,   99,   99,   99,
+      106,  106,  106,  106,  106,  106,  106,  106,  109,  141,
+      141,  109,  116,  116,  116,  116,  116,  116,  116,  116,
+      118,  118,  118,  118,  118,  118,  118,  118,  118,   78,
+       78,  133,  133,  137,  137,   25,  141,  141,  141,  141,
+      141,  141,  141,  141,  141,  141,  141,  141,  141,  141,
+      141,  141,  141,  141,  141,  141
+    } ;
+
+static yyconst flex_int16_t yy_chk[377] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        2,   27,    2,   15,   15,   27,    2,    2,    2,  137,
+        2,    3,    3,    3,    4,    3,   16,   16,   23,   23,
+        4,  134,    4,   14,   14,   14,   14,   24,   24,   32,
+       32,  133,   14,   33,   33,   36,   36,  132,   14,  130,
+       14,   17,   17,   17,  128,   17,   18,   18,   18,   18,
+      125,   18,   19,   19,   40,   40,   49,   49,   54,   19,
+       19,   19,   54,   57,   57,   19,  115,   19,   21,   21,
+       21,   21,  105,   21,   22,   22,   22,   22,   99,   22,
+
+       39,   39,   62,   62,   63,   63,   39,   39,   39,   39,
+       68,   68,   95,   39,   39,   39,   39,   41,   41,   41,
+       92,   41,   47,   47,   47,   47,   48,   48,   48,   48,
+       65,   70,   70,   89,   65,   48,   72,   72,   73,   82,
+       82,   48,   73,   48,   58,   58,   58,   88,   58,   69,
+       69,   69,  102,   69,   83,   83,  102,  106,  106,  110,
+      110,   83,   83,  112,  112,  116,  116,   83,   81,   83,
+       84,   84,  118,  118,  120,  120,   79,   84,   84,   93,
+       93,   93,   93,   97,   97,  122,  122,  123,  123,   78,
+       97,   97,   98,   98,  135,  135,  136,  136,   67,   98,
+
+       98,  126,  126,  138,  138,  139,  139,   60,  126,  126,
+      140,  140,  142,  142,  142,  142,  142,  142,  142,  142,
+      142,  143,  143,  143,  143,  143,  143,  143,  143,  143,
+      144,  144,  144,  144,  144,  144,  144,  144,  144,  145,
+      145,  145,  145,  145,  145,  145,  145,  145,  146,  146,
+      146,  146,  146,  146,  146,  146,  146,  147,  147,  147,
+      147,  147,  147,  147,  147,  147,  148,  148,  148,  148,
+      148,  148,  148,  148,  148,  149,   56,  149,   52,  149,
+      149,  150,   50,  150,   45,  150,  151,   43,   34,  151,
+       29,   25,  151,  152,  152,  152,  152,  152,  152,  152,
+
+      152,  152,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  154,  154,  154,  154,  154,  154,  154,  154,  154,
+      155,  155,  155,  155,  155,  155,  155,  155,  156,    0,
+        0,  156,  157,  157,  157,  157,  157,  157,  157,  157,
+      158,  158,  158,  158,  158,  158,  158,  158,  158,  159,
+      159,  160,  160,  161,  161,  141,  141,  141,  141,  141,
+      141,  141,  141,  141,  141,  141,  141,  141,  141,  141,
+      141,  141,  141,  141,  141,  141
+    } ;
+
+/* Table of booleans, true if rule could match eol. */
+static yyconst flex_int32_t yy_rule_can_match_eol[35] =
+    {   0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 
+    0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0,     };
+
+static yyconst flex_int16_t yy_rule_linenum[34] =
+    {   0,
+       90,   91,   93,   97,   98,   99,  100,  101,  102,  103,
+      104,  105,  108,  112,  113,  114,  115,  120,  121,  122,
+      123,  128,  129,  134,  139,  140,  147,  152,  153,  154,
+      159,  160,  163
+    } ;
+
+#define YY_TRAILING_MASK 0x2000
+#define YY_TRAILING_HEAD_MASK 0x4000
+#define REJECT \
+{ \
+*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ \
+yy_cp = yyg->yy_full_match; /* restore poss. backed-over text */ \
+yyg->yy_lp = yyg->yy_full_lp; /* restore orig. accepting pos. */ \
+yyg->yy_state_ptr = yyg->yy_full_state; /* restore orig. state */ \
+yy_current_state = *yyg->yy_state_ptr; /* restore curr. state */ \
+++yyg->yy_lp; \
+goto find_rule; \
+}
+
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+    #include <sysalloc.h>   
+    #include <ctype.h>
+    
+    #include <klib/rc.h>
+    #include <klib/log.h>
+
+    #include "fastq-parse.h"
+    #include "fastq-tokens.h"    
+    
+    #define YYSTYPE FASTQToken
+
+    /* code to populate token with internal values */
+	static void ConsumeToken(FASTQToken* token, FASTQParseBlock* pb);
+    #define YY_USER_ACTION ConsumeToken(yylval, yyextra);
+	
+    #define ENDLINE \
+        yyextra -> column=1;\
+        return fqENDLINE;
+
+    #define YY_INPUT(buf, result, max_size) \
+        result = yyextra->input(yyextra, buf, max_size)
+
+    #define ECHO
+
+    static void FASTQ_fatal_error(yyconst char* msg);
+    #define YY_FATAL_ERROR(msg) FASTQ_fatal_error(msg)
+    
+#define YY_NO_UNISTD_H 1
+/*%option debug*/
+
+
+
+
+
+
+
+
+
+
+
+/* there are more: =ACMGRSVTWYHKDBN. plus lowercase */
+
+#define INITIAL 0
+#define TAG_LINE 1
+#define SEE_COORDS 2
+#define PAST_COORDS 3
+#define READ_NUMBER 4
+#define NAMEVALUE 5
+#define IN_SEQUENCE 6
+#define QTAG_LINE 7
+#define IN_QUALITY 8
+#define INLINE_SEQUENCE 9
+#define INLINE_QUALITY 10
+#define SKIP_TO_EOL 11
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+/* %if-c-only */
+#include <unistd.h>
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+#endif
+
+#define YY_EXTRA_TYPE FASTQParseBlock*
+
+/* %if-c-only Reentrant structure and macros (non-C++). */
+/* %if-reentrant */
+
+/* Holds the entire state of the reentrant scanner. */
+struct yyguts_t
+    {
+
+    /* User-defined. Not touched by flex. */
+    YY_EXTRA_TYPE yyextra_r;
+
+    /* The rest are the same as the globals declared in the non-reentrant scanner. */
+    FILE *yyin_r, *yyout_r;
+    size_t yy_buffer_stack_top; /**< index of top of stack. */
+    size_t yy_buffer_stack_max; /**< capacity of stack. */
+    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
+    char yy_hold_char;
+    int yy_n_chars;
+    int yyleng_r;
+    char *yy_c_buf_p;
+    int yy_init;
+    int yy_start;
+    int yy_did_buffer_switch_on_eof;
+    int yy_start_stack_ptr;
+    int yy_start_stack_depth;
+    int *yy_start_stack;
+    yy_state_type yy_last_accepting_state;
+    char* yy_last_accepting_cpos;
+
+    int yylineno_r;
+    int yy_flex_debug_r;
+
+    yy_state_type *yy_state_buf;
+    yy_state_type *yy_state_ptr;
+    char *yy_full_match;
+    int yy_lp;
+
+    /* These are only needed for trailing context rules,
+     * but there's no conditional variable for that yet. */
+    int yy_looking_for_trail_begin;
+    int yy_full_lp;
+    int *yy_full_state;
+
+    char *yytext_r;
+    int yy_more_flag;
+    int yy_more_len;
+
+    YYSTYPE * yylval_r;
+
+    }; /* end struct yyguts_t */
+
+/* %if-c-only */
+
+static int yy_init_globals (yyscan_t yyscanner );
+
+/* %endif */
+
+/* %if-reentrant */
+
+    /* This must go here because YYSTYPE and YYLTYPE are included
+     * from bison output in section 1.*/
+    #    define yylval yyg->yylval_r
+    
+int FASTQ_lex_init (yyscan_t* scanner);
+
+int FASTQ_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+
+/* %endif */
+
+/* %endif End reentrant structures and macros. */
+
+/* Accessor methods to globals.
+   These are made visible to non-reentrant scanners for convenience. */
+
+int FASTQ_lex_destroy (yyscan_t yyscanner );
+
+int FASTQ_get_debug (yyscan_t yyscanner );
+
+void FASTQ_set_debug (int debug_flag ,yyscan_t yyscanner );
+
+YY_EXTRA_TYPE FASTQ_get_extra (yyscan_t yyscanner );
+
+void FASTQ_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+
+FILE *FASTQ_get_in (yyscan_t yyscanner );
+
+void FASTQ_set_in  (FILE * in_str ,yyscan_t yyscanner );
+
+FILE *FASTQ_get_out (yyscan_t yyscanner );
+
+void FASTQ_set_out  (FILE * out_str ,yyscan_t yyscanner );
+
+int FASTQ_get_leng (yyscan_t yyscanner );
+
+char *FASTQ_get_text (yyscan_t yyscanner );
+
+int FASTQ_get_lineno (yyscan_t yyscanner );
+
+void FASTQ_set_lineno (int line_number ,yyscan_t yyscanner );
+
+/* %if-bison-bridge */
+
+YYSTYPE * FASTQ_get_lval (yyscan_t yyscanner );
+
+void FASTQ_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
+
+/* %endif */
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int FASTQ_wrap (yyscan_t yyscanner );
+#else
+extern int FASTQ_wrap (yyscan_t yyscanner );
+#endif
+#endif
+
+/* %not-for-header */
+
+    static void yyunput (int c,char *buf_ptr  ,yyscan_t yyscanner);
+    
+/* %ok-for-header */
+
+/* %endif */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
+#endif
+
+#ifndef YY_NO_INPUT
+/* %if-c-only Standard (non-C++) definition */
+/* %not-for-header */
+
+#ifdef __cplusplus
+static int yyinput (yyscan_t yyscanner );
+#else
+static int input (yyscan_t yyscanner );
+#endif
+/* %ok-for-header */
+
+/* %endif */
+#endif
+
+/* %if-c-only */
+
+    static void yy_push_state (int new_state ,yyscan_t yyscanner);
+    
+    static void yy_pop_state (yyscan_t yyscanner );
+    
+    static int yy_top_state (yyscan_t yyscanner );
+    
+/* %endif */
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* %if-c-only Standard (non-C++) definition */
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO fwrite( yytext, yyleng, 1, yyout )
+/* %endif */
+/* %if-c++-only C++ definition */
+/* %endif */
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+		{ \
+		int c = '*'; \
+		int n; \
+		for ( n = 0; n < max_size && \
+			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+			buf[n] = (char) c; \
+		if ( c == '\n' ) \
+			buf[n++] = (char) c; \
+		if ( c == EOF && ferror( yyin ) ) \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+		result = n; \
+		} \
+	else \
+		{ \
+		errno=0; \
+		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+			{ \
+			if( errno != EINTR) \
+				{ \
+				YY_FATAL_ERROR( "input in flex scanner failed" ); \
+				break; \
+				} \
+			errno=0; \
+			clearerr(yyin); \
+			} \
+		}\
+\
+/* %if-c++-only C++ definition \ */\
+/* %endif */
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+/* %if-c-only */
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+#endif
+
+/* %if-tables-serialization structures and prototypes */
+/* %not-for-header */
+
+/* %ok-for-header */
+
+/* %not-for-header */
+
+/* %tables-yydmap generated elements */
+/* %endif */
+/* end tables serialization structures and prototypes */
+
+/* %ok-for-header */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+/* %if-c-only Standard (non-C++) definition */
+
+extern int FASTQ_lex \
+               (YYSTYPE * yylval_param ,yyscan_t yyscanner);
+
+#define YY_DECL int FASTQ_lex \
+               (YYSTYPE * yylval_param , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only C++ definition */
+/* %endif */
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+/* %% [6.0] YY_RULE_SETUP definition goes here */
+#define YY_RULE_SETUP \
+	if ( yyleng > 0 ) \
+		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
+				(yytext[yyleng - 1] == '\n'); \
+	YY_USER_ACTION
+
+/* %not-for-header */
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+	register yy_state_type yy_current_state;
+	register char *yy_cp, *yy_bp;
+	register int yy_act;
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+/* %% [7.0] user's declarations go here */
+
+
+
+    yylval = yylval_param;
+
+	if ( !yyg->yy_init )
+		{
+		yyg->yy_init = 1;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+        /* Create the reject buffer large enough to save one state per allowed character. */
+        if ( ! yyg->yy_state_buf )
+            yyg->yy_state_buf = (yy_state_type *)FASTQ_alloc(YY_STATE_BUF_SIZE  ,yyscanner);
+            if ( ! yyg->yy_state_buf )
+                YY_FATAL_ERROR( "out of dynamic memory in FASTQ_lex()" );
+
+		if ( ! yyg->yy_start )
+			yyg->yy_start = 1;	/* first start state */
+
+		if ( ! yyin )
+/* %if-c-only */
+			yyin = stdin;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+		if ( ! yyout )
+/* %if-c-only */
+			yyout = stdout;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+		if ( ! YY_CURRENT_BUFFER ) {
+			FASTQ_ensure_buffer_stack (yyscanner);
+			YY_CURRENT_BUFFER_LVALUE =
+				FASTQ__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+		}
+
+		FASTQ__load_buffer_state(yyscanner );
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+/* %% [8.0] yymore()-related code goes here */
+		yy_cp = yyg->yy_c_buf_p;
+
+		/* Support of yytext. */
+		*yy_cp = yyg->yy_hold_char;
+
+		/* yy_bp points to the position in yy_ch_buf of the start of
+		 * the current run.
+		 */
+		yy_bp = yy_cp;
+
+/* %% [9.0] code to set up and find next match goes here */
+		yy_current_state = yyg->yy_start;
+		yy_current_state += YY_AT_BOL();
+
+		yyg->yy_state_ptr = yyg->yy_state_buf;
+		*yyg->yy_state_ptr++ = yy_current_state;
+
+yy_match:
+		do
+			{
+			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+				{
+				yy_current_state = (int) yy_def[yy_current_state];
+				if ( yy_current_state >= 142 )
+					yy_c = yy_meta[(unsigned int) yy_c];
+				}
+			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+			*yyg->yy_state_ptr++ = yy_current_state;
+			++yy_cp;
+			}
+		while ( yy_current_state != 141 );
+
+yy_find_action:
+/* %% [10.0] code to find the action number goes here */
+		yy_current_state = *--yyg->yy_state_ptr;
+		yyg->yy_lp = yy_accept[yy_current_state];
+find_rule: /* we branch to this label when backing up */
+		for ( ; ; ) /* until we find what rule we matched */
+			{
+			if ( yyg->yy_lp && yyg->yy_lp < yy_accept[yy_current_state + 1] )
+				{
+				yy_act = yy_acclist[yyg->yy_lp];
+				if ( yy_act & YY_TRAILING_HEAD_MASK ||
+				     yyg->yy_looking_for_trail_begin )
+					{
+					if ( yy_act == yyg->yy_looking_for_trail_begin )
+						{
+						yyg->yy_looking_for_trail_begin = 0;
+						yy_act &= ~YY_TRAILING_HEAD_MASK;
+						break;
+						}
+					}
+				else if ( yy_act & YY_TRAILING_MASK )
+					{
+					yyg->yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
+					yyg->yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
+					}
+				else
+					{
+					yyg->yy_full_match = yy_cp;
+					yyg->yy_full_state = yyg->yy_state_ptr;
+					yyg->yy_full_lp = yyg->yy_lp;
+					break;
+					}
+				++yyg->yy_lp;
+				goto find_rule;
+				}
+			--yy_cp;
+			yy_current_state = *--yyg->yy_state_ptr;
+			yyg->yy_lp = yy_accept[yy_current_state];
+			}
+
+		YY_DO_BEFORE_ACTION;
+
+/* %% [11.0] code for yylineno update goes here */
+
+		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
+			{
+			int yyl;
+			for ( yyl = 0; yyl < yyleng; ++yyl )
+				if ( yytext[yyl] == '\n' )
+					   
+    do{ yylineno++;
+        yycolumn=0;
+    }while(0)
+;
+			}
+
+do_action:	/* This label is used only to access EOF actions. */
+
+/* %% [12.0] debug code goes here */
+		if ( yy_flex_debug )
+			{
+			if ( yy_act == 0 )
+				fprintf( stderr, "--scanner backing up\n" );
+			else if ( yy_act < 34 )
+				fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
+				         (long)yy_rule_linenum[yy_act], yytext );
+			else if ( yy_act == 34 )
+				fprintf( stderr, "--accepting default rule (\"%s\")\n",
+				         yytext );
+			else if ( yy_act == 35 )
+				fprintf( stderr, "--(end of buffer or a NUL)\n" );
+			else
+				fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
+			}
+
+		switch ( yy_act )
+	{ /* beginning of action switch */
+/* %% [13.0] actions go here */
+case 1:
+YY_RULE_SETUP
+{ BEGIN TAG_LINE; return yytext[0]; }
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+{ BEGIN TAG_LINE; return yytext[0]; }
+	YY_BREAK
+case 3:
+YY_RULE_SETUP
+{ BEGIN QTAG_LINE; return yytext[0]; }
+	YY_BREAK
+
+
+case 4:
+YY_RULE_SETUP
+{ return fqCOORDS; }
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+{ return fqRUNDOTSPOT; } 
+	YY_BREAK
+case 6:
+YY_RULE_SETUP
+{ return fqSPOTGROUP; }
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+{ return fqNUMBER; }
+	YY_BREAK
+case 8:
+YY_RULE_SETUP
+{ return fqALPHANUM; }
+	YY_BREAK
+case 9:
+YY_RULE_SETUP
+{ return fqWS; }
+	YY_BREAK
+case 10:
+/* rule 10 can match eol */
+YY_RULE_SETUP
+{ return fqBASESEQ; }
+	YY_BREAK
+case 11:
+/* rule 11 can match eol */
+YY_RULE_SETUP
+{ return fqCOLORSEQ; }
+	YY_BREAK
+case 12:
+YY_RULE_SETUP
+{ return yytext[0]; }
+	YY_BREAK
+
+case 13:
+/* rule 13 can match eol */
+YY_RULE_SETUP
+{ BEGIN IN_SEQUENCE; ENDLINE; } 
+	YY_BREAK
+
+
+case 14:
+/* rule 14 can match eol */
+YY_RULE_SETUP
+{ BEGIN 0; return fqBASESEQ; }
+	YY_BREAK
+case 15:
+/* rule 15 can match eol */
+YY_RULE_SETUP
+{ BEGIN 0; return fqCOLORSEQ; }
+	YY_BREAK
+case 16:
+/* rule 16 can match eol */
+YY_RULE_SETUP
+{ BEGIN 0; return fqASCQUAL; }
+	YY_BREAK
+case 17:
+*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
+yyg->yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+{ BEGIN 0; return fqUNRECOGNIZED; }
+	YY_BREAK
+
+
+
+case 18:
+YY_RULE_SETUP
+{ BEGIN 0; return fqBASESEQ; }
+	YY_BREAK
+case 19:
+YY_RULE_SETUP
+{ BEGIN 0; return fqCOLORSEQ; }
+	YY_BREAK
+case 20:
+YY_RULE_SETUP
+{ BEGIN 0; return fqNUMBER; }
+	YY_BREAK
+case 21:
+/* rule 21 can match eol */
+YY_RULE_SETUP
+{ BEGIN 0; ENDLINE; }
+	YY_BREAK
+
+
+
+case 22:
+*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
+yyg->yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+{ return fqTOKEN; /* do not bother to parse the inside of the line */ }
+	YY_BREAK
+case 23:
+/* rule 23 can match eol */
+YY_RULE_SETUP
+{ BEGIN IN_QUALITY; ENDLINE }
+	YY_BREAK
+
+
+
+case 24:
+YY_RULE_SETUP
+{ } 
+	YY_BREAK
+
+
+
+case 25:
+/* rule 25 can match eol */
+YY_RULE_SETUP
+{ return fqASCQUAL; }
+	YY_BREAK
+case 26:
+/* rule 26 can match eol */
+YY_RULE_SETUP
+{   /* if read was split across several lines, expect the same number of lines in quality */
+                                    if (yyextra->expectedQualityLines <= 1) 
+                                        BEGIN 0; 
+                                    else 
+                                        --yyextra->expectedQualityLines;
+                                    ENDLINE; 
+                                }
+	YY_BREAK
+case 27:
+YY_RULE_SETUP
+{ return yytext[0]; }
+	YY_BREAK
+
+
+
+case 28:
+/* rule 28 can match eol */
+YY_RULE_SETUP
+{ return fqASCQUAL; }
+	YY_BREAK
+case 29:
+/* rule 29 can match eol */
+YY_RULE_SETUP
+{ BEGIN 0; ENDLINE; }
+	YY_BREAK
+case 30:
+YY_RULE_SETUP
+{ return yytext[0]; }
+	YY_BREAK
+
+
+
+case 31:
+/* rule 31 can match eol */
+YY_RULE_SETUP
+{ BEGIN 0; ENDLINE; }
+	YY_BREAK
+case 32:
+YY_RULE_SETUP
+{ BEGIN 0; return fqENDOFTEXT; }
+	YY_BREAK
+
+case 33:
+/* rule 33 can match eol */
+YY_RULE_SETUP
+{ ENDLINE; }
+	YY_BREAK
+case 34:
+YY_RULE_SETUP
+ECHO;
+	YY_BREAK
+			case YY_STATE_EOF(INITIAL):
+			case YY_STATE_EOF(TAG_LINE):
+			case YY_STATE_EOF(SEE_COORDS):
+			case YY_STATE_EOF(PAST_COORDS):
+			case YY_STATE_EOF(READ_NUMBER):
+			case YY_STATE_EOF(NAMEVALUE):
+			case YY_STATE_EOF(IN_SEQUENCE):
+			case YY_STATE_EOF(QTAG_LINE):
+			case YY_STATE_EOF(IN_QUALITY):
+			case YY_STATE_EOF(INLINE_SEQUENCE):
+			case YY_STATE_EOF(INLINE_QUALITY):
+			case YY_STATE_EOF(SKIP_TO_EOL):
+				yyterminate();
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*yy_cp = yyg->yy_hold_char;
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed yyin at a new source and called
+			 * FASTQ_lex().  If so, then we have to assure
+			 * consistency between YY_CURRENT_BUFFER and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for yy_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since yy_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
+			{ /* This was really a NUL. */
+			yy_state_type yy_next_state;
+
+			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
+
+			yy_current_state = yy_get_previous_state( yyscanner );
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * yy_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
+
+			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
+
+			if ( yy_next_state )
+				{
+				/* Consume the NUL. */
+				yy_cp = ++yyg->yy_c_buf_p;
+				yy_current_state = yy_next_state;
+				goto yy_match;
+				}
+
+			else
+				{
+/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
+				yy_cp = yyg->yy_c_buf_p;
+				goto yy_find_action;
+				}
+			}
+
+		else switch ( yy_get_next_buffer( yyscanner ) )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				yyg->yy_did_buffer_switch_on_eof = 0;
+
+				if ( FASTQ_wrap(yyscanner ) )
+					{
+					/* Note: because we've taken care in
+					 * yy_get_next_buffer() to have set up
+					 * yytext, we can now set up
+					 * yy_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
+
+					yy_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! yyg->yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				yyg->yy_c_buf_p =
+					yyg->yytext_ptr + yy_amount_of_matched_text;
+
+				yy_current_state = yy_get_previous_state( yyscanner );
+
+				yy_cp = yyg->yy_c_buf_p;
+				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
+				goto yy_match;
+
+			case EOB_ACT_LAST_MATCH:
+				yyg->yy_c_buf_p =
+				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
+
+				yy_current_state = yy_get_previous_state( yyscanner );
+
+				yy_cp = yyg->yy_c_buf_p;
+				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
+				goto yy_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+} /* end of FASTQ_lex */
+/* %ok-for-header */
+
+/* %if-c++-only */
+/* %not-for-header */
+
+/* %ok-for-header */
+
+/* %endif */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+/* %if-c-only */
+static int yy_get_next_buffer (yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+	register char *source = yyg->yytext_ptr;
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
+
+	else
+		{
+			int num_to_read =
+			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+
+			YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+			yyg->yy_n_chars, (size_t) num_to_read );
+
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
+		}
+
+	if ( yyg->yy_n_chars == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			FASTQ_restart(yyin  ,yyscanner);
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+		/* Extend the array by 50%, plus the number we really need. */
+		yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
+		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) FASTQ_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
+		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+	}
+
+	yyg->yy_n_chars += number_to_move;
+	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+	return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+/* %if-c-only */
+/* %not-for-header */
+
+    static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+	register yy_state_type yy_current_state;
+	register char *yy_cp;
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+/* %% [15.0] code to get the start state into yy_current_state goes here */
+	yy_current_state = yyg->yy_start;
+	yy_current_state += YY_AT_BOL();
+
+	yyg->yy_state_ptr = yyg->yy_state_buf;
+	*yyg->yy_state_ptr++ = yy_current_state;
+
+	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
+		{
+/* %% [16.0] code to find the next state goes here */
+		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+			{
+			yy_current_state = (int) yy_def[yy_current_state];
+			if ( yy_current_state >= 142 )
+				yy_c = yy_meta[(unsigned int) yy_c];
+			}
+		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+		*yyg->yy_state_ptr++ = yy_current_state;
+		}
+
+	return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = yy_try_NUL_trans( current_state );
+ */
+/* %if-c-only */
+    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+	register int yy_is_jam;
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
+/* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
+
+	register YY_CHAR yy_c = 1;
+	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+		{
+		yy_current_state = (int) yy_def[yy_current_state];
+		if ( yy_current_state >= 142 )
+			yy_c = yy_meta[(unsigned int) yy_c];
+		}
+	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+	yy_is_jam = (yy_current_state == 141);
+	if ( ! yy_is_jam )
+		*yyg->yy_state_ptr++ = yy_current_state;
+
+	return yy_is_jam ? 0 : yy_current_state;
+}
+
+/* %if-c-only */
+
+    static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+	register char *yy_cp;
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+    yy_cp = yyg->yy_c_buf_p;
+
+	/* undo effects of setting up yytext */
+	*yy_cp = yyg->yy_hold_char;
+
+	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register int number_to_move = yyg->yy_n_chars + 2;
+		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+		register char *source =
+				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+
+		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+			*--dest = *--source;
+
+		yy_cp += (int) (dest - source);
+		yy_bp += (int) (dest - source);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+
+		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--yy_cp = (char) c;
+
+/* %% [18.0] update yylineno here */
+
+    if ( c == '\n' ){
+        --yylineno;
+    }
+
+	yyg->yytext_ptr = yy_bp;
+	yyg->yy_hold_char = *yy_cp;
+	yyg->yy_c_buf_p = yy_cp;
+}
+/* %if-c-only */
+
+/* %endif */
+
+/* %if-c-only */
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+    static int yyinput (yyscan_t yyscanner)
+#else
+    static int input  (yyscan_t yyscanner)
+#endif
+
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+	int c;
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+	*yyg->yy_c_buf_p = yyg->yy_hold_char;
+
+	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+		{
+		/* yy_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
+			/* This was really a NUL. */
+			*yyg->yy_c_buf_p = '\0';
+
+		else
+			{ /* need more input */
+			int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+			++yyg->yy_c_buf_p;
+
+			switch ( yy_get_next_buffer( yyscanner ) )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because yy_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					FASTQ_restart(yyin ,yyscanner);
+
+					/*FALLTHROUGH*/
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( FASTQ_wrap(yyscanner ) )
+						return EOF;
+
+					if ( ! yyg->yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return yyinput(yyscanner);
+#else
+					return input(yyscanner);
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
+	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
+	yyg->yy_hold_char = *++yyg->yy_c_buf_p;
+
+/* %% [19.0] update BOL and yylineno */
+	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
+		   
+    do{ yylineno++;
+        yycolumn=0;
+    }while(0)
+;
+
+	return c;
+}
+/* %if-c-only */
+#endif	/* ifndef YY_NO_INPUT */
+/* %endif */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ * @param yyscanner The scanner object.
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+/* %if-c-only */
+    void FASTQ_restart  (FILE * input_file , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+	if ( ! YY_CURRENT_BUFFER ){
+        FASTQ_ensure_buffer_stack (yyscanner);
+		YY_CURRENT_BUFFER_LVALUE =
+            FASTQ__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+	}
+
+	FASTQ__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
+	FASTQ__load_buffer_state(yyscanner );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ * @param yyscanner The scanner object.
+ */
+/* %if-c-only */
+    void FASTQ__switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+	/* TODO. We should be able to replace this entire function body
+	 * with
+	 *		FASTQ_pop_buffer_state();
+	 *		FASTQ_push_buffer_state(new_buffer);
+     */
+	FASTQ_ensure_buffer_stack (yyscanner);
+	if ( YY_CURRENT_BUFFER == new_buffer )
+		return;
+
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*yyg->yy_c_buf_p = yyg->yy_hold_char;
+		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
+		}
+
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+	FASTQ__load_buffer_state(yyscanner );
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (FASTQ_wrap()) processing, but the only time this flag
+	 * is looked at is after FASTQ_wrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	yyg->yy_did_buffer_switch_on_eof = 1;
+}
+
+/* %if-c-only */
+static void FASTQ__load_buffer_state  (yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+	yyg->yy_hold_char = *yyg->yy_c_buf_p;
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ * @param yyscanner The scanner object.
+ * @return the allocated buffer state.
+ */
+/* %if-c-only */
+    YY_BUFFER_STATE FASTQ__create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+	YY_BUFFER_STATE b;
+    
+	b = (YY_BUFFER_STATE) FASTQ_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in FASTQ__create_buffer()" );
+
+	b->yy_buf_size = size;
+
+	/* yy_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->yy_ch_buf = (char *) FASTQ_alloc(b->yy_buf_size + 2 ,yyscanner );
+	if ( ! b->yy_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in FASTQ__create_buffer()" );
+
+	b->yy_is_our_buffer = 1;
+
+	FASTQ__init_buffer(b,file ,yyscanner);
+
+	return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with FASTQ__create_buffer()
+ * @param yyscanner The scanner object.
+ */
+/* %if-c-only */
+    void FASTQ__delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+	if ( ! b )
+		return;
+
+	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+	if ( b->yy_is_our_buffer )
+		FASTQ_free((void *) b->yy_ch_buf ,yyscanner );
+
+	FASTQ_free((void *) b ,yyscanner );
+}
+
+/* %if-c-only */
+
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a FASTQ_restart() or at EOF.
+ */
+/* %if-c-only */
+    static void FASTQ__init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+{
+	int oerrno = errno;
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+	FASTQ__flush_buffer(b ,yyscanner);
+
+	b->yy_input_file = file;
+	b->yy_fill_buffer = 1;
+
+    /* If b is the current buffer, then FASTQ__init_buffer was _probably_
+     * called from FASTQ_restart() or through yy_get_next_buffer.
+     * In that case, we don't want to reset the lineno or column.
+     */
+    if (b != YY_CURRENT_BUFFER){
+        b->yy_bs_lineno = 1;
+        b->yy_bs_column = 0;
+    }
+
+/* %if-c-only */
+
+        b->yy_is_interactive = 0;
+    
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+	errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * @param yyscanner The scanner object.
+ */
+/* %if-c-only */
+    void FASTQ__flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+	if ( ! b )
+		return;
+
+	b->yy_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->yy_buf_pos = &b->yy_ch_buf[0];
+
+	b->yy_at_bol = 1;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == YY_CURRENT_BUFFER )
+		FASTQ__load_buffer_state(yyscanner );
+}
+
+/* %if-c-or-c++ */
+/** Pushes the new state onto the stack. The new state becomes
+ *  the current state. This function will allocate the stack
+ *  if necessary.
+ *  @param new_buffer The new state.
+ *  @param yyscanner The scanner object.
+ */
+/* %if-c-only */
+void FASTQ_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+	if (new_buffer == NULL)
+		return;
+
+	FASTQ_ensure_buffer_stack(yyscanner);
+
+	/* This block is copied from FASTQ__switch_to_buffer. */
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*yyg->yy_c_buf_p = yyg->yy_hold_char;
+		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
+		}
+
+	/* Only push if top exists. Otherwise, replace top. */
+	if (YY_CURRENT_BUFFER)
+		yyg->yy_buffer_stack_top++;
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+	/* copied from FASTQ__switch_to_buffer. */
+	FASTQ__load_buffer_state(yyscanner );
+	yyg->yy_did_buffer_switch_on_eof = 1;
+}
+/* %endif */
+
+/* %if-c-or-c++ */
+/** Removes and deletes the top of the stack, if present.
+ *  The next element becomes the new top.
+ *  @param yyscanner The scanner object.
+ */
+/* %if-c-only */
+void FASTQ_pop_buffer_state (yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+	if (!YY_CURRENT_BUFFER)
+		return;
+
+	FASTQ__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
+	YY_CURRENT_BUFFER_LVALUE = NULL;
+	if (yyg->yy_buffer_stack_top > 0)
+		--yyg->yy_buffer_stack_top;
+
+	if (YY_CURRENT_BUFFER) {
+		FASTQ__load_buffer_state(yyscanner );
+		yyg->yy_did_buffer_switch_on_eof = 1;
+	}
+}
+/* %endif */
+
+/* %if-c-or-c++ */
+/* Allocates the stack if it does not exist.
+ *  Guarantees space for at least one push.
+ */
+/* %if-c-only */
+static void FASTQ_ensure_buffer_stack (yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+	int num_to_alloc;
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+	if (!yyg->yy_buffer_stack) {
+
+		/* First allocation is just for 2 elements, since we don't know if this
+		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
+		 * immediate realloc on the next call.
+         */
+		num_to_alloc = 1;
+		yyg->yy_buffer_stack = (struct yy_buffer_state**)FASTQ_alloc
+								(num_to_alloc * sizeof(struct yy_buffer_state*)
+								, yyscanner);
+		if ( ! yyg->yy_buffer_stack )
+			YY_FATAL_ERROR( "out of dynamic memory in FASTQ_ensure_buffer_stack()" );
+								  
+		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+				
+		yyg->yy_buffer_stack_max = num_to_alloc;
+		yyg->yy_buffer_stack_top = 0;
+		return;
+	}
+
+	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
+
+		/* Increase the buffer to prepare for a possible push. */
+		int grow_size = 8 /* arbitrary grow size */;
+
+		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
+		yyg->yy_buffer_stack = (struct yy_buffer_state**)FASTQ_realloc
+								(yyg->yy_buffer_stack,
+								num_to_alloc * sizeof(struct yy_buffer_state*)
+								, yyscanner);
+		if ( ! yyg->yy_buffer_stack )
+			YY_FATAL_ERROR( "out of dynamic memory in FASTQ_ensure_buffer_stack()" );
+
+		/* zero only the new slots.*/
+		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
+		yyg->yy_buffer_stack_max = num_to_alloc;
+	}
+}
+/* %endif */
+
+/* %if-c-only */
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ * @param yyscanner The scanner object.
+ * @return the newly allocated buffer state object. 
+ */
+YY_BUFFER_STATE FASTQ__scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
+{
+	YY_BUFFER_STATE b;
+    
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) FASTQ_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in FASTQ__scan_buffer()" );
+
+	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->yy_buf_pos = b->yy_ch_buf = base;
+	b->yy_is_our_buffer = 0;
+	b->yy_input_file = 0;
+	b->yy_n_chars = b->yy_buf_size;
+	b->yy_is_interactive = 0;
+	b->yy_at_bol = 1;
+	b->yy_fill_buffer = 0;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	FASTQ__switch_to_buffer(b ,yyscanner );
+
+	return b;
+}
+/* %endif */
+
+/* %if-c-only */
+/** Setup the input buffer state to scan a string. The next call to FASTQ_lex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ * @param yyscanner The scanner object.
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ *       FASTQ__scan_bytes() instead.
+ */
+YY_BUFFER_STATE FASTQ__scan_string (yyconst char * yystr , yyscan_t yyscanner)
+{
+    
+	return FASTQ__scan_bytes(yystr,strlen(yystr) ,yyscanner);
+}
+/* %endif */
+
+/* %if-c-only */
+/** Setup the input buffer state to scan the given bytes. The next call to FASTQ_lex() will
+ * scan from a @e copy of @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yyscanner The scanner object.
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE FASTQ__scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
+{
+	YY_BUFFER_STATE b;
+	char *buf;
+	yy_size_t n;
+	int i;
+    
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = _yybytes_len + 2;
+	buf = (char *) FASTQ_alloc(n ,yyscanner );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in FASTQ__scan_bytes()" );
+
+	for ( i = 0; i < _yybytes_len; ++i )
+		buf[i] = yybytes[i];
+
+	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = FASTQ__scan_buffer(buf,n ,yyscanner);
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in FASTQ__scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->yy_is_our_buffer = 1;
+
+	return b;
+}
+/* %endif */
+
+/* %if-c-only */
+    static void yy_push_state (int  new_state , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+	if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth )
+		{
+		yy_size_t new_size;
+
+		yyg->yy_start_stack_depth += YY_START_STACK_INCR;
+		new_size = yyg->yy_start_stack_depth * sizeof( int );
+
+		if ( ! yyg->yy_start_stack )
+			yyg->yy_start_stack = (int *) FASTQ_alloc(new_size ,yyscanner );
+
+		else
+			yyg->yy_start_stack = (int *) FASTQ_realloc((void *) yyg->yy_start_stack,new_size ,yyscanner );
+
+		if ( ! yyg->yy_start_stack )
+			YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
+		}
+
+	yyg->yy_start_stack[yyg->yy_start_stack_ptr++] = YY_START;
+
+	BEGIN(new_state);
+}
+
+/* %if-c-only */
+    static void yy_pop_state  (yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+	if ( --yyg->yy_start_stack_ptr < 0 )
+		YY_FATAL_ERROR( "start-condition stack underflow" );
+
+	BEGIN(yyg->yy_start_stack[yyg->yy_start_stack_ptr]);
+}
+
+/* %if-c-only */
+    static int yy_top_state  (yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+	return yyg->yy_start_stack[yyg->yy_start_stack_ptr - 1];
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+/* %if-c-only */
+static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
+{
+    	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+}
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+		yytext[yyleng] = yyg->yy_hold_char; \
+		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
+		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
+		*yyg->yy_c_buf_p = '\0'; \
+		yyleng = yyless_macro_arg; \
+		} \
+	while ( 0 )
+
+/* Accessor  methods (get/set functions) to struct members. */
+
+/* %if-c-only */
+/* %if-reentrant */
+
+/** Get the user-defined data for this scanner.
+ * @param yyscanner The scanner object.
+ */
+YY_EXTRA_TYPE FASTQ_get_extra  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    return yyextra;
+}
+
+/* %endif */
+
+/** Get the current line number.
+ * @param yyscanner The scanner object.
+ */
+int FASTQ_get_lineno  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    
+        if (! YY_CURRENT_BUFFER)
+            return 0;
+    
+    return yylineno;
+}
+
+/** Get the current column number.
+ * @param yyscanner The scanner object.
+ */
+int FASTQ_get_column  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    
+        if (! YY_CURRENT_BUFFER)
+            return 0;
+    
+    return yycolumn;
+}
+
+/** Get the input stream.
+ * @param yyscanner The scanner object.
+ */
+FILE *FASTQ_get_in  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    return yyin;
+}
+
+/** Get the output stream.
+ * @param yyscanner The scanner object.
+ */
+FILE *FASTQ_get_out  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    return yyout;
+}
+
+/** Get the length of the current token.
+ * @param yyscanner The scanner object.
+ */
+int FASTQ_get_leng  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    return yyleng;
+}
+
+/** Get the current token.
+ * @param yyscanner The scanner object.
+ */
+
+char *FASTQ_get_text  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    return yytext;
+}
+
+/* %if-reentrant */
+
+/** Set the user-defined data. This data is never touched by the scanner.
+ * @param user_defined The data to be associated with this scanner.
+ * @param yyscanner The scanner object.
+ */
+void FASTQ_set_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    yyextra = user_defined ;
+}
+
+/* %endif */
+
+/** Set the current line number.
+ * @param line_number
+ * @param yyscanner The scanner object.
+ */
+void FASTQ_set_lineno (int  line_number , yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+        /* lineno is only valid if an input buffer exists. */
+        if (! YY_CURRENT_BUFFER )
+           yy_fatal_error( "FASTQ_set_lineno called with no buffer" , yyscanner); 
+    
+    yylineno = line_number;
+}
+
+/** Set the current column.
+ * @param line_number
+ * @param yyscanner The scanner object.
+ */
+void FASTQ_set_column (int  column_no , yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+        /* column is only valid if an input buffer exists. */
+        if (! YY_CURRENT_BUFFER )
+           yy_fatal_error( "FASTQ_set_column called with no buffer" , yyscanner); 
+    
+    yycolumn = column_no;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ * @param yyscanner The scanner object.
+ * @see FASTQ__switch_to_buffer
+ */
+void FASTQ_set_in (FILE *  in_str , yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    yyin = in_str ;
+}
+
+void FASTQ_set_out (FILE *  out_str , yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    yyout = out_str ;
+}
+
+int FASTQ_get_debug  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    return yy_flex_debug;
+}
+
+void FASTQ_set_debug (int  bdebug , yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    yy_flex_debug = bdebug ;
+}
+
+/* %endif */
+
+/* %if-reentrant */
+/* Accessor methods for yylval and yylloc */
+
+/* %if-bison-bridge */
+
+YYSTYPE * FASTQ_get_lval  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    return yylval;
+}
+
+void FASTQ_set_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    yylval = yylval_param;
+}
+
+/* %endif */
+
+/* User-visible API */
+
+/* FASTQ_lex_init is special because it creates the scanner itself, so it is
+ * the ONLY reentrant function that doesn't take the scanner as the last argument.
+ * That's why we explicitly handle the declaration, instead of using our macros.
+ */
+
+int FASTQ_lex_init(yyscan_t* ptr_yy_globals)
+
+{
+    if (ptr_yy_globals == NULL){
+        errno = EINVAL;
+        return 1;
+    }
+
+    *ptr_yy_globals = (yyscan_t) FASTQ_alloc ( sizeof( struct yyguts_t ), NULL );
+
+    if (*ptr_yy_globals == NULL){
+        errno = ENOMEM;
+        return 1;
+    }
+
+    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
+    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+
+    return yy_init_globals ( *ptr_yy_globals );
+}
+
+/* FASTQ_lex_init_extra has the same functionality as FASTQ_lex_init, but follows the
+ * convention of taking the scanner as the last argument. Note however, that
+ * this is a *pointer* to a scanner, as it will be allocated by this call (and
+ * is the reason, too, why this function also must handle its own declaration).
+ * The user defined value in the first argument will be available to FASTQ_alloc in
+ * the yyextra field.
+ */
+
+int FASTQ_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
+
+{
+    struct yyguts_t dummy_yyguts;
+
+    FASTQ_set_extra (yy_user_defined, &dummy_yyguts);
+
+    if (ptr_yy_globals == NULL){
+        errno = EINVAL;
+        return 1;
+    }
+	
+    *ptr_yy_globals = (yyscan_t) FASTQ_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
+	
+    if (*ptr_yy_globals == NULL){
+        errno = ENOMEM;
+        return 1;
+    }
+    
+    /* By setting to 0xAA, we expose bugs in
+    yy_init_globals. Leave at 0x00 for releases. */
+    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+    
+    FASTQ_set_extra (yy_user_defined, *ptr_yy_globals);
+    
+    return yy_init_globals ( *ptr_yy_globals );
+}
+
+/* %endif if-c-only */
+
+/* %if-c-only */
+static int yy_init_globals (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    /* Initialization is the same as for the non-reentrant scanner.
+     * This function is called from FASTQ_lex_destroy(), so don't allocate here.
+     */
+
+    yyg->yy_buffer_stack = 0;
+    yyg->yy_buffer_stack_top = 0;
+    yyg->yy_buffer_stack_max = 0;
+    yyg->yy_c_buf_p = (char *) 0;
+    yyg->yy_init = 0;
+    yyg->yy_start = 0;
+
+    yyg->yy_start_stack_ptr = 0;
+    yyg->yy_start_stack_depth = 0;
+    yyg->yy_start_stack =  NULL;
+
+    yyg->yy_state_buf = 0;
+    yyg->yy_state_ptr = 0;
+    yyg->yy_full_match = 0;
+    yyg->yy_lp = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+    yyin = stdin;
+    yyout = stdout;
+#else
+    yyin = (FILE *) 0;
+    yyout = (FILE *) 0;
+#endif
+
+    /* For future reference: Set errno on error, since we are called by
+     * FASTQ_lex_init()
+     */
+    return 0;
+}
+/* %endif */
+
+/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
+/* FASTQ_lex_destroy is for both reentrant and non-reentrant scanners. */
+int FASTQ_lex_destroy  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+    /* Pop the buffer stack, destroying each element. */
+	while(YY_CURRENT_BUFFER){
+		FASTQ__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
+		YY_CURRENT_BUFFER_LVALUE = NULL;
+		FASTQ_pop_buffer_state(yyscanner);
+	}
+
+	/* Destroy the stack itself. */
+	FASTQ_free(yyg->yy_buffer_stack ,yyscanner);
+	yyg->yy_buffer_stack = NULL;
+
+    /* Destroy the start condition stack. */
+        FASTQ_free(yyg->yy_start_stack ,yyscanner );
+        yyg->yy_start_stack = NULL;
+
+    FASTQ_free ( yyg->yy_state_buf , yyscanner);
+    yyg->yy_state_buf  = NULL;
+
+    /* Reset the globals. This is important in a non-reentrant scanner so the next time
+     * FASTQ_lex() is called, initialization will occur. */
+    yy_init_globals( yyscanner);
+
+/* %if-reentrant */
+    /* Destroy the main struct (reentrant only). */
+    FASTQ_free ( yyscanner , yyscanner );
+    yyscanner = NULL;
+/* %endif */
+    return 0;
+}
+/* %endif */
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
+{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
+{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+}
+#endif
+
+void *FASTQ_alloc (yy_size_t  size , yyscan_t yyscanner)
+{
+	return (void *) malloc( size );
+}
+
+void *FASTQ_realloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
+{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+}
+
+void FASTQ_free (void * ptr , yyscan_t yyscanner)
+{
+	free( (char *) ptr );	/* see FASTQ_realloc() for (char *) cast */
+}
+
+/* %if-tables-serialization definitions */
+/* %define-yytables   The name for this specific scanner's tables. */
+#define YYTABLES_NAME "yytables"
+/* %endif */
+
+/* %ok-for-header */
+
+
+
+
+rc_t CC FASTQScan_yylex_init(FASTQParseBlock* sb, bool debug)
+{
+    if (FASTQ_lex_init_extra(sb,&sb->scanner) != 0)
+    {
+        return RC ( rcApp, rcFile, rcParsing, rcMemory, rcExhausted );
+    }       
+
+    sb->length = 0;
+    sb->lastToken = NULL;
+    sb->record = NULL;
+    sb->column = 1;
+     
+    sb->expectedQualityLines = 0;
+    
+    FASTQ_set_debug(debug ? 1 : 0,sb->scanner);
+
+    yy_push_state(INITIAL, sb->scanner);
+    
+    return 0;
+}
+
+void CC FASTQScan_yylex_destroy(FASTQParseBlock* sb)
+{
+    if (sb->scanner)
+    {
+        FASTQ_lex_destroy(sb->scanner);
+    }       
+    sb->scanner=0;
+}
+
+void CC FASTQScan_inline_sequence(FASTQParseBlock* pb) 
+{
+    yy_pop_state(pb->scanner);
+    yy_push_state(INLINE_SEQUENCE, pb->scanner);
+}
+
+void CC FASTQScan_inline_quality(FASTQParseBlock* pb)
+{
+    yy_pop_state(pb->scanner);
+    yy_push_state(INLINE_QUALITY, pb->scanner);
+}
+
+void CC FASTQScan_skip_to_eol(FASTQParseBlock* pb)
+{
+    struct yyguts_t* yyg = (struct yyguts_t*)pb->scanner;
+    if ( yytext[0] != '\n' && yytext[0] != '\r' ) /* not at an EOL already */
+    {
+        yy_push_state(SKIP_TO_EOL, pb->scanner);
+    }
+}
+
+void CC FASTQ_unlex(FASTQParseBlock* pb, FASTQToken* token)
+{
+    size_t i;
+    struct yyguts_t* yyg = (struct yyguts_t*)pb->scanner;
+    for (i = 0; i < token->tokenLength; ++i)
+    {
+        yyunput(TokenTextPtr(pb, token)[token->tokenLength - 1 - i], yyg->yytext_r, pb->scanner);
+    }
+    yyextra -> column -= token->tokenLength; 
+    yyextra -> length -= token->tokenLength; 
+	KDataBufferResize( & pb->record->source, KDataBufferBytes( & pb->record->source ) - token->tokenLength );
+}
+
+void FASTQ_fatal_error(yyconst char* msg)
+{
+    rc_t rc = RC ( rcApp, rcFile, rcParsing, rcError, rcUnexpected );
+    if (strcmp(msg, "input buffer overflow, can't enlarge buffer because scanner uses REJECT") == 0)
+        pLogErr(klogErr, rc, "line is too long (maximum line length = $(B) bytes)", "B=%d", YY_BUF_SIZE);
+    else
+        LogErr(klogErr, rc, msg);
+    exit(rc);  
+}
+
+void ConsumeToken(FASTQToken* token, FASTQParseBlock* pb)
+{
+    struct yyguts_t* yyg = (struct yyguts_t*)pb->scanner;
+	
+	token -> tokenStart = KDataBufferBytes( & pb->record->source );
+	token -> tokenLength   = yyleng;   
+	token -> line_no       = yylineno; 
+	token -> column_no     = pb -> column; 
+	
+	KDataBufferResize( & pb->record->source, KDataBufferBytes( & pb->record->source ) + token->tokenLength );
+	strncpy((char*)TokenTextPtr(pb, token), yytext, token->tokenLength);
+    
+	pb -> column += token->tokenLength; 
+	pb -> length += token->tokenLength; 
+	pb -> lastToken = token; 
+}
diff --git a/tools/fastq-loader/fastq-lex.l b/tools/fastq-loader/fastq-lex.l
new file mode 100644
index 0000000..fee3135
--- /dev/null
+++ b/tools/fastq-loader/fastq-lex.l
@@ -0,0 +1,256 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+ 
+%{ 
+    #include <sysalloc.h>   
+    #include <ctype.h>
+    
+    #include <klib/rc.h>
+    #include <klib/log.h>
+
+    #include "fastq-parse.h"
+    #include "fastq-tokens.h"    
+    
+    #define YYSTYPE FASTQToken
+
+    /* code to populate token with internal values */
+	static void ConsumeToken(FASTQToken* token, FASTQParseBlock* pb);
+    #define YY_USER_ACTION ConsumeToken(yylval, yyextra);
+	
+    #define ENDLINE \
+        yyextra -> column=1;\
+        return fqENDLINE;
+
+    #define YY_INPUT(buf, result, max_size) \
+        result = yyextra->input(yyextra, buf, max_size)
+
+    #define ECHO
+
+    static void FASTQ_fatal_error(yyconst char* msg);
+    #define YY_FATAL_ERROR(msg) FASTQ_fatal_error(msg)
+    
+%}
+
+%option never-interactive nounistd yylineno reentrant bison-bridge stack noyywrap
+
+%option prefix="FASTQ_"
+%option extra-type="FASTQParseBlock*"
+
+ /*%option debug*/
+
+%x TAG_LINE
+%x SEE_COORDS
+%x PAST_COORDS
+%x READ_NUMBER
+%x NAMEVALUE
+%x IN_SEQUENCE
+%x QTAG_LINE
+%x IN_QUALITY
+%x INLINE_SEQUENCE
+%x INLINE_QUALITY
+%x SKIP_TO_EOL
+
+ws          [ \t]+
+digits      [0-9]+
+alphanum    [A-Za-z0-9\-]+
+eol         (\r\n|\r|\n)
+
+/* there are more: =ACMGRSVTWYHKDBN. plus lowercase */
+base [ACGTacgtNn.]   
+cskey [ACGTacgt]
+color   [0-3.]
+
+ascqual   [\x0E-\x1F \x21-\x7F]+
+
+%%
+
+^@                              { BEGIN TAG_LINE; return yytext[0]; }
+^>                              { BEGIN TAG_LINE; return yytext[0]; }
+
+^\+                             { BEGIN QTAG_LINE; return yytext[0]; }
+
+<INITIAL,TAG_LINE>
+{
+    :{digits}:{digits}:{digits}:{digits}                    { return fqCOORDS; }
+    [SDE]RR{digits}\.{digits}   { return fqRUNDOTSPOT; } 
+    #[A-Za-z0-9\-_]*            { return fqSPOTGROUP; }
+    {digits}                    { return fqNUMBER; }
+    {alphanum}                  { return fqALPHANUM; }
+    {ws}                        { return fqWS; }
+    ^{base}+/{eol}              { return fqBASESEQ; }
+    ^{cskey}{color}+/{eol}      { return fqCOLORSEQ; }
+    .                           { return yytext[0]; }
+}
+
+<TAG_LINE>[ \t]*{eol}           { BEGIN IN_SEQUENCE; ENDLINE; } 
+
+<IN_SEQUENCE>
+{
+    ^{base}+/{eol}              { BEGIN 0; return fqBASESEQ; }
+    ^{cskey}{color}+/{eol}      { BEGIN 0; return fqCOLORSEQ; }
+    ^{ascqual}/{eol}            { BEGIN 0; return fqASCQUAL; }
+    ^.*$                        { BEGIN 0; return fqUNRECOGNIZED; }
+}
+  
+<INLINE_SEQUENCE>
+{
+    {base}+                     { BEGIN 0; return fqBASESEQ; }
+    {cskey}{color}+             { BEGIN 0; return fqCOLORSEQ; }
+    {digits}                    { BEGIN 0; return fqNUMBER; }
+    {eol}                       { BEGIN 0; ENDLINE; }
+}
+
+<QTAG_LINE>
+{
+    .+$                         { return fqTOKEN; /* do not bother to parse the inside of the line */ }
+    {eol}                       { BEGIN IN_QUALITY; ENDLINE }
+}
+
+<IN_QUALITY,INLINE_QUALITY>
+{
+    {ws}                        { } 
+}
+
+<IN_QUALITY>
+{
+    ^{ascqual}/{eol}            { return fqASCQUAL; }
+    {eol}                       {   /* if read was split across several lines, expect the same number of lines in quality */
+                                    if (yyextra->expectedQualityLines <= 1) 
+                                        BEGIN 0; 
+                                    else 
+                                        --yyextra->expectedQualityLines;
+                                    ENDLINE; 
+                                }
+    .                           { return yytext[0]; }
+}
+
+<INLINE_QUALITY>
+{
+    {ascqual}/{eol}             { return fqASCQUAL; }
+    {eol}                       { BEGIN 0; ENDLINE; }
+    .                           { return yytext[0]; }
+}
+
+<SKIP_TO_EOL>
+{
+    .*{eol}                     { BEGIN 0; ENDLINE; }
+    .*                          { BEGIN 0; return fqENDOFTEXT; }
+}
+    
+{eol}                           { ENDLINE; }
+
+%%    
+
+rc_t CC FASTQScan_yylex_init(FASTQParseBlock* sb, bool debug)
+{
+    if (yylex_init_extra(sb, &sb->scanner) != 0)
+    {
+        return RC ( rcApp, rcFile, rcParsing, rcMemory, rcExhausted );
+    }       
+
+    sb->length = 0;
+    sb->lastToken = NULL;
+    sb->record = NULL;
+    sb->column = 1;
+     
+    sb->expectedQualityLines = 0;
+    
+    yyset_debug(debug ? 1 : 0, sb->scanner);
+
+    yy_push_state(INITIAL, sb->scanner);
+    
+    return 0;
+}
+
+void CC FASTQScan_yylex_destroy(FASTQParseBlock* sb)
+{
+    if (sb->scanner)
+    {
+        yylex_destroy(sb->scanner);
+    }       
+    sb->scanner=0;
+}
+
+void CC FASTQScan_inline_sequence(FASTQParseBlock* pb) 
+{
+    yy_pop_state(pb->scanner);
+    yy_push_state(INLINE_SEQUENCE, pb->scanner);
+}
+
+void CC FASTQScan_inline_quality(FASTQParseBlock* pb)
+{
+    yy_pop_state(pb->scanner);
+    yy_push_state(INLINE_QUALITY, pb->scanner);
+}
+
+void CC FASTQScan_skip_to_eol(FASTQParseBlock* pb)
+{
+    struct yyguts_t* yyg = (struct yyguts_t*)pb->scanner;
+    if ( yytext[0] != '\n' && yytext[0] != '\r' ) /* not at an EOL already */
+    {
+        yy_push_state(SKIP_TO_EOL, pb->scanner);
+    }
+}
+
+void CC FASTQ_unlex(FASTQParseBlock* pb, FASTQToken* token)
+{
+    size_t i;
+    struct yyguts_t* yyg = (struct yyguts_t*)pb->scanner;
+    for (i = 0; i < token->tokenLength; ++i)
+    {
+        yyunput(TokenTextPtr(pb, token)[token->tokenLength - 1 - i], yyg->yytext_r, pb->scanner);
+    }
+    yyextra -> column -= token->tokenLength; 
+    yyextra -> length -= token->tokenLength; 
+	KDataBufferResize( & pb->record->source, KDataBufferBytes( & pb->record->source ) - token->tokenLength );
+}
+
+void FASTQ_fatal_error(yyconst char* msg)
+{
+    rc_t rc = RC ( rcApp, rcFile, rcParsing, rcError, rcUnexpected );
+    if (strcmp(msg, "input buffer overflow, can't enlarge buffer because scanner uses REJECT") == 0)
+        pLogErr(klogErr, rc, "line is too long (maximum line length = $(B) bytes)", "B=%d", YY_BUF_SIZE);
+    else
+        LogErr(klogErr, rc, msg);
+    exit(rc);  
+}
+
+void ConsumeToken(FASTQToken* token, FASTQParseBlock* pb)
+{
+    struct yyguts_t* yyg = (struct yyguts_t*)pb->scanner;
+	
+	token -> tokenStart = KDataBufferBytes( & pb->record->source );
+	token -> tokenLength   = yyleng;   
+	token -> line_no       = yylineno; 
+	token -> column_no     = pb -> column; 
+	
+	KDataBufferResize( & pb->record->source, KDataBufferBytes( & pb->record->source ) + token->tokenLength );
+	strncpy((char*)TokenTextPtr(pb, token), yytext, token->tokenLength);
+    
+	pb -> column += token->tokenLength; 
+	pb -> length += token->tokenLength; 
+	pb -> lastToken = token; 
+}
\ No newline at end of file
diff --git a/tools/fastq-loader/fastq-loader.c b/tools/fastq-loader/fastq-loader.c
new file mode 100644
index 0000000..43f3e7d
--- /dev/null
+++ b/tools/fastq-loader/fastq-loader.c
@@ -0,0 +1,626 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ * 
+ */
+
+#include <sysalloc.h>
+
+#include <string.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <ctype.h>
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/rc.h>
+#include <klib/out.h>
+#include <klib/log.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <kapp/log-xml.h>
+#include <align/writer-refseq.h>
+#include <insdc/sra.h>
+#include <sra/sradb.h>
+#include "common-writer.h"
+
+#include "fastq-parse.h"
+
+extern rc_t run(char const argv0[], 
+                struct CommonWriterSettings* G,
+                unsigned countReads, 
+                const char* reads[],
+                enum FASTQQualityFormat qualityFormat,
+                const int8_t defaultReadNumbers[], 
+                bool ignoreSpotGroups);
+
+/* MARK: Arguments and Usage */
+static char const option_input[] = "input";
+static char const option_output[] = "output";
+static char const option_tmpfs[] = "tmpfs";
+static char const option_qual_compress[] = "qual-quant";
+static char const option_cache_size[] = "cache-size";
+static char const option_max_err_count[] = "max-err-count";
+static char const option_max_rec_count[] = "max-rec-count";
+static char const option_platform[] = "platform";
+static char const option_quality[] = "quality";
+static char const option_read[] = "read";
+static char const option_max_err_pct[] = "max-err-pct";
+static char const option_ignore_illumina_tags[] = "ignore-illumina-tags";
+
+#define OPTION_INPUT option_input
+#define OPTION_OUTPUT option_output
+#define OPTION_TMPFS option_tmpfs
+#define OPTION_QCOMP option_qual_compress
+#define OPTION_CACHE_SIZE option_cache_size
+#define OPTION_MAX_ERR_COUNT option_max_err_count
+#define OPTION_MAX_REC_COUNT option_max_rec_count
+#define OPTION_PLATFORM option_platform
+#define OPTION_QUALITY option_quality
+#define OPTION_READ option_read
+#define OPTION_MAX_ERR_PCT option_max_err_pct
+#define OPTION_IGNORE_ILLUMINA_TAGS option_ignore_illumina_tags
+
+#define ALIAS_INPUT  "i"
+#define ALIAS_OUTPUT "o"
+#define ALIAS_TMPFS "t"
+#define ALIAS_QCOMP "Q"
+#define ALIAS_MAX_ERR_COUNT "E"
+#define ALIAS_PLATFORM "p"
+#define ALIAS_READ "r"
+/* this alias is deprecated (conflicts with -q for --quiet): */
+#define ALIAS_QUALITY "q"
+
+static
+char const * output_usage[] = 
+{
+    "Path and Name of the output database.",
+    NULL
+};
+
+static
+char const * tmpfs_usage[] = 
+{
+    "Path to be used for scratch files.",
+    NULL
+};
+
+static
+char const * qcomp_usage[] = 
+{
+    "Quality scores quantization level, can be a number (0: none - default, 1: 2bit, 2: 1bit), or a string like '1:10,10:20,20:30,30:-' (which is equivalent to 1).",
+    NULL
+};
+
+static
+char const * cache_size_usage[] = 
+{
+    "Set the cache size in MB for the temporary indices",
+    NULL
+};
+
+static
+char const * mrc_usage[] = 
+{
+    "Set the maximum number of records to process from the FASTQ file",
+    NULL
+};
+
+static
+char const * mec_usage[] = 
+{
+    "Set the maximum number of errors to ignore from the FASTQ file",
+    NULL
+};
+
+static
+char const * use_platform[] = 
+{
+    "Platform (ILLUMINA, LS454, SOLID, COMPLETE_GENOMICS, HELICOS, PACBIO, IONTORRENT, CAPILLARY)",
+    NULL
+};
+
+static
+char const * use_quality[] = 
+{
+    "Quality encoding (PHRED_33, PHRED_64, LOGODDS)",
+    NULL
+};
+
+/*static
+char const * use_read[] = 
+{
+    "Default read number (1 or 2)",
+    NULL
+};*/
+
+static
+char const * use_max_err_pct[] = 
+{
+    "acceptable percentage of spots creation errors, default is 5",
+    NULL
+};
+
+static
+char const * use_ignore_illumina_tags[] = 
+{
+    "ignore barcodes contained in Illumina-formatted names",
+    NULL
+};
+
+OptDef Options[] = 
+{
+    /* order here is same as in param array below!!! */                                 /* max#,  needs param, required */
+    { OPTION_OUTPUT,                ALIAS_OUTPUT,           NULL, output_usage,             1,  true,        true },
+    { OPTION_TMPFS,                 ALIAS_TMPFS,            NULL, tmpfs_usage,              1,  true,        false },
+    { OPTION_QCOMP,                 ALIAS_QCOMP,            NULL, qcomp_usage,              1,  true,        false },
+    { OPTION_CACHE_SIZE,            NULL,                   NULL, cache_size_usage,         1,  true,        false },
+    { OPTION_MAX_REC_COUNT,         NULL,                   NULL, mrc_usage,                1,  true,        false },
+    { OPTION_MAX_ERR_COUNT,         ALIAS_MAX_ERR_COUNT,    NULL, mec_usage,                1,  true,        false },
+    { OPTION_PLATFORM,              ALIAS_PLATFORM,         NULL, use_platform,             1,  true,        false },
+    { OPTION_QUALITY,               ALIAS_QUALITY,          NULL, use_quality,              1,  true,        true },
+    { OPTION_MAX_ERR_PCT,           NULL,                   NULL, use_max_err_pct,          1,  true,        false },
+    { OPTION_IGNORE_ILLUMINA_TAGS,  NULL,                   NULL, use_ignore_illumina_tags, 1,  false,       false },
+/*    { OPTION_READ,          ALIAS_READ,             NULL, use_read,         0,  true,        false },*/
+};
+
+const char* OptHelpParam[] =
+{
+    /* order here is same as in OptDef array above!!! */
+    "path",
+    "path-to-file",
+    "phred-score",
+    "mbytes",
+    "count",
+    "count",
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+};
+
+rc_t UsageSummary (char const * progname)
+{
+    return KOutMsg (
+        "Usage:\n"
+        "\t%s [options] <fastq-file> ...\n"
+        "\n"
+        "Summary:\n"
+        "\tLoad FASTQ formatted data files\n"
+        "\n"
+        "Example:\n"
+        "\t%s -p 454 -o /tmp/SRZ123456 123456-1.fastq 123456-2.fastq\n"
+        "\n"
+        ,progname, progname);
+}
+
+char const UsageDefaultName[] = "fastq-load";
+
+rc_t CC Usage (const Args * args)
+{
+    rc_t rc;
+    int i;
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    const size_t argsQty = sizeof(Options) / sizeof(Options[0]);
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary (progname);
+
+    for(i = 0; i < argsQty; i++ ) {
+        if( Options[i].required && Options[i].help[0] != NULL ) {
+            HelpOptionLine(Options[i].aliases, Options[i].name, OptHelpParam[i], Options[i].help);
+        }
+    }
+    OUTMSG(("\nOptions:\n"));
+    for(i = 0; i < argsQty; i++ ) {
+        if( !Options[i].required && Options[i].help[0] != NULL ) {
+            HelpOptionLine(Options[i].aliases, Options[i].name, OptHelpParam[i], Options[i].help);
+        }
+    }
+    XMLLogger_Usage();
+    OUTMSG(("\n"));
+    HelpOptionsStandard ();
+    HelpVersion (fullpath, KAppVersion());
+    return rc;
+}
+
+/* MARK: Definitions and Globals */
+
+#define SCHEMAFILE "align/align.vschema"
+
+CommonWriterSettings G;
+
+#ifdef _WIN32
+#include <process.h>
+#else
+#include <unistd.h>
+#endif
+static void set_pid(void)
+{
+    G.pid = getpid();
+}
+
+static bool platform_cmp(char const platform[], char const test[])
+{
+    unsigned i;
+
+    for (i = 0; ; ++i) {
+        int ch1 = test[i];
+        int ch2 = toupper(platform[i]);
+        
+        if (ch1 != ch2)
+            break;
+        if (ch1 == 0)
+            return true;
+    }
+    return false;
+}
+
+static INSDC_SRA_platform_id PlatformToId(const char* name)
+{
+    if (name != NULL)
+    {
+        switch (toupper(name[0])) {
+        case 'C':
+            if (platform_cmp(name, "CAPILLARY"))
+                return SRA_PLATFORM_CAPILLARY;
+            if (platform_cmp(name, "COMPLETE GENOMICS") || platform_cmp(name, "COMPLETE_GENOMICS"))
+                return SRA_PLATFORM_COMPLETE_GENOMICS;
+            break;
+        case 'H':
+            if (platform_cmp(name, "HELICOS"))
+                return SRA_PLATFORM_HELICOS;
+            break;
+        case 'I':
+            if (platform_cmp(name, "ILLUMINA"))
+                return SRA_PLATFORM_ILLUMINA;
+            if (platform_cmp(name, "IONTORRENT"))
+                return SRA_PLATFORM_ION_TORRENT;
+            break;
+        case 'L':
+            if (platform_cmp(name, "LS454"))
+                return SRA_PLATFORM_454;
+            break;
+        case 'N':
+            if (platform_cmp(name, "NANOPORE"))
+                return SRA_PLATFORM_OXFORD_NANOPORE;
+            break;
+        case 'O':
+            if (platform_cmp(name, "OXFORD_NANOPORE"))
+                return SRA_PLATFORM_OXFORD_NANOPORE;
+            break;
+        case 'P':
+            if (platform_cmp(name, "PACBIO"))
+                return SRA_PLATFORM_PACBIO_SMRT;
+            break;
+        case 'S':
+            if (platform_cmp(name, "SOLID"))
+                return SRA_PLATFORM_ABSOLID;
+            if (platform_cmp(name, "SANGER"))
+                return SRA_PLATFORM_CAPILLARY;
+            break;
+        default:
+            break;
+        }
+    }
+    return SRA_PLATFORM_UNDEFINED;
+}
+
+static rc_t PathWithBasePath(char rslt[], size_t sz, char const path[], char const base[])
+{
+    size_t const plen = strlen(path);
+    bool const hasBase = base && base[0];
+    bool const isBareName = strchr(path, '/') == NULL;
+    
+    if (isBareName && hasBase) {
+        if (string_printf(rslt, sz, NULL, "%s/%s", base, path) == 0)
+            return 0;
+    }
+    else if ( string_copy ( rslt, sz, path, plen ) < sz )
+            return 0;
+
+    {
+        rc_t const rc = RC(rcApp, rcArgv, rcAccessing, rcBuffer, rcInsufficient);
+        (void)LOGERR(klogErr, rc, "The path to the file is too long");
+        return rc;
+    }
+}
+
+rc_t CC KMain (int argc, char * argv[])
+{
+    Args * args;
+    rc_t rc;
+    char *files[256];
+    int8_t defaultReadNumbers[256];
+    char *name_buffer = NULL;
+    size_t next_name = 0;
+    size_t nbsz = 0;
+    char const *value;
+    char *dummy;
+    const XMLLogger* xml_logger = NULL;
+    enum FASTQQualityFormat qualityFormat;
+    bool ignoreSpotGroups;
+    
+    memset(&G, 0, sizeof(G));
+    
+    G.mode = mode_Archive;
+    G.maxSeqLen = TableWriterRefSeq_MAX_SEQ_LEN;
+    G.schemaPath = SCHEMAFILE;
+    G.omit_aligned_reads = true;
+    G.omit_reference_reads = true;
+    G.minMapQual = 0; /* accept all */
+    G.tmpfs = "/tmp";
+#if _ARCH_BITS == 32
+    G.cache_size = ( size_t ) 1 << 30;
+#else
+    G.cache_size = ( size_t ) 10 << 30;
+#endif
+    G.maxErrCount = 1000;
+    G.maxErrPct = 5;
+    G.acceptNoMatch = true; 
+    G.minMatchCount = 0; 
+    G.QualQuantizer="0";
+    
+    set_pid();
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 2, Options,
+                            sizeof Options / sizeof (OptDef), XMLLogger_Args, XMLLogger_ArgsQty);
+
+    while (rc == 0) {
+        uint32_t pcount;
+
+        if( (rc = XMLLogger_Make(&xml_logger, NULL, args)) != 0 ) {
+            break;
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_TMPFS, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue (args, OPTION_TMPFS, 0, (const void **)&G.tmpfs);
+            if (rc)
+                break;
+        }
+        else if (pcount > 1)
+        {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcExcessive);
+            OUTMSG (("Single parameter required\n"));
+            MiniUsage (args);
+            break;
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_OUTPUT, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue (args, OPTION_OUTPUT, 0, (const void **)&G.outpath);
+            if (rc)
+                break;
+        }
+        else if (pcount > 1)
+        {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcExcessive);
+            OUTMSG (("Single output parameter required\n"));
+            MiniUsage (args);
+            break;
+        }
+        else {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcInsufficient);
+            OUTMSG (("Output parameter required\n"));
+            MiniUsage (args);
+            break;
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_QCOMP, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue (args, OPTION_QCOMP, 0, (const void **)&G.QualQuantizer);
+            if (rc)
+                break;
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_CACHE_SIZE, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue (args, OPTION_CACHE_SIZE, 0, (const void **)&value);
+            if (rc)
+                break;
+            G.cache_size = strtoul(value, &dummy, 0) * 1024UL * 1024UL;
+            if (G.cache_size == 0  || G.cache_size == ULONG_MAX) {
+                rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcIncorrect);
+                OUTMSG (("cache-size: bad value\n"));
+                MiniUsage (args);
+                break;
+            }
+        }
+        
+        G.expectUnsorted = true;
+        
+        rc = ArgsOptionCount (args, OPTION_MAX_REC_COUNT, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue (args, OPTION_MAX_REC_COUNT, 0, (const void **)&value);
+            if (rc)
+                break;
+            G.maxAlignCount = strtoul(value, &dummy, 0);
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_MAX_ERR_COUNT, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue (args, OPTION_MAX_ERR_COUNT, 0, (const void **)&value);
+            if (rc)
+                break;
+            G.maxErrCount = strtoul(value, &dummy, 0);
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_MAX_ERR_PCT, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue (args, OPTION_MAX_ERR_PCT, 0, (const void **)&value);
+            if (rc)
+                break;
+            G.maxErrPct = strtoul(value, &dummy, 0);
+        }
+        
+        rc = ArgsOptionCount (args, OPTION_PLATFORM, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue (args, OPTION_PLATFORM, 0, (const void **)&value);
+            if (rc)
+                break;
+            G.platform = PlatformToId(value);
+            if (G.platform == SRA_PLATFORM_UNDEFINED)
+            {
+                rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcIncorrect);
+                (void)PLOGERR(klogErr, (klogErr, rc, "Invalid platform $(v)",
+                            "v=%s", value));
+                break;
+            }
+        }
+        else
+            G.platform = SRA_PLATFORM_UNDEFINED;
+
+        rc = ArgsOptionCount (args, OPTION_QUALITY, &pcount);
+        if (rc)
+            break;
+        if (pcount == 1)
+        {
+            rc = ArgsOptionValue (args, OPTION_QUALITY, 0, (const void **)&value);
+            if (rc)
+                break;
+            if (strcmp(value, "PHRED_33") == 0)
+                qualityFormat = FASTQphred33;
+            else if (strcmp(value, "PHRED_64") == 0)
+                qualityFormat = FASTQphred64;
+            else if (strcmp(value, "LOGODDS") == 0)
+                qualityFormat = FASTQlogodds;
+            else
+            {
+                rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcIncorrect);
+                (void)PLOGERR(klogErr, (klogErr, rc, "Invalid quality encoding $(v)",
+                            "v=%s", value));
+                break;
+            }
+        }
+        else
+            qualityFormat = 0;
+            
+        rc = ArgsOptionCount (args, OPTION_IGNORE_ILLUMINA_TAGS, &pcount);
+        if (rc)
+            break;
+        ignoreSpotGroups = pcount > 0;
+        
+        rc = ArgsParamCount (args, &pcount);
+        if (rc) break;
+        if (pcount == 0)
+        {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcInsufficient);
+            MiniUsage (args);
+            break;
+        }
+        else if (pcount > sizeof(files)/sizeof(files[0])) {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcExcessive);
+            (void)PLOGERR(klogErr, (klogErr, rc, "$(count) input files is too many, $(max) is the limit",
+                        "count=%u,max=%u", (unsigned)pcount, (unsigned)(sizeof(files)/sizeof(files[0]))));
+            break;
+        }
+        else {
+            size_t need = G.inpath ? (strlen(G.inpath) + 1) * pcount : 0;
+            unsigned i;
+            
+            for (i = 0; i < pcount; ++i) {
+                rc = ArgsParamValue(args, i, (const void **)&value);
+                if (rc) break;
+                need += strlen(value) + 1;
+            }
+            nbsz = need;
+        }
+        
+        name_buffer = malloc(nbsz);
+        if (name_buffer == NULL) {
+            rc = RC(rcApp, rcArgv, rcAccessing, rcMemory, rcExhausted);
+            break;
+        }
+        
+        rc = ArgsParamCount (args, &pcount);
+        if (rc == 0) {
+            unsigned i;
+            
+            for (i = 0; i < pcount; ++i) {
+                rc = ArgsParamValue(args, i, (const void **)&value);
+                if (rc) break;
+
+                defaultReadNumbers[i] = 0;
+                files[i] = name_buffer + next_name;
+                rc = PathWithBasePath(name_buffer + next_name, nbsz - next_name, value, G.inpath);
+                if (rc) break;
+                next_name += strlen(name_buffer + next_name) + 1;
+            }
+        }
+        else
+            break;
+        
+        rc = run(argv[0], &G, pcount, (char const **)files, qualityFormat, defaultReadNumbers, ignoreSpotGroups);
+        break;
+    }
+    free(name_buffer);
+
+    value = G.outpath ? strrchr(G.outpath, '/') : "/???";
+    if( value == NULL ) {
+        value = G.outpath;
+    } else {
+        value++;
+    }
+    if (rc) {
+        (void)PLOGERR(klogErr, (klogErr, rc, "load failed",
+                "severity=total,status=failure,accession=%s,errors=%u", value, G.errCount));
+    } else {
+        (void)PLOGMSG(klogInfo, (klogInfo, "loaded",
+                "severity=total,status=success,accession=%s,errors=%u", value, G.errCount));
+    }
+    ArgsWhack(args);
+    XMLLogger_Release(xml_logger);
+    return rc;
+}
diff --git a/tools/fastq-loader/fastq-parse.h b/tools/fastq-loader/fastq-parse.h
new file mode 100644
index 0000000..79a6b76
--- /dev/null
+++ b/tools/fastq-loader/fastq-parse.h
@@ -0,0 +1,169 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_fastq_parse_
+#define _h_fastq_parse_
+
+#include <align/extern.h>
+#include <klib/text.h>
+
+#include <loader/common-reader-priv.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum FASTQQualityFormat
+{
+    FASTQunknown,
+    FASTQphred33,
+    FASTQphred64,
+    FASTQlogodds
+};
+
+struct FastqSequence
+{
+    Sequence_vt sequence_vt;
+    KRefcount   refcount;
+
+    /* tagline components: */
+    String spotname; /* tag line up to and including coordinates */
+    String spotgroup; /* token following '#' */
+    uint8_t readnumber; /* token following '/' 1 - IsFirst, 2 - IsSecond, 0 - dont know */
+
+    /* not populated at this time: */
+#if 0
+    String rungroup; 
+    String fmt_name; /* x and y replaced with $X and $Y */
+    uint8_t coord_num;
+    int32_t coords[16];
+#endif
+
+    /* read bases */
+    String read; 
+
+    bool is_colorspace;
+    
+    String  quality;
+    uint8_t qualityFormat; 
+    uint8_t qualityAsciiOffset;
+    
+    bool lowQuality;
+};
+
+struct FastqRecord
+{
+    Record  dad;
+
+    KDataBuffer source;
+    struct FastqSequence    seq;
+    Rejected*               rej; 
+};
+
+typedef struct FASTQToken
+{ 
+    size_t tokenStart;  /* offset into FASTQParseBlock.record->source */
+    size_t tokenLength;
+    size_t line_no;
+    size_t column_no;
+} FASTQToken;
+
+/* obtain a pointer to the token's text */
+#define TokenTextPtr(pb, token) ((const char*)((pb)->record->source.base) + (token)->tokenStart)
+
+typedef struct FASTQParseBlock
+{
+    void* self;
+    size_t (CC *input)(struct FASTQParseBlock* sb, char* buf, size_t max_size);
+    
+    /* inputs for the parser */
+    size_t  expectedQualityLines;
+    uint8_t qualityFormat; /* see enum FASTQQualityFormat above */
+    int8_t  defaultReadNumber; /* -1: never assign read numbers */
+
+    /*  Secondary (>1) read number observed previously (usually 2, sometimes 3). 
+        Once one is seen, do not allow any other values in the same input file. 
+        0 = has not seen one yet in this input. 
+        Always record as 2 */
+    uint8_t secondaryReadNumber; 
+    
+    bool ignoreSpotGroups;
+    
+    /* temporaries and outputs for the parser */
+    void* scanner;
+    size_t length; /* input characters consumed for the current record */
+    FASTQToken* lastToken;
+    struct FastqRecord* record;
+    size_t column;
+
+    /* all offsets are into record->source */
+    size_t spotNameOffset; 
+    size_t spotNameLength; 
+    size_t spotNameOffset_saved; /* sometimes needed to revert to older values */
+    size_t spotNameLength_saved; 
+    bool spotNameDone;
+    
+    size_t spotGroupOffset;
+    size_t spotGroupLength;
+    
+    size_t readOffset;
+    size_t readLength;
+    
+    size_t qualityOffset;
+    size_t qualityLength;
+    uint8_t qualityAsciiOffset; 
+    
+    bool fatalError;
+} FASTQParseBlock;
+
+extern rc_t FASTQScan_yylex_init(FASTQParseBlock* context, bool debug);
+extern void FASTQScan_yylex_destroy(FASTQParseBlock* context);
+
+/* explicit FLEX state control for bison*/
+extern void FASTQScan_inline_sequence(FASTQParseBlock* pb);
+extern void FASTQScan_inline_quality(FASTQParseBlock* pb);
+extern void FASTQScan_skip_to_eol(FASTQParseBlock* pb); /*the next token will be EOL or EOF*/
+
+extern void FASTQ_set_lineno (int line_number, void* scanner);
+
+extern int FASTQ_lex(FASTQToken* pb, void * scanner);
+extern void FASTQ_unlex(FASTQParseBlock* pb, FASTQToken* token);
+extern void FASTQ_qualityContext(FASTQParseBlock* pb);
+
+extern int FASTQ_debug; /* set to 1 to print Bison trace */ 
+
+extern int FASTQ_parse(FASTQParseBlock* pb); /* 0 = end of input, 1 = success, a new record is in context->record, 2 - syntax error */
+
+/* call before parsing every record (FASTQ_parse does so internally; this is for testing the parser) */
+extern void FASTQ_ParseBlockInit(FASTQParseBlock* pb); 
+
+extern void FASTQ_error(FASTQParseBlock* pb, const char* msg);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _h_fastq_parse_ */
diff --git a/tools/fastq-loader/fastq-reader.c b/tools/fastq-loader/fastq-reader.c
new file mode 100644
index 0000000..a90c292
--- /dev/null
+++ b/tools/fastq-loader/fastq-reader.c
@@ -0,0 +1,709 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct FastqReaderFile  FastqReaderFile;
+typedef struct FastqRecord      FastqRecord;
+typedef struct FastqSequence    FastqSequence;
+
+#define READERFILE_IMPL FastqReaderFile
+#define RECORD_IMPL     FastqRecord
+#define SEQUENCE_IMPL   FastqSequence
+
+#include "fastq-reader.h"
+#include "fastq-parse.h"
+
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+
+#include <kapp/loader-file.h>
+#include <kfs/directory.h>
+#include <klib/log.h>
+#include <klib/rc.h>
+
+static rc_t FastqSequenceInit(FastqSequence* self);
+
+/*--------------------------------------------------------------------------
+ * FastqRecord
+ */
+static rc_t FastqRecordAddRef   ( const FastqRecord* self );
+static rc_t FastqRecordRelease  ( const FastqRecord* self );
+static rc_t FastqRecordGetSequence  ( const FastqRecord* self, const Sequence** result);
+static rc_t FastqRecordGetAlignment ( const FastqRecord* self, const Alignment** result);
+static rc_t FastqRecordGetRejected  ( const FastqRecord* self, const Rejected** result);
+
+static Record_vt_v1 FastqRecord_vt = 
+{
+    1, 0, 
+    /* start minor version == 0 */
+    FastqRecordAddRef,
+    FastqRecordRelease,
+    FastqRecordGetSequence,
+    FastqRecordGetAlignment,
+    FastqRecordGetRejected,
+    /* end minor version == 0 */
+};
+
+static rc_t CC FastqRecordInit ( FastqRecord* self )
+{
+    assert(self);
+    self->dad.vt.v1 = & FastqRecord_vt; 
+    KDataBufferMakeBytes ( & self->source, 0 );
+    self->rej = 0;
+    return FastqSequenceInit(& self->seq);
+}
+
+static rc_t FastqRecordWhack( const FastqRecord* cself )
+{
+    rc_t rc = 0;
+    FastqRecord* self = (FastqRecord*)cself;
+    assert(self);
+    
+    rc = KDataBufferWhack( & self->source );
+    
+    if (rc)
+        RejectedRelease(self->rej);
+    else
+        rc = RejectedRelease(self->rej);
+        
+    free(self);    
+      
+    return rc;
+}
+
+static rc_t FastqRecordAddRef( const FastqRecord* self )
+{
+    assert(self);
+    KRefcountAdd( & self->seq.refcount, "FastqRecord" );
+    /* TODO: handle rc from KRefcountAdd */
+    return 0;
+}
+
+static rc_t FastqRecordRelease( const FastqRecord* cself )
+{
+    if ( cself != NULL )
+    {
+        FastqRecord *self = ( FastqRecord* ) cself;
+        switch ( KRefcountDrop ( & self ->seq.refcount, "FastqRecord" ) )
+        {
+        case krefWhack:
+            FastqRecordWhack( self );
+            break;
+        default:
+            /* TODO: handle other values */
+            break;
+        }
+    }
+    return 0;
+}
+
+static rc_t FastqRecordGetSequence( const FastqRecord* self, const Sequence** result )
+{
+    rc_t rc = 0;
+    assert(result);
+    *result = 0;
+    if (self->rej == 0)
+    {
+        rc = FastqRecordAddRef(self);
+        if (rc == 0)
+            *result = (const Sequence*) & self->seq;
+    }
+    return rc;
+}
+
+static rc_t FastqRecordGetAlignment( const FastqRecord* self, const Alignment** result)
+{
+    *result = 0;
+    return 0;
+}
+
+static rc_t FastqRecordGetRejected( const FastqRecord* self, const Rejected** result)
+{
+    rc_t rc = 0;
+    assert(result);
+    *result = 0;
+    if (self->rej != 0)
+    {
+        rc = RejectedAddRef(self->rej);
+        if (rc == 0)
+            *result = self->rej;
+    }
+    return rc;
+}
+
+/*--------------------------------------------------------------------------
+ * FastqSequence
+ */
+
+static rc_t FastqSequenceAddRef              ( const SEQUENCE_IMPL* self );
+static rc_t FastqSequenceRelease             ( const SEQUENCE_IMPL* self );
+static rc_t FastqSequenceGetReadLength       ( const SEQUENCE_IMPL *self, uint32_t *length );
+static rc_t FastqSequenceGetRead             ( const SEQUENCE_IMPL *self, char *sequence );
+static rc_t FastqSequenceGetRead2            ( const SEQUENCE_IMPL *self, char *sequence, uint32_t start, uint32_t stop );
+static rc_t FastqSequenceGetQuality          ( const SEQUENCE_IMPL *self, const int8_t **quality, uint8_t *offset, int *qualType );
+static rc_t FastqSequenceGetSpotGroup        ( const SEQUENCE_IMPL *self, const char **name, size_t *length );
+static rc_t FastqSequenceGetSpotName         ( const SEQUENCE_IMPL *self, const char **name, size_t *length );
+static bool FastqSequenceIsColorSpace        ( const SEQUENCE_IMPL *self );
+static rc_t FastqSequenceGetCSKey            ( const SEQUENCE_IMPL *self, char cskey[1] );
+static rc_t FastqSequenceGetCSReadLength     ( const SEQUENCE_IMPL *self, uint32_t *length );
+static rc_t FastqSequenceGetCSRead           ( const SEQUENCE_IMPL *self, char *sequence );
+static rc_t FastqSequenceGetCSQuality        ( const SEQUENCE_IMPL *self, const int8_t **quality, uint8_t *offset, int *qualType );
+static bool FastqSequenceRecordWasPaired     ( const SEQUENCE_IMPL *self );
+static int  FastqSequenceGetOrientationSelf  ( const SEQUENCE_IMPL *self );
+static int  FastqSequenceGetOrientationMate  ( const SEQUENCE_IMPL *self );
+static bool FastqSequenceRecordIsFirst       ( const SEQUENCE_IMPL *self );
+static bool FastqSequenceRecordIsSecond      ( const SEQUENCE_IMPL *self );
+static bool FastqSequenceIsDuplicate         ( const SEQUENCE_IMPL *self ); 
+static bool FastqSequenceIsLowQuality        ( const SEQUENCE_IMPL *self ); 
+static rc_t FastqSequenceGetTI               ( const SEQUENCE_IMPL *self, uint64_t *ti );
+
+static Sequence_vt_v1 FastqSequence_vt = 
+{
+    1, 0, 
+    /* start minor version == 0 */
+    FastqSequenceAddRef,
+    FastqSequenceRelease,
+    FastqSequenceGetReadLength,
+    FastqSequenceGetRead,
+    FastqSequenceGetRead2,
+    FastqSequenceGetQuality,
+    FastqSequenceGetSpotGroup,
+    FastqSequenceGetSpotName,
+    FastqSequenceIsColorSpace,
+    FastqSequenceGetCSKey,
+    FastqSequenceGetCSReadLength,
+    FastqSequenceGetCSRead,
+    FastqSequenceGetCSQuality,
+    FastqSequenceRecordWasPaired,
+    FastqSequenceGetOrientationSelf,
+    FastqSequenceGetOrientationMate,
+    FastqSequenceRecordIsFirst,
+    FastqSequenceRecordIsSecond,
+    FastqSequenceIsDuplicate,  
+    FastqSequenceIsLowQuality, 
+    FastqSequenceGetTI,        
+    /* end minor version == 0 */
+};
+
+static
+rc_t
+FastqSequenceInit(FastqSequence* self)
+{
+    self->sequence_vt.v1 = & FastqSequence_vt;
+    KRefcountInit ( & self -> refcount, 1, "FastqSequence", "FastqSequenceInit", "");
+
+    StringInit(&self->spotname, 0, 0, 0);
+    StringInit(&self->spotgroup, 0, 0, 0);
+    self->readnumber = 0; 
+    StringInit(&self->read, 0, 0, 0);
+    self->is_colorspace = false;
+    StringInit(&self->quality, 0, 0, 0);
+    self->qualityAsciiOffset = 0;
+    self->lowQuality = false;
+
+    return 0;
+}
+
+static const FastqRecord*
+FastqSequenceToRecord(const FastqSequence* seq) 
+{
+    return ( const FastqRecord * ) ( (uint8_t*)seq - offsetof ( FastqRecord, seq ) );
+}
+
+static rc_t FastqSequenceAddRef( const FastqSequence* self )
+{
+    switch (KRefcountAdd( & self->refcount, "FastqSequence" ))
+    {
+    case krefLimit:
+        return RC ( RC_MODULE, rcData, rcAttaching, rcRange, rcExcessive );
+    case krefNegative:
+        return RC ( RC_MODULE, rcData, rcAttaching, rcRefcount, rcInvalid );
+    }
+    return 0;
+}
+
+static rc_t FastqSequenceRelease( const FastqSequence* self )
+{
+    if ( self != NULL )
+    {
+        switch ( KRefcountDrop ( & self -> refcount, "FastqSequence" ) )
+        {
+        case krefWhack:
+            return FastqRecordWhack ( FastqSequenceToRecord(self) );
+
+        case krefNegative:
+            return RC ( RC_MODULE, rcData, rcDestroying, rcSelf, rcDestroyed );
+        }
+    }
+
+    return 0;
+
+}
+
+static rc_t FastqSequenceGetReadLength ( const FastqSequence *self, uint32_t *length )
+{
+    assert(self);
+    if ( self->is_colorspace )
+    {
+        *length = 0;
+    }
+    else
+    {
+        *length = self->read.len;
+    }
+    return 0;
+}
+
+static rc_t FastqSequenceGetRead ( const FastqSequence *self, char *sequence )
+{
+    assert(self);
+    assert(sequence);
+    if ( !self->is_colorspace )
+        string_copy(sequence, self->read.len, self->read.addr, self->read.len);
+    return 0;
+}
+
+static rc_t FastqSequenceGetRead2 ( const FastqSequence *self, char *sequence, uint32_t start, uint32_t stop )
+{
+    assert(self);
+    assert(sequence);
+    if ( self->is_colorspace )
+    {
+        return RC( RC_MODULE, rcData, rcAccessing, rcItem, rcEmpty );
+    }
+    else
+    {
+        uint32_t length = self->read.len;
+        if (start >= length || stop >= length || start >= stop)
+        {
+            return RC( RC_MODULE, rcData, rcAccessing, rcRange, rcInvalid);
+        }
+        string_copy(sequence, stop - start, self->read.addr + start, stop - start);
+    }
+    return 0;
+}
+
+static rc_t FastqSequenceGetQuality ( const FastqSequence *self, const int8_t **quality, uint8_t *offset, int *qualType )
+{
+    assert(self);
+    assert(quality);
+    assert(offset);
+    assert(qualType);
+    *quality = NULL;
+    if ( self->quality.size != 0)
+    {
+        uint32_t length = self->read.len;
+        if (self->quality.size != length)
+            return RC(rcAlign, rcRow, rcReading, rcData, rcInconsistent);
+            
+        *quality = (const int8_t *)self->quality.addr;
+        *offset = self->qualityAsciiOffset;
+    }
+    else
+    {
+        *quality = NULL;
+        *offset = 0;
+    }
+    if ( self->qualityFormat == FASTQlogodds )
+    {
+        *qualType = QT_LogOdds;
+    }
+    else
+    {
+        *qualType = QT_Phred;
+    }
+    return 0;
+}
+
+static rc_t FastqSequenceGetSpotGroup ( const FastqSequence *self, const char **name, size_t *length )
+{
+    assert(self);
+    assert(name);
+    *name = self->spotgroup.addr;
+    *length = self->spotgroup.len;
+    return 0;
+}
+
+static rc_t FastqSequenceGetSpotName ( const FastqSequence *self, const char **name, size_t *length )
+{
+    assert(self);
+    assert(name);
+    *name = self->spotname.addr;
+    *length = self->spotname.len;
+    return 0;
+}
+
+static bool FastqSequenceIsColorSpace ( const FastqSequence *self )
+{
+    assert(self);
+    return self->is_colorspace;
+}
+
+static rc_t FastqSequenceGetCSKey ( const FastqSequence *self, char cskey[1] )
+{
+    assert(self);
+    if (self->is_colorspace)
+        cskey[0] = self->read.addr[0];
+    return 0;
+}
+
+static rc_t FastqSequenceGetCSReadLength ( const FastqSequence *self, uint32_t *length )
+{
+    assert(self);
+    if (self->is_colorspace)
+        *length = self->read.len - 1;
+    return 0;
+}
+
+static rc_t FastqSequenceGetCSRead ( const FastqSequence *self, char *sequence )
+{
+    assert(self);
+    assert(sequence);
+    if ( self->is_colorspace )
+        string_copy(sequence, self->read.len - 1, self->read.addr + 1, self->read.len - 1);
+    return 0;
+}
+
+static rc_t FastqSequenceGetCSQuality ( const FastqSequence *self, const int8_t **quality, uint8_t *offset, int *qualType )
+{
+    assert(self);
+    assert(quality);
+    assert(offset);
+    assert(qualType);
+    *quality = NULL;
+    if ( self->quality.size != 0 && self->is_colorspace )
+    {
+        *quality = (const int8_t *)self->quality.addr + 1;
+        *offset = self->qualityAsciiOffset;
+    }
+    else
+    {
+        *quality = NULL;
+        *offset = 0;
+    }
+    *qualType = QT_Phred;
+    return 0;
+}
+
+static bool FastqSequenceRecordWasPaired ( const FastqSequence *self )
+{
+    assert(self);
+    return self->readnumber != 0;
+}
+
+static int FastqSequenceGetOrientationSelf ( const FastqSequence *self )
+{
+    assert(self);
+    return ReadOrientationUnknown;
+}
+
+static int FastqSequenceGetOrientationMate ( const FastqSequence *self )
+{
+    assert(self);
+    return ReadOrientationUnknown;
+}
+
+static bool FastqSequenceRecordIsFirst ( const FastqSequence *self )
+{
+    assert(self);
+    return self->readnumber == 1;
+}
+
+static bool FastqSequenceRecordIsSecond ( const FastqSequence *self )
+{
+    assert(self);
+    return self->readnumber == 2;
+}
+
+static bool FastqSequenceIsDuplicate         ( const SEQUENCE_IMPL *self )
+{
+    assert(self);
+    return 0;
+}
+
+static bool FastqSequenceIsLowQuality        ( const SEQUENCE_IMPL *self )
+{
+    assert(self);
+    return self->lowQuality;
+}
+
+static rc_t FastqSequenceGetTI               ( const SEQUENCE_IMPL *self, uint64_t *ti )
+{
+    assert(self);
+    return false;
+}
+
+/*--------------------------------------------------------------------------
+ * FastqReaderFile
+ */
+
+static rc_t FastqReaderFileWhack( READERFILE_IMPL* self );
+static rc_t FastqReaderFileGetRecord ( const READERFILE_IMPL *self, const Record** result );
+static float FastqReaderFileGetProportionalPosition ( const READERFILE_IMPL *self );
+static rc_t FastqReaderFileGetReferenceInfo ( const READERFILE_IMPL *self, const ReferenceInfo** result );
+
+static ReaderFile_vt_v1 FastqReaderFile_vt = 
+{
+    1, 0, 
+    /* start minor version == 0 */
+    FastqReaderFileWhack,
+    FastqReaderFileGetRecord,
+    FastqReaderFileGetProportionalPosition,
+    FastqReaderFileGetReferenceInfo,
+    /* end minor version == 0 */
+};
+
+struct FastqReaderFile
+{
+    ReaderFile dad;
+
+    FASTQParseBlock pb; 
+    const KLoaderFile* reader;
+
+    const char* recordStart; /* raw source of the record being currently parsed */
+    size_t curPos;           /* current tokenization position relative to recordStart */
+    bool lastEol;
+    bool eolInserted;
+};
+
+rc_t FastqReaderFileWhack( FastqReaderFile* f )
+{
+    FastqReaderFile* self = (FastqReaderFile*) f;
+
+    FASTQScan_yylex_destroy(& self->pb);
+
+    if (self->reader)
+        KLoaderFile_Release ( self->reader, true );
+
+    ReaderFileWhack( &self->dad );
+
+    free ( self );
+    return 0;
+}
+
+void FASTQ_ParseBlockInit ( FASTQParseBlock* pb )
+{
+    pb->length = 0;
+    pb->spotNameOffset = 0;
+    pb->spotNameLength = 0;
+    pb->spotNameDone = false;
+    pb->spotGroupOffset = 0;
+    pb->spotGroupLength = 0;
+    pb->readOffset = 0;
+    pb->readLength = 0;
+    pb->qualityOffset = 0;
+    pb->qualityLength = 0;
+}
+
+rc_t FastqReaderFileGetRecord ( const FastqReaderFile *f, const Record** result )
+{
+    rc_t rc;
+    FastqReaderFile* self = (FastqReaderFile*) f;
+    
+    if (self->pb.fatalError)
+        return 0;
+
+    self->pb.record = (FastqRecord*)malloc(sizeof(FastqRecord));
+    if (self->pb.record == NULL)
+    {
+        rc = RC ( RC_MODULE, rcData, rcAllocating, rcMemory, rcExhausted );
+        return 0;
+    }
+    rc = FastqRecordInit(self->pb.record);
+    if (rc != 0)
+        return rc;
+
+    FASTQ_ParseBlockInit( & self->pb );
+    
+    if ( FASTQ_parse( & self->pb ) == 0 && self->pb.record->rej == 0 )
+    {   /* normal end of input */
+        RecordRelease((const Record*)self->pb.record);
+        *result = 0;
+        return 0;
+    }
+    
+    /*TODO: remove? compensate for an artificially inserted trailing \n */
+    if ( self->eolInserted )
+    {
+        -- self->pb.length;
+        self->eolInserted = false;
+    }
+
+    if (self->pb.record->rej != 0) /* had error(s) */
+    {   /* save the complete raw source in the Rejected object */
+        StringInit(& self->pb.record->rej->source, string_dup(self->recordStart, self->pb.length), self->pb.length, (uint32_t)self->pb.length);
+        self->pb.record->rej->fatal = self->pb.fatalError;
+    }
+
+    if (rc == 0 && self->reader != 0)
+    {   
+        /* advance the record start pointer beyond the last token */ 
+        size_t length;
+        rc = KLoaderFile_Read( self->reader, self->pb.length, 0, (const void**)& self->recordStart, & length);
+        if (rc != 0)
+            LogErr(klogErr, rc, "FastqReaderFileGetRecord failed");
+
+        self->curPos -= self->pb.length;
+    }
+
+    StringInit( & self->pb.record->seq.spotname,    (const char*)self->pb.record->source.base + self->pb.spotNameOffset,    self->pb.spotNameLength, (uint32_t)self->pb.spotNameLength);
+    StringInit( & self->pb.record->seq.spotgroup,   (const char*)self->pb.record->source.base + self->pb.spotGroupOffset,   self->pb.spotGroupLength, (uint32_t)self->pb.spotGroupLength);
+    StringInit( & self->pb.record->seq.read,        (const char*)self->pb.record->source.base + self->pb.readOffset,        self->pb.readLength, (uint32_t)self->pb.readLength); 
+    StringInit( & self->pb.record->seq.quality,     (const char*)self->pb.record->source.base + self->pb.qualityOffset,     self->pb.qualityLength, (uint32_t)self->pb.qualityLength); 
+    self->pb.record->seq.qualityFormat = self->pb.qualityFormat;
+    self->pb.record->seq.qualityAsciiOffset = self->pb.qualityAsciiOffset;
+    
+    if (self->pb.record->seq.readnumber == 0)
+        self->pb.record->seq.readnumber = self->pb.defaultReadNumber;
+    
+    *result = (const Record*) self->pb.record;
+
+    return rc;
+}
+
+void CC FASTQ_error(struct FASTQParseBlock* sb, const char* msg)
+{
+    if (sb->record->rej == 0)
+    {   /* save the error information in the Rejected object */
+        sb->record->rej = (Rejected*)malloc(sizeof(Rejected));
+        RejectedInit(sb->record->rej);
+
+        sb->record->rej->message    = string_dup(msg, strlen(msg));
+        sb->record->rej->line       = sb->lastToken->line_no;
+        sb->record->rej->column     = sb->lastToken->column_no;
+    }
+    /* subsequent errors in this record will be ignored */
+}
+
+size_t CC FASTQ_input(FASTQParseBlock* pb, char* buf, size_t max_size)
+{
+    FastqReaderFile* self = (FastqReaderFile*)pb->self;
+    size_t length;
+
+    rc_t rc = KLoaderFile_Read( self->reader, 0, self->curPos + max_size, (const void**)& self->recordStart, & length);
+
+    if ( rc != 0 )
+    {
+        LogErr(klogErr, rc, "FASTQ_input failed");
+        return 0;
+    }
+    
+    length -= self->curPos;
+    if ( length == 0 ) /* nothing new read = end of file */
+    {   /* insert an additional \n before the end of file if missing */
+        if ( !self->lastEol )
+        {
+            buf[0] = '\n';
+            self->eolInserted = true;
+            self->lastEol = true;
+            return 1;
+        }
+        else
+        {   
+            return 0; /* signal EOF to flex */
+        }
+    }
+
+    memcpy(buf, self->recordStart + self->curPos, length);
+
+    self->lastEol = ( buf[length-1] == '\n' );
+    self->curPos += length;
+    
+    return length;
+}
+
+rc_t CC FastqReaderFileMake( const ReaderFile **reader, 
+                             const KDirectory* dir, 
+                             const char* file, 
+                             enum FASTQQualityFormat qualityFormat, 
+                             int8_t defaultReadNumber,
+                             bool ignoreSpotGroups)
+{
+    rc_t rc;
+    FastqReaderFile* self = (FastqReaderFile*) malloc ( sizeof * self );
+    if ( self == NULL )
+    {
+         rc = RC ( RC_MODULE, rcFileFormat, rcAllocating, rcMemory, rcExhausted );
+    }
+    else
+    {
+        memset(self, 0, sizeof(*self));
+        rc = ReaderFileInit ( self );
+        self->dad.vt.v1 = & FastqReaderFile_vt;
+
+        self->dad.pathname = string_dup(file, strlen(file)+1);
+        if ( self->dad.pathname == NULL )
+        {
+            rc = RC ( RC_MODULE, rcFileFormat, rcAllocating, rcMemory, rcExhausted );
+        }
+        else
+        {
+            rc = KLoaderFile_Make( & self->reader, dir, file, 0, true );
+        }
+        if (rc == 0)
+        {
+            self->pb.self = self;
+            self->pb.input = FASTQ_input;   
+            self->pb.qualityFormat = qualityFormat;
+            self->pb.defaultReadNumber = defaultReadNumber;
+            self->pb.secondaryReadNumber = 0;
+            self->pb.ignoreSpotGroups = ignoreSpotGroups;
+            
+            rc = FASTQScan_yylex_init(& self->pb, false); 
+            if (rc == 0)
+            {
+                *reader = (const ReaderFile *) self;
+            } 
+            else
+            {
+                KLoaderFile_Release( self->reader, true );
+                ReaderFileRelease( & self->dad );
+                *reader = 0;
+            }
+        }
+        else
+        {
+            ReaderFileRelease( & self->dad );
+            *reader = 0;
+        }
+    }
+ 
+    return rc;
+}
+
+float FastqReaderFileGetProportionalPosition ( const READERFILE_IMPL *self )
+{
+    return 0.0f;
+}
+
+rc_t FastqReaderFileGetReferenceInfo ( const READERFILE_IMPL *self, const ReferenceInfo** result )
+{
+    *result = NULL;
+    return 0;
+}
+
+
diff --git a/tools/fastq-loader/fastq-reader.h b/tools/fastq-loader/fastq-reader.h
new file mode 100644
index 0000000..758cac9
--- /dev/null
+++ b/tools/fastq-loader/fastq-reader.h
@@ -0,0 +1,57 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_fastq_reader_
+#define _h_fastq_reader_
+
+#ifndef _h_klib_defs_
+#include <klib/defs.h>
+#endif
+
+#include "fastq-parse.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct KDirectory;
+struct ReaderFile;
+
+rc_t CC FastqReaderFileMake( const struct ReaderFile **self, 
+                             const struct KDirectory* dir, 
+                             const char* file, 
+                             enum FASTQQualityFormat qualityFormat, 
+                             int8_t defaultReadNumber, 
+                             bool ignoreSpotGroups);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _h_fastq_reader_ */
diff --git a/tools/fastq-loader/fastq-tokens.h b/tools/fastq-loader/fastq-tokens.h
new file mode 100644
index 0000000..33745fe
--- /dev/null
+++ b/tools/fastq-loader/fastq-tokens.h
@@ -0,0 +1,67 @@
+/* A Bison parser, made by GNU Bison 2.5.  */
+
+/* Bison interface for Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989-1990, 2000-2011 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 3 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, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+   
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     fqENDOFTEXT = 0,
+     fqRUNDOTSPOT = 258,
+     fqSPOTGROUP = 259,
+     fqNUMBER = 260,
+     fqALPHANUM = 261,
+     fqWS = 262,
+     fqENDLINE = 263,
+     fqBASESEQ = 264,
+     fqCOLORSEQ = 265,
+     fqTOKEN = 266,
+     fqASCQUAL = 267,
+     fqCOORDS = 268,
+     fqUNRECOGNIZED = 269
+   };
+#endif
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+
+
diff --git a/tools/fastq-loader/loader-imp.c b/tools/fastq-loader/loader-imp.c
new file mode 100644
index 0000000..82998cc
--- /dev/null
+++ b/tools/fastq-loader/loader-imp.c
@@ -0,0 +1,256 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <string.h>
+ 
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include <kdb/btree.h>
+#include <kdb/meta.h>
+#include <kdb/manager.h>
+#include <kdb/database.h>
+
+#include <kapp/loader-meta.h>
+#include <kapp/main.h>
+
+#include <kfs/directory.h>
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/database.h>
+#include <vdb/vdb-priv.h>
+#include <insdc/sra.h>
+
+#include "common-reader.h"
+#include "common-writer.h"
+#include "sequence-writer.h"
+
+#include "fastq-reader.h"
+
+rc_t ArchiveFASTQ(CommonWriterSettings* G,
+                VDBManager *mgr, 
+                VDatabase *db,
+                unsigned seqFiles, 
+                char const *seqFile[], 
+                enum FASTQQualityFormat qualityFormat,
+                const int8_t defaultReadNumbers[],
+                bool ignoreSpotGroups)
+{
+    rc_t rc = 0;
+    unsigned i;
+    CommonWriter cw;
+
+    KDirectory *dir;
+    rc = KDirectoryNativeDir(&dir);    
+    if (rc != 0)
+        return rc;
+
+    rc = CommonWriterInit( &cw, mgr, db, G);
+    if (rc != 0)
+    {
+        KDirectoryRelease(dir);
+        return rc;
+    }
+    
+    for (i = 0; i < seqFiles; ++i) {
+        const ReaderFile *reader;
+        if (G->platform == SRA_PLATFORM_PACBIO_SMRT)  
+            rc = FastqReaderFileMake(&reader, dir, seqFile[i], FASTQphred33, -1, ignoreSpotGroups); 
+        else
+            rc = FastqReaderFileMake(&reader, dir, seqFile[i], qualityFormat, defaultReadNumbers[i], ignoreSpotGroups);
+        
+        if (rc == 0) 
+        {
+            rc = CommonWriterArchive( &cw, reader );
+            if (rc != 0) 
+                ReaderFileRelease(reader);
+            else
+                rc = ReaderFileRelease(reader);
+        }
+        if (rc != 0)
+            break;
+    }
+    if (rc == 0) {
+        bool const quitting = (Quitting() != 0);
+        rc = CommonWriterComplete(&cw, quitting, 0);
+    }
+    else
+        CommonWriterComplete( &cw, true, 0 );
+        
+    G->errCount = cw.err_count;
+        
+    if (rc == 0)
+        rc = CommonWriterWhack( &cw );
+    else
+        CommonWriterWhack( &cw );
+    
+    if (rc == 0)
+        rc = KDirectoryRelease(dir);
+    else
+        KDirectoryRelease(dir);
+        
+    if (rc == 0) {
+        (void)LOGMSG(klogInfo, "Successfully loaded all files");
+    }
+    return rc;
+}
+ 
+rc_t WriteLoaderSignature(KMetadata *meta, char const progName[])
+{
+    KMDataNode *node;
+    rc_t rc = KMetadataOpenNodeUpdate(meta, &node, "/");
+    
+    if (rc == 0) {
+        rc = KLoaderMeta_Write(node, progName, __DATE__, "FASTQ", KAppVersion());
+        KMDataNodeRelease(node);
+    }
+    if (rc) {
+        (void)LOGERR(klogErr, rc, "Cannot update loader meta");
+    }
+    return rc;
+}
+
+rc_t OpenPath(char const path[], KDirectory **dir)
+{
+    KDirectory *p;
+    rc_t rc = KDirectoryNativeDir(&p);
+    
+    if (rc == 0) {
+        rc = KDirectoryOpenDirUpdate(p, dir, false, "%s", path);
+        KDirectoryRelease(p);
+    }
+    return rc;
+}
+
+rc_t ConvertDatabaseToUnmapped(VDatabase* db)
+{
+    VTable* tbl;
+    rc_t rc = VDatabaseOpenTableUpdate(db, &tbl, "SEQUENCE");
+    if (rc == 0) 
+    {
+        rc = VTableRenameColumn(tbl, false, "CMP_ALTREAD", "ALTREAD");
+        if (rc == 0 || GetRCState(rc) == rcNotFound)
+            rc = VTableRenameColumn(tbl, false, "CMP_READ", "READ");
+/*        if (rc == 0 || GetRCState(rc) == rcNotFound)
+            rc = VTableRenameColumn(tbl, false, "CMP_ALTCSREAD", "ALTCSREAD");
+        if (rc == 0 || GetRCState(rc) == rcNotFound)
+            rc = VTableRenameColumn(tbl, false, "CMP_CSREAD", "CSREAD");*/
+        if (GetRCState(rc) == rcNotFound)
+            rc = 0;
+        rc = VTableRelease(tbl);
+    }
+    return rc;
+}
+
+rc_t run ( char const progName[], 
+           CommonWriterSettings* G, 
+           unsigned seqFiles, 
+           const char *seqFile[], 
+           uint8_t qualityOffset, 
+           const int8_t defaultReadNumbers[],
+           bool ignoreSpotGroups )
+{
+    VDBManager *mgr;
+    rc_t rc;
+    rc_t rc2;
+    char const *db_type = "NCBI:align:db:alignment_sorted"; 
+/*    char const *db_type = "NCBI:align:db:unaligned"; */
+    
+    rc = VDBManagerMakeUpdate(&mgr, NULL);
+    if (rc) {
+        (void)LOGERR (klogErr, rc, "failed to create VDB Manager!");
+    }
+    else {
+        VSchema *schema;
+
+        rc = VDBManagerMakeSchema(mgr, &schema);
+        if (rc) {
+            (void)LOGERR (klogErr, rc, "failed to create schema");
+        }
+        else {
+            (void)(rc = VSchemaAddIncludePath(schema, "%s", G->schemaIncludePath));
+            rc = VSchemaParseFile(schema, "%s", G->schemaPath);
+            if (rc) {
+                (void)PLOGERR(klogErr, (klogErr, rc, "failed to parse schema file $(file)", "file=%s", G->schemaPath));
+            }
+            else {
+                VDatabase *db;
+                
+                rc = VDBManagerCreateDB(mgr, &db, schema, db_type, kcmInit + kcmMD5, "%s", G->outpath);
+                rc2 = VSchemaRelease(schema);
+                if (rc2)
+                    (void)LOGERR(klogWarn, rc2, "Failed to release schema");
+                if (rc == 0)
+                    rc = rc2;
+                if (rc == 0) {
+                    rc = ArchiveFASTQ(G, mgr, db, seqFiles, seqFile, qualityOffset, defaultReadNumbers, ignoreSpotGroups);
+                }
+
+                if (rc == 0) {
+                    rc = ConvertDatabaseToUnmapped(db);
+                }
+
+                rc2 = VDatabaseRelease(db);
+                if (rc == 0)
+                {
+                    if (rc2)
+                        (void)LOGERR(klogWarn, rc2, "Failed to close database");
+                    rc = rc2;
+                }
+                
+                if (rc == 0) {
+                    KMetadata *meta;
+                    KDBManager *kmgr;
+                    
+                    rc = VDBManagerOpenKDBManagerUpdate(mgr, &kmgr);
+                    if (rc == 0) {
+                        KDatabase *kdb;
+                        
+                        rc = KDBManagerOpenDBUpdate(kmgr, &kdb, "%s", G->outpath);
+                        if (rc == 0) {
+                            rc = KDatabaseOpenMetadataUpdate(kdb, &meta);
+                            KDatabaseRelease(kdb);
+                        }
+                        KDBManagerRelease(kmgr);
+                    }
+                    if (rc == 0) {
+                        rc = WriteLoaderSignature(meta, progName);
+                        KMetadataRelease(meta);
+                    }
+                }
+            }
+            rc2 = VDBManagerRelease(mgr);
+            if (rc2)
+                (void)LOGERR(klogWarn, rc2, "Failed to release VDB Manager");
+            if (rc == 0)
+                rc = rc2;
+        }
+    }
+    return rc;
+}
diff --git a/tools/fastq-loader/mmarray.c b/tools/fastq-loader/mmarray.c
new file mode 100644
index 0000000..5eaca25
--- /dev/null
+++ b/tools/fastq-loader/mmarray.c
@@ -0,0 +1,114 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#define MMA_NUM_CHUNKS_BITS (20u)
+#define MMA_NUM_SUBCHUNKS_BITS ((32u)-(MMA_NUM_CHUNKS_BITS))
+#define MMA_SUBCHUNK_SIZE (1u << MMA_NUM_CHUNKS_BITS)
+#define MMA_SUBCHUNK_COUNT (1u << MMA_NUM_SUBCHUNKS_BITS)
+#define MMA_ELEM_SIZE ((size_t)((sizeof(MMA_ELEM_T) + ((size_t)(3u))) & ~((size_t)(3u))))
+
+typedef struct MMArray {
+    struct mma_map_s {
+        struct mma_submap_s {
+            void *base;
+        } submap[MMA_SUBCHUNK_COUNT];
+    } map[NUM_ID_SPACES];
+    off_t fsize;
+    int fd;
+} MMArray;
+
+static MMArray *MMArrayMake(rc_t *const prc, int fd)
+{
+    MMArray *const self = calloc(1, sizeof(*self));
+
+    if (self) {
+        self->fd = fd;
+        return self;
+    }
+    *prc = RC(rcExe, rcMemMap, rcConstructing, rcMemory, rcExhausted);
+    return NULL;
+}
+
+static MMA_ELEM_T *MMArrayGet(MMArray *const self, rc_t *const prc, uint64_t const element)
+{
+    size_t const chunk = MMA_SUBCHUNK_SIZE * MMA_ELEM_SIZE;
+    unsigned const bin_no = element >> 32;
+    unsigned const subbin = ((uint32_t)element) >> MMA_NUM_CHUNKS_BITS;
+    unsigned const in_bin = (uint32_t)element & (MMA_SUBCHUNK_SIZE - 1);
+
+    while (bin_no < sizeof(self->map)/sizeof(self->map[0])) {
+        MMA_ELEM_T *const next = self->map[bin_no].submap[subbin].base;
+        if (next != NULL)
+            return &next[in_bin];
+        else {
+            off_t const cur_fsize = self->fsize;
+            off_t const new_fsize = cur_fsize + chunk;
+
+            if (ftruncate(self->fd, new_fsize) == 0) {
+                void *const base = mmap(NULL, chunk, PROT_READ|PROT_WRITE,
+                                        MAP_FILE|MAP_SHARED, self->fd, cur_fsize);
+
+                self->fsize = new_fsize;
+                if (base != MAP_FAILED)
+                    self->map[bin_no].submap[subbin].base = base;
+                else {
+                    PLOGMSG(klogErr, (klogErr, "Failed to construct map for bin $(bin), subbin $(subbin)", "bin=%u,subbin=%u", bin_no, subbin));
+                    *prc = RC(rcExe, rcMemMap, rcConstructing, rcMemory, rcExhausted);
+                    return NULL;
+                }
+            }
+            else {
+                *prc = RC(rcExe, rcMemMap, rcResizing, rcSize, rcExcessive);
+                return NULL;
+            }
+        }
+    }
+    *prc = RC(rcExe, rcMemMap, rcResizing, rcId, rcExcessive);
+    return NULL;
+}
+
+static void MMArrayWhack(MMArray *self)
+{
+    size_t const chunk = MMA_SUBCHUNK_SIZE * MMA_ELEM_SIZE;
+    unsigned i;
+
+    for (i = 0; i != sizeof(self->map)/sizeof(self->map[0]); ++i) {
+        unsigned j;
+
+        for (j = 0; j != sizeof(self->map[0].submap)/sizeof(self->map[0].submap[0]); ++j) {
+            if (self->map[i].submap[j].base)
+            	munmap(self->map[i].submap[j].base, chunk);
+        }
+    }
+    close(self->fd);
+    free(self);
+}
+
+#undef MMA_NUM_CHUNKS_BITS
+#undef MMA_NUM_SUBCHUNKS_BITS
+#undef MMA_SUBCHUNK_SIZE
+#undef MMA_SUBCHUNK_COUNT
+#undef MMA_ELEM_SIZE
diff --git a/tools/fastq-loader/parsing_rules.txt b/tools/fastq-loader/parsing_rules.txt
new file mode 100755
index 0000000..9fed691
--- /dev/null
+++ b/tools/fastq-loader/parsing_rules.txt
@@ -0,0 +1,93 @@
+
+This is a summary of parsing rules for fastq files, as implemented in the latf-load tool.
+
+I. Notation
+
+The parsing rules are specified using a variant of Backus-Naur Form notation (BNF). The conventions are:
+
+    Token names are specified in capital letters. Tokens are defined in section II.
+    Names of non-terminals are specified in lowercase. Non-terminals are defined in section III.
+    { A }   means "A repeated 0 or more times"
+    [ A ]   means "optional A" 
+    A | B   means "A or B"
+    ( )     parentheses are used to group items
+    
+II. Tokens
+
+The following tokens are used in the grammar description.
+
+    ALPHANUM    - a sequence of (Latin) letters and decimal digits or dashes, beginning with a letter
+    NUMBER      - a sequence of decimal digits
+    WS          - a sequence of white space characters (spaces or tabs)
+    EOL         - an end of line character (not considered a white space)
+    COORDS      - a sequence of 4 decimal numbers, each preceded by ':', e.g. :8:2:342:540
+    RUNDOTSPOT  - a special identifier representing a spot inside a run, in the format [SDE]RR{digits}.{digits}. An example would be "DRR000123.12"
+    BASES       - a sequence of characters representing bases in text notation. Valid characters are A, C, G, T, a, c, g, t, N, n.
+    CSBASES     - a sequence of characters representing bases in colorspace notation. The first character has to be one of A, C, G, T, a, c, g, t.
+                  The remaining characters have to be '1', '2', '3', or '.'
+    QUAL        - a sequence of characters representing qualities. The range of valid characters is determined by quality encoding 
+                  specified by the command line option --quality, 33-126 for PHRED_33 or 64-127 for PHRED_64, inclusive.
+
+In addition, grammar rules use literal tokens in apostrophes, e.g. ':'
+    
+III. Parsing rules
+
+1.  Input file
+
+    input: 
+        { readLines [ qualityLines ] } |
+        { qualityLines } |
+        { name COORDS ':' ( BASES | CSBASES ) ':' QUAL EOL }
+    
+Normally, an input file consists of a sequence of reads, each occupying multiple lines which identify read and contain its bases, with or without qualities. 
+It is possible to have a file with only qualities specified for every read; in that case the loader must also be given a file with corresponding bases.
+
+An alternative is an "inline" format which has name, bases and qualities of each read on a single line.
+
+
+2.  Read 
+
+    readLines : ( '@' | '>' ) ( nameSpotGroup [ readNumberOrTail ] | runSpotRead ) EOL read   
+
+    read : baseRead | csRead 
+    
+    baseRead : BASES EOL { BASES EOL }
+     
+    csRead : CSBASES EOL { CSBASES EOL }
+    
+    qualityLines: '+' { fqTOKEN } EOL quality 
+
+    quality: QUAL EOL { QUAL EOL }
+    
+A read in a fastq file is identified by its tag line. Tag line is followed by bases in text or colorspace format. 
+
+An optional quality specification may follow. The quality specification starts with '+' and its own tag line, which is
+expected to match the tag line of the textually preceding read, although it is not enforced by latf-load. 
+
+3. Tag line
+
+    nameSpotGroup : name [ COORDS [ ':' ] ] spotGroup | 
+                    name COORDS [ ':' ] [ '.' ] name | 
+                    name COORDS '_' [ casava1_8 ]
+        
+    name : ( ALPHANUM | NUMBER ) { '_' | '-' | '.' | ':' | ALPHANUM | NUMBER }
+
+    spotGroup : '#' ( NUMBER | ALPHANUM )
+        
+    readNumberOrTail : ( readNumber | WS [ casava1_8 ] | WS tail ) { WS tail }
+
+    readNumber : '/' NUMBER { '/' name }
+        
+    casava1_8 : NUMBER ':' ALPHANUM ':' NUMBER ':' ( ALPHANUM | NUMBER )
+        
+    tail : ALPHANUM { NUMBER | ALPHANUM | '_' | '/' | '=' )
+       
+    runSpotRead : RUNDOTSPOT [ ( '.' | '/' ) NUMBER ] { tail | NUMBER }
+        
+The purpose of the tag line is  to identify a read. The components of a tag line may represent run name (possibly including coordinates), spot group, read number, and some additional information which may be of no concern to latf-load. 
+Tag lines come in a multitude of variations on the basic fastq format, somewhat loosely defined in e.g. http://en.wikipedia.org/wiki/FASTQ_format
+Parsing rules for the tag line in latf-load have been designed to recognize major variations of the basic tag line format and 
+evolved based on format variations encountered in real life submissions.
+
+
+
diff --git a/libs/loader/sequence-writer.c b/tools/fastq-loader/sequence-writer.c
similarity index 100%
rename from libs/loader/sequence-writer.c
rename to tools/fastq-loader/sequence-writer.c
diff --git a/interfaces/loader/sequence-writer.h b/tools/fastq-loader/sequence-writer.h
similarity index 100%
rename from interfaces/loader/sequence-writer.h
rename to tools/fastq-loader/sequence-writer.h
diff --git a/tools/fuse/Makefile b/tools/fuse/Makefile
new file mode 100644
index 0000000..b650ee0
--- /dev/null
+++ b/tools/fuse/Makefile
@@ -0,0 +1,204 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/fuse
+
+INT_TOOLS =
+
+EXT_TOOLS = \
+	remote-fuser \
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+ifeq (1,$(HAVE_XML2))
+
+ifeq (1,$(HAVE_FUSE))
+
+ifeq (64,$(BITS))
+
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+else
+
+all std: $(ALL_TOOLS)
+
+$(ALL_TOOLS):
+	@ echo "NOTE - $(@F) cannot be built: it requires a 64-bit system."
+
+endif
+
+else
+
+all std: $(ALL_TOOLS)
+
+$(ALL_TOOLS):
+	@ echo "NOTE - $(@F) cannot be built: " \
+		"it requires 'fuse' library and its development headers."
+
+endif
+
+else
+
+all std: $(ALL_TOOLS)
+
+$(ALL_TOOLS):
+	@ echo "NOTE - $(@F) cannot be built: " \
+	       "It requires our internal library 'libkxml'"             \
+	       "which requires 'libxml2' and its development headers."
+
+endif
+
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# sra-fuser
+#
+SRA_FUSER_SRC = \
+        zlib-simple \
+        log \
+        node \
+        tar-list \
+        file \
+        tar-file \
+        tar-node \
+        directory \
+        formats \
+        accessor \
+        kfile-accessor \
+        xml \
+        text-file \
+        sra-list \
+        sra-directory \
+        sra-node \
+        sra-fastq \
+        sra-sff \
+        sra-fuser-sys \
+        sra-fuser
+
+SRA_FUSER_OBJ = \
+	$(addsuffix .$(OBJX),$(SRA_FUSER_SRC))
+
+LIBXML = -lxml2
+ifdef NCBI
+CFLAGS += -DSRAFUSER_LOGLOCALTIME
+ifeq (linux,$(OS))
+   LIBXML = -X$(LIBXML_LPATH) -lxml2-static
+endif
+ifeq (sun,$(OS))
+   LIBXML = -X$(LIBXML_LPATH) -lxml2-static
+endif
+endif
+
+SRA_FUSER_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lfuse \
+	-lrt
+
+$(BINDIR)/sra-fuser: $(SRA_FUSER_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(SRA_FUSER_LIB)
+
+#-------------------------------------------------------------------------------
+# remote-fuser
+#
+REMOTE_FUSER_SRC = \
+        log \
+        node \
+        accessor \
+        kfile-accessor \
+        remote-xml \
+        remote-cache \
+        remote-link \
+        remote-file \
+        remote-directory \
+        remote-fuser-sys \
+        remote-fuser
+
+REMOTE_FUSER_OBJ = \
+	$(addsuffix .$(OBJX),$(REMOTE_FUSER_SRC))
+
+LIBXML = -lxml2
+ifdef NCBI
+CFLAGS += -DSRAFUSER_LOGLOCALTIME
+ifeq (linux,$(OS))
+   LIBXML = -X$(LIBXML_LPATH) -lxml2-static
+endif
+ifeq (sun,$(OS))
+   LIBXML = -X$(LIBXML_LPATH) -lxml2-static
+endif
+endif
+
+REMOTE_FUSER_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lfuse \
+	-lrt
+
+$(BINDIR)/remote-fuser: $(REMOTE_FUSER_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(REMOTE_FUSER_LIB)
+
+#-------------------------------------------------------------------------------
+# sra-fuser
+#
+SRA_MAKEIDX_SRC = \
+    zlib-simple \
+	sra-makeidx
+
+SRA_MAKEIDX_OBJ = \
+	$(addsuffix .$(OBJX),$(SRA_MAKEIDX_SRC))
+
+SRA_MAKEIDX_LIB = \
+	-lkapp \
+	-stk-version \
+	-lncbi-wvdb \
+	-ssrareader \
+
+$(BINDIR)/sra-makeidx: $(SRA_MAKEIDX_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(SRA_MAKEIDX_LIB)
+
diff --git a/tools/fuse/accessor.c b/tools/fuse/accessor.c
new file mode 100644
index 0000000..e91ef9a
--- /dev/null
+++ b/tools/fuse/accessor.c
@@ -0,0 +1,134 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <stdlib.h>
+#include <string.h>
+
+#include "accessor.h"
+#include "log.h"
+
+/* used to detect correct object pointers */
+const uint32_t SAccessor_MAGIC = 0xFACE5550;
+
+struct SAccessor {
+    uint32_t magic;
+    char* name;
+    AccessorRead* Read;
+    AccessorRelease* Release;
+};
+
+rc_t SAccessor_Make(const SAccessor** cself, size_t size, const char* name, AccessorRead* read, AccessorRelease* release)
+{
+    rc_t rc = 0;
+    SAccessor* self = NULL;
+
+    if( cself == NULL ) {
+        rc = RC(rcExe, rcFile, rcConstructing, rcSelf, rcNull);
+    } else {
+        CALLOC(self, 1, sizeof(*self) + size);
+        if( self == NULL ) {
+            rc = RC(rcExe, rcFile, rcConstructing, rcMemory, rcExhausted);
+        } else {
+            if( (rc = StrDup(name, &self->name)) == 0 ) {
+                self->magic = SAccessor_MAGIC;
+                self->Read = read;
+                self->Release = release;
+                /* shift pointer to after hidden structure */
+                DEBUG_MSG(8, ("%s: %s\n", __func__, self->name));
+                self++;
+            } else {
+                FREE(self);
+            }
+        }
+        *cself = rc ? NULL : self;
+    }
+    return rc;
+}
+
+static
+rc_t SAccessor_ResolveSelf(const SAccessor* self, enum RCContext ctx, SAccessor** resolved)
+{
+    if( self == NULL || resolved == NULL ) {
+        return RC(rcSRA, rcFile, ctx, rcSelf, rcNull);
+    }
+    *resolved = (SAccessor*)--self;
+    /* just to validate that it is full instance */
+    if( (*resolved)->magic != SAccessor_MAGIC ) {
+        *resolved = NULL;
+        return RC(rcSRA, rcFile, ctx, rcSelf, rcCorrupt);
+    }
+    return 0;
+}
+
+
+rc_t SAccessor_Read(const SAccessor* cself, char* buf, size_t size, off_t offset, size_t* num_read)
+{
+    rc_t rc = 0;
+    SAccessor* self = NULL;
+
+    if( buf == NULL || num_read == NULL ) {
+        return RC(rcExe, rcFile, rcReading, rcParam, rcNull);
+    } else if( (rc = SAccessor_ResolveSelf(cself, rcEvaluating, &self)) == 0 ) {
+        DEBUG_MSG(8, ("%s: %s\n", __func__, self->name));
+        if( self->Read ) {
+            *num_read = 0;
+            rc = self->Read(cself, buf, size, offset, num_read);
+        } else {
+            rc = RC(rcExe, rcFile, rcReading, rcInterface, rcUnsupported);
+        }
+    }
+    return rc;
+}
+
+rc_t SAccessor_GetName(const SAccessor* cself, const char** name)
+{
+    rc_t rc = 0;
+    SAccessor* self = NULL;
+
+    if( name == NULL ) {
+        rc = RC(rcExe, rcFile, rcEvaluating, rcParam, rcInvalid);
+    } else if( (rc = SAccessor_ResolveSelf(cself, rcEvaluating, &self)) == 0 ) {
+        *name = self->name;
+    }
+    return rc;
+}
+
+rc_t SAccessor_Release(const SAccessor* cself)
+{
+    rc_t rc = 0;
+    if( cself != NULL ) {
+        SAccessor* self = NULL;
+
+        if( (rc = SAccessor_ResolveSelf(cself, rcReleasing, &self)) == 0 ) {
+            if( self->Release ) {
+                rc = self->Release(cself);
+            }
+            DEBUG_MSG(8, ("%s: %s\n", __func__, self->name));
+            FREE(self->name);
+            FREE(self);
+        }
+    }
+    return rc;
+}
diff --git a/tools/fuse/accessor.h b/tools/fuse/accessor.h
new file mode 100644
index 0000000..c872216
--- /dev/null
+++ b/tools/fuse/accessor.h
@@ -0,0 +1,46 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_accessor_
+#define _h_sra_fuse_accessor_
+
+#include <unistd.h>
+
+#include <klib/rc.h>
+
+typedef struct SAccessor SAccessor;
+
+typedef rc_t (AccessorRead)(const SAccessor* cself, char* buf, size_t size, off_t offset, size_t* num_read);
+typedef rc_t (AccessorRelease)(const SAccessor* cself);
+
+rc_t SAccessor_Make(const SAccessor** cself, size_t size, const char* name, AccessorRead* read, AccessorRelease* release);
+
+rc_t SAccessor_GetName(const SAccessor* cself, const char** name);
+
+rc_t SAccessor_Read(const SAccessor* cself, char* buf, size_t size, off_t offset, size_t* num_read);
+
+rc_t SAccessor_Release(const SAccessor* cself);
+
+#endif /* _h_sra_fuse_accessor_ */
diff --git a/tools/fuse/debug.h b/tools/fuse/debug.h
new file mode 100644
index 0000000..ba0375d
--- /dev/null
+++ b/tools/fuse/debug.h
@@ -0,0 +1,53 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _services_sra_fuser_debug_h_
+#define _services_sra_fuser_debug_h_
+
+#include <klib/debug.h>
+
+#if _DEBUGGING
+#define DEBUG_MSG_PASTE(a,b) a##b
+#define DEBUG_MSG(flag,msg) DBGMSG(DBG_APP,DBG_FLAG(DEBUG_MSG_PASTE(DBG_APP_,flag)), msg)
+#define DEBUG_LINE(flag,fmt,...) DEBUG_MSG(flag, ("%s:%u: " fmt "\n", __func__, __LINE__, __VA_ARGS__))
+
+#define MALLOC(ptr, size) ptr = malloc(size); DEBUG_LINE(10, "%p=malloc(%lu)", ptr, size)
+#define CALLOC(ptr, qty, size) ptr = calloc(qty, size); DEBUG_LINE(10, "%p=calloc(%lu)", ptr, qty * size)
+#define REALLOC(ptr, src, size) ptr = realloc(src, size); DEBUG_LINE(10, "%p=realloc(%p, %lu)", ptr, src, size)
+#define FREE(ptr) free(ptr); if(ptr){DEBUG_LINE(10, "0=free(%p)", ptr);}
+
+#else
+
+#define DEBUG_MSG(flag,msg) ((void)0)
+#define DEBUG_LINE(flag,fmt,...) ((void)0)
+
+#define MALLOC(ptr, size) ptr = malloc(size)
+#define CALLOC(ptr, qty, size) ptr = calloc(qty, size)
+#define REALLOC(ptr, src, size) ptr = realloc(src, size)
+#define FREE(ptr) free(ptr)
+
+#endif
+
+#endif /* _services_sra_fuser_debug_h_ */
diff --git a/tools/fuse/directory.c b/tools/fuse/directory.c
new file mode 100644
index 0000000..e740928
--- /dev/null
+++ b/tools/fuse/directory.c
@@ -0,0 +1,566 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <klib/namelist.h>
+#include <klib/printf.h>
+#include <kxml/xml.h>
+#include <klib/container.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kproc/lock.h>
+
+typedef struct DirectoryNode DirectoryNode;
+#define FSNODE_IMPL DirectoryNode
+
+#include "log.h"
+#include "xml.h"
+#include "directory.h"
+#include "tar-node.h"
+#include "kfile-accessor.h"
+
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <time.h>
+
+typedef struct DirNodeChild_struct {
+    BSTNode node;
+    const char* full_name; /* full path to detected file */
+    const char* name; /* file name only within full_name above */
+    const FSNode* child;
+} DirNodeChild;
+
+static
+int64_t DirNodeChild_Sort(const BSTNode *item, const BSTNode *node)
+{
+    return strcmp(((const DirNodeChild*)item)->child->name, ((const DirNodeChild*)node)->child->name);
+}
+
+static
+int64_t DirNodeChild_FindByName(const void *item, const BSTNode *node)
+{
+    return strcmp((const char*)item, ((const DirNodeChild*)node)->child->name);
+}
+
+static
+int64_t DirNodeChild_FindBySrc(const void *item, const BSTNode *node)
+{
+    return strcmp((const char*)item, ((const DirNodeChild*)node)->name);
+}
+
+static
+void DirNodeChild_Whack(BSTNode *node, void *data)
+{
+    DirNodeChild* n = (DirNodeChild*)node;
+
+    if( n != NULL ) {
+        DEBUG_LINE(8, "Releasing auto TAR %s", n->child->name);
+        FSNode_Release(n->child);
+        FREE(n);
+    }
+}
+
+static
+void DirNodeChild_Touch( BSTNode *node, void *data )
+{
+    DirNodeChild* n = (DirNodeChild*)node;
+    BSTree* t = (BSTree*)data;
+    if( FSNode_Touch(n->child) != 0 ) {
+        BSTreeUnlink(t, node);
+        DirNodeChild_Whack(node, NULL);
+    }
+}
+
+struct DirectoryNode {
+    FSNode node;
+    char* path;
+    KTime_t mtime;
+    KRWLock* lock;
+    KTime_t timestamp;
+    /* list of physical files and dirs in 'path' minus those in children list */
+    KNamelist* ls; 
+    BSTree children;
+};
+
+struct DirNodeChild_List_Data {
+    rc_t rc;
+    const DirectoryNode* cself;
+    FSNode_Dir_Visit func;
+    void* data;
+};
+
+static
+bool DirNodeChild_List( BSTNode *node, void *data )
+{
+    DirNodeChild* n = (DirNodeChild*)node;
+    struct DirNodeChild_List_Data* d = (struct DirNodeChild_List_Data*)data;
+    const FSNode* ch;
+    bool hidden = true;
+
+    if( ((d->rc = FSNode_FindChild(&d->cself->node, n->child->name, strlen(n->child->name), &ch, &hidden)) == 0 && hidden) ||
+         (GetRCObject(d->rc) == rcName && GetRCState(d->rc) == rcNotFound) ) {
+        d->rc = d->func(n->child->name, d->data);
+    }
+    return d->rc != 0;
+}
+
+static
+rc_t DirectoryNode_Lock(const DirectoryNode* cself, bool exclusive)
+{
+    DEBUG_LINE(8, "Lock DirectoryNode %s %s", cself->path, exclusive ? "write" : "read");
+    return exclusive ? KRWLockAcquireExcl(((DirectoryNode*)cself)->lock) : KRWLockAcquireShared(((DirectoryNode*)cself)->lock);
+}
+
+static
+rc_t DirectoryNode_Unlock(const DirectoryNode* cself)
+{
+    DEBUG_LINE(8, "Unlocking DirectoryNode %s", cself->path);
+    return KRWLockUnlock(((DirectoryNode*)cself)->lock);
+}
+
+static
+rc_t DirectoryNode_IsChild(const DirectoryNode* cself, const char* subpath, const FSNode** node,
+                           int64_t (*finder)(const void *item, const BSTNode *node))
+{
+    DirNodeChild* n = (DirNodeChild*)BSTreeFind(&cself->children, subpath, finder);
+    if( n != NULL ) {
+        *node = n->child;
+    } else {
+        *node = NULL;
+        return RC(rcExe, rcFile, rcAccessing, rcName, rcNotFound);
+    }
+    return 0;
+}
+
+static
+rc_t CC DirectoryNode_AddTar( const KDirectory *dir, uint32_t type, const char *name, void *data )
+{
+    rc_t rc = 0;
+
+    if( (type & ~kptAlias) == kptFile && name != NULL ) {
+        size_t lnm = strlen(name);
+
+        if( lnm > 8 && strncmp(&name[lnm - 8], ".tar.xml", 8) == 0 ) {
+            DirectoryNode* self = (DirectoryNode*)data;
+            DirNodeChild* n = (DirNodeChild*)BSTreeFind(&self->children, name, DirNodeChild_FindBySrc);
+            if( n == NULL ) {
+                char resolved[4096];
+                if( (rc = KDirectoryResolvePath(dir, true, resolved, sizeof(resolved), "%s/%s", self->path, name)) == 0 ) {
+                    size_t lrs = strlen(resolved);
+                    CALLOC(n, 1, sizeof(*n) + lrs + 1);
+                    if( n == NULL ) {
+                        rc = RC(rcExe, rcArc, rcInserting, rcMemory, rcExhausted);
+                    } else {
+                        char* x = (char*)&n[1];
+                        memcpy(x, resolved, lrs);
+                        x[lrs] = '\0';
+                        n->full_name = x;
+                        n->name = &n->full_name[lrs - lnm];
+                        if( (rc = TarNode_MakeAuto(&n->child, dir, self->path, name, n->full_name)) != 0 ||
+                            (rc = BSTreeInsert(&self->children, &n->node, DirNodeChild_Sort)) != 0 ) {
+                            DirNodeChild_Whack(&n->node, NULL);
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+static
+bool DirectoryNode_LS( const KDirectory *dir, const char *name, void *data )
+{
+    size_t lnm = name ? strlen(name) : 0;
+    bool ret;
+
+    if( lnm > 8 && strncmp(&name[lnm - 8], ".tar.xml", 8) == 0 ) {
+        DirectoryNode* self = (DirectoryNode*)data;
+        ret = BSTreeFind(&self->children, name, DirNodeChild_FindBySrc) == NULL;
+    } else if( lnm > 4 && strncmp(&name[lnm - 4], ".tar", 4) == 0 ) {
+        DirectoryNode* self = (DirectoryNode*)data;
+        const FSNode* child;
+        /* virtual .tar file hides actual .tar file with same name */
+        ret = DirectoryNode_IsChild(self, name, &child, DirNodeChild_FindByName) != 0;
+    } else {
+        ret = true;
+    }
+    return ret;
+}
+
+static
+rc_t DirectoryNode_Touch(const DirectoryNode* cself)
+{
+    rc_t rc = 0;
+
+    if( cself->path != NULL ) {
+        if( (rc = DirectoryNode_Lock(cself, true)) == 0 ) {
+            KDirectory* dir;
+            /* drop disappeared items, update existing */
+            BSTreeForEach(&cself->children, false, DirNodeChild_Touch, (void*)&cself->children);
+            if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+                KTime_t dt = 0;
+                if( (rc = KDirectoryDate(dir, &dt, "%s", cself->path)) == 0 && cself->timestamp != dt ) {
+                    DirectoryNode* self = (DirectoryNode*)cself;
+                    /* re-read directory */
+                    ReleaseComplain(KNamelistRelease, self->ls);
+                    self->ls = NULL;
+                    if( (rc = KDirectoryVisit(dir, false, DirectoryNode_AddTar, self, "%s", self->path)) == 0 ) {
+                        rc = KDirectoryList(dir, &self->ls, DirectoryNode_LS, self, "%s", self->path);
+                    }
+                    self->timestamp = rc == 0 ? dt : 0;
+                }
+                ReleaseComplain(KDirectoryRelease, dir);
+            }
+            ReleaseComplain(DirectoryNode_Unlock, cself);
+        }
+    }
+    return rc;
+}
+
+static
+rc_t DirectoryNode_Attr(const DirectoryNode* cself, const char* subpath, uint32_t* type, KTime_t* ts, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz)
+{
+    rc_t rc = 0;
+
+    *type = kptDir;
+    if( cself->path != NULL ) {
+        KDirectory* dir = NULL;
+        const KDirectory* sub = NULL;
+
+        if( subpath != NULL && (rc = DirectoryNode_Lock(cself, false)) == 0 ) {
+            const FSNode* child = NULL;
+            if( (rc = DirectoryNode_IsChild(cself, subpath, &child, DirNodeChild_FindByName)) == 0 ) {
+                rc = FSNode_Attr(child, NULL, type, ts, file_sz, access, block_sz);
+            }
+            ReleaseComplain(DirectoryNode_Unlock, cself);
+            if( child != NULL ) {
+                return rc;
+            }
+        }
+        if( (rc = KDirectoryNativeDir(&dir)) == 0 &&
+            (rc = KDirectoryOpenDirRead(dir, &sub, true, "%s", cself->path)) == 0 ) {
+            const char* path = subpath ? subpath : ".";
+            DEBUG_LINE(8, "Using full name %s/%s", cself->path, path);
+            if( (rc = KDirectoryDate(sub, ts, "%s", path)) == 0 ) {
+                *type = KDirectoryPathType(sub, "%s", path);
+                if( *type != kptBadPath && *type != kptNotFound ) {
+                    if( (rc = KDirectoryAccess(sub, access, "%s", path)) == 0 ) {
+                        if( *type & kptAlias ) {
+                            bool children;
+                            if( (rc = FSNode_HasChildren(&cself->node, &children)) == 0 ) {
+                                /* if it is pointer to an aliased directory and has no XML children than pass symlink on */
+                                if( children == false || subpath != NULL ) {
+                                    char r[4096];
+                                    if( (rc = KDirectoryResolveAlias(sub, true, r, sizeof(r), "%s", path)) == 0 ) {
+                                         DEBUG_LINE(8, "Symlink name %s", r);
+                                        *file_sz = strlen(r);
+                                    }
+                                } else {
+                                    /* otherwise remove alias bit */
+                                    *type = *type & ~kptAlias;
+                                }
+                            }
+                        } else if( *type == kptFile ) {
+                            rc = KDirectoryFileSize(sub, file_sz, "%s", path);
+                        }
+                    }
+                }
+            }
+        }
+        ReleaseComplain(KDirectoryRelease, sub);
+        ReleaseComplain(KDirectoryRelease, dir);
+    } else if( subpath != NULL ) {
+        rc = RC(rcExe, rcDirectory, rcEvaluating, rcDirEntry, rcNotFound);
+    }
+    if( subpath == NULL && cself->mtime != 0 ) {
+        *ts = cself->mtime;
+    }
+    return rc;
+}
+
+struct DirectoryNode_DirVisit_Data {
+    FSNode_Dir_Visit func;
+    void* data;
+};
+
+static
+rc_t CC DirectoryNode_DirVisit( const KDirectory *dir, uint32_t type, const char *name, void *data )
+{
+    struct DirectoryNode_DirVisit_Data* d = (struct DirectoryNode_DirVisit_Data*)data;
+    return d->func(name, d->data);
+}
+
+static
+rc_t DirectoryNode_Dir(const DirectoryNode* cself, const char* subpath, FSNode_Dir_Visit func, void* data)
+{
+    rc_t rc = 0;
+
+    if( subpath == NULL ) {
+        /* add XML tree children */
+        if( (rc = FSNode_ListChildren(&cself->node, func, data)) == 0 ) {
+            if( (rc = DirectoryNode_Lock(cself, false)) == 0 ) {
+                if( cself->ls != NULL ) {
+                    /* add ls result excluding XML children */
+                    uint32_t i = 0, count = 0;
+                    rc = KNamelistCount(cself->ls, &count);
+                    while(rc == 0 && i < count) {
+                        const char* nm = NULL;
+                        const FSNode* ch;
+                        bool hidden = true;
+                        if( (rc = KNamelistGet(cself->ls, i++, &nm)) == 0 &&
+                            (((rc = FSNode_FindChild(&cself->node, nm, strlen(nm), &ch, &hidden)) == 0 && hidden) ||
+                             (GetRCObject(rc) == rcName && GetRCState(rc) == rcNotFound)) ) {
+                            rc = func(nm, data);
+                        }
+                    }
+                }
+                if( rc == 0 ) {
+                    struct DirNodeChild_List_Data d;
+                    d.rc = 0;
+                    d.cself = cself;
+                    d.func = func;
+                    d.data = data;
+                    /* add detected child nodes excluding XML children */
+                    BSTreeDoUntil(&cself->children, false, DirNodeChild_List, &d);
+                    rc = d.rc;
+                }
+                ReleaseComplain(DirectoryNode_Unlock, cself);
+            }
+        }
+    } else {
+        KDirectory* dir = NULL;
+        if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+            struct DirectoryNode_DirVisit_Data d;
+            d.func = func;
+            d.data = data;
+            DEBUG_LINE(8, "Listing kdir path %s/%s", cself->path, subpath);
+            rc = KDirectoryVisit(dir, false, DirectoryNode_DirVisit, &d, "%s/%s", cself->path, subpath);
+            ReleaseComplain(KDirectoryRelease, dir);
+        }
+    }
+    return rc;
+}
+
+static
+rc_t DirectoryNode_Link(const DirectoryNode* cself, const char* subpath, char* buf, size_t buf_sz)
+{
+    rc_t rc = 0;
+    if( cself->path == NULL ) {
+        rc = RC(rcExe, rcPath, rcAliasing, rcDirEntry, rcUnsupported);
+    } else {
+        KDirectory* dir = NULL;
+        if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+            if( subpath == NULL ) {
+                DEBUG_LINE(8, "Resolving %s", cself->path);
+                rc = KDirectoryResolveAlias(dir, true, buf, buf_sz, "%s", cself->path);
+            } else {
+                DEBUG_LINE(8, "Resolving %s/%s", cself->path, subpath);
+                rc = KDirectoryResolveAlias(dir, true, buf, buf_sz, "%s/%s", cself->path, subpath);
+            }
+            DEBUG_LINE(8, "Resolved %s", rc == 0 ? buf : NULL);
+            ReleaseComplain(KDirectoryRelease, dir);
+        }
+    }
+    return rc;
+}
+
+static
+rc_t DirectoryNode_Open(const DirectoryNode* cself, const char* subpath, const SAccessor** accessor)
+{
+    rc_t rc = 0;
+
+    if( subpath == NULL ) {
+        rc = RC(rcExe, rcFile, rcOpening, rcDirEntry, rcNotFound);
+    } else {
+        const char* nm = NULL;
+
+        if( (rc = DirectoryNode_Lock(cself, false)) == 0 ) {
+            const FSNode* child = NULL;
+            if( (rc = DirectoryNode_IsChild(cself, subpath, &child, DirNodeChild_FindByName)) == 0 ) {
+                rc = FSNode_Open(child, NULL, accessor);
+            }
+            ReleaseComplain(DirectoryNode_Unlock, cself);
+            if( child != NULL ) {
+                return rc;
+            }
+        }
+        if( (rc = FSNode_GetName(&cself->node, &nm)) == 0 ) {
+            KDirectory* dir = NULL;
+            if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+                const KFile* kf = NULL;
+                if( (rc = KDirectoryOpenFileRead(dir, &kf, "%s/%s", cself->path, subpath)) == 0 ) {
+                    if( (rc = KFileAccessor_Make(accessor, nm, kf)) != 0 ) {
+                        ReleaseComplain(KFileRelease, kf);
+                    }
+                }
+                ReleaseComplain(KDirectoryRelease, dir);
+            }
+        }
+    }
+    if( rc != 0 ) {
+        SAccessor_Release(*accessor);
+        *accessor = NULL;
+    }
+    return rc;
+}
+
+static
+rc_t DirectoryNode_Release(DirectoryNode* self)
+{
+    rc_t rc = 0;
+    if( self != NULL ) {
+        BSTreeWhack(&self->children, DirNodeChild_Whack, NULL);
+        ReleaseComplain(KRWLockRelease, self->lock);
+        ReleaseComplain(KNamelistRelease, self->ls);
+        FREE(self->path);
+    }
+    return rc;
+}
+
+static FSNode_vtbl DirectoryNode_vtbl = {
+    sizeof(DirectoryNode),
+    NULL,
+    DirectoryNode_Touch,
+    DirectoryNode_Attr,
+    DirectoryNode_Dir,
+    DirectoryNode_Link,
+    DirectoryNode_Open,
+    DirectoryNode_Release
+};
+
+
+rc_t DirectoryNode_Make(const KXMLNode* xml_node, FSNode** cself, char* errmsg, const char* rel_path,
+                        KTime_t dflt_ktm, EXMLValidate validate)
+{
+    rc_t rc = 0;
+
+    if( xml_node == NULL || cself == NULL ) {
+        rc = RC(rcExe, rcDirectory, rcConstructing, rcParam, rcNull);
+    } else {
+        char* path = NULL, *name = NULL, name_buf[4096];
+        KTime_t ktm = 0;
+        DirectoryNode* ff = NULL;
+
+        if( (rc = KXMLNodeReadAttrCStr(xml_node, "path", &path, NULL)) == 0 ) {
+            if( path[0] == '\0' ) {
+                FREE(path);
+                path = NULL;
+            } else {
+                KDirectory* dir = NULL;
+                if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+                    if( path[0] != '/' ) {
+                        char resolved[4096];
+                        if( (rc = KDirectoryResolvePath(dir, true, resolved, sizeof(resolved),
+                                                                  "%s%s", rel_path, path)) == 0 ) {
+                            DEBUG_LINE(8, "%s%s resolved to %s", rel_path, path, resolved);
+                            FREE(path);
+                            rc = StrDup(resolved, &path);
+                        }
+                    }
+                    if( rc == 0 && validate > eXML_NoCheck ) {
+                        uint32_t t = KDirectoryPathType(dir, "%s", path);
+                        if( t != kptDir && t != (kptDir | kptAlias) ) {
+                            if( validate > eXML_NoFail ) {
+                                rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, t == kptNotFound ? rcNotFound : rcInvalid);
+                            } else {
+                                PLOGMSG(klogErr, (klogErr, "Directory path '$(p)' not found", "p=%s", path));
+                            }
+                        }
+                    }
+                    ReleaseComplain(KDirectoryRelease, dir);
+                }
+            }
+        } else if( GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound ) {
+            rc = 0;
+        }
+        if( rc != 0 ) {
+            strcpy(errmsg, "Directory/@path: '");
+            strcat(errmsg, path ? path : "(null)");
+            strcat(errmsg, "'");
+        }
+        if( rc == 0 ) {
+            size_t sz;
+            rc = KXMLNodeReadAttrCString(xml_node, "name", name_buf, sizeof(name_buf), &sz);
+            if( rc == 0 && name_buf[0] != '\0' ) {
+                name = name_buf;
+            } else if( (GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound)  ) {
+                rc = 0;
+            }
+            if( rc != 0 ) {
+                strcpy(errmsg, "Directory/@name");
+            } else if( name == NULL ) {
+                if( path == NULL ) {
+                    rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+                } else {
+                    name = strrchr(path, '/');
+                    name = name ? name + 1 : path;
+                }
+            }
+        }
+        if( rc == 0 && (rc = XML_ParseTimestamp(xml_node, "timestamp", &ktm, true)) != 0 ) {
+            strcpy(errmsg, "Directory/@timestamp");
+        }
+        if( rc == 0 ) {
+            struct KNamelist const* attr = NULL;
+            if( (rc = KXMLNodeListAttr(xml_node, &attr)) == 0 ) {
+                uint32_t i = 0, count = 0;
+                if( (rc = KNamelistCount(attr, &count)) == 0 && count > 0 ) {
+                    while( rc == 0 && i < count ) {
+                        const char *attr_nm = NULL;
+                        if( (rc = KNamelistGet(attr, i++, &attr_nm)) != 0 ) {
+                            break;
+                        }
+                        if( strcmp("path", attr_nm) == 0 || strcmp("name", attr_nm) == 0 || strcmp("timestamp", attr_nm) == 0 ) {
+                            continue;
+                        }
+                        rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+                        strcpy(errmsg, "unknown attribute Directory/@");
+                        strcat(errmsg, attr_nm);
+                    }
+                }
+                ReleaseComplain(KNamelistRelease, attr);
+            }
+        }
+        if( rc == 0 ) {
+            if( (rc = FSNode_Make((FSNode**)&ff, name, &DirectoryNode_vtbl)) == 0 &&
+                (rc = KRWLockMake(&ff->lock)) == 0 ) {
+                ff->path = path;
+                ff->mtime = ktm != 0 ? ktm : (path ? 0 : dflt_ktm);
+                BSTreeInit(&ff->children);
+            } else {
+                strcpy(errmsg, "Directory '");
+                strcat(errmsg, name);
+                strcat(errmsg, "'");
+            }
+        }
+        if( rc == 0 ) {
+            *cself = &ff->node;
+        } else {
+            FREE(path);
+        }
+    }
+    return rc;
+}
diff --git a/tools/fuse/directory.h b/tools/fuse/directory.h
new file mode 100644
index 0000000..9acc3c5
--- /dev/null
+++ b/tools/fuse/directory.h
@@ -0,0 +1,34 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_directory_
+#define _h_sra_fuse_directory_
+
+#include "node.h"
+
+rc_t DirectoryNode_Make(const KXMLNode* xml_node, FSNode** cself, char* errmsg, const char* rel_path,
+                        KTime_t ts, EXMLValidate validate);
+
+#endif /* _h_sra_fuse_directory_ */
diff --git a/tools/fuse/dump-idx.c b/tools/fuse/dump-idx.c
new file mode 100644
index 0000000..e1a25db
--- /dev/null
+++ b/tools/fuse/dump-idx.c
@@ -0,0 +1,102 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/stat.h>
+
+#include <kapp/main.h>
+#include <kapp/log.h>
+#include <klib/rc.h>
+#include <kdb/database.h>
+#include <kdb/table.h>
+#include <kdb/index.h>
+
+#include <sra/sradb.h>
+
+rc_t KMain ( int argc, char *argv [] )
+{
+    rc_t rc = 0;
+    char const *table_dir = NULL;
+    char const *idx_name = NULL;
+    const KDBManager* kmgr = NULL;
+    const KTable* ktbl = NULL;
+    const KIndex* kidx = NULL;
+
+    if( argc < 3 ) {
+        rc = RC ( rcExe, rcArgv, rcParsing, rcPath, rcNull );
+        PLOGERR((klogErr, rc, "Usage:\n $(a) <path> <index-name>", PLOG_S(a), argv[0]));
+        return rc;
+    }
+
+    table_dir = argv[1];
+    idx_name = argv[2];
+
+    rc = KDBManagerMakeRead(&kmgr, NULL);
+    if( rc == 0 ) {
+        rc = KDBManagerOpenTableRead(kmgr, &ktbl, table_dir);
+        if( rc == 0 ) {
+            PLOGMSG((klogInfo, "Table $(p) index $(i)", PLOG_2(PLOG_S(p),PLOG_S(i)), table_dir, idx_name));
+            rc = KTableOpenIndexRead(ktbl, &kidx, idx_name);
+            if( rc == 0 ) {
+                uint64_t off1 = 0, off2 = 0, sz = 0, id_q = 0;
+                int64_t id = 0;
+                while(true) {
+                    rc = KIndexFindU64(kidx, off1, &off2, &sz, &id, &id_q);
+                    if( rc != 0 ) {
+                        break;
+                    }
+                    PLOGMSG((klogInfo, "$(i) index spot $(s) ($(q)) offset [$(f):$(t)]",
+                            PLOG_5(PLOG_S(i),PLOG_I64(s),PLOG_U64(q),PLOG_U64(f),PLOG_U64(t)), idx_name, id, id_q, off2, off2 + sz - 1));
+                    off1 = off2 + sz + 1;
+                    {{
+                        uint64_t f = off2, t = off2 + sz;
+                        while( f != t ) {
+                            uint64_t o, z;
+                            int64_t newid;
+                            if( (rc = KIndexFindU64(kidx, f, &o, &z, &newid, &id_q)) != 0 ) {
+                                PLOGERR((klogErr, rc, "sub $(f)", PLOG_U64(f), f));
+                                break;
+                            }
+                            if( id != newid ) {
+                                PLOGMSG((klogErr, "no match on offset $(f): $(i) <-> $(n)",
+                                    PLOG_3(PLOG_U64(f),PLOG_I64(i),PLOG_I64(n)), f, id, newid));
+                            }
+                            f++;
+                        }
+                    }}
+                }
+                KIndexRelease(kidx);
+            }
+            KTableRelease(ktbl);
+        }
+        KDBManagerRelease(kmgr);
+    }
+    LOGERR(rc == 0 ? klogInfo : klogErr, rc, "Done");
+    return rc;
+}
diff --git a/tools/fuse/file.c b/tools/fuse/file.c
new file mode 100644
index 0000000..a7548a5
--- /dev/null
+++ b/tools/fuse/file.c
@@ -0,0 +1,275 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <klib/namelist.h>
+#include <klib/printf.h>
+#include <kxml/xml.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <krypto/encfile.h>
+#include <krypto/key.h>
+
+typedef struct FileNode FileNode;
+#define FSNODE_IMPL FileNode
+
+#include "log.h"
+#include "xml.h"
+#include "file.h"
+#include "kfile-accessor.h"
+
+#include <string.h>
+#include <stdlib.h>
+#include <time.h>
+
+struct FileNode {
+    FSNode node;
+    char* path;
+    KTime_t mtime;
+    KKey key;
+};
+
+static
+rc_t FileNode_Attr(const FileNode* cself, const char* subpath, uint32_t* type, KTime_t* ts, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz)
+{
+    rc_t rc = 0;
+    KDirectory* dir = NULL;
+
+    if( subpath != NULL ) {
+        rc = RC(rcExe, rcFile, rcEvaluating, rcDirEntry, rcNotFound);
+    } else if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+        *type = KDirectoryPathType(dir, "%s", cself->path);
+        DEBUG_LINE(8, "file type %x", *type);
+        if( cself->mtime != 0 ) {
+            *ts = cself->mtime;
+        } else if( (rc = KDirectoryDate(dir, ts, "%s", cself->path)) == 0 ) {
+            DEBUG_LINE(8, "file mtime %u", *ts);
+        }
+        if( rc == 0 && (rc = KDirectoryAccess(dir, access, "%s", cself->path)) == 0 ) {
+            DEBUG_LINE(8, "file access %x", *access);
+            if( *type & kptAlias ) {
+                char r[10240];
+                if( (rc = KDirectoryResolveAlias(dir, true, r, sizeof(r), "%s", cself->path)) == 0 ) {
+                    *file_sz = strlen(r);
+                }
+            } else if( *type == kptFile ) { 
+                rc = KDirectoryFileSize(dir, file_sz, "%s", cself->path);
+            }
+        }
+        ReleaseComplain(KDirectoryRelease, dir);
+    }
+    return rc;
+}
+
+static
+rc_t FileNode_Link(const FileNode* cself, const char* subpath, char* buf, size_t buf_sz)
+{
+    rc_t rc = 0;
+    KDirectory* dir = NULL;
+
+    if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+        rc = KDirectoryResolveAlias(dir, true, buf, buf_sz, "%s", cself->path);
+        ReleaseComplain(KDirectoryRelease, dir);
+    }
+    return rc;
+}
+
+static
+rc_t FileNode_Open(const FileNode* cself, const char* subpath, const SAccessor** accessor)
+{
+    rc_t rc = 0;
+
+    if( subpath != NULL ) {
+        rc = RC(rcExe, rcFile, rcOpening, rcDirEntry, rcNotFound);
+    } else {
+        KDirectory* dir = NULL;
+        if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+            const KFile* kf = NULL;
+            const KFile* enc_kf = NULL;
+            const KFile* immediate = NULL;
+            if( (rc = KDirectoryOpenFileRead(dir, &kf, "%s", cself->path)) == 0 ) {
+                immediate = kf;
+                if( cself->key.type != kkeyNone ) {
+                    /* TODO: what is the correct way to release KFile objects */
+                    rc = KEncFileMakeRead (&enc_kf, kf, &cself->key);
+                    immediate = enc_kf;
+                }
+                if( rc == 0 ) {
+                    if( (rc = KFileAccessor_Make(accessor, cself->node.name, immediate)) != 0 ) {
+                        ReleaseComplain(KFileRelease, immediate);
+                    }
+                }
+                
+            }
+            ReleaseComplain(KDirectoryRelease, dir);
+        }
+    }
+    if( rc != 0 ) {
+        SAccessor_Release(*accessor);
+        *accessor = NULL;
+    }
+    return rc;
+}
+
+static
+rc_t FileNode_Release(FileNode* self)
+{
+    if( self != NULL ) {
+        FREE(self->path);
+    }
+    return 0;
+}
+
+static FSNode_vtbl FileNode_vtbl = {
+    sizeof(FileNode),
+    NULL,
+    NULL,
+    FileNode_Attr,
+    NULL,
+    FileNode_Link,
+    FileNode_Open,
+    FileNode_Release
+};
+
+rc_t FileNode_Make(const KXMLNode* xml_node, FSNode** cself, char* errmsg, const char* rel_path, EXMLValidate validate)
+{
+    rc_t rc = 0;
+
+    if( xml_node == NULL || cself == NULL || errmsg == NULL || rel_path == NULL ) {
+        rc = RC(rcExe, rcNode, rcConstructing, rcParam, rcNull);
+    } else {
+        char* path = NULL, *name = NULL, name_buf[4096], password[4096];
+        KTime_t ktm = 0;
+        FileNode* ff = NULL;
+        size_t password_sz = 0;
+
+        if( (rc = KXMLNodeReadAttrCStr(xml_node, "path", &path, NULL)) == 0 ) {
+            if( path[0] == '\0' ) {
+                rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+            } else {
+                KDirectory* dir = NULL;
+                if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+                    if( path[0] != '/' ) {
+                        char resolved[4096];
+                        if( (rc = KDirectoryResolvePath(dir, true, resolved, sizeof(resolved),
+                                                                  "%s%s", rel_path, path)) == 0 ) {
+                            DEBUG_LINE(8, "%s%s resolved to %s", rel_path, path, resolved);
+                            FREE(path);
+                            rc = StrDup(resolved, &path);
+                        }
+                    }
+                    if( rc == 0 && validate > eXML_NoCheck ) {
+                        uint32_t t = KDirectoryPathType(dir, "%s", path);
+                        if( (t != kptFile && t != (kptFile | kptAlias)) &&
+                            (t != kptCharDev && t != (kptCharDev | kptAlias)) &&
+                            (t != kptBlockDev && t != (kptBlockDev | kptAlias)) &&
+                            (t != kptFIFO && t != (kptFIFO | kptAlias))  ) {
+                            if( validate > eXML_NoFail ) {
+                                rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, t == kptNotFound ? rcNotFound : rcInvalid);
+                            } else {
+                                PLOGMSG(klogErr, (klogErr, "File path '$(p)' not found", "p=%s", path));
+                            }
+                        }
+                    }
+                    ReleaseComplain(KDirectoryRelease, dir);
+                }
+            }
+        }
+        if( rc != 0 ) {
+            strcpy(errmsg, "File/@path: '");
+            strcat(errmsg, path ? path : "(null)");
+            strcat(errmsg, "'");
+        }
+        if( rc == 0 ) {
+            rc = KXMLNodeReadAttrCString(xml_node, "name", name_buf, sizeof(name_buf), &password_sz);
+            if( rc == 0 && name_buf[0] != '\0' ) {
+                name = name_buf;
+            } else if( GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound ) {
+                rc = 0;
+            }
+            if( rc != 0 ) {
+                strcpy(errmsg, "File/@name");
+            } else if( name == NULL ) {
+                name = strrchr(path, '/');
+                name = name ? name + 1 : path;
+            }
+        }
+        if( rc == 0 && (rc = XML_ParseTimestamp(xml_node, "timestamp", &ktm, true)) != 0 ) {
+            strcpy(errmsg, "File/@timestamp");
+        }
+        if( rc == 0 ) {
+            rc = KXMLNodeReadAttrCString(xml_node, "password", password, sizeof(password), &password_sz);
+            if( rc == 0 || (GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+                rc = 0;
+                password_sz = 0;
+            } else {
+                strcpy(errmsg, "File/@password");
+            }
+        }
+        if( rc == 0 ) {
+            struct KNamelist const* attr = NULL;
+            if( (rc = KXMLNodeListAttr(xml_node, &attr)) == 0 ) {
+                uint32_t i = 0, count = 0;
+                if( (rc = KNamelistCount(attr, &count)) == 0 && count > 0 ) {
+                    while( rc == 0 && i < count ) {
+                        const char *attr_nm = NULL;
+                        if( (rc = KNamelistGet(attr, i++, &attr_nm)) != 0 ) {
+                            break;
+                        }
+                        if( strcmp("path", attr_nm) == 0 || strcmp("name", attr_nm) == 0 ||
+                            strcmp("timestamp", attr_nm) == 0 || strcmp("password", attr_nm) == 0 ) {
+                            continue;
+                        }
+                        rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+                        strcpy(errmsg, "unknown attribute File/@");
+                        strcat(errmsg, attr_nm);
+                    }
+                }
+                ReleaseComplain(KNamelistRelease, attr);
+            }
+        }
+        if( rc == 0 ) {
+            if( (rc = FSNode_Make((FSNode**)&ff, name, &FileNode_vtbl)) == 0 ) {
+                ff->path = path;
+                ff->mtime = ktm;
+                if( password_sz > 0 ) {
+                    rc = KKeyInitRead(&ff->key, kkeyAES128, password, password_sz);
+                } else {
+                    memset(&ff->key, 0, sizeof ff->key);
+                    ff->key.type = kkeyNone;
+                }
+            } else {
+                strcpy(errmsg, "File '");
+                strcat(errmsg, name);
+                strcat(errmsg, "'");
+            }
+        }
+        if( rc == 0 ) {
+            *cself = &ff->node;
+        } else {
+            FREE(path);
+        }
+    }
+    return rc;
+}
diff --git a/tools/fuse/file.h b/tools/fuse/file.h
new file mode 100644
index 0000000..9f9d2e4
--- /dev/null
+++ b/tools/fuse/file.h
@@ -0,0 +1,33 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_file_
+#define _h_sra_fuse_file_
+
+#include "node.h"
+
+rc_t FileNode_Make(const KXMLNode* xml_node, FSNode** cself, char* errmsg, const char* rel_path, EXMLValidate validate);
+
+#endif /* _h_sra_fuse_file_ */
diff --git a/tools/fuse/formats.c b/tools/fuse/formats.c
new file mode 100644
index 0000000..fd283e0
--- /dev/null
+++ b/tools/fuse/formats.c
@@ -0,0 +1,443 @@
+/*===========================================================================
+ *
+ *                            Public DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ */
+#include <klib/rc.h>
+#include <klib/checksum.h>
+#include <klib/printf.h>
+#include <kfs/file.h>
+#include <kdb/table.h>
+#include <kdb/index.h>
+
+#include <sra/sradb-priv.h>
+
+#include "log.h"
+#include "zlib-simple.h"
+#include "sra-list.h"
+#include "formats.h"
+#include "text-file.h"
+#include "sra-fastq.h"
+#include "sra-sff.h"
+
+#include <string.h>
+#include <assert.h>
+#include <ctype.h>
+#include <stdlib.h>
+
+static
+rc_t FileOptions_MakeSuffix(FileOptions* self, const char* suffix, KTime_t ts)
+{
+    rc_t rc = 0;
+
+    if( suffix == NULL ) {
+        rc = RC(rcExe, rcFormat, rcReading, rcParam, rcNull);
+    } else if( strlen(suffix) > FILEOPTIONS_BUFFER - 2 ) {
+        rc = RC(rcExe, rcFormat, rcReading, rcBuffer, rcInsufficient);
+    } else {
+        strcpy(self->suffix, (isalnum(suffix[0]) && suffix[0] != '_') ? "." : "");
+        strcat(self->suffix, suffix);
+    }
+    return rc;
+}
+
+rc_t FileOptions_Make(FileOptions** self, uint32_t count)
+{
+    assert(self != NULL);
+    CALLOC(*self, count, sizeof(**self));
+    if( *self == NULL ) {
+        return RC(rcExe, rcTable, rcAllocating, rcMemory, rcExhausted);
+    }
+    return 0;
+}
+
+void FileOptions_Release(FileOptions* self)
+{
+    if( self != NULL ) {
+        FREE(self);
+    }
+}
+
+rc_t FileOptions_Clone(FileOptions** self, const FileOptions* src, uint32_t count)
+{
+    rc_t rc = 0;
+
+    if( self == NULL || src == NULL ) {
+        rc = RC(rcExe, rcTable, rcCopying, rcParam, rcNull);
+    } else if( (rc = FileOptions_Make(self, count)) == 0 ) {
+        memcpy(*self, src, sizeof(**self) * count);
+    }
+    return rc;
+}
+
+rc_t FileOptions_SRAArchive(FileOptions* self, const SRATable* tbl, KTime_t ts, bool lite)
+{
+    rc_t rc = 0;
+
+    if( tbl == NULL || self == NULL ) {
+        rc = RC(rcExe, rcFormat, rcReading, rcParam, rcNull);
+    } else {
+        const KFile* sfa = NULL;
+        const char* ext;
+        if( (rc = SRATableMakeSingleFileArchive(tbl, &sfa, lite, &ext)) == 0 ) {
+            if( (rc = KFileSize(sfa, &self->file_sz)) == 0 &&
+                (rc = FileOptions_MakeSuffix(self, ext, ts)) == 0 ) {
+                self->type = lite ? eSRAFuseFmtArcLite : eSRAFuseFmtArc;
+                self->f.sra.lite = lite;
+            }
+            ReleaseComplain(KFileRelease, sfa);
+        }
+    }
+    return rc;
+}
+
+rc_t FileOptions_SRAArchiveInstant(FileOptions* self, FileOptions* fmd5,
+                                   const SRAMgr* mgr, const char* accession, const char* path,
+                                   const bool lite, KTime_t ts, uint64_t size, char md5[32])
+{
+    rc_t rc = 0;
+
+    if( self == NULL || mgr == NULL || accession == NULL || fmd5 == NULL ) {
+        rc = RC(rcExe, rcFormat, rcReading, rcParam, rcNull);
+    } else {
+        const char* ext;
+
+        /* Only support non-lite files, if lite is needed fix this*/
+        /*if (lite)
+        {
+            PLOGERR(klogErr, (klogErr, 0, "lite flag is not supported, get rid of lite flag in xml, in FileOptions_SRAArchiveInstant for path or accession = $(a)", PLOG_S(a), path ? path : accession));
+            abort();
+        }
+        assert(!lite);*/
+        ext = lite ? ".lite.sra" : ".sra";
+
+        if( (rc = FileOptions_MakeSuffix(self, ext, ts)) == 0 ) {
+            self->file_sz = size;
+            self->type = lite ? eSRAFuseFmtArcLite : eSRAFuseFmtArc;
+            self->f.sra.lite = lite;
+            memcpy(self->md5, md5, sizeof(self->md5));
+            if( (rc = FileOptions_AttachMD5(self, accession, fmd5)) == 0 ) {
+                rc = FileOptions_UpdateMD5(self, accession);
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t FileOptions_SRAArchiveUpdate(FileOptions* self, const char* name,
+                                  KTime_t ts, uint64_t size, char md5[32])
+{
+    rc_t rc = 0;
+
+    if( self == NULL || name == NULL ) {
+        rc = RC(rcExe, rcFormat, rcReading, rcParam, rcNull);
+    } else {
+        self->file_sz = size;
+        if( md5 == NULL ) {
+            memset(self->md5, 0, sizeof(self->md5));
+        } else {
+            memcpy(self->md5, md5, sizeof(self->md5));
+        }
+        rc = FileOptions_UpdateMD5(self, name);
+    }
+    return rc;
+}
+
+rc_t FileOptions_AttachMD5(FileOptions* self, const char* name, FileOptions* md5)
+{
+    rc_t rc = 0;
+    if( name == NULL || self == NULL || md5 == NULL ) {
+        rc = RC(rcExe, rcFormat, rcAttaching, rcParam, rcInvalid);
+    } else {
+        switch(self->type) {
+            case eSRAFuseFmtFastq:
+            case eSRAFuseFmtFastqGz:
+                md5->type = eSRAFuseFmtFastqMD5;
+                break;
+            case eSRAFuseFmtSFF:
+            case eSRAFuseFmtSFFGz:
+                md5->type = eSRAFuseFmtSFFMD5;
+                break;
+            case eSRAFuseFmtArc:
+                md5->type = eSRAFuseFmtArcMD5;
+                break;
+            case eSRAFuseFmtArcLite:
+                md5->type = eSRAFuseFmtArcLiteMD5;
+                break;
+            default:
+                rc = RC(rcExe, rcFormat, rcReading, rcType, rcUnexpected);
+        }
+        if( rc == 0 ) {
+            char buf[sizeof(md5->suffix)];
+
+            strcpy(buf, self->suffix);
+            strcat(buf, ".md5");
+            if( (rc = FileOptions_MakeSuffix(md5, buf, 0)) == 0 ) {
+                self->md5_file = md5 - self;
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t FileOptions_CalcMD5(FileOptions* self, const char* name, const SRAListNode* sra)
+{
+    rc_t rc = 0;
+
+    if( self == NULL || sra == NULL || name == NULL ) {
+        rc = RC(rcExe, rcFormat, rcProcessing, rcParam, rcInvalid);
+    } else if( self->md5[0] == '\0' ) {
+        const KFile* kfile;
+        if( (rc = FileOptions_OpenFile(self, sra, &kfile)) == 0 ) {
+            MD5State md5;
+            uint64_t pos = 0;
+            uint8_t buffer[256 * 1024];
+            size_t num_read = 0, x;
+
+            MD5StateInit(&md5);
+            do {
+                if( (rc = KFileRead(kfile, pos, buffer, sizeof(buffer), &num_read)) == 0 ) {
+                    MD5StateAppend(&md5, buffer, num_read);
+                    pos += num_read;
+                }
+            } while(rc == 0 && num_read != 0);
+            if( rc == 0 ) {
+                uint8_t digest[16];
+                char smd5[sizeof(self->md5) + 1];
+                MD5StateFinish(&md5, digest);
+                for(pos = 0, x = 0; rc == 0 && pos < sizeof(digest); pos++) {
+                    rc = string_printf(&smd5[x], sizeof(smd5) - x, &num_read, "%02x", digest[pos]);
+                    x += num_read;
+                }
+                memcpy(self->md5, smd5, sizeof(self->md5));
+                DEBUG_LINE(10, "%s %s %.*s", self->suffix, name, sizeof(self->md5), self->md5);
+            }
+            KFileRelease(kfile);
+        }
+    }
+    return rc;
+}
+
+rc_t FileOptions_UpdateMD5(FileOptions* self, const char* name)
+{
+    rc_t rc = 0;
+    
+    if( self == NULL || name == NULL ) {
+        rc = RC(rcExe, rcFormat, rcUpdating, rcParam, rcInvalid);
+    } else if( self->md5_file != 0 ) {
+        FileOptions* md5 = &self[self->md5_file];
+        if( self->md5[0] != '\0' ) {
+            size_t nw;
+            rc = string_printf(md5->f.txt64b, sizeof(md5->f.txt64b), &nw,
+                "%.*s *%s%s\n", sizeof(self->md5), self->md5, name, self->suffix);
+            md5->file_sz = rc ? 0 : nw;
+        } else {
+            md5->f.txt64b[0] = '\0';
+            md5->file_sz = 0;
+        }
+    }
+    return rc;
+}
+
+rc_t FileOptions_OpenFile(const FileOptions* cself, const struct SRAListNode* sra, const KFile** kfile)
+{
+    rc_t rc = 0;
+
+    assert(cself != NULL);
+    assert(kfile != NULL);
+    *kfile = NULL;
+    switch(cself->type) {
+        case eSRAFuseFmtArc:
+        case eSRAFuseFmtArcLite:
+            {{
+            const SRATable* tbl = NULL;
+            if( (rc = SRAListNode_TableOpen(sra, &tbl)) == 0 ) {
+                rc = SRATableMakeSingleFileArchive(tbl, kfile, cself->f.sra.lite, NULL);
+                ReleaseComplain(SRATableRelease, tbl);
+            }
+            }}
+            break;
+
+        case eSRAFuseFmtFastqMD5:
+        case eSRAFuseFmtSFFMD5:
+        case eSRAFuseFmtArcMD5:
+        case eSRAFuseFmtArcLiteMD5:
+            rc = TextFile_Open(kfile, cself);
+            break;
+
+        case eSRAFuseFmtFastq:
+        case eSRAFuseFmtFastqGz:
+            rc = SRAFastqFile_Open(kfile, sra, cself);
+            break;
+
+        case eSRAFuseFmtSFF:
+        case eSRAFuseFmtSFFGz:
+            rc = SRASFFFile_Open(kfile, sra, cself);
+            break;
+    }
+    return rc;
+}
+
+rc_t FileOptions_ParseMeta(FileOptions* self, const KMDataNode* file, const SRATable* tbl, KTime_t ts, const char* suffix)
+{
+    rc_t rc = 0;
+
+    if( file == NULL || self == NULL || suffix == NULL ) {
+        rc = RC(rcExe, rcFormat, rcReading, rcParam, rcNull);
+    } else if( strlen(suffix) > FILEOPTIONS_BUFFER - 2 ) {
+        rc = RC(rcExe, rcFormat, rcReading, rcBuffer, rcInsufficient);
+    } else if( (rc = FileOptions_MakeSuffix(self, suffix, ts)) == 0 ) {
+        const KMDataNode* format = NULL;
+        if( (rc = KMDataNodeOpenNodeRead(file, &format, "Format")) == 0 ) {
+            char fmt_name[32];
+            size_t read = 0;
+            if( (rc = KMDataNodeReadCString(format, fmt_name, sizeof(fmt_name), &read)) == 0 ) {
+                const KMDataNode* tmp = NULL;
+                fmt_name[read] = '\0';
+                if( rc == 0 && (rc = KMDataNodeOpenNodeRead(file, &tmp, "Size")) == 0 ) {
+                    rc = KMDataNodeReadB64(tmp, &self->file_sz);
+                    ReleaseComplain(KMDataNodeRelease, tmp);
+                }
+                if( rc == 0 && (rc = KMDataNodeOpenNodeRead(file, &tmp, "Buffer")) == 0 ) {
+                    rc = KMDataNodeReadB32(tmp, &self->buffer_sz);
+                    ReleaseComplain(KMDataNodeRelease, tmp);
+                }
+                if( rc == 0 && (rc = KMDataNodeOpenNodeRead(file, &tmp, "Index")) == 0 ) {
+                    if( (rc = KMDataNodeReadCString(tmp, self->index, sizeof(self->index) - 1, &read)) == 0 && tbl != NULL ) {
+                        const KTable* ktbl = NULL;
+                        if( (rc = SRATableGetKTableRead(tbl, &ktbl)) == 0 ) {
+                            const KIndex* kidx = NULL;
+                            if( (rc = KTableOpenIndexRead(ktbl, &kidx, self->index)) == 0 ) {
+                                ReleaseComplain(KIndexRelease, kidx);
+                            }
+                            ReleaseComplain(KTableRelease, ktbl);
+                        }
+                    }
+                    ReleaseComplain(KMDataNodeRelease, tmp);
+                }
+                if( rc == 0 && KMDataNodeOpenNodeRead(file, &tmp, "md5") == 0 ) {
+                    rc = KMDataNodeReadCString(tmp, self->md5, sizeof(self->md5), &read);
+                    ReleaseComplain(KMDataNodeRelease, tmp);
+                }
+                if( rc == 0 ) {
+                    if(strcmp(fmt_name, "fastq") == 0 || strcmp(fmt_name, "fastq-gzip") == 0 ) {
+                        if( strcmp(fmt_name, "fastq-gzip") == 0 ) {
+                            self->type = eSRAFuseFmtFastqGz;
+                            self->f.fastq.gzip = true;
+                            if( (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/ZlibVersion")) == 0 ) {
+                                uint16_t v = 0;
+                                rc = KMDataNodeReadB16(tmp, &v);
+                                ReleaseComplain(KMDataNodeRelease, tmp);
+                                if( rc == 0 && v > ZLIB_VERNUM ) {
+                                    PLOGMSG(klogWarn, (klogWarn, "ZLib version old: $(v) < $(mj).$(mn).$(b)",
+                                        PLOG_4(PLOG_S(v),PLOG_U8(mj),PLOG_U8(mn),PLOG_U8(b)),
+                                        ZLIB_VERSION, v & 0xF000, v & 0x0F00, v & 0x00FF));
+                                }
+                            }
+                        } else {
+                            self->type = eSRAFuseFmtFastq;
+                        }
+
+                        if( rc == 0 && (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/accession")) == 0 ) {
+                            rc = KMDataNodeReadCString(tmp, self->f.fastq.accession, sizeof(self->f.fastq.accession) - 1, &read);
+                            ReleaseComplain(KMDataNodeRelease, tmp);
+                        }
+                        if( rc == 0 && (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/minSpotId")) == 0 ) {
+                            rc = KMDataNodeReadB64(tmp, &self->f.fastq.minSpotId);
+                            ReleaseComplain(KMDataNodeRelease, tmp);
+                        }
+                        if( rc == 0 && (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/maxSpotId")) == 0 ) {
+                            rc = KMDataNodeReadB64(tmp, &self->f.fastq.maxSpotId);
+                            ReleaseComplain(KMDataNodeRelease, tmp);
+                        }
+                        if( rc == 0 && (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/colorSpace")) == 0 ) {
+                            rc = KMDataNodeReadB8(tmp, &self->f.fastq.colorSpace);
+                            ReleaseComplain(KMDataNodeRelease, tmp);
+                        }
+                        if( rc == 0 && (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/colorSpaceKey")) == 0 ) {
+                            rc = KMDataNodeRead(tmp, 0, &self->f.fastq.colorSpaceKey, 1, &read, NULL);
+                            ReleaseComplain(KMDataNodeRelease, tmp);
+                        }
+                        if( rc == 0 && (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/origFormat")) == 0 ) {
+                            rc = KMDataNodeReadB8(tmp, &self->f.fastq.origFormat);
+                            ReleaseComplain(KMDataNodeRelease, tmp);
+                        }
+                        if( rc == 0 && (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/printLabel")) == 0 ) {
+                            rc = KMDataNodeReadB8(tmp, &self->f.fastq.printLabel);
+                            ReleaseComplain(KMDataNodeRelease, tmp);
+                        }
+                        if( rc == 0 && (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/printReadId")) == 0 ) {
+                            rc = KMDataNodeReadB8(tmp, &self->f.fastq.printReadId);
+                            ReleaseComplain(KMDataNodeRelease, tmp);
+                        }
+                        if( rc == 0 && (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/clipQuality")) == 0 ) {
+                            rc = KMDataNodeReadB8(tmp, &self->f.fastq.clipQuality);
+                            ReleaseComplain(KMDataNodeRelease, tmp);
+                        }
+                        if( rc == 0 && (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/minReadLen")) == 0 ) {
+                            rc = KMDataNodeReadB32(tmp, &self->f.fastq.minReadLen);
+                            ReleaseComplain(KMDataNodeRelease, tmp);
+                        }
+                        if( rc == 0 && (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/qualityOffset")) == 0 ) {
+                            rc = KMDataNodeReadB16(tmp, &self->f.fastq.qualityOffset);
+                            ReleaseComplain(KMDataNodeRelease, tmp);
+                        }
+                    } else if(strcmp(fmt_name, "SFF") == 0 || strcmp(fmt_name, "SFF-gzip") == 0 ) {
+                        if( strcmp(fmt_name, "SFF-gzip") == 0 ) {
+                            self->type = eSRAFuseFmtSFFGz;
+                            self->f.sff.gzip = true;
+                            if( (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/ZlibVersion")) == 0 ) {
+                                uint16_t v = 0;
+                                rc = KMDataNodeReadB16(tmp, &v);
+                                ReleaseComplain(KMDataNodeRelease, tmp);
+                                if( rc == 0 && v > ZLIB_VERNUM ) {
+                                    PLOGMSG(klogWarn, (klogWarn, "ZLib version old: $(v) < $(mj).$(mn).$(b)",
+                                        PLOG_4(PLOG_S(v),PLOG_U8(mj),PLOG_U8(mn),PLOG_U8(b)),
+                                        ZLIB_VERSION, v & 0xF000, v & 0x0F00, v & 0x00FF));
+                                }
+                            }
+                        } else {
+                            self->type = eSRAFuseFmtSFF;
+                        }
+
+                        if( rc == 0 && (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/accession")) == 0 ) {
+                            rc = KMDataNodeReadCString(tmp, self->f.sff.accession, sizeof(self->f.sff.accession) - 1, &read);
+                            ReleaseComplain(KMDataNodeRelease, tmp);
+                        }
+                        if( rc == 0 && (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/minSpotId")) == 0 ) {
+                            rc = KMDataNodeReadB64(tmp, &self->f.sff.minSpotId);
+                            ReleaseComplain(KMDataNodeRelease, tmp);
+                        }
+                        if( rc == 0 && (rc = KMDataNodeOpenNodeRead(format, &tmp, "Options/maxSpotId")) == 0 ) {
+                            rc = KMDataNodeReadB64(tmp, &self->f.sff.maxSpotId);
+                            ReleaseComplain(KMDataNodeRelease, tmp);
+                        }
+                    } else {
+                        rc = RC(rcExe, rcFormat, rcReading, rcFormat, rcUnrecognized);
+                    }
+                }
+            }
+            ReleaseComplain(KMDataNodeRelease, format);
+        }
+    }
+    return rc;
+}
diff --git a/tools/fuse/formats.h b/tools/fuse/formats.h
new file mode 100644
index 0000000..fd472f0
--- /dev/null
+++ b/tools/fuse/formats.h
@@ -0,0 +1,157 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_sra_fuse_formats_
+#define _h_sra_fuse_formats_
+
+#include <kfs/file.h>
+#include <kdb/meta.h>
+#include <sra/sradb.h>
+
+#define FILEOPTIONS_BUFFER 32
+
+struct SRAListNode;
+
+/* DO NOT CHANGE SIZE OR ELEMENT ORDER OF THIS STRUCTURE
+   CACHE MAY FAIL! see SRAList_Init */
+typedef struct FileOptionsOld {
+    enum {
+        eOldSRAFuseFmtArc         = 0x0001,
+        eOldSRAFuseFmtArcLite     = 0x0002,
+        eOldSRAFuseFmtFastq       = 0x0004,
+        eOldSRAFuseFmtFastqGz     = 0x0008,
+        eOldSRAFuseFmtFastqMD5    = 0x0010,
+        eOldSRAFuseFmtSFF         = 0x0020,
+        eOldSRAFuseFmtSFFGz       = 0x0040,
+        eOldSRAFuseFmtSFFMD5      = 0x0080,
+        eOldSRAFuseFmtArcMD5      = 0x0100,
+        eOldSRAFuseFmtArcLiteMD5  = 0x0200
+    } type;
+    char suffix[FILEOPTIONS_BUFFER];
+    uint64_t file_sz;
+    KTime_t obsolete; /* not removed because cache is binary */
+    char index[FILEOPTIONS_BUFFER];
+    uint32_t buffer_sz;
+    
+    union {
+        char txt64b[FILEOPTIONS_BUFFER * 2];
+        struct {
+            bool lite;
+        } sra;
+        struct {
+            char accession[FILEOPTIONS_BUFFER];
+            uint64_t minSpotId;
+            uint64_t maxSpotId;
+            uint8_t colorSpace;
+            char colorSpaceKey;
+            uint8_t origFormat;
+            uint8_t printLabel;
+            uint8_t printReadId;
+            uint8_t clipQuality;
+            uint32_t minReadLen;
+            uint16_t qualityOffset;
+            bool gzip;
+        } fastq;
+        struct {
+            char accession[FILEOPTIONS_BUFFER];
+            uint64_t minSpotId;
+            uint64_t maxSpotId;
+            bool gzip;
+        } sff;
+    } f;
+} FileOptionsOld;
+
+typedef struct FileOptions {
+    enum {
+        eSRAFuseFmtArc         = 0x0001,
+        eSRAFuseFmtArcLite     = 0x0002,
+        eSRAFuseFmtFastq       = 0x0004,
+        eSRAFuseFmtFastqGz     = 0x0008,
+        eSRAFuseFmtFastqMD5    = 0x0010,
+        eSRAFuseFmtSFF         = 0x0020,
+        eSRAFuseFmtSFFGz       = 0x0040,
+        eSRAFuseFmtSFFMD5      = 0x0080,
+        eSRAFuseFmtArcMD5      = 0x0100,
+        eSRAFuseFmtArcLiteMD5  = 0x0200
+    } type;
+    char suffix[FILEOPTIONS_BUFFER];
+    uint64_t file_sz;
+    KTime_t obsolete; /* not removed because cache is binary */
+    char index[FILEOPTIONS_BUFFER];
+    uint32_t buffer_sz;
+    
+    union {
+        char txt64b[FILEOPTIONS_BUFFER * 2];
+        struct {
+            bool lite;
+        } sra;
+        struct {
+            char accession[FILEOPTIONS_BUFFER];
+            uint64_t minSpotId;
+            uint64_t maxSpotId;
+            uint8_t colorSpace;
+            char colorSpaceKey;
+            uint8_t origFormat;
+            uint8_t printLabel;
+            uint8_t printReadId;
+            uint8_t clipQuality;
+            uint32_t minReadLen;
+            uint16_t qualityOffset;
+            bool gzip;
+        } fastq;
+        struct {
+            char accession[FILEOPTIONS_BUFFER];
+            uint64_t minSpotId;
+            uint64_t maxSpotId;
+            bool gzip;
+        } sff;
+    } f;
+    /* added ver this struct 2: */
+    char md5[32];
+    int8_t md5_file; /* index relative to self with array of structs, 0 - no md5 */
+} FileOptions;
+
+rc_t FileOptions_Make(FileOptions** self, uint32_t count);
+void FileOptions_Release(FileOptions* self);
+
+rc_t FileOptions_Clone(FileOptions** self, const FileOptions* src, uint32_t count);
+
+rc_t FileOptions_SRAArchive(FileOptions* self, const SRATable* tbl, KTime_t ts, bool lite);
+rc_t FileOptions_SRAArchiveInstant(FileOptions* self, FileOptions* fmd5,
+                                   const SRAMgr* mgr, const char* accession, const char* path,
+                                   const bool lite, KTime_t ts, uint64_t size, char md5[32]);
+rc_t FileOptions_SRAArchiveUpdate(FileOptions* self, const char* name,
+                                  KTime_t ts, uint64_t size, char md5[32]);
+
+
+rc_t FileOptions_ParseMeta(FileOptions* self, const KMDataNode* file, const SRATable* tbl, KTime_t ts, const char* suffix);
+
+rc_t FileOptions_AttachMD5(FileOptions* self, const char* name, FileOptions* md5);
+rc_t FileOptions_CalcMD5(FileOptions* self, const char* name, const struct SRAListNode* sra);
+rc_t FileOptions_UpdateMD5(FileOptions* self, const char* name);
+
+rc_t FileOptions_OpenFile(const FileOptions* cself, const struct SRAListNode* sra, const KFile** kfile);
+
+#endif /* _h_sra_fuse_formats_ */
diff --git a/tools/fuse/kfile-accessor.c b/tools/fuse/kfile-accessor.c
new file mode 100644
index 0000000..6540198
--- /dev/null
+++ b/tools/fuse/kfile-accessor.c
@@ -0,0 +1,73 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <kfs/file.h>
+
+#include "log.h"
+#include "kfile-accessor.h"
+
+typedef struct KFileAccessor_struct {
+    const KFile* file;
+} KFileAccessor;
+
+static
+rc_t KFileAccessor_Read(const SAccessor* cself, char* buf, size_t size, off_t offset, size_t* num_read)
+{
+    rc_t rc = 0;
+    KFileAccessor* self = (KFileAccessor*)cself;
+    size_t actual = 0;
+
+    do {
+        rc = KFileRead(self->file, offset + *num_read, &buf[*num_read], size - *num_read, &actual);
+        if( rc == 0 && actual == 0 ) {
+            /* EOF */
+            break;
+        }
+        *num_read += actual;
+    } while(rc == 0 && *num_read < size);
+    DEBUG_MSG(10, ("From %lu read %lu bytes\n", offset, *num_read));
+    return rc;
+}
+
+static
+rc_t KFileAccessor_Release(const SAccessor* cself)
+{
+    rc_t rc = 0;
+    if( cself != NULL ) {
+        KFileAccessor* self = (KFileAccessor*)cself;
+        rc = KFileRelease(self->file);
+    }
+    return rc;
+}
+
+rc_t KFileAccessor_Make(const SAccessor** accessor, const char* name, const KFile* kfile)
+{
+    rc_t rc = 0;
+
+    if( (rc = SAccessor_Make(accessor, sizeof(KFileAccessor), name, KFileAccessor_Read, KFileAccessor_Release)) == 0 ) {
+        ((KFileAccessor*)(*accessor))->file = kfile;
+    }
+    return rc;
+}
diff --git a/tools/fuse/kfile-accessor.h b/tools/fuse/kfile-accessor.h
new file mode 100644
index 0000000..e021bbf
--- /dev/null
+++ b/tools/fuse/kfile-accessor.h
@@ -0,0 +1,33 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_accessor_kfile_
+#define _h_sra_fuse_accessor_kfile_
+
+#include "accessor.h"
+
+rc_t KFileAccessor_Make(const SAccessor** accessor, const char* name, const KFile* kfile);
+
+#endif /* _h_sra_fuse_accessor_kfile_ */
diff --git a/tools/fuse/log.c b/tools/fuse/log.c
new file mode 100644
index 0000000..9c48c12
--- /dev/null
+++ b/tools/fuse/log.c
@@ -0,0 +1,196 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <kfs/directory.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <kproc/thread.h>
+
+#include "log.h"
+#include "debug.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <pthread.h>
+
+static unsigned int g_sync = 0;
+static char* g_path = NULL;
+static int g_fd = -1;
+static KThread* g_thread = NULL;
+static bool g_foreground = false;
+
+rc_t StrDup(const char* src, char** dst)
+{
+    if( src == NULL || dst == NULL ) {
+        return RC(rcExe, rcString, rcCopying, rcParam, rcNull);
+    } else {
+        size_t sz = strlen(src);
+        MALLOC(*dst, sz + 1);
+        if( dst == NULL ) {
+            return RC(rcExe, rcString, rcCopying, rcMemory, rcExhausted);
+        }
+        memcpy(*dst, src, sz);
+        (*dst)[sz] = '\0';
+    }
+    return 0;
+}
+
+static
+rc_t LogFileOpen(void)
+{
+    rc_t rc = 0;
+    int old_fd = -1;
+
+    if( g_path != NULL ) {
+        int new_fd = open(g_path, O_WRONLY | O_APPEND | O_CREAT, 0664);
+        if( new_fd < 0 ) {
+            rc = RC(rcExe, rcLog, rcOpening, rcNoObj, rcIncomplete);
+            PLOGERR(klogErr, (klogErr, rc, "'$(s)': $(e)", PLOG_2(PLOG_S(s),PLOG_S(e)), g_path, strerror(errno)));
+        } else {
+            old_fd = g_fd;
+            g_fd = new_fd;
+            
+            DEBUG_MSG(1, ("Log file opened '%s'\n", g_path));
+            
+            if( g_foreground ) {
+                if( dup2(g_fd, STDOUT_FILENO) < 0) {
+                    PLOGMSG(klogErr, (klogErr, "Cannot dup2(stdout) on '$(s)'", PLOG_S(s), g_path));
+                }
+                if( dup2(g_fd, STDERR_FILENO) < 0) {
+                    PLOGMSG(klogErr, (klogErr, "Cannot dup2(stderr) on '$(s)'", PLOG_S(s), g_path));
+                }
+            }
+        }
+    }
+    if( old_fd > -1 ) {
+        sleep(2);
+        close(old_fd);
+    }
+    return rc;
+}
+
+static
+rc_t LogThread( const KThread *self, void *data )
+{
+    PLOGMSG(klogInfo, (klogInfo, "Log rotation thread started with $(s) sec", PLOG_U32(s), g_sync));
+    while( g_sync > 0 ) {
+        sleep(g_sync);
+        DEBUG_MSG(1, ("Log rotation thread checking %s\n", g_path));
+        if( g_sync < 1 || g_path == NULL ) {
+            break;
+        }
+        LogFileOpen();
+    }
+    LOGMSG(klogInfo, "Log rotation thread ended");
+    return 0;
+}
+
+static
+rc_t LogFileWrite(void *self, const char *buffer, size_t bufsize, size_t *num_writ)
+{
+    rc_t rc = 0;
+
+    *num_writ = bufsize;
+    if( g_fd > -1 ) {
+        char tid[64 * 1024];
+        if( bufsize <= (sizeof(tid) - (1 + 5 + 1 + 15 + 2)) ) {
+            int x = sprintf(tid, "[%i/%x] ", getpid(), (unsigned int)pthread_self());
+            memcpy(&tid[x], buffer, bufsize);
+            bufsize += x;
+            if( pwrite(g_fd, tid, bufsize, SEEK_END) != bufsize ) {
+                rc = RC(rcExe, rcLog, rcWriting, rcNoObj, rcIncomplete);
+            }
+        } else {
+            if( pwrite(g_fd, buffer, bufsize, SEEK_END) != bufsize ) {
+                rc = RC(rcExe, rcLog, rcWriting, rcNoObj, rcIncomplete);
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t LogFile_Init(const char* path, unsigned int sync, bool foreground, int* log_fd)
+{
+    rc_t rc = 0;
+
+    if( path != NULL ) {
+        KDirectory *dir = NULL;
+        if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+            char buf[4096];
+            if( (rc = KDirectoryResolvePath(dir, true, buf, 4096, "%s", path)) == 0 ) {
+                if( (rc = StrDup(buf, &g_path)) == 0 ) {
+                    if( (rc = KOutHandlerSet(LogFileWrite, NULL)) == 0 &&
+                        (rc = KDbgHandlerSet(LogFileWrite, NULL)) == 0 &&
+                        (rc = KLogHandlerSet(LogFileWrite, NULL)) == 0 &&
+                        (rc = KLogLibHandlerSet(LogFileWrite, NULL)) == 0 &&
+                        (rc = KStsHandlerSet(LogFileWrite, NULL)) == 0 &&
+                        (rc = KStsLibHandlerSet(LogFileWrite, NULL)) == 0 ) {
+                        g_sync = sync;
+                        g_foreground = foreground;
+                        if( g_sync > 0 ) {
+                            PLOGMSG(klogInfo, (klogInfo, "Log $(x) rotation set to $(s) seconds",
+                                     PLOG_2(PLOG_S(x),PLOG_U32(s)), g_path, g_sync));
+                        }
+                    }
+                }
+            }
+            ReleaseComplain(KDirectoryRelease, dir);
+        }
+    }
+    rc = LogFileOpen();
+    if( rc == 0 && path == NULL && g_sync > 0 ) {
+        if( (rc = KThreadMake(&g_thread, LogThread, NULL)) != 0 ) {
+            LOGERR(klogErr, rc, "Log rotation thread");
+        } else {
+            DEBUG_MSG(1, ("Log rotation thread launched %s\n", g_sync));
+        }
+    }
+    if( log_fd != NULL && g_fd != -1) {
+        *log_fd = g_fd;
+    }
+    return rc;
+}
+
+void LogFile_Fini(void)
+{
+    g_sync = 0;
+    if( g_thread != NULL ) {
+        ReleaseComplain(KThreadCancel, g_thread);
+        ReleaseComplain(KThreadRelease, g_thread);
+    }
+    if( g_fd >= 0 ) {
+        close(g_fd);
+    }
+    FREE(g_path);
+    g_path = NULL;
+    g_fd = -1;
+    g_thread = NULL;
+}
diff --git a/tools/fuse/log.h b/tools/fuse/log.h
new file mode 100644
index 0000000..4a42e6d
--- /dev/null
+++ b/tools/fuse/log.h
@@ -0,0 +1,53 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_services_sra_fuser_log_
+#define _h_services_sra_fuser_log_
+
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include "debug.h"
+
+#define ReleaseComplain(release, obj) \
+    {{ \
+       rc_t t_rc_ = release(obj); \
+       if( t_rc_ != 0 ) { \
+       PLOGERR(klogWarn, (klogWarn, t_rc_, "$(file):$(line):$(func): " #release "(" #obj ")", \
+                                    "file=%s,line=%u,func=%s", __FILE__, __LINE__, __func__)); \
+       } \
+    }}
+
+rc_t StrDup(const char* src, char** dst);
+
+/*
+ * Set path to logfile and optional (0) log reopen thread timeout
+ * if path is NULL (re)starts watch thread if needed (sync value ignored)
+ */
+rc_t LogFile_Init(const char* path, unsigned int sync, bool foreground, int* log_fd);
+
+void LogFile_Fini(void);
+
+#endif /* _h_services_sra_fuser_log_ */
diff --git a/tools/fuse/node.c b/tools/fuse/node.c
new file mode 100644
index 0000000..4d2f6cf
--- /dev/null
+++ b/tools/fuse/node.c
@@ -0,0 +1,273 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+#include "log.h"
+#include "node.h"
+
+rc_t FSNode_Make(FSNode** self, const char* name, const FSNode_vtbl* vtbl)
+{
+    rc_t rc = 0;
+
+    if( self == NULL || vtbl == NULL ) {
+        rc = RC(rcExe, rcNode, rcConstructing, rcParam, rcNull);
+    } else if( vtbl->Attr == NULL ) {
+        rc = RC(rcExe, rcNode, rcConstructing, rcInterface, rcInsufficient);
+    } else {
+        const char* x = name;
+        while( rc == 0 && *x != '\0' ) {
+            if( *x < 32 || !isascii(*x) || strchr("\"*/:<>?\\|", *x) != NULL ) {
+                rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+            }
+            x++;
+        }
+        if( rc == 0 ) {
+            CALLOC(*self, 1, vtbl->type_size + (x - name + 1));
+            if( *self == NULL ) {
+                rc = RC(rcExe, rcNode, rcConstructing, rcMemory, rcExhausted);
+            } else {
+                char* x = (char*)(*self);
+                (*self)->vtbl = vtbl;
+                (*self)->name = &x[vtbl->type_size];
+                strcpy(&x[vtbl->type_size], name);
+            }
+        }
+    }
+    return rc;
+}
+
+static
+void FSNode_DropChildren(FSNode* self)
+{
+    if( self != NULL ) {
+        const FSNode* c = self->children;
+        while( c != NULL ) {
+            const FSNode* sib = c->sibling;
+            FSNode_Release(c);
+            c = sib;
+        }
+        self->children = NULL;
+    }
+}
+
+rc_t FSNode_AddChild(FSNode* self, const FSNode* child)
+{
+    rc_t rc = 0;
+    if( self == NULL || child == NULL ) {
+        rc = RC(rcExe, rcNode, rcAttaching, rcParam, rcNull);
+    } else {
+        DEBUG_MSG(8, ("Adding to %s child %s\n", self->name, child->name));
+        if( child->sibling != NULL ) {
+            rc = RC(rcExe, rcDoc, rcAttaching, rcDirEntry, rcAmbiguous);
+        } else if( self->children == NULL ) {
+            self->children = child;
+        } else {
+            const FSNode* ch = self->children;
+            while( rc == 0 && ch != NULL ) {
+                if( strcmp(child->name, ch->name) == 0 ) {
+                    rc = RC(rcExe, rcDoc, rcAttaching, rcDirEntry, rcDuplicate);
+                } else if( ch->sibling == NULL ) {
+                    ((FSNode*)ch)->sibling = child;
+                    break;
+                }
+                ch = ch->sibling;
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t FSNode_GetName(const FSNode* cself, const char** name)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || name == NULL ) {
+        rc = RC(rcExe, rcNode, rcEvaluating, rcParam, rcNull);
+    } else {
+        *name = cself->name;
+    }
+    return rc;
+}
+
+rc_t FSNode_HasChildren(const FSNode* cself, bool* test)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || test == NULL ) {
+        rc = RC(rcExe, rcDirectory, rcListing, rcParam, rcNull);
+    } else {
+        *test = cself->children != NULL;
+    }
+    return rc;
+}
+
+rc_t FSNode_ListChildren(const FSNode* cself, FSNode_Dir_Visit func, void* data)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || func == NULL ) {
+        rc = RC(rcExe, rcDirectory, rcListing, rcParam, rcNull);
+    } else {
+        const FSNode* ch = cself->children;
+        DEBUG_MSG(10, ("Children of %s\n", cself->name));
+        while( rc == 0 && ch != NULL ) {
+            if( ch->vtbl->HasChild ) {
+                rc = FSNode_Dir(ch, NULL, func, data);
+            } else if( (rc = func(ch->name, data)) == 0 ) {
+                DEBUG_MSG(10, ("child '%s'\n", ch->name));
+            }
+            ch = ch->sibling;
+        }
+    }
+    return rc;
+}
+
+rc_t FSNode_FindChild(const FSNode* cself, const char* name, size_t name_len, const FSNode** child, bool* hidden)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || name == NULL || name_len == 0 || child == NULL || hidden == NULL ) {
+        rc = RC(rcExe, rcDirectory, rcSearching, rcParam, rcInvalid);
+    } else {
+        const FSNode* ch = cself->children;
+        *child = NULL;
+        *hidden = false;
+        while( rc == 0 && ch != NULL && *child == NULL ) {
+            if( ch->vtbl->HasChild ) {
+                if( (rc = ch->vtbl->HasChild(ch, name, name_len)) == 0 ) {
+                    *hidden = true;
+                    *child = ch;
+                } else if( GetRCState(rc) == rcNotFound ) {
+                    rc = 0;
+                }
+            } else if( strlen(ch->name) == name_len && strncmp(ch->name, name, name_len) == 0 ) {
+                *child = ch;
+            }
+            ch = ch->sibling;
+        }
+    }
+    if( rc == 0 && *child == NULL ) {
+        rc = RC(rcExe, rcDirectory, rcEvaluating, rcName, rcNotFound);
+    }
+    return rc;
+}
+
+rc_t FSNode_Touch(const FSNode* cself)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL ) {
+        rc = RC(rcExe, rcNode, rcUpdating, rcParam, rcNull);
+    } else if( cself->vtbl->Touch ) {
+        DEBUG_MSG(10, ("%s: %s\n", __func__, cself->name));
+        rc = cself->vtbl->Touch(cself);
+    }
+    return rc;
+}
+
+rc_t FSNode_Attr(const FSNode* cself, const char* subpath, uint32_t* type, KTime_t* ts, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || type == NULL || ts == NULL ) {
+        rc = RC(rcExe, rcNode, rcClassifying, rcParam, rcNull);
+    } else {
+        DEBUG_MSG(10, ("%s: %s/%s\n", __func__, cself->name, subpath));
+        if( cself->vtbl->Attr ) {
+            rc = cself->vtbl->Attr(cself, subpath, type, ts, file_sz, access, block_sz);
+        } else {
+            rc = RC(rcExe, rcNode, rcClassifying, rcInterface, rcUnsupported);
+        }
+    }
+    return rc;
+}
+
+rc_t FSNode_Dir(const FSNode* cself, const char* subpath, FSNode_Dir_Visit func, void* data)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || func == NULL ) {
+        rc = RC(rcExe, rcDirectory, rcListing, rcParam, rcNull);
+    } else {
+        DEBUG_MSG(10, ("%s: %s/%s\n", __func__, cself->name, subpath));
+        if( cself->vtbl->Dir ) {
+            rc = cself->vtbl->Dir(cself, subpath, func, data);
+        } else {
+            rc = RC(rcExe, rcDirectory, rcListing, rcInterface, rcUnsupported);
+        }
+    }
+    return rc;
+}
+
+rc_t FSNode_Link(const FSNode* cself, const char* subpath, char* buf, size_t buf_sz)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || buf == NULL || buf_sz < 1 ) {
+        rc = RC(rcExe, rcPath, rcAliasing, rcParam, rcInvalid);
+    } else {
+        DEBUG_MSG(10, ("%s: %s/%s\n", __func__, cself->name, subpath));
+        if( cself->vtbl->Link ) {
+            rc = cself->vtbl->Link(cself, subpath, buf, buf_sz);
+            DEBUG_MSG(10, ("%s: %s\n", __func__, buf));
+        } else {
+            rc = RC(rcExe, rcNode, rcAliasing, rcInterface, rcUnsupported);
+        }
+    }
+    return rc;
+}
+
+rc_t FSNode_Open(const FSNode* cself, const char* subpath, const SAccessor** accessor)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || accessor == NULL ) {
+        rc = RC(rcExe, rcFile, rcOpening, rcParam, rcNull);
+    } else {
+        DEBUG_MSG(10, ("%s: %s/%s\n", __func__, cself->name, subpath));
+        if( cself->vtbl->Open ) {
+            rc = cself->vtbl->Open(cself, subpath, accessor);
+        } else {
+            rc = RC(rcExe, rcFile, rcOpening, rcInterface, rcUnsupported);
+        }
+    }
+    return rc;
+}
+
+void FSNode_Release(const FSNode* cself)
+{
+    if( cself != NULL ) {
+        FSNode* self = (FSNode*)cself;
+        FSNode_DropChildren(self);
+        if( self->vtbl->Release ) {
+            ReleaseComplain(self->vtbl->Release, self);
+        }
+        DEBUG_MSG(10, ("Release FSNode %s\n", self->name));
+        FREE(self);
+    }
+}
diff --git a/tools/fuse/node.h b/tools/fuse/node.h
new file mode 100644
index 0000000..8f02a1f
--- /dev/null
+++ b/tools/fuse/node.h
@@ -0,0 +1,108 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_node_
+#define _h_sra_fuse_node_
+
+#include "accessor.h"
+
+struct KDirectory;
+
+typedef struct FSNode_vtbl FSNode_vtbl;
+typedef struct FSNode FSNode;
+
+/* this struct must be 1st element in child objects structs! */
+struct FSNode {
+    const FSNode_vtbl* vtbl;
+    const char* name;
+    const FSNode* children;
+    const FSNode* sibling;
+};
+
+typedef rc_t ( CC * FSNode_Dir_Visit ) ( const char *name, void *data );
+
+#ifndef FSNODE_IMPL
+#define FSNODE_IMPL FSNode
+#endif
+
+struct FSNode_vtbl {
+
+    /* object size */
+    const size_t type_size;
+
+    /* for hidden node asks if a name is within, it doesn't mean that file is really present */
+    rc_t (*HasChild)(const FSNODE_IMPL* cself, const char* name, size_t name_len);
+
+    /* called to update node internal state if found by path search */
+    rc_t (*Touch)(const FSNODE_IMPL* cself);
+
+    /* the only mandatory method for the node */
+    rc_t (*Attr)(const FSNODE_IMPL* cself, const char* subpath, uint32_t* type, KTime_t* ts, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz);
+
+    /* fill lst with subnodes names, terminate with NULL if not filled the list up to lst_sz */
+    rc_t (*Dir)(const FSNODE_IMPL* cself, const char* subpath, FSNode_Dir_Visit func, void* data);
+
+    /* resolve path to real name for a symlink, fill in buf with name */
+    rc_t (*Link)(const FSNODE_IMPL* cself, const char* subpath, char* buf, size_t buf_sz);
+
+    /* open a file for reading */
+    rc_t (*Open)(const FSNODE_IMPL* cself, const char* subpath, const SAccessor** accessor);
+
+    /* releases the object */
+    rc_t (*Release)(FSNODE_IMPL* cself);
+};
+
+/* constructor */
+
+rc_t FSNode_Make(FSNode** self, const char* name, const FSNode_vtbl* vtbl);
+
+/* static methods */
+
+rc_t FSNode_AddChild(FSNode* self, const FSNode* child);
+
+rc_t FSNode_GetName(const FSNode* cself, const char** name);
+
+rc_t FSNode_HasChildren(const FSNode* cself, bool* test);
+
+rc_t FSNode_ListChildren(const FSNode* cself, FSNode_Dir_Visit func, void* data);
+
+rc_t FSNode_FindChild(const FSNode* cself, const char* name, size_t name_len, const FSNode** child, bool* hidden);
+
+/* virtual methods */
+
+rc_t FSNode_Touch(const FSNode* cself);
+
+rc_t FSNode_Attr(const FSNode* cself, const char* subpath, uint32_t* type, KTime_t* ts,
+                 uint64_t* file_sz, uint32_t* access, uint64_t* block_sz);
+
+rc_t FSNode_Dir(const FSNode* cself, const char* subpath, FSNode_Dir_Visit func, void* data);
+
+rc_t FSNode_Link(const FSNode* cself, const char* subpath, char* buf, size_t buf_sz);
+
+rc_t FSNode_Open(const FSNode* cself, const char* subpath, const SAccessor** accessor);
+
+void FSNode_Release(const FSNode* self);
+
+#endif /* _h_sra_fuse_node_ */
diff --git a/tools/fuse/remote-cache.c b/tools/fuse/remote-cache.c
new file mode 100644
index 0000000..6efd5b0
--- /dev/null
+++ b/tools/fuse/remote-cache.c
@@ -0,0 +1,2131 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <kapp/args.h>
+#include <klib/out.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <klib/rc.h>
+#include <klib/container.h>
+#include <klib/refcount.h>
+#include <kns/manager.h>
+#include <kns/http.h>
+#include <kns/stream.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/cacheteefile.h>
+#include <kproc/lock.h>
+#include <vfs/path.h>
+#include <vfs/manager.h>
+#include <kapp/main.h>
+
+#include <os-native.h>
+
+#include "remote-cache.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <sysalloc.h>
+
+#include "log.h"
+
+/*)))
+ /// Some unusual macroses
+(((*/
+
+/*) There are methods which are using VPath to get schema and host
+ (*/
+
+typedef rc_t ( CC * _PathReader ) (
+                                const VPath * self,
+                                char * Buffer,
+                                size_t BufferSize,
+                                size_t * NumRead
+                                );
+static
+rc_t CC
+_ReadSomething (
+            const char * Path,
+            char * Buffer,
+            size_t BufferSize,
+            _PathReader Reader
+)
+{
+    rc_t RCt;
+    VFSManager * Manager;
+    VPath * ThePath;
+    size_t NumRead;
+
+    RCt = 0;
+    NumRead = 0;
+    Manager = NULL;
+    ThePath = NULL;
+
+    if ( Path == NULL || Buffer == NULL || BufferSize <= 0 || Reader == NULL ) {
+        return RC ( rcExe, rcPath, rcReading, rcParam, rcNull );
+    }
+
+    * Buffer = 0;
+
+    RCt = VFSManagerMake ( & Manager );
+    if ( RCt == 0 ) {
+        RCt = VFSManagerMakePath ( Manager, & ThePath, Path );
+        if ( RCt == 0 ) {
+            RCt = Reader ( ThePath, Buffer, BufferSize, & NumRead );
+
+            ReleaseComplain ( VPathRelease, ThePath );
+        }
+
+        ReleaseComplain ( VFSManagerRelease, Manager );
+    }
+
+    return RCt;
+}   /* _ReadSomething () */
+
+static
+rc_t CC
+_ReadSchema ( const char * Path, char * Buffer, size_t BufferSize )
+{
+    return _ReadSomething ( Path, Buffer, BufferSize, VPathReadScheme );
+}   /* _ReadSchema () */
+
+bool CC
+_MatchSchemas ( const char * Schema1, const char * Schema2 )
+{
+    size_t S1Size, S2Size;
+
+    if ( Schema1 == NULL || Schema2 == NULL ) { 
+        return false;
+    }
+
+    S1Size = string_size ( Schema1 );
+    S2Size = string_size ( Schema2 );
+
+    if ( S1Size == S2Size ) {
+        if ( string_cmp (
+                        Schema1,
+                        S1Size,
+                        Schema2,
+                        S1Size,
+                        S1Size
+                        ) == 0 ) {
+            return true;
+        }
+    }
+
+    return false;
+}   /* _MatchSchemas () */
+
+bool CC
+IsRemotePath ( const char * Path )
+{
+    char Schema [ 256 ];
+    bool IsRemote;
+
+
+    IsRemote = false;
+
+    if ( Path == NULL ) {
+        return false;
+    }
+
+    if ( _ReadSchema ( Path, Schema, sizeof ( Schema ) ) != 0 ) {
+        return false;
+    }
+
+    IsRemote = _MatchSchemas ( Schema, "http" );
+
+/* Just for case, he-he ... YAGNI - S!CKS
+    if ( IsRemote == false ) {
+        IsRemote = _MatchSchemas ( Schema, "https" );
+    }
+*/
+    return IsRemote;
+}   /* IsRemotePath () */
+
+bool CC
+IsLocalPath ( const char * Path )
+{
+    KDirectory * NativeDir;
+    uint32_t PathType;
+
+    NativeDir = NULL;
+    PathType = kptNotFound;
+
+        /*  Just checking if Path do exists, and it is a file
+         */
+    if ( Path != NULL ) {
+        if ( KDirectoryNativeDir ( & NativeDir ) == 0 ) {
+            PathType = KDirectoryPathType ( NativeDir, Path );
+
+            KDirectoryRelease ( NativeDir );
+        }
+    }
+
+    return PathType == kptFile;
+}   /* IsLocalPath () */
+
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+/* something unusual                                                 */
+/* we are going to keep remote connections                           */
+/*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*/
+
+struct RCacheEntry;
+
+struct _CnEnt {
+    struct _CnEnt * prev;
+    struct _CnEnt * next;
+
+    struct RCacheEntry * entry;
+};
+
+struct _CnPool {
+    struct KLock * mutabor;
+
+    struct _CnEnt * head;
+    struct _CnEnt * tail;
+
+    size_t qty;
+    size_t max_qty;
+};
+
+struct RCacheEntry {
+    BSTNode AsIs;
+
+    KRefcount refcount;
+    KLock * mutabor;
+
+    char * Name;
+    char * Url;
+    char * Path;
+
+    bool is_local;
+    bool is_complete;
+
+    uint64_t actual_size;
+
+    const struct KFile * file;
+
+    struct _CnEnt * cn_entry;
+};
+
+// static const size_t _sConPoolMaxQty = 1024;
+static const size_t _sConPoolMaxQty = 512;
+static struct _CnPool _sConPool;
+
+rc_t CC RCacheEntryAddRef ( struct RCacheEntry * self );
+rc_t CC RCacheEntryRelease ( struct RCacheEntry * self );
+
+static
+rc_t CC
+_CnEntMake ( struct RCacheEntry * Entry )
+{
+    rc_t RCt;
+    struct _CnEnt * Ent;
+
+    RCt = 0;
+    Ent = NULL;
+
+    if ( Entry == NULL ) {
+        return RC ( rcExe, rcData, rcInitializing, rcParam, rcNull );
+    }
+
+    if ( Entry -> cn_entry != NULL ) {
+        return RC ( rcExe, rcData, rcInitializing, rcParam, rcInvalid );
+    }
+
+    Ent = calloc ( 1, sizeof ( struct _CnEnt ) );
+    if ( Ent == NULL ) {
+        return RC ( rcExe, rcData, rcInitializing, rcParam, rcExhausted );
+    }
+
+    RCt = RCacheEntryAddRef ( Entry );
+    if ( RCt == 0 ) {
+        Ent -> next = NULL;
+        Ent -> prev = NULL;
+        Ent -> entry = Entry;
+        Entry -> cn_entry = Ent;
+    }
+    else {
+        free ( Ent );
+    }
+
+    return RCt;
+}   /* _CnEntMake () */
+
+static
+rc_t CC
+_CnEntDispose ( struct RCacheEntry * Entry )
+{
+    struct _CnEnt * Ent = NULL;
+
+    if ( Entry != NULL ) {
+        Ent = Entry -> cn_entry;
+        Entry -> cn_entry = NULL;
+
+        if ( Ent != NULL ) {
+            RCacheEntryRelease ( Entry );
+
+            Ent -> entry = NULL;
+            Ent -> prev = NULL;
+            Ent -> next = NULL;
+
+            free ( Ent );
+        }
+    }
+
+    return 0;
+}   /* _CnEntDipose () */
+
+static
+rc_t CC
+_CnPoolWhack ()
+{
+    if ( _sConPool . mutabor != NULL ) {
+/*
+RmOutMsg ( "[KLockRelease] [%p] [ %d]\n", ( void * ) _sConPool . mutabor, __LINE__ );
+*/
+        KLockRelease ( _sConPool . mutabor );
+        _sConPool . mutabor = NULL;
+    }
+
+    _sConPool . head = NULL;
+    _sConPool . tail = NULL;
+    _sConPool . qty = 0;
+    _sConPool . max_qty = _sConPoolMaxQty;
+
+    return 0;
+}   /* _CnPoolWhack () */
+
+static
+rc_t CC
+_CnPoolInit ( size_t MaxQty )
+{
+    rc_t RCt;
+
+    RCt = 0;
+
+    RCt = KLockMake ( & ( _sConPool . mutabor ) );
+/*
+RmOutMsg ( "[KLockMake] [%p] [ %d]\n", ( void * ) _sConPool . mutabor, __LINE__ );
+*/
+    if ( RCt == 0 ) {
+        _sConPool . head = NULL;
+        _sConPool . tail = NULL;
+        _sConPool . qty = 0;
+        _sConPool . max_qty = MaxQty == 0 ? _sConPoolMaxQty : MaxQty;
+    }
+
+    return RCt;
+}   /* _CnPoolInit () */
+
+/*|\     _CnPool has only three methods: ToFront, Drop and Prune,
+  |/     where prune is series of drops.
+  |\     I made that comment to show that DLList is not used for
+  |/     purpose
+  |\*/
+static rc_t CC _CnPoolToFront_NoLock ( struct _CnEnt * entry );
+static rc_t CC _CnPoolDrop_NoLock ( struct _CnEnt * entry );
+static rc_t CC _CnPoolPrune_NoLock ( size_t PruneS );
+
+rc_t CC
+_CnPoolToFront_NoLock ( struct _CnEnt * Entry )
+{
+    rc_t RCt = 0;
+
+    if ( Entry == NULL ) {
+        return RC ( rcExe, rcData, rcInserting, rcParam, rcNull );
+    }
+
+    if ( Entry == _sConPool . head ) {
+        return 0;
+    }
+
+/*
+RmOutMsg ( "[_CnPoolToFront_ ] [%p] [ %d]\n", Entry, __LINE__ );
+*/
+
+        /* First we should drop Entry without disconnecting */
+    RCt = _CnPoolDrop_NoLock ( Entry );
+    if ( RCt == 0 ) {
+            /* Second we should Prune old connections */
+        RCt = _CnPoolPrune_NoLock ( 1 );
+        if ( RCt == 0 ) {
+                /* Second we should put Entry at front */
+            if ( _sConPool . head != NULL ) {
+                Entry -> next = _sConPool . head;
+                Entry -> next -> prev = Entry;
+                _sConPool . head = Entry;
+            }
+            else {
+                _sConPool . tail = Entry;
+            }
+            _sConPool . head  = Entry;
+            _sConPool . qty ++;
+        }
+    }
+
+    return RCt;
+}   /* _CnPooltoFront_NoLock () */
+
+static
+rc_t CC
+_CnPoolToFront ( struct RCacheEntry * Entry )
+{
+    rc_t RCt = 0;
+
+    if ( Entry != NULL ) {
+        if ( Entry -> cn_entry != NULL ) {
+/*
+RmOutMsg ( "[KLockAcquire] [%p] [ %d]\n", ( void * ) _sConPool . mutabor, __LINE__ );
+*/
+            RCt = KLockAcquire ( _sConPool . mutabor );
+            if ( RCt == 0 ) {
+                RCt = _CnPoolToFront_NoLock ( Entry -> cn_entry );
+
+/*
+RmOutMsg ( "[KLockUnlock] [%p] [ %d]\n", ( void * ) _sConPool . mutabor, __LINE__ );
+*/
+                KLockUnlock ( _sConPool . mutabor );
+            }
+        }
+    }
+
+    return RCt;
+}   /* _CnPoolToFront () */
+
+rc_t CC
+_CnPoolDrop_NoLock ( struct _CnEnt * Entry )
+{
+    rc_t RCt;
+
+    RCt = 0;
+
+    if ( Entry == NULL ) {
+        return RC ( rcExe, rcData, rcRemoving, rcParam, rcNull );
+    }
+
+/*
+RmOutMsg ( "[_CnPoolDrop_] [%p] [ %d]\n", Entry, __LINE__ );
+*/
+
+    if ( Entry -> next == NULL &&  Entry -> prev == NULL ) {
+            /* Entry is the only member in pool
+             */
+        if ( _sConPool . head == Entry ) {
+            _sConPool . head = _sConPool . tail = NULL;
+            _sConPool . qty = 0;
+        } 
+    }
+    else {
+        if ( Entry -> prev == NULL ) {
+                /* Entry is at the head of pool
+                 */
+            if ( _sConPool . head != Entry ) {
+                return RC ( rcExe, rcData, rcRemoving, rcParam, rcInvalid );
+            }
+
+            if ( Entry -> next != NULL ) {
+                Entry -> next -> prev = NULL;
+                _sConPool . head = Entry -> next;
+            }
+            else {
+                _sConPool . head = _sConPool . tail = NULL;
+            }
+        }
+        else {
+            if ( Entry -> next == NULL ) {
+                    /* Entry is at the tail of pool
+                     */
+                if ( _sConPool . tail != Entry ) {
+                    return RC ( rcExe, rcData, rcRemoving, rcParam, rcInvalid );
+
+                }
+
+                if ( Entry -> prev != NULL ) {
+                    Entry -> prev -> next = NULL;
+                    _sConPool . tail = Entry -> prev;
+                }
+                else {
+                    _sConPool . head = _sConPool . tail = NULL;
+                }
+            }
+            else {
+                    /* Entry is at the middle of pool
+                     */
+                Entry -> prev -> next = Entry -> next;
+                Entry -> next -> prev = Entry -> prev;
+            }
+        }
+
+        _sConPool . qty --;
+        Entry -> next = Entry -> prev = NULL;
+    }
+
+    return RCt;
+}   /* _CnPoolDrop_NoLock () */
+
+static
+rc_t CC
+_CnPoolDrop ( struct RCacheEntry * Entry )
+{
+    rc_t RCt = 0;
+
+    if ( Entry != NULL ) {
+        if ( Entry -> cn_entry != NULL ) {
+/*
+RmOutMsg ( "[KLockAcquire] [%p] [ %d]\n", ( void * ) _sConPool . mutabor, __LINE__ );
+*/
+            RCt = KLockAcquire ( _sConPool . mutabor );
+            if ( RCt == 0 ) {
+                RCt = _CnPoolDrop_NoLock ( Entry -> cn_entry );
+
+/*
+RmOutMsg ( "[KLockUnlock] [%p] [ %d]\n", ( void * ) _sConPool . mutabor, __LINE__ );
+*/
+                KLockUnlock ( _sConPool . mutabor );
+            }
+        }
+    }
+
+    return RCt;
+}   /* _CnPoolDrop () */
+
+rc_t CC
+_CnPoolPrune_NoLock ( size_t PruneS )
+{
+    rc_t RCt = 0;
+
+    size_t max_qty = _sConPool . max_qty - PruneS;
+
+    while ( max_qty < _sConPool . qty ) {
+        RCt = _CnPoolDrop_NoLock ( _sConPool . tail );
+        if ( RCt != 0 ) {
+            break;
+        }
+    }
+
+    return RCt;
+}   /* _CnPoolPrune_NoLock () */
+
+/*)))
+ ///  Cache ... hmmm
+(((*/
+static KNSManager * _ManagerOfKNS = NULL;
+static BSTree _Cache;
+    /* That lock will be used for adding/searching cache entries */
+static KLock * _CacheLock = NULL;
+
+const char * _CacheEntryClassName = "RCacheEntry_class";
+const char * _CacheDirName = ".cache";
+static char _CacheRoot [ 4096 ];
+static char * _PCacheRoot = NULL;
+static size_t _CacheEntryNo = 0;
+static uint32_t _HttpBlockSize = 0;
+static bool _DisklessMode = false;
+
+/*))
+ //  Some extremely useful methods
+((*/
+rc_t CC
+_EGetCachePath (
+            const char * CacheRoot,
+            char * Buffer,
+            size_t BufferSize
+)
+{
+    size_t NumWrit;
+
+    if ( CacheRoot == NULL || Buffer == NULL || BufferSize == 0 ) {
+        return RC ( rcExe, rcString, rcCopying, rcParam, rcNull );
+    }
+
+    return string_printf (
+                        Buffer,
+                        BufferSize,
+                        & NumWrit,
+                        "%s/%s",
+                        CacheRoot,
+                        _CacheDirName
+                        );
+}   /* _EGetCachePath () */
+
+rc_t CC
+_GetCachePath ( char * Buffer, size_t BufferSize )
+{
+    return _EGetCachePath ( RemoteCachePath (), Buffer, BufferSize );
+}   /* _GetCachePath () */
+
+rc_t CC
+_EGetCachePathOld (
+                const char * CacheRoot,
+                char * Buffer,
+                size_t BufferSize
+)
+{
+    size_t NumWrit;
+
+    if ( CacheRoot == NULL || Buffer == NULL || BufferSize == 0 ) {
+        return RC ( rcExe, rcString, rcCopying, rcParam, rcNull );
+    }
+
+    return string_printf (
+                        Buffer,
+                        BufferSize,
+                        & NumWrit,
+                        "%s/%s.old",
+                        CacheRoot,
+                        _CacheDirName
+                        );
+}   /* _EGetCachePathOld () */
+
+rc_t CC
+_GetCachePathOld ( char * Buffer, size_t BufferSize )
+{
+    return _EGetCachePathOld ( RemoteCachePath (), Buffer, BufferSize );
+}   /* _GetCachePathOld () */
+
+rc_t CC
+_CheckCreateDirectory ( const char * Path )
+{
+    rc_t RCt;
+    KDirectory * NativeDir;
+    uint32_t PathType;
+
+    RCt = 0;
+    NativeDir = NULL;
+    PathType = kptNotFound;
+
+    if ( Path == NULL ) {
+        return RC ( rcExe, rcDirectory, rcCreating, rcParam, rcNull );
+    }
+
+    RCt = KDirectoryNativeDir ( & NativeDir );
+    if ( RCt == 0 ) {
+        PathType = KDirectoryPathType ( NativeDir, Path );
+        switch ( PathType ) {
+            case kptNotFound :
+                        RmOutMsg ( "Creating directory '%s'\n", Path );
+                        RCt = KDirectoryCreateDir (
+                                                NativeDir,
+                                                0777,
+                                                kcmCreate,
+                                                Path
+                                                );
+                        break;
+            case kptDir :
+                        break;
+            default :
+                            /* Somtheing is wrong */
+                        RCt = RC ( rcExe, rcDirectory, rcCreating, rcError, rcInvalid );
+                        break;
+        }
+
+        ReleaseComplain ( KDirectoryRelease, NativeDir );
+    }
+
+    return RCt;
+}   /* _CheckCreateDirectory () */
+
+rc_t CC
+_CheckRemoveDirectory ( const char * Path )
+{
+    rc_t RCt;
+    KDirectory * NativeDir;
+    uint32_t PathType;
+
+    RCt = 0;
+    NativeDir = NULL;
+    PathType = kptNotFound;
+
+    if ( Path == NULL ) {
+        return RC ( rcExe, rcDirectory, rcRemoving, rcParam, rcNull );
+    }
+
+    RCt = KDirectoryNativeDir ( & NativeDir );
+    if ( RCt == 0 ) {
+        PathType = KDirectoryPathType ( NativeDir, Path );
+        switch ( PathType ) {
+            case kptNotFound:
+                    /* Everything is good */
+                    break;
+            default:
+                RmOutMsg ( "Removing directory '%s'\n", Path );
+                RCt = KDirectoryRemove ( NativeDir, true, Path );
+                break;
+        }
+
+        ReleaseComplain ( KDirectoryRelease, NativeDir );
+    }
+
+    return RCt;
+}   /* _CheckRemoveDirectory () */
+
+rc_t CC
+_CheckRemoveOldCacheDirectory ( const char * CacheRoot )
+{
+    rc_t RCt;
+    KDirectory * NativeDir;
+    char CacheDir [ 4096 ];
+    char OldCacheDir [ 4096 ];
+
+    RCt = 0;
+    NativeDir = NULL;
+    * CacheDir = 0;
+    * OldCacheDir = 0;
+
+    if ( CacheRoot == NULL ) {
+        return RC ( rcExe, rcDirectory, rcRemoving, rcParam, rcNull );
+    }
+
+    if ( _EGetCachePath ( CacheRoot, CacheDir, sizeof ( CacheDir ) ) != 0
+        || _EGetCachePathOld ( CacheRoot, OldCacheDir, sizeof ( OldCacheDir ) ) )
+    {
+        return RC ( rcExe, rcDirectory, rcRemoving, rcParam, rcInvalid );
+    }
+
+    RCt = KDirectoryNativeDir ( & NativeDir );
+    if ( RCt == 0 ) {
+            /*) Just because I do not know wahat to do in the case if
+            (*) it is impossible to remove directory I am doing that
+            (*) hookup
+            (*/
+        RCt = _CheckRemoveDirectory ( OldCacheDir );
+        if ( RCt == 0 ) {
+            RCt = KDirectoryRename (
+                                NativeDir,
+                                true,
+                                CacheDir,
+                                OldCacheDir
+                                );
+            if ( RCt == 0 ) {
+                RCt = _CheckRemoveDirectory ( OldCacheDir );
+            }
+        }
+
+        ReleaseComplain ( KDirectoryRelease, NativeDir );
+    }
+
+    return RCt;
+}   /* _CheckRemoveOldCacheDirectory () */
+
+/*
+ *  Lyrics: This method will set buffer size for HTTP transport
+ *  and return previous value.
+ *  That method is thread unsafe, and it is better to set it once
+ *  on the time of cache initialization
+ */
+uint32_t CC
+RemoteCacheSetHttpBlockSize ( uint32_t HttpBlockSize )
+{
+    uint32_t RetVal = _HttpBlockSize;
+
+    _HttpBlockSize = HttpBlockSize;
+
+    return RetVal;
+}   /* RemoteCacheSetHttpBlockSize () */
+
+/*
+ * Lyrics: Cache initialising: keeping in memory cache path 
+ *         cache path could be a NULL, and in that case no cacheing
+ *         performed
+ */
+rc_t CC
+RemoteCacheInitialize ( const char * Path )
+{
+    rc_t RCt;
+    char Buffer [ 4096 ];
+    struct KDirectory * Directory;
+
+    RCt = 0;
+    * _CacheRoot = 0;
+    * Buffer = 0;
+
+    if ( RemoteCacheIsDisklessMode () ) {
+        LOGMSG ( klogErr, "[RemoteCache] Already initialized in diskless mode" );
+
+        return RC ( rcExe, rcPath, rcInitializing, rcParam, rcNull );
+    }
+
+        /*))
+         //  If path is NULL - diskless mode ... we introduced
+        //   variable for that ... to avoid confusion
+       ((*/
+    if ( Path == NULL ) {
+        LOGMSG ( klogErr, "[RemoteCache] initializing [diskless]" );
+
+        _DisklessMode = true;
+
+        return 0;
+    }
+
+    PLOGMSG ( klogErr, ( klogErr, "[RemoteCache] initializing [$(f)]", PLOG_S(f), Path ) );
+
+        /* we are checking that cache directory already initialized */
+    if ( _PCacheRoot != NULL ) {
+        return RC ( rcExe, rcPath, rcInitializing, rcSelf, rcExists );
+    }
+
+    RCt = KDirectoryNativeDir ( & Directory );
+    if ( RCt == 0 ) {
+        RCt = KDirectoryResolvePath (
+                                Directory,
+                                true,
+                                _CacheRoot,
+                                sizeof ( _CacheRoot ),
+                                Path
+                                );
+
+        ReleaseComplain ( KDirectoryRelease, Directory );
+    }
+
+    if ( RCt == 0 ) {
+        _PCacheRoot = _CacheRoot;
+    }
+
+    return RCt;
+}   /*  RemoteCacheInitialize () */
+
+static
+rc_t CC
+_InitKNSManager ()
+{
+    rc_t RCt;
+    KNSManager * Manager;
+    ver_t Ver;
+
+    RCt = 0;
+    Manager = NULL;
+    Ver = KAppVersion ();
+
+    if ( _ManagerOfKNS != NULL ) {
+        return RC ( rcExe, rcNS, rcInitializing, rcSelf, rcInvalid );
+    }
+
+    RCt = KNSManagerMake ( & Manager );
+    if ( RCt == 0 ) {
+        RCt = KNSManagerSetUserAgent (
+                                    Manager,
+                                    "sra-toolkit remote-fuser.%V",
+                                    Ver
+                                    );
+        if ( RCt == 0 ) {
+            _ManagerOfKNS = Manager;
+        }
+        else {
+            ReleaseComplain ( KNSManagerRelease, Manager );
+        }
+    }
+
+    return RCt;
+}   /* _InitKNSManager () */
+
+static
+rc_t CC
+_DisposeKNSManager ()
+{
+    KNSManager * Manager = _ManagerOfKNS;
+
+    _ManagerOfKNS = NULL;
+
+    if ( Manager == NULL ) {
+        return 0;
+    }
+
+    ReleaseComplain ( KNSManagerRelease, Manager );
+
+    return 0;
+}   /* _DisposeKNSManager () */
+
+/*
+ * Lyrics: Cache make 
+ * Cache initialisation consists from two steps :
+ *    Creating directory if it does not exist
+ *    Removing content of directory if it is something here
+ */
+rc_t CC
+RemoteCacheCreate ()
+{
+    rc_t RCt;
+    char Buffer [ 4096 ];
+
+    RCt = 0;
+    * Buffer = 0;
+
+    if ( RemoteCacheIsDisklessMode () ) {
+        LOGMSG( klogInfo, "[RemoteCache] entering diskless mode\n" );
+        return 0;
+    }
+
+    LOGMSG( klogInfo, "[RemoteCache] creating\n" );
+
+        /* we shoud do it here */
+    RCt = _CnPoolInit ( 0 ); /* Not sure about 0 8-| */
+    if ( RCt != 0 ) {
+        return RCt;
+    }
+
+        /* standard c=ecks */
+        /* we are checking that cache directory already initialized */
+    if ( _PCacheRoot == NULL ) {
+        return RC ( rcExe, rcPath, rcInitializing, rcSelf, rcNull );
+    }
+
+        /* Checking if CacheRoot directory exists and creating if not */
+    RCt = _CheckCreateDirectory ( _PCacheRoot );
+    if ( RCt == 0 ) {
+            /* Here we are moving old cache path
+             */
+        RCt = _CheckRemoveOldCacheDirectory ( _PCacheRoot );
+        if ( RCt ) {
+            RCt = _EGetCachePath (
+                                _PCacheRoot,
+                                Buffer,
+                                sizeof ( Buffer )
+                                );
+            if ( RCt == 0 ) {
+
+                RCt = _CheckCreateDirectory ( Buffer );
+            }
+        }
+    }
+
+    if ( RCt == 0 ) {
+
+        RCt = _InitKNSManager ();
+        if ( RCt == 0 ) {
+
+                /* Initializing BSTree */
+            BSTreeInit ( & _Cache );
+                /* Initializing _CacheLock */
+            RCt = KLockMake ( & _CacheLock );
+/*
+RmOutMsg ( "[KLockMake] [%p] [ %d]\n", ( void * ) _CacheLock, __LINE__ );
+*/
+        }
+    }
+
+    if ( RCt != 0 ) {
+            /* Endangered specie TODO!!! */
+        RemoteCacheDispose ();
+    }
+
+    return RCt;
+}   /* RemoteCacheCreate () */
+
+rc_t CC _RCacheEntryDestroy ( struct RCacheEntry * Entry );
+
+void CC
+_RcAcHeEnTrYwHaCk ( BSTNode * Node, void * UnusedParam )
+{
+    if ( Node != NULL ) {
+        _RCacheEntryDestroy ( ( struct RCacheEntry * ) Node );
+    }
+}   /* _RcAcHeEnTrYwHaCk () */
+
+/*
+ * Lyrics: Cache finalization 
+ * Cache finalization consists from one step(s) :
+ *    Removing content of cache directory if it exists and
+ *    something is here
+ */
+rc_t CC
+RemoteCacheDispose ()
+{
+    rc_t RCt = 0;
+
+    if ( RemoteCacheIsDisklessMode () ) {
+        LOGMSG( klogInfo, "[RemoteCache] leaving diskless mode\n" );
+    }
+
+    LOGMSG( klogInfo, "[RemoteCache] disposing\n" );
+
+    if ( RemoteCacheIsDisklessMode () ) {
+        _DisklessMode = false;
+
+        return 0;
+    }
+
+        /*) Cache was not initialized
+         (*/
+    if ( _PCacheRoot == NULL ) {
+        return 0;
+    }
+
+    RCt = _CheckRemoveOldCacheDirectory ( _CacheRoot );
+    if ( RCt == 0 ) {
+        * _CacheRoot = 0;
+        _PCacheRoot = NULL;
+    }
+
+        /* Releasing Lock */
+    if ( _CacheLock != NULL ) {
+/*
+RmOutMsg ( "[KLockRelease] [%p] [ %d]\n", ( void * ) _CacheLock, __LINE__ );
+*/
+        ReleaseComplain ( KLockRelease, _CacheLock );
+        _CacheLock = NULL;
+    }
+
+    _DisposeKNSManager ();
+
+    BSTreeWhack ( & _Cache, _RcAcHeEnTrYwHaCk, NULL );
+
+        /* Who does need that check? */
+    _CnPoolWhack ();
+
+    _CacheEntryNo = 0;
+
+    * _CacheRoot = 0;
+    _PCacheRoot = NULL;
+
+    return RCt;
+}   /* RemoteCacheDispose () */
+
+/*))
+ //  Generates effective name and path for file
+((*/
+rc_t CC
+_RCacheEntryGenerateNameAndPath ( char ** Name, char ** Path )
+{
+    rc_t RCt;
+    char Buffer [ 4096 ];
+    char Buffer2 [ 4096 ];
+    size_t NumWritten;
+    char * TheName;
+    char * ThePath;
+
+    RCt = 0;
+    * Buffer = 0;
+    * Buffer2 = 0;
+    NumWritten = 0;
+    TheName = NULL;
+    ThePath = NULL;
+
+    if ( Name != NULL ) { * Name = NULL; }
+    if ( Path != NULL ) { * Path = NULL; }
+
+    if ( Name == NULL || Path == NULL ) {
+        return RC ( rcExe, rcFile, rcInitializing, rcParam, rcNull );
+    }
+
+    RCt = string_printf (
+                        Buffer,
+                        sizeof ( Buffer ),
+                        & NumWritten,
+                        "etwas.%d",
+                        _CacheEntryNo + 1
+                        );
+    if ( RCt == 0 ) {
+        TheName = string_dup_measure ( Buffer, NULL );
+        if ( TheName == NULL ) {
+            RCt = RC ( rcExe, rcFile, rcInitializing, rcMemory, rcExhausted );
+        }
+        else {
+            RCt = _GetCachePath ( Buffer2, sizeof ( Buffer2 ) );
+            if ( RCt == 0 ) {
+                RCt = string_printf (
+                                    Buffer,
+                                    sizeof ( Buffer ),
+                                    & NumWritten,
+                                    "%s/%s",
+                                    Buffer2,
+                                    TheName
+                                    );
+                if ( RCt == 0 ) {
+                    ThePath = string_dup_measure ( Buffer, NULL );
+                    if ( TheName == NULL ) {
+                        RCt = RC ( rcExe, rcFile, rcInitializing, rcMemory, rcExhausted );
+                    }
+                    else {
+                         * Name = TheName;
+                         * Path = ThePath;
+                    }
+                }
+            }
+        }
+    }
+
+    if ( RCt != 0 ) {
+        * Name = NULL;
+        if ( TheName != NULL ) {
+            free ( TheName );
+        }
+        * Path = NULL;
+        if ( ThePath != NULL ) {
+            free ( ThePath );
+        }
+    }
+
+    return RCt;
+}   /* _RCacheEntryGenerateNameAndPath () */
+
+/*))
+ //  This method will destroy CacheEntry and free all resources
+((*/
+rc_t CC
+_RCacheEntryDestroy ( struct RCacheEntry * self )
+{
+/*
+KOutMsg ( " [GGU] [EntryDestroy]\n" );
+*/
+    if ( self != NULL ) {
+/*
+RmOutMsg ( "++++++DL DESTROY [0x%p] entry\n", self );
+*/
+        _CnPoolDrop ( self );
+        _CnEntDispose ( self );
+
+        /*)) Reverse order. I suppose it will be destoryed only
+         //  in particualr cases, so no locking :|
+        ((*/
+            /*) File
+             (*/
+        if ( self -> file != NULL ) {
+/*
+KOutMsg ( "[GGU] [DestroyEnty] [%s]\n", self -> Name );
+*/
+            ReleaseComplain ( KFileRelease, self -> file );
+            self -> file = 0;
+        }
+            /*) Url
+             (*/
+        if ( self -> Url != NULL ) {
+            free ( self -> Url );
+            self -> Url = NULL;
+        }
+            /*) Path
+             (*/
+        if ( self -> Path != NULL ) {
+            free ( self -> Path );
+            self -> Path = NULL;
+        }
+            /*) Name
+             (*/
+        if ( self -> Name != NULL ) {
+            free ( self -> Name );
+            self -> Name = NULL;
+        }
+            /*) mutabor
+             (*/
+        if ( self -> mutabor != NULL ) {
+/*
+RmOutMsg ( "[KLockRelease] [%p] [ %d]\n", ( void * ) self -> mutabor, __LINE__ );
+*/
+            ReleaseComplain ( KLockRelease, self -> mutabor );
+            self -> mutabor = NULL;
+        }
+            /*) refcount 
+             (*/
+        KRefcountWhack ( & ( self -> refcount ), _CacheEntryClassName );
+
+        self -> is_local = false;
+        self -> is_complete = false;
+        self -> actual_size = 0;
+
+        free ( self );
+    }
+
+    return 0;
+}   /* _RCacheEntryDestroy () */
+
+/*))
+ //  This method will create new CacheEntry
+((*/
+rc_t CC
+_RCacheEntryMake (
+            const char * Url,
+            struct RCacheEntry ** RetEntry
+)
+{
+    rc_t RCt;
+    struct RCacheEntry * Entry;
+
+    RCt = 0;
+    Entry = NULL;
+
+    if ( RetEntry != NULL ) {
+        * RetEntry = NULL;
+    }
+
+    if ( Url == NULL || RetEntry == NULL ) {
+        return RC ( rcExe, rcFile, rcInitializing, rcParam, rcNull );
+    }
+
+    Entry = ( struct RCacheEntry * ) calloc (
+                                        1,
+                                        sizeof ( struct RCacheEntry )
+                                        );
+    if ( Entry == NULL ) {
+        RCt = RC ( rcExe, rcFile, rcInitializing, rcMemory, rcExhausted );
+    }
+    else {
+        Entry -> is_local = false;
+        Entry -> is_complete = false;
+        Entry -> actual_size = 0;
+
+        if ( ! RemoteCacheIsDisklessMode () ) {
+                /*)  It is better do it here, before any allocation
+                 (*/
+            RCt = _RCacheEntryGenerateNameAndPath (
+                                                & ( Entry -> Name ),
+                                                & ( Entry -> Path )
+                                                );
+        }
+
+        if ( RCt == 0 ) {
+                /*) refcount
+                 (*/
+            KRefcountInit (
+                        & ( Entry -> refcount ),
+                        0,
+                        _CacheEntryClassName,
+                        "_RCacheEntryMake()",
+                        Entry -> Name
+                        );
+                /*) mutabor
+                 (*/
+            RCt = KLockMake ( & ( Entry -> mutabor ) );
+/*
+RmOutMsg ( "[KLockMake] [%p] [ %d]\n", ( void * ) Entry -> mutabor, __LINE__ );
+*/
+    
+            if ( RCt == 0 ) {
+                    /*) Url
+                     (*/
+                Entry -> Url = string_dup_measure ( Url, NULL );
+                if ( Entry -> Url == NULL ) {
+                    RCt = RC ( rcExe, rcFile, rcInitializing, rcMemory, rcExhausted );
+                }
+                if ( RCt == 0 ) {
+                        /*) File will be opened on demand
+                         /  Increasing count and assigning value
+                        (*/
+                    _CacheEntryNo ++;
+                    * RetEntry = Entry;
+                }
+            }
+        }
+    }
+
+    if ( RCt != 0 && Entry != NULL ) {
+        _RCacheEntryDestroy ( Entry );
+    }
+
+    return RCt;
+}   /*  _RCacheEntryMake () */
+
+/*))
+ //  Comparator: common case
+((*/
+static
+int64_t CC
+_RcUrLcMp ( const char * Url1, const char * Url2 )
+{
+    if ( Url1 == NULL || Url2 == NULL ) {
+        if ( Url1 != NULL ) {
+            return 4096;
+        }
+        if ( Url2 != NULL ) {
+            return 4096;
+        }
+        return 0;
+    }
+
+    return strcmp ( Url1, Url2 );
+}   /* _RcUrLcMp () */
+
+/*))
+ //  Comparator: we suppose that 'item' is an Url
+((*/
+static
+int64_t CC
+_RcEnTrYcMp ( const void * item, const BSTNode * node )
+{
+    return _RcUrLcMp (
+                    ( const char * ) item,
+                    node == NULL
+                        ? NULL
+                        : ( ( struct RCacheEntry * ) node ) -> Url
+                    );
+}   /* _RcEnTrYcMp () */
+
+/*))
+ //  Sorter for BSTreeInsert
+((*/
+static
+int64_t CC
+_RcNoDeCmP ( const BSTNode * node1, const BSTNode * node2 )
+{
+    return _RcUrLcMp (
+                    node1 == NULL
+                        ? NULL
+                        : ( ( struct RCacheEntry * ) node1 ) -> Url,
+                    node2 == NULL
+                        ? NULL
+                        : ( ( struct RCacheEntry * ) node2 ) -> Url
+                    );
+}   /* _RcNoDeCmP () */
+
+/*))
+ //  This method suppeosed to find or create Entry
+((*/
+rc_t CC
+RemoteCacheFindOrCreateEntry (
+                            const char * Url,
+                            struct RCacheEntry ** Entry
+)
+{
+    rc_t RCt;
+    struct RCacheEntry * RetEntry;
+
+    RCt = 0;
+    RetEntry = NULL;
+
+    if ( Url == NULL || Entry == NULL ) {
+        return RC ( rcExe, rcPath, rcInitializing, rcParam, rcNull );
+    }
+    * Entry = NULL;
+
+        /*)  Diskless mode
+         (*/
+    if ( RemoteCacheIsDisklessMode () ) {
+        RCt = _RCacheEntryMake ( Url, & RetEntry );
+        if ( RCt == 0 ) {
+/*
+RmOutMsg ( "++++++DL CREATE [0x%p][%s] entry\n", RetEntry, Url );
+*/
+            * Entry = RetEntry;
+        }
+
+        return RCt;
+    }
+        /*)  Here we are locking
+         (*/
+/*
+RmOutMsg ( "[KLockAcquire] [%p] [ %d]\n", ( void * ) _CacheLock, __LINE__ );
+*/
+    RCt = KLockAcquire ( _CacheLock );
+    if ( RCt == 0 ) {
+            /*)  Here we are 'looking for' and 'fooking lor'
+             (*/
+        RetEntry = ( struct RCacheEntry * ) BSTreeFind (
+                                                    & _Cache,
+                                                    Url,
+                                                    _RcEnTrYcMp
+                                                    );
+/*
+RmOutMsg ( "++++++ %s entry\n", RetEntry == NULL ? "Creating" : "Loading" );
+*/
+        if ( RetEntry == NULL ) {
+            RCt = _RCacheEntryMake ( Url, & RetEntry );
+            if ( RCt == 0 ) {
+                RCt = BSTreeInsert (
+                                & _Cache,
+                                ( BSTNode * ) RetEntry,
+                                _RcNoDeCmP
+                                );
+            }
+        }
+
+        if ( RCt == 0 ) {
+            * Entry = RetEntry;
+        }
+
+            /*)  First we are trying to find appropriate entry
+             (*/
+/*
+RmOutMsg ( "[KLockUnlock] [%p] [ %d]\n", ( void * ) _CacheLock, __LINE__ );
+*/
+        KLockUnlock ( _CacheLock );
+    }
+
+    return RCt;
+}   /* RemoteCacheFindOrCreateEntry () */
+
+const char * CC
+RemoteCachePath ()
+{
+    return RemoteCacheIsDisklessMode() ? NULL : _PCacheRoot;
+}   /* RemoteCachePath () */
+
+bool CC
+RemoteCacheIsDisklessMode ()
+{
+    return _DisklessMode;
+}   /* RemoteCacheIsDisklessMode () */
+
+/*)))
+ ///  Top of the crop methods
+(((*/
+rc_t CC
+RCacheEntryAddRef ( struct RCacheEntry * self )
+{
+    rc_t RCt;
+
+    RCt = 0;
+
+    if ( self != NULL ) {
+/*
+RmOutMsg ( "++++++DL ADDREF [0x%p] entry\n", self );
+*/
+        switch ( KRefcountAdd (
+                        & ( self -> refcount ),
+                        _CacheEntryClassName
+                        ) ) {
+            case krefLimit:
+                RCt = RC ( rcExe, rcFile, rcAttaching, rcRange, rcExcessive );
+            case krefNegative:
+                RCt = RC ( rcExe, rcFile, rcAttaching, rcSelf, rcInvalid );
+            default:
+                break;
+        }
+    }
+
+    return RCt;
+}   /* RCacheEntryAddRef () */
+
+rc_t CC
+_RCacheEntryReleaseWithoutLock ( struct RCacheEntry * self )
+{
+    /*)) This method called from special place, so no NULL checks
+     ((*/
+
+    if ( self -> file != NULL ) {
+/*
+KOutMsg ( "[GGU] [ReleaseEntry] [%s]\n", self -> Name );
+*/
+/*
+RmOutMsg ( "|||<-- Releasing [%s][%s]\n", self -> Name, self -> Url );
+*/
+        ReleaseComplain ( KFileRelease, self -> file );
+        self -> file = NULL;
+    }
+
+    return 0;
+}   /*  _RCacheEntryReleaseWithoutLock () */
+
+rc_t CC
+_RCacheEntryReleaseWithLock ( struct RCacheEntry * self )
+{
+    rc_t RCt = 0;
+
+/*
+RmOutMsg ( "[KLockAcquire] [%p] [ %d]\n", ( void * ) self -> mutabor, __LINE__ );
+*/
+    RCt = KLockAcquire ( self -> mutabor );
+    if ( RCt == 0 ) {
+        RCt = _RCacheEntryReleaseWithoutLock ( self );
+/*
+RmOutMsg ( "[KLockUnlock] [%p] [ %d]\n", ( void * ) self -> mutabor, __LINE__ );
+*/
+        KLockUnlock ( self -> mutabor );
+    }
+
+    return RCt;
+}   /* _RCacheEntryReleaseWithLock () */
+
+rc_t CC
+RCacheEntryRelease ( struct RCacheEntry * self )
+{
+    rc_t RCt;
+
+    RCt = 0;
+
+/*
+KOutMsg ( " [GGU] [Closing Entry]\n" );
+*/
+    if ( self != NULL ) {
+        if ( RCt == 0 ) {
+            switch ( KRefcountDrop (
+                            & ( self -> refcount ),
+                            _CacheEntryClassName
+                            ) ) {
+                case krefWhack:
+/*
+RmOutMsg ( "[KLockAcquire] [%p] [ %d]\n", ( void * ) self -> mutabor, __LINE__ );
+*/
+                    RCt = KLockAcquire ( self -> mutabor );
+                    if ( RCt == 0 ) {
+                        _RCacheEntryReleaseWithoutLock ( self );
+/*
+RmOutMsg ( "[KLockUnlock] [%p] [ %d]\n", ( void * ) self -> mutabor, __LINE__ );
+*/
+                        KLockUnlock ( self -> mutabor );
+                        if ( RemoteCacheIsDisklessMode () ) {
+ /*
+ RmOutMsg ( "++++++DL RELEASE [0x%p] entry\n", self );
+ */
+                            _RCacheEntryDestroy ( self );
+                        }
+                    }
+                    break;
+                case krefNegative:
+                    RCt = RC ( rcExe, rcFile, rcReleasing, rcRange, rcExcessive );
+                default:
+                    break;
+            }
+
+        }
+    }
+
+    return RCt;
+}   /* RCacheEntryRelease () */
+
+rc_t CC
+_RCacheEntryOpenFileReadRemote ( struct RCacheEntry * self )
+{
+    rc_t RCt;
+    struct KDirectory * Directory;
+    const struct KFile * HttpFile, * TeeFile;
+
+    RCt = 0;
+    Directory = NULL;
+    HttpFile = TeeFile = NULL;
+
+    if ( self == NULL ) {
+        return RC ( rcExe, rcFile, rcOpening, rcParam, rcNull );
+    }
+
+/*
+KOutMsg ( "[GGU] [OpenReadRemote] [%s]\n", self -> Name );
+*/
+
+    if ( ( ! RemoteCacheIsDisklessMode () ) && self -> Path == NULL ) {
+        return RC ( rcExe, rcFile, rcOpening, rcParam, rcNull );
+    }
+
+/*
+RmOutMsg ( "|||<-- Opening [R] [%s][%s]\n", self -> Name, self -> Url );
+RmOutMsg ( "  |<-- Cache Entry [%s]\n", self -> Path );
+*/
+
+    RCt = KNSManagerMakeHttpFile (
+                                _ManagerOfKNS,
+                                & HttpFile,
+                                NULL, /* no open connections */
+                                0x01010000,
+                                self -> Url
+                                );
+    if ( RCt == 0 ) {
+        if ( RemoteCacheIsDisklessMode () ) {
+            self -> file = ( KFile * ) HttpFile;
+        }
+        else {
+            RCt = KDirectoryNativeDir ( & Directory );
+            if ( RCt == 0 ) {
+                RCt = KDirectoryMakeCacheTee (
+                                    Directory,
+                                    & TeeFile,
+                                    HttpFile,
+                                    _HttpBlockSize, /* blocksize */
+                                    self -> Path
+                                    );
+                if ( RCt == 0 ) {
+                    self -> file = ( KFile * ) TeeFile;
+
+                        /*  We should create connection entry for pool
+                         */
+                    RCt = _CnEntMake ( self );
+                }
+
+                ReleaseComplain ( KDirectoryRelease, Directory );
+            }
+            ReleaseComplain ( KFileRelease, HttpFile );
+        }
+    }
+
+    if ( RCt != 0 ) {
+        if ( self -> file != NULL ) {
+            ReleaseComplain ( KFileRelease, self -> file );
+            self -> file = NULL;
+        }
+
+        _CnEntDispose ( self );
+    }
+
+    if ( RCt == 0 ) {
+        if ( self -> actual_size == 0 ) {
+            RCt = KFileSize ( self -> file, & ( self -> actual_size ) );
+        }
+    }
+
+    return RCt;
+}   /* _RCacneEntryOpenFileReadRemote () */
+
+rc_t CC
+_RCacheEntryOpenFileReadLocal ( struct RCacheEntry * self )
+{
+    rc_t RCt;
+    const struct KFile * File;
+    struct KDirectory * Directory;
+
+    RCt = 0;
+    File = NULL;
+    Directory = NULL;
+
+    if ( self == NULL ) {
+        return RC ( rcExe, rcFile, rcOpening, rcParam, rcNull );
+    }
+
+    if ( self -> Path == NULL ) {
+        return RC ( rcExe, rcFile, rcOpening, rcParam, rcNull );
+    }
+
+/*
+KOutMsg ( "[GGU] [OpenReadLocal] [%s]\n", self -> Name );
+*/
+/*
+RmOutMsg ( "|||<-- Opening [L] [%s][%s]\n", self -> Name, self -> Url );
+RmOutMsg ( "  |<-- Cache Entry [%s]\n", self -> Path );
+*/
+
+    RCt = KDirectoryNativeDir ( & Directory );
+    if ( RCt == 0 ) {
+        RCt = KDirectoryOpenFileRead ( Directory, & File, self -> Path );
+        if ( RCt == 0 ) {
+            self -> file = File;
+        }
+
+        ReleaseComplain ( KDirectoryRelease, Directory );
+    }
+
+    if ( RCt == 0 ) {
+        if ( self -> actual_size == 0 ) {
+            RCt = KFileSize ( self -> file, & ( self -> actual_size ) );
+        }
+    }
+
+    return RCt;
+}   /* _RCacneEntryOpenFileReadLocal () */
+
+rc_t CC
+_RCacheEntryGetAndCheckFile (
+                        struct RCacheEntry * self,
+                        const struct KFile ** File,
+                        bool * Synchronized
+)
+{
+    rc_t RCt;
+    struct KDirectory * NatDir;
+    bool OpenLocal;
+    bool OpenRemote;
+    bool CloseFile;
+    bool IsComplete;
+
+    RCt = 0;
+    NatDir = NULL;
+    OpenLocal = false;
+    OpenRemote = false;
+    CloseFile = false;
+    IsComplete = false;
+
+    if ( Synchronized != NULL ) {
+        * Synchronized = true;
+    }
+
+    if ( File != NULL ) {
+        * File = NULL;
+    }
+
+    if ( self == NULL ) {
+        return RC ( rcExe, rcFile, rcReading, rcParam, rcNull );
+    }
+
+    if ( File == NULL ) {
+        return RC ( rcExe, rcFile, rcReading, rcParam, rcNull );
+    }
+
+    if ( Synchronized == NULL ) {
+        return RC ( rcExe, rcFile, rcReading, rcParam, rcNull );
+    }
+
+        /*  How it is work:
+         *
+         *  if file exists, it is complete and local, just open it
+         *  any read operation should be unsynchronized.
+         *
+         *  if file does not exists, but opened, we should call
+         *  IsCacheTeeComplete () and if it is complete we should
+         *  close file and open it as regular. Any reed operation
+         *  will be unsynchronized.
+         *
+         *  all other situations, it is not complete, open tee
+         *  all read operations are synchronized.
+         * 
+         *  if it diskless mode - all operations are synchronized
+         */
+
+        /*) Diskless mode.
+         (*/
+    if ( RemoteCacheIsDisklessMode () ) {
+        if ( self -> file == NULL ) {
+            RCt = _RCacheEntryOpenFileReadRemote ( self );
+        }
+
+        if ( RCt == 0 ) {
+            * File = self -> file;
+            * Synchronized = true;
+        }
+
+        return RCt;
+    }
+
+        /*) Normal mode
+         (*/
+    if ( self -> file == NULL ) {
+            /* Checking if it is known that file complete */
+        if ( self -> is_complete ) {
+            OpenLocal = true;
+        }
+        else {
+                /* Checking if file exist */
+            RCt = KDirectoryNativeDir ( & NatDir );
+            if ( RCt == 0 ) {
+                if ( KDirectoryPathType ( NatDir, self -> Path ) == kptFile ) {
+                    OpenLocal = true;
+                }
+                else {
+                    OpenRemote = true;
+                }
+
+                ReleaseComplain ( KDirectoryRelease, NatDir );
+            }
+        }
+    }
+    else {
+            /* Checking if it is known that file complete */
+        if ( self -> is_complete ) {
+            if ( ! self -> is_local ) {
+                CloseFile = true;
+                OpenLocal = true;
+            }
+        }
+        else {
+                /* checking completiness is quite heavy operation */
+            RCt = IsCacheTeeComplete ( self -> file, & IsComplete );
+            if ( RCt == 0 ) {
+                if ( IsComplete ) {
+                    CloseFile = true;
+                    OpenLocal = true;
+                }
+            }
+        }
+    }
+        /*) Stupid checks
+         (*/
+    if ( OpenLocal && OpenRemote ) {
+        RCt = RC ( rcExe, rcFile, rcReading, rcParam, rcInvalid );
+    }
+
+    if ( CloseFile && self -> file == NULL ) {
+        RCt = RC ( rcExe, rcFile, rcReading, rcParam, rcInvalid );
+    }
+
+        /*) Here we are trying to animate that object
+         (*/
+    if ( RCt == 0 ) {
+        if ( CloseFile ) {
+            RCt = _RCacheEntryReleaseWithoutLock ( self );
+/*
+RmOutMsg ( "|||<-- Close file [%s][%s] [A=%d]\n", self -> Name, self -> Path, RCt );
+*/
+        }
+
+        if ( OpenLocal ) {
+            self -> is_complete = true;
+            self -> is_local = true;
+            _CnPoolDrop ( self );
+            _CnEntDispose ( self );
+
+
+            RCt = _RCacheEntryOpenFileReadLocal ( self );
+/*
+RmOutMsg ( "|||<-- Open LOCAL file [%s][%s] [A=%d]\n", self -> Name, self -> Path, RCt );
+*/
+        }
+
+        if ( OpenRemote ) {
+            self -> is_complete = false;
+            self -> is_local = false;
+
+            RCt = _RCacheEntryOpenFileReadRemote ( self );
+/*
+RmOutMsg ( "|||<-- Open REMOTE file [%s][%s] [A=%d]\n", self -> Name, self -> Url, RCt );
+*/
+        }
+
+        if ( RCt == 0 ) {
+                /*  We should put connection to the front of pool
+                 */
+            RCt = _CnPoolToFront ( self );
+            if ( RCt == 0 ) {
+                * File = self -> file;
+                * Synchronized = ! self -> is_local;
+            }
+        }
+    }
+
+    return RCt;
+}   /* _RCacheEntryGetAndCheckFile () */
+
+rc_t CC
+_RCacheEntryDoRead (
+                struct RCacheEntry * self,
+                char * Buffer,
+                size_t SizeToRead,
+                uint64_t Offset,
+                size_t * NumReaded
+)
+{
+    rc_t RCt;
+    const struct KFile * File;
+    bool Synchronized;
+
+    RCt = 0;
+    File = NULL;
+    Synchronized = true;
+
+    if ( NumReaded != NULL ) {
+        * NumReaded = 0;
+    }
+
+    if ( self == NULL ) { 
+        return RC ( rcExe, rcFile, rcReading, rcParam, rcNull );
+    }
+
+    if ( NumReaded == NULL ) {
+        return RC ( rcExe, rcFile, rcReading, rcParam, rcInvalid );
+    }
+
+    if ( SizeToRead == 0 ) {
+        return RC ( rcExe, rcFile, rcReading, rcParam, rcInvalid );
+    }
+
+        /*)  Here we are locking
+         (*/
+/*
+RmOutMsg ( "[KLockAcquire] [%p] [ %d]\n", ( void * ) self -> mutabor, __LINE__ );
+*/
+    RCt = KLockAcquire ( self -> mutabor );
+    if ( RCt == 0 ) {
+        RCt = _RCacheEntryGetAndCheckFile (
+                                        self,
+                                        & File,
+                                        & Synchronized
+                                        );
+        if ( RCt == 0 ) {
+            if ( ! Synchronized ) {
+                    /*) do not need synchronisation to read local file
+                     (*/
+/*
+RmOutMsg ( "[KLockUnlock] [%p] [ %d]\n", ( void * ) self -> mutabor, __LINE__ );
+*/
+                KLockUnlock ( self -> mutabor );
+            }
+
+            RCt = KFileRead (
+                            self -> file,
+                            Offset,
+                            Buffer,
+                            SizeToRead,
+                            NumReaded
+                            );
+/*
+RmOutMsg ( "|||<-- Reading [%s][%s] [O=%d][S=%d][R=%d][A=%d]\n", self -> Name, self -> Url, Offset, SizeToRead, * NumReaded, RCt );
+*/
+        }
+
+        if ( Synchronized ) {
+/*
+RmOutMsg ( "[KLockUnlock] [%p] [ %d]\n", ( void * ) self -> mutabor, __LINE__ );
+*/
+            KLockUnlock ( self -> mutabor );
+        }
+    }
+
+    if ( RCt != 0 ) {
+        * NumReaded = 0;
+
+/*
+RmOutMsg ( "|||<- Failed to read file [%s][%s] at attempt [+1]\n", self -> Name, self -> Url );
+*/
+        _CnPoolDrop ( self );
+        _CnEntDispose ( self );
+
+        // _RCacheEntryReleaseWithLock ( self );
+    }
+
+    return RCt;
+}   /* _RCacheEntryDoRead () */
+
+rc_t CC
+RCacheEntryRead (
+            struct RCacheEntry * self,
+            char * Buffer,
+            size_t SizeToRead,
+            uint64_t Offset,
+            size_t * NumReaded,
+            uint64_t * ActualSize
+)
+{
+    rc_t RCt;
+    int llp;
+    const int NumAttempts = 3;
+
+    RCt = 0;
+    llp = 0;
+
+    if ( self == NULL ) { 
+        return RC ( rcExe, rcFile, rcReading, rcParam, rcNull );
+    }
+
+    for ( llp = 0; llp < NumAttempts; llp ++ ) {
+            /*) There could be non zero value from previous pass
+             (*/
+        if ( RCt != 0 ) {
+PLOGMSG ( klogErr, ( klogErr, "|||<- Trying to read file $(n) [$(u)] at attempt $(l)", PLOG_3(PLOG_S(n),PLOG_S(u),PLOG_I64(l)), self -> Name, self -> Url, llp + 1 ) );
+            RCt = 0;
+        }
+
+        RCt = _RCacheEntryDoRead (
+                                self,
+                                Buffer,
+                                SizeToRead,
+                                Offset,
+                                NumReaded
+                                );
+/*
+RmOutMsg ( "|||<-- Reading [%s][%s] [O=%d][S=%d][R=%d][A=%d]\n", self -> Name, self -> Url, Offset, SizeToRead, * NumReaded, RCt );
+*/
+        if ( RCt == 0 ) {
+            break;
+        }
+    }
+
+    if ( RCt != 0 ) {
+PLOGMSG ( klogErr, ( klogErr, "|||<- Failed to read file $(n)$(u) after $(l) attempts", PLOG_3(PLOG_S(n),PLOG_S(u),PLOG_I64(l)), self -> Name, self -> Url, llp + 1 ) );
+    }
+
+    if ( RCt == 0 ) {
+        if ( ActualSize != NULL ) {
+            * ActualSize = self -> actual_size;
+        }
+    }
+
+    return RCt;
+}   /* RCacheEntryRead () */
+
+/*)))
+ ///  That method will read KFile into a memory.
+ \\\  He-he, it will allocate +1 byte array and set 0 to last one.
+ ///  It suppose to read text files, so, 0 terminated string
+(((*/
+rc_t CC
+_ReadKFileToMemory (
+                const KFile * File,
+                char ** RetBuffer,
+                uint64_t * RetSize
+)
+{
+    rc_t RCt;
+    char * Buf;
+    size_t BufSize;
+
+    RCt = 0;
+    Buf = NULL;
+    BufSize = 0;
+
+    * RetBuffer = NULL;
+    * RetSize = 0;
+
+    if ( File == NULL || RetBuffer == NULL || RetSize == NULL ) {
+        return RC ( rcExe, rcFile, rcReading, rcParam, rcNull );
+    }
+
+    RCt = KFileSize ( File, & BufSize );
+    if ( RCt == 0 ) {
+
+        if ( BufSize != 0 ) {
+
+            Buf = ( char * ) calloc ( BufSize + 1, sizeof ( char ) );
+            if ( Buf == NULL ) {
+                RCt = RC ( rcExe, rcFile, rcAllocating, rcParam, rcNull );
+            }
+            else {
+                RCt = KFileReadExactly ( File, 0, Buf, BufSize );
+                if ( RCt == 0 ) {
+                    * ( Buf + BufSize ) = 0;
+                    * RetBuffer = Buf;
+                    * RetSize = BufSize;
+                }
+                else {
+                    free ( Buf );
+                    RCt = RC ( rcExe, rcFile, rcReading, rcParam, rcFailed );
+                    Buf = NULL;
+                    BufSize = 0;
+                }
+            }
+        }
+        else {
+            RCt = RC ( rcExe, rcFile, rcReading, rcParam, rcEmpty );
+        }
+    }
+
+    return RCt;
+}   /* _ReadKFileToMemory () */
+
+/*)))
+ ///  We need that method because KXML does not read document properly
+ \\\  from KFile over HTTP
+ ///
+(((*/
+rc_t CC
+ReadHttpFileToMemory (
+                    const char * Url,
+                    char ** RetBuffer,
+                    uint64_t * RetSize
+)
+{
+    rc_t RCt;
+    const KFile * File;
+
+    RCt = 0;
+    File = NULL;
+
+    if ( Url == NULL || RetBuffer == NULL || RetSize == NULL ) {
+        return RC ( rcExe, rcFile, rcReading, rcParam, rcNull );
+    }
+
+    RCt = KNSManagerMakeHttpFile (
+                                _ManagerOfKNS,
+                                & File,
+                                NULL,   /* no open connections */
+                                0x01010000,
+                                Url
+                                );
+    if ( RCt == 0 ) {
+        RCt = _ReadKFileToMemory ( File, RetBuffer, RetSize );
+
+        ReleaseComplain ( KFileRelease, File );
+    }
+
+    return RCt;
+}   /* ReadHttpFileToMemory () */
+
+/*)))
+ ///  We need that method because KXML does not read document properly
+ \\\  from KFile over HTTP
+ ///
+(((*/
+rc_t CC
+ReadLocalFileToMemory (
+                    const char * FileName,
+                    char ** RetBuffer,
+                    uint64_t * RetSize
+)
+{
+    rc_t RCt;
+    KDirectory * NativeDir;
+    const KFile * File;
+
+    RCt = 0;
+    NativeDir = NULL;
+    File = NULL;
+
+    RCt = KDirectoryNativeDir ( & NativeDir );
+    if ( RCt == 0 ) {
+
+        RCt = KDirectoryOpenFileRead ( NativeDir, & File, FileName );
+        if ( RCt == 0 ) {
+
+            RCt = _ReadKFileToMemory ( File, RetBuffer, RetSize );
+
+            KFileRelease ( File );
+        }
+
+        KDirectoryRelease ( NativeDir );
+    }
+
+    return RCt;
+}   /* ReadLocalFileToMemory () */
+
+rc_t CC
+ExecuteCGI ( const char * CGICommand )
+{
+    rc_t RCt;
+    const KFile * File;
+    uint64_t FileSize, ToRead, Pos;
+    char Buffer [ 4096 ];
+    size_t NumRead, BSize;
+
+    RCt = 0;
+    File = NULL;
+    FileSize = ToRead = Pos = 0;
+    NumRead = 0;
+    BSize = sizeof ( Buffer );
+
+    if ( CGICommand == NULL ) {
+        return RC ( rcExe, rcFile, rcReading, rcParam, rcNull );
+    }
+
+    RCt = KNSManagerMakeHttpFile (
+                                _ManagerOfKNS,
+                                & File,
+                                NULL,   /* no open connections */
+                                0x01010000,
+                                CGICommand
+                                );
+    if ( RCt == 0 ) {
+        RCt = KFileSize ( File, & FileSize );
+        if ( RCt == 0 ) {
+            Pos = 0;
+            NumRead = 0;
+
+            while ( 0 <= FileSize ) {
+                ToRead = FileSize < BSize ? FileSize : BSize ;
+                RCt = KFileRead (
+                                File,
+                                Pos,
+                                Buffer,
+                                BSize,
+                                & NumRead
+                                );
+                if ( RCt != 0 ) {
+                    break;
+                }
+
+                Pos += NumRead;
+                FileSize -= NumRead;
+            }
+        }
+
+        ReleaseComplain ( KFileRelease, File );
+    }
+
+    return RCt;
+}   /* ExecuteCGI () */
+
+/* just a test */
diff --git a/tools/fuse/remote-cache.h b/tools/fuse/remote-cache.h
new file mode 100644
index 0000000..1635904
--- /dev/null
+++ b/tools/fuse/remote-cache.h
@@ -0,0 +1,169 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_remote_cache_fuser_
+#define _h_remote_cache_fuser_
+
+/*
+ * Lyrics ... because quite exotic requirements of remote file access
+ * which means that we are accessing only files which will be described
+ * in XML file, there are several propositions which were made:
+ *   1) if there -x parameter to fuser contains URL path, we suppose
+ *      that fuser is working in REMOTE MODE
+ *   2) REMOTE MODE required parameter cache directory, and all files
+ *      will be accessed as CACHEDTEE files.
+ *   3) the XML document, which describes filesystem will contain only
+ *      these entries: Directory, File and another XML document.
+ *   4) cached files are valid only on session time, or at the time
+ *      while fuser is working. That means that each time when fuser
+ *      started, it removes all cached files, if those left from
+ *      previous session.
+ *   5) There could be two types of files: plain files and XML
+ *      documents, which represents filesystem node. Files are stored
+ *      in cache directory, and XML documents are loaded and interpreted
+ *      imediately
+ *   6) IMPORTANT: we are not going to initialize and start thread for
+ *      SRA_List, as for checking and updating XML_root document thread
+ *   8) I beleive that it could me much easiest way to write designated
+ *      application for accessing remote files, however, client wants
+ *      it as fuser extention
+ */
+
+/*)))
+ ///   MALICIOUS CODE ON
+(((*/
+
+/*))
+ //  That method will check if path is remote ... starts from "http"
+((*/
+bool CC IsRemotePath ( const char * Path );
+
+/*))
+ //  That method will check if path is local ... exists
+((*/
+bool CC IsLocalPath ( const char * Path );
+
+    /*)))
+     ///  Remote cache initialisation and so on
+    (((*/
+/* Lyrics:
+ * We consider that cache is a directory in local filesystem, which
+ * fully defined by it's path. The content of directory is valid only
+ * for session period, from the time of Cache Initialize to Finalize
+ * Once new session is started, the content of cache left from previous
+ * session is dropped. 
+ * For a moment we do beleive that we do have only one cache directory
+ * per session, which could be initialized only once
+ * UPDATE: from now we allow non-cacheing or diskless mode. In that case
+ *         fuzer will not create any additional files or directories and
+ *         will not use cachetee file, but direct HTTP connection 
+ */
+
+/* That structure will represent CacheFile
+ */
+struct RCacheEntry;
+
+    /*))
+     //  Three methods to work with CacheEntry
+    ((*/
+rc_t CC RCacheEntryAddRef ( struct RCacheEntry * self );
+rc_t CC RCacheEntryRelease ( struct RCacheEntry * self );
+rc_t CC RCacheEntryRead (
+                    struct RCacheEntry * self,
+                    char * Buffer,
+                    size_t BufferSize,
+                    uint64_t Offset,
+                    size_t * NumRead,
+                    uint64_t * ActualSize
+                    );
+    /*))
+     //  This method will set block size for HTTP transport
+     \\  If user want to use default block size value, 0 should
+     //  be used. Will return previous value for block size
+    ((*/
+uint32_t CC RemoteCacheSetHttpBlockSize ( uint32_t HttpBlockSize );
+
+    /*))
+     //  This method will set path for local cache dir
+     \\
+     //  NOTE: CachePath could be NULL, then it is diskless mode
+    ((*/
+rc_t CC RemoteCacheInitialize ( const char * CachePath );
+    /*))
+     //  This method will initialize local cache dir:
+     \\    It will create cache directory if it does not exist
+     //    It will remove all leftovers from previous session
+    ((*/
+rc_t CC RemoteCacheCreate ();
+    /*))
+     //  This method will finalise cache and destroy it's content
+    ((*/
+rc_t CC RemoteCacheDispose ();
+
+    /*))
+     //  Misc methods
+    ((*/
+const char * RemoteCachePath ();
+
+bool RemoteCacheIsDisklessMode ();
+
+rc_t CC RemoteCacheFindOrCreateEntry (
+                        const char * Url,
+                        struct RCacheEntry ** Entry
+                    );
+
+    /*))
+     //  Found that interesting
+    ((*/
+rc_t CC ReadHttpFileToMemory (
+                            const char * Url,
+                            char ** RetBuffer,
+                            uint64_t * RetSize
+                            );
+
+rc_t CC ReadLocalFileToMemory (
+                            const char * FileName,
+                            char ** RetBuffer,
+                            uint64_t * RetSize
+                            );
+
+rc_t CC ExecuteCGI ( const char * CGICommand );
+
+/*)))
+ ///  Shamefull macro
+(((*/
+ #define RM_DEAF_LGO
+
+ #ifdef RM_DEAF_LGO
+ #define RmOutMsg  KOutMsg
+ #else /* RM_DEAF_LGO */
+ #define RmOutMsg(...)
+ #endif /* RM_DEAF_LGO */
+
+/*)))
+ ///   MALICIOUS CODE OFF
+(((*/
+
+#endif /* _h_remote_cache_fuser_ */
diff --git a/tools/fuse/remote-directory.c b/tools/fuse/remote-directory.c
new file mode 100644
index 0000000..487fafe
--- /dev/null
+++ b/tools/fuse/remote-directory.c
@@ -0,0 +1,411 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <klib/namelist.h>
+#include <klib/printf.h>
+#include <kxml/xml.h>
+#include <klib/container.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kproc/lock.h>
+
+typedef struct DirectoryNode DirectoryNode;
+#define FSNODE_IMPL DirectoryNode
+
+#include "log.h"
+#include "xml.h"
+#include "remote-directory.h"
+#include "kfile-accessor.h"
+
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <time.h>
+
+typedef struct DirNodeChild_struct {
+    BSTNode node;
+    const char* full_name; /* full path to detected file */
+    const char* name; /* file name only within full_name above */
+    const FSNode* child;
+} DirNodeChild;
+
+
+static
+int64_t DirNodeChild_FindByName(const void *item, const BSTNode *node)
+{
+    return strcmp((const char*)item, ((const DirNodeChild*)node)->child->name);
+}
+
+static
+void DirNodeChild_Whack(BSTNode *node, void *data)
+{
+    DirNodeChild* n = (DirNodeChild*)node;
+
+    if( n != NULL ) {
+        DEBUG_LINE(8, "Releasing auto TAR %s", n->child->name);
+        FSNode_Release(n->child);
+        FREE(n);
+    }
+}
+
+struct DirectoryNode {
+    FSNode node;
+    char* path;
+    KTime_t mtime;
+    KRWLock* lock;
+    KTime_t timestamp;
+    /* list of physical files and dirs in 'path' minus those in children list */
+    KNamelist* ls; 
+    BSTree children;
+};
+
+struct DirNodeChild_List_Data {
+    rc_t rc;
+    const DirectoryNode* cself;
+    FSNode_Dir_Visit func;
+    void* data;
+};
+
+static
+bool DirNodeChild_List( BSTNode *node, void *data )
+{
+    DirNodeChild* n = (DirNodeChild*)node;
+    struct DirNodeChild_List_Data* d = (struct DirNodeChild_List_Data*)data;
+    const FSNode* ch;
+    bool hidden = true;
+
+    if( ((d->rc = FSNode_FindChild(&d->cself->node, n->child->name, strlen(n->child->name), &ch, &hidden)) == 0 && hidden) ||
+         (GetRCObject(d->rc) == rcName && GetRCState(d->rc) == rcNotFound) ) {
+        d->rc = d->func(n->child->name, d->data);
+    }
+    return d->rc != 0;
+}
+
+static
+rc_t DirectoryNode_Lock(const DirectoryNode* cself, bool exclusive)
+{
+    DEBUG_LINE(8, "Lock DirectoryNode %s %s", cself->path, exclusive ? "write" : "read");
+    return exclusive ? KRWLockAcquireExcl(((DirectoryNode*)cself)->lock) : KRWLockAcquireShared(((DirectoryNode*)cself)->lock);
+}
+
+static
+rc_t DirectoryNode_Unlock(const DirectoryNode* cself)
+{
+    DEBUG_LINE(8, "Unlocking DirectoryNode %s", cself->path);
+    return KRWLockUnlock(((DirectoryNode*)cself)->lock);
+}
+
+static
+rc_t DirectoryNode_IsChild(const DirectoryNode* cself, const char* subpath, const FSNode** node,
+                           int64_t (*finder)(const void *item, const BSTNode *node))
+{
+    DirNodeChild* n = (DirNodeChild*)BSTreeFind(&cself->children, subpath, finder);
+    if( n != NULL ) {
+        *node = n->child;
+    } else {
+        *node = NULL;
+        return RC(rcExe, rcFile, rcAccessing, rcName, rcNotFound);
+    }
+    return 0;
+}
+
+static
+rc_t DirectoryNode_Attr(const DirectoryNode* cself, const char* subpath, uint32_t* type, KTime_t* ts, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz)
+{
+    rc_t rc = 0;
+
+    *type = kptDir;
+    if( cself->path != NULL ) {
+        KDirectory* dir = NULL;
+        const KDirectory* sub = NULL;
+
+        if( subpath != NULL && (rc = DirectoryNode_Lock(cself, false)) == 0 ) {
+            const FSNode* child = NULL;
+            if( (rc = DirectoryNode_IsChild(cself, subpath, &child, DirNodeChild_FindByName)) == 0 ) {
+                rc = FSNode_Attr(child, NULL, type, ts, file_sz, access, block_sz);
+            }
+            ReleaseComplain(DirectoryNode_Unlock, cself);
+            if( child != NULL ) {
+                return rc;
+            }
+        }
+        if( (rc = KDirectoryNativeDir(&dir)) == 0 &&
+            (rc = KDirectoryOpenDirRead(dir, &sub, true, "%s", cself->path)) == 0 ) {
+            const char* path = subpath ? subpath : ".";
+            DEBUG_LINE(8, "Using full name %s/%s", cself->path, path);
+            if( (rc = KDirectoryDate(sub, ts, "%s", path)) == 0 ) {
+                *type = KDirectoryPathType(sub, "%s", path);
+                if( *type != kptBadPath && *type != kptNotFound ) {
+                    if( (rc = KDirectoryAccess(sub, access, "%s", path)) == 0 ) {
+                        if( *type & kptAlias ) {
+                            bool children;
+                            if( (rc = FSNode_HasChildren(&cself->node, &children)) == 0 ) {
+                                /* if it is pointer to an aliased directory and has no XML children than pass symlink on */
+                                if( children == false || subpath != NULL ) {
+                                    char r[4096];
+                                    if( (rc = KDirectoryResolveAlias(sub, true, r, sizeof(r), "%s", path)) == 0 ) {
+                                         DEBUG_LINE(8, "Symlink name %s", r);
+                                        *file_sz = strlen(r);
+                                    }
+                                } else {
+                                    /* otherwise remove alias bit */
+                                    *type = *type & ~kptAlias;
+                                }
+                            }
+                        } else if( *type == kptFile ) {
+                            rc = KDirectoryFileSize(sub, file_sz, "%s", path);
+                        }
+                    }
+                }
+            }
+        }
+        ReleaseComplain(KDirectoryRelease, sub);
+        ReleaseComplain(KDirectoryRelease, dir);
+    } else if( subpath != NULL ) {
+        rc = RC(rcExe, rcDirectory, rcEvaluating, rcDirEntry, rcNotFound);
+    }
+    if( subpath == NULL && cself->mtime != 0 ) {
+        *ts = cself->mtime;
+    }
+    return rc;
+}
+
+struct DirectoryNode_DirVisit_Data {
+    FSNode_Dir_Visit func;
+    void* data;
+};
+
+static
+rc_t CC DirectoryNode_DirVisit( const KDirectory *dir, uint32_t type, const char *name, void *data )
+{
+    struct DirectoryNode_DirVisit_Data* d = (struct DirectoryNode_DirVisit_Data*)data;
+    return d->func(name, d->data);
+}
+
+static
+rc_t DirectoryNode_Dir(const DirectoryNode* cself, const char* subpath, FSNode_Dir_Visit func, void* data)
+{
+    rc_t rc = 0;
+
+    if( subpath == NULL ) {
+        /* add XML tree children */
+        if( (rc = FSNode_ListChildren(&cself->node, func, data)) == 0 ) {
+            if( (rc = DirectoryNode_Lock(cself, false)) == 0 ) {
+                if( cself->ls != NULL ) {
+                    /* add ls result excluding XML children */
+                    uint32_t i = 0, count = 0;
+                    rc = KNamelistCount(cself->ls, &count);
+                    while(rc == 0 && i < count) {
+                        const char* nm = NULL;
+                        const FSNode* ch;
+                        bool hidden = true;
+                        if( (rc = KNamelistGet(cself->ls, i++, &nm)) == 0 &&
+                            (((rc = FSNode_FindChild(&cself->node, nm, strlen(nm), &ch, &hidden)) == 0 && hidden) ||
+                             (GetRCObject(rc) == rcName && GetRCState(rc) == rcNotFound)) ) {
+                            rc = func(nm, data);
+                        }
+                    }
+                }
+                if( rc == 0 ) {
+                    struct DirNodeChild_List_Data d;
+                    d.rc = 0;
+                    d.cself = cself;
+                    d.func = func;
+                    d.data = data;
+                    /* add detected child nodes excluding XML children */
+                    BSTreeDoUntil(&cself->children, false, DirNodeChild_List, &d);
+                    rc = d.rc;
+                }
+                ReleaseComplain(DirectoryNode_Unlock, cself);
+            }
+        }
+    } else {
+        KDirectory* dir = NULL;
+        if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+            struct DirectoryNode_DirVisit_Data d;
+            d.func = func;
+            d.data = data;
+            DEBUG_LINE(8, "Listing kdir path %s/%s", cself->path, subpath);
+            rc = KDirectoryVisit(dir, false, DirectoryNode_DirVisit, &d, "%s/%s", cself->path, subpath);
+            ReleaseComplain(KDirectoryRelease, dir);
+        }
+    }
+    return rc;
+}
+
+
+static
+rc_t DirectoryNode_Open(const DirectoryNode* cself, const char* subpath, const SAccessor** accessor)
+{
+    rc_t rc = 0;
+
+    if( subpath == NULL ) {
+        rc = RC(rcExe, rcFile, rcOpening, rcDirEntry, rcNotFound);
+    } else {
+        const char* nm = NULL;
+
+        if( (rc = DirectoryNode_Lock(cself, false)) == 0 ) {
+            const FSNode* child = NULL;
+            if( (rc = DirectoryNode_IsChild(cself, subpath, &child, DirNodeChild_FindByName)) == 0 ) {
+                rc = FSNode_Open(child, NULL, accessor);
+            }
+            ReleaseComplain(DirectoryNode_Unlock, cself);
+            if( child != NULL ) {
+                return rc;
+            }
+        }
+        if( (rc = FSNode_GetName(&cself->node, &nm)) == 0 ) {
+            KDirectory* dir = NULL;
+            if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+                const KFile* kf = NULL;
+                if( (rc = KDirectoryOpenFileRead(dir, &kf, "%s/%s", cself->path, subpath)) == 0 ) {
+                    if( (rc = KFileAccessor_Make(accessor, nm, kf)) != 0 ) {
+                        ReleaseComplain(KFileRelease, kf);
+                    }
+                }
+                ReleaseComplain(KDirectoryRelease, dir);
+            }
+        }
+    }
+    if( rc != 0 ) {
+        SAccessor_Release(*accessor);
+        *accessor = NULL;
+    }
+    return rc;
+}
+
+static
+rc_t DirectoryNode_Release(DirectoryNode* self)
+{
+    rc_t rc = 0;
+    if( self != NULL ) {
+        BSTreeWhack(&self->children, DirNodeChild_Whack, NULL);
+        ReleaseComplain(KRWLockRelease, self->lock);
+        ReleaseComplain(KNamelistRelease, self->ls);
+        FREE(self->path);
+    }
+    return rc;
+}
+
+static FSNode_vtbl DirectoryNode_vtbl = {
+    sizeof(DirectoryNode),
+    NULL,
+    NULL,
+    DirectoryNode_Attr,
+    DirectoryNode_Dir,
+    NULL,
+    DirectoryNode_Open,
+    DirectoryNode_Release
+};
+
+
+rc_t RemoteDirectoryNode_Make(const KXMLNode* xml_node, FSNode** cself, char* errmsg, const char* rel_path, KTime_t dflt_ktm)
+{
+    rc_t rc = 0;
+
+    if( xml_node == NULL || cself == NULL ) {
+        rc = RC(rcExe, rcDirectory, rcConstructing, rcParam, rcNull);
+    } else {
+        char* path = NULL, *name = NULL, name_buf[4096];
+        KTime_t ktm = 0;
+        DirectoryNode* ff = NULL;
+
+        if( (rc = KXMLNodeReadAttrCStr(xml_node, "path", &path, NULL)) == 0 ) {
+            if( path[0] != '\0' ) {
+                rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+            }
+            FREE(path);
+            path = NULL;
+        } else if( GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound ) {
+            rc = 0;
+        }
+        if( rc != 0 ) {
+            strcpy(errmsg, "Directory/@path: '");
+            strcat(errmsg, path ? path : "(null)");
+            strcat(errmsg, "'");
+        }
+        if( rc == 0 ) {
+            size_t sz;
+            rc = KXMLNodeReadAttrCString(xml_node, "name", name_buf, sizeof(name_buf), &sz);
+            if( rc == 0 && name_buf[0] != '\0' ) {
+                name = name_buf;
+            } else if( (GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound)  ) {
+                rc = 0;
+            }
+            if( rc != 0 ) {
+                strcpy(errmsg, "Directory/@name");
+            } else if( name == NULL ) {
+                if( path == NULL ) {
+                    rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+                } else {
+                    name = strrchr(path, '/');
+                    name = name ? name + 1 : path;
+                }
+            }
+        }
+        if( rc == 0 && (rc = XML_ParseTimestamp(xml_node, "timestamp", &ktm, true)) != 0 ) {
+            strcpy(errmsg, "Directory/@timestamp");
+        }
+        if( rc == 0 ) {
+            struct KNamelist const* attr = NULL;
+            if( (rc = KXMLNodeListAttr(xml_node, &attr)) == 0 ) {
+                uint32_t i = 0, count = 0;
+                if( (rc = KNamelistCount(attr, &count)) == 0 && count > 0 ) {
+                    while( rc == 0 && i < count ) {
+                        const char *attr_nm = NULL;
+                        if( (rc = KNamelistGet(attr, i++, &attr_nm)) != 0 ) {
+                            break;
+                        }
+                        if( strcmp("name", attr_nm) == 0 || strcmp("timestamp", attr_nm) == 0 ) {
+                            continue;
+                        }
+                        rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+                        strcpy(errmsg, "unknown attribute Directory/@");
+                        strcat(errmsg, attr_nm);
+                    }
+                }
+                ReleaseComplain(KNamelistRelease, attr);
+            }
+        }
+        if( rc == 0 ) {
+            if( (rc = FSNode_Make((FSNode**)&ff, name, &DirectoryNode_vtbl)) == 0 &&
+                (rc = KRWLockMake(&ff->lock)) == 0 ) {
+                ff->path = path;
+                ff->mtime = ktm != 0 ? ktm : (path ? 0 : dflt_ktm);
+                BSTreeInit(&ff->children);
+            } else {
+                strcpy(errmsg, "Directory '");
+                strcat(errmsg, name);
+                strcat(errmsg, "'");
+            }
+        }
+        if( rc == 0 ) {
+            *cself = &ff->node;
+        } else {
+            FREE(path);
+        }
+    }
+    return rc;
+}   /* RemoteDirectoryNode_Make () */
diff --git a/tools/fuse/remote-directory.h b/tools/fuse/remote-directory.h
new file mode 100644
index 0000000..bfa0e27
--- /dev/null
+++ b/tools/fuse/remote-directory.h
@@ -0,0 +1,33 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_directory_
+#define _h_sra_fuse_directory_
+
+#include "node.h"
+
+rc_t RemoteDirectoryNode_Make(const KXMLNode* xml_node, FSNode** cself, char* errmsg, const char* rel_path, KTime_t ts);
+
+#endif /* _h_sra_fuse_directory_ */
diff --git a/tools/fuse/remote-file.c b/tools/fuse/remote-file.c
new file mode 100644
index 0000000..f6b7b83
--- /dev/null
+++ b/tools/fuse/remote-file.c
@@ -0,0 +1,308 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <klib/namelist.h>
+#include <klib/printf.h>
+#include <kxml/xml.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <krypto/encfile.h>
+
+typedef struct RemoteFileNode RemoteFileNode;
+#define FSNODE_IMPL RemoteFileNode
+
+#include "log.h"
+#include "xml.h"
+#include "remote-file.h"
+#include "remote-cache.h"
+#include "kfile-accessor.h"
+
+#include <string.h>
+#include <stdlib.h>
+#include <time.h>
+
+rc_t RemoteFileAccessor_Make(const SAccessor** accessor, const char* name, struct RCacheEntry * rentry, const RemoteFileNode* node);
+
+struct RemoteFileNode {
+    FSNode node;
+    char* path;
+    KTime_t mtime;
+    uint64_t file_sz;
+};
+
+static
+rc_t RemoteFileNode_Attr(const RemoteFileNode* cself, const char* subpath, uint32_t* type, KTime_t* ts, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz)
+{
+    rc_t rc = 0;
+
+    if( subpath != NULL ) {
+        rc = RC(rcExe, rcFile, rcEvaluating, rcDirEntry, rcNotFound);
+    } else {
+            /* Here we are: all attributes from XML */
+        * type = kptFile;
+        * ts = cself -> mtime;
+        * file_sz = cself -> file_sz; 
+        * access = 0444;
+        * block_sz = ( 32 * 1024 ); /* <<-- Sorry, I borrowed that
+                                     * value from KCacheTeeFile
+                                     */
+    }
+
+    return rc;
+}
+
+static
+rc_t RemoteFileNode_Open(
+                    const RemoteFileNode* cself,
+                    const char* subpath,
+                    const SAccessor** accessor
+)
+{
+    rc_t rc = 0;
+
+    if( subpath != NULL ) {
+        rc = RC(rcExe, rcFile, rcOpening, rcDirEntry, rcNotFound);
+    } else {
+        struct RCacheEntry * ke = NULL;
+        if ( ( rc = RemoteCacheFindOrCreateEntry( cself->path, &ke )) == 0 ) {
+            if( rc == 0 ) {
+                if ( ( rc = RemoteFileAccessor_Make(
+                                                accessor,
+                                                cself->node.name,
+                                                ke,
+                                                cself
+                                                ) ) != 0 ) {
+                    ReleaseComplain(RCacheEntryRelease, ke);
+                }
+            }
+            
+        }
+    }
+    if( rc != 0 ) {
+        SAccessor_Release(*accessor);
+        *accessor = NULL;
+    }
+    return rc;
+}
+
+static
+rc_t RemoteFileNode_Release(RemoteFileNode* self)
+{
+    if( self != NULL ) {
+        FREE(self->path);
+    }
+    return 0;
+}
+
+static FSNode_vtbl RemoteFileNode_vtbl = {
+    sizeof(RemoteFileNode),
+    NULL,
+    NULL,
+    RemoteFileNode_Attr,
+    NULL,
+    NULL,   /* Unlike FileNode, there are no links */
+    RemoteFileNode_Open,
+    RemoteFileNode_Release
+};
+
+rc_t RemoteFileNode_Make(const KXMLNode* xml_node, FSNode** cself, char* errmsg, const char* rel_path)
+{
+    rc_t rc = 0;
+
+    if( xml_node == NULL || cself == NULL || errmsg == NULL || rel_path == NULL ) {
+        rc = RC(rcExe, rcNode, rcConstructing, rcParam, rcNull);
+    } else {
+        char* path = NULL, *name = NULL, name_buf[4096];
+        KTime_t ktm = 0;
+        uint64_t fsz = 0;
+        RemoteFileNode* ff = NULL;
+        size_t attribute_sz = 0;
+
+        if( (rc = KXMLNodeReadAttrCStr(xml_node, "path", &path, NULL)) == 0 ) {
+            if( path[0] == '\0' ) {
+                rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+            } else {
+                /* NOTE: we do not check path for existence */
+                if ( ! IsRemotePath ( path ) ) {
+                    rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+                }
+            }
+        }
+        if( rc != 0 ) {
+            strcpy(errmsg, "File/@path: '");
+            strcat(errmsg, path ? path : "(null)");
+            strcat(errmsg, "'");
+        }
+        if( rc == 0 ) {
+            rc = KXMLNodeReadAttrCString(xml_node, "name", name_buf, sizeof(name_buf), &attribute_sz);
+            if( rc == 0 && name_buf[0] != '\0' ) {
+                name = name_buf;
+            } else if( GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound ) {
+                rc = 0;
+            }
+            if( rc != 0 ) {
+                strcpy(errmsg, "File/@name");
+            } else if( name == NULL ) {
+                name = strrchr(path, '/');
+                name = name ? name + 1 : path;
+            }
+        }
+        if( rc == 0 && (rc = KXMLNodeReadAttrAsU64(xml_node, "size", &fsz)) != 0 ) {
+            strcpy(errmsg, "File/@size");
+        }
+/* Attributes "size" and "timestamp" are mandatory */
+        if ( fsz <= 0 ) {
+            strcpy(errmsg, "File/@size");
+            rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+        }
+        if( rc == 0 && (rc = XML_ParseTimestamp(xml_node, "timestamp", &ktm, true)) != 0 ) {
+            strcpy(errmsg, "File/@timestamp");
+        }
+        if ( ktm == 0 ) {
+            strcpy(errmsg, "File/@timestamp");
+            rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+        }
+/* Attributes "size" and "timestamp" are mandatory */
+        if( rc == 0 ) {
+            struct KNamelist const* attr = NULL;
+            if( (rc = KXMLNodeListAttr(xml_node, &attr)) == 0 ) {
+                uint32_t i = 0, count = 0;
+                if( (rc = KNamelistCount(attr, &count)) == 0 && count > 0 ) {
+                    while( rc == 0 && i < count ) {
+                        const char *attr_nm = NULL;
+                        if( (rc = KNamelistGet(attr, i++, &attr_nm)) != 0 ) {
+                            break;
+                        }
+                        if( strcmp("path", attr_nm) == 0
+                            || strcmp("name", attr_nm) == 0
+                            || strcmp("timestamp", attr_nm) == 0
+                            || strcmp("size", attr_nm) == 0 ) {
+                            continue;
+                        }
+                        rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+                        strcpy(errmsg, "unknown attribute File/@");
+                        strcat(errmsg, attr_nm);
+                    }
+                }
+                ReleaseComplain(KNamelistRelease, attr);
+            }
+        }
+        if( rc == 0 ) {
+            if( (rc = FSNode_Make((FSNode**)&ff, name, &RemoteFileNode_vtbl)) == 0 ) {
+                ff->path = path;
+                ff->mtime = ktm;
+                ff->file_sz = fsz;
+            } else {
+                strcpy(errmsg, "File '");
+                strcat(errmsg, name);
+                strcat(errmsg, "'");
+            }
+        }
+        if( rc == 0 ) {
+            *cself = &ff->node;
+        } else {
+            FREE(path);
+        }
+    }
+    return rc;
+}
+
+/*)))
+ ///  Remote file accessor. Read behaviour differs from plain file
+(((*/
+
+typedef struct RemoteFileAccessor_struct {
+    struct RCacheEntry* rentry;
+    struct RemoteFileNode * remote_node;
+} RemoteFileAccessor;
+
+static
+rc_t RemoteFileAccessor_Read(const SAccessor* cself, char* buf, size_t size, off_t offset, size_t* num_read)
+{
+    rc_t rc = 0;
+    RemoteFileAccessor* self = (RemoteFileAccessor*)cself;
+    size_t actual = 0;
+    uint64_t actual_file_sz = self -> remote_node -> file_sz;
+
+        /* Here we are truncating size if it is needed */
+    if ( actual_file_sz < offset + size ) {
+        size = actual_file_sz - offset;
+    }
+    do {
+        rc = RCacheEntryRead (
+                    self -> rentry,
+                    &buf[*num_read],
+                    size - * num_read,
+                    offset + * num_read,
+                    &actual,
+                    &actual_file_sz
+                    );
+        if( rc != 0 ) {
+            break;
+        }
+        if( actual == 0 ) {
+            /* EOF */
+            break;
+        }
+
+        if ( actual_file_sz != self -> remote_node -> file_sz ) {
+            self -> remote_node -> file_sz = actual_file_sz;
+        }
+        *num_read += actual;
+    } while(rc == 0 && *num_read < size);
+    DEBUG_MSG(10, ("From %lu read %lu bytes\n", offset, *num_read));
+
+    return rc;
+}
+
+static
+rc_t RemoteFileAccessor_Release(const SAccessor* cself)
+{
+    rc_t rc = 0;
+    if( cself != NULL ) {
+        RemoteFileAccessor* self = (RemoteFileAccessor*)cself;
+        rc = RCacheEntryRelease(self->rentry);
+    }
+    return rc;
+}
+
+rc_t
+RemoteFileAccessor_Make (
+                    const SAccessor** accessor,
+                    const char* name,
+                    struct RCacheEntry * rentry,
+                    const RemoteFileNode* node
+)
+{
+    rc_t rc = 0;
+
+    if( (rc = SAccessor_Make(accessor, sizeof(RemoteFileAccessor), name, RemoteFileAccessor_Read, RemoteFileAccessor_Release)) == 0 ) {
+        ((RemoteFileAccessor*)(*accessor))->rentry = rentry;
+        ((RemoteFileAccessor*)(*accessor))->remote_node = ( struct RemoteFileNode * ) node;
+
+        RCacheEntryAddRef ( rentry );
+    }
+    return rc;
+}
diff --git a/tools/fuse/remote-file.h b/tools/fuse/remote-file.h
new file mode 100644
index 0000000..f50a24c
--- /dev/null
+++ b/tools/fuse/remote-file.h
@@ -0,0 +1,33 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_remote_file_
+#define _h_sra_fuse_remote_file_
+
+#include "node.h"
+
+rc_t RemoteFileNode_Make(const KXMLNode* xml_node, FSNode** cself, char* errmsg, const char* rel_path);
+
+#endif /* _h_sra_fuse_remote_file_ */
diff --git a/tools/fuse/remote-fuser.c b/tools/fuse/remote-fuser.c
new file mode 100644
index 0000000..cd13db3
--- /dev/null
+++ b/tools/fuse/remote-fuser.c
@@ -0,0 +1,206 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <kapp/args.h>
+#include <klib/out.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "log.h"
+#include "node.h"
+#include "accessor.h"
+
+#include "remote-xml.h"
+#include "remote-fuser.h"
+#include "remote-cache.h"
+
+typedef struct SRequest_struct {
+    const FSNode* node;
+    const char* subpath;
+} SRequest;
+
+static char* g_work_dir = NULL;
+
+static
+rc_t SRequestMake(SRequest* request, const char* path, bool recur)
+{
+    rc_t rc = 0;
+
+    if( request == NULL ) {
+        rc = RC(rcExe, rcFileDesc, rcConstructing, rcParam, rcNull);
+    } else {
+        rc = XML_FindLock(path, recur, &request->node, &request->subpath);
+    }
+    return rc;
+}
+
+static
+void SRequestRelease(SRequest* request)
+{
+    if( request != NULL ) {
+        XML_FindRelease();
+    }
+}
+
+rc_t Initialize(unsigned int sra_sync, const char* xml_path, const char* cache_dir, const char* heart_beat_url, unsigned int xml_sync, const char* xml_root, uint32_t block_size)
+{
+    rc_t rc = 0;
+    KDirectory* dir = NULL;
+
+    if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+        char buf[4096];
+        if( (rc = KDirectoryResolvePath(dir, true, buf, 4096, xml_root)) == 0 ) {
+            /* replace /. at the end to  just / */
+            if( strcmp(&buf[strlen(buf) - 2], "/.") == 0 ) {
+                buf[strlen(buf) - 1] = '\0';
+            }
+            /* add / to the end if missing */
+            if( buf[strlen(buf) - 1] != '/' ) {
+                buf[strlen(buf) + 1] = '\0';
+                buf[strlen(buf)] = '/';
+            }
+            if( (rc = StrDup(buf, &g_work_dir)) == 0 ) {
+                DEBUG_MSG(8, ("Current directory set to '%s'\n", g_work_dir));
+            }
+        }
+
+        if ( rc == 0 ) {
+            rc = RemoteCacheInitialize ( cache_dir );
+            if ( rc == 0 ) {
+                RemoteCacheSetHttpBlockSize ( block_size );
+
+                if ( IsLocalPath ( xml_path ) ) {
+                    KDirectoryResolvePath(dir, true, buf, 4096, xml_path);
+                    rc = XML_Make(dir, g_work_dir, buf, heart_beat_url, xml_sync);
+                }
+                else {
+                    rc = XML_Make(dir, g_work_dir, xml_path, heart_beat_url, xml_sync);
+                }
+            }
+        }
+        ReleaseComplain(KDirectoryRelease, dir);
+    }
+    return rc;
+}
+
+/* =============================================================================== */
+/* system call handlers */
+/* =============================================================================== */
+
+const char UsageDefaultName[] = "remote-fuser";
+
+rc_t CC UsageSummary (const char* progname)
+{
+    return KOutMsg("Usage:\n"
+        "\t%s [options] -o [FUSE options] -x path -m path\n"
+        "\t%s [options] -u -m path\n\n", progname, progname);
+}
+
+rc_t CC Usage ( const Args * args )
+{
+    /* dummy for newer args system will be filled when system is complete!!! */
+    return 0;
+}
+
+void SRA_FUSER_Init(void)
+{
+    rc_t rc = 0;
+    /* reopen log file and start watch thread(s) */
+    if( (rc = LogFile_Init(NULL, 0, true, NULL)) != 0 ) {
+        LOGERR(klogErr, rc, "log file");
+    }
+    XML_Init();
+    LOGMSG(klogInfo, "Started");
+}
+
+void SRA_FUSER_Fini(void)
+{
+    XML_Fini();
+    LOGMSG(klogInfo, "Stopped");
+    LogFile_Fini();
+    FREE(g_work_dir);
+}
+
+rc_t SRA_FUSER_GetDir(const char* path, FSNode_Dir_Visit func, void* data)
+{
+    rc_t rc = 0;
+    SRequest request;
+
+    if( (rc = SRequestMake(&request, path, true)) == 0 ) {
+        rc = FSNode_Dir(request.node, request.subpath, func, data);
+        SRequestRelease(&request);
+    }
+    return rc;
+}
+
+rc_t SRA_FUSER_GetAttr(const char* path, uint32_t* type, KTime_t* ts, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz)
+{
+    rc_t rc = 0;
+    SRequest request;
+
+    if( (rc = SRequestMake(&request, path, false)) == 0 ) {
+        rc = FSNode_Attr(request.node, request.subpath, type, ts, file_sz, access, block_sz);
+        SRequestRelease(&request);
+    }
+    return rc;
+}
+
+rc_t SRA_FUSER_ResolveLink(const char* path, char* buf, size_t buf_sz)
+{
+    rc_t rc = 0;
+    SRequest request;
+
+    if( (rc = SRequestMake(&request, path, false)) == 0 ) {
+        rc = FSNode_Link(request.node, request.subpath, buf, buf_sz);
+        SRequestRelease(&request);
+    }
+    return rc;
+}
+
+rc_t SRA_FUSER_OpenNode(const char* path, const void** data)
+{
+    rc_t rc = 0;
+    SRequest request;
+
+    if( (rc = SRequestMake(&request, path, false)) == 0 ) {
+        rc = FSNode_Open(request.node, request.subpath, (const SAccessor**)data);
+        SRequestRelease(&request);
+    }
+    return rc;
+}
+
+rc_t SRA_FUSER_ReadNode(const char* path, const void* data, char *buf, size_t size, off_t offset, size_t* num_read)
+{
+    return SAccessor_Read(data, buf, size, offset, num_read);
+}
+
+rc_t SRA_FUSER_CloseNode(const char* path, const void* data)
+{
+/*
+RmOutMsg (")_)_)_)_)__)_) SRA_FUSER_CloseNode\n" );
+*/
+    return SAccessor_Release(data);
+}
diff --git a/tools/fuse/remote-fuser.h b/tools/fuse/remote-fuser.h
new file mode 100644
index 0000000..80badaf
--- /dev/null
+++ b/tools/fuse/remote-fuser.h
@@ -0,0 +1,52 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_fuser_
+#define _h_sra_fuse_fuser_
+
+#include "node.h"
+
+uint32_t KAppVersion(void);
+
+/* TBH added cache_dir parameter, and xml_root, and block_size */
+rc_t Initialize(unsigned int sra_sync, const char* xml_path,
+                const char* cache_dir, const char* heart_beat_url,
+                unsigned int xml_sync, const char* xml_root,
+                uint32_t block_size);
+/* TBN */
+
+/* FUSE call backs */
+void SRA_FUSER_Init(void);
+void SRA_FUSER_Fini(void);
+
+rc_t SRA_FUSER_GetAttr(const char* path, uint32_t* type, KTime_t* date, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz);
+rc_t SRA_FUSER_GetDir(const char* path, FSNode_Dir_Visit func, void* data);
+rc_t SRA_FUSER_ResolveLink(const char* path, char* buf, size_t buf_sz);
+
+rc_t SRA_FUSER_OpenNode(const char* path, const void** data);
+rc_t SRA_FUSER_ReadNode(const char* path, const void* data, char *buf, size_t size, off_t offset, size_t* num_read);
+rc_t SRA_FUSER_CloseNode(const char* path, const void* data);
+
+#endif /* _h_sra_fuse_fuser_ */
diff --git a/tools/fuse/remote-link.c b/tools/fuse/remote-link.c
new file mode 100644
index 0000000..4354627
--- /dev/null
+++ b/tools/fuse/remote-link.c
@@ -0,0 +1,208 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <klib/namelist.h>
+#include <klib/printf.h>
+#include <kxml/xml.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <krypto/encfile.h>
+
+typedef struct RemoteLinkNode RemoteLinkNode;
+#define FSNODE_IMPL RemoteLinkNode
+
+#include "log.h"
+#include "xml.h"
+#include "remote-link.h"
+#include "remote-cache.h"
+
+#include <string.h>
+#include <stdlib.h>
+#include <time.h>
+
+/**************************************************************
+ * UMBROCHUHVYR
+ * There is some info about links in that application
+ * We suppose that Link is a symbolic link, which have only one
+ * parameter path to the referred node. That path could be :
+ *   absolute - in that case node will be searched from root of
+ *              XML document describing that directory
+ *   relative - in that case node will be searched from current
+ *              link location.
+ **************************************************************/
+
+struct RemoteLinkNode {
+    FSNode node;
+    char* path;
+    KTime_t mtime;
+};
+
+static
+rc_t RemoteLinkNode_Attr(const RemoteLinkNode* cself, const char* subpath, uint32_t* type, KTime_t* ts, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz)
+{
+    rc_t rc = 0;
+
+    if( subpath != NULL ) {
+        rc = RC(rcExe, rcFile, rcEvaluating, rcDirEntry, rcNotFound);
+    } else {
+            /* Here we are: all attributes from XML */
+        * type = kptFile | kptAlias;
+        * ts = cself -> mtime;
+        * file_sz = 5; 
+        * access = 0777;
+        * block_sz = ( 32 * 1024 ); /* <<-- Sorry, I borrowed that
+                                     * value from KCacheTeeFile
+                                     */
+    }
+
+    return rc;
+}
+
+static
+rc_t RemoteLinkNode_Link(
+                    const RemoteLinkNode* cself,
+                    const char* subpath,
+                    char * Buffer,
+                    size_t BufferSize
+)
+{
+    rc_t rc = 0;
+
+    if( subpath != NULL ) {
+        rc = RC(rcExe, rcFile, rcOpening, rcDirEntry, rcNotFound);
+    } else {
+        size_t pathSize = string_measure ( cself -> path, NULL );
+        if ( Buffer == NULL || BufferSize <= pathSize ) {
+            rc = RC(rcExe, rcFile, rcOpening, rcDirEntry, rcInvalid);
+        }
+        else {
+            string_copy ( Buffer, BufferSize, cself -> path, pathSize );
+        }
+    }
+
+    return rc;
+}
+
+static
+rc_t RemoteLinkNode_Release(RemoteLinkNode* self)
+{
+    if( self != NULL ) {
+        FREE(self->path);
+    }
+    return 0;
+}
+
+static FSNode_vtbl RemoteLinkNode_vtbl = {
+    sizeof(RemoteLinkNode),
+    NULL,
+    NULL,
+    RemoteLinkNode_Attr,
+    NULL,
+    RemoteLinkNode_Link,
+    NULL,
+    RemoteLinkNode_Release
+};
+
+rc_t RemoteLinkNode_Make(const KXMLNode* xml_node, FSNode** cself, char* errmsg, const char* rel_path)
+{
+    rc_t rc = 0;
+
+    if( xml_node == NULL || cself == NULL || errmsg == NULL || rel_path == NULL ) {
+        rc = RC(rcExe, rcNode, rcConstructing, rcParam, rcNull);
+    } else {
+        char* path = NULL, *name = NULL, name_buf[4096];
+        KTime_t ktm = 0;
+        RemoteLinkNode* ff = NULL;
+        size_t attribute_sz = 0;
+
+        if( (rc = KXMLNodeReadAttrCStr(xml_node, "path", &path, NULL)) == 0 ) {
+            if( path[0] == '\0' ) {
+                rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+            }
+        }
+        if( rc != 0 ) {
+            strcpy(errmsg, "File/@path: '");
+            strcat(errmsg, path ? path : "(null)");
+            strcat(errmsg, "'");
+        }
+        if( rc == 0 ) {
+            rc = KXMLNodeReadAttrCString(xml_node, "name", name_buf, sizeof(name_buf), &attribute_sz);
+            if( rc == 0 && name_buf[0] != '\0' ) {
+                name = name_buf;
+            } else if( GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound ) {
+                rc = 0;
+            }
+            if( rc != 0 ) {
+                strcpy(errmsg, "File/@name");
+            } else if( name == NULL ) {
+                name = strrchr(path, '/');
+                name = name ? name + 1 : path;
+            }
+        }
+        if( rc == 0 && (rc = XML_ParseTimestamp(xml_node, "timestamp", &ktm, true)) != 0 ) {
+            strcpy(errmsg, "File/@timestamp");
+        }
+        if( rc == 0 ) {
+            struct KNamelist const* attr = NULL;
+            if( (rc = KXMLNodeListAttr(xml_node, &attr)) == 0 ) {
+                uint32_t i = 0, count = 0;
+                if( (rc = KNamelistCount(attr, &count)) == 0 && count > 0 ) {
+                    while( rc == 0 && i < count ) {
+                        const char *attr_nm = NULL;
+                        if( (rc = KNamelistGet(attr, i++, &attr_nm)) != 0 ) {
+                            break;
+                        }
+                        if( strcmp("path", attr_nm) == 0
+                            || strcmp("name", attr_nm) == 0
+                            || strcmp("timestamp", attr_nm) == 0
+                            ) {
+                            continue;
+                        }
+                        rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+                        strcpy(errmsg, "unknown attribute File/@");
+                        strcat(errmsg, attr_nm);
+                    }
+                }
+                ReleaseComplain(KNamelistRelease, attr);
+            }
+        }
+        if( rc == 0 ) {
+            if( (rc = FSNode_Make((FSNode**)&ff, name, &RemoteLinkNode_vtbl)) == 0 ) {
+                ff->path = path;
+                ff->mtime = ktm;
+            } else {
+                strcpy(errmsg, "File '");
+                strcat(errmsg, name);
+                strcat(errmsg, "'");
+            }
+        }
+        if( rc == 0 ) {
+            *cself = &ff->node;
+        } else {
+            FREE(path);
+        }
+    }
+    return rc;
+}
diff --git a/tools/fuse/remote-link.h b/tools/fuse/remote-link.h
new file mode 100644
index 0000000..4322713
--- /dev/null
+++ b/tools/fuse/remote-link.h
@@ -0,0 +1,33 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_remote_link_
+#define _h_sra_fuse_remote_link_
+
+#include "node.h"
+
+rc_t RemoteLinkNode_Make(const KXMLNode* xml_node, FSNode** cself, char* errmsg, const char* rel_path);
+
+#endif /* _h_sra_fuse_remote_link_ */
diff --git a/tools/fuse/remote-xml.c b/tools/fuse/remote-xml.c
new file mode 100644
index 0000000..7788d3d
--- /dev/null
+++ b/tools/fuse/remote-xml.c
@@ -0,0 +1,603 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <klib/namelist.h>
+#include <klib/container.h>
+#include <klib/log.h>
+#include <klib/printf.h>
+#include <klib/out.h>
+#include <kproc/lock.h>
+#include <kproc/thread.h>
+#include <kns/manager.h>
+#include <kns/http.h>
+
+#include "log.h"
+#include "remote-xml.h"
+#include "file.h"
+#include "node.h"
+
+#include "remote-file.h"
+#include "remote-directory.h"
+#include "remote-link.h"
+#include "remote-cache.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+static const KXMLMgr* g_xmlmgr = NULL;
+static const FSNode* g_root = NULL;
+static KRWLock* g_lock = NULL;
+static const char* g_start_dir = NULL;
+
+static unsigned int g_xml_sync = 0;
+/* if g_xml_sync == 0 these are not used: */
+static KTime_t g_xml_mtime = 0;
+static char* g_xml_path = NULL;
+static KThread* g_xml_thread = NULL;
+
+static char g_fuse_version [ 128 ];
+static char g_heart_beat_url_complete [ 4096 ];
+static char * g_heart_beat_url = NULL;
+static char * g_heart_beat_url_complete_p = NULL;
+
+static
+rc_t XMLLock(bool exclusive)
+{
+    DEBUG_MSG(10, ("Lock XML tree %s\n", exclusive ? "write" : "read"));
+    return exclusive ? KRWLockAcquireExcl(g_lock) : KRWLockAcquireShared(g_lock);
+}
+
+static
+void XMLUnlock(void)
+{
+    DEBUG_MSG(10, ("Unlocked XML tree\n"));
+    ReleaseComplain(KRWLockUnlock, g_lock);
+}
+
+void XML_FindRelease(void)
+{
+    XMLUnlock();
+}
+
+rc_t XML_FindLock(const char* path, bool recur, const FSNode** node, const char** subpath)
+{
+    rc_t rc = 0;
+    size_t sz = 0;
+    const char* p0 = NULL, *p = NULL;
+    const FSNode* pn = NULL, *n = NULL;
+    bool hidden = false;
+
+    if( path == NULL || node == NULL || subpath == NULL ) {
+        return RC(rcExe, rcPath, rcResolving, rcParam, rcNull);
+    }
+    sz = strlen(path);
+    if( sz == 0 ) {
+        return RC(rcExe, rcPath, rcResolving, rcParam, rcEmpty);
+    }
+    p0 = path;
+    if( (rc = XMLLock(false)) != 0 ) {
+        return rc;
+    }
+    pn = g_root;
+    do {
+        DEBUG_MSG(8, ("Path: '%s'\n", p0));
+        while( *p0 == '/' && *p0 != '\0' ) {
+            p0++;
+        }
+        if( *p0 == '\0' ) {
+            break;
+        }
+        p = strchr(p0, '/');
+        if( p == NULL ) {
+            p = p0 + strlen(p0);
+        }
+        DEBUG_MSG(8, ("Push: '%.*s'\n", p - p0, p0));
+        if( (rc = FSNode_FindChild(pn, p0, p - p0, &n, &hidden)) == 0 ) {
+            if( hidden ) {
+                pn = n;
+                DEBUG_MSG(8, ("Match! hidden '%s' left '%s'\n", pn->name, p0));
+                break;
+            } else {
+                DEBUG_MSG(8, ("Match! '%.*s' left '%s'\n", p - p0, p0, p));
+            }
+        } else if( GetRCState(rc) == rcNotFound ) {
+            rc = 0;
+            break;
+        }
+        pn = n;
+        p0 = p;
+    } while( rc == 0 && p0 < path + sz );
+
+    if( rc == 0 ) {
+        if( pn == NULL ) {
+            rc = RC(rcExe, rcPath, rcResolving, rcDirEntry, rcNotFound);
+            DEBUG_MSG(10, ("Not found: '%s', in '%s'\n", p0, path));
+        } else {
+            if( (rc = FSNode_Touch(pn)) != 0 ) {
+                PLOGERR(klogWarn, (klogWarn, rc, "touch failed for $(n)", PLOG_S(n), pn->name));
+                rc = 0;
+            }
+            *node = pn;
+            *subpath = (p0 && p0[0] != '\0') ? p0 : NULL;
+#if _DEBUGGING
+            {
+                const char* nm = NULL;
+                FSNode_GetName(pn, &nm);
+                DEBUG_MSG(10, ("Found: '%s', sub '%s'\n", nm, *subpath));
+            }
+#endif
+        }
+    }
+    if( rc != 0 ) {
+        XMLUnlock();
+    }
+    return rc;
+}
+
+static
+rc_t XML_ValidateNode(FSNode* parent, const KXMLNode* n, char* errmsg)
+{
+    rc_t rc = 0;
+    const char* name = NULL;
+    FSNode* fsn = NULL;
+    bool children_allowed = false, should_have_children = false, ignore_children = false;
+
+    if( (rc = KXMLNodeElementName(n, &name)) != 0 ) {
+        return rc;
+    }
+    DEBUG_MSG(8, ("Node: %s\n", name));
+    if( name == NULL ) {
+        return RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcNull);
+    }
+
+    if( strcmp(name, "Directory") == 0 ) {
+        rc = RemoteDirectoryNode_Make(n, &fsn, errmsg, g_start_dir, g_xml_mtime);
+        children_allowed = true;
+    } else if( strcmp(name, "File") == 0 ) {
+        rc = RemoteFileNode_Make(n, &fsn, errmsg, g_start_dir);
+    } else if( strcmp(name, "Link") == 0 ) {
+        rc = RemoteLinkNode_Make(n, &fsn, errmsg, g_start_dir);
+    } else {
+        strcpy(errmsg, name);
+        rc = RC(rcExe, rcDoc, rcValidating, rcTag, rcUnknown);
+    }
+    if( rc == 0 ) {
+        strcpy(errmsg, name);
+        if( fsn == parent || (rc = FSNode_AddChild(parent, fsn)) == 0 ) {
+            uint32_t count = 0;
+            if( (rc = KXMLNodeCountChildNodes(n, &count)) == 0 && count > 0 ) {
+                if( !children_allowed ) {
+                    if( fsn != NULL ) {
+                        FSNode_GetName(fsn, &name);
+                    }
+                    rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+                    strcpy(errmsg, name);
+                } else if( !ignore_children ) {
+                    uint32_t i = 0;
+                    const KXMLNode* ch = NULL;
+                    while( rc == 0 && i < count ) {
+                        if( (rc = KXMLNodeGetNodeRead(n, &ch, i++)) == 0 ) {
+                            rc = XML_ValidateNode(fsn, ch, errmsg);
+                            ReleaseComplain(KXMLNodeRelease, ch);
+                        }
+                    }
+                }
+            } else if( count == 0 && should_have_children ) {
+                PLOGMSG(klogWarn, (klogWarn, "$(n) may have children", PLOG_S(n), name));
+            }
+        }
+    }
+    return rc;
+}   /* XML_ValidateNode() */
+
+static
+rc_t RootNode_Attr(const FSNode* cself, const char* subpath, uint32_t* type, KTime_t* ts, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz)
+{
+    rc_t rc = 0;
+
+    *type = kptDir;
+    if( subpath != NULL ) {
+        rc = RC(rcExe, rcFile, rcEvaluating, rcDirEntry, rcNotFound);
+    }
+    return rc;
+}
+
+static
+rc_t RootNode_Dir(const FSNode* cself, const char* subpath, FSNode_Dir_Visit func, void* data)
+{
+    if( subpath != NULL ) {
+        return RC(rcExe, rcFile, rcListing, rcDirEntry, rcNotFound);
+    }
+    return FSNode_ListChildren(cself, func, data);
+}
+
+static const FSNode_vtbl RootNode_vtbl = {
+    sizeof(FSNode),
+    NULL,
+    NULL,
+    RootNode_Attr,
+    RootNode_Dir,
+    NULL,
+    NULL,
+    NULL
+};
+
+/*)))
+ ///  I make that method becaue I need also to retrieve version
+(((*/
+static
+rc_t _XML_DocumentOpenAndSomethingElse (
+                            const char * Url,
+                            const KXMLDoc ** Doc
+)
+{
+    rc_t RCt;
+    char * Buffer;
+    uint64_t BufferSize;
+    const KXMLDoc * XmlDoc;
+    const KXMLNodeset * NodeSet;
+    uint32_t NodeCount;
+    size_t AttrSize;
+    const KXMLNode * Node;
+
+    RCt = 0;
+    Buffer = NULL;
+    BufferSize = 0;
+    XmlDoc = NULL;
+    NodeSet = NULL;
+    NodeCount = AttrSize = 0;
+    Node = NULL;
+
+    if ( Url == NULL || Doc == NULL ) {
+        return RC ( rcXML, rcDoc, rcConstructing, rcParam, rcNull );
+    }
+    * Doc = NULL;
+
+    RCt = IsLocalPath ( Url )
+            ? ReadLocalFileToMemory ( Url, & Buffer, & BufferSize )
+            : ReadHttpFileToMemory ( Url, & Buffer, & BufferSize )
+            ;
+    if ( RCt == 0 ) {
+        RCt = KXMLMgrMakeDocReadFromMemory (
+                                        g_xmlmgr,
+                                        & XmlDoc,
+                                        Buffer,
+                                        BufferSize
+                                        );
+        if ( RCt == 0 ) {
+                /* Here we are ... retrieving '/FUSE' node
+                 */
+            RCt = KXMLDocOpenNodesetRead (
+                                        XmlDoc,
+                                        &NodeSet,
+                                        "/FUSE"
+                                        );
+            if ( RCt == 0 ) {
+                RCt = KXMLNodesetCount ( NodeSet, & NodeCount );
+                if ( RCt == 0 ) {
+                    if ( NodeCount != 1 ) {
+                        RCt = RC ( rcXML, rcDoc, rcConstructing, rcFormat, rcInvalid );
+                    }
+                    if ( RCt == 0 ) {
+                            /*  FUSE node is always alone
+                             */
+                        RCt = KXMLNodesetGetNodeRead (
+                                                    NodeSet,
+                                                    & Node,
+                                                    0
+                                                    );
+                        if ( RCt == 0 ) {
+                            RCt = KXMLNodeReadAttrCString (
+                                        Node,
+                                        "version",
+                                        g_fuse_version,
+                                        sizeof ( g_fuse_version ),
+                                        & AttrSize
+                                        );
+                            if ( RCt != 0 ) {
+                                /* There were no version defined */
+                                RmOutMsg ( "WARNING: No version provided\n" );
+                                RCt = 0;
+                            }
+                            else {
+                                /* TODO : set version  */
+                                if ( g_heart_beat_url != NULL ) {
+                                    RCt = string_printf (
+                                        g_heart_beat_url_complete,
+                                        sizeof ( g_heart_beat_url_complete ),
+                                        & AttrSize,
+                                        g_heart_beat_url,
+                                        g_fuse_version
+                                        );
+                                    if ( RCt == 0 ) {
+                                        g_heart_beat_url_complete_p = g_heart_beat_url_complete;
+                                    }
+                                }
+                            }
+
+                            ReleaseComplain ( KXMLNodeRelease, Node );
+                        }
+                    }
+                }
+
+                ReleaseComplain ( KXMLNodesetRelease, NodeSet );
+            }
+        }
+
+        free ( Buffer );
+    }
+
+    if ( RCt == 0 ) {
+        * Doc = XmlDoc;
+    }
+    else {
+        ReleaseComplain ( KXMLDocRelease, XmlDoc );
+    }
+
+    return RCt;
+}   /* _XML_DocumentOpenAndSomethingElse () */
+
+static
+rc_t XML_Open(const char* path, const FSNode** tree)
+{
+    rc_t rc = 0;
+    char errmsg[4096] = "";
+    const KXMLDoc* xmldoc = NULL;
+    
+    PLOGMSG(klogInfo, (klogInfo, "Reading XML file '$(x)'", PLOG_S(x), path));
+    if( (rc = _XML_DocumentOpenAndSomethingElse(path, &xmldoc)) == 0 ) {
+
+        if( (rc = FSNode_Make((FSNode**)tree, "ROOT", &RootNode_vtbl)) == 0 ) {
+            const KXMLNodeset* ns = NULL;
+            if( (rc = KXMLDocOpenNodesetRead(xmldoc, &ns, "/FUSE/*")) == 0 ) {
+                uint32_t count = 0;
+                if( (rc = KXMLNodesetCount(ns, &count)) == 0 ) {
+                    if( count == 0 ) {
+                        rc = RC(rcExe, rcDoc, rcValidating, rcData, rcEmpty);
+                    } else {
+                        uint32_t i = 0;
+                        while(rc == 0 && i < count) {
+                            const KXMLNode* n = NULL;
+                            if( (rc = KXMLNodesetGetNodeRead(ns, &n, i++)) == 0 ) {
+                                errmsg[0] = '\0';
+                                rc = XML_ValidateNode((FSNode*)*tree, n, errmsg);
+                                ReleaseComplain(KXMLNodeRelease, n);
+                            }
+                        }
+                    }
+                }
+                ReleaseComplain(KXMLNodesetRelease, ns);
+            }
+        }
+        if( rc != 0 ) {
+            FSNode_Release(*tree);
+            *tree = NULL;
+        }
+        ReleaseComplain(KXMLDocRelease, xmldoc);
+    }
+    if( rc == 0 ) {
+        PLOGMSG(klogInfo, (klogInfo, "XML file '$(x)' ok", PLOG_S(x), path));
+    } else {
+        if( strlen(errmsg) < 1 ) {
+            strcpy(errmsg, path);
+        }
+        LOGERR(klogErr, rc, errmsg);
+    }
+    return rc;
+}
+
+static
+rc_t XMLThread( const KThread *self, void *data )
+{
+    /* rc_t rc = 0; */
+
+    PLOGMSG(klogInfo, (klogInfo, "Heart beat thread started with $(s) sec", PLOG_U32(s), g_xml_sync));
+
+    do {
+        sleep(g_xml_sync);
+
+        PLOGMSG(klogInfo, (klogInfo, "Heart beat working $(s)", PLOG_S(s), g_heart_beat_url_complete_p));
+
+        if ( g_heart_beat_url_complete_p != NULL ) {
+            /* rc = */ ExecuteCGI ( g_heart_beat_url_complete_p );
+        }
+    } while( g_xml_sync > 0 );
+    LOGMSG(klogInfo, "Heart beat thread ended");
+    return 0;
+}
+
+rc_t XML_Make(KDirectory* dir, const char* const work_dir, const char* xml_path, const char *heart_beat_url, unsigned int sync)
+{
+    rc_t rc = 0; 
+
+    g_xml_sync = sync;
+    if( g_xmlmgr == NULL && (rc = KXMLMgrMakeRead(&g_xmlmgr)) != 0 ) {
+        g_xmlmgr = NULL;
+        LOGERR(klogErr, rc, "XML manager");
+    } else {
+        if( (rc = StrDup(xml_path, &g_xml_path)) == 0 ) {
+            DEBUG_MSG(8, ("XML path set to '%s'\n", g_xml_path));
+        }
+        if ( heart_beat_url != NULL ) {
+            if( (rc = StrDup(heart_beat_url, & g_heart_beat_url) ) == 0 ) {
+                DEBUG_MSG(8, ("Heart Beat path set to '%s'\n", g_heart_beat_url));
+            }
+        }
+        else {
+            g_heart_beat_url = NULL;
+        }
+
+        g_start_dir = work_dir;
+    }
+    if( rc == 0 ) {
+        rc = FSNode_Make((FSNode**)&g_root, "ROOT", &RootNode_vtbl);
+    }
+    return rc;
+}
+
+void FUSER_abort ();
+
+void XML_Init(void)
+{
+    rc_t rc = 0;
+
+    * g_fuse_version = 0;
+    * g_heart_beat_url_complete = 0;
+
+    if( g_lock == NULL && (rc = KRWLockMake(&g_lock)) != 0 ) {
+        g_lock = NULL;
+        LOGERR(klogErr, rc, "XML lock");
+    }
+
+    PLOGMSG(klogInfo, (klogInfo, "XML file is URL '$(x)' ok", PLOG_S(x), g_xml_path));
+
+    rc = RemoteCacheCreate ();
+    if ( rc == 0 ) {
+        rc = XML_Open ( g_xml_path, & g_root );
+        if ( rc == 0 ) {
+                /*) Here we are starting special thtread, only if 
+                 /  users set up URL
+                (*/
+            if ( rc == 0 && g_heart_beat_url_complete_p != NULL ) {
+                if( (rc = KThreadMake(&g_xml_thread, XMLThread, NULL)) != 0 ) {
+                    LOGERR(klogErr, rc, "XML sync thread");
+                }
+            }
+            else {
+                LOGMSG(klogInfo, "Skipping starting of heart beat thread");
+            }
+        }
+    }
+
+    if ( rc != 0 ) {
+        FUSER_abort ();
+    }
+}
+
+void XML_Fini(void)
+{
+
+
+    g_xml_sync = 0;
+    if( g_xml_thread != NULL ) {
+        ReleaseComplain(KThreadCancel, g_xml_thread);
+        ReleaseComplain(KThreadRelease, g_xml_thread);
+    }
+    ReleaseComplain(KXMLMgrRelease, g_xmlmgr);
+    XMLLock(true);
+    FSNode_Release(g_root);
+    XMLUnlock();
+    ReleaseComplain(KRWLockRelease, g_lock);
+    FREE(g_xml_path);
+
+    RemoteCacheDispose ();
+
+    g_root = NULL;
+    g_lock = NULL;
+    g_start_dir = NULL;
+    g_xml_mtime = 0;
+    g_xml_path = NULL;
+    g_xml_thread = NULL;
+
+    * g_fuse_version = 0;
+    if ( g_heart_beat_url != NULL ) {
+        FREE(g_heart_beat_url);
+    }
+    g_heart_beat_url = NULL;
+    * g_heart_beat_url_complete = 0;
+    g_heart_beat_url_complete_p = NULL;
+}
+
+rc_t XML_MgrGet(const KXMLMgr** xmlmgr)
+{
+    if( xmlmgr == NULL ) {
+        return RC(rcExe, rcDoc, rcAccessing, rcParam, rcNull);
+    }
+    if( g_xmlmgr == NULL ) {
+        return RC(rcExe, rcPath, rcAccessing, rcMgr, rcNull);
+    }
+    *xmlmgr = g_xmlmgr;
+    return 0;
+}
+
+rc_t XML_ParseTimestamp(const KXMLNode* xml_node, const char* attr, KTime_t* timestamp, bool optional)
+{
+    rc_t rc;
+    char ts[128];
+    size_t sz;
+
+    if( (rc = KXMLNodeReadAttrCString(xml_node, attr, ts, sizeof(ts), &sz)) == 0 ) {
+        struct tm tm;
+        memset(&tm, 0, sizeof(tm));
+        if( strptime(ts, "%Y-%m-%dT%H:%M:%S", &tm) != NULL ) {
+            *timestamp = mktime(&tm);
+        } else {
+            rc = RC(rcExe, rcDoc, rcReading, rcAttr, rcInvalid);
+        }
+    } else if( optional && GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound ) {
+        rc = 0;
+    }
+    return rc;
+}
+
+rc_t XML_WriteTimestamp(char* dst, size_t bsize, size_t *num_writ, KTime_t ts)
+{
+    struct tm* tm = localtime(&ts);
+
+    *num_writ = strftime(dst, bsize, "%a %Y-%m-%d %H:%M:%S %Z", tm);
+    if( *num_writ < 1 || *num_writ >= bsize ) {
+        return RC(rcExe, rcDoc, rcWriting, rcBuffer, rcInsufficient);
+    }
+    return 0;
+}
+
+rc_t XML_ParseBool(const KXMLNode* xml_node, const char* attr, bool* val, bool optional)
+{
+    rc_t rc;
+    char b[16];
+    size_t sz;
+
+    if( (rc = KXMLNodeReadAttrCString(xml_node, attr, b, sizeof(b), &sz)) == 0 ) {
+        if( strcasecmp(b, "true") == 0 || strcasecmp(b, "on") == 0 || strcasecmp(b, "yes") == 0 ) {
+            *val = true;
+        } else if( strcasecmp(b, "false") == 0 || strcasecmp(b, "off") == 0 || strcasecmp(b, "no") == 0 ) {
+            *val = false;
+        } else {
+            rc = RC(rcExe, rcDoc, rcReading, rcAttr, rcInvalid);
+        }
+    } else if( optional && GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound ) {
+        rc = 0;
+    }
+    return rc;
+}
diff --git a/tools/fuse/remote-xml.h b/tools/fuse/remote-xml.h
new file mode 100644
index 0000000..5434b9c
--- /dev/null
+++ b/tools/fuse/remote-xml.h
@@ -0,0 +1,59 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_xml_
+#define _h_sra_fuse_xml_
+
+#include <kxml/xml.h>
+#include <kfs/directory.h>
+
+#include "node.h"
+
+typedef uint32_t EXMLValidate;
+enum {
+    eXML_NoCheck = 0,
+    eXML_NoFail,
+    eXML_Full
+};
+
+rc_t XML_Make(KDirectory* dir, const char* const work_dir, const char* xml_path, const char *heart_beat_url, unsigned int sync);
+
+void XML_Init(void);
+
+rc_t XML_FindLock(const char* path, bool recur, const FSNode** node, const char** subpath);
+
+void XML_FindRelease(void);
+
+rc_t XML_MgrGet(const KXMLMgr** xmlmgr);
+
+rc_t XML_ParseTimestamp(const KXMLNode* xml_node, const char* attr, KTime_t* tm, bool optional);
+
+rc_t XML_WriteTimestamp(char* dst, size_t bsize, size_t *num_writ, KTime_t ts);
+
+rc_t XML_ParseBool(const KXMLNode* xml_node, const char* attr, bool* val, bool optional);
+
+void XML_Fini(void);
+
+#endif /* _h_sra_fuse_xml_ */
diff --git a/tools/fuse/sra-directory.c b/tools/fuse/sra-directory.c
new file mode 100644
index 0000000..2d7e53b
--- /dev/null
+++ b/tools/fuse/sra-directory.c
@@ -0,0 +1,107 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <klib/namelist.h>
+#include <kxml/xml.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+#include <sra/sradb-priv.h>
+
+typedef struct SRADirectoryNode SRADirectoryNode;
+#define FSNODE_IMPL SRADirectoryNode
+
+#include "log.h"
+#include "xml.h"
+#include "sra-list.h"
+#include "sra-directory.h"
+
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <time.h>
+
+struct SRADirectoryNode {
+    FSNode node;
+    const SRAListNode* sra;
+};
+
+static
+rc_t SRADirectoryNode_Attr(const SRADirectoryNode* cself, const char* subpath, uint32_t* type, KTime_t* ts, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz)
+{
+    rc_t rc = 0;
+
+    if( subpath != NULL ) {
+        rc = RC(rcExe, rcFile, rcOpening, rcDirEntry, rcNotFound);
+    } else {
+        *type = kptDir;
+        rc = SRAListNode_TableMTime(cself->sra, ts);
+    }
+    return rc;
+}
+
+static
+rc_t SRADirectoryNode_Dir(const SRADirectoryNode* cself, const char* subpath, FSNode_Dir_Visit func, void* data)
+{
+    if( subpath != NULL ) {
+        return RC(rcExe, rcSRA, rcEvaluating, rcDirEntry, rcInvalid);
+    }
+    return FSNode_ListChildren(&cself->node, func, data);
+}
+
+static
+rc_t SRADirectoryNode_Release(SRADirectoryNode* self)
+{
+    if( self != NULL ) {
+        SRAListNode_Release(self->sra);
+    }
+    return 0;
+}
+
+static FSNode_vtbl SRADirectoryNode_vtbl = {
+    sizeof(SRADirectoryNode),
+    NULL,
+    NULL,
+    SRADirectoryNode_Attr,
+    SRADirectoryNode_Dir,
+    NULL,
+    NULL,
+    SRADirectoryNode_Release
+};
+
+rc_t SRADirectoryNode_Make(FSNode** self, const char* name, const SRAListNode* sra)
+{
+    rc_t rc = 0;
+
+    if( self == NULL || sra == NULL ) {
+        rc = RC(rcExe, rcDirectory, rcConstructing, rcParam, rcNull);
+    } else {
+        if( (rc = FSNode_Make(self, name, &SRADirectoryNode_vtbl)) == 0 ) {
+            SRAListNode_AddRef(sra);
+            ((SRADirectoryNode*)*self)->sra = sra;
+        }
+    }
+    return rc;
+}
diff --git a/tools/fuse/sra-directory.h b/tools/fuse/sra-directory.h
new file mode 100644
index 0000000..7a4b7f7
--- /dev/null
+++ b/tools/fuse/sra-directory.h
@@ -0,0 +1,33 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_sra_directory_
+#define _h_sra_fuse_sra_directory_
+
+#include "node.h"
+
+rc_t SRADirectoryNode_Make(FSNode** self, const char* name, const SRAListNode* sra);
+
+#endif /* _h_sra_fuse_sra_directory_ */
diff --git a/tools/fuse/sra-fastq.c b/tools/fuse/sra-fastq.c
new file mode 100644
index 0000000..ebe5ec5
--- /dev/null
+++ b/tools/fuse/sra-fastq.c
@@ -0,0 +1,245 @@
+/*===========================================================================
+ *
+ *                            Public DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ */
+#include <klib/rc.h>
+#include <kfs/file.h>
+#include <kproc/lock.h>
+#include <kdb/table.h>
+#include <kdb/index.h>
+
+#include <sra/sradb-priv.h>
+#include <sra/fastq.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "log.h"
+#include "xml.h"
+#include "sra-list.h"
+#include "sra-fastq.h"
+#include "zlib-simple.h"
+
+typedef struct SRAFastqFile SRAFastqFile;
+#define KFILE_IMPL SRAFastqFile
+#include <kfs/impl.h>
+
+struct SRAFastqFile {
+    KFile dad;
+    uint32_t buffer_sz;
+    uint64_t file_sz;
+    char* gzipped; /* serves as flag and a buffer */
+    KLock* lock;
+    const SRATable* stbl;
+    const KTable* ktbl;
+    const KIndex* kidx;
+    const FastqReader* reader;
+    /* current buf content */
+    uint64_t from;
+    uint64_t size;
+    char* buf;
+};
+
+static
+rc_t SRAFastqFile_Destroy(SRAFastqFile *self)
+{
+    if( KLockAcquire(self->lock) == 0 ) {
+        ReleaseComplain(FastqReaderWhack, self->reader);
+        ReleaseComplain(KIndexRelease, self->kidx);
+        ReleaseComplain(KTableRelease, self->ktbl);
+        ReleaseComplain(SRATableRelease, self->stbl);
+        FREE(self->buf < self->gzipped ? self->buf : self->gzipped);
+        ReleaseComplain(KLockUnlock, self->lock);
+        ReleaseComplain(KLockRelease, self->lock);
+        FREE(self);
+    }
+    return 0;
+}
+
+static
+struct KSysFile* SRAFastqFile_GetSysFile(const SRAFastqFile *self, uint64_t *offset)
+{
+    *offset = 0;
+    return NULL;
+}
+
+static
+rc_t SRAFastqFile_RandomAccess(const SRAFastqFile *self)
+{
+    return 0;
+}
+
+static
+uint32_t SRAFastqFile_Type(const SRAFastqFile *self)
+{
+    return kfdFile;
+}
+
+static
+rc_t SRAFastqFile_Size(const SRAFastqFile *self, uint64_t *size)
+{
+    *size = self->file_sz;
+    return 0;
+}
+
+static
+rc_t SRAFastqFile_SetSize(SRAFastqFile *self, uint64_t size)
+{
+    return RC(rcExe, rcFile, rcUpdating, rcInterface, rcUnsupported);
+}
+
+static
+rc_t SRAFastqFile_Read(const SRAFastqFile* self, uint64_t pos, void *buffer, size_t size, size_t *num_read)
+{
+    rc_t rc = 0;
+
+    if( pos >= self->file_sz ) {
+        *num_read = 0;
+    } else if( (rc = KLockAcquire(self->lock)) == 0 ) {
+        do {
+            if( pos < self->from || pos >= (self->from + self->size) ) {
+                int64_t id = 0;
+                uint64_t id_qty = 0;
+                DEBUG_MSG(10, ("Caching for pos %lu %lu bytes\n", pos, size - *num_read));
+                if( (rc = KIndexFindU64(self->kidx, pos, &((SRAFastqFile*)self)->from, &((SRAFastqFile*)self)->size, &id, &id_qty)) == 0 ) {
+                    DEBUG_MSG(10, ("Caching from %lu:%lu, %lu bytes\n", self->from, self->from + self->size - 1, self->size));
+                    DEBUG_MSG(10, ("Caching spot %ld, %lu spots\n", id, id_qty));
+                    if( (rc = FastqReaderSeekSpot(self->reader, id)) == 0 ) {
+                        size_t inbuf = 0, w = 0;
+                        char* b = self->buf;
+                        uint64_t left = self->buffer_sz;
+                        do {
+                            if( (rc = FastqReader_GetCurrentSpotSplitData(self->reader, b, left, &w)) != 0 ) {
+                                break;
+                            }
+                            b += w; left -= w; inbuf += w; --id_qty;
+                        } while( id_qty > 0 && (rc = FastqReaderNextSpot(self->reader)) == 0);
+                        if( GetRCObject(rc) == rcRow && GetRCState(rc) == rcExhausted ) {
+                            DEBUG_MSG(10, ("No more rows\n"));
+                            rc = 0;
+                        }
+                        DEBUG_MSG(8, ("Cached %u bytes\n", inbuf));
+                        if( self->gzipped != NULL ) {
+                            size_t compressed = 0;
+                            if( (rc = ZLib_DeflateBlock(self->buf, inbuf, self->gzipped, self->buffer_sz, &compressed)) == 0 ) {
+                                char* b = self->buf;
+                                ((SRAFastqFile*)self)->buf = self->gzipped;
+                                ((SRAFastqFile*)self)->gzipped = b;
+                                ((SRAFastqFile*)self)->size = compressed;
+                                DEBUG_MSG(10, ("gzipped %lu bytes\n", self->size));
+                            }
+                        }
+                    }
+                }
+            }
+            if( rc == 0 ) {
+                off_t from = pos - self->from;
+                size_t q = (self->size - from) > (size - *num_read) ? (size - *num_read) : (self->size - from);
+                DEBUG_MSG(10, ("Copying from %lu %u bytes\n", from, q));
+                memcpy(&((char*)buffer)[*num_read], &self->buf[from], q);
+                *num_read = *num_read + q;
+                pos += q;
+            }
+        } while( rc == 0 && *num_read < size && pos < self->file_sz );
+        ReleaseComplain(KLockUnlock, self->lock);
+    }
+    return rc;
+}
+
+static
+rc_t SRAFastqFile_Write(SRAFastqFile *self, uint64_t pos, const void *buffer, size_t size, size_t *num_writ)
+{
+    return RC(rcExe, rcFile, rcWriting, rcInterface, rcUnsupported);
+}
+
+static KFile_vt_v1 SRAFastqFile_vtbl = {
+    1, 1,
+    SRAFastqFile_Destroy,
+    SRAFastqFile_GetSysFile,
+    SRAFastqFile_RandomAccess,
+    SRAFastqFile_Size,
+    SRAFastqFile_SetSize,
+    SRAFastqFile_Read,
+    SRAFastqFile_Write,
+    SRAFastqFile_Type
+};
+
+rc_t SRAFastqFile_Open(const KFile** cself, const SRAListNode* sra, const FileOptions* opt)
+{
+    rc_t rc = 0;
+    SRAFastqFile* self;
+    CALLOC( self, 1, sizeof( *self ) );
+    if( self == NULL )
+    {
+        rc = RC( rcExe, rcFile, rcConstructing, rcMemory, rcExhausted );
+    }
+    else
+    {
+        if ( ( rc = KFileInit( &self->dad, (const KFile_vt*)&SRAFastqFile_vtbl, "SRAFastqFile", "no-name", true, false ) ) == 0 )
+        {
+            if ( ( rc = SRAListNode_TableOpen( sra, &self->stbl ) ) == 0 )
+            {
+                if ( ( rc = SRATableGetKTableRead( self->stbl, &self->ktbl ) ) == 0 )
+                {
+                    if ( ( rc = KTableOpenIndexRead( self->ktbl, &self->kidx, opt->index ) ) == 0 )
+                    {
+                        if ( ( rc = KLockMake( &self->lock ) ) == 0 )
+                        {
+                            MALLOC( self->buf, opt->buffer_sz * ( opt->f.fastq.gzip ? 2 : 1 ) );
+                            if ( self->buf == NULL )
+                            {
+                                rc = RC( rcExe, rcFile, rcOpening, rcMemory, rcExhausted );
+                            }
+                            else
+                            {
+                                self->file_sz = opt->file_sz;
+                                self->buffer_sz = opt->buffer_sz;
+                                if ( opt->f.fastq.gzip )
+                                {
+                                    self->gzipped = &self->buf[ opt->buffer_sz ];
+                                }
+                                self->from = ~0; /* reset position beyond file end */
+                                rc = FastqReaderMake( &self->reader, self->stbl,
+                                                      opt->f.fastq.accession, opt->f.fastq.colorSpace,
+                                                      opt->f.fastq.origFormat, false, opt->f.fastq.printLabel,
+                                                      opt->f.fastq.printReadId, !opt->f.fastq.clipQuality, false,
+                                                      opt->f.fastq.minReadLen, opt->f.fastq.qualityOffset,
+                                                      opt->f.fastq.colorSpaceKey,
+                                                      opt->f.fastq.minSpotId, opt->f.fastq.maxSpotId );
+                            }
+                        }
+                    }
+                }
+            }
+            if ( rc == 0 )
+            {
+                *cself = &self->dad;
+            }
+            else
+            {
+                KFileRelease( &self->dad );
+            }
+        }
+    }
+    return rc;
+}
diff --git a/tools/fuse/sra-fastq.h b/tools/fuse/sra-fastq.h
new file mode 100644
index 0000000..d851575
--- /dev/null
+++ b/tools/fuse/sra-fastq.h
@@ -0,0 +1,34 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_sra_fuse_sra_fastq_
+#define _h_sra_fuse_sra_fastq_
+
+#include "node.h"
+
+rc_t SRAFastqFile_Open(const KFile** cself, const SRAListNode* sra, const FileOptions* opt);
+
+#endif /* _h_sra_fuse_sra_fastq_ */
diff --git a/tools/fuse/sra-fuser-test.c b/tools/fuse/sra-fuser-test.c
new file mode 100644
index 0000000..ef4cc79
--- /dev/null
+++ b/tools/fuse/sra-fuser-test.c
@@ -0,0 +1,100 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <pthread.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+
+#define MAX_THREADS 20
+#define CHUNK_SZ 4200
+
+int fin = 0;
+int fout = 0;
+off_t file_sz;
+off_t step;
+
+typedef struct thread_data_struct {
+    int id;
+} thread_data;
+
+void* thread_func(void *v)
+{
+    char buf[CHUNK_SZ];
+    thread_data* data = v;
+    off_t pos = (data->id - 1) * CHUNK_SZ;
+
+    printf("Thread %i started\n", data->id);
+
+    while( pos < file_sz ) {
+        ssize_t i = pread(fin, buf, CHUNK_SZ, pos);
+        if( i < 0 ) {
+            printf("Thread %i %lu:%lu: %s\n", data->id, pos, pos + CHUNK_SZ - 1, strerror(errno));
+            break;
+        }
+        pwrite(fout, buf, i, pos);
+        pos += step;
+    }
+    printf("Thread %i finished\n", data->id);
+    return v;
+}
+
+
+int main (int argc, char* argv[])
+{
+    pthread_t threads[MAX_THREADS];
+    thread_data threads_data[MAX_THREADS];
+    int i, threads_qty = 0;
+    struct stat stat;
+
+    if( argc < 4 ) {
+        printf("\nUsage:\n\ttest num_threads input_file output_file\n\n");
+        return 1;
+    }
+    threads_qty = atoi(argv[1]);
+    if( threads_qty < 2 || threads_qty > MAX_THREADS ) {
+        printf("num_threads out of range: [2:%i]\n", MAX_THREADS);
+        return 2;
+    }
+    if( (fin = open(argv[2], O_RDONLY, 0)) < 0) {
+        printf("Cannot read file '%s': %s\n", argv[2], strerror(errno));
+        return 3;
+    }
+    if( fstat(fin, &stat) != 0 ) {
+        printf("Cannot stat '%s': %s\n", argv[2], strerror(errno));
+        return 3;
+    }
+    printf("File size: %lu bytes\n", stat.st_size);
+
+    if( stat.st_size / threads_qty / CHUNK_SZ < 10 ) {
+        printf("Need bigger file or less threads to test \n");
+        return 5;
+    }
+    if( (fout = creat(argv[3], 0)) < 0 ) {
+        printf("Cannot write file '%s': %s\n", argv[3], strerror(errno));
+        return 4;
+    }
+    file_sz = stat.st_size;
+    step = threads_qty * CHUNK_SZ;
+
+    for(i = 0; i < threads_qty; i++) {
+        threads_data[i].id = i + 1;
+        if( pthread_create(&threads[i], NULL, thread_func, &threads_data[i]) != 0 ) {
+            printf("Cannot pthread_create %i: %s\n", i + 1, strerror(errno));
+            return 14;
+        }
+    }
+
+    for(i = 0; i < threads_qty; i++) {
+        thread_data* data;
+        if( pthread_join(threads[i], (void**)&data) != 0 ) {
+            printf("Cannot pthread_join %i: %s\n", i + 1, strerror(errno));
+        }
+    }
+
+    close(fin);
+    close(fout);
+    return 0;
+}
diff --git a/tools/fuse/sra-fuser.c b/tools/fuse/sra-fuser.c
new file mode 100644
index 0000000..fca5d0e
--- /dev/null
+++ b/tools/fuse/sra-fuser.c
@@ -0,0 +1,195 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <kapp/args.h>
+#include <klib/out.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "xml.h"
+#include "sra-fuser.h"
+#include "log.h"
+#include "node.h"
+#include "accessor.h"
+#include "sra-list.h"
+
+typedef struct SRequest_struct {
+    const FSNode* node;
+    const char* subpath;
+} SRequest;
+
+static char* g_work_dir = NULL;
+
+static
+rc_t SRequestMake(SRequest* request, const char* path, bool recur)
+{
+    rc_t rc = 0;
+
+    if( request == NULL ) {
+        rc = RC(rcExe, rcFileDesc, rcConstructing, rcParam, rcNull);
+    } else {
+        rc = XML_FindLock(path, recur, &request->node, &request->subpath);
+    }
+    return rc;
+}
+
+static
+void SRequestRelease(SRequest* request)
+{
+    if( request != NULL ) {
+        XML_FindRelease();
+    }
+}
+
+rc_t Initialize(unsigned int sra_sync, const char* xml_path, unsigned int xml_sync,
+                const char* SRA_cache_path, const char* xml_root, EXMLValidate xml_validate)
+{
+    rc_t rc = 0;
+    KDirectory* dir = NULL;
+
+    if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+        char buf[4096];
+        if( (rc = KDirectoryResolvePath(dir, true, buf, 4096, xml_root)) == 0 ) {
+            /* replace /. at the end to  just / */
+            if( strcmp(&buf[strlen(buf) - 2], "/.") == 0 ) {
+                buf[strlen(buf) - 1] = '\0';
+            }
+            /* add / to the end if missing */
+            if( buf[strlen(buf) - 1] != '/' ) {
+                buf[strlen(buf) + 1] = '\0';
+                buf[strlen(buf)] = '/';
+            }
+            if( (rc = StrDup(buf, &g_work_dir)) == 0 ) {
+                DEBUG_MSG(8, ("Current directory set to '%s'\n", g_work_dir));
+            }
+        }
+        if( rc == 0 && (rc = SRAList_Make(dir, sra_sync, SRA_cache_path)) != 0 ) {
+            LOGERR(klogErr, rc, "SRA");
+        } else {
+            rc = XML_Make(dir, g_work_dir, xml_path, xml_sync, xml_validate);
+        }
+        ReleaseComplain(KDirectoryRelease, dir);
+    }
+    return rc;
+}
+
+/* =============================================================================== */
+/* system call handlers */
+/* =============================================================================== */
+
+const char UsageDefaultName[] = "sra-fuser";
+
+rc_t CC UsageSummary (const char* progname)
+{
+    return KOutMsg("Usage:\n"
+        "\t%s [options] -o [FUSE options] -x file -m path\n"
+        "\t%s [options] -u -m path\n\n", progname, progname);
+}
+
+rc_t CC Usage ( const Args * args )
+{
+    /* dummy for newer args system will be filled when system is complete!!! */
+    return 0;
+}
+
+void SRA_FUSER_Init(void)
+{
+    rc_t rc = 0;
+    /* reopen log file and start watch thread(s) */
+    if( (rc = LogFile_Init(NULL, 0, true, NULL)) != 0 ) {
+        LOGERR(klogErr, rc, "log file");
+    }
+    SRAList_Init(); /* this preceeeds XML_Init */
+    XML_Init();     /* or SRAList may become corrupt */
+    LOGMSG(klogInfo, "Started");
+}
+
+void SRA_FUSER_Fini(void)
+{
+    SRAList_Fini();
+    XML_Fini();
+    LOGMSG(klogInfo, "Stopped");
+    LogFile_Fini();
+    FREE(g_work_dir);
+}
+
+rc_t SRA_FUSER_GetDir(const char* path, FSNode_Dir_Visit func, void* data)
+{
+    rc_t rc = 0;
+    SRequest request;
+
+    if( (rc = SRequestMake(&request, path, true)) == 0 ) {
+        rc = FSNode_Dir(request.node, request.subpath, func, data);
+        SRequestRelease(&request);
+    }
+    return rc;
+}
+
+rc_t SRA_FUSER_GetAttr(const char* path, uint32_t* type, KTime_t* ts, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz)
+{
+    rc_t rc = 0;
+    SRequest request;
+
+    if( (rc = SRequestMake(&request, path, false)) == 0 ) {
+        rc = FSNode_Attr(request.node, request.subpath, type, ts, file_sz, access, block_sz);
+        SRequestRelease(&request);
+    }
+    return rc;
+}
+
+rc_t SRA_FUSER_ResolveLink(const char* path, char* buf, size_t buf_sz)
+{
+    rc_t rc = 0;
+    SRequest request;
+
+    if( (rc = SRequestMake(&request, path, false)) == 0 ) {
+        rc = FSNode_Link(request.node, request.subpath, buf, buf_sz);
+        SRequestRelease(&request);
+    }
+    return rc;
+}
+
+rc_t SRA_FUSER_OpenNode(const char* path, const void** data)
+{
+    rc_t rc = 0;
+    SRequest request;
+
+    if( (rc = SRequestMake(&request, path, false)) == 0 ) {
+        rc = FSNode_Open(request.node, request.subpath, (const SAccessor**)data);
+        SRequestRelease(&request);
+    }
+    return rc;
+}
+
+rc_t SRA_FUSER_ReadNode(const char* path, const void* data, char *buf, size_t size, off_t offset, size_t* num_read)
+{
+    return SAccessor_Read(data, buf, size, offset, num_read);
+}
+
+rc_t SRA_FUSER_CloseNode(const char* path, const void* data)
+{
+    return SAccessor_Release(data);
+}
diff --git a/tools/fuse/sra-fuser.h b/tools/fuse/sra-fuser.h
new file mode 100644
index 0000000..7999745
--- /dev/null
+++ b/tools/fuse/sra-fuser.h
@@ -0,0 +1,48 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_fuser_
+#define _h_sra_fuse_fuser_
+
+#include "node.h"
+
+uint32_t KAppVersion(void);
+
+rc_t Initialize(unsigned int sra_sync, const char* xml_path, unsigned int xml_sync,
+                const char* SRA_cache_path, const char* xml_root, EXMLValidate xml_validate);
+
+/* FUSE call backs */
+void SRA_FUSER_Init(void);
+void SRA_FUSER_Fini(void);
+
+rc_t SRA_FUSER_GetAttr(const char* path, uint32_t* type, KTime_t* date, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz);
+rc_t SRA_FUSER_GetDir(const char* path, FSNode_Dir_Visit func, void* data);
+rc_t SRA_FUSER_ResolveLink(const char* path, char* buf, size_t buf_sz);
+
+rc_t SRA_FUSER_OpenNode(const char* path, const void** data);
+rc_t SRA_FUSER_ReadNode(const char* path, const void* data, char *buf, size_t size, off_t offset, size_t* num_read);
+rc_t SRA_FUSER_CloseNode(const char* path, const void* data);
+
+#endif /* _h_sra_fuse_fuser_ */
diff --git a/tools/fuse/sra-fuser.xsd b/tools/fuse/sra-fuser.xsd
new file mode 100644
index 0000000..1935e51
--- /dev/null
+++ b/tools/fuse/sra-fuser.xsd
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+  <xs:element name="TAR">
+    <xs:annotation>
+      <xs:documentation>This could be used to create an automatic tar archive within directory specified by a physical Directory node in main fuse.xml file.</xs:documentation>
+    </xs:annotation>
+  </xs:element>
+        
+  <xs:element name="FUSE">
+    <xs:annotation>
+      <xs:documentation>Main sra-fuser virtual directory structure root.</xs:documentation>
+    </xs:annotation>
+    <xs:complexType>
+      <xs:complexContent>
+        <xs:extension base="AllEntries">
+          <xs:sequence>
+            <xs:element name="TAR" type="TARType" minOccurs="0" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:extension>
+      </xs:complexContent>
+    </xs:complexType>
+  </xs:element>
+  
+  <xs:complexType name="AllEntries">
+    <xs:sequence minOccurs="0" maxOccurs="unbounded">
+      <xs:element name="Directory" minOccurs="0" maxOccurs="unbounded">
+        <xs:complexType>
+          <xs:complexContent>
+            <xs:extension base="DirectoryType"/>
+          </xs:complexContent>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="File" minOccurs="0" maxOccurs="unbounded">
+        <xs:complexType>
+          <xs:complexContent>
+            <xs:extension base="FileType"/>
+          </xs:complexContent>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="SRA" minOccurs="0" maxOccurs="unbounded">
+        <xs:complexType>
+          <xs:complexContent>
+            <xs:extension base="SRAType"/>
+          </xs:complexContent>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="SRAConfig" minOccurs="0" maxOccurs="1">
+        <xs:complexType>
+          <xs:complexContent>
+            <xs:extension base="SRAConfigType"/>
+          </xs:complexContent>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="DirectoryType">
+    <xs:annotation>
+      <xs:documentation>If Directory has path attribute it will detect presence of *.tar.xml files 
+                        with root node TAR (see above) and automatically create .tar file out of detect file's content.</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="AllEntries">
+        <xs:sequence>
+          <xs:element name="TAR" type="TARType" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute ref="name" use="optional" >
+          <xs:annotation>
+            <xs:documentation>Must have name OR path, or both</xs:documentation>
+          </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="path" type="xs:anyURI" use="optional">
+          <xs:annotation>
+            <xs:documentation>absolute or relative path to a physical directory</xs:documentation>
+          </xs:annotation>
+        </xs:attribute>
+        <xs:attribute ref="timestamp" use="optional"/>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  
+  <xs:complexType name="FileType">
+    <xs:attribute ref="name" use="optional" >
+      <xs:annotation>
+        <xs:documentation>May be used to override original file name in path</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="path" type="xs:anyURI" use="required">
+      <xs:annotation>
+        <xs:documentation>absolute or relative path to a file</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute ref="timestamp" use="optional" />
+    <xs:attribute name="password" type="xs:string" use="optional" />
+  </xs:complexType>
+
+  <xs:complexType name="SRAType">
+    <xs:attribute name="accession" use="required" type="xs:NCName" >
+      <xs:annotation>
+        <xs:documentation>SRA accession used to open the run</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="path" type="xs:anyURI" use="optional">
+      <xs:annotation>
+        <xs:documentation>path is used for direct opening of the tables, for automatic search do not specify</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <!-- next 5 attributes must always come together if present -->
+    <xs:attribute ref="timestamp" use="optional">
+      <xs:annotation>
+        <xs:documentation>time stamp of the size/md5 attribute values</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="size.sra" type ="xs:nonNegativeInteger" use="optional">
+      <xs:annotation>
+        <xs:documentation>file size in bytes</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="md5.sra" type ="xs:hexBinary" use="optional">
+      <xs:annotation>
+        <xs:documentation>MD5 sum of the file</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="size.lite.sra" type ="xs:nonNegativeInteger" use="optional">
+      <xs:annotation>
+        <xs:documentation>file size in bytes</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="md5.lite.sra" type ="xs:hexBinary" use="optional">
+      <xs:annotation>
+        <xs:documentation>MD5 sum of the file</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+  
+  <xs:complexType name="SRAConfigType">
+    <xs:complexContent>
+      <xs:extension base="AllEntries">
+        <xs:annotation>
+          <xs:documentation>Initially all attributes are TRUE, as first config node is encountered only attributes set to TRUE in THAT node are active all others become FALSE</xs:documentation>
+        </xs:annotation>
+        <xs:attribute name="run-directory" type="xs:boolean" use="optional" default="false" >
+          <xs:annotation>
+            <xs:documentation>Create run directory for the SRA node</xs:documentation>
+          </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="SRA-archive" type="xs:boolean" use="optional" default="false" />
+        <xs:attribute name="SRA-archive-lite" type="xs:boolean" use="optional" default="false" />
+        <xs:attribute name="fastq" type="xs:boolean" use="optional" default="false" /> 
+        <xs:attribute name="SFF" type="xs:boolean" use="optional" default="false" />
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  
+  <xs:complexType name="TARType">
+    <xs:complexContent>
+      <xs:extension base="TARItemList">
+        <xs:attribute ref="name" use="required">
+          <xs:annotation>
+            <xs:documentation>Ignored in dynamically loaded .tar.xml files, .tar.xml file name is used, ex: data5.tar.xml -> data5.tar</xs:documentation>
+          </xs:annotation>
+        </xs:attribute>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  
+  <xs:complexType name="TARItem">
+    <xs:attribute name="name" type="xs:anyURI" use="optional" >
+      <xs:annotation>
+        <xs:documentation>Cannot start with '/'. If omitted, portion of path after last '/' is used</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="path" type="xs:anyURI" use="required">
+      <xs:annotation>
+        <xs:documentation>Absolute or relative path to a file. In case of automatic tar relative
+                          paths will be resolved to from directory where .tar.xml is located.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute ref="timestamp" use="optional"/>
+    <xs:attribute name="size" use="required" type="xs:nonNegativeInteger">
+      <xs:annotation>
+        <xs:documentation>Actual file size is required to pre-calc resulting file .tar size</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="executable" type="xs:boolean" use="optional" default="false">
+        <xs:annotation>
+            <xs:documentation>Indicate if files has executable type</xs:documentation>
+        </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+  
+  <xs:complexType name="TARItemList">
+      <xs:sequence>
+        <xs:element name="Item" type="TARItem" minOccurs="1" maxOccurs="unbounded" />
+      </xs:sequence>
+  </xs:complexType>
+  
+  <xs:attribute name="name" type="xs:NCName"/>
+  
+  <xs:attribute name="timestamp" type="xs:dateTime">
+    <xs:annotation>
+      <xs:documentation>Sets timestamp on a node formatted: YYYY-MM-DDTHH:MM:SS</xs:documentation>
+    </xs:annotation>
+  </xs:attribute>
+  
+</xs:schema>
diff --git a/tools/fuse/sra-list.c b/tools/fuse/sra-list.c
new file mode 100644
index 0000000..27c791f
--- /dev/null
+++ b/tools/fuse/sra-list.c
@@ -0,0 +1,1225 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <klib/namelist.h>
+#include <klib/container.h>
+#include <klib/printf.h>
+#include <klib/refcount.h>
+#include <kxml/xml.h>
+#include <kdb/namelist.h>
+#include <kproc/thread.h>
+#include <kproc/lock.h>
+#include <kproc/cond.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <errno.h>
+#include <pthread.h>
+#include <time.h>
+
+#include <sra/sradb-priv.h>
+#include <sra/impl.h>
+
+#include "log.h"
+#include "xml.h"
+#include "sra-list.h"
+#include "sra-directory.h"
+#include "sra-node.h"
+#include "formats.h"
+
+#include <stdlib.h>
+#include <strtol.h>
+#include <string.h>
+#include <assert.h>
+#include <time.h>
+
+static KRWLock* g_lock = NULL;
+static BSTree g_list;
+static uint64_t g_version = 0;
+static const SRAMgr* g_sra_mgr = NULL;
+/* hack to prevent opentable collapse */
+static KLock* g_sra_mgr_lock = NULL;
+/* SRA tables states cache file for quick restart */
+static char* g_cache_file = NULL;
+/* tmp name for cache file */
+static char* g_cache_file_tmp = NULL;
+static const uint32_t g_cache_version = 4;
+
+static unsigned int g_sync = 0;
+static KThread* g_thread = NULL;
+/*async update queue and thread */
+static SLList g_queue;
+static volatile uint64_t g_queue_depth;
+static KCondition* g_queue_cond;
+static KThread* g_queue_thread = NULL;
+static KLock* g_queue_lock = NULL;
+static pthread_mutex_t g_refresh_mutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_cond_t g_refresh_cond = PTHREAD_COND_INITIALIZER;
+
+struct SRAListNode {
+    BSTNode dad;
+    atomic32_t refcount;
+    char* accession;
+    char* path;
+    FileOptions* files;
+    uint32_t files_count;
+    KTime_t mtime; /* table mtime */
+    KTime_t utime; /* node update time */
+    uint32_t version; /* source xml version */
+};
+
+typedef struct SRAQueueNode_struct {
+    SLNode dad;
+    SRAListNode* node;
+    KTime_t mtime; /* original node update time */
+} SRAQueueNode;
+
+void CC SRAQueue_Whack( SLNode *n, void *data )
+{
+    if( n != NULL ) {
+        FREE(n);
+    }
+}
+
+static
+rc_t SRAList_Queue_Lock(void)
+{
+    DEBUG_LINE(8, "Lock SRA %s", "queue");
+    return KLockAcquire(g_queue_lock);
+}
+
+static
+void SRAList_Queue_Unlock(void)
+{
+    DEBUG_LINE(8, "Unlock SRA %s", "queue");
+    ReleaseComplain(KLockUnlock, g_queue_lock);
+}
+
+static
+rc_t SRAList_Lock(bool exclusive)
+{
+    DEBUG_LINE(8, "Lock SRA list %s", exclusive ? "write" : "read");
+    return exclusive ? KRWLockAcquireExcl(g_lock) : KRWLockAcquireShared(g_lock);
+}
+
+static
+void SRAList_Unlock(void)
+{
+    DEBUG_LINE(8, "Unlocked SRA list", "");
+    ReleaseComplain(KRWLockUnlock, g_lock);
+}
+
+static
+rc_t SRAList_Mgr(const SRAMgr** mgr)
+{
+    rc_t rc = 0;
+    if( g_sra_mgr_lock == NULL && (rc = KLockMake(&g_sra_mgr_lock)) != 0 ) {
+        g_sra_mgr_lock = NULL;
+        LOGERR(klogErr, rc, "SRA manager lock");
+    } else if( g_sra_mgr == NULL ) {
+        PLOGMSG(klogInfo, (klogInfo, "VDB_CONFIG=$(var)", PLOG_S(var), getenv("VDB_CONFIG")));
+        if( (rc = SRAMgrMakeRead(&g_sra_mgr)) != 0 ) {
+            g_sra_mgr = NULL;
+            LOGERR(klogErr, rc, "SRA manager");
+        } else {
+            DEBUG_LINE(8, "SRA manager created 0x%p", g_sra_mgr);
+        }
+    }
+    if( rc == 0 ) {
+        *mgr = g_sra_mgr;
+    }
+    return rc;
+}
+
+rc_t SRAListNode_TableMTime(const SRAListNode* cself, KTime_t* mtime)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || mtime == NULL ) {
+        rc = RC(rcExe, rcTable, rcResolving, rcParam, rcNull);
+    } else {
+        const SRAMgr* mgr;
+        DEBUG_LINE(10, "%s path '%s'", cself->accession, cself->path);
+        if( (rc = SRAList_Mgr(&mgr)) == 0 ) {
+            rc = SRAMgrGetTableModDate(mgr, mtime, "%s", cself->path ? cself->path : cself->accession);
+        }
+    }
+    return rc;
+}
+
+rc_t SRAListNode_TableOpen(const SRAListNode* cself, const SRATable** tbl)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || tbl == NULL ) {
+        rc = RC(rcExe, rcTable, rcOpening, rcParam, rcNull);
+    } else {
+        const SRAMgr* mgr;
+        DEBUG_LINE(10, "%s path '%s'", cself->accession, cself->path);
+        if( (rc = SRAList_Mgr(&mgr)) == 0 && (rc = KLockAcquire(g_sra_mgr_lock)) == 0 ) {
+            KLogLevel lvl = KLogLevelGet();
+            KLogLevelSet(klogInfo - 1);
+            rc = SRAMgrOpenTableRead(mgr, tbl, "%s", cself->path ? cself->path : cself->accession);
+            KLogLevelSet(lvl);
+            ReleaseComplain(KLockUnlock, g_sra_mgr_lock);
+        }
+    }
+    return rc;
+}
+
+static
+rc_t SRAListNode_KConfigReload(void)
+{
+    rc_t rc = 0;
+
+    if( BSTreeFirst(&g_list) != NULL ) {
+        const SRAMgr* mgr;
+        if( (rc = SRAList_Mgr(&mgr)) == 0 && (rc = KLockAcquire(g_sra_mgr_lock)) == 0 ) {
+            DEBUG_LINE(10, "VDB_CONFIG=%s", getenv("VDB_CONFIG"));
+            rc = SRAMgrConfigReload(mgr, NULL);
+            ReleaseComplain(KLockUnlock, g_sra_mgr_lock);
+            if( rc != 0 ) {
+                PLOGERR(klogErr, (klogErr, rc, "SRA config reload with VDB_CONFIG=$(var)", PLOG_S(var), getenv("VDB_CONFIG")));
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t SRAListNode_AddRef(const SRAListNode* cself)
+{
+    if( cself == NULL ) {
+        return RC(rcExe, rcTable, rcAttaching, rcSelf, rcNull);
+    }
+    atomic32_add(&((SRAListNode*)cself)->refcount, 1);
+    return 0;
+}
+
+void SRAListNode_Release(const SRAListNode* cself)
+{
+    SRAListNode* self = (SRAListNode*)cself;
+    if( self != NULL && atomic32_dec_and_test(&self->refcount) ) {
+        DEBUG_LINE(10, "%s: %s", self->accession, self->path);
+        FREE(self->accession);
+        FREE(self->path);
+        FREE(self->files);
+        FREE(self);
+    }
+}
+
+static
+void SRAList_Whack(BSTNode* node, void* data)
+{
+    SRAListNode_Release((SRAListNode*)node);
+}
+
+static
+void SRAListNode_Version(BSTNode* node, void* data)
+{
+    SRAListNode* n = (SRAListNode*)node;
+    uint32_t* qty = (uint32_t*)data;
+
+    if( n->version < g_version ) {
+        BSTreeUnlink(&g_list, node);
+        SRAListNode_Release(n);
+        *qty = *qty + 1;
+    }
+}
+
+rc_t SRAList_NextVersion(void)
+{
+    rc_t rc = 0;
+    uint32_t qty = 0;
+
+    DEBUG_LINE(8, "SRA setting version to %u", g_version + 1);
+    if( (rc = SRAList_Lock(true)) == 0 ) {
+        g_version++;
+        BSTreeForEach(&g_list, false, SRAListNode_Version, &qty);
+        SRAList_Unlock();
+        DEBUG_LINE(8, "SRA version set to %u, %u runs dropped", g_version, qty);
+    }
+    return rc;
+}
+
+typedef struct SRAListNode_FindData_struct {
+    char* accession;
+    char* path;
+    KTime_t timestamp;
+    struct {
+        int type;
+        const char* ext;
+        uint64_t size;
+        char md5[32 + 1];
+    } attr[2];
+} SRAListNode_FindData;
+
+static
+int64_t SRAListNode_Cmp(const SRAListNode_FindData* l, const SRAListNode* r)
+{
+    int d = strcmp(l->accession, r->accession);
+    if( d == 0 && l->path != r->path ) {
+        if( l->path == NULL && r->path != NULL ) {
+            d = -1024;
+        } else if( l->path != NULL && r->path == NULL ) {
+            d = 1024;
+        } else {
+            d = strcmp(l->path, r->path);
+        }
+    }
+    return d;
+}
+
+static
+int64_t SRAListNode_Find(const void* item, const BSTNode* node)
+{
+    return SRAListNode_Cmp((SRAListNode_FindData*)item, (SRAListNode*)node);
+}
+
+static
+int64_t SRAListNode_Sort(const BSTNode *item, const BSTNode *node)
+{
+    SRAListNode* i = (SRAListNode*)item;
+    SRAListNode_FindData data;
+
+    data.accession = i->accession;
+    data.path = i->path;
+
+    return SRAListNode_Cmp(&data, (SRAListNode*)node);
+}
+
+static
+rc_t SRAListNode_Insert(SRAListNode_FindData* data, uint64_t version, SRAListNode** found)
+{
+    rc_t rc = 0;
+
+    *found = NULL; 
+    if( (rc = SRAList_Lock(true)) == 0 ) {
+        *found = (SRAListNode*)BSTreeFind(&g_list, data, SRAListNode_Find);
+        if( *found != NULL ) {
+            DEBUG_LINE(8, "found SRA list node %u. %s, %s", (*found)->version, data->accession, data->path);
+            atomic32_add(&(*found)->refcount, 1); /* for here */
+            if( version > (*found)->version ) {
+                (*found)->version = version;
+            }
+        } else {
+            CALLOC(*found, 1, sizeof(**found));
+            if( *found == NULL ) {
+                rc = RC(rcExe, rcTable, rcInserting, rcMemory, rcExhausted);
+            } else {
+                KRefcountInit(&((*found)->refcount), 1, "SRAListNode", "Make", "");
+                (*found)->accession = data->accession;
+                (*found)->path = data->path;
+                atomic32_set(&(*found)->refcount, 2); /* one for the list and 1 for here */
+                (*found)->version = version;
+                DEBUG_LINE(8, "SRA list new node %u. %s, %s", (*found)->version, (*found)->accession, (*found)->path);
+                BSTreeInsert(&g_list, &(*found)->dad, SRAListNode_Sort);
+                data->accession = NULL;
+                data->path = NULL;
+            }
+        }
+        if( rc == 0 && data->timestamp != 0 && (*found)->mtime != data->timestamp ) {
+            if( (*found)->files_count > 0 ) {
+                uint32_t i, j;
+                for(j = 0; rc == 0 && j < (*found)->files_count; j++) {
+                    for(i = 0; rc == 0 && i < sizeof(data->attr) / sizeof(data->attr[0]); i++) {
+                        if( (*found)->files[j].type == data->attr[i].type ) {
+                            if( (rc = FileOptions_SRAArchiveUpdate(&(*found)->files[j], (*found)->accession,
+                                data->timestamp, data->attr[i].size, data->attr[i].md5)) == 0 ) {
+                                    DEBUG_LINE(10, "updated %s %lu %s", (*found)->accession,
+                                        data->attr[i].size, data->attr[i].md5);
+                            }
+                        }
+                    }
+                }
+            } else {
+                uint32_t i;
+                const SRAMgr* mgr;
+
+                (*found)->files_count = sizeof(data->attr) / sizeof(data->attr[0]) * 2;
+                if( (rc = FileOptions_Make(&(*found)->files, (*found)->files_count)) == 0 &&
+                    (rc = SRAList_Mgr(&mgr)) == 0 ) {
+                    for(i = 0; rc == 0 && i < sizeof(data->attr) / sizeof(data->attr[0]); i++) {
+                        if( (rc = FileOptions_SRAArchiveInstant(&(*found)->files[i * 2], &(*found)->files[i * 2 + 1],
+                           mgr, (*found)->accession, (*found)->path,
+                           data->attr[i].type == eSRAFuseFmtArcLite, data->timestamp, data->attr[i].size, data->attr[i].md5)) == 0 ) {
+                            DEBUG_LINE(10, "added %s %lu %s", (*found)->accession, data->attr[i].size, data->attr[i].md5);
+                        }
+                    }
+                }
+            }
+            if( rc == 0 ) {
+                (*found)->mtime = data->timestamp;
+                DEBUG_LINE(10, "set %s timestamp %lu", (*found)->accession, (*found)->mtime);
+            } else if( data->accession == NULL ) {
+                FREE(*found);
+            }
+        }
+        SRAList_Unlock();
+    }
+    return rc;
+}
+
+static
+rc_t SRAListNode_MakeXML(const KXMLNode* xml_node, SRAListNode_FindData* data, char* errmsg, const char* rel_path, EXMLValidate validate)
+{
+    rc_t rc = 0;
+
+    if( xml_node == NULL || data == NULL ) {
+        rc = RC(rcExe, rcTable, rcConstructing, rcParam, rcNull);
+    } else {
+        uint32_t i, has_attrs = 0;
+        if( (rc = KXMLNodeReadAttrCStr(xml_node, "accession", &data->accession, NULL)) != 0 || data->accession[0] == '\0') {
+            strcpy(errmsg, "attribute 'accession'");
+            rc = rc ? rc : RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+        }
+        if( rc == 0 ) {
+            data->timestamp = 0;
+            if( (rc = XML_ParseTimestamp(xml_node, "timestamp", &data->timestamp, true)) != 0 ) {
+                strcpy(errmsg, "attribute 'timestamp'");
+            } else if( data->timestamp != 0 ) {
+                has_attrs++;
+            }
+        }
+        for(i = 0; rc == 0 && i < sizeof(data->attr) / sizeof(data->attr[0]); i++) {
+            size_t num_read;
+            char b[128];
+
+            if( (rc = string_printf(b, sizeof(b) - 1, NULL, "md5%s", data->attr[i].ext)) == 0 ) {
+                if( (rc = KXMLNodeReadAttrCString(xml_node, b, data->attr[i].md5, sizeof(data->attr[i].md5), &num_read)) == 0 ) {
+                    has_attrs++;
+                    if( num_read != sizeof(data->attr[i].md5) - 1) {
+                        rc = RC(rcExe, rcDoc, rcValidating, rcChecksum, rcInvalid);
+                    }
+                } else if( GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound ) {
+                    rc = 0;
+                }
+            }
+            if( rc != 0 ) {
+                strcpy(errmsg, "attribute 'md5");
+                strcat(errmsg, data->attr[i].ext);
+                strcat(errmsg, "'");
+            } else {
+                if( (rc = string_printf(b, sizeof(b) - 1, NULL, "size%s", data->attr[i].ext)) == 0 ) {
+                    if( (rc = KXMLNodeReadAttrCString(xml_node, b, b, sizeof(b), &num_read)) == 0 ) {
+                        char* end;
+                        has_attrs++;
+                        data->attr[i].size = strtou64(b, &end, 10);
+                        if( end - b != num_read ) {
+                            rc = RC(rcExe, rcDoc, rcValidating, rcSize, rcInvalid);
+                        }
+                    } else if( GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound ) {
+                        rc = 0;
+                    }
+                }
+                if( rc != 0 ) {
+                    strcpy(errmsg, "attribute 'size");
+                    strcat(errmsg, data->attr[i].ext);
+                    strcat(errmsg, "'");
+                }
+            }
+        }
+        if( rc == 0 && has_attrs != 0 && has_attrs != 3 && has_attrs != 5 ) {
+            if( validate > eXML_NoFail ) {
+                rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+            } else {
+                data->timestamp = 0;
+                PLOGMSG(klogErr, (klogErr, "SRA node $(a) attributes incomplete", "a=%s", data->accession));
+            }
+        }
+        if( rc == 0 ) {
+            if( (rc = KXMLNodeReadAttrCStr(xml_node, "path", &data->path, "")) == 0 ) {
+                if( data->path[0] == '\0' ) {
+                    free(data->path);
+                    data->path = NULL;
+                } else {
+                    KDirectory* dir = NULL;
+                    if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+                        char resolved[4096];
+                        size_t num_writ;
+                        if( data->path[0] == '/' ) {
+                            rc = string_printf(resolved, sizeof(resolved), &num_writ, "%s", data->path);
+                        } else if( (rc = KDirectoryResolvePath(dir, true, resolved, sizeof(resolved),
+                                                                      "%s%s", rel_path, data->path)) == 0 ) {
+                            DEBUG_LINE(8, "%s%s resolved to %s", rel_path, data->path, resolved);
+                        }
+                        if( rc == 0 && validate > eXML_NoCheck ) {
+                            uint32_t typ = KDirectoryPathType(dir, resolved);
+                            if( typ != kptDir && typ != (kptDir | kptAlias) &&
+                                typ != kptFile && typ != (kptFile | kptAlias)) {
+                                if( validate > eXML_NoFail ) {
+                                    rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, typ == kptNotFound ? rcNotFound : rcInvalid);
+                                } else {
+                                    PLOGMSG(klogErr, (klogErr, "SRA path '$(p)' not found", "p=%s", resolved));
+                                }
+                            }
+                        }
+                        if( rc == 0 ) {
+                            free(data->path);
+                            rc = StrDup(resolved, &data->path);
+                        }
+                        ReleaseComplain(KDirectoryRelease, dir);
+                    }
+                }
+            }
+        }
+        if( rc == 0 ) {
+            struct KNamelist const* attr = NULL;
+            if( (rc = KXMLNodeListAttr(xml_node, &attr)) == 0 ) {
+                uint32_t i = 0, count = 0;
+                if( (rc = KNamelistCount(attr, &count)) == 0 && count > 0 ) {
+                    while( rc == 0 && i < count ) {
+                        const char *attr_nm = NULL;
+                        if( (rc = KNamelistGet(attr, i++, &attr_nm)) != 0 ) {
+                            break;
+                        }
+                        if( strcmp("path", attr_nm) == 0 || strcmp("accession", attr_nm) == 0 ||
+                            strcmp("timestamp", attr_nm) == 0 ||
+                            strncmp("md5.", attr_nm, 4) == 0 || strncmp("size.", attr_nm, 5) == 0 ) {
+                            continue;
+                        }
+                        rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+                        strcpy(errmsg, "unknown attribute '");
+                        strcat(errmsg, attr_nm);
+                        strcat(errmsg, "'");
+                    }
+                }
+                ReleaseComplain(KNamelistRelease, attr);
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t SRAListNode_Make(const KXMLNode* xml_node, FSNode* parent, SRAConfigFlags flags, char* errmsg,
+                      const char* rel_path, EXMLValidate validate)
+{
+    rc_t rc = 0;
+
+    if( xml_node == NULL || parent == NULL || errmsg == NULL || rel_path == NULL ) {
+        rc = RC(rcExe, rcTable, rcUpdating, rcParam, rcNull);
+    } else {
+        SRAListNode_FindData data;
+        memset(&data, 0, sizeof(data));
+        data.attr[0].ext = ".sra";
+        data.attr[0].type = eSRAFuseFmtArc;
+        data.attr[1].ext = ".lite.sra";
+        data.attr[1].type = eSRAFuseFmtArcLite;
+        if( (rc = SRAListNode_MakeXML(xml_node, &data, errmsg, rel_path, validate)) == 0 ) {
+            SRAListNode* found;
+            if( (rc = SRAListNode_Insert(&data, g_version + 1, &found)) == 0 ) {
+                FSNode* d = parent;
+                if( flags & eSRAFuseRunDir ) {
+                    if( (rc = SRADirectoryNode_Make(&d, found->accession, found)) == 0 ) {
+                        if( (rc = FSNode_AddChild(parent, d)) != 0 ) {
+                            FSNode_Release(d);
+                        }
+                    }
+                }
+                if( rc == 0 ) {
+                    rc = SRANode_Make(d, found->accession, found, flags);
+                }
+            }
+            SRAListNode_Release(found);
+        }
+        free(data.accession);
+        free(data.path);
+    }
+    return rc;
+}
+
+static
+rc_t SRAListNode_Update(SRAListNode* self, KTime_t now)
+{
+    rc_t rc = 0;
+    KTime_t ts = 0;
+    /* weekly forced update */
+    bool forced = now != 0 && (now - self->utime) > (60*24*60*60) && self->utime != 0 /* not new */;
+
+    if( (self->mtime == 0 || now != 0) && (rc = SRAListNode_TableMTime(self, &ts)) == 0 ) {
+        if( self->mtime != ts || forced ) {
+            const SRATable* tbl = NULL;
+            FileOptions* new_files = NULL, *old_files = NULL;
+            uint32_t new_files_count = 0;
+            PLOGMSG(klogInfo, (klogInfo, "Updating sra node, self->mtime = $(mtime), self->utime = $(utime), ts = $(ts), now = $(now), forced = $(forced)",
+                        PLOG_5(PLOG_I64(mtime), PLOG_I64(utime), PLOG_I64(ts), PLOG_I32(forced), PLOG_I64(now)),
+                        (long long)self->mtime,
+                        (long long)self->utime,
+                        (long long)ts,
+                        (int)forced,
+                        (long long)now)
+                    );
+            if( (rc = SRAListNode_TableOpen(self, &tbl)) == 0 ) {
+                const KMDataNode* meta = NULL;
+                if( SRATableOpenMDataNodeRead(tbl, &meta, "/FUSE/root/File") != 0 ) {
+                    rc = SRATableOpenMDataNodeRead(tbl, &meta, "/FUSE");
+                }
+                if( rc == 0 ) {
+                    struct KNamelist* files = NULL;
+                    DEBUG_LINE(10, "Opened SRA table meta %s '%s'", self->accession, self->path);
+                    if( (rc = KMDataNodeListChild(meta, &files)) == 0 ) {
+                        uint32_t files_count = 0;
+                        if( (rc = KNamelistCount(files, &files_count)) == 0 && files_count > 0 ) {
+                            new_files_count = (2 + files_count) * 2; /* (2 are for .sra types + count in meta) + md5 for each in list */
+                            if( (rc = FileOptions_Make(&new_files, new_files_count)) == 0 ) {
+                                uint32_t f = 0;
+                                new_files_count = 4; /* step down for 2 .sra + md5 for them */
+                                while( rc == 0 && f < files_count ) {
+                                    const char *suffix = NULL;
+                                    if( (rc = KNamelistGet(files, f, &suffix)) == 0 ) {
+                                        const KMDataNode* fn = NULL;
+                                        if( (rc = KMDataNodeOpenNodeRead(meta, &fn, suffix)) == 0 ) {
+                                            DEBUG_LINE(10, "Adding %s file type '%s'", self->accession, suffix);
+                                            if( (rc = FileOptions_ParseMeta(&new_files[new_files_count], fn, tbl, ts, suffix)) != 0 ) {
+                                                PLOGERR(klogErr, (klogErr, rc, " node '$(f)'", PLOG_S(f), suffix));
+                                                rc = 0;
+                                            } else {
+                                                if( new_files[new_files_count].md5[0] != '\0' ) {
+                                                    if( (rc = FileOptions_AttachMD5(&new_files[new_files_count],
+                                                                self->accession, &new_files[new_files_count + 1])) != 0 ||
+                                                        (rc = FileOptions_UpdateMD5(&new_files[new_files_count], self->accession)) != 0) {
+                                                        PLOGERR(klogErr, (klogErr, rc, " node md5 '$(f)'", PLOG_S(f), suffix));
+                                                        rc = 0;
+                                                    } else {
+                                                        new_files_count++;
+                                                    }
+                                                }
+                                                new_files_count++;
+                                            }
+                                        }
+                                        f++;
+                                        ReleaseComplain(KMDataNodeRelease, fn);
+                                    }
+                                }
+                            }
+                        }
+                        ReleaseComplain(KNamelistRelease, files);
+                    }
+                    ReleaseComplain(KMDataNodeRelease, meta);
+                } else {
+                    PLOGMSG(klogWarn, (klogWarn, "FUSE meta block not found in '$(t)'", PLOG_S(t), self->accession));
+                    rc = 0;
+                }
+                if( rc == 0 ) {
+                    if( new_files_count == 0 ) {
+                        /* for 2 .sra types + its .md5's */
+                        new_files_count = 4;
+                        rc = FileOptions_Make(&new_files, new_files_count);
+                    }
+                    if( rc == 0 ) {
+                        /* add information for sra archives */
+                        DEBUG_LINE(10, "Adding SRA archive type %s and its .md5", self->accession);
+                        if( (rc = FileOptions_SRAArchive(&new_files[0], tbl, ts, false)) == 0 &&
+                            (rc = FileOptions_AttachMD5(&new_files[0], self->accession, &new_files[1])) == 0 ) {
+                            DEBUG_LINE(10, "Adding SRA lite archive type %s and its .md5", self->accession);
+                            if( (rc = FileOptions_SRAArchive(&new_files[2], tbl, ts, true)) == 0 ) {
+                                rc = FileOptions_AttachMD5(&new_files[2], self->accession, &new_files[3]);
+                            }
+                        }
+                    }
+                }
+                ReleaseComplain(SRATableRelease, tbl);
+            }
+            old_files = new_files;
+            if( rc == 0 ) {
+                SRAQueueNode* q;
+                MALLOC(q, sizeof(*q));
+                if( q == NULL ) {
+                    rc = RC(rcExe, rcTable, rcUpdating, rcMemory, rcExhausted);
+                } else if( (rc = SRAList_Lock(true)) == 0 ) {
+                    if( self->mtime != ts || forced ) {
+                        self->mtime = ts;
+                        old_files = self->files;
+                        self->files = new_files;
+                        self->files_count = new_files_count;
+#if 0
+                        if( self->utime != 0 /* not new */ && g_queue_cond != NULL && (rc = SRAList_Queue_Lock()) == 0 ) {
+                            SRAListNode_AddRef(self);
+                            q->node = self;
+                            q->mtime = self->mtime;
+                            SLListPushTail(&g_queue, &q->dad);
+                            g_queue_depth++;
+                            KConditionSignal(g_queue_cond);
+                            SRAList_Queue_Unlock();
+                            q = NULL;
+                            DEBUG_LINE(10, "%s table queued for async update, queue %lu", self->accession, g_queue_depth);
+                        }
+#endif
+                        self->utime = now ? now : time(NULL);
+                    }
+                    SRAList_Unlock();
+                    DEBUG_LINE(10, "%s table updated %lu %lu", self->accession, self->mtime, self->utime);
+                }
+                FREE(q);
+            }
+            FileOptions_Release(old_files);
+        } else {
+            DEBUG_LINE(10, "%s table is up-to-date: %lu, updated %lu, now %lu",
+                           self->accession, self->mtime, self->utime, time(NULL));
+            rc = RC(rcExe, rcTable, rcUpdating, rcMessage, rcCanceled);
+        }
+    }
+    if( rc != 0 && GetRCState(rc) != rcCanceled ) {
+        PLOGERR(klogErr, (klogErr, rc, "SRA refresh $(a)", PLOG_S(a), self->accession));
+    }
+    return rc;
+}
+
+typedef struct SRAListNode_UpdateData_struct {
+    rc_t rc;
+    KTime_t now;
+    KFile* file;
+    uint64_t pos;
+    uint32_t qty, recs;
+} SRAListNode_UpdateData;
+
+static
+bool SRAListNode_Updater(BSTNode* node, void* data)
+{
+    SRAListNode* n = (SRAListNode*)node;
+    SRAListNode_UpdateData* d = (SRAListNode_UpdateData*)data;
+
+    if( n->version >= g_version ) {
+        if( SRAListNode_Update(n, d->now) == 0 ) {
+            d->qty = d->qty + 1;
+        }
+    }
+    if( d->file != NULL ) {
+        size_t num_writ;
+        uint16_t acc_sz = n->accession ? strlen(n->accession) : 0;
+        uint16_t path_sz = n->path ? strlen(n->path) : 0;
+
+        if( d->recs++ == 0 ) {
+            if( (d->rc = KFileWrite(d->file, d->pos, &g_cache_version, sizeof(g_cache_version), &num_writ)) == 0 ) {
+                d->pos += num_writ;
+            }
+        }
+        if( (d->rc = KFileWrite(d->file, d->pos, &acc_sz, sizeof(acc_sz), &num_writ)) == 0 ) {
+            d->pos += num_writ;
+            if( (d->rc = KFileWrite(d->file, d->pos, n->accession, acc_sz, &num_writ)) == 0 ) {
+                d->pos += num_writ;
+            }
+        }
+        if( (d->rc = KFileWrite(d->file, d->pos, &path_sz, sizeof(path_sz), &num_writ)) == 0 ) {
+            d->pos += num_writ;
+            if( (d->rc = KFileWrite(d->file, d->pos, n->path, path_sz, &num_writ)) == 0 ) {
+                d->pos += num_writ;
+            }
+        }
+        if( (d->rc = KFileWrite(d->file, d->pos, &n->files_count, sizeof(n->files_count), &num_writ)) == 0 ) {
+            d->pos += num_writ;
+            if( n->files_count > 0 &&
+                (d->rc = KFileWrite(d->file, d->pos, n->files, n->files_count * sizeof(*(n->files)), &num_writ)) == 0 ) {
+                d->pos += num_writ;
+            }
+        }
+        if( (d->rc = KFileWrite(d->file, d->pos, &n->mtime, sizeof(n->mtime), &num_writ)) == 0 ) {
+            d->pos += num_writ;
+        }
+        if( (d->rc = KFileWrite(d->file, d->pos, &n->utime, sizeof(n->utime), &num_writ)) == 0 ) {
+            d->pos += num_writ;
+        }
+        /* a'la validation: write record id */
+        if( (d->rc = KFileWrite(d->file, d->pos, &d->recs, sizeof(d->recs), &num_writ)) == 0 ) {
+            d->pos += num_writ;
+        }
+    }
+    return g_sync == 0;
+}
+
+void SRAList_PostRefresh()
+{
+    if (pthread_cond_signal(&g_refresh_cond) == -1)
+        assert(0);
+}
+
+static
+rc_t SRAList_Thread(const KThread *self, void *data)
+{
+
+    PLOGMSG(klogInfo, (klogInfo, "SRA sync thread started with $(s) sec", PLOG_U32(s), g_sync));
+    while( g_sync > 0 ) {
+        KDirectory* dir = NULL;
+        SRAListNode_UpdateData data;
+        struct timespec timeout = {0};
+        if (clock_gettime(CLOCK_REALTIME, &timeout) == -1)
+            assert(0);
+        timeout.tv_sec += g_sync;
+        if (pthread_mutex_lock(&g_refresh_mutex) != 0)
+            assert(0);
+        switch (pthread_cond_timedwait(&g_refresh_cond, &g_refresh_mutex, &timeout))
+        {
+            case 0:
+            case ETIMEDOUT:
+                break;
+            default:
+                assert(0);
+        }
+        if (pthread_mutex_unlock(&g_refresh_mutex) != 0)
+            assert(0);
+        LOGMSG(klogInfo, "Begin refreshing sra list");
+        if( g_lock == NULL ) {
+            break;
+        }
+        memset(&data, 0, sizeof(data));
+        data.now = time(NULL);
+        DEBUG_LINE(10, "SRA sync thread with %u sec, updating version %u @ %lu", g_sync, g_version, data.now);
+        if( g_cache_file != NULL ) {
+            DEBUG_LINE(10, "SRA sync thread writing cache file %s", g_cache_file_tmp);
+            if( (data.rc = KDirectoryNativeDir(&dir)) == 0 ) {
+                data.rc = KDirectoryCreateFile(dir, &data.file, false, 0644, kcmInit, "%s", g_cache_file_tmp);
+            }
+            if( data.rc != 0 ) {
+                data.file = NULL;
+                PLOGERR(klogErr, (klogErr, data.rc, "SRA cache file $(s)", PLOG_S(s), g_cache_file_tmp));
+            }
+        }
+        SRAListNode_KConfigReload();
+        /* scan in reverse to avoid reading threads following update */
+        BSTreeDoUntil(&g_list, true, SRAListNode_Updater, &data);
+        if( data.qty > 0 ) {
+            PLOGMSG(klogInfo, (klogInfo, "SRA sync updated $(q) runs", PLOG_U32(q), data.qty));
+        } else {
+            DEBUG_LINE(10, "SRA sync updated %u runs", data.qty);
+        }
+        if( data.file != NULL ) {
+            rc_t rc;
+            ReleaseComplain(KFileRelease, data.file);
+            rc = KDirectoryRename(dir, true, g_cache_file_tmp, g_cache_file);
+            ReleaseComplain(KDirectoryRelease, dir);
+            data.rc = data.rc ? data.rc : rc;
+            if( data.rc != 0 ) {
+                PLOGERR(klogErr, (klogErr, data.rc, "writing SRA cache file $(s) $(n) records", PLOG_2(PLOG_S(s),PLOG_U32(n)), g_cache_file, data.recs));
+            } else {
+                PLOGMSG(klogInfo, (klogInfo, "created SRA cache file $(s) $(n) records", PLOG_2(PLOG_S(s),PLOG_U32(n)), g_cache_file, data.recs));
+            }
+        }
+    }
+    PLOGMSG(klogInfo, (klogInfo, "SRA sync thread ended v$(s)", PLOG_U64(s), g_version));
+    return 0;
+}
+
+static
+rc_t SRAList_Queue(const KThread *self, void *data)
+{
+    LOGMSG(klogInfo, "SRA queue thread started");
+    while( g_queue_cond != NULL ) {
+        DEBUG_LINE(10, "SRA queue %s", "running");
+        do {
+            SRAQueueNode* q = NULL;
+            if( SRAList_Queue_Lock() == 0 ) {
+                if( g_queue_depth > 0 ) {
+                    q = (SRAQueueNode*)SLListPopHead(&g_queue);
+                    g_queue_depth--;
+                }
+                SRAList_Queue_Unlock();
+                if( q != NULL ) {
+                    if( SRAList_Lock(false) == 0 ) {
+                        PLOGMSG(klogInfo, (klogInfo, "SRA queue $(s) updating", PLOG_S(s), q->node->accession));
+                        if( atomic32_read(&q->node->refcount) == 1 ) {
+                            /* restore value of release below will go negative and leak */
+                            DEBUG_LINE(10, "SRA queue %s dropped - not updated", q->node->accession);
+                        } else if( q->node->mtime == q->mtime ) {
+                            /* update only if not changed since it was put into queue */
+                            uint32_t i, count = q->node->files_count;
+                            FileOptions* opt;
+                            if( FileOptions_Clone(&opt, q->node->files, count) == 0 ) {
+                                SRAList_Unlock();
+                                for(i = 0; i < count; i++) {
+                                    if( opt[i].md5_file != 0 ) {
+                                        rc_t rc = FileOptions_CalcMD5(&opt[i], q->node->accession, q->node);
+                                        if( rc != 0 ) {
+                                            PLOGERR(klogErr, (klogErr, rc, "SRA queue $(s) while obtaining md5",
+                                                PLOG_S(s), q->node->accession));
+                                        } else if( (rc = FileOptions_UpdateMD5(&opt[i], q->node->accession)) != 0 ) {
+                                            PLOGERR(klogErr, (klogErr, rc, "SRA queue $(s) while assigning md5",
+                                                PLOG_S(s), q->node->accession));
+                                        }
+                                    }
+                                }
+                                if( SRAList_Lock(true) == 0 && q->node->mtime == q->mtime ) {
+                                    /* actual update if not changed */
+                                    FREE(q->node->files);
+                                    q->node->files = opt;
+                                    q->node->files_count = count;
+                                    PLOGMSG(klogInfo, (klogInfo, "SRA queue $(s) updated", PLOG_S(s), q->node->accession));
+                                } else {
+                                    FREE(opt);
+                                    DEBUG_LINE(10, "SRA queue %s changed during - not updated", q->node->accession);
+                                }
+                            }
+                        } else {
+                            DEBUG_LINE(10, "SRA queue %s changed - not updated", q->node->accession);
+                        }
+                        SRAList_Unlock();
+                        SRAListNode_Release(q->node);
+                        FREE(q);
+                    }
+                } else {
+                    break;
+                }
+            }
+        } while( g_queue_cond != NULL );
+        if( g_queue_cond != NULL ) {
+            DEBUG_LINE(10, "SRA queue %s", "waiting");
+            SRAList_Queue_Lock();
+            KConditionWait(g_queue_cond, g_queue_lock);
+            SRAList_Queue_Unlock();
+        }
+    }
+    LOGMSG(klogInfo, "SRA queue thread ended");
+    return 0;
+}
+
+rc_t SRAList_Make(KDirectory* dir, unsigned int seconds, const char* cache_path)
+{
+    rc_t rc = 0;
+    BSTreeInit(&g_list);
+    SLListInit(&g_queue);
+    g_sync = seconds;
+
+    assert(dir != NULL);
+
+    if( cache_path != NULL ) {
+        char buf[4096];
+        size_t len;
+        const char* path, *slash = strrchr(cache_path, '/');
+
+        if( slash == NULL ) {
+            slash = cache_path;
+            path = ".";
+            len = 1;
+        } else {
+            path = cache_path;
+            len = slash++ - cache_path;
+        }
+        if( (rc = KDirectoryResolvePath(dir, true, buf, 4096, "%.*s", len, path)) == 0 ) {
+            size_t i = strlen(buf) - 1;
+            while( buf[i] == '.' || buf[i] == '/' ) {
+                i--;
+            }
+            if( i + 2 + strlen(slash) + 4 > sizeof(buf) ) {
+                rc = RC(rcExe, rcPath, rcConstructing, rcBuffer, rcInsufficient);
+            } else {
+                buf[++i] = '/';
+                buf[++i] = '\0';
+                strcat(buf, slash);
+                if( (rc = StrDup(buf, &g_cache_file)) == 0 ) {
+                    DEBUG_LINE(10, "SRA cache file path set to '%s'", g_cache_file);
+                    strcat(buf, ".tmp");
+                    if( (rc = StrDup(buf, &g_cache_file_tmp)) == 0 ) {
+                        DEBUG_LINE(10, "SRA tmp cache file path set to '%s'", g_cache_file_tmp);
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+void SRAList_Init(void)
+{
+    rc_t rc = 0;
+
+    if( g_lock == NULL && (rc = KRWLockMake(&g_lock)) != 0 ) {
+        g_lock = NULL;
+        LOGERR(klogErr, rc, "SRA lock");
+    }
+    if( g_queue_cond == NULL && (rc = KConditionMake(&g_queue_cond)) != 0 ) {
+        g_queue_cond = NULL;
+        LOGERR(klogErr, rc, "SRA queue condition");
+    } else if( g_queue_lock == NULL && (rc = KLockMake(&g_queue_lock)) != 0 ) {
+        g_queue_lock = NULL;
+        LOGERR(klogErr, rc, "SRA queue lock");
+    }
+    if( g_cache_file != NULL ) {
+        /* try to load cache */
+        KDirectory* dir = NULL;
+
+        if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+            const KFile* f;
+            uint32_t recs = 0;
+
+            if( (rc = KDirectoryOpenFileRead(dir, &f, "%s", g_cache_file)) == 0 ) {
+                uint64_t pos = 0;
+                uint32_t ver = 0, recid;
+                uint16_t obj_sz;
+                size_t num_read = 0;
+                SRAListNode_FindData data;
+                SRAListNode* found;
+
+                assert(sizeof(ver) == sizeof(g_cache_version));
+                do {
+                    memset(&data, 0, sizeof(data));
+                    if( pos == 0 ) {
+                        if( (rc = KFileRead(f, pos, &ver, sizeof(ver), &num_read)) != 0 ||
+                            num_read != sizeof(ver) || ver == 0 || ver > g_cache_version ) {
+                                rc = rc ? rc : RC(rcExe, rcTable, rcReading, rcData,
+                                                  ver != g_cache_version ? rcBadVersion : rcTooShort);
+                            break;
+                        }
+                        pos += num_read;
+                    }
+                    if( (rc = KFileRead(f, pos, &obj_sz, sizeof(obj_sz), &num_read)) != 0 || num_read != sizeof(obj_sz) ) {
+                        if( num_read != 0 ) {
+                            /* if num_read is 0 than it is proper EOF */
+                            rc = rc ? rc : RC(rcExe, rcTable, rcReading, rcData, rcTooShort);
+                        }
+                        break;
+                    }
+                    pos += num_read;
+                    MALLOC(data.accession, obj_sz + 1);
+                    if( data.accession == NULL ) {
+                        rc = RC(rcExe, rcTable, rcReading, rcMemory, rcExhausted);
+                        break;
+                    }
+                    if( (rc = KFileRead(f, pos, data.accession, obj_sz, &num_read)) != 0 || num_read != obj_sz ) {
+                        rc = rc ? rc : RC(rcExe, rcTable, rcReading, rcData, rcTooShort);
+                        break;
+                    }
+                    data.accession[obj_sz] = '\0';
+                    pos += num_read;
+                    if( (rc = KFileRead(f, pos, &obj_sz, sizeof(obj_sz), &num_read)) != 0 || num_read != sizeof(obj_sz) ) {
+                        rc = rc ? rc : RC(rcExe, rcTable, rcReading, rcData, rcTooShort);
+                        break;
+                    }
+                    pos += num_read;
+                    if( obj_sz > 0 ) {
+                        MALLOC(data.path, obj_sz + 1);
+                        if( data.path == NULL ) {
+                            rc = RC(rcExe, rcTable, rcReading, rcMemory, rcExhausted);
+                            break;
+                        }
+                        if( (rc = KFileRead(f, pos, data.path, obj_sz, &num_read)) != 0 || num_read != obj_sz ) {
+                            rc = rc ? rc : RC(rcExe, rcTable, rcReading, rcData, rcTooShort);
+                            break;
+                        }
+                        data.path[obj_sz] = '\0';
+                        pos += num_read;
+                    }
+                    if( (rc = SRAListNode_Insert(&data, 0, &found)) != 0 ) {
+                        break;
+                    } else if( (rc = SRAList_Lock(true)) == 0 ) {
+                        do {
+                            obj_sz = sizeof(found->files_count);
+                            if( (rc = KFileRead(f, pos, &found->files_count, obj_sz, &num_read)) != 0 || num_read != obj_sz ) {
+                                rc = rc ? rc : RC(rcExe, rcTable, rcReading, rcData, rcTooShort);
+                                break;
+                            }
+                            pos += num_read;
+                            if( found->files_count > 0 ) {
+                                if( ver < 4 ) {
+                                    /* size was different for older version */
+                                    obj_sz = sizeof(FileOptionsOld) * found->files_count;
+                                    
+                                } else {
+                                    obj_sz = sizeof(*found->files) * found->files_count;
+                                }
+                                MALLOC(found->files, obj_sz);
+                                if( found->files == NULL ) {
+                                    rc = RC(rcExe, rcTable, rcReading, rcMemory, rcExhausted);
+                                    break;
+                                }
+                                if( (rc = KFileRead(f, pos, found->files, obj_sz, &num_read)) != 0 || num_read != obj_sz ) {
+                                    rc = rc ? rc : RC(rcExe, rcTable, rcReading, rcData, rcTooShort);
+                                    break;
+                                }
+                                pos += num_read;
+                                if( ver < 4 ) {
+                                    FileOptionsOld* fOld = (FileOptionsOld*)found->files;
+                                    if( (rc = FileOptions_Make(&found->files, found->files_count)) != 0 ) {
+                                        FREE(fOld);
+                                        break;
+                                    } else {
+                                        uint32_t i;
+                                        /* old struct size */
+                                        obj_sz = sizeof(FileOptionsOld);
+                                        for(i = 0; i < found->files_count; i++ ) {
+                                            memcpy(&found->files[i], &fOld[i], obj_sz);
+                                            memset(found->files[i].md5, 0, sizeof(found->files[i].md5));
+                                            found->files[i].md5_file = 0;
+                                        }
+                                        FREE(fOld);
+                                    }
+                                }
+                            }
+                            obj_sz = sizeof(found->mtime);
+                            if( (rc = KFileRead(f, pos, &found->mtime, obj_sz, &num_read)) != 0 || num_read != obj_sz ) {
+                                rc = rc ? rc : RC(rcExe, rcTable, rcReading, rcData, rcTooShort);
+                                break;
+                            }
+                            pos += num_read;
+                            if( ver >= 3 ) {
+                                obj_sz = sizeof(found->utime);
+                                if( (rc = KFileRead(f, pos, &found->utime, obj_sz, &num_read)) != 0 || num_read != obj_sz ) {
+                                    rc = rc ? rc : RC(rcExe, rcTable, rcReading, rcData, rcTooShort);
+                                    break;
+                                }
+                                pos += num_read;
+                            }
+                            SRAList_Unlock();
+                            if( ver == 1 ) {
+                                KTime_t l;
+                                obj_sz = sizeof(l);
+                                if( (rc = KFileRead(f, pos, &l, obj_sz, &num_read)) != 0 || num_read != obj_sz ) {
+                                    rc = rc ? rc : RC(rcExe, rcTable, rcReading, rcData, rcTooShort);
+                                    break;
+                                }
+                                pos += num_read;
+                            }
+                            obj_sz = sizeof(recid);
+                            if( (rc = KFileRead(f, pos, &recid, obj_sz, &num_read)) != 0 || num_read != obj_sz ) {
+                                rc = rc ? rc : RC(rcExe, rcTable, rcReading, rcData, rcTooShort);
+                                break;
+                            }
+                            pos += num_read;
+                            if( ++recs != recid ) {
+                                rc = RC(rcExe, rcTable, rcReading, rcData, rcInconsistent);
+                                break;
+                            }
+                        } while(false);
+                    }
+                    FREE(data.accession);
+                    FREE(data.path);
+                    SRAListNode_Release(found);
+                } while(rc == 0);
+                ReleaseComplain(KFileRelease, f);
+            } else if( GetRCState(rc) == rcNotFound ) {
+                rc = 0;
+            }
+            if( rc != 0 ) {
+                PLOGERR(klogErr, (klogErr, rc, "reading SRA cache file $(s) $(n) records",
+                        PLOG_2(PLOG_S(s),PLOG_U32(n)), g_cache_file, recs));
+            } else if( recs > 0 ) {
+                PLOGMSG(klogInfo, (klogInfo, "loaded SRA cache file $(s) $(n) records",
+                        PLOG_2(PLOG_S(s),PLOG_U32(n)), g_cache_file, recs));
+            }
+            ReleaseComplain(KDirectoryRelease, dir);
+        }
+    }
+    if( g_lock != NULL ) {
+        if( g_sync > 0 && (rc = KThreadMake(&g_thread, SRAList_Thread, NULL)) != 0 ) {
+            LOGERR(klogErr, rc, "SRA sync thread");
+        }
+        if( g_queue_cond != NULL && g_queue_lock != NULL &&
+            (rc = KThreadMake(&g_queue_thread, SRAList_Queue, NULL)) != 0 ) {
+            LOGERR(klogErr, rc, "SRA queue thread");
+        }
+    }
+}
+
+void SRAList_Fini(void)
+{
+    g_sync = 0;
+    if( g_thread != NULL ) {
+        ReleaseComplain(KThreadCancel, g_thread);
+        ReleaseComplain(KThreadRelease, g_thread);
+    }
+    if( g_queue_thread != NULL ) {
+        KCondition* x = g_queue_cond;
+        g_queue_cond = NULL;
+        SRAList_Queue_Lock();
+        KConditionSignal(x);
+        SRAList_Queue_Unlock();
+        ReleaseComplain(KThreadCancel, g_queue_thread);
+        ReleaseComplain(KThreadRelease, g_queue_thread);
+        g_queue_cond = x;
+        g_queue_thread = NULL;
+    }
+    ReleaseComplain(KConditionRelease, g_queue_cond);
+    ReleaseComplain(KLockRelease, g_queue_lock);
+    pthread_cond_destroy(&g_refresh_cond);
+    pthread_mutex_destroy(&g_refresh_mutex);
+    if( g_lock != NULL ) {
+        SRAList_Lock(true);
+    }
+    BSTreeWhack(&g_list, SRAList_Whack, NULL);
+    SLListWhack(&g_queue, SRAQueue_Whack, NULL);
+    if( g_lock != NULL ) {
+        SRAList_Unlock();
+        ReleaseComplain(KRWLockRelease, g_lock);
+    }
+    ReleaseComplain(SRAMgrRelease, g_sra_mgr);
+    ReleaseComplain(KLockRelease, g_sra_mgr_lock);
+    FREE(g_cache_file);
+    FREE(g_cache_file_tmp);
+
+    g_queue_cond = NULL;
+    g_queue_lock = NULL;
+    g_version = 0;
+    g_lock = NULL;
+    g_thread = NULL;
+    g_sra_mgr = NULL;
+}
+
+rc_t SRAListNode_GetType(const SRAListNode* cself, SRAConfigFlags flags, const char* suffix, const FileOptions** options)
+{
+    rc_t rc = 0;
+    if( cself == NULL || suffix == NULL || options == NULL ) {
+        rc = RC(rcExe, rcTable, rcSearching, rcParam, rcNull);
+    } else {
+        if( (rc = SRAListNode_Update((SRAListNode*)cself, 0)) == 0 || GetRCState(rc) == rcCanceled ) {
+            DEBUG_LINE(10, "'%s'", suffix);
+            if( (rc = SRAList_Lock(false)) == 0 ) {
+                size_t i;
+                *options = NULL;
+                for(i = 0; i < cself->files_count; i++) {
+                    if( (cself->files[i].type & flags) && strcmp(suffix, cself->files[i].suffix) == 0 ) {
+                        *options = &cself->files[i];
+                        break;
+                    }
+                }
+                SRAList_Unlock();
+            }
+        }
+    }
+    if( rc == 0 && *options == NULL ) {
+        rc = RC(rcExe, rcTable, rcSearching, rcName, rcNotFound);
+    }
+    return rc;
+}
+
+rc_t SRAListNode_ListFiles(const SRAListNode* cself, const char* prefix, int types, FSNode_Dir_Visit func, void* data)
+{
+    rc_t rc = 0;
+    if( cself == NULL ) {
+        rc = RC(rcExe, rcTable, rcListing, rcSelf, rcNull);
+    } else {
+        if( (rc = SRAListNode_Update((SRAListNode*)cself, 0)) == 0 || GetRCState(rc) == rcCanceled ) {
+            DEBUG_LINE(10, "%s", prefix);
+            if( (rc = SRAList_Lock(false)) == 0 ) {
+                char buf[1024];
+                size_t i;
+                for(i = 0; rc == 0 && i < cself->files_count; i++) {
+                    if( (cself->files[i].type & types) && cself->files[i].file_sz > 0 ) {
+                        strcpy(buf, prefix);
+                        strcat(buf, cself->files[i].suffix);
+                        rc = func(buf, data);
+                    }
+                }
+                SRAList_Unlock();
+            }
+        }
+    }
+    return rc;
+}
diff --git a/tools/fuse/sra-list.h b/tools/fuse/sra-list.h
new file mode 100644
index 0000000..3bc3ef0
--- /dev/null
+++ b/tools/fuse/sra-list.h
@@ -0,0 +1,86 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_sra_list_
+#define _h_sra_fuse_sra_list_
+
+#include <sra/sradb.h>
+
+#include "xml.h"
+#include "formats.h"
+
+typedef enum {
+    eSRAFuseInitial     = 0x1000,
+    eSRAFuseRunDir      = 0x0001,
+    eSRAFuseFileArc     = 0x0002,
+    eSRAFuseFileArcLite = 0x0004,
+    eSRAFuseFileFastq   = 0x0008,
+    eSRAFuseFileSFF     = 0x0010
+} SRAConfigFlags;
+
+typedef struct SRAListNode SRAListNode;
+
+/*
+ * Initialize run list
+ * if seconds > 0 than a thread is launched to updated run info
+ */
+rc_t SRAList_Make(KDirectory* dir, unsigned int seconds, const char* cache_path);
+
+void SRAList_Init(void);
+
+void SRAList_Fini(void);
+
+/* after processing updated XML set next version so 
+ * that runs dropped from XML could be dropped from the list
+ */
+rc_t SRAList_NextVersion(void);
+
+/*
+ * Attaches to parent file nodes based on flags
+ * xml_node is of type SRA with accession and optional path
+ * maintains internal list of SRA objects keyed on acession-path pairs
+ */
+rc_t SRAListNode_Make(const KXMLNode* xml_node, FSNode* parent, SRAConfigFlags flags, char* errmsg,
+                      const char* rel_path, EXMLValidate validate);
+
+rc_t SRAListNode_TableMTime(const SRAListNode* cself, KTime_t* mtime);
+
+rc_t SRAListNode_TableOpen(const SRAListNode* cself, const SRATable** tbl);
+
+/*
+ * Get type info based on file extension
+ */
+rc_t SRAListNode_GetType(const SRAListNode* cself, SRAConfigFlags flags, const char* suffix, struct FileOptions const** options);
+
+/*
+ * Get list of files using prefix + suffixes filtering by types
+ */
+rc_t SRAListNode_ListFiles(const SRAListNode* cself, const char* prefix, int types, FSNode_Dir_Visit func, void* data);
+
+rc_t SRAListNode_AddRef(const SRAListNode* cself);
+void SRAListNode_Release(const SRAListNode* cself);
+void SRAList_PostRefresh();
+
+#endif /* _h_sra_fuse_sra_list_ */
diff --git a/tools/fuse/sra-makeidx.c b/tools/fuse/sra-makeidx.c
new file mode 100644
index 0000000..2a08e9b
--- /dev/null
+++ b/tools/fuse/sra-makeidx.c
@@ -0,0 +1,955 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/container.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <klib/checksum.h>
+#include <klib/rc.h>
+#include <kdb/manager.h>
+#include <kdb/table.h>
+#include <kdb/meta.h>
+#include <kdb/index.h>
+
+#include <sra/wsradb.h>
+#include <sra/sradb-priv.h>
+#include <sra/fastq.h>
+#include <sra/sff.h>
+
+#include "zlib-simple.h"
+#include "debug.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <errno.h>
+
+uint32_t g_file_block_sz = 32 * 1024;
+const char* g_accession = NULL;
+bool g_dump = false;
+bool g_ungzip = false;
+
+typedef struct SIndexObj_struct {
+    KMDataNode* meta;
+    const char* const file;
+    const char* const format;
+    const char* const index;
+    rc_t (*func)(const SRATable* sratbl, struct SIndexObj_struct* obj, char* buffer, const size_t buffer_sz);
+    uint64_t file_size;
+    uint32_t buffer_sz;
+    uint64_t minSpotId;
+    uint64_t maxSpotId;
+    SLList li;
+    MD5State md5;
+    uint8_t md5_digest[16];
+} SIndexObj;
+
+typedef struct SIndexNode_struct {
+    SLNode n;
+    uint64_t key;
+    uint64_t key_size;
+    int64_t id;
+    uint64_t id_qty;
+} SIndexNode;
+
+typedef struct SIndexData_struct {
+    rc_t rc;
+    KIndex* kidx;
+} SIndexData;
+
+static
+bool InsertIndexData( SLNode *node, void *data )
+{
+    SIndexNode* n = (SIndexNode*)node;
+    SIndexData* d = (SIndexData*)data;
+
+    d->rc = KIndexInsertU64(d->kidx, true, n->key, n->key_size, n->id, n->id_qty);
+    return d->rc == 0 ? false : true;
+}
+
+static
+void WhackIndexData( SLNode *n, void *data )
+{
+    free(n);
+}
+
+static
+rc_t CommitIndex(KTable* ktbl, const char* name, const SLList* li)
+{
+    SIndexData data;
+
+    STSMSG(0, ("Saving index %s", name));
+    data.rc = KTableCreateIndex(ktbl, &data.kidx, kitU64, kcmInit, name);
+    if( data.rc == 0 ) {
+        if( !SLListDoUntil(li, InsertIndexData, &data) ) {
+            data.rc = KIndexCommit(data.kidx);
+        }
+        KIndexRelease(data.kidx);
+    }
+    return data.rc;
+}
+
+rc_t WriteFileMeta(SIndexObj* obj)
+{
+    rc_t rc = 0;
+    KMDataNode* nd = NULL;
+
+    PLOGMSG(klogInfo, (klogInfo, "Meta $(f) on index $(i): file size $(s), buffer $(b)",
+        PLOG_4(PLOG_S(f),PLOG_S(i),PLOG_U64(s),PLOG_U32(b)), obj->file, obj->index, obj->file_size, obj->buffer_sz));
+
+    if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(obj->meta, &nd, "Format")) == 0 ) {
+        KMDataNode* opt = NULL;
+        rc = KMDataNodeWriteCString(nd, obj->format);
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(nd, &opt, "Options")) == 0 ) {
+            KMDataNode* ond = NULL;
+            if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &ond, "accession")) == 0 ) {
+                rc = KMDataNodeWriteCString(ond, g_accession);
+                KMDataNodeRelease(ond);
+            }
+            if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &ond, "minSpotId")) == 0 ) {
+                rc = KMDataNodeWriteB64(ond, &obj->minSpotId);
+                KMDataNodeRelease(ond);
+            }
+            if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &ond, "maxSpotId")) == 0 ) {
+                rc = KMDataNodeWriteB64(ond, &obj->maxSpotId);
+                KMDataNodeRelease(ond);
+            }
+            KMDataNodeRelease(opt);
+        }
+        KMDataNodeRelease(nd);
+    }
+
+    if( rc == 0 && obj->file_size > 0 && (rc = KMDataNodeOpenNodeUpdate(obj->meta, &nd, "Size")) == 0 ) {
+        rc = KMDataNodeWriteB64(nd, &obj->file_size);
+        KMDataNodeRelease(nd);
+    }
+
+    if( rc == 0 && obj->buffer_sz > 0 && (rc = KMDataNodeOpenNodeUpdate(obj->meta, &nd, "Buffer")) == 0 ) {
+        rc = KMDataNodeWriteB32(nd, &obj->buffer_sz);
+        KMDataNodeRelease(nd);
+    }
+
+    if( rc == 0 && strlen(obj->index) > 0 && (rc = KMDataNodeOpenNodeUpdate(obj->meta, &nd, "Index")) == 0 ) {
+        rc = KMDataNodeWriteCString(nd, obj->index);
+        KMDataNodeRelease(nd);
+    }
+
+    if( rc == 0 && obj->file_size > 0 && (rc = KMDataNodeOpenNodeUpdate(obj->meta, &nd, "md5")) == 0 ) {
+        char x[5];
+        int i;
+        for( i = 0; rc == 0 && i < sizeof(obj->md5_digest); i++ ) {
+            int l = snprintf(x, 4, "%02x", obj->md5_digest[i]);
+            rc = KMDataNodeAppend(nd, x, l);
+        }
+        KMDataNodeRelease(nd);
+    }
+    return rc;
+}
+
+static
+rc_t SFF_Idx(const SRATable* sratbl, SIndexObj* obj, char* buffer, const size_t buffer_sz)
+{
+    rc_t rc = 0;
+    const SFFReader* reader = NULL;
+
+    if( (rc = SFFReaderMake(&reader, sratbl, g_accession, obj->minSpotId, obj->maxSpotId)) != 0 ) {
+        return rc;
+    } else {
+        size_t written = 0;
+        uint32_t blk = 0;
+        SIndexNode* inode = NULL;
+
+        while( rc == 0 ) {
+            rc = SFFReader_GetNextSpotData(reader, buffer, buffer_sz, &written);
+            if( blk >= g_file_block_sz || (GetRCObject(rc) == rcRow && GetRCState(rc) == rcExhausted) ) {
+                inode->key_size = blk;
+                SLListPushTail(&obj->li, &inode->n);
+                DEBUG_MSG(5, ("SFF index closed spots %lu, offset %lu, block size %lu\n", inode->id_qty, inode->key, inode->key_size));
+                inode = NULL;
+                if( blk > obj->buffer_sz ) {
+                    obj->buffer_sz = blk;
+                }
+                blk = 0;
+            }
+            if( GetRCObject(rc) == rcRow && GetRCState(rc) == rcExhausted ) {
+                rc = 0;
+                break;
+            }
+            if( inode == NULL ) {
+                spotid_t spotid = 0;
+                if( (rc = SFFReaderCurrentSpot(reader, &spotid)) != 0 ) {
+                    break;
+                }
+                inode = malloc(sizeof(SIndexNode));
+                if( inode == NULL ) {
+                    rc = RC(rcExe, rcIndex, rcConstructing, rcMemory, rcExhausted);
+                    break;
+                }
+                inode->key = obj->file_size;
+                inode->key_size = 0;
+                inode->id = spotid;
+                inode->id_qty = 0;
+                DEBUG_MSG(5, ("SFF index opened spot %ld, offset %lu\n", inode->id, inode->key));
+                if( spotid == 1 ) {
+                    char hd[10240];
+                    size_t hd_sz = 0;
+                    if( (rc = SFFReaderHeader(reader, 0, hd, sizeof(hd), &hd_sz)) == 0 ) {
+                        obj->file_size += hd_sz;
+                        blk += hd_sz;
+                        MD5StateAppend(&obj->md5, hd, hd_sz);
+                        if( g_dump ) {
+                            fwrite(hd, hd_sz, 1, stderr);
+                        }
+                    }
+                }
+            }
+            obj->file_size += written;
+            blk += written;
+            inode->id_qty++;
+            MD5StateAppend(&obj->md5, buffer, written);
+            if( g_dump ) {
+                fwrite(buffer, written, 1, stderr);
+            }
+        }
+        rc = rc ? rc : Quitting();
+        if( rc != 0 ) {
+            spotid_t spot = 0;
+            SFFReaderCurrentSpot(reader, &spot);
+            PLOGERR(klogErr, (klogErr, rc, "spot $(s)", PLOG_U32(s), spot));
+        }
+    }
+    SFFReaderWhack(reader);
+    return rc;
+}
+
+static
+rc_t SFFGzip_Idx(const SRATable* sratbl, SIndexObj* obj, char* buffer, const size_t buffer_sz)
+{
+    rc_t rc = 0;
+    uint16_t zlib_ver = ZLIB_VERNUM;
+    const SFFReader* reader = NULL;
+
+    if( (rc = SFFReaderMake(&reader, sratbl, g_accession, obj->minSpotId, obj->maxSpotId)) != 0 ) {
+        return rc;
+    } else {
+        size_t written = 0;
+        uint32_t blk = 0, spots_per_block = 0, proj_id_qty = 0;
+        SIndexNode* inode = NULL;
+        size_t z_blk = 0;
+        size_t spots_buf_sz = g_file_block_sz * 100;
+        size_t zbuf_sz = spots_buf_sz + 100;
+
+        char* zbuf = malloc(zbuf_sz);
+        char* spots_buf = malloc(spots_buf_sz);
+        bool eof = false;
+
+        if( zbuf == NULL || spots_buf == NULL ) {
+            rc = RC(rcExe, rcIndex, rcConstructing, rcMemory, rcExhausted);
+        }
+        while( rc == 0 ) {
+            if( (rc = SFFReader_GetNextSpotData(reader, buffer, buffer_sz, &written)) == 0 ) {
+                if( inode == NULL ) {
+                    spotid_t spotid = 0;
+                    if( (rc = SFFReaderCurrentSpot(reader, &spotid)) != 0 ) {
+                        break;
+                    }
+                    inode = malloc(sizeof(SIndexNode));
+                    if( inode == NULL ) {
+                        rc = RC(rcExe, rcIndex, rcConstructing, rcMemory, rcExhausted);
+                        break;
+                    }
+                    inode->key = obj->file_size;
+                    inode->key_size = 0;
+                    inode->id = spotid;
+                    inode->id_qty = 0;
+                    DEBUG_MSG(5, ("%s open key: spot %ld, offset %lu\n", obj->index, inode->id, inode->key));
+                    if( spotid == 1 ) {
+                        char hd[10240];
+                        size_t hd_sz = 0;
+                        if( (rc = SFFReaderHeader(reader, 0, hd, sizeof(hd), &hd_sz)) == 0 ) {
+                            if( hd_sz + written > spots_buf_sz ) {
+                                rc = RC(rcExe, rcIndex, rcConstructing, rcMemory, rcInsufficient);
+                                break;
+                            }
+                            memcpy(&spots_buf[blk], hd, hd_sz);
+                            blk += hd_sz;
+                            if( g_dump ) {
+                                fwrite(hd, hd_sz, 1, stderr);
+                            }
+                        }
+                    }
+
+                }
+                if( blk + written > spots_buf_sz ) {
+                    rc = RC(rcExe, rcIndex, rcConstructing, rcMemory, rcInsufficient);
+                    break;
+                }
+                inode->id_qty++;
+                memcpy(&spots_buf[blk], buffer, written);
+                blk += written;
+                if( g_dump ) {
+                    fwrite(buffer, written, 1, stderr);
+                }
+            }
+            if( (eof = (GetRCObject(rc) == rcRow && GetRCState(rc) == rcExhausted)) ) {
+                rc = 0;
+                if( inode == NULL ) {
+                    break;
+                }
+            }
+            if( rc == 0 && (eof || 
+                            (proj_id_qty == 0 && inode->id_qty > (spots_per_block * 0.95)) || 
+                            (proj_id_qty > 0 && inode->id_qty >= proj_id_qty) ) ) {
+                rc = ZLib_DeflateBlock(spots_buf, blk, zbuf, zbuf_sz, &z_blk);
+                if( z_blk < g_file_block_sz ) {
+                    /* project needed id_qty */
+                    proj_id_qty = g_file_block_sz * inode->id_qty / z_blk * 1.05;
+                    DEBUG_MSG(5, ("%s: project id qty %lu\n", obj->index, proj_id_qty));
+                } else {
+                    DEBUG_MSG(10, ("%s: no projection %lu > %lu\n", obj->index, z_blk, g_file_block_sz));
+                }
+            }
+            if( rc == 0 && (eof || z_blk >= g_file_block_sz) ) {
+                obj->file_size += z_blk;
+                MD5StateAppend(&obj->md5, zbuf, z_blk);
+                inode->key_size = z_blk;
+                SLListPushTail(&obj->li, &inode->n);
+                DEBUG_MSG(5, ("%s close key: spots %lu, size %lu, ratio %hu%%, raw %lu\n",
+                         obj->index, inode->id_qty, inode->key_size, (uint16_t)(((float)(blk - z_blk)/blk)*100), blk));
+                spots_per_block = inode->id_qty;
+                inode = NULL;
+                if( blk > obj->buffer_sz ) {
+                    obj->buffer_sz = blk;
+                }
+                blk = 0;
+                z_blk = 0;
+                proj_id_qty = 0;
+            }
+            if( eof ) {
+                break;
+            }
+        }
+        rc = rc ? rc : Quitting();
+        if( rc != 0 ) {
+            spotid_t spot = 0;
+            SFFReaderCurrentSpot(reader, &spot);
+            PLOGERR(klogErr, (klogErr, rc, "spot $(s)", PLOG_U32(s), spot));
+        }
+        free(zbuf);
+        free(spots_buf);
+    }
+    if( rc == 0 ) {
+        KMDataNode* opt = NULL, *nd = NULL;
+
+        if( (rc = KMDataNodeOpenNodeUpdate(obj->meta, &opt, "Format/Options")) != 0 ) {
+            return rc;
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "ZlibVersion")) == 0 ) {
+            rc = KMDataNodeWriteB16(nd, &zlib_ver);
+            KMDataNodeRelease(nd);
+        }
+        KMDataNodeRelease(opt);
+    }
+    SFFReaderWhack(reader);
+    return rc;
+}
+
+static
+rc_t Fastq_Idx(const SRATable* sratbl, SIndexObj* obj, char* buffer, const size_t buffer_sz)
+{
+    rc_t rc = 0;
+    const FastqReader* reader = NULL;
+
+    uint8_t colorSpace = false;
+    char* colorSpaceKey = "\0";
+    uint8_t origFormat = false;
+    uint8_t printLabel = true;
+    uint8_t printReadId = true;
+    uint8_t clipQuality = true;
+    uint32_t minReadLen = 0;
+    uint16_t qualityOffset = 0;
+
+    {{
+        const SRAColumn* c = NULL;
+        const uint8_t *platform = SRA_PLATFORM_UNDEFINED;
+        bitsz_t o, z;
+
+        if( (rc = SRATableOpenColumnRead(sratbl, &c, "PLATFORM", sra_platform_id_t)) != 0 ) {
+            return rc;
+        }
+        if( (rc = SRAColumnRead(c, 1, (const void **)&platform, &o, &z)) != 0 ) {
+            return rc;
+        }
+        if( *platform == SRA_PLATFORM_ABSOLID ) {
+            colorSpace = true;
+        }
+        SRAColumnRelease(c);
+    }}
+
+    if( (rc = FastqReaderMake(&reader, sratbl, g_accession,
+                        colorSpace, origFormat, false, printLabel, printReadId,
+                        !clipQuality, minReadLen, qualityOffset, colorSpaceKey[0],
+                        obj->minSpotId, obj->maxSpotId)) != 0 ) {
+        return rc;
+    } else {
+        KMDataNode* opt = NULL, *nd = NULL;
+
+        if( (rc = KMDataNodeOpenNodeUpdate(obj->meta, &opt, "Format/Options")) != 0 ) {
+            return rc;
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "colorSpace")) == 0 ) {
+            rc = KMDataNodeWriteB8(nd, &colorSpace);
+            KMDataNodeRelease(nd);
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "colorSpaceKey")) == 0 ) {
+            rc = KMDataNodeWrite(nd, colorSpaceKey, 1);
+            KMDataNodeRelease(nd);
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "origFormat")) == 0 ) {
+            rc = KMDataNodeWriteB8(nd, &origFormat);
+            KMDataNodeRelease(nd);
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "printLabel")) == 0 ) {
+            rc = KMDataNodeWriteB8(nd, &printLabel);
+            KMDataNodeRelease(nd);
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "printReadId")) == 0 ) {
+            rc = KMDataNodeWriteB8(nd, &printReadId);
+            KMDataNodeRelease(nd);
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "clipQuality")) == 0 ) {
+            rc = KMDataNodeWriteB8(nd, &clipQuality);
+            KMDataNodeRelease(nd);
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "minReadLen")) == 0 ) {
+            rc = KMDataNodeWriteB32(nd, &minReadLen);
+            KMDataNodeRelease(nd);
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "qualityOffset")) == 0 ) {
+            rc = KMDataNodeWriteB16(nd, &qualityOffset);
+            KMDataNodeRelease(nd);
+        }
+        KMDataNodeRelease(opt);
+    }
+
+    if( rc == 0 ) {
+        size_t written = 0;
+        uint32_t blk = 0;
+        SIndexNode* inode = NULL;
+
+        while( rc == 0 ) {
+            rc = FastqReader_GetNextSpotSplitData(reader, buffer, buffer_sz, &written);
+            if( blk >= g_file_block_sz || (GetRCObject(rc) == rcRow && GetRCState(rc) == rcExhausted) ) {
+                inode->key_size = blk;
+                SLListPushTail(&obj->li, &inode->n);
+                DEBUG_MSG(5, ("Fastq index closed spots %lu, offset %lu, block size %lu\n",
+                                                            inode->id_qty, inode->key, inode->key_size));
+                inode = NULL;
+                if( blk > obj->buffer_sz ) {
+                    obj->buffer_sz = blk;
+                }
+                blk = 0;
+            }
+            if( GetRCObject(rc) == rcRow && GetRCState(rc) == rcExhausted ) {
+                rc = 0;
+                break;
+            }
+            if( inode == NULL ) {
+                spotid_t spotid = 0;
+                if( (rc = FastqReaderCurrentSpot(reader, &spotid)) != 0 ) {
+                    break;
+                }
+                inode = malloc(sizeof(SIndexNode));
+                if( inode == NULL ) {
+                    rc = RC(rcExe, rcIndex, rcConstructing, rcMemory, rcExhausted);
+                    break;
+                }
+                inode->key = obj->file_size;
+                inode->key_size = 0;
+                inode->id = spotid;
+                inode->id_qty = 0;
+                DEBUG_MSG(5, ("Fastq index opened spot %ld, offset %lu\n", inode->id, inode->key));
+            }
+            inode->id_qty++;
+            obj->file_size += written;
+            blk += written;
+            MD5StateAppend(&obj->md5, buffer, written);
+            if( g_dump ) {
+                fwrite(buffer, written, 1, stderr);
+            }
+        }
+        rc = rc ? rc : Quitting();
+        if( rc != 0 ) {
+            spotid_t spot = 0;
+            FastqReaderCurrentSpot(reader, &spot);
+            PLOGERR(klogErr, (klogErr, rc, "spot $(s)", PLOG_U32(s), spot));
+        }
+    }
+    FastqReaderWhack(reader);
+    return rc;
+}
+
+static
+rc_t FastqGzip_Idx(const SRATable* sratbl, SIndexObj* obj, char* buffer, const size_t buffer_sz)
+{
+    rc_t rc = 0;
+    const FastqReader* reader = NULL;
+
+    uint16_t zlib_ver = ZLIB_VERNUM;
+    uint8_t colorSpace = false;
+    char* colorSpaceKey = "\0";
+    uint8_t origFormat = false;
+    uint8_t printLabel = true;
+    uint8_t printReadId = true;
+    uint8_t clipQuality = true;
+    uint32_t minReadLen = 0;
+    uint16_t qualityOffset = 0;
+
+    {{
+        const SRAColumn* c = NULL;
+        const uint8_t *platform = SRA_PLATFORM_UNDEFINED;
+        bitsz_t o, z;
+
+        if( (rc = SRATableOpenColumnRead(sratbl, &c, "PLATFORM", sra_platform_id_t)) != 0 ) {
+            return rc;
+        }
+        if( (rc = SRAColumnRead(c, 1, (const void **)&platform, &o, &z)) != 0 ) {
+            return rc;
+        }
+        if( *platform == SRA_PLATFORM_ABSOLID ) {
+            colorSpace = true;
+        }
+        SRAColumnRelease(c);
+    }}
+
+    if( (rc = FastqReaderMake(&reader, sratbl, g_accession,
+                        colorSpace, origFormat, false, printLabel, printReadId,
+                        !clipQuality, minReadLen, qualityOffset, colorSpaceKey[0],
+                        obj->minSpotId, obj->maxSpotId)) != 0 ) {
+        return rc;
+    } else {
+        size_t written = 0;
+        uint32_t blk = 0, spots_per_block = 0, proj_id_qty = 0;
+        SIndexNode* inode = NULL;
+        size_t z_blk = 0;
+        size_t spots_buf_sz = g_file_block_sz * 100;
+        size_t zbuf_sz = spots_buf_sz + 100;
+        char* zbuf = malloc(zbuf_sz);
+        char* spots_buf = malloc(spots_buf_sz);
+        bool eof = false;
+
+        if( zbuf == NULL || spots_buf == NULL ) {
+            rc = RC(rcExe, rcIndex, rcConstructing, rcMemory, rcExhausted);
+        }
+        while( rc == 0 ) {
+            if( (rc = FastqReader_GetNextSpotSplitData(reader, buffer, buffer_sz, &written)) == 0 ) {
+                if( inode == NULL ) {
+                    spotid_t spotid = 0;
+                    if( (rc = FastqReaderCurrentSpot(reader, &spotid)) != 0 ) {
+                        break;
+                    }
+                    inode = malloc(sizeof(SIndexNode));
+                    if( inode == NULL ) {
+                        rc = RC(rcExe, rcIndex, rcConstructing, rcMemory, rcExhausted);
+                        break;
+                    }
+                    inode->key = obj->file_size;
+                    inode->key_size = 0;
+                    inode->id = spotid;
+                    inode->id_qty = 0;
+                    DEBUG_MSG(5, ("%s open key: spot %ld, offset %lu\n", obj->index, inode->id, inode->key));
+                }
+                if( blk + written > spots_buf_sz ) {
+                    rc = RC(rcExe, rcIndex, rcConstructing, rcMemory, rcInsufficient);
+                    break;
+                }
+                inode->id_qty++;
+                memcpy(&spots_buf[blk], buffer, written);
+                blk += written;
+                if( g_dump ) {
+                    fwrite(buffer, written, 1, stderr);
+                }
+            }
+            if( (eof = (GetRCObject(rc) == rcRow && GetRCState(rc) == rcExhausted)) ) {
+                rc = 0;
+                if( inode == NULL ) {
+                    break;
+                }
+            }
+            if( rc == 0 && (eof || 
+                            (proj_id_qty == 0 && inode->id_qty > (spots_per_block * 0.95)) || 
+                            (proj_id_qty > 0 && inode->id_qty >= proj_id_qty) ) ) {
+                rc = ZLib_DeflateBlock(spots_buf, blk, zbuf, zbuf_sz, &z_blk);
+                if( z_blk < g_file_block_sz ) {
+                    /* project needed id_qty */
+                    proj_id_qty = g_file_block_sz * inode->id_qty / z_blk * 1.05;
+                    DEBUG_MSG(5, ("%s: project id qty %u\n", obj->index, proj_id_qty));
+                } else {
+                    DEBUG_MSG(10, ("%s: no projection %u > %u\n", obj->index, z_blk, g_file_block_sz));
+                }
+            }
+            if( rc == 0 && (eof || z_blk >= g_file_block_sz) ) {
+                obj->file_size += z_blk;
+                MD5StateAppend(&obj->md5, zbuf, z_blk);
+                inode->key_size = z_blk;
+                SLListPushTail(&obj->li, &inode->n);
+                DEBUG_MSG(5, ("%s close key: spots %lu, size %lu, ratio %hu%%, raw %u\n",
+                         obj->index, inode->id_qty, inode->key_size, (uint16_t)(((float)(blk - z_blk)/blk)*100), blk ));
+                spots_per_block = inode->id_qty;
+                inode = NULL;
+                if( blk > obj->buffer_sz ) {
+                    obj->buffer_sz = blk;
+                }
+                blk = 0;
+                z_blk = 0;
+                proj_id_qty = 0;
+            }
+            if( eof ) {
+                break;
+            }
+        }
+        rc = rc ? rc : Quitting();
+        if( rc != 0 ) {
+            spotid_t spot = 0;
+            FastqReaderCurrentSpot(reader, &spot);
+            PLOGERR(klogErr, (klogErr, rc, "spot $(s)", PLOG_U32(s), spot));
+        }
+        free(zbuf);
+        free(spots_buf);
+    }
+    if( rc == 0 ) {
+        KMDataNode* opt = NULL, *nd = NULL;
+
+        if( (rc = KMDataNodeOpenNodeUpdate(obj->meta, &opt, "Format/Options")) != 0 ) {
+            return rc;
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "ZlibVersion")) == 0 ) {
+            rc = KMDataNodeWriteB16(nd, &zlib_ver);
+            KMDataNodeRelease(nd);
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "colorSpace")) == 0 ) {
+            rc = KMDataNodeWriteB8(nd, &colorSpace);
+            KMDataNodeRelease(nd);
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "colorSpaceKey")) == 0 ) {
+            rc = KMDataNodeWrite(nd, colorSpaceKey, 1);
+            KMDataNodeRelease(nd);
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "origFormat")) == 0 ) {
+            rc = KMDataNodeWriteB8(nd, &origFormat);
+            KMDataNodeRelease(nd);
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "printLabel")) == 0 ) {
+            rc = KMDataNodeWriteB8(nd, &printLabel);
+            KMDataNodeRelease(nd);
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "printReadId")) == 0 ) {
+            rc = KMDataNodeWriteB8(nd, &printReadId);
+            KMDataNodeRelease(nd);
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "clipQuality")) == 0 ) {
+            rc = KMDataNodeWriteB8(nd, &clipQuality);
+            KMDataNodeRelease(nd);
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "minReadLen")) == 0 ) {
+            rc = KMDataNodeWriteB32(nd, &minReadLen);
+            KMDataNodeRelease(nd);
+        }
+        if( rc == 0 && (rc = KMDataNodeOpenNodeUpdate(opt, &nd, "qualityOffset")) == 0 ) {
+            rc = KMDataNodeWriteB16(nd, &qualityOffset);
+            KMDataNodeRelease(nd);
+        }
+        KMDataNodeRelease(opt);
+    }
+    FastqReaderWhack(reader);
+    return rc;
+}
+
+static
+rc_t MakeIndexes(const SRATable* stbl, KTable* ktbl, KMetadata* meta)
+{
+    rc_t rc = 0;
+    int i;
+    char* buffer = NULL;
+    size_t buffer_sz = g_file_block_sz * 100;
+
+    SIndexObj idx[] = {
+     /*  meta, file,        format,         index,          func,    file_size, buffer_sz, minSpotId, maxSpotId */
+        {NULL, "fastq",    "fastq",      "fuse-fastq",    Fastq_Idx,     0, 0, 0, 0},
+        {NULL, "sff",      "SFF",        "fuse-sff",      SFF_Idx,       0, 0, 0, 0},
+        {NULL, "fastq.gz", "fastq-gzip", "fuse-fastq-gz", FastqGzip_Idx, 0, 0, 0, 0},
+        {NULL, "sff.gz",   "SFF-gzip",   "fuse-sff-gz",   SFFGzip_Idx,   0, 0, 0, 0}
+    };
+
+    for(i = 0; rc == 0 && i < sizeof(idx) / sizeof(idx[0]); i++) {
+        KMDataNode* parent = NULL;
+        if( (rc = KMetadataOpenNodeUpdate(meta, &parent, "/FUSE")) == 0 ) {
+            KMDataNodeDropChild(parent, "root"); /* drop old stuff */
+            if( g_ungzip || strcmp(&idx[i].file[strlen(idx[i].file) - 3], ".gz") == 0 ) {
+                STSMSG(0, ("Preparing index %s", idx[i].index));
+                MD5StateInit(&idx[i].md5);
+                SLListInit(&idx[i].li);
+                KMDataNodeDropChild(parent, "%s.tmp", idx[i].file);
+                if( (rc = KMDataNodeOpenNodeUpdate(parent, &idx[i].meta, "%s.tmp", idx[i].file)) == 0 ) {
+                    if( idx[i].func != NULL ) {
+                        if( buffer == NULL ) {
+                            if( (buffer = malloc(buffer_sz)) == NULL ) {
+                                rc = RC(rcExe, rcIndex, rcConstructing, rcMemory, rcExhausted);
+                                break;
+                            }
+                        }
+                        rc = idx[i].func(stbl, &idx[i], buffer, buffer_sz);
+                        if( rc == 0 ) {
+                            MD5StateFinish(&idx[i].md5, idx[i].md5_digest);
+                            rc = CommitIndex(ktbl, idx[i].index, &idx[i].li);
+                        }
+                    }
+                    if( rc == 0 ) {
+                        rc = WriteFileMeta(&idx[i]);
+                    }
+                    KMDataNodeRelease(idx[i].meta);
+                }
+                if( GetRCState(rc) == rcUnsupported ) {
+                    KMDataNodeDropChild(parent, "%s", idx[i].file);
+                    PLOGERR(klogWarn, (klogWarn, rc, "Index $(i) is not supported for this table", PLOG_S(i), idx[i].index));
+                    rc = 0;
+                } else if( rc == 0 ) {
+                    char f[4096];
+                    strcpy(f, idx[i].file);
+                    strcat(f, ".tmp");
+                    KMDataNodeDropChild(parent, "%s", idx[i].file);
+                    rc = KMDataNodeRenameChild(parent, f, idx[i].file);
+                }
+            } else if( !g_ungzip ) {
+                KTableDropIndex(ktbl, idx[i].index);
+                KMDataNodeDropChild(parent, "%s", idx[i].file);
+            }
+            KMDataNodeDropChild(parent, "%s.tmp", idx[i].file);
+            KMDataNodeRelease(parent);
+        }
+        SLListWhack(&idx[i].li, WhackIndexData, NULL);
+    }
+    free(buffer);
+    return rc;
+}
+
+const char* blocksize_usage[] = {"Index block size", NULL};
+const char* accession_usage[] = {"Accession", NULL};
+
+/* this enum must have same order as MainArgs array below */
+enum OptDefIndex {
+    eopt_BlockSize = 0,
+    eopt_Accession,
+    eopt_DumpIndex,
+    eopt_noGzip
+};
+
+OptDef MainArgs[] =
+{
+    /* if you change order in this array, rearrange enum above accordingly! */
+    {"block-size", "b", NULL, blocksize_usage, 1, true, false},
+    {"accession", "a", NULL, accession_usage, 1, true, false},
+    {"hidden-dump", "d", NULL, NULL, 1, false, false},
+    {"hidden-nogzip", "g", NULL, NULL, 1, false, false}
+};
+const char* MainParams[] =
+{
+    /* if you change order in this array, rearrange enum above accordingly! */
+    "size",
+    "accession",
+    NULL,
+    NULL
+};
+const size_t MainArgsQty = sizeof(MainArgs) / sizeof(MainArgs[0]);
+
+const char UsageDefaultName[] = "sra-makeidx";
+
+rc_t CC UsageSummary (const char * name)
+{
+    return 0;
+}
+
+rc_t CC Usage(const Args* args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+    int i;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+
+    OUTMSG(( "\nUsage:\n\t%s [options] <table>\n\n", progname));
+
+    for(i = 0; i < MainArgsQty; i++ ) {
+        if( MainArgs[i].required && MainArgs[i].help ) {
+            HelpOptionLine(MainArgs[i].aliases, MainArgs[i].name, MainParams[i], MainArgs[i].help);
+        }
+    }
+    OUTMSG(("\nOptions:\n"));
+    for(i = 0; i < MainArgsQty; i++ ) {
+        if( !MainArgs[i].required && MainArgs[i].help ) {
+            HelpOptionLine(MainArgs[i].aliases, MainArgs[i].name, MainParams[i], MainArgs[i].help);
+        }
+    }
+    OUTMSG(("\n"));
+    HelpOptionsStandard();
+    HelpVersion(fullpath, KAppVersion());
+    return rc;
+}
+rc_t KMain(int argc, char *argv[])
+{
+    rc_t rc = 0;
+    Args* args = NULL;
+    const char* errmsg = NULL, *table_dir = NULL;
+    char accn[1024];
+    
+    if( (rc = ArgsMakeAndHandle(&args, argc, argv, 1, MainArgs, MainArgsQty)) == 0 ) {
+        const char* blksz = NULL;
+        uint32_t count, dump = 0, gzip = 0;
+
+        if( (rc = ArgsParamCount(args, &count)) != 0 || count != 1 ) {
+            rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, count > 1 ? rcExcessive : rcInsufficient);
+            errmsg = "table";
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_BlockSize].name, &count)) != 0 || count > 1 ) {
+            rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+            errmsg = MainArgs[eopt_BlockSize].name;
+        } else if( count > 0 && (rc = ArgsOptionValue(args, MainArgs[eopt_BlockSize].name, 0, (const void **)&blksz)) != 0 ) {
+            errmsg = MainArgs[eopt_BlockSize].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_Accession].name, &count)) != 0 || count > 1 ) {
+            rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+            errmsg = MainArgs[eopt_Accession].name;
+        } else if( count > 0 && (rc = ArgsOptionValue(args, MainArgs[eopt_Accession].name, 0, (const void **)&g_accession)) != 0 ) {
+            errmsg = MainArgs[eopt_Accession].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_DumpIndex].name, &dump)) != 0 ) {
+            errmsg = MainArgs[eopt_DumpIndex].name;
+
+        } else if( (rc = ArgsOptionCount(args, MainArgs[eopt_noGzip].name, &gzip)) != 0 ) {
+            errmsg = MainArgs[eopt_noGzip].name;
+        }
+        while( rc == 0 ) {
+            long val = 0;
+            char* end = NULL;
+
+            if( blksz != NULL ) {
+                errno = 0;
+                val = strtol(blksz, &end, 10);
+                if( errno != 0 || blksz == end || *end != '\0' || val <= 0 ) {
+                    rc = RC(rcExe, rcArgv, rcReading, rcParam, rcInvalid);
+                    errmsg = MainArgs[eopt_BlockSize].name;
+                    break;
+                } else if( val <= 128 || val > (1024 * 1024 * 1024) ) {
+                    rc = RC(rcExe, rcArgv, rcValidating, rcParam, rcEmpty);
+                    errmsg = "block size invalid";
+                    break;
+                }
+                g_file_block_sz = val;
+            }
+            if( (rc = ArgsParamValue(args, 0, (const void **)&table_dir)) != 0 ) {
+                errmsg = "table";
+                break;
+            }
+            if( g_accession == NULL ) {
+                const char* p = strchr(table_dir, '/');
+                size_t l = 0;
+
+                g_accession = accn;
+                if( p == NULL ) {
+                    p = strchr(table_dir, '\\');
+                }
+                strncpy(accn, p == NULL ? table_dir : p + 1, sizeof(accn) - 1);
+                if( accn[0] == '\0' ) {
+                    rc = RC(rcExe, rcArgv, rcValidating, rcParam, rcEmpty);
+                    errmsg = "accession";
+                }
+                l = strlen(accn);
+                if( accn[l - 1] == '/' || accn[l - 1] == '\\') {
+                    accn[--l] = '\0';
+                }
+                if( strncmp(&accn[l - 9], ".lite.sra", 9) == 0 ) {
+                    accn[l - 9] = '\0';
+                } else if( strncmp(&accn[l - 4], ".sra", 4) == 0 ) {
+                    accn[l - 4] = '\0';
+                }
+            }
+            g_dump = dump > 0;
+            g_ungzip = gzip > 0;
+            break;
+        }
+    }
+    if( rc == 0 ) {
+        SRAMgr* smgr = NULL;
+        KDBManager* kmgr = NULL;
+
+        DEBUG_MSG(5, ("table %s, accession %s\n", table_dir, g_accession));
+        if( (rc = SRAMgrMakeUpdate(&smgr, NULL)) == 0 ) {
+            if( (rc = KDBManagerMakeUpdate(&kmgr, NULL)) == 0 ) {
+                bool relock = true;
+                if( (rc = KDBManagerUnlock(kmgr, table_dir)) != 0 ) {
+                    relock = false;
+                    rc = GetRCState(rc) == rcUnlocked ? 0 : rc;
+                } else {
+                    PLOGMSG(klogInfo, (klogInfo, "Table $(p) locked, unlocking", PLOG_S(p), table_dir));
+                }
+                if( rc == 0 ) {
+                    KTable* ktbl = NULL;
+                    if( (rc = KDBManagerOpenTableUpdate(kmgr, &ktbl, table_dir)) == 0 ) {
+                        KMetadata* meta = NULL;
+                        if( (rc = KTableOpenMetadataUpdate(ktbl, &meta)) == 0 ) {
+                            const SRATable* stbl = NULL;
+                            if( (rc = SRAMgrOpenTableRead(smgr, &stbl, table_dir)) == 0 ) {
+                                rc = MakeIndexes(stbl, ktbl, meta);
+                                SRATableRelease(stbl);
+                            }
+                        }
+                        KMetadataRelease(meta);
+                    }
+                    KTableRelease(ktbl);
+                }
+                if( rc == 0 && relock ) {
+                    rc = KDBManagerLock(kmgr, table_dir);
+                }
+                KDBManagerRelease(kmgr);
+            }
+            SRAMgrRelease(smgr);
+        }
+    }
+    if( rc != 0 && rc != KLogLastErrorCode() ) {
+        if( errmsg ) {
+            Usage(args);
+        }
+        LOGERR(klogErr, rc, errmsg ? errmsg : "stop");
+    }
+    ArgsWhack(args);
+    return rc;
+}
diff --git a/tools/fuse/sra-node.c b/tools/fuse/sra-node.c
new file mode 100644
index 0000000..e138ef3
--- /dev/null
+++ b/tools/fuse/sra-node.c
@@ -0,0 +1,165 @@
+/*===========================================================================
+ *
+ *                            Public DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ */
+#include <klib/rc.h>
+#include <kfs/directory.h>
+
+#include <sra/sradb-priv.h>
+
+typedef struct SRANode SRANode;
+#define FSNODE_IMPL SRANode
+
+#include "log.h"
+#include "xml.h"
+#include "sra-list.h"
+#include "formats.h"
+#include "kfile-accessor.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+struct SRANode {
+    FSNode node;
+    SRAConfigFlags flags;
+    const SRAListNode* sra;
+    const char* prefix;
+    size_t prefix_len;
+};
+
+static
+rc_t SRANode_HasChild(const SRANode* cself, const char* name, size_t name_len)
+{
+    rc_t rc = 0;
+
+    if( name == NULL || cself->prefix_len >= name_len || strncmp(cself->prefix, name, cself->prefix_len) != 0 ) {
+        rc = RC(rcExe, rcSRA, rcSearching, rcDirEntry, rcNotFound);
+    } else {
+        const FileOptions* opt;
+        rc = SRAListNode_GetType(cself->sra, cself->flags, &name[cself->prefix_len], &opt);
+    }
+    return rc;
+}
+
+static
+rc_t SRANode_Attr(const SRANode* cself, const char* subpath, uint32_t* type, KTime_t* ts, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz)
+{
+    rc_t rc = 0;
+
+    if( subpath == NULL || strncmp(cself->prefix, subpath, cself->prefix_len) != 0 ) {
+        rc = RC(rcExe, rcSRA, rcEvaluating, rcDirEntry, rcInvalid);
+    } else {
+        const FileOptions* opt;
+        if( (rc = SRAListNode_GetType(cself->sra, cself->flags, &subpath[cself->prefix_len], &opt)) == 0 &&
+            (rc = SRAListNode_TableMTime(cself->sra, ts)) == 0 ) {
+            *type = kptFile;
+            *file_sz = opt->file_sz;
+        }
+    }
+    return rc;
+}
+
+static
+rc_t SRANode_Dir(const SRANode* cself, const char* subpath, FSNode_Dir_Visit func, void* data)
+{
+    if( subpath != NULL ) {
+        return RC(rcExe, rcDirectory, rcListing, rcDirEntry, rcInvalid);
+    }
+    return SRAListNode_ListFiles(cself->sra, cself->prefix, cself->flags, func, data);
+}
+
+static
+rc_t SRANode_Open(const SRANode* cself, const char* subpath, const SAccessor** accessor)
+{
+    rc_t rc = 0;
+
+    if( subpath == NULL || strncmp(cself->prefix, subpath, cself->prefix_len) != 0 ) {
+        rc = RC(rcExe, rcSRA, rcEvaluating, rcDirEntry, rcInvalid);
+    } else {
+        const FileOptions* opt;
+        if( (rc = SRAListNode_GetType(cself->sra, cself->flags, &subpath[cself->prefix_len], &opt)) == 0 ) {
+            const KFile* kf = NULL;
+            if( (rc = FileOptions_OpenFile(opt, cself->sra, &kf)) == 0 &&
+                (rc = KFileAccessor_Make(accessor, cself->prefix, kf)) != 0 ) {
+                ReleaseComplain(KFileRelease, kf);
+            }
+        }
+    }
+    if( rc != 0 ) {
+        SAccessor_Release(*accessor);
+        *accessor = NULL;
+    }
+    return rc;
+}
+
+static
+rc_t SRANode_Release(SRANode* self)
+{
+    if( self != NULL ) {
+        SRAListNode_Release(self->sra);
+    }
+    return 0;
+}
+
+static FSNode_vtbl SRANode_vtbl = {
+    sizeof(SRANode),
+    SRANode_HasChild,
+    NULL,
+    SRANode_Attr,
+    SRANode_Dir,
+    NULL,
+    SRANode_Open,
+    SRANode_Release
+};
+
+rc_t SRANode_Make(FSNode* parent, const char* prefix, const SRAListNode* sra, SRAConfigFlags flags)
+{
+    rc_t rc = 0;
+
+    if( parent == NULL || prefix == NULL || sra == NULL ) {
+        rc = RC(rcExe, rcNode, rcConstructing, rcParam, rcNull);
+    } else {
+        SRANode* ff = NULL;
+        char buf[128];
+
+        strcpy(buf, "SRA-");
+        strcat(buf, prefix);
+        DEBUG_MSG(8, ("Adding %s\n", buf));
+        if( (rc = FSNode_Make((FSNode**)&ff, buf, &SRANode_vtbl)) == 0 ) {
+            ff->flags |= (flags & eSRAFuseFileArc) ? (eSRAFuseFmtArc | eSRAFuseFmtArcMD5) : 0;
+            ff->flags |= (flags & eSRAFuseFileArcLite) ? (eSRAFuseFmtArcLite | eSRAFuseFmtArcLiteMD5) : 0;
+            ff->flags |= (flags & eSRAFuseFileFastq) ? (eSRAFuseFmtFastq | eSRAFuseFmtFastqGz | eSRAFuseFmtFastqMD5) : 0;
+            ff->flags |= (flags & eSRAFuseFileSFF) ? (eSRAFuseFmtSFF | eSRAFuseFmtSFFGz | eSRAFuseFmtSFFMD5) : 0;
+            ff->prefix = prefix;
+            ff->prefix_len = strlen(prefix);
+            if( (rc = SRAListNode_AddRef(sra)) == 0 ) {
+                ff->sra = sra;
+                rc = FSNode_AddChild(parent, &ff->node);
+            }
+            if( rc != 0 ) {
+                FSNode_Release(&ff->node);
+            }
+        }
+    }
+    return rc;
+}
diff --git a/tools/fuse/sra-node.h b/tools/fuse/sra-node.h
new file mode 100644
index 0000000..7ed2df8
--- /dev/null
+++ b/tools/fuse/sra-node.h
@@ -0,0 +1,34 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_sra_fuse_sra_node_
+#define _h_sra_fuse_sra_node_
+
+#include "node.h"
+
+rc_t SRANode_Make(FSNode* parent, const char* prefix, const SRAListNode* sra, SRAConfigFlags flags);
+
+#endif /* _h_sra_fuse_sra_node_ */
diff --git a/tools/fuse/sra-sff.c b/tools/fuse/sra-sff.c
new file mode 100644
index 0000000..bdf8a2d
--- /dev/null
+++ b/tools/fuse/sra-sff.c
@@ -0,0 +1,249 @@
+/*===========================================================================
+ *
+ *                            Public DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ */
+#include <klib/rc.h>
+#include <kfs/file.h>
+#include <kproc/lock.h>
+#include <kdb/table.h>
+#include <kdb/index.h>
+
+#include <sra/sradb-priv.h>
+#include <sra/sff.h>
+
+#include "log.h"
+#include "xml.h"
+#include "sra-list.h"
+#include "sra-sff.h"
+#include "zlib-simple.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+typedef struct SRASFFFile SRASFFFile;
+#define KFILE_IMPL SRASFFFile
+#include <kfs/impl.h>
+
+struct SRASFFFile {
+    KFile dad;
+    uint32_t buffer_sz;
+    uint64_t file_sz;
+    char* gzipped; /* serves as flag and a buffer */
+    KLock* lock;
+    const SRATable* stbl;
+    const KTable* ktbl;
+    const KIndex* kidx;
+    const SFFReader* reader;
+    /* current buf content */
+    uint64_t from;
+    uint64_t size;
+    char* buf;
+};
+
+static
+rc_t SRASFFFile_Destroy(SRASFFFile *self)
+{
+    if( KLockAcquire(self->lock) == 0 ) {
+        ReleaseComplain(SFFReaderWhack, self->reader);
+        ReleaseComplain(KIndexRelease, self->kidx);
+        ReleaseComplain(KTableRelease, self->ktbl);
+        ReleaseComplain(SRATableRelease, self->stbl);
+        FREE(self->buf < self->gzipped ? self->buf : self->gzipped);
+        ReleaseComplain(KLockUnlock, self->lock);
+        ReleaseComplain(KLockRelease, self->lock);
+        FREE(self);
+    }
+    return 0;
+}
+
+static
+struct KSysFile* SRASFFFile_GetSysFile(const SRASFFFile *self, uint64_t *offset)
+{
+    *offset = 0;
+    return NULL;
+}
+
+static
+rc_t SRASFFFile_RandomAccess(const SRASFFFile *self)
+{
+    return 0;
+}
+
+static
+uint32_t SRASFFFile_Type(const SRASFFFile *self)
+{
+    return kfdFile;
+}
+
+static
+rc_t SRASFFFile_Size(const SRASFFFile *self, uint64_t *size)
+{
+    *size = self->file_sz;
+    return 0;
+}
+
+static
+rc_t SRASFFFile_SetSize(SRASFFFile *self, uint64_t size)
+{
+    return RC(rcExe, rcFile, rcUpdating, rcInterface, rcUnsupported);
+}
+
+static
+rc_t SRASFFFile_Read(const SRASFFFile* self, uint64_t pos, void *buffer, size_t size, size_t *num_read)
+{
+    rc_t rc = 0;
+
+    if( pos >= self->file_sz ) {
+        *num_read = 0;
+    } else if( (rc = KLockAcquire(self->lock)) == 0 ) {
+        do {
+            if( pos < self->from || pos >= (self->from + self->size) ) {
+                int64_t id = 0;
+                uint64_t id_qty = 0;
+                DEBUG_MSG(8, ("Caching for pos %lu %lu bytes to go\n", pos, size - *num_read));
+                if( (rc = KIndexFindU64(self->kidx, pos, &((SRASFFFile*)self)->from, &((SRASFFFile*)self)->size, &id, &id_qty)) == 0 ) {
+                    DEBUG_MSG(10, ("Caching from %lu:%lu %lu bytes\n", self->from, self->from + self->size - 1, self->size));
+                    DEBUG_MSG(10, ("Caching spot &ld %lu spots\n", id, id_qty));
+                    if( (rc = SFFReaderSeekSpot(self->reader, id)) == 0 ) {
+                        size_t inbuf = 0, w = 0;
+                        char* b = self->buf;
+                        uint64_t left = self->buffer_sz;
+                        do {
+                            if( id == 1 ) {
+                                if( (rc = SFFReaderHeader(self->reader, 0, b, left, &w)) != 0 ) {
+                                    break;
+                                }
+                                b += w; left -= w; inbuf += w;
+                                DEBUG_MSG(10, ("SFF header cached %lu bytes\n", inbuf));
+                            }
+                            if( (rc = SFFReader_GetCurrentSpotData(self->reader, b, left, &w)) != 0 ) {
+                                break;
+                            }
+                            b += w; left -= w; inbuf += w; --id_qty;
+                            DEBUG_MSG(10, ("SFF spot %ld cached %u bytes\n", id, inbuf));
+                            id++;
+                        } while( id_qty > 0 && (rc = SFFReaderNextSpot(self->reader)) == 0);
+                        if( GetRCObject(rc) == rcRow && GetRCState(rc) == rcExhausted ) {
+                            DEBUG_MSG(10, ("No more rows\n"));
+                            rc = 0;
+                        }
+                        DEBUG_MSG(8, ("Cached %u bytes\n", inbuf));
+                        if( self->gzipped != NULL ) {
+                            size_t compressed = 0;
+                            if( (rc = ZLib_DeflateBlock(self->buf, inbuf, self->gzipped, self->buffer_sz, &compressed)) == 0 ) {
+                                char* b = self->buf;
+                                ((SRASFFFile*)self)->buf = self->gzipped;
+                                ((SRASFFFile*)self)->gzipped = b;
+                                ((SRASFFFile*)self)->size = compressed;
+                                DEBUG_MSG(8, ("gzipped %lu bytes\n", self->size));
+                            }
+                        }
+                    }
+                }
+            }
+            if( rc == 0 ) {
+                off_t from = pos - self->from;
+                size_t q = (self->size - from) > (size - *num_read) ? (size - *num_read) : (self->size - from);
+                DEBUG_MSG(10, ("Copying from %lu %u bytes\n", from, q));
+                memcpy(&((char*)buffer)[*num_read], &self->buf[from], q);
+                *num_read = *num_read + q;
+                pos += q;
+            }
+        } while( rc == 0 && *num_read < size && pos < self->file_sz );
+        ReleaseComplain(KLockUnlock, self->lock);
+    }
+    return rc;
+}
+
+static
+rc_t SRASFFFile_Write(SRASFFFile *self, uint64_t pos, const void *buffer, size_t size, size_t *num_writ)
+{
+    return RC(rcExe, rcFile, rcWriting, rcInterface, rcUnsupported);
+}
+
+static KFile_vt_v1 SRASFFFile_vtbl = {
+    1, 1,
+    SRASFFFile_Destroy,
+    SRASFFFile_GetSysFile,
+    SRASFFFile_RandomAccess,
+    SRASFFFile_Size,
+    SRASFFFile_SetSize,
+    SRASFFFile_Read,
+    SRASFFFile_Write,
+    SRASFFFile_Type
+};
+
+rc_t SRASFFFile_Open(const KFile** cself, const SRAListNode* sra, const FileOptions* opt)
+{
+    rc_t rc = 0;
+    SRASFFFile* self;
+
+    CALLOC( self, 1, sizeof( *self ) );
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcFile, rcConstructing, rcMemory, rcExhausted );
+    }
+    else
+    {
+        if ( ( rc = KFileInit(&self->dad, (const KFile_vt*)&SRASFFFile_vtbl, "SRASFFFile", "no-name", true, false ) ) == 0 )
+        {
+            if ( ( rc = SRAListNode_TableOpen( sra, &self->stbl ) ) == 0 )
+            {
+                if ( ( rc = SRATableGetKTableRead( self->stbl, &self->ktbl ) ) == 0 )
+                {
+                    if ( ( rc = KTableOpenIndexRead( self->ktbl, &self->kidx, opt->index ) ) == 0 )
+                    {
+                        if ( ( rc = KLockMake( &self->lock ) ) == 0 )
+                        {
+                            MALLOC( self->buf, opt->buffer_sz * ( opt->f.sff.gzip ? 2 : 1 ) );
+                            if ( self->buf == NULL )
+                            {
+                                rc = RC( rcExe, rcFile, rcOpening, rcMemory, rcExhausted );
+                            }
+                            else
+                            {
+                                self->file_sz = opt->file_sz;
+                                self->buffer_sz = opt->buffer_sz;
+                                if ( opt->f.sff.gzip )
+                                {
+                                    self->gzipped = &self->buf[ opt->buffer_sz ];
+                                }
+                                self->from = ~0; /* reset position beyond file end */
+                                rc = SFFReaderMake( &self->reader, self->stbl, opt->f.sff.accession, opt->f.sff.minSpotId, opt->f.sff.maxSpotId );
+                            }
+                        }
+                    }
+                }
+            }
+            if ( rc == 0 )
+            {
+                *cself = &self->dad;
+            }
+            else
+            {
+                KFileRelease( &self->dad );
+            }
+        }
+    }
+    return rc;
+}
diff --git a/tools/fuse/sra-sff.h b/tools/fuse/sra-sff.h
new file mode 100644
index 0000000..0c00e60
--- /dev/null
+++ b/tools/fuse/sra-sff.h
@@ -0,0 +1,34 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_sra_fuse_sra_sff_
+#define _h_sra_fuse_sra_sff_
+
+#include "node.h"
+
+rc_t SRASFFFile_Open(const KFile** cself, const SRAListNode* sra, const FileOptions* opt);
+
+#endif /* _h_sra_fuse_sra_sff_ */
diff --git a/tools/fuse/tar-file.c b/tools/fuse/tar-file.c
new file mode 100644
index 0000000..df7fc6b
--- /dev/null
+++ b/tools/fuse/tar-file.c
@@ -0,0 +1,127 @@
+/*===========================================================================
+ *
+ *                            Public DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ */
+#include <kfs/file.h>
+
+#include <stdlib.h>
+
+#include "log.h"
+#include "tar-list.h"
+#include "tar-file.h"
+
+typedef struct TarFile TarFile;
+#define KFILE_IMPL TarFile
+#include <kfs/impl.h>
+
+struct TarFile {
+    KFile dad;
+    const TarFileList* list;
+};
+
+static
+rc_t TarFile_Destroy(TarFile *self)
+{
+    TarFileList_Release(self->list);
+    FREE(self);
+    return 0;
+}
+
+static
+struct KSysFile* TarFile_GetSysFile(const TarFile *self, uint64_t *offset)
+{
+    *offset = 0;
+    return NULL;
+}
+
+static
+rc_t TarFile_RandomAccess(const TarFile *self)
+{
+    return 0;
+}
+
+static
+uint32_t TarFile_Type(const TarFile *self)
+{
+    return kfdFile;
+}
+
+static
+rc_t TarFile_Size(const TarFile *self, uint64_t *size)
+{
+    return TarFileList_Size(self->list, size);
+}
+
+static
+rc_t TarFile_SetSize(TarFile *self, uint64_t size)
+{
+    return RC(rcExe, rcFile, rcUpdating, rcInterface, rcUnsupported);
+}
+
+static
+rc_t TarFile_Read(const TarFile* self, uint64_t pos, void *buffer, size_t size, size_t *num_read)
+{
+    return TarFileList_Read(self->list, pos, buffer, size, num_read);
+}
+
+static
+rc_t TarFile_Write(TarFile *self, uint64_t pos, const void *buffer, size_t size, size_t *num_writ)
+{
+    return RC(rcExe, rcFile, rcWriting, rcInterface, rcUnsupported);
+}
+
+static KFile_vt_v1 TarFile_vtbl = {
+    1, 1,
+    TarFile_Destroy,
+    TarFile_GetSysFile,
+    TarFile_RandomAccess,
+    TarFile_Size,
+    TarFile_SetSize,
+    TarFile_Read,
+    TarFile_Write,
+    TarFile_Type
+};
+
+rc_t TarFile_Open( const KFile** cself, const TarFileList* list )
+{
+    rc_t rc = 0;
+    TarFile* self;
+
+    CALLOC(self, 1, sizeof(*self));
+
+    if ( self == NULL )
+    {
+        rc = RC(rcExe, rcFile, rcConstructing, rcMemory, rcExhausted);
+    }
+    else if ( ( rc = KFileInit( &self->dad, (const KFile_vt*)&TarFile_vtbl, "TarFile", "no-name", true, false ) ) == 0 &&
+              ( rc = TarFileList_Open( list ) ) == 0 )
+    {
+        self->list = list;
+        *cself = &self->dad;
+    }
+    else
+    {
+        KFileRelease( &self->dad );
+    }
+    return rc;
+}
diff --git a/tools/fuse/tar-file.h b/tools/fuse/tar-file.h
new file mode 100644
index 0000000..b720161
--- /dev/null
+++ b/tools/fuse/tar-file.h
@@ -0,0 +1,33 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_tar_file_
+#define _h_sra_fuse_tar_file_
+
+#include "node.h"
+
+rc_t TarFile_Open(const KFile** cself, const TarFileList* list);
+
+#endif /* _h_sra_fuse_tar_file_ */
diff --git a/tools/fuse/tar-list.c b/tools/fuse/tar-list.c
new file mode 100644
index 0000000..a963f05
--- /dev/null
+++ b/tools/fuse/tar-list.c
@@ -0,0 +1,598 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <klib/rc.h>
+#include <klib/container.h>
+#include <klib/refcount.h>
+#include <kproc/lock.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+#include "log.h"
+#include "tar-list.h"
+
+#include <string.h>
+#include <stdlib.h>
+
+typedef enum ETar_Format {
+    eTar_Unknown = 0,
+    eTar_Legacy  = 1,
+    eTar_OldGNU  = 2,
+    eTar_Ustar   = 4,
+    eTar_Posix   = 5
+} ETar_Format;
+
+/* POSIX "ustar" tar archive member header */
+typedef struct SHeader {
+    char name[100];
+    char mode[8];
+    char uid[8];
+    char gid[8];
+    char size[12];
+    char mtime[12];
+    char checksum[8];
+    char typeflag[1];
+    char linkname[100];
+    char magic[6];
+    char version[2];
+    char uname[32];
+    char gname[32];
+    char devmajor[8];
+    char devminor[8];
+    union {
+        char prefix[155];    /* not valid with old GNU format */
+        struct {             /* old GNU format only */
+            char atime[12];
+            char ctime[12];
+        } gt;
+    } x;
+} SHeader;
+
+#define TAR_BLOCK_SIZE (512)
+#define TAR_TAIL_PAD (TAR_BLOCK_SIZE * 2)
+#define TAR_BLOCK_PAD (TAR_BLOCK_SIZE * 20)
+
+union TarBlock {
+    char buffer[TAR_BLOCK_SIZE];
+    SHeader header;
+};
+
+typedef struct TarEntry {
+    BSTNode node;
+    const char* path;
+    const char* name;
+    uint64_t size;
+    KTime_t mtime;
+    bool executable;
+    int16_t name_fmt; /* 0 - fits, +n - split, -n n-blocks */
+    /* file chunks offsets within archive */
+    /* file_header block(s) | file itself | padding to 512 block size */
+    uint64_t start, data, pad, end;
+} TarEntry;
+
+
+static
+void TarEntry_Init(const TarEntry* entry, uint64_t offset, const char* path, const char* name, uint64_t size, KTime_t mtime, bool executable)
+{
+    SHeader* h = NULL;
+    size_t nlen = strlen(name), alloc = 0;
+    TarEntry* e = (TarEntry*)entry;
+
+    e->name = name;
+    e->path = path;
+    e->size = size;
+    e->mtime = mtime;
+    e->executable = executable;
+
+    if(nlen <= sizeof(h->name)) {
+        /* Name fits! */
+        alloc = 1;
+        e->name_fmt = 0;
+    } else if( nlen <= sizeof(h->x.prefix) + 1 + sizeof(h->name) ) {
+        /* Try to split the long name into a prefix and a short name (POSIX) */
+        size_t split = nlen;
+        if(split > sizeof(h->x.prefix)) {
+            split = sizeof(h->x.prefix);
+        }
+        while(split > 0 && e->name[--split] != '/');
+        if(split && nlen - split <= sizeof(h->name) + 1) {
+            alloc = 1;
+            e->name_fmt = split;
+        }
+    }
+    if( alloc == 0 ) {
+        nlen++;
+        /* 2 pieces: 1st long file name header block + name block(s) and second actual file header block */
+        alloc = nlen / TAR_BLOCK_SIZE;
+        alloc += (nlen % TAR_BLOCK_SIZE) ? 1 : 0;
+        alloc += 2;
+        e->name_fmt = -alloc;
+    }
+    e->start = offset;
+    e->data = e->start + alloc * TAR_BLOCK_SIZE;
+    e->pad = e->data + e->size;
+    e->end = e->size % TAR_BLOCK_SIZE;
+    if( e->end != 0 ) {
+        e->end = e->pad + (TAR_BLOCK_SIZE - e->end) - 1;
+    } else {
+        e->end = e->pad - 1;
+    }
+}
+
+/* Convert a number to an octal string padded to the left
+   with [leading] zeros ('0') and having _no_ trailing '\0'. */
+static
+bool TarEntry_NumToOctal(unsigned long val, char* ptr, size_t len)
+{
+    do {
+        ptr[--len] = '0' + (char)(val & 7);
+        val >>= 3;
+    } while(len);
+    return val ? false : true;
+}
+
+static
+bool TarEntry_NumToBase256(uint64_t val, char* ptr, size_t len)
+{
+    do {
+        ptr[--len] = (unsigned char)(val & 0xFF);
+        val >>= 8;
+    } while(len);
+    *ptr |= '\x80';  /* set base-256 encoding flag */
+    return val ? false : true;
+}
+
+
+/* Return 0 (false) if conversion failed; 1 if the value converted to
+   conventional octal representation (perhaps, with terminating '\0'
+   sacrificed), or -1 if the value converted using base-256. */
+static
+int TarEntry_EncodeUint64(uint64_t val, char* ptr, size_t len)
+{
+    if((unsigned long) val == val) {
+        /* Max file size: */
+        if(TarEntry_NumToOctal((unsigned long) val, ptr, len)) {
+            /* 8GB - 1 */
+            return 1;
+        }
+        if(TarEntry_NumToOctal((unsigned long) val, ptr, ++len)) {
+            /* 64GB - 1  */
+            return 1;
+        }
+    }
+    if(TarEntry_NumToBase256(val, ptr, len)) {
+        /* up to 2^94-1  */
+        return -1;
+    }
+    return 0;
+}
+
+static
+bool TarEntry_TarChecksum(TarBlock* block, bool isgnu)
+{
+    SHeader* h = &block->header;
+    size_t i, len = sizeof(h->checksum) - (isgnu ? 2 : 1);
+    unsigned long checksum = 0;
+    const unsigned char* p = (const unsigned char*)block->buffer;
+
+    /* Compute the checksum */
+    memset(h->checksum, ' ', sizeof(h->checksum));
+    for(i = 0; i < sizeof(block->buffer); i++) {
+        checksum += *p++;
+    }
+    /* ustar: '\0'-terminated checksum
+       GNU special: 6 digits, then '\0', then a space [already in place] */
+    if(!TarEntry_NumToOctal(checksum, h->checksum, len)) {
+        return false;
+    }
+    h->checksum[len] = '\0';
+    return true;
+}
+
+static
+rc_t TarEntry_PackName(const TarEntry* e, TarBlock* block)
+{
+    SHeader* h = &block[0].header;
+
+    if( e->name_fmt == 0 ) {
+        strcpy(h->name, e->name);
+    } else if( e->name_fmt > 0 ) {
+        /* to split the long name into a prefix and a short name (POSIX) */
+        memcpy(h->x.prefix, e->name, e->name_fmt);
+        memcpy(h->name, e->name + e->name_fmt + 1, strlen(e->name) - e->name_fmt - 1);
+    } else {
+        strcpy(h->name, "././@LongLink");
+        TarEntry_NumToOctal(0, h->mode, sizeof(h->mode) - 1);
+        TarEntry_NumToOctal(0, h->uid, sizeof(h->uid) - 1);
+        TarEntry_NumToOctal(0, h->gid, sizeof(h->gid) - 1);
+        /* write terminating '\0' as it can always be made to fit in */
+        if(!TarEntry_EncodeUint64(strlen(e->name) + 1, h->size, sizeof(h->size) - 1)) {
+            return RC(rcExe, rcArc, rcConstructing, rcId, rcOutofrange);
+        }
+        TarEntry_NumToOctal(0, h->mtime, sizeof(h->mtime)- 1);
+        h->typeflag[0] = 'L';
+        /* Old GNU magic protrudes into adjacent version field */
+        memcpy(h->magic, "ustar  ", 8); /* 2 spaces and '\0'-terminated */
+        TarEntry_TarChecksum(block, true);
+        strcpy((char*)(&block[1]), e->name);
+
+        /* Still, store the initial part in the original header */
+        h = &block[-e->name_fmt - 1].header;
+        memcpy(h->name, e->name, sizeof(h->name));
+    }
+    return 0;
+}
+
+static
+rc_t TarEntry_Header(const TarEntry* e, TarBlock* block)
+{
+    rc_t rc = 0;
+    /* Update format as we go */
+
+    ETar_Format fmt = eTar_Ustar;
+    int ok;
+    do {
+        uint32_t size =  e->name_fmt < 0 ? -e->name_fmt : 1;
+        SHeader* h = &block[size - 1].header;
+        memset(block, 0, sizeof(*block) * size);
+        if( (rc = TarEntry_PackName(e, block)) != 0 ) {
+            break;
+        }
+        if( !TarEntry_NumToOctal(e->executable ? 00755 : 00644, h->mode, sizeof(h->mode) - 1) ) {
+            rc = RC(rcExe, rcArc, rcConstructing, rcData, rcInvalid);
+            break;
+        }
+        TarEntry_EncodeUint64(0, h->uid, sizeof(h->uid) - 1);
+        TarEntry_EncodeUint64(0, h->gid, sizeof(h->gid) - 1);
+
+        ok = TarEntry_EncodeUint64(e->size, h->size, sizeof(h->size) - 1);
+        if(!ok) {
+            rc = RC(rcExe, rcArc, rcConstructing, rcFile, rcTooBig);
+            break;
+        }
+        if(ok < 0) {
+            fmt = eTar_OldGNU;
+        }
+        if(fmt != eTar_Ustar && h->x.prefix[0]) {
+            /* cannot downgrade to reflect encoding */
+            fmt  = eTar_Ustar;
+        }
+        /* Modification time */
+        if (!TarEntry_NumToOctal(e->mtime, h->mtime, sizeof(h->mtime) - 1)) {
+            rc = RC(rcExe, rcArc, rcConstructing, rcId, rcOutofrange);
+            break;
+        }
+        /* limited version: expect only normal files !!! */
+        h->typeflag[0] = '0';
+        /* User and group */
+        memcpy(h->uname, "anyone", 6);
+        /* memcpy(h->gname, "?????", 5); */
+
+        /* Device nos to complete the ustar header protocol (all fields ok) */
+        if( fmt != eTar_OldGNU ) {
+            TarEntry_NumToOctal(0, h->devmajor, sizeof(h->devmajor) - 1);
+            TarEntry_NumToOctal(0, h->devminor, sizeof(h->devminor) - 1);
+        }
+        if(fmt != eTar_OldGNU) {
+            /* Magic */
+            strcpy(h->magic, "ustar");
+            /* Version (EXCEPTION:  not '\0' terminated) */
+            memcpy(h->version, "00", 2);
+        } else {
+            /* Old GNU magic protrudes into adjacent version field */
+            memcpy(h->magic, "ustar  ", 8); /* 2 spaces and '\0'-terminated */
+        }
+
+        if( !TarEntry_TarChecksum(&block[size - 1], fmt == eTar_OldGNU ? true : false) ) {
+            rc = RC(rcExe, rcArc, rcConstructing, rcId, rcOutofrange);
+        }
+    } while(false);
+    return rc;
+}
+
+static
+rc_t TarEntry_Read(const TarEntry* entry, TarBlock* header_buf, const KFile* kfile, uint64_t pos, uint8_t* buffer, const size_t size, size_t* num_read)
+{
+    rc_t rc = 0;
+
+    if( pos < entry->data ) {
+        /* insert tar header */
+        if( (rc = TarEntry_Header(entry, header_buf)) == 0 ) {
+            size_t q = entry->data - pos;
+            if( q > (size - *num_read) ) {
+                q = size - *num_read;
+            }
+            memcpy(&buffer[*num_read], &header_buf->buffer[pos - entry->start], q);
+            *num_read = *num_read + q;
+            pos += q;
+            DEBUG_LINE(8, "header: %u bytes", q);
+        }
+    }
+    if( rc == 0 && *num_read < size && pos < entry->pad ) {
+        /* read file data */
+        size_t rd;
+        if( (rc = KFileRead(kfile, pos - entry->data, &buffer[*num_read], size - *num_read, &rd)) == 0 ) {
+            DEBUG_LINE(8, "file: from %lu %u bytes", pos - entry->data, rd);
+            *num_read = *num_read + rd;
+            pos += rd;
+        }
+    }
+    if( rc == 0 && *num_read < size && pos <= entry->end ) {
+        /* pad last block with 0 */
+        size_t q = entry->end - pos + 1;
+        if( q > (size - *num_read) ) {
+            q = size - *num_read;
+        }
+        memset(&buffer[*num_read], 0, q);
+        *num_read = *num_read + q;
+        DEBUG_LINE(8, "padding: %u bytes", q);
+    }
+    return rc;
+}
+
+struct TarFileList {
+    KRefcount refcount;
+    const TarEntry* files;
+    uint32_t count;
+    uint32_t max_count;
+    uint64_t tar_sz;
+    uint16_t tar_10k_pad;
+    char* strings;
+    uint64_t strings_avail;
+    /* used to setup cache in file */
+    uint16_t max_header_blocks;
+    /* current file data/cache */
+    KLock* lock;
+    BSTree btree;
+    TarBlock* header_buf;
+    const TarEntry* cur_entry;
+    const KFile* cur_file;
+};
+
+rc_t TarFileList_Make(const TarFileList** cself, uint32_t max_file_count, const char* name)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || max_file_count == 0 ) {
+        rc = RC(rcExe, rcArc, rcConstructing, rcParam, rcInvalid);
+    } else {
+        TarFileList* l = NULL;
+        uint64_t strings_sz = max_file_count * 2048;
+        *cself = NULL;
+        CALLOC(l, 1, sizeof(*l) + max_file_count * sizeof(*(l->files)) + strings_sz);
+        if( l == NULL ) {
+            /* allocate self + array of entries + 1024 for path and name */
+            rc = RC(rcExe, rcArc, rcConstructing, rcMemory, rcExhausted);
+        } else if( (rc = KLockMake(&l->lock)) == 0 ) {
+            KRefcountInit(&l->refcount, 1, "TarFileList", "Make", name);
+            l->max_count = max_file_count;
+            l->tar_sz = TAR_TAIL_PAD;
+            l->files = (TarEntry*)&l[1]; /* files array follows self */
+            l->strings_avail = strings_sz;
+            l->strings = (char*)&l->files[l->max_count]; /* string table follows last entry */
+            l->max_header_blocks = 1;
+            *cself = l;
+        }
+    }
+    return rc;
+}
+
+void TarFileList_Release(const TarFileList* cself)
+{
+    if( cself != NULL ) {
+        TarFileList* self = (TarFileList*)cself;
+        if( KLockAcquire(self->lock) == 0 ) {
+            int x = KRefcountDropDep(&self->refcount, "TarFileList");
+            if( atomic32_read(&self->refcount) < 2 ) {
+                self->cur_entry = NULL;
+                ReleaseComplain(KFileRelease, self->cur_file);
+                self->cur_file = NULL;
+            }
+            if( x == krefWhack ) {
+                KRefcountWhack(&self->refcount, "TarFileList");
+                FREE(self->header_buf);
+                BSTreeWhack(&self->btree, NULL, NULL);
+                ReleaseComplain(KLockUnlock, self->lock);
+                ReleaseComplain(KLockRelease, self->lock);
+                FREE(self);
+            } else {
+                ReleaseComplain(KLockUnlock, self->lock);
+            }
+        }
+    }
+}
+
+rc_t TarFileList_Add(const TarFileList* cself, const char* path, const char* name, uint64_t size, KTime_t mtime, bool executable)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || path == NULL || name == NULL ) {
+        rc = RC(rcExe, rcArc, rcRegistering, rcParam, rcInvalid);
+    } else if( (rc = KLockAcquire(cself->lock)) == 0 ) {
+        if( cself->count >= cself->max_count ) {
+            rc = RC(rcExe, rcArc, rcRegistering, rcDirEntry, rcExcessive);
+        } else if( cself->header_buf != NULL ) {
+            rc = RC(rcExe, rcArc, rcRegistering, rcDirEntry, rcReadonly);
+        } else {
+            TarFileList* self = (TarFileList*)cself;
+            size_t lp = strlen(path) + 1, ln = strlen(name) + 1;
+
+            if( lp + ln  >= cself->strings_avail ) {
+                rc = RC(rcExe, rcArc, rcRegistering, rcName, rcExcessive);
+            } else {
+                const TarEntry* e = &cself->files[cself->count];
+
+                /* copy path/name to internal buffer */
+                strncpy(cself->strings, path, lp);
+                path = cself->strings;
+                self->strings += lp;
+                self->strings_avail -= lp;
+                strncpy(cself->strings, name, ln);
+                name = cself->strings;
+                self->strings += ln;
+                self->strings_avail -= ln;
+
+                TarEntry_Init(e, cself->tar_sz - TAR_TAIL_PAD, path, name, size, mtime, executable);
+                self->tar_sz += e->end - e->start + 1;
+                self->tar_10k_pad = self->tar_sz % TAR_BLOCK_PAD;
+                if( self->tar_10k_pad != 0 ) {
+                    self->tar_10k_pad = TAR_BLOCK_PAD - self->tar_10k_pad;
+                }
+                if( e->name_fmt < 0 && cself->max_header_blocks < -e->name_fmt ) {
+                    self->max_header_blocks = -e->name_fmt;
+                }
+                self->count++;
+            }
+        }
+        ReleaseComplain(KLockUnlock, cself->lock);
+    }
+    return rc;
+}
+
+rc_t TarFileList_Size(const TarFileList* cself, uint64_t* file_sz)
+{
+    if( cself == NULL || file_sz == NULL ) {
+        return RC(rcExe, rcArc, rcAccessing, rcParam, rcInvalid);
+    }
+    *file_sz = cself->tar_sz + cself->tar_10k_pad;
+    return 0;
+}
+
+static
+int64_t TarFileList_Sort(const BSTNode *item, const BSTNode *node)
+{
+    const TarEntry* i = (const TarEntry*)item;
+    const TarEntry* n = (const TarEntry*)node;
+
+    if( i->start > n->end ) {
+        return 1;
+    } else if( i->end < n->start ) {
+        return -1;
+    }
+    /* fails on insert! */
+    return 0;
+}
+
+rc_t TarFileList_Open(const TarFileList* cself)
+{
+    rc_t rc = 0;
+    if( cself == NULL ) {
+        rc = RC(rcExe, rcArc, rcOpening, rcParam, rcInvalid);
+    } else if( (rc = KLockAcquire(cself->lock)) == 0 ) {
+        TarFileList* self = (TarFileList*)cself;
+        if( self->header_buf == NULL ) {
+            MALLOC(self->header_buf, self->max_header_blocks * TAR_BLOCK_SIZE);
+            if( self->header_buf == NULL ) {
+                rc = RC(rcExe, rcArc, rcOpening, rcMemory, rcExhausted);
+            } else {
+                /* build file offset search tree */
+                uint32_t i;
+                BSTreeInit(&self->btree);
+                /* adjust last file size to include archive-end of 2 512 blocks + 10k block padding */
+                ((TarEntry*)(self->files + self->count - 1))->end += TAR_TAIL_PAD + self->tar_10k_pad;
+                self->tar_sz += self->tar_10k_pad;
+                self->tar_10k_pad = 0;
+                for(i = 0; rc == 0 && i < self->count; i++) {
+                    rc = BSTreeInsertUnique(&self->btree, (BSTNode*)&self->files[i].node, NULL, TarFileList_Sort);
+                }
+            }
+        }
+        if( rc == 0 && KRefcountAddDep(&self->refcount, "TarFileList") != krefOkay ) {
+            rc = RC(rcExe, rcArc, rcOpening, rcRefcount, rcFailed);
+        }
+        ReleaseComplain(KLockUnlock, cself->lock);
+    }
+    return rc;
+}
+
+static
+int64_t TarFileList_Find(const void *item, const BSTNode *node)
+{
+    uint64_t pos = *(uint64_t*)item;
+    const TarEntry* n = (const TarEntry*)node;
+    if( pos < n->start ) {
+        return -1;
+    } else if( pos > n->end ) {
+        return 1;
+    }
+    return 0;
+}
+
+rc_t TarFileList_Read(const TarFileList* cself, uint64_t pos, uint8_t* buffer, size_t size, size_t* num_read)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL ) {
+        rc = RC(rcExe, rcArc, rcReading, rcParam, rcInvalid);
+    } else if( (rc = KLockAcquire(cself->lock)) == 0 ) {
+        *num_read = 0;
+        if( cself->header_buf == NULL ) {
+            rc = RC(rcExe, rcArc, rcReading, rcBuffer, rcNull);
+        } else if( pos < cself->tar_sz ) {
+            while( rc == 0 && *num_read < size && pos < cself->tar_sz ) {
+                if( cself->cur_entry == NULL || pos < cself->cur_entry->start || pos > cself->cur_entry->end ) {
+                    KFileRelease(cself->cur_file);
+                    ((TarFileList*)cself)->cur_entry = (const TarEntry*)BSTreeFind(&cself->btree, &pos, TarFileList_Find);
+                    if( cself->cur_entry != NULL ) {
+                        KDirectory* dir;
+                        DEBUG_LINE(8, "Open: '%s'", cself->cur_entry->path);
+                        if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+                            if( (rc = KDirectoryOpenFileRead(dir, &((TarFileList*)cself)->cur_file, "%s", cself->cur_entry->path)) == 0 ) {
+                                uint64_t size = 0;
+                                if( (rc = KFileSize(cself->cur_file, &size)) == 0 ) {
+                                    if( cself->cur_entry->size != size ) {
+                                        rc = RC(rcExe, rcArc, rcReading, rcFileDesc, rcInvalid);
+                                        PLOGERR(klogErr, (klogErr, rc, "Source file size differ in XML $(p)", PLOG_S(p), cself->cur_entry->path));
+                                    }
+                                }
+                            } else {
+                                PLOGERR(klogErr, (klogErr, rc, "$(p)", PLOG_S(p), cself->cur_entry->path));
+                            }
+                            ReleaseComplain(KDirectoryRelease, dir);
+                        }
+                    } else {
+                        rc = RC(rcExe, rcArc, rcReading, rcOffset, rcInvalid);
+                    }
+                }
+                if( rc == 0 ) {
+                    size_t rd = *num_read;
+                    DEBUG_LINE(8, "Reading: '%s'", cself->cur_entry->path);
+                    if( (rc = TarEntry_Read(cself->cur_entry, cself->header_buf, cself->cur_file, pos, buffer, size, num_read)) == 0 ) {
+                        DEBUG_LINE(8, "read: %u bytes", *num_read);
+                        pos += *num_read - rd;
+                    }
+                }
+            }
+        }
+        ReleaseComplain(KLockUnlock, cself->lock);
+#if _DEBUGGING
+        if( rc == 0 && size < *num_read ) {
+            PLOGERR(klogErr, (klogErr, RC(rcExe, rcArc, rcReading, rcData, rcTooLong),
+                "file $(f) at pos $(p): $(s) < $(n)", "p=%lu,s=%lu,n=%lu,f=%s", pos, size, *num_read, cself->cur_entry->path));
+        }
+#endif
+    }
+    return rc;
+}
diff --git a/tools/fuse/tar-list.h b/tools/fuse/tar-list.h
new file mode 100644
index 0000000..7fcfbea
--- /dev/null
+++ b/tools/fuse/tar-list.h
@@ -0,0 +1,49 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_tar_list_
+#define _h_sra_fuse_tar_list_
+
+#include <klib/rc.h>
+
+#define TAR_BLOCK_SIZE (512)
+
+typedef union TarBlock TarBlock;
+
+typedef struct TarFileList TarFileList;
+
+rc_t TarFileList_Make(const TarFileList** cself, uint32_t max_file_count, const char* name);
+
+void TarFileList_Release(const TarFileList* cself);
+
+rc_t TarFileList_Add(const TarFileList* cself, const char* path, const char* name, uint64_t size, KTime_t mtime, bool executable);
+
+rc_t TarFileList_Size(const TarFileList* cself, uint64_t* file_sz);
+
+rc_t TarFileList_Open(const TarFileList* cself);
+
+rc_t TarFileList_Read(const TarFileList* cself, uint64_t pos, uint8_t* buffer, size_t size, size_t* num_read);
+
+#endif /* _h_sra_fuse_tar_list_ */
diff --git a/tools/fuse/tar-node.c b/tools/fuse/tar-node.c
new file mode 100644
index 0000000..aff3fd1
--- /dev/null
+++ b/tools/fuse/tar-node.c
@@ -0,0 +1,320 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <klib/namelist.h>
+#include <klib/printf.h>
+#include <kxml/xml.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+typedef struct TarNode TarNode;
+#define FSNODE_IMPL TarNode
+
+#include "log.h"
+#include "xml.h"
+#include "tar-node.h"
+#include "tar-list.h"
+#include "tar-file.h"
+#include "kfile-accessor.h"
+
+#include <string.h>
+#include <stdlib.h>
+#include <time.h>
+
+struct TarNode {
+    FSNode node;
+    const TarFileList* files;
+    const char* rel_path;
+    /* used only in case of auto-detected .tar.xml file */
+    KTime_t mtime;
+    const char* xml_path;
+};
+
+static
+rc_t TarNode_MakeFileList(const KXMLNode* xml_node, const TarFileList** files, char* errmsg, const char* rel_path, const char* name)
+{
+    rc_t rc = 0;
+    time_t now = time(NULL);
+    uint32_t count = 0;
+
+    *files = NULL;
+    if( (rc = KXMLNodeCountChildNodes(xml_node, &count)) == 0 ) {
+        if( count == 0 ) {
+            rc = RC(rcExe, rcDoc, rcValidating, rcData, rcEmpty);
+        } else if( (rc = TarFileList_Make(files, count, name)) == 0 ) {
+            uint32_t i = 0;
+            while(rc == 0 && i < count) {
+                const KXMLNode* n = NULL;
+                const char* n_name;
+                if( (rc = KXMLNodeGetNodeRead(xml_node, &n, i++)) == 0 && (rc = KXMLNodeElementName(n, &n_name)) == 0 ) {
+                    if( strcmp(n_name, "Item") != 0 ) {
+                        rc = RC(rcExe, rcDoc, rcValidating, rcNode, rcUnexpected);
+                        strcpy(errmsg, n_name);
+                    } else {
+                        size_t sz_read;
+                        char path[4096], name[4096];
+                        KTime_t ts = now;
+                        uint64_t fsz = 0;
+                        bool exec = false;
+
+                        if( (rc = KXMLNodeReadAttrCString(n, "path", name, sizeof(name), &sz_read)) == 0 ) {
+                            if( name[0] == '\0' ) {
+                                rc = RC(rcExe, rcDoc, rcValidating, rcAttr, rcEmpty);
+                            } else if( name[0] == '/' ) {
+                                memcpy(path, name, sz_read + 1);
+                            } else {
+                                KDirectory* dir = NULL;
+                                if( (rc = KDirectoryNativeDir(&dir)) == 0 &&
+                                    (rc = KDirectoryResolvePath(dir, true, path, sizeof(path), "%s/%s", rel_path, name)) == 0 ) {
+                                    DEBUG_LINE(8, "%s/%s resolved to %s", rel_path, name, path);
+                                }
+                                KDirectoryRelease(dir);
+                            }
+                            if( rc != 0 ) {
+                                strcpy(errmsg, "TAR/Item/@path");
+                            }
+                        }
+                        if( rc == 0 && (rc = XML_ParseTimestamp(n, "timestamp", &ts, true)) != 0 ) {
+                            strcpy(errmsg, "TAR/Item/@timestamp");
+                        }
+                        if( rc == 0 && (rc = XML_ParseBool(n, "executable", &exec, true)) != 0 ) {
+                            strcpy(errmsg, "TAR/Item/@executable");
+                        }
+                        if( rc == 0 && (rc = KXMLNodeReadAttrAsU64(n, "size", &fsz)) != 0 ) {
+                            strcpy(errmsg, "TAR/Item/@size");
+                        }
+                        if( rc == 0 ) {
+                            name[0] = '\0';
+                            rc = KXMLNodeReadAttrCString(n, "name", name, sizeof(name), &sz_read);
+                            if( (GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) || name[0] == '\0' ) {
+                                char* x = strrchr(path, '/');
+                                strcpy(name, x ? x + 1 : path);
+                                rc = 0;
+                            } else if( rc == 0 && name[0] == '/' ) {
+                                strcat(errmsg, "Item/@name cannot be absolute");
+                                rc = RC(rcExe, rcDoc, rcValidating, rcName, rcInvalid);
+                            } else if( rc != 0 ) {
+                                strcpy(errmsg, "Item/@name");
+                            }
+                        }
+                        if( rc == 0 ) {
+                            const KNamelist* attr = NULL;
+                            if( (rc = KXMLNodeListAttr(n, &attr)) == 0 ) {
+                                uint32_t j = 0, count = 0;
+                                if( (rc = KNamelistCount(attr, &count)) == 0 && count > 0 ) {
+                                    while( rc == 0 && j < count ) {
+                                        const char *attr_nm = NULL;
+                                        if( (rc = KNamelistGet(attr, j++, &attr_nm)) != 0 ) {
+                                            break;
+                                        }
+                                        if( strcmp("path", attr_nm) == 0 || strcmp("name", attr_nm) == 0 ||
+                                            strcmp("timestamp", attr_nm) == 0 || strcmp("size", attr_nm) == 0 ||
+                                            strcmp("executable", attr_nm) == 0 ) {
+                                            continue;
+                                        }
+                                        rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+                                        strcpy(errmsg, "unknown attribute TAR/Item/@");
+                                        strcat(errmsg, attr_nm);
+                                    }
+                                }
+                                ReleaseComplain(KNamelistRelease, attr);
+                            }
+                        }
+                        if( rc == 0 && (rc = TarFileList_Add(*files, path, name, fsz, ts, exec)) != 0 ) {
+                            strcpy(errmsg, "adding to TAR");
+                        }
+                    }
+                    ReleaseComplain(KXMLNodeRelease, n);
+                }
+            }
+            if( rc != 0 ) {
+                TarFileList_Release(*files);
+                *files = NULL;
+            }
+        }
+    }
+    return rc;
+}
+
+static
+rc_t TarNode_Touch(const TarNode* cself)
+{
+    rc_t rc = 0;
+
+    if( cself->xml_path != NULL ) {
+        KDirectory* dir = NULL;
+        if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+            KTime_t dt;
+            if( (rc = KDirectoryDate(dir, &dt, "%s", cself->xml_path)) == 0 ) {
+                if( dt != cself->mtime ) {
+                    const KFile* kfile = NULL;
+                    DEBUG_MSG(8, ("%s: updating tar %s\n", __func__, cself->xml_path));
+                    if( (rc = KDirectoryOpenFileRead(dir, &kfile, "%s", cself->xml_path)) == 0 ) {
+                        const KXMLMgr* xmlmgr;
+                        if( (rc = XML_MgrGet(&xmlmgr)) == 0 ) {
+                            const KXMLDoc* xmldoc = NULL;
+                            if( (rc = KXMLMgrMakeDocRead(xmlmgr, &xmldoc, kfile)) == 0 ) {
+                                const KXMLNodeset* ns = NULL;
+                                if( (rc = KXMLDocOpenNodesetRead(xmldoc, &ns, "/TAR")) == 0 ) {
+                                    uint32_t count = 0;
+                                    if( (rc = KXMLNodesetCount(ns, &count)) == 0 ) {
+                                        if( count != 1 ) {
+                                            rc = RC(rcExe, rcDoc, rcValidating, rcData, rcInvalid);
+                                        } else {
+                                            const KXMLNode* n = NULL;
+                                            if( (rc = KXMLNodesetGetNodeRead(ns, &n, 0)) == 0 ) {
+                                                char errmsg[4096];
+                                                const TarFileList* new_files;
+                                                if( (rc = TarNode_MakeFileList(n, &new_files, errmsg, cself->rel_path, cself->node.name)) != 0 ) {
+                                                    LOGERR(klogErr, rc, errmsg);
+                                                } else {
+                                                    TarFileList_Release(cself->files);
+                                                    ((TarNode*)cself)->files = new_files;
+                                                    ((TarNode*)cself)->mtime = dt;
+                                                }
+                                                ReleaseComplain(KXMLNodeRelease, n);
+                                            }
+                                        }
+                                    }
+                                    ReleaseComplain(KXMLNodesetRelease, ns);
+                                }
+                                ReleaseComplain(KXMLDocRelease, xmldoc);
+                            }
+                        }
+                        ReleaseComplain(KFileRelease, kfile);
+                    }
+                }
+            }
+            ReleaseComplain(KDirectoryRelease, dir);
+        }
+    }
+    return rc;
+}
+
+static
+rc_t TarNode_Attr(const TarNode* cself, const char* subpath, uint32_t* type, KTime_t* ts, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz)
+{
+    rc_t rc = 0;
+
+    if( subpath != NULL ) {
+        rc = RC(rcExe, rcFile, rcEvaluating, rcDirEntry, rcNotFound);
+    } else {
+        *type = kptFile;
+        rc = TarFileList_Size(cself->files, file_sz);
+        if( cself->xml_path != NULL ) {
+            *ts = cself->mtime;
+        }
+    }
+    return rc;
+}
+
+static
+rc_t TarNode_Open(const TarNode* cself, const char* subpath, const SAccessor** accessor)
+{
+    rc_t rc = 0;
+
+    if( subpath != NULL ) {
+        rc = RC(rcExe, rcFile, rcOpening, rcDirEntry, rcNotFound);
+    } else {
+        const KFile* kf = NULL;
+        if( (rc = TarFile_Open(&kf, cself->files)) == 0 ) {
+            if( (rc = KFileAccessor_Make(accessor, cself->node.name, kf)) != 0 ) {
+                ReleaseComplain(KFileRelease, kf);
+            }
+        }
+    }
+    if( rc != 0 ) {
+        SAccessor_Release(*accessor);
+        *accessor = NULL;
+    }
+    return rc;
+}
+
+static
+rc_t TarNode_Release(TarNode* self)
+{
+    if( self != NULL ) {
+        DEBUG_MSG(8, ("%s: %s\n", __func__, self->xml_path));
+        TarFileList_Release(self->files);
+    }
+    return 0;
+}
+
+static FSNode_vtbl TarNode_vtbl = {
+    sizeof(TarNode),
+    NULL,
+    TarNode_Touch,
+    TarNode_Attr,
+    NULL,
+    NULL,
+    TarNode_Open,
+    TarNode_Release
+};
+
+rc_t TarNode_MakeXML(const KXMLNode* xml_node, FSNode** self, char* errmsg, const char* rel_path)
+{
+    rc_t rc = 0;
+
+    if( xml_node == NULL || self == NULL ) {
+        rc = RC(rcExe, rcNode, rcConstructing, rcParam, rcNull);
+    } else {
+        char name[4096];
+        size_t sz;
+
+        rc = KXMLNodeReadAttrCString(xml_node, "name", name, sizeof(name), &sz);
+        if( rc != 0 || sz == 0 || name[0] == '\0' ) {
+            strcpy(errmsg, "attribute 'name'");
+            rc = rc ? rc : RC(rcExe, rcDoc, rcValidating, rcAttr, rcInvalid);
+        } else if( (rc = FSNode_Make(self, name, &TarNode_vtbl)) == 0 ) {
+            ((TarNode*)*self)->rel_path = rel_path;
+            strcpy(errmsg, "processing Item(s)");
+            if( (rc = TarNode_MakeFileList(xml_node, &((TarNode*)*self)->files, errmsg, rel_path, (*self)->name)) != 0 ) {
+                FSNode_Release(*self);
+                *self = NULL;
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t TarNode_MakeAuto(const FSNode** cself, const KDirectory* dir, const char* path, const char* file, const char* xml_path)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL || dir == NULL || path == NULL || file == NULL || xml_path == NULL ) {
+        rc = RC(rcExe, rcNode, rcConstructing, rcParam, rcNull);
+    } else {
+        if( (rc = FSNode_Make((FSNode**)cself, file, &TarNode_vtbl)) == 0 ) {
+            ((char*)((*cself)->name))[strlen(file) - 4] = '\0'; /* -= .xml */
+            ((TarNode*)*cself)->xml_path = xml_path;
+            ((TarNode*)*cself)->rel_path = path;
+            if( (rc = FSNode_Touch(*cself)) != 0 ) {
+                FSNode_Release(*cself);
+                *cself = NULL;
+            }
+        }
+    }
+    return rc;
+}
diff --git a/tools/fuse/tar-node.h b/tools/fuse/tar-node.h
new file mode 100644
index 0000000..d8a5552
--- /dev/null
+++ b/tools/fuse/tar-node.h
@@ -0,0 +1,35 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_tar_node_
+#define _h_sra_fuse_tar_node_
+
+#include "node.h"
+
+rc_t TarNode_MakeXML(const KXMLNode* xml_node, FSNode** cself, char* errmsg, const char* rel_path);
+
+rc_t TarNode_MakeAuto(const FSNode** cself, const KDirectory* dir, const char* path, const char* file, const char* xml_path);
+
+#endif /* _h_sra_fuse_tar_node_ */
diff --git a/tools/fuse/text-file.c b/tools/fuse/text-file.c
new file mode 100644
index 0000000..dc5efb2
--- /dev/null
+++ b/tools/fuse/text-file.c
@@ -0,0 +1,134 @@
+/*===========================================================================
+ *
+ *                            Public DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ */
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "log.h"
+#include "formats.h"
+#include "text-file.h"
+
+typedef struct TextFile TextFile;
+#define KFILE_IMPL TextFile
+#include <kfs/impl.h>
+
+struct TextFile {
+    KFile dad;
+    char* data;
+};
+
+static
+rc_t TextFile_Destroy(TextFile *self)
+{
+    FREE(self->data);
+    FREE(self);
+    return 0;
+}
+
+static
+struct KSysFile* TextFile_GetSysFile(const TextFile *self, uint64_t *offset)
+{
+    *offset = 0;
+    return NULL;
+}
+
+static
+rc_t TextFile_RandomAccess(const TextFile *self)
+{
+    return 0;
+}
+
+static
+uint32_t TextFile_Type(const TextFile *self)
+{
+    return kfdFile;
+}
+
+static
+rc_t TextFile_Size(const TextFile *self, uint64_t *size)
+{
+    *size = strlen(self->data);
+    return 0;
+}
+
+static
+rc_t TextFile_SetSize(TextFile *self, uint64_t size)
+{
+    return RC(rcExe, rcFile, rcUpdating, rcInterface, rcUnsupported);
+}
+
+static
+rc_t TextFile_Read(const TextFile *self, uint64_t pos, void *buffer, size_t bsize, size_t *num_read)
+{
+    *num_read = strlen(self->data);
+    if( pos < *num_read ) {
+        *num_read = (*num_read < bsize) ? *num_read : bsize;
+        memcpy(buffer, &self->data[pos], *num_read);
+    } else {
+        *num_read = 0;
+    }
+    return 0;
+}
+
+static
+rc_t TextFile_Write(TextFile *self, uint64_t pos, const void *buffer, size_t size, size_t *num_writ)
+{
+    return RC(rcExe, rcFile, rcWriting, rcInterface, rcUnsupported);
+}
+
+static KFile_vt_v1 TextFile_vtbl = {
+    1, 1,
+    TextFile_Destroy,
+    TextFile_GetSysFile,
+    TextFile_RandomAccess,
+    TextFile_Size,
+    TextFile_SetSize,
+    TextFile_Read,
+    TextFile_Write,
+    TextFile_Type
+};
+
+
+rc_t TextFile_Open( const KFile** cself, const FileOptions* opt )
+{
+    rc_t rc = 0;
+    TextFile* self;
+    CALLOC(self, 1, sizeof(*self));
+    if( self == NULL )
+    {
+        rc = RC(rcExe, rcFile, rcConstructing, rcMemory, rcExhausted );
+    }
+    else if ( ( rc = KFileInit( &self->dad, (const KFile_vt*)&TextFile_vtbl, "TextFile", "no-name", true, false ) ) != 0 ||
+              ( rc = StrDup( opt->f.txt64b, &self->data ) ) != 0 )
+    {
+        KFileRelease( &self->dad );
+    }
+    else
+    {
+        *cself = &self->dad;
+    }
+    return rc;
+}
diff --git a/tools/fuse/text-file.h b/tools/fuse/text-file.h
new file mode 100644
index 0000000..78a6cc1
--- /dev/null
+++ b/tools/fuse/text-file.h
@@ -0,0 +1,36 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_sra_fuse_text_file_
+#define _h_sra_fuse_text_file_
+
+#include <kfs/file.h>
+
+#include "node.h"
+
+rc_t TextFile_Open(const KFile** cself, const FileOptions* opt);
+
+#endif /* _h_sra_fuse_text_file_ */
diff --git a/tools/fuse/unix/remote-fuser-sys.c b/tools/fuse/unix/remote-fuser-sys.c
new file mode 100644
index 0000000..6031f98
--- /dev/null
+++ b/tools/fuse/unix/remote-fuser-sys.c
@@ -0,0 +1,696 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <kfs/directory.h>
+
+#define FUSE_USE_VERSION 25
+#include <fuse.h>
+
+#include "xml.h"
+#include "remote-fuser.h"
+#include "log.h"
+
+#include "remote-cache.h"
+
+#include <atomic.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+/* we will preserve mount point value */
+static char g_mount_point [ 4096 ];
+
+static struct stat g_mount_point_stat;
+static struct stat g_dflt_file_stat;
+static atomic64_t num_open_files;
+
+static
+int ConvertRC2errno(rc_t rc)
+{
+    switch(GetRCState(rc)) {
+        case rcNoErr:
+            return 0;
+        case rcNotFound:
+            return ENOENT;
+        case rcNull:
+            return EFAULT;
+        case rcInvalid:
+            return EINVAL;
+        case rcInsufficient:
+            return ENAMETOOLONG;
+        case rcReadonly:
+            return EROFS;
+        case rcUnauthorized:
+            return EACCES;
+        case rcCorrupt:
+        default:
+            return EBADF;
+    }
+}
+
+/* Kinda scary thing, but whomknows */
+void FUSER_abort ()
+{
+    LOGMSG(klogInfo, "Aborting remote fuser by request");
+    fuse_unmount ( g_mount_point );
+    exit ( 1 );
+}
+
+void* UX_FUSE_init(void)
+{
+    atomic64_set(&num_open_files, 0);
+    SRA_FUSER_Init();
+    return NULL;
+}
+
+void UX_FUSE_destroy(void* x)
+{
+    uint64_t q = atomic64_read(&num_open_files);
+    if( q > 0 ) {
+        PLOGMSG(klogInfo, (klogInfo, "$(q) files still opened", PLOG_U64(q), q));
+    }
+    SRA_FUSER_Fini();
+}
+
+struct UX_FUSE_readdir_callback_data {
+    const char *path;
+    void *buf;
+    fuse_fill_dir_t filler;
+};
+
+static
+rc_t CC UX_FUSE_readdir_callback( const char *name, void *data )
+{
+    struct UX_FUSE_readdir_callback_data* d = (struct UX_FUSE_readdir_callback_data*)data;
+    int r = d->filler(d->buf, name, NULL, 0);
+    DEBUG_MSG(10, ("%s %s entry: '%s'\n", __func__, d->path, name));
+    return r != 0 ? RC(rcExe, rcDirectory, rcReading, rcBuffer, rcInsufficient) : 0;
+}
+
+int UX_FUSE_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
+                     off_t offset, struct fuse_file_info *fi)
+{
+    rc_t rc = 0;
+    struct UX_FUSE_readdir_callback_data data;
+
+    DEBUG_MSG(8, ("%s: %s\n", __func__, path));
+
+    data.path = path;
+    data.filler = filler;
+    data.buf = buf;
+
+    if( (rc = UX_FUSE_readdir_callback(".", &data)) == 0 &&
+        (rc = UX_FUSE_readdir_callback("..", &data)) == 0 ) {
+        rc = SRA_FUSER_GetDir(path, UX_FUSE_readdir_callback, &data);
+    }
+    if( rc != 0 ) {
+        errno = ConvertRC2errno(rc);
+        PLOGERR(klogErr, (klogErr, rc, "$(f): $(p) - $(e)", PLOG_3(PLOG_S(f),PLOG_S(p),PLOG_S(e)), __func__, path, strerror(errno)));
+        return -errno;
+    }
+    return 0;
+}
+
+int UX_FUSE_getattr(const char *path, struct stat *stbuf)
+{
+    rc_t rc = 0;
+
+    DEBUG_MSG(8, ("%s: %s\n", __func__, path));
+    if( stbuf == NULL) {
+        rc = RC(rcExe, rcFileDesc, rcClassifying, rcParam, rcNull);
+    } else if( strcmp(path, "/") == 0 ) {
+        /* root is known as mount point */
+        memcpy(stbuf, &g_mount_point_stat, sizeof(g_mount_point_stat));
+    } else {
+        uint32_t type = kptBadPath, access = 0;
+        KTime_t ts = 0;
+        uint64_t file_sz = 0, block_sz = 0;
+        if( (rc = SRA_FUSER_GetAttr(path, &type, &ts, &file_sz, &access, &block_sz)) == 0 ) {
+            bool symlink = (type & kptAlias);
+            if( symlink ) {
+                type = type & ~kptAlias;
+            }
+            if( type == kptDir ) {
+                memcpy(stbuf, &g_mount_point_stat, sizeof(g_mount_point_stat));
+                stbuf->st_mode = S_IFDIR | (0007555 & (access == 0 ? stbuf->st_mode : access));
+            } else {
+                memcpy(stbuf, &g_dflt_file_stat, sizeof(g_dflt_file_stat));
+                if( access == 0 ) {
+                    access = stbuf->st_mode;
+                }
+                stbuf->st_mode = 0007555 & (access == 0 ? stbuf->st_mode : access);
+                if( type == kptFile ) {
+                    stbuf->st_mode |= S_IFREG;
+                } else if( type == kptCharDev ) {
+                    stbuf->st_mode |= S_IFCHR;
+                } else if( type == kptBlockDev ) {
+                    stbuf->st_mode |= S_IFBLK;
+                } else if( type == kptFIFO ) {
+                    stbuf->st_mode |= S_IFIFO;
+                } else {
+                    rc = RC(rcExe, rcFileDesc, rcClassifying, rcDirEntry, rcUnknown);
+                }
+            }
+            if( rc == 0 ) {
+                if( symlink ) {
+                    stbuf->st_mode = S_IFLNK | (stbuf->st_mode & 07777);
+                }
+                stbuf->st_size = file_sz;
+                if( ts != 0 ) {
+                    stbuf->st_mtime = stbuf->st_atime = stbuf->st_ctime = ts;
+                }
+                if( block_sz > 0 ) {
+                    stbuf->st_blksize = block_sz;
+                }
+                DEBUG_MSG(8, ("%s: %s type: %s %lu bytes\n", __func__, path,
+                    (S_ISDIR(stbuf->st_mode) ? "dir" : (S_ISLNK(stbuf->st_mode) ? " symlink" : "file")), stbuf->st_size));
+            }
+        }
+    }
+    if( rc != 0 ) {
+        errno = ConvertRC2errno(rc);
+        PLOGERR(klogErr, (klogErr, rc, "$(f): $(p) - $(e)", PLOG_3(PLOG_S(f),PLOG_S(p),PLOG_S(e)), __func__, path, strerror(errno)));
+        return -errno;
+    }
+    return 0;
+}
+
+int UX_FUSE_readlink(const char *path, char *buf, size_t buf_sz)
+{
+    rc_t rc = 0;
+
+    DEBUG_MSG(8, ("%s: %s\n", __func__, path));
+    if( buf == NULL ) {
+        rc = RC(rcExe, rcFile, rcAliasing, rcParam, rcNull);
+    } else if( buf_sz < 1 ) {
+        rc = RC(rcExe, rcFile, rcAliasing, rcParam, rcInvalid);
+    } else {
+        rc = SRA_FUSER_ResolveLink(path, buf, buf_sz);
+        if ( rc == 0 ) { 
+            if ( * buf == '/' ) {
+                /*)  Here we suppose to add mount point to path
+                 (*/
+                char TmpBuf [ 4096 ];
+                size_t NumWrit = 0;
+
+                rc = string_printf (
+                                TmpBuf,
+                                sizeof ( TmpBuf ),
+                                & NumWrit,
+                                "%s%s",
+                                g_mount_point,
+                                buf
+                                );
+                if ( rc == 0 ) {
+                    string_copy_measure ( buf, buf_sz, TmpBuf );
+                }
+            }
+        }
+    }
+    if( rc != 0 ) {
+        errno = ConvertRC2errno(rc);
+        PLOGERR(klogErr, (klogErr, rc, "$(f): $(p) - $(e)", PLOG_3(PLOG_S(f),PLOG_S(p),PLOG_S(e)), __func__, path, strerror(errno)));
+        return -errno;
+    }
+    return 0;
+}
+
+int UX_FUSE_open(const char *path, struct fuse_file_info* fi)
+{
+    rc_t rc = 0;
+    uint64_t q;
+
+    DEBUG_MSG(8, ("%s: %s\n", __func__, path));
+    if( fi == NULL) {
+        rc = RC(rcExe, rcFile, rcOpening, rcParam, rcNull);
+    } else if( fi->flags & (O_CREAT | O_EXCL | O_TRUNC | O_APPEND)) { 
+        rc = RC(rcExe, rcFile, rcOpening, rcDirEntry, rcReadonly);
+    } else {
+        const void* data = NULL;
+        if( (rc = SRA_FUSER_OpenNode(path, &data)) == 0 ) {
+            fi->fh = (uint64_t)data;
+        }
+    }
+    if( rc != 0 ) {
+        errno = ConvertRC2errno(rc);
+        PLOGERR(klogErr, (klogErr, rc, "$(f): $(p) - $(e)", PLOG_3(PLOG_S(f),PLOG_S(p),PLOG_S(e)), __func__, path, strerror(errno)));
+        return -errno;
+    }
+    q = atomic64_add_and_read(&num_open_files, 1);
+    PLOGMSG(klogInfo, (klogInfo, "opened $(n), total open $(q)", PLOG_2(PLOG_S(n),PLOG_U64(q)), path, q));
+    return 0;
+}
+
+int UX_FUSE_read(const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fi)
+{
+    rc_t rc = 0;
+    const void* data = NULL;
+    size_t num_read = 0;
+
+    DEBUG_MSG(8, ("%s: %s from %lu %lu bytes\n", __func__, path, offset, size));
+    if( fi == NULL || buf == NULL ) {
+        rc = RC(rcExe, rcFile, rcReading, rcParam, rcNull);
+    } else if( (data = (const void*)fi->fh) == NULL ) {
+        rc = RC(rcExe, rcFile, rcReading, rcParam, rcCorrupt);
+    } else {
+        rc = SRA_FUSER_ReadNode(path, data, buf, size, offset, &num_read);
+    }
+    if( rc != 0 ) {
+        errno = ConvertRC2errno(rc);
+        PLOGERR(klogErr, (klogErr, rc, "$(f): $(p) - $(e)", PLOG_3(PLOG_S(f),PLOG_S(p),PLOG_S(e)), __func__, path, strerror(errno)));
+        return -errno;
+    }
+    return num_read;
+}
+
+int UX_FUSE_release(const char *path, struct fuse_file_info *fi)
+{
+    rc_t rc = 0;
+    const void* data = NULL;
+    uint64_t q;
+
+    DEBUG_MSG(8, ("%s: %s\n", __func__, path));
+    if( fi == NULL) {
+        rc = RC(rcExe, rcFile, rcReleasing, rcParam, rcNull);
+    } else if( (data = (const void*)fi->fh) == NULL ) {
+        rc = RC(rcExe, rcFile, rcReading, rcParam, rcCorrupt);
+    } else {
+        rc = SRA_FUSER_CloseNode(path, data);
+    }
+    fi->fh = 0;
+    if( rc != 0 ) {
+        errno = ConvertRC2errno(rc);
+        PLOGERR(klogErr, (klogErr, rc, "$(f): $(p) - $(e)", PLOG_3(PLOG_S(f),PLOG_S(p),PLOG_S(e)), __func__, path, strerror(errno)));
+        return -errno;
+    }
+    atomic64_dec(&num_open_files);
+    q = atomic64_read(&num_open_files);
+    PLOGMSG(klogInfo, (klogInfo, "closed $(n), total open $(q)", PLOG_2(PLOG_S(n),PLOG_U64(q)), path, q));
+    return 0;
+}
+
+int UX_FUSE_mknod(const char *path, mode_t m, dev_t d)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_mkdir(const char *path, mode_t m)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_unlink(const char *path)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_rmdir(const char *path)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_symlink(const char *path, const char *x)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_rename(const char *path, const char *x)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_link(const char *path, const char *x)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_chmod(const char *path, mode_t m)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_chown(const char *path, uid_t u, gid_t g)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_truncate(const char *path, off_t o)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_utime(const char *path, struct utimbuf *b)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_write(const char *path, const char *b, size_t s, off_t o, struct fuse_file_info *fi)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_flush(const char *path, struct fuse_file_info *fi)
+{
+    return 0;
+}
+
+int UX_FUSE_create(const char *path, mode_t m, struct fuse_file_info *fi)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_ftruncate(const char *path, off_t o, struct fuse_file_info *fi)
+{
+    return -EROFS;
+}
+
+static
+void CoreUsage(int fd, const char *progName, bool showHelp, bool showVersion, bool fail)
+{
+    /* used only for FUSE built-in help and version printing */
+    struct fuse_operations ops;
+    struct fuse_args args;
+    memset(&args, 0, sizeof(struct fuse_args));
+    fuse_opt_add_arg(&args, progName); /* fake mount point */
+
+
+    if( fd != STDOUT_FILENO ) {
+        /* redirect usage to log file if it was specified */
+        dup2(fd, STDOUT_FILENO);
+    }
+    if( showHelp ) {
+        const char* p = strrchr(progName, '/');
+        if( p++ == NULL ) {
+            p = progName;
+        }
+        UsageSummary(p);
+        if( !fail ) {
+            fuse_opt_add_arg(&args, "-ho");
+            KOutMsg("\n"
+                "    -x|--xml-dir <url>                 XML file with virtual directory structure\n"
+                "                                       string. Local file or valid URL (http)\n"
+                "    -m|--mount-point <path>            path to a mount directory \n"
+                );
+            KOutMsg(
+                "    -u|--unmount                       Unmount only and exit (only -m required)\n");
+            KOutMsg(
+                "    -b|--hard-bot <url>                URL where report 'heart-beat' ( version )\n"
+                "                                       optional, if not defined - not report\n"
+                "                                       combination '%%s' will be substituted\n"
+                "                                       with XML file version \n"
+                );
+            KOutMsg("\nOptions:\n"
+                "    -e|--cache-dir <path>              Path to directory where to store cached\n"
+                "                                       data from remote files\n"
+                "                                       Programm will work in diskless mode\n"
+                "                                       without cacheing if parameter omitted\n");
+                KOutMsg("    -c|--hard-bot-check <minutes>      Execute 'heart-beat' URL every <arg> minutes,\n"
+                "                                       inteder larger than 0, default: 30.\n"
+                "    -r|--xml-root  <path>              Base directory for a 'path' attributes in XML.\n"
+                "                                       default: '.'\n"
+                );
+            KOutMsg(
+                "    -B|--Blevel <level>                Set block size level for HTTP transport.\n"
+                "                                       level is an integer value from 1 to 10,\n"
+                "                                       which correspond to block sizes:\n"
+                "                                       32K,64K,128K,256K,512K,1M,2M,4M,8M,16M\n"
+                );
+            KOutMsg(
+                "    --SRA-check <secs>                 Check SRA config and runs for update\n"
+                "                                       every <arg> seconds, default: 0 - never.\n" );
+            KOutMsg(
+                "    -L|--log-level                     Logging level as number or enum string. One\n"
+                "                                       of (fatal|sys|int|err|warn|info) or (0-5)\n"
+                "                                       Current/default is warn.\n"
+                "    -l|--log-file <path>               Use log file specified by path.\n"
+                "    -g|--log-reopen <secs>             Reopened log file every <arg> seconds\n"
+                "                                       (external log rotation), default: 0 - never.\n"
+                );
+            KOutMsg(
+    #if _DEBUGGING
+                "    -+|--debug <Module[-Flag]>         Turn on debug output for module. All flags\n"
+                "                                       if not specified.\n"
+    #endif
+                "    -v|--verbose                       Increase the verbosity level of the program.\n"
+                "                                       Use multiple times for more verbosity.\n"
+                "    -V|--version                       Display the version of the program then quit.\n"
+                "    -h|--help                          Output brief explantion for the program.\n"
+                "\n"
+                );
+        }
+    }
+    if( showVersion && !fail ) {
+        HelpVersion(progName, KAppVersion());
+        fuse_opt_add_arg(&args, "--version");
+    }
+    /* force help preceed fuse help */
+    fflush(stdout);
+    /* hack to force fuse lib to output to stdout */
+    dup2(fd, STDERR_FILENO);
+    if( !fail ) {
+        memset(&ops, 0, sizeof(struct fuse_operations));
+        fuse_main(args.argc, args.argv, &ops);
+    }
+    exit(fail ? rcArgv : 0);
+}
+
+/*******************************************************************************
+ * KMain - defined for use with kapp library
+ *******************************************************************************/
+rc_t CC KMain(int argc, char *argv[])
+{
+    int i;
+    rc_t rc;
+
+    bool showHelp = argc < 2, showVersion = false, unmount = false, foreground = false;
+    const char* mount_point = NULL, *xml_path = NULL, *log_file = NULL;
+    const char* xml_root = ".";
+    const char* cache_dir = NULL, *heart_beat_url = NULL;
+    char** fargs = (char**)calloc(argc, sizeof(char*));
+    uint32_t heart_beat_check = 30, log_sync = 0, sra_sync = 0;
+    int log_fd = STDOUT_FILENO;
+    uint32_t block_level = 0, block_size = 0;
+
+#ifdef SRAFUSER_LOGLOCALTIME
+    KLogFmtFlagsSet(klogFmtLocalTimestamp);
+    KLogLibFmtFlagsSet(klogFmtLocalTimestamp);
+    KStsFmtFlagsSet(kstsFmtLocalTimestamp);
+    KStsLibFmtFlagsSet(kstsFmtLocalTimestamp);
+#endif
+
+    for(i = 1; i < argc; i++) {
+        if(!strcmp(argv[i], "-x") || !strcmp(argv[i], "--xml-dir")) {
+            xml_path = argv[++i];
+        } else if(!strcmp(argv[i], "-m") || !strcmp(argv[i], "--mount-point")) {
+            mount_point = argv[++i];
+        } else if(!strcmp(argv[i], "-e") || !strcmp(argv[i], "--cache-dir")) {
+            cache_dir = argv[++i];
+        } else if(!strcmp(argv[i], "-b") || !strcmp(argv[i], "--hard-bot")) {
+            heart_beat_url = argv[++i];
+        } else if(!strcmp(argv[i], "-xs") || !strcmp(argv[i], "-c") || !strcmp(argv[i], "--xml-check")) {
+            heart_beat_check = AsciiToU32(argv[++i], NULL, NULL);
+        } else if(!strcmp(argv[i], "-r") || !strcmp(argv[i], "--xml-root")) {
+            xml_root = argv[++i];
+        } else if(!strcmp(argv[i], "-B") || !strcmp(argv[i], "--Blevel")) {
+            block_level = AsciiToU32(argv[++i], NULL, NULL);
+        } else if(!strcmp(argv[i], "-ds") || !strcmp(argv[i], "--SRA-check")) {
+            sra_sync = AsciiToU32(argv[++i], NULL, NULL);
+        } else if(!strcmp(argv[i], "-u") || !strcmp (argv[i], "--unmount")) {
+            unmount = true;
+        } else if(!strcmp(argv[i], "-L") || !strcmp (argv[i], "--log-level")) {
+            if( i == argc - 1 ) {
+                rc = RC(rcExe, rcArgv, rcValidating, rcParam, rcInsufficient);
+                LOGERR(klogErr, rc, "missing log level");
+                CoreUsage(log_fd, argv[0], true, false, true);
+            } else if( (rc = LogLevelSet(argv[++i])) != 0 ) {
+                PLOGERR(klogErr, (klogErr, rc, "log level $(lvl)", PLOG_S(lvl), argv[i]));
+                CoreUsage(log_fd, argv[0], true, false, true);
+            }
+        } else if(!strcmp(argv[i], "-+") || !strcmp (argv[i], "--debug")) {
+#ifdef _DEBUGGING
+            if( i == argc - 1 ) {
+                rc = RC(rcExe, rcArgv, rcValidating, rcParam, rcInsufficient);
+                LOGERR(klogErr, rc, "missing debug level");
+                CoreUsage(log_fd, argv[0], true, false, true);
+            } else if( (rc = KDbgSetString(argv[++i])) != 0 ) {
+                PLOGERR(klogErr, (klogErr, rc, "debug level $(lvl)", PLOG_S(lvl), argv[i]));
+                CoreUsage(log_fd, argv[0], true, false, true);
+            }
+#else
+            i++;
+#endif
+        } else if(!strcmp(argv[i], "-lf") || !strcmp(argv[i], "-l") || !strcmp (argv[i], "--log-file")) {
+            log_file = argv[++i];
+        } else if(!strcmp(argv[i], "-ls") || !strcmp(argv[i], "-g") || !strcmp(argv[i], "--log-reopen")) {
+            log_sync = AsciiToU32(argv[++i], NULL, NULL);
+        } else if(!strcmp(argv[i], "-V") || !strcmp(argv[i], "--version")) {
+            showVersion = true;
+        } else if(!strcmp(argv[i], "-v") || !strcmp(argv[i], "--verbose")) {
+            KStsLevel l = KStsLevelGet();
+            KStsLevelSet(++l);
+        } else if(!strcmp(argv[i], "-h") || !strcmp(argv[i], "-ho") || !strcmp(argv[i], "--help")) {
+            showHelp = true;
+        } else {
+            /* save arg for FUSE */
+            fargs[i] = argv[i];
+            if( !strcmp(argv[i], "-d") || !strcmp(argv[i], "-f") ||
+                (!strcmp(argv[i], "-o") && (i > argc - 1) && !strcmp(argv[i + 1], "debug")) ) {
+                foreground = true;
+            }
+        }
+    }
+    if( showHelp || showVersion ) {
+        CoreUsage(log_fd, argv[0], showHelp, showVersion, false);
+    }
+    if( (rc = LogFile_Init(log_file, log_sync, foreground, &log_fd)) != 0 ) {
+        LOGERR(klogErr, rc, log_file ? log_file : "no log");
+        CoreUsage(log_fd, argv[0], true, false, true);
+    }
+    if( mount_point == NULL ) {
+        LOGERR(klogErr, RC(rcExe, rcArgv, rcValidating, rcParam, rcInsufficient), "mountpoint");
+        CoreUsage(log_fd, argv[0], true, false, true);
+    }
+    if( unmount ) {
+        fuse_unmount(mount_point);
+        exit(0);
+    }
+    if( xml_path == NULL ) {
+        LOGERR(klogErr, RC(rcExe, rcArgv, rcValidating, rcParam, rcInsufficient), "virtual directory XML");
+        CoreUsage(log_fd, argv[0], true, false, true);
+    }
+    if ( ! IsRemotePath ( xml_path ) ) {
+        if ( ! IsLocalPath ( xml_path ) ) {
+            LOGERR(klogErr, RC(rcExe, rcArgv, rcValidating, rcParam, rcInvalid), "virtual directory XML file is neither local nor remote");
+            CoreUsage(log_fd, argv[0], true, false, true);
+        }
+    }
+    if ( heart_beat_check <= 0 ) {
+        LOGERR(klogErr, RC(rcExe, rcArgv, rcValidating, rcParam, rcInvalid), "heart beat check value");
+        CoreUsage(log_fd, argv[0], true, false, true);
+    }
+    if ( block_level != 0 ) {
+        if ( 10 < block_level ) {
+            LOGERR(klogErr, RC(rcExe, rcArgv, rcValidating, rcParam, rcInvalid), "buffering level value");
+            CoreUsage(log_fd, argv[0], true, false, true);
+        }
+        block_size = ( 1 << ( block_level - 1 ) ) * 1024 * 32;
+        KOutMsg ( "Buffering level is %d. Using buffe of size %d\n", block_level, block_size );
+    }
+    else {
+        block_size = 0;
+    }
+    if( i != argc ) {
+        LOGERR(klogErr, RC(rcExe, rcArgv, rcValidating, rcParam, rcExcessive), argv[i]);
+        CoreUsage(log_fd, argv[0], true, false, true);
+    }
+    if( stat(mount_point, &g_mount_point_stat) < 0 ) {
+        PLOGMSG(klogErr, (klogErr, "$(p): $(e)", PLOG_2(PLOG_S(p),PLOG_S(e)), mount_point, strerror(errno)));
+        CoreUsage(log_fd, argv[0], true, false, true);
+    }
+    g_mount_point_stat.st_dev = 0;
+    g_mount_point_stat.st_ino = 0;
+    g_mount_point_stat.st_mode = S_IFDIR | 0555; /* execute read-only */
+     /* find needs more links to search in subdir */
+    g_mount_point_stat.st_nlink = 1024 * 1024 * 1024;
+
+     /* Here we are preserving mount point */
+    string_copy_measure (
+                    g_mount_point,
+                    sizeof ( g_mount_point ),
+                    mount_point
+                    );
+
+        /*  And here we should initialize some 'stat' structure
+         *  BTW, seems that Anton inherited only GID and GID from
+         *  original XML file, I think that 'getuid' and 'getgid'
+         *  will work here well
+         */
+    memset ( & g_dflt_file_stat, 0, sizeof ( struct stat ) );
+
+    g_dflt_file_stat.st_uid = getuid ();
+    g_dflt_file_stat.st_gid = getgid ();
+    g_dflt_file_stat.st_mode = S_IFREG | 0444; /* read-only */
+    g_dflt_file_stat.st_nlink = 1;
+
+    if( (rc = Initialize(sra_sync, xml_path, cache_dir, heart_beat_url, heart_beat_check * 60, xml_root, block_size)) != 0 ) {
+        LOGERR(klogErr, rc, "at initialization");
+        CoreUsage(log_fd, argv[0], true, false, true);
+    }
+    DEBUG_MSG(8, ("Mount point set to '%s'\n", mount_point));
+
+    {{ /* FUSE start */
+        struct fuse_operations ops;
+        struct fuse_args args;
+
+        memset(&args, 0, sizeof(struct fuse_args));
+        fuse_opt_add_arg(&args, argv[0]);
+        /* mount point for fuse_main */
+        fuse_opt_add_arg(&args, mount_point);
+        /* save mopunt point dir and program stat */
+        for(i = 0; i < argc; i++) {
+            if( fargs[i] ) {
+                fuse_opt_add_arg(&args, fargs[i]);
+            }
+        }
+        free(fargs);
+        memset(&ops, 0, sizeof(struct fuse_operations));
+        ops.init     = UX_FUSE_init;
+        ops.destroy  = UX_FUSE_destroy;
+        ops.getattr  = UX_FUSE_getattr;
+        ops.readdir  = UX_FUSE_readdir;
+        ops.readlink = UX_FUSE_readlink;
+        ops.open     = UX_FUSE_open;
+        ops.read     = UX_FUSE_read;
+        ops.release  = UX_FUSE_release;
+        ops.mknod = UX_FUSE_mknod;
+        ops.mkdir = UX_FUSE_mkdir;
+        ops.unlink = UX_FUSE_unlink;
+        ops.rmdir = UX_FUSE_rmdir;
+        ops.symlink = UX_FUSE_symlink;
+        ops.rename = UX_FUSE_rename;
+        ops.link = UX_FUSE_link;
+        ops.chmod = UX_FUSE_chmod;
+        ops.chown = UX_FUSE_chown;
+        ops.truncate = UX_FUSE_truncate;
+        ops.utime = UX_FUSE_utime;
+        ops.write = UX_FUSE_write;
+        ops.flush = UX_FUSE_flush;
+        ops.create = UX_FUSE_create;
+        ops.ftruncate = UX_FUSE_ftruncate;
+        rc = fuse_main(args.argc, args.argv, &ops);
+    }}
+    return rc;
+}
diff --git a/tools/fuse/unix/sra-fuser-sys.c b/tools/fuse/unix/sra-fuser-sys.c
new file mode 100644
index 0000000..1cf3a18
--- /dev/null
+++ b/tools/fuse/unix/sra-fuser-sys.c
@@ -0,0 +1,637 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <kfs/directory.h>
+
+#define FUSE_USE_VERSION 25
+#include <fuse.h>
+
+#include "xml.h"
+#include "sra-fuser.h"
+#include "log.h"
+
+#include <atomic.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+static struct stat g_mount_point_stat;
+static struct stat g_dflt_file_stat;
+static atomic64_t num_open_files;
+
+static
+int ConvertRC2errno(rc_t rc)
+{
+    switch(GetRCState(rc)) {
+        case rcNoErr:
+            return 0;
+        case rcNotFound:
+            return ENOENT;
+        case rcNull:
+            return EFAULT;
+        case rcInvalid:
+            return EINVAL;
+        case rcInsufficient:
+            return ENAMETOOLONG;
+        case rcReadonly:
+            return EROFS;
+        case rcUnauthorized:
+            return EACCES;
+        case rcCorrupt:
+        default:
+            return EBADF;
+    }
+}
+
+void* UX_FUSE_init(void)
+{
+    atomic64_set(&num_open_files, 0);
+    SRA_FUSER_Init();
+    return NULL;
+}
+
+void UX_FUSE_destroy(void* x)
+{
+    uint64_t q = atomic64_read(&num_open_files);
+    if( q > 0 ) {
+        PLOGMSG(klogInfo, (klogInfo, "$(q) files still opened", PLOG_U64(q), q));
+    }
+    SRA_FUSER_Fini();
+}
+
+struct UX_FUSE_readdir_callback_data {
+    const char *path;
+    void *buf;
+    fuse_fill_dir_t filler;
+};
+
+static
+rc_t CC UX_FUSE_readdir_callback( const char *name, void *data )
+{
+    struct UX_FUSE_readdir_callback_data* d = (struct UX_FUSE_readdir_callback_data*)data;
+    int r = d->filler(d->buf, name, NULL, 0);
+    DEBUG_MSG(10, ("%s %s entry: '%s'\n", __func__, d->path, name));
+    return r != 0 ? RC(rcExe, rcDirectory, rcReading, rcBuffer, rcInsufficient) : 0;
+}
+
+int UX_FUSE_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
+                     off_t offset, struct fuse_file_info *fi)
+{
+    rc_t rc = 0;
+    struct UX_FUSE_readdir_callback_data data;
+
+    DEBUG_MSG(8, ("%s: %s\n", __func__, path));
+
+    data.path = path;
+    data.filler = filler;
+    data.buf = buf;
+
+    if( (rc = UX_FUSE_readdir_callback(".", &data)) == 0 &&
+        (rc = UX_FUSE_readdir_callback("..", &data)) == 0 ) {
+        rc = SRA_FUSER_GetDir(path, UX_FUSE_readdir_callback, &data);
+    }
+    if( rc != 0 ) {
+        errno = ConvertRC2errno(rc);
+        PLOGERR(klogErr, (klogErr, rc, "$(f): $(p) - $(e)", PLOG_3(PLOG_S(f),PLOG_S(p),PLOG_S(e)), __func__, path, strerror(errno)));
+        return -errno;
+    }
+    return 0;
+}
+
+int UX_FUSE_getattr(const char *path, struct stat *stbuf)
+{
+    rc_t rc = 0;
+
+    DEBUG_MSG(8, ("%s: %s\n", __func__, path));
+    if( stbuf == NULL) {
+        rc = RC(rcExe, rcFileDesc, rcClassifying, rcParam, rcNull);
+    } else if( strcmp(path, "/") == 0 ) {
+        /* root is known as mount point */
+        memcpy(stbuf, &g_mount_point_stat, sizeof(g_mount_point_stat));
+    } else {
+        uint32_t type = kptBadPath, access = 0;
+        KTime_t ts = 0;
+        uint64_t file_sz = 0, block_sz = 0;
+        if( (rc = SRA_FUSER_GetAttr(path, &type, &ts, &file_sz, &access, &block_sz)) == 0 ) {
+            bool symlink = (type & kptAlias);
+            if( symlink ) {
+                type = type & ~kptAlias;
+            }
+            if( type == kptDir ) {
+                memcpy(stbuf, &g_mount_point_stat, sizeof(g_mount_point_stat));
+                stbuf->st_mode = S_IFDIR | (0007555 & (access == 0 ? stbuf->st_mode : access));
+            } else {
+                memcpy(stbuf, &g_dflt_file_stat, sizeof(g_dflt_file_stat));
+                if( access == 0 ) {
+                    access = stbuf->st_mode;
+                }
+                stbuf->st_mode = 0007555 & (access == 0 ? stbuf->st_mode : access);
+                if( type == kptFile ) {
+                    stbuf->st_mode |= S_IFREG;
+                } else if( type == kptCharDev ) {
+                    stbuf->st_mode |= S_IFCHR;
+                } else if( type == kptBlockDev ) {
+                    stbuf->st_mode |= S_IFBLK;
+                } else if( type == kptFIFO ) {
+                    stbuf->st_mode |= S_IFIFO;
+                } else {
+                    rc = RC(rcExe, rcFileDesc, rcClassifying, rcDirEntry, rcUnknown);
+                }
+            }
+            if( rc == 0 ) {
+                if( symlink ) {
+                    stbuf->st_mode = S_IFLNK | (stbuf->st_mode & 07777);
+                }
+                stbuf->st_size = file_sz;
+                if( ts != 0 ) {
+                    stbuf->st_mtime = stbuf->st_atime = stbuf->st_ctime = ts;
+                }
+                if( block_sz > 0 ) {
+                    stbuf->st_blksize = block_sz;
+                }
+                DEBUG_MSG(8, ("%s: %s type: %s %lu bytes\n", __func__, path,
+                    (S_ISDIR(stbuf->st_mode) ? "dir" : (S_ISLNK(stbuf->st_mode) ? " symlink" : "file")), stbuf->st_size));
+            }
+        }
+    }
+    if( rc != 0 ) {
+        errno = ConvertRC2errno(rc);
+        PLOGERR(klogErr, (klogErr, rc, "$(f): $(p) - $(e)", PLOG_3(PLOG_S(f),PLOG_S(p),PLOG_S(e)), __func__, path, strerror(errno)));
+        return -errno;
+    }
+    return 0;
+}
+
+int UX_FUSE_readlink(const char *path, char *buf, size_t buf_sz)
+{
+    rc_t rc = 0;
+
+    DEBUG_MSG(8, ("%s: %s\n", __func__, path));
+    if( buf == NULL ) {
+        rc = RC(rcExe, rcFile, rcAliasing, rcParam, rcNull);
+    } else if( buf_sz < 1 ) {
+        rc = RC(rcExe, rcFile, rcAliasing, rcParam, rcInvalid);
+    } else {
+        rc = SRA_FUSER_ResolveLink(path, buf, buf_sz);
+    }
+    if( rc != 0 ) {
+        errno = ConvertRC2errno(rc);
+        PLOGERR(klogErr, (klogErr, rc, "$(f): $(p) - $(e)", PLOG_3(PLOG_S(f),PLOG_S(p),PLOG_S(e)), __func__, path, strerror(errno)));
+        return -errno;
+    }
+    return 0;
+}
+
+int UX_FUSE_open(const char *path, struct fuse_file_info* fi)
+{
+    rc_t rc = 0;
+    uint64_t q;
+
+    DEBUG_MSG(8, ("%s: %s\n", __func__, path));
+    if( fi == NULL) {
+        rc = RC(rcExe, rcFile, rcOpening, rcParam, rcNull);
+    } else if( fi->flags & (O_CREAT | O_EXCL | O_TRUNC | O_APPEND)) { 
+        rc = RC(rcExe, rcFile, rcOpening, rcDirEntry, rcReadonly);
+    } else {
+        const void* data = NULL;
+        if( (rc = SRA_FUSER_OpenNode(path, &data)) == 0 ) {
+            fi->fh = (uint64_t)data;
+        }
+    }
+    if( rc != 0 ) {
+        errno = ConvertRC2errno(rc);
+        PLOGERR(klogErr, (klogErr, rc, "$(f): $(p) - $(e)", PLOG_3(PLOG_S(f),PLOG_S(p),PLOG_S(e)), __func__, path, strerror(errno)));
+        return -errno;
+    }
+    q = atomic64_add_and_read(&num_open_files, 1);
+    PLOGMSG(klogInfo, (klogInfo, "opened $(n), total open $(q)", PLOG_2(PLOG_S(n),PLOG_U64(q)), path, q));
+    return 0;
+}
+
+int UX_FUSE_read(const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fi)
+{
+    rc_t rc = 0;
+    const void* data = NULL;
+    size_t num_read = 0;
+
+    DEBUG_MSG(8, ("%s: %s from %lu %lu bytes\n", __func__, path, offset, size));
+    if( fi == NULL || buf == NULL ) {
+        rc = RC(rcExe, rcFile, rcReading, rcParam, rcNull);
+    } else if( (data = (const void*)fi->fh) == NULL ) {
+        rc = RC(rcExe, rcFile, rcReading, rcParam, rcCorrupt);
+    } else {
+        rc = SRA_FUSER_ReadNode(path, data, buf, size, offset, &num_read);
+    }
+    if( rc != 0 ) {
+        errno = ConvertRC2errno(rc);
+        PLOGERR(klogErr, (klogErr, rc, "$(f): $(p) - $(e)", PLOG_3(PLOG_S(f),PLOG_S(p),PLOG_S(e)), __func__, path, strerror(errno)));
+        return -errno;
+    }
+    return num_read;
+}
+
+int UX_FUSE_release(const char *path, struct fuse_file_info *fi)
+{
+    rc_t rc = 0;
+    const void* data = NULL;
+    uint64_t q;
+
+    DEBUG_MSG(8, ("%s: %s\n", __func__, path));
+    if( fi == NULL) {
+        rc = RC(rcExe, rcFile, rcReleasing, rcParam, rcNull);
+    } else if( (data = (const void*)fi->fh) == NULL ) {
+        rc = RC(rcExe, rcFile, rcReading, rcParam, rcCorrupt);
+    } else {
+        rc = SRA_FUSER_CloseNode(path, data);
+    }
+    fi->fh = 0;
+    if( rc != 0 ) {
+        errno = ConvertRC2errno(rc);
+        PLOGERR(klogErr, (klogErr, rc, "$(f): $(p) - $(e)", PLOG_3(PLOG_S(f),PLOG_S(p),PLOG_S(e)), __func__, path, strerror(errno)));
+        return -errno;
+    }
+    atomic64_dec(&num_open_files);
+    q = atomic64_read(&num_open_files);
+    PLOGMSG(klogInfo, (klogInfo, "closed $(n), total open $(q)", PLOG_2(PLOG_S(n),PLOG_U64(q)), path, q));
+    return 0;
+}
+
+int UX_FUSE_mknod(const char *path, mode_t m, dev_t d)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_mkdir(const char *path, mode_t m)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_unlink(const char *path)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_rmdir(const char *path)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_symlink(const char *path, const char *x)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_rename(const char *path, const char *x)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_link(const char *path, const char *x)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_chmod(const char *path, mode_t m)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_chown(const char *path, uid_t u, gid_t g)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_truncate(const char *path, off_t o)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_utime(const char *path, struct utimbuf *b)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_write(const char *path, const char *b, size_t s, off_t o, struct fuse_file_info *fi)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_flush(const char *path, struct fuse_file_info *fi)
+{
+    return 0;
+}
+
+int UX_FUSE_create(const char *path, mode_t m, struct fuse_file_info *fi)
+{
+    return -EROFS;
+}
+
+int UX_FUSE_ftruncate(const char *path, off_t o, struct fuse_file_info *fi)
+{
+    return -EROFS;
+}
+
+static
+void CoreUsage(int fd, const char *progName, bool showHelp, bool showVersion, bool fail, bool forceShowHelp)
+{
+    /* used only for FUSE built-in help and version printing */
+    struct fuse_operations ops;
+    struct fuse_args args;
+    memset(&args, 0, sizeof(struct fuse_args));
+    fuse_opt_add_arg(&args, progName); /* fake mount point */
+
+
+    if( fd != STDOUT_FILENO ) {
+        /* redirect usage to log file if it was specified */
+        dup2(fd, STDOUT_FILENO);
+    }
+    if( showHelp ) {
+        const char* p = strrchr(progName, '/');
+        if( p++ == NULL ) {
+            p = progName;
+        }
+        UsageSummary(p);
+        if( !fail || forceShowHelp ) {
+            fuse_opt_add_arg(&args, "-ho");
+            KOutMsg("\n"
+                "    -x|--xml-dir <path>                XML file with virtual directory structure\n"
+                "    -m|--mount-point <path>            path to a mount directory \n"
+                "    -u|--unmount                       Unmount only and exit (only -m required)\n"
+                );
+            KOutMsg("\nOptions:\n"
+                "    -c|--xml-check <secs>              Check XML for update every <arg> seconds,\n"
+                "                                       default: 0 - never.\n"
+                "    -r|--xml-root  <path>              Base directory for a 'path' attributes in XML.\n"
+                "                                       default: '.'\n"
+                );
+            KOutMsg(
+                "    -i|--xml-validate <nocheck|ignore> XML validation on load:\n"
+                "                                       nocheck - do not check presence of dir/file in path attribute;\n"
+                "                                       ignore - only report missing dir/file in path attribute;\n"
+                "                                       default behaivour is to fail loading XML if dir/file is not found.\n"
+                );
+            KOutMsg(
+                "    --SRA-check <secs>                 Check SRA config and runs for update\n"
+                "                                       every <arg> seconds, default: 0 - never.\n"
+                "    --SRA-cache <path>                 Write SRA update info to a file.\n"
+                "                                       Must have --SRA-check option value of non-zero.\n"
+                );
+            KOutMsg(
+                "    -L|--log-level                     Logging level as number or enum string. One\n"
+                "                                       of (fatal|sys|int|err|warn|info) or (0-5)\n"
+                "                                       Current/default is warn.\n"
+                "    -l|--log-file <path>               Use log file specified by path.\n"
+                "    -g|--log-reopen <secs>             Reopened log file every <arg> seconds\n"
+                "                                       (external log rotation), default: 0 - never.\n"
+                );
+            KOutMsg(
+    #if _DEBUGGING
+                "    -+|--debug <Module[-Flag]>         Turn on debug output for module. All flags\n"
+                "                                       if not specified.\n"
+    #endif
+                "    -v|--verbose                       Increase the verbosity level of the program.\n"
+                "                                       Use multiple times for more verbosity.\n"
+                "    -V|--version                       Display the version of the program then quit.\n"
+                "    -h|--help                          Output brief explantion for the program.\n"
+                "\n"
+                );
+        }
+    }
+    if( showVersion && !fail ) {
+        HelpVersion(progName, KAppVersion());
+        fuse_opt_add_arg(&args, "--version");
+    }
+    /* force help preceed fuse help */
+    fflush(stdout);
+    /* hack to force fuse lib to output to stdout */
+    dup2(fd, STDERR_FILENO);
+    if( !fail ) {
+        memset(&ops, 0, sizeof(struct fuse_operations));
+        fuse_main(args.argc, args.argv, &ops);
+    }
+    exit(fail ? rcArgv : 0);
+}
+
+/*******************************************************************************
+ * KMain - defined for use with kapp library
+ *******************************************************************************/
+rc_t CC KMain(int argc, char *argv[])
+{
+    int i;
+    rc_t rc;
+
+    bool missedArgs = argc < 2, showHelp = false, showVersion = false, unmount = false, foreground = false;
+    const char* mount_point = NULL, *xml_path = NULL, *log_file = NULL;
+    const char* sra_cache = NULL, *xml_root = ".";
+    char** fargs = (char**)calloc(argc, sizeof(char*));
+    uint32_t xml_sync = 0, log_sync = 0, sra_sync = 0;
+    EXMLValidate xml_validate = eXML_Full;
+    int log_fd = STDOUT_FILENO;
+
+#ifdef SRAFUSER_LOGLOCALTIME
+    KLogFmtFlagsSet(klogFmtLocalTimestamp);
+    KLogLibFmtFlagsSet(klogFmtLocalTimestamp);
+    KStsFmtFlagsSet(kstsFmtLocalTimestamp);
+    KStsLibFmtFlagsSet(kstsFmtLocalTimestamp);
+#endif
+
+    for(i = 1; i < argc; i++) {
+        if(!strcmp(argv[i], "-x") || !strcmp(argv[i], "--xml-dir")) {
+            xml_path = argv[++i];
+        } else if(!strcmp(argv[i], "-m") || !strcmp(argv[i], "--mount-point")) {
+            mount_point = argv[++i];
+        } else if(!strcmp(argv[i], "-xs") || !strcmp(argv[i], "-c") || !strcmp(argv[i], "--xml-check")) {
+            xml_sync = AsciiToU32(argv[++i], NULL, NULL);
+        } else if(!strcmp(argv[i], "-r") || !strcmp(argv[i], "--xml-root")) {
+            xml_root = argv[++i];
+        } else if(!strcmp(argv[i], "-i") || !strcmp(argv[i], "--xml-validate")) {
+            if( i++ == argc - 1 ) {
+                rc = RC(rcExe, rcArgv, rcValidating, rcParam, rcInsufficient);
+                LOGERR(klogErr, rc, "XML validation setting value");
+                CoreUsage(log_fd, argv[0], true, false, true, false);
+            } else if( !strcmp(argv[i], "ignore") ) {
+                xml_validate = eXML_NoFail;
+            } else if( !strcmp(argv[i], "nocheck") ) {
+                xml_validate = eXML_NoCheck;
+            } else {
+                rc = RC(rcExe, rcArgv, rcValidating, rcParam, rcUnrecognized);
+                PLOGERR(klogErr, (klogErr, rc, "XML validation setting value '$(lvl)'", PLOG_S(lvl), argv[i]));
+                CoreUsage(log_fd, argv[0], true, false, true, false);
+            }
+        } else if(!strcmp(argv[i], "-ds") || !strcmp(argv[i], "--SRA-check")) {
+            sra_sync = AsciiToU32(argv[++i], NULL, NULL);
+        } else if(!strcmp(argv[i], "-df") || !strcmp(argv[i], "--SRA-cache")) {
+            sra_cache = argv[++i];
+        } else if(!strcmp(argv[i], "-u") || !strcmp (argv[i], "--unmount")) {
+            unmount = true;
+        } else if(!strcmp(argv[i], "-L") || !strcmp (argv[i], "--log-level")) {
+            if( i == argc - 1 ) {
+                rc = RC(rcExe, rcArgv, rcValidating, rcParam, rcInsufficient);
+                LOGERR(klogErr, rc, "missing log level");
+                CoreUsage(log_fd, argv[0], true, false, true, false);
+            } else if( (rc = LogLevelSet(argv[++i])) != 0 ) {
+                PLOGERR(klogErr, (klogErr, rc, "log level $(lvl)", PLOG_S(lvl), argv[i]));
+                CoreUsage(log_fd, argv[0], true, false, true, false);
+            }
+        } else if(!strcmp(argv[i], "-+") || !strcmp (argv[i], "--debug")) {
+#ifdef _DEBUGGING
+            if( i == argc - 1 ) {
+                rc = RC(rcExe, rcArgv, rcValidating, rcParam, rcInsufficient);
+                LOGERR(klogErr, rc, "missing debug level");
+                CoreUsage(log_fd, argv[0], true, false, true, false);
+            } else if( (rc = KDbgSetString(argv[++i])) != 0 ) {
+                PLOGERR(klogErr, (klogErr, rc, "debug level $(lvl)", PLOG_S(lvl), argv[i]));
+                CoreUsage(log_fd, argv[0], true, false, true, false);
+            }
+#else
+            i++;
+#endif
+        } else if(!strcmp(argv[i], "-lf") || !strcmp(argv[i], "-l") || !strcmp (argv[i], "--log-file")) {
+            log_file = argv[++i];
+        } else if(!strcmp(argv[i], "-ls") || !strcmp(argv[i], "-g") || !strcmp(argv[i], "--log-reopen")) {
+            log_sync = AsciiToU32(argv[++i], NULL, NULL);
+        } else if(!strcmp(argv[i], "-V") || !strcmp(argv[i], "--version")) {
+            showVersion = true;
+        } else if(!strcmp(argv[i], "-v") || !strcmp(argv[i], "--verbose")) {
+            KStsLevel l = KStsLevelGet();
+            KStsLevelSet(++l);
+        } else if(!strcmp(argv[i], "-h") || !strcmp(argv[i], "-ho") || !strcmp(argv[i], "--help")) {
+            showHelp = true;
+        } else {
+            /* save arg for FUSE */
+            fargs[i] = argv[i];
+            if( !strcmp(argv[i], "-d") || !strcmp(argv[i], "-f") ||
+                (!strcmp(argv[i], "-o") && (i > argc - 1) && !strcmp(argv[i + 1], "debug")) ) {
+                foreground = true;
+            }
+        }
+    }
+    if( missedArgs ) {
+        CoreUsage(log_fd, argv[0], missedArgs, showVersion, true, true);
+    }
+    if( showHelp || showVersion ) {
+        CoreUsage(log_fd, argv[0], showHelp, showVersion, false, false);
+    }
+    if( (rc = LogFile_Init(log_file, log_sync, foreground, &log_fd)) != 0 ) {
+        LOGERR(klogErr, rc, log_file ? log_file : "no log");
+        CoreUsage(log_fd, argv[0], true, false, true, false);
+    }
+    if( mount_point == NULL ) {
+        LOGERR(klogErr, RC(rcExe, rcArgv, rcValidating, rcParam, rcInsufficient), "mountpoint");
+        CoreUsage(log_fd, argv[0], true, false, true, false);
+    }
+    if( unmount ) {
+        fuse_unmount(mount_point);
+        exit(0);
+    }
+    if( xml_path == NULL ) {
+        LOGERR(klogErr, RC(rcExe, rcArgv, rcValidating, rcParam, rcInsufficient), "virtual directory XML");
+        CoreUsage(log_fd, argv[0], true, false, true, false);
+    }
+    if( i != argc ) {
+        LOGERR(klogErr, RC(rcExe, rcArgv, rcValidating, rcParam, rcExcessive), argv[i]);
+        CoreUsage(log_fd, argv[0], true, false, true, false);
+    }
+    if( stat(mount_point, &g_mount_point_stat) < 0 ) {
+        PLOGMSG(klogErr, (klogErr, "$(p): $(e)", PLOG_2(PLOG_S(p),PLOG_S(e)), mount_point, strerror(errno)));
+        CoreUsage(log_fd, argv[0], true, false, true, false);
+    }
+    g_mount_point_stat.st_dev = 0;
+    g_mount_point_stat.st_ino = 0;
+    g_mount_point_stat.st_mode = S_IFDIR | 0555; /* execute read-only */
+     /* find needs more links to search in subdir */
+    g_mount_point_stat.st_nlink = 1024 * 1024 * 1024;
+    
+    if( stat(xml_path, &g_dflt_file_stat) < 0 ) {
+        PLOGMSG(klogErr, (klogErr, "$(p): $(e)", PLOG_2(PLOG_S(p),PLOG_S(e)), xml_path, strerror(errno)));
+        CoreUsage(log_fd, argv[0], true, false, true, false);
+    }
+    g_dflt_file_stat.st_dev = 0;
+    g_dflt_file_stat.st_ino = 0;
+    g_dflt_file_stat.st_mode = S_IFREG | 0444; /* read-only */
+    g_dflt_file_stat.st_nlink = 1;
+    g_dflt_file_stat.st_rdev = 0;
+    g_dflt_file_stat.st_size = 0;
+    g_dflt_file_stat.st_blksize = 0;
+    g_dflt_file_stat.st_blocks = 0;
+
+    if( (rc = Initialize(sra_sync, xml_path, xml_sync, sra_cache, xml_root, xml_validate)) != 0 ) {
+        LOGERR(klogErr, rc, "at initialization");
+        CoreUsage(log_fd, argv[0], true, false, true, false);
+    }
+    DEBUG_MSG(8, ("Mount point set to '%s'\n", mount_point));
+
+    {{ /* FUSE start */
+        struct fuse_operations ops;
+        struct fuse_args args;
+
+        memset(&args, 0, sizeof(struct fuse_args));
+        fuse_opt_add_arg(&args, argv[0]);
+        /* mount point for fuse_main */
+        fuse_opt_add_arg(&args, mount_point);
+        /* save mopunt point dir and program stat */
+        for(i = 0; i < argc; i++) {
+            if( fargs[i] ) {
+                fuse_opt_add_arg(&args, fargs[i]);
+            }
+        }
+        free(fargs);
+        memset(&ops, 0, sizeof(struct fuse_operations));
+        ops.init     = UX_FUSE_init;
+        ops.destroy  = UX_FUSE_destroy;
+        ops.getattr  = UX_FUSE_getattr;
+        ops.readdir  = UX_FUSE_readdir;
+        ops.readlink = UX_FUSE_readlink;
+        ops.open     = UX_FUSE_open;
+        ops.read     = UX_FUSE_read;
+        ops.release  = UX_FUSE_release;
+        ops.mknod = UX_FUSE_mknod;
+        ops.mkdir = UX_FUSE_mkdir;
+        ops.unlink = UX_FUSE_unlink;
+        ops.rmdir = UX_FUSE_rmdir;
+        ops.symlink = UX_FUSE_symlink;
+        ops.rename = UX_FUSE_rename;
+        ops.link = UX_FUSE_link;
+        ops.chmod = UX_FUSE_chmod;
+        ops.chown = UX_FUSE_chown;
+        ops.truncate = UX_FUSE_truncate;
+        ops.utime = UX_FUSE_utime;
+        ops.write = UX_FUSE_write;
+        ops.flush = UX_FUSE_flush;
+        ops.create = UX_FUSE_create;
+        ops.ftruncate = UX_FUSE_ftruncate;
+        rc = fuse_main(args.argc, args.argv, &ops);
+    }}
+    return rc;
+}
diff --git a/tools/fuse/xml.c b/tools/fuse/xml.c
new file mode 100644
index 0000000..5df98bc
--- /dev/null
+++ b/tools/fuse/xml.c
@@ -0,0 +1,516 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <klib/namelist.h>
+#include <klib/container.h>
+#include <klib/log.h>
+#include <kproc/lock.h>
+#include <kproc/thread.h>
+
+#include "log.h"
+#include "xml.h"
+#include "file.h"
+#include "directory.h"
+#include "tar-node.h"
+#include "sra-list.h"
+#include "node.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+static const KXMLMgr* g_xmlmgr = NULL;
+static const FSNode* g_root = NULL;
+static KRWLock* g_lock = NULL;
+static const char* g_start_dir = NULL;
+static uint32_t g_xml_validate = 0;
+
+static unsigned int g_xml_sync = 0;
+/* if g_xml_sync == 0 these are not used: */
+static KTime_t g_xml_mtime = 0;
+static char* g_xml_path = NULL;
+static KThread* g_xml_thread = NULL;
+
+static
+rc_t XMLLock(bool exclusive)
+{
+    DEBUG_MSG(10, ("Lock XML tree %s\n", exclusive ? "write" : "read"));
+    return exclusive ? KRWLockAcquireExcl(g_lock) : KRWLockAcquireShared(g_lock);
+}
+
+static
+void XMLUnlock(void)
+{
+    DEBUG_MSG(10, ("Unlocked XML tree\n"));
+    ReleaseComplain(KRWLockUnlock, g_lock);
+}
+
+void XML_FindRelease(void)
+{
+    XMLUnlock();
+}
+
+rc_t XML_FindLock(const char* path, bool recur, const FSNode** node, const char** subpath)
+{
+    rc_t rc = 0;
+    size_t sz = 0;
+    const char* p0 = NULL, *p = NULL;
+    const FSNode* pn = NULL, *n = NULL;
+    bool hidden = false;
+
+    if( path == NULL || node == NULL || subpath == NULL ) {
+        return RC(rcExe, rcPath, rcResolving, rcParam, rcNull);
+    }
+    sz = strlen(path);
+    if( sz == 0 ) {
+        return RC(rcExe, rcPath, rcResolving, rcParam, rcEmpty);
+    }
+    p0 = path;
+    if( (rc = XMLLock(false)) != 0 ) {
+        return rc;
+    }
+    pn = g_root;
+    do {
+        DEBUG_MSG(8, ("Path: '%s'\n", p0));
+        while( *p0 == '/' && *p0 != '\0' ) {
+            p0++;
+        }
+        if( *p0 == '\0' ) {
+            break;
+        }
+        p = strchr(p0, '/');
+        if( p == NULL ) {
+            p = p0 + strlen(p0);
+        }
+        DEBUG_MSG(8, ("Push: '%.*s'\n", p - p0, p0));
+        if( (rc = FSNode_FindChild(pn, p0, p - p0, &n, &hidden)) == 0 ) {
+            if( hidden ) {
+                pn = n;
+                DEBUG_MSG(8, ("Match! hidden '%s' left '%s'\n", pn->name, p0));
+                break;
+            } else {
+                DEBUG_MSG(8, ("Match! '%.*s' left '%s'\n", p - p0, p0, p));
+            }
+        } else if( GetRCState(rc) == rcNotFound ) {
+            rc = 0;
+            break;
+        }
+        pn = n;
+        p0 = p;
+    } while( rc == 0 && p0 < path + sz );
+
+    if( rc == 0 ) {
+        if( pn == NULL ) {
+            rc = RC(rcExe, rcPath, rcResolving, rcDirEntry, rcNotFound);
+            DEBUG_MSG(10, ("Not found: '%s', in '%s'\n", p0, path));
+        } else {
+            if( (rc = FSNode_Touch(pn)) != 0 ) {
+                PLOGERR(klogWarn, (klogWarn, rc, "touch failed for $(n)", PLOG_S(n), pn->name));
+                rc = 0;
+            }
+            *node = pn;
+            *subpath = (p0 && p0[0] != '\0') ? p0 : NULL;
+#if _DEBUGGING
+            {
+                const char* nm = NULL;
+                FSNode_GetName(pn, &nm);
+                DEBUG_MSG(10, ("Found: '%s', sub '%s'\n", nm, *subpath));
+            }
+#endif
+        }
+    }
+    if( rc != 0 ) {
+        XMLUnlock();
+    }
+    return rc;
+}
+
+static
+rc_t SRAConfigParse(const KXMLNode* xml_node, SRAConfigFlags* flags, char* errmsg)
+{
+    rc_t rc = 0;
+    uint32_t i;
+    char at[4096];
+    size_t sz;
+    char* attr_name[]         = { "run-directory", "SRA-archive",   "SRA-archive-lite",  "fastq",           "SFF" };
+    SRAConfigFlags attr_val[] = { eSRAFuseRunDir,  eSRAFuseFileArc, eSRAFuseFileArcLite, eSRAFuseFileFastq, eSRAFuseFileSFF };
+
+    if( *flags & eSRAFuseInitial ) {
+        *flags = 0;
+    }
+    for(i = 0; rc == 0 && i < sizeof(attr_name)/sizeof(attr_name[0]); i++) {
+        if( (rc = KXMLNodeReadAttrCString(xml_node, attr_name[i], at, sizeof(at), &sz)) == 0 ) {
+            if( strcasecmp(at, "true") == 0 ) {
+                *flags = *flags | attr_val[i];
+            } else if( strcasecmp(at, "false") == 0 ) {
+                *flags = *flags & ~(attr_val[i]);
+            } else {
+                strcpy(errmsg, "SRAConfig attribute ");
+                strcat(errmsg,  attr_name[i]);
+                strcat(errmsg, " value '");
+                strcat(errmsg, at);
+                strcat(errmsg, "'");
+                rc = RC(rcExe, rcDoc, rcReading, rcData, rcInvalid);
+            }
+        } else if( GetRCState(rc) == rcNotFound ) {
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+static
+rc_t XML_ValidateNode(FSNode* parent, const KXMLNode* n, SRAConfigFlags flags, char* errmsg)
+{
+    rc_t rc = 0;
+    const char* name = NULL;
+    FSNode* fsn = NULL;
+    bool children_allowed = false, should_have_children = false, ignore_children = false;
+
+    if( (rc = KXMLNodeElementName(n, &name)) != 0 ) {
+        return rc;
+    }
+    DEBUG_MSG(8, ("Node: %s\n", name));
+    if( name == NULL ) {
+        return RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcNull);
+    }
+
+    if( strcmp(name, "Directory") == 0 ) {
+        rc = DirectoryNode_Make(n, &fsn, errmsg, g_start_dir, g_xml_mtime, g_xml_validate);
+        children_allowed = true;
+    } else if( strcmp(name, "File") == 0 ) {
+        rc = FileNode_Make(n, &fsn, errmsg, g_start_dir, g_xml_validate);
+    } else if( strcmp(name, "SRA") == 0 ) {
+        if( (rc = SRAListNode_Make(n, parent, flags, errmsg, g_start_dir, g_xml_validate)) == 0 ) {
+            fsn = parent;
+        }
+    } else if( strcmp(name, "TAR") == 0 ) {
+        /* tar nodes do not validate on creation */
+        rc = TarNode_MakeXML(n, &fsn, errmsg, g_start_dir);
+        children_allowed = true;
+        ignore_children = true;
+    } else if( strcmp(name, "SRAConfig") == 0 ) {
+        if( (rc = SRAConfigParse(n, &flags, errmsg)) == 0 ) {
+            fsn = parent;
+            children_allowed = true;
+            should_have_children = true;
+        }
+    } else {
+        strcpy(errmsg, name);
+        rc = RC(rcExe, rcDoc, rcValidating, rcTag, rcUnknown);
+    }
+    if( rc == 0 ) {
+        strcpy(errmsg, name);
+        if( fsn == parent || (rc = FSNode_AddChild(parent, fsn)) == 0 ) {
+            uint32_t count = 0;
+            if( (rc = KXMLNodeCountChildNodes(n, &count)) == 0 && count > 0 ) {
+                if( !children_allowed ) {
+                    if( fsn != NULL ) {
+                        FSNode_GetName(fsn, &name);
+                    }
+                    rc = RC(rcExe, rcDoc, rcValidating, rcDirEntry, rcInvalid);
+                    strcpy(errmsg, name);
+                } else if( !ignore_children ) {
+                    uint32_t i = 0;
+                    const KXMLNode* ch = NULL;
+                    while( rc == 0 && i < count ) {
+                        if( (rc = KXMLNodeGetNodeRead(n, &ch, i++)) == 0 ) {
+                            rc = XML_ValidateNode(fsn, ch, flags, errmsg);
+                            ReleaseComplain(KXMLNodeRelease, ch);
+                        }
+                    }
+                }
+            } else if( count == 0 && should_have_children ) {
+                PLOGMSG(klogWarn, (klogWarn, "$(n) may have children", PLOG_S(n), name));
+            }
+        }
+    }
+    return rc;
+}
+
+static
+rc_t RootNode_Attr(const FSNode* cself, const char* subpath, uint32_t* type, KTime_t* ts, uint64_t* file_sz, uint32_t* access, uint64_t* block_sz)
+{
+    rc_t rc = 0;
+
+    *type = kptDir;
+    if( subpath != NULL ) {
+        rc = RC(rcExe, rcFile, rcEvaluating, rcDirEntry, rcNotFound);
+    }
+    return rc;
+}
+
+static
+rc_t RootNode_Dir(const FSNode* cself, const char* subpath, FSNode_Dir_Visit func, void* data)
+{
+    if( subpath != NULL ) {
+        return RC(rcExe, rcFile, rcListing, rcDirEntry, rcNotFound);
+    }
+    return FSNode_ListChildren(cself, func, data);
+}
+
+static const FSNode_vtbl RootNode_vtbl = {
+    sizeof(FSNode),
+    NULL,
+    NULL,
+    RootNode_Attr,
+    RootNode_Dir,
+    NULL,
+    NULL,
+    NULL
+};
+
+static
+rc_t XML_Open(const char* path, const FSNode** tree)
+{
+    rc_t rc = 0;
+    char errmsg[4096] = "";
+    KDirectory *dir = NULL;
+    
+    PLOGMSG(klogInfo, (klogInfo, "Reading XML file '$(x)'", PLOG_S(x), path));
+    if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+        const KFile* file = NULL;
+        if( (rc = KDirectoryOpenFileRead(dir, &file, "%s", path)) == 0 ) {
+            if( (rc = FSNode_Make((FSNode**)tree, "ROOT", &RootNode_vtbl)) == 0 ) {
+                const KXMLDoc* xmldoc = NULL;
+                if( (rc = KXMLMgrMakeDocRead(g_xmlmgr, &xmldoc, file)) == 0 ) {
+                    const KXMLNodeset* ns = NULL;
+                    if( (rc = KXMLDocOpenNodesetRead(xmldoc, &ns, "/FUSE/*")) == 0 ) {
+                        uint32_t count = 0;
+                        if( (rc = KXMLNodesetCount(ns, &count)) == 0 ) {
+                            if( count == 0 ) {
+                                rc = RC(rcExe, rcDoc, rcValidating, rcData, rcEmpty);
+                            } else {
+                                uint32_t i = 0;
+                                while(rc == 0 && i < count) {
+                                    const KXMLNode* n = NULL;
+                                    if( (rc = KXMLNodesetGetNodeRead(ns, &n, i++)) == 0 ) {
+                                        SRAConfigFlags flags = ~0;
+                                        errmsg[0] = '\0';
+                                        rc = XML_ValidateNode((FSNode*)*tree, n, flags, errmsg);
+                                        ReleaseComplain(KXMLNodeRelease, n);
+                                    }
+                                }
+                                if( rc == 0 ) {
+                                    rc = SRAList_NextVersion();
+                                }
+                            }
+                        }
+                        ReleaseComplain(KXMLNodesetRelease, ns);
+                    }
+                    ReleaseComplain(KXMLDocRelease, xmldoc);
+                }
+                if( rc != 0 ) {
+                    FSNode_Release(*tree);
+                    *tree = NULL;
+                }
+            }
+            ReleaseComplain(KFileRelease, file);
+        }
+        ReleaseComplain(KDirectoryRelease, dir);
+    }
+    if( rc == 0 ) {
+        PLOGMSG(klogInfo, (klogInfo, "XML file '$(x)' ok", PLOG_S(x), path));
+    } else {
+        if( strlen(errmsg) < 1 ) {
+            strcpy(errmsg, path);
+        }
+        LOGERR(klogErr, rc, errmsg);
+    }
+    return rc;
+}
+
+static
+rc_t XMLThread( const KThread *self, void *data )
+{
+    KDirectory *dir = NULL;
+
+    PLOGMSG(klogInfo, (klogInfo, "XML sync thread started with $(s) sec", PLOG_U32(s), g_xml_sync));
+    do {
+        rc_t rc = 0;
+        KTime_t dt = 0;
+
+        DEBUG_MSG(8, ("XML sync thread checking %s\n", g_xml_path));
+        if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+            rc = KDirectoryDate(dir, &dt, "%s", g_xml_path);
+            ReleaseComplain(KDirectoryRelease, dir);
+        }
+        if( rc == 0 ) {
+            if( dt != g_xml_mtime ) {
+                const FSNode* new_root = NULL;
+                PLOGMSG(klogInfo, (klogInfo, "File $(f) changed ($(m) <> $(d)), updating...",
+                    PLOG_3(PLOG_S(f),PLOG_I64(m),PLOG_I64(d)), g_xml_path, g_xml_mtime, dt));
+                if( XML_Open(g_xml_path, &new_root) == 0 ) {
+                    if( (rc = XMLLock(true)) == 0 ) {
+                        const FSNode* old_root = g_root;
+                        g_root = new_root;
+                        g_xml_mtime = dt;
+                        XMLUnlock();
+                        FSNode_Release(old_root);
+                        PLOGMSG(klogInfo, (klogInfo, "Data from $(f) updated successfully", PLOG_S(f), g_xml_path));
+                    }
+                }
+            } else {
+                DEBUG_MSG(8, ("XML sync thread up-to-date %s\n", g_xml_path));
+            }
+        } else {
+            LOGERR(klogErr, rc, g_xml_path);
+        }
+        SRAList_PostRefresh();
+        sleep(g_xml_sync);
+    } while( g_xml_sync > 0 );
+    LOGMSG(klogInfo, "XML sync thread ended");
+    return 0;
+}
+
+rc_t XML_Make(KDirectory* dir, const char* const work_dir, const char* xml_path, unsigned int sync, uint32_t xml_validate)
+{
+    rc_t rc = 0; 
+
+    g_xml_sync = sync;
+    if( g_xmlmgr == NULL && (rc = KXMLMgrMakeRead(&g_xmlmgr)) != 0 ) {
+        g_xmlmgr = NULL;
+        LOGERR(klogErr, rc, "XML manager");
+    } else {
+        char buf[4096];
+        if( (rc = KDirectoryResolvePath(dir, true, buf, 4096, "%s", xml_path)) == 0 ) {
+            if( (rc = StrDup(buf, &g_xml_path)) == 0 ) {
+                DEBUG_MSG(8, ("XML path set to '%s'\n", g_xml_path));
+            }
+        }
+        g_start_dir = work_dir;
+        g_xml_validate = xml_validate;
+    }
+    if( rc == 0 ) {
+        rc = FSNode_Make((FSNode**)&g_root, "ROOT", &RootNode_vtbl);
+    }
+    return rc;
+}
+
+void XML_Init(void)
+{
+    rc_t rc = 0;
+
+    if( g_lock == NULL && (rc = KRWLockMake(&g_lock)) != 0 ) {
+        g_lock = NULL;
+        LOGERR(klogErr, rc, "XML lock");
+    }
+    if( (rc = KThreadMake(&g_xml_thread, XMLThread, NULL)) != 0 ) {
+        LOGERR(klogErr, rc, "XML sync thread");
+    }
+}
+
+void XML_Fini(void)
+{
+    g_xml_sync = 0;
+    if( g_xml_thread != NULL ) {
+        ReleaseComplain(KThreadCancel, g_xml_thread);
+        ReleaseComplain(KThreadRelease, g_xml_thread);
+    }
+    ReleaseComplain(KXMLMgrRelease, g_xmlmgr);
+    XMLLock(true);
+    FSNode_Release(g_root);
+    XMLUnlock();
+    ReleaseComplain(KRWLockRelease, g_lock);
+    FREE(g_xml_path);
+
+    g_root = NULL;
+    g_lock = NULL;
+    g_start_dir = NULL;
+    g_xml_mtime = 0;
+    g_xml_path = NULL;
+    g_xml_thread = NULL;
+}
+
+rc_t XML_MgrGet(const KXMLMgr** xmlmgr)
+{
+    if( xmlmgr == NULL ) {
+        return RC(rcExe, rcDoc, rcAccessing, rcParam, rcNull);
+    }
+    if( g_xmlmgr == NULL ) {
+        return RC(rcExe, rcPath, rcAccessing, rcMgr, rcNull);
+    }
+    *xmlmgr = g_xmlmgr;
+    return 0;
+}
+
+rc_t XML_ParseTimestamp(const KXMLNode* xml_node, const char* attr, KTime_t* timestamp, bool optional)
+{
+    rc_t rc;
+    char ts[128];
+    size_t sz;
+
+    if( (rc = KXMLNodeReadAttrCString(xml_node, attr, ts, sizeof(ts), &sz)) == 0 ) {
+        struct tm tm;
+        memset(&tm, 0, sizeof(tm));
+        if( strptime(ts, "%Y-%m-%dT%H:%M:%S", &tm) != NULL ) {
+            *timestamp = mktime(&tm);
+        } else {
+            rc = RC(rcExe, rcDoc, rcReading, rcAttr, rcInvalid);
+        }
+    } else if( optional && GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound ) {
+        rc = 0;
+    }
+    return rc;
+}
+
+rc_t XML_WriteTimestamp(char* dst, size_t bsize, size_t *num_writ, KTime_t ts)
+{
+    struct tm* tm = localtime(&ts);
+
+    *num_writ = strftime(dst, bsize, "%a %Y-%m-%d %H:%M:%S %Z", tm);
+    if( *num_writ < 1 || *num_writ >= bsize ) {
+        return RC(rcExe, rcDoc, rcWriting, rcBuffer, rcInsufficient);
+    }
+    return 0;
+}
+
+rc_t XML_ParseBool(const KXMLNode* xml_node, const char* attr, bool* val, bool optional)
+{
+    rc_t rc;
+    char b[16];
+    size_t sz;
+
+    if( (rc = KXMLNodeReadAttrCString(xml_node, attr, b, sizeof(b), &sz)) == 0 ) {
+        if( strcasecmp(b, "true") == 0 || strcasecmp(b, "on") == 0 || strcasecmp(b, "yes") == 0 ) {
+            *val = true;
+        } else if( strcasecmp(b, "false") == 0 || strcasecmp(b, "off") == 0 || strcasecmp(b, "no") == 0 ) {
+            *val = false;
+        } else {
+            rc = RC(rcExe, rcDoc, rcReading, rcAttr, rcInvalid);
+        }
+    } else if( optional && GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound ) {
+        rc = 0;
+    }
+    return rc;
+}
diff --git a/tools/fuse/xml.h b/tools/fuse/xml.h
new file mode 100644
index 0000000..a945e24
--- /dev/null
+++ b/tools/fuse/xml.h
@@ -0,0 +1,60 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_xml_
+#define _h_sra_fuse_xml_
+
+#include <kxml/xml.h>
+#include <kfs/directory.h>
+
+#include "node.h"
+
+typedef uint32_t EXMLValidate;
+enum {
+    eXML_NoCheck = 0,
+    eXML_NoFail,
+    eXML_Full
+};
+
+rc_t XML_Make(KDirectory* dir, const char* const work_dir, const char* xml_path,
+              unsigned int sync, EXMLValidate xml_validate);
+
+void XML_Init(void);
+
+rc_t XML_FindLock(const char* path, bool recur, const FSNode** node, const char** subpath);
+
+void XML_FindRelease(void);
+
+rc_t XML_MgrGet(const KXMLMgr** xmlmgr);
+
+rc_t XML_ParseTimestamp(const KXMLNode* xml_node, const char* attr, KTime_t* tm, bool optional);
+
+rc_t XML_WriteTimestamp(char* dst, size_t bsize, size_t *num_writ, KTime_t ts);
+
+rc_t XML_ParseBool(const KXMLNode* xml_node, const char* attr, bool* val, bool optional);
+
+void XML_Fini(void);
+
+#endif /* _h_sra_fuse_xml_ */
diff --git a/tools/fuse/zlib-simple.c b/tools/fuse/zlib-simple.c
new file mode 100644
index 0000000..aa671ea
--- /dev/null
+++ b/tools/fuse/zlib-simple.c
@@ -0,0 +1,65 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include "debug.h"
+#include "zlib-simple.h"
+
+rc_t ZLib_DeflateBlock(const char* src, size_t src_sz, char* dst, size_t dst_sz, size_t* written)
+{
+    rc_t rc = 0;
+    z_stream z_strm;
+    int z_err = Z_OK;
+
+    if( src == NULL || dst == NULL || written == NULL ) {
+        rc = RC(rcExe, rcFunction, rcConstructing, rcParam, rcNull);
+    } else {
+        z_strm.next_in = (unsigned char*)src;
+        z_strm.zalloc = Z_NULL;
+        z_strm.zfree = Z_NULL;
+        z_strm.opaque = Z_NULL;
+        z_err = deflateInit2(&z_strm, Z_DEFAULT_COMPRESSION, Z_DEFLATED, 15 + 16, 8, Z_DEFAULT_STRATEGY);
+        if( z_err != Z_OK ) {
+            rc = RC(rcExe, rcFunction, rcConstructing, rcInterface, rcUnexpected);
+            DEBUG_MSG(3, ("deflateInit2: %R %d\n", rc, z_err));
+        } else {
+            z_strm.avail_in = src_sz;
+            z_strm.next_out = (unsigned char*)dst;
+            z_strm.avail_out = dst_sz;
+            if( (z_err = deflate(&z_strm, Z_FINISH)) != Z_STREAM_END ) {
+                rc = RC(rcExe, rcFunction, rcExecuting, rcInterface, rcUnexpected);
+                DEBUG_MSG(3, ("deflate(Z_FINISH): %R %d\n", rc, z_err));
+            }
+            *written = dst_sz - z_strm.avail_out;
+            if( (z_err = deflateEnd(&z_strm)) != Z_OK ) {
+                rc = RC(rcExe, rcFunction, rcDestroying, rcInterface, rcUnexpected);
+                DEBUG_MSG(3, ("deflateEnd: %r %d\n", rc, z_err));
+            }
+        }
+    }
+    return rc;
+}
diff --git a/tools/fuse/zlib-simple.h b/tools/fuse/zlib-simple.h
new file mode 100644
index 0000000..178218d
--- /dev/null
+++ b/tools/fuse/zlib-simple.h
@@ -0,0 +1,33 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_sra_fuse_zlib_simple_
+#define _h_sra_fuse_zlib_simple_
+
+#include <zlib.h>
+
+rc_t ZLib_DeflateBlock(const char* src, size_t src_sz, char* dst, size_t dst_sz, size_t* written);
+
+#endif /* _h_sra_fuse_zlib_simple_ */
diff --git a/tools/general-loader/Makefile b/tools/general-loader/Makefile
new file mode 100644
index 0000000..f852589
--- /dev/null
+++ b/tools/general-loader/Makefile
@@ -0,0 +1,131 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+
+MODULE = tools/general-loader
+
+ALL_LIBS = \
+	general-writer
+
+INT_TOOLS = \
+	gw-dumper
+
+EXT_TOOLS = \
+	general-loader
+
+ALL_TOOLS =      \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@
+
+$(INT_TOOLS): makedirs
+	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
+
+$(EXT_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# std
+#
+$(TARGDIR)/std: \
+	$(addprefix $(LIBDIR)/,$(ALL_LIBS)) \
+	$(addprefix $(BINDIR)/,$(EXT_TOOLS))
+
+.PHONY: $(TARGDIR)/std
+
+#-------------------------------------------------------------------------------
+# all
+#
+$(TARGDIR)/all: \
+	$(addprefix $(LIBDIR)/,$(ALL_LIBS)) \
+	$(addprefix $(TEST_BINDIR)/,$(INT_TOOLS)) \
+	$(addprefix $(BINDIR)/,$(EXT_TOOLS))
+
+.PHONY: $(TARGDIR)/std
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# general-writer
+#
+$(LIBDIR)/general-writer: $(LIBDIR)/$(LPFX)general-writer.$(LIBX)
+
+GEN_WRITER_SRC = \
+    general-writer \
+	utf8-like-int-codec
+
+GEN_WRITER_OBJ = \
+	$(addsuffix .$(LOBX),$(GEN_WRITER_SRC))
+
+$(LIBDIR)/$(LPFX)general-writer.$(LIBX): $(GEN_WRITER_OBJ)
+	$(LD) --slib --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^
+
+#-------------------------------------------------------------------------------
+# gw-dumper
+#
+
+$(TEST_BINDIR)/gw-dumper: $(SRCDIR)/gw-dumper.cpp $(SRCDIR)/utf8-like-int-codec.c
+	c++ $(DBG) -o $@ $^ -I$(SRCDIR) -I$(VDB_INCDIR)/os/$(OS) -I$(VDB_INCDIR)
+
+
+#-------------------------------------------------------------------------------
+# general-loader
+#
+GEN_LOAD_SRC = \
+    general-loader \
+    protocol-parser \
+    database-loader \
+	utf8-like-int-codec \
+	main \
+
+GEN_LOAD_OBJ = \
+	$(addsuffix .$(OBJX),$(GEN_LOAD_SRC))
+
+GEN_LOAD_LIBS = \
+	-sncbi-wvdb-static \
+	-sload \
+	-skapp \
+	-stk-version \
+
+$(BINDIR)/general-loader: $(GEN_LOAD_OBJ)
+	$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(GEN_LOAD_LIBS)
+
diff --git a/tools/general-loader/database-loader.cpp b/tools/general-loader/database-loader.cpp
new file mode 100644
index 0000000..3353ed8
--- /dev/null
+++ b/tools/general-loader/database-loader.cpp
@@ -0,0 +1,894 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ * 
+ */
+
+#include "general-loader.hpp"
+
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <klib/time.h>
+
+#include <kdb/meta.h>
+#include <kdb/table.h>
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/database.h>
+#include <vdb/cursor.h>
+#include <vdb/table.h>
+#include <vdb/vdb-priv.h>
+
+#include <kapp/loader-meta.h>
+#include <kapp/main.h>
+
+#include <algorithm>
+
+using namespace std;
+
+///////////// GeneralLoader::DatabaseLoader
+
+GeneralLoader :: DatabaseLoader :: DatabaseLoader ( const std::string&  p_programName, 
+                                                    const Paths&        p_includePaths, 
+                                                    const Paths&        p_schemas, 
+                                                    const std::string&  p_dbNameOverride )
+:   m_includePaths ( p_includePaths ),
+    m_schemas ( p_schemas ),
+    m_programName ( p_programName ),
+    m_databaseName ( p_dbNameOverride ), // if specified, overrides the database path coming in from the stream
+    m_softwareVersion ( 0 ),
+    m_mgr ( 0 ),
+    m_schema ( 0 ),
+    m_databaseNameOverridden ( ! m_databaseName.empty() ) 
+{
+    m_databases . insert ( Databases :: value_type ( 0, (VDatabase*)0 ) ); // reserve root database
+}
+
+GeneralLoader :: DatabaseLoader :: ~DatabaseLoader ()
+{
+    m_tables . clear();
+    m_columns . clear ();
+    
+    for ( Cursors::iterator it = m_cursors . begin(); it != m_cursors . end(); ++it )
+    {
+        VCursorRelease ( *it );
+    }
+
+    for ( Databases::iterator it = m_databases . begin(); it != m_databases . end(); ++it )
+    {
+        VDatabaseRelease ( it -> second );
+    }
+    
+    if ( m_schema != 0 )
+    {
+        VSchemaRelease ( m_schema );
+        m_schema = 0;
+    }
+    
+    if ( m_mgr != 0 )
+    {
+        VDBManagerRelease ( m_mgr );
+        m_mgr = 0;
+    }
+}
+
+const GeneralLoader :: DatabaseLoader :: Column* 
+GeneralLoader :: DatabaseLoader :: GetColumn ( uint32_t p_columnId ) const
+{
+    Columns::const_iterator curIt = m_columns . find ( p_columnId );
+    if ( curIt != m_columns . end () )
+    {
+        return & curIt -> second;
+    }
+    else
+    {
+        return 0;
+    }
+}
+
+rc_t 
+GeneralLoader :: DatabaseLoader :: UseSchema ( const string& p_file, const string& p_name )
+{
+    pLogMsg ( klogDebug, "database-loader: schema file '$(s1)', name '$(s2)'", "s1=%s,s2=%s", 
+                        p_file . c_str (), p_name . c_str () );
+
+    rc_t rc = VDBManagerMakeUpdate ( & m_mgr, NULL );
+    if ( rc == 0 )
+    {
+        for ( Paths::const_iterator it = m_includePaths . begin(); it != m_includePaths . end(); ++it )
+        {   
+            rc = VDBManagerAddSchemaIncludePath ( m_mgr, "%s", it -> c_str() );
+            if ( rc == 0 )
+            {
+                pLogMsg ( klogDebug, 
+                          "database-loader: Added schema include path '$(s)'", 
+                          "s=%s", 
+                          it -> c_str() );
+            }
+            else if ( GetRCObject ( rc ) == (RCObject)rcPath )
+            {
+                pLogMsg ( klogWarn, 
+                          "database-loader: Schema include path not found: '$(s)'", 
+                          "s=%s", 
+                          it -> c_str() );
+                rc = 0;
+            }
+            else
+            {
+                return rc;
+            }
+        }
+        
+        rc = VDBManagerMakeSchema ( m_mgr, & m_schema );
+        if ( rc  == 0 )
+        {
+            bool found = false;
+            if ( ! p_file . empty () )
+            {
+                rc = VSchemaParseFile ( m_schema, "%s", p_file . c_str () );
+                if ( rc == 0 )
+                {
+                    pLogMsg ( klogDebug, 
+                              "database-loader: Added schema file '$(s)'", 
+                              "s=%s", 
+                              p_file . c_str () );
+                    found = true;
+                }
+                else if ( GetRCObject ( rc ) == (RCObject)rcPath && GetRCState ( rc ) == rcNotFound )
+                {
+                    pLogMsg ( klogWarn, 
+                              "database-loader: Schema file not found: '$(s)'", 
+                              "s=%s", 
+                              p_file . c_str () );
+                    rc = 0;
+                }
+            }
+            // if p_file is empty, there should be other schema files specified externally 
+            // through the command line options, in m_schemas
+            
+            if ( rc  == 0 )
+            {
+                for ( Paths::const_iterator it = m_schemas. begin(); it != m_schemas . end(); ++it )
+                {   
+                    rc = VSchemaParseFile ( m_schema, "%s", it -> c_str() );
+                    if ( rc == 0 )
+                    {
+                        pLogMsg ( klogDebug, 
+                                  "database-loader: Added schema file '$(s)'", 
+                                  "s=%s", 
+                                  it -> c_str() );
+                        found = true;
+                    }
+                    else if ( GetRCObject ( rc ) == (RCObject)rcPath && GetRCState ( rc ) == rcNotFound )
+                    {
+                        pLogMsg ( klogWarn, 
+                                  "database-loader: Schema file not found: '$(s)'", 
+                                  "s=%s", 
+                                  it -> c_str() );
+                        rc = 0;
+                    }
+                }
+            }
+            
+            if ( found )
+            {
+                m_schemaName = p_name;
+            }
+            else
+            {
+                rc = RC ( rcVDB, rcMgr, rcCreating, rcSchema, rcNotFound );
+            }
+        }
+    }
+    return rc;
+}                        
+
+rc_t 
+GeneralLoader :: DatabaseLoader :: RemotePath ( const string& p_path )
+{
+    if ( m_databaseNameOverridden )
+    {
+        pLogMsg ( klogWarn, 
+                  "database-loader: remote  path '$(s1)' ignored, overridden to '$(s2)'", 
+                  "s1=%s,s2=%s", 
+                  p_path . c_str (), m_databaseName . c_str () );
+    }
+    else
+    {
+        pLogMsg ( klogDebug, "database-loader: remote  path '$(s1)'", "s1=%s", p_path . c_str () );
+        m_databaseName = p_path;
+    }
+    return 0;
+}
+
+static 
+void 
+check_vers_component ( const char * vers, const char * end, long num, unsigned long max, char term )
+{
+    if ( vers == end )
+        throw "bad version";
+    if ( * end != 0 && * end != term )
+        throw "bad version";
+    if ( num < 0 || (unsigned long)num > max )
+        throw "bad version";
+}
+
+static 
+ver_t 
+string2ver_t ( const char * vers )
+{
+    ver_t ret = 0;
+    char * end;
+    long num = strtol ( vers, & end, 10 );
+    check_vers_component ( vers, end, num, 255, '.' );
+    if ( * end == '.' )
+    {
+        ret = num << 24;
+        vers = end + 1;
+        num = strtol ( vers, & end, 10 );
+        check_vers_component ( vers, end, num, 255, '.' );
+        if ( * end == '.' )
+        {
+            ret |= num << 16;
+            vers = end + 1;
+            num = strtol ( vers, & end, 10 );
+            check_vers_component ( vers, end, num, 0xFFFF, 0 );
+            ret |= num;
+        }
+    }
+    return ret;
+}
+
+rc_t
+GeneralLoader :: DatabaseLoader :: SoftwareName ( const string& p_name, const string& p_version )
+{
+    pLogMsg ( klogDebug, "database-loader: SoftwareName '$(n)', version '$(v)'", "n=%s,v=%s", p_name . c_str(), p_version . c_str() );
+    try
+    {   
+        m_softwareVersion = string2ver_t ( p_version.c_str() );
+    }
+    catch (...)
+    {
+        return RC ( rcExe, rcDatabase, rcCreating, rcMessage, rcBadVersion );
+    }
+    m_softwareName = p_name;
+    return 0;
+}
+
+rc_t 
+GeneralLoader :: DatabaseLoader :: NewTable ( uint32_t p_tableId, const string& p_tableName )
+{   
+    return AddMbrTbl ( p_tableId, 0, p_tableName, p_tableName, kcmCreate | kcmMD5 );
+}
+
+rc_t 
+GeneralLoader :: DatabaseLoader :: NewColumn ( uint32_t p_columnId, uint32_t p_tableId, uint32_t p_elemBits, uint8_t p_flagBits, const string& p_columnName )
+{
+    pLogMsg ( klogDebug, "database-loader: adding column '$(c)'", "c=%s", p_columnName . c_str() );
+    
+    rc_t rc = 0;
+    Tables::const_iterator table = m_tables . find ( p_tableId );
+    if ( table != m_tables . end() )
+    {
+        if ( m_columns . find ( p_columnId ) == m_columns . end () )
+        {
+            uint32_t cursor_idx = table -> second . cursorIdx;
+            uint32_t column_idx;
+            rc = VCursorAddColumn ( m_cursors [ cursor_idx ], 
+                                    & column_idx, 
+                                    "%s", 
+                                    p_columnName . c_str() );
+            if ( rc == 0  )
+            {
+                Column col;
+                col . name      = p_columnName;
+                col . tableId   = p_tableId;
+                col . cursorIdx = cursor_idx;
+                col . columnIdx = column_idx;
+                col . elemBits  = p_elemBits;
+                col . flagBits  = p_flagBits;
+                m_columns [ p_columnId ] = col;
+                pLogMsg ( klogDebug, 
+                          "database-loader: tableId = $(t), added column '$(c)', columnIdx = $(i1), elemBits = $(i2), flagBits = $(i3)",  
+                          "t=%u,c=%s,i1=%u,i2=%u,i3=%u",  
+                          p_tableId, p_columnName . c_str(), col.columnIdx, col.elemBits, col.flagBits );
+            }
+        }
+        else
+        {
+            rc = RC ( rcExe, rcFile, rcReading, rcColumn, rcExists );
+        }
+    }
+    else
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcTable, rcInvalid );
+    }
+    return rc;
+}
+
+rc_t
+GeneralLoader :: DatabaseLoader :: AddMbrDB ( uint32_t p_objId, uint32_t p_parentId, const std :: string &p_mbrName, const std :: string &p_dbName, uint8_t p_createMode )
+{
+    pLogMsg ( klogDebug, 
+              "database-loader: adding database id=$(i) parent=$(p) mbrName='$(m)' dbName='$(n)' mode=$(d)", 
+              "m=%s,n=%s,i=%u,p=%u,d=%u", 
+              p_objId, p_parentId, p_mbrName . c_str(), p_dbName . c_str (), ( unsigned int ) p_createMode );
+    
+    rc_t rc = MakeDatabase ( p_parentId );
+    if ( rc == 0 )
+    {
+        Databases :: const_iterator dad = m_databases . find ( p_parentId );
+        assert ( dad != m_databases . end () );
+        
+        if ( m_databases . find ( p_objId ) == m_databases . end () )
+        {
+            VDatabase *db;
+            rc = VDatabaseCreateDB ( dad -> second, & db, p_mbrName . c_str(), p_createMode, "%s", p_dbName . c_str () );
+            if ( rc == 0 )
+            {
+                m_databases . insert ( Databases :: value_type ( p_objId, db ) );
+                m_dbParents . insert ( DatabaseToParent :: value_type ( p_objId, p_parentId ) );
+            }
+        }
+        else
+        {
+            rc = RC ( rcExe, rcFile, rcReading, rcDatabase, rcExists );
+        }
+    }
+    
+    return rc;
+}
+
+rc_t
+GeneralLoader :: DatabaseLoader :: AddMbrTbl ( uint32_t p_tblId, uint32_t p_dbId, const std :: string &p_mbrName, const std :: string &p_tblName, uint8_t p_createMode )
+{
+    pLogMsg ( klogDebug, 
+              "database-loader: adding table id=$(i) parent=$(p) mbrName='$(m)' dbName='$(n)' mode=$(d)", 
+              "m=%s,n=%s,i=%u,p=%u,d=%u", 
+              p_mbrName . c_str(), p_tblName . c_str (), p_tblId, p_dbId, ( unsigned int ) p_createMode );
+
+    rc_t rc = 0;
+    if ( m_tables . find ( p_tblId ) == m_tables . end() )
+    {
+        VTable* table;
+        rc = MakeDatabase ( p_dbId ); 
+        if ( rc == 0 )
+        {
+            Databases::iterator it = m_databases . find ( p_dbId ); 
+            if ( it != m_databases . end() )
+            {
+                rc = VDatabaseCreateTable ( it -> second , & table, p_mbrName . c_str (), p_createMode, "%s", p_tblName . c_str ());
+                if ( rc == 0 )
+                {
+                    VCursor* cursor;
+                    rc = VTableCreateCursorWrite ( table, & cursor, kcmInsert );
+                    if ( rc == 0 )
+                    {
+                        m_cursors . push_back ( cursor );
+                        Table t;
+                        t . name = p_tblName;
+                        t . databaseId = p_dbId;
+                        t . cursorIdx = ( uint32_t ) m_cursors . size() - 1;
+                        m_tables [ p_tblId ] = t;
+                    }
+                    rc_t rc2 = VTableRelease ( table );
+                    if ( rc == 0 )
+                    {
+                        rc = rc2;
+                    }
+                }
+            }
+            else
+            {
+                rc = RC ( rcExe, rcFile, rcReading, rcDatabase, rcNotFound );
+            }
+        }
+    }
+    else
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcTable, rcExists );
+    }
+
+    return rc;
+}
+
+static 
+rc_t WriteMetadata ( KMetadata* p_meta, const string& p_metadata_node, const string& p_value )
+{
+    KMDataNode* node;
+    rc_t rc = KMetadataOpenNodeUpdate ( p_meta, & node, p_metadata_node . c_str () );
+    if ( rc == 0 )
+    {
+        rc = KMDataNodeWrite ( node, p_value . c_str (), p_value . size () );
+    
+        rc_t rc2 = KMDataNodeRelease ( node );
+        if ( rc == 0 )
+        {
+            rc = rc2;
+        }
+    }
+    return rc;
+}
+
+rc_t
+GeneralLoader :: DatabaseLoader :: DBMetadataNode ( uint32_t p_objId, const string& p_metadata_node, const string& p_value )
+{
+    pLogMsg ( klogDebug, 
+              "database-loader: adding metadata node '$(n)=$(v)' to database $(i)", 
+              "n=%s,v=%s,i=%u", 
+              p_metadata_node . c_str(), p_value.c_str(), p_objId );
+              
+    rc_t rc = 0;
+    Databases::iterator it = m_databases . find ( p_objId ); 
+    if ( it != m_databases . end() )
+    {
+        struct KMetadata* meta;
+        rc = VDatabaseOpenMetadataUpdate ( it -> second, & meta );
+        if ( rc == 0 )
+        {
+            rc = WriteMetadata ( meta,p_metadata_node, p_value );
+            rc_t rc2 = KMetadataRelease ( meta );
+            if ( rc == 0 )
+            {
+                rc = rc2;
+            }
+        }
+    }
+    else
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcDatabase, rcNotFound );
+    }
+    
+    return rc;
+}
+
+rc_t
+GeneralLoader :: DatabaseLoader :: TblMetadataNode ( uint32_t p_objId, const string& p_metadata_node, const string& p_value )
+{
+    pLogMsg ( klogDebug, 
+              "database-loader: adding metadata node '$(n)=$(v)' to table $(i)", 
+              "n=%s,v=%s,i=%u", 
+              p_metadata_node . c_str(), p_value.c_str(), p_objId );
+              
+    rc_t rc = 0;
+    Tables::iterator it = m_tables . find ( p_objId ); 
+    if ( it != m_tables . end() )
+    {
+        struct VTable* tbl;
+        assert ( m_cursors [ it -> second . cursorIdx ] );
+        rc = VCursorOpenParentUpdate ( m_cursors [ it -> second . cursorIdx ], &tbl );
+        if ( rc == 0 )
+        {
+            struct KMetadata* meta;
+            rc = VTableOpenMetadataUpdate ( tbl, & meta );
+            if ( rc == 0 )
+            {
+                rc = WriteMetadata ( meta,p_metadata_node, p_value );
+                rc_t rc2 = KMetadataRelease ( meta );
+                if ( rc == 0 )
+                {
+                    rc = rc2;
+                }
+            }
+            rc_t rc2 = VTableRelease ( tbl );
+            if ( rc == 0 )
+            {
+                rc = rc2;
+            }
+        }
+    }
+    else
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcTable, rcNotFound );
+    }
+    
+    return rc;
+}
+
+rc_t
+GeneralLoader :: DatabaseLoader :: ColMetadataNode ( uint32_t p_objId, const string& p_metadata_node, const string& p_value )
+{
+    pLogMsg ( klogDebug, 
+              "database-loader: adding metadata node '$(n)=$(v)' to column $(i)", 
+              "n=%s,v=%s,i=%u", 
+              p_metadata_node . c_str(), p_value.c_str(), p_objId );
+    
+    rc_t rc = 0;
+    Columns::iterator it = m_columns . find ( p_objId ); 
+    if ( it != m_columns . end() )
+    {
+        it -> second . metadata [ p_metadata_node ] = p_value;
+    }
+    else
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcColumn, rcNotFound );
+    }
+    
+    return rc;
+}
+
+rc_t
+GeneralLoader :: DatabaseLoader :: SaveColumnMetadata ( const Column& p_col )
+{
+    if ( p_col . metadata . size () == 0 )
+    {
+        return 0;
+    }
+    
+    assert ( m_tables . find ( p_col . tableId ) != m_tables.end() );
+    const Table& t = m_tables [ p_col . tableId ];
+    
+    assert ( m_databases . find ( t . databaseId ) != m_databases.end() );
+    assert ( m_databases . find ( t . databaseId ) -> second != 0 );
+    
+    VTable* table;
+    rc_t rc = VDatabaseOpenTableUpdate ( m_databases [ t . databaseId ], & table, t . name . c_str () );   
+    if ( rc == 0 )
+    {
+        KTable* ktbl;
+        rc = VTableOpenKTableUpdate ( table, & ktbl );
+        if ( rc == 0 )
+        {
+            KColumn* col;
+            rc = KTableOpenColumnUpdate ( ktbl, & col, p_col . name . c_str () );
+            if ( rc == 0 )
+            {   
+                KMetadata *meta;
+                rc = KColumnOpenMetadataUpdate ( col, &meta );
+                if ( rc == 0 )
+                {
+                    for ( Column :: Metadata :: const_iterator it = p_col . metadata . begin(); it != p_col . metadata . end(); ++ it )
+                    {
+                        rc = WriteMetadata ( meta, it -> first . c_str (), it -> second . c_str () );
+                        if ( rc != 0 )
+                        {
+                            break;
+                        }
+                    }
+                    rc_t rc2 = KMetadataRelease ( meta );
+                    if ( rc == 0 )
+                    {
+                        rc = rc2;
+                    }
+                }
+                rc_t rc2 = KColumnRelease ( col );
+                if ( rc == 0 )
+                {
+                    rc = rc2;
+                }
+            }
+            rc_t rc2 = KTableRelease ( ktbl );
+            if ( rc == 0 )
+            {
+                rc = rc2;
+            }
+        }
+        rc_t rc2 = VTableRelease ( table );
+        if ( rc == 0 )
+        {
+            rc = rc2;
+        }
+    }
+    return rc;
+}
+
+rc_t 
+GeneralLoader :: DatabaseLoader :: CursorWrite ( const struct Column& p_col, const void* p_data, size_t p_size )
+{
+    return VCursorWrite ( m_cursors [ p_col . cursorIdx ], 
+                          p_col . columnIdx, 
+                          p_col . elemBits, 
+                          p_data, 
+                          0, 
+                          p_size );
+}
+
+rc_t 
+GeneralLoader :: DatabaseLoader :: CursorDefault ( const struct Column& p_col, const void* p_data, size_t p_size )
+{
+    return VCursorDefault ( m_cursors [ p_col . cursorIdx ], 
+                            p_col . columnIdx, 
+                            p_col . elemBits, 
+                            p_data, 
+                            0, 
+                            p_size );
+}
+
+rc_t 
+GeneralLoader :: DatabaseLoader :: CellData ( uint32_t p_columnId, const void* p_data, size_t p_elemCount )
+{
+    rc_t rc = 0;
+    Columns::const_iterator curIt = m_columns . find ( p_columnId );
+    if ( curIt != m_columns . end () )
+    {
+        const Column& col = curIt -> second;
+        pLogMsg ( klogDebug,     
+                  "database-loader: columnIdx = $(i), elem size=$(s) bits, elem count=$(c)",
+                  "i=%u,s=%u,c=%u", 
+                  col . columnIdx, col . elemBits, p_elemCount );
+        rc = CursorWrite ( col, p_data, p_elemCount );
+    }
+    else
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcColumn, rcNotFound );
+    }
+    return rc;
+}
+
+rc_t 
+GeneralLoader :: DatabaseLoader :: CellDefault ( uint32_t p_columnId, const void* p_data, size_t p_elemCount )
+{   //TODO: this and Handle_CellData are almost identical - refactor
+    rc_t rc = 0;
+    Columns::const_iterator curIt = m_columns . find ( p_columnId );
+    if ( curIt != m_columns . end () )
+    {
+        const Column& col = curIt -> second;
+        pLogMsg ( klogDebug,     
+                  "database-loader: columnIdx = $(i), elem size=$(s) bits, elem count=$(c)",
+                  "i=%u,s=%u,c=%u", 
+                  col . columnIdx, col . elemBits, p_elemCount );
+        rc = CursorDefault ( col, p_data, p_elemCount );
+    }
+    else
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcColumn, rcNotFound );
+    }
+    return rc;
+}
+
+rc_t 
+GeneralLoader :: DatabaseLoader :: MakeDatabase( uint32_t p_id )
+{
+    rc_t rc = 0;
+
+    Databases::iterator it = m_databases . find ( p_id ); 
+    if ( it != m_databases . end() )
+    {
+        VDatabase*& db = it -> second;
+        if ( db == 0 ) // only create once
+        {
+            rc = VDBManagerCreateDB ( m_mgr, 
+                                      & db, 
+                                      m_schema, 
+                                      m_schemaName . c_str (), 
+                                      kcmInit + kcmMD5, 
+                                      "%s", 
+                                      m_databaseName . c_str () );
+            if ( rc == 0 && p_id == 0 )
+            {   // populate the root database's metadata
+                struct KMetadata* meta;
+                rc = VDatabaseOpenMetadataUpdate ( db, &meta );
+                if ( rc == 0 )
+                {
+                    KMDataNode *node;
+                    rc = KMetadataOpenNodeUpdate ( meta, &node, "/" );
+                
+                    if (rc == 0) 
+                    {
+                        rc = KLoaderMeta_WriteWithVersion ( node, m_programName.c_str(), __DATE__, KAppVersion(), m_softwareName.c_str(), m_softwareVersion );
+                        KMDataNodeRelease(node);
+                    }
+                    
+                    rc_t rc2 = KMetadataRelease ( meta );
+                    if ( rc == 0 )
+                    {
+                        rc = rc2;
+                    }
+                }
+            }
+        }
+    }
+    else
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcDatabase, rcNotFound );
+    }
+    return rc;
+}
+
+rc_t 
+GeneralLoader :: DatabaseLoader :: OpenStream ()
+{
+    pLogMsg ( klogDebug, 
+              "database-loader: Database created, schema spec='$(s)', database='$(d)'", 
+              "s=%s,d=%s", 
+              m_schemaName . c_str (), m_databaseName . c_str () );
+              
+    rc_t rc = MakeDatabase ( 0 );
+    if ( rc == 0 )
+    {
+        for ( Cursors::iterator it = m_cursors . begin(); it != m_cursors . end(); ++it )
+        {
+            rc_t rc = VCursorOpen ( *it  );
+            if ( rc != 0 )
+            {
+                return rc;
+            }
+            rc = VCursorOpenRow ( *it );
+            if ( rc != 0 )
+            {
+                break;
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t 
+GeneralLoader :: DatabaseLoader :: CloseStream ()
+{
+    rc_t rc = 0;
+    rc_t rc2 = 0;
+    
+    for ( Cursors::iterator it = m_cursors . begin(); it != m_cursors . end(); ++it )
+    {
+        rc = VCursorCloseRow ( *it );
+        if ( rc == 0 )
+        {
+            rc = VCursorCommit ( *it );
+            if ( rc == 0 )
+            {
+                struct VTable* table;
+                rc = VCursorOpenParentUpdate ( *it, &table );
+                if ( rc == 0 )
+                {
+                    rc = VCursorRelease ( *it );
+                    if ( rc == 0 )
+                    {
+                        rc = VTableReindex ( table );
+                    }
+                }
+                rc2 = VTableRelease ( table );
+                if ( rc == 0 )
+                {
+                    rc = rc2;
+                }
+            }
+        }
+        if ( rc != 0 )
+        {
+            break;
+        }
+    }
+    m_cursors . clear ();
+    
+    if ( rc == 0 )
+    {   // save column-level metadata collected from ColMetadata events
+        for ( Columns::iterator it = m_columns. begin(); it != m_columns. end(); ++it )
+        {
+            rc = SaveColumnMetadata ( it -> second );
+            if ( rc != 0 )
+            {
+                break;
+            }
+        }
+    }
+    
+    for ( Databases::iterator it = m_databases . begin(); it != m_databases . end(); ++it )
+    {
+        VDatabaseRelease ( it -> second );
+    }
+    m_databases . clear();
+
+    return rc;
+}
+
+rc_t 
+GeneralLoader :: DatabaseLoader :: NextRow ( uint32_t p_tableId )
+{
+    rc_t rc = 0;
+    Tables::const_iterator table = m_tables . find ( p_tableId );
+    if ( table != m_tables . end() )
+    {
+        VCursor * cursor = m_cursors [ table -> second . cursorIdx ];
+        rc = VCursorCommitRow ( cursor );
+        if ( rc == 0 )
+        {
+            rc = VCursorCloseRow ( cursor );
+            if ( rc == 0 )
+            {
+                rc = VCursorOpenRow ( cursor );
+            }
+        }
+    }
+    else
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcTable, rcNotFound );
+    }
+    return rc;
+}
+
+rc_t 
+GeneralLoader :: DatabaseLoader :: MoveAhead ( uint32_t p_tableId, uint64_t p_count )
+{
+    rc_t rc = 0;
+    Tables::const_iterator table = m_tables . find ( p_tableId );
+    if ( table != m_tables . end() )
+    {
+        VCursor * cursor = m_cursors [ table -> second . cursorIdx ];
+        for ( uint64_t i = 0; i < p_count; ++i )
+        {   // for now, simulate proper handling (this will commit the current row and insert count-1 empty rows)
+            rc = VCursorCommitRow ( cursor );
+            if ( rc != 0 )
+            {
+                break;
+            }
+            rc = VCursorCloseRow ( cursor );
+            if ( rc != 0 )
+            {
+                break;
+            }
+            rc = VCursorOpenRow ( cursor );
+            if ( rc != 0 )
+            {
+                break;
+            }
+        }
+    }
+    else
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcTable, rcNotFound );
+    }
+    return rc;
+}
+
+rc_t 
+GeneralLoader :: DatabaseLoader :: ErrorMessage ( const string & p_text )
+{
+    pLogMsg ( klogErr, "general-loader: error \"$(t)\"", "t=%s", p_text . c_str () );
+    return RC ( rcExe, rcFile, rcReading, rcError, rcExists );
+}
+
+rc_t
+GeneralLoader :: DatabaseLoader :: LogMessage ( const string & p_text )
+{
+    pLogMsg ( klogInfo, "general-loader: log from $(s): \"$(t)\"", "s=%s,t=%s", m_softwareName . c_str (), p_text . c_str () );
+    return 0;
+}
+
+
+/*
+<Log>
+  <status app="sra-stat" message="processed 12%" pid="60234"
+        timestamp="2015-09-21T19:49:45" version="2.5.1" percent="12"/>
+</Log>
+ */
+rc_t
+GeneralLoader :: DatabaseLoader :: ProgressMessage ( const std :: string& p_name, uint32_t p_pid,  
+                                                     uint32_t p_timestamp, uint32_t p_version, uint32_t p_percent )
+{
+    KTime kt;
+    KTimeLocal ( &kt, ( KTime_t ) p_timestamp );
+
+    pLogMsg ( klogInfo, 
+              "processed $(percent)%"
+              ,
+              "app=%s,pid=%u,timestamp=%lT,version=%V,percent=%u"
+              , 
+              p_name . c_str (),
+              p_pid,
+              & kt,
+              ( ver_t ) p_version,
+              p_percent );
+    return 0;
+}
diff --git a/tools/general-loader/general-loader.cpp b/tools/general-loader/general-loader.cpp
new file mode 100644
index 0000000..74f2512
--- /dev/null
+++ b/tools/general-loader/general-loader.cpp
@@ -0,0 +1,223 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ * 
+ */
+
+#include "general-loader.hpp"
+
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include <kns/stream.h>
+
+#include <kfs/directory.h>
+
+#include "general-writer.h"
+
+using namespace std;
+
+///////////// GeneralLoader::Reader
+
+GeneralLoader::Reader::Reader( const struct KStream& p_input )
+:   m_input ( p_input ),
+    m_buffer ( 0 ),
+    m_bufSize ( 0 ),
+    m_readCount ( 0 )
+{
+    KStreamAddRef ( & m_input );
+}
+
+GeneralLoader::Reader::~Reader()
+{
+    KStreamRelease ( & m_input );
+    free ( m_buffer );
+}
+
+rc_t 
+GeneralLoader::Reader::Read( void * p_buffer, size_t p_size )
+{
+    pLogMsg ( klogDebug, 
+             "general-loader: reading $(s) bytes, offset=$(o)", 
+             "s=%u,o=%lu", 
+             ( unsigned int ) p_size, m_readCount );
+
+    m_readCount += p_size;
+    return KStreamReadExactly ( & m_input, p_buffer, p_size );
+}
+
+rc_t 
+GeneralLoader::Reader::Read( size_t p_size )
+{
+    if ( p_size > m_bufSize )
+    {
+        m_buffer = realloc ( m_buffer, p_size );
+        if ( m_buffer == 0 )
+        {
+            m_bufSize = 0;
+            m_readCount = 0;
+            return RC ( rcExe, rcFile, rcReading, rcMemory, rcExhausted );
+        }
+    }
+    
+    pLogMsg ( klogDebug, "general-loader: reading $(s) bytes", "s=%u", ( unsigned int ) p_size );
+    
+    m_readCount += p_size;
+    return KStreamReadExactly ( & m_input, m_buffer, p_size );
+}
+
+void 
+GeneralLoader::Reader::Align( uint8_t p_bytes )
+{
+    if ( m_readCount % p_bytes != 0 )
+    {
+        Read ( p_bytes - m_readCount % p_bytes );
+    }
+}
+
+
+///////////// GeneralLoader
+
+GeneralLoader::GeneralLoader ( const std::string& p_programName, const struct KStream& p_input )
+:   m_programName ( p_programName ),
+    m_reader ( p_input )
+{
+}
+
+GeneralLoader::~GeneralLoader ()
+{
+}
+
+void 
+GeneralLoader::SetTargetOverride( const std::string& p_path )
+{
+    m_targetOverride = p_path;
+}
+
+void
+GeneralLoader::SplitAndAdd( Paths& p_paths, const string& p_path )
+{
+    size_t startPos = 0;
+    size_t colonPos = p_path . find ( ':', startPos );
+    while ( colonPos != string::npos )
+    {
+        p_paths . push_back ( p_path . substr ( startPos, colonPos - startPos ) );
+        startPos = colonPos + 1;
+        colonPos = p_path . find ( ':', startPos );    
+    }
+    p_paths . push_back ( p_path . substr ( startPos ) );
+}
+
+void 
+GeneralLoader::AddSchemaIncludePath( const string& p_path )
+{
+    SplitAndAdd ( m_includePaths, p_path );
+}
+
+void 
+GeneralLoader::AddSchemaFile( const string& p_path )
+{
+    SplitAndAdd ( m_schemas, p_path );
+}
+
+rc_t 
+GeneralLoader::Run()
+{
+    bool packed;
+    rc_t rc = ReadHeader ( packed );
+    if ( rc == 0 ) 
+    {
+        DatabaseLoader loader ( m_programName, m_includePaths, m_schemas, m_targetOverride );
+        if ( packed )
+        {
+            PackedProtocolParser p;
+            rc = p . ParseEvents ( m_reader, loader );
+        }
+        else
+        {
+            UnpackedProtocolParser p;
+            rc = p . ParseEvents ( m_reader, loader );
+        }
+    
+        if ( rc != 0 && ! loader . GetDatabaseName() . empty () )
+        {
+            KDirectory* wd;
+            KDirectoryNativeDir ( & wd );
+            KDirectoryRemove ( wd, true, loader . GetDatabaseName() . c_str () );
+            KDirectoryRelease ( wd );
+        }
+    }
+    
+    return rc;
+}
+
+rc_t 
+GeneralLoader::ReadHeader ( bool& p_packed )
+{
+    struct gw_header_v1 header;
+
+    rc_t rc = m_reader . Read ( & header, sizeof header );
+    if ( rc == 0 )
+    { 
+        if ( strncmp ( header . dad . signature, GeneralLoaderSignatureString, sizeof ( header . dad . signature ) ) != 0 )
+        {
+            rc = RC ( rcExe, rcFile, rcReading, rcHeader, rcCorrupt );
+        }
+        else 
+        {
+            switch ( header . dad . endian )
+            {
+            case GW_GOOD_ENDIAN:
+                if ( header . dad . version > GW_CURRENT_VERSION ) /* > comparison so it can read multiple versions */
+                {
+                    rc = RC ( rcExe, rcFile, rcReading, rcHeader, rcBadVersion );
+                }
+                else
+                {
+                    rc = 0;
+                }
+                break;
+            case GW_REVERSE_ENDIAN:
+                LogMsg ( klogErr, "general-loader event: Detected reverse endianness (not yet supported)" );
+                rc = RC ( rcExe, rcFile, rcReading, rcFormat, rcUnsupported );
+                //TODO: apply byte order correction before checking the version number
+                break;
+            default:
+                rc = RC ( rcExe, rcFile, rcReading, rcFormat, rcInvalid );
+                break;
+            }
+        }
+    }
+    
+    if ( rc == 0 && header . dad . hdr_size > sizeof header ) 
+    {   
+        rc = m_reader . Read ( header . dad . hdr_size - sizeof header );
+    }
+    
+    if ( rc == 0 )
+    {
+        p_packed = header. packing != 0;
+    }
+    
+    return rc;
+}
diff --git a/tools/general-loader/general-loader.hpp b/tools/general-loader/general-loader.hpp
new file mode 100644
index 0000000..314e782
--- /dev/null
+++ b/tools/general-loader/general-loader.hpp
@@ -0,0 +1,243 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ * 
+ */
+
+#ifndef _sra_tools_hpp_general_loader_
+#define _sra_tools_hpp_general_loader_
+
+#include <klib/defs.h>
+
+#include <string>
+#include <vector>
+#include <map>
+
+struct KStream;
+struct VCursor;
+struct VDatabase;
+struct VDBManager;
+struct VSchema;
+
+#define GeneralLoaderSignatureString GW_SIGNATURE
+
+class GeneralLoader
+{
+public:
+    static const uint32_t MaxPackedString = 256;
+    
+public:
+    GeneralLoader ( const std :: string& p_programName, const struct KStream& p_input );
+    ~GeneralLoader ();
+    
+    void AddSchemaIncludePath( const std::string& p_path );
+    void AddSchemaFile( const std::string& p_file );
+    void SetTargetOverride( const std::string& p_path );
+    
+    rc_t Run ();
+    
+private:
+
+    typedef std::vector < std::string > Paths;
+
+private:    
+
+    class Reader
+    {
+    public:
+        Reader( const struct KStream& p_input );
+        ~Reader();
+        
+        // read into caller's buffer
+        rc_t Read( void * p_buffer, size_t p_size ); 
+        
+        // if rc == 0, there are p_size bytes available through GetBuffer until the next call to Read
+        rc_t Read( size_t p_size ); 
+        
+        const void* GetBuffer() const { return m_buffer; }
+        
+        void Align( uint8_t p_bytes = 4 );
+        
+        uint64_t GetReadCount() { return m_readCount; }
+        
+    private:
+        const struct KStream& m_input;
+        void* m_buffer;
+        size_t m_bufSize;
+        uint64_t m_readCount;
+    };
+    
+    class DatabaseLoader
+    {
+    public:
+        struct Table
+        {
+            std :: string name;
+            uint32_t databaseId; // key into Databases
+            uint32_t cursorIdx;   
+        };
+        
+        struct Column
+        {
+            std :: string name;
+            
+            uint32_t tableId;       // key into Tables
+            uint32_t cursorIdx;     // index into Cursors
+            uint32_t columnIdx;     // index in the VCursor
+            uint32_t elemBits;
+            uint32_t flagBits;
+            
+            typedef std :: map < std :: string, std :: string > Metadata;
+            Metadata metadata;
+            
+            bool IsCompressed () const { return ( flagBits & 1 ) == 1; }
+        };
+
+    public:
+        DatabaseLoader ( const std :: string& p_programName, const Paths& p_includePaths, const Paths& p_schemas, const std::string& p_dbNameOverride = std::string() );
+        ~DatabaseLoader();
+    
+        rc_t UseSchema ( const std :: string& p_file, const std :: string& p_name );
+        rc_t RemotePath ( const std :: string& p_path );
+        rc_t SoftwareName ( const std :: string& p_softwareName, const std :: string& p_version );
+        rc_t NewTable ( uint32_t p_tableId, const std :: string& p_tableName );
+        rc_t NewColumn ( uint32_t p_columnId, 
+                         uint32_t p_tableId, 
+                         uint32_t p_elemBits, 
+                         uint8_t p_flags, 
+                         const std :: string& p_columnName );
+                         
+        rc_t DBMetadataNode ( uint32_t p_objId, const std :: string& p_metadata_node, const std :: string& p_value );
+        rc_t TblMetadataNode ( uint32_t p_objId, const std :: string& p_metadata_node, const std :: string& p_value );
+        rc_t ColMetadataNode ( uint32_t p_objId, const std :: string& p_metadata_node, const std :: string& p_value );
+        
+        rc_t AddMbrDB ( uint32_t p_objId, uint32_t p_parentId, const std :: string &mbr_name, const std :: string &db_name, uint8_t p_create_mode );
+        rc_t AddMbrTbl ( uint32_t p_objId, uint32_t p_parentId, const std :: string &mbr_name, const std :: string &db_name, uint8_t p_create_mode );
+        
+        rc_t CellData    ( uint32_t p_columnId, const void* p_data, size_t p_elemCount );
+        rc_t CellDefault ( uint32_t p_columnId, const void* p_data, size_t p_elemCount );
+        rc_t NextRow ( uint32_t p_tableId );
+        rc_t MoveAhead ( uint32_t p_tableId, uint64_t p_count );
+        rc_t ErrorMessage ( const std :: string& p_text );
+        rc_t LogMessage ( const std :: string& p_text );
+        rc_t ProgressMessage ( const std :: string& p_name, uint32_t p_pid, uint32_t p_timestamp, uint32_t p_version, uint32_t p_percent );
+        rc_t OpenStream ();
+        rc_t CloseStream ();
+        
+        const std :: string& GetDatabaseName() const { return m_databaseName; }
+        const Column* GetColumn ( uint32_t p_columnId ) const; 
+        
+    private:
+        // Active Cursors
+        typedef std::vector < struct VCursor * > Cursors;
+        
+        // from TableId to Table
+        typedef std::map < uint32_t, Table > Tables; 
+        
+        // from ColumnId to Column
+        typedef std::map < uint32_t, Column > Columns; 
+        
+        // From database id to VDatabase. id == 0 for the root database.
+        typedef std::map < uint32_t, VDatabase* > Databases; 
+        
+        // From database id to parent database id 
+        typedef std::map < uint32_t, uint32_t > DatabaseToParent; 
+        
+    private:
+        rc_t MakeDatabase ( uint32_t p_id );
+        rc_t CursorWrite   ( const Column& p_col, const void* p_data, size_t p_size );
+        rc_t CursorDefault ( const Column& p_col, const void* p_data, size_t p_size );
+        rc_t SaveColumnMetadata ( const Column& p_col );
+
+    private:
+        Paths                   m_includePaths;
+        Paths                   m_schemas;
+    
+        std :: string           m_programName;
+        std :: string           m_databaseName;
+        std :: string           m_schemaName;
+        
+        std :: string           m_softwareName;
+        ver_t                   m_softwareVersion;
+    
+        Cursors                 m_cursors;
+        Tables                  m_tables;
+        Columns                 m_columns;
+        Databases               m_databases;    
+        DatabaseToParent        m_dbParents;    
+        
+        struct VDBManager*      m_mgr;
+        struct VSchema*         m_schema;
+        
+        bool                    m_databaseNameOverridden;
+    };
+
+    class ProtocolParser
+    {
+    public:
+        virtual rc_t ParseEvents ( Reader&, DatabaseLoader& ) = 0;
+        
+    protected:
+        template <typename TEvent> rc_t ReadEvent ( Reader& p_reader, TEvent& p_event );
+    };
+    
+    class UnpackedProtocolParser : public ProtocolParser
+    {
+    public:
+        virtual rc_t ParseEvents ( Reader&, DatabaseLoader& );
+    };
+    
+    class PackedProtocolParser : public ProtocolParser
+    {
+    public:
+        virtual rc_t ParseEvents ( Reader&, DatabaseLoader& );
+        
+    private:
+        // read p_dataSize bytes and use one of the decoder functions in utf8-like-int-codec.h to unpack a sequence of integer values, 
+        // stored in m_unpackingBuf as a collection of bytes
+        template < typename T_uintXX > rc_t UncompressInt ( Reader& p_reader, uint16_t p_dataSize, int ( * p_decode ) ( uint8_t const* buf_start, uint8_t const* buf_xend, T_uintXX* ret_decoded ) );
+        
+        rc_t ParseData ( Reader& p_reader, DatabaseLoader& p_dbLoader, uint32_t p_columnId, uint32_t p_dataSize );
+        
+        std::vector<uint8_t>    m_unpackingBuf;
+    };
+    
+private:    
+    GeneralLoader(const GeneralLoader&);
+    GeneralLoader& operator = ( const GeneralLoader&);
+    
+    rc_t ReadHeader ( bool& p_packed );
+    
+    void CleanUp ();
+    
+    static void SplitAndAdd( Paths& p_paths, const std::string& p_path );
+    
+private:    
+    std::string             m_programName;
+    Reader                  m_reader;
+    Paths                   m_includePaths;
+    Paths                   m_schemas;
+    std::string             m_targetOverride;
+};
+
+#endif
diff --git a/tools/general-loader/general-writer.cpp b/tools/general-loader/general-writer.cpp
new file mode 100644
index 0000000..32b1a47
--- /dev/null
+++ b/tools/general-loader/general-writer.cpp
@@ -0,0 +1,1172 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "general-writer.hpp"
+#include "utf8-like-int-codec.h"
+
+#include <iterator>
+#include <cstdlib>
+#include <iomanip>
+
+#include <time.h>
+#include <unistd.h>
+#include <assert.h>
+#include <string.h>
+
+#define PROGRESS_EVENT 0
+
+namespace ncbi
+{
+
+#if GW_CURRENT_VERSION <= 2
+    typedef :: gwp_1string_evt_v1 gwp_1string_evt;
+    typedef :: gwp_2string_evt_v1 gwp_2string_evt;
+    typedef :: gwp_column_evt_v1 gwp_column_evt;
+    typedef :: gwp_data_evt_v1 gwp_data_evt;
+    typedef :: gwp_1string_evt_U16_v1 gwp_1string_evt_U16;
+    typedef :: gwp_2string_evt_U16_v1 gwp_2string_evt_U16;
+    typedef :: gwp_data_evt_U16_v1 gwp_data_evt_U16;
+#else
+#error "unrecognized GW version"
+#endif
+
+    // ask the general-loader to use this when naming its output
+    void GeneralWriter :: setRemotePath ( const std :: string & remote_db )
+    {
+        stream_state new_state = uninitialized;
+
+        switch ( state )
+        {
+        case header_written:
+            new_state = remote_name_sent;
+            break;
+        case schema_sent:
+            new_state = remote_name_and_schema_sent;
+            break;
+        case software_name_sent:
+            new_state = remote_name_and_software_name_sent;
+            break;
+        case schema_and_software_name_sent:
+            new_state = remote_name_schema_and_software_name_sent;
+            break;
+        default:
+            throw "state violation setting remote path";
+        }
+
+        size_t str_size = remote_db . size ();
+        if ( str_size > 0x10000 )
+            throw "remote path too long";
+
+        gwp_1string_evt_U16 hdr;
+        init ( hdr, 0, evt_remote_path2 );
+        set_size ( hdr, str_size );
+        write_event ( & hdr . dad, sizeof hdr );
+        internal_write ( remote_db . data (), str_size );
+
+        state = new_state;
+    }
+
+    // tell the general-loader to use this pre-defined schema
+    void GeneralWriter :: useSchema ( const std :: string & schema_file_name,
+                                      const std :: string & schema_db_spec )
+    {
+        stream_state new_state = uninitialized;
+
+        switch ( state )
+        {
+        case header_written:
+            new_state = schema_sent;
+            break;
+        case remote_name_sent:
+            new_state = remote_name_and_schema_sent;
+            break;
+        case software_name_sent:
+            new_state = schema_and_software_name_sent;
+            break;
+        case remote_name_and_software_name_sent:
+            new_state = remote_name_schema_and_software_name_sent;
+            break;
+        default:
+            throw "state violation using schema";
+        }
+
+        size_t str1_size = schema_file_name . size ();
+        if ( str1_size > 0x10000 )
+            throw "schema path too long";
+
+        size_t str2_size = schema_db_spec . size ();
+        if ( str2_size > 0x10000 )
+            throw "schema spec too long";
+
+        gwp_2string_evt_U16 hdr;
+        init ( hdr, 0, evt_use_schema2 );
+        set_size1 ( hdr, str1_size );
+        set_size2 ( hdr, str2_size );
+        write_event ( & hdr . dad, sizeof hdr );
+        internal_write ( schema_file_name . data (), str1_size );
+        internal_write ( schema_db_spec . data (), str2_size );
+
+        state = new_state;
+    }
+
+    void GeneralWriter :: setSoftwareName ( const std :: string & name,
+                                            const std :: string & version )
+    {
+        stream_state new_state = uninitialized;
+
+        switch ( state )
+        {
+        case header_written:
+            new_state = software_name_sent;
+            break;
+        case remote_name_sent:
+            new_state = remote_name_and_software_name_sent;
+            break;
+        case schema_sent:
+            new_state = schema_and_software_name_sent;
+            break;
+        case remote_name_and_schema_sent:
+            new_state = remote_name_schema_and_software_name_sent;
+            break;
+        default:
+            throw "state violation using schema";
+        }
+
+        size_t str1_size = name . size ();
+        if ( str1_size > 0x100 )
+            throw "name too long";
+
+        size_t str2_size = version . size ();
+        if ( str2_size > 0x100 )
+            throw "version too long";
+
+        gwp_2string_evt_v1 hdr;
+        init ( hdr, 0, evt_software_name );
+        set_size1 ( hdr, str1_size );
+        set_size2 ( hdr, str2_size );
+        write_event ( & hdr . dad, sizeof hdr );
+        internal_write ( name . data (), str1_size );
+        internal_write ( version . data (), str2_size );
+
+        state = new_state;        
+    }
+
+
+    int GeneralWriter :: addTable ( const std :: string &table_name )
+    {        
+        stream_state new_state = uninitialized;
+
+        switch ( state )
+        {
+        case schema_sent:
+        case remote_name_and_schema_sent:
+        case remote_name_schema_and_software_name_sent:
+            new_state = have_table;
+            break;
+        case have_table:
+        case have_column:
+            new_state = state;
+            break;
+        default:
+            throw "state violation adding table";
+        }
+
+        // create a pair between the outer db id ( 0 ) and this table name
+        // this pair will act as an unique key of tables, whereas table_name
+        // itself can be repeated if multiple databases are in use
+        int_dbtbl tbl ( 0, table_name );
+
+        // prediction this is the index
+        int id = ( int ) tables.size() + 1;
+        if ( id > 256 )
+            throw "maximum number of tables exceeded";
+
+        // make sure we never record a table name twice under the same db
+        std :: pair < std :: map < int_dbtbl, int > :: iterator, bool > result = 
+            table_name_idx.insert ( std :: pair < int_dbtbl, int > ( tbl, id ) );
+        
+        // if first time
+        if ( result.second )
+        {
+            tables.push_back ( tbl );
+
+            size_t str_size = table_name . size ();
+            if ( str_size > 0x10000 )
+                throw "maximum table name length exceeded";
+
+            gwp_1string_evt_U16 hdr;
+            init ( hdr, id, evt_new_table2 );
+            set_size ( hdr, str_size );
+            write_event ( & hdr . dad, sizeof hdr );
+            internal_write ( table_name.data (), str_size );
+
+            state = new_state;
+        }
+        
+        // 1 based table id
+        return result.first->second;
+    }
+    
+    int GeneralWriter :: addColumn ( int table_id,
+        const std :: string &column_name, uint32_t elem_bits, uint8_t flag_bits )
+    {
+        stream_state new_state = uninitialized;
+
+        switch ( state )
+        {
+        case have_table:
+        case have_column:
+            new_state = have_column;
+            break;
+        default:
+            throw "state violation adding column";
+        }
+        
+        if ( table_id <= 0 || ( size_t ) table_id > tables.size () )
+            throw "Invalid table id";
+        
+        // the thing to insert into map
+        // even if the caller wants us to use integer compaction,
+        // it must be with a size we know how to use
+        if ( ( flag_bits & 1 ) != 0 )
+        {
+            switch ( elem_bits )
+            {
+            case 16:
+            case 32:
+            case 64:
+                break;
+            default:
+                flag_bits ^= 1;
+            }
+        }
+
+        int_stream stream ( table_id, column_name, elem_bits, flag_bits );
+
+        // prediction this is the index
+        int id = ( int ) streams.size() + 1;
+        if ( id > 256 )
+            throw "maximum number of columns exceeded";
+
+        // make sure we never record a column-spec twice
+        std :: pair < std :: map < int_stream, int > :: iterator, bool > result =
+            column_name_idx.insert ( std :: pair < int_stream, int > ( stream, id ) );
+        
+        // if first time
+        if ( result.second )
+        {
+            streams.push_back ( stream );
+
+            size_t str_size = column_name . size ();
+            if ( str_size > 256 )
+                throw "maximum column spec length exceeded";
+
+            // TBD - write new column stream event to stream
+            gwp_column_evt hdr;
+            init ( hdr, id, evt_new_column );
+            set_table_id ( hdr, table_id );
+            set_elem_bits ( hdr, elem_bits );
+            hdr.flag_bits = flag_bits;
+            set_name_size ( hdr, str_size );
+
+            // write header & data
+            write_event ( & hdr . dad, sizeof hdr );
+            internal_write ( column_name.data (), str_size );
+
+            state = new_state;
+        }
+        
+        // 1 based stream id
+        return result.first->second;
+    }
+
+    int GeneralWriter :: dbAddDatabase ( int db_id, const std :: string &mbr_name, 
+                                          const std :: string &db_name, uint8_t create_mode )
+    {
+        stream_state new_state = uninitialized;
+
+        switch ( state )
+        {
+        case schema_sent:
+        case remote_name_and_schema_sent:
+        case remote_name_schema_and_software_name_sent:
+            new_state = have_table;
+            break;
+        case have_table:
+        case have_column:
+            new_state = state;
+            break;
+        default:
+            throw "state violation adding db";
+        }
+        
+        // zero ( 0 ) is a valid db_id
+        if ( db_id < 0 || ( size_t ) db_id > dbs.size () )
+            throw "Invalid database id";
+
+        int_dbtbl db ( db_id, db_name );
+
+        // prediction this is the index
+        int id = ( int ) dbs.size() + 1;
+        if ( id > 256 )
+            throw "maximum number of databases exceeded";
+
+        // make sure we never record a table name twice under the same db
+        std :: pair < std :: map < int_dbtbl, int > :: iterator, bool > result = 
+            db_name_idx.insert ( std :: pair < int_dbtbl, int > ( db, id ) );
+        
+        // if first time
+        if ( result.second )
+        {
+            dbs.push_back ( db );
+
+            size_t str_size = mbr_name . size ();
+            if ( str_size > 0x100 )
+                throw "maximum member name length exceeded";
+
+            str_size = db_name . size ();
+            if ( str_size > 0x100 )
+                throw "maximum db name length exceeded";
+
+            gwp_add_mbr_evt_v1 hdr;
+            init ( hdr, id, evt_add_mbr_db );
+            set_db_id ( hdr, db_id );
+            set_size1 ( hdr, mbr_name.size () );
+            set_size2 ( hdr, db_name.size () );
+            set_create_mode ( hdr, create_mode );            
+            write_event ( & hdr . dad, sizeof hdr );
+            internal_write ( mbr_name.data (), mbr_name.size () );
+            internal_write ( db_name.data (), db_name.size () );
+
+            state = new_state;
+        }
+        
+        // 1 based db id
+        return result.first->second;
+    }
+    
+    int GeneralWriter :: dbAddTable ( int db_id, const std :: string &mbr_name, 
+                                       const std :: string &table_name, uint8_t create_mode )
+    {
+        stream_state new_state = uninitialized;
+
+        switch ( state )
+        {
+        case schema_sent:
+        case remote_name_and_schema_sent:
+        case remote_name_schema_and_software_name_sent:
+            new_state = have_table;
+            break;
+        case have_table:
+        case have_column:
+            new_state = state;
+            break;
+        default:
+            throw "state violation adding db_table";
+        }
+        
+        // zero ( 0 ) is a valid db_id
+        if ( db_id < 0 || ( size_t ) db_id > dbs.size () )
+            throw "Invalid database id";
+
+        // create a pair between the outer db id ( 0 ) and this table name
+        // this pair will act as an unique key of tables, whereas table_name
+        // itself can be repeated if multiple databases are in use
+        int_dbtbl tbl ( db_id, table_name );
+
+        // prediction this is the index
+        int id = ( int ) tables.size() + 1;
+        if ( id > 256 )
+            throw "maximum number of tables exceeded";
+
+        // make sure we never record a table name twice under the same db
+        std :: pair < std :: map < int_dbtbl, int > :: iterator, bool > result = 
+            table_name_idx.insert ( std :: pair < int_dbtbl, int > ( tbl, id ) );
+        
+        // if first time
+        if ( result.second )
+        {
+            tables.push_back ( tbl );
+
+            size_t str_size = mbr_name . size ();
+            if ( str_size > 0x100 )
+                throw "maximum member name length exceeded";
+
+            str_size = table_name . size ();
+            if ( str_size > 0x100 )
+                throw "maximum table name length exceeded";
+
+            gwp_add_mbr_evt_v1 hdr;
+            init ( hdr, id, evt_add_mbr_tbl );
+            set_db_id ( hdr, db_id );
+            set_size1 ( hdr, mbr_name.size () );
+            set_size2 ( hdr, table_name.size () );
+            set_create_mode ( hdr, create_mode );
+            write_event ( & hdr . dad, sizeof hdr );
+            internal_write ( mbr_name.data (), mbr_name.size () );
+            internal_write ( table_name.data (), table_name.size () );
+
+            state = new_state;
+        }
+        
+        // 1 based table id
+        return result.first->second;
+    }
+
+ 
+    
+    void GeneralWriter :: open ()
+    {
+        stream_state new_state = uninitialized;
+
+        switch ( state )
+        {
+        case have_column:
+            new_state = opened;
+            break;
+        case opened:
+            return;
+        default:
+            throw "state violation opening stream";
+        }
+
+        gwp_evt_hdr hdr;
+        init ( hdr, 0, evt_open_stream );
+
+        // write header        
+        write_event ( & hdr, sizeof hdr );
+
+        state = new_state;
+    }
+
+    void GeneralWriter :: setDBMetadataNode ( int obj_id,
+                                            const std :: string & node_path,
+                                            const std :: string & value )
+    {
+        // zero ( 0 ) is a valid db_id
+        if ( obj_id < 0 || ( size_t ) obj_id > dbs.size () )
+            throw "Invalid database id";
+
+        size_t str1_size = node_path . size ();
+        if ( str1_size > STRING_LIMIT_16 )
+            throw "DB_path too long";
+
+        size_t str2_size = value . size ();
+        if ( str2_size > STRING_LIMIT_16 )
+            throw "value too long";
+
+        if ( str1_size <= STRING_LIMIT_8 && str2_size <= STRING_LIMIT_8 )
+        {
+            // use 8-bit sizes
+            gwp_2string_evt_v1 hdr;
+            init ( hdr, obj_id, evt_db_metadata_node );
+            set_size1 ( hdr, str1_size );
+            set_size2 ( hdr, str2_size );
+            write_event ( & hdr . dad, sizeof hdr );
+        }
+        else
+        {
+            // use 16-bit sizes
+            gwp_2string_evt_U16_v1 hdr;
+            init ( hdr, obj_id, evt_db_metadata_node2 );
+            set_size1 ( hdr, str1_size );
+            set_size2 ( hdr, str2_size );
+            write_event ( & hdr . dad, sizeof hdr );
+        }
+
+        internal_write ( node_path . data (), str1_size );
+        internal_write ( value . data (), str2_size );
+    }
+
+    void GeneralWriter :: setTblMetadataNode ( int obj_id,
+                                            const std :: string & node_path,
+                                            const std :: string & value )
+    {
+        if ( obj_id <= 0 || ( size_t ) obj_id > tables.size () )
+            throw "Invalid table id";
+
+        size_t str1_size = node_path . size ();
+        if ( str1_size > STRING_LIMIT_16 )
+            throw "tbl_path too long";
+
+        size_t str2_size = value . size ();
+        if ( str2_size > STRING_LIMIT_16 )
+            throw "value too long";
+
+        if ( str1_size <= STRING_LIMIT_8 && str2_size <= STRING_LIMIT_8 )
+        {
+            // use 8-bit sizes
+            gwp_2string_evt_v1 hdr;
+            init ( hdr, obj_id, evt_tbl_metadata_node );
+            set_size1 ( hdr, str1_size );
+            set_size2 ( hdr, str2_size );
+            write_event ( & hdr . dad, sizeof hdr );
+        }
+        else
+        {
+            // use 16-bit sizes
+            gwp_2string_evt_U16_v1 hdr;
+            init ( hdr, obj_id, evt_tbl_metadata_node2 );
+            set_size1 ( hdr, str1_size );
+            set_size2 ( hdr, str2_size );
+            write_event ( & hdr . dad, sizeof hdr );
+        }
+
+        internal_write ( node_path . data (), str1_size );
+        internal_write ( value . data (), str2_size );
+
+    }
+    void GeneralWriter :: setColMetadataNode ( int obj_id,
+                                            const std :: string & node_path,
+                                            const std :: string & value )
+    {
+        if ( obj_id <= 0 || ( size_t ) obj_id > streams.size () )
+            throw "Invalid column id";
+
+        size_t str1_size = node_path . size ();
+        if ( str1_size > STRING_LIMIT_16 )
+            throw "tbl_path too long";
+
+        size_t str2_size = value . size ();
+        if ( str2_size > STRING_LIMIT_16 )
+            throw "value too long";
+
+        if ( str1_size <= STRING_LIMIT_8 && str2_size <= STRING_LIMIT_8 )
+        {
+            // use 8-bit sizes
+            gwp_2string_evt_v1 hdr;
+            init ( hdr, obj_id, evt_col_metadata_node );
+            set_size1 ( hdr, str1_size );
+            set_size2 ( hdr, str2_size );
+            write_event ( & hdr . dad, sizeof hdr );
+        }
+        else
+        {
+            // use 16-bit sizes
+            gwp_2string_evt_U16_v1 hdr;
+            init ( hdr, obj_id, evt_col_metadata_node2 );
+            set_size1 ( hdr, str1_size );
+            set_size2 ( hdr, str2_size );
+            write_event ( & hdr . dad, sizeof hdr );
+        }
+
+        internal_write ( node_path . data (), str1_size );
+        internal_write ( value . data (), str2_size );
+    }
+
+    
+    void GeneralWriter :: columnDefault ( int stream_id, uint32_t elem_bits, const void *data, uint32_t elem_count )
+    {
+        switch ( state )
+        {
+        case opened:
+            break;
+        default:
+            throw "state violation setting column default";
+        }
+
+        if ( stream_id < 0 )
+            throw "Stream_id is not valid";
+        if ( stream_id > ( int ) streams.size () )
+            throw "Stream_id is out of bounds";
+
+        if ( elem_bits == 0 )
+            return;
+        
+        if ( data == 0 && elem_count != 0 )
+            throw "Invalid data ptr";
+
+        if ( elem_bits != streams [ stream_id - 1 ] . elem_bits )
+            throw "Invalid elem_bits";
+
+        size_t num_bytes = ( ( size_t ) elem_bits * elem_count + 7 ) / 8;
+        if ( num_bytes == 0 )
+        {
+            gwp_evt_hdr_v1 eh;
+            init ( eh, stream_id, evt_empty_default );
+            write_event ( & eh, sizeof eh );
+        }
+        else
+        {
+            if ( num_bytes <= 256 )
+            {
+                gwp_data_evt chunk;
+                init ( chunk, stream_id, evt_cell_default );
+                set_size ( chunk, num_bytes );
+                write_event ( & chunk . dad, sizeof chunk );
+            }
+            else if ( num_bytes <= 0x10000 )
+            {
+                gwp_data_evt_U16 chunk;
+                init ( chunk, stream_id, evt_cell_default2 );
+                set_size ( chunk, num_bytes );
+                write_event ( & chunk . dad, sizeof chunk );
+            }
+            else
+            {
+                throw "default cell-data exceeds maximum";
+            }
+            internal_write ( data, num_bytes );
+        }
+    }
+
+    template < class T >
+    int encode_int ( T val, uint8_t * start, uint8_t * end );
+
+    template <>
+    int encode_int < uint16_t > ( uint16_t val, uint8_t * start, uint8_t * end )
+    {
+        int ret = encode_uint16 ( val, start, end );
+        if ( ret > 0 )
+        {
+            uint16_t val2;
+            int ret2 = decode_uint16 ( start, start + ret, & val2 );
+            assert ( ret == ret2 && val == val2 );
+        }
+        return ret;
+    }
+
+    template <>
+    int encode_int < uint32_t > ( uint32_t val, uint8_t * start, uint8_t * end )
+    {
+        int ret = encode_uint32 ( val, start, end );
+        if ( ret > 0 )
+        {
+            uint32_t val2;
+            int ret2 = decode_uint32 ( start, start + ret, & val2 );
+            assert ( ret == ret2 && val == val2 );
+        }
+        return ret;
+    }
+
+    template <>
+    int encode_int < uint64_t > ( uint64_t val, uint8_t * start, uint8_t * end )
+    {
+        int ret = encode_uint64 ( val, start, end );
+        if ( ret > 0 )
+        {
+            uint64_t val2;
+            int ret2 = decode_uint64 ( start, start + ret, & val2 );
+            assert ( ret == ret2 && val == val2 );
+        }
+        return ret;
+    }
+
+    struct encode_result { uint32_t num_elems, num_bytes; };
+
+    const size_t bsize = 0x10000;
+
+    template < class T > static
+    encode_result encode_buffer ( uint8_t * buffer, const void * data, uint32_t first, uint32_t elem_count )
+    {
+        uint8_t * start = buffer;
+        uint8_t * end = buffer + bsize;
+        const T * input = ( const T * ) data;
+
+        uint32_t i;
+        for ( i = first; i < elem_count; ++ i )
+        {
+            int num_writ = encode_int < T > ( input [ i ], start, end );
+            if ( num_writ <= 0 )
+            {
+                if ( num_writ < 0 )
+                    throw "error encoding integer data";
+                break;
+            }
+            start += num_writ;
+        }
+
+        if ( start == buffer )
+            throw "INTERNAL ERROR: no data to encode";
+
+        encode_result rslt;
+        rslt . num_elems = i;
+        rslt . num_bytes = start - buffer;
+
+        return rslt;
+    }
+
+    void GeneralWriter :: write ( int stream_id, uint32_t elem_bits, const void *data, uint32_t elem_count )
+    {
+        switch ( state )
+        {
+        case opened:
+            break;
+        default:
+            throw "state violation writing column data";
+        }
+
+        if ( stream_id < 0 )
+            throw "Stream_id is not valid";
+        if ( stream_id > ( int ) streams.size () )
+            throw "Stream_id is out of bounds";
+
+        if ( elem_bits == 0 || elem_count == 0 )
+            return;
+        
+        if ( data == 0 )
+            throw "Invalid data ptr";
+
+        const int_stream & s = streams [ stream_id - 1 ];
+
+        if ( elem_bits != s . elem_bits )
+            throw "Invalid elem_bits";
+
+        bool compact_int = ( s . flag_bits & 1 ) != 0;
+        
+        const uint8_t * dp = ( const uint8_t * ) data;
+
+        if ( compact_int )
+        {
+            uint32_t elem;
+            encode_result rslt;
+            encode_result ( * encode ) ( uint8_t * buffer, const void * data, uint32_t first, uint32_t elem_count );
+
+            switch ( elem_bits )
+            {
+            case 16:
+                encode = encode_buffer < uint16_t >;
+                break;
+            case 32:
+                encode = encode_buffer < uint32_t >;
+                break;
+            case 64:
+                encode = encode_buffer < uint64_t >;
+                break;
+            default:
+                throw "INTERNAL ERROR: corrupt element bits";
+            }
+
+            for ( elem = 0; elem < elem_count; elem = rslt . num_elems )
+            {
+                rslt = ( * encode ) ( packing_buffer, data, elem, elem_count );
+                if ( rslt . num_bytes <= 256 )
+                {
+                    assert ( rslt . num_bytes != 0 );
+                    gwp_data_evt chunk;
+                    init ( chunk, stream_id, evt_cell_data );
+                    set_size ( chunk, rslt . num_bytes );
+                    write_event ( & chunk . dad, sizeof chunk );
+                }
+                else
+                {
+                    gwp_data_evt_U16 chunk;
+                    init ( chunk, stream_id, evt_cell_data2 );
+                    set_size ( chunk, rslt . num_bytes );
+                    write_event ( & chunk . dad, sizeof chunk );
+                }
+                internal_write ( packing_buffer, rslt . num_bytes );
+            }
+        }
+        else
+        {
+            size_t num_bytes = ( ( size_t ) elem_bits * elem_count + 7 ) / 8;
+
+            while ( num_bytes >= 0x10000 )
+            {
+                gwp_data_evt_U16 chunk;
+                init ( chunk, stream_id, evt_cell_data2 );
+                set_size ( chunk, 0x10000 );
+                write_event ( & chunk . dad, sizeof chunk );
+                internal_write ( dp, 0x10000 );
+                num_bytes -= 0x10000;
+                dp += 0x10000;
+            }
+
+            if ( num_bytes <= 256 )
+            {
+                gwp_data_evt chunk;
+                init ( chunk, stream_id, evt_cell_data );
+                set_size ( chunk, num_bytes );
+                write_event ( & chunk . dad, sizeof chunk );
+            }
+            else
+            {
+                gwp_data_evt_U16 chunk;
+                init ( chunk, stream_id, evt_cell_data2 );
+                set_size ( chunk, num_bytes );
+                write_event ( & chunk . dad, sizeof chunk );
+            }
+            
+            internal_write ( data, num_bytes );
+        }
+    }
+
+    void GeneralWriter :: nextRow ( int table_id )
+    {
+        switch ( state )
+        {
+        case opened:
+            break;
+        default:
+            throw "state violation advancing to next row";
+        }
+
+        if ( table_id < 0 || ( size_t ) table_id > tables.size () )
+            throw "Invalid table id";
+
+        gwp_evt_hdr hdr;
+        init ( hdr, table_id, evt_next_row );
+        write_event ( & hdr, sizeof hdr );
+    }
+
+
+    void GeneralWriter :: moveAhead ( int table_id, uint64_t nrows )
+    {
+        switch ( state )
+        {
+        case opened:
+            break;
+        default:
+            throw "state violation moving ahead nrows";
+        }
+
+        if ( table_id < 0 || ( size_t ) table_id > tables.size () )
+            throw "Invalid table id";
+
+        gwp_move_ahead_evt_v1 hdr;
+        init ( hdr, table_id, evt_move_ahead );
+        set_nrows ( hdr, nrows );
+        write_event ( & hdr . dad, sizeof hdr );
+    }
+
+    void GeneralWriter :: logError ( const std :: string & msg )
+    {
+        switch ( state )
+        {
+        case header_written:
+        case remote_name_sent:
+        case schema_sent:
+        case software_name_sent:
+        case remote_name_and_schema_sent:
+        case remote_name_and_software_name_sent:
+        case schema_and_software_name_sent:
+        case remote_name_schema_and_software_name_sent:
+        case have_table:
+        case have_column:
+        case opened:
+        case error:
+            break;
+        default:
+            return;
+        }
+
+        gwp_1string_evt_U16 hdr;
+        init ( hdr, 0, evt_errmsg2 );
+
+        const char * msg_data = msg . data ();
+        size_t str_size = msg . size ();
+        if ( str_size == 0 )
+        {
+            msg_data = "ERROR: (NO MSG)";
+            str_size = strlen ( msg_data );
+        }
+        else if ( str_size > 0x10000 )
+            str_size = 0x10000;
+
+        set_size ( hdr, str_size );
+        write_event ( & hdr . dad, sizeof hdr );
+        internal_write ( msg_data, str_size );
+    }
+
+    void GeneralWriter :: logMsg ( const std :: string &msg )
+    {
+        switch ( state )
+        {
+        case header_written:
+        case remote_name_sent:
+        case schema_sent:
+        case software_name_sent:
+        case remote_name_and_schema_sent:
+        case remote_name_and_software_name_sent:
+        case schema_and_software_name_sent:
+        case remote_name_schema_and_software_name_sent:
+        case have_table:
+        case have_column:
+        case opened:
+            break;
+        default:
+            return;
+        }
+
+        size_t str_size = msg . size ();
+        if ( str_size == 0 )
+            return;
+
+        if ( str_size > 0x10000 )
+            str_size = 0x10000;
+
+        gwp_1string_evt_U16 hdr;
+        init ( hdr, 0, evt_logmsg );
+
+        set_size ( hdr, str_size );
+        write_event ( & hdr . dad, sizeof hdr );
+        internal_write ( msg . data (), str_size );
+    }
+
+    void GeneralWriter :: progMsg ( const std :: string & name, uint32_t version,
+        uint64_t done, uint64_t total )
+    {
+        switch ( state )
+        {
+        case opened:
+            break;
+        default:
+            return;
+        }
+        
+        size_t str_size = name . size ();
+        if ( str_size == 0 )
+            throw "zero-length app-name";
+        if ( str_size > 0x100 )
+            str_size = 0x100;
+
+        // timestamp
+        time_t timestamp = time ( NULL );
+
+        if ( total == 0 )
+            throw "illegal total value: would divide by zero";
+        if ( done > total )
+            throw "illegal done value: greater than total";
+        
+        // calculate percentage done
+        double fpercent = ( double ) done / total;
+        assert ( fpercent >= 0.0 && fpercent <= 100.0 );
+        uint8_t percent = ( uint8_t ) ( fpercent * 100 );
+
+        gwp_status_evt_v1 hdr;
+        init ( hdr, 0, evt_progmsg );
+        set_pid ( hdr, pid );
+        set_version ( hdr, version );
+        set_timestamp ( hdr, ( uint32_t ) timestamp );
+        set_size ( hdr, str_size );
+        set_percent ( hdr, percent );
+
+        write_event ( &hdr . dad, sizeof hdr );
+        internal_write ( name.data (), str_size );
+    }
+
+    void GeneralWriter :: endStream ()
+    {
+        switch ( state )
+        {
+        case header_written:
+        case remote_name_sent:
+        case schema_sent:
+        case software_name_sent:
+        case remote_name_and_schema_sent:
+        case remote_name_and_software_name_sent:
+        case schema_and_software_name_sent:
+        case remote_name_schema_and_software_name_sent:
+        case have_table:
+        case have_column:
+        case opened:
+        case error:
+            break;
+        default:
+            return;
+        }
+
+        gwp_evt_hdr hdr;
+        init ( hdr, 0, evt_end_stream );
+        write_event ( & hdr, sizeof hdr );
+
+        state = closed;
+
+        flush ();
+    }
+
+    
+    // Constructors
+    GeneralWriter :: GeneralWriter ( const std :: string &out_path )
+        : out ( out_path.c_str(), std::ofstream::binary )
+        , evt_count ( 0 )
+        , byte_count ( 0 )
+        , pid ( getpid () )
+        , packing_buffer ( 0 )
+        , output_buffer ( 0 )
+        , output_bsize ( 0 )
+        , output_marker ( 0 )
+        , out_fd ( -1 )
+        , state ( uninitialized )
+    {
+        packing_buffer = new uint8_t [ bsize ];
+        writeHeader ();
+    }
+
+    
+    // Constructors
+    GeneralWriter :: GeneralWriter ( int _out_fd, size_t buffer_size )
+        : evt_count ( 0 )
+        , byte_count ( 0 )
+        , pid ( getpid () )
+        , packing_buffer ( 0 )
+        , output_buffer ( 0 )
+        , output_bsize ( buffer_size )
+        , output_marker ( 0 )
+        , out_fd ( _out_fd )
+        , state ( uninitialized )
+    {
+        packing_buffer = new uint8_t [ bsize ];
+        output_buffer = new uint8_t [ buffer_size ];
+        writeHeader ();
+    }
+    
+    GeneralWriter :: ~GeneralWriter ()
+    {
+        try
+        {
+            endStream ();
+        }
+        catch ( ... )
+        {
+        }
+
+        delete [] output_buffer;
+        delete [] packing_buffer;
+
+        output_bsize = output_marker = 0;
+        output_buffer = packing_buffer = 0;
+    }
+
+    bool GeneralWriter :: int_stream :: operator < ( const int_stream &s ) const
+    {
+        if ( table_id != s.table_id )
+            return table_id < s.table_id;
+        return column_name.compare ( s.column_name ) < 0;
+    }
+    
+    GeneralWriter :: int_stream :: int_stream ( int _table_id, const std :: string &_column_name, uint32_t _elem_bits, uint8_t _flag_bits )
+        : table_id ( _table_id )
+        , column_name ( _column_name )
+        , elem_bits ( _elem_bits )
+        , flag_bits ( _flag_bits )
+    {
+    }
+
+    bool GeneralWriter :: int_dbtbl :: operator < ( const int_dbtbl &db ) const
+    {
+        if ( db_id != db.db_id )
+            return db_id < db.db_id;
+        return obj_name.compare ( db.obj_name ) < 0;
+    }
+
+    GeneralWriter :: int_dbtbl :: int_dbtbl ( int _db_id, const std :: string &_obj_name )
+        : db_id ( _db_id )
+        , obj_name ( _obj_name )
+    {
+    }
+
+    // Private methods
+
+    uint32_t GeneralWriter :: getPid ()
+    {
+        return ( uint32_t ) pid;
+    }
+
+    void GeneralWriter :: writeHeader ()
+    {
+        :: gw_header_v1 hdr;
+        init ( hdr );
+        internal_write ( & hdr, sizeof hdr );
+        state = header_written;
+
+    }
+
+    void GeneralWriter :: flush ()
+    {
+        if ( out_fd < 0 )
+            out . flush ();
+        else
+        {
+            ssize_t num_writ;
+            for ( size_t total = 0; total < output_marker; total += num_writ )
+            {
+                num_writ = :: write ( out_fd, & output_buffer [ total ], output_marker - total );
+                if ( num_writ < 0 )
+                    throw "Error writing to fd";
+                if ( num_writ == 0 )
+                    throw "Transfer incomplete writing to fd";
+            }
+
+            output_marker = 0;
+        }
+    }
+
+    void GeneralWriter :: internal_write ( const void * data, size_t num_bytes )
+    {
+        if ( out_fd < 0 )
+        {
+            out.write ( ( const char * ) data, num_bytes );
+            byte_count += num_bytes;
+        }
+        else
+        {
+            size_t total;
+            const uint8_t * p = ( const uint8_t * ) data;
+            for ( total = 0; total < num_bytes; )
+            {
+                size_t avail = output_bsize - output_marker;
+                if ( avail == 0 )
+                {
+                    flush ();
+                    avail = output_bsize - output_marker;
+                }
+
+                size_t to_write = num_bytes - total;
+                if ( to_write > avail )
+                    to_write = avail;
+
+                assert ( to_write != 0 );
+                memcpy ( & output_buffer [ output_marker ], & p [ total ], to_write );
+                output_marker += to_write;
+                total += to_write;
+            }
+
+            byte_count += total;
+        }
+    }
+
+    void GeneralWriter :: write_event ( const gwp_evt_hdr * e, size_t evt_size )
+    {
+#if PROGRESS_EVENT
+        uint64_t ec = evt_count;
+        if ( ( ec % 10000 ) == 0 )
+        {
+            if ( ( ec % 500000 ) == 0 )
+                std :: cerr << "\n%  [" << std :: setw ( 12 ) << byte_count << "] " << std :: setw ( 9 ) << ec + 1 << ' ';
+            std :: cerr << '.';
+        }
+#endif
+        ++ evt_count;
+
+        assert ( evt ( * e ) != evt_bad_event );
+        assert ( evt ( * e ) <  evt_max_id );
+
+        internal_write ( e, evt_size );
+    }
+
+}
diff --git a/tools/general-loader/general-writer.h b/tools/general-loader/general-writer.h
new file mode 100644
index 0000000..378df5d
--- /dev/null
+++ b/tools/general-loader/general-writer.h
@@ -0,0 +1,1081 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_general_writer_
+#define _h_general_writer_
+
+#include <stdint.h>
+#include <stddef.h>
+
+#ifdef __cplusplus
+#include <string.h>
+#endif
+
+
+/*----------------------------------------------------------------------
+ * event codes
+ */
+
+enum gw_evt_id
+{
+    evt_bad_event,
+
+    evt_errmsg,                           /* convey processing error msg */
+    evt_end_stream,                       /* cleanly terminates a stream */
+
+    evt_remote_path,                      /* sets remote output path     */
+    evt_use_schema,                       /* conveys schema usage        */
+    evt_new_table,                        /* create a new table          */
+    evt_new_column,                       /* create a new column in tbl  */
+    evt_open_stream,                      /* open stream for data flow   */
+
+    evt_cell_default,                     /* set/reset cell default val  */
+    evt_cell_data,                        /* write/append data cell      */
+    evt_next_row,                         /* move to next row in table   */
+    evt_move_ahead,                       /* move ahead by N rows        */
+
+    evt_errmsg2,
+    evt_remote_path2,
+    evt_use_schema2,
+    evt_new_table2,
+    evt_cell_default2,                    /* packed default <= 64K bytes */
+    evt_cell_data2,                       /* packed data <= 64K bytes    */
+    evt_empty_default,                    /* set cell default to empty   */
+
+    /* BEGIN VERSION 2 MESSAGES */
+    evt_software_name,                    /* sets software name          */
+    evt_db_metadata_node,                    /* uses gw(p)_2string_evt_v1   */
+    evt_tbl_metadata_node,
+    evt_col_metadata_node,
+    evt_db_metadata_node2,                   /* uses gwp_2string_evt_U16    */
+    evt_tbl_metadata_node2,
+    evt_col_metadata_node2,
+
+    evt_add_mbr_db,
+    evt_add_mbr_tbl,
+
+    evt_logmsg,
+    evt_progmsg,
+
+    evt_max_id                            /* must be last                */
+};
+
+#define GW_SIGNATURE "NCBIgnld"
+#define GW_GOOD_ENDIAN 1
+#define GW_REVERSE_ENDIAN ( 1 << 24 )
+#define GW_CURRENT_VERSION 2
+
+//These are not to change
+#define STRING_LIMIT_8 0x100
+#define STRING_LIMIT_16 0x10000
+#define ID_LOWER_LIMIT 0
+#define ID_UPPER_LIMIT 255
+
+/********************************
+ * DESCRIPTION OF STREAM EVENTS *
+ ********************************
+
+ *. BYTE ORDER
+    All binary data are in origination-host-native byte order.
+    The originating host indicates its byte order in the stream header.
+    Two byte-orders are supported: little-endian and big-endian.
+
+ *. PACKING
+    The preferred mode of operation for reduction of network bandwidth
+    is "packed". In this mode, the event structures use single-byte members
+    whenever possible, and there is no word alignment within the stream.
+    In addition, events with integer data can utilize a packing algorithm
+    to reduce the bandwidth consumed when the values are typically small
+    with regard to the stated type.
+
+    Packed mode is useful from C and C++ where there is ample support
+    from the language itself. Non-packed mode is more natural for languages
+    such as Python and Java and uses word-size members within structs and
+    does not perform any integer data packing.
+
+    NB - packed mode makes use of knowing that zero-length items
+    are invalid and should not be sent, and so stores length-1 wherever
+    a length is required, thus giving a range of 1..256 rather than
+    0..255 for a single byte. The same is true for ids.
+
+ 1. STREAM HEADER
+    The stream starts with a header appropriate for the protocol
+    version in use. For version 1, use a "gw_header_v1".
+
+    Every stream header must have the standard "gw_header" as its
+    base definition. This portion presents an 8-character signature
+    to identify the type of stream, followed immediately by an integer
+    indicating originating-host byte order. The receiver must verify that
+    this value is either GW_GOOD_ENDIAN or GW_REVERSE_ENDIAN; any other
+    value means the stream is either not of this protocol or corrupt.
+    A value of GW_REVERSE_ENDIAN implies that the receiver must perform
+    byte-swapping on all word values within all events and their data.
+    This is likely to be a nearly untenable task by any but the
+    general-loader, where the latter has access to type information.
+
+    The value presented for version must be >= 1 and <= GW_CURRENT_VERSION.
+    A value of 0 must be rejected as not conforming to protocol while a
+    value > GW_CURRENT_VERSION cannot be processed.
+
+    The v1 value for "packing" currently allows for two values: 0 and 1,
+    where 0 means that no packing will be used and 1 indicates packed
+    events will be used. This affects how all subsequent events are to
+    be sent and received.
+
+ 2. SET REMOTE PATH [ OPTIONAL ]
+    In the not-packed case, use "gw_1string_evt".
+      GW_SET_ID_EVT ( & evt.dad, 0, evt_remote_path );
+      evt.sz = strlen ( path );
+    follow with the bytes in path
+      write ( path, strlen ( path ) );
+    end with 0..3 bytes of value 0 to realign stream to 4-byte boundary.
+
+    In the packed case where strlen ( path ) <= 256, use "gwp_1string_evt".
+      GWP_SET_ID_EVT ( & evt.dad, 0, evt_remote_path );
+      evt.sz = strlen ( path ) - 1;
+    follow with the bytes in path
+      write ( path, strlen ( path ) );
+
+    In the packed case where strlen ( path ) > 0x100 but <= 0x10000, use "gwp_1string_evt_U16"
+      GWP_SET_ID_EVT ( & evt.dad, 0, evt_remote_path2 );
+      evt.sz = strlen ( path ) - 1;
+    follow with the bytes in path
+      write ( path, strlen ( path ) );
+
+  MORE TO COME...
+
+ */
+
+
+/*======================================================================
+ * version 1
+ */
+
+/* gw_header
+ *  common to all versions
+ */
+struct gw_header
+{
+    char signature [ 8 ]; /* = GW_SIGNATURE                                     */
+    uint32_t endian;      /* = GW_GOOD_ENDIAN or GW_REVERSE_ENDIAN              */
+    uint32_t version;     /* 0 < version <= GW_CURRENT_VERSION                  */
+    uint32_t hdr_size;    /* the size of the entire header, including alignment */
+};
+
+/* gw_header_v1
+ *  v1 header
+ */
+struct gw_header_v1
+{
+    gw_header dad;
+    uint32_t packing;     /* 0 = no packing, 1 = byte packing */
+};
+
+
+/*----------------------------------------------------------------------
+ * full-size ( not packed ) events
+ */
+
+/* gw_evt_hdr
+ *  common header to not-packed v1 events
+ *
+ *  used as-is for events:
+ *    { evt_end_stream, evt_open_stream, evt_next_row }
+ */
+struct gw_evt_hdr_v1
+{
+    uint32_t id_evt;      /* bits 0..23 = id, bits 24..31 = event code */
+};
+
+/* gw_1string_evt_v1
+ *  event to convey a single string of information
+ *
+ *  used for events:
+ *    { evt_errmsg, evt_remote_path, evt_new_table }
+ */
+struct gw_1string_evt_v1
+{
+    gw_evt_hdr_v1 dad;    /* common header : id = 0 or new table id > 0       */
+    uint32_t sz;          /* size of string in bytes - NO trailing NUL byte   */
+ /* char str [ sz ];       * string data.                                     *
+    char align [ 0..3 ];   * ( ( 4 - sizeof str % 4 ) % 4 ) zeros to align    */
+};
+
+/* gw_2string_evt
+ *  event used to send a pair of strings
+ *
+ *  used for events:
+ *    { evt_use_schema }
+ */
+struct gw_2string_evt_v1
+{
+    gw_evt_hdr_v1 dad;    /* common header : id = 0                           */
+    uint32_t sz1;         /* size of string 1 in bytes, NO trailing NUL byte  */
+    uint32_t sz2;         /* size of string 2 in bytes, NO trailing NUL byte  */
+ /* char str [ sz1+sz2 ];  * string data.                                     *
+    char align [ 0..3 ];   * ( ( 4 - sizeof str % 4 ) % 4 ) zeros             */
+};
+
+/* gw_column_evt
+ *  event used to create a new column
+ *
+ *  used for events:
+ *    { evt_new_column }
+ */
+struct gw_column_evt_v1
+{
+    gw_evt_hdr_v1 dad;    /* common header : id = new column id > 0           */
+    uint32_t table_id;    /* id of column's table                             */
+    uint32_t elem_bits;   /* the size of each element in data type            */
+    uint32_t name_sz;     /* the size in bytes of column "name" ( spec )      */
+ /* char name [ name_sz ]; * the column name/spec.                            *
+    char align [ 0..3 ];   * ( ( 4 - sizeof name % 4 ) % 4 ) zeros            */
+};
+
+/* gw_data_evt
+ *  event used to transfer cell data
+ *
+ *  used for events:
+ *    { evt_cell_default, evt_cell_data }
+ */
+struct gw_data_evt_v1
+{
+    gw_evt_hdr_v1 dad;    /* common header : id = column id                   */
+    uint32_t elem_count;  /* the number of elements in data                   */
+ /* uint8_t data [ x ];    * event data. actual size is:                      *
+                           * ( ( elem_count * col . elem_bits ) + 7 ) / 8     *
+    char align [ 0..3 ];   * ( ( 4 - sizeof data % 4 ) % 4 ) zeros            */
+};
+
+/* gw_move_ahead_evt_v1
+ */
+struct gw_move_ahead_evt_v1
+{
+    gw_evt_hdr_v1 dad;    /* common header : id = column id                   */
+    uint32_t nrows [ 2 ]; /* the number of rows to move ahead                 */
+};
+
+struct gw_add_mbr_evt_v1
+{
+    gw_evt_hdr_v1 dad;
+    uint32_t db_id;
+    uint32_t mbr_sz;
+    uint32_t name_sz;
+    uint8_t create_mode;
+};
+
+struct gw_status_evt_v1
+{
+    gw_evt_hdr_v1 dad;
+    uint32_t version;
+    uint32_t timestamp;
+    uint32_t pid;
+    uint32_t name_sz;
+    uint32_t percent;
+};
+
+/*----------------------------------------------------------------------
+ * packed events
+ *   used for C/C++ level operations
+ */
+
+/* gwp_evt_hdr
+ *  common header to packed v1 events
+ *
+ *  given that id 0 is illegal, this structure does not allocate a
+ *  code for it, but rather stores all ids as id-1, i.e. 1..256 => 0..255.
+ *
+ *  used as-is for events:
+ *    { evt_end_stream, evt_open_stream, evt_next_row }
+ */
+struct gwp_evt_hdr_v1
+{
+    uint8_t _evt;         /* event code from enum              */
+    uint8_t _id;          /* ids 1..256 represented as 0..255  */
+};
+
+/* gwp_1string_evt
+ *  event to convey a single string of information
+ *
+ *  used for events:
+ *    { evt_errmsg, evt_remote_path, evt_new_table }
+ */
+struct gwp_1string_evt_v1
+{
+    gwp_evt_hdr_v1 dad;   /* common header : id = 0 or new table id > 0       */
+    uint8_t sz;           /* size of string - 1 in bytes - NO trailing NUL    */
+ /* char str [ sz+1 ];     * string data                                      */
+};
+
+/* gwp_2string_evt
+ *  event used to send a pair of strings
+ *
+ *  used for events:
+ *    { evt_use_schema }
+ */
+struct gwp_2string_evt_v1
+{
+    gwp_evt_hdr_v1 dad;   /* common header : id = 0                           */
+    uint8_t sz1;          /* size of string 1 - 1 in bytes, NO trailing NUL   */
+    uint8_t sz2;          /* size of string 2 - 1 in bytes, NO trailing NUL   */
+ /* char str[ sz1+sz2+2 ]; * string data.                                     */
+};
+
+/* gwp_column_evt
+ *  event used to create a new column
+ *
+ *  used for events:
+ *    { evt_new_column }
+ */
+struct gwp_column_evt_v1
+{
+    gwp_evt_hdr_v1 dad;   /* common header : id = new column id > 0           */
+    uint8_t table_id;     /* id - 1 of column's table                         */
+    uint8_t elem_bits;    /* the size - 1 of each element in data type        */
+    uint8_t flag_bits;    /* bit[0] = 1 means uses integer element packing    */
+    uint8_t name_sz;      /* the size - 1 in bytes of column "name" ( spec )  */
+ /* char name [ name_sz+1 ]; the column name/spec.                            */
+};
+
+/* gwp_data_evt
+ *  event used to transfer cell data
+ *
+ *  used for events:
+ *    { evt_cell_default, evt_cell_data }
+ */
+struct gwp_data_evt_v1
+{
+    gwp_evt_hdr_v1 dad;   /* common header : id = column id                   */
+    uint8_t sz;           /* the size - 1 of data in bytes                    */
+ /* uint8_t data [ sz+1 ]; * event data.                                      */
+};
+
+/* gwp_move_ahead_evt_v1
+ */
+struct gwp_move_ahead_evt_v1
+{
+    gwp_evt_hdr_v1 dad;   /* common header : id = column id                   */
+    uint16_t nrows [ 4 ]; /* the number of rows to move ahead                 */
+};
+
+
+/* SPECIAL VERSIONS WITH 16-BIT SIZE FIELDS */
+
+/* gwp_1string_evt_U16
+ *  event to convey a single string of information
+ *
+ *  used for events:
+ *    { evt_errmsg2, evt_remote_path2, evt_new_table2 }
+ *
+ *  ...whenever size of string > 256
+ */
+struct gwp_1string_evt_U16_v1
+{
+    gwp_evt_hdr_v1 dad;   /* common header : id = 0 or new table id > 0       */
+    uint16_t sz;          /* size of string - 1 in bytes - NO trailing NUL    */
+ /* char str [ sz+1 ];     * string data.                                     */
+};
+
+/* gwp_2string_evt_U16
+ *  event used to send a pair of strings
+ *
+ *  used for events:
+ *    { evt_use_schema2 }
+ *
+ *  ...whenever size of any string > 256
+ */
+struct gwp_2string_evt_U16_v1
+{
+    gwp_evt_hdr_v1 dad;   /* common header : id = 0                           */
+    uint16_t sz1;         /* size of string 1 - 1 in bytes, NO trailing NUL   */
+    uint16_t sz2;         /* size of string 2 - 1 in bytes, NO trailing NUL   */
+ /* char str[ sz1+sz2+2 ]; * string data.                                     */
+};
+
+
+/* gwp_data_evt_16
+ *  event used to transfer cell data
+ *
+ *  used for events:
+ *    { evt_cell_default2, evt_cell_data2 }
+ */
+struct gwp_data_evt_U16_v1
+{
+    gwp_evt_hdr_v1 dad;   /* common header : id = column id                   */
+    uint16_t sz;          /* the size - 1 of data in bytes                    */
+ /* uint8_t data [ sz+1 ]; * event data.                                      */
+};
+
+struct gwp_add_mbr_evt_v1
+{
+    gwp_evt_hdr_v1 dad;
+    uint8_t db_id;
+    uint8_t mbr_sz;
+    uint8_t name_sz;
+    uint8_t create_mode;
+};
+
+struct gwp_status_evt_v1
+{
+    gwp_evt_hdr_v1 dad;
+    uint32_t version;
+    uint32_t timestamp;
+    uint32_t pid;
+    uint8_t name_sz;
+    uint8_t percent;
+};
+
+#ifdef __cplusplus
+/*======================================================================
+ * support for C++
+ */
+
+#include <string.h>
+#include <assert.h>
+
+namespace ncbi
+{
+    // gw_header
+    inline void init ( :: gw_header & hdr )
+    {
+        memcpy ( hdr . signature, GW_SIGNATURE, sizeof hdr . signature );
+        hdr . endian = GW_GOOD_ENDIAN;
+        hdr . version = GW_CURRENT_VERSION;
+        hdr . hdr_size = sizeof ( :: gw_header );
+    }
+
+    inline void init ( :: gw_header & hdr, size_t hdr_size )
+    {
+        init ( hdr );
+        hdr . hdr_size = ( uint32_t ) hdr_size;
+    }
+
+    // gw_header_v1
+    inline void init ( :: gw_header_v1 & hdr )
+    { init ( hdr . dad, sizeof ( :: gw_header_v1 ) ); hdr . packing = 1; }
+
+    inline void init ( :: gw_header_v1 & hdr, const :: gw_header & dad )
+    { hdr . dad = dad; hdr . packing = 0; }
+
+
+
+    // gw_evt_hdr
+    inline void init ( :: gw_evt_hdr_v1 & hdr, uint32_t id, gw_evt_id evt )
+    {
+        assert ( id < 0x1000000 );
+        assert ( evt != evt_bad_event );
+        assert ( evt < evt_max_id );
+
+        hdr . id_evt = ( id & 0xFFFFFF ) | ( ( uint32_t ) evt << 24 );
+    }
+
+    inline uint32_t id ( const :: gw_evt_hdr_v1 & self )
+    { return self . id_evt & 0xFFFFFF; }
+
+    inline gw_evt_id evt ( const :: gw_evt_hdr_v1 & self )
+    { return ( gw_evt_id ) ( self . id_evt >> 24 ); }
+
+
+    // recording string size
+    inline void set_string_size ( uint32_t & sz, size_t bytes )
+    {
+        assert ( bytes != 0 );
+        assert ( sizeof bytes == 4 || ( bytes >> 32 ) == 0 );
+        sz = ( uint32_t ) bytes;
+    }
+
+    // gw_1string_evt
+    inline void init ( :: gw_1string_evt_v1 & hdr, uint32_t id, gw_evt_id evt )
+    { init ( hdr . dad, id, evt ); hdr . sz = 0; }
+
+    inline void init ( :: gw_1string_evt_v1 & hdr, const :: gw_evt_hdr_v1 & dad )
+    { hdr . dad = dad; hdr . sz = 0; }
+
+    inline size_t size ( const :: gw_1string_evt_v1 & self )
+    { return self . sz; }
+
+    inline void set_size ( :: gw_1string_evt_v1 & self, size_t bytes )
+    { set_string_size ( self . sz, bytes ); }
+
+
+    // gw_2string_evt
+    inline void init ( :: gw_2string_evt_v1 & hdr, uint32_t id, gw_evt_id evt )
+    {
+        init ( hdr . dad, id, evt );
+        hdr . sz1 = hdr . sz2 = 0;
+    }
+
+    inline void init ( :: gw_2string_evt_v1 & hdr, const :: gw_evt_hdr_v1 & dad )
+    {
+        hdr . dad = dad;
+        hdr . sz1 = hdr . sz2 = 0;
+    }
+
+    inline size_t size1 ( const gw_2string_evt_v1 & self )
+    { return self . sz1; }
+
+    inline size_t size2 ( const gw_2string_evt_v1 & self )
+    { return self . sz2; }
+
+    inline void set_size1 ( :: gw_2string_evt_v1 & self, size_t bytes )
+    { set_string_size ( self . sz1, bytes ); }
+
+    inline void set_size2 ( :: gw_2string_evt_v1 & self, size_t bytes )
+    { set_string_size ( self . sz2, bytes ); }
+
+    // gw_column_evt
+    inline void init ( :: gw_column_evt_v1 & hdr, uint32_t id, gw_evt_id evt )
+    {
+        init ( hdr . dad, id, evt );
+        hdr . table_id = hdr . elem_bits = hdr . name_sz = 0;
+    }
+
+    inline void init ( :: gw_column_evt_v1 & hdr, const :: gw_evt_hdr_v1 & dad )
+    {
+        hdr . dad = dad;
+        hdr . table_id = hdr . elem_bits = hdr . name_sz = 0;
+    }
+
+    inline uint32_t table_id ( const :: gw_column_evt_v1 & self )
+    { return self . table_id; }
+
+    inline uint32_t elem_bits ( const :: gw_column_evt_v1 & self )
+    { return self . elem_bits; }
+
+    inline uint8_t flag_bits ( const :: gw_column_evt_v1 & self )
+    { return 0; }
+
+    inline size_t name_size ( const :: gw_column_evt_v1 & self )
+    { return self . name_sz; }
+
+    inline void set_table_id ( :: gw_column_evt_v1 & self, uint32_t table_id )
+    {
+        assert ( table_id != 0 );
+        self . table_id = table_id;
+    }
+
+    inline void set_elem_bits ( :: gw_column_evt_v1 & self, uint32_t elem_bits )
+    {
+        assert ( elem_bits != 0 );
+        self . elem_bits = elem_bits;
+    }
+
+    inline void set_name_size ( :: gw_column_evt_v1 & self, size_t name_size )
+    { set_string_size ( self . name_sz, name_size ); }
+
+
+    // gw_data_evt
+    inline void init ( :: gw_data_evt_v1 & hdr, uint32_t id, gw_evt_id evt )
+    { init ( hdr . dad, id, evt ); hdr . elem_count = 0; }
+
+    inline void init ( :: gw_data_evt_v1 & hdr, const :: gw_evt_hdr_v1 & dad )
+    { hdr . dad = dad; hdr . elem_count = 0; }
+
+    inline uint32_t elem_count ( const :: gw_data_evt_v1 & self )
+    { return self . elem_count; }
+
+    inline void set_elem_count ( :: gw_data_evt_v1 & self, uint32_t elem_count )
+    {
+        assert ( elem_count != 0 );
+        self . elem_count = elem_count;
+    }
+
+    // gw_move_ahead_evt_v1
+    inline void init ( :: gw_move_ahead_evt_v1 & hdr, uint32_t id, gw_evt_id evt )
+    {
+        init ( hdr . dad, id, evt );
+        memset ( & hdr . nrows, 0, sizeof hdr . nrows );
+    }
+
+    inline void init ( :: gw_move_ahead_evt_v1 & hdr, const :: gw_evt_hdr_v1 & dad )
+    {
+        hdr . dad = dad;
+        memset ( & hdr . nrows, 0, sizeof hdr . nrows );
+    }
+
+    inline uint64_t get_nrows ( const :: gw_move_ahead_evt_v1 & self )
+    {
+        uint64_t nrows;
+        memcpy ( & nrows, & self . nrows, sizeof nrows );
+        return nrows;
+    }
+
+    inline void set_nrows ( :: gw_move_ahead_evt_v1 & self, uint64_t nrows )
+    {
+        memcpy ( & self . nrows, & nrows, sizeof self . nrows );
+    }
+
+    // gw_add_mbr_evt
+    inline void init ( :: gw_add_mbr_evt_v1 & hdr, uint32_t id, gw_evt_id evt )
+    {
+        init ( hdr . dad, id, evt );
+        hdr . db_id = hdr . mbr_sz = hdr . name_sz = hdr . create_mode = 0;
+    }
+
+    inline void init ( :: gw_add_mbr_evt_v1 & hdr, const :: gw_evt_hdr_v1 & dad )
+    {
+        hdr . dad = dad;
+        hdr . db_id = hdr . mbr_sz = hdr . name_sz = hdr . create_mode = 0;
+    }
+
+    inline uint32_t db_id ( const gw_add_mbr_evt_v1 & self )
+    { return self . db_id; }
+
+    inline void set_db_id ( :: gw_add_mbr_evt_v1 & self, uint8_t db_id )
+    {
+        assert ( db_id >= 0 );
+        self . db_id = db_id;
+    }
+
+    inline size_t size1 ( const gw_add_mbr_evt_v1 & self )
+    { return ( size_t ) self . mbr_sz; }
+
+    inline size_t size2 ( const gw_add_mbr_evt_v1 & self )
+    { return ( size_t ) self . name_sz; }
+
+    inline void set_size1 ( :: gw_add_mbr_evt_v1 & self, size_t bytes )
+    {
+        set_string_size ( self . mbr_sz, bytes );
+    }
+
+    inline void set_size2 ( :: gw_add_mbr_evt_v1 & self, size_t bytes )
+    {
+        set_string_size ( self . name_sz, bytes );
+    }
+
+    inline uint8_t create_mode ( const gw_add_mbr_evt_v1 & self )
+    { return self . create_mode; }
+
+    inline void set_create_mode ( :: gw_add_mbr_evt_v1 & self, uint8_t mode )
+    {
+        self . create_mode = mode;
+    }
+
+    // gw_status_evt
+    inline void init ( :: gw_status_evt_v1 &hdr, uint32_t id, gw_evt_id evt )
+    {
+        init ( hdr . dad, id, evt );
+        hdr . version = hdr . timestamp = hdr . pid = hdr . name_sz = hdr . percent = 0;
+    }
+
+    inline void init ( :: gw_status_evt_v1 &hdr, const :: gw_evt_hdr_v1 &dad )
+    {
+        hdr . dad = dad;
+        hdr . version = hdr . timestamp = hdr . pid = hdr . name_sz = hdr . percent = 0;
+    }
+
+    inline void set_version ( :: gw_status_evt_v1 &self, uint32_t version )
+    {
+        assert ( version > 0 );
+        self . version = version;
+    }
+
+    inline uint32_t version ( const :: gw_status_evt_v1 &self )
+    { return self . version; }
+
+    inline void set_timestamp ( :: gw_status_evt_v1 &self, uint32_t timestamp )
+    {
+        assert ( timestamp > 0 );
+        self . timestamp = timestamp;
+    }
+
+    inline uint32_t timestamp ( const :: gw_status_evt_v1 &self )
+    { return self . timestamp; }
+
+    inline void set_pid ( :: gw_status_evt_v1 &self, uint32_t pid )
+    {
+        assert ( pid > 0 );
+        self . pid = pid;
+    }
+
+    inline uint32_t pid ( const :: gw_status_evt_v1 &self )
+    { return self . pid; }
+
+    inline void set_size ( :: gw_status_evt_v1 &self, size_t bytes )
+    {
+        set_string_size ( self . name_sz, bytes );
+    }
+
+    inline size_t size ( const :: gw_status_evt_v1 &self )
+    { return ( size_t ) self . name_sz; }
+
+    inline void set_percent ( :: gw_status_evt_v1 &self, uint32_t percent )
+    {
+        self . percent = percent;
+    }
+
+    inline uint32_t percent ( const :: gw_status_evt_v1 &self )
+    { return self . percent; }
+
+    ////////// packed events //////////
+
+    // gwp_evt_hdr
+    inline void init ( :: gwp_evt_hdr_v1 & hdr, uint32_t id, gw_evt_id evt )
+    {
+        // allow zero, but treat as 256
+        assert ( id <= 0x100 );
+        assert ( evt != evt_bad_event );
+        assert ( evt < evt_max_id );
+
+        hdr . _evt = ( uint8_t ) evt;
+        hdr . _id = ( uint8_t ) ( id - 1 );
+    }
+
+    inline uint32_t id ( const :: gwp_evt_hdr_v1 & self )
+    { return ( uint32_t ) self . _id + 1; }
+
+    inline gw_evt_id evt ( const :: gwp_evt_hdr_v1 & self )
+    { return ( gw_evt_id ) self . _evt; }
+
+
+    // recording string size
+    inline void set_string_size ( uint8_t & sz, size_t bytes )
+    {
+        assert ( bytes != 0 );
+        assert ( bytes <= 0x100 );
+        sz = ( uint8_t ) ( bytes - 1 );
+    }
+
+    // gwp_1string_evt
+    inline void init ( :: gwp_1string_evt_v1 & hdr, uint32_t id, gw_evt_id evt )
+    {
+        init ( hdr . dad, id, evt );
+        hdr . sz = 0;
+    }
+
+    inline void init ( :: gwp_1string_evt_v1 & hdr, const :: gwp_evt_hdr_v1 & dad )
+    {
+        hdr . dad = dad;
+        hdr . sz = 0;
+    }
+
+    inline size_t size ( const :: gwp_1string_evt_v1 & self )
+    { return ( size_t ) self . sz + 1; }
+
+    inline void set_size ( :: gwp_1string_evt_v1 & self, size_t bytes )
+    { set_string_size ( self . sz, bytes ); }
+
+
+    // gwp_2string_evt
+    inline void init ( :: gwp_2string_evt_v1 & hdr, uint32_t id, gw_evt_id evt )
+    {
+        init ( hdr . dad, id, evt );
+        hdr . sz1 = hdr . sz2 = 0;
+    }
+
+    inline void init ( :: gwp_2string_evt_v1 & hdr, const :: gwp_evt_hdr_v1 & dad )
+    {
+        hdr . dad = dad;
+        hdr . sz1 = hdr . sz2 = 0;
+    }
+
+    inline size_t size1 ( const gwp_2string_evt_v1 & self )
+    { return ( size_t ) self . sz1 + 1; }
+
+    inline size_t size2 ( const gwp_2string_evt_v1 & self )
+    { return ( size_t ) self . sz2 + 1; }
+
+    inline void set_size1 ( :: gwp_2string_evt_v1 & self, size_t bytes )
+    { set_string_size ( self . sz1, bytes ); }
+
+    inline void set_size2 ( :: gwp_2string_evt_v1 & self, size_t bytes )
+    { set_string_size ( self . sz2, bytes ); }
+
+
+    // gwp_column_evt
+    inline void init ( :: gwp_column_evt_v1 & hdr, uint32_t id, gw_evt_id evt )
+    {
+        init ( hdr . dad, id, evt );
+        hdr . table_id = hdr . elem_bits = hdr . name_sz = 0;
+    }
+
+    inline void init ( :: gwp_column_evt_v1 & hdr, const :: gwp_evt_hdr_v1 & dad )
+    {
+        hdr . dad = dad;
+        hdr . table_id = hdr . elem_bits = hdr . name_sz = 0;
+    }
+
+    inline uint32_t table_id ( const :: gwp_column_evt_v1 & self )
+    { return ( uint32_t ) self . table_id + 1; }
+
+    inline uint32_t elem_bits ( const :: gwp_column_evt_v1 & self )
+    { return ( uint32_t ) self . elem_bits + 1; }
+
+    inline uint8_t flag_bits ( const :: gwp_column_evt_v1 & self )
+    { return self . flag_bits; }
+
+    inline size_t name_size ( const :: gwp_column_evt_v1 & self )
+    { return ( size_t ) self . name_sz + 1; }
+
+    inline void set_table_id ( :: gwp_column_evt_v1 & self, uint32_t table_id )
+    {
+        assert ( table_id != 0 );
+        assert ( table_id <= 0x100 );
+        self . table_id = ( uint8_t ) ( table_id - 1 );
+    }
+
+    inline void set_elem_bits ( :: gwp_column_evt_v1 & self, uint32_t elem_bits )
+    {
+        assert ( elem_bits != 0 );
+        assert ( elem_bits <= 0x100 );
+        self . elem_bits = ( uint8_t ) ( elem_bits - 1 );
+    }
+
+    inline void set_name_size ( :: gwp_column_evt_v1 & self, size_t name_size )
+    { set_string_size ( self . name_sz, name_size ); }
+
+
+    // gwp_data_evt
+    inline void init ( :: gwp_data_evt_v1 & hdr, uint32_t id, gw_evt_id evt )
+    {
+        init ( hdr . dad, id, evt );
+        hdr . sz = 0;
+    }
+
+    inline void init ( :: gwp_data_evt_v1 & hdr, const :: gwp_evt_hdr_v1 & dad )
+    {
+        hdr . dad = dad;
+        hdr . sz = 0;
+    }
+
+    inline uint32_t size ( const :: gwp_data_evt_v1 & self )
+    { return ( uint32_t ) self . sz + 1; }
+
+    inline void set_size ( :: gwp_data_evt_v1 & self, size_t bytes )
+    { set_string_size ( self . sz, bytes ); }
+
+
+    // gwp_move_ahead_evt_v1
+    inline void init ( :: gwp_move_ahead_evt_v1 & hdr, uint32_t id, gw_evt_id evt )
+    {
+        init ( hdr . dad, id, evt );
+        memset ( & hdr . nrows, 0, sizeof hdr . nrows );
+    }
+
+    inline void init ( :: gwp_move_ahead_evt_v1 & hdr, const :: gwp_evt_hdr_v1 & dad )
+    {
+        hdr . dad = dad;
+        memset ( & hdr . nrows, 0, sizeof hdr . nrows );
+    }
+
+    inline uint64_t get_nrows ( const :: gwp_move_ahead_evt_v1 & self )
+    {
+        uint64_t nrows;
+        memcpy ( & nrows, & self . nrows, sizeof nrows );
+        return nrows;
+    }
+
+    inline void set_nrows ( :: gwp_move_ahead_evt_v1 & self, uint64_t nrows )
+    {
+        memcpy ( & self . nrows, & nrows, sizeof self . nrows );
+    }
+
+
+    // recording string size
+    inline void set_string_size ( uint16_t & sz, size_t bytes )
+    {
+        assert ( bytes != 0 );
+        assert ( bytes <= 0x10000 );
+        sz = ( uint16_t ) ( bytes - 1 );
+    }
+
+    // gwp_1string_evt_U16
+    inline void init ( :: gwp_1string_evt_U16_v1 & hdr, uint32_t id, gw_evt_id evt )
+    {
+        init ( hdr . dad, id, evt );
+        hdr . sz = 0;
+    }
+
+    inline void init ( :: gwp_1string_evt_U16_v1 & hdr, const :: gwp_evt_hdr_v1 & dad )
+    {
+        hdr . dad = dad;
+        hdr . sz = 0;
+    }
+
+    inline size_t size ( const :: gwp_1string_evt_U16_v1 & self )
+    { return ( size_t ) self . sz + 1; }
+
+    inline void set_size ( :: gwp_1string_evt_U16_v1 & self, size_t bytes )
+    { set_string_size ( self . sz, bytes ); }
+
+
+    // gwp_2string_evt
+    inline void init ( :: gwp_2string_evt_U16_v1 & hdr, uint32_t id, gw_evt_id evt )
+    {
+        init ( hdr . dad, id, evt );
+        hdr . sz1 = hdr . sz2 = 0;
+    }
+
+    inline void init ( :: gwp_2string_evt_U16_v1 & hdr, const :: gwp_evt_hdr_v1 & dad )
+    {
+        hdr . dad = dad;
+        hdr . sz1 = hdr . sz2 = 0;
+    }
+
+    inline size_t size1 ( const gwp_2string_evt_U16_v1 & self )
+    { return ( size_t ) self . sz1 + 1; }
+
+    inline size_t size2 ( const gwp_2string_evt_U16_v1 & self )
+    { return ( size_t ) self . sz2 + 1; }
+
+    inline void set_size1 ( :: gwp_2string_evt_U16_v1 & self, size_t bytes )
+    { set_string_size ( self . sz1, bytes ); }
+
+    inline void set_size2 ( :: gwp_2string_evt_U16_v1 & self, size_t bytes )
+    { set_string_size ( self . sz2, bytes ); }
+
+
+    // gwp_data_evt
+    inline void init ( :: gwp_data_evt_U16_v1 & hdr, uint32_t id, gw_evt_id evt )
+    {
+        init ( hdr . dad, id, evt );
+        hdr . sz = 0;
+    }
+
+    inline void init ( :: gwp_data_evt_U16_v1 & hdr, const :: gwp_evt_hdr_v1 & dad )
+    {
+        hdr . dad = dad;
+        hdr . sz = 0;
+    }
+
+    inline uint32_t size ( const :: gwp_data_evt_U16_v1 & self )
+    { return ( uint32_t ) self . sz + 1; }
+
+    inline void set_size ( :: gwp_data_evt_U16_v1 & self, size_t bytes )
+    { set_string_size ( self . sz, bytes ); }
+
+
+    // gwp_add_mbr_evt
+    inline void init ( :: gwp_add_mbr_evt_v1 & hdr, uint32_t id, gw_evt_id evt )
+    {
+        init ( hdr . dad, id, evt );
+        hdr . db_id = hdr . mbr_sz = hdr . name_sz = hdr . create_mode = 0;
+    }
+
+    inline void init ( :: gwp_add_mbr_evt_v1 & hdr, const :: gwp_evt_hdr_v1 & dad )
+    {
+        hdr . dad = dad;
+        hdr . db_id = hdr . mbr_sz = hdr . name_sz = hdr . create_mode = 0;
+    }
+
+    inline uint8_t db_id ( const gwp_add_mbr_evt_v1 & self )
+    { return self . db_id; }
+
+
+    inline void set_db_id ( :: gwp_add_mbr_evt_v1 & self, uint8_t db_id )
+    {
+        assert ( db_id >= 0 );
+        self . db_id = db_id;
+    }
+
+    inline size_t size1 ( const gwp_add_mbr_evt_v1 & self )
+    { return ( size_t ) self . mbr_sz + 1; }
+
+    inline size_t size2 ( const gwp_add_mbr_evt_v1 & self )
+    { return ( size_t ) self . name_sz + 1; }
+
+    inline void set_size1 ( :: gwp_add_mbr_evt_v1 & self, size_t bytes )
+    {
+        set_string_size ( self . mbr_sz, bytes );
+    }
+
+    inline void set_size2 ( :: gwp_add_mbr_evt_v1 & self, size_t bytes )
+    {
+        set_string_size ( self . name_sz, bytes );
+    }
+
+    inline uint8_t create_mode ( const gwp_add_mbr_evt_v1 & self )
+    { return self . create_mode; }
+
+    inline void set_create_mode ( :: gwp_add_mbr_evt_v1 & self, uint8_t mode )
+    {
+        self . create_mode = mode;
+    }
+
+    // gwp_status_evt
+    inline void init ( :: gwp_status_evt_v1 &hdr, uint32_t id, gw_evt_id evt )
+    {
+        init ( hdr . dad, id, evt );
+        hdr . version = hdr . timestamp  = 0;
+        hdr . name_sz = hdr . percent = 0;
+    }
+
+    inline void init ( :: gwp_status_evt_v1 &hdr, const :: gwp_evt_hdr_v1 &dad )
+    {
+        hdr . dad = dad;
+        hdr . version = hdr . timestamp = 0;
+        hdr . name_sz = hdr . percent = 0;
+    }
+
+    inline void set_pid ( :: gwp_status_evt_v1 &self, int pid )
+    {
+        assert ( pid > 0 );
+        self . pid = ( uint32_t ) pid;
+    }
+
+    inline uint32_t pid ( const :: gwp_status_evt_v1 &self )
+    { return self . pid; }
+
+
+    inline void set_version ( :: gwp_status_evt_v1 &self, uint32_t version )
+    {
+        assert ( version != 0 );
+        self . version = version;
+    }
+
+    inline uint32_t version ( const :: gwp_status_evt_v1 &self )
+    { return self . version; }
+
+    inline void set_timestamp ( :: gwp_status_evt_v1 &self, uint32_t timestamp )
+    {
+        assert ( timestamp != 0 );
+        self . timestamp = timestamp;
+    }
+
+    inline uint32_t timestamp ( const :: gwp_status_evt_v1 &self )
+    { return self . timestamp; }
+
+    inline void set_size ( :: gwp_status_evt_v1 &self, size_t bytes )
+    {
+        set_string_size ( self . name_sz, bytes );
+    }
+
+    inline size_t size ( const :: gwp_status_evt_v1 &self )
+    { return ( size_t ) self . name_sz + 1; }
+
+    inline void set_percent ( :: gwp_status_evt_v1 &self, uint32_t percent )
+    {
+        self . percent = percent;
+    }
+
+    inline uint32_t percent ( const :: gwp_status_evt_v1 &self )
+    { return self . percent; }
+
+}
+#endif
+
+
+#endif /*_h_general_writer_*/
diff --git a/tools/general-loader/general-writer.hpp b/tools/general-loader/general-writer.hpp
new file mode 100644
index 0000000..5c98ebd
--- /dev/null
+++ b/tools/general-loader/general-writer.hpp
@@ -0,0 +1,210 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _hpp_general_writer_
+#define _hpp_general_writer_
+
+#ifndef _h_general_writer_
+#include "general-writer.h"
+#endif
+
+#include <iostream>
+#include <string>
+#include <stdint.h>
+#include <vector>
+#include <fstream>
+#include <map>
+
+#include <string.h>
+
+namespace ncbi
+{
+#if GW_CURRENT_VERSION <= 2
+    typedef :: gwp_evt_hdr_v1 gwp_evt_hdr;
+#else
+#error "unrecognized GW version"
+#endif
+
+    class GeneralWriter
+    {
+    public:
+
+        // ask the general-loader to use this when naming its output
+        void setRemotePath ( const std :: string & remote_db );
+
+        void setSoftwareName ( const std :: string & name,
+                               const std :: string & version );
+
+        // tell the general-loader to use this pre-defined schema
+        void useSchema ( const std :: string & schema_file_name,
+                         const std :: string & schema_db_spec );
+
+        // add a new table
+        // the table-id is returned
+        int addTable ( const std :: string &table_name );
+
+        // add a column to an existing table
+        // the column-id is returned
+        int addColumn ( int table_id, const std :: string &column_name, uint32_t elem_bits, uint8_t flags = 0 );
+
+        // when the column is known to have integer data, use this method
+        // it will utilize payload packing for reduced bandwidth
+        inline int addIntegerColumn ( int table_id, const std :: string &column_name, uint32_t elem_bits )
+        { return addColumn ( table_id, column_name, elem_bits, 1 ); }
+
+        int dbAddDatabase ( int db_id, const std :: string &mbr_name, 
+                             const std :: string &db_name, uint8_t create_mode );
+
+        int dbAddTable ( int db_id, const std :: string &mbr_name, 
+                             const std :: string &tbl_name, uint8_t create_mode );
+
+        // ensure there are atleast one table and one column
+        // set GeneralWriter to open state
+        // write out open_stream event header
+        void open ();
+
+        // add or set metadata on a specific object
+        // where obj_id == 0 => outer database, and
+        // any other positive id means the database, table or column
+        void setDBMetadataNode ( int obj_id,
+                               const std :: string & node_path,
+                               const std :: string & value );
+        void setTblMetadataNode ( int obj_id,
+                               const std :: string & node_path,
+                               const std :: string & value );
+        void setColMetadataNode ( int obj_id,
+                               const std :: string & node_path,
+                               const std :: string & value );
+
+        // generates a chunk of cell data
+        // MUST be entire default value in one event
+        void columnDefault ( int stream_id, uint32_t elem_bits, const void *data, uint32_t elem_count );
+
+        // generate a chunk of cell data
+        // may be repeated as often as necessary to complete a single cell's data
+        void write ( int stream_id, uint32_t elem_bits, const void *data, uint32_t elem_count );
+
+        // commit and close current row, move to next row
+        void nextRow ( int table_id );
+
+        // commit and close current row, move ahead by nrows
+        void moveAhead ( int table_id, uint64_t nrows );
+
+        // indicate some sort of exception
+        void logError ( const std :: string & msg );
+
+        // XML logging for general-loader
+        void logMsg ( const std :: string &msg );
+
+        // indicate progress
+        void progMsg ( const std :: string &name, 
+                       uint32_t version, uint64_t done, uint64_t total );
+
+        // generates an end event
+        // puts object into state that will reject any further transmissions
+        void endStream ();
+
+        // out_fd writes to an open file descriptor ( generally stdout )
+        // out_path initializes output stream for writing to a file
+        GeneralWriter ( int out_fd, size_t buffer_size = 32 * 1024 );
+        GeneralWriter ( const std :: string & out_path );
+
+        // output stream is flushed and closed
+        ~ GeneralWriter ();
+
+    private:
+
+        void writeHeader ();
+        void internal_write ( const void *data, size_t num_bytes );
+        void write_event ( const gwp_evt_hdr * evt, size_t evt_size );
+        void flush ();
+        uint32_t getPid ();
+
+        struct int_stream
+        {
+            bool operator < ( const int_stream &s ) const;
+            int_stream ( int table_id, const std :: string &column_name, uint32_t elem_bits, uint8_t flag_bits );
+
+            int table_id;
+            std :: string column_name;
+            uint32_t elem_bits;
+            uint8_t flag_bits;
+        };
+
+        struct int_dbtbl
+        {
+            bool operator < ( const int_dbtbl &db ) const;
+            int_dbtbl ( int db_id, const std :: string &obj_name );
+
+            int db_id;
+            std :: string obj_name;
+        };
+
+        std :: ofstream out;
+
+        std :: map < int_dbtbl, int > db_name_idx;
+        std :: map < int_dbtbl, int > table_name_idx;
+        std :: map < int_stream, int > column_name_idx;
+
+        std :: vector < int_stream > streams;
+        std :: vector < int_dbtbl > tables;
+        std :: vector < int_dbtbl > dbs;
+
+        uint64_t evt_count;
+        uint64_t byte_count;
+
+        int pid;
+
+        uint8_t * packing_buffer;
+
+        uint8_t * output_buffer;
+        size_t output_bsize;
+        size_t output_marker;
+
+        int out_fd;
+
+        enum stream_state
+        {
+            uninitialized,
+            header_written,
+            remote_name_sent,
+            schema_sent,
+            software_name_sent,
+            remote_name_and_schema_sent,
+            remote_name_and_software_name_sent,
+            schema_and_software_name_sent,
+            remote_name_schema_and_software_name_sent,
+            have_table,
+            have_column,
+            opened,
+            closed,
+            error
+        };
+        stream_state state;
+    };
+}
+
+#endif // _hpp_general_writer_
diff --git a/tools/general-loader/gw-dumper.cpp b/tools/general-loader/gw-dumper.cpp
new file mode 100644
index 0000000..9525317
--- /dev/null
+++ b/tools/general-loader/gw-dumper.cpp
@@ -0,0 +1,1785 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "general-writer.h"
+#include "utf8-like-int-codec.h"
+
+#include <kfs/defs.h>
+
+#include <iostream>
+#include <vector>
+
+#include <stdio.h>
+#include <string.h>
+#include <byteswap.h>
+#include <stdlib.h>
+#include <stdint.h>
+
+using namespace ncbi;
+
+namespace gw_dump
+{
+    static bool display;
+    static uint32_t verbose;
+    static uint64_t event_num;
+    static uint64_t jump_event;
+    static uint64_t end_event;
+    static uint64_t foffset;
+
+    struct tbl_entry
+    {
+        tbl_entry ( const std :: string & _name )
+            : row_id ( 1 )
+            , member_name ( _name )
+            , tbl_name ( _name )
+        {
+        }
+
+        tbl_entry ( const std :: string & _member_name, const std :: string & _tbl_name )
+            : row_id ( 1 )
+            , member_name ( _member_name )
+            , tbl_name ( _tbl_name )
+        {
+        }
+
+        int64_t row_id;
+        std :: string member_name;
+        std :: string tbl_name;
+    };
+
+    static std :: vector < tbl_entry > tbl_entries;
+
+    struct db_entry
+    {
+        db_entry ( const std :: string & _member_name, const std :: string & _db_name )
+            : row_id ( 1 )
+            , member_name ( _member_name )
+            , db_name ( _db_name )
+        {
+        }
+
+        int64_t row_id;
+        std :: string member_name;
+        std :: string db_name;
+    };
+
+    static std :: vector < db_entry > db_entries;
+
+
+    struct col_entry
+    {
+        col_entry ( uint32_t _table_id, const std :: string & name, uint32_t _elem_bits, uint8_t _flag_bits = 0 )
+            : table_id ( _table_id )
+            , spec ( name )
+            , elem_bits ( _elem_bits )
+            , flag_bits ( _flag_bits )
+        {
+        }
+
+        ~ col_entry () {}
+
+        uint32_t table_id;
+        std :: string spec;
+        uint32_t elem_bits;
+        uint8_t flag_bits;
+    };
+    static std :: vector < col_entry > col_entries;
+
+    static
+    size_t readFILE ( void * buffer, size_t elem_size, size_t elem_count, FILE * in )
+    {
+        size_t num_read = fread ( buffer, elem_size, elem_count, in );
+        foffset += num_read * elem_size;
+        return num_read;
+    }
+
+    /* read_1string
+     */
+    template < class T > static
+    char * read_1string ( const T & eh, FILE * in )
+    {
+        size_t string_size = size ( eh );
+        char * string_buffer = new char [ string_size ];
+        size_t num_read = readFILE ( string_buffer, sizeof string_buffer [ 0 ], string_size, in );
+        if ( num_read != string_size )
+        {
+            delete [] string_buffer;
+            throw "failed to read string data";
+        }
+
+        return string_buffer;
+    }
+
+    template <>
+    char * read_1string < :: gw_1string_evt_v1 > ( const :: gw_1string_evt_v1 & eh, FILE * in )
+    {
+        size_t string_size_uint32 = ( size ( eh ) + 3 ) / 4;
+        uint32_t * string_buffer = new uint32_t [ string_size_uint32 ];
+        size_t num_read = readFILE ( string_buffer, sizeof string_buffer [ 0 ], string_size_uint32, in );
+        if ( num_read != string_size_uint32 )
+        {
+            delete [] string_buffer;
+            throw "failed to read string data";
+        }
+
+        return ( char * ) string_buffer;
+    }
+
+    template <>
+    char * read_1string < :: gw_status_evt_v1 > ( const :: gw_status_evt_v1 & eh, FILE * in )
+    {
+        size_t string_size_uint32 = ( size ( eh ) + 3 ) / 4;
+        uint32_t * string_buffer = new uint32_t [ string_size_uint32 ];
+        size_t num_read = readFILE ( string_buffer, sizeof string_buffer [ 0 ], string_size_uint32, in );
+        if ( num_read != string_size_uint32 )
+        {
+            delete [] string_buffer;
+            throw "failed to read string data";
+        }
+
+        return ( char * ) string_buffer;
+    }
+
+    /* whack_1string
+     */
+    template < class T > static
+    void whack_1string ( const T & eh, char * string_buffer )
+    {
+        delete [] string_buffer;
+    }
+
+    template <>
+    void whack_1string < :: gw_1string_evt_v1 > ( const :: gw_1string_evt_v1 & eh, char * string_buffer )
+    {
+        uint32_t * buffer = ( uint32_t * ) string_buffer;
+        delete [] buffer;
+    }
+
+    /* read_2string
+     */
+    template < class T > static
+    char * read_2string ( const T & eh, FILE * in )
+    {
+        size_t string_size = size1 ( eh ) + size2 ( eh );
+        char * string_buffer = new char [ string_size ];
+        size_t num_read = readFILE ( string_buffer, sizeof string_buffer [ 0 ], string_size, in );
+        if ( num_read != string_size )
+        {
+            delete [] string_buffer;
+            throw "failed to read dual string data";
+        }
+
+        return string_buffer;
+    }
+
+    template <>
+    char * read_2string < :: gw_2string_evt_v1 > ( const :: gw_2string_evt_v1 & eh, FILE * in )
+    {
+        size_t string_size_uint32 = ( size1 ( eh ) + size2 ( eh ) + 3 ) / 4;
+        uint32_t * string_buffer = new uint32_t [ string_size_uint32 ];
+        size_t num_read = readFILE ( string_buffer, sizeof string_buffer [ 0 ], string_size_uint32, in );
+        if ( num_read != string_size_uint32 )
+        {
+            delete [] string_buffer;
+            throw "failed to read dual string data";
+        }
+
+        return ( char * ) string_buffer;
+    }
+
+    /* whack_2string
+     */
+    template < class T > static
+    void whack_2string ( const T & eh, char * string_buffer )
+    {
+        delete [] string_buffer;
+    }
+
+    template <>
+    void whack_2string < :: gw_2string_evt_v1 > ( const :: gw_2string_evt_v1 & eh, char * string_buffer )
+    {
+        uint32_t * buffer = ( uint32_t * ) string_buffer;
+        delete [] buffer;
+    }
+
+    /* read_colname
+     */
+    template < class T > static
+    char * read_colname ( const T & eh, FILE * in )
+    {
+        size_t string_size = name_size ( eh );
+        char * string_buffer = new char [ string_size ];
+        size_t num_read = readFILE ( string_buffer, sizeof string_buffer [ 0 ], string_size, in );
+        if ( num_read != string_size )
+        {
+            delete [] string_buffer;
+            throw "failed to read column name";
+        }
+
+        return string_buffer;
+    }
+
+    template <>
+    char * read_colname < :: gw_column_evt_v1 > ( const :: gw_column_evt_v1 & eh, FILE * in )
+    {
+        size_t string_size_uint32 = ( name_size ( eh ) + 3 ) / 4;
+        uint32_t * string_buffer = new uint32_t [ string_size_uint32 ];
+        size_t num_read = readFILE ( string_buffer, sizeof string_buffer [ 0 ], string_size_uint32, in );
+        if ( num_read != string_size_uint32 )
+        {
+            delete [] string_buffer;
+            throw "failed to read column name";
+        }
+
+        return ( char * ) string_buffer;
+    }
+
+    /* whack_colname
+     */
+    template < class T > static
+    void whack_colname ( const T & eh, char * string_buffer )
+    {
+        delete [] string_buffer;
+    }
+
+    template <>
+    void whack_colname < :: gw_column_evt_v1 > ( const :: gw_column_evt_v1 & eh, char * string_buffer )
+    {
+        uint32_t * buffer = ( uint32_t * ) string_buffer;
+        delete [] buffer;
+    }
+
+
+    /* check_move_ahead
+     */
+    template < class T > static
+    void check_move_ahead ( const T & eh )
+    {
+        if ( id ( eh . dad ) == 0 )
+            throw "bad table id within move-ahead event (null)";
+        if ( id ( eh . dad ) > tbl_entries . size () )
+            throw "bad table id within move-ahead event";
+    }
+
+    /* dump_move_ahead
+     */
+    template < class D, class T > static
+    void dump_move_ahead ( FILE * in, const D & e )
+    {
+        T eh;
+        init ( eh, e );
+
+        size_t num_read = readFILE ( eh . nrows, sizeof eh - sizeof ( D ), 1, in );
+        if ( num_read != 1 )
+            throw "failed to read move-ahead event";
+
+        check_move_ahead ( eh );
+
+        // advance row-id
+        tbl_entry & te = tbl_entries [ id ( eh . dad ) - 1 ];
+        te . row_id += get_nrows ( eh );
+
+        if ( display )
+        {
+            const std :: string & tbl_name = te . tbl_name;
+
+            std :: cout
+                << event_num << ": move-ahead\n"
+                << "  table_id = " << id ( eh . dad ) << " ( \"" << tbl_name << "\" )\n"
+                << "  nrows = " << get_nrows ( eh ) << '\n'
+                << "  row_id = " << te . row_id << '\n'
+                ;
+        }
+    }
+
+
+    /* check_next_row
+     *  all:
+     *    0 < id <= count(tbls)
+     */
+    template < class T > static
+    void check_next_row ( const T & eh )
+    {
+        if ( id ( eh ) == 0 )
+            throw "bad table id within next-row event (null)";
+        if ( id ( eh ) > tbl_entries . size () )
+            throw "bad table id within next-row event";
+    }
+
+    /* dump_next_row
+     */
+    template < class T > static
+    void dump_next_row ( FILE * in, const T & eh )
+    {
+        check_next_row ( eh );
+
+        // advance row-id
+        tbl_entry & te = tbl_entries [ id ( eh ) - 1 ];
+        ++ te . row_id;
+
+        if ( display )
+        {
+            const std :: string & tbl_name = te . tbl_name;
+
+            std :: cout
+                << event_num << ": next-row\n"
+                << "  table_id = " << id ( eh ) << " ( \"" << tbl_name << "\" )\n"
+                << "  row_id = " << te . row_id << '\n'
+                ;
+        }
+    }
+
+    /* check_empty_default
+     */
+    template < class T > static
+    void check_empty_default ( const T & eh )
+    {
+        if ( id ( eh ) == 0 )
+            throw "bad cell event id (null)";
+        if ( id ( eh ) > col_entries . size () )
+            throw "bad cell event id";
+    }
+
+    /* dump_empty_default
+     */
+    template < class T > static
+    void dump_empty_default ( FILE * in, const T & eh )
+    {
+        check_empty_default ( eh );
+
+        if ( display )
+        {
+            const col_entry & entry = col_entries [ id ( eh ) - 1 ];
+            const std :: string & tbl_name = tbl_entries [ entry . table_id - 1 ] . tbl_name;
+
+            std :: cout
+                << event_num << ": cell-default\n"
+                << "  stream_id = " << id ( eh ) << " ( " << tbl_name << " . " << entry . spec << " )\n"
+                << "  elem_bits = " << entry . elem_bits << '\n'
+                << "  elem_count = 0 ( empty )\n"
+                ;
+        }
+    }
+
+
+    /* check_cell_event
+     *  all:
+     *    0 < id <= count ( columns )
+     */
+    template < class T > static
+    void check_cell_event ( const T & eh )
+    {
+        if ( id ( eh . dad ) == 0 )
+            throw "bad cell event id (null)";
+        if ( id ( eh . dad ) > col_entries . size () )
+            throw "bad cell event id";
+    }
+
+    /* check_int_packing
+     *  deeply check contents for adherance to protocol
+     */
+    template < class T >
+    int decode_int ( const uint8_t * start, const uint8_t * end, T * decoded );
+
+    template <>
+    int decode_int < uint16_t > ( const uint8_t * start, const uint8_t * end, uint16_t * decoded )
+    {
+        return decode_uint16 ( start, end, decoded );
+    }
+
+    template <>
+    int decode_int < uint32_t > ( const uint8_t * start, const uint8_t * end, uint32_t * decoded )
+    {
+        return decode_uint32 ( start, end, decoded );
+    }
+
+    template <>
+    int decode_int < uint64_t > ( const uint8_t * start, const uint8_t * end, uint64_t * decoded )
+    {
+        return decode_uint64 ( start, end, decoded );
+    }
+
+    template < class T > static
+    size_t check_int_packing ( const uint8_t * data_buffer, size_t data_size )
+    {
+        const uint8_t * start = data_buffer;
+        const uint8_t * end = data_buffer + data_size;
+
+        size_t unpacked_size;
+        for ( unpacked_size = 0; start < end; unpacked_size += sizeof ( T ) )
+        {
+            T decoded;
+            int num_read = decode_int < T > ( start, end, & decoded );
+            if ( num_read <= 0 )
+            {
+                switch ( num_read )
+                {
+                case CODEC_INSUFFICIENT_BUFFER:
+                    throw "truncated data in packed integer buffer";
+                case CODEC_INVALID_FORMAT:
+                    throw "corrupt data in packed integer buffer";
+                case CODEC_UNKNOWN_ERROR:
+                    throw "unknown error in packed integer buffer";
+                default:
+                    throw "INTERNAL ERROR: decode_uintXX returned invalid error code";
+                }
+            }
+            start += num_read;
+        }
+
+        return unpacked_size;
+    }
+
+
+    /* dump_cell_event
+     */
+    template < class D, class T > static
+    void dump_cell_event ( FILE * in, const D & e, const char * type )
+    {
+        T eh;
+        init ( eh, e );
+
+        size_t num_read = readFILE ( & eh . sz, sizeof eh - sizeof ( D ), 1, in );
+        if ( num_read != 1 )
+            throw "failed to read cell event";
+
+        check_cell_event ( eh );
+
+        size_t data_size = size ( eh );
+        uint8_t * data_buffer = new uint8_t [ data_size ];
+        num_read = readFILE ( data_buffer, sizeof data_buffer [ 0 ], data_size, in );
+        if ( num_read != data_size )
+        {
+            delete [] data_buffer;
+            throw "failed to read cell data";
+        }
+
+        bool packed_int = false;
+        size_t unpacked_size = data_size;
+        const col_entry & entry = col_entries [ id ( eh . dad ) - 1 ];
+
+        if ( ( entry . flag_bits & 1 ) != 0 )
+        {
+            size_t data_size = size ( eh );
+
+            switch ( entry . elem_bits )
+            {
+            case 16:
+                unpacked_size = check_int_packing < uint16_t > ( data_buffer, data_size );
+                break;
+            case 32:
+                unpacked_size = check_int_packing < uint32_t > ( data_buffer, data_size );
+                break;
+            case 64:
+                unpacked_size = check_int_packing < uint64_t > ( data_buffer, data_size );
+                break;
+            default:
+                throw "bad element size for packed integer";
+            }
+
+            packed_int = true;
+        }
+
+        if ( display )
+        {
+            const std :: string & tbl_name = tbl_entries [ entry . table_id - 1 ] . tbl_name;
+
+            std :: cout
+                << event_num << ": cell-" << type << '\n'
+                << "  stream_id = " << id ( eh . dad ) << " ( " << tbl_name << " . " << entry . spec << " )\n"
+                << "  elem_bits = " << entry . elem_bits << '\n'
+                ;
+            if ( packed_int )
+            {
+                std :: cout
+                    << "  elem_count = " << ( unpacked_size * 8 ) / entry . elem_bits
+                    << " ( " << unpacked_size << " bytes, " << data_size << " packed )\n"
+                    ;
+            }
+            else
+            {
+                std :: cout
+                    << "  elem_count = " << ( data_size * 8 ) / entry . elem_bits << " ( " << data_size << " bytes )\n"
+                    ;
+            }
+        }
+
+        delete [] data_buffer;
+    }
+
+    template <>
+    void dump_cell_event < gw_evt_hdr_v1, gw_data_evt_v1 > ( FILE * in, const gw_evt_hdr_v1 & e, const char * type )
+    {
+        gw_data_evt_v1 eh;
+        init ( eh, e );
+
+        size_t num_read = readFILE ( & eh . elem_count, sizeof eh - sizeof ( gw_evt_hdr_v1 ), 1, in );
+        if ( num_read != 1 )
+            throw "failed to read cell event";
+
+        check_cell_event ( eh );
+
+        const col_entry & entry = col_entries [ id ( eh . dad ) - 1 ];
+
+        size_t data_size_uint32 = ( ( uint64_t ) entry . elem_bits * elem_count ( eh ) + 31 ) / 32;
+        uint32_t * data_buffer = new uint32_t [ data_size_uint32 ];
+        num_read = readFILE ( data_buffer, sizeof data_buffer [ 0 ], data_size_uint32, in );
+        if ( num_read != data_size_uint32 )
+        {
+            delete [] data_buffer;
+            throw "failed to read cell data";
+        }
+
+        if ( display )
+        {
+            const std :: string & tbl_name = tbl_entries [ entry . table_id - 1 ] . tbl_name;
+
+            std :: cout
+                << event_num << ": cell-" << type << '\n'
+                << "  stream_id = " << id ( eh . dad ) << " ( " << tbl_name << " . " << entry . spec << " )\n"
+                << "  elem_bits = " << entry . elem_bits << '\n'
+                << "  elem_count = " << elem_count ( eh ) << '\n'
+                ;
+        }
+
+        delete [] data_buffer;
+    }
+
+
+    /* check_open_stream
+     */
+    static
+    void check_open_stream ( const gw_evt_hdr_v1 & eh )
+    {
+        if ( id ( eh ) != 0 )
+            throw "non-zero id within open-stream event";
+    }
+
+    static
+    void check_open_stream ( const gwp_evt_hdr_v1 & eh )
+    {
+    }
+
+
+    /* dump_open_stream
+     */
+    template < class T > static
+    void dump_open_stream ( FILE * in, const T & eh )
+    {
+        check_open_stream ( eh );
+
+        if ( display )
+        {
+            std :: cout
+                << event_num << ": open-stream\n"
+                ;
+        }
+    }
+
+
+    /* check_new_column
+     *  all:
+     *    id == count ( columns ) + 1
+     *    0 < table_id <= count ( tbls )
+     *    length ( name-spec ) != 0
+     *  packed:
+     *    flags in { 0, 1 }
+     */
+    static
+    void check_new_column ( const gw_column_evt_v1 & eh )
+    {
+        if ( id ( eh . dad ) == 0 )
+            throw "bad column/stream id";
+        if ( ( size_t ) id ( eh . dad ) <= col_entries . size () )
+            throw "column id already specified";
+        if ( ( size_t ) id ( eh . dad ) - 1 > col_entries . size () )
+            throw "column id out of order";
+        if ( table_id ( eh ) == 0 )
+            throw "bad column table-id (null)";
+        if ( table_id ( eh ) > tbl_entries . size () )
+            throw "bad column table-id";
+        if ( name_size ( eh ) == 0 )
+            throw "empty column name";
+    }
+
+    static
+    void check_new_column ( const gwp_column_evt_v1 & eh )
+    {
+        if ( ( size_t ) id ( eh . dad ) <= col_entries . size () )
+            throw "column id already specified";
+        if ( ( size_t ) id ( eh . dad ) - 1 > col_entries . size () )
+            throw "column id out of order";
+        if ( table_id ( eh ) == 0 )
+            throw "bad column table-id (null)";
+        if ( table_id ( eh ) > tbl_entries . size () )
+            throw "bad column table-id";
+        if ( name_size ( eh ) == 0 )
+            throw "empty column name";
+
+        if ( ( eh . flag_bits & 0xFE ) != 0 )
+            throw "uninitialized flag_bits";
+    }
+
+
+    /* dump_new_column
+     */
+    template < class D, class T > static
+    void dump_new_column ( FILE * in, const D & e )
+    {
+        T eh;
+        init ( eh, e );
+
+        size_t num_read = readFILE ( & eh . table_id, sizeof eh - sizeof ( D ), 1, in );
+        if ( num_read != 1 )
+            throw "failed to read new-column event";
+
+        check_new_column ( eh );
+
+        char * string_buffer = read_colname ( eh, in );
+        std :: string name ( string_buffer, name_size ( eh ) );
+        col_entries . push_back ( col_entry ( table_id ( eh ), name, elem_bits ( eh ), flag_bits ( eh ) ) );
+
+        if ( display )
+        {
+            const std :: string & tbl_name = tbl_entries [ table_id ( eh ) - 1 ] . tbl_name;
+
+            std :: cout
+                << event_num << ": new-column\n"
+                << "  table_id = " << table_id ( eh ) << " ( \"" << tbl_name << "\" )\n"
+                << "  column_name [ " << name_size ( eh ) << " ] = \"" << name << "\"\n"
+                ;
+        }
+
+        whack_colname ( eh, string_buffer );
+    }
+
+    /* check_new_table
+     *  all:
+     *    id == count ( tbls ) + 1
+     *    length ( name ) != 0
+     */
+    template < class T > static
+    void check_new_table ( const T & eh )
+    {
+        if ( id ( eh . dad ) == 0 )
+            throw "bad table id";
+        if ( ( size_t ) id ( eh . dad ) <= tbl_entries . size () )
+            throw "table id already specified";
+        if ( ( size_t ) id ( eh . dad ) - 1 > tbl_entries . size () )
+            throw "table id out of order";
+        if ( size ( eh ) == 0 )
+            throw "empty table name";
+    }
+
+    /* dump_new_table
+     */
+    template < class D, class T > static
+    void dump_new_table ( FILE * in, const D & e )
+    {
+        T eh;
+        init ( eh, e );
+
+        size_t num_read = readFILE ( & eh . sz, sizeof eh - sizeof ( D ), 1, in );
+        if ( num_read != 1 )
+            throw "failed to read new-table event";
+
+        check_new_table ( eh );
+
+        char * string_buffer = read_1string ( eh, in );
+        std :: string name ( string_buffer, size ( eh ) );
+        tbl_entries . push_back ( tbl_entry ( name ) );
+
+        if ( display )
+        {
+            std :: cout
+                << event_num << ": new-table\n"
+                << "  table_name [ " << size ( eh ) << " ] = \"" << name << "\"\n"
+                ;
+        }
+
+        whack_1string ( eh, string_buffer );
+    }
+
+    /* check_use_schema
+     *  non-packed:
+     *    id == 0
+     *  all:
+     *    length ( schema-path ) != 0
+     *    length ( schema-spec ) != 0
+     */
+    template < class T > static
+    void check_use_schema ( const T & eh )
+    {
+        if ( size1 ( eh ) == 0 )
+            throw "empty schema file path";
+        if ( size2 ( eh ) == 0 )
+            throw "empty schema spec";
+    }
+
+    template < >
+    void check_use_schema < gw_2string_evt_v1 > ( const gw_2string_evt_v1 & eh )
+    {
+        if ( id ( eh . dad ) != 0 )
+            throw "non-zero table id";
+        if ( size1 ( eh ) == 0 )
+            throw "empty schema file path";
+        if ( size2 ( eh ) == 0 )
+            throw "empty schema spec";
+    }
+
+    /* dump_use_schema
+     */
+    template < class D, class T > static
+    void dump_use_schema ( FILE * in, const D & e )
+    {
+        T eh;
+        init ( eh, e );
+
+        size_t num_read = readFILE ( & eh . sz1, sizeof eh - sizeof ( D ), 1, in );
+        if ( num_read != 1 )
+            throw "failed to read use-schema event";
+
+        check_use_schema ( eh );
+
+        char * string_buffer = read_2string ( eh, in );
+
+        if ( display )
+        {
+            std :: string schema_file_name ( string_buffer, size1 ( eh ) );
+            std :: string schema_db_spec ( & string_buffer [ size1 ( eh ) ], size2 ( eh ) );
+            std :: cout
+                << event_num << ": use-schema\n"
+                << "  schema_file_name [ " << size1 ( eh ) << " ] = \"" << schema_file_name << "\"\n"
+                << "  schema_db_spec [ " << size2 ( eh ) << " ] = \"" << schema_db_spec << "\"\n"
+                ;
+        }
+
+        whack_2string ( eh, string_buffer );
+    }
+
+    /* check_software_name
+     *  non-packed:
+     *    id == 0
+     *  all:
+     *    length ( schema-path ) != 0
+     *    length ( schema-spec ) != 0
+     */
+
+    void check_vers_component ( const char * vers, const char * end, long num, unsigned long max, char term )
+    {
+        if ( vers == end )
+            throw "bad version";
+        if ( * end != 0 && * end != term )
+            throw "bad version";
+        if ( num < 0 || num > max )
+            throw "bad version";
+    }
+
+    void check_vers ( const char * vers )
+    {
+        char * end;
+        long num = strtol ( vers, & end, 10 );
+        check_vers_component ( vers, end, num, 255, '.' );
+        if ( * end == '.' )
+        {
+            vers = end + 1;
+            num = strtol ( vers, & end, 10 );
+            check_vers_component ( vers, end, num, 255, '.' );
+            if ( * end == '.' )
+            {
+                vers = end + 1;
+                num = strtol ( vers, & end, 10 );
+                check_vers_component ( vers, end, num, 0xFFFF, 0 );
+            }
+        }
+    }
+
+    template < class T > static
+    void check_software_name ( const T & eh )
+    {
+        if ( size1 ( eh ) == 0 )
+            throw "empty software name";
+        if ( size2 ( eh ) == 0 )
+            throw "empty version";
+    }
+
+    template < >
+    void check_software_name < gw_2string_evt_v1 > ( const gw_2string_evt_v1 & eh )
+    {
+        if ( id ( eh . dad ) != 0 )
+            throw "non-zero table id";
+        if ( size1 ( eh ) == 0 )
+            throw "empty software name";
+        if ( size2 ( eh ) == 0 )
+            throw "empty version";
+    }
+
+    /* dump_software_name
+     */
+    template < class D, class T > static
+    void dump_software_name ( FILE * in, const D & e )
+    {
+        T eh;
+        init ( eh, e );
+
+        size_t num_read = readFILE ( & eh . sz1, sizeof eh - sizeof ( D ), 1, in );
+        if ( num_read != 1 )
+            throw "failed to read software_name event";
+
+        check_software_name ( eh );
+
+        char * string_buffer = read_2string ( eh, in );
+        std :: string software_name ( string_buffer, size1 ( eh ) );
+        std :: string version ( & string_buffer [ size1 ( eh ) ], size2 ( eh ) );
+
+        check_vers ( version . c_str () );
+
+        if ( display )
+        {
+            std :: cout
+                << event_num << ": software-name\n"
+                << "  software_name [ " << size1 ( eh ) << " ] = \"" << software_name << "\"\n"
+                << "  version [ " << size2 ( eh ) << " ] = \"" << version << "\"\n"
+                ;
+        }
+
+        whack_2string ( eh, string_buffer );
+    }
+
+    /* check_metadata_node
+     *
+     */
+    template < class T > static
+    void check_metadata_node ( const T & eh )
+    {
+        if ( size1 ( eh ) == 0 )
+            throw "empty metadata node";
+        if ( size2 ( eh ) == 0 )
+            throw "empty value";
+    }
+
+    template <>
+    void check_metadata_node < gw_2string_evt_v1 > ( const gw_2string_evt_v1 & eh )
+    {
+        if ( size1 ( eh ) == 0 )
+            throw "empty metadata node";
+        if ( size2 ( eh ) == 0 )
+            throw "empty value";
+    }
+
+    /* dump_metadata_node
+     */
+    template < class D, class T > static
+    void dump_metadata_node ( FILE * in, const D & e )
+    {        
+        T eh;
+        init ( eh, e );
+
+        size_t num_read = readFILE ( & eh . sz1, sizeof eh - sizeof ( D ), 1, in );
+        if ( num_read != 1 )
+            throw "failed to read metadata_node event";
+
+        check_metadata_node ( eh );
+
+        char *string_buffer = read_2string ( eh, in );
+        std :: string node_path ( string_buffer, size1 ( eh ) );
+        std :: string value ( & string_buffer [ size1 ( eh ) ], size2 ( eh ) );
+
+        if ( display )
+        {
+            std :: cout 
+                << event_num << ": metadata-node\n"
+                << "  metadata_node [ " << size1 ( eh ) << " ] = \"" << node_path << "\"\n"
+                << "  value [ " << size2 ( eh ) << " ] = \"" << value << "\"\n";
+        }
+
+        whack_1string ( eh, string_buffer );
+    }
+
+    /* check_add_mbr
+     *
+     */
+    template < class T > static
+    void check_add_mbr ( const T & eh )
+    {
+        if ( db_id ( eh ) < 0 || db_id ( eh ) > db_entries . size () )
+             throw "invalid database id";
+        if ( size1 ( eh ) == 0 )
+            throw "empty member node";
+        if ( size2 ( eh ) == 0 )
+            throw "empty value";
+        switch ( create_mode ( eh ) & kcmValueMask )
+        {
+            // only allowed mode values
+            // or throw an exception
+        case kcmOpen:
+        case kcmInit:
+        case kcmCreate:
+            break;
+        default:
+            throw "invalid create mode";
+        }
+        if ( ( create_mode ( eh ) & ( kcmBitMask & ~ kcmMD5 & ~ kcmParents ) ) != 0 )
+            throw "invalid create mode";
+    }
+
+    template <>
+    void check_add_mbr < gw_add_mbr_evt_v1 > ( const gw_add_mbr_evt_v1 & eh )
+    {
+        if ( id ( eh . dad ) != 0 )
+            throw "non-zero table id";
+        if ( db_id ( eh ) < 0 || db_id ( eh ) > db_entries . size () )
+             throw "invalid database id";
+        if ( size1 ( eh ) == 0 )
+            throw "empty member name";
+        if ( size2 ( eh ) == 0 )
+            throw "empty db/tbl name";
+        switch ( create_mode ( eh ) & kcmValueMask )
+        {
+            // only allowed mode values
+            // or throw an exception
+        case kcmOpen:
+        case kcmInit:
+        case kcmCreate:
+            break;
+        default:
+            throw "invalid create mode";
+        }
+        if ( ( create_mode ( eh ) & ( kcmBitMask & ~ kcmMD5 & ~ kcmParents ) ) != 0 )
+            throw "invalid create mode";
+    }
+
+    /* dump_add_mbr
+     */
+    template < class D, class T > static
+    void dump_add_mbr ( FILE * in, const D & e )
+    {        
+        T eh;
+        init ( eh, e );
+
+        size_t num_read = readFILE ( & eh . db_id, sizeof eh - sizeof ( D ), 1, in );
+        if ( num_read != 1 )
+            throw "failed to read add_mbr event";
+
+        check_add_mbr ( eh );
+
+        uint32_t dbid = db_id ( eh );
+        char *string_buffer = read_2string ( eh, in );
+        std :: string member_name ( string_buffer, size1 ( eh ) );
+        std :: string db_tbl_name ( & string_buffer [ size1 ( eh ) ], size2 ( eh ) );
+        uint8_t cmode = create_mode ( eh ); 
+
+        switch ( evt ( eh . dad ) )
+        {
+        case evt_add_mbr_db:
+            db_entries . push_back ( db_entry ( member_name, db_tbl_name ) );
+            break;
+        case evt_add_mbr_tbl:
+            tbl_entries . push_back ( tbl_entry ( member_name, db_tbl_name ) );
+            break;
+        default:
+            throw "logic error";
+        }
+
+        if ( display )
+        {
+            std :: cout 
+                << event_num << ": add-member\n"
+                << "  db_id [ " << dbid << " ]\n"
+                << "  add_mbr  [ " << size1 ( eh ) << " ] = \"" << member_name << "\"\n"
+                << "  db/tbl  [ " << size2 ( eh ) << " ] = \"" << db_tbl_name << "\"\n"
+                << "  create_mode  [ "
+                << ( uint32_t ) cmode
+                << " ] ( ";
+            switch ( cmode & kcmValueMask )
+            {
+            case kcmOpen:
+                std :: cout << "kcmOpen";
+                break;
+            case kcmInit:
+                std :: cout << "kcmInit";
+                break;
+            case kcmCreate:
+                std :: cout << "kcmCreate";
+                break;
+            }
+            if ( ( cmode & kcmParents ) != 0 )
+                std :: cout << ", kcmParents";
+            if ( ( cmode & kcmMD5 ) != 0 )
+                std :: cout << ", kcmMD5";
+            std :: cout << " )\n";
+        }
+
+        whack_2string ( eh, string_buffer );
+    }
+
+    /* check_remote_path
+     *  non-packed:
+     *    id == 0
+     *  all:
+     *    length ( remote-path ) != 0
+     */
+    template < class T > static
+    void check_remote_path ( const T & eh )
+    {
+        if ( size ( eh ) == 0 )
+            throw "empty remote path";
+    }
+
+    template <>
+    void check_remote_path < gw_1string_evt_v1 > ( const gw_1string_evt_v1 & eh )
+    {
+        if ( id ( eh . dad ) != 0 )
+            throw "non-zero table id";
+        if ( size ( eh ) == 0 )
+            throw "empty remote path";
+    }
+
+    /* dump_remote_path
+     */
+    template < class D, class T > static
+    void dump_remote_path ( FILE * in, const D & e )
+    {
+        T eh;
+        init ( eh, e );
+
+        size_t num_read = readFILE ( & eh . sz, sizeof eh - sizeof ( D ), 1, in );
+        if ( num_read != 1 )
+            throw "failed to read remote-path event";
+
+        check_remote_path ( eh );
+
+        char * string_buffer = read_1string ( eh, in );
+
+        if ( display )
+        {
+            std :: string path ( string_buffer, size ( eh ) );
+            std :: cout
+                << event_num << ": remote-path\n"
+                << "  remote_db_name [ " << size ( eh ) << " ] = \"" << path << "\"\n"
+                ;
+        }
+
+        whack_1string ( eh, string_buffer );
+    }
+
+    /* check_end_stream
+     *  non-packed:
+     *    id == 0
+     */
+    static
+    void check_end_stream ( const gw_evt_hdr_v1 & eh )
+    {
+        if ( id ( eh ) != 0 )
+            throw "non-zero id within end-stream event";
+    }
+
+    static
+    void check_end_stream ( const gwp_evt_hdr_v1 & eh )
+    {
+    }
+
+    /* dump_end_stream
+     */
+    template < class T > static
+    bool dump_end_stream ( FILE * in, const T & eh )
+    {
+        check_end_stream ( eh );
+        if ( display )
+        {
+            std :: cout
+                << "END\n"
+                ;
+        }
+        return false;
+    }
+
+    /* check_errmsg
+     *  non-packed
+     *    id == 0
+     *  all:
+     *    length ( msg ) != 0
+     */
+    template < class T > static
+    void check_errmsg ( const T & eh )
+    {
+        if ( size ( eh ) == 0 )
+            throw "empty error message";
+    }
+
+    template <>
+    void check_errmsg < gw_1string_evt_v1 > ( const gw_1string_evt_v1 & eh )
+    {
+        if ( id ( eh . dad ) != 0 )
+            throw "bad error-message id ( should be 0 )";
+        if ( size ( eh ) == 0 )
+            throw "empty error message";
+    }
+
+    /* dump_errmsg
+     */
+    template < class D, class T > static
+    void dump_errmsg ( FILE * in, const D & e )
+    {
+        T eh;
+        init ( eh, e );
+
+        size_t num_read = readFILE ( & eh . sz, sizeof eh - sizeof ( D ), 1, in );
+        if ( num_read != 1 )
+            throw "failed to read error-message event";
+
+        check_errmsg ( eh );
+
+        char * string_buffer = read_1string ( eh, in );
+
+        if ( display )
+        {
+            std :: string msg ( string_buffer, size ( eh ) );
+
+            std :: cout
+                << event_num << ": error-message\n"
+                << "  msg [ " << size ( eh ) << " ] = \"" << msg << "\"\n"
+                ;
+        }
+
+        whack_1string ( eh, string_buffer );
+    }
+
+    /* check_logmsg
+     *  non-packed
+     *    id == 0
+     *  all:
+     *    length ( msg ) != 0
+     */
+    template < class T > static
+    void check_logmsg ( const T & eh )
+    {
+        if ( size ( eh ) == 0 )
+            throw "empty log message";
+    }
+
+    template <>
+    void check_logmsg < gw_1string_evt_v1 > ( const gw_1string_evt_v1 & eh )
+    {
+        if ( id ( eh . dad ) != 0 )
+            throw "bad log-message id ( should be 0 )";
+        if ( size ( eh ) == 0 )
+            throw "empty log message";
+    }
+
+    /* dump_logmsg
+     */
+    template < class D, class T > static
+    void dump_logmsg ( FILE * in, const D & e )
+    {
+        T eh;
+        init ( eh, e );
+
+        size_t num_read = readFILE ( & eh . sz, sizeof eh - sizeof ( D ), 1, in );
+        if ( num_read != 1 )
+            throw "failed to read log-message event";
+
+        check_logmsg ( eh );
+
+        char * string_buffer = read_1string ( eh, in );
+
+        if ( display )
+        {
+            std :: string msg ( string_buffer, size ( eh ) );
+
+            std :: cout
+                << event_num << ": log-message\n"
+                << "  msg [ " << size ( eh ) << " ] = \"" << msg << "\"\n"
+                ;
+        }
+
+        whack_1string ( eh, string_buffer );
+    }
+
+    /* check_progmsg
+     *  non-packed
+     *    id == 0
+     *  all:
+     *    length ( msg ) != 0
+     *    pid != 0 
+     *    timestamp > 0
+     *    version > 0 
+     *    percent > 0 && < 100
+     */
+    template < class T > static
+    void check_progmsg ( const T & eh )
+    {
+        if ( size ( eh ) == 0 )
+            throw "empty prog message";
+        if ( pid ( eh ) == 0 )
+            throw "invalid pid";
+        if ( timestamp ( eh ) == 0 )
+            throw "empty timestamp";
+        if ( version ( eh ) == 0 )
+            throw "invalid version number";
+        if ( percent ( eh ) < 0 || percent ( eh ) > 100 )
+            throw "invalid percent";
+    }
+
+    template <>
+    void check_progmsg < gw_status_evt_v1 > ( const gw_status_evt_v1 & eh )
+    {
+        if ( id ( eh . dad ) != 0 )
+            throw "bad prog-message id ( should be 0 )";
+        if ( size ( eh ) == 0 )
+            throw "empty prog message";
+        if ( pid ( eh ) == 0 )
+            throw "invlaid pid";
+        if ( timestamp ( eh ) == 0 )
+            throw "empty timestamp";
+        if ( version ( eh ) == 0 )
+            throw "invalid version number";
+        if ( percent ( eh ) < 0 || percent ( eh ) > 100 )
+            throw "invalid percent";
+    }
+
+    /* dump-progmsg
+     */
+    template < class D, class T > static
+    void dump_progmsg ( FILE *in, const D & e )
+    {
+        T eh;
+        init ( eh, e );
+
+        size_t num_read = readFILE ( & ( & eh . dad ) [ 1 ], sizeof eh - sizeof eh . dad, 1, in );
+        if ( num_read != 1 )
+            throw "failed to read prog-message event";
+
+        check_progmsg ( eh );
+
+        char *string_buffer = read_1string ( eh, in );
+        std :: string app_name ( string_buffer, size ( eh ) );
+        uint32_t _pid = pid ( eh );
+        uint32_t _timestamp = timestamp ( eh );
+        uint32_t _version = version ( eh );
+        uint32_t _percent = percent ( eh );
+
+        if ( display )
+        {
+            time_t ts = ( time_t ) _timestamp;
+            char time_str [ 256 ];
+            asctime_r ( localtime ( & ts ), time_str );
+            size_t len = strlen ( time_str );
+            while ( len > 0 && time_str [ len - 1 ] == '\n' )
+                time_str [ -- len ] = 0;
+
+            std :: cout 
+                << event_num << ": prog-msg\n"
+                << "  app [ " << app_name << " ] \n"
+                << "  message [  proccessed " << _percent << "% ] \n"
+                << "  pid [ " << _pid << " ]\n"
+                << "  timestamp [ " << time_str << " ( " << _timestamp << " ) ] \n"
+                << "  version [ " << ( _version >> 24 ) << '.' << ( ( _version >> 16 ) & 0xFF ) << '.' << ( _version & 0xFFFF ) << " ] \n"
+                << "  percent [ " << _percent << " ]\n ";
+        }
+
+        whack_1string ( eh, string_buffer );
+    }
+
+    /* dump_v1_event
+     *  the events are not packed
+     */
+    static
+    bool dump_v1_event ( FILE * in )
+    {
+        if ( jump_event == event_num )
+            display = true;
+        else if ( end_event == event_num )
+            display = false;
+
+        gw_evt_hdr_v1 e;
+        memset ( & e, 0, sizeof e );
+
+        size_t num_read = readFILE ( & e, sizeof e, 1, in );
+        if ( num_read != 1 )
+        {
+            int ch = fgetc ( in );
+            if ( ch == EOF )
+                throw "EOF before end-stream";
+
+            throw "failed to read event";
+        }
+        switch ( evt ( e ) )
+        {
+        case evt_bad_event:
+            throw "illegal event id - possibly block of zeros";
+        case evt_errmsg:
+            dump_errmsg < gw_evt_hdr_v1, gw_1string_evt_v1 > ( in, e );
+            break;
+        case evt_end_stream:
+            return dump_end_stream ( in, e );
+        case evt_remote_path:
+            dump_remote_path < gw_evt_hdr_v1, gw_1string_evt_v1 > ( in, e );
+            break;
+        case evt_use_schema:
+            dump_use_schema < gw_evt_hdr_v1, gw_2string_evt_v1 > ( in, e );
+            break;
+        case evt_new_table:
+            dump_new_table < gw_evt_hdr_v1, gw_1string_evt_v1 > ( in, e );
+            break;
+        case evt_new_column:
+            dump_new_column < gw_evt_hdr_v1, gw_column_evt_v1 > ( in, e );
+            break;
+        case evt_open_stream:
+            dump_open_stream ( in, e );
+            break;
+        case evt_cell_default:
+            dump_cell_event < gw_evt_hdr_v1, gw_data_evt_v1 > ( in, e, "default" );
+            break;
+        case evt_cell_data:
+            dump_cell_event < gw_evt_hdr_v1, gw_data_evt_v1 > ( in, e, "data" );
+            break;
+        case evt_next_row:
+            dump_next_row ( in, e );
+            break;
+        case evt_move_ahead:
+            dump_move_ahead < gw_evt_hdr_v1, gw_move_ahead_evt_v1 > ( in, e );
+            break;
+        case evt_errmsg2:
+        case evt_remote_path2:
+        case evt_use_schema2:
+        case evt_new_table2:
+        case evt_cell_default2:
+        case evt_cell_data2:
+            throw "packed event id within non-packed stream";
+        case evt_empty_default:
+            dump_empty_default < gw_evt_hdr_v1 > ( in, e );
+            break;
+
+            // add in new message handlers for version 2
+        case evt_software_name:
+            dump_software_name < gw_evt_hdr_v1, gw_2string_evt_v1 > ( in, e );
+            break;
+        case evt_db_metadata_node:
+            dump_metadata_node < gw_evt_hdr_v1, gw_2string_evt_v1 > ( in, e );
+            break;
+        case evt_tbl_metadata_node:
+            dump_metadata_node < gw_evt_hdr_v1, gw_2string_evt_v1 > ( in, e );
+            break;
+        case evt_col_metadata_node:
+            dump_metadata_node < gw_evt_hdr_v1, gw_2string_evt_v1 > ( in, e );
+            break;
+        case evt_db_metadata_node2:
+        case evt_tbl_metadata_node2:
+        case evt_col_metadata_node2:
+            throw "packed event id within non-packed stream";
+        case evt_add_mbr_db:
+            dump_add_mbr < gw_evt_hdr_v1, gw_add_mbr_evt_v1 > ( in, e );
+            break;
+        case evt_add_mbr_tbl:
+            dump_add_mbr < gw_evt_hdr_v1, gw_add_mbr_evt_v1 > ( in, e );
+            break;
+
+        case evt_logmsg:
+            dump_logmsg < gw_evt_hdr_v1, gw_1string_evt_v1 > ( in, e );
+            break;
+        case evt_progmsg:
+            dump_progmsg < gw_evt_hdr_v1, gw_status_evt_v1 > ( in, e );
+            break;
+
+        default:
+            throw "unrecognized event id";
+        }
+        return true;
+    }
+
+    /* dump_v1_packed_event
+     *  the events are all packed
+     */
+    static
+    bool dump_v1_packed_event ( FILE * in )
+    {
+        if ( jump_event == event_num )
+            display = true;
+        else if ( end_event == event_num )
+            display = false;
+
+        gwp_evt_hdr_v1 e;
+        memset ( & e, 0, sizeof e );
+
+        size_t num_read = readFILE ( & e, sizeof e, 1, in );
+        if ( num_read != 1 )
+        {
+            int ch = fgetc ( in );
+            if ( ch == EOF )
+                throw "EOF before end-stream";
+
+            throw "failed to read event";
+        }
+        switch ( evt ( e ) )
+        {
+        case evt_bad_event:
+            throw "illegal event id - possibly block of zeros";
+        case evt_errmsg:
+            dump_errmsg < gwp_evt_hdr_v1, gwp_1string_evt_v1 > ( in, e );
+            break;
+        case evt_end_stream:
+            return dump_end_stream ( in, e );
+        case evt_remote_path:
+            dump_remote_path < gwp_evt_hdr_v1, gwp_1string_evt_v1 > ( in, e );
+            break;
+        case evt_use_schema:
+            dump_use_schema < gwp_evt_hdr_v1, gwp_2string_evt_v1 > ( in, e );
+            break;
+        case evt_new_table:
+            dump_new_table < gwp_evt_hdr_v1, gwp_1string_evt_v1 > ( in, e );
+            break;
+        case evt_new_column:
+            dump_new_column < gwp_evt_hdr_v1, gwp_column_evt_v1 > ( in, e );
+            break;
+        case evt_open_stream:
+            dump_open_stream ( in, e );
+            break;
+        case evt_cell_default:
+            dump_cell_event < gwp_evt_hdr_v1, gwp_data_evt_v1 > ( in, e, "default" );
+            break;
+        case evt_cell_data:
+            dump_cell_event < gwp_evt_hdr_v1, gwp_data_evt_v1 > ( in, e, "data" );
+            break;
+        case evt_next_row:
+            dump_next_row ( in, e );
+            break;
+        case evt_move_ahead:
+            dump_move_ahead < gwp_evt_hdr_v1, gwp_move_ahead_evt_v1 > ( in, e );
+            break;
+        case evt_errmsg2:
+            dump_errmsg < gwp_evt_hdr_v1, gwp_1string_evt_U16_v1 > ( in, e );
+            break;
+        case evt_remote_path2:
+            dump_remote_path < gwp_evt_hdr_v1, gwp_1string_evt_U16_v1 > ( in, e );
+            break;
+        case evt_use_schema2:
+            dump_use_schema < gwp_evt_hdr_v1, gwp_2string_evt_U16_v1 > ( in, e );
+            break;
+        case evt_new_table2:
+            dump_new_table < gwp_evt_hdr_v1, gwp_1string_evt_U16_v1 > ( in, e );
+            break;
+        case evt_cell_default2:
+            dump_cell_event < gwp_evt_hdr_v1, gwp_data_evt_U16_v1 > ( in, e, "default" );
+            break;
+        case evt_cell_data2:
+            dump_cell_event < gwp_evt_hdr_v1, gwp_data_evt_U16_v1 > ( in, e, "data" );
+            break;
+        case evt_empty_default:
+            dump_empty_default < gwp_evt_hdr_v1 > ( in, e );
+            break;
+
+            // add in new message handlers for version 2
+        case evt_software_name:
+            dump_software_name < gwp_evt_hdr_v1, gwp_2string_evt_v1 > ( in, e );
+            break;
+        case evt_db_metadata_node:
+            dump_metadata_node < gwp_evt_hdr_v1, gwp_2string_evt_v1 > ( in, e );
+            break;
+        case evt_tbl_metadata_node:
+            dump_metadata_node < gwp_evt_hdr_v1, gwp_2string_evt_v1 > ( in, e );
+            break;
+        case evt_col_metadata_node:
+            dump_metadata_node < gwp_evt_hdr_v1, gwp_2string_evt_v1 > ( in, e );
+            break;
+        case evt_db_metadata_node2:
+            dump_metadata_node < gwp_evt_hdr_v1, gwp_2string_evt_v1 > ( in, e );
+            break;
+        case evt_tbl_metadata_node2:
+            dump_metadata_node < gwp_evt_hdr_v1, gwp_2string_evt_v1 > ( in, e );
+            break;
+        case evt_col_metadata_node2:
+            dump_metadata_node < gwp_evt_hdr_v1, gwp_2string_evt_v1 > ( in, e );
+            break;
+        case evt_add_mbr_db:
+            dump_add_mbr < gwp_evt_hdr_v1, gwp_add_mbr_evt_v1 > ( in, e );
+            break;
+        case evt_add_mbr_tbl:
+            dump_add_mbr < gwp_evt_hdr_v1, gwp_add_mbr_evt_v1 > ( in, e );
+            break;
+        case evt_logmsg:
+            dump_logmsg < gwp_evt_hdr_v1, gwp_1string_evt_U16_v1 > ( in, e );
+            break;
+        case evt_progmsg:
+            dump_progmsg < gwp_evt_hdr_v1, gwp_status_evt_v1 > ( in, e );
+            break;
+
+        default:
+            throw "unrecognized packed event id";
+        }
+        return true;
+    }
+
+    static
+    void check_v1_header ( const gw_header_v1 & hdr )
+    {
+        if ( hdr . packing > 1 )
+            throw "bad packing spec";
+    }
+
+    static
+    void dump_v1_header ( FILE * in, const gw_header & dad, bool & packed )
+    {
+        gw_header_v1 hdr;
+        init ( hdr, dad );
+
+        size_t num_read = readFILE ( & hdr . packing, sizeof hdr - sizeof ( gw_header ), 1, in );
+        if ( num_read != 1 )
+            throw "failed to read v1 header";
+
+        check_v1_header ( hdr );
+
+        if ( hdr . packing )
+            packed = true;
+
+        if ( display )
+        {
+            std :: cout
+                << "header: version " << hdr . dad . version << '\n'
+                << "  hdr_size = " << hdr . dad . hdr_size << '\n'
+                << "  packing = " << hdr . packing << '\n'
+                ;
+        }
+    }
+
+    static
+    void check_header ( const gw_header & hdr )
+    {
+        if ( memcmp ( hdr . signature, GW_SIGNATURE, sizeof hdr . signature ) != 0 )
+            throw "bad header signature";
+        if ( hdr . endian != GW_GOOD_ENDIAN )
+        {
+            if ( hdr . endian != GW_REVERSE_ENDIAN )
+                throw "bad header byte order";
+            throw "reversed header byte order";
+        }
+        if ( hdr . version < 1 )
+            throw "bad header version";
+        if ( hdr . version > GW_CURRENT_VERSION )
+            throw "unknown header version";
+    }
+
+    static
+    uint32_t dump_header ( FILE * in, bool & packed )
+    {
+        gw_header hdr;
+        size_t num_read = readFILE ( & hdr, sizeof hdr, 1, in );
+        if ( num_read != 1 )
+            throw "failed to read header";
+
+        check_header ( hdr );
+
+        switch ( hdr . version )
+        {
+        case 1:
+        case 2:
+            dump_v1_header ( in, hdr, packed );
+            break;
+        default:
+            throw "UNIMPLEMENTED: missing new version dumper";
+        }
+        return hdr . version;
+    }
+
+    static
+    void dump ( FILE * in )
+    {
+        foffset = 0;
+
+        bool packed = false;
+        uint32_t version = dump_header ( in, packed );
+
+        event_num = 1;
+        switch ( version )
+        {
+        case 1:
+        case 2:
+
+            if ( packed )
+            {
+                while ( dump_v1_packed_event ( in ) )
+                    ++ event_num;
+            }
+            else
+            {
+                while ( dump_v1_event ( in ) )
+                    ++ event_num;
+            }
+            break;
+        }
+
+        int ch = fgetc ( in );
+        if ( ch != EOF )
+            throw "excess data after end-stream";
+    }
+
+    static
+    const char * nextArg ( int & i, int argc, char * argv [] )
+    {
+        if ( ++ i >= argc )
+            throw "expected argument";
+        return argv [ i ];
+    }
+
+    static
+    const char * nextArg ( const char * & argp, int & i, int argc, char * argv [] )
+    {
+        const char * arg = argp;
+        argp = "\0";
+
+        if ( arg [ 1 ] != 0 )
+            return arg + 1;
+
+        return nextArg ( i, argc, argv );
+    }
+
+    static
+    uint64_t atoU64 ( const char * str )
+    {
+        char * end;
+        long i = strtol ( str, & end, 0 );
+        if ( end [ 0 ] != 0 )
+            throw "badly formed number";
+        if ( i < 0 )
+            throw "number out of bounds";
+        return ( uint64_t ) i;
+    }
+
+    static
+    void help ( const char * tool_path )
+    {
+        const char * tool_name = strrchr ( tool_path, '/' );
+        if ( tool_name ++ == NULL )
+            tool_name = tool_path;
+
+        std :: cout
+            << '\n'
+            << "Usage:\n"
+            << "  " << tool_name << " [options] [<stream-file> ...]\n"
+            << '\n'
+            << "Summary:\n"
+            << "  This is a tool to analyze and display the contents of a stream produced by\n"
+            << "  the \"general-writer\" library.\n"
+            << '\n'
+            << "  Input may be taken from stdin ( DEFAULT ) or from one or more stream-files.\n"
+            << '\n'
+            << "Options:\n"
+            << "  -j event-num                     jump to numbered event before displaying.\n"
+            << "                                   ( event numbers are 1-based, so the first event is 1. )\n"
+            << "  -N event-count                   display a limited number of events and then go quiet.\n"
+            << "  -v                               increase verbosity. Use multiple times for increased verbosity.\n"
+            << "                                   ( currently this only enables or disables display. )\n"
+            << "  -h                               display this help message\n"
+            << '\n'
+            << tool_path << '\n'
+            ;
+    }
+
+    static
+    void run ( int argc, char * argv [] )
+    {
+        uint32_t num_files = 0;
+
+        for ( int i = 1; i < argc; ++ i )
+        {
+            const char * arg = argv [ i ];
+            if ( arg [ 0 ] != '-' )
+                argv [ ++ num_files ] = ( char * ) arg;
+            else do switch ( ( ++ arg ) [ 0 ] )
+            {
+            case 'v':
+                ++ verbose;
+                break;
+            case 'j':
+                jump_event = atoU64 ( nextArg ( arg, i, argc, argv ) );
+                break;
+            case 'N':
+                end_event = atoU64 ( nextArg ( arg, i, argc, argv ) );
+                break;
+            case 'h':
+            case '?':
+                help ( argv [ 0 ] );
+                return;
+            default:
+                throw "unrecognized option";
+            }
+            while ( arg [ 1 ] != 0 );
+        }
+
+        if ( verbose && jump_event == 0 )
+            display = true;
+
+        end_event += jump_event;
+
+        if ( num_files == 0 )
+            dump ( stdin );
+        else for ( uint32_t i = 1; i <= num_files; ++ i )
+        {
+            FILE * in = fopen ( argv [ i ], "rb" );
+            if ( in == 0 )
+                std :: cerr << "WARNING: failed to open input file: \"" << argv [ i ] << '\n';
+            else
+            {
+                dump ( in );
+                fclose ( in );
+            }
+        }
+    }
+}
+
+int main ( int argc, char * argv [] )
+{
+    int status = 1;
+    try
+    {
+        gw_dump :: run ( argc, argv );
+        status = 0;
+    }
+    catch ( const char x [] )
+    {
+        std :: cerr
+            << "ERROR: offset "
+            << gw_dump :: foffset
+            << ": event "
+            << gw_dump :: event_num
+            << ": "
+            << x
+            << '\n'
+            ;
+    }
+    catch ( ... )
+    {
+        std :: cerr
+            << "ERROR: offset "
+            << gw_dump :: foffset
+            << ": event "
+            << gw_dump :: event_num
+            << ": unknown error\n"
+            ;
+    }
+
+    return status;
+}
diff --git a/tools/general-loader/main.cpp b/tools/general-loader/main.cpp
new file mode 100644
index 0000000..a9c9484
--- /dev/null
+++ b/tools/general-loader/main.cpp
@@ -0,0 +1,239 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ * 
+ */
+
+#include "general-loader.hpp"
+
+#include <sysalloc.h>
+
+#include <string.h>
+#include <stdlib.h>
+#include <limits.h>
+
+#include <iostream>
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <kapp/log-xml.h>
+
+#include <klib/out.h>
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include <kns/stream.h>
+
+static char const option_include_paths[] = "include";
+#define OPTION_INCLUDE_PATHS option_include_paths
+#define ALIAS_INCLUDE_PATHS  "I"
+static
+char const * include_paths_usage[] = 
+{
+    "Additional directories to search for schema include files. Can specify multiple paths separated by ':'.",
+    NULL
+};
+
+static char const option_schemas[] = "schema";
+#define OPTION_SCHEMAS option_schemas
+#define ALIAS_SCHEMAS  "S"
+static
+char const * schemas_usage[] = 
+{
+    "Schema file to use. Can specify multiple files separated by ':'.",
+    NULL
+};
+
+static char const option_target[] = "target";
+#define OPTION_TARGET option_target
+#define ALIAS_TARGET  "T"
+static
+char const * target_usage[] = 
+{
+    "Database file to create. Overrides any remote path specifications coming from the input stream",
+    NULL
+};
+
+OptDef Options[] = 
+{
+    /* order here is same as in param array below!!! */                 
+                                                                          /* max#,  needs param, required */
+    { OPTION_INCLUDE_PATHS, ALIAS_INCLUDE_PATHS,    NULL, include_paths_usage,  0,  true,        false },
+    { OPTION_SCHEMAS,       ALIAS_SCHEMAS,          NULL, schemas_usage,        0,  true,        false },
+    { OPTION_TARGET,        ALIAS_TARGET,           NULL, target_usage,         1,  true,        false },
+};
+
+const char* OptHelpParam[] =
+{
+    /* order here is same as in OptDef array above!!! */
+    "path(s)",
+    "path(s)",
+    "path",
+    "",
+};
+
+rc_t UsageSummary (char const * progname)
+{
+    return KOutMsg (
+        "Usage:\n"
+        "\t%s [options] \n"
+        "\n"
+        "Summary:\n"
+        "\tPopulate a VDB database from standard input\n"
+        "\n"
+        ,progname);
+}
+
+char const UsageDefaultName[] = "general-loader";
+
+rc_t CC Usage (const Args * args)
+{
+    rc_t rc;
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary (progname);
+    
+    const size_t argsQty = sizeof(Options) / sizeof(Options[0]);
+    for(size_t i = 0; i < argsQty; i++ ) {
+        if( Options[i].required && Options[i].help[0] != NULL ) {
+            HelpOptionLine(Options[i].aliases, Options[i].name, OptHelpParam[i], Options[i].help);
+        }
+    }
+    OUTMSG(("\nOptions:\n"));
+    for(size_t i = 0; i < argsQty; i++ ) {
+        if( !Options[i].required && Options[i].help[0] != NULL ) {
+            HelpOptionLine(Options[i].aliases, Options[i].name, OptHelpParam[i], Options[i].help);
+        }
+    }
+    XMLLogger_Usage();
+    
+    HelpOptionsStandard ();
+    HelpVersion (fullpath, KAppVersion());
+    return rc;
+}
+
+rc_t CC KMain (int argc, char * argv[])
+{
+    Args * args;
+    uint32_t pcount;
+    const XMLLogger* xml_logger = NULL;
+    rc_t rc = ArgsMakeAndHandle (&args, argc, argv, 2
+                                 , Options, sizeof Options / sizeof (OptDef)
+                                 , XMLLogger_Args, XMLLogger_ArgsQty);
+
+    if ( rc == 0 )
+    {
+        rc = XMLLogger_Make(&xml_logger, NULL, args);
+        if (rc == 0)
+        {
+            rc = ArgsParamCount (args, &pcount);
+            if ( rc == 0 )
+            {
+                if ( pcount != 0 )
+                {
+                    rc = RC(rcApp, rcArgv, rcAccessing, rcParam, rcExcessive);
+                    MiniUsage (args);
+                }
+                else
+                { 
+                    const KStream *std_in;
+                    rc = KStreamMakeStdIn ( & std_in );
+                    if ( rc == 0 )
+                    {
+                        KStream* buffered;
+                        rc = KStreamMakeBuffered ( &buffered, std_in, 0 /*input-only*/, 0 /*use default size*/ );
+                        if ( rc == 0 )
+                        {
+                            GeneralLoader loader ( argv[0], *buffered );
+                            
+                            rc = ArgsOptionCount (args, OPTION_INCLUDE_PATHS, &pcount);
+                            if ( rc == 0 )
+                            {
+                                for ( uint32_t i = 0 ; i < pcount; ++i )
+                                {
+                                    const void* value;
+                                    rc = ArgsOptionValue (args, OPTION_INCLUDE_PATHS, i, &value);
+                                    if ( rc != 0 )
+                                    {
+                                        break;
+                                    }
+                                    loader . AddSchemaIncludePath ( static_cast <char const*> (value) );
+                                }
+                            }
+                            
+                            rc = ArgsOptionCount (args, OPTION_SCHEMAS, &pcount);
+                            if ( rc == 0 )
+                            {
+                                for ( uint32_t i = 0 ; i < pcount; ++i )
+                                {
+                                    const void* value;
+                                    rc = ArgsOptionValue (args, OPTION_SCHEMAS, i, &value);
+                                    if ( rc != 0 )
+                                    {
+                                        break;
+                                    }
+                                    loader . AddSchemaFile( static_cast <char const*> (value) );
+                                }
+                            }
+                            
+                            rc = ArgsOptionCount (args, OPTION_TARGET, &pcount);
+                            if ( rc == 0 && pcount == 1 )
+                            {
+                                const void* value;
+                                rc = ArgsOptionValue (args, OPTION_TARGET, 0, &value);
+                                if ( rc == 0 )
+                                {
+                                    loader . SetTargetOverride ( static_cast <char const*> (value) );
+                                }
+                            }
+                            
+                            if ( rc == 0 )
+                            {
+                                rc = loader . Run();
+                            }
+                            KStreamRelease ( buffered );
+                        }
+                        KStreamRelease ( std_in );
+                    }
+                }
+            }
+        }
+    }
+    
+    if ( rc != 0) 
+    {
+        LOGERR ( klogErr, rc, "load failed" );
+    }
+    
+    ArgsWhack(args);
+    XMLLogger_Release(xml_logger);
+    return rc;
+}
diff --git a/tools/general-loader/protocol-parser.cpp b/tools/general-loader/protocol-parser.cpp
new file mode 100644
index 0000000..398e3a9
--- /dev/null
+++ b/tools/general-loader/protocol-parser.cpp
@@ -0,0 +1,1048 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ * 
+ */
+
+#include "general-loader.hpp"
+
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include "general-writer.h"
+#include "utf8-like-int-codec.h"
+
+using namespace std;
+
+///////////// GeneralLoader::ProtocolParser
+
+template <typename TEvent> 
+rc_t 
+GeneralLoader :: ProtocolParser :: ReadEvent ( Reader& p_reader, TEvent& p_event )
+{   // read the part of p_event that is outside of p_event.dad (event header)
+    if ( sizeof p_event > sizeof p_event . dad )
+    {
+        char * start = (char*) & p_event . dad;
+        start += sizeof p_event . dad;
+        return p_reader . Read ( start, sizeof p_event - sizeof p_event . dad );
+    }
+    return 0;
+};
+
+///////////// GeneralLoader::UnpackedProtocolParser
+
+rc_t
+GeneralLoader :: UnpackedProtocolParser :: ParseEvents ( Reader& p_reader, DatabaseLoader& p_dbLoader )
+{
+    rc_t rc;
+    do 
+    { 
+        p_reader . Align (); 
+        
+        struct gw_evt_hdr_v1 evt_header;
+        rc = p_reader . Read ( & evt_header, sizeof ( evt_header ) );    
+        if ( rc != 0 )
+        {
+            break;
+        }
+        
+        switch ( ncbi :: evt ( evt_header ) )
+        {
+        case evt_use_schema:
+            {
+                LogMsg ( klogDebug, "protocol-parser event: Use-Schema" );
+                
+                gw_2string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t schema_file_size = ncbi :: size1 ( evt );
+                    size_t schema_name_size = ncbi :: size2 ( evt );
+                    rc = p_reader . Read ( schema_file_size + schema_name_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . UseSchema ( string ( ( const char * ) p_reader . GetBuffer (), schema_file_size ), 
+                                                      string ( ( const char * ) p_reader . GetBuffer () + schema_file_size, schema_name_size ) );
+                    }
+                }
+            }
+            break;
+
+        case evt_remote_path:
+            {
+                LogMsg ( klogDebug, "protocol-parser event: Remote-Path" );
+                
+                gw_1string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t database_name_size = ncbi :: size ( evt );
+                    rc = p_reader . Read ( database_name_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . RemotePath ( string ( ( const char * ) p_reader . GetBuffer (), database_name_size ) );
+                    }
+                }
+            }
+            break;
+            
+        case evt_software_name:
+            {
+                LogMsg ( klogDebug, "protocol-parser event: Software-Name" );
+                
+                gw_2string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t name_size = ncbi :: size1 ( evt );
+                    size_t version_size = ncbi :: size2 ( evt );
+                    rc = p_reader . Read ( name_size + version_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . SoftwareName ( string ( ( const char * ) p_reader . GetBuffer (), name_size ), 
+                                                         string ( ( const char * ) p_reader . GetBuffer () + name_size, version_size ) );
+                    }
+                }
+            }
+            break;
+
+        case evt_db_metadata_node:
+            {
+                uint32_t objId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: DB-Metadata-Node, id=$(i)", "i=%u", objId );
+                
+                gw_2string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t node_size = ncbi :: size1 ( evt );
+                    size_t value_size = ncbi :: size2 ( evt );
+                    rc = p_reader . Read ( node_size + value_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . DBMetadataNode ( objId,
+                                                         string ( ( const char * ) p_reader . GetBuffer (), node_size ), 
+                                                         string ( ( const char * ) p_reader . GetBuffer () + node_size, value_size ) );
+                    }
+                }
+            }
+            break;
+
+        case evt_tbl_metadata_node:
+            {
+                uint32_t objId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Tbl-Metadata-Node, id=$(i)", "i=%u", objId );
+                
+                gw_2string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t node_size = ncbi :: size1 ( evt );
+                    size_t value_size = ncbi :: size2 ( evt );
+                    rc = p_reader . Read ( node_size + value_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . TblMetadataNode ( objId,
+                                                         string ( ( const char * ) p_reader . GetBuffer (), node_size ), 
+                                                         string ( ( const char * ) p_reader . GetBuffer () + node_size, value_size ) );
+                    }
+                }
+            }
+            break;
+
+        case evt_col_metadata_node:
+            {
+                uint32_t objId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Col-Metadata-Node, id=$(i)", "i=%u", objId );
+                
+                gw_2string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t node_size = ncbi :: size1 ( evt );
+                    size_t value_size = ncbi :: size2 ( evt );
+                    rc = p_reader . Read ( node_size + value_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . ColMetadataNode ( objId,
+                                                         string ( ( const char * ) p_reader . GetBuffer (), node_size ), 
+                                                         string ( ( const char * ) p_reader . GetBuffer () + node_size, value_size ) );
+                    }
+                }
+            }
+            break;
+
+        case evt_new_table:
+            {
+                uint32_t tableId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: New-Table, id=$(i)", "i=%u", tableId );
+                
+                gw_1string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t table_name_size = ncbi :: size ( evt );
+                    rc = p_reader . Read ( table_name_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . NewTable ( tableId, string ( ( const char * ) p_reader . GetBuffer (), table_name_size ) );
+                    }
+                }
+            }  
+            break;
+            
+        case evt_new_column:
+            {
+                uint32_t columnId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: New-Column, id=$(i)", "i=%u", columnId );
+    
+                gw_column_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t col_name_size  = ncbi :: name_size ( evt );
+                    rc = p_reader . Read ( col_name_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . NewColumn ( columnId, 
+                                                ncbi :: table_id ( evt ), 
+                                                ncbi :: elem_bits ( evt ), 
+                                                ncbi :: flag_bits ( evt ),
+                                                string ( ( const char * ) p_reader . GetBuffer (), col_name_size ) );
+                    }
+                }
+            }
+            break;
+
+        case evt_add_mbr_db:
+        { 
+            uint32_t db_id = ncbi :: id ( evt_header );
+            pLogMsg ( klogDebug, "protocol-parser event: Add-Mbr-DB, id=$(i)", "i=%u", db_id );
+            
+            gw_add_mbr_evt_v1 evt;
+            rc = ReadEvent ( p_reader, evt );
+            if ( rc == 0 )
+            {
+                uint32_t parent_id = ncbi :: db_id ( evt );
+                size_t db_mbr_size = ncbi :: size1 ( evt );
+                size_t db_name_size = ncbi :: size2 ( evt );
+                uint8_t create_mode = ncbi :: create_mode ( evt );
+                rc = p_reader . Read ( db_mbr_size + db_name_size );
+                if ( rc == 0 )
+                {
+                    rc = p_dbLoader . AddMbrDB ( db_id, 
+                                                 parent_id,
+                                                 string ( ( const char * ) p_reader . GetBuffer (), db_mbr_size ), 
+                                                 string ( ( const char * ) p_reader . GetBuffer () + db_mbr_size, db_name_size ), 
+                                                 create_mode );
+                }
+            }
+        }
+        break;
+
+        case evt_add_mbr_tbl:
+        {
+            uint32_t db_tbl_id = ncbi :: id ( evt_header );
+            pLogMsg ( klogDebug, "protocol-parser event: Add-Mbr-Table, id=$(i)", "i=%u", db_tbl_id );
+            
+            gw_add_mbr_evt_v1 evt;
+            rc = ReadEvent ( p_reader, evt );
+            if ( rc == 0 )
+            {
+                uint32_t parent_id = ncbi :: db_id ( evt );
+                size_t db_mbr_size = ncbi :: size1 ( evt );
+                size_t db_name_size = ncbi :: size2 ( evt );
+                uint8_t create_mode = ncbi :: create_mode ( evt );
+                rc = p_reader . Read ( db_mbr_size + db_name_size );
+                if ( rc == 0 )
+                {
+                    rc = p_dbLoader . AddMbrTbl ( db_tbl_id, 
+                                                  parent_id,
+                                                  string ( ( const char * ) p_reader . GetBuffer (), db_mbr_size ), 
+                                                  string ( ( const char * ) p_reader . GetBuffer () + db_mbr_size, db_name_size ), 
+                                                  create_mode );
+                }
+            }
+        }
+        break;
+
+        case evt_cell_data:
+            {
+                uint32_t columnId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Cell-Data, id=$(i)", "i=%u", columnId );
+                
+                gw_data_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    const DatabaseLoader :: Column* col = p_dbLoader . GetColumn ( columnId );
+                    if ( col != 0 )
+                    {
+                        size_t elem_count = ncbi :: elem_count ( evt );
+                        rc = p_reader . Read ( ( col -> elemBits * elem_count + 7 ) / 8 );   
+                        if ( rc == 0 )
+                        {
+                            rc = p_dbLoader . CellData ( columnId, p_reader. GetBuffer (), elem_count );
+                        }
+                    }
+                    else
+                    {
+                        rc = RC ( rcExe, rcFile, rcReading, rcColumn, rcNotFound );
+                    }
+                }
+            }
+            break;
+            
+        case evt_cell_default: 
+            {
+                uint32_t columnId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Cell-Default, id=$(i)", "i=%u", columnId );
+                
+                gw_data_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    const DatabaseLoader :: Column* col = p_dbLoader . GetColumn ( columnId );
+                    if ( col != 0 )
+                    {
+                        size_t elem_count = ncbi :: elem_count ( evt );
+                        rc = p_reader . Read ( ( col -> elemBits * elem_count + 7 ) / 8 );   
+                        if ( rc == 0 )
+                        {
+                            rc = p_dbLoader . CellDefault ( columnId, p_reader. GetBuffer (), elem_count );
+                        }
+                    }
+                    else
+                    {
+                        rc = RC ( rcExe, rcFile, rcReading, rcColumn, rcNotFound );
+                    }
+                }
+            }
+            break;
+            
+        case evt_empty_default: 
+            {
+                uint32_t columnId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Cell-EmptyDefault, id=$(i)", "i=%u", columnId );
+                rc = p_dbLoader . CellDefault ( columnId, 0, 0 );
+            }
+            break;
+            
+        case evt_open_stream:
+            LogMsg ( klogDebug, "protocol-parser event: Open-Stream" );
+            rc = p_dbLoader . OpenStream ();
+            break; 
+            
+        case evt_end_stream:
+            LogMsg ( klogDebug, "protocol-parser event: End-Stream" );
+            return p_dbLoader . CloseStream ();
+            
+        case evt_next_row:
+            {
+                uint32_t tableId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Next-Row, id=$(i)", "i=%u", tableId );
+                rc = p_dbLoader . NextRow ( tableId );
+            }
+            break;
+            
+        case evt_move_ahead:
+            {
+                uint32_t tableId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Move-Ahead, id=$(i)", "i=%u", tableId );
+    
+                gw_move_ahead_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    rc = p_dbLoader . MoveAhead ( tableId, ncbi :: get_nrows ( evt ) );
+                }
+            }
+            break;
+            
+        case evt_errmsg:
+            {   
+                LogMsg ( klogDebug, "protocol-parser event: Error-Message" );
+                
+                gw_1string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t message_size = ncbi :: size ( evt );
+                    rc = p_reader . Read ( message_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . ErrorMessage ( string ( ( const char * ) p_reader . GetBuffer (), message_size ) );
+                    }
+                }
+            }
+            break;
+            
+        case evt_logmsg:
+        {   
+            LogMsg ( klogDebug, "protocol-parser event: Log-Message" );
+            
+            gw_1string_evt_v1 evt;
+            rc = ReadEvent ( p_reader, evt );
+            if ( rc == 0 )
+            {
+                size_t message_size = ncbi :: size ( evt );
+                rc = p_reader . Read ( message_size );
+                if ( rc == 0 )
+                {
+                    rc = p_dbLoader . LogMessage ( string ( ( const char * ) p_reader . GetBuffer (), message_size ) );
+                }
+            }
+        }
+        break;
+            
+        case evt_progmsg:
+        {
+            LogMsg ( klogDebug, "protocol-parser event: Progress-Message" );
+
+            gw_status_evt_v1 evt;
+            rc = ReadEvent ( p_reader, evt );
+            if ( rc == 0 )
+            {
+                size_t name_sz = ncbi :: size ( evt );
+                uint32_t pid = ncbi :: pid ( evt );
+                uint32_t version = ncbi :: version ( evt );
+                uint32_t timestamp = ncbi :: timestamp ( evt );
+                uint32_t percent = ncbi :: percent ( evt );
+
+                rc = p_reader . Read ( name_sz );
+                if ( rc == 0 )
+                {
+                    rc = p_dbLoader . ProgressMessage ( string ( ( const char * ) p_reader . GetBuffer (), name_sz ),
+                                                        pid,
+                                                        timestamp, 
+                                                        version, 
+                                                        percent );
+                }
+            }
+        }
+        break;
+        
+        default:
+            pLogMsg ( klogErr, 
+                      "unexpected general-loader event at $(o): $(e)", 
+                      "o=%lu,e=%i", 
+                      ( unsigned long ) p_reader . GetReadCount(), ( int ) ncbi :: evt ( evt_header ) );
+            rc = RC ( rcExe, rcFile, rcReading, rcData, rcUnexpected );
+            break;
+        }
+    }
+    while ( rc == 0 );
+    
+    return rc;
+}
+
+///////////// GeneralLoader::PackedProtocolParser
+
+template < typename T_uintXX > 
+rc_t 
+GeneralLoader :: PackedProtocolParser :: UncompressInt (  Reader& p_reader, uint16_t p_dataSize, int (*p_decode) ( uint8_t const* buf_start, uint8_t const* buf_xend, T_uintXX* ret_decoded )  )
+{
+    m_unpackingBuf . clear();
+    // reserve enough for the best-packed case, when each element is represented with 1 byte
+    m_unpackingBuf . reserve ( sizeof ( T_uintXX ) * p_dataSize );
+    
+    const uint8_t* buf_begin = reinterpret_cast<const uint8_t*> ( p_reader . GetBuffer() );
+    const uint8_t* buf_end   = buf_begin + p_dataSize;
+    while ( buf_begin < buf_end )
+    {
+        T_uintXX ret_decoded;
+        int numRead = p_decode ( buf_begin, buf_end, &ret_decoded );
+        if ( numRead <= 0 )
+        {
+            pLogMsg ( klogErr, "protocol-parser: decode_uintXX() returned $(i)", "i=%i", numRead );
+            return RC ( rcExe, rcFile, rcReading, rcData, rcCorrupt );
+        }
+
+        for ( size_t i = 0; i < sizeof ( T_uintXX ); ++i )
+        {
+            m_unpackingBuf . push_back ( reinterpret_cast<const uint8_t*> ( & ret_decoded ) [ i ] );
+        }
+        
+        buf_begin += numRead;
+    }
+    
+    return 0;
+}
+
+rc_t
+GeneralLoader :: PackedProtocolParser :: ParseData ( Reader& p_reader, DatabaseLoader& p_dbLoader, uint32_t p_columnId, uint32_t p_dataSize )
+{
+    rc_t rc = 0;
+    const DatabaseLoader :: Column* col = p_dbLoader . GetColumn ( p_columnId );
+    if ( col != 0 )
+    {
+        rc = p_reader . Read ( p_dataSize );   
+        if ( rc == 0 )
+        {
+            if ( col -> IsCompressed () )
+            {
+                switch ( col -> elemBits )
+                {
+                case 16: 
+                    rc = UncompressInt ( p_reader, p_dataSize, decode_uint16 );
+                    break;
+                case 32:
+                    rc = UncompressInt ( p_reader, p_dataSize, decode_uint32 );
+                    break;
+                case 64:
+                    rc = UncompressInt ( p_reader, p_dataSize, decode_uint64 );
+                    break;
+                default:
+                    LogMsg ( klogErr, "protocol-parser: bad element size for packed integer" );
+                    rc = RC ( rcExe, rcFile, rcReading, rcData, rcInvalid );
+                    break;
+                }
+                if ( rc == 0 )
+                {
+                    rc = p_dbLoader . CellData ( p_columnId, m_unpackingBuf . data(), m_unpackingBuf . size() * 8 / col -> elemBits );
+                }
+            }
+            else
+            {
+                rc = p_dbLoader . CellData ( p_columnId, p_reader. GetBuffer (), p_dataSize * 8 / col -> elemBits );
+            }
+        }
+    }
+    else
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcColumn, rcNotFound );
+    }
+    return rc;
+}
+
+rc_t 
+GeneralLoader :: PackedProtocolParser :: ParseEvents( Reader& p_reader, DatabaseLoader& p_dbLoader )
+{
+    rc_t rc;
+    do 
+    { 
+        struct gwp_evt_hdr_v1 evt_header;
+        rc = p_reader . Read ( & evt_header, sizeof ( evt_header ) );    
+        if ( rc != 0 )
+        {
+            break;
+        }
+        
+        switch ( ncbi :: evt ( evt_header ) )
+        {
+        case evt_use_schema:
+            {
+                LogMsg ( klogDebug, "protocol-parser event: Use-Schema (packed)" );
+                
+                gwp_2string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t schema_file_size = ncbi :: size1 ( evt );
+                    size_t schema_name_size = ncbi :: size2 ( evt );
+                            
+                    rc = p_reader . Read ( schema_file_size + schema_name_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . UseSchema ( string ( ( const char * ) p_reader . GetBuffer (), schema_file_size ), 
+                                                      string ( ( const char * ) p_reader . GetBuffer () + schema_file_size, schema_name_size ) );
+                    }
+                }
+            }
+            break;
+            
+        case evt_use_schema2:
+            {
+                LogMsg ( klogDebug, "protocol-parser event: Use-Schema2" );
+                
+                gwp_2string_evt_U16_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t schema_file_size = ncbi :: size1 ( evt );
+                    size_t schema_name_size = ncbi :: size2 ( evt );
+                            
+                    rc = p_reader . Read ( schema_file_size + schema_name_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . UseSchema ( string ( ( const char * ) p_reader . GetBuffer (), schema_file_size ), 
+                                                string ( ( const char * ) p_reader . GetBuffer () + schema_file_size, schema_name_size ) );
+                    }
+                }
+            }
+            break;
+            
+        case evt_remote_path:
+            {
+                LogMsg ( klogDebug, "protocol-parser event: Remote-Path (packed)" );
+                
+                gwp_1string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t database_name_size = ncbi :: size ( evt );
+                    rc = p_reader . Read ( database_name_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . RemotePath ( string ( ( const char * ) p_reader . GetBuffer (), database_name_size ) );
+                    }
+                }
+            }
+            break;
+        case evt_remote_path2:
+            {
+                LogMsg ( klogDebug, "protocol-parser event: Remote-Path2" );
+                
+                gwp_1string_evt_U16_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t database_name_size = ncbi :: size ( evt );
+                    rc = p_reader . Read ( database_name_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . RemotePath ( string ( ( const char * ) p_reader . GetBuffer (), database_name_size ) );
+                    }
+                }
+            }
+            break;
+
+        case evt_software_name:
+            {
+                LogMsg ( klogDebug, "protocol-parser event: Software-Name (packed)" );
+                
+                gwp_2string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t name_size = ncbi :: size1 ( evt );
+                    size_t version_size = ncbi :: size2 ( evt );
+                            
+                    rc = p_reader . Read ( name_size + version_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . SoftwareName ( string ( ( const char * ) p_reader . GetBuffer (), name_size ), 
+                                                         string ( ( const char * ) p_reader . GetBuffer () + name_size, version_size ) );
+                    }
+                }
+            }
+            break;
+
+        case evt_db_metadata_node:
+            {
+                uint32_t objId = ncbi :: id ( evt_header );
+                if ( objId == 256 ) // a special case for the root database; same as 0
+                {
+                    objId = 0;
+                }
+                pLogMsg ( klogDebug, "protocol-parser event: Metadata-Node (packed), id=$(i)", "i=%u", objId );
+                
+                gwp_2string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t node_size = ncbi :: size1 ( evt );
+                    size_t value_size = ncbi :: size2 ( evt );
+                    rc = p_reader . Read ( node_size + value_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . DBMetadataNode ( objId,
+                                                         string ( ( const char * ) p_reader . GetBuffer (), node_size ), 
+                                                         string ( ( const char * ) p_reader . GetBuffer () + node_size, value_size ) );
+                    }
+                }
+            }
+            break;
+
+        case evt_tbl_metadata_node:
+            {
+                uint32_t objId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Tbl-Metadata-Node (packed), id=$(i)", "i=%u", objId );
+                
+                gwp_2string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t node_size = ncbi :: size1 ( evt );
+                    size_t value_size = ncbi :: size2 ( evt );
+                    rc = p_reader . Read ( node_size + value_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . TblMetadataNode ( objId,
+                                                         string ( ( const char * ) p_reader . GetBuffer (), node_size ), 
+                                                         string ( ( const char * ) p_reader . GetBuffer () + node_size, value_size ) );
+                    }
+                }
+            }
+            break;
+
+        case evt_col_metadata_node:
+            {
+                uint32_t objId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Col-Metadata-Node (packed), id=$(i)", "i=%u", objId );
+                
+                gwp_2string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t node_size = ncbi :: size1 ( evt );
+                    size_t value_size = ncbi :: size2 ( evt );
+                    rc = p_reader . Read ( node_size + value_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . ColMetadataNode ( objId,
+                                                         string ( ( const char * ) p_reader . GetBuffer (), node_size ), 
+                                                         string ( ( const char * ) p_reader . GetBuffer () + node_size, value_size ) );
+                    }
+                }
+            }
+            break;
+                
+        case evt_new_table:
+            {
+                uint32_t tableId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: New-Table (packed), id=$(i)", "i=%u", tableId );
+                
+                gwp_1string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t table_name_size = ncbi :: size ( evt );
+                    rc = p_reader . Read ( table_name_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . NewTable ( tableId, string ( ( const char * ) p_reader . GetBuffer (), table_name_size ) );
+                    }
+                }
+            }  
+            break;
+        case evt_new_table2:
+            {
+                uint32_t tableId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: New-Table2, id=$(i)", "i=%u", tableId );
+                
+                gwp_1string_evt_U16_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t table_name_size = ncbi :: size ( evt );
+                    rc = p_reader . Read ( table_name_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . NewTable ( tableId, string ( ( const char * ) p_reader . GetBuffer (), table_name_size ) );
+                    }
+                }
+            }  
+            break;
+            
+        case evt_new_column:
+        {
+            uint32_t columnId = ncbi :: id ( evt_header );
+            pLogMsg ( klogDebug, "protocol-parser event: New-Column (packed), id=$(i)", "i=%u", columnId );
+            
+            gwp_column_evt_v1 evt;
+            rc = ReadEvent ( p_reader, evt );
+            if ( rc == 0 )
+            {
+                size_t col_name_size  = ncbi :: name_size ( evt );
+                rc = p_reader . Read ( col_name_size );
+                if ( rc == 0 )
+                {
+                    rc = p_dbLoader . NewColumn ( columnId, 
+                                                  ncbi :: table_id ( evt ), 
+                                                  ncbi :: elem_bits ( evt ), 
+                                                  ncbi :: flag_bits ( evt ),
+                                                  string ( ( const char * ) p_reader . GetBuffer (), col_name_size ) );
+                }
+            }
+        }
+        break;
+
+        case evt_add_mbr_db:
+        { 
+            uint32_t db_id = ncbi :: id ( evt_header );
+            pLogMsg ( klogDebug, "protocol-parser event: Add-Mbr-DB ( packed ), id=$(i)", "i=%u", db_id );
+            
+            gwp_add_mbr_evt_v1 evt;
+            rc = ReadEvent ( p_reader, evt );
+            if ( rc == 0 )
+            {
+                uint32_t parent_id = ncbi :: db_id ( evt );
+                size_t db_mbr_size = ncbi :: size1 ( evt );
+                size_t db_name_size = ncbi :: size2 ( evt );
+                uint8_t create_mode = ncbi :: create_mode ( evt );
+                rc = p_reader . Read ( db_mbr_size + db_name_size );
+                if ( rc == 0 )
+                {
+                    rc = p_dbLoader . AddMbrDB ( db_id, 
+                                                 parent_id,
+                                                 string ( ( const char * ) p_reader . GetBuffer (), db_mbr_size ), 
+                                                 string ( ( const char * ) p_reader . GetBuffer () + db_mbr_size, db_name_size ), 
+                                                 create_mode );
+                }
+            }
+        }
+        break;
+
+        case evt_add_mbr_tbl:
+        {
+            uint32_t db_tbl_id = ncbi :: id ( evt_header );
+            pLogMsg ( klogDebug, "protocol-parser event: Add-Mbr-Table ( packed ), id=$(i)", "i=%u", db_tbl_id );
+            
+            gwp_add_mbr_evt_v1 evt;
+            rc = ReadEvent ( p_reader, evt );
+            if ( rc == 0 )
+            {
+                uint32_t parent_id = ncbi :: db_id ( evt );
+                size_t db_mbr_size = ncbi :: size1 ( evt );
+                size_t db_name_size = ncbi :: size2 ( evt );
+                uint8_t create_mode = ncbi :: create_mode ( evt );
+                rc = p_reader . Read ( db_mbr_size + db_name_size );
+                if ( rc == 0 )
+                {
+                    rc = p_dbLoader . AddMbrTbl ( db_tbl_id,
+                                                  parent_id,
+                                                  string ( ( const char * ) p_reader . GetBuffer (), db_mbr_size ), 
+                                                  string ( ( const char * ) p_reader . GetBuffer () + db_mbr_size, db_name_size ), 
+                                                  create_mode );
+                }
+            }
+        }
+        break;
+
+        case evt_open_stream:
+            LogMsg ( klogDebug, "protocol-parser event: Open-Stream (packed)" );
+            rc = p_dbLoader . OpenStream ();
+            break; 
+            
+        case evt_end_stream:
+            LogMsg ( klogDebug, "protocol-parser event: End-Stream (packed)" );
+            return p_dbLoader . CloseStream ();
+            
+        case evt_cell_data:
+            {
+                uint32_t columnId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Cell-Data (packed), id=$(i)", "i=%u", columnId );
+                
+                gwp_data_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    rc = ParseData ( p_reader, p_dbLoader, columnId, ncbi :: size ( evt ) );
+                }
+            }
+            break;
+            
+        case evt_cell_data2:
+            {
+                uint32_t columnId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Cell-Data2, id=$(i)", "i=%u", columnId );
+                
+                gwp_data_evt_U16_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {   
+                    rc = ParseData ( p_reader, p_dbLoader, columnId, ncbi :: size ( evt ) );
+                }
+            }
+            break;
+            
+        case evt_cell_default:
+            {
+                uint32_t columnId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Cell-Default (packed), id=$(i)", "i=%u", columnId );
+                
+                gwp_data_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    const DatabaseLoader :: Column* col = p_dbLoader . GetColumn ( columnId );
+                    if ( col != 0 )
+                    {
+                        size_t dataSize = ncbi :: size ( evt );
+                        rc = p_reader . Read ( dataSize );   
+                        if ( rc == 0 )
+                        {
+                            rc = p_dbLoader . CellDefault ( columnId, p_reader. GetBuffer (), dataSize * 8 / col -> elemBits );
+                        }
+                    }
+                    else
+                    {
+                        rc = RC ( rcExe, rcFile, rcReading, rcColumn, rcNotFound );
+                    }
+                }
+            }
+            break;
+            
+        case evt_cell_default2:
+            {
+                uint32_t columnId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Cell-Default2, id=$(i)", "i=%u", columnId );
+                
+                gwp_data_evt_U16_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {   // same as above - refactor
+                    const DatabaseLoader :: Column* col = p_dbLoader . GetColumn ( columnId );
+                    if ( col != 0 )
+                    {
+                        size_t dataSize = ncbi :: size ( evt );
+                        rc = p_reader . Read ( dataSize );   
+                        if ( rc == 0 )
+                        {
+                            rc = p_dbLoader . CellDefault ( columnId, p_reader. GetBuffer (), dataSize * 8 / col -> elemBits );
+                        }
+                    }
+                    else
+                    {
+                        rc = RC ( rcExe, rcFile, rcReading, rcColumn, rcNotFound );
+                    }
+                }
+            }
+            break;
+            
+        case evt_empty_default: 
+            {
+                uint32_t columnId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Cell-EmptyDefault (packed), id=$(i)", "i=%u", columnId );
+                rc = p_dbLoader . CellDefault ( columnId, 0, 0 );
+            }
+            break;
+            
+        case evt_next_row:
+            {
+                uint32_t tableId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Next-Row (packed), id=$(i)", "i=%u", tableId );
+                rc = p_dbLoader . NextRow ( tableId );
+            }
+            break;
+            
+        case evt_move_ahead:
+            {
+                uint32_t tableId = ncbi :: id ( evt_header );
+                pLogMsg ( klogDebug, "protocol-parser event: Move-Ahead (packed), id=$(i)", "i=%u", tableId );
+    
+                gwp_move_ahead_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    rc = p_dbLoader . MoveAhead ( tableId, ncbi :: get_nrows ( evt ) );
+                }
+            }
+            break;
+            
+        case evt_errmsg:
+            {   
+                LogMsg ( klogDebug, "protocol-parser event: Error-Message (packed)" );
+                
+                gwp_1string_evt_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t message_size = ncbi :: size ( evt );
+                    rc = p_reader . Read ( message_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . ErrorMessage ( string ( ( const char * ) p_reader . GetBuffer (), message_size ) );
+                    }
+                }
+            }
+            break;
+            
+        case evt_errmsg2:
+            {   
+                LogMsg ( klogDebug, "protocol-parser event: Error-Message2" );
+                
+                gwp_1string_evt_U16_v1 evt;
+                rc = ReadEvent ( p_reader, evt );
+                if ( rc == 0 )
+                {
+                    size_t message_size = ncbi :: size ( evt );
+                    rc = p_reader . Read ( message_size );
+                    if ( rc == 0 )
+                    {
+                        rc = p_dbLoader . ErrorMessage ( string ( ( const char * ) p_reader . GetBuffer (), message_size ) );
+                    }
+                }
+            }
+            break;
+
+        case evt_logmsg:
+        {   
+            LogMsg ( klogDebug, "protocol-parser event ( packed ): Log-Message" );
+            
+            gwp_1string_evt_U16_v1 evt;
+            rc = ReadEvent ( p_reader, evt );
+            if ( rc == 0 )
+            {
+                size_t message_size = ncbi :: size ( evt );
+                rc = p_reader . Read ( message_size );
+                if ( rc == 0 )
+                {
+                    rc = p_dbLoader . LogMessage ( string ( ( const char * ) p_reader . GetBuffer (), message_size ) );
+                }
+            }
+        }
+        break;
+            
+        case evt_progmsg:
+        {
+            LogMsg ( klogDebug, "protocol-parser event ( packed ): Progress-Message" );
+
+            gwp_status_evt_v1 evt;
+            rc = ReadEvent ( p_reader, evt );
+            if ( rc == 0 )
+            {
+                size_t name_sz = ncbi :: size ( evt );
+                uint32_t pid = ncbi :: pid ( evt );
+                uint32_t version = ncbi :: version ( evt );
+                uint32_t timestamp = ncbi :: timestamp ( evt );
+                uint32_t percent = ncbi :: percent ( evt );
+
+                rc = p_reader . Read ( name_sz );
+                if ( rc == 0 )
+                {
+                    rc = p_dbLoader . ProgressMessage ( string ( ( const char * ) p_reader . GetBuffer (), name_sz ),
+                                                        pid, 
+                                                        timestamp, 
+                                                        version, 
+                                                        percent );
+                }
+            }
+        }
+            break;
+
+        default:
+            pLogMsg ( klogErr, 
+                      "unexpected general-loader event at $(o): $(e)", 
+                      "o=%lu,e=%i", 
+                      ( unsigned long ) p_reader . GetReadCount(), ( int ) ncbi :: evt ( evt_header ) );
+            rc = RC ( rcExe, rcFile, rcReading, rcData, rcUnexpected );
+            break;
+        }
+    }
+    while ( rc == 0 );
+    
+    return rc;
+}
+
diff --git a/tools/general-loader/utf8-like-int-codec.c b/tools/general-loader/utf8-like-int-codec.c
new file mode 100644
index 0000000..e4e73b0
--- /dev/null
+++ b/tools/general-loader/utf8-like-int-codec.c
@@ -0,0 +1,687 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "utf8-like-int-codec.h"
+
+#define NOT_ENCODED_SEQUENCE 0xFFu
+
+#define MAX_VALUE_BYTE_1 0x7F
+#define MAX_VALUE_BYTE_2 0x7FF
+#define MAX_VALUE_BYTE_3 0xFFFF
+#define MAX_VALUE_BYTE_4 0x1FFFFF
+#define MAX_VALUE_BYTE_5 0x3FFFFFF
+#define MAX_VALUE_BYTE_6 0x7FFFFFFF
+#define MAX_VALUE_BYTE_7 0xFFFFFFFFF
+
+
+int encode_uint16 ( uint16_t value_to_encode, uint8_t* buf_start, uint8_t* buf_xend )
+{
+    size_t dst_buf_size = buf_xend - buf_start;
+    int ret = CODEC_UNKNOWN_ERROR;
+
+    /* optimization: process 1-byte case in the very beginning */
+    if (value_to_encode <= MAX_VALUE_BYTE_1)
+    {
+        if ( dst_buf_size < 1 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = (uint8_t)value_to_encode;
+        ret = 1;
+    }
+    else if ( value_to_encode <= MAX_VALUE_BYTE_2 )
+    {
+        /* 1-byte case is processed already, so starting from 2-byte one */
+        if ( dst_buf_size < 2 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = 0xC0 | (uint8_t)(value_to_encode >> 6);
+        buf_start[1] = 0x80 | (uint8_t)(value_to_encode & 0x3F);
+
+        ret = 2;
+    }
+    else /* encoding will take at least 3 bytes which is pointless - writing directly */
+    {
+        if (dst_buf_size < 3)
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = NOT_ENCODED_SEQUENCE;
+        buf_start[1] = (uint8_t)( value_to_encode >> 8 );
+        buf_start[2] = (uint8_t)( value_to_encode );
+
+        ret = 3;
+    }
+
+    return ret;
+}
+
+int decode_uint16 ( uint8_t const* buf_start, uint8_t const* buf_xend, uint16_t* ret_decoded )
+{
+    size_t src_buf_size = buf_xend - buf_start;
+    int ret = CODEC_INVALID_FORMAT;
+
+    if (src_buf_size < 1)
+        return CODEC_INSUFFICIENT_BUFFER;
+
+    if ( (int8_t)buf_start[0] >= 0 )
+    {
+        *ret_decoded = buf_start[0];
+        return 1;
+    }
+
+    /*neg_ch = ~ buf_start[0];*/
+    /*
+            neg_ch                |  buf_start[0]
+        invalid: 01nnnnnn >= 0x40 | 10xxxxxx < 0xC0
+        valid:   
+        2-byte:  001nnnnn >= 0x20 | 110xxxxx < 0xE0
+        3-byte:  0001nnnn >= 0x10 | 1110xxxx < 0xF0
+        4-byte:  00001nnn >= 0x08 | 11110xxx < 0xF8
+        5-byte:  000001nn >= 0x04 | 111110xx < 0xFC
+        6-byte:  0000001n >= 0x02 | 1111110x < 0xFE
+        7-byte:  00000001 >= 0x01 | 11111110 < 0xFF
+
+        So, no need to have neg_ch to achieve the filtering
+    */
+
+    /* invalid 1st byte */
+    if ( buf_start[0] < 0xC0 )
+        return CODEC_INVALID_FORMAT;
+    else if ( buf_start[0] < 0xE0 )
+    {
+        if ( src_buf_size < 2 )
+            return CODEC_INSUFFICIENT_BUFFER;
+        else
+        {
+            uint8_t byte0 = buf_start[0] & 0x1F;
+            uint8_t byte1;
+
+            if ( ( buf_start[1] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte1 = buf_start[1] & 0x3F;
+
+            *ret_decoded  = (uint16_t)byte0 << 6 |
+                            (uint16_t)byte1;
+
+            ret = 2;
+        }
+    }
+    else if ( buf_start[0] == NOT_ENCODED_SEQUENCE )
+    {
+        if ( src_buf_size < 3 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        *ret_decoded = (uint16_t)buf_start[1] << 8 |
+                       (uint16_t)buf_start[2];
+
+        ret = 3;
+    }
+
+    return ret;
+}
+
+
+int encode_uint32 ( uint32_t value_to_encode, uint8_t* buf_start, uint8_t* buf_xend )
+{
+    size_t dst_buf_size = buf_xend - buf_start;
+    int ret = CODEC_UNKNOWN_ERROR;
+
+    if (value_to_encode <= MAX_VALUE_BYTE_1)
+    {
+        if ( dst_buf_size < 1 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = (uint8_t)value_to_encode;
+        ret = 1;
+    }
+    else if (value_to_encode <= MAX_VALUE_BYTE_2)
+    {
+        if ( dst_buf_size < 2 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = 0xC0 | (uint8_t)(value_to_encode >> 6);
+        buf_start[1] = 0x80 | (uint8_t)(value_to_encode & 0x3F);
+
+        ret = 2;
+    }
+    else if (value_to_encode <= MAX_VALUE_BYTE_3)
+    {
+        if ( dst_buf_size < 3 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = 0xE0 | (uint8_t)(value_to_encode >> 12);
+        buf_start[1] = 0x80 | (uint8_t)(value_to_encode >> 6 & 0x3F);
+        buf_start[2] = 0x80 | (uint8_t)(value_to_encode & 0x3F);
+
+        ret = 3;
+    }
+    else if (value_to_encode <= MAX_VALUE_BYTE_4)
+    {
+        if ( dst_buf_size < 4 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = 0xF0 | (uint8_t)(value_to_encode >> 18);
+        buf_start[1] = 0x80 | (uint8_t)(value_to_encode >> 12 & 0x3F);
+        buf_start[2] = 0x80 | (uint8_t)(value_to_encode >> 6 & 0x3F);
+        buf_start[3] = 0x80 | (uint8_t)(value_to_encode & 0x3F);
+
+        ret = 4;
+    }
+    else /* encoding will take at least 5 bytes which is pointless - writing directly */
+    {
+        if (dst_buf_size < 5)
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = NOT_ENCODED_SEQUENCE;
+        buf_start[1] = (uint8_t)( value_to_encode >> 24 );
+        buf_start[2] = (uint8_t)( value_to_encode >> 16 );
+        buf_start[3] = (uint8_t)( value_to_encode >> 8 );
+        buf_start[4] = (uint8_t)( value_to_encode );
+
+        ret = 5;
+    }
+
+    return ret;
+}
+
+int decode_uint32 ( uint8_t const* buf_start, uint8_t const* buf_xend, uint32_t* ret_decoded )
+{
+    size_t src_buf_size = buf_xend - buf_start;
+    int ret = CODEC_INVALID_FORMAT;
+
+    if (src_buf_size < 1)
+        return CODEC_INSUFFICIENT_BUFFER;
+
+    /* 1-byte sequence */
+    if ( (int8_t)buf_start[0] >= 0 )
+    {
+        *ret_decoded = buf_start[0];
+        return 1;
+    }
+
+    /*neg_ch = ~ buf_start[0];*/
+    /*
+            neg_ch                |  buf_start[0]
+        invalid: 01nnnnnn >= 0x40 | 10xxxxxx < 0xC0
+        valid:   
+        2-byte:  001nnnnn >= 0x20 | 110xxxxx < 0xE0
+        3-byte:  0001nnnn >= 0x10 | 1110xxxx < 0xF0
+        4-byte:  00001nnn >= 0x08 | 11110xxx < 0xF8
+        5-byte:  000001nn >= 0x04 | 111110xx < 0xFC
+        6-byte:  0000001n >= 0x02 | 1111110x < 0xFE
+        7-byte:  00000001 >= 0x01 | 11111110 < 0xFF
+
+        So, no need to have neg_ch to achieve the filtering
+    */
+
+    /* invalid 1st byte */
+    if ( buf_start[0] < 0xC0 )
+        return CODEC_INVALID_FORMAT;
+    /* 2-byte sequence */
+    else if ( buf_start[0] < 0xE0 )
+    {
+        if ( src_buf_size < 2 )
+            return CODEC_INSUFFICIENT_BUFFER;
+        else
+        {
+            uint8_t byte0 = buf_start[0] & 0x1F;
+            uint8_t byte1;
+
+            if ( ( buf_start[1] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte1 = buf_start[1] & 0x3F;
+
+            *ret_decoded  = (uint32_t)byte0 << 6 |
+                            (uint32_t)byte1;
+
+            ret = 2;
+        }
+    }
+    /* 3-byte sequence */
+    else if ( buf_start[0] < 0xF0 )
+    {
+        if ( src_buf_size < 3 )
+            return CODEC_INSUFFICIENT_BUFFER;
+        else
+        {
+            uint8_t byte0 = buf_start[0] & 0x0F;
+            uint8_t byte1, byte2;
+
+            if ( ( buf_start[1] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte1 = buf_start[1] & 0x3F;
+
+            if ( ( buf_start[2] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte2 = buf_start[2] & 0x3F;
+
+            *ret_decoded  = (uint32_t)byte0 << 12 |
+                            (uint32_t)byte1 << 6 |
+                            (uint32_t)byte2;
+
+            ret = 3;
+        }
+    }
+    /* 4-byte sequence */
+    else if ( buf_start[0] < 0xF8 )
+    {
+        if  ( src_buf_size < 4 )
+            return CODEC_INSUFFICIENT_BUFFER;
+        else
+        {
+            uint8_t byte0 = buf_start[0] & 0x07;
+            uint8_t byte1, byte2, byte3;
+
+            if ( ( buf_start[1] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte1 = buf_start[1] & 0x3F;
+
+            if ( ( buf_start[2] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte2 = buf_start[2] & 0x3F;
+
+            if ( ( buf_start[3] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte3 = buf_start[3] & 0x3F;
+
+            *ret_decoded  = (uint32_t)byte0 << 18 |
+                            (uint32_t)byte1 << 12 |
+                            (uint32_t)byte2 << 6 |
+                            (uint32_t)byte3;
+
+            ret = 4;
+        }
+    }
+    else if ( buf_start[0] == NOT_ENCODED_SEQUENCE )
+    {
+        if ( src_buf_size < 5 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        *ret_decoded = (uint32_t)buf_start[1] << 24 |
+                       (uint32_t)buf_start[2] << 16 |
+                       (uint32_t)buf_start[3] << 8 |
+                       (uint32_t)buf_start[4];
+
+        ret = 5;
+    }
+
+    return ret;
+}
+
+
+int encode_uint64 ( uint64_t value_to_encode, uint8_t* buf_start, uint8_t* buf_xend )
+{
+    size_t dst_buf_size = buf_xend - buf_start;
+    int ret = CODEC_UNKNOWN_ERROR;
+
+    if (value_to_encode <= MAX_VALUE_BYTE_1)
+    {
+        if ( dst_buf_size < 1 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = (uint8_t)value_to_encode;
+        ret = 1;
+    }
+    else if (value_to_encode <= MAX_VALUE_BYTE_2)
+    {
+        if ( dst_buf_size < 2 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = 0xC0 | (uint8_t)(value_to_encode >> 6);
+        buf_start[1] = 0x80 | (uint8_t)(value_to_encode & 0x3F);
+
+        ret = 2;
+    }
+    else if (value_to_encode <= MAX_VALUE_BYTE_3)
+    {
+        if ( dst_buf_size < 3 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = 0xE0 | (uint8_t)(value_to_encode >> 12);
+        buf_start[1] = 0x80 | (uint8_t)(value_to_encode >> 6 & 0x3F);
+        buf_start[2] = 0x80 | (uint8_t)(value_to_encode & 0x3F);
+
+        ret = 3;
+    }
+    else if (value_to_encode <= MAX_VALUE_BYTE_4)
+    {
+        if ( dst_buf_size < 4 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = 0xF0 | (uint8_t)(value_to_encode >> 18);
+        buf_start[1] = 0x80 | (uint8_t)(value_to_encode >> 12 & 0x3F);
+        buf_start[2] = 0x80 | (uint8_t)(value_to_encode >> 6 & 0x3F);
+        buf_start[3] = 0x80 | (uint8_t)(value_to_encode & 0x3F);
+
+        ret = 4;
+    }
+    else if (value_to_encode <= MAX_VALUE_BYTE_5)
+    {
+        if ( dst_buf_size < 5 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = 0xF8 | (uint8_t)(value_to_encode >> 24);
+        buf_start[1] = 0x80 | (uint8_t)(value_to_encode >> 18 & 0x3F);
+        buf_start[2] = 0x80 | (uint8_t)(value_to_encode >> 12 & 0x3F);
+        buf_start[3] = 0x80 | (uint8_t)(value_to_encode >> 6 & 0x3F);
+        buf_start[4] = 0x80 | (uint8_t)(value_to_encode & 0x3F);
+
+        ret = 5;
+    }
+    else if (value_to_encode <= MAX_VALUE_BYTE_6)
+    {
+        if ( dst_buf_size < 6 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = 0xFC | (uint8_t)(value_to_encode >> 30);
+        buf_start[1] = 0x80 | (uint8_t)(value_to_encode >> 24 & 0x3F);
+        buf_start[2] = 0x80 | (uint8_t)(value_to_encode >> 18 & 0x3F);
+        buf_start[3] = 0x80 | (uint8_t)(value_to_encode >> 12 & 0x3F);
+        buf_start[4] = 0x80 | (uint8_t)(value_to_encode >> 6 & 0x3F);
+        buf_start[5] = 0x80 | (uint8_t)(value_to_encode & 0x3F);
+
+        ret = 6;
+    }
+    else if (value_to_encode <= MAX_VALUE_BYTE_7)
+    {
+        if ( dst_buf_size < 7 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = 0xFE;/* | (uint8_t)(value_to_encode >> 36);*/ /* this shift will always give 0 */
+        buf_start[1] = 0x80 | (uint8_t)(value_to_encode >> 30 & 0x3F);
+        buf_start[2] = 0x80 | (uint8_t)(value_to_encode >> 24 & 0x3F);
+        buf_start[3] = 0x80 | (uint8_t)(value_to_encode >> 18 & 0x3F);
+        buf_start[4] = 0x80 | (uint8_t)(value_to_encode >> 12 & 0x3F);
+        buf_start[5] = 0x80 | (uint8_t)(value_to_encode >> 6 & 0x3F);
+        buf_start[6] = 0x80 | (uint8_t)(value_to_encode & 0x3F);
+
+        ret = 7;
+    }
+    else /* there is a limitation - cannot encode in more than 7 bytes, writing directly now */
+    {
+        if (dst_buf_size < 9)
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        buf_start[0] = NOT_ENCODED_SEQUENCE;
+        buf_start[1] = (uint8_t)( value_to_encode >> 56 );
+        buf_start[2] = (uint8_t)( value_to_encode >> 48 );
+        buf_start[3] = (uint8_t)( value_to_encode >> 40 );
+        buf_start[4] = (uint8_t)( value_to_encode >> 32 );
+        buf_start[5] = (uint8_t)( value_to_encode >> 24 );
+        buf_start[6] = (uint8_t)( value_to_encode >> 16 );
+        buf_start[7] = (uint8_t)( value_to_encode >> 8 );
+        buf_start[8] = (uint8_t)( value_to_encode );
+
+        ret = 9;
+    }
+
+    return ret;
+}
+
+int decode_uint64 ( uint8_t const* buf_start, uint8_t const* buf_xend, uint64_t* ret_decoded )
+{
+    size_t src_buf_size = buf_xend - buf_start;
+    int ret = CODEC_INVALID_FORMAT;
+
+    if (src_buf_size < 1)
+        return CODEC_INSUFFICIENT_BUFFER;
+
+    /* 1-byte sequence */
+    if ( (int8_t)buf_start[0] >= 0 )
+    {
+        *ret_decoded = buf_start[0];
+        return 1;
+    }
+
+    /*neg_ch = ~ buf_start[0];*/
+    /*
+            neg_ch                |  buf_start[0]
+        invalid: 01nnnnnn >= 0x40 | 10xxxxxx < 0xC0
+        valid:   
+        2-byte:  001nnnnn >= 0x20 | 110xxxxx < 0xE0
+        3-byte:  0001nnnn >= 0x10 | 1110xxxx < 0xF0
+        4-byte:  00001nnn >= 0x08 | 11110xxx < 0xF8
+        5-byte:  000001nn >= 0x04 | 111110xx < 0xFC
+        6-byte:  0000001n >= 0x02 | 1111110x < 0xFE
+        7-byte:  00000001 >= 0x01 | 11111110 < 0xFF
+
+        So, no need to have neg_ch to achieve the filtering
+    */
+
+    /* invalid 1st byte */
+    if ( buf_start[0] < 0xC0 )
+        return CODEC_INVALID_FORMAT;
+    /* 2-byte sequence */
+    else if ( buf_start[0] < 0xE0 )
+    {
+        if ( src_buf_size < 2 )
+            return CODEC_INSUFFICIENT_BUFFER;
+        else
+        {
+            uint8_t byte0 = buf_start[0] & 0x1F;
+            uint8_t byte1;
+
+            if ( ( buf_start[1] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte1 = buf_start[1] & 0x3F;
+
+            *ret_decoded  = (uint64_t)byte0 << 6 |
+                            (uint64_t)byte1;
+
+            ret = 2;
+        }
+    }
+    /* 3-byte sequence */
+    else if ( buf_start[0] < 0xF0 )
+    {
+        if ( src_buf_size < 3 )
+            return CODEC_INSUFFICIENT_BUFFER;
+        else
+        {
+            uint8_t byte0 = buf_start[0] & 0x0F;
+            uint8_t byte1, byte2;
+
+            if ( ( buf_start[1] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte1 = buf_start[1] & 0x3F;
+
+            if ( ( buf_start[2] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte2 = buf_start[2] & 0x3F;
+
+            *ret_decoded  = (uint64_t)byte0 << 12 |
+                            (uint64_t)byte1 << 6 |
+                            (uint64_t)byte2;
+
+            ret = 3;
+        }
+    }
+    /* 4-byte sequence */
+    else if ( buf_start[0] < 0xF8 )
+    {
+        if  ( src_buf_size < 4 )
+            return CODEC_INSUFFICIENT_BUFFER;
+        else
+        {
+            uint8_t byte0 = buf_start[0] & 0x07;
+            uint8_t byte1, byte2, byte3;
+
+            if ( ( buf_start[1] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte1 = buf_start[1] & 0x3F;
+
+            if ( ( buf_start[2] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte2 = buf_start[2] & 0x3F;
+
+            if ( ( buf_start[3] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte3 = buf_start[3] & 0x3F;
+
+            *ret_decoded  = (uint64_t)byte0 << 18 |
+                            (uint64_t)byte1 << 12 |
+                            (uint64_t)byte2 << 6 |
+                            (uint64_t)byte3;
+
+            ret = 4;
+        }
+    }
+    /* 5-byte sequence */
+    else if ( buf_start[0] < 0xFC )
+    {
+        if  ( src_buf_size < 5 )
+            return CODEC_INSUFFICIENT_BUFFER;
+        else
+        {
+            uint8_t byte0 = buf_start[0] & 0x03;
+            uint8_t byte1, byte2, byte3, byte4;
+
+            if ( ( buf_start[1] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte1 = buf_start[1] & 0x3F;
+
+            if ( ( buf_start[2] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte2 = buf_start[2] & 0x3F;
+
+            if ( ( buf_start[3] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte3 = buf_start[3] & 0x3F;
+
+            if ( ( buf_start[4] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte4 = buf_start[4] & 0x3F;
+
+            *ret_decoded  = (uint64_t)byte0 << 24 |
+                            (uint64_t)byte1 << 18 |
+                            (uint64_t)byte2 << 12 |
+                            (uint64_t)byte3 << 6 |
+                            (uint64_t)byte4;
+
+            ret = 5;
+        }
+    }
+    /* 6-byte sequence */
+    else if ( buf_start[0] < 0xFE )
+    {
+        if  ( src_buf_size < 6 )
+            return CODEC_INSUFFICIENT_BUFFER;
+        else
+        {
+            uint8_t byte0 = buf_start[0] & 0x01;
+            uint8_t byte1, byte2, byte3, byte4, byte5;
+
+            if ( ( buf_start[1] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte1 = buf_start[1] & 0x3F;
+
+            if ( ( buf_start[2] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte2 = buf_start[2] & 0x3F;
+
+            if ( ( buf_start[3] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte3 = buf_start[3] & 0x3F;
+
+            if ( ( buf_start[4] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte4 = buf_start[4] & 0x3F;
+
+            if ( ( buf_start[5] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte5 = buf_start[5] & 0x3F;
+
+            *ret_decoded  = (uint64_t)byte0 << 30 |
+                            (uint64_t)byte1 << 24 |
+                            (uint64_t)byte2 << 18 |
+                            (uint64_t)byte3 << 12 |
+                            (uint64_t)byte4 << 6 |
+                            (uint64_t)byte5;
+
+            ret = 6;
+        }
+    }
+    /* 6-byte sequence */
+    else if ( buf_start[0] == 0xFE )
+    {
+        if  ( src_buf_size < 7 )
+            return CODEC_INSUFFICIENT_BUFFER;
+        else
+        {
+            uint8_t byte1, byte2, byte3, byte4, byte5, byte6;
+
+            if ( ( buf_start[1] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte1 = buf_start[1] & 0x3F;
+
+            if ( ( buf_start[2] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte2 = buf_start[2] & 0x3F;
+
+            if ( ( buf_start[3] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte3 = buf_start[3] & 0x3F;
+
+            if ( ( buf_start[4] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte4 = buf_start[4] & 0x3F;
+
+            if ( ( buf_start[5] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte5 = buf_start[5] & 0x3F;
+
+            if ( ( buf_start[6] & 0xC0 ) != 0x80 )
+                return CODEC_INVALID_FORMAT;
+            byte6 = buf_start[6] & 0x3F;
+
+            *ret_decoded  = (uint64_t)byte1 << 30 |
+                            (uint64_t)byte2 << 24 |
+                            (uint64_t)byte3 << 18 |
+                            (uint64_t)byte4 << 12 |
+                            (uint64_t)byte5 << 6 |
+                            (uint64_t)byte6;
+
+            ret = 7;
+        }
+    }
+    else /* if ( buf_start[0] == NOT_ENCODED_SEQUENCE ) */
+    {
+        if ( src_buf_size < 9 )
+            return CODEC_INSUFFICIENT_BUFFER;
+
+        *ret_decoded = (uint64_t)buf_start[1] << 56 |
+                       (uint64_t)buf_start[2] << 48 |
+                       (uint64_t)buf_start[3] << 40 |
+                       (uint64_t)buf_start[4] << 32 |
+                       (uint64_t)buf_start[5] << 24 |
+                       (uint64_t)buf_start[6] << 16 |
+                       (uint64_t)buf_start[7] << 8 |
+                       (uint64_t)buf_start[8];
+
+        ret = 9;
+    }
+
+    return ret;
+}
diff --git a/tools/general-loader/utf8-like-int-codec.h b/tools/general-loader/utf8-like-int-codec.h
new file mode 100644
index 0000000..0b579ac
--- /dev/null
+++ b/tools/general-loader/utf8-like-int-codec.h
@@ -0,0 +1,69 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_utf8_like_int_codec_
+#define _h_utf8_like_int_codec_
+
+#include <stdint.h>
+#include <stdlib.h> /* size_t on linux */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum
+{
+    CODEC_INSUFFICIENT_BUFFER = 0,
+    CODEC_INVALID_FORMAT = -1,
+    CODEC_UNKNOWN_ERROR = -2
+};
+
+/*
+all encode_uintXX return:
+    value <= 0: error:   one of CODEC_* above
+    value > 0:  success: number of bytes written to buf_start
+
+all decode_uintXX return:
+    value <= 0: error:   one of CODEC_* above
+    value > 0:  success: number of bytes read from buf_start
+*/
+
+int encode_uint16 ( uint16_t value_to_encode, uint8_t* buf_start, uint8_t* buf_xend );
+int decode_uint16 ( uint8_t const* buf_start, uint8_t const* buf_xend, uint16_t* ret_decoded );
+
+int encode_uint32 ( uint32_t value_to_encode, uint8_t* buf_start, uint8_t* buf_xend );
+int decode_uint32 ( uint8_t const* buf_start, uint8_t const* buf_xend, uint32_t* ret_decoded );
+
+int encode_uint64 ( uint64_t value_to_encode, uint8_t* buf_start, uint8_t* buf_xend );
+int decode_uint64 ( uint8_t const* buf_start, uint8_t const* buf_xend, uint64_t* ret_decoded );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _h_utf8_like_int_codec_ */
+
diff --git a/tools/kar/Makefile b/tools/kar/Makefile
new file mode 100644
index 0000000..caf443e
--- /dev/null
+++ b/tools/kar/Makefile
@@ -0,0 +1,99 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/kar
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+	kar \
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#----------------------------------------------------------------
+# kar
+#
+
+KAR_SRC = \
+	kar-args \
+	kar
+
+KAR_OBJ = \
+	$(addsuffix .$(OBJX),$(KAR_SRC))
+
+KAR_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+
+
+$(BINDIR)/kar: $(KAR_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(KAR_LIB)
+
+
+#----------------------------------------------------------------
+# sra-kar
+#
+
+SRA_KAR_SRC = \
+	sra-kar
+
+SRA_KAR_OBJ = \
+	$(addsuffix .$(OBJX),$(SRA_KAR_SRC))
+
+SRA_KAR_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-vdb \
+
+$(BINDIR)/sra-kar: $(SRA_KAR_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(SRA_KAR_LIB)
+
+
diff --git a/tools/kar/kar-args.c b/tools/kar/kar-args.c
new file mode 100644
index 0000000..5fd9646
--- /dev/null
+++ b/tools/kar/kar-args.c
@@ -0,0 +1,428 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "kar-args.h"
+
+#include <klib/rc.h>
+#include <kfs/sra.h>
+#include <klib/log.h>
+#include <klib/out.h>
+
+#include <kapp/main.h>
+
+
+static const char * create_usage[] = { "Create a new archive.", NULL };
+static const char * test_usage[] = { "Check the structural validity of an archive", NULL };
+static const char * extract_usage[] = { "Extract the contents of an archive into a directory.", NULL };
+static const char * force_usage[] =
+{ "(no parameter) this will cause the extract or",
+  "create to over-write existing files unless",
+  "they are write-protected.  Without this",
+  "option the program will fail if the archive",
+  "already exists for a create or the target",
+  "directory exists for an extract", NULL };
+static const char * longlist_usage[] =
+{ "more information will be given on each file",
+  "in test/list mode.", NULL };
+static const char * directory_usage[] = 
+{ "The next token on the command line is the",
+  "name of the directory to extract to or create",
+  "from", NULL };
+static const char * stdout_usage[] = { "Direct output to stdout", NULL }; 
+static const char * md5_usage[] = { "create md5sum-compatible checksum file", NULL }; 
+
+
+OptDef Options [] = 
+{
+    { OPTION_CREATE,    ALIAS_CREATE,    NULL, create_usage, 1, true,  false },
+    { OPTION_TEST,      ALIAS_TEST,      NULL, test_usage, 1, true,  false },
+    { OPTION_EXTRACT,   ALIAS_EXTRACT,   NULL, extract_usage, 1, true,  false },
+    { OPTION_FORCE,     ALIAS_FORCE,     NULL, force_usage, 0, false, false },
+    { OPTION_LONGLIST,  ALIAS_LONGLIST,  NULL, longlist_usage, 0, false, false },
+    { OPTION_DIRECTORY, ALIAS_DIRECTORY, NULL, directory_usage, 1, true,  false },
+    { OPTION_STDOUT,    ALIAS_STDOUT,    NULL, stdout_usage, 1, true,  false },
+    { OPTION_MD5,       NULL,            NULL, md5_usage, 1, false,  false }
+};
+
+const char UsageDefaultName[] = "kar";
+
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg ("Usage:\n"
+                    "  %s [OPTIONS] -%s|--%s <Archive> -%s|--%s <Directory> [Filter ...]\n"
+                    "  %s [OPTIONS] -%s|--%s <Archive> -%s|--%s <Directory>\n"
+                    "  %s [OPTIONS] -%s|--%s|--%s <Archive>\n"
+                    "\n"
+                    "Summary:\n"
+                    "  Create, extract from, or test an archive.\n"
+                    "\n",
+                    progname, ALIAS_CREATE, OPTION_CREATE, ALIAS_DIRECTORY, OPTION_DIRECTORY,
+                    progname, ALIAS_EXTRACT, OPTION_EXTRACT, ALIAS_DIRECTORY, OPTION_DIRECTORY,
+                    progname, ALIAS_TEST, OPTION_TEST, OPTION_LONGLIST);
+}
+
+rc_t CC Usage (const Args * args)
+{
+    static const char archive[] = "archive";
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary (progname);
+
+    OUTMSG (("Archive Command:\n"
+	     "  All of these options require the next token on the command line to be\n"
+	     "  the name of the archive\n\n"));
+
+    KOutMsg ("Options:\n");
+
+    HelpOptionLine (ALIAS_CREATE, OPTION_CREATE, archive, create_usage);
+    HelpOptionLine (ALIAS_EXTRACT, OPTION_EXTRACT, archive, extract_usage);
+    HelpOptionLine (ALIAS_TEST, OPTION_TEST, archive, test_usage);
+    OUTMSG (("\n"
+             "Archive:\n"
+             "  Path to a file that will/does hold the archive of other files.\n"
+             "  This can be a full or relative path.\n"
+             "\n"
+             "Directory:\n"
+	     "  Required for create or extract command, ignored for test command.\n"
+             "  This can be a full or relative path.\n"
+             "\n"
+             "Filters:\n"
+	     "  When present these act as include filters.\n"
+	     "  Any file name will be included in the extracted files, created archive\n"
+	     "  or test operation listing\n"
+	     "  Any directory will be included as well as its contents\n"
+             "\n"
+             "Options:\n"));
+    HelpOptionLine (ALIAS_DIRECTORY, OPTION_DIRECTORY, "Directory", directory_usage);
+    HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, force_usage);
+    HelpOptionLine (ALIAS_LONGLIST, OPTION_LONGLIST, NULL, longlist_usage);
+
+    HelpOptionsStandard ();
+
+    HelpOptionLine (ALIAS_STDOUT, OPTION_STDOUT, NULL, stdout_usage);
+    HelpOptionLine ( NULL, OPTION_MD5, NULL, md5_usage);
+
+    OUTMSG (("\n"
+             "Use examples:"
+             "\n"
+             "  To create an archive named 'example.sra' that contains the same\n"
+             "  contents as a subdirectory 'example' of the current directory\n"
+             "\n"
+             "  $ %s --%s example.sra --%s example\n",
+             progname, OPTION_CREATE, OPTION_DIRECTORY));
+
+    OUTMSG (("\n"
+             "  To replace an existing archive named 'example.sra' with another that contains\n"
+             "  the same contents as a subdirectory 'example' of the current directory\n"
+             "\n"
+             "  $ %s -%s -%s example.sra -%s example\n",
+             progname, ALIAS_FORCE, ALIAS_CREATE, ALIAS_DIRECTORY));
+
+    OUTMSG (("\n"
+             "  To examine in detail the contents of an archive named 'example.sra'\n"
+             "\n"
+             "  $ %s --%s --%s example.sra\n",
+             progname, OPTION_LONGLIST, OPTION_TEST));
+
+    OUTMSG (("\n"
+             "  To extract the files from an archive named 'example.sra' into\n"
+             "  a subdirectory 'example' of the current directory.\n"
+             "  NOTE: all extracted files will be read only.\n"
+             "\n"
+             "  $ %s --%s example.sra --%s example\n",
+             progname, OPTION_EXTRACT, OPTION_DIRECTORY));
+
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+static
+rc_t parse_params_int ( Params *p, const Args *args )
+{
+    rc_t rc;
+
+    uint32_t count;
+    
+    /* Parameters */
+    rc = ArgsParamCount ( args, &count );
+    if ( rc != 0 )
+    {
+        LogErr ( klogFatal, rc, "Failed to retrieve parameter count" );
+        return rc;
+    }
+    else
+    {
+        uint32_t i;
+        const char *value;
+
+        p -> mem_count = count;
+
+        for ( i = 0; i < count; ) /*Increment in value insertion into members*/ 
+        {
+            rc = ArgsParamValue ( args, i, ( const void ** ) &value );
+            if ( rc != 0 )
+            {
+                LogErr ( klogFatal, rc, "Failed to retrieve parameter value" );
+                return rc;
+            }
+
+            p -> members [ ++i ] = value;
+        }
+    }
+
+    /* Bool  Options */
+    rc = ArgsOptionCount ( args, OPTION_LONGLIST, &count );
+    if ( rc == 0 && count != 0 )
+        p -> long_list = true;
+    
+    rc = ArgsOptionCount ( args, OPTION_FORCE, &count );
+    if ( rc == 0 && count != 0 )
+        p -> force = true;
+
+    rc = ArgsOptionCount ( args, OPTION_STDOUT, &count );
+    if ( rc == 0 && count != 0 )
+        p -> stdout = true;
+
+    rc = ArgsOptionCount ( args, OPTION_MD5, &count );
+    if ( rc == 0 && count != 0 )
+        p -> md5sum = true;    
+
+    /* Options */
+    rc = ArgsOptionCount ( args, OPTION_CREATE, & p -> c_count );
+    if ( rc != 0 )
+    {
+        LogErr ( klogFatal, rc, "Failed to verify 'create' option" );
+        return rc;
+    }
+
+    /* grab the p->archive_path as an option parameter if p->c_count > 0 */
+    if ( p -> c_count > 0 )
+    {
+        rc = ArgsOptionValue (args, OPTION_CREATE, 0, (const void **) & p -> archive_path );
+        if ( rc != 0 )
+        {
+            LogErr ( klogFatal, rc, "Failed to access 'create' archive path" );
+            return rc;
+        }
+    }
+    
+    rc = ArgsOptionCount ( args, OPTION_EXTRACT, &p -> x_count );
+    if ( rc != 0 )
+    {
+        LogErr ( klogFatal, rc, "Failed to verify 'extract' option" );
+        return rc;
+    }
+
+    /* grab the p->archive_path as an option parameter if p->x_count > 0 */
+    if ( p -> x_count > 0 )
+    {
+        rc = ArgsOptionValue (args, OPTION_EXTRACT, 0, (const void **) & p -> archive_path );
+        if ( rc != 0 )
+        {
+            LogErr ( klogFatal, rc, "Failed to access 'extract' archive path" );
+            return rc;
+        }
+    }
+    
+    rc = ArgsOptionCount ( args, OPTION_TEST, &p -> t_count );
+    if ( rc != 0 )
+    {
+        LogErr ( klogFatal, rc, "Failed to verify 'test' option" );
+        return rc;
+    }
+
+    /* grab the p->archive_path as an option parameter if p->t_count > 0 */
+    if ( p -> t_count > 0 )
+    {
+        rc = ArgsOptionValue (args, OPTION_TEST, 0, (const void **) & p -> archive_path );
+        if ( rc != 0 )
+        {
+            LogErr ( klogFatal, rc, "Failed to access 'test' archive path" );
+            return rc;
+        }
+    }
+
+    /* need to grab the directory option */
+    rc = ArgsOptionCount ( args, OPTION_DIRECTORY, &p -> dir_count );
+    if ( rc != 0 )
+    {
+        LogErr ( klogFatal, rc, "Failed to verify 'directory' option" );
+        return rc;
+    }
+
+    if ( p -> dir_count > 0 )
+    {
+        rc = ArgsOptionValue ( args, OPTION_DIRECTORY, 0, ( const void ** ) &p -> directory_path );
+        if ( rc != 0 )
+        {            
+            LogErr ( klogFatal, rc, "Failed to access directory path" );
+            return rc;
+        }
+    }
+
+    return rc;
+}
+
+rc_t parse_params ( Params *p, Args *args, int argc, char * argv [] )
+{
+    rc_t rc;
+
+    p -> members = ( const char ** ) argv;
+    p -> archive_path = "";
+    p -> directory_path = "";
+    p -> mem_count = 0;
+    p -> dir_count = 0;
+    p -> c_count = 0;
+    p -> x_count = 0;
+    p -> t_count = 0;
+    p -> long_list = false;
+    p -> force = false;
+    p -> stdout = false;
+
+    rc = ArgsMakeAndHandle ( &args, argc, argv, 1,
+        Options, sizeof Options / sizeof ( Options [ 0 ] ) );
+    if ( rc == 0 )
+    {
+        rc = parse_params_int ( p, args );
+
+        if ( rc == 0 )
+            rc = validate_params ( p );
+
+    }
+
+    return rc;
+}
+
+rc_t validate_params ( Params *p )
+{
+    rc_t rc = 0;
+    uint32_t i;
+
+    /* must have a valid mode */
+    uint32_t cxt_count = p -> c_count + p -> x_count + p -> t_count;
+    if ( cxt_count == 0 )
+    {
+        rc = RC ( rcApp, rcArgv, rcParsing, rcParam, rcInsufficient );
+        LogErr ( klogErr, rc, "Require at least one option of create|extract|test" );
+        return rc;
+    }
+    else if ( cxt_count > 1 )
+    {
+        rc = RC ( rcApp, rcArgv, rcParsing, rcParam, rcExcessive );
+        LogErr ( klogErr, rc, "Too many option parameters" );
+        return rc;
+    }
+
+    /* if member count > 0, must be in create mode */
+    if ( p -> mem_count > 0 )
+    {
+        if ( p -> c_count == 0 )
+        {
+            rc = RC ( rcApp, rcArgv, rcParsing, rcParam, rcInvalid );
+            LogErr ( klogErr, rc, "Must use create option" );
+            return rc;
+        }
+    }
+
+    /* if creating, must have a directory OR member count > 0 */
+    if ( p -> c_count != 0 )
+    {
+        if ( ! ( p -> mem_count != 0 || p -> dir_count != 0 ) )
+        {
+            rc = RC ( rcApp, rcArgv, rcParsing, rcParam, rcInsufficient );           
+            LogErr ( klogErr, rc, "Must provide an input directory or file paths when creating " );
+            return rc;
+        }
+    }
+
+    /* if extracting, must have a directory */
+    if ( p -> x_count != 0 )
+    {
+        if ( p -> dir_count == 0 )
+        {
+            rc = RC ( rcApp, rcArgv, rcParsing, rcParam, rcInvalid );           
+            LogErr ( klogErr, rc, "Must provide a directory path when extracting" );
+            return rc;
+        }
+    }
+
+    /* test the archive path */
+
+
+    /* TBD stdout and md5 */
+
+    /* if we have parameter list, check each parameter for non-NULL and non-empty */
+    for ( i = 1; i <= p -> mem_count; ++ i )
+    {
+        const char * mbr = p -> members [ i ];
+        if ( mbr == NULL )
+        {
+            rc = RC ( rcApp, rcArgv, rcParsing, rcParam, rcNull );
+            LogErr ( klogErr, rc, " " );
+            return rc;
+        }
+
+        if ( mbr [ 0 ] == 0 )
+        {
+            rc = RC ( rcApp, rcArgv, rcParsing, rcParam, rcNull );
+            LogErr ( klogErr, rc, " " );
+            return rc;
+        }
+    }
+
+    /* if we have a directory, check non-NULL and non-empty */
+    if ( p -> dir_count != 0 )
+    {
+        if ( p -> directory_path == NULL )
+        {
+            rc = RC ( rcApp, rcArgv, rcParsing, rcParam, rcNull );
+            LogErr ( klogErr, rc, " " );
+            return rc;
+        }
+
+        if ( p -> directory_path [ 0 ] == 0 )
+        {
+            rc = RC ( rcApp, rcArgv, rcParsing, rcParam, rcNull );
+            LogErr ( klogErr, rc, " " );
+            return rc;
+        }
+    }
+
+    return rc;
+}
+
diff --git a/tools/kar/kar-args.h b/tools/kar/kar-args.h
new file mode 100644
index 0000000..a8ff986
--- /dev/null
+++ b/tools/kar/kar-args.h
@@ -0,0 +1,98 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _h_kar_args_
+#define _h_kar_args_
+
+#ifndef _h_kfs_defs_
+#include <kfs/defs.h>
+#endif
+
+
+
+#define OPTION_CREATE    "create"
+#define OPTION_EXTRACT   "extract"
+#define OPTION_TEST      "test"
+#define OPTION_FORCE     "force"
+#define OPTION_LONGLIST  "long-list"
+#define OPTION_DIRECTORY "directory"
+#define OPTION_STDOUT    "stdout"
+#define OPTION_MD5       "md5"
+/*TBD - add alignment option */
+
+
+#define ALIAS_CREATE     "c"
+#define ALIAS_EXTRACT    "x"
+#define ALIAS_TEST       "t"
+#define ALIAS_FORCE      "f"
+#define ALIAS_LONGLIST   "l"
+#define ALIAS_DIRECTORY  "d"
+#define ALIAS_STDOUT     "Z"
+
+
+struct Args;
+
+typedef struct Params Params;
+struct Params
+{
+    /* standalone files & directories that can be added to archive under create mode */
+    const char ** members;
+    
+    /* path to archive being built or accessed */
+    const char *archive_path;
+
+    /* path to directory either for creating or extracting an archive */
+    const char *directory_path;
+
+    /* the number of members given for creating an archive */
+    uint32_t mem_count;
+
+    /* the number of times the directory option was specified */
+    uint32_t dir_count;
+
+    /* temporary information used for param validation and mode determination */
+    uint32_t c_count;
+    uint32_t x_count;
+    uint32_t t_count;
+
+    /* modifier to test mode for creating a long listing */
+    bool long_list;
+
+    /* modifier to create mode for overwriting an existing archive,
+       or to extract mode to overwrite an existing output directory */
+    bool force;
+
+    /* output to stdout */
+    bool stdout;
+    
+    /*modifier to create mode to create an md5sum compatible auxilary file*/
+    bool md5sum;
+};
+
+
+rc_t parse_params ( Params *p, struct Args *args, int argc, char * argv [] );
+rc_t validate_params ( Params *p );
+
+#endif /*_h_kar_args_*/
diff --git a/tools/kar/kar.c b/tools/kar/kar.c
new file mode 100644
index 0000000..4fe5040
--- /dev/null
+++ b/tools/kar/kar.c
@@ -0,0 +1,2063 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "kar-args.h"
+
+#include <klib/rc.h>
+#include <klib/namelist.h>
+#include <klib/vector.h>
+#include <klib/container.h>
+#include <klib/sort.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <klib/time.h>
+#include <sysalloc.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/toc.h>
+#include <kfs/sra.h>
+#include <kfs/md5.h>
+
+#include <kapp/main.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <assert.h>
+#include <time.h>
+#include <endian.h>
+#include <byteswap.h>
+
+
+/*******************************************************************************
+ * Globals + Forwards + Declarations + Definitions
+ */
+
+static uint64_t num_files;
+static uint64_t max_size = 0; 
+static uint64_t max_offset = 0;
+static uint32_t max_size_fw;
+static uint32_t max_offset_fw;
+
+
+typedef struct KARDir KARDir;
+
+typedef struct KAREntry KAREntry;
+struct KAREntry
+{
+    BSTNode dad;
+
+    KTime_t mod_time;
+
+    const char *name;
+    KARDir *parentDir;
+    
+    uint32_t access_mode;
+
+    uint8_t type;
+};
+
+struct KARDir
+{
+    KAREntry dad;
+    
+    BSTree contents;
+};
+
+typedef struct KARFile KARFile;
+struct KARFile
+{
+    KAREntry dad;
+
+    uint64_t byte_size;
+    uint64_t byte_offset;
+};
+
+typedef KARFile **KARFilePtrArray;
+
+typedef struct KARArchiveFile KARArchiveFile;
+struct KARArchiveFile
+{
+    uint64_t starting_pos;
+    uint64_t pos;
+    KFile * archive;
+};
+
+typedef struct KARAlias KARAlias;
+struct KARAlias
+{
+    KAREntry dad;
+
+    KAREntry * resolved;
+    const char *link;
+};
+
+
+enum
+{
+    ktocentrytype_unknown = -1,
+    ktocentrytype_notfound,
+    ktocentrytype_dir,
+    ktocentrytype_file,
+    ktocentrytype_chunked,
+    ktocentrytype_softlink,
+    ktocentrytype_hardlink,
+    ktocentrytype_emptyfile,
+    ktocentrytype_zombiefile
+};
+
+enum PrintMode
+{
+    pm_normal,
+    pm_longlist
+};
+
+typedef struct KARPrintMode KARPrintMode;
+struct KARPrintMode
+{
+    enum PrintMode pm;
+    uint32_t indent;
+};
+
+
+static rc_t kar_scan_directory ( const KDirectory *dir, BSTree *tree, const char *path );
+static size_t kar_entry_full_path ( const KAREntry * entry, const char * root_dir, char * buffer, size_t bsize );
+
+
+/*******************************************************************************
+ * Reporting functions
+ */
+
+static void kar_print ( BSTNode *node, void *data );
+
+static
+void printEntry ( const KAREntry *entry, KARPrintMode *kpm )
+{
+    char buffer [ 4096 ];
+    size_t bsize = sizeof buffer;
+
+    size_t num_writ = kar_entry_full_path ( entry, NULL, buffer, bsize );
+    if ( num_writ >= bsize )
+    {
+        rc_t rc = RC (rcExe, rcPath, rcWriting, rcBuffer, rcInsufficient);
+        pLogErr ( klogErr, rc, "Failed to write path for entry '$(name)'",
+                  "name=%s", entry -> name );
+        exit ( 3 );
+    }        
+
+    switch ( kpm -> pm )
+    {
+    case pm_normal:
+        KOutMsg ( "%s", buffer );
+        break;
+    case pm_longlist:
+    {
+        KTime tm;
+        KTimeLocal ( &tm, entry -> mod_time );
+
+        KOutMsg ( "%04u-%02u-%02u %02u:%02u:%02u %s", 
+                  
+                  tm . year, tm . month + 1, tm . day + 1, 
+                  tm . hour, tm . minute, tm . second, buffer);
+        break;
+    }
+    default:
+        break;
+    }
+}
+
+static
+uint32_t get_field_width ( uint64_t num )
+{
+    uint64_t count;
+    if ( num == 0 )
+        return 3;
+
+    for ( count = 0; num != 0; ++ count )
+        num /= 10;
+
+    return count;
+}
+
+static
+void printFile ( const KARFile *file, KARPrintMode *kpm )
+{
+    if ( kpm -> pm == pm_longlist )
+    {
+        if ( file -> byte_size == 0 )
+            KOutMsg ( "%*c ", max_size_fw, '-' );
+        else
+            KOutMsg ( "%*lu ", max_size_fw, file -> byte_size );
+            
+        KOutMsg ( "%*lu ", max_offset_fw, file -> byte_offset );
+    }
+
+    printEntry ( ( KAREntry * ) file, kpm );
+    KOutMsg ( "\n" );
+}
+
+static
+void printDir ( const KARDir *dir, KARPrintMode *kpm )
+{
+    if ( kpm -> pm == pm_longlist )
+    {
+        KOutMsg ( "%*c ", max_size_fw, '-' );
+        KOutMsg ( "%*c ", max_offset_fw, '-' );
+    }
+
+    printEntry ( & dir -> dad, kpm );
+    KOutMsg ( "\n" );
+    BSTreeForEach ( &dir -> contents, false, kar_print, kpm );
+}
+
+static
+void printAlias ( const KARAlias *alias, KARPrintMode *kpm, uint8_t type )
+{
+    if ( kpm -> pm == pm_longlist )
+    {
+        KOutMsg ( "% *u ", max_size_fw, string_size ( alias -> link ) );
+        KOutMsg ( "% *c ", max_offset_fw, '-' );
+        printEntry ( ( KAREntry * ) alias, kpm );
+        KOutMsg ( " -> %s", alias -> link );
+    }
+    else
+        printEntry ( ( KAREntry * ) alias, kpm );
+    
+    KOutMsg ( "\n" );
+}
+
+/*
+static
+void printFile_tree ( const KARFile * file, uint32_t *indent )
+{
+    KOutMsg ( "%*s%s [ %lu, %lu ]\n", *indent, "", file -> dad . name, file -> byte_offset, file -> byte_size );
+}
+
+static
+void printDir_tree ( const KARDir *dir, uint32_t *indent )
+{
+    KOutMsg ( "%*s%s\n", *indent, "", dir -> dad . name );
+    *indent += 4;
+    BSTreeForEach ( &dir -> contents, false, kar_print, indent );
+    *indent -= 4;
+}
+*/
+static
+void print_mode ( uint32_t grp )
+{
+    char r = ( grp & 4 ) ? 'r' : '-';
+    char w = ( grp & 2 ) ? 'w' : '-';
+    char x = ( grp & 1 ) ? 'x' : '-';
+
+    KOutMsg ( "%c%c%c", r, w, x );
+}
+
+static
+void kar_print ( BSTNode *node, void *data )
+{
+    const KAREntry *entry = ( KAREntry * ) node;
+
+
+    KARPrintMode *kpm = ( KARPrintMode * ) data;
+
+    switch ( kpm -> pm )
+    {
+    case pm_normal:
+    {
+        switch ( entry -> type )
+        {
+        case kptFile:
+            printFile ( ( KARFile * ) entry, kpm );
+            break;
+        case kptDir:
+            printDir ( ( KARDir * ) entry, kpm );
+            break;
+        case kptAlias:
+        case kptFile | kptAlias:
+        case kptDir | kptAlias:
+            printAlias ( ( KARAlias * ) entry, kpm, entry -> type );
+            break;
+        default:
+            break;
+        }
+        break;
+    }
+    case pm_longlist:
+    {
+        switch ( entry -> type )
+        {
+        case kptFile:
+            KOutMsg ( "-" );
+            print_mode ( ( entry -> access_mode >> 6 ) & 7 );
+            print_mode ( ( entry -> access_mode >> 3 ) & 7 );
+            print_mode ( entry -> access_mode & 7 );
+            KOutMsg ( " " );
+            printFile ( ( KARFile * ) entry, kpm );
+            break;
+        case kptDir:
+            KOutMsg ( "d" );
+            print_mode ( ( entry -> access_mode >> 6 ) & 7 );
+            print_mode ( ( entry -> access_mode >> 3 ) & 7 );
+            print_mode ( entry -> access_mode & 7 );
+            KOutMsg ( " " );
+            printDir ( ( KARDir * ) entry, kpm );
+            break;
+        case kptAlias:
+        case kptFile | kptAlias:
+        case kptDir | kptAlias:
+            KOutMsg ( "l" );
+            print_mode ( ( entry -> access_mode >> 6 ) & 7 );
+            print_mode ( ( entry -> access_mode >> 3 ) & 7 );
+            print_mode ( entry -> access_mode & 7 );
+            KOutMsg ( " " );
+            printAlias ( ( KARAlias * ) entry, kpm, entry -> type );
+            break;
+        default:
+            break;
+        }
+        break;
+    }
+    default:
+        break;
+    }
+
+}
+
+
+
+/*******************************************************************************
+ * Create
+ */
+
+
+/********** KAREntry */
+
+static 
+void kar_entry_whack ( BSTNode *node, void *data )
+{
+    KAREntry *entry = ( KAREntry * ) node;
+
+    /* do the cleanup */
+    switch ( entry -> type )
+    {
+    case kptAlias:
+    case kptFile | kptAlias:
+    case kptDir | kptAlias:
+        free ( ( void * ) ( ( KARAlias * ) entry ) -> link );
+        break;
+    }
+
+    free ( entry );
+}
+
+static
+rc_t kar_entry_create ( KAREntry ** rtn, size_t entry_size,
+    const KDirectory * dir, const char * name, uint32_t type )
+{
+    rc_t rc;
+
+    size_t name_len = strlen ( name ) + 1;
+    KAREntry * entry = calloc ( 1, entry_size + name_len );
+    if ( entry == NULL )
+    {
+        rc = RC (rcExe, rcNode, rcAllocating, rcMemory, rcExhausted);
+        pLogErr ( klogErr, rc, "Failed to allocated memory for entry '$(name)'",
+                  "name=%s", name );
+    }
+    else
+    {
+        /* location for string copy */
+        char * dst = & ( ( char * ) entry ) [ entry_size ];
+
+        /* sanity check */
+        assert ( entry_size >= sizeof * entry );
+
+        /* populate the name by copying to the end of structure */
+        memcpy ( dst, name, name_len );
+        entry -> name = dst;
+
+        entry -> type = type;
+
+        rc = KDirectoryAccess ( dir, & entry -> access_mode, "%s", entry -> name );
+        if ( rc != 0 )
+        {
+            pLogErr ( klogErr, rc, "Failed to get access mode for entry '$(name)'",
+                      "name=%s", entry -> name );
+        }
+        else
+        {
+            rc = KDirectoryDate ( dir, &entry -> mod_time, "%s", entry -> name );
+            if ( rc != 0 )
+            {
+                pLogErr ( klogErr, rc, "Failed to get modification for entry '$(name)'",
+                          "name=%s", entry -> name );
+            }
+            else
+            {
+                * rtn = entry;
+                return 0;
+            }
+        }
+
+        free ( entry );
+    }
+
+    * rtn = NULL;
+    return rc;
+}
+
+static 
+rc_t kar_entry_inflate ( KAREntry **rtn, size_t entry_size, const char *name, size_t name_len, 
+                         uint64_t mod_time, uint32_t access_mode, uint8_t type )
+{
+    rc_t rc;
+    KAREntry * entry;
+
+    STATUS ( STAT_QA, "inflating entry for '%s' with name_len: %u + entry_size: %u", 
+             name, ( uint32_t ) name_len, ( uint32_t ) entry_size );
+    entry = calloc ( 1, entry_size + name_len + 1 );
+    if ( entry == NULL )
+    {
+        rc = RC (rcExe, rcNode, rcAllocating, rcMemory, rcExhausted);
+        pLogErr ( klogErr, rc, "Failed to allocated memory for entry '$(name)'",
+                  "name=%s", name );
+    }
+    else
+    {
+        /* location for string copy */
+        char * dst = & ( ( char * ) entry ) [ entry_size ];
+
+        /* sanity check */
+        assert ( entry_size >= sizeof * entry );
+
+        /* populate the name by copying to the end of structure */
+        memcpy ( dst, name, name_len + 1 );
+
+        entry -> name = dst;
+        entry -> mod_time = mod_time;
+        entry -> access_mode = access_mode;
+        entry -> type = type;
+
+        *rtn = entry;
+        STATUS ( STAT_QA, "finished inflating entry for '%s'", entry -> name );
+        return 0;
+    }
+
+    free ( entry );
+
+    * rtn = NULL;
+    return rc;
+}
+
+static
+void kar_entry_link_parent_dir ( BSTNode *node, void *data )
+{
+    KAREntry *entry = ( KAREntry * ) node ;
+
+    entry -> parentDir = ( KARDir * ) data;
+
+    if ( entry -> type == kptDir )
+    {
+        KARDir *dir = ( KARDir * ) entry;
+        BSTreeForEach ( &dir -> contents, false, kar_entry_link_parent_dir, dir ); 
+    }
+}
+
+static
+void kar_entry_insert_file ( BSTNode *node, void *data )
+{
+    KAREntry *entry = ( KAREntry * ) node ;
+
+    switch ( entry -> type )
+    {
+    case kptFile:
+    {
+        KARFile ** file_array = data;
+        file_array [ num_files ++ ] = ( KARFile * ) entry;
+        break;
+    }
+    case kptDir:
+    {
+        KARDir *dir = ( KARDir * ) entry;
+        BSTreeForEach ( &dir -> contents, false, kar_entry_insert_file, data ); 
+        break;
+    }
+    default:
+        break;
+    }
+}
+
+static
+int64_t CC kar_entry_cmp ( const BSTNode *item, const BSTNode *n )
+{
+    /* TODO - ensure that this is consistent with the ordering in kfs/toc */
+    const KAREntry *a = ( const KAREntry * ) item;
+    const KAREntry *b = ( const KAREntry * ) n;
+
+    return strcmp ( a -> name, b -> name );
+}
+
+static
+int64_t CC kar_entry_sort_size ( const void *a, const void *b, void *ignore )
+{
+    /* Only KARFiles should make it here */
+    const KARFile *f1 = * ( const KARFile ** ) a;
+    const KARFile *f2 = * ( const KARFile ** ) b;
+
+    return ( int64_t ) f1 -> byte_size - ( int64_t ) f2 -> byte_size;
+}
+
+/********** BSTree population */
+
+static
+rc_t kar_add_file ( const KDirectory *dir, const char *name, void *data )
+{
+    KARFile *file;
+    rc_t rc = kar_entry_create ( ( KAREntry ** ) & file, sizeof * file, dir, name, kptFile );
+    if ( rc == 0 )
+    {
+        rc = KDirectoryFileSize ( dir, &file -> byte_size, "%s", file -> dad . name );
+        if ( rc != 0 )
+        {
+            pLogErr ( klogErr, rc, "Failed to get file size for file '$(name)'",
+                      "name=%s", file -> dad . name );
+        }
+        else
+        {
+            rc = BSTreeInsert ( ( BSTree * ) data, &file -> dad . dad, kar_entry_cmp );
+            if ( rc == 0 )
+            {
+                ++ num_files;
+                return 0;
+            }
+
+
+            pLogErr ( klogErr, rc, "Failed to insert file '$(name)' into tree",
+                      "name=%s", file -> dad . name );
+
+        }
+
+        free ( file );
+    }
+
+    return rc;
+}
+
+
+static
+rc_t kar_add_dir ( const KDirectory *parent_dir, const char *name, void *data )
+{
+    KARDir * dir;
+    rc_t rc = kar_entry_create ( ( KAREntry ** ) & dir, sizeof * dir, parent_dir, name, kptDir );
+    if ( rc == 0 )
+    {
+        /* BSTree is already initialized, but it doesn't hurt to be thorough */
+        BSTreeInit ( & dir -> contents );
+
+        rc = BSTreeInsert ( ( BSTree* ) data, &dir -> dad . dad, kar_entry_cmp );
+        if ( rc != 0 )
+        {
+            pLogErr ( klogErr, rc, "Failed to insert directory '$(name)' into tree",
+                      "name=%s", dir -> dad . name );
+        }
+        else
+        {
+            /* the name passed to us was that of a child directory.
+               we need to recursively process it - so open up the child directory. */
+            const KDirectory * child_dir;
+            rc = KDirectoryOpenDirRead ( parent_dir, & child_dir, false, "%s", name );
+            if ( rc != 0 )
+            {
+                pLogErr ( klogErr, rc, "Failed to open directory '$(name)' for scanning",
+                          "name=%s", dir -> dad . name );
+            }
+            else
+            {
+                /* recursively scan this directory to populate tree */
+                rc = kar_scan_directory ( child_dir, & dir -> contents, "." );
+
+                KDirectoryRelease ( child_dir );
+
+                if ( rc == 0 )
+                    return 0;
+
+                pLogErr ( klogErr, rc, "Failed to scan directory '$(name)'",
+                          "name=%s", dir -> dad . name );
+            }
+        }
+
+        free ( dir );
+    }
+
+    return rc;
+}
+
+
+static
+rc_t kar_add_alias ( const KDirectory *dir, const char *name, void *data, uint32_t type )
+{
+    KARAlias *alias;
+    rc_t rc = kar_entry_create ( ( KAREntry ** ) & alias, sizeof * alias, dir, name, type );
+    if ( rc == 0 )
+    {
+        char resolved [ 4096 ];
+        rc = KDirectoryResolveAlias ( dir, false, resolved, sizeof resolved, "%s", name );
+        if ( rc == 0 )
+        {
+            size_t rsize = string_size ( resolved );
+            char * copy = malloc ( rsize + 1 );
+            if ( copy == NULL )
+            {
+                rc = RC (rcExe, rcNode, rcAllocating, rcMemory, rcExhausted);
+                pLogErr ( klogErr, rc, "Failed to allocated memory for entry '$(name)'",
+                          "name=%s", name );
+            }
+            else
+            {
+                string_copy ( copy, rsize + 1, resolved, rsize );
+                alias -> link = copy;
+
+                rc = BSTreeInsert ( ( BSTree * ) data, &alias -> dad . dad, kar_entry_cmp );
+                if ( rc == 0 )
+                    return 0;
+                
+                
+                pLogErr ( klogErr, rc, "Failed to insert file '$(name)' into tree",
+                      "name=%s", alias -> dad . name );
+                
+            }
+        }
+    }
+    return rc;
+}
+
+static
+rc_t CC kar_populate_tree ( const KDirectory *dir, uint32_t type, const char *name, void *data )
+{
+    /* We have a KDirectory* to the directory being visited, plus an entry description,
+       giving the type and name of the entry. In addition, we have the data pointer
+       we sent in, which is either a BSTree* or a custom structure holding more data. */
+
+    switch ( type )
+    {
+    case kptFile:
+        return kar_add_file ( dir, name, data );
+
+    case kptDir:
+        return kar_add_dir ( dir, name, data );
+
+    case kptAlias:
+    case kptFile | kptAlias:
+    case kptDir | kptAlias:
+        return kar_add_alias ( dir, name, data, type );
+
+    default:
+        LogMsg ( klogWarn, "Unsupported file type" );
+    }
+
+    return 0;
+}
+
+/********** File searching  */
+
+static
+rc_t kar_scan_directory ( const KDirectory *dir, BSTree *tree, const char *path )
+{
+    /* In this case, the directory itself is NOT added to the tree,
+       but only its contents. Use a shallow (non-recursive) "Visit()"
+       to list contents and process each in turn. */
+
+    rc_t rc = KDirectoryVisit ( dir, false, kar_populate_tree, tree, "%s", path );
+    if ( rc != 0 )
+    {
+        pLogErr ( klogErr, rc, "Failed to scan directory $(directory)",
+                  "directory=%s", path );
+    }
+
+    return rc;
+}
+
+static
+rc_t kar_scan_path ( const KDirectory *dir, BSTree *tree, const char *path )
+{
+    /* At this point, we have a directory and a path.
+       if the path is a simple name, with no directory components before the leaf,
+       then the leaf can be added as above. But for all leading directories in the
+       path, we have to call ourselves recursively to discover the directory if it
+       Exists, or create it if it doesn't, in order to build our way down to the leaf. */
+    return -1;
+}
+
+/********** md5  */
+
+static 
+rc_t kar_md5 ( KDirectory *wd, KFile **archive, const char *path, KCreateMode mode )
+{
+    rc_t rc = 0;
+    KFile *md5_f;
+
+    /* create the *.md5 file to hold md5sum-compatible checksum */
+    rc = KDirectoryCreateFile ( wd, &md5_f, false, 0664, mode, "%s.md5", path );
+    if ( rc )
+        PLOGERR (klogFatal, (klogFatal, rc, "unable to create md5 file [$(A).md5]", PLOG_S(A), path));
+    else
+    {
+        KMD5SumFmt *fmt;
+                    
+        /* create md5 formatter to write to md5_f */
+        rc = KMD5SumFmtMakeUpdate ( &fmt, md5_f );
+        if ( rc )
+            LOGERR (klogErr, rc, "failed to make KMD5SumFmt");
+        else
+        {
+            KMD5File *kmd5_f;
+
+            size_t size = string_size ( path );
+            const char *fname = string_rchr ( path, size, '/' );
+            if ( fname ++ == NULL )
+                fname = path;
+
+            /* KMD5SumFmtMakeUpdate() took over ownership of "md5_f" */
+            md5_f = NULL;
+
+            /* create a file that knows how to calculate md5 as data
+                       are written-through to archive, and then write digest
+                       result to fmt, using "fname" as description. */
+            rc = KMD5FileMakeWrite ( &kmd5_f, * archive, fmt, fname );
+            KMD5SumFmtRelease ( fmt );
+            if ( rc )
+                LOGERR (klogErr, rc, "failed to make KMD5File");
+            else
+            {
+                /* success */
+                *archive = KMD5FileToKFile ( kmd5_f );
+                return 0;
+            }
+        }
+
+        /* error cleanup */
+        KFileRelease ( md5_f );
+    }
+
+    return rc;
+}
+
+/********** write to toc and archive  */
+
+static
+uint64_t align_offset ( uint64_t offset, uint64_t alignment )
+{
+    uint64_t mask = alignment - 1;
+    return ( offset + mask ) & ~ mask;
+}
+
+static
+void kar_write_header_v1 ( KARArchiveFile * af, uint64_t toc_size )
+{
+    rc_t rc;
+    size_t num_writ, hdr_size;
+
+    KSraHeader hdr;
+    memcpy ( hdr.ncbi, "NCBI", sizeof hdr.ncbi );
+    memcpy ( hdr.sra, ".sra", sizeof hdr.sra );
+
+    hdr.byte_order = eSraByteOrderTag;
+
+    hdr.version = 1;
+
+    /* calculate header size based upon version */
+    hdr_size = sizeof hdr - sizeof hdr . u + sizeof hdr . u . v1;
+
+    /* TBD - don't use hard-coded alignment - get it from cmdline */
+    hdr.u.v1.file_offset = align_offset ( hdr_size + toc_size, 4 );
+    af -> starting_pos = hdr . u . v1 . file_offset;
+
+    rc = KFileWriteAll ( af -> archive, af -> pos, &hdr, hdr_size, &num_writ );
+    if ( rc != 0 || num_writ != hdr_size )
+    {
+        if ( rc == 0 )
+            rc = RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+
+        LogErr ( klogInt, rc, "Failed to write header" );
+        exit(5);
+    }
+
+    af -> pos += num_writ;
+}
+
+
+static
+rc_t CC kar_write_archive ( void *param, const void *buffer,
+    size_t bytes, size_t *num_writ )
+{
+    rc_t rc = 0;
+
+    KARArchiveFile * self = param;
+
+    rc = KFileWriteAll ( self -> archive, self -> pos, buffer, bytes, num_writ );
+    self -> pos += * num_writ;
+
+    return rc;
+}
+
+static
+rc_t CC kar_persist ( void *param, const void *node,
+    size_t *num_writ, PTWriteFunc write, void *write_param );
+
+static
+rc_t kar_persist_karentry ( const KAREntry * entry, int type_code,
+    size_t * num_writ, PTWriteFunc write, void *write_param )
+{
+    rc_t rc = 0;
+    size_t total_written, total_expected;
+
+    uint16_t legacy_name_len;
+    uint8_t legacy_type_code = ( uint8_t ) type_code;
+
+    /* actual length of the string in bytes */
+    size_t name_len = strlen ( entry -> name );
+
+    STATUS ( STAT_QA, "%s: '%.*s'"
+             , __func__
+             , ( uint32_t ) name_len, entry -> name
+        );
+
+    if ( name_len > UINT16_MAX )
+        return RC (rcExe, rcNode, rcWriting, rcPath, rcExcessive);
+
+    legacy_name_len = ( uint16_t ) name_len;
+
+    /* determine size */
+    total_expected
+        = sizeof legacy_name_len
+        + name_len
+        + sizeof entry -> mod_time
+        + sizeof entry -> access_mode
+        + sizeof legacy_type_code
+        ;
+
+    /* if just determining toc size - return */
+    if ( write == NULL )
+    {
+        * num_writ = total_expected;
+
+        return 0;
+    }
+
+    /* check */
+    total_written = 0;
+    rc = ( * write ) ( write_param, &legacy_name_len, sizeof legacy_name_len, num_writ );
+    if ( rc == 0 )
+    {
+        total_written = * num_writ;
+        rc = ( * write ) ( write_param, entry -> name, name_len, num_writ );
+        if ( rc == 0 )
+        {
+            total_written += * num_writ;
+            rc = ( * write ) ( write_param, &entry -> mod_time, sizeof entry -> mod_time, num_writ );
+            if ( rc == 0 )
+            {
+                total_written += * num_writ;
+                rc = ( * write ) ( write_param, &entry -> access_mode, sizeof entry -> access_mode, num_writ );
+                if ( rc == 0 )
+                {
+                    total_written += * num_writ;
+                    rc = ( * write ) ( write_param, &legacy_type_code, sizeof legacy_type_code, num_writ );
+                    if ( rc == 0 )
+                        total_written += * num_writ;
+                }
+            }
+        }
+    }
+
+    if ( rc == 0 && total_written != total_expected )
+        rc = RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncorrect );
+
+    * num_writ = total_written;
+
+    return rc;
+}
+
+static
+rc_t kar_persist_karfile ( const KARFile * entry, size_t *num_writ, PTWriteFunc write, void *write_param )
+{
+    size_t total_expected, total_written;
+    rc_t rc = kar_persist_karentry ( & entry -> dad,
+                                     entry -> byte_size == 0 ? ktocentrytype_emptyfile : ktocentrytype_file,
+                                     num_writ, write, write_param );
+    if ( rc == 0 )
+    {
+        total_written = * num_writ;
+
+        /* empty files are given a special type in the toc */
+        if ( entry -> byte_size == 0 )
+            total_expected = total_written;
+        else
+        {
+            /* determine size */
+            total_expected
+                = total_written               /* from KAREntry       */
+                + sizeof entry -> byte_offset  /* specific to KARFile */
+                + sizeof entry -> byte_size
+                ;
+
+            /* if determining size of toc - return */
+            if ( write == NULL )
+            {
+                * num_writ = total_expected;
+                return 0;
+            }
+
+            /* actually write the toc file entry */
+            rc = ( * write ) ( write_param, &entry -> byte_offset, sizeof entry -> byte_offset, num_writ );
+            if ( rc == 0 )
+            {
+                total_written += * num_writ;
+                rc = ( * write ) ( write_param, &entry -> byte_size, sizeof entry -> byte_size, num_writ );
+                if ( rc == 0 )
+                    total_written += *num_writ;
+            }
+        }
+    }
+
+    if ( rc == 0 && total_written != total_expected )
+    {
+        STATUS ( STAT_QA, "total_written ( %zu ) != total_expected ( %zu )", total_written, total_expected );
+        rc = RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncorrect );
+    }
+
+    *num_writ = total_written;
+
+    return rc;
+}
+
+
+static
+rc_t kar_persist_kardir ( const KARDir * entry, size_t *num_writ, PTWriteFunc write, void *write_param )
+{
+    rc_t rc = kar_persist_karentry ( & entry -> dad, ktocentrytype_dir, num_writ, write, write_param );
+    if ( rc == 0 )
+    {
+        size_t entry_writ = * num_writ;
+        rc = BSTreePersist ( &entry -> contents, num_writ, write, write_param, kar_persist, NULL );
+        if ( rc == 0 )
+            * num_writ += entry_writ;
+    }
+
+    return rc;
+}
+
+static
+rc_t kar_persist_karalias ( const KARAlias *entry, size_t *num_writ, PTWriteFunc write, void *write_param )
+{
+    size_t total_expected, total_written;
+    rc_t rc = kar_persist_karentry ( & entry -> dad, ktocentrytype_softlink, num_writ, write, write_param );
+    if ( rc == 0 )
+    {
+        size_t link_size = string_size ( entry -> link );
+        uint16_t legacy_link_len = ( uint16_t ) link_size;
+
+        if ( link_size > UINT16_MAX )
+            return RC (rcExe, rcNode, rcWriting, rcPath, rcExcessive);
+
+        total_written = * num_writ;
+        
+        /* determine size */
+        total_expected
+            = total_written               /* from KAREntry       */
+            + sizeof legacy_link_len
+            + link_size  /* specific to KARAlias */
+            ;
+
+        /* if determining size of toc - return */
+        if ( write == NULL )
+        {
+            * num_writ = total_expected;
+            return 0;
+        }
+
+        /* actually write the toc file entry */
+        rc = ( * write ) ( write_param, &legacy_link_len, sizeof legacy_link_len, num_writ );
+        if ( rc == 0 )
+        {
+            total_written += * num_writ;
+
+            rc = ( * write ) ( write_param, entry -> link, link_size, num_writ );
+            if ( rc == 0 )
+                total_written += * num_writ;
+        }
+    }
+
+    if ( rc == 0 && total_written != total_expected )
+    {
+        STATUS ( STAT_QA, "total_written ( %zu ) != total_expected ( %zu )", total_written, total_expected );
+        rc = RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncorrect );
+    }
+
+    *num_writ = total_written;
+
+    return rc;
+}
+
+static
+rc_t CC kar_persist ( void *param, const void *node,
+    size_t *num_writ, PTWriteFunc write, void *write_param )
+{
+    rc_t rc = Quitting ();
+    const KAREntry * entry = ( const KAREntry * ) node;
+
+    if ( rc != 0 )
+        return rc;
+
+    STATUS ( STAT_QA, "%s called", __func__ );
+
+    switch ( entry -> type )
+    {
+    case kptFile:
+    {
+        STATUS ( STAT_QA, "file entry" );
+        rc = kar_persist_karfile ( ( const KARFile* ) entry, num_writ, write, write_param );
+        return rc;
+    }
+    case kptDir:
+    {
+        STATUS ( STAT_QA, "directory entry" );
+        rc = kar_persist_kardir ( ( const KARDir* ) entry, num_writ, write, write_param );
+        break;
+    }
+    case kptAlias:
+    case kptFile | kptAlias:
+    case kptDir | kptAlias:
+        STATUS ( STAT_USR, "alias entry" );
+        rc = kar_persist_karalias ( ( const KARAlias * ) entry, num_writ, write, write_param );
+        break;
+    default:
+        STATUS ( 0, "unknown entry type: id %u", entry -> type );
+        break;
+    }
+
+    return rc;
+}
+
+static
+uint64_t kar_eval_toc_size ( const BSTree * tree )
+{
+    rc_t rc;
+    size_t toc_size = 0;
+    STATUS ( STAT_QA, "evaluating toc size" );
+    rc = BSTreePersist ( tree, & toc_size, NULL, NULL, kar_persist, NULL );
+    if ( rc != 0 )
+    {
+        LogErr ( klogInt, rc, "Failed to determine TOC size" );
+        exit(5);
+    }
+    STATUS ( STAT_QA, "toc size reported as %lu bytes", toc_size );
+
+    return toc_size;
+}
+
+static
+void kar_write_toc ( KARArchiveFile * af, const BSTree * tree )
+{
+    rc_t rc;
+    size_t toc_size = 0;
+
+    STATUS ( STAT_QA, "writing toc" );
+    rc = BSTreePersist ( tree, & toc_size, kar_write_archive, af, kar_persist, NULL );
+    if ( rc != 0 )
+    {
+        LogErr ( klogInt, rc, "Failed to determine TOC size" );
+        exit(5);
+    }
+
+    STATUS ( STAT_QA, "toc written" );
+}
+
+
+static 
+rc_t kar_prepare_toc ( const BSTree *tree, KARFilePtrArray *file_array_ptr )
+{
+    rc_t rc = 0;
+    
+    /* create an array of KARFile* that will be sorted by size */
+    KARFilePtrArray file_array = calloc ( num_files, sizeof * file_array );
+    if ( file_array == NULL )
+        rc = RC ( rcExe, rcBuffer, rcAllocating, rcMemory, rcExhausted );
+    else
+    {
+        uint64_t i, offset;
+
+        /* pass back output param */
+        * file_array_ptr = file_array;
+
+        num_files = 0; /* global */
+
+        /* now fill the array with KARFile* by walking the tree again */
+        BSTreeForEach ( tree, false, kar_entry_insert_file, file_array );
+        
+        /* now, sort the array based upon size - use <klib/sort.h> */
+        ksort ( file_array, num_files, sizeof * file_array, kar_entry_sort_size, NULL );
+        
+        /* now you can assign offsets to the files in the array */
+        for ( i = offset = 0; i < num_files; ++ i )
+        {
+            KARFile *f = file_array [ i ];
+            f -> byte_offset = offset;
+            
+            offset += f -> byte_size;
+
+            /* perform aligning to boundary */
+            offset = align_offset ( offset, 4 );
+        }
+    }
+    
+    return rc;
+}
+
+static
+size_t kar_entry_full_path ( const KAREntry * entry, const char * root_dir, char * buffer, size_t bsize )
+{
+    size_t offset = 0;
+    if ( entry -> parentDir != NULL )
+    {
+        offset = kar_entry_full_path ( & entry -> parentDir -> dad, root_dir, buffer, bsize );
+        if ( offset < bsize )
+            buffer [ offset ++ ] = '/';
+    }
+    else if ( root_dir != NULL && root_dir [ 0 ] != 0 )
+    {
+        offset = string_copy_measure ( buffer, bsize, root_dir );
+        if ( buffer [ offset - 1 ] != '/' && offset < bsize )
+            buffer [ offset ++ ] = '/';
+    }
+
+    return string_copy_measure ( & buffer [ offset ], bsize - offset, entry -> name ) + offset;
+}
+
+static
+void kar_write_file ( KARArchiveFile *af, const KDirectory *wd, const KARFile *file, const char * root_dir )
+{
+    rc_t rc;
+    char *buffer;
+    size_t num_read, align_size;
+    uint64_t pos = 0;
+    char align_buffer [ 4 ] = "0000";
+    size_t bsize = 128 * 1024 * 1024;
+
+    const KFile *f;
+
+    char filename [ 4096 ];
+    size_t path_size;
+
+    if ( file -> byte_size == 0 )
+        return;
+
+    if ( bsize > file -> byte_size )
+        bsize = file -> byte_size;
+
+    STATUS ( STAT_QA, "writing file '%s'", file -> dad . name );
+
+    path_size = kar_entry_full_path ( & file -> dad, root_dir, filename, sizeof filename );
+    if ( path_size == sizeof filename )
+    {
+        /* path name was somehow too long */
+        rc = RC ( rcExe, rcFile, rcWriting, rcMemory, rcExhausted );
+        LogErr ( klogInt, rc, "File path was too long" );
+        exit (5);
+    }
+
+    STATUS ( STAT_QA, "opening: full path is '%s'", filename );
+    rc = KDirectoryOpenFileRead ( wd, &f, "%s", filename );
+    if ( rc != 0 )
+    {        
+        pLogErr ( klogInt, rc, "Failed to open file $(fname)", "fname=%s", file -> dad . name );
+        exit (6);
+    }
+    
+    STATUS ( STAT_QA, "allocating buffer of %,zu bytes", bsize );
+    buffer = malloc ( bsize );
+    if ( buffer == NULL )
+    {
+        rc = RC ( rcExe, rcFile, rcWriting, rcMemory, rcExhausted );
+        pLogErr ( klogInt, rc, "Failed to open file $(fname)", "fname=%s", file -> dad . name );
+        exit ( 7 );
+    }
+
+    /* establish current position */
+    align_size = align_offset ( af -> pos, 4 ) - af -> pos;
+    if ( align_size != 0  )
+        rc = KFileWriteAll ( af -> archive, af -> pos, align_buffer, align_size, NULL );
+
+    af -> pos = af -> starting_pos + file -> byte_offset;
+
+    while ( rc == 0 && pos < file -> byte_size )
+    {
+        size_t num_writ, to_read = bsize;
+
+        if ( pos + to_read > file -> byte_size )
+            to_read = ( size_t ) ( file -> byte_size - pos );
+
+        STATUS ( STAT_QA, "about to read at offset %lu from input file '%s'", pos, filename );
+        rc = KFileReadAll ( f, pos, buffer, to_read, & num_read );
+        if ( rc != 0 || num_read == 0 )
+            break;
+
+        STATUS ( STAT_QA, "about to write %zu bytes to archive", num_read );    
+        rc = KFileWriteAll ( af -> archive, af -> pos, buffer, num_read, & num_writ );
+        if ( rc != 0 || num_writ != num_read )
+        {
+            /* error */
+            break;
+        }
+
+        af -> pos += num_writ;
+        pos += num_read;
+    }
+
+    STATUS ( STAT_PRG, "freeing memory" );
+    free ( buffer );
+
+    STATUS ( STAT_QA, "closing '%s'", filename );
+    KFileRelease ( f );
+}
+
+static
+rc_t kar_make ( const KDirectory * wd, KFile *archive, const BSTree *tree, const char * root_dir )
+{
+    rc_t rc = 0;
+
+    KARFilePtrArray file_array;
+    
+    rc = kar_prepare_toc ( tree, &file_array );
+    if ( rc == 0 )
+    {
+        uint64_t i, toc_size;
+        KARArchiveFile af;
+        /* evaluate toc size */
+        toc_size = kar_eval_toc_size ( tree );
+
+        af . starting_pos = 0;
+        af . pos = 0;
+        af . archive = archive;
+
+        /*write header */
+        kar_write_header_v1 ( & af, toc_size );
+
+        /* write toc */
+        kar_write_toc ( & af, tree );
+
+        /* write each of the files in order */
+        STATUS ( STAT_QA, "about to write %u files", num_files );
+        for ( i = 0; i < num_files; ++ i )
+        {
+            STATUS ( STAT_QA, "writing file %u: '%s'", i, file_array [ i ] -> dad . name );
+            kar_write_file ( & af, wd, file_array [ i ], root_dir );
+        }
+        
+        free ( file_array );
+    }
+    
+    return rc;
+}
+
+
+/********** main create execution  */
+
+
+static
+rc_t kar_create ( const Params *p )
+{
+    rc_t rc;
+
+    KDirectory *wd;
+
+    rc = KDirectoryNativeDir ( &wd );
+    if ( rc != 0 )
+        LogErr ( klogInt, rc, "Failed to create working directory" );
+    else
+    {
+        KFile *archive;
+        KCreateMode mode = ( p -> force ? kcmInit : kcmCreate ) | kcmParents;
+        rc = KDirectoryCreateFile ( wd, &archive, false, 0666, mode, 
+                                    "%s", p -> archive_path );
+        if ( rc != 0 )
+        {
+            pLogErr ( klogErr, rc, "Failed to create archive $(archive)",
+                      "archive=%s", p -> archive_path );
+        }
+        else
+        {
+            if ( p -> md5sum )
+                rc = kar_md5 ( wd, &archive, p -> archive_path, mode );
+ 
+            if ( rc == 0 )
+            {
+                BSTree tree;
+                BSTreeInit ( & tree );
+                
+                /* build contents by walking input directory if given,
+                   and adding the individual members if given */
+                if ( p -> dir_count != 0 )
+                {
+                    rc = kar_scan_directory ( wd, & tree, p -> directory_path );
+                    if ( rc == 0 )
+                    {   
+                        uint64_t i;
+                        for ( i = 1; rc == 0 && i <= p -> mem_count; ++ i )
+                            rc = kar_scan_path ( wd, & tree, p -> members [ i ] );
+                        
+                        if ( rc == 0 )
+                        {
+                            BSTreeForEach ( &tree, false, kar_entry_link_parent_dir, NULL );
+                            
+                            rc = kar_make ( wd, archive, &tree, p -> directory_path );
+                            if ( rc != 0 )
+                                LogErr ( klogInt, rc, "Failed to build archive" );
+                        }
+                    }
+                }
+            
+                BSTreeWhack ( & tree, kar_entry_whack, NULL );
+            }
+            
+            KFileRelease ( archive );
+        }
+
+        KDirectoryRelease ( wd );
+    }
+
+    return rc;
+}
+
+/*******************************************************************************
+ * Test / Extract
+ */
+
+static
+uint64_t kar_verify_header ( const KFile *archive, KSraHeader *hdr )
+{
+    rc_t rc;
+    
+    size_t num_read;
+   
+
+    STSMSG (1, ("Verifying header\n"));
+
+    rc = KFileReadAll ( archive, 0, hdr, sizeof * hdr, &num_read );
+    if ( rc != 0 )
+    {
+        LOGERR (klogErr, rc, "failed to access archive file");
+        exit ( 1 );
+    }
+
+    if ( num_read < sizeof * hdr - sizeof hdr -> u )
+    {
+        rc = RC ( rcExe, rcFile, rcValidating, rcOffset, rcInvalid );
+        LOGERR (klogErr, rc, "corrupt archive file - invalid header");
+        exit ( 1 );
+    }
+
+    /* verify "ncbi" and "sra" members */
+    if ( memcmp ( hdr -> ncbi, "NCBI", sizeof hdr -> ncbi ) != 0 ||
+         memcmp ( hdr -> sra, ".sra", sizeof hdr -> sra ) != 0 )
+    {
+        rc = RC ( rcExe, rcFile, rcValidating, rcFormat, rcInvalid );
+        LOGERR (klogErr, rc, "invalid file format");
+        exit ( 1 );
+    }
+
+    /* test "byte_order".
+       this is allowed to be either eSraByteOrderTag or eSraByteOrderReverse.
+       anything else, is garbage */
+    if ( hdr -> byte_order != eSraByteOrderTag && hdr -> byte_order != eSraByteOrderReverse )
+    {
+        rc = RC ( rcExe, rcFile, rcValidating, rcByteOrder, rcInvalid );
+        LOGERR (klogErr, rc, "failed to access archive file - invalid byte order");
+        exit ( 1 );
+    }
+
+    if ( hdr -> byte_order == eSraByteOrderReverse )
+    {
+        hdr -> version = bswap_32 ( hdr -> version );
+    }
+
+    /* test version */
+    if ( hdr -> version == 0 )
+    {
+        rc = RC ( rcExe, rcFile, rcValidating, rcInterface, rcInvalid );
+        LOGERR (klogErr, rc, "invalid version");
+        exit ( 1 );
+    }
+
+    if ( hdr -> version > 1 )
+    {
+        rc = RC ( rcExe, rcFile, rcValidating, rcInterface, rcUnsupported );
+        LOGERR (klogErr, rc, "version not supported");
+        exit ( 1 );
+    }
+
+    /* test actual size against specific header version */
+    if ( num_read < sizeof * hdr - sizeof hdr -> u + sizeof hdr -> u . v1 )
+    {
+        rc = RC ( rcExe, rcFile, rcValidating, rcOffset, rcIncorrect );
+        LOGERR (klogErr, rc, "failed to read header");
+        exit ( 1 );
+    }
+
+    return num_read;
+}
+
+static
+size_t toc_data_copy ( void * dst, size_t dst_size, const uint8_t * toc_data, size_t toc_data_size, size_t offset )
+{
+    if ( offset + dst_size > toc_data_size )
+    {
+        rc_t rc = RC ( rcExe, rcFile, rcValidating, rcOffset, rcInvalid );
+        LOGERR (klogErr, rc, "toc offset out of bounds");
+        exit ( 3 );
+    }
+
+    memcpy ( dst, & toc_data [ offset ], dst_size );
+    return offset + dst_size;
+}
+
+static
+int64_t kar_alias_find_link ( const void *item, const BSTNode *node )
+{
+    const char *link = ( const char * ) item;
+    KAREntry *entry = ( KAREntry * ) node;
+    
+    uint64_t link_size = string_size ( link );
+    uint64_t name_size = string_size ( entry -> name );
+
+    return string_cmp ( item, link_size, entry -> name, name_size, link_size );
+}
+
+
+static
+void kar_alias_link_type ( BSTNode *node, void *data )
+{
+    /* archive fake root directory node */
+    const KARDir * root = ( const KARDir * ) data;
+
+    const KARDir *dir;
+    KAREntry *entry = ( KAREntry * ) node;
+
+    if ( entry -> type == kptDir )
+    {
+        /* need to go recursive on contents */
+        dir = ( const KARDir * ) entry;
+        BSTreeForEach ( &dir -> contents, false, kar_alias_link_type, ( void * ) root );
+    }
+    else if ( entry -> type == kptAlias )
+    {
+        const KAREntry *e;
+
+        size_t lsize;
+        const char *link, *end;
+        KARAlias *alias = ( KARAlias * ) entry;
+
+        link = alias -> link;
+        lsize = string_size ( link );
+        end = link + lsize;
+
+        /* if the link is an absolute path, it's outside of archive */
+        if ( link [ 0 ] == '/' )
+            return;
+
+        /* establish root for search */
+        dir = entry -> parentDir;
+        if ( dir == NULL )
+            dir = root;
+        e = & dir -> dad;
+
+        /* walk the path */
+        while ( e != NULL && link < end )
+        {
+            /* get the segment */
+            const char *seg = link;
+            char *sep = string_chr ( link, lsize, '/' );
+            if ( sep == NULL )
+                link = end;
+            else
+            {
+                *sep = 0;
+                link = sep + 1;
+            }
+
+            /* if the segment is empty, then we saw '/'.
+               if the segment is a single '.', then it means same thing */
+            if ( seg [ 0 ] == 0  ||
+                 ( seg [ 0 ] == '.' && seg [ 1 ] == 0 ) )
+            {
+                /* do nothing */
+            }
+            else if ( seg [ 0 ] == '.' && seg [ 1 ] == '.' && seg [ 2 ] == 0 )
+            {
+                /* move up to parent */
+                if ( e == & root -> dad )
+                    e = NULL;
+                else
+                {
+                    e = & e -> parentDir -> dad;
+                    if ( e == NULL )
+                        e = & root -> dad;
+                }
+            }
+            else
+            {
+                rc_t rc;
+
+                while ( e != NULL && e -> type == kptAlias )
+                {
+                    assert ( ( ( KARAlias * ) e ) -> resolved == NULL );
+                    kar_alias_link_type ( ( BSTNode * ) & e -> dad, ( void * ) root );
+                    e = ( ( KARAlias * ) e ) -> resolved;
+                }
+
+                if ( e -> type == ( kptDir | kptAlias ) )
+                {
+                    assert ( ( ( KARAlias * ) e ) -> resolved != NULL );
+                    e = ( ( KARAlias * ) e ) -> resolved;
+                }
+
+                /* move down */
+                if ( e -> type == kptDir )
+                {
+                    dir = ( KARDir * ) e;
+                    e = ( KAREntry * ) BSTreeFind ( & dir -> contents, seg, kar_alias_find_link );
+
+                    while ( e != NULL && ( e -> type & kptAlias ) != 0 )
+                    {
+                        if ( ( ( const KARAlias * ) e ) -> resolved == NULL )
+                            break;
+                        e = ( ( const KARAlias * ) e ) -> resolved;
+                    }
+                }
+                else
+                {
+                    e = NULL;
+                    rc = RC ( rcExe, rcPath, rcValidating, rcPath, rcInvalid );
+                    LOGERR (klogErr, rc, "unable to locate symlink reference");
+                }
+            }
+
+            if ( sep != NULL )
+                *sep = '/';
+        }
+
+        if ( e != NULL )
+        {
+            assert ( link == end );
+            alias -> dad . type = e -> type | kptAlias;
+            alias -> resolved = ( KAREntry * ) e;
+        }
+    }
+}
+
+static 
+void kar_inflate_toc ( PBSTNode *node, void *data )
+{
+    rc_t rc = 0;
+
+    size_t offset = 0;
+    const uint8_t * toc_data = node -> data . addr;
+    char buffer [ 4096 ], * name = buffer;
+    uint16_t name_len = 0;
+    uint64_t mod_time = 0;
+    uint32_t access_mode = 0;
+    uint8_t type_code = 0;
+
+    offset = toc_data_copy ( & name_len, sizeof name_len, toc_data, node -> data . size, offset );
+    if ( name_len >= sizeof buffer )
+    {
+        name = malloc ( name_len + 1 );
+        if ( name == NULL )
+            exit ( 10 );
+    }
+    offset = toc_data_copy ( name, name_len, toc_data, node -> data . size, offset );
+    name [ name_len ] = 0;
+    STATUS ( STAT_QA, "inflating '%s'", name );
+    offset = toc_data_copy ( & mod_time, sizeof mod_time, toc_data, node -> data . size, offset );
+    offset = toc_data_copy ( & access_mode, sizeof access_mode, toc_data, node -> data . size, offset );
+    offset = toc_data_copy ( & type_code, sizeof type_code, toc_data, node -> data . size, offset );
+
+    switch ( type_code )
+    {
+    case ktocentrytype_file:
+    {
+        KARFile *file;
+
+        rc = kar_entry_inflate ( ( KAREntry ** ) &file, sizeof *file, name, name_len,
+             mod_time, access_mode, kptFile );
+        if ( rc != 0 )
+        {
+            LOGERR (klogErr, rc, "failed inflate KARFile");
+            exit ( 3 );
+        }
+
+        offset = toc_data_copy ( & file -> byte_offset, sizeof file -> byte_offset, toc_data, node -> data . size, offset );
+        toc_data_copy ( & file -> byte_size, sizeof file -> byte_size, toc_data, node -> data . size, offset );
+
+        if ( file -> byte_size > max_size )
+            max_size = file -> byte_size;
+        if ( file -> byte_offset > max_offset )
+            max_offset = file -> byte_offset;
+
+        STATUS ( STAT_QA, "inserting '%s'", file -> dad . name );
+        rc = BSTreeInsert ( ( BSTree * ) data, &file -> dad . dad, kar_entry_cmp );
+        if ( rc != 0 )
+        {
+            LOGERR (klogErr, rc, "failed insert KARFile into tree");
+            exit ( 3 );
+        }
+
+        break;
+    }
+    case ktocentrytype_emptyfile:
+    {
+        KARFile *file;
+
+        rc = kar_entry_inflate ( ( KAREntry ** ) &file, sizeof *file, name, name_len,
+             mod_time, access_mode, kptFile );
+        if ( rc != 0 )
+        {
+            LOGERR (klogErr, rc, "failed inflate KARFile");
+            exit ( 3 );
+        }
+
+        file -> byte_offset = 0;
+        file -> byte_size = 0;
+
+        STATUS ( STAT_QA, "inserting '%s'", file -> dad . name );
+        rc = BSTreeInsert ( ( BSTree * ) data, &file -> dad . dad, kar_entry_cmp );
+        if ( rc != 0 )
+        {
+            LOGERR (klogErr, rc, "failed insert KARFile into tree");
+            exit ( 3 );
+        }
+
+        break;
+    }
+    case ktocentrytype_dir:
+    {
+        KARDir *dir;
+        PBSTree *ptree;
+
+        rc = kar_entry_inflate ( ( KAREntry ** ) &dir, sizeof *dir, name, name_len, mod_time, access_mode, kptDir );
+        if ( rc != 0 )
+        {
+            LOGERR (klogErr, rc, "failed inflate KARDir");
+            exit ( 3 );
+        }
+
+        BSTreeInit ( &dir -> contents );
+
+
+        rc = PBSTreeMake ( & ptree, & toc_data [ offset ], node -> data . size - offset, false );
+        if ( rc != 0 )
+            LOGERR (klogErr, rc, "failed make PBSTree");
+        else
+        {
+            PBSTreeForEach ( ptree, false, kar_inflate_toc, &dir -> contents );
+            
+            PBSTreeWhack ( ptree );
+        }
+
+        rc = BSTreeInsert ( ( BSTree * ) data, &dir -> dad . dad, kar_entry_cmp );
+        if ( rc != 0 )
+        {
+            LOGERR (klogErr, rc, "failed insert KARDir into tree");
+            exit ( 3 );
+        }
+        
+        break;
+    }
+    case ktocentrytype_softlink:
+    {
+        KARAlias *alias;
+
+        rc = kar_entry_inflate ( ( KAREntry ** ) &alias, sizeof *alias, name, name_len, mod_time, access_mode, kptAlias );
+        if ( rc != 0 )
+        {
+            LOGERR (klogErr, rc, "failed inflate KARAlias");
+            exit ( 3 );
+        }
+
+        /* need to reuse name* for soft-link string */
+        if ( name != buffer )
+            free ( name );
+        
+        offset = toc_data_copy ( & name_len, sizeof name_len, toc_data, node -> data . size, offset );
+        name = malloc ( name_len + 1 );
+        if ( name == NULL )
+            exit ( 10 );
+        offset = toc_data_copy ( name, name_len, toc_data, node -> data . size, offset );
+        name [ name_len ] = 0;
+
+        alias -> link = name;
+        name = buffer;
+
+        rc = BSTreeInsert ( ( BSTree * ) data, &alias -> dad . dad, kar_entry_cmp );
+        if ( rc != 0 )
+        {
+            LOGERR (klogErr, rc, "failed insert KARAlias into tree");
+            exit ( 3 );
+        }
+        break;
+    }
+    default:
+        STATUS ( 0, "unknown entry type: id %u", type_code );
+        break;
+    }
+
+    if ( name != buffer )
+        free ( name );
+}
+
+static
+rc_t kar_extract_toc ( const KFile *archive, BSTree *tree, uint64_t *toc_pos, const size_t toc_size )
+{
+    rc_t rc = 0;
+
+    char *buffer;
+    buffer = malloc ( toc_size );
+    if ( buffer == NULL )
+    {
+        rc = RC ( rcExe, rcFile, rcAllocating, rcMemory, rcExhausted );
+        LOGERR (klogErr, rc, "failed allocate memory");
+    }
+    else
+    {
+        size_t num_read;
+
+        rc = KFileReadAll ( archive, *toc_pos, buffer, toc_size, &num_read );
+        if ( rc != 0 )
+        {
+            LOGERR (klogErr, rc, "failed to access archive file");
+            exit ( 2 );
+        }
+
+        if ( num_read < toc_size )
+        {
+            rc = RC ( rcExe, rcFile, rcValidating, rcOffset, rcInsufficient );
+            LOGERR (klogErr, rc, "failed to read header");
+        }
+        else
+        {
+            PBSTree *ptree;
+            
+            rc = PBSTreeMake ( &ptree, buffer, num_read, false );
+            if ( rc != 0 )
+                LOGERR (klogErr, rc, "failed make PBSTree");
+            else
+            {
+                PBSTreeForEach ( ptree, false, kar_inflate_toc, tree );
+
+                PBSTreeWhack ( ptree );
+            }
+        }
+
+        free ( buffer );
+    }
+
+    return rc;
+}
+
+typedef struct extract_block extract_block;
+struct extract_block
+{
+    uint64_t extract_pos;
+    
+    KDirectory *cdir;
+    const KFile *archive;
+
+    rc_t rc;
+
+};
+
+static bool CC kar_extract ( BSTNode *node, void *data );
+
+static
+rc_t extract_file ( const KARFile *src, const extract_block *eb )
+{
+    KFile *dst;
+    char *buffer;
+    uint64_t num_writ;
+
+    rc_t rc = KDirectoryCreateFile ( eb -> cdir, &dst, false, 0200, 
+                                     kcmCreate, "%s", src -> dad . name ); 
+    if ( rc != 0 )
+    {
+        pLogErr (klogErr, rc, "failed extract to file '$(fname)'", "fname=%s", src -> dad . name );
+        exit ( 4 );
+    }
+
+    buffer = malloc ( src -> byte_size );
+    if ( buffer == NULL )
+    {
+        rc = RC ( rcExe, rcFile, rcAllocating, rcMemory, rcExhausted );
+        pLogErr (klogErr, rc, "failed to allocate '$(mem)'", "mem=%lu", src -> byte_size );
+        exit ( 4 );
+    }
+
+    rc = KFileReadExactly ( eb -> archive, src -> byte_offset + eb -> extract_pos, buffer, src -> byte_size );
+    if ( rc != 0 )
+    {
+        pLogErr (klogErr, rc, "failed to read from archive '$(fname)'", "fname=%s", src -> dad . name );
+        exit ( 4 );
+    }
+
+    rc = KFileWriteAll ( dst, 0, buffer, src -> byte_size, &num_writ );
+    if ( rc != 0 )
+    {
+        pLogErr (klogErr, rc, "failed to write to file '$(fname)'", "fname=%s", src -> dad . name );
+        exit ( 4 );
+    }
+    if ( num_writ < src -> byte_size )
+    {
+        rc = RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+        pLogErr (klogErr, rc, "failed to write to file '$(fname)'", "fname=%s", src -> dad . name );
+        exit ( 4 );
+    }
+    
+    KFileRelease ( dst );
+
+    free ( buffer );
+
+    return rc;
+}
+
+static
+rc_t extract_dir ( const KARDir *src, const extract_block *eb )
+{
+    rc_t rc;
+
+    STATUS ( STAT_QA, "extracting dir: %s", src -> dad . name );
+    rc = KDirectoryCreateDir ( eb -> cdir, 0700, kcmCreate, "%s", src -> dad . name );
+    if ( rc == 0 )
+    {
+        extract_block c_eb = *eb;
+        rc = KDirectoryOpenDirUpdate ( eb -> cdir, &c_eb . cdir, false, "%s", src -> dad . name );
+        if ( rc == 0 )
+        {      
+            BSTreeDoUntil ( &src -> contents, false, kar_extract, &c_eb );
+
+            KDirectoryRelease ( c_eb . cdir );
+        }
+    }
+    return rc;
+}
+
+static
+rc_t extract_alias ( const KARAlias *src, const extract_block *eb )
+{
+    return KDirectoryCreateAlias ( eb -> cdir, 0777, kcmCreate, src -> link, src -> dad . name );
+}
+
+static
+bool CC kar_extract ( BSTNode *node, void *data )
+{
+    const KAREntry *entry = ( KAREntry * ) node;
+    extract_block *eb = ( extract_block * ) data;
+    eb -> rc = 0;
+    STATUS ( STAT_QA, "Entry to extract: %s", entry -> name );
+
+    switch ( entry -> type )
+    {
+    case kptFile:
+        eb -> rc = extract_file ( ( const KARFile * ) entry, eb );
+        break;
+    case kptDir:
+        eb -> rc = extract_dir ( ( const KARDir * ) entry, eb ); 
+        break;
+    case kptAlias:
+    case kptFile | kptAlias:
+    case kptDir | kptAlias:
+        eb -> rc = extract_alias ( ( const KARAlias * ) entry, eb );
+        if ( eb -> rc != 0 )
+            return true;
+        else
+            return false;
+        /* TBD - need to mdify the timestamp of the symlink without dereferencing using lutimes - requires library code handling*/
+        /* should not get down below to setaccess or setdate */
+        break;
+    default:
+        break;
+    }
+
+    if ( eb -> rc == 0 )
+        eb -> rc = KDirectorySetAccess ( eb -> cdir, false, entry -> access_mode, 0777, "%s", entry -> name );
+    if ( eb -> rc == 0 )
+        eb -> rc = KDirectorySetDate ( eb -> cdir, false, entry -> mod_time, "%s", entry -> name );
+
+    if ( eb -> rc != 0 )
+        return true;
+
+    return false;
+}
+
+static
+rc_t kar_test_extract ( const Params *p )
+{
+    rc_t rc;
+
+    KDirectory *wd;
+
+    STSMSG (1, ("Extracting kar\n"));
+
+    rc = KDirectoryNativeDir ( &wd );
+    if ( rc != 0 )
+        LogErr ( klogInt, rc, "Failed to create working directory" );
+    else
+    {
+        const KFile *archive;
+        rc = KDirectoryOpenFileRead ( wd, &archive, p -> archive_path );
+        if ( rc != 0 )
+            LogErr ( klogInt, rc, "Failed to open archive" );
+        else
+        {
+            KARDir root;
+            BSTree *tree;
+            KSraHeader hdr;
+            uint64_t toc_pos, toc_size, file_offset;
+
+            toc_pos = kar_verify_header ( archive, &hdr );            
+            file_offset = hdr . u . v1 . file_offset;
+            toc_size = file_offset - toc_pos;
+
+            memset ( & root, 0, sizeof root );
+            root . dad . type = kptDir;
+
+            tree = & root . contents;
+            BSTreeInit ( tree );
+
+            STATUS ( STAT_QA, "extracting toc" );
+            rc = kar_extract_toc ( archive, tree, &toc_pos, toc_size );
+            if ( rc == 0 )
+            {
+                BSTreeForEach ( tree, false, kar_entry_link_parent_dir, NULL );
+
+                /* find what the alias points to */
+                BSTreeForEach ( tree, false, kar_alias_link_type, &root );
+
+                /* Finish test */
+                if ( p -> x_count == 0 )
+                {
+                    KARPrintMode kpm;
+                    STATUS ( STAT_QA, "Test Mode" );
+
+                    max_size_fw = get_field_width ( max_size );
+                    max_offset_fw = get_field_width ( max_offset );
+
+                    kpm . indent = 0;
+
+                    if ( p -> long_list )
+                    {
+                        KOutMsg ( "TypeAccess Size Offset ModDateTime         Path Name\n" );
+                        kpm . pm = pm_longlist;
+                    }
+                    else
+                        kpm . pm = pm_normal;
+
+                    BSTreeForEach ( tree, false, kar_print, &kpm );
+                }
+                else
+                {
+                    extract_block eb;
+                    /* begin extracting */
+                    STATUS ( STAT_QA, "Extract Mode" );
+                    eb . archive = archive;
+                    eb . extract_pos = file_offset;
+                    eb . rc = 0;
+
+                    STATUS ( STAT_QA, "creating directory from path: %s", p -> directory_path );
+                    rc = KDirectoryCreateDir ( wd, 0777, kcmInit, "%s", p -> directory_path );
+                    if ( rc == 0 )
+                    {
+                        STATUS ( STAT_QA, "opening directory"  );
+                        rc = KDirectoryOpenDirUpdate ( wd, &eb . cdir, false, "%s", p -> directory_path );
+                        if ( rc == 0 )
+                        {
+                            BSTreeDoUntil ( tree, false, kar_extract, &eb );
+                            rc = eb . rc;
+                        }
+                        
+                        KDirectoryRelease ( eb . cdir );
+                    }
+                }
+            }
+
+            BSTreeWhack ( tree, kar_entry_whack, NULL );
+            KFileRelease ( archive );
+        }
+        
+        KDirectoryRelease ( wd );
+    }
+
+    return rc;
+}
+
+/*******************************************************************************
+ * Startup
+ */
+
+static
+rc_t run ( const Params *p )
+{
+    if ( p -> c_count != 0 )
+        return kar_create ( p );
+
+    if ( p -> x_count != 0 )
+        return kar_test_extract ( p );
+
+    assert ( p -> t_count != 0 );
+    return kar_test_extract ( p );
+}
+    
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Params params;
+    Args *args = NULL;
+
+    rc_t rc = parse_params ( &params, args, argc, argv );
+    if ( rc == 0 )
+    {
+        rc = run ( &params );
+
+        ArgsWhack ( args );
+    }
+
+    if ( rc == 0 )
+        STSMSG (1, ("Success: Exiting kar\n"));
+
+    return rc;
+}
+
diff --git a/tools/kar/sra-kar.c b/tools/kar/sra-kar.c
new file mode 100644
index 0000000..7d91b6e
--- /dev/null
+++ b/tools/kar/sra-kar.c
@@ -0,0 +1,431 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#define USE_FORCE 0
+
+#include <klib/rc.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <klib/out.h>
+#include <klib/log.h>
+#include <klib/status.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+#include <sra/sradb.h>
+#include <sra/sradb-priv.h>
+
+#include <kapp/args.h>
+
+
+#include <assert.h>
+
+typedef struct srakar_parms srakar_parms;
+struct srakar_parms
+{
+    KDirectory * dir;
+    const char *src_path;
+    const char *dst_path;
+    bool lite;
+    bool force;
+};
+
+static
+rc_t copy_file (const KFile * fin, KFile *fout)
+{
+    rc_t rc;
+    uint8_t	buff	[64 * 1024];
+    size_t	num_read;
+    uint64_t	inpos;
+    uint64_t	outpos;
+    uint64_t    fsize;
+
+    assert (fin != NULL);
+    assert (fout != NULL);
+
+    inpos = 0;
+    outpos = 0;
+
+    rc = KFileSize (fin, &fsize);
+    if (rc != 0)
+        return rc;
+
+    do
+    {
+        rc = KFileRead (fin, inpos, buff, sizeof (buff), &num_read);
+        if (rc != 0)
+        {
+            PLOGERR (klogErr, (klogErr, rc,
+                               "Failed to read from directory structure in creating archive at $(P)",
+                               PLOG_U64(P), inpos));
+            break;
+        }
+        else if (num_read > 0)
+        {
+            size_t to_write;
+
+            inpos += (uint64_t)num_read;
+
+            to_write = num_read;
+            while (to_write > 0)
+            {
+                size_t num_writ;
+                rc = KFileWrite (fout, outpos, buff, num_read, &num_writ);
+                if (rc != 0)
+                {
+                    PLOGERR (klogErr, (klogErr, rc,
+                                       "Failed to write to archive in creating archive at $(P)",
+                                       PLOG_U64(P), outpos));
+                    break;
+                }
+                outpos += num_writ;
+                to_write -= num_writ;
+            }
+        }
+        if (rc != 0)
+            break;
+    } while (num_read != 0);
+    return rc;
+}
+static
+rc_t run ( srakar_parms *pb )
+{
+    KFile * outfile;
+    rc_t rc;
+
+    const SRAMgr *mgr;
+
+    rc = SRAMgrMakeRead ( & mgr );
+    if ( rc != 0 )
+        LOGERR ( klogInt, rc, "failed to open SRAMgr" );
+    else
+    {
+        const SRATable *tbl;
+        rc = SRAMgrOpenTableRead ( mgr, & tbl, "%s", pb -> src_path );
+        if ( rc != 0 )
+            PLOGERR ( klogInt, (klogInt, rc,
+                "failed to open SRATable '$(spec)'", "spec=%s",
+                pb -> src_path ));
+        else
+        {
+            rc = KDirectoryCreateFile (pb->dir, &outfile, false, 0446,
+                                       kcmParents | ( pb->force ? kcmInit : kcmCreate) , "%s", pb->dst_path);
+            if (rc == 0)
+            {
+                const KFile * archive;
+
+                rc = SRATableMakeSingleFileArchive (tbl, &archive, pb->lite,
+                    NULL);
+                if (rc == 0)
+                {
+                    rc = copy_file (archive, outfile);
+                    KFileRelease (archive);
+                }
+                KFileRelease (outfile);
+            }
+            SRATableRelease ( tbl );
+        }
+        SRAMgrRelease (mgr);
+    }
+/*
+    rc = KDirectoryCreateFile (pb->dir, &outfile, false, 0446, kcmParents | ( pb->force ? kcmInit : kcmCreate) , "%s", pb->dst_path);
+
+    if (rc == 0)
+    {
+        const SRAMgr *mgr;
+
+        rc = SRAMgrMakeRead ( & mgr );
+        if ( rc != 0 )
+            LOGERR ( klogInt, rc, "failed to open SRAMgr" );
+        else
+        {
+            const SRATable *tbl;
+            rc = SRAMgrOpenTableRead ( mgr, & tbl, "%s", pb -> src_path );
+            if ( rc != 0 )
+                PLOGERR ( klogInt, (klogInt, rc, "failed to open SRATable '$(spec)'", "spec=%s", pb -> src_path ));
+            else
+            {
+                const KFile * archive;
+
+                rc = SRATableMakeSingleFileArchive (tbl, &archive, pb->lite, NULL);
+                if (rc == 0)
+                {
+                    rc = copy_file (archive, outfile);
+                    KFileRelease (archive);
+                }
+                SRATableRelease ( tbl );
+            }
+            SRAMgrRelease (mgr);
+        }
+        KFileRelease (outfile);
+    }
+*/
+    return rc;
+}
+
+/* Usage
+ */
+#define OPTION_LITE "lite"
+#define ALIAS_LITE "l"
+static const char * lite_usage[] = { "output an abbreviated version of the table", NULL };
+
+#if USE_FORCE
+#define OPTION_FORCE "force"
+#define ALIAS_FORCE "f"
+static const char * force_usage[] = { "replace an existing archive if present", NULL };
+#endif
+static
+OptDef Options[] = 
+{
+#if USE_FORCE
+    { OPTION_FORCE, ALIAS_FORCE, NULL, force_usage, 1, false, false },
+#endif
+    { OPTION_LITE, ALIAS_LITE, NULL, lite_usage, 1, false, false }
+};
+
+
+static
+KLogLevel default_log_level;
+
+
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s [options] table [archive]\n"
+                    "\n"
+                    "Summary:\n"
+                    "  Create a single file archive from an SRA database table.\n"
+                    "  The archive name can be given or will be derived from the\n"
+                    "  name of the table.\n"
+                    "\n", progname);
+}
+
+const char UsageDefaultName[] = "sra-kar";
+
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary (progname);
+
+    KOutMsg ("Options:\n");
+
+    HelpOptionLine (ALIAS_LITE, OPTION_LITE, NULL, lite_usage);
+#if USE_FORCE
+    HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, force_usage);
+#endif
+    HelpOptionsStandard ();
+    HelpVersion (fullpath, KAppVersion());
+    return rc;
+}
+
+
+/* KMain - EXTERN
+ *  executable entrypoint "main" is implemented by
+ *  an OS-specific wrapper that takes care of establishing
+ *  signal handlers, logging, etc.
+ *
+ *  in turn, OS-specific "main" will invoke "KMain" as
+ *  platform independent main entrypoint.
+ *
+ *  "argc" [ IN ] - the number of textual parameters in "argv"
+ *  should never be < 0, but has been left as a signed int
+ *  for reasons of tradition.
+ *
+ *  "argv" [ IN ] - array of NUL terminated strings expected
+ *  to be in the shell-native character set: ASCII or UTF-8
+ *  element 0 is expected to be executable identity or path.
+ */
+    rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args * args;
+    rc_t rc;
+
+    default_log_level = KLogLevelGet();
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 1, Options, sizeof Options / sizeof (OptDef));
+    if (rc == 0)
+    {
+        do
+        {
+            srakar_parms pb;
+            KDirectory * pwd;
+            const char * name;
+            uint32_t pcount;
+            char archive_name [256];
+
+            rc = KDirectoryNativeDir (&pwd);
+            if (rc)
+                break;
+
+            pb.lite = false;
+            pb.force = false;
+            pb.dir = pwd;
+
+            rc = ArgsOptionCount (args, OPTION_LITE, &pcount);
+            if (rc)
+                break;
+
+            if (pcount == 1)
+            {
+                STSMSG (1, ("Using lite option"));
+                pb.lite = true;
+            }
+
+#if USE_FORCE
+            rc = ArgsOptionCount (args, OPTION_FORCE, &pcount);
+            if (rc)
+                break;
+
+            if (pcount == 1)
+            {
+                STSMSG (1, ("Using force option"));
+                pb.force = true;
+            }
+#endif
+            rc = ArgsParamCount (args, &pcount);
+            if (rc)
+                break;
+
+            if (pcount == 0)
+            {
+                KOutMsg ("missing source table\n");
+                MiniUsage (args);
+                rc = RC (rcExe, rcArgv, rcParsing, rcPath, rcInsufficient);
+                break;
+            }
+            else if (pcount > 2)
+            {
+                KOutMsg ("Too many parameters\n");
+                MiniUsage (args);
+                rc = RC (rcExe, rcArgv, rcParsing, rcPath, rcExcessive);
+                break;
+            }
+
+            rc = ArgsParamValue (args, 0, (const void **)&pb.src_path);
+            if (rc)
+            {
+                KOutMsg ("failure to get source path/name\n");
+                break;
+            }
+
+            pb.dst_path = archive_name;
+
+            name = string_rchr (pb.src_path, string_size (pb.src_path), '/');
+            if (name == NULL)
+                name = pb.src_path;
+
+            if (pcount == 1)
+            {
+                size_t size;
+
+                rc = string_printf (archive_name, sizeof (archive_name), & size,
+                                 "%s%s", name, pb.lite ? ".lite.sra" : ".sra");
+                if ( rc != 0 )
+                {
+                    rc = RC (rcExe, rcArgv, rcParsing, rcPath, rcInsufficient);
+                    PLOGERR (klogFatal, (klogFatal, rc, "Failure building archive name $(P)", "P=%s", archive_name));
+                    break;
+                }
+            }
+            else
+            {
+                rc = ArgsParamValue (args, 1, (const void **)&pb.dst_path);
+                if (rc)
+                {
+                    LOGERR (klogInt, rc, "failure to get destination path");
+                    break;
+                }
+            }
+
+            if (rc == 0)
+            {
+                KPathType kpt;
+
+                kpt = KDirectoryPathType (pwd, "%s", pb.dst_path);
+
+                switch (kpt & ~kptAlias)
+                {
+                case kptNotFound:
+                    /* found nothing so assume its a valid new file name
+                     * not gonna tweak extensions at this point but that can be upgraded */
+                    break;
+                case kptFile:
+                    /* got a file name, use it  - would need force... */
+                    if (pb.force == false)
+                    {
+                        rc = RC (rcExe, rcArgv, rcParsing, rcPath, rcBusy);
+                        PLOGERR (klogFatal, (klogFatal, rc, 
+                                             "Output file already exists $(P)",
+                                             "P=%s", archive_name));
+                    }
+                    break;
+
+                case kptDir:
+                {
+                    size_t size;
+
+                    rc = string_printf (archive_name, sizeof (archive_name), & size,
+                                     "%s/%s%s", pb.dst_path, name, pb.lite ? ".lite.sra" : ".sra");
+                    if ( rc != 0 )
+                    {
+                        rc = RC (rcExe, rcArgv, rcParsing, rcPath, rcInsufficient);
+                        PLOGERR (klogFatal, (klogFatal, rc, "Failure building archive name $(P)", "P=%s", archive_name));
+                        break;
+                    }
+                    pb.dst_path = archive_name;
+                    break;
+                }
+                default:
+                    rc = RC (rcExe, rcArgv, rcParsing, rcPath, rcInvalid);
+                    break;
+                }
+                if (rc == 0)
+                {
+                    STSMSG (1,("Creating archive (%s) from table (%s)\n", pb.dst_path, pb.src_path));
+
+                    rc = run (&pb);
+                    STSMSG (5, ("Run exits with %d %R\n", rc, rc));
+                }
+            }
+
+        } while (0);
+    }
+    STSMSG (1, ("Exit status %u %R", rc, rc));
+    return rc;
+}
diff --git a/tools/keyring-srv/Makefile b/tools/keyring-srv/Makefile
new file mode 100644
index 0000000..1295f11
--- /dev/null
+++ b/tools/keyring-srv/Makefile
@@ -0,0 +1,110 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/keyring-srv
+
+INT_LIBS = \
+
+ALL_LIBS = \
+	$(INT_LIBS) \
+	$(EXT_LIBS)
+
+EXT_TOOLS = \
+    keyring-srv
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)    
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs 
+	@ $(MAKE_CMD) $(TARGDIR)/$@
+
+$(INT_LIBS): makedirs
+	@ $(MAKE_CMD) $(ILIBDIR)/$@
+
+$(EXT_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@    
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+.PHONY: all std $(ALL_LIBS) 
+
+#-------------------------------------------------------------------------------
+# std
+#
+$(TARGDIR)/std: \
+	$(addprefix $(ILIBDIR)/,$(INT_LIBS)) \
+	$(addprefix $(LIBDIR)/,$(EXT_LIBS)) \
+	$(addprefix $(BINDIR)/,$(EXT_TOOLS))
+
+.PHONY: $(TARGDIR)/std
+
+#-------------------------------------------------------------------------------
+# all
+#
+$(TARGDIR)/std: \
+	$(addprefix $(ILIBDIR)/,$(INT_LIBS)) \
+	$(addprefix $(LIBDIR)/,$(EXT_LIBS)) \
+	$(addprefix $(BINDIR)/,$(ALL_TOOLS))
+
+.PHONY: $(TARGDIR)/all
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#------------------------------------------------------------------------------
+# keyring-srv
+#
+KEYRING_SRV_SRC = \
+	keyring-srv \
+	keyring-data \
+	keyring-database \
+	keyring-srv-main \
+
+KEYRING_SRV_OBJ = \
+	$(addsuffix .$(OBJX),$(KEYRING_SRV_SRC))
+
+KEYRING_SRV_LIB = \
+	-skapp \
+	-stk-version \
+	-lncbi-wvdb \
+
+
+$(BINDIR)/keyring-srv: $(KEYRING_SRV_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(KEYRING_SRV_LIB)
+
diff --git a/tools/keyring-srv/keyring-data.c b/tools/keyring-srv/keyring-data.c
new file mode 100644
index 0000000..58cdeac
--- /dev/null
+++ b/tools/keyring-srv/keyring-data.c
@@ -0,0 +1,346 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ * 
+ */
+
+#include "keyring-data.h"
+
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <klib/rc.h>
+
+rc_t KeyRingDataInit ( KeyRingData* self )
+{
+    BSTreeInit( & self->projects );
+    BSTreeInit( & self->objects );
+    self->next_projectId = 0;
+    self->next_objectId = 0;
+    return 0;
+}
+
+void KeyRingDataWhack ( KeyRingData* self )
+{
+    BSTreeWhack ( & self->projects, ProjectWhack, NULL );
+    BSTreeWhack ( & self->objects, ObjectWhack, NULL );
+}
+
+static int64_t CC FindProject ( const void *item, const BSTNode *n )
+{
+    return StringCompare((const String*)item, ((const Project*)n)->name);
+}
+static int64 CC SortProjects ( const BSTNode *item, const BSTNode *n )
+{
+    return StringCompare(((const Project*)item)->name, ((const Project*)n)->name);
+}
+
+const Project* KeyRingDataGetProject (const KeyRingData* data, const String* name)
+{
+    return (const Project*)BSTreeFind(&data->projects, name, FindProject);
+}
+
+rc_t KeyRingDataInsertProject (ProjectTable*  data, 
+                               uint32_t      p_id, 
+                               const String* name, 
+                               const String* download_ticket, 
+                               const String* encryption_key)
+{
+    rc_t rc = 0;
+    Project* p = (Project*) malloc(sizeof(Project));
+    if (p != NULL)
+    {
+        rc = ProjectInit(p, p_id, name, download_ticket, encryption_key);
+        if (rc == 0)
+        {
+            rc = BSTreeInsert(data, &p->dad, SortProjects);
+            if (rc != 0)
+                ProjectWhack(&p->dad, NULL);
+        }
+        if (rc != 0)
+            free(p);
+    }
+    else
+        rc = RC ( rcApp, rcDatabase, rcUpdating, rcMemory, rcExhausted );
+    return rc;
+}                               
+
+rc_t KeyRingDataAddProject(KeyRingData* data, const String* name, const String* download_ticket, const String* encryption_key)
+{
+    rc_t rc = 0;
+    Project* p;
+
+    p = (Project*)BSTreeFind(&data->projects, name, FindProject);
+    if (p != NULL)
+    {
+        bool rewrite = false;
+        String* dl = NULL;
+        String* enc = NULL;
+        if (StringCompare(p->download_ticket, download_ticket) != 0)
+        {
+            dl = p->download_ticket;
+            rc = StringCopy((const String**)&p->download_ticket, download_ticket);
+            if (rc == 0)
+                rewrite = true;
+            else
+                dl = NULL;
+        }
+        if (rc == 0 && StringCompare(p->encryption_key, encryption_key) != 0)
+        {
+            enc = p->encryption_key;
+            rc = StringCopy((const String**)&p->encryption_key, encryption_key);
+            if (rc == 0)
+                rewrite = true;
+            else
+                enc = NULL;
+        }
+        if (rc == 0 && rewrite)
+        {
+            if (dl)
+                StringWhack(dl);
+            if (enc)
+                StringWhack(enc);
+        }
+    }
+    else /* insert new */
+    {
+        rc = KeyRingDataInsertProject (&data->projects, data->next_projectId, name, download_ticket, encryption_key);
+        if (rc == 0)
+            ++data->next_projectId;
+    }
+    return rc;
+}
+
+rc_t ProjectInit ( Project* self, uint32_t p_id, const String* name, const String* download_ticket, const String* encryption_key )
+{
+    rc_t rc = 0;
+    memset(self, 0, sizeof(Project)); 
+    self->id = p_id;
+    rc = StringCopy((const String**)&self->name, name);
+    if (rc == 0)
+    {
+        rc = StringCopy((const String**)&self->download_ticket, download_ticket);
+        if (rc == 0)
+        {
+            rc = StringCopy((const String**)&self->encryption_key, encryption_key);
+            if (rc != 0)
+                StringWhack(self->download_ticket);
+        }
+        else
+            StringWhack(self->name);
+    }
+    return rc;
+}
+
+void ProjectWhack ( BSTNode *n, void *data )
+{
+    Project* self = (Project*)n;
+    StringWhack(self->name);
+    StringWhack(self->download_ticket);
+    StringWhack(self->encryption_key);
+    free(self);
+}
+
+rc_t ObjectInit ( Object* self, 
+                  uint32_t p_id, 
+                  const String* p_name, 
+                  const String* p_project, 
+                  const String* p_display_name,
+                  uint64_t p_size,
+                  const String* p_checksum,
+                  const String* p_encryption_key)
+{
+    rc_t rc = 0;
+    memset(self, 0, sizeof(Project)); 
+    self->id = p_id;
+    rc = StringCopy((const String**)&self->name, p_name);
+    if (rc == 0)
+    {
+        rc = StringCopy((const String**)&self->project, p_project);
+        if (rc == 0)
+        {
+            rc = StringCopy((const String**)&self->display_name, p_display_name);
+            if (rc == 0)
+            {
+                self->size = p_size;
+                rc = StringCopy((const String**)&self->checksum, p_checksum);
+                if (rc == 0)
+                {
+                    rc = StringCopy((const String**)&self->encryption_key, p_encryption_key);
+                    if (rc != 0)
+                        StringWhack(self->checksum);
+                }
+                if (rc != 0)
+                    StringWhack(self->display_name);
+            }
+            if (rc != 0)
+                StringWhack(self->project);
+        }
+        if (rc != 0)
+            StringWhack(self->name);
+    }
+    return rc;
+}                         
+                         
+void ObjectWhack ( BSTNode *n, void *data )
+{
+    Object* self = (Object*)n;
+    StringWhack(self->name);
+    StringWhack(self->project);
+    StringWhack(self->display_name);
+    StringWhack(self->checksum);
+    StringWhack(self->encryption_key);
+    free(self);
+}
+
+static int64_t CC FindObject( const void *item, const BSTNode *n )
+{
+    return StringCompare((const String*)item, ((const Object*)n)->name);
+}
+static int64_t CC SortObjects( const BSTNode *item, const BSTNode *n )
+{
+    return StringCompare(((const Project*)item)->name, ((const Object*)n)->name);
+}
+
+rc_t KeyRingDataInsertObject(ObjectTable*  data, 
+                             uint32_t      p_id, 
+                             const String* name, 
+                             const String* project, 
+                             const String* display_name,
+                             uint64_t      size,
+                             const String* checksum,
+                             const String* encryption_key)
+{
+    rc_t rc = 0;
+    Object* obj = (Object*) malloc(sizeof(Object));
+    if (obj != NULL)
+    {
+        rc = ObjectInit(obj, p_id, name, project, display_name, size, checksum, encryption_key);
+        if (rc == 0)
+        {
+            rc = BSTreeInsert(data, &obj->dad, SortObjects);
+            if (rc != 0)
+                ProjectWhack(&obj->dad, NULL);
+        }
+        else
+            free(obj);
+    }
+    else
+        rc = RC ( rcApp, rcDatabase, rcUpdating, rcMemory, rcExhausted );
+    return rc;
+}                             
+
+
+rc_t KeyRingDataAddObject (KeyRingData*  data, 
+                           const String* name, 
+                           const String* project, 
+                           const String* display_name,
+                           uint64_t      size,
+                           const String* checksum,
+                           const String* encryption_key)
+{
+    rc_t rc = 0;
+    Object* obj;
+
+    obj = (Object*)BSTreeFind(&data->objects, name, FindObject);
+    if (obj != NULL)
+    {
+        bool rewrite = false;
+        String* proj = NULL;
+        String* disp = NULL;
+        String* csum = NULL;
+        String* encr = NULL;
+        if (StringCompare(obj->project, project) != 0)
+        {
+            proj = obj->project;
+            rc = StringCopy((const String**)&obj->project, project);
+            if (rc == 0)
+                rewrite = true;
+            else
+                proj = NULL;
+        }
+        if (StringCompare(obj->display_name, display_name) != 0)
+        {
+            disp = obj->display_name;
+            rc = StringCopy((const String**)&obj->display_name, display_name);
+            if (rc == 0)
+                rewrite = true;
+            else
+                disp = NULL;
+        }
+        if (size != obj->size)
+        {
+            obj->size = size;
+            rewrite = true;
+        }
+        if (StringCompare(obj->checksum, checksum) != 0)
+        {
+            csum = obj->checksum;
+            rc = StringCopy((const String**)&obj->checksum, checksum);
+            if (rc == 0)
+                rewrite = true;
+            else
+                csum = NULL;
+        }
+        if (StringCompare(obj->encryption_key, encryption_key) != 0)
+        {
+            encr = obj->encryption_key;
+            rc = StringCopy((const String**)&obj->encryption_key, encryption_key);
+            if (rc == 0)
+                rewrite = true;
+            else
+                encr = NULL;
+        }
+        if (rc == 0 && rewrite)
+        {
+            if (proj)
+                StringWhack(proj);
+            if (disp)
+                StringWhack(disp);
+            if (csum)
+                StringWhack(csum);
+            if (encr)
+                StringWhack(encr);
+        }
+    }
+    else /* insert new */
+    {
+        rc = KeyRingDataInsertObject(&data->objects, 
+                                     data->next_objectId, 
+                                     name, 
+                                     project, 
+                                     display_name,
+                                     size,
+                                     checksum,
+                                     encryption_key);
+        if (rc == 0)
+            ++data->next_objectId;
+    }
+    return rc;
+}                           
+                                  
+const Object* KeyRingDataGetObject (const KeyRingData*  data, const String* name)
+{
+    return (const Object*)BSTreeFind(&data->objects, name, FindObject);
+}
diff --git a/tools/keyring-srv/keyring-data.h b/tools/keyring-srv/keyring-data.h
new file mode 100644
index 0000000..6e58316
--- /dev/null
+++ b/tools/keyring-srv/keyring-data.h
@@ -0,0 +1,130 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_keyring_data_
+#define _h_keyring_data_
+
+#include <klib/defs.h>
+#include <klib/container.h>
+#include <klib/text.h>
+
+struct VDatabase;
+
+typedef struct Project Project;
+struct Project
+{
+    BSTNode dad;
+
+    uint32_t id;
+    String* name;
+    /*TODO: replace Strings with key-ids */
+    String* download_ticket;
+    String* encryption_key;
+};
+extern rc_t ProjectInit ( Project* self, 
+                          uint32_t p_id, 
+                          const String* p_name, 
+                          const String* p_download_ticket, 
+                          const String* p_encyption_key );
+extern void ProjectWhack ( BSTNode *n, void *data );
+
+typedef struct Object Object;
+struct Object
+{
+    BSTNode dad;
+
+    uint32_t id;
+    String* name;
+    String* project;
+    String* display_name; 
+    uint64_t size; 
+    String* checksum;
+    /*TODO: replace String with key-id */
+    String* encryption_key;
+};
+extern rc_t ObjectInit ( Object*        self, 
+                         uint32_t       id, 
+                         const String*  name, 
+                         const String*  project, 
+                         const String*  display_name,
+                         uint64_t       size,
+                         const String*  checksum,
+                         const String*  encryption_key);
+extern void ObjectWhack ( BSTNode *n, void *data );
+
+typedef BSTree ProjectTable;
+typedef BSTree ObjectTable;
+
+typedef struct KeyRingData KeyRingData;
+struct KeyRingData
+{
+    ProjectTable projects;
+    ObjectTable objects;
+    
+    uint32_t next_projectId;
+    uint32_t next_objectId;
+};
+
+extern rc_t KeyRingDataInit ( KeyRingData* self );
+extern void KeyRingDataWhack ( KeyRingData* self ); /* does not call free(self) */
+
+/* make sure does not exist, assign an id*/
+extern rc_t KeyRingDataAddProject (KeyRingData*  data, 
+                                   const String* name, 
+                                   const String* download_ticket, 
+                                   const String* encryption_key);
+
+/* known to be new, id assigned*/
+extern rc_t KeyRingDataInsertProject (ProjectTable*  data, 
+                                      uint32_t      p_id, 
+                                      const String* name, 
+                                      const String* download_ticket, 
+                                      const String* encryption_key);
+
+extern const Project* KeyRingDataGetProject (const KeyRingData* data, const String* name);
+
+/* make sure does not exist, assign an id*/
+extern rc_t KeyRingDataAddObject (KeyRingData*  data, 
+                                  const String* name, 
+                                  const String* project, 
+                                  const String* display_name,
+                                  uint64_t      size,
+                                  const String* checksum,
+                                  const String* encryption_key);
+/* known to be new, id assigned*/
+extern rc_t KeyRingDataInsertObject(ObjectTable*  data, 
+                                    uint32_t      p_id, 
+                                    const String* name, 
+                                    const String* project, 
+                                    const String* display_name,
+                                    uint64_t      size,
+                                    const String* checksum,
+                                    const String* encryption_key);
+                                  
+extern const Object* KeyRingDataGetObject (const KeyRingData*  data, const String* name);
+
+
+#endif /* _h_keyring_data_ */
diff --git a/tools/keyring-srv/keyring-database.c b/tools/keyring-srv/keyring-database.c
new file mode 100644
index 0000000..0816a7d
--- /dev/null
+++ b/tools/keyring-srv/keyring-database.c
@@ -0,0 +1,441 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ * 
+ */
+
+#include "keyring-database.h"
+
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/cursor.h>
+
+#include "keyring-data.h"
+
+static const char schema_text[] =
+"version 1; "
+
+" table projects : MyProjects #1 { "
+"     extern column U32 id = .id;"
+"     physical column U32 .id = id;"
+
+"     extern    column ascii name = .name;"
+"     physical  column ascii .name = name;"
+
+"     extern    column ascii download_ticket = .download_ticket;"
+"     physical  column ascii .download_ticket = download_ticket;"
+
+"     extern    column ascii encryption_key = .encryption_key;"
+"     physical  column ascii .encryption_key = encryption_key;"
+" };"
+
+" table objects : MyObjects #1 { "
+"     extern    column U32 id = .id;"
+"     physical  column U32 .id = id;"
+
+"     extern    column ascii name = .name;"
+"     physical  column ascii .name = name;"
+
+"     extern    column ascii project = .project;"
+"     physical  column ascii .project = project;"
+
+"     extern    column ascii display_name = .display_name;"
+"     physical  column ascii .display_name = display_name;"
+
+"     extern    column U64   size = .size;"
+"     physical  column U64   .size = size;"
+
+"     extern    column ascii checksum = .checksum;"
+"     physical  column ascii .checksum = checksum;"
+
+"     extern    column ascii encryption_key = .encryption_key;"
+"     physical  column ascii .encryption_key = encryption_key;"
+" };"
+
+" table keys : MyKeys #1 { "
+"     physical column U32   .id;"
+"     physical column ascii .value;"
+" };"
+"database keyring : KEYRING #1 { "
+"    table objects: MyObjects   #1 object_inst;"
+"    table projects: MyProjects #1 project_inst;"
+"    table keys : MyKeys        #1 keys_inst;"
+"};";
+
+static rc_t SaveProjects( const ProjectTable* data, VDatabase* db );
+static rc_t SaveObjects ( const ObjectTable* data,  VDatabase* db );
+static rc_t LoadProjects( ProjectTable* data, const VDatabase* db );
+static rc_t LoadObjects ( ObjectTable* data,  const VDatabase* db );
+
+rc_t KeyRingDatabaseSave ( struct KeyRingData* self, struct KDirectory* wd, const char* path )
+{
+    rc_t rc;
+    VDBManager* vdbMgr;
+    rc = VDBManagerMakeUpdate( &vdbMgr, wd );
+    if (rc == 0)
+    {
+        VSchema* schema;
+        rc = VDBManagerMakeSchema(vdbMgr, &schema);
+        if (rc == 0)
+        {
+            rc = VSchemaParseText ( schema, "keyring_schema", schema_text, string_measure(schema_text, NULL) );
+            if (rc == 0)
+            {   /* create a database */
+                VDatabase* db;
+                rc = VDBManagerCreateDB(vdbMgr, & db, schema, "keyring:KEYRING", kcmCreate | kcmMD5, path);
+                if (rc == 0)
+                {   
+                    rc_t rc2;
+                    rc = SaveProjects(&self->projects, db);
+                    if (rc == 0)
+                        rc = SaveObjects(&self->objects, db);
+                    /*TODO: SaveKeys */
+                    rc2 = VDatabaseRelease(db);
+                    if (rc == 0)
+                        rc = rc2;
+                }
+
+            }
+            VSchemaRelease(schema);
+        }
+        VDBManagerRelease(vdbMgr);
+    }
+
+    return rc;
+}
+
+rc_t KeyRingDatabaseLoad ( struct KeyRingData* self, const struct KDirectory* dir, const char* path )
+{
+    VDBManager* innerMgr;
+    rc_t rc = VDBManagerMakeUpdate( &innerMgr, (KDirectory*)dir );
+    if (rc == 0)
+    {
+        rc_t rc2;
+        const VDatabase* db;
+        rc = VDBManagerOpenDBRead(innerMgr, & db, NULL, "%s", path);
+        if (rc == 0)
+        {
+            rc = LoadProjects(&self->projects, db);
+            if (rc == 0)
+                rc = LoadObjects(&self->objects, db);
+            /*TODO: LoadKeys */
+            rc2 = VDatabaseRelease(db);
+            if (rc == 0)
+                rc = rc2;
+        }
+        rc2 = VDBManagerRelease(innerMgr);
+        if (rc == 0)
+            rc = rc2;
+    }
+
+    return rc;
+}
+
+static 
+rc_t SaveProjects( const ProjectTable* data, VDatabase* db )
+{
+    VTable* tbl;
+    rc_t rc = VDatabaseCreateTable(db, &tbl, "project_inst", kcmCreate | kcmMD5, "PROJECTS");
+    if (rc == 0)
+    {
+        rc_t rc2;
+        VCursor *cur;
+        rc = VTableCreateCursorWrite( tbl, &cur, kcmInsert );
+        if (rc == 0)
+        {
+            uint32_t id_idx, name_idx, dl_idx, enc_idx;
+            rc = VCursorAddColumn( cur, &id_idx, "id" );
+            rc = VCursorAddColumn( cur, &name_idx, "name" );
+            rc = VCursorAddColumn( cur, &dl_idx, "download_ticket" );
+            rc = VCursorAddColumn( cur, &enc_idx, "encryption_key" );
+            if (rc == 0)
+            {
+                rc = VCursorOpen( cur );
+                if (rc == 0)
+                {
+                    const Project* p = (const Project*)BSTreeFirst(data);
+                    while (rc == 0 && p != NULL)
+                    {
+                        rc = VCursorOpenRow( cur );
+                        
+                        if (rc == 0) rc = VCursorWrite( cur, id_idx,    sizeof(p->id) * 8,                      &p->id,                     0, 1);
+                        if (rc == 0) rc = VCursorWrite( cur, name_idx,  StringLength(p->name) * 8,              p->name->addr,              0, 1);
+                        if (rc == 0) rc = VCursorWrite( cur, dl_idx,    StringLength(p->download_ticket) * 8,   p->download_ticket->addr,   0, 1);
+                        if (rc == 0) rc = VCursorWrite( cur, enc_idx,   StringLength(p->encryption_key) * 8,    p->encryption_key->addr,    0, 1);
+                        
+                        if (rc == 0) rc = VCursorCommitRow( cur );
+                        if (rc == 0) rc = VCursorCloseRow( cur );
+                        
+                        p = (const Project*)BSTNodeNext(&p->dad);
+                    }
+                    if (rc == 0)
+                        rc = VCursorCommit( cur );
+                }
+            }
+            rc2 = VCursorRelease(cur);
+            if (rc == 0)
+                rc = rc2;
+        }
+        
+        rc2 = VTableRelease(tbl);
+        if (rc == 0)
+            rc = rc2;
+    }
+    return rc;
+}
+
+static 
+rc_t SaveObjects ( const ObjectTable* data,  VDatabase* db )
+{
+    VTable* tbl;
+    rc_t rc = VDatabaseCreateTable(db, &tbl, "object_inst", kcmCreate | kcmMD5, "OBJECTS");
+    if (rc == 0)
+    {
+        rc_t rc2;
+        VCursor *cur;
+        rc = VTableCreateCursorWrite( tbl, &cur, kcmInsert );
+        if (rc == 0)
+        {
+            uint32_t id_idx, name_idx, proj_idx, dname_idx, size_idx, csum_idx, enc_idx;
+            if (rc == 0) rc = VCursorAddColumn( cur, &id_idx,    "id" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &name_idx,  "name" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &proj_idx,    "project" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &dname_idx, "display_name" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &size_idx,  "size" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &csum_idx,  "checksum" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &enc_idx,   "encryption_key" );
+
+            if (rc == 0)
+            {
+                rc = VCursorOpen( cur );
+                if (rc == 0)
+                {
+                    const Object* obj = (const Object*)BSTreeFirst(data);
+                    while (rc == 0 && obj != NULL)
+                    {
+                        rc = VCursorOpenRow( cur );
+                        
+                        if (rc == 0) rc = VCursorWrite( cur, id_idx,    sizeof(obj->id) * 8,                   &obj->id,                  0, 1);
+                        if (rc == 0) rc = VCursorWrite( cur, name_idx,  StringLength(obj->name) * 8,           obj->name->addr,           0, 1);
+                        if (rc == 0) rc = VCursorWrite( cur, proj_idx,  StringLength(obj->project) * 8,        obj->project->addr,        0, 1);
+                        if (rc == 0) rc = VCursorWrite( cur, dname_idx, StringLength(obj->display_name) * 8,   obj->display_name->addr,   0, 1);
+                        if (rc == 0) rc = VCursorWrite( cur, size_idx,  sizeof(obj->size) * 8,                 &obj->size,                0, 1);
+                        if (rc == 0) rc = VCursorWrite( cur, csum_idx,  StringLength(obj->encryption_key) * 8, obj->encryption_key->addr, 0, 1);
+                        if (rc == 0) rc = VCursorWrite( cur, enc_idx,   StringLength(obj->encryption_key) * 8, obj->encryption_key->addr, 0, 1);
+                        
+                        if (rc == 0) rc = VCursorCommitRow( cur );
+                        if (rc == 0) rc = VCursorCloseRow( cur );
+                        
+                        obj = (const Object*)BSTNodeNext(&obj->dad);
+                    }
+                    if (rc == 0) rc = VCursorCommit( cur );
+                }
+            }
+            rc2 = VCursorRelease(cur);
+            if (rc == 0)
+                rc = rc2;
+        }
+        
+        rc2 = VTableRelease(tbl);
+        if (rc == 0)
+            rc = rc2;
+    }
+    return rc;
+}
+
+static size_t CursorCacheSize = 32*1024;
+
+static
+bool HasData(const VTable* tbl)
+{
+    bool ret = false;
+    KNamelist *names;
+    if (VTableListCol(tbl, &names) == 0) 
+    {
+        uint32_t n;
+        ret = KNamelistCount( names, &n ) == 0 && n > 0;
+    }
+    KNamelistRelease( names );
+    return ret;
+}
+
+static 
+rc_t LoadProjects( ProjectTable* data, const VDatabase* db )
+{
+    const VTable* tbl;
+    rc_t rc = VDatabaseOpenTableRead(db, &tbl, "PROJECTS");
+    if (rc == 0)
+    {
+        rc_t rc2;
+        const VCursor *cur;
+
+        rc = VTableCreateCachedCursorRead( tbl, &cur, CursorCacheSize );
+        if (rc == 0)
+        {
+            uint32_t id_idx, name_idx, dl_idx, enc_idx;
+            rc = VCursorAddColumn( cur, &id_idx,    "id" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &name_idx,  "name" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &dl_idx,    "download_ticket" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &enc_idx,   "encryption_key" );
+            if (rc == 0 && HasData(tbl))
+            {
+                rc = VCursorOpen( cur );
+                if (rc == 0)
+                {
+                    int64_t  first;
+                    uint64_t count;
+                    rc = VCursorIdRange( cur, 0, &first, &count );
+                    if (rc == 0)
+                    {
+                        uint64_t i;
+                        for (i=0; i < count; ++i)
+                        {
+                            const void* ptr;
+                            uint32_t elem_count;
+                            uint32_t id;
+                            String name;
+                            String download_ticket;
+                            String encryption_key;
+
+                            rc = VCursorSetRowId(cur, first + i);
+                            if (rc == 0) rc = VCursorOpenRow( cur );
+                            
+                            if (rc == 0) rc = VCursorCellData( cur, id_idx, NULL, &ptr, NULL, NULL);
+                            if (rc == 0) id = *(uint32_t*)ptr;
+                            if (rc == 0) rc = VCursorCellData( cur, name_idx, NULL, &ptr, NULL, &elem_count);
+                            if (rc == 0) StringInit(&name, (const char*)ptr, elem_count, elem_count);
+                            if (rc == 0) rc = VCursorCellData( cur, dl_idx, NULL, &ptr, NULL, &elem_count);
+                            if (rc == 0) StringInit(&download_ticket, (const char*)ptr, elem_count, elem_count);
+                            if (rc == 0) rc = VCursorCellData( cur, enc_idx, NULL, &ptr, NULL, &elem_count);
+                            if (rc == 0) StringInit(&encryption_key, (const char*)ptr, elem_count, elem_count);
+                            
+                            if (rc == 0) rc = KeyRingDataInsertProject(data, id, &name, &download_ticket, &encryption_key);
+                            if (rc == 0) rc = VCursorCloseRow( cur );
+                            if (rc != 0) 
+                                break;
+                        }
+                    }
+                }
+            }
+            rc2 = VCursorRelease(cur);
+            if (rc == 0)
+                rc = rc2;
+        }
+        
+        rc2 = VTableRelease(tbl);
+        if (rc == 0)
+            rc = rc2;
+    }
+    return rc;
+}
+
+static 
+rc_t LoadObjects ( ObjectTable* data,  const VDatabase* db )
+{
+    const VTable* tbl;
+    rc_t rc = VDatabaseOpenTableRead(db, &tbl, "OBJECTS");
+    if (rc == 0)
+    {
+        rc_t rc2;
+        const VCursor *cur;
+
+        rc = VTableCreateCachedCursorRead( tbl, &cur, CursorCacheSize );
+        if (rc == 0)
+        {
+            uint32_t id_idx, name_idx, proj_idx, dname_idx, size_idx, csum_idx, enc_idx;
+            if (rc == 0) rc = VCursorAddColumn( cur, &id_idx,    "id" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &name_idx,  "name" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &proj_idx,    "project" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &dname_idx, "display_name" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &size_idx,  "size" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &csum_idx,  "checksum" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &enc_idx,   "encryption_key" );
+            if (rc == 0 && HasData(tbl))
+            {
+                rc = VCursorOpen( cur );
+                if (rc == 0)
+                {
+                    int64_t  first;
+                    uint64_t count;
+                    rc = VCursorIdRange( cur, 0, &first, &count );
+                    if (rc == 0)
+                    {
+                        uint64_t i;
+                        for (i=0; i < count; ++i)
+                        {
+                            const void* ptr;
+                            uint32_t elem_count;
+                            uint32_t id;
+                            String name;
+                            String project;
+                            String display_name;
+                            uint64_t size;
+                            String checksum;
+                            String encryption_key;
+
+                            rc = VCursorSetRowId(cur, first + i);
+                            if (rc == 0) rc = VCursorOpenRow( cur );
+                            
+                            if (rc == 0) rc = VCursorCellData( cur, id_idx, NULL, &ptr, NULL, NULL);
+                            if (rc == 0) id = *(uint32_t*)ptr;
+                            
+                            if (rc == 0) rc = VCursorCellData( cur, name_idx, NULL, &ptr, NULL, &elem_count);
+                            if (rc == 0) StringInit(&name, (const char*)ptr, elem_count, elem_count);
+                            
+                            if (rc == 0) rc = VCursorCellData( cur, proj_idx, NULL, &ptr, NULL, &elem_count);
+                            if (rc == 0) StringInit(&project, (const char*)ptr, elem_count, elem_count);
+                            
+                            if (rc == 0) rc = VCursorCellData( cur, dname_idx, NULL, &ptr, NULL, &elem_count);
+                            if (rc == 0) StringInit(&display_name, (const char*)ptr, elem_count, elem_count);
+                            
+                            if (rc == 0) rc = VCursorCellData( cur, size_idx, NULL, &ptr, NULL, NULL);
+                            if (rc == 0) size = *(uint32_t*)ptr;
+                            
+                            if (rc == 0) rc = VCursorCellData( cur, enc_idx, NULL, &ptr, NULL, &elem_count);
+                            if (rc == 0) StringInit(&encryption_key, (const char*)ptr, elem_count, elem_count);
+                            
+                            if (rc == 0) rc = VCursorCellData( cur, csum_idx, NULL, &ptr, NULL, &elem_count);
+                            if (rc == 0) StringInit(&checksum, (const char*)ptr, elem_count, elem_count);
+
+                            if (rc == 0) rc = KeyRingDataInsertObject(data, id, &name, &project, &display_name, size, &checksum, &encryption_key);
+                            if (rc == 0) rc = VCursorCloseRow( cur );
+                            if (rc != 0)
+                                break;
+                        }
+                    }
+                }
+            }
+            rc2 = VCursorRelease(cur);
+            if (rc == 0)
+                rc = rc2;
+        }
+        
+        rc2 = VTableRelease(tbl);
+        if (rc == 0)
+            rc = rc2;
+    }
+    return rc;
+}
+
diff --git a/tools/keyring-srv/keyring-database.h b/tools/keyring-srv/keyring-database.h
new file mode 100644
index 0000000..3af12ab
--- /dev/null
+++ b/tools/keyring-srv/keyring-database.h
@@ -0,0 +1,45 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_keyring_database_
+#define _h_keyring_database_
+
+#include <klib/rc.h>
+
+struct KDirectory;
+struct KeyRingData;
+
+/*
+ * Save into a (non-archived) directory
+ */
+extern rc_t KeyRingDatabaseSave ( struct KeyRingData* self, struct KDirectory* dir, const char* path );
+
+/*
+ * Load from a directory (possibly archived/encrypted)
+*/
+extern rc_t KeyRingDatabaseLoad ( struct KeyRingData* self, const struct KDirectory* dir, const char* path);
+
+#endif /* _h_keyring_database_ */
diff --git a/tools/keyring-srv/keyring-srv-main.c b/tools/keyring-srv/keyring-srv-main.c
new file mode 100644
index 0000000..d005ecb
--- /dev/null
+++ b/tools/keyring-srv/keyring-srv-main.c
@@ -0,0 +1,333 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ * 
+ */
+ 
+/* KeyRing Server process
+ *  - install an IPC socket listener (name = "vdb-keyring")
+ *  - listen for incoming IPC connections
+ *  - handle IPC requests
+ *      Request format: 
+ *          <uint16_t length><body> 
+ *      Request body:
+ *          - "I" - init
+ *          - "X" - shutDown
+ *          - "PA<uint8 length>name<uint8 length>dl_ticket<uint8 length>enc_key" - add project
+ *      Response format:
+ *          <uint8_t length><body>
+ *      Response body:
+ *          - "IY" init successful
+ *          - "IN" init failed (bad password?)
+ */
+
+#include "keyring-srv.h"
+
+#include <klib/text.h>
+#include <klib/log.h>
+#include <klib/printf.h>
+
+#include <kproc/thread.h>
+
+#include <kns/manager.h>
+#include <kns/socket.h>
+#include <kns/endpoint.h>
+#include <kns/stream.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/lockfile.h>
+
+#include <vfs/keyring-priv.h>
+
+#include <kapp/args.h>
+
+#ifndef MAX_PATH
+#define MAX_PATH 4096
+#endif
+
+static rc_t WorkerThreadFn ( const KThread *self, void *data );
+
+static bool shutDown = false;
+
+/*TODO: add pid to log messages? */
+static const char* initMsgSuccess = "\x02IY";
+static const char* initMsgFailure = "\x02IN";
+
+char keyRingFileName[MAX_PATH];
+KKeyRing* keyring = NULL;
+
+static 
+rc_t 
+Server( KNSManager* mgr )  
+{   
+    rc_t rc = 0;
+    KEndPoint ep;
+    String name; 
+
+    CONST_STRING(&name, KEYRING_IPC_NAME);
+    rc = KNSManagerInitIPCEndpoint(mgr, &ep, &name);
+    if (rc == 0)
+    {
+        KSocket* listener;
+        rc = KNSMakeListener ( &listener, &ep );
+        if (rc == 0)
+        {
+            shutDown = false;
+            while (!shutDown && rc == 0)
+            {
+                KStream* stream;
+                LogMsg ( klogInfo, "KeyringServer: listening");
+                rc = KNSListen ( listener, &stream ); /* may not return from here if no more incoming connections arrive */
+                if (rc == 0)
+                {
+                    KThread* worker;
+                    LogMsg ( klogInfo, "KeyringServer: detected connection");
+                    rc = KThreadMake ( &worker, WorkerThreadFn, stream);
+                    if (rc == 0 && worker != NULL)
+                    {
+                        KThreadWait(worker, NULL);
+                        LogMsg ( klogInfo, "KeyringServer: out of worker");
+                    }
+                    else
+                        LogErr(klogErr, rc, "KeyringServer: KThreadMake failed");
+                }
+                else
+                    LogErr(klogErr, rc, "KeyringServer: KNSListen failed");
+            }
+            LogMsg ( klogInfo, "KeyringServer: shutting down");
+            
+            /* TODO: make sure no incoming messages get dropped (stop accepting connections? wait for all active threads to exit?) 
+                - lock the server */
+                
+            if (keyring != NULL)
+            {
+                KeyRingRelease(keyring);
+                keyring = NULL;
+            }
+                
+            KSocketRelease(listener);
+        }
+        else
+            LogErr(klogErr, rc, "KeyringServer: KNSMakeListener failed");
+    }
+    else
+        LogErr(klogErr, rc, "KeyringServer: KNSManagerInitIPCEndpoint failed");
+    LogMsg ( klogInfo, "KeyringServer: listener shut down");
+    return rc;
+}
+    
+static 
+rc_t 
+WorkerThreadFn ( const KThread *self, void *data )  
+{
+    KStream* stream = (KStream*)data;
+    char buf[256];
+    size_t num;
+    rc_t rc = KStreamReadAll(stream, buf, 1, &num);
+    if (rc == 0)
+    {
+        if (num == 1) 
+        {
+            size_t toRead = (unsigned char)buf[0];
+            pLogMsg(klogInfo, "KeyringServer: worker received length=$(l)\n", "l=%d", toRead);
+            rc = KStreamReadAll(stream, buf, toRead, &num);
+            if (rc == 0)
+            {
+                /*pLogMsg(klogInfo, "KeyringServer: worker received msg='$(buf)'\n", "buf=%.*s", num, buf);*/
+                switch (buf[0])
+                {
+                case 'I':
+                    if (buf[0] == 'I') /* init */
+                    {
+                        LogMsg ( klogInfo, "KeyringServer: received Init");
+
+                        if (keyring == 0)
+                        {
+                            const KFile* std_in;
+                            
+                            rc = KFileMakeStdIn ( &std_in );
+                            if (rc == 0)
+                            {
+                                KFile* std_out;
+                                rc = KFileMakeStdOut ( &std_out );
+                                if (rc == 0)
+                                {
+                                    rc = KeyRingOpen(&keyring, keyRingFileName, std_in, std_out);
+                                    if (rc == 0)
+                                    {
+                                        LogMsg ( klogInfo, "KeyringServer: Init successful");
+                                        pLogMsg(klogInfo, "KeyringServer: sending '$(buf)'\n", "buf=%.*s", string_size(initMsgSuccess), initMsgSuccess);
+                                        rc = KStreamWrite(stream, initMsgSuccess, string_size(initMsgSuccess), NULL);
+                                    }
+                                    else
+                                    {
+                                        rc_t rc2;
+                                        LogErr(klogErr, rc, "KeyringServer: Init failed");
+                                        rc2 = KStreamWrite(stream, initMsgFailure, string_size(initMsgFailure), NULL);
+                                        if (rc == 0)
+                                            rc = rc2;
+                                    }
+                                    KFileRelease(std_out);
+                                }
+                                KFileRelease(std_in);
+                            }
+                        }
+                        else
+                        {   /* already running */
+                            LogMsg ( klogInfo, "KeyringServer: Init successful");
+                            rc = KStreamWrite(stream, initMsgSuccess, string_size(initMsgSuccess), NULL);
+                        }
+                    }
+                    break;
+                case 'X':
+                    if (buf[0] == 'X') /* shutDown */
+                    {
+                        LogMsg ( klogInfo, "KeyringServer: received Shutdown");
+                        shutDown = true;
+                    }
+                    break;
+                case 'P': /* project */
+                    if (toRead > 1 && buf[1] == 'A') /* Add */
+                    {
+                        String pkey;
+                        String dlkey;
+                        String enckey;
+
+                        size_t idx = 2;
+                        /*TODO: make sure idx is in range*/
+                        StringInit(&pkey, buf + idx + 1, buf[idx], buf[idx]);
+                        pkey.len = string_len(pkey.addr, pkey.size);
+
+                        idx += pkey.size + 1;
+                        /*TODO: make sure idx is in range*/
+                        StringInit(&dlkey, buf + idx + 1, buf[idx], buf[idx]);
+                        dlkey.len = string_len(dlkey.addr, dlkey.size);
+                        
+                        idx += dlkey.size + 1;
+                        /*TODO: make sure idx is in range*/
+                        StringInit(&enckey, buf + idx + 1, buf[idx], buf[idx]);
+                        enckey.len = string_len(enckey.addr, enckey.size);
+                        
+                        pLogMsg(klogInfo,  
+                                "KeyringServer: received Project Add(pkey='$(pkey)',dlkey='$(dlkey)',enckey='$(.....)')'\n",
+                                "pkey=%.*s,dlkey=%.*s,enckey=%.*s", 
+                                pkey.len, pkey.addr, dlkey.len, dlkey.addr, enckey.len, enckey.addr);
+                        
+                        rc = KeyRingAddProject(keyring, &pkey, &dlkey, &enckey);
+                        if (rc != 0)
+                            LogErr(klogErr, rc, "KeyringServer: KeyRingAddProject() failed");
+                    }
+                    break;
+                default:
+                    LogMsg ( klogInfo, "KeyringServer: unrecognised message received");
+                    break;
+                }
+            }
+            else
+                LogErr(klogErr, rc, "KeyringServer: KStreamRead(body) failed");
+        }
+        else /* end of stream = the client closed the connection */
+            LogMsg(klogInfo, "KeyringServer: worker received EOF\n");
+    }
+    else
+        LogErr(klogErr, rc, "KeyringServer: KStreamRead(length) failed");
+    LogMsg ( klogInfo, "KeyringServer: worker done");
+    return KThreadRelease(self);
+}
+
+
+rc_t UsageSummary (char const * progname)
+{
+    return 0;
+}
+
+char const UsageDefaultName[] = "keyring-srv";
+
+rc_t CC Usage (const Args * args)
+{
+    return 0;
+}
+
+/*TODO: handle signals */
+/*TODO: handle stale lock files */
+
+rc_t CC KMain (int argc, char * argv[])
+{
+    rc_t rc = 0;
+    KDirectory* wd;
+    
+    KLogLevelSet(klogInfo);
+    LogMsg ( klogInfo, "KeyringServer: starting");
+
+    rc = KDirectoryNativeDir (&wd);
+    if (rc == 0)
+    {
+        KFile* lockedFile;
+        const char* dataDir;
+        
+        char lockFileName[MAX_PATH];
+        if (argc < 2 || argv[1] == NULL)
+            dataDir = KeyRingDefaultDataDir;
+        else
+            dataDir = argv[1];
+        rc = string_printf(lockFileName, sizeof(lockFileName)-1, NULL, "%s/keyring_lock", dataDir);
+        if (rc == 0)
+        {
+            rc = KDirectoryCreateExclusiveAccessFile(wd, &lockedFile, true, 0600, kcmOpen, "%s", lockFileName);
+            if (rc == 0)
+            {
+                KNSManager* mgr;
+                rc = KNSManagerMake(&mgr);
+                if (rc == 0)
+                {
+                    rc = string_printf(keyRingFileName, sizeof(keyRingFileName)-1, NULL, "%s/keyring", dataDir);
+                    if (rc == 0)
+                        rc = Server(mgr);
+                    KNSManagerRelease(mgr);
+                }
+                else
+                    LogErr(klogErr, rc, "KeyringServer: KNSManagerMake failed");
+                KFileRelease(lockedFile); 
+                LogMsg ( klogInfo, "KeyringServer: removing lock file.");
+                KDirectoryRemove(wd, true, "%s", lockFileName);
+            }
+            else
+            {   /*TODO: check for stale lock file*/
+                LogMsg ( klogInfo, "KeyringServer: another instance appears to be running.");
+                rc = 0;
+            }
+        }
+        else
+            LogErr ( klogErr, rc, "KeyringServer: failed to build the lock file name" );
+        
+        KDirectoryRelease(wd);
+    }
+    else
+        LogErr(klogErr, rc, "KeyringServer: KDirectoryNativeDir failed");
+    
+    LogMsg ( klogInfo, "KeyringServer: finishing");
+    
+    return rc;
+}
+
diff --git a/tools/keyring-srv/keyring-srv.c b/tools/keyring-srv/keyring-srv.c
new file mode 100644
index 0000000..d899d43
--- /dev/null
+++ b/tools/keyring-srv/keyring-srv.c
@@ -0,0 +1,522 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ * 
+ */
+
+#include "keyring-srv.h"
+
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include <klib/text.h>
+#include <klib/log.h>
+
+#include <kfs/file.h>
+#include <kfs/toc.h>
+#include <kfs/arc.h>
+#include <kfs/tar.h>
+#include <kfs/impl.h>
+
+#include <krypto/key.h>
+#include <krypto/encfile.h>
+
+#include "keyring-data.h"
+#include "keyring-database.h"
+
+static rc_t KeyRingInit     ( KKeyRing* self, const char* path );
+static rc_t KeyRingWhack    ( KKeyRing* self );
+static rc_t CreateDatabase  ( KKeyRing* self );
+static rc_t OpenDatabase    ( KKeyRing* self );
+
+#define MaxPwdSize 512
+
+struct KKeyRing {
+    KRefcount refcount;
+    
+    KDirectory* wd; 
+    char* path;
+    char passwd[MaxPwdSize];
+    
+    KeyRingData* data;
+};
+
+/* location of the temporary database (pre archiving+encryption */
+const char tmp_path[] = "keyring.temp";
+
+/* returns a NUL-terminated password fitting in the buffer */
+static
+rc_t
+ReadPassword(const struct KFile* pwd_in, size_t* last_pos, char* buf, size_t buf_size)
+{
+string_copy(buf, buf_size, "screwuahole", string_size("screwuahole")); return 0;
+
+    rc_t rc = 0;
+    size_t i =0;
+    do
+    {
+        size_t num_read;
+        if (i == buf_size)
+            return RC(rcApp, rcEncryptionKey, rcReading, rcParam, rcTooLong);
+            
+        rc = KFileRead( pwd_in, *last_pos, & buf[i], 1, &num_read );
+        if (rc == 0)
+        {
+            if (num_read != 1)
+                return RC(rcApp, rcEncryptionKey, rcReading, rcSize, rcInvalid);
+
+            if (buf[i] == '\n')
+            {
+                buf[i] = 0;
+                ++ *last_pos;
+                break;
+            }
+        }
+        ++ *last_pos;
+        ++ i;
+    }
+    while(rc == 0);
+    return rc;
+}
+
+static
+rc_t GetNewPassword(const struct KFile* pwd_in, struct KFile* pwd_out, char* buf)
+{
+    rc_t rc = KFileWrite ( pwd_out, 0, KR_PWD_PROMPT_1, string_measure(KR_PWD_PROMPT_1, NULL), NULL);
+    if (rc == 0)
+    {
+        char buf1[MaxPwdSize];
+        size_t last_pos = 0;
+        rc = ReadPassword(pwd_in, & last_pos, buf1, MaxPwdSize);
+        if (rc == 0)
+        {
+            rc = KFileWrite ( pwd_out, 
+                              string_measure(KR_PWD_PROMPT_1, NULL), 
+                              KR_PWD_PROMPT_2, string_measure(KR_PWD_PROMPT_2, NULL), NULL );
+            if (rc == 0)
+            {
+                char buf2[MaxPwdSize];
+                rc = ReadPassword(pwd_in, & last_pos, buf2, sizeof(buf2));
+                if (rc == 0)
+                {
+                    size_t pwd_size = string_measure(buf1, NULL);
+                    if (string_cmp(buf1, pwd_size, buf2, string_measure(buf2, NULL), MaxPwdSize) != 0)
+                        rc = RC(rcApp, rcEncryptionKey, rcCreating, rcParam, rcInconsistent);
+                    else
+                        string_copy(buf, MaxPwdSize, buf1, pwd_size + 1);
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+static
+rc_t GetPassword(const struct KFile* pwd_in, struct KFile* pwd_out, char* buf)
+{
+    rc_t rc = KFileWrite ( pwd_out, 0, KR_PWD_PROMPT_1, string_measure(KR_PWD_PROMPT_1, NULL), NULL);
+    if (rc == 0)
+    {
+        char buf1[MaxPwdSize];
+        size_t last_pos = 0;
+        rc = ReadPassword(pwd_in, & last_pos, buf1, MaxPwdSize);
+        if (rc == 0)
+            string_copy(buf, MaxPwdSize, buf1, string_measure(buf1, NULL) + 1);
+    }
+    return rc;
+}
+
+rc_t KeyRingOpen(KKeyRing** self, const char* path, const struct KFile* pwd_in, struct KFile* pwd_out)
+{
+    rc_t rc; 
+    assert(self && path && pwd_in && pwd_out);
+
+    *self = (KKeyRing*) malloc(sizeof(**self));
+    if (*self)
+    { 
+        rc = KeyRingInit(*self, path);
+        if (rc == 0)
+        {
+            rc = KeyRingAddRef(*self);
+            if (rc == 0)
+            {
+                KDirectory* wd; 
+                rc = KDirectoryNativeDir(&wd);
+                if (rc == 0)
+                {   /* open the database */
+                    if (KDirectoryPathType(wd, "%s", (*self)->path) == kptFile)
+                        rc = GetPassword(pwd_in, pwd_out, (*self)->passwd);
+                    else /* does not exist; create first */
+                    {   
+                        rc = GetNewPassword(pwd_in, pwd_out, (*self)->passwd);
+                        if (rc == 0)
+                            rc = CreateDatabase(*self);
+                    }
+                    if (rc == 0)
+                        rc = OpenDatabase(*self);
+                        
+                    {
+                        rc_t rc2;
+                        rc2 = KDirectoryRelease(wd);
+                        if (rc == 0)
+                            rc = rc2;
+                    }
+                }
+            }
+            
+            if (rc != 0)
+            {
+                KeyRingWhack(*self);
+                *self = NULL;
+            }
+        }
+        else
+        {
+            free(*self);
+            *self = NULL;
+        }
+    }
+    else
+        rc = RC ( rcApp, rcDatabase, rcOpening, rcMemory, rcExhausted );
+
+    return rc;
+}
+
+rc_t KeyRingInit ( KKeyRing* self, const char* path )
+{
+    rc_t rc;
+    
+    memset ( self, 0, sizeof * self );
+    KRefcountInit ( & self -> refcount, 0, "KKeyRing", "init", "" );
+    
+    rc = KDirectoryNativeDir(&self->wd);
+    if (rc == 0)
+    {
+        self->path = string_dup(path, string_size(path));
+        if (self->path)
+        {
+            self->data = (KeyRingData*) malloc(sizeof(*self->data));
+            if (self->data)
+            {
+                rc = KeyRingDataInit ( self->data );
+                if (rc != 0)
+                    free(self->data);
+            }
+            else
+                rc = RC ( rcApp, rcDatabase, rcOpening, rcMemory, rcExhausted );
+                
+            if (rc != 0)
+                free(self->path);
+        }
+        else
+            rc = RC ( rcApp, rcDatabase, rcOpening, rcMemory, rcExhausted );
+            
+        if (rc != 0)
+            KDirectoryRelease(self->wd);
+    }
+        
+    return rc;
+}
+
+rc_t KeyRingWhack(KKeyRing* self)
+{
+    KeyRingDataWhack( self->data );
+    free(self->data);
+    free(self->path);
+    KDirectoryRelease(self->wd);
+    free(self);
+    return 0;
+}
+
+rc_t KeyRingAddRef(KKeyRing* self)
+{
+    if ( self != NULL )
+    {
+        switch ( KRefcountAdd ( & self -> refcount, "KKeyRing" ) )
+        {
+        case krefLimit:
+            return RC ( rcApp, rcEncryptionKey, rcAttaching, rcRange, rcExcessive );
+        }
+    }
+    return 0;
+}
+
+rc_t KeyRingRelease(KKeyRing* self)
+{
+    if ( self != NULL )
+    {
+        switch ( KRefcountDrop ( & self -> refcount, "KKeyRing" ) )
+        {
+        case krefWhack:
+            KeyRingWhack ( self );
+        break;
+        case krefNegative:
+            return RC ( rcApp, rcEncryptionKey, rcReleasing, rcRange, rcExcessive );
+        }
+    }
+    return 0;
+}
+
+static
+rc_t copy_file (const KFile * fin, KFile *fout)
+{
+    rc_t rc;
+    uint8_t	buff	[64 * 1024];
+    size_t	num_read;
+    uint64_t	inpos;
+    uint64_t	outpos;
+
+    assert (fin != NULL);
+    assert (fout != NULL);
+
+    inpos = 0;
+    outpos = 0;
+
+    do
+    {
+        rc = KFileRead (fin, inpos, buff, sizeof (buff), &num_read);
+        if (rc != 0)
+        {
+            PLOGERR (klogErr, (klogErr, rc,
+                     "Failed to read from directory structure in creating archive at $(P)",
+                               PLOG_U64(P), inpos));
+            break;
+        }
+        else if (num_read > 0)
+        {
+            size_t to_write;
+
+            inpos += (uint64_t)num_read;
+
+            to_write = num_read;
+            while (to_write > 0)
+            {
+                size_t num_writ;
+                rc = KFileWrite (fout, outpos, buff, num_read, &num_writ);
+                if (rc != 0)
+                {
+                    PLOGERR (klogErr, (klogErr, rc,
+                             "Failed to write to archive in creating archive at $(P)",
+                                       PLOG_U64(P), outpos));
+                    break;
+                }
+                outpos += num_writ;
+                to_write -= num_writ;
+            }
+        }
+        if (rc != 0)
+            break;
+    } while (num_read != 0);
+    return rc;
+}
+
+rc_t ArchiveAndEncrypt(KDirectory* wd, const char* inpath, const char* outpath, const char* passwd)
+{
+    const KDirectory* d;
+    rc_t rc = KDirectoryOpenDirRead (wd, &d, false, "%s", inpath);
+    if (rc == 0)
+    {
+        const KFile* infile;
+        rc_t rc2;
+    
+        rc = KDirectoryOpenTocFileRead (d, &infile, 4, NULL, NULL, NULL);
+        if (rc == 0)
+        {
+            KFile* outfile;
+                
+            /* if the file exists, add write access */
+            KDirectorySetAccess( wd, false, 0600, 0777, "%s", outpath );
+            rc = KDirectoryCreateFile(wd, &outfile, false, 0600, kcmCreate|kcmInit, "%s", outpath);
+            if ( rc == 0 )
+            {
+                KFile* enc_outfile;
+                KKey key;
+                rc = KKeyInitRead(&key, kkeyAES256, passwd, string_measure(passwd, NULL));
+                if ( rc == 0 )
+                    rc = KEncFileMakeWrite(&enc_outfile, outfile, &key);
+                    
+                if (rc == 0)
+                    rc = copy_file(infile, enc_outfile);
+        
+                rc2 = KFileRelease(outfile);
+                if (rc == 0)
+                    rc = rc2;
+                /* remove write access */
+                rc2 = KDirectorySetAccess( wd, false, 0400, 0777, "%s", outpath );
+                if (rc == 0)
+                    rc = rc2;
+                rc2 = KFileRelease(enc_outfile);
+                if (rc == 0)
+                    rc = rc2;
+            }
+            rc2 = KFileRelease(infile);
+            if (rc == 0)
+                rc = rc2;
+        }
+        rc2 = KDirectoryRelease(d);
+        if (rc == 0)
+            rc = rc2;
+    }
+    return rc;
+}
+
+rc_t CreateDatabase(KKeyRing* self)
+{   /* database is presumed write-locked */
+    rc_t rc;
+    
+    assert(self);
+    
+    KDirectoryRemove(self->wd, true, "%s", tmp_path); /* in case exists */
+    rc = KeyRingDatabaseSave(self->data, self->wd, tmp_path);
+    if (rc == 0)
+    {
+        rc_t rc2;
+        rc = ArchiveAndEncrypt(self->wd, tmp_path, self->path, self->passwd);
+        
+        rc2 = KDirectoryRemove(self->wd, true, "%s", tmp_path);
+        if (rc == 0)
+            rc = rc2;
+    }
+    return rc;
+}
+
+rc_t OpenDatabase(KKeyRing* self)
+{
+    rc_t rc;
+    const KFile* enc_infile;
+    
+    assert(self);
+    rc = KDirectoryOpenFileRead(self->wd, &enc_infile, "%s", self->path);
+    if ( rc == 0)
+    {
+        rc_t rc2;
+        const KFile* infile;
+        KKey key;
+        rc = KKeyInitRead(&key, kkeyAES256, self->passwd, string_measure(self->passwd, NULL));
+        if ( rc == 0 )
+        {
+            rc = KEncFileMakeRead (&infile, enc_infile, &key);
+            if (rc == 0)
+            {   
+                const KDirectory* arc;
+                rc = KDirectoryOpenArcDirRead_silent_preopened(self->wd, &arc, true, "/keyring", tocKFile, (void*)infile, KArcParseSRA, NULL, NULL);
+                if (rc == 0)
+                {
+                    /*  Hack: we violate the KDirectory object interface in order for VDBManagerMakeUpdate to succeed,
+                        since it would refuse to open a read-only dir (i.e. archive);
+                        We will only read from the object, though.
+                    */
+                    ((KDirectory*)arc)->read_only = false;
+                    rc = KeyRingDatabaseLoad(self->data, arc, "/keyring");
+                    rc2 = KDirectoryRelease(arc);
+                    if (rc == 0)
+                        rc = rc2;
+                }
+                rc2 = KFileRelease(infile);
+                if (rc == 0)
+                    rc = rc2;
+            }
+        }
+            
+        rc2 = KFileRelease(enc_infile);
+        if (rc == 0)
+            rc = rc2;
+    }
+    return rc;
+}
+
+rc_t KeyRingAddProject(KKeyRing* self, const String* name, const String* download_ticket, const String* encryption_key)
+{   
+    rc_t rc = 0;
+    
+    assert(self && name && download_ticket && encryption_key);
+    
+    /*TODO: write-lock database */
+    rc = KeyRingDataAddProject(self->data, name, download_ticket, encryption_key);
+    if (rc == 0)
+        rc = CreateDatabase(self); 
+    /*TODO: unlock database */
+    return rc;
+}
+
+rc_t KeyRingGetProject(KKeyRing* self, const String* name, String* download_ticket, String* encryption_key)
+{   
+    rc_t rc = 0;
+    const Project* p;
+    
+    assert(self && name && download_ticket && encryption_key);
+    
+    p = KeyRingDataGetProject(self->data, name);
+    if (p != NULL)
+    {
+        StringInit(download_ticket, p->download_ticket->addr, p->download_ticket->len, p->download_ticket->size);
+        StringInit(encryption_key, p->encryption_key->addr, p->encryption_key->len, p->encryption_key->size);
+    }
+    else
+        rc = RC(rcApp, rcDatabase, rcSearching, rcName, rcNotFound);
+    return rc;
+}
+
+rc_t KeyRingAddObject(KKeyRing* self, 
+                      const struct String* object_name, 
+                      const struct String* project_name, 
+                      const struct String* display_name, 
+                      uint64_t size, 
+                      const struct String* checksum)
+{
+    rc_t rc = 0;
+    const Project* p;
+    
+    assert(self && object_name && project_name && display_name && checksum);
+    
+    /*TODO: write-lock database */
+    p = KeyRingDataGetProject(self->data, project_name);
+    if (p != NULL)
+    {
+        rc = KeyRingDataAddObject(self->data, object_name, project_name, display_name, size, checksum, p->encryption_key);
+        if (rc == 0)
+            rc = CreateDatabase(self); 
+    }
+    else
+        rc = RC(rcApp, rcDatabase, rcSearching, rcName, rcNotFound);
+    /*TODO: unlock database */
+    
+    return rc;
+}                      
+                     
+rc_t KeyRingGetKey(KKeyRing* self, const struct String* object_name, struct String* encryption_key)
+{
+    rc_t rc = 0;
+    const Object* obj;
+
+    assert(self && object_name && encryption_key);
+    
+    obj = KeyRingDataGetObject(self->data, object_name);
+    if (obj != NULL)
+        StringInit(encryption_key, obj->encryption_key->addr, obj->encryption_key->len, obj->encryption_key->size);
+    else
+        rc = RC(rcApp, rcDatabase, rcSearching, rcName, rcNotFound);
+    return rc;
+}
diff --git a/tools/keyring-srv/keyring-srv.h b/tools/keyring-srv/keyring-srv.h
new file mode 100644
index 0000000..11dea86
--- /dev/null
+++ b/tools/keyring-srv/keyring-srv.h
@@ -0,0 +1,101 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_keyring_srv_
+#define _h_keyring_srv_
+
+#include <klib/rc.h>
+#include <klib/refcount.h>
+
+struct KFile;
+struct String;
+
+typedef struct KKeyRing KKeyRing;
+struct KKeyRing;
+
+#define KR_PWD_PROMPT_1 "Password:\n"
+#define KR_PWD_PROMPT_2 "Retype Password:\n"
+
+/* KeyRingOpen 
+ * kr - [ OUT ] the keyring object
+ * path - [ IN ] the POSIX path to the database file
+ * pwd_in - [ IN ] a file object to read database password from
+ * pwd_out - [ IN ] a file object to print password prompts to
+ *
+ * If the database file exists, will prompt to pwd_out for a password, read the password from pwd_in, and use the password to open the database
+ * If the database file does not exist, will prompt for a password twice and create the database if passwords match
+ *
+ * returns:
+ *  - database file exists, the supplied password is incorrect
+ *  - database file does not exist, passwords do not match
+ */
+extern rc_t KeyRingOpen(KKeyRing** kr, const char* path, const struct KFile* pwd_in, struct KFile* pwd_out); 
+
+/* KeyRingAddRef
+ */
+extern rc_t KeyRingAddRef(KKeyRing* kr);
+
+/* KeyRingRelease
+ */
+extern rc_t KeyRingRelease(KKeyRing* kr);
+
+/* KeyRingAddProject
+ * Saves the project with associated download ticket and encryption key. 
+ * If the project under this name already exists, the ticket/key will be overwritten as necessary.
+ * Will update the database file. May block/timeout if the file is locked.
+ */
+extern rc_t KeyRingAddProject(KKeyRing* kr, 
+                              const struct String* name, 
+                              const struct String* download_ticket, 
+                              const struct String* encryption_key);
+
+/* KeyRingGetProject
+ *  Retrieves a project's download ticket and encryption key by the project's name.
+ *  (TODO: Keys are returned as pointers into shared memory)
+ *  (TODO: Should it check if the database file needs to be reloaded?)
+ */
+extern rc_t KeyRingGetProject(KKeyRing* kr, const struct String* name, struct String* download_ticket, struct String* encryption_key);
+
+/* KeyRingAddObject
+ *  Saves an object in association with a project.
+ *  If the project under this name already exists, it will be overwritten as necessary.
+ *  Will update the database file. May block/timeout if the file is locked.
+ */
+extern rc_t KeyRingAddObject(KKeyRing* kr, 
+                             const struct String* object_name, 
+                             const struct String* project_name, 
+                             const struct String* display_name, 
+                             uint64_t size, 
+                             const struct String* checksum);
+
+/* KeyRingGetKey
+ *  Retrieves an encryption key associated with the given object.
+ *  (TODO: Keys are returned as pointers into shared memory)
+ *  (TODO: Should it check if the database file needs to be reloaded?)
+ */
+extern rc_t KeyRingGetKey(KKeyRing* kr, const struct String* object_name, struct String* encryption_key);
+                             
+#endif /* _h_keyring_srv_ */
diff --git a/tools/kget/Makefile b/tools/kget/Makefile
new file mode 100644
index 0000000..a4270d9
--- /dev/null
+++ b/tools/kget/Makefile
@@ -0,0 +1,77 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/kget
+
+INT_TOOLS = \
+	kget
+
+EXT_TOOLS = \
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# kget
+#
+TOOL_SRC = \
+	kget
+
+TOOL_OBJ = \
+	$(addsuffix .$(OBJX),$(TOOL_SRC))
+
+TOOL_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lm
+
+$(BINDIR)/kget: $(TOOL_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(TOOL_LIB)
+
diff --git a/tools/kget/examples.sh b/tools/kget/examples.sh
new file mode 100755
index 0000000..67cf37b
--- /dev/null
+++ b/tools/kget/examples.sh
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+execute()
+{
+    echo "------------------------------------------------------"
+    echo $1
+    eval $1
+    echo "."
+}
+
+ACC="NC_011748.1"
+URL=`srapath $ACC`
+CACHEFILE="cache.dat"
+PROXY="localhost:8080"
+
+echo "example number 1: show the size of the remote file ( HEAD request )"
+execute "time kget $URL --show-size"
+
+echo "example number 2: download the remote file, no buffering, no cachefile"
+echo "                  in 32k blocks, using HTTPFile, filename extracted from URL"
+execute "time kget $URL"
+
+echo "example number 3: download the remote file, wget-style: without partial requests"
+echo "                  filename extracted from URL"
+execute "time kget $URL --full"
+
+echo "example number 4: download the remote file, no buffering, no cachefile"
+echo "                  in 32k blocks, using HTTPFile, filename different from URL"
+execute "time kget $URL some_reference.dat"
+
+echo "example number 5: download the remote file, no buffering, no cachefile"
+echo "                  in 32k blocks, using ReliableHTTPFile"
+execute "time kget $URL some_reference.dat --reliable"
+
+echo "example number 6: download the remote file, no buffering, no cachefile"
+echo "                  in 128k blocks, using HTTPFile"
+#blocksize of 128 kilobyte can be expressed as '128k' or '131072' or '0x020000'
+execute "time kget $URL --block-size 128k"
+
+echo "example number 7: download the remote file, no cachefile"
+echo "                  in 32k blocks, wraped in a buffer-file with 128k blocks"
+execute "time kget $URL --buffer 128k"
+
+echo "example number 8: download the remote file, using a cache-file "
+echo "                  ( dflt cache-blocksize of 128 k ) in 32k blocks, "
+execute "rm -f $CACHEFILE"
+execute "time kget $URL --cache $CACHEFILE"
+
+echo "example number 9: download the remote file, using a cache-file"
+echo "                   ( cache-blocksize of 256 k ) in 32k blocks, "
+execute "rm -f $CACHEFILE"
+execute "time kget $URL --cache $CACHEFILE --cache-block 256k"
+
+echo "example number 10: download the remote file, no buffering, no cachefile"
+echo "                  in 32k blocks, but requests are made in random order"
+execute "time kget $URL --random"
+
+#enable this example only after updating the PROXY-variable
+#and actually having a running proxy there!
+#echo "example number X: download the remote file, using a proxy"
+#echo "                  in 32k blocks, "
+#execute "time kget $URL --proxy $PROXY"
diff --git a/tools/kget/kget.c b/tools/kget/kget.c
new file mode 100644
index 0000000..9cf7dbc
--- /dev/null
+++ b/tools/kget/kget.c
@@ -0,0 +1,968 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+
+#include <klib/out.h>
+#include <klib/log.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+#include <klib/time.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/buffile.h>
+#include <kfs/cacheteefile.h>
+//#include <kfs/big_block_reader.h>
+
+#include <kns/manager.h>
+#include <kns/kns-mgr-priv.h>
+#include <kns/http.h>
+#include <kns/stream.h>
+
+#include <kproc/timeout.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+/*===========================================================================
+
+    kget is a works like a simple version of wget
+
+ =========================================================================== */
+
+const char UsageDefaultName[] = "kget";
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s <path> [<path> ...] [options]\n"
+                    "\n", progname);
+}
+
+
+#define OPTION_VERB "verb"
+#define ALIAS_VERB  "b"
+static const char * verb_usage[]        = { "execute verbose", NULL };
+
+#define OPTION_BLOCK "block-size"
+#define ALIAS_BLOCK  "s"
+static const char * block_usage[]       = { "how many bytes per block", NULL };
+
+#define OPTION_SHOW  "show-size"
+#define ALIAS_SHOW   "w"
+static const char * show_usage[]        = { "query size of remote file first", NULL };
+
+#define OPTION_CACHE "cache"
+#define ALIAS_CACHE  "c"
+static const char * cache_usage[]       = { "wrap the remote-file into a KCacheTeeFile", NULL };
+
+#define OPTION_CACHE_BLK "cache-block"
+static const char * cache_blk_usage[]   = { "blocksize inside a KCacheTeeFile", NULL };
+
+#define OPTION_PROXY "proxy"
+static const char * proxy_usage[]       = { "use a proxy to download remote file", NULL };
+
+#define OPTION_RAND  "random"
+#define ALIAS_RAND   "r"
+static const char * random_usage[]      = { "request blocks in random order", NULL };
+
+#define OPTION_REP   "repeat"
+#define ALIAS_REP    "e"
+static const char * repeat_usage[]      = { "request blocks with repeats if in random order", NULL };
+
+#define OPTION_CREPORT "report"
+#define ALIAS_CREPORT  "p"
+static const char * creport_usage[]     = { "report cache usage", NULL };
+
+#define OPTION_COMPLETE "complete"
+static const char * complete_usage[]    = { "check if 1st parameter is a complete", NULL };
+
+#define OPTION_TRUNC "truncate"
+static const char * truncate_usage[]    = { "truncate the file ( 1st parameter ) / remove trailing cache-bitmap", NULL };
+
+#define OPTION_START "start"
+static const char * start_usage[]       = { "offset where to read from", NULL };
+
+#define OPTION_COUNT "count"
+static const char * count_usage[]       = { "number of bytes to read", NULL };
+
+#define OPTION_PROGRESS "progress"
+static const char * progress_usage[]    = { "show progress", NULL };
+
+#define OPTION_RELIABLE "reliable"
+static const char * reliable_usage[]    = { "use reliable version of http-file", NULL };
+
+#define OPTION_BUFFER "buffer"
+#define ALIAS_BUFFER  "u"
+static const char * buffer_usage[]      = { "wrap remote file into KBufFile with this buffer-size", NULL };
+
+#define OPTION_SLEEP "sleep"
+#define ALIAS_SLEEP  "i"
+static const char * sleep_usage[]       = { "sleep inbetween requests by this amount of ms", NULL };
+
+#define OPTION_TIMEOUT "timeout"
+#define ALIAS_TIMEOUT "m"
+static const char * timeout_usage[]     = { "use timed read with tis amount of ms as timeout", NULL };
+
+#define OPTION_CCOMPL "cache-complete"
+#define ALIAS_CCOMPL "a"
+static const char * ccompl_usage[]      = { "check completeness on open cacheteefile", NULL };
+
+#define OPTION_FULL "full"
+#define ALIAS_FULL "f"
+static const char * full_usage[]        = { "download via one http-request, not partial requests in a loop", NULL };
+
+OptDef MyOptions[] =
+{
+/*    name              alias           fkt    usage-txt,       cnt, needs value, required */
+    { OPTION_VERB,      ALIAS_VERB,     NULL, verb_usage,       1,  false,       false },
+    { OPTION_BLOCK,     ALIAS_BLOCK,    NULL, block_usage,      1,  true,        false },
+    { OPTION_SHOW,      ALIAS_SHOW,     NULL, show_usage,       1,  false,       false },
+    { OPTION_CACHE,     ALIAS_CACHE,    NULL, cache_usage,      1,  true,        false },
+    { OPTION_CACHE_BLK, NULL,           NULL, cache_blk_usage,  1,  true,        false },
+    { OPTION_PROXY,     NULL,           NULL, proxy_usage,      1,  true,        false },
+    { OPTION_RAND,      ALIAS_RAND,     NULL, random_usage,     1,  false,       false },
+    { OPTION_REP,       ALIAS_REP,      NULL, repeat_usage,     1,  false,       false },
+    { OPTION_CREPORT,   ALIAS_CREPORT,  NULL, creport_usage,    1,  false,       false },
+    { OPTION_BUFFER,    ALIAS_BUFFER,   NULL, buffer_usage,     1,  true,        false },
+    { OPTION_SLEEP,     ALIAS_SLEEP,    NULL, sleep_usage,      1,  true,        false },    
+    { OPTION_TIMEOUT,   ALIAS_TIMEOUT,  NULL, timeout_usage,    1,  true,        false },
+    { OPTION_COMPLETE,  NULL,           NULL, complete_usage,   1,  false,       false },
+    { OPTION_CCOMPL,    ALIAS_CCOMPL,   NULL, ccompl_usage,     1,  false,       false },
+    { OPTION_TRUNC,     NULL,           NULL, truncate_usage,   1,  false,       false },
+    { OPTION_START,     NULL,           NULL, start_usage,      1,  true,        false },
+    { OPTION_COUNT,     NULL,           NULL, count_usage,      1,  true,        false },
+    { OPTION_PROGRESS,  NULL,           NULL, progress_usage,   1,  false,       false },
+    { OPTION_RELIABLE,  NULL,           NULL, reliable_usage,   1,  false,       false },
+    { OPTION_FULL,      ALIAS_FULL,     NULL, full_usage,       1,  false,       false }
+};
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    uint32_t i;
+    rc_t rc;
+
+    if ( args == NULL )
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+        rc = ArgsProgram ( args, &fullpath, &progname );
+
+    if ( rc )
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary ( progname );
+
+    KOutMsg ( "Options:\n" );
+
+    HelpOptionsStandard ();
+    for ( i = 0; i < sizeof ( MyOptions ) / sizeof ( MyOptions[ 0 ] ); ++i )
+        HelpOptionLine ( MyOptions[i].aliases, MyOptions[i].name, NULL, MyOptions[i].help );
+
+    return rc;
+}
+
+typedef struct fetch_ctx
+{
+    const char *url;
+    const char *destination;
+    const char *cache_file;
+    const char * proxy;
+    size_t blocksize;
+    size_t start, count;
+    size_t buffer_size;
+    size_t sleep_time;
+    size_t timeout_time;
+    size_t cache_blk;
+    bool verbose;
+    bool show_filesize;
+    bool random;
+    bool with_repeats;
+    bool show_curl_version;
+    bool report_cache;
+    bool check_cache_complete;
+    bool check_completeness;    
+    bool truncate_cache;
+    bool local_read_only;
+    bool show_progress;
+    bool reliable;
+    bool full_download;
+} fetch_ctx;
+
+
+static rc_t src_2_dst( const KFile *src, KFile *dst, char * buffer,
+                       uint64_t pos, size_t * num_read, fetch_ctx * ctx )
+{
+    rc_t rc;
+    size_t n_transfer = ( ctx->count == 0 ? ctx->blocksize : ctx->count );
+    
+    if ( ctx->timeout_time == 0 )
+        rc = KFileReadAll ( src, pos, buffer, n_transfer, num_read );
+    else
+    {
+        timeout_t tm;
+        rc = TimeoutInit ( &tm, ctx->timeout_time );
+        if ( rc == 0 )
+            rc = KFileTimedReadAll ( src, pos, buffer, n_transfer, num_read, &tm );
+    }
+    if ( rc == 0 && *num_read > 0 )
+    {
+        size_t num_writ;
+        rc = KFileWriteAll ( dst, pos, buffer, *num_read, &num_writ );
+    }
+    return rc;
+}
+
+
+static rc_t block_loop_in_order( const KFile *src, KFile *dst, char * buffer, 
+                                 uint64_t * bytes_copied, fetch_ctx * ctx )
+{
+    rc_t rc = 0;
+    uint64_t pos = 0;
+    uint32_t blocks = 0;
+    size_t num_read = 1;
+    KOutMsg( "copy-mode : linear read/write\n" );
+    while ( rc == 0 && num_read > 0 )
+    {
+        rc = src_2_dst( src, dst, buffer, pos, &num_read, ctx );
+        if ( rc == 0 ) pos += num_read;
+        if ( ctx->show_progress && ( ( blocks & 0x0F ) == 0 ) ) KOutMsg( "." );
+        blocks++;
+        if ( ctx->sleep_time > 0 ) KSleepMs( ctx->sleep_time );
+    }
+    *bytes_copied = pos;
+    if ( ctx->show_progress ) KOutMsg( "\n" );
+    KOutMsg( "%d blocks a %d bytes\n", blocks, ctx->blocksize );
+    return rc;
+}
+
+
+
+static uint32_t randr( uint32_t min, uint32_t max )
+{
+       double scaled = ( ( double )rand() / RAND_MAX );
+       return ( ( max - min + 1 ) * scaled ) + min;
+}
+
+
+static rc_t block_loop_random( const KFile *src, KFile *dst, char * buffer,
+                               uint64_t *bytes_copied, fetch_ctx * ctx )
+{
+    uint64_t src_size;
+    rc_t rc = KFileSize ( src, &src_size );
+    KOutMsg( "copy-mode : random blocks\n" );
+    if ( rc == 0 )
+    {
+        rc = KFileSetSize ( dst, src_size );
+        if ( rc == 0 )
+        {
+            uint32_t block_count = ( src_size / ctx->blocksize ) + 1;
+            uint32_t * block_vector = malloc( block_count * ( sizeof * block_vector ) );
+            if ( block_vector != NULL )
+            {
+                uint32_t loop;
+                
+                /* fill the block_vector with ascending numbers */
+                for ( loop = 0; loop < block_count; loop++ )
+                    block_vector[ loop ] = loop;
+                
+                /* randomize them */
+                for ( loop = 0; loop < block_count; loop++ )
+                {
+                    uint32_t src_idx = randr( 0, block_count - 1 );
+                    uint32_t dst_idx = randr( 0, block_count - 1 );
+                    /* swap it... */
+                    uint32_t tmp = block_vector[ dst_idx ];
+                    block_vector[ dst_idx ] = block_vector[ src_idx ];
+                    block_vector[ src_idx ] = tmp;
+                }
+
+                for ( loop = 0; rc == 0 && loop < block_count; loop++ )
+                {
+                    size_t num_read;
+                    uint64_t pos = ctx->blocksize;
+                    pos *= block_vector[ loop ];
+                    rc = src_2_dst( src, dst, buffer, pos, &num_read, ctx );
+                    if ( rc == 0 ) *bytes_copied += num_read;
+                    if ( ctx->show_progress && ( ( loop & 0x0F ) == 0 ) ) KOutMsg( "." );
+                    if ( ctx->sleep_time > 0 ) KSleepMs( ctx->sleep_time );
+
+                }
+                free( block_vector );
+                if ( ctx->show_progress ) KOutMsg( "\n" );
+                KOutMsg( "%d blocks a %d bytes\n", loop, ctx->blocksize );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t copy_file( const KFile * src, KFile * dst, fetch_ctx * ctx )
+{
+    rc_t rc = 0;
+    size_t buffer_size = ( ctx->count == 0 ? ctx->blocksize : ctx->count );
+    char * buffer = malloc( buffer_size );
+    if ( buffer == NULL )
+    {
+        rc = RC( rcExe, rcFile, rcPacking, rcMemory, rcExhausted );
+        KOutMsg( "cant make buffer of size %u\n", buffer_size );
+    }
+    else
+    {
+        uint64_t bytes_copied = 0;
+        if ( ctx->count == 0 )
+        {
+            if ( ctx->random )
+                rc = block_loop_random( src, dst, buffer, &bytes_copied, ctx );
+            else
+                rc = block_loop_in_order( src, dst, buffer, &bytes_copied, ctx );
+        }
+        else
+        {
+            size_t num_read;
+            rc = src_2_dst( src, dst, buffer, ctx->start, &num_read, ctx );
+            if ( rc == 0 ) bytes_copied = num_read;
+        }
+        KOutMsg( "%lu bytes copied\n", bytes_copied );
+        free( buffer );
+    }
+    return rc;
+}
+
+
+#define CACHE_TEE_DEFAULT_BLOCKSIZE ( 32 * 1024 * 4 )
+
+static rc_t fetch_cached( KDirectory *dir, const KFile *src, KFile *dst, fetch_ctx *ctx )
+{
+    size_t bs = ctx->cache_blk == 0 ? CACHE_TEE_DEFAULT_BLOCKSIZE : ctx->cache_blk;
+    rc_t rc = KOutMsg( "persistent cache created : '%s' (blk-size: %d)\n", ctx->cache_file, bs );
+    if ( rc == 0 )
+    {
+        const KFile *tee; /* this is the file that forks persistent_content with remote */
+        rc = KDirectoryMakeCacheTee ( dir,                  /* the KDirectory for the the sparse-file */
+                                      &tee,                 /* the newly created cache-tee-file */
+                                      src,                  /* the file that we are wrapping ( usually the remote http-file ) */
+                                      ctx->cache_blk,       /* how big one block in the cache-tee-file will be */
+                                      ctx->cache_file );    /* the sparse-file we use write to */
+        if ( rc == 0 )
+        {
+            KOutMsg( "cache tee created\n" );
+            rc = copy_file( tee, dst, ctx );
+            KFileRelease( tee );
+        }
+    }
+    return rc;
+}
+
+
+static void extract_name( char ** dst, const char * url )
+{
+    char * last_slash = string_rchr ( url, string_size( url ), '/' );
+    if ( last_slash == NULL )
+        *dst = string_dup_measure( "out.bin", NULL );
+    else
+        *dst = string_dup_measure( last_slash + 1, NULL );
+}
+
+
+static rc_t fetch_from( KDirectory *dir, fetch_ctx *ctx, char * outfile,
+                        const KFile * src )
+{
+    uint64_t file_size;
+    rc_t rc = KFileSize( src, &file_size );
+    if ( rc != 0 )
+        KOutMsg( "cannot disover src-size >%R<\n", rc );
+    else
+    {
+        KFile *dst;
+        KOutMsg( "src-size = %lu\n", file_size );
+        rc = KDirectoryCreateFile ( dir, &dst, false, 0664, kcmInit, outfile );
+        if ( rc == 0 )
+        {
+            KOutMsg( "dst >%s< created\n", outfile );
+            if ( rc == 0 )
+            {
+                if ( ctx->cache_file != NULL )
+                    rc = fetch_cached( dir, src, dst, ctx );
+                else
+                    rc = copy_file( src, dst, ctx );
+            }
+            KFileRelease( dst );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t make_remote_file( struct KNSManager * kns_mgr, const KFile ** src, fetch_ctx * ctx )
+{
+    rc_t rc;
+    
+    KNSManagerSetVerbose( kns_mgr, ctx->verbose );
+    if ( ctx->reliable )
+        rc = KNSManagerMakeReliableHttpFile( kns_mgr, src, NULL, 0x01010000, ctx->url );
+    else
+        rc = KNSManagerMakeHttpFile( kns_mgr, src, NULL, 0x01010000, ctx->url );
+    
+    if ( rc != 0 )
+    {
+        if ( ctx->reliable )
+            (void)LOGERR( klogInt, rc, "KNSManagerMakeReliableHttpFile() failed" );
+        else
+            (void)LOGERR( klogInt, rc, "KNSManagerMakeHttpFile() failed" );
+    }
+    else
+    {
+        if ( ctx->buffer_size > 0 )
+        {
+            const KFile * temp_file;
+            rc = KBufFileMakeRead ( & temp_file, *src, ctx->buffer_size );
+            if ( rc == 0 )
+            {
+                KOutMsg( "remote-file wrapped in new big-block-reader of size %d\n", ctx->buffer_size );
+                KFileRelease ( *src );
+                *src = temp_file;
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t fetch( KDirectory *dir, fetch_ctx *ctx )
+{
+    rc_t rc = 0;
+    char * outfile;
+    const KFile * remote;
+    struct KNSManager * kns_mgr;
+    
+    if ( ctx->destination == NULL )
+        extract_name( &outfile, ctx->url );
+    else
+        outfile = string_dup_measure( ctx->destination, NULL );
+
+    KOutMsg( "fetching: >%s<\n", ctx->url );
+    KOutMsg( "into    : >%s<\n", outfile );
+    if ( ctx->count > 0 )
+        KOutMsg( "range   : %u.%u\n", ctx->start, ctx->count );
+
+    rc = KNSManagerMake ( &kns_mgr );
+    if ( rc != 0 )
+        (void)LOGERR( klogInt, rc, "KNSManagerMake() failed" );
+    else
+    {
+        if ( ctx->proxy != NULL )
+        {
+            rc = KNSManagerSetHTTPProxyPath( kns_mgr, "%s", ctx->proxy );
+            if ( rc != 0 )
+                (void)LOGERR( klogInt, rc, "KNSManagerSetHTTPProxyPath() failed" );    
+        }
+        if ( rc == 0 )
+        {
+            rc = make_remote_file( kns_mgr, &remote, ctx );
+            if ( rc == 0 )
+            {
+                rc = fetch_from( dir, ctx, outfile, remote );
+                KFileRelease( remote );
+            }
+        }
+        KNSManagerRelease( kns_mgr );
+    }
+
+    free( outfile );
+    return rc;
+}
+
+
+/* -------------------------------------------------------------------------------------------------------------------- */
+
+
+static rc_t show_size( KDirectory *dir, fetch_ctx *ctx )
+{
+    rc_t rc = KOutMsg( "source: >%s<\n", ctx->url );
+    if ( rc == 0 )
+    {
+        struct KNSManager * kns_mgr;
+        rc = KNSManagerMake ( &kns_mgr );
+        if ( rc != 0 )
+            (void)LOGERR( klogInt, rc, "KNSManagerMake() failed" );
+        else
+        {
+            const KFile * remote;    
+            rc = make_remote_file( kns_mgr, &remote, ctx );
+            if ( rc == 0 )
+            {
+                uint64_t file_size;
+                rc = KFileSize( remote, &file_size );
+                KOutMsg( "file-size = %u\n", file_size );
+                KFileRelease( remote );
+            }
+            KNSManagerRelease( kns_mgr );
+        }
+    }
+    return rc;
+}
+
+
+/* -------------------------------------------------------------------------------------------------------------------- */
+
+
+/* check cache completeness on raw file in the filesystem */
+static rc_t check_cache_complete( KDirectory *dir, fetch_ctx *ctx )
+{
+    rc_t rc = KOutMsg( "checking if this cache file >%s< is complete\n", ctx->url );
+    if ( rc == 0 )
+    {
+        const KFile *f;
+        rc = KDirectoryOpenFileRead( dir, &f, "%s", ctx->url );
+        if ( rc == 0 )
+        {
+            bool is_complete;
+            rc = IsCacheFileComplete( f, &is_complete );
+            if ( rc != 0 )
+                KOutMsg( "error performing IsCacheFileComplete() %R\n", rc );
+            else
+            {
+                if ( is_complete )
+                    KOutMsg( "the file is complete\n" );
+                else
+                {
+                    float percent = 0;
+                    uint64_t bytes_cached;
+                    rc = GetCacheCompleteness( f, &percent, &bytes_cached );
+                    if ( rc == 0 )
+                        KOutMsg( "the file is %f%% complete ( %lu bytes are cached )\n", percent, bytes_cached );
+                }
+            }
+            KFileRelease( f );
+        }
+    }
+    return rc;
+}
+
+
+/* -------------------------------------------------------------------------------------------------------------------- */
+
+
+static rc_t fetch_loop( const KFile * src, fetch_ctx *ctx )
+{
+    rc_t rc = 0;
+    size_t buffer_size = ( ctx->count == 0 ? ctx->blocksize : ctx->count );
+    char * buffer = malloc( buffer_size );
+    if ( buffer == NULL )
+    {
+        rc = RC( rcExe, rcFile, rcPacking, rcMemory, rcExhausted );
+        KOutMsg( "cant make buffer of size %u\n", buffer_size );
+    }
+    else
+    {
+        uint64_t pos = 0;
+        size_t num_read = 0;
+        do
+        {
+            rc = KFileReadAll( src, pos, buffer, buffer_size, &num_read );
+            if ( rc == 0 )
+                pos += num_read;
+        } while ( rc == 0 && num_read > 0 );
+        KOutMsg( "%lu bytes copied\n", pos );
+        free( buffer );
+    }
+    return rc;
+}
+
+
+/* check cache completeness on a open cacheteefile */
+static rc_t check_cache_completeness( KDirectory *dir, fetch_ctx *ctx )
+{
+    rc_t rc = KOutMsg( "check if IsCacheTeeComplete() works as intended\n" );
+    if ( rc == 0 )
+    {
+        struct KNSManager * kns_mgr;    
+        rc = KNSManagerMake ( &kns_mgr );
+        if ( rc != 0 )
+            (void)LOGERR( klogInt, rc, "KNSManagerMake() failed" );
+        else
+        {
+            const KFile * remote;    
+            rc = make_remote_file( kns_mgr, &remote, ctx );
+            if ( rc == 0 )
+            {
+                const KFile *tee; /* this is the file that forks persistent_content with remote */
+                rc = KDirectoryMakeCacheTee ( dir,                  /* the KDirectory for the the sparse-file */
+                                              &tee,                 /* the newly created cache-tee-file */
+                                              remote,               /* the file that we are wrapping ( usually the remote http-file ) */
+                                              ctx->cache_blk,       /* how big one block in the cache-tee-file will be */
+                                              ctx->cache_file );    /* the sparse-file we use write to */
+                if ( rc == 0 )
+                    rc = fetch_loop( tee, ctx );
+                if ( rc == 0 )
+                {
+                
+                    bool complete = false;
+                    rc = IsCacheTeeComplete( tee, &complete );
+                    KOutMsg( "IsCacheTeeComplete() -> %R, complete = %s\n", rc, complete ? "YES" : "NO" );
+                    KFileRelease( tee );
+                }
+                KFileRelease( remote );
+            }
+            KNSManagerRelease( kns_mgr );
+        }
+    }
+    return rc;
+}
+
+
+/* -------------------------------------------------------------------------------------------------------------------- */
+
+/* this is 'borrowed' from libs/kns/http-priv.h :
+    - this is a private header inside the source-directory
+    - without it KNSManagerMakeClientHttp( ... ) a public function cannot be used
+        ( or the user writes it's own URL-parsing )
+*/
+
+typedef enum 
+{
+    st_NONE,
+    st_HTTP,
+    st_S3
+} SchemeType;
+
+typedef struct URLBlock URLBlock;
+struct URLBlock
+{
+    String scheme;
+    String host;
+    String path; /* Path includes any parameter portion */
+    String query;
+    String fragment;
+
+    uint32_t port;
+
+    SchemeType scheme_type;
+};
+extern void URLBlockInit ( URLBlock *self );
+extern rc_t ParseUrl ( URLBlock * b, const char * url, size_t url_size );
+
+
+/* check cache completeness on a open cacheteefile */
+static rc_t full_download( KDirectory *dir, fetch_ctx *ctx )
+{
+    rc_t rc = KOutMsg( "make full download without partial access\n" );
+    if ( rc == 0 )
+    {
+        struct KNSManager * kns_mgr;    
+        rc = KNSManagerMake ( &kns_mgr );
+        if ( rc != 0 )
+            (void)LOGERR( klogInt, rc, "KNSManagerMake() failed" );
+        else
+        {
+            struct URLBlock url;
+            URLBlockInit( &url );
+            rc = ParseUrl( &url, ctx->url, string_size( ctx->url ) );
+            if ( rc == 0 )
+            {
+                KClientHttp * http;
+                rc = KNSManagerMakeClientHttp( kns_mgr, &http, NULL, 0x01010000, &url.host, url.port );
+                if ( rc == 0 )
+                {
+                    KClientHttpRequest * req;
+                    KOutMsg( "connection open!\n" );
+                    rc = KClientHttpMakeRequest( http, &req, ctx->url );
+                    if ( rc == 0 )
+                    {
+                        KClientHttpResult *rslt;
+                        
+                        KOutMsg( "request made!\n" );
+                        
+                        KClientHttpRequestConnection( req, true );
+                        KClientHttpRequestSetNoCache( req );
+                        
+                        rc = KClientHttpRequestGET( req, &rslt ); 
+                        if ( rc == 0 )
+                        {
+                            uint32_t result_code;
+                            size_t msg_size;
+                            char buffer[ 4096 * 32 ]; /* 128k */
+                            
+                            KOutMsg( "reply received!\n" );
+                            rc = KClientHttpResultStatus( rslt, &result_code, buffer, sizeof buffer, &msg_size );
+                            if ( rc == 0 )
+                            {
+                                struct KStream  *content;
+                                KOutMsg( "result-code = %d\n", result_code );
+                                if ( result_code == 200 )
+                                {
+                                    rc = KClientHttpResultGetInputStream( rslt, &content );
+                                    if ( rc == 0 )
+                                    {
+                                        KFile *dst;
+                                        char * outfile;
+                                        
+                                        if ( ctx->destination == NULL )
+                                            extract_name( &outfile, ctx->url );
+                                        else
+                                            string_dup_measure( ctx->destination, NULL );
+
+                                        rc = KDirectoryCreateFile ( dir, &dst, false, 0664, kcmInit, outfile );
+                                        if ( rc == 0 )
+                                        {
+                                            KOutMsg( "dst >%s< created\n", outfile );
+                                            if ( rc == 0 )
+                                            {
+                                                uint64_t pos = 0;
+                                                size_t num_read;
+                                                struct timeout_t timeout;
+
+                                                TimeoutInit( &timeout, 2000 );                                                
+                                                do
+                                                {
+                                                    rc = KStreamTimedRead( content, buffer, sizeof buffer, &num_read, &timeout );
+                                                    if ( rc == 0 )
+                                                    {
+                                                        size_t num_writ;
+                                                        rc = KFileWriteAll( dst, pos, buffer, num_read, &num_writ );
+                                                        pos += num_read;
+                                                    }
+                                                } while ( rc == 0 && num_read > 0 );
+
+                                                KOutMsg( "%d bytes read!\n", pos );
+                                            }
+                                            KFileRelease( dst );
+                                        }
+                                        free( outfile );
+                                        KStreamRelease( content );
+                                    }
+                                }
+                            }
+                            KClientHttpResultRelease( rslt );
+                        }
+                        KClientHttpRequestRelease( req );
+                    }
+                    KClientHttpRelease ( http );
+                }
+            }
+            KNSManagerRelease( kns_mgr );
+        }
+    }
+    return rc;
+}
+
+
+/* -------------------------------------------------------------------------------------------------------------------- */
+
+
+static rc_t truncate_cache( KDirectory *dir, fetch_ctx *ctx )
+{
+    rc_t rc = 0;
+    KFile *f;
+
+    KOutMsg( "truncating this cache file >%s< (from it's trailing bitmap)\n", ctx->url );
+
+    rc = KDirectoryOpenFileWrite( dir, &f, true, "%s", ctx->url );
+    if ( rc == 0 )
+    {
+        rc = TruncateCacheFile( f );
+        if ( rc == 0 )
+            KOutMsg( "the file was truncated\n" );
+        else
+            KOutMsg( "the file was not truncated: %R\n", rc );
+        KFileRelease( f );
+    }
+    return rc;
+}
+
+
+/* -------------------------------------------------------------------------------------------------------------------- */
+
+
+rc_t get_bool( Args * args, const char *option, bool *value )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, option, &count );
+    *value = ( rc == 0 && count > 0 );
+    return rc;
+}
+
+
+rc_t get_str( Args * args, const char *option, const char ** value )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, option, &count );
+    *value = NULL;
+    if ( rc == 0 && count > 0 )
+        rc = ArgsOptionValue( args, option, 0, (const void **)value );
+    return rc;
+}
+
+
+rc_t get_size_t( Args * args, const char *option, size_t *value, size_t dflt )
+{
+    const char * s;
+    rc_t rc = get_str( args, option, &s );
+    *value = dflt;
+    if ( rc == 0 && s != NULL )
+    {
+        size_t l = string_size( s );
+        if ( l == 0 )
+            *value = dflt;
+        else
+        {
+            size_t multipl = 1;
+            switch( s[ l - 1 ] )
+            {
+                case 'k' :
+                case 'K' : multipl = 1024; break;
+                case 'm' :
+                case 'M' : multipl = 1024 * 1024; break;
+                case 'g' :
+                case 'G' : multipl = 1024 * 1024 * 1024; break;
+            }
+            
+            if ( multipl > 1 )
+            {
+                char * src = string_dup( s, l - 1 );
+                if ( src != NULL )
+                {
+                    char * endptr;
+                    *value = strtol( src, &endptr, 0 ) * multipl;
+                    free( src );
+                }
+                else
+                    *value = dflt;
+            }
+            else
+            {
+                char * endptr;
+                *value = strtol( s, &endptr, 0 );
+            }
+        }
+    }
+    else
+        *value = dflt;
+    return rc;
+}
+
+
+rc_t get_fetch_ctx( Args * args, fetch_ctx * ctx )
+{
+    rc_t rc = 0;
+    uint32_t count;
+
+    ctx->url = NULL;
+    ctx->verbose = false;
+    rc = ArgsParamCount( args, &count );
+    if ( rc == 0 && count > 0 )
+    {
+        rc = ArgsParamValue( args, 0, (const void **)&ctx->url );
+        if ( rc == 0 )
+        {
+            if ( count > 1 )
+                rc = ArgsParamValue( args, 1, (const void **)&ctx->destination );
+            else
+                ctx->destination = NULL;
+        }
+    }
+
+    if ( rc == 0 ) rc = get_bool( args, OPTION_VERB, &ctx->verbose );
+    if ( rc == 0 ) rc = get_bool( args, OPTION_SHOW, &ctx->show_filesize );
+    if ( rc == 0 ) rc = get_str( args, OPTION_CACHE, &ctx->cache_file );
+    if ( rc == 0 ) rc = get_size_t( args, OPTION_CACHE_BLK, &ctx->cache_blk, 0 );
+    if ( rc == 0 ) rc = get_str( args, OPTION_PROXY, &ctx->proxy );
+    if ( rc == 0 ) rc = get_bool( args, OPTION_RAND, &ctx->random );
+    if ( rc == 0 ) rc = get_bool( args, OPTION_REP, &ctx->with_repeats );
+    if ( rc == 0 ) rc = get_bool( args, OPTION_CREPORT, &ctx->report_cache );
+    if ( rc == 0 ) rc = get_size_t( args, OPTION_BLOCK, &ctx->blocksize, ( 32 * 1024 ) );
+    if ( rc == 0 ) rc = get_size_t( args, OPTION_BUFFER, &ctx->buffer_size, 0 );
+    if ( rc == 0 ) rc = get_size_t( args, OPTION_SLEEP, &ctx->sleep_time, 0 );
+    if ( rc == 0 ) rc = get_size_t( args, OPTION_TIMEOUT, &ctx->timeout_time, 0 );
+    if ( rc == 0 ) rc = get_bool( args, OPTION_COMPLETE, &ctx->check_cache_complete );
+    if ( rc == 0 ) rc = get_bool( args, OPTION_CCOMPL, &ctx->check_completeness );
+    if ( rc == 0 ) rc = get_bool( args, OPTION_TRUNC, &ctx->truncate_cache );
+    if ( rc == 0 ) rc = get_size_t( args, OPTION_START, &ctx->start, 0 );
+    if ( rc == 0 ) rc = get_size_t( args, OPTION_COUNT, &ctx->count, 0 );
+    if ( rc == 0 ) rc = get_bool( args, OPTION_PROGRESS, &ctx->show_progress );
+    if ( rc == 0 ) rc = get_bool( args, OPTION_RELIABLE, &ctx->reliable );
+    if ( rc == 0 ) rc = get_bool( args, OPTION_FULL, &ctx->full_download );
+    
+    return rc;
+}
+
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args * args;
+    rc_t rc;
+
+    rc = ArgsMakeAndHandle ( &args, argc, argv, 1,
+                MyOptions, sizeof ( MyOptions ) / sizeof ( OptDef ) );
+    if ( rc == 0 )
+    {
+        fetch_ctx ctx;
+
+        rc = get_fetch_ctx( args, &ctx );
+        if ( rc == 0 )
+        {
+            if ( ctx.url == NULL )
+                KOutMsg( "URL is missing!\n" );    
+            else
+            {
+                KDirectory *dir;
+                rc = KDirectoryNativeDir ( &dir );
+                if ( rc == 0 )
+                {
+                    if ( ctx.check_cache_complete )
+                        rc = check_cache_complete( dir, &ctx );
+                    else if ( ctx.check_completeness )
+                        rc = check_cache_completeness( dir, &ctx );
+                    else if ( ctx.truncate_cache )
+                        rc = truncate_cache( dir, &ctx );
+                    else if ( ctx.show_filesize )
+                        rc = show_size( dir, &ctx );
+                    else if ( ctx.full_download )
+                        rc = full_download( dir, &ctx );
+                    else
+                        rc = fetch( dir, &ctx );
+
+                    KDirectoryRelease ( dir );
+                }
+            }
+        }
+        ArgsWhack ( args );
+    }
+    else
+        KOutMsg( "ArgsMakeAndHandle() failed %R\n", rc );
+
+    return rc;
+}
diff --git a/tools/kqsh/.gitignore b/tools/kqsh/.gitignore
new file mode 100644
index 0000000..e601f91
--- /dev/null
+++ b/tools/kqsh/.gitignore
@@ -0,0 +1,7 @@
+*.vers.h
+kqsh-kdb.c
+kqsh-kdb.h
+kqsh-vdb.c
+kqsh-vdb.h
+kqsh-sra.c
+kqsh-sra.h
diff --git a/tools/kqsh/Makefile b/tools/kqsh/Makefile
new file mode 100644
index 0000000..1d62078
--- /dev/null
+++ b/tools/kqsh/Makefile
@@ -0,0 +1,207 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/kqsh
+
+include $(TOP)/build/Makefile.env
+
+INT_TOOLS =
+
+EXT_TOOLS = \
+	kqsh
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs kqsh-thunks
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs kqsh-thunks
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+	@ rm -f $(SRCDIR)/kqsh-[kv]db.[ch]
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# kqsh-thunks
+#
+KDB_THUNK_SRC = \
+	manager.h \
+	database.h \
+	table.h \
+	column.h \
+	index.h \
+	meta.h \
+	namelist.h
+
+KDB_THUNK_INCS = \
+	$(addprefix kdb/,$(KDB_THUNK_SRC))
+
+KDB_THUNK_DEPS = \
+	$(addprefix $(ITF)/,$(KDB_THUNK_INCS)) \
+	kqsh-thunk.pl \
+	Makefile
+
+KDB_THUNK_OBJ = \
+	:KDBManager=mgr \
+	:KDatabase=db \
+	:KTable=tbl \
+	:KColumn=col \
+	:KColumnBlob=blob \
+	:KIndex=idx \
+	:KMetadata=meta \
+	:KMDataNode=node
+
+kqsh-kdb.c: $(KDB_THUNK_DEPS)
+	perl kqsh-thunk.pl -mkdb -I$(ITF) $(addprefix -i,$(KDB_THUNK_INCS)) \
+	  $(KDB_THUNK_OBJ) -h kqsh-kdb.h -c $@ || rm $@
+
+kqsh-kdb.h: kqsh-kdb.c
+
+VDB_THUNK_SRC = \
+	manager.h \
+	database.h \
+	schema.h \
+	table.h \
+	cursor.h
+
+VDB_THUNK_INCS = \
+	$(addprefix vdb/,$(VDB_THUNK_SRC))
+
+VDB_THUNK_DEPS = \
+	$(addprefix $(ITF)/,$(VDB_THUNK_INCS)) \
+	kqsh-thunk.pl \
+	Makefile
+
+VDB_THUNK_OBJ = \
+	:VDBManager=mgr \
+	VSchemaRuntimeTable=srtt \
+	VSchema=schema \
+	VTypedecl=td \
+	VTypedesc=tdesc \
+	:VDatabase=db \
+	:VTable=tbl \
+	:VCursor=curs
+
+kqsh-vdb.c: $(VDB_THUNK_DEPS)
+	perl kqsh-thunk.pl -mvdb -I$(ITF) $(addprefix -i,$(VDB_THUNK_INCS)) \
+	  $(VDB_THUNK_OBJ) -h kqsh-vdb.h -c $@ || rm $@
+
+kqsh-vdb.h: kqsh-vdb.c
+
+SRA_THUNK_SRC = \
+	sradb.h \
+	wsradb.h \
+	sraschema.h
+
+SRA_THUNK_INCS = \
+	$(addprefix sra/,$(SRA_THUNK_SRC))
+
+SRA_THUNK_DEPS = \
+	$(addprefix $(ITF)/,$(SRA_THUNK_INCS)) \
+	kqsh-thunk.pl \
+	Makefile
+
+SRA_THUNK_OBJ = \
+	:SRAMgr=mgr \
+	SRANamelist=nmlist \
+	:SRATable=tbl \
+	SRAColumn=col \
+	VDBManager=vmgr
+
+kqsh-sra.c: $(SRA_THUNK_DEPS)
+	perl kqsh-thunk.pl -msra -I$(ITF) $(addprefix -i,$(SRA_THUNK_INCS)) \
+	  $(SRA_THUNK_OBJ) -h kqsh-sra.h -c $@ || rm $@
+
+kqsh-sra.h: kqsh-sra.c
+
+kqsh-thunks: kqsh-kdb.h kqsh-vdb.h kqsh-sra.h
+
+#-------------------------------------------------------------------------------
+# kqsh-load
+#  special rules to tell kqsh how to load libraries
+#
+
+#KQSH_LIBNAMES = \
+	-DLIBKDB=$(LPFX)kdb.$(SHLX) \
+	-DLIBWKDB=$(LPFX)wkdb.$(SHLX) \
+	-DLIBVDB=$(LPFX)vdb.$(SHLX) \
+	-DLIBWVDB=$(LPFX)wvdb.$(SHLX) \
+	-DLIBSRADB=$(LPFX)sradb.$(SHLX) \
+	-DLIBWSRADB=$(LPFX)wsradb.$(SHLX)
+
+KQSH_LIBNAMES = \
+	-DLIBNCBI_VDB=$(LPFX)ncbi-vdb.$(SHLX) \
+	-DLIBNCBI_WVDB=$(LPFX)ncbi-wvdb.$(SHLX)
+
+kqsh-load.$(OBJX): $(SRCDIR)/kqsh-load.c
+	$(CC) -o $@ $(OPT) $(KQSH_LIBNAMES) -D_LOGGING $<
+
+
+#-------------------------------------------------------------------------------
+# kqsh - query shell
+#
+KQSH_SRC = \
+	kqsh-print \
+	kqsh-tok \
+	kqsh-parse \
+	kqsh-alter \
+	kqsh-close \
+	kqsh-help \
+	kqsh-load \
+	kqsh-open \
+	kqsh-create \
+	kqsh-show \
+	kqsh-write \
+	kqsh-kdb \
+	kqsh-vdb \
+	kqsh-sra \
+	kqsh
+
+KQSH_OBJ = \
+	$(addsuffix .$(OBJX),$(KQSH_SRC))
+
+KQSH_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-vdb \
+
+
+$(BINDIR)/kqsh: $(KQSH_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(KQSH_LIB)
diff --git a/tools/kqsh/kqsh-alter.c b/tools/kqsh/kqsh-alter.c
new file mode 100644
index 0000000..3df5743
--- /dev/null
+++ b/tools/kqsh/kqsh-alter.c
@@ -0,0 +1,347 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "kqsh-priv.h"
+#include "kqsh-tok.h"
+#include "kqsh-kdb.h"
+#include "kqsh-vdb.h"
+
+#include <klib/symbol.h>
+#include <klib/symtab.h>
+#include <klib/token.h>
+
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+
+/* alter cursor
+ *  'alter <cursor> add column [ ( <typedecl> ) ] NAME;'
+ *
+ *  all data after the 'column' keyword are gathered into
+ *  ( typedecl, name ) pairs. we are going to allow comma
+ *  separation, but otherwise just gather everything up to
+ *  the semi-colon.
+ */
+static
+rc_t kqsh_alter_cursor_add_column ( KSymTable *tbl, KTokenSource *src, KToken *t, KSymbol *cursor )
+{
+    rc_t rc;
+
+    do
+    {
+        size_t i;
+        uint32_t idx;
+        char coldecl [ 256 ];
+
+        for ( i = 0; i < sizeof coldecl - 1; )
+        {
+            /* end of column */
+            if ( t -> id == eSemiColon || t -> id == eComma )
+                break;
+
+            /* accumulate */
+            i += string_copy ( & coldecl [ i ],
+                sizeof coldecl - i, t -> str . addr, t -> str . size );
+
+            next_token ( tbl, src, t );
+        }
+
+        /* the name needs to fit in our buffer */
+        if ( i == sizeof coldecl - 1 )
+        {
+            rc = RC ( rcExe, rcCursor, rcUpdating, rcName, rcExcessive );
+            if ( interactive )
+            {
+                kqsh_printf ( "this is really hard to believe, but you managed to request\n"
+                              "a column with a %u byte expression. please stop trying to abuse me.\n",
+                              ( unsigned int ) i );
+            }
+            else
+            {
+                LOGERR ( klogErr, rc, "failed to add column to cursor" );
+            }
+            return rc;
+        }
+
+        /* perform the task */
+        rc = _VCursorAddColumn ( cursor -> u . obj, & idx, coldecl );
+        if ( rc != 0 )
+        {
+            PLOGERR ( klogErr,  (klogErr, rc, "cannot add column '$(expr)' to cursor '$(curs)'",
+                      "expr=%s,curs=%.*s"
+                      , coldecl
+                                 , ( int ) cursor -> name . size, cursor -> name . addr));
+        }
+
+        else if ( interactive )
+        {
+            kqsh_printf ( "added column '%s' ( idx %u ) to cursor '%N' ( %p )\n"
+                          , coldecl
+                          , idx
+                          , cursor
+                          , cursor -> u . obj
+                );
+        }
+    }
+    while ( t -> id == eComma );
+
+    if ( t -> id != eSemiColon )
+        return expected ( t, klogErr, ";" );
+
+    return 0;
+}
+
+static
+rc_t kqsh_alter_cursor_add ( KSymTable *tbl, KTokenSource *src, KToken *t, KSymbol *cursor )
+{
+    switch ( t -> id )
+    {
+    case kw_column:
+        return kqsh_alter_cursor_add_column ( tbl, src, next_token ( tbl, src, t ), cursor );
+    }
+
+    return expected ( t, klogErr, "column" );
+}
+
+static
+rc_t kqsh_alter_cursor ( KSymTable *tbl, KTokenSource *src, KToken *t, KSymbol *cursor )
+{
+    switch ( t -> id )
+    {
+    case kw_add:
+        return kqsh_alter_cursor_add ( tbl, src, next_token ( tbl, src, t ), cursor );
+    }
+
+    return expected ( t, klogErr, "add" );
+}
+
+/* alter schema add path
+ *  'alter <schema> add include [ path ] STRING'
+ *  'alter <schema> add path STRING'
+ */
+static
+rc_t kqsh_alter_schema_add_path ( KSymTable *tbl, KTokenSource *src, KToken *t, KSymbol *sym )
+{
+    rc_t rc;
+    String path;
+    struct VSchema *schema = ( void* ) sym -> u . obj;
+
+    switch ( t -> id )
+    {
+    case eString:
+    case eEscapedString:
+        path = t -> str;
+        path . addr += 1;
+        path . size -= 2;
+        break;
+
+    case eUntermString:
+    case eUntermEscapedString:
+        CONST_STRING ( & t -> str, "<unterminated string>" );
+    default:
+        return expected ( t, klogErr, "path string" );
+    }
+
+    /* consume semi-colon */
+    if ( next_token ( tbl, src, t ) -> id != eSemiColon )
+        return expected ( t, klogErr, ";" );
+
+    rc = _VSchemaAddIncludePath ( schema, "%.*s", ( int ) path . size, path . addr );
+    if ( rc != 0 )
+    {
+        PLOGERR ( klogErr,  (klogErr, rc, "cannot add search path '$(path)' to schema '$(name)'",
+                  "path=%.*s,name=%.*s"
+                  , ( int ) path . size, path . addr
+                             , ( int ) sym -> name . size, sym -> name . addr));
+    }
+    else if ( interactive )
+    {
+        kqsh_printf ( "added search path '%S' to schema '%N' ( %p )\n",
+                      & path, sym, schema );
+    }
+
+    return rc;
+}
+
+/* alter schema add text
+ *  'alter <schema> add text STRING'
+ */
+static
+rc_t kqsh_alter_schema_add_text ( KSymTable *tbl, KTokenSource *src, KToken *t, KSymbol *sym )
+{
+    rc_t rc;
+    String text;
+    struct VSchema *schema = ( void* ) sym -> u . obj;
+
+    switch ( t -> id )
+    {
+    case eString:
+    case eEscapedString:
+        text = t -> str;
+        text . addr += 1;
+        text . size -= 2;
+        break;
+
+    case eUntermString:
+    case eUntermEscapedString:
+        CONST_STRING ( & t -> str, "<unterminated string>" );
+    default:
+        return expected ( t, klogErr, "schema text string" );
+    }
+
+    /* consume semi-colon */
+    if ( next_token ( tbl, src, t ) -> id != eSemiColon )
+        return expected ( t, klogErr, ";" );
+
+    /* parse text */
+    rc = _VSchemaParseText ( schema, "kqsh-console", text . addr, text . size );
+    if ( rc != 0 )
+    {
+        PLOGERR ( klogErr,  (klogErr, rc, "cannot add text into schema '$(name)'",
+                             "name=%.*s", ( int ) sym -> name . size, sym -> name . addr));
+    }
+    else if ( interactive )
+    {
+        kqsh_printf ( "added text to schema '%N' ( %p )\n", sym, schema );
+    }
+
+    return rc;
+}
+
+/* alter schema add
+ */
+static
+rc_t kqsh_alter_schema_add ( KSymTable *tbl, KTokenSource *src, KToken *t, KSymbol *schema )
+{
+    switch ( t -> id )
+    {
+    case kw_include:
+        if ( next_token ( tbl, src, t ) -> id == kw_path )
+    case kw_path:
+            next_token ( tbl, src, t );
+        return kqsh_alter_schema_add_path ( tbl, src, t, schema );
+    case kw_text:
+        return kqsh_alter_schema_add_text ( tbl, src, next_token ( tbl, src, t ), schema );
+    }
+
+    return expected ( t, klogErr, "include, path or text" );
+}
+
+
+/* alter schema load
+ *  'alter <schema> load STRING'
+ */
+static
+rc_t kqsh_alter_schema_load ( KSymTable *tbl, KTokenSource *src, KToken *t, KSymbol *sym )
+{
+    rc_t rc;
+    String path;
+    struct VSchema *schema = ( void* ) sym -> u . obj;
+
+    switch ( t -> id )
+    {
+    case eString:
+    case eEscapedString:
+        path = t -> str;
+        path . addr += 1;
+        path . size -= 2;
+        break;
+
+    case eUntermString:
+    case eUntermEscapedString:
+        CONST_STRING ( & t -> str, "<unterminated string>" );
+    default:
+        return expected ( t, klogErr, "path string" );
+    }
+
+    /* consume semi-colon */
+    if ( next_token ( tbl, src, t ) -> id != eSemiColon )
+        return expected ( t, klogErr, ";" );
+
+    rc = _VSchemaParseFile ( schema, "%.*s", ( int ) path . size, path . addr );
+    if ( rc != 0 )
+    {
+        PLOGERR ( klogErr,  (klogErr, rc, "cannot load file '$(path)' into schema '$(name)'",
+                  "path=%.*s,name=%.*s"
+                  , ( int ) path . size, path . addr
+                             , ( int ) sym -> name . size, sym -> name . addr));
+    }
+    else if ( interactive )
+    {
+        kqsh_printf ( "loaded file '%S' into schema '%N' ( %p )\n",
+                      & path, sym, schema );
+    }
+
+    return rc;
+}
+
+/* alter schema
+ */
+static
+rc_t kqsh_alter_schema ( KSymTable *tbl, KTokenSource *src, KToken *t, KSymbol *schema )
+{
+    switch ( t -> id )
+    {
+    case kw_add:
+        return kqsh_alter_schema_add ( tbl, src, next_token ( tbl, src, t ), schema );
+    case kw_load:
+        return kqsh_alter_schema_load ( tbl, src, next_token ( tbl, src, t ), schema );
+    }
+
+    return expected ( t, klogErr, "add or load" );
+}
+
+
+/* alter
+ */
+rc_t kqsh_alter ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    KSymbol *sym = t -> sym;
+
+    switch ( t -> id )
+    {
+    case kw_cursor:
+        if ( next_token ( tbl, src, t ) -> id != obj_VCursor )
+            break;
+        sym = t -> sym;
+    case obj_VCursor:
+        return kqsh_alter_cursor ( tbl, src, next_token ( tbl, src, t ), sym );
+
+    case kw_schema:
+        if ( next_token ( tbl, src, t ) -> id != obj_VSchema )
+            break;
+        sym = t -> sym;
+    case obj_VSchema:
+        return kqsh_alter_schema ( tbl, src, next_token ( tbl, src, t ), sym );
+    }
+
+    return expected ( t, klogErr, "cursor or schema" );
+}
diff --git a/tools/kqsh/kqsh-close.c b/tools/kqsh/kqsh-close.c
new file mode 100644
index 0000000..244a407
--- /dev/null
+++ b/tools/kqsh/kqsh-close.c
@@ -0,0 +1,186 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "kqsh-priv.h"
+#include "kqsh-tok.h"
+#include "kqsh-kdb.h"
+#include "kqsh-vdb.h"
+#include "kqsh-sra.h"
+
+#include <klib/container.h>
+#include <klib/symbol.h>
+#include <klib/symtab.h>
+#include <klib/token.h>
+
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+/* close row
+ */
+static
+rc_t kqsh_close_row ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    rc_t rc = 0;
+    KSymbol *curs;
+
+    /* accept optional "on" keyword */
+    if ( next_token ( tbl, src, t ) -> id == kw_on )
+        next_token ( tbl, src, t );
+
+    /* expect cursor object */
+    switch ( t -> id )
+    {
+    case obj_VCursor:
+        curs = t -> sym;
+        break;
+    default:
+        return expected ( t, klogErr, "cursor" );
+    }
+
+    if ( next_token ( tbl, src, t ) -> id != eSemiColon )
+        return expected ( t, klogErr, ";" );
+
+    switch ( curs -> type )
+    {
+    case obj_VCursor:
+        rc = _VCursorCloseRow ( curs -> u . obj );
+        break;
+    }
+
+    if ( rc != 0 )
+    {
+        PLOGERR ( klogInt,  (klogInt, rc,
+                  "failed to close row on cursor '$(name)' ( $(addr) )"
+                  , "name=%.*s,addr=0x%zX"
+                  , ( int ) curs -> name . size, curs -> name . addr
+                  , ( size_t ) curs -> u . obj ));
+    }
+    else if ( interactive )
+    {
+        kqsh_printf ( "closed row on cursor '%N' ( %p )\n"
+                      , curs, curs -> u . obj );
+    }
+
+    return rc;
+}
+
+
+/* whackobj
+ *  whacks created/opened objects
+ */
+void CC kqsh_whackobj ( BSTNode *n, void *ignore )
+{
+    KSymbol *sym = ( KSymbol* ) n;
+
+    switch ( sym -> type )
+    {
+    case obj_KDBManager:
+        _KDBManagerRelease ( sym -> u . obj );
+        break;
+    case obj_VDBManager:
+        _VDBManagerRelease ( sym -> u . obj );
+        break;
+    case obj_SRAManager:
+        _SRAMgrRelease ( sym -> u . obj );
+        break;
+    case obj_VSchema:
+        _VSchemaRelease ( sym -> u . obj );
+        break;
+
+    case obj_KTable:
+        _KTableRelease ( sym -> u . obj );
+        break;
+    case obj_VTable:
+        _VTableRelease ( sym -> u . obj );
+        break;
+
+    case obj_VCursor:
+        _VCursorRelease ( sym -> u . obj );
+        break;
+    }
+
+    KSymbolWhack ( & sym -> n, ignore );
+}
+
+/* close
+ */
+rc_t kqsh_close ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    KSymbol *sym;
+
+    /* handle close row */
+    if ( t -> id == kw_row )
+        return kqsh_close_row ( tbl, src, t );
+
+    /* expect normal object */
+    sym = t -> sym;
+
+    if ( sym == NULL || t -> id < rsrv_first )
+        return expected ( t, klogErr, "object id" );
+
+    if ( next_token ( tbl, src, t ) -> id != eSemiColon )
+        return expected ( t, klogErr, ";" );
+
+    if ( sym -> type >= obj_first )
+    {
+        if ( interactive )
+        {
+            const char *type;
+            switch ( sym -> type )
+            {
+            case obj_KDBManager:
+                type = "kdb manager"; break;
+            case obj_VDBManager:
+                type = "vdb manager"; break;
+            case obj_VSchema:
+                type = "schema"; break;
+            case obj_KTable:
+            case obj_VTable:
+                type = "table"; break;
+            case obj_VCursor:
+                type = "cursor"; break;
+            default:
+                type = "object";
+            }
+
+            kqsh_printf ( "closing %s '%N' ( %p )\n", type, sym, sym -> u . obj );
+        }
+
+        KSymTableRemoveSymbol ( tbl, sym );
+        kqsh_whackobj ( & sym -> n, NULL );
+    }
+    else if ( interactive )
+    {
+        kqsh_printf ( "reserved object '%N' is not open\n", sym );
+    }
+
+    return 0;
+}
diff --git a/tools/kqsh/kqsh-create.c b/tools/kqsh/kqsh-create.c
new file mode 100644
index 0000000..290b02e
--- /dev/null
+++ b/tools/kqsh/kqsh-create.c
@@ -0,0 +1,680 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "kqsh-priv.h"
+#include "kqsh-tok.h"
+#include "kqsh-kdb.h"
+#include "kqsh-vdb.h"
+#include "kqsh-sra.h"
+
+#include <klib/symbol.h>
+#include <klib/symtab.h>
+#include <klib/token.h>
+
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+
+/* create cursor
+ *
+ *  'create cursor ID on TBL [ for update ];'
+ */
+static
+rc_t kqsh_create_cursor ( KSymTable *tbl, KTokenSource *src, KToken *t, uint32_t mode )
+{
+    rc_t rc = 0;
+
+    void *obj;
+    String name;
+    bool for_write;
+    uint32_t obj_type;
+    KSymbol *using, *existing;
+
+    /* looking for a cursor name */
+    switch ( t -> id )
+    {
+    case eIdent:
+    case obj_VCursor:
+        name = t -> str;
+        existing = t -> sym;
+        break;
+    default:
+        return expected ( t, klogErr, "cursor name" );
+    }
+
+    /* get table */
+    if ( next_token ( tbl, src, t ) -> id != kw_on )
+        return expected ( t, klogErr, "on");
+
+    switch ( next_token ( tbl, src, t ) -> id )
+    {
+    case obj_VTable:
+        obj_type = obj_VCursor;
+        using = t -> sym;
+        break;
+    default:
+        return expected ( t, klogErr, "cursor capable table" );
+    }
+
+    /* look for update flag */
+    for_write = false;
+    if ( next_token ( tbl, src, t ) -> id == kw_for )
+    {
+        if ( next_token ( tbl, src, t ) -> id != kw_update )
+            return expected ( t, klogErr, "update" );
+        if ( read_only )
+        {
+            rc = RC ( rcExe, rcTable, rcOpening, rcMgr, rcReadonly );
+            if ( interactive )
+            {
+                kqsh_printf ( "you are executing in read-only mode.\n"
+                              "cannot create cursor for write.\n"
+                              "you can relaunch kqsh with the '-u' option to enable updates.\n"
+                    );
+            }
+            else
+            {
+                PLOGERR ( klogErr,  (klogErr, rc, "failed to create cursor '$(name)'",
+                                     "name=%.*s", ( int ) name . size, name . addr ));
+            }
+            return rc;
+        }
+
+        for_write = true;
+        next_token ( tbl, src, t );
+    }
+
+    /* now we're done parsing */
+    if ( t -> id != eSemiColon )
+        return expected ( t, klogErr, ";" );
+
+    if ( existing != NULL ) switch ( mode )
+    {
+    case kcmOpen:
+        if ( interactive )
+        {
+            kqsh_printf ( "opened cursor '%N' ( %p )\n"
+                          , existing, existing -> u . obj );
+        }
+        return 0;
+    case kcmInit:
+        kqsh_whackobj ( & existing -> n, NULL );
+        break;
+    case kcmCreate:
+        rc = RC ( rcExe, rcTable, rcOpening, rcCursor, rcExists );
+        if ( interactive )
+            kqsh_printf ( "cursor '%N' already exists.\n", existing );
+        else
+        {
+            PLOGERR ( klogErr,  (klogErr, rc, "cursor '$(name)' could not be created",
+                                 "name=%.*s", ( int ) existing -> name . size, existing -> name . addr ));
+        }
+        return rc;
+    }
+
+    /* create the cursor */
+    switch ( using -> type )
+    {
+    case obj_VTable:
+        rc = for_write ?
+            _VTableCreateCursorWrite ( ( void* ) using -> u . obj, ( VCursor** ) & obj, kcmInsert ):
+            _VTableCreateCursorRead ( using -> u . obj, ( const VCursor** ) & obj );
+        break;
+    }
+
+    if ( rc == 0 )
+    {
+        KSymbol *sym;
+
+        /* create symbol */
+        rc = KSymTableCreateSymbol ( tbl, & sym, & name, obj_type, obj );
+        if ( rc == 0 )
+        {
+            if ( interactive )
+            {
+                kqsh_printf ( "created cursor '%N' ( %p )\n"
+                              , sym, sym -> u . obj );
+            }
+            return 0;
+        }
+
+        /* whack instance */
+        switch ( obj_type )
+        {
+        case obj_VCursor:
+            _VCursorRelease ( obj );
+            break;
+        }
+    }
+
+    PLOGERR ( klogInt,  (klogInt, rc,
+              "failed to create cursor '$(name)' on $(targ)"
+              , "name=%.*s,targ=%.*s"
+              , ( int ) name . size, name . addr
+                         , ( int ) using -> name . size, using -> name . addr ));
+
+    return rc;
+}
+
+/* create table
+ *
+ *  'create table PATH [ as ID ] [ with schema ID[.ID] ] [ using ID ];'
+ */
+static
+rc_t kqsh_create_table ( KSymTable *tbl, KTokenSource *src, KToken *t, uint32_t mode )
+{
+    rc_t rc = 0;
+    /* bool have_as; */
+    String path, name;
+
+    KSymbol *schema;
+    String schema_tbl;
+    char schema_tbl_str [ 256 ];
+
+    KSymbol *using, *existing;
+
+    void *obj;
+    uint32_t obj_type = 0;
+
+    /* looking for a table path */
+    if ( t -> id != eString )
+        return expected ( t, klogErr, "table path string or name string" );
+    StringSubstr ( & t -> str, & path, 1, t -> str . len - 2 );
+
+    /* look for kqsh object id */
+    if ( next_token ( tbl, src, t ) -> id != kw_as )
+    {
+        /* not renamed - take path leaf as kqsh variable name */
+        const char *slash = string_rchr ( path . addr, path . size, '/' );
+        if ( slash ++ == NULL )
+            name = path;
+        else
+        {
+            size_t size = path . size - ( slash - path . addr );
+            StringInit ( & name, slash, size, string_len ( slash, size ) );
+        }
+
+        existing = KSymTableFind ( tbl, & name );
+        /* have_as = false; */
+    }
+
+    /* require a name of some sort, allow redefine for the moment */
+    else if ( next_token ( tbl, src, t ) -> id != eIdent && t -> sym == NULL )
+        return expected ( t, klogErr, "table id" );
+    else
+    {
+        name = t -> str;
+        existing = t -> sym;
+        next_token ( tbl, src, t );
+        /* have_as = true; */
+    }
+
+    /* check to see if name is in use */
+    if ( existing != NULL )
+    {
+        KMetadata *meta;
+
+        /* use a kludgy test for being open for update */
+        switch ( existing -> type )
+        {
+        case obj_KTable:
+            rc = _KTableOpenMetadataUpdate ( ( void* ) existing -> u . obj, & meta );
+            break;
+        case obj_VTable:
+            rc = _VTableOpenMetadataUpdate ( ( void* ) existing -> u . obj, & meta );
+            break;
+        default:
+            return expected ( t, klogErr, "table id" );
+        }
+
+        _KMetadataRelease ( meta );
+        if ( rc != 0 )
+        {
+            /* table is open, but is ( most likely ) read-only */
+            if ( interactive )
+                kqsh_printf ( "table '%N' is currently open for read", existing );
+            else
+            {
+                rc = RC ( rcExe, rcTable, rcCreating, rcTable, rcBusy );
+                PLOGERR ( klogErr,  (klogErr, rc, "cannot create table '$(name)'", "name=%.*s"
+                                     , ( int ) name . size, name . addr ));
+                return rc;
+            }
+        }
+    }
+
+    /* look for schema spec */
+    schema = NULL;
+    CONST_STRING ( & schema_tbl, "" );
+    if ( t -> id == kw_with )
+    {
+        /* should see keyword 'schema' */
+        if ( next_token ( tbl, src, t ) -> id == kw_schema )
+            next_token ( tbl, src, t );
+
+        /* accept any id, but look for schema object */
+        if ( t -> id == obj_VSchema )
+        {
+            schema = t -> sym;
+            if ( next_token ( tbl, src, t ) -> id == ePeriod )
+            {
+                if ( next_token ( tbl, src, t ) -> id != eIdent && t -> sym == NULL )
+                    return expected ( t, klogErr, "schema table id" );
+                schema_tbl = t -> str;
+                next_token ( tbl, src, t );
+            }
+        }
+        else if ( t -> id != eIdent && t -> sym == NULL )
+            return expected ( t, klogErr, "schema table id" );
+        else
+        {
+            schema_tbl = t -> str;
+            next_token ( tbl, src, t );
+        }
+    }
+
+    /* look for 'using' clause' */
+    using = NULL;
+    if ( t -> id == kw_using )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case obj_KDBManager:
+            /* if table exists but is not a KTable, it's an error */
+            if ( existing != NULL ) switch ( existing -> type )
+            {
+            case obj_KTable:
+                break;
+            case obj_VTable:
+                return expected ( t, klogErr, "vdb manager or database" );
+            }
+            /* both schema and tbl name require vdb+ manager */
+            if ( schema != NULL && schema_tbl . len != 0 )
+                return expected ( t, klogErr, "schema capable manager" );
+            /* schema alone could be mgr with default name
+               or db where table name collides with kqsh id */
+            if ( schema != NULL )
+                return expected ( t, klogErr, "schema capable manager or database" );
+            /* no schema but tbl name requires database */
+            if ( schema_tbl . len != 0 )
+                return expected ( t, klogErr, "schema capable database" );
+
+            /* this is the target object */
+            using = t -> sym;
+            break;
+
+        case obj_VDBManager:
+            /* if table exists but is not a VTable, it's an error */
+            if ( existing != NULL ) switch ( existing -> type )
+            {
+            case obj_KTable:
+                return expected ( t, klogErr, "kdb manager or database" );
+            case obj_VTable:
+                break;
+            }
+            /* neither schema nor tbl requires kdb mgr or db */
+            if ( schema == NULL && schema_tbl . len == 0 )
+                return expected ( t, klogErr, "kdb manager or database" );
+            /* table name alone requires vdb+ database */
+            if ( schema == NULL )
+                return expected ( t, klogErr, "schema capable database" );
+
+            /* schema alone implies default table
+               schema plus table name is standard */
+            using = t -> sym;
+            break;
+
+#if 0
+        case obj_VDatabase:
+            /* if table exists but is not a VTable, it's an error */
+            if ( existing != NULL ) switch ( existing -> type )
+            {
+            case obj_KTable:
+                return expected ( t, klogErr, "kdb manager or database" );
+            case obj_VTable:
+                break;
+            }
+            /* neither schema nor tbl requires kdb mgr or db */
+            if ( schema == NULL && schema_tbl . len == 0 )
+                return expected ( t, klogErr, "kdb manager or database" );
+            /* schema alone is reinterpreted as table name */
+            if ( schema_tbl . len == 0 )
+            {
+                schema_tbl = schema -> name;
+                schema = NULL;
+            }
+            /* schema plus table name requires vdb+ manager */
+            else if ( schema != NULL )
+                return expected ( t, klogErr, "schema capable manager" );
+
+            /* database with no schema but table name */
+            using = t -> sym;
+            break;
+#endif
+        default:
+            if ( schema == NULL )
+            {
+                return expected ( t, klogErr, ( schema_tbl . len == 0 ) ?
+                    "kdb manager or database" : "schema capable database" );
+            }
+
+            return expected ( t, klogErr, ( schema_tbl . len == 0 ) ?
+                "schema capable manager or database" : "schema capable manager" );
+        }
+
+        next_token ( tbl, src, t );
+    }
+
+    /* expect target object */
+    if ( using == NULL )
+    {
+        if ( schema == NULL )
+        {
+            return expected ( t, klogErr, ( schema_tbl . len == 0 ) ?
+                "kdb manager or database" : "schema capable database" );
+        }
+
+        return expected ( t, klogErr, ( schema_tbl . len == 0 ) ?
+            "schema capable manager or database" : "schema capable manager" );
+    }
+
+    /* close off statement */
+    if ( t -> id != eSemiColon )
+        return expected ( t, klogErr, ";" );
+
+    /* if in read-only mode, this whole thing will fail */
+    if ( read_only )
+    {
+        rc = RC ( rcExe, rcTable, rcOpening, rcMgr, rcReadonly );
+        if ( interactive )
+        {
+            kqsh_printf ( "you are executing in read-only mode.\n"
+                          "table creation is not supported.\n"
+                          "you can relaunch kqsh with the '-u' option to enable updates.\n"
+                );
+        }
+        else
+        {
+            PLOGERR ( klogErr,  (klogErr, rc, "failed to create table '$(path)' as '$(name)'",
+                      "path=%.*s,name=%.*s"
+                      , ( int ) path . size, path . addr
+                                 , ( int ) name . size, name . addr ));
+        }
+        return rc;
+    }
+
+    /* prepare schema table string */
+    if ( schema_tbl . size >= sizeof schema_tbl_str )
+    {
+        rc = RC ( rcExe, rcTable, rcCreating, rcString, rcExcessive );
+        PLOGERR ( klogErr,  (klogErr, rc, "schema name length = $(len)", "len=%zu", schema_tbl . size ));
+        return rc;
+    }
+    string_copy ( schema_tbl_str, sizeof schema_tbl_str,
+                  schema_tbl . addr, schema_tbl . size );
+
+
+    /* handle existing table */
+    if ( existing != NULL )  switch ( mode )
+    {
+    case kcmOpen:
+        if ( interactive )
+        {
+            kqsh_printf ( "opened table '%N' ( %p )\n"
+                          , existing, existing -> u . obj );
+        }
+        return 0;
+    case kcmInit:
+        kqsh_whackobj ( & existing -> n, NULL );
+        break;
+    case kcmCreate:
+        rc = RC ( rcExe, rcTable, rcCreating, rcTable, rcExists );
+        if ( interactive )
+            kqsh_printf ( "table '%N' is already open", existing );
+        else
+        {
+            PLOGERR ( klogErr,  (klogErr, rc, "table '$(name)' could not be created",
+                                 "name=%.*s", ( int ) existing -> name . size, existing -> name . addr ));
+        }
+        return rc;
+    }
+
+    /* dispatch */
+    switch ( using -> type )
+    {
+    case obj_KDBManager:
+        obj_type = obj_KTable;
+        rc = _KDBManagerCreateTable ( ( void* ) using -> u . obj, ( KTable** ) & obj,
+            mode | kcmParents,"%.*s", ( int ) path . size, path . addr );
+        break;
+    case obj_VDBManager:
+        obj_type = obj_VTable;
+        assert ( schema != NULL );
+        rc = _VDBManagerCreateTable ( ( void* ) using -> u . obj, ( VTable** ) & obj,
+            schema -> u . obj, schema_tbl_str [ 0 ] ? schema_tbl_str : NULL,
+            mode | kcmParents,"%.*s", ( int ) path . size, path . addr );
+        break;
+    }
+
+    if ( rc == 0 )
+    {
+        KSymbol *sym;
+
+        /* create symbol */
+        rc = KSymTableCreateSymbol ( tbl, & sym, & name, obj_type, obj );
+        if ( rc == 0 )
+        {
+            if ( interactive )
+            {
+                kqsh_printf ( "created table '%N' ( %p )\n"
+                              , sym, sym -> u . obj );
+            }
+            return 0;
+        }
+
+        /* whack instance */
+        switch ( obj_type )
+        {
+        case obj_KTable:
+            _KTableRelease ( obj );
+            break;
+        case obj_VTable:
+            _VTableRelease ( obj );
+            break;
+        }
+    }
+
+    PLOGERR ( klogInt,  (klogInt, rc,
+              "failed to create table '$(name)' using $(targ)"
+              , "name=%.*s,targ=%.*s"
+              , ( int ) name . size, name . addr
+                         , ( int ) using -> name . size, using -> name . addr ));
+
+    return rc;
+}
+
+
+/* create schema
+ *
+ *  'create schema [ as ] ID [ using MGR ];'
+ */
+static
+rc_t kqsh_create_schema ( KSymTable *tbl, KTokenSource *src, KToken *t, uint32_t mode )
+{
+    rc_t rc = 0;
+    String name;
+    KSymbol *existing;
+    const KSymbol *mgr;
+    struct VSchema *schema;
+
+    /* shouldn't be here, but don't choke on it */
+    if ( t -> id == kw_as )
+        next_token ( tbl, src, t );
+
+    /* get schema object name */
+    switch ( t -> id )
+    {
+    case eIdent:
+    case obj_VSchema:
+        name = t -> str;
+        existing = t -> sym;
+        break;
+    default:
+        return expected ( t, klogErr, "schema name" );
+    }
+
+    /* there is no implicit mgr yet */
+    mgr = NULL;
+
+    /* get using clause */
+    if ( next_token ( tbl, src, t ) -> id == kw_using )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case obj_VDBManager:
+        case obj_SRAManager:
+            mgr = t -> sym;
+            break;
+        default:
+            return expected ( t, klogErr, "open vdb or sra manager" );
+        }
+
+        next_token ( tbl, src, t );
+    }
+    else if ( mgr == NULL )
+    {
+        return expected ( t, klogErr, "using" );
+    }
+
+    /* expect ';' */
+    if ( t -> id != eSemiColon )
+        return expected ( t, klogErr, ";" );
+
+    /* if the schema already exists, then look at mode */
+    if ( existing != NULL ) switch ( mode )
+    {
+    case kcmOpen:
+        if ( interactive )
+        {
+            kqsh_printf ( "opened schema '%N' ( %p )\n"
+                          , existing, existing -> u . obj );
+        }
+        return 0;
+    case kcmInit:
+        kqsh_whackobj ( & existing -> n, NULL );
+        break;
+    case kcmCreate:
+        rc = RC ( rcExe, rcSchema, rcCreating, rcSchema, rcExists );
+        if ( interactive )
+            kqsh_printf ( "schema '%N' already exists", existing );
+        else
+        {
+            PLOGERR ( klogErr,  (klogErr, rc, "schema '$(name)' could not be created",
+                                 "name=%.*s", ( int ) existing -> name . size, existing -> name . addr ));
+        }
+        return rc;
+    }
+
+    /* now process the request */
+    switch ( mgr -> type )
+    {
+    case obj_VDBManager:
+        rc = _VDBManagerMakeSchema ( mgr -> u . obj, & schema );
+        break;
+    case obj_SRAManager:
+        rc = _SRAMgrMakeSRASchema ( mgr -> u . obj, & schema );
+        break;
+    }
+
+    if ( rc == 0 )
+    {
+        KSymbol *sym;
+
+        /* create symbol */
+        rc = KSymTableCreateSymbol ( tbl, & sym, & name, obj_VSchema, schema );
+        if ( rc == 0 )
+        {
+            if ( interactive )
+            {
+                kqsh_printf ( "created schema '%N' ( %p )\n"
+                              , sym, sym -> u . obj );
+            }
+            return 0;
+        }
+
+        /* whack instance */
+        _VSchemaRelease ( schema );
+    }
+
+    PLOGERR ( klogInt,  (klogInt, rc,
+              "failed to create schema '$(name)' using $(mgr)"
+              , "name=%.*s,mgr=%.*s"
+              , ( int ) name . size, name . addr
+                         , ( int ) mgr -> name . size, mgr -> name . addr ));
+
+    return rc;
+}
+
+/* create
+ */
+rc_t kqsh_create ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    uint32_t mode = kcmCreate;
+
+    if ( t -> id == kw_or )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case kw_replace:
+            mode = kcmInit;
+            break;
+        case kw_open:
+            mode = kcmOpen;
+            break;
+        default:
+            return expected ( t, klogErr, "replace or open" );
+        }
+
+        next_token ( tbl, src, t );
+    }
+
+    switch ( t -> id )
+    {
+    case kw_cursor:
+        return kqsh_create_cursor ( tbl, src, next_token ( tbl, src, t ), mode );
+    case kw_schema:
+        return kqsh_create_schema ( tbl, src, next_token ( tbl, src, t ), mode );
+    case kw_table:
+        return kqsh_create_table ( tbl, src, next_token ( tbl, src, t ), mode );
+    }
+
+    return expected ( t, klogErr, "cursor, schema or table" );
+}
diff --git a/tools/kqsh/kqsh-help.c b/tools/kqsh/kqsh-help.c
new file mode 100644
index 0000000..49edeb7
--- /dev/null
+++ b/tools/kqsh/kqsh-help.c
@@ -0,0 +1,1292 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "kqsh-priv.h"
+#include "kqsh-tok.h"
+
+#include <klib/container.h>
+#include <klib/symbol.h>
+#include <klib/symtab.h>
+#include <klib/token.h>
+
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+
+/* alias
+ */
+static
+rc_t kqsh_help_alias ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "create a new name for an existing object\n"
+             "  THIS FEATURE IS NOT YET IMPLEMENTED.\n"
+        );
+
+    return 0;
+}
+
+
+/* alter
+ */
+static
+rc_t kqsh_help_alter_cursor ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "alter a cursor\n"
+             "\n"
+             "usage:\n"
+             "  'alter <cursor> add column [ ( TYPEDECL ) ] NAME;'\n"
+             "\n"
+             "  the 'alter <cursor> add' command allows addition of columns\n"
+             "  before the cursor has been opened for use.\n"
+        );
+
+    return 0;
+}
+static
+rc_t kqsh_help_alter_schema ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "alter an open schema\n"
+             "\n%s%s%s%s",
+             "usage:\n"
+             "  'alter <schema> add include [ path ] PATH;'\n"
+             "  'alter <schema> add path PATH;'\n"
+             "  'alter <schema> load PATH;'\n"
+             "\n",
+             "  the 'alter <schema> add' command allows addition of new\n"
+             "  search paths that affect loading and schema include directives.\n"
+             "\n",
+             "  the 'alter <schema> load' command will load schema from the\n"
+             "  indicated file.\n",
+             "\n"
+             "  the keywords 'alter schema' may be used instead of 'alter' alone.\n"
+        );
+
+    return 0;
+}
+
+static
+rc_t kqsh_help_alter ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+
+        case kw_cursor:
+            return kqsh_help_alter_cursor ( tbl, src, t );
+        case kw_schema:
+            return kqsh_help_alter_schema ( tbl, src, t );
+
+        default:
+            return expected ( t, klogWarn, "cursor or schema" );
+        }
+    }
+
+    printf ( "alter an open object\n"
+             "\n%s%s",
+             "usage:\n"
+             "  alter <vdb manager>...\n"
+             "  alter <sra manager> ...\n"
+             "  alter <cursor> ...\n"
+             "  alter <schema> ...\n"
+             "\n",
+             "  the alter command is used to modify open objects in some way.\n"
+             "\n"
+             "  type 'help alter <object>;' for more information about that command.\n"
+        );
+
+    return 0;
+}
+
+
+/* close
+ */
+static
+rc_t kqsh_help_close ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "close an open object or cursor row\n"
+             "\n"
+             "usage:\n"
+             "  'close ID;'\n"
+             "  'close row [ on ] <cursor>;\n"
+        );
+
+    return 0;
+}
+
+
+/* create
+ */
+static
+rc_t kqsh_help_create_column ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "create or open a stand-alone column using kdb manager (OBSCURE)\n"
+             "\n"
+             "usage:\n"
+             "  'create column PATH [ as ID ] [ using KDB-MGR ];'\n"
+             "\n"
+             "  create a column using implicit or named kdb manager.\n"
+             "  type 'help create;' for information on create semantics.\n"
+             "\n"
+             "  THIS FEATURE IS NOT YET IMPLEMENTED.\n"
+        );
+
+    return 0;
+}
+
+static
+rc_t kqsh_help_create_cursor ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "create a row cursor upon a table\n"
+             "\n"
+             "usage:\n"
+             "  'create cursor ID on TBL [ for update ];'\n"
+             "\n"
+             "  create a named cursor on the given table. the default cursor mode is\n"
+             "  read-only, but may be used for write 'for update' is specified.\n"
+        );
+
+    return 0;
+}
+
+static
+rc_t kqsh_help_create_database ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "create or open a databse\n"
+             "\n%s%s",
+             "usage:\n"
+             "  'create database PATH [ as ID ] [ using KDB-MGR ];'\n"
+             "  'create database PATH [ as ID ]\n"
+             "     [ with ] schema ID.ID [ using MGR ];'\n"
+             "  'create database ID [ as ID ] [ using KDB-DB ];'\n"
+             "  'create database ID [ as ID ]\n"
+             "     [ with ] schema ID [ using DB ];'\n"
+             "\n",
+             "  create a database using implicit or named manager or database.\n"
+             "  type 'help create;' for information on create semantics.\n"
+             "  when using a database schema, the target object may be any\n"
+             "  manager or database above kdb level.\n"
+             "\n"
+             "  THIS FEATURE IS NOT YET IMPLEMENTED.\n"
+        );
+
+    return 0;
+}
+
+static
+rc_t kqsh_help_create_schema ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "create an empty schema object\n"
+             "\n"
+             "usage:\n"
+             "  'create schema as ID [ using MGR ];'\n"
+             "\n"
+             "  create a new schema populated only by intrinsic definitions.\n"
+             "  the manager used must be above kdb level.\n"
+        );
+
+    return 0;
+}
+
+static
+rc_t kqsh_help_create_table ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "create or open a table\n"
+             "\n%s%s",
+             "usage:\n"
+             "  'create table PATH [ as ID ] [ using KDB-MGR ];'\n"
+             "  'create table PATH [ as ID ]\n"
+             "     [ with ] schema ID.ID [ using MGR ];'\n"
+             "  'create table ID [ as ID ] [ using KDB-DB ];'\n"
+             "  'create table ID [ as ID ]\n"
+             "     [ with ] schema ID [ using DB ];'\n"
+             "\n",
+             "  create a table using implicit or named manager or database.\n"
+             "  type 'help create;' for information on create semantics.\n"
+             "  when using a table schema, the target object may be any\n"
+             "  manager or database above kdb level.\n"
+        );
+
+    return 0;
+}
+
+static
+rc_t kqsh_help_create ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+
+        case kw_column:
+            return kqsh_help_create_column ( tbl, src, t );
+        case kw_cursor:
+            return kqsh_help_create_cursor ( tbl, src, t );
+        case kw_database:
+            return kqsh_help_create_database ( tbl, src, t );
+        case kw_schema:
+            return kqsh_help_create_schema ( tbl, src, t );
+        case kw_table:
+            return kqsh_help_create_table ( tbl, src, t );
+
+        default:
+            return expected ( t, klogWarn, "column, cursor, database, schema, table or ;" );
+        }
+    }
+
+    printf ( "create a new object or open/reinitialize an existing one\n"
+             "\n%s%s%s%s",
+             "usage:\n"
+             "  create ...            - create a new object or fail if it already exists.\n"
+             "  create or replace ... - create a new object or reinitialize existing one.\n"
+             "  create or open ...    - create a new object or open existing one for update.\n"
+             "\n",
+             "  create column ...\n"
+             "  create cursor ...\n"
+             "  create database ...\n"
+             "  create schema ...\n"
+             "  create table ...\n"
+             "\n",
+             "  the create command is used primarily to create new objects, but may\n"
+             "  also be used to open and optionally reinitialize certain types of\n"
+             "  existing objects, namely database, tables and columns.\n"
+             "\n",
+             "semantic variations on databases, tables or columns:\n"
+             "  create or open - create if not there, open otherwise [ open ( O_CREAT ) ]\n"
+             "  create or init - create if not there, reinitialize otherwise [ open ( O_CREAT | O_TRUNC ) ]\n"
+             "\n"
+             "  type 'help create <object>;' for more information about that command.\n"
+        );
+
+    return 0;
+}
+
+/* delete
+ */
+static
+rc_t kqsh_help_delete ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "delete rows or nodes\n"
+             "  THIS FEATURE IS NOT YET IMPLEMENTED.\n"
+        );
+
+    return 0;
+}
+
+
+/* drop
+ */
+static
+rc_t kqsh_help_drop ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "remove an object from the file system\n"
+             "  THIS FEATURE IS NOT YET IMPLEMENTED.\n"
+        );
+
+    return 0;
+}
+
+
+/* execute
+ */
+static
+rc_t kqsh_help_execute ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "run a kqsh script in a sub-scope\n"
+        );
+
+    return 0;
+}
+
+
+/* help
+ */
+static
+rc_t kqsh_help_help ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "print help\n"
+             "\n"
+             "usage:\n"
+             "  'help <topic>;'\n"
+        );
+
+    return 0;
+}
+
+
+/* open
+ */
+static
+rc_t kqsh_help_open_mgr ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "open a library manager\n"
+             "\n%s%s%s",
+             "usage:\n"
+             "  'open kdb [ manager ] [ as ID ];'\n"
+             "  'open vdb [ manager ] [ as ID ];'\n"
+             "  'open sra [ manager ] [ as ID ];'\n"
+             "  'open sra path [ manager ] [ as ID ];'\n"
+             "\n",
+             "  this command opens a manager object for the indicated library,\n"
+             "  dynamically loading the library if required. the library operational\n"
+             "  mode (read-only or update) is selected at kqsh launch time by using\n"
+             "  the '-u' switch for update (default is read-only).\n"
+             "\n",
+             "  the sra manager can optionally work with a path manager to convert\n"
+             "  table accession strings into runtime paths. type 'help open sra;' for\n"
+             "  more information.\n"
+        );
+
+    return 0;
+}
+
+static
+rc_t kqsh_help_open_path_mgr ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+
+        case kw_manager:
+            return kqsh_help_open_mgr ( tbl, src, t );
+
+        case kw_path:
+            if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+            {
+                switch ( next_token ( tbl, src, t ) -> id )
+                {
+                case eEndOfInput:
+                case eSemiColon:
+                case kw_manager:
+                    break;
+                default:
+                    return expected ( t, klogWarn, "manager" );
+                }
+            }
+            break;
+
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "open a library or path manager\n"
+             "\n%s%s%s%s%s",
+             "usage:\n"
+             "  'open sra [ manager ] [ as ID ];'\n"
+             "  'open sra path [ manager ] [ as ID ];'\n"
+             "\n",
+             "  this command opens a manager object for the indicated library,\n"
+             "  dynamically loading the library if required. the library operational\n"
+             "  mode (read-only or update) is selected at kqsh launch time by using\n"
+             "  the '-u' switch for update (default is read-only).\n"
+             "\n",
+             "  the path manager may be opened along with its related db manager.\n"
+             "  its purpose is to transform object paths given in open commands from\n"
+             "  accessions into runtime paths. for example:\n"
+             "\n",
+             "    > 'open sra manager; open sra path manager;'\n"
+             "    > 'open table \"SRR000001\" using sramgr;'\n"
+             "\n",
+             "  the commands above will open the sra manager under its default name,\n"
+             "  then open the installation specific sra path manager and associate the\n"
+             "  two, such that the next open table command will convert the given path\n"
+             "  from an accession 'SRR000001' to a full file system path.\n"
+        );
+
+    return 0;
+}
+
+static
+rc_t kqsh_help_open_cursor ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "open a cursor\n"
+             "\n"
+             "usage:\n"
+             "  'open ID at ROW;'\n"
+             "\n"
+             "  this command will cause a cursor to be opened at the given starting row.\n"
+        );
+
+    return 0;
+}
+
+static
+rc_t kqsh_help_open_row ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "open a row on cursor\n"
+             "\n"
+             "usage:\n"
+             "  'open row [ ROW ] [ on ] <cursor>;'\n"
+             "\n"
+             "  this command will cause a cursor row to be opened.\n"
+             "\n"
+             "  if no row id is specified, the current cursor row marker will be used.\n"
+             "  otherwise, the cursor marker will be preset to given row id before the\n"
+             "  row is opened.\n"
+             "\n"
+             "  if the cursor row is already open, the command will succeed provided\n"
+             "  that the current row id matches the requested row id.\n"
+        );
+
+    return 0;
+}
+
+static
+rc_t kqsh_help_open ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+
+        case kw_sra:
+            return kqsh_help_open_path_mgr ( tbl, src, t );
+        case kw_kdb:
+        case kw_vdb:
+            if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+            {
+                switch ( next_token ( tbl, src, t ) -> id )
+                {
+                case eEndOfInput:
+                case eSemiColon:
+                case kw_manager:
+                    break;
+                    return expected ( t, klogWarn, "manager" );
+                }
+            }
+        case kw_manager:
+            return kqsh_help_open_mgr ( tbl, src, t );
+
+        case kw_cursor:
+            return kqsh_help_open_cursor ( tbl, src, t );
+
+        case kw_row:
+            return kqsh_help_open_row ( tbl, src, t );
+
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "open an existing object\n"
+             "\n"
+             "usage:\n"
+             "  'open kdb [ manager ] [ as ID ];'\n"
+             "  'open vdb [ manager ] [ as ID ];'\n"
+             "  'open sra [ manager ] [ as ID ];'\n"
+             "  'open sra path [ manager ] [ as ID ];'\n"
+             "  'open column' ...\n"
+             "  'open database' ...\n"
+             "  'open metadata' ...\n"
+             "  'open row' ...\n"
+             "  'open schema' ...\n"
+             "  'open table' ...\n"
+             "  'open cursor' ...\n"
+             "\n"
+             "  type 'help open manager;' for more information about those commands,\n"
+             "  type 'help open <object>;' for more information about remaining command.\n"
+        );
+
+    return 0;
+}
+
+/* quit aka exit
+ */
+static
+rc_t kqsh_help_quit ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "exit kqsh\n"
+             "\n"
+             "usage:\n"
+             "  'quit;'\n"
+             "  'exit;'\n"
+        );
+
+    return 0;
+}
+
+#define kqsh_help_exit( tbl, src, t ) \
+    kqsh_help_quit ( tbl, src, t )
+
+
+/* rename
+ */
+static
+rc_t kqsh_help_rename ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "rename an object within file system\n"
+             "  THIS FEATURE IS NOT YET IMPLEMENTED.\n"
+        );
+
+    return 0;
+}
+
+
+/* show
+ */
+static
+rc_t kqsh_help_show_mgr ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "show library manager properties\n"
+             "\n"
+             "usage:\n"
+             "  'show <mgr> version;'\n"
+        );
+
+    return 0;
+}
+
+static
+rc_t kqsh_help_show_path_mgr ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+        case kw_manager:
+            return kqsh_help_show_mgr ( tbl, src, t );
+
+        case kw_path:
+            if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+            {
+                switch ( next_token ( tbl, src, t ) -> id )
+                {
+                case eEndOfInput:
+                case eSemiColon:
+                case kw_manager:
+                    break;
+                default:
+                    return expected ( t, klogWarn, "manager" );
+                }
+            }
+            break;
+
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+    else
+    {
+        return kqsh_help_show_mgr ( tbl, src, t );
+    }
+
+    printf ( "show path manager properties\n"
+             "\n"
+             "usage:\n"
+             "  NO USAGE AVAILABLE\n"
+        );
+
+    return 0;
+}
+
+static
+rc_t kqsh_help_show_schema ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+
+
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "inspect an open schema\n"
+             "\n"
+             "usage:\n"
+             "  'show <schema>;'\n"
+             "  'show <schema> types;'\n"
+             "  'show <schema> typesets;'\n"
+             "  'show <schema> formats;'\n"
+             "  'show <schema> constants;'\n"
+             "  'show <schema> functions;'\n"
+             "  'show <schema> columns;'\n"
+             "  'show <schema> tables;'\n"
+             "  'show <schema> databases;'\n"
+             "  'show <schema> . NAME;'\n"
+             "  'show <schema> . NAME # VERSION;'\n"
+             "\n"
+             "  this command allows inspection of schema contents by listing object\n"
+             "  names or dumping their declarations.\n"
+        );
+
+    return 0;
+}
+
+static
+rc_t kqsh_help_show ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+
+        case kw_sra:
+            return kqsh_help_show_path_mgr ( tbl, src, t );
+
+        case kw_kdb:
+        case kw_vdb:
+            if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+            {
+                switch ( next_token ( tbl, src, t ) -> id )
+                {
+                case eEndOfInput:
+                case eSemiColon:
+                case kw_manager:
+                    break;
+                    return expected ( t, klogWarn, "manager" );
+                }
+            }
+        case kw_manager:
+            return kqsh_help_show_mgr ( tbl, src, t );
+
+        case kw_schema:
+            return kqsh_help_show_schema ( tbl, src, t );
+
+        default:
+            return expected ( t, klogWarn, "object or ;" );
+        }
+    }
+
+    printf ( "display an object\n"
+             "\n"
+             "usage:\n"
+             "  'show manager ...'\n"
+             "  'show schema ...'\n"
+             "\n"
+             "  type 'help show manager;' for more information about those commands,\n"
+             "  type 'help show <object>;' for more information about remaining command.\n"
+        );
+
+    return 0;
+}
+
+/* write
+ */
+static
+rc_t kqsh_help_write ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "write or append row data to column or node\n"
+             "%s%s%s%s%s",
+             "\n"
+             "usage:\n"
+             "  'write <cursor>.<column> ROW'\n"
+             "  'write <cursor>.IDX ROW'\n"
+             "\n",
+             "ROW:\n"
+             "  STRING              - character data\n"
+             "  <bin-elem>          - non-character datum\n"
+             "  '[' <bin-elems> ']' - a vector of non-character data\n"
+             "\n",
+             "bin-elem:\n"
+             "  BOOLEAN             - the constants 'true' or 'false'\n"
+             "  INTEGER             - signed or unsigned integer value\n"
+             "  FLOAT               - floating point value\n"
+             "\n",
+             "bin-elems:\n"
+             "  <bin-elem> [ ',' <bin-elems> ]\n"
+             "\n",
+             "  specify an open cursor and column by name or ordinal index.\n"
+             "  the row data given will be appended to that column.\n"
+        );
+
+    return 0;
+}
+
+
+/* use
+ */
+static
+rc_t kqsh_help_use ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "make object the implicit target of 'using' clause\n"
+             "  THIS FEATURE IS NOT YET IMPLEMENTED.\n"
+        );
+
+    return 0;
+}
+
+
+/* macro for generating switch statements */
+#define KQSH_HELP_KEYWORD( topic ) \
+    case kw_ ## topic: return kqsh_help_ ## topic ( tbl, src, t )
+
+/* commands
+ */
+static
+rc_t kqsh_help_commands ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+
+        KQSH_HELP_KEYWORD ( alias );
+        KQSH_HELP_KEYWORD ( alter );
+        KQSH_HELP_KEYWORD ( close );
+        KQSH_HELP_KEYWORD ( create );
+        KQSH_HELP_KEYWORD ( delete );
+        KQSH_HELP_KEYWORD ( drop );
+        KQSH_HELP_KEYWORD ( execute );
+        KQSH_HELP_KEYWORD ( exit );
+        KQSH_HELP_KEYWORD ( help );
+        KQSH_HELP_KEYWORD ( open );
+        KQSH_HELP_KEYWORD ( quit );
+        KQSH_HELP_KEYWORD ( rename );
+        KQSH_HELP_KEYWORD ( show );
+        KQSH_HELP_KEYWORD ( use );
+        KQSH_HELP_KEYWORD ( write );
+
+        default:
+            return expected ( t, klogWarn, "command topic" );
+        }
+    }
+
+    printf ( "kqsh commands:\n"
+             "%s%s%s",
+             "  alter - alter an open object\n"
+             "  close - close an open object\n"
+             "  create - create a new object\n"
+             "  execute - execute a kqsh script in a new scope\n"
+             "  help - print this list\n"
+             "  open - open an existing object\n"
+             "  quit - exit shell\n"
+             "  show - display object data\n"
+             "  write - write a row of data to a column\n"
+             "\n",
+             "unimplemented commands:\n"
+             "  alias - create a new name to an file system object\n"
+             "  delete - delete rows or nodes\n"
+             "  drop - remove an object from the file system\n"
+             "  rename - rename an object within file system\n"
+             "  use - make object the implicit target of 'using' clause\n"
+             "\n",
+             "  type 'help <command>;' for more information about that command.\n"
+        );
+
+    return 0;
+}
+
+/* kdb
+ */
+static
+rc_t kqsh_help_kdb ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "kdb objects:\n"
+             "  kdb manager - root object of kdb\n"
+             "  kdb database - raw, physical database\n"
+             "  kdb table - raw, physical table\n"
+             "  kdb column - raw, physical column with opaque data\n"
+             "  kdb metadata - associated with manager, database, table and column\n"
+             "\n"
+             "  NB - in some tables with early version columns, metadata may not be present.\n"
+        );
+
+    return 0;
+}
+
+
+/* vdb
+ */
+static
+rc_t kqsh_help_vdb ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "vdb objects:\n"
+             "  vdb manager - root object of vdb\n"
+             "  vdb schema - describes other objects\n"
+             "  vdb database - can contain tables, indices and sub-databases\n"
+             "  vdb table - can contain columns and indices\n"
+             "  vdb cursor - a group of user-selected columns\n"
+             "\n"
+             "  the vdb manager builds upon the kdb manager. it allows use\n"
+             "  and definition of schema objects which describe the shape and\n"
+             "  behavior of other objects that may be created or opened under vdb.\n"
+        );
+
+    return 0;
+}
+
+
+/* sra
+ */
+static
+rc_t kqsh_help_sra ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+        default:
+            return expected ( t, klogWarn, ";" );
+        }
+    }
+
+    printf ( "sra objects:\n"
+             "  sra manager - root object of sra\n"
+             "  sra path manager - installation specific path translator\n"
+             "  sra table - can contain columns and indices\n"
+             "\n"
+             "  the sra manager builds upon the vdb manager. it has a pre-defined\n"
+             "  schema within the sra domain and the objects provide some interface\n"
+             "  refinements of their vdb counterparts.\n"
+             "\n"
+             "  not all installations will have an sra path manager for translating\n"
+             "  paths given to the open command. when not available or used, open paths\n"
+             "  will be used as given.\n"
+        );
+
+    return 0;
+}
+
+
+/* objects
+ */
+static
+rc_t kqsh_help_objects ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+
+        KQSH_HELP_KEYWORD ( kdb );
+        KQSH_HELP_KEYWORD ( vdb );
+        KQSH_HELP_KEYWORD ( sra );
+
+#if 0
+        KQSH_HELP_KEYWORD ( column );
+        KQSH_HELP_KEYWORD ( database );
+        KQSH_HELP_KEYWORD ( metadata );
+        KQSH_HELP_KEYWORD ( schema );
+        KQSH_HELP_KEYWORD ( table );
+#endif
+
+        default:
+            return expected ( t, klogWarn, "object class" );
+        }
+    }
+
+    printf ( "kqsh objects:\n"
+             "  kdb ...\n"
+             "  vdb ...\n"
+             "  sra ...\n"
+             "  column\n"
+             "  cursor\n"
+             "  database\n"
+             "  metadata\n"
+             "  schema\n"
+             "  table\n"
+             "\n"
+             "  type 'help <object>;' for more information about that object.\n"
+        );
+
+    return 0;
+}
+
+/* kqsh
+ */
+rc_t kqsh_help ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    /* this is one command where we don't insist on a trailing ';'
+       because the user might just be getting it figured out */
+    if ( ! interactive || KTokenSourceAvail ( src ) > 1 )
+    {
+        /* this command could still block */
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eEndOfInput:
+        case eSemiColon:
+            break;
+
+        KQSH_HELP_KEYWORD ( commands );
+        KQSH_HELP_KEYWORD ( objects );
+
+        KQSH_HELP_KEYWORD ( alias );
+        KQSH_HELP_KEYWORD ( alter );
+        KQSH_HELP_KEYWORD ( close );
+        KQSH_HELP_KEYWORD ( create );
+        KQSH_HELP_KEYWORD ( delete );
+        KQSH_HELP_KEYWORD ( drop );
+        KQSH_HELP_KEYWORD ( execute );
+        KQSH_HELP_KEYWORD ( help );
+        KQSH_HELP_KEYWORD ( open );
+        KQSH_HELP_KEYWORD ( quit );
+        KQSH_HELP_KEYWORD ( rename );
+        KQSH_HELP_KEYWORD ( show );
+        KQSH_HELP_KEYWORD ( use );
+        KQSH_HELP_KEYWORD ( write );
+
+        KQSH_HELP_KEYWORD ( kdb );
+        KQSH_HELP_KEYWORD ( vdb );
+        KQSH_HELP_KEYWORD ( sra );
+
+#if 0
+        KQSH_HELP_KEYWORD ( column );
+        KQSH_HELP_KEYWORD ( database );
+        KQSH_HELP_KEYWORD ( metadata );
+        KQSH_HELP_KEYWORD ( schema );
+        KQSH_HELP_KEYWORD ( table );
+#endif
+
+        default:
+            return expected ( t, klogWarn, "help topic" );
+        }
+    }
+
+    /* general help */
+    printf ( "kqsh help:\n"
+             "\n"
+             "  topics:\n"
+             "    commands -- list shell commands\n"
+             "    objects -- list objects and their usage\n"
+             "\n"
+             "  the command processor expects a semi-colon ( ';' ) to process each command.\n"
+             "  this is not intended to be irritating, but the shell itself is NOT line oriented\n"
+             "  which requires a statement terminator. the 'help' and 'quit' commands are the only\n"
+             "  exceptions to this rule.\n"
+             "\n"
+             "  type 'help <topic>;' for more information about that topic.\n"
+        );
+
+    return 0;
+}
diff --git a/tools/kqsh/kqsh-load.c b/tools/kqsh/kqsh-load.c
new file mode 100644
index 0000000..88c32c5
--- /dev/null
+++ b/tools/kqsh/kqsh-load.c
@@ -0,0 +1,410 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "kqsh-priv.h"
+#include "kqsh-tok.h"
+#include "kqsh-kdb.h"
+#include "kqsh-vdb.h"
+#include "kqsh-sra.h"
+
+#include <klib/symbol.h>
+#include <klib/symtab.h>
+#include <klib/token.h>
+
+#include <kdb/manager.h>
+#include <vdb/manager.h>
+
+#include <kfs/directory.h>
+#include <kfs/dyload.h>
+#include <klib/log.h>
+#include <klib/vector.h>
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+/* library names on disk */
+#define LIBSTR2( str ) # str
+#define LIBSTR( str ) LIBSTR2 ( str )
+
+#if defined LIBKDB
+
+#define LIBKDBSTR LIBSTR ( LIBKDB )
+#define LIBWKDBSTR LIBSTR ( LIBWKDB )
+#define LIBVDBSTR LIBSTR ( LIBVDB )
+#define LIBWVDBSTR LIBSTR ( LIBWVDB )
+#define LIBSRADBSTR LIBSTR ( LIBSRADB )
+#define LIBWSRADBSTR LIBSTR ( LIBWSRADB )
+
+#elif defined LIBNCBI_VDB
+
+#define LIBKDBSTR LIBSTR ( LIBNCBI_VDB )
+#define LIBWKDBSTR LIBSTR ( LIBNCBI_WVDB )
+#define LIBVDBSTR LIBSTR ( LIBNCBI_VDB )
+#define LIBWVDBSTR LIBSTR ( LIBNCBI_WVDB )
+#define LIBSRADBSTR LIBSTR ( LIBNCBI_VDB )
+#define LIBWSRADBSTR LIBSTR ( LIBNCBI_WVDB )
+
+#else
+#error need a library name
+#endif
+
+/* dynamic loader */
+static KDyld *dl;
+
+
+/* init_libpath
+ *  initialize the library path
+ */
+rc_t kqsh_init_libpath ( void )
+{
+    return KDyldMake ( & dl );
+}
+
+
+/* whack_libpath
+ */
+void kqsh_whack_libpath ( void )
+{
+    KDyldRelease ( dl );
+    dl = NULL;
+}
+
+/* update_libpath
+ */
+rc_t kqsh_update_libpath ( const char *path )
+{
+    const char *end;
+    for ( end = strchr ( path, ':' ); end != NULL; end = strchr ( path = end + 1, ':' ) )
+    {
+        if ( path < end )
+            KDyldAddSearchPath ( dl, "%.*s", ( int ) ( end - path ), path );
+    }
+
+    if ( path [ 0 ] != 0 )
+        KDyldAddSearchPath ( dl, path );
+
+    return 0;
+}
+
+
+/* system_libpath
+ */
+rc_t kqsh_system_libpath ( void )
+{
+    const char *LD_LIBRARY_PATH = getenv ( "LD_LIBRARY_PATH" );
+
+    if ( LD_LIBRARY_PATH == NULL )
+        return 0;
+
+    return kqsh_update_libpath ( LD_LIBRARY_PATH );
+}
+
+/* load_lib
+ *  loads the library
+ *  fetches function to make manager
+ */
+static
+rc_t kqsh_load_lib ( KDylib **lib, const char *libname, char *path, size_t path_size )
+{
+    rc_t rc = KDyldLoadLib ( dl, lib, libname );
+    if ( rc == 0 )
+    {
+        /* return path to caller */
+        rc = KDylibFullPath ( * lib, path, path_size );
+        if ( rc != 0 )
+            path [ 0 ] = 0;
+
+        return 0;
+    }
+
+    return rc;
+}
+
+static
+rc_t kqsh_import_sym ( const KDylib *lib, fptr_t *addr, const char *name )
+{
+    KSymAddr *sym;
+    rc_t rc = KDylibSymbol ( lib, & sym, name );
+    if ( rc == 0 )
+    {
+        KSymAddrAsFunc ( sym, addr );
+        KSymAddrRelease ( sym );
+    }
+    return rc;
+}
+
+#if 0
+static
+void kqsh_set_lib_log_handler ( const KDylib *lib )
+{
+    const KWrtHandler *handler = KLogHandlerGet ();
+    rc_t ( CC * klogLibHandlerSet ) ( KWrtWriter writer, void *data );
+    rc_t rc = kqsh_import_sym ( lib, ( fptr_t* ) & klogLibHandlerSet, "KLogLibHandlerSet" );
+    if ( rc == 0 )
+    {
+        rc_t ( CC * klogLibFmtHandlerSetDefault ) ( void );
+        rc = kqsh_import_sym ( lib, ( fptr_t* ) & klogLibFmtHandlerSetDefault, "KLogLibFmtHandlerSetDefault" );
+        if ( rc == 0 )
+        {
+            ( * klogLibHandlerSet ) ( handler -> writer, handler -> data );
+            ( * klogLibFmtHandlerSetDefault ) ();
+        }
+    }
+}
+#endif
+
+static
+rc_t kqsh_import_lib ( kqsh_libdata *libdata, const char *libname )
+{
+    /* load the library */
+    char path [ 4096 ];
+    rc_t rc = kqsh_load_lib ( & libdata -> lib, libname, path, sizeof path );
+    if ( rc != 0 )
+        PLOGERR ( klogErr,  (klogErr, rc, "failed to load library '$(lib)'", "lib=%s", libname ));
+    else
+    {
+        int i;
+        bool done_update = read_only;
+        fptr_t *vt = libdata -> cvt;
+        const char *msg, **msgv = & libdata -> msg [ 1 ];
+#if 0
+        /* tell library to log to stderr */
+        kqsh_set_lib_log_handler ( libdata -> lib );
+#endif
+        /* import first symbol according to operating mode */
+        msg = msgv [ read_only ? -1 : 0 ];
+        rc = kqsh_import_sym ( libdata -> lib, & vt [ 0 ], msg );
+
+        /* import remaining symbols */
+        for ( i = 1; rc == 0; ++ i )
+        {
+            /* detect end of list */
+            msg = msgv [ i ];
+            if ( msgv [ i ] == NULL )
+            {
+                /* exit if both const and update sides done */
+                if ( done_update )
+                {
+                    if ( interactive )
+                        kqsh_printf ( "loaded library '%s'\n", path );
+                    return 0;
+                }
+
+                /* switch to update side */
+                vt = libdata -> wvt;
+                msgv = libdata -> wmsg;
+                done_update = true;
+                i = -1;
+                continue;
+            }
+
+            /* import symbol */
+            rc = kqsh_import_sym ( libdata -> lib, & vt [ i ], msg );
+        }
+
+        /* failed to find symbol */
+        PLOGERR ( klogInt,  (klogInt, rc,
+                  "failed to resolve symbol $(msg) in library '$(path)'"
+                             , "msg=%s,path=%s", msg, path ));
+    }
+
+    return rc;
+}
+
+/* load
+ *  expects "t" to describe a library class, i.e.
+ *    'open <lib> mgr...'
+ *            ^
+ */
+rc_t kqsh_load ( struct KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    rc_t rc = 0;
+    void *mgr;
+    String name;
+    uint32_t type;
+    const char *libtype;
+    KSymbol *existing;
+
+    /* for loading library */
+    struct { kqsh_libdata *data; const char *ro, *rw; } libs [ 3 ] =
+    {
+        { & kdb_data, LIBKDBSTR, LIBWKDBSTR },
+        { & vdb_data, LIBVDBSTR, LIBWVDBSTR },
+        { & sra_data, LIBSRADBSTR, LIBWSRADBSTR }
+    };
+
+    uint32_t lib_idx;
+
+    /* select which library */
+    switch ( t -> id )
+    {
+    case kw_kdb:
+        CONST_STRING ( & name, "kmgr" );
+        libtype = "kdb";
+        lib_idx = 0;
+        type = obj_KDBManager;
+        break;
+    case kw_vdb:
+        CONST_STRING ( & name, "vmgr" );
+        libtype = "vdb";
+        lib_idx = 1;
+        type = obj_VDBManager;
+        break;
+    case kw_sra:
+        CONST_STRING ( & name, "sramgr" );
+        libtype = "sra";
+        lib_idx = 2;
+        type = obj_SRAManager;
+        break;
+    default:
+        return expected ( t, klogErr, "kdb, vdb or sra" );
+    }
+
+    /* treat 'manager' as optional - it's understood */
+    if ( next_token ( tbl, src, t ) -> id == kw_manager )
+        next_token ( tbl, src, t );
+
+    /* capture optional manager name */
+    switch ( t -> id )
+    {
+    case kw_as:
+        switch ( next_token ( tbl, src, t ) -> id )
+        {
+        case eIdent:
+            break;
+
+        case rsrv_kmgr:
+        case obj_KDBManager:
+            if ( type == obj_KDBManager )
+                break;
+            return expected ( t, klogErr, "identifier" );
+
+        case rsrv_vmgr:
+        case obj_VDBManager:
+            if ( type == obj_VDBManager )
+                break;
+
+        case rsrv_sramgr:
+        case obj_SRAManager:
+            if ( type == obj_SRAManager )
+                break;
+
+        default:
+            return expected ( t, klogErr, "identifier" );
+        }
+
+        name = t -> str;
+        existing = t -> sym;
+
+        next_token ( tbl, src, t );
+        break;
+
+    default:
+        existing = KSymTableFind ( tbl, & name );
+    }
+
+    /* process existing */
+    if ( existing != NULL && existing -> type >= obj_first )
+    {
+        kqsh_printf ( "%s manager '%N' ( %p ) is already open.\n",
+            libtype, existing, existing -> u . obj );
+        libs [ lib_idx ] . data -> dflt = existing;
+        return 0;
+    }
+
+    /* load library if required */
+    if ( libs [ lib_idx ] . data -> lib == NULL )
+    {
+        uint32_t i;
+        for ( i = 0; i <= lib_idx; ++ i )
+        {
+            rc = kqsh_import_lib ( libs [ i ] . data,
+                read_only ? libs [ i ] .  ro : libs [ i ] . rw );
+            if ( rc != 0 )
+                return rc;
+        }
+    }
+
+    /* create mgr object */
+    switch ( type )
+    {
+    case obj_KDBManager:
+        rc = _KDBManagerMake ( ( struct KDBManager** ) & mgr, NULL );
+        break;
+    case obj_VDBManager:
+        rc = _VDBManagerMake ( ( struct VDBManager** ) & mgr, NULL );
+        break;
+    case obj_SRAManager:
+        rc = _SRAMgrMake ( ( struct SRAMgr** ) & mgr, NULL );
+        break;
+    }
+
+    if ( rc == 0 )
+    {
+        KSymbol *sym;
+
+        /* create symbol */
+        rc = KSymTableCreateSymbol ( tbl, & sym, & name, type, mgr );
+        if ( rc == 0 )
+        {
+            libs [ lib_idx ] . data -> dflt = sym;
+            if ( interactive )
+            {
+                kqsh_printf ( "opened %s manager '%N' ( %p ) for %s\n"
+                              , libtype
+                              , sym, sym -> u . obj
+                              , read_only ? "read" : "update" );
+            }
+            return 0;
+        }
+
+        /* whack instance */
+        switch ( type )
+        {
+        case obj_KDBManager:
+            _KDBManagerRelease ( ( const void* ) mgr );
+            break;
+        case obj_VDBManager:
+            _VDBManagerRelease ( ( const void* ) mgr );
+            break;
+        case obj_SRAManager:
+            _SRAMgrRelease ( ( const void* ) mgr );
+            break;
+        }
+    }
+
+    PLOGERR ( klogInt,  (klogInt, rc,
+              "failed to open $(type) manager '$(name)' for $(mode)"
+              , "type=%s,name=%.*s,mode=%s"
+              , libtype
+              , ( int ) name . size, name . addr
+                         , read_only ? "read" : "update" ));
+
+    return rc;
+}
diff --git a/tools/kqsh/kqsh-open.c b/tools/kqsh/kqsh-open.c
new file mode 100644
index 0000000..2ea2687
--- /dev/null
+++ b/tools/kqsh/kqsh-open.c
@@ -0,0 +1,199 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "kqsh-priv.h"
+#include "kqsh-tok.h"
+#include "kqsh-kdb.h"
+#include "kqsh-vdb.h"
+
+#include <klib/symbol.h>
+#include <klib/symtab.h>
+#include <klib/token.h>
+
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+/* open cursor
+ *  open ID;
+ */
+static
+rc_t kqsh_open_cursor ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    rc_t rc;
+    KSymbol *sym = t -> sym;
+
+    if ( next_token ( tbl, src, t ) -> id != eSemiColon )
+        return expected ( t, klogErr, ";" );
+
+    rc = _VCursorOpen ( sym -> u . obj );
+    if ( rc != 0 )
+    {
+        PLOGERR ( klogInt,  (klogInt, rc,
+                  "failed to open cursor '$(name)' ( $(addr) )"
+                  , "name=%.*s,addr=0x%zX"
+                  , ( int ) sym -> name . size, sym -> name . addr
+                             , ( size_t ) sym -> u . obj ));
+    }
+    else if ( interactive )
+    {
+        kqsh_printf ( "opened cursor '%N' ( %p )\n"
+                      , sym, sym -> u . obj );
+    }
+
+    return rc;
+}
+
+static
+rc_t kqsh_open_row ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    rc_t rc = 0;
+    KSymbol *curs;
+    int64_t row_id;
+    bool has_row_id = false;
+    bool negate = false;
+
+    switch ( next_token ( tbl, src, t ) -> id )
+    {
+    case eMinus:
+        negate = true;
+    case ePlus:
+        next_token ( tbl, src, t );
+        break;
+    }
+
+    switch ( t -> id )
+    {
+    case eHex:
+        if ( negate )
+            LOGMSG ( klogWarn, "negative hex integer" );
+    case eDecimal:
+    case eOctal:
+        rc = KTokenToI64 ( t, & row_id );
+        if ( rc != 0 )
+            return expected ( t, klogErr, "integer row id" );
+        if ( negate )
+            row_id = - row_id;
+        has_row_id = true;
+        next_token ( tbl, src, t );
+        break;
+    default:
+        if ( negate )
+            return expected ( t, klogErr, "integer row id" );
+    }
+
+    if ( t -> id == kw_on )
+        next_token ( tbl, src, t );
+
+    switch ( t -> id )
+    {
+    case obj_VCursor:
+        curs = t -> sym;
+        break;
+    default:
+        return expected ( t, klogErr, "cursor" );
+    }
+
+    if ( next_token ( tbl, src, t ) -> id != eSemiColon )
+        return expected ( t, klogErr, ";" );
+
+    if ( has_row_id )
+    {
+        switch ( curs -> type )
+        {
+        case obj_VCursor:
+            rc = _VCursorSetRowId ( curs -> u . obj, row_id );
+            break;
+        }
+        if ( rc != 0 )
+        {
+            PLOGERR ( klogInt,  (klogInt, rc,
+                      "failed to open row $(id) on cursor '$(name)' ( $(addr) )"
+                      , "id=%ld,name=%.*s,addr=0x%zX"
+                      , row_id
+                      , ( int ) curs -> name . size, curs -> name . addr
+                      , ( size_t ) curs -> u . obj ));
+            return rc;
+        }
+    }
+
+    switch ( curs -> type )
+    {
+    case obj_VCursor:
+        rc = _VCursorOpenRow ( curs -> u . obj );
+        break;
+    }
+
+    if ( rc != 0 )
+    {
+        PLOGERR ( klogInt,  (klogInt, rc,
+                  "failed to open row on cursor '$(name)' ( $(addr) )"
+                  , "name=%.*s,addr=0x%zX"
+                  , ( int ) curs -> name . size, curs -> name . addr
+                  , ( size_t ) curs -> u . obj ));
+    }
+    else if ( interactive )
+    {
+        if ( has_row_id )
+        {
+            kqsh_printf ( "opened row %ld on cursor '%N' ( %p )\n"
+                          , row_id, curs, curs -> u . obj );
+        }
+        else
+        {
+            kqsh_printf ( "opened row on cursor '%N' ( %p )\n"
+                          , curs, curs -> u . obj );
+        }
+    }
+
+    return rc;
+}
+
+/* open
+ */
+rc_t kqsh_open ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    switch ( t -> id )
+    {
+    case kw_kdb:
+    case kw_vdb:
+    case kw_sra:
+        /* handle open manager as a load library */
+        return kqsh_load ( tbl, src, t );
+
+    case kw_row:
+        return kqsh_open_row ( tbl, src, t );
+
+    case obj_VCursor:
+        return kqsh_open_cursor ( tbl, src, t );
+    }
+
+    return expected ( t, klogErr, "manager or cursor or row" );
+}
diff --git a/tools/kqsh/kqsh-parse.c b/tools/kqsh/kqsh-parse.c
new file mode 100644
index 0000000..8c0fbec
--- /dev/null
+++ b/tools/kqsh/kqsh-parse.c
@@ -0,0 +1,198 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "kqsh-priv.h"
+#include "kqsh-tok.h"
+
+#include <klib/symbol.h>
+#include <klib/symtab.h>
+#include <klib/token.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/mmap.h>
+#include <kapp/main.h>
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+
+/* kqsh_execute
+ *
+ *  'execute' PATH ';'
+ */
+static
+rc_t kqsh_execute ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    String path;
+
+    if ( t -> id != eString )
+        return expected ( t, klogErr, "file path" );
+
+    path = t -> str;
+    path . addr += 1;
+    path . size -= 2;
+    path . len -= 2;
+
+    if ( next_token ( tbl, src, t ) -> id != eSemiColon )
+        return expected ( t, klogErr, ";" );
+
+    return kqsh_exec_file ( tbl, & path );
+}
+
+
+/* macro for generating switch statements */
+#define KQSH_CMD_KEYWORD( cmd ) \
+    case kw_ ## cmd: \
+        rc = kqsh_ ## cmd ( tbl, src, next_token ( tbl, src, & t ) ); \
+        break
+
+/* case for unimplemented commands */
+#define UNIMPL_CMD_KEYWORD( cmd ) \
+    case kw_ ## cmd: ( void ) 0
+
+/* kqsh
+ *  main loop for shell
+ */
+static
+rc_t kqsh_parse ( KSymTable *tbl, KTokenSource *src, kqsh_stack *frame )
+{
+    rc_t rc;
+    KToken t;
+
+    for ( rc = 0, frame -> cmd_num = 1; rc == 0; ++ frame -> cmd_num )
+    {
+        /* check for signals */
+        rc = Quitting ();
+        if ( rc != 0 )
+            break;
+
+        /* issue prompt */
+        /* the prompt should allow db.db.tbl.obj stack or 'kqsh' when empty */
+        if ( interactive )
+            kqsh_printf ( "\nkqsh|%F> ", frame );
+
+        /* process input */
+        next_token ( tbl, src, & t );
+        if ( interactive )
+            kqsh_printf ( "\n" );
+
+        switch ( t . id )
+        {
+        case eEndOfInput:
+            return 0;
+        case eSemiColon:
+            break;
+
+        case eHash:
+            while ( 1 )
+            {
+                KTokenizerNext ( kLineTokenizer, src, & t );
+                if ( t . id == eEndOfLine || t . id == eEndOfInput )
+                    break;
+            }
+            break;
+
+        /* implemented commands */
+        KQSH_CMD_KEYWORD ( alter );
+        KQSH_CMD_KEYWORD ( close );
+        KQSH_CMD_KEYWORD ( create );
+        KQSH_CMD_KEYWORD ( execute );
+        KQSH_CMD_KEYWORD ( open );
+        KQSH_CMD_KEYWORD ( show );
+        KQSH_CMD_KEYWORD ( write );
+
+        /* unimplemented commands */
+        UNIMPL_CMD_KEYWORD ( alias );
+        UNIMPL_CMD_KEYWORD ( delete );
+        UNIMPL_CMD_KEYWORD ( drop );
+        UNIMPL_CMD_KEYWORD ( insert );
+        UNIMPL_CMD_KEYWORD ( rename );
+        UNIMPL_CMD_KEYWORD ( update );
+        UNIMPL_CMD_KEYWORD ( use );
+            if ( interactive )
+                kqsh_printf ( "the %S command is not yet implemented.\n", & t . str );
+            rc = RC ( rcExe, rcNoTarg, rcExecuting, rcFunction, rcIncomplete );
+            break;
+
+        /* help and quit are special
+           in that they don't require a semi-colon
+           and thus can't use look-ahead which might block */
+        case kw_help:
+            rc = kqsh_help ( tbl, src, & t );
+            break;
+        case kw_exit:
+        case kw_quit:
+            return 0;
+
+        default:
+            rc = expected ( & t, klogErr, "command" );
+        }
+
+        /* tolerate errors in interactive mode */
+        if ( rc != 0 && interactive )
+        {
+            KTokenSourceConsume ( src );
+            rc = 0;
+        }
+    }
+    
+    return rc;
+}
+
+
+rc_t kqsh ( KSymTable *tbl, KTokenSource *src )
+{
+    rc_t rc;
+    BSTree scope;
+
+    kqsh_stack frame;
+    static kqsh_stack const *stk = NULL;
+
+    frame . prev = stk;
+    stk = & frame;
+
+    BSTreeInit ( & scope );
+
+    rc = KSymTablePushScope ( tbl, & scope );
+    if ( rc != 0 )
+        LOGERR ( klogInt, rc, "failed to initialize symbol table" );
+    else
+    {
+        rc = kqsh_parse ( tbl, src, & frame );
+
+        KSymTablePopScope ( tbl );
+        BSTreeWhack ( & scope, kqsh_whackobj, NULL );
+    }
+
+    stk = frame . prev;
+
+    return rc;
+}
diff --git a/tools/kqsh/kqsh-print.c b/tools/kqsh/kqsh-print.c
new file mode 100644
index 0000000..696bcbc
--- /dev/null
+++ b/tools/kqsh/kqsh-print.c
@@ -0,0 +1,170 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "kqsh-priv.h"
+
+#include <klib/symbol.h>
+#include <klib/out.h>
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <assert.h>
+#include <ctype.h>
+
+
+/* printf
+ *  understands printing KSymbol
+ */
+static
+int kqsh_print_frame ( const kqsh_stack *frame )
+{
+    assert ( frame != NULL );
+
+    if ( frame -> prev != NULL )
+    {
+        int status = kqsh_print_frame ( frame -> prev );
+        if ( status != 0 )
+            return status;
+        return KOutMsg ( ".%u", frame -> cmd_num );
+    }
+
+    return KOutMsg ( "%u", frame -> cmd_num );
+}
+
+static
+int kqsh_vprintf ( const char *format, va_list args )
+{
+    int status;
+    const char *start, *end;
+
+    for ( status = 0, start = end = format; * end != 0; ++ end )
+    {
+        /* const String *s; */
+
+        switch ( * end )
+        {
+        case '%':
+            if ( end > start )
+            {
+                status = KOutMsg ( "%.*s", ( uint32_t ) ( end - start ), start );
+                if ( status != 0 )
+                    break;
+            }
+            switch ( * ( ++ end ) )
+            {
+            case 'd':
+                status = KOutMsg ( "%d", va_arg ( args, int ) );
+                break;
+            case 'u':
+                status = KOutMsg ( "%u", va_arg ( args, unsigned int ) );
+                break;
+            case 'x':
+                status = KOutMsg ( "%x", va_arg ( args, unsigned int ) );
+                break;
+            case 'X':
+                status = KOutMsg ( "%X", va_arg ( args, unsigned int ) );
+                break;
+            case 'f':
+                status = KOutMsg ( "%f", va_arg ( args, double ) );
+                break;
+            case 'l':
+                switch ( * ( ++ end ) )
+                {
+                case 'd':
+                    status = KOutMsg ( "%ld", va_arg ( args, int64_t ) );
+                    break;
+                case 'u':
+                    status = KOutMsg ( "%lu", va_arg ( args, uint64_t ) );
+                    break;
+                case 'x':
+                    status = KOutMsg ( "%lx", va_arg ( args, uint64_t ) );
+                    break;
+                case 'X':
+                    status = KOutMsg ( "%lX", va_arg ( args, uint64_t ) );
+                    break;
+                }
+                break;
+            case 'p':
+                status = KOutMsg ( "0x%lX", va_arg ( args, size_t ) );
+                break;
+            case 's':
+                status = KOutMsg ( "%s", va_arg ( args, const char* ) );
+                break;
+            case '.':
+                if ( end [ 1 ] == '*' && end [ 2 ] == 's' )
+                {
+                    end += 2;
+                    status = va_arg ( args, int );
+                    status = KOutMsg ( "%.*s", status, va_arg ( args, const char* ) );
+                    break;
+                }
+                /* not handling anything else */
+                status = KOutMsg ( "%%." );
+                break;
+            case 'S':
+                status = KOutMsg ( "%S", va_arg ( args, const String* ) );
+                break;
+            case 'N':
+                status = KOutMsg ( "%N", va_arg ( args, const KSymbol* ) );
+                break;
+            case 'F':
+                status = kqsh_print_frame ( va_arg ( args, const kqsh_stack* ) );
+                break;
+            case '%':
+                status = KOutMsg ( "%%" );
+                break;
+            }
+
+            start = end + 1;
+            break;
+        }
+
+        if ( status < 0 )
+            break;
+    }
+
+    if ( status >= 0 && end > start )
+        status = KOutMsg ( "%.*s", ( uint32_t ) ( end - start ), start );
+
+    fflush ( stdout );
+
+    return status;
+}
+
+int kqsh_printf ( const char *format, ... )
+{
+    int status;
+    va_list args;
+
+    va_start ( args, format );
+    status = kqsh_vprintf ( format, args );
+    va_end ( args );
+
+    return status;
+}
diff --git a/tools/kqsh/kqsh-priv.h b/tools/kqsh/kqsh-priv.h
new file mode 100644
index 0000000..eb40a01
--- /dev/null
+++ b/tools/kqsh/kqsh-priv.h
@@ -0,0 +1,151 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_kqsh_priv_
+#define _h_kqsh_priv_
+
+#ifndef _h_klib_token_
+#include <klib/token.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct Vector;
+struct BSTNode;
+struct KDylib;
+struct KSymTable;
+struct KDirectory;
+
+
+/*--------------------------------------------------------------------------
+ * library data
+ */
+typedef struct kqsh_libdata kqsh_libdata;
+struct kqsh_libdata
+{
+    /* library */
+    struct KDylib *lib;
+
+    /* default manager */
+    struct KSymbol *dflt;
+
+    /* const messages */
+    const char **msg;
+    fptr_t *cvt;
+
+    /* update messages */
+    const char **wmsg;
+    fptr_t *wvt;
+};
+
+/*--------------------------------------------------------------------------
+ * kqsh
+ */
+
+/* globals
+ *  "read_only" - true if update operations are not available
+ *
+ *  "interactive" - true if (apparently) using console interface
+ *
+ *  "*_data" - data for the individual libraries
+ */
+extern bool read_only;
+extern bool interactive;
+extern kqsh_libdata kdb_data;
+extern kqsh_libdata vdb_data;
+extern kqsh_libdata sra_data;
+
+/* stack frame
+ *  for recursive kqsh'ing
+ */
+typedef struct kqsh_stack kqsh_stack;
+struct kqsh_stack
+{
+    const kqsh_stack *prev;
+    uint32_t cmd_num;
+};
+
+/* kqsh
+ *  main shell
+ */
+rc_t kqsh ( struct KSymTable *tbl, KTokenSource *src );
+rc_t kqsh_exec_file ( struct KSymTable *tbl, const String *path );
+
+/* kqsh-print
+ *  understands printing KSymbol
+ */
+int kqsh_printf ( const char *format, ... );
+
+/* kqsh-alter
+ */
+rc_t kqsh_alter ( struct KSymTable *tbl, KTokenSource *src, KToken *t );
+
+/* kqsh-close
+ */
+void CC kqsh_whackobj ( struct BSTNode *n, void *ignore );
+rc_t kqsh_close ( struct KSymTable *tbl, KTokenSource *src, KToken *t );
+
+/* kqsh-help
+ *  help for commands and objects
+ */
+rc_t kqsh_help ( struct KSymTable *tbl, KTokenSource *src, KToken *t );
+
+/* kqsh-load
+ *  dylib loading and manager open
+ */
+rc_t kqsh_init_libpath ( void );
+void kqsh_whack_libpath ( void );
+rc_t kqsh_update_libpath ( const char *path );
+rc_t kqsh_system_libpath ( void );
+rc_t kqsh_load ( struct KSymTable *tbl, KTokenSource *src, KToken *t );
+
+/* kqsh-open
+ *  create and open described objects
+ */
+rc_t kqsh_create ( struct KSymTable *tbl, KTokenSource *src, KToken *t );
+rc_t kqsh_open ( struct KSymTable *tbl, KTokenSource *src, KToken *t );
+
+/* kqsh-show
+ */
+rc_t kqsh_show ( struct KSymTable *tbl, KTokenSource *src, KToken *t );
+
+/* kqsh-write
+ */
+rc_t kqsh_write ( struct KSymTable *tbl, KTokenSource *src, KToken *t );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _h_kqsh_priv_ */
diff --git a/tools/kqsh/kqsh-show.c b/tools/kqsh/kqsh-show.c
new file mode 100644
index 0000000..141493e
--- /dev/null
+++ b/tools/kqsh/kqsh-show.c
@@ -0,0 +1,290 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "kqsh-priv.h"
+#include "kqsh-tok.h"
+#include "kqsh-kdb.h"
+#include "kqsh-vdb.h"
+
+#include <vdb/schema.h>
+#include <klib/symbol.h>
+#include <klib/symtab.h>
+#include <klib/token.h>
+
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+
+/*--------------------------------------------------------------------------
+ * KDBManager
+ */
+
+static
+rc_t kqsh_show_kmgr_version ( KSymTable *tbl, KTokenSource *src, KToken *t, KSymbol *sym )
+{
+    rc_t rc;
+    uint32_t vers;
+
+    if ( t -> id != eSemiColon )
+        return expected ( t, klogErr, ";" );
+
+    rc = _KDBManagerVersion ( sym -> u . obj, & vers );
+    if ( rc == 0 )
+    {
+        if ( ( vers & 0xFFFF ) != 0 )
+            kqsh_printf ( "kdb manager '%N' v%u.%u.%u\n", sym, vers >> 24, ( vers >> 16 ) & 0xFF, vers & 0xFFFF );
+        else
+            kqsh_printf ( "kdb manager '%N' v%u.%u\n", sym, vers >> 24, ( vers >> 16 ) & 0xFF );
+    }
+    else
+    {
+        PLOGERR ( klogInt,  (klogInt, rc, "failed to obtain version of kdb manager '$(name)'",
+                             "name=%.*s", ( int ) sym -> name . size, sym -> name . addr ));
+    }
+
+    return rc;
+}
+
+static
+rc_t kqsh_show_kmgr ( KSymTable *tbl, KTokenSource *src, KToken *t, KSymbol *sym )
+{
+    switch ( t -> id )
+    {
+    case kw_version:
+        return kqsh_show_kmgr_version ( tbl, src, next_token ( tbl, src, t ), sym );
+    }
+
+    return expected ( t, klogErr, "version" );
+}
+
+/*--------------------------------------------------------------------------
+ * VDBManager
+ */
+
+static
+rc_t kqsh_show_vmgr_version ( KSymTable *tbl, KTokenSource *src, KToken *t, KSymbol *sym )
+{
+    rc_t rc;
+    uint32_t vers;
+
+    if ( t -> id != eSemiColon )
+        return expected ( t, klogErr, ";" );
+
+    rc = _VDBManagerVersion ( sym -> u . obj, & vers );
+    if ( rc == 0 )
+    {
+        if ( ( vers & 0xFFFF ) != 0 )
+            kqsh_printf ( "vdb manager '%N' v%u.%u.%u\n", sym, vers >> 24, ( vers >> 16 ) & 0xFF, vers & 0xFFFF );
+        else
+            kqsh_printf ( "vdb manager '%N' v%u.%u\n", sym, vers >> 24, ( vers >> 16 ) & 0xFF );
+    }
+    else
+    {
+        PLOGERR ( klogInt,  (klogInt, rc, "failed to obtain version of vdb manager '$(name)'",
+                             "name=%.*s", ( int ) sym -> name . size, sym -> name . addr ));
+    }
+
+    return rc;
+}
+
+static
+rc_t kqsh_show_vmgr ( KSymTable *tbl, KTokenSource *src, KToken *t, KSymbol *sym )
+{
+    switch ( t -> id )
+    {
+    case kw_version:
+        return kqsh_show_vmgr_version ( tbl, src, next_token ( tbl, src, t ), sym );
+    }
+
+    return expected ( t, klogErr, "version" );
+}
+
+/*--------------------------------------------------------------------------
+ * VSchema
+ */
+
+static
+rc_t CC kqsh_flush_schema ( void *f, const void *buffer, size_t bsize )
+{
+    size_t num_writ, total;
+
+    for ( total = 0; total < bsize; total += num_writ )
+    {
+        num_writ = fwrite ( buffer, 1, bsize, f );
+        if ( num_writ == 0 )
+            return RC ( rcExe, rcFile, rcWriting, rcNoObj, rcUnknown );
+    }
+
+    return 0;
+}
+
+static
+rc_t kqsh_dump_schema ( KSymbol *sym, uint32_t mode, const String *decl )
+{
+    rc_t rc;
+    char buffer [ 256 ];
+
+    if ( decl -> size != 0 )
+    {
+        string_copy ( buffer, sizeof buffer, decl -> addr, decl -> size );
+        buffer [ sizeof buffer - 1 ] = 0;
+    }
+
+    if ( interactive )
+        putchar ( '\n' );
+
+    rc = _VSchemaDump ( sym -> u . obj, mode,
+        decl -> size ? buffer : NULL, kqsh_flush_schema, stdout );
+
+    if ( rc != 0 )
+    {
+        printf ( "\n\n\n***** ABORTED *****\n\n" );
+        PLOGERR ( klogInt,  (klogInt, rc, "failed to dump schema '$(name)'",
+                             "name=%.*s", ( int ) sym -> name . size, sym -> name . addr ));
+    }
+
+    if ( interactive )
+        putchar ( '\n' );
+
+    return rc;
+}
+
+enum VSchemaDumpClass
+{
+    sdcTypes = 1,
+    sdcTypesets,
+    sdcFormats,
+    sdcConstants,
+    sdcFunctions,
+    sdcColumns,
+    sdcTables,
+    sdcDatabases
+};
+
+static
+rc_t kqsh_show_schema ( KSymTable *tbl, KTokenSource *src, KToken *t, KSymbol *sym, uint32_t mode )
+{
+    String decl;
+    CONST_STRING ( & decl, "" );
+
+    switch ( t -> id )
+    {
+    case eSemiColon:
+        break;
+    case kw_types:
+        mode |= sdcTypes << 8;
+        break;
+    case kw_typesets:
+        mode |= sdcTypesets << 8;
+        break;
+    case kw_formats:
+        mode |= sdcFormats << 8;
+        break;
+    case kw_constants:
+        mode |= sdcConstants << 8;
+        break;
+    case kw_functions:
+        mode |= sdcFunctions << 8;
+        break;
+    case kw_columns:
+        mode |= sdcColumns << 8;
+        break;
+    case kw_tables:
+        mode |= sdcTables << 8;
+        break;
+    case kw_databases:
+        mode |= sdcDatabases << 8;
+        break;
+    case ePeriod:
+        if ( next_token ( tbl, src, t ) -> id != eSemiColon )
+        {
+            decl = t -> str;
+            while ( next_token ( tbl, src, t ) -> id != eSemiColon )
+                decl . size = t -> str . addr + t -> str . size - decl . addr;
+            decl . len = string_len ( decl . addr, decl . size );
+            break;
+        }
+    default:
+        return expected ( t, klogErr, "formats or types or typesets or constants or functions or columns or tables or databases" );
+    }
+
+    return kqsh_dump_schema ( sym, mode, & decl );
+}
+
+/*--------------------------------------------------------------------------
+ * kqsh
+ */
+
+/* show
+ */
+rc_t kqsh_show ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    uint32_t mode = sdmPrint;
+    KSymbol *sym = t -> sym;
+
+    switch ( t -> id )
+    {
+    case kw_manager:
+        sym = next_token ( tbl, src, t ) -> sym;
+        switch ( t -> id )
+        {
+        case obj_KDBManager:
+            return kqsh_show_kmgr ( tbl, src, next_token ( tbl, src, t ), sym );
+        case obj_VDBManager:
+            return kqsh_show_vmgr ( tbl, src, next_token ( tbl, src, t ), sym );
+        }
+        break;
+    case obj_KDBManager:
+        return kqsh_show_kmgr ( tbl, src, next_token ( tbl, src, t ), sym );
+    case obj_VDBManager:
+        return kqsh_show_vmgr ( tbl, src, next_token ( tbl, src, t ), sym );
+
+    case kw_compact:
+        mode = sdmCompact;
+        if ( next_token ( tbl, src, t ) -> id != kw_schema )
+        {
+            if ( t -> id != obj_VSchema )
+                break;
+            sym = t -> sym;
+            return kqsh_show_schema ( tbl, src, next_token ( tbl, src, t ), sym, mode );
+        }
+        /* no break */
+    case kw_schema:
+        if ( next_token ( tbl, src, t ) -> id != obj_VSchema )
+            break;
+        sym = t -> sym;
+    case obj_VSchema:
+        return kqsh_show_schema ( tbl, src, next_token ( tbl, src, t ), sym, mode );
+    }
+
+    return expected ( t, klogErr, "object" );
+}
+
diff --git a/tools/kqsh/kqsh-thunk.pl b/tools/kqsh/kqsh-thunk.pl
new file mode 100755
index 0000000..429ab55
--- /dev/null
+++ b/tools/kqsh/kqsh-thunk.pl
@@ -0,0 +1,662 @@
+#!/usr/bin/perl
+#============================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+#
+#
+
+sub lower_case_sym
+{
+    my $sym;
+    my $in = @_ [ 0 ];
+
+    # split at leading lower case
+    if ( $in =~ /^([^A-Z]*)([A-Z].*)/ )
+    {
+        $sym = $1;
+        $in = $2;
+    }
+    else
+    {
+        return $in;
+    }
+
+    while ( $in )
+    {
+        # split off series of leading upper case
+        if ( $in =~ /^([A-Z][A-Z]*)([A-Z][^A-Z].*)/ )
+        {
+            $sym and $sym .= "_";
+            $sym .= lc $1;
+            $in = $2;
+        }
+
+        # lower case next word
+        if ( $in =~ /^([A-Z][^A-Z][^A-Z]*)([A-Z].*)/ )
+        {
+            $sym and $sym .= "_";
+            $sym .= lc $1;
+            $in = $2;
+        }
+        else
+        {
+            $sym and $sym .= "_";
+            $sym .= lc $in;
+            $in = '';
+        }
+    }
+
+    return $sym;
+}
+
+my @classes;
+$num_classes = 0;
+
+my @inc_paths;
+my @src_files;
+
+my $h_out;
+my $c_out;
+my $module;
+
+while ( $arg = shift )
+{
+    if ( $arg =~ /-(..*)/ )
+    {
+        $arg = $1;
+        while ( $arg =~ /(.)(.*)/ )
+        {
+            $sw = $1;
+            $arg = $2;
+
+            if ( $sw eq "I" )
+            {
+                $arg or $arg = shift;
+                $arg or die "expected include path";
+                push @inc_paths, split ( ':', $arg );
+                $arg = '';
+            }
+            elsif ( $sw eq "i" )
+            {
+                $arg or $arg = shift;
+                $arg or die "expected interface file path";
+                push @src_files, split ( ':', $arg );
+                $arg = '';
+            }
+            elsif ( $sw eq "h" )
+            {
+                $arg or $arg = shift;
+                $arg or die "expected h file path";
+                $h_out = $arg;
+                $arg = '';
+            }
+            elsif ( $sw eq "c" )
+            {
+                $arg or $arg = shift;
+                $arg or die "expected c file path";
+                $c_out = $arg;
+                $arg = '';
+            }
+            elsif ( $sw eq "m" )
+            {
+                $arg or $arg = shift;
+                $arg or die "expected module name";
+                $module = $arg;
+                $arg = '';
+            }
+            else
+            {
+                print STDERR "unrecognized switch: '$sw'\n";
+                exit 3;
+            }
+        }
+    }
+    else
+    {
+        if ( $arg =~ /:(..*)/ )
+        {
+            $classes [ $num_classes ] [ 2 ] = 1;
+            $arg = $1;
+        }
+        else
+        {
+            $classes [ $num_classes ] [ 2 ] = 0;
+        }
+
+        if ( $arg =~ /(.[^=]*)=(..*)/ )
+        {
+            $classes [ $num_classes ] [ 0 ] = $1;
+            $classes [ $num_classes ] [ 1 ] = lower_case_sym $2;
+        }
+        else
+        {
+            $classes [ $num_classes ] [ 0 ] = $arg;
+            $classes [ $num_classes ] [ 1 ] = lower_case_sym $arg;
+        }
+
+        ++ $num_classes;
+    }
+}
+
+$num_paths = scalar @inc_paths;
+$num_files = scalar @src_files;
+
+# validate parameters
+$num_classes or die "no object class specified";
+$module or die "no module name specified";
+
+# open output files
+if ( $h_out )
+{
+    open $H, ">$h_out" or die "failed to open file '$h_out' for output";
+}
+if ( $c_out )
+{
+    open $C, ">$c_out" or die "failed to open file '$c_out' for output";
+}
+else
+{
+    $C = STDOUT;
+}
+
+if ( $src_file )
+{
+    open $in, $src_file;
+}
+else
+{
+    $in = STDIN;
+}
+
+# create function accumulator
+my @funcs;
+$num_funcs = 0;
+
+# process files
+for ( $fidx = 0; $fidx == 0 || $fidx < $num_files; ++ $fidx )
+{
+    # open files or stdin
+    if ( $num_files )
+    {
+        # file to open
+        $src_file = $src_files [ $fidx ];
+
+        # locate it first
+        $st = stat $src_file;
+        for ( $i = 0; ! $st && $i < $num_paths; ++ $i )
+        {
+            $inc_path = $inc_paths [ $i ];
+            $st = stat "$inc_path/$src_file";
+            $st and $src_file = "$inc_path/$src_file";
+        }
+
+        # open input file
+        open $IN, $src_file or die "failed to open file '$src_file' for input";
+    }
+    else
+    {
+        $IN = STDIN;
+    }
+
+    while ( $line = <$IN> )
+    {
+        chomp $line;
+        $line =~ s/^\s+//;
+        $line =~ s/\s+$//;
+
+        if ( ! $line )
+        {
+            # skip empty lines
+        }
+        elsif ( $line =~/^extern.*/ )
+        {
+            # skip over open of 'extern "C"'
+        }
+        elsif ( $line =~/^[#}].*/ )
+        {
+            # skip over preprocessor lines
+            # and close of 'extern "C"'
+        }
+        elsif ( $line =~ /^typedef .*/ )
+        {
+            # skip over typedefs
+        }
+        else
+        {
+            # consume comments here
+            while ( $line =~ /^(.*)\/\*(.*)$/ )
+            {
+                $line = $1;
+                $cmt = $2;
+                until ( ! $cmt || $cmt =~ /^.*\*\/(.*)$/ )
+                {
+                    $cmt = <$IN>;
+                }
+
+                $line and $1 and $line .= " ";
+                $line .= "$1";
+
+                chomp $line;
+                $line =~ s/^\s+//;
+                $line =~ s/\s+$//;
+            }
+            if ( ! $line )
+            {
+                # skip of comment line was empty
+            }
+            else
+            {
+                # assemble line
+                until ( $line =~ /^(.*;)(.*)$/ )
+                {
+                    $cont = <$IN>;
+                    chomp $cont;
+                    $cont =~ s/^\s+//;
+                    $cont =~ s/\s+$//;
+                    $line .= " $cont";
+                }
+
+                # look for a function prototype
+                if ( $line =~ /^[A-Z]+_EXTERN ([^\(]+)\s+CC ([A-Za-z_][A-Za-z0-9_]*)\s*\(\s*(.*)\s+\);/ ||
+                     $line =~ /^[A-Z]+_EXTERN ([^\(]+\*+)CC ([A-Za-z_][A-Za-z0-9_]*)\s*\(\s*(.*)\s+\);/ ||
+                     $line =~ /^([^\(]+)\s+([A-Za-z_][A-Za-z0-9_]*)\s*\(\s*(.*)\s+\);/ ||
+                     $line =~ /^([^\(]+\*+)([A-Za-z_][A-Za-z0-9_]*)\s*\(\s*(.*)\s+\);/ )
+                {
+                    $rt = $1;
+                    $func = $2;
+                    $formals = $3;
+
+                    $msg = '';
+                    $cid = 0;
+                    $cls = '';
+                    $dual = 0;
+
+                    for ( $i = 0; ! $msg && $i < $num_classes; ++ $i )
+                    {
+                        $cls = $classes [ $i ] [ 0 ];
+                        if ( $func =~ /^$cls(..*)/ )
+                        {
+                            $cid = $i;
+                            $msg = $1;
+                            $dual = $classes [ $i ] [ 2 ];
+                        }
+                    }
+
+                    $penult = '';
+                    $vararg = '';
+                    $update = 0;
+                    $params = '';
+                    $tformals = '';
+
+                    $formals2 = '';
+                    $tmplist = $formals;
+                    while ( $tmplist =~ /([^\(]*\()([^\)]*)(\).*)/ )
+                    {
+                        $formals2 .= $1;
+                        $pparms = $2;
+                        $tmplist = $3;
+                        $pparms =~ s/,/#/g;
+                        $formals2 .= "$pparms";
+                    }
+                    $formals2 .= $tmplist;
+
+                    @paramlist = split ( ',', $formals2 );
+                    while ( $param = shift @paramlist )
+                    {
+                        # trim parameter
+                        $param =~ s/^\s+//;
+                        $param =~ s/\s+$//;
+
+                        # catch vararg parameter
+                        if ( $param eq '...' )
+                        {
+                            $vararg = $penult;
+                            $params .= ", args";
+                            $tformals = '';
+                        }
+                        else
+                        {
+                            # correct hidden commas
+                            $param =~ s/#/,/g;
+
+                            # strip off vector expr
+                            if ( $param =~ /([^\[]*)\s*(\[.*\])$/ )
+                            {
+                                $param = $1;
+                                $vect = $2;
+                            }
+
+
+                            # strip off param name
+                            if ( $param =~ /^(.*)\s*(\([^\(]*\))$/ )
+                            {
+                                $param = $1;
+                                $pparms = $2;
+                                $param =~ /^(.*)\(\s*CC\s*\*\s*([A-Za-z0-9_]+)\s*\)/ or die "failed to determine name of parameter '$param'";
+                                $param = "$1( CC * ) $pparms";
+                                $penult = $2;
+                            }
+                            else
+                            {
+                                $param =~ /(.*[^A-Za-z0-9_]+)([A-Za-z0-9_]+)$/ or die "failed to determine name of parameter '$param'";
+                                $param = $1;
+                                $penult = $2;
+                            }
+
+                            $params and $params .= ", ";
+                            $params .= $penult;
+                            
+
+                            # process typedecl
+                            $param =~ s/\s+$//;
+                            if ( $param =~ /(.*)\s+(\*+)$/ )
+                            {
+                                $param = "$1$2";
+                            }
+                            $vect and $param .= " $vect";
+                            $tformals and $tformals .= ", ";
+                            $tformals .= $param;
+
+                            # finally, decide if the function is for read or update
+                            if ( $param =~ /^$cls/ || $param =~ /^struct\s+$cls\*+/ )
+                            {
+                                $update = $dual;
+                            }
+                        }
+                    }
+
+                    $funcs [ $num_funcs ] [ 0 ] = $cid;
+                    $funcs [ $num_funcs ] [ 1 ] = $msg;
+                    $funcs [ $num_funcs ] [ 2 ] = $rt;
+                    $funcs [ $num_funcs ] [ 3 ] = $formals;
+                    $funcs [ $num_funcs ] [ 4 ] = $tformals;
+                    $funcs [ $num_funcs ] [ 5 ] = $vararg;
+                    $funcs [ $num_funcs ] [ 6 ] = $params;
+                    $funcs [ $num_funcs ] [ 7 ] = $update;
+
+                    ++ $num_funcs;
+                }
+            }
+        }
+    }
+
+    if ( $num_files )
+    {
+        close $IN;
+        $IN = '';
+    }
+}
+
+# generate text into arrays
+my @msgs;
+my @cvt;
+my @wmsgs;
+my @wvt;
+my @decls;
+my @thunks;
+$mgr = 'mgr';
+
+for ( $num_thunks = 0, $num_ro = 0, $i = 0; $i < $num_funcs; ++ $i )
+{
+    # extract information
+    $cid = $funcs [ $i ] [ 0 ];
+    $msg = $funcs [ $i ] [ 1 ];
+    $rt = $funcs [ $i ] [ 2 ];
+    $formals = $funcs [ $i ] [ 3 ];
+    $tformals = $funcs [ $i ] [ 4 ];
+    $vararg = $funcs [ $i ] [ 5 ];
+    $params = $funcs [ $i ] [ 6 ];
+    $update = $funcs [ $i ] [ 7 ];
+
+    $cls = $classes [ $cid ] [ 0 ];
+    $prefix = $classes [ $cid ] [ 1 ];
+    $dual = $classes [ $cid ] [ 2 ];
+
+    # constructor flag
+    $constructor = 3;
+
+    # msg symbol
+    $sym = "$cls$msg";
+    $tname = "_$sym";
+
+    # vt
+    $vt = $module;
+    $update == 0 and $vt .= "_cvt";
+    $update == 1 and $vt .= "_wvt";
+
+    # vt member
+    $vt_mbr = $prefix;
+    $vt_mbr .= '_';
+    if ( $dual && ( $msg eq "MakeRead" || $msg eq "MakeUpdate" ) )
+    {
+        # detect special library constructor
+        if ( $tformals =~ /^$cls\*\*,/ )
+        {
+            $constructor = 2;
+            $vt = $module . "_cvt";
+            $vt_mbr .= "make";
+            $tname = "_$cls" . "Make";
+        }
+        elsif ( $tformals =~ /^const\s+$cls\*\*,/ )
+        {
+            $constructor = 0;
+            $vt_mbr .= "make";
+        }
+        elsif ( $tformals =~ /^const\s+$cls\*\*$/ )
+        {
+            $constructor = 1;
+            $vt_mbr .= "make";
+        }
+        else
+        {
+            $vararg and $vt_mbr .= "v_";
+            $vt_mbr .= lower_case_sym $msg;
+        }
+    }
+    else
+    {
+        $vararg and $vt_mbr .= "v_";
+        $vt_mbr .= lower_case_sym $msg;
+    }
+
+    # vt function
+    $vt_func = "$rt ( CC * $vt_mbr ) ( $tformals )";
+
+    # dispatch
+    $disp = "( * $vt . f . $vt_mbr ) ( $params )";
+
+    # function declaration
+    $decl = "$rt $tname ( $formals )";
+
+    # thunk
+    $thunk = "$decl\n{\n";
+    if ( $vararg )
+    {
+        $thunk .= "    $rt ret;\n    va_list args;\n    va_start ( args, $vararg );\n";
+        $thunk .= "    assert ( $vt . f . $vt_mbr != NULL );\n";
+        $thunk .= "    ret = $disp;\n    va_end ( args );\n    return ret;\n";
+    }
+    else
+    {
+        $thunk .= "    assert ( $vt . f . $vt_mbr != NULL );\n";
+        $thunk .= "    return $disp;\n";
+    }
+    $thunk .= "}";
+
+    # handle library constructors specially
+    if ( $constructor == 0 )
+    {
+        $msgs [ 0 ] = $sym;
+    }
+    elsif ( $constructor == 1 )
+    {
+        my $subst_sym;
+        $subst_sym = $sym .= "WithDir";
+        $msgs [ 0 ] = $subst_sym;
+    }
+    elsif ( $constructor == 2 )
+    {
+        $msgs [ 1 ] = $sym;
+        $cvt [ 0 ] = $vt_func;
+        $decls [ 0 ] = $decl;
+        $thunks [ 0 ] = $thunk;
+        @pnames = split ( ',', $params );
+        $mgr = $pnames [ 0 ];
+    }
+    elsif ( $vararg )
+    {
+        $decls [ $num_thunks + 1 ] = $decl;
+        $thunks [ $num_thunks + 1 ] = $thunk;
+        ++ $num_thunks;
+    }
+    elsif ( $update == 1 )
+    {
+        push @wmsgs, $sym;
+        push @wvt, $vt_func;
+
+        $decls [ $num_thunks + 1 ] = $decl;
+        $thunks [ $num_thunks + 1 ] = $thunk;
+        ++ $num_thunks;
+    }
+    else
+    {
+        $msgs [ $num_ro + 2 ] = $sym;
+        $cvt [ $num_ro + 1 ] = $vt_func;
+        ++ $num_ro;
+
+        $decls [ $num_thunks + 1 ] = $decl;
+        $thunks [ $num_thunks + 1 ] = $thunk;
+        ++ $num_thunks;
+    }
+}
+
+# create warning comment
+$warn_cmt = "/* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT */\n";
+
+# write include file
+if ( $h_out )
+{
+    $def = "_h_$h_out";
+    $def =~ s/\.h$//;
+    $def .= '_';
+    $def =~ s/[\/-]/_/g;
+    print $H "$warn_cmt\n#ifndef $def\n#define $def\n\n";
+
+    while ( $src_file = shift @src_files )
+    {
+        $src_def = "_h_$src_file";
+        $src_def =~ s/\.h$//;
+        $src_def .= '_';
+        $src_def =~ s/[\/-]/_/g;
+        print $H "#ifndef $src_def\n#include <$src_file>\n#endif\n\n";
+    }
+
+    print $H "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n";
+
+    while ( $decl = shift @decls )
+    {
+        print $H "$decl;\n"
+    }
+
+    print $H "\n#ifdef __cplusplus\n}\n#endif\n\n";
+
+    print $H "#endif /* $def */\n";
+
+    close $H;
+}
+
+# write thunk file
+if ( $h_out )
+{
+    print $C "$warn_cmt\n#include \"$h_out\"\n";
+}
+else
+{
+    print $C "$warn_cmt\n#include \"kqsh-$module.h\"\n";
+}
+print $C "#include \"kqsh-priv.h\"\n";
+print $C "#include <klib/rc.h>\n";
+print $C "#include <assert.h>\n\n";
+
+# read-only messages
+print $C "static const char *$module" . "_msgs [] =\n{\n";
+while ( $msg = shift @msgs )
+{
+    print $C "    \"$msg\",\n";
+}
+print $C "    NULL\n};\n\n";
+
+# read-only vtable
+print $C "static union\n{\n";
+print $C "    fptr_t slots [ sizeof $module" . "_msgs / sizeof $module" . "_msgs [ 0 ] - 2 ];\n\n";
+print $C "    struct\n    {\n";
+while ( $vt_func = shift @cvt )
+{
+    print $C "        $vt_func;\n"
+}
+print $C "    } f;\n\n} $module" . "_cvt;\n\n";
+
+# update messages
+print $C "static const char *$module" . "_wmsgs [] =\n{\n";
+while ( $msg = shift @wmsgs )
+{
+    print $C "    \"$msg\",\n";
+}
+print $C "    NULL\n};\n\n";
+
+# update vtable
+print $C "static union\n{\n";
+print $C "    fptr_t slots [ sizeof $module" . "_wmsgs / sizeof $module" . "_wmsgs [ 0 ] - 1 ];\n\n";
+print $C "    struct\n    {\n";
+while ( $vt_func = shift @wvt )
+{
+    print $C "        $vt_func;\n"
+}
+print $C "    } f;\n\n} $module" . "_wvt;\n\n";
+
+# libdata
+print $C "kqsh_libdata $module" . "_data =\n{\n";
+print $C "    NULL, NULL,\n";
+print $C "    $module" . "_msgs, $module" . "_cvt . slots,\n";
+print $C "    $module" . "_wmsgs, $module" . "_wvt . slots\n";
+print $C "};\n\n";
+
+# special library construct thunk
+$thunk = shift @thunks;
+ at lines = split ( '\n', $thunk );
+print $C $lines [ 0 ] . "\n{\n";
+print $C "    if ( sizeof $module" . "_cvt . slots != sizeof $module" . "_cvt . f ||\n";
+print $C "         sizeof $module" . "_wvt . slots != sizeof $module" . "_wvt . f )\n";
+print $C "    {\n";
+print $C "        * $mgr = NULL;\n";
+print $C "        return RC ( rcExe, rcMgr, rcConstructing, rcInterface, rcCorrupt );\n";
+print $C "    }\n\n";
+print $C $lines [ 2 ] . "\n";
+print $C $lines [ 3 ] . "\n";
+print $C "}\n\n";
+
+# remainder of thunks
+while ( $thunk = shift @thunks )
+{
+    print $C "$thunk\n\n";
+}
diff --git a/tools/kqsh/kqsh-tok.c b/tools/kqsh/kqsh-tok.c
new file mode 100644
index 0000000..0be5a65
--- /dev/null
+++ b/tools/kqsh/kqsh-tok.c
@@ -0,0 +1,99 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "kqsh-tok.h"
+#include "kqsh-priv.h"
+
+#include <klib/symbol.h>
+#include <klib/symtab.h>
+#include <klib/token.h>
+
+#include <kfs/dyload.h>
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+
+/* next_token
+ */
+KToken *next_token ( struct KSymTable const *tbl, KTokenSource *src, KToken *t )
+{
+    if ( KTokenizerNext ( kDefaultTokenizer, src, t ) -> id == eIdent )
+    {
+        KSymbol *sym = KSymTableFind ( tbl, & t -> str );
+        t -> sym = sym;
+        if ( sym != NULL )
+            t -> id = sym -> type;
+    }
+
+    return t;
+}
+
+KToken *next_shallow_token ( struct KSymTable const *tbl, KTokenSource *src, KToken *t )
+{
+    if ( KTokenizerNext ( kDefaultTokenizer, src, t ) -> id == eIdent || t -> id == eName )
+    {
+        KSymbol *sym = KSymTableFindShallow ( tbl, & t -> str );
+        t -> sym = sym;
+        if ( sym != NULL )
+            t -> id = sym -> type;
+    }
+
+    return t;
+}
+
+/* expected
+ */
+rc_t expected ( const KToken *self, KLogLevel lvl, const char *expected )
+{
+    String eof;
+    const String *str = & self -> str;
+
+    if ( self -> id == eEndOfInput )
+    {
+        CONST_STRING ( & eof, "EOF" );
+        str = & eof;
+    }
+
+    if ( interactive )
+        kqsh_printf ( "expected '%s' but found '%S'\n", expected, str );
+    else
+    {
+        PLOGMSG ( lvl, ( lvl, "$(file):$(lineno): "
+                         "expected '$(expected)' but found '$(found)'",
+                         "file=%.*s,lineno=%u,expected=%s,found=%.*s"
+                         , ( int ) self -> txt -> path . size, self -> txt -> path . addr
+                         , self -> lineno
+                         , expected
+                         , ( int ) str -> size, str -> addr ));
+    }
+
+    return RC ( rcExe, rcText, rcParsing, rcToken, rcUnexpected );
+}
diff --git a/tools/kqsh/kqsh-tok.h b/tools/kqsh/kqsh-tok.h
new file mode 100644
index 0000000..121899f
--- /dev/null
+++ b/tools/kqsh/kqsh-tok.h
@@ -0,0 +1,155 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_kqsh_tok_
+#define _h_kqsh_tok_
+
+#ifndef _h_klib_token_
+#include <klib/token.h>
+#endif
+
+#ifndef _h_klib_log_
+#include <klib/log.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct KSymTable;
+
+
+/*--------------------------------------------------------------------------
+ * kqsh tokens
+ */
+enum kqsh_tokens
+{
+    /* alphabetical list of commands */
+    kw_add = eNumSymtabIDs,
+    kw_alias,
+    kw_alter,
+    kw_as,
+    kw_at,
+    kw_close,
+    kw_column,
+    kw_columns,
+    kw_commands,
+    kw_compact,
+    kw_constants,
+    kw_create,
+    kw_cursor,
+    kw_database,
+    kw_databases,
+    kw_delete,
+    kw_drop,
+    kw_execute,
+    kw_exit,
+    kw_for,
+    kw_formats,
+    kw_functions,
+    kw_help,
+    kw_include,
+    kw_initialize,
+    kw_insert,
+    kw_kdb,
+    kw_library,
+    kw_load,
+    kw_manager,
+    kw_metadata,
+    kw_objects,
+    kw_on,
+    kw_open,
+    kw_or,
+    kw_path,
+    kw_quit,
+    kw_rename,
+    kw_replace,
+    kw_row,
+    kw_schema,
+    kw_show,
+    kw_sra,
+    kw_table,
+    kw_tables,
+    kw_text,
+    kw_types,
+    kw_typesets,
+    kw_update,
+    kw_use,
+    kw_using,
+    kw_version,
+    kw_vdb,
+    kw_with,
+    kw_write,
+
+    rsrv_first,
+    /* reserved names */
+    rsrv_kmgr = rsrv_first,
+    rsrv_vmgr,
+    rsrv_sramgr,
+    rsrv_srapath,
+
+    obj_first,
+    /* object types */
+    obj_KDBManager = obj_first,
+    obj_VDBManager,
+    obj_SRAManager,
+    obj_VSchema,
+    obj_KTable,
+    obj_VTable,
+    obj_VCursor,
+
+    /* accepted abbreviations */
+    kw_col = kw_column,
+    kw_cols = kw_columns,
+    kw_db = kw_database,
+    kw_dbs = kw_databases,
+    kw_exec = kw_execute,
+    kw_init = kw_initialize,
+    kw_lib = kw_library,
+    kw_mgr = kw_manager,
+    kw_tbl = kw_table
+};
+
+/* next_token
+ */
+KToken *next_token ( struct KSymTable const *tbl, KTokenSource *src, KToken *t );
+KToken *next_shallow_token ( struct KSymTable const *tbl, KTokenSource *src, KToken *t );
+
+/* expected
+ */
+rc_t expected ( const KToken *self, KLogLevel lvl, const char *expected );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _h_kqsh_tok_ */
diff --git a/tools/kqsh/kqsh-write.c b/tools/kqsh/kqsh-write.c
new file mode 100644
index 0000000..2e63262
--- /dev/null
+++ b/tools/kqsh/kqsh-write.c
@@ -0,0 +1,321 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "kqsh-priv.h"
+#include "kqsh-tok.h"
+#include "kqsh-kdb.h"
+#include "kqsh-vdb.h"
+
+#include <klib/symbol.h>
+#include <klib/symtab.h>
+#include <klib/token.h>
+
+#include <kfs/directory.h>
+#include <klib/log.h>
+#include <klib/vector.h>
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+
+/* write_cursor_xxx
+ */
+static
+rc_t kqsh_write_cursor_array ( KSymTable *tbl, KTokenSource *src, KToken *t,
+    const KSymbol *curs, uint32_t idx, const VTypedesc *desc,
+    rc_t ( * write ) ( KSymTable*, KTokenSource*, KToken*, const KSymbol*, uint32_t, const VTypedesc* ) )
+{
+    rc_t rc;
+
+    /* allow empty array */
+    if ( next_token ( tbl, src, t ) -> id == eRightSquare )
+        return 0;
+
+    /* write elements */
+    while ( 1 )
+    {
+        /* write the element */
+        rc = ( * write ) ( tbl, src, t, curs, idx, desc );
+        if ( rc != 0 )
+            break;
+
+        /* punctuation */
+        if ( next_token ( tbl, src, t ) -> id != eComma )
+            break;
+
+        /* next element */
+        next_token ( tbl, src, t );
+    }
+
+    /* expect ']' */
+    if ( rc == 0 && t -> id != eRightSquare )
+        rc = expected ( t, klogErr, "]" );
+
+    return rc;
+}
+
+static
+rc_t kqsh_write_cursor_bool ( KSymTable *tbl, KTokenSource *src, KToken *t,
+    const KSymbol *curs, uint32_t idx, const VTypedesc *desc )
+{
+    if ( t -> id == eLeftSquare )
+        return kqsh_write_cursor_array ( tbl, src, t, curs, idx, desc, kqsh_write_cursor_bool );
+
+    assert ( desc -> intrinsic_bits == 8 );
+    return -1;
+}
+
+static
+rc_t kqsh_write_cursor_uint ( KSymTable *tbl, KTokenSource *src, KToken *t,
+    const KSymbol *curs, uint32_t idx, const VTypedesc *desc )
+{
+    if ( t -> id == eLeftSquare )
+        return kqsh_write_cursor_array ( tbl, src, t, curs, idx, desc, kqsh_write_cursor_uint );
+    return -1;
+}
+
+static
+rc_t kqsh_write_cursor_int ( KSymTable *tbl, KTokenSource *src, KToken *t,
+    const KSymbol *curs, uint32_t idx, const VTypedesc *desc )
+{
+    if ( t -> id == eLeftSquare )
+        return kqsh_write_cursor_array ( tbl, src, t, curs, idx, desc, kqsh_write_cursor_int );
+    return -1;
+}
+
+static
+rc_t kqsh_write_cursor_float ( KSymTable *tbl, KTokenSource *src, KToken *t,
+    const KSymbol *curs, uint32_t idx, const VTypedesc *desc )
+{
+    if ( t -> id == eLeftSquare )
+        return kqsh_write_cursor_array ( tbl, src, t, curs, idx, desc, kqsh_write_cursor_float );
+    return -1;
+}
+
+static
+rc_t kqsh_write_cursor_ascii ( KSymTable *tbl, KTokenSource *src, KToken *t,
+    const KSymbol *curs, uint32_t idx, const VTypedesc *desc )
+{
+    rc_t rc;
+
+    switch ( t -> id )
+    {
+    case eUntermString:
+    case eUntermEscapedString:
+        return expected ( t, klogErr, "terminated string" );
+    case eString:
+        rc = _VCursorWrite ( ( void* ) curs -> u . obj, idx, 8, t -> str . addr + 1, 0, t -> str . len - 2 );
+        if ( rc == 0 )
+            return 0;
+        break;
+    case eEscapedString:
+        rc = 0;
+        break;
+    default:
+        return expected ( t, klogErr, "string" );
+    }
+
+    if ( rc == 0 )
+    {
+        char buffer [ 256 ], *p = buffer;
+        size_t size = sizeof buffer;
+        if ( t -> str . size >= sizeof buffer )
+        {
+            p = malloc ( size = t -> str . size + 1 );
+            if ( p == NULL )
+                rc = RC ( rcExe, rcCursor, rcWriting, rcMemory, rcExhausted );
+        }
+
+        if ( rc == 0 )
+        {
+            rc = KTokenToString ( t, p, size, & size );
+            if ( rc == 0 )
+                rc = _VCursorWrite ( ( void* ) curs -> u . obj, idx, 8, p, 0, size );
+            if ( p != buffer )
+                free ( p );
+        }
+    }
+
+    if ( rc != 0 )
+    {
+        PLOGERR ( klogInt,  (klogInt, rc,
+                  "failed to write string '$(str)' to cursor '$(curs)' ( $(addr) )"
+                  , "str=%.*s,curs=%.*s,addr=0x%zX"
+                  , ( int ) t -> str . size, t -> str . addr
+                  , ( int ) curs -> name . size, curs -> name . addr
+                  , ( size_t ) curs -> u . obj ));
+   }
+
+    return rc;
+}
+
+static
+rc_t kqsh_write_cursor_unicode ( KSymTable *tbl, KTokenSource *src, KToken *t,
+    const KSymbol *curs, uint32_t idx, const VTypedesc *desc )
+{
+    if ( desc -> intrinsic_bits == 8 )
+        return kqsh_write_cursor_ascii ( tbl, src, t, curs, idx, desc );
+
+    return -1;
+}
+
+/* write_cursor
+ */
+static
+rc_t kqsh_write_cursor ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    rc_t rc = 0;
+    uint32_t idx;
+    VTypedecl td;
+    VTypedesc desc;
+
+    /* have cursor object */
+    KSymbol *curs = t -> sym;
+
+    /* error if read-only */
+    if ( read_only )
+    {
+        rc = RC ( rcExe, rcCursor, rcWriting, rcCursor, rcReadonly );
+        PLOGERR ( klogInt,  (klogInt, rc,
+                  "failed to write to cursor '$(curs)' ( $(addr) )"
+                  , "curs=%.*s,addr=0x%zX"
+                  , ( int ) curs -> name . size, curs -> name . addr
+                  , ( size_t ) curs -> u . obj ));
+        return rc;
+    }
+
+    /* separator */
+    if ( next_token ( tbl, src, t ) -> id != ePeriod )
+        return expected ( t, klogErr, ". <colname> or IDX" );
+
+    /* get column spec */
+    switch ( next_token ( tbl, src, t ) -> id )
+    {
+        /* take integer index */
+    case eDecimal:
+    case eHex:
+    case eOctal:
+        rc = KTokenToU32 ( t, & idx );
+        if ( rc != 0 )
+            return expected ( t, klogErr, "integer column index" );
+        break;
+
+        /* take column name */
+    default:
+        if ( t -> sym == NULL )
+            return expected ( t, klogErr, "column name" );
+    case eIdent:
+        switch ( curs -> type )
+        {
+        case obj_VCursor:
+            rc = _VCursorGetColumnIdx ( curs -> u . obj, & idx, "%.*s",
+                ( int ) t -> str . size, t -> str . addr );
+            break;
+        }
+        if ( rc != 0 )
+        {
+            PLOGERR ( klogInt,  (klogInt, rc,
+                      "failed to write to column '$(col)' on cursor '$(curs)' ( $(addr) )"
+                      , "col=%.*s,curs=%.*s,addr=0x%zX"
+                      , ( int ) t -> str . size, t -> str . addr
+                      , ( int ) curs -> name . size, curs -> name . addr
+                      , ( size_t ) curs -> u . obj ));
+            return rc;
+        }
+        break;
+    }
+
+    /* access column object */
+    switch ( curs -> type )
+    {
+    case obj_VCursor:
+        rc = _VCursorDatatype ( curs -> u . obj, idx, & td, & desc );
+        break;
+    }
+
+    if ( rc != 0 )
+    {
+        PLOGERR ( klogInt,  (klogInt, rc,
+                  "failed to access datatype of column $(idx) on cursor '$(curs)' ( $(addr) )"
+                  , "idx=%u,curs=%.*s,addr=0x%zX"
+                  , idx
+                  , ( int ) curs -> name . size, curs -> name . addr
+                  , ( size_t ) curs -> u . obj ));
+        return rc;
+    }
+
+    /* move on to first token of row */
+    next_token ( tbl, src, t );
+
+    /* switch on datatype */
+    switch ( desc . domain )
+    {
+    case vtdBool:
+        rc = kqsh_write_cursor_bool ( tbl, src, t, curs, idx, & desc );
+        break;
+    case vtdUint:
+        rc = kqsh_write_cursor_uint ( tbl, src, t, curs, idx, & desc );
+        break;
+    case vtdInt:
+        rc = kqsh_write_cursor_int ( tbl, src, t, curs, idx, & desc );
+        break;
+    case vtdFloat:
+        rc = kqsh_write_cursor_float ( tbl, src, t, curs, idx, & desc );
+        break;
+    case vtdAscii:
+        rc = kqsh_write_cursor_ascii ( tbl, src, t, curs, idx, & desc );
+        break;
+    case vtdUnicode:
+        rc = kqsh_write_cursor_unicode ( tbl, src, t, curs, idx, & desc );
+        break;
+    }
+
+    /* expect semicolon */
+    if ( rc == 0 )
+    {
+        if ( next_token ( tbl, src, t ) -> id != eSemiColon )
+            return expected ( t, klogErr, ";" );
+    }
+
+    return rc;
+}
+
+
+/* write
+ */
+rc_t kqsh_write ( KSymTable *tbl, KTokenSource *src, KToken *t )
+{
+    switch ( t -> id )
+    {
+    case obj_VCursor:
+        return kqsh_write_cursor ( tbl, src, t );
+    }
+
+    return expected ( t, klogErr, "cursor" );
+}
diff --git a/tools/kqsh/kqsh.c b/tools/kqsh/kqsh.c
new file mode 100644
index 0000000..dec7860
--- /dev/null
+++ b/tools/kqsh/kqsh.c
@@ -0,0 +1,516 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "kqsh-priv.h"
+#include "kqsh-tok.h"
+
+#include <klib/container.h>
+#include <klib/symbol.h>
+#include <klib/symtab.h>
+#include <klib/token.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/mmap.h>
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+bool read_only;
+bool interactive;
+
+
+/* exec_file
+ *  execute a named file
+ */
+rc_t kqsh_exec_file ( KSymTable *tbl, const String *path )
+{
+    KDirectory *wd;
+    rc_t rc = KDirectoryNativeDir ( & wd );
+    if ( rc != 0 )
+        LOGERR ( klogInt, rc, "failed to open working directory" );
+    else
+    {
+        const KFile *f;
+        rc = KDirectoryOpenFileRead ( wd, & f, "%.*s"
+            , ( int ) path -> size, path -> addr );
+        if ( rc != 0 )
+        {
+            PLOGERR ( klogErr,  (klogErr, rc, "failed to open file '$(path)'", "path=%.*s"
+                                 , ( int ) path -> size, path -> addr ));
+        }
+        else
+        {
+            const KMMap *mm;
+            rc = KMMapMakeRead ( & mm, f );
+            if ( rc != 0 )
+            {
+                PLOGERR ( klogErr,  (klogErr, rc, "failed to map file '$(path)'", "path=%.*s"
+                                     , ( int ) path -> size, path -> addr ));
+            }
+            else
+            {
+                const void *addr;
+                rc = KMMapAddrRead ( mm, & addr );
+                if ( rc != 0 )
+                    LOGERR ( klogInt, rc, "failed to obtain mmap addr" );
+                else
+                {
+                    size_t size;
+                    rc = KMMapSize ( mm, & size );
+                    if ( rc != 0 )
+                        LOGERR ( klogInt, rc, "failed to obtain mmap size" );
+                    else
+                    {
+                        String text;
+                        KTokenText tt;
+                        KTokenSource src;
+
+                        StringInit ( & text, addr, ( size_t ) size,
+                            string_len ( addr, ( size_t ) size ) );
+                        KTokenTextInit ( & tt, & text, path );
+                        KTokenSourceInit ( & src, & tt );
+
+                        rc = kqsh ( tbl, & src );
+                    }
+                }
+
+                KMMapRelease ( mm );
+            }
+
+            KFileRelease ( f );
+        }
+
+        KDirectoryRelease ( wd );
+    }
+
+    return rc;
+}
+
+/* init_symtable
+ *  initialize tool table
+ */
+static
+rc_t kqsh_init_keywords ( KSymTable *tbl )
+{
+    int i;
+    static struct
+    {
+        const char *keyword;
+        int id;
+    } kw [] =
+    {
+#define KEYWORD( word ) \
+        { # word, kw_ ## word }
+#define RESERVED( word ) \
+        { # word, rsrv_ ## word }
+
+        /* keywords */
+        KEYWORD ( add ),
+        KEYWORD ( alias ),
+        KEYWORD ( alter ),
+        KEYWORD ( as ),
+        KEYWORD ( at ),
+        KEYWORD ( close ),
+        KEYWORD ( column ),
+        KEYWORD ( columns ),
+        KEYWORD ( commands ),
+        KEYWORD ( compact ),
+        KEYWORD ( constants ),
+        KEYWORD ( create ),
+        KEYWORD ( cursor ),
+        KEYWORD ( database ),
+        KEYWORD ( databases ),
+        KEYWORD ( delete ),
+        KEYWORD ( drop ),
+        KEYWORD ( execute ),
+        KEYWORD ( exit ),
+        KEYWORD ( for ),
+        KEYWORD ( formats ),
+        KEYWORD ( functions ),
+        KEYWORD ( help ),
+        KEYWORD ( include ),
+        KEYWORD ( initialize ),
+        KEYWORD ( insert ),
+        KEYWORD ( kdb ),
+        KEYWORD ( library ),
+        KEYWORD ( load ),
+        KEYWORD ( manager ),
+        KEYWORD ( metadata ),
+        KEYWORD ( objects ),
+        KEYWORD ( on ),
+        KEYWORD ( open ),
+        KEYWORD ( or ),
+        KEYWORD ( path ),
+        KEYWORD ( quit ),
+        KEYWORD ( rename ),
+        KEYWORD ( replace ),
+        KEYWORD ( row ),
+        KEYWORD ( schema ),
+        KEYWORD ( show ),
+        KEYWORD ( sra ),
+        KEYWORD ( table ),
+        KEYWORD ( tables ),
+        KEYWORD ( text ),
+        KEYWORD ( types ),
+        KEYWORD ( typesets ),
+        KEYWORD ( update ),
+        KEYWORD ( use ),
+        KEYWORD ( using ),
+        KEYWORD ( version ),
+        KEYWORD ( vdb ),
+        KEYWORD ( with ),
+        KEYWORD ( write ),
+
+        /* reserved names */
+        RESERVED ( kmgr ),
+        RESERVED ( vmgr ),
+        RESERVED ( sramgr ),
+        RESERVED ( srapath ),
+
+        /* abbreviations */
+        KEYWORD ( col ),
+        KEYWORD ( cols ),
+        KEYWORD ( db ),
+        KEYWORD ( dbs ),
+        KEYWORD ( exec ),
+        KEYWORD ( init ),
+        KEYWORD ( lib ),
+        KEYWORD ( mgr ),
+        KEYWORD ( tbl )
+
+#undef KEYWORD
+#undef RESERVED
+    };
+
+
+    /* define keywords */
+    for ( i = 0; i < sizeof kw / sizeof kw [ 0 ]; ++ i )
+    {
+        rc_t rc;
+
+        String name;
+        StringInitCString ( & name, kw [ i ] . keyword );
+        rc = KSymTableCreateSymbol ( tbl, NULL, & name, kw [ i ] . id, NULL );
+        if ( rc != 0 )
+            return rc;
+    }
+
+    return 0;
+}
+
+static
+rc_t kqsh_init_symtable ( KSymTable *tbl, BSTree *intrinsic )
+{
+    rc_t rc = KSymTablePushScope ( tbl, intrinsic );
+    if ( rc != 0 )
+        LOGERR ( klogInt, rc, "failed to initialize symbol table" );
+    else
+    {
+        rc = kqsh_init_keywords ( tbl );
+
+        KSymTablePopScope ( tbl );
+    }
+
+    return rc;
+}
+
+
+/* whackobj
+ *  whacks created/opened objects
+ */
+static
+rc_t CC kqsh_read_stdin ( void *data, KTokenText *tt, size_t save )
+{
+    rc_t rc;
+    size_t num_read;
+    const KFile *self = ( const void* ) data;
+
+    /* manage stdin for the process */
+    static uint64_t pos;
+    static char buff [ 4096 ];
+
+    /* save any characters not yet consumed */
+    if ( save != 0 )
+    {
+        assert ( save < sizeof buff );
+        memmove ( buff, & tt -> str . addr [ tt -> str . size - save ], save );
+    }
+
+    /* read as many characters as are available */
+    rc = KFileRead ( self, pos, & buff [ save ], sizeof buff - save, & num_read );
+    if ( rc != 0 )
+        LOGERR ( klogErr, rc, "failed to read stdin" );
+    else
+    {
+        /* reset the buffer in "tt" */
+        tt -> str . addr = buff;
+        tt -> str . size = save + num_read;
+        tt -> str . len = string_len ( buff, save + num_read );
+        pos += num_read;
+    }
+
+    return rc;
+}
+
+/* init_console
+ */
+static
+rc_t kqsh_init_console ( KTokenText *console )
+{
+    const KFile *std_in;
+    rc_t rc = KFileMakeStdIn ( & std_in );
+    if ( rc != 0 )
+        LOGERR ( klogErr, rc, "failed to init stdin" );
+    else
+    {
+        KTokenTextInitCString ( console, "", "stdin" );
+        console -> read = kqsh_read_stdin;
+        console -> data = ( void* ) std_in;
+
+        if ( KFileType ( std_in ) == kfdCharDev )
+            interactive = true;
+    }
+    return rc;
+}
+
+#define OPTION_UPDATE  "update"
+#define OPTION_LIBPATH "lib-path"
+#define ALIAS_UPDATE   "u"
+#define ALIAS_LIBPATH  "l"
+
+static const char * update_usage[] = { "use update managers", NULL };
+static const char * libpath_usage[] = { "add to load library path", NULL };
+
+OptDef MyOptions [] = 
+{
+    { OPTION_UPDATE,  ALIAS_UPDATE,  NULL, update_usage,  0, false, false },
+    { OPTION_LIBPATH, ALIAS_LIBPATH, NULL, libpath_usage, 0, true, false }
+};
+
+const char UsageDefaultName[] = "kqsh";
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s [ options ] [ file ... ]\n"
+                    "\n", progname);
+}
+
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary (progname);
+
+    KOutMsg ("Options:\n");
+
+    HelpOptionLine (ALIAS_UPDATE, OPTION_UPDATE, NULL, update_usage);
+
+    HelpOptionLine (ALIAS_LIBPATH, OPTION_LIBPATH, "path", libpath_usage);
+
+    HelpOptionsStandard ();
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+
+/* KMain - EXTERN
+ *  executable entrypoint "main" is implemented by
+ *  an OS-specific wrapper that takes care of establishing
+ *  signal handlers, logging, etc.
+ *
+ *  in turn, OS-specific "main" will invoke "KMain" as
+ *  platform independent main entrypoint.
+ *
+ *  "argc" [ IN ] - the number of textual parameters in "argv"
+ *  should never be < 0, but has been left as a signed int
+ *  for reasons of tradition.
+ *
+ *  "argv" [ IN ] - array of NUL terminated strings expected
+ *  to be in the shell-native character set: ASCII or UTF-8
+ *  element 0 is expected to be executable identity or path.
+ */
+static
+rc_t kqsh_main ( int argc, char *argv [] )
+{
+    rc_t rc;
+    Args *args;
+
+    rc = ArgsMakeAndHandle ( & args, argc, argv, 1, MyOptions,
+        sizeof MyOptions / sizeof MyOptions [ 0 ] );
+    if ( rc == 0 ) do 
+    {
+        uint32_t ix;
+        uint32_t pcount;
+        const char * pc;
+
+        /* did anyone ask to open update managers? */
+        rc = ArgsOptionCount ( args, OPTION_UPDATE, & pcount );
+        if ( rc != 0 )
+        {
+            PLOGERR ( klogInt, ( klogInt, rc, "failed to retrieve '$(option)' option count", "option=" OPTION_UPDATE ) );
+            break;
+        }
+
+        /* record zero count as read-only */
+        read_only = ( pcount == 0 );
+
+        /* did anyone ask to add a custom library search path? */
+        rc = ArgsOptionCount ( args, OPTION_LIBPATH, & pcount );
+        if ( rc != 0 )
+        {
+            PLOGERR ( klogInt, ( klogInt, rc, "failed to retrieve '$(option)' option count", "option=" OPTION_LIBPATH ) );
+            break;
+        }
+
+        /* add each path in order */
+        for ( ix = 0; ix < pcount; ++ ix )
+        {
+            rc = ArgsOptionValue ( args, OPTION_LIBPATH, ix, (const void **)& pc );
+            if ( rc != 0 )
+            {
+                PLOGERR ( klogInt, ( klogInt, rc, "failed to retrieve '$(option)' option value [ $(idx) ]", "option=" OPTION_LIBPATH ",idx=%u", ix ) );
+                break;
+            }
+
+            rc = kqsh_update_libpath ( pc );
+            if ( rc != 0 )
+                break;
+        }
+
+        /* add system library path */
+        if ( rc == 0 )
+            rc = kqsh_system_libpath ();
+        if ( rc == 0 )
+        {
+            KSymTable tbl;
+
+            BSTree intrinsic;
+            BSTreeInit ( & intrinsic );
+
+            rc = KSymTableInit ( & tbl, & intrinsic );
+            if ( rc != 0 )
+                LOGERR ( klogInt, rc, "failed to initialize symbol table" );
+            else
+            {
+                rc = kqsh_init_symtable ( & tbl, & intrinsic );
+                while ( rc == 0 )
+                {
+                    rc = ArgsParamCount ( args, & pcount );
+                    if ( rc != 0 )
+                    {
+                        LOGERR ( klogInt, rc, "failed to retrieve parameter count" );
+                        break;
+                    }
+
+                    if ( pcount == 0 )
+                    {
+                        KTokenText console;
+                        
+                        rc = kqsh_init_console ( & console );
+                        if ( rc == 0 )
+                        {
+                            KTokenSource src;
+                            
+                            KTokenSourceInit ( & src, & console );
+                                
+                            if ( interactive )
+                            {
+                                uint32_t vers = KAppVersion ();
+                                
+                                kqsh_printf ( "\nkqsh version %u.%u"
+                                              , ( vers >> 24 )
+                                              , ( vers >> 16 ) & 0xFF );
+                                if ( ( vers & 0xFFFF ) != 0 )
+                                    kqsh_printf ( ".%u", vers & 0xFFFF );
+                            }
+                            
+                            rc = kqsh ( & tbl, & src );
+                            KFileRelease ( console . data );
+                        }
+                    }
+            
+                    else for ( ix = 1; ix <= pcount; ++ ix )
+                    {
+                        const char *file = argv [ ix ];
+
+                        String path;
+                        StringInitCString ( & path, file );
+
+                        rc = kqsh_exec_file ( & tbl, & path );
+                        if ( rc != 0 )
+                            break;
+                    }
+
+                    KSymTableWhack ( & tbl );
+                    break; /* never really loop */
+                }
+
+                BSTreeWhack ( & intrinsic, KSymbolWhack, NULL );
+            }
+        }
+
+    } while ( 0 );
+
+    return rc;
+}
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    rc_t rc;
+
+    KLogHandlerSetStdErr ();
+    KLogLibHandlerSetStdErr ();
+
+    rc = kqsh_init_libpath ();
+    if ( rc == 0 )
+    {
+        read_only = true;
+        rc = kqsh_main ( argc, argv );
+        kqsh_whack_libpath ();
+    }
+    return rc;
+}
diff --git a/tools/nenctool/Makefile b/tools/nenctool/Makefile
new file mode 100644
index 0000000..44f6c73
--- /dev/null
+++ b/tools/nenctool/Makefile
@@ -0,0 +1,119 @@
+# ==============================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+USE_GCC_IF_ICC = 1
+
+TOP ?= $(abspath ../..)
+MODULE = tools/nenctool
+
+INT_TOOLS =
+
+EXT_TOOLS = \
+	nenctool
+
+ifeq ($(OS),linux)
+EXT_TOOLS += \
+	nenctest
+endif
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# nenctool
+#  Copy files from one directory to another while cataloging the contents.
+#  XML files can be redirected as well.
+#
+NENCTOOL_SRC = \
+	nenctool
+
+NENCTOOL_OBJ = \
+	$(addsuffix .$(OBJX),$(NENCTOOL_SRC))
+
+NENCTOOL_LIB = \
+	-lkapp \
+	-stk-version \
+	-lvfs \
+	-lkns \
+	-lkrypto \
+	-lkfg \
+	-lkfs \
+	-lkq \
+	-lkproc \
+	-lklib
+
+$(BINDIR)/nenctool: $(NENCTOOL_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(NENCTOOL_LIB)
+
+
+#-------------------------------------------------------------------------------
+# nenctest
+#  Copy files from one directory to another while cataloging the contents.
+#  XML files can be redirected as well.
+#
+NENCTEST_SRC = \
+	nenctest
+
+NENCTEST_OBJ = \
+	$(addsuffix .$(OBJX),$(NENCTEST_SRC))
+
+NENCTEST_LIB = \
+	-lkapp \
+	-stk-version \
+	-lvfs \
+	-lkns \
+	-lkrypto \
+	-lkfg \
+	-lkfs \
+	-lkq \
+	-lkproc \
+	-lklib
+
+$(BINDIR)/nenctest: $(NENCTEST_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(NENCTEST_LIB)
+
diff --git a/tools/nenctool/nenctest.c b/tools/nenctool/nenctest.c
new file mode 100644
index 0000000..dd2dca3
--- /dev/null
+++ b/tools/nenctool/nenctest.c
@@ -0,0 +1,489 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <kapp/main.h>
+
+#include <vfs/manager.h>
+#include <vfs/path.h>
+#include <krypto/testciphermgr.h>
+#include <krypto/encfile.h>
+#include <kfs/file.h>
+
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <klib/debug.h> /* DBGMSG */
+#include <klib/rc.h>
+
+#include <assert.h>
+
+#define OPTION_FORCE   "force"
+#define ALIAS_FORCE   "f"
+static
+const char * force_usage[] = 
+{ "force overwrite of existing files", NULL };
+
+
+#define OPTION_CIPHER  "cipher"
+#define ALIAS_CIPHER   "c"
+static
+const char * cipher_usage[] = 
+{ "choose cipher version ",
+  "0-byte oritented vector", 
+  "1-vector",
+  "2-vector register",
+  "3-aes-ni",
+  "not all implementatons exist on all platforms",
+  NULL };
+static
+OptDef Options[] = 
+{
+    /* name            alias max times oparam required fmtfunc help text loc */
+    { OPTION_FORCE,  ALIAS_FORCE,  NULL, force_usage,  0, false, false },
+    { OPTION_CIPHER, ALIAS_CIPHER, NULL, cipher_usage, 1, true,  false }
+};
+
+
+
+/* Usage
+ */
+const char UsageDefaultName [] = "nencvalid";
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg (
+        "\n"
+        "Usage:\n"
+        "  %s [options] <source-file-path> <destination-file-path>\n"
+        "\n"
+        "Summary:\n"
+        "  Copy a file from the first parameter to the second parameter\n"
+        "  Encryption, decryption, or re-encryption are the expected purpose.\n"
+        "  This is a version of nenctool with some testing features added.\n"
+        "  The first added feature is some level of cipher implementation\n"
+        "  selection.\n"
+        "\n", progname);
+}
+
+static
+const char * first_usage[] = 
+{
+    "The path to a file either in native format",
+    NULL
+};
+
+static
+const char * second_usage[] = 
+{
+    "in 'file' URI scheme or in 'ncbi-file'",
+    "URI scheme.",
+    "\"ncbi-file\" scheme adds a query to the \"file\" scheme",
+    "where 'enc' or 'encrypt' means the file is encrypted",
+    "and 'pwfile=<path>' points to a file to get the password",
+    "or 'pwfd=<fd>' refers to a file descriptor from which to",
+    "read a password.",
+    NULL
+};
+
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+
+    UsageSummary (progname);
+
+    KOutMsg ("Parameters:\n");
+
+    HelpParamLine ("source-file-path", first_usage);
+    HelpParamLine ("destination-file-path", second_usage);
+
+    KOutMsg ("\nOptions:\n");
+
+    HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, force_usage);
+    HelpOptionLine (ALIAS_CIPHER, OPTION_CIPHER, "implementation", cipher_usage);
+
+    HelpOptionsStandard ();
+
+    OUTMSG (("\n"
+             "ncbi-file uri syntax:\n"
+             "  'ncbi-file' uris are based on a combination of the standard\n"
+             "  'file' and 'http' syntax familiar to browser users.\n"
+             "  Enclosing questions marks are probably necessary.\n"
+             "\n"
+             "  URI syntax is 'scheme:'hierarchical-part'?'query'#'fragment'\n"
+             "  scheme:\n"
+             "    ncbi-file\n"
+             "  hierarchical-part:\n"
+             "    this is the same as for scheme file and can be the native form or\n"));
+    OUTMSG (("    the ncbi 'posix' format that matches most flavors of Unix.\n"
+             "    Environment variables and short hands such as '~' are not interpreted.\n"
+             "  query:\n"
+             "    Zero or two symbols separated by the '&'.  The whole query can be omitted.\n"
+             "      enc or encrypt\n"
+             "      pwfile='path to a file containing a password'\n"
+             "      pwfd='file descriptor where the password can be read'\n"
+             "    If the encrypt is present exactly one of the other two must be present.\n"
+             "  fragment:\n"
+             "    No fragment is permitted.\n"));
+    OUTMSG (("\n"
+             "password contents:\n"
+             "  The file or file descriptor containing the password is read enough to satisfy\n"
+             "  the following restriction.  The password is terminated by the end of file,\n"
+             "  a carriage return or a line feed.  The length must be no more than 4096 bytes.\n"
+             "  The password file should have limited read access to protect it.\n"));
+
+
+    OUTMSG (("\n"
+             "Use examples:"
+             "\n"
+             "  To encrypt a create a file named 'example' with a password from a file\n"
+             "  named 'password-file' to a file named 'example.nenc' all in the current\n"
+             "  directory:\n"
+             "\n"
+             "  $ %s example \"ncbi-file:example.nenc?encrypt&pwfile=password-file\"\n",
+             progname));
+    OUTMSG (("\n"
+             "  To decrypt a file named 'example.nenc' with a password from a file\n"
+             "  named 'password-file' to a file named 'example' in directories implied\n"
+             "  in the command:\n"
+             "\n"
+             "  $ %s \"ncbi-file:/home/user/downloads/example.nenc?encrypt&pwfile=/home/user/password-file\" example\n",
+             progname));
+    OUTMSG (("\n"
+             "  To change the encryption of a file from one password to another:\n"
+             "\n"
+             "  $ %s \"ncbi-file:/home/user/downloads/example.nenc?encrypt&pwfile=old-password-file\" \\\n"
+             "         \"ncbi-file:example.nenc?encrypt&pwfile=/home/user/new-password-file\"\n",
+             progname));
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+
+static
+rc_t copy_file (const char * src, const char * dst, const KFile * fin, KFile *fout)
+{
+    rc_t rc;
+    uint8_t	buff	[64 * 1024];
+    size_t	num_read;
+    uint64_t	inpos;
+    uint64_t	outpos;
+
+    assert (src);
+    assert (dst);
+    assert (fin);
+    assert (fout);
+
+    inpos = 0;
+    outpos = 0;
+
+#if 1
+    for (inpos = 0; ; inpos += num_read)
+    {
+        rc = Quitting ();
+        if (rc)
+        {
+            LOGMSG (klogFatal, "Received quit");
+            break;
+        }
+        else
+        {
+            rc = KFileReadAll (fin, inpos, buff, sizeof (buff), &num_read);
+            if (rc)
+            {
+                PLOGERR (klogErr,
+                         (klogErr, rc,
+                          "Failed to read from file $(F) at $(P)",
+                          "F=%s,P=%lu", src, inpos));
+                break;
+            }
+            else if (num_read)
+            {
+                size_t num_writ;
+
+                rc = KFileWriteAll (fout, inpos, buff, num_read, &num_writ);
+                if (rc)
+                {
+                    PLOGERR (klogErr,
+                             (klogErr, rc,
+                              "Failed to write to file $(F) at $(P)",
+                              "F=%s,P=%lu", dst, outpos));
+                    break;
+                }
+                else if (num_writ != num_read)
+                {
+                    rc = RC (rcExe, rcFile, rcWriting, rcFile, rcInsufficient);
+                    PLOGERR (klogErr,
+                             (klogErr, rc,
+                              "Failed to write all to file $(F) at $(P)",
+                              "F=%s,P=%lu", dst, outpos));
+                    break;
+                }
+            }
+            else 
+                break;
+        }
+    }
+#else
+    do
+    {
+        rc = Quitting ();
+        if (rc)
+        {
+            LOGMSG (klogFatal, "Received quit");
+            break;
+        }
+        rc = KFileRead (fin, inpos, buff, sizeof (buff), &num_read);
+        if (rc)
+        {
+            PLOGERR (klogErr,
+                     (klogErr, rc,
+                      "Failed to read from file $(F) at $(P)",
+                      "F=%s,P=%lu", src, inpos));
+            break;
+        }
+        else if (num_read > 0)
+        {
+            size_t to_write;
+
+            inpos += (uint64_t)num_read;
+
+            STSMSG (2, ("Read %zu bytes to %lu", num_read, inpos));
+
+            to_write = num_read;
+            while (to_write > 0)
+            {
+                size_t num_writ;
+                rc = KFileWrite (fout, outpos, buff, num_read, &num_writ);
+                if (rc)
+                {
+                    PLOGERR (klogErr,
+                             (klogErr, rc,
+                              "Failed to write to file $(F) at $(P)",
+                              "F=%s,P=%lu", dst, outpos));
+                    break;
+                }
+                outpos += num_writ;
+                to_write -= num_writ;
+            }
+        }
+        if (rc)
+            break;
+    } while (num_read != 0);
+#endif
+    return rc;
+}
+
+
+static
+rc_t nenctest (const char * srcstr, const char * dststr, bool force)
+{
+    VFSManager * mgr;
+    rc_t rc;
+
+    rc = VFSManagerMake (&mgr);
+    if (rc)
+        LOGERR (klogInt, rc, "failed to create file system manager");
+    else
+    {
+        VPath * srcpath;
+
+        rc = VFSManagerMakePath (mgr, &srcpath, "%s", srcstr);
+        if (rc)
+            PLOGERR (klogErr,
+                     (klogErr, rc, "Failed to parse source path '$(path)'",
+                      "path=%s", srcstr));
+        else
+        {
+            VPath * dstpath;
+
+            rc = VFSManagerMakePath (mgr, &dstpath, "%s", dststr);
+            if (rc)
+                PLOGERR (klogErr,
+                         (klogErr, rc, "Failed to parse destination path '$(path)'",
+                          "path=%s", dststr));
+            else
+            {
+                const KFile * srcfile;
+
+                rc = VFSManagerOpenFileRead (mgr, &srcfile, srcpath);
+                if (rc)
+                    PLOGERR (klogErr,
+                             (klogErr, rc, "Failed to open source path '$(path)'",
+                              "path=%s", srcstr));
+                else
+                {
+                    KFile * dstfile;
+
+                    rc = VFSManagerCreateFile (mgr, &dstfile, false, 0666,
+                                               kcmParents | (force ? kcmInit : kcmCreate),
+                                               dstpath);
+                    if (rc)
+                        PLOGERR (klogErr,
+                                 (klogErr, rc, "failed to open destination path '$(path)'",
+                                  "path=%s", dststr));
+                    else
+                    {
+                        rc = copy_file (srcstr, dststr, srcfile, dstfile);
+                        if (rc)
+                        {
+                            PLOGERR (klogErr,
+                                     (klogErr, rc, "failed to copy '$(S)' to '$(D)'",
+                                      "S=%s,D=%s", srcstr, dststr));
+
+                            VFSManagerRemove (mgr, true, dstpath);
+                        }
+
+                        KFileRelease (dstfile);
+                    }
+                    KFileRelease (srcfile);
+                }
+                VPathRelease (dstpath);
+            }
+            VPathRelease (srcpath);
+        }
+        VFSManagerRelease (mgr);
+    }
+    return rc;
+}
+
+
+/* KMain - EXTERN
+ *  executable entrypoint "main" is implemented by
+ *  an OS-specific wrapper that takes care of establishing
+ *  signal handlers, logging, etc.
+ *
+ *  in turn, OS-specific "main" will invoke "KMain" as
+ *  platform independent main entrypoint.
+ *
+ *  "argc" [ IN ] - the number of textual parameters in "argv"
+ *  should never be < 0, but has been left as a signed int
+ *  for reasons of tradition.
+ *
+ *  "argv" [ IN ] - array of NUL terminated strings expected
+ *  to be in the shell-native character set: ASCII or UTF-8
+ *  element 0 is expected to be executable identity or path.
+ */
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args* args = NULL;
+    rc_t rc;
+
+    rc = ArgsMakeAndHandle(&args, argc, argv, 1, Options, sizeof Options / sizeof (OptDef));
+    if (rc)
+        LOGERR (klogInt, rc, "failed to parse command line parameters");
+    if (rc == 0)
+    {
+        uint32_t pcount;
+        bool force;
+
+        rc = ArgsOptionCount (args, OPTION_FORCE, &pcount);
+        if (rc)
+            LOGERR (klogInt, rc, "failed to examine force option");
+        else
+        {
+            force = (pcount > 0);
+ 
+            rc = ArgsOptionCount (args, OPTION_CIPHER, &pcount);
+            if (rc)
+                LOGERR (klogInt, rc, "failed to examine cipher option");
+            else
+            {
+                if (pcount)
+                {
+                    const char * value;
+
+                    rc = ArgsOptionValue (args, OPTION_CIPHER, 0, (const void **)&value);
+                    if (rc)
+                        LOGERR (klogInt, rc, "failed to examine cipher value");
+                    else
+                    {
+                        if (value[1])
+                            rc = RC (rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+                        else
+                            switch (value[0])
+                            {
+                            case '0':
+                            case '1':
+                            case '2':
+                            case '3':
+                                KCipherSubType = value[0] - '0';
+                                break;
+                            default:
+                                rc = RC (rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+                                break;
+                            }
+                        if (rc)
+                            LOGERR (klogErr, rc, "bad value for cipher implmentation");
+                    }
+                }
+                if (rc == 0)
+                {
+                    rc = ArgsParamCount (args, &pcount);
+                    if (rc)
+                        LOGERR (klogInt, rc, "failed to count parameters");
+                    else
+                    {
+                        if (pcount != 2)
+                            MiniUsage (args);
+                        else
+                        {
+                            const char * src;
+
+                            rc = ArgsParamValue (args, 0, (const void **)&src);
+                            if (rc)
+                                LOGERR (klogInt, rc, "failed to get source parameter");
+                            else
+                            {
+                                const char * dst;
+                                rc = ArgsParamValue (args, 1, (const void **)&dst);
+                                if (rc)
+                                    LOGERR (klogInt, rc, "failed to get destination parameter");
+                                else
+                                {
+                                    rc = nenctest (src, dst, force);
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        ArgsWhack (args);
+    }
+    STSMSG (1, ("exiting: %R (%u)", rc, rc));
+    return rc;
+}
+
+/* EOF */
diff --git a/tools/nenctool/nenctool.c b/tools/nenctool/nenctool.c
new file mode 100644
index 0000000..985a9ac
--- /dev/null
+++ b/tools/nenctool/nenctool.c
@@ -0,0 +1,435 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <kapp/main.h>
+
+#include <vfs/manager.h>
+#include <vfs/path.h>
+#include <krypto/encfile.h>
+#include <kfs/file.h>
+
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <klib/debug.h> /* DBGMSG */
+#include <klib/rc.h>
+
+#include <assert.h>
+
+#define OPTION_FORCE   "force"
+#define ALIAS_FORCE   "f"
+static
+const char * force_usage[] = 
+{ "force overwrite of existing files", NULL };
+static
+OptDef Options[] = 
+{
+    /* name            alias max times oparam required fmtfunc help text loc */
+    { OPTION_FORCE,   ALIAS_FORCE,   NULL, force_usage,   0, false, false }
+};
+
+
+
+/* Usage
+ */
+const char UsageDefaultName [] = "nencvalid";
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg (
+        "\n"
+        "Usage:\n"
+        "  %s [options] <source-file-path> <destination-file-path>\n"
+        "\n"
+        "Summary:\n"
+        "  Copy a file from the first parameter to the second parameter\n"
+        "  Encryption, decryption, or re-encryption are the expected purpose.\n"
+        "\n", progname);
+}
+
+static
+const char * first_usage[] = 
+{
+    "The path to a file either in native format",
+    NULL
+};
+
+static
+const char * second_usage[] = 
+{
+    "in 'file' URI scheme or in 'ncbi-file'",
+    "URI scheme.",
+    "\"ncbi-file\" scheme adds a query to the \"file\" scheme",
+    "where 'enc' or 'encrypt' means the file is encrypted",
+    "and 'pwfile=<path>' points to a file to get the password",
+    "or 'pwfd=<fd>' refers to a file descriptor from which to",
+    "read a password.",
+    NULL
+};
+
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+
+    UsageSummary (progname);
+
+    KOutMsg ("Parameters:\n");
+
+    HelpParamLine ("source-file-path", first_usage);
+    HelpParamLine ("destination-file-path", second_usage);
+
+    KOutMsg ("\nOptions:\n");
+
+    HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, force_usage);
+
+    HelpOptionsStandard ();
+
+    OUTMSG (("\n"
+             "ncbi-file uri syntax:\n"
+             "  'ncbi-file' uris are based on a combination of the standard\n"
+             "  'file' and 'http' syntax familiar to browser users.\n"
+             "  Enclosing questions marks are probably necessary.\n"
+             "\n"
+             "  URI syntax is 'scheme:'hierarchical-part'?'query'#'fragment'\n"
+             "  scheme:\n"
+             "    ncbi-file\n"
+             "  hierarchical-part:\n"
+             "    this is the same as for scheme file and can be the native form or\n"));
+    OUTMSG (("    the ncbi 'posix' format that matches most flavors of Unix.\n"
+             "    Environment variables and short hands such as '~' are not interpreted.\n"
+             "  query:\n"
+             "    Zero or two symbols separated by the '&'.  The whole query can be omitted.\n"
+             "      enc or encrypt\n"
+             "      pwfile='path to a file containing a password'\n"
+             "      pwfd='file descriptor where the password can be read'\n"
+             "    If the encrypt is present exactly one of the other two must be present.\n"
+             "  fragment:\n"
+             "    No fragment is permitted.\n"));
+    OUTMSG (("\n"
+             "password contents:\n"
+             "  The file or file descriptor containing the password is read enough to satisfy\n"
+             "  the following restriction.  The password is terminated by the end of file,\n"
+             "  a carriage return or a line feed.  The length must be no more than 4096 bytes.\n"
+             "  The password file should have limited read access to protect it.\n"));
+
+
+    OUTMSG (("\n"
+             "Use examples:"
+             "\n"
+             "  To encrypt a create a file named 'example' with a password from a file\n"
+             "  named 'password-file' to a file named 'example.nenc' all in the current\n"
+             "  directory:\n"
+             "\n"
+             "  $ %s example \"ncbi-file:example.nenc?encrypt&pwfile=password-file\"\n",
+             progname));
+    OUTMSG (("\n"
+             "  To decrypt a file named 'example.nenc' with a password from a file\n"
+             "  named 'password-file' to a file named 'example' in directories implied\n"
+             "  in the command:\n"
+             "\n"
+             "  $ %s \"ncbi-file:/home/user/downloads/example.nenc?encrypt&pwfile=/home/user/password-file\" example\n",
+             progname));
+    OUTMSG (("\n"
+             "  To change the encryption of a file from one password to another:\n"
+             "\n"
+             "  $ %s \"ncbi-file:/home/user/downloads/example.nenc?encrypt&pwfile=old-password-file\" \\\n"
+             "         \"ncbi-file:example.nenc?encrypt&pwfile=/home/user/new-password-file\"\n",
+             progname));
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+
+static
+rc_t copy_file (const char * src, const char * dst, const KFile * fin, KFile *fout)
+{
+    rc_t rc;
+    uint8_t	buff	[64 * 1024];
+    size_t	num_read;
+    uint64_t	inpos;
+    uint64_t	outpos;
+
+    assert (src);
+    assert (dst);
+    assert (fin);
+    assert (fout);
+
+    inpos = 0;
+    outpos = 0;
+
+#if 1
+    for (inpos = 0; ; inpos += num_read)
+    {
+        rc = Quitting ();
+        if (rc)
+        {
+            LOGMSG (klogFatal, "Received quit");
+            break;
+        }
+        else
+        {
+            rc = KFileReadAll (fin, inpos, buff, sizeof (buff), &num_read);
+            if (rc)
+            {
+                PLOGERR (klogErr,
+                         (klogErr, rc,
+                          "Failed to read from file $(F) at $(P)",
+                          "F=%s,P=%lu", src, inpos));
+                break;
+            }
+            else if (num_read)
+            {
+                size_t num_writ;
+
+                rc = KFileWriteAll (fout, inpos, buff, num_read, &num_writ);
+                if (rc)
+                {
+                    PLOGERR (klogErr,
+                             (klogErr, rc,
+                              "Failed to write to file $(F) at $(P)",
+                              "F=%s,P=%lu", dst, outpos));
+                    break;
+                }
+                else if (num_writ != num_read)
+                {
+                    rc = RC (rcExe, rcFile, rcWriting, rcFile, rcInsufficient);
+                    PLOGERR (klogErr,
+                             (klogErr, rc,
+                              "Failed to write all to file $(F) at $(P)",
+                              "F=%s,P=%lu", dst, outpos));
+                    break;
+                }
+            }
+            else 
+                break;
+        }
+    }
+#else
+    do
+    {
+        rc = Quitting ();
+        if (rc)
+        {
+            LOGMSG (klogFatal, "Received quit");
+            break;
+        }
+        rc = KFileRead (fin, inpos, buff, sizeof (buff), &num_read);
+        if (rc)
+        {
+            PLOGERR (klogErr,
+                     (klogErr, rc,
+                      "Failed to read from file $(F) at $(P)",
+                      "F=%s,P=%lu", src, inpos));
+            break;
+        }
+        else if (num_read > 0)
+        {
+            size_t to_write;
+
+            inpos += (uint64_t)num_read;
+
+            STSMSG (2, ("Read %zu bytes to %lu", num_read, inpos));
+
+            to_write = num_read;
+            while (to_write > 0)
+            {
+                size_t num_writ;
+                rc = KFileWrite (fout, outpos, buff, num_read, &num_writ);
+                if (rc)
+                {
+                    PLOGERR (klogErr,
+                             (klogErr, rc,
+                              "Failed to write to file $(F) at $(P)",
+                              "F=%s,P=%lu", dst, outpos));
+                    break;
+                }
+                outpos += num_writ;
+                to_write -= num_writ;
+            }
+        }
+        if (rc)
+            break;
+    } while (num_read != 0);
+#endif
+    return rc;
+}
+
+
+static
+rc_t nenctool (const char * srcstr, const char * dststr, bool force)
+{
+    VFSManager * mgr;
+    rc_t rc;
+
+    rc = VFSManagerMake (&mgr);
+    if (rc)
+        LOGERR (klogInt, rc, "failed to create file system manager");
+    else
+    {
+        VPath * srcpath;
+
+        rc = VFSManagerMakePath (mgr, &srcpath, "%s", srcstr);
+        if (rc)
+            PLOGERR (klogErr,
+                     (klogErr, rc, "Failed to parse source path '$(path)'",
+                      "path=%s", srcstr));
+        else
+        {
+            VPath * dstpath;
+
+            rc = VFSManagerMakePath (mgr, &dstpath, "%s", dststr);
+            if (rc)
+                PLOGERR (klogErr,
+                         (klogErr, rc, "Failed to parse destination path '$(path)'",
+                          "path=%s", dststr));
+            else
+            {
+                const KFile * srcfile;
+
+                rc = VFSManagerOpenFileRead (mgr, &srcfile, srcpath);
+                if (rc)
+                    PLOGERR (klogErr,
+                             (klogErr, rc, "Failed to open source path '$(path)'",
+                              "path=%s", srcstr));
+                else
+                {
+                    KFile * dstfile;
+
+                    rc = VFSManagerCreateFile (mgr, &dstfile, false, 0666,
+                                               kcmParents | (force ? kcmInit : kcmCreate),
+                                               dstpath);
+                    if (rc)
+                        PLOGERR (klogErr,
+                                 (klogErr, rc, "failed to open destination path '$(path)'",
+                                  "path=%s", dststr));
+                    else
+                    {
+                        rc = copy_file (srcstr, dststr, srcfile, dstfile);
+                        if (rc)
+                        {
+                            PLOGERR (klogErr,
+                                     (klogErr, rc, "failed to copy '$(S)' to '$(D)'",
+                                      "S=%s,D=%s", srcstr, dststr));
+
+                            VFSManagerRemove (mgr, true, dstpath);
+                        }
+
+                        KFileRelease (dstfile);
+                    }
+                    KFileRelease (srcfile);
+                }
+                VPathRelease (dstpath);
+            }
+            VPathRelease (srcpath);
+        }
+        VFSManagerRelease (mgr);
+    }
+    return rc;
+}
+
+
+/* KMain - EXTERN
+ *  executable entrypoint "main" is implemented by
+ *  an OS-specific wrapper that takes care of establishing
+ *  signal handlers, logging, etc.
+ *
+ *  in turn, OS-specific "main" will invoke "KMain" as
+ *  platform independent main entrypoint.
+ *
+ *  "argc" [ IN ] - the number of textual parameters in "argv"
+ *  should never be < 0, but has been left as a signed int
+ *  for reasons of tradition.
+ *
+ *  "argv" [ IN ] - array of NUL terminated strings expected
+ *  to be in the shell-native character set: ASCII or UTF-8
+ *  element 0 is expected to be executable identity or path.
+ */
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args* args = NULL;
+    rc_t rc;
+
+    rc = ArgsMakeAndHandle(&args, argc, argv, 1, Options, sizeof Options / sizeof (OptDef));
+    if (rc)
+        LOGERR (klogInt, rc, "failed to parse command line parameters");
+    if (rc == 0)
+    {
+        uint32_t pcount;
+        bool force;
+
+        rc = ArgsOptionCount (args, OPTION_FORCE, &pcount);
+        if (rc)
+            LOGERR (klogInt, rc, "failed to examine force option");
+        else
+        {
+            force = (pcount > 0);
+
+            rc = ArgsParamCount (args, &pcount);
+            if (rc)
+                LOGERR (klogInt, rc, "failed to count parameters");
+            else
+            {
+                if (pcount != 2) {
+                    MiniUsage (args);
+                    rc = RC(rcApp, rcArgv, rcParsing, rcParam, rcInsufficient);
+                }
+                else
+                {
+                    const char * src;
+
+                    rc = ArgsParamValue (args, 0, (const void **)&src);
+                    if (rc)
+                        LOGERR (klogInt, rc, "failed to get source parameter");
+                    else
+                    {
+                        const char * dst;
+                        rc = ArgsParamValue (args, 1, (const void **)&dst);
+                        if (rc)
+                            LOGERR (klogInt, rc, "failed to get destination parameter");
+                        else
+                        {
+                            rc = nenctool (src, dst, force);
+                        }
+                    }
+                }
+            }
+        }
+        ArgsWhack (args);
+    }
+    STSMSG (1, ("exiting: %R (%u)", rc, rc));
+    return rc;
+}
+
+/* EOF */
diff --git a/tools/nencvalid/Makefile b/tools/nencvalid/Makefile
new file mode 100644
index 0000000..606062f
--- /dev/null
+++ b/tools/nencvalid/Makefile
@@ -0,0 +1,88 @@
+# ==============================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/nencvalid
+
+INT_TOOLS =
+
+EXT_TOOLS = \
+	nencvalid
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# nencvalid
+#  Copy files from one directory to another while cataloging the contents.
+#  XML files can be redirected as well.
+#
+NENCVALID_SRC = \
+	nencvalid
+
+NENCVALID_OBJ = \
+	$(addsuffix .$(OBJX),$(NENCVALID_SRC))
+
+NENCVALID_LIB = \
+	-lkapp \
+	-ltk-version \
+	-lvfs \
+	-lkns \
+	-lkrypto \
+	-lkfg \
+	-lkfs \
+	-lkq \
+	-lkproc \
+	-lklib
+
+$(BINDIR)/nencvalid: $(NENCVALID_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(NENCVALID_LIB)
+
+
+
+
diff --git a/tools/nencvalid/nencvalid.c b/tools/nencvalid/nencvalid.c
new file mode 100644
index 0000000..bcd9391
--- /dev/null
+++ b/tools/nencvalid/nencvalid.c
@@ -0,0 +1,593 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <kapp/main.h>
+
+#include <vfs/manager.h>
+#include <vfs/path.h>
+
+#include <krypto/encfile.h>
+#include <krypto/wgaencrypt.h>
+
+#include <kfs/file.h>
+#include <kfs/buffile.h>
+
+#include <klib/log.h>
+#include <klib/status.h>
+#include <klib/out.h>
+#include <klib/debug.h> /* DBGMSG */
+#include <klib/rc.h>
+#include <klib/text.h>
+
+#include <assert.h>
+#include <stdlib.h>
+
+#define OPTION_DECRYPT_BIN_COMPATIBILITY "compatibility-mode"
+/* "decrypt.bin" */
+
+static
+OptDef Options[] = 
+{
+    /* private option for decrypt.bin script */
+    { OPTION_DECRYPT_BIN_COMPATIBILITY, NULL,        NULL, NULL,        0, false, false }
+};
+
+enum CompatibilityModeExitCode
+{
+    CMEC_NO_ERROR = 0,
+    CMEC_BAD_TYPE = 100,
+    CMEC_BAD_HEADER = 101,
+    CMEC_TRUNCATED = 102,
+    CMEC_EXCESS = 103,
+    CMEC_NO_CHECKSUM = 104,
+    CMEC_NO_PASSWORD = 105,
+    CMEC_BAD_CHECKSUM = 106
+};
+
+/* Usage
+ */
+const char UsageDefaultName [] = "nencvalid";
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg (
+        "\n"
+        "Usage:\n"
+        "  %s [options] <file-path> [ <file-path> ...]\n"
+        "\n"
+        "Summary:\n"
+        "  Validate the consistency of NCBI format encrypted files\n"
+        "\n", progname);
+}
+
+static
+const char * param_usage[] = 
+{
+    "A file in an NCBI encrypted file format.", 
+    "The first version encrypted file format",
+    "needs a password to validate the content",
+    "while the second version does not.  If the",
+    "ncbi-file uri format is used if you ask",
+    "file decryption (encrypt in the query)",
+    "the validation will be on the decrypted",
+    "file which might not be the intention.",
+    "The password if needed for validation will",
+    "have to be in the standard NCBI VDB",
+    "configuration as 'krypto/pwfile'.", NULL
+};
+
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+
+    UsageSummary (progname);
+
+    KOutMsg ("Parameters:\n");
+
+    HelpParamLine ("file-path", param_usage);
+
+    KOutMsg ("\nOptions:\n");
+
+    HelpOptionsStandard ();
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+static rc_t wga_log_error (const char * path, rc_t rc, bool decrypt_bin_compatible)
+{
+    switch (GetRCObject(rc))
+    {
+    case rcSize:
+        switch (GetRCState(rc))
+        {
+        case rcExcessive:
+            if (decrypt_bin_compatible)
+                exit (CMEC_EXCESS);
+            PLOGERR (klogErr,(klogErr, rc, "failed to validate "
+                              "probably mis-concatenated file '$(P)'",
+                              "P=%s", path));
+            return rc;
+
+        case rcInsufficient:
+            if (decrypt_bin_compatible)
+                exit (CMEC_TRUNCATED);
+            PLOGERR (klogErr,(klogErr, rc, "failed to validate "
+                              "probably truncated file '$(P)'",
+                              "P=%s", path));
+            return rc;
+
+        default:
+            break;
+        }
+        break;
+
+    case rcChecksum:
+        switch (GetRCState(rc))
+        {
+        case rcInvalid:
+            if (decrypt_bin_compatible)
+                exit (CMEC_BAD_CHECKSUM);
+            PLOGERR (klogErr,(klogErr, rc, "failed to validate "
+                              "checksum of contents '$(P)'",
+                              "P=%s", path));
+            return rc;
+
+        case rcNull:
+            if (decrypt_bin_compatible)
+                exit (CMEC_NO_CHECKSUM);
+            PLOGERR (klogErr,(klogErr, rc, "failed to validate "
+                              "checksum of contents without password '$(P)'",
+                              "P=%s", path));
+            return 0;
+
+        default:
+            break;
+        }
+        break;
+
+    case rcConstraint:
+        switch (GetRCState(rc))
+        {
+        case rcCorrupt:
+            if (decrypt_bin_compatible)
+                exit (CMEC_BAD_CHECKSUM);
+            PLOGERR (klogErr,(klogErr, rc, "failed to validate "
+                              "checksum of contents '$(P)'",
+                              "P=%s", path));
+            return rc;
+
+        default:
+            break;
+        }
+        break;
+
+    case rcEncryption:
+        switch (GetRCState(rc))
+        {
+        case rcNull:
+            if (decrypt_bin_compatible)
+                exit (CMEC_NO_PASSWORD);
+            LOGERR (klogWarn, rc, "length validated but content not checked without a password");
+            return 0;
+
+        case rcNotFound:
+            if (decrypt_bin_compatible)
+                exit (CMEC_NO_CHECKSUM);
+            LOGERR (klogWarn, rc, "length validated but content not has no checksum");
+            return 0;
+
+        default:
+            break;
+        }
+        break;
+
+    default:
+        break;
+    }
+    PLOGERR (klogErr,(klogErr, rc, "failed to validate "
+                      "with non-specified error file "
+                      "'$(P)'", "P=%s", path));
+    return rc;
+}
+
+static rc_t nencvalidWGAEncValidate (const char * path, const KFile * file, VFSManager * mgr, bool decrypt_bin_compatible)
+{
+    rc_t rc;
+    size_t pwz;
+    char   pw [8192];
+
+    rc = VFSManagerGetKryptoPassword (mgr, pw, sizeof (pw) - 1, &pwz);
+
+    if (rc) 
+    {
+        if (GetRCObject(rc) == rcEncryptionKey && GetRCState(rc) == rcNotFound)
+        {   /* krypto/pwfile not found in the configuration; will proceed without decryption */
+            LOGERR (klogWarn, rc, "no password file configured file content will not be validated");
+
+            /* configuration did not contain a password file so set it to nul */
+            pw[0] = '\0';
+            pwz = 0;
+            rc = 0;
+        }
+        else
+            LOGERR (klogInt, rc, "unable to read password file");
+    }
+
+    if (rc == 0)
+    {
+        rc = WGAEncValidate (file, pw, pwz);
+        if (rc)
+            rc =  wga_log_error (path, rc, decrypt_bin_compatible);
+    }
+    return rc;
+}
+
+
+/*
+ * do out thing on a single file name
+ */
+static
+rc_t HandleOneFile (VFSManager * mgr, const char * path, bool decrypt_bin_compatible)
+{
+    rc_t rc;
+    VPath * vpath;
+
+    rc = VFSManagerMakePath (mgr, &vpath, "%s", path);
+    if (rc)
+        PLOGERR (klogErr,
+                 (klogErr, rc, "failed to parse path "
+                  "parameter '$(P)'", "P=%s", path));
+
+    else
+    {
+        const KFile * file;
+
+        rc = VFSManagerOpenFileRead (mgr, &file, vpath);
+        if (rc)
+            PLOGERR (klogErr,
+                     (klogErr, rc, "failed to parse path "
+                      "parameter '$(P)'", "P=%s", path));
+
+        else
+        {
+            size_t  buffread;
+            const KFile * buffile;
+
+            rc = KBufFileMakeRead (&buffile, file, 64*1024);
+            if (rc)
+                LOGERR (klogInt, rc, "unable to buffer file");
+            else
+            {
+                /* the two current encrypted file types have an 8 byte signature (magic(
+                 * at the beginning of the file.  If these 8 don't match we don't even call it
+                 * an encrypted file at all */
+                char buffer [8];
+
+                rc = KFileRead (buffile, 0, buffer, sizeof buffer, &buffread);
+                if (rc)
+                    LOGERR (klogInt, rc, "Unable to read file signature");
+                else
+                {
+                    if (buffread < sizeof buffer)
+                    {
+                        if (decrypt_bin_compatible)
+                            exit (CMEC_BAD_TYPE);
+                        else
+                        {
+                            rc = RC (rcExe, rcFile, rcValidating, rcHeader, rcWrongType);
+                            LOGERR (klogErr, rc, "File too short to be encrypted file");
+                        }
+                    }
+                    else
+                    {
+                        rc = KFileIsEnc (buffer, sizeof buffer);
+
+                        switch (GetRCState(rc))
+                        {
+                        case 0:
+                        case rcInsufficient:
+                            rc = KEncFileValidate (buffile);
+                            if (rc)
+                            {
+                                switch (GetRCObject(rc))
+                                {
+                                    /* unsuable header */
+                                case rcHeader:
+                                case rcByteOrder:
+                                    if (decrypt_bin_compatible)
+                                        exit (CMEC_BAD_HEADER);
+                                    PLOGERR (klogErr,(klogErr, rc, "failed to validate "
+                                                      "with a bad header file '$(P)'",
+                                                      "P=%s", path));
+                                    break;
+
+                                case rcFile:
+                                    switch (GetRCState(rc))
+                                    {
+                                        /* bad block count in the footer: guess it was a truncataiont
+                                         * an inconvienent point */
+                                    case rcCorrupt:
+                                        /* block read was neither a block nor a footer */
+                                    case rcInsufficient:
+                                        if (decrypt_bin_compatible)
+                                            exit (CMEC_TRUNCATED);
+                                        PLOGERR (klogErr,(klogErr, rc, "failed to validate "
+                                                          "probably truncated file '$(P)'",
+                                                          "P=%s", path));
+
+                                        break;
+                                    default:
+                                        PLOGERR (klogErr,(klogErr, rc, "failed to validate "
+                                                          "with non-specified error file "
+                                                          "'$(P)'", "P=%s", path));
+
+                                        break;
+                                    }
+                                    break;
+
+                                case rcCrc:
+                                    if (decrypt_bin_compatible)
+                                        exit (CMEC_BAD_CHECKSUM);
+                                    PLOGERR (klogErr,(klogErr, rc, "failed to validate "
+                                                      "with good length but bad checksum file "
+                                                      "'$(P)'", "P=%s", path));
+                                    break;
+
+                                default:
+                                    PLOGERR (klogErr,(klogErr, rc, "failed to validate "
+                                                      "with non-specified error file "
+                                                      "'$(P)'", "P=%s", path));
+                                    break;
+                                }
+                            }
+                            else
+                                STSMSG (1, ("validated file content and size for '%s'\n", path));
+                            break;
+
+                        case rcWrongType:
+                            rc = KFileIsWGAEnc (buffer, buffread);
+                            switch (GetRCState(rc))
+                            {
+                            case 0:
+                                rc = nencvalidWGAEncValidate (path, buffile, mgr, decrypt_bin_compatible);
+                                break;
+
+                            case rcWrongType:
+                                if (decrypt_bin_compatible)
+                                    exit (CMEC_BAD_TYPE);
+                                STSMSG (1, ("'%s' is not an encrypted file", path));
+                                break;
+
+                            default:
+                                break;
+                            }
+
+                        default:
+                            if (rc)
+                                PLOGERR (klogErr,(klogErr, rc, "failed to validate "
+                                                  "with non-specified error file "
+                                                  "'$(P)'", "P=%s", path));
+                            break;
+                        }
+                    }
+                }
+                KFileRelease (buffile);
+            }
+            KFileRelease (file);
+        }
+        VPathRelease (vpath);
+    }
+    if (rc)
+        STSMSG (1, ("failed validation '%s'", path));
+    else
+        STSMSG (1, ("passed validation '%s'", path));
+
+    return rc;
+}
+
+
+/*
+ * params are file names so retrienve them one by one and process them
+ */
+static __inline__
+rc_t HandleParams (VFSManager * mgr, Args * args, uint32_t pcount)
+{
+    rc_t rc;
+    rc_t orc;
+    uint32_t ix;
+
+    rc = orc = 0;
+    for (ix = 0; (ix < pcount); ++ix)
+    {
+        const char * pc;
+
+        rc = ArgsParamValue (args, ix, (const void **)&pc);
+        if (rc)
+            PLOGERR (klogErr, 
+                     (klogErr, rc, "failed to retrieve "
+                      "parameter '$(P)'", "P=%u", ix));
+        else
+        {
+            /*
+             * we will return rc but use orc to handle
+             * the return error code form the first found error on a parameter
+             * though we will continue to process all file parameters
+             */
+            orc = HandleOneFile (mgr, pc, false);
+            if (rc == 0)
+                rc = orc;
+        }
+    }
+    return rc;
+}
+
+
+/*
+ * handle the command line options then handle the file name parameters
+ */
+static __inline__
+rc_t HandleOptions (Args * args)
+{
+    uint32_t pcount;
+    rc_t rc;
+
+    rc = ArgsParamCount (args, &pcount);
+    if (rc)
+        LOGERR (klogInt, rc, "failed to count parameters");
+
+    else
+    {
+        if (pcount == 0) {
+            MiniUsage(args);
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInsufficient);
+        }
+        else
+        {
+            uint32_t ocount;
+
+            rc = ArgsOptionCount (args, OPTION_QUIET, &ocount);
+            if (rc)
+                LOGERR (klogInt, rc, "failed to retrieve quiet option");
+
+            else
+            {
+                bool quiet;
+
+                quiet = (ocount != 0);
+
+                rc = ArgsOptionCount (args, OPTION_DECRYPT_BIN_COMPATIBILITY, &ocount);
+                if (rc)
+                    LOGERR (klogInt, rc, "failed to retrieve compatibility option");
+
+                else
+                {
+                    VFSManager * mgr;
+
+                    rc = VFSManagerMake (&mgr);
+                    if (rc)
+                        LOGERR (klogErr, rc, "failed to open file system manager");
+
+                    else
+                    {
+                        bool decrypt_bin_compatible;
+
+                        if (ocount == 0)
+                            decrypt_bin_compatible = false;
+
+                        else
+                            decrypt_bin_compatible = true;
+
+
+                        if (quiet)
+                        {
+                            KStsLevelSet (0);
+                            KLogLevelSet (0);
+                        }
+                        else if (!decrypt_bin_compatible)
+                        {
+                            if (KStsLevelGet() == 0)
+                                KStsLevelSet(1);
+                        }
+
+
+                        if (decrypt_bin_compatible)
+                        {
+                            if (pcount > 1)
+                            {
+                                rc = RC (rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+                                LOGERR (0, rc, "compatibility mode can only handle one file parameter");
+                            }
+                            else
+                            {
+                                const char * pc;
+
+                                rc = ArgsParamValue (args, 0, (const void **)&pc);
+                                if (rc)
+                                    LOGERR (0, rc, "unable to retrieve file parameter");
+
+                                if (rc == 0)
+                                    rc = HandleOneFile (mgr, pc, true); 
+                            }
+                        }
+                        else
+                        {
+                            rc = HandleParams (mgr, args, pcount);
+                        }
+                    
+                        VFSManagerRelease (mgr);
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+ 
+
+/* KMain - EXTERN
+ *  executable entrypoint "main" is implemented by
+ *  an OS-specific wrapper that takes care of establishing
+ *  signal handlers, logging, etc.
+ *
+ *  in turn, OS-specific "main" will invoke "KMain" as
+ *  platform independent main entrypoint.
+ *
+ *  "argc" [ IN ] - the number of textual parameters in "argv"
+ *  should never be < 0, but has been left as a signed int
+ *  for reasons of tradition.
+ *
+ *  "argv" [ IN ] - array of NUL terminated strings expected
+ *  to be in the shell-native character set: ASCII or UTF-8
+ *  element 0 is expected to be executable identity or path.
+ */
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args* args = NULL;
+    rc_t rc;
+
+    rc = ArgsMakeAndHandle(&args, argc, argv, 1, Options, sizeof Options / sizeof (Options[0]) );
+    if (rc)
+        LOGERR (klogInt, rc, "failed to parse command line parameters");
+    if (rc == 0)
+    {
+        rc = HandleOptions (args);
+
+        ArgsWhack (args);
+    }
+    STSMSG (2,("exiting: %R (%u)", rc, rc));
+    return rc;
+}
+
+/* EOF */
diff --git a/tools/ngs-pileup/Makefile b/tools/ngs-pileup/Makefile
new file mode 100644
index 0000000..b52f71d
--- /dev/null
+++ b/tools/ngs-pileup/Makefile
@@ -0,0 +1,82 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+
+MODULE = tools/ngs-pileup
+
+INT_TOOLS = \
+	ngs-pileup \
+
+EXT_TOOLS = \
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# ngs-pileup
+#
+NGS_PILEUP_SRC = \
+	ngs-pileup    \
+	main \
+
+INCDIRS += -I $(TOP)/ngs/ngs-c++
+
+NGS_PILEUP_OBJ = \
+	$(addsuffix .$(OBJX),$(NGS_PILEUP_SRC))
+
+NGS_PILEUP_LIBS = \
+	-sncbi-ngs-c++    \
+	-sncbi-vdb-static \
+	-sngs-c++         \
+	-skapp \
+	-stk-version \
+    
+$(BINDIR)/ngs-pileup: $(NGS_PILEUP_OBJ)
+	$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(NGS_PILEUP_LIBS)
+
diff --git a/tools/ngs-pileup/main.cpp b/tools/ngs-pileup/main.cpp
new file mode 100644
index 0000000..8a22a17
--- /dev/null
+++ b/tools/ngs-pileup/main.cpp
@@ -0,0 +1,152 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "ngs-pileup.hpp"
+
+#include <ngs/ErrorMsg.hpp>
+
+#include <kapp/main.h>
+#include <klib/out.h>
+#include <klib/rc.h>
+
+#include <sysalloc.h>
+#include <string.h>
+
+#include <iostream>
+
+#define OPTION_REF     "aligned-region"
+#define ALIAS_REF      "r"
+const char * ref_usage[] = { "Filter by position on genome.",
+                             "Name can either be file specific or canonical",
+                             "(ex: \"chr1\" or \"1\").",
+                             "\"from\" and \"to\" are 1-based coordinates",
+                             NULL };
+                             
+OptDef options[] =
+{   /*name,           alias,         hfkt, usage-help,    maxcount, needs value, required */
+    { OPTION_REF,     ALIAS_REF,     NULL, ref_usage,     0,        true,        false },
+};
+
+
+const char UsageDefaultName[] = "ngs-pileup";
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s <path> [options]\n"
+                    "\n", progname);
+}
+
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if ( args == NULL )
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+        rc = ArgsProgram ( args, &fullpath, &progname );
+
+    if ( rc )
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary ( progname );
+    KOutMsg ( "Options:\n" );
+   
+    HelpOptionsStandard ();
+    HelpVersion ( fullpath, KAppVersion() );
+    
+    return rc;
+}
+
+rc_t CC KMain( int argc, char *argv [] )
+{
+    Args * args;
+
+    rc_t rc = ArgsMakeAndHandle( &args, argc, argv, 1, options, sizeof options / sizeof options [ 0 ] );
+    if ( rc == 0 )
+    {
+        try
+        {
+            NGS_Pileup::Settings settings;
+            
+            uint32_t pcount;
+            
+            rc = ArgsOptionCount ( args, OPTION_REF, &pcount );
+            if ( pcount > 1 )
+            {
+                throw ngs :: ErrorMsg ( "multiple positions are not supported at this point" );
+            }
+            if ( pcount == 1 )
+            {
+                const void * value;
+                rc = ArgsOptionValue ( args, OPTION_REF, 0, & value );
+                if ( rc != 0 )
+                {
+                    throw ngs :: ErrorMsg ( "ArgsOptionValue (" OPTION_REF ") failed" );
+                }
+                settings . AddReference ( static_cast <char const*> (value) );
+            }
+            
+            rc = ArgsParamCount ( args, &pcount );
+            if ( rc == 0 )
+            {
+                if ( pcount > 1 )
+                {
+                    throw ngs :: ErrorMsg ( "multiple accessions are not supported at this point" );
+                }
+                
+                settings . output = & std::cout;
+                
+                void const *value;
+                rc = ArgsParamValue ( args, 0, &value );
+                if ( rc == 0 ) 
+                {
+                    settings . AddInput ( static_cast <char const*> (value) );
+                    
+                    NGS_Pileup ( settings ) . Run ();
+                }
+                else
+                {
+                    throw ngs :: ErrorMsg ( "ArgsParamValue failed" );
+                }
+            }
+        }
+        catch (ngs :: ErrorMsg& ex)
+        {
+            std :: cerr << "Program aborted: " << ex.what() << std::endl;
+            exit ( -1 );
+        }
+        
+        ArgsWhack( args );
+    }
+    
+    return 0;
+}
+
diff --git a/tools/ngs-pileup/ngs-pileup.cpp b/tools/ngs-pileup/ngs-pileup.cpp
new file mode 100644
index 0000000..fdee801
--- /dev/null
+++ b/tools/ngs-pileup/ngs-pileup.cpp
@@ -0,0 +1,206 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "ngs-pileup.hpp"
+
+#include <iostream>
+
+#include <ngs/ncbi/NGS.hpp>
+#include <ngs/ReadCollection.hpp>
+#include <ngs/PileupIterator.hpp>
+
+using namespace std;
+
+struct NGS_Pileup::TargetReference
+{
+    typedef pair < int64_t, int64_t >       Slice;
+    typedef vector < Slice >                Slices;
+    typedef vector < ngs :: Reference >     Targets;
+    typedef vector < ngs :: PileupIterator> Pileups;
+    
+    string  m_canonicalName;
+    Slices  m_slices;
+    Targets m_targets;
+    Pileups m_pileups;
+    bool    m_complete;
+    
+    TargetReference ( ngs :: Reference p_ref )
+    : m_canonicalName ( p_ref . getCanonicalName() ), m_complete ( true )
+    {
+        AddReference ( p_ref );
+    }
+    TargetReference ( ngs :: Reference p_ref, 
+                      int64_t p_first, 
+                      int64_t p_last )
+    : m_canonicalName ( p_ref . getCanonicalName() ), m_complete ( false )
+    {
+        AddReference ( p_ref );
+    }
+    ~TargetReference ()
+    {
+    }
+    
+    void AddSlice ( int64_t p_first, int64_t p_last )
+    {
+    }
+    void MakeComplete ()
+    {
+        m_complete = true;
+        m_slices . clear();
+    }
+    
+    void AddReference ( ngs :: Reference p_ref )
+    {
+        m_targets. push_back ( p_ref );
+    }
+    
+    void Process ( ostream& out )
+    {
+        int64_t firstPos = 0;
+        int64_t lastPos = m_targets . front () . getLength () - 1;
+
+        // create pileup iterators 
+        for ( Targets::iterator i = m_targets.begin(); i != m_targets.end(); ++i ) 
+        {
+            m_pileups . push_back ( i -> getPileups ( ngs::Alignment::all ) );
+        }
+        
+        int64_t curPos = firstPos;
+        while ( curPos <= lastPos ) 
+        {
+            uint32_t total_depth = 0;
+            for ( Pileups :: iterator i = m_pileups . begin (); i != m_pileups. end (); ++i )
+            {
+                bool next = i -> nextPileup ();
+                assert ( next );
+                total_depth += i -> getPileupDepth ();
+            }
+        
+            if ( total_depth > 0 )
+            {
+                out << m_canonicalName
+                    << '\t' << ( curPos + 1 ) // convert to 1-based position to emulate samtools
+                    << '\t' << total_depth
+                    << endl;
+            }
+            
+            ++ curPos;
+        }
+    }
+};
+
+class NGS_Pileup::TargetReferences : public vector < TargetReference >
+{
+public :
+    void AddComplete ( ngs :: Reference ref )
+    {
+        string name = ref . getCanonicalName ();
+        for ( iterator i = begin(); i != end (); ++ i )
+        {   
+            if ( i -> m_canonicalName == name )
+            {
+                i -> AddReference ( ref );
+                return;
+            }
+        }
+        // not found - add new reference
+        push_back ( TargetReference ( ref ) );
+    }
+};
+ 
+NGS_Pileup::NGS_Pileup ( const Settings& p_settings )
+: m_settings( p_settings )
+{
+}
+
+static
+bool FindReference ( const NGS_Pileup :: Settings :: References & requested, const ngs :: Reference & ref )
+{
+    for ( NGS_Pileup :: Settings :: References :: const_iterator i = requested . begin(); 
+          i != requested . end (); 
+          ++i )
+    {   
+        if ( i->m_name == ref . getCanonicalName () || i->m_name == ref . getCommonName () )
+        {
+            return true;
+        }
+    }
+    return false;
+}
+    
+void 
+NGS_Pileup::Run () const
+{
+    TargetReferences references;
+    
+    // build the set of target references
+    for ( Settings :: Inputs :: const_iterator i = m_settings . inputs . begin(); 
+          i != m_settings . inputs . end (); 
+          ++i )
+    {   
+        ngs :: ReadCollection col = ncbi :: NGS :: openReadCollection ( *i );
+        ngs :: ReferenceIterator refIt = col . getReferences ();
+        while ( refIt . nextReference () )
+        {
+            if ( m_settings . references . empty () ) // all references requested
+            {
+                /* need to create a Reference object that is not attached to the iterator, so as
+                    it is not invalidated on the next call to refIt.NextReference() */
+                references . AddComplete ( col . getReference ( refIt. getCommonName () ) );
+            }
+            else if ( FindReference ( m_settings . references, refIt ) )
+            {
+                //TODO: handle slices
+                references . AddComplete ( col . getReference ( refIt. getCommonName () ) );
+            }
+        }
+    }
+    
+    ostream & out ( m_settings . output != (ostream*)0 ? * m_settings . output : cout );
+    
+    // walk the references and output pileups
+    for ( TargetReferences :: iterator i = references . begin(); i != references . end (); ++i )
+    {   
+        i -> Process ( out );
+    }
+}
+
+//// NGS_Pileup::Settings
+
+void 
+NGS_Pileup::Settings::AddReference ( const string& commonOrCanonicalName ) 
+{
+    references . push_back ( ReferenceSlice ( commonOrCanonicalName ) ); 
+}
+
+void 
+NGS_Pileup::Settings::AddReferenceSlice ( const string& commonOrCanonicalName, 
+                                        int64_t firstPos, 
+                                        int64_t lastPos )
+{ 
+    references . push_back ( ReferenceSlice ( commonOrCanonicalName, firstPos, lastPos ) ); 
+}
+
diff --git a/tools/ngs-pileup/ngs-pileup.hpp b/tools/ngs-pileup/ngs-pileup.hpp
new file mode 100644
index 0000000..0fb7a37
--- /dev/null
+++ b/tools/ngs-pileup/ngs-pileup.hpp
@@ -0,0 +1,97 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _sra_tools_hpp_ngs_pileup_
+#define _sra_tools_hpp_ngs_pileup_
+
+#include <klib/defs.h>
+
+#include <string>
+#include <vector>
+
+namespace ngs
+{
+    class Reference;
+}
+
+class NGS_Pileup
+{
+public:
+    struct Settings
+    {
+        struct ReferenceSlice
+        {
+            ReferenceSlice( const std::string& p_name ) /* entire reference */
+            :   m_name ( p_name ), 
+                m_firstPos ( 0 ),
+                m_lastPos ( 0 ),
+                m_full ( true )
+            {
+            }
+            ReferenceSlice( const std::string& p_name, 
+                            int64_t p_firstPos, 
+                            int64_t p_lastPos )
+            :   m_name ( p_name ), 
+                m_firstPos ( p_firstPos ),
+                m_lastPos ( p_lastPos ),
+                m_full ( false )
+            {
+            }
+            
+            std::string m_name;
+            int64_t     m_firstPos; 
+            int64_t     m_lastPos;
+            bool        m_full;
+        };
+        
+        void AddInput ( const std::string& accession ) { inputs . push_back ( accession ); }
+        void AddReference ( const std::string& commonOrCanonicalName );
+        void AddReferenceSlice ( const std::string& commonOrCanonicalName, 
+                                 int64_t firstPos, 
+                                 int64_t lastPos );
+                                 
+                                 
+        typedef std::vector < std::string > Inputs;
+        typedef std::vector < ReferenceSlice > References;
+        
+        Inputs inputs;
+        std::ostream* output;
+        References references;
+    };
+    
+public:
+    NGS_Pileup ( const Settings& p_settings );
+    
+    void Run () const;
+    
+private:
+    struct TargetReference;
+    class TargetReferences;
+    
+    Settings            m_settings;
+};
+
+#endif
diff --git a/tools/pacbio-load/.gitignore b/tools/pacbio-load/.gitignore
new file mode 100644
index 0000000..e40acaf
--- /dev/null
+++ b/tools/pacbio-load/.gitignore
@@ -0,0 +1,7 @@
+*.vers.h
+*.bin
+*.txt
+*.sh
+*.h5
+dst
+pacbio1
diff --git a/tools/pacbio-load/Makefile b/tools/pacbio-load/Makefile
new file mode 100644
index 0000000..5c0d4d4
--- /dev/null
+++ b/tools/pacbio-load/Makefile
@@ -0,0 +1,117 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/pacbio-load
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+	pacbio-load
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# where to find hdf5 libs
+#
+ifdef NCBI
+ifeq (dbg,$(BUILD))
+	LIBHDF5_LPATH = $(NCBI)/hdf5/Debug/lib
+else
+	LIBHDF5_LPATH = $(NCBI)/hdf5/Release/lib
+endif
+endif
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+ifeq (1,$(HAVE_HDF5))
+
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+else
+
+all std: $(ALL_TOOLS)
+
+$(ALL_TOOLS):
+	@ echo "NOTE - $(@F) cannot be built:"                          \
+	       "It requires our internal library 'libkdf5'"             \
+	       "which requires 'libhdf5' and its development headers."
+endif
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# vdb-copy
+#  vdb copy tool
+#
+PACBIO_LOAD_SRC = \
+	pl-context \
+	pl-tools \
+	pl-zmw \
+	pl-basecalls_cmn \
+	pl-sequence \
+	pl-consensus \
+	pl-passes \
+	pl-metrics \
+	pl-regions \
+	pl-progress \
+	pacbio-load
+
+PACBIO_LOAD_OBJ = \
+	$(addsuffix .$(OBJX),$(PACBIO_LOAD_SRC))
+
+PACBIO_LOAD_LIB = \
+	-skapp \
+	-stk-version \
+	-skdf5 \
+	-sload \
+	-shdf5 \
+	-sncbi-wvdb \
+	-sm \
+
+ifdef HDF5_LIBDIR
+	PACBIO_LOAD_LIB += $(addprefix -L,$(HDF5_LIBDIR))
+endif
+
+$(BINDIR)/pacbio-load: $(PACBIO_LOAD_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(PACBIO_LOAD_LIB)
diff --git a/tools/pacbio-load/pacbio-load.c b/tools/pacbio-load/pacbio-load.c
new file mode 100644
index 0000000..d3e7a83
--- /dev/null
+++ b/tools/pacbio-load/pacbio-load.c
@@ -0,0 +1,650 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data", the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties", express or implied", including
+*  warranties of performance", merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "pl-context.h"
+#include "pl-tools.h"
+#include "pl-zmw.h"
+#include "pl-basecalls_cmn.h"
+#include "pl-sequence.h"
+#include "pl-consensus.h"
+#include "pl-passes.h"
+#include "pl-metrics.h"
+
+#include <klib/out.h>
+#include <klib/namelist.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include <kdb/meta.h>
+#include <kdb/database.h>
+
+#include <vdb/vdb-priv.h>
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+
+#include <sra/sraschema.h>
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <kapp/loader-meta.h>
+
+#include <hdf5/kdf5.h>
+
+#include <kfs/arrayfile.h>
+
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+const char UsageDefaultName[] = "pacbio-load";
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    OUTMSG ( ("\n"
+        "Usage:\n"
+        "  %s <hdf5-file> -o<target>\n"
+        "\n", progname) );
+    return 0;
+}
+
+static const char* schema_usage[] = { "schema-name to be used", NULL };
+static const char* output_usage[] = { "target to be created", NULL };
+static const char* force_usage[] = { "forces an existing target to be overwritten", NULL };
+static const char* tabs_usage[] = { "load only these tabs (SCPM), dflt=all", 
+                                     " S...Sequence",
+                                     " C...Consensus", 
+                                     " P...Passes", 
+                                     " M...Metrics", NULL };
+static const char* progress_usage[] = { "show load-progress", NULL };
+
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary (progname);
+
+    KOutMsg ("Options:\n");
+
+    HelpOptionLine ( ALIAS_OUTPUT, OPTION_OUTPUT, "output", output_usage );
+
+    HelpOptionLine ( ALIAS_SCHEMA, OPTION_SCHEMA, "schema", schema_usage );
+    HelpOptionLine ( ALIAS_FORCE, OPTION_FORCE, "force", force_usage );
+    HelpOptionLine ( ALIAS_TABS, OPTION_TABS, "tabs", tabs_usage );
+    HelpOptionLine ( ALIAS_WITH_PROGRESS, OPTION_WITH_PROGRESS, 
+                     "load-progress", progress_usage );
+    XMLLogger_Usage();
+    HelpOptionsStandard ();
+    HelpVersion ( fullpath, KAppVersion() );
+    return rc;
+}
+
+static bool pacbio_is_schema_dflt( const char * schema )
+{
+    size_t asize = string_size ( schema );
+    size_t bsize = string_size ( DFLT_SCHEMA );
+    uint32_t max_chars = ( asize > bsize ) ? asize : bsize;
+    return ( string_cmp ( schema, asize, DFLT_SCHEMA, bsize, max_chars ) == 0 );
+}
+
+
+static rc_t pacbio_extract_path( const KDirectory *dir, const char *schema_name,
+                                 char * dst, size_t dst_len )
+{
+    rc_t rc = KDirectoryResolvePath ( dir, true, dst, dst_len, "%s", schema_name );
+    if ( rc != 0 )
+        PLOGERR( klogErr, ( klogErr, rc, "cannot resolve path to schema-file '$(name)'",
+                            "name=%s", schema_name ));
+    else
+    {
+        char *ptr = strrchr ( dst, '/' );
+        if ( ptr == 0 )
+        {
+            rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+            PLOGERR( klogErr, ( klogErr, rc, "cannot extract the path of '$(name)'",
+                                "name=%s", schema_name ));
+        }
+        else
+            *ptr = 0;
+    }
+    return rc;
+}
+
+
+static rc_t pacbio_load_schema( KDirectory * wd, VDBManager * vdb_mgr, VSchema ** schema, const char * schema_name )
+{
+    rc_t rc;
+
+    if ( pacbio_is_schema_dflt( schema_name ) )
+    {
+        rc = VDBManagerMakeSRASchema ( vdb_mgr, schema );
+        if ( rc != 0 )
+            LOGERR( klogErr, rc, "cannot create sra-schema" );
+
+        if ( rc == 0 )
+        {
+            rc = VSchemaParseFile ( *schema, "%s", schema_name );
+            if ( rc != 0 )
+                PLOGERR( klogErr, ( klogErr, rc, "cannot parse schema file '$(schema)'",
+                                    "schema=%s", schema_name ) );
+        }
+    }
+    else
+    {
+        rc = VDBManagerMakeSchema ( vdb_mgr, schema );
+        if ( rc != 0 )
+            LOGERR( klogErr, rc, "cannot create sra-schema" );
+        else
+        {
+            char path[ 4096 ];
+            rc = pacbio_extract_path( wd, schema_name, path, sizeof path );
+            if ( rc == 0 )
+            {
+                rc = VSchemaAddIncludePath ( *schema, "%s", path );
+                if ( rc != 0 )
+                    PLOGERR( klogErr, ( klogErr, rc, "cannot add schema-include-path '$(path)'",
+                                        "path=%s", path ) );
+                else
+                {
+                    rc = VSchemaParseFile ( *schema, "%s", schema_name );
+                    if ( rc != 0 )
+                        PLOGERR( klogErr, ( klogErr, rc, "cannot parse schema file '$(schema)'",
+                                            "schema=%s", schema_name ) );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t pacbio_meta_entry( VDatabase * db, const char * toolname )
+{
+    KMetadata* meta = NULL;
+    rc_t rc = VDatabaseOpenMetadataUpdate( db, &meta );
+    if ( rc != 0 )
+    {
+        LOGERR( klogErr, rc, "Cannot open database-metadata" );
+    }
+    else
+    {
+        KMDataNode *node = NULL;
+
+        rc = KMetadataOpenNodeUpdate( meta, &node, "/" );
+        if ( rc != 0 )
+        {
+            LOGERR( klogErr, rc, "Cannot open database-metadata-root" );
+        }
+        else
+        {
+            rc = KLoaderMeta_Write( node, toolname, __DATE__, "PacBio HDF5", KAppVersion() );
+            if ( rc != 0 )
+            {
+                LOGERR( klogErr, rc, "Cannot write pacbio metadata node" );
+            }
+            KMDataNodeRelease( node );
+        }
+        KMetadataRelease( meta );
+    }
+    return rc;
+}
+
+
+/* the context that has the context of all 4 sub-tables (SEQUENCE,CONSENSU,PASSES,METRICS) */
+typedef struct seq_con_pas_met
+{
+    seq_ctx sequence;       /* from pl-sequence.h */
+    con_ctx consensus;      /* from pl-consensus.h */
+    pas_ctx passes;         /* from pl-passes.h */
+    met_ctx metrics;        /* from pl-metrics.h */
+} seq_con_pas_met;
+
+
+/* we have to pass in the first hdf5-source, because prepare of sequences needs it */
+static rc_t pacbio_prepare( VDatabase * database, seq_con_pas_met * dst, KDirectory * first_src, ld_context *lctx )
+{
+    rc_t rc;
+
+    dst->sequence.cursor = NULL;
+    dst->consensus.cursor = NULL;
+    dst->passes.cursor = NULL;
+    dst->metrics.cursor = NULL;
+
+    rc = prepare_seq( database, &dst->sequence, first_src, lctx ); /* pl-sequence.c */
+    if ( rc == 0 )
+        rc = prepare_consensus( database, &dst->consensus, lctx ); /* pl-consensus.c */
+    if ( rc == 0 )
+        rc = prepare_passes( database, &dst->passes, lctx ); /* pl-passes.c */
+    if ( rc == 0 )
+        rc = prepare_metrics( database, &dst->metrics, lctx ); /* pl-metrics.c */
+    return rc;
+}
+
+
+static rc_t pacbio_load_src( context *ctx, seq_con_pas_met * dst, KDirectory * src, bool * consensus_present )
+{
+    rc_t rc1, rc = 0;
+
+    if ( ctx_ld_sequence( ctx ) )
+        rc = load_seq_src( &dst->sequence, src ); /* pl-sequence.c */
+
+    if ( rc == 0 && ctx_ld_consensus( ctx ) )
+    {
+        rc1 = load_consensus_src( &dst->consensus, src ); /* pl-consensus.c */
+        if ( rc1 == 0 )
+            *consensus_present = true;
+        else
+            LOGMSG( klogWarn, "the consensus-group is missing" );
+    }
+
+    if ( rc == 0 && ctx_ld_passes( ctx ) && *consensus_present )
+    {
+        rc1 = load_passes_src( &dst->passes, src ); /* pl-passes.c */
+        if ( rc1 != 0 )
+            LOGMSG( klogWarn, "the passes-table is missing" );
+    }
+
+    if ( rc == 0 && ctx_ld_metrics( ctx ) && *consensus_present )
+    {
+        rc1 = load_metrics_src( &dst->metrics, src ); /* pl-metrics.c */
+        if ( rc1 != 0 )
+            LOGMSG( klogWarn, "the metrics-table is missing" );
+    }
+    return rc;
+}
+
+
+static rc_t pacbio_finish( seq_con_pas_met * dst )
+{
+    rc_t rc = finish_seq( &dst->sequence ); /* pl-sequence.c */
+    if ( rc == 0 )
+        rc = finish_consensus( &dst->consensus ); /* pl-consensus.c */
+    if ( rc == 0 )
+        rc = finish_passes( &dst->passes ); /* pl-passes.c */
+    if ( rc == 0 )
+        rc = finish_metrics( &dst->metrics ); /* pl-metrics.c */
+    return rc;
+}
+
+
+static rc_t pacbio_get_hdf5_src( KDirectory * wd, const VNamelist * path_list, uint32_t idx, KDirectory ** hdf5_src )
+{
+    const char * src_path;
+    rc_t rc = VNameListGet ( path_list, idx, &src_path );
+    if ( rc == 0 && src_path != NULL )
+    {
+        rc = MakeHDF5RootDir ( wd, hdf5_src, false, src_path );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc, "cannot open hdf5-source-file '$(srcfile)'",
+                                "srcfile=%s", src_path ) );
+        }
+    }
+    return rc;
+}
+
+
+static bool pacbio_has_MultiParts( KDirectory * hdf5_src )
+{
+    uint32_t pt = KDirectoryPathType ( hdf5_src, "MultiPart/Parts" );
+    return ( pt == kptDataset );
+}
+
+
+static rc_t pacbio_get_MultiParts( KDirectory * hdf5_src, VNamelist * parts )
+{
+    struct KFile const *f;      /* the fake "file" from a HDF5-dir */
+    rc_t rc = KDirectoryOpenFileRead ( hdf5_src, &f, "MultiPart/Parts" );
+    if ( rc == 0 )
+    {
+        struct KArrayFile *af;      /* the arrayfile made from f */
+        rc = MakeHDF5ArrayFile ( f, &af );
+        if ( rc == 0 )
+        {
+            uint8_t dimensionality;
+            rc = KArrayFileDimensionality ( af, &dimensionality );
+            if ( rc == 0 && dimensionality == 1 )
+            {
+                uint64_t extents[ 1 ];
+                rc = KArrayFileDimExtents ( af, dimensionality, extents );
+                if ( rc == 0 )
+                {
+                    uint64_t pos[ 1 ];
+                    for ( pos[ 0 ] = 0; pos[ 0 ] < extents[ 0 ] && rc == 0; pos[ 0 ] += 1 )
+                    {
+                        char buffer[ 1024 ];
+                        uint64_t num_read;
+                        rc = KArrayFileRead_v ( af, 1, pos, buffer, sizeof buffer, &num_read );
+                        if ( rc == 0 )
+                            rc = VNamelistAppend ( parts, buffer );
+                    }
+                }
+            }
+            KArrayFileRelease( af );
+        }
+        KFileRelease( f );
+    }
+    return rc;
+}
+
+
+static rc_t pacbio_load_multipart( context * ctx, KDirectory * wd, VDatabase * database,
+                                   KDirectory ** hdf5_src, bool * consensus_present, 
+                                   ld_context * lctx, uint32_t count )
+{
+    seq_con_pas_met dst;
+    uint32_t idx = 0;
+    /* the loop is complicated, because pacbio_prepare needs the first hdf5-src opened ! */
+    rc_t rc = pacbio_prepare( database, &dst, *hdf5_src, lctx );
+    while ( idx < count && rc == 0 )
+    {
+        rc = pacbio_load_src( ctx, &dst, *hdf5_src, consensus_present );
+        idx++;
+        if ( rc == 0 && idx < count )
+        {
+            KDirectoryRelease ( *hdf5_src );
+            rc = pacbio_get_hdf5_src( wd, ctx->src_paths, idx, hdf5_src );
+        }
+    }
+    pacbio_finish( &dst );
+    KDirectoryRelease ( *hdf5_src );
+    return rc;
+}
+
+
+static rc_t add_unique_to_namelist( const VNamelist * src, VNamelist * dst, int32_t idx )
+{
+    const char * s;
+    rc_t rc = VNameListGet( src, idx, &s );
+    if ( rc == 0 && s != NULL && s[ 0 ] != 0 )
+    {
+        uint32_t found;
+        rc_t rc2 = VNamelistIndexOf( dst, s, &found );
+        if ( GetRCState( rc2 ) == rcNotFound )
+            rc = VNamelistAppend( dst, s );
+    }
+    return rc;
+}
+
+static rc_t pacbio_load( context *ctx, KDirectory * wd, ld_context *lctx, const char * toolname )
+{
+    VDBManager * vdb_mgr = NULL;
+    VSchema * schema = NULL;
+    VDatabase * database = NULL;
+
+    rc_t rc = VDBManagerMakeUpdate ( &vdb_mgr, wd );
+    if ( rc != 0 )
+    {
+        LOGERR( klogErr, rc, "cannot create vdb-update-manager" );
+    }
+
+    if ( rc == 0 )
+        rc = pacbio_load_schema( wd, vdb_mgr, &schema, ctx->schema_name );
+
+
+    /* creates the output vdb database */
+    if ( rc == 0 )
+    {
+        KCreateMode cmode = kcmMD5 | kcmParents;
+        if ( ctx->force )
+            cmode |= kcmInit;
+        else
+            cmode |= kcmCreate;
+        rc = VDBManagerCreateDB( vdb_mgr, &database, schema, 
+                                 PACBIO_SCHEMA_DB, cmode, "%s", ctx->dst_path );
+        if ( rc != 0 )
+            PLOGERR( klogErr, ( klogErr, rc, "cannot create output-database '$(dst)'",
+                                "dst=%s", ctx->dst_path ) );
+    }
+
+
+    /* creates the 4 output vdb tables... SEQUENCE, CONSENSUS, PASSES and METRICS */
+    if ( rc == 0 )
+    {
+        bool consensus_present = false;    
+        VNamelist * to_process;
+        rc = VNamelistMake ( &to_process, 5 );
+        if ( rc == 0 )
+        {
+            KDirectory * hdf5_src;
+            uint32_t count, idx;
+
+            rc = VNameListCount ( ctx->src_paths, &count );
+            for ( idx = 0; rc == 0 && idx < count; ++idx )
+            {
+                rc = pacbio_get_hdf5_src( wd, ctx->src_paths, 0, &hdf5_src );
+                if ( rc == 0 )
+                {
+                    if ( pacbio_has_MultiParts( hdf5_src ) )
+                    {
+                        VNamelist * parts;
+                        rc = VNamelistMake ( &parts, 5 );
+                        if ( rc == 0 )
+                        {
+                            rc = pacbio_get_MultiParts( hdf5_src, parts );
+                            if ( rc == 0 )
+                            {
+                                uint32_t p_count, p_idx;                            
+                                rc = VNameListCount ( ctx->src_paths, &p_count );
+                                for ( p_idx = 0; rc == 0 && p_idx < p_count; ++p_idx )
+                                    rc = add_unique_to_namelist( parts, to_process, p_idx );
+                            }
+                            VNamelistRelease ( parts );
+                        }
+                    }
+                    else
+                        rc = add_unique_to_namelist( ctx->src_paths, to_process, idx );
+                    KDirectoryRelease( hdf5_src );
+                }
+            }
+            VNamelistRelease ( ctx->src_paths );
+            ctx->src_paths = to_process;
+            
+            if ( rc == 0 )
+            {
+                rc = VNameListCount ( ctx->src_paths, &count );
+                if ( rc == 0 && count > 0 )
+                {
+                    ctx_show( ctx );
+                    rc = pacbio_get_hdf5_src( wd, ctx->src_paths, 0, &hdf5_src );
+                    if ( rc == 0 )
+                        rc = pacbio_load_multipart( ctx, wd, database, &hdf5_src, &consensus_present, lctx, count );
+                }
+            }
+        
+        }
+        
+        if ( !consensus_present )
+            VDatabaseDropTable ( database, "CONSENSUS" );
+    }
+
+    if ( rc == 0 )
+        seq_report_totals( lctx );
+
+    if ( rc == 0 )
+        rc = pacbio_meta_entry( database, toolname );
+
+    if ( database != NULL )
+        VDatabaseRelease ( database );
+
+    if ( schema != NULL )
+        VSchemaRelease ( schema );
+
+    if ( vdb_mgr != NULL )
+        VDBManagerRelease ( vdb_mgr );
+    return rc;
+}
+
+
+static rc_t pacbio_check_sourcefile( const KDirectory * dir, char ** path )
+{
+    rc_t rc = 0;
+    uint32_t src_path_type = KDirectoryPathType ( dir, "%s", *path );
+    if ( ( src_path_type & kptFile ) == 0 )
+    {
+        rc = RC ( rcExe, rcFile, rcValidating, rcItem, rcNotFound );
+        LOGERR( klogErr, rc, "source-file not found" );
+    }
+    else
+    {
+        if ( ( src_path_type & kptAlias ) != 0 )
+        {
+            char resolved[ 4096 ];
+            rc = KDirectoryResolveAlias ( dir, true, resolved,
+                                          sizeof resolved, "%s", *path );
+            if ( rc != 0 )
+            {
+                LOGERR( klogErr, rc, "cannot resolve srcfile-link" );
+            }
+            else
+            {
+                free( *path );
+                *path = string_dup_measure ( resolved, NULL );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t pacbio_check_sourcefile_list( const KDirectory * dir, VNamelist ** list )
+{
+    VNamelist * temp;
+    rc_t rc = VNamelistMake ( &temp, 5 );
+    if ( rc == 0 )
+    {
+        uint32_t idx, count;
+        rc = VNameListCount ( *list, &count );
+        for ( idx = 0; rc == 0 && idx < count; ++idx )
+        {
+            const char * name = NULL;
+            rc = VNameListGet ( *list, idx, &name );
+            if ( rc == 0 && name != NULL )
+            {
+                char * path = string_dup_measure ( name, NULL );
+                rc = pacbio_check_sourcefile( dir, &path );
+                if ( rc == 0 )
+                    rc = VNamelistAppend ( temp, path );
+            }
+        }
+        if ( rc == 0 )
+        {
+            rc = VNamelistRelease ( *list );
+            *list = temp;
+        }
+    }
+    return rc;
+}
+
+
+OptDef MyOptions[] =
+{
+    { OPTION_SCHEMA, ALIAS_SCHEMA, NULL, schema_usage, 5, true, false },
+    { OPTION_FORCE, ALIAS_FORCE, NULL, force_usage, 1, false, false },
+    { OPTION_WITH_PROGRESS, ALIAS_WITH_PROGRESS, NULL, progress_usage, 1, false, false },
+    { OPTION_TABS, ALIAS_TABS, NULL, tabs_usage, 1, true, false },
+    { OPTION_OUTPUT, ALIAS_OUTPUT, NULL, output_usage, 1, true, true }
+};
+
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args * args;
+
+    rc_t rc = ArgsMakeAndHandle ( &args, argc, argv, 2,
+                                  MyOptions, sizeof MyOptions / sizeof ( OptDef ),
+                                  XMLLogger_Args, XMLLogger_ArgsQty  );
+
+    KLogHandlerSetStdErr();
+    if ( rc != 0 )
+    {
+        LOGERR( klogErr, rc, "error creating internal structure" );
+    }
+    else
+    {
+        KDirectory * wd;
+        rc = KDirectoryNativeDir ( &wd );
+        if ( rc != 0 )
+        {
+            LOGERR( klogErr, rc, "error creating internal structure" );
+        }
+        else
+        {
+            ld_context lctx;
+            lctx_init( &lctx );
+            rc = XMLLogger_Make( &lctx.xml_logger, wd, args );
+            if ( rc != 0 )
+            {
+                LOGERR( klogErr, rc, "error creating internal structure" );
+            }
+            else
+            {
+                context ctx;
+                rc = ctx_init( args, &ctx );
+                if ( rc == 0 )
+                {
+                    rc = pacbio_check_sourcefile_list( wd, &ctx.src_paths );
+                    if ( rc == 0 )
+                    {
+                        lctx.with_progress = ctx.with_progress;
+                        lctx.dst_path = ctx.dst_path;
+                        lctx.cache_content = false;
+                        lctx.check_src_obj = false;
+
+                        rc = KLoadProgressbar_Make( &lctx.xml_progress, 0 );
+                        if ( rc != 0 )
+                        {
+                            LOGERR( klogErr, rc, "cannot create LoadProgressBar" );
+                        }
+                        else
+                            rc = pacbio_load( &ctx, wd, &lctx, argv[ 0 ] );
+
+                    }
+                    ctx_free( &ctx );
+                }
+            }
+            KDirectoryRelease ( wd );
+            lctx_free( &lctx );
+        }
+        ArgsWhack ( args );
+    }
+    return rc;
+}
diff --git a/tools/pacbio-load/pl-basecalls_cmn.c b/tools/pacbio-load/pl-basecalls_cmn.c
new file mode 100644
index 0000000..7980d3c
--- /dev/null
+++ b/tools/pacbio-load/pl-basecalls_cmn.c
@@ -0,0 +1,97 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "pl-basecalls_cmn.h"
+#include <sysalloc.h>
+
+void init_BaseCalls_cmn( BaseCalls_cmn *tab )
+{
+    zmw_init( &tab->zmw );
+    init_array_file( &tab->Basecall );
+    init_array_file( &tab->QualityValue );
+    init_array_file( &tab->DeletionQV );
+    init_array_file( &tab->DeletionTag );
+    init_array_file( &tab->InsertionQV );
+    init_array_file( &tab->SubstitutionQV );
+    init_array_file( &tab->SubstitutionTag );
+}
+
+
+void close_BaseCalls_cmn( BaseCalls_cmn *tab )
+{
+    zmw_close( &tab->zmw );
+    free_array_file( &tab->Basecall );
+    free_array_file( &tab->QualityValue );
+    free_array_file( &tab->DeletionQV );
+    free_array_file( &tab->DeletionTag );
+    free_array_file( &tab->InsertionQV );
+    free_array_file( &tab->SubstitutionQV );
+    free_array_file( &tab->SubstitutionTag );
+}
+
+
+rc_t open_BaseCalls_cmn( const KDirectory *hdf5_dir, BaseCalls_cmn *tab,
+                         const bool num_passes, const char * path,
+                         bool cache_content, bool supress_err_msg )
+{
+    rc_t rc;
+
+    init_BaseCalls_cmn( tab );
+    rc = zmw_open( hdf5_dir, &tab->zmw, num_passes, path, supress_err_msg );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->Basecall, path, "Basecall", 
+                           BASECALL_BITSIZE, BASECALL_COLS,
+                           true, cache_content, supress_err_msg );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->QualityValue, path, "QualityValue", 
+                           QUALITY_VALUE_BITSIZE, QUALITY_VALUE_COLS,
+                           true, cache_content, supress_err_msg );
+    if ( rc == 0 )
+    {
+        open_element( hdf5_dir, &tab->DeletionQV, path, "DeletionQV",
+                           DELETION_QV_BITSIZE, DELETION_QV_COLS,
+                           true, cache_content, true );
+
+        open_element( hdf5_dir, &tab->DeletionTag, path, "DeletionTag", 
+                           DELETION_TAG_BITSIZE, DELETION_TAG_COLS,
+                           true, cache_content, true );
+
+        open_element( hdf5_dir, &tab->InsertionQV, path, "InsertionQV", 
+                           INSERTION_QV_BITSIZE, INSERTION_QV_COLS,
+                           true, cache_content, true );
+
+        open_element( hdf5_dir, &tab->SubstitutionQV, path, "SubstitutionQV",
+                           SUBSTITUTION_QV_BITZISE, SUBSTITUTION_QV_COLS,
+                           true, cache_content, true );
+
+        open_element( hdf5_dir, &tab->SubstitutionTag, path, "SubstitutionTag",
+                           SUBSTITUTION_TAG_BITSIZE, SUBSTITUTION_TAG_COLS,
+                           true, cache_content, true );
+    }
+    if ( rc != 0 )
+        close_BaseCalls_cmn( tab ); /* releases only initialized elements */
+    return rc;
+}
diff --git a/tools/pacbio-load/pl-basecalls_cmn.h b/tools/pacbio-load/pl-basecalls_cmn.h
new file mode 100644
index 0000000..f9965cc
--- /dev/null
+++ b/tools/pacbio-load/pl-basecalls_cmn.h
@@ -0,0 +1,60 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_pl_basecalls_cmn_
+#define _h_pl_basecalls_cmn_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "pl-tools.h"
+#include "pl-zmw.h"
+#include <klib/rc.h>
+
+typedef struct BaseCalls_cmn
+{
+    zmw_tab zmw;
+    af_data Basecall;
+    af_data QualityValue;
+    af_data DeletionQV;
+    af_data DeletionTag;
+    af_data InsertionQV;
+    af_data SubstitutionQV;
+    af_data SubstitutionTag;
+} BaseCalls_cmn;
+
+
+void init_BaseCalls_cmn( BaseCalls_cmn *tab );
+void close_BaseCalls_cmn( BaseCalls_cmn *tab );
+rc_t open_BaseCalls_cmn( const KDirectory *hdf5_dir, BaseCalls_cmn *tab,
+                         const bool num_passes, const char * path,
+                         bool cache_content, bool supress_err_msg );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/pacbio-load/pl-consensus.c b/tools/pacbio-load/pl-consensus.c
new file mode 100644
index 0000000..c2c2565
--- /dev/null
+++ b/tools/pacbio-load/pl-consensus.c
@@ -0,0 +1,472 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "pl-consensus.h"
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+
+const char * consensus_tab_names[] = 
+{ 
+    /* base-space */
+    "READ",
+    "QUALITY",
+    "NREADS",
+    "READ_TYPE",
+    "READ_START",
+    "READ_LEN",
+    "(INSDC:SRA:platform_id)PLATFORM",
+    "READ_FILTER",
+
+    /* consensus-space */
+    "HOLE_NUMBER",
+    "HOLE_STATUS",
+    "HOLE_XY",
+    "NUM_PASSES",
+    "INSERTION_QV",
+    "DELETION_QV",
+    "DELETION_TAG",
+    "SUBSTITUTION_QV",
+    "SUBSTITUTION_TAG"
+};
+
+
+static bool check_Consensus_totalcount( BaseCalls_cmn *tab, const uint64_t expected )
+{
+    bool res = check_table_count( &tab->Basecall, "Basecall", expected );
+    if ( res )
+        res = check_table_count( &tab->QualityValue, "QualityValue", expected );
+
+	if ( res )
+	{
+		if ( tab->DeletionQV.extents != NULL )
+			res = check_table_count( &tab->DeletionQV, "DeletionQV", expected );
+
+		if ( tab->DeletionTag.extents != NULL )
+			res = check_table_count( &tab->DeletionTag, "DeletionTag", expected );
+
+		if ( tab->InsertionQV.extents != NULL )
+			res = check_table_count( &tab->InsertionQV, "InsertionQV", expected );
+
+		if ( tab->SubstitutionQV.extents != NULL )
+			res = check_table_count( &tab->SubstitutionQV, "SubstitutionQV", expected );
+
+		if ( tab->SubstitutionTag.extents != NULL )
+			res = check_table_count( &tab->SubstitutionTag, "SubstitutionTag", expected );
+	}
+
+    return res;
+}
+
+
+static rc_t consensus_load_zero_bases( VCursor *cursor, const uint32_t *col_idx )
+{
+    uint32_t dummy_src; 
+    INSDC_SRA_read_filter filter = SRA_READ_FILTER_CRITERIA;
+
+    rc_t rc = vdb_write_value( cursor, col_idx[ consensus_tab_READ ],
+                               &dummy_src, BASECALL_BITSIZE, 0, "consensus.Basecall" );
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ consensus_tab_QUALITY ],
+                               &dummy_src, QUALITY_VALUE_BITSIZE, 0, "QualityValue" );
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ consensus_tab_INSERTION_QV ],
+                               &dummy_src, INSERTION_QV_BITSIZE, 0, "consensus.InsertionQV" );
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ consensus_tab_DELETION_QV ],
+                               &dummy_src, DELETION_QV_BITSIZE, 0, "consensus.DeletionQV" );
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ consensus_tab_DELETION_TAG ],
+                               &dummy_src, DELETION_TAG_BITSIZE, 0, "consensus.DeletionTag" );
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ consensus_tab_SUBSTITUTION_QV ],
+                               &dummy_src, SUBSTITUTION_QV_BITZISE, 0, "consensus.SubstitutionQV" );
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ consensus_tab_SUBSTITUTION_TAG ],
+                               &dummy_src, SUBSTITUTION_TAG_BITSIZE, 0, "consensus.SubstitutionTag" );
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ consensus_tab_READ_FILTER ],
+                               &filter, sizeof filter * 8, 1, "consensus.READ_FILTER" );
+    return rc;
+}
+
+
+static rc_t consensus_load_spot_bases( VCursor *cursor, BaseCalls_cmn *tab,
+                                       const uint32_t *col_idx, zmw_row * spot )
+{
+    rc_t rc = 0;
+	uint32_t column_idx, dummy_src;
+	
+    /* we make a buffer to store NumEvent 8-bit-values
+      (that is so far the biggest value we have to read per DNA-BASE) */
+    char * buffer = malloc( spot->NumEvent );
+    if ( buffer == NULL )
+    {
+        rc = RC( rcExe, rcNoTarg, rcAllocating, rcMemory, rcExhausted );
+        PLOGERR( klogErr, ( klogErr, rc, "cannot allocate $(numbytes) to read seq-data",
+                            "numbytes=%u", spot->NumEvent ) );
+    }
+    if ( rc == 0 )
+        rc = transfer_bits( cursor, col_idx[ consensus_tab_READ ],
+            &tab->Basecall, buffer, spot->offset, spot->NumEvent,
+            BASECALL_BITSIZE, "consensus.Basecall" );
+    if ( rc == 0 )
+        rc = transfer_bits( cursor, col_idx[ consensus_tab_QUALITY ],
+            &tab->QualityValue, buffer, spot->offset, spot->NumEvent,
+            QUALITY_VALUE_BITSIZE, "consensus.QualityValue" );
+			
+    if ( rc == 0 )
+	{
+		column_idx = col_idx[ consensus_tab_INSERTION_QV ];
+		if ( tab->InsertionQV.extents != NULL )
+			rc = transfer_bits( cursor, column_idx,
+				&tab->InsertionQV, buffer, spot->offset, spot->NumEvent,
+				INSERTION_QV_BITSIZE, "consensus.InsertionQV" );
+		else
+			rc = vdb_write_value( cursor, column_idx,
+					&dummy_src, INSERTION_QV_BITSIZE, 0, "consensus.InsertionQV" );
+	}
+	
+    if ( rc == 0 )
+	{
+		column_idx = col_idx[ consensus_tab_DELETION_QV ];
+		if ( tab->DeletionQV.extents != NULL )
+			rc = transfer_bits( cursor, column_idx,
+				&tab->DeletionQV, buffer, spot->offset, spot->NumEvent,
+				DELETION_QV_BITSIZE, "consensus.DeletionQV" );
+		else
+			rc = vdb_write_value( cursor, column_idx,
+				   &dummy_src, DELETION_QV_BITSIZE, 0, "consensus.DeletionQV" );
+	}
+	
+    if ( rc == 0 )
+	{
+		column_idx = col_idx[ consensus_tab_DELETION_TAG ];
+		if ( tab->DeletionTag.extents != NULL )
+			rc = transfer_bits( cursor, column_idx,
+				&tab->DeletionTag, buffer, spot->offset, spot->NumEvent,
+				DELETION_TAG_BITSIZE, "consensus.DeletionTag" );
+		else
+			rc = vdb_write_value( cursor, column_idx,
+				   &dummy_src, DELETION_TAG_BITSIZE, 0, "consensus.DeletionTag" );
+	}
+	
+    if ( rc == 0 )
+	{
+		column_idx = col_idx[ consensus_tab_SUBSTITUTION_QV ];
+		if ( tab->SubstitutionQV.extents != NULL )
+			rc = transfer_bits( cursor, column_idx,
+				&tab->SubstitutionQV, buffer, spot->offset, spot->NumEvent,
+				SUBSTITUTION_QV_BITZISE, "consensus.SubstitutionQV" );
+		else
+			rc = vdb_write_value( cursor, column_idx,
+					&dummy_src, SUBSTITUTION_QV_BITZISE, 0, "consensus.SubstitutionQV" );
+	}
+	
+    if ( rc == 0 )
+	{
+		column_idx = col_idx[ consensus_tab_SUBSTITUTION_TAG ];
+		if ( tab->SubstitutionTag.extents != NULL )
+			rc = transfer_bits( cursor, column_idx,
+				&tab->SubstitutionTag, buffer, spot->offset, spot->NumEvent,
+				SUBSTITUTION_TAG_BITSIZE, "consensus.SubstitutionTag" );
+		else
+			rc = vdb_write_value( cursor, column_idx,
+				   &dummy_src, SUBSTITUTION_TAG_BITSIZE, 0, "consensus.SubstitutionTag" );
+	}
+	
+    if ( buffer != NULL )
+        free( buffer );
+    return rc;
+}
+
+
+static rc_t consensus_load_spot( VCursor *cursor, const uint32_t *col_idx,
+                                 region_type_mapping *mapping, zmw_row * spot, 
+                                 void * data )
+{
+	rc_t rc = 0;
+	if ( spot->NumEvent > 0 )
+	{
+		BaseCalls_cmn *tab = (BaseCalls_cmn *)data;
+		rc = VCursorOpenRow( cursor );
+		if ( rc != 0 )
+			PLOGERR( klogErr, ( klogErr, rc, "cannot open consensus-row on spot# $(spotnr)",
+								"spotnr=%u", spot->spot_nr ) );
+
+		if ( rc == 0 )
+			rc = vdb_write_uint32( cursor, col_idx[ consensus_tab_HOLE_NUMBER ],
+								   spot->HoleNumber, "consensus.HOLE_NUMBER" );
+		if ( rc == 0 )
+			rc = vdb_write_uint8( cursor, col_idx[ consensus_tab_HOLE_STATUS ],
+								  spot->HoleStatus, "consensus.HOLE_STATUS" );
+		if ( rc == 0 )
+			rc = vdb_write_value( cursor, col_idx[ consensus_tab_HOLE_XY ],
+								  &spot->HoleXY, HOLE_XY_BITSIZE, 2, "consensus.HOLE_XY" );
+
+		/* has to be read ... from "PulseData/ConsensusBaesCalls/Passes/NumPasses" */
+		if ( rc == 0 )
+			rc = vdb_write_uint32( cursor, col_idx[ consensus_tab_NUM_PASSES ],
+								   spot->NumPasses, "consensus.NUM_PASSES" );
+
+		if ( rc == 0 )
+		{
+			if ( spot->NumEvent > 0 )
+				rc = consensus_load_spot_bases( cursor, tab, col_idx, spot );
+			else
+				rc = consensus_load_zero_bases( cursor, col_idx );
+		}
+
+		if ( rc == 0 )
+			rc = vdb_write_uint8( cursor, col_idx[ consensus_tab_NREADS ],
+								  1, "consensus.NREADS" );
+		if ( rc == 0 )
+			rc = vdb_write_uint32( cursor, col_idx[ consensus_tab_READ_START ],
+								   0, "consensus.READ_START" );
+		if ( rc == 0 )
+			rc = vdb_write_uint32( cursor, col_idx[ consensus_tab_READ_LEN ],
+								   spot->NumEvent, "consensus.READ_LEN" );
+		if ( rc == 0 )
+			rc = vdb_write_uint8( cursor, col_idx[ consensus_tab_READ_TYPE ],
+								  SRA_READ_TYPE_BIOLOGICAL, "consensus.READ_TYPE" );
+
+		if ( rc == 0 )
+		{
+			rc = VCursorCommitRow( cursor );
+			if ( rc != 0 )
+				PLOGERR( klogErr, ( klogErr, rc, "cannot commit consensus-row on spot# $(spotnr)",
+									"spotnr=%u", spot->spot_nr ) );
+		}
+
+		if ( rc == 0 )
+		{
+			rc = VCursorCloseRow( cursor );
+			if ( rc != 0 )
+				PLOGERR( klogErr, ( klogErr, rc, "cannot close consensus-row on spot# $(spotnr)",
+									"spotnr=%u", spot->spot_nr ) );
+
+		}
+	}
+    return rc;
+}
+
+
+static rc_t consensus_loader( ld_context *lctx, KDirectory * hdf5_src, VCursor * cursor, const char * table_name )
+{
+    uint32_t col_idx[ consensus_tab_count ];
+    rc_t rc = add_columns( cursor, consensus_tab_count, -1, col_idx, consensus_tab_names );
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen( cursor );
+        if ( rc != 0 )
+            LOGERR( klogErr, rc, "cannot open cursor on consensus-table" );
+
+        else
+        {
+            BaseCalls_cmn ConsensusTab;
+            const INSDC_SRA_platform_id platform = SRA_PLATFORM_PACBIO_SMRT;
+
+            rc = VCursorDefault ( cursor, col_idx[ consensus_tab_PLATFORM ],
+                                  sizeof platform * 8, &platform, 0, 1 );
+            if ( rc != 0 )
+                LOGERR( klogErr, rc, "cannot set cursor-default on consensus-table for platform-column" );
+            else
+            {
+                const INSDC_SRA_read_filter filter = SRA_READ_FILTER_PASS;
+                rc = VCursorDefault ( cursor, col_idx[ consensus_tab_READ_FILTER ],
+                                  sizeof filter * 8, &filter, 0, 1 );
+                if ( rc != 0 )
+                    LOGERR( klogErr, rc, "cannot set cursor-default on consensus-table for read-filter-column" );
+            }
+
+            if ( rc == 0 )
+                rc = open_BaseCalls_cmn( hdf5_src, &ConsensusTab, true,
+                                     "PulseData/ConsensusBaseCalls", lctx->cache_content, true );
+
+            if ( rc == 0 )
+            {
+                uint64_t total_bases = zmw_total( &ConsensusTab.zmw );
+                uint64_t total_spots = ConsensusTab.zmw.NumEvent.extents[ 0 ];
+
+                KLogLevel tmp_lvl = KLogLevelGet();
+                KLogLevelSet( klogInfo );
+                PLOGMSG( klogInfo, ( klogInfo,
+                         "loading consensus-table ( $(bases) bases / $(spots) spots ):",
+                         "bases=%lu,spots=%lu", total_bases, total_spots ));
+                KLogLevelSet( tmp_lvl );
+
+                if ( check_Consensus_totalcount( &ConsensusTab, total_bases ) )
+				{
+                    rc = zmw_for_each( &ConsensusTab.zmw, &lctx->xml_progress, cursor,
+                                       lctx->with_progress, col_idx, NULL,
+                                       true, consensus_load_spot, &ConsensusTab );
+				}
+                else
+				{
+                    rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+				}
+                close_BaseCalls_cmn( &ConsensusTab );
+            }
+        }
+    }
+    return rc;
+}
+
+
+/* HDF5-Groups and tables used to load the CONSENSUS-table */
+static const char * consensus_groups_to_check[] = 
+{ 
+    "PulseData",
+    "PulseData/ConsensusBaseCalls",
+    "PulseData/ConsensusBaseCalls/ZMW",
+    "PulseData/ConsensusBaseCalls/Passes",
+    NULL
+};
+
+
+static const char * consensus_tables_to_check[] = 
+{ 
+    "PulseData/ConsensusBaseCalls/Basecall",
+    "PulseData/ConsensusBaseCalls/DeletionQV",
+    "PulseData/ConsensusBaseCalls/DeletionTag",
+    "PulseData/ConsensusBaseCalls/InsertionQV",
+    "PulseData/ConsensusBaseCalls/QualityValue",
+    "PulseData/ConsensusBaseCalls/SubstitutionQV",
+    "PulseData/ConsensusBaseCalls/SubstitutionTag",
+    "PulseData/ConsensusBaseCalls/ZMW/HoleNumber",
+    "PulseData/ConsensusBaseCalls/ZMW/HoleStatus",
+    "PulseData/ConsensusBaseCalls/ZMW/HoleXY",
+    "PulseData/ConsensusBaseCalls/ZMW/NumEvent",
+    "PulseData/ConsensusBaseCalls/Passes/NumPasses",
+    NULL
+};
+
+
+static const char * consensus_schema_template = "CONSENSUS";
+static const char * consensus_table_to_create = "CONSENSUS";
+
+
+rc_t prepare_consensus( VDatabase * database, con_ctx * sctx, ld_context *lctx )
+{
+    rc_t rc = prepare_table( database, &sctx->cursor,
+            consensus_schema_template, consensus_table_to_create ); /* pl-tools.c ... this creates the cursor */
+    if ( rc == 0 )
+    {
+        rc = add_columns( sctx->cursor, consensus_tab_count, -1, sctx->col_idx, consensus_tab_names );
+        if ( rc == 0 )
+        {
+            rc = VCursorOpen( sctx->cursor );
+            if ( rc != 0 )
+            {
+                LOGERR( klogErr, rc, "cannot open cursor on consensus-table" );
+            }
+            else
+            {
+                const INSDC_SRA_platform_id platform = SRA_PLATFORM_PACBIO_SMRT;
+
+                rc = VCursorDefault ( sctx->cursor, sctx->col_idx[ consensus_tab_PLATFORM ],
+                                      sizeof platform * 8, &platform, 0, 1 );
+                if ( rc != 0 )
+                {
+                    LOGERR( klogErr, rc, "cannot set cursor-default on consensus-table for platform-column" );
+                }
+                else
+                {
+                    const INSDC_SRA_read_filter filter = SRA_READ_FILTER_PASS;
+                    rc = VCursorDefault ( sctx->cursor, sctx->col_idx[ consensus_tab_READ_FILTER ],
+                                      sizeof filter * 8, &filter, 0, 1 );
+                    if ( rc != 0 )
+                    {
+                        LOGERR( klogErr, rc, "cannot set cursor-default on consensus-table for read-filter-column" );
+                    }
+                    else
+                    {
+                        sctx->lctx = lctx;
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+rc_t load_consensus_src( con_ctx * sctx, KDirectory * hdf5_src )
+{
+    BaseCalls_cmn ConsensusTab;
+
+    rc_t rc = 0;
+    if ( sctx->lctx->check_src_obj )
+        rc = check_src_objects( hdf5_src, consensus_groups_to_check, 
+                                consensus_tables_to_check, false );
+    if ( rc == 0 )
+        rc = open_BaseCalls_cmn( hdf5_src, &ConsensusTab, true,
+                                 "PulseData/ConsensusBaseCalls", sctx->lctx->cache_content, true );
+    if ( rc == 0 )
+    {
+        uint64_t total_bases = zmw_total( &ConsensusTab.zmw );
+        uint64_t total_spots = ConsensusTab.zmw.NumEvent.extents[ 0 ];
+
+        KLogLevel tmp_lvl = KLogLevelGet();
+        KLogLevelSet( klogInfo );
+        PLOGMSG( klogInfo, ( klogInfo,
+                 "loading consensus-table ( $(bases) bases / $(spots) spots ):",
+                 "bases=%lu,spots=%lu", total_bases, total_spots ));
+        KLogLevelSet( tmp_lvl );
+
+        if ( !check_Consensus_totalcount( &ConsensusTab, total_bases ) )
+            rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+        else
+            rc = zmw_for_each( &ConsensusTab.zmw, &sctx->lctx->xml_progress, sctx->cursor,
+                               sctx->lctx->with_progress, sctx->col_idx, NULL,
+                               true, consensus_load_spot, &ConsensusTab );
+        close_BaseCalls_cmn( &ConsensusTab );
+    }
+    return rc;
+}
+
+
+rc_t finish_consensus( con_ctx * sctx )
+{
+    VCursorRelease( sctx->cursor );
+    return 0;
+}
+
+
+rc_t load_consensus( VDatabase * database, KDirectory * hdf5_src, ld_context *lctx )
+{
+    rc_t rc = 0;
+    if ( lctx->check_src_obj )
+        rc = check_src_objects( hdf5_src, consensus_groups_to_check, 
+                                consensus_tables_to_check, false );
+    if ( rc == 0 )
+        rc = load_table( database, hdf5_src, lctx, consensus_schema_template, 
+                         consensus_table_to_create, consensus_loader );
+    return rc;
+}
diff --git a/tools/pacbio-load/pl-consensus.h b/tools/pacbio-load/pl-consensus.h
new file mode 100644
index 0000000..5b38745
--- /dev/null
+++ b/tools/pacbio-load/pl-consensus.h
@@ -0,0 +1,83 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_pl_consensus_
+#define _h_pl_consensus_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "pl-tools.h"
+#include "pl-zmw.h"
+#include "pl-basecalls_cmn.h"
+#include <klib/rc.h>
+#include <insdc/sra.h>
+
+/* enumeration of the columns of the consensus-table */
+enum
+{
+    /* base-space */
+    consensus_tab_READ = 0,
+    consensus_tab_QUALITY,
+    consensus_tab_NREADS,
+    consensus_tab_READ_TYPE,
+    consensus_tab_READ_START,
+    consensus_tab_READ_LEN,
+    consensus_tab_PLATFORM,
+    consensus_tab_READ_FILTER,
+
+    /* consensus-space */
+    consensus_tab_HOLE_NUMBER,
+    consensus_tab_HOLE_STATUS,
+    consensus_tab_HOLE_XY,
+    consensus_tab_NUM_PASSES,
+    consensus_tab_INSERTION_QV,
+    consensus_tab_DELETION_QV,
+    consensus_tab_DELETION_TAG,
+    consensus_tab_SUBSTITUTION_QV,
+    consensus_tab_SUBSTITUTION_TAG,
+    consensus_tab_count
+};
+
+
+typedef struct con_ctx
+{
+    VCursor * cursor;
+    ld_context *lctx;
+    uint32_t col_idx[ consensus_tab_count ];
+} con_ctx;
+
+rc_t prepare_consensus( VDatabase * database, con_ctx * sctx, ld_context *lctx );
+rc_t load_consensus_src( con_ctx * sctx, KDirectory * hdf5_src );
+rc_t finish_consensus( con_ctx * sctx );
+
+rc_t load_consensus( VDatabase * database, KDirectory * hdf5_src, ld_context *lctx );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/pacbio-load/pl-context.c b/tools/pacbio-load/pl-context.c
new file mode 100644
index 0000000..431b909
--- /dev/null
+++ b/tools/pacbio-load/pl-context.c
@@ -0,0 +1,211 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "pl-context.h"
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+
+static char * ctx_set_str( const char *src, const char *dflt )
+{
+    char * res = NULL;
+    if ( src != NULL && src[0] != 0 )
+        res = string_dup_measure ( src, NULL );
+    else if ( dflt != NULL && dflt[0] != 0 )
+        res = string_dup_measure ( dflt, NULL );
+    return res;
+}
+
+
+static rc_t ctx_get_params( const Args * args, context *ctx )
+{
+    uint32_t idx, count;
+    rc_t rc = ArgsParamCount( args, &count );
+    if ( rc != 0 )
+        LOGERR( klogErr, rc, "ArgsParamCount failed" );
+    else
+    {
+        if ( count < 1 )
+        {
+            rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+            LOGERR( klogErr, rc, "hdf5-source-file missing" );
+            Usage ( args );
+        }
+        else for ( idx = 0; idx < count; ++idx )
+        {
+            const char *parameter = NULL;
+            rc = ArgsParamValue( args, idx, (const void **)&parameter );
+            if ( rc != 0 )
+                LOGERR( klogErr, rc, "error reading commandline-parameter" );
+            else
+                rc = VNamelistAppend ( ctx->src_paths, parameter );
+        }
+    }
+    return rc;
+}
+
+
+static bool ctx_get_bool( const Args *args, const char *name, const bool def )
+{
+    uint32_t count = 0;
+    if ( ArgsOptionCount( args, name, &count ) == 0 )
+        return ( count > 0 );
+    else
+        return def;
+}
+
+
+static const char* ctx_get_str( const Args *args, const char *name, const char *def )
+{
+    const char * res = def;
+    uint32_t count = 0;
+    if ( ArgsOptionCount( args, name, &count ) == 0 && count > 0 )
+    {
+        if ( ArgsOptionValue( args, name, 0, (const void **)&res ) != 0 )
+            res = def;
+    }
+    return res;
+}
+
+
+void ctx_free( context *ctx )
+{
+    if ( ctx->dst_path != NULL )
+        free( ctx->dst_path );
+    if ( ctx->schema_name != NULL )
+        free( ctx->schema_name );
+    if ( ctx->tabs != NULL )
+        free( ctx->tabs );
+    VNamelistRelease ( ctx->src_paths );
+}
+
+
+rc_t ctx_init( const Args * args, context *ctx )
+{
+    rc_t rc;
+
+    ctx->dst_path = NULL;
+    ctx->schema_name = NULL;
+    ctx->tabs = NULL;
+    ctx->force = false;
+    ctx->with_progress = false;
+
+    rc = VNamelistMake ( &ctx->src_paths, 5 );
+    if ( rc == 0 )
+    {
+        rc = ctx_get_params( args, ctx );
+        if ( rc == 0 )
+        {
+            ctx->force = ctx_get_bool( args, OPTION_FORCE, false );
+            ctx->with_progress = ctx_get_bool( args, OPTION_WITH_PROGRESS, false );
+            ctx->schema_name = ctx_set_str( ctx_get_str( args, OPTION_SCHEMA, DFLT_SCHEMA ), DFLT_SCHEMA );
+            ctx->dst_path = ctx_set_str( ctx_get_str( args, OPTION_OUTPUT, NULL ), NULL );
+            ctx->tabs = ctx_set_str( ctx_get_str( args, OPTION_TABS, NULL ), NULL );
+        }
+        if ( rc == 0 )
+        {
+            if ( ctx->dst_path == NULL )
+            {
+                rc = RC( rcExe, rcArgv, rcReading, rcParam, rcInvalid );
+                LOGMSG( klogErr, "vdb-output-directory missing!" );
+            }
+        }
+    }
+    if ( rc != 0 )
+        ctx_free( ctx );
+    return rc;
+}
+
+
+rc_t ctx_show( context * ctx )
+{
+    rc_t rc;
+    uint32_t idx, count;
+
+    KLogLevel tmp_lvl = KLogLevelGet();
+    KLogLevelSet( klogInfo );
+
+    LOGMSG( klogInfo, "pacbio-load:" );
+
+    rc = VNameListCount ( ctx->src_paths, &count );
+    if ( rc == 0 && count > 0 )
+    {
+        for ( idx = 0; idx < count && rc == 0; ++idx )
+        {
+            const char * name = NULL;
+            rc = VNameListGet ( ctx->src_paths, idx, &name );
+            if ( rc == 0 && name != NULL )
+                PLOGMSG( klogInfo, ( klogInfo, "   from    : '$(SRC)'", "SRC=%s", name ));
+        }
+    }
+
+    PLOGMSG( klogInfo, ( klogInfo, "   into    : '$(SRC)'", "SRC=%s", ctx->dst_path ));
+    PLOGMSG( klogInfo, ( klogInfo, "   schema  : '$(SRC)'", "SRC=%s", ctx->schema_name ));
+    if ( ctx->force )
+        LOGMSG( klogInfo, "   force   : 'yes'" );
+    else
+        LOGMSG( klogInfo, "   force   : 'no'" );
+    if ( ctx->tabs != NULL )
+        PLOGMSG( klogInfo, ( klogInfo, "   tabs    : '$(SRC)'", "SRC=%s", ctx->tabs ));
+
+    KLogLevelSet( tmp_lvl );
+    return rc;
+}
+
+
+static bool ctx_ld_module( context * ctx, const char c )
+{
+    if ( ctx->tabs == NULL )
+        return true;
+    else
+        return ( strchr( ctx->tabs, c ) != NULL );
+}
+
+
+bool ctx_ld_sequence( context * ctx )
+{
+    return ctx_ld_module( ctx, 'S' );
+}
+
+
+bool ctx_ld_consensus( context * ctx )
+{
+    return ctx_ld_module( ctx, 'C' );
+}
+
+
+bool ctx_ld_passes( context * ctx )
+{
+    return ctx_ld_module( ctx, 'P' );
+}
+
+
+bool ctx_ld_metrics( context * ctx )
+{
+    return ctx_ld_module( ctx, 'M' );
+}
diff --git a/tools/pacbio-load/pl-context.h b/tools/pacbio-load/pl-context.h
new file mode 100644
index 0000000..abca8de
--- /dev/null
+++ b/tools/pacbio-load/pl-context.h
@@ -0,0 +1,87 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_pl_context_
+#define _h_pl_context_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <klib/out.h>
+#include <klib/rc.h>
+#include <klib/text.h>
+#include <klib/log.h>
+#include <klib/namelist.h>
+
+#include <kapp/args.h>
+
+
+#define OPTION_SCHEMA       "schema"
+#define OPTION_FORCE        "force"
+#define OPTION_TABS         "tabs"
+#define OPTION_WITH_PROGRESS  "with_progressbar"
+#define OPTION_OUTPUT       "output"
+
+#define ALIAS_SCHEMA        "S"
+#define ALIAS_FORCE         "f"
+#define ALIAS_TABS          "t"
+#define ALIAS_WITH_PROGRESS "p"
+#define ALIAS_OUTPUT        "o"
+
+#define DFLT_SCHEMA         "sra/pacbio.vschema"
+#define PACBIO_SCHEMA_DB    "NCBI:SRA:PacBio:smrt:db"
+
+
+/* *******************************************************************
+the parameter-context contains all informations needed to load
+******************************************************************* */
+typedef struct context
+{
+    char *dst_path;     /* the vdb-database-path to create */
+    char *schema_name;  /* name of a schema-file to use", if different from std */
+    char *tabs;         /* load only these tabs... */
+    VNamelist * src_paths;  /* list of source-paths */
+    bool force;         /* if true", overwrite eventually existing output-db */
+    bool with_progress; /* if true", use the pl_progressbar */
+} context;
+
+
+rc_t ctx_init( const Args * args, context *ctx );
+void ctx_free( context *ctx );
+
+rc_t ctx_show( context * ctx );
+bool ctx_ld_sequence( context * ctx );
+bool ctx_ld_consensus( context * ctx );
+bool ctx_ld_passes( context * ctx );
+bool ctx_ld_metrics( context * ctx );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/pacbio-load/pl-metrics.c b/tools/pacbio-load/pl-metrics.c
new file mode 100644
index 0000000..30d70ac
--- /dev/null
+++ b/tools/pacbio-load/pl-metrics.c
@@ -0,0 +1,779 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "pl-metrics.h"
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+const char * metrics_tab_names[] = 
+{ 
+    "BASE_FRACTION",
+    "BASE_IPD",
+    "BASE_RATE",
+    "BASE_WIDTH",
+    "CHAN_BASE_QV",
+    "CHAN_DEL_QV",
+    "CHAN_INS_QV",
+    "CHAN_SUB_QV",
+    "LOCAL_BASE_RATE",
+    "DARK_BASE_RATE",
+    "HQ_RGN_START_TIME",
+    "HQ_RGN_END_TIME",
+    "HQ_RGN_SNR",
+    "PRODUCTIVITY",
+    "READ_SCORE",
+    "READ_BASE_QV",
+    "READ_DEL_QV",
+    "READ_INS_QV",
+    "READ_SUB_QV"
+};
+
+
+typedef struct Metrics_src
+{
+    af_data BaseFraction;
+    af_data BaseIpd;
+    af_data BaseRate;
+    af_data BaseWidth;
+    af_data CmBasQV;
+    af_data CmDelQV;
+    af_data CmInsQV;
+    af_data CmSubQV;
+    af_data LocalBaseRate;
+    af_data DarkBaseRate;
+    af_data HQRegionStartTime;
+    af_data HQRegionEndTime;
+    af_data HQRegionSNR;
+    af_data Productivity;
+    af_data ReadScore;
+    af_data RmBasQV;
+    af_data RmDelQV;
+    af_data RmInsQV;
+    af_data RmSubQV;
+} Metrics_src;
+
+
+static void init_Metrics_src( Metrics_src *tab )
+{
+    init_array_file( &tab->BaseFraction );
+    init_array_file( &tab->BaseIpd );
+    init_array_file( &tab->BaseRate );
+    init_array_file( &tab->BaseWidth );
+    init_array_file( &tab->CmBasQV );
+    init_array_file( &tab->CmDelQV );
+    init_array_file( &tab->CmInsQV );
+    init_array_file( &tab->CmSubQV );
+    init_array_file( &tab->LocalBaseRate );
+    init_array_file( &tab->DarkBaseRate );
+    init_array_file( &tab->HQRegionStartTime );
+    init_array_file( &tab->HQRegionEndTime );
+    init_array_file( &tab->HQRegionSNR );
+    init_array_file( &tab->Productivity );
+    init_array_file( &tab->ReadScore );
+    init_array_file( &tab->RmBasQV );
+    init_array_file( &tab->RmDelQV );
+    init_array_file( &tab->RmInsQV );
+    init_array_file( &tab->RmSubQV );
+}
+
+
+static void close_Metrics_src( Metrics_src *tab )
+{
+    free_array_file( &tab->BaseFraction );
+    free_array_file( &tab->BaseIpd );
+    free_array_file( &tab->BaseRate );
+    free_array_file( &tab->BaseWidth );
+    free_array_file( &tab->CmBasQV );
+    free_array_file( &tab->CmDelQV );
+    free_array_file( &tab->CmInsQV );
+    free_array_file( &tab->CmSubQV );
+    free_array_file( &tab->LocalBaseRate );
+    free_array_file( &tab->DarkBaseRate );
+    free_array_file( &tab->HQRegionStartTime );
+    free_array_file( &tab->HQRegionEndTime );
+    free_array_file( &tab->HQRegionSNR );
+    free_array_file( &tab->Productivity );
+    free_array_file( &tab->ReadScore );
+    free_array_file( &tab->RmBasQV );
+    free_array_file( &tab->RmDelQV );
+    free_array_file( &tab->RmInsQV );
+    free_array_file( &tab->RmSubQV );
+}
+
+
+static rc_t open_Metrics_src( const KDirectory *hdf5_dir, Metrics_src *tab,
+                              const char * path, bool cache_content )
+{
+    rc_t rc, rc_none;
+    init_Metrics_src( tab );
+
+    rc = open_element( hdf5_dir, &tab->BaseFraction, path, "BaseFraction", 
+                  BASE_FRACTION_BITSIZE, BASE_FRACTION_COLS,
+                  true, cache_content, false );
+
+    /* it is ok if BaseIpd is missing !!! */
+    if ( rc == 0 )
+    {
+        rc_none = open_element( hdf5_dir, &tab->BaseIpd, path, "BaseIpd", 
+                    BASE_IPD_BITSIZE, BASE_IPD_COLS,
+                    true, cache_content, true );
+        if ( rc_none != 0 )
+        {
+            print_log_info( "metrics -> BaseIpd is missing" );
+        }
+    }
+
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->BaseRate, path, "BaseRate", 
+                  BASE_RATE_BITSIZE, BASE_RATE_COLS,
+                  true, cache_content, false );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->BaseWidth, path, "BaseWidth", 
+                  BASE_WIDTH_BITSIZE, BASE_WIDTH_COLS,
+                  true, cache_content, false );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->CmBasQV, path, "CmBasQv", 
+                  CM_BAS_QV_BITSIZE, CM_BAS_QV_COLS,
+                  true, cache_content, false );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->CmDelQV, path, "CmDelQv",
+                  CM_DEL_QV_BITSIZE, CM_DEL_QV_COLS,
+                  true, cache_content, false );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->CmInsQV, path, "CmInsQv",
+                  CM_INS_QV_BITSIZE, CM_INS_QV_COLS,
+                  true, cache_content, false );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->CmSubQV, path, "CmSubQv",
+                  CM_SUB_QV_BITSIZE, CM_SUB_QV_COLS,
+                  true, cache_content, false );
+
+    if ( rc == 0 )
+    {
+        /* it is ok if LocalBaseRate is missing !!! */
+        rc_none = open_element( hdf5_dir, &tab->LocalBaseRate, path, "LocalBaseRate",
+                  LOCAL_BASE_RATE_BITSIZE, LOCAL_BASE_RATE_COLS,
+                  true, cache_content, true );
+        if ( rc_none != 0 )
+        {
+            print_log_info( "metrics -> LocalBaseRate is missing" );
+        }
+
+        /* it is ok if DarkBaseRate is missing !!! */
+        rc_none = open_element( hdf5_dir, &tab->DarkBaseRate, path, "DarkBaseRate",
+                      DARK_BASE_RATE_BITSIZE, DARK_BASE_RATE_COLS,
+                      true, cache_content, true );
+        if ( rc_none != 0 )
+        {
+            print_log_info( "metrics -> DarkBaseRate is missing" );
+        }
+
+        /* it is ok if HQRegionStartTime is missing !!! */
+        rc_none = open_element( hdf5_dir, &tab->HQRegionStartTime, path, "HQRegionStartTime",
+                      HQ_REGION_START_TIME_BITSIZE, HQ_REGION_START_TIME_COLS,
+                      true, cache_content, true );
+        if ( rc_none != 0 )
+        {
+            print_log_info( "metrics -> HQRegionStartTime is missing" );
+        }
+
+        /* it is ok if HQRegionEndTime is missing !!! */
+        rc_none = open_element( hdf5_dir, &tab->HQRegionEndTime, path, "HQRegionEndTime",
+                      HQ_REGION_END_TIME_BITSIZE, HQ_REGION_END_TIME_COLS,
+                      true, cache_content, true );
+        if ( rc_none != 0 )
+        {
+            print_log_info( "metrics -> HQRegionEndTime is missing" );
+        }
+
+        /* it is ok of HQRegionSNR is missing !!! ( discovered 12/16/2011 )*/
+        rc_none = open_element( hdf5_dir, &tab->HQRegionSNR, path, "HQRegionSNR",
+                    HQ_REGION_SNR_BITSIZE, HQ_REGION_SNR_COLS,
+                    true, cache_content, true );
+        if ( rc_none != 0 )
+        {
+            print_log_info( "metrics -> HQRegionSNR is missing" );
+        }
+    }
+
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->Productivity, path, "Productivity",
+                  PRODUCTIVITY_BITSIZE, PRODUCTIVITY_COLS,
+                  true, cache_content, false );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->ReadScore, path, "ReadScore",
+                  READ_SCORE_BITSIZE, READ_SCORE_COLS,
+                  true, cache_content, false );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->RmBasQV, path, "RmBasQv", 
+                  RM_BAS_QV_BITSIZE, RM_BAS_QV_COLS,
+                  true, cache_content, false );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->RmDelQV, path, "RmDelQv",
+                  RM_DEL_QV_BITSIZE, RM_DEL_QV_COLS,
+                  true, cache_content, false );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->RmInsQV, path, "RmInsQv",
+                  RM_INS_QV_BITSIZE, RM_INS_QV_COLS,
+                  true, cache_content, false );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->RmSubQV, path, "RmSubQv",
+                  RM_SUB_QV_BITSIZE, RM_SUB_QV_COLS,
+                  true, cache_content, false );
+    if ( rc != 0 )
+        close_Metrics_src( tab );
+    return rc;
+}
+
+
+static bool check_Metrics_ext( af_data *af, bool *needed, uint64_t *expected,
+                               const char * s )
+{
+    bool res = true;
+
+    if ( *needed )
+    {
+        *expected = af->extents[ 0 ];
+        *needed = false;
+    }
+    else
+        res = check_table_count( af, s, *expected );
+    return res;
+}
+
+static bool check_Metrics_extents( Metrics_src *tab )
+{
+    bool res = true;
+    bool needed = true;
+    uint64_t expected = 0;
+
+    if ( tab->BaseFraction.rc == 0 && res )
+        res = check_Metrics_ext( &tab->BaseFraction, &needed, &expected, "BaseFraction" );
+
+    if ( tab->BaseIpd.rc == 0 && res )
+        res = check_Metrics_ext( &tab->BaseIpd, &needed, &expected, "BaseIpd" );
+
+    if ( tab->BaseRate.rc == 0 && res )
+        res = check_Metrics_ext( &tab->BaseRate, &needed, &expected, "BaseRate" );
+
+    if ( tab->BaseWidth.rc == 0 && res )
+        res = check_Metrics_ext( &tab->BaseWidth, &needed, &expected, "BaseWidth" );
+
+    if ( tab->CmBasQV.rc == 0 && res )
+        res = check_Metrics_ext( &tab->CmBasQV, &needed, &expected, "CmBasQV" );
+
+    if ( tab->CmDelQV.rc == 0 && res )
+        res = check_Metrics_ext( &tab->CmDelQV, &needed, &expected, "CmDelQV" );
+
+    if ( tab->CmInsQV.rc == 0 && res )
+        res = check_Metrics_ext( &tab->CmInsQV, &needed, &expected, "CmInsQV" );
+
+    if ( tab->CmSubQV.rc == 0 && res )
+        res = check_Metrics_ext( &tab->CmSubQV, &needed, &expected, "CmSubQV" );
+
+    if ( tab->LocalBaseRate.rc == 0 && res )
+        res = check_Metrics_ext( &tab->LocalBaseRate, &needed, &expected, "LocalBaseRate" );
+
+    if ( tab->DarkBaseRate.rc == 0 && res )
+        res = check_Metrics_ext( &tab->DarkBaseRate, &needed, &expected, "DarkBaseRate" );
+
+    if ( tab->HQRegionStartTime.rc == 0 && res )
+        res = check_Metrics_ext( &tab->HQRegionStartTime, &needed, &expected, "HQRegionStartTime" );
+
+    if ( tab->HQRegionEndTime.rc == 0 && res )
+        res = check_Metrics_ext( &tab->HQRegionEndTime, &needed, &expected, "HQRegionEndTime" );
+
+    if ( tab->HQRegionSNR.rc == 0 && res )
+        res = check_Metrics_ext( &tab->HQRegionSNR, &needed, &expected, "HQRegionSNR" );
+
+    if ( tab->Productivity.rc == 0 && res )
+        res = check_Metrics_ext( &tab->Productivity, &needed, &expected, "Productivity" );
+
+    if ( tab->ReadScore.rc == 0 && res )
+        res = check_Metrics_ext( &tab->ReadScore, &needed, &expected, "ReadScore" );
+
+    if ( tab->RmBasQV.rc == 0 && res )
+        res = check_Metrics_ext( &tab->RmBasQV, &needed, &expected, "RmBasQV" );
+
+    if ( tab->RmDelQV.rc == 0 && res )
+        res = check_Metrics_ext( &tab->RmDelQV, &needed, &expected, "RmDelQV" );
+
+    if ( tab->RmInsQV.rc == 0 && res )
+        res = check_Metrics_ext( &tab->RmInsQV, &needed, &expected, "RmInsQV" );
+
+    if ( tab->RmSubQV.rc == 0 && res )
+        res = check_Metrics_ext( &tab->RmSubQV, &needed, &expected, "RmSubQV" );
+
+    return res;
+}
+
+
+#define METRICS_BLOCK_SIZE 1024
+
+typedef struct metrics_block
+{
+    float   BaseFraction[ METRICS_BLOCK_SIZE ][4];
+    float   BaseIpd[ METRICS_BLOCK_SIZE ];
+    float   BaseRate[ METRICS_BLOCK_SIZE ];
+    float   BaseWidth[ METRICS_BLOCK_SIZE ];
+    float   CmBasQV[ METRICS_BLOCK_SIZE ][4];
+    float   CmDelQV[ METRICS_BLOCK_SIZE ][4];
+    float   CmInsQV[ METRICS_BLOCK_SIZE ][4];
+    float   CmSubQV[ METRICS_BLOCK_SIZE ][4];
+    float   LocalBaseRate[ METRICS_BLOCK_SIZE ];
+    float   DarkBaseRate[ METRICS_BLOCK_SIZE ];
+    float   HQRegionStartTime[ METRICS_BLOCK_SIZE ];
+    float   HQRegionEndTime[ METRICS_BLOCK_SIZE ];
+    float   HQRegionSNR[ METRICS_BLOCK_SIZE ][4];
+    uint8_t Productivity[ METRICS_BLOCK_SIZE ];
+    float   ReadScore[ METRICS_BLOCK_SIZE ];
+    float   RmBasQV[ METRICS_BLOCK_SIZE ];
+    float   RmDelQV[ METRICS_BLOCK_SIZE ];
+    float   RmInsQV[ METRICS_BLOCK_SIZE ];
+    float   RmSubQV[ METRICS_BLOCK_SIZE ];
+    uint64_t n_read;
+} metrics_block;
+
+
+
+static rc_t metrics_block_read_from_src( Metrics_src *tab,
+                                      const uint64_t total_rows,
+                                      const uint64_t pos,
+                                      metrics_block * block )
+{
+    rc_t rc = 0 ;
+    uint64_t to_read = METRICS_BLOCK_SIZE;
+    uint64_t read;
+
+    block->n_read = 0;
+    if ( ( pos + to_read ) >= total_rows )
+        to_read = ( total_rows - pos );
+
+    if ( tab->BaseFraction.rc == 0 )
+        rc = array_file_read_dim2( &tab->BaseFraction, pos, 
+                                   &block->BaseFraction[0][0],
+                                   to_read, 4, &read );
+    else
+        memset( &block->BaseFraction[0][0], 0, to_read * 4 * sizeof( float ) );
+
+    if ( rc == 0 && tab->BaseIpd.rc == 0 )
+        rc = array_file_read_dim1( &tab->BaseIpd, pos, 
+                                   &block->BaseIpd[0],
+                                   to_read, &read );
+    else
+        memset( &block->BaseIpd[0], 0, to_read * sizeof( float ) );
+
+    if ( rc == 0 && tab->BaseRate.rc == 0 )
+        rc = array_file_read_dim1( &tab->BaseRate, pos, 
+                                   &block->BaseRate[0],
+                                   to_read, &read );
+    else
+        memset( &block->BaseRate[0], 0, to_read * sizeof( float ) );
+
+    if ( rc == 0 && tab->BaseWidth.rc == 0 )
+        rc = array_file_read_dim1( &tab->BaseWidth, pos, 
+                                   &block->BaseWidth[0],
+                                   to_read, &read );
+    else
+        memset( &block->BaseWidth[0], 0, to_read * sizeof( float ) );
+
+    if ( rc == 0 && tab->CmBasQV.rc == 0 )
+        rc = array_file_read_dim2( &tab->CmBasQV, pos, 
+                                   &block->CmBasQV[0][0],
+                                   to_read, 4, &read );
+    else
+        memset( &block->CmBasQV[0][0], 0, to_read * 4 * sizeof( float ) );
+
+    if ( rc == 0 && tab->CmDelQV.rc == 0 )
+        rc = array_file_read_dim2( &tab->CmDelQV, pos, 
+                                   &block->CmDelQV[0][0],
+                                   to_read, 4, &read );
+    else
+        memset( &block->CmDelQV[0][0], 0, to_read * 4 * sizeof( float ) );
+
+    if ( rc == 0 && tab->CmInsQV.rc == 0 )
+        rc = array_file_read_dim2( &tab->CmInsQV, pos, 
+                                   &block->CmInsQV[0][0],
+                                   to_read, 4, &read );
+    else
+        memset( &block->CmInsQV[0][0], 0, to_read * 4 * sizeof( float ) );
+
+    if ( rc == 0 && tab->CmSubQV.rc == 0 )
+        rc = array_file_read_dim2( &tab->CmSubQV, pos, 
+                                   &block->CmSubQV[0][0],
+                                   to_read, 4, &read );
+    else
+        memset( &block->CmSubQV[0][0], 0, to_read * 4 * sizeof( float ) );
+
+    if ( rc == 0 && tab->LocalBaseRate.rc == 0 )
+        rc = array_file_read_dim1( &tab->LocalBaseRate, pos, 
+                                   &block->LocalBaseRate[0],
+                                   to_read, &read );
+    else
+        memset( &block->LocalBaseRate[0], 0, to_read * sizeof( float ) );
+
+    if ( rc == 0 && tab->DarkBaseRate.rc == 0 )
+        rc = array_file_read_dim1( &tab->DarkBaseRate, pos, 
+                                   &block->DarkBaseRate[0],
+                                   to_read, &read );
+    else
+        memset( &block->DarkBaseRate[0], 0, to_read * sizeof( float ) );
+
+    if ( rc == 0 && tab->HQRegionStartTime.rc == 0 )
+        rc = array_file_read_dim1( &tab->HQRegionStartTime, pos, 
+                                   &block->HQRegionStartTime[0],
+                                   to_read, &read );
+    else
+        memset( &block->HQRegionStartTime[0], 0, to_read * sizeof( float ) );
+
+    if ( rc == 0 && tab->HQRegionEndTime.rc == 0 )
+        rc = array_file_read_dim1( &tab->HQRegionEndTime, pos, 
+                                   &block->HQRegionEndTime[0],
+                                   to_read, &read );
+    else
+        memset( &block->HQRegionEndTime[0], 0, to_read * sizeof( float ) );
+
+    if ( rc == 0 && tab->HQRegionSNR.rc == 0 )
+        rc = array_file_read_dim2( &tab->HQRegionSNR, pos, 
+                                   &block->HQRegionSNR[0][0],
+                                   to_read, 4, &read );
+    else
+        memset( &block->HQRegionSNR[0], 0, to_read * 4 * sizeof( float ) );
+
+    if ( rc == 0 && tab->Productivity.rc == 0 )
+        rc = array_file_read_dim1( &tab->Productivity, pos, 
+                                   &block->Productivity[0],
+                                   to_read, &read );
+    else
+        memset( &block->Productivity[0], 0, to_read * sizeof( uint8_t ) );
+
+    if ( rc == 0 && tab->ReadScore.rc == 0 )
+        rc = array_file_read_dim1( &tab->ReadScore, pos, 
+                                   &block->ReadScore[0],
+                                   to_read, &read );
+    else
+        memset( &block->ReadScore[0], 0, to_read * sizeof( float ) );
+
+    if ( rc == 0 && tab->RmBasQV.rc == 0 )
+        rc = array_file_read_dim1( &tab->RmBasQV, pos, 
+                                   &block->RmBasQV[0],
+                                   to_read, &read );
+    else
+        memset( &block->RmBasQV[0], 0, to_read * sizeof( float ) );
+
+    if ( rc == 0 && tab->RmDelQV.rc == 0 )
+        rc = array_file_read_dim1( &tab->RmDelQV, pos, 
+                                   &block->RmDelQV[0],
+                                   to_read, &read );
+    else
+        memset( &block->RmDelQV[0], 0, to_read * sizeof( float ) );
+
+    if ( rc == 0 && tab->RmInsQV.rc == 0 )
+        rc = array_file_read_dim1( &tab->RmInsQV, pos, 
+                                   &block->RmInsQV[0],
+                                   to_read, &read );
+    else
+        memset( &block->RmInsQV[0], 0, to_read * sizeof( float ) );
+
+    if ( rc == 0 && tab->RmSubQV.rc == 0 )
+        rc = array_file_read_dim1( &tab->RmSubQV, pos, 
+                                   &block->RmSubQV[0],
+                                   to_read, &read );
+    else
+        memset( &block->RmSubQV[0], 0, to_read * sizeof( float ) );
+
+    if ( rc == 0 )
+        block->n_read = read;
+    return rc;
+}
+
+
+static rc_t metrics_load( VCursor *cursor, metrics_block *block,
+                          const uint32_t idx, uint32_t *col_idx )
+{
+    rc_t rc = VCursorOpenRow( cursor );
+    if ( rc != 0 )
+        LOGERR( klogErr, rc, "cannot open metrics-row" );
+
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ metrics_tab_BASE_FRACTION ],
+                              &block->BaseFraction[idx][0], 32, 4, 
+                              "metrics.BaseFraction" );
+    if ( rc == 0 )
+        rc = vdb_write_float32( cursor, col_idx[ metrics_tab_BASE_IPD ],
+                                block->BaseIpd[idx], "metrics.BaseIpd" );
+    if ( rc == 0 )
+        rc = vdb_write_float32( cursor, col_idx[ metrics_tab_BASE_RATE ],
+                                block->BaseRate[idx], "metrics.BaseRate" );
+    if ( rc == 0 )
+        rc = vdb_write_float32( cursor, col_idx[ metrics_tab_BASE_WIDTH ],
+                                block->BaseWidth[idx], "metrics.BaseWidth" );
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ metrics_tab_CHAN_BASE_QV ],
+                              &block->CmBasQV[idx][0], CM_BAS_QV_BITSIZE, 4, 
+                              "metrics.CmBasQv" );
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ metrics_tab_CHAN_DEL_QV ],
+                              &block->CmDelQV[idx][0], CM_DEL_QV_BITSIZE, 4, 
+                              "metrics.CmDelQv" );
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ metrics_tab_CHAN_INS_QV ],
+                              &block->CmInsQV[idx][0], CM_INS_QV_BITSIZE, 4, 
+                              "metrics.CmInsQv" );
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ metrics_tab_CHAN_SUB_QV ],
+                              &block->CmSubQV[idx][0], CM_SUB_QV_BITSIZE, 4, 
+                              "metrics.CmSubQv" );
+    if ( rc == 0 )
+        rc = vdb_write_float32( cursor, col_idx[ metrics_tab_LOCAL_BASE_RATE ],
+                                block->LocalBaseRate[idx],
+                                "metrics.LocalBaseRate" );
+    if ( rc == 0 )
+        rc = vdb_write_float32( cursor, col_idx[ metrics_tab_DARK_BASE_RATE ],
+                                block->DarkBaseRate[idx],
+                                "metrics.DarkBaseRate" );
+    if ( rc == 0 )
+        rc = vdb_write_float32( cursor, col_idx[ metrics_tab_HQ_RGN_START_TIME ],
+                                block->HQRegionStartTime[idx], 
+                                "metrics.HQRegionStartTime" );
+    if ( rc == 0 )
+        rc = vdb_write_float32( cursor, col_idx[ metrics_tab_HQ_RGN_END_TIME ],
+                                block->HQRegionEndTime[idx], 
+                                "metrics.HQRegionEndTime" );
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ metrics_tab_HQ_RGN_SNR ],
+                              &block->HQRegionSNR[idx][0], HQ_REGION_SNR_BITSIZE, 4, 
+                              "metrics.HQRegionSNR" );
+    if ( rc == 0 )
+        rc = vdb_write_uint8( cursor, col_idx[ metrics_tab_PRODUCTIVITY ],
+                              block->Productivity[idx], 
+                              "metrics.Productivity" );
+    if ( rc == 0 )
+        rc = vdb_write_float32( cursor, col_idx[ metrics_tab_READ_SCORE ],
+                                block->ReadScore[idx], 
+                                "metrics.ReadScore" );
+    if ( rc == 0 )
+        rc = vdb_write_float32( cursor, col_idx[ metrics_tab_READ_BASE_QV ],
+                                block->RmBasQV[idx], 
+                                "metrics.RmBasQV" );
+    if ( rc == 0 )
+        rc = vdb_write_float32( cursor, col_idx[ metrics_tab_READ_DEL_QV ],
+                                block->RmDelQV[idx], 
+                                "metrics.RmDelQV" );
+    if ( rc == 0 )
+        rc = vdb_write_float32( cursor, col_idx[ metrics_tab_READ_INS_QV ],
+                                block->RmInsQV[idx], 
+                                "metrics.RmInsQV" );
+    if ( rc == 0 )
+        rc = vdb_write_float32( cursor, col_idx[ metrics_tab_READ_SUB_QV ],
+                                block->RmSubQV[idx], 
+                                "metrics.RmSubQV" );
+
+    if ( rc == 0 )
+    {
+        rc = VCursorCommitRow( cursor );
+        if ( rc != 0 )
+            LOGERR( klogErr, rc, "cannot commit metrics-row" );
+    }
+    if ( rc == 0 )
+    {
+        rc = VCursorCloseRow( cursor );
+        if ( rc != 0 )
+            LOGERR( klogErr, rc, "cannot close metrics-row" );
+    }
+
+    return rc;
+}
+
+
+static rc_t metrics_load_loop( ld_context *lctx, VCursor * cursor, Metrics_src *tab,
+                               uint32_t *col_idx )
+{
+    rc_t rc = 0;
+    KLogLevel tmp_lvl;
+    metrics_block block;
+    pl_progress *progress;
+    uint64_t pos = 0;
+    uint64_t total_rows = tab->BaseFraction.extents[0];
+
+    pl_progress_make( &progress, total_rows );
+    rc = progress_chunk( &lctx->xml_progress, total_rows );
+
+    tmp_lvl = KLogLevelGet();
+    KLogLevelSet( klogInfo );
+    PLOGMSG( klogInfo, ( klogInfo,
+                         "loading metrics-table ( $(rows) rows ) :",
+                         "rows=%lu", total_rows   ));
+    KLogLevelSet( tmp_lvl );
+
+    while( pos < total_rows && rc == 0 )
+    {
+        rc = metrics_block_read_from_src( tab, total_rows, pos, &block );
+        if ( rc == 0 )
+        {
+            uint32_t i;
+            for ( i = 0; i < block.n_read && rc == 0; ++i )
+            {
+                rc = Quitting();
+                if ( rc == 0 )
+                {
+                    /* to be replaced with progressbar action... */
+                    rc = metrics_load( cursor, &block, i, col_idx );
+                    if ( rc == 0 )
+                    {
+                        rc = progress_step( lctx->xml_progress );
+                        if ( lctx->with_progress )
+                            pl_progress_increment( progress, 1 );
+                    }
+                }
+                else
+                    LOGERR( klogErr, rc, "...loading metrics interrupted" );
+            }
+            pos += block.n_read;
+        }
+    }
+
+    pl_progress_destroy( progress );
+
+    if ( rc == 0 )
+    {
+        rc = VCursorCommit( cursor );
+        if ( rc != 0 )
+            LOGERR( klogErr, rc, "cannot commit cursor on metrics-tab" );
+    }
+    return rc;
+}
+
+
+static rc_t metrics_loader( ld_context *lctx, KDirectory * hdf5_src, VCursor * cursor, const char * table_name )
+{
+    uint32_t col_idx[ metrics_tab_count ];
+    rc_t rc = add_columns( cursor, metrics_tab_count, -1, col_idx, metrics_tab_names );
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen( cursor );
+        if ( rc != 0 )
+            LOGERR( klogErr, rc, "cannot open cursor on metrics-tab" );
+        else
+        {
+            Metrics_src Metrics;
+            rc = open_Metrics_src( hdf5_src, &Metrics,
+                                   "PulseData/BaseCalls/ZMWMetrics",
+                                   lctx->cache_content );
+            if ( rc == 0 )
+            {
+                if ( check_Metrics_extents( &Metrics ) )
+                    rc = metrics_load_loop( lctx, cursor, &Metrics, col_idx );
+                else
+                    rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+                close_Metrics_src( &Metrics );
+            }
+        }
+    }
+    return rc;
+}
+
+
+/* HDF5-Groups and tables used to load the METRICS-table */
+static const char * metrics_groups_to_check[] = 
+{ 
+    "PulseData/BaseCalls/ZMWMetrics",
+    NULL
+};
+
+
+static const char * metrics_schema_template = "ZMW_METRICS";
+static const char * metrics_table_to_create = "ZMW_METRICS";
+
+rc_t prepare_metrics( VDatabase * database, met_ctx * sctx, ld_context *lctx )
+{
+    rc_t rc = prepare_table( database, &sctx->cursor,
+            metrics_schema_template, metrics_table_to_create ); /* pl-tools.c ... this creates the cursor */
+    if ( rc == 0 )
+        rc = add_columns( sctx->cursor, metrics_tab_count, -1, sctx->col_idx, metrics_tab_names );
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen( sctx->cursor );
+        if ( rc != 0 )
+        {
+            LOGERR( klogErr, rc, "cannot open cursor on metrics-tab" );
+        }
+        else
+        {
+            sctx->lctx = lctx;
+        }
+    }
+    return rc;
+}
+
+
+rc_t load_metrics_src( met_ctx * sctx, KDirectory * hdf5_src )
+{
+    Metrics_src Metrics;
+    rc_t rc = 0;
+
+    if ( sctx->lctx->check_src_obj )
+        /* in case of metrics any combination of columns can be missing... */
+        rc = check_src_objects( hdf5_src, metrics_groups_to_check, NULL, false );
+
+    if ( rc == 0 )
+        rc = open_Metrics_src( hdf5_src, &Metrics, "PulseData/BaseCalls/ZMWMetrics",
+                               sctx->lctx->cache_content );
+    if ( rc == 0 )
+    {
+        if ( check_Metrics_extents( &Metrics ) )
+            rc = metrics_load_loop( sctx->lctx, sctx->cursor, &Metrics, sctx->col_idx );
+        else
+            rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+        close_Metrics_src( &Metrics );
+    }
+    return rc;
+}
+
+
+rc_t finish_metrics( met_ctx * sctx )
+{
+    VCursorRelease( sctx->cursor );
+    return 0;
+}
+
+
+rc_t load_metrics( VDatabase * database, KDirectory * hdf5_src, ld_context *lctx )
+{
+    rc_t rc = 0;
+    if ( lctx->check_src_obj )
+        /* in case of metrics any combination of columns can be missing... */
+        rc = check_src_objects( hdf5_src, metrics_groups_to_check, 
+                                NULL, false );
+
+    if ( rc == 0 )
+        rc = load_table( database, hdf5_src, lctx, metrics_schema_template, 
+                         metrics_table_to_create, metrics_loader );
+    return rc;
+}
diff --git a/tools/pacbio-load/pl-metrics.h b/tools/pacbio-load/pl-metrics.h
new file mode 100644
index 0000000..b52c269
--- /dev/null
+++ b/tools/pacbio-load/pl-metrics.h
@@ -0,0 +1,83 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_pl_metrics_
+#define _h_pl_metrics_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "pl-tools.h"
+#include "pl-progress.h"
+#include <kapp/main.h>
+#include <klib/rc.h>
+
+/* enumeration of the columns of the metrics-table */
+enum
+{
+    /* metrix-space */
+    metrics_tab_BASE_FRACTION,
+    metrics_tab_BASE_IPD,
+    metrics_tab_BASE_RATE,
+    metrics_tab_BASE_WIDTH,
+    metrics_tab_CHAN_BASE_QV,
+    metrics_tab_CHAN_DEL_QV,
+    metrics_tab_CHAN_INS_QV,
+    metrics_tab_CHAN_SUB_QV,
+    metrics_tab_LOCAL_BASE_RATE,
+    metrics_tab_DARK_BASE_RATE,
+    metrics_tab_HQ_RGN_START_TIME,
+    metrics_tab_HQ_RGN_END_TIME,
+    metrics_tab_HQ_RGN_SNR,
+    metrics_tab_PRODUCTIVITY,
+    metrics_tab_READ_SCORE,
+    metrics_tab_READ_BASE_QV,
+    metrics_tab_READ_DEL_QV,
+    metrics_tab_READ_INS_QV,
+    metrics_tab_READ_SUB_QV,
+    metrics_tab_count
+};
+
+
+typedef struct met_ctx
+{
+    VCursor * cursor;
+    ld_context *lctx;
+    uint32_t col_idx[ metrics_tab_count ];
+} met_ctx;
+
+
+rc_t prepare_metrics( VDatabase * database, met_ctx * sctx, ld_context *lctx );
+rc_t load_metrics_src( met_ctx * sctx, KDirectory * hdf5_src );
+rc_t finish_metrics( met_ctx * sctx );
+
+rc_t load_metrics( VDatabase * database, KDirectory * hdf5_src, ld_context *lctx );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/pacbio-load/pl-passes.c b/tools/pacbio-load/pl-passes.c
new file mode 100644
index 0000000..83fb195
--- /dev/null
+++ b/tools/pacbio-load/pl-passes.c
@@ -0,0 +1,437 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "pl-passes.h"
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+
+const char * passes_tab_names[] = 
+{ 
+    "ADAPTER_HIT_BEFORE",
+    "ADAPTER_HIT_AFTER",
+    "PASS_DIRECTION",
+    "PASS_NUM_BASES",
+    "PASS_START_BASE"
+};
+
+
+typedef struct Passes_src
+{
+    af_data AdapterHitBefore;
+    af_data AdapterHitAfter;
+    af_data PassDirection;
+    af_data PassNumBases;
+    af_data PassStartBase;
+} Passes_src;
+
+
+static void init_Passes_src( Passes_src *tab )
+{
+    init_array_file( &tab->AdapterHitBefore );
+    init_array_file( &tab->AdapterHitAfter );
+    init_array_file( &tab->PassDirection );
+    init_array_file( &tab->PassNumBases );
+    init_array_file( &tab->PassStartBase );
+}
+
+
+static void close_Passes_src( Passes_src *tab )
+{
+    free_array_file( &tab->AdapterHitBefore );
+    free_array_file( &tab->AdapterHitAfter );
+    free_array_file( &tab->PassDirection );
+    free_array_file( &tab->PassNumBases );
+    free_array_file( &tab->PassStartBase );
+}
+
+static rc_t open_Passes_src( const KDirectory *hdf5_dir, Passes_src *tab,
+                             const char * path, bool cache_content )
+{
+    rc_t rc;
+
+    init_Passes_src( tab );
+
+    rc = open_element( hdf5_dir, &tab->AdapterHitBefore, path, "AdapterHitBefore",
+                  ADAPTER_HIT_BEFORE_BITSIZE, ADAPTER_HIT_BEFORE_COLS, 
+                  true, cache_content, false );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->AdapterHitAfter, path, "AdapterHitAfter",
+                  ADAPTER_HIT_AFTER_BITSIZE, ADAPTER_HIT_AFTER_COLS,
+                  true, cache_content, false );
+    if ( rc == 0 )    
+        rc = open_element( hdf5_dir, &tab->PassDirection, path, "PassDirection",
+                  PASS_DIRECTION_BITSIZE, PASS_DIRECTION_COLS,
+                  true, cache_content, false );
+    if ( rc == 0 )    
+        rc = open_element( hdf5_dir, &tab->PassNumBases, path, "PassNumBases",
+                  PASS_NUM_BASES_BITSIZE, PASS_NUM_BASES_COLS,
+                  true, cache_content, false );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->PassStartBase, path, "PassStartBase",
+                  PASS_START_BASE_BITSIZE, PASS_START_BASE_COLS,
+                  true, cache_content, false );
+    if ( rc != 0 )
+        close_Passes_src( tab );
+    return rc;
+}
+
+
+static bool check_Passes_ext( af_data *af, bool *needed, uint64_t *expected,
+                              const char * s )
+{
+    bool res = true;
+
+    if ( *needed )
+    {
+        *expected = af->extents[ 0 ];
+        *needed = false;
+    }
+    else
+        res = check_table_count( af, s, *expected );
+    return res;
+}
+
+
+static bool check_Passes_extents( Passes_src *tab )
+{
+    bool res = true;
+    bool needed = true;
+    uint64_t expected = 0;
+
+    if ( tab->AdapterHitBefore.rc == 0 && res )
+        res = check_Passes_ext( &tab->AdapterHitBefore, &needed, &expected, "AdapterHitBefore" );
+
+    if ( tab->AdapterHitAfter.rc == 0 && res )
+        res = check_Passes_ext( &tab->AdapterHitAfter, &needed, &expected, "AdapterHitAfter" );
+
+    if ( tab->PassDirection.rc == 0 && res )
+        res = check_Passes_ext( &tab->PassDirection, &needed, &expected, "PassDirection" );
+
+    if ( tab->PassNumBases.rc == 0 && res )
+        res = check_Passes_ext( &tab->PassNumBases, &needed, &expected, "PassNumBases" );
+
+    if ( tab->PassStartBase.rc == 0 && res )
+        res = check_Passes_ext( &tab->PassStartBase, &needed, &expected, "PassStartBase" );
+
+    return res;
+}
+
+
+#define PASS_BLOCK_SIZE 1024
+
+typedef struct pass_block
+{
+    uint8_t  AdapterHitBefore[ PASS_BLOCK_SIZE ];
+    uint8_t  AdapterHitAfter[ PASS_BLOCK_SIZE ];
+    uint8_t  PassDirection[ PASS_BLOCK_SIZE ];
+    uint32_t PassNumBases[ PASS_BLOCK_SIZE ];
+    uint32_t PassStartBase[ PASS_BLOCK_SIZE ];
+    uint64_t n_read;
+} pass_block;
+
+
+static rc_t pass_block_read_from_src( Passes_src *tab,
+                                      const uint64_t total_passes,
+                                      const uint64_t pos,
+                                      pass_block * block )
+{
+    rc_t rc = 0;
+    uint64_t to_read = PASS_BLOCK_SIZE;
+    uint64_t read; 
+
+    block->n_read = 0;
+    if ( ( pos + to_read ) >= total_passes )
+        to_read = ( total_passes - pos );
+
+    if ( tab->AdapterHitBefore.rc == 0 )
+        rc = array_file_read_dim1( &tab->AdapterHitBefore, pos, 
+                                   &block->AdapterHitBefore[0],
+                                   to_read, &read );
+    else
+        memset( &block->AdapterHitBefore[0], 0, to_read * sizeof( uint8_t ) );
+
+
+    if ( rc == 0 && tab->AdapterHitAfter.rc == 0 )
+        rc = array_file_read_dim1( &tab->AdapterHitAfter, pos, 
+                                   &block->AdapterHitAfter[0],
+                                   to_read, &read );
+    else
+        memset( &block->AdapterHitAfter[0], 0, to_read * sizeof( uint8_t ) );
+
+    if ( rc == 0 && tab->PassDirection.rc == 0 )
+        rc = array_file_read_dim1( &tab->PassDirection, pos, 
+                                   &block->PassDirection[0],
+                                   to_read, &read );
+    else
+        memset( &block->PassDirection[0], 0, to_read * sizeof( uint8_t ) );
+
+    if ( rc == 0 && tab->PassNumBases.rc == 0 )
+        rc = array_file_read_dim1( &tab->PassNumBases, pos, 
+                                   &block->PassNumBases[0],
+                                   to_read, &read );
+    else
+        memset( &block->PassNumBases[0], 0, to_read * sizeof( uint32_t ) );
+
+    if ( rc == 0 && tab->PassStartBase.rc == 0 )
+        rc = array_file_read_dim1( &tab->PassStartBase, pos, 
+                                   &block->PassStartBase[0],
+                                   to_read, &read );
+    else
+        memset( &block->PassStartBase[0], 0, to_read * sizeof( uint32_t ) );
+
+    if ( rc == 0 )
+        block->n_read = read;
+
+    return rc;
+}
+
+
+static rc_t passes_load_pass( VCursor *cursor, pass_block *block,
+                              const uint32_t idx, uint32_t *col_idx )
+{
+    rc_t rc = VCursorOpenRow( cursor );
+    if ( rc != 0 )
+        LOGERR( klogErr, rc, "cannot open passes-row" );
+
+    if ( rc == 0 )
+        rc = vdb_write_uint8( cursor, 
+                        col_idx[ passes_tab_ADAPTER_HIT_BEFORE ],
+                        block->AdapterHitBefore[ idx ],
+                        "passes.AdapterHitBefore" );
+    if ( rc == 0 )
+        rc = vdb_write_uint8( cursor, 
+                        col_idx[ passes_tab_ADAPTER_HIT_AFTER ],
+                        block->AdapterHitAfter[ idx ],
+                        "passes.AdapterHitAfter" );
+    if ( rc == 0 )
+        rc = vdb_write_uint8( cursor, 
+                        col_idx[ passes_tab_PASS_DIRECTION ],
+                        block->PassDirection[ idx ],
+                        "passes.PassDirection" );
+    if ( rc == 0 )
+        rc = vdb_write_uint32( cursor, 
+                        col_idx[ passes_tab_PASS_NUM_BASES ],
+                        block->PassNumBases[ idx ],
+                        "passes.PassNumBases" );
+    if ( rc == 0 )
+        rc = vdb_write_uint32( cursor, 
+                        col_idx[ passes_tab_PASS_START_BASE ],
+                        block->PassStartBase[ idx ],
+                        "passes.PassStartBase" );
+
+    if ( rc == 0 )
+    {
+        rc = VCursorCommitRow( cursor );
+        if ( rc != 0 )
+            LOGERR( klogErr, rc, "cannot commit passes-row" );
+    }
+    if ( rc == 0 )
+    {
+        rc = VCursorCloseRow( cursor );
+        if ( rc != 0 )
+            LOGERR( klogErr, rc, "cannot close passes-row" );
+    }
+
+    return rc;
+}
+
+
+static rc_t passes_load_loop( ld_context *lctx, VCursor * cursor, Passes_src *tab,
+                              uint32_t *col_idx )
+{
+    rc_t rc = 0;
+    KLogLevel tmp_lvl;
+    pass_block block;
+    pl_progress *progress;
+    uint64_t pos = 0;
+    uint64_t total_passes = tab->AdapterHitBefore.extents[0];
+
+    pl_progress_make( &progress, total_passes );
+    rc = progress_chunk( &lctx->xml_progress, total_passes );
+
+    tmp_lvl = KLogLevelGet();
+    KLogLevelSet( klogInfo );
+    PLOGMSG( klogInfo, ( klogInfo,
+                         "loading passes-table ( $(rows) rows ) :",
+                         "rows=%lu", total_passes ));
+    KLogLevelSet( tmp_lvl );
+
+    while( pos < total_passes && rc == 0 )
+    {
+        rc = pass_block_read_from_src( tab, total_passes, pos, &block );
+        if ( rc == 0 )
+        {
+            uint32_t i;
+            for ( i = 0; i < block.n_read && rc == 0; ++i )
+            {
+                rc = Quitting();
+                if ( rc == 0 )
+                {
+                    rc = passes_load_pass( cursor, &block, i, col_idx );
+                    if ( rc == 0 )
+                    {
+                        rc = progress_step( lctx->xml_progress );
+                        if ( lctx->with_progress )
+                            pl_progress_increment( progress, 1 );
+                    }
+                }
+                else
+                    LOGERR( klogErr, rc, "...loading passes interrupted" );
+            }
+            pos += block.n_read;
+        }
+    }
+
+    pl_progress_destroy( progress );
+
+    if ( rc == 0 )
+    {
+        rc = VCursorCommit( cursor );
+        if ( rc != 0 )
+            LOGERR( klogErr, rc, "cannot commit cursor on PASSES-tab" );
+    }
+    return rc;
+}
+
+
+static rc_t passes_loader( ld_context * lctx, KDirectory * hdf5_src, VCursor * cursor, const char * table_name )
+{
+    uint32_t col_idx[ passes_tab_count ];
+    rc_t rc = add_columns( cursor, passes_tab_count, -1, col_idx, passes_tab_names );
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen( cursor );
+        if ( rc != 0 )
+            LOGERR( klogErr, rc, "cannot open cursor on PASSES-tab" );
+        else
+        {
+            Passes_src Passes;
+            rc = open_Passes_src( hdf5_src, &Passes,
+                                  "PulseData/ConsensusBaseCalls/Passes",
+                                  lctx->cache_content );
+            if ( rc == 0 )
+            {
+                if ( check_Passes_extents( &Passes ) )
+                    rc = passes_load_loop( lctx, cursor, &Passes, col_idx );
+                else
+                    rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+                close_Passes_src( &Passes );
+            }
+        }
+    }
+    return rc;
+}
+
+/* HDF5-Groups and tables used to load the PASSES-table */
+static const char * passes_groups_to_check[] = 
+{ 
+    "PulseData/ConsensusBaseCalls/Passes",
+    NULL
+};
+
+static const char * passes_tables_to_check[] = 
+{ 
+    "PulseData/ConsensusBaseCalls/Passes/AdapterHitAfter",
+    "PulseData/ConsensusBaseCalls/Passes/AdapterHitBefore",
+    "PulseData/ConsensusBaseCalls/Passes/PassDirection",
+    "PulseData/ConsensusBaseCalls/Passes/PassNumBases",
+    "PulseData/ConsensusBaseCalls/Passes/PassStartBase",
+    NULL
+};
+
+static const char * passes_schema_template = "PASSES";
+static const char * passes_table_to_create = "PASSES";
+
+
+rc_t prepare_passes( VDatabase * database, pas_ctx * sctx, ld_context *lctx )
+{
+    rc_t rc = prepare_table( database, &sctx->cursor,
+            passes_schema_template, passes_table_to_create ); /* pl-tools.c ... this creates the cursor */
+    if ( rc == 0 )
+    {
+        rc = add_columns( sctx->cursor, passes_tab_count, -1, sctx->col_idx, passes_tab_names );
+        if ( rc == 0 )
+        {
+            rc = VCursorOpen( sctx->cursor );
+            if ( rc != 0 )
+            {
+                LOGERR( klogErr, rc, "cannot open cursor on PASSES-tab" );
+            }
+            else
+            {
+                sctx->lctx = lctx;
+            }
+        }
+    }
+    return rc;
+}
+
+
+rc_t load_passes_src( pas_ctx * sctx, KDirectory * hdf5_src )
+{
+    Passes_src Passes;
+    rc_t rc = 0;
+
+    if ( sctx->lctx->check_src_obj )
+        rc = check_src_objects( hdf5_src, passes_groups_to_check, 
+                                passes_tables_to_check, false );
+    if ( rc == 0 )
+        rc = open_Passes_src( hdf5_src, &Passes, "PulseData/ConsensusBaseCalls/Passes",
+                               sctx->lctx->cache_content );
+    if ( rc == 0 )
+    {
+        if ( check_Passes_extents( &Passes ) )
+            rc = passes_load_loop( sctx->lctx, sctx->cursor, &Passes, sctx->col_idx );
+        else
+            rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+        close_Passes_src( &Passes );
+    }
+    return rc;
+}
+
+
+rc_t finish_passes( pas_ctx * sctx )
+{
+    VCursorRelease( sctx->cursor );
+    return 0;
+}
+
+
+rc_t load_passes( VDatabase * database, KDirectory * hdf5_src, ld_context *lctx )
+{
+    rc_t rc = 0;
+    if ( lctx->check_src_obj )
+        rc = check_src_objects( hdf5_src, passes_groups_to_check, 
+                                passes_tables_to_check, false );
+    if ( rc == 0 )
+        rc = load_table( database, hdf5_src, lctx, passes_schema_template, 
+                         passes_table_to_create, passes_loader );
+    return rc;
+}
diff --git a/tools/pacbio-load/pl-passes.h b/tools/pacbio-load/pl-passes.h
new file mode 100644
index 0000000..6bb6c1c
--- /dev/null
+++ b/tools/pacbio-load/pl-passes.h
@@ -0,0 +1,70 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_pl_passes_
+#define _h_pl_passes_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "pl-tools.h"
+#include "pl-progress.h"
+#include <klib/rc.h>
+#include <kapp/main.h>
+
+/* enumeration of the columns of the passes-table */
+enum
+{
+    /* consensus-space */
+    passes_tab_ADAPTER_HIT_BEFORE,
+    passes_tab_ADAPTER_HIT_AFTER,
+    passes_tab_PASS_DIRECTION,
+    passes_tab_PASS_NUM_BASES,
+    passes_tab_PASS_START_BASE,
+    passes_tab_count
+};
+
+
+typedef struct pas_ctx
+{
+    VCursor * cursor;
+    ld_context *lctx;
+    uint32_t col_idx[ passes_tab_count ];
+} pas_ctx;
+
+
+rc_t prepare_passes( VDatabase * database, pas_ctx * sctx, ld_context *lctx );
+rc_t load_passes_src( pas_ctx * sctx, KDirectory * hdf5_src );
+rc_t finish_passes( pas_ctx * sctx );
+
+
+rc_t load_passes( VDatabase * database, KDirectory * hdf5_src, ld_context *lctx );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/pacbio-load/pl-progress.c b/tools/pacbio-load/pl-progress.c
new file mode 100644
index 0000000..f905614
--- /dev/null
+++ b/tools/pacbio-load/pl-progress.c
@@ -0,0 +1,195 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/rc.h>
+#include <klib/out.h>
+#include <sysalloc.h>
+#include <stdlib.h>
+
+
+typedef struct pl_progress
+{
+    bool initialized;
+    uint8_t fract_digits;
+    uint64_t count;
+    uint64_t position;
+    uint16_t percent;
+} pl_progress;
+
+
+static uint8_t pl_calc_fract_digits( const uint64_t count )
+{
+    uint8_t res = 0;
+    if ( count > 10000 )
+    {
+        if ( count > 100000 )
+            res = 2;
+        else
+            res = 1;
+    }
+    return res;
+}
+
+
+rc_t pl_progress_make( pl_progress ** pb, const uint64_t count )
+{
+    if ( pb == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcSelf, rcNull );
+    (*pb) = calloc( 1, sizeof( struct pl_progress ) );
+    if ( *pb == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+    (*pb)->count = count;
+    (*pb)->fract_digits = pl_calc_fract_digits( count );
+    (*pb)->position = 0;
+    return 0;
+}
+
+
+rc_t pl_progress_destroy( pl_progress * pb )
+{
+    if ( pb == NULL )
+        return RC( rcVDB, rcNoTarg, rcDestroying, rcSelf, rcNull );
+    free( pb );
+    return KOutMsg( "\n" );
+    return 0;
+}
+
+
+static void progess_0a( const uint16_t percent )
+{
+    KOutMsg( "| %2u%%", percent );
+}
+
+
+static void progess_0( const uint16_t percent )
+{
+    if ( percent & 1 )
+        KOutMsg( "\b\b\b\b- %2u%%", percent );
+    else
+        KOutMsg( "\b\b\b%2u%%", percent );
+}
+
+
+static void progess_1a( const uint16_t percent )
+{
+    uint16_t p1 = percent / 10;
+    uint16_t p0 = percent - ( p1 * 10 );
+    KOutMsg( "| %2u.%01u%%", p1, p0 );
+}
+
+
+static void progess_1( const uint16_t percent )
+{
+    uint16_t p1 = percent / 10;
+    uint16_t p0 = percent - ( p1 * 10 );
+    if ( ( p1 & 1 )&&( p0 == 0 ) )
+        KOutMsg( "\b\b\b\b\b\b- %2u.%01u%%", p1, p0 );
+    else
+        KOutMsg( "\b\b\b\b\b%2u.%01u%%", p1, p0 );
+}
+
+
+static void progess_2a( const uint16_t percent )
+{
+    uint16_t p1 = percent / 100;
+    uint16_t p0 = percent - ( p1 * 100 );
+    KOutMsg( "| %2u.%02u%%", p1, p0 );
+}
+
+
+static void progess_2( const uint16_t percent )
+{
+    uint16_t p1 = percent / 100;
+    uint16_t p0 = percent - ( p1 * 100 );
+    if ( ( p1 & 1 )&&( p0 == 0 ) )
+        KOutMsg( "\b\b\b\b\b\b\b- %2u.%02u%%", p1, p0 );
+    else
+        KOutMsg( "\b\b\b\b\b\b%2u.%02u%%", p1, p0 );
+}
+
+
+uint32_t calc_percent( pl_progress * pb )
+{
+    uint32_t res = 0;
+    uint32_t factor = 100;
+    if ( pb->fract_digits > 0 )
+    {
+        if ( pb->fract_digits > 1 )
+            factor = 10000;
+        else
+            factor = 1000;
+    }
+        
+    if ( pb->count > 0 )
+    {
+        if ( pb->position >= pb->count )
+            res = factor;
+        else
+        {
+            uint64_t temp = pb->position;
+            temp *= factor;
+            temp /= pb->count;
+            res = (uint32_t) temp;
+        }
+    }
+    return res;
+}
+
+
+rc_t pl_progress_increment( pl_progress * pb, const uint64_t step )
+{
+    uint32_t percent;
+    if ( pb == NULL )
+        return RC( rcVDB, rcNoTarg, rcParsing, rcSelf, rcNull );
+
+    pb->position += step;
+    percent = calc_percent( pb );
+    if ( pb->initialized )
+    {
+        if ( pb->percent != percent )
+        {
+            pb->percent = percent;
+            switch( pb->fract_digits )
+            {
+            case 0 : progess_0( percent ); break;
+            case 1 : progess_1( percent ); break;
+            case 2 : progess_2( percent ); break;
+            }
+        }
+    }
+    else
+    {
+        pb->percent = percent;
+        switch( pb->fract_digits )
+        {
+        case 0 : progess_0a( percent ); break;
+        case 1 : progess_1a( percent ); break;
+        case 2 : progess_2a( percent ); break;
+        }
+        pb->initialized = true;
+    }
+    return 0;
+}
diff --git a/tools/pacbio-load/pl-progress.h b/tools/pacbio-load/pl-progress.h
new file mode 100644
index 0000000..e4c05b6
--- /dev/null
+++ b/tools/pacbio-load/pl-progress.h
@@ -0,0 +1,70 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_pl_progress_
+#define _h_pl_progress_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct pl_progress pl_progress;
+
+/*--------------------------------------------------------------------------
+ * make_progressbar
+ *
+ *  creates a progressbar with zero-values inside
+ *  does not output anything
+ */
+rc_t pl_progress_make( pl_progress ** pb, const uint64_t count );
+
+
+/*--------------------------------------------------------------------------
+ * destroy_progressbar
+ *
+ *  destroy's the progressbar
+ *  does not output anything
+ */
+rc_t pl_progress_destroy( pl_progress * pb );
+
+
+/*--------------------------------------------------------------------------
+ * update_progressbar
+ *
+ *  sets the progressbar to a specific percentage
+ *  outputs only if the percentage has changed from the last call
+ *  the precentage is in 1/10-th of a percent ( 21,6% = 216 )
+ *  expects the percents in increasing order ( does not jump back )
+ *  writes a growing bar made from '-'-chars every 2nd percent
+ */
+rc_t pl_progress_increment( pl_progress * pb, const uint64_t step );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/pacbio-load/pl-regions.c b/tools/pacbio-load/pl-regions.c
new file mode 100644
index 0000000..4a4ea28
--- /dev/null
+++ b/tools/pacbio-load/pl-regions.c
@@ -0,0 +1,1048 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "pl-regions.h"
+#include <insdc/sra.h>
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+enum
+{
+    pacbio_idx_spot_id = 0,
+    pacbio_idx_type,
+    pacbio_idx_start,
+    pacbio_idx_end,
+    pacbio_idx_score
+};
+
+
+/* HDF5-Groups and tables used to use the REGIONS-table */
+static const char * region_groups_to_check[] = 
+{ 
+    "PulseData",
+    NULL
+};
+
+static const char * region_tables_to_check[] = 
+{ 
+    "PulseData/Regions",
+    NULL
+};
+
+
+void rgn_stat_init( regions_stat * stat )
+{
+    stat->inserts = 0;
+    stat->expands_a = 0;
+    stat->expands_i = 0;
+    stat->inserts_spots = 0;
+    stat->expands_spots = 0;
+    stat->end_gap = 0;
+    stat->overlapps = 0;
+    stat->removed = 0;
+}
+
+
+void rgn_init( regions *rgn )
+{
+    init_array_file( &rgn->hdf5_regions );
+
+    VectorInit ( &rgn->read_Regions, 0, 5 );
+    VectorInit ( &rgn->sort_Regions, 0, 5 );
+    VectorInit ( &rgn->stock_Regions, 0, 5 );
+
+    rgn->data_32 = NULL;
+    rgn->data_32_len = 0;
+    rgn->data_8 = NULL;
+    rgn->data_8_len = 0;
+
+    rgn->offset = 0;
+    rgn->spot_id = 0;
+    rgn->spot_len = 0;
+    rgn->hq_rgn.start = 0;
+    rgn->hq_rgn.end = 0;
+
+    rgn_stat_init( &( rgn->stat ) );
+
+    rgn->complete_table = NULL;
+    rgn->table_index = NULL;
+}
+
+
+static void CC region_whack( void * item, void * data )
+{
+    free( item );
+}
+
+
+static rc_t rgn_vector_move( Vector * src, Vector * dst )
+{
+    rc_t rc = 0;
+    while ( VectorLength( src ) > 0 && rc == 0 )
+    {
+        region *ptr;
+        rc = VectorRemove ( src, 0, (void**)&ptr );
+        if ( rc == 0 )
+            rc = VectorAppend ( dst, NULL, ptr );
+    }
+    return rc;
+}
+
+
+void rgn_free( regions *rgn )
+{
+    free_array_file( &rgn->hdf5_regions );
+
+    VectorWhack ( &rgn->read_Regions, region_whack, NULL );
+    VectorWhack ( &rgn->sort_Regions, region_whack, NULL );
+    VectorWhack ( &rgn->stock_Regions, region_whack, NULL );
+
+    if ( rgn->data_32 != NULL )
+        free( rgn->data_32 );
+    if ( rgn->data_8 != NULL )
+        free( rgn->data_8 );
+
+    if ( rgn->complete_table != NULL )
+        free( rgn->complete_table );
+    if ( rgn->table_index != NULL )
+        free( rgn->table_index );
+}
+
+
+static
+int64_t CC rgn_sort_callback( const void *p1, const void *p2, void * data )
+{
+    regions *rgn = ( regions * ) data;
+    int32_t idx1 = *( int32_t * ) p1;
+    int32_t idx2 = *( int32_t * ) p2;
+    int32_t spot_id1 = rgn->complete_table[ idx1 * RGN_COLUMN_COUNT ];
+    int32_t spot_id2 = rgn->complete_table[ idx2 * RGN_COLUMN_COUNT ];
+    if ( spot_id1 == spot_id2 )
+        return ( idx1 - idx2 );
+    return ( spot_id1 - spot_id2 );
+}
+
+
+static
+rc_t rgn_read_complete_table( regions *rgn )
+{
+    rc_t rc;
+    uint32_t rowcount = rgn->hdf5_regions.extents[ 0 ];
+    uint32_t rowsize = sizeof( int32_t ) * RGN_COLUMN_COUNT;
+
+    rgn->complete_table = malloc( rowcount * rowsize );
+    if ( rgn->complete_table == NULL )
+        rc = RC( rcExe, rcNoTarg, rcLoading, rcMemory, rcExhausted );
+    else
+    {
+        rgn->table_index = malloc( sizeof( uint32_t ) * rowcount );
+        if ( rgn->table_index == NULL )
+        {
+            free( rgn->complete_table );
+            rgn->complete_table = NULL;
+            rc = RC( rcExe, rcNoTarg, rcLoading, rcMemory, rcExhausted );
+        }
+        else
+        {
+            uint64_t n_read = 0;
+
+            /* now let's read the whole table... */
+            rc = array_file_read_dim2( &(rgn->hdf5_regions), 0, rgn->complete_table,
+                                       rowcount, RGN_COLUMN_COUNT, &n_read );
+            if ( rc == 0 )
+            {
+                uint32_t idx, first_spot_id;
+
+                first_spot_id = rgn->complete_table[ pacbio_idx_spot_id ];
+                if ( first_spot_id != 0 )
+                {
+                    /* in case the file we are loading is part of a multi-file submission */
+                    for ( idx = 0; idx < rowcount; ++idx )
+                        rgn->complete_table[ ( idx * RGN_COLUMN_COUNT ) + pacbio_idx_spot_id ] -= first_spot_id;
+                }
+                
+                /* first let's fill the index, first with ascending row-id's */
+                for ( idx = 0; idx < rowcount; ++idx )
+                    rgn->table_index[ idx ] = idx;
+
+                /* now sort the index-array by the content's spot-id's */
+                ksort ( rgn->table_index, rowcount, sizeof( uint32_t ),
+                        rgn_sort_callback, rgn );
+                
+                /* left here to print a debug-output of the sorted table-index */
+                /*
+                for ( idx = rowcount - 128; idx < rowcount; ++idx )
+                    OUTMSG(( "idx[%i] = %i -> %i\n", 
+                             idx, rgn->table_index[ idx ], 
+                             rgn->complete_table[ rgn->table_index[ idx ] * RGN_COLUMN_COUNT ] ));
+                */
+
+                /* the table and the index is now ready to use... */
+            }
+        }
+    }
+    return rc;
+}
+
+
+rc_t rgn_open( const KDirectory *hdf5_dir, regions *rgn )
+{
+    rc_t rc;
+    rgn_init( rgn );
+    /* check if the necessary groups/tables are there */
+    rc = check_src_objects( hdf5_dir, region_groups_to_check, 
+                            region_tables_to_check, false );
+    if ( rc == 0 )
+    {
+        /* open the region-table... */
+        rc = open_element( hdf5_dir, &rgn->hdf5_regions,
+                           region_groups_to_check[ 0 ], "Regions", 
+                           REGIONS_BITSIZE, REGIONS_COLS, true, false, true );
+        if ( rc == 0 )
+            rc = rgn_read_complete_table( rgn );
+    }
+    if ( rc != 0 )
+        rgn_free( rgn );
+    return rc;
+}
+
+
+static rc_t rgn_get_or_make( Vector * stock, region ** r )
+{
+    rc_t rc = 0;
+    /* take it out of the stock or make a new one... */
+    if ( VectorLength( stock ) > 0 )
+        rc = VectorRemove ( stock, 0, (void**)r );
+    else
+        *r = malloc( sizeof ** r );
+
+    if ( *r == NULL )
+        rc = RC( rcExe, rcNoTarg, rcLoading, rcMemory, rcExhausted );
+    return rc;
+}
+
+
+static int64_t CC rgn_sort_by_start( const void *item, const void *n )
+{
+    region * v1 = ( region * )item;
+    region * v2 = ( region * )n;
+    if ( v1 -> start != v2 -> start )
+        return ( v1->start - v2->start );
+    return ( v1->end - v2->end );
+}
+
+
+static rc_t rgn_store_bio_or_adapter( Vector * stock, Vector * to,
+                                      const int32_t * block, int32_t sra_read_type )
+{
+    rc_t rc = 0;
+
+    if ( block[ pacbio_idx_start ] < block[ pacbio_idx_end ] )
+    {
+        region * a_region;
+        rc = rgn_get_or_make( stock, &a_region );
+        if ( rc == 0 )
+        {
+            a_region->spot_id = block[ pacbio_idx_spot_id ];
+            a_region->type    = sra_read_type;
+            a_region->start   = block[ pacbio_idx_start ];
+            a_region->end     = block[ pacbio_idx_end ];
+
+            /* see every region shorter as MIN_BIOLOGICAL_LEN 
+               as a technical (adapter) region */
+            if ( ( a_region->end - a_region->start ) <= MIN_BIOLOGICAL_LEN )
+                a_region->type = SRA_READ_TYPE_TECHNICAL;
+
+            a_region->filter  = SRA_READ_FILTER_PASS;
+            rc = VectorInsert ( to, a_region, NULL, rgn_sort_by_start );
+        }
+    }
+    return rc;
+}
+
+static rc_t rgn_store_block( Vector * stock, Vector * to, hq_region * hq,
+                             const int32_t * block, region_type_mapping *mapping,
+                             bool *have_high_quality )
+{
+    rc_t rc = 0;
+    int32_t type = block[ pacbio_idx_type ];
+
+    if ( mapping->rgn_type_hq >=0 && type == mapping->rgn_type_hq )
+    {
+        /* it is an error if we have more than one high-quality-region! */
+        assert ( ! * have_high_quality );
+
+        if ( * have_high_quality )
+        {
+            rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+            LOGERR( klogErr, rc, "(* have_high_quality) in rgn_store_block()'" );
+            return rc;
+        }
+
+        hq->start = block[ pacbio_idx_start ];
+        hq->end   = block[ pacbio_idx_end ];
+        * have_high_quality = true;
+    }
+    else if ( mapping->rgn_type_ga >= 0 && type == mapping->rgn_type_ga )
+    {   /* so far do nothing with the "global accuracy" region */
+    }
+    else if ( mapping->rgn_type_adapter >= 0 && type == mapping->rgn_type_adapter )
+    {   /* it is an adapter */
+        rc = rgn_store_bio_or_adapter( stock, to, block, SRA_READ_TYPE_TECHNICAL );
+    }
+    else if ( mapping->rgn_type_insert >= 0 && type == mapping->rgn_type_insert )
+    {   /* it is an insert */
+        rc = rgn_store_bio_or_adapter( stock, to, block, SRA_READ_TYPE_BIOLOGICAL );
+    }
+    else
+    {   /* the type is unknown */
+        ( mapping->count_of_unknown_rgn_types )++;
+        /*
+        rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+        LOGERR( klogErr, rc, "( region type is unknown ) in rgn_store_block()'" );
+        */
+    }
+    return rc;
+}
+
+
+/* inserts the generated region into the sort_Regions */
+static rc_t rgn_generate( Vector * stock, Vector * dst,
+                          const int32_t spot_id, const uint32_t start, const uint32_t len )
+{
+    region * a_region;
+    rc_t rc = rgn_get_or_make( stock, &a_region );
+    if ( rc == 0 )
+    {
+        a_region->spot_id = spot_id;
+        a_region->type    = SRA_READ_TYPE_TECHNICAL; /*means "i dont know"*/
+        a_region->start   = start;
+        a_region->end     = start + len;
+        a_region->filter  = SRA_READ_FILTER_CRITERIA;
+        rc = VectorInsert ( dst, a_region, NULL, rgn_sort_by_start );
+    }
+    return rc;
+}
+
+
+/* *************************************************************
+declares all regions inside and touching the HQ-Regions as
+    SRA_READ_FILTER_PASS outside becomes SRA_READ_FILTER_CRITERIA;
+************************************************************* */
+#if 0
+static rc_t rgn_apply_filter( Vector * stock, Vector * v, hq_region * hq,
+                              const int32_t spot_id, const uint32_t spot_len )
+{
+    rc_t rc = 0;
+
+    if ( hq->start == 0 && hq->end == 0 )
+    {
+        /* we have no HQ-Region, discard everything and create one
+           READ for the whole spot, that will be TECHNICAL... */
+        rgn_vector_move( v, stock );
+
+        if ( spot_len > 0 )
+            /* inserts the generated region into the sort_Regions */
+            rc = rgn_generate( stock, v, spot_id, 0, spot_len );
+    }
+    else
+    {
+        uint32_t i, count = VectorLength ( v );
+        for ( i = 0; i < count; ++ i )
+        {
+            region * a_region = VectorGet ( v, i );
+            if ( a_region != NULL )
+            {
+                bool set_invalid = ( ( a_region->end <= hq->start ) ||
+                                     ( a_region->start >= hq->end ) );
+                if ( set_invalid )
+                {
+                    /* the region is before the hq-region
+                       ---> set to SRA_READ_FILTER_CRITERIA */
+                    a_region->filter = SRA_READ_FILTER_CRITERIA;
+                    a_region->type = SRA_READ_TYPE_TECHNICAL;
+                }
+                else
+                {
+                    /* the region intersects with the hq-region 
+                       ---> set to SRA_READ_FILTER_PASS */
+                    a_region->filter = SRA_READ_FILTER_PASS;
+                }
+            }
+        }
+    }
+    return rc;
+}
+#endif
+
+static bool rgn_expand_last_rgn_by_1( Vector * v, int32_t *expands_a, int32_t *expands_i )
+{
+    region * a_region = VectorLast ( v );
+    bool res = ( a_region != NULL );
+    if ( res )
+    {
+        a_region->end += 1;
+        if ( a_region->type == SRA_READ_TYPE_TECHNICAL )
+            (*expands_a)++;
+        else
+            (*expands_i)++;
+    }
+    return res;
+}
+
+
+/* *************************************************************
+if gap is 1, expand previous region by 1 (correct off-by-1)
+fill in gaps > 1 ( regions are not consecutive )
+correct overlapping regions
+fill in a gap at the end, if the last region does not reach spotlen
+
+    INTPUT : rgn->read_Regions
+    OUTPUT : rgn->sort_Regions
+************************************************************* */
+static rc_t rgn_correct( Vector * stock, Vector * from, Vector * to,
+                         const uint32_t spot_id, const uint32_t spot_len,
+                         regions_stat * stats )
+{
+    rc_t rc;
+    int32_t start, expands_a = 0, expands_i = 0, inserts = 0;
+    uint32_t i, count = VectorLength ( from );
+
+    for ( rc = 0, start = 0, i = 0; i < count && rc == 0; ++ i )
+    {
+        region * a_region;
+
+        /* take the region out of rgn->read_Regions*/
+        rc = VectorRemove ( from, 0, (void**)&a_region );
+        if ( rc == 0 )
+        {
+            int32_t gap_len = ( a_region->start - start );
+
+            if ( gap_len == 1 )
+            {
+                /* the gap-length is one, try to expand the previous region */
+                if ( !rgn_expand_last_rgn_by_1( to, &expands_a, &expands_i ) )
+                {
+                    /* there is no previous region ! */
+                    rc = rgn_generate( stock, to, spot_id, start, gap_len );
+                }
+            }
+            else if ( gap_len > 1 )
+            {
+                /* generate a artificial gap in the middle or the start of the spot */
+                rc = rgn_generate( stock, to, spot_id, start, gap_len );
+                inserts++;
+            }
+            else if ( gap_len < 0 )
+            {
+                /* a negative gap would be an error in the sorting of the regions,
+                   or an overlapp of regions */
+                if ( ( a_region->start - gap_len )  > a_region->end )
+                {
+                    rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+                    LOGERR( klogErr, rc, "((a_region->start-gap_len)>a_region->end) in rgn_correct()'" );
+                }
+                else /** move the start point ***/
+                {
+                    a_region->start -= gap_len;
+                    stats->overlapps++;
+                }
+            }
+            
+            if ( rc == 0 )
+            {
+                rc = VectorInsert ( to, a_region, NULL, rgn_sort_by_start );
+                if ( rc != 0 )
+                    LOGERR( klogErr, rc, "VectorInsert(rgn_sort_by_start) in rgn_correct()'" );
+                start = a_region->end;
+            }
+            else
+            {
+                rc_t rc1 = VectorInsert( stock, a_region, NULL, NULL );
+                if ( rc1 != 0 )
+                    LOGERR( klogErr, rc, "VectorInsert(NULL) in rgn_correct()'" );
+            }
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        /* if the last region does not reach to the end of the spot */
+        if ( start < spot_len )
+        {
+            int32_t gap_len = ( spot_len - start );
+            if ( gap_len == 1 )
+            {
+                /* !!! this can also happen if spot_len == 1 !!! */
+                /* the gap-length is one, try to expand the previous region */
+                if ( ! rgn_expand_last_rgn_by_1( to, &expands_a, &expands_i ) )
+                {
+                    /* there is no previous region ! */
+                    rc = rgn_generate( stock, to, spot_id, start, gap_len );
+                    stats->end_gap++;
+                }
+            }
+            else if ( gap_len > 0 )
+            {
+                /* fill the gap to the end... */
+                rc = rgn_generate( stock, to, spot_id, start, gap_len );
+                stats->end_gap++;
+            }
+            else if ( gap_len < 0 )
+            {
+                /* a negative gap would be an error in the sorting of the regions,
+                   or an overlapp of regions */
+                rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+                LOGERR( klogErr, rc, "(gap_len<0) in rgn_correct()'" );
+            }
+        }
+    }
+
+    /* do some statistics */
+    if ( ( expands_i + expands_a ) > 0 )
+    {
+        stats->expands_a += expands_a;
+        stats->expands_i += expands_i;
+        stats->expands_spots++;
+    }
+    if ( inserts > 0 )
+    {
+        stats->inserts += inserts;
+        stats->inserts_spots++;
+    }
+
+    return rc;
+}
+
+
+/* *************************************************************
+tries to merge overlapping adapter-regions...
+( uses rgn->read_Regions as scratch-pad )
+
+    INTPUT : rgn->sort_Regions
+    OUTPUT : rgn->sort_Regions
+************************************************************* */
+static rc_t rgn_merge_consecutive_regions( Vector * stock, Vector * from, Vector * to )
+{
+    rc_t rc = 0;
+    uint32_t i, count = VectorLength ( from );
+    region * a_region = NULL;
+    region * prev_region = NULL;
+
+    for ( i = 0; i < count && rc == 0; ++ i )
+    {
+        /* take the region out of rgn->sort_Regions*/
+        rc = VectorRemove ( from, 0, (void**)&a_region );
+        if ( rc == 0 )
+        {
+            bool copy = true;
+            if ( prev_region != NULL )
+            {
+                if ( ( a_region->start <= prev_region->end ) &&
+                     ( a_region->type == prev_region->type ) &&
+                     ( a_region->filter == prev_region->filter ) )
+                {
+                    prev_region->end = a_region->end;
+                    /* put the now unused region back into the stock */
+                    VectorAppend ( stock, NULL, a_region );
+                    /* and keep prev-region! */
+                    copy = false;
+                }
+            }
+            if ( copy )
+            {
+                prev_region = a_region;
+                rc = VectorInsert ( to, a_region, NULL, rgn_sort_by_start );
+            }
+        }
+    }
+    return rc;
+}
+
+/* *************************************************************
+tests that the spot-len is covered with regions that
+are not overlapping, have no gaps, start is ascending
+the regions to check are in rgn->sort_Regions
+************************************************************* */
+static rc_t rgn_check( const Vector * v, const uint32_t spot_len )
+{
+    rc_t rc = 0;
+    uint32_t i, count = VectorLength ( v );
+    region * a_region = NULL;
+    int32_t start = 0;
+
+    /* special case, if the spot is empty there are not regions */
+    if ( spot_len == 0 )
+    {
+        if ( count != 0 )
+        {
+            rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+            LOGERR( klogErr, rc, "(spot_len == 0)&&(count!=0) in region-check()'" );
+        }
+        return rc;
+    }
+
+    /* check that we have at least one region in the spot */
+    if ( count < 1 )
+    {
+        rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+        LOGERR( klogErr, rc, "(count<1) in region-check()'" );
+    }
+
+    for ( i = 0; i < count && rc == 0; ++ i )
+    {
+        a_region = VectorGet ( v, i );
+        if ( a_region == NULL )
+        {
+            rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+            LOGERR( klogErr, rc, "(a_region==NULL) in region-check()'" );
+        }
+        else
+        {
+            /* check that the region has no gap and is not overlapping */
+            if ( a_region->start != start )
+            {
+                rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+                PLOGERR( klogErr, ( klogErr, rc, "(a_region->start($(rstart))!=start($(start))) in region-check()'",
+                         "rstart=%u,start=%u", a_region->start, start ) );
+            }
+            else
+            {
+                /* check that the region is ascending */
+                if ( a_region->end < start )
+                {
+                    rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+                    LOGERR( klogErr, rc, "(a_region->end<start) in region-check()'" );
+                }
+                start = a_region->end;
+            }
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        /* check that the region is fully covered */
+        if ( a_region->end != spot_len )
+        {
+            rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+            LOGERR( klogErr, rc, "(a_region->end!=spot_len) in region-check()'" );
+        }
+    }
+    return rc;
+}
+
+
+rc_t rgn_load( regions *rgn, const uint32_t spot_id, 
+               region_type_mapping *mapping, const uint32_t spot_len )
+{
+    rc_t rc;
+    uint64_t row_count = rgn->hdf5_regions.extents[ 0 ];
+
+    /* predefine that we have no HQ-regions read */
+    rgn->hq_rgn.start = 0;
+    rgn->hq_rgn.end = 0;
+
+    /* clear out the read and the sorted vector */
+    rc = rgn_vector_move( &rgn->read_Regions, &rgn->stock_Regions );
+    if ( rc == 0 )
+        rc = rgn_vector_move( &rgn->sort_Regions, &rgn->stock_Regions );
+
+    if ( rc == 0 )
+    {
+        if ( !( rgn->spot_id == 0 || rgn->spot_id == ( spot_id - 1 ) ) )
+            rc = RC( rcExe, rcNoTarg, rcLoading, rcParam, rcInvalid );
+    }
+
+    if ( rc == 0 )
+    {
+        int32_t * block;
+        bool have_high_quality = false;
+        do
+        {
+            int32_t idx = rgn->table_index[ rgn->offset ];
+            block = &( rgn->complete_table[ idx * RGN_COLUMN_COUNT ] );
+            if ( block[ pacbio_idx_spot_id ] == spot_id )
+            {
+                rc = rgn_store_block( &(rgn->stock_Regions), &(rgn->read_Regions),
+                                      &(rgn->hq_rgn), block,
+                                      mapping, & have_high_quality );
+                if ( rc == 0 )
+                    rgn->offset++;
+            }
+
+        } while( rc == 0 && 
+                 block[ pacbio_idx_spot_id ] == spot_id &&
+                 rgn->offset < row_count );
+        rgn->spot_id  = spot_id;
+        rgn->spot_len = spot_len;
+    }
+
+    if ( rc == 0 )
+    {
+#if 0  /**** does not seem to match PacBio ***/
+        /* changes READ_FILTER and READ_TYPE if a region is completely
+           outside of the hq-region... ( if we have one ) 
+           if there is none the whole spot becomes one CRITERIA/TECHNICAL-read */
+        rc = rgn_apply_filter( &(rgn->stock_Regions), &(rgn->read_Regions),
+                               &(rgn->hq_rgn), rgn->spot_id, rgn->spot_len );
+#endif
+
+
+        /* INPUT : rgn->read_Regions / OUTPUT : rgn->sort_Regions */
+        /* fills gaps, corrects off-by-1-errors and overlapping regions */
+        if ( rc == 0 )
+            rc = rgn_correct( &(rgn->stock_Regions), 
+                              &(rgn->read_Regions), &(rgn->sort_Regions), 
+                              rgn->spot_id, rgn->spot_len, &(rgn->stat) );
+
+        /* INPUT : rgn->sort_Regions / OUTPUT : rgn->read_Regions */
+        /* merges consecutive regions if READ_TYPE/READ_FILTER are the same */
+        if ( rc == 0 )
+            rc = rgn_merge_consecutive_regions( &(rgn->stock_Regions),
+                                                &(rgn->sort_Regions),
+                                                &(rgn->read_Regions) );
+
+        /* INPUT : rgn->read_Regions */
+        /* checks that the whole spot is covered, no overlapps/gaps occur,
+           regions have to be sorted in ascending order */
+
+        if ( rc == 0 )
+            rc = rgn_check( &(rgn->read_Regions), rgn->spot_len );
+
+    }
+    return rc;
+}
+
+
+static rc_t rgn_resize_data_32( regions *rgn )
+{
+    rc_t rc = 0;
+    size_t needed_len;
+
+    needed_len = ( sizeof( *rgn->data_32 ) * VectorLength( &rgn->read_Regions ) );
+    if ( rgn->data_32 == NULL )
+    {
+        rgn->data_32 = malloc( needed_len );
+    }
+    else if ( rgn->data_32_len < VectorLength( &rgn->read_Regions ) )
+    {
+        rgn->data_32 = realloc ( rgn->data_32, needed_len );
+    }
+    if ( rgn->data_32 == NULL )
+        rc = RC( rcExe, rcNoTarg, rcLoading, rcMemory, rcExhausted );
+    else
+        rgn->data_32_len = VectorLength( &rgn->read_Regions );
+    return rc;
+}
+
+
+void rgn_set_filter_value_for_all( regions *rgn, const uint32_t filter_value )
+{
+    uint32_t i, n = VectorLength( &rgn->read_Regions );
+    for ( i = 0; i < n; ++i )
+    {
+        region * a_region = VectorGet ( &rgn->read_Regions, i );
+        if ( a_region != NULL )
+            a_region->filter = filter_value;
+    }
+}
+
+
+static rc_t rgn_resize_data_8( regions *rgn )
+{
+    rc_t rc = 0;
+    size_t needed_len;
+
+    needed_len = ( sizeof( *rgn->data_8 ) * VectorLength( &rgn->read_Regions ) );
+    needed_len = (needed_len + 3 ) & ~3; /** to make valgrind happy ***/
+    if ( rgn->data_8 == NULL )
+    {
+        rgn->data_8 = malloc( needed_len );
+    }
+    else if ( rgn->data_8_len < VectorLength( &rgn->read_Regions ) )
+    {
+        rgn->data_8 = realloc ( rgn->data_8, needed_len );
+    }
+    if ( rgn->data_8 == NULL )
+        rc = RC( rcExe, rcNoTarg, rcLoading, rcMemory, rcExhausted );
+    else
+        rgn->data_8_len = VectorLength( &rgn->read_Regions );
+    return rc;
+}
+
+
+rc_t rgn_start_data( regions *rgn, uint32_t *count )
+{
+    rc_t rc = rgn_resize_data_32( rgn );
+    if ( rc == 0 )
+    {
+        uint32_t i;
+        uint32_t *ptr = rgn->data_32;
+        *count = VectorLength( &rgn->read_Regions );
+        for ( i = 0; i < (*count); ++i )
+        {
+            region * a_region = VectorGet ( &rgn->read_Regions, i );
+            if ( a_region != NULL )
+                ptr[ i ] = a_region->start;
+        }
+    }
+    return rc;
+}
+
+
+rc_t rgn_len_data( regions *rgn, uint32_t *count )
+{
+    rc_t rc = rgn_resize_data_32( rgn );
+    if ( rc == 0 )
+    {
+        uint32_t i;
+        uint32_t *ptr = rgn->data_32;
+        *count = VectorLength( &rgn->read_Regions );
+        for ( i = 0; i < (*count); ++i )
+        {
+            region * a_region = VectorGet ( &rgn->read_Regions, i );
+            if ( a_region != NULL )
+                ptr[ i ] = ( a_region->end - a_region->start );
+        }
+    }
+    return rc;
+}
+
+
+rc_t rgn_type_data( regions *rgn, uint32_t *count )
+{
+    rc_t rc = rgn_resize_data_8( rgn );
+    if ( rc == 0 )
+    {
+        uint32_t i;
+        uint8_t *ptr = rgn->data_8;
+
+        *count = VectorLength( &rgn->read_Regions );
+        for ( i = 0; i < (*count); ++i )
+        {
+            region * a_region = VectorGet ( &rgn->read_Regions, i );
+            if ( a_region != NULL )
+                ptr[ i ] = a_region->type;
+        }
+    }
+    return rc;
+}
+
+
+rc_t rgn_filter_data( regions *rgn, uint32_t *count )
+{
+    rc_t rc = rgn_resize_data_8( rgn );
+    if ( rc == 0 )
+    {
+        uint32_t i;
+        uint8_t *ptr = rgn->data_8;
+
+        *count = VectorLength( &rgn->read_Regions );
+        for ( i = 0; i < (*count); ++i )
+        {
+            region * a_region = VectorGet ( &rgn->read_Regions, i );
+            if ( a_region != NULL )
+                ptr[ i ] = a_region->filter;
+        }
+    }
+    return rc;
+}
+
+
+rc_t rgn_label_start_data( regions *rgn, uint32_t *count )
+{
+    rc_t rc = rgn_resize_data_32( rgn );
+    if ( rc == 0 )
+    {
+        uint32_t i;
+        uint32_t *ptr = rgn->data_32;
+        uint32_t value;
+
+        *count = VectorLength( &rgn->read_Regions );
+        for ( i = 0; i < (*count); ++i )
+        {
+            region * a_region = VectorGet ( &rgn->read_Regions, i );
+            value = label_lowquality_start; /* default value */
+            if ( a_region != NULL )
+                switch( a_region->type )
+                {
+                case SRA_READ_TYPE_BIOLOGICAL : 
+                    value = label_insert_start;
+                    break;
+                case SRA_READ_TYPE_TECHNICAL  :
+                    value = label_adapter_start;
+/*
+                    if ( a_region->filter == SRA_READ_FILTER_PASS )
+                        value = label_adapter_start;
+                    else
+                        value = label_lowquality_start;
+*/
+                    break;
+                }
+            ptr[ i ] = value;
+        }
+    }
+    return rc;
+}
+
+
+rc_t rgn_label_len_data( regions *rgn, uint32_t *count )
+{
+    rc_t rc = rgn_resize_data_32( rgn );
+    if ( rc == 0 )
+    {
+        uint32_t i;
+        uint32_t *ptr = rgn->data_32;
+        uint32_t value;
+
+        *count = VectorLength( &rgn->read_Regions );
+        for ( i = 0; i < (*count); ++i )
+        {
+            region * a_region = VectorGet ( &rgn->read_Regions, i );
+            value = label_lowquality_len; /* default value */
+            if ( a_region != NULL )
+                switch ( a_region->type )
+                {
+                case SRA_READ_TYPE_BIOLOGICAL : 
+                    value = label_insert_len;
+                    break;
+                case SRA_READ_TYPE_TECHNICAL  : 
+                    value = label_adapter_len;
+/*
+                    if ( a_region->filter == SRA_READ_FILTER_PASS )
+                        value = label_adapter_len;
+                    else
+                        value = label_lowquality_len;
+*/
+                    break;
+                }
+            ptr[ i ] = value;
+        }
+    }
+    return rc;
+}
+
+
+static const char rgn_string_adapter[] = "Adapter";
+static const char rgn_string_insert[] = "Insert";
+static const char rgn_string_hq[] = "HQRegion";
+static const char rgn_string_ga[] = "GlobalAccuracy";
+
+
+static int rgn_str_cmp( const char *a, const char *b )
+{
+    size_t asize = string_size ( a );
+    size_t bsize = string_size ( b );
+    return strcase_cmp ( a, asize, b, bsize, ( asize > bsize ) ? asize : bsize );
+}
+
+
+static rc_t rgn_set_type_code( int32_t *dst, const uint32_t type_idx )
+{
+    if ( *dst == -1 )
+    {
+        *dst = type_idx;
+        return 0;
+    }
+    else
+        return RC( rcExe, rcNoTarg, rcLoading, rcName, rcDuplicate );
+}
+
+
+static rc_t rgn_type_string( const char *type_string, uint32_t type_idx, 
+                             region_type_mapping *mapping )
+{
+    if ( rgn_str_cmp( type_string, rgn_string_adapter ) == 0 )
+        return rgn_set_type_code( &(mapping->rgn_type_adapter), type_idx );
+
+    if ( rgn_str_cmp( type_string, rgn_string_insert ) == 0 )
+        return rgn_set_type_code( &(mapping->rgn_type_insert), type_idx );
+
+    if ( rgn_str_cmp( type_string, rgn_string_hq ) == 0 )
+        return rgn_set_type_code( &(mapping->rgn_type_hq), type_idx );
+
+    if ( rgn_str_cmp( type_string, rgn_string_ga ) == 0 )
+        return rgn_set_type_code( &(mapping->rgn_type_ga), type_idx );
+
+    return RC( rcExe, rcNoTarg, rcLoading, rcName, rcUnknown );
+}
+
+
+/* read the mapping out of the region-types out of a string... */
+rc_t rgn_extract_type_mappings( const KNamelist *rgn_names,
+                                region_type_mapping *mapping, bool check_completenes )
+{
+    rc_t rc = 0;
+    uint32_t count, idx;
+
+    mapping->rgn_type_adapter = -1;
+    mapping->rgn_type_insert  = -1;
+    mapping->rgn_type_hq      = -1;
+    mapping->rgn_type_ga      = -1;
+
+    rc = KNamelistCount ( rgn_names, &count );
+    for ( idx = 0; idx < count && rc == 0; ++idx )
+    {
+        const char *name;
+        rc = KNamelistGet ( rgn_names, idx, &name );
+        if ( rc == 0 )
+            rgn_type_string( name, idx, mapping );
+    }
+
+    if ( rc == 0 && check_completenes )
+    {
+        if ( mapping->rgn_type_adapter == -1 ||
+             mapping->rgn_type_insert == -1 ||
+             mapping->rgn_type_hq == -1 )
+            rc = RC( rcExe, rcNoTarg, rcLoading, rcName, rcIncomplete );
+    }
+
+    mapping->count_of_unknown_rgn_types = 0;
+    return rc;
+}
+
+
+
+rc_t rgn_show_type_mappings( region_type_mapping *mapping )
+{
+    rc_t rc;
+    if ( mapping == NULL )
+        rc = RC( rcExe, rcNoTarg, rcLoading, rcParam, rcInvalid );
+    else
+        rc = KOutMsg( "rgn-type-mapping->adapter   = %i\n", mapping->rgn_type_adapter );
+    if ( rc == 0 )
+        rc = KOutMsg( "rgn-type-mapping->insert    = %i\n", mapping->rgn_type_insert );
+    if ( rc == 0 )
+        rc = KOutMsg( "rgn-type-mapping->high_qual = %i\n", mapping->rgn_type_hq );
+    if ( rc == 0 )
+        rc = KOutMsg( "rgn-type-mapping->globe_acc = %i\n", mapping->rgn_type_ga );
+    return rc;
+}
+
diff --git a/tools/pacbio-load/pl-regions.h b/tools/pacbio-load/pl-regions.h
new file mode 100644
index 0000000..464ac5e
--- /dev/null
+++ b/tools/pacbio-load/pl-regions.h
@@ -0,0 +1,140 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_pl_regions_
+#define _h_pl_regions_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "pl-tools.h"
+#include <klib/vector.h>
+#include <klib/sort.h>
+#include <klib/rc.h>
+#include <insdc/sra.h>
+
+
+#define RGN_COLUMN_COUNT 5
+#define MIN_BIOLOGICAL_LEN 10
+
+typedef struct region_type_mapping
+{
+    int32_t rgn_type_adapter;   /* technical */
+    int32_t rgn_type_insert;    /* biological */
+    int32_t rgn_type_hq;        /* HighQualityRegion */
+    int32_t rgn_type_ga;        /* GlobalAccuracy ??? */
+
+    uint64_t count_of_unknown_rgn_types;
+} region_type_mapping;
+
+
+typedef struct region
+{
+    int32_t spot_id;
+    int32_t type;
+    int32_t start;
+    int32_t end;
+    int32_t filter;
+} region;
+
+
+typedef struct regions_stat
+{
+    uint32_t inserts;
+    uint32_t inserts_spots;
+    uint32_t expands_a;
+    uint32_t expands_i;
+    uint32_t expands_spots;
+    uint32_t end_gap;
+    uint32_t overlapps;
+    uint32_t removed;
+} regions_stat;
+
+
+typedef struct hq_region
+{
+    uint32_t start;
+    uint32_t end;
+} hq_region;
+
+
+typedef struct regions
+{
+    af_data hdf5_regions;
+    Vector read_Regions;
+    Vector sort_Regions;
+    Vector stock_Regions;
+    hq_region hq_rgn;
+    uint64_t offset;
+    uint32_t spot_id;
+    uint32_t spot_len;
+    uint32_t * data_32;
+    uint8_t * data_8;
+    size_t data_32_len;
+    size_t data_8_len;
+
+    regions_stat stat;
+
+    int32_t * complete_table;
+    int32_t * table_index;
+} regions;
+
+
+void rgn_init( regions *rgn );
+void rgn_free( regions *rgn );
+
+static const char def_label[] = "AdapterInsertLowQuality";
+static const size_t def_label_len = 23;
+
+static const uint32_t label_adapter_start    = 0;
+static const uint32_t label_adapter_len      = 7;
+static const uint32_t label_insert_start     = 7;
+static const uint32_t label_insert_len       = 6;
+static const uint32_t label_lowquality_start = 13;
+static const uint32_t label_lowquality_len   = 10;
+
+rc_t rgn_open( const KDirectory *hdf5_dir, regions *rgn );
+
+rc_t rgn_load( regions *rgn, const uint32_t spot_id, 
+               region_type_mapping *mapping, const uint32_t spot_len );
+
+void rgn_set_filter_value_for_all( regions *rgn, const uint32_t filter_value );
+
+rc_t rgn_start_data( regions *rgn, uint32_t *count );
+rc_t rgn_len_data( regions *rgn, uint32_t *count );
+rc_t rgn_type_data( regions *rgn, uint32_t *count );
+rc_t rgn_filter_data( regions *rgn, uint32_t *count );
+rc_t rgn_label_start_data( regions *rgn, uint32_t *count );
+rc_t rgn_label_len_data( regions *rgn, uint32_t *count );
+
+rc_t rgn_extract_type_mappings( const KNamelist *rgn_names, region_type_mapping *mapping, bool check_completenes );
+rc_t rgn_show_type_mappings( region_type_mapping *mapping );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/pacbio-load/pl-sequence.c b/tools/pacbio-load/pl-sequence.c
new file mode 100644
index 0000000..050bc17
--- /dev/null
+++ b/tools/pacbio-load/pl-sequence.c
@@ -0,0 +1,928 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "pl-sequence.h"
+#include "pl-regions.h"
+#include <kfs/kfs-priv.h>       /* access to getmeta of KArrayfile*/
+#include <sra/pacbio.h>
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+
+const char * seq_tab_names[] = 
+{ 
+    /* base-space */
+    "READ",
+    "QUALITY",
+    "NREADS",
+    "(INSDC:SRA:platform_id)PLATFORM",
+    "LABEL",
+    "LABEL_START",
+    "LABEL_LEN",
+    "READ_TYPE",
+    "READ_START",
+    "READ_LEN",
+    "CLIP_QUALITY_LEFT",
+    "CLIP_QUALITY_RIGHT",
+    "READ_FILTER",
+
+    /* pulse-space */
+    "PRE_BASE_FRAMES",
+    "WIDTH_IN_FRAMES",
+    "(U16)PULSE_INDEX",
+    "PULSE_INDEX",
+    "HOLE_NUMBER",
+    "HOLE_STATUS",
+    "HOLE_XY",
+    "INSERTION_QV",
+    "DELETION_QV",
+    "DELETION_TAG",
+    "SUBSTITUTION_QV",
+    "SUBSTITUTION_TAG"
+};
+
+
+static void init_BaseCalls( BaseCalls *tab )
+{
+    init_BaseCalls_cmn( &tab->cmn );
+    rgn_init( &tab->rgn );
+    init_array_file( &tab->PreBaseFrames );
+    init_array_file( &tab->PulseIndex );
+    init_array_file( &tab->WidthInFrames );
+}
+
+
+static void close_BaseCalls( BaseCalls *tab )
+{
+    close_BaseCalls_cmn( &tab->cmn );
+    rgn_free( &tab->rgn );
+    free_array_file( &tab->PreBaseFrames );
+    free_array_file( &tab->PulseIndex );
+    free_array_file( &tab->WidthInFrames );
+}
+
+
+static rc_t open_BaseCalls( const KDirectory *hdf5_dir, BaseCalls *tab,
+                            const char * path, bool cache_content, bool * rgn_present )
+{
+    rc_t rc;
+
+    init_BaseCalls( tab );
+    rc = open_BaseCalls_cmn( hdf5_dir, &tab->cmn, false, path, cache_content, false );
+    if ( rc == 0 )
+    {
+        rc_t rc1 = rgn_open( hdf5_dir, &tab->rgn );
+        if ( rgn_present != NULL )
+            *rgn_present = ( rc1 == 0 );
+
+        open_element( hdf5_dir, &tab->PreBaseFrames, path, "PreBaseFrames", 
+                               PRE_BASE_FRAMES_BITSIZE, PRE_BASE_FRAMES_COLS,
+                               true, cache_content, true );
+
+        if ( rc == 0 )
+        {
+            rc = open_element( hdf5_dir, &tab->PulseIndex, path, "PulseIndex", 
+                               PULSE_INDEX_BITSIZE_16, PULSE_INDEX_COLS,
+                               false, cache_content, false );
+            /* try again if it is not 16 bit! */
+            if ( rc != 0 )
+                rc = open_element( hdf5_dir, &tab->PulseIndex, path, "PulseIndex", 
+                                   PULSE_INDEX_BITSIZE_32, PULSE_INDEX_COLS,
+                                   true, cache_content, false );
+        }
+
+        open_element( hdf5_dir, &tab->WidthInFrames, path, "WidthInFrames",
+                               WIDTH_IN_FRAMES_BITSIZE, WIDTH_IN_FRAMES_COLS,
+                               true, cache_content, true );
+
+        if ( rc != 0 )
+            close_BaseCalls( tab ); /* releases only initialized elements */
+    }
+    return rc;
+}
+
+
+static bool check_BaseCall_totalcount( BaseCalls *tab, const uint64_t expected )
+{
+    bool res = true;
+
+    if ( tab->PreBaseFrames.rc == 0 )
+        res = check_table_count( &tab->PreBaseFrames, "PreBaseFrames", expected );
+
+    if ( res && tab->PulseIndex.rc == 0 )
+        res = check_table_count( &tab->PulseIndex, "PulseIndex", expected );
+
+    if ( res && tab->WidthInFrames.rc == 0 )
+        res = check_table_count( &tab->WidthInFrames, "WidthInFrames", expected );
+
+    if ( res && tab->cmn.Basecall.rc == 0 )
+        res = check_table_count( &tab->cmn.Basecall, "Basecall", expected );
+
+    if ( res && tab->cmn.DeletionQV.rc == 0 )
+        res = check_table_count( &tab->cmn.DeletionQV, "DeletionQV", expected );
+
+    if ( res && tab->cmn.DeletionTag.rc == 0 )
+        res = check_table_count( &tab->cmn.DeletionTag, "DeletionTag", expected );
+
+    if ( res && tab->cmn.InsertionQV.rc == 0 )
+        res = check_table_count( &tab->cmn.InsertionQV, "InsertionQV", expected );
+
+    if ( res && tab->cmn.QualityValue.rc == 0 )
+        res = check_table_count( &tab->cmn.QualityValue, "QualityValue", expected );
+
+    if ( res && tab->cmn.SubstitutionQV.rc == 0 )
+        res = check_table_count( &tab->cmn.SubstitutionQV, "SubstitutionQV", expected );
+
+    if ( res && tab->cmn.SubstitutionTag.rc == 0 )
+        res = check_table_count( &tab->cmn.SubstitutionTag, "SubstitutionTag", expected );
+    return res;
+}
+
+
+static rc_t seq_load_zero_bases( VCursor *cursor, BaseCalls *tab,
+                                 const uint32_t *col_idx )
+{
+    uint32_t dummy_src;
+    rc_t rc = vdb_write_value( cursor, col_idx[ seq_tab_READ ],
+                               &dummy_src, BASECALL_BITSIZE, 0, "seq.Basecall" );
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ seq_tab_QUALITY ],
+                              &dummy_src, QUALITY_VALUE_BITSIZE, 0, "seq.QualityValue" );
+
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ seq_tab_INSERTION_QV ],
+                              &dummy_src, INSERTION_QV_BITSIZE, 0, "seq.InsertionQV" );
+
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ seq_tab_DELETION_QV ],
+                              &dummy_src, DELETION_QV_BITSIZE, 0, "seq.DeletionQV" );
+
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ seq_tab_DELETION_TAG ],
+                              &dummy_src, DELETION_TAG_BITSIZE, 0, "seq.DeletionTag" );
+
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ seq_tab_SUBSTITUTION_QV ],
+                              &dummy_src, SUBSTITUTION_QV_BITZISE, 0, "seq.SubstitutionQV" );
+
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ seq_tab_SUBSTITUTION_TAG ],
+                              &dummy_src, SUBSTITUTION_TAG_BITSIZE, 0, "seq.SubstitutionTag" );
+
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ seq_tab_PRE_BASE_FRAMES ],
+                              &dummy_src, PRE_BASE_FRAMES_BITSIZE, 0, "seq.PreBaseFrames" );
+
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ seq_tab_WIDTH_IN_FRAMES ],
+                              &dummy_src, WIDTH_IN_FRAMES_BITSIZE, 0, "seq.WidthInFrames" );
+
+    if ( rc == 0 )
+    {
+        if ( tab->PulseIndex.element_bits == PULSE_INDEX_BITSIZE_16 )
+            rc = vdb_write_value( cursor, col_idx[ seq_tab_PULSE_INDEX_16 ],
+                                  &dummy_src, PULSE_INDEX_BITSIZE_16, 0, "seq.PulseIndex16" );
+        else
+            rc = vdb_write_value( cursor, col_idx[ seq_tab_PULSE_INDEX_32 ],
+                                  &dummy_src, PULSE_INDEX_BITSIZE_32, 0, "seq.PulseIndex32" );
+    }
+    return rc;
+}
+
+
+static rc_t seq_load_spot_bases( VCursor *cursor, BaseCalls *tab,
+                                 const uint32_t *col_idx, zmw_row * spot )
+{
+    rc_t rc = 0;
+    size_t n_bytes = spot->NumEvent * 4;
+
+    /* we make a buffer to store NumEvent 32-bit-values
+      (that is so far the biggest value we have to read per DNA-BASE) */
+    char * buffer = malloc( n_bytes );
+    if ( buffer == NULL )
+    {
+        rc = RC( rcExe, rcNoTarg, rcAllocating, rcMemory, rcExhausted );
+        PLOGERR( klogErr, ( klogErr, rc, "cannot allocate $(nbytes) bytes to read seq-data",
+                            "nbytes=%u", n_bytes ) );
+    }
+
+    if ( rc == 0 )
+        rc = transfer_bits( cursor, col_idx[ seq_tab_READ ],
+            &tab->cmn.Basecall, buffer, spot->offset, spot->NumEvent,
+            BASECALL_BITSIZE, "seq.Basecall" );
+
+    if ( rc == 0 )
+        rc = transfer_bits( cursor, col_idx[ seq_tab_QUALITY ],
+            &tab->cmn.QualityValue, buffer, spot->offset, spot->NumEvent,
+            QUALITY_VALUE_BITSIZE, "seq.QualityValue" );
+
+    /* this is all optional! ( but we are writing zero's into it if we have no source ... )---> */
+    if ( rc == 0 )
+    {
+        if ( tab->cmn.InsertionQV.rc == 0 )
+            rc = transfer_bits( cursor, col_idx[ seq_tab_INSERTION_QV ],
+                &tab->cmn.InsertionQV, buffer, spot->offset, spot->NumEvent,
+                INSERTION_QV_BITSIZE, "seq.InsertionQV" );
+        else
+            rc = vdb_write_value( cursor, col_idx[ seq_tab_INSERTION_QV ],
+                buffer, INSERTION_QV_BITSIZE, 0, "seq.InsertionQV" );
+    }
+
+    if ( rc == 0 )
+    {
+        if ( tab->cmn.DeletionQV.rc == 0 )
+            rc = transfer_bits( cursor, col_idx[ seq_tab_DELETION_QV ],
+                &tab->cmn.DeletionQV, buffer, spot->offset, spot->NumEvent,
+                DELETION_QV_BITSIZE, "seq.DeletionQV" );
+        else
+            rc = vdb_write_value( cursor, col_idx[ seq_tab_DELETION_QV ],
+                buffer, DELETION_QV_BITSIZE, 0, "seq.DeletionQV" );
+    }
+
+    if ( rc == 0 )
+    {
+        if ( tab->cmn.DeletionTag.rc == 0 )
+            rc = transfer_bits( cursor, col_idx[ seq_tab_DELETION_TAG ],
+                &tab->cmn.DeletionTag, buffer, spot->offset, spot->NumEvent,
+                DELETION_TAG_BITSIZE, "seq.DeletionTag" );
+        else
+            rc = vdb_write_value( cursor, col_idx[ seq_tab_DELETION_TAG ],
+                buffer, DELETION_TAG_BITSIZE, 0, "seq.DeletionTag" );
+    }
+
+    if ( rc == 0 )
+    {
+        if ( tab->cmn.SubstitutionQV.rc == 0 )
+            rc = transfer_bits( cursor, col_idx[ seq_tab_SUBSTITUTION_QV ],
+                &tab->cmn.SubstitutionQV, buffer, spot->offset, spot->NumEvent,
+                SUBSTITUTION_QV_BITZISE, "seq.SubstitutionQV" );
+        else
+            rc = vdb_write_value( cursor, col_idx[ seq_tab_SUBSTITUTION_QV ],
+                buffer, SUBSTITUTION_QV_BITZISE, 0, "seq.SubstitutionQV" );
+    }
+
+    if ( rc == 0 )
+    {
+        if ( tab->cmn.SubstitutionTag.rc == 0 )
+            rc = transfer_bits( cursor, col_idx[ seq_tab_SUBSTITUTION_TAG ],
+                &tab->cmn.SubstitutionTag, buffer, spot->offset, spot->NumEvent,
+                SUBSTITUTION_TAG_BITSIZE, "seq.SubstitutionTag" );
+        else
+            rc = vdb_write_value( cursor, col_idx[ seq_tab_SUBSTITUTION_TAG ],
+                buffer, SUBSTITUTION_TAG_BITSIZE, 0, "seq.SubstitutionTag" );
+    }
+
+    if ( rc == 0 )
+    {
+        if ( tab->PreBaseFrames.rc == 0 )
+            rc = transfer_bits( cursor, col_idx[ seq_tab_PRE_BASE_FRAMES ],
+                &tab->PreBaseFrames, buffer, spot->offset, spot->NumEvent,
+                PRE_BASE_FRAMES_BITSIZE, "seq.PreBaseFrames" );
+        else
+            rc = vdb_write_value( cursor, col_idx[ seq_tab_PRE_BASE_FRAMES ],
+                buffer, PRE_BASE_FRAMES_BITSIZE, 0, "seq.PreBaseFrames" );
+    }
+
+    if ( rc == 0 )
+    {
+        if ( tab->WidthInFrames.rc == 0 )
+            rc = transfer_bits( cursor, col_idx[ seq_tab_WIDTH_IN_FRAMES ],
+                &tab->WidthInFrames, buffer, spot->offset, spot->NumEvent,
+                WIDTH_IN_FRAMES_BITSIZE, "seq.WidthInFrames" );
+        else
+            rc = vdb_write_value( cursor, col_idx[ seq_tab_WIDTH_IN_FRAMES ],
+                buffer, WIDTH_IN_FRAMES_BITSIZE, 0, "seq.WidthInFrames" );
+    }
+    /* <--- this is all optional! */
+
+
+    if ( rc == 0 )
+    {
+        if ( tab->PulseIndex.element_bits == PULSE_INDEX_BITSIZE_16 )
+            rc = transfer_bits( cursor, col_idx[ seq_tab_PULSE_INDEX_16 ],
+                &tab->PulseIndex, buffer, spot->offset, spot->NumEvent,
+                PULSE_INDEX_BITSIZE_16, "seq.PulsIndex16" );
+        else
+            rc = transfer_bits( cursor, col_idx[ seq_tab_PULSE_INDEX_32 ],
+                &tab->PulseIndex, buffer, spot->offset, spot->NumEvent,
+                PULSE_INDEX_BITSIZE_32, "seq.PulsIndex32" );
+    }
+
+    if ( buffer != NULL )
+        free( buffer );
+    return rc;
+}
+
+
+static rc_t seq_load_read_desc( VCursor *cursor, const uint32_t *col_idx,
+                                region_type_mapping *mapping,
+                                zmw_row * spot, BaseCalls *tab )
+{
+    uint32_t n;
+    /* take the spot-descriptors out of the region-table
+       and write them... */
+
+    rc_t rc = rgn_load( &tab->rgn, spot->spot_nr, mapping, spot->NumEvent );
+    if ( rc != 0 )
+        PLOGERR( klogErr, ( klogErr, rc, "rgn_load( spot #$(spotnr) ) failed",
+                            "spotnr=%u", spot->spot_nr ) );
+
+    if ( rc == 0 )
+    {
+        uint32_t filter_value = SRA_READ_FILTER_PASS;
+        if ( spot->HoleStatus != SRA_PACBIO_HOLE_SEQUENCING )
+        {
+            filter_value = SRA_READ_FILTER_CRITERIA;
+        }
+        rgn_set_filter_value_for_all( &tab->rgn, filter_value );
+    }
+
+    if ( rc == 0 )
+    {
+        /* write the READ_START - vector */
+        rc = rgn_start_data( &tab->rgn, &n );
+
+/*
+        if ( n > 255 )
+            OUTMSG(( "spot #%lu has %u READS\n", spot->spot_nr, n ));
+*/
+
+        if ( rc != 0 )
+            PLOGERR( klogErr, ( klogErr, rc, "rgn_start_data( $(spotnr) ) failed",
+                                "spotnr=%u", spot->spot_nr ) );
+        else
+            rc = vdb_write_value( cursor, col_idx[ seq_tab_READ_START ],
+                                  tab->rgn.data_32, 32, n, "seq.READ_START" );
+    }
+
+    /* write the READ_LEN - vector */
+    if ( rc == 0 )
+    {
+        rc = rgn_len_data( &tab->rgn, &n );
+        if ( rc != 0 )
+            PLOGERR( klogErr, ( klogErr, rc, "rgn_len_data( $(spotnr) ) failed",
+                                "spotnr=%u", spot->spot_nr ) );
+        else
+            rc = vdb_write_value( cursor, col_idx[ seq_tab_READ_LEN ],
+                                  tab->rgn.data_32, 32, n, "seq.READ_LEN" );
+    }
+
+    /* write the READ_TYPE - vector */
+    if ( rc == 0 )
+    {
+        rc = rgn_type_data( &tab->rgn, &n );
+        if ( rc != 0 )
+            PLOGERR( klogErr, ( klogErr, rc, "rgn_type_data( $(spotnr) ) failed",
+                                "spotnr=%u", spot->spot_nr ) );
+        else
+            rc = vdb_write_value( cursor, col_idx[ seq_tab_READ_TYPE ],
+                                  tab->rgn.data_8, 8, n, "seq.READ_TYPE" );
+
+    }
+
+    /* write the READ_FILTER - vector */
+    if ( rc == 0 )
+    {
+        rc = rgn_filter_data( &tab->rgn, &n );
+        if ( rc != 0 )
+            PLOGERR( klogErr, ( klogErr, rc, "rgn_filter_data( $(spotnr) ) failed",
+                                "spotnr=%u", spot->spot_nr ) );
+        else
+            rc = vdb_write_value( cursor, col_idx[ seq_tab_READ_FILTER ],
+                                  tab->rgn.data_8, 8, n, "seq.READ_FILTER" );
+    }
+
+
+    /* write the LABEL ( a constant string defined in pl-regions.h" ) */
+    if ( rc == 0 )
+    {
+        rc = vdb_write_value( cursor, col_idx[ seq_tab_LABEL ],
+                              (void*)def_label, 8, def_label_len, "seq.LABEL" );
+    }
+
+    /* write the LABEL_START ( index into LABEL for every read ) */
+    if ( rc == 0 )
+    {
+        rc = rgn_label_start_data( &tab->rgn, &n );
+        if ( rc != 0 )
+            PLOGERR( klogErr, ( klogErr, rc, "rgn_label_start_data( $(spotnr) ) failed",
+                                "spotnr=%u", spot->spot_nr ) );
+        else
+            rc = vdb_write_value( cursor, col_idx[ seq_tab_LABEL_START ],
+                                  tab->rgn.data_32, 32, n, "seq.LABEL_START" );
+    }
+
+    /* write the LABEL_LEN ( index into LABEL for every read ) */
+    if ( rc == 0 )
+    {
+        rc = rgn_label_len_data( &tab->rgn, &n );
+        if ( rc != 0 )
+            PLOGERR( klogErr, ( klogErr, rc, "rgn_label_len_data( $(spotnr) ) failed",
+                                "spotnr=%u", spot->spot_nr ) );
+        else
+            rc = vdb_write_value( cursor, col_idx[ seq_tab_LABEL_LEN ],
+                                  tab->rgn.data_32, 32, n, "seq.LABEL_LEN" );
+    }
+
+    /* write how many regions(pacbio)/reads(ncbi) this spot has */
+    if ( rc == 0 )
+    {
+        if ( n > 255 )
+            n = 255;
+        rc = vdb_write_uint8( cursor, col_idx[ seq_tab_NREADS ],
+                              (uint8_t)n, "seq.NREADS" );
+    }
+
+    /* write hq-start/hq-end into CLIP_QUALITY_LEFT/RIGHT */
+    if ( rc == 0 )
+        rc = vdb_write_uint32( cursor, col_idx[ seq_tab_CLIP_QUALITY_LEFT ],
+                               tab->rgn.hq_rgn.start, "seq.CLIP_QUALITY_LEFT" );
+
+    if ( rc == 0 )
+        rc = vdb_write_uint32( cursor, col_idx[ seq_tab_CLIP_QUALITY_RIGHT ],
+                               tab->rgn.hq_rgn.end, "seq.CLIP_QUALITY_RIGHT" );
+
+    return rc;
+}
+
+
+static rc_t seq_load_one_spot( VCursor *cursor, const uint32_t *col_idx,
+                               zmw_row * spot, BaseCalls *tab )
+{
+    rc_t rc = vdb_write_uint32( cursor, col_idx[ seq_tab_READ_START ],
+                                0, "seq.READ_START" );
+    if ( rc == 0 )
+        rc = vdb_write_uint32( cursor, col_idx[ seq_tab_READ_LEN ],
+                               spot->NumEvent, "seq.READ_LEN" );
+    if ( rc == 0 )
+        rc = vdb_write_uint8( cursor, col_idx[ seq_tab_READ_TYPE ],
+                              SRA_READ_TYPE_BIOLOGICAL, "seq.READ_TYPE" );
+    if ( rc == 0 )
+        rc = vdb_write_uint8( cursor, col_idx[ seq_tab_READ_FILTER ],
+                              SRA_READ_FILTER_PASS, "seq.READ_FILTER" );
+    /* write the LABEL ( a constant string defined in pl-regions.h" ) */
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ seq_tab_LABEL ],
+                              (void*)def_label, 8, def_label_len, "seq.LABEL" );
+    if ( rc == 0 )
+        rc = vdb_write_uint32( cursor, col_idx[ seq_tab_LABEL_START ],
+                               label_insert_start, "seq.LABEL_START" );
+    if ( rc == 0 )
+        rc = vdb_write_uint32( cursor, col_idx[ seq_tab_LABEL_LEN ],
+                               label_insert_len, "seq.LABEL_LEN" );
+    if ( rc == 0 )
+        rc = vdb_write_uint8( cursor, col_idx[ seq_tab_NREADS ],
+                              1, "seq.NREADS" );
+    if ( rc == 0 )
+        rc = vdb_write_uint32( cursor, col_idx[ seq_tab_CLIP_QUALITY_LEFT ],
+                               1, "seq.CLIP_QUALITY_LEFT" );
+    if ( rc == 0 )
+        rc = vdb_write_uint32( cursor, col_idx[ seq_tab_CLIP_QUALITY_RIGHT ],
+                               spot->NumEvent -1, "seq.CLIP_QUALITY_RIGHT" );
+    return rc;
+}
+
+
+static rc_t seq_load_spot( VCursor *cursor, const uint32_t *col_idx,
+                           region_type_mapping *mapping, zmw_row * spot, 
+                           void * data )
+{
+    BaseCalls *tab = (BaseCalls *)data;
+    rc_t rc = VCursorOpenRow( cursor );
+    if ( rc != 0 )
+        PLOGERR( klogErr, ( klogErr, rc, "cannot open seq-row on spot# $(spotnr)",
+                            "spotnr=%u", spot->spot_nr ) );
+
+    if ( rc == 0 )
+        rc = vdb_write_uint32( cursor, col_idx[ seq_tab_HOLE_NUMBER ],
+                               spot->HoleNumber, "seq.HOLE_NUMBER" );
+    if ( rc == 0 )
+        rc = vdb_write_uint8( cursor, col_idx[ seq_tab_HOLE_STATUS ],
+                              spot->HoleStatus, "seq.HOLE_STATUS" );
+    if ( rc == 0 )
+        rc = vdb_write_value( cursor, col_idx[ seq_tab_HOLE_XY ],
+                              &spot->HoleXY, HOLE_XY_BITSIZE, 2, "seq.HOLE_XY" );
+
+    if ( rc == 0 )
+    {
+        /* we load the bases / quality-values and other data belonging
+           to this hole(bacbio)/spot(ncbi) */
+        if ( spot->NumEvent > 0 )
+            rc = seq_load_spot_bases( cursor, tab, col_idx, spot );
+        else
+            rc = seq_load_zero_bases( cursor, tab, col_idx );
+
+        /* we try to divide the spot into regions(pacbio)/reads(ncbi) */
+        if ( rc == 0 )
+        {
+            if ( mapping != NULL )
+                rc = seq_load_read_desc( cursor, col_idx, mapping, spot, tab );
+            else
+                rc = seq_load_one_spot( cursor, col_idx, spot, tab );
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        rc = VCursorCommitRow( cursor );
+        if ( rc != 0 )
+            PLOGERR( klogErr, ( klogErr, rc, "cannot commit seq-row on spot# $(spotnr)",
+                                "spotnr=%u", spot->spot_nr ) );
+    }
+
+    if ( rc == 0 )
+    {
+        rc = VCursorCloseRow( cursor );
+        if ( rc != 0 )
+            PLOGERR( klogErr, ( klogErr, rc, "cannot close seq-row on spot# $(spotnr)",
+                                "spotnr=%u", spot->spot_nr ) );
+    }
+    return rc;
+}
+
+
+static void seq_load_info( regions_stat * stat )
+{
+    KLogLevel tmp_lvl = KLogLevelGet();
+    KLogLevelSet( klogInfo );
+
+    if ( stat->expands_a > 0 )
+        PLOGMSG( klogInfo, ( klogInfo,
+             "adapter expanded: $(times) ( in $(spots) spots )",
+             "times=%u,spots=%u",
+             stat->expands_a, stat->expands_spots ));
+    if ( stat->expands_i > 0 )
+        PLOGMSG( klogInfo, ( klogInfo,
+             "insert expanded : $(times) ( in $(spots) spots )",
+             "times=%u,spots=%u",
+              stat->expands_i, stat->expands_spots ));
+    if ( stat->inserts > 0 )
+        PLOGMSG( klogInfo, ( klogInfo,
+             "regions inserted: $(times) ( in $(spots) spots )",
+             "times=%u,spots=%u",
+             stat->inserts, stat->inserts_spots ));
+    if ( stat->end_gap > 0 )
+        PLOGMSG( klogInfo, ( klogInfo,
+             "end-gap inserted: $(times)",
+             "times=%u", stat->end_gap ));
+    if ( stat->overlapps > 0 )
+        PLOGMSG( klogInfo, ( klogInfo,
+             "overlapping rngs: $(times)",
+             "times=%u", stat->overlapps ));
+    if ( stat->removed > 0 )
+        PLOGMSG( klogInfo, ( klogInfo,
+             "removed rgns    : $(times)",
+             "times=%u", stat->removed ));
+
+    KLogLevelSet( tmp_lvl );
+}
+
+
+
+void seq_report_totals( ld_context *lctx )
+{
+    const char* accession;
+    KLogLevel tmp_lvl = KLogLevelGet();
+    KLogLevelSet( klogInfo );
+
+    accession = strrchr( lctx->dst_path, '/' );
+    if( accession == NULL )
+        accession = lctx->dst_path;
+    else
+        accession++;
+
+    PLOGMSG( klogInfo, ( klogInfo, "loaded",
+            "severity=total,status=success,accession=%s,spot_count=%lu,base_count=%lu,bad_spots=0",
+             accession, lctx->total_seq_spots, lctx->total_seq_bases ));
+
+    KLogLevelSet( tmp_lvl );
+}
+
+
+static rc_t seq_loader( ld_context *lctx, KDirectory * hdf5_src, VCursor * cursor, const char * table_name )
+{
+    BaseCalls BaseCallsTab;
+    bool rgn_present;
+
+    /* opens all hdf5-tables, which are needed to load the sequence-table */
+    rc_t rc = open_BaseCalls( hdf5_src, &BaseCallsTab,
+                              "PulseData/BaseCalls", lctx->cache_content, &rgn_present );
+    if ( rc == 0 )
+    {
+        /* calculates the total number of bases, according to the zmw-table */
+        uint64_t total_bases = zmw_total( &BaseCallsTab.cmn.zmw );
+        /* calculates the total number of spots, according to the zmw-table */
+        uint64_t total_spots = BaseCallsTab.cmn.zmw.NumEvent.extents[ 0 ];
+
+        KLogLevel tmp_lvl = KLogLevelGet();
+        KLogLevelSet( klogInfo );
+        PLOGMSG( klogInfo, ( klogInfo,
+                 "loading sequence-table ( $(bases) bases / $(spots) spots ):",
+                 "bases=%lu,spots=%lu", total_bases, total_spots ));
+        KLogLevelSet( tmp_lvl );
+
+        /* checks that all tables, which are loaded do have the correct
+           number of values (the number that the zmw-table requests) */
+        if ( check_BaseCall_totalcount( &BaseCallsTab, total_bases ) )
+        {
+            region_type_mapping mapping;
+
+            if ( rgn_present )
+            {
+                const KNamelist *region_types;
+                /* read the meta-data-entry "RegionTypes" of the hdf5-regions-table
+                   into a KNamelist */
+                rc = KArrayFileGetMeta ( BaseCallsTab.rgn.hdf5_regions.af, "RegionTypes", &region_types );
+                if ( rc != 0 )
+                {
+                    LOGERR( klogErr, rc, "cannot read Regions.RegionTypes" );
+                }
+                else
+                {
+                    /* extract the region-type-mapping out of the read KNamelist */
+                    rc = rgn_extract_type_mappings( region_types, &mapping, false );
+                    KNamelistRelease ( region_types );
+                    if ( rc != 0 )
+                    {
+                        LOGERR( klogErr, rc, "cannot map regions-types" );
+                    }
+                }
+            }
+
+            if ( rc == 0 )
+            {
+                /* holds the vdb-column-index for every column we write */
+                uint32_t col_idx[ seq_tab_count ];
+                int32_t to_exclude;
+
+                /* depending on the bit-size of the PulseIndex-table in HDF5
+                   exclude the opposite column from VDB */
+                if ( BaseCallsTab.PulseIndex.element_bits == PULSE_INDEX_BITSIZE_16 )
+                    to_exclude = seq_tab_PULSE_INDEX_32;
+                else
+                    to_exclude = seq_tab_PULSE_INDEX_16;
+
+                /* add all columns to the vdb-cursor */
+                rc = add_columns( cursor, seq_tab_count, to_exclude, col_idx, seq_tab_names );
+                if ( rc == 0 )
+                {
+                    rc = VCursorOpen( cursor );
+                    if ( rc != 0 )
+                        LOGERR( klogErr, rc, "cannot open cursor on seq-table" );
+                    else
+                    {
+                        const uint8_t platform = SRA_PLATFORM_PACBIO_SMRT;
+
+                        rc = VCursorDefault ( cursor, col_idx[ seq_tab_PLATFORM ], 8, &platform, 0, 1 );
+                        if ( rc != 0 )
+                            LOGERR( klogErr, rc, "cannot set cursor-default on seq-table for platform-column" );
+                        else
+                        {
+                            region_type_mapping *mapping_ptr = NULL;
+        
+                            if ( rgn_present )
+                            {
+                                mapping_ptr = &mapping;
+                            }
+                            /* call for every spot the function >seq_load_spot< */
+                            rc = zmw_for_each( &BaseCallsTab.cmn.zmw, &lctx->xml_progress, cursor,
+                                               lctx->with_progress, col_idx, mapping_ptr, false, seq_load_spot, &BaseCallsTab );
+                        }
+                    }
+                }
+            }
+
+            if ( rgn_present )
+            {
+                seq_load_info( &BaseCallsTab.rgn.stat );
+
+                if ( mapping.count_of_unknown_rgn_types > 0 )
+                {
+                    KLogLevel tmp_lvl = KLogLevelGet();
+                    KLogLevelSet( klogInfo );
+
+                    PLOGMSG( klogInfo, ( klogInfo,
+                        "$(times) x unknown region types encountered",
+                        "times=%i", mapping.count_of_unknown_rgn_types ) );
+                    KLogLevelSet( tmp_lvl );
+
+                }
+            }
+
+            lctx->total_seq_bases += total_bases;
+            lctx->total_seq_spots += total_spots;
+        }   
+        else
+            rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+        close_BaseCalls( &BaseCallsTab );
+    }
+
+    return rc;
+}
+
+
+/* HDF5-Groups and tables used to load the PULSE-table */
+static const char * seq_groups_to_check[] = 
+{ 
+    "PulseData",
+    "PulseData/BaseCalls",
+    "PulseData/BaseCalls/ZMW",
+    NULL
+};
+
+static const char * seq_tables_to_check[] = 
+{ 
+    "PulseData/BaseCalls/Basecall",
+    "PulseData/BaseCalls/DeletionQV",
+    "PulseData/BaseCalls/DeletionTag",
+    "PulseData/BaseCalls/InsertionQV",
+    "PulseData/BaseCalls/PreBaseFrames",
+    "PulseData/BaseCalls/PulseIndex",
+    "PulseData/BaseCalls/QualityValue",
+    "PulseData/BaseCalls/SubstitutionQV",
+    "PulseData/BaseCalls/SubstitutionTag",
+    "PulseData/BaseCalls/WidthInFrames",
+    "PulseData/BaseCalls/ZMW/HoleNumber",
+    "PulseData/BaseCalls/ZMW/HoleStatus",
+    "PulseData/BaseCalls/ZMW/HoleXY",
+    "PulseData/BaseCalls/ZMW/NumEvent",
+    NULL
+};
+
+
+static const char * seq_schema_template = "SEQUENCE";
+static const char * seq_table_to_create = "SEQUENCE";
+
+
+/* special case for SEQUENCE: in order to prepare the cursor correctly, we have to know the first HDF5-source-obj !*/
+rc_t prepare_seq( VDatabase * database, seq_ctx * sctx, KDirectory * hdf5_src, ld_context *lctx )
+{
+    rc_t rc = prepare_table( database, &sctx->cursor, seq_schema_template, seq_table_to_create ); /* pl-tools.c ... this creates the cursor */
+    sctx->src_open = false;
+    if ( rc == 0 )
+    {
+        rc = open_BaseCalls( hdf5_src, &sctx->BaseCallsTab, "PulseData/BaseCalls", lctx->cache_content, &sctx->rgn_present );
+        if ( rc == 0 )
+        {
+            int32_t to_exclude;
+
+            /* depending on the bit-size of the PulseIndex-table in HDF5
+               exclude the opposite column from VDB */
+            if ( sctx->BaseCallsTab.PulseIndex.element_bits == PULSE_INDEX_BITSIZE_16 )
+                to_exclude = seq_tab_PULSE_INDEX_32;
+            else
+                to_exclude = seq_tab_PULSE_INDEX_16;
+
+            /* add all columns to the vdb-cursor */
+            rc = add_columns( sctx->cursor, seq_tab_count, to_exclude, sctx->col_idx, seq_tab_names );
+            if ( rc == 0 )
+            {
+                rc = VCursorOpen( sctx->cursor );
+                if ( rc != 0 )
+                {
+                    LOGERR( klogErr, rc, "cannot open cursor on seq-table" );
+                }
+                else
+                {
+                    const uint8_t platform = SRA_PLATFORM_PACBIO_SMRT;
+
+                    rc = VCursorDefault ( sctx->cursor, sctx->col_idx[ seq_tab_PLATFORM ], 8, &platform, 0, 1 );
+                    if ( rc != 0 )
+                    {
+                        LOGERR( klogErr, rc, "cannot set cursor-default on seq-table for platform-column" );
+                    }
+                    else
+                    {
+                        sctx->src_open = true;
+                        sctx->lctx = lctx;
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+rc_t load_seq_src( seq_ctx * sctx, KDirectory * hdf5_src )
+{
+    rc_t rc = 0;
+    if ( sctx->lctx->check_src_obj )
+        rc = check_src_objects( hdf5_src, seq_groups_to_check, seq_tables_to_check, true );
+
+    if ( rc == 0 && !sctx->src_open )
+        rc = open_BaseCalls( hdf5_src, &sctx->BaseCallsTab, "PulseData/BaseCalls", sctx->lctx->cache_content, &sctx->rgn_present );
+    if ( rc == 0 )
+    {
+        /* calculates the total number of bases, according to the zmw-table */
+        uint64_t total_bases = zmw_total( &sctx->BaseCallsTab.cmn.zmw );
+        /* calculates the total number of spots, according to the zmw-table */
+        uint64_t total_spots = sctx->BaseCallsTab.cmn.zmw.NumEvent.extents[ 0 ];
+
+        KLogLevel tmp_lvl = KLogLevelGet();
+        KLogLevelSet( klogInfo );
+        PLOGMSG( klogInfo, ( klogInfo,
+                 "loading sequence-table ( $(bases) bases / $(spots) spots ):",
+                 "bases=%lu,spots=%lu", total_bases, total_spots ));
+        KLogLevelSet( tmp_lvl );
+
+        /* checks that all tables, which are loaded do have the correct
+           number of values (the number that the zmw-table requests) */
+        if ( !check_BaseCall_totalcount( &sctx->BaseCallsTab, total_bases ) )
+            rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+        else
+        {
+            region_type_mapping mapping;
+
+            if ( sctx->rgn_present )
+            {
+                const KNamelist *region_types;
+                /* read the meta-data-entry "RegionTypes" of the hdf5-regions-table
+                   into a KNamelist */
+                rc = KArrayFileGetMeta ( sctx->BaseCallsTab.rgn.hdf5_regions.af, "RegionTypes", &region_types );
+                if ( rc != 0 )
+                {
+                    LOGERR( klogErr, rc, "cannot read Regions.RegionTypes" );
+                }
+                else
+                {
+                    /* extract the region-type-mapping out of the read KNamelist */
+                    rc = rgn_extract_type_mappings( region_types, &mapping, false );
+                    KNamelistRelease ( region_types );
+                    if ( rc != 0 )
+                    {
+                        LOGERR( klogErr, rc, "cannot map regions-types" );
+                    }
+                }
+            }
+
+            if ( rc == 0 )
+            {
+                region_type_mapping *mapping_ptr = NULL;
+
+                if ( sctx->rgn_present )
+                    mapping_ptr = &mapping;
+
+                /* call for every spot the function >seq_load_spot< */
+                rc = zmw_for_each( &sctx->BaseCallsTab.cmn.zmw, &sctx->lctx->xml_progress, sctx->cursor,
+                                   sctx->lctx->with_progress, sctx->col_idx, mapping_ptr, false,
+                                   seq_load_spot, &sctx->BaseCallsTab );
+            }
+
+            if ( sctx->rgn_present )
+                seq_load_info( &sctx->BaseCallsTab.rgn.stat );
+
+            sctx->lctx->total_seq_bases += total_bases;
+            sctx->lctx->total_seq_spots += total_spots;
+        }   
+        close_BaseCalls( &sctx->BaseCallsTab );
+        sctx->src_open = false;
+    }
+    return rc;
+}
+
+
+rc_t finish_seq( seq_ctx * sctx )
+{
+    VCursorRelease( sctx->cursor );
+    return 0;
+}
+
+
+rc_t load_seq( VDatabase * database, KDirectory * hdf5_src, ld_context *lctx )
+{
+    rc_t rc = 0;
+    if ( lctx->check_src_obj )
+        rc = check_src_objects( hdf5_src, seq_groups_to_check, seq_tables_to_check, true );
+    if ( rc == 0 )
+        /* in pl-tools.c */
+        rc = load_table( database, hdf5_src, lctx, seq_schema_template, 
+                         seq_table_to_create, seq_loader );
+    return rc;
+}
diff --git a/tools/pacbio-load/pl-sequence.h b/tools/pacbio-load/pl-sequence.h
new file mode 100644
index 0000000..f093859
--- /dev/null
+++ b/tools/pacbio-load/pl-sequence.h
@@ -0,0 +1,110 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_pl_sequence_
+#define _h_pl_sequence_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "pl-tools.h"
+#include "pl-zmw.h"
+#include "pl-basecalls_cmn.h"
+#include "pl-regions.h"
+#include <klib/rc.h>
+#include <insdc/sra.h>
+
+/* enumeration of the columns of the pulse-table */
+enum
+{
+    /* base-space */
+    seq_tab_READ = 0,
+    seq_tab_QUALITY,
+    seq_tab_NREADS,
+    seq_tab_PLATFORM,
+
+    seq_tab_LABEL,
+    seq_tab_LABEL_START,
+    seq_tab_LABEL_LEN,
+    seq_tab_READ_TYPE,
+    seq_tab_READ_START,
+    seq_tab_READ_LEN,
+    seq_tab_CLIP_QUALITY_LEFT,
+    seq_tab_CLIP_QUALITY_RIGHT,
+    seq_tab_READ_FILTER,
+
+    /* pulse-space */
+    seq_tab_PRE_BASE_FRAMES,
+    seq_tab_WIDTH_IN_FRAMES,
+    seq_tab_PULSE_INDEX_16,
+    seq_tab_PULSE_INDEX_32,
+    seq_tab_HOLE_NUMBER,
+    seq_tab_HOLE_STATUS,
+    seq_tab_HOLE_XY,
+    seq_tab_INSERTION_QV,
+    seq_tab_DELETION_QV,
+    seq_tab_DELETION_TAG,
+    seq_tab_SUBSTITUTION_QV,
+    seq_tab_SUBSTITUTION_TAG,
+    seq_tab_count
+};
+
+
+typedef struct BaseCalls
+{
+    BaseCalls_cmn cmn;
+    regions rgn;
+    af_data PreBaseFrames;
+    af_data PulseIndex;
+    af_data WidthInFrames;
+} BaseCalls;
+
+
+typedef struct seq_ctx
+{
+    VCursor * cursor;
+    ld_context *lctx;
+    BaseCalls BaseCallsTab;
+    uint32_t col_idx[ seq_tab_count ];
+    bool rgn_present;
+    bool src_open;
+} seq_ctx;
+
+
+/* special case for SEQUENCE: in order to prepare the cursor correctly, we have to know the first HDF5-source-obj !*/
+rc_t prepare_seq( VDatabase * database, seq_ctx * sctx, KDirectory * hdf5_src, ld_context *lctx );
+rc_t load_seq_src( seq_ctx * sctx, KDirectory * hdf5_src );
+rc_t finish_seq( seq_ctx * sctx );
+
+void seq_report_totals( ld_context *lctx );
+
+rc_t load_seq( VDatabase * database, KDirectory * hdf5_src, ld_context *lctx );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/pacbio-load/pl-tools.c b/tools/pacbio-load/pl-tools.c
new file mode 100644
index 0000000..62437e1
--- /dev/null
+++ b/tools/pacbio-load/pl-tools.c
@@ -0,0 +1,624 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "pl-tools.h"
+#include <klib/printf.h>
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <kdb/database.h>
+#include <vdb/database.h>
+#include <vdb/vdb-priv.h>
+
+void lctx_init( ld_context * lctx )
+{
+    lctx->xml_logger = NULL;
+    lctx->xml_progress = NULL;
+    lctx->with_progress = false;
+    lctx->total_printed = false;
+    lctx->cache_content = false;
+    lctx->check_src_obj = false;
+    lctx->total_seq_bases = 0;
+    lctx->total_seq_spots = 0;
+}
+
+
+void lctx_free( ld_context * lctx )
+{
+    if ( lctx->xml_logger != NULL )
+    {
+        XMLLogger_Release( lctx->xml_logger );
+        lctx->xml_logger = NULL;
+    }
+    if ( lctx->xml_progress != NULL )
+    {
+        KLoadProgressbar_Release( lctx->xml_progress, false );
+        lctx->xml_progress = NULL;
+    }
+}
+
+
+rc_t check_src_objects( const KDirectory *hdf5_dir,
+                        const char ** groups, 
+                        const char **tables,
+                        bool show_not_found )
+{
+    rc_t rc = 0;
+    uint16_t idx = 0;
+    uint32_t pt;
+
+    if ( groups != NULL )
+    {
+        while ( groups[ idx ] != NULL && rc == 0 )
+        {
+            pt = KDirectoryPathType ( hdf5_dir, "%s", groups[idx] );
+            if ( pt != kptDir )
+            {
+                rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+                if ( show_not_found )
+                    PLOGERR( klogErr, ( klogErr, rc, "hdf5-group '$(grp)' not found",
+                                    "grp=%s", groups[ idx ] ) );
+                else
+                    PLOGERR( klogWarn, ( klogWarn, rc, "hdf5-group '$(grp)' not found",
+                                    "grp=%s", groups[ idx ] ) );
+            }
+            else
+                idx++;
+        }
+    }
+
+    idx = 0;
+    if ( tables != NULL && rc == 0 )
+    {
+        while ( tables[ idx ] != NULL && rc == 0 )
+        {
+            pt = KDirectoryPathType ( hdf5_dir, "%s", tables[idx] );
+            if ( pt != kptDataset )
+            {
+                rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+                if ( show_not_found )
+                    PLOGERR( klogErr, ( klogErr, rc, "hdf5-table '$(tbl)' not found",
+                                    "tbl=%s", tables[ idx ] ) );
+                else
+                    PLOGERR( klogWarn, ( klogWarn, rc, "hdf5-table '$(tbl)' not found",
+                                    "tbl=%s", tables[ idx ] ) );
+            }
+            else
+                idx++;
+        }
+    }
+
+    return rc;
+}
+
+
+void init_array_file( af_data * af )
+{
+    af->f  = NULL;
+    af->af = NULL;
+    af->extents = NULL;
+    af->rc = -1;
+    af->content = NULL;
+}
+
+
+void free_array_file( af_data * af )
+{
+    if ( af->af != NULL )
+    {
+        KArrayFileRelease( af->af );
+        af->af = NULL;
+    }
+    if ( af->f != NULL )
+    {
+        KFileRelease( af->f );
+        af->f = NULL;
+    }
+    if ( af->extents != NULL )
+    {
+        free( af->extents );
+        af->extents = NULL;
+    }
+    if ( af->content != NULL )
+    {
+        free( af->content );
+        af->content = NULL;
+    }
+}
+
+
+static rc_t read_cache_content( af_data * af )
+{
+    rc_t rc = 0;
+    uint64_t filesize = ( af->element_bits >> 3 ) * ( af->extents[ 0 ] );
+    if ( af->dimensionality == 2 )
+        filesize *= af->extents[ 1 ];
+    af->content = malloc( filesize );
+    if ( af->content == NULL )
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcMemory, rcExhausted );
+    else
+    {
+        uint64_t pos2[ 2 ];
+        uint64_t read2[ 2 ];
+        uint64_t count2[ 2 ];
+        rc_t rc;
+
+        pos2[ 0 ] = 0;
+        pos2[ 1 ] = 0;
+        count2[ 0 ] = af->extents[ 0 ];
+        if ( af->dimensionality == 2 )
+            count2[ 1 ] = af->extents[ 1 ];
+        else
+            count2[ 1 ] = 0;
+
+        rc = KArrayFileRead ( af->af, af->dimensionality, pos2, 
+                              af->content, count2, read2 );
+        if ( rc != 0 )
+            LOGERR( klogErr, rc, "error reading arrayfile-data int cache" );
+    }
+    return rc;
+}
+
+
+rc_t open_array_file( const KDirectory *dir,
+                      const char *name,
+                      af_data * af,
+                      const uint64_t expected_element_bits,
+                      const uint64_t expected_cols,
+                      bool disp_wrong_bitsize,
+                      bool cache_content,
+                      bool supress_err_msg )
+{
+    rc_t rc;
+
+    init_array_file( af );
+    /* open the requested "File" (actually a hdf5-table) as KFile 
+       the works because the given KDirectory is a HDF5-Directory */
+    rc = KDirectoryOpenFileRead ( dir, &af->f, "%s", name );
+    if ( rc != 0 )
+    {
+        if ( !supress_err_msg )
+        {
+            PLOGERR( klogErr, ( klogErr, rc, "cannot open hdf5-dataset '$(name)'",
+                            "name=%s", name ) );
+        }
+        return rc;
+    }
+    /* cast the KFile into a KArrayFile */
+    rc = MakeHDF5ArrayFile ( af->f, &af->af );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc, "cannot open hdf5-arrayfile '$(name)'",
+                            "name=%s", name ) );
+        free_array_file( af );
+        return rc;
+    }
+    /* detect the dimensionality of the array-file */
+    rc = KArrayFileDimensionality ( af->af, &af->dimensionality );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc, "cannot retrieve dimensionality on '$(name)'",
+                            "name=%s", name ) );
+        free_array_file( af );
+        return rc;
+    }
+    /* make a array to hold the extent in every dimension */
+    af->extents = malloc( af->dimensionality * ( sizeof ( uint64_t ) ) );
+    if ( af->extents == NULL )
+    {
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcMemory, rcExhausted );
+        PLOGERR( klogErr, ( klogErr, rc, "cannot allocate enough memory for extents of '$(name)'",
+                            "name=%s", name ) );
+        free_array_file( af );
+        return rc;
+    }
+    /* read the actuall extents into the created array */
+    rc = KArrayFileDimExtents ( af->af, af->dimensionality, af->extents );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc, "cannot retrieve extents of '$(name)'",
+                            "name=%s", name ) );
+        free_array_file( af );
+        return rc;
+    }
+    /* request the size of the element in bits */
+    rc = KArrayFileElementSize ( af->af, &af->element_bits );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc, "cannot retrieve element-size of '$(name)'",
+                            "name=%s", name ) );
+        free_array_file( af );
+        return rc;
+    }
+    /* compare the discovered bit-size with the expected one */
+    if ( af->element_bits != expected_element_bits )
+    {
+        rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+
+        /* display the wrong bitsize only if wanted 
+           ( this function can be called to probe the bitsize:
+             in this case the wrong one should not be shown as an error )*/
+        if ( disp_wrong_bitsize )
+            PLOGERR( klogErr, ( klogErr, rc, "unexpected element-bits of $(bsize) in '$(name)'",
+                     "bsize=%lu,name=%s", af->element_bits, name ) );
+
+        free_array_file( af );
+        return rc;
+    }
+
+    /* not generic, we handle only dimensionality of 1 and 2 */
+    if ( expected_cols == 1 )
+    {
+        /* the dimensionality has to be 1 in this case */
+        if ( af->dimensionality != 1 )
+        {
+            rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+            PLOGERR( klogErr, ( klogErr, rc, "unexpected dimensionality of $(dim) in '$(name)'",
+                                "dim=%lu,name=%s", af->dimensionality, name ) );
+            free_array_file( af );
+            return rc;
+        }
+    }
+    else
+    {
+        /* the dimensionality has to be 2 in this case */
+        if ( af->dimensionality != 2 )
+        {
+            rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+            PLOGERR( klogErr, ( klogErr, rc, "unexpected dimensionality of $(dim) in '$(name)'",
+                                "dim=%lu,name=%s", af->dimensionality, name ) );
+            free_array_file( af );
+            return rc;
+        }
+        else
+        {
+            if ( af->extents[ 1 ] != expected_cols )
+            {
+                rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+                PLOGERR( klogErr, ( klogErr, rc, "unexpected extent[1] of $(ext) in '$(name)'",
+                                    "ext=%lu,name=%s", af->extents[ 1 ], name ) );
+                free_array_file( af );
+                return rc;
+            }
+        }
+    }
+    if ( rc == 0 && cache_content )
+    {
+        rc = read_cache_content( af );
+    }
+    return rc;
+}
+
+
+/* assembles the 'absolute' path to the requested array-file before opening it */
+rc_t open_element( const KDirectory *hdf5_dir, 
+                   af_data *element, 
+                   const char * path,
+                   const char * name, 
+                   const uint64_t expected_element_bits,
+                   const uint64_t expected_cols,
+                   bool disp_wrong_bitsize,
+                   bool cache_content,
+                   bool supress_err_msg )
+{
+    char src_path[ 64 ];
+    size_t num_writ;
+
+    element->rc = string_printf ( src_path, sizeof src_path, &num_writ, "%s/%s", path, name );
+    if ( element->rc != 0 )
+        LOGERR( klogErr, element->rc, "cannot assemble hdf5-element-name" );
+    else
+        element->rc = open_array_file( hdf5_dir, src_path, element, 
+                                       expected_element_bits, expected_cols,
+                                       disp_wrong_bitsize,
+                                       cache_content,
+                                       supress_err_msg );
+    return element->rc;
+}
+
+
+/* we are reading data from an array-file,
+   the underlying array-file knows the size of an element */
+rc_t array_file_read_dim1( af_data * af, const uint64_t pos,
+                           void *dst, const uint64_t count,
+                           uint64_t *n_read )
+{
+    rc_t rc = 0;
+    if ( af->content == NULL )
+        rc = KArrayFileRead ( af->af, 1, &pos, dst, &count, n_read );
+    else
+    {
+        if ( ( pos + count ) > af->extents[ 0 ] )
+            rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+        else
+        {
+            uint64_t buf_idx = ( af->element_bits >> 3 ) * pos;
+            size_t num = ( af->element_bits >> 3 ) * count;
+            char * src = af->content;
+            src+=buf_idx;
+            memcpy( dst, src, num );
+            *n_read = count;
+        }
+    }
+    if ( rc != 0 )
+        LOGERR( klogErr, rc, "error reading arrayfile-data (1 dim)" );
+    return rc;
+}
+
+
+/* we are reading values in 2 dimensions from the array-file */
+rc_t array_file_read_dim2( af_data * af, const uint64_t pos,
+                           void *dst, const uint64_t count,
+                           const uint64_t ext2, uint64_t *n_read )
+{
+    rc_t rc = 0;
+    if ( af->content == NULL )
+    {
+        uint64_t pos2[ 2 ];
+        uint64_t read2[ 2 ];
+        uint64_t count2[ 2 ];
+        rc_t rc;
+
+        pos2[ 0 ] = pos;
+        pos2[ 1 ] = 0;
+        count2[ 0 ] = count;
+        count2[ 1 ] = ext2;
+        rc = KArrayFileRead ( af->af, 2, pos2, dst, count2, read2 );
+        if ( rc != 0 )
+            LOGERR( klogErr, rc, "error reading arrayfile-data (2 dim)" );
+        *n_read = read2[ 0 ];
+    }
+    else
+    {
+        if ( ( pos + count ) > af->extents[ 0 ] )
+            rc = RC ( rcExe, rcNoTarg, rcLoading, rcData, rcInconsistent );
+        else
+        {
+            uint64_t buf_idx = ( af->element_bits >> 3 ) * pos * af->extents[ 1 ];
+            size_t num = ( af->element_bits >> 3 ) * count * af->extents[ 1 ];
+            char * src = af->content;
+            src+=buf_idx;
+            memcpy( dst, src, num );
+            *n_read = count * af->extents[ 1 ];
+        }
+    }
+    return rc;
+}
+
+
+rc_t add_columns( VCursor * cursor, uint32_t count, int32_t exclude_this,
+                  uint32_t * idx_vector, const char ** names )
+{
+    rc_t rc = 0;
+    uint32_t i;
+    for ( i = 0; i < count && rc == 0; ++i )
+    {
+        if ( i != exclude_this )
+        {
+            rc = VCursorAddColumn( cursor, &(idx_vector[i]), "%s", names[i] );
+            if ( rc != 0 )
+                PLOGERR( klogErr, ( klogErr, rc, "cannot add column '$(name)' to vdb-cursor",
+                                    "name=%s", names[i] ) );
+        }
+    }
+    return rc;
+}
+
+bool check_table_count( af_data *tab, const char * name,
+                        const uint64_t expected )
+{
+	bool res = ( tab->extents != NULL );
+	if ( res )
+	{
+		res = ( tab->extents[ 0 ] == expected );
+		if ( !res )
+		{
+			rc_t rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+			PLOGERR( klogErr, ( klogErr, rc, "'$(name)'.count != expected",
+								"name=%s", name ) );
+		}
+	}
+	else
+	{
+		PLOGMSG( klogWarn, ( klogWarn, "Table ... '$(name)' not found", "name=%s", name ) );
+	}
+    return res;
+}
+
+
+rc_t transfer_bits( VCursor *cursor, const uint32_t col_idx,
+    af_data *src, char * buffer, const uint64_t offset, const uint64_t count,
+    const uint32_t n_bits, const char * explanation )
+{
+    uint64_t n_read;
+    rc_t rc = array_file_read_dim1( src, offset, buffer, count, &n_read );
+    if ( rc == 0 )
+    {
+        if ( count != n_read )
+        {
+            rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+            PLOGERR( klogErr, ( klogErr, rc, "cannot read enought data from hdf5-table for '$(name)'",
+                                "name=%s", explanation ) );
+        }
+        if ( rc == 0 )
+        {
+            rc = VCursorWrite( cursor, col_idx, n_bits, buffer, 0, count );
+            if ( rc != 0 )
+                PLOGERR( klogErr, ( klogErr, rc, "cannot write data to vdb for '$(name)'",
+                                    "name=%s", explanation ) );
+        }
+    }
+    return rc;
+}
+
+
+rc_t vdb_write_value( VCursor *cursor, const uint32_t col_idx,
+                      void * src, const uint32_t n_bits,
+                      const uint32_t n_elem, const char *explanation )
+{
+    rc_t rc = VCursorWrite( cursor, col_idx, n_bits, src, 0, n_elem );
+    if ( rc != 0 )
+        PLOGERR( klogErr, ( klogErr, rc, "cannot write data to vdb for '$(name)'",
+                            "name=%s", explanation ) );
+    return rc;
+}
+
+
+rc_t vdb_write_uint32( VCursor *cursor, const uint32_t col_idx,
+                       uint32_t value, const char *explanation )
+{
+    return vdb_write_value( cursor, col_idx, &value, 32, 1, explanation );
+}
+
+
+rc_t vdb_write_uint16( VCursor *cursor, const uint32_t col_idx,
+                       uint16_t value, const char *explanation )
+{
+    return vdb_write_value( cursor, col_idx, &value, 16, 1, explanation );
+}
+
+
+rc_t vdb_write_uint8( VCursor *cursor, const uint32_t col_idx,
+                      uint8_t value, const char *explanation )
+{
+    return vdb_write_value( cursor, col_idx, &value, 8, 1, explanation );
+}
+
+
+rc_t vdb_write_float32( VCursor *cursor, const uint32_t col_idx,
+                        float value, const char *explanation )
+{
+    return vdb_write_value( cursor, col_idx, &value, 32, 1, explanation );
+}
+
+
+rc_t prepare_table( VDatabase * database, VCursor ** cursor,
+                    const char * template_name,
+                    const char * table_name )
+{
+    VTable * table;
+    rc_t rc = VDatabaseCreateTable( database, &table, template_name, 
+                                    kcmInit | kcmMD5 | kcmParents, "%s", table_name );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc, "cannot create vdb-table '$(name)'",
+                            "name=%s", table_name ) );
+    }
+    else
+    {
+        rc = VTableCreateCursorWrite( table, cursor, kcmInsert );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc, "cannot create vdb-cursor for '$(name)'",
+                                "name=%s", table_name ) );
+        }
+        VTableRelease( table );
+    }
+    return rc;
+}
+
+
+rc_t load_table( VDatabase * database, KDirectory * hdf5_src, ld_context *lctx,
+                 const char * template_name, const char * table_name, loader_func func )
+{
+    VTable * table;
+    rc_t rc = VDatabaseCreateTable( database, &table, template_name, 
+                                    kcmInit | kcmMD5 | kcmParents, "%s", table_name );
+    if ( rc != 0 )
+        PLOGERR( klogErr, ( klogErr, rc, "cannot create vdb-table '$(name)'",
+                            "name=%s", table_name ) );
+    else
+    {
+        VCursor * cursor;
+        rc = VTableCreateCursorWrite( table, &cursor, kcmInsert );
+        if ( rc != 0 )
+            PLOGERR( klogErr, ( klogErr, rc, "cannot create vdb-cursor for '$(name)'",
+                                "name=%s", table_name ) );
+        else
+        {
+            VTableRelease( table );
+            rc = func( lctx, hdf5_src, cursor, table_name ); /* the callback does the job! */
+            VCursorRelease( cursor );
+        }
+    }
+    return rc;
+}
+
+
+rc_t progress_chunk( const KLoadProgressbar ** xml_progress, const uint64_t chunk )
+{
+    rc_t rc;
+    /* release the old progressbar... */
+    if ( *xml_progress != NULL )
+    {
+        KLoadProgressbar_Release( *xml_progress, false );
+        *xml_progress = NULL;
+    }
+    rc = KLoadProgressbar_Make( xml_progress, 0 );
+    if ( rc == 0 )
+        rc = KLoadProgressbar_Append( *xml_progress, chunk );
+    else
+        LOGERR( klogErr, rc, "cannot make KLoadProgressbar" );
+
+    return rc;
+}
+
+
+rc_t progress_step( const KLoadProgressbar * xml_progress )
+{
+    if ( xml_progress != NULL )
+       return KLoadProgressbar_Process( xml_progress, 1, false );
+    else
+        return 0;
+}
+
+
+void print_log_info( const char * info )
+{
+    KLogLevel tmp_lvl = KLogLevelGet();
+    KLogLevelSet( klogInfo );
+    LOGMSG( klogInfo, info );
+    KLogLevelSet( tmp_lvl );
+}
+
+
+/* was once intended to make the SEQ-table a alias to the CONSENSU-table,
+   this step was removed, but the decision could be reinstate again
+   because of that the function to do so is still here */
+rc_t pacbio_make_alias( VDatabase * vdb_db,
+                        const char *existing_obj, const char *alias_to_create )
+{
+    KDatabase *kdb;
+    rc_t rc = VDatabaseOpenKDatabaseUpdate ( vdb_db, & kdb );
+    if ( rc == 0 )
+    {
+        rc = KDatabaseAliasTable ( kdb, existing_obj, alias_to_create );
+        KDatabaseRelease ( kdb );
+    }
+    return rc;
+}
diff --git a/tools/pacbio-load/pl-tools.h b/tools/pacbio-load/pl-tools.h
new file mode 100644
index 0000000..5b8618f
--- /dev/null
+++ b/tools/pacbio-load/pl-tools.h
@@ -0,0 +1,291 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_pl_tools_
+#define _h_pl_tools_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <klib/out.h>
+#include <klib/rc.h>
+#include <klib/text.h>
+#include <klib/log.h>
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <kfs/file.h>
+#include <kfs/arrayfile.h>
+#include <hdf5/kdf5.h>
+#include <kapp/log-xml.h>
+#include <kapp/progressbar.h>
+
+/* for zmw */
+#define HOLE_NUMBER_BITSIZE 32
+#define HOLE_NUMBER_COLS 1
+
+#define HOLE_STATUS_BITSIZE 8
+#define HOLE_STATUS_COLS 1
+
+#define HOLE_XY_BITSIZE 16
+#define HOLE_XY_COLS 2
+
+#define NUMEVENT_BITSIZE 32
+#define NUMEVENT_COLS 1
+
+#define NUMPASSES_BITSIZE 32
+#define NUMPASSES_COLS 1
+
+/* for BaseCalls_cmn */
+#define BASECALL_BITSIZE 8
+#define BASECALL_COLS 1
+
+#define QUALITY_VALUE_BITSIZE 8
+#define QUALITY_VALUE_COLS 1
+
+#define DELETION_QV_BITSIZE 8
+#define DELETION_QV_COLS 1
+
+#define DELETION_TAG_BITSIZE 8
+#define DELETION_TAG_COLS 1
+
+#define INSERTION_QV_BITSIZE 8
+#define INSERTION_QV_COLS 1
+
+#define SUBSTITUTION_QV_BITZISE 8
+#define SUBSTITUTION_QV_COLS 1
+
+#define SUBSTITUTION_TAG_BITSIZE 8
+#define SUBSTITUTION_TAG_COLS 1
+
+/* for regions */
+#define REGIONS_BITSIZE 32
+#define REGIONS_COLS 5
+
+/* for sequence */
+#define PRE_BASE_FRAMES_BITSIZE 16
+#define PRE_BASE_FRAMES_COLS 1
+
+#define PULSE_INDEX_BITSIZE_16 16
+#define PULSE_INDEX_BITSIZE_32 32
+#define PULSE_INDEX_COLS 1
+
+#define WIDTH_IN_FRAMES_BITSIZE 16
+#define WIDTH_IN_FRAMES_COLS 1
+
+/* for metrics */
+#define BASE_FRACTION_BITSIZE 32
+#define BASE_FRACTION_COLS 4
+
+#define BASE_IPD_BITSIZE 32
+#define BASE_IPD_COLS 1
+
+#define BASE_RATE_BITSIZE 32
+#define BASE_RATE_COLS 1
+
+#define BASE_WIDTH_BITSIZE 32
+#define BASE_WIDTH_COLS 1
+
+#define CM_BAS_QV_BITSIZE 32
+#define CM_BAS_QV_COLS 4
+
+#define CM_DEL_QV_BITSIZE 32
+#define CM_DEL_QV_COLS 4
+
+#define CM_INS_QV_BITSIZE 32
+#define CM_INS_QV_COLS 4
+
+#define CM_SUB_QV_BITSIZE 32
+#define CM_SUB_QV_COLS 4
+
+#define LOCAL_BASE_RATE_BITSIZE 32
+#define LOCAL_BASE_RATE_COLS 1
+
+#define DARK_BASE_RATE_BITSIZE 32
+#define DARK_BASE_RATE_COLS 1
+
+#define HQ_REGION_START_TIME_BITSIZE 32
+#define HQ_REGION_START_TIME_COLS 1
+
+#define HQ_REGION_END_TIME_BITSIZE 32
+#define HQ_REGION_END_TIME_COLS 1
+
+#define HQ_REGION_SNR_BITSIZE 32
+#define HQ_REGION_SNR_COLS 4
+
+#define PRODUCTIVITY_BITSIZE 8
+#define PRODUCTIVITY_COLS 1
+
+#define READ_SCORE_BITSIZE 32
+#define READ_SCORE_COLS 1
+
+#define RM_BAS_QV_BITSIZE 32
+#define RM_BAS_QV_COLS 1
+
+#define RM_DEL_QV_BITSIZE 32
+#define RM_DEL_QV_COLS 1
+
+#define RM_INS_QV_BITSIZE 32
+#define RM_INS_QV_COLS 1
+
+#define RM_SUB_QV_BITSIZE 32
+#define RM_SUB_QV_COLS 1
+
+/* for passes */
+#define ADAPTER_HIT_AFTER_BITSIZE 8
+#define ADAPTER_HIT_AFTER_COLS 1
+
+#define ADAPTER_HIT_BEFORE_BITSIZE 8
+#define ADAPTER_HIT_BEFORE_COLS 1
+
+#define PASS_DIRECTION_BITSIZE 8
+#define PASS_DIRECTION_COLS 1
+
+#define PASS_NUM_BASES_BITSIZE 32
+#define PASS_NUM_BASES_COLS 1
+
+#define PASS_START_BASE_BITSIZE 32
+#define PASS_START_BASE_COLS 1
+
+typedef struct ld_context
+{
+    const XMLLogger* xml_logger;
+    const KLoadProgressbar *xml_progress;
+    const char *dst_path;
+    uint64_t total_seq_bases;
+    uint64_t total_seq_spots;
+    bool with_progress;
+    bool total_printed;
+    bool cache_content;
+    bool check_src_obj;
+} ld_context;
+
+
+void lctx_init( ld_context * lctx );
+void lctx_free( ld_context * lctx );
+
+
+rc_t check_src_objects( const KDirectory *hdf5_dir,
+                        const char ** groups, 
+                        const char **tables,
+                        bool show_not_found );
+
+typedef struct af_data
+{
+    struct KFile const *f;      /* the fake "file" from a HDF5-dir */
+    struct KArrayFile *af;      /* the arrayfile made from f */
+    rc_t rc;
+    uint8_t dimensionality;     /* how many dimensions the HDF5-dataset has */
+    uint64_t * extents;         /* the extension in every dimension */
+    uint64_t element_bits;      /* how big in bits is the element */
+    void * content;             /* read the whole thing into memory */
+} af_data;
+
+
+void init_array_file( af_data * af );
+void free_array_file( af_data * af );
+
+rc_t open_array_file( const KDirectory *dir, 
+                      const char *name,
+                      af_data * af,
+                      const uint64_t expected_element_bits,
+                      const uint64_t expected_cols,
+                      bool disp_wrong_bitsize,
+                      bool cache_content,
+                      bool supress_err_msg );
+
+rc_t open_element( const KDirectory *hdf5_dir,
+                   af_data *element, 
+                   const char * path,
+                   const char * name, 
+                   const uint64_t expected_element_bits,
+                   const uint64_t expected_cols,
+                   bool disp_wrong_bitsize,
+                   bool cache_content,
+                   bool supress_err_msg );
+
+rc_t array_file_read_dim1( af_data * af, const uint64_t pos,
+                           void *dst, const uint64_t count,
+                           uint64_t *n_read );
+
+rc_t array_file_read_dim2( af_data * af, const uint64_t pos,
+                           void *dst, const uint64_t count,
+                           const uint64_t ext2, uint64_t *n_read );
+
+rc_t add_columns( VCursor * cursor, uint32_t count, int32_t exclude_this,
+                  uint32_t * idx_vector, const char ** names );
+
+bool check_table_count( af_data *tab, const char * name,
+                        const uint64_t expected );
+
+rc_t transfer_bits( VCursor *cursor, const uint32_t col_idx,
+    af_data *src, char * buffer, const uint64_t offset, const uint64_t count,
+    const uint32_t n_bits, const char * explanation );
+
+rc_t vdb_write_value( VCursor *cursor, const uint32_t col_idx,
+                      void * src, const uint32_t n_bits,
+                      const uint32_t n_elem, const char *explanation );
+
+rc_t vdb_write_uint32( VCursor *cursor, const uint32_t col_idx,
+                       uint32_t value, const char *explanation );
+
+rc_t vdb_write_uint16( VCursor *cursor, const uint32_t col_idx,
+                       uint16_t value, const char *explanation );
+
+rc_t vdb_write_uint8( VCursor *cursor, const uint32_t col_idx,
+                      uint8_t value, const char *explanation );
+
+rc_t vdb_write_float32( VCursor *cursor, const uint32_t col_idx,
+                        float value, const char *explanation );
+
+typedef rc_t (*loader_func)( ld_context *lctx,
+                             KDirectory * hdf5_src, VCursor * cursor,
+                             const char * table_name );
+                        
+rc_t prepare_table( VDatabase * database, VCursor ** cursor,
+                    const char * template_name,
+                    const char * table_name );
+
+rc_t load_table( VDatabase * database, KDirectory * hdf5_src, ld_context *lctx,
+                 const char * template_name, const char * table_name,
+                 loader_func func );
+
+rc_t progress_chunk( const KLoadProgressbar ** xml_progress, const uint64_t chunk );
+rc_t progress_step( const KLoadProgressbar * xml_progress );
+
+void print_log_info( const char * info );
+
+rc_t pacbio_make_alias( VDatabase * vdb_db,
+                        const char *existing_obj, const char *alias_to_create );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/pacbio-load/pl-zmw.c b/tools/pacbio-load/pl-zmw.c
new file mode 100644
index 0000000..6322c57
--- /dev/null
+++ b/tools/pacbio-load/pl-zmw.c
@@ -0,0 +1,221 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "pl-zmw.h"
+#include <sysalloc.h>
+
+void zmw_init( zmw_tab *tab )
+{
+    init_array_file( &tab->HoleNumber );
+    init_array_file( &tab->HoleStatus );
+    init_array_file( &tab->HoleXY );
+    init_array_file( &tab->NumEvent );
+    init_array_file( &tab->NumPasses );
+}
+
+
+void zmw_close( zmw_tab *tab )
+{
+    free_array_file( &tab->HoleNumber );
+    free_array_file( &tab->HoleStatus );
+    free_array_file( &tab->HoleXY );
+    free_array_file( &tab->NumEvent );
+    free_array_file( &tab->NumPasses );
+}
+
+
+rc_t zmw_open( const KDirectory *hdf5_dir, zmw_tab *tab,
+               const bool num_passes, const char * path, bool supress_err_msg )
+{
+    rc_t rc;
+
+    zmw_init( tab );
+    rc = open_element( hdf5_dir, &tab->HoleNumber, path, "ZMW/HoleNumber", 
+                       HOLE_NUMBER_BITSIZE, HOLE_NUMBER_COLS, true, false, supress_err_msg );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->HoleStatus, path, "ZMW/HoleStatus", 
+                           HOLE_STATUS_BITSIZE, HOLE_STATUS_COLS, true, false, supress_err_msg );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->HoleXY, path, "ZMW/HoleXY",
+                           HOLE_XY_BITSIZE, HOLE_XY_COLS, true, false, supress_err_msg );
+    if ( rc == 0 )
+        rc = open_element( hdf5_dir, &tab->NumEvent, path, "ZMW/NumEvent",
+                           NUMEVENT_BITSIZE, NUMEVENT_COLS, true, false, supress_err_msg );
+    if ( rc == 0 && num_passes )
+        rc = open_element( hdf5_dir, &tab->NumPasses, path, "Passes/NumPasses", 
+                           NUMPASSES_BITSIZE, NUMPASSES_COLS, true, false, supress_err_msg );
+
+    if ( rc != 0 )
+        zmw_close( tab ); /* releases only initialized elements */
+    return rc;
+}
+
+
+uint64_t zmw_total( zmw_tab *tab )
+{
+    rc_t rc = 0;
+    uint64_t res = 0, pos = 0;
+    uint64_t num_entries = tab->NumEvent.extents[0];
+
+    while( pos < num_entries && rc == 0 )
+    {
+        uint64_t n_read, to_read = ZMW_BLOCK_SIZE;
+        uint32_t d[ ZMW_BLOCK_SIZE ];
+
+        if ( ( pos + to_read ) >= num_entries )
+            to_read = ( num_entries - pos );
+        rc = array_file_read_dim1( &tab->NumEvent, pos, d, to_read, &n_read );
+        if ( rc == 0 )
+        {
+            uint32_t i;
+            pos+=n_read;
+            for ( i = 0; i < n_read; ++i )
+                res += d[ i ];
+        }
+    }
+    return res;
+}
+
+
+rc_t zmw_read_block( zmw_tab *tab, zmw_block * block,
+                     const uint64_t total_spots,
+                     const uint64_t pos,
+                     const bool with_num_passes )
+{
+    rc_t rc;
+    uint64_t to_read = ZMW_BLOCK_SIZE;
+    uint64_t read_NumEvent, read_HoleNumber, read_HoleStatus, 
+             read_HoleXY, read_NumPasses;
+
+    block->n_read = 0;
+    if ( ( pos + to_read ) >= total_spots )
+        to_read = ( total_spots - pos );
+    rc = array_file_read_dim1( &tab->NumEvent, pos, &block->NumEvent[0],
+                                to_read, &read_NumEvent );
+    if ( rc == 0 )
+        rc = array_file_read_dim1( &tab->HoleNumber, pos, &block->HoleNumber[0],
+                                    to_read, &read_HoleNumber );
+    if ( rc == 0 )
+        rc = array_file_read_dim1( &tab->HoleStatus, pos, &block->HoleStatus[0],
+                                    to_read, &read_HoleStatus );
+    if ( rc == 0 )
+        rc = array_file_read_dim2( &tab->HoleXY, pos, &block->HoleXY[0],
+                                   to_read, 2, &read_HoleXY );
+    if ( rc == 0 && with_num_passes )
+        rc = array_file_read_dim1( &tab->NumPasses, pos, &block->NumPasses[0],
+                                    to_read, &read_NumPasses );
+    if ( rc == 0 )
+    {
+        if ( ( read_NumEvent != read_HoleNumber ) ||
+             ( read_NumEvent != read_HoleStatus ) ||
+             ( read_NumEvent != read_HoleXY ) )
+        {
+            rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+            LOGERR( klogErr, rc, "Diff in NumEvents/HoleNumber/HoleStatus/HoleXY" );
+        }
+        else
+        {
+            if ( with_num_passes && read_NumEvent != read_NumPasses )
+            {
+                rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+                LOGERR( klogErr, rc, "Diff in NumEvents/NumPasses" );
+            }
+            else
+                block->n_read = read_NumEvent;
+        }
+    }
+    return rc;
+}
+
+
+void zmw_block_row( zmw_block * block, zmw_row * row, 
+                    const uint32_t idx )
+{
+    row->NumEvent    = block->NumEvent[ idx ];
+    row->HoleNumber  = block->HoleNumber[ idx ];
+    row->HoleStatus  = block->HoleStatus[ idx ];
+    row->HoleXY[ 0 ] = block->HoleXY[ idx * 2 ];
+    row->HoleXY[ 1 ] = block->HoleXY[ idx * 2 + 1 ];
+    row->NumPasses   = block->NumPasses[ idx ];
+}
+
+
+
+rc_t zmw_for_each( zmw_tab *tab, const KLoadProgressbar ** xml_progress, VCursor * cursor,
+                   bool with_progress, const uint32_t *col_idx, region_type_mapping *mapping,
+                   const bool with_num_passes, zmw_on_row on_row, void * data )
+{
+    zmw_block block;
+    zmw_row row;
+    pl_progress *progress;
+    uint64_t pos = 0;
+    uint64_t total_rows = tab->NumEvent.extents[0];
+
+    rc_t rc = progress_chunk( xml_progress, total_rows );
+    if ( with_progress )
+        pl_progress_make( &progress, total_rows );
+    row.spot_nr = 0;
+    row.offset = 0;
+    while( pos < total_rows && rc == 0 )
+    {
+        rc = zmw_read_block( tab, &block, total_rows, pos, with_num_passes );
+        if ( rc == 0 )
+        {
+            uint32_t i;
+            for ( i = 0; i < block.n_read && rc == 0; ++i )
+            {
+                rc = Quitting();
+                if ( rc == 0 )
+                {
+                    zmw_block_row( &block, &row, i );
+                    rc = on_row( cursor, col_idx, mapping, &row, data );
+                    if ( rc == 0 )
+                    {
+                        rc = progress_step( *xml_progress );
+                        if ( with_progress )
+                            pl_progress_increment( progress, 1 );
+                    }
+                    row.offset += block.NumEvent[ i ];
+                    row.spot_nr ++;
+                }
+                else
+                    LOGERR( klogErr, rc, "...loading ZMW-table interrupted" );
+            }
+            pos += block.n_read;
+        }
+    }
+
+    if ( with_progress )
+        pl_progress_destroy( progress );
+
+    if ( rc == 0 )
+    {
+        rc = VCursorCommit( cursor );
+        if ( rc != 0 )
+            LOGERR( klogErr, rc, "cannot commit vdb-cursor on ZMW-table" );
+    }
+    return rc;
+}
diff --git a/tools/pacbio-load/pl-zmw.h b/tools/pacbio-load/pl-zmw.h
new file mode 100644
index 0000000..aebf7dd
--- /dev/null
+++ b/tools/pacbio-load/pl-zmw.h
@@ -0,0 +1,105 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_pl_zmw_
+#define _h_pl_zmw_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "pl-tools.h"
+#include "pl-progress.h"
+#include "pl-regions.h"
+#include <kapp/main.h>
+#include <klib/rc.h>
+
+typedef struct zmw_tab
+{
+    af_data HoleNumber;
+    af_data HoleStatus;
+    af_data HoleXY;
+    af_data NumEvent;
+    af_data NumPasses;
+} zmw_tab;
+
+
+#define ZMW_BLOCK_SIZE 8192
+
+typedef struct zmw_block
+{
+    uint32_t NumEvent[ ZMW_BLOCK_SIZE ];
+    uint32_t HoleNumber[ ZMW_BLOCK_SIZE ];
+    uint8_t  HoleStatus[ ZMW_BLOCK_SIZE ];
+    uint16_t HoleXY[ ZMW_BLOCK_SIZE * 2 ];
+    uint32_t NumPasses[ ZMW_BLOCK_SIZE ];
+    uint64_t n_read;
+} zmw_block;
+
+
+typedef struct zmw_row
+{
+    uint64_t offset;
+    uint64_t spot_nr;
+
+    uint32_t NumEvent;
+    uint32_t HoleNumber;
+    uint16_t HoleXY[ 2 ];
+    uint8_t  HoleStatus;
+    uint32_t NumPasses;
+} zmw_row;
+
+
+typedef rc_t (*zmw_on_row)( VCursor *cursor, const uint32_t *col_idx,
+                            region_type_mapping *mapping,
+                            zmw_row *row, void * data );
+
+
+void zmw_init( zmw_tab *tab );
+void zmw_close( zmw_tab *tab );
+
+rc_t zmw_open( const KDirectory *hdf5_dir, zmw_tab *tab,
+               const bool num_passes, const char * path, bool supress_err_msg );
+
+uint64_t zmw_total( zmw_tab *tab );
+
+rc_t zmw_read_block( zmw_tab *tab, zmw_block * block,
+                     const uint64_t total_spots,
+                     const uint64_t pos,
+                     const bool with_num_passes );
+
+void zmw_block_row( zmw_block * block, zmw_row * row,
+                    const uint32_t idx );
+
+
+rc_t zmw_for_each( zmw_tab *tab, const KLoadProgressbar ** xml_progress, VCursor * cursor,
+                   bool with_progress, const uint32_t *col_idx, region_type_mapping *mapping,
+                   const bool with_num_passes, zmw_on_row on_row, void * data );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/pacbio-load/verify/ins_nl.pl b/tools/pacbio-load/verify/ins_nl.pl
new file mode 100755
index 0000000..f523787
--- /dev/null
+++ b/tools/pacbio-load/verify/ins_nl.pl
@@ -0,0 +1,15 @@
+#!/usr/bin/perl -w
+
+my $buffer = "";
+my $F_pos;
+my $F_in;
+
+open ( F_pos, $ARGV[1] ) or die "Could not open $ARGV[1]: $!\n";
+open ( F_in, $ARGV[0] ) or die "Could not open $ARGV[0]: $!\n";
+binmode( F_in );
+foreach $line ( <F_pos> )
+{
+    chomp ( $line );  # remove the newline from $line.
+    read ( F_in, $buffer, $line ); # read as many bytes as the line says...
+    print "$buffer\n";
+}
diff --git a/tools/pacbio-load/verify/ins_nl_1.pl b/tools/pacbio-load/verify/ins_nl_1.pl
new file mode 100755
index 0000000..9856a02
--- /dev/null
+++ b/tools/pacbio-load/verify/ins_nl_1.pl
@@ -0,0 +1,30 @@
+#!/usr/bin/perl -w
+
+my $buffer = "";
+my $F_pos;
+my $F_in;
+my $firstvalue;
+
+open ( F_pos, $ARGV[1] ) or die "Could not open $ARGV[1]: $!\n";
+open ( F_in, $ARGV[0] ) or die "Could not open $ARGV[0]: $!\n";
+binmode( F_in );
+foreach $line ( <F_pos> )
+{
+    chomp ( $line );  # remove the newline from $line.
+    read ( F_in, $buffer, $line ); # read as many bytes as the line says...
+    @charbuf = split( //, $buffer ); # split the buffer into an array of char's
+    $firstvalue = 1;
+    foreach ( @charbuf )
+    {
+        if ( $firstvalue == 1 )
+        {
+            printf ( "%d", ord( $_ ) );
+            $firstvalue = 0;
+        }
+        else
+        {
+            printf ( ", %d", ord( $_ ) );
+        }
+    }
+    print "\n";
+}
diff --git a/tools/pacbio-load/verify/ins_nl_2.pl b/tools/pacbio-load/verify/ins_nl_2.pl
new file mode 100755
index 0000000..a78f2fd
--- /dev/null
+++ b/tools/pacbio-load/verify/ins_nl_2.pl
@@ -0,0 +1,24 @@
+#!/usr/bin/perl -w
+
+my $buffer = "";
+my $F_pos;
+my $F_in;
+my $nr;
+my $intval;
+
+open ( F_pos, $ARGV[1] ) or die "Could not open $ARGV[1]: $!\n";
+open ( F_in, $ARGV[0] ) or die "Could not open $ARGV[0]: $!\n";
+binmode( F_in );
+foreach $line ( <F_pos> )
+{
+    chomp ( $line );  # remove the newline from $line.
+    read ( F_in, $buffer, $line * 2 ); # read as many int16's as the line says...
+    for ( $nr = 0; $nr < $line; $nr++ )
+    {
+        if ( $nr > 0 ) { print ", "; }
+        # take 2 bytes (int16) from the buffer
+        $intval = substr( $buffer, $nr * 2, 2 );
+        print ( unpack( S, $intval ) ); # S ... unsigned int16
+    }
+    print "\n";
+}
diff --git a/tools/pacbio-load/verify/ins_nl_4.pl b/tools/pacbio-load/verify/ins_nl_4.pl
new file mode 100755
index 0000000..1f6e9a7
--- /dev/null
+++ b/tools/pacbio-load/verify/ins_nl_4.pl
@@ -0,0 +1,24 @@
+#!/usr/bin/perl -w
+
+my $buffer = "";
+my $F_pos;
+my $F_in;
+my $nr;
+my $intval;
+
+open ( F_pos, $ARGV[1] ) or die "Could not open $ARGV[1]: $!\n";
+open ( F_in, $ARGV[0] ) or die "Could not open $ARGV[0]: $!\n";
+binmode( F_in );
+foreach $line ( <F_pos> )
+{
+    chomp ( $line );  # remove the newline from $line.
+    read ( F_in, $buffer, $line * 4 ); # read as many int32's as the line says...
+    for ( $nr = 0; $nr < $line; $nr++ )
+    {
+        if ( $nr > 0 ) { print ", "; }
+        # take 4 bytes (int32) from the buffer
+        $intval = substr( $buffer, $nr * 4, 4 );
+        print ( unpack( L, $intval ) ); # L ... unsigned int32
+    }
+    print "\n";
+}
diff --git a/tools/pacbio-load/verify/ins_nl_f.pl b/tools/pacbio-load/verify/ins_nl_f.pl
new file mode 100755
index 0000000..85aaa95
--- /dev/null
+++ b/tools/pacbio-load/verify/ins_nl_f.pl
@@ -0,0 +1,27 @@
+#!/usr/bin/perl -w
+
+my $buffer = "";
+my $F_in;
+my $nr;
+my $floatbuf;
+my $floatval;
+
+open ( F_in, $ARGV[0] ) or die "Could not open $ARGV[0]: $!\n";
+binmode( F_in );
+while ( <F_in> )
+{
+    if ( read ( F_in, $buffer, 16 ) == 16 ) # read 16 bytes = 4 x float 32
+    {
+        print "[";
+        for ( $nr = 0; $nr < 4; $nr++ )
+        {
+            if ( $nr > 0 ) { print ", "; }
+            # take 4 bytes (float32) from the buffer
+            $floatbuf = substr( $buffer, $nr * 4, 4 );
+            $floatval = unpack( 'f', $floatbuf ); # f ... float int32-bit
+            print $floatval;
+        }
+        print "]\n";
+    }
+}
+close ( F_in );
diff --git a/tools/pileup-stats/Makefile b/tools/pileup-stats/Makefile
new file mode 100644
index 0000000..13f0d18
--- /dev/null
+++ b/tools/pileup-stats/Makefile
@@ -0,0 +1,81 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/pileup-stats
+
+INT_TOOLS =
+
+EXT_TOOLS = \
+	pileup-stats
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# pileup-stats
+#
+PILEUP_STATS_SRC = \
+	pileup-stats
+
+PILEUP_STATS_OBJ = \
+	$(addsuffix .$(OBJX),$(PILEUP_STATS_SRC))
+
+PILEUP_STATS_LIB =    \
+	-L$(LIBDIR)       \
+	-L$(NGS_LIBDIR)   \
+	-sgeneral-writer  \
+	-sncbi-ngs-c++    \
+	-sncbi-vdb-static \
+	-sngs-c++         \
+	-skapp \
+	-stk-version \
+
+
+$(BINDIR)/pileup-stats: $(PILEUP_STATS_OBJ)
+	$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(PILEUP_STATS_LIB)
diff --git a/tools/pileup-stats/pileup-stats.cpp b/tools/pileup-stats/pileup-stats.cpp
new file mode 100644
index 0000000..39c7ab7
--- /dev/null
+++ b/tools/pileup-stats/pileup-stats.cpp
@@ -0,0 +1,787 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <ngs/ncbi/NGS.hpp>
+#include <ngs/ReadCollection.hpp>
+#include <ngs/Reference.hpp>
+#include <ngs/Alignment.hpp>
+#include <ngs/Pileup.hpp>
+#include <ngs/PileupEvent.hpp>
+
+#include <kapp/main.h>
+#include <klib/printf.h>
+#include <klib/sra-release-version.h>
+#include <iomanip>
+
+#define DFLT_BUFFER_SIZE ( 32 * 1024 )
+
+#include "../general-loader/general-writer.hpp"
+#include <arch-impl.h>
+
+#include <iostream>
+#include <string.h>
+#include <ctype.h>
+
+#include <sys/types.h>
+#include <unistd.h>
+
+using namespace ngs;
+
+namespace ncbi
+{
+    enum
+    {
+        col_RUN_NAME,
+        col_REFERENCE_SPEC,
+        col_REF_POS_TRANS,
+        col_DEPTH,
+        col_MISMATCH_COUNTS,
+        col_INSERTION_COUNTS,
+        col_DELETION_COUNT,
+
+        num_columns
+    };
+
+    static int tbl_id;
+    static int column_id [ num_columns ];
+    static uint8_t integer_column_flag_bits = 1; // pack integers by default
+    static int64_t zrow_id;
+
+    static uint32_t depth_cutoff = 1;               // do not output if depth <= this value
+    static uint32_t event_cutoff = 1;
+    static uint32_t num_significant_bits = 4;
+
+    static uint32_t verbosity;
+    static bool use_gw_logmessage = true; // log via general-writer API rather than stderr
+
+    const bool need_write_true = false;
+
+    inline
+    uint32_t filter_significant_bits ( uint32_t val )
+    {
+        if ( val != 0 )
+        {
+            // we find the most significant bit in value
+            // which will be 0..31 for non-zero values
+            // from which we subtract the number of significant bits
+            // being retained ( - 1 to account for 0-based index )
+            //
+            // e.g.:
+            //  val = 0x31, num_significant_bits = 4
+            //  uint32_msbit ( val ) => 5, meaning the most significant bit is 5,
+            //  which says there are 6 significant bits in total. we only want to
+            //  keep 4, however.
+            //  mask_index = 5 - ( 4 - 1 ) => 2
+            //  0xFFFFFFFF << mask_index => 0xFFFFFFFC
+            //  val then becomes 0x30
+            int mask_index = uint32_msbit ( val ) - ( int ) ( num_significant_bits - 1 );
+            if ( mask_index > 0 )
+            {
+                // this is a positive quantity
+                assert ( mask_index <= 31 );
+                val = val & ( 0xFFFFFFFF << mask_index );
+            }
+        }
+
+        return val;
+    }
+
+    static
+    void run (
+        GeneralWriter & out,
+        const String & runName, const String & refName, PileupIterator & pileup, uint64_t refLength, uint64_t refLengthSubTotal, uint64_t refLengthTotal )
+    {
+        int64_t ref_zpos, last_writ = 0;
+        bool need_write = false;
+
+        for ( ref_zpos = -1; pileup . nextPileup (); ++ ref_zpos, ++ zrow_id )
+        {
+            if ( ref_zpos < 0 )
+            {
+                last_writ = ref_zpos = pileup . getReferencePosition ();
+                int64_t ref_pos_trans = ref_zpos - zrow_id;
+                out . columnDefault ( column_id [ col_REF_POS_TRANS ], 64, & ref_pos_trans, 1 );
+                need_write = need_write_true;
+            }
+
+            switch ( verbosity )
+            {
+            case 0:
+                break;
+            case 1:
+                if ( ( ref_zpos % 1000000 ) == 0 )
+                {
+                    if ( ncbi :: use_gw_logmessage )
+                        out . progMsg ( refName, KAppVersion(), ref_zpos + refLengthSubTotal , refLengthTotal );
+                    else
+                        std :: cerr << "#  " << std :: setw ( 9 ) << ref_zpos << '\n';
+                }
+                break;
+            default:
+                if ( ( ref_zpos % 5000 ) == 0 )
+                {
+                    if ( ncbi :: use_gw_logmessage )
+                        out . progMsg ( refName, KAppVersion(), ref_zpos + refLengthSubTotal , refLengthTotal );
+                    else
+                    {
+                        if ( ( ref_zpos % 500000 ) == 0 )
+                            std :: cerr << "\n#  " << std :: setw ( 9 ) << ref_zpos << ' ';
+                        std :: cerr << '.';
+                    }
+                }
+            }
+
+            uint32_t ref_base_idx = 0;
+            bool ref_ambiguous = false;
+            char ref_base = pileup . getReferenceBase ();
+            switch ( toupper ( ref_base ) )
+            {
+            case 'A': break;
+            case 'C': ref_base_idx = 1; break;
+            case 'G': ref_base_idx = 2; break;
+            case 'T': ref_base_idx = 3; break;
+            default:
+                ref_base_idx = 0;
+                ref_ambiguous = true;
+            }
+
+            uint32_t depth = pileup . getPileupDepth ();
+
+            uint32_t mismatch_counts [ 4 ];
+            memset ( mismatch_counts, 0, sizeof mismatch_counts );
+
+            uint32_t ins_counts [ 4 ];
+            memset ( ins_counts, 0, sizeof ins_counts );
+
+            uint32_t del_cnt = 0;
+
+            if ( depth > depth_cutoff )
+            {
+                char mismatch;
+                uint32_t mismatch_idx;
+
+                while ( pileup . nextPileupEvent () )
+                {
+                    PileupEvent :: PileupEventType et = pileup . getEventType ();
+                    switch ( et & 7 )
+                    {
+                    case PileupEvent :: match:
+
+                        if ( ! ref_ambiguous )
+                        {
+                    handle_N_in_mismatch:
+                            if ( ( et & PileupEvent :: insertion ) != 0 )
+                                ++ ins_counts [ ref_base_idx ];
+                            break;
+                        }
+                        // intentional fall-through
+
+                    case PileupEvent :: mismatch:
+                        mismatch = pileup . getAlignmentBase ();
+                        mismatch_idx = 0;
+                        switch ( toupper ( mismatch ) )
+                        {
+                        case 'A': break;
+                        case 'C': mismatch_idx = 1; break;
+                        case 'G': mismatch_idx = 2; break;
+                        case 'T': mismatch_idx = 3; break;
+                        default:
+                            // treat N by removing this event from depth
+                            -- depth;
+                            goto handle_N_in_mismatch;
+                        }
+
+                        // first, assert that mismatch_idx cannot be ref_base_idx
+                        assert ( ref_ambiguous || mismatch_idx != ref_base_idx );
+
+                        // count insertions
+                        if ( ( et & PileupEvent :: insertion ) != 0 )
+                            ++ ins_counts [ mismatch_idx ];
+                        // count the mismatches
+                        ++ mismatch_counts [ mismatch_idx ];
+                        break;
+
+                    case PileupEvent :: deletion:
+                        if ( pileup . getEventIndelType () == PileupEvent :: normal_indel )
+                            ++ del_cnt;
+                        else
+                            -- depth;
+                        break;
+                    }
+                }
+            }
+
+            if ( depth > depth_cutoff )
+            {
+                int i;
+
+                if ( del_cnt <= event_cutoff )
+                    del_cnt = 0;
+
+                bool have_mismatch = false;
+                for ( i = 0; i < 4; ++ i )
+                {
+                    if ( mismatch_counts [ i ] <= event_cutoff )
+                        mismatch_counts [ i ] = 0;
+                    else
+                        have_mismatch = true;
+                }
+
+                bool have_inserts = false;
+                for ( i = 0; i < 4; ++ i )
+                {
+                    if ( ins_counts [ i ] <= event_cutoff )
+                        ins_counts [ i ] = 0;
+                    else
+                        have_inserts = true;
+                }
+
+                if ( num_significant_bits != 0 )
+                {
+                    depth = filter_significant_bits ( depth );
+                    del_cnt = filter_significant_bits ( del_cnt );
+                    for ( i = 0; i < 4; ++ i ) 
+                        mismatch_counts [ i ] = filter_significant_bits ( mismatch_counts [ i ] );
+                    for ( i = 0; i < 4; ++ i )
+                        ins_counts [ i ] = filter_significant_bits ( ins_counts [ i ] );
+                }
+                       
+                   
+                if ( ref_zpos > last_writ )
+                    out . moveAhead ( tbl_id, ref_zpos - last_writ );
+                out . write ( column_id [ col_DEPTH ], sizeof depth * 8, & depth, 1 );
+                if ( have_mismatch )
+                    out . write ( column_id [ col_MISMATCH_COUNTS ], sizeof mismatch_counts [ 0 ] * 8, mismatch_counts, 4 );
+                if ( have_inserts )
+                    out . write ( column_id [ col_INSERTION_COUNTS ], sizeof ins_counts [ 0 ] * 8, ins_counts, 4 );
+                if ( del_cnt != 0 )
+                    out . write ( column_id [ col_DELETION_COUNT ], sizeof del_cnt * 8, & del_cnt, 1 );
+                out . nextRow ( tbl_id );
+                last_writ = ref_zpos + 1;
+            }
+            else if ( need_write )
+            {
+                out . nextRow ( tbl_id );
+                need_write = false;
+            }
+
+        }
+        if ( ref_zpos > last_writ )
+            out . moveAhead ( tbl_id, ref_zpos - last_writ );
+    }
+
+    static
+    void prepareOutput ( GeneralWriter & out, const String & runName )
+    {
+        // add table
+        tbl_id = out . addTable ( "STATS" );
+
+        // add each column
+        column_id [ col_RUN_NAME ] = out . addColumn ( tbl_id, "RUN_NAME", 8 );
+        column_id [ col_REFERENCE_SPEC ] = out . addColumn ( tbl_id, "REFERENCE_SPEC", 8 );
+        column_id [ col_REF_POS_TRANS ] = out . addColumn ( tbl_id, "REF_POS_TRANS", 64, 0 );
+        column_id [ col_DEPTH ] = out . addColumn ( tbl_id, "DEPTH", 32, integer_column_flag_bits );
+        column_id [ col_MISMATCH_COUNTS ] = out . addColumn ( tbl_id, "MISMATCH_COUNTS", 32, integer_column_flag_bits );
+        column_id [ col_INSERTION_COUNTS ] = out . addColumn ( tbl_id, "INSERTION_COUNTS", 32, integer_column_flag_bits );
+        column_id [ col_DELETION_COUNT ] = out . addColumn ( tbl_id, "DELETION_COUNT", 32, integer_column_flag_bits );
+
+        // open the stream
+        out . open ();
+
+        // set default values
+        out . columnDefault ( column_id [ col_RUN_NAME ], 8, runName . data (), runName . size () );
+        out . columnDefault ( column_id [ col_DEPTH ], 32, "", 0 );
+        out . columnDefault ( column_id [ col_MISMATCH_COUNTS ], 32, "", 0 );
+        out . columnDefault ( column_id [ col_INSERTION_COUNTS ], 32, "", 0 );
+        out . columnDefault ( column_id [ col_DELETION_COUNT ], 32, "", 0 );
+    }
+
+    static
+    void set_software ( GeneralWriter & out )
+    {
+        char vers_str [ 64 ];
+        ver_t version = KAppVersion ();
+        string_printf ( vers_str, sizeof vers_str, NULL, "%V", version );
+        out . setSoftwareName ( "pileup-stats", vers_str );
+    }
+
+    static
+    void run ( const char * spec, const char *outfile, const char *_remote_db, size_t buffer_size, Alignment :: AlignmentCategory cat )
+    {
+        if ( ! ncbi :: use_gw_logmessage )
+        {
+            if ( verbosity > 0 )
+                std :: cerr << "# Opening run '" << spec << "'\n";
+        }
+        ReadCollection obj = ncbi :: NGS :: openReadCollection ( spec );
+        String runName = obj . getName ();
+
+        if ( ! ncbi :: use_gw_logmessage )
+        {
+            if ( verbosity > 0 )
+            {
+                std :: cerr << "# Preparing version " << GW_CURRENT_VERSION << " pipe to stdout\n";
+                if ( ( integer_column_flag_bits & 1 ) != 0 )
+                    std :: cerr << "#   USING INTEGER PACKING\n";
+            }
+        }
+
+        std :: string remote_db;
+        if ( _remote_db == NULL )
+            remote_db = runName + ".pileup_stat";
+        else
+            remote_db = _remote_db;
+
+        GeneralWriter *outp = ( outfile == NULL ) ? 
+            new GeneralWriter ( 1, buffer_size ) : new GeneralWriter ( outfile );
+
+        try
+        {
+            GeneralWriter &out = *outp;
+
+            // set software node
+            set_software ( out );
+
+            // add remote db event
+            out . setRemotePath ( remote_db );
+
+            // use schema
+            out . useSchema ( "align/pileup-stats.vschema", "NCBI:pileup:db:pileup_stats #1" );
+
+            prepareOutput ( out, runName );
+            if ( verbosity > 0 )
+            {
+                if ( ncbi :: use_gw_logmessage )
+                    out . logMsg ( "Accessing all references" );
+                else
+                    std :: cerr << "# Accessing all references\n";
+            }
+
+
+
+            // get the total number of references
+            uint64_t totalRefLength = 0;
+            {
+                ReferenceIterator rf = obj . getReferences ();
+                while ( rf . nextReference () )
+                    totalRefLength += rf . getLength ();
+            }
+
+            ReferenceIterator ref = obj . getReferences ();
+
+            uint64_t refLengthSubTotal = 0;
+            while ( ref . nextReference () )
+            {
+                String refName = ref . getCanonicalName ();
+
+                //get the length of the reference so that progress can be given
+                uint64_t refLength = ref . getLength ();
+
+                if ( verbosity > 0 )
+                {
+                    if ( ncbi :: use_gw_logmessage )
+                        out . logMsg ( "Processing reference '" + refName + "'" );
+                    else
+                        std :: cerr << "# Processing reference '" << refName << "'\n";
+                }
+                out . columnDefault ( column_id [ col_REFERENCE_SPEC ], 8, refName . data (), refName . size () );
+
+                if ( verbosity > 0 )
+                {
+                    if ( ncbi :: use_gw_logmessage )
+                        out . logMsg ( "Accessing all pileups" );
+                    else
+                        std :: cerr << "# Accessing all pileups\n";
+                }
+                PileupIterator pileup = ref . getPileups ( cat );
+                run ( out, runName, refName, pileup, refLength, refLengthSubTotal,  totalRefLength );
+
+                refLengthSubTotal += refLength;
+                if ( ! ncbi :: use_gw_logmessage )
+                {
+                    if ( verbosity > 1 )
+                        std :: cerr << '\n';
+                }
+            }
+        }
+        catch ( ErrorMsg & x )
+        {
+            outp -> logError ( x . what () );
+            delete outp;
+            throw;
+        }
+        catch ( const char x [] )
+        {
+            outp -> logError ( x );
+            delete outp;
+            throw;
+        }
+        catch ( ... )
+        {
+            outp -> logError ( "unknown exception" );
+            delete outp;
+            throw;
+        }
+        delete outp;
+    }
+}
+
+extern "C"
+{
+    rc_t CC Usage ( struct Args const * args )
+    {
+        return 0;
+    }
+
+    static 
+    const char * getArg ( int & i, int argc, char * argv [] )
+    {
+        
+        if ( ++ i == argc )
+            throw "Missing argument";
+        
+        return argv [ i ];
+    }
+
+    static
+    const char * findArg ( const char*  &arg, int & i, int argc, char * argv [] )
+    {
+        if ( arg [ 1 ] != 0 )
+        {
+            const char * next = arg + 1;
+            arg = "\0";
+            return next;
+        }
+
+        return getArg ( i, argc, argv );
+    }
+
+    static void handle_help ( const char *appName )
+    {
+        const char *appLeaf = strrchr ( appName, '/' );
+        if ( appLeaf ++ == 0 )
+            appLeaf = appName;
+
+        ver_t vers = KAppVersion ();
+
+        std :: cout
+            << '\n'
+            << "Usage:\n"
+            << "  " << appLeaf << " [options] <accession>"
+            << "\n\n"
+            << "Options:\n"
+            << "  -o|--output-file                 file for output\n"
+            << "                                   (default pipe to stdout)\n"
+            << "  -r|--remote-db                   name of remote database to create\n"
+            << "                                   (default <accession>.pileup_stat)\n"
+            << "  -x|--depth-cutoff                cutoff for depth <= value (default 1)\n"
+            << "  -e|--event-cutoff                cutoff for number of events > value (default " << ncbi::event_cutoff << ")\n"
+            << "  -p|--num-significant-bits        number of significant bits for depth and counts to store (default " << ncbi::num_significant_bits << ")\n"
+            << "  -a|--align-category              the types of alignments to pile up:\n"
+            << "                                   { primary, secondary, all } (default primary)\n"
+            << "  --buffer-size bytes              size of output pipe buffer - default " << DFLT_BUFFER_SIZE/1024 << "K bytes\n"
+            << "  -U|--unpack-integer              don't pack integers in output pipe - uses more bandwidth\n"
+            << "  -h|--help                        output brief explanation of the program\n"
+            << "  -v|--verbose                     increase the verbosity of the program.\n"
+            << "  -V|--version                     display the version of the program then quit.\n"
+            << "                                   use multiple times for more verbosity.\n"
+            << "  --log-stderr                     log via stderr rather than general-writer API (default - general-writer API)\n"
+            << '\n'
+            << appName << " : "
+            << ( vers >> 24 )
+            << '.'
+            << ( ( vers >> 16 ) & 0xFF )
+            << '.'
+            << ( vers & 0xFFFF )
+            << '\n'
+            << '\n'
+            ;
+    }
+
+    static void handle_version ( const char *progname )
+    {
+        char cSra [ 512 ] = "";
+        SraReleaseVersion sraVersion;
+        memset ( & sraVersion, 0, sizeof sraVersion );
+
+        rc_t rc = SraReleaseVersionGet ( & sraVersion );
+        if ( rc == 0 )
+        {
+            rc = SraReleaseVersionPrint ( & sraVersion, cSra, sizeof cSra, NULL );
+        }
+
+        ::ver_t vers = ::KAppVersion();
+
+        std::cout
+            << std::endl
+            << progname << " : "
+            << ( vers >> 24 )
+            << '.'
+            << ( ( vers >> 16 ) & 0xFF )
+            << '.'
+            << ( vers & 0xFFFF )
+            << " ( " << cSra << " )"
+            << std::endl << std::endl;
+    }
+
+    static void CC handle_error ( const char *arg, void *message )
+    {
+        throw ( const char * ) message;
+    }
+
+    rc_t CC KMain ( int argc, char *argv [] )
+    {
+        rc_t rc = -1;
+        Alignment :: AlignmentCategory cat = Alignment :: primaryAlignment;
+        size_t buffer_size = DFLT_BUFFER_SIZE;
+        try
+        {
+            int num_runs = 0;
+            const char *outfile = NULL;
+            const char *remote_db = NULL;
+
+            for ( int i = 1; i < argc; ++ i )
+            {
+                const char * arg = argv [ i ];
+                if ( arg [ 0 ] != '-' )
+                {
+                    // have an input run
+                    argv [ ++ num_runs ] = ( char* ) arg;
+                }
+                else do switch ( ( ++ arg ) [ 0 ] )
+                {
+                case 'o':
+                    outfile = findArg ( arg, i, argc, argv );
+                    break;
+                case 'r':
+                    remote_db = findArg ( arg, i, argc, argv );
+                    break;
+                case 'x':
+                    ncbi :: depth_cutoff = AsciiToU32 ( findArg ( arg, i, argc, argv ), 
+                        handle_error, ( void * ) "Invalid depth cutoff" );
+                    break;
+                case 'e':
+                    ncbi :: event_cutoff = AsciiToU32 ( findArg ( arg, i, argc, argv ), 
+                        handle_error, ( void * ) "Invalid event cutoff" );
+                    break;
+                case 'p':
+                    ncbi :: num_significant_bits = AsciiToU32 ( findArg ( arg, i, argc, argv ), 
+                        handle_error, ( void * ) "Invalid num-significant-bits" );
+                    break;
+                case 'a':
+                {
+                    const char * atype = findArg ( arg, i, argc, argv );
+                    if ( strcmp ( atype, "all" ) == 0 )
+                        cat = Alignment :: all;
+                    else if ( strcmp ( atype, "primary" ) == 0 ||
+                              strcmp ( atype, "primaryAlignment" ) == 0 )
+                        cat = Alignment :: primaryAlignment;
+                    else if ( strcmp ( atype, "secondary" ) == 0 ||
+                              strcmp ( atype, "secondaryAlignment" ) == 0 )
+                        cat = Alignment :: secondaryAlignment;
+                    else
+                    {
+                        throw "Invalid alignment category";
+                    }
+                    break;
+                }
+                case 'U':
+                    ncbi :: integer_column_flag_bits = 0;
+                    break;
+                case 'v':
+                    ++ ncbi :: verbosity;
+                    break;
+                case 'h':
+                case '?':
+                    handle_help ( argv [ 0 ] );
+                    return 0;
+                case 'V':
+                    handle_version ( argv [ 0 ] );
+                    return 0;
+                case 'L': // eat it and do nothing
+                    findArg ( arg, i, argc, argv );
+                    break;
+                case 'z': // eat it and do nothing
+                    findArg ( arg, i, argc, argv );
+                    break;
+                case '-':
+                    ++ arg;
+                    if ( strcmp ( arg, "output-file" ) == 0 )
+                    {
+                        outfile = getArg ( i, argc, argv );
+                    }
+                    else if ( strcmp ( arg, "remote-db" ) == 0 )
+                    {
+                        remote_db = getArg ( i, argc, argv );
+                    }
+                    else if ( strcmp ( arg, "buffer-size" ) == 0 )
+                    {
+                        const char * str = getArg ( i, argc, argv );
+
+                        char * end;
+                        long new_buffer_size = strtol ( str, & end, 0 );
+                        if ( new_buffer_size < 0 || str == ( const char * ) end || end [ 0 ] != 0 )
+                            throw "Invalid buffer argument";
+
+                        buffer_size = new_buffer_size;
+                    }
+                    else if ( strcmp ( arg, "depth-cutoff" ) == 0 )
+                    {
+                        ncbi :: depth_cutoff = AsciiToU32 ( getArg ( i, argc, argv ), 
+                            handle_error, ( void * ) "Invalid depth cutoff" );
+                    }
+                    else if ( strcmp ( arg, "event-cutoff" ) == 0 )
+                    {
+                        ncbi :: event_cutoff = AsciiToU32 ( getArg ( i, argc, argv ),
+                            handle_error, ( void * ) "Invalid event cutoff" );
+                    }
+                    else if ( strcmp ( arg, "num-significant-bits" ) == 0 )
+                    {
+                        ncbi :: num_significant_bits = AsciiToU32 ( getArg ( i, argc, argv ),
+                            handle_error, ( void * ) "Invalid num-significant-bits" );
+                    }
+                    else if ( strcmp ( arg, "align-category" ) == 0 )
+                    {
+                        const char * atype = getArg ( i, argc, argv );
+                        if ( strcmp ( atype, "all" ) == 0 )
+                            cat = Alignment :: all;
+                        else if ( strcmp ( atype, "primary" ) == 0 ||
+                                  strcmp ( atype, "primaryAlignment" ) == 0 )
+                            cat = Alignment :: primaryAlignment;
+                        else if ( strcmp ( atype, "secondary" ) == 0 ||
+                                  strcmp ( atype, "secondaryAlignment" ) == 0 )
+                            cat = Alignment :: secondaryAlignment;
+                        else
+                        {
+                            throw "Invalid alignment category";
+                        }
+                    }
+                    else if ( strcmp ( arg, "unpack-integer" ) == 0 )
+                    {
+                        ncbi :: integer_column_flag_bits = 0;
+                    }
+                    else if ( strcmp ( arg, "verbose" ) == 0 )
+                    {
+                        ++ ncbi :: verbosity;
+                    }
+                    else if ( strcmp ( arg, "log-stderr" ) == 0 )
+                    {
+                        ncbi :: use_gw_logmessage = false;
+                    }
+                    else if ( strcmp ( arg, "help" ) == 0 )
+                    {
+                        handle_help ( argv [ 0 ] );
+                        return 0;
+                    }
+                    else if ( strcmp ( arg, "version" ) == 0 )
+                    {
+                        handle_version ( argv [ 0 ] );
+                        return 0;
+                    }
+                    else if ( strcmp ( arg, "log-level" ) == 0 )
+                    {
+                        /* eat it and do nothing */
+                        getArg ( i, argc, argv );
+                    }
+                    else if ( strcmp ( arg, "xml-log" ) == 0 )
+                    {
+                        /* eat it and do nothing */
+                        getArg ( i, argc, argv );
+                    }
+                    else if ( strcmp ( arg, "xml-log-fd" ) == 0 )
+                    {
+                        /* eat it and do nothing */
+                        getArg ( i, argc, argv );
+                    }
+                    else if ( strcmp ( arg, "version" ) == 0 )
+                    {
+                        handle_version ( argv [ 0 ] );
+                        return 0;
+                    }
+                    else
+                    {
+                        throw "Invalid Argument";
+                    }
+
+                    arg = "\0";
+
+                    break;
+                default:
+                    throw "Invalid argument";
+                }
+                while ( arg [ 1 ] != 0 );
+            }
+
+            if ( num_runs > 1 )
+                throw "only one run may be processed at a time";
+            for ( int i = 1; i <= num_runs; ++ i )
+            {
+                ncbi :: run ( argv [ i ], outfile, remote_db, buffer_size, cat );
+            }
+
+            rc = 0;
+        }
+        catch ( ErrorMsg & x )
+        {
+            if ( ! ncbi :: use_gw_logmessage )
+            {
+                std :: cerr
+                    << "ERROR: "
+                    << argv [ 0 ]
+                    << ": "
+                    << x . what ()
+                    << '\n'
+                    ;
+            }
+        }
+        catch ( const char x [] )
+        {
+            if ( ! ncbi :: use_gw_logmessage )
+            {
+                std :: cerr
+                    << "ERROR: "
+                    << argv [ 0 ]
+                    << ": "
+                    << x
+                    << '\n'
+                    ;
+            }
+        }
+        catch ( ... )
+        {
+            if ( ! ncbi :: use_gw_logmessage )
+            {
+                std :: cerr
+                    << "ERROR: "
+                    << argv [ 0 ]
+                    << ": unknown\n"
+                    ;
+            }
+        }
+
+        return rc;
+    }
+}
diff --git a/tools/pore-load/GeneralWriter.py b/tools/pore-load/GeneralWriter.py
new file mode 100644
index 0000000..d8296da
--- /dev/null
+++ b/tools/pore-load/GeneralWriter.py
@@ -0,0 +1,312 @@
+# General Writer to drive VDB General Loader
+
+import sys
+import os
+import struct
+import array
+    
+def _paddedFormat(fmt):
+    l = struct.calcsize(fmt)
+    if l % 4 != 0:
+        fmt += (" %dx" % (4 - l % 4))
+    return fmt
+
+
+def _makeHeader():
+    fmt = "8s 4I"
+    size = struct.calcsize(fmt)
+    return struct.pack(fmt, "NCBIgnld".encode('ascii'), 1, 2, size, 0)
+
+
+def _makeSimpleEvent(eid):
+    """ used for { evt_end_stream, evt_open_stream, evt_next_row } """
+    return struct.pack("I", eid)
+
+
+def _make1StringEvent(eid, str1):
+    """ used for { evt_errmsg, evt_remote_path, evt_new_table, evt_software_name } """
+    fmt = _paddedFormat("I 1I {}s".format(len(str1)))
+    return struct.pack(fmt, eid, len(str1), str1)
+
+
+def _make2StringEvent(eid, str1, str2):
+    """ used for { evt_use_schema, evt_metadata_node } """
+    fmt = _paddedFormat("I 2I {}s {}s".format(len(str1), len(str2)))
+    return struct.pack(fmt, eid, len(str1), len(str2), str1, str2)
+
+
+def _makeColumnEvent(colid, tblid, bits, name):
+    """ used for { evt_new_column } """
+    fmt = _paddedFormat("I 3I {}s".format(len(name)))
+    return struct.pack(fmt, colid, tblid, bits, len(name), name)
+
+
+def _makeDataEvent(colid, count):
+    """ used for { evt_cell_default, evt_cell_data } """
+    return struct.pack("2I", colid, count)
+
+
+class GeneralWriter:
+    # pylint: disable=too-few-public-methods
+    
+    evt_bad_event       = 0
+    
+    evt_errmsg          = (1 << 24) + evt_bad_event
+    evt_end_stream      = (1 << 24) + evt_errmsg
+    
+    evt_remote_path     = (1 << 24) + evt_end_stream
+    evt_use_schema      = (1 << 24) + evt_remote_path
+    evt_new_table       = (1 << 24) + evt_use_schema
+    evt_new_column      = (1 << 24) + evt_new_table
+    evt_open_stream     = (1 << 24) + evt_new_column
+
+    evt_cell_default    = (1 << 24) + evt_open_stream
+    evt_cell_data       = (1 << 24) + evt_cell_default
+    evt_next_row        = (1 << 24) + evt_cell_data
+
+    evt_move_ahead      = (1 << 24) + evt_next_row      # this one is not used here
+    evt_errmsg2         = (1 << 24) + evt_move_ahead    # this one is not used here
+    evt_remote_path2    = (1 << 24) + evt_errmsg2       # this one is not used here
+    evt_use_schema2     = (1 << 24) + evt_remote_path2  # this one is not used here
+    evt_new_table2      = (1 << 24) + evt_use_schema2   # this one is not used here
+    evt_cell_default2   = (1 << 24) + evt_new_table2    # this one is not used here
+    evt_cell_data2      = (1 << 24) + evt_cell_default2 # this one is not used here
+    evt_empty_default   = (1 << 24) + evt_cell_data2    # this one is not used here
+    
+    # BEGIN VERSION 2 MESSAGES
+    evt_software_name   = (1 << 24) + evt_empty_default
+    evt_mdata_node_db   = (1 << 24) + evt_software_name
+    evt_mdata_node_tbl  = (1 << 24) + evt_mdata_node_db
+    evt_mdata_node_col  = (1 << 24) + evt_mdata_node_tbl
+
+
+    def errorMessage(self, message):
+        os.write(sys.stdout.fileno(), _make1StringEvent(self.evt_errmsg, message.encode('utf-8')))
+
+
+    def write(self, spec):
+        tableId = spec['_tableId']
+        for k in spec:
+            if k.startswith('_'):
+                continue
+            c = spec[k]
+            if 'data' in c:
+                data = c['data']
+                try:
+                    data = data()
+                except:
+                    pass
+                try:
+                    self._writeColumnData(c['_columnId'], len(data), data)
+                except:
+                    sys.stderr.write("failed to write column #{}\n".format(c['_columnId']))
+                    raise
+        self._writeNextRow(tableId)
+
+
+    @classmethod
+    def _writeHeader(cls, remoteDb, schemaFileName, schemaDbSpec):
+        os.write(sys.stdout.fileno(), _makeHeader())
+        os.write(sys.stdout.fileno(), _make1StringEvent(cls.evt_remote_path, remoteDb))
+        os.write(sys.stdout.fileno(), _make2StringEvent(cls.evt_use_schema, schemaFileName, schemaDbSpec))
+    
+    
+    @classmethod
+    def _writeSoftwareName(cls, name, version): # name is any string, version is like "2.1.5"
+        os.write(sys.stdout.fileno(), _make2StringEvent(cls.evt_software_name, name, version))
+
+
+    @classmethod
+    def _writeEndStream(cls):
+        os.write(sys.stdout.fileno(), _makeSimpleEvent(cls.evt_end_stream))
+
+
+    @classmethod
+    def _writeNewTable(cls, tableId, table):
+        os.write(sys.stdout.fileno(), _make1StringEvent(cls.evt_new_table + tableId, table))
+
+
+    @classmethod
+    def _writeNewColumn(cls, columnId, tableId, bits, column):
+        os.write(sys.stdout.fileno(), _makeColumnEvent(cls.evt_new_column + columnId, tableId, bits, column))
+
+
+    @classmethod
+    def _writeOpenStream(cls):
+        os.write(sys.stdout.fileno(), _makeSimpleEvent(cls.evt_open_stream))
+        
+    
+    @classmethod
+    def _writeColumnDefault(cls, colId, count, data):
+        l = os.write(sys.stdout.fileno(), _makeDataEvent(cls.evt_cell_default + colId, count))
+        l = (l + os.write(sys.stdout.fileno(), data)) % 4
+        if l != 0:
+            os.write(sys.stdout.fileno(), struct.pack("%dx" % (4 - l)))
+
+
+    @classmethod
+    def _writeDbMetadata(cls, dbId, nodeName, nodeValue):
+        os.write(sys.stdout.fileno(), _make2StringEvent(cls.evt_mdata_node_db + dbId, nodeName, nodeValue))
+    
+    
+    @classmethod
+    def _writeTableMetadata(cls, tblId, nodeName, nodeValue):
+        os.write(sys.stdout.fileno(), _make2StringEvent(cls.evt_mdata_node_tbl + tblId, nodeName, nodeValue))
+    
+    
+    @classmethod
+    def _writeColumnMetadata(cls, colId, nodeName, nodeValue):
+        os.write(sys.stdout.fileno(), _make2StringEvent(cls.evt_mdata_node_col + colId, nodeName, nodeValue))
+    
+    
+    @classmethod
+    def _writeColumnData(cls, colId, count, data):
+        l = os.write(sys.stdout.fileno(), _makeDataEvent(cls.evt_cell_data + colId, count))
+        l = (l + os.write(sys.stdout.fileno(), data)) % 4
+        if l != 0:
+            os.write(sys.stdout.fileno(), struct.pack("%dx" % (4 - l)))
+
+
+    @classmethod
+    def _writeNextRow(cls, tableId):
+        os.write(sys.stdout.fileno(), _makeSimpleEvent(cls.evt_next_row + tableId))
+
+
+    def writeDbMetadata(self, nodeName, nodeValue):
+        """ this only supports writing to the default database """
+        GeneralWriter._writeDbMetadata(0, nodeName.encode('ascii'), nodeValue.encode('utf-8'))
+
+
+    def writeTableMetadata(self, table, nodeName, nodeValue):
+        GeneralWriter._writeTableMetadata(table['_tableId'], nodeName.encode('ascii'), nodeValue.encode('utf-8'))
+
+
+    def writeColumnMetadata(self, column, nodeName, nodeValue):
+        GeneralWriter._writeColumnMetadata(column['_columnId'], nodeName.encode('ascii'), nodeValue.encode('utf-8'))
+
+
+    def __init__(self, fileName, schemaFileName, schemaDbSpec, softwareName, versionString, tbl):
+        """ Construct a General Writer object
+    
+            writer may be None if no actual output is desired
+                else writer is expected to have a callable write attribute
+            
+            fileName is a string with name of the database that will be created
+
+            schemaFileName is a string with the path to the file containing the schema
+
+            schemaDbSpec is a string with the schema name of the database that will be created
+            
+            softwareName is a string
+            
+            versionString is a three-part number like "2.1.5"
+        """
+        
+        GeneralWriter._writeHeader(fileName.encode('utf-8')
+            , schemaFileName.encode('utf-8')
+            , schemaDbSpec.encode('ascii'))
+        
+        GeneralWriter._writeSoftwareName(softwareName.encode('utf-8'), versionString.encode('ascii'))
+
+        tableId = 0
+        columnId = 0
+        for t in tbl:
+            tableId += 1
+            GeneralWriter._writeNewTable(tableId, t.encode('ascii'))
+            cols = tbl[t]
+            for c in cols:
+                columnId = columnId + 1
+                cols[c]['_columnId'] = columnId
+                expression = cols[c]['expression'] if 'expression' in cols[c] else c
+                bits = cols[c]['elem_bits']
+                GeneralWriter._writeNewColumn(columnId, tableId, bits, expression.encode('ascii'))
+            tbl[t]['_tableId'] = tableId
+
+        GeneralWriter._writeOpenStream()
+        for t in tbl.values():
+            for c in t.values():
+                try:
+                    if 'default' in c:
+                        try:
+                            GeneralWriter._writeColumnDefault(c['_columnId'], len(c['default']), c['default'])
+                        except:
+                            sys.stderr.write("failed to set default for %s\n" % c)
+                            raise
+                except TypeError:
+                    pass
+
+
+    def __del__(self):
+        try: GeneralWriter._writeEndStream()
+        except: pass
+
+
+if __name__ == "__main__":
+    readData = [ "ACGT", "GTAACGT" ]
+    row = 0
+    
+    def getRead():
+        global row
+        cur = row
+        row = row + 1
+        return readData[cur].encode('ascii')
+        
+    spec = {
+        'SEQUENCE': {
+            'READ': {
+                'expression': '(INSDC:dna:text)READ',
+                'elem_bits': 8,
+                'data': getRead
+            },
+            'QUALITY': {
+                'expression': '(INSDC:quality:phred)QUALITY',
+                'elem_bits': 8,
+            },
+            'LABEL': {
+                'elem_bits': 8,
+                'default': 'templatecomplement'.encode('ascii')
+            },
+            'LABEL_START': {
+                'elem_bits': 32,
+            },
+            'LABEL_LENGTH': {
+                'elem_bits': 32,
+            },
+            'READ_START': {
+                'elem_bits': 32,
+            },
+            'READ_LENGTH': {
+                'elem_bits': 32,
+            },
+        },
+        'CONSENSUS': {
+            'READ': {
+                'expression': '(INSDC:dna:text)READ',
+                'elem_bits': 8,
+            },
+            'QUALITY': {
+                'expression': '(INSDC:quality:phred)QUALITY',
+                'elem_bits': 8,
+            },
+            'LABEL': {
+                'elem_bits': 8,
+                'default': '2DFull'.encode('ascii')
+            },
+            'LABEL_START': {
+                'elem_bits': 32,
+                'default': array.array('I', [ 0 ])
+            },
+            'LABEL_LENGTH': {
+                'elem_bits': 32,
+                'default': array.array('I', [ 2 ])
+            }
+        },
+    }
+    gw = GeneralWriter(sys.argv[1], sys.argv[2], sys.argv[3], spec)
+    
+    spec['SEQUENCE']['READ_LENGTH']['data'] = array.array('I', [ 1, 2 ])
+    gw.write(spec['SEQUENCE'])
+    gw.write(spec['SEQUENCE'])
+
+    gw = None
+
diff --git a/tools/pore-load/README.md b/tools/pore-load/README.md
new file mode 100644
index 0000000..01bdc01
--- /dev/null
+++ b/tools/pore-load/README.md
@@ -0,0 +1,10 @@
+### This tool relies on the following external python modules:
+-  `h5py`
+-  `poretools` https://github.com/arq5x/poretools
+-  `GeneralWriter` which will be part of ngs, but is tempararily included here
+
+`poretools` also relies on `h5py` and `h5py` relies on `hdf5`. `python` will need to be able to locate the `hdf5` library at the time that the `h5py` module is loaded, for example, by setting LD_LIBRARY_PATH:
+```
+LD_LIBRARY_PATH=/usr/local/hdf5/1.8.10/lib python -O pore-load.py --tmpdir=/dev/shm --output=foo test-files/Ecoli_R7_NONI.tgz
+```
+Furthermore, to do anything useful, the output of this tool needs to be sent to `general-loader`, which is part of `sra-tools`.
diff --git a/tools/pore-load/pore-load.py b/tools/pore-load/pore-load.py
new file mode 100644
index 0000000..7fb0c19
--- /dev/null
+++ b/tools/pore-load/pore-load.py
@@ -0,0 +1,406 @@
+#!python
+"""Options:
+    tmpdir:     Path to work space; this should be fast storage where lots of
+                small files can be quickly created and deleted, but it probably
+                doesn't need to be large, /dev/shm or an SSD would be perfect.
+                The work space will be a directory created here using mkdtemp.
+
+    output:     The destination VDB database, default is 'pore-load.out' in the
+                work space.
+
+    progress:   The update rate (in seconds) for periodic progress messages,
+                0 to disable, initially set to 10 seconds if __debug__ else 0.
+                Regardless, one progress message will be printed at the end of
+                each input.
+
+    help:       displays this message
+    
+Note:
+    Input is expected to be .tar.gz files. Decompression is done by a subprocess
+    if zcat or gzcat can be found in the path, otherwise it's done in-process,
+    which is slower.
+    
+    Input is taken from stdin if no files are given. If needed, it will be
+    decompressed in-process.
+    
+    The args parsing in this script is terribly primitive. You must type exactly
+    as shown, with the '=' and no whitespace.
+"""
+
+import sys
+
+# Environment globals
+gzcat = None    # what executable to use for out-of-process decompression
+files = []      # what files to operate on
+tmpdir = "/tmp" # default workspace
+outdir = None
+removeWorkDir = True
+showProgress = 10 if __debug__ else 0
+usage = "Usage: {} [ --tmpdir=<path> ] [ --output=<path> ] [ --progress=<number> ] [ --help ] [file ...]\n".format(sys.argv[0])
+
+for arg in sys.argv[1:]:
+    if arg[0:2] == '--':
+        if arg[2:9] == 'tmpdir=':
+            tmpdir = arg[9:]
+        elif arg[2:9] == 'output=':
+            outdir = arg[9:]
+        elif arg[2:11] == 'progress=':
+            showProgress = eval(arg[11:])
+        elif arg[2:] == 'help':
+            sys.stderr.write(usage)
+            sys.stderr.write(__doc__)
+            exit(0)
+        else:
+            sys.stderr.write(usage)
+            exit(1)
+    else:
+        files.append(arg)
+
+import logging
+logging.basicConfig(level=logging.DEBUG)
+
+import os, subprocess, tempfile
+
+if __debug__:
+    import traceback
+
+import time
+import array
+import tarfile
+import h5py
+import poretools
+import GeneralWriter
+
+
+workDir = tempfile.mkdtemp(suffix='.tmp', prefix='pore-load.', dir=tmpdir)
+if outdir == None:
+    outdir = workDir + '/pore-load.out'
+    removeWorkDir = False
+
+sys.stderr.write("Info: writing '{}'\n".format(outdir))
+sys.stderr.write("Info: using '{}' for work space\n".format(workDir))
+
+tbl = {
+    'SEQUENCE': {
+        'READ': {
+            'expression': '(INSDC:dna:text)READ',
+            'elem_bits': 8,
+        },
+        'QUALITY': {
+            'expression': '(INSDC:quality:text:phred_33)QUALITY',
+            'elem_bits': 8,
+        },
+        'SPOT_GROUP': {
+            'elem_bits': 8,
+        },
+        'CHANNEL': {
+            'elem_bits': 32,
+        },
+        'READ_NO': {
+            'expression': 'READ_NUMBER',
+            'elem_bits': 32,
+        },
+        'READ_START': {
+            'expression': '(INSDC:coord:zero)READ_START',
+            'elem_bits': 32,
+        },
+        'READ_LENGTH': {
+            'expression': '(INSDC:coord:len)READ_LEN',
+            'elem_bits': 32,
+        },
+        'READ_TYPE': {
+            'expression': '(U8)READ_TYPE',
+            'elem_bits': 8
+        },
+    },
+    'CONSENSUS': {
+        'READ': {
+            'expression': '(INSDC:dna:text)READ',
+            'elem_bits': 8,
+        },
+        'QUALITY': {
+            'expression': '(INSDC:quality:text:phred_33)QUALITY',
+            'elem_bits': 8,
+        },
+        'SPOT_GROUP': {
+            'elem_bits': 8,
+        },
+        'CHANNEL': {
+            'elem_bits': 32,
+        },
+        'READ_NO': {
+            'expression': 'READ_NUMBER',
+            'elem_bits': 32,
+        },
+        'HIGH_QUALITY': {
+            'expression': 'HIGH_QUALITY',
+            'elem_bits': 8,
+        },
+        'READ_START': {
+            'expression': '(INSDC:coord:zero)READ_START',
+            'elem_bits': 32,
+            'default': array.array('I', [0])
+        },
+        'READ_LENGTH': {
+            'expression': '(INSDC:coord:len)READ_LEN',
+            'elem_bits': 32,
+        },
+        'READ_TYPE': {
+            'expression': '(U8)READ_TYPE',
+            'elem_bits': 8
+        },
+    }
+}
+
+gw = GeneralWriter.GeneralWriter(
+      outdir
+    , 'sra/nanopore.vschema'
+    , 'NCBI:SRA:Nanopore:db'
+    , 'pore-load.py'
+    , '1.0.0'
+    , tbl)
+
+
+class FastQData:
+    """ To hold FastQ data """
+    
+    # pylint: disable=too-many-instance-attributes
+    # pylint: disable=too-many-arguments
+    # what an idiotic warning
+    
+    def __init__(self, source
+        , readLength
+        , sequence
+        , quality
+        , sequence_2d
+        , quality_2d
+        , channel
+        , readno
+        , isHighQuality
+        ):
+        self.source = source
+        self.readLength = readLength
+        self.sequence = sequence
+        self.quality = quality
+        self.sequence_2d = sequence_2d
+        self.quality_2d = quality_2d
+        self.channel = channel
+        self.readno = readno
+        self.isHighQuality = isHighQuality
+    
+    def write(self):
+        """ Write FASTQ data to the General Writer
+            Writes 2D reads to CONSENSUS
+            Writes other reads to SEQUENCE
+        """
+        if self.sequence_2d != None:
+            tbl['CONSENSUS']['HIGH_QUALITY']['data'] = array.array('b', [ 1 if self.isHighQuality else 0 ])
+            tbl['CONSENSUS']['READ_LENGTH' ]['data'] = array.array('I', [len(self.sequence_2d)])
+            tbl['CONSENSUS']['READ_TYPE'   ]['data'] = array.array('B', [1])
+            tbl['CONSENSUS']['READ'        ]['data'] = self.sequence_2d.encode('ascii')
+            tbl['CONSENSUS']['QUALITY'     ]['data'] = self.quality_2d.encode('ascii')
+        else:
+            tbl['CONSENSUS']['HIGH_QUALITY']['data'] = array.array('b', [False])
+            tbl['CONSENSUS']['READ_LENGTH' ]['data'] = array.array('I', [0])
+            tbl['CONSENSUS']['READ_TYPE'   ]['data'] = array.array('B', [0])
+            tbl['CONSENSUS']['READ'        ]['data'] = ''.encode('ascii')
+            tbl['CONSENSUS']['QUALITY'     ]['data'] = ''.encode('ascii')
+
+        tbl['SEQUENCE']['READ_START' ]['data'] = array.array('I', [ 0, self.readLength[0] ])
+        tbl['SEQUENCE']['READ_LENGTH']['data'] = self.readLength
+        tbl['SEQUENCE']['READ_TYPE'  ]['data'] = array.array('B', map((lambda length: 1 if length > 0 else 0), self.readLength))
+        tbl['SEQUENCE']['READ'       ]['data'] = self.sequence.encode('ascii')
+        tbl['SEQUENCE']['QUALITY'    ]['data'] = self.quality.encode('ascii')
+        tbl['SEQUENCE']['CHANNEL'    ]['data'] = array.array('I', [self.channel])
+        tbl['SEQUENCE']['READ_NO'    ]['data'] = array.array('I', [self.readno])
+        spotGroup = os.path.basename(self.source)
+        try:
+            at = spotGroup.rindex("_ch{}_".format(self.channel))
+            spotGroup = spotGroup[0:at]
+        except:
+            pass
+        tbl['SEQUENCE']['SPOT_GROUP']['data'] = spotGroup
+
+        tbl['CONSENSUS']['CHANNEL'   ]['data'] = tbl['SEQUENCE']['CHANNEL'   ]['data']
+        tbl['CONSENSUS']['READ_NO'   ]['data'] = tbl['SEQUENCE']['READ_NO'   ]['data']
+        tbl['CONSENSUS']['SPOT_GROUP']['data'] = tbl['SEQUENCE']['SPOT_GROUP']['data']
+
+        gw.write(tbl['SEQUENCE' ])
+        gw.write(tbl['CONSENSUS'])
+
+
+    @classmethod
+    def ReadFast5Data(cls, fname):
+        """ Read the FASTQ data from the fast5 file
+
+            This is segregated into its own function in order to catch errors
+            that poretools itself doesn't catch, e.g. malformed HDF5
+        """
+        f5 = poretools.Fast5File(fname)
+        try:
+            channel = int(f5.get_channel_number())
+            readno = int(f5.get_read_number())
+            sequence_2d = None
+            quality_2d = None
+            hiQ = False
+
+            if f5.has_2D():
+                twoD = f5.get_fastqs("2D")[0]
+                sequence_2d = twoD.seq
+                quality_2d = twoD.qual
+                hiQ = f5.is_high_quality()
+
+            fwd = f5.get_fastqs("fwd")[0]
+            rev = f5.get_fastqs("rev")[0]
+            if fwd != None or rev != None:
+                return FastQData(fname
+                    , array.array('I', [ len(fwd.seq) if fwd != None else 0, len(rev.seq) if rev != None else 0 ])
+                    , (fwd.seq  if fwd != None else '') + (rev.seq  if rev != None else '')
+                    , (fwd.qual if fwd != None else '') + (rev.qual if rev != None else '')
+                    , sequence_2d, quality_2d
+                    , channel, readno, hiQ)
+                        
+            return None
+        except:
+            errMsg = "pore-tools reported an unspecific error while reading '{}'".format(os.path.basename(fname))
+            gw.errorMessage(errMsg)
+            sys.stderr.write(errMsg+"\n")
+            if __debug__:
+                traceback.print_exc()
+            return None
+        finally:
+            f5.close()
+
+
+def ProcessFast5(fname):
+    """ Read the FASTQ data from the fast5 file
+
+        Write it to the General Writer
+    """
+    data = FastQData.ReadFast5Data(fname)
+    if data:
+        data.write()
+        return True
+    else:
+        return False
+
+
+def isHDF5(fname):
+    """ Try to open it using h5py
+        If it works, assume it's an HDF5 file
+
+        This is needed because sometimes the .fast5 files
+        are actually HTML containing an error message
+    """
+    try:
+        with h5py.File(fname, 'r'):
+            return True
+    except IOError:
+        return False
+
+
+notRemoved = [] # because of errors
+
+def ExtractAndProcess(f, source):
+    """ Extract file to the working directory and process it
+    """
+    fname = os.path.join(workDir, source)
+    with open(fname, 'wb') as output:
+        output.write(f.read())
+
+    keep = False
+    if not isHDF5(fname):
+        errMsg = "Warning: skipping '{}': not an HDF5 file.".format(source)
+        gw.errorMessage(errMsg)
+        sys.stderr.write(errMsg+"\n")
+    elif not ProcessFast5(fname):
+        keep = __debug__
+    
+    if keep:
+        notRemoved.append(source)
+    else:
+        os.remove(fname)
+    
+
+processCounter = 0
+processStart = time.clock()
+nextReport = (processStart + showProgress) if showProgress > 0 else None
+
+def ProcessTar(tar):
+    """ Extract and process all fast5 files
+    """
+    global processCounter
+    global nextReport
+
+    for f in tar:
+        if f.name.endswith('.fast5'):
+            i = tar.extractfile(f)
+            try:
+                ExtractAndProcess(i, os.path.basename(f.name))
+            finally:
+                i.close()
+
+            processCounter = processCounter + 1
+            now = time.clock()
+            if nextReport and now >= nextReport:
+                nextReport = nextReport + showProgress
+                sys.stderr.write("Progress: processed {} spots; {} per sec.\n".
+                    format(processCounter, processCounter/(now - processStart)))
+    
+    elapsed = time.clock() - processStart
+    sys.stderr.write("Progress: processed {} spots in {} secs, {} per sec.\n".
+        format(processCounter, elapsed, processCounter/elapsed))
+
+
+def which(f):
+    PATH = os.environ["PATH"].split(":")
+    for fullname in map((lambda p: os.path.join(p, f)), PATH):
+        if os.path.exists(fullname):
+            return fullname
+    return None
+
+
+def main():
+    # check for gzcat or zcat
+
+    gzcat = which('gzcat')
+    if gzcat == None:
+        gzcat = which('zcat') # gnu-ish
+    if gzcat and not os.path.exists(gzcat):
+        gzcat = None
+
+    if len(files) == 0:
+        sys.stderr.write("Info: processing stdin\n")
+        with tarfile.open(mode='r|', fileobj=sys.stdin) as tar:
+            ProcessTar(tar)
+
+    for f in files:
+        sys.stderr.write("Info: processing {}\n".format(f))
+        if gzcat == None:
+            with tarfile.open(f) as tar:
+                ProcessTar(tar)
+        else:
+            p = subprocess.Popen([gzcat, f], stdout=subprocess.PIPE)
+            with tarfile.open(mode='r|', fileobj=p.stdout) as tar:
+                ProcessTar(tar)
+            p.stdout.close()
+            p.wait()
+
+
+def cleanup():
+    rmd = removeWorkDir
+    if len(notRemoved) != 0:
+        rmd = False
+        sys.stderr.write("Info: these files caused errors and were not removed "
+            "from the work space to aid in debugging:\n"
+            )
+        for f in notRemoved:
+            sys.stderr.write("Info:\t{}\n".format(f))
+
+    if rmd:
+        os.rmdir(workDir)
+
+
+main()
+gw = None # close stream and flush
+cleanup()
diff --git a/tools/prefetch/Makefile b/tools/prefetch/Makefile
new file mode 100644
index 0000000..c8e43dd
--- /dev/null
+++ b/tools/prefetch/Makefile
@@ -0,0 +1,93 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/prefetch
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+	prefetch \
+#	aget
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# prefetch
+#
+PREFETCH_SRC = \
+	prefetch \
+	kfile-no-q
+
+PREFETCH_OBJ = \
+	$(addsuffix .$(OBJX),$(PREFETCH_SRC))
+
+PREFETCH_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lm
+
+
+$(BINDIR)/prefetch: $(PREFETCH_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(PREFETCH_LIB)
+
+#-------------------------------------------------------------------------------
+# aget
+#
+GET_SRC = \
+	aget \
+	getAscp
+
+GET_OBJ = \
+	$(addsuffix .$(OBJX),$(GET_SRC))
+
+$(BINDIR)/aget: $(GET_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(PREFETCH_LIB)
+
diff --git a/tools/prefetch/kfile-no-q.c b/tools/prefetch/kfile-no-q.c
new file mode 100644
index 0000000..073220a
--- /dev/null
+++ b/tools/prefetch/kfile-no-q.c
@@ -0,0 +1,215 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "kfile-no-q.h"
+
+#include <kapp/main.h>
+
+#include <klib/log.h>
+#include <klib/status.h>
+
+#include <kfs/file.h>
+#include <kfs/directory.h>
+#include <kfs/arc.h>
+#include <kfs/sra.h>
+
+#include <assert.h>
+#include <string.h>
+
+#define READ_CACHE_BLOCK_SIZE (1024*1024)
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+#define STS_FIN 3
+
+typedef rc_t ( * FileProcessFn ) ( const KDirectory_v1 * dir, const char * name );
+
+typedef struct {
+    FileProcessFn processFn;
+    
+    bool elimQuals;
+} VisitParams;
+
+static
+bool qual_col_filter ( const KDirectory * self, const char * path, void * data )
+{
+    if ( strstr(path, "col/QUALITY") == NULL )
+    {
+        return true;
+    }
+    
+    return false;
+}
+
+static
+rc_t sort_none (const KDirectory * self, struct Vector * v)
+{
+    return 0;
+}
+
+static
+rc_t visit_cb ( const KDirectory * self, uint32_t type, const char * name, void * data )
+{
+    rc_t rc = 0;
+    VisitParams * params = data;
+    
+    assert(params);
+    
+    if (params->processFn == NULL)
+        return rc;
+    
+    if (type == kptFile)
+    {
+        if (params->elimQuals)
+        {
+            char path[PATH_MAX];
+            rc = KDirectoryResolvePath ( self, true, path, sizeof path, name );
+        
+            if (rc == 0 && ( strstr(path, "/col/QUALITY/") == NULL ) )
+            {
+                rc = params->processFn(self, name);
+            }
+        }
+        else
+        {
+            rc = params->processFn(self, name);
+        }
+    }
+    
+    return rc;
+}
+
+static
+rc_t file_read ( const KDirectory * dir, const char * name )
+{
+    rc_t rc;
+    const KFile * kfile;
+    char buffer[READ_CACHE_BLOCK_SIZE];
+    uint64_t pos = 0;
+    uint64_t prevPos = 0;
+    size_t num_read;
+    
+    
+    rc = KDirectoryOpenFileRead ( dir, &kfile, name );
+    if (rc != 0)
+        return rc;
+    
+    do {
+        bool print = pos - prevPos > 200000000;
+        rc = Quitting();
+        
+        if (rc == 0) {
+            if (print) {
+                STSMSG(STS_FIN,
+                       ("Reading %lu bytes from pos. %lu", READ_CACHE_BLOCK_SIZE, pos));
+            }
+            rc = KFileRead(kfile,
+                           pos, buffer, READ_CACHE_BLOCK_SIZE, &num_read);
+            if (rc != 0) {
+                PLOGERR(klogInt, (klogInt, rc, "KFileRead failed for file $(name)",
+                                  "name=%S", name));
+            }
+            else {
+                pos += num_read;
+            }
+            
+            if (print) {
+                prevPos = pos;
+            }
+        }
+    } while (rc == 0 && num_read > 0);
+    
+    KFileRelease(kfile);
+
+    return rc;
+}
+
+rc_t CC KSraFileNoQuals( const struct KFile * self,
+                         const struct KFile ** kfile )
+{
+    rc_t rc;
+    struct KDirectory * kdir_native, * kdir_virtual;
+    const struct KFile * new_kfile;
+    
+    assert(self != NULL);
+    assert(kfile != NULL);
+    
+    rc = KDirectoryNativeDir(&kdir_native);
+    if (rc != 0)
+    {
+        return rc;
+    }
+    
+    rc = KDirectoryOpenArcDirRead_silent_preopened ( kdir_native, (const struct KDirectory **)&kdir_virtual, false, "/virtual", tocKFile,
+                                                      ( void* ) self, KArcParseSRA, NULL, NULL );
+    if (rc == 0)
+    {
+        rc = KDirectoryOpenTocFileRead (kdir_virtual, &new_kfile, sraAlign4Byte, qual_col_filter, NULL, sort_none );
+        KDirectoryRelease (kdir_virtual);
+        
+        if (rc == 0)
+        {
+            *kfile = new_kfile;
+        }
+    }
+    
+    KDirectoryRelease (kdir_native);
+    
+    return 0;
+}
+
+rc_t CC KSraReadCacheFile( const struct KFile * self, bool elimQuals )
+{
+    rc_t rc;
+    struct KDirectory * kdir_native, * kdir_virtual;
+
+    
+    assert(self != NULL);
+    
+    rc = KDirectoryNativeDir(&kdir_native);
+    if (rc != 0)
+    {
+        return rc;
+    }
+    
+    rc = KDirectoryOpenArcDirRead_silent_preopened ( kdir_native, (const struct KDirectory **)&kdir_virtual, false, "/virtual", tocKFile,
+                                                    ( void* ) self, KArcParseSRA, NULL, NULL );
+    if (rc == 0)
+    {
+        VisitParams params;
+        params.elimQuals = elimQuals;
+        params.processFn = &file_read;
+        
+        rc = KDirectoryVisit(kdir_virtual, true, visit_cb, &params, ".");
+        KDirectoryRelease (kdir_virtual);
+    }
+    
+    KDirectoryRelease (kdir_native);
+    
+    return 0;
+}
diff --git a/tools/prefetch/kfile-no-q.h b/tools/prefetch/kfile-no-q.h
new file mode 100644
index 0000000..c123720
--- /dev/null
+++ b/tools/prefetch/kfile-no-q.h
@@ -0,0 +1,44 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_kfile_no_q_
+#define _h_kfile_no_q_
+
+#include <klib/rc.h>
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct KFile;
+
+
+rc_t CC KSraFileNoQuals( const struct KFile * self,
+                         const struct KFile ** kfile );
+
+rc_t CC KSraReadCacheFile( const struct KFile * self, bool elimQuals );
+
+
+#endif /* _h_kfile_no_q_ */
diff --git a/tools/prefetch/prefetch.c b/tools/prefetch/prefetch.c
new file mode 100644
index 0000000..b19837b
--- /dev/null
+++ b/tools/prefetch/prefetch.c
@@ -0,0 +1,3601 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+/********** includes **********/
+
+#include <kapp/args-conv.h> /* ArgsConvFilepath */
+#include <kapp/main.h> /* KAppVersion */
+
+#include <kdb/manager.h> /* kptDatabase */
+
+#include <kfg/config.h> /* KConfig */
+#include <kfg/kart.h> /* Kart */
+#include <kfg/repository.h> /* KRepositoryMgr */
+
+#include <vdb/database.h> /* VDatabase */
+#include <vdb/dependencies.h> /* VDBDependencies */
+#include <vdb/manager.h> /* VDBManager */
+#include <vdb/vdb-priv.h> /* VDatabaseIsCSRA */
+
+#include <vfs/manager.h> /* VFSManager */
+#include <vfs/path.h> /* VPath */
+#include <vfs/resolver.h> /* VResolver */
+
+#include <kns/ascp.h> /* ascp_locate */
+#include <kns/manager.h>
+#include <kns/kns-mgr-priv.h>
+#include <kns/http.h>
+
+#include <kfs/file.h> /* KFile */
+#include <kfs/gzip.h> /* KFileMakeGzipForRead */
+#include <kfs/subfile.h> /* KFileMakeSubRead */
+#include <kfs/cacheteefile.h> /* KDirectoryMakeCacheTee */
+
+#include <klib/container.h> /* BSTree */
+#include <klib/data-buffer.h> /* KDataBuffer */
+#include <klib/log.h> /* PLOGERR */
+#include <klib/out.h> /* KOutMsg */
+#include <klib/printf.h> /* string_printf */
+#include <klib/rc.h>
+#include <klib/status.h> /* STSMSG */
+#include <klib/text.h> /* String */
+
+#include <strtol.h> /* strtou64 */
+#include <sysalloc.h>
+
+#include <assert.h>
+#include <stdlib.h> /* free */
+#include <string.h> /* memset */
+#include <time.h> /* time */
+
+#include <stdio.h> /* printf */
+
+#include "kfile-no-q.h"
+
+#define DISP_RC(rc, err) (void)((rc == 0) ? 0 : LOGERR(klogInt, rc, err))
+
+#define DISP_RC2(rc, name, msg) (void)((rc == 0) ? 0 : \
+    PLOGERR(klogInt, (klogInt,rc, "$(msg): $(name)","msg=%s,name=%s",msg,name)))
+
+#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
+    if (rc2 != 0 && rc == 0) { rc = rc2; } obj = NULL; } while (false)
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+#define STS_TOP 0
+#define STS_INFO 1
+#define STS_DBG 2
+#define STS_FIN 3
+
+#define USE_CURL 0
+#define ALLOW_STRIP_QUALS 0
+
+#define rcResolver   rcTree
+static bool NotFoundByResolver(rc_t rc) {
+    if (GetRCModule(rc) == rcVFS) {
+        if (GetRCTarget(rc) == rcResolver) {
+            if (GetRCContext(rc) == rcResolving) {
+                if (GetRCState(rc) == rcNotFound) {
+                    return true;
+                }
+            }
+        }
+    }
+    return false;
+}
+
+typedef enum {
+    eOrderSize,
+    eOrderOrig
+} EOrder;
+typedef enum {
+    eForceNo, /* do not download found and complete objects */
+    eForceYes,/* force download of found and complete objects */
+    eForceYES /* force download; ignore lockes */
+} EForce;
+typedef enum {
+    eRunTypeUnknown,
+    eRunTypeList,     /* list sizes */
+    eRunTypeDownload,
+    eRunTypeGetSize    /* download ordered by sizes */
+} ERunType;
+typedef struct {
+    const VPath *path;
+    const String *str;
+} VPathStr;
+typedef struct {
+    BSTNode n;
+    char *path;
+} TreeNode;
+typedef struct {
+    ERunType type;
+    char *name;
+
+    VPathStr local;
+    const String *cache;
+    VPathStr remote;
+
+    const KFile *file;
+    uint64_t remoteSz;
+
+    bool undersized; /* remoteSz < min allowed size */
+    bool oversized; /* remoteSz >= max allowed size */
+
+    bool existing; /* the path is a path to an existing local file */
+
+ /* path to the resolved object : absolute path or resolved(local or cache) */
+    VPathStr path;
+
+    VPath *accession;
+    uint64_t project;
+
+    const KartItem *kartItem;
+
+    VResolver *resolver;
+} Resolved;
+typedef struct {
+    Args *args;
+    bool check_all;
+
+    bool list_kart;
+    bool list_kart_numbered;
+    bool list_kart_sized;
+    EOrder order;
+
+    const char *rows;
+
+    EForce force;
+    KConfig *cfg;
+    KDirectory *dir;
+
+    const KRepositoryMgr *repoMgr;
+    const VDBManager *mgr;
+    VFSManager *vfsMgr;
+    KNSManager *kns;
+
+    VResolver *resolver;
+
+    void *buffer;
+    size_t bsize;
+
+    bool undersized; /* remoteSz < min allowed size */
+    bool oversized; /* remoteSz >= max allowed size */
+
+    BSTree downloaded;
+
+    size_t minSize;
+    size_t maxSize;
+    uint64_t heartbeat;
+
+    bool noAscp;
+    bool noHttp;
+
+    bool forceAscpFail;
+
+    bool ascpChecked;
+    const char *ascp;
+    const char *asperaKey;
+    String *ascpMaxRate;
+    const char *ascpParams; /* do not free! */
+
+    bool stripQuals; /* this will download file without quality columns */
+    bool eliminateQuals; /* this will download cache file with eliminated quality columns which could filled later */
+    
+#ifdef _DEBUGGING
+    const char *textkart;
+#endif
+} Main;
+typedef struct {
+    /* "plain" command line argument */
+    const char *desc;
+
+    const KartItem *item;
+
+#ifdef _DEBUGGING
+    const char *textkart;
+#endif
+
+    Resolved resolved;
+    int number;
+    
+    bool isDependency;
+
+    Main *main; /* just a pointer, no refcount here, don't release it */
+} Item;
+typedef struct {
+    const char *obj;
+    bool done;
+    Kart *kart;
+    bool isKart;
+} Iterator;
+typedef struct {
+    BSTNode n;
+    Item *i;
+} KartTreeNode;
+/********** String extension **********/
+static rc_t StringRelease(const String *self) {
+    free((String*)self);
+    return 0;
+}
+
+static char* StringCheck(const String *self, rc_t rc) {
+    if (rc == 0 && self != NULL
+        && self->addr != NULL && self->len != 0 && self->addr[0] != '\0')
+    {
+        return string_dup(self->addr, self->size);
+    }
+    return NULL;
+}
+
+static
+bool _StringIsFasp(const String *self, const char **withoutScheme)
+{
+    const char fasp[] = "fasp://";
+    const char *dummy = NULL;
+
+    assert(self && self->addr);
+
+    if (withoutScheme == NULL) {
+        withoutScheme = &dummy;
+    }
+
+    *withoutScheme = NULL;
+
+    if (string_cmp(self->addr, self->len, fasp, sizeof fasp - 1,
+                                                sizeof fasp - 1) == 0)
+    {
+        *withoutScheme = self->addr + sizeof fasp - 1;
+        return true;
+    }
+    return false;
+}
+
+/********** KFile extension **********/
+static
+rc_t _KFileOpenRemote(const KFile **self, KNSManager *kns, const char *path)
+{
+    rc_t rc = 0;
+    assert(self);
+    if (*self != NULL) {
+        return 0;
+    }
+    rc = KNSManagerMakeReliableHttpFile(kns, self, NULL, 0x01010000, path);
+    return rc;
+}
+
+/********** KDirectory extension **********/
+static rc_t _KDirectoryMkTmpPrefix(const KDirectory *self,
+    const String *prefix, char *out, size_t sz)
+{
+    size_t num_writ = 0;
+    rc_t rc = string_printf(out, sz, &num_writ, "%S.tmp", prefix);
+    if (rc != 0) {
+        DISP_RC2(rc, "string_printf(tmp)", prefix->addr);
+        return rc;
+    }
+
+    if (num_writ > sz) {
+        rc = RC(rcExe, rcFile, rcCopying, rcBuffer, rcInsufficient);
+        PLOGERR(klogInt, (klogInt, rc,
+            "bad string_printf($(s).tmp) result", "s=%S", prefix));
+        return rc;
+    }
+
+    return rc;
+}
+
+static rc_t _KDirectoryMkTmpName(const KDirectory *self,
+    const String *prefix, char *out, size_t sz)
+{
+    rc_t rc = 0;
+    int i = 0;
+
+    assert(prefix);
+
+    while (rc == 0) {
+        size_t num_writ = 0;
+        rc = string_printf(out, sz, &num_writ,
+            "%S.tmp.%d.tmp", prefix, rand() % 100000);
+        if (rc != 0) {
+            DISP_RC2(rc, "string_printf(tmp.rand)", prefix->addr);
+            break;
+        }
+
+        if (num_writ > sz) {
+            rc = RC(rcExe, rcFile, rcCopying, rcBuffer, rcInsufficient);
+            PLOGERR(klogInt, (klogInt, rc,
+                "bad string_printf($(s).tmp.rand) result", "s=%S", prefix));
+            return rc;
+        }
+        if (KDirectoryPathType(self, "%s", out) == kptNotFound) {
+            break;
+        }
+        if (++i > 999) {
+            rc = RC(rcExe, rcFile, rcCopying, rcName, rcUndefined);
+            PLOGERR(klogInt, (klogInt, rc,
+                "cannot generate unique tmp file name for $(name)", "name=%S",
+                prefix));
+            return rc;
+        }
+    }
+
+    return rc;
+}
+
+static rc_t _KDirectoryMkLockName(const KDirectory *self,
+    const String *prefix, char *out, size_t sz)
+{
+    rc_t rc = 0;
+    size_t num_writ = 0;
+
+    assert(prefix);
+
+    rc = string_printf(out, sz, &num_writ, "%S.lock", prefix);
+    DISP_RC2(rc, "string_printf(lock)", prefix->addr);
+
+    if (rc == 0 && num_writ > sz) {
+        rc = RC(rcExe, rcFile, rcCopying, rcBuffer, rcInsufficient);
+        PLOGERR(klogInt, (klogInt, rc,
+            "bad string_printf($(s).lock) result", "s=%S", prefix));
+        return rc;
+    }
+
+    return rc;
+}
+
+static
+rc_t _KDirectoryCleanCache(KDirectory *self, const String *local)
+{
+    rc_t rc = 0;
+
+    char cache[PATH_MAX] = "";
+    size_t num_writ = 0;
+
+    assert(self && local && local->addr);
+
+    if (rc == 0) {
+        rc = string_printf(cache, sizeof cache, &num_writ, "%S.cache", local);
+        DISP_RC2(rc, "string_printf(.cache)", local->addr);
+    }
+
+    if (rc == 0 && KDirectoryPathType(self, "%s", cache) != kptNotFound) {
+        STSMSG(STS_DBG, ("removing %s", cache));
+        rc = KDirectoryRemove(self, false, "%s", cache);
+    }
+
+    return rc;
+}
+
+static rc_t _KDirectoryClean(KDirectory *self, const String *cache,
+    const char *lock, const char *tmp, bool rmSelf)
+{
+    rc_t rc = 0;
+    rc_t rc2 = 0;
+
+    char tmpName[PATH_MAX] = "";
+    const char *dir = tmpName;
+    const char *tmpPfx = NULL;
+    size_t tmpPfxLen = 0;
+
+    assert(self && cache);
+
+    rc = _KDirectoryMkTmpPrefix(self, cache, tmpName, sizeof tmpName);
+    if (rc == 0) {
+        char *slash = strrchr(tmpName, '/');
+        if (slash != NULL) {
+            if (strlen(tmpName) == slash + 1 - tmpName) {
+                rc = RC(rcExe,
+                    rcDirectory, rcSearching, rcDirectory, rcIncorrect);
+                PLOGERR(klogInt, (klogInt, rc,
+                    "bad file name $(path)", "path=%s", tmpName));
+            }
+            else {
+                *slash = '\0';
+                tmpPfx = slash + 1;
+            }
+        }
+        else {
+            rc = RC(rcExe, rcDirectory, rcSearching, rcChar, rcNotFound);
+            PLOGERR(klogInt, (klogInt, rc,
+                    "cannot extract directory from $(path)", "path=%s", dir));
+        }
+        tmpPfxLen = strlen(tmpPfx);
+    }
+
+    if (tmp != NULL && KDirectoryPathType(self, "%s", tmp) != kptNotFound) {
+        rc_t rc3 = 0;
+        STSMSG(STS_DBG, ("removing %s", tmp));
+        rc3 = KDirectoryRemove(self, false, "%s", tmp);
+        if (rc2 == 0 && rc3 != 0) {
+            rc2 = rc3;
+        }
+    }
+
+    assert(cache);
+    if (rmSelf && KDirectoryPathType(self, "%s", cache->addr) != kptNotFound) {
+        rc_t rc3 = 0;
+        STSMSG(STS_DBG, ("removing %S", cache));
+        rc3 = KDirectoryRemove(self, false, "%S", cache);
+        if (rc2 == 0 && rc3 != 0) {
+            rc2 = rc3;
+        }
+    }
+
+    if (rc == 0) {
+        uint32_t count = 0;
+        uint32_t i = 0;
+        KNamelist *list = NULL;
+        STSMSG(STS_DBG, ("listing %s for old temporary files", dir));
+        rc = KDirectoryList(self, &list, NULL, NULL, "%s", dir);
+        DISP_RC2(rc, "KDirectoryList", dir);
+
+        if (rc == 0) {
+            rc = KNamelistCount(list, &count);
+            DISP_RC2(rc, "KNamelistCount(KDirectoryList)", dir);
+        }
+
+        for (i = 0; i < count && rc == 0; ++i) {
+            const char *name = NULL;
+            rc = KNamelistGet(list, i, &name);
+            if (rc != 0) {
+                DISP_RC2(rc, "KNamelistGet(KDirectoryList)", dir);
+            }
+            else {
+                if (strncmp(name, tmpPfx, tmpPfxLen) == 0) {
+                    rc_t rc3 = 0;
+                    STSMSG(STS_DBG, ("removing %s", name));
+                    rc3 = KDirectoryRemove(self, false,
+                        "%s%c%s", dir, '/', name);
+                    if (rc2 == 0 && rc3 != 0) {
+                        rc2 = rc3;
+                    }
+                }
+            }
+        }
+
+        RELEASE(KNamelist, list);
+    }
+
+    if (lock != NULL && KDirectoryPathType(self, "%s", lock) != kptNotFound) {
+        rc_t rc3 = 0;
+        STSMSG(STS_DBG, ("removing %s", lock));
+        rc3 = KDirectoryRemove(self, false, "%s", lock);
+        if (rc2 == 0 && rc3 != 0) {
+            rc2 = rc3;
+        }
+    }
+
+    if (rc == 0 && rc2 != 0) {
+        rc = rc2;
+    }
+
+    return rc;
+}
+
+/********** VResolver extension **********/
+static rc_t V_ResolverRemote(const VResolver *self,
+    VRemoteProtocols protocols, struct VPath const * accession,
+    struct VPath const ** remote, struct VPath const ** cache)
+{
+    return VResolverQuery(self, protocols, accession, NULL, remote, cache);
+}
+
+static rc_t V_ResolverLocal(const VResolver *self,
+    struct VPath const * accession, struct VPath const ** path )
+{
+    return VResolverQuery(self, eProtocolHttp, accession, path, NULL, NULL);
+}
+
+static rc_t _VResolverRemote(VResolver *self, VRemoteProtocols protocols,
+    const char *name, const VPath *vaccession,
+    const VPath **vremote, const String **remote,
+    const String **cache)
+{
+    rc_t rc = 0;
+    const VPath *vcache = NULL;
+    assert(vaccession && vremote);
+    if (*vremote != NULL) {
+        RELEASE(VPath, *vremote);
+    }
+    rc = V_ResolverRemote(self, protocols, vaccession, vremote, &vcache);
+    if (rc == 0) {
+        char path[PATH_MAX] = "";
+        size_t len = 0;
+        rc = VPathReadUri(*vremote, path, sizeof path, &len);
+        DISP_RC2(rc, "VPathReadUri(VResolverRemote)", name);
+        if (rc == 0) {
+            String local_str;
+            char *query = string_chr(path, len, '?');
+            if (query != NULL) {
+                *query = '\0';
+            }
+            StringInit(&local_str, path, len, (uint32_t)len);
+            RELEASE(String, *remote);
+            rc = StringCopy(remote, &local_str);
+            DISP_RC2(rc, "StringCopy(VResolverRemote)", name);
+        }
+    }
+    else if (NotFoundByResolver(rc)) {
+        PLOGERR(klogErr, (klogErr, rc, "'$(acc)' cannot be found.",
+            "acc=%s", name));
+    }
+    else {
+        DISP_RC2(rc, "Cannot resolve remote", name);
+    }
+    if (rc == 0 && cache != NULL) {
+        String path_str;
+        if (vcache == NULL) {
+            rc = RC(rcExe, rcResolver, rcResolving, rcPath, rcNotFound);
+            PLOGERR(klogInt, (klogInt, rc, "cannot get cache location "
+                "for $(acc).", /* Try to cd out of protected repository.", */
+                "acc=%s" , name));
+        }
+        if (rc == 0) {
+            rc = VPathGetPath(vcache, &path_str);
+            DISP_RC2(rc, "VPathGetPath(VResolverCache)", name);
+        }
+        if (rc == 0) {
+            if (*cache != NULL) {
+                free((void*)*cache);
+            }
+            rc = StringCopy(cache, &path_str);
+            DISP_RC2(rc, "StringCopy(VResolverCache)", name);
+        }
+    }
+    RELEASE(VPath, vcache);
+    return rc;
+}
+
+/********** VPathStr **********/
+static rc_t VPathStrFini(VPathStr *self) {
+    rc_t rc = 0;
+
+    assert(self);
+
+    VPathRelease(self->path);
+
+    RELEASE(String, self->str);
+
+    memset(self, 0, sizeof *self);
+
+    return rc;
+}
+
+static
+rc_t VPathStrInitStr(VPathStr *self, const char *str, size_t len)
+{
+    String s;
+    assert(self);
+    if (len == 0) {
+        len = string_size(str);
+    }
+    StringInit(&s, str, len, (uint32_t)len);
+    VPathStrFini(self);
+    return StringCopy(&self->str, &s);
+}
+
+/********** TreeNode **********/
+static int64_t CC bstCmp(const void *item, const BSTNode *n) {
+    const char* path = item;
+    const TreeNode* sn = (const TreeNode*) n;
+
+    assert(path && sn && sn->path);
+
+    return strcmp(path, sn->path);
+}
+
+static int64_t CC bstSort(const BSTNode* item, const BSTNode* n) {
+    const TreeNode* sn = (const TreeNode*) item;
+
+    return bstCmp(sn->path, n);
+}
+
+static void CC bstWhack(BSTNode* n, void* ignore) {
+    TreeNode* sn = (TreeNode*) n;
+
+    assert(sn);
+
+    free(sn->path);
+
+    memset(sn, 0, sizeof *sn);
+
+    free(sn);
+}
+
+/********** NumIterator **********/
+
+typedef enum {
+    eNIBegin,
+    eNINumber,
+    eNIInterval,
+    eNIDash,
+    eNIComma,
+    eNIBad,
+    eNIForever,
+    eNIEnd
+} ENumIteratorState;
+typedef struct {
+    ENumIteratorState state;
+    bool skip;
+    const char *s;
+    int32_t crnt;
+    int32_t intEnd;
+} NumIterator;
+static void NumIteratorInit(NumIterator *self, const char *row) {
+    assert(self);
+    memset(self, 0, sizeof *self);
+    self->crnt = self->intEnd = -1;
+    self->s = row;
+}
+
+static int32_t NumIteratorGetNum(NumIterator *self) {
+    int32_t n = 0;
+    for (n = 0; *(self->s) >= '0' && *(self->s) <= '9'; ++(self->s)) {
+        n = n * 10 + *(self->s) - '0';
+    }
+    return n;
+}
+
+static bool NumIteratorNext(NumIterator *self, int64_t crnt) {
+    char c = '\0';
+    assert(self);
+    while (true) {
+        self->skip = false;
+        switch (self->state) {
+            case eNIBegin:
+            case eNIComma:
+                if (self->s == NULL || *(self->s) == '\0') {
+                    if (self->state == eNIBegin) {
+                        self->state = eNIForever;
+                        continue;
+                    }
+                    else {
+                        self->state = eNIEnd;
+                        continue;
+                    }
+                }
+                c = *(self->s);
+                ++(self->s);
+                if (c == ',') {
+                    self->state = eNIComma;
+                    continue;
+                }
+                else if (c == '-') {
+                    self->state = eNIDash;
+                    continue;
+                }
+                else if (c >= '0' && c <= '9') {
+                    --(self->s);
+                    self->crnt = NumIteratorGetNum(self);
+                    self->state = eNINumber;
+                    if (self->crnt < crnt) {
+                        continue;
+                    }
+                    else {
+                        if (self->crnt > crnt) {
+                            self->skip = true;
+                        }
+                        return true;
+                    }
+                    continue;
+                }
+                else {
+                    self->state = eNIBad;
+                    continue;
+                }
+            case eNIInterval:
+                if (crnt <= self->intEnd) {
+                    return true;
+                }
+          /* no break here */
+            case eNINumber:
+                if (self->crnt >= crnt) {
+                    if (self->crnt > crnt) {
+                        self->skip = true;
+                    }
+                    return true;
+                }
+                if (self->s == NULL || *(self->s) == '\0') {
+                    self->state = eNIEnd;
+                    continue;
+                }
+                c = *(self->s);
+                ++(self->s);
+                if (c == ',') {
+                    self->state = eNIComma;
+                    continue;
+                }
+                else if (c == '-') {
+                    self->state = eNIDash;
+                    continue;
+                }
+                else {
+                    self->state = eNIBad;
+                    continue;
+                }
+            case eNIDash:
+                if (self->s == NULL || *(self->s) == '\0') {
+                    self->state = eNIForever;
+                    continue;
+                }
+                c = *(self->s);
+                ++(self->s);
+                if (c == ',' || c == '-') {
+                    self->state = eNIForever;
+                    continue;
+                }
+                else if (c >= '0' && c <= '9') {
+                    --(self->s);
+                    self->intEnd = NumIteratorGetNum(self);
+                    self->state = eNIInterval;
+                    if (crnt <= self->intEnd) {
+                        return true;
+                    }
+                    else {
+                        continue;
+                    }
+                }
+                else {
+                    self->state = eNIBad;
+                    continue;
+                }
+            case eNIForever:
+                return true;
+            case eNIBad:
+            case eNIEnd:
+                return false;
+        }
+    }
+}
+
+/********** Resolved **********/
+static rc_t ResolvedFini(Resolved *self) {
+    rc_t rc = 0;
+    rc_t rc2 = 0;
+
+    assert(self);
+
+    rc  = VPathStrFini(&self->local);
+    rc2 = VPathStrFini(&self->remote);
+    if (rc == 0 && rc2 != 0) {
+        rc = rc2;
+    }
+    rc2 = VPathStrFini(&self->path);
+
+    RELEASE(KFile, self->file);
+    RELEASE(VPath, self->accession);
+    RELEASE(VResolver, self->resolver);
+
+    RELEASE(KartItem, self->kartItem);
+
+    RELEASE(String, self->cache);
+
+    free(self->name);
+
+    memset(self, 0, sizeof *self);
+
+    return rc != 0 ? rc : rc2;
+}
+
+static void ResolvedReset(Resolved *self, ERunType type) {
+    assert(self);
+
+    memset(self, 0, sizeof *self);
+
+    self->type = type;
+}
+
+/** isLocal is set to true when the object is found locally.
+    i.e. does not need need not be [re]downloaded */
+static rc_t ResolvedLocal(const Resolved *self,
+    const KDirectory *dir, bool *isLocal, EForce force)
+{
+    rc_t rc = 0;
+    uint64_t sRemote = 0;
+    uint64_t sLocal = 0;
+    const KFile *local = NULL;
+    char path[PATH_MAX] = "";
+
+    assert(isLocal && self);
+
+    *isLocal = false;
+
+    if (self->local.str == NULL) {
+        return 0;
+    }
+
+    rc = VPathReadPath(self->local.path, path, sizeof path, NULL);
+    DISP_RC(rc, "VPathReadPath");
+
+    if (rc == 0 && (KDirectoryPathType(dir, "%s", path) & ~kptAlias) != kptFile)
+    {
+        if (force == eForceNo) {
+            STSMSG(STS_TOP,
+                ("%s (not a file) is found locally: consider it complete",
+                 path));
+            *isLocal = true;
+        }
+        else {
+            STSMSG(STS_TOP,
+                ("%s (not a file) is found locally and will be redownloaded",
+                 path));
+        }
+        return 0;
+    }
+
+    if (rc == 0) {
+        if (! _StringIsFasp(self->remote.str, NULL) && self->file != NULL) {
+            rc = KFileSize(self->file, &sRemote);
+            DISP_RC2(rc, "KFileSize(remote)", self->name);
+        }
+        else {
+            sRemote = self->remoteSz;
+        }
+    }
+
+    if (rc == 0) {
+        rc = KDirectoryOpenFileRead(dir, &local, "%s", path);
+        DISP_RC2(rc, "KDirectoryOpenFileRead", path);
+    }
+
+    if (rc == 0) {
+        rc = KFileSize(local, &sLocal);
+        DISP_RC2(rc, "KFileSize", path);
+    }
+
+    if (rc == 0) {
+        if (sRemote == 0) {
+            if (sLocal != 0) {
+                if (force == eForceNo) {
+                    *isLocal = true;
+                    STSMSG(STS_INFO, ("%s (%,lu) is found", path, sLocal));
+                }
+                else {
+                    STSMSG(STS_INFO,
+                        ("%s (%,lu) is found and will be redownloaded",
+                        path, sLocal));
+                }
+            }
+            else if (sLocal == 0) {
+                STSMSG(STS_INFO,
+                    ("an empty %s (%,lu) is found and will be redownloaded",
+                    path, sLocal));
+            }
+        }
+        else if (sRemote == sLocal) {
+            if (force == eForceNo) {
+                *isLocal = true;
+                STSMSG(STS_INFO, ("%s (%,lu) is found and is complete",
+                    path, sLocal));
+            }
+            else {
+                STSMSG(STS_INFO, ("%s (%,lu) is found and will be redownloaded",
+                    path, sLocal));
+            }
+        }
+        else {
+            STSMSG(STS_TOP, ("%s (%,lu) is incomplete. Expected size is %,lu. "
+                "It will be re-downloaded", path, sLocal, sRemote));
+        }
+    }
+
+    RELEASE(KFile, local);
+
+    return rc;
+}
+
+/********** Main **********/
+static bool MainUseAscp(Main *self) {
+    rc_t rc = 0;
+
+    assert(self);
+
+    if (self->ascpChecked) {
+        return self->ascp != NULL;
+    }
+
+    self->ascpChecked = true;
+
+    if (self->noAscp) {
+        return false;
+    }
+
+    rc = ascp_locate(&self->ascp, &self->asperaKey, true, true);
+    return rc == 0 && self->ascp && self->asperaKey;
+}
+
+static bool MainHasDownloaded(const Main *self, const char *local) {
+    TreeNode *sn = NULL;
+
+    assert(self);
+
+    sn = (TreeNode*) BSTreeFind(&self->downloaded, local, bstCmp);
+
+    return sn != NULL;
+}
+
+static rc_t MainDownloaded(Main *self, const char *path) {
+    TreeNode *sn = NULL;
+
+    assert(self);
+
+    if (MainHasDownloaded(self, path)) {
+        return 0;
+    }
+
+    sn = calloc(1, sizeof *sn);
+    if (sn == NULL) {
+        return RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+    }
+
+    sn->path = string_dup_measure(path, NULL);
+    if (sn->path == NULL) {
+        bstWhack((BSTNode*) sn, NULL);
+        sn = NULL;
+        return RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+    }
+
+    BSTreeInsert(&self->downloaded, (BSTNode*)sn, bstSort);
+
+    return 0;
+}
+
+static rc_t MainDownloadFile(Resolved *self,
+    Main *main, const char *to)
+{
+    rc_t rc = 0;
+    KFile *out = NULL;
+    size_t num_read = 0;
+    uint64_t opos = 0;
+    size_t num_writ = 0;
+    uint64_t pos = 0;
+    uint64_t prevPos = 0;
+
+    assert(self && main);
+    assert(!main->eliminateQuals);
+
+    if (rc == 0) {
+        STSMSG(STS_DBG, ("creating %s", to));
+        rc = KDirectoryCreateFile(main->dir, &out,
+                                  false, 0664, kcmInit | kcmParents, "%s", to);
+        DISP_RC2(rc, "Cannot OpenFileWrite", to);
+    }
+
+    assert(self->remote.str);
+
+    if (self->file == NULL) {
+        rc = _KFileOpenRemote(&self->file, main->kns, self->remote.str->addr);
+        if (rc != 0) {
+            PLOGERR(klogInt, (klogInt, rc, "failed to open file for $(path)",
+                "path=%S", self->remote.str));
+        }
+    }
+
+    if (main->stripQuals)
+    {
+        const KFile * kfile;
+        
+        rc = KSraFileNoQuals(self->file, &kfile);
+        if (rc == 0)
+        {
+            KFileRelease(self->file);
+            self->file = kfile;
+        }
+    }
+    
+    STSMSG(STS_INFO, ("%S -> %s", self->remote.str, to));
+    do {
+        bool print = pos - prevPos > 200000000;
+        rc = Quitting();
+
+        if (rc == 0) {
+            if (print) {
+                STSMSG(STS_FIN,
+                    ("Reading %lu bytes from pos. %lu", main->bsize, pos));
+            }
+            rc = KFileRead(self->file,
+                pos, main->buffer, main->bsize, &num_read);
+            if (rc != 0) {
+                DISP_RC2(rc, "Cannot KFileRead", self->remote.str->addr);
+            }
+            else {
+                pos += num_read;
+            }
+
+            if (print) {
+                prevPos = pos;
+            }
+        }
+
+        if (rc == 0 && num_read > 0) {
+            rc = KFileWrite(out, opos, main->buffer, num_read, &num_writ);
+            DISP_RC2(rc, "Cannot KFileWrite", to);
+            opos += num_writ;
+        }
+    } while (rc == 0 && num_read > 0);
+
+    RELEASE(KFile, out);
+
+    if (rc == 0) {
+        STSMSG(STS_INFO, ("%s (%ld)", to, pos));
+    }
+
+    return rc;
+}
+
+static rc_t MainDownloadCacheFile(Resolved *self,
+                                  Main *main, const char *to, bool elimQuals)
+{
+    rc_t rc = 0;
+    const KFile *out = NULL;
+
+    assert(self && main);
+    assert(!main->stripQuals);
+
+    assert(self->remote.str);
+
+    if (self->file == ((void*)0)) {
+        rc = _KFileOpenRemote(&self->file, main->kns, self->remote.str->addr);
+        if (rc != 0) {
+            PLOGERR(klogInt, (klogInt, rc, "failed to open file for $(path)",
+                              "path=%S", self->remote.str));
+            return rc;
+        }
+    }
+    
+    rc = KDirectoryMakeCacheTee(main->dir, &out, self->file, 0, "%s", to);
+    if (rc != 0) {
+        PLOGERR(klogInt, (klogInt, rc, "failed to open cache file for $(path)",
+                          "path=%S", to));
+        return rc;
+    }
+    
+    STSMSG(STS_INFO, ("%S -> %s", self->remote.str, to));
+
+    rc = KSraReadCacheFile( out, elimQuals );
+    if (rc != 0) {
+        PLOGERR(klogInt, (klogInt, rc, "failed to read cache file at $(path)",
+                          "path=%S", to));
+    }
+  
+    RELEASE(KFile, out);
+    
+    if (rc != 0) {
+        return rc;
+    }
+    
+    if (rc == 0) {
+        STSMSG(STS_INFO, ("%s", to));
+    }
+    
+    return rc;
+}
+
+/*  http://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByR.../SRR125365.sra
+anonftp at ftp-private.ncbi.nlm.nih.gov:/sra/sra-instant/reads/ByR.../SRR125365.sra
+*/
+static rc_t MainDownloadAscp(const Resolved *self, Main *main,
+    const char *to)
+{
+    const char *src = NULL;
+    AscpOptions opt;
+
+    assert(self && self->remote.str && self->remote.str->addr
+        && main && main->ascp && main->asperaKey);
+
+    memset(&opt, 0, sizeof opt);
+
+    if (!_StringIsFasp(self->remote.str, &src)) {
+        return RC(rcExe, rcFile, rcCopying, rcSchema, rcInvalid);
+    }
+
+    if (main->ascpParams != NULL) {
+        opt.ascp_options = main->ascpParams;
+    }
+    else if (main->ascpMaxRate != NULL) {
+        size_t sz = string_copy(opt.target_rate, sizeof opt.target_rate,
+            main->ascpMaxRate->addr, main->ascpMaxRate->size);
+        if (sz < sizeof opt.target_rate) {
+            return RC(rcExe, rcFile, rcCopying, rcBuffer, rcInsufficient);
+        }
+    }
+
+    opt.name = self->name;
+    opt.src_size = self->remoteSz;
+    opt.heartbeat = main->heartbeat;
+    opt.quitting = Quitting;
+
+    return aspera_get(main->ascp, main->asperaKey, src, to, &opt);
+}
+
+static rc_t MainDownload(Resolved *self, Main *main, bool isDependency) {
+    bool canceled = false;
+    rc_t rc = 0;
+    KFile *flock = NULL;
+
+    char tmp[PATH_MAX] = "";
+    char lock[PATH_MAX] = "";
+
+    assert(self
+        && self->cache && self->cache->size && self->cache->addr && main);
+
+    if (main->force != eForceYES &&
+        MainHasDownloaded(main, self->cache->addr))
+    {
+        STSMSG(STS_INFO, ("%s has just been downloaded", self->cache->addr));
+        return 0;
+    }
+
+    if (rc == 0) {
+        rc = _KDirectoryMkLockName(main->dir, self->cache, lock, sizeof lock);
+    }
+
+    if (rc == 0 && !main->eliminateQuals) {
+        rc = _KDirectoryMkTmpName(main->dir, self->cache, tmp, sizeof tmp);
+    }
+
+    if (KDirectoryPathType(main->dir, "%s", lock) != kptNotFound) {
+        if (main->force != eForceYES) {
+            KTime_t date = 0;
+            rc = KDirectoryDate(main->dir, &date, "%s", lock);
+            if (rc == 0) {
+                time_t t = time(NULL) - date;
+                if (t < 60 * 60 * 24) { /* 24 hours */
+                    STSMSG(STS_DBG, ("%s found: canceling download", lock));
+                    rc = RC(rcExe, rcFile, rcCopying, rcLock, rcExists);
+                    PLOGERR(klogWarn, (klogWarn, rc,
+                        "Lock file $(file) exists: download canceled",
+                        "file=%s", lock));
+                    return rc;
+                }
+                else {
+                    STSMSG(STS_DBG, ("%s found and ignored as too old", lock));
+                    rc = _KDirectoryClean(main->dir,
+                        self->cache, NULL, NULL, true);
+                }
+            }
+            else {
+                STSMSG(STS_DBG, ("%s found", lock));
+                DISP_RC2(rc, "KDirectoryDate", lock);
+            }
+        }
+        else {
+            STSMSG(STS_DBG, ("%s found and forced to be ignored", lock));
+            rc = _KDirectoryClean(main->dir, self->cache, NULL, NULL, true);
+        }
+    }
+    else {
+        STSMSG(STS_DBG, ("%s not found", lock));
+    }
+
+    if (rc == 0) {
+        STSMSG(STS_DBG, ("creating %s", lock));
+        rc = KDirectoryCreateFile(main->dir, &flock,
+            false, 0664, kcmInit | kcmParents, "%s", lock);
+        DISP_RC2(rc, "Cannot OpenFileWrite", lock);
+    }
+
+    assert(!main->noAscp || !main->noHttp);
+
+    if (rc == 0) {
+        bool ascp = _StringIsFasp(self->remote.str, NULL);
+        if (ascp) {
+            STSMSG(STS_TOP, (" Downloading via fasp..."));
+            if (main->forceAscpFail) {
+                rc = 1;
+            }
+            else if (main->eliminateQuals) {
+                LOGMSG(klogErr, "Cannot eliminate qualities during fasp download");
+                rc = 1;
+            }
+            else if (main->eliminateQuals) {
+                LOGMSG(klogErr, "Cannot remove QUALITY columns during fasp download");
+                rc = 1;
+            }
+            else {
+                rc = MainDownloadAscp(self, main, tmp);
+            }
+            if (rc == 0) {
+                STSMSG(STS_TOP, (" fasp download succeed"));
+            }
+            else {
+                rc_t rc = Quitting();
+                if (rc != 0) {
+                    canceled = true;
+                }
+                else {
+                    STSMSG(STS_TOP, (" fasp download failed"));
+                }
+            }
+        }
+        if (!ascp || (rc != 0 && GetRCObject(rc) != rcMemory
+                              && !canceled && !main->noHttp))
+        {
+            STSMSG(STS_TOP, (" Downloading via http..."));
+            if (ascp) {
+                assert(self->resolver);
+                {
+                    rc_t rc2 = VPathStrFini(&self->remote);
+                    if (rc == 0 && rc2 != 0) {
+                        rc = rc2;
+                    }
+                }
+                RELEASE(KFile, self->file);
+                rc = _VResolverRemote(self->resolver,
+                    eProtocolHttp, self->name, self->accession,
+                    &self->remote.path, &self->remote.str, &self->cache);
+            }
+            if (rc == 0) {
+                /* when eliminateQuals is specified we will try newer algorithm for downloading files via cache, 
+                    but filter out qualities for main file, not for dependencies */
+                if (main->eliminateQuals) {
+                    rc = MainDownloadCacheFile(self, main, self->cache->addr, main->eliminateQuals && !isDependency);
+                }
+                else {
+                    rc = MainDownloadFile(self, main, tmp);
+                }
+            }
+        }
+    }
+
+    RELEASE(KFile, flock);
+    
+    if (rc == 0 && !main->eliminateQuals) {
+        STSMSG(STS_DBG, ("renaming %s -> %S", tmp, self->cache));
+        rc = KDirectoryRename(main->dir, true, tmp, self->cache->addr);
+        if (rc != 0) {
+            PLOGERR(klogInt, (klogInt, rc, "cannot rename $(from) to $(to)",
+                "from=%s,to=%S", tmp, self->cache));
+        }
+    }
+
+    if (rc == 0) {
+        rc = MainDownloaded(main, self->cache->addr);
+    }
+
+    if (rc == 0 && !main->eliminateQuals) {
+        rc_t rc2 = _KDirectoryCleanCache(main->dir, self->cache);
+        if (rc == 0 && rc2 != 0) {
+            rc = rc2;
+        }
+    }
+
+    {
+        rc_t rc2 = _KDirectoryClean(main->dir, self->cache, lock, main->eliminateQuals ? NULL : tmp, rc != 0);
+        if (rc == 0 && rc2 != 0) {
+            rc = rc2;
+        }
+    }
+
+    return rc;
+}
+
+static rc_t _VDBManagerSetDbGapCtx(const VDBManager *self, VResolver *resolver)
+{
+    if (resolver == NULL) {
+        return 0;
+    }
+
+    return VDBManagerSetResolver(self, resolver);
+}
+
+static rc_t MainDependenciesList(const Main *self,
+    const Resolved *resolved, const VDBDependencies **deps)
+{
+    rc_t rc = 0;
+    bool isDb = true;
+    const VDatabase *db = NULL;
+    const String *str = NULL;
+    KPathType type = kptNotFound;
+
+    assert(self && resolved && deps);
+
+    str = resolved->path.str;
+    assert(str && str->addr);
+
+    rc = _VDBManagerSetDbGapCtx(self->mgr, resolved->resolver);
+
+    STSMSG(STS_DBG, ("Listing '%S's dependencies...", str));
+
+    type = VDBManagerPathType(self->mgr, "%s", resolved->name) & ~kptAlias;
+    if (type != kptDatabase) {
+        if (type == kptTable) {
+            STSMSG(STS_DBG, ("...'%S' is a table", str));
+        }
+        else {
+            STSMSG(STS_DBG,
+                ("...'%S' is not recognized as a database or a table", str));
+        }
+        return 0;
+    }
+
+    rc = VDBManagerOpenDBRead(self->mgr, &db, NULL, "%s", resolved->name);
+    if (rc != 0) {
+        if (rc == SILENT_RC(rcDB, rcMgr, rcOpening, rcDatabase, rcIncorrect)) {
+            isDb = false;
+            rc = 0;
+        }
+        else if (rc ==
+            SILENT_RC(rcKFG, rcEncryptionKey, rcRetrieving, rcItem, rcNotFound))
+        {
+            STSMSG(STS_TOP, ("Cannot open encrypted file '%s'", resolved->name));
+            isDb = false;
+            rc = 0;
+        }
+        DISP_RC2(rc, "Cannot open database", resolved->name);
+    }
+
+    if (rc == 0 && isDb) {
+        bool all = self->check_all || self->force != eForceNo;
+        rc = VDatabaseListDependencies(db, deps, !all);
+        DISP_RC2(rc, "VDatabaseListDependencies", resolved->name);
+    }
+
+    RELEASE(VDatabase, db);
+
+    return rc;
+}
+
+/********** Item **********/
+static rc_t ItemRelease(Item *self) {
+    rc_t rc = 0;
+
+    if (self == NULL) {
+        return 0;
+    }
+
+    rc = ResolvedFini(&self->resolved);
+    RELEASE(KartItem, self->item);
+
+    memset(self, 0, sizeof *self);
+
+    free(self);
+
+    return rc;
+}
+
+static rc_t ItemInit(Item *self, const char *obj) {
+    assert(self);
+    self->desc = obj;
+    return 0;
+}
+
+static char* ItemName(const Item *self) {
+    char *c = NULL;
+    assert(self);
+    if (self->desc != NULL) {
+        return string_dup_measure(self->desc, NULL);
+    }
+    else {
+        rc_t rc = 0;
+        const String *elem = NULL;
+        assert(self->item);
+
+        rc = KartItemItemDesc(self->item, &elem);
+        c = StringCheck(elem, rc);
+        if (c != NULL) {
+            return c;
+        }
+
+        rc = KartItemAccession(self->item, &elem);
+        c = StringCheck(elem, rc);
+        if (c != NULL) {
+            return c;
+        }
+
+        rc = KartItemItemId(self->item, &elem);
+        return StringCheck(elem, rc);
+    }
+}
+
+static
+rc_t _KartItemToVPath(const KartItem *self, const VFSManager *vfs, VPath **path)
+{
+    uint64_t oid = 0;
+    rc_t rc = KartItemItemIdNumber(self, &oid);
+    if (rc == 0) {
+        rc = VFSManagerMakeOidPath(vfs, path, (uint32_t)oid);
+    }
+    else {
+        char path_str[PATH_MAX] = "";
+        const String *accession = NULL;
+        rc = KartItemAccession(self, &accession);
+        if (rc == 0) {
+            rc =
+                string_printf(path_str, sizeof path_str, NULL, "%S", accession);
+        }
+        if (rc == 0) {
+            rc = VFSManagerMakePath(vfs, path, path_str);
+        }
+    }
+    return rc;
+}
+
+static rc_t _ItemSetResolverAndAssessionInResolved(Item *item,
+    VResolver *resolver, const KConfig *cfg, const KRepositoryMgr *repoMgr,
+    const VFSManager *vfs)
+{
+    Resolved *resolved = NULL;
+    rc_t rc = 0;
+
+    assert(item && resolver && cfg && repoMgr && vfs);
+
+    resolved = &item->resolved;
+
+    if (item->desc != NULL) {
+        rc = VFSManagerMakePath(vfs, &resolved->accession, "%s", item->desc);
+        DISP_RC2(rc, "VFSManagerMakePath", item->desc);
+        if (rc == 0) {
+            rc = VResolverAddRef(resolver);
+        }
+        if (rc == 0) {
+            resolved->resolver = resolver;
+        }
+    }
+    else {
+        rc = KartItemProjIdNumber(item->item, &resolved->project);
+        if (rc != 0) {
+            DISP_RC(rc, "KartItemProjIdNumber");
+            return rc;
+        }
+        rc = _KartItemToVPath(item->item, vfs, &resolved->accession);
+        if (rc != 0) {
+            DISP_RC(rc, "invalid kart file row");
+            return rc;
+        }
+        else {
+            const KRepository *p_protected = NULL;
+            rc = KRepositoryMgrGetProtectedRepository(repoMgr, 
+                (uint32_t)resolved->project, &p_protected);
+            if (rc == 0) {
+                rc = KRepositoryMakeResolver(p_protected,
+                    &resolved->resolver, cfg);
+                if (rc != 0) {
+                    DISP_RC(rc, "KRepositoryMakeResolver");
+                    return rc;
+                }
+                else {
+                    VResolverCacheEnable(resolved->resolver, vrAlwaysEnable);
+                }
+            }
+            else {
+                PLOGERR(klogErr, (klogErr, rc,
+                    "project '$(P)': cannot find protected repository", "P=%d",
+                    resolved->project));
+            }
+            RELEASE(KRepository, p_protected);
+        }
+    }
+
+    return rc;
+}
+
+/* resolve locations */
+static rc_t _ItemResolveResolved(VResolver *resolver,
+    VRemoteProtocols protocols, Item *item,
+    const KRepositoryMgr *repoMgr, const KConfig *cfg,
+    const VFSManager *vfs, KNSManager *kns, size_t minSize, size_t maxSize)
+{
+    Resolved *resolved = NULL;
+    rc_t rc = 0;
+    rc_t rc2 = 0;
+
+    assert(resolver && item);
+
+    resolved = &item->resolved;
+
+    VPathStrFini(&resolved->local);
+    VPathStrFini(&resolved->remote);
+
+    assert(resolved->accession == NULL);
+
+    rc = _ItemSetResolverAndAssessionInResolved(item,
+        resolver, cfg, repoMgr, vfs);
+
+    if (rc == 0) {
+        rc = V_ResolverLocal(resolved->resolver,
+            resolved->accession, &resolved->local.path);
+        if (rc == 0) {
+            rc = VPathMakeString(resolved->local.path, &resolved->local.str);
+            DISP_RC2(rc, "VPathMakeString(VResolverLocal)", resolved->name);
+        }
+        else if (NotFoundByResolver(rc)) {
+            rc = 0;
+        }
+        else {
+            DISP_RC2(rc, "VResolverLocal", resolved->name);
+        }
+    }
+
+    if (rc == 0) {
+        rc2 = 0;
+        resolved->remoteSz = 0;
+        assert(item->main);
+        if ((minSize > 0 || maxSize > 0 || item->main->order == eOrderSize)
+            && (protocols == eProtocolFasp ||
+                protocols == eProtocolFaspHttp))
+        {
+            rc2 = _VResolverRemote(resolved->resolver, eProtocolHttp,
+                resolved->name, resolved->accession, &resolved->remote.path,
+                &resolved->remote.str, &resolved->cache);
+            if (rc2 != 0 && rc == 0) {
+                rc = rc2;
+            }
+            else {
+                rc_t rc3 = 0;
+                if (resolved->file == NULL) {
+                    rc3 = _KFileOpenRemote(&resolved->file,
+                                              kns, resolved->remote.str->addr);
+                    DISP_RC2(rc3,
+                        "cannot open remote file", resolved->remote.str->addr);
+                }
+
+                if (rc3 == 0 && resolved->file != NULL) {
+                    rc3 = KFileSize(resolved->file, &resolved->remoteSz);
+                    if (rc3 != 0) {
+                        DISP_RC2(rc3, "cannot get remote file size",
+                            resolved->remote.str->addr);
+                    }
+                    else if (resolved->remoteSz >= maxSize) {
+                        return rc;
+                    }
+                    else if (resolved->remoteSz < minSize) {
+                        return rc;
+                    }
+                }
+            }
+        }
+
+        if (rc2 == 0) {
+            rc2 = _VResolverRemote(resolved->resolver, protocols,
+                resolved->name, resolved->accession, &resolved->remote.path,
+                &resolved->remote.str, &resolved->cache);
+            if (rc2 != 0 && rc == 0) {
+                rc = rc2;
+            }
+        }
+
+        if (rc == 0) {
+            rc2 = 0;
+            if (resolved->file == NULL) {
+                assert(resolved->remote.str);
+                if (!_StringIsFasp(resolved->remote.str, NULL)) {
+                    rc2 = _KFileOpenRemote(
+                        &resolved->file, kns, resolved->remote.str->addr);
+                }
+            }
+            if (rc2 == 0 && resolved->file != NULL && resolved->remoteSz == 0) {
+                rc2 = KFileSize(resolved->file, &resolved->remoteSz);
+                DISP_RC2(rc2, "KFileSize(remote)", resolved->name);
+            }
+        }
+    }
+
+    return rc;
+}
+
+/* Resolved: resolve locations */
+static rc_t ItemInitResolved(Item *self, VResolver *resolver, KDirectory *dir,
+    bool ascp, const KRepositoryMgr *repoMgr, const KConfig *cfg,
+    const VFSManager *vfs, KNSManager *kns, size_t minSize, size_t maxSize)
+{
+    Resolved *resolved = NULL;
+    rc_t rc = 0;
+    VRemoteProtocols protocols = ascp ? eProtocolFaspHttp : eProtocolHttp;
+
+    assert(self);
+
+    resolved = &self->resolved;
+    resolved->name = ItemName(self);
+
+    assert(resolved->type != eRunTypeUnknown);
+
+    if (!self->isDependency &&
+        self->desc != NULL) /* object name is specified (not kart item) */
+    {
+        KPathType type = KDirectoryPathType(dir, "%s", self->desc) & ~kptAlias;
+        if (type == kptFile || type == kptDir) {
+            rc = VPathStrInitStr(&resolved->path, self->desc, 0);
+            resolved->existing = true;
+            if (resolved->type != eRunTypeDownload) {
+                uint64_t s = -1;
+                const KFile *f = NULL;
+                rc = KDirectoryOpenFileRead(dir, &f, "%s", self->desc);
+                if (rc == 0) {
+                    rc = KFileSize(f, &s);
+                }
+                if (s != -1) {
+                    resolved->remoteSz = s;
+                }
+                else {
+                    OUTMSG(("%s\tunknown\n", self->desc));
+                }
+                RELEASE(KFile, f);
+            }
+            else {
+                STSMSG(STS_TOP, ("'%s' is a local non-kart file", self->desc));
+            }
+            return 0;
+        }
+    }
+
+    rc = _ItemResolveResolved(resolver, protocols, self,
+        repoMgr, cfg, vfs, kns, minSize, maxSize);
+
+    STSMSG(STS_DBG, ("Resolve(%s) = %R:", resolved->name, rc));
+    STSMSG(STS_DBG, ("local(%s)",
+        resolved->local.str ? resolved->local.str->addr : "NULL"));
+    STSMSG(STS_DBG, ("cache(%s)",
+        resolved->cache ? resolved->cache->addr : "NULL"));
+    STSMSG(STS_DBG, ("remote(%s:%,ld)",
+        resolved->remote.str ? resolved->remote.str->addr : "NULL",
+        resolved->remoteSz));
+
+    if (rc == 0) {
+        if (resolved->remoteSz >= maxSize) {
+            resolved->oversized = true;
+            return rc;
+        }
+        if (resolved->remoteSz < minSize) {
+            resolved->undersized = true;
+            return rc;
+        }
+
+        if (resolved->local.str == NULL
+            && (resolved->cache == NULL || resolved->remote.str == NULL))
+        {
+            rc = RC(rcExe, rcPath, rcValidating, rcParam, rcNull);
+            PLOGERR(klogInt, (klogInt, rc,
+                "bad VResolverResolve($(acc)) result",
+                "acc=%s", resolved->name));
+        }
+    }
+
+    return rc;
+}
+
+/* resolve: locate */
+static rc_t ItemResolve(Item *item, int32_t row) {
+    Resolved *self = NULL;
+    static int n = 0;
+    rc_t rc = 0;
+    bool ascp = false;
+
+    assert(item && item->main);
+
+    self = &item->resolved;
+    assert(self->type);
+
+    ++n;
+    if (row > 0 &&
+        item->desc == NULL) /* desc is NULL for kart items */
+    {
+        n = row;
+    }
+
+    item->number = n;
+
+    ascp = MainUseAscp(item->main);
+    if (self->type == eRunTypeList) {
+        ascp = false;
+    }
+
+    rc = ItemInitResolved(item, item->main->resolver, item->main->dir, ascp,
+        item->main->repoMgr, item->main->cfg, item->main->vfsMgr,
+        item->main->kns, item->main->minSize, item->main->maxSize);
+
+    return rc;
+}
+
+static bool maxSzPrntd = false;
+
+static void logMaxSize(size_t maxSize) {
+    if (maxSzPrntd) {
+        return;
+    }
+        
+    maxSzPrntd = true;
+
+    if (maxSize == 0) {
+/*      OUTMSG(("Maximum file size download limit is unlimited\n")); */
+            return;
+    }
+
+    if (maxSize / 1024 < 10) {
+        PLOGMSG(klogWarn, (klogWarn,
+            "Maximum file size download limit is $(size)B\n",
+            "size=%zu", maxSize));
+        return;
+    }
+
+    maxSize /= 1024;
+    if (maxSize / 1024 < 10) {
+        PLOGMSG(klogWarn, (klogWarn,
+            "Maximum file size download limit is $(size)KB\n",
+            "size=%zu", maxSize));
+        return;
+    }
+
+    maxSize /= 1024;
+    if (maxSize / 1024 < 10) {
+        PLOGMSG(klogWarn, (klogWarn,
+            "Maximum file size download limit is $(size)MB\n",
+            "size=%zu", maxSize));
+        return;
+    }
+
+    maxSize /= 1024;
+    if (maxSize / 1024 < 10) {
+        PLOGMSG(klogWarn, (klogWarn,
+            "Maximum file size download limit is $(size)GB\n",
+            "size=%zu", maxSize));
+        return;
+    }
+
+    maxSize /= 1024;
+    PLOGMSG(klogWarn, (klogWarn,
+        "Maximum file size download limit is $(size)TB\n",
+        "size=%zu", maxSize));
+}
+
+static void logBigFile(int n, const char *name, size_t size) {
+    if (size / 1024 < 10) {
+        STSMSG(STS_TOP,
+            ("%d) '%s' (%,zuB) is larger than maximum allowed: skipped\n",
+                n, name, size));
+        return;
+    }
+
+    size /= 1024;
+    if (size / 1024 < 10) {
+        STSMSG(STS_TOP,
+            ("%d) '%s' (%,zuKB) is larger than maximum allowed: skipped\n",
+                n, name, size));
+        return;
+    }
+
+    size /= 1024;
+    if (size / 1024 < 10) {
+        STSMSG(STS_TOP,
+            ("%d) '%s' (%,zuMB) is larger than maximum allowed: skipped\n",
+                n, name, size));
+        return;
+    }
+
+    size /= 1024;
+    if (size / 1024 < 10) {
+        STSMSG(STS_TOP,
+            ("%d) '%s' (%,zuGB) is larger than maximum allowed: skipped\n",
+                n, name, size));
+        return;
+    }
+
+    size /= 1024;
+    STSMSG(STS_TOP,
+        ("%d) '%s' (%,zuTB) is larger than maximum allowed: skipped\n",
+            n, name, size));
+}
+
+/* download if not found; obey size restriction */
+static rc_t ItemDownload(Item *item) {
+    bool isLocal = false;
+    int n = 0;
+    rc_t rc = 0;
+    Resolved *self = NULL;
+    assert(item && item->main);
+    n = item->number;
+    self = &item->resolved;
+    assert(self->type);
+
+    if (rc == 0) {
+        bool skip = false;
+        if (self->existing) { /* the path is a path to an existing local file */
+            rc = VPathStrInitStr(&self->path, item->desc, 0);
+            return rc;
+        }
+        if (self->undersized) {
+            STSMSG(STS_TOP,
+               ("%d) '%s' (%,zu KB) is smaller than minimum allowed: skipped\n",
+                n, self->name, self->remoteSz / 1024));
+            skip = true;
+        }
+        else if (self->oversized) {
+            logMaxSize(item->main->maxSize);
+            logBigFile(n, self->name, self->remoteSz);
+            skip = true;
+        }
+
+        rc = ResolvedLocal(self, item->main->dir, &isLocal,
+            skip ? eForceNo : item->main->force);
+
+        if (rc == 0) {
+            if (skip && !isLocal) {
+                return rc;
+            }
+        }
+    }
+
+    if (rc == 0) {
+        if (isLocal) {
+            STSMSG(STS_TOP, ("%d) '%s' is found locally", n, self->name));
+            if (self->local.str != NULL) {
+                VPathStrFini(&self->path);
+                rc = StringCopy(&self->path.str, self->local.str);
+            }
+        }
+        else if (!_StringIsFasp(self->remote.str, NULL)
+            && item->main->noHttp)
+        {
+            rc = RC(rcExe, rcFile, rcCopying, rcFile, rcNotFound);
+            PLOGERR(klogErr, (klogErr, rc,
+                "cannot download '$(name)' using requested transport",
+                "name=%s", self->name));
+        }
+        else {
+            STSMSG(STS_TOP, ("%d) Downloading '%s'...", n, self->name));
+            rc = MainDownload(self, item->main, item->isDependency);
+            if (rc == 0) {
+                STSMSG(STS_TOP,
+                    ("%d) '%s' was downloaded successfully", n, self->name));
+                if (self->cache != NULL) {
+                    VPathStrFini(&self->path);
+                    rc = StringCopy(&self->path.str, self->cache);
+                }
+            }
+            else if (rc != SILENT_RC(rcExe,
+                rcProcess, rcExecuting, rcProcess, rcCanceled))
+            {
+                STSMSG(STS_TOP, ("%d) failed to download %s", n, self->name));
+            }
+        }
+    }
+    else {
+        STSMSG(STS_TOP, ("%d) cannot locate '%s'", n, self->name));
+    }
+
+    return rc;
+}
+
+static rc_t ItemPrintSized(const Item *self, int32_t row, size_t size) {
+    rc_t rc = 0;
+    const String *projId = NULL;
+    const String *itemId = NULL;
+    const String *accession = NULL;
+    const String *name = NULL;
+    const String *itemDesc = NULL;
+    assert(self && row);
+    if (self->desc != NULL) { /* object */
+        OUTMSG(("%d\t%s\t%,zuB\n", row, self->desc, size));
+    }
+    else {                    /* kart item */
+        if (rc == 0) {
+            rc = KartItemProjId(self->item, &projId);
+        }
+        if (rc == 0) {
+            rc = KartItemItemId(self->item, &itemId);
+        }
+        if (rc == 0) {
+            rc = KartItemAccession(self->item, &accession);
+        }
+        if (rc == 0) {
+            rc = KartItemName(self->item, &name);
+        }
+        if (rc == 0) {
+            rc = KartItemItemDesc(self->item, &itemDesc);
+        }
+        if (rc == 0) {
+           rc = OUTMSG(("%d\t%S|%S|%S|%S|%S\t%,zuB\n",
+               row, projId, itemId, accession, name, itemDesc, size));
+        }
+    }
+
+    return rc;
+}
+
+/* resolve: locate; download if not found */
+static rc_t ItemResolveResolvedAndDownloadOrProcess(Item *self, int32_t row) {
+    rc_t rc = ItemResolve(self, row);
+    if (rc != 0) {
+        return rc;
+    }
+
+    assert(self);
+
+    if (self->resolved.type == eRunTypeList) {
+        return ItemPrintSized(self, row, self->resolved.remoteSz);
+    }
+    else if (self->resolved.type != eRunTypeDownload) {
+        return rc;
+    }
+
+    return ItemDownload(self);
+}
+
+static rc_t ItemDownloadDependencies(Item *item) {
+    Resolved *resolved = NULL;
+    rc_t rc = 0;
+    const VDBDependencies *deps = NULL;
+    uint32_t count = 0;
+    uint32_t i = 0;
+
+    assert(item && item->main);
+
+    resolved = &item->resolved;
+
+    assert(resolved);
+
+    if (resolved->path.str != NULL) {
+        rc = MainDependenciesList(item->main, resolved, &deps);
+    }
+
+    /* resolve dependencies (refseqs) */
+    if (rc == 0 && deps != NULL) {
+        rc = VDBDependenciesCount(deps, &count);
+        if (rc == 0) {
+            STSMSG(STS_TOP, ("'%s' has %d%s dependenc%s", resolved->name,
+                count, item->main->check_all ? "" : " unresolved",
+                count == 1 ? "y" : "ies"));
+        }
+        else {
+            DISP_RC2(rc, "Failed to check %s's dependencies", resolved->name);
+        }
+    }
+
+    for (i = 0; i < count && rc == 0; ++i) {
+        bool local = true;
+        const char *seq_id = NULL;
+
+        if (rc == 0) {
+            rc = VDBDependenciesLocal(deps, &local, i);
+            DISP_RC2(rc, "VDBDependenciesLocal", resolved->name);
+            if (local) {
+                continue;
+            }
+        }
+
+        if (rc == 0) {
+            rc = VDBDependenciesSeqId(deps, &seq_id, i);
+            DISP_RC2(rc, "VDBDependenciesSeqId", resolved->name);
+        }
+
+        if (rc == 0) {
+            size_t num_writ = 0;
+            char ncbiAcc[512] = "";
+
+            assert(seq_id);
+
+            rc = string_printf(ncbiAcc, sizeof ncbiAcc, &num_writ,
+                "ncbi-acc:%s?vdb-ctx=refseq", seq_id);
+            DISP_RC2(rc, "string_printf(?vdb-ctx=refseq)", seq_id);
+            if (rc == 0 && num_writ > sizeof ncbiAcc) {
+                rc = RC(rcExe, rcFile, rcCopying, rcBuffer, rcInsufficient);
+                PLOGERR(klogInt, (klogInt, rc,
+                    "bad string_printf($(s)?vdb-ctx=refseq) result",
+                    "s=%s", seq_id));
+            }
+    
+            if (rc == 0) {
+                Item *ditem = calloc(1, sizeof *ditem);
+                if (ditem == NULL) {
+                    return RC(rcExe,
+                        rcStorage, rcAllocating, rcMemory, rcExhausted);
+                }
+
+                ditem->desc = ncbiAcc;
+                ditem->main = item->main;
+                ditem->isDependency = true;
+
+                ResolvedReset(&ditem->resolved, eRunTypeDownload);
+
+                rc = ItemResolveResolvedAndDownloadOrProcess(ditem, 0);
+
+                RELEASE(Item, ditem);
+            }
+        }
+    }
+
+    RELEASE(VDBDependencies, deps);
+
+    return rc;
+}
+
+static bool ResolvedResetLocalFileAccession(
+    Resolved *self, const Main *main, const char *path)
+{
+    rc_t rc = 0;
+
+    assert(self);
+
+    if (!self->existing) {
+       /* need to check remote vdbcache when accession (no path) is specified */
+        return true;
+    }
+
+    RELEASE(VPath, self->accession);
+    rc = VFSManagerMakePath(main->vfsMgr, &self->accession, "%s", path);
+    if (rc != 0) {
+        DISP_RC2(rc, "VFSManagerMakePath", path);
+        return rc;
+    }
+
+    if (!VPathIsAccessionOrOID(self->accession)) {
+        /* self->accession is not an accession but a path:
+           let's try to get the accession */
+        VPath *acc = NULL;
+        rc = VFSManagerExtractAccessionOrOID(
+            main->vfsMgr, &acc, self->accession);
+        if (rc == 0) {
+            char buffer[99] = "";
+            VPathReadPath(acc, buffer, sizeof buffer, NULL);
+            STSMSG(STS_INFO, ("Accession for '%s' = '%s': "
+                        "checking vdbcache", path, buffer));
+
+            RELEASE(VPath, self->accession);
+            self->accession = acc;
+        }
+        else {
+            STSMSG(STS_TOP, ("Cannot extract accession for "
+                "'%s': skipped vdbcache download", path));
+            return false;
+        }
+    }
+
+    return true;
+}
+
+static rc_t ItemResetRemoteToVdbcacheIfVdbcacheRemoteExists(
+    Item *self, char *remotePath, size_t remotePathLen, bool *exists)
+{
+    rc_t rc = 0;
+    size_t len = 0;
+    Resolved *resolved = NULL;
+    VPath *cremote = NULL;
+    assert(self && self->main && exists);
+    resolved = &self->resolved;
+    assert(resolved);
+    *exists = false;
+    if (resolved->remote.path == NULL) {
+#define TODO 1
+        rc_t rc = TODO;
+        DISP_RC(rc, "UNKNOWN REMOTE LOCATION WHEN TRYING TO FIND VDBCACHE");
+        return rc;
+    }
+    rc = VFSManagerMakePathWithExtension(self->main->vfsMgr,
+        &cremote, resolved->remote.path, ".vdbcache");
+    if (rc != 0) {
+        if (resolved->remote.str != NULL) {
+            DISP_RC2(rc, "VFSManagerMakePathWithExtension",
+                resolved->remote.str->addr);
+        }
+        else {
+            DISP_RC(rc, "VFSManagerMakePathWithExtension(remote)");
+        }
+        return rc;
+    }
+    rc = VPathReadUri(cremote, remotePath, remotePathLen, &len);
+    if (rc == 0) {
+        RELEASE(KFile, resolved->file);
+        rc = _KFileOpenRemote(&resolved->file, self->main->kns, remotePath);
+        if (rc == 0) {
+            char *query = string_chr(remotePath, len, '?');
+            if (query != NULL) {
+                *query = '\0';
+            }
+            STSMSG(STS_DBG, ("'%s' exists", remotePath));
+            STSMSG(STS_TOP, ("'%s' has remote vdbcache", resolved->name));
+            *exists = true;
+            rc = VPathStrInitStr(&resolved->remote, remotePath, len);
+            DISP_RC2(rc, "StringCopy(Remote.vdbcache)", remotePath);
+            resolved->remote.path = cremote;
+            cremote = NULL;
+        }
+        else if (rc == SILENT_RC(rcNS, rcFile, rcOpening, rcFile, rcNotFound)) {
+            STSMSG(STS_DBG, ("'%s' does not exist", remotePath));
+            *exists = false;
+            STSMSG(STS_TOP, ("'%s' has no remote vdbcache", resolved->name));
+            rc = 0;
+        }
+        else if
+            (rc == SILENT_RC(rcNS, rcFile, rcOpening, rcFile, rcUnauthorized))
+        {
+            STSMSG(STS_DBG, (
+                "Access to '%s's vdbcahe file is forbidden or it does not exist"
+                , resolved->name));
+            *exists = false;
+            STSMSG(STS_TOP, ("'%s' has no remote vdbcache", resolved->name));
+            rc = 0;
+        }
+        else {
+            DISP_RC2(rc, "Failed to check vdbcache", resolved->name);
+        }
+    }
+    RELEASE(VPath, cremote);
+    return rc;
+}
+
+static rc_t MainDetectVdbcacheCachePath(const Main *self,
+    const String *runCache, const VPath **runCachePath,
+    const String **vdbcacheCache)
+{
+    rc_t rc = 0;
+
+    VPath *vlocal = NULL;
+    VPath *clocal = NULL;
+
+    if (runCache == NULL && (runCachePath == NULL || *runCachePath == NULL))
+    {
+        rc_t rc = TODO;
+        DISP_RC(rc, "UNKNOWN CACHE LOCATION WHEN TRYING TO FIND VDBCACHE");
+        return rc;
+    }
+
+    if (runCachePath != NULL && *runCachePath != NULL) {
+        vlocal = (VPath*)*runCachePath;
+    }
+    else {
+        rc = VFSManagerMakePath(self->vfsMgr, &vlocal, "%S", runCache);
+        if (rc != 0) {
+            DISP_RC2(rc, "VFSManagerMakePath", runCache->addr);
+            return rc;
+        }
+    }
+
+    rc = VFSManagerMakePathWithExtension(
+        self->vfsMgr, &clocal, vlocal, ".vdbcache");
+    DISP_RC2(rc, "VFSManagerMakePathWithExtension", runCache->addr);
+
+    if (rc == 0) {
+        rc = VPathMakeString(clocal, vdbcacheCache);
+    }
+
+    RELEASE(VPath, clocal);
+
+    if (runCachePath == NULL) {
+        RELEASE(VPath, vlocal);
+    }
+    else if (*runCachePath == NULL) {
+        *runCachePath = vlocal;
+    }
+
+    return rc;
+}
+
+static bool MainNeedDownload(const Main *self, const String *local,
+    const char *remotePath, const KFile *remote, size_t *remoteSz)
+{
+    KPathType type = kptNotFound;
+    assert(self && local);
+    type = KDirectoryPathType(self->dir, "%s", local->addr) & ~kptAlias;
+    if (type == kptNotFound) {
+        return false;
+    }
+    if (type != kptFile) {
+        if (self->force == eForceNo) {
+            STSMSG(STS_TOP, (
+                "%S (not a file) is found locally: consider it complete",
+                local));
+            return false;
+        }
+        else {
+            STSMSG(STS_TOP, (
+                "%S (not a file) is found locally and will be redownloaded",
+                local));
+            return true;
+        }
+    }
+    else if (self->force != eForceNo) {
+        return true;
+    }
+    else {
+        rc_t rc = 0;
+        size_t sLocal = 0;
+        assert(remoteSz);
+        rc = KFileSize(remote, remoteSz);
+        DISP_RC2(rc, "KFileSize(remote.vdbcache)", remotePath);
+        if (rc != 0) {
+            return true;
+        }
+        {
+            const KFile *f = NULL;
+            rc = KDirectoryOpenFileRead(self->dir, &f, "%S", local);
+            if (rc != 0) {
+                DISP_RC2(rc, "KDirectoryOpenFileRead", local->addr);
+                return true;
+            }
+            rc = KFileSize(f, &sLocal);
+            if (rc != 0) {
+                DISP_RC2(rc, "KFileSize", local->addr);
+            }
+            RELEASE(KFile, f);
+            if (rc != 0) {
+                return true;
+            }
+        }
+        if (sLocal == *remoteSz) {
+            STSMSG(STS_INFO, ("%S (%,lu) is found", local, sLocal));
+            return false;
+        }
+        else {
+            STSMSG(STS_INFO,
+                ("%S (%,lu) is found and will be redownloaded", local, sLocal));
+            return true;
+        }
+    }
+}
+
+static rc_t ItemDownloadVdbcache(Item *item) {
+    rc_t rc = 0;
+    Resolved *resolved = NULL;
+    bool checkRemote = true;
+    bool remoteExists = false;
+    char remotePath[PATH_MAX] = "";
+    const String *local = NULL;
+    const String *cache = NULL;
+    bool localExists = false;
+    bool download = true;
+    assert(item && item->main);
+    resolved = &item->resolved;
+    if (!resolved) {
+        STSMSG(STS_TOP,
+            ("CANNOT DOWNLOAD VDBCACHE FOR UNRESOLVED ITEM '%s'", item->desc));
+        /* TODO error? */
+        return 0;
+    }
+    {
+        bool csra = false;
+        const VDatabase *db = NULL;
+        KPathType type = VDBManagerPathType
+            (item->main->mgr, "%S", resolved->path.str) & ~kptAlias;
+        if (type == kptTable) {
+            STSMSG(STS_INFO, ("'%S' is a table", resolved->path.str));
+        }
+        else if (type != kptDatabase) {
+            STSMSG(STS_INFO, ("'%S' is not recognized as a database or a table",
+                resolved->path.str));
+        }
+        else {
+            rc_t rc = VDBManagerOpenDBRead(item->main->mgr,
+                &db, NULL, "%S", resolved->path.str);
+            if (rc == 0) {
+                csra = VDatabaseIsCSRA(db);
+            }
+            RELEASE(VDatabase, db);
+            if (csra) {
+                STSMSG(STS_INFO, ("'%s' is cSRA", resolved->name));
+            }
+            else {
+                STSMSG(STS_INFO, ("'%s' is not cSRA", resolved->name));
+            }
+            if (!csra) {
+                return 0;
+            }
+        }
+    }
+    if (resolved->remote.str == NULL ||
+        _StringIsFasp(resolved->remote.str, NULL))
+    {
+        if (item->main->noHttp) {
+            /* fasp download
+               return 0; ignore fasp-only transpot */
+        }
+        if (resolved->resolver == NULL) {
+            rc = VResolverAddRef(item->main->resolver);
+            if (rc == 0) {
+                resolved->resolver = item->main->resolver;
+            }
+            assert(!rc && resolved->resolver);
+        }
+        {
+            const char *path = item->desc;
+            if (path == NULL && resolved->path.str != NULL) {
+                path = resolved->path.str->addr;
+            }
+            checkRemote
+                = ResolvedResetLocalFileAccession(resolved, item->main, path);
+        }
+        if (checkRemote) {
+            rc_t rc2 = VPathStrFini(&resolved->remote);
+            if (rc == 0 && rc2 != 0) {
+                rc = rc2;
+            }
+            RELEASE(KFile, resolved->file);
+            rc = _VResolverRemote(resolved->resolver, eProtocolHttp,
+                resolved->name, resolved->accession, &resolved->remote.path,
+                &resolved->remote.str, &resolved->cache);
+        }
+    }
+    if (!checkRemote) {
+        return 0;
+    }
+    if (rc == 0) {
+        rc = ItemResetRemoteToVdbcacheIfVdbcacheRemoteExists(
+            item, remotePath, sizeof remotePath, &remoteExists);
+    }
+    if (!remoteExists) {
+        return 0;
+    }
+    {
+        bool cacheExists = false;
+        if (resolved->existing) {
+            /* resolved->path.str is a local file path */
+            rc = MainDetectVdbcacheCachePath(item->main,
+                resolved->path.str, &resolved->path.path, &local);
+            assert(local);
+            localExists = (VDBManagerPathType(item->main->mgr, "%S", local)
+                & ~kptAlias) != kptNotFound;
+            STSMSG(STS_DBG, ("'%S' %sexist%s", local,
+                localExists ? "" : "does not ", localExists ? "s" : ""));
+        }
+        /* check vdbcache file cache location and its existence */
+        rc = MainDetectVdbcacheCachePath(item->main,
+            resolved->cache, NULL, &cache);
+        cacheExists = (VDBManagerPathType(item->main->mgr, "%S", cache)
+            & ~kptAlias) != kptNotFound;
+        STSMSG(STS_DBG, ("'%S' %sexist%s", cache,
+            cacheExists ? "" : "does not ", cacheExists ? "s" : ""));
+        if (!localExists) {
+            localExists = cacheExists;
+        }
+    }
+    if (!remoteExists) {
+        return 0;
+    }
+    if (localExists) {
+        download = MainNeedDownload(item->main, local ? local : cache,
+            remotePath, resolved->file, &resolved->remoteSz);
+    }
+    RELEASE(String, local);
+    RELEASE(String, resolved->cache);
+    resolved->cache = cache;
+    if (download && rc == 0) {
+
+     /* ignore fasp transport request while ascp vdbcache address is unknown */
+        item->main->noHttp = false;
+
+        rc = MainDownload(&item->resolved, item->main, item->isDependency);
+        if (rc == 0) {
+            if (local && StringCompare(local, cache) != 0) {
+                STSMSG(STS_DBG, ("Removing '%S'", local));
+                /* TODO rm local vdbcache file
+                    if full path is specified and it is not the cache path
+                rc = KDirectoryRemove(item->main->dir, false, "%S", local);
+                    */
+            }
+        }
+    }
+    return rc;
+}
+
+static rc_t ItemPostDownload(Item *item, int32_t row) {
+    rc_t rc = 0;
+    Resolved *resolved = NULL;
+    KPathType type = kptNotFound;
+    assert(item);
+    resolved = &item->resolved;
+    if (resolved->type == eRunTypeList) {
+        return rc;
+    }
+    else if (resolved->oversized) {
+        item->main->oversized = true;
+    }
+    else if (resolved->undersized) {
+        item->main->undersized = true;
+    }
+
+    if (resolved->path.str != NULL) {
+        assert(item->main);
+        rc = _VDBManagerSetDbGapCtx(item->main->mgr, resolved->resolver);
+        type = VDBManagerPathType
+            (item->main->mgr, "%s", resolved->name) & ~kptAlias;
+        if (type != kptDatabase) {
+            if (type == kptTable) {
+                 STSMSG(STS_DBG, ("...'%S' is a table", resolved->path.str));
+            }
+            else {
+                 STSMSG(STS_DBG, ("...'%S' is not recognized "
+                     "as a database or a table", resolved->path.str));
+            }
+            return rc;
+         }
+        else {
+            STSMSG(STS_DBG, ("...'%S' is a database", resolved->path.str));
+        }
+    }
+
+    rc = ItemDownloadDependencies(item);
+    if (true) {
+        rc_t rc2 = Quitting();
+        if (rc2 == 0) {
+            rc2 = ItemDownloadVdbcache(item);
+        }
+        if (rc == 0 && rc2 != 0) {
+            rc = rc2;
+        }
+    }
+    return rc;
+}
+
+static rc_t ItemProcess(Item *item, int32_t row) {
+    rc_t rc = 0;
+
+    assert(item);
+
+    /* resolve: locate; download if not found */
+    rc = ItemResolveResolvedAndDownloadOrProcess(item, row);
+
+    if (item->resolved.type != eRunTypeDownload) {
+        return rc;
+    }
+
+    if (rc == 0) {
+        rc = ItemPostDownload(item, row);
+    }
+
+    return rc;
+}
+
+/*********** Iterator **********/
+static
+rc_t IteratorInit(Iterator *self, const char *obj, const Main *main)
+{
+    rc_t rc = 0;
+
+    KPathType type = kptNotFound;
+
+    assert(self && main);
+    memset(self, 0, sizeof *self);
+
+#ifdef _DEBUGGING
+    if (obj == NULL && main->textkart) {
+        type = KDirectoryPathType(main->dir, "%s", main->textkart);
+        if ((type & ~kptAlias) != kptFile) {
+            rc = RC(rcExe, rcFile, rcOpening, rcFile, rcNotFound);
+            DISP_RC(rc, main->textkart);
+            return rc;
+        }
+        rc = KartMakeText(main->dir, main->textkart, &self->kart,
+            &self->isKart);
+        if (rc != 0) {
+            if (!self->isKart) {
+                rc = 0;
+            }
+            else {
+                PLOGERR(klogErr, (klogErr, rc, "'$(F)' is not a text kart file",
+                    "F=%s", main->textkart));
+            }
+        }
+        return rc;
+    }
+#endif
+
+    assert(obj);
+    type = KDirectoryPathType(main->dir, "%s", obj);
+    if ((type & ~kptAlias) == kptFile) {
+        type = VDBManagerPathType(main->mgr, "%s", obj);
+        if ((type & ~kptAlias) == kptFile) {
+            rc = KartMake(main->dir, obj, &self->kart, &self->isKart);
+            if (!self->isKart) {
+                rc = 0;
+            }
+        }
+    }
+
+    if (rc == 0 && !self->isKart) {
+        self->obj = obj;
+    }
+
+    return rc;
+}
+
+static rc_t IteratorNext(Iterator *self, Item **next, bool *done) {
+    rc_t rc = 0;
+
+    assert(self && next && done);
+
+    *next = NULL;
+
+    if (self->done) {
+        *done = true;
+        return 0;
+    }
+
+    *done = false;
+
+    *next = calloc(1, sizeof **next);
+    if (*next == NULL) {
+        return RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+    }
+
+    if (self->isKart) {
+        rc = KartMakeNextItem(self->kart, &(*next)->item);
+        if (rc != 0) {
+            LOGERR(klogErr, rc, "Invalid kart file: cannot read next row");
+        }
+        else if ((*next)->item == NULL) {
+            RELEASE(Item, *next);
+            *next = NULL;
+            *done = true;
+        }
+
+        if (rc == 0 && *done) {
+            self->done = true;
+        }
+    }
+    else {
+        rc = ItemInit(*next, self->obj);
+
+        self->done = true;
+    }
+
+    return rc;
+}
+
+static void IteratorFini(Iterator *self) {
+    rc_t rc = 0;
+
+    assert(self);
+
+    RELEASE(Kart, self->kart);
+}
+
+/*********** Command line arguments **********/
+
+static size_t _sizeFromString(const char *val) {
+    size_t s = 0;
+
+    for (s = 0; *val != '\0'; ++val) {
+        if (*val < '0' || *val > '9') {
+            break;
+        }
+        s = s * 10 + *val - '0';
+    }
+
+    if (*val == '\0' || *val == 'k' || *val == 'K') {
+        s *= 1024L;
+    }
+    else if (*val == 'b' || *val == 'B') {
+    }
+    else if (*val == 'm' || *val == 'M') {
+        s *= 1024L * 1024;
+    }
+    else if (*val == 'g' || *val == 'G') {
+        s *= 1024L * 1024 * 1024;
+    }
+    else if (*val == 't' || *val == 'T') {
+        s *= 1024L * 1024 * 1024 * 1024;
+    }
+    else if (*val == 'u' || *val == 'U') {  /* unlimited */
+        s = 0;
+    }
+
+    return s;
+}
+
+#define ASCP_OPTION "ascp-path"
+#define ASCP_ALIAS  "a"
+static const char* ASCP_USAGE[] =
+{ "path to ascp program and private key file (asperaweb_id_dsa.putty)", NULL };
+
+#define ASCP_PAR_OPTION "ascp-options"
+#define ASCP_PAR_ALIAS  NULL
+static const char* ASCP_PAR_USAGE[] =
+{ "arbitrary options to pass to ascp command line", NULL };
+
+#define CHECK_ALL_OPTION "check-all"
+#define CHECK_ALL_ALIAS  "c"
+static const char* CHECK_ALL_USAGE[] = { "double-check all refseqs", NULL };
+
+#define FORCE_OPTION "force"
+#define FORCE_ALIAS  "f"
+static const char* FORCE_USAGE[] = {
+    "force object download - one of: no, yes, all.",
+    "no [default]: skip download if the object if found and complete;",
+    "yes: download it even if it is found and is complete;", "all: ignore lock "
+    "files (stale locks or it is being downloaded by another process: "
+    "use at your own risk!)", NULL };
+
+#define FAIL_ASCP_OPTION "FAIL-ASCP"
+#define FAIL_ASCP_ALIAS  "F"
+static const char* FAIL_ASCP_USAGE[] = {
+    "force ascp download fail to test ascp->http download combination" };
+
+#define LIST_OPTION "list"
+#define LIST_ALIAS  "l"
+static const char* LIST_USAGE[] = { "list the content of a kart file", NULL };
+
+#define NM_L_OPTION "numbered-list"
+#define NM_L_ALIAS  "n"
+static const char* NM_L_USAGE[] =
+{ "list the content of a kart file with kart row numbers", NULL };
+
+#define MINSZ_OPTION "min-size"
+#define MINSZ_ALIAS  "N"
+static const char* MINSZ_USAGE[] =
+{ "minimum file size to download in KB (inclusive).", NULL };
+
+#define ORDR_OPTION "order"
+#define ORDR_ALIAS  "o"
+static const char* ORDR_USAGE[] = { "kart prefetch order: one of: kart, size.",
+    "(in kart order, by file size: smallest first), default: size", NULL };
+
+#define HBEAT_OPTION "progress"
+#define HBEAT_ALIAS  "p"
+static const char* HBEAT_USAGE[] = {
+    "time period in minutes to display download progress",
+    "(0: no progress), default: 1", NULL };
+
+#define ROWS_OPTION "rows"
+#define ROWS_ALIAS  "R"
+static const char* ROWS_USAGE[] =
+{ "kart rows (default all).", "row list should be ordered", NULL };
+
+#define SZ_L_OPTION "list-sizes"
+#define SZ_L_ALIAS  "s"
+static const char* SZ_L_USAGE[] =
+{ "list the content of a kart file with target file sizes", NULL };
+
+#define TRANS_OPTION "transport"
+#define TRASN_ALIAS  "t"
+static const char* TRANS_USAGE[] = { "transport: one of: fasp; http; both.",
+    "(fasp only; http only; first try fasp (ascp), "
+    "use http if cannot download using fasp).",
+    "Default: both", NULL };
+
+#define DEFAULT_MAX_FILE_SIZE "20G"
+#define SIZE_OPTION "max-size"
+#define SIZE_ALIAS  "X"
+static const char* SIZE_USAGE[] = {
+    "maximum file size to download in KB (exclusive).",
+    "Default: " DEFAULT_MAX_FILE_SIZE, NULL };
+
+#if ALLOW_STRIP_QUALS
+#define STRIP_QUALS_OPTION "strip-quals"
+#define STRIP_QUALS_ALIAS NULL
+static const char* STRIP_QUALS_USAGE[] =
+{ "remove QUALITY column from all tables", NULL };
+#endif
+
+#define ELIM_QUALS_OPTION "eliminate-quals"
+#define ELIM_QUALS_ALIAS NULL
+static const char* ELIM_QUALS_USAGE[] =
+{ "don't download QUALITY column", NULL };
+
+#ifdef _DEBUGGING
+#define TEXTKART_OPTION "text-kart"
+static const char* TEXTKART_USAGE[] =
+{ "To read a textual format kart file (DEBUG ONLY)", NULL };
+#endif
+
+static OptDef Options[] = {
+    /*                                                    needs_value required*/
+    { FORCE_OPTION       , FORCE_ALIAS       , NULL, FORCE_USAGE , 1, true, false }
+   ,{ TRANS_OPTION       , TRASN_ALIAS       , NULL, TRANS_USAGE , 1, true, false }
+   ,{ LIST_OPTION        , LIST_ALIAS        , NULL, LIST_USAGE  , 1, false,false }
+   ,{ NM_L_OPTION        , NM_L_ALIAS        , NULL, NM_L_USAGE  , 1, false,false }
+   ,{ SZ_L_OPTION        , SZ_L_ALIAS        , NULL, SZ_L_USAGE  , 1, false,false }
+   ,{ ROWS_OPTION        , ROWS_ALIAS        , NULL, ROWS_USAGE  , 1, true, false }
+   ,{ MINSZ_OPTION       , MINSZ_ALIAS       , NULL, MINSZ_USAGE , 1, true ,false }
+   ,{ SIZE_OPTION        , SIZE_ALIAS        , NULL, SIZE_USAGE  , 1, true ,false }
+   ,{ ORDR_OPTION        , ORDR_ALIAS        , NULL, ORDR_USAGE  , 1, true ,false }
+   ,{ ASCP_OPTION        , ASCP_ALIAS        , NULL, ASCP_USAGE  , 1, true ,false }
+   ,{ ASCP_PAR_OPTION    , ASCP_PAR_ALIAS    , NULL, ASCP_PAR_USAGE, 1, true ,false }
+   ,{ HBEAT_OPTION       , HBEAT_ALIAS       , NULL, HBEAT_USAGE , 1, true, false }
+   ,{ FAIL_ASCP_OPTION   , FAIL_ASCP_ALIAS   , NULL, FAIL_ASCP_USAGE, 1, false, false}
+#if ALLOW_STRIP_QUALS
+   ,{ STRIP_QUALS_OPTION , STRIP_QUALS_ALIAS , NULL, STRIP_QUALS_USAGE , 1, false, false }
+#endif
+   ,{ ELIM_QUALS_OPTION  , ELIM_QUALS_ALIAS  , NULL, ELIM_QUALS_USAGE , 1, false, false }
+#ifdef _DEBUGGING
+   ,{ TEXTKART_OPTION    , NULL              , NULL, TEXTKART_USAGE , 1, true , false}
+#endif
+   ,{ CHECK_ALL_OPTION   , CHECK_ALL_ALIAS   , NULL, CHECK_ALL_USAGE, 1, false, false}
+};
+
+static ParamDef Parameters[] = { { ArgsConvFilepath } };
+
+static rc_t MainProcessArgs(Main *self, int argc, char *argv[]) {
+    rc_t rc = 0;
+
+    uint32_t pcount = 0;
+
+    assert(self);
+
+    rc = ArgsMakeAndHandle2(&self->args, argc, argv,
+        Parameters, sizeof Parameters / sizeof Parameters[0],
+        1, Options, sizeof Options / sizeof Options[0]);
+    if (rc != 0) {
+        DISP_RC(rc, "ArgsMakeAndHandle");
+        return rc;
+    }
+
+    do {
+/* FORCE_OPTION goes first */
+        rc = ArgsOptionCount (self->args, FORCE_OPTION, &pcount);
+        if (rc != 0) {
+            LOGERR(klogErr, rc, "Failure to get '" FORCE_OPTION "' argument");
+            break;
+        }
+
+        if (pcount > 0) {
+            const char *val = NULL;
+            rc = ArgsOptionValue(self->args, FORCE_OPTION, 0, (const void **)&val);
+            if (rc != 0) {
+                LOGERR(klogErr, rc,
+                    "Failure to get '" FORCE_OPTION "' argument value");
+                break;
+            }
+            if (val == NULL || val[0] == '\0') {
+                rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInvalid);
+                LOGERR(klogErr, rc,
+                    "Unrecognized '" FORCE_OPTION "' argument value");
+                break;
+            }
+            switch (val[0]) {
+                case 'n':
+                case 'N':
+                    self->force = eForceNo;
+                    break;
+                case 'y':
+                case 'Y':
+                    self->force = eForceYes;
+                    break;
+                case 'a':
+                case 'A':
+                    self->force = eForceYES;
+                    break;
+                default:
+                    rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInvalid);
+                    LOGERR(klogErr, rc,
+                        "Unrecognized '" FORCE_OPTION "' argument value");
+                    break;
+            }
+            if (rc != 0) {
+                break;
+            }
+        }
+
+/* CHECK_ALL_OPTION goes after FORCE_OPTION */
+        rc = ArgsOptionCount(self->args, CHECK_ALL_OPTION, &pcount);
+        if (rc != 0) {
+            LOGERR(klogErr,
+                rc, "Failure to get '" CHECK_ALL_OPTION "' argument");
+            break;
+        }
+        if (pcount > 0 || self->force != eForceNo) {
+            self->check_all = true;
+        }
+
+/******* LIST OPTIONS BEGIN ********/
+/* LIST_OPTION */
+        rc = ArgsOptionCount(self->args, LIST_OPTION, &pcount);
+        if (rc != 0) {
+            LOGERR(klogErr,
+                rc, "Failure to get '" LIST_OPTION "' argument");
+            break;
+        }
+        if (pcount > 0) {
+            self->list_kart = true;
+        }
+
+/* NM_L_OPTION */
+        rc = ArgsOptionCount(self->args, NM_L_OPTION, &pcount);
+        if (rc != 0) {
+            LOGERR(klogErr,
+                rc, "Failure to get '" NM_L_OPTION "' argument");
+            break;
+        }
+        if (pcount > 0) {
+            self->list_kart = self->list_kart_numbered = true;
+        }
+
+/* SZ_L_OPTION */
+        rc = ArgsOptionCount(self->args, SZ_L_OPTION, &pcount);
+        if (rc != 0) {
+            LOGERR(klogErr,
+                rc, "Failure to get '" SZ_L_OPTION "' argument");
+            break;
+        }
+        if (pcount > 0) { /* self->list_kart is not set here! */
+            self->list_kart_sized = true;
+        }
+/******* LIST OPTIONS END ********/
+
+/* ASCP_OPTION */
+        rc = ArgsOptionCount(self->args, ASCP_OPTION, &pcount);
+        if (rc != 0) {
+            LOGERR(klogErr,
+                rc, "Failure to get '" ASCP_OPTION "' argument");
+            break;
+        }
+        if (pcount > 0) {
+            const char *val = NULL;
+            rc = ArgsOptionValue(self->args, ASCP_OPTION, 0, (const void **)&val);
+            if (rc != 0) {
+                LOGERR(klogErr, rc,
+                    "Failure to get '" ASCP_OPTION "' argument value");
+                break;
+            }
+            if (val != NULL) {
+                char *sep = strchr(val, '|');
+                if (sep == NULL) {
+                    rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInvalid);
+                    LOGERR(klogErr, rc,
+             "ascp-path expected in the following format:\n"
+             "--" ASCP_OPTION " \"<ascp-binary|private-key-file>\"\n"
+             "Examples:\n"
+             "--" ASCP_OPTION " \"/usr/bin/ascp|/etc/asperaweb_id_dsa.putty\"\n"
+             "--" ASCP_OPTION " \"C:\\Program Files\\Aspera\\ascp.exe|C:\\Program Files\\Aspera\\etc\\asperaweb_id_dsa.putty\"\n");
+                    break;
+                }
+                else {
+                    self->ascp = string_dup(val, sep - val);
+                    self->asperaKey = string_dup_measure(sep + 1, NULL);
+                    self->ascpChecked = true;
+                }
+            }
+        }
+
+/* ASCP_PAR_OPTION */
+        rc = ArgsOptionCount(self->args, ASCP_PAR_OPTION, &pcount);
+        if (rc != 0) {
+            LOGERR(klogErr,
+                rc, "Failure to get '" ASCP_PAR_OPTION "' argument");
+            break;
+        }
+        if (pcount > 0) {
+            rc = ArgsOptionValue(self->args,
+                ASCP_PAR_OPTION, 0, (const void **)&self->ascpParams);
+            if (rc != 0) {
+                LOGERR(klogErr, rc,
+                    "Failure to get '" ASCP_PAR_OPTION "' argument value");
+                break;
+            }
+        }
+
+/* FAIL_ASCP_OPTION */
+        rc = ArgsOptionCount(self->args, FAIL_ASCP_OPTION, &pcount);
+        if (rc != 0) {
+            LOGERR(klogErr,
+                rc, "Failure to get '" FAIL_ASCP_OPTION "' argument");
+            break;
+        }
+        if (pcount > 0) {
+            self->forceAscpFail = true;
+        }
+
+/* HBEAT_OPTION */
+        rc = ArgsOptionCount(self->args, HBEAT_OPTION, &pcount);
+        if (rc != 0) {
+            LOGERR(klogErr, rc, "Failure to get '" HBEAT_OPTION "' argument");
+            break;
+        }
+
+        if (pcount > 0) {
+            double f;
+            const char *val = NULL;
+            rc = ArgsOptionValue(self->args, HBEAT_OPTION, 0, (const void **)&val);
+            if (rc != 0) {
+                LOGERR(klogErr, rc,
+                    "Failure to get '" HBEAT_OPTION "' argument value");
+                break;
+            }
+            f = atof(val) * 60000;
+            self->heartbeat = (uint64_t)f;
+        }
+
+/* ORDR_OPTION */
+        rc = ArgsOptionCount(self->args, ORDR_OPTION, &pcount);
+        if (rc != 0) {
+            LOGERR(klogErr, rc, "Failure to get '" ORDR_OPTION "' argument");
+            break;
+        }
+
+        if (pcount > 0) {
+            const char *val = NULL;
+            rc = ArgsOptionValue(self->args, ORDR_OPTION, 0, (const void **)&val);
+            if (rc != 0) {
+                LOGERR(klogErr, rc,
+                    "Failure to get '" ORDR_OPTION "' argument value");
+                break;
+            }
+            if (val != NULL && val[0] == 's') {
+                self->order = eOrderSize;
+            }
+            else {
+                self->order = eOrderOrig;
+            }
+        }
+
+/* ROWS_OPTION */
+        rc = ArgsOptionCount(self->args, ROWS_OPTION, &pcount);
+        if (rc != 0) {
+            LOGERR(klogErr,
+                rc, "Failure to get '" ROWS_OPTION "' argument");
+            break;
+        }
+        if (pcount > 0) {
+            rc = ArgsOptionValue(self->args, ROWS_OPTION, 0, (const void **)&self->rows);
+            if (rc != 0) {
+                LOGERR(klogErr, rc,
+                    "Failure to get '" ROWS_OPTION "' argument value");
+                break;
+            }
+        }
+
+/* MINSZ_OPTION */
+        {
+            const char *val = "0";
+            rc = ArgsOptionCount(self->args, MINSZ_OPTION, &pcount);
+            if (rc != 0) {
+                LOGERR(klogErr,
+                    rc, "Failure to get '" MINSZ_OPTION "' argument");
+                break;
+            }
+            if (pcount > 0) {
+                rc = ArgsOptionValue(self->args, MINSZ_OPTION, 0, (const void **)&val);
+                if (rc != 0) {
+                    LOGERR(klogErr, rc,
+                        "Failure to get '" MINSZ_OPTION "' argument value");
+                    break;
+                }
+            }
+            self->minSize = _sizeFromString(val);
+        }
+
+/* SIZE_OPTION */
+        {
+            const char *val = DEFAULT_MAX_FILE_SIZE;
+            rc = ArgsOptionCount(self->args, SIZE_OPTION, &pcount);
+            if (rc != 0) {
+                LOGERR(klogErr,
+                    rc, "Failure to get '" SIZE_OPTION "' argument");
+                break;
+            }
+            if (pcount > 0) {
+                rc = ArgsOptionValue(self->args, SIZE_OPTION, 0, (const void **)&val);
+                if (rc != 0) {
+                    LOGERR(klogErr, rc,
+                        "Failure to get '" SIZE_OPTION "' argument value");
+                    break;
+                }
+            }
+            self->maxSize = _sizeFromString(val);
+            if (self->maxSize == 0) {
+                rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInvalid);
+                LOGERR(klogErr, rc, "Maximum requested file size is zero");
+                break;
+            }
+        }
+
+        if (self->maxSize > 0 && self->minSize > self->maxSize) {
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInvalid);
+            LOGERR(klogErr, rc, "Minimum file size is larger than maximum");
+            break;
+        }
+
+/* TRANS_OPTION */
+        rc = ArgsOptionCount(self->args, TRANS_OPTION, &pcount);
+        if (rc != 0) {
+            LOGERR(klogErr, rc, "Failure to get '" TRANS_OPTION "' argument");
+            break;
+        }
+
+        if (pcount > 0) {
+            bool ok = false;
+            const char *val = NULL;
+            rc = ArgsOptionValue
+                (self->args, TRANS_OPTION, 0, (const void **)&val);
+            if (rc != 0) {
+                LOGERR(klogErr, rc,
+                    "Failure to get '" TRANS_OPTION "' argument value");
+                break;
+            }
+            assert(val);
+            switch (val[0]) {
+                case 'a':
+                case 'f': {
+                    const char ascp[] = "ascp";
+                    const char fasp[] = "fasp";
+                    if (string_cmp(val, string_measure(val, NULL),
+                            ascp, sizeof ascp - 1, sizeof ascp - 1) == 0
+                        ||
+                        string_cmp(val, string_measure(val, NULL),
+                            fasp, sizeof fasp - 1, sizeof fasp - 1) == 0
+                        ||
+                        (val[0] == 'a' && val[1] == '\0'))
+                    {
+                        self->noHttp = true;
+                        ok = true;
+                    }
+                    break;
+                }
+                case 'h': {
+                    const char http[] = "http";
+                    if (string_cmp(val, string_measure(val, NULL),
+                            http, sizeof http - 1, sizeof http - 1) == 0
+                        || val[1] == '\0')
+                    {
+                        self->noAscp = true;
+                        ok = true;
+                    }
+                    break;
+                }
+            }
+            if (!ok) {
+                rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInvalid);
+                LOGERR(klogErr, rc, "Bad '" TRANS_OPTION "' argument value");
+                break;
+            }
+        }
+
+#if ALLOW_STRIP_QUALS
+/* STRIP_QUALS_OPTION */
+        rc = ArgsOptionCount(self->args, STRIP_QUALS_OPTION, &pcount);
+        if (rc != 0) {
+            LOGERR(klogErr, rc, "Failure to get '" STRIP_QUALS_OPTION "' argument");
+            break;
+        }
+        
+        if (pcount > 0) {
+            self->stripQuals = true;
+        }
+#endif
+        
+/* ELIM_QUALS_OPTION */
+        rc = ArgsOptionCount(self->args, ELIM_QUALS_OPTION, &pcount);
+        if (rc != 0) {
+            LOGERR(klogErr, rc, "Failure to get '" ELIM_QUALS_OPTION "' argument");
+            break;
+        }
+        
+        if (pcount > 0) {
+            self->eliminateQuals = true;
+        }
+
+#if ALLOW_STRIP_QUALS
+        if (self->stripQuals && self->eliminateQuals) {
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInvalid);
+            LOGERR(klogErr, rc, "Cannot set both '" STRIP_QUALS_OPTION "' and '" ELIM_QUALS_OPTION "'");
+            break;
+        }
+#endif
+        
+#ifdef _DEBUGGING
+/* TEXTKART_OPTION */
+        rc = ArgsOptionCount(self->args, TEXTKART_OPTION, &pcount);
+        if (rc != 0) {
+            LOGERR(klogErr, rc,
+                "Failure to get '" TEXTKART_OPTION "' argument");
+            break;
+        }
+
+        if (pcount > 0) {
+            const char *val = NULL;
+            rc = ArgsOptionValue(self->args, TEXTKART_OPTION, 0, (const void **)&val);
+            if (rc != 0) {
+                LOGERR(klogErr, rc,
+                    "Failure to get '" TEXTKART_OPTION "' argument value");
+                break;
+            }
+            self->textkart = val;
+        }
+#endif
+    } while (false);
+
+    STSMSG(STS_FIN, ("heartbeat = %ld Milliseconds", self->heartbeat));
+
+    return rc;
+}
+
+const char UsageDefaultName[] = "prefetch";
+rc_t CC UsageSummary(const char *progname) {
+    return OUTMSG((
+        "Usage:\n"
+        "  %s [options] <SRA accession | kart file> [...]\n"
+        "  Download SRA or dbGaP files and their dependencies\n"
+        "\n"
+        "  %s [options] <SRA file> [...]\n"
+        "  Check SRA file for missed dependencies "
+                                           "and download them\n"
+        "\n"
+        "  %s --list <kart file> [...]\n"
+        "  List the content of a kart file\n"
+        , progname, progname, progname));
+}
+
+rc_t CC Usage(const Args *args) {
+    rc_t rc = 0;
+    int i = 0;
+
+    const char *progname = UsageDefaultName;
+    const char *fullpath = UsageDefaultName;
+
+    if (args == NULL) {
+        rc = RC(rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
+    }
+    else {
+        rc = ArgsProgram(args, &fullpath, &progname);
+    }
+    if (rc != 0) {
+        progname = fullpath = UsageDefaultName;
+    }
+
+    UsageSummary(progname);
+    OUTMSG(("\n"));
+
+    OUTMSG(("Options:\n"));
+    for (i = 0; i < sizeof(Options) / sizeof(Options[0]); i++ ) {
+        const char *param = NULL;
+
+        if (Options[i].aliases != NULL) {
+            if (strcmp(Options[i].aliases, FAIL_ASCP_ALIAS) == 0) {
+                continue; /* debug option */
+            }
+            if (strcmp(Options[i].aliases, ASCP_ALIAS) == 0) {
+                param = "ascp-binary|private-key-file";
+            }
+            else if (strcmp(Options[i].aliases, FORCE_ALIAS) == 0 ||
+                strcmp(Options[i].aliases, HBEAT_ALIAS) == 0 ||
+                strcmp(Options[i].aliases, HBEAT_ALIAS) == 0 ||
+                strcmp(Options[i].aliases, ORDR_ALIAS) == 0 ||
+                strcmp(Options[i].aliases, TRASN_ALIAS) == 0)
+            {
+                param = "value";
+            }
+            else if (strcmp(Options[i].aliases, ROWS_ALIAS) == 0) {
+                param = "rows";
+            }
+            else if (strcmp(Options[i].aliases, SIZE_ALIAS) == 0
+                  || strcmp(Options[i].aliases, MINSZ_ALIAS) == 0)
+            {
+                param = "size";
+            }
+        }
+        else if (strcmp(Options[i].name, ASCP_PAR_OPTION) == 0) {
+            param = "value";
+        }
+#ifdef _DEBUGGING
+        else if (strcmp(Options[i].name, TEXTKART_OPTION) == 0) {
+            param = "value";
+        }
+#endif
+
+        if (Options[i].aliases != NULL &&
+            (strcmp(Options[i].aliases, TRASN_ALIAS) == 0 ||
+             strcmp(Options[i].aliases, CHECK_ALL_ALIAS) == 0))
+        {
+            OUTMSG(("\n"));
+        }
+
+        HelpOptionLine(Options[i].aliases, Options[i].name,
+            param, Options[i].help);
+    }
+
+    OUTMSG(("\n"));
+    HelpOptionsStandard();
+    HelpVersion(fullpath, KAppVersion());
+
+    return rc;
+}
+
+/******************************************************************************/
+
+/********** KartTreeNode **********/
+static void CC bstKrtWhack(BSTNode *n, void *ignore) {
+    KartTreeNode *sn = (KartTreeNode*) n;
+
+    assert(sn);
+
+    ItemRelease(sn->i);
+
+    memset(sn, 0, sizeof *sn);
+
+    free(sn);
+}
+
+static int64_t CC bstKrtSort(const BSTNode *item, const BSTNode *n) {
+    const KartTreeNode *sn1 = (const KartTreeNode*)item;
+    const KartTreeNode *sn2 = (const KartTreeNode*)n;
+
+    assert(sn1 && sn2 && sn1->i && sn2->i);
+
+    if (sn1->i->resolved.remoteSz < sn2->i->resolved.remoteSz)
+        return -1;
+    else if (sn1->i->resolved.remoteSz > sn2->i->resolved.remoteSz)
+        return 1;
+
+    return 0;
+}
+
+static void CC bstKrtDownload(BSTNode *n, void *data) {
+    rc_t rc = 0;
+
+    const KartTreeNode *sn = (const KartTreeNode*) n;
+    assert(sn && sn->i);
+
+    rc = ItemDownload(sn->i);
+
+    if (rc == 0) {
+        rc = ItemPostDownload(sn->i, sn->i->number);
+    }
+}
+
+/*********** Finalize Main object **********/
+static rc_t MainFini(Main *self) {
+    rc_t rc = 0;
+
+    assert(self);
+
+    RELEASE(KConfig, self->cfg);
+    RELEASE(VResolver, self->resolver);
+    RELEASE(VDBManager, self->mgr);
+    RELEASE(KDirectory, self->dir);
+    RELEASE(KRepositoryMgr, self->repoMgr);
+    RELEASE(KNSManager, self->kns);
+    RELEASE(VFSManager, self->vfsMgr);
+    RELEASE(Args, self->args);
+
+    BSTreeWhack(&self->downloaded, bstWhack, NULL);
+
+    free(self->buffer);
+
+    free((void*)self->ascp);
+    free((void*)self->asperaKey);
+    free(self->ascpMaxRate);
+
+    memset(self, 0, sizeof *self);
+
+    return rc;
+}
+
+/*********** Initialize Main object **********/
+static rc_t MainInit(int argc, char *argv[], Main *self) {
+    rc_t rc = 0;
+
+    assert(self);
+    memset(self, 0, sizeof *self);
+
+    self->heartbeat = 60000;
+/*  self->heartbeat = 69; */
+
+    BSTreeInit(&self->downloaded);
+
+    if (rc == 0) {
+        rc = MainProcessArgs(self, argc, argv);
+    }
+
+    if (rc == 0) {
+        self->bsize = 1024 * 1024;
+        self->buffer = malloc(self->bsize);
+        if (self->buffer == NULL) {
+            rc = RC(rcExe, rcData, rcAllocating, rcMemory, rcExhausted);
+        }
+    }
+
+    if (rc == 0) {
+        rc = VFSManagerMake(&self->vfsMgr);
+        DISP_RC(rc, "VFSManagerMake");
+    }
+
+    if ( rc == 0 )
+    {
+        rc = VFSManagerGetKNSMgr (self->vfsMgr, & self->kns);
+        DISP_RC(rc, "VFSManagerGetKNSMgr");
+    }
+
+    if (rc == 0) {
+        VResolver *resolver = NULL;
+        rc = VFSManagerGetResolver(self->vfsMgr, &resolver);
+        DISP_RC(rc, "VFSManagerGetResolver");
+        VResolverRemoteEnable(resolver, vrAlwaysEnable);
+        VResolverCacheEnable(resolver, vrAlwaysEnable);
+        RELEASE(VResolver, resolver);
+    }
+
+    if (rc == 0) {
+        rc = KConfigMake(&self->cfg, NULL);
+        DISP_RC(rc, "KConfigMake");
+    }
+
+    if (rc == 0) {
+        rc = KConfigMakeRepositoryMgrRead(self->cfg, &self->repoMgr);
+        DISP_RC(rc, "KConfigMakeRepositoryMgrRead");
+    }
+
+    if (rc == 0) {
+        rc = VFSManagerMakeResolver(self->vfsMgr, &self->resolver, self->cfg);
+        DISP_RC(rc, "VFSManagerMakeResolver");
+    }
+
+    if (rc == 0) {
+        VResolverRemoteEnable(self->resolver, vrAlwaysEnable);
+        VResolverCacheEnable(self->resolver, vrAlwaysEnable);
+    }
+
+    if (rc == 0) {
+        rc = VDBManagerMakeRead(&self->mgr, NULL);
+        DISP_RC(rc, "VDBManagerMakeRead");
+    }
+
+    if (rc == 0) {
+        rc = KDirectoryNativeDir(&self->dir);
+        DISP_RC(rc, "KDirectoryNativeDir");
+    }
+
+    if (rc == 0) {
+        srand((unsigned)time(NULL));
+    }
+
+    return rc;
+}
+
+/*********** Process one command line argument **********/
+static rc_t MainRun(Main *self, const char *arg, const char *realArg) {
+    ERunType type = eRunTypeDownload;
+    rc_t rc = 0;
+    Iterator it;
+    assert(self && realArg);
+    memset(&it, 0, sizeof it);
+
+    if (rc == 0) {
+        rc = IteratorInit(&it, arg, self);
+    }
+
+    if (self->list_kart_sized) {
+        type = eRunTypeList;
+    }
+    else if (self->order == eOrderSize) {
+        if (rc == 0 && it.kart == NULL) {
+            type = eRunTypeDownload;
+        }
+        else {
+            type = eRunTypeGetSize;
+        }
+    }
+    else {
+        type = eRunTypeDownload;
+    }
+
+    if (rc == 0) {
+        BSTree trKrt;
+        BSTreeInit(&trKrt);
+        if (self->list_kart) {
+            if (it.kart != NULL) {
+                if (self->list_kart_numbered) {
+                    rc = KartPrintNumbered(it.kart);
+                }
+                else {
+                    rc = KartPrint(it.kart);
+                }
+            }
+            else {
+                PLOGMSG(klogWarn, (klogWarn,
+                    "'$(F)' is invalid or not a kart file",
+                    "F=%s", realArg));
+            }
+        }
+        else {
+            size_t total = 0;
+            const char *row = self->rows;
+            int64_t n = 1;
+            NumIterator nit;
+            NumIteratorInit(&nit, row);
+            if (type == eRunTypeList) {
+                self->maxSize = ~0;
+                if (it.kart != NULL) {
+                    OUTMSG((
+                      "row\tproj-id|item-id|accession|name|item-desc\tsize\n"));
+                }
+            }
+            else {
+                if (it.kart != NULL) {
+                    OUTMSG(("Downloading kart file '%s'\n", realArg));
+                    if (type == eRunTypeGetSize) {
+                        OUTMSG(("Checking sizes of kart files...\n"));
+                    }
+                }
+                OUTMSG(("\n"));
+            }
+
+            for (n = 1; ; ++n) {
+                rc_t rc2 = 0;
+                rc_t rc3 = 0;
+                bool done = false;
+                Item *item = NULL;
+                rc_t rcq = Quitting();
+                if (rcq != 0) {
+                    if (rc == 0) {
+                        rc = rcq;
+                    }
+                    break;
+                }
+                rc2 = IteratorNext(&it, &item, &done);
+                if (rc2 != 0 || done) {
+                    if (rc == 0 && rc2 != 0) {
+                        rc = rc2;
+                    }
+                    break;
+                }
+                done = ! NumIteratorNext(&nit, n);
+                if (done) {
+                    break;
+                }
+                if (!nit.skip) {
+                    item->main = self;
+                    ResolvedReset(&item->resolved, type);
+
+                    rc3 = ItemProcess(item, (int32_t)n);
+                    if (rc3 != 0) {
+                        if (rc == 0) {
+                            rc = rc3;
+                        }
+                    }
+                    else {
+                        if (item->resolved.undersized &&
+                            type == eRunTypeGetSize)
+                        {
+                            STSMSG(STS_TOP,
+               ("%d) '%s' (%,zu KB) is smaller than minimum allowed: skipped\n",
+                n, item->resolved.name, item->resolved.remoteSz / 1024));
+                        }
+                        else if (item->resolved.oversized &&
+                             type == eRunTypeGetSize)
+                        {
+                            logMaxSize(self->maxSize);
+                            logBigFile(n, item->resolved.name,
+                                          item->resolved.remoteSz);
+                        }
+                        else {
+                            total += item->resolved.remoteSz;
+
+                            if (item != NULL) {
+                                if (type == eRunTypeGetSize) {
+                                    KartTreeNode *sn = calloc(1, sizeof *sn);
+                                    if (sn == NULL) {
+                                        return RC(rcExe, rcStorage,
+                                           rcAllocating, rcMemory, rcExhausted);
+                                    }
+                                    if (item->resolved.remoteSz == 0) {
+                                        /* remoteSz is unknown:
+                     add it to the end of download list preserving kart order */
+                                        item->resolved.remoteSz
+                                            = (~0ul >> 1) + n + 1;
+                                    }
+                                    sn->i = item;
+                                    item = NULL;
+                                    BSTreeInsert(&trKrt, (BSTNode*)sn,
+                                        bstKrtSort);
+                                }
+                            }
+                        }
+                    }
+                }
+
+                RELEASE(Item, item);
+            }
+
+            if (type == eRunTypeList) {
+                if (it.kart != NULL && total > 0) {
+                    OUTMSG(("--------------------\ntotal\t%,zuB\n\n", total));
+                }
+            }
+            else if (type == eRunTypeGetSize) {
+                OUTMSG(("\nDownloading the files...\n\n", realArg));
+                BSTreeForEach(&trKrt, false, bstKrtDownload, NULL);
+            }
+        }
+        BSTreeWhack(&trKrt, bstKrtWhack, NULL);
+    }
+    if (it.isKart) {
+        if (self->list_kart) {
+            rc_t rc2 = OUTMSG(("\n"));
+            if (rc2 != 0 && rc == 0) {
+                rc = rc2;
+            }
+        }
+        else if (rc == 0) {
+            uint16_t number = 0;
+            rc = KartItemsProcessed(it.kart, &number);
+            if (rc == 0 && number == 0) {
+                PLOGMSG(klogWarn, (klogWarn,
+                    "kart file '$(F)' is empty", "F=%s", realArg));
+            }
+        }
+    }
+    IteratorFini(&it);
+
+    return rc;
+}
+
+/*********** Main **********/
+rc_t CC KMain(int argc, char *argv[]) {
+    rc_t rc = 0;
+    uint32_t pcount = 0;
+
+    Main pars;
+    rc = MainInit(argc, argv, &pars);
+
+    if (rc == 0) {
+        rc = ArgsParamCount(pars.args, &pcount);
+    }
+    if (rc == 0 && pcount == 0) {
+#ifdef _DEBUGGING
+        if (!pars.textkart)
+#endif
+          rc = UsageSummary(UsageDefaultName);
+    }
+
+    if (rc == 0) {
+        uint32_t i = ~0;
+
+#ifdef _DEBUGGING
+        if (pars.textkart) {
+            rc = MainRun(&pars, NULL, pars.textkart);
+        }
+#endif
+
+        for (i = 0; i < pcount; ++i) {
+            const char *obj = NULL;
+            rc_t rc2 = ArgsParamValue(pars.args, i, (const void **)&obj);
+            DISP_RC(rc2, "ArgsParamValue");
+            if (rc2 == 0) {
+                rc2 = MainRun(&pars, obj, obj);
+                if (rc2 != 0 && rc == 0) {
+                    rc = rc2;
+                }
+            }
+        }
+
+        if (pars.undersized || pars.oversized) {
+            OUTMSG(("\n"));
+            if (pars.undersized) {
+                OUTMSG((
+               "Download of some files was skipped because they are too small\n"
+                ));
+            }
+            if (pars.oversized) {
+                OUTMSG((
+               "Download of some files was skipped because they are too large\n"
+                ));
+            }
+            OUTMSG((
+               "You can change size download limit by setting\n"
+             "--" MINSZ_OPTION " and --" SIZE_OPTION " command line arguments\n"
+            ));
+        }
+    }
+
+    {
+        rc_t rc2 = MainFini(&pars);
+        if (rc2 != 0 && rc == 0) {
+            rc = rc2;
+        }
+    }
+
+    return rc;
+}
diff --git a/tools/qual-recalib-stat/.gitignore b/tools/qual-recalib-stat/.gitignore
new file mode 100644
index 0000000..c1e9d15
--- /dev/null
+++ b/tools/qual-recalib-stat/.gitignore
@@ -0,0 +1,3 @@
+*.sh
+*.txt
+stat-table
diff --git a/tools/qual-recalib-stat/Makefile b/tools/qual-recalib-stat/Makefile
new file mode 100644
index 0000000..598a156
--- /dev/null
+++ b/tools/qual-recalib-stat/Makefile
@@ -0,0 +1,84 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/qual-recalib-stat
+
+INT_TOOLS = \
+	qual-recalib-stat
+
+EXT_TOOLS = \
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# vdb-config
+#
+Q_RECAL_STAT_SRC = \
+	namelist_tools \
+	context \
+	columns \
+	ref_exclude \
+	spot_position \
+	stat_mod_2 \
+	reader \
+	writer \
+	qual-recalib-stat
+
+Q_RECAL_STAT_OBJ = \
+	$(addsuffix .$(OBJX),$(Q_RECAL_STAT_SRC))
+
+Q_RECAL_STAT_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-wvdb \
+	-lm
+
+$(BINDIR)/qual-recalib-stat: $(Q_RECAL_STAT_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(Q_RECAL_STAT_LIB)
diff --git a/tools/qual-recalib-stat/columns.c b/tools/qual-recalib-stat/columns.c
new file mode 100644
index 0000000..d606822
--- /dev/null
+++ b/tools/qual-recalib-stat/columns.c
@@ -0,0 +1,94 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include "columns.h"
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <klib/log.h>
+
+rc_t add_column( const VCursor *cursor, col *column, const char *name )
+{
+    rc_t rc = VCursorAddColumn ( cursor, &column->idx, "%s", name );
+    if ( rc != 0 )
+        PLOGERR( klogInt, ( klogInt, rc, 
+                            "VCursorAddColumn($(name)) failed", "name=%s", name ) );
+    return rc;
+}
+
+
+rc_t add_columns( const VCursor *cursor,
+                  col *columns, const char **names, uint32_t n_columns )
+{
+    rc_t rc = 0;
+    uint32_t idx;
+
+    for ( idx = 0; idx < n_columns && rc == 0; ++idx )
+    {
+        rc = add_column( cursor, &columns[ idx ], names[ idx ] );
+    }
+    return rc;
+}
+
+
+rc_t read_cell( const VCursor *my_cursor,
+                int64_t row_id,
+                col *column,
+                const char * name )
+{
+    rc_t rc = VCursorCellDataDirect ( my_cursor, row_id,
+            column->idx, &column->elem_bits, &column->base,
+            &column->bit_offset, &column->row_len );
+    if ( rc != 0 )
+        PLOGERR( klogInt, ( klogInt, rc, 
+                            "VCursorCellDataDirect($(name),$(rowid)) failed", 
+                            "name=%s,rowid=%lu", name, row_id ) );
+    return rc;
+}
+
+
+rc_t read_cells( const VCursor *my_cursor, int64_t row_id,
+                 col *columns, const char **names, uint32_t n_columns )
+{
+    rc_t rc = 0;
+    uint32_t idx;
+
+    for ( idx = 0; idx < n_columns && rc == 0; ++idx )
+    {
+        rc = read_cell( my_cursor, row_id, &columns[ idx ], names[ idx ] );
+    }
+    return rc;
+}
+
+
+rc_t write_to_cursor( VCursor * cursor, uint32_t idx, uint32_t bsize,
+                      void * src, uint32_t count, const char * name )
+{
+    rc_t rc = VCursorWrite( cursor, idx, bsize, src, 0, count );
+    if ( rc != 0 )
+        PLOGERR( klogInt, ( klogInt, rc, 
+                            "VCursorWrite($(name)) failed", "name=%s", name ) );
+    return rc;
+}
diff --git a/tools/qual-recalib-stat/columns.h b/tools/qual-recalib-stat/columns.h
new file mode 100644
index 0000000..44e85c5
--- /dev/null
+++ b/tools/qual-recalib-stat/columns.h
@@ -0,0 +1,67 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_columns_
+#define _h_columns_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <klib/rc.h>
+#include <vdb/cursor.h>
+
+typedef struct col
+{
+    uint32_t idx;
+    uint32_t elem_bits;
+    uint32_t bit_offset;
+    uint32_t row_len;
+    const void * base;
+} col;
+
+
+rc_t add_column( const VCursor *cursor, col *column, const char *name );
+
+rc_t add_columns( const VCursor *cursor,
+                  col *columns, const char **names, uint32_t n_columns );
+
+rc_t read_cell( const VCursor *my_cursor,
+                int64_t row_id,
+                col *column,
+                const char * name );
+
+rc_t read_cells( const VCursor *my_cursor, int64_t row_id,
+                 col *columns, const char **names, uint32_t n_columns );
+
+rc_t write_to_cursor( VCursor * cursor, uint32_t idx, uint32_t bsize,
+                      void * src, uint32_t count, const char * name );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/qual-recalib-stat/context.c b/tools/qual-recalib-stat/context.c
new file mode 100644
index 0000000..0eb462a
--- /dev/null
+++ b/tools/qual-recalib-stat/context.c
@@ -0,0 +1,330 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "context.h"
+#include <sysalloc.h>
+#include <stdlib.h>
+
+
+/*
+ * helper-function to set a string inside the context
+ * ( makes a copy ) with error detection
+*/
+static rc_t context_set_str( char **dst, const char *src )
+{
+    size_t len;
+    if ( dst == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+
+    if ( *dst != NULL )
+    {
+        free( *dst );
+        *dst = NULL;
+    }
+    if ( src == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+
+    *dst = string_dup_measure ( src, &len );
+ 
+    if ( len == 0 )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcItem, rcEmpty );
+    if ( *dst == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcMemory, rcExhausted );
+    return 0;
+}
+
+
+/*
+ * generates a new context, initializes values
+*/
+rc_t context_init( context **ctx )
+{
+    rc_t rc;
+
+    if ( ctx == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    (*ctx) = (p_context)calloc( 1, sizeof **ctx );
+    if ( *ctx == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+
+    /* because of calloc the context is zero'd out
+       default-values can be set here: */
+
+    rc = num_gen_make( &((*ctx)->row_generator) );
+    if ( rc != 0 )
+        OUTMSG(( "num_gen_make() failed %r\n", rc ));
+    return rc;
+}
+
+
+/*
+ * destroys a context, frees all pointers the context owns
+*/
+rc_t context_destroy( p_context ctx )
+{
+    if ( ctx == NULL )
+        return RC( rcVDB, rcNoTarg, rcDestroying, rcParam, rcNull );
+
+    if ( ctx->src_path != NULL )
+    {
+        free( (void*)ctx->src_path );
+        ctx->src_path = NULL;
+    }
+    if ( ctx->output_file_path != NULL )
+    {
+        free( (void*)ctx->output_file_path );
+        ctx->output_file_path = NULL;
+    }
+    if ( ctx->output_mode != NULL )
+    {
+        free( (void*)ctx->output_mode );
+        ctx->output_mode = NULL;
+    }
+    if ( ctx->src_schema_list != NULL )
+    {
+        KNamelistRelease( ctx->src_schema_list );
+        ctx->src_schema_list = NULL;
+    }
+    num_gen_destroy( ctx->row_generator );
+    free( ctx );
+    return 0;
+}
+
+
+/*
+ * clear's the number-generator and sets the given intervall
+*/
+rc_t context_set_range( p_context ctx, 
+                        const int64_t first, const uint64_t count )
+{
+    rc_t rc = num_gen_clear( ctx->row_generator );
+    if ( rc == 0 )
+        rc = num_gen_add( ctx->row_generator, first, count );
+    return rc;
+}
+
+
+/*
+ * performs the range check to trim the internal number
+ * generator to the given range
+*/
+rc_t context_range_check( p_context ctx, 
+                          const int64_t first, const uint64_t count )
+{
+    return num_gen_range_check( ctx->row_generator, first, count );
+}
+
+
+/*
+ * helper-function to set the source-path
+*/
+static rc_t context_set_src_path( p_context ctx, const char *src )
+{
+    return context_set_str( (char**)&(ctx->src_path), src );
+}
+
+/*
+ * helper-function to set the output-path
+*/
+static rc_t context_set_out_file_path( p_context ctx, const char *src )
+{
+    return context_set_str( (char**)&(ctx->output_file_path), src );
+}
+
+
+/*
+ * helper-function to set the output-mode
+*/
+static rc_t context_set_out_mode( p_context ctx, const char *src )
+{
+    return context_set_str( (char**)&(ctx->output_mode), src );
+}
+
+
+/*
+ * helper-function to set path to exclude-db
+*/
+static rc_t context_set_exclude_path( p_context ctx, const char *src )
+{
+    return context_set_str( (char**)&(ctx->exclude_file_path), src );
+}
+
+
+static rc_t context_set_row_range( p_context ctx, const char *src )
+{
+    if ( ( ctx == NULL )||( src == NULL ) )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    return num_gen_parse( ctx->row_generator, src );
+}
+
+
+static bool context_check_if_usage_necessary( p_context ctx )
+{
+    if ( ctx == NULL ) return false;
+    if ( ctx->src_path == NULL )
+        ctx->usage_requested = true;
+    return ctx->usage_requested;
+}
+
+
+static rc_t context_evaluate_arguments( const Args *my_args, p_context ctx )
+{
+    uint32_t count, idx;
+    
+    rc_t rc = ArgsParamCount( my_args, &count );
+    if ( rc != 0 )
+    {
+        OUTMSG(( "ArgsParamCount() failed %R\n", rc ));
+        return rc;
+    }
+
+    for ( idx = 0; idx < count && rc == 0; ++idx )
+    {
+        const char *value = NULL;
+        rc = ArgsParamValue( my_args, idx, (const void **)&value );
+        if ( rc != 0 )
+        {
+            OUTMSG(( "ArgsParamValue() failed %R\n", rc ));
+        }
+        else
+        {
+            switch( idx )
+            {
+            case 0 : rc = context_set_src_path( ctx, value );
+                     if ( rc != 0 )
+                        OUTMSG(( "context_set_src_path() failed %R\n", rc ));
+                     break;
+            }
+        }
+    }
+    return rc;
+}
+
+
+static bool context_get_bool_option( const Args *my_args,
+                                     const char *name,
+                                     const bool def )
+{
+    bool res = def;
+    uint32_t count = 0;
+    rc_t rc = ArgsOptionCount( my_args, name, &count );
+    if ( rc == 0 && count > 0 )
+        res = true;
+    return res;
+}
+
+
+static const char* context_get_str_option( const Args *my_args,
+                                           const char *name )
+{
+    const char* res = NULL;
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( my_args, name, &count );
+    if ( ( rc == 0 )&&( count > 0 ) )
+    {
+        rc = ArgsOptionValue( my_args, name, 0, (const void **)&res );
+    }
+    return res;
+}
+
+
+static uint32_t context_get_int_option( const Args *my_args,
+                                        const char *name,
+                                        const uint32_t def )
+{
+    uint32_t count, res = def;
+    rc_t rc = ArgsOptionCount( my_args, name, &count );
+    if ( ( rc == 0 )&&( count > 0 ) )
+    {
+        const char *s;
+        rc = ArgsOptionValue( my_args, name, 0,  (const void **)&s );
+        if ( rc == 0 ) res = atoi( s );
+    }
+    return res;
+}
+
+
+/*
+ * returns the number of schema's given on the commandline
+*/
+uint32_t context_schema_count( p_context ctx )
+{
+    uint32_t res = 0;
+    if ( ctx != NULL )
+        if ( ctx->src_schema_list != 0 )
+        {
+            uint32_t count;
+            if ( KNamelistCount( ctx->src_schema_list, &count ) == 0 )
+                res = count;
+        }
+    return res;
+}
+
+
+static void context_evaluate_options( const Args *my_args, p_context ctx )
+{
+    if ( my_args == NULL ) return;
+    if ( ctx == NULL ) return;
+
+    ctx->show_progress = context_get_bool_option( my_args, OPTION_SHOW_PROGRESS, false );
+    ctx->info = context_get_bool_option( my_args, OPTION_INFO, false );
+    ctx->ignore_mismatch = context_get_bool_option( my_args, OPTION_IGNORE_MISMATCH, false );
+    context_set_row_range( ctx, context_get_str_option( my_args, OPTION_ROWS ) );
+    nlt_make_namelist_from_string( &(ctx->src_schema_list), 
+                                   context_get_str_option( my_args, OPTION_SCHEMA ) );
+    context_set_out_file_path( ctx, context_get_str_option( my_args, OPTION_OUTFILE ) );
+    context_set_out_mode( ctx, context_get_str_option( my_args, OPTION_OUTMODE ) );
+    if ( ctx->output_mode == NULL )
+        context_set_out_mode( ctx, "file" );
+    ctx->gc_window = context_get_int_option( my_args, OPTION_GCWINDOW, 7 );
+    context_set_exclude_path( ctx, context_get_str_option( my_args, OPTION_EXCLUDE ) );
+}
+
+
+/*
+ * reads all arguments and options, fills the context
+ * with copies (if strings) of this data
+*/
+rc_t context_capture_arguments_and_options( const Args * args, p_context ctx )
+{
+    rc_t rc;
+
+    rc = context_evaluate_arguments( args, ctx );
+    if ( rc != 0 )
+    {
+        OUTMSG(( "context_evaluate_arguments() failed %R\n", rc ));
+    }
+    else
+    {
+        context_evaluate_options( args, ctx );
+        context_check_if_usage_necessary( ctx );
+
+        rc = ArgsHandleLogLevel( args );
+        if ( rc != 0 )
+            OUTMSG(( "ArgsHandleLogLevel() failed %R\n", rc ));
+    }
+    return rc;
+}
diff --git a/tools/qual-recalib-stat/context.h b/tools/qual-recalib-stat/context.h
new file mode 100644
index 0000000..cfb7ad2
--- /dev/null
+++ b/tools/qual-recalib-stat/context.h
@@ -0,0 +1,120 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_context_
+#define _h_context_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <kapp/args.h>
+#include <klib/namelist.h>
+#include <klib/out.h>
+#include <klib/num-gen.h>
+#include "namelist_tools.h"
+
+#define OPTION_ROWS              "rows"
+#define OPTION_SCHEMA            "schema"
+#define OPTION_SHOW_PROGRESS     "show_progress"
+#define OPTION_OUTFILE           "output_file"
+#define OPTION_OUTMODE           "mode"
+#define OPTION_GCWINDOW          "gcwindow"
+#define OPTION_EXCLUDE           "exclude"
+#define OPTION_INFO              "info"
+#define OPTION_IGNORE_MISMATCH   "ignore_mismatch"
+
+#define ALIAS_ROWS              "R"
+#define ALIAS_SCHEMA            "S"
+#define ALIAS_SHOW_PROGRESS     "p"
+#define ALIAS_OUTFILE           "o"
+#define ALIAS_OUTMODE           "m"
+#define ALIAS_GCWINDOW          "g"
+#define ALIAS_EXCLUDE           "x"
+#define ALIAS_INFO              "i"
+#define ALIAS_IGNORE_MISMATCH   "n"
+
+/* *******************************************************************
+the context contains all informations needed to execute the run
+******************************************************************* */
+typedef struct context
+{
+    /* read from commandline */
+    char *src_path;
+    char *output_file_path;
+    char *output_mode;
+    char *exclude_file_path;
+    const KNamelist *src_schema_list;
+    struct num_gen * row_generator;
+    bool usage_requested;
+    bool show_progress;
+    bool info;
+    bool ignore_mismatch;
+    uint32_t gc_window;
+} context;
+typedef context* p_context;
+
+
+/*
+ * generates a new context, initializes values
+*/
+rc_t context_init( context **ctx );
+
+
+/*
+ * destroys a context, frees all pointers the context owns
+*/
+rc_t context_destroy( p_context ctx );
+
+
+/*
+ * performs the range check to trim the internal number
+ * generator to the given range
+*/
+rc_t context_range_check( p_context ctx, 
+                          const int64_t first, const uint64_t count );
+
+
+rc_t context_set_range( p_context ctx, 
+                        const int64_t first, const uint64_t count );
+
+/*
+ * returns the number of schema's given on the commandline
+*/
+uint32_t context_schema_count( p_context ctx );
+
+
+/*
+ * reads all arguments and options, fills the context
+ * with copies (if strings) of this data
+*/
+rc_t context_capture_arguments_and_options( const Args * args, p_context ctx );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/qual-recalib-stat/fasta_dump.pl b/tools/qual-recalib-stat/fasta_dump.pl
new file mode 100755
index 0000000..25c9c0a
--- /dev/null
+++ b/tools/qual-recalib-stat/fasta_dump.pl
@@ -0,0 +1,81 @@
+#!/usr/bin/perl -w
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+use File::Path;
+
+my $nargs = scalar @ARGV;
+
+if ( $nargs < 2  )
+{
+    print( "\n-------------------------------------------------------------------------\n" );
+    print( "USAGE: fasta_dump.pl src bases\n" );
+    print( "src   ... absolute-path to a reference-table\n" );
+    print( "bases ... how many bases to dump\n" );
+    print( "-------------------------------------------------------------------------\n\n" );
+}
+else
+{
+    my $ref = $ARGV[ 0 ];
+    my $cnt = $ARGV[ 1 ];
+    my $len = 79;
+    my ( $n_rows, $cmd, $row, $s, $line );
+
+    #calculate how many rows have to be dumped...
+    {
+        use integer;
+        $n_rows = ( $cnt / 5000 ) + 1;
+    }
+
+    #dump the sequence-name
+    $cmd = "vdb-dump $ref -C SEQ_ID -f csv -R 1";
+    open ( DUMP, "-|", "$cmd" ) or die "$cmd failed";
+    while ( ( $row = <DUMP> ), defined( $row ) )
+    {
+        chomp( $row );
+        print( ">$row\n" );
+    }
+    close ( DUMP );
+
+    #dump the rows
+    $cmd = "vdb-dump $ref -C READ -f tab -R 1-$n_rows";
+    open ( DUMP, "-|", "$cmd" ) or die "$cmd failed";
+    while ( ( $row = <DUMP> ), defined( $row ) )
+    {
+        chomp( $row );
+        $s .= $row;
+        while( length( $s ) >= $len )
+        {
+            $line = substr( $s, 0, $len, "" );
+            print( "$line\n" );
+
+        }
+    }
+    close ( DUMP );
+
+    #dump the remainder of bases
+    if ( length( $s ) > 0 )
+    {
+        print( "$s\n" );
+    }
+}
\ No newline at end of file
diff --git a/tools/qual-recalib-stat/namelist_tools.c b/tools/qual-recalib-stat/namelist_tools.c
new file mode 100644
index 0000000..270449b
--- /dev/null
+++ b/tools/qual-recalib-stat/namelist_tools.c
@@ -0,0 +1,187 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include "namelist_tools.h"
+
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+
+int nlt_strcmp( const char* s1, const char* s2 )
+{
+    size_t n1 = string_size ( s1 );
+    size_t n2 = string_size ( s2 );
+    return string_cmp ( s1, n1, s2, n2, ( n1 < n2 ) ? n2 : n1 );
+}
+
+
+rc_t nlt_make_namelist_from_string( const KNamelist **list, const char * src )
+{
+    VNamelist *v_names;
+    rc_t rc = VNamelistMake ( &v_names, 5 );
+    if ( rc == 0 )
+    {
+        char * s = string_dup_measure ( src, NULL );
+        if ( s )
+        {
+            uint32_t str_begin = 0;
+            uint32_t str_end = 0;
+            char c;
+            do
+            {
+                c = s[ str_end ];
+                if ( c == ',' || c == 0 )
+                {
+                    if ( str_begin < str_end )
+                    {
+                        char c_temp = c;
+                        s[ str_end ] = 0;
+                        rc = VNamelistAppend ( v_names, &(s[str_begin]) );
+                        s[ str_end ] = c_temp;
+                    }
+                    str_begin = str_end + 1;
+                }
+                str_end++;
+            } while ( c != 0 && rc == 0 );
+            free( s );
+        }
+        rc = VNamelistToConstNamelist ( v_names, list );
+        VNamelistRelease( v_names );
+    }
+    return rc;
+}
+
+bool nlt_is_name_in_namelist( const KNamelist *list,
+                             const char *name_to_find )
+{
+    uint32_t count, idx;
+    bool res = false;
+    if ( list == NULL || name_to_find == NULL )
+        return res;
+    if ( KNamelistCount( list, &count ) == 0 )
+    {
+        for ( idx = 0; idx < count && res == false; ++idx )
+        {
+            const char *item_name;
+            if ( KNamelistGet( list, idx, &item_name ) == 0 )
+            {
+                if ( nlt_strcmp( item_name, name_to_find ) == 0 )
+                    res = true;
+            }
+        }
+    }
+    return res;
+}
+
+/*
+    - list1 and list2 containts strings
+    - if one of the strings in list2 is contained ( partial match, strstr() )
+      in one of the strings in list1 the function returns true...
+*/
+bool nlt_namelist_intersect( const KNamelist *list1, const KNamelist *list2 )
+{
+    uint32_t count1;
+    bool res = false;
+    if ( list1 == NULL || list2 == NULL )
+        return res;
+    if ( KNamelistCount( list1, &count1 ) == 0 )
+    {
+        uint32_t idx1;
+        for ( idx1 = 0; idx1 < count1 && res == false; ++idx1 )
+        {
+            const char *string1;
+            if ( KNamelistGet( list1, idx1, &string1 ) == 0 )
+            {
+                uint32_t count2;
+                if ( KNamelistCount( list2, &count2 ) == 0 )
+                {
+                    uint32_t idx2;
+                    for ( idx2 = 0; idx2 < count2 && res == false; ++idx2 )
+                    {
+                        const char *string2;
+                        if ( KNamelistGet( list2, idx2, &string2 ) == 0 )
+                        {
+                            if ( strstr( string1, string2 ) != NULL )
+                                res = true;
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return res;
+}
+
+rc_t nlt_remove_names_from_namelist( const KNamelist *source,
+            const KNamelist **dest, const KNamelist *to_remove )
+{
+    rc_t rc = 0;
+    uint32_t count;
+    
+    if ( source == NULL || dest == NULL || to_remove == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    *dest = NULL;
+    rc = KNamelistCount( source, &count );
+    if ( rc == 0 && count > 0 )
+    {
+        VNamelist *cleaned;
+        rc = VNamelistMake ( &cleaned, count );
+        if ( rc == 0 )
+        {
+            uint32_t idx;
+            for ( idx = 0; idx < count && rc == 0; ++idx )
+            {
+                const char *s;
+                rc = KNamelistGet( source, idx, &s );
+                if ( rc == 0 )
+                {
+                    if ( !nlt_is_name_in_namelist( to_remove, s ) )
+                        rc = VNamelistAppend ( cleaned, s );
+                }
+                rc = VNamelistToConstNamelist ( cleaned, dest );
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t nlt_remove_strings_from_namelist( const KNamelist *source,
+            const KNamelist **dest, const char *items_to_remove )
+{
+    rc_t rc = 0;
+    const KNamelist *to_remove;
+    
+    if ( source == NULL || dest == NULL || items_to_remove == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    rc = nlt_make_namelist_from_string( &to_remove, items_to_remove );
+    if ( rc == 0 )
+    {
+        rc = nlt_remove_names_from_namelist( source, dest, to_remove );
+        KNamelistRelease( to_remove );
+    }
+    return rc;
+}
diff --git a/tools/qual-recalib-stat/namelist_tools.h b/tools/qual-recalib-stat/namelist_tools.h
new file mode 100644
index 0000000..7392a3c
--- /dev/null
+++ b/tools/qual-recalib-stat/namelist_tools.h
@@ -0,0 +1,53 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_namelist_tools_
+#define _h_namelist_tools_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <klib/namelist.h>
+#include <klib/out.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+
+int nlt_strcmp( const char* s1, const char* s2 );
+rc_t nlt_make_namelist_from_string( const KNamelist **list, const char * src );
+bool nlt_is_name_in_namelist( const KNamelist *list, const char *name_to_find );
+bool nlt_namelist_intersect( const KNamelist *list1, const KNamelist *list2 );
+
+rc_t nlt_remove_names_from_namelist( const KNamelist *source,
+            const KNamelist **dest, const KNamelist *to_remove );
+
+rc_t nlt_remove_strings_from_namelist( const KNamelist *source,
+            const KNamelist **dest, const char *items_to_remove );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/qual-recalib-stat/qual-recalib-stat.c b/tools/qual-recalib-stat/qual-recalib-stat.c
new file mode 100644
index 0000000..c72fbae
--- /dev/null
+++ b/tools/qual-recalib-stat/qual-recalib-stat.c
@@ -0,0 +1,418 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <kapp/main.h>
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/printf.h>
+#include <klib/num-gen.h>
+#include <klib/progressbar.h>
+
+#include "context.h"
+#include "stat_mod_2.h"
+#include "reader.h"
+#include "writer.h"
+
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <string.h>
+
+const char UsageDefaultName[] = "qual-recalib-stat";
+
+static const char * rows_usage[] = { "set of rows to be analyzed (default = all)", NULL };
+static const char * schema_usage[] = { "schema-names", NULL };
+static const char * show_progress_usage[] = { "show progress in percent while analyzing", NULL };
+static const char * outfile_usage[] = { "file to write output into", NULL };
+static const char * outmode_usage[] = { "where to write [file,db,tab] (dflt = file)", NULL };
+static const char * gcwindow_usage[] = { "how many bases are counted (dflt = 7)", NULL };
+static const char * exclude_usage[] = { "path to db with ref-positions to be excluded", NULL };
+static const char * info_usage[] = { "display info's after the process", NULL };
+static const char * ignore_mismatch_usage[] = { "ignore mismatches", NULL };
+
+OptDef MyOptions[] =
+{
+    { OPTION_ROWS, ALIAS_ROWS, NULL, rows_usage, 1, true, false },
+    { OPTION_SCHEMA, ALIAS_SCHEMA, NULL, schema_usage, 5, true, false },
+    { OPTION_SHOW_PROGRESS, ALIAS_SHOW_PROGRESS, NULL, show_progress_usage, 1, false, false },
+    { OPTION_OUTFILE, ALIAS_OUTFILE, NULL, outfile_usage, 1, true, false },
+    { OPTION_OUTMODE, ALIAS_OUTMODE, NULL, outmode_usage, 1, true, false },
+    { OPTION_GCWINDOW, ALIAS_GCWINDOW, NULL, gcwindow_usage, 1, true, false },
+    { OPTION_EXCLUDE, ALIAS_EXCLUDE, NULL, exclude_usage, 1, true, false },
+    { OPTION_INFO, ALIAS_INFO, NULL, info_usage, 1, false, false },
+    { OPTION_IGNORE_MISMATCH, ALIAS_IGNORE_MISMATCH, NULL, ignore_mismatch_usage, 1, false, false }
+};
+
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    return KOutMsg ( "\n"
+                     "Usage:\n"
+                     "  %s <path> [options]\n"
+                     "\n", progname );
+}
+
+
+rc_t CC Usage( const Args * args  )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if ( args == NULL )
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+        rc = ArgsProgram( args, &fullpath, &progname );
+    if ( rc != 0 )
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary( progname );
+    KOutMsg ("Options:\n");
+    HelpOptionLine ( ALIAS_ROWS, OPTION_ROWS, "rows", rows_usage );
+    HelpOptionLine ( ALIAS_SCHEMA, OPTION_SCHEMA, "schema", schema_usage );
+    HelpOptionLine ( ALIAS_SHOW_PROGRESS, OPTION_SHOW_PROGRESS, NULL, show_progress_usage );
+    HelpOptionLine ( ALIAS_OUTFILE, OPTION_OUTFILE, NULL, outfile_usage );
+    HelpOptionLine ( ALIAS_OUTMODE, OPTION_OUTMODE, NULL, outmode_usage );
+    HelpOptionLine ( ALIAS_GCWINDOW, OPTION_GCWINDOW, NULL, gcwindow_usage );
+    HelpOptionLine ( ALIAS_EXCLUDE, OPTION_EXCLUDE, NULL, exclude_usage );
+    HelpOptionLine ( ALIAS_INFO, OPTION_INFO, NULL, info_usage );
+    HelpOptionLine ( ALIAS_IGNORE_MISMATCH, OPTION_IGNORE_MISMATCH, NULL, ignore_mismatch_usage );
+    HelpOptionsStandard();
+    HelpVersion( fullpath, KAppVersion() );
+    return rc;
+}
+
+static uint8_t calc_fract_digits( const struct num_gen_iter *iter )
+{
+    uint8_t res = 0;
+    uint64_t count;
+    if ( num_gen_iterator_count( iter, &count ) == 0 )
+    {
+		if ( count > 10000 )
+		{
+			if ( count > 100000 )
+				res = 2;
+			else
+				res = 1;
+		}
+    }
+    return res;
+}
+
+
+static rc_t read_loop( statistic * data,
+                       context *ctx,
+                       statistic_reader *reader,
+                       const VCursor *my_cursor )
+{
+    int64_t first;
+    uint64_t count;
+    rc_t rc = query_reader_rowrange( reader, &first, &count );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "query_statistic_rowrange() failed\n" );
+    else
+    {
+        if ( num_gen_empty( ctx->row_generator ) )
+        {
+            rc = num_gen_add( ctx->row_generator, first, count );
+            if ( rc != 0 )
+                LogErr( klogInt, rc, "num_gen_add() failed() failed\n" );
+        }
+        else
+        {
+            rc = num_gen_trim( ctx->row_generator, first, count );
+            if ( rc != 0 )
+                LogErr( klogInt, rc, "num_gen_trim() failed() failed\n" );
+        }
+
+        if ( rc == 0 )
+        {
+            const struct num_gen_iter *iter;
+            rc = num_gen_iterator_make( ctx->row_generator, &iter );
+            if ( rc != 0 )
+                LogErr( klogInt, rc, "num_gen_iterator_make() failed\n" );
+            else
+            {
+                int64_t row_id;
+				uint8_t fract_digits = calc_fract_digits( iter );
+                struct progressbar * progress;
+
+				
+                rc = make_progressbar( &progress, fract_digits );
+                if ( rc != 0 )
+                    LogErr( klogInt, rc, "make_progressbar() failed\n" );
+                else
+                {
+                    uint32_t percent;
+                    row_input row_data;
+
+                    while ( num_gen_iterator_next( iter, &row_id, &rc ) && rc == 0 )
+                    {
+                        rc = Quitting();
+                        if ( rc == 0 )
+                        {
+                            /* ******************************************** */
+                            rc = reader_get_data( reader, &row_data, row_id );
+                            if ( rc == 0 )
+                            {
+                                rc = extract_statistic_from_row( data, &row_data, row_id );
+                            }
+                            /* ******************************************** */
+                            if ( ctx->show_progress &&
+                                 num_gen_iterator_percent( iter, fract_digits, &percent ) == 0 )
+							{
+                                    update_progressbar( progress, percent );
+							}
+                        }
+                    }
+                    destroy_progressbar( progress );
+                    if ( ctx->show_progress )
+                        OUTMSG(( "\n" ));
+                }
+                num_gen_iterator_destroy( iter );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t read_statistic_from_table( statistic * data,
+                                       KDirectory *dir,
+                                       context *ctx,
+                                       const VDatabase *my_database,
+                                       const char *table_name )
+{
+    const VTable *my_table;
+    rc_t rc = VDatabaseOpenTableRead( my_database, &my_table, "%s", table_name );
+    if ( rc != 0 )
+    {
+        LogErr( klogInt, rc, "VDatabaseOpenTableRead() failed\n" );
+    }
+    else
+    {
+        const VCursor *my_cursor;
+        rc = VTableCreateCursorRead( my_table, &my_cursor );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "VTableCreateCursorRead() failed\n" );
+        else
+        {
+/*
+            spot_pos sequence;
+
+            rc = make_spot_pos( &sequence, my_database );
+            if ( rc == 0 )
+            {
+*/
+                statistic_reader reader;
+
+/*
+                rc = make_statistic_reader( &reader, &sequence, dir, my_cursor,
+                            ctx->exclude_file_path, ctx->info );
+*/
+                rc = make_statistic_reader( &reader, NULL, dir, my_cursor,
+                            ctx->exclude_file_path, ctx->info );
+
+                if ( rc == 0 )
+                {
+                    /* ******************************************************* */
+                    rc = read_loop( data, ctx, &reader, my_cursor );
+                    /* ******************************************************* */
+                    whack_reader( &reader );
+                }
+/*
+                whack_spot_pos( &sequence );
+            }
+*/
+            VCursorRelease( my_cursor );
+        }
+        VTableRelease( my_table );
+    }
+    return rc;
+}
+
+
+static rc_t gather_statistic( statistic * data,
+                              KDirectory *dir,
+                              context *ctx )
+{
+    VDBManager *my_manager;
+    /* because this tool is linked against the write-version
+       of vdb and kdb, there is no Read-Manager available... */
+    rc_t rc = VDBManagerMakeUpdate ( &my_manager, dir );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "VDBManagerMakeUpdate() failed\n" );
+    else
+    {
+        const VDatabase *my_database;
+        rc = VDBManagerOpenDBRead( my_manager, &my_database, NULL, "%s", ctx->src_path );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "VDBManagerOpenDBRead() failed\n" );
+        else
+        {
+            /* ******************************************************* */
+            rc = read_statistic_from_table( data, dir, ctx, my_database,
+                                            "PRIMARY_ALIGNMENT" );
+            /* ******************************************************* */
+            VDatabaseRelease( my_database );
+        }
+        VDBManagerRelease( my_manager );
+    }
+    return rc;
+}
+
+
+static rc_t gater_and_write( context *ctx )
+{
+    KDirectory *dir;
+    rc_t rc = KDirectoryNativeDir( &dir );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "KDirectoryNativeDir() failed\n" );
+    else
+    {
+        statistic data;
+        rc = make_statistic( &data, ctx->gc_window, ctx->ignore_mismatch );
+        if ( rc == 0 )
+        {
+            rc = gather_statistic( &data, dir, ctx ); /* <--- the meat */
+            if ( rc == 0 )
+            {
+                uint64_t written;
+
+                if ( ctx->show_progress )
+                {
+                    OUTMSG(( "%lu statistic-entries gathered\n", data.entries ));
+                    OUTMSG(( "max. cycles per read = %u\n", data.max_cycle ));
+                }
+
+                switch( ctx->output_mode[ 0 ] )
+                {
+                case 'f' :  if ( ctx->output_file_path != NULL )
+                            {
+                                rc = write_output_file( dir, &data,
+                                        ctx->output_file_path, &written );
+                                if ( rc == 0 && ctx->info )
+                                {
+                                    OUTMSG(( "%lu lines written to '%s'\n", 
+                                            written, ctx->output_file_path ));
+                                }
+                            }
+                            else
+                                OUTMSG(( "the output-path is missing!\n" ));
+                            break;
+
+                case 'd' :  rc = write_statistic_into_db( dir, &data,
+                                    ctx->src_schema_list, ctx->src_path, &written,
+                                    ctx->show_progress );
+                            if ( rc == 0 && ctx->info )
+                            {
+                                OUTMSG(( "%lu rows written to database\n", written ));
+                            }
+                            break;
+
+                case 't' :  if ( ctx->output_file_path != NULL )
+                            {
+                                rc = write_statistic_into_tab( dir, &data, 
+                                        ctx->src_schema_list, ctx->output_file_path, &written,
+                                        ctx->show_progress );
+                                if ( rc == 0 && ctx->info )
+                                {
+                                    OUTMSG(( "%lu rows written to table\n", written ));
+                                }
+                            }
+                            else
+                            {
+                                OUTMSG(( "the output-path is missing!\n" ));
+                            }
+                            break;
+                }
+            }
+            whack_statistic( &data );
+        }
+        KDirectoryRelease( dir );
+    }
+    return rc;
+}
+
+
+rc_t CC KMain( int argc, char * argv[] )
+{
+    Args * args;
+    rc_t rc = ArgsMakeAndHandle ( &args, argc, argv, 1,
+                             MyOptions, sizeof MyOptions / sizeof ( OptDef ) );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "ArgsMakeAndHandle() failed\n" );
+    else
+    {
+        context *ctx;
+        KLogHandlerSetStdErr();
+        rc = context_init( &ctx );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "context_init() failed\n" );
+        else
+        {
+            rc = context_capture_arguments_and_options( args, ctx );
+            if ( rc != 0 )
+                LogErr( klogInt, rc, "context_capture_arguments_and_options() failed\n" );
+            else
+            {
+                if ( ctx->usage_requested ) {
+                    MiniUsage( args );
+                    rc = RC(rcApp, rcArgv, rcParsing, rcParam, rcInsufficient);
+                }
+                else
+                {
+                    switch( ctx->output_mode[ 0 ] )
+                    {
+                        case 'd' :
+                        case 't' : if ( context_schema_count( ctx ) == 0 )
+                                    {
+                                        OUTMSG(( "cannot write, schema-file is missing:\n" ));
+                                        Usage( args  );
+                                        rc = RC( rcApp, rcNoTarg, rcConstructing, rcSelf, rcNull );
+                                    }
+                    }
+                    if ( rc == 0 )
+                    {
+                        /* ************************* */
+                        rc = gater_and_write( ctx );
+                        /* ************************* */
+                    }
+                }
+            }
+            context_destroy ( ctx );
+        }
+        ArgsWhack ( args );
+    }
+    return rc;
+}
diff --git a/tools/qual-recalib-stat/reader.c b/tools/qual-recalib-stat/reader.c
new file mode 100644
index 0000000..fe32a69
--- /dev/null
+++ b/tools/qual-recalib-stat/reader.c
@@ -0,0 +1,241 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "reader.h"
+
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+static const char * ridx_names[ N_RIDX ] =
+{
+    "RAW_READ",
+    "QUALITY",
+    "(bool)HAS_MISMATCH",
+    "SEQ_SPOT_ID",
+    "SPOT_GROUP",
+    "SEQ_SPOT_GROUP",
+    "REF_ORIENTATION",
+    "READ_LEN",
+    "SEQ_READ_ID",
+    "(bool)HAS_REF_OFFSET",
+    "REF_OFFSET",
+    "REF_POS",
+    "REF_SEQ_ID",
+    "REF_LEN"
+};
+
+static rc_t make_vector( void ** ptr, uint32_t *len, uint32_t new_len )
+{
+    rc_t rc = 0;
+
+    *len = new_len;
+    *ptr = calloc( 1, new_len );
+    if ( *ptr == NULL )
+    {
+        *len = 0;
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        LogErr( klogInt, rc, "failed to make large enough exclude-vector\n" );
+    }
+    return rc;
+}
+
+
+static rc_t expand_and_clear_vector( void **v, uint32_t *len, uint32_t new_len, bool clear )
+{
+    rc_t rc = 0;
+    if ( *v != NULL )
+    {
+        if ( *len < new_len )
+        {
+            *len += new_len;
+            *v = realloc( *v, *len );
+            if ( *v == NULL )
+            {
+                rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                LogErr( klogInt, rc, "failed to expand (uint8_t)vector\n" );
+            }
+        }
+        if ( rc == 0 && clear )
+            memset( *v, 0, *len ); 
+    }
+    return rc;
+}
+
+
+rc_t make_statistic_reader( statistic_reader *self,
+                            spot_pos *sequence,
+                            KDirectory *dir,
+                            const VCursor * cursor,
+                            const char * exclude_db,
+                            bool info )
+{
+    rc_t rc;
+
+    memset( &self->rd_col, 0, sizeof self->rd_col );
+    self->cursor = cursor;
+    self->ref_exclude_used = false;
+    self->exclude_vector = NULL;
+    self->exclude_vector_len = 0;
+    self->active_exclusions = 0;
+    self->sequence = sequence;
+
+    rc = add_columns( cursor, self->rd_col, ridx_names, N_RIDX );
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen ( cursor );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "VCursorOpen failed in reader\n" );
+    }
+    if ( rc == 0 )
+    if ( exclude_db != NULL )
+    {
+        make_ref_exclude( &self->exclude, dir, exclude_db, info );
+        rc = make_vector( (void**)&self->exclude_vector, &self->exclude_vector_len, 512 );
+        self->ref_exclude_used = true;
+    }
+
+    return rc;
+}
+
+
+void whack_reader( statistic_reader *self )
+{
+    if ( self->ref_exclude_used )
+    {
+        whack_ref_exclude( &self->exclude );
+        if ( self->exclude_vector != NULL )
+        {
+            free( self->exclude_vector );
+        }
+    }
+}
+
+
+void reader_set_spot_pos( statistic_reader *self, spot_pos * sequence )
+{
+    self->sequence = sequence;
+}
+
+rc_t query_reader_rowrange( statistic_reader *self, int64_t *first, uint64_t * count )
+{
+    rc_t rc = VCursorIdRange ( self->cursor, self->rd_col[ RIDX_READ ].idx,
+                               first, count );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "VCursorIdRange() failed in reader\n" );
+    return rc;
+}
+
+
+rc_t reader_get_data( statistic_reader *self, row_input * row_data,
+                      uint64_t row_id )
+{
+    rc_t rc = read_cells( self->cursor, row_id, self->rd_col, ridx_names, N_RIDX );
+    if ( rc == 0 )
+    {
+        bool * reverse;
+
+        row_data->spotgroup = (char *)self->rd_col[ RIDX_SPOT_GROUP ].base;
+        row_data->spotgroup_len = self->rd_col[ RIDX_SPOT_GROUP ].row_len;
+
+        row_data->seq_spotgroup = (char *)self->rd_col[ RIDX_SEQ_SPOT_GROUP ].base;
+        row_data->seq_spotgroup_len = self->rd_col[ RIDX_SEQ_SPOT_GROUP ].row_len;
+
+        row_data->read = (char *)self->rd_col[ RIDX_READ ].base;
+        row_data->read_len = self->rd_col[ RIDX_READ ].row_len;
+
+        row_data->quality = (uint8_t *)self->rd_col[ RIDX_QUALITY ].base;
+        row_data->quality_len = self->rd_col[ RIDX_QUALITY ].row_len;
+
+        row_data->has_mismatch = (bool *)self->rd_col[ RIDX_HAS_MISMATCH ].base;
+        row_data->has_mismatch_len = self->rd_col[ RIDX_HAS_MISMATCH ].row_len;
+
+        row_data->has_roffs = (bool *)self->rd_col[ RIDX_HAS_REF_OFFSET ].base;
+        row_data->has_roffs_len = self->rd_col[ RIDX_HAS_REF_OFFSET ].row_len;
+
+        row_data->roffs = (int32_t *)self->rd_col[ RIDX_REF_OFFSET ].base;
+        row_data->roffs_len = self->rd_col[ RIDX_REF_OFFSET ].row_len;
+
+        reverse = (bool *)self->rd_col[ RIDX_REF_ORIENTATION ].base;
+        row_data->reversed = *reverse;
+
+        row_data->seq_read_id = *( ( uint32_t * )self->rd_col[ RIDX_SEQ_READ_ID ].base );
+        row_data->spot_id = *( ( uint32_t * )self->rd_col[ RIDX_SEQ_SPOT_ID ].base );
+        row_data->base_pos_offset = 0;
+        row_data->ref_len = *( ( uint32_t *)self->rd_col[ RIDX_REF_LEN ].base );
+#ifdef LOOKUP_ALL_SEQ_READ_ID
+        if ( row_data->seq_read_id > 0 )
+#else
+        if ( row_data->seq_read_id > 1 )
+#endif
+        {
+            if ( self->sequence != NULL )
+            {
+                query_spot_pos( self->sequence, row_data->seq_read_id,
+                            row_data->spot_id, &(row_data->base_pos_offset) );
+            }
+        }
+
+        if ( self->ref_exclude_used )
+        {
+            String s_ref_name;
+
+            const char * ref_name_base = ( const char * )self->rd_col[ RIDX_REF_SEQ_ID ].base;
+            uint32_t ref_name_len = self->rd_col[ RIDX_REF_SEQ_ID ].row_len;
+            int32_t ref_offset = *( ( int32_t *)self->rd_col[ RIDX_REF_POS ].base );
+            uint32_t ref_len = *( ( uint32_t *)self->rd_col[ RIDX_REF_LEN ].base );
+
+            StringInit( &s_ref_name, ref_name_base, ref_name_len, ref_name_len );
+
+            /* make the ref-exclude-vector longer if necessary */
+            rc = expand_and_clear_vector( (void**)&self->exclude_vector,
+                                          &self->exclude_vector_len,
+                                          ref_len,
+                                          true );
+            if ( rc == 0 )
+            {
+                rc = get_ref_exclude( &self->exclude,
+                                      &s_ref_name,
+                                      ref_offset,
+                                      ref_len,
+                                      self->exclude_vector,
+                                      &self->active_exclusions );
+                if ( rc == 0 )
+                {
+                    row_data->exclude = self->exclude_vector;
+                    row_data->exclude_len = ref_len;
+                }
+            }
+        }
+        else
+        {
+            row_data->exclude = NULL;
+            row_data->exclude_len = 0;
+        }
+    }
+    return rc;
+}
diff --git a/tools/qual-recalib-stat/reader.h b/tools/qual-recalib-stat/reader.h
new file mode 100644
index 0000000..7dea1c7
--- /dev/null
+++ b/tools/qual-recalib-stat/reader.h
@@ -0,0 +1,88 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_stat_reader_
+#define _h_stat_reader_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <klib/rc.h>
+#include <vdb/cursor.h>
+#include "columns.h"
+#include "ref_exclude.h"
+#include "stat_mod_2.h"
+#include "spot_position.h"
+
+#define RIDX_READ            0
+#define RIDX_QUALITY         1
+#define RIDX_HAS_MISMATCH    2
+#define RIDX_SEQ_SPOT_ID     3
+#define RIDX_SPOT_GROUP      4
+#define RIDX_SEQ_SPOT_GROUP  5
+#define RIDX_REF_ORIENTATION 6
+#define RIDX_READ_LEN        7
+#define RIDX_SEQ_READ_ID     8
+#define RIDX_HAS_REF_OFFSET  9
+#define RIDX_REF_OFFSET     10
+#define RIDX_REF_POS        11
+#define RIDX_REF_SEQ_ID     12
+#define RIDX_REF_LEN        13
+#define N_RIDX              14
+
+typedef struct statistic_reader
+{
+    ref_exclude exclude;
+    uint8_t *exclude_vector;
+    uint32_t exclude_vector_len;
+    uint32_t active_exclusions;
+    bool ref_exclude_used;
+    const VCursor *cursor;
+    col rd_col[ N_RIDX ];
+    spot_pos * sequence;
+} statistic_reader;
+
+rc_t make_statistic_reader( statistic_reader *self,
+                            spot_pos *sequence,
+                            KDirectory *dir,
+                            const VCursor * cursor,
+                            const char * exclude_db,
+                            bool info );
+
+void whack_reader( statistic_reader *self );
+
+void reader_set_spot_pos( statistic_reader *self, spot_pos * sequence );
+
+rc_t query_reader_rowrange( statistic_reader *self, int64_t *first, uint64_t * count );
+
+rc_t reader_get_data( statistic_reader *self, row_input * row_data, uint64_t row_id );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/qual-recalib-stat/ref_exclude.c b/tools/qual-recalib-stat/ref_exclude.c
new file mode 100644
index 0000000..8512dc9
--- /dev/null
+++ b/tools/qual-recalib-stat/ref_exclude.c
@@ -0,0 +1,561 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "ref_exclude.h"
+#include "columns.h"
+#include <klib/printf.h>
+#include <klib/out.h>
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define MAXLEN_COLUMN   "MAX_SEQ_LEN"
+#define HITS_COLUMN     "HITS"
+#define HITMAP_TAB      "HITMAP"
+
+
+typedef struct trans_node
+{
+    BSTNode node;
+    String chromosome;
+    String translation;
+} trans_node;
+
+
+static trans_node * make_trans_node( const char * chromosome, const char * translation )
+{
+    trans_node * res = calloc( 1, sizeof * res );
+    if ( res != NULL )
+    {
+        StringInitCString( &(res->chromosome), chromosome );
+        StringInitCString( &(res->translation), translation );
+    }
+    return res;
+}
+
+
+static void CC whack_trans_node( BSTNode *n, void *data )
+{
+    free( n );
+}
+
+
+static int64_t CC trans_node_find( const void *item, const BSTNode *n )
+{
+    trans_node * node = ( trans_node * ) n;
+    return StringCompare ( ( String * ) item, &node->chromosome );
+}
+
+
+#define N_TRANS_NODES 24
+
+static const char * chromosomes[ N_TRANS_NODES ] =
+{
+    "CM000663.1",
+    "CM000664.1",
+    "CM000665.1",
+    "CM000666.1",
+    "CM000667.1",
+    "CM000668.1",
+    "CM000669.1",
+    "CM000670.1",
+    "CM000671.1",
+    "CM000672.1",
+    "CM000673.1",
+    "CM000675.1",
+    "CM000674.1",
+    "CM000676.1",
+    "CM000677.1",
+    "CM000678.1",
+    "CM000679.1",
+    "CM000680.1",
+    "CM000681.1",
+    "CM000682.1",
+    "CM000683.1",
+    "CM000684.1",
+    "CM000685.1",
+    "CM000686.1"
+};
+
+
+static const char * translations[ N_TRANS_NODES ] =
+{
+    "NC_000001.10",
+    "NC_000002.11",
+    "NC_000003.11",
+    "NC_000004.11",
+    "NC_000005.9",
+    "NC_000006.11",
+    "NC_000007.13",
+    "NC_000008.10",
+    "NC_000009.11",
+    "NC_000010.10",
+    "NC_000011.9",
+    "NC_000013.10",
+    "NC_000012.11",
+    "NC_000014.8",
+    "NC_000015.9",
+    "NC_000016.9",
+    "NC_000017.10",
+    "NC_000018.9",
+    "NC_000019.9",
+    "NC_000020.10",
+    "NC_000021.8",
+    "NC_000022.10",
+    "NC_000023.10",
+    "NC_000024.9"
+};
+
+
+static int64_t CC trans_node_sort( const BSTNode *item, const BSTNode *n )
+{
+    trans_node * rn1 = ( trans_node* ) item;
+    trans_node * rn2 = ( trans_node* ) n;
+    return StringCompare ( &rn1->chromosome, &rn2->chromosome );
+}
+
+
+static rc_t insert_trans_nodes( BSTree *tree )
+{
+    rc_t rc = 0;
+    uint32_t idx;
+    for ( idx = 0; idx < N_TRANS_NODES && rc == 0; ++idx )
+    {
+        trans_node * node = make_trans_node( chromosomes[ idx ], translations[ idx ] );
+        if ( node != NULL )
+        {
+            rc = BSTreeInsert ( tree, (BSTNode *)node, trans_node_sort );
+        }
+    }
+    return rc;
+}
+
+/******************************************************************************/
+
+typedef struct ref_node
+{
+    BSTNode node;
+    const String *name;
+    bool valid;
+    const VDatabase *db;
+    const VTable *tab;
+    const VCursor *cur;
+    uint32_t hits_idx;
+    uint32_t read_len;
+    uint64_t bytes_requested;
+    uint64_t active_positions;
+} ref_node;
+
+
+static rc_t detect_read_len( ref_node *node )
+{
+    const VCursor *temp_cursor;
+    rc_t rc = VTableCreateCursorRead ( node->tab, &temp_cursor );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogInt, ( klogInt, rc, 
+             "error to create cursor on table $(tab_name)",
+             "tab_name=%S", node->name ) );
+    }
+    else
+    {
+        uint32_t idx;
+        rc = VCursorAddColumn ( temp_cursor, &idx, MAXLEN_COLUMN );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogInt, ( klogInt, rc, 
+                 "error to add column $(col_name) to cursor for table $(db_name).$(tab_name)",
+                 "col_name=%s,db_name=%S,tab_name=%s",
+                 MAXLEN_COLUMN, node->name, HITMAP_TAB ) );
+        }
+        else
+        {
+            rc = VCursorOpen( temp_cursor );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogInt, ( klogInt, rc, 
+                     "error to open cursor for table $(db_name).$(tab_name to read $(col_name)",
+                     "col_name=%s,db_name=%S,tab_name=%s",
+                     MAXLEN_COLUMN, node->name, HITMAP_TAB ) );
+            }
+            else
+            {
+                uint32_t elem_bits, boff, row_len;
+                const void *base;
+                rc = VCursorCellDataDirect ( temp_cursor, 1, idx,
+                                             &elem_bits, &base, &boff, &row_len );
+                if ( rc != 0 )
+                {
+                    PLOGERR( klogInt, ( klogInt, rc, 
+                         "error to read $(col_name) from 1st row in table $(db_name).$(tab_name)",
+                         "col_name=%s,db_name=%S,tab_name=%s",
+                         MAXLEN_COLUMN, node->name, HITMAP_TAB ) );
+                }
+                else
+                {
+                    node->read_len = *((uint32_t *)base);
+                    if ( node->read_len == 0 )
+                    {
+                        rc = RC( rcApp, rcNoTarg, rcReading, rcParam, rcInvalid );
+                        PLOGERR( klogInt, ( klogInt, rc, 
+                             "$(col_name) == 0 discoverd in table $(db_name).$(tab_name)",
+                             "col_name=%s,db_name=%S,tab_name=%s",
+                             MAXLEN_COLUMN, node->name, HITMAP_TAB ) );
+                    }
+                }
+            }
+        }
+        VCursorRelease( temp_cursor );
+    }
+    return rc;
+}
+
+
+static rc_t prepare_ref_node( ref_node * node )
+{
+    rc_t rc = VTableCreateCursorRead ( node->tab, &node->cur );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogInt, ( klogInt, rc, 
+             "error to create cursor on table $(db_name).$(tab_name)",
+             "db_name=%S,tab_name=%s",
+             node->name, HITMAP_TAB ) );
+    }
+    else
+    {
+        rc = VCursorAddColumn ( node->cur, &node->hits_idx, HITS_COLUMN );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogInt, ( klogInt, rc, 
+                 "error to add column $(col_name) to cursor for table $(db_name).$(tab_name)",
+                 "col_name=%s,db_name=%S,tab_name=%s",
+                 HITS_COLUMN, node->name, HITMAP_TAB ) );
+        }
+        else
+        {
+            rc = VCursorOpen( node->cur );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogInt, ( klogInt, rc, 
+                     "error to open cursor for table $(tab_name)",
+                     "tab_name=%S", node->name ) );
+            }
+            else
+            {
+                node->valid = true;
+            }
+        }
+    }
+    return rc;
+}
+
+
+static ref_node * make_ref_node( ref_exclude *exclude, const String * s )
+{
+    ref_node * res = calloc( 1, sizeof * res );
+    if ( res != NULL )
+    {
+        if ( StringCopy ( &res->name, s ) != 0 )
+        {
+            free( res );
+            res = NULL;
+        }
+    }
+    if ( res != NULL && exclude->path != NULL )
+    {
+        char buf[ 1024 ];
+        size_t num_writ;
+        rc_t rc = string_printf ( buf, sizeof buf, &num_writ, 
+                                  "%s/%S", exclude->path, s );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogInt, ( klogInt, rc, 
+                 "error to assemble path to exclude-table $(tab_name)",
+                 "tab_name=%S", s ) );
+        }
+        else
+        {
+            rc = VDBManagerOpenDBRead ( exclude->mgr, &res->db, NULL, "%s", buf );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogInt, ( klogInt, rc, 
+                     "error to open exclude-table $(db_name)",
+                     "db_name=%s", buf ) );
+                /*
+                it can be OK if the database/table cannot be found!
+                */
+                rc = 0;
+            }
+            else
+            {
+                rc = VDatabaseOpenTableRead ( res->db, &res->tab, "HITMAP" );
+                if ( rc != 0 )
+                {
+                    PLOGERR( klogInt, ( klogInt, rc, 
+                         "error to open exclude-table 'HITMAP' in $(db_name)",
+                         "db_name=%s", buf ) );
+                    /*
+                    it can be OK if the database/table cannot be found!
+                    */
+                    rc = 0;
+                }
+                else
+                {
+                    rc = detect_read_len( res );
+                    if ( rc == 0 )
+                    {
+                        rc = prepare_ref_node( res );
+                    }
+                }
+            }
+        }
+    }
+    return res;
+}
+
+
+static rc_t read_from_ref_node( ref_node * node, 
+                                int32_t ref_offset, uint32_t ref_len,
+                                uint8_t *exclude_vector,
+                                uint32_t *active )
+{
+    rc_t rc = 0;
+    uint64_t row_id = ( ref_offset / node->read_len ) + 1;
+    uint8_t *dst = exclude_vector;
+    uint32_t remaining = ref_len;
+    uint32_t src_ofs = ref_offset % node->read_len;
+
+    while ( remaining > 0 && rc == 0 )
+    {
+        uint32_t elem_bits, boff, rlen;
+        const uint8_t *src;
+        rc = VCursorCellDataDirect ( node->cur, row_id, node->hits_idx,
+                                     &elem_bits, (const void**)&src, &boff, &rlen );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogInt, ( klogInt, rc, 
+                 "error to read $(col_name) from 1st row in table $(db_name).$(tab_name)",
+                 "col_name=%s,db_name=%S,tab_name=%s",
+                 HITS_COLUMN, node->name, HITMAP_TAB ) );
+        }
+        else
+        {
+            if ( src_ofs >= rlen )
+            {
+                rc = RC( rcApp, rcNoTarg, rcReading, rcParam, rcInvalid );
+                PLOGERR( klogInt, ( klogInt, rc, 
+                     "error: try to read more data than are in var-loc $(tab_name)",
+                     "tab_name=%S", node->name ) );
+            }
+            else
+            {
+                uint32_t to_copy = ( rlen - src_ofs );
+                if ( to_copy > remaining )
+                {
+                    to_copy = remaining;
+                }
+                src += src_ofs;
+
+                memcpy( dst, src, to_copy );
+                dst += to_copy;
+                remaining -= to_copy;
+                src_ofs = 0;
+                row_id ++;
+
+                node->bytes_requested += to_copy;
+            }
+        }
+    }
+    *active = 0;
+    if ( rc == 0 )
+    {
+        for ( src_ofs = 0; src_ofs < ref_len; ++src_ofs )
+        {
+            if ( exclude_vector[ src_ofs ] > 0 )
+            {
+                ( *active )++;
+            }
+        }
+    }
+
+    return rc;
+}
+
+
+static void CC whack_ref_node( BSTNode *n, void *data )
+{
+    ref_node * node = ( ref_node * )n;
+    bool * info = ( bool * )data;
+
+    if ( *info )
+    {
+        OUTMSG(( "node >%S< used for %lu bytes (%lu active)\n",
+                  node->name, node->bytes_requested, node->active_positions ));
+    }
+
+    if ( node->cur != NULL )
+    {
+        VCursorRelease( node->cur );
+    }
+    if ( node->tab != NULL )
+    {
+        VTableRelease( node->tab );
+    }
+    if ( node->name != NULL )
+    {
+        StringWhack ( node->name );
+    }
+    free( n );
+}
+
+
+static int64_t CC ref_node_find( const void *item, const BSTNode *n )
+{
+    ref_node * node = ( ref_node * ) n;
+    return StringCompare ( ( String * ) item, node->name );
+}
+
+
+static ref_node * find_ref_node( ref_exclude *exclude, const String * s )
+{
+    BSTNode *node;
+
+    if ( exclude->last_used_ref_node != NULL )
+    {
+        ref_node * node = ( ref_node * )exclude->last_used_ref_node;
+        if ( StringCompare ( s, node->name ) == 0 )
+            return node;
+    }
+
+    node = BSTreeFind ( &exclude->ref_nodes, s, ref_node_find );
+    if ( node == NULL )
+        return NULL;
+    else
+    {
+        exclude->last_used_ref_node = node;
+        return ( ref_node * ) node;
+    }
+}
+
+
+rc_t make_ref_exclude( ref_exclude *exclude, KDirectory *dir,
+                       const char * path, bool info )
+{
+    rc_t rc;
+
+    BSTreeInit( &exclude->ref_nodes );
+    BSTreeInit( &exclude->translations );
+
+    exclude->last_used_ref_node = NULL;
+    exclude->info = info;
+    rc = VDBManagerMakeUpdate ( &exclude->mgr, dir );
+    if ( rc != 0 )
+    {
+        LogErr( klogInt, rc, "VDBManagerMakeUpdate() in make_ref_exclude() failed\n" );
+    }
+    else
+    {
+        insert_trans_nodes( &exclude->translations );
+        exclude->path = string_dup_measure ( path, NULL );
+    }
+    return rc;
+}
+
+
+static int64_t CC ref_node_sort( const BSTNode *item, const BSTNode *n )
+{
+    ref_node * rn1 = ( ref_node* ) item;
+    ref_node * rn2 = ( ref_node* ) n;
+    return StringCompare ( rn1->name, rn2->name );
+}
+
+
+static rc_t find_or_make_by_name( ref_exclude *exclude,
+                          const String * name,
+                          ref_node ** node )
+{
+    rc_t rc = 0;
+    *node = find_ref_node( exclude, name );
+    if ( *node == NULL )
+    {
+        /* if not found: make such a node... */
+        *node = make_ref_node( exclude, name );
+        if ( *node == NULL )
+        {
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcSelf, rcNull );
+        }
+        else
+        {
+            /* if node was successfully made, insert it into our tree */
+            rc = BSTreeInsert ( &exclude->ref_nodes, (BSTNode *)( *node ), ref_node_sort );
+        }
+    }
+    return rc;
+}
+
+rc_t get_ref_exclude( ref_exclude *exclude,
+                      const String * name,
+                      int32_t ref_offset, uint32_t ref_len,
+                      uint8_t *exclude_vector,
+                      uint32_t *active )
+{
+    rc_t rc = 0;
+    ref_node *node = NULL;
+
+    /* look if we already have a node with the given name */
+    trans_node *t_node = ( trans_node * )BSTreeFind ( &exclude->translations, name, trans_node_find );
+    if ( t_node != NULL )
+    {
+        rc = find_or_make_by_name( exclude, &t_node->translation, &node );
+    }
+    else
+    {
+        rc = find_or_make_by_name( exclude, name, &node );
+    }
+
+    if ( rc == 0 && node->valid )
+    {
+        /* read the necessary row(s) and fill it into the exclude_vector */
+        rc = read_from_ref_node( node, ref_offset, ref_len, exclude_vector, active );
+        if ( rc == 0 )
+        {
+            node->active_positions += *active;
+        }
+    }
+    return rc;
+}
+
+
+rc_t whack_ref_exclude( ref_exclude *exclude )
+{
+    BSTreeWhack ( &exclude->ref_nodes, whack_ref_node, &exclude->info );
+    BSTreeWhack ( &exclude->translations, whack_trans_node, NULL );
+    if ( exclude->mgr != NULL )
+        VDBManagerRelease( exclude->mgr );
+    if ( exclude->path != NULL )
+        free( exclude->path );
+    return 0;
+}
diff --git a/tools/qual-recalib-stat/ref_exclude.h b/tools/qual-recalib-stat/ref_exclude.h
new file mode 100644
index 0000000..a957ce9
--- /dev/null
+++ b/tools/qual-recalib-stat/ref_exclude.h
@@ -0,0 +1,71 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_ref_exclude_
+#define _h_ref_exclude_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <klib/rc.h>
+#include <klib/container.h>
+#include <klib/text.h>
+#include <klib/log.h>
+#include <kfs/directory.h>
+#include <vdb/manager.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+
+typedef struct ref_exclude
+{
+    BSTree ref_nodes;
+    BSTree translations;
+    VDBManager *mgr;
+    char * path;
+    void * last_used_ref_node;
+    bool info;
+} ref_exclude;
+
+
+rc_t make_ref_exclude( ref_exclude *exclude, KDirectory *dir,
+                       const char * path, bool info );
+
+
+rc_t get_ref_exclude( ref_exclude *exclude, 
+                      const String * name,
+                      int32_t ref_offset, uint32_t ref_len,
+                      uint8_t *exclude_vector,
+                      uint32_t *active );
+
+rc_t whack_ref_exclude( ref_exclude *exclude );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/qual-recalib-stat/ref_grab.pl b/tools/qual-recalib-stat/ref_grab.pl
new file mode 100755
index 0000000..e71f2a4
--- /dev/null
+++ b/tools/qual-recalib-stat/ref_grab.pl
@@ -0,0 +1,82 @@
+#!/usr/bin/perl -w
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+use File::Path;
+
+my $nargs = scalar @ARGV;
+
+if ( $nargs < 2  )
+{
+    print( "\n-------------------------------------------------------------------------\n" );
+    print( "USAGE: ref_grab.pl src position bases\n" );
+    print( "src      ... absolute-path to a reference-table\n" );
+    print( "position ... from what absolute positoin in the reference to grab\n" );
+    print( "bases    ... how many bases to grab\n" );
+    print( "-------------------------------------------------------------------------\n\n" );
+}
+else
+{
+    my $ref = $ARGV[ 0 ];
+    my $cnt = $ARGV[ 1 ];
+    my $len = 79;
+    my ( $n_rows, $cmd, $row, $s, $line );
+
+    #calculate how many rows have to be dumped...
+    {
+        use integer;
+        $n_rows = ( $cnt / 5000 ) + 1;
+    }
+
+    #dump the sequence-name
+    $cmd = "vdb-dump $ref -C SEQ_ID -f csv -R 1";
+    open ( DUMP, "-|", "$cmd" ) or die "$cmd failed";
+    while ( ( $row = <DUMP> ), defined( $row ) )
+    {
+        chomp( $row );
+        print( ">$row\n" );
+    }
+    close ( DUMP );
+
+    #dump the rows
+    $cmd = "vdb-dump $ref -C READ -f tab -R 1-$n_rows";
+    open ( DUMP, "-|", "$cmd" ) or die "$cmd failed";
+    while ( ( $row = <DUMP> ), defined( $row ) )
+    {
+        chomp( $row );
+        $s .= $row;
+        while( length( $s ) >= $len )
+        {
+            $line = substr( $s, 0, $len, "" );
+            print( "$line\n" );
+
+        }
+    }
+    close ( DUMP );
+
+    #dump the remainder of bases
+    if ( length( $s ) > 0 )
+    {
+        print( "$s\n" );
+    }
+}
\ No newline at end of file
diff --git a/tools/qual-recalib-stat/spot_position.c b/tools/qual-recalib-stat/spot_position.c
new file mode 100644
index 0000000..dd3ac1f
--- /dev/null
+++ b/tools/qual-recalib-stat/spot_position.c
@@ -0,0 +1,121 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "spot_position.h"
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+static const char * sidx_names[ N_SIDX ] =
+{
+    "READ_START"
+};
+
+
+rc_t make_spot_pos( spot_pos *self,
+                    const VDatabase * db )
+{
+    rc_t rc = VDatabaseOpenTableRead( db, &self->table, "SEQUENCE" );
+    if ( rc != 0 )
+    {
+        LogErr( klogInt, rc, "VDatabaseOpenTableRead(SEQUENCE) failed\n" );
+        self->table = NULL;
+        self->cursor = NULL;
+    }
+    else
+    {
+        rc = VTableCreateCursorRead( self->table, &self->cursor );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "VTableCreateCursorRead(SEQUENCE) failed\n" );
+        else
+        {
+            rc = add_columns( self->cursor, self->columns, sidx_names, N_SIDX );
+            if ( rc == 0 )
+            {
+                rc = VCursorOpen ( self->cursor );
+                if ( rc != 0 )
+                {
+                    LogErr( klogInt, rc, "cannot open cursor on SEQUENCE\n" );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+rc_t query_spot_pos( spot_pos *self,
+                     const uint32_t seq_read_id,
+                     const uint64_t spot_id,
+                     uint32_t *pos_offset )
+{
+    rc_t rc;
+    if ( self->cursor == NULL )
+    {
+        rc = RC ( rcApp, rcNoTarg, rcAccessing, rcParam, rcNull );
+        LogErr( klogInt, rc, "cannot query spot-position, cursor is NULL\n" );
+    }
+    else
+    {
+        rc = read_cells( self->cursor, spot_id, self->columns, sidx_names, N_SIDX );
+        if ( rc == 0 )
+        {
+            const uint32_t * rd_start   = self->columns[ SIDX_READ_START ].base;
+            uint32_t rd_start_len = self->columns[ SIDX_READ_START ].row_len;
+            if ( seq_read_id > rd_start_len )
+            {
+                rc = RC ( rcApp, rcNoTarg, rcAccessing, rcParam, rcInvalid );
+                PLOGERR( klogInt, ( klogInt, rc, 
+                     "asking for read_start of read #$(read_nr) but we only have $(n_read) reads at row #$(row_nr)",
+                     "read_nr=%u,n_read=%u,row_nr=%lu", seq_read_id, rd_start_len, spot_id ) );
+            }
+            else
+            {
+                *pos_offset = rd_start[ seq_read_id - 1 ];
+                /*
+                OUTMSG(( "SPOT_ID %lu / SEQ_READ_ID %u ---> %u\n",
+                         spot_id, seq_read_id, *pos_offset ));
+                */
+            }
+        }
+        else
+        {
+            PLOGERR( klogInt, ( klogInt, rc, 
+                 "cannot read sequence row #$(row_nr)", "row_nr=%lu", spot_id ) );
+        }
+    }
+    return rc;
+}
+
+
+void whack_spot_pos( spot_pos *self )
+{
+    if ( self->cursor != NULL )
+        VCursorRelease( self->cursor );
+    if ( self->table != NULL )
+        VTableRelease( self->table );
+}
diff --git a/tools/qual-recalib-stat/spot_position.h b/tools/qual-recalib-stat/spot_position.h
new file mode 100644
index 0000000..e6e9953
--- /dev/null
+++ b/tools/qual-recalib-stat/spot_position.h
@@ -0,0 +1,68 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_spot_position_
+#define _h_spot_position_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <klib/rc.h>
+#include <klib/text.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <vdb/cursor.h>
+#include <vdb/table.h>
+#include <vdb/database.h>
+#include "columns.h"
+
+
+#define SIDX_READ_START      0
+#define N_SIDX               1
+
+
+typedef struct spot_pos
+{
+    const VTable *table;
+    const VCursor *cursor;
+    col columns[ N_SIDX ];
+} spot_pos;
+
+
+rc_t make_spot_pos( spot_pos *self, const VDatabase * db );
+
+rc_t query_spot_pos( spot_pos *self,
+                     const uint32_t seq_read_id,
+                     const uint64_t spot_id,
+                     uint32_t *pos_offset );
+
+void whack_spot_pos( spot_pos *self );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/qual-recalib-stat/stat_mod.c b/tools/qual-recalib-stat/stat_mod.c
new file mode 100644
index 0000000..4cd927f
--- /dev/null
+++ b/tools/qual-recalib-stat/stat_mod.c
@@ -0,0 +1,883 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "stat_mod.h"
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+static const char * ridx_names[ N_RIDX ] =
+{
+    "READ",
+    "QUALITY",
+    "HAS_MISMATCH",
+    "SPOT_GROUP",
+    "SEQ_SPOT_GROUP",
+    "REF_ORIENTATION",
+    "READ_LEN",
+    "SEQ_READ_ID",
+    "HAS_REF_OFFSET",
+    "REF_OFFSET",
+    "REF_POS",
+    "REF_SEQ_ID",
+    "REF_LEN"
+};
+
+
+static const char * widx_names[ N_WIDX ] =
+{
+    "SPOT_GROUP",
+    "KMER",
+    "ORIG_QUAL",
+    "TOTAL_COUNT",
+    "MISMATCH_COUNT",
+    "CYCLE",
+    "HPRUN",
+    "GC_CONTENT"
+};
+
+typedef struct qual
+{
+    uint32_t mismatches;
+    uint32_t count;
+} qual;
+
+
+typedef struct pos_vector
+{
+    uint32_t len;
+    struct qual *v;
+} pos_vector;
+
+
+typedef struct spotgrp
+{
+    BSTNode node;
+    const String *name;
+    pos_vector dimers[N_DIMER_VALUES][N_QUAL_VALUES][N_GC_VALUES][N_HP_VALUES];
+} spotgrp;
+
+
+static const uint8_t char_2_base_bin[26] =
+{
+   /* A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z*/
+      0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0
+};
+
+
+static const char * dimer_2_ascii[] = 
+{ "AA", "AC", "AG", "AT", 
+  "CA", "CC", "CG", "CT",
+  "GA", "GC", "GG", "GT",
+  "TA", "TC", "TG", "TT", "XX" };
+
+
+static void CC whack_spotgroup( BSTNode *n, void *data )
+{
+    spotgrp * sg = ( spotgrp * )n;
+    uint8_t dimer_idx;
+    for ( dimer_idx = 0; dimer_idx < N_DIMER_VALUES; ++dimer_idx )
+    {
+        uint8_t qual_idx;
+        for ( qual_idx = 0; qual_idx < N_QUAL_VALUES; ++qual_idx )
+        {
+            uint8_t gc_idx;
+            for ( gc_idx = 0; gc_idx < N_GC_VALUES; ++gc_idx )
+            {
+                uint8_t hp_idx;
+                for ( hp_idx = 0; hp_idx < N_HP_VALUES; ++hp_idx )
+                {
+                    pos_vector *pv = &sg->dimers[dimer_idx][qual_idx][gc_idx][hp_idx];
+                    if ( pv->v != NULL )
+                        free( pv->v );
+                }
+            }
+        }
+    }
+    if ( sg->name != NULL )
+        StringWhack ( sg->name );
+    free( n );
+}
+
+
+rc_t make_statistic( statistic *data, uint32_t gc_window,
+                     KDirectory *dir, const char * exclude_db )
+{
+    rc_t rc = 0;
+    BSTreeInit( &data->spotgroups );
+    data->last_used_spotgroup = NULL;
+    memset( &data->rd_col, 0, sizeof data->rd_col );
+    make_ref_exclude( &data->exclude, dir, exclude_db );
+    data->gc_window = gc_window;
+
+    data->exclude_vector_len = 512;
+    data->exclude_vector = calloc( 1, data->exclude_vector_len );
+    if ( data->exclude_vector == NULL )
+    {
+        data->exclude_vector_len = 0;
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        LogErr( klogInt, rc, "failed to make large enough exclude-vector\n" );
+    }
+
+    if ( rc == 0 )
+    {
+        data->case_vector_len = 512;
+        data->case_vector = calloc( 1, data->case_vector_len );
+        if ( data->case_vector == NULL )
+        {
+            data->case_vector_len = 0;
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            LogErr( klogInt, rc, "failed to make large enough case-vector\n" );
+        }
+    }
+
+    return rc;
+}
+
+
+void whack_statistic( statistic *data )
+{
+    BSTreeWhack ( &data->spotgroups, whack_spotgroup, NULL );
+    whack_ref_exclude( &data->exclude );
+    if ( data->exclude_vector != NULL )
+    {
+        free( data->exclude_vector );
+        data->exclude_vector = NULL;
+        data->exclude_vector_len = 0;
+    }
+    if ( data->case_vector != NULL )
+    {
+        free( data->case_vector );
+        data->case_vector = NULL;
+        data->case_vector_len = 0;
+    }
+}
+
+
+static spotgrp * make_spotgrp( const char *src, const size_t len )
+{
+    spotgrp * res = calloc( 1, sizeof * res );
+    if ( res != NULL )
+    {
+        String s;
+        StringInit( &s, src, len, len );
+        if ( StringCopy ( &res->name, &s ) != 0 )
+        {
+            free( res );
+            res = NULL;
+        }
+    }
+    return res;
+}
+
+
+static int64_t CC spotgroup_find( const void *item, const BSTNode *n )
+{
+    spotgrp * sg = ( spotgrp* ) n;
+    return StringCompare ( ( String* ) item, sg->name );
+}
+
+
+static spotgrp * find_spotgrp( statistic *data, const char *src, const size_t len )
+{
+    String s;
+    BSTNode *node;
+
+    StringInit( &s, src, len, len );
+    if ( data->last_used_spotgroup != NULL )
+    {
+        spotgrp * sg = ( spotgrp* )data->last_used_spotgroup;
+        if ( StringCompare ( &s, sg->name ) == 0 )
+            return sg;
+    }
+
+    node = BSTreeFind ( &data->spotgroups, &s, spotgroup_find );
+    if ( node == NULL )
+        return NULL;
+    else
+    {
+        data->last_used_spotgroup = node;
+        return ( spotgrp *) node;
+    }
+}
+
+
+static uint8_t dimer_2_bin( const char * dimer )
+{
+    uint8_t res = 0;
+    char c0 = dimer[ 0 ];
+    char c1 = dimer[ 1 ];
+    if ( c0 == 'N' || c1 == 'N' )
+        res = 16;
+    else
+    {
+        if ( c0 >= 'A' && c0 <= 'Z' )
+            res |= char_2_base_bin[ (uint8_t)( c0 - 'A' ) ];
+        res <<= 2;
+        if ( c1 >= 'A' && c1 <= 'Z' )
+            res |= char_2_base_bin[ (uint8_t)( c1 - 'A' ) ];
+    }
+    return res;
+}
+
+
+static rc_t spotgroup_enter_values( spotgrp * sg, 
+                                    stat_row * row, 
+                                    uint8_t dimer_idx,
+                                    uint8_t rd_case,
+                                    uint32_t base_pos_offset )
+{
+    rc_t rc = 0;
+    pos_vector *pv;
+    uint32_t base_pos = row->base_pos + base_pos_offset;
+
+    if ( row->quality >= N_QUAL_VALUES )
+        row->quality = N_QUAL_VALUES - 1;
+    if ( row->gc_content >= N_GC_VALUES )
+        row->gc_content = N_GC_VALUES - 1;
+    if ( row->hp_run >= N_HP_VALUES )
+        row->hp_run = N_HP_VALUES - 1;
+
+    pv = &sg->dimers[ dimer_idx ][ row->quality ][ row->gc_content ][ row->hp_run ];
+    if ( pv->len == 0 )
+    {
+        /* vector was not used before */
+        pv->len = ( ( base_pos + 1 ) / POS_VECTOR_INC ) + 1;
+        pv->len *= POS_VECTOR_INC;
+        pv->v = calloc( pv->len, sizeof pv->v[0] );
+        if ( pv->v == NULL )
+        {
+            rc = RC( rcApp, rcSelf, rcConstructing, rcMemory, rcExhausted );
+        }
+    }
+    else if ( pv->len < ( base_pos + 1 ) )
+    {
+        void * tmp;
+        /* vector has to be increased */
+        uint32_t org_len = pv->len;
+        pv->len = ( ( base_pos + 1 ) / POS_VECTOR_INC ) + 1;
+        pv->len *= POS_VECTOR_INC;
+        /* prevent from leaking memory by capturing the new pointer in temp. var. */
+        tmp = realloc( pv->v, pv->len * ( sizeof pv->v[0] ) );
+        if ( tmp == NULL )
+        {
+            rc = RC( rcApp, rcSelf, rcConstructing, rcMemory, rcExhausted );
+        }
+        else
+        {
+            pv->v = tmp;
+            /* the added part has to be set to zero */
+            qual *to_zero = pv->v;
+            to_zero += org_len;
+            memset( to_zero, 0, ( pv->len - org_len ) * ( sizeof pv->v[0] ) );
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        qual *q = &pv->v[ base_pos ];
+        switch( rd_case )
+        {
+            case CASE_MISMATCH : q->mismatches++; /* no break intented! */
+            case CASE_MATCH    : q->count++;
+                                 break;
+        }
+    }
+    else
+    {
+        pv->len = 0;
+    }
+    return rc;
+}
+
+
+static int64_t CC spotgroup_sort( const BSTNode *item, const BSTNode *n )
+{
+    spotgrp * sg1 = ( spotgrp* ) item;
+    spotgrp * sg2 = ( spotgrp* ) n;
+    return StringCompare ( sg1->name, sg2->name );
+}
+
+
+static rc_t expand_and_clear_vector( uint8_t **v, uint32_t *len, uint32_t new_len )
+{
+    rc_t rc = 0;
+    if ( *len < new_len )
+    {
+        *len += new_len;
+        *v = realloc( *v, *len );
+        if ( *v == NULL )
+        {
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            LogErr( klogInt, rc, "failed to expand (uint8_t)vector\n" );
+        }
+    }
+    if ( rc == 0 )
+        memset( *v, 0, *len ); 
+    return rc;
+}
+
+
+static rc_t get_exlude_vector( statistic * data, uint32_t *ref_len )
+{
+    /* we need: REF_OFFSET, REF_LEN and REF_NAME for that */
+    rc_t rc;
+    String s_ref_name;
+
+    const char * ref_name_base = ( const char * )data->rd_col[ RIDX_REF_SEQ_ID ].base;
+    uint32_t ref_name_len = data->rd_col[ RIDX_REF_SEQ_ID ].row_len;
+
+    int32_t ref_offset = *( ( int32_t *)data->rd_col[ RIDX_REF_POS ].base );
+    *ref_len = *( ( uint32_t *)data->rd_col[ RIDX_REF_LEN ].base );
+
+    StringInit( &s_ref_name, ref_name_base, ref_name_len, ref_name_len );
+
+    /* make the ref-exclude-vector longer if necessary */
+    rc = expand_and_clear_vector( &data->exclude_vector,
+                                  &data->exclude_vector_len,
+                                  *ref_len );
+    if ( rc == 0 )
+        rc = get_ref_exclude( &data->exclude,
+                              &s_ref_name,
+                              ref_offset,
+                              *ref_len,
+                              data->exclude_vector );
+
+    return rc;
+}
+
+
+static rc_t walk_exclude_vector( statistic * data,
+                                 uint32_t n_bases,
+                                 uint32_t ref_len )
+{
+    rc_t rc = 0;
+    /* we need: HAS_REF_OFFSET, REF_OFFSET and HAS_MISMATCH for that */
+
+    const char * has_roffs = ( const char * )data->rd_col[ RIDX_HAS_REF_OFFSET ].base;
+    uint32_t has_roffs_len = data->rd_col[ RIDX_HAS_REF_OFFSET ].row_len;
+
+    const int32_t * roffs = ( const int32_t * )data->rd_col[ RIDX_REF_OFFSET ].base;
+    uint32_t roffs_len = data->rd_col[ RIDX_REF_OFFSET ].row_len;
+
+    const char * has_mm = ( const char * )data->rd_col[ RIDX_HAS_MISMATCH ].base;
+    uint32_t has_mm_len = data->rd_col[ RIDX_HAS_MISMATCH ].row_len;
+
+    if ( has_roffs_len != n_bases || has_mm_len != n_bases )
+    {
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+        LogErr( klogInt, rc, "number of bases does not match length of HAS_REF_OFFSET or HAS_MISMATCH\n" );
+    }
+    else
+    {
+        /* we count how many REF_OFFSETS have to be there... */
+        uint32_t hro_count = 0;
+        uint32_t idx;
+        for ( idx = 0; idx < n_bases; ++idx )
+        {
+            if ( has_roffs[ idx ] == '1' )
+                hro_count++;
+        }
+        if ( hro_count != roffs_len )
+        {
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+            LogErr( klogInt, rc, "number of HAS_REF_OFFSET=1 does not match length of REF_OFFSET\n" );
+        }
+    }
+
+    /* */
+    if ( rc == 0 )
+    {
+        int32_t ref_idx = 0;
+        uint32_t base_idx = 0;
+        uint32_t roffs_idx = 0;
+        while ( ref_idx < (int32_t)ref_len )
+        {
+            /* before we handle the reference, apply the ref-offset to the
+               iterator ( in this case: ref_idx ) */
+            if ( has_roffs[ base_idx ] == '1' )
+            {
+                /* this handles the left-clipping (... ref_idx < 0 )*/
+                for ( ref_idx += roffs[ roffs_idx++ ]; ref_idx < 0; ++ref_idx )
+                {
+                    data->case_vector[ base_idx++ ] = CASE_IGNORE;
+                }
+            }
+            assert( ref_idx >= 0 );
+            /* all the calculation is only done to put the IGNORE-flags
+               into the right base-position (if necessary): */
+            if ( data->exclude_vector[ ref_idx++ ] > 0 )
+                data->case_vector[ base_idx ] = CASE_IGNORE;
+            base_idx++;
+        }
+        /* walk backwards from the end to apply right-clipping */
+        assert( n_bases > 0 );
+        base_idx = n_bases - 1;
+        while ( base_idx > 0 && has_mm[ base_idx ] == '1' )
+        {
+            data->case_vector[ base_idx-- ] = CASE_IGNORE;
+        }
+    }
+
+    /* enter the mis-matches into the case-vector,
+       but only where the base-position is not ignored... */
+    if ( rc == 0 )
+    {
+        uint32_t base_idx;
+        for ( base_idx = 0; base_idx < n_bases; ++base_idx )
+        {
+            if ( has_mm[ base_idx ] == '1' &&
+                 data->case_vector[ base_idx ] != CASE_IGNORE )
+            {
+                data->case_vector[ base_idx ] = CASE_MISMATCH;
+            }
+        }
+    }
+    return rc;
+}
+
+
+static const char base_complement[26] =
+{
+   /* ABCDEFGHIJKLMNOPQRSTUVWXYZ*/
+     "TBGDEFCHIJKLMNOPQRSAUVWXYZ"
+};
+
+
+static char complement( const char base )
+{
+    if ( base >= 'A' && base <= 'Z' )
+        return base_complement[ base - 'A' ];
+    else
+        return 'N';
+}
+
+
+static void reverse_read_and_case( statistic * data,
+                                   char * rd_ptr,
+                                   uint8_t *qual_ptr,
+                                   uint32_t n_bases )
+{
+    uint32_t p1;
+    uint32_t p2 = n_bases - 1;
+    uint32_t n = ( n_bases / 2 );
+    for ( p1 = 0; p1 < n; ++p1, --p2 )
+    {
+        char rd_temp = rd_ptr[ p1 ];
+        uint8_t c_temp = data->case_vector[ p1 ];
+        uint8_t q_temp = qual_ptr[ p1 ];
+
+        rd_ptr[ p1 ] = complement( rd_ptr[ p2 ] );
+        data->case_vector[ p1 ] = data->case_vector[ p2 ];
+        qual_ptr[ p1 ] = qual_ptr[ p2 ];
+
+        rd_ptr[ p2 ] = complement( rd_temp );
+        data->case_vector[ p2 ] = c_temp;
+        qual_ptr[ p2 ] = q_temp;
+    }
+    /* don't forget to complement the base in the middle (if n_bases is odd) */
+    if ( n_bases & 1 )
+        rd_ptr[ n ] = complement( rd_ptr[ n ] );
+}
+
+
+static rc_t loop_through_base_calls( spotgrp *sg,
+                       uint32_t gc_window,
+                       char * read_ptr,
+                       uint32_t n_bases,
+                       uint8_t * qual_ptr,
+                       uint8_t * case_ptr,
+                       uint32_t base_pos_offset )
+{
+    rc_t rc = 0;
+    char prev_char = 0;
+    stat_row row;
+    char *gc_ptr = read_ptr;
+    memset( &row, 0, sizeof row );
+
+    for ( row.base_pos = 0; row.base_pos < ( n_bases - 1 ) && rc == 0; ++row.base_pos )
+    {
+        /* calculate the hp-run-count */
+        if ( prev_char == *read_ptr )
+        {
+            row.hp_run++;
+            assert( row.hp_run <= n_bases );
+        }
+        else
+        {
+            prev_char = *read_ptr;
+            row.hp_run = 0;
+        }
+
+        /* advance the "window" */
+        if ( row.base_pos >= ( gc_window + 1 ) )
+        {
+            if ( *gc_ptr == 'G' || *gc_ptr == 'C' )
+            {
+                assert( row.gc_content > 0 );
+                row.gc_content--;
+            }
+            gc_ptr++;
+        }
+
+        if ( case_ptr[0] != CASE_IGNORE && case_ptr[1] != CASE_IGNORE )
+        {
+            row.quality = *qual_ptr;
+            rc = spotgroup_enter_values( sg,
+                                    &row, 
+                                    dimer_2_bin( read_ptr ),
+                                    *case_ptr,
+                                    base_pos_offset );
+        }
+
+        /* handle the current base-position after the record was entered
+           because we do not include the current base into the gc-content */
+        if ( *read_ptr == 'G' || *read_ptr == 'C' )
+            row.gc_content++;
+
+        qual_ptr++;
+        read_ptr++;
+        case_ptr++;
+    }
+    return rc;
+}
+
+
+static rc_t extract_spotgroup_statistic( statistic * data,
+                                         spotgrp *sg,
+                                         uint32_t n_bases )
+{
+    uint32_t ref_len, base_pos_offset = 0;
+    char *read_ptr = ( char * )data->rd_col[ RIDX_READ ].base;
+    uint8_t *qual_ptr = ( uint8_t * )data->rd_col[ RIDX_QUALITY ].base;
+
+    /* (1) ... get the exclusion-list for this read */
+    rc_t rc = get_exlude_vector( data, &ref_len );
+
+    /* (2) ... make the case-vector longer if necessary */
+    if ( rc == 0 )
+    {
+        rc = expand_and_clear_vector( &data->case_vector,
+                                      &data->case_vector_len,
+                                      n_bases );
+    }
+
+    /* (3) ... walk the exclusion-list and Mismatch-vector to build the case-vector */
+    if ( rc == 0 )
+    {
+        rc = walk_exclude_vector( data, n_bases, ref_len );
+    }
+
+    /* (4) ... if we have to, we reverse case-vector and revers/complement the read-vector */
+    if ( rc == 0 )
+    {
+        const bool * reverse = data->rd_col[ RIDX_REF_ORIENTATION ].base;
+        if ( *reverse )
+        {
+            reverse_read_and_case( data, read_ptr, qual_ptr, n_bases );
+        }
+    }
+
+    /* (5) ... check if we are in SEQ_READ_ID == 2 */
+    if ( *( ( uint32_t * )data->rd_col[ RIDX_SEQ_READ_ID ].base ) == 2 )
+    {
+        base_pos_offset = n_bases;
+    }
+    /* TBD: make it more general for more than 2 reads per spot of different sized reads */
+
+    /* (6) ... */
+    if ( rc == 0 )
+    {
+        rc = loop_through_base_calls( sg, data->gc_window, read_ptr, n_bases, 
+                   qual_ptr, data->case_vector, base_pos_offset );
+    }
+    return rc;
+}
+
+
+static rc_t extract_statistic_from_row( statistic * data )
+{
+    rc_t rc = 0;
+    spotgrp *sg;
+
+    /* first try the SPOT_GROUP column (correct for newer db's) */
+    const char * spotgrp_base  = data->rd_col[ RIDX_SPOT_GROUP ].base;
+    uint32_t spotgrp_len = data->rd_col[ RIDX_SPOT_GROUP ].row_len;
+    if ( spotgrp_len < 1 || *spotgrp_base == 0 )
+    {
+        /* if empty try with SEQ_SPOT_GROUP column (correct for older db's) */
+        spotgrp_base  = data->rd_col[ RIDX_SEQ_SPOT_GROUP ].base;
+        spotgrp_len = data->rd_col[ RIDX_SEQ_SPOT_GROUP ].row_len;
+    }
+
+    sg = find_spotgrp( data, spotgrp_base, spotgrp_len );
+    if ( sg == NULL )
+    {
+        sg = make_spotgrp( spotgrp_base, spotgrp_len );
+        if ( sg == NULL )
+            rc = RC( rcApp, rcSelf, rcConstructing, rcMemory, rcExhausted );
+        else
+            rc = BSTreeInsert ( &data->spotgroups, (BSTNode *)sg, spotgroup_sort );
+    }
+    if ( rc == 0 )
+    {
+        uint32_t n_bases  = data->rd_col[ RIDX_READ ].row_len;
+        uint32_t qual_len = data->rd_col[ RIDX_QUALITY ].row_len;
+        uint32_t hmis_len = data->rd_col[ RIDX_HAS_MISMATCH ].row_len;
+
+        if ( ( n_bases == qual_len ) &&  ( n_bases == hmis_len ) )
+        {
+            rc = extract_spotgroup_statistic( data, sg, n_bases );
+        }
+        else
+        {
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcData, rcInvalid );
+            LogErr( klogInt, rc, "number of bases, quality and has_mismatch is not the same\n" );
+        }
+    }
+    return rc;
+}
+
+
+rc_t read_and_extract_statistic_from_row( statistic * data, const VCursor *my_cursor, 
+                         const int64_t row_id )
+{
+    rc_t rc = read_cells( my_cursor, row_id, data->rd_col, ridx_names, N_RIDX );
+    if ( rc == 0 )
+    {
+        rc = extract_statistic_from_row( data );
+    }
+    return rc;
+}
+
+
+rc_t query_statistic_rowrange( statistic * data, const VCursor *my_cursor, 
+                               int64_t *first, uint64_t * count )
+{
+    rc_t rc = VCursorIdRange ( my_cursor, data->rd_col[ RIDX_READ ].idx, first, count );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "VCursorIdRange() failed\n" );
+    return rc;
+}
+
+
+rc_t open_statistic_cursor( statistic * data, const VCursor *my_cursor )
+{
+    rc_t rc = add_columns( my_cursor, data->rd_col, ridx_names, N_RIDX );
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen ( my_cursor );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "VCursorOpen failed\n" );
+    }
+    return rc;
+}
+
+
+typedef struct iter_ctx
+{
+    bool ( CC * f ) ( stat_row * row, void *data );
+    void * data;
+    uint64_t n;
+} iter_ctx;
+
+
+static void CC spotgroup_iter( BSTNode *n, void *data )
+{
+    spotgrp *sg = ( spotgrp * ) n;
+    iter_ctx *ctx = ( iter_ctx * )data;
+    bool run = true;
+    const char * name = sg->name->addr;
+    uint8_t dimer_idx;
+    for ( dimer_idx = 0; dimer_idx < N_DIMER_VALUES && run; ++dimer_idx )
+    {
+        uint8_t qual_idx;
+        for ( qual_idx = 0; qual_idx < N_QUAL_VALUES && run ; ++qual_idx )
+        {
+            uint8_t gc_idx;
+            for ( gc_idx = 0; gc_idx < N_GC_VALUES && run ; ++gc_idx )
+            {
+                uint8_t hp_idx;
+                for ( hp_idx = 0; hp_idx < N_HP_VALUES && run ; ++hp_idx )
+                {
+                    pos_vector *pv = &sg->dimers[dimer_idx][qual_idx][gc_idx][hp_idx];
+                    if ( pv->v != NULL )
+                    {
+                        uint32_t pos_idx;
+                        for ( pos_idx = 0; pos_idx < pv->len && run; ++pos_idx )
+                        {
+                            qual *q = &pv->v[pos_idx];
+                            if ( q->count > 0 )
+                            {
+                                stat_row row;
+                                /* the parameters */
+                                row.spotgroup  = (char *)name;
+                                row.dimer      = (char *)dimer_2_ascii[dimer_idx];
+                                row.quality    = qual_idx;
+                                row.hp_run     = hp_idx;
+                                row.gc_content = gc_idx;
+                                row.base_pos   = pos_idx;
+
+                                /* the counters */
+                                row.count      = q->count;
+                                row.mismatch_count = q->mismatches;
+
+                                run = ctx->f( &row, ctx->data );
+                                ctx->n++;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+
+
+uint64_t foreach_statistic( statistic * data,
+    bool ( CC * f ) ( stat_row * row, void * f_data ), void *f_data )
+{
+    iter_ctx ctx;
+    ctx.f = f;
+    ctx.data = f_data;
+    ctx.n = 0;
+    BSTreeForEach ( &data->spotgroups, false, spotgroup_iter, &ctx );
+    return ctx.n;
+}
+
+
+/************** WRITER **********************************************/
+static rc_t open_writer_cursor( statistic_writer *writer )
+{
+    rc_t rc = 0;
+    uint32_t idx;
+
+    for ( idx = 0; idx < N_WIDX && rc == 0; ++idx )
+    {
+        rc = add_column( writer->cursor, &writer->wr_col[ idx ], widx_names[ idx ] );
+    }
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen ( writer->cursor );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "VCursorOpen failed\n" );
+    }
+    return rc;
+}
+
+
+rc_t make_statistic_writer( statistic_writer *writer, VCursor * cursor )
+{
+    writer->cursor = cursor;
+    memset( &writer->wr_col, 0, sizeof writer->wr_col );
+    return open_writer_cursor( writer );
+}
+
+
+typedef struct writer_ctx
+{
+    statistic_writer *writer;
+    rc_t rc;
+} writer_ctx;
+
+
+static bool CC write_cb( stat_row * row, void * data )
+{
+    writer_ctx * ctx = ( writer_ctx * ) data;
+    col * cols = ( col * )&ctx->writer->wr_col;
+    VCursor * cursor = ctx->writer->cursor;
+  
+    rc_t rc = VCursorOpenRow( cursor );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "VCursorOpen() failed\n" );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_SPOT_GROUP ].idx, 8,
+                              row->spotgroup, string_size( row->spotgroup ),
+                              widx_names[ WIDX_SPOT_GROUP ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_KMER ].idx, 8,
+                              row->dimer, string_size( row->dimer ),
+                              widx_names[ WIDX_KMER ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_ORIG_QUAL ].idx, 8,
+                              &row->quality, 1, widx_names[ WIDX_ORIG_QUAL ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_CYCLE ].idx, 32,
+                              &row->base_pos, 1, widx_names[ WIDX_CYCLE ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_TOTAL_COUNT ].idx, 32,
+                              &row->count, 1, widx_names[ WIDX_TOTAL_COUNT ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_MISMATCH_COUNT ].idx, 32,
+                              &row->mismatch_count, 1,
+                              widx_names[ WIDX_MISMATCH_COUNT ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_HPRUN ].idx, 32,
+                              &row->hp_run, 1, widx_names[ WIDX_HPRUN ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_GC_CONTENT ].idx, 32,
+                              &row->gc_content, 1, widx_names[ WIDX_GC_CONTENT ] );
+    if ( rc == 0 )
+    {
+        rc = VCursorCommitRow( cursor );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "VCursorCommitRow() failed\n" );
+    }
+    if ( rc == 0 )
+    {
+        rc = VCursorCloseRow( cursor );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "VCursorCloseRow() failed\n" );
+    }
+
+    ctx->rc = rc;
+    return ( rc == 0 );
+}
+
+
+rc_t write_statistic( statistic_writer *writer, statistic *data,
+                      uint64_t * written )
+{
+    writer_ctx ctx;
+    uint64_t count;
+
+    ctx.writer = writer;
+    ctx.rc = 0;
+    count = foreach_statistic( data, write_cb, &ctx );
+    if ( written != NULL ) *written = count;
+
+    return ctx.rc;
+}
+
+
+rc_t whack_statistic_writer( statistic_writer *writer )
+{
+    rc_t rc = VCursorCommit( writer->cursor );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "VCursorCommit() failed\n" );
+    return rc;
+}
diff --git a/tools/qual-recalib-stat/stat_mod.h b/tools/qual-recalib-stat/stat_mod.h
new file mode 100644
index 0000000..9bec173
--- /dev/null
+++ b/tools/qual-recalib-stat/stat_mod.h
@@ -0,0 +1,148 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_stat_mod_
+#define _h_stat_mod_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <klib/rc.h>
+#include <klib/container.h>
+#include <klib/text.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <vdb/cursor.h>
+#include "ref_exclude.h"
+#include "columns.h"
+
+#define N_QUAL_VALUES 40
+#define N_DIMER_VALUES 17
+#define N_GC_VALUES 8
+#define N_HP_VALUES 16
+
+#define POS_VECTOR_INC 50
+
+#define RIDX_READ            0
+#define RIDX_QUALITY         1
+#define RIDX_HAS_MISMATCH    2
+#define RIDX_SPOT_GROUP      3
+#define RIDX_SEQ_SPOT_GROUP  4
+#define RIDX_REF_ORIENTATION 5
+#define RIDX_READ_LEN        6
+#define RIDX_SEQ_READ_ID     7
+#define RIDX_HAS_REF_OFFSET  8
+#define RIDX_REF_OFFSET      9
+#define RIDX_REF_POS        10
+#define RIDX_REF_SEQ_ID     11
+#define RIDX_REF_LEN        12
+#define N_RIDX              13
+
+#define WIDX_SPOT_GROUP      0
+#define WIDX_KMER            1
+#define WIDX_ORIG_QUAL       2
+#define WIDX_TOTAL_COUNT     3
+#define WIDX_MISMATCH_COUNT  4
+#define WIDX_CYCLE           5
+#define WIDX_HPRUN           6
+#define WIDX_GC_CONTENT      7
+#define N_WIDX               8
+
+#define CASE_MATCH      0
+#define CASE_IGNORE     1
+#define CASE_MISMATCH   2
+
+
+typedef struct stat_row
+{
+    char * spotgroup;
+    char * dimer;
+    uint8_t quality;
+    uint32_t base_pos;
+    uint32_t count;
+    uint32_t mismatch_count;
+    uint32_t hp_run;
+    uint32_t gc_content;
+} stat_row;
+
+
+typedef struct statistic
+{
+    BSTree spotgroups;
+    col rd_col[ N_RIDX ];
+
+    ref_exclude exclude;
+    uint32_t gc_window;
+
+    uint8_t *exclude_vector;
+    uint32_t exclude_vector_len;
+
+    uint8_t *case_vector;
+    uint32_t case_vector_len;
+
+    void * last_used_spotgroup;
+} statistic;
+
+
+typedef struct statistic_writer
+{
+    VCursor *cursor;
+    col wr_col[ N_WIDX ];
+} statistic_writer;
+
+
+/*************** the READER ***************/
+rc_t make_statistic( statistic *data, uint32_t gc_window,
+                     KDirectory *dir, const char * exclude_db );
+
+rc_t open_statistic_cursor( statistic * data, const VCursor *my_cursor );
+
+rc_t query_statistic_rowrange( statistic * data, const VCursor *my_cursor, 
+                               int64_t *first, uint64_t * count );
+
+rc_t read_and_extract_statistic_from_row( statistic * data,
+                const VCursor *my_cursor, const int64_t row_id );
+
+uint64_t foreach_statistic( statistic * data,
+    bool ( CC * f ) ( stat_row * row, void * f_data ), void *f_data );
+
+void whack_statistic( statistic *data );
+
+
+/*************** the WRITER ***************/
+rc_t make_statistic_writer( statistic_writer *writer, VCursor * cursor );
+
+rc_t write_statistic( statistic_writer *writer, statistic *data,
+                      uint64_t * written );
+
+rc_t whack_statistic_writer( statistic_writer *writer );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/qual-recalib-stat/stat_mod_1.c b/tools/qual-recalib-stat/stat_mod_1.c
new file mode 100644
index 0000000..f4df109
--- /dev/null
+++ b/tools/qual-recalib-stat/stat_mod_1.c
@@ -0,0 +1,962 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "stat_mod_1.h"
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+static const char * ridx_names[ N_RIDX ] =
+{
+    "RAW_READ",
+    "QUALITY",
+    "HAS_MISMATCH",
+    "SEQ_SPOT_ID",
+    "SPOT_GROUP",
+    "SEQ_SPOT_GROUP",
+    "REF_ORIENTATION",
+    "READ_LEN",
+    "SEQ_READ_ID",
+    "HAS_REF_OFFSET",
+    "REF_OFFSET",
+    "REF_POS",
+    "REF_SEQ_ID",
+    "REF_LEN"
+};
+
+
+static const char * widx_names[ N_WIDX ] =
+{
+    "SPOT_GROUP",
+    "KMER",
+    "ORIG_QUAL",
+    "TOTAL_COUNT",
+    "MISMATCH_COUNT",
+    "CYCLE",
+    "HPRUN",
+    "GC_CONTENT"
+};
+
+
+typedef struct counter
+{
+    uint32_t mismatches;
+    uint32_t count;
+} counter;
+
+
+typedef struct counter_vector
+{
+    counter *v;
+    uint32_t n_counters;
+} counter_vector;
+
+
+typedef struct spotgrp
+{
+    BSTNode node;
+    const String *name;
+    counter_vector cnv[ N_DIMER_VALUES ][ N_GC_VALUES ][ N_HP_VALUES ][ N_QUAL_VALUES ];
+} spotgrp;
+
+
+static const uint8_t char_2_base_bin[26] =
+{
+   /* A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z*/
+      0, 4, 1, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4
+};
+
+
+static uint8_t dimer_2_bin( char c0, char c1 )
+{
+    uint8_t res = 16;
+
+    if ( c0 >= 'A' && c0 <= 'Z' && c1 >= 'A' && c1 <= 'Z' )
+    {
+        uint8_t t1 = char_2_base_bin[ (uint8_t)( c0 - 'A' ) ];
+        uint8_t t2 = char_2_base_bin[ (uint8_t)( c1 - 'A' ) ];
+        if ( t1 < 4 && t2 < 4 )
+        {
+            res = t1;
+            res <<= 2;
+            res |= t2;
+        }
+    }
+    return res;
+}
+
+
+static const char * dimer_2_ascii[] = 
+{ "AA", "AC", "AG", "AT", 
+  "CA", "CC", "CG", "CT",
+  "GA", "GC", "GG", "GT",
+  "TA", "TC", "TG", "TT", "XX" };
+
+
+/******************************************************************************
+    for the spot-group ( tree-node ), contains a tree of counter's
+******************************************************************************/
+static void CC whack_spotgroup( BSTNode *n, void *data )
+{
+    spotgrp * sg = ( spotgrp * )n;
+    uint32_t idx, count;
+    count = ( ( sizeof sg->cnv ) / sizeof( sg->cnv[0] ) );
+    for ( idx = 0; idx < count; ++idx )
+    {
+        counter_vector * cv = (counter_vector *)&( sg->cnv[ idx ] );
+        if ( cv->v != NULL )
+        {
+            free( cv->v );
+        }
+    }
+    if ( sg->name != NULL )
+        StringWhack ( sg->name );
+    free( n );
+}
+
+
+static spotgrp * make_spotgrp( const char *src, const size_t len )
+{
+    spotgrp * sg = calloc( 1, sizeof sg[ 0 ] );
+    if ( sg != NULL )
+    {
+        String s;
+        StringInit( &s, src, len, len );
+        if ( StringCopy ( &sg->name, &s ) != 0 )
+        {
+            free( sg );
+            sg = NULL;
+        }
+    }
+    return sg;
+}
+
+
+static int64_t CC spotgroup_find( const void *item, const BSTNode *n )
+{
+    spotgrp * sg = ( spotgrp* ) n;
+    return StringCompare ( ( String* ) item, sg->name );
+}
+
+
+static spotgrp * find_spotgroup( statistic *data, const char *src, const size_t len )
+{
+    String s;
+    BSTNode *node;
+
+    StringInit( &s, src, len, len );
+    if ( data->last_used_spotgroup != NULL )
+    {
+        spotgrp * sg = ( spotgrp* )data->last_used_spotgroup;
+        if ( StringCompare ( &s, sg->name ) == 0 )
+            return sg;
+    }
+
+    node = BSTreeFind ( &data->spotgroups, &s, spotgroup_find );
+    if ( node == NULL )
+        return NULL;
+    else
+    {
+        data->last_used_spotgroup = node;
+        return ( spotgrp *) node;
+    }
+}
+
+
+static rc_t spotgroup_enter_values( spotgrp * spotgroup,
+                                    const uint8_t quality,
+                                    const uint8_t dimer_code,
+                                    const uint8_t gc_content,
+                                    const uint8_t hp_run,
+                                    const uint32_t cycle,
+                                    const uint8_t rd_case,
+                                    const uint64_t row_id )
+{
+    rc_t rc = 0;
+    uint8_t q = quality;
+    uint8_t d = dimer_code;
+    uint8_t g = gc_content;
+    uint8_t h = hp_run;
+    counter_vector * cv;
+
+    if ( q >= N_QUAL_VALUES ) q = ( N_QUAL_VALUES - 1 );
+    if ( d >= N_DIMER_VALUES ) d = ( N_DIMER_VALUES - 1 );
+    if ( g >= N_GC_VALUES ) g = ( N_GC_VALUES - 1 );
+    if ( h >= N_HP_VALUES ) h = ( N_HP_VALUES - 1 );
+    cv = &( spotgroup->cnv[ d ][ g ][ h ][ q ] );
+
+    if ( cv->v ==  NULL )
+    {
+        /* the counter-block was not used before at all */
+        cv->n_counters = ( ( cycle / COUNTER_BLOCK_SIZE ) + 1 ) * COUNTER_BLOCK_SIZE;
+        cv->v = calloc( cv->n_counters, sizeof cv->v[0] );
+        if ( cv->v == NULL )
+        {
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            PLOGERR( klogInt, ( klogInt, rc, 
+                     "calloc() failed at row#$(row_nr) cycle#$(cycle)",
+                     "row_nr=%lu,cycle=%u", row_id, cycle ) );
+        }
+    }
+    else
+    {
+        if ( cycle >= cv->n_counters )
+        {
+            /* the counter-block has to be extended */
+            void * tmp;
+            uint32_t org_len = cv->n_counters;
+            cv->n_counters = ( ( cycle / COUNTER_BLOCK_SIZE ) + 1 ) * COUNTER_BLOCK_SIZE;
+            /* prevent from leaking memory by capturing the new pointer in temp. var. */
+            tmp = realloc( cv->v, cv->n_counters * ( sizeof cv->v[0] ) );
+            if ( tmp == NULL )
+            {
+                rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                PLOGERR( klogInt, ( klogInt, rc, 
+                         "realloc() failed at row#$(row_nr) cycle#$(cycle)",
+                         "row_nr=%lu,cycle=%u", row_id, cycle ) );
+            }
+            else
+            {
+                /* the added part has to be set to zero */
+                counter * to_zero_out = tmp;
+                to_zero_out += org_len;
+                memset( to_zero_out, 0, ( cv->n_counters - org_len ) * ( sizeof *to_zero_out ) );
+                cv->v = tmp;
+            }
+        }
+    }
+    assert( cycle < cv->n_counters );
+
+    if ( rc == 0 )
+    {
+        counter * cnt = &( cv->v[ cycle ] );
+        switch( rd_case )
+        {
+            case CASE_MISMATCH : cnt->mismatches++; /* no break intented! */
+            case CASE_MATCH    : cnt->count++;
+                                 break;
+        }
+    }
+    return rc;
+}
+
+
+static int64_t CC spotgroup_sort( const BSTNode *item, const BSTNode *n )
+{
+    spotgrp * sg1 = ( spotgrp* ) item;
+    spotgrp * sg2 = ( spotgrp* ) n;
+    return StringCompare ( sg1->name, sg2->name );
+}
+
+
+/******************************************************************************
+    for the statistic ( tree-node ), contains a tree of spot-groups's
+******************************************************************************/
+static rc_t make_vector( void ** ptr, uint32_t *len, uint32_t new_len )
+{
+    rc_t rc = 0;
+
+    *len = new_len;
+    *ptr = calloc( 1, new_len );
+    if ( *ptr == NULL )
+    {
+        *len = 0;
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        LogErr( klogInt, rc, "failed to make large enough exclude-vector\n" );
+    }
+    return rc;
+}
+
+
+rc_t make_statistic( statistic *data, uint32_t gc_window, uint8_t cycle_offset,
+                     KDirectory *dir, const char * exclude_db,
+                     bool info, bool ignore_mismatches )
+{
+    rc_t rc = 0;
+    memset( data, 0, sizeof *data );
+    BSTreeInit( &data->spotgroups );
+    data->last_used_spotgroup = NULL;
+    data->sequence = NULL;
+    data->ignore_mismatches = ignore_mismatches;
+    memset( &data->rd_col, 0, sizeof data->rd_col );
+    if ( exclude_db != NULL )
+    {
+        make_ref_exclude( &data->exclude, dir, exclude_db, info );
+        data->ref_exclude_used = true;
+    }
+    data->gc_window = gc_window;
+    if ( data->gc_window >= N_GC_VALUES )
+    {
+        data->gc_window = ( N_GC_VALUES - 1 );
+    }
+    data->cycle_offset = cycle_offset;
+    if ( data->cycle_offset > 1 )
+    {
+        data->cycle_offset = 1;
+    }
+
+    if ( rc == 0 && data->ref_exclude_used )
+    {
+        rc = make_vector( (void**)&data->exclude_vector, &data->exclude_vector_len, 512 );
+    }
+    if ( rc == 0 )
+    {
+        rc = make_vector( (void**)&data->case_vector, &data->case_vector_len, 512 );
+    }
+    return rc;
+}
+
+
+void set_spot_pos_statistic( statistic *data, spot_pos * sequence )
+{
+    data->sequence = sequence;
+}
+
+
+void whack_statistic( statistic *data )
+{
+    BSTreeWhack ( &data->spotgroups, whack_spotgroup, NULL );
+    if ( data->ref_exclude_used )
+    {
+        whack_ref_exclude( &data->exclude );
+    }
+    if ( data->exclude_vector != NULL )
+    {
+        free( data->exclude_vector );
+    }
+    if ( data->case_vector != NULL )
+    {
+        free( data->case_vector );
+    }
+}
+
+
+static rc_t expand_and_clear_vector( void **v, uint32_t *len, uint32_t new_len, bool clear )
+{
+    rc_t rc = 0;
+    if ( *v != NULL )
+    {
+        if ( *len < new_len )
+        {
+            *len += new_len;
+            *v = realloc( *v, *len );
+            if ( *v == NULL )
+            {
+                rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                LogErr( klogInt, rc, "failed to expand (uint8_t)vector\n" );
+            }
+        }
+        if ( rc == 0 && clear )
+            memset( *v, 0, *len ); 
+    }
+    return rc;
+}
+
+
+static rc_t get_exlude_vector( statistic * data, uint32_t *ref_len )
+{
+    /* we need: REF_OFFSET, REF_LEN and REF_NAME for that */
+    rc_t rc = 0;
+
+    if ( data->ref_exclude_used )
+    {
+        String s_ref_name;
+        const char * ref_name_base = ( const char * )data->rd_col[ RIDX_REF_SEQ_ID ].base;
+        uint32_t ref_name_len = data->rd_col[ RIDX_REF_SEQ_ID ].row_len;
+
+        int32_t ref_offset = *( ( int32_t *)data->rd_col[ RIDX_REF_POS ].base );
+        *ref_len = *( ( uint32_t *)data->rd_col[ RIDX_REF_LEN ].base );
+
+        StringInit( &s_ref_name, ref_name_base, ref_name_len, ref_name_len );
+
+        /* make the ref-exclude-vector longer if necessary */
+        rc = expand_and_clear_vector( (void**)&data->exclude_vector,
+                                      &data->exclude_vector_len,
+                                      *ref_len,
+                                      true );
+        if ( rc == 0 )
+            rc = get_ref_exclude( &data->exclude,
+                                  &s_ref_name,
+                                  ref_offset,
+                                  *ref_len,
+                                  data->exclude_vector,
+                                  &data->active_exclusions );
+    }
+
+    return rc;
+}
+
+
+static rc_t walk_exclude_vector( statistic * data,
+                                 uint32_t n_bases,
+                                 uint32_t ref_len )
+{
+    rc_t rc = 0;
+    /* we need: HAS_REF_OFFSET, REF_OFFSET and HAS_MISMATCH for that */
+
+    const char * has_roffs = ( const char * )data->rd_col[ RIDX_HAS_REF_OFFSET ].base;
+    uint32_t has_roffs_len = data->rd_col[ RIDX_HAS_REF_OFFSET ].row_len;
+
+    const int32_t * roffs = ( const int32_t * )data->rd_col[ RIDX_REF_OFFSET ].base;
+    uint32_t roffs_len = data->rd_col[ RIDX_REF_OFFSET ].row_len;
+
+    const char * has_mm = ( const char * )data->rd_col[ RIDX_HAS_MISMATCH ].base;
+    uint32_t has_mm_len = data->rd_col[ RIDX_HAS_MISMATCH ].row_len;
+
+    if ( has_roffs_len != n_bases || has_mm_len != n_bases )
+    {
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+        LogErr( klogInt, rc, "number of bases does not match length of HAS_REF_OFFSET or HAS_MISMATCH\n" );
+    }
+    else
+    {
+        /* we count how many REF_OFFSETS have to be there... */
+        uint32_t hro_count = 0;
+        uint32_t idx;
+        for ( idx = 0; idx < n_bases; ++idx )
+        {
+            if ( has_roffs[ idx ] == '1' )
+                hro_count++;
+        }
+        if ( hro_count != roffs_len )
+        {
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+            LogErr( klogInt, rc, "number of HAS_REF_OFFSET=1 does not match length of REF_OFFSET\n" );
+        }
+    }
+
+    /* */
+    if ( rc == 0 )
+    {
+        int32_t ref_idx = 0;
+        uint32_t base_idx;
+        uint32_t roffs_idx = 0;
+
+        /* walk backwards from the end to apply right-clipping */
+        assert( n_bases > 0 );
+        base_idx = n_bases - 1;
+        while ( base_idx > 0 && has_mm[ base_idx ] == '1' )
+        {
+            data->case_vector[ base_idx-- ] = CASE_IGNORE;
+            n_bases--;
+        }
+
+        base_idx = 0;
+        while ( ref_idx < (int32_t)ref_len && base_idx < n_bases )
+        {
+            /* before we handle the reference, apply the ref-offset to the
+               iterator ( in this case: ref_idx ) */
+            if ( has_roffs[ base_idx ] == '1' )
+            {
+                int32_t roffs_value = roffs[ roffs_idx++ ];
+                /* this handles the left-clipping and inserts */
+                if ( roffs_value < 0 )
+                {
+                    while( roffs_value++ < 0 )
+                    {
+                        data->case_vector[ base_idx++ ] = CASE_IGNORE;
+                    }
+                }
+                else
+                {
+                    ref_idx += roffs_value;
+                }
+            }
+            assert( ref_idx >= 0 );
+            /* right now ref_idx and base_idx points to corresponding positions */
+
+            /* all the calculation is only done to put the IGNORE-flags
+               into the right base-position (if necessary): */
+            if ( data->exclude_vector[ ref_idx++ ] > 0 )
+            {
+                data->case_vector[ base_idx ] = CASE_IGNORE;
+            }
+            else
+            {
+                /* enter the mis-matches into the case-vector */
+                if ( has_mm[ base_idx ] == '1' )
+                {
+                    data->case_vector[ base_idx ] = CASE_MISMATCH;
+                }
+            }
+            ++base_idx;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t loop_through_base_calls( spotgrp *sg,
+                        uint32_t gc_window,
+                        uint8_t cycle_offset,
+                        char * read_ptr,    /* points at begin of array */
+                        uint32_t n_bases,
+                        uint8_t * qual_ptr, /* points at begin of array */
+                        uint8_t * case_ptr, /* points at begin of array */
+                        uint32_t base_pos_offset,
+                        const int64_t row_id,
+                        const int32_t ofs )
+{
+    rc_t rc = 0;
+    uint32_t base_pos;
+    char prev_char = 0;
+    char * gc_ptr = read_ptr;
+    uint8_t gc_content = 0;
+    uint8_t hp_run = 0;
+    bool enter_value;
+
+    for ( base_pos = 0; base_pos < ( n_bases - 1 ) && rc == 0; ++base_pos )
+    {
+        /* calculate the hp-run-count */
+        if ( prev_char == *read_ptr )
+        {
+            hp_run++;
+            assert( hp_run <= n_bases );
+        }
+        else
+        {
+            prev_char = *read_ptr;
+            hp_run = 0;
+        }
+
+        /* advance the "window" */
+        if ( base_pos >= ( gc_window + 1 ) )
+        {
+            if ( *gc_ptr == 'G' || *gc_ptr == 'C' )
+            {
+                assert( gc_content > 0 );
+                gc_content--;
+            }
+            gc_ptr++;
+        }
+
+        if ( case_ptr != NULL )
+        {
+            enter_value = ( case_ptr[0] != CASE_IGNORE && case_ptr[ofs] != CASE_IGNORE );
+        }
+        else
+        {
+            enter_value = true;
+        }
+
+        if ( enter_value )
+        {
+            uint8_t case_value = CASE_MATCH;
+            if ( case_ptr != NULL )
+            {
+                case_value = case_ptr[1];
+            }
+            rc = spotgroup_enter_values( sg,
+                                         qual_ptr[1],
+                                         dimer_2_bin( read_ptr[0], read_ptr[1] ),
+                                         gc_content,
+                                         hp_run,
+                                         base_pos + base_pos_offset + cycle_offset,
+                                         case_value,
+                                         row_id );
+        }
+
+        /* handle the current base-position after the record was entered
+           because we do not include the current base into the gc-content */
+        if ( *read_ptr == 'G' || *read_ptr == 'C' )
+            gc_content++;
+
+        qual_ptr += ofs;
+        read_ptr++;
+        if ( case_ptr != NULL )
+        {
+            case_ptr += ofs;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t extract_spotgroup_statistic( statistic * data,
+                                         spotgrp *sg,
+                                         uint32_t n_bases,
+                                         const int64_t row_id )
+{
+    uint32_t ref_len, seq_read_id, base_pos_offset = 0;
+    char *read_ptr = ( char * )data->rd_col[ RIDX_READ ].base;
+    uint8_t *qual_ptr = ( uint8_t * )data->rd_col[ RIDX_QUALITY ].base;
+    const bool * reverse = data->rd_col[ RIDX_REF_ORIENTATION ].base;
+
+    /* (1) ... make the case-vector longer if necessary */
+    rc_t rc = expand_and_clear_vector( (void**)&data->case_vector,
+                                      &data->case_vector_len,
+                                      n_bases,
+                                      true );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogInt, ( klogInt, rc, 
+             "expand_and_clear_vector( case_vector ) failed at row $(row_nr)",
+             "row_nr=%lu", row_id ) );
+    }
+
+    /* (2) ... get the exclusion-list for this read */
+    if ( data->ref_exclude_used )
+    {
+        rc = get_exlude_vector( data, &ref_len );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogInt, ( klogInt, rc, 
+                 "get_exlude_vector() failed at row $(row_nr)",
+                 "row_nr=%lu", row_id ) );
+        }
+
+        /* (3) ... walk the exclusion-list and Mismatch-vector to build the case-vector */
+        if ( rc == 0 )
+        {
+            rc = walk_exclude_vector( data, n_bases, ref_len );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogInt, ( klogInt, rc, 
+                     "walk_exclude_vector failed at row $(row_nr)",
+                     "row_nr=%lu", row_id ) );
+            }
+        }
+    }
+    else
+    {
+        if ( !data->ignore_mismatches )
+        {
+            const char * has_mm = ( const char * )data->rd_col[ RIDX_HAS_MISMATCH ].base;
+            uint32_t has_mm_len = data->rd_col[ RIDX_HAS_MISMATCH ].row_len;
+            uint32_t base_idx;
+            for ( base_idx = 0; base_idx < n_bases && base_idx < has_mm_len; ++base_idx )
+            {
+                if ( has_mm[ base_idx ] == '1' )
+                {
+                    data->case_vector[ base_idx ] = CASE_MISMATCH;
+                }
+            }
+        }
+    }
+
+    /* (4) ... query the base-postion of this read in the spot from the SEQUENCE-table */
+    seq_read_id = *( ( uint32_t * )data->rd_col[ RIDX_SEQ_READ_ID ].base );
+#ifdef LOOKUP_ALL_SEQ_READ_ID
+    if ( seq_read_id > 0 )
+#else
+    if ( seq_read_id > 1 )
+#endif
+    {
+        uint32_t spot_id = *( ( uint32_t * )data->rd_col[ RIDX_SEQ_SPOT_ID ].base );
+        rc = query_spot_pos( data->sequence, seq_read_id, spot_id, &base_pos_offset );
+    }
+
+    /* (5) ... looping throuhg the bases ( forward/backward ) */
+    if ( rc == 0 )
+    {
+
+        if ( *reverse )
+        {
+            uint8_t * loc_case_vector = data->case_vector + ( n_bases - 1 );
+            qual_ptr += ( n_bases - 1 );
+            rc = loop_through_base_calls( sg, data->gc_window, data->cycle_offset,
+                    read_ptr, n_bases, qual_ptr, loc_case_vector,
+                    base_pos_offset, row_id, -1 );
+
+        }
+        else
+        {
+            rc = loop_through_base_calls( sg, data->gc_window, data->cycle_offset,
+                    read_ptr, n_bases, qual_ptr, data->case_vector, 
+                    base_pos_offset, row_id, +1 );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t extract_statistic_from_row( statistic * data, const int64_t row_id )
+{
+    rc_t rc = 0;
+    spotgrp *sg;
+
+    /* first try the SPOT_GROUP column (correct for newer db's) */
+    const char * spotgrp_base  = data->rd_col[ RIDX_SPOT_GROUP ].base;
+    uint32_t spotgrp_len = data->rd_col[ RIDX_SPOT_GROUP ].row_len;
+    if ( spotgrp_len < 1 || *spotgrp_base == 0 )
+    {
+        /* if empty try with SEQ_SPOT_GROUP column (correct for older db's) */
+        spotgrp_base  = data->rd_col[ RIDX_SEQ_SPOT_GROUP ].base;
+        spotgrp_len = data->rd_col[ RIDX_SEQ_SPOT_GROUP ].row_len;
+    }
+
+    sg = find_spotgroup( data, spotgrp_base, spotgrp_len );
+    if ( sg == NULL )
+    {
+        sg = make_spotgrp( spotgrp_base, spotgrp_len );
+        if ( sg == NULL )
+        {
+            rc = RC( rcApp, rcSelf, rcConstructing, rcMemory, rcExhausted );
+            PLOGERR( klogInt, ( klogInt, rc, 
+                     "make_spotgrp failed at row $(row_nr)", "row_nr=%lu", row_id ) );
+        }
+        else
+        {
+            rc = BSTreeInsert ( &data->spotgroups, (BSTNode *)sg, spotgroup_sort );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogInt, ( klogInt, rc, 
+                     "BSTreeInsert( new spotgroup ) at row $(row_nr)", "row_nr=%lu", row_id ) );
+            }
+        }
+    }
+    if ( rc == 0 )
+    {
+        uint32_t n_bases  = data->rd_col[ RIDX_READ ].row_len;
+        uint32_t qual_len = data->rd_col[ RIDX_QUALITY ].row_len;
+        uint32_t hmis_len = data->rd_col[ RIDX_HAS_MISMATCH ].row_len;
+
+        if ( ( n_bases == qual_len ) &&  ( n_bases == hmis_len ) )
+        {
+            rc = extract_spotgroup_statistic( data, sg, n_bases, row_id );
+        }
+        else
+        {
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcData, rcInvalid );
+            PLOGERR( klogInt, ( klogInt, rc, 
+                 "number of bases, quality and has_mismatch is not the same at row $(row_nr)",
+                 "row_nr=%lu", row_id ) );
+        }
+    }
+    return rc;
+}
+
+
+rc_t read_and_extract_statistic_from_row( statistic * data, const VCursor *my_cursor, 
+                         const int64_t row_id )
+{
+    rc_t rc = read_cells( my_cursor, row_id, data->rd_col, ridx_names, N_RIDX );
+    if ( rc == 0 )
+    {
+        rc = extract_statistic_from_row( data, row_id );
+    }
+    return rc;
+}
+
+
+rc_t query_statistic_rowrange( statistic * data, const VCursor *my_cursor, 
+                               int64_t *first, uint64_t * count )
+{
+    rc_t rc = VCursorIdRange ( my_cursor, data->rd_col[ RIDX_READ ].idx, first, count );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "VCursorIdRange() failed\n" );
+    return rc;
+}
+
+
+rc_t open_statistic_cursor( statistic * data, const VCursor *my_cursor )
+{
+    rc_t rc = add_columns( my_cursor, data->rd_col, ridx_names, N_RIDX );
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen ( my_cursor );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "VCursorOpen failed\n" );
+    }
+    return rc;
+}
+
+
+typedef struct iter_ctx
+{
+    bool ( CC * f ) ( stat_row * row, void *data );
+    void * data;
+    const char * name;
+    bool run;
+    stat_row row;
+    uint64_t n;
+} iter_ctx;
+
+
+static bool CC spotgroup_iter( BSTNode *n, void *data )
+{
+    spotgrp *sg = ( spotgrp * ) n;
+    iter_ctx *ctx = ( iter_ctx * )data;
+
+    ctx->row.spotgroup = (char *)sg->name->addr;
+    for ( ctx->row.quality = 0; ctx->row.quality < N_QUAL_VALUES && ctx->run; ++ctx->row.quality )
+    {
+        uint8_t dimer_nr;
+        for ( dimer_nr = 0; dimer_nr < N_DIMER_VALUES && ctx->run; ++dimer_nr )
+        {
+            ctx->row.dimer = (char *)dimer_2_ascii[ dimer_nr ];
+            for( ctx->row.gc_content = 0; ctx->row.gc_content < N_GC_VALUES; ++ctx->row.gc_content )
+            {
+                for ( ctx->row.hp_run = 0; ctx->row.hp_run < N_HP_VALUES && ctx->run; ++ctx->row.hp_run )
+                {
+                    uint32_t pos;
+                    counter_vector * cv = &sg->cnv[ dimer_nr ][ ctx->row.gc_content ][ ctx->row.hp_run ][ ctx->row.quality ];
+                    for ( pos = 0; pos < cv->n_counters; ++pos )
+                    {
+                        counter * c = &cv->v[ pos ];
+                        if ( c->count > 0 )
+                        {
+                            ctx->row.base_pos = pos;
+                            ctx->row.count = c->count;
+                            ctx->row.mismatch_count = c->mismatches;
+
+                            ctx->run = ctx->f( &ctx->row, ctx->data );
+                            ctx->n++;
+                         }
+                    }
+                }
+            }
+        }
+    }
+    return( !ctx->run );
+}
+
+
+uint64_t foreach_statistic( statistic * data,
+    bool ( CC * f ) ( stat_row * row, void * f_data ), void *f_data )
+{
+    iter_ctx ctx;
+    ctx.f = f;
+    ctx.data = f_data;
+    ctx.run = true;
+    ctx.n = 0;
+    BSTreeDoUntil ( &data->spotgroups, false, spotgroup_iter, &ctx );
+    return ctx.n;
+}
+
+
+/************** WRITER **********************************************/
+static rc_t open_writer_cursor( statistic_writer *writer )
+{
+    rc_t rc = 0;
+    uint32_t idx;
+
+    for ( idx = 0; idx < N_WIDX && rc == 0; ++idx )
+    {
+        rc = add_column( writer->cursor, &writer->wr_col[ idx ], widx_names[ idx ] );
+    }
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen ( writer->cursor );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "VCursorOpen failed\n" );
+    }
+    return rc;
+}
+
+
+rc_t make_statistic_writer( statistic_writer *writer, VCursor * cursor )
+{
+    writer->cursor = cursor;
+    memset( &writer->wr_col, 0, sizeof writer->wr_col );
+    return open_writer_cursor( writer );
+}
+
+
+typedef struct writer_ctx
+{
+    statistic_writer *writer;
+    rc_t rc;
+} writer_ctx;
+
+
+static bool CC write_cb( stat_row * row, void * data )
+{
+    writer_ctx * ctx = ( writer_ctx * ) data;
+    col * cols = ( col * )&ctx->writer->wr_col;
+    VCursor * cursor = ctx->writer->cursor;
+  
+    rc_t rc = VCursorOpenRow( cursor );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "VCursorOpen() failed\n" );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_SPOT_GROUP ].idx, 8,
+                              row->spotgroup, string_size( row->spotgroup ),
+                              widx_names[ WIDX_SPOT_GROUP ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_KMER ].idx, 8,
+                              row->dimer, string_size( row->dimer ),
+                              widx_names[ WIDX_KMER ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_ORIG_QUAL ].idx, 8,
+                              &row->quality, 1, widx_names[ WIDX_ORIG_QUAL ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_CYCLE ].idx, 32,
+                              &row->base_pos, 1, widx_names[ WIDX_CYCLE ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_TOTAL_COUNT ].idx, 32,
+                              &row->count, 1, widx_names[ WIDX_TOTAL_COUNT ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_MISMATCH_COUNT ].idx, 32,
+                              &row->mismatch_count, 1,
+                              widx_names[ WIDX_MISMATCH_COUNT ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_HPRUN ].idx, 32,
+                              &row->hp_run, 1, widx_names[ WIDX_HPRUN ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_GC_CONTENT ].idx, 32,
+                              &row->gc_content, 1, widx_names[ WIDX_GC_CONTENT ] );
+    if ( rc == 0 )
+    {
+        rc = VCursorCommitRow( cursor );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "VCursorCommitRow() failed\n" );
+    }
+    if ( rc == 0 )
+    {
+        rc = VCursorCloseRow( cursor );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "VCursorCloseRow() failed\n" );
+    }
+
+    ctx->rc = rc;
+    return ( rc == 0 );
+}
+
+
+rc_t write_statistic( statistic_writer *writer, statistic *data,
+                      uint64_t * written )
+{
+    writer_ctx ctx;
+    uint64_t count;
+
+    ctx.writer = writer;
+    ctx.rc = 0;
+    count = foreach_statistic( data, write_cb, &ctx );
+    if ( written != NULL ) *written = count;
+
+    return ctx.rc;
+}
+
+
+rc_t whack_statistic_writer( statistic_writer *writer )
+{
+    rc_t rc = VCursorCommit( writer->cursor );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "VCursorCommit() failed\n" );
+    return rc;
+}
diff --git a/tools/qual-recalib-stat/stat_mod_1.h b/tools/qual-recalib-stat/stat_mod_1.h
new file mode 100644
index 0000000..82cfa1c
--- /dev/null
+++ b/tools/qual-recalib-stat/stat_mod_1.h
@@ -0,0 +1,160 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_stat_mod_
+#define _h_stat_mod_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <klib/rc.h>
+#include <klib/container.h>
+#include <klib/text.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <vdb/cursor.h>
+#include "ref_exclude.h"
+#include "columns.h"
+#include "spot_position.h"
+
+#define N_QUAL_VALUES 41
+#define N_DIMER_VALUES 17
+#define N_GC_VALUES 16
+#define N_HP_VALUES 25
+#define COUNTER_BLOCK_SIZE 100
+
+#define RIDX_READ            0
+#define RIDX_QUALITY         1
+#define RIDX_HAS_MISMATCH    2
+#define RIDX_SEQ_SPOT_ID     3
+#define RIDX_SPOT_GROUP      4
+#define RIDX_SEQ_SPOT_GROUP  5
+#define RIDX_REF_ORIENTATION 6
+#define RIDX_READ_LEN        7
+#define RIDX_SEQ_READ_ID     8
+#define RIDX_HAS_REF_OFFSET  9
+#define RIDX_REF_OFFSET     10
+#define RIDX_REF_POS        11
+#define RIDX_REF_SEQ_ID     12
+#define RIDX_REF_LEN        13
+#define N_RIDX              14
+
+#define WIDX_SPOT_GROUP      0
+#define WIDX_KMER            1
+#define WIDX_ORIG_QUAL       2
+#define WIDX_TOTAL_COUNT     3
+#define WIDX_MISMATCH_COUNT  4
+#define WIDX_CYCLE           5
+#define WIDX_HPRUN           6
+#define WIDX_GC_CONTENT      7
+#define N_WIDX               8
+
+#define CASE_MATCH      0
+#define CASE_IGNORE     1
+#define CASE_MISMATCH   2
+
+
+typedef struct stat_row
+{
+    char * spotgroup;
+    char * dimer;
+    uint8_t quality;
+    uint32_t base_pos;
+    uint32_t count;
+    uint32_t mismatch_count;
+    uint8_t hp_run;
+    uint8_t gc_content;
+} stat_row;
+
+
+typedef struct statistic
+{
+    BSTree spotgroups;      /* the tree contains 'spotgrp'-node, it collects the statistic */
+    col rd_col[ N_RIDX ];   /* a list of vdb-columns, the input-data per read */
+
+    bool ref_exclude_used;  /* flag indicating that the (VARLOC) exclude-vector is in use */
+    bool ignore_mismatches;
+
+    ref_exclude exclude;
+    uint32_t gc_window;
+    uint8_t cycle_offset;
+
+    uint8_t *exclude_vector;
+    uint32_t exclude_vector_len;
+    uint32_t active_exclusions;
+
+    uint8_t *case_vector;
+    uint32_t case_vector_len;
+
+    void * last_used_spotgroup;
+
+    spot_pos * sequence;
+} statistic;
+
+
+typedef struct statistic_writer
+{
+    VCursor *cursor;
+    col wr_col[ N_WIDX ];
+} statistic_writer;
+
+
+/*************** the READER ***************/
+rc_t make_statistic( statistic *data,
+                     uint32_t gc_window, uint8_t cycle_offset,
+                     KDirectory *dir, const char * exclude_db,
+                     bool info, bool ignore_mismatches );
+
+void set_spot_pos_statistic( statistic *data, spot_pos * sequence );
+
+rc_t open_statistic_cursor( statistic * data, const VCursor *my_cursor );
+
+rc_t query_statistic_rowrange( statistic * data, const VCursor *my_cursor, 
+                               int64_t *first, uint64_t * count );
+
+rc_t read_and_extract_statistic_from_row( statistic * data,
+                const VCursor *my_cursor, const int64_t row_id );
+
+uint64_t foreach_statistic( statistic * data,
+    bool ( CC * f ) ( stat_row * row, void * f_data ), void *f_data );
+
+void whack_statistic( statistic *data );
+
+
+/*************** the WRITER ***************/
+rc_t make_statistic_writer( statistic_writer *writer, VCursor * cursor );
+
+rc_t write_statistic( statistic_writer *writer, statistic *data,
+                      uint64_t * written );
+
+rc_t whack_statistic_writer( statistic_writer *writer );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/qual-recalib-stat/stat_mod_2.c b/tools/qual-recalib-stat/stat_mod_2.c
new file mode 100644
index 0000000..a9d1f92
--- /dev/null
+++ b/tools/qual-recalib-stat/stat_mod_2.c
@@ -0,0 +1,1041 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "stat_mod_2.h"
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <assert.h>
+
+typedef struct counter
+{
+    uint32_t mismatches;
+    uint32_t count;
+} counter;
+
+
+typedef struct counter_vector
+{
+    counter *v;
+    uint32_t n_counters;
+} counter_vector;
+
+#define USE_JUDY 1
+
+typedef struct spotgrp
+{
+    BSTNode node;
+    const String *name;
+#ifdef USE_JUDY
+    KVector *v;
+#else
+    counter_vector cnv[ N_MAX_QUAL_VALUES ][ N_READS ][ N_DIMER_VALUES ][ N_GC_VALUES ][ N_HP_VALUES ][ N_QUAL_VALUES ];
+#endif
+} spotgrp;
+
+
+static const uint8_t char_2_base_bin[26] =
+{
+   /* A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z*/
+      0, 4, 1, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4
+};
+
+
+/*
+    AA ...  0       CA ...  5       GA ... 10       TA ... 15       NA ... 20
+    AC ...  1       CC ...  6       GC ... 11       TC ... 16       NC ... 21
+    AG ...  2       CG ...  7       GG ... 12       TG ... 17       NG ... 22
+    AT ...  3       CT ...  8       GT ... 13       TT ... 18       NT ... 23
+    AN ...  4       CN ...  9       GN ... 14       TN ... 19       NN ... 24
+
+    dimer-code = ( lookup( co ) * 5 ) + lookup( c1 )
+    dimer-code = 0 ... 24
+*/
+static uint8_t dimer_2_bin( char c0, char c1 )
+{
+    uint8_t lookup0, lookup1;
+
+    if ( c0 >= 'A' && c0 <= 'Z' )
+    {
+        lookup0 = char_2_base_bin[ (uint8_t)( c0 - 'A' ) ];
+    }
+    else
+    {
+        lookup0 = 4;
+    }
+
+    if ( c1 >= 'A' && c1 <= 'Z' )
+    {
+        lookup1 = char_2_base_bin[ (uint8_t)( c1 - 'A' ) ];
+    }
+    else
+    {
+        lookup1 = 4;
+    }
+
+    return ( ( lookup0 << 2 ) + lookup0 ) + lookup1;
+}
+
+static const char * dimer_2_ascii[] = 
+{ "AA", "AC", "AG", "AT", "AN",
+  "CA", "CC", "CG", "CT", "CN",
+  "GA", "GC", "GG", "GT", "GN",
+  "TA", "TC", "TG", "TT", "TN",
+  "NA", "NC", "NG", "NT", "NN" };
+
+/********************************************************************************
+  6666.5555.5555.5544.4444.4444.3333.3333.3322.2222.2222.1111.1111.1100.0000.0000
+  3210.9876.5432.1098.7654.3210.9876.5432.1098.7654.3210.9876.5432.1098.7654.3210
+  CCCC CCCC CCCC CCCC CCCC CCCC CCCC CCCC RRRR RRDD DDDG GGGH HHHH MMMM MMQQ QQQQ
+
+  C ... cycle ( 32 bit )
+  R ... nread ( 6 bit )
+  D ... dimer ( 5 bit )
+  G ... gc-content ( 4 bit )
+  H ... hp-run ( 5 bit )
+  M ... max. qual ( 6 bit )
+  Q ... quality ( 6 bit )
+*********************************************************************************/
+#ifdef USE_JUDY
+
+static uint64_t encode_key( const uint32_t pos,
+                            const uint8_t max_q,
+                            const uint8_t nread,
+                            const uint8_t dimer,
+                            const uint8_t gc,
+                            const uint8_t hp,
+                            const uint8_t qual )
+{
+    uint64_t res = pos;
+    res <<= 6;
+    res |= ( nread & 0x3F );
+    res <<= 5;
+    res |= ( dimer & 0x1F );
+    res <<= 4;
+    res |= ( gc & 0xF );
+    res <<= 5;
+    res |= ( hp & 0x1F );
+    res <<= 6;
+    res |= ( max_q & 0x3F );
+    res <<= 6;
+    res |= ( qual & 0x3F );
+    return res;
+}
+
+
+static void decode_key( const uint64_t key,
+                        uint32_t *pos,
+                        uint8_t *max_q,
+                        uint8_t *nread,
+                        uint8_t *dimer,
+                        uint8_t *gc,
+                        uint8_t *hp,
+                        uint8_t *qual )
+{
+    uint64_t temp = key;
+    *qual = temp & 0x3F;
+    temp >>= 6;
+    *max_q = temp & 0x3F;
+    temp >>= 6;
+    *hp = temp & 0x1F;
+    temp >>= 5;
+    *gc = temp & 0xF;
+    temp >>= 4;
+    *dimer = temp & 0x1F;
+    temp >>= 5;
+    *nread = temp & 0x3F;
+    temp >>= 6;
+    *pos = temp & 0xFFFFFFFF;
+}
+
+
+typedef struct two_counters
+{
+    uint32_t total;
+    uint32_t mismatch;
+} two_counters;
+
+typedef union counter_union
+{
+    uint64_t value;
+    two_counters counters;
+} counter_union;
+
+
+static bool set_counter( KVector *v,
+                         const uint32_t pos,
+                         const uint8_t max_q,
+                         const uint8_t nread,
+                         const uint8_t dimer,
+                         const uint8_t gc,
+                         const uint8_t hp,
+                         const uint8_t qual,
+                         bool mismatch )
+{
+    bool res = false;
+    counter_union u;
+    uint64_t key = encode_key( pos, max_q, nread, dimer, gc, hp, qual );
+    if ( KVectorGetU64 ( v, key, &(u.value) ) == 0 )
+    {
+        u.counters.total++;
+        if ( mismatch )
+        {
+            u.counters.mismatch++;
+        }
+    }
+    else
+    {
+        u.counters.total = 1;
+        res = true;
+        if ( mismatch )
+        {
+            u.counters.mismatch = 1;
+        }
+        else
+        {
+            u.counters.mismatch = 0;
+        }
+    }
+    KVectorSetU64 ( v, key, u.value );
+    return res;
+}
+
+#if 0
+static void get_counter( KVector *v,
+                         const uint32_t pos,
+                         const uint8_t max_q,
+                         const uint8_t nread,
+                         const uint8_t dimer,
+                         const uint8_t gc,
+                         const uint8_t hp,
+                         const uint8_t qual,
+                         uint32_t *total,
+                         uint32_t *mismatch )
+{
+    counter_union u;
+    uint64_t key = encode_key( pos, max_q, nread, dimer, gc, hp, qual );
+    if ( KVectorGetU64 ( v, key, &(u.value) ) == 0 )
+    {
+        *total = u.counters.total;
+        *mismatch = u.counters.mismatch;
+    }
+    else
+    {
+        *total = 0;
+        *mismatch = 0;
+    }
+}
+#endif
+
+#endif
+
+/******************************************************************************
+    for the spot-group ( tree-node ), contains a tree of counter's
+******************************************************************************/
+static void CC whack_spotgroup( BSTNode *n, void *data )
+{
+    spotgrp * sg = ( spotgrp * )n;
+
+#ifdef USE_JUDY
+    KVectorRelease ( sg->v );
+#else
+    uint32_t idx, count;
+    count = ( ( sizeof sg->cnv ) / sizeof( sg->cnv[0] ) );
+    for ( idx = 0; idx < count; ++idx )
+    {
+        counter_vector * cv = (counter_vector *)&( sg->cnv[ idx ] );
+        if ( cv->v != NULL )
+        {
+            free( cv->v );
+        }
+    }
+#endif
+
+    if ( sg->name != NULL )
+        StringWhack ( sg->name );
+    free( n );
+}
+
+
+static spotgrp * make_spotgrp( const char *src, const size_t len )
+{
+    spotgrp * sg = calloc( 1, sizeof sg[ 0 ] );
+    if ( sg != NULL )
+    {
+        String s;
+        StringInit( &s, src, len, len );
+        if ( StringCopy ( &sg->name, &s ) != 0 )
+        {
+            free( sg );
+            sg = NULL;
+        }
+#ifdef USE_JUDY
+        else
+        {
+            KVectorMake ( &sg->v );
+        }
+#endif
+    }
+    return sg;
+}
+
+
+static int64_t CC spotgroup_find( const void *item, const BSTNode *n )
+{
+    spotgrp * sg = ( spotgrp* ) n;
+    return StringCompare ( ( String* ) item, sg->name );
+}
+
+
+static spotgrp * find_spotgroup( statistic *data, const char *src, const size_t len )
+{
+    String s;
+    BSTNode *node;
+
+    StringInit( &s, src, len, len );
+    if ( data->last_used_spotgroup != NULL )
+    {
+        spotgrp * sg = ( spotgrp* )data->last_used_spotgroup;
+        if ( StringCompare ( &s, sg->name ) == 0 )
+            return sg;
+    }
+
+    node = BSTreeFind ( &data->spotgroups, &s, spotgroup_find );
+    if ( node == NULL )
+        return NULL;
+    else
+    {
+        data->last_used_spotgroup = node;
+        return ( spotgrp *) node;
+    }
+}
+
+
+static rc_t spotgroup_enter_values( spotgrp * spotgroup,
+                                    uint64_t *entries,
+                                    const uint8_t quality,
+                                    const uint8_t dimer_code,
+                                    const uint8_t gc_content,
+                                    const uint8_t hp_run,
+                                    const uint8_t max_quality,
+                                    const uint8_t n_read,
+                                    const uint32_t cycle,
+                                    const uint8_t rd_case,
+                                    const uint64_t row_id )
+{
+    rc_t rc = 0;
+    uint8_t q = quality;
+    uint8_t d = dimer_code;
+    uint8_t g = gc_content;
+    uint8_t h = hp_run;
+    uint8_t m = max_quality;
+    uint8_t n = n_read;
+
+#ifdef USE_JUDY
+    bool mismatch;
+#else
+    counter_vector * cv;
+#endif
+
+    if ( q >= N_QUAL_VALUES ) q = ( N_QUAL_VALUES - 1 );
+    if ( d >= N_DIMER_VALUES ) d = ( N_DIMER_VALUES - 1 );
+    if ( g >= N_GC_VALUES ) g = ( N_GC_VALUES - 1 );
+    if ( h >= N_HP_VALUES ) h = ( N_HP_VALUES - 1 );
+    if ( m >= N_MAX_QUAL_VALUES ) m = ( N_MAX_QUAL_VALUES - 1 );
+    if ( n >= N_READS ) n = ( N_READS - 1 );
+
+
+#ifdef USE_JUDY
+    mismatch = false;
+    switch( rd_case )
+    {
+        case CASE_MISMATCH : mismatch = true; /* no break intented! */
+        case CASE_MATCH    : if ( set_counter( spotgroup->v, cycle, m, n, d, g, h, q, mismatch ) )
+                             {
+                                (*entries)++;
+                             }
+                             break;
+    }
+#else
+    cv = &( spotgroup->cnv[ m ][ n ][ d ][ g ][ h ][ q ] );
+
+    if ( cv->v ==  NULL )
+    {
+        /* the counter-block was not used before at all */
+        cv->n_counters = ( ( cycle / COUNTER_BLOCK_SIZE ) + 1 ) * COUNTER_BLOCK_SIZE;
+        cv->v = calloc( cv->n_counters, sizeof cv->v[0] );
+        if ( cv->v == NULL )
+        {
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            PLOGERR( klogInt, ( klogInt, rc, 
+                     "calloc() failed at row#$(row_nr) cycle#$(cycle)",
+                     "row_nr=%lu,cycle=%u", row_id, cycle ) );
+        }
+    }
+    else
+    {
+        if ( cycle >= cv->n_counters )
+        {
+            /* the counter-block has to be extended */
+            void * tmp;
+            uint32_t org_len = cv->n_counters;
+            cv->n_counters = ( ( cycle / COUNTER_BLOCK_SIZE ) + 1 ) * COUNTER_BLOCK_SIZE;
+            /* prevent from leaking memory by capturing the new pointer in temp. var. */
+            tmp = realloc( cv->v, cv->n_counters * ( sizeof cv->v[0] ) );
+            if ( tmp == NULL )
+            {
+                rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                PLOGERR( klogInt, ( klogInt, rc, 
+                         "realloc() failed at row#$(row_nr) cycle#$(cycle)",
+                         "row_nr=%lu,cycle=%u", row_id, cycle ) );
+            }
+            else
+            {
+                /* the added part has to be set to zero */
+                counter * to_zero_out = tmp;
+                to_zero_out += org_len;
+                memset( to_zero_out, 0, ( cv->n_counters - org_len ) * ( sizeof *to_zero_out ) );
+                cv->v = tmp;
+            }
+        }
+    }
+    assert( cycle < cv->n_counters );
+
+    if ( rc == 0 )
+    {
+        counter * cnt = &( cv->v[ cycle ] );
+        switch( rd_case )
+        {
+            case CASE_MISMATCH : cnt->mismatches++; /* no break intented! */
+            case CASE_MATCH    : if ( cnt->count == 0 )
+                                 {
+                                    (*entries)++;
+                                 }
+                                 cnt->count++;
+                                 break;
+        }
+    }
+#endif
+    return rc;
+}
+
+
+static int64_t CC spotgroup_sort( const BSTNode *item, const BSTNode *n )
+{
+    spotgrp * sg1 = ( spotgrp* ) item;
+    spotgrp * sg2 = ( spotgrp* ) n;
+    return StringCompare ( sg1->name, sg2->name );
+}
+
+
+/******************************************************************************
+    for the statistic ( tree-node ), contains a tree of spot-groups's
+******************************************************************************/
+static rc_t make_vector( void ** ptr, uint32_t *len, uint32_t new_len )
+{
+    rc_t rc = 0;
+
+    *len = new_len;
+    *ptr = calloc( 1, new_len );
+    if ( *ptr == NULL )
+    {
+        *len = 0;
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        LogErr( klogInt, rc, "failed to make large enough exclude-vector\n" );
+    }
+    return rc;
+}
+
+
+rc_t make_statistic( statistic *data,
+                     uint32_t gc_window,
+                     bool ignore_mismatches )
+{
+    rc_t rc = 0;
+    memset( data, 0, sizeof *data );
+    BSTreeInit( &data->spotgroups );
+    data->last_used_spotgroup = NULL;
+    data->ignore_mismatches = ignore_mismatches;
+    data->gc_window = gc_window;
+    if ( data->gc_window >= N_GC_VALUES )
+    {
+        data->gc_window = ( N_GC_VALUES - 1 );
+    }
+    if ( rc == 0 )
+    {
+        rc = make_vector( (void**)&data->case_vector, &data->case_vector_len, 512 );
+    }
+    return rc;
+}
+
+
+void whack_statistic( statistic *data )
+{
+    BSTreeWhack ( &data->spotgroups, whack_spotgroup, NULL );
+    if ( data->case_vector != NULL )
+    {
+        free( data->case_vector );
+    }
+}
+
+
+static rc_t expand_and_clear_vector( void **v, uint32_t *len, uint32_t new_len, bool clear )
+{
+    rc_t rc = 0;
+    if ( *v != NULL )
+    {
+        if ( *len < new_len )
+        {
+            *len += new_len;
+            *v = realloc( *v, *len );
+            if ( *v == NULL )
+            {
+                rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                LogErr( klogInt, rc, "failed to expand (uint8_t)vector\n" );
+            }
+        }
+        if ( rc == 0 && clear )
+            memset( *v, 0, *len ); 
+    }
+    return rc;
+}
+
+#if 0
+static rc_t walk_exclude_vector( statistic * data,
+                                 uint32_t n_bases,
+                                 row_input * row_data )
+{
+    rc_t rc = 0;
+
+    if ( row_data->has_roffs_len != n_bases || 
+         row_data->has_mismatch_len != n_bases )
+    {
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+        LogErr( klogInt, rc, "number of bases does not match length of HAS_REF_OFFSET or HAS_MISMATCH\n" );
+    }
+    else
+    {
+        /* we count how many REF_OFFSETS have to be there... */
+        uint32_t hro_count = 0;
+        uint32_t idx;
+        for ( idx = 0; idx < n_bases; ++idx )
+        {
+            if ( row_data->has_roffs[ idx ] )
+                hro_count++;
+        }
+        if ( hro_count != row_data->roffs_len )
+        {
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+            LogErr( klogInt, rc, "number of HAS_REF_OFFSET=1 does not match length of REF_OFFSET\n" );
+        }
+    }
+
+    /* */
+    if ( rc == 0 )
+    {
+        int32_t ref_idx = 0;
+        uint32_t base_idx;
+        uint32_t roffs_idx = 0;
+
+        /* walk backwards from the end to apply right-clipping */
+        assert( n_bases > 0 );
+        base_idx = n_bases - 1;
+        while ( base_idx > 0 && row_data->has_mismatch[ base_idx ] )
+        {
+            data->case_vector[ base_idx-- ] = CASE_IGNORE;
+            n_bases--;
+        }
+
+        base_idx = 0;
+        while ( ref_idx < (int32_t)row_data->exclude_len && base_idx < n_bases )
+        {
+            /* before we handle the reference, apply the ref-offset to the
+               iterator ( in this case: ref_idx ) */
+            if ( row_data->has_roffs[ base_idx ] )
+            {
+                int32_t roffs_value = row_data->roffs[ roffs_idx++ ];
+                /* this handles the left-clipping and inserts */
+                if ( roffs_value < 0 )
+                {
+                    while( roffs_value++ < 0 )
+                    {
+                        data->case_vector[ base_idx++ ] = CASE_IGNORE;
+                    }
+                }
+                else
+                {
+                    ref_idx += roffs_value;
+                }
+            }
+            assert( ref_idx >= 0 );
+            /* right now ref_idx and base_idx points to corresponding positions */
+
+            /* all the calculation is only done to put the IGNORE-flags
+               into the right base-position (if necessary): */
+            if ( row_data->exclude[ ref_idx++ ] > 0 )
+            {
+                data->case_vector[ base_idx ] = CASE_IGNORE;
+            }
+            else
+            {
+                /* enter the mis-matches into the case-vector */
+                if ( row_data->has_mismatch[ base_idx ] )
+                {
+                    data->case_vector[ base_idx ] = CASE_MISMATCH;
+                }
+            }
+            ++base_idx;
+        }
+    }
+    return rc;
+}
+#endif
+
+static rc_t loop_through_base_calls( spotgrp *sg,
+                        uint64_t *entries,
+                        uint32_t gc_window,
+                        char * read_ptr,    /* points at begin of array */
+                        uint32_t n_bases,
+                        uint8_t * qual_ptr, /* points at begin of array */
+                        uint8_t * case_ptr, /* points at begin of array */
+                        uint32_t base_pos_offset,
+                        uint8_t n_read,     /* the number of the read (0/1) */
+                        const int64_t row_id,
+                        const int32_t ofs )
+{
+    rc_t rc = 0;
+    uint32_t base_pos;
+    char prev_char;
+    char * gc_ptr = read_ptr;
+    uint8_t gc_content = 0;
+    uint8_t hp_run = 0;
+    uint8_t max_qual_value = 0;
+    bool enter_value;
+    uint8_t *saved_qual_ptr = qual_ptr;
+
+    /* calculate the max. quality value, befor we loop through the bases a 2nd time */
+    for ( base_pos = 0; base_pos < n_bases; ++base_pos )
+    {
+        if ( max_qual_value < *qual_ptr )
+        {
+            max_qual_value = *qual_ptr;
+        }
+        qual_ptr += ofs; /* because of going from forward or reverse */
+    }
+    /* restore qual_ptr */
+    qual_ptr = saved_qual_ptr;
+
+    prev_char = 'N';
+    for ( base_pos = 0; base_pos < n_bases && rc == 0; ++base_pos )
+    {
+        /* calculate the hp-run-count */
+        if ( prev_char == *read_ptr )
+        {
+            hp_run++;
+            assert( hp_run <= n_bases );
+        }
+        else
+        {
+            hp_run = 0;
+        }
+
+        /* advance the "window" */
+        if ( base_pos >= ( gc_window + 1 ) )
+        {
+            if ( *gc_ptr == 'G' || *gc_ptr == 'C' )
+            {
+                assert( gc_content > 0 );
+                gc_content--;
+            }
+            gc_ptr++;
+        }
+
+        if ( case_ptr != NULL )
+        {
+            enter_value = ( case_ptr[0] != CASE_IGNORE && case_ptr[ofs] != CASE_IGNORE );
+        }
+        else
+        {
+            enter_value = true;
+        }
+
+        if ( enter_value )
+        {
+            uint8_t case_value = CASE_MATCH;
+            if ( case_ptr != NULL )
+            {
+                case_value = case_ptr[ 1 ];
+            }
+            rc = spotgroup_enter_values( sg, entries,
+                                         *qual_ptr,
+                                         dimer_2_bin( prev_char, *read_ptr ),
+                                         gc_content,
+                                         hp_run,
+                                         max_qual_value,
+                                         n_read,
+                                         base_pos + base_pos_offset,
+                                         case_value,
+                                         row_id );
+        }
+
+        /* handle the current base-position after the record was entered
+           because we do not include the current base into the gc-content */
+        if ( *read_ptr == 'G' || *read_ptr == 'C' )
+            gc_content++;
+
+        qual_ptr += ofs;
+        prev_char = *read_ptr;
+        read_ptr++;
+        if ( case_ptr != NULL )
+        {
+            case_ptr += ofs;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t extract_spotgroup_statistic( statistic * data,
+                                         spotgrp *sg,
+                                         uint32_t n_bases,
+                                         row_input * row_data,
+                                         const int64_t row_id )
+{
+    /* (1) ... make the case-vector longer if necessary */
+    rc_t rc = expand_and_clear_vector( (void**)&data->case_vector,
+                                      &data->case_vector_len,
+                                      n_bases,
+                                      true );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogInt, ( klogInt, rc, 
+                           "expand_and_clear_vector( case_vector ) failed at row $(row_nr)",
+                           "row_nr=%lu", row_id ) );
+    }
+    
+#if 1
+    if (rc == 0 && !data->ignore_mismatches) {
+        unsigned si;
+        unsigned ri;
+        unsigned j;
+        
+        for (si = ri = j = 0; si < n_bases && ri < row_data->ref_len; ) {
+            if (row_data->has_roffs[si]) {
+                int const offset = row_data->roffs[j++];
+                
+                if (offset < 0) {
+                    unsigned const n = -offset;
+                    unsigned k;
+
+                    /* set inserts to ignore (handles left soft clip) */
+                    for (k = 0; k < n && si + k < n_bases; ++k)
+                        data->case_vector[si + k] = CASE_IGNORE;
+                    si += k;
+                    continue;
+                }
+                ri += offset;
+            }
+            if (row_data->read[si] == 'N' || (row_data->exclude && row_data->exclude[ri]))
+                data->case_vector[si] = CASE_IGNORE;
+            else if (row_data->has_mismatch[si])
+                data->case_vector[si] = CASE_MISMATCH;
+            else
+                data->case_vector[si] = CASE_MATCH;
+            ++si;
+            ++ri;
+        }
+        /* handle right soft clip */
+        for ( ; si < n_bases; ++si)
+            data->case_vector[si] = CASE_IGNORE;
+    }
+#else
+    /* (2) ... get the exclusion-list for this read */
+    if ( row_data->exclude != NULL )
+    {
+        /* (3) ... walk the exclusion-list and Mismatch-vector to build the case-vector */
+        if ( rc == 0 )
+        {
+            rc = walk_exclude_vector( data, n_bases, row_data );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogInt, ( klogInt, rc, 
+                     "walk_exclude_vector failed at row $(row_nr)",
+                     "row_nr=%lu", row_id ) );
+            }
+        }
+    }
+    else
+    {
+        if ( !data->ignore_mismatches )
+        {
+            uint32_t base_idx;
+            
+            for ( base_idx = 0;
+                  base_idx < n_bases && base_idx < row_data->has_mismatch_len;
+                  ++base_idx )
+            {
+                if ( row_data->has_mismatch[ base_idx ] )
+                {
+                    data->case_vector[ base_idx ] = CASE_MISMATCH;
+                }
+            }
+            /* handle left soft clip */
+            for ( base_idx = 0;
+                 base_idx < n_bases && base_idx < row_data->has_mismatch_len;
+                 ++base_idx )
+            {
+                if (!row_data->has_mismatch[base_idx]) {
+                    break;
+                }
+                data->case_vector[base_idx] = CASE_IGNORE;
+            }
+            /* handle right soft clip */
+            for ( base_idx = 0;
+                 base_idx < n_bases && base_idx < row_data->has_mismatch_len;
+                 ++base_idx )
+            {
+                if (!row_data->has_mismatch[row_data->has_mismatch_len - base_idx - 1]) {
+                    break;
+                }
+                data->case_vector[row_data->has_mismatch_len - base_idx - 1] = CASE_IGNORE;
+            }
+        }
+    }
+#endif
+
+    /* (4) ... looping throuhg the bases ( forward/backward ) */
+    if ( rc == 0 )
+    {
+        uint8_t *qual_ptr = row_data->quality;
+        if ( row_data->reversed )
+        {
+            uint8_t * loc_case_vector = data->case_vector + ( n_bases - 1 );
+            qual_ptr += ( n_bases - 1 );
+            rc = loop_through_base_calls( sg, &data->entries,
+                    data->gc_window, row_data->read, n_bases, qual_ptr, loc_case_vector,
+                    row_data->base_pos_offset, row_data->seq_read_id - 1, row_id, -1 );
+
+        }
+        else
+        {
+            rc = loop_through_base_calls( sg, &data->entries,
+                    data->gc_window, row_data->read, n_bases, qual_ptr, data->case_vector, 
+                    row_data->base_pos_offset, row_data->seq_read_id - 1, row_id, +1 );
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        if ( n_bases > data->max_cycle )
+        {
+            data->max_cycle = n_bases;
+        }
+    }
+
+    return rc;
+}
+
+
+rc_t extract_statistic_from_row( statistic * data, 
+                                 row_input * row_data,
+                                 const int64_t row_id )
+{
+    rc_t rc = 0;
+    spotgrp *sg;
+
+    /* first try the SPOT_GROUP column (correct for newer db's) */
+    char * spotgrp_base = row_data->spotgroup;
+    uint32_t spotgrp_len = row_data->spotgroup_len;
+    /* first try the SPOT_GROUP column (correct for newer db's) */
+    if ( spotgrp_len < 1 || *spotgrp_base == 0 )
+    {
+        /* if empty try with SEQ_SPOT_GROUP column (correct for older db's) */
+        spotgrp_base  = row_data->seq_spotgroup;
+        spotgrp_len = row_data->seq_spotgroup_len;
+    }
+
+    sg = find_spotgroup( data, spotgrp_base, spotgrp_len );
+    if ( sg == NULL )
+    {
+        sg = make_spotgrp( spotgrp_base, spotgrp_len );
+        if ( sg == NULL )
+        {
+            rc = RC( rcApp, rcSelf, rcConstructing, rcMemory, rcExhausted );
+            PLOGERR( klogInt, ( klogInt, rc, 
+                     "make_spotgrp failed at row $(row_nr)", "row_nr=%lu", row_id ) );
+        }
+        else
+        {
+            rc = BSTreeInsert ( &data->spotgroups, (BSTNode *)sg, spotgroup_sort );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogInt, ( klogInt, rc, 
+                     "BSTreeInsert( new spotgroup ) at row $(row_nr)", "row_nr=%lu", row_id ) );
+            }
+        }
+    }
+    if ( rc == 0 )
+    {
+        uint32_t n_bases  = row_data->read_len;
+
+        if ( ( n_bases == row_data->quality_len ) &&
+             ( n_bases == row_data->has_mismatch_len ) )
+        {
+            rc = extract_spotgroup_statistic( data, sg, n_bases, row_data, row_id );
+        }
+        else
+        {
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcData, rcInvalid );
+            PLOGERR( klogInt, ( klogInt, rc, 
+                 "number of bases, quality and has_mismatch is not the same at row $(row_nr)",
+                 "row_nr=%lu", row_id ) );
+        }
+    }
+    return rc;
+}
+
+
+typedef struct iter_ctx
+{
+    bool ( CC * f ) ( stat_row * row, void *data );
+    void * data;
+    const char * name;
+    bool run;
+    stat_row row;
+    uint64_t n;
+    uint32_t max_cycle;
+} iter_ctx;
+
+
+#ifdef USE_JUDY
+static rc_t CC counter_visit( uint64_t key, uint64_t value, void * data )
+{
+    uint8_t q, dimer, gc, hp, mq, nr;
+    uint32_t pos;
+    iter_ctx *ctx = ( iter_ctx * )data;
+    counter_union u;
+
+    decode_key( key, &pos, &mq, &nr, &dimer, &gc, &hp, &q );
+    u.value = value;
+
+    ctx->row.dimer = (char *)dimer_2_ascii[ dimer ];
+    ctx->row.quality = q;
+    ctx->row.gc_content = gc;
+    ctx->row.hp_run = hp;
+    ctx->row.max_qual_value = mq;
+    ctx->row.n_read = nr;
+    ctx->row.base_pos = pos;
+    ctx->row.count = u.counters.total;
+    ctx->row.mismatch_count = u.counters.mismatch;
+
+    ctx->run = ctx->f( &ctx->row, ctx->data );
+    ctx->n++;
+    return 0;
+}
+#endif
+
+
+static bool CC spotgroup_iter( BSTNode *n, void *data )
+{
+    spotgrp *sg = ( spotgrp * ) n;
+    iter_ctx *ctx = ( iter_ctx * )data;
+
+#ifndef USE_JUDY
+    uint8_t q, dimer, gc, hp, mq, nr;
+    uint32_t pos;
+#endif
+
+    ctx->row.spotgroup = (char *)sg->name->addr;
+
+#ifdef USE_JUDY
+    KVectorVisitU64 ( sg->v, false, counter_visit, data );
+#else
+    for ( pos = 0; pos <= ctx->max_cycle; ++pos )
+    {
+        for ( nr = 0; nr < N_READS; ++nr )
+        {
+            for ( dimer = 0; dimer < N_DIMER_VALUES; ++dimer )
+            {
+                for( gc = 0; gc < N_GC_VALUES; ++gc )
+                {
+                    for ( hp = 0; hp < N_HP_VALUES; ++hp )
+                    {
+                        for ( mq = 0; mq < N_MAX_QUAL_VALUES; ++mq )
+                        {
+                            for ( q = 0; q < N_QUAL_VALUES; ++q )
+                            {
+                                counter_vector * cv = &sg->cnv[ mq ][ nr ][ dimer ][ gc ][ hp ][ q ];
+                                if ( cv != NULL )
+                                {
+                                    if ( pos < cv->n_counters )
+                                    {
+                                        counter * c = &cv->v[ pos ];
+                                        if ( c->count > 0 )
+                                        {
+                                            ctx->row.dimer = (char *)dimer_2_ascii[ dimer ];
+                                            ctx->row.quality = q;
+                                            ctx->row.gc_content = gc;
+                                            ctx->row.hp_run = hp;
+                                            ctx->row.max_qual_value = mq;
+                                            ctx->row.n_read = nr;
+                                            ctx->row.base_pos = pos;
+                                            ctx->row.count = c->count;
+                                            ctx->row.mismatch_count = c->mismatches;
+
+                                            ctx->run = ctx->f( &ctx->row, ctx->data );
+                                            ctx->n++;
+                                         }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+#endif
+
+    return( !ctx->run );
+}
+
+
+uint64_t foreach_statistic( statistic * data,
+    bool ( CC * f ) ( stat_row * row, void * f_data ), void *f_data )
+{
+    iter_ctx ctx;
+    ctx.n = 0;
+    if ( f != NULL )
+    {
+        ctx.f = f;
+        ctx.data = f_data;
+        ctx.max_cycle = data->max_cycle;
+        ctx.run = true;
+        BSTreeDoUntil ( &data->spotgroups, false, spotgroup_iter, &ctx );
+    }
+    return ctx.n;
+}
diff --git a/tools/qual-recalib-stat/stat_mod_2.h b/tools/qual-recalib-stat/stat_mod_2.h
new file mode 100644
index 0000000..cc19d3a
--- /dev/null
+++ b/tools/qual-recalib-stat/stat_mod_2.h
@@ -0,0 +1,141 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_stat_mod_
+#define _h_stat_mod_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <klib/rc.h>
+#include <klib/container.h>
+#include <klib/text.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/vector.h>
+#include <vdb/cursor.h>
+#include "columns.h"
+
+#define N_QUAL_VALUES 41
+#define N_DIMER_VALUES 25
+#define N_GC_VALUES 8
+#define N_HP_VALUES 8
+#define N_READS 2
+#define N_MAX_QUAL_VALUES 41
+#define COUNTER_BLOCK_SIZE 100
+
+#define CASE_MATCH      0
+#define CASE_IGNORE     1
+#define CASE_MISMATCH   2
+
+
+typedef struct row_input
+{
+    char * spotgroup;
+    uint32_t spotgroup_len;
+
+    char * seq_spotgroup;
+    uint32_t seq_spotgroup_len;
+
+    char * read;
+    uint32_t read_len;
+
+    uint8_t * quality;
+    uint32_t quality_len;
+
+    bool * has_mismatch;
+    uint32_t has_mismatch_len;
+
+    bool * has_roffs;
+    uint32_t has_roffs_len;
+
+    int32_t * roffs;
+    uint32_t roffs_len;
+
+    uint8_t * exclude;
+    uint32_t exclude_len;
+
+    bool reversed;
+    uint32_t seq_read_id;
+    uint32_t spot_id;
+    uint32_t base_pos_offset;
+    uint32_t ref_len;
+} row_input;
+
+
+typedef struct stat_row
+{
+    char * spotgroup;
+    char * dimer;
+    uint8_t quality;
+    uint32_t base_pos;
+    uint32_t count;
+    uint32_t mismatch_count;
+    uint8_t hp_run;
+    uint8_t gc_content;
+    uint8_t max_qual_value;
+    uint8_t n_read;
+} stat_row;
+
+
+typedef struct statistic
+{
+    BSTree spotgroups;      /* the tree contains 'spotgrp'-node, it collects the statistic */
+
+    bool ignore_mismatches;
+
+    uint32_t gc_window;
+
+    uint8_t *case_vector;
+    uint32_t case_vector_len;
+
+    void * last_used_spotgroup;
+    uint64_t entries;
+    uint32_t max_cycle;
+} statistic;
+
+
+/*************** the STATISTIC GATHERER ***************/
+rc_t make_statistic( statistic *data,
+                     uint32_t gc_window,
+                     bool ignore_mismatches );
+
+
+rc_t extract_statistic_from_row( statistic * data, 
+                                 row_input * row_data,
+                                 const int64_t row_id );
+
+uint64_t foreach_statistic( statistic * data,
+    bool ( CC * f ) ( stat_row * row, void * f_data ), void *f_data );
+
+void whack_statistic( statistic *data );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/qual-recalib-stat/writer.c b/tools/qual-recalib-stat/writer.c
new file mode 100644
index 0000000..b133358
--- /dev/null
+++ b/tools/qual-recalib-stat/writer.c
@@ -0,0 +1,480 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "writer.h"
+
+#include <klib/printf.h>
+#include <klib/progressbar.h>
+#include <kfs/file.h>
+
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+static const char * widx_names[ N_WIDX ] =
+{
+    "SPOT_GROUP",
+    "KMER",
+    "ORIG_QUAL",
+    "TOTAL_COUNT",
+    "MISMATCH_COUNT",
+    "CYCLE",
+    "HPRUN",
+    "GC_CONTENT",
+    "MAX_QUAL",
+    "NREAD"
+};
+
+
+static rc_t open_writer_cursor( statistic_writer *writer )
+{
+    rc_t rc = 0;
+    uint32_t idx;
+
+    for ( idx = 0; idx < N_WIDX && rc == 0; ++idx )
+    {
+        rc = add_column( writer->cursor, &writer->wr_col[ idx ], widx_names[ idx ] );
+    }
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen ( writer->cursor );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "VCursorOpen failed\n" );
+    }
+    return rc;
+}
+
+
+static rc_t make_statistic_writer( statistic_writer *writer, VCursor * cursor )
+{
+    memset( &writer->wr_col, 0, sizeof writer->wr_col );
+    writer->cursor = cursor;
+    return open_writer_cursor( writer );
+}
+
+
+typedef struct writer_ctx
+{
+    statistic_writer *writer;
+    rc_t rc;
+
+    struct progressbar * progress;
+    uint64_t entries;
+    uint64_t n;
+    uint8_t fract_digits;
+} writer_ctx;
+
+
+static uint8_t progressbar_calc_fract_digits( const uint64_t count )
+{
+    uint8_t res = 0;
+    if ( count > 10000 )
+    {
+        if ( count > 100000 )
+            res = 2;
+        else
+            res = 1;
+    }
+    return res;
+}
+
+static uint32_t progressbar_percent( const uint64_t count, const uint64_t value,
+									 const uint8_t fract_digits )
+{
+    uint32_t factor = 100;
+    uint32_t res = 0;
+
+    if ( fract_digits > 0 )
+    {
+        if ( fract_digits > 1 )
+            factor = 10000;
+        else
+            factor = 1000;
+    }
+        
+    if ( count > 0 )
+    {
+        if ( value >= count )
+            res = factor;
+        else
+        {
+            uint64_t temp = value;
+            temp *= factor;
+            temp /= count;
+            res = (uint16_t) temp;
+        }
+    }
+    return res;
+}
+
+
+static bool CC write_cb( stat_row * row, void * data )
+{
+    writer_ctx * ctx = ( writer_ctx * ) data;
+    col * cols = ( col * )&ctx->writer->wr_col;
+    VCursor * cursor = ctx->writer->cursor;
+  
+    rc_t rc = VCursorOpenRow( cursor );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "VCursorOpen() failed\n" );
+
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_SPOT_GROUP ].idx, 8,
+                              row->spotgroup, string_size( row->spotgroup ),
+                              widx_names[ WIDX_SPOT_GROUP ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_KMER ].idx, 8,
+                              row->dimer, string_size( row->dimer ),
+                              widx_names[ WIDX_KMER ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_ORIG_QUAL ].idx, 8,
+                              &row->quality, 1, widx_names[ WIDX_ORIG_QUAL ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_CYCLE ].idx, 32,
+                              &row->base_pos, 1, widx_names[ WIDX_CYCLE ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_TOTAL_COUNT ].idx, 32,
+                              &row->count, 1, widx_names[ WIDX_TOTAL_COUNT ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_MISMATCH_COUNT ].idx, 32,
+                              &row->mismatch_count, 1,
+                              widx_names[ WIDX_MISMATCH_COUNT ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_HPRUN ].idx, 32,
+                              &row->hp_run, 1, widx_names[ WIDX_HPRUN ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_GC_CONTENT ].idx, 32,
+                              &row->gc_content, 1, widx_names[ WIDX_GC_CONTENT ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_MAX_QUAL ].idx, 8,
+                              &row->max_qual_value, 1, widx_names[ WIDX_MAX_QUAL ] );
+    if ( rc == 0 )
+        rc = write_to_cursor( cursor, cols[ WIDX_NREAD ].idx, 8,
+                              &row->n_read, 1, widx_names[ WIDX_NREAD ] );
+
+
+    if ( rc == 0 )
+    {
+        rc = VCursorCommitRow( cursor );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "VCursorCommitRow() failed\n" );
+    }
+    if ( rc == 0 )
+    {
+        rc = VCursorCloseRow( cursor );
+        if ( rc != 0 )
+            LogErr( klogInt, rc, "VCursorCloseRow() failed\n" );
+    }
+
+    ctx->rc = rc;
+    if ( ctx->progress != NULL && rc == 0 )
+    {
+        uint32_t percent = progressbar_percent( ctx->entries, ++( ctx->n ), ctx->fract_digits );
+        update_progressbar( ctx->progress, percent );
+    }
+
+    return ( rc == 0 );
+}
+
+
+static rc_t write_statistic( statistic_writer *writer, statistic *data,
+                             uint64_t * written, bool show_progress )
+{
+    writer_ctx ctx;
+    uint64_t count;
+
+    ctx.writer = writer;
+    ctx.rc = 0;
+    ctx.progress = NULL;
+
+    if ( show_progress )
+    {
+        ctx.entries = data->entries;
+        ctx.fract_digits = progressbar_calc_fract_digits( ctx.entries );
+		make_progressbar( &ctx.progress, ctx.fract_digits );
+        ctx.n = 0;
+    }
+
+    count = foreach_statistic( data, write_cb, &ctx );
+
+    if ( show_progress )
+    {
+        destroy_progressbar( ctx.progress );
+        OUTMSG(( "\n" ));
+    }
+
+    if ( written != NULL ) *written = count;
+
+    return ctx.rc;
+}
+
+
+static rc_t whack_statistic_writer( statistic_writer *writer )
+{
+    rc_t rc = VCursorCommit( writer->cursor );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "VCursorCommit() failed\n" );
+    return rc;
+}
+
+
+typedef struct write_ctx
+{
+    KFile *out;
+    uint64_t pos;
+    uint64_t lines;
+
+    struct progressbar *progress;
+    uint64_t entries;
+    uint8_t fract_digits;
+} write_ctx;
+
+
+static bool CC write_to_file_cb( stat_row * row, void * f_data )
+{
+    write_ctx * wctx = ( write_ctx * ) f_data;
+    char buffer[ 256 ];
+    size_t num_writ;
+
+    rc_t rc = string_printf ( buffer, sizeof buffer, &num_writ,
+                                "%s\t%u\t%u\t%s\t%u\t%u\t%u\t%u\t%u\t%u\n", 
+                                row->spotgroup, 
+                                row->base_pos,
+                                row->n_read,
+                                row->dimer,
+                                row->gc_content,
+                                row->hp_run,
+                                row->max_qual_value,
+                                row->quality,
+                                row->count,
+                                row->mismatch_count );
+
+    if ( rc == 0 )
+    {
+        size_t f_writ;
+        rc = KFileWrite ( wctx->out, wctx->pos, buffer, num_writ, &f_writ );
+        if ( rc == 0 )
+        {
+            uint32_t percent = progressbar_percent( wctx->entries, ++wctx->lines, wctx->fract_digits );
+            update_progressbar( wctx->progress, percent );
+            wctx->pos += f_writ;
+        }
+    }
+    return ( rc == 0 );
+}
+
+
+rc_t write_output_file( KDirectory *dir, statistic * data,
+                        const char * path, uint64_t * written )
+{
+    write_ctx wctx;
+    rc_t rc;
+
+    if ( written != NULL )
+    {
+        *written = 0;
+    }
+    wctx.out = NULL;
+    wctx.pos = 0;
+    wctx.lines = 0;
+    rc = KDirectoryCreateFile ( dir, &wctx.out, false, 0664, kcmInit, "%s", path );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "KDirectoryCreateFile() failed\n" );
+    else
+    {
+        char buffer[ 256 ];
+        size_t num_writ;
+        rc = string_printf ( buffer, sizeof buffer, &num_writ,
+          "SPOTGROUP\tCYCLE\tNRead\tDIMER\tGC_CONTENT\tHP_RUN\tMaxQ\tQuality\tTOTAL\tMISMATCH\n" );
+        if ( rc == 0 )
+        {
+            size_t f_writ;
+            rc = KFileWrite ( wctx.out, wctx.pos, buffer, num_writ, &f_writ );
+            if ( rc == 0 )
+            {
+                if ( written != NULL ) *written = f_writ;
+                wctx.pos += f_writ;
+
+                wctx.entries = data->entries;
+                wctx.fract_digits = progressbar_calc_fract_digits( wctx.entries );
+				make_progressbar( &wctx.progress, wctx.fract_digits );
+				
+                foreach_statistic( data, write_to_file_cb, &wctx );
+
+                destroy_progressbar( wctx.progress );
+                OUTMSG(( "\n" ));
+
+                KFileRelease ( wctx.out );
+                if ( written != NULL )
+                {
+                    *written = wctx.lines;
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t make_schema( const KNamelist * schema_list,
+                  VDBManager *my_manager, VSchema ** schema )
+{
+    rc_t rc = VDBManagerMakeSchema ( my_manager, schema );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "VDBManagerMakeSchema() failed\n" );
+    else
+    {
+        uint32_t count;
+        rc = KNamelistCount ( schema_list, &count );
+        if ( rc !=0 )
+            LogErr( klogInt, rc, "KNamelistCount(schema-list) failed\n" );
+        else
+        {
+            uint32_t i;
+            for ( i = 0; i < count && rc == 0; ++i )
+            {
+                const char * name;
+                rc = KNamelistGet ( schema_list, i, &name );
+                if ( rc !=0 )
+                    LogErr( klogInt, rc, "KNamelistGet(schema-list) failed\n" );
+                else
+                {
+                    rc = VSchemaParseFile ( *schema, "%s", name );
+                    if ( rc !=0 )
+                        LogErr( klogInt, rc, "VSchemaParseFile() failed\n" );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t write_statistic_cmn( VTable * my_table, statistic * data,
+                          uint64_t * written, bool show_progress )
+{
+    VCursor *my_cursor;
+    rc_t rc = VTableCreateCursorWrite( my_table, &my_cursor, kcmInsert );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "VTableCreateCursorWrite() failed\n" );
+    else
+    {
+        statistic_writer writer;
+        rc = make_statistic_writer( &writer, my_cursor );
+        if ( rc == 0 )
+        {
+            rc = write_statistic( &writer, data, written, show_progress );
+            if ( rc == 0 )
+                rc = whack_statistic_writer( &writer );
+        }
+        VCursorRelease( my_cursor );
+    }
+    return rc;
+}
+
+
+rc_t write_statistic_into_tab( KDirectory *dir, statistic * data,
+        const KNamelist *schema_list, const char *output_file_path,
+        uint64_t * written, bool show_progress )
+{
+    VDBManager *my_manager;
+    rc_t rc;
+
+    if ( written != NULL ) *written = 0;
+    rc = VDBManagerMakeUpdate ( &my_manager, dir );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "VDBManagerMakeUpdate() failed\n" );
+    else
+    {
+        VSchema * my_schema;
+        rc = make_schema( schema_list, my_manager, &my_schema );
+        if ( rc == 0 )
+        {
+            VTable * my_table;
+            rc = VDBManagerCreateTable( my_manager, &my_table, my_schema, 
+                                        "NCBI:align:tbl:qstat",
+                                        kcmInit | kcmParents,
+                                        "%s", output_file_path );
+            if ( rc != 0 )
+                LogErr( klogInt, rc, "VDBManagerCreateTable() failed\n" );
+            else
+            {
+                rc = write_statistic_cmn( my_table, data, written, show_progress );
+                VTableRelease( my_table );
+            }
+            VSchemaRelease( my_schema );
+        }
+        VDBManagerRelease( my_manager );
+    }
+    return rc;
+}
+
+
+rc_t write_statistic_into_db( KDirectory *dir, statistic * data,
+         const KNamelist *schema_list, const char *src_path,
+        uint64_t * written, bool show_progress )
+{
+    VDBManager *my_manager;
+    rc_t rc;
+
+    if ( written != NULL ) *written = 0;
+    rc = VDBManagerMakeUpdate ( &my_manager, dir );
+    if ( rc != 0 )
+        LogErr( klogInt, rc, "VDBManagerMakeUpdate() failed\n" );
+    else
+    {
+        VSchema * my_schema;
+        rc = make_schema( schema_list, my_manager, &my_schema );
+        if ( rc == 0 )
+        {
+            VDatabase *my_database;
+            rc = VDBManagerOpenDBUpdate( my_manager, &my_database, 
+                                         my_schema, "%s", src_path );
+            if ( rc != 0 )
+                LogErr( klogInt, rc, "VDBManagerOpenDBUpdate() failed\n" );
+            else
+            {
+                VTable * my_table;
+                rc = VDatabaseCreateTable( my_database, &my_table,
+                                           "QUAL_STAT",
+                                           kcmOpen | kcmParents,
+                                           "QUAL_STAT" );
+                if ( rc !=0 )
+                    LogErr( klogInt, rc, "VDatabaseCreateTable() failed\n" );
+                else
+                {
+                    rc = write_statistic_cmn( my_table, data, written, show_progress );
+                    VTableRelease( my_table );
+                }
+                VDatabaseRelease( my_database );
+            }
+            VSchemaRelease( my_schema );
+        }
+        VDBManagerRelease( my_manager );
+    }
+    return rc;
+}
diff --git a/tools/qual-recalib-stat/writer.h b/tools/qual-recalib-stat/writer.h
new file mode 100644
index 0000000..7dffc3f
--- /dev/null
+++ b/tools/qual-recalib-stat/writer.h
@@ -0,0 +1,79 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_stat_writer_
+#define _h_stat_writer_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <klib/rc.h>
+#include <klib/namelist.h>
+#include <kfs/directory.h>
+#include <vdb/cursor.h>
+#include <vdb/schema.h>
+#include <vdb/manager.h>
+#include <vdb/table.h>
+#include <vdb/database.h>
+#include "columns.h"
+#include "stat_mod_2.h"
+
+#define WIDX_SPOT_GROUP      0
+#define WIDX_KMER            1
+#define WIDX_ORIG_QUAL       2
+#define WIDX_TOTAL_COUNT     3
+#define WIDX_MISMATCH_COUNT  4
+#define WIDX_CYCLE           5
+#define WIDX_HPRUN           6
+#define WIDX_GC_CONTENT      7
+#define WIDX_MAX_QUAL        8
+#define WIDX_NREAD           9
+#define N_WIDX               10
+
+typedef struct statistic_writer
+{
+    VCursor *cursor;
+    col wr_col[ N_WIDX ];
+} statistic_writer;
+
+
+rc_t write_output_file( KDirectory *dir, statistic * data,
+                        const char * path, uint64_t * written );
+
+rc_t write_statistic_into_tab( KDirectory *dir, statistic * data,
+        const KNamelist *schema_list, const char *output_file_path,
+        uint64_t * written, bool show_progress );
+
+rc_t write_statistic_into_db( KDirectory *dir, statistic * data,
+         const KNamelist *schema_list, const char *src_path,
+        uint64_t * written, bool show_progress );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/rd-filter-redact/Makefile b/tools/rd-filter-redact/Makefile
new file mode 100644
index 0000000..d37a9d9
--- /dev/null
+++ b/tools/rd-filter-redact/Makefile
@@ -0,0 +1,95 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/rd-filter-redact
+
+INT_TOOLS = \
+	test-read-write-cursor
+
+EXT_TOOLS = \
+	read-filter-redact
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# read-filter-redact
+#
+READ_FILTER_REDACT_SRC = \
+	read-filter-redact \
+
+READ_FILTER_REDACT_OBJ = \
+	$(addsuffix .$(OBJX),$(READ_FILTER_REDACT_SRC))
+
+READ_FILTER_REDACT_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-wvdb \
+	-lm
+
+$(BINDIR)/read-filter-redact: $(READ_FILTER_REDACT_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(READ_FILTER_REDACT_LIB)
+
+#-------------------------------------------------------------------------------
+# test-read-write-cursor
+#
+TEST_READ_WRITE_CURSOR_SRC = \
+	test-read-write-cursor \
+
+TEST_READ_WRITE_CURSOR_OBJ = \
+	$(addsuffix .$(OBJX),$(TEST_READ_WRITE_CURSOR_SRC))
+
+TEST_READ_WRITE_CURSOR_LIB = \
+	-lkapp \
+	-stk-version \
+	-lncbi-wvdb \
+
+$(BINDIR)/test-read-write-cursor: $(TEST_READ_WRITE_CURSOR_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(TEST_READ_WRITE_CURSOR_LIB)
+
diff --git a/tools/rd-filter-redact/rd-filter-redact.c b/tools/rd-filter-redact/rd-filter-redact.c
new file mode 100644
index 0000000..64063b5
--- /dev/null
+++ b/tools/rd-filter-redact/rd-filter-redact.c
@@ -0,0 +1,1350 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ */
+
+#include <kapp/main.h> /* KMain */
+#include <kapp/log.h> /* plogmsg */
+#include <kfs/file.h> /* KFile */
+#include <klib/rc.h> /* GetRCState */
+#include <sra/wsradb.h> /* SRAMgr */
+#include <sra/sradb-priv.h> /* SRATableGetKTableUpdate */
+#include <vdb/types.h> /* vdb_uint8_t */
+#include <kdb/database.h> /* KDBManagerMakeUpdate */
+#include <kdb/table.h> /*  KTableRelease */
+#include <ctype.h> /* isdigit */
+#include <string.h> /* memset */
+#include <stdio.h> /* sscanf */
+#include <assert.h>
+#include <sys/stat.h> /* umask */
+
+#include <stdlib.h> /* system */
+
+
+typedef struct Context
+{
+    const char* file_path;
+    const char* table_path;
+    const char * schema_path;
+
+    KDirectory * pwd;
+    VDBManager * mgr;
+    VSchema * schema;
+    VTable * table;
+
+
+    const KFile * file;
+
+
+
+    bool force;
+    
+} Context
+
+struct SArgs {
+};
+struct SData {
+    SRATable* _wrTbl;
+    const SRATable* _rdTbl;
+    const SRAColumn* _origFilterCol;
+    const SRAColumn* _NReadsCol;
+    const char* _origFilterColName;
+    bool _existedRD_FILTER;
+    bool _locked;
+};
+
+
+
+static KDirectory* __SpotIteratorDirectory = NULL;
+/** SpotIterator: iterate spot numbers from 1 to max;
+input spots to reduct from the file */
+struct SpotIterator {
+    spotid_t m_crnSpotId;
+    spotid_t m_maxSpotId;
+
+    spotid_t m_spotToReduct;
+
+    const char* m_filename;
+    size_t m_line;
+    const KFile* m_file;
+    size_t m_filePos;
+    bool m_eof;
+
+    char m_buffer[512];
+    size_t m_inBuffer;
+    char m_ch;
+    bool m_hasCh;
+};
+
+/** Init the static directory object */
+static rc_t SpotIteratorInitDirectory   (void)
+{
+    if (__SpotIteratorDirectory)
+    {
+        return 0;
+    }
+    else
+    {
+        rc_t rc = KDirectoryNativeDir(&__SpotIteratorDirectory);
+        if (rc != 0)
+        {
+            logerr(klogErr, rc, "while calling KDirectoryNativeDir");
+        }
+        return rc;
+    }
+}
+
+static
+bool PathExists (const KDirectory * dir, KPathType desired_type, const char * path, ...)
+{
+    KPathType found_type;
+    bool found;
+    va_list args;
+
+    va_start (args, path);
+
+    found_type = KDirectoryVPathType (dir, path, args);
+    found_type &= ~kptAlias;
+
+    found = (found_type == desired_type)
+
+    va_end (args);
+    return found;
+}
+
+
+
+/** Check file existance */
+static bool SpotIteratorFileExists(const char* path, ...)
+{
+    bool found = false;
+    if (SpotIteratorInitDirectory() == 0)
+    {
+        uint32_t type
+        va_list args;
+        va_start(args, path);
+
+        type = KDirectoryVPathType(__SpotIteratorDirectory, path, args);
+        found = (type != kptNotFound);
+        va_end(args);
+    }
+    return found;
+}
+
+static bool SpotIteratorBufferAdd(struct SpotIterator* self, char ch)
+{
+    assert(self);
+
+    if (self->m_inBuffer >= (sizeof self->m_buffer - 1))
+    {
+        return false;
+    }
+
+    self->m_buffer[self->m_inBuffer++] = ch;
+    self->m_buffer[self->m_inBuffer] = '\0';
+
+    return true;
+}
+
+/** Read a character from the input file */
+static rc_t SpotIteratorFileReadWithEof(struct SpotIterator* self,
+    void* buffer, size_t bsize)
+{
+    rc_t rc = 0;
+    size_t num_read = 0;
+
+    assert(self);
+
+    rc = KFileRead(self->m_file, self->m_filePos, buffer, bsize, &num_read);
+    if (rc == 0)
+    {
+        if (num_read == 0)
+        {
+            self->m_eof = true;
+        }
+        else
+        {
+            self->m_filePos += num_read;
+        }
+    }
+    else
+    {
+        plogerr(klogErr, rc, "on line $(lineno) while reading file '$(path)'",
+                PLOG_U64(lineno) ",path=%s", self->m_line, self->m_filename);
+    }
+
+    return rc;
+}
+
+/** Read a line from the input file */
+static rc_t SpotIteratorReadLine(struct SpotIterator* self)
+{
+    rc_t rc = 0;
+    bool ok = true; /* ok means 'no input buffer overflow' */
+
+    /* to skip leading/traling spaces */
+    enum ELane
+    {
+        eBefore,
+        eIn,
+        eAfter
+    } state = eBefore;
+
+    if (self->m_eof) {
+        return rc;
+    }
+
+    assert(self);
+
+    ++self->m_line;
+    self->m_inBuffer = 0;
+
+    /* get back the saved character */
+    if (self->m_hasCh) {
+        SpotIteratorBufferAdd(self, self->m_ch);
+        if (!isblank(self->m_ch)) {
+            state = eIn;
+        }
+        self->m_hasCh = false;
+    }
+
+    while (ok && !self->m_eof) /* do until in-buffer overflow or EOF*/{
+        char ch = 0;
+        /* get next characted */
+        if ((rc = SpotIteratorFileReadWithEof(self, &ch, 1)) != 0) {
+            return rc;
+        }
+
+        if (!self->m_eof) {
+            /* treat leading/trailing spaces */
+            switch (state) {
+                /* skip leading spaces */
+                case eBefore:
+                    if (isblank(ch)) {
+                        continue;
+                    }
+                    else {
+                        state = eIn;
+                    }
+                    break;
+                case eIn:
+                    if (isblank(ch)) {
+                        state = eAfter;
+                        continue;
+                    }
+                    break;
+                /* skip trailing spaces */
+                case eAfter:
+                    if (isblank(ch)) {
+                        continue;
+                    }
+                    else if (ch != '\n' && ch != '\r') {
+                        rc = RC(rcExe, rcFile, rcReading, rcChar, rcUnexpected);
+                        plogerr(klogErr, rc, "bad symbol '$(char)' "
+                            "on line $(lineno) in file '$(path)': '$(line)...'",
+                            "char=%c," PLOG_U64(lineno) ",path=%s,line=%s",
+                            ch, self->m_line, self->m_filename, self->m_buffer);
+                        return rc;
+                    }
+                    break;
+            }
+
+            /* add next non-blank characted */
+            if ((ok = SpotIteratorBufferAdd(self, ch))) {
+      /* all combinations as "\r", "\n", "\r\n", "\n\r" are considered as EOL */
+                if (ch == '\n' || ch == '\r') {
+                    char c1 = 0;
+                    if ((rc = SpotIteratorFileReadWithEof(self, &c1, 1)) != 0) {
+                        return rc;
+                    }
+                    if (self->m_eof) {
+                        break;
+                    }
+                    else if ((c1 != '\n' && c1 != '\r') || (ch == c1)) {
+       /* save the character when EOL is a single character (WINDOWS) */
+                        self->m_ch = c1;
+                        self->m_hasCh = true;
+                        break;
+                    }
+                    else {
+                        ok = SpotIteratorBufferAdd(self, c1);
+                        break;
+                    }
+                }
+            }
+        }
+    }
+
+    /* remove EOL */
+    if (ok) {
+        bool done = false;
+
+        while (self->m_inBuffer > 0 && !done) {
+            switch (self->m_buffer[self->m_inBuffer - 1]) {
+                case '\n': case '\r':
+                    self->m_buffer[--self->m_inBuffer] = '\0';
+                    break;
+                default:
+                    done = true;
+                    break;
+            }
+        }
+    }
+    else {
+        rc = RC(rcExe, rcFile, rcReading, rcString, rcTooLong);
+        plogerr(klogErr, rc,
+            "on line $(lineno) while reading file '$(path)': '$(line)...'",
+            PLOG_U64(lineno) ",path=%s,line=%s",
+            self->m_line, self->m_filename, self->m_buffer);
+    }
+
+    return rc;
+}
+
+/** Get next spot from the input file */
+static rc_t SpotIteratorReadSpotToRedact(struct SpotIterator* self)
+{
+    rc_t rc = 0;
+
+    assert(self);
+
+    while (rc == 0 && ! self->m_eof) {
+        rc = SpotIteratorReadLine(self);
+
+                         /* skip empty lines */ 
+        if ((rc == 0) && (self->m_inBuffer > 0)) {
+            spotid_t spot = 0;
+
+            /* make sure the line contains digits only */
+            int i = 0;
+            for (i = 0; i < self->m_inBuffer; ++i) {
+                if (!isdigit(self->m_buffer[i])) {
+                    rc = RC(rcExe, rcFile, rcReading, rcChar, rcUnexpected);
+                    plogerr(klogErr, rc, "character '$(char)' on line $(lineno)"
+                            " while reading file '$(path)': '$(line)'",
+                        "char=%c," PLOG_U64(lineno) ",path=%s,line=%s",
+                        self->m_buffer[i], self->m_line,
+                        self->m_filename, self->m_buffer);
+                    return rc;
+                }
+            }
+
+            sscanf(self->m_buffer, "%uld", &spot);
+
+            if (spot == 0) {
+                rc = RC(rcExe, rcFile, rcReading, rcString, rcInvalid);
+                plogerr(klogErr, rc,
+                    "bad spot id '0' on line $(lineno) "
+                    "while reading file '$(path)': '$(line)'",
+                    PLOG_U64(lineno) ",path=%s,line=%s",
+                    self->m_line, self->m_filename, self->m_buffer);
+            }
+            else if (spot == self->m_spotToReduct) {
+                rc = RC(rcExe, rcFile, rcReading, rcString, rcInvalid);
+                plogerr(klogErr, rc, "duplicated spot id '$(spot)' "
+                    "on line $(lineno) while reading file '$(path)': '$(line)'",
+                    PLOG_U32(spot) "," PLOG_U64(lineno) ",path=%s,line=%s",
+                    spot, self->m_line, self->m_filename, self->m_buffer);
+            }
+            else if (spot < self->m_spotToReduct) {
+                rc = RC(rcExe, rcFile, rcReading, rcString, rcInvalid);
+                plogerr(klogErr, rc, "File '$(path)' is unsorted. "
+                    "$(id) < $(last). See line $(lineno): '$(line)'",
+                    "path=%s," PLOG_U32(id) "," PLOG_U32(last) ","
+                        PLOG_U64(lineno) ",line=%s",
+                    self->m_filename, spot, self->m_spotToReduct,
+                    self->m_line, self->m_buffer);
+            }
+            else if (spot > self->m_maxSpotId) {
+                rc = RC(rcExe, rcFile, rcReading, rcString, rcInvalid);
+                plogerr(klogErr, rc, "spotId $(spot) on line $(lineno) "
+                    "of file '$(path)' is bigger that the max spotId $(max): "
+                        "'$(line)'",
+                    PLOG_U32(spot) "," PLOG_U64(lineno) ",path=%s,"
+                    PLOG_U32(max) ",line=%s",
+                    spot, self->m_line, self->m_filename, self->m_maxSpotId,
+                    self->m_buffer);
+            }
+            else {
+                self->m_spotToReduct = spot;
+                self->m_inBuffer = 0;
+            }
+            break;
+        }
+    }
+
+    return rc;
+}
+
+static rc_t SpotIteratorInit(struct SpotIterator* self,
+    const SRATable* tbl, const char* redactFileName)
+{
+    rc_t rc = 0;
+
+    assert(self && tbl && redactFileName);
+
+    memset(self, 0, sizeof *self);
+
+    self->m_crnSpotId = 1;
+
+    rc = SRATableMaxSpotId(tbl, &self->m_maxSpotId);
+    if (rc != 0) {
+        logerr(klogErr, rc, "while calling SRATableMaxSpotId");
+    }
+    else {
+        plogmsg(klogInfo,
+            "MaxSpotId = $(spot)", PLOG_U32(spot), self->m_maxSpotId);
+    }
+
+    if (rc == 0) {
+        rc = SpotIteratorInitDirectory();
+    }
+
+    if (rc == 0) {
+        self->m_filename = redactFileName;
+        plogmsg(klogInfo, "Opening '$(path)'", "path=%s", self->m_filename);
+        rc = KDirectoryOpenFileRead(
+            __SpotIteratorDirectory, &self->m_file, "%s", self->m_filename);
+        if (rc != 0) {
+            plogerr(klogErr, rc,
+                "while opening file '$(path)'", "path=%s", self->m_filename);
+        }
+    }
+
+    if (rc == 0) {
+        rc = SpotIteratorReadSpotToRedact(self);
+    }
+
+    return rc;
+}
+
+/** Get next spot id, check whether it should be redacted.
+Returns false if maxSpotId reached */
+static bool SpotIteratorNext(struct SpotIterator* self, rc_t* rc,
+    spotid_t* spot, bool* toRedact)
+{
+    bool hasNext = false;
+
+    assert(self && rc && spot && toRedact);
+
+    *rc = 0;
+    *toRedact = false;
+
+    if (self->m_crnSpotId <= self->m_maxSpotId) {
+        hasNext = true;
+        *spot = self->m_crnSpotId++;
+    }
+
+    if (*spot == self->m_spotToReduct) {
+        *toRedact = true;
+        *rc = SpotIteratorReadSpotToRedact(self);
+        if (*rc != 0) {
+            hasNext = false;
+        }
+    }
+
+    return hasNext;
+}
+
+static rc_t SpotIteratorDestroy(struct SpotIterator* self)
+{
+    assert(self);
+    KDirectoryRelease(__SpotIteratorDirectory);
+    __SpotIteratorDirectory = NULL;
+    return KFileRelease(self->m_file);
+}
+
+/** The main data structure */
+
+static rc_t SDataInit(struct SData* self,
+    const char* tablePath, const SRAMgr* rdMgr, rc_t rc)
+{
+    SRAMgr* wrMgr = NULL;
+
+    assert(self);
+    memset(self, 0, sizeof *self);
+    if (rc)
+    {   return rc; }
+
+    rc = SRAMgrMakeUpdate(&wrMgr, NULL);
+    if (rc != 0) {
+        logerr(klogErr, rc, "while calling SRAMgrMakeUpdate");
+    }
+    else {
+        plogmsg(klogInfo,
+            "Opening Table $(path) for read", "path=%s", tablePath);
+        rc = SRAMgrOpenTableRead(rdMgr, &self->_rdTbl, "%s", tablePath);
+        if (rc != 0) {
+            plogerr(klogErr, rc,
+                "cannot open table $(path) for read", "path=%s", tablePath);
+        }
+    }
+
+    if (rc == 0) {
+        plogmsg(klogInfo,
+            "Opening Table $(path) for update", "path=%s", tablePath);
+        rc = SRAMgrOpenTableUpdate(wrMgr, &self->_wrTbl, "%s", tablePath);
+        if (rc != 0) {
+            plogerr(klogErr, rc,
+                "cannot open table $(path) for update", "path=%s", tablePath);
+        }
+    }
+
+    SRAMgrRelease(wrMgr);
+
+    return rc;
+}
+
+static rc_t SDataPrepareCols(struct SData* self,
+    const char* rdFilterName, const char* readFilterName)
+{
+    rc_t rc = 0;
+
+    assert(self);
+
+    if (rc == 0) {
+        const char name[] = "NREADS";
+        rc = SRATableOpenColumnRead(self->_rdTbl,
+            &self->_NReadsCol, name, vdb_uint8_t);
+        if (rc != 0) {
+            if (GetRCState(rc) == rcNotFound) {
+                rc = 0;
+            }
+            else {
+                plogerr(klogErr, rc,
+                    "while calling SRATableOpenColumnRead($name)", "name=%s",
+                    name);
+            }
+        }
+    }
+
+    /* It the physical column exists, open it */
+    if (rc == 0) {
+        rc = SRATableOpenColumnRead(self->_rdTbl,
+            &self->_origFilterCol, rdFilterName, sra_read_filter_t);
+        if (rc == 0) {
+            plogmsg(klogDebug1,
+                "Found '$(name)' column", "name=%s", rdFilterName);
+            self->_existedRD_FILTER = true;
+            self->_origFilterColName = rdFilterName;
+        }
+        else if (GetRCState(rc) == rcNotFound) {
+            plogmsg(klogDebug1,
+                "Column '$(name)' does not exist", "name=%s", rdFilterName);
+            rc = 0;
+        }
+        else {
+            plogerr(klogErr, rc, "while calling SRATableOpenColumnRead($name)",
+                "name=%s", rdFilterName);
+        }
+    }
+
+    /* Otherwise open the virtual one */
+    if (rc == 0 && ! self->_existedRD_FILTER) {
+        rc = SRATableOpenColumnRead(self->_rdTbl,
+            &self->_origFilterCol, readFilterName, sra_read_filter_t);
+        if (rc != 0) {
+            plogerr(klogErr, rc,
+                "while calling SRATableOpenColumnRead($name)", "name=%s",
+                readFilterName);
+        }
+    }
+
+    return rc;
+}
+
+/** Keeps track when to cut the blob */
+struct SBlob {
+    bool m_new;
+    spotid_t m_maxSpotId;
+    const struct SData* m_data;
+};
+
+static rc_t SBlobInit(struct SBlob* self,
+    const struct SData* data, const struct SpotIterator* it)
+{
+    rc_t rc = 0;
+    bool newColumn = true;
+
+    assert(self && data && it);
+
+    memset(self, 0, sizeof *self);
+
+    if (data->_existedRD_FILTER) {
+        /* blob range will be read from the existing blob */
+        newColumn = false;
+    }
+
+    self->m_new = newColumn;
+    self->m_maxSpotId = it->m_maxSpotId;
+    self->m_data = data;
+
+    return rc;
+}
+
+static rc_t SBlobGetRange(const struct SBlob* self,
+    spotid_t id, spotid_t* last)
+{
+    rc_t rc = 0;
+    spotid_t first = 0;
+
+    assert(self && last);
+
+    if (self->m_new) {
+        first = (id & ~0xFFFF) + 1;
+        *last = first + 0xFFFF;
+        if (*last > self->m_maxSpotId) {
+            *last = self->m_maxSpotId;
+        }
+        plogmsg(klogDebug1, "New blob range for spot $(id) is "
+                "$(first) - $(last) ($(xfirst) - $(xlast))",
+            PLOG_U32(id) "," PLOG_U32(first) "," PLOG_U32(last) ","
+                PLOG_X32(xfirst) "," PLOG_X32(xlast),
+            id, first, *last, first, *last);
+    }
+    else {
+        assert(self->m_data && self->m_data->_origFilterCol);
+        rc = SRAColumnGetRange(self->m_data->_origFilterCol, id, &first, last);
+        if (rc != 0) {
+            plogerr(klogErr, rc, "Cannot SRAColumnGetRange $(id)",
+                PLOG_U32(id), id);
+        }
+        else {
+            plogmsg(klogDebug1, "Existing blob range for spot $(id) is "
+                    "$(first) - $(last) ($(xfirst) - $(xlast))",
+                PLOG_U32(id) "," PLOG_U32(first) "," PLOG_U32(last) ","
+                    PLOG_X32(xfirst) "," PLOG_X32(xlast),
+                id, first, *last, first, *last);
+        }
+    }
+
+    return rc;
+}
+
+static rc_t SDataUpdate(struct SData* self,
+    const char* newColName, const char* redactFileName,
+    spotid_t* redactedSpots, spotid_t* all)
+{
+    struct SBlob blob;
+    uint8_t filter[32];
+    rc_t rc = 0, rc2 = 0;
+    uint32_t colIdx = 0;
+    spotid_t spot = 0, last = 0;
+    bool toRedact = false;
+    struct SpotIterator it;
+
+    assert(self && redactedSpots && all);
+
+    memset(filter, SRA_READ_FILTER_REDACTED, sizeof filter);
+
+    if ((rc = SpotIteratorInit(&it, self->_rdTbl, redactFileName))
+        == 0)
+    {
+        rc = SRATableOpenColumnWrite
+            (self->_wrTbl, &colIdx, NULL, newColName, sra_read_filter_t);
+        if (rc != 0) {
+            plogerr(klogErr, rc,
+                "cannot open Column $(path) for Write", "path=%s", newColName);
+            return rc;
+        }
+    }
+    else {
+        return rc;
+    }
+
+    rc = SBlobInit(&blob, self, &it);
+    if (rc != 0) {
+        return rc;
+    }
+
+    while (rc == 0 && SpotIteratorNext(&it, &rc, &spot, &toRedact)) {
+        bitsz_t offset = 0, size = 0;
+        const void *base = NULL;
+        uint8_t nReads = 0;
+
+        if (rc != 0) {
+            break;
+        }
+
+        plogmsg(klogDebug2, "Spot $(spot): $(action)",
+            PLOG_U32(spot) ",action=%s",
+            spot, toRedact ? "redact" : "original");
+
+        /* GET NEXT BLOB RANGE */
+        if (spot == 1 || spot > last) {
+            rc = SBlobGetRange(&blob, spot, &last);
+            if (rc != 0) {
+                break;
+            }
+        }
+
+        assert(spot <= last);
+
+        /* GET NREADS */
+        if ((rc = SRAColumnRead
+            (self->_NReadsCol, spot, &base, &offset, &size)) != 0)
+        {
+            logerr(klogErr, rc, "cannot SRAColumnRead");
+            break;
+        }
+        else if (offset != 0 || size != sizeof nReads * 8) {
+            rc = RC(rcExe, rcColumn, rcReading, rcData, rcInvalid);
+            plogerr(klogErr, rc,
+                "Bad SRAColumnRead(\"NREADS\", $(spot)) result",
+                PLOG_U32(spot), spot);
+        }
+        else {
+            nReads = *((uint8_t*) base);
+            if (spot == 1) {
+                if (nReads == 1) {
+                    plogmsg(klogInfo, "The first spot has $(nreads) read",
+                        "nreads=%d", nReads);
+                }
+                else {
+                    plogmsg(klogInfo, "The first spot has $(nreads) reads",
+                        "nreads=%d", nReads);
+                }
+            }
+        }
+
+        /* GET READ_FILTER */
+        if (toRedact) {
+            base = filter;
+            ++(*redactedSpots);
+        }
+        else {
+            if ((rc = SRAColumnRead(self->_origFilterCol,
+                spot, &base, &offset, &size)) != 0)
+            {
+                plogerr(klogErr, rc,
+                    "while calling SRAColumnRead($(name))", "name=%s",
+                    "READ_FILTER");
+                break;
+            }
+            else if (offset != 0
+                  || size != sizeof (uint8_t) * 8 * nReads)
+            {
+                rc = RC(rcExe, rcColumn, rcReading, rcData, rcInvalid);
+                plogerr(klogErr, rc, "Bad SRAColumnRead($(spot)) result",
+                    PLOG_U32(spot), spot);
+            }
+        }
+
+        if ((rc = SRATableOpenSpot(self->_wrTbl, spot)) != 0) {
+            plogerr(klogErr, rc, "cannot open Spot $(id)", PLOG_U32(id), spot);
+            break;
+        }
+        if ((rc = SRATableWriteIdxColumn(self->_wrTbl,
+            colIdx, base, 0, sizeof (uint8_t) * 8 * nReads)) != 0)
+        {
+            logerr(klogErr, rc, "cannot SRATableWriteIdxColumn");
+            break;
+        }
+        if ((rc = SRATableCloseSpot(self->_wrTbl)) != 0) {
+            logerr(klogErr, rc, "cannot SRATableCloseSpot");
+            break;
+        }
+
+        /* CUT THE BLOB */
+        if (spot == last) {
+            rc = SRATableCloseCursor(self->_wrTbl);
+            if (rc != 0) {
+                plogerr(klogErr, rc, "cannot SRATableCloseCursor $(id)",
+                    PLOG_U32(id), spot);
+                break;
+            }
+        }
+    }
+
+    rc2 = SpotIteratorDestroy(&it);
+    if (rc == 0)
+    {   rc = rc2; }
+
+    *all = spot;
+
+    return rc;
+}
+
+static rc_t SDataDestroy(struct SData* self, bool commit) {
+    rc_t rc = 0, rc2 = 0;
+    assert(self);
+
+    rc2 = SRAColumnRelease(self->_origFilterCol);
+    self->_origFilterCol = NULL;
+    if (rc == 0)
+    { rc = rc2; }
+
+    rc2 = SRAColumnRelease(self->_NReadsCol);
+    self->_NReadsCol = NULL;
+    if (rc == 0)
+    { rc = rc2; }
+
+    rc2 = SRATableRelease(self->_rdTbl);
+    self->_rdTbl = NULL;
+    if (rc == 0)
+    { rc = rc2; }
+
+    if (commit && rc == 0) {
+        rc = SRATableCommit(self->_wrTbl);
+    }
+
+    rc2 = SRATableRelease(self->_wrTbl);
+    self->_wrTbl = NULL;
+    if (rc == 0)
+    { rc = rc2; }
+
+    return rc;
+}
+
+/** Command line arguments */
+
+
+static bool __BadLogLevel = false;
+static const char *__dummy4NextLogLevel(void *data)
+{
+    __BadLogLevel = true;
+    return "info";
+}
+
+static KLogLevel __defaultLogLevel;
+
+static void Usage(const char *argv0, const char *msg, ...)
+{
+    if (msg) {
+        va_list args;
+        va_start(args, msg);
+        vfprintf(stderr, msg, args);
+        fprintf(stderr, "\n\n");
+        va_end(args);
+    }
+
+    fprintf(stderr, "Usage:\n"
+        "%s -D <table> -F <file> [ -l <level> ]\n"
+        "\t-D --table-path\tSRA Table directory path\n"
+        "\t-F --file      \tFile containing SpotId-s to redact\n"
+        "\t-f --force     \tForce overwriting of already redacted table\n"
+        "\t-l --level     \t"
+                 "Log level: 0-13 or fatal|sys|int|err|warn|info|debug[1-10].",
+        argv0);
+
+    {
+        char logLevel[64];
+        rc_t rc = KLogLevelExplain
+            (__defaultLogLevel, logLevel, sizeof logLevel, NULL);
+        if (rc == 0) {
+            fprintf(stderr, " Default: %s", logLevel);
+        }
+    }
+
+    fprintf(stderr, "\n");
+}
+
+/** Get command line key with argument */
+static bool GetArg(int* argI, int argc, char* argv[],
+    const char* shortArg, const char* longArg,
+    const char** out, const char* error, rc_t* errorRc)
+{
+    bool found = false;
+
+    assert(argI && (*argI < argc) && longArg && argv && out && errorRc);
+
+    if (strcmp(argv[*argI], longArg) == 0) {
+        found = true;
+    }
+    else if (shortArg && (strcmp(argv[*argI], shortArg) == 0)) {
+        found = true;
+    }
+    if (!found) {
+        return false;
+    }
+
+    if ((*argI + 1) >= argc) {
+        Usage(argv[0], error);
+        *errorRc = RC(rcExe, rcArgv, rcReading, rcParam, rcInvalid);
+    }
+    else {
+        *out = argv[++(*argI)];
+    }
+
+    return true;
+}
+
+#define OPTION_TABLE "table-path"
+#define ALIAS_TABLE  "D"
+
+#define OPTION_FILE  "file"
+#define ALIAS_FILE   "F"
+
+#define OPTION_SCHEMA  "schema"
+#define ALIAS_SCHEMA   "S"
+
+#define OPTION_FORCE  "force"
+#define ALIAS_FORCE   "F"
+
+OptDef Options[] = 
+{
+    { OPTION_TABLE,  ALIAS_TABLE,  NULL, table_usage,  1, true,  true },
+    { OPTION_FILE,   ALIAS_FILE,   NULL, file_usage,   1, true,  true },
+    { OPTION_SCHEMA, ALIAS_SCHEMA, NULL, schema_usage, 1, true,  true },
+    { OPTION_FORCE,  ALIAS_FORCE,  NULL, force_usage,  0, false, false }
+};
+
+
+static
+rc_t open_and_run (Context * context)
+{
+    KDirectory * pwd;
+    rc_t rc;
+
+    rc = KDirectoryNativeDir (&pwd);
+    if (rc)
+        LOGERR (klogFatal, rc, "Unable to open file system");
+    else
+    {
+        if (PathExists (pwd, kptDile, context->file_path))
+        {
+            if (PathExists (pwd, kptDile, context->file_path))
+            {
+                VDBManager * vmgr;
+
+                rc = VDBManagerMakeUpdate (&vmgr, pwd);
+                if (rc)
+                    LOGERR (kptInt, "Failed to create a database manager");
+                else
+                {
+                    VSchema * vschema;
+
+                    rc = VDBManagerMakeSchema (vmgr, &vschema);
+                    if (rc)
+                        LOGERR (kptInt, "Failed to create schema");
+                    else
+                    {
+                        rc = VSchemaParseFile (vschema, args->schema);
+                        if (rc)
+                            PLOGERR (klogFatal, (klogFatal, 
+                                                 "Unable to parse schema file ($S)",
+                                                 "S=%s", args->schema));
+                        else
+                        {
+                            VTable * vtable;
+                            rc = VDBManagerOpenTableUpdate (vmgr, &vtable, SCHEMA, args->table);
+                            if (rc)
+                                PLOGERR (klogFatal, (klogFatal, "Unable to open table ($T)",
+                                             "T=%s", args->table));
+                            else
+                            {
+
+                        
+                                VTableRelease (vtable);
+                            }
+                        }
+                        VSchemaRelease (vschema);
+                    }
+                    VDBManagerRelease (vmgr);
+                }
+            }
+            else
+                PLOGERR (kptFatal, (kptFatal, "table paramaeter is not a table directory ($F)",
+                                    "F=%s", args->table));
+        }
+        else
+            PLOGERR (kptFatal, (kptFatal, "file paramaeter is not a file ($F)",
+                                "F=%s", context->file_path));
+
+
+
+        KPathType pt;
+
+        pt = KDirectoryPathType (arg->file);
+        if ((pt & ~kptAlias) != kptFile)
+        else
+        {
+        }
+        KDirectoryRelease (pwd);
+    }
+    return rc;
+}
+
+    rc_t rc = 0;
+
+    spotid_t all = 0, redacted = 0;
+    bool locked = false;
+
+    SRAMgr* rdMgr = NULL;
+    KTable* ktbl = NULL;
+
+    struct SData data;
+
+    const char readFilterName   [] = "READ_FILTER";
+    const char rdFilterName     [] = "RD_FILTER";
+    const char readFilterNameNew[] = "TMP_READ_FILTER";
+    const char rdFilterNameNew  [] = "TMP_RD_FILTER";
+    const char colNameSave      [] = "RD_FILTER_BAK";
+
+    const char* redactFileName = NULL;
+    const char* tablePath = NULL;
+
+    struct SArgs args;
+
+    /* PARSE COMMAND LINE, MAKE SURE INPUTS EXIST */
+    rc = SArgsMake(&args, argc, argv);
+    if (rc)
+    {   return rc; }
+
+    tablePath      = args._table;
+    redactFileName = args.file;
+
+    /* WAS THIS RUN ALREADY REDUCTED ? */
+    if (! args._force
+        && SpotIteratorFileExists("%s/col/%s", tablePath, colNameSave))
+    {
+        rc = RC(rcExe, rcTable, rcOpening, rcColumn, rcExists);
+        plogerr(klogErr, rc,
+            "'$(path)' was redacted already", "path=%s", tablePath);
+    }
+
+    umask(2);
+
+    /* OPEN THE MANAGER */
+    if (rc == 0) {
+        rc = SRAMgrMakeUpdate(&rdMgr, NULL);
+        if (rc != 0) {
+            logerr(klogErr, rc, "while calling SRAMgrMakeUpdate(rd)");
+        }
+    }
+
+    /* UNLOCK THE RUN */
+    if (rc == 0) {
+        rc = SRAMgrUnlock(rdMgr, "%s", tablePath);
+        if (rc) {
+            if (GetRCState(rc) == rcUnlocked) {
+                plogmsg(klogInfo,
+                    "'$(path)' was not locked", "path=%s", tablePath);
+                rc = 0;
+            }
+            else {
+                plogerr(klogErr, rc, "while calling SRAMgrUnlock($(path))",
+                    "path=%s", tablePath);
+            }
+        }
+        else {
+            plogmsg(klogInfo, "'$(path)' was unlocked", "path=%s", tablePath);
+            locked = true;
+        }
+    }
+
+    /* INITIALIZE */
+    rc = SDataInit(&data, tablePath, rdMgr, rc);
+
+    if (rc == 0) {
+        logmsg(klogDebug2, "Calling SRATableGetKTableUpdate");
+        rc = SRATableGetKTableUpdate(data._wrTbl, &ktbl);
+        if (rc != 0) {
+            logerr(klogErr, rc, "while calling SRATableGetKTableUpdate");
+        }
+    }
+
+    /* OPEN INPUT COLUMNS */
+    if (rc == 0) {
+        rc = SDataPrepareCols(&data, rdFilterName, readFilterName);
+    }
+
+    if (rc == 0) {
+        /* just for fun, tell ktable to drop this column */
+        KTableDropColumn(ktbl, "%s", rdFilterNameNew);
+        KTableDropColumn(ktbl, "%s", colNameSave);
+
+        /* THE MAIN WORKING FUNCTION */
+        rc = SDataUpdate
+            (&data, readFilterNameNew, redactFileName, &redacted, &all);
+    }
+
+    /* CLEANUP */
+
+    {
+        rc_t rc2 = SDataDestroy(&data, rc == 0);
+        if (rc == 0) {
+            rc = rc2;
+        }
+    }
+
+    /* REMAME THE PHYSICAL COLUMNS */
+    if (rc == 0) {
+        if (data._existedRD_FILTER) {
+            plogmsg(klogDebug1, "Renaming '$(from)' to '$(to)'",
+                "from=%s,to=%s", rdFilterName, colNameSave);
+            rc = KTableRenameColumn(ktbl, rdFilterName, colNameSave);
+            if (rc != 0) {
+                plogerr(klogErr, rc,
+                    "while renaming column from '$(from)' to '$(to)'",
+                    "from=%s,to=%s", rdFilterName, colNameSave);
+            }
+        }
+        if (rc == 0) {
+            plogmsg(klogDebug1, "Renaming '$(from)' to '$(to)'",
+                "from=%s,to=%s",
+                rdFilterNameNew, rdFilterName);
+            rc = KTableRenameColumn(ktbl, rdFilterNameNew, rdFilterName);
+            if (rc != 0) {
+                plogerr(klogErr, rc,
+                    "while renaming column from '$(from)' to '$(to)'",
+                    "from=%s,to=%s", rdFilterNameNew, rdFilterName);
+            }
+        }
+    }
+    else if (ktbl) {
+        rc_t rc2 = KTableDropColumn(ktbl, "%s", rdFilterNameNew);
+        if (rc2 != 0) {
+            plogerr(klogErr, rc2, "while dropping column '$(name)'",
+                "name=%s", rdFilterNameNew);
+        }
+    }
+
+    {
+        rc_t rc2 = KTableRelease(ktbl);
+        if (rc == 0)
+        { rc = rc2; }
+    }
+
+    if (locked) {
+        rc_t rc2 = 0;
+        plogmsg(klogInfo, "Relocking '$(path)'", "path=%s", tablePath);
+        rc2 = SRAMgrLock(rdMgr, "%s", tablePath);
+        if (rc2 != 0) {
+            plogerr(klogErr, rc2, "while calling SRAMgrLock($(path))",
+                "path=%s", tablePath);
+            if (rc == 0)
+            { rc = rc2; }
+        }
+    }
+
+    {
+        rc_t rc2 = SRAMgrRelease(rdMgr);
+        if (rc == 0)
+        { rc = rc2; }
+    }
+
+    if (rc == 0) {
+        plogmsg(klogInfo, "'$(path)': redacted $(redacted) spots out of $(all)",
+            "path=%s," PLOG_U32(redacted) "," PLOG_U32(all),
+            tablePath, redacted, all);
+    }
+    else {
+        plogmsg(klogInfo, "Failed to redact '$(path)'", "path=%s", tablePath);
+    }
+
+    return rc;
+}
+
+
+static
+rc_t run (Context * context)
+{
+    rc_t rc;
+
+    return rc;
+}
+
+
+static
+rc_t open_and_run (Context * context)
+{
+    KDirectory * pwd;
+    rc_t rc;
+
+    /* first get a toe hold in the file system */
+    rc = KDirectoryNativeDir (&context->pwd);
+    if (rc)
+        LOGERR (klogFatal, rc, "Unable to open file system");
+    else
+    {
+        /* try to open the file of redactions */
+        rc = KDirectoryOpenFileRead (context->pwd, &context->file, "%s", conext->file_path);
+        if (rc)
+            PLOGERR (kptFatal, (kptFatal, rc, "Failed to open redactions file ($(F))",
+                                context->file_path));
+        else
+        {
+            /* okay we've got the non-data base stuff up so get
+             * a toe hold in the VDatabase */
+            rc = VDBManagerMakeUpdate (&context->mgr, context->pwd);
+            if (rc)
+                LOGERR (kptInt, "Failed to create a database manager");
+            else
+            {
+                /* build a schema object */
+                rc = VDBManagerMakeSchema (context->mgr, &ontext->schema);
+                if (rc)
+                    LOGERR (kptInt, "Failed to create schema");
+                else
+                {
+                    /* fill it with the specified schema */
+                    rc = VSchemaParseFile (context->schema, "%s", context->schema_path);
+                    if (rc)
+                        PLOGERR (klogFatal, (klogFatal, 
+                                             "Unable to parse schema file ($S)",
+                                             "S=%s", args->schema));
+                    else
+                    {
+                        /* now open the table with that schema */
+                        rc = VDBManagerOpenTableUpdate (context->mgr, &context->table,
+                                                        context->schema, "%s", context->table_path);
+                        if (rc)
+                            PLOGERR (klogFatal, (klogFatal, "Unable to open table ($T)",
+                                                 "T=%s", args->table));
+                        else
+                        {
+                            /* most stuff is open */
+                            rc = run (context);
+
+                            VTableRelease (context->table);
+                        }
+                    }
+                    VSchemaRelease (context->schema);
+                }
+                VDBManagerRelease (context->mgr);
+            }
+            KFileRelease (context->file);
+        }
+    }
+    return rc;
+}
+
+rc_t KMain(int argc, char* argv[])
+{
+    Args * args;
+    rc_t rc;
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 1, Options, sizeof Options / sizeof (Options[0]));
+    if (rc)
+        LOGERR (klogFatal, rc, "Failure reading command line");
+    else do
+    {
+        Context context;
+        uint32_t pcount;
+
+        /* force option: Replace extisting redact column */
+        rc = ArgsOptionCount (args, OPTION_FORCE, &pcount);
+        if (rc)
+        {
+            LOGERR (klogFatal, rc, "Failure parsing force name");
+            break;
+        }
+        if ((context.force = (pcount > 0)) != false)
+            STSMSG (1, ("Using force option"));
+
+        /* table path parameter */
+        rc = ArgsOptionCount (args, OPTION_TABLE, &pcount);
+        if (rc)
+        {
+            LOGERR (klogFatal, rc, "Failure parsing table name");
+            break;
+        }
+        if (pcount < 1)
+        {
+            rc = RC (rcExe, rcArgv, rcParsing, rcParam, rcInsufficient);
+            LOGERR (klogFatal, rc, "Missing table parameter");
+            break;
+        }
+        if (pcount > 1)
+        {
+            rc = RC (rcExe, rcArgv, rcParsing, rcParam, rcAmbiguous);
+            LOGERR (klogFatal, rc, "Too many table parameters");
+            break;
+        }
+        rc = ArgsOptionValue (args, OPTION_TABLE, 0, (const void **)&sargs.table);
+        if (rc)
+        {
+            LOGERR (klogFatal, rc, "Failure retrieving table name");
+            break;
+        }
+
+        /* file path parameter */
+        rc = ArgsOptionCount (args, OPTION_FILE, &pcount);
+        if (rc)
+        {
+            LOGERR (klogFatal, rc, "Failure parsing file name");
+            break;
+        }
+        if (pcount < 1)
+        {
+            rc = RC (rcExe, rcArgv, rcParsing, rcParam, rcInsufficient);
+            LOGERR (klogFatal, rc, "Missing file parameter");
+            break;
+        }
+        if (pcount > 1)
+        {
+            rc = RC (rcExe, rcArgv, rcParsing, rcParam, rcAmbiguous);
+            LOGERR (klogFatal, rc, "Too many file parameters");
+            break;
+        }
+        rc = ArgsOptionValue (args, OPTION_FILE, 0, (const void **)&context.file_path);
+        if (rc)
+        {
+            LOGERR (klogFatal, rc, "Failure retrieving file name");
+            break;
+        }
+
+
+        /* schema path parameter */
+        rc = ArgsOptionCount (args, OPTION_SCHEMA, &pcount);
+        if (rc)
+        {
+            LOGERR (klogFatal, rc, "Failure parsing schema name");
+            break;
+        }
+        if (pcount < 1)
+        {
+            rc = RC (rcExe, rcArgv, rcParsing, rcParam, rcInsufficient);
+            LOGERR (klogFatal, rc, "Missing schema parameter");
+            break;
+        }
+        if (pcount > 1)
+        {
+            rc = RC (rcExe, rcArgv, rcParsing, rcParam, rcAmbiguous);
+            LOGERR (klogFatal, rc, "Too many schema parameters");
+            break;
+        }
+        rc = ArgsOptionValue (args, OPTION_SCHEMA, 0, (const void **)&context.schema_path);
+        if (rc)
+        {
+            LOGERR (klogFatal, rc, "Failure retrieving schema name");
+            break;
+        }
+
+        /* now that we have parameter values: open the file and table
+         * then run */
+        rc = open_and_run (&context);
+
+        KArgsRelease (args);
+
+    } while (0);
+
+    if (rc)
+        LOGERR (klogErr, rc, "Exiting with an error");
+    else
+        STSMSG (1, ("Exiting %R\n", rc));
+    return rc;
+}
+
+/* EOF */
diff --git a/tools/rd-filter-redact/read-filter-redact.c b/tools/rd-filter-redact/read-filter-redact.c
new file mode 100644
index 0000000..c82c9c2
--- /dev/null
+++ b/tools/rd-filter-redact/read-filter-redact.c
@@ -0,0 +1,861 @@
+/*******************************************************************************
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * =============================================================================
+ */
+
+#include <kapp/main.h>
+
+#include <sra/wsradb.h> /* spotid_t */
+#include <sra/sradb-priv.h> /* SRASchemaMake */
+
+#include <vdb/manager.h> /* VDBManager */
+#include <vdb/table.h> /* VDBTable */
+#include <vdb/database.h> /* VDatabase */
+#include <vdb/cursor.h> /* VCursor */
+#include <vdb/schema.h> /* VSchemaRelease */
+
+#include <kdb/manager.h> /* KDBPathType */
+
+#include <kfs/directory.h> /* KDirectory */
+#include <kfs/file.h> /* KFile */
+
+#include <klib/log.h> /* LOGERR */
+#include <klib/out.h> /* OUTMSG */
+#include <klib/status.h> /* STSMSG */
+#include <klib/debug.h> /* DBGMSG */
+#include <klib/rc.h> /* RC */
+#include <os-native.h>
+
+#include <assert.h>
+#include <ctype.h> /* isblank */
+#include <stdio.h> /* sscanf */
+#include <stdlib.h> /* exit */
+#include <string.h> /* memset */
+
+#define DISP_RC(rc,msg) (void)((rc == 0) ? 0 : LOGERR(klogInt, rc, msg))
+
+static KDirectory* __SpotIteratorDirectory = NULL;
+
+typedef struct CmdLine {
+	const char* table;
+	const char* file;
+} CmdLine;
+typedef struct SpotIterator {
+    spotid_t crnSpotId;
+    spotid_t spotToReduct;
+
+    const char* filename;
+    const KFile* file;
+
+    uint64_t maxSpotId;
+
+    char buffer[256];
+    size_t inBuffer; /* characters in buffer */
+
+    size_t filePos;
+    bool eof;
+    size_t line;
+
+    bool hasCh;
+    char ch;
+} SpotIterator;
+typedef struct Db {
+    const char* table;
+
+    VDBManager* mgr;
+    VTable *tbl;
+
+    const VCursor *rCursor;
+    uint32_t rFilterIdx;
+
+    VCursor *wCursor;
+    uint32_t wIdx;
+
+    bool locked;
+
+    spotid_t nSpots;
+    spotid_t redactedSpots;
+} Db;
+/** Init the static directory object */
+static rc_t SpotIteratorInitDirectory(void) {
+    if (__SpotIteratorDirectory) {
+        return 0;
+    }
+    else {
+        rc_t rc = KDirectoryNativeDir(&__SpotIteratorDirectory);
+        DISP_RC(rc, "while calling KDirectoryNativeDir");
+        return rc;
+    }
+}
+
+/** Check file existance */
+static bool SpotIteratorFileExists(const char* path, ...) {
+    bool found = false;
+
+    if (SpotIteratorInitDirectory() == 0) {
+        va_list args;
+        va_start(args, path);
+        {
+            uint32_t type
+                = KDirectoryVPathType(__SpotIteratorDirectory, path, args);
+            found = (type != kptNotFound);
+            va_end(args);
+        }
+    }
+
+    return found;
+}
+
+static bool SpotIteratorBufferAdd(SpotIterator* self, char ch)
+{
+    assert(self);
+
+    if (self->inBuffer >= (sizeof self->buffer - 1))
+    {   return false; }
+
+    self->buffer[self->inBuffer++] = ch;
+    self->buffer[self->inBuffer] = '\0';
+
+    return true;
+}
+
+/** Read a character from input file */
+static rc_t SpotIteratorFileReadCharWithEof(SpotIterator* self,
+    char* buffer)
+{
+    rc_t rc = 0;
+    size_t num_read = 0;
+
+    assert(self);
+
+    /* get back the saved character */
+    if (self->hasCh) {
+        buffer[0] = self->ch;
+        self->hasCh = false;
+    }
+    else {
+        rc = KFileRead(self->file, self->filePos, buffer, 1, &num_read);
+        if (rc == 0) {
+            if (num_read == 0) {
+                self->eof = true;
+            }
+            else { self->filePos += num_read; }
+        }
+        else {
+            PLOGERR(klogErr, (klogErr, rc,
+                "on line $(lineno) while reading file '$(path)'",
+                PLOG_U64(lineno) ",path=%s", self->line, self->filename));
+        }
+    }
+
+    return rc;
+}
+
+/** Read a line from input file */
+static rc_t SpotIteratorReadLine(SpotIterator* self)
+{
+    rc_t rc = 0;
+    bool overflow = false; /* input buffer overflow */
+
+    /* to skip leading/traling spaces */
+    enum ELane {
+        eBefore,
+        eIn,
+        eAfter
+    } state = eBefore;
+
+    if (self->eof) {
+        return rc;
+    }
+
+    assert(self);
+
+    ++self->line;
+    self->inBuffer = 0;
+
+    while (!overflow && !self->eof) /* do until in-buffer overflow or EOF*/{
+        char ch = 0;
+        /* get next characted */
+        if ((rc = SpotIteratorFileReadCharWithEof(self, &ch)) != 0) {
+            return rc;
+        }
+
+        if (!self->eof) {
+            /* treat leading/trailing spaces */
+            switch (state) {
+                /* skip leading spaces */
+                case eBefore:
+                    if (isblank(ch)) {
+                        continue;
+                    }
+                    else {
+                        state = eIn;
+                    }
+                    break;
+                case eIn:
+                    if (isblank(ch)) {
+                        state = eAfter;
+                        continue;
+                    }
+                    break;
+                /* skip trailing spaces */
+                case eAfter:
+                    if (isblank(ch)) {
+                        continue;
+                    }
+                    else if (ch != '\n' && ch != '\r') {
+                        rc = RC(rcExe, rcFile, rcReading, rcChar, rcUnexpected);
+                        PLOGERR(klogErr, (klogErr, rc, "bad symbol '$(char)' "
+                            "on line $(lineno) in file '$(path)': '$(line)...'",
+                            "char=%c," PLOG_U64(lineno) ",path=%s,line=%s",
+                            ch, self->line, self->filename, self->buffer))
+                        ;
+                        return rc;
+                    }
+                    break;
+            }
+
+            /* add next non-blank characted */
+            overflow = !SpotIteratorBufferAdd(self, ch);
+            if (!overflow) {
+      /* all combinations as "\r", "\n", "\r\n", "\n\r" are considered as EOL */
+                if (ch == '\n' || ch == '\r') {
+                    char c1 = 0;
+                    if ((rc = SpotIteratorFileReadCharWithEof(self, &c1)) != 0)
+                    {
+                        return rc;
+                    }
+                    if (self->eof) {
+                        break;
+                    }
+                    else if ((c1 != '\n' && c1 != '\r') || (ch == c1)) {
+       /* save the character when EOL is a single character (WINDOWS):
+          will be get back in SpotIteratorFileReadCharWithEof */
+                        self->ch = c1;
+                        self->hasCh = true;
+                        break;
+                    }
+                    else {
+                        overflow = !SpotIteratorBufferAdd(self, c1);
+                        break;
+                    }
+                }
+            }
+        }
+    }
+
+    /* remove EOL */
+    if (!overflow) {
+        bool done = false;
+
+        while (self->inBuffer > 0 && !done) {
+            switch (self->buffer[self->inBuffer - 1]) {
+                case '\n': case '\r':
+                    self->buffer[--self->inBuffer] = '\0';
+                    break;
+                default:
+                    done = true;
+                    break;
+            }
+        }
+    }
+    else {
+        rc = RC(rcExe, rcFile, rcReading, rcString, rcTooLong);
+        PLOGERR(klogErr, (klogErr, rc,
+            "on line $(lineno) while reading file '$(path)': '$(line)...'",
+            PLOG_U64(lineno) ",path=%s,line=%s",
+            self->line, self->filename, self->buffer));
+    }
+
+    return rc;
+}
+
+/** Get next spot from input file */
+static rc_t SpotIteratorReadSpotToRedact(SpotIterator* self)
+{
+    rc_t rc = 0;
+
+    assert(self);
+
+    while (rc == 0 && ! self->eof) {
+        rc = SpotIteratorReadLine(self);
+
+        /* skip empty lines */ 
+        if ((rc == 0) && (self->inBuffer > 0)) {
+            spotid_t spot = 0;
+
+            /* make sure the line contains digits only */
+            int i = 0;
+            for (i = 0; i < self->inBuffer; ++i) {
+                if (!isdigit(self->buffer[i])) {
+                    rc = RC(rcExe, rcFile, rcReading, rcChar, rcUnexpected);
+                    PLOGERR(klogErr, (klogErr, rc,
+                            "character '$(char)' on line $(lineno)"
+                            " while reading file '$(path)': '$(line)'",
+                        "char=%c," PLOG_U64(lineno) ",path=%s,line=%s",
+                        self->buffer[i], self->line,
+                        self->filename, self->buffer));
+                    return rc;
+                }
+            }
+
+            sscanf(self->buffer, "%ld", &spot);
+
+            if (spot == 0) {
+                rc = RC(rcExe, rcFile, rcReading, rcString, rcInvalid);
+                PLOGERR(klogErr, (klogErr, rc,
+                    "bad spot id '0' on line $(lineno) "
+                    "while reading file '$(path)': '$(line)'",
+                    PLOG_U64(lineno) ",path=%s,line=%s",
+                    self->line, self->filename, self->buffer));
+            }
+            else if (spot == self->spotToReduct) {
+                rc = RC(rcExe, rcFile, rcReading, rcString, rcInvalid);
+                PLOGERR(klogErr, (klogErr, rc, "duplicated spot id '$(spot)' "
+                    "on line $(lineno) while reading file '$(path)': '$(line)'",
+                    PLOG_U32(spot) "," PLOG_U64(lineno) ",path=%s,line=%s",
+                    spot, self->line, self->filename, self->buffer));
+            }
+            else if (spot < self->spotToReduct) {
+                rc = RC(rcExe, rcFile, rcReading, rcString, rcInvalid);
+                PLOGERR(klogErr, (klogErr, rc, "File '$(path)' is unsorted. "
+                    "$(id) < $(last). See line $(lineno): '$(line)'",
+                    "path=%s," PLOG_U32(id) "," PLOG_U32(last) ","
+                        PLOG_U64(lineno) ",line=%s",
+                    self->filename, spot, self->spotToReduct,
+                    self->line, self->buffer));
+            }
+            else if (spot > self->maxSpotId) {
+                rc = RC(rcExe, rcFile, rcReading, rcString, rcInvalid);
+                PLOGERR(klogErr, (klogErr, rc,
+                    "spotId $(spot) on line $(lineno) "
+                    "of file '$(path)' is bigger that the max spotId $(max): "
+                        "'$(line)'",
+                    PLOG_U32(spot) "," PLOG_U64(lineno) ",path=%s,"
+                    PLOG_U32(max) ",line=%s",
+                    spot, self->line, self->filename, self->maxSpotId,
+                    self->buffer));
+            }
+            else {
+                self->spotToReduct = spot;
+                self->inBuffer = 0;
+            }
+            break;
+        }
+    }
+
+    return rc;
+}
+
+
+static rc_t SpotIteratorInit(const char* redactFileName,
+    const Db* db, SpotIterator* self)
+{
+    rc_t rc = 0;
+    int64_t first = 0;
+
+    assert(self && db);
+
+    memset(self, 0, sizeof *self);
+
+    self->crnSpotId = 1;
+
+    rc = VCursorIdRange
+        (db->rCursor, db->rFilterIdx, &first, &self->maxSpotId);
+    DISP_RC(rc, "while calling VCursorIdRange");
+
+    self->spotToReduct = first - 1;
+
+    if (rc == 0) {
+        rc = SpotIteratorInitDirectory();
+    }
+
+    if (rc == 0) {
+        self->filename = redactFileName;
+        rc = KDirectoryOpenFileRead
+            (__SpotIteratorDirectory, &self->file, "%s", self->filename);
+        if (rc != 0) {
+            PLOGERR(klogErr, (klogErr, rc,
+                "while opening file '$(path)'", "path=%s", self->filename));
+        }
+    }
+
+    if (rc == 0) {
+        rc = SpotIteratorReadSpotToRedact(self);
+    }
+
+    return rc;
+}
+
+static rc_t SpotIteratorDestroy(SpotIterator* it)
+{
+    rc_t rc = 0;
+
+    assert(it);
+
+    rc = KFileRelease(it->file);
+
+    it->file = NULL;
+    it->inBuffer = 0;
+    it->hasCh = false;
+
+    {
+        rc_t rc2 = KDirectoryRelease(__SpotIteratorDirectory);
+        if (rc == 0)
+        {   rc = rc2; }
+        __SpotIteratorDirectory = NULL;
+    }
+
+    return rc;
+}
+
+/** Get next spot id, check whether it should be redacted.
+Returns false if maxSpotId reached */
+static bool SpotIteratorNext(SpotIterator* self, rc_t* rc,
+    int64_t* spot, bool* toRedact)
+{
+    bool hasNext = false;
+
+    assert(self && rc && spot && toRedact);
+
+    *rc = 0;
+    *toRedact = false;
+
+    if (self->crnSpotId <= self->maxSpotId) {
+        hasNext = true;
+        *spot = self->crnSpotId++;
+    }
+
+    if (*spot == self->spotToReduct) {
+        *toRedact = true;
+        *rc = SpotIteratorReadSpotToRedact(self);
+        if (*rc != 0) {
+            hasNext = false;
+        }
+    }
+
+    return hasNext;
+}
+
+static rc_t DbInit(rc_t rc, const CmdLine* args, Db* db)
+{
+    const char name[] = "READ_FILTER";
+
+    assert(args && db);
+
+    memset(db, 0, sizeof *db);
+
+    if (rc != 0)
+    {   return rc; }
+
+    db->table = args->table;
+
+    if (rc == 0) {
+        rc = VDBManagerMakeUpdate(&db->mgr, NULL);
+        DISP_RC(rc, "while calling VDBManagerMakeUpdate");
+    }
+
+    if (rc == 0) {
+        rc = VDBManagerWritable(db->mgr, args->table);
+        if (rc != 0) {
+            if (GetRCState(rc) == rcLocked)
+            {
+                rc = VDBManagerUnlock(db->mgr, args->table);
+                if (rc != 0) {
+                    PLOGERR(klogErr, (klogErr, rc,
+                        "while calling VDBManagerUnlock('$(table)')",
+                        "table=%s", args->table));
+                }
+                db->locked = true;
+            }
+            else {
+                PLOGERR(klogErr, (klogErr, rc,
+                    "while calling VDBManagerWritable('$(table)')",
+                    "table=%s", args->table));
+                if (rc == RC(rcDB, rcPath, rcAccessing, rcPath, rcReadonly)) {
+                    PLOGERR(klogErr, (klogErr, rc,
+                        "N.B. It is possible '$(table)' was not locked properly"
+                        , "table=%s", args->table));
+                }
+            }
+        }
+    }
+
+    if (rc == 0) {
+        db->locked = true; /* has to be locked in production mode */
+        rc = VDBManagerOpenTableUpdate (db->mgr, &db->tbl, NULL, args->table);
+        if (rc != 0) {
+	    VDatabase *vdb;
+	    rc_t rc2 = VDBManagerOpenDBUpdate ( db->mgr, &vdb, NULL , args->table );
+	    if( rc2 == 0) {
+		rc2 = VDatabaseOpenTableUpdate ( vdb, &db->tbl, "SEQUENCE" );
+		if (rc2 == 0 ) rc = 0;
+		VDatabaseRelease ( vdb );
+	    }
+        }
+	if(rc != 0){
+            PLOGERR(klogErr, (klogErr, rc,
+                "while opening VTable '$(table)'", "table=%s", args->table));
+	}
+    } 
+    if( rc == 0) {
+        rc = VTableCreateCursorRead(db->tbl, &db->rCursor);
+        DISP_RC(rc, "while creating read cursor");
+        if (rc == 0) {
+            rc = VCursorAddColumn(db->rCursor, &db->rFilterIdx, "%s", name);
+            if (rc != 0) {
+                PLOGERR(klogErr, (klogErr, rc,
+                    "while adding $(name) to read cursor", "name=%s", name));
+            }
+        }
+        if (rc == 0) {
+            rc = VCursorOpen(db->rCursor);
+            DISP_RC(rc, "while opening read cursor");
+        }
+    }
+    if (rc == 0) {
+        rc = VTableCreateCursorWrite(db->tbl, &db->wCursor, kcmInsert);
+        DISP_RC(rc, "while creating write cursor");
+        if (rc == 0) {
+            rc = VCursorAddColumn(db->wCursor, &db->wIdx, "%s", name);
+            if (rc != 0) {
+                PLOGERR(klogErr, (klogErr, rc,
+                    "while adding $(name) to write cursor", "name=%s", name));
+            }
+        }
+        if (rc == 0) {
+            rc = VCursorOpen(db->wCursor);
+            DISP_RC(rc, "while opening write cursor");
+        }
+    }
+
+    return rc;
+}
+
+static rc_t DbDestroy(Db* db)
+{
+    rc_t rc = 0;
+
+    assert(db);
+
+    {
+        rc_t rc2 = VCursorRelease(db->rCursor);
+        db->rCursor = NULL;
+        if (rc == 0)
+        {   rc = rc2; }
+    }
+
+    {
+        rc_t rc2 = VCursorRelease(db->wCursor);
+        db->wCursor = NULL;
+        if (rc == 0)
+        {   rc = rc2; }
+    }
+
+    {
+        rc_t rc2 = VTableRelease(db->tbl);
+        db->tbl = NULL;
+        if (rc == 0)
+        {   rc = rc2; }
+    }
+
+    if (db->locked) {
+        rc_t rc2 = VDBManagerLock(db->mgr, "%s", db->table);
+        if (rc == 0)
+        {   rc = rc2; }
+    }
+
+    {
+        rc_t rc2 = VDBManagerRelease(db->mgr);
+        db->mgr = NULL;
+        if (rc == 0)
+        {   rc = rc2; }
+    }
+
+    return rc;
+}
+
+static rc_t Work(Db* db, SpotIterator* it)
+{
+    rc_t rc = 0;
+    bool toRedact = false;
+    int64_t row_id = 0;
+    spotid_t nSpots = 0;
+    spotid_t redactedSpots = 0;
+
+    uint8_t filter[64];
+    memset(filter, SRA_READ_FILTER_REDACTED, sizeof filter);
+
+    assert(it);
+
+    while (rc == 0 && SpotIteratorNext(it, &rc, &row_id, &toRedact)) {
+        uint8_t nreads = 0;
+        char bufferIn[64];
+        void* buffer = NULL;
+        uint32_t row_len = 0;
+
+        rc = Quitting();
+
+        ++nSpots;
+
+        if (rc == 0) {
+            uint32_t elem_bits = 8;
+            rc = VCursorReadDirect(db->rCursor, row_id, db->rFilterIdx,
+                elem_bits, bufferIn, sizeof bufferIn, &row_len);
+            DISP_RC(rc, "while reading READ_FILTER");
+	    nreads = row_len;
+        }
+        if (toRedact) {
+            buffer = filter;
+            ++redactedSpots;
+            DBGMSG(DBG_APP,DBG_COND_1,
+                ("Redacting spot %d: %d reads\n",row_id,nreads));
+        }
+        else {
+            buffer = bufferIn;
+        }
+        if (rc == 0) {
+            rc = VCursorOpenRow(db->wCursor);
+            DISP_RC(rc, "while opening row to write");
+            if (rc == 0) {
+                rc = VCursorWrite
+                    (db->wCursor, db->wIdx, 8 * nreads, buffer, 0, 1);
+                DISP_RC(rc, "while writing READ_FILTER");
+            }
+            if (rc == 0) {
+                rc = VCursorCommitRow(db->wCursor);
+                DISP_RC(rc, "while committing row");
+            }
+            if (rc == 0) {
+                rc = VCursorCloseRow(db->wCursor);
+                DISP_RC(rc, "while closing row");
+            }
+        }
+    }
+
+    db->nSpots = nSpots;
+    db->redactedSpots = redactedSpots;
+
+    if (rc == 0) {
+        rc = VCursorCommit(db->wCursor);
+        DISP_RC(rc, "while committing cursor");
+    }
+
+    return rc;
+}
+
+static rc_t Run(const CmdLine* args)
+{
+    rc_t rc = 0;
+
+    Db db;
+    SpotIterator it;
+
+    assert(args);
+
+    if (!SpotIteratorFileExists(args->file)) {
+        rc = RC(rcExe, rcFile, rcOpening, rcFile, rcNotFound);
+        PLOGERR(klogErr,
+            (klogErr, rc, "Cannot find '$(path)'", "path=%s", args->file));
+    }
+    else if (!SpotIteratorFileExists(args->table)) {
+        rc = RC(rcExe, rcTable, rcOpening, rcTable, rcNotFound);
+        PLOGERR(klogErr,
+            (klogErr, rc, "Cannot find '$(path)'", "path=%s", args->table));
+    }
+
+    {
+        rc_t rc2 = DbInit(rc, args, &db);
+        if (rc == 0)
+        {   rc = rc2; }
+    }
+
+    if (rc == 0) {
+        rc = SpotIteratorInit(args->file, &db, &it);
+    }
+
+    if (rc == 0) {
+        rc = Work(&db, &it);
+    }
+
+    if (rc == 0) {
+        PLOGMSG(klogInfo, (klogInfo,
+            "Success: redacted $(redacted) spots out of $(all)",
+            "redacted=%d,all=%d", db.redactedSpots, db.nSpots));
+    }
+
+    {
+        rc_t rc2 = SpotIteratorDestroy(&it);
+        if (rc == 0)
+        {   rc = rc2; }
+    }
+
+    {
+        rc_t rc2 = DbDestroy(&db);
+        if (rc == 0)
+        {   rc = rc2; }
+    }
+
+    return rc;
+}
+
+#define OPTION_FILE  "file"
+#define ALIAS_FILE   "F"
+
+static const char* file_usage []
+    = { "File containing SpotId-s to redact" , NULL };
+
+OptDef Options[] =  {
+     { OPTION_FILE , ALIAS_FILE , NULL, file_usage,  1, true , true }
+};
+
+rc_t CC UsageSummary (const char* progname)
+{
+    return KOutMsg (
+        "Usage:\n"
+        "  %s [Options] -" ALIAS_FILE " <file> <table>\n", progname);
+}
+
+const char UsageDefaultName[] = "rd-filter-redact";
+
+rc_t CC Usage(const Args* args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary (progname);
+
+    KOutMsg ("Options:\n");
+
+    HelpOptionLine(ALIAS_FILE, OPTION_FILE, "file", file_usage);
+
+    HelpOptionsStandard();
+
+    HelpVersion(fullpath, KAppVersion());
+
+    return rc;
+}
+
+
+static rc_t CmdLineInit(const Args* args, CmdLine* cmdArgs)
+{
+    rc_t rc = 0;
+
+    assert(args && cmdArgs);
+
+    memset(cmdArgs, 0, sizeof *cmdArgs);
+
+    while (rc == 0) {
+        uint32_t pcount = 0;
+
+        /* file path parameter */
+        rc = ArgsOptionCount(args, OPTION_FILE, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure parsing file name");
+            break;
+        }
+        if (pcount < 1) {
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInsufficient);
+            LOGERR(klogErr, rc, "Missing file parameter");
+            break;
+        }
+        if (pcount > 1) {
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcAmbiguous);
+            LOGERR(klogErr, rc, "Too many file parameters");
+            break;
+        }
+        rc = ArgsOptionValue (args, OPTION_FILE, 0, (const void **)&cmdArgs->file);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure retrieving file name");
+            break;
+        }
+
+        /* table path parameter */
+        rc = ArgsParamCount(args, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure parsing table name");
+            break;
+        }
+        if (pcount < 1) {
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInsufficient);
+            LOGERR(klogErr, rc, "Missing table parameter");
+            break;
+        }
+        if (pcount > 1) {
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcAmbiguous);
+            LOGERR(klogErr, rc, "Too many table parameters");
+            break;
+        }
+        rc = ArgsParamValue(args, 0, (const void **)&cmdArgs->table);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure retrieving table name");
+            break;
+        }
+
+        break;
+    }
+
+    if (rc != 0) {
+        MiniUsage (args);
+    }
+
+    return rc;
+}
+
+rc_t CC KMain(int argc, char* argv[])
+{
+    rc_t rc = 0;
+    Args* args = NULL;
+
+    CmdLine cmdArgs;
+
+    LogLevelSet("info");
+
+    rc = ArgsMakeAndHandle
+        (&args, argc, argv, 1, Options, sizeof Options / sizeof(Options[0]));
+
+    if (rc == 0) {
+        rc = CmdLineInit(args, &cmdArgs);
+    }
+
+    if (rc == 0) {
+        rc = Run(&cmdArgs);
+    }
+
+    ArgsWhack(args);
+
+    if (rc == RC(rcVDB, rcTable, rcOpening, rcSchema, rcNotFound))
+    {   exit(10); }
+
+    return rc;
+}
+
+/************************************ EOF ****************** ******************/
diff --git a/tools/rd-filter-redact/test-read-write-cursor.c b/tools/rd-filter-redact/test-read-write-cursor.c
new file mode 100644
index 0000000..bcee0a1
--- /dev/null
+++ b/tools/rd-filter-redact/test-read-write-cursor.c
@@ -0,0 +1,220 @@
+/******************************************************************************/
+#include <kapp/main.h>
+
+#include <sra/wsradb.h> /* spotid_t */
+
+#include <vdb/manager.h> /* VDBManager */
+#include <vdb/table.h> /* VDBTable */
+#include <vdb/cursor.h> /* VCursor */
+#include <kfs/directory.h> /* KDirectory */
+#include <kfs/file.h> /* KFile */
+
+#include <klib/log.h> /* LOGERR */
+#include <klib/out.h> /* OUTMSG */
+#include <klib/status.h> /* STSMSG */
+#include <klib/debug.h> /* KDbgSetString */
+#include <klib/rc.h> /* RC */
+
+#include <ctype.h> /* isblank */
+#include <string.h> /* memset */
+#include <stdio.h> /* sscanf */
+#include <assert.h>
+
+#define DISP_RC(lvl,rc,msg) (void)((rc == 0) ? 0 : LOGERR(lvl, rc, msg))
+#define DISP_RC_INT(rc,msg) DISP_RC(klogInt,rc,msg)
+
+const char UsageDefaultName[] = "test-read-write-cursor";
+rc_t CC UsageSummary (const char * progname)
+{
+    return 0;
+}
+
+rc_t CC Usage(const Args* args) { return 0; }
+
+rc_t CC KMain(int argc, char* argv[])
+{
+    const char table[] = "/home/klymenka/REDACT-IN";
+    const char name[] = "READ_FILTER";
+
+    rc_t rc = 0;
+
+    bool locked = false;
+
+    VDBManager* mgr;
+    VTable *tbl;
+    const VCursor *rCursor = NULL;
+
+    int i;
+
+    LogLevelSet("info");
+
+    for (i = 1; i < argc; ++i) {
+        if (!strcmp(argv[i], "-+")) {
+            if (++i <= argc) {
+#if _DEBUGGING
+	        KDbgSetString(argv[i]);
+#endif
+	    }
+        }
+    }
+
+  /*KDbgSetString("VDB");*/
+
+    if (rc == 0) {
+/* +01: ManagerMake */
+        LOGMSG(klogInfo, "VDBManagerMakeUpdate");
+        rc = VDBManagerMakeUpdate(&mgr, NULL);
+        DISP_RC_INT(rc, "while calling VDBManagerMakeUpdate");
+    }
+
+    if (rc == 0) {
+        rc = VDBManagerWritable(mgr, "%s", table);
+        if (GetRCState(rc) == rcLocked) {
+            LOGMSG(klogInfo, "VDBManagerUnlock");
+            rc = VDBManagerUnlock(mgr, "%s", table);
+            DISP_RC_INT(rc, "while calling VDBManagerUnlock");
+            locked = true;
+        }
+    }
+
+    if (rc == 0) {
+/* +02: OpenTable */
+        PLOGMSG(klogInfo, (klogInfo,
+            "VDBManagerOpenTableUpdate(\"$(t)\")", "t=%s", table));
+        rc = VDBManagerOpenTableUpdate
+            (mgr, &tbl, NULL, "%s", table);
+        if (rc != 0) {
+            PLOGERR(klogErr, (klogErr, rc,
+                "while opening VTable '$(path)'", "path=%s", table));
+        }
+    }
+
+    if (rc == 0) {
+/* +03: CreateCursorRead */
+        LOGMSG(klogInfo, "VDBManagerUnlock");
+        rc = VTableCreateCursorRead(tbl, &rCursor);
+        DISP_RC_INT(rc, "while creating read cursor");
+
+#if 1
+        if (rc == 0) {
+            uint32_t idx;
+            PLOGMSG(klogInfo, (klogInfo,
+                "VCursorAddColumn(read cursor, \"$(n)\")", "n=%s", name));
+            rc = VCursorAddColumn(rCursor, &idx, "%s", name);
+            if (rc != 0) {
+                PLOGERR(klogErr, (klogErr, rc,
+                    "while adding $(name) to read cursor", "name=%s", name));
+            }
+        }
+#endif
+        if (rc == 0) {
+            LOGMSG(klogInfo, "VCursorOpen(read cursor)");
+            rc = VCursorOpen(rCursor);
+            DISP_RC_INT(rc, "while opening read cursor");
+        }
+    }
+
+    if (rc == 0) {
+        VCursor *cursor;
+        uint32_t idx;
+/* +04: CreateCursorWrite */
+        LOGMSG(klogInfo, "VTableCreateCursorWrite");
+        rc = VTableCreateCursorWrite(tbl, &cursor, kcmInsert);
+        DISP_RC_INT(rc, "while creating write cursor");
+        if (rc == 0) {
+            PLOGMSG(klogInfo, (klogInfo,
+                "VCursorAddColumn(write cursor, \"$(n)\")", "n=%s", name));
+            rc = VCursorAddColumn(cursor, &idx, "%s", name);
+            if (rc != 0) {
+                PLOGERR(klogErr, (klogErr, rc,
+                    "while adding $(name) to write cursor", "name=%s", name));
+            }
+        }
+        if (rc == 0) {
+            LOGMSG(klogInfo, "VCursorOpen(write cursor)");
+            rc = VCursorOpen(cursor);
+            DISP_RC_INT(rc, "while opening write cursor");
+        }
+#if 1
+        for (i = 0; i < 3 && rc == 0; ++i) {
+            if (rc == 0) {
+                PLOGMSG(klogInfo, (klogInfo,
+                    "VCursorOpenRow(write cursor) $(i)", "i=%d", i));
+                rc = VCursorOpenRow(cursor);
+                DISP_RC_INT(rc, "while opening row to write");
+            }
+            if (rc == 0) {
+                char buffer[1];
+                char b;
+                switch (i) {
+                    case 0:
+                        buffer[0] = SRA_READ_FILTER_CRITERIA;
+                        buffer[0] = SRA_READ_FILTER_REJECT;
+                        break;
+                    case 1:
+                        buffer[0] = SRA_READ_FILTER_REJECT;
+                        buffer[0] = SRA_READ_FILTER_CRITERIA;
+                        break;
+                    case 2:
+                        buffer[0] = SRA_READ_FILTER_REDACTED;
+                        break;
+                }
+                buffer[0] = SRA_READ_FILTER_PASS;
+                b = buffer[0];
+                PLOGMSG(klogInfo, (klogInfo,
+                    "VCursorWrite('$(v)') $(i)", "v=%s,i=%d",
+                    b == SRA_READ_FILTER_REDACTED ? "SRA_READ_FILTER_REDACTED" :
+                        "?",
+                    i));
+                rc = VCursorWrite(cursor, idx, 8, buffer, 0, 1);
+                DISP_RC_INT(rc, "while writing");
+            }
+            if (rc == 0) {
+                PLOGMSG(klogInfo, (klogInfo,
+                    "VCursorCommitRow(write cursor) $(i)", "i=%d", i));
+                rc = VCursorCommitRow(cursor);
+                DISP_RC_INT(rc, "while committing row");
+            }
+            PLOGMSG(klogInfo, (klogInfo,
+                "VCursorCloseRow(write cursor) $(i)", "i=%d", i));
+            {
+                rc_t rc2 = VCursorCloseRow(cursor);
+                DISP_RC_INT(rc2, "while closing row");
+                if (rc == 0)
+                {   rc = rc2; }
+            }
+        }
+#endif
+        LOGMSG(klogInfo, "VCursorRelease(read cursor)");
+/* -03: CreateCursorRead */
+        VCursorRelease(rCursor);
+        if (rc == 0) {
+            LOGMSG(klogInfo, "VCursorCommit(write cursor)");
+            rc = VCursorCommit(cursor);
+            DISP_RC_INT(rc, "while committing cursor");
+        }
+        LOGMSG(klogInfo, "VCursorRelease(write cursor)");
+/* -04: CreateCursorWrite */
+        VCursorRelease(cursor);
+    }
+
+    LOGMSG(klogInfo, "VTableRelease");
+/* -02: OpenTable */
+    VTableRelease(tbl);
+    LOGMSG(klogInfo, "VDBManagerLock");
+    if (locked) {
+        rc_t rc2 = VDBManagerLock(mgr, "%s", table);
+        DISP_RC_INT(rc2, "while VDBManagerLock");
+    }
+
+/* -01: ManagerMake */
+    LOGMSG(klogInfo, "VDBManagerRelease");
+    VDBManagerRelease(mgr);
+
+    if (rc == 0) {
+        LOGMSG(klogInfo, "SUCCESS");
+    }
+    else { LOGMSG(klogInfo, "FAILURE"); }
+
+    return rc;
+}
diff --git a/tools/ref-variation/Makefile b/tools/ref-variation/Makefile
new file mode 100644
index 0000000..e15903c
--- /dev/null
+++ b/tools/ref-variation/Makefile
@@ -0,0 +1,113 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/ref-variation
+
+INT_TOOLS = \
+	ref-variation \
+
+EXT_TOOLS = \
+	var-expand \
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# ref-variation
+#
+
+CPFLAGS += -pthread 
+
+REF_VARIATION_SRC = \
+	ref-variation \
+	common \
+	helper
+
+REF_VARIATION_OBJ = \
+	$(addsuffix .$(OBJX),$(REF_VARIATION_SRC))
+
+REF_VARIATION_LIB =   \
+	-sncbi-ngs-c++    \
+	-sncbi-vdb-static \
+	-sngs-c++         \
+	-skapp            \
+	-stk-version      \
+	-sncbi-vdb        \
+	-sm               \
+	-sload
+
+$(BINDIR)/ref-variation: $(REF_VARIATION_OBJ)
+	$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(REF_VARIATION_LIB)
+
+#-------------------------------------------------------------------------------
+# var-expand
+#
+
+#CPFLAGS += -pthread 
+
+VAR_EXPAND_SRC = \
+	var-expand \
+	common \
+	helper
+
+VAR_EXPAND_OBJ = \
+	$(addsuffix .$(OBJX),$(VAR_EXPAND_SRC))
+
+VAR_EXPAND_LIB =   \
+	-sncbi-ngs-c++    \
+	-sncbi-vdb-static \
+	-sngs-c++         \
+	-skapp            \
+	-stk-version      \
+	-sncbi-vdb        \
+	-sm               \
+	-sload
+
+$(BINDIR)/var-expand: $(VAR_EXPAND_OBJ)
+	$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(VAR_EXPAND_LIB)
diff --git a/tools/ref-variation/common.cpp b/tools/ref-variation/common.cpp
new file mode 100644
index 0000000..8f17fa9
--- /dev/null
+++ b/tools/ref-variation/common.cpp
@@ -0,0 +1,69 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "common.h"
+#include "helper.h"
+
+namespace Common
+{
+    bool find_variation_core_step (KSearch::CVRefVariation& obj, ::RefVarAlg alg,
+        char const* ref_slice, size_t ref_slice_size,
+        size_t& ref_pos_in_slice,
+        char const* var, size_t var_len, size_t var_len_on_ref,
+        size_t chunk_size, size_t chunk_no_last,
+        size_t& bases_start, size_t& chunk_no_start, size_t& chunk_no_end)
+    {
+        bool cont = false;
+
+        if ( ref_pos_in_slice + var_len_on_ref >= ref_slice_size )
+        {
+            cont = true;
+            ++chunk_no_end;
+        }
+        else
+        {
+            obj = KSearch::VRefVariationIUPACMake ( alg,
+                ref_slice, ref_slice_size,
+                ref_pos_in_slice, var, var_len, var_len_on_ref, bases_start );
+
+            if ( obj.GetAlleleStartRelative() == 0 && chunk_no_start > 0 )
+            {
+                cont = true;
+                --chunk_no_start;
+                ref_pos_in_slice += chunk_size;
+                bases_start -= chunk_size;
+            }
+            if (obj.GetAlleleStartRelative() + obj.GetAlleleLenOnRef() == ref_slice_size &&
+                chunk_no_end < chunk_no_last )
+            {
+                cont = true;
+                ++chunk_no_end;
+            }
+        }
+
+        return cont;
+    }
+}
diff --git a/tools/ref-variation/common.h b/tools/ref-variation/common.h
new file mode 100644
index 0000000..ea92c33
--- /dev/null
+++ b/tools/ref-variation/common.h
@@ -0,0 +1,43 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <stdlib.h>
+#include "helper.h"
+
+namespace KSearch
+{
+    class CVRefVariation;
+}
+
+namespace Common
+{
+    bool find_variation_core_step (KSearch::CVRefVariation& obj, ::RefVarAlg alg,
+        char const* ref_slice, size_t ref_slice_size,
+        size_t& ref_pos_in_slice,
+        char const* var, size_t var_len, size_t var_len_on_ref,
+        size_t chunk_size, size_t chunk_no_last,
+        size_t& bases_start, size_t& chunk_no_start, size_t& chunk_no_end);
+}
diff --git a/tools/ref-variation/helper.cpp b/tools/ref-variation/helper.cpp
new file mode 100644
index 0000000..fea8112
--- /dev/null
+++ b/tools/ref-variation/helper.cpp
@@ -0,0 +1,1458 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+// helper.cpp
+
+#include "helper.h"
+
+#include <algorithm>
+#if DEBUG_PRINT != 0
+#include <stdio.h>
+#endif
+
+#include <vdb/vdb-priv.h>
+#include <klib/rc.h>
+
+#include <kdb/table.h>
+#include <kproc/thread.h>
+#include <kproc/lock.h>
+
+#ifdef _WIN32
+#pragma warning (disable:4503)
+#endif
+
+// TODO: remove printfs
+namespace KLib
+{
+    CKVector::CKVector() : m_pSelf(NULL)
+    {
+        Make();
+    }
+
+    CKVector::~CKVector()
+    {
+        Release();
+    }
+
+    void CKVector::Make()
+    {
+        if (m_pSelf)
+            throw Utils::CErrorMsg (0, "Duplicated call to KVectorMake");
+
+        rc_t rc = ::KVectorMake(&m_pSelf);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KVectorMake");
+#if DEBUG_PRINT != 0
+        printf("Created KVector %p\n", m_pSelf);
+#endif
+    }
+
+    void CKVector::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing KVector %p\n", m_pSelf);
+#endif
+            ::KVectorRelease(m_pSelf);
+            m_pSelf = NULL;
+        }
+    }
+
+#if USING_UINT64_BITMAP == 2
+    size_t const RECORD_SIZE_IN_BITS = 2;
+    uint64_t const BIT_SET_MASK = 0x2;
+    uint64_t const BIT_VALUE_MASK = 0x1;
+    uint64_t const BIT_RECORD_MASK = BIT_SET_MASK | BIT_VALUE_MASK;
+#endif
+
+    void CKVector::SetBool(uint64_t key, bool value)
+    {
+#if USING_UINT64_BITMAP == 1
+        uint64_t stored_bits = 0;
+        uint64_t key_qword = key / 64;
+        uint64_t key_bit = key % 64;
+        rc_t rc = ::KVectorGetU64 ( m_pSelf, key_qword, &stored_bits );
+        bool first_time = rc == RC ( rcCont, rcVector, rcAccessing, rcItem, rcNotFound ); // 0x1e615458
+        if ( !first_time && rc )
+            throw Utils::CErrorMsg(rc, "KVectorGetU64");
+
+        uint64_t new_bit = (uint64_t)value << key_bit;
+        uint64_t stored_bit = (uint64_t)1 << key_bit & stored_bits;
+
+        if ( first_time || new_bit != stored_bit )
+        {
+            if ( new_bit )
+                stored_bits |= new_bit;
+            else
+                stored_bits &= ~new_bit;
+
+            rc_t rc = ::KVectorSetU64 ( m_pSelf, key_qword, stored_bits );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "KVectorSetU64");
+        }
+#elif USING_UINT64_BITMAP == 2
+        uint64_t stored_bits = 0;
+        uint64_t key_qword = key / (sizeof(stored_bits) * 8 / RECORD_SIZE_IN_BITS);
+        uint64_t bit_offset_in_qword = (key % (sizeof(stored_bits) * 8 / RECORD_SIZE_IN_BITS)) * RECORD_SIZE_IN_BITS;
+        rc_t rc = ::KVectorGetU64 ( m_pSelf, key_qword, &stored_bits );
+        bool first_time = rc == RC ( rcCont, rcVector, rcAccessing, rcItem, rcNotFound ); // 0x1e615458;
+        if ( !first_time && rc )
+            throw Utils::CErrorMsg(rc, "KVectorGetU64");
+
+        uint64_t new_bit_record = (BIT_SET_MASK | (uint64_t)value) << bit_offset_in_qword;
+        uint64_t stored_bit_record = (uint64_t)BIT_RECORD_MASK << bit_offset_in_qword & stored_bits;
+
+        if ( first_time || new_bit_record != stored_bit_record )
+        {
+            stored_bits &= ~((uint64_t)BIT_RECORD_MASK << bit_offset_in_qword); // clear stored record to assign a new value by bitwise OR
+            stored_bits |= new_bit_record;
+
+            rc_t rc = ::KVectorSetU64 ( m_pSelf, key_qword, stored_bits );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "KVectorSetU64");
+        }
+#else
+
+        rc_t rc = ::KVectorSetBool ( m_pSelf, key, value );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KVectorSetBool");
+#endif
+    }
+
+    struct UserDataU64toBool
+    {
+        rc_t ( * f ) ( uint64_t key, bool value, void *user_data );
+        void* user_data;
+    };
+#if USING_UINT64_BITMAP == 1
+    rc_t VisitU64toBoolAdapter ( uint64_t key, uint64_t value, void *user_data )
+    {
+        rc_t ( * bool_callback ) ( uint64_t key, bool value, void *user_data );
+        bool_callback = ((UserDataU64toBool*) user_data) -> f;
+        void* original_user_data = ((UserDataU64toBool*) user_data) -> user_data;
+
+        rc_t rc = 0;
+        for ( size_t i = 0; i < sizeof (value) * 8; ++i )
+        {
+            rc = bool_callback ( key * 64 + i, (bool) ((uint64_t)1 << i & value), original_user_data );
+            if ( rc )
+                return rc;
+        }
+        return rc;
+    }
+#elif USING_UINT64_BITMAP == 2
+    rc_t VisitU64toBoolAdapter ( uint64_t key, uint64_t value, void *user_data )
+    {
+        rc_t ( * bool_callback ) ( uint64_t key, bool value, void *user_data );
+        bool_callback = ((UserDataU64toBool*) user_data) -> f;
+        void* original_user_data = ((UserDataU64toBool*) user_data) -> user_data;
+
+        rc_t rc = 0;
+        for ( size_t i = 0; i < sizeof (value) * 8 / RECORD_SIZE_IN_BITS; ++i )
+        {
+            uint64_t key_bool = key * sizeof(value) * 8 / RECORD_SIZE_IN_BITS + i;
+            uint64_t record = value >> i * RECORD_SIZE_IN_BITS & BIT_RECORD_MASK;
+            if ( record & BIT_SET_MASK )
+            {
+                rc = bool_callback ( key_bool, (bool) (record & BIT_VALUE_MASK), original_user_data );
+                if ( rc )
+                    return rc;
+            }
+        }
+        return rc;
+    }
+#endif
+
+    void CKVector::VisitBool(rc_t ( * f ) ( uint64_t key, bool value, void *user_data ), void *user_data) const
+    {
+#if USING_UINT64_BITMAP == 1
+        UserDataU64toBool user_data_adapter = { f, user_data };
+        ::KVectorVisitU64 ( m_pSelf, false, VisitU64toBoolAdapter, &user_data_adapter );
+#elif USING_UINT64_BITMAP == 2
+        UserDataU64toBool user_data_adapter = { f, user_data };
+        ::KVectorVisitU64 ( m_pSelf, false, VisitU64toBoolAdapter, &user_data_adapter );
+#else
+        ::KVectorVisitBool ( m_pSelf, false, f, user_data );
+#endif
+    }
+}
+
+///////////////////////////////////////////////////////////////
+
+namespace VDBObjects
+{
+    CVCursor::CVCursor() : m_pSelf(NULL)
+    {}
+
+    CVCursor::~CVCursor()
+    {
+        Release();
+    }
+
+    CVCursor::CVCursor(CVCursor const& x)
+    {
+        Clone(x);
+    }
+
+    CVCursor& CVCursor::operator=(CVCursor const& x)
+    {
+        if (m_pSelf)
+            Release();
+
+        Clone(x);
+        return *this;
+    }
+
+    void CVCursor::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing VCursor %p\n", m_pSelf);
+#endif
+            ::VCursorRelease(m_pSelf);
+            m_pSelf = NULL;
+        }
+    }
+
+    void CVCursor::Clone(CVCursor const& x)
+    {
+        m_pSelf = x.m_pSelf;
+        ::VCursorAddRef ( m_pSelf );
+#if DEBUG_PRINT != 0
+        printf ("CLONING VCursor %p\n", m_pSelf);
+#endif
+    }
+
+    void CVCursor::Open() const
+    {
+        rc_t rc = ::VCursorOpen(m_pSelf);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorOpen");
+    }
+
+    void CVCursor::PermitPostOpenAdd() const
+    {
+        rc_t rc = ::VCursorPermitPostOpenAdd ( m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorPermitPostOpenAdd");
+    }
+#if MANAGER_WRITABLE != 0
+    void CVCursor::InitColumnIndex(char const* const* ColumnNames, uint32_t* pColumnIndex, size_t nCount, bool set_default)
+    {
+        for (size_t i = 0; i < nCount; ++i)
+        {
+            rc_t rc = ::VCursorAddColumn(m_pSelf, & pColumnIndex[i], ColumnNames[i] );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "VCursorAddColumn - [%s]", ColumnNames[i]);
+
+            if ( set_default )
+            {
+                VTypedecl type;
+                VTypedesc desc;
+                uint32_t idx = pColumnIndex[i];
+
+                rc = ::VCursorDatatype ( m_pSelf, idx, & type, & desc );
+                if (rc)
+                    throw Utils::CErrorMsg(rc, "VCursorDatatype (column idx=%u [%s])", idx, ColumnNames[i]);
+
+                uint32_t elem_bits = ::VTypedescSizeof ( & desc );
+                if (rc)
+                    throw Utils::CErrorMsg(rc, "VTypedescSizeof (column idx=%u [%s])", idx, ColumnNames[i]);
+                rc = ::VCursorDefault ( m_pSelf, idx, elem_bits, "", 0, 0 );
+                if (rc)
+                    throw Utils::CErrorMsg(rc, "VCursorDefault (column idx=%u [%s])", idx, ColumnNames[i]);
+            }
+        }
+    }
+#else
+    void CVCursor::InitColumnIndex(char const* const* ColumnNames, uint32_t* pColumnIndex, size_t nCount)
+    {
+        for (size_t i = 0; i < nCount; ++i)
+        {
+            rc_t rc = ::VCursorAddColumn(m_pSelf, & pColumnIndex[i], ColumnNames[i] );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "VCursorAddColumn - [%s]", ColumnNames[i]);
+        }
+    }
+#endif
+
+    void CVCursor::GetIdRange(int64_t& idFirstRow, uint64_t& nRowCount) const
+    {
+        rc_t rc = ::VCursorIdRange(m_pSelf, 0, &idFirstRow, &nRowCount);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorIdRange");
+    }
+
+    int64_t CVCursor::GetRowId () const
+    {
+        int64_t row_id;
+        rc_t rc = ::VCursorRowId ( m_pSelf, & row_id );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorRowId");
+
+        return row_id;
+    }
+
+    void CVCursor::SetRowId (int64_t row_id) const
+    {
+        rc_t rc = ::VCursorSetRowId ( m_pSelf, row_id );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorSetRowId (%ld)", row_id);
+    }
+
+    void CVCursor::OpenRow () const
+    {
+        rc_t rc = ::VCursorOpenRow ( m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorOpenRow");
+    }
+
+#if MANAGER_WRITABLE != 0
+    void CVCursor::CommitRow ()
+    {
+        rc_t rc = ::VCursorCommitRow ( m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorCommitRow");
+    }
+
+    void CVCursor::RepeatRow ( uint64_t count )
+    {
+        rc_t rc = ::VCursorRepeatRow ( m_pSelf, count );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorRepeatRow (%lu)", count);
+    }
+    void CVCursor::Commit ()
+    {
+        rc_t rc = ::VCursorCommit ( m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorCommit");
+    }
+#endif
+    void CVCursor::CloseRow () const
+    {
+        rc_t rc = ::VCursorCloseRow ( m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VCursorCloseRow");
+    }
+
+///////////////////////////////////////////////////////////////////////////////////
+
+    CVTable::CVTable() : m_pSelf(NULL)
+    {
+    }
+    
+    CVTable::~CVTable()
+    {
+        Release();
+    }
+
+    CVTable::CVTable(CVTable const& x)
+    {
+        Clone(x);
+    }
+
+    CVTable& CVTable::operator=(CVTable const& x)
+    {
+        if (m_pSelf)
+            Release();
+
+        Clone(x);
+        return *this;
+    }
+
+    void CVTable::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing VTable %p\n", m_pSelf);
+#endif
+            ::VTableRelease(m_pSelf);
+            m_pSelf = NULL;
+        }
+    }
+
+    void CVTable::Clone(CVTable const& x)
+    {
+        m_pSelf = x.m_pSelf;
+        ::VTableAddRef ( m_pSelf );
+#if DEBUG_PRINT != 0
+        printf ("CLONING VTable %p\n", m_pSelf);
+#endif
+    }
+
+    CVCursor CVTable::CreateCursorRead ( ) const
+    {
+        CVCursor cursor;
+        rc_t rc = ::VTableCreateCursorRead(m_pSelf, const_cast<VCursor const**>(& cursor.m_pSelf));
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VTableCreateCursorRead");
+
+#if DEBUG_PRINT != 0
+        printf("Created cursor (rd) %p\n", cursor.m_pSelf);
+#endif
+        return cursor;
+    }
+
+    CVCursor CVTable::CreateCursorRead ( size_t cache_size ) const
+    {
+        CVCursor cursor;
+        rc_t rc = ::VTableCreateCachedCursorRead(m_pSelf, const_cast<VCursor const**>(& cursor.m_pSelf), cache_size);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VTableCreateCachedCursorRead (%zu)", cache_size);
+
+#if DEBUG_PRINT != 0
+        printf("Created cached cursor (rd) %p\n", cursor.m_pSelf);
+#endif
+        return cursor;
+    }
+
+#if MANAGER_WRITABLE != 0
+    CVCursor CVTable::CreateCursorWrite (::KCreateMode mode)
+    {
+        CVCursor cursor;
+        rc_t rc = ::VTableCreateCursorWrite ( m_pSelf, & cursor.m_pSelf, mode );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VTableCreateCursorWrite");
+
+#if DEBUG_PRINT != 0
+        printf("Created cursor (wr) %p\n", cursor.m_pSelf);
+#endif
+        return cursor;
+    }
+#endif
+
+    KDBObjects::CKTable CVTable::OpenKTableRead () const
+    {
+        KDBObjects::CKTable obj;
+        rc_t rc = ::VTableOpenKTableRead(m_pSelf, const_cast<KTable const**>(& obj.m_pSelf));
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VTableOpenKTableRead");
+
+#if DEBUG_PRINT != 0
+        printf("Opened KTable %p\n", obj.m_pSelf);
+#endif
+        return obj;
+    }
+//////////////////////////////////////////////////////////////////////
+
+    CVDatabase::CVDatabase() : m_pSelf(NULL)
+    {}
+
+    CVDatabase::~CVDatabase()
+    {
+        Release();
+    }
+
+    CVDatabase::CVDatabase(CVDatabase const& x)
+    {
+        Clone(x);
+    }
+
+    CVDatabase& CVDatabase::operator=(CVDatabase const& x)
+    {
+        if (m_pSelf)
+            Release();
+
+        Clone(x);
+        return *this;
+    }
+
+    void CVDatabase::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing VDatabase %p\n", m_pSelf);
+#endif
+            ::VDatabaseRelease(m_pSelf);
+            m_pSelf = NULL;
+        }
+    }
+
+    void CVDatabase::Clone(CVDatabase const& x)
+    {
+        m_pSelf = x.m_pSelf;
+        ::VDatabaseAddRef ( m_pSelf );
+#if DEBUG_PRINT != 0
+        printf ("CLONING VDatabase %p\n", m_pSelf);
+#endif
+    }
+
+    CVTable CVDatabase::OpenTable(char const* pszTableName) const
+    {
+        CVTable table;
+        rc_t rc = ::VDatabaseOpenTableRead(m_pSelf, const_cast<VTable const**>(& table.m_pSelf), pszTableName);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDatabaseOpenTableRead (%s)", pszTableName);
+
+#if DEBUG_PRINT != 0
+        printf("Opened table %p (%s)\n", table.m_pSelf, pszTableName);
+#endif
+        return table;
+    }
+
+#if MANAGER_WRITABLE != 0
+    CVTable CVDatabase::CreateTable ( char const* pszTableName )
+    {
+        CVTable table;
+        //rc_t rc = ::VDatabaseCreateTableDefault ( m_pSelf, & table.m_pSelf, pszTableName, pszTableName );
+        rc_t rc = ::VDatabaseCreateTableByMask ( m_pSelf, & table.m_pSelf, pszTableName, 0, 0, pszTableName );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDatabaseCreateTableDefault (%s)", pszTableName);
+
+#if DEBUG_PRINT != 0
+        printf("Created table %p (%s)\n", table.m_pSelf, pszTableName);
+#endif
+        return table;
+    }
+
+    void CVDatabase::ColumnCreateParams ( ::KCreateMode cmode, ::KChecksum checksum, size_t pgsize )
+    {
+        rc_t rc = ::VDatabaseColumnCreateParams ( m_pSelf, cmode, checksum, pgsize );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDatabaseColumnCreateParams");
+    }
+#endif
+
+//////////////////////////////////////////////////////////////////////
+
+    CVSchema::CVSchema() : m_pSelf (NULL)
+    {
+    }
+    CVSchema::~CVSchema()
+    {
+        Release();
+    }
+
+    CVSchema::CVSchema(CVSchema const& x)
+    {
+        Clone (x);
+    }
+
+    CVSchema& CVSchema::operator=(CVSchema const& x)
+    {
+        Clone (x);
+        return *this;
+    }
+
+    void CVSchema::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing VSchema %p\n", m_pSelf);
+#endif
+            ::VSchemaRelease ( m_pSelf );
+            m_pSelf = NULL;
+        }
+    }
+
+    void CVSchema::Clone ( CVSchema const& x )
+    {
+        if (m_pSelf)
+            Release();
+
+        m_pSelf = x.m_pSelf;
+        ::VSchemaAddRef ( m_pSelf );
+#if DEBUG_PRINT != 0
+        printf ("CLONING VSchema %p\n", m_pSelf);
+#endif
+    }
+    
+    void CVSchema::VSchemaParseFile ( char const* pszFilePath )
+    {
+        rc_t rc = ::VSchemaParseFile ( m_pSelf, pszFilePath );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VSchemaParseFile (%s)", pszFilePath);
+    }
+
+//////////////////////////////////////////////////////////////////////
+
+    CVDBManager::CVDBManager() : m_pSelf(NULL)
+    {}
+
+    CVDBManager::~CVDBManager()
+    {
+        Release();
+    }
+
+    void CVDBManager::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing VDBManager %p\n", m_pSelf);
+#endif
+            ::VDBManagerRelease(m_pSelf);
+            m_pSelf = NULL;
+        }
+    }
+
+#if MANGER_WRITABLE != 0
+    void CVDBManager::Make()
+    {
+        assert(m_pSelf == NULL);
+        if (m_pSelf)
+            throw Utils::CErrorMsg(0, "Double call to VDBManagerMakeUpdate");
+
+        rc_t rc = ::VDBManagerMakeUpdate ( & m_pSelf, NULL );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDBManagerMakeUpdate");
+
+	    /*rc = VDBManagerDisablePagemapThread ( m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDBManagerDisablePagemapThread");*/
+
+#if DEBUG_PRINT != 0
+        printf("Created VDBManager (wr) %p\n", m_pSelf);
+#endif
+    }
+#else
+    void CVDBManager::Make()
+    {
+        assert(m_pSelf == NULL);
+        if (m_pSelf)
+            throw Utils::CErrorMsg(0, "Double call to VDBManagerMakeRead");
+
+        rc_t rc = ::VDBManagerMakeRead(const_cast<VDBManager const**>(&m_pSelf), NULL);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDBManagerMakeRead");
+
+#if DEBUG_PRINT != 0
+        printf("Created VDBManager (rd) %p\n", m_pSelf);
+#endif
+    }
+#endif
+
+    CVDatabase CVDBManager::OpenDB(char const* pszDBName) const
+    {
+        CVDatabase vdb;
+        rc_t rc = ::VDBManagerOpenDBRead(m_pSelf, const_cast<VDatabase const**>(& vdb.m_pSelf), NULL, pszDBName);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDBManagerOpenDBRead (%s)", pszDBName);
+
+#if DEBUG_PRINT != 0
+        printf("Opened database %p (%s)\n", vdb.m_pSelf, pszDBName);
+#endif
+        return vdb;
+    }
+
+    CVTable CVDBManager::OpenTable(char const* pszPath) const
+    {
+        CVTable table;
+        rc_t rc = ::VDBManagerOpenTableRead(m_pSelf, const_cast<VTable const**>(& table.m_pSelf), NULL, pszPath);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDBManagerOpenTableRead (%s)", pszPath);
+
+#if DEBUG_PRINT != 0
+        printf("Opened table directly from manager %p (%s)\n", vdb.m_pSelf, pszDBName);
+#endif
+        return table;
+    }
+
+#if MANAGER_WRITABLE != 0
+    CVDatabase CVDBManager::CreateDB ( CVSchema const& schema, char const* pszTypeDesc, ::KCreateMode cmode, char const* pszPath )
+    {
+        CVDatabase vdb;
+        rc_t rc = ::VDBManagerCreateDB ( m_pSelf, & vdb.m_pSelf, schema.m_pSelf, pszTypeDesc, cmode, pszPath );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDBManagerCreateDB (%s)", pszPath);
+
+#if DEBUG_PRINT != 0
+        printf("Created database %p (%s)\n", vdb.m_pSelf, pszPath);
+#endif
+
+        // set creation mode of objects ( tables, columns, etc. ) to
+        // create new or re-initialize existing, plus attach md5 checksums
+        // to all files.
+        // set blob creation mode to record 32-bit CRC within blob
+        // continue to use default page size...
+        vdb.ColumnCreateParams ( kcmInit | kcmMD5, kcsCRC32, 0 );
+        return vdb;
+    }
+#endif
+
+    CVSchema CVDBManager::MakeSchema () const
+    {
+        CVSchema schema;
+        rc_t rc = ::VDBManagerMakeSchema ( m_pSelf, & schema.m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "VDBManagerMakeSchema");
+
+#if DEBUG_PRINT != 0
+        printf("Created Schema %p\n", schema.m_pSelf);
+#endif
+        return schema;
+    }
+}
+
+namespace KDBObjects
+{
+//////////////////////////////////////////////////////////////
+    CKIndex::CKIndex() : m_pSelf(NULL)
+    {
+    }
+    
+    CKIndex::~CKIndex()
+    {
+        Release();
+    }
+
+    CKIndex::CKIndex(CKIndex const& x)
+    {
+        Clone(x);
+    }
+
+    CKIndex& CKIndex::operator=(CKIndex const& x)
+    {
+        if (m_pSelf)
+            Release();
+
+        Clone(x);
+        return *this;
+    }
+
+    void CKIndex::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing KIndex %p\n", m_pSelf);
+#endif
+            ::KIndexRelease(m_pSelf);
+            m_pSelf = NULL;
+        }
+    }
+
+    void CKIndex::Clone(CKIndex const& x)
+    {
+        m_pSelf = x.m_pSelf;
+        ::KIndexAddRef ( m_pSelf );
+#if DEBUG_PRINT != 0
+        printf ("CLONING KIndex %p\n", m_pSelf);
+#endif
+    }
+
+    // returns false if not found
+    bool CKIndex::FindText(const char *key, int64_t *start_id, uint64_t *id_count,
+        int (CC * custom_cmp)(const void *item, struct PBSTNode const *n, void *data ),
+        void *data) const
+    {
+            rc_t rc = ::KIndexFindText(m_pSelf, key, start_id, id_count, NULL, NULL );
+            if (rc == SILENT_RC(rcDB,rcIndex,rcSelecting,rcString,rcNotFound))
+                return false;
+            else if (rc)
+                throw Utils::CErrorMsg(rc, "KIndexFindText: key=%s", key);
+            else
+                return true;
+    }
+
+
+//////////////////////////////////////////////////////////////
+    CKTable::CKTable() : m_pSelf(NULL)
+    {
+    }
+    
+    CKTable::~CKTable()
+    {
+        Release();
+    }
+
+    CKTable::CKTable(CKTable const& x)
+    {
+        Clone(x);
+    }
+
+    CKTable& CKTable::operator=(CKTable const& x)
+    {
+        if (m_pSelf)
+            Release();
+
+        Clone(x);
+        return *this;
+    }
+
+    void CKTable::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing KTable %p\n", m_pSelf);
+#endif
+            ::KTableRelease(m_pSelf);
+            m_pSelf = NULL;
+        }
+    }
+
+    void CKTable::Clone(CKTable const& x)
+    {
+        m_pSelf = x.m_pSelf;
+        ::KTableAddRef ( m_pSelf );
+#if DEBUG_PRINT != 0
+        printf ("CLONING KTable %p\n", m_pSelf);
+#endif
+    }
+
+    CKIndex CKTable::OpenIndexRead(char const* name) const
+    {
+        KDBObjects::CKIndex obj;
+        rc_t rc = ::KTableOpenIndexRead(m_pSelf, const_cast<KIndex const**>(& obj.m_pSelf), name);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KTableOpenIndexRead(%s)", name);
+
+#if DEBUG_PRINT != 0
+        printf("Opened KIndex(%s) %p\n", name, obj.m_pSelf);
+#endif
+        return obj;
+    }
+
+
+//////////////////////////////////////////////////////////////
+}
+
+
+namespace KApp
+{
+    CArgs::CArgs () : m_pSelf(NULL)
+    {
+    }
+
+    CArgs::~CArgs()
+    {
+        Release();
+    }
+
+    void CArgs::MakeAndHandle (int argc, char** argv, ::OptDef const* pOptions, size_t option_count)
+    {
+        if (m_pSelf)
+            throw Utils::CErrorMsg (0, "Duplicated call to ArgsMakeAndHandle");
+
+        rc_t rc = ::ArgsMakeAndHandle (&m_pSelf, argc, argv, 1, pOptions, option_count);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "ArgsMakeAndHandle");
+#if DEBUG_PRINT != 0
+        printf("Created Args %p\n", m_pSelf);
+#endif
+    }
+    void CArgs::MakeAndHandle ( int argc, char** argv, ::OptDef const* pOptions1, size_t option_count1, ::OptDef const* pOptions2, size_t option_count2 )
+    {
+        if (m_pSelf)
+            throw Utils::CErrorMsg (0, "Duplicated call to ArgsMakeAndHandle");
+
+        rc_t rc = ::ArgsMakeAndHandle (&m_pSelf, argc, argv, 2, pOptions1, option_count1, pOptions2, option_count2);
+        if (rc)
+            throw Utils::CErrorMsg(rc, "ArgsMakeAndHandle(2)");
+#if DEBUG_PRINT != 0
+        printf("Created Args(2) %p\n", m_pSelf);
+#endif
+    }
+
+    void CArgs::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing Args %p\n", m_pSelf);
+#endif
+            ::ArgsRelease (m_pSelf);
+            m_pSelf = NULL;
+        }
+    }
+
+    ::Args const* CArgs::GetArgs () const
+    {
+        return m_pSelf;
+    }
+
+    uint32_t CArgs::GetParamCount () const
+    {
+        uint32_t ret = 0;
+        rc_t rc = ::ArgsParamCount ( m_pSelf, &ret );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "ArgsParamCount");
+
+        return ret;
+    }
+
+    char const* CArgs::GetParamValue ( uint32_t iteration ) const
+    {
+        void const* ret = NULL;
+        rc_t rc = ::ArgsParamValue ( m_pSelf, iteration, & ret );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "ArgsParamValue");
+
+        return static_cast <char const*> (ret);
+    }
+
+    uint32_t CArgs::GetOptionCount ( char const* option_name ) const
+    {
+        uint32_t ret = 0;
+        rc_t rc = ::ArgsOptionCount ( m_pSelf, option_name, &ret );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "ArgsOptionCount (%s)", option_name);
+
+        return ret;
+    }
+
+    char const* CArgs::GetOptionValue ( char const* option_name, uint32_t iteration ) const
+    {
+        void const* ret = NULL;
+        rc_t rc = ::ArgsOptionValue ( m_pSelf, option_name, iteration, & ret );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "ArgsOptionValue (%s)", option_name);
+
+        return static_cast <char const*> (ret);
+    }
+
+////////////////////////////////
+
+    CProgressBar::CProgressBar ( uint64_t size )
+    {
+        Make ( size );
+    }
+
+    CProgressBar::~CProgressBar ()
+    {
+        Release ();
+    }
+
+    void CProgressBar::Make ( uint64_t size )
+    {
+        rc_t rc = ::KLoadProgressbar_Make ( &m_pSelf, size );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KLoadProgressbar_Make");
+#if DEBUG_PRINT != 0
+        printf ( "Created ProgressBar %p\n", m_pSelf );
+#endif
+    }
+    void CProgressBar::Release ()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing ProgressBar %p\n", m_pSelf);
+#endif
+            ::KLoadProgressbar_Release ( m_pSelf, true );
+            m_pSelf = NULL;
+        }
+    }
+
+    void CProgressBar::Append ( uint64_t chunk )
+    {
+        rc_t rc = ::KLoadProgressbar_Append ( m_pSelf, chunk );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KLoadProgressbar_Append");
+    }
+
+    void CProgressBar::Process ( uint64_t chunk, bool force_report )
+    {
+        rc_t rc = ::KLoadProgressbar_Process ( m_pSelf, chunk, force_report );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KLoadProgressbar_Process");
+    }
+
+///////////////////////////////////////////
+    CXMLLogger::CXMLLogger ( CArgs const& args )
+    {
+        Make ( args );
+    }
+
+    CXMLLogger::~CXMLLogger ()
+    {
+        Release ();
+    }
+
+    void CXMLLogger::Make ( CArgs const& args )
+    {
+        rc_t rc = ::XMLLogger_Make ( &m_pSelf, NULL, args.m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "XMLLogger_Make");
+#if DEBUG_PRINT != 0
+        printf ( "Created XMLLogger %p\n", m_pSelf );
+#endif
+    }
+
+    void CXMLLogger::Release ()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing XMLLogger %p\n", m_pSelf);
+#endif
+            ::XMLLogger_Release ( m_pSelf );
+            m_pSelf = NULL;
+        }
+    }
+}
+
+namespace Utils
+{
+    CErrorMsg::CErrorMsg(rc_t rc, char const* fmt_str, ...)
+        : m_rc(rc)
+    {
+        va_list args;
+        va_start(args, fmt_str);
+        string_vprintf (m_szDescr, countof(m_szDescr), NULL, fmt_str, args);
+        va_end(args);
+    }
+
+    CErrorMsg::CErrorMsg(char const* fmt_str, ...)
+        : m_rc(0)
+    {
+        va_list args;
+        va_start(args, fmt_str);
+        string_vprintf (m_szDescr, countof(m_szDescr), NULL, fmt_str, args);
+        va_end(args);
+    }
+
+    rc_t CErrorMsg::getRC() const
+    {
+        return m_rc;
+    }
+    char const* CErrorMsg::what() const throw()
+    {
+        return m_szDescr;
+    }
+
+
+    void HandleException ()
+    {
+        try
+        {
+            throw;
+        }
+        catch (Utils::CErrorMsg const& e)
+        {
+            char szBufErr[512] = "";
+            size_t rc = e.getRC();
+            rc_t res;
+            if (rc != 0)
+                res = string_printf(szBufErr, countof(szBufErr), NULL, "ERROR: %s failed with error 0x%08x (%u) [%R]", e.what(), rc, rc, rc);
+            else
+                res = string_printf(szBufErr, countof(szBufErr), NULL, "ERROR: %s", e.what());
+            if (res == rcBuffer || res == rcInsufficient)
+                szBufErr[countof(szBufErr) - 1] = '\0';
+            LOGMSG ( klogErr, szBufErr );
+        }
+        catch (std::exception const& e)
+        {
+            char szBufErr[512];
+            rc_t res = string_printf(szBufErr, countof(szBufErr), NULL,
+                "std::exception: %s", e.what());
+            if (res == rcBuffer || res == rcInsufficient)
+                szBufErr[countof(szBufErr) - 1] = '\0';
+            LOGMSG ( klogErr, szBufErr );
+        }
+        catch (...)
+        {
+            LOGMSG ( klogErr, "Unexpected exception occured" );
+        }
+    }
+}
+
+namespace KSearch
+{
+////////////////////////////////////////////////
+
+    CVRefVariation::CVRefVariation()
+    {
+        ClearMembers();
+    }
+
+    CVRefVariation::~CVRefVariation()
+    {
+        Release();
+    }
+
+    CVRefVariation::CVRefVariation(CVRefVariation const& x)
+    {
+        Clone(x);
+    }
+
+    CVRefVariation& CVRefVariation::operator=(CVRefVariation const& x)
+    {
+        if (m_pSelf)
+            Release();
+
+        Clone(x);
+        return *this;
+    }
+
+    void CVRefVariation::ClearMembers()
+    {
+        m_pSelf             = NULL;
+        m_bases_start       = KSearch::UNINITIALIZED_POSITION;
+        m_allele            = NULL;
+        m_query             = NULL;
+        m_allele_len        = KSearch::UNINITIALIZED_POSITION;
+        m_allele_len_on_ref = KSearch::UNINITIALIZED_POSITION;
+        m_query_len         = KSearch::UNINITIALIZED_POSITION;
+        m_query_len_on_ref  = KSearch::UNINITIALIZED_POSITION;
+        m_allele_start      = KSearch::UNINITIALIZED_POSITION;
+        m_query_start       = KSearch::UNINITIALIZED_POSITION;
+    }
+
+    void CVRefVariation::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing VRefVariation %p\n", m_pSelf);
+#endif
+            ::RefVariationRelease(m_pSelf); // don't throw an exception since this function is called in the destructor
+            ClearMembers();
+        }
+    }
+
+    void CVRefVariation::Clone(CVRefVariation const& x)
+    {
+        m_pSelf = x.m_pSelf;
+        ::RefVariationAddRef ( m_pSelf ); // TODO: maybe we have to check rc and throw here
+        m_bases_start = x.m_bases_start;
+
+        m_allele            = x.m_allele;
+        m_query             = x.m_query;
+        m_allele_len        = x.m_allele_len;
+        m_allele_len_on_ref = x.m_allele_len_on_ref;
+        m_query_len         = x.m_query_len;
+        m_query_len_on_ref  = x.m_query_len_on_ref;
+        m_allele_start      = x.m_allele_start;
+        m_query_start       = x.m_query_start;
+
+#if DEBUG_PRINT != 0
+        printf ("CLONING VRefVariation %p\n", m_pSelf);
+#endif
+    }
+    char const* CVRefVariation::GetSearchQuery() const
+    {
+        if ( m_pSelf == NULL )
+            throw Utils::CErrorMsg("GetSearchQuery on uninitialized RefVariation");
+        
+        if ( m_query == NULL )
+        {
+            rc_t rc = ::RefVariationGetIUPACSearchQuery ( m_pSelf, & m_query, & m_query_len, & m_query_start );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "RefVariationGetIUPACSearchQuery");
+        }
+
+        return m_query;
+    }
+
+    size_t CVRefVariation::GetSearchQueryStartRelative() const
+    {
+        if ( m_pSelf == NULL )
+            throw Utils::CErrorMsg("GetSearchQueryStartRelative on uninitialized RefVariation");
+
+        if ( m_query_start == KSearch::UNINITIALIZED_POSITION )
+        {
+            rc_t rc = ::RefVariationGetIUPACSearchQuery ( m_pSelf, & m_query, & m_query_len, & m_query_start );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "RefVariationGetIUPACSearchQuery");
+        }
+
+        return m_query_start;
+    }
+
+    size_t CVRefVariation::GetSearchQueryStartAbsolute() const
+    {
+        return GetSearchQueryStartRelative() + m_bases_start;
+    }
+
+    size_t CVRefVariation::GetSearchQuerySize() const
+    {
+        if ( m_pSelf == NULL )
+            throw Utils::CErrorMsg("GetSearchQuerySize on uninitialized RefVariation");
+
+        if ( m_query_len == KSearch::UNINITIALIZED_POSITION )
+        {
+            rc_t rc = ::RefVariationGetIUPACSearchQuery ( m_pSelf, & m_query, & m_query_len, & m_query_start );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "RefVariationGetIUPACSearchQuery");
+        }
+
+        return m_query_len;
+    }
+
+    size_t CVRefVariation::GetSearchQueryLenOnRef() const
+    {
+        if ( m_pSelf == NULL )
+            throw Utils::CErrorMsg("GetSearchQueryLenOnRef on uninitialized RefVariation");
+
+        if ( m_query_len_on_ref == KSearch::UNINITIALIZED_POSITION )
+        {
+            rc_t rc = ::RefVariationGetSearchQueryLenOnRef ( m_pSelf, & m_query_len_on_ref );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "RefVariationGetSearchQueryLenOnRef");
+        }
+
+        return m_query_len_on_ref;
+    }
+
+
+    char const* CVRefVariation::GetAllele() const
+    {
+        if ( m_pSelf == NULL )
+            throw Utils::CErrorMsg("GetAllele on uninitialized RefVariation");
+        
+        if ( m_allele == NULL )
+        {
+            rc_t rc = ::RefVariationGetAllele ( m_pSelf, & m_allele, & m_allele_len, & m_allele_start );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "RefVariationGetAllele");
+        }
+
+        return m_allele;
+    }
+
+    size_t CVRefVariation::GetAlleleStartRelative() const
+    {
+        if ( m_pSelf == NULL )
+            throw Utils::CErrorMsg("GetAllele on uninitialized RefVariation");
+        
+        if ( m_allele_start == KSearch::UNINITIALIZED_POSITION )
+        {
+            rc_t rc = ::RefVariationGetAllele ( m_pSelf, & m_allele, & m_allele_len, & m_allele_start );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "RefVariationGetAllele");
+        }
+
+        return m_allele_start;
+    }
+
+    size_t CVRefVariation::GetAlleleStartAbsolute() const
+    {
+        return GetAlleleStartRelative() + m_bases_start;
+    }
+
+    size_t CVRefVariation::GetAlleleSize() const
+    {
+        if ( m_pSelf == NULL )
+            throw Utils::CErrorMsg("GetAlleleSize on uninitialized RefVariation");
+        
+        if ( m_allele_len == KSearch::UNINITIALIZED_POSITION )
+        {
+            rc_t rc = ::RefVariationGetAllele ( m_pSelf, & m_allele, & m_allele_len, & m_allele_start );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "RefVariationGetAllele");
+        }
+
+        return m_allele_len;
+    }
+
+    size_t CVRefVariation::GetAlleleLenOnRef() const
+    {
+        if ( m_pSelf == NULL )
+            throw Utils::CErrorMsg("GetAlleleLenOnRef on uninitialized RefVariation");
+
+        if ( m_allele_len_on_ref == KSearch::UNINITIALIZED_POSITION )
+        {
+            rc_t rc = ::RefVariationGetAlleleLenOnRef ( m_pSelf, & m_allele_len_on_ref );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "RefVariationGetAlleleLenOnRef");
+        }
+
+        return m_allele_len_on_ref;
+    }
+
+    CVRefVariation VRefVariationIUPACMake ( ::RefVarAlg alg, char const* ref, size_t ref_size,
+            size_t ref_pos_var, char const* variation, size_t variation_size,
+            size_t var_len_on_ref, size_t bases_start)
+    {
+        CVRefVariation obj;
+        rc_t rc = ::RefVariationIUPACMake ( & obj.m_pSelf,
+            ref, ref_size, ref_pos_var, var_len_on_ref, variation, variation_size, alg );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "RefVariationIUPACMake");
+
+#if DEBUG_PRINT != 0
+        printf("Created RefVariation (rd) %p\n", obj.m_pSelf);
+#endif
+        obj.m_bases_start = bases_start;
+        return obj;
+    }
+}
+
+namespace KProc
+{
+    rc_t KThreadFunc ( KThread const* , void* data )
+    {
+        CKThread* obj = static_cast<CKThread*>(data);
+
+        return ( * obj -> m_ThreadFunc ) ( obj -> m_pData );
+    }
+
+    CKThread::CKThread ()
+        : m_pSelf(NULL), m_ThreadFunc(NULL), m_pData(NULL)
+    {
+    }
+
+    CKThread::~CKThread()
+    {
+        Release();
+    }
+    CKThread::CKThread(CKThread const& x)
+    {
+        Clone(x);
+    }
+    CKThread& CKThread::operator=(CKThread const& x)
+    {
+        if (m_pSelf)
+            Release();
+
+        Clone(x);
+        return *this;
+    }
+
+    void CKThread::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing KThread %p\n", m_pSelf);
+#endif
+            ::KThreadRelease(m_pSelf);
+            m_pSelf = NULL;
+            m_ThreadFunc = NULL;
+            m_pData = NULL;
+        }
+    }
+    void CKThread::Clone(CKThread const& x)
+    {
+        m_pSelf = x.m_pSelf;
+        m_ThreadFunc = x.m_ThreadFunc;
+        m_pData = x.m_pData;
+
+        if ( m_pSelf != NULL )
+        {
+            ::KThreadAddRef ( m_pSelf );
+#if DEBUG_PRINT != 0
+            printf ("CLONING KThread %p\n", m_pSelf);
+#endif
+        }
+    }
+
+    void CKThread::Make ( THREAD_FUNC thread_func, void* data )
+    {
+        assert (m_pSelf == NULL);
+        assert (m_ThreadFunc == NULL);
+        assert (m_pData == NULL);
+
+        m_ThreadFunc = thread_func;
+        m_pData = data;
+
+        rc_t rc = ::KThreadMake ( & m_pSelf, KThreadFunc, this );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KThreadMake");
+    }
+
+    rc_t CKThread::Wait ()
+    {
+        rc_t status;
+        rc_t rc = ::KThreadWait ( m_pSelf, & status );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KThreadWait");
+
+        return status;
+    }
+
+///////////////////////////////////////////////////////
+
+    CKLock::CKLock ( )
+    {
+        rc_t rc = ::KLockMake ( & m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KLockMake");
+    }
+
+    CKLock::~CKLock()
+    {
+        Release();
+    }
+
+    CKLock::CKLock(CKLock const& x)
+    {
+        Clone(x);
+    }
+    CKLock& CKLock::operator=(CKLock const& x)
+    {
+        if (m_pSelf)
+            Release();
+
+        Clone(x);
+        return *this;
+    }
+
+    void CKLock::Release()
+    {
+        if (m_pSelf)
+        {
+#if DEBUG_PRINT != 0
+            printf("Releasing KLock %p\n", m_pSelf);
+#endif
+            ::KLockRelease(m_pSelf);
+            m_pSelf = NULL;
+        }
+    }
+    void CKLock::Clone(CKLock const& x)
+    {
+        m_pSelf = x.m_pSelf;
+        ::KLockAddRef ( m_pSelf );
+#if DEBUG_PRINT != 0
+        printf ("CLONING KLock %p\n", m_pSelf);
+#endif
+    }
+
+    void CKLock::Acquire ()
+    {
+        rc_t rc = ::KLockAcquire ( m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KLockAcquire");
+    }
+
+    void CKLock::Lock ()
+    {
+        Acquire ();
+    }
+
+    void CKLock::Unlock ()
+    {
+        rc_t rc = ::KLockUnlock ( m_pSelf );
+        if (rc)
+            throw Utils::CErrorMsg(rc, "KLockUnlock");
+    }
+
+    void CKLock::lock ()
+    {
+        Lock();
+    }
+    void CKLock::unlock ()
+    {
+        Unlock();
+    }
+}
\ No newline at end of file
diff --git a/tools/ref-variation/helper.h b/tools/ref-variation/helper.h
new file mode 100644
index 0000000..88605cf
--- /dev/null
+++ b/tools/ref-variation/helper.h
@@ -0,0 +1,603 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef HELPER_H
+#define HELPER_H
+
+// helper.h
+#include <exception>
+
+#include <string>
+#include <string.h>
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <klib/printf.h>
+#include <klib/vector.h>
+#include <kapp/args.h>
+#include <kapp/progressbar.h>
+#include <kapp/log-xml.h>
+#include <klib/out.h>
+
+#include <vdb/vdb-priv.h>
+#include <kdb/index.h>
+#include <search/ref-variation.h>
+
+#ifndef countof
+#define countof(arr) (sizeof(arr)/sizeof(arr[0]))
+#endif
+
+#ifdef _WIN32
+#pragma warning (disable:4503)
+#endif
+
+#define USING_UINT64_BITMAP 0
+#define MANAGER_WRITABLE 0
+#define DEBUG_PRINT 0
+
+namespace KLib
+{
+    class CKVector
+    {
+    public:
+        CKVector();
+        CKVector (CKVector const& x);
+        CKVector& operator= (CKVector const& x);
+        ~CKVector();
+
+        void SetBool (uint64_t key, bool value);
+        void VisitBool (rc_t ( * f ) ( uint64_t key, bool value, void *user_data ), void *user_data) const;
+
+    private:
+        void Make();
+        void Release();
+
+        ::KVector* m_pSelf;
+    };
+}
+
+namespace Utils
+{
+    class CErrorMsg : public std::exception
+    {
+    public:
+        CErrorMsg(rc_t rc, char const* fmt_str, ...);
+        CErrorMsg(char const* fmt_str, ...);
+
+        rc_t getRC() const;
+        virtual char const* what() const throw();
+
+    private:
+        char m_szDescr[256];
+        rc_t m_rc;
+    };
+
+    template <typename T> T atoi_t ( char const* str_val )
+    {
+        if ( str_val [0] == '\0' )
+            throw Utils::CErrorMsg(0, "atoi_t: invalid input string (empty)");
+
+        size_t i = 0;
+        char sign = '+';
+        if ( str_val[0] == '-' || str_val[0] == '+' )
+        {
+            ++i;
+            sign = str_val[0];
+        }
+
+        T ret = 0;
+        for (; str_val[i] != '\0'; ++i )
+        {
+            if ( str_val[i] < '0' || str_val[i] > '9' )
+                throw Utils::CErrorMsg(0, "atoi_t: invalid input string \"%s\" (invalid character: '%c' at pos=%zu)", str_val, str_val[i], i+1);
+            ret = ret*10 + str_val[i] - '0';
+        }
+
+        return sign == '-' ? -ret : ret;
+    }
+
+    template <typename T> T atou_t ( char const* str_val )
+    {
+        if ( str_val [0] == '\0' )
+            throw Utils::CErrorMsg(0, "atou_t: invalid input string (empty)");
+
+        T ret = 0;
+        for ( size_t i = 0; str_val[i] != '\0'; ++i )
+        {
+            if ( str_val[i] < '0' || str_val[i] > '9' )
+                throw Utils::CErrorMsg(0, "atoi_t: invalid input string \"%s\" (invalid character: '%c' at pos=%zu)", str_val, str_val[i], i+1);
+            ret = ret*10 + str_val[i] - '0';
+        }
+
+        return ret;
+    }
+
+    void HandleException (); // This function must be called inside catch block only
+}
+
+namespace KDBObjects
+{
+    class CKTable;
+}
+
+namespace VDBObjects
+{
+    /* functor to remove trailing '\n' from char reads */
+    template<typename T> class CPostReadAction
+    {
+        T* m_pBuf;
+        uint32_t m_nCount;
+    public:
+        CPostReadAction(T* pBuf, uint32_t nCount) : m_pBuf(pBuf), m_nCount(nCount) {}
+        void operator()() const;
+    };
+    template<typename T> inline void CPostReadAction<T>::operator()() const {}
+    template<> inline void CPostReadAction<char>::operator()() const { m_pBuf[m_nCount] = '\0'; }
+    template<> inline void CPostReadAction<unsigned char>::operator()() const { m_pBuf[m_nCount] = '\0'; }
+
+    class CVCursor;
+    class CVTable;
+    class CVDatabase;
+    class CVSchema;
+
+/////////////////////////////////////////////////////////////////////////////////
+
+    class CVDBManager
+    {
+    public:
+        CVDBManager();
+        ~CVDBManager();
+        CVDBManager(CVDBManager const& x);
+        CVDBManager& operator=(CVDBManager const& x);
+
+        void Make();
+        void Release();
+        CVDatabase OpenDB ( char const* pszDBName ) const;
+        CVTable OpenTable(char const* pszPath) const;
+#if MANAGER_WRITABLE != 0
+        CVDatabase CreateDB ( CVSchema const& schema, char const* pszTypeDesc, ::KCreateMode cmode, char const* pszPath );
+#endif
+        CVSchema MakeSchema () const;
+
+    private:
+        ::VDBManager* m_pSelf;
+    };
+
+/////////////////////////////////////////////////////////////////////////////////
+
+    class CVSchema
+    {
+    public:
+        friend CVSchema CVDBManager::MakeSchema () const;
+#if MANAGER_WRITABLE != 0
+        friend CVDatabase CVDBManager::CreateDB ( CVSchema const& schema, char const* pszTypeDesc, ::KCreateMode cmode, char const* pszPath );
+#endif
+
+        CVSchema();
+        ~CVSchema();
+        CVSchema(CVSchema const& x);
+        CVSchema& operator=(CVSchema const& x);
+
+        void Make();
+        void Release();
+        void VSchemaParseFile(char const* pszFilePath);
+
+    private:
+        void Clone ( CVSchema const& x );
+        ::VSchema* m_pSelf;
+    };
+
+/////////////////////////////////////////////////////////////////////////////////
+
+    class CVDatabase
+    {
+    public:
+        friend CVDatabase CVDBManager::OpenDB ( char const* pszDBName ) const;
+#if MANAGER_WRITABLE != 0
+        friend CVDatabase CVDBManager::CreateDB ( CVSchema const& schema, char const* pszTypeDesc, ::KCreateMode cmode, char const* pszPath );
+#endif
+
+        CVDatabase();
+        ~CVDatabase();
+        CVDatabase(CVDatabase const& x);
+        CVDatabase& operator=(CVDatabase const& x);
+
+        void Release();
+        CVTable OpenTable ( char const* pszTableName ) const;
+#if MANAGER_WRITABLE != 0
+        CVTable CreateTable ( char const* pszTableName );
+        void ColumnCreateParams ( ::KCreateMode cmode, ::KChecksum checksum, size_t pgsize );
+#endif
+
+    private:
+        void Clone(CVDatabase const& x);
+        ::VDatabase* m_pSelf;
+    };
+
+//////////////////////////////////////////////////////////////
+
+    class CVTable
+    {
+    public:
+        friend CVTable CVDatabase::OpenTable(char const* pszTableName) const;
+        friend CVTable CVDBManager::OpenTable(char const* pszPath) const;
+#if MANAGER_WRITABLE != 0
+        friend CVTable CVDatabase::CreateTable ( char const* pszTableName );
+#endif
+
+        CVTable();
+        ~CVTable();
+        CVTable(CVTable const& x);
+        CVTable& operator=(CVTable const& x);
+
+        void Release();
+        CVCursor CreateCursorRead ( size_t cache_size ) const;
+        CVCursor CreateCursorRead ( ) const;
+        KDBObjects::CKTable OpenKTableRead () const;
+
+#if MANAGER_WRITABLE != 0
+        CVCursor CreateCursorWrite ( ::KCreateMode mode );
+#endif
+
+    private:
+        void Clone(CVTable const& x);
+        ::VTable* m_pSelf;
+    };
+
+////////////////////////////////////////////////////////////////////////////
+
+    class CVCursor
+    {
+    public:
+        friend CVCursor CVTable::CreateCursorRead ( ) const;
+        friend CVCursor CVTable::CreateCursorRead ( size_t cache_size ) const;
+#if MANAGER_WRITABLE != 0
+        friend CVCursor CVTable::CreateCursorWrite (::KCreateMode mode);
+#endif
+
+        CVCursor();
+        ~CVCursor();
+        CVCursor(CVCursor const& x);
+        CVCursor& operator=(CVCursor const& x);
+
+        void Release();
+        void PermitPostOpenAdd() const;
+#if MANAGER_WRITABLE != 0
+        void InitColumnIndex(char const* const* ColumnNames, uint32_t* pColumnIndex, size_t nCount, bool set_default);
+#else
+        void InitColumnIndex(char const* const* ColumnNames, uint32_t* pColumnIndex, size_t nCount);
+#endif
+        void Open() const;
+        void GetIdRange(int64_t& idFirstRow, uint64_t& nRowCount) const;
+
+        template <typename T> uint32_t ReadItems (int64_t idRow, uint32_t idxCol, T* pBuf, uint32_t nBufLen) const
+        {
+            uint32_t nItemsRead = 0;
+
+            rc_t rc = ::VCursorReadDirect(m_pSelf, idRow, idxCol, 8*sizeof(T), pBuf, nBufLen, &nItemsRead);
+            if (rc)
+                throw Utils::CErrorMsg(rc, "VCursorReadDirect: row_id=%ld, idxCol=%u", idRow, idxCol);
+
+            //CPostReadAction<T>(pBuf, nItemsRead)();
+
+            return nItemsRead;
+        }
+
+        template <typename T> uint32_t CellDataDirect (int64_t idRow, uint32_t idxCol, T const** pBuf) const
+        {
+            uint32_t nItemsRead = 0;
+
+            assert ( pBuf != NULL );
+
+            void const* pv;
+
+            rc_t rc = ::VCursorCellDataDirect (m_pSelf, idRow, idxCol, NULL, & pv, 0, &nItemsRead);
+            if (rc)
+                throw Utils::CErrorMsg(rc, "VCursorCellDataDirect: row_id=%ld, idxCol=%u", idRow, idxCol);
+
+            *pBuf = static_cast <T const*>(pv);
+
+            return nItemsRead;
+        }
+
+        template <typename T> void Write (uint32_t idxCol, T const* pBuf, uint64_t count)
+        {
+            rc_t rc = ::VCursorWrite ( m_pSelf, idxCol, 8 * sizeof(T), pBuf, 0, count );
+            if (rc)
+                throw Utils::CErrorMsg(rc, "VCursorWrite: idxCol=%u", idxCol);
+        }
+
+        int64_t GetRowId () const;
+        void SetRowId (int64_t row_id) const;
+        void OpenRow () const;
+#if MANAGER_WRITABLE != 0
+        void CommitRow ();
+        void RepeatRow ( uint64_t count );
+        void Commit ();
+#endif
+        void CloseRow () const;
+
+    private:
+        void Clone(CVCursor const& x);
+        ::VCursor* m_pSelf;
+    };
+}
+
+namespace KDBObjects
+{
+//////////////////////////////////////////////////////////////
+    class CKIndex;
+
+    class CKTable
+    {
+    public:
+        friend CKTable VDBObjects::CVTable::OpenKTableRead () const;
+
+        CKTable();
+        ~CKTable();
+        CKTable(CKTable const& x);
+        CKTable& operator=(CKTable const& x);
+
+        void Release();
+
+        CKIndex OpenIndexRead(char const* name) const;
+
+    private:
+        void Clone(CKTable const& x);
+        ::KTable* m_pSelf;
+    };
+
+    class CKIndex
+    {
+    public:
+        friend CKIndex CKTable::OpenIndexRead(char const* name) const;
+
+        CKIndex();
+        ~CKIndex();
+        CKIndex(CKIndex const& x);
+        CKIndex& operator=(CKIndex const& x);
+
+        // returns false if not found
+        bool FindText(const char *key, int64_t *start_id, uint64_t *id_count,
+            int (CC * custom_cmp)(const void *item, struct PBSTNode const *n, void *data ),
+            void *data) const;
+
+        void Release();
+
+    private:
+        void Clone(CKIndex const& x);
+        ::KIndex* m_pSelf;
+    };
+}
+
+
+///////////////////////
+
+namespace KApp
+{
+    class CArgs;
+    class CXMLLogger
+    {
+    public:
+        CXMLLogger ( CArgs const& args );
+        CXMLLogger (CXMLLogger const& x);
+        CXMLLogger& operator= (CXMLLogger const& x);
+        ~CXMLLogger ();
+
+        void Make ( CArgs const& args );
+
+    private:
+        void Release ();
+
+        XMLLogger const* m_pSelf;
+    };
+
+/////////////////////////////////////////
+
+    class CArgs
+    {
+    public:
+        friend void CXMLLogger::Make ( CArgs const& args );
+        CArgs ();
+        CArgs ( CArgs const& x );
+        CArgs& operator= ( CArgs const& x );
+        ~CArgs ();
+
+        ::Args const* GetArgs () const;
+        uint32_t GetParamCount () const;
+        char const* GetParamValue ( uint32_t iteration ) const;
+        uint32_t GetOptionCount ( char const* option_name ) const;
+        char const* GetOptionValue ( char const* option_name, uint32_t iteration ) const;
+
+        template <typename T> T GetOptionValueInt ( char const* option_name, uint32_t iteration ) const
+        {
+            char const* str_val = GetOptionValue ( option_name, iteration );
+            return Utils::atoi_t <T> ( str_val );
+        }
+        template <typename T> T GetOptionValueUInt ( char const* option_name, uint32_t iteration ) const
+        {
+            char const* str_val = GetOptionValue ( option_name, iteration );
+            return Utils::atou_t <T> ( str_val );
+        }
+
+        void MakeAndHandle ( int argc, char** argv, ::OptDef const* pOptions, size_t option_count );
+        // TODO: it's better to make ::ArgsMakeAndHandle be able to take va_list
+        void MakeAndHandle ( int argc, char** argv, ::OptDef const* pOptions1, size_t option_count1, ::OptDef const* pOptions2, size_t option_count2 );
+
+    private:
+
+        void Release ();
+
+        ::Args* m_pSelf;
+    };
+
+    class CProgressBar
+    {
+    public:
+        CProgressBar ( uint64_t size );
+        CProgressBar ( CProgressBar const& x );
+        CProgressBar& operator= ( CProgressBar const& x );
+        ~CProgressBar ();
+
+        void Append ( uint64_t chunk );
+        void Process ( uint64_t chunk, bool force_report );
+
+    private:
+        void Make ( uint64_t size );
+        void Release ();
+
+        KLoadProgressbar const* m_pSelf;
+    };
+}
+
+struct VRefVariation;
+
+namespace KSearch
+{
+    enum { UNINITIALIZED_POSITION = (size_t)-1 };
+
+    class CVRefVariation
+    {
+    public:
+        friend CVRefVariation VRefVariationIUPACMake ( ::RefVarAlg alg,
+            char const* ref, size_t ref_size,
+            size_t ref_pos_var, char const* variation, size_t variation_size,
+            size_t var_len_on_ref, size_t bases_start);
+
+        CVRefVariation();
+        ~CVRefVariation();
+        CVRefVariation(CVRefVariation const& x);
+        CVRefVariation& operator=(CVRefVariation const& x);
+
+        void Release();
+
+        char const* GetSearchQuery() const;
+        size_t GetSearchQueryStartRelative() const;
+        size_t GetSearchQueryStartAbsolute() const;
+        size_t GetSearchQuerySize() const;
+        size_t GetSearchQueryLenOnRef() const;
+
+        char const* GetAllele() const;
+        size_t GetAlleleStartRelative() const; // relative to search region
+        size_t GetAlleleStartAbsolute() const; // in absolute reference coordinates
+        size_t GetAlleleSize() const;
+        size_t GetAlleleLenOnRef() const;
+
+    private:
+        void Clone(CVRefVariation const& x);
+        void ClearMembers();
+        ::RefVariation* m_pSelf;
+        size_t m_bases_start; // the absolute position on the reference
+                              // starting at which the search was initiated
+
+        mutable char const* m_allele, *m_query;
+        mutable size_t m_allele_len, m_allele_len_on_ref, m_query_len, m_query_len_on_ref;
+        mutable size_t m_allele_start, m_query_start;
+    };
+
+    CVRefVariation VRefVariationIUPACMake ( ::RefVarAlg alg, char const* ref, size_t ref_size,
+            size_t ref_pos_var, char const* variation, size_t variation_size,
+            size_t var_len_on_ref, size_t bases_start);
+
+}
+
+struct KThread;
+struct KLock;
+
+namespace KProc
+{
+    class CKThread
+    {
+    public:
+
+        friend rc_t KThreadFunc ( ::KThread const* self, void* data );
+
+        typedef rc_t (*THREAD_FUNC) ( void* data );
+
+        CKThread ();
+        ~CKThread ();
+        CKThread (CKThread const& x);
+        CKThread& operator= (CKThread const& x);
+
+        void Make ( THREAD_FUNC thread_func, void* data );
+        void Release();
+
+        rc_t Wait ();
+
+    private:
+        void Clone(CKThread const& x);
+        ::KThread* m_pSelf;
+
+        THREAD_FUNC m_ThreadFunc;
+        void* m_pData;
+    };
+
+    class CKLock
+    {
+    public:
+        CKLock ();
+        ~CKLock ();
+        CKLock (CKLock const& x);
+        CKLock& operator= (CKLock const& x);
+
+        void Release();
+
+        void Acquire ();
+        void Lock ();
+        void Unlock ();
+
+        // for compatibility with standard library
+        void lock();
+        void unlock();
+
+    private:
+        void Clone(CKLock const& x);
+        ::KLock* m_pSelf;
+    };
+
+    template <class TLockable> class CLockGuard
+    {
+    public:
+        CLockGuard ( TLockable & lock ) : m_lock (lock)
+        {
+            m_lock.lock();
+        }
+        ~CLockGuard ( )
+        {
+            m_lock.unlock();
+        }
+
+        CLockGuard( CLockGuard<TLockable> const& x );
+        CLockGuard<TLockable>& operator=( CLockGuard<TLockable> const& x );
+
+    private:
+        TLockable & m_lock;
+    };
+}
+#endif
\ No newline at end of file
diff --git a/tools/ref-variation/ref-variation.cpp b/tools/ref-variation/ref-variation.cpp
new file mode 100644
index 0000000..3823001
--- /dev/null
+++ b/tools/ref-variation/ref-variation.cpp
@@ -0,0 +1,2097 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#define SECRET_OPTION 0
+
+#include <iostream>
+#include <string.h>
+#include <stdio.h>
+#include <stdint.h>
+
+#include <vector>
+#include <string>
+#include <fstream>
+
+#include <kapp/main.h>
+#include <klib/rc.h>
+#include <atomic.h>
+
+#include <ngs/ncbi/NGS.hpp>
+#include <ngs/ReferenceSequence.hpp>
+
+#include "helper.h"
+#include "common.h"
+
+#define CPP_THREADS 0
+
+class CNoMutex // empty class for singlethreaded lock_guard (no actions)
+{
+public:
+    CNoMutex() {}
+    ~CNoMutex() {}
+    CNoMutex(CNoMutex const& x);
+    CNoMutex const& operator=(CNoMutex const& x);
+
+    void lock() {}
+    void unlock() {}
+};
+
+#if CPP_THREADS != 0
+#include <thread>
+#include <mutex>
+
+#define LOCK_GUARD std::lock_guard<TLock>
+#define LOCK std::mutex
+
+#else
+
+#define LOCK_GUARD KProc::CLockGuard<TLock>
+#define LOCK KProc::CKLock
+
+#endif
+
+namespace NSRefVariation
+{
+
+#define COUNT_STRAND_NONE_STR           "none"
+#define COUNT_STRAND_COUNTERALIGNED_STR "counteraligned"
+#define COUNT_STRAND_COALIGNED_STR      "coaligned"
+#define PARAM_ALG_SW "sw"
+#define PARAM_ALG_RA "ra"
+
+    enum EnumCountStrand
+    {
+        COUNT_STRAND_NONE,
+        COUNT_STRAND_COUNTERALIGNED,
+        COUNT_STRAND_COALIGNED
+    };
+
+    struct Params
+    {
+        // command line params
+
+        // command line options
+        char const* ref_acc;
+        int64_t ref_pos_var;
+        char query[256];
+        size_t var_len_on_ref;
+        int verbosity;
+        size_t thread_count;
+        bool calc_coverage;
+        char const* input_file;
+        EnumCountStrand count_strand;
+        uint32_t query_min_rep;
+        uint32_t query_max_rep;
+        ::RefVarAlg alg;
+    } g_Params =
+    {
+        "",
+        -1,
+        "",
+        0,
+        0,
+        1,
+        false,
+        "",
+        COUNT_STRAND_NONE,
+        0,
+        0,
+        ::refvarAlgSW
+    };
+
+    class CInputRun
+    {
+    public:
+
+        CInputRun (char const* run_name) : m_run_name (run_name == NULL ? "" : run_name)
+        {}
+
+        CInputRun (std::string const& run_name, std::string const& run_path, std::string const& pileup_stats_path)
+            : m_run_name (run_name),
+              m_run_path (run_path),
+              m_pileup_stats_path (pileup_stats_path)
+        {}
+
+        std::string const& GetRunName() const { return m_run_name; }
+        std::string const& GetRunPath() const { return m_run_path; }
+        std::string const& GetPileupStatsPath() const { return m_pileup_stats_path; }
+
+        bool IsValid () const { return m_run_name.size() > 0; }
+
+    private:
+
+        std::string m_run_name;
+        std::string m_run_path;
+        std::string m_pileup_stats_path;
+    };
+
+    class CInputRuns
+    {
+    public:
+        CInputRuns ();
+        CInputRuns (KApp::CArgs const& args);
+        CInputRuns (CInputRuns const& ); // no copy
+        CInputRuns& operator= (CInputRuns const& ); // no assignment
+
+        void Init ( KApp::CArgs const& args ); // not thread-safe!
+
+        size_t GetCount() const;
+        CInputRun GetNext () const;
+
+        size_t GetNextIndex() const;
+        CInputRun Get(size_t index) const;
+    private:
+
+        std::vector <CInputRun> m_input_runs;
+        mutable atomic_t m_param_index;
+    };
+
+    enum
+    {
+        VERBOSITY_DEFAULT           = 0,
+        VERBOSITY_PRINT_VAR_SPEC    = 1,
+        VERBOSITY_SOME_DETAILS      = 2,
+        VERBOSITY_MORE_DETAILS      = 3
+    };
+
+
+#if SECRET_OPTION != 0
+    char const OPTION_SECRET[] = "alt-ctrl-shift-f12";
+    char const* USAGE_SECRET[] = { "activate secret mode", NULL };
+#endif
+
+    char const OPTION_REFERENCE_ACC[] = "reference-accession";
+    char const ALIAS_REFERENCE_ACC[]  = "r";
+    char const* USAGE_REFERENCE_ACC[] = { "look for the variation in this reference", NULL };
+
+    char const OPTION_REF_POS[] = "position";
+    char const ALIAS_REF_POS[]  = "p";
+    char const* USAGE_REF_POS[] = { "look for the variation at this position on the reference", NULL };
+
+    char const OPTION_QUERY[] = "query";
+    //char const ALIAS_QUERY[]  = "q"; // -q is deprecated
+    char const* USAGE_QUERY[] = { "query to find in the given reference (\"-\" is treated as an empty string, or deletion)."
+        " Optionally, for non-empty query, the variable number of repetitions "
+        "can be specified in the following way: "
+        "\"<query>[<min_rep>-<max_rep>]\" where <query> is the pattern which "
+        "should be repeated, <min_rep> is the minimum number of repetiotions and "
+        "<max_rep> is the maximum number of repetiotions to produce from query pattern. "
+        "E.g.: \"AT[1-3]\" produces 3 queries: \"AT\", \"ATAT\" and \"ATATAT\". "
+        "In this case the output counts will contain as many columns for matched "
+        "counts as many variations is produced from the given query.", NULL };
+
+    char const OPTION_VAR_LEN_ON_REF[] = "variation-length";
+    char const ALIAS_VAR_LEN_ON_REF[]  = "l";
+    char const* USAGE_VAR_LEN_ON_REF[] = { "the length of the variation on the reference (0 means pure insertion)", NULL };
+
+    char const OPTION_VERBOSITY[] = "verbose";
+    char const ALIAS_VERBOSITY[]  = "v";
+    char const* USAGE_VERBOSITY[] = { "increase the verbosity of the program. use multiple times for more verbosity.", NULL };
+
+    char const OPTION_THREADS[] = "threads";
+    char const ALIAS_THREADS[]  = "t";
+    char const* USAGE_THREADS[] = { "the number of threads to run", NULL };
+
+    char const OPTION_COVERAGE[] = "coverage";
+    char const ALIAS_COVERAGE[]  = "c";
+    char const* USAGE_COVERAGE[] = { "output coverage (the nubmer of alignments matching the given variation query) for each run", NULL };
+
+    char const OPTION_INPUT_FILE[] = "input-file";
+    char const ALIAS_INPUT_FILE[]  = "i";
+    char const* USAGE_INPUT_FILE[] = { "take runs from input file rather than from command line. The file must be in text format, each line should contain three tab-separated values: <run-accession> <run-path> <pileup-stats-path>, the latter two are optional", NULL };
+
+    char const OPTION_COUNT_STRAND[] = "count-strand";
+    //char const ALIAS_COUNT_STRAND[]  = "s";
+    char const* USAGE_COUNT_STRAND[] = { "controls relative orientation of 3' and 5' fragments. "
+        "\""COUNT_STRAND_NONE_STR"\" - do not count (default). "
+        "\""COUNT_STRAND_COUNTERALIGNED_STR"\" - as in Illumina. "
+        "\""COUNT_STRAND_COALIGNED_STR"\" - as in 454 or IonTorrent. ", NULL };
+
+    char const OPTION_ALG[] = "algorithm";
+    //char const ALIAS_ALG[]  = "a";
+    char const* USAGE_ALG[] = { "the algorithm to use for searching. "
+        "\""PARAM_ALG_SW"\" means Smith-Waterman. "
+        "\""PARAM_ALG_RA"\" means Rolling bulldozer algorithm\n", NULL };
+
+    ::OptDef Options[] =
+    {
+        { OPTION_REFERENCE_ACC, ALIAS_REFERENCE_ACC, NULL, USAGE_REFERENCE_ACC, 1, true, true }
+        ,{ OPTION_REF_POS,       ALIAS_REF_POS,       NULL, USAGE_REF_POS,       1, true, true }
+        ,{ OPTION_QUERY,         /*ALIAS_QUERY*/NULL, NULL, USAGE_QUERY,         1, true, true }
+        ,{ OPTION_VAR_LEN_ON_REF,ALIAS_VAR_LEN_ON_REF,NULL, USAGE_VAR_LEN_ON_REF,1, true, true }
+        ,{ OPTION_THREADS,       ALIAS_THREADS,       NULL, USAGE_THREADS,       1, true, false }
+        ,{ OPTION_COVERAGE,      ALIAS_COVERAGE,      NULL, USAGE_COVERAGE,      1, false,false }
+        ,{ OPTION_INPUT_FILE,    ALIAS_INPUT_FILE,    NULL, USAGE_INPUT_FILE,    1, true, false }
+        ,{ OPTION_COUNT_STRAND,  NULL,                NULL, USAGE_COUNT_STRAND,  1, true, false }
+        ,{ OPTION_ALG,           NULL,                NULL, USAGE_ALG,           1, true, false }
+#if SECRET_OPTION != 0
+        ,{ OPTION_SECRET,        NULL,                NULL, USAGE_SECRET,        1, true, false }
+#endif
+        //,{ OPTION_VERBOSITY,     ALIAS_VERBOSITY,     NULL, USAGE_VERBOSITY,     0, false, false }
+    };
+
+    void print_indel (char const* name, char const* text, size_t text_size, size_t indel_start, size_t indel_len)
+    {
+        int prefix_count = (int)(indel_start < 5 ? indel_start : 5);
+        int suffix_count = (int)((text_size - (indel_start + indel_len)) < 5 ?
+                (text_size - (indel_start + indel_len)) : 5);
+
+        char buf[512] = "";
+        rc_t res = string_printf(buf, countof(buf), NULL, "%s: %s%.*s[%.*s]%.*s%s",
+            name,
+            indel_start < 5 ? "" : "...",
+            prefix_count, text + indel_start - prefix_count, //(int)indel_start, text,
+            (int)indel_len, text + indel_start,
+            suffix_count, text + indel_start + indel_len, //(int)(text_size - (indel_start + indel_len)), text + indel_start + indel_len
+            (text_size - (indel_start + indel_len)) > 5 ? "..." : "");
+        if (res == rcBuffer || res == rcInsufficient)
+            buf[countof(buf) - 1] = '\0';
+
+        LOGMSG ( klogInfo, buf );
+    }
+
+#if SECRET_OPTION != 0
+    enum ColumnNameIndices
+    {
+//        idx_SEQ_LEN,
+//        idx_SEQ_START,
+        idx_MAX_SEQ_LEN,
+        idx_TOTAL_SEQ_LEN,
+        idx_READ
+    };
+    char const* g_ColumnNames[] =
+    {
+//        "SEQ_LEN",
+//        "SEQ_START", // 1-based
+        "MAX_SEQ_LEN",
+        "TOTAL_SEQ_LEN",
+        "READ"
+    };
+    uint32_t g_ColumnIndex [ countof (g_ColumnNames) ];
+#endif
+
+    // TODO: remove unused from here:
+    // idx_RUN_NAME - logging only for now
+    // idx_MISMATCH_COUNTS, idx_INSERTION_COUNTS, idx_DELETION_COUNT
+    //     - intended for optimization but not used now
+    // idx_REFERENCE_SPEC, idx_REF_POS - not used
+
+    enum PileupColumnNameIndices
+    {
+        idx_DELETION_COUNT,
+        idx_DEPTH,
+        idx_INSERTION_COUNTS,
+        idx_MISMATCH_COUNTS,
+        idx_REFERENCE_SPEC,
+        idx_REF_POS,
+        idx_RUN_NAME
+    };
+    char const* g_PileupColumnNames[] =
+    {
+        "DELETION_COUNT",
+        "DEPTH",
+        "INSERTION_COUNTS",
+        "MISMATCH_COUNTS",
+        "REFERENCE_SPEC",
+        "REF_POS",
+        "RUN_NAME"
+    };
+
+    uint32_t base2na_to_index ( char const ch )
+    {
+        switch ( ch )
+        {
+        case 'A':
+        case 'a':
+            return 0;
+        case 'C':
+        case 'c':
+            return 1;
+        case 'G':
+        case 'g':
+            return 2;
+        case 'T':
+        case 't':
+            return 3;
+        default:
+            assert ( false );
+            return (uint32_t) -1;
+        }
+    }
+
+    enum
+    {
+        PILEUP_DEFINITELY_NOT_FOUND,
+        PILEUP_DEFINITELY_FOUND,
+        PILEUP_MAYBE_FOUND
+    };
+
+    struct count_pair
+    {
+        size_t count;
+        size_t count_posititve;
+    };
+
+    struct coverage_info
+    {
+        count_pair count_total;
+        std::vector <count_pair> counts_matched;
+    };
+
+    template <class TLock> void update_run_coverage ( char const* acc,
+        size_t alignments_total, size_t alignments_total_positive,
+        size_t alignments_matched, size_t alignments_matched_positive,
+        TLock* lock_cout, coverage_info* pcoverage_count, size_t index)
+    {
+        coverage_info& counts = *pcoverage_count;
+
+        if ( counts.count_total.count != (size_t)-1 )
+        {
+            if ( counts.count_total.count != alignments_total ||
+                counts.count_total.count_posititve != alignments_total_positive )
+            {
+                LOCK_GUARD l(*lock_cout);
+                PLOGMSG ( klogWarn,
+                    (klogWarn,
+                    "Total counts don't match for $(ACC) for query # $(IDXPREV) and $(IDXCUR): "
+                    "total: $(TOTALPREV) vs $(TOTALCUR), total positive: $(TOTALPOSPREV) vs $(TOTALPOSCUR)",
+                    "ACC=%s,IDXPREV=%zu,IDXCUR=%zu,TOTALPREV=%zu,TOTALCUR=%zu,TOTALPOSPREV=%zu,TOTALPOSCUR=%zu",
+                    acc, index, index + 1, alignments_total, counts.count_total.count,
+                    alignments_total_positive, counts.count_total.count_posititve));
+            }
+        }
+
+        counts.count_total.count = alignments_total;
+        counts.count_total.count_posititve = alignments_total_positive;
+
+        assert ( index < counts.counts_matched.size() );
+        count_pair& matched_count = counts.counts_matched [index];
+
+        matched_count.count = alignments_matched;
+        matched_count.count_posititve = alignments_matched_positive;
+    }
+    
+
+    template <class TLock> void report_run_coverage ( char const* acc,
+        coverage_info const* pcoverage_count, TLock* lock_cout) 
+    {
+        coverage_info const& counts = *pcoverage_count;
+        if ( g_Params.calc_coverage )
+        {
+            LOCK_GUARD l(*lock_cout);
+
+            OUTMSG (( "%s", acc ));
+
+            std::vector <count_pair>::const_iterator cit = counts.counts_matched.begin();
+            std::vector <count_pair>::const_iterator cend = counts.counts_matched.end();
+            for (; cit != cend; ++cit)
+            {
+                count_pair const& c = *cit;
+                OUTMSG (( "\t%zu", c.count ));
+        
+                if ( g_Params.count_strand != COUNT_STRAND_NONE )
+                    OUTMSG (( ",%zu", c.count_posititve ));
+            }
+
+            OUTMSG (( "\t%zu", counts.count_total.count ));
+        
+            if ( g_Params.count_strand != COUNT_STRAND_NONE )
+                OUTMSG (( ",%zu", counts.count_total.count_posititve ));
+            
+            OUTMSG (("\n"));
+        }
+        else
+        {
+
+            std::vector <count_pair>::const_iterator cit = counts.counts_matched.begin();
+            std::vector <count_pair>::const_iterator cend = counts.counts_matched.end();
+            for (; cit != cend; ++cit)
+            {
+                count_pair const& c = *cit;
+                if ( c.count > 0 )
+                {
+                    LOCK_GUARD l(*lock_cout);
+                    OUTMSG (( "%s\n", acc ));
+                    break;
+                }
+            }
+        }
+    }
+
+    template <class TLock> int find_alignment_in_pileup_db ( char const* acc,
+                char const* acc_pileup, char const* ref_name,
+                KSearch::CVRefVariation const* pobj, size_t ref_pos,
+                size_t query_len_on_ref,
+                TLock* lock_cout, size_t thread_num,
+                coverage_info* pcoverage_count, size_t index )
+    {
+        if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_MORE_DETAILS )
+        {
+            LOCK_GUARD l(*lock_cout);
+            PLOGMSG ( klogInfo,
+                ( klogInfo,
+                "[$(THREAD_NUM)] Processing $(ACC)...",
+                "THREAD_NUM=%zu,ACC=%s", thread_num, acc_pileup
+                ));
+        }
+
+        KSearch::CVRefVariation const& obj = *pobj;
+        VDBObjects::CVDBManager mgr;
+        mgr.Make();
+
+        try
+        {
+            VDBObjects::CVDatabase db = mgr.OpenDB ( acc_pileup );
+            VDBObjects::CVTable table = db.OpenTable ( "STATS" );
+            VDBObjects::CVCursor cursor = table.CreateCursorRead ();
+
+            uint32_t PileupColumnIndex [ countof (g_PileupColumnNames) ];
+            cursor.InitColumnIndex (g_PileupColumnNames, PileupColumnIndex, countof(g_PileupColumnNames));
+            cursor.Open();
+
+            int64_t id_first = 0;
+            uint64_t row_count = 0;
+
+            cursor.GetIdRange (id_first, row_count);
+
+            // Find Reference beginning
+
+            KDBObjects::CKTable ktbl = table.OpenKTableRead();
+            KDBObjects::CKIndex kindex = ktbl.OpenIndexRead("ref_spec");
+
+            int64_t ref_id_start;
+            uint64_t id_count;
+
+            bool found = kindex.FindText ( ref_name, & ref_id_start, & id_count, NULL, NULL );
+            if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_MORE_DETAILS )
+            {
+                LOCK_GUARD l(*lock_cout);
+                PLOGMSG ( klogInfo,
+                    ( klogInfo,
+                    "[$(THREAD_NUM)] $(FOUND)found $(REFNAME) row_id=$(ROWID), id_count=$(IDCOUNT)",
+                    "THREAD_NUM=%zu,FOUND=%s,REFNAME=%s,ROWID=%ld,IDCOUNT=%lu",
+                    thread_num, found ? "" : " not ", ref_name, ref_id_start, id_count
+                    ));
+            }
+            if ( !found )
+            {
+                update_run_coverage ( acc, 0, 0, 0, 0, lock_cout, pcoverage_count, index );
+                return PILEUP_DEFINITELY_NOT_FOUND;
+            }
+
+            int64_t indel_cnt = (int64_t)obj.GetAlleleSize() - (int64_t)obj.GetAlleleLenOnRef();
+            //int64_t indel_check_cnt = indel_cnt > 0 ? indel_cnt : -indel_cnt;
+            size_t alignments_total = (size_t)((uint32_t)-1);
+
+            for ( int64_t pos = (int64_t)ref_pos; pos < (int64_t)( ref_pos + query_len_on_ref ); ++pos )
+            {
+                if ( pos + ref_id_start >= id_first + (int64_t)row_count )
+                {
+                    // TODO: this is not expected normally, now
+                    // nothing will be printed to the output
+                    // but maybe we also need to report matches and total alignments
+                    // here (0 0)
+
+                    if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_MORE_DETAILS )
+                    {
+                        LOCK_GUARD l(*lock_cout);
+                        PLOGMSG ( klogInfo,
+                            ( klogWarn,
+                            "[$(THREAD_NUM)] OUT OF BOUNDS! filtering out",
+                            "THREAD_NUM=%zu", thread_num
+                            ));
+                    }
+
+                    update_run_coverage ( acc, 0, 0, 0, 0, lock_cout, pcoverage_count, index );
+                    return PILEUP_DEFINITELY_NOT_FOUND; // went beyond the end of db, probably, it's a bug in db
+                }
+
+                uint32_t depth;
+                uint32_t count = cursor.ReadItems ( pos + ref_id_start, PileupColumnIndex[idx_DEPTH], & depth, sizeof depth );
+                if ( count == 0)
+                    depth = 0;
+
+                if ( depth == 0 )
+                {
+                    if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_MORE_DETAILS )
+                    {
+                        LOCK_GUARD l(*lock_cout);
+                        PLOGMSG ( klogInfo,
+                            ( klogInfo,
+                            "[$(THREAD_NUM)] depth=0 at the ref_pos=$(POS) (id=$(ID)) filtering out",
+                            "THREAD_NUM=%zu,POS=%ld,ID=%ld", thread_num, pos, pos + ref_id_start
+                            ));
+                    }
+                    update_run_coverage ( acc, 0, 0, 0, 0, lock_cout, pcoverage_count, index );
+                    return PILEUP_DEFINITELY_NOT_FOUND;
+                }
+
+                // if OPTION_COUNT_STRAND != none - cannot report any non-zero counts,
+                // so no further optimization is possible
+                if ( g_Params.count_strand != COUNT_STRAND_NONE )
+                    continue;
+
+                if ( depth < alignments_total )
+                    alignments_total = depth;
+
+                if ( indel_cnt == 0 ) // pure mismatch optimization
+                {
+                    // 1. for query of length == 1 we can return PILEUP_DEFINITELY_FOUND
+                    //    and produce output (for total count can use DEPTH for -c option)
+
+                    uint32_t mismatch[4];
+                    count = cursor.ReadItems ( pos + ref_id_start, PileupColumnIndex[idx_MISMATCH_COUNTS], mismatch, sizeof mismatch );
+                    assert ( count == 0 || count == 4 );
+
+                    size_t allele_size = obj.GetAlleleSize();
+                    char const* allele = obj.GetAllele();
+                    assert (count == 0 || pos - ref_pos < allele_size );
+                    size_t alignments_matched = count == 0 ? 0 :
+                        mismatch [base2na_to_index(allele[pos - ref_pos])];
+
+                    if ( obj.GetAlleleLenOnRef() == 1 && obj.GetAlleleSize() == 1 )
+                    {
+                        update_run_coverage ( acc, alignments_total, 0, alignments_matched, 0, lock_cout, pcoverage_count, index );
+                        return alignments_matched == 0 ?
+                            PILEUP_DEFINITELY_NOT_FOUND : PILEUP_DEFINITELY_FOUND;
+                    }
+
+                    // 2. if at least one position has zero MISMATCH_COUNT - PILEUP_DEFINITELY_NOT_FOUND
+                    //    for the case when no -c option is specified
+                    //    otherwise we have to go into SRR to get actual
+                    //    alignments_total or alignments_matched
+
+                    else if ( alignments_matched == 0 && ! g_Params.calc_coverage )
+                    {
+                        update_run_coverage ( acc, alignments_total, 0, alignments_matched, 0, lock_cout, pcoverage_count, index );
+                        return PILEUP_DEFINITELY_NOT_FOUND;
+                    }
+                }
+                // TODO: see if INSERTION_COUNTS or DELETION_COUNT can be also used
+                // for optimizations (at least for the case of lenght=1 indels).
+#if 0
+                else if ( indel_cnt > 0 ) // insertion
+                {
+                    uint32_t counts[4];
+                    count = cursor.ReadItems ( pos + ref_id_start, PileupColumnIndex[idx_INSERTION_COUNTS], counts, sizeof counts );
+                    assert ( count == 0 || count == 4 );
+
+                    LOCK_GUARD l(*lock_cout);
+                    std::cout
+                        << "pos=" << pos
+                        << ", pileup row_id=" << pos + ref_id_start
+                        << ", insertions=";
+                    if ( count )
+                    {
+                        std::cout << "[";
+                        for (size_t i = 0; i < count; ++i)
+                            std::cout << ( i == 0 ? "" : ", ") << counts[i];
+                        std::cout << "]";
+                    }
+                    else
+                        std::cout << "<none>";
+
+                    count = cursor.ReadItems ( pos + ref_id_start, PileupColumnIndex[idx_MISMATCH_COUNTS], counts, sizeof counts );
+                    assert ( count == 0 || count == 4 );
+                    std::cout << ", mismatches=";
+                    if ( count )
+                    {
+                        std::cout << "[";
+                        for (size_t i = 0; i < count; ++i)
+                            std::cout << ( i == 0 ? "" : ", ") << counts[i];
+                        std::cout << "]";
+                    }
+                    else
+                        std::cout << "<none>";
+
+                    count = cursor.ReadItems ( pos + ref_id_start, PileupColumnIndex[idx_DELETION_COUNT], counts, sizeof counts[0] );
+                    assert ( count == 0 || count == 1 );
+
+                    std::cout << ", deletions=";
+                    if ( count > 0 ) 
+                        std::cout << counts[0];
+                    else
+                        std::cout << "<none>";
+
+                    std::cout << std::endl;
+                }
+                else
+                {
+                    LOCK_GUARD l(*lock_cout);
+                    std::cout << "DELETION" << std::endl;
+                }
+#endif
+            }
+
+            if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_SOME_DETAILS )
+            {
+                char run_name[64];
+                uint32_t count = cursor.ReadItems ( id_first, PileupColumnIndex[idx_RUN_NAME], run_name, countof(run_name)-1 );
+                assert (count < countof(run_name));
+                run_name [count] = '\0';
+
+                if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_SOME_DETAILS )
+                {
+                    LOCK_GUARD l(*lock_cout);
+                    PLOGMSG ( klogInfo,
+                        ( klogInfo,
+                        "[$(THREAD_NUM)] $(RUNNAME) is suspicious",
+                        "THREAD_NUM=%zu,RUNNAME=%s", thread_num, run_name
+                        ));
+                }
+                //char const* p = run_name[0] == '/' ? run_name + 1 : run_name;
+            }
+
+            return PILEUP_MAYBE_FOUND;
+        }
+        catch ( Utils::CErrorMsg const& e )
+        {
+            if ( e.getRC() == SILENT_RC(rcVFS,rcMgr,rcOpening,rcDirectory,rcNotFound)
+                || e.getRC() == SILENT_RC(rcVFS,rcTree,rcResolving,rcPath,rcNotFound))
+            {
+                if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_MORE_DETAILS )
+                {
+                    LOCK_GUARD l(*lock_cout);
+                    PLOGMSG ( klogInfo,
+                        ( klogInfo,
+                        "[$(THREAD_NUM)] pileup db NOT FOUND, need to look into run itself",
+                        "THREAD_NUM=%zu", thread_num
+                        ));
+                }
+                return PILEUP_MAYBE_FOUND;
+            }
+            else if ( e.getRC() == SILENT_RC(rcDB,rcMgr,rcOpening,rcDatabase,rcIncorrect))
+            {
+                if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_MORE_DETAILS )
+                {
+                    LOCK_GUARD l(*lock_cout);
+                    PLOGMSG ( klogWarn,
+                        ( klogWarn,
+                        "[$(THREAD_NUM)] BAD pileup db, need to look into run itself",
+                        "THREAD_NUM=%zu", thread_num
+                        ));
+                }
+                return PILEUP_MAYBE_FOUND;
+            }
+            else
+                throw;
+        }
+    }
+
+    bool is_primary_mate ( ngs::Fragment const& frag )
+    {
+        ngs::StringRef id = frag.getFragmentId();
+
+        // inplace strstr for non null-terminating string
+
+        char const pattern[] = { '.', 'F', 'A', '0', '.' };
+
+        if ( id.size() < countof ( pattern ) )
+            return false;
+
+        char const* data = id.data();
+        size_t stop = id.size() - countof ( pattern );
+
+        for (size_t i = 0; i <= stop; ++i )
+        {
+            if (   data [ i + 0 ] == pattern [ 0 ]
+                && data [ i + 1 ] == pattern [ 1 ]
+                && data [ i + 2 ] == pattern [ 2 ]
+                && data [ i + 3 ] == pattern [ 3 ]
+                && data [ i + 4 ] == pattern [ 4 ]
+                )
+            {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    template <class TLock> void find_alignments_in_run_db ( char const* acc,
+        char const* path, char const* ref_name, size_t ref_start,
+        char const* variation, size_t var_size, size_t slice_size,
+        TLock* lock_cout, size_t thread_num,
+        coverage_info* pcoverage_count, size_t index)
+    {
+        if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_MORE_DETAILS )
+        {
+            LOCK_GUARD l(*lock_cout);
+            PLOGMSG ( klogInfo,
+                ( klogInfo,
+                "[$(THREAD_NUM)] Processing $(ACC)",
+                "THREAD_NUM=%zu,ACC=%s", thread_num, acc
+                ));
+        }
+
+        ncbi::ReadCollection run = ncbi::NGS::openReadCollection ( path && path[0] ? path : acc );
+
+        // TODO: if it works, it should me moved at the upper level, so
+        // it would not be calculated for each run. It should be done one time
+        // for each variation search
+        char const* pattern = g_Params.query_min_rep != 0 ? g_Params.query : NULL;
+        size_t pattern_len = g_Params.query_min_rep != 0 ? strlen (g_Params.query) : 0;
+
+        if ( run.hasReference ( ref_name ) )
+        {
+            if ( slice_size == 0 )
+                slice_size = 1; // for a pure insertion we at least a slice of length == 1 ?
+
+            ngs::Reference reference = run.getReference( ref_name );
+            //ngs::AlignmentIterator ai = reference.getAlignmentSlice (
+            //    ref_start, slice_size + pattern_len, ngs::Alignment::all);
+
+            // TODO: remove C-cast to ngs::Alignment::AlignmentFilter
+            // when it's fixed in ngs api
+            ngs::AlignmentIterator ai = reference.getFilteredAlignmentSlice (
+                ref_start, slice_size + pattern_len, ngs::Alignment::all, (ngs::Alignment::AlignmentFilter)0, 0);
+
+            size_t alignments_total = 0, alignments_total_negative = 0;
+            size_t alignments_matched = 0, alignments_matched_negative = 0;
+            while ( ai.nextAlignment() )
+            {
+                uint64_t ref_pos_range = ai.getReferencePositionProjectionRange (ref_start);
+                if ( ref_pos_range == (uint64_t)-1 ) // effectively, checking that read doesn't start past ref_start
+                    continue;
+
+                int64_t align_pos_first = (int64_t)( ref_pos_range >> 32);
+                int64_t align_pos_count = ref_pos_range & 0xFFFFFFFF;
+
+                // checking that read doesn't end before ref slice ends
+                if ( (int64_t) ai.getAlignmentLength() - align_pos_first < (int64_t)slice_size )
+                    continue;
+
+                ngs::StringRef bases = ai.getAlignedFragmentBases ();
+
+                ++ alignments_total;
+                bool is_negative = g_Params.count_strand != COUNT_STRAND_NONE
+                    && ai.getIsReversedOrientation();
+                if ( g_Params.count_strand == COUNT_STRAND_COUNTERALIGNED && ! is_primary_mate ( ai ) )
+                    is_negative = ! is_negative;
+
+                if (is_negative)
+                    ++ alignments_total_negative;
+
+                char const* bases_data = bases.data();
+                size_t bases_size = bases.size();
+
+                // trying all possible starting positions in
+                // the case when single reference position
+                // can have multiple alignment projections
+                for (int64_t i = 0; i < align_pos_count; ++i)
+                {
+                    int64_t align_pos = align_pos_first + i;
+
+                    bool match = bases_size + align_pos >= var_size && strncmp (variation, bases_data + align_pos, var_size) == 0;
+                    if ( match && pattern != NULL )
+                    {
+                        char const* align_suffix = bases_data + align_pos + var_size;
+                        size_t align_suffix_size = bases_size - (align_pos + var_size);
+
+                        size_t min_size = align_suffix_size < pattern_len ? align_suffix_size : pattern_len;
+                        match = strncmp ( pattern, align_suffix, min_size ) != 0;
+                    }
+                    if ( match )
+                    {
+                        ++ alignments_matched;
+                        if ( ! g_Params.calc_coverage )
+                            goto BREAK_ALIGNMENT_ITER; // -c option is for speed-up, so we sacrifice verbose output
+                        if (is_negative)
+                            ++ alignments_matched_negative;
+                    }
+                    if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_SOME_DETAILS )
+                    {
+                        LOCK_GUARD l(*lock_cout);
+                        PLOGMSG ( klogInfo,
+                            ( klogInfo,
+                            "[$(THREAD_NUM)] id=$(ID): $(BASES)$(MATCH)",
+                            "THREAD_NUM=%zu,ID=%s,BASES=%s,MATCH=%s",
+                            thread_num, ai.getAlignmentId().data(),
+                            bases.toString ( align_pos, var_size ).c_str(),
+                            match ? " MATCH!" : ""
+                            ));
+                    }
+                    if ( match )
+                        break;
+                }
+            }
+
+BREAK_ALIGNMENT_ITER:
+            update_run_coverage ( acc,
+                alignments_total, alignments_total - alignments_total_negative,
+                alignments_matched, alignments_matched - alignments_matched_negative,
+                lock_cout, pcoverage_count, index );
+        }
+        else
+        {
+            if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_MORE_DETAILS )
+            {
+                LOCK_GUARD l(*lock_cout);
+                PLOGMSG ( klogInfo,
+                    ( klogInfo,
+                    "[$(THREAD_NUM)] reference $(REFNAME) NOT FOUND in $(ACC), skipping",
+                    "THREAD_NUM=%zu,REFNAME=%s,ACC=%s", thread_num, ref_name, acc
+                    ));
+            }
+
+            update_run_coverage ( acc, 0, 0, 0, 0, lock_cout, pcoverage_count, index );
+        }
+    }
+
+    template <class TLock> void find_alignments_in_single_run (char const* acc,
+        char const* path, char const* pileup_path, char const* ref_name,
+        KSearch::CVRefVariation const* pobj, size_t index,
+        TLock* lock_cout, size_t thread_num, coverage_info* pcoverage_count)
+    {
+        char const* variation;
+        size_t query_len_on_ref, var_start, var_size;
+
+        variation = pobj->GetSearchQuery();
+        var_size = pobj->GetSearchQuerySize();
+        query_len_on_ref = pobj->GetSearchQueryLenOnRef();
+        var_start = pobj->GetSearchQueryStartAbsolute();
+
+        int res = find_alignment_in_pileup_db ( acc, pileup_path, ref_name,
+            pobj, var_start, query_len_on_ref, lock_cout, thread_num, pcoverage_count, index );
+
+        if ( res == PILEUP_MAYBE_FOUND )
+        {
+            find_alignments_in_run_db( acc, path, ref_name, var_start,
+                variation, var_size, query_len_on_ref,
+                lock_cout, thread_num, pcoverage_count, index );
+        }
+    }
+
+    template <class TLock> void find_alignments_in_single_run ( char const* acc,
+        char const* path, char const* pileup_path, char const* ref_name,
+        std::vector <KSearch::CVRefVariation> const* pvec_obj,
+        TLock* lock_cout, size_t thread_num )
+    {
+        char const pileup_suffix[] = ".pileup";
+        char acc_pileup [ 128 ];
+
+        if ( pileup_path == NULL || pileup_path [0] == '\0' )
+        {
+            size_t acc_len = strlen(acc);
+            assert ( countof(acc_pileup) >= acc_len + countof(pileup_suffix) );
+            strncpy ( acc_pileup, acc, countof(acc_pileup) );
+            strncpy ( acc_pileup + acc_len, pileup_suffix, countof(acc_pileup) - acc_len );
+            pileup_path = acc_pileup;
+        }
+
+        std::vector <KSearch::CVRefVariation> const& vec_obj = *pvec_obj;
+
+        coverage_info coverage_counts = {};
+        coverage_counts.count_total.count = (size_t)-1;
+        coverage_counts.count_total.count_posititve = (size_t)-1;
+        coverage_counts.counts_matched.resize( vec_obj.size() );
+
+        std::vector <KSearch::CVRefVariation>::const_iterator cit = vec_obj.begin();
+        std::vector <KSearch::CVRefVariation>::const_iterator cend = vec_obj.end();
+        for ( size_t i = 0; cit != cend; ++cit, ++i )
+        {
+            KSearch::CVRefVariation const& obj = *cit;
+            find_alignments_in_single_run ( acc, path, pileup_path,
+                ref_name, & obj, i, lock_cout, thread_num, & coverage_counts );
+        }
+
+        report_run_coverage ( acc, & coverage_counts, lock_cout );
+    }
+
+    template <class TLock> void find_alignments ( char const* ref_name,
+        std::vector <KSearch::CVRefVariation> const* pvec_obj,
+        TLock* lock_cout, size_t thread_num, CInputRuns const* p_input_runs,
+        KApp::CProgressBar* progress_bar )
+    {
+        try
+        {
+            for ( ; ; )
+            {
+                size_t index = p_input_runs -> GetNextIndex();
+                CInputRun const& input_run = p_input_runs -> Get(index);
+
+                if ( ! input_run.IsValid() )
+                    break;
+
+                char const* acc = input_run.GetRunName().c_str();
+                char const* path = input_run.GetRunPath().c_str();
+                char const* pileup_path = input_run.GetPileupStatsPath().c_str();
+
+                if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_MORE_DETAILS )
+                {
+                    LOCK_GUARD l(*lock_cout);
+                    PLOGMSG ( klogInfo,
+                        ( klogInfo,
+                        "[$(THREAD_NUM)] Processing parameter # $(INDEX): $(ACC), path=[$(PATH)], pileup path=[$(PILEUPPATH)]",
+                        "THREAD_NUM=%zu,INDEX=%zu,ACC=%s,PATH=%s,PILEUPPATH=%s",
+                        thread_num, index,
+                        acc, path, pileup_path
+                        ));
+                }
+
+                try
+                {
+                    find_alignments_in_single_run ( acc, path, pileup_path,
+                        ref_name, pvec_obj, lock_cout, thread_num );
+                }
+                catch ( ngs::ErrorMsg const& e )
+                {
+                    if ( strstr (e.what(), "Cannot open accession") == e.what() )
+                    {
+                        if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_MORE_DETAILS )
+                        {
+                            LOCK_GUARD l(*lock_cout);
+                            PLOGMSG ( klogWarn,
+                                ( klogWarn,
+                                "[$(THREAD_NUM)] $(WHAT), skipping",
+                                "THREAD_NUM=%zu,WHAT=%s", thread_num, e.what()
+                                ));
+                        }
+                    }
+                    else
+                        throw;
+                }
+
+                {
+                    LOCK_GUARD l(*lock_cout);
+                    progress_bar -> Process( 1, false );
+                }
+
+                if ( ::Quitting() )
+                {
+                    LOCK_GUARD l(*lock_cout);
+                    PLOGMSG ( klogWarn,
+                        ( klogWarn,
+                        "[$(THREAD_NUM)] Interrupted",
+                        "THREAD_NUM=%zu", thread_num
+                        ));
+                    break;
+                }
+            }
+        }
+        catch ( ngs::ErrorMsg const& e )
+        {
+            LOCK_GUARD l(*lock_cout); // reuse cout mutex
+            PLOGMSG ( klogErr,
+                ( klogErr,
+                "[$(THREAD_NUM)] ngs::ErrorMsg: $(WHAT)",
+                "THREAD_NUM=%zu,WHAT=%s", thread_num, e.what()
+                ));
+        }
+        catch (...)
+        {
+            LOCK_GUARD l(*lock_cout); // reuse cout mutex
+            Utils::HandleException ();
+        }
+    }
+
+#if CPP_THREADS == 0
+    struct AdapterFindAlignment
+    {
+        KProc::CKThread thread;
+
+        size_t param_start, param_count;
+        char const* ref_name;
+        std::vector <KSearch::CVRefVariation> const* pvec_obj;
+        LOCK* lock_cout;
+        size_t thread_num;
+        CInputRuns const* p_input_runs;
+        KApp::CProgressBar* progress_bar;
+    };
+
+    void AdapterFindAlignment_Init (AdapterFindAlignment & params,
+            size_t param_start, size_t param_count,
+            char const* ref_name,
+            std::vector <KSearch::CVRefVariation> const* pvec_obj,
+            LOCK* lock_cout,
+            size_t thread_num,
+            CInputRuns const* p_input_runs,
+            KApp::CProgressBar* progress_bar
+        )
+    {
+        params.param_start = param_start;
+        params.param_count = param_count;
+        params.ref_name = ref_name;
+        params.pvec_obj = pvec_obj;
+        params.lock_cout = lock_cout;
+        params.thread_num = thread_num;
+        params.p_input_runs = p_input_runs;
+        params.progress_bar = progress_bar;
+    }
+
+    rc_t AdapterFindAlignmentFunc ( void* data )
+    {
+        AdapterFindAlignment& p = * (static_cast<AdapterFindAlignment*>(data));
+        find_alignments ( p.ref_name, p.pvec_obj, p.lock_cout, p.thread_num,
+            p.p_input_runs, p.progress_bar );
+        return 0;
+    }
+#endif
+
+    void finish_find_variation_region ( KApp::CArgs const & args,
+        std::vector <KSearch::CVRefVariation> const& vec_obj,
+        KApp::CProgressBar& progress_bar )
+    {
+        // Split further processing into multiple threads if there too many params
+        CInputRuns input_runs ( args );
+
+        size_t param_count = input_runs.GetCount();
+        progress_bar.Append ( param_count );
+
+        if ( param_count == 0 )
+            return;
+
+        if ( param_count >= 1 && param_count < g_Params.thread_count )
+            g_Params.thread_count = param_count;
+
+        size_t thread_count = g_Params.thread_count;
+
+        if ( thread_count == 1 )
+        {
+            CNoMutex mtx;
+            find_alignments (g_Params.ref_acc, & vec_obj, & mtx,
+                0, & input_runs, & progress_bar);
+        }
+        else
+        {
+            // split
+            if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_SOME_DETAILS )
+            {
+                PLOGMSG ( klogInfo,
+                    ( klogInfo,
+                    "Splitting $(PARAMCOUNT) jobs into $(THREADCOUNT) threads...",
+                    "PARAMCOUNT=%zu,THREADCOUNT=%zu", param_count, thread_count
+                    ));
+            }
+
+            LOCK mutex_cout;
+
+#if CPP_THREADS != 0
+            std::vector<std::thread> vec_threads;
+#else
+            std::vector<AdapterFindAlignment> vec_threads ( thread_count );
+#endif
+
+            size_t param_chunk_size = param_count / thread_count;
+            for (size_t i = 0; i < thread_count; ++i)
+            {
+                size_t current_chunk_size = i == thread_count - 1 ?
+                    param_chunk_size + param_count % thread_count : param_chunk_size;
+#if CPP_THREADS != 0
+                vec_threads.push_back(
+                    std::thread( find_alignments <LOCK>,
+                                    i * param_chunk_size,
+                                    current_chunk_size, g_Params.ref_acc, & vec_obj,
+                                    & mutex_cout, i + 1, & input_runs, & progress_bar
+                               ));
+#else
+                AdapterFindAlignment & params = vec_threads [ i ];
+
+                AdapterFindAlignment_Init ( params, i * param_chunk_size,
+                    current_chunk_size, g_Params.ref_acc, & vec_obj,
+                    & mutex_cout, i + 1, & input_runs, & progress_bar );
+
+                params.thread.Make ( AdapterFindAlignmentFunc, & params );
+#endif
+            }
+#if CPP_THREADS != 0
+            for (std::thread& th : vec_threads)
+                th.join();
+#else
+            for (std::vector<AdapterFindAlignment>::iterator it = vec_threads.begin(); it != vec_threads.end(); ++it)
+            {
+                AdapterFindAlignment & params = *it;
+                params.thread.Wait();
+            }
+#endif
+
+        }
+    }
+
+    bool check_ref_slice ( char const* ref, size_t ref_size )
+    {
+        bool ret = ref_size == 0;
+        for ( size_t i = 0; i < ref_size; ++i )
+        {
+            if ( !(ref [i] == 'N' || ref [i] == 'n' || ref [i] == '.') )
+            {
+                ret = true; // at least one non-N base is OK
+                break;
+            }
+        }
+        return ret;
+    }
+
+    char const* get_query (char const* pattern, uint32_t repetitions, std::string& generated_query)
+    {
+        if ( repetitions == 0 )
+            return pattern;
+        else
+        {
+            size_t pattern_len = strlen (pattern);
+            generated_query.reserve ( pattern_len * repetitions );
+            generated_query.clear();
+
+            while ( repetitions-- > 0 )
+                generated_query.append ( pattern );
+
+            return generated_query.c_str();
+        }
+    }
+
+    void print_variation_specs ( char const* ref_slice, size_t ref_slice_size,
+        KSearch::CVRefVariation const& obj, const char* query, size_t query_len )
+    {
+        if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_SOME_DETAILS )
+        {
+            size_t ref_start = obj.GetAlleleStartAbsolute();
+            size_t ref_len = obj.GetAlleleLenOnRef();
+            PLOGMSG ( klogInfo,
+                ( klogInfo,
+                "Found indel box at pos=$(REFSTART), length=$(REFLEN)",
+                "REFSTART=%zu,REFLEN=%zu", ref_start, ref_len
+                ));
+            print_indel ( "reference", ref_slice, ref_slice_size, obj.GetAlleleStartRelative(), ref_len );
+
+            PLOGMSG ( klogInfo,
+                ( klogInfo,
+                "var_query=$(VARIATION)", "VARIATION=%s", obj.GetSearchQuery()
+                ));
+        }
+
+        if ( g_Params.verbosity >= NSRefVariation::VERBOSITY_PRINT_VAR_SPEC )
+        {
+            PLOGMSG ( klogWarn,
+                ( klogWarn,
+                "Input variation spec   : $(REFACC):$(REFPOSVAR):$(VARLENONREF):$(QUERY)",
+                "REFACC=%s,REFPOSVAR=%ld,VARLENONREF=%lu,QUERY=%.*s",
+                g_Params.ref_acc, g_Params.ref_pos_var,
+                g_Params.var_len_on_ref, query_len, query
+                ));
+
+            size_t allele_size = obj.GetAlleleSize();
+            char const* allele = obj.GetAllele();
+            PLOGMSG ( klogWarn,
+                ( klogWarn,
+                "Adjusted variation spec: $(REFACC):$(REFPOSVAR):$(VARLENONREF):$(ALLELE)",
+                "REFACC=%s,REFPOSVAR=%ld,VARLENONREF=%lu,ALLELE=%.*s",
+                g_Params.ref_acc, obj.GetAlleleStartAbsolute(),
+                obj.GetAlleleLenOnRef(), (int)allele_size, allele
+                ));
+        }
+    }
+
+    void get_ref_var_object (KSearch::CVRefVariation& obj,
+        char const* query, size_t query_len, ngs::ReferenceSequence const& ref_seq)
+    {
+        size_t var_len = query_len;
+
+        size_t chunk_size = 5000; // TODO: add the method Reference[Sequence].getChunkSize() to the API
+        size_t chunk_no = g_Params.ref_pos_var / chunk_size;
+        size_t ref_pos_in_slice = g_Params.ref_pos_var % chunk_size;
+        size_t bases_start = chunk_no * chunk_size;
+        size_t chunk_no_last = ref_seq.getLength() / chunk_size;
+
+        bool cont = false;
+        size_t chunk_no_start = chunk_no, chunk_no_end = chunk_no;
+
+        // optimization: first look into the current chunk only (using ngs::StringRef)
+        {
+            ngs::StringRef ref_chunk = ref_seq.getReferenceChunk ( bases_start );
+
+            if ( ! check_ref_slice (ref_chunk.data() + ref_pos_in_slice, g_Params.var_len_on_ref) )
+            {
+                throw Utils::CErrorMsg (
+                    "The selected reference region [%.*s] does not contain valid bases, "
+                    "exiting...",
+                    (int)g_Params.var_len_on_ref, ref_chunk.data() + ref_pos_in_slice );
+            }
+            
+            cont = Common::find_variation_core_step ( obj, g_Params.alg,
+                ref_chunk.data(), ref_chunk.size(), ref_pos_in_slice,
+                query, var_len, g_Params.var_len_on_ref,
+                chunk_size, chunk_no_last, bases_start, chunk_no_start, chunk_no_end );
+
+            if ( !cont )
+            {
+                print_variation_specs ( ref_chunk.data(), ref_chunk.size(), obj, query, query_len );
+            }
+        }
+
+        // general case - expanding ref_slice to multiple chunks
+        if ( cont )
+        {
+            ngs::String ref_slice;
+            while ( cont )
+            {
+                ref_slice = ref_seq.getReferenceBases (
+                    bases_start, (chunk_no_end - chunk_no_start + 1)*chunk_size );
+
+                cont = Common::find_variation_core_step ( obj, g_Params.alg,
+                    ref_slice.c_str(), ref_slice.size(), ref_pos_in_slice,
+                    query, var_len, g_Params.var_len_on_ref,
+                    chunk_size, chunk_no_last, bases_start, chunk_no_start, chunk_no_end );
+            }
+            print_variation_specs ( ref_slice.c_str(), ref_slice.size(), obj, query, query_len );
+        }
+    }
+
+    void check_var_objects (std::vector <KSearch::CVRefVariation> const& vec_obj)
+    {
+        assert (vec_obj.size() > 0);
+
+        // checking for invariants
+        size_t count = vec_obj.size();
+
+        if (count > 1)
+        {
+            size_t i_first_var = 0;
+            for (; i_first_var < count; ++i_first_var)
+            {
+                KSearch::CVRefVariation const& cur = vec_obj [i_first_var];
+                if ( cur.GetAlleleLenOnRef() != cur.GetAlleleSize() )
+                    break;
+            }
+
+            KSearch::CVRefVariation const& first = vec_obj [i_first_var];
+
+            for (size_t i = i_first_var + 1; i < count; ++i)
+            {
+                KSearch::CVRefVariation const& cur = vec_obj[i];
+
+                // exception: if var_len_on_ref == var_size - skip
+                // this is probably the exact reference
+                if ( cur.GetAlleleLenOnRef() != cur.GetAlleleSize() )
+                {
+                    if ( first.GetAlleleStartAbsolute() != cur.GetAlleleStartAbsolute()
+                        || first.GetAlleleLenOnRef() != cur.GetAlleleLenOnRef() )
+                    {
+                        size_t allele_size_first = first.GetAlleleSize();
+                        char const* allele_first = first.GetAllele();
+
+                        size_t allele_size_cur = cur.GetAlleleSize();
+                        char const* allele_cur = cur.GetAllele();
+
+                        PLOGMSG( klogWarn, (klogWarn,
+                            "Inconsistent variations found: (start=$(STARTFIRST), len=$(LENFIRST), allele=$(ALLELEFIRST)) vs (start=$(STARTCUR), len=$(LENCUR), allele=$(ALLELECUR))",
+                            "STARTFIRST=%zu,LENFIRST=%zu,ALLELEFIRST=%.*s,STARTCUR=%zu,LENCUR=%zu,ALLELECUR=%.*s",
+                            first.GetAlleleStartAbsolute(), first.GetAlleleLenOnRef(), (int)allele_size_first, allele_first,
+                            cur.GetAlleleStartAbsolute(), cur.GetAlleleLenOnRef(), (int)allele_size_cur, allele_cur
+                            ));
+                        //throw Utils::CErrorMsg (
+                        //    "Inconsistent variations found: (start=%zu, len=%zu, variation=%s) vs (start=%zu, len=%zu, variation=%s)",
+                        //    first.GetVarStartAbsolute(), first.GetVarLenOnRef(), first.GetVariation(),
+                        //    cur.GetVarStartAbsolute(), cur.GetVarLenOnRef(), cur.GetVariation());
+                    }
+                }
+            }
+        }
+    }
+
+    void find_reference_variation ( ngs::ReferenceSequence const& ref_seq )
+    {
+        uint64_t start = g_Params.ref_pos_var;
+        uint64_t len = g_Params.var_len_on_ref;
+
+        KSearch::CVRefVariation obj;
+
+        // this doesn't work for len = 0
+        ngs::StringRef query = ref_seq.getReferenceChunk ( start, len );
+        if ( query.size() == len )
+        {
+            get_ref_var_object ( obj, query.data(), query.size(), ref_seq );
+        }
+        else
+        {
+            ngs::String query_copy = ref_seq.getReferenceBases ( start, len );
+            get_ref_var_object ( obj, query_copy.c_str(), query_copy.size(), ref_seq );
+        }
+    }
+
+    int find_variation_region_impl (KApp::CArgs const& args)
+    {
+        // Adding 0% mark at the very beginning of the program
+        KApp::CProgressBar progress_bar(1);
+        progress_bar.Process ( 0, true );
+
+        ngs::ReferenceSequence ref_seq = ncbi::NGS::openReferenceSequence ( g_Params.ref_acc );
+
+        size_t variation_count = g_Params.query_min_rep == 0 ?
+            1 : g_Params.query_max_rep - g_Params.query_min_rep + 1;
+
+        std::string generated_query;
+        if (g_Params.query_min_rep > 0)
+            generated_query.reserve ( strlen(g_Params.query) * g_Params.query_max_rep );
+
+        std::vector <KSearch::CVRefVariation> vec_obj ( variation_count );
+
+        // first, try to search against reference itself
+        // find_reference_variation ( ref_seq );
+
+        for (uint32_t i = 0; i < variation_count; ++i)
+        {
+            char const* query = get_query ( g_Params.query,
+                g_Params.query_min_rep + i, generated_query );
+            get_ref_var_object ( vec_obj [i], query, strlen(query), ref_seq );
+        }
+
+        check_var_objects (vec_obj);
+        finish_find_variation_region ( args, vec_obj, progress_bar );
+
+        return 0;
+    }
+
+#if SECRET_OPTION != 0
+    void get_ref_bases ( int64_t offset, uint64_t len, std::string & ret,
+        VDBObjects::CVCursor const& cursor,
+        int64_t id_first, uint64_t row_count,
+        uint32_t max_seq_len, uint64_t total_seq_len
+        )
+    {
+        if ( offset + len > total_seq_len )
+            len = total_seq_len - offset;
+
+        ret.clear();
+        if ( ret.capacity() < len )
+            ret.reserve ( ret.capacity() * 2 );
+
+        int64_t id_start = offset / max_seq_len + id_first;
+        int64_t id_end = (offset + len - 1) / max_seq_len + id_first;
+        if ( id_start == id_end ) // optimizing: have a separate branch for single-row slice
+        {
+            char const* pREAD;
+            cursor.CellDataDirect ( id_start, g_ColumnIndex[idx_READ], & pREAD );
+            int64_t offset_adj = offset % max_seq_len;
+            ret.assign( pREAD + offset_adj, len );
+        }
+        else // multi-row reference slice
+        {
+            // first id
+            char const* pREAD;
+            uint32_t count_read =  cursor.CellDataDirect ( id_start, g_ColumnIndex[idx_READ], & pREAD );
+            int64_t offset_adj = offset % max_seq_len;
+            ret.assign( pREAD + offset_adj, count_read - offset_adj );
+
+            // intermediate id (full max_seq_len chunks)
+            for (int64_t id = id_start + 1; id < id_end; ++id )
+            {
+                count_read = cursor.CellDataDirect ( id, g_ColumnIndex[idx_READ], & pREAD );
+                ret.append ( pREAD, count_read );
+            }
+
+            // last id
+            count_read =  cursor.CellDataDirect ( id_end, g_ColumnIndex[idx_READ], & pREAD );
+            ret.append( pREAD, len - ret.length() );
+        }
+    }
+
+    void test_ngs ()
+    {
+        std::cout << "Starting NGS test..." << std::endl;
+        ngs::ReferenceSequence ref = ncbi::NGS::openReferenceSequence ( g_Params.ref_acc );
+
+        uint64_t len = 1;
+        int64_t offset = ref.getLength()/2 - len;
+        std::string slice;
+        for ( ; offset >= 0; --offset, len += 2 )
+        {
+            slice = ref.getReferenceBases( offset, len );
+            // making something that prevents the optimizer from eliminating the code
+            if ( slice.length() != len )
+                std::cout << "slice.length() != len" << std::endl;
+        }
+        std::cout << "NGS test has SUCCEEDED" << std::endl;
+    }
+
+    void test_vdb ()
+    {
+        std::cout << "Starting VDB test..." << std::endl;
+
+        VDBObjects::CVDBManager mgr;
+        mgr.Make();
+
+        VDBObjects::CVTable table = mgr.OpenTable ( g_Params.ref_acc );
+        VDBObjects::CVCursor cursor = table.CreateCursorRead ();
+
+        cursor.InitColumnIndex (g_ColumnNames, g_ColumnIndex, countof(g_ColumnNames));
+        cursor.Open();
+
+        int64_t id_first = 0;
+        uint64_t row_count = 0;
+
+        cursor.GetIdRange (id_first, row_count);
+
+        uint32_t max_seq_len;
+        uint64_t total_seq_len;
+        cursor.ReadItems ( id_first, g_ColumnIndex[idx_MAX_SEQ_LEN], & max_seq_len, 1 );
+        cursor.ReadItems ( id_first, g_ColumnIndex[idx_TOTAL_SEQ_LEN], & total_seq_len, 1 );
+
+        uint64_t len = 1;
+        int64_t offset = total_seq_len/2 - len;
+        std::string slice;
+        int64_t offset_increment = 1;
+        for ( ; offset >= 0; offset -= offset_increment, len += 2 * offset_increment )
+        {
+            get_ref_bases ( offset, len, slice, cursor, id_first, row_count, max_seq_len, total_seq_len );
+            // making something that prevents the optimizer from eliminating the code
+            if ( slice.length() != len )
+                std::cout << "slice.length() != len" << std::endl;
+        }
+        std::cout << "VDB test has SUCCEEDED" << std::endl;
+
+    }
+
+    void test_correctness ()
+    {
+        std::cout << "Running correctness test..." << std::endl;
+        ngs::ReferenceSequence ref_ngs = ncbi::NGS::openReferenceSequence ( g_Params.ref_acc );
+
+        VDBObjects::CVDBManager mgr;
+        mgr.Make();
+
+        VDBObjects::CVTable table = mgr.OpenTable ( g_Params.ref_acc );
+        VDBObjects::CVCursor cursor = table.CreateCursorRead ();
+
+        cursor.InitColumnIndex (g_ColumnNames, g_ColumnIndex, countof(g_ColumnNames));
+        cursor.Open();
+
+        int64_t id_first = 0;
+        uint64_t row_count = 0;
+
+        cursor.GetIdRange (id_first, row_count);
+
+        uint32_t max_seq_len;
+        uint64_t total_seq_len;
+        cursor.ReadItems ( id_first, g_ColumnIndex[idx_MAX_SEQ_LEN], & max_seq_len, 1 );
+        cursor.ReadItems ( id_first, g_ColumnIndex[idx_TOTAL_SEQ_LEN], & total_seq_len, 1 );
+
+        if ( ref_ngs.getLength() != total_seq_len )
+        {
+            std::cout
+                << "Correctness test FAILED: length discrepancy: ngs="
+                << ref_ngs.getLength() << ", vdb=" << total_seq_len << std::endl;
+            return;
+        }
+
+        uint64_t len = 1;
+        int64_t offset = total_seq_len/2 - len;
+        std::string slice_vdb;
+        for ( ; offset >= 0; --offset, len += 2 )
+        {
+            ngs::String slice_ngs = ref_ngs.getReferenceBases( offset, len );
+            get_ref_bases ( offset, len, slice_vdb, cursor, id_first, row_count, max_seq_len, total_seq_len );
+
+            if (slice_ngs != slice_vdb)
+            {
+                std::cout
+                    << "Correctness test FAILED: slice discrepancy at "
+                    "offset=" << offset << ", length=" << len << std::endl
+                    << "ngs=" << slice_ngs << std::endl
+                    << "vdb=" << slice_vdb << std::endl;
+                return;
+            }
+        }
+        std::cout << "Correctness test has SUCCEEDED" << std::endl;
+    }
+
+    void test_getReferenceProjectionRange()
+    {
+        std::cout << "Starting getReferenceProjectionRange test..." << std::endl;
+        ngs::ReadCollection read_coll = ncbi::NGS::openReadCollection( "SRR1597772" );
+        int64_t ref_pos = 11601;
+        uint64_t stop = ref_pos + 92;
+
+        ngs::Reference ref = read_coll.getReference( "CM000663.1" );
+        ngs::Alignment align = read_coll.getAlignment("SRR1597772.PA.6");
+
+        ngs::String ref_str = ref.getReferenceBases( ref_pos, stop - ref_pos );
+        ngs::StringRef align_str = align.getAlignedFragmentBases();
+
+        std::cout
+            << "ref: " << ref_str << std::endl
+            << "seq: " << align_str << std::endl;
+
+        for ( ; ref_pos < (int64_t)stop; ++ ref_pos )
+        {
+            ngs::String ref_base = ref.getReferenceBases( ref_pos, 1 );
+            uint64_t range = align.getReferencePositionProjectionRange ( ref_pos );
+            uint32_t align_pos = range >> 32;
+            uint32_t range_len = range & 0xFFFFFFFF;
+
+            ngs::StringRef bases = align.getAlignedFragmentBases ( );
+
+            std::cout
+                << ref_pos << " "
+                << ref_base
+                << " (" << (int32_t)align_pos << ", " << range_len << ") "
+                << bases.toString( align_pos, range_len == 0 ? 1 : range_len )
+                << std::endl;
+        }
+
+        std::cout << "getReferenceProjectionRange test has SUCCEEDED" << std::endl;
+    }
+
+    void test_deletion_ambiguity ()
+    {
+        char const ref[] = "xABCABCy";
+        char const var[] = "";
+        size_t var_len_on_ref = g_Params.var_len_on_ref;
+        size_t pos = g_Params.ref_pos_var;
+
+        KSearch::CVRefVariation obj = KSearch::VRefVariationIUPACMake (
+            ref, countof(ref) - 1, pos, var, countof(var) - 1, var_len_on_ref, 0 );
+
+        std::cout
+            << "Found indel box at pos=" << obj.GetVarStartRelative()
+            << ", length=" << obj.GetVarLenOnRef()
+            << std::endl;
+        print_indel ( "reference", ref, countof(ref) - 1, obj.GetVarStartRelative(), obj.GetVarLenOnRef() );
+    }
+
+    void test_temp ()
+    {
+        char const ref[] = "ACACACTA";
+        char const var[] = "AGCACACA";
+        size_t var_len_on_ref = countof(ref) - 1;
+        size_t pos = 0;
+
+        KSearch::CVRefVariation obj = KSearch::VRefVariationIUPACMake (
+            ref, countof(ref) - 1, pos, var, countof(var) - 1, var_len_on_ref, 0 );
+
+        std::cout
+            << "Found indel box at pos=" << obj.GetVarStartRelative()
+            << ", length=" << obj.GetVarLenOnRef()
+            << std::endl;
+        print_indel ( "reference", ref, countof(ref) - 1, obj.GetVarStartRelative(), obj.GetVarLenOnRef() );
+        print_variation_specs ( ref, countof(ref), obj, var );
+    }
+#endif
+
+    // returns pointer to the character that cannot be parsed
+    char const* parse_query ( char const* str )
+    {
+        char const allowed[] = "ACGTNacgtn.-";
+        size_t i;
+        for ( i = 0; str [i] != '\0'; ++i )
+        {
+            if ( strchr ( allowed, str[i] ) == NULL )
+                break;
+        }
+
+        if ( i >= countof (g_Params.query) )
+        {
+            LOGMSG( klogErr, "The query is too long" );
+            return str + i;
+        }
+
+        strncpy ( g_Params.query, str, i );
+
+        // TODO: maybe CArgs should allow for empty option value
+        if (g_Params.query [0] == '-' && g_Params.query [1] == '\0' )
+            g_Params.query[0] = '\0';
+
+        if ( str [i] == '[' )
+        {
+            // the next substring must contain: "\[[0-9]+\-[0-9]+\]$"
+            ++i;
+            uint32_t num = 0;
+            size_t i_num_start = i;
+            for ( ; str[i] >= '0' && str[i] <= '9'; ++i )
+            {
+                num *= 10;
+                num += str[i] - '0';
+            }
+
+            if ( num == 0 )
+                return str + i_num_start;
+
+            g_Params.query_min_rep = num;
+
+            if ( str[i] != '-' )
+                return str + i;
+
+            ++i;
+            i_num_start = i;
+            for ( num = 0; str[i] >= '0' && str[i] <= '9'; ++i )
+            {
+                num *= 10;
+                num += str[i] - '0';
+            }
+
+            if ( num == 0 )
+                return str + i_num_start;
+
+            g_Params.query_max_rep = num;
+
+            if ( str[i] != ']' )
+                return str + i;
+
+            ++i;
+            if ( str[i] != '\0' )
+                return str + i;
+
+            return NULL;
+        }
+        else if ( str [i] != '\0' )
+            return str + i;
+        else
+            return NULL;
+    }
+
+    int find_variation_region_impl_safe ( KApp::CArgs const& args)
+    {
+        int ret = 0;
+        try
+        {
+            ret = find_variation_region_impl ( args );
+        }
+        catch ( ngs::ErrorMsg const& e )
+        {
+            PLOGMSG ( klogErr,
+                ( klogErr, "ngs::ErrorMsg: $(WHAT)", "WHAT=%s", e.what()
+                ));
+            ret = 3;
+        }
+        catch (...)
+        {
+            Utils::HandleException ();
+            ret = 3;
+        }
+
+        return ret;
+    }
+
+    int find_variation_region (int argc, char** argv)
+    {
+        int ret = 0;
+        try
+        {
+            KApp::CArgs args;
+            args.MakeAndHandle (argc, argv, Options, countof (Options), ::XMLLogger_Args, ::XMLLogger_ArgsQty);
+            KApp::CXMLLogger xml_logger ( args );
+
+            // Actually GetOptionCount check is not needed here since
+            // CArgs checks that exactly 1 option is required
+
+            if (args.GetOptionCount (OPTION_REFERENCE_ACC) == 1)
+                g_Params.ref_acc = args.GetOptionValue ( OPTION_REFERENCE_ACC, 0 );
+
+            if (args.GetOptionCount (OPTION_REF_POS) == 1)
+                g_Params.ref_pos_var = args.GetOptionValueInt<int64_t> ( OPTION_REF_POS, 0 );
+
+            if (args.GetOptionCount (OPTION_QUERY) == 1)
+            {
+                char const* query = args.GetOptionValue ( OPTION_QUERY, 0 );
+                char const* pInvalid = parse_query ( query );
+                if ( pInvalid != NULL )
+                {
+                    PLOGMSG ( klogErr,
+                        ( klogErr,
+                        "Error: the given query ($(QUERY)) contains an invalid character ($(CHAR))",
+                        "QUERY=%s,CHAR=%c", g_Params.query, *pInvalid
+                        ));
+                    return 3;
+                }
+                else if ( g_Params.query_min_rep != 0
+                    && g_Params.query_min_rep >= g_Params.query_max_rep )
+                {
+                    PLOGMSG ( klogErr,
+                        ( klogErr,
+                        "Error: the given query ($(QUERY)) contains an invalid repetition range [$(MIN)-$(MAX)] (min must be less than max and more than zero)",
+                        "QUERY=%s,MIN=%u,MAX=%u",
+                        g_Params.query, g_Params.query_min_rep, g_Params.query_max_rep
+                        ));
+                    return 3;
+                }
+            }
+
+            if (args.GetOptionCount (OPTION_VAR_LEN_ON_REF) == 1)
+                g_Params.var_len_on_ref = args.GetOptionValueUInt<size_t>( OPTION_VAR_LEN_ON_REF, 0 );
+
+            if (args.GetOptionCount (OPTION_THREADS) == 1)
+                g_Params.thread_count = args.GetOptionValueUInt<size_t>( OPTION_THREADS, 0 );
+
+            g_Params.calc_coverage = args.GetOptionCount (OPTION_COVERAGE) != 0;
+
+            g_Params.verbosity = (int)args.GetOptionCount (OPTION_VERBOSITY);
+
+            if (args.GetOptionCount (OPTION_INPUT_FILE) == 1)
+            {
+                g_Params.input_file = args.GetOptionValue ( OPTION_INPUT_FILE, 0 );
+                if (args.GetParamCount() > 0)
+                {
+                    PLOGMSG ( klogErr,
+                        ( klogErr,
+                        "$(PROGNAME) $(OPTIONNAME) option must not be provided along with parameters,"
+                        " use either command line parameters or input file but not both",
+                        "PROGNAME=%s,OPTIONNAME=%s", argv [0], OPTION_INPUT_FILE
+                        ));
+                    return 3;
+                }
+            }
+
+            if (args.GetOptionCount (OPTION_COUNT_STRAND) == 1)
+            {
+                char const* val = args.GetOptionValue ( OPTION_COUNT_STRAND, 0 );
+                if ( strcmp (val, COUNT_STRAND_NONE_STR) == 0 )
+                    g_Params.count_strand = COUNT_STRAND_NONE;
+                else if ( strcmp (val, COUNT_STRAND_COUNTERALIGNED_STR) == 0 )
+                    g_Params.count_strand = COUNT_STRAND_COUNTERALIGNED;
+                else if ( strcmp (val, COUNT_STRAND_COALIGNED_STR) == 0 )
+                    g_Params.count_strand = COUNT_STRAND_COALIGNED;
+                else
+                {
+                    PLOGMSG ( klogErr,
+                        ( klogErr,
+                        "Error: unrecognized $(OPTIONNAME) option value: \"$(VALUE)\"",
+                        "OPTIONNAME=%s,VALUE=%s", OPTION_COUNT_STRAND, val
+                        ));
+                    return 3;
+                }
+
+                if ( args.GetOptionCount (OPTION_COVERAGE) == 0 )
+                {
+                    PLOGMSG ( klogWarn,
+                        ( klogWarn,
+                        "Warning: $(COUNTSTRAND) option has no effect if $(COVERAGE) is not specified",
+                        "COUNTSTRAND=%s,COVERAGE=%s", OPTION_COUNT_STRAND, OPTION_COVERAGE
+                        ));
+                    g_Params.count_strand = COUNT_STRAND_NONE;
+                }
+            }
+
+            if (args.GetOptionCount (OPTION_ALG) == 1)
+            {
+                char const* alg = args.GetOptionValue ( OPTION_ALG, 0 );
+                if (!strcmp(alg, PARAM_ALG_SW))
+                    g_Params.alg = ::refvarAlgSW;
+                else if (!strcmp(alg, PARAM_ALG_RA))
+                    g_Params.alg = ::refvarAlgRA;
+                else
+                {
+                    PLOGMSG ( klogErr, ( klogErr,
+                        "Error: Unknown algorithm specified: \"$(ALG)\"", "ALG=%s", alg ));
+                    return 3;
+                }
+            }
+
+#if SECRET_OPTION != 0
+            if ( args.GetOptionCount (OPTION_SECRET) > 0 )
+            {
+                std::cout << "Running ref-variation in secret mode" << std::endl;
+
+                switch ( args.GetOptionValueInt<int> (OPTION_SECRET, 0) )
+                {
+                case 1:
+                    test_correctness ();
+                    break;
+                case 2:
+                    test_ngs ();
+                    break;
+                case 3:
+                    test_vdb ();
+                    break;
+                case 4:
+                    test_getReferenceProjectionRange ();
+                    break;
+                case 5:
+                    test_deletion_ambiguity ();
+                    break;
+                case 6:
+                    test_temp ();
+                    break;
+                default:
+                    std::cout
+                        << "specify value for this option:" << std::endl
+                        << "1 - run correctness test" << std::endl
+                        << "2 - run ngs performance test" << std::endl
+                        << "3 - run vdb performance test" << std::endl
+                        << "4 - run getReferencePositionProjectionRange test" << std::endl
+                        << "5 - run deletion ambiguity test" << std::endl
+                        << "6 - run temporary test" << std::endl;
+                }
+            }
+            else
+#endif
+            {
+                ret = find_variation_region_impl_safe (args);
+            }
+
+        }
+        catch (...) // here we handle only exceptions in CArgs or CXMLLogger
+        {
+            ret = 3;
+        }
+        
+        return ret;
+    }
+
+/////////////////////////////
+    // class CInputRuns
+
+    CInputRuns::CInputRuns (KApp::CArgs const& args)
+    {
+        m_param_index.counter = 0;
+
+        Init ( args );
+    }
+
+    CInputRuns::CInputRuns ()
+    {
+        m_param_index.counter = 0;
+    }
+    
+
+    bool is_eol (char ch)
+    {
+        return ch == '\0' || ch == '\r' || ch == '\n';
+    }
+
+    bool is_sep (char ch)
+    {
+        return ch == '\t';
+    }
+
+    enum {PARSE_OK, PARSE_EMPTY, PARSE_ERROR};
+
+    int parse_input_line ( char const* line,
+        char const** p_acc, size_t* p_size_acc,
+        char const** p_run_path, size_t* p_size_run_path,
+        char const** p_pileup_path, size_t* p_size_pileup_path)
+    {
+        *p_acc = *p_run_path = *p_pileup_path = "";
+        *p_size_acc = *p_size_run_path = *p_size_pileup_path = 0;
+
+        char const* p = line;
+
+        if ( is_eol (*p) )
+            return PARSE_EMPTY;
+
+        *p_acc = p;
+        for ( ; ! is_sep (*p) && ! is_eol (*p); ++ p, ++ (*p_size_acc) );
+
+        if ( *p_size_acc == 0 )
+            return PARSE_ERROR;
+
+        if ( is_eol ( *p ) )
+            return PARSE_OK;
+
+        ++ p;
+        *p_run_path = p;
+        for ( ; ! is_sep (*p) && ! is_eol (*p); ++p, ++ (*p_size_run_path) );
+
+        if ( is_eol ( *p ) )
+            return PARSE_OK;
+
+        ++ p;
+        *p_pileup_path = p;
+        for ( ; ! is_sep (*p) && ! is_eol (*p); ++p, ++ (*p_size_pileup_path) );
+
+        return PARSE_OK;
+    }
+
+    void CInputRuns::Init ( KApp::CArgs const& args ) // not thread-safe!
+    {
+        if ( g_Params.input_file != NULL && g_Params.input_file [0] != '\0' )
+        {
+            std::ifstream input_file( g_Params.input_file );
+            if ( !input_file.good() )
+                throw Utils::CErrorMsg( "Failed to open file %s", g_Params.input_file );
+
+            std::string line;
+            size_t count = 0;
+
+            while ( std::getline ( input_file, line) )
+            {
+                ++ count;
+                if ( m_input_runs.capacity() < count )
+                    m_input_runs.reserve ( m_input_runs.capacity() * 2 );
+
+                char const* p_acc, *p_path, *p_pileup_path;
+                size_t size_acc, size_path, size_pileup_path;
+
+                int res = parse_input_line ( line.c_str(),
+                    & p_acc, & size_acc,
+                    & p_path, & size_path,
+                    & p_pileup_path, & size_pileup_path );
+                if ( res == PARSE_ERROR )
+                {
+                    throw Utils::CErrorMsg(
+                        "Failed to parse line # %lu from file %s",
+                        count, g_Params.input_file );
+                }
+                else if ( res == PARSE_OK )
+                {
+                    m_input_runs.push_back(
+                        CInputRun(
+                            std::string(p_acc, size_acc),
+                            std::string(p_path, size_path),
+                            std::string(p_pileup_path, size_pileup_path)));
+                }
+                else // res == PARSE_EMPTY
+                    -- count;
+            }
+        }
+        else
+        {
+            m_input_runs.reserve (args.GetParamCount());
+
+            for ( uint32_t i = 0; i < args.GetParamCount(); ++i )
+                m_input_runs.push_back( CInputRun ( args.GetParamValue( i ) ) );
+        }
+    }
+
+    size_t CInputRuns::GetCount() const
+    {
+        return m_input_runs.size();
+    }
+
+    CInputRun CInputRuns::GetNext () const
+    {
+        size_t current_index = atomic_read_and_add( & m_param_index, 1 );
+        return current_index < m_input_runs.size() ? m_input_runs[current_index] : CInputRun("");
+    }
+    size_t CInputRuns::GetNextIndex () const
+    {
+        return atomic_read_and_add( & m_param_index, 1 );
+    }
+    CInputRun CInputRuns::Get(size_t index) const
+    {
+        return index < m_input_runs.size() ? m_input_runs[index] : CInputRun("");
+    }
+
+}
+
+extern "C"
+{
+    const char UsageDefaultName[] = "ref-variation";
+
+    rc_t CC UsageSummary (const char * progname)
+    {
+        OUTMSG ((
+        "Usage example:\n"
+        "  %s -r <reference accession> -p <position on reference> -q <query to look for> -l 0 [<parameters>]\n"
+        "\n"
+        "Summary:\n"
+        "  Find a possible indel window\n"
+        "\n", progname));
+        return 0;
+    }
+
+    rc_t CC Usage ( struct Args const * args )
+    {
+        rc_t rc = 0;
+        const char* progname = UsageDefaultName;
+        const char* fullpath = UsageDefaultName;
+
+        if (args == NULL)
+            rc = RC(rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
+        else
+            rc = ArgsProgram(args, &fullpath, &progname);
+
+        UsageSummary (progname);
+
+
+        OUTMSG (("\nParameters: optional space-separated list of run accessions in which the query will be looked for\n\n"));
+
+        OUTMSG (("\nOptions:\n"));
+
+        HelpOptionLine (NSRefVariation::ALIAS_REFERENCE_ACC, NSRefVariation::OPTION_REFERENCE_ACC, "acc", NSRefVariation::USAGE_REFERENCE_ACC);
+        HelpOptionLine (NSRefVariation::ALIAS_REF_POS, NSRefVariation::OPTION_REF_POS, "value", NSRefVariation::USAGE_REF_POS);
+        HelpOptionLine (NULL, NSRefVariation::OPTION_QUERY, "string", NSRefVariation::USAGE_QUERY);
+        HelpOptionLine (NSRefVariation::ALIAS_VAR_LEN_ON_REF, NSRefVariation::OPTION_VAR_LEN_ON_REF, "value", NSRefVariation::USAGE_VAR_LEN_ON_REF);
+        HelpOptionLine (NSRefVariation::ALIAS_THREADS, NSRefVariation::OPTION_THREADS, "value", NSRefVariation::USAGE_THREADS);
+        HelpOptionLine (NSRefVariation::ALIAS_COVERAGE, NSRefVariation::OPTION_COVERAGE, "", NSRefVariation::USAGE_COVERAGE);
+        HelpOptionLine (NSRefVariation::ALIAS_INPUT_FILE, NSRefVariation::OPTION_INPUT_FILE, "string", NSRefVariation::USAGE_INPUT_FILE);
+        HelpOptionLine (NULL, NSRefVariation::OPTION_COUNT_STRAND, "value", NSRefVariation::USAGE_COUNT_STRAND);
+        HelpOptionLine (NULL, NSRefVariation::OPTION_ALG, "value", NSRefVariation::USAGE_ALG);
+        //HelpOptionLine (NSRefVariation::ALIAS_VERBOSITY, NSRefVariation::OPTION_VERBOSITY, "", NSRefVariation::USAGE_VERBOSITY);
+#if SECRET_OPTION != 0
+        HelpOptionLine (NULL, NSRefVariation::OPTION_SECRET, NULL, NSRefVariation::USAGE_SECRET);
+#endif
+        XMLLogger_Usage();
+
+        HelpOptionsStandard ();
+
+        HelpVersion (fullpath, KAppVersion());
+
+        return rc;
+    }
+
+    rc_t CC KMain ( int argc, char *argv [] )
+    {
+        /* command line examples:
+          -r NC_011752.1 -p 2018 --query CA -l 0
+          -r NC_011752.1 -p 2020 --query CA -l 0
+          -r NC_011752.1 -p 5000 --query CA -l 0
+       
+       find insertion:
+          ref-variation -r NC_000013.10 -p 100635036 --query 'ACC' -l 0 /netmnt/traces04/sra33/SRZ/000793/SRR793062/SRR793062.pileup /netmnt/traces04/sra33/SRZ/000795/SRR795251/SRR795251.pileup
+          NEW: -r NC_000013.10 -p 100635036 --query ACC -l 0 SRR793062 SRR795251
+
+       windows example: -r NC_000002.11 -p 73613067 --query "-" -l 3 ..\..\..\tools\ref-variation\SRR618508.pileup
+
+       -r NC_000002.11 -p 73613071 --query "C" -l 1
+       -vv -t 16 -r NC_000007.13 -p 117292900 --query "-" -l 4          
+
+       -vv -c -t 16 -r NC_000002.11 -p 73613067 --query "-" -l 3 /netmnt/traces04/sra33/SRZ/000867/SRR867061/SRR867061.pileup /netmnt/traces04/sra33/SRZ/000867/SRR867131/SRR867131.pileup
+       -vv -c -t 16 -r NC_000002.11 -p 73613067 --query "-" -l 3 ..\..\..\tools\ref-variation\SRR867061.pileup ..\..\..\tools\ref-variation\SRR867131.pileup
+
+       -vvv -c --count-strand counteraligned -t 16 -r NC_000002.11 -p 73613067 --query "-" -l 3 SRR867061 SRR867131
+
+       old problem cases (didn't stop) - now OK:
+       -v -c -r CM000671.1 -p 136131022 --query "T" -l 1 SRR1601768
+       -v -c -r NC_000001.11 -p 136131022 --query "T" -l 1 SRR1601768
+
+       NEW problebm - FIXED:
+       -t 16 -v -c -r CM000671.1 -p 136131021 --query "T" -l 1 SRR1596639
+
+       NEW problem:
+       -vvv -r NC_000002.11 -p 73613030 --query "AT[1-3]" -l 3
+       Inconsistent variations found
+
+       NEW problem - FIXED (not completely): 
+       -c -r CM000664.1 -p 234668879  -l 14 --query "ATATATATATATAT" SRR1597895 ok, non zero 30/33
+       -c -r CM000664.1 -p 234668879  -l 14 --query "AT[1-8]" SRR1597895 - all counts 0 - FIXED
+       was different total count because of SRR1597895.PA.26088404
+       had wrong projected pos - fixed in ncbi-vdb
+       UPDATE: now the sum of counts for AT[1-8] < for "ATATATATATATAT"
+
+       NEW problem - FIXED
+       -r NC_000001.10 -p 1064999 -l 1 --query A -v - hangs up
+
+       NEW problem - FIXED
+       -r NC_000020.10 -p 137534 -l 2 --query - -v
+
+       NEW problem - FIXED
+       -c -r CM000663.1 -p 123452 -l 7 --query "GGGAGAAAT" -vv -L info
+       expanded variation has smaller window (6) but the variation returned is still of length 7
+
+       */
+
+        return NSRefVariation::find_variation_region ( argc, argv );
+    }
+}
diff --git a/tools/ref-variation/var-expand.cpp b/tools/ref-variation/var-expand.cpp
new file mode 100644
index 0000000..248064c
--- /dev/null
+++ b/tools/ref-variation/var-expand.cpp
@@ -0,0 +1,417 @@
+#include <kapp/main.h>
+#include <klib/rc.h>
+
+#include <iostream>
+#include <stdio.h>
+
+#include <ngs/ncbi/NGS.hpp>
+#include <ngs/ReferenceSequence.hpp>
+
+#include "helper.h"
+#include "common.h"
+
+#define PARAM_ALG_SW "sw"
+#define PARAM_ALG_RA "ra"
+
+#ifdef _WIN32
+#define PRSIZE_T "I"
+#else
+#define PRSIZE_T "z"
+#endif
+
+namespace VarExpand
+{
+    struct Params
+    {
+        ::RefVarAlg alg;
+    } g_Params =
+    {
+        ::refvarAlgSW
+    };
+
+    char const OPTION_ALG[] = "algorithm";
+    //char const ALIAS_ALG[]  = "a";
+    char const* USAGE_ALG[] = { "the algorithm to use for searching. "
+        "\""PARAM_ALG_SW"\" means Smith-Waterman. "
+        "\""PARAM_ALG_RA"\" means Rolling bulldozer algorithm\n", NULL };
+
+    ::OptDef Options[] =
+    {
+        { OPTION_ALG, NULL, NULL, USAGE_ALG, 1, true, false }
+    };
+
+    template <class TObject, typename TKey> class CNGSObject
+    {
+        TObject* m_self;
+        TKey m_key;
+
+    public:
+        CNGSObject() : m_self(NULL) {}
+        ~CNGSObject() { Release(); }
+        CNGSObject ( CNGSObject const& x);
+        CNGSObject& operator=(CNGSObject const& x);
+
+        void Release()
+        {
+            delete m_self;
+            m_self = NULL;
+        }
+
+        void Init(TObject const& obj, TKey const& key)
+        {
+            TObject* p = new TObject(obj); // may throw ?
+
+            Release();
+            m_self = p;
+            m_key = key;
+        }
+
+        TKey const& GetKey() const { return m_key; }
+        TObject const* GetSelfPtr() const { return m_self; }
+    };
+
+    bool check_ref_slice ( char const* ref, size_t ref_size )
+    {
+        bool ret = ref_size == 0;
+        for ( size_t i = 0; i < ref_size; ++i )
+        {
+            if ( !(ref [i] == 'N' || ref [i] == 'n' || ref [i] == '.') )
+            {
+                ret = true; // at least one non-N base is OK
+                break;
+            }
+        }
+        return ret;
+    }
+
+    void get_ref_var_object (KSearch::CVRefVariation& obj, size_t ref_pos, size_t del_len,
+        char const* allele, size_t allele_len, ngs::ReferenceSequence const& ref_seq,
+        std::string & ref_allele)
+    {
+        size_t var_len = allele_len;
+
+        size_t chunk_size = 5000; // TODO: add the method Reference[Sequence].getChunkSize() to the API
+        size_t chunk_no = ref_pos / chunk_size;
+        size_t ref_pos_in_slice = ref_pos % chunk_size;
+        size_t bases_start = chunk_no * chunk_size;
+        size_t chunk_no_last = ref_seq.getLength() / chunk_size;
+
+        bool cont = false;
+        size_t chunk_no_start = chunk_no, chunk_no_end = chunk_no;
+
+        // optimization: first look into the current chunk only (using ngs::StringRef)
+        {
+            ngs::StringRef ref_chunk = ref_seq.getReferenceChunk ( bases_start );
+
+            if ( ! check_ref_slice (ref_chunk.data() + ref_pos_in_slice, del_len) )
+            {
+                PLOGMSG ( klogWarn,
+                    ( klogWarn,
+                    "The selected reference region [$(REFSLICE)] does not contain valid bases, skipping...",
+                    "REFSLICE=%.*s",
+                    (int)del_len, ref_chunk.data() + ref_pos_in_slice ));
+            }
+            
+            cont = Common::find_variation_core_step ( obj, g_Params.alg,
+                ref_chunk.data(), ref_chunk.size(), ref_pos_in_slice,
+                allele, var_len, del_len,
+                chunk_size, chunk_no_last, bases_start, chunk_no_start, chunk_no_end );
+
+            if ( !cont )
+                ref_allele.assign (ref_chunk.data() + obj.GetAlleleStartRelative(), obj.GetAlleleLenOnRef());
+        }
+
+        // general case - expanding ref_slice to multiple chunks
+        if ( cont )
+        {
+            ngs::String ref_slice;
+            while ( cont )
+            {
+                ref_slice = ref_seq.getReferenceBases (
+                    bases_start, (chunk_no_end - chunk_no_start + 1)*chunk_size );
+
+                cont = Common::find_variation_core_step ( obj, g_Params.alg,
+                    ref_slice.c_str(), ref_slice.size(), ref_pos_in_slice,
+                    allele, var_len, del_len,
+                    chunk_size, chunk_no_last, bases_start, chunk_no_start, chunk_no_end );
+            }
+            ref_allele.assign (ref_slice.c_str() + obj.GetAlleleStartRelative(), obj.GetAlleleLenOnRef());
+        }
+    }
+
+    void expand_variation ( //ngs::ReferenceSequence const& ref_seq,
+                    CNGSObject <ngs::ReferenceSequence, ncbi::String>& ref_obj,
+                    char const* key, size_t key_len,
+                    char const* ref_name, size_t ref_name_len,
+                    size_t ref_pos, size_t del_len,
+                    char const* allele, size_t allele_len )
+    {
+        ncbi::String sref_name ( ref_name, ref_name_len );
+        if ( ref_obj.GetSelfPtr() == NULL || ref_obj.GetKey() != sref_name )
+        {
+            try
+            {
+                ref_obj.Init (ncbi::NGS::openReferenceSequence(sref_name), sref_name);
+            }
+            catch (ngs::ErrorMsg const& e)
+            {
+                if ( strstr ( e.what(), "failed to open table" ) == NULL )
+                    throw;
+                return;
+            }
+        }
+
+        ngs::ReferenceSequence const& ref_seq = * ref_obj.GetSelfPtr();
+
+        KSearch::CVRefVariation obj;
+        std::string ref_allele;
+
+        get_ref_var_object ( obj, ref_pos, del_len, allele, allele_len, ref_seq, ref_allele );
+
+        if ( ref_allele.size() == 0 )
+            ref_allele = "-";
+
+        size_t new_allele_size = obj.GetAlleleSize();
+        char const* new_allele = obj.GetAllele();
+
+        if ( new_allele_size == 0)
+        {
+            new_allele = "-";
+            new_allele_size = 1;
+        }
+
+        printf (
+            "%.*s\t%.*s:%"PRSIZE_T"u:%"PRSIZE_T"u:%.*s\t%.*s:%"PRSIZE_T"u:%"PRSIZE_T"u:%.*s\t%.*s:%"PRSIZE_T"u:%"PRSIZE_T"u:%s\n",
+            (int)key_len, key,
+
+            (int)ref_name_len, ref_name,
+            ref_pos, del_len,
+            (int)allele_len, allele,
+
+            (int)ref_name_len, ref_name,
+            obj.GetAlleleStartAbsolute(), obj.GetAlleleLenOnRef(),
+            (int)new_allele_size, new_allele,
+
+            (int)ref_name_len, ref_name,
+            obj.GetAlleleStartAbsolute(), obj.GetAlleleLenOnRef(),
+            ref_allele.c_str()
+            );
+    }
+
+
+    bool is_eol (char ch)
+    {
+        return ch == '\0' || ch == '\r' || ch == '\n';
+    }
+
+    bool is_sep (char ch, char const* sz_separators)
+    {
+        return strchr (sz_separators, ch) != NULL;
+    }
+
+    bool parse_number ( char const* num_str, size_t num_str_len, size_t* parsed_val )
+    {
+        * parsed_val = 0;
+        for ( size_t i = 0; i < num_str_len; ++i )
+        {
+            char ch = num_str[i];
+            if ( ch < '0' || ch > '9' )
+                return false;
+
+            size_t digit = ch - '0';
+            *parsed_val = *parsed_val * 10 + digit;
+        }
+        return true;
+    }
+
+    bool parse_input_line ( char const* line, size_t line_size,
+        char const** pkey, size_t* pkey_len,
+        char const** pref_name, size_t* pref_name_len,
+        char const** pallele, size_t* pallele_len,
+        size_t* pref_pos, size_t* pdel_len )
+    {
+        size_t i = 0;
+        char const* pstr;
+        size_t str_len;
+
+        char const SEP_SPACE[] = " \t\n\r";
+        char const SEP_COLON[] = ":\n\r";
+
+        // key
+        pstr = & line[i];
+        str_len = 0;
+        for (; i < line_size && !is_sep(line[i], SEP_SPACE) && !is_eol(line[i]); ++i, ++str_len);
+        if (i == line_size || str_len == 0 || is_eol(line[i]))
+            return false;
+        *pkey = pstr;
+        *pkey_len = str_len;
+        for (++i; i < line_size && is_sep(line[i], SEP_SPACE) && !is_eol(line[i]); ++i);
+
+        // ref_name
+        pstr = & line[i];
+        str_len = 0;
+        for (; i < line_size && !is_sep(line[i], SEP_COLON) && !is_eol(line[i]); ++i, ++str_len);
+        if (i == line_size || str_len == 0 || is_eol(line[i]))
+            return false;
+        *pref_name = pstr;
+        *pref_name_len = str_len;
+
+        // ref_pos
+        ++i;
+        pstr = & line[i];
+        str_len = 0;
+        for (; i < line_size && !is_sep(line[i], SEP_COLON) && !is_eol(line[i]); ++i, ++str_len);
+        if (i == line_size
+            || str_len == 0
+            || is_eol (line[i])
+            || ! parse_number (pstr, str_len, pref_pos))
+        {
+            return false;
+        }
+        
+        // del_len
+        ++i;
+        pstr = & line[i];
+        str_len = 0;
+        for (; i < line_size && !is_sep(line[i], SEP_COLON) && !is_eol(line[i]); ++i, ++str_len);
+        if (i == line_size
+            || str_len == 0
+            || is_eol (line[i])
+            || ! parse_number (pstr, str_len, pdel_len))
+        {
+            return false;
+        }
+
+        // allele
+        ++i;
+        pstr = & line[i];
+        str_len = 0;
+        for (; i < line_size && !is_sep(line[i], SEP_COLON) && !is_eol(line[i]); ++i, ++str_len);
+        *pallele = pstr;
+        *pallele_len = str_len;
+        // treat "-" as ""
+        if (*pallele_len == 1 && (*pallele)[0] == '-')
+            *pallele_len = 0;
+
+        return true;
+    }
+
+    void process_input_line (
+        CNGSObject <ngs::ReferenceSequence, ncbi::String>& ref_obj,
+        char const* line, size_t line_size )
+    {
+        char const* key, *ref_name, *allele;
+        size_t key_len, ref_name_len, allele_len, ref_pos, del_len;
+
+        if ( parse_input_line ( line, line_size,
+            & key, & key_len,
+            & ref_name, & ref_name_len,
+            & allele, & allele_len,
+            & ref_pos, & del_len ) )
+        {
+            expand_variation ( ref_obj, key, key_len,
+                ref_name, ref_name_len,
+                ref_pos, del_len,
+                allele, allele_len );
+        }
+    }
+
+    int expand_variations_impl ( )
+    {
+        std::string line;
+        CNGSObject <ngs::ReferenceSequence, ncbi::String> ref_obj;
+        while ( std::getline ( std::cin, line ) )
+        {
+            if (line.size() > 0)
+                process_input_line ( ref_obj, line.c_str(), line.size() );
+        }
+
+        return 0;
+    }
+
+    int expand_variations (int argc, char** argv)
+    {
+        int ret;
+        try
+        {
+            KApp::CArgs args;
+            args.MakeAndHandle (argc, argv, Options, countof (Options));
+
+            if (args.GetOptionCount (OPTION_ALG) == 1)
+            {
+                char const* alg = args.GetOptionValue ( OPTION_ALG, 0 );
+                if (!strcmp(alg, PARAM_ALG_SW))
+                    g_Params.alg = ::refvarAlgSW;
+                else if (!strcmp(alg, PARAM_ALG_RA))
+                    g_Params.alg = ::refvarAlgRA;
+                else
+                {
+                    PLOGMSG ( klogErr, ( klogErr,
+                        "Error: Unknown algorithm specified: \"$(ALG)\"", "ALG=%s", alg ));
+                    return 3;
+                }
+            }
+
+            ret = expand_variations_impl ();
+        }
+        catch ( ngs::ErrorMsg const& e )
+        {
+            PLOGMSG ( klogErr,
+                ( klogErr, "ngs::ErrorMsg: $(WHAT)", "WHAT=%s", e.what()
+                ));
+            ret = 3;
+        }
+        catch (...)
+        {
+            Utils::HandleException ();
+            ret = 3;
+        }
+
+        return ret;
+    }
+}
+
+
+extern "C"
+{
+    const char UsageDefaultName[] = "var-expand";
+
+    rc_t CC UsageSummary (const char * progname)
+    {
+        OUTMSG (("\nFor each pair (key, variation spec) in input produces the expanded variation spec\n\n"));
+        return 0;
+    }
+
+    rc_t CC Usage ( struct Args const * args )
+    {
+        rc_t rc = 0;
+        const char* progname = UsageDefaultName;
+        const char* fullpath = UsageDefaultName;
+
+        if (args == NULL)
+            rc = RC(rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
+        else
+            rc = ArgsProgram(args, &fullpath, &progname);
+
+        UsageSummary (progname);
+
+
+        OUTMSG (("\nInput: the stream of lines in the format: <key> <tab> <input variation>\n\n"));
+        OUTMSG (("\nOptions:\n"));
+
+        HelpOptionLine (NULL, VarExpand::OPTION_ALG, "value", VarExpand::USAGE_ALG);
+
+        XMLLogger_Usage();
+
+        HelpOptionsStandard ();
+
+        HelpVersion (fullpath, KAppVersion());
+
+        return rc;
+    }
+
+    rc_t CC KMain ( int argc, char *argv [] )
+    {
+        return VarExpand::expand_variations (argc, argv);
+    }
+}
diff --git a/tools/sra-dump/.gitignore b/tools/sra-dump/.gitignore
new file mode 100644
index 0000000..c97f963
--- /dev/null
+++ b/tools/sra-dump/.gitignore
@@ -0,0 +1 @@
+*.sh
diff --git a/tools/sra-dump/Makefile b/tools/sra-dump/Makefile
new file mode 100644
index 0000000..2f3ac7c
--- /dev/null
+++ b/tools/sra-dump/Makefile
@@ -0,0 +1,128 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/sra-dump
+
+INT_TOOLS =
+
+EXT_TOOLS = \
+	fastq-dump \
+	sff-dump \
+	illumina-dump \
+	abi-dump
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# Common dumper definitions
+#
+DUMP_COMMON_SRC = \
+	factory \
+	fasta_dump \
+	core
+
+DUMP_COMMON_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lm
+
+#-------------------------------------------------------------------------------
+# fastq-dump
+#
+FASTQ_DUMP_SRC = \
+	$(DUMP_COMMON_SRC) \
+	fastq
+
+FASTQ_DUMP_OBJ = \
+	$(addsuffix .$(OBJX),$(FASTQ_DUMP_SRC))
+
+$(BINDIR)/fastq-dump: $(FASTQ_DUMP_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(DUMP_COMMON_LIB)
+
+#-------------------------------------------------------------------------------
+# sff-dump
+#
+SFF_DUMP_SRC = \
+	$(DUMP_COMMON_SRC) \
+	sff
+
+SFF_DUMP_OBJ = \
+	$(addsuffix .$(OBJX),$(SFF_DUMP_SRC))
+
+$(BINDIR)/sff-dump: $(SFF_DUMP_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(DUMP_COMMON_LIB)
+
+#-------------------------------------------------------------------------------
+# illumina-dump
+#
+ILLUMINA_DUMP_SRC = \
+	$(DUMP_COMMON_SRC) \
+	illumina
+
+ILLUMINA_DUMP_OBJ = \
+	$(addsuffix .$(OBJX),$(ILLUMINA_DUMP_SRC))
+
+$(BINDIR)/illumina-dump: $(ILLUMINA_DUMP_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(DUMP_COMMON_LIB)
+
+#-------------------------------------------------------------------------------
+# abi-dump
+#
+ABI_DUMP_SRC = \
+	$(DUMP_COMMON_SRC) \
+	abi
+
+ABI_DUMP_OBJ = \
+	$(addsuffix .$(OBJX),$(ABI_DUMP_SRC))
+
+$(BINDIR)/abi-dump: $(ABI_DUMP_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(DUMP_COMMON_LIB)
+
diff --git a/tools/sra-dump/abi.c b/tools/sra-dump/abi.c
new file mode 100644
index 0000000..98137ef
--- /dev/null
+++ b/tools/sra-dump/abi.c
@@ -0,0 +1,907 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <klib/container.h>
+#include <klib/printf.h>
+#include <kapp/main.h>
+
+#include <sra/sradb.h>
+#include <sra/abi.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "core.h"
+#include "debug.h"
+
+#define DATABUFFERINITSIZE 10240
+
+/* ============== Absolid read type (bio/tech) filter ============================ */
+
+typedef struct Absolid2BioFilter_struct {
+    const AbsolidReader* reader;
+} Absolid2BioFilter;
+
+/* leave only up to 2 first bio reads */
+static
+rc_t Absolid2BioFilter_GetKey(const SRASplitter* cself, const char** key, spotid_t spot, readmask_t* readmask)
+{
+    rc_t rc = 0;
+    Absolid2BioFilter* self = (Absolid2BioFilter*)cself;
+
+    if( self == NULL || key == NULL ) {
+        rc = RC(rcExe, rcNode, rcExecuting, rcParam, rcInvalid);
+    } else {
+        if( (rc = AbsolidReaderSeekSpot(self->reader, spot)) == 0 ) {
+            uint32_t num_reads = 0;
+            if( (rc = AbsolidReader_SpotInfo(self->reader, NULL, NULL, NULL, &num_reads)) == 0 ) {
+                uint32_t q, readId;
+                make_readmask(new_mask);
+                SRAReadTypes read_type = SRA_READ_TYPE_TECHNICAL;
+
+                clear_readmask(new_mask);
+                for(q = 0, readId = 0; rc == 0 && readId < num_reads && q < 2; readId++) {
+                    if( (rc = AbsolidReader_SpotReadInfo(self->reader, readId + 1, &read_type, NULL, NULL, NULL, NULL)) == 0 ) {
+                        if( read_type & SRA_READ_TYPE_BIOLOGICAL ) {
+                            set_readmask(new_mask, readId);
+                            q++;
+                        }
+                    }
+                }
+                *key = "";
+                copy_readmask(new_mask, readmask);
+            }
+        } else if( GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound ) {
+            SRA_DUMP_DBG (3, ("%s skipped %u row\n", __func__, spot));
+            *key = NULL;
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+typedef struct Absolid2BioFilterFactory_struct {
+    const char* accession;
+    const SRATable* table;
+    const AbsolidReader* reader;
+} Absolid2BioFilterFactory;
+
+static
+rc_t Absolid2BioFilterFactory_Init(const SRASplitterFactory* cself)
+{
+    rc_t rc = 0;
+    Absolid2BioFilterFactory* self = (Absolid2BioFilterFactory*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcExe, rcType, rcConstructing, rcParam, rcNull);
+    } else {
+        rc = AbsolidReaderMake(&self->reader, self->table, self->accession,
+                               false, false, 0, 0, 0, false);
+    }
+    return rc;
+}
+
+static
+rc_t Absolid2BioFilterFactory_NewObj(const SRASplitterFactory* cself, const SRASplitter** splitter)
+{
+    rc_t rc = 0;
+    Absolid2BioFilterFactory* self = (Absolid2BioFilterFactory*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcExe, rcType, rcExecuting, rcParam, rcNull);
+    } else {
+        if( (rc = SRASplitter_Make(splitter, sizeof(Absolid2BioFilter), Absolid2BioFilter_GetKey, NULL, NULL, NULL)) == 0 ) {
+            ((Absolid2BioFilter*)(*splitter))->reader = self->reader;
+        }
+    }
+    return rc;
+}
+
+static
+void Absolid2BioFilterFactory_Release(const SRASplitterFactory* cself)
+{
+    if( cself != NULL ) {
+        Absolid2BioFilterFactory* self = (Absolid2BioFilterFactory*)cself;
+        AbsolidReaderWhack(self->reader);
+    }
+}
+
+static
+rc_t Absolid2BioFilterFactory_Make(const SRASplitterFactory** cself, const char* accession, const SRATable* table)
+{
+    rc_t rc = 0;
+    Absolid2BioFilterFactory* obj = NULL;
+
+    if( cself == NULL || accession == NULL || table == NULL ) {
+        rc = RC(rcExe, rcType, rcConstructing, rcParam, rcNull);
+    } else if( (rc = SRASplitterFactory_Make(cself, eSplitterSpot, sizeof(*obj),
+                                             Absolid2BioFilterFactory_Init,
+                                             Absolid2BioFilterFactory_NewObj,
+                                             Absolid2BioFilterFactory_Release)) == 0 ) {
+        obj = (Absolid2BioFilterFactory*)*cself;
+        obj->accession = accession;
+        obj->table = table;
+    }
+    return rc;
+}
+
+/* ============== Absolid label assigning ============================ */
+
+typedef struct AbsolidLabelerFilter_struct {
+    const AbsolidReader* reader;
+    bool is_platform_cs_native;
+    SRASplitter_Keys keys[8];
+    size_t key_sz[8];
+} AbsolidLabelerFilter;
+
+static
+rc_t AbsolidLabelerFilter_GetKeySet(const SRASplitter* cself, const SRASplitter_Keys** key, uint32_t* keys, spotid_t spot, const readmask_t* readmask)
+{
+    rc_t rc = 0;
+    AbsolidLabelerFilter* self = (AbsolidLabelerFilter*)cself;
+
+    if( self == NULL || key == NULL ) {
+        rc = RC(rcExe, rcNode, rcExecuting, rcParam, rcInvalid);
+    } else {
+        *keys = 0;
+        if( rc == 0 && (rc = AbsolidReaderSeekSpot(self->reader, spot)) == 0 ) {
+            uint32_t num_reads = 0;
+            if( (rc = AbsolidReader_SpotInfo(self->reader, NULL, NULL, NULL, &num_reads)) == 0 ) {
+                uint32_t readId, q;
+                const char* read_label;
+                INSDC_coord_len read_label_sz = 0;
+                INSDC_coord_len read_len = 0;
+
+                *key = self->keys;
+                *keys = sizeof(self->keys) / sizeof(self->keys[0]);
+                for(q = 0; q < *keys; q++) {
+                    clear_readmask(self->keys[q].readmask);
+                }
+                for(q = 0, readId = 0; rc == 0 && readId < num_reads; readId++) {
+                    if( !isset_readmask(readmask, readId) ) {
+                        continue;
+                    }
+                    rc = AbsolidReader_SpotReadInfo(self->reader, readId + 1, NULL, &read_label, &read_label_sz, NULL, &read_len);
+                    if( read_len == 0 ) {
+                        continue;
+                    }
+                    if( self->is_platform_cs_native ) {
+                        uint32_t i;
+                        for(i = 0; i < *keys; i++) {
+                            if( read_label_sz == self->key_sz[i] && strncmp(read_label, self->keys[i].key, read_label_sz) == 0 ) {
+                                set_readmask(self->keys[i].readmask, readId);
+                                break;
+                            }
+                        }
+                        if( i >= *keys ) {
+                            rc = RC(rcExe, rcNode, rcExecuting, rcTag, rcUnexpected);
+                        }
+                    } else {
+                        /* since prev filter leaves only 2 first bio reads labels F3 and R3 wil be used */
+                        set_readmask(self->keys[q].readmask, readId);
+                    }
+                    q++;
+                }
+            }
+        } else if( GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound ) {
+            SRA_DUMP_DBG (3, ("%s skipped %u row\n", __func__, spot));
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+typedef struct AbsolidLabelerFilterFactory_struct {
+    const char* accession;
+    const SRATable* table;
+    bool is_platform_cs_native;
+    const AbsolidReader* reader;
+} AbsolidLabelerFilterFactory;
+
+static
+rc_t AbsolidLabelerFilterFactory_Init(const SRASplitterFactory* cself)
+{
+    rc_t rc = 0;
+    AbsolidLabelerFilterFactory* self = (AbsolidLabelerFilterFactory*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcExe, rcType, rcConstructing, rcParam, rcNull);
+    } else {
+        rc = AbsolidReaderMake(&self->reader, self->table, self->accession,
+                               false, false, 0, 0, 0, false);
+    }
+    return rc;
+}
+
+static
+rc_t AbsolidLabelerFilterFactory_NewObj(const SRASplitterFactory* cself, const SRASplitter** splitter)
+{
+    rc_t rc = 0;
+    AbsolidLabelerFilterFactory* self = (AbsolidLabelerFilterFactory*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcExe, rcType, rcExecuting, rcParam, rcNull);
+    } else {
+        if( (rc = SRASplitter_Make(splitter, sizeof(AbsolidLabelerFilter), NULL, AbsolidLabelerFilter_GetKeySet, NULL, NULL)) == 0 ) {
+            ((AbsolidLabelerFilter*)(*splitter))->reader = self->reader;
+            ((AbsolidLabelerFilter*)(*splitter))->is_platform_cs_native = self->is_platform_cs_native;
+            ((AbsolidLabelerFilter*)(*splitter))->keys[0].key = "F3";
+            ((AbsolidLabelerFilter*)(*splitter))->keys[1].key = "R3";
+            ((AbsolidLabelerFilter*)(*splitter))->keys[2].key = "F5-P2";
+            ((AbsolidLabelerFilter*)(*splitter))->keys[3].key = "F5-BC";
+            ((AbsolidLabelerFilter*)(*splitter))->keys[4].key = "F5-RNA";
+            ((AbsolidLabelerFilter*)(*splitter))->keys[5].key = "F5-DNA";
+            ((AbsolidLabelerFilter*)(*splitter))->keys[6].key = "F3-DNA";
+            ((AbsolidLabelerFilter*)(*splitter))->keys[7].key = "BC";
+            ((AbsolidLabelerFilter*)(*splitter))->key_sz[0] = 2;
+            ((AbsolidLabelerFilter*)(*splitter))->key_sz[1] = 2;
+            ((AbsolidLabelerFilter*)(*splitter))->key_sz[2] = 5;
+            ((AbsolidLabelerFilter*)(*splitter))->key_sz[3] = 5;
+            ((AbsolidLabelerFilter*)(*splitter))->key_sz[4] = 6;
+            ((AbsolidLabelerFilter*)(*splitter))->key_sz[5] = 6;
+            ((AbsolidLabelerFilter*)(*splitter))->key_sz[6] = 6;
+            ((AbsolidLabelerFilter*)(*splitter))->key_sz[7] = 2;
+        }
+    }
+    return rc;
+}
+
+static
+void AbsolidLabelerFilterFactory_Release(const SRASplitterFactory* cself)
+{
+    if( cself != NULL ) {
+        AbsolidLabelerFilterFactory* self = (AbsolidLabelerFilterFactory*)cself;
+        AbsolidReaderWhack(self->reader);
+    }
+}
+
+static
+rc_t AbsolidLabelerFilterFactory_Make(const SRASplitterFactory** cself, const char* accession,
+                                      const SRATable* table, bool is_platform_cs_native)
+{
+    rc_t rc = 0;
+    AbsolidLabelerFilterFactory* obj = NULL;
+
+    if( cself == NULL || accession == NULL || table == NULL ) {
+        rc = RC(rcExe, rcType, rcConstructing, rcParam, rcNull);
+    } else if( (rc = SRASplitterFactory_Make(cself, eSplitterRead, sizeof(*obj),
+                                             AbsolidLabelerFilterFactory_Init,
+                                             AbsolidLabelerFilterFactory_NewObj,
+                                             AbsolidLabelerFilterFactory_Release)) == 0 ) {
+        obj = (AbsolidLabelerFilterFactory*)*cself;
+        obj->accession = accession;
+        obj->table = table;
+        obj->is_platform_cs_native = is_platform_cs_native;
+    }
+    return rc;
+}
+
+/* ============== Absolid min read length splitter ============================ */
+
+char* AbsolidReadLenFilter_key_buf = NULL;
+
+typedef struct AbsolidReadLenFilter_struct {
+    const AbsolidReader* reader;
+} AbsolidReadLenFilter;
+
+
+/* skip all reads with len < minreadlen */
+static
+rc_t AbsolidReadLenFilter_GetKey(const SRASplitter* cself, const char** key, spotid_t spot, readmask_t* readmask)
+{
+    rc_t rc = 0;
+    AbsolidReadLenFilter* self = (AbsolidReadLenFilter*)cself;
+
+    if( self == NULL || key == NULL ) {
+        rc = RC(rcExe, rcNode, rcExecuting, rcParam, rcInvalid);
+    } else {
+        *key = "";
+
+        if( rc == 0 && (rc = AbsolidReaderSeekSpot(self->reader, spot)) == 0 ) {
+            uint32_t num_reads = 0;
+            if( (rc = AbsolidReader_SpotInfo(self->reader, NULL, NULL, NULL, &num_reads)) == 0 ) {
+                uint32_t readId;
+                make_readmask(new_mask);
+                INSDC_coord_len read_len = 0;
+
+                clear_readmask(new_mask);
+                for(readId = 0; rc == 0 && readId < num_reads; readId++) {
+                    if( !isset_readmask(readmask, readId) ) {
+                        continue;
+                    }
+                    rc = AbsolidReader_SpotReadInfo(self->reader, readId + 1, NULL, NULL, NULL, NULL, &read_len);
+                    if( rc == 0 && read_len > 0 ) {
+                        set_readmask(new_mask, readId);
+                    }
+                }
+                copy_readmask(new_mask, readmask);
+            }
+        } else if( GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound ) {
+            SRA_DUMP_DBG (3, ("%s skipped %u row\n", __func__, spot));
+            *key = NULL;
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+typedef struct AbsolidReadLenFilterFactory_struct {
+    const char* accession;
+    const SRATable* table;
+    bool clip;
+    uint32_t minReadLen;
+    const AbsolidReader* reader;
+} AbsolidReadLenFilterFactory;
+
+static
+rc_t AbsolidReadLenFilterFactory_Init(const SRASplitterFactory* cself)
+{
+    rc_t rc = 0;
+    AbsolidReadLenFilterFactory* self = (AbsolidReadLenFilterFactory*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcExe, rcType, rcConstructing, rcParam, rcNull);
+    } else {
+        rc = AbsolidReaderMake(&self->reader, self->table, self->accession,
+                               false, !self->clip, self->minReadLen, 0, 0, false);
+    }
+    return rc;
+}
+
+static
+rc_t AbsolidReadLenFilterFactory_NewObj(const SRASplitterFactory* cself, const SRASplitter** splitter)
+{
+    rc_t rc = 0;
+    AbsolidReadLenFilterFactory* self = (AbsolidReadLenFilterFactory*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcExe, rcType, rcExecuting, rcParam, rcNull);
+    } else {
+        if( (rc = SRASplitter_Make(splitter, sizeof(AbsolidReadLenFilter), AbsolidReadLenFilter_GetKey, NULL, NULL, NULL)) == 0 ) {
+            ((AbsolidReadLenFilter*)(*splitter))->reader = self->reader;
+        }
+    }
+    return rc;
+}
+
+static
+void AbsolidReadLenFilterFactory_Release(const SRASplitterFactory* cself)
+{
+    if( cself != NULL ) {
+        AbsolidReadLenFilterFactory* self = (AbsolidReadLenFilterFactory*)cself;
+        AbsolidReaderWhack(self->reader);
+        free(AbsolidReadLenFilter_key_buf);
+    }
+}
+
+static
+rc_t AbsolidReadLenFilterFactory_Make(const SRASplitterFactory** cself, const char* accession, const SRATable* table,
+                                      bool clip, uint32_t minReadLen)
+{
+    rc_t rc = 0;
+    AbsolidReadLenFilterFactory* obj = NULL;
+
+    if( cself == NULL || accession == NULL || table == NULL ) {
+        rc = RC(rcExe, rcType, rcConstructing, rcParam, rcNull);
+    } else if( (rc = SRASplitterFactory_Make(cself, eSplitterSpot, sizeof(*obj),
+                                             AbsolidReadLenFilterFactory_Init,
+                                             AbsolidReadLenFilterFactory_NewObj,
+                                             AbsolidReadLenFilterFactory_Release)) == 0 ) {
+        obj = (AbsolidReadLenFilterFactory*)*cself;
+        obj->accession = accession;
+        obj->table = table;
+        obj->minReadLen = minReadLen;
+        obj->clip = clip;
+    }
+    return rc;
+}
+
+/* ============== Absolid quality filter ============================ */
+
+typedef struct AbsolidQFilter_struct {
+    const AbsolidReader* reader;
+    KDataBuffer* b;
+} AbsolidQFilter;
+
+
+/* filter out reads by leading/trialing quality */
+static
+rc_t AbsolidQFilter_GetKey(const SRASplitter* cself, const char** key, spotid_t spot, readmask_t* readmask)
+{
+    rc_t rc = 0;
+    AbsolidQFilter* self = (AbsolidQFilter*)cself;
+
+    if( self == NULL || key == NULL ) {
+        rc = RC(rcExe, rcNode, rcExecuting, rcParam, rcInvalid);
+    } else {
+        uint32_t num_reads = 0;
+
+        if( (rc = AbsolidReaderSeekSpot(self->reader, spot)) == 0 ) {
+            if( (rc = AbsolidReader_SpotInfo(self->reader, NULL, NULL, NULL, &num_reads)) == 0 ) {
+                uint32_t readId;
+                make_readmask(new_mask);
+                INSDC_coord_len read_len = 0;
+                static char const* const colorStr = "..........";
+                static const int xLen = 10;
+
+                clear_readmask(new_mask);
+                for(readId = 0; rc == 0 && readId < num_reads; readId++) {
+                    if( (rc = AbsolidReader_SpotReadInfo(self->reader, readId + 1, NULL, NULL, NULL, NULL, &read_len)) == 0 ) {
+                        IF_BUF((AbsolidReaderBase(self->reader, readId + 1, self->b->base, KDataBufferBytes(self->b), NULL)), self->b, read_len) {
+                            const char* b = self->b->base;
+                            if( strncmp(&b[1], colorStr, xLen) == 0 && strcmp(&b[read_len - xLen + 1], colorStr) == 0 )  {
+                                continue;
+                            }
+                        }
+                        set_readmask(new_mask, readId);
+                    }
+                }
+                *key = "";
+                copy_readmask(new_mask, readmask);
+            }
+        } else if( GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound ) {
+            SRA_DUMP_DBG (3, ("%s skipped %u row\n", __func__, spot));
+            *key = NULL;
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+typedef struct AbsolidQFilterFactory_struct {
+    const char* accession;
+    const SRATable* table;
+    bool clip;
+    const AbsolidReader* reader;
+    KDataBuffer buf;
+} AbsolidQFilterFactory;
+
+static
+rc_t AbsolidQFilterFactory_Init(const SRASplitterFactory* cself)
+{
+    rc_t rc = 0;
+    AbsolidQFilterFactory* self = (AbsolidQFilterFactory*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcExe, rcType, rcConstructing, rcParam, rcNull);
+    } else if( (rc = KDataBufferMakeBytes(&self->buf, DATABUFFERINITSIZE)) == 0 ) {
+        rc = AbsolidReaderMake(&self->reader, self->table, self->accession,
+                               false, self->clip, 0, 0, 0, false);
+    }
+    return rc;
+}
+
+static
+rc_t AbsolidQFilterFactory_NewObj(const SRASplitterFactory* cself, const SRASplitter** splitter)
+{
+    rc_t rc = 0;
+    AbsolidQFilterFactory* self = (AbsolidQFilterFactory*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcExe, rcType, rcExecuting, rcParam, rcNull);
+    } else {
+        if( (rc = SRASplitter_Make(splitter, sizeof(AbsolidQFilter), AbsolidQFilter_GetKey, NULL, NULL, NULL)) == 0 ) {
+            ((AbsolidQFilter*)(*splitter))->reader = self->reader;
+            ((AbsolidQFilter*)(*splitter))->b = &self->buf;
+        }
+    }
+    return rc;
+}
+
+static
+void AbsolidQFilterFactory_Release(const SRASplitterFactory* cself)
+{
+    if( cself != NULL ) {
+        AbsolidQFilterFactory* self = (AbsolidQFilterFactory*)cself;
+        KDataBufferWhack(&self->buf);
+        AbsolidReaderWhack(self->reader);
+    }
+}
+
+static
+rc_t AbsolidQFilterFactory_Make(const SRASplitterFactory** cself, const char* accession, const SRATable* table, bool clip)
+{
+    rc_t rc = 0;
+    AbsolidQFilterFactory* obj = NULL;
+
+    if( cself == NULL || accession == NULL || table == NULL ) {
+        rc = RC(rcExe, rcType, rcConstructing, rcParam, rcNull);
+    } else if( (rc = SRASplitterFactory_Make(cself, eSplitterSpot, sizeof(*obj),
+                                             AbsolidQFilterFactory_Init,
+                                             AbsolidQFilterFactory_NewObj,
+                                             AbsolidQFilterFactory_Release)) == 0 ) {
+        obj = (AbsolidQFilterFactory*)*cself;
+        obj->accession = accession;
+        obj->table = table;
+        obj->clip = clip;
+    }
+    return rc;
+}
+
+/* ============== Absolid formatter object  ============================ */
+
+typedef struct AbsolidFormatterSplitter_struct {
+    const AbsolidReader* reader;
+    char pfx[10 * 1024];
+    int pfx_sz;
+    KDataBuffer* hb;
+    KDataBuffer* b;
+} AbsolidFormatterSplitter;
+
+static
+rc_t AbsolidFormatterSplitter_Dump(const SRASplitter* cself, spotid_t spot, const readmask_t* readmask)
+{
+    rc_t rc = 0;
+    AbsolidFormatterSplitter* self = (AbsolidFormatterSplitter*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcType, rcExecuting, rcParam, rcNull);
+    } else {
+        if( (rc = AbsolidReaderSeekSpot(self->reader, spot)) == 0 ) {
+            const char* prefix;
+            size_t head_sz, writ = 0;
+            uint32_t num_reads, readId;
+
+            rc = AbsolidReader_SpotInfo(self->reader, NULL, NULL, NULL, &num_reads);
+
+            for(readId = 1; rc == 0 && readId <= num_reads; readId++) {
+                if( !isset_readmask(readmask, readId - 1) ) {
+                    continue;
+                }
+                if( (rc = AbsolidReaderSpotName(self->reader, &prefix, &head_sz, NULL, NULL)) == 0 ) {
+                    if( head_sz != self->pfx_sz || memcmp(self->pfx, prefix, head_sz) != 0 ) {
+                        if( head_sz >= sizeof(self->pfx) ) {
+                            rc = RC(rcSRA, rcString, rcCopying, rcBuffer, rcInsufficient);
+                        } else {
+                            self->pfx_sz = head_sz;
+                            memcpy(self->pfx, prefix, head_sz);
+                            IF_BUF((string_printf(self->hb->base, KDataBufferBytes(self->hb), &head_sz,
+                                   "#\n# Title: %.*s\n#\n", self->pfx_sz, self->pfx)), self->hb, head_sz);
+                        }
+                    } else {
+                        head_sz = 0;
+                    }
+                }
+                if( rc == 0 ) {
+                    char* h = self->hb->base;
+                    IF_BUF((AbsolidReaderHeader(self->reader, readId, &h[head_sz],
+                            KDataBufferBytes(self->hb) - head_sz - 1, &writ)), self->hb, writ + head_sz + 1) {
+                        head_sz += writ;
+                        h[head_sz++] = '\n';
+                    }
+                }
+                if( rc == 0 && (rc = SRASplitter_FileActivate(cself, ".csfasta")) == 0 ) {
+                    IF_BUF((AbsolidReaderBase(self->reader, readId, self->b->base, KDataBufferBytes(self->b) - 1, &writ)), self->b, writ) {
+                        if( writ > 0 && (rc = SRASplitter_FileWrite(cself, 0, self->hb->base, head_sz)) == 0 ) {
+                            ((char*)(self->b->base))[writ] = '\n';
+                            rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ + 1);
+                        }
+                    }
+                }
+                if( rc == 0 && (rc = SRASplitter_FileActivate(cself, "_QV.qual")) == 0 ) {
+                    IF_BUF((AbsolidReaderQuality(self->reader, readId, self->b->base, KDataBufferBytes(self->b) - 1, &writ)), self->b, writ) {
+                        if( writ > 0 && (rc = SRASplitter_FileWrite(cself, 0, self->hb->base, head_sz)) == 0 ) {
+                            ((char*)(self->b->base))[writ] = '\n';
+                            rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ + 1);
+                        }
+                    }
+                }
+                if( rc == 0 && (rc = SRASplitter_FileActivate(cself, "_intensity.ScaledFTC.fasta")) == 0 ) {
+                    IF_BUF((AbsolidReaderSignalFTC(self->reader, readId, self->b->base, KDataBufferBytes(self->b) - 1, &writ)), self->b, writ) {
+                        if( writ > 0 && (rc = SRASplitter_FileWrite(cself, 0, self->hb->base, head_sz)) == 0 ) {
+                            ((char*)(self->b->base))[writ] = '\n';
+                            rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ + 1);
+                        }
+                    }
+                }
+                if( rc == 0 && (rc = SRASplitter_FileActivate(cself, "_intensity.ScaledCY3.fasta")) == 0 ) {
+                    IF_BUF((AbsolidReaderSignalCY3(self->reader, readId, self->b->base, KDataBufferBytes(self->b) - 1, &writ)), self->b, writ) {
+                        if( writ > 0 && (rc = SRASplitter_FileWrite(cself, 0, self->hb->base, head_sz)) == 0 ) {
+                            ((char*)(self->b->base))[writ] = '\n';
+                            rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ + 1);
+                        }
+                    }
+                }
+                if( rc == 0 && (rc = SRASplitter_FileActivate(cself, "_intensity.ScaledTXR.fasta")) == 0 ) {
+                    IF_BUF((AbsolidReaderSignalTXR(self->reader, readId, self->b->base, KDataBufferBytes(self->b) - 1, &writ)), self->b, writ) {
+                        if( writ > 0 && (rc = SRASplitter_FileWrite(cself, 0, self->hb->base, head_sz)) == 0 ) {
+                            ((char*)(self->b->base))[writ] = '\n';
+                            rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ + 1);
+                        }
+                    }
+                }
+                if( rc == 0 && (rc = SRASplitter_FileActivate(cself, "_intensity.ScaledCY5.fasta")) == 0 ) {
+                    IF_BUF((AbsolidReaderSignalCY5(self->reader, readId, self->b->base, KDataBufferBytes(self->b) - 1, &writ)), self->b, writ) {
+                        if( writ > 0 && (rc = SRASplitter_FileWrite(cself, 0, self->hb->base, head_sz)) == 0 ) {
+                            ((char*)(self->b->base))[writ] = '\n';
+                            rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ + 1);
+                        }
+                    }
+                }
+            }
+        } else if( GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound ) {
+            SRA_DUMP_DBG (3, ("%s skipped %u row\n", __func__, spot));
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+typedef struct AbsolidFormatterFactory_struct {
+    const char* accession;
+    const SRATable* table;
+    bool orig;
+    bool clip;
+    const AbsolidReader* reader;
+    KDataBuffer hbuf;
+    KDataBuffer buf;
+} AbsolidFormatterFactory;
+
+static
+rc_t AbsolidFormatterFactory_Init(const SRASplitterFactory* cself)
+{
+    rc_t rc = 0;
+    AbsolidFormatterFactory* self = (AbsolidFormatterFactory*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcType, rcConstructing, rcParam, rcNull);
+    } else if( (rc = KDataBufferMakeBytes(&self->hbuf, DATABUFFERINITSIZE)) == 0 &&
+               (rc = KDataBufferMakeBytes(&self->buf, DATABUFFERINITSIZE)) == 0 ) {
+        rc = AbsolidReaderMake(&self->reader, self->table, self->accession,
+                               self->orig, !self->clip, 0, 0, 0, true);
+    }
+    return rc;
+}
+
+static
+rc_t AbsolidFormatterFactory_NewObj(const SRASplitterFactory* cself, const SRASplitter** splitter)
+{
+    rc_t rc = 0;
+    AbsolidFormatterFactory* self = (AbsolidFormatterFactory*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcType, rcExecuting, rcParam, rcNull);
+    } else {
+        if( (rc = SRASplitter_Make(splitter, sizeof(AbsolidFormatterSplitter), NULL, NULL, AbsolidFormatterSplitter_Dump, NULL)) == 0 ) {
+            ((AbsolidFormatterSplitter*)(*splitter))->reader = self->reader;
+            ((AbsolidFormatterSplitter*)(*splitter))->pfx[0] = '\0';
+            ((AbsolidFormatterSplitter*)(*splitter))->pfx_sz = 0;
+            ((AbsolidFormatterSplitter*)(*splitter))->hb = &self->hbuf;
+            ((AbsolidFormatterSplitter*)(*splitter))->b = &self->buf;
+
+        }
+    }
+    return rc;
+}
+
+static
+void AbsolidFormatterFactory_Release(const SRASplitterFactory* cself)
+{
+    if( cself != NULL ) {
+        AbsolidFormatterFactory* self = (AbsolidFormatterFactory*)cself;
+        KDataBufferWhack(&self->hbuf);
+        KDataBufferWhack(&self->buf);
+        AbsolidReaderWhack(self->reader);
+    }
+}
+
+static
+rc_t AbsolidFormatterFactory_Make(const SRASplitterFactory** cself, const char* accession, const SRATable* table, bool orig, bool clip)
+{
+    rc_t rc = 0;
+    AbsolidFormatterFactory* obj = NULL;
+
+    if( cself == NULL || accession == NULL || table == NULL ) {
+        rc = RC(rcSRA, rcType, rcConstructing, rcParam, rcNull);
+    } else if( (rc = SRASplitterFactory_Make(cself, eSplitterFormat, sizeof(*obj),
+                                             AbsolidFormatterFactory_Init,
+                                             AbsolidFormatterFactory_NewObj,
+                                             AbsolidFormatterFactory_Release)) == 0 ) {
+        obj = (AbsolidFormatterFactory*)*cself;
+        obj->accession = accession;
+        obj->table = table;
+        obj->orig = orig;
+        obj->clip = clip;
+    }
+    return rc;
+}
+
+/* ### External entry points ##################################################### */
+const char UsageDefaultName[] = "abi-dump";
+rc_t CC UsageSummary (const char * progname)
+{
+    return 0;
+}
+
+struct AbsolidArgs_struct {
+    bool is_platform_cs_native;
+
+    uint32_t minReadLen;
+    bool applyClip;
+    bool dumpOrigFmt;
+    bool qual_filter;
+} AbsolidArgs;
+
+rc_t AbsolidDumper_Release(const SRADumperFmt* fmt)
+{
+    if( fmt == NULL ) {
+        return RC(rcExe, rcFormatter, rcDestroying, rcParam, rcInvalid);
+    }
+    return 0;
+}
+
+bool AbsolidDumper_AddArg(const SRADumperFmt* fmt, GetArg* f, int* i, int argc, char *argv[])
+{
+    const char* arg = NULL;
+
+    if( fmt == NULL || f == NULL || i == NULL || argv == NULL ) {
+        LOGERR(klogErr, RC(rcExe, rcArgv, rcReading, rcParam, rcInvalid), "null param");
+        return false;
+    } else if( f(fmt, "M", "minReadLen", i, argc, argv, &arg) ) {
+        AbsolidArgs.minReadLen = AsciiToU32(arg, NULL, NULL);
+    } else if( f(fmt, "W", "noclip", i, argc, argv, NULL) ) {
+        AbsolidArgs.applyClip = false;
+    } else if( f(fmt, "F", "origfmt", i, argc, argv, NULL) ) {
+        AbsolidArgs.dumpOrigFmt = true;
+    } else if( f(fmt, "B", "noDotReads", i, argc, argv, NULL) ) {
+        AbsolidArgs.qual_filter = true;
+    } else {
+        return false;
+    }
+    return true;
+}
+
+rc_t AbsolidDumper_Factories(const SRADumperFmt* fmt, const SRASplitterFactory** factory)
+{
+    rc_t rc = 0;
+    const SRASplitterFactory* parent = NULL, *child = NULL;
+
+    if( fmt == NULL || factory == NULL ) {
+        return RC(rcExe, rcFormatter, rcReading, rcParam, rcInvalid);
+    }
+    *factory = NULL;
+
+    {
+        const SRAColumn* c = NULL;
+        if( (rc = SRATableOpenColumnRead(fmt->table, &c, "PLATFORM", sra_platform_id_t)) == 0 ) {
+            const INSDC_SRA_platform_id* platform;
+            bitsz_t o, z;
+            if( (rc = SRAColumnRead(c, 1, (const void **)&platform, &o, &z)) == 0 ) {
+                if( *platform == SRA_PLATFORM_ABSOLID ) {
+                    AbsolidArgs.is_platform_cs_native = true;
+                }
+            }
+            SRAColumnRelease(c);
+        } else if( GetRCState(rc) == rcNotFound && GetRCObject(rc) == ( enum RCObject )rcColumn ) {
+            rc = 0;
+        }
+    }
+
+    if( rc == 0 ) {
+        if( (rc = Absolid2BioFilterFactory_Make(&child, fmt->accession, fmt->table)) == 0 ) {
+            if( parent != NULL ) {
+                if( (rc = SRASplitterFactory_AddNext(parent, child)) != 0 ) {
+                    SRASplitterFactory_Release(child);
+                } else {
+                    parent = child;
+                }
+            } else {
+                parent = child;
+                *factory = parent;
+            }
+        }
+    }
+    if( rc == 0 ) {
+        if( (rc = AbsolidLabelerFilterFactory_Make(&child, fmt->accession, fmt->table, AbsolidArgs.is_platform_cs_native)) == 0 ) {
+            if( parent != NULL ) {
+                if( (rc = SRASplitterFactory_AddNext(parent, child)) != 0 ) {
+                    SRASplitterFactory_Release(child);
+                } else {
+                    parent = child;
+                }
+            } else {
+                parent = child;
+                *factory = parent;
+            }
+        }
+    }
+    if( rc == 0 && AbsolidArgs.minReadLen > 0 ) {
+        if( (rc = AbsolidReadLenFilterFactory_Make(&child, fmt->accession, fmt->table,
+                                                   AbsolidArgs.applyClip, AbsolidArgs.minReadLen)) == 0 ) {
+            if( parent != NULL ) {
+                if( (rc = SRASplitterFactory_AddNext(parent, child)) != 0 ) {
+                    SRASplitterFactory_Release(child);
+                } else {
+                    parent = child;
+                }
+            } else {
+                parent = child;
+                *factory = parent;
+            }
+        }
+    }
+    if( rc == 0 && AbsolidArgs.qual_filter ) {
+        if( (rc = AbsolidQFilterFactory_Make(&child, fmt->accession, fmt->table, AbsolidArgs.applyClip)) == 0 ) {
+            if( parent != NULL ) {
+                if( (rc = SRASplitterFactory_AddNext(parent, child)) != 0 ) {
+                    SRASplitterFactory_Release(child);
+                } else {
+                    parent = child;
+                }
+            } else {
+                parent = child;
+                *factory = parent;
+            }
+        }
+    }
+    if( rc == 0 ) {
+        if( (rc = AbsolidFormatterFactory_Make(&child, fmt->accession, fmt->table,
+                                               AbsolidArgs.dumpOrigFmt, AbsolidArgs.applyClip)) == 0 ) {
+            if( parent != NULL ) {
+                if( (rc = SRASplitterFactory_AddNext(parent, child)) != 0 ) {
+                    SRASplitterFactory_Release(child);
+                }
+            } else {
+                *factory = child;
+            }
+        }
+    }
+    return rc;
+}
+
+/* main entry point of the file */
+rc_t SRADumper_Init(SRADumperFmt* fmt)
+{
+    static const SRADumperFmt_Arg arg[] =
+        {
+            {"M", "minReadLen", "len", {"Minimum read length to output, default is 25", NULL}},
+            {"W", "noclip", NULL, {"Do not clip quality left and right for spot", NULL}},
+            {"F", "origfmt", NULL, {"Excludes SRR accession on defline", NULL}},
+            {"B", "noDotReads", NULL, {"Do not output reads consisting mostly of dots", NULL}},
+            {NULL, NULL, NULL, {NULL}}
+        };
+    AbsolidArgs.is_platform_cs_native = false;
+    AbsolidArgs.minReadLen = 25;
+    AbsolidArgs.applyClip = true;
+    AbsolidArgs.dumpOrigFmt = false;
+    AbsolidArgs.qual_filter = false;
+
+    if( fmt == NULL ) {
+        return RC(rcExe, rcFileFormat, rcConstructing, rcParam, rcNull);
+    }
+    fmt->release = AbsolidDumper_Release;
+    fmt->arg_desc = arg;
+    fmt->add_arg = AbsolidDumper_AddArg;
+    fmt->get_factory = AbsolidDumper_Factories;
+    fmt->gzip = true;
+    fmt->bzip2 = true;
+
+    return 0;
+}
diff --git a/tools/sra-dump/core.c b/tools/sra-dump/core.c
new file mode 100644
index 0000000..d955a92
--- /dev/null
+++ b/tools/sra-dump/core.c
@@ -0,0 +1,1717 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <vdb/table.h> /* VTableRelease */
+#include <kfg/config.h> /* KConfigDisableUserSettings */
+
+#include <vdb/manager.h> /* VDBManagerRelease */
+#include <vdb/vdb-priv.h> /* VDBManagerDisablePagemapThread() */
+#include <kdb/manager.h> /* for different path-types */
+#include <vdb/dependencies.h> /* UIError */
+#include <vdb/report.h>
+#include <vdb/database.h>
+
+#include <klib/container.h>
+#include <klib/log.h>
+#include <klib/report.h> /* ReportInit */
+#include <klib/out.h>
+#include <klib/status.h>
+#include <klib/text.h>
+
+#include <kapp/main.h>
+#include <kfs/directory.h>
+#include <sra/sradb-priv.h>
+#include <sra/types.h>
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include "debug.h"
+#include "core.h"
+#include "fasta_dump.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+/* ### checks to see if NREADS <= nreads_max defined in factory.h ##################################################### */
+
+typedef struct MaxNReadsValidator_struct
+{
+    const SRAColumn* col;
+    uint64_t rejected_spots;
+} MaxNReadsValidator;
+
+
+static rc_t MaxNReadsValidator_GetKey( const SRASplitter* cself, 
+    const char** key, spotid_t spot, readmask_t* readmask )
+{
+    rc_t rc = 0;
+    MaxNReadsValidator* self = ( MaxNReadsValidator* )cself;
+
+    if ( self == NULL || key == NULL )
+    {
+        rc = RC( rcSRA, rcNode, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        const void* nreads = NULL;
+        bitsz_t o = 0, sz = 0;
+        uint64_t nn = 0;
+
+        *key = "";
+        if ( self->col != NULL )
+        {
+            rc = SRAColumnRead( self->col, spot, &nreads, &o, &sz );
+            if ( rc == 0 )
+            {
+                switch( sz )
+                {
+                    case 8:
+                        nn = *((const uint8_t*)nreads);
+                        break;
+                    case 16:
+                        nn = *((const uint16_t*)nreads);
+                        break;
+                    case 32:
+                        nn = *((const uint32_t*)nreads);
+                        break;
+                    case 64:
+                        nn = *((const uint64_t*)nreads);
+                        break;
+                    default:
+                        rc = RC( rcSRA, rcNode, rcExecuting, rcData, rcUnexpected );
+                        break;
+                }
+                if ( nn > nreads_max )
+                {
+                    clear_readmask( readmask );
+                    self->rejected_spots ++;
+                    PLOGMSG(klogWarn, (klogWarn, "too many reads $(nreads) at spot id $(row), maximum $(max) supported, skipped",
+                                       PLOG_3(PLOG_U64(nreads),PLOG_I64(row),PLOG_U32(max)), nn, spot, nreads_max));
+                }
+                else if ( nn == nreads_max - 1 )
+                {
+                    PLOGMSG(klogWarn, (klogWarn, "too many reads $(nreads) at spot id $(row), truncated to $(max)",
+                                       PLOG_3(PLOG_U64(nreads),PLOG_I64(row),PLOG_U32(max)), nn + 1, spot, nreads_max));
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t MaxNReadsValidator_Release( const SRASplitter* cself )
+{
+    rc_t rc = 0;
+    MaxNReadsValidator* self = ( MaxNReadsValidator* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcNode, rcExecuting, rcParam, rcNull );
+    }
+    else if ( !g_legacy_report )
+    {
+        if ( self->rejected_spots > 0 )
+            rc = KOutMsg( "Rejected %lu SPOTS because of to many READS\n", self->rejected_spots );
+    }
+    return rc;
+}
+
+
+typedef struct MaxNReadsValidatorFactory_struct
+{
+    const SRATable* table;
+    const SRAColumn* col;
+} MaxNReadsValidatorFactory;
+
+
+static rc_t MaxNReadsValidatorFactory_Init( const SRASplitterFactory* cself )
+{
+    rc_t rc = 0;
+    MaxNReadsValidatorFactory* self = ( MaxNReadsValidatorFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRATableOpenColumnRead( self->table, &self->col, "NREADS", NULL );
+        if ( rc != 0 )
+        {
+            if ( GetRCState( rc ) == rcNotFound || GetRCState( rc ) == rcExists )
+            {
+                rc = 0;
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t MaxNReadsValidatorFactory_NewObj( const SRASplitterFactory* cself, const SRASplitter** splitter )
+{
+    rc_t rc = 0;
+    MaxNReadsValidatorFactory* self = ( MaxNReadsValidatorFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitter_Make( splitter, sizeof(MaxNReadsValidator),
+                               MaxNReadsValidator_GetKey, NULL, NULL, MaxNReadsValidator_Release );
+        if ( rc == 0 )
+        {
+            MaxNReadsValidator * filter = ( MaxNReadsValidator * )( * splitter );
+            filter->col = self->col;
+            filter->rejected_spots = 0;
+        }
+    }
+    return rc;
+}
+
+
+static void MaxNReadsValidatorFactory_Release( const SRASplitterFactory* cself )
+{
+    if ( cself != NULL )
+    {
+        MaxNReadsValidatorFactory* self = ( MaxNReadsValidatorFactory* )cself;
+        SRAColumnRelease( self->col );
+    }
+}
+
+
+static rc_t MaxNReadsValidatorFactory_Make( const SRASplitterFactory** cself, const SRATable* table )
+{
+    rc_t rc = 0;
+    MaxNReadsValidatorFactory* obj = NULL;
+
+    if( cself == NULL || table == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcAllocating, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitterFactory_Make( cself, eSplitterSpot, sizeof( *obj ),
+                                     MaxNReadsValidatorFactory_Init,
+                                     MaxNReadsValidatorFactory_NewObj,
+                                     MaxNReadsValidatorFactory_Release);
+        if ( rc == 0 )
+        {
+            obj = ( MaxNReadsValidatorFactory* )*cself;
+            obj->table = table;
+        }
+    }
+    return rc;
+}
+
+/* ### READ_FILTER splitter/filter ##################################################### */
+
+enum EReadFilterSplitter_names
+{
+    EReadFilterSplitter_pass = 0,
+    EReadFilterSplitter_reject,
+    EReadFilterSplitter_criteria,
+    EReadFilterSplitter_redacted,
+    EReadFilterSplitter_unknown,
+    EReadFilterSplitter_max
+};
+
+
+typedef struct ReadFilterSplitter_struct
+{
+    const SRAColumn* col_rdf;
+    SRAReadFilter read_filter;
+    SRASplitter_Keys keys[5];
+} ReadFilterSplitter;
+
+
+static rc_t ReadFilterSplitter_GetKeySet( const SRASplitter* cself,
+        const SRASplitter_Keys** key, uint32_t* keys, spotid_t spot, const readmask_t* readmask )
+{
+    rc_t rc = 0;
+    ReadFilterSplitter* self = ( ReadFilterSplitter* )cself;
+
+    if ( self == NULL || key == NULL )
+    {
+        rc = RC( rcSRA, rcNode, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        const INSDC_SRA_read_filter* rdf;
+        bitsz_t o = 0, sz = 0;
+
+        *keys = 0;
+        if ( self->col_rdf != NULL )
+        {
+            rc = SRAColumnRead( self->col_rdf, spot, (const void **)&rdf, &o, &sz );
+            if ( rc == 0 && sz > 0 )
+            {
+                int32_t j, i = sz / sizeof( INSDC_SRA_read_filter ) / 8;
+                *key = self->keys;
+                *keys = sizeof( self->keys ) / sizeof( self->keys[ 0 ] );
+                for ( j = 0; j < *keys; j++ )
+                {
+                    clear_readmask( self->keys[ j ].readmask );
+                }
+                while ( i > 0 )
+                {
+                    i--;
+                    if ( self->read_filter != 0xFF && self->read_filter != rdf[i] )
+                    {
+                        /* skip by filter value != to command line */
+                    }
+                    else if ( rdf[ i ] == SRA_READ_FILTER_PASS )
+                    {
+                        set_readmask( self->keys[ EReadFilterSplitter_pass ].readmask, i );
+                    }
+                    else if ( rdf[ i ] == SRA_READ_FILTER_REJECT )
+                    {
+                        set_readmask( self->keys[ EReadFilterSplitter_reject ].readmask, i );
+                    }
+                    else if( rdf[ i ] == SRA_READ_FILTER_CRITERIA )
+                    {
+                        set_readmask( self->keys[ EReadFilterSplitter_criteria ].readmask, i );
+                    }
+                    else if( rdf[ i ] == SRA_READ_FILTER_REDACTED )
+                    {
+                        set_readmask( self->keys[ EReadFilterSplitter_redacted ].readmask, i );
+                    }
+                    else
+                    {
+                        set_readmask( self->keys[ EReadFilterSplitter_unknown ].readmask, i );
+                        PLOGMSG( klogWarn, ( klogWarn,
+                                 "unknown READ_FILTER value $(value) at spot id $(row)",
+                                 PLOG_2( PLOG_U8( value ), PLOG_I64( row ) ), rdf[ i ], spot ) );
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+typedef struct ReadFilterSplitterFactory_struct
+{
+    const SRATable* table;
+    const SRAColumn* col_rdf;
+    SRAReadFilter read_filter;
+} ReadFilterSplitterFactory;
+
+
+static rc_t ReadFilterSplitterFactory_Init( const SRASplitterFactory* cself )
+{
+    rc_t rc = 0;
+    ReadFilterSplitterFactory* self = ( ReadFilterSplitterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRATableOpenColumnRead( self->table, &self->col_rdf, "READ_FILTER", sra_read_filter_t );
+        if ( rc != 0 )
+        {
+            if ( GetRCState( rc ) == rcNotFound )
+            {
+                LOGMSG( klogWarn, "Column READ_FILTER was not found, param ignored" );
+                rc = 0;
+            }
+            else if ( GetRCState( rc ) == rcExists )
+            {
+                rc = 0;
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t ReadFilterSplitterFactory_NewObj( const SRASplitterFactory* cself, const SRASplitter** splitter )
+{
+    rc_t rc = 0;
+    ReadFilterSplitterFactory* self = ( ReadFilterSplitterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitter_Make( splitter, sizeof(ReadFilterSplitter), NULL,
+                               ReadFilterSplitter_GetKeySet, NULL, NULL );
+        if ( rc == 0 )
+        {
+            ( (ReadFilterSplitter*)(*splitter) )->col_rdf = self->col_rdf;
+            ( (ReadFilterSplitter*)(*splitter) )->read_filter = self->read_filter;
+            ( (ReadFilterSplitter*)(*splitter) )->keys[ EReadFilterSplitter_pass ].key = "pass";
+            ( (ReadFilterSplitter*)(*splitter) )->keys[ EReadFilterSplitter_reject ].key = "reject";
+            ( (ReadFilterSplitter*)(*splitter) )->keys[ EReadFilterSplitter_criteria ].key = "criteria";
+            ( (ReadFilterSplitter*)(*splitter) )->keys[ EReadFilterSplitter_redacted ].key = "redacted";
+            ( (ReadFilterSplitter*)(*splitter) )->keys[ EReadFilterSplitter_unknown ].key = "unknown";
+        }
+    }
+    return rc;
+}
+
+
+static void ReadFilterSplitterFactory_Release( const SRASplitterFactory* cself )
+{
+    if ( cself != NULL )
+    {
+        ReadFilterSplitterFactory* self = ( ReadFilterSplitterFactory* )cself;
+        SRAColumnRelease( self->col_rdf );
+    }
+}
+
+
+static rc_t ReadFilterSplitterFactory_Make( const SRASplitterFactory** cself,
+            const SRATable* table, SRAReadFilter read_filter )
+{
+    rc_t rc = 0;
+    ReadFilterSplitterFactory* obj = NULL;
+
+    if ( cself == NULL || table == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcAllocating, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitterFactory_Make( cself, eSplitterRead, sizeof( *obj ),
+                                        ReadFilterSplitterFactory_Init,
+                                        ReadFilterSplitterFactory_NewObj,
+                                        ReadFilterSplitterFactory_Release );
+        if ( rc == 0 )
+        {
+            obj = ( ReadFilterSplitterFactory* ) *cself;
+            obj->table = table;
+            obj->read_filter = read_filter;
+        }
+    }
+    return rc;
+}
+
+
+/* ### SPOT_GROUP splitter/filter ##################################################### */
+
+typedef struct SpotGroupSplitter_struct
+{
+    char cur_key[ 256 ];
+    const SRAColumn* col;
+    char* const* spot_group;
+    uint64_t rejected_spots;
+    bool split;
+} SpotGroupSplitter;
+
+
+static rc_t SpotGroupSplitter_GetKey( const SRASplitter* cself,
+            const char** key, spotid_t spot, readmask_t* readmask )
+{
+    rc_t rc = 0;
+    SpotGroupSplitter* self = ( SpotGroupSplitter* )cself;
+
+    if ( self == NULL || key == NULL )
+    {
+        rc = RC( rcSRA, rcNode, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        *key = self->cur_key;
+        if ( self->col != NULL )
+        {
+            const char* g = NULL;
+            bitsz_t o = 0, sz = 0;
+            rc = SRAColumnRead( self->col, spot, (const void **)&g, &o, &sz );
+            if ( rc == 0 && sz > 0 )
+            {
+                sz /= 8;
+                /* truncate trailing \0 */
+                while ( sz > 0 && g[ sz - 1 ] == '\0' )
+                {
+                    sz--;
+                }
+                if ( sz > sizeof( self->cur_key ) - 1 )
+                {
+                    rc = RC( rcSRA, rcNode, rcExecuting, rcBuffer, rcInsufficient );
+                }
+                else
+                {
+                    int i;
+                    bool found = false;
+                    memcpy( self->cur_key, g, sz );
+                    self->cur_key[ sz ] = '\0';
+                    for ( i = 0; self->spot_group[ i ] != NULL; i++ )
+                    {
+                        if ( strcmp( self->cur_key, self->spot_group[ i ] ) == 0 )
+                        {
+                            found = true;
+                            break;
+                        }
+                    }
+                    if ( self->spot_group[ 0 ] != NULL && !found )
+                    {
+                        /* list not empty and not in list -> skip */
+                        self->rejected_spots ++;
+                        *key = NULL;
+                    }
+                    else if ( !self->split )
+                    {
+                        *key = "";
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t SpotGroupSplitter_Release( const SRASplitter* cself )
+{
+    rc_t rc = 0;
+    SpotGroupSplitter* self = ( SpotGroupSplitter* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcNode, rcExecuting, rcParam, rcNull );
+    }
+    else if ( !g_legacy_report )
+    {
+        if ( self->rejected_spots > 0 )
+            rc = KOutMsg( "Rejected %lu SPOTS because of spotgroup filtering\n", self->rejected_spots );
+    }
+    return rc;
+}
+
+typedef struct SpotGroupSplitterFactory_struct
+{
+    const SRATable* table;
+    const SRAColumn* col;
+    bool split;
+    char* const* spot_group;
+} SpotGroupSplitterFactory;
+
+
+static rc_t SpotGroupSplitterFactory_Init( const SRASplitterFactory* cself )
+{
+    rc_t rc = 0;
+    SpotGroupSplitterFactory* self = ( SpotGroupSplitterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRATableOpenColumnRead( self->table, &self->col, "SPOT_GROUP", vdb_ascii_t );
+        if ( rc != 0 )
+        {
+            if ( GetRCState( rc ) == rcNotFound )
+            {
+                LOGMSG(klogWarn, "Column SPOT_GROUP was not found, param ignored");
+                rc = 0;
+            }
+            else if ( GetRCState( rc ) == rcExists )
+            {
+                rc = 0;
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t SpotGroupSplitterFactory_NewObj( const SRASplitterFactory* cself, const SRASplitter** splitter )
+{
+    rc_t rc = 0;
+    SpotGroupSplitterFactory* self = ( SpotGroupSplitterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitter_Make( splitter, sizeof( SpotGroupSplitter ),
+                               SpotGroupSplitter_GetKey, NULL, NULL, SpotGroupSplitter_Release );
+        if ( rc == 0 )
+        {
+            SpotGroupSplitter * filter = ( SpotGroupSplitter * )( * splitter );
+            filter->col = self->col;
+            filter->split = self->split;
+            filter->spot_group = self->spot_group;
+            filter->rejected_spots = 0;
+        }
+    }
+    return rc;
+}
+
+
+static void SpotGroupSplitterFactory_Release( const SRASplitterFactory* cself )
+{
+    if ( cself != NULL )
+    {
+        SpotGroupSplitterFactory* self = ( SpotGroupSplitterFactory* )cself;
+        SRAColumnRelease( self->col );
+    }
+}
+
+
+static rc_t SpotGroupSplitterFactory_Make( const SRASplitterFactory** cself,
+            const SRATable* table, bool split, char* const spot_group[] )
+{
+    rc_t rc = 0;
+    SpotGroupSplitterFactory* obj = NULL;
+
+    if ( cself == NULL || table == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcAllocating, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitterFactory_Make( cself, eSplitterSpot, sizeof( *obj ),
+                                             SpotGroupSplitterFactory_Init,
+                                             SpotGroupSplitterFactory_NewObj,
+                                             SpotGroupSplitterFactory_Release );
+        if ( rc == 0 )
+        {
+            obj = ( SpotGroupSplitterFactory* ) *cself;
+            obj->table = table;
+            obj->split = split;
+            obj->spot_group = spot_group;
+        }
+    }
+    return rc;
+}
+
+/* ### Common dumper code ##################################################### */
+
+
+static rc_t SRADumper_DumpRun( const SRATable* table,
+        spotid_t minSpotId, spotid_t maxSpotId, const SRASplitterFactory* factories, uint64_t * num_spots )
+{
+    rc_t rc = 0, rcr = 0;
+    spotid_t spot = 0;
+
+    /* !!! make_readmask is a MACRO defined in factory.h !!! */
+    make_readmask( readmask );
+    const SRASplitter* root_splitter = NULL;
+
+    if ( num_spots != NULL ) *num_spots = 0;
+
+    rc = SRASplitterFactory_NewObj( factories, &root_splitter );
+
+    for ( spot = minSpotId; rc == 0 && spot <= maxSpotId; spot++ )
+    {
+        reset_readmask( readmask );
+        /* SRASplitter_AddSpot() defined in factory.c */
+        rc = SRASplitter_AddSpot( root_splitter, spot, readmask );
+        if ( rc == 0 )
+        {
+            if ( num_spots != NULL ) (*num_spots)++;
+            rc = Quitting();
+        }
+        else
+        {
+            if ( ( GetRCModule( rc ) == rcXF ) &&
+                 ( GetRCTarget( rc ) == rcFunction ) &&
+                 ( GetRCContext( rc ) == rcExecuting ) &&
+                 ( GetRCObject( rc ) == ( enum RCObject )rcData ) &&
+                 ( GetRCState( rc ) == rcInconsistent ) )
+            {
+                rc = 0;
+            }
+        }
+    }
+    rcr = SRASplitter_Release( root_splitter );
+
+    return rc ? rc : rcr;
+}
+
+
+static const SRADumperFmt_Arg KMainArgs[] =
+{
+    { NULL, "no-user-settings",  NULL,         { "Internal Only", NULL } },
+    { "A",   "accession",        "accession",   { "Replaces accession derived from <path> in filename(s) and deflines (only for single table dump)", NULL } },
+    { "O",   "outdir",           "path",        { "Output directory, default is working directory ( '.' )", NULL } },
+    { "Z",   "stdout",           NULL,          { "Output to stdout, all split data become joined into single stream", NULL } },
+    { NULL, "gzip",              NULL,         { "Compress output using gzip", NULL } },
+    { NULL, "bzip2",             NULL,         { "Compress output using bzip2", NULL } },
+    { "N",   "minSpotId",        "rowid",       { "Minimum spot id", NULL } },
+    { "X",   "maxSpotId",        "rowid",       { "Maximum spot id", NULL } },
+    { "G",   "spot-group",       NULL,          { "Split into files by SPOT_GROUP (member name)", NULL } },
+    { NULL, "spot-groups",       "[list]",      { "Filter by SPOT_GROUP (member): name[,...]", NULL } },
+    { "R",   "read-filter",      "[filter]",    { "Split into files by READ_FILTER value",
+                                                  "optionally filter by a value: pass|reject|criteria|redacted", NULL } },
+    { "T",   "group-in-dirs",    NULL,          { "Split into subdirectories instead of files", NULL } },
+    { "K",   "keep-empty-files", NULL,          { "Do not delete empty files", NULL } },
+    { NULL, "table",            "table-name",   { "Table name within cSRA object, default is \"SEQUENCE\"", NULL } },
+
+    { NULL, "disable-multithreading", NULL,     { "disable multithreading", NULL } },
+
+    { "h",   "help",             NULL,          { "Output a brief explanation of program usage", NULL } },
+    { "V",   "version",          NULL,          { "Display the version of the program", NULL } },
+
+    { "L",   "log-level",       "level",        { "Logging level as number or enum string",
+                                                  "One of (fatal|sys|int|err|warn|info) or (0-5)",
+                                                  "Current/default is warn", NULL } },
+    { "v",   "verbose",         NULL,           { "Increase the verbosity level of the program",
+                                                   "Use multiple times for more verbosity", NULL } },
+    { NULL, OPTION_REPORT,     NULL,           { "Control program execution environment report generation (if implemented).",
+                                                   "One of (never|error|always). Default is error", NULL } },
+#if _DEBUGGING
+    { "+",   "debug",           "Module[-Flag]",{ "Turn on debug output for module",
+                                                   "All flags if not specified", NULL } },
+#endif
+
+    { NULL, "legacy-report",    NULL,           { "use legacy style 'Written N spots' for tool" } },
+    { NULL, NULL,              NULL,           { NULL } } /* terminator */
+};
+
+
+rc_t CC Usage ( const Args * args )
+{
+    return fasta_dump_usage ( args );
+}
+
+
+void CC SRADumper_PrintArg( const SRADumperFmt_Arg* arg )
+{
+    /* ??? */
+}
+
+
+static void CoreUsage( const char* prog, const SRADumperFmt* fmt, bool brief, int exit_status )
+{
+    OUTMSG(( "\n"
+             "Usage:\n"
+             "  %s [options] <path> [<path>...]\n"
+             "  %s [options] <accession>\n"
+             "\n", prog, prog));
+
+    if ( !brief )
+    {
+        if ( fmt->usage )
+        {
+            rc_t rc = fmt->usage( fmt, KMainArgs, 1 );
+            if ( rc != 0 )
+            {
+                LOGERR(klogErr, rc, "Usage print failed");
+            }
+        }
+        else
+        {
+            int k, i;
+            const SRADumperFmt_Arg* d[ 2 ] = { KMainArgs, NULL };
+
+            d[ 1 ] = fmt->arg_desc;
+            for ( k = 0; k < ( sizeof( d ) / sizeof( d[0] ) ); k++ )
+            {
+                for ( i = 1;
+                      d[k] != NULL && ( d[ k ][ i ].abbr != NULL || d[ k ][ i ].full != NULL );
+                      ++ i )
+                {
+                    if ( ( !fmt->gzip && strcmp( d[ k ][ i ].full, "gzip" ) == 0 ) ||
+                         ( !fmt->bzip2 && strcmp (d[ k ][ i ].full, "bzip2" ) == 0 ) )
+                    {
+                        continue;
+                    }
+                    if ( k > 0 && i == 0 )
+                    {
+                        OUTMSG(("\nFormat options:\n\n"));
+                    }
+                    HelpOptionLine( d[ k ][ i ].abbr, d[ k ][ i ].full,
+                                    d[ k ][ i ].param, (const char**)( d[ k ][ i ].descr ) );
+                    if ( k == 0 && i == 0 )
+                    {
+                        OUTMSG(( "\nOptions:\n\n" ));
+                    }
+                }
+            }
+        }
+    }
+    else
+    {
+        OUTMSG(( "Use option --help for more information\n" ));
+    }
+    HelpVersion( prog, KAppVersion() );
+    exit( exit_status );
+}
+
+
+static rc_t SRADumper_ArgsValidate( const char* prog, const SRADumperFmt* fmt )
+{
+    rc_t rc = 0;
+    int k, i;
+
+    /* set default log level */
+    const char* default_log_level = "warn";
+    rc = LogLevelSet( default_log_level );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc, "default log level to '$(lvl)'",
+                            PLOG_S( lvl ), default_log_level ) );
+        CoreUsage( prog, fmt, true, EXIT_FAILURE );
+    }
+    for ( i = 0; KMainArgs[ i ].abbr != NULL; i++ )
+    {
+        for ( k = 0; fmt->arg_desc != NULL && fmt->arg_desc[ k ].abbr != NULL; k++ )
+        {
+            if ( strcmp( fmt->arg_desc[ k ].abbr, KMainArgs[ i ].abbr ) == 0 ||
+                 ( fmt->arg_desc[ k ].full != NULL && strcmp( fmt->arg_desc[ k ].full, KMainArgs[ i ].full ) == 0 ) )
+            {
+                rc = RC(rcExe, rcArgv, rcValidating, rcParam, rcDuplicate);
+            }
+        }
+    }
+    return rc;
+}
+
+
+bool CC SRADumper_GetArg( const SRADumperFmt* fmt, char const* const abbr, char const* const full,
+                          int* i, int argc, char *argv[], const char** value )
+{
+    rc_t rc = 0;
+    const char* arg = argv[*i];
+    while ( *arg == '-' && *arg != '\0')
+    {
+        arg++;
+    }
+    if ( abbr != NULL && strcmp(arg, abbr) == 0 )
+    {
+        SRA_DUMP_DBG( 9, ( "GetArg key: '%s'\n", arg ) );
+        arg = arg + strlen( abbr );
+        if ( value != NULL && arg[0] == '\0' && (*i + 1) < argc )
+        {
+            arg = NULL;
+            if ( argv[ *i + 1 ][ 0 ] != '-' )
+            {
+                /* advance only if next is not an option with '-' */
+                *i = *i + 1;
+                arg = argv[ *i ];
+            }
+        }
+        else
+        {
+            arg = NULL;
+        }
+    }
+    else if ( full != NULL && strcmp( arg, full ) == 0 )
+    {
+        SRA_DUMP_DBG( 9, ( "GetArg key: '%s'\n", arg ) );
+        arg = NULL;
+        if ( value != NULL && ( *i + 1 ) < argc )
+        {
+            if ( argv[ *i + 1 ][ 0 ] != '-' )
+            {
+                /* advance only if next is not an option with '-' */
+                *i = *i + 1;
+                arg = argv[ *i ];
+            }
+        }
+    }
+    else
+    {
+        return false;
+    }
+
+    SRA_DUMP_DBG( 9, ( "GetArg val: '%s'\n", arg ) );
+    if ( value == NULL && arg != NULL )
+    {
+        rc = RC( rcApp, rcArgv, rcAccessing, rcParam, rcUnexpected );
+    }
+    else if ( value != NULL )
+    {
+        if ( arg == NULL && *value == '\0' )
+        {
+            rc = RC( rcApp, rcArgv, rcAccessing, rcParam, rcNotFound );
+        }
+        else if ( arg != NULL && arg[0] != '\0' )
+        {
+            *value = arg;
+        }
+    }
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc, "$(a0)$(a1)$(a2)$(f0)$(f1): $(v)",
+            PLOG_3(PLOG_S(a0),PLOG_S(a1),PLOG_S(a2))","PLOG_3(PLOG_S(f0),PLOG_S(f1),PLOG_S(v)),
+            abbr ? "-": "", abbr ? abbr : "", abbr ? ", " : "", full ? "--" : "", full ? full : "", arg));
+        CoreUsage( argv[ 0 ], fmt, true, EXIT_FAILURE );
+    }
+    return rc == 0 ? true : false;
+}
+
+
+static bool reportToUserSffFromNot454Run(rc_t rc, char* argv0, bool silent) {
+    assert( argv0 );
+    if ( rc == SILENT_RC( rcSRA, rcFormatter, rcConstructing,
+        rcData, rcUnsupported ) )
+    {
+        const char* name = strpbrk( argv0, "/\\" );
+        const char* last_name = name;
+        if ( last_name )
+        {
+        ++last_name;
+        }
+        while ( name )
+        {
+            name = strpbrk( last_name, "/\\" );
+            if ( name )
+            {
+                last_name = name;
+                if ( last_name )
+                {
+                    ++last_name;
+                }
+            }
+        }
+        name = last_name ? last_name : argv0;
+        if ( strcmp( "sff-dump", name ) == 0 )
+        {
+            if (!silent) {
+              OUTMSG((
+               "This run cannot be transformed into SFF format.\n"
+               "Conversion cannot be completed because the source lacks\n"
+               "one or more of the data series required by the SFF format.\n"
+               "You should be able to dump it as FASTQ by running fastq-dump.\n"
+               "\n"));
+            }
+            return true;
+        }
+    }
+    return false;
+}
+
+
+static int str_cmp( const char *a, const char *b )
+{
+    size_t asize = string_size ( a );
+    size_t bsize = string_size ( b );
+    return strcase_cmp ( a, asize, b, bsize, ( asize > bsize ) ? asize : bsize );
+}
+
+static bool database_contains_table_name( const VDBManager * vmgr, const char * acc_or_path, const char * tablename )
+{
+    bool res = false;
+    if ( ( vmgr != NULL ) && ( acc_or_path != NULL ) && ( tablename != NULL ) )
+    {
+        const VDatabase * db;
+        rc_t rc = VDBManagerOpenDBRead( vmgr, &db, NULL, "%s", acc_or_path );
+        if ( rc == 0 )
+        {
+            KNamelist * tbl_names;
+            rc = VDatabaseListTbl( db, &tbl_names );
+            if ( rc == 0 )
+            {
+                uint32_t count;
+                rc = KNamelistCount( tbl_names, &count );
+                if ( rc == 0 && count > 0 )
+                {
+                    uint32_t idx;
+                    for ( idx = 0; idx < count && rc == 0 && !res; ++idx )
+                    {
+                        const char *tbl_name;
+                        rc = KNamelistGet( tbl_names, idx, &tbl_name );
+                        if ( rc == 0 )
+                        {
+                            res = ( str_cmp( tbl_name, tablename ) == 0 );
+                        }
+                    }
+                }
+                KNamelistRelease( tbl_names );
+            }
+            VDatabaseRelease( db );
+        }
+    }
+    return res;
+}
+
+
+static const char * consensus_table_name = "CONSENSUS";
+
+/*******************************************************************************
+ * KMain - defined for use with kapp library
+ *******************************************************************************/
+rc_t CC KMain ( int argc, char* argv[] )
+{
+    rc_t rc = 0;
+    int i;
+    const char* arg;
+    uint64_t total_spots_read = 0;
+    uint64_t total_spots_written = 0;
+
+    const VDBManager* vmgr = NULL;
+    const SRAMgr* sraMGR = NULL;
+    SRADumperFmt fmt;
+
+    bool to_stdout = false, do_gzip = false, do_bzip2 = false;
+    char const* outdir = NULL;
+    spotid_t minSpotId = 1;
+    spotid_t maxSpotId = 0x7FFFFFFFFFFFFFFF; /* 9,223,372,036,854,775,807 max int64_t value !!! ~0 is wrong !!! */
+    bool sub_dir = false;
+    bool keep_empty = false;
+    const char* table_path[10240];
+    int table_path_qty = 0;
+
+    char const* D_option = NULL;
+    char const* P_option = NULL;
+    char P_option_buffer[4096];
+    const char* accession = NULL;
+    const char* table_name = NULL;
+    
+    bool spot_group_on = false;
+    bool no_mt = false;
+    int spot_groups = 0;
+    char* spot_group[128] = {NULL};
+    bool read_filter_on = false;
+    SRAReadFilter read_filter = 0xFF;
+
+    /* for the fasta-ouput of fastq-dump: branch out completely of 'common' code */
+    if ( fasta_dump_requested( argc, argv ) )
+    {
+        return fasta_dump( argc, argv );
+    }
+
+    /* Prepare for the worst: report this information after disaster */
+    ReportBuildDate ( __DATE__ );
+
+    memset( &fmt, 0, sizeof( fmt ) );
+    rc = SRADumper_Init( &fmt );    /* !!!dirty dirty trick!!! function is defined in abi.c AND fastq.c AND illumina.c AND sff.c !!! */
+    if ( rc != 0 )
+    {
+        LOGERR(klogErr, rc, "formatter initialization");
+        return 100;
+    }
+    else if ( fmt.get_factory == NULL )
+    {
+        rc = RC( rcExe, rcFormatter, rcValidating, rcInterface, rcNull );
+        LOGERR( klogErr, rc, "formatter factory" );
+        return 101;
+    }
+    else
+    {
+        rc = SRADumper_ArgsValidate( argv[0], &fmt );   /* above in this file */
+        if ( rc != 0 )
+        {
+            LOGERR( klogErr, rc, "formatter args list" );
+            return 102;
+        }
+    }
+
+    if ( argc < 2 )
+    {
+        CoreUsage( argv[0], &fmt, true, EXIT_FAILURE ); /* above in this file */
+        return 0;
+    }
+
+    /* now looping through argv[], ignoring args-parsing via kapp!!! */
+    for ( i = 1; i < argc; i++ )
+    {
+        arg = argv[ i ];
+        if ( arg[ 0 ] != '-' )
+        {
+            uint32_t k;
+            for ( k = 0; k < table_path_qty; k++ )
+            {
+                if ( strcmp( arg, table_path[ k ] ) == 0 )
+                {
+                    break;
+                }
+            }
+            if ( k >= table_path_qty )
+            {
+                if ( ( table_path_qty + 1 ) >= ( sizeof( table_path ) / sizeof( table_path[ 0 ] ) ) )
+                {
+                    rc = RC( rcExe, rcArgv, rcReading, rcBuffer, rcInsufficient );
+                    goto Catch;
+                }
+                table_path[ table_path_qty++ ] = arg;
+            }
+            continue;
+        }
+        arg = NULL;
+        if ( SRADumper_GetArg( &fmt, "L", "log-level", &i, argc, argv, &arg ) )
+        {
+            rc = LogLevelSet( arg );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogErr, ( klogErr, rc, "log level $(lvl)", PLOG_S( lvl ), arg ) );
+                goto Catch;
+            }
+        }
+        else if ( SRADumper_GetArg( &fmt, NULL, "disable-multithreading", &i, argc, argv, NULL ) )
+        {
+            no_mt = true;
+        }
+        else if ( SRADumper_GetArg( &fmt, NULL, OPTION_REPORT, &i, argc, argv, &arg ) )
+        {
+        }
+        else if ( SRADumper_GetArg( &fmt, "+", "debug", &i, argc, argv, &arg ) )
+        {
+#if _DEBUGGING
+            rc = KDbgSetString( arg );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogErr, ( klogErr, rc, "debug level $(lvl)", PLOG_S( lvl ), arg ) );
+                goto Catch;
+            }
+#endif
+        }
+        else if ( SRADumper_GetArg( &fmt, "H", "help", &i, argc, argv, NULL ) ||
+                  SRADumper_GetArg( &fmt, "?", "h", &i, argc, argv, NULL ) )
+        {
+            CoreUsage( argv[ 0 ], &fmt, false, EXIT_SUCCESS );
+
+        }
+        else if ( SRADumper_GetArg( &fmt, "V", "version", &i, argc, argv, NULL ) )
+        {
+            HelpVersion ( argv[ 0 ], KAppVersion() );
+            return 0;
+        }
+        else if ( SRADumper_GetArg( &fmt, "v", NULL, &i, argc, argv, NULL ) )
+        {
+            KStsLevelAdjust( 1 );
+
+        }
+        else if ( SRADumper_GetArg( &fmt, "D", "table-path", &i, argc, argv, &D_option ) )
+        {
+            LOGMSG( klogErr, "option -D is deprecated, see --help" );
+        }
+        else if ( SRADumper_GetArg( &fmt, "P", "path", &i, argc, argv, &P_option ) )
+        {
+            LOGMSG( klogErr, "option -P is deprecated, see --help" );
+
+        }
+        else if ( SRADumper_GetArg( &fmt, "A", "accession", &i, argc, argv, &accession ) )
+        {
+        }
+        else if ( SRADumper_GetArg( &fmt, "O", "outdir", &i, argc, argv, &outdir ) )
+        {
+        }
+        else if ( SRADumper_GetArg( &fmt, "Z", "stdout", &i, argc, argv, NULL ) )
+        {
+            to_stdout = true;
+        }
+        else if ( fmt.gzip && SRADumper_GetArg( &fmt, NULL, "gzip", &i, argc, argv, NULL ) )
+        {
+            do_gzip = true;
+        }
+        else if ( fmt.bzip2 && SRADumper_GetArg( &fmt, NULL, "bzip2", &i, argc, argv, NULL ) )
+        {
+            do_bzip2 = true;
+        }
+        else if ( SRADumper_GetArg( &fmt, NULL, "table", &i, argc, argv, &table_name ) )
+        {
+        }
+        else if ( SRADumper_GetArg( &fmt, "N", "minSpotId", &i, argc, argv, &arg ) )
+        {
+            minSpotId = AsciiToU64( arg, NULL, NULL );
+        }
+        else if ( SRADumper_GetArg( &fmt, "X", "maxSpotId", &i, argc, argv, &arg ) )
+        {
+            maxSpotId = AsciiToU64( arg, NULL, NULL );
+        }
+        else if ( SRADumper_GetArg( &fmt, "G", "spot-group", &i, argc, argv, NULL ) )
+        {
+            spot_group_on = true;
+        }
+        else if ( SRADumper_GetArg( &fmt, NULL, "spot-groups", &i, argc, argv, NULL ) )
+        {
+            if ( i + 1 < argc && argv[ i + 1 ][ 0 ] != '-' )
+            {
+                int f = 0, t = 0;
+                i++;
+                while ( argv[ i ][ t ] != '\0' )
+                {
+                    if ( argv[ i ][ t ] == ',' )
+                    {
+                        if ( t - f > 0 )
+                        {
+                            spot_group[ spot_groups++ ] = string_dup( &argv[ i ][ f ], t - f );
+                        }
+                        f = t + 1;
+                    }
+                    t++;
+                }
+                if ( t - f > 0 )
+                {
+                    spot_group[ spot_groups++ ] = string_dup( &argv[ i ][ f ], t - f );
+                }
+                if ( spot_groups < 1 )
+                {
+                    rc = RC( rcApp, rcArgv, rcReading, rcParam, rcEmpty );
+                    PLOGERR( klogErr, ( klogErr, rc, "$(p)", PLOG_S( p ), argv[ i - 1 ] ) );
+                    CoreUsage( argv[ 0 ], &fmt, false, EXIT_FAILURE );
+                }
+                spot_group[ spot_groups ] = NULL;
+            }
+        }
+        else if ( SRADumper_GetArg( &fmt, "R", "read-filter", &i, argc, argv, NULL ) )
+        {
+            read_filter_on = true;
+            if ( i + 1 < argc && argv[ i + 1 ][ 0 ] != '-' )
+            {
+                i++;
+                if ( read_filter != 0xFF )
+                {
+                    rc = RC( rcApp, rcArgv, rcReading, rcParam, rcDuplicate );
+                    PLOGERR( klogErr, ( klogErr, rc, "$(p): $(o)",
+                             PLOG_2( PLOG_S( p ),PLOG_S( o ) ), argv[ i - 1 ], argv[ i ] ) );
+                    CoreUsage( argv[ 0 ], &fmt, false, EXIT_FAILURE );
+                }
+                if ( strcasecmp( argv[ i ], "pass" ) == 0 )
+                {
+                    read_filter = SRA_READ_FILTER_PASS;
+                }
+                else if ( strcasecmp( argv[ i ], "reject" ) == 0 )
+                {
+                    read_filter = SRA_READ_FILTER_REJECT;
+                }
+                else if ( strcasecmp( argv[ i ], "criteria" ) == 0 )
+                {
+                    read_filter = SRA_READ_FILTER_CRITERIA;
+                }
+                else if ( strcasecmp( argv[ i ], "redacted" ) == 0 )
+                {
+                    read_filter = SRA_READ_FILTER_REDACTED;
+                }
+                else
+                {
+                    /* must be accession */
+                    i--;
+                }
+            }
+        }
+        else if ( SRADumper_GetArg( &fmt, "T", "group-in-dirs", &i, argc, argv, NULL ) )
+        {
+            sub_dir = true;
+        }
+        else if ( SRADumper_GetArg( &fmt, "K", "keep-empty-files", &i, argc, argv, NULL ) )
+        {
+            keep_empty = true;
+        }
+        else if ( SRADumper_GetArg( &fmt, NULL, "no-user-settings", &i, argc, argv, NULL ) )
+        {
+             KConfigDisableUserSettings ();
+        }
+        else if ( SRADumper_GetArg( &fmt, NULL, "legacy-report", &i, argc, argv, NULL ) )
+        {
+             g_legacy_report = true;
+        }
+        else if ( fmt.add_arg && fmt.add_arg( &fmt, SRADumper_GetArg, &i, argc, argv ) )
+        {
+        }
+        else
+        {
+            rc = RC( rcApp, rcArgv, rcReading, rcParam, rcIncorrect );
+            PLOGERR( klogErr, ( klogErr, rc, "$(p)", PLOG_S( p ), argv[ i ] ) );
+            CoreUsage( argv[ 0 ], &fmt, false, EXIT_FAILURE );
+        }
+    }
+
+    if ( to_stdout )
+    {
+        if ( outdir != NULL || sub_dir || keep_empty ||
+            spot_group_on || ( read_filter_on && read_filter == 0xFF ) )
+        {
+            LOGMSG( klogWarn, "stdout mode is set, some options are ignored" );
+            spot_group_on = false;
+            if ( read_filter == 0xFF )
+            {
+                read_filter_on = false;
+            }
+        }
+        KOutHandlerSetStdErr();
+        KStsHandlerSetStdErr();
+        KLogHandlerSetStdErr();
+        ( void ) KDbgHandlerSetStdErr();
+    }
+
+    if ( do_gzip && do_bzip2 )
+    {
+        rc = RC( rcApp, rcArgv, rcReading, rcParam, rcAmbiguous );
+        LOGERR( klogErr, rc, "output compression method" );
+        CoreUsage( argv[ 0 ], &fmt, false, EXIT_FAILURE );
+    }
+
+    if ( minSpotId > maxSpotId )
+    {
+        spotid_t temp = maxSpotId;
+        maxSpotId = minSpotId;
+        minSpotId = temp;
+    }
+
+    if ( table_path_qty == 0 )
+    {
+        if ( D_option != NULL && D_option[ 0 ] != '\0' )
+        {
+            /* support deprecated '-D' option */
+            table_path[ table_path_qty++ ] = D_option;
+        }
+        else if ( accession == NULL || accession[ 0 ] == '\0' )
+        {
+            /* must have accession to proceed */
+            rc = RC( rcExe, rcArgv, rcValidating, rcParam, rcEmpty );
+            LOGERR( klogErr, rc, "expected accession" );
+            goto Catch;
+        }
+        else if ( P_option != NULL && P_option[ 0 ] != '\0' )
+        {
+            /* support deprecated '-P' option */
+            i = snprintf( P_option_buffer, sizeof( P_option_buffer ), "%s/%s", P_option, accession );
+            if ( i < 0 || i >= sizeof( P_option_buffer ) )
+            {
+                rc = RC( rcExe, rcArgv, rcValidating, rcParam, rcExcessive );
+                LOGERR( klogErr, rc, "path too long" );
+                goto Catch;
+            }
+            table_path[ table_path_qty++ ] = P_option_buffer;
+        }
+        else
+        {
+            table_path[ table_path_qty++ ] = accession;
+        }
+    }
+
+    rc = SRAMgrMakeRead( &sraMGR ); /* !!! in libsra !!! */
+    if ( rc != 0 )
+    {
+        LOGERR( klogErr, rc, "failed to open SRA manager" );
+        goto Catch;
+    }
+    else
+    {
+        rc = SRASplitterFactory_FilerInit( to_stdout, do_gzip, do_bzip2, sub_dir, keep_empty, outdir );
+        if ( rc != 0 )
+        {
+            LOGERR( klogErr, rc, "failed to initialize files" );
+            goto Catch;
+        }
+    }
+
+    {
+        rc_t rc2 = SRAMgrGetVDBManagerRead( sraMGR, &vmgr );
+        if ( rc2 != 0 )
+        {
+            LOGERR( klogErr, rc2, "while calling SRAMgrGetVDBManagerRead" );
+        }
+        else
+        {
+            if ( no_mt )
+            {
+                rc2 = VDBManagerDisablePagemapThread ( vmgr );
+                if ( rc2 != 0 )
+                {
+                    LOGERR( klogErr, rc2, "disabling multithreading failed" );
+                }
+            }
+        }
+        rc2 = ReportSetVDBManager( vmgr );
+    }
+
+
+    /* loop tables */
+    for ( i = 0; i < table_path_qty; i++ )
+    {
+        const SRASplitterFactory* fact_head = NULL;
+        spotid_t smax, smin;
+        int path_type;
+
+        SRA_DUMP_DBG( 5, ( "table path '%s', name '%s'\n", table_path[ i ], table_name ) );
+
+        /* because of PacBio: if no table_name is given ---> open the 'CONSENSUS' table implicitly!
+            we first have to lookup the Object-Type, if it is a Database we have to look if it contains
+            a CONSENSUS-table ( only PacBio-Runs have one ! )...
+        */
+
+        path_type = ( VDBManagerPathType ( vmgr, "%s", table_path[ i ] ) & ~ kptAlias );
+        switch ( path_type )
+        {
+            case kptDatabase        :   ;   /* types defined in <kdb/manager.h> */
+            case kptPrereleaseTbl   :   ;
+            case kptTable           :   break;
+
+            default             :   rc = RC( rcVDB, rcNoTarg, rcConstructing, rcItem, rcNotFound );
+                                    PLOGERR( klogErr, ( klogErr, rc,
+                                        "the path '$(p)' cannot be opened as database or table",
+                                        "p=%s", table_path[ i ] ) );
+                                    continue;
+                                    break;
+        }
+
+
+        if ( path_type == kptDatabase )
+        {
+            const char * table_to_open = table_name;
+            if ( table_to_open == NULL && database_contains_table_name( vmgr, table_path[ i ], consensus_table_name ) )
+            {
+                table_to_open = consensus_table_name;
+            }
+            if ( table_to_open != NULL )
+            {
+                rc = SRAMgrOpenAltTableRead( sraMGR, &fmt.table, table_to_open, "%s", table_path[ i ] ); /* from sradb-priv.h */
+                if ( rc != 0 )
+                {
+                    PLOGERR( klogErr, ( klogErr, rc, 
+                        "failed to open '$(path):$(table)'", "path=%s,table=%s",
+                        table_path[ i ], table_to_open ) );
+                    continue;
+                }
+            }
+
+        }
+
+        ReportResetObject( table_path[ i ] );
+
+        if ( fmt.table == NULL )
+        {
+            rc = SRAMgrOpenTableRead( sraMGR, &fmt.table, "%s", table_path[ i ] );
+            if ( rc != 0 )
+            {
+                if ( UIError( rc, NULL, NULL ) )
+                {
+                    UITableLOGError( rc, NULL, true );
+                }
+                else
+                {
+                    PLOGERR( klogErr, ( klogErr, rc,
+                            "failed to open '$(path)'", "path=%s", table_path[ i ] ) );
+                }
+                continue;
+            }
+        }
+
+        /* infer accession from table_path if missing or more than one table */
+        fmt.accession = table_path_qty > 1 ? NULL : accession;
+        if ( fmt.accession == NULL || fmt.accession[ 0 ] == 0 )
+        {
+            char * basename;
+            char *ext;
+            size_t l;
+            bool is_url = false;
+
+            strcpy( P_option_buffer, table_path[ i ] );
+
+            basename = strchr ( P_option_buffer, ':' );
+            if ( basename )
+            {
+                ++basename;
+                if ( basename [0] == '\0' )
+                    basename = P_option_buffer;
+                else
+                    is_url = true;
+            }
+            else
+                basename = P_option_buffer;
+
+            if ( is_url )
+            {
+                ext = strchr ( basename, '#' );
+                if ( ext )
+                    ext[ 0 ] = '\0';
+                ext = strchr ( basename, '?' );
+                if ( ext )
+                    ext[ 0 ] = '\0';
+            }
+
+
+            l = strlen( basename  );
+            while ( strchr( "\\/", basename[ l - 1 ] ) != NULL )
+            {
+                basename[ --l ] = '\0';
+            }
+            fmt.accession = strrchr( basename, '/' );
+            if ( fmt.accession++ == NULL )
+            {
+                fmt.accession = basename;
+            }
+
+            /* cut off [.lite].[c]sra[.nenc||.ncbi_enc] if any */
+            ext = strrchr( fmt.accession, '.' );
+            if ( ext != NULL )
+            {
+                if ( strcasecmp( ext, ".nenc" ) == 0 || strcasecmp( ext, ".ncbi_enc" ) == 0 )
+                {
+                    *ext = '\0';
+                    ext = strrchr( fmt.accession, '.' );
+                }
+                if ( ext != NULL && ( strcasecmp( ext, ".sra" ) == 0 || strcasecmp( ext, ".csra" ) == 0 ) )
+                {
+                    *ext = '\0';
+                    ext = strrchr( fmt.accession, '.' );
+                    if ( ext != NULL && strcasecmp( ext, ".lite" ) == 0 )
+                    {
+                        *ext = '\0';
+                    }
+                }
+            }
+        }
+
+        SRA_DUMP_DBG( 5, ( "accession: '%s'\n", fmt.accession ) );
+        rc = SRASplitterFactory_FilerPrefix( accession ? accession : fmt.accession );
+
+        while ( rc == 0 )
+        {
+            /* sort out the spot id range */
+            rc = SRATableMaxSpotId( fmt.table, &smax );
+            if ( rc != 0 )
+                break;
+            rc = SRATableMinSpotId( fmt.table, &smin );
+            if ( rc != 0 )
+                break;
+
+            {
+                const struct VTable* tbl = NULL;
+                rc_t rc2 = SRATableGetVTableRead( fmt.table, &tbl );
+                if ( rc == 0 )
+                {
+                    rc = rc2;
+                }
+                rc2 = ReportResetTable( table_path[i], tbl );
+                if ( rc == 0 )
+                {
+                    rc = rc2;
+                }
+                VTableRelease( tbl );   /* SRATableGetVTableRead adds Reference to tbl! */
+            }
+
+            /* test if we have to dump anything... */
+            if ( smax < minSpotId || smin > maxSpotId )
+            {
+                break;
+            }
+            if ( smax > maxSpotId )
+            {
+                smax = maxSpotId;
+            }
+            if ( smin < minSpotId )
+            {
+                smin = minSpotId;
+            }
+
+            /* hack to reduce looping in AddSpot: needs redesign to pass nreads along through tree */
+            if ( true ) /* ??? */
+            {
+                const SRAColumn* c = NULL;
+
+                nreads_max = NREADS_MAX;    /* global variables defined in factory.h */
+                quality_N_limit = 0;
+
+                rc = SRATableOpenColumnRead( fmt.table, &c, "PLATFORM", sra_platform_id_t );
+                if ( rc == 0 )
+                {
+                    const INSDC_SRA_platform_id *platform;
+                    bitsz_t o, z;
+                    rc = SRAColumnRead( c, 1, (const void **)&platform, &o, &z );
+                    if ( rc == 0 && platform != NULL )
+                    {
+                        /* platform constands in insdc/sra.h */
+                        switch( *platform )
+                        {
+                            case SRA_PLATFORM_454           : quality_N_limit = 30; nreads_max = 8;  break;
+                            case SRA_PLATFORM_ION_TORRENT   : ;
+                            case SRA_PLATFORM_ILLUMINA      : quality_N_limit = 35; nreads_max = 8;  break;
+                            case SRA_PLATFORM_ABSOLID       : quality_N_limit = 25; nreads_max = 8;  break;
+
+                            case SRA_PLATFORM_PACBIO_SMRT   : if ( fmt.split_files )
+                                                               {
+                                                                    /* only if we split into files we limit the number of reads */
+                                                                    nreads_max = 32;
+                                                               }
+                                                               break;
+
+                            default : nreads_max = 8; break;    /* for unknown platforms */
+                        }
+                    }
+                    SRAColumnRelease( c );
+                }
+                else if ( GetRCState( rc ) == rcNotFound && GetRCObject( rc ) == ( enum RCObject )rcColumn )
+                {
+                    rc = 0;
+                }
+            }
+
+            /* table dependent */
+            rc = fmt.get_factory( &fmt, &fact_head );
+            if ( rc != 0 )
+            {
+                break;
+            }
+            if ( fact_head == NULL )
+            {
+                rc = RC( rcExe, rcFormatter, rcResolving, rcInterface, rcNull );
+                break;
+            }
+
+            if ( rc == 0 && ( spot_group_on || spot_groups > 0 ) )
+            {
+                const SRASplitterFactory* f = NULL;
+                rc = SpotGroupSplitterFactory_Make( &f, fmt.table, spot_group_on, spot_group );
+                if ( rc == 0 )
+                {
+                    rc = SRASplitterFactory_AddNext( f, fact_head );
+                    if ( rc == 0 )
+                    {
+                        fact_head = f;
+                    }
+                    else
+                    {
+                        SRASplitterFactory_Release( f );
+                    }
+                }
+            }
+
+            if ( rc == 0 && read_filter_on )
+            {
+                const SRASplitterFactory* f = NULL;
+                rc = ReadFilterSplitterFactory_Make( &f, fmt.table, read_filter );
+                if ( rc == 0 )
+                {
+                    rc = SRASplitterFactory_AddNext( f, fact_head );
+                    if ( rc == 0 )
+                    {
+                        fact_head = f;
+                    }
+                    else
+                    {
+                        SRASplitterFactory_Release( f );
+                    }
+                }
+            }
+
+            if ( rc == 0 )
+            {
+                /* this filter takes over head of chain to be first and kill off bad NREADS */
+                const SRASplitterFactory* f = NULL;
+                rc = MaxNReadsValidatorFactory_Make( &f, fmt.table );
+                if ( rc == 0 )
+                {
+                    rc = SRASplitterFactory_AddNext( f, fact_head );
+                    if ( rc == 0 )
+                    {
+                        fact_head = f;
+                    }
+                    else
+                    {
+                        SRASplitterFactory_Release( f );
+                    }
+                }
+            }
+
+            rc = SRASplitterFactory_Init( fact_head );
+            if ( rc == 0 )
+            {
+                uint64_t spots_read;
+
+                /* ********************************************************** */
+                rc = SRADumper_DumpRun( fmt.table, smin, smax, fact_head, &spots_read );
+                /* ********************************************************** */
+                if ( rc == 0 )
+                { 
+                    uint64_t spots_written = 0, file = 0;
+
+                    SRASplitterFactory_FilerReport( &spots_written, &file );
+                    if ( !g_legacy_report )
+                    {
+                        OUTMSG(( "Read %lu spots for %s\n", spots_read, table_path[ i ] ));
+                    }
+                    OUTMSG(( "Written %lu spots for %s\n", spots_written - total_spots_written, table_path[ i ] ));
+
+                    if ( to_stdout && spots_written > 0 )
+                    {
+                        PLOGMSG( klogInfo, ( klogInfo, "$(t) biggest file has $(n) spots",
+                            PLOG_2( PLOG_S( t ), PLOG_U64( n ) ), table_path[ i ], file ));
+                    }
+                    total_spots_written = spots_written;
+                    total_spots_read += spots_read;
+                }
+            }
+            break;
+        }
+
+        SRASplitterFactory_Release( fact_head );
+        SRATableRelease( fmt.table );
+        fmt.table = NULL;
+        if ( rc == 0 )
+        {
+            PLOGMSG( klogInfo, ( klogInfo, "$(path)$(dot)$(table) $(spots) spots",
+                    PLOG_4(PLOG_S(path),PLOG_S(dot),PLOG_S(table),PLOG_U32(spots)),
+                    table_path[ i ], table_name ? ":" : "", table_name ? table_name : "", smax - smin + 1 ) );
+        }
+        else if (!reportToUserSffFromNot454Run(rc, argv [0], false)) {
+            PLOGERR( klogErr, ( klogErr, rc, "failed $(path)$(dot)$(table)",
+                    PLOG_3(PLOG_S(path),PLOG_S(dot),PLOG_S(table)),
+                    table_path[ i ], table_name ? ":" : "", table_name ? table_name : "" ) );
+        }
+    }
+
+Catch:
+    if ( fmt.release )
+    {
+        rc_t rr = fmt.release( &fmt );
+        if ( rr != 0 )
+        {
+            SRA_DUMP_DBG( 1, ( "formatter release error %R\n", rr ) );
+        }
+    }
+
+    for ( i = 0; i < spot_groups; i++ )
+    {
+        free( spot_group[ i ] );
+    }
+    SRASplitterFiler_Release();
+    SRAMgrRelease( sraMGR );
+    VDBManagerRelease( vmgr );
+
+    if ( g_legacy_report )
+    {
+        OUTMSG(( "Written %lu spots total\n", total_spots_written ));
+    }
+    else if ( table_path_qty > 1 )
+    {
+        OUTMSG(( "Read %lu spots total\n", total_spots_read ));
+        OUTMSG(( "Written %lu spots total\n", total_spots_written ));
+    }
+
+    /* Report execution environment if necessary */
+    if (rc != 0 && reportToUserSffFromNot454Run(rc, argv [0], true)) {
+        ReportSilence();
+    }
+    {
+        rc_t rc2 = ReportFinalize( rc );
+        if ( rc == 0 )
+        {
+            rc = rc2;
+        }
+    }
+    return rc;
+}
diff --git a/tools/sra-dump/core.h b/tools/sra-dump/core.h
new file mode 100644
index 0000000..079884c
--- /dev/null
+++ b/tools/sra-dump/core.h
@@ -0,0 +1,74 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_tools_dump_core
+#define _h_tools_dump_core
+
+#include <klib/rc.h>
+
+#include "factory.h"
+
+typedef struct SRADumperFmt_Arg_struct {
+    const char* abbr; /* NULL here means end of list */
+    /* next 3 can be NULL */
+    const char* full;
+    const char* param;
+    const char* descr[10];
+} SRADumperFmt_Arg;
+
+typedef struct SRADumperFmt SRADumperFmt;
+
+/**
+  * Setup formatter interfaces
+  */
+rc_t SRADumper_Init(SRADumperFmt* fmt);
+
+typedef bool CC GetArg(const SRADumperFmt* fmt, char const* const abbr, char const* const full,
+                       int* i, int argc, char *argv[], const char** value);
+
+struct SRADumperFmt
+{
+    /* optional pointer to formatter arguments, NULL terminated array otherwise */
+    const SRADumperFmt_Arg* arg_desc;
+
+    /* optional - prints custom help page */
+    rc_t (*usage)(const SRADumperFmt* fmt, const SRADumperFmt_Arg* core_args, int first );
+    /* optional */
+    rc_t (*release)(const SRADumperFmt* fmt);
+    /* optional process current arg and advance i by number of processed args */
+    bool (*add_arg)(const SRADumperFmt* fmt, GetArg* f, int* i, int argc, char *argv[]);
+
+    /* mandatory return head of factories implemented in module, factories released by caller! */
+    rc_t (*get_factory)(const SRADumperFmt* fmt, const SRASplitterFactory** factory);
+
+    /* set by parent code, do not change!!! */
+    const char* accession;
+    const SRATable* table;
+    bool gzip;
+    bool bzip2;
+    bool split_files; /* tell the core that the implementation splits into files... */
+};
+
+#endif /* _h_tools_dump_core */
diff --git a/tools/sra-dump/debug.h b/tools/sra-dump/debug.h
new file mode 100644
index 0000000..c9d1e56
--- /dev/null
+++ b/tools/sra-dump/debug.h
@@ -0,0 +1,34 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_sra_dump_debug_h_
+#define _tools_sra_dump_debug_h_
+
+#include <klib/debug.h>
+
+#define SRA_DUMP_DBG_PASTE(a,b) a##b
+#define SRA_DUMP_DBG(flag,msg) DBGMSG(DBG_APP,DBG_FLAG(SRA_DUMP_DBG_PASTE(DBG_APP_,flag)), msg)
+
+#endif /* _tools_sra_dump_debug_h_ */
diff --git a/tools/sra-dump/factory.c b/tools/sra-dump/factory.c
new file mode 100644
index 0000000..771788b
--- /dev/null
+++ b/tools/sra-dump/factory.c
@@ -0,0 +1,1069 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/container.h>
+#include <kfs/directory.h>
+#include <kfs/buffile.h>
+#include <kfs/gzip.h>
+#include <kfs/bzip.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <time.h>
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include "factory.h"
+#include "debug.h"
+
+#define DUMPER_MAX_KEY_LENGTH 63
+#define DUMPER_MAX_TREE_DEPTH 100
+#define DUMPER_MAX_OPEN_FILES 100
+
+#define OUTPUT_BUFFER_SIZE ( 128 * 1024 )
+
+uint32_t nreads_max = 0;
+uint32_t quality_N_limit = 0;
+bool g_legacy_report = false;
+
+typedef struct SRASplitterFile_struct {
+    SLNode dad;
+    char* key;
+    KDirectory* dir;
+    char* name;
+    KFile* file;
+    time_t opened;
+    uint64_t pos;
+    /* keep track of number of spots written to file */
+    spotid_t curr_spot;
+    uint64_t spot_qty;
+} SRASplitterFile;
+
+typedef struct SRASplitterFiler_struct {
+    /* TBD - reorder structure to avoid premature ageing of compiler and CPU */
+    char* prefix;
+    KFile* kf_stdout;
+    bool key_as_dir;
+    bool keep_empty;
+    bool do_gzip;
+    bool do_bzip2;
+    const char* arc_extension;
+    KDirectory* dir;
+
+    /* TBD - this should be a BSTree */
+    SLList files;
+
+    /* list of keys to construct a path */
+    int path_tail; /* count of elements in path array */
+    int path_len; /* cumulative length of path in array */
+    const char* path[DUMPER_MAX_TREE_DEPTH];
+    char key_buf[DUMPER_MAX_TREE_DEPTH * (DUMPER_MAX_KEY_LENGTH + 3) + 10];
+    /* holds opened files */
+    SRASplitterFile* open[DUMPER_MAX_OPEN_FILES];
+    /* keep track of number of spots written to file */
+    spotid_t curr_spot;
+    uint64_t spot_qty;
+} SRASplitterFiler;
+
+SRASplitterFiler* g_filer = NULL;
+
+static
+void CC SRASplitterFiler_WhackFile( SLNode *node, void *data )
+{
+    SRASplitterFile* file = (SRASplitterFile*)node;
+    bool* d = (bool*)data;
+
+    SRA_DUMP_DBG(5, ("Close file: '%s%s'\n", file->key, g_filer->arc_extension));
+    if( file->spot_qty == 0 ) {
+        /* truncate file which didn't get actual spots written */
+        KFileSetSize(file->file, 0);
+    }
+    KFileRelease(file->file);
+    if( !*d ) {
+        uint64_t sz = ~0;
+        if( KDirectoryFileSize(file->dir, &sz, "%s%s", file->name, g_filer->arc_extension) == 0 ) {
+            if( file->spot_qty == 0 || sz == 0 ) {
+                SRA_DUMP_DBG(5, ("Delete empty file: '%s%s'\n", file->key, g_filer->arc_extension));
+                KDirectoryRemove(file->dir, false, "%s%s", file->name, g_filer->arc_extension);
+            }
+        }
+    }
+    if( file->dir != g_filer->dir ) {
+        KDirectoryRelease(file->dir);
+    }
+    free(file->key);
+    free(file->name);
+    free(file);
+}
+
+static
+void CC SRASplitterFiler_StatFile( SLNode *node, void *data )
+{
+    SRASplitterFile* file = (SRASplitterFile*)node;
+    uint64_t* d = (uint64_t*)data;
+
+    if( *d < file->spot_qty ) {
+        *d = file->spot_qty;
+    }
+}
+
+void SRASplitterFiler_Release(void)
+{
+    if( g_filer != NULL ) {
+        SLListWhack(&g_filer->files, SRASplitterFiler_WhackFile, &g_filer->keep_empty);
+        KFileRelease(g_filer->kf_stdout);
+        KDirectoryRelease(g_filer->dir);
+        free(g_filer->prefix);
+        free(g_filer);
+        g_filer = NULL;
+    }
+}
+
+void SRASplitterFactory_FilerReport(uint64_t* total, uint64_t* biggest_file)
+{
+    if( g_filer != NULL ) {
+        if( total != NULL ) {
+            *total = g_filer->spot_qty;
+        }
+        if( biggest_file != NULL ) {
+            SLListForEach(&g_filer->files, SRASplitterFiler_StatFile, biggest_file);
+        }
+    }
+}
+
+static
+rc_t SRASplitterFiler_PushKey(const char* key)
+{
+    if( g_filer == NULL || key == NULL ) {
+        return RC(rcExe, rcFile, rcAttaching, rcParam, rcNull);
+    }
+    if( g_filer->path_tail == sizeof(g_filer->path) - 1 ) {
+        return RC(rcExe, rcFile, rcAttaching, rcDirEntry, rcTooLong);
+    }
+    if( g_filer->key_as_dir ) {
+        /* skip initial non-letters */
+        while( !isalnum(*key) && *key != '\0' ) {
+            ++key;
+        }
+    }
+    g_filer->path[g_filer->path_tail++] = key;
+    g_filer->path_len += strlen(key) + 1;
+    return 0;
+}
+
+static
+rc_t SRASplitterFiler_PopKey(void)
+{
+    if( g_filer->path_tail == 0 ) {
+        return RC(rcExe, rcFile, rcDetaching, rcDirEntry, rcTooShort);
+    }
+    g_filer->path_len -= strlen(g_filer->path[--g_filer->path_tail]) + 1;
+    return 0;
+}
+
+static
+rc_t SRASplitterFiler_OpenFile(SRASplitterFile* file, bool initial)
+{
+    rc_t rc = 0;
+
+    if( file == NULL || (initial && file->file != NULL) ) {
+        rc = RC(rcExe, rcFile, rcOpening, rcParam, rcInvalid);
+    } else if( initial || file->file == NULL ) {
+        int i, vacancy = -1;
+        time_t oldest = 0;
+
+        for(i = 0; i < DUMPER_MAX_OPEN_FILES; i++) {
+            if(g_filer->open[i] == NULL ) {
+                vacancy = i;
+                break;
+            }
+            if(g_filer->open[i]->opened < oldest || oldest == 0 ) {
+                oldest = g_filer->open[i]->opened;
+                vacancy = i;
+            }
+        }
+        if( g_filer->open[vacancy] != NULL ) {
+            SRA_DUMP_DBG(5, ("Close file[%i]: %lu '%s%s'\n", vacancy,
+                g_filer->open[vacancy]->opened, g_filer->open[vacancy]->key, g_filer->arc_extension));
+            KFileRelease(g_filer->open[vacancy]->file);
+            g_filer->open[vacancy]->file = NULL;
+            g_filer->open[vacancy] = NULL;
+        }
+        if( g_filer->kf_stdout ) {
+            SRA_DUMP_DBG(5, ("attach to pre-opened stdout: '%s'\n", file->key));
+            rc = KFileAddRef(g_filer->kf_stdout);
+            file->file = g_filer->kf_stdout;
+        } else if( initial ) {
+            SRA_DUMP_DBG(5, ("Create file: '%s%s'\n", file->key, g_filer->arc_extension));
+            if( (rc = KDirectoryCreateFile(file->dir, &file->file, false, 0664, kcmInit,
+                                           "%s%s", file->name, g_filer->arc_extension)) == 0 ) {
+                if( g_filer->do_gzip ) {
+                    KFile* gz;
+                    if( (rc = KFileMakeGzipForWrite(&gz, file->file)) == 0 ) {
+                        KFileRelease(file->file);
+                        file->file = gz;
+                    }
+                } else if( g_filer->do_bzip2 ) {
+                    KFile* bz;
+                    if( (rc = KFileMakeBzip2ForWrite(&bz, file->file)) == 0 ) {
+                        KFileRelease(file->file);
+                        file->file = bz;
+                    }
+                }
+            }
+        } else if( file->file == NULL ) {
+            SRA_DUMP_DBG(5, ("Reopen file: '%s%s'\n", file->key, g_filer->arc_extension));
+            /* position is rememebered since last time */
+            if( (rc = KDirectoryOpenFileWrite(file->dir, &file->file, false,
+                                              "%s%s", file->name, g_filer->arc_extension)) == 0 ) {
+#if ! SUPPORT_MULTI_SESSION_GZIP_FILES
+                if( g_filer->do_gzip || g_filer->do_bzip2 ) {
+                    /* compressed files cannot (currently) be re-opened until we support multi-session compression */
+                    rc = RC(rcExe, rcFile, rcOpening, rcConstraint, rcViolated);
+                }
+#else
+                if( g_filer->do_gzip ) {
+                    KFile* gz;
+                    if( (rc = KFileMakeGzipForAppend(&gz, file->file)) == 0 ) {
+                        KFileRelease(file->file);
+                        file->file = gz;
+                    }
+                } else if( g_filer->do_bzip2 ) {
+                    KFile* bz;
+                    if( (rc = KFileMakeBzip2ForWrite(&bz, file->file)) == 0 ) {
+                        KFileRelease(file->file);
+                        file->file = bz;
+                    }
+                }
+#endif
+            }
+        }
+#if OUTPUT_BUFFER_SIZE
+        if( rc == 0 && !g_filer->kf_stdout ) {
+            /* attach buffer */
+            KFile *buf = NULL;
+            if( (rc = KBufFileMakeWrite(&buf, file->file, false, OUTPUT_BUFFER_SIZE)) == 0 ) {
+                KFileRelease(file->file);
+                file->file = buf;
+            } else {
+#if _DEBUGGING
+                /* we only want to see this in debug */
+                PLOGERR(klogErr, (klogErr, rc, "creating buffer for file '$(s)$(e)'",
+                    PLOG_2(PLOG_S(s),PLOG_S(e)), file->key, g_filer->arc_extension));
+#else
+                rc = 0;
+#endif
+            }
+        }
+#endif
+        if( rc == 0 ) {
+            g_filer->open[vacancy] = file;
+            file->opened = time(NULL);
+            SRA_DUMP_DBG(5, ("Opened file[%i]: %lu '%s%s'\n",
+                vacancy, file->opened, file->key, g_filer->arc_extension));
+        }
+    }
+    return rc;
+}
+
+static
+bool CC SRASplitterFiler_GetCurrFile_FindByKey( SLNode *node, void *data )
+{
+    SRASplitterFile** d = (SRASplitterFile**)data;
+    SRASplitterFile* file = (SRASplitterFile*)node;
+
+    if( strcmp(file->key, g_filer->key_buf) == 0 ) {
+        *d = file;
+        return true;
+    }
+    return false;
+}
+
+static
+rc_t SRASplitterFiler_FixFSName(const char* name, char** fname)
+{
+    /* replace invalid chars with '_' in name */
+    char* nn = strdup(name);
+
+    if( nn == NULL ) {
+        return RC(rcExe, rcFile, rcOpening, rcMemory, rcExhausted);
+    }
+    *fname = nn;
+    while(*nn != '\0' ) {
+        if( strchr("\\/?:*(){}[]^%\"\'<>|`", *nn) != NULL ) {
+            *nn = '_';
+        }
+        nn++;
+/*TODO: use it!*/
+    }
+    return 0;
+}
+
+static
+rc_t SRASplitterFiler_GetCurrFile(const SRASplitterFile** out_file)
+{
+    rc_t rc = 0;
+    int i;
+    char* key = g_filer->key_buf; /* shortcut */
+    SRASplitterFile* file = NULL;
+
+    if( out_file == NULL ) {
+        return RC(rcExe, rcFile, rcOpening, rcParam, rcInvalid);
+    } else if( g_filer->kf_stdout ) {
+        strcpy(key, "stdout");
+    } else {
+        /* prepare the key
+           if key_as_dir true, key will be prefix/path[i]/(path[i+1]..)/suffix
+           otherwise key will be prefix_path[i](_path[i+1]..)_?suffix
+         */
+        key[0] = '\0';
+        for(i = 0; i < g_filer->path_tail; i++ ) {
+            if( g_filer->path[i][0] == '\0' ) {
+                continue;
+            }
+            if( g_filer->key_as_dir ) {
+                if( i != 0 ) {
+                    strcat(key, "/");
+                }
+                strcat(key, g_filer->path[i]);
+            } else {
+                if( i != 0 && isalnum(g_filer->path[i][0]) ) {
+                    strcat(key, "_");
+                }
+                strcat(key, g_filer->path[i]);
+            }
+        }
+    }
+    if( !SLListDoUntil( &g_filer->files, SRASplitterFiler_GetCurrFile_FindByKey, &file ) ) {
+        SRA_DUMP_DBG(5, ("New file: '%s'\n", key));
+        file = calloc(1, sizeof(*file));
+        key = strdup(key);
+        if( file == NULL || key == NULL ) {
+            free(file);
+            free(key);
+            rc = RC(rcExe, rcFile, rcResolving, rcMemory, rcExhausted);
+        } else {
+            file->key = key;
+            if( g_filer->key_as_dir ) {
+                KDirectory* sub = g_filer->dir;
+                for(i = 0; rc == 0 && i < (g_filer->path_tail - 1); i++ ) {
+                    if( g_filer->path[i][0] != '\0' ) {
+                        char* ndir = NULL;
+                        if( (rc = SRASplitterFiler_FixFSName(g_filer->path[i], &ndir)) == 0 ) {
+                            if( (rc = KDirectoryCreateDir(sub, 0775, kcmCreate, "%s", ndir)) == 0 ||
+                                (GetRCObject(rc) == ( enum RCObject )rcDirectory && GetRCState(rc) == rcExists) ) {
+                                if( (rc = KDirectoryOpenDirUpdate(sub, &file->dir, true, "%s", ndir)) == 0 ) {
+                                    KDirectoryRelease(i == 0 ? NULL : sub);
+                                    sub = file->dir;
+                                }
+                            }
+                            free(ndir);
+                        }
+                    }
+                }
+                rc = SRASplitterFiler_FixFSName(&file->key[strlen(file->key) - strlen(g_filer->path[g_filer->path_tail - 1])], &file->name);
+            } else {
+                file->dir = g_filer->dir;
+                rc = SRASplitterFiler_FixFSName(file->key, &file->name);
+            }
+            if( rc == 0 && (rc = SRASplitterFiler_OpenFile(file, true)) == 0 ) {
+                SLListPushTail(&g_filer->files, &file->dad);
+            } else {
+                SRASplitterFiler_WhackFile(&file->dad, &g_filer->keep_empty);
+            }
+        }
+    } else {
+        SRA_DUMP_DBG(5, ("Curr file key '%s': '%s'\n", key, file->name));
+        rc = SRASplitterFiler_OpenFile(file, false);
+    }
+    *out_file = rc ? NULL : file;
+    return rc;
+}
+
+rc_t SRASplitterFactory_FilerPrefix(const char* prefix)
+{
+    rc_t rc = 0;
+
+    if( g_filer == NULL ) {
+        rc = RC(rcExe, rcFile, rcUpdating, rcSelf, rcNotOpen);
+    } else if( prefix == NULL || strcmp(prefix, g_filer->prefix) != 0 ) {
+        if( (rc = SRASplitterFiler_PopKey()) == 0 ) {
+            free(g_filer->prefix);
+            g_filer->prefix = strdup(prefix ? prefix : "");
+            if( g_filer->prefix == NULL ) {
+                rc = RC(rcExe, rcFile, rcConstructing, rcMemory, rcExhausted);
+            } else {
+                rc = SRASplitterFiler_PushKey(g_filer->prefix);
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t SRASplitterFactory_FilerInit(bool to_stdout, bool gzip, bool bzip2, bool key_as_dir, bool keep_empty, const char* path, ...)
+{
+    rc_t rc = 0;
+
+    if( g_filer != NULL ) {
+        rc = RC(rcExe, rcFile, rcConstructing, rcSelf, rcExists);
+    } else if( gzip && bzip2 ) {
+        rc = RC(rcExe, rcFile, rcConstructing, rcParam, rcAmbiguous);
+    } else if( (g_filer = calloc(1, sizeof(*g_filer))) == NULL ) {
+        rc = RC(rcExe, rcFile, rcConstructing, rcMemory, rcExhausted);
+    } else {
+        g_filer->key_as_dir = to_stdout ? false : key_as_dir;
+        g_filer->keep_empty = to_stdout ? true : keep_empty;
+        g_filer->do_gzip = gzip;
+        g_filer->do_bzip2 = bzip2;
+        g_filer->arc_extension = gzip ? ".gz" : (bzip2 ? ".bz2" : "");
+        SLListInit(&g_filer->files);
+        /* push empty prefix */
+        g_filer->prefix = strdup("");
+        if( (rc = SRASplitterFiler_PushKey(g_filer->prefix)) == 0 &&
+            (rc = KDirectoryNativeDir(&g_filer->dir)) == 0 ) {
+            if( to_stdout ) {
+                if( (rc = KFileMakeStdOut(&g_filer->kf_stdout)) == 0 ) {
+                    KFile *buf = NULL;
+                    if( gzip ) {
+                        KFile* gz;
+                        if( (rc = KFileMakeGzipForWrite(&gz, g_filer->kf_stdout)) == 0 ) {
+                            KFileRelease(g_filer->kf_stdout);
+                            g_filer->kf_stdout = gz;
+                        }
+                    } else if( bzip2 ) {
+                        KFile* bz;
+                        if( (rc = KFileMakeBzip2ForWrite(&bz, g_filer->kf_stdout)) == 0 ) {
+                            KFileRelease(g_filer->kf_stdout);
+                            g_filer->kf_stdout = bz;
+                        }
+                    }
+#if OUTPUT_BUFFER_SIZE
+                    if ( rc == 0 ) {
+                        if( (rc = KBufFileMakeWrite(&buf, g_filer->kf_stdout, false, OUTPUT_BUFFER_SIZE)) == 0 ) {
+                            KFileRelease(g_filer->kf_stdout);
+                            g_filer->kf_stdout = buf;
+                        } else {
+#if _DEBUGGING
+                            /* we only want to see this in debug */
+                            LOGERR(klogErr, rc, "creating buffer for stdout");
+#else
+                            rc = 0;
+#endif
+                        }
+                    }
+#endif
+                }
+            } else if( path != NULL ) {
+                va_list args;
+                va_start(args, path);
+                if( (rc = KDirectoryVCreateDir(g_filer->dir, 0775, kcmCreate | kcmParents, path, args)) == 0 ||
+                    (GetRCObject(rc) == ( enum RCObject )rcDirectory && GetRCState(rc) == rcExists) ) {
+                    KDirectory* sub = NULL;
+                    va_end(args);
+                    va_start(args, path);
+                    if( (rc = KDirectoryVOpenDirUpdate(g_filer->dir, &sub, true, path, args)) == 0 ) {
+                        KDirectoryRelease(g_filer->dir);
+                        g_filer->dir = sub;
+                    }
+                }
+                va_end(args);
+            }
+        }
+    }
+    if( rc != 0 ) {
+        SRASplitterFiler_PopKey();
+        SRASplitterFiler_Release();
+    }
+    return rc;
+}
+
+/* ### Base splitter code ##################################################### */
+
+/* used to detect correct object pointers */
+const uint32_t SRASplitterFactory_MAGIC = 0xFACE3693;
+
+struct SRASplitterFactory {
+    uint32_t magic;
+    ESRASplitterTypes type;
+    const SRASplitterFactory* next;
+    SRASplitterFactory_Init_Func* Init;
+    SRASplitterFactory_NewObj_Func* NewObj;
+    SRASplitterFactory_Release_Func* Release;
+};
+
+/* used to detect correct object pointers */
+const uint32_t SRASplitter_MAGIC = 0xFACE5325;
+
+typedef struct SRASplitter_Child SRASplitter_Child;
+
+struct SRASplitter {
+    uint32_t magic;
+    ESRASplitterTypes type;
+    const SRASplitterFactory* next_fact;
+    SRASplitter_GetKey_Func* GetKey;
+    SRASplitter_GetKeySet_Func* GetKeySet;
+    SRASplitter_Dump_Func* Dump;
+    SRASplitter_Release_Func* Release;
+    BSTree children;
+    SRASplitter_Child* last_found;
+};
+
+struct SRASplitter_Child {
+    BSTNode node;
+    char key[DUMPER_MAX_KEY_LENGTH + 1];
+    bool is_splitter; /* next union selector */
+    union {
+        /* chained key->splitter for self type of eSplitterRead and eSplitterSpot */
+        const SRASplitter* splitter;
+        /* file object for self type of eSplitterFormat */
+        const SRASplitterFile* file;
+    } child;
+};
+
+static
+rc_t SRASplitter_Child_Make(SRASplitter_Child** child, const char* key)
+{
+    if( child == NULL || key == NULL ) {
+        return RC(rcExe, rcNode, rcAllocating, rcParam, rcNull);
+    }
+    if( strlen(key) > DUMPER_MAX_KEY_LENGTH ) {
+        return RC(rcExe, rcNode, rcAllocating, rcTag, rcTooLong);
+    }
+    *child = calloc(1, sizeof(**child));
+    if( *child == NULL ) {
+        return RC(rcExe, rcNode, rcAllocating, rcMemory, rcExhausted);
+    }
+    strcpy((*child)->key, key);
+    return 0;
+}
+
+static
+rc_t SRASplitter_Child_MakeSplitter(SRASplitter_Child** child, const char* key, const SRASplitter* splitter)
+{
+    rc_t rc = 0;
+
+    if( splitter == NULL ) {
+        rc = RC(rcExe, rcNode, rcAllocating, rcParam, rcNull);
+    } else if( (rc = SRASplitter_Child_Make(child, key)) == 0 ) {
+        (*child)->is_splitter = true;
+        (*child)->child.splitter = splitter;
+    }
+    return rc;
+}
+
+static
+rc_t SRASplitter_Child_MakeFile(SRASplitter_Child** child, const char* key, const SRASplitterFile* file)
+{
+    rc_t rc = 0;
+
+    if( file == NULL ) {
+        rc = RC(rcExe, rcNode, rcAllocating, rcParam, rcNull);
+    } else if( (rc = SRASplitter_Child_Make(child, key)) == 0 ) {
+        (*child)->is_splitter = false;
+        (*child)->child.file = file;
+    }
+    return rc;
+}
+
+static
+void CC SRASplitter_Child_Whack(BSTNode* node, void* data)
+{
+    const SRASplitter_Child* n = (const SRASplitter_Child*)node;
+    if( n->is_splitter ) {
+        rc_t rc = 0;
+        if( (rc = SRASplitter_Release(n->child.splitter)) != 0 ) {
+            LOGERR(klogErr, rc, "SRASplitter_Release");
+        }
+    }
+    free(node);
+}
+
+static
+int64_t CC SRASplitter_Child_Cmp(const BSTNode* item, const BSTNode* node)
+{
+    const SRASplitter_Child* i = (const SRASplitter_Child*)item;
+    const SRASplitter_Child* n = (const SRASplitter_Child*)node;
+    return strcmp(i->key, n->key);
+}
+
+static
+int64_t CC SRASplitter_Child_Find(const void* item, const BSTNode* node)
+{
+    const char* key = (const char*)item;
+    const SRASplitter_Child* n = (const SRASplitter_Child*)node;
+    return strcmp(key, n->key);
+}
+
+static /* not virtual, self is direct pointer to base type here !!! */
+rc_t SRASplitter_FindNextSplitter(SRASplitter* self, const char* key)
+{
+    rc_t rc = 0;
+
+    if( self->last_found == NULL || strcmp(self->last_found->key, key) ) {
+        self->last_found = (SRASplitter_Child*)BSTreeFind( &self->children, key, SRASplitter_Child_Find );
+        if( self->last_found == NULL ) {
+            /* create new child using next factory in chain */
+            const SRASplitter* splitter = NULL;
+            SRA_DUMP_DBG(5, ("New splitter on key '%s'\n", key));
+            if( (rc = SRASplitterFactory_NewObj(self->next_fact, &splitter)) == 0 ) {
+                if( (rc = SRASplitter_Child_MakeSplitter(&self->last_found, key, splitter)) == 0 ) {
+                    if( (rc = BSTreeInsertUnique(&self->children, &self->last_found->node, NULL, SRASplitter_Child_Cmp)) != 0 ) {
+                        SRASplitter_Child_Whack(&self->last_found->node, NULL);
+                        self->last_found = NULL;
+                    }
+                } else {
+                    SRASplitter_Release(splitter);
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+static /* not virtual, self is direct pointer to base type here !!! */
+rc_t SRASplitter_FindNextFile(SRASplitter* self, const char* key)
+{
+    rc_t rc = 0;
+
+    if( self->last_found == NULL || strcmp(self->last_found->key, key) != 0 ) {
+        self->last_found = (SRASplitter_Child*)BSTreeFind(&self->children, key, SRASplitter_Child_Find);
+        if( self->last_found == NULL ) {
+            /* create new child using global filer */
+            const SRASplitterFile* file = NULL;
+            SRA_DUMP_DBG(5, ("New file on key '%s'\n", key));
+            if( (rc = SRASplitterFiler_GetCurrFile(&file)) == 0 ) {
+                if( (rc = SRASplitter_Child_MakeFile(&self->last_found, key, file)) == 0 ) {
+                    if( (rc = BSTreeInsertUnique(&self->children, &self->last_found->node, NULL, SRASplitter_Child_Cmp)) != 0 ) {
+                        SRASplitter_Child_Whack(&self->last_found->node, NULL);
+                        self->last_found = NULL;
+                    }
+                }
+            }
+        }
+    }
+    if( rc == 0 ) {
+        /* make sure file is opened */
+        rc = SRASplitterFiler_OpenFile((SRASplitterFile*)(self->last_found->child.file), false);
+    }
+    return rc;
+}
+
+rc_t SRASplitter_Make(const SRASplitter** cself, size_t type_size,
+                      SRASplitter_GetKey_Func* getkey,
+                      SRASplitter_GetKeySet_Func* get_keyset,
+                      SRASplitter_Dump_Func* dump,
+                      SRASplitter_Release_Func* release)
+{
+    SRASplitter* self = NULL;
+
+    if( cself == NULL ) {
+        return RC(rcExe, rcType, rcAllocating, rcParam, rcNull);
+    }
+    self = calloc(1, type_size + sizeof(*self));
+    if( self == NULL ) {
+        return RC(rcExe, rcType, rcAllocating, rcMemory, rcExhausted);
+    }
+    self->magic = SRASplitter_MAGIC;
+    BSTreeInit(&self->children);
+    self->GetKey = getkey;
+    self->GetKeySet = get_keyset;
+    self->Dump = dump;
+    self->Release = release;
+
+    /* shift pointer to after hidden structure */
+    self++;
+    *cself = self;
+    return 0;
+}
+
+static
+rc_t SRASplitter_ResolveSelf(const SRASplitter* self, enum RCContext ctx, SRASplitter** resolved)
+{
+    if( self == NULL || resolved == NULL ) {
+        return RC(rcExe, rcType, ctx, rcSelf, rcNull);
+    }
+    *resolved = (SRASplitter*)--self;
+    /* just to validate that it is full instance */
+    if( (*resolved)->magic != SRASplitter_MAGIC ) {
+        *resolved = NULL;
+        return RC(rcExe, rcType, ctx, rcMemory, rcCorrupt);
+    }
+    return 0;
+}
+
+rc_t SRASplitter_AddSpot( const SRASplitter * cself, spotid_t spot, readmask_t * readmask )
+{
+    SRASplitter * self = NULL;
+    rc_t rc = SRASplitter_ResolveSelf( cself, rcExecuting, &self );
+    if ( rc == 0 )
+    {
+        if ( self->type == eSplitterRead )
+        {
+            const SRASplitter_Keys* keys = NULL;
+            uint32_t key_qty = 0;
+            int32_t i, j, k;
+            make_readmask( used_readmasks );
+
+            clear_readmask( used_readmasks );
+            rc = self->GetKeySet( cself, &keys, &key_qty, spot, readmask );
+
+            for ( i = 0; rc == 0 && i < key_qty; i++ )
+            {
+                if ( keys[ i ].key != NULL && !isset_readmask( used_readmasks, i ) )
+                {
+                    make_readmask( local_readmask );
+                    copy_readmask( keys[ i ].readmask, local_readmask );
+                    /* merge readmasks from duplicate keys in array */
+                    for ( j = i + 1; j < key_qty; j++ )
+                    {
+                        if ( keys[ i ].key == keys[ j ].key || strcmp( keys[ i ].key, keys[ j ].key ) == 0 )
+                        {
+                            set_readmask( used_readmasks, j );
+                            for ( k = 0; k < nreads_max; k++ )
+                            {
+                                local_readmask[ k ] |= keys[ j ].readmask[ k ];
+                            }
+                        }
+                    }
+                    /* leave reads only allowed by previous object in chain */
+#ifndef EUGNES_LOOP_FIX
+                    for ( j = 0, k = 0; k < nreads_max; k++ )
+                    {
+                        local_readmask[ k ] &= readmask[ k ];
+                        if ( isset_readmask( local_readmask, k ) )
+                        {
+                            j++;
+                        }
+                    }
+                    if ( j > 0 )
+#endif
+                    {
+                        rc = SRASplitter_FindNextSplitter( self, keys[ i ].key );
+                        if ( rc == 0 )
+                        {
+                            /* push spot to next splitter in chain */
+                            rc = SRASplitterFiler_PushKey( self->last_found->key );
+                            if ( rc == 0 )
+                            {
+                                /* here comes RECURSION!!! */
+                                rc_t rc2;
+                                rc = SRASplitter_AddSpot( self->last_found->child.splitter, spot, local_readmask );
+                                rc2 = SRASplitterFiler_PopKey();
+                                rc = rc ? rc : rc2;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        else if ( self->type == eSplitterSpot )
+        {
+            const char* key = NULL;
+            make_readmask( new_readmask );
+            copy_readmask( readmask, new_readmask );
+            rc = self->GetKey( cself, &key, spot, new_readmask );
+            if ( rc == 0 && key != NULL )
+            {
+                int32_t j, k;
+                /* leave reads only allowed by previous object in chain */
+#ifndef EUGNES_LOOP_FIX
+                for( j = 0, k = 0; k < nreads_max; k++ )
+                {
+                    readmask[ k ] &= new_readmask[ k ];
+                    if ( isset_readmask( readmask, k ) )
+                    {
+                        j++;
+                    }
+                }
+                if ( j > 0 )
+#endif
+                {
+                    rc = SRASplitter_FindNextSplitter( self, key );
+                    if ( rc == 0 )
+                    {
+                        /* push spot to next splitter in chain */
+                        rc = SRASplitterFiler_PushKey( self->last_found->key );
+                        if ( rc == 0 )
+                        {
+                            /* here comes RECURSION!!! */
+                            rc_t rc2;
+                            rc = SRASplitter_AddSpot( self->last_found->child.splitter, spot, readmask );
+                            rc2 = SRASplitterFiler_PopKey();
+                            rc = rc ? rc : rc2;
+                        }
+                    }
+                }
+            }
+        }
+        else if ( self->type == eSplitterFormat )
+        {
+            rc = self->Dump( cself, spot, readmask );
+        }
+        else
+        {
+            rc = RC( rcExe, rcFile, rcExecuting, rcInterface, rcUnsupported );
+        }
+    }
+    return rc;
+}
+
+
+rc_t SRASplitter_Release(const SRASplitter* cself)
+{
+    rc_t rc = 0;
+    SRASplitter* self = NULL;
+
+    if( cself != NULL ) {
+        if( (rc = SRASplitter_ResolveSelf(cself, rcExecuting, &self)) == 0 ) {
+            if( self->Release ) {
+                rc = self->Release(cself);
+            }
+            BSTreeWhack( &self->children, SRASplitter_Child_Whack, NULL );
+            free(self);
+        }
+    }
+    return rc;
+}
+
+rc_t SRASplitter_FileActivate(const SRASplitter* cself, const char* key)
+{
+    rc_t rc = 0, rc2 = 0;
+    SRASplitter* self = NULL;
+
+    if( (rc = SRASplitter_ResolveSelf(cself, rcExecuting, &self)) == 0 ) {
+        if( (rc = SRASplitterFiler_PushKey(key)) == 0 ) {
+            /* sets self->last_found */
+            rc = SRASplitter_FindNextFile(self, key);
+            rc2 = SRASplitterFiler_PopKey();
+            rc = rc ? rc : rc2;
+        }
+    }
+    return rc;
+}
+
+rc_t SRASplitter_FileWrite( const SRASplitter* cself, spotid_t spot, const void* buf, size_t size )
+{
+    SRASplitter* self = NULL;
+    
+    rc_t rc = SRASplitter_ResolveSelf( cself, rcWriting, &self );
+    if ( rc == 0 )
+    {
+        if ( self->last_found == NULL )
+        {
+            rc = RC( rcExe, rcFile, rcWriting, rcDirEntry, rcUnknown );
+        }
+        else if ( buf != NULL && size > 0 )
+        {
+            size_t writ = 0;
+            SRASplitterFile* f = ( SRASplitterFile* )( self->last_found->child.file );
+            rc = KFileWrite( f->file, f->pos, buf, size, &writ );
+            if ( rc == 0 )
+            {
+                f->pos += writ;
+                if ( f->curr_spot != spot && spot != 0 )
+                {
+                     f->curr_spot = spot;
+                     f->spot_qty = f->spot_qty + 1;
+                }
+                if ( g_filer->curr_spot != spot && spot != 0 )
+                {
+                    g_filer->curr_spot = spot;
+                    g_filer->spot_qty = g_filer->spot_qty + 1;
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t SRASplitter_FileWritePos( const SRASplitter* cself, spotid_t spot, 
+                               uint64_t pos, const void* buf, size_t size )
+{
+    SRASplitter* self = NULL;
+
+    rc_t rc = SRASplitter_ResolveSelf( cself, rcWriting, &self );
+    if ( rc == 0 )
+    {
+        if ( self->last_found == NULL )
+        {
+            rc = RC( rcExe, rcFile, rcWriting, rcDirEntry, rcUnknown );
+        }
+        else if ( buf != NULL && size > 0 )
+        {
+            const SRASplitterFile* f = self->last_found->child.file;
+            /* remember last position */
+            uint64_t old_pos = f->pos;
+            ( ( SRASplitterFile* ) f )->pos = pos;
+            /* write to requested position */
+            rc = SRASplitter_FileWrite( cself, spot, buf, size );
+            if ( f->pos < old_pos )
+            {
+                /* revert to last position if wrote less than it was */
+                ( ( SRASplitterFile* ) f )->pos = old_pos;
+            }
+        }
+    }
+    return rc;
+}
+
+/* ### Common splitter factory code ##################################################### */
+
+rc_t SRASplitterFactory_Make(const SRASplitterFactory** cself, ESRASplitterTypes type, size_t type_size,
+                             SRASplitterFactory_Init_Func* init, SRASplitterFactory_NewObj_Func* newObj,
+                             SRASplitterFactory_Release_Func* release)
+{
+    SRASplitterFactory* self = NULL;
+
+    if( cself == NULL || newObj == NULL ) {
+        return RC(rcExe, rcType, rcAllocating, rcParam, rcNull);
+    }
+    self = calloc(1, type_size + sizeof(*self));
+    if( self == NULL ) {
+        return RC(rcExe, rcType, rcAllocating, rcMemory, rcExhausted);
+    }
+    self->magic = SRASplitterFactory_MAGIC;
+    self->type = type;
+    self->Init = init;
+    self->NewObj = newObj;
+    self->Release = release;
+
+    /* shift pointer to after hidden structure */
+    self++;
+    *cself = self;
+    return 0;
+}
+
+static
+rc_t SRASplitterFactory_ResolveSelf(const SRASplitterFactory* self, enum RCContext ctx, SRASplitterFactory** resolved)
+{
+    if( self == NULL || resolved == NULL ) {
+        return RC(rcExe, rcType, ctx, rcSelf, rcNull);
+    }
+    *resolved = (SRASplitterFactory*)--self;
+    /* just to validate that it is full instance */
+    if( (*resolved)->magic != SRASplitterFactory_MAGIC ) {
+        *resolved = NULL;
+        return RC(rcExe, rcType, ctx, rcMemory, rcCorrupt);
+    }
+    return 0;
+}
+
+void SRASplitterFactory_Release(const SRASplitterFactory* cself)
+{
+    rc_t rc = 0;
+    SRASplitterFactory* self = NULL;
+
+    if( cself != NULL ) {
+        if( (rc = SRASplitterFactory_ResolveSelf(cself, rcReleasing, &self)) == 0 ) {
+            SRASplitterFactory_Release(self->next);
+            if( self->Release != NULL ) {
+                self->Release(cself);
+            }
+            free(self);
+        }
+    }
+    if( rc != 0 ) {
+        LOGERR(klogErr, rc, "SRASplitterFactory");
+    }
+}
+
+ESRASplitterTypes SRASplitterFactory_GetType(const SRASplitterFactory* cself)
+{
+    rc_t rc = 0;
+    SRASplitterFactory* self = NULL;
+
+    if( (rc = SRASplitterFactory_ResolveSelf(cself, rcClassifying, &self)) == 0 ) {
+        return self->type;
+    }
+    LOGERR(klogErr, rc, "SRASplitterFactory");
+    return 0;
+}
+
+rc_t SRASplitterFactory_AddNext(const SRASplitterFactory* cself, const SRASplitterFactory* next)
+{
+    rc_t rc = 0;
+    SRASplitterFactory* self = NULL;
+
+    if( (rc = SRASplitterFactory_ResolveSelf(cself, rcAttaching, &self)) == 0 ) {
+        if( self->type == eSplitterFormat && next != NULL ) {
+            /* formatter must be last in chain */
+            rc = RC(rcExe, rcType, rcAttaching, rcConstraint, rcViolated);
+        } else {
+            SRASplitterFactory_Release(self->next);
+            self->next = next;
+        }
+    }
+    return rc;
+}
+
+rc_t SRASplitterFactory_Init(const SRASplitterFactory* cself)
+{
+    rc_t rc = 0;
+    SRASplitterFactory* self = NULL;
+
+    if( (rc = SRASplitterFactory_ResolveSelf(cself, rcConstructing, &self)) == 0 ) {
+        if( self->Init ) {
+            rc = self->Init(cself);
+        }
+        if( rc == 0 ) {
+            if( self->next != NULL ) {
+                rc = SRASplitterFactory_Init(self->next);
+            } else if( self->type != eSplitterFormat ) {
+                /* formatter must be last in chain */
+                rc = RC(rcExe, rcType, rcConstructing, rcConstraint, rcViolated);
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t SRASplitterFactory_NewObj(const SRASplitterFactory* cself, const SRASplitter** splitter)
+{
+    rc_t rc = 0;
+    SRASplitterFactory* self = NULL;
+
+    if( (rc = SRASplitterFactory_ResolveSelf(cself, rcConstructing, &self)) == 0 ) {
+        if( (rc = self->NewObj(cself, splitter)) == 0 ) {
+            SRASplitter* sp = NULL;
+            if( (rc = SRASplitter_ResolveSelf(*splitter, rcConstructing, &sp)) == 0 ) {
+                sp->type = self->type;
+                if( (self->type == eSplitterSpot   && (!sp->GetKey ||  sp->GetKeySet ||  sp->Dump) ) ||
+                    (self->type == eSplitterRead   && ( sp->GetKey || !sp->GetKeySet ||  sp->Dump) ) ||
+                    (self->type == eSplitterFormat && ( sp->GetKey ||  sp->GetKeySet || !sp->Dump) ) ) {
+                    SRASplitter_Release(*splitter);
+                    *splitter = NULL;
+                    rc = RC(rcExe, rcType, rcAllocating, rcInterface, rcInvalid);
+                } else if(self->type != eSplitterFormat) {
+                    sp->next_fact = self->next;
+                }
+            }
+        }
+    }
+    return rc;
+}
diff --git a/tools/sra-dump/factory.h b/tools/sra-dump/factory.h
new file mode 100644
index 0000000..d3075c0
--- /dev/null
+++ b/tools/sra-dump/factory.h
@@ -0,0 +1,194 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_tools_dump_factory
+#define _h_tools_dump_factory
+
+#include <klib/rc.h>
+#include <kfs/file.h>
+#include <klib/data-buffer.h>
+#include <sra/sradb.h>
+
+#define DATABUFFER_INC_SZ 4096
+
+/* KDataBuffer is used as byte buffer-only here! */
+#define IF_BUF(expr, buf, writ) \
+    while( (rc = (expr)) != 0 && \
+           (GetRCObject(rc) == rcMemory || GetRCObject(rc) == ( enum RCObject )rcBuffer) && \
+           (GetRCState(rc) == rcInsufficient || GetRCState(rc) == rcExhausted) ) { \
+        SRA_DUMP_DBG(10, ("\n%s grow buffer from %u to %u\n", __func__, buf->elem_count, writ + DATABUFFER_INC_SZ)); \
+        if( (rc = KDataBufferResize(buf, writ + DATABUFFER_INC_SZ)) != 0 ) { \
+            break; \
+        } \
+    } \
+    if( rc == 0 )
+
+typedef enum {
+    eSplitterSpot = 1,
+    eSplitterRead,
+    eSplitterFormat /* in splitters chain this type must be the last instance and must write to file(s) */
+} ESRASplitterTypes;
+
+typedef struct SRASplitter SRASplitter;
+
+#define NREADS_MAX (8*1024)
+typedef uint8_t readmask_t; 
+extern uint32_t nreads_max;
+
+/* new hack to realize changed requirement for quality-filter */
+#define DEF_QUAL_N_LIMIT 10
+extern uint32_t quality_N_limit;
+
+extern bool g_legacy_report;
+
+#define make_readmask(m) readmask_t m[NREADS_MAX]
+#define copy_readmask(src,dst) (memcpy(dst, src, sizeof(readmask_t) * nreads_max))
+#define reset_readmask(m) (memset(m, ~0, sizeof(readmask_t) * nreads_max))
+#define clear_readmask(m) (memset(m,  0, sizeof(readmask_t)  * nreads_max))
+#define set_readmask(m,id) (id < nreads_max ? (m)[id] = 1 : 0)
+#define unset_readmask(m,id) (id < nreads_max ? (m)[id] = 0 : 0)
+#define get_readmask(m,id) (id < nreads_max ? ((m)[id]) : 0)
+#define isset_readmask(m,id) (id < nreads_max ? (m)[id] != 0 : false)
+
+typedef struct SRASplitter_Keys_struct {
+    const char* key;
+    make_readmask(readmask);
+} SRASplitter_Keys;
+
+/* for eSpot splitter: returns pointer to key and (optionally) modified readmask, based on spotid and readmask
+   key == NULL stops further processing of the spot, char* key alloc and dealloc must be handled by splitter itself
+ */
+typedef rc_t (SRASplitter_GetKey_Func)(const SRASplitter* self, const char** key, spotid_t spot, readmask_t* readmask);
+
+/* for eRead splitter:
+   returns array of keys and readmasks used array portion count in keys, based on spotid and readmask,
+   on return keys shows number of array key[] elements used, keys == 0 stops further processing of the spot,
+   elements with key.key == NULL OR key.readmask == 0 are skipped
+   key alloc and dealloc must be handled by splitter itself
+*/
+typedef rc_t (SRASplitter_GetKeySet_Func)(const SRASplitter* self, const SRASplitter_Keys** key, uint32_t* keys, spotid_t spot, const readmask_t* readmask);
+
+/* writes data to file(s) using SRASplitter_File* functions, based on spot and readmask
+   do NOT open or create any files directly here, use SRASplitter_FileXXX functions only!
+*/
+typedef rc_t (SRASplitter_Dump_Func)(const SRASplitter* self, spotid_t spot, const readmask_t* readmask);
+
+/* optional method to free splitter resources, object distruction is handled automatically, do NOT free self! */
+typedef rc_t (SRASplitter_Release_Func)(const SRASplitter* self);
+
+/**
+  * Base type constructor, must be called when constructing custom splitter type
+  */
+rc_t SRASplitter_Make(const SRASplitter** self, size_t type_size, /* sizeof(derived object) */
+                      /* mandatory only for eSpot splitter, must be NULL for other types */
+                      SRASplitter_GetKey_Func*,
+                      /* mandatory only for eRead splitter, must be NULL for other types */
+                      SRASplitter_GetKeySet_Func*,
+                      /* mandatory only for eFormat splitter, must be NULL for other types */
+                      SRASplitter_Dump_Func*,
+                      /* optional destructor, do NOT free self! */
+                      SRASplitter_Release_Func* release);
+/**
+  * Base type destructor
+  */
+rc_t SRASplitter_Release(const SRASplitter* self);
+
+/**
+  * Add spot to processing chain
+  */
+rc_t SRASplitter_AddSpot(const SRASplitter* self, spotid_t spot, readmask_t* readmask);
+
+/**
+  * File access routines
+  */
+/* key [IN] - usually file type extension: .sff, .fastq, _nse.txt, etc */
+rc_t SRASplitter_FileActivate(const SRASplitter* self, const char* key);
+/* CAREFULL!!! these operates on last active file
+   spot can be zero to indicate file header/footer
+   which no considered as actual data and file treated as empty if no actual spots is written
+ */
+rc_t SRASplitter_FileWrite( const SRASplitter* cself, spotid_t spot, const void* buf, size_t size );
+rc_t SRASplitter_FileWritePos( const SRASplitter* cself, spotid_t spot, uint64_t pos, const void* buf, size_t size );
+
+typedef struct SRASplitterFactory SRASplitterFactory;
+
+typedef rc_t (SRASplitterFactory_Init_Func)(const SRASplitterFactory* self);
+typedef rc_t (SRASplitterFactory_NewObj_Func)(const SRASplitterFactory* self, const SRASplitter** splitter);
+typedef void (SRASplitterFactory_Release_Func)(const SRASplitterFactory* self);
+
+
+/**
+  * Initialize factories file handler object.
+  * Must be called BEFORE 1st call to SRASplitterFactory_Init
+  *
+  * key_as_dir [IN] - if true, subdirs created for each splitting level: SPOT_GROUP/1/prefix.fastq
+  *                   if false, single file is used in split chain: prefix_SPOT_GROUP_1.fastq
+  * prefix [IN]     - file name prefix, usually run id (accession)
+  * path, ... [IN]  - path to directory where file will reside
+  */
+rc_t SRASplitterFactory_FilerInit(bool to_stdout, bool gzip, bool bzip2, bool key_as_dir, bool keep_empty, const char* path, ...);
+/* this only works correctly on top of the splitter tree !! */
+rc_t SRASplitterFactory_FilerPrefix(const char* prefix);
+void SRASplitterFactory_FilerReport(uint64_t* total, uint64_t* biggest_file);
+void SRASplitterFiler_Release(void);
+
+/**
+  * Create factory object
+  */
+rc_t SRASplitterFactory_Make(const SRASplitterFactory** self, ESRASplitterTypes type, size_t type_size,
+                             /* optional method to initialize self */
+                             SRASplitterFactory_Init_Func* init,
+                             /* mandatory method to spawn new SRASplitter object */
+                             SRASplitterFactory_NewObj_Func* newObj,
+                             /* optional destructor, should NOT free self!!! */
+                             SRASplitterFactory_Release_Func* release);
+
+/**
+  * Releases Factory and all chained factories
+  */
+void SRASplitterFactory_Release(const SRASplitterFactory* self);
+
+/**
+  * Get Factory type
+  */
+ESRASplitterTypes SRASplitterFactory_GetType(const SRASplitterFactory* self);
+
+/**
+  * Chain "next" factory after "self", releases old chain if present
+  */
+rc_t SRASplitterFactory_AddNext(const SRASplitterFactory* self, const SRASplitterFactory* next);
+
+/**
+  * Initialize a chain of factories. Factories must be chaind properly before init.
+  * Type chain must look like (eSpot|eRead)*, eFormat.
+  */
+rc_t SRASplitterFactory_Init(const SRASplitterFactory* self);
+
+/**
+  * Create new instance of factory kind, point splitter to next factory in chain
+  */
+rc_t SRASplitterFactory_NewObj(const SRASplitterFactory* self, const SRASplitter** splitter);
+
+#endif /* _h_tools_dump_factory */
diff --git a/tools/sra-dump/fasta_dump.c b/tools/sra-dump/fasta_dump.c
new file mode 100644
index 0000000..2ef3ac9
--- /dev/null
+++ b/tools/sra-dump/fasta_dump.c
@@ -0,0 +1,752 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/rc.h>
+#include <klib/out.h>
+#include <klib/text.h>
+#include <klib/log.h>
+#include <klib/printf.h>
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+
+#include <kfs/file.h>
+#include <kfs/directory.h>
+#include <kfs/buffile.h>
+#include <kfs/bzip.h>
+#include <kfs/gzip.h>
+
+#include <vdb/manager.h>
+
+#include <align/manager.h>
+#include <align/reference.h>
+
+#include <sra/srapath.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+
+static bool string_ends_with( const char * s, const char * pattern )
+{
+    const char * found = strstr ( s, pattern );
+    if ( found == NULL )
+        return false;
+    else
+    {
+        size_t len_string = string_size ( s );
+        size_t len_pattern = string_size ( pattern );
+        size_t found_at = ( found - s );
+        return ( found_at == ( len_string - len_pattern ) );
+    }
+}
+
+
+static char * fasta_ref = "--fastaref";
+
+/* we have to test if argv[0] ends in 'fastq-dump' or 'fastq-dump.exe',
+   and we have an argument called '--fasta' */
+bool fasta_dump_requested( int argc, char* argv[] )
+{
+    if ( string_ends_with( argv[ 0 ], "fastq-dump" ) ||
+         string_ends_with( argv[ 0 ], "fastq-dump.exe" ) )
+    {
+        int i;
+        for ( i = 1; i < argc; ++i )
+        {
+            if ( strcmp( argv[ i ], fasta_ref ) == 0 )
+                return true;
+        }
+    }
+
+    return false;
+}
+
+#define OPTION_OUTF    "outfile"
+#define ALIAS_OUTF     "o"
+
+#define OPTION_WIDTH   "width"
+#define ALIAS_WIDTH    "w"
+
+#define OPTION_GZIP    "gzip"
+#define ALIAS_GZIP     NULL
+
+#define OPTION_BZIP    "bzip2"
+#define ALIAS_BZIP     NULL
+
+#define OPTION_REFNAME "refname"
+#define ALIAS_REFNAME  "r"
+
+#define OPTION_FROM    "from"
+#define ALIAS_FROM     "N"
+
+#define OPTION_LENGTH   "length"
+#define ALIAS_LENGTH    "X"
+
+#define OPTION_FAREF    "fastaref"
+#define ALIAS_FAREF     NULL
+
+
+OptDef MyOptions[] =
+{
+    /*name,           alias,         hfkt, usage-help,    maxcount, needs value, required */
+    { OPTION_OUTF,    ALIAS_OUTF,    NULL, NULL,          1,        true,        false },
+    { OPTION_WIDTH,   ALIAS_WIDTH,   NULL, NULL,          1,        true,        false },
+    { OPTION_GZIP,    ALIAS_GZIP,    NULL, NULL,          1,        false,       false },
+    { OPTION_BZIP,    ALIAS_BZIP,    NULL, NULL,          1,        false,       false },
+    { OPTION_REFNAME, ALIAS_REFNAME, NULL, NULL,          0,        true,        false },
+    { OPTION_FROM,    ALIAS_FROM,    NULL, NULL,          1,        true,        false },
+    { OPTION_LENGTH,  ALIAS_LENGTH,  NULL, NULL,          1,        true,        false },
+    { OPTION_FAREF,   ALIAS_FAREF,   NULL, NULL,          1,        false,       false }
+};
+
+
+/* =========================================================================================== */
+
+
+/* GLOBAL VARIABLES */
+struct {
+    KWrtWriter org_writer;
+    void* org_data;
+    KFile* kfile;
+    uint64_t pos;
+} g_out_writer = { NULL };
+
+
+/* =========================================================================================== */
+
+static rc_t get_str_option( const Args *args, const char *name, const char ** res )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    *res = NULL;
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "ArgsOptionCount() failed" );
+    }
+    else
+    {
+        if ( count > 0 )
+        {
+            rc = ArgsOptionValue( args, name, 0, (const void **)res );
+            if ( rc != 0 )
+            {
+                LOGERR( klogInt, rc, "ArgsOptionValue() failed" );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t get_bool_option( const Args *args, const char *name, bool *res, const bool def )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    if ( rc == 0 && count > 0 )
+    {
+        *res = true;
+    }
+    else
+    {
+        *res = def;
+    }
+    return rc;
+}
+
+
+static rc_t get_int_option( const Args *args, const char *name, uint32_t *res, const uint32_t def )
+{
+    const char * s;
+    rc_t rc = get_str_option( args, name, &s );
+    *res = def;
+    if ( rc == 0 && s != NULL )
+    {
+        *res = atoi( s );
+    }
+    return rc;
+}
+
+
+/* =========================================================================================== */
+
+
+static rc_t CC BufferedWriter ( void* self, const char* buffer, size_t bufsize, size_t* num_writ )
+{
+    rc_t rc = 0;
+
+    assert( buffer != NULL );
+    assert( num_writ != NULL );
+
+    do {
+        rc = KFileWrite( g_out_writer.kfile, g_out_writer.pos, buffer, bufsize, num_writ );
+        if ( rc == 0 )
+        {
+            buffer += *num_writ;
+            bufsize -= *num_writ;
+            g_out_writer.pos += *num_writ;
+        }
+    } while ( rc == 0 && bufsize > 0 );
+    return rc;
+}
+
+
+static rc_t set_stdout_to( bool gzip, bool bzip2, const char * filename, size_t bufsize )
+{
+    rc_t rc = 0;
+    if ( gzip && bzip2 )
+    {
+        rc = RC( rcApp, rcFile, rcConstructing, rcParam, rcAmbiguous );
+    }
+    else
+    {
+        KDirectory *dir;
+        rc = KDirectoryNativeDir( &dir );
+        if ( rc != 0 )
+            LOGERR( klogInt, rc, "KDirectoryNativeDir() failed" );
+        else
+        {
+            KFile *of;
+            rc = KDirectoryCreateFile ( dir, &of, false, 0664, kcmInit, "%s", filename );
+            if ( rc == 0 )
+            {
+                KFile *buf;
+                if ( gzip )
+                {
+                    KFile *gz;
+                    rc = KFileMakeGzipForWrite( &gz, of );
+                    if ( rc == 0 )
+                    {
+                        KFileRelease( of );
+                        of = gz;
+                    }
+                }
+                if ( bzip2 )
+                {
+                    KFile *bz;
+                    rc = KFileMakeBzip2ForWrite( &bz, of );
+                    if ( rc == 0 )
+                    {
+                        KFileRelease( of );
+                        of = bz;
+                    }
+                }
+
+                rc = KBufFileMakeWrite( &buf, of, false, bufsize );
+                if ( rc == 0 )
+                {
+                    g_out_writer.kfile = buf;
+                    g_out_writer.org_writer = KOutWriterGet();
+                    g_out_writer.org_data = KOutDataGet();
+                    rc = KOutHandlerSet( BufferedWriter, &g_out_writer );
+                    if ( rc != 0 )
+                        LOGERR( klogInt, rc, "KOutHandlerSet() failed" );
+                }
+                KFileRelease( of );
+            }
+            KDirectoryRelease( dir );
+        }
+    }
+    return rc;
+}
+
+
+static void release_stdout_redirection( void )
+{
+    KFileRelease( g_out_writer.kfile );
+    if( g_out_writer.org_writer != NULL )
+    {
+        KOutHandlerSet( g_out_writer.org_writer, g_out_writer.org_data );
+    }
+    g_out_writer.org_writer = NULL;
+}
+
+
+static rc_t CC write_to_FILE( void *f, const char *buffer, size_t bytes, size_t *num_writ )
+{
+    * num_writ = fwrite ( buffer, 1, bytes, f );
+    if ( * num_writ != bytes )
+        return RC( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+    return 0;
+}
+
+
+/* =========================================================================================== */
+
+typedef struct fasta_options
+{
+    uint32_t width;
+    bool gzip;
+    bool bzip;
+    const char * outfile;
+    INSDC_coord_zero from;
+    INSDC_coord_len length;
+} fasta_options;
+
+
+static rc_t get_fasta_options( Args * args, fasta_options *opts )
+{
+    rc_t rc = get_int_option( args, OPTION_WIDTH, &opts->width, 80 );
+
+    if ( rc == 0 )
+        rc = get_str_option( args, OPTION_OUTF, &opts->outfile );
+
+    if ( rc == 0 )
+        rc = get_bool_option( args, OPTION_GZIP, &opts->gzip, false );
+
+    if ( rc == 0 )
+        rc = get_bool_option( args, OPTION_BZIP, &opts->bzip, false );
+
+    if ( rc == 0 )
+    {
+        uint32_t x;
+        rc = get_int_option( args, OPTION_FROM, &x, 0 );
+        if ( rc == 0 )
+            opts->from = x;
+    }
+
+    if ( rc == 0 )
+    {
+        uint32_t x;
+        rc = get_int_option( args, OPTION_LENGTH, &x, 0 );
+        if ( rc == 0 )
+            opts->length = x;
+    }
+
+    return rc;
+}
+
+/* =========================================================================================== */
+
+#if TOOLS_USE_SRAPATH != 0
+static bool is_this_a_filesystem_path( const char * path )
+{
+    bool res = false;
+    size_t i, n = string_size ( path );
+    for ( i = 0; i < n && !res; ++i )
+    {
+        char c = path[ i ];
+        res = ( c == '.' || c == '/' || c == '\\' );
+    }
+    return res;
+}
+#endif
+
+#if TOOLS_USE_SRAPATH != 0
+static char *translate_accession( SRAPath *my_sra_path,
+                           const char *accession,
+                           const size_t bufsize )
+{
+    rc_t rc;
+    char * res = calloc( 1, bufsize );
+    if ( res == NULL ) return NULL;
+
+    rc = SRAPathFind( my_sra_path, accession, res, bufsize );
+    if ( GetRCState( rc ) == rcNotFound )
+    {
+        free( res );
+        return NULL;
+    }
+    else if ( GetRCState( rc ) == rcInsufficient )
+    {
+        free( res );
+        return translate_accession( my_sra_path, accession, bufsize * 2 );
+    }
+    else if ( rc != 0 )
+    {
+        free( res );
+        return NULL;
+    }
+    return res;
+}
+#endif
+
+#if TOOLS_USE_SRAPATH != 0
+static rc_t resolve_accession( const KDirectory *my_dir, char ** path )
+{
+    SRAPath *my_sra_path;
+    rc_t rc = 0;
+
+    if ( strchr ( *path, '/' ) != NULL )
+        return 0;
+
+    rc = SRAPathMake( &my_sra_path, my_dir );
+    if ( rc != 0 )
+    {
+        if ( GetRCState ( rc ) != rcNotFound || GetRCTarget ( rc ) != rcDylib )
+        {
+            if ( rc != 0 )
+                LOGERR( klogInt, rc, "SRAPathMake() failed" );
+        }
+        else
+            rc = 0;
+    }
+    else
+    {
+        if ( !SRAPathTest( my_sra_path, *path ) )
+        {
+            char *buf = translate_accession( my_sra_path, *path, 64 );
+            if ( buf != NULL )
+            {
+                free( (char*)(*path) );
+                *path = buf;
+            }
+        }
+        SRAPathRelease( my_sra_path );
+    }
+    return rc;
+}
+#endif
+
+/* =========================================================================================== */
+
+
+typedef struct fasta_ctx
+{
+    KDirectory *dir;
+    const VDBManager *vdb_mgr;
+    const AlignMgr *almgr;
+} fasta_ctx;
+
+
+static rc_t dump_reference_loop( fasta_options *opts, const ReferenceObj* refobj )
+{
+    rc_t rc = 0;
+    uint8_t * buffer = malloc( opts->width + 2 );
+    if ( buffer == NULL )
+    {
+        rc = RC( rcExe, rcNoTarg, rcListing, rcMemory, rcExhausted );
+        LOGERR( klogInt, rc, "allocating reference-buffer failed!" );
+    }
+    else
+    {
+        INSDC_coord_zero pos = opts->from;
+        INSDC_coord_len w = opts->length;
+
+        while ( w > 0 && rc == 0 )
+        {
+            INSDC_coord_len written;
+            INSDC_coord_len to_read = ( w > opts->width ? opts->width : w );
+            rc = ReferenceObj_Read( refobj, pos, to_read, buffer, &written );
+            if ( rc != 0 )
+                LOGERR( klogInt, rc, "ReferenceObj_Read() failed" );
+            else
+            {
+                OUTMSG(( "%.*s\n", written, buffer ));
+                w -= written;
+                pos += written;
+            }
+        }
+        free( buffer );
+    }
+    return rc;
+}
+
+
+static rc_t dump_reference( fasta_options *opts, const ReferenceObj* refobj )
+{
+    const char * name;
+    rc_t rc = ReferenceObj_Name( refobj, &name );
+    if ( rc != 0 )
+        LOGERR( klogInt, rc, "ReferenceObj_Name() failed!" );
+    else
+    {
+        INSDC_coord_len seq_len;
+        rc = ReferenceObj_SeqLength( refobj, &seq_len );
+        if ( rc != 0 )
+            LOGERR( klogInt, rc, "ReferenceObj_SeqLength() failed!" );
+        else
+        {
+            if ( opts->from == 0 )
+            {
+                if ( opts->length == 0 )
+                    opts->length = seq_len;
+            }
+            else
+            {
+                if ( opts->length == 0 )
+                    opts->length = ( seq_len - opts->from );
+            }
+            if ( opts->from >= seq_len )
+            {
+                rc = RC( rcExe, rcNoTarg, rcListing, rcParam, rcInvalid );
+                LOGERR( klogInt, rc, "reference-start-point beyond reference-end!" );
+            }
+            else
+            {
+                if ( opts->from + opts->length > seq_len )
+                    opts->length = ( seq_len - opts->from );
+                OUTMSG(( ">%s|from %u|%u bases\n", name, opts->from, opts->from + opts->length -1 ));
+                rc = dump_reference_loop( opts, refobj );
+            }
+        }
+    }
+    return 0;
+}
+
+
+static rc_t dump_all_reference( fasta_options *opts, const ReferenceList* reflist )
+{
+    uint32_t count;
+    rc_t rc = ReferenceList_Count( reflist, &count );
+    if ( rc != 0 )
+        LOGERR( klogInt, rc, "ReferenceList_Count() failed!" );
+    else
+    {
+        uint32_t i;
+        for ( i = 0; i < count && rc == 0; ++i )
+        {
+            const ReferenceObj* refobj;
+            rc = ReferenceList_Get( reflist, &refobj, i );
+            if ( rc != 0 )
+                LOGERR( klogInt, rc, "ReferenceList_Get() failed!" );
+            else
+                rc = dump_reference( opts, refobj );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t foreach_refname( Args * args, fasta_options *opts, fasta_ctx *ctx, const char * path )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, OPTION_REFNAME, &count );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "ArgsOptionCount( REFNAME ) failed" );
+    }
+    else
+    {
+        const ReferenceList* reflist;
+
+        rc = ReferenceList_MakePath( &reflist, ctx->vdb_mgr, path,
+                        ereferencelist_usePrimaryIds, 0, NULL, 0 );
+        if ( rc != 0 )
+            LOGERR( klogInt, rc, "ReferenceList_MakePath() failed!" );
+        else
+        {
+            if ( count == 0 )
+            {
+                /* dump all references... */
+                rc = dump_all_reference( opts, reflist );
+            }
+            else
+            {
+                uint32_t i;
+                for ( i = 0; i < count && rc == 0; ++i )
+                {
+                    const char * refname;
+                    rc = ArgsOptionValue( args, OPTION_REFNAME, 0, (const void **)&refname );
+                    if ( rc != 0 )
+                    {
+                        LOGERR( klogInt, rc, "ArgsOptionValue( REFNAME ) failed" );
+                    }
+                    else
+                    {
+                        const ReferenceObj* refobj;
+                        rc = ReferenceList_Find( reflist, &refobj, refname, string_size( refname ) );
+                        if ( rc != 0 )
+                            LOGERR( klogInt, rc, "ReferenceList_Find() failed" );
+                        else
+                            rc = dump_reference( opts, refobj );
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t foreach_argument( Args * args, fasta_options *opts, fasta_ctx *ctx )
+{
+    uint32_t count;
+    rc_t rc = ArgsParamCount( args, &count );
+    if ( rc != 0 )
+        LOGERR( klogInt, rc, "ArgsParamCount() failed" );
+    else
+    {
+        uint32_t idx;
+        if ( count < 1 )
+        {
+            rc = RC( rcExe, rcNoTarg, rcListing, rcParam, rcEmpty );
+            LOGERR( klogInt, rc, "no source-files given!" );
+        }
+        else
+        {
+            for ( idx = 0; idx < count && rc == 0; ++idx )
+            {
+                const char *param = NULL;
+                rc = ArgsParamValue( args, idx, (const void **)&param );
+                if ( rc != 0 )
+                    LOGERR( klogInt, rc, "ArgsParamvalue() failed" );
+                else
+                {
+                    char *path = string_dup_measure ( param, NULL );
+                    if ( path == NULL )
+                    {
+                        rc = RC( rcExe, rcNoTarg, rcListing, rcMemory, rcExhausted );
+                        LOGERR( klogInt, rc, "allocating path to source-file failed!" );
+                    }
+                    else
+                    {
+
+#if TOOLS_USE_SRAPATH != 0
+                        if ( !is_this_a_filesystem_path( path ) )
+                        {
+                            rc = resolve_accession( ctx->dir, &path );
+                        }
+#endif
+
+                        if ( rc == 0 )
+                        {
+                            rc = foreach_refname( args, opts, ctx, path );
+                        }
+                        free( path );
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t fasta_main( Args * args, fasta_options *opts )
+{
+    rc_t rc;
+    fasta_ctx ctx;
+
+    memset( &ctx, 0, sizeof ctx );
+    rc = KDirectoryNativeDir( &ctx.dir );
+    if ( rc != 0 )
+        LOGERR( klogInt, rc, "KDirectoryNativeDir() failed" );
+    else
+    {
+        rc = VDBManagerMakeRead ( &ctx.vdb_mgr, ctx.dir );
+        if ( rc != 0 )
+            LOGERR( klogInt, rc, "VDBManagerMakeRead() failed" );
+        else
+        {
+            rc = AlignMgrMakeRead ( &ctx.almgr );
+            if ( rc != 0 )
+                LOGERR( klogInt, rc, "AlignMgrMake() failed" );
+            else
+            {
+                rc = foreach_argument( args, opts, &ctx );
+                AlignMgrRelease ( ctx.almgr );
+            }
+            VDBManagerRelease( ctx.vdb_mgr );
+        }
+        KDirectoryRelease( ctx.dir );
+    }
+    return rc;
+}
+
+/* =========================================================================================== */
+
+
+rc_t fasta_dump( int argc, char* argv[] )
+{
+    rc_t rc = KOutHandlerSet( write_to_FILE, stdout );
+    if ( rc != 0 )
+        LOGERR( klogInt, rc, "KOutHandlerSet() failed" );
+    else
+    {
+        Args * args;
+
+        KLogHandlerSetStdErr();
+        rc = ArgsMakeAndHandle( &args, argc, argv, 1,
+            MyOptions, sizeof MyOptions / sizeof MyOptions [ 0 ] );
+        if ( rc == 0 )
+        {
+            fasta_options opts;
+            rc = get_fasta_options( args, &opts );
+            if ( rc == 0 )
+            {
+                if ( opts.outfile != NULL )
+                {
+                    rc = set_stdout_to( opts.gzip,
+                                        opts.bzip,
+                                        opts.outfile,
+                                        32 * 1024 );
+                }
+
+                if ( rc == 0 )
+                {
+                    /* ============================== */
+                    rc = fasta_main( args, &opts );
+                    /* ============================== */
+                }
+
+                if ( opts.outfile != NULL )
+                    release_stdout_redirection();
+            }
+            ArgsWhack( args );
+        }
+    }
+    return rc;
+}
+
+
+static const char * outf_usage[]     = { "output to stdout if omitted", NULL };
+static const char * width_usage[]    = { "default = 80 bases", NULL };
+static const char * gzip_usage[]     = { "for file and stdout", NULL };
+static const char * bzip_usage[]     = { "for file and stdout", NULL };
+static const char * refname_usage[]  = { "multiple ref's permitted", NULL };
+static const char * from_usage[]     = { "zero-based", NULL };
+static const char * length_usage[]   = { NULL };
+
+rc_t CC fasta_dump_usage ( const Args * args )
+{
+    rc_t rc;
+    const char * fullname = "fastq-dump";
+    const char * progname = fullname;
+
+    if ( args == NULL )
+        rc = RC( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+        rc = ArgsProgram( args, &fullname, &progname );
+
+    KOutMsg( "\nUsage:\n"
+              "  %s <path> [options]\n"
+              "\n", progname );
+
+    KOutMsg( "Options:\n" );
+
+    HelpOptionLine( ALIAS_OUTF,    OPTION_OUTF,    "output-file", outf_usage );
+    HelpOptionLine( ALIAS_WIDTH,   OPTION_WIDTH,   "bases per line", width_usage );
+    HelpOptionLine( ALIAS_GZIP,    OPTION_GZIP,    "output gzipped", gzip_usage );
+    HelpOptionLine( ALIAS_BZIP,    OPTION_BZIP,    "output bzipped", bzip_usage );
+    HelpOptionLine( ALIAS_REFNAME, OPTION_REFNAME, "reference to dump", refname_usage );
+    HelpOptionLine( ALIAS_FROM,    OPTION_FROM,    "start-offset", from_usage );
+    HelpOptionLine( ALIAS_LENGTH,  OPTION_LENGTH,  "length of sequence", length_usage );
+
+    HelpOptionsStandard ();
+    HelpVersion ( fullname, KAppVersion() );
+    return rc;
+}
diff --git a/tools/sra-dump/fasta_dump.h b/tools/sra-dump/fasta_dump.h
new file mode 100644
index 0000000..9d3fe8a
--- /dev/null
+++ b/tools/sra-dump/fasta_dump.h
@@ -0,0 +1,36 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_fasta_dump_hdr_
+#define _h_fasta_dump_hdr_
+
+
+bool fasta_dump_requested( int argc, char* argv[] );
+
+rc_t fasta_dump( int argc, char* argv[] );
+
+rc_t CC fasta_dump_usage ( const Args * args );
+
+#endif
diff --git a/tools/sra-dump/fastq.c b/tools/sra-dump/fastq.c
new file mode 100644
index 0000000..86604de
--- /dev/null
+++ b/tools/sra-dump/fastq.c
@@ -0,0 +1,3800 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/container.h>
+#include <klib/text.h>
+#include <kapp/main.h>
+
+#include <sra/sradb.h>
+#include <sra/types.h>
+#include <sra/fastq.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <strtol.h>
+
+#include "core.h"
+#include "debug.h"
+
+#define DATABUFFERINITSIZE 10240
+
+typedef struct TAlignedRegion_struct
+{
+    const char* name;
+    uint32_t name_len;
+    /* 1-based, 0 - means not set */
+    uint64_t from;
+    uint64_t to;
+} TAlignedRegion;
+
+
+typedef struct TMatepairDistance_struct
+{
+    uint64_t from;
+    uint64_t to;
+} TMatepairDistance;
+
+
+struct FastqArgs_struct
+{
+    bool is_platform_cs_native;
+
+    int maxReads;
+    bool skipTechnical;
+
+    uint32_t minReadLen;
+    bool applyClip;
+    bool dumpOrigFmt;
+    bool dumpBase;
+    bool dumpCs;
+    bool readIds;
+    bool SuppressQualForCSKey;      /* added Jan 15th 2014 ( a new fastq-variation! ) */
+    int offset;
+    bool qual_filter;
+    bool qual_filter1;
+    const char* b_deffmt;
+    SLList* b_defline;
+    const char* q_deffmt;
+    SLList* q_defline;
+    const char *desiredCsKey;
+    bool split_files;
+    bool split_3;
+    bool split_spot;
+    uint64_t fasta;
+    const char* file_extension;
+    bool aligned;
+    bool unaligned;
+    TAlignedRegion* alregion;
+    uint32_t alregion_qty;
+    bool mp_dist_unknown;
+    TMatepairDistance* mp_dist;
+    uint32_t mp_dist_qty;
+} FastqArgs;
+
+
+typedef enum DefNodeType_enum
+{
+    DefNode_Unknown = 0,
+    DefNode_Text = 1,
+    DefNode_Optional,
+    DefNode_Accession,
+    DefNode_SpotId,
+    DefNode_SpotName,
+    DefNode_SpotGroup,
+    DefNode_SpotLen,
+    DefNode_ReadId,
+    DefNode_ReadName,
+    DefNode_ReadLen,
+    DefNode_Last
+} DefNodeType;
+
+
+typedef struct DefNode_struct
+{
+    SLNode node;
+    DefNodeType type;
+    union
+    {
+        SLList* optional;
+        char* text;
+    } data;
+} DefNode;
+
+
+typedef struct DeflineData_struct
+{
+    rc_t rc;
+    bool optional;
+    union
+    {
+        spotid_t* id;
+        struct
+        {
+            const char* s;
+            size_t sz;
+        } str;
+        uint32_t* u32;
+    } values[ DefNode_Last ];
+    char* buf;
+    size_t buf_sz;
+    size_t* writ;
+} DeflineData;
+
+
+static bool CC Defline_Builder( SLNode *node, void *data )
+{
+    DefNode* n = ( DefNode* )node;
+    DeflineData* d = ( DeflineData* )data;
+    char s[ 256 ];
+    size_t w;
+    int x = 0;
+
+    s[ 0 ] = '\0';
+    switch ( n->type )
+    {
+        case DefNode_Optional :
+            d->optional = true;
+            w = *d->writ;
+            *d->writ = 0;
+            SLListDoUntil( n->data.optional, Defline_Builder, data );
+            x = ( *d->writ == 0 ) ? 0 : 1;
+            d->optional = false;
+            *d->writ = w;
+            if ( x > 0 )
+            {
+                SLListDoUntil( n->data.optional, Defline_Builder, data );
+            }
+            break;
+
+        case DefNode_Text :
+            if ( d->optional )
+            {
+                break;
+            }
+            d->values[n->type].str.s = n->data.text;
+            d->values[n->type].str.sz = strlen( n->data.text );
+
+        case DefNode_Accession :
+        case DefNode_SpotName :
+        case DefNode_SpotGroup :
+        case DefNode_ReadName :
+            if ( d->values[n->type].str.s != NULL )
+            {
+                x = d->values[ n->type ].str.sz;
+                if ( x < sizeof( s ) )
+                {
+                    strncpy( s, d->values[ n->type ].str.s, x );
+                    s[ x ] = '\0';
+                    *d->writ = *d->writ + x;
+                }
+                else
+                {
+                    d->rc = RC( rcExe, rcNamelist, rcExecuting, rcBuffer, rcInsufficient );
+                }
+            }
+            break;
+
+        case DefNode_SpotId :
+            if ( d->values[ n->type ].id != NULL &&
+                ( !d->optional || *d->values[ n->type ].id > 0 ) )
+            {
+                x = snprintf( s, sizeof( s ), "%ld", *d->values[ n->type ].id );
+                if ( x < 0 || x >= sizeof( s ) )
+                {
+                    d->rc = RC( rcExe, rcNamelist, rcExecuting, rcBuffer, rcInsufficient );
+                }
+                else
+                {
+                    *d->writ = *d->writ + x;
+                }
+            }
+            break;
+
+        case DefNode_ReadId :
+        case DefNode_SpotLen :
+        case DefNode_ReadLen :
+            if ( d->values[ n->type] .u32 != NULL &&
+                 ( !d->optional || *d->values[ n->type ].u32 > 0 ) )
+            {
+                x = snprintf( s, sizeof( s ), "%u", *d->values[ n->type ].u32 );
+                if ( x < 0 || x >= sizeof( s ) )
+                {
+                    d->rc = RC( rcExe, rcNamelist, rcExecuting, rcBuffer, rcInsufficient );
+                }
+                else
+                {
+                    *d->writ = *d->writ + x;
+                }
+            }
+            break;
+
+        default:
+            d->rc = RC( rcExe, rcNamelist, rcExecuting, rcId, rcInvalid );
+    } /* switch */
+
+    if ( d->rc == 0 && !d->optional && n->type != DefNode_Optional )
+    {
+        if ( *d->writ < d->buf_sz )
+        {
+            strcat( d->buf, s );
+        }
+        else
+        {
+            d->rc = RC( rcExe, rcNamelist, rcExecuting, rcBuffer, rcInsufficient );
+        }
+    }
+    return d->rc != 0;
+}
+
+
+static rc_t Defline_Bind( DeflineData* data, const char* accession,
+            spotid_t* spotId, const char* spot_name, size_t spotname_sz,
+            const char* spot_group, size_t sgrp_sz, uint32_t* spot_len,
+            uint32_t* readId, const char* read_name, INSDC_coord_len rlabel_sz,
+            INSDC_coord_len* read_len )
+{
+    if ( data == NULL )
+    {
+        return RC( rcExe, rcNamelist, rcExecuting, rcMemory, rcInsufficient );
+    }
+    data->values[ DefNode_Unknown ].str.s = NULL;
+    data->values[ DefNode_Text ].str.s = NULL;
+    data->values[ DefNode_Optional ].str.s = NULL;
+    data->values[ DefNode_Accession ].str.s = accession;
+    data->values[ DefNode_Accession ].str.sz = strlen( accession );
+    data->values[ DefNode_SpotId ].id = spotId;
+    data->values[ DefNode_SpotName ].str.s = spot_name;
+    data->values[ DefNode_SpotName ].str.sz = spotname_sz;
+    data->values[ DefNode_SpotGroup ].str.s = spot_group;
+    data->values[ DefNode_SpotGroup ].str.sz = sgrp_sz;
+    data->values[ DefNode_SpotLen ].u32 = spot_len;
+    data->values[ DefNode_ReadId ].u32 = readId;
+    data->values[ DefNode_ReadName ].str.s = read_name;
+    data->values[ DefNode_ReadName ].str.sz = rlabel_sz;
+    data->values[ DefNode_ReadLen ].u32 = read_len;
+    return 0;
+}
+
+
+static rc_t Defline_Build( const SLList* def, DeflineData* data, char* buf,
+                           size_t buf_sz, size_t* writ )
+{
+    if ( data == NULL )
+    {
+        return RC( rcExe, rcNamelist, rcExecuting, rcMemory, rcInsufficient );
+    }
+
+    data->rc = 0;
+    data->optional = false;
+    data->buf = buf;
+    data->buf_sz = buf_sz;
+    data->writ = writ;
+
+    data->buf[ 0 ] = '\0';
+    *data->writ = 0;
+
+    SLListDoUntil( def, Defline_Builder, data );
+    return data->rc;
+}
+
+
+static rc_t DeflineNode_Add( SLList* list, DefNode** node,
+                            DefNodeType type, const char* text, size_t text_sz )
+{
+    rc_t rc = 0;
+
+    *node = calloc( 1, sizeof( **node ) );
+    if ( *node == NULL )
+    {
+        rc = RC( rcExe, rcNamelist, rcConstructing, rcMemory, rcExhausted );
+    }
+    else if ( type == DefNode_Text && ( text == NULL || text_sz == 0 ) )
+    {
+        rc = RC( rcExe, rcNamelist, rcConstructing, rcParam, rcInvalid );
+    }
+    else
+    {
+        ( *node )->type = type;
+        if ( type == DefNode_Text )
+        {
+            ( *node )->data.text = string_dup( text, text_sz );
+            if ( ( *node )->data.text == NULL )
+            {
+                rc = RC( rcExe, rcNamelist, rcConstructing, rcMemory, rcExhausted );
+                free( *node );
+            }
+        }
+        else if ( type == DefNode_Optional )
+        {
+            ( *node )->data.optional = malloc( sizeof( SLList ) );
+            if ( ( *node )->data.optional == NULL )
+            {
+                rc = RC( rcExe, rcNamelist, rcConstructing, rcMemory, rcExhausted );
+                free( *node );
+            }
+            else
+            {
+                SLListInit( ( *node )->data.optional );
+            }
+        }
+        if ( rc == 0 )
+        {
+            SLListPushTail( list, &( *node )->node );
+        }
+    }
+    return rc;
+}
+
+
+static void Defline_Release( SLList* list );
+
+
+static void CC DeflineNode_Whack( SLNode* node, void* data )
+{
+    if ( node != NULL )
+    {
+        DefNode* n = (DefNode*)node;
+        if ( n->type == DefNode_Text )
+        {
+            free( n->data.text );
+        }
+        else if ( n->type == DefNode_Optional )
+        {
+            Defline_Release( n->data.optional );
+        }
+        free( node );
+    }
+}
+
+
+static void Defline_Release( SLList* list )
+{
+    if ( list != NULL )
+    {
+        SLListForEach( list, DeflineNode_Whack, NULL );
+        free( list );
+    }
+}
+
+
+#if _DEBUGGING
+static void CC Defline_Dump( SLNode* node, void* data )
+{
+    DefNode* n = ( DefNode* )node;
+    const char* s = NULL, *t;
+    if ( n->type == DefNode_Text )
+    {
+        s = n->data.text;
+    }
+    switch ( n->type )
+    {
+        case DefNode_Unknown :      t = "Unknown";   break;
+        case DefNode_Text :         t = "Text";      break;
+        case DefNode_Optional :     t = "Optional";  break;
+        case DefNode_Accession :    t = "Accession"; break;
+        case DefNode_SpotId :       t = "SpotId";    break;
+        case DefNode_SpotName :     t = "SpotName";  break;
+        case DefNode_SpotGroup :    t = "SpotGroup"; break;
+        case DefNode_SpotLen :      t = "SpotLen";   break;
+        case DefNode_ReadId :       t = "ReadId";    break;
+        case DefNode_ReadName :     t = "ReadName";  break;
+        case DefNode_ReadLen :      t = "ReadLen";   break;
+        default :  t = "ERROR";
+    }
+
+    SRA_DUMP_DBG( 3, ( "%s type %s", data, t ) );
+    if ( s )
+    {
+        SRA_DUMP_DBG( 3, ( ": '%s'", s ) );
+    }
+    SRA_DUMP_DBG( 3, ( "\n" ) );
+    if ( n->type == DefNode_Optional )
+    {
+        SLListForEach( n->data.optional, Defline_Dump, "+-->" );
+    }
+}
+#endif
+
+
+static rc_t Defline_Parse( SLList** def, const char* line )
+{
+    rc_t rc = 0;
+    size_t i, sz, text = 0, opt_vars = 0;
+    DefNode* node;
+    SLList* list = NULL;
+
+    if ( def == NULL || line == NULL )
+    {
+        return RC( rcExe, rcNamelist, rcConstructing, rcParam, rcInvalid );
+    }
+    *def = malloc( sizeof( SLList ) );
+    if ( *def  == NULL )
+    {
+        return RC( rcExe, rcNamelist, rcConstructing, rcMemory, rcExhausted );
+    }
+    sz = strlen( line );
+    list = *def;
+    SLListInit( list );
+
+    for ( i = 0; rc == 0 && i < sz; i++ )
+    {
+        if ( line[ i ] == '[' )
+        {
+            if ( ( i + 1 ) < sz && line[ i + 1 ] == '[' )
+            {
+                i++;
+            }
+            else
+            {
+                if ( list != *def )
+                {
+                    rc = RC( rcExe, rcNamelist, rcConstructing, rcFormat, rcIncorrect );
+                }
+                else if ( i > text )
+                {
+                    rc = DeflineNode_Add( list, &node, DefNode_Text, &line[text], i - text );
+                }
+                if ( rc == 0 )
+                {
+                    rc = DeflineNode_Add( list, &node, DefNode_Optional, NULL, 0 );
+                    if ( rc == 0 )
+                    {
+                        opt_vars = 0;
+                        list = node->data.optional;
+                        text = i + 1;
+                    }
+                }
+            }
+        }
+        else if ( line[ i ] == ']' )
+        {
+            if ( ( i + 1 ) < sz && line[ i + 1 ] == ']' )
+            {
+                i++;
+            }
+            else
+            {
+                if ( list == *def )
+                {
+                    rc = RC( rcExe, rcNamelist, rcConstructing, rcFormat, rcIncorrect );
+                }
+                else
+                {
+                    if ( opt_vars < 1 )
+                    {
+                        rc = RC( rcExe, rcNamelist, rcConstructing, rcConstraint, rcEmpty );
+                    }
+                    else if ( i > text )
+                    {
+                        rc = DeflineNode_Add( list, &node, DefNode_Text, &line[text], i - text );
+                    }
+                    list = *def;
+                    text = i + 1;
+                }
+            }
+        }
+        else if ( line[ i ] == '$' )
+        {
+            if ( ( i + 1 ) < sz && line[ i + 1 ] == '$' )
+            {
+                i++;
+            }
+            else
+            {
+                DefNodeType type = DefNode_Unknown;
+                switch ( line[ ++i] )
+                {
+                    case 'a' :
+                        switch( line[ ++i ] )
+                        {
+                            case 'c': type = DefNode_Accession; break;
+                        }
+                        break;
+
+                    case 's' :
+                        switch ( line[ ++i ] )
+                        {
+                            case 'i': type = DefNode_SpotId; break;
+                            case 'n': type = DefNode_SpotName; break;
+                            case 'g': type = DefNode_SpotGroup; break;
+                            case 'l': type = DefNode_SpotLen; break;
+                        }
+                        break;
+                    case 'r' :
+                        switch( line[ ++i ] )
+                        {
+                            case 'i': type = DefNode_ReadId; break;
+                            case 'n': type = DefNode_ReadName; break;
+                            case 'l': type = DefNode_ReadLen; break;
+                        }
+                        break;
+                }
+                if ( type == DefNode_Unknown )
+                {
+                    rc = RC( rcExe, rcNamelist, rcConstructing, rcName, rcUnrecognized );
+                }
+                else
+                {
+                    if ( ( i - 2 ) > text )
+                    {
+                        rc = DeflineNode_Add( list, &node, DefNode_Text, &line[ text ], i - text - 2 );
+                    }
+                    if ( rc == 0 )
+                    {
+                        rc = DeflineNode_Add( list, &node, type, NULL, 0 );
+                        if ( rc == 0 )
+                        {
+                            opt_vars++;
+                            text = i + 1;
+                        }
+                    }
+                }
+            }
+        }
+    }
+    if ( rc == 0 )
+    {
+        if ( list != *def )
+        {
+            rc = RC( rcExe, rcNamelist, rcConstructing, rcFormat, rcInvalid );
+        }
+        else if ( i > text )
+        {
+            rc = DeflineNode_Add( list, &node, DefNode_Text, &line[ text ], i - text );
+        }
+    }
+    if ( rc != 0 )
+    {
+        i = i < sz ? i : sz;
+        PLOGERR( klogErr, ( klogErr, rc, "$(l1) -->$(c)<-- $(l2)",
+                 "l1=%.*s,c=%c,l2=%.*s", i - 1, line, line[ i - 1 ], sz - i, &line[ i ] ) );
+    }
+#if _DEBUGGING
+    SRA_DUMP_DBG( 3, ( "| defline\n" ) );
+    SLListForEach( *def, Defline_Dump, "+->" );
+#endif
+    return rc;
+}
+
+/* ### ALIGNMENT_COUNT based filtering ##################################################### */
+
+typedef struct AlignedFilter_struct
+{
+    const SRAColumn* col;
+    uint64_t rejected_reads;
+    bool aligned;
+    bool unaligned;
+} AlignedFilter;
+
+
+static rc_t AlignedFilter_GetKey( const SRASplitter* cself, const char** key,
+                                  spotid_t spot, readmask_t* readmask )
+{
+    rc_t rc = 0;
+    AlignedFilter* self = ( AlignedFilter* )cself;
+
+    if ( self == NULL || key == NULL )
+    {
+        rc = RC( rcSRA, rcNode, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        *key = "";
+        if ( self->col != NULL )
+        {
+            const uint8_t* ac = NULL;
+            bitsz_t o = 0, sz = 0;
+            rc = SRAColumnRead( self->col, spot, (const void **)&ac, &o, &sz );
+            if ( rc == 0 && sz > 0 )
+            {
+                sz = sz / 8 / sizeof( *ac );
+                for( o = 0; o < sz; o++ )
+                {
+                    if ( ( self->aligned   && !self->unaligned && ac[ o ] == 0 ) ||
+                         ( self->unaligned && !self->aligned   && ac[ o ] != 0 ) )
+                    {
+                        unset_readmask( readmask, o );
+                        self->rejected_reads ++;
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t AlignedFilter_Release( const SRASplitter* cself )
+{
+    rc_t rc = 0;
+    AlignedFilter* self = ( AlignedFilter* )cself;
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcNode, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        if ( self->rejected_reads > 0 && !g_legacy_report )
+            rc = KOutMsg( "Rejected %lu READS because of aligned/unaligned filter\n", self->rejected_reads );
+    }
+    return rc;
+}
+
+typedef struct AlignedFilterFactory_struct
+{
+    const SRATable* table;
+    const SRAColumn* col;
+    bool aligned;
+    bool unaligned;
+} AlignedFilterFactory;
+
+
+static rc_t AlignedFilterFactory_Init( const SRASplitterFactory* cself )
+{
+    rc_t rc = 0;
+    AlignedFilterFactory* self = ( AlignedFilterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRATableOpenColumnRead( self->table, &self->col, "ALIGNMENT_COUNT", vdb_uint8_t );
+        if ( rc != 0 )
+        {
+            if ( GetRCState( rc ) == rcNotFound )
+            {
+                LOGMSG( klogWarn, "Column ALIGNMENT_COUNT was not found, param ignored" );
+                rc = 0;
+            }
+            else if ( GetRCState( rc ) == rcExists )
+            {
+                rc = 0;
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t AlignedFilterFactory_NewObj( const SRASplitterFactory* cself, const SRASplitter** splitter )
+{
+    rc_t rc = 0;
+    AlignedFilterFactory* self = ( AlignedFilterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitter_Make( splitter, sizeof( AlignedFilter ),
+                               AlignedFilter_GetKey, NULL, NULL, AlignedFilter_Release );
+        if ( rc == 0 )
+        {
+            AlignedFilter * filter = ( AlignedFilter * )( * splitter );
+            filter->col = self->col;
+            filter->aligned = self->aligned;
+            filter->unaligned = self->unaligned;
+            filter->rejected_reads = 0;
+        }
+    }
+    return rc;
+}
+
+
+static void AlignedFilterFactory_Release( const SRASplitterFactory* cself )
+{
+    if ( cself != NULL )
+    {
+        AlignedFilterFactory* self = ( AlignedFilterFactory* )cself;
+        SRAColumnRelease( self->col );
+    }
+}
+
+
+static rc_t AlignedFilterFactory_Make( const SRASplitterFactory** cself,
+                    const SRATable* table, bool aligned, bool unaligned )
+{
+    rc_t rc = 0;
+    AlignedFilterFactory* obj = NULL;
+
+    if ( cself == NULL || table == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcAllocating, rcParam, rcNull );
+    }
+    else
+    {
+        SRASplitterFactory_Make( cself, eSplitterSpot, sizeof( *obj ),
+                                 AlignedFilterFactory_Init,
+                                 AlignedFilterFactory_NewObj,
+                                 AlignedFilterFactory_Release );
+        if ( rc == 0 )
+        {
+            obj = ( AlignedFilterFactory* )*cself;
+            obj->table = table;
+            obj->aligned = aligned;
+            obj->unaligned = unaligned;
+        }
+    }
+    return rc;
+}
+
+
+/* ### alignment region filtering ##################################################### */
+
+typedef struct AlignRegionFilter_struct
+{
+    const SRAColumn* col_pos;
+    const SRAColumn* col_name;
+    const SRAColumn* col_seqid;
+    const TAlignedRegion* alregion;
+    uint64_t rejected_spots;
+    uint32_t alregion_qty;
+} AlignRegionFilter;
+
+
+static rc_t AlignRegionFilter_GetKey( const SRASplitter* cself, const char** key,
+                                      spotid_t spot, readmask_t* readmask )
+{
+    rc_t rc = 0;
+    AlignRegionFilter* self = ( AlignRegionFilter* )cself;
+
+    if ( self == NULL || key == NULL )
+    {
+        rc = RC( rcSRA, rcNode, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        *key = "";
+        reset_readmask( readmask );
+        if ( self->col_name || self->col_seqid )
+        {
+            bool match = false;
+            uint32_t i;
+            const char* nm, *si;
+            bitsz_t o, nm_len = 0, si_len = 0;
+
+            if ( self->col_name )
+            {
+                rc = SRAColumnRead( self->col_name, spot, (const void **)&nm, &o, &nm_len );
+                if ( rc == 0 && nm_len > 0 )
+                    nm_len /= 8;
+            }
+            if ( rc == 0 && self->col_seqid )
+            {
+                rc = SRAColumnRead( self->col_seqid, spot, (const void **)&si, &o, &si_len );
+                if ( rc == 0 && si_len > 0 )
+                    si_len /= 8;
+            }
+            for ( i = 0; rc == 0 && i < self->alregion_qty; i++ )
+            {
+                if ( ( self->alregion[i].name_len == nm_len && 
+                       strncasecmp( self->alregion[ i ].name, nm, nm_len ) == 0 ) ||
+                     ( self->alregion[i].name_len == si_len && 
+                       strncasecmp(self->alregion[i].name, si, si_len) == 0 ) )
+                {
+                    if ( self->col_pos )
+                    {
+                        INSDC_coord_zero* pos;
+                        bitsz_t nreads, j;
+                        rc = SRAColumnRead( self->col_pos, spot, ( const void ** )&pos, &o, &nreads );
+                        if ( rc == 0 && nreads > 0 )
+                        {
+                            nreads = nreads / sizeof(*pos) / 8;
+                            for ( i = 0; !match && i < self->alregion_qty; i++ )
+                            {
+                                for ( j = 0; j < nreads; j++ )
+                                {
+                                    if ( self->alregion[i].from <= pos[j] &&
+                                         pos[j] <= self->alregion[i].to )
+                                    {
+                                        match = true;
+                                        break;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    else
+                    {
+                        match = true;
+                    }
+                    break;
+                }
+            }
+            if ( !match )
+            {
+                clear_readmask( readmask );
+                self->rejected_spots ++;
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t AlignRegionFilter_Release( const SRASplitter* cself )
+{
+    rc_t rc = 0;
+    AlignRegionFilter* self = ( AlignRegionFilter* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcNode, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        if ( self->rejected_spots > 0 && !g_legacy_report )
+            rc = KOutMsg( "Rejected %lu SPOTS because of AlignRegionFilter\n", self->rejected_spots );
+    }
+    return rc;
+}
+
+
+typedef struct AlignRegionFilterFactory_struct
+{
+    const SRATable* table;
+    const SRAColumn* col_pos;
+    const SRAColumn* col_name;
+    const SRAColumn* col_seqid;
+    TAlignedRegion* alregion;
+    uint32_t alregion_qty;
+} AlignRegionFilterFactory;
+
+
+static rc_t AlignRegionFilterFactory_Init( const SRASplitterFactory* cself )
+{
+    rc_t rc = 0;
+    AlignRegionFilterFactory* self = ( AlignRegionFilterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+
+#define COLNF(v,n,t) (!(rc == 0 && ((rc = SRATableOpenColumnRead(self->table, &v, n, t)) == 0 || \
+                       GetRCState(rc) == rcExists)) && GetRCState(rc) == rcNotFound)
+
+        if ( COLNF( self->col_name, "REF_NAME", vdb_ascii_t ) )
+        {
+            SRAColumnRelease( self->col_name );
+            self->col_name = NULL;
+            rc = 0;
+        }
+
+        if ( COLNF( self->col_seqid, "REF_SEQ_ID", vdb_ascii_t ) )
+        {
+            SRAColumnRelease( self->col_seqid );
+            self->col_seqid = NULL;
+            rc = 0;
+        }
+
+        if ( self->col_name == NULL && self->col_seqid == NULL )
+        {
+            LOGMSG( klogWarn, "None of columns REF_NAME or REF_SEQ_ID was found, no region filtering" );
+        }
+        else
+        {
+            bool range_used = false;
+            uint32_t i;
+            /* see if there are any actual ranges set and open col only if yes */
+            for ( i = 0; i < self->alregion_qty; i++ )
+            {
+                if ( self->alregion[ i ].from != 0 || self->alregion[ i ].to != 0 )
+                {
+                    range_used = true;
+                    break;
+                }
+            }
+            if ( range_used )
+            {
+                if ( COLNF( self->col_pos, "REF_POS", "INSDC:coord:zero" ) )
+                {
+                    LOGMSG( klogWarn, "Column REF_POS is not found, no region position filtering" );
+                    rc = 0;
+                }
+                else
+                {
+                    for ( i = 0; i < self->alregion_qty; i++ )
+                    {
+                        if ( self->alregion[ i ].from > 0 )
+                        {
+                            self->alregion[ i ].from--;
+                        }
+                        if ( self->alregion[ i ].to > 0 )
+                        {
+                            self->alregion[ i ].to--;
+                        }
+                        else if ( self->alregion[ i ].to == 0 )
+                        {
+                            self->alregion[ i ].to = ~0;
+                        }
+                    }
+                }
+            }
+        }
+    }
+#undef COLNF
+    return rc;
+}
+
+
+static rc_t AlignRegionFilterFactory_NewObj( const SRASplitterFactory* cself, const SRASplitter** splitter )
+{
+    rc_t rc = 0;
+    AlignRegionFilterFactory* self = ( AlignRegionFilterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitter_Make( splitter, sizeof( AlignRegionFilter ),
+                               AlignRegionFilter_GetKey, NULL, NULL, AlignRegionFilter_Release );
+        if ( rc == 0 )
+        {
+            AlignRegionFilter * filter = ( AlignRegionFilter * )( * splitter );
+            filter->col_pos = self->col_pos;
+            filter->col_name = self->col_name;
+            filter->col_seqid = self->col_seqid;
+            filter->alregion = self->alregion;
+            filter->alregion_qty = self->alregion_qty;
+            filter->rejected_spots = 0;
+        }
+    }
+    return rc;
+}
+
+
+static void AlignRegionFilterFactory_Release( const SRASplitterFactory* cself )
+{
+    if ( cself != NULL )
+    {
+        AlignRegionFilterFactory* self = ( AlignRegionFilterFactory* )cself;
+        SRAColumnRelease( self->col_pos );
+        SRAColumnRelease( self->col_name );
+        SRAColumnRelease( self->col_seqid );
+    }
+}
+
+
+static rc_t AlignRegionFilterFactory_Make( const SRASplitterFactory** cself,
+            const SRATable* table, TAlignedRegion* alregion, uint32_t alregion_qty )
+{
+    rc_t rc = 0;
+    AlignRegionFilterFactory* obj = NULL;
+
+    if ( cself == NULL || table == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcAllocating, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitterFactory_Make( cself, eSplitterSpot, sizeof( *obj ),
+                                      AlignRegionFilterFactory_Init,
+                                      AlignRegionFilterFactory_NewObj,
+                                      AlignRegionFilterFactory_Release );
+        if ( rc == 0 )
+        {
+            obj = ( AlignRegionFilterFactory* )*cself;
+            obj->table = table;
+            obj->alregion = alregion;
+            obj->alregion_qty = alregion_qty;
+        }
+    }
+    return rc;
+}
+
+/* ### alignment meta-pair distance filtering ##################################################### */
+
+typedef struct AlignPairDistanceFilter_struct
+{
+    const SRAColumn* col_tlen;
+    const TMatepairDistance* mp_dist;
+    uint64_t rejected_reads;
+    bool mp_dist_unknown;
+    uint32_t mp_dist_qty;
+} AlignPairDistanceFilter;
+
+
+static rc_t AlignPairDistanceFilter_GetKey( const SRASplitter* cself,
+                const char** key, spotid_t spot, readmask_t* readmask )
+{
+    rc_t rc = 0;
+    AlignPairDistanceFilter* self = ( AlignPairDistanceFilter* )cself;
+
+    if ( self == NULL || key == NULL )
+    {
+        rc = RC( rcSRA, rcNode, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        *key = "";
+        reset_readmask( readmask );
+        if ( self->col_tlen )
+        {
+            uint32_t i, j;
+            bitsz_t o, nreads;
+            int32_t* tlen;
+            rc = SRAColumnRead( self->col_tlen, spot, (const void **)&tlen, &o, &nreads );
+            if ( rc == 0 )
+            {
+                nreads = nreads / sizeof(*tlen) / 8;
+                for ( i = 0; i < self->mp_dist_qty; i++ )
+                {
+                    for ( j = 0; j < nreads; j++ )
+                    {
+                        if ( ( tlen[ j ] == 0 && !self->mp_dist_unknown) ||
+                             ( tlen[ j ] != 0 && 
+                               ( tlen[ j ] < self->mp_dist[ i ].from || self->mp_dist[ i ].to < tlen[ j ] ) ) )
+                        {
+                            unset_readmask( readmask, j );
+                            self->rejected_reads ++;
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t AlignPairDistanceFilter_Release( const SRASplitter* cself )
+{
+    rc_t rc = 0;
+    AlignPairDistanceFilter* self = ( AlignPairDistanceFilter* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcNode, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        if ( self->rejected_reads > 0 && !g_legacy_report )
+            rc = KOutMsg( "Rejected %lu READS because of AlignPairDistanceFilter\n", self->rejected_reads );
+    }
+    return rc;
+}
+
+typedef struct AlignPairDistanceFilterFactory_struct
+{
+    const SRATable* table;
+    const SRAColumn* col_tlen;
+    bool mp_dist_unknown;
+    TMatepairDistance* mp_dist;
+    uint32_t mp_dist_qty;
+} AlignPairDistanceFilterFactory;
+
+
+static rc_t AlignPairDistanceFilterFactory_Init( const SRASplitterFactory* cself )
+{
+    rc_t rc = 0;
+    AlignPairDistanceFilterFactory* self = ( AlignPairDistanceFilterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRATableOpenColumnRead( self->table, &self->col_tlen, "TEMPLATE_LEN", "I32" );
+        if( !( rc == 0 || GetRCState( rc ) == rcExists ) && GetRCState( rc ) == rcNotFound )
+        {
+            LOGMSG( klogWarn, "Column TLEN was not found, no distance filtering" );
+            self->col_tlen = NULL;
+            rc = 0;
+        }
+        if ( rc == 0 )
+        {
+            uint32_t i;
+            for ( i = 0; i < self->mp_dist_qty; i++ )
+            {
+                if ( self->mp_dist[ i ].to == 0 )
+                {
+                    self->mp_dist[ i ].to = ~0;
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t AlignPairDistanceFilterFactory_NewObj( const SRASplitterFactory* cself,
+                                                   const SRASplitter** splitter )
+{
+    rc_t rc = 0;
+    AlignPairDistanceFilterFactory* self = ( AlignPairDistanceFilterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitter_Make( splitter, sizeof( AlignPairDistanceFilter ),
+                               AlignPairDistanceFilter_GetKey, NULL, NULL, AlignPairDistanceFilter_Release );
+        if ( rc == 0 )
+        {
+            AlignPairDistanceFilter * filter = ( AlignPairDistanceFilter * )( * splitter );
+            filter->col_tlen = self->col_tlen;
+            filter->mp_dist_unknown = self->mp_dist_unknown;
+            filter->mp_dist = self->mp_dist;
+            filter->mp_dist_qty = self->mp_dist_qty;
+            filter->rejected_reads = 0;
+        }
+    }
+    return rc;
+}
+
+
+static void AlignPairDistanceFilterFactory_Release( const SRASplitterFactory* cself )
+{
+    if ( cself != NULL )
+    {
+        AlignPairDistanceFilterFactory* self = ( AlignPairDistanceFilterFactory* )cself;
+        SRAColumnRelease( self->col_tlen );
+    }
+}
+
+
+static rc_t AlignPairDistanceFilterFactory_Make( const SRASplitterFactory** cself,
+        const SRATable* table, bool mp_dist_unknown, TMatepairDistance* mp_dist, uint32_t mp_dist_qty )
+{
+    rc_t rc = 0;
+    AlignPairDistanceFilterFactory* obj = NULL;
+
+    if ( cself == NULL || table == NULL )
+    {
+        rc = RC( rcSRA, rcType, rcAllocating, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitterFactory_Make( cself, eSplitterSpot, sizeof( *obj ),
+                                      AlignPairDistanceFilterFactory_Init,
+                                      AlignPairDistanceFilterFactory_NewObj,
+                                      AlignPairDistanceFilterFactory_Release );
+        if ( rc == 0 )
+        {
+            obj = ( AlignPairDistanceFilterFactory* ) *cself;
+            obj->table = table;
+            obj->mp_dist_unknown = mp_dist_unknown;
+            obj->mp_dist = mp_dist;
+            obj->mp_dist_qty = mp_dist_qty;
+        }
+    }
+    return rc;
+}
+
+
+/* ============== FASTQ read type (bio/tech) filter ============================ */
+
+typedef struct FastqBioFilter_struct
+{
+    const FastqReader* reader;
+    uint64_t rejected_reads;
+} FastqBioFilter;
+
+
+/* filter out non-bio reads */
+static rc_t FastqBioFilter_GetKey( const SRASplitter* cself, const char** key,
+                                   spotid_t spot, readmask_t* readmask )
+{
+    rc_t rc = 0;
+    FastqBioFilter* self = ( FastqBioFilter* )cself;
+
+    if ( self == NULL || key == NULL )
+    {
+        rc = RC( rcExe, rcNode, rcExecuting, rcParam, rcInvalid );
+    }
+    else
+    {
+        uint32_t num_reads = 0;
+
+        *key = NULL;
+        rc = FastqReaderSeekSpot( self->reader, spot );
+        if ( rc == 0 )
+        {
+            rc = FastqReader_SpotInfo( self->reader, NULL, NULL, NULL, NULL, NULL, &num_reads );
+            if ( rc == 0 )
+            {
+                uint32_t readId;
+                SRA_DUMP_DBG( 3, ( "%s %u row reads: ", __func__, spot ) );
+                for (readId = 0; rc == 0 && readId < num_reads; readId++ )
+                {
+                    if ( isset_readmask( readmask, readId ) )
+                    {
+                        SRAReadTypes read_type;
+                        rc = FastqReader_SpotReadInfo( self->reader, readId + 1, &read_type,
+                                                       NULL, NULL, NULL, NULL);
+                        if ( rc == 0 )
+                        {
+                            if ( !( read_type & SRA_READ_TYPE_BIOLOGICAL ) )
+                            {
+                                unset_readmask( readmask, readId );
+                                self->rejected_reads ++;
+                            }
+                            else
+                            {
+                                SRA_DUMP_DBG( 3, ( " %u", readId ) );
+                            }
+                        }
+                    }
+                }
+                *key = "";
+                SRA_DUMP_DBG( 3, ( " key '%s'\n", *key ) );
+            }
+        }
+        else if ( GetRCObject( rc ) == rcRow && GetRCState( rc ) == rcNotFound )
+        {
+            SRA_DUMP_DBG( 3, ( "%s skipped %u row\n", __func__, spot ) );
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t FastqBioFilter_Release( const SRASplitter * cself )
+{
+    rc_t rc = 0;
+    FastqBioFilter * self = ( FastqBioFilter * )cself;
+
+    if ( self == NULL )
+        rc = RC( rcExe, rcNode, rcExecuting, rcParam, rcInvalid );
+    else
+    {
+        if ( self->rejected_reads > 0 && !g_legacy_report )
+            rc = KOutMsg( "Rejected %lu READS because of filtering out non-biological READS\n", self->rejected_reads );
+    }
+    return rc;
+}
+
+
+typedef struct FastqBioFilterFactory_struct
+{
+    const char* accession;
+    const SRATable* table;
+    const FastqReader* reader;
+} FastqBioFilterFactory;
+
+
+static rc_t FastqBioFilterFactory_Init( const SRASplitterFactory* cself )
+{
+    rc_t rc = 0;
+    FastqBioFilterFactory* self = ( FastqBioFilterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = FastqReaderMake( &self->reader, self->table, self->accession,
+                              /* preserve orig spot format to save on conversions */
+                              FastqArgs.is_platform_cs_native, false, FastqArgs.fasta > 0, false, 
+                              false, !FastqArgs.applyClip, FastqArgs.SuppressQualForCSKey, 0,
+                              FastqArgs.offset, '\0', 0, 0) ;
+    }
+    return rc;
+}
+
+
+static rc_t FastqBioFilterFactory_NewObj( const SRASplitterFactory* cself, const SRASplitter** splitter )
+{
+    rc_t rc = 0;
+    FastqBioFilterFactory* self = ( FastqBioFilterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitter_Make( splitter, sizeof( FastqBioFilter ),
+                               FastqBioFilter_GetKey, NULL, NULL, FastqBioFilter_Release );
+        if ( rc == 0 )
+        {
+            FastqBioFilter * filter = ( FastqBioFilter * )( * splitter );
+            filter->reader = self->reader;
+            filter->rejected_reads = 0;
+        }
+    }
+    return rc;
+}
+
+
+static void FastqBioFilterFactory_Release( const SRASplitterFactory* cself )
+{
+    if ( cself != NULL )
+    {
+        FastqBioFilterFactory* self = ( FastqBioFilterFactory* )cself;
+        FastqReaderWhack( self->reader );
+    }
+}
+
+
+static rc_t FastqBioFilterFactory_Make( const SRASplitterFactory** cself,
+                        const char* accession, const SRATable* table )
+{
+    rc_t rc = 0;
+    FastqBioFilterFactory* obj = NULL;
+
+    if ( cself == NULL || accession == NULL || table == NULL )
+    {
+        rc = RC( rcExe, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitterFactory_Make( cself, eSplitterSpot, sizeof( *obj ),
+                                      FastqBioFilterFactory_Init,
+                                      FastqBioFilterFactory_NewObj,
+                                      FastqBioFilterFactory_Release );
+
+        if ( rc == 0 )
+        {
+            obj = ( FastqBioFilterFactory* )*cself;
+            obj->accession = accession;
+            obj->table = table;
+        }
+    }
+    return rc;
+}
+
+
+/* ============== FASTQ number of reads filter ============================ */
+
+typedef struct FastqRNumberFilter_struct
+{
+    const FastqReader* reader;
+    uint64_t rejected_reads;
+} FastqRNumberFilter;
+
+
+static rc_t FastqRNumberFilter_GetKey( const SRASplitter* cself, const char** key,
+                                       spotid_t spot, readmask_t* readmask )
+{
+    rc_t rc = 0;
+    FastqRNumberFilter* self = ( FastqRNumberFilter* )cself;
+
+    if ( self == NULL || key == NULL )
+    {
+        rc = RC( rcExe, rcNode, rcExecuting, rcParam, rcInvalid );
+    }
+    else
+    {
+        uint32_t num_reads = 0;
+
+        *key = NULL;
+        rc = FastqReaderSeekSpot( self->reader, spot );
+        if ( rc == 0 )
+        {
+            rc = FastqReader_SpotInfo( self->reader, NULL, NULL, NULL, NULL, NULL, &num_reads );
+            if ( rc == 0 )
+            {
+                int readId, q;
+
+                SRA_DUMP_DBG( 3, ( "%s %u row reads: ", __func__, spot ) );
+                for ( readId = 0, q = 0; readId < num_reads; readId++ )
+                {
+                    if ( isset_readmask( readmask, readId ) )
+                    {
+                        if ( ++q > FastqArgs.maxReads )
+                        {
+                            unset_readmask( readmask, 1 << readId );
+                        }
+                        else
+                        {
+                            SRA_DUMP_DBG( 3, ( " %u", readId ) );
+                        }
+                    }
+                }
+                *key = "";
+                SRA_DUMP_DBG( 3, ( " key '%s'\n", *key ) );
+            }
+        }
+        else if ( GetRCObject( rc ) == rcRow && GetRCState( rc ) == rcNotFound )
+        {
+            SRA_DUMP_DBG( 3, ( "%s skipped %u row\n", __func__, spot ) );
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t FastqRNumberFilter_Release( const SRASplitter* cself )
+{
+    rc_t rc = 0;
+    FastqRNumberFilter * self = ( FastqRNumberFilter * )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcNode, rcExecuting, rcParam, rcInvalid );
+    }
+    else
+    {
+        if ( self->rejected_reads > 0 && !g_legacy_report )
+            rc = KOutMsg( "Rejected %lu READS because of max. number of READS = %u\n", self->rejected_reads, FastqArgs.maxReads );
+    }
+    return rc;
+}
+
+typedef struct FastqRNumberFilterFactory_struct
+{
+    const char* accession;
+    const SRATable* table;
+    const FastqReader* reader;
+} FastqRNumberFilterFactory;
+
+
+static rc_t FastqRNumberFilterFactory_Init( const SRASplitterFactory* cself )
+{
+    rc_t rc = 0;
+    FastqRNumberFilterFactory* self = ( FastqRNumberFilterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = FastqReaderMake( &self->reader, self->table, self->accession,
+                              /* preserve orig spot format to save on conversions */
+                              FastqArgs.is_platform_cs_native, false, FastqArgs.fasta > 0, false, 
+                              false, !FastqArgs.applyClip, FastqArgs.SuppressQualForCSKey, 0,
+                              FastqArgs.offset, '\0', 0, 0 );
+    }
+    return rc;
+}
+
+
+static rc_t FastqRNumberFilterFactory_NewObj( const SRASplitterFactory* cself, const SRASplitter** splitter )
+{
+    rc_t rc = 0;
+    FastqRNumberFilterFactory* self = ( FastqRNumberFilterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitter_Make( splitter, sizeof( FastqRNumberFilter ),
+                               FastqRNumberFilter_GetKey, NULL, NULL, FastqRNumberFilter_Release );
+        if ( rc == 0 )
+        {
+            FastqRNumberFilter * filter = ( FastqRNumberFilter * )( * splitter );
+            filter->reader = self->reader;
+            filter->rejected_reads = 0;
+        }
+    }
+    return rc;
+}
+
+
+static void FastqRNumberFilterFactory_Release( const SRASplitterFactory* cself )
+{
+    if ( cself != NULL )
+    {
+        FastqRNumberFilterFactory* self = ( FastqRNumberFilterFactory* )cself;
+        FastqReaderWhack( self->reader );
+    }
+}
+
+
+static rc_t FastqRNumberFilterFactory_Make( const SRASplitterFactory** cself,
+                                const char* accession, const SRATable* table )
+{
+    rc_t rc = 0;
+    FastqRNumberFilterFactory* obj = NULL;
+
+    if ( cself == NULL || accession == NULL || table == NULL )
+    {
+        rc = RC( rcExe, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitterFactory_Make( cself, eSplitterSpot, sizeof( *obj ),
+                                      FastqRNumberFilterFactory_Init,
+                                      FastqRNumberFilterFactory_NewObj,
+                                      FastqRNumberFilterFactory_Release );
+        if ( rc == 0 )
+        {
+            obj = ( FastqRNumberFilterFactory* )*cself;
+            obj->accession = accession;
+            obj->table = table;
+        }
+    }
+    return rc;
+}
+
+/* ============== FASTQ quality filter ============================ */
+
+typedef struct FastqQFilter_struct
+{
+    const FastqReader * reader;
+    KDataBuffer * buffer_for_read_column;
+    KDataBuffer * buffer_for_quality;
+    uint64_t rejected_spots;
+    uint64_t rejected_reads;
+} FastqQFilter;
+
+
+#define MIN_QUAL_FOR_RULE_3 ( 33 + 2 )
+
+static bool QFilter_Test_new( const char * read, const char * quality, uint32_t readlen, uint32_t minlen, char N_char )
+{
+    uint32_t idx, cnt, cnt1, start;
+    char b0;
+
+    /* 1st criteria : READ has to be longer than the minlen */
+    if ( readlen < minlen ) return false;
+
+    /* 2nd criteria : READ does not contain any N's in the first minlen bases */
+    for ( idx = 0; idx < minlen; ++idx )
+    {
+        if ( read[ idx ] == N_char ) return false;
+    }
+
+    start = ( N_char == '.' ) ? 1 : 0;
+    /* 3rd criteria : QUALITY values are all 2 or higher in the first minlen values */
+    for ( idx = start; idx < minlen; ++idx )
+    {
+        if ( quality[ idx ] < MIN_QUAL_FOR_RULE_3 ) return false;
+    }
+
+    /* 4th criteria : READ contains more than one type of base in the first minlen bases */
+    b0 = read[ 0 ];
+    for ( idx = 1, cnt = 1; idx < minlen; ++idx )
+    {
+        if ( read[ idx ] == b0 ) cnt++;
+    }
+    if ( cnt == minlen ) return false;
+
+    /* 5th criteria : READ does not contain more than 50% N's in its whole length */
+    cnt = ( readlen / 2 );
+    for ( idx = 0, cnt1 = 0; idx < readlen; ++idx )
+    {
+        if ( read[ idx ] == N_char ) cnt1++;
+    }
+    if ( cnt1 > cnt ) return false;
+
+    /* 6th criteria : READ does not contain values other than ACGTN in its whole length */
+    if ( N_char != '.' )
+    {
+        for ( idx = 0; idx < readlen; ++idx )
+        {
+            if ( ! ( ( read[ idx ] == 'A' ) || ( read[ idx ] == 'C' ) || ( read[ idx ] == 'G' ) ||
+                    ( read[ idx ] == 'T' ) || ( read[ idx ] == 'N' ) ) )
+                return false;
+        }
+    }
+
+    return true;
+}
+
+
+static bool QFilter_Test_old( const char * read, uint32_t readlen, bool cs_native )
+{
+    static char const* const baseStr = "NNNNNNNNNN";
+    static char const* const colorStr = "..........";
+    static const uint32_t strLen = 10;
+    uint32_t xLen = readlen < strLen ? readlen : strLen;
+
+    if ( cs_native )
+    {
+        if ( strncmp( &read[ 1 ], colorStr, xLen ) == 0 || strcmp( &read[ readlen - xLen + 1 ], colorStr ) == 0 )
+            return false;
+    }
+    else
+    {
+        if ( strncmp( read, baseStr, xLen ) == 0 || strcmp( &read[ readlen - xLen ], baseStr ) == 0 )
+            return false;
+    }
+    return true;
+}
+
+
+/* filter out reads by leading/trialing quality */
+static rc_t FastqQFilter_GetKey( const SRASplitter* cself, const char** key,
+                                 spotid_t spot, readmask_t* readmask )
+{
+    rc_t rc = 0;
+    FastqQFilter* self = ( FastqQFilter* )cself;
+
+    if ( self == NULL || key == NULL )
+    {
+        rc = RC( rcExe, rcNode, rcExecuting, rcParam, rcInvalid );
+    }
+    else
+    {
+        uint32_t num_reads = 0, spot_len;
+
+        *key = NULL;
+        rc = FastqReaderSeekSpot( self->reader, spot );
+        if ( rc == 0 )
+        {
+            rc = FastqReader_SpotInfo( self->reader, NULL, NULL, NULL, NULL, &spot_len, &num_reads );
+            if ( rc == 0 )
+            {
+                SRA_DUMP_DBG( 3, ( "%s %u row reads: ", __func__, spot ) );
+                if ( FastqArgs.split_spot )
+                {
+                    uint32_t readId;
+                    INSDC_coord_len read_len;
+                    for ( readId = 0; rc == 0 && readId < num_reads; readId++ )
+                    {
+                        if ( isset_readmask( readmask, readId ) )
+                        {
+                            rc = FastqReader_SpotReadInfo( self->reader, readId + 1, NULL, NULL, NULL, NULL, &read_len );
+                            if ( rc == 0 )
+                            {
+                                /* FastqReaderBase() in libsra! libs/sra/fastq.h 
+                                   IF_BUF ... very, very bad macro defined in factory.h !!
+                                   it combines reading from table with resizing of a KDatabuffer in a loop until rc == 0 is reached!
+                                */
+                                IF_BUF( ( FastqReaderBase( self->reader, readId + 1,
+                                          self->buffer_for_read_column->base,
+                                          KDataBufferBytes( self->buffer_for_read_column ), NULL) ),
+                                          self->buffer_for_read_column, read_len )
+                                {
+                                    const char * b = self->buffer_for_read_column->base;
+                                    bool filter_passed = true;
+
+                                    if ( FastqArgs.qual_filter1 )
+                                    {
+                                        if ( quality_N_limit > 0 )
+                                        {
+                                            IF_BUF( ( FastqReaderQuality( self->reader, readId + 1,
+                                                      self->buffer_for_quality->base,
+                                                      KDataBufferBytes( self->buffer_for_quality ), NULL) ),
+                                                      self->buffer_for_quality, read_len )
+                                            {
+                                                const char * q = self->buffer_for_quality->base;
+                                                char N_char = FastqArgs.is_platform_cs_native ? '.' : 'N';
+                                                filter_passed = QFilter_Test_new( b, q, read_len, quality_N_limit, N_char );
+                                            }
+                                        }
+                                    }
+                                    else
+                                        filter_passed = QFilter_Test_old( b, read_len, FastqArgs.is_platform_cs_native );
+
+                                    if ( filter_passed )
+                                        SRA_DUMP_DBG( 3, ( " %u", readId ) );
+                                    else
+                                    {
+                                        unset_readmask( readmask, readId );
+                                        /* READ did not pass filter */
+                                        self->rejected_reads ++;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    *key = "";
+                }
+                else
+                {
+                    IF_BUF( ( FastqReaderBase( self->reader, 0, self->buffer_for_read_column->base,
+                              KDataBufferBytes( self->buffer_for_read_column ), NULL ) ), self->buffer_for_read_column, spot_len )
+                    {
+                        const char* b = self->buffer_for_read_column->base;
+                        bool filter_passed = true;
+
+                        if ( FastqArgs.qual_filter1 )
+                        {
+                            if ( quality_N_limit > 0 )
+                            {
+                                IF_BUF( ( FastqReaderQuality( self->reader, 0, self->buffer_for_quality->base,
+                                          KDataBufferBytes( self->buffer_for_quality ), NULL ) ), self->buffer_for_quality, spot_len )
+                                {
+                                    const char * q = self->buffer_for_quality->base;
+                                    char N_char = FastqArgs.is_platform_cs_native ? '.' : 'N';
+                                    filter_passed = QFilter_Test_new( b, q, spot_len, quality_N_limit, N_char );
+                                }
+                            }
+                        }
+                        else
+                            filter_passed = QFilter_Test_old( b, spot_len, FastqArgs.is_platform_cs_native );
+
+                        if ( filter_passed )
+                        {
+                            *key = "";
+                            SRA_DUMP_DBG( 3, ( " whole spot" ) );
+                        }
+                        else
+                        {
+                            /* SPOT did not pass filter */
+                            self->rejected_spots ++;
+                        }
+                    }
+                }
+                SRA_DUMP_DBG( 3, ( " key '%s'\n", *key ) );
+            }
+        }
+        else if ( GetRCObject( rc ) == rcRow && GetRCState( rc ) == rcNotFound )
+        {
+            SRA_DUMP_DBG( 3, ( "%s skipped %u row\n", __func__, spot ) );
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t FastqQFilter_Release( const SRASplitter * cself )
+{
+    rc_t rc = 0;
+    FastqQFilter* self = ( FastqQFilter* )cself;
+
+    if ( self == NULL )
+        rc = RC( rcExe, rcNode, rcExecuting, rcParam, rcInvalid );
+    else if ( !g_legacy_report )
+    {
+        if ( self->rejected_reads > 0 )
+            rc = KOutMsg( "Rejected %lu READS because of Quality-Filtering\n", self->rejected_reads );
+        if ( rc == 0 && self->rejected_spots > 0 )
+            rc = KOutMsg( "Rejected %lu SPOTS because of Quality-Filtering\n", self->rejected_spots );
+
+    }
+    return rc;
+}
+
+
+typedef struct FastqQFilterFactory_struct
+{
+    const char* accession;
+    const SRATable* table;
+    const FastqReader* reader;
+    KDataBuffer kdbuf;
+    KDataBuffer kdbuf2;
+} FastqQFilterFactory;
+
+
+static rc_t FastqQFilterFactory_Init( const SRASplitterFactory* cself )
+{
+    rc_t rc = 0;
+    FastqQFilterFactory* self = ( FastqQFilterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = KDataBufferMakeBytes( &self->kdbuf, DATABUFFERINITSIZE );
+        if ( rc == 0 )
+        {
+            rc = KDataBufferMakeBytes( &self->kdbuf2, DATABUFFERINITSIZE );
+            if ( rc == 0 )
+            {
+                rc = FastqReaderMake( &self->reader, self->table, self->accession,
+                             /* preserve orig spot format to save on conversions */
+                             FastqArgs.is_platform_cs_native, false, FastqArgs.fasta > 0, false, 
+                             false, !FastqArgs.applyClip, FastqArgs.SuppressQualForCSKey, 0,
+                             FastqArgs.offset, '\0', 0, 0 );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t FastqQFilterFactory_NewObj( const SRASplitterFactory* cself, const SRASplitter** splitter )
+{
+    rc_t rc = 0;
+    FastqQFilterFactory* self = ( FastqQFilterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitter_Make( splitter, sizeof( FastqQFilter ), FastqQFilter_GetKey, NULL, NULL, FastqQFilter_Release );
+        if ( rc == 0 )
+        {
+            FastqQFilter * filter = ( FastqQFilter * )( * splitter );
+            filter->reader = self->reader;
+            filter->buffer_for_read_column = &self->kdbuf;
+            filter->buffer_for_quality = &self->kdbuf2;
+            filter->rejected_spots = 0;
+            filter->rejected_reads = 0;
+        }
+    }
+    return rc;
+}
+
+
+static void FastqQFilterFactory_Release( const SRASplitterFactory* cself )
+{
+    if ( cself != NULL )
+    {
+        FastqQFilterFactory* self = ( FastqQFilterFactory* )cself;
+        KDataBufferWhack( &self->kdbuf );
+        KDataBufferWhack( &self->kdbuf2 );
+        FastqReaderWhack( self->reader );
+    }
+}
+
+
+static rc_t FastqQFilterFactory_Make( const SRASplitterFactory** cself,
+                                      const char* accession, const SRATable* table )
+{
+    rc_t rc = 0;
+    FastqQFilterFactory* obj = NULL;
+
+    if ( cself == NULL || accession == NULL || table == NULL )
+    {
+        rc = RC( rcExe, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitterFactory_Make( cself, eSplitterSpot, sizeof( *obj ),
+                                      FastqQFilterFactory_Init,
+                                      FastqQFilterFactory_NewObj,
+                                      FastqQFilterFactory_Release );
+        if ( rc == 0 )
+        {
+            obj = ( FastqQFilterFactory* )*cself;
+            obj->accession = accession;
+            obj->table = table;
+        }
+    }
+    return rc;
+}
+
+
+/* ============== FASTQ min read length filter ============================ */
+
+
+typedef struct FastqReadLenFilter_struct
+{
+    const FastqReader* reader;
+    uint64_t rejected_spots;
+    uint64_t rejected_reads;
+} FastqReadLenFilter;
+
+
+static rc_t FastqReadLenFilter_GetKey( const SRASplitter* cself, const char** key,
+                                       spotid_t spot, readmask_t* readmask )
+{
+    rc_t rc = 0;
+    FastqReadLenFilter* self = ( FastqReadLenFilter* )cself;
+
+    if ( self == NULL || key == NULL )
+    {
+        rc = RC( rcExe, rcNode, rcExecuting, rcParam, rcInvalid );
+    }
+    else
+    {
+        uint32_t num_reads = 0, spot_len = 0;
+
+        *key = NULL;
+        rc = FastqReaderSeekSpot( self->reader, spot );
+        if ( rc == 0 )
+        {
+            rc = FastqReader_SpotInfo( self->reader, NULL, NULL, NULL, NULL, &spot_len, &num_reads );
+            if ( rc == 0 )
+            {
+                SRA_DUMP_DBG( 3, ( "%s %u row reads:", __func__, spot ) );
+                if ( FastqArgs.split_spot )
+                {
+                    uint32_t readId;
+                    INSDC_coord_len read_len = 0;
+                    for ( readId = 0; rc == 0 && readId < num_reads; readId++ )
+                    {
+                        if ( isset_readmask( readmask, readId ) )
+                        {
+                            rc = FastqReader_SpotReadInfo( self->reader, readId + 1, NULL, NULL, NULL, NULL, &read_len );
+                            if ( rc == 0 )
+                            {
+                                if ( read_len < FastqArgs.minReadLen )
+                                {
+                                    unset_readmask( readmask, readId );
+                                    self->rejected_reads ++;
+                                }
+                                else
+                                {
+                                    SRA_DUMP_DBG( 3, ( " %u", readId ) );
+                                }
+                            }
+                        }
+                    }
+                    *key = "";
+                }
+                else
+                {
+                    if ( spot_len >= FastqArgs.minReadLen )
+                    {
+                        *key = "";
+                        SRA_DUMP_DBG( 3, ( " whole spot" ) );
+                    }
+                    else
+                        self->rejected_spots ++;
+                }
+                SRA_DUMP_DBG( 3, ( "\n" ) );
+            }
+        }
+        else if ( GetRCObject( rc ) == rcRow && GetRCState( rc ) == rcNotFound )
+        {
+            SRA_DUMP_DBG( 3, ( "%s skipped %u row\n", __func__, spot ) );
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t FastqReadLenFilter_Release( const SRASplitter * cself )
+{
+    rc_t rc = 0;
+    FastqReadLenFilter * self = ( FastqReadLenFilter* )cself;
+
+    if ( self == NULL )
+        rc = RC( rcExe, rcNode, rcExecuting, rcParam, rcInvalid );
+    else if ( !g_legacy_report )
+    {
+        if ( self->rejected_reads > 0 )
+            rc = KOutMsg( "Rejected %lu READS because READLEN < %u\n", self->rejected_reads, FastqArgs.minReadLen );
+        if ( self->rejected_spots > 0 && rc == 0 )
+            rc = KOutMsg( "Rejected %lu SPOTS because SPOTLEN < %u\n", self->rejected_spots, FastqArgs.minReadLen );
+    }
+    return rc;
+}
+
+
+typedef struct FastqReadLenFilterFactory_struct
+{
+    const char* accession;
+    const SRATable* table;
+    const FastqReader* reader;
+} FastqReadLenFilterFactory;
+
+
+static rc_t FastqReadLenFilterFactory_Init( const SRASplitterFactory* cself )
+{
+    rc_t rc = 0;
+    FastqReadLenFilterFactory* self = ( FastqReadLenFilterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = FastqReaderMake( &self->reader, self->table, self->accession,
+                             /* preserve orig spot format to save on conversions */
+                              FastqArgs.is_platform_cs_native, false, FastqArgs.fasta > 0, false, 
+                              false, !FastqArgs.applyClip, FastqArgs.SuppressQualForCSKey, 0,
+                              FastqArgs.offset, '\0', 0, 0 );
+    }
+    return rc;
+}
+
+
+static rc_t FastqReadLenFilterFactory_NewObj( const SRASplitterFactory* cself, const SRASplitter** splitter )
+{
+    rc_t rc = 0;
+    FastqReadLenFilterFactory* self = ( FastqReadLenFilterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitter_Make( splitter, sizeof( FastqReadLenFilter ),
+                               FastqReadLenFilter_GetKey, NULL, NULL, FastqReadLenFilter_Release );
+        if ( rc == 0 )
+        {
+            FastqReadLenFilter * filter = ( FastqReadLenFilter* )( *splitter );
+            filter->reader = self->reader;
+            filter->rejected_spots = 0;
+            filter->rejected_reads = 0;
+        }
+    }
+    return rc;
+}
+
+
+static void FastqReadLenFilterFactory_Release( const SRASplitterFactory* cself )
+{
+    if ( cself != NULL )
+    {
+        FastqReadLenFilterFactory* self = ( FastqReadLenFilterFactory* )cself;
+        FastqReaderWhack( self->reader );
+    }
+}
+
+
+static rc_t FastqReadLenFilterFactory_Make( const SRASplitterFactory** cself,
+                            const char* accession, const SRATable* table )
+{
+    rc_t rc = 0;
+    FastqReadLenFilterFactory* obj = NULL;
+
+    if ( cself == NULL || accession == NULL || table == NULL )
+    {
+        rc = RC( rcExe, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitterFactory_Make( cself, eSplitterSpot, sizeof( *obj ),
+                                      FastqReadLenFilterFactory_Init,
+                                      FastqReadLenFilterFactory_NewObj,
+                                      FastqReadLenFilterFactory_Release );
+        if ( rc == 0 )
+        {
+            obj = ( FastqReadLenFilterFactory* )*cself;
+            obj->accession = accession;
+            obj->table = table;
+        }
+    }
+    return rc;
+}
+
+
+/* ============== FASTQ read splitter ============================ */
+
+char* FastqReadSplitter_key_buf = NULL;
+
+
+typedef struct FastqReadSplitter_struct
+{
+    const FastqReader* reader;
+    SRASplitter_Keys* keys;
+    uint32_t keys_max;
+} FastqReadSplitter;
+
+
+static rc_t FastqReadSplitter_GetKeySet( const SRASplitter* cself, const SRASplitter_Keys** key,
+                    uint32_t* keys, spotid_t spot, const readmask_t* readmask )
+{
+    rc_t rc = 0;
+    FastqReadSplitter* self = ( FastqReadSplitter* )cself;
+    const size_t key_offset = 5;
+
+    if ( self == NULL || key == NULL )
+    {
+        rc = RC( rcExe, rcNode, rcExecuting, rcParam, rcInvalid );
+    }
+    else
+    {
+        uint32_t num_reads = 0;
+
+        *keys = 0;
+        if ( FastqReadSplitter_key_buf == NULL )
+        {
+            /* initial alloc key_buf: "  1\0  2\0...\0  9\0 10\0 11\0...\03220..\08192\0" */
+            if ( nreads_max > 9999 )
+            {
+                /* key_offset and sprintf format size are insufficient for keys longer than 4 digits */
+                rc = RC( rcExe, rcNode, rcExecuting, rcBuffer, rcInsufficient );
+            }
+            else
+            {
+                FastqReadSplitter_key_buf = malloc( nreads_max * key_offset );
+                if ( FastqReadSplitter_key_buf == NULL )
+                {
+                    rc = RC( rcExe, rcNode, rcExecuting, rcMemory, rcExhausted );
+                }
+                else
+                {
+                    /* fill buffer w/keys */
+                    int i;
+                    char* p = FastqReadSplitter_key_buf;
+                    for ( i = 1; rc == 0 && i <= nreads_max; i++ )
+                    {
+                        if ( sprintf( p, "%4u", i ) <= 0 )
+                        {
+                            rc = RC( rcExe, rcNode, rcExecuting, rcTransfer, rcIncomplete );
+                        }
+                        p += key_offset;
+                    }
+                }
+            }
+        }
+
+        if ( rc == 0 )
+        {
+            rc = FastqReaderSeekSpot( self->reader, spot );
+            if ( rc == 0 )
+            {
+                rc = FastqReader_SpotInfo( self->reader, NULL, NULL, NULL, NULL, NULL, &num_reads );
+                if ( rc == 0 )
+                {
+                    uint32_t readId, good = 0;
+
+                    SRA_DUMP_DBG( 3, ( "%s %u row reads:", __func__, spot ) );
+                    for ( readId = 0; rc == 0 && readId < num_reads; readId++ )
+                    {
+                        rc = FastqReader_SpotReadInfo( self->reader, readId + 1, NULL, NULL, NULL, NULL, NULL );
+                        if ( !isset_readmask( readmask, readId ) )
+                        {
+                            continue;
+                        }
+                        if ( self->keys_max < ( good + 1 ) )
+                        {
+                            void* p = realloc( self->keys, sizeof( *self->keys ) * ( good + 1 ) );
+                            if ( p == NULL )
+                            {
+                                rc = RC( rcExe, rcNode, rcExecuting, rcMemory, rcExhausted );
+                                break;
+                            }
+                            else
+                            {
+                                self->keys = p;
+                                self->keys_max = good + 1;
+                            }
+                        }
+                        self->keys[ good ].key = &FastqReadSplitter_key_buf[ readId * key_offset ];
+                        while ( self->keys[ good ].key[ 0 ] == ' ' && self->keys[ good ].key[0] != '\0' )
+                        {
+                            self->keys[ good ].key++;
+                        }
+                        clear_readmask( self->keys[ good ].readmask );
+                        set_readmask( self->keys[good].readmask, readId );
+                        SRA_DUMP_DBG( 3, ( " key['%s']+=%u", self->keys[ good ].key, readId ) );
+                        good++;
+                    }
+                    if ( rc == 0 )
+                    {
+                        *key = self->keys;
+                        *keys = good;
+                    }
+                    SRA_DUMP_DBG( 3, ( "\n" ) );
+                }
+            }
+            else if ( GetRCObject( rc ) == rcRow && GetRCState( rc ) == rcNotFound )
+            {
+                SRA_DUMP_DBG( 3, ( "%s skipped %u row\n", __func__, spot ) );
+                rc = 0;
+            }
+        }
+        else if ( GetRCObject( rc ) == rcRow && GetRCState( rc ) == rcNotFound )
+        {
+                SRA_DUMP_DBG( 3, ( "%s skipped %u row\n", __func__, spot ) );
+                rc = 0;
+        }
+    }
+    return rc;
+}
+
+
+rc_t FastqReadSplitter_Release( const SRASplitter* cself )
+{
+    if ( cself != NULL )
+    {
+        FastqReadSplitter* self = ( FastqReadSplitter* )cself;
+        free( self->keys );
+    }
+    return 0;
+}
+
+
+typedef struct FastqReadSplitterFactory_struct
+{
+    const char* accession;
+    const SRATable* table;
+    const FastqReader* reader;
+} FastqReadSplitterFactory;
+
+
+static rc_t FastqReadSplitterFactory_Init( const SRASplitterFactory* cself )
+{
+    rc_t rc = 0;
+    FastqReadSplitterFactory* self = ( FastqReadSplitterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = FastqReaderMake( &self->reader, self->table, self->accession,
+                              /* preserve orig spot format to save on conversions */
+                              FastqArgs.is_platform_cs_native, false, FastqArgs.fasta > 0, false, 
+                              false, !FastqArgs.applyClip, FastqArgs.SuppressQualForCSKey, 0,
+                              FastqArgs.offset, '\0', 0, 0 );
+    }
+    return rc;
+}
+
+
+static rc_t FastqReadSplitterFactory_NewObj( const SRASplitterFactory* cself, const SRASplitter** splitter )
+{
+    rc_t rc = 0;
+    FastqReadSplitterFactory* self = ( FastqReadSplitterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitter_Make( splitter, sizeof( FastqReadSplitter ), NULL,
+                               FastqReadSplitter_GetKeySet, NULL, FastqReadSplitter_Release );
+        if ( rc == 0 )
+        {
+            ( (FastqReadSplitter*)(*splitter) )->reader = self->reader;
+        }
+    }
+    return rc;
+}
+
+
+static void FastqReadSplitterFactory_Release( const SRASplitterFactory* cself )
+{
+    if ( cself != NULL )
+    {
+        FastqReadSplitterFactory* self = ( FastqReadSplitterFactory* )cself;
+        FastqReaderWhack( self->reader );
+        free( FastqReadSplitter_key_buf );
+        FastqReadSplitter_key_buf = NULL;
+    }
+}
+
+
+static rc_t FastqReadSplitterFactory_Make( const SRASplitterFactory** cself,
+                const char* accession, const SRATable* table )
+{
+    rc_t rc = 0;
+    FastqReadSplitterFactory* obj = NULL;
+
+    if ( cself == NULL || accession == NULL || table == NULL )
+    {
+        rc = RC( rcExe, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitterFactory_Make( cself, eSplitterRead, sizeof( *obj ),
+                                      FastqReadSplitterFactory_Init,
+                                      FastqReadSplitterFactory_NewObj,
+                                      FastqReadSplitterFactory_Release );
+        if ( rc == 0 )
+        {
+            obj = ( FastqReadSplitterFactory* )*cself;
+            obj->accession = accession;
+            obj->table = table;
+        }
+    }
+    return rc;
+}
+
+
+/* ============== FASTQ 3 read splitter ============================ */
+
+char* Fastq3ReadSplitter_key_buf = NULL;
+
+typedef struct Fastq3ReadSplitter_struct
+{
+    const FastqReader* reader;
+    SRASplitter_Keys keys[ 2 ];
+} Fastq3ReadSplitter;
+
+
+/* if all active reads len >= minreadlen, reads are splitted into separate files, otherwise on single key "" is returnded for all reads */
+static rc_t Fastq3ReadSplitter_GetKeySet( const SRASplitter* cself, const SRASplitter_Keys** key,
+            uint32_t* keys, spotid_t spot, const readmask_t* readmask )
+{
+    rc_t rc = 0;
+    Fastq3ReadSplitter* self = ( Fastq3ReadSplitter* )cself;
+    const size_t key_offset = 5;
+
+    if ( self == NULL || key == NULL )
+    {
+        rc = RC( rcExe, rcNode, rcExecuting, rcParam, rcInvalid );
+    }
+    else
+    {
+        uint32_t num_reads = 0;
+
+        *keys = 0;
+        if ( Fastq3ReadSplitter_key_buf == NULL )
+        {
+            /* initial alloc key_buf: "  1\0  2\0...\0  9\0 10\0 11\0...\03220..\08192\0" */
+            if ( nreads_max > 9999 )
+            {
+                /* key_offset and sprintf format size are insufficient for keys longer than 4 digits */
+                rc = RC( rcExe, rcNode, rcExecuting, rcBuffer, rcInsufficient );
+            }
+            else
+            {
+                Fastq3ReadSplitter_key_buf = malloc( nreads_max * key_offset );
+                if ( Fastq3ReadSplitter_key_buf == NULL )
+                {
+                    rc = RC( rcExe, rcNode, rcExecuting, rcMemory, rcExhausted );
+                }
+                else
+                {
+                    /* fill buffer w/keys */
+                    int i;
+                    char* p = Fastq3ReadSplitter_key_buf;
+                    for ( i = 1; rc == 0 && i <= nreads_max; i++ )
+                    {
+                        if ( sprintf( p, "%4u", i ) <= 0 )
+                        {
+                            rc = RC( rcExe, rcNode, rcExecuting, rcTransfer, rcIncomplete );
+                        }
+                        p += key_offset;
+                    }
+                }
+            }
+        }
+
+        if ( rc == 0 )
+        {
+            rc = FastqReaderSeekSpot( self->reader, spot );
+            if ( rc == 0 )
+            {
+                rc = FastqReader_SpotInfo( self->reader, NULL, NULL, NULL, NULL, NULL, &num_reads );
+                if ( rc == 0 )
+                {
+                    uint32_t readId, good  = 0;
+                    const uint32_t max_reads = sizeof( self->keys ) /sizeof( self->keys[ 0 ] );
+
+                    SRA_DUMP_DBG( 3, ( "%s %u row reads:", __func__, spot ) );
+                    for ( readId = 0; rc == 0 && readId < num_reads && good < max_reads; readId++ )
+                    {
+                        rc = FastqReader_SpotReadInfo( self->reader, readId + 1, NULL, NULL, NULL, NULL, NULL );
+                        if ( !isset_readmask( readmask, readId ) )
+                        {
+                            continue;
+                        }
+                        self->keys[ good ].key = &Fastq3ReadSplitter_key_buf[ good * key_offset ];
+                        while ( self->keys[ good ].key[ 0 ] == ' ' && self->keys[good].key[ 0 ] != '\0' )
+                        {
+                            self->keys[ good ].key++;
+                        }
+                        clear_readmask( self->keys[ good ].readmask );
+                        set_readmask( self->keys[ good ].readmask, readId );
+                        SRA_DUMP_DBG( 3, ( " key['%s']+=%u", self->keys[ good ].key, readId ) );
+                        good++;
+                    }
+                    if ( rc == 0 )
+                    {
+                        *key = self->keys;
+                        *keys = good;
+                        if ( good != max_reads )
+                        {
+                            /* some are short -> reset keys to same value for all valid reads */
+                            /* run has just one read -> no suffix */
+                            /* or single file was requested */
+                            for ( readId = 0; readId < good; readId++ )
+                            {
+                                self->keys[ readId ].key = "";
+                            }
+                            SRA_DUMP_DBG( 3, ( " all keys joined to ''" ) );
+                        }
+                    }
+                    SRA_DUMP_DBG( 3, ( "\n" ) );
+                }
+            }
+            else if ( GetRCObject( rc ) == rcRow && GetRCState( rc ) == rcNotFound )
+            {
+                SRA_DUMP_DBG( 3, ( "%s skipped %u row\n", __func__, spot ) );
+                rc = 0;
+            }
+        }
+        else if ( GetRCObject( rc ) == rcRow && GetRCState( rc ) == rcNotFound )
+        {
+            SRA_DUMP_DBG( 3, ( "%s skipped %u row\n", __func__, spot ) );
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+typedef struct Fastq3ReadSplitterFactory_struct
+{
+    const char* accession;
+    const SRATable* table;
+    const FastqReader* reader;
+} Fastq3ReadSplitterFactory;
+
+
+static rc_t Fastq3ReadSplitterFactory_Init( const SRASplitterFactory* cself )
+{
+    rc_t rc = 0;
+    Fastq3ReadSplitterFactory* self = ( Fastq3ReadSplitterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = FastqReaderMake( &self->reader, self->table, self->accession,
+                              /* preserve orig spot format to save on conversions */
+                              FastqArgs.is_platform_cs_native, false, FastqArgs.fasta > 0, false, 
+                              false, !FastqArgs.applyClip, FastqArgs.SuppressQualForCSKey, 0,
+                              FastqArgs.offset, '\0', 0, 0 );
+    }
+    return rc;
+}
+
+
+static rc_t Fastq3ReadSplitterFactory_NewObj( const SRASplitterFactory* cself, const SRASplitter** splitter )
+{
+    rc_t rc = 0;
+    Fastq3ReadSplitterFactory* self = ( Fastq3ReadSplitterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitter_Make( splitter, sizeof( Fastq3ReadSplitter ),
+                               NULL, Fastq3ReadSplitter_GetKeySet, NULL, NULL );
+        if ( rc == 0 )
+        {
+            ( (Fastq3ReadSplitter*)(*splitter) )->reader = self->reader;
+        }
+    }
+    return rc;
+}
+
+
+static void Fastq3ReadSplitterFactory_Release( const SRASplitterFactory* cself )
+{
+    if ( cself != NULL )
+    {
+        Fastq3ReadSplitterFactory* self = ( Fastq3ReadSplitterFactory* )cself;
+        FastqReaderWhack( self->reader );
+        free( Fastq3ReadSplitter_key_buf );
+    }
+}
+
+
+static rc_t Fastq3ReadSplitterFactory_Make( const SRASplitterFactory** cself,
+                    const char* accession, const SRATable* table )
+{
+    rc_t rc = 0;
+    Fastq3ReadSplitterFactory* obj = NULL;
+
+    if ( cself == NULL || accession == NULL || table == NULL ) 
+    {
+        rc = RC( rcExe, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitterFactory_Make( cself, eSplitterRead, sizeof( *obj ),
+                                      Fastq3ReadSplitterFactory_Init,
+                                      Fastq3ReadSplitterFactory_NewObj,
+                                      Fastq3ReadSplitterFactory_Release );
+        if ( rc == 0 )
+        {
+            obj = ( Fastq3ReadSplitterFactory* )*cself;
+            obj->accession = accession;
+            obj->table = table;
+        }
+    }
+    return rc;
+}
+
+
+/* ============== FASTQ formatter object  ============================ */
+
+
+typedef struct FastqFormatterSplitter_struct
+{
+    const char* accession;
+    const FastqReader* reader;
+    KDataBuffer* b[ 5 ];
+    size_t bsz[ 5 ]; /* fifth is for fasta line wrap */
+} FastqFormatterSplitter;
+
+
+static rc_t FastqFormatterSplitter_WrapLine( const KDataBuffer* src, size_t src_sz,
+                                             KDataBuffer* dst, size_t* dst_sz, const uint64_t width )
+{
+    rc_t rc = 0;
+    size_t sz = src_sz + ( src_sz - 1 ) / width;
+
+    if ( KDataBufferBytes( dst ) < sz )
+    {
+        SRA_DUMP_DBG( 10, ( "%s grow buffer from %u to %u\n", __func__, KDataBufferBytes( dst ), sz + 10 ) );
+        rc = KDataBufferResize( dst, sz + 10 );
+    }
+    if ( rc == 0 )
+    {
+        const char* s = src->base;
+        char* d = dst->base;
+        *dst_sz = sz = src_sz;
+        while ( sz > 0 )
+        {
+            memcpy( d, s, sz > width ? width : sz );
+            if ( sz <= width )
+            {
+                break;
+            }
+            d += width;
+            *d++ = '\n';
+            *dst_sz = *dst_sz + 1;
+            s += width;
+            sz -= width;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t FastqFormatterSplitter_DumpByRead( const SRASplitter* cself, spotid_t spot, const readmask_t* readmask )
+{
+    rc_t rc = 0;
+    FastqFormatterSplitter* self = ( FastqFormatterSplitter* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcExecuting, rcParam, rcNull );
+    }
+    else 
+    {
+        rc = FastqReaderSeekSpot( self->reader, spot );
+        if ( rc == 0 )
+        {
+            rc = SRASplitter_FileActivate( cself, FastqArgs.file_extension );
+            if ( rc == 0 )
+            {
+                DeflineData def_data;
+                const char* spot_name = NULL, *spot_group = NULL, *read_name = NULL;
+                uint32_t readIdx, spot_len = 0;
+                uint32_t num_reads, readId, k;
+                size_t sname_sz, sgrp_sz;
+                INSDC_coord_len rlabel_sz = 0, read_len = 0;
+
+                if ( FastqArgs.b_defline || FastqArgs.q_defline )
+                {
+                    rc = FastqReader_SpotInfo( self->reader, &spot_name, &sname_sz, &spot_group, &sgrp_sz, &spot_len, &num_reads );
+                }
+                else
+                {
+                    rc = FastqReader_SpotInfo( self->reader, NULL, NULL, NULL, NULL, NULL, &num_reads );
+                }
+
+                for ( readId = 1, readIdx = 1; rc == 0 && readId <= num_reads; readId++, readIdx++ )
+                {
+                    if ( !isset_readmask( readmask, readId - 1 ) )
+                    {
+                        continue;
+                    }
+                    if ( FastqArgs.b_defline || FastqArgs.q_defline )
+                    {
+                        rc = FastqReader_SpotReadInfo( self->reader, readId, NULL, &read_name, &rlabel_sz, NULL, &read_len );
+                        if ( rc == 0 )
+                        {
+                            rc = Defline_Bind( &def_data, self->accession, &spot, spot_name, sname_sz, spot_group, sgrp_sz,
+                                               &spot_len, &readIdx, read_name, rlabel_sz, &read_len );
+                        }
+                    }
+                    if ( rc == 0 )
+                    {
+                        if ( FastqArgs.b_defline )
+                        {
+                            IF_BUF( ( Defline_Build( FastqArgs.b_defline, &def_data, self->b[0]->base,
+                                      KDataBufferBytes( self->b[0] ), &self->bsz[0] ) ), self->b[0], self->bsz[0] );
+                        }
+                        else
+                        {
+                            IF_BUF( ( FastqReaderBaseName( self->reader, readId, &FastqArgs.dumpCs, self->b[0]->base,
+                                      KDataBufferBytes( self->b[0] ), &self->bsz[0] ) ), self->b[0], self->bsz[0] );
+                        }
+                    }
+                    if ( rc == 0 )
+                    {
+                        if ( FastqArgs.fasta > 0 )
+                        {
+                            IF_BUF( ( FastqReaderBase( self->reader, readId, self->b[4]->base, KDataBufferBytes( self->b[4] ),
+                                      &self->bsz[4] ) ), self->b[4], self->bsz[4] )
+                            {
+                                rc = FastqFormatterSplitter_WrapLine( self->b[4], self->bsz[4], self->b[1], &self->bsz[1], FastqArgs.fasta );
+                            }
+                        }
+                        else
+                        {
+                            IF_BUF( ( FastqReaderBase( self->reader, readId, self->b[1]->base,
+                                      KDataBufferBytes( self->b[1] ), &self->bsz[1] ) ), self->b[1], self->bsz[1] );
+                        }
+                    }
+                    if ( !FastqArgs.fasta && rc == 0 )
+                    {
+                        if ( FastqArgs.q_defline )
+                        {
+                            IF_BUF( ( Defline_Build( FastqArgs.q_defline, &def_data, self->b[2]->base,
+                                      KDataBufferBytes( self->b[2] ), &self->bsz[2] ) ), self->b[2], self->bsz[2] );
+                        }
+                        else
+                        {
+                            IF_BUF( ( FastqReaderQualityName( self->reader, readId, &FastqArgs.dumpCs, self->b[2]->base,
+                                      KDataBufferBytes( self->b[2] ), &self->bsz[2] ) ), self->b[2], self->bsz[2] );
+                        }
+                        if ( rc == 0 )
+                        {
+                            IF_BUF( ( FastqReaderQuality( self->reader, readId, self->b[3]->base,
+                                      KDataBufferBytes( self->b[3] ), &self->bsz[3] ) ), self->b[3], self->bsz[3] );
+                        }
+                    }
+                    else if ( ( (char*)(self->b[0]->base))[0] == '@' )
+                    {
+                        ( (char*)(self->b[0]->base) )[0] = '>';
+                    }
+                    for ( k = 0; rc == 0 && k < ( FastqArgs.fasta ? 2 : 4); k++ )
+                    {
+                        rc = SRASplitter_FileWrite( cself, spot, self->b[ k ]->base, self->bsz[ k ] );
+                        if ( rc == 0 )
+                        {
+                            rc = SRASplitter_FileWrite( cself, spot, "\n", 1 );
+                        }
+                    }
+                }
+            }
+        }
+        else if ( GetRCObject( rc ) == rcRow && GetRCState( rc ) == rcNotFound )
+        {
+            SRA_DUMP_DBG( 3, ( "%s skipped %u row\n", __func__, spot ) );
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t Fasta_dump( const SRASplitter* cself, FastqFormatterSplitter* self, spotid_t spot, uint32_t columns )
+{
+    uint32_t readId;
+    rc_t rc = FastqFormatterSplitter_WrapLine( self->b[4], self->bsz[4], self->b[1], &self->bsz[1], columns );
+    for ( readId = 0; rc == 0 && readId < 2; readId++ )
+    {
+        rc = SRASplitter_FileWrite( cself, spot, self->b[readId]->base, self->bsz[ readId ] );
+        if ( rc == 0 )
+        {
+            rc = SRASplitter_FileWrite( cself, spot, "\n", 1 );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t FastqFormatterSplitter_DumpBySpot( const SRASplitter* cself, spotid_t spot, const readmask_t* readmask )
+{
+    rc_t rc = 0;
+    FastqFormatterSplitter* self = ( FastqFormatterSplitter* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        rc = FastqReaderSeekSpot( self->reader, spot );
+        if ( rc == 0 )
+        {
+            uint32_t num_reads, readId;
+
+            rc = FastqReader_SpotInfo( self->reader, NULL, NULL, NULL, NULL, NULL, &num_reads );
+            for ( readId = 0; rc == 0 && readId < num_reads; readId++ )
+            {
+                /* if any read in readmask is not set - skip whole spot */
+                if ( !isset_readmask( readmask, readId ) )
+                {
+                    return 0;
+                }
+            }
+            if ( rc == 0 )
+            {
+                rc = SRASplitter_FileActivate( cself, FastqArgs.file_extension );
+                if ( rc == 0 )
+                {
+                    DeflineData def_data;
+                    const char* spot_name = NULL, *spot_group = NULL;
+                    uint32_t spot_len = 0;
+                    size_t writ, sname_sz, sgrp_sz;
+                    const int base_i = FastqArgs.fasta ? 4 : 1;
+
+                    if ( FastqArgs.b_defline || FastqArgs.q_defline )
+                    {
+                        rc = FastqReader_SpotInfo( self->reader, &spot_name, &sname_sz,
+                                                   &spot_group, &sgrp_sz, &spot_len, NULL );
+                        if ( rc == 0 )
+                        {
+                            rc = Defline_Bind( &def_data, self->accession, &spot, spot_name,
+                                               sname_sz, spot_group, sgrp_sz, 
+                                               &spot_len, &readId, NULL, 0, &spot_len );
+                        }
+                    }
+
+                    if ( rc == 0 )
+                    {
+                        if ( FastqArgs.b_defline )
+                        {
+                            IF_BUF( ( Defline_Build( FastqArgs.b_defline, &def_data, self->b[0]->base,
+                                      KDataBufferBytes( self->b[0] ), &self->bsz[0] ) ), self->b[0], self->bsz[0] );
+                        }
+                        else
+                        {
+                            IF_BUF( ( FastqReaderBaseName( self->reader, 0, &FastqArgs.dumpCs, self->b[0]->base,
+                                      KDataBufferBytes( self->b[0] ), &self->bsz[0] ) ), self->b[0], self->bsz[0] );
+                        }
+                        self->bsz[ base_i ] = 0;
+                        if ( !FastqArgs.fasta && rc == 0 )
+                        {
+                            if ( FastqArgs.q_defline )
+                            {
+                                IF_BUF( ( Defline_Build( FastqArgs.q_defline, &def_data, self->b[2]->base,
+                                          KDataBufferBytes( self->b[2] ), &self->bsz[2] ) ), self->b[2], self->bsz[2] );
+                            }
+                            else
+                            {
+                                IF_BUF( ( FastqReaderQualityName( self->reader, 0, &FastqArgs.dumpCs, self->b[2]->base,
+                                          KDataBufferBytes( self->b[2] ), &self->bsz[2] ) ), self->b[2], self->bsz[2] );
+                            }
+                            self->bsz[3] = 0;
+                        }
+                        else if ( ( (char*)(self->b[0]->base) )[0] == '@' )
+                        {
+                            ( (char*)(self->b[0]->base) )[0] = '>';
+                        }
+                    }
+
+                    for ( readId = 1; rc == 0 && readId <= num_reads; readId++ )
+                    {
+                        IF_BUF( ( FastqReaderBase( self->reader, readId, &( (char*)(self->b[base_i]->base) )[ self->bsz[ base_i ] ],
+                                  KDataBufferBytes( self->b[ base_i ] ) - self->bsz[ base_i ], &writ) ), self->b[ base_i ], self->bsz[ base_i ] + writ )
+                        {
+                            self->bsz[base_i] += writ;
+                            if ( !FastqArgs.fasta )
+                            {
+                                IF_BUF( ( FastqReaderQuality( self->reader, readId, &( (char*)(self->b[3]->base) )[ self->bsz[3] ],
+                                        KDataBufferBytes( self->b[3] ) - self->bsz[3], &writ ) ), self->b[3], self->bsz[3] + writ )
+                                {
+                                    self->bsz[ 3 ] += writ;
+                                }
+                            }
+                        }
+                    }
+
+                    if ( rc == 0 )
+                    {
+                        if ( FastqArgs.fasta > 0 )
+                        {
+                            /* special printint of fasta-output ( line-wrap... ) */
+                            rc = Fasta_dump( cself, self, spot, FastqArgs.fasta );
+                        }
+                        else
+                        {
+                            for ( readId = 0; rc == 0 && readId < 4; readId++ )
+                            {
+                                rc = SRASplitter_FileWrite( cself, spot, self->b[readId]->base, self->bsz[ readId ] );
+                                if ( rc == 0 )
+                                {
+                                    rc = SRASplitter_FileWrite( cself, spot, "\n", 1 );
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        else if ( GetRCObject( rc ) == rcRow && GetRCState( rc ) == rcNotFound )
+        {
+            SRA_DUMP_DBG( 3, ( "%s skipped %u row\n", __func__, spot ) );
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+
+typedef struct FastqFormatterFactory_struct
+{
+    const char* accession;
+    const SRATable* table;
+    const FastqReader* reader;
+    KDataBuffer buf[ 5 ]; /* fifth is for fasta line wrap */
+} FastqFormatterFactory;
+
+
+static rc_t FastqFormatterFactory_Init( const SRASplitterFactory* cself )
+{
+    rc_t rc = 0;
+    FastqFormatterFactory* self = ( FastqFormatterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = FastqReaderMake( &self->reader, self->table, self->accession,
+                     FastqArgs.dumpCs, FastqArgs.dumpOrigFmt, FastqArgs.fasta > 0, FastqArgs.dumpCs,
+                     FastqArgs.readIds, !FastqArgs.applyClip, FastqArgs.SuppressQualForCSKey, 0,
+                     FastqArgs.offset, FastqArgs.desiredCsKey[ 0 ], 0, 0 );
+        if ( rc == 0 )
+        {
+            int i;
+            for( i = 0; rc == 0 && i < sizeof( self->buf ) / sizeof( self->buf[ 0 ] ); i++ )
+            {
+                rc = KDataBufferMakeBytes( &self->buf[ i ], DATABUFFERINITSIZE );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t FastqFormatterFactory_NewObj( const SRASplitterFactory* cself, const SRASplitter** splitter )
+{
+    rc_t rc = 0;
+    FastqFormatterFactory* self = ( FastqFormatterFactory* )cself;
+
+    if ( self == NULL )
+    {
+        rc = RC( rcExe, rcType, rcExecuting, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitter_Make ( splitter, sizeof( FastqFormatterSplitter ), NULL, NULL,
+                                FastqArgs.split_spot ?
+                                    FastqFormatterSplitter_DumpByRead :
+                                    FastqFormatterSplitter_DumpBySpot, NULL );
+        if ( rc == 0 )
+        {
+            int i;
+            ( (FastqFormatterSplitter*)(*splitter) )->accession = self->accession;
+            ( (FastqFormatterSplitter*)(*splitter) )->reader = self->reader;
+            for ( i = 0; i < sizeof( self->buf ) / sizeof( self->buf[ 0 ] ); i++ )
+            {
+                ( (FastqFormatterSplitter*)(*splitter) )->b[ i ] = &self->buf[ i ];
+            }
+        }
+    }
+    return rc;
+}
+
+
+static void FastqFormatterFactory_Release( const SRASplitterFactory* cself )
+{
+    if ( cself != NULL )
+    {
+        int i;
+        FastqFormatterFactory* self = ( FastqFormatterFactory* )cself;
+        FastqReaderWhack( self->reader );
+        for ( i = 0; i < sizeof( self->buf ) / sizeof( self->buf[ 0 ] ); i++ )
+        {
+            KDataBufferWhack( &self->buf[ i ] );
+        }
+    }
+}
+
+
+static rc_t FastqFormatterFactory_Make( const SRASplitterFactory** cself,
+                const char* accession, const SRATable* table )
+{
+    rc_t rc = 0;
+    FastqFormatterFactory* obj = NULL;
+
+    if ( cself == NULL || accession == NULL || table == NULL )
+    {
+        rc = RC( rcExe, rcType, rcConstructing, rcParam, rcNull );
+    }
+    else
+    {
+        rc = SRASplitterFactory_Make( cself, eSplitterFormat, sizeof( *obj ),
+                                      FastqFormatterFactory_Init,
+                                      FastqFormatterFactory_NewObj,
+                                      FastqFormatterFactory_Release );
+        if ( rc == 0 )
+        {
+            obj = (FastqFormatterFactory*)*cself;
+            obj->accession = accession;
+            obj->table = table;
+        }
+    }
+    return rc;
+}
+
+
+/* ### External entry points ##################################################### */
+
+
+const char UsageDefaultName[] = "fastq-dump";
+
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    return 0;
+}
+
+#define H_splip_sot 0
+#define H_clip 1
+#define H_minReadLen 2
+#define H_qual_filter 3
+#define H_skip_tech 4
+#define H_split_files 5
+#define H_split_3 6
+#define H_dumpcs 7
+#define H_dumpbase 8
+#define H_offset 9
+#define H_fasta 10
+#define H_origfmt 11
+#define H_readids 12
+#define H_helicos 13
+#define H_defline_seq 14
+#define H_defline_qual 15
+#define H_aligned 16
+#define H_unaligned 17
+#define H_aligned_region 18
+#define H_matepair_distance 19
+#define H_qual_filter_1 20
+#define H_SuppressQualForCSKey 21
+
+rc_t FastqDumper_Usage( const SRADumperFmt* fmt, const SRADumperFmt_Arg* core_args, int first )
+{
+    int i, j;
+    /* known core options */
+    const SRADumperFmt_Arg* core[ 13 ];
+
+    memset( (void*)core, 0, sizeof( core ) );
+    for ( i = first; core_args[i].abbr != NULL || core_args[ i ].full != NULL; i++ )
+    {
+        const char* nm = core_args[ i ].abbr;
+        nm = nm ? nm : core_args[ i ].full;
+        if ( strcmp( nm, "A" ) == 0 )
+        {
+            core[ 0 ] = &core_args[ i ];
+        }
+        else if ( strcmp( nm, "O" ) == 0 )
+        {
+            core[ 1 ] = &core_args[ i ];
+        }
+        else if ( strcmp( nm, "N" ) == 0 )
+        {
+            core[ 2 ] = &core_args[ i ];
+        }
+        else if ( strcmp( nm, "X" ) == 0 )
+        {
+            core[ 3 ] = &core_args[ i ];
+        }
+        else if ( strcmp( nm, "G" ) == 0 )
+        {
+            core[ 4 ] = &core_args[ i ];
+        }
+        else if ( strcmp( nm, "spot-groups" ) == 0 )
+        {
+            core[ 5 ] = &core_args[ i ];
+        }
+        else if ( strcmp( nm, "R" ) == 0 )
+        {
+            core[ 6 ] = &core_args[ i ];
+        }
+        else if ( strcmp( nm, "T" ) == 0 )
+        {
+            core[ 7 ] = &core_args[ i ];
+        }
+        else if ( strcmp( nm, "K" ) == 0 )
+        {
+            core[ 8 ] = &core_args[ i ];
+        }
+        else if ( strcmp( nm, "table" ) == 0 )
+        {
+            core[ 9 ] = &core_args[ i ];
+        }
+        else if ( strcmp( nm, "Z" ) == 0 )
+        {
+            core[ 10 ] = &core_args[ i ];
+        }
+        else if ( strcmp( nm, "gzip" ) == 0 )
+        {
+            core[ 11 ] = &core_args[ i ];
+        }
+        else if ( strcmp( nm, "bzip2" ) == 0 )
+        {
+            core[ 12 ] = &core_args[ i ];
+        }
+    }
+
+#define OARG(arg,msg) (arg ? HelpOptionLine((arg)->abbr, (arg)->full, (arg)->param, \
+                       msg ? msg : (const char**)((arg)->descr)) : ((void)(0)))
+
+    OUTMSG(( "INPUT\n" ));
+    OARG( core[ 0 ], NULL );
+    OARG( core[ 9 ], NULL );
+
+    OUTMSG(( "\nPROCESSING\n" ));
+    OUTMSG(( "\nRead Splitting                     Sequence data may be used in raw form or\n"));
+    OUTMSG(( "                                     split into individual reads\n" ));
+    OARG( &fmt->arg_desc[ 0 ], NULL);
+
+    OUTMSG(( "\nFull Spot Filters                  Applied to the full spot independently\n" ));
+    OUTMSG(( "                                     of --%s\n", fmt->arg_desc[0].full ));
+    OARG( core[ 2 ], NULL );
+    OARG( core[ 3 ], NULL );
+    OARG( core[ 5 ], NULL );
+    OARG( &fmt->arg_desc[ 1 ], NULL );
+
+    OUTMSG(( "\nCommon Filters                     Applied to spots when --%s is not\n",
+                                                  fmt->arg_desc[0].full ));
+    OUTMSG(( "                                     set, otherwise - to individual reads\n" ));
+    OARG( &fmt->arg_desc[ 2 ], NULL );
+    OARG( core[ 6 ], NULL );
+    OARG( &fmt->arg_desc[ 3 ], NULL );
+    OARG( &fmt->arg_desc[ H_qual_filter_1 ], NULL );
+
+    OUTMSG(( "\nFilters based on alignments        Filters are active when alignment\n" ));
+    OUTMSG(( "                                     data are present\n" ));
+    OARG( &fmt->arg_desc[ 16 ], NULL );
+    OARG( &fmt->arg_desc[ 17 ], NULL );
+    OARG( &fmt->arg_desc[ 18 ], NULL );
+    OARG( &fmt->arg_desc[ 19 ], NULL );
+
+    OUTMSG(( "\nFilters for individual reads       Applied only with --%s set\n",
+                                                  fmt->arg_desc[0].full ));
+    OARG( &fmt->arg_desc[ 4 ], NULL );
+
+    OUTMSG(( "\nOUTPUT\n" ));
+    OARG( core[ 1 ], NULL );
+    OARG( core[ 10 ], NULL );
+    OARG( core[ 11 ], NULL  );
+    OARG( core[ 12 ], NULL);
+
+    OUTMSG(( "\nMultiple File Options              Setting these options will produce more\n" ));
+    OUTMSG(( "                                     than 1 file, each of which will be suffixed\n" ));
+    OUTMSG(( "                                     according to splitting criteria.\n" ));
+    OARG( &fmt->arg_desc[ 5 ], NULL );
+    OARG( &fmt->arg_desc[ 6 ], NULL );
+    OARG( core[ 4 ], NULL );
+    OARG( core[ 6 ], NULL );
+    OARG( core[ 7 ], NULL );
+    OARG( core[ 8 ], NULL );
+
+    OUTMSG(( "\nFORMATTING\n" ));
+    OUTMSG(( "\nSequence\n" ));
+    OARG( &fmt->arg_desc[ 7 ], NULL );
+    OARG( &fmt->arg_desc[ 8 ], NULL );
+
+    OUTMSG(( "\nQuality\n" ));
+    OARG( &fmt->arg_desc[ 9 ], NULL );
+    OARG( &fmt->arg_desc[ 10 ], NULL );
+    OARG( &fmt->arg_desc[ H_SuppressQualForCSKey ], NULL ); /* added Jan 15th 2014 ( a new fastq-variation! ) */
+
+    OUTMSG(( "\nDefline\n" ));
+    OARG( &fmt->arg_desc[ 11 ], NULL );
+    OARG( &fmt->arg_desc[ 12 ], NULL );
+    OARG( &fmt->arg_desc[ 13 ], NULL );
+    OARG( &fmt->arg_desc[ 14 ], NULL );
+    OARG( &fmt->arg_desc[ 15 ], NULL );
+
+    OUTMSG(( "OTHER:\n" ));
+    for ( i = first; core_args[ i ].abbr != NULL || core_args[ i ].full != NULL; i++ )
+    {
+        bool print = true;
+        for ( j = 0; j < sizeof( core ) / sizeof( core[ 0 ] ); j++ )
+        {
+            if ( core[ j ] == &core_args[ i ] )
+            {
+                print = false;
+                break;
+            }
+        }
+        if ( print )
+        {
+            OARG( &core_args[ i ], NULL );
+        }
+    }
+    return 0;
+}
+
+
+rc_t FastqDumper_Release( const SRADumperFmt* fmt )
+{
+    if ( fmt == NULL )
+    {
+        return RC( rcExe, rcFormatter, rcDestroying, rcParam, rcInvalid );
+    }
+    else
+    {
+        Defline_Release( FastqArgs.b_defline );
+        Defline_Release( FastqArgs.q_defline );
+        free( FastqArgs.alregion );
+    }
+    return 0;
+}
+
+
+bool FastqDumper_AddArg( const SRADumperFmt* fmt, GetArg* f, int* i, int argc, char *argv[] )
+{
+    const char* arg = NULL;
+
+    if ( fmt == NULL || f == NULL || i == NULL || argv == NULL )
+    {
+        LOGERR( klogErr, RC( rcExe, rcArgv, rcReading, rcParam, rcInvalid ), "null param" );
+        return false;
+    }
+    else if ( f( fmt, "M", "minReadLen", i, argc, argv, &arg ) )
+    {
+        FastqArgs.minReadLen = AsciiToU32( arg, NULL, NULL );
+    }
+    else if ( f( fmt, "W", "clip", i, argc, argv, NULL ) )
+    {
+        FastqArgs.applyClip = true;
+    }
+    else if ( f( fmt, "SU", "suppress-qual-for-cskey", i, argc, argv, NULL ) )
+    {
+        FastqArgs.SuppressQualForCSKey = true;
+    }
+    else if ( f( fmt, "F", "origfmt", i, argc, argv, NULL ) )
+    {
+        FastqArgs.dumpOrigFmt = true;
+    }
+    else if ( f( fmt, "C", "dumpcs", i, argc, argv, NULL ) )
+    {
+        int k = ( *i ) + 1;
+        FastqArgs.dumpCs = true;
+        if ( k < argc && strlen( argv[ k ] ) == 1 && strchr( "acgtACGT", argv[ k ][ 0 ] ) != NULL )
+        {
+            FastqArgs.desiredCsKey = argv[ k ];
+            *i = k;
+        }
+    }
+    else if ( f( fmt, "B", "dumpbase", i, argc, argv, NULL ) )
+    {
+        FastqArgs.dumpBase = true;
+    }
+    else if ( f( fmt, "Q", "offset", i, argc, argv, &arg ) )
+    {
+        FastqArgs.offset = AsciiToU32( arg, NULL, NULL );
+    }
+    else if ( f( fmt, "I", "readids", i, argc, argv, NULL ) )
+    {
+        FastqArgs.readIds = true;
+    }
+    else if ( f( fmt, "E", "qual-filter", i, argc, argv, NULL ) )
+    {
+        FastqArgs.qual_filter = true;
+    }
+    else if ( f( fmt, "E1", "qual-filter-1", i, argc, argv, NULL ) )
+    {
+        FastqArgs.qual_filter1 = true;
+    }
+    else if ( f( fmt, "DB", "defline-seq", i, argc, argv, &arg ) )
+    {
+        FastqArgs.b_deffmt = arg;
+    }
+    else if ( f( fmt, "DQ", "defline-qual", i, argc, argv, &arg ) )
+    {
+        FastqArgs.q_deffmt = arg;
+    }
+    else if ( f( fmt, "TR", "skip-technical", i, argc, argv, NULL ) )
+    {
+        FastqArgs.skipTechnical = true;
+    }
+    else if ( f( fmt, "SF", "split-files", i, argc, argv, NULL ) )
+    {
+        SRADumperFmt * nc_fmt = ( SRADumperFmt * )fmt;
+        FastqArgs.split_spot = true;
+        FastqArgs.split_files = true;
+        nc_fmt->split_files = true;
+    }
+    else if ( f( fmt, NULL, "split-3", i, argc, argv, NULL ) )
+    {
+        FastqArgs.split_3 = true;
+        FastqArgs.split_spot = true;
+        FastqArgs.maxReads = 2;
+        FastqArgs.skipTechnical = true;
+    }
+    else if ( f( fmt, "SL", "split-spot", i, argc, argv, NULL ) )
+    {
+        FastqArgs.split_spot = true;
+    }
+    else if ( f( fmt, "HS", "helicos", i, argc, argv, NULL ) )
+    {
+        FastqArgs.b_deffmt = "@$sn";
+        FastqArgs.q_deffmt =  "+";
+    }
+    else if ( f( fmt, "FA", "fasta", i, argc, argv, NULL ) )
+    {
+        int k = (*i) + 1;
+        FastqArgs.fasta = 70;
+        if ( k < argc && isdigit( argv[ k ][ 0 ] ) )
+        {
+            char* endp = NULL;
+            errno = 0;
+            FastqArgs.fasta = strtou64( argv[ k ], &endp, 10 );
+            if ( errno != 0 || endp == NULL || *endp != '\0' )
+            {
+                return false;
+            }
+            *i = k;
+            if ( FastqArgs.fasta == 0 )
+            {
+                FastqArgs.fasta = ~0;
+            }
+        }
+        FastqArgs.file_extension = ".fasta";
+    }
+    else if ( f( fmt, NULL, "aligned", i, argc, argv, NULL ) )
+    {
+        FastqArgs.aligned = true;
+    }
+    else if ( f( fmt, NULL, "unaligned", i, argc, argv, NULL ) )
+    {
+        FastqArgs.unaligned = true;
+    }
+    else if ( f( fmt, NULL, "aligned-region", i, argc, argv, &arg ) )
+    {
+        /* name[:[from][-[to]]] */
+        TAlignedRegion* r = realloc( FastqArgs.alregion, sizeof( *FastqArgs.alregion ) * ++FastqArgs.alregion_qty );
+        if ( r == NULL )
+        {
+            return false;
+        }
+        FastqArgs.alregion = r;
+        r = &FastqArgs.alregion[ FastqArgs.alregion_qty - 1 ];
+        r->name = strchr( arg, ':' );
+        r->from = 0;
+        r->to = 0;
+        if ( r->name == NULL )
+        {
+            r->name = arg;
+            r->name_len = strlen( arg );
+        }
+        else
+        {
+            const char* c;
+            uint64_t* v;
+
+            r->name_len = r->name - arg;
+            c = r->name;
+            r->name = arg;
+
+            v = &r->from;
+            while ( *++c != '\0')
+            {
+                if ( *c == '-' )
+                {
+                    v = &r->to;
+                }
+                else if ( *c == '+' )
+                {
+                    if ( *v != 0 )
+                    {
+                        return false;
+                    }
+                }
+                else if ( !isdigit( *c ) )
+                {
+                    return false;
+                }
+                else
+                {
+                    *v = *v * 10 + ( *c - '0' );
+                }
+            }
+            if ( r->from > r->to && r->to != 0 )
+            {
+                uint64_t x = r->from;
+                r->from = r->to;
+                r->to = x;
+            }
+        }
+    }
+    else if ( f( fmt, NULL, "matepair-distance", i, argc, argv, &arg ) )
+    {
+        /* from[-to] | [from]-to | unknown */
+        if ( strcmp( arg, "unknown" ) == 0 )
+        {
+            FastqArgs.mp_dist_unknown = true;
+        }
+        else
+        {
+            uint64_t* v;
+            TMatepairDistance* p = realloc( FastqArgs.mp_dist, sizeof( *FastqArgs.mp_dist ) * ++FastqArgs.mp_dist_qty );
+            if ( p == NULL )
+            {
+                return false;
+            }
+            FastqArgs.mp_dist = p;
+            p = &FastqArgs.mp_dist[ FastqArgs.mp_dist_qty - 1 ];
+            p->from = 0;
+            p->to = 0;
+
+            v = &p->from;
+            while ( *++arg != '\0' )
+            {
+                if ( *arg == '-' )
+                {
+                    v = &p->to;
+                }
+                else if ( *arg == '+' )
+                {
+                    if ( *v != 0 )
+                    {
+                        return false;
+                    }
+                }
+                else if ( !isdigit( *arg ) )
+                {
+                    return false;
+                }
+                else
+                {
+                    *v = *v * 10 + ( *arg - '0' );
+                }
+            }
+            if ( p->from > p->to && p->to != 0 )
+            {
+                uint64_t x = p->from;
+                p->from = p->to;
+                p->to = x;
+            }
+            if ( p->from == 0 && p->to == 0 )
+            {
+                FastqArgs.mp_dist_qty--;
+            }
+        }
+    }
+    else
+    {
+        return false;
+    }
+    return true;
+}
+
+
+rc_t FastqDumper_Factories( const SRADumperFmt* fmt, const SRASplitterFactory** factory )
+{
+    rc_t rc = 0;
+    const SRASplitterFactory* parent = NULL, *child = NULL;
+
+    if ( fmt == NULL || factory == NULL )
+    {
+        return RC( rcExe, rcFormatter, rcReading, rcParam, rcInvalid );
+    }
+    *factory = NULL;
+    {
+        const SRAColumn* c = NULL;
+        rc = SRATableOpenColumnRead( fmt->table, &c, "PLATFORM", sra_platform_id_t );
+        if ( rc == 0 )
+        {
+            const INSDC_SRA_platform_id * platform;
+            bitsz_t o, z;
+            rc = SRAColumnRead( c, 1, ( const void ** )&platform, &o, &z );
+            if ( rc == 0 )
+            {
+                if ( !FastqArgs.dumpCs && !FastqArgs.dumpBase )
+                {
+                    if ( platform != NULL && *platform == SRA_PLATFORM_ABSOLID )
+                    {
+                        FastqArgs.dumpCs = true;
+                    }
+                    else
+                    {
+                        FastqArgs.dumpBase = true;
+                    }
+                }
+                if ( platform != NULL && *platform == SRA_PLATFORM_ABSOLID )
+                {
+                    FastqArgs.is_platform_cs_native = true;
+                }
+            }
+            SRAColumnRelease( c );
+        }
+        else if ( GetRCState( rc ) == rcNotFound && GetRCObject( rc ) == ( enum RCObject )rcColumn )
+        {
+            rc = 0;
+        }
+    }
+
+    if ( ( FastqArgs.aligned || FastqArgs.unaligned ) && !( FastqArgs.aligned && FastqArgs.unaligned ) )
+    {
+        rc = AlignedFilterFactory_Make( &child, fmt->table, FastqArgs.aligned, FastqArgs.unaligned );
+        if ( rc == 0 )
+        {
+            if ( parent != NULL )
+            {
+                rc = SRASplitterFactory_AddNext( parent, child );
+                if ( rc != 0 )
+                {
+                    SRASplitterFactory_Release(child);
+                }
+                else
+                {
+                    parent = child;
+                }
+            }
+            else
+            {
+                parent = child;
+                *factory = parent;
+            }
+        }
+    }
+
+    if ( FastqArgs.alregion_qty > 0 )
+    {
+        rc = AlignRegionFilterFactory_Make( &child, fmt->table, FastqArgs.alregion, FastqArgs.alregion_qty );
+        if ( rc == 0 )
+        {
+            if ( parent != NULL )
+            {
+                rc = SRASplitterFactory_AddNext( parent, child );
+                if ( rc != 0 )
+                {
+                    SRASplitterFactory_Release( child );
+                }
+                else
+                {
+                    parent = child;
+                }
+            }
+            else
+            {
+                parent = child;
+                *factory = parent;
+            }
+        }
+    }
+
+    if ( FastqArgs.mp_dist_unknown || FastqArgs.mp_dist_qty > 0 )
+    {
+        rc = AlignPairDistanceFilterFactory_Make( &child, fmt->table,
+                FastqArgs.mp_dist_unknown, FastqArgs.mp_dist, FastqArgs.mp_dist_qty);
+        if ( rc == 0 )
+        {
+            if ( parent != NULL )
+            {
+                rc = SRASplitterFactory_AddNext( parent, child );
+                if ( rc != 0 )
+                {
+                    SRASplitterFactory_Release(child);
+                }
+                else
+                {
+                    parent = child;
+                }
+            }
+            else
+            {
+                parent = child;
+                *factory = parent;
+            }
+        }
+    }
+
+    if ( rc == 0 && FastqArgs.skipTechnical && FastqArgs.split_spot )
+    {
+        rc = FastqBioFilterFactory_Make( &child, fmt->accession, fmt->table );
+        if ( rc == 0 )
+        {
+            if ( parent != NULL )
+            {
+                rc = SRASplitterFactory_AddNext( parent, child );
+                if ( rc != 0 )
+                {
+                    SRASplitterFactory_Release( child );
+                }
+                else
+                {
+                    parent = child;
+                }
+            }
+            else
+            {
+                parent = child;
+                *factory = parent;
+            }
+        }
+    }
+
+    if ( rc == 0 && FastqArgs.maxReads > 0 )
+    {
+        rc = FastqRNumberFilterFactory_Make( &child, fmt->accession, fmt->table );
+        if ( rc == 0 )
+        {
+            if ( parent != NULL )
+            {
+                rc = SRASplitterFactory_AddNext( parent, child );
+                if ( rc != 0 )
+                {
+                    SRASplitterFactory_Release( child );
+                }
+                else
+                {
+                    parent = child;
+                }
+            }
+            else
+            {
+                parent = child;
+                *factory = parent;
+            }
+        }
+    }
+
+    if ( rc == 0 && ( FastqArgs.qual_filter || FastqArgs.qual_filter1 ) )
+    {
+        rc = FastqQFilterFactory_Make( &child, fmt->accession, fmt->table );
+        if ( rc == 0 )
+        {
+            if ( parent != NULL )
+            {
+                rc = SRASplitterFactory_AddNext( parent, child );
+                if ( rc != 0 )
+                {
+                    SRASplitterFactory_Release( child );
+                }
+                else
+                {
+                    parent = child;
+                }
+            }
+            else
+            {
+                parent = child;
+                *factory = parent;
+            }
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        rc = FastqReadLenFilterFactory_Make( &child, fmt->accession, fmt->table );
+        if ( rc == 0 )
+        {
+            if ( parent != NULL )
+            {
+                rc = SRASplitterFactory_AddNext( parent, child );
+                if ( rc != 0 )
+                {
+                    SRASplitterFactory_Release( child );
+                }
+                else
+                {
+                    parent = child;
+                }
+            }
+            else
+            {
+                parent = child;
+                *factory = parent;
+            }
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        if ( FastqArgs.split_3 )
+        {
+            rc = Fastq3ReadSplitterFactory_Make( &child, fmt->accession, fmt->table );
+            if ( rc == 0 )
+            {
+                if ( parent != NULL )
+                {
+                    rc = SRASplitterFactory_AddNext( parent, child );
+                    if ( rc != 0 )
+                    {
+                        SRASplitterFactory_Release( child );
+                    }
+                    else
+                    {
+                        parent = child;
+                    }
+                }
+                else
+                {
+                    parent = child;
+                    *factory = parent;
+                }
+            }
+        }
+        else if ( FastqArgs.split_files )
+        {
+            rc = FastqReadSplitterFactory_Make( &child, fmt->accession, fmt->table );
+            if ( rc == 0 )
+            {
+                if ( parent != NULL )
+                {
+                    rc = SRASplitterFactory_AddNext( parent, child );
+                    if ( rc != 0 )
+                    {
+                        SRASplitterFactory_Release(child);
+                    }
+                    else
+                    {
+                        parent = child;
+                    }
+                }
+                else
+                {
+                    parent = child;
+                    *factory = parent;
+                }
+            }
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        if ( FastqArgs.b_deffmt != NULL )
+        {
+            rc = Defline_Parse( &FastqArgs.b_defline, FastqArgs.b_deffmt );
+        }
+        if ( FastqArgs.q_deffmt != NULL )
+        {
+            rc = Defline_Parse( &FastqArgs.q_defline, FastqArgs.q_deffmt );
+        }
+        if ( rc == 0 )
+        {
+            rc = FastqFormatterFactory_Make( &child, fmt->accession, fmt->table );
+            if ( rc == 0 )
+            {
+                if ( parent != NULL )
+                {
+                    rc = SRASplitterFactory_AddNext( parent, child );
+                    if ( rc != 0 ) 
+                    {
+                        SRASplitterFactory_Release( child );
+                    }
+                }
+                else
+                {
+                    *factory = child;
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+/* main entry point of the file */
+rc_t SRADumper_Init( SRADumperFmt* fmt )
+{
+    static const SRADumperFmt_Arg arg[] =
+        {
+
+            /* DO NOT ADD IN THE MIDDLE ORDER IS IMPORTANT IN USAGE FUNCTION ABOVE!!! */
+            {NULL, "split-spot", NULL, {"Split spots into individual reads", NULL}},            /* H_splip_sot = 0 */
+
+            {"W", "clip", NULL, {"Apply left and right clips", NULL}},                          /* H_clip = 1 */
+
+            {"M", "minReadLen", "len", {"Filter by sequence length >= <len>", NULL}},           /* H_minReadLen = 2 */
+            {"E", "qual-filter", NULL, {"Filter used in early 1000 Genomes data:",              /* H_qual_filter = 3 */
+                                        "no sequences starting or ending with >= 10N", NULL}},
+
+            {NULL, "skip-technical", NULL, {"Dump only biological reads", NULL}},               /* H_skip_tech = 4 */
+
+            {NULL, "split-files", NULL, {"Dump each read into a separate file."                 /* H_split_files = 5 */
+                                         "Files will receive suffix corresponding to read number", NULL}},
+
+            /* DO NOT ADD IN THE MIDDLE ORDER IS IMPORTANT IN USAGE FUNCTION ABOVE!!! */
+            {NULL, "split-3", NULL, {"Legacy 3-file splitting for mate-pairs:",                 /* H_split_3 = 6 */
+                                     "First 2 biological reads satisfying dumping conditions",
+                                     "are placed in files *_1.fastq and *_2.fastq",
+                                     "If only one biological read is present - it is placed in *.fastq",
+                                     "Biological reads 3 and above are ignored.", NULL}},
+            
+            {"C", "dumpcs", "[cskey]", {"Formats sequence using color space (default for SOLiD),"   /* H_dumpcs = 7 */
+                                        "\"cskey\" may be specified for translation", NULL}},
+            {"B", "dumpbase", NULL, {"Formats sequence using base space (default for other than SOLiD).", NULL}}, /* H_dumpbase = 8 */
+
+            /* DO NOT ADD IN THE MIDDLE ORDER IS IMPORTANT IN USAGE FUNCTION ABOVE!!! */
+            {"Q", "offset", "integer", {"Offset to use for quality conversion, default is 33", NULL}},  /* H_offset = 9 */
+            {NULL, "fasta", "[line width]", {"FASTA only, no qualities, optional line wrap width (set to zero for no wrapping)", NULL}}, /* H_fasta = 10 */
+
+            {"F", "origfmt", NULL, {"Defline contains only original sequence name", NULL}}, /* H_origfmt = 11 */
+            {"I", "readids", NULL, {"Append read id after spot id as 'accession.spot.readid' on defline", NULL}}, /* H_readids = 12 */
+            {NULL, "helicos", NULL, {"Helicos style defline", NULL}}, /* H_helicos = 13 */
+            {NULL, "defline-seq", "fmt", {"Defline format specification for sequence.", NULL}}, /* H_defline_seq = 14 */
+            {NULL, "defline-qual", "fmt", {"Defline format specification for quality.", /* H_defline_qual = 15 */
+                              "<fmt> is a string of characters and/or variables. The variables can be one of:",
+                              "$ac - accession, $si - spot id, $sn - spot name, $sg - spot group (barcode),",
+                              "$sl - spot length in bases, $ri - read number, $rn - read name, $rl - read length in bases.",
+                              "'[]' could be used for an optional output: if all vars in [] yield empty values whole group is not printed.",
+                              "Empty value is empty string or 0 for numeric variables.",
+                              "Ex: @$sn[_$rn]/$ri - '_$rn' is omitted if name is empty\n", NULL}},
+
+            {NULL, "aligned", NULL, {"Dump only aligned sequences", NULL}}, /* H_aligned = 16 */
+            {NULL, "unaligned", NULL, {"Dump only unaligned sequences", NULL}}, /* H_unaligned = 17 */
+
+            /* DO NOT ADD IN THE MIDDLE ORDER IS IMPORTANT IN USAGE FUNCTION ABOVE!!! */
+            {NULL, "aligned-region", "name[:from-to]", {"Filter by position on genome.", /* H_aligned_region = 18 */
+                            "Name can either be accession.version (ex: NC_000001.10) or",
+                            "file specific name (ex: \"chr1\" or \"1\").",
+                            "\"from\" and \"to\" are 1-based coordinates", NULL}},
+            {NULL, "matepair-distance", "from-to|unknown", {"Filter by distance beiween matepairs.", /* H_matepair-distance = 19 */
+                            "Use \"unknown\" to find matepairs split between the references.",
+                            "Use from-to to limit matepair distance on the same reference", NULL}},
+
+            {NULL, "qual-filter-1", NULL, {"Filter used in current 1000 Genomes data", NULL}}, /* H_qual_filter_1 = 20 */
+
+            {NULL, "suppress-qual-for-cskey", NULL, {"supress quality-value for cskey", NULL}}, /* H_SuppressQualForCSKey = 21 */
+
+            {NULL, NULL, NULL, {NULL}}
+        };
+
+    if ( fmt == NULL )
+    {
+        return RC( rcExe, rcFileFormat, rcConstructing, rcParam, rcNull );
+    }
+
+    memset( &FastqArgs, 0, sizeof( FastqArgs ) );
+    FastqArgs.is_platform_cs_native = false;
+    FastqArgs.maxReads = 0;
+    FastqArgs.skipTechnical = false;
+    FastqArgs.minReadLen = 1;
+    FastqArgs.applyClip = false;
+    FastqArgs.SuppressQualForCSKey = false;     /* added Jan 15th 2014 ( a new fastq-variation! ) */
+    FastqArgs.dumpOrigFmt = false;
+    FastqArgs.dumpBase = false;
+    FastqArgs.dumpCs = false;
+    FastqArgs.readIds = false;
+    FastqArgs.offset = 33;
+    FastqArgs.desiredCsKey = "";
+    FastqArgs.qual_filter = false;
+    FastqArgs.b_deffmt = NULL;
+    FastqArgs.b_defline = NULL;
+    FastqArgs.q_deffmt = NULL;
+    FastqArgs.q_defline = NULL;
+    FastqArgs.split_files = false;
+    FastqArgs.split_3 = false;
+    FastqArgs.split_spot = false;
+    FastqArgs.fasta = 0;
+    FastqArgs.file_extension = ".fastq";
+    FastqArgs.aligned = false;
+    FastqArgs.unaligned = false;
+    FastqArgs.alregion = NULL;
+    FastqArgs.alregion_qty = 0;
+    FastqArgs.mp_dist = NULL;
+    FastqArgs.mp_dist_unknown = false;
+    FastqArgs.mp_dist_qty = 0;
+
+    fmt->usage = FastqDumper_Usage;
+    fmt->release = FastqDumper_Release;
+    fmt->arg_desc = arg;
+    fmt->add_arg = FastqDumper_AddArg;
+    fmt->get_factory = FastqDumper_Factories;
+    fmt->gzip = true;
+    fmt->bzip2 = true;
+    fmt->split_files = false;
+
+    return 0;
+}
diff --git a/tools/sra-dump/illumina.c b/tools/sra-dump/illumina.c
new file mode 100644
index 0000000..56bfef2
--- /dev/null
+++ b/tools/sra-dump/illumina.c
@@ -0,0 +1,536 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <kapp/main.h>
+
+#include <sra/sradb.h>
+#include <sra/illumina.h>
+#include <sysalloc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "debug.h"
+#include "core.h"
+
+#define DATABUFFERINITSIZE 10240
+
+typedef enum {
+    eRead = 0x01,
+    eQual1_S = 0x02,
+    eQual1_M = 0x04,
+    eQual4 = 0x08,
+    eIntensity = 0x10,
+    eNoise = 0x20,
+    eSignal = 0x40,
+    eQSeq_S = 0x80,
+    eQSeq_M = 0x100
+} EIlluminaOptions;
+
+struct IlluminaArgs_struct {
+    EIlluminaOptions opt;
+} IlluminaArgs;
+
+
+/* ============== Illumina tile/lane splitter based on uint32_t pointer ============================ */
+typedef enum {
+    eIlluminaLaneSplitter = 1,
+    eIlluminaTileSplitter = 2
+} TIlluminaLaneSplitterType;
+
+typedef struct IlluminaU32Splitter_struct {
+    TIlluminaLaneSplitterType type;
+    const IlluminaReader* reader;
+    char key[128];
+} IlluminaU32Splitter;
+
+static
+rc_t IlluminaU32Splitter_GetKey(const SRASplitter* cself, const char** key, spotid_t spot, readmask_t* readmask)
+{
+    rc_t rc = 0;
+    IlluminaU32Splitter* self = (IlluminaU32Splitter*)cself;
+
+    if( self == NULL || key == NULL ) {
+        rc = RC(rcSRA, rcNode, rcExecuting, rcParam, rcInvalid);
+    } else {
+        *key = self->key;
+        self->key[0] = '\0';
+        if( (rc = IlluminaReaderSeekSpot(self->reader, spot)) == 0 ) {
+            int w;
+            INSDC_coord_val val;
+            switch( self->type ) {
+                case eIlluminaLaneSplitter:
+                    w = 1;
+                    rc = IlluminaReader_SpotInfo(self->reader, NULL, NULL, &val, NULL, NULL, NULL, NULL, NULL);
+                    break;
+                case eIlluminaTileSplitter:
+                    w = 4;
+                    rc = IlluminaReader_SpotInfo(self->reader, NULL, NULL, NULL, &val, NULL, NULL, NULL, NULL);
+                    break;
+                default:
+                    rc = RC(rcSRA, rcType, rcConstructing, rcParam, rcInvalid);
+            }
+            if( rc == 0 ) {
+                sprintf(self->key, "%0*d", w, val);
+            }
+        } else if( GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound ) {
+            SRA_DUMP_DBG (3, ("%s skipped %u row\n", __func__, spot));
+            *key = NULL;
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+typedef struct IlluminaU32SplitterFactory_struct {
+    const char* accession;
+    const SRATable* table;
+    TIlluminaLaneSplitterType type;
+    const IlluminaReader* reader;
+} IlluminaU32SplitterFactory;
+
+static
+rc_t IlluminaU32SplitterFactory_Init(const SRASplitterFactory* cself)
+{
+    rc_t rc = 0;
+    IlluminaU32SplitterFactory* self = (IlluminaU32SplitterFactory*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcType, rcConstructing, rcParam, rcNull);
+    } else {
+        rc = IlluminaReaderMake(&self->reader, self->table, self->accession, true, false, false, false, false, false, false, 0, 0);
+    }
+    return rc;
+}
+
+static
+rc_t IlluminaU32SplitterFactory_NewObj(const SRASplitterFactory* cself, const SRASplitter** splitter)
+{
+    rc_t rc = 0;
+    IlluminaU32SplitterFactory* self = (IlluminaU32SplitterFactory*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcType, rcExecuting, rcParam, rcNull);
+    } else {
+        if( (rc = SRASplitter_Make(splitter, sizeof(IlluminaU32Splitter), IlluminaU32Splitter_GetKey, NULL, NULL, NULL)) == 0 ) {
+            ((IlluminaU32Splitter*)(*splitter))->reader = self->reader;
+            ((IlluminaU32Splitter*)(*splitter))->type = self->type;
+        }
+    }
+    return rc;
+}
+
+static
+void IlluminaU32SplitterFactory_Release(const SRASplitterFactory* cself)
+{
+    if( cself != NULL ) {
+        IlluminaU32SplitterFactory* self = (IlluminaU32SplitterFactory*)cself;
+        IlluminaReaderWhack(self->reader);
+    }
+}
+
+static
+rc_t IlluminaU32SplitterFactory_Make(const SRASplitterFactory** cself, const char* accession, const SRATable* table, TIlluminaLaneSplitterType type)
+{
+    rc_t rc = 0;
+    IlluminaU32SplitterFactory* obj = NULL;
+
+    if( cself == NULL || accession == NULL || table == NULL ) {
+        rc = RC(rcSRA, rcType, rcConstructing, rcParam, rcNull);
+    } else if( (rc = SRASplitterFactory_Make(cself, eSplitterSpot, sizeof(*obj),
+                                             IlluminaU32SplitterFactory_Init,
+                                             IlluminaU32SplitterFactory_NewObj,
+                                             IlluminaU32SplitterFactory_Release)) == 0 ) {
+        obj = (IlluminaU32SplitterFactory*)*cself;
+        obj->accession = accession;
+        obj->table = table;
+        switch(type) {
+            case eIlluminaLaneSplitter:
+            case eIlluminaTileSplitter:
+                obj->type = type;
+                break;
+            default:
+                rc = RC(rcSRA, rcType, rcConstructing, rcParam, rcInvalid);
+        }
+    }
+    return rc;
+}
+
+/* ============== Illumina formatter object  ============================ */
+
+typedef struct IlluminaFormatterSplitter_struct {
+    const IlluminaReader* reader;
+    KDataBuffer* b;
+} IlluminaFormatterSplitter;
+
+static
+rc_t IlluminaFormatterSplitter_Dump(const SRASplitter* cself, spotid_t spot, const readmask_t* readmask)
+{
+    rc_t rc = 0;
+    IlluminaFormatterSplitter* self = (IlluminaFormatterSplitter*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcType, rcExecuting, rcParam, rcNull);
+    } else {
+        if( (rc = IlluminaReaderSeekSpot(self->reader, spot)) == 0 ) {
+            size_t writ = 0;
+
+            if( rc == 0 && (IlluminaArgs.opt & eRead) &&
+                (rc = SRASplitter_FileActivate(cself, "seq.txt")) == 0 ) {
+                    IF_BUF((IlluminaReaderBase(self->reader, self->b->base, KDataBufferBytes(self->b) - 1, &writ)), self->b, writ) {
+                    if( writ > 0 ) {
+                        ((char*)(self->b->base))[writ] = '\n';
+                        rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ + 1);
+                    }
+                }
+            }
+            if( rc == 0 && (IlluminaArgs.opt & eQual1_S) &&
+                (rc = SRASplitter_FileActivate(cself, "qcal.txt")) == 0 ) {
+                IF_BUF((IlluminaReaderQuality1(self->reader, 0, self->b->base, KDataBufferBytes(self->b) - 1, &writ)), self->b, writ) {
+                    if( writ > 0 ) {
+                        ((char*)(self->b->base))[writ] = '\n';
+                        rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ + 1);
+                    }
+                }
+            }
+            if( rc == 0 && (IlluminaArgs.opt & eQual1_M) ) {
+                uint32_t num_reads = 0;
+                if( (rc = IlluminaReader_SpotInfo(self->reader, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &num_reads)) == 0 ) {
+                    int readId;
+                    char key[128];
+                    for(readId = 1; rc == 0 && readId <= num_reads; readId++) {
+                        sprintf(key, "%u_qcal.txt", readId);
+                        if( (rc = SRASplitter_FileActivate(cself, key)) == 0 ) {
+                            IF_BUF((IlluminaReaderQuality1(self->reader, readId, self->b->base, KDataBufferBytes(self->b) - 1, &writ)), self->b, writ) {
+                                if( writ > 0 ) {
+                                    ((char*)(self->b->base))[writ] = '\n';
+                                    rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ + 1);
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            if( rc == 0 && (IlluminaArgs.opt & eQual4) && (rc = SRASplitter_FileActivate(cself, "prb.txt")) == 0 ) {
+                IF_BUF((IlluminaReaderQuality4(self->reader, self->b->base, KDataBufferBytes(self->b) - 1, &writ)), self->b, writ) {
+                    if( writ > 0 ) {
+                        ((char*)(self->b->base))[writ] = '\n';
+                        rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ + 1);
+                    }
+                }
+            }
+            if( rc == 0 && (IlluminaArgs.opt & eIntensity) && (rc = SRASplitter_FileActivate(cself, "int.txt")) == 0 ) {
+                IF_BUF((IlluminaReaderIntensity(self->reader, self->b->base, KDataBufferBytes(self->b) - 1, &writ)), self->b, writ) {
+                    if( writ > 0 ) {
+                        ((char*)(self->b->base))[writ] = '\n';
+                        rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ + 1);
+                    }
+                }
+            }
+            if( rc == 0 && (IlluminaArgs.opt & eNoise) && (rc = SRASplitter_FileActivate(cself, "nse.txt")) == 0 ) {
+                IF_BUF((IlluminaReaderNoise(self->reader, self->b->base, KDataBufferBytes(self->b) - 1, &writ)), self->b, writ) {
+                    if( writ > 0 ) {
+                        ((char*)(self->b->base))[writ] = '\n';
+                        rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ + 1);
+                    }
+                }
+            }
+            if( rc == 0 && (IlluminaArgs.opt & eSignal) && (rc = SRASplitter_FileActivate(cself, "sig2.txt")) == 0 ) {
+                IF_BUF((IlluminaReaderSignal(self->reader, self->b->base, KDataBufferBytes(self->b) - 1, &writ)), self->b, writ) {
+                    if( writ > 0 ) {
+                        ((char*)(self->b->base))[writ] = '\n';
+                        rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ + 1);
+                    }
+                }
+            }
+            if( rc == 0 && (IlluminaArgs.opt & eQSeq_S) && (rc = SRASplitter_FileActivate(cself, "qseq.txt")) == 0 ) {
+                IF_BUF((IlluminaReaderQSeq(self->reader, 0, true, self->b->base, KDataBufferBytes(self->b) - 1, &writ)), self->b, writ) {
+                    if( writ > 0 ) {
+                        ((char*)(self->b->base))[writ] = '\n';
+                        rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ + 1);
+                    }
+                }
+            }
+            if( rc == 0 && (IlluminaArgs.opt & eQSeq_M) ) {
+                uint32_t num_reads = 0;
+                if( (rc = IlluminaReader_SpotInfo(self->reader, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &num_reads)) == 0 ) {
+                    uint32_t readId;
+                    char key[128];
+                    for(readId = 1; rc == 0 && readId <= num_reads; readId++) {
+                        sprintf(key, "%u_qseq.txt", readId);
+                        if( (rc = SRASplitter_FileActivate(cself, key)) == 0 ) {
+                            IF_BUF((IlluminaReaderQSeq(self->reader, readId, true, self->b->base, KDataBufferBytes(self->b) - 1, &writ)), self->b, writ) {
+                                if( writ > 0 ) {
+                                    ((char*)(self->b->base))[writ] = '\n';
+                                    rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ + 1);
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        } else if( GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound ) {
+            SRA_DUMP_DBG (3, ("%s skipped %u row\n", __func__, spot));
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+typedef struct IlluminaFormatterFactory_struct {
+    const char* accession;
+    const SRATable* table;
+    const IlluminaReader* reader;
+    KDataBuffer buf;
+} IlluminaFormatterFactory;
+
+
+/* refactored June 13 2014 by Wolfgang to fix a mysterious bug on windows where b_qseq resolved into false on windows
+   and true on posix! The original code was this:
+
+    if( self == NULL ) {
+          rc = RC(rcSRA, rcType, rcConstructing, rcParam, rcNull);
+      } else if( (rc = IlluminaReaderMake(&self->reader, self->table, self->accession,
+                                  IlluminaArgs.opt & eRead, IlluminaArgs.opt & (eQual1_S | eQual1_M), IlluminaArgs.opt & eQual4, 
+                                  IlluminaArgs.opt & eIntensity, IlluminaArgs.opt & eNoise, IlluminaArgs.opt & eSignal,
+                                  IlluminaArgs.opt & (eQSeq_S | eQSeq_M), 0, 0)) == 0 ) {
+          rc = KDataBufferMakeBytes(&self->buf, DATABUFFERINITSIZE);
+        }
+
+    Anton's old, more dense version should do the same, but it does not on Windows!
+
+    eQSeq_M is an enum, defined at the top of this file to have the value 0x100.
+    It will be type-casted into bool because that is the type IlluminaReaderMake() wants.
+    ( bool )eQSeq_M is true for GCC/LLVM and false for the MS-compiler!
+    Casting enum's directly without comparison into boolean does not work for the MS-compiler.
+*/
+static rc_t IlluminaFormatterFactory_Init( const SRASplitterFactory * cself )
+{
+    rc_t rc = 0;
+    IlluminaFormatterFactory * self = ( IlluminaFormatterFactory * )cself;
+
+    if ( self == NULL )
+        rc = RC( rcSRA, rcType, rcConstructing, rcParam, rcNull );
+    else
+    {
+        bool b_read = ( ( IlluminaArgs.opt & eRead ) != 0 );
+        bool b_qual1 = ( ( IlluminaArgs.opt & ( eQual1_S | eQual1_M ) ) != 0 );
+        bool b_qual4 = ( ( IlluminaArgs.opt & eQual4 ) != 0 );
+        bool b_intensity = ( ( IlluminaArgs.opt & eIntensity ) != 0 );
+        bool b_noise = ( ( IlluminaArgs.opt & eNoise ) != 0 );
+        bool b_signal = ( ( IlluminaArgs.opt & eSignal ) != 0 );
+        bool b_qseq = ( ( IlluminaArgs.opt & ( eQSeq_S | eQSeq_M ) ) != 0 );
+        rc = IlluminaReaderMake( &self->reader,
+                                self->table,
+                                self->accession,
+                                b_read,
+                                b_qual1,
+                                b_qual4,
+                                b_intensity,
+                                b_noise,
+                                b_signal,
+                                b_qseq,
+                                0,
+                                0 );
+        if ( rc == 0 )
+            rc = KDataBufferMakeBytes( &self->buf, DATABUFFERINITSIZE );
+    }
+    return rc;
+}
+
+
+static
+rc_t IlluminaFormatterFactory_NewObj(const SRASplitterFactory* cself, const SRASplitter** splitter)
+{
+    rc_t rc = 0;
+    IlluminaFormatterFactory* self = (IlluminaFormatterFactory*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcType, rcExecuting, rcParam, rcNull);
+    } else {
+        if( (rc = SRASplitter_Make(splitter, sizeof(IlluminaFormatterSplitter), NULL, NULL, IlluminaFormatterSplitter_Dump, NULL)) == 0 ) {
+            ((IlluminaFormatterSplitter*)(*splitter))->reader = self->reader;
+            ((IlluminaFormatterSplitter*)(*splitter))->b = &self->buf;
+        }
+    }
+    return rc;
+}
+
+static
+void IlluminaFormatterFactory_Release(const SRASplitterFactory* cself)
+{
+    if( cself != NULL ) {
+        IlluminaFormatterFactory* self = (IlluminaFormatterFactory*)cself;
+        IlluminaReaderWhack(self->reader);
+        KDataBufferWhack(&self->buf);
+    }
+}
+
+static
+rc_t IlluminaFormatterFactory_Make(const SRASplitterFactory** cself, const char* accession, const SRATable* table)
+{
+    rc_t rc = 0;
+    IlluminaFormatterFactory* obj = NULL;
+
+    if( cself == NULL || accession == NULL || table == NULL ) {
+        rc = RC(rcSRA, rcType, rcConstructing, rcParam, rcNull);
+    } else if( (rc = SRASplitterFactory_Make(cself, eSplitterFormat, sizeof(*obj),
+                                             IlluminaFormatterFactory_Init,
+                                             IlluminaFormatterFactory_NewObj,
+                                             IlluminaFormatterFactory_Release)) == 0 ) {
+        obj = (IlluminaFormatterFactory*)*cself;
+        obj->accession = accession;
+        obj->table = table;
+    }
+    return rc;
+}
+
+/* ### External entry points ##################################################### */
+const char UsageDefaultName[] = "illumina-dump";
+rc_t CC UsageSummary (const char * progname)
+{
+    return 0;
+}
+
+rc_t IlluminaDumper_Release(const SRADumperFmt* fmt)
+{
+    if( fmt == NULL ) {
+        return RC(rcExe, rcFormatter, rcDestroying, rcParam, rcInvalid);
+    }
+    return 0;
+}
+
+bool IlluminaDumper_AddArg(const SRADumperFmt* fmt, GetArg* f, int* i, int argc, char *argv[])
+{
+    const char* arg = NULL;
+    const char* qseq = "2";
+
+    if( fmt == NULL || f == NULL || i == NULL || argv == NULL ) {
+        LOGERR(klogErr, RC(rcExe, rcArgv, rcReading, rcParam, rcInvalid), "null param");
+        return false;
+    } else if( f(fmt, "r", "read", i, argc, argv, NULL) ) {
+        IlluminaArgs.opt |= eRead;
+    } else if( f(fmt, "x", "qseq", i, argc, argv, &qseq) ) {
+        uint32_t q = AsciiToU32(qseq, NULL, NULL);
+        if( q == 1 ) {
+            IlluminaArgs.opt |= eQSeq_S;
+            IlluminaArgs.opt &= ~eQSeq_M;
+        } else if( q == 2 ) {
+            IlluminaArgs.opt |= eQSeq_M;
+            IlluminaArgs.opt &= ~eQSeq_S;
+        } else {
+            return false;
+        }
+    } else if( f(fmt, "q", "qual1", i, argc, argv, &arg) ) {
+        uint32_t q = AsciiToU32(arg, NULL, NULL);
+        if( q == 1 ) {
+            IlluminaArgs.opt |= eQual1_S;
+            IlluminaArgs.opt &= ~eQual1_M;
+        } else if( q == 2 ) {
+            IlluminaArgs.opt |= eQual1_M;
+            IlluminaArgs.opt &= ~eQual1_S;
+        } else {
+            return false;
+        }
+    } else if( f(fmt, "p", "qual4", i, argc, argv, NULL) ) {
+        IlluminaArgs.opt |= eQual4;
+    } else if( f(fmt, "i", "intensity", i, argc, argv, NULL) ) {
+        IlluminaArgs.opt |= eIntensity;
+    } else if( f(fmt, "n", "noise", i, argc, argv, NULL) ) {
+        IlluminaArgs.opt |= eNoise;
+    } else if( f(fmt, "s", "signal", i, argc, argv, NULL) ) {
+        IlluminaArgs.opt |= eSignal;
+    } else {
+        return false;
+    }
+    return true;
+}
+
+rc_t IlluminaDumper_Factories(const SRADumperFmt* fmt, const SRASplitterFactory** factory)
+{
+    rc_t rc = 0;
+    const SRASplitterFactory* f_lane = NULL, *f_tile = NULL, *f_fmt = NULL;
+
+    if( fmt == NULL || factory == NULL ) {
+        return RC(rcExe, rcFormatter, rcReading, rcParam, rcInvalid);
+    }
+    *factory = NULL;
+
+    if( IlluminaArgs.opt == 0 ) {
+        IlluminaArgs.opt = eRead | eQual1_S;
+    }
+
+    if( (rc = IlluminaU32SplitterFactory_Make(&f_lane, fmt->accession, fmt->table, eIlluminaLaneSplitter)) == 0 ) {
+        if( (rc = IlluminaU32SplitterFactory_Make(&f_tile, fmt->accession, fmt->table, eIlluminaTileSplitter)) == 0 ) {
+            if( (rc = IlluminaFormatterFactory_Make(&f_fmt, fmt->accession, fmt->table)) == 0 ) {
+                if( (rc = SRASplitterFactory_AddNext(f_tile, f_fmt)) == 0 ) {
+                    f_fmt = NULL;
+                    if( (rc = SRASplitterFactory_AddNext(f_lane, f_tile)) == 0 ) {
+                        f_tile = NULL;
+                        *factory = f_lane;
+                    }
+                }
+            }
+        }
+    }
+    if( rc != 0 ) {
+        SRASplitterFactory_Release(f_lane);
+        SRASplitterFactory_Release(f_tile);
+        SRASplitterFactory_Release(f_fmt);
+    }
+    return rc;
+}
+
+/* main entry point of the file */
+rc_t SRADumper_Init(SRADumperFmt* fmt)
+{
+    static const SRADumperFmt_Arg arg[] =
+        {
+            {"r", "read", NULL, {"Output READ: \"seq\", default is on", NULL}},
+            {"q", "qual1", "1|2", {"Output QUALITY, whole spot (1) or split by reads (2): \"qcal\", default is 1", NULL}},
+            {"p", "qual4", NULL, {"Output full QUALITY: \"prb\", default is off", NULL}},
+            {"i", "intensity", NULL, {"Output INTENSITY, if present: \"int\", default is off", NULL}},
+            {"n", "noise", NULL, {"Output NOISE, if present: \"nse\", default is off", NULL}},
+            {"s", "signal", NULL, {"Output SIGNAL, if present: \"sig2\", default is off", NULL}},
+            {"x", "qseq", "1|2", {"Output QSEQ format: whole spot (1) or split by reads: \"qseq\", default is off", NULL}},
+            {NULL, NULL, NULL, {NULL}}
+        };
+
+    IlluminaArgs.opt = 0;
+
+    if( fmt == NULL ) {
+        return RC(rcExe, rcFileFormat, rcConstructing, rcParam, rcNull);
+    }
+    fmt->release = IlluminaDumper_Release;
+    fmt->arg_desc = arg;
+    fmt->add_arg = IlluminaDumper_AddArg;
+    fmt->get_factory = IlluminaDumper_Factories;
+    fmt->gzip = true;
+    fmt->bzip2 = true;
+
+    return 0;
+}
diff --git a/tools/sra-dump/sff.c b/tools/sra-dump/sff.c
new file mode 100644
index 0000000..930f43f
--- /dev/null
+++ b/tools/sra-dump/sff.c
@@ -0,0 +1,200 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/log.h>
+
+#include <kapp/main.h>
+#include <sra/sradb.h>
+#include <sra/sff.h>
+#include <sysalloc.h>
+
+#include <stdlib.h>
+
+#include "debug.h"
+#include "core.h"
+
+#define DATABUFFERINITSIZE 10240
+
+typedef struct SFFFormatterSplitter_struct {
+    const SFFReader* reader;
+    spotid_t spots;
+    KDataBuffer* b;
+} SFFFormatterSplitter;
+
+static const char* SFFFormatterSplitter_Dump_Ext = ".sff";
+
+static
+rc_t SFFFormatterSplitter_Dump(const SRASplitter* cself, spotid_t spot, const readmask_t* readmask)
+{
+    rc_t rc = 0;
+    SFFFormatterSplitter* self = (SFFFormatterSplitter*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcNode, rcExecuting, rcParam, rcNull);
+    } else {
+        size_t writ = 0;
+
+        if( (rc = SRASplitter_FileActivate(cself, SFFFormatterSplitter_Dump_Ext)) == 0 ) {
+            if( self->spots == 0 ) {
+                IF_BUF((SFFReaderHeader(self->reader, 0, self->b->base, KDataBufferBytes(self->b), &writ)), self->b, writ) {
+                    rc = SRASplitter_FileWrite(cself, 0, self->b->base, writ);
+                }
+            }
+            if( rc == 0 ) {
+                if( (rc = SFFReaderSeekSpot(self->reader, spot)) == 0 ) {
+                    IF_BUF((SFFReader_GetCurrentSpotData(self->reader, self->b->base, KDataBufferBytes(self->b), &writ)), self->b, writ) {
+                        rc = SRASplitter_FileWrite(cself, spot, self->b->base, writ);
+                        self->spots++;
+                    }
+                } else if( GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound ) {
+                    SRA_DUMP_DBG (3, ("%s skipped %u row\n", __func__, spot));
+                    self->spots++;
+                    rc = 0;
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+static
+rc_t SFFFormatterSplitter_Release(const SRASplitter* cself)
+{
+    rc_t rc = 0;
+    SFFFormatterSplitter* self = (SFFFormatterSplitter*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcNode, rcReleasing, rcSelf, rcNull);
+    } else if( (rc = SRASplitter_FileActivate(cself, SFFFormatterSplitter_Dump_Ext)) == 0 ) {
+        if( self->spots > 0 ) {
+            size_t writ = 0;
+            /* tweak SFF file header with real number of reads per file */
+            IF_BUF((SFFReaderHeader(self->reader, self->spots, self->b->base, KDataBufferBytes(self->b), &writ)), self->b, writ) {
+                rc = SRASplitter_FileWritePos(cself, 0, 0, self->b->base, writ);
+            }
+        }
+    }
+    return rc;
+}
+
+typedef struct SFFFormatterFactory_struct {
+    const char* accession;
+    const SRATable* table;
+    const SFFReader* reader;
+    KDataBuffer kdbuf;
+} SFFFormatterFactory;
+
+static
+rc_t SFFFormatterFactory_Init(const SRASplitterFactory* cself)
+{
+    rc_t rc = 0;
+    SFFFormatterFactory* self = (SFFFormatterFactory*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcType, rcConstructing, rcParam, rcNull);
+    } else if( (rc = KDataBufferMakeBytes(&self->kdbuf, DATABUFFERINITSIZE)) == 0 ) {
+        rc = SFFReaderMake(&self->reader, self->table, self->accession, 0, 0);
+    }
+    return rc;
+}
+
+static
+rc_t SFFFormatterFactory_NewObj(const SRASplitterFactory* cself, const SRASplitter** splitter)
+{
+    rc_t rc = 0;
+    SFFFormatterFactory* self = (SFFFormatterFactory*)cself;
+
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcType, rcExecuting, rcParam, rcNull);
+    } else {
+        if( (rc = SRASplitter_Make(splitter, sizeof(SFFFormatterSplitter), NULL, NULL, SFFFormatterSplitter_Dump, SFFFormatterSplitter_Release)) == 0 ) {
+            ((SFFFormatterSplitter*)(*splitter))->reader = self->reader;
+            ((SFFFormatterSplitter*)(*splitter))->b = &self->kdbuf;
+        }
+    }
+    return rc;
+}
+
+static
+void SFFFormatterFactory_Release(const SRASplitterFactory* cself)
+{
+    if( cself != NULL ) {
+        SFFFormatterFactory* self = (SFFFormatterFactory*)cself;
+        KDataBufferWhack(&self->kdbuf);
+        SFFReaderWhack(self->reader);
+    }
+}
+
+static
+rc_t SFFFormatterFactory_Make(const SRASplitterFactory** cself, const char* accession, const SRATable* table)
+{
+    rc_t rc = 0;
+    SFFFormatterFactory* obj = NULL;
+
+    if( cself == NULL || accession == NULL || table == NULL ) {
+        rc = RC(rcSRA, rcType, rcConstructing, rcParam, rcNull);
+    } else if( (rc = SRASplitterFactory_Make(cself, eSplitterFormat, sizeof(*obj),
+                                             SFFFormatterFactory_Init,
+                                             SFFFormatterFactory_NewObj,
+                                             SFFFormatterFactory_Release)) == 0 ) {
+        obj = (SFFFormatterFactory*)*cself;
+        obj->accession = accession;
+        obj->table = table;
+    }
+    return rc;
+}
+
+/* ### External entry points ##################################################### */
+const char UsageDefaultName[] = "sff-dump";
+rc_t CC UsageSummary (const char * progname)
+{
+    return 0;
+}
+
+rc_t SFFDumper_Factories(const SRADumperFmt* fmt, const SRASplitterFactory** factory)
+{
+    if( fmt == NULL || factory == NULL ) {
+        return RC(rcExe, rcFormatter, rcReading, rcParam, rcInvalid);
+    }
+    *factory = NULL;
+    return SFFFormatterFactory_Make(factory, fmt->accession, fmt->table);
+}
+
+/* main entry point of the file */
+rc_t SRADumper_Init(SRADumperFmt* fmt)
+{
+    if( fmt == NULL ) {
+        return RC(rcExe, rcFileFormat, rcConstructing, rcParam, rcNull);
+    }
+    fmt->release = NULL;
+    fmt->arg_desc = NULL;
+    fmt->add_arg = NULL;
+    fmt->get_factory = SFFDumper_Factories;
+    fmt->gzip = false;
+    fmt->bzip2 = false;
+
+    return 0;
+}
diff --git a/tools/sra-dump/sra-dump.c b/tools/sra-dump/sra-dump.c
new file mode 100644
index 0000000..573ac8c
--- /dev/null
+++ b/tools/sra-dump/sra-dump.c
@@ -0,0 +1,1011 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <sra/sradb.h>
+#include <sra/srapath.h>
+#include <sra/types.h>
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/table.h>
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <klib/container.h>
+#include <klib/rc.h>
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+
+typedef struct sradump_parms sradump_parms;
+struct sradump_parms
+{
+    const char *src_path;
+
+    const char **columns;
+    uint32_t column_cnt;
+
+    spotid_t start, stop;
+};
+
+typedef struct column_map column_map;
+struct column_map
+{
+    const char *name;
+    void ( * dump ) ( const void *base, bitsz_t row_bits );
+    const SRAColumn *col;
+    VTypedecl td;
+    uint32_t elem_size;
+};
+
+/* dump_row
+ */
+static
+void dump_text ( const void *base, bitsz_t row_bits )
+{
+    const unsigned char *data = base;
+    uint32_t i, count = row_bits >> 3;
+
+    for ( i = 0; i < count; ++ i )
+  {
+        if ( isprint ( data [ i ] ) )
+            OUTMSG(( "%c", data [ i ] ));
+        else
+            OUTMSG(( "\\x%2x", data [ i ] ));
+    }
+}
+
+static
+void dump_I8 ( const void *base, bitsz_t row_bits )
+{
+    const int8_t *data = base;
+    const char *sep = "";
+    uint32_t i, count = row_bits >> 3;
+
+    for ( i = 0; i < count; sep = ",", ++ i )
+        OUTMSG(( "%s%d", sep, data [ i ] ));
+}
+
+static
+void dump_U8 ( const void *base, bitsz_t row_bits )
+{
+    const uint8_t *data = base;
+    const char *sep = "";
+    uint32_t i, count = row_bits >> 3;
+
+    for ( i = 0; i < count; sep = ",", ++ i )
+        OUTMSG(( "%s%u", sep, data [ i ] ));
+}
+
+static
+void dump_I16 ( const void *base, bitsz_t row_bits )
+{
+    const int16_t *data = base;
+    const char *sep = "";
+    uint32_t i, count = row_bits >> 4;
+
+    for ( i = 0; i < count; sep = ",", ++ i )
+        OUTMSG(( "%s%d", sep, data [ i ] ));
+}
+
+static
+void dump_U16 ( const void *base, bitsz_t row_bits )
+{
+    const uint16_t *data = base;
+    const char *sep = "";
+    uint32_t i, count = row_bits >> 4;
+
+    for ( i = 0; i < count; sep = ",", ++ i )
+        OUTMSG(( "%s%u", sep, data [ i ] ));
+}
+
+static
+void dump_I32 ( const void *base, bitsz_t row_bits )
+{
+    const int32_t *data = base;
+    const char *sep = "";
+    uint32_t i, count = row_bits >> 5;
+
+    for ( i = 0; i < count; sep = ",", ++ i )
+        OUTMSG(( "%s%d", sep, data [ i ] ));
+}
+
+static
+void dump_U32 ( const void *base, bitsz_t row_bits )
+{
+    const uint32_t *data = base;
+    const char *sep = "";
+    uint32_t i, count = row_bits >> 5;
+
+    for ( i = 0; i < count; sep = ",", ++ i )
+        OUTMSG(( "%s%u", sep, data [ i ] ));
+}
+
+static
+void dump_I64 ( const void *base, bitsz_t row_bits )
+{
+    const int64_t *data = base;
+    const char *sep = "";
+    uint32_t i, count = row_bits >> 6;
+
+    for ( i = 0; i < count; sep = ",", ++ i )
+        OUTMSG(( "%s%ld", sep, data [ i ] ));
+}
+
+static
+void dump_U64 ( const void *base, bitsz_t row_bits )
+{
+    const uint64_t *data = base;
+    const char *sep = "";
+    uint32_t i, count = row_bits >> 6;
+
+    for ( i = 0; i < count; sep = ",", ++ i )
+        OUTMSG(( "%s%lu", sep, data [ i ] ));
+}
+
+static
+void dump_F32 ( const void *base, bitsz_t row_bits )
+{
+    const float *data = base;
+    const char *sep = "";
+    uint32_t i, count = row_bits >> 5;
+
+    for ( i = 0; i < count; sep = ",", ++ i )
+        OUTMSG(( "%s%f", sep, data [ i ] ));
+}
+
+static
+void dump_F64 ( const void *base, bitsz_t row_bits )
+{
+    const double *data = base;
+    const char *sep = "";
+    uint32_t i, count = row_bits >> 6;
+
+    for ( i = 0; i < count; sep = ",", ++ i )
+        OUTMSG(( "%s%f", sep, data [ i ] ));
+}
+
+
+#define CASE( x ) \
+    case x: p = # x; break
+
+static
+void dump_platform ( const void *base, bitsz_t row_bits )
+{
+    const char *p = NULL;
+    const uint8_t *data = base;
+    if ( row_bits == 8 ) switch ( data [ 0 ] )
+    {
+    CASE ( SRA_PLATFORM_UNDEFINED );
+    CASE ( SRA_PLATFORM_454 );
+    CASE ( SRA_PLATFORM_ILLUMINA );
+    CASE ( SRA_PLATFORM_ABSOLID );
+    CASE ( SRA_PLATFORM_COMPLETE_GENOMICS );
+    CASE ( SRA_PLATFORM_HELICOS );
+    default:
+        OUTMSG(( "%u", data [ 0 ] ));
+        return;
+    }
+    OUTMSG(( "%s", p ));
+}
+
+static
+void dump_readtype ( const void *base, bitsz_t row_bits )
+{
+    const char *sep = "";
+    const uint8_t *data = base;
+    uint32_t i, count = row_bits >> 3;
+    for ( i = 0; i < count; sep = ",", ++ i )
+    {
+        const char *p;
+        switch ( data [ i ] )
+        {
+        CASE ( SRA_READ_TYPE_TECHNICAL );
+        CASE ( SRA_READ_TYPE_BIOLOGICAL );
+        CASE ( SRA_READ_TYPE_TECHNICAL|SRA_READ_TYPE_FORWARD );
+        CASE ( SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_FORWARD );
+        CASE ( SRA_READ_TYPE_TECHNICAL|SRA_READ_TYPE_REVERSE );
+        CASE ( SRA_READ_TYPE_BIOLOGICAL|SRA_READ_TYPE_REVERSE );
+        default:
+            OUTMSG(( "%s%u", sep, data [ 0 ] ));
+            continue;
+        }
+        OUTMSG(( "%s%s", sep, p ));
+    }
+}
+
+static
+void dump_readfilt ( const void *base, bitsz_t row_bits )
+{
+    const char *sep = "";
+    const uint8_t *data = base;
+    uint32_t i, count = row_bits >> 3;
+    for ( i = 0; i < count; sep = ",", ++ i )
+    {
+        const char *p;
+        switch ( data [ i ] )
+        {
+        CASE ( SRA_READ_FILTER_PASS );
+        CASE ( SRA_READ_FILTER_REJECT );
+        CASE ( SRA_READ_FILTER_CRITERIA );
+        CASE ( SRA_READ_FILTER_REDACTED );
+        default:
+            OUTMSG(( "%s%u", sep, data [ 0 ] ));
+            continue;
+        }
+        OUTMSG(( "%s%s", sep, p ));
+    }
+}
+
+#undef CASE
+
+
+static
+rc_t dump_row ( const sradump_parms *pb, const column_map *cm, uint32_t count, spotid_t row )
+{
+    rc_t rc;
+    uint32_t i;
+
+    for ( rc = 0, i = 0; rc == 0 && i < count; ++ i )
+    {
+        const void *base;
+        bitsz_t boff, row_bits;
+
+        /* read data */
+        rc = SRAColumnRead ( cm [ i ] . col, row, & base, & boff, & row_bits );
+        if ( rc != 0 )
+        {
+            PLOGERR ( klogInt,  (klogInt, rc, "failed to read column '$(name)' row $(row)",
+                                 "name=%s,row=%u", cm [ i ] . name, row ));
+            break;
+        }
+
+        /* cannot deal with non-byte-aligned data */
+        if ( boff != 0 || ( row_bits & 7 ) != 0 )
+        {
+            rc = RC ( rcExe, rcColumn, rcReading, rcType, rcUnsupported );
+            PLOGERR ( klogInt,  (klogInt, rc, "non-byte-aligned data in column '$(name)' row $(row)",
+                                 "name=%s,row=%u", cm [ i ] . name, row ));
+            break;
+        }
+
+        /* write cell header - TBD - improve column alignment for readability */
+        OUTMSG(( "%u. %s: ", row, cm [ i ] . name ));
+
+        /* write cell data */
+        if ( cm [ i ] . td . dim == 1 )
+            ( cm [ i ] . dump ) ( base, row_bits );
+        else
+        {
+            const char *sep;
+            const uint8_t *data = base;
+            uint32_t elem_bits = cm [ i ] . elem_size;
+            uint32_t j, row_len = ( uint32_t ) ( row_bits / elem_bits );
+
+            for ( sep = "{", j = 0; j < row_len; sep = "},{", ++ j )
+            {
+                OUTMSG(( "%s", sep ));
+                ( cm [ i ] . dump ) ( & data [ j * elem_bits >> 3 ], elem_bits );
+            }
+
+            OUTMSG(( "}" ));
+        }
+
+        OUTMSG(( "\n" ));
+    }
+
+    return rc;
+}
+
+static
+rc_t dump_table ( const sradump_parms *pb, const column_map *cm, uint32_t count )
+{
+    rc_t rc;
+    spotid_t row;
+
+    for ( rc = 0, row = pb -> start; row <= pb -> stop; ++ row )
+    {
+        rc = Quitting();
+        if ( rc != 0 )
+            break;
+        rc = dump_row ( pb, cm, count, row );
+        if ( rc != 0 )
+            break;
+    }
+
+    return rc;
+}
+
+static
+const char *s_454_default [] =
+{
+    "(INSDC:SRA:platform_id)PLATFORM",
+    "(U8)NREADS",
+    "(INSDC:SRA:xread_type)READ_TYPE",
+    "(NCBI:SRA:Segment)READ_SEG",
+    "(NCBI:SRA:Segment)LABEL_SEG",
+    "(ascii)LABEL",
+    "(INSDC:SRA:read_filter)READ_FILTER",
+    "(ascii)SPOT_GROUP",
+
+    "(INSDC:dna:text)FLOW_CHARS",
+    "(INSDC:dna:text)KEY_SEQUENCE",
+    "(INSDC:dna:text)LINKER_SEQUENCE",
+    "(INSDC:dna:text)READ",
+    "(INSDC:quality:phred)QUALITY",
+    "(INSDC:coord:one)CLIP_ADAPTER_LEFT",
+    "(INSDC:coord:one)CLIP_ADAPTER_RIGHT",
+    "(INSDC:coord:one)CLIP_QUALITY_LEFT",
+    "(INSDC:coord:one)CLIP_QUALITY_RIGHT",
+    "(NCBI:isamp1)SIGNAL",
+    "(INSDC:position:one)POSITION"
+};
+
+static
+const char *s_Illumina_default [] =
+{
+    "(INSDC:SRA:platform_id)PLATFORM"
+    , "(U8)NREADS"
+    , "(INSDC:SRA:xread_type)READ_TYPE"
+    , "(NCBI:SRA:Segment)READ_SEG"
+    , "(NCBI:SRA:Segment)LABEL_SEG"
+    , "(ascii)LABEL"
+    , "(INSDC:SRA:read_filter)READ_FILTER"
+    , "(ascii)SPOT_GROUP"
+
+    , "(INSDC:dna:text)READ"
+    , "(NCBI:qual4)QUALITY:QUALITY"
+    , "(INSDC:quality:phred)PHYS_QUALITY:QUALITY"
+    , "(INSDC:quality:phred)QUALITY2"
+#if ENABLE_INTENSITY_COPY
+    , "(NCBI:fsamp4)INTENSITY"
+#endif
+};
+
+static
+const char *s_ABI_default [] =
+{
+    " (INSDC:SRA:platform_id)PLATFORM"
+    , "(U8)NREADS"
+    , "(INSDC:SRA:xread_type)READ_TYPE"
+    , "(NCBI:SRA:Segment)READ_SEG"
+    , "(NCBI:SRA:Segment)LABEL_SEG"
+    , "(ascii)LABEL"
+    , "(INSDC:SRA:read_filter)READ_FILTER"
+    , "(ascii)SPOT_GROUP"
+
+    , "(INSDC:dna:text)CS_KEY"
+    , "(INSDC:color:text)CSREAD"
+    , "(INSDC:quality:phred)QUALITY"
+#if ENABLE_INTENSITY_COPY
+    , "(NCBI:fsamp4)SIGNAL"
+#endif
+};
+
+static
+const char *s_fastq_default [] =
+{
+    "(INSDC:SRA:platform_id)PLATFORM",
+    "(U8)NREADS",
+    "(INSDC:SRA:xread_type)READ_TYPE",
+    "(NCBI:SRA:Segment)READ_SEG",
+    "(NCBI:SRA:Segment)LABEL_SEG",
+    "(ascii)LABEL",
+    "(INSDC:SRA:read_filter)READ_FILTER",
+    "(ascii)SPOT_GROUP",
+
+    "(INSDC:dna:text)READ",
+    "(INSDC:quality:phred)QUALITY"
+};
+
+static
+rc_t get_default_columns ( sradump_parms *pb, const SRATable *tbl )
+{
+    const SRAColumn *col;
+    rc_t rc = SRATableOpenColumnRead ( tbl, & col, "PLATFORM", sra_platform_id_t );
+    if ( rc != 0 )
+        LOGERR ( klogInt, rc, "failed to determine table platform" );
+    else
+    {
+        const void *base;
+        bitsz_t boff, row_bits;
+        rc = SRAColumnRead ( col, 1, & base, & boff, & row_bits );
+        if ( rc != 0 )
+            LOGERR ( klogInt, rc, "failed to read table platform" );
+        else if ( boff != 0 || ( row_bits & 7 ) != 0 )
+        {
+            rc = RC ( rcExe, rcColumn, rcReading, rcData, rcCorrupt );
+            PLOGERR ( klogInt,  (klogInt, rc, "bit offset $(boff), row bits $(bits)",
+                                 "boff=%u,bits=%u", ( uint32_t ) boff, ( uint32_t ) row_bits ));
+        }
+        else
+        {
+            const uint8_t *platform_id = base;
+            switch ( platform_id [ 0 ] )
+            {
+            case SRA_PLATFORM_UNDEFINED:
+                rc = RC ( rcExe, rcTable, rcReading, rcType, rcInvalid );
+                LOGERR ( klogInt, rc, "table platform undefined" );
+                break;
+            case SRA_PLATFORM_454:
+                pb -> columns = s_454_default;
+                pb -> column_cnt = sizeof s_454_default / sizeof s_454_default [ 0 ];
+                break;
+            case SRA_PLATFORM_ILLUMINA:
+                pb -> columns = s_Illumina_default;
+                pb -> column_cnt = sizeof s_Illumina_default / sizeof s_Illumina_default [ 0 ];
+                break;
+            case SRA_PLATFORM_ABSOLID:
+                pb -> columns = s_ABI_default;
+                pb -> column_cnt = sizeof s_ABI_default / sizeof s_ABI_default [ 0 ];
+                break;
+            default:
+                pb -> columns = s_fastq_default;
+                pb -> column_cnt = sizeof s_fastq_default / sizeof s_fastq_default [ 0 ];
+            }
+        }
+
+        SRAColumnRelease ( col );
+    }
+
+    return rc;
+}
+
+
+typedef struct basetype basetype;
+struct basetype
+{
+    BSTNode n;
+    void ( * dump ) ( const void *base, bitsz_t row_bits );
+    uint32_t type_id;
+};
+
+static
+void CC basetype_whack ( BSTNode *n, void *ignore )
+{
+    free ( n );
+}
+
+static
+int64_t CC basetype_cmp ( const void *item, const BSTNode *n )
+{
+    const VTypedecl *td = item;
+    const basetype *bt = ( const basetype* ) n;
+
+    return (int64_t) td -> type_id - (int64_t) bt -> type_id;
+}
+
+static
+int64_t CC basetype_sort ( const BSTNode *item, const BSTNode *n )
+{
+    const basetype *td = ( const basetype* ) item;
+    const basetype *bt = ( const basetype* ) n;
+
+    return (int64_t) td -> type_id - (int64_t) bt -> type_id;
+}
+
+static
+rc_t build_basetypes ( BSTree *ttree, const VDatatypes *dt )
+{
+    struct
+    {
+        const char *name;
+        void ( * dump ) ( const void *base, bitsz_t row_bits );
+    }
+    types [] =
+    {
+        { "I8", dump_I8 },
+        { "U8", dump_U8 },
+        { "I16", dump_I16 },
+        { "U16", dump_U16 },
+        { "I32", dump_I32 },
+        { "U32", dump_U32 },
+        { "I64", dump_I64 },
+        { "U64", dump_U64 },
+        { "F32", dump_F32 },
+        { "F64", dump_F64 },
+        { "utf8", dump_text },
+        { "ascii", dump_text },
+
+        /* special case types */
+        { "INSDC:SRA:platform_id", dump_platform },
+        { "NCBI:SRA:platform_id", dump_platform },
+        { "INSDC:SRA:xread_type", dump_readtype },
+        { "INSDC:SRA:read_type", dump_readtype },
+        { "NCBI:SRA:read_type", dump_readtype },
+        { "INSDC:SRA:read_filter", dump_readfilt },
+        { "NCBI:SRA:read_filter", dump_readfilt }
+    };
+
+    rc_t rc;
+    uint32_t i, count = sizeof types / sizeof types [ 0 ];
+
+    BSTreeInit ( ttree );
+
+    for ( rc = 0, i = 0; i < count; ++ i )
+    {
+        VTypedef def;
+        basetype *bt = malloc ( sizeof * bt );
+        if ( bt == NULL )
+        {
+            rc = RC ( rcExe, rcType, rcAllocating, rcMemory, rcExhausted );
+            LOGERR ( klogSys, rc, "failed to populate basetypes table" );
+            break;
+        }
+        rc = VDatatypesResolveTypename ( dt, & def, types [ i ] . name );
+        if ( rc != 0 )
+        {
+            free ( bt );
+            PLOGERR ( klogInt,  (klogInt, rc, "failed to resolve typename '$(typename)'",
+                                 "typename=%s", types [ i ] . name ));
+            break;
+        }
+
+        bt -> dump = types [ i ] . dump;
+        bt -> type_id = def . type_id;
+
+        BSTreeInsert ( ttree, & bt -> n, basetype_sort );
+    }
+
+    return rc;
+}
+
+static
+rc_t open_column ( const VDatatypes *dt, const SRATable *tbl,
+    const BSTree *ttree, column_map *cm, const char *colspec )
+{
+    rc_t rc;
+    VTypedef def;
+
+    int len;
+    const char *iname;
+    char inamebuff [ 128 ];
+
+    /* convert column spec to typedecl and name */
+    char tdbuffer [ 128 ];
+    const char *typedecl = NULL;
+    const char *end = strchr ( colspec, ')' );
+    if ( end != NULL )
+    {
+        const char *begin = strchr ( colspec, '(' );
+        if ( begin != NULL && begin < end )
+        {
+            /* the colspec is now the name */
+            colspec = end;
+
+            /* trim whitespace */
+            while ( isspace ( ( ++ colspec ) [ 0 ] ) )
+                ( void ) 0;
+            while ( ++ begin < end && isspace ( begin [ 0 ] ) )
+                ( void ) 0;
+            while ( begin < end && isspace ( end [ -1 ] ) )
+                -- end;
+
+            /* create a copy to allow for a NUL byte */
+            len = snprintf ( tdbuffer, sizeof tdbuffer,
+                "%.*s", ( int ) ( end - begin ), begin );
+            if ( len < 0 || len >= sizeof tdbuffer )
+            {
+                rc = RC ( rcExe, rcColumn, rcOpening, rcString, rcExcessive );
+                return rc;
+            }
+
+            typedecl = tdbuffer;
+        }
+    }
+
+    /* convert name to iname and extname */
+    iname = colspec;
+    colspec = strchr ( colspec, ':' );
+    if ( colspec == NULL )
+        colspec = iname;
+    else
+    {
+        len = snprintf ( inamebuff, sizeof inamebuff, "%.*s",
+                         ( int ) ( colspec - iname ), iname );
+        if ( len < 0 || len >= sizeof inamebuff )
+        {
+            rc = RC ( rcExe, rcColumn, rcOpening, rcString, rcExcessive );
+            return rc;
+        }
+
+        iname = inamebuff;
+        ++ colspec;
+    }
+
+    /* record the name */
+    cm -> name = colspec;
+
+    /* open the column */
+    rc = SRATableOpenColumnRead ( tbl, & cm -> col, iname, typedecl );
+    if ( rc != 0 )
+        return rc;
+
+    /* read its datatype */
+    rc = SRAColumnDatatype ( cm -> col, & cm -> td, & def );
+    if ( rc == 0 )
+    {
+        const basetype *bt;
+
+        /* get its element size */
+        cm -> elem_size = VTypedefSizeof ( & def ) * cm -> td . dim;
+
+        /* try to find the actual type */
+        bt = ( const basetype* ) BSTreeFind ( ttree, & cm -> td, basetype_cmp );
+        if ( bt == NULL )
+        {
+            /* find the intrinsic type
+               NB - this code treats ascii as intrinsic */
+            rc = VDatatypesToIntrinsic ( ( const VDatatypes*) SRATableGetSchema(tbl), & cm -> td );
+            if ( rc == 0 )
+                bt = ( const basetype* ) BSTreeFind ( ttree, & cm -> td, basetype_cmp );
+        }
+         
+        if ( bt == NULL )
+            rc = RC ( rcExe, rcColumn, rcOpening, rcType, rcUnsupported );
+        else
+        {
+            cm -> dump = bt -> dump;
+            return 0;
+        }
+    }
+
+    SRAColumnRelease ( cm -> col );
+    cm -> col = NULL;
+    return rc;
+}
+
+static
+rc_t sra_dump ( sradump_parms *pb, const VDatatypes *dt, const SRATable *tbl )
+{
+    BSTree ttree;
+    rc_t rc = build_basetypes ( & ttree, dt );
+    if ( rc == 0 )
+    {
+        if ( pb -> column_cnt == 0 )
+            rc = get_default_columns ( pb, tbl );
+        if ( rc == 0 )
+        {
+            uint32_t count = pb -> column_cnt;
+            const char **columns = pb -> columns;
+            column_map *cm = malloc ( sizeof * cm * count );
+            if ( cm == NULL )
+                rc = RC ( rcExe, rcTable, rcReading, rcMemory, rcExhausted );
+            else
+            {
+
+                uint32_t i;
+                uint32_t count2 = count;
+                
+                for ( i = count = 0; rc == 0 && i < count2; ++ i )
+                {
+                    rc = open_column ( dt,  tbl, & ttree, & cm [ count ], columns [ i ] );
+                    if ( rc == 0 )
+                        ++ count;
+                    else switch ( GetRCState ( rc ) )
+                    {
+                    case rcNotFound:
+                    case rcUnsupported:
+                    case rcExcessive:
+                        rc = 0;
+                        break;
+                    default:
+                        break;
+                    }
+                }
+
+                if ( rc == 0 )
+                {
+                    spotid_t max_spot;
+                    rc = SRATableMaxSpotId ( tbl, & max_spot );
+                    if ( rc != 0 )
+                        LOGERR ( klogInt, rc, "failed to read max spot id" );
+                    else
+                    {
+                        if ( pb -> start == 0 )
+                            pb -> start = 1;
+                        if ( pb -> stop == 0 || pb -> stop > max_spot )
+                            pb -> stop = max_spot;
+
+                        rc = dump_table ( pb, cm, count );
+                    }
+                }
+
+                for ( i = 0; i < count; ++ i )
+                    SRAColumnRelease ( cm [ i ] . col );
+
+                free (cm);
+            }
+        }
+
+        BSTreeWhack ( & ttree, basetype_whack, NULL );
+    }
+    return rc;
+}
+
+static
+rc_t run ( sradump_parms *pb )
+{
+    const SRAMgr *mgr;
+    rc_t rc = SRAMgrMakeRead ( & mgr );
+    if ( rc != 0 )
+        LOGERR ( klogInt, rc, "failed to open SRAMgr" );
+    else
+    {
+        const VDatatypes *dt;
+        rc = SRAMgrOpenDatatypesRead ( mgr, & dt );
+        if ( rc != 0 )
+            LOGERR ( klogInt, rc, "failed to open VDatatypes" );
+        else
+        {
+            const SRATable *tbl;
+            rc = SRAMgrOpenTableRead ( mgr, & tbl, "%s", pb -> src_path );
+            if ( rc != 0 )
+                PLOGERR ( klogInt,
+                          ( klogInt, rc, "failed to open SRATable '$(spec)'", "spec=%s", pb -> src_path));
+            else
+            {
+                rc = sra_dump ( pb, dt, tbl );
+                SRATableRelease ( tbl );
+            }
+
+            VDatatypesRelease ( dt );
+        }
+
+        SRAMgrRelease ( mgr );
+    }
+
+    return rc;
+}
+
+/* Usage
+ */
+static
+KLogLevel default_log_level;
+
+
+#define OPTION_START "start"
+#define OPTION_STOP  "stop"
+#define ALIAS_START ""
+#define ALIAS_STOP  ""
+
+static const
+char * start_usage[] =
+{
+    "beginning spot id (default 1)", NULL
+};
+
+
+static const
+char * stop_usage[] =
+{
+    "ending spot id (default max)", NULL
+};
+
+
+static
+OptDef Options[] = 
+{
+    { OPTION_START, ALIAS_START, NULL, start_usage, 1, true, false},
+    { OPTION_STOP,  ALIAS_STOP,  NULL, stop_usage,  1, true, false}
+};
+    
+   
+const char UsageDefaultName[] = "sra-dump";
+
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s [ options ] table [ column-spec ... ]\n"
+                    "\n"
+                    "Summary:\n"
+                    "  Dump all data in table for specified or all columns\n"
+                    "\n", progname );
+}
+
+static
+const char * name_param[] =
+{
+    "NAME", "simple column name", NULL
+};
+
+
+static
+const char * typedecl_param[] =
+{
+    "(typedecl)NAME", "specifically typed column name", NULL
+};
+
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary (progname);
+
+    OUTMSG (( "Options:\n" ));
+
+    OUTMSG (("table:\n"
+	     "  path to table or accession id within NCBI\n"
+             "\n"
+             "column-spec:\n"));
+
+    HelpParamLine (name_param[0], name_param+1);
+    HelpParamLine (typedecl_param[0], typedecl_param+1);
+
+    OUTMSG (( "\nOptions:\n" ));
+
+    HelpOptionLine (ALIAS_START, OPTION_START, "ID", start_usage);
+
+    HelpOptionLine (ALIAS_STOP, OPTION_STOP, "ID", stop_usage);
+
+    HelpOptionsStandard ();
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+
+/* KMain - EXTERN
+ *  executable entrypoint "main" is implemented by
+ *  an OS-specific wrapper that takes care of establishing
+ *  signal handlers, logging, etc.
+ *
+ *  in turn, OS-specific "main" will invoke "KMain" as
+ *  platform independent main entrypoint.
+ *
+ *  "argc" [ IN ] - the number of textual parameters in "argv"
+ *  should never be < 0, but has been left as a signed int
+ *  for reasons of tradition.
+ *
+ *  "argv" [ IN ] - array of NUL terminated strings expected
+ *  to be in the shell-native character set: ASCII or UTF-8
+ *  element 0 is expected to be executable identity or path.
+ */
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args * args;
+    rc_t rc;
+
+    default_log_level = KLogLevelGet();
+
+    rc = KStsHandlerSetStdErr();
+    if (rc)
+        return rc;
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 1, Options, sizeof Options / sizeof (OptDef));
+    if (rc == 0)
+    {
+        do
+        {
+            uint32_t pcount;
+
+            sradump_parms pb;
+
+            memset (&pb, 0, sizeof pb);
+
+            rc = ArgsOptionCount (args, OPTION_START, &pcount);
+            if (rc)
+                break;
+
+            if (pcount == 1)
+            {
+                const char * pc;
+
+                rc = ArgsOptionValue (args, OPTION_START, 0, (const void **)&pc);
+                if (rc)
+                    break;
+
+                pb.start = AsciiToU32 (pc, NULL, NULL);
+            }
+
+            rc = ArgsOptionCount (args, OPTION_STOP, &pcount);
+            if (rc)
+                break;
+
+            if (pcount == 1)
+            {
+                const char * pc;
+
+                rc = ArgsOptionValue (args, OPTION_STOP, 0, (const void **)&pc);
+                if (rc)
+                    break;
+
+                pb.stop = AsciiToU32 (pc, NULL, NULL);
+            }
+
+            rc = ArgsParamCount (args, &pcount);
+            if (rc)
+                break;
+
+            if (pcount == 0) {
+                OUTMSG (("missing source table\n"));
+                rc = MiniUsage (args);
+                ArgsWhack(args);
+                exit(EXIT_FAILURE);
+            }
+
+            rc = ArgsParamValue (args, 0, (const void **)&pb.src_path);
+            if (rc)
+                break;
+
+            pb.column_cnt = pcount - 1; /* pcount is used below */
+
+            if (pb.column_cnt) {
+                pb.columns = malloc (pb.column_cnt * sizeof (const char *));
+                if (pb.columns == NULL)
+                    rc = RC (rcExe, rcArgv, rcParsing, rcMemory, rcExhausted);
+            }
+            else
+                pb.columns = NULL;
+
+            {
+                uint32_t ix;
+                const char ** ppc;
+
+                ppc = pb.columns;
+                for (ix = 1; ix < pcount; ix++)
+                {
+                    rc = ArgsParamValue (args, ix, (const void **)ppc);
+                    if (rc)
+                        break;
+                    ppc++;
+                }
+
+                if (rc == 0)
+                {
+                    rc = run (&pb);
+                }
+
+                if ( pcount != 1 )
+                    /* brain damaged windows compiler warned about next line */
+                    free ( (void*)pb.columns );
+            }
+        } while (0);
+ 
+        ArgsWhack (args);
+    }
+    return rc;
+}
+
+
diff --git a/tools/sra-load/Makefile b/tools/sra-load/Makefile
new file mode 100644
index 0000000..2426b09
--- /dev/null
+++ b/tools/sra-load/Makefile
@@ -0,0 +1,209 @@
+# ==============================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/sra-load
+
+INT_TOOLS =
+
+EXT_TOOLS = \
+	fastq-load \
+	illumina-load \
+	srf-load \
+	abi-load \
+	sff-load \
+	helicos-load \
+	pacbio-loadxml
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+ifeq (1,$(HAVE_XML2))
+
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+else
+
+all std: $(ALL_TOOLS)
+
+$(ALL_TOOLS):
+	@ echo "NOTE - $(@F) cannot be built:"                          \
+	       "It requires our internal library 'libkxml'"             \
+	       "which requires 'libxml2' and its development headers."
+endif
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# loader
+#
+LOADER_SRC = \
+	pstring \
+	common-xml \
+	experiment-xml \
+	run-xml \
+	loader-file \
+	loader-fmt \
+	sra-writer \
+	loader
+
+LOADER_OBJ = \
+	$(addsuffix .$(OBJX),$(LOADER_SRC))
+
+LIBXML = -lkxfs -lkxml -lxml2
+
+LOADER_LIB = \
+	-lkapp \
+	-stk-version \
+	-lload \
+	-sncbi-wvdb \
+	$(LIBXML) \
+	-lm
+
+
+#------------------------------------------------------------------------------
+# sff-load
+#
+SFF_LOAD_SRC = \
+	$(LOADER_SRC) \
+	writer-454 \
+	writer-ion-torrent \
+	sff-fmt
+
+SFF_LOAD_OBJ = \
+	$(addsuffix .$(OBJX),$(SFF_LOAD_SRC))
+
+$(BINDIR)/sff-load: $(SFF_LOAD_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(LOADER_LIB)
+
+#------------------------------------------------------------------------------
+# fastq-load
+#
+FASTQ_LOAD_SRC = \
+	$(LOADER_SRC) \
+	writer-illumina \
+	writer-454 \
+	writer-ion-torrent \
+	fastq-fmt
+
+FASTQ_LOAD_OBJ = \
+	$(addsuffix .$(OBJX),$(FASTQ_LOAD_SRC))
+
+$(BINDIR)/fastq-load: $(FASTQ_LOAD_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(LOADER_LIB)
+
+#------------------------------------------------------------------------------
+# srf-load
+#
+SRF_LOAD_SRC = \
+	$(LOADER_SRC) \
+	srf \
+	srf-fmt \
+	writer-illumina \
+	ztr-illumina \
+	srf-illumina \
+	writer-absolid \
+	ztr-absolid \
+	ztr-huffman \
+	srf-absolid
+
+SRF_LOAD_OBJ = \
+	$(addsuffix .$(OBJX),$(SRF_LOAD_SRC))
+
+$(BINDIR)/srf-load: $(SRF_LOAD_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(LOADER_LIB)
+
+#------------------------------------------------------------------------------
+# abi-load
+#
+ABSOLID_LOAD_SRC = \
+	$(LOADER_SRC) \
+	writer-absolid \
+	absolid-fmt
+
+ABSOLID_LOAD_OBJ = \
+	$(addsuffix .$(OBJX),$(ABSOLID_LOAD_SRC))
+
+$(BINDIR)/abi-load: $(ABSOLID_LOAD_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(LOADER_LIB)
+
+#------------------------------------------------------------------------------
+# illumina-load
+#
+ILLUMINA_LOAD_SRC = \
+	$(LOADER_SRC) \
+	writer-illumina \
+	illumina-fmt
+
+ILLUMINA_LOAD_OBJ = \
+	$(addsuffix .$(OBJX),$(ILLUMINA_LOAD_SRC))
+
+$(BINDIR)/illumina-load: $(ILLUMINA_LOAD_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(LOADER_LIB)
+
+#------------------------------------------------------------------------------
+# helicos-load
+#
+HELICOS_LOAD_SRC = \
+	$(LOADER_SRC) \
+	writer-helicos \
+	helicos-fmt
+
+HELICOS_LOAD_OBJ = \
+	$(addsuffix .$(OBJX),$(HELICOS_LOAD_SRC))
+
+$(BINDIR)/helicos-load: $(HELICOS_LOAD_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(LOADER_LIB)
+
+#------------------------------------------------------------------------------
+# pacbio-loadxml
+#
+PACBIO_LOADXML_SRC = \
+	$(LOADER_SRC) \
+	pacbio-fmt
+
+PACBIO_LOADXML_OBJ = \
+	$(addsuffix .$(OBJX),$(PACBIO_LOADXML_SRC))
+
+$(BINDIR)/pacbio-loadxml: $(PACBIO_LOADXML_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(LOADER_LIB)
diff --git a/tools/sra-load/absolid-fmt.c b/tools/sra-load/absolid-fmt.c
new file mode 100644
index 0000000..5490cc9
--- /dev/null
+++ b/tools/sra-load/absolid-fmt.c
@@ -0,0 +1,573 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <kapp/main.h>
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <os-native.h>
+
+typedef struct AbiLoaderFmt AbiLoaderFmt;
+#define SRALOADERFMT_IMPL AbiLoaderFmt
+#include "loader-fmt.h"
+
+#include "pstring.h"
+#include "writer-absolid.h"
+#include "debug.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <errno.h>
+#include <limits.h>
+#include <assert.h>
+
+typedef enum EFileType_enum {
+    eNotSet = -1,
+    eCSFasta,
+    eQuality,
+    eSignalFTC,
+    eSignalCY3,
+    eSignalTXR,
+    eSignalCY5,
+    eFileTypeMax
+} EFileType;
+
+typedef struct AbiFileInfo_struct {
+    /* parsed data from file for a single spot */
+    bool ready; /* if data is filled from file */
+    /* header */
+    EFileType file_type;
+    pstring name_prefix;
+    /* spot data */
+    EAbisolidReadType read_type;
+    pstring name; /* name suffix */
+    long coord[3]; /* panel, x, y - sort-merge keys */
+    pstring data;
+    char cs_key; /* only for csfasta file type */
+
+    const SRALoaderFile* file;
+    /* file line buffer */
+    const char* line; /* not NULL if contains unprocessed data */
+    size_t line_len;
+} AbiFileInfo;
+
+struct AbiLoaderFmt {
+    SRALoaderFmt dad;
+    bool skip_signal;
+    const SRAWriteAbsolid* writer;
+    AbsolidRead read[ABSOLID_FMT_MAX_NUM_READS];
+};
+
+static
+void AbiFileInfo_init(AbiFileInfo* file)
+{
+    file->ready = false;
+    file->read_type = eAbisolidReadType_Unknown;
+    pstring_clear(&file->name);
+    memset(file->coord, 0, sizeof(file->coord));
+    pstring_clear(&file->data);
+    file->cs_key = '\0';
+}
+
+/* reads 1 line from given file
+ * if file->line pointer is not NULL line is in buffer already, nothing is read
+ * failes on error or if line empty and not optional
+ */
+static
+rc_t file_read_line(AbiFileInfo* file, bool optional)
+{
+    rc_t rc = 0;
+
+    if( file->line == NULL ) {
+        if( (rc = SRALoaderFileReadline(file->file, (const void**)&file->line, &file->line_len)) == 0 ) {
+            if( file->line == NULL || file->line_len == 0 ) {
+                if( !optional ) {
+                    rc = RC(rcSRA, rcFormatter, rcReading, rcString, rcInsufficient);
+                }
+            }
+            if( rc == 0 && file->line != NULL ) {
+                if( file->line_len > 0 ) {
+                    const char* e = file->line + file->line_len;
+                    /* right trim */
+                    while( --e >= file->line ) {
+                        if( !isspace(*e) ) {
+                            break;
+                        }
+                        file->line_len--;
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+static
+bool is_csfasta(const char* str, const size_t len)
+{
+    const char* s = str, *end = s + len;
+
+    if( s == end || strchr("ACGTacgt", *s++) == NULL ) {
+        return false;
+    }
+    while( s != end ) {
+        if( strchr("0123.", *s++) == NULL ) {
+            return false;
+        }
+    }
+    return true;
+}
+
+static
+bool is_quality(const char* str, const size_t len)
+{
+    const char* s = str, *end = s + len;
+
+    while( s != end ) {
+        if( strchr("-+0123456789 ", *s++) == NULL ) {
+            return false;
+        }
+    }
+    return len != 0;
+}
+
+static
+bool is_signal(const char* str, const size_t len)
+{
+    const char* s = str, *end = s + len;
+
+    while( s != end ) {
+        if( strchr("-+.0123456789Ee ", *s++) == NULL ) {
+            return false;
+        }
+    }
+    return len != 0;
+}
+
+static
+rc_t read_signal(const char* data, size_t data_sz, pstring* str)
+{
+    rc_t rc = 0;
+    double d;
+    const char* c = data, *end = data + data_sz;
+
+    pstring_clear(str);
+    while( rc == 0 && c != end ) {
+        char* next;
+        errno = 0;
+        d = strtod(c, &next);
+        if( errno != 0 ) {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcOutofrange);
+        } else if( d == 0 && c == next ) {
+            break;
+        } else {
+            float f = d;
+            c = next;
+            rc = pstring_append(str, &f, sizeof(f));
+        }
+    }
+    return rc;
+}
+
+static
+rc_t parse_suffix(const char* s, size_t len, AbiFileInfo* file)
+{
+    rc_t rc = 0;
+    int i;
+    const char* p = s, *end = p + len;
+    
+    assert(s && file);
+    while( isspace(*p) && p < end ) { ++p; }
+    if( (rc = pstring_assign(&file->name, p, end - p)) != 0 ) {
+        return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading name");
+    }
+    if( file->name.len <= 0 ) {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcFile, rcInvalid);
+        return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=expected not empty name after '>'");
+    }
+    p = strrchr(file->name.data, '_');
+    if( p != NULL ) {
+        file->read_type = AbsolidRead_Suffix2ReadType(p + 1);
+    } else {
+        file->read_type = eAbisolidReadType_Unknown;
+    }
+    /* in native form each file has single read: 1st or 2nd. Can't be whole spot, so label must be always found */
+    if( file->read_type <= eAbisolidReadType_SPOT ) {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcUnrecognized);
+        return SRALoaderFile_LOG(file->file, klogErr, rc, "read name suffix is not recognized: '$(name)'", "name=%.*s",
+                                 file->name.len, file->name.data);
+    }
+    file->name.len -= strlen(AbisolidReadType2ReadLabel[file->read_type]) + 1;
+    /* try to get panel, x, y from name, format: \D*(\d+)\D+(\d+)\D+(\d+) */
+    p = file->name.data + file->name.len;
+    for(i = 2; rc == 0 && i >= 0; i--) {
+        /* reverse parse */
+        while( !isdigit(*--p) && p >= file->name.data );
+        while( isdigit(*--p) && p >= file->name.data );
+        errno = 0;
+        file->coord[i] = strtol(p + 1, NULL, 10);
+        if( errno != 0 ) {
+            file->coord[i] =  0;
+        }
+    }
+    return rc;
+}
+
+/* reads from a file data for a sinlge spot, data may be partial */
+static
+rc_t read_next_spot(AbiLoaderFmt* self, AbiFileInfo* file)
+{
+    rc_t rc = 0;
+
+    if( file->ready ) {
+        /* data still not used */
+        return 0;
+    }
+    AbiFileInfo_init(file);
+    do {
+        if( (rc = file_read_line(file, true)) != 0 ) {
+            return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading more data");
+        } else if( file->line == NULL ) {
+            return 0; /* eof */
+        }
+        if( file->line[0] != '#' ) {
+            break;
+        } else {
+            const char* p = file->line, *end = p + file->line_len;
+            while( isspace(*++p) && p < end );
+            if( strncasecmp(p, "Title:", 6) == 0 ) {
+                p += 5;
+                while( isspace(*++p) && p < end );
+                if( p < end ) {
+                    if( (rc = pstring_assign(&file->name_prefix, p, end - p)) != 0 ){
+                        return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading Title");
+                    }
+                }
+            }
+            file->line = NULL;
+        }
+    } while( true );
+    if( file->line[0] != '>' ) {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcFile, rcInvalid);
+        return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=expected '>'");
+    } else {
+        if( (rc = parse_suffix(&file->line[1], file->line_len - 1, file)) != 0 ) {
+            return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading name suffix");
+        }
+        file->line = NULL;
+        if( (rc = file_read_line(file, false)) != 0 ) {
+            return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading data line");
+        }
+        if( file->file_type == eNotSet ) {
+            if( is_csfasta(file->line, file->line_len) ) {
+                file->file_type = eCSFasta;
+            } else if( is_quality(file->line, file->line_len) ) {
+                file->file_type = eQuality;
+            } else if( is_signal(file->line, file->line_len) ) {
+                const char* fname, *p;
+                if( (rc = SRALoaderFileName(file->file, &fname)) != 0 ) {
+                    return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=file name");
+                }
+                /* skip path if present */
+                p = strrchr(fname, '/');
+                p = p ? p : fname;
+                if( strstr(p, "FTC") != NULL ) {
+                    file->file_type = eSignalFTC;
+                } else if( strstr(p, "CY3") != NULL ) {
+                    file->file_type = eSignalCY3;
+                } else if( strstr(p, "TXR") != NULL ) {
+                    file->file_type = eSignalTXR;
+                } else if( strstr(p, "CY5") != NULL ) {
+                    file->file_type = eSignalCY5;
+                } else {
+                    rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcUnrecognized);
+                    return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=signal type by file name");
+                }
+            } else {
+                rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcUnrecognized);
+                return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading data line");
+            }
+        }
+        switch( file->file_type ) {
+            case eCSFasta:
+                if( !is_csfasta(file->line, file->line_len) ) {
+                    rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcCorrupt);
+                    return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading csfasta");
+                }
+                file->cs_key = file->line[0];
+                if( (rc = pstring_assign(&file->data, &file->line[1], file->line_len - 1)) != 0 ) {
+                    return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=copying csfasta");
+                }
+                break;
+            case eQuality:
+                if( (rc = pstring_assign(&file->data, file->line, file->line_len) != 0 ) ||
+                    (rc = pstring_quality_convert(&file->data, eExperimentQualityEncoding_Decimal, 0, -1, 0x7F)) != 0 ) {
+                    return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=converting quality");
+                }
+                break;
+            case eSignalFTC:
+            case eSignalCY3:
+            case eSignalTXR:
+            case eSignalCY5:
+                if( (rc = read_signal(file->line, file->line_len, &file->data)) != 0 ) {
+                    return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=converting signal");
+                }
+                break;
+            default:
+                rc = RC(rcSRA, rcFormatter, rcReading, rcFileFormat, rcUnknown);
+                return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=processing data line");
+                break;
+        }
+        file->line = NULL;
+        file->ready = true;
+    }
+#if _DEBUGGING
+    DEBUG_MSG(3, ("READ: type:%i, pfx:%s, rd_typ:%s, name:'%s', %li:%li:%li",
+                  file->file_type, file->name_prefix.data, AbisolidReadType2ReadLabel[file->read_type],
+                  file->name.data, file->coord[0], file->coord[1], file->coord[2]));
+    if( file->cs_key ) {
+        DEBUG_MSG(3, (", cs_key %c, data [%u] '%.*s'\n",
+                      file->cs_key, file->data.len, file->data.len, file->data.data));
+    } else {
+        DEBUG_MSG(3, (", data length: %u\n", file->data.len));
+    }
+#endif
+    return 0;
+}
+
+static
+rc_t AbiLoaderFmt_WriteData(AbiLoaderFmt* self, uint32_t argc, const SRALoaderFile* const argv[], int64_t* spots_bad_count)
+{
+    rc_t rc = 0;
+    uint32_t i, origin;
+    AbiFileInfo* files = NULL;
+    bool done;
+    pstring spotname;
+
+    if( (files = calloc(argc, sizeof(*files))) == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcMemory, rcInsufficient);
+    }
+    for(i = 0; rc == 0 && i < argc; i++) {
+        AbiFileInfo* file = &files[i];
+        AbiFileInfo_init(file);
+        file->file = argv[i];
+        file->file_type = eNotSet;
+    }
+    do {
+        done = true;
+        for(i = 0; rc == 0 && i < argc; i++) {
+            AbiFileInfo* file = &files[i];
+            if( (rc = read_next_spot(self, file)) != 0 || !file->ready ) {
+                continue;
+            }
+            done = false;
+        }
+        if( rc != 0 || done ) {
+            break;
+        }
+        /* find read with min coords */
+        origin = argc;
+        for(i = 0; i < argc; i++) {
+            AbiFileInfo* file = &files[i];
+            if( file->ready && (origin == argc ||
+                                file->coord[0] < files[origin].coord[0] ||
+                                (file->coord[0] == files[origin].coord[0] &&
+                                 file->coord[1] < files[origin].coord[1]) ||
+                                (file->coord[0] == files[origin].coord[0] &&
+                                 file->coord[1] == files[origin].coord[1] &&
+                                 file->coord[2] < files[origin].coord[2]) ) ) {
+                origin = i;
+            }
+        }
+        assert(origin != argc);
+        /* collect spot reads, matching by spot name
+         * spot data may be split across multiple files
+         */
+        for(i = 0; i < sizeof(self->read) / sizeof(self->read[0]); i++) {
+            AbsolidRead_Init(&self->read[i]);
+        }
+        rc = SRAWriteAbsolid_MakeName(&files[origin].name_prefix, &files[origin].name, &spotname);
+        for(i = 0; rc == 0 && i < argc; i++) {
+            AbiFileInfo* file = &files[i];
+            if( file->ready ) {
+                pstring tmpname;
+                if( (rc = SRAWriteAbsolid_MakeName(&file->name_prefix, &file->name, &tmpname)) == 0 ) {
+                    if( pstring_cmp(&spotname, &tmpname) == 0 ) {
+                        int read_number = AbisolidReadType2ReadNumber[file->read_type];
+                        switch( file->file_type ) {
+                            case eNotSet:
+                            case eFileTypeMax:
+                                rc = RC(rcSRA, rcFormatter, rcReading, rcFileFormat, rcUnknown);
+                                SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=merging spot data");
+                                break;
+                            case eCSFasta:
+                                if( self->read[read_number].seq.len > 0 ) {
+                                    rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcDuplicate);
+                                    SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=sequence");
+                                } else {
+                                    self->read[read_number].cs_key = file->cs_key;
+                                    rc = pstring_copy(&self->read[read_number].seq, &file->data);
+                                }
+                                break;
+                            case eQuality:
+                                if( self->read[read_number].qual.len > 0 ) {
+                                    rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcDuplicate);
+                                    SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=quality");
+                                } else {
+                                    rc = pstring_copy(&self->read[read_number].qual, &file->data);
+                                }
+                                break;
+                            case eSignalFTC:
+                                if( !self->skip_signal ) {
+                                    if( self->read[read_number].fxx.len > 0 ) {
+                                        rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcDuplicate);
+                                        SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=FTC");
+                                    } else {
+                                        self->read[read_number].fs_type = eAbisolidFSignalType_FTC;
+                                        rc = pstring_copy(&self->read[read_number].fxx, &file->data);
+                                    }
+                                }
+                                break;
+                            case eSignalCY3:
+                                if( !self->skip_signal ) {
+                                    if( self->read[read_number].cy3.len > 0 ) {
+                                        rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcDuplicate);
+                                        SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=CY3");
+                                    } else {
+                                        rc = pstring_copy(&self->read[read_number].cy3, &file->data);
+                                    }
+                                }
+                                break;
+                            case eSignalTXR:
+                                if( !self->skip_signal ) {
+                                    if( self->read[read_number].txr.len > 0 ) {
+                                        rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcDuplicate);
+                                        SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=TXR");
+                                    } else {
+                                        rc = pstring_copy(&self->read[read_number].txr, &file->data);
+                                    }
+                                }
+                                break;
+                            case eSignalCY5:
+                                if( !self->skip_signal ) {
+                                    if( self->read[read_number].cy5.len > 0 ) {
+                                        rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcDuplicate);
+                                        SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=CY5");
+                                    } else {
+                                        rc = pstring_copy(&self->read[read_number].cy5, &file->data);
+                                    }
+                                }
+                                break;
+                        }
+                        if( rc == 0 ) {
+                            const char* l = AbisolidReadType2ReadLabel[file->read_type];
+                            rc = pstring_assign(&self->read[read_number].label, l, strlen(l));
+                        }
+                        file->ready = false;
+                    }
+                }
+            }
+        }
+        /* replace -1 quality for '.' to 0 */
+        for(i = 0; rc == 0 && i < ABSOLID_FMT_MAX_NUM_READS; i++) {
+            int j;
+            for(j = 0; rc == 0 && j < self->read[i].qual.len; j++ ) {
+                if( self->read[i].qual.data[j] == -1 ) {
+                    if( self->read[i].seq.data[j] == '.' ) {
+                        self->read[i].qual.data[j] = 0;
+                    } else {
+                        SRALoaderFile_LOG(files[0].file, klogErr, rc, "$(msg)", "msg=quality is -1 not for '.'");
+                        rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcInvalid);
+                    }
+                }
+            }
+        }
+        if( rc == 0 ) {
+            rc = SRAWriteAbsolid_Write(self->writer, argv[0], &spotname, NULL,
+                                       self->read[0].label.len > 0 ? &self->read[0] : NULL,
+                                       self->read[1].label.len > 0 ? &self->read[1] : NULL);
+        }
+    } while( rc == 0 );
+    free(files);
+    return rc;
+}
+
+static
+rc_t AbiLoaderFmt_Whack(AbiLoaderFmt *self, SRATable** table)
+{
+    SRAWriteAbsolid_Whack(self->writer, table);
+    free(self);
+    return 0;
+}
+
+const char UsageDefaultName[] = "abi-load";
+
+static
+rc_t AbiLoaderFmt_Version (const AbiLoaderFmt* self, uint32_t *vers, const char** name )
+{
+    *vers = KAppVersion();
+    *name = "AB SOLiD native";
+    return 0;
+}
+
+static SRALoaderFmt_vt_v1 vtAbiLoaderFmt =
+{
+    1, 0,
+    AbiLoaderFmt_Whack,
+    AbiLoaderFmt_Version,
+    NULL,
+    AbiLoaderFmt_WriteData
+};
+
+rc_t SRALoaderFmtMake(SRALoaderFmt **self, const SRALoaderConfig *config)
+{
+    rc_t rc = 0;
+    AbiLoaderFmt* fmt;
+
+    if( self == NULL || config == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    *self = NULL;
+    fmt = calloc(1, sizeof(*fmt));
+    if(fmt == NULL) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+        LOGERR(klogInt, rc, "failed to initialize; out of memory");
+        return rc;
+    }
+    if( (rc = SRAWriteAbsolid_Make(&fmt->writer, config)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize writer");
+    } else if( (rc = SRALoaderFmtInit(&fmt->dad, (const SRALoaderFmt_vt*)&vtAbiLoaderFmt)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize parent object");
+    }
+    /* Set result or free obj */
+    if( rc != 0 ) {
+        AbiLoaderFmt_Whack(fmt, NULL);
+    } else {
+        fmt->skip_signal = (config->columnFilter & (efltrSIGNAL | efltrDEFAULT));
+        *self = &fmt->dad;
+    }
+    return rc;
+}
diff --git a/tools/sra-load/common-xml.c b/tools/sra-load/common-xml.c
new file mode 100644
index 0000000..5c9439d
--- /dev/null
+++ b/tools/sra-load/common-xml.c
@@ -0,0 +1,871 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <klib/debug.h>
+#include <klib/container.h>
+#include <sra/types.h>
+#include <os-native.h>
+
+#include "common-xml.h"
+#include "debug.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+
+static
+rc_t parse_READ_LABEL(const KXMLNode* READ_SPEC, ReadSpecXML_read* read)
+{
+    rc_t rc = 0;
+    const KXMLNode *node = NULL;
+
+    if( (rc = KXMLNodeGetFirstChildNodeRead(READ_SPEC, &node, "READ_LABEL")) == 0 ) {
+        rc = KXMLNodeReadCStr(node, &read->read_label, NULL);
+        if( rc != 0 ) {
+            LOGERR(klogErr, rc, "READ_LABEL");
+        } else if( strlen(read->read_label) == 0 ) {
+            free(read->read_label);
+            read->read_label = NULL;
+        }
+        KXMLNodeRelease(node);
+    } else {
+        /* label is optional */
+        rc = 0;
+    }
+    return rc;
+}
+
+static
+rc_t parse_READ_CLASS(const KXMLNode* READ_SPEC, ReadSpecXML_read* read)
+{
+    rc_t rc = 0;
+    const KXMLNode *node = NULL;
+    char* rclass = NULL;
+
+    if( (rc = KXMLNodeGetFirstChildNodeRead(READ_SPEC, &node, "READ_CLASS")) == 0 ) {
+        rc = KXMLNodeReadCStr(node, &rclass, NULL);
+        KXMLNodeRelease(node);
+    }
+    if( rc != 0 ) {
+        LOGERR(klogErr, rc, "READ_CLASS");
+    } else if( strcmp(rclass, "Application Read") == 0 ) {
+        read->read_class = SRA_READ_TYPE_BIOLOGICAL;
+    } else if( strcmp(rclass, "Technical Read") == 0 ) {
+        read->read_class = SRA_READ_TYPE_TECHNICAL;
+    } else {
+        rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcInvalid);
+        PLOGERR(klogErr, (klogErr, rc, "READ_CLASS: $(c)", PLOG_S(c), rclass));
+    }
+    free(rclass);
+    return rc;
+}
+
+static
+rc_t parse_READ_TYPE(const KXMLNode* READ_SPEC, ReadSpecXML_read* read)
+{
+    rc_t rc = 0;
+    const KXMLNode *node = NULL;
+    char* rtype = NULL;
+
+    if( (rc = KXMLNodeGetFirstChildNodeRead(READ_SPEC, &node, "READ_TYPE")) == 0 ) {
+        rc = KXMLNodeReadCStr(node, &rtype, "Forward");
+        KXMLNodeRelease(node);
+    }
+    if( rc != 0 ) {
+        LOGERR(klogErr, rc, "READ_TYPE");
+    } else if( strcmp(rtype, "Forward") == 0 ) {
+        read->read_type = rdsp_Forward_rt;
+    } else if( strcmp(rtype, "Reverse") == 0 ) {
+        read->read_type = rdsp_Reverse_rt;
+    } else if( strcmp(rtype, "Adapter") == 0 ) {
+        read->read_type = rdsp_Adapter_rt;
+    } else if( strcmp(rtype, "Primer") == 0 ) {
+        read->read_type = rdsp_Primer_rt;
+    } else if( strcmp(rtype, "Linker") == 0 ) {
+        read->read_type = rdsp_Linker_rt;
+    } else if( strcmp(rtype, "BarCode") == 0 ) {
+        read->read_type = rdsp_BarCode_rt;
+    } else if( strcmp(rtype, "Other") == 0 ) {
+        read->read_type = rdsp_Other_rt;
+    } else {
+        rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcInvalid);
+        PLOGERR(klogErr, (klogErr, rc, "READ_CLASS: $(c)", PLOG_S(c), rtype));
+    }
+    free(rtype);
+    return rc;
+}
+
+static
+rc_t parse_RELATIVE_ORDER(const KXMLNode* READ_SPEC, ReadSpecXML_read* read, uint32_t* counter)
+{
+    rc_t rc1 = 0, rc2 = 0;
+    const KXMLNode *node = NULL;
+
+    if( KXMLNodeGetFirstChildNodeRead(READ_SPEC, &node, "RELATIVE_ORDER") != 0 ) {
+        return 0;
+    }
+    *counter = *counter + 1;
+    read->coord.relative_order.follows = -1; /* not set */
+    read->coord.relative_order.precedes = -1; /* not set */
+    rc1 = KXMLNodeReadAttrAsI16(node, "follows_read_index", &read->coord.relative_order.follows);
+    rc2 = KXMLNodeReadAttrAsI16(node, "precedes_read_index", &read->coord.relative_order.precedes);
+    KXMLNodeRelease(node);
+    if( (rc1 != 0 && GetRCState(rc1) != rcNotFound) || (rc2 != 0 && GetRCState(rc2) != rcNotFound) ) {
+        rc1 = rc1 ? rc1 : rc2;
+        LOGERR(klogErr, rc1, "RELATIVE_ORDER attributes");
+    } else if( (read->coord.relative_order.follows < 0 && read->coord.relative_order.precedes < 0) ||
+               (read->coord.relative_order.follows >= 0 && read->coord.relative_order.precedes >= 0) ) {
+        rc1 = RC(rcExe, rcFormatter, rcConstructing, rcData, rcInconsistent);
+        LOGERR(klogErr, rc1, "RELATIVE_ORDER attributes");
+    } else {
+        rc1 = 0;
+        read->coord_type = rdsp_RelativeOrder_ct;
+    }
+    return rc1;
+}
+
+static
+rc_t parse_BASE_COORD(const KXMLNode* READ_SPEC, ReadSpecXML_read* read, uint32_t* counter)
+{
+    rc_t rc = 0;
+    const KXMLNode *node = NULL;
+
+    if( KXMLNodeGetFirstChildNodeRead(READ_SPEC, &node, "BASE_COORD") != 0 ) {
+        return 0;
+    }
+    *counter = *counter + 1;
+    rc = KXMLNodeReadAsI16(node, &read->coord.start_coord);
+    KXMLNodeRelease(node);
+    if( rc != 0 ) {
+        LOGERR(klogErr, rc, "BASE_COORD");
+    } else if( read->coord.start_coord < 1 ) {
+        rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcInvalid);
+        PLOGERR(klogErr, (klogErr, rc, "BASE_COORD: $(b)", PLOG_I32(b), read->coord.start_coord));
+    } else {
+        read->coord_type = rdsp_BaseCoord_ct;
+    }
+    return rc;
+}
+
+static
+rc_t parse_CYCLE_COORD(const KXMLNode* READ_SPEC, ReadSpecXML_read* read, uint32_t* counter)
+{
+    rc_t rc = 0;
+    const KXMLNode *node = NULL;
+
+    if( KXMLNodeGetFirstChildNodeRead(READ_SPEC, &node, "CYCLE_COORD") != 0 ) {
+        return 0;
+    }
+    *counter = *counter + 1;
+    rc = KXMLNodeReadAsI16(node, &read->coord.start_coord);
+    KXMLNodeRelease(node);
+    if( rc != 0 ) {
+        LOGERR(klogErr, rc, "CYCLE_COORD");
+    } else if( read->coord.start_coord < 1 ) {
+        rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcInvalid);
+        PLOGERR(klogErr, (klogErr, rc, "CYCLE_COORD: $(b)", PLOG_I32(b), read->coord.start_coord));
+    } else {
+        read->coord_type = rdsp_CycleCoord_ct;
+    }
+    return rc;
+}
+
+rc_t parse_BASECALL_TABLE_add(ReadSpecXML_read_BASECALL_TABLE* table, const ReadSpecXML_read_BASECALL* src, const char* bc)
+{
+    rc_t rc = 0;
+
+    if( table->size == table->count ) {
+        const int inc = 20;
+        ReadSpecXML_read_BASECALL* nt = realloc(table->table, (table->size + inc) * sizeof(*src));
+        if( nt == NULL ) {
+            rc = RC(rcExe, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+        } else {
+            table->size += inc;
+            table->table = nt;
+        }
+    }
+    if( rc == 0 ) {
+        uint32_t i;
+        for(i = 0; rc == 0 && i < table->count; i++) {
+            if( strcmp(table->table[i].basecall, bc) == 0 ) {
+                rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcDuplicate);
+            }
+        }
+    }
+    if( rc == 0 ) {
+        table->table[table->count].basecall = bc ? strdup(bc) : NULL;
+        table->table[table->count].read_group_tag = src->read_group_tag ? strdup(src->read_group_tag) : NULL;
+        table->table[table->count].min_match = src->min_match;
+        table->table[table->count].max_mismatch = src->max_mismatch;
+        table->table[table->count].match_edge = src->match_edge;
+        if( table->table[table->count].basecall == NULL ||
+            (src->read_group_tag != NULL && table->table[table->count].read_group_tag == NULL) ) {
+            rc = RC(rcExe, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+        } else {
+            uint32_t k = strlen(table->table[table->count].basecall);
+            k += src->max_mismatch;
+            switch(src->match_edge) {
+                case match_edge_End:
+                    if( table->match_end < k ) {
+                        table->match_end = k;
+                    }
+                    break;
+                case match_edge_Start:
+                case match_edge_Full:
+                    if( table->match_start < k ) {
+                        table->match_start = k;
+                    }
+                    break;
+            }
+
+            rc = AgrepMake(&table->table[table->count].agrep,
+                           AGREP_PATTERN_4NA |
+                           AGREP_ALG_MYERS |
+                           AGREP_EXTEND_BETTER, table->table[table->count].basecall);
+        }
+        table->count++;
+    }
+    return rc;
+}
+
+static
+rc_t parse_BASECALL_new4na(ReadSpecXML_read_BASECALL_TABLE* table, const ReadSpecXML_read_BASECALL* bc)
+{
+    rc_t rc = 0;
+
+    if( table == NULL || bc == NULL || bc->basecall[0] == '\0' ||
+        strspn(bc->basecall, "ACGTURYSWKMBDHVNacgturyswkmbdhvn.-") != strlen(bc->basecall) ) {
+        rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcInvalid);
+    }
+    if( rc == 0 ) {
+        char r[4096];
+        size_t l = strlen(bc->basecall);
+
+        if( l >= sizeof(r) ) {
+            rc = RC(rcExe, rcFormatter, rcConstructing, rcBuffer, rcInsufficient);
+        } else {
+            int i;
+            for(i = 0; i < l; i++) {
+                if( bc->match_edge == match_edge_End ) {
+                    /* need to reverse BC because match will happen on reversed seq */
+                    r[i] = bc->basecall[l - i - 1];
+                } else {
+                    r[i] = bc->basecall[i];
+                }
+                /*r[i] = isalpha(r[i]) ? toupper(r[i]) : 'N';*/
+            }
+            r[i] = '\0';
+            rc = parse_BASECALL_TABLE_add(table, bc, r);
+        }
+    }
+    return rc;
+}
+
+static
+rc_t parse_EXPECTED_BASECALL(const KXMLNode* READ_SPEC, ReadSpecXML_read* read, uint32_t* counter)
+{
+    rc_t rc = 0;
+    const KXMLNode *node = NULL;
+    ReadSpecXML_read_BASECALL bc;
+
+    if( KXMLNodeGetFirstChildNodeRead(READ_SPEC, &node, "EXPECTED_BASECALL") != 0 ) {
+        return 0;
+    }
+    *counter = *counter + 1;
+    if( (rc = KXMLNodeReadCStr(node, &bc.basecall, NULL)) != 0 ) {
+        LOGERR(klogErr, rc, "EXPECTED_BASECALL value");
+    } else if( (rc = KXMLNodeReadAttrAsU32(node, "default_length", &read->coord.expected_basecalls.default_length)) != 0 &&
+        GetRCState(rc) != rcNotFound ) {
+        LOGERR(klogErr, rc, "EXPECTED_BASECALL 'default_length' attribute");
+    } else if( (rc = KXMLNodeReadAttrAsU32(node, "base_coord", &read->coord.expected_basecalls.base_coord)) != 0 &&
+         GetRCState(rc) != rcNotFound ) {
+        LOGERR(klogErr, rc, "EXPECTED_BASECALL 'base_coord' attribute");
+    } else {
+        bc.read_group_tag = NULL;
+        bc.min_match = strlen(bc.basecall);
+        /* allow 10% mismatches */
+        bc.max_mismatch = bc.min_match * 0.1;
+        bc.match_edge = match_edge_Full;
+        if( (rc = parse_BASECALL_new4na(&read->coord.expected_basecalls, &bc)) == 0 ) {
+            read->coord_type = rdsp_ExpectedBaseCall_ct;
+        }
+    }
+    if( rc != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "EXPECTED_BASECALL '$(c)'", PLOG_S(c), bc.basecall));
+    }
+    free(bc.basecall);
+    KXMLNodeRelease(node);
+    return rc;
+}
+
+static
+rc_t parse_BASECALL(const KXMLNode* node, ReadSpecXML_read_BASECALL_TABLE* table)
+{
+    rc_t rc = 0;
+    char* match_edge = NULL;
+    ReadSpecXML_read_BASECALL bc;
+
+
+    memset(&bc, 0, sizeof(bc));
+    if( (rc = KXMLNodeReadCStr(node, &bc.basecall, NULL)) != 0 ) {
+        LOGERR(klogErr, rc, "BASECALL");
+        return rc;
+    }
+    rc = KXMLNodeReadAttrCStr(node, "read_group_tag", &bc.read_group_tag, NULL);
+    if( rc != 0 && !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        LOGERR(klogErr, rc, "BASECALL @read_group_tag");
+        return rc;
+    }
+    rc = KXMLNodeReadAttrAsU32(node, "min_match", &bc.min_match);
+    if( rc != 0 && !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        LOGERR(klogErr, rc, "BASECALL @min_match");
+        return rc;
+    } else if(bc.min_match > strlen(bc.basecall)) {
+        rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcInvalid);
+        PLOGERR(klogErr, (klogErr, rc, "BASECALL @min_match more than basecall length: $(bc)", PLOG_S(bc), bc.basecall));
+        return rc;
+    } else if( bc.min_match == 0 ) {
+        bc.min_match = strlen(bc.basecall);
+    }
+    rc = KXMLNodeReadAttrAsU32(node, "max_mismatch", &bc.max_mismatch);
+    if( rc != 0 && !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        LOGERR(klogErr, rc, "BASECALL @max_mismatch");
+        return rc;
+    } else if(bc.max_mismatch >= strlen(bc.basecall)) {
+        rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcInvalid);
+        PLOGERR(klogErr, (klogErr, rc, "BASECALL @max_mismatch value too big: $(bc)", PLOG_S(bc), bc.basecall));
+        return rc;
+    }
+    if( (bc.min_match + bc.max_mismatch) < strlen(bc.basecall) ) {
+        if( bc.min_match != 0 ) {
+            PLOGMSG(klogWarn, (klogWarn, "BASECALL @min_match is too small: $(bc)", PLOG_S(bc), bc.basecall));
+        }
+        bc.min_match = strlen(bc.basecall) - bc.max_mismatch;
+    }
+    rc = KXMLNodeReadAttrCStr(node, "match_edge", &match_edge, NULL);
+    if( rc != 0 && !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        LOGERR(klogErr, rc, "BASECALL @match_edge");
+    } else if( match_edge == NULL || strcmp(match_edge, "full") == 0 ) {
+        bc.match_edge = match_edge_Full;
+    } else if( strcmp(match_edge, "start") == 0 ) {
+        bc.match_edge = match_edge_Start;
+    } else if( strcmp(match_edge, "end") == 0 ) {
+        bc.match_edge = match_edge_End;
+    } else {
+        rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcInvalid);
+        PLOGERR(klogErr, (klogErr, rc, "BASECALL @match_edge: $(c)", PLOG_S(c), match_edge));
+    }
+    free(match_edge);
+
+    if( (rc = parse_BASECALL_new4na(table, &bc)) != 0 ) {
+        LOGERR(klogErr, rc, "BASECALL");
+    }
+    free(bc.basecall);
+    free(bc.read_group_tag);
+    return rc;
+}
+
+static
+rc_t parse_EXPECTED_BASECALL_TABLE(const KXMLNode* READ_SPEC, ReadSpecXML_read* read, uint32_t* counter)
+{
+    rc_t rc = 0;
+    const KXMLNode* EXPECTED_BASECALL_TABLE;
+    const KXMLNodeset* BASECALLS;
+   
+    if( KXMLNodeGetFirstChildNodeRead(READ_SPEC, &EXPECTED_BASECALL_TABLE, "EXPECTED_BASECALL_TABLE") != 0 ) {
+        return 0;
+    }
+    *counter = *counter + 1;
+
+    if( (rc = KXMLNodeReadAttrAsU32(EXPECTED_BASECALL_TABLE, "default_length", &read->coord.expected_basecalls.default_length)) != 0 &&
+        GetRCState(rc) != rcNotFound ) {
+        LOGERR(klogErr, rc, "EXPECTED_BASECALL_TABLE 'default_length' attribute");
+    } else if( (rc = KXMLNodeReadAttrAsU32(EXPECTED_BASECALL_TABLE, "base_coord", &read->coord.expected_basecalls.base_coord)) != 0 &&
+         GetRCState(rc) != rcNotFound ) {
+        LOGERR(klogErr, rc, "EXPECTED_BASECALL_TABLE 'base_coord' attribute");
+    } else if( (rc = KXMLNodeOpenNodesetRead(EXPECTED_BASECALL_TABLE, &BASECALLS, "BASECALL")) == 0 ) {
+        uint32_t count = 0;
+        KXMLNodesetCount(BASECALLS, &count);
+        if( count > 0 ) {
+            uint32_t i, tagged;
+            for(i = 0; rc == 0 && i < count; i++) {
+                const KXMLNode* BASECALL = NULL;
+                if( (rc = KXMLNodesetGetNodeRead(BASECALLS, &BASECALL, i)) == 0 ) {
+                        if( (rc = parse_BASECALL(BASECALL, &read->coord.expected_basecalls)) != 0 ) {
+                            PLOGERR(klogErr, (klogErr, rc, "BASECALL $(i)", PLOG_U32(i), i));
+                        }
+                        KXMLNodeRelease(BASECALL);
+                } else {
+                    PLOGERR(klogErr, (klogErr, rc, "BASECALL node #$(i)", PLOG_U32(i), i));
+                }
+            }
+            for(i = 0, tagged = 0; rc == 0 && i < read->coord.expected_basecalls.count; i++) {
+                if( read->coord.expected_basecalls.table[i].read_group_tag != NULL ) {
+                    tagged++;
+                }
+            }
+            if( tagged > 0 ) {
+                if( read->coord.expected_basecalls.count != tagged ) {
+                    LOGMSG(klogWarn, "mixed tagged/untagged BASECALLs in table");
+                } else {
+                    read->coord.expected_basecalls.pooled = true;
+                }
+            }
+            if( rc == 0 ) {
+                read->coord_type = rdsp_ExpectedBaseCallTable_ct;
+            } else {
+                free(read->coord.expected_basecalls.table);
+            }
+        } else {
+            rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcIncomplete);
+            LOGERR(klogErr, rc, "need at least one BASECALL element");
+        }
+        KXMLNodesetRelease(BASECALLS);
+    } else {
+        LOGERR(klogErr, rc, "missing element(s) BASECALL");
+    }
+    KXMLNodeRelease(EXPECTED_BASECALL_TABLE);
+    return rc;
+}
+
+static
+rc_t parse_READ_SPEC(const KXMLNode* READ_SPEC, ReadSpecXML_read* read, uint32_t index)
+{
+    rc_t rc = 0;
+    uint32_t coord = 0;
+
+    if( (rc = parse_READ_LABEL(READ_SPEC, read)) != 0 ||
+        (rc = parse_READ_CLASS(READ_SPEC, read)) != 0 ||
+        (rc = parse_READ_TYPE(READ_SPEC, read)) != 0 ||
+        (rc = parse_RELATIVE_ORDER(READ_SPEC, read, &coord)) != 0 ||
+        (rc = parse_BASE_COORD(READ_SPEC, read, &coord)) != 0 ||
+        (rc = parse_CYCLE_COORD(READ_SPEC, read, &coord)) != 0 ||
+        (rc = parse_EXPECTED_BASECALL(READ_SPEC, read, &coord)) != 0 ||
+        (rc = parse_EXPECTED_BASECALL_TABLE(READ_SPEC, read, &coord)) != 0 ) {
+        return rc;
+    }
+    if( coord != 1 || read->coord_type == 0) {
+        rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcInvalid);
+        PLOGERR(klogErr, (klogErr, rc, "bad or missing coordinate descriptor in read #$(index)",
+                        PLOG_U32(index), index));
+    }
+    return rc;
+}
+
+static
+rc_t parse_READ_INDEX(const KXMLNode* READ_SPEC, uint32_t* index)
+{
+    rc_t rc = 0;
+    const KXMLNode* node = NULL;
+
+    if( (rc = KXMLNodeGetFirstChildNodeRead(READ_SPEC, &node, "READ_INDEX")) == 0 ) {
+        if( (rc = KXMLNodeReadAsU32(node, index)) != 0 ) {
+            LOGERR(klogErr, rc, "READ_INDEX");
+        }
+        KXMLNodeRelease(node);
+    } else {
+        LOGERR(klogErr, rc, "missing required node READ_INDEX");
+    }
+    return rc;
+}
+
+static
+rc_t XMLNode_get_subnode(const KXMLNode* node, const char* child, const KXMLNode** sub)
+{
+    rc_t rc = 0;
+    const KXMLNodeset* ns = NULL; 
+
+    *sub = NULL;
+    if( (rc = KXMLNodeOpenNodesetRead(node, &ns, child)) == 0 ) {
+        uint32_t count = 0;
+        if( (rc = KXMLNodesetCount(ns, &count)) == 0 ) {
+            if( count == 0 ) {
+                rc = RC(rcExe, rcFormatter, rcParsing, rcNode, rcNotFound);
+            } else if( count > 1 ) {
+                rc = RC(rcExe, rcFormatter, rcParsing, rcNode, rcDuplicate);
+            } else {
+                rc = KXMLNodesetGetNodeRead(ns, sub, 0);
+            }
+        }
+        KXMLNodesetRelease(ns);
+    }
+    return rc;
+}
+
+rc_t XMLNode_get_strnode(const KXMLNode* node, const char* child, bool optional, char** value)
+{
+    rc_t rc = 0;
+    const KXMLNode* n = NULL;
+    
+    *value = NULL;
+    if( (rc = XMLNode_get_subnode(node, child, &n)) == 0 ) {
+        if( (rc = KXMLNodeReadCStr(n, value, NULL)) == 0 && *value != NULL && **value != '\0' ) {
+            /* rtrim and ltrim */
+            char* start = *value, *end;
+            while( *start != '\0' && isspace(*start) ) {
+                start++;
+            }
+            for(end = start; *end != '\0'; end++){}
+            while( --end > start && isspace(*end) ){}
+            memmove(*value, start, end - start + 1);
+            (*value)[end - start + 1] = '\0';
+        }
+        KXMLNodeRelease(n);
+    } else if( optional && GetRCState(rc) == rcNotFound ) {
+        rc = 0;
+    }
+    return rc;
+}
+
+static
+rc_t XMLNode_get_u32node(const KXMLNode* node, const char* child, bool optional, uint32_t* value)
+{
+    rc_t rc = 0;
+    const KXMLNode* n = NULL;
+    
+    if( (rc = XMLNode_get_subnode(node, child, &n)) == 0 ) {
+        rc = KXMLNodeReadAsU32(n, value);
+        KXMLNodeRelease(n);
+    } else if( optional && GetRCState(rc) == rcNotFound ) {
+        rc = 0;
+    }
+    return rc;
+}
+
+rc_t PlatformXML_Make(const PlatformXML** cself, const KXMLNode* node, uint32_t* spot_length)
+{
+    rc_t rc = 0;
+    PlatformXML* platform;
+    const KXMLNodeset* ns = NULL;
+
+    platform = calloc(1, sizeof(*platform));
+    if( platform != NULL ) {
+        platform->id = SRA_PLATFORM_UNDEFINED;
+        if( (rc = KXMLNodeOpenNodesetRead(node, &ns, "PLATFORM/*")) == 0 ) {
+            uint32_t count = 0;
+            if( (rc = KXMLNodesetCount(ns, &count)) != 0 || count != 1 ) {
+                rc = rc ? rc : RC(rcExe, rcFormatter, rcConstructing, rcTag, count ? rcExcessive : rcNotFound);
+            } else {
+                const KXMLNode* n = NULL;
+                if( (rc = KXMLNodesetGetNodeRead(ns, &n, 0)) == 0 ) {
+                    const char* name = NULL;
+                    if( (rc = KXMLNodeElementName(n, &name)) == 0 ) {
+                        DEBUG_MSG (4, ("PLATFORM: %s\n", name));
+                        if( strcmp(name, "LS454") == 0 ) {
+                            if( (rc = XMLNode_get_strnode(n, "KEY_SEQUENCE", true, &platform->param.ls454.key_sequence)) == 0 &&
+                                (rc = XMLNode_get_strnode(n, "FLOW_SEQUENCE", true, &platform->param.ls454.flow_sequence)) == 0 &&
+                                (rc = XMLNode_get_u32node(n, "FLOW_COUNT", true, &platform->param.ls454.flow_count)) == 0 ) {
+                                platform->id = SRA_PLATFORM_454;
+                                if( platform->param.ls454.key_sequence == NULL || platform->param.ls454.key_sequence[0] == '\0' ) {
+                                    PLOGMSG(klogWarn, (klogWarn, "$(n)/KEY_SEQUENCE is not specified", PLOG_S(n), name));
+                                    free(platform->param.ls454.key_sequence);
+                                    platform->param.ls454.key_sequence = NULL;
+                                }
+                                if( platform->param.ls454.flow_sequence == NULL || platform->param.ls454.flow_sequence[0] == '\0' ) {
+                                    PLOGMSG(klogWarn, (klogWarn, "$(n)/FLOW_SEQUENCE is not specified", PLOG_S(n), name));
+                                    free(platform->param.ls454.flow_sequence);
+                                    platform->param.ls454.flow_sequence = NULL;
+                                } else if( platform->param.ls454.flow_count % strlen(platform->param.ls454.flow_sequence) != 0 ) {
+                                    rc = RC(rcExe, rcFormatter, rcConstructing, rcId, rcInconsistent);
+                                } else {
+                                    char* flows = platform->param.ls454.flow_sequence;
+                                    platform->param.ls454.flow_sequence = malloc(platform->param.ls454.flow_count + 1);
+                                    if( platform->param.ls454.flow_sequence != NULL ) {
+                                        uint32_t i = platform->param.ls454.flow_count / strlen(flows);
+                                        platform->param.ls454.flow_sequence[0] = '\0';
+                                        while( i > 0 ) {
+                                            strcat(platform->param.ls454.flow_sequence, flows);
+                                            i--;
+                                        }
+                                        free(flows);
+                                    } else {
+                                        rc = RC(rcExe, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+                                    }
+                                }
+                            }
+                        } else if( strcmp(name, "ION_TORRENT") == 0 ) {
+                            if( (rc = XMLNode_get_strnode(n, "KEY_SEQUENCE", true, &platform->param.ion_torrent.key_sequence)) == 0 &&
+                                (rc = XMLNode_get_strnode(n, "FLOW_SEQUENCE", true, &platform->param.ion_torrent.flow_sequence)) == 0 &&
+                                (rc = XMLNode_get_u32node(n, "FLOW_COUNT", true, &platform->param.ion_torrent.flow_count)) == 0 ) {
+                                platform->id = SRA_PLATFORM_ION_TORRENT;
+                                if( platform->param.ion_torrent.key_sequence == NULL || platform->param.ion_torrent.key_sequence[0] == '\0' ) {
+                                    PLOGMSG(klogWarn, (klogWarn, "$(n)/KEY_SEQUENCE is not specified", PLOG_S(n), name));
+                                    free(platform->param.ion_torrent.key_sequence);
+                                    platform->param.ion_torrent.key_sequence = NULL;
+                                }
+                                if( platform->param.ion_torrent.flow_sequence == NULL || platform->param.ion_torrent.flow_sequence[0] == '\0' ) {
+                                    PLOGMSG(klogWarn, (klogWarn, "$(n)/FLOW_SEQUENCE is not specified", PLOG_S(n), name));
+                                    free(platform->param.ion_torrent.flow_sequence);
+                                    platform->param.ion_torrent.flow_sequence = NULL;
+                                } else if( platform->param.ion_torrent.flow_count % strlen(platform->param.ion_torrent.flow_sequence) != 0 ) {
+                                    rc = RC(rcExe, rcFormatter, rcConstructing, rcId, rcInconsistent);
+                                } else {
+                                    char* flows = platform->param.ion_torrent.flow_sequence;
+                                    platform->param.ion_torrent.flow_sequence = malloc(platform->param.ion_torrent.flow_count + 1);
+                                    if( platform->param.ion_torrent.flow_sequence != NULL ) {
+                                        uint32_t i = platform->param.ion_torrent.flow_count / strlen(flows);
+                                        platform->param.ion_torrent.flow_sequence[0] = '\0';
+                                        while( i > 0 ) {
+                                            strcat(platform->param.ion_torrent.flow_sequence, flows);
+                                            i--;
+                                        }
+                                        free(flows);
+                                    } else {
+                                        rc = RC(rcExe, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+                                    }
+                                }
+                            }
+                        } else if( strcmp(name, "ILLUMINA") == 0 ) {
+                            if( (rc = XMLNode_get_u32node(n, "SEQUENCE_LENGTH", false, spot_length)) != 0 &&
+                                GetRCState(rc) == rcNotFound ) {
+                                rc = XMLNode_get_u32node(n, "CYCLE_COUNT", true, spot_length);
+                            }
+                            if( rc == 0 ) {
+                                platform->id = SRA_PLATFORM_ILLUMINA;
+                            }
+                        } else if( strcmp(name, "HELICOS") == 0 ) {
+                            if( (rc = XMLNode_get_strnode(n, "FLOW_SEQUENCE", true, &platform->param.helicos.flow_sequence)) == 0 &&
+                                (rc = XMLNode_get_u32node(n, "FLOW_COUNT", true, &platform->param.helicos.flow_count)) == 0 ) {
+                                platform->id = SRA_PLATFORM_HELICOS;
+                            }
+                        } else if( strcmp(name, "ABI_SOLID") == 0 ) {
+                            if( (rc = XMLNode_get_u32node(n, "SEQUENCE_LENGTH", false, spot_length)) != 0 &&
+                                GetRCState(rc) == rcNotFound ) {
+                                rc = XMLNode_get_u32node(n, "CYCLE_COUNT", true, spot_length);
+                            }
+                            if( rc == 0 ) {
+                                platform->id = SRA_PLATFORM_ABSOLID;
+                            }
+                        } else if( strcmp(name, "PACBIO_SMRT") == 0 ) {
+                            platform->id = SRA_PLATFORM_PACBIO_SMRT;
+                        } else if( strcmp(name, "COMPLETE_GENOMICS") == 0 ) {
+                            platform->id = SRA_PLATFORM_COMPLETE_GENOMICS;
+                        } else if( strcmp(name, "CAPILLARY") == 0 ) {
+                            platform->id = SRA_PLATFORM_CAPILLARY;
+                        } else if( strcmp(name, "OXFORD_NANOPORE") == 0 ) {
+                            platform->id = SRA_PLATFORM_OXFORD_NANOPORE;
+                        }
+                        
+                        if( rc != 0 || platform->id == SRA_PLATFORM_UNDEFINED ) {
+                            rc = rc ? rc : RC(rcExe, rcFormatter, rcConstructing, rcId, rcUnrecognized);
+                            PLOGERR(klogErr, (klogErr, rc, "PLATFORM '$(n)'", PLOG_S(n), name));
+                        }
+                    }
+                    KXMLNodeRelease(n);
+                }
+            }
+            KXMLNodesetRelease(ns);
+        }
+        if( rc == 0 ) {
+            *cself = platform;
+        } else {
+            PlatformXML_Whack(platform);
+        }
+    } else {
+        rc = RC(rcExe, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+    }
+    return rc;
+}
+
+void PlatformXML_Whack(const PlatformXML* cself)
+{
+    if( cself != NULL ) {
+        PlatformXML* self = (PlatformXML*)cself;
+        switch(self->id) {
+            case SRA_PLATFORM_454:
+                free(self->param.ls454.key_sequence);
+                free(self->param.ls454.flow_sequence);
+                break;
+            case SRA_PLATFORM_ION_TORRENT:
+                free(self->param.ion_torrent.key_sequence);
+                free(self->param.ion_torrent.flow_sequence);
+                break;
+            case SRA_PLATFORM_ILLUMINA:
+                break;
+            case SRA_PLATFORM_HELICOS:
+                free(self->param.helicos.flow_sequence);
+                break;
+            case SRA_PLATFORM_ABSOLID:
+                break;
+            case SRA_PLATFORM_PACBIO_SMRT:
+                break;
+            case SRA_PLATFORM_COMPLETE_GENOMICS:
+                break;
+            case SRA_PLATFORM_CAPILLARY:
+                break;
+            case SRA_PLATFORM_OXFORD_NANOPORE:
+                break;
+            case SRA_PLATFORM_UNDEFINED:
+                break;
+        }
+        free(self);
+    }
+}
+
+rc_t ReadSpecXML_Make(const ReadSpecXML** cself, const KXMLNode* node, const char* path, uint32_t* spot_length)
+{
+    rc_t rc = 0;
+    ReadSpecXML* obj;
+
+    assert(node != NULL);
+
+    obj = calloc(1, sizeof(*obj));
+    if( obj != NULL ) {
+        const KXMLNodeset* READ_SPECS = NULL;
+        const KXMLNode* nsplen = NULL;
+        obj->nreads = 0;
+        obj->reads = &obj->spec[1]; /* set actual read to next one after fake fixed size read */
+        if( (rc = KXMLNodeGetFirstChildNodeRead(node, &nsplen, "%s/SPOT_DECODE_SPEC/SPOT_LENGTH", path)) == 0 ) {
+            rc = KXMLNodeReadAsU32(nsplen, spot_length);
+            KXMLNodeRelease(nsplen);
+        }
+        if( rc != 0 ) {
+            if( GetRCState(rc) != rcNotFound) {
+                LOGERR(klogErr, rc, "node SPOT_LENGTH");
+            } else {
+                rc = 0;
+            }
+        }
+        if( rc == 0 &&
+            (rc = KXMLNodeOpenNodesetRead(node, &READ_SPECS, "%s/SPOT_DECODE_SPEC/READ_SPEC", path)) == 0 ) {
+            if( (rc = KXMLNodesetCount(READ_SPECS, &obj->nreads)) != 0 || obj->nreads < 1 || obj->nreads > SRALOAD_MAX_READS ) {
+                rc = rc ? rc : RC(rcExe, rcFormatter, rcConstructing, rcTag, obj->nreads ? rcExcessive : rcNotFound);
+            } else {
+                const uint8_t class_none = ~0;
+                uint32_t i;
+                for(i = 0; i < obj->nreads; i++) {
+                    /* set all read's mandatory READ_CLASS to 'unset' value */
+                    obj->reads[i].read_class = class_none;
+                }
+                for(i = 0; rc == 0 && i < obj->nreads; i++) {
+                    const KXMLNode* READ_SPEC = NULL;
+                    uint32_t index = ~0;
+                    if( (rc = KXMLNodesetGetNodeRead(READ_SPECS, &READ_SPEC, i)) == 0 &&
+                        (rc = parse_READ_INDEX(READ_SPEC, &index)) == 0 ) {
+                        if( obj->reads[index].read_class == class_none ) {
+                            if( (rc = parse_READ_SPEC(READ_SPEC, &obj->reads[index], index)) != 0 ) {
+                                PLOGERR(klogErr, (klogErr, rc, "READ_INDEX $(i)", PLOG_U32(i), index));
+                            }
+                        }
+                        KXMLNodeRelease(READ_SPEC);
+                    } else {
+                        PLOGERR(klogErr, (klogErr, rc, "READ_SPEC node #$(i)", PLOG_U32(i), i));
+                    }
+                }
+                if(rc == 0) {
+                    for(i = 0; i < obj->nreads; i++) {
+                        if(obj->reads[i].read_class == class_none ) {
+                            rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcInvalid);
+                            PLOGERR(klogErr, (klogErr, rc, "missing READ_SPEC for READ_INDEX #$(i)", PLOG_U32(i), i));
+                        } else {
+                            switch(obj->reads[i].coord_type) {
+                                case rdsp_RelativeOrder_ct:
+                                    if( obj->nreads == 1 ) {
+                                        rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcInconsistent);
+                                        PLOGERR(klogErr, (klogErr, rc, "#$(i) single RELATIVE_ORDER not allowed", PLOG_U32(i), i));
+                                    } else if( i > 0 && obj->reads[i - 1].coord_type != rdsp_ExpectedBaseCall_ct &&
+                                                        obj->reads[i - 1].coord_type != rdsp_ExpectedBaseCallTable_ct ) {
+                                        rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcInconsistent);
+                                        PLOGERR(klogErr, (klogErr, rc, "#$(i) RELATIVE_ORDER cannot follow read of $(type) type",
+                                                PLOG_2(PLOG_U32(i),PLOG_S(type)), i, 
+                                                obj->reads[i - 1].coord_type == rdsp_BaseCoord_ct ? "BASE_COORD" :
+                                                    obj->reads[i - 1].coord_type == rdsp_CycleCoord_ct ? "CYCLE_COORD" :
+                                                        obj->reads[i - 1].coord_type == rdsp_RelativeOrder_ct ? "RELATIVE_ORDER" : "????"));
+                                    } else if( (obj->reads[i].coord.relative_order.follows >= 0 &&
+                                                (i == 0 || obj->reads[i].coord.relative_order.follows != i - 1)) ||
+                                               (obj->reads[i].coord.relative_order.precedes >= 0 &&
+                                                (i == obj->nreads - 1 || obj->reads[i].coord.relative_order.precedes != i + 1)) ) {
+                                        rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcInvalid);
+                                        PLOGERR(klogErr, (klogErr, rc, "#$(i) RELATIVE_ORDER attribute value(s)", PLOG_U32(i), i));
+                                    }
+                                    break;
+                                case rdsp_BaseCoord_ct:
+                                case rdsp_CycleCoord_ct:
+                                    if( i == 0 && obj->reads[i].coord.start_coord != 1 ) {
+                                        rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcInvalid);
+                                        PLOGERR(klogErr, (klogErr, rc, "#$(i) 1st read coordinate must be 1", PLOG_U32(i), i));
+                                    }
+                                    break;
+                                case rdsp_ExpectedBaseCall_ct:
+                                case rdsp_ExpectedBaseCallTable_ct:
+                                    break;
+                                default:
+                                    rc = RC(rcExe, rcFormatter, rcConstructing, rcData, rcUnexpected);
+                                    PLOGERR(klogErr, (klogErr, rc, "read #$(i) type", PLOG_U32(i), i));
+                                    break;
+                            }
+                        }
+                    }
+                }
+            }
+            KXMLNodesetRelease(READ_SPECS);
+        }
+    } else {
+        rc = RC(rcExe, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+    }
+    if( rc == 0 ) {
+        obj->spec[0].coord_type = rdsp_FIXED_BRACKET_ct;
+        obj->spec[0].read_class = SRA_READ_TYPE_TECHNICAL;
+        obj->spec[0].read_type = rdsp_Other_rt;
+        obj->spec[0].coord.start_coord = 1;
+        obj->spec[obj->nreads + 1].coord_type = rdsp_FIXED_BRACKET_ct;
+        obj->spec[obj->nreads + 1].read_class = SRA_READ_TYPE_TECHNICAL;
+        obj->spec[obj->nreads + 1].read_type = rdsp_Other_rt;
+        obj->spec[obj->nreads + 1].coord.start_coord = 0;
+        *cself = obj;
+    } else {
+        ReadSpecXML_Whack(obj);
+    }
+    return rc;
+}
+
+void ReadSpecXML_Whack(const ReadSpecXML* cself)
+{
+    if( cself != NULL ) {
+        uint32_t i, j;
+        ReadSpecXML* self = (ReadSpecXML*)cself;
+
+        for(i = 0; i < self->nreads; i++) {
+            free(self->reads[i].read_label);
+            switch(self->reads[i].coord_type) {
+                case rdsp_ExpectedBaseCall_ct:
+                case rdsp_ExpectedBaseCallTable_ct:
+                    for(j = 0; j < self->reads[i].coord.expected_basecalls.count; j++) {
+                        free(self->reads[i].coord.expected_basecalls.table[j].basecall);
+                        free(self->reads[i].coord.expected_basecalls.table[j].read_group_tag);
+                        AgrepWhack(self->reads[i].coord.expected_basecalls.table[j].agrep);
+                    }
+                    free(self->reads[i].coord.expected_basecalls.table);
+                    break;
+                default:
+                    break;
+            }
+        }
+        free(self);
+    }
+}
diff --git a/tools/sra-load/common-xml.h b/tools/sra-load/common-xml.h
new file mode 100644
index 0000000..918a142
--- /dev/null
+++ b/tools/sra-load/common-xml.h
@@ -0,0 +1,183 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _sra_load_common_xml_
+#define _sra_load_common_xml_
+
+#include <kxml/xml.h>
+#include <search/grep.h>
+#include <sra/sradb.h>
+
+#define SRALOAD_MAX_READS 32
+
+rc_t XMLNode_get_strnode(const KXMLNode* node, const char* child, bool optional, char** value);
+
+typedef struct PlatformXML_struct {
+    SRAPlatforms id;
+    union {
+        struct {
+            char* key_sequence; /* optional */
+            char* flow_sequence; /* optional */
+            uint32_t flow_count; /* optional */
+        } ls454;
+
+        struct {
+            char* key_sequence; /* optional */
+            char* flow_sequence; /* optional */
+            uint32_t flow_count; /* optional */
+        } ion_torrent;
+
+        struct {
+            char* flow_sequence; /* optional */
+            uint32_t flow_count; /* optional */
+        } helicos;
+    } param;
+} PlatformXML;
+
+rc_t PlatformXML_Make(const PlatformXML** cself, const KXMLNode* node, uint32_t* spot_length);
+
+void PlatformXML_Whack(const PlatformXML* cself);
+
+typedef struct ReadSpecXML_read_BASECALL_struct {
+    char* basecall;
+    char* read_group_tag;
+    uint32_t min_match;
+    uint32_t max_mismatch;
+    enum {
+        match_edge_Full = 1,
+        match_edge_Start,
+        match_edge_End
+    } match_edge;
+    Agrep* agrep;
+} ReadSpecXML_read_BASECALL;
+
+typedef struct ReadSpecXML_read_BASECALL_TABLE_struct {
+    uint32_t default_length;
+    uint32_t base_coord;
+    ReadSpecXML_read_BASECALL* table;
+    uint32_t size; /* allocated structures qty */
+    uint32_t count; /* used structures qty */
+    bool pooled; /* true disables search if member is present from run */
+    uint16_t match_start; /* length of longest bc with match_edge="start" */
+    uint16_t match_end; /* length of longest bc with match_edge="end" */
+} ReadSpecXML_read_BASECALL_TABLE;
+
+typedef struct ReadSpecXML_read_struct {
+    char* read_label; /* asciiz */
+    SRAReadTypes read_class;
+    enum {
+        rdsp_Forward_rt = 1,
+        rdsp_Reverse_rt,
+        rdsp_Adapter_rt,
+        rdsp_Primer_rt,
+        rdsp_Linker_rt,
+        rdsp_BarCode_rt,
+        rdsp_Other_rt
+    } read_type;
+    
+    enum {
+        /* order is important !!! */
+        rdsp_FIXED_BRACKET_ct = 1, /* special fixed size type */
+        rdsp_RelativeOrder_ct,
+        rdsp_BaseCoord_ct,
+        rdsp_CycleCoord_ct,
+        rdsp_ExpectedBaseCall_ct,
+        rdsp_ExpectedBaseCallTable_ct
+    } coord_type;
+
+    union {
+        struct {
+            int16_t follows;
+            int16_t precedes;
+        } relative_order;
+        /* starting position for *_COORD types */
+        int16_t start_coord;
+        /* EXPECTED_BASECALL is a table of 1 element, unless IUPAC is used in values */
+        ReadSpecXML_read_BASECALL_TABLE expected_basecalls;
+    } coord;
+} ReadSpecXML_read;
+
+typedef struct ReadSpecXML_struct {
+    uint32_t nreads;
+    ReadSpecXML_read spec[SRALOAD_MAX_READS + 2];
+    ReadSpecXML_read* reads;
+} ReadSpecXML;
+
+rc_t ReadSpecXML_Make(const ReadSpecXML** cself, const KXMLNode* node, const char* path, uint32_t* spot_length);
+
+void ReadSpecXML_Whack(const ReadSpecXML* cself);
+
+typedef enum {
+    eExperimentQualityType_Undefined = 0,
+    eExperimentQualityType_Phred,
+    eExperimentQualityType_LogOdds,
+    eExperimentQualityType_Other
+} ExperimentQualityType;
+
+typedef enum {
+    eExperimentQualityEncoding_Undefined = 0,
+    eExperimentQualityEncoding_Ascii,
+    eExperimentQualityEncoding_Decimal,
+    eExperimentQualityEncoding_Hexadecimal
+} ExperimentQualityEncoding;
+
+/*
+
+The value 'default' is same as '' or NULL in terms coding and represents default group (member) in SRA.
+
+We use value of these data elements as SPOT_GROUP (barcode, member, etc) column value.
+Rules (whichever is present in order of importance):
+
+1.	Run.xml: /RUN/DATA_BLOCK/ attribute member_name. (must have POOL to set read lengths).
+2.	Barcode in spot name in file data. (if not explicitly chosen [below] must have pool, otherwise fail)(must have POOL to set read lengths).
+3.	Experiment.xml: /EXPERIMENT/DESIGN/SAMPLE_DESCRIPTOR/POOL elements MEMBER. Match subsequences to determine SPOT_GROUP value.
+4.	No SPOT_GROUP column
+
+Than <RUN_ATTRIBUTE> with <TAG> case-insensitive value of �read_name_barcode_proc_directive� comes in with case-insensitive <VALUE> values:
+
+1.	RUN_ATTRIBUTE not present at all � use rules above.
+2.	'interpret_as_spotgroup' (use_file_spot_name) � use data from file�s spot names. Force rule #2. (new addition)
+3.	�use_table_in_experiment� � use POOL table from experiment.xml. Force rule #3.
+4.	�ignore� � do not write anything to SPOT_GROUP column. Force rule #4
+
+*/
+
+typedef enum {
+    eBarcodeRule_not_set = 0,
+    eBarcodeRule_use_file_spot_name,
+    eBarcodeRule_use_table_in_experiment,
+    eBarcodeRule_ignore_barcode
+} ExperimentBarcodeRule;
+
+typedef struct RunAttributes_struct {
+    uint32_t spot_length;
+    const PlatformXML* platform;
+    const ReadSpecXML* reads;
+    ExperimentBarcodeRule barcode_rule;
+    ExperimentQualityType quality_type;
+    uint8_t quality_offset;
+} RunAttributes;
+
+#endif /* _sra_load_common_xml_ */
diff --git a/tools/sra-load/debug.h b/tools/sra-load/debug.h
new file mode 100644
index 0000000..48dc6b8
--- /dev/null
+++ b/tools/sra-load/debug.h
@@ -0,0 +1,34 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_sra_load_debug_h_
+#define _tools_sra_load_debug_h_
+
+#include <klib/debug.h>
+
+#define DEBUG_MSG_PASTE(a,b) a##b
+#define DEBUG_MSG(flag,msg) DBGMSG(DBG_APP,DBG_FLAG(DEBUG_MSG_PASTE(DBG_APP_,flag)), msg)
+
+#endif /* _tools_sra_load_debug_h_ */
diff --git a/tools/sra-load/experiment-xml.c b/tools/sra-load/experiment-xml.c
new file mode 100644
index 0000000..9c50fff
--- /dev/null
+++ b/tools/sra-load/experiment-xml.c
@@ -0,0 +1,1255 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <klib/debug.h>
+#include <klib/container.h>
+#include <klib/trie.h>
+#include <sra/types.h>
+#include <os-native.h>
+
+#include "experiment-xml.h"
+#include "debug.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+
+#define MAX_POOL_MEMBER_BASECALLS 64
+#define MAX_SPOT_DESCRIPTOR_READS (SRALOAD_MAX_READS + 2)
+
+typedef struct PoolReadSpec_struct {
+    int16_t start;
+    int16_t length;
+    /* chosen basecalls for EXPECTED_BASECALL_TABLE for defined member_name, NULL-terminated array */
+    const ReadSpecXML_read_BASECALL* item[MAX_POOL_MEMBER_BASECALLS];
+    int32_t score;
+} PoolReadSpec;
+
+typedef struct PoolMember_struct {
+    BSTNode node;
+    const char *name;
+    PoolReadSpec spec[MAX_SPOT_DESCRIPTOR_READS];
+} PoolMember;
+
+struct ExperimentXML {
+    uint32_t spot_length;
+    const PlatformXML* platform;
+    ProcessingXML processing;
+    const ReadSpecXML* reads;
+    BSTree* member_pool;
+    PoolMember* member_null;
+    SLList member_stats;
+};
+
+static
+void CC PoolMember_Whack(BSTNode* node, void* data)
+{
+    if( node != NULL ) {
+        const PoolMember* n = (const PoolMember*)node;
+        free((void*)n->name);
+        free(node);
+    }
+}
+
+static
+int64_t CC PoolMember_StrCmp(const char* s1, const char* s2)
+{
+    if( s1 == NULL && s2 == NULL ) {
+        return 0;
+    } else if( s1 == NULL ) {
+        return -32767;
+    } else if( s2 == NULL ) {
+        return 32768;
+    }
+    return strcmp(s1, s2);
+}
+
+static
+int64_t CC PoolMember_Cmp(const BSTNode* item, const BSTNode* node)
+{
+    const PoolMember* i = (const PoolMember*)item;
+    const PoolMember* n = (const PoolMember*)node;
+
+    return PoolMember_StrCmp(i->name, n->name);
+}
+
+static
+int64_t CC PoolMember_FindByName(const void* item, const BSTNode* node)
+{
+    const char* name = (const char*)item;
+    const PoolMember* n = (const PoolMember*)node;
+
+    return PoolMember_StrCmp(name, n->name);
+}
+
+#if _DEBUGGING
+static
+void CC PoolMember_Dump( BSTNode *node, void *data )
+{
+    const PoolMember* n = (const PoolMember*)node;
+    const ExperimentXML* self = (const ExperimentXML*)data;
+    int r;
+
+    DEBUG_MSG(9, ("Member '%s'\n", n->name));
+
+    for(r = 0; r <= self->reads->nreads + 1; r++) {
+        DEBUG_MSG(9, ("Read %d [%hd:%hd]", r + 1, n->spec[r].start, n->spec[r].length));
+        if( self->reads->spec[r].coord_type == rdsp_ExpectedBaseCall_ct ) {
+            DEBUG_MSG(9, (" ebc:'%s'", n->spec[r].item[0]->basecall));
+        } else if( self->reads->spec[r].coord_type == rdsp_ExpectedBaseCallTable_ct ) {
+            int i = -1;
+            while( n->spec[r].item[++i] != NULL ) {
+                DEBUG_MSG(9, (" bc:'%s', tag:'%s';", n->spec[r].item[i]->basecall, n->spec[r].item[i]->read_group_tag));
+            }
+        }
+        DEBUG_MSG(9, ("\n"));
+    }
+}
+#endif
+
+static
+rc_t PoolMember_Add(ExperimentXML* self, const char* name)
+{
+    rc_t rc = 0;
+    PoolMember* member = NULL;
+
+    if( self == NULL) {
+        return RC(rcSRA, rcFormatter, rcAllocating, rcSelf, rcNull);
+    }
+    member = calloc(1, sizeof(*member));
+    if( member == NULL ) {
+        return RC(rcSRA, rcFormatter, rcAllocating, rcMemory, rcExhausted);
+    }
+    if( name == NULL ) {
+        if( self->member_null == NULL ) {
+            self->member_null = member;
+        } else {
+            rc = RC(rcSRA, rcFormatter, rcAllocating, rcId, rcDuplicate);
+        }
+    } else {
+        member->name = strdup(name);
+        if( member->name == NULL ) {
+            rc = RC(rcSRA, rcFormatter, rcAllocating, rcMemory, rcExhausted);
+        } else {
+            if( self->member_pool == NULL ) {
+                self->member_pool = calloc(1, sizeof(BSTree));
+                if( self->member_pool == NULL ) {
+                    rc = RC(rcSRA, rcFormatter, rcAllocating, rcMemory, rcExhausted);
+                } else {
+                    BSTreeInit(self->member_pool);
+                }
+            }
+            if( rc == 0 ) {
+                rc = BSTreeInsertUnique(self->member_pool, &member->node, NULL, PoolMember_Cmp);
+            }
+        }
+    }
+    if( rc == 0 ) {
+        uint32_t i;
+        for(i = 0; i <= self->reads->nreads + 1; i++) {
+            switch(self->reads->spec[i].coord_type) {
+                case rdsp_FIXED_BRACKET_ct:
+                    member->spec[i].start = self->reads->spec[i].coord.start_coord - 1;
+                    member->spec[i].length = (i == 0 ? 0 : -1);
+                    break;
+                case rdsp_RelativeOrder_ct:
+                    member->spec[i].start = -1;
+                    member->spec[i].length = -1;
+                    break;
+
+                case rdsp_BaseCoord_ct:
+                case rdsp_CycleCoord_ct:
+                    member->spec[i].start = self->reads->spec[i].coord.start_coord - 1;
+                    member->spec[i].length = -1;
+                    break;
+
+                case rdsp_ExpectedBaseCall_ct:
+                    if( name == NULL || name[0] == '\0' ) {
+                        member->spec[i].start = self->reads->spec[i].coord.expected_basecalls.base_coord;
+                        member->spec[i].length = self->reads->spec[i].coord.expected_basecalls.default_length;
+                    }
+                    if( member->spec[i].start == 0 ) {
+                        member->spec[i].start = -1;
+                    }
+                    member->spec[i].item[0] = self->reads->spec[i].coord.expected_basecalls.table;
+                    if( member->spec[i].length == 0 ) {
+                        member->spec[i].length = strlen(member->spec[i].item[0]->basecall);
+                    }
+                    break;
+
+                case rdsp_ExpectedBaseCallTable_ct:
+                    if( name == NULL || name[0] == '\0' ) {
+                        member->spec[i].start = self->reads->spec[i].coord.expected_basecalls.base_coord;
+                        member->spec[i].length = self->reads->spec[i].coord.expected_basecalls.default_length;
+                    }
+                    if( member->spec[i].start == 0 ) {
+                        member->spec[i].start = -1;
+                    }
+                    if( member->spec[i].length == 0 ) {
+                        member->spec[i].length = (!self->reads->spec[i].coord.expected_basecalls.pooled || name == NULL) ? -1 : 0;
+                    }
+                    break;
+            }
+        }
+    } else {
+        PoolMember_Whack(&member->node, NULL);
+    }
+    return rc;
+}
+
+static
+rc_t PoolMember_AddBasecalls(const ExperimentXML* self, const char* member, int readid, const ReadSpecXML_read_BASECALL* basecalls[])
+{
+    rc_t rc = 0;
+
+    if( self == NULL || basecalls == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcParam, rcNull);
+    } else if( self->reads->reads[readid].coord_type != rdsp_ExpectedBaseCallTable_ct ) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcId, rcIncorrect);
+    } else {
+        PoolMember* pm = (PoolMember*)BSTreeFind(self->member_pool, member, PoolMember_FindByName);
+        if( pm == NULL ) {
+            rc = RC(rcSRA, rcFormatter, rcResolving, rcData, rcNotFound);
+            PLOGERR(klogErr, (klogErr, rc, "MEMBER '$(m)'", PLOG_S(m), member));
+        } else {
+            int k = -1, i = -1;
+            while( pm->spec[readid + 1].item[++k] != NULL );
+            while( rc == 0 && basecalls[++i] != NULL ) {
+                if( k >= MAX_POOL_MEMBER_BASECALLS ) {
+                    rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcTooLong);
+                    PLOGERR(klogErr, (klogErr, rc, "MEMBER '$(m)' basecalls", PLOG_S(m), member));
+                } else {
+                    pm->spec[readid + 1].item[k++] = basecalls[i];
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t parse_POOL(const KXMLNode* EXPERIMENT, ExperimentXML* obj)
+{
+    rc_t rc = 0;
+
+    /* create unspecified member -> NULL */
+    if( (rc = PoolMember_Add(obj, NULL)) == 0 ) {
+        const KXMLNodeset* MEMBERS;
+        if( (rc = KXMLNodeOpenNodesetRead(EXPERIMENT, &MEMBERS, "DESIGN/SAMPLE_DESCRIPTOR/POOL/MEMBER")) == 0 ) {
+            uint32_t i, num_members = 0;
+            if( (rc = KXMLNodesetCount(MEMBERS, &num_members)) == 0 && num_members > 0 ) {
+                /* create default member -> '' */
+                rc = PoolMember_Add(obj, "");
+                for(i = 0; rc == 0 && i < num_members; i++) {
+                    const KXMLNode* MEMBER;
+                    if( (rc = KXMLNodesetGetNodeRead(MEMBERS, &MEMBER, i)) == 0 ) {
+                        char* member_name = NULL;
+                        if( (rc = KXMLNodeReadAttrCStr(MEMBER, "member_name", &member_name, NULL)) == 0 ) {
+                            const KXMLNodeset* LABELS;
+                            if( strcasecmp(member_name, "default") == 0 ) {
+                                member_name[0] = '\0';
+                            }
+                            if( member_name[0] != '\0' ) {
+                                if( (rc = PoolMember_Add(obj, member_name)) != 0 ) {
+                                    PLOGERR(klogErr, (klogErr, rc, "MEMBER '$(m)'", PLOG_S(m), member_name));
+                                }
+                            }
+                            if( rc == 0 && (rc = KXMLNodeOpenNodesetRead(MEMBER, &LABELS, "READ_LABEL")) == 0 ) {
+                                uint32_t l, num_labels = 0;
+                                KXMLNodesetCount(LABELS, &num_labels);
+                                if( num_labels > 0 ) {
+                                    const ReadSpecXML_read_BASECALL* basecalls[MAX_POOL_MEMBER_BASECALLS];
+                                    for(l = 0; rc == 0 && l < num_labels; l++) {
+                                        const KXMLNode* LABEL;
+                                        if( (rc = KXMLNodesetGetNodeRead(LABELS, &LABEL, l)) == 0 ) {
+                                            char* label = NULL, *tag = NULL;
+                                            if( (rc = KXMLNodeReadCStr(LABEL, &label, NULL)) != 0 || label == NULL || label[0] == '\0' ) {
+                                                rc = rc ? rc : RC(rcSRA, rcFormatter, rcConstructing, rcData, rcEmpty);
+                                                PLOGERR(klogErr, (klogErr, rc, "MEMBER '$(m)' READ_LABEL value", PLOG_S(m), member_name));
+                                            } else {
+                                                if( (rc = KXMLNodeReadAttrCStr(LABEL, "read_group_tag", &tag, NULL)) != 0 ) {
+                                                    if( GetRCState(rc) != rcNotFound ) {
+                                                        PLOGERR(klogErr, (klogErr, rc, "MEMBER '$(m)' READ_LABEL '$(l)' 'read_group_tag' attribute",
+                                                                                        PLOG_2(PLOG_S(m),PLOG_S(l)), member_name, label));
+                                                    } else {
+                                                        rc = 0;
+                                                    }
+                                                } else if( tag != NULL && tag[0] == '\0' )  {
+                                                    rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcEmpty);
+                                                    PLOGERR(klogErr, (klogErr, rc, "MEMBER '$(m)' READ_LABEL '$(l)' 'read_group_tag' attribute",
+                                                                                   PLOG_2(PLOG_S(m),PLOG_S(l)), member_name, label));
+                                                }
+                                                if( rc == 0 ) {
+                                                    /* find read_spec based on label and update basecall table */
+                                                    uint32_t r, read_found = 0;
+                                                    for(r = 0; rc == 0 && r < obj->reads->nreads; r++) {
+                                                        if( obj->reads->reads[r].read_label != NULL && strcmp(label, obj->reads->reads[r].read_label) == 0 ) {
+                                                            read_found++;
+                                                            if( tag != NULL && tag[0] != '\0' ) {
+                                                                if( obj->reads->reads[r].coord_type != rdsp_ExpectedBaseCallTable_ct ) {
+                                                                    rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcInconsistent);
+                                                                    PLOGERR(klogErr, (klogErr, rc,
+                                                                            "MEMBER '$(m)' READ_LABEL '$(l)' READ_SPEC must have EXPECTED_BASECALL_TABLE type",
+                                                                            PLOG_2(PLOG_S(m),PLOG_S(l)), member_name, label));
+                                                                } else {
+                                                                    uint32_t b, bcall_found = 0;
+                                                                    memset(basecalls, 0, sizeof(basecalls));
+                                                                    /* find tag in table */
+                                                                    for(b = 0; rc == 0 && b < obj->reads->reads[r].coord.expected_basecalls.count; b++) {
+                                                                        if( obj->reads->reads[r].coord.expected_basecalls.table[b].read_group_tag != NULL &&
+                                                                            strcmp(tag, obj->reads->reads[r].coord.expected_basecalls.table[b].read_group_tag) == 0 ) {
+                                                                            if( bcall_found >= MAX_POOL_MEMBER_BASECALLS ) {
+                                                                                rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcExcessive);
+                                                                                PLOGERR(klogErr, (klogErr, rc,
+                                                                                        "MEMBER '$(m)' READ_LABEL '$(l)' read_group_tag='$(t)' too many basecalls",
+                                                                                         PLOG_3(PLOG_S(m),PLOG_S(l),PLOG_S(t)), member_name, label, tag));
+                                                                            }
+                                                                            basecalls[bcall_found++] = &obj->reads->reads[r].coord.expected_basecalls.table[b];
+                                                                        }
+                                                                    }
+                                                                    if( rc == 0 && bcall_found == 0 ) {
+                                                                        rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcNotFound);
+                                                                        PLOGERR(klogErr, (klogErr, rc, "MEMBER '$(m)' READ_LABEL '$(l)' read_group_tag='$(t)' in READ_SPEC",
+                                                                                 PLOG_3(PLOG_S(m),PLOG_S(l),PLOG_S(t)), member_name, label, tag));
+                                                                    } else {
+                                                                        rc = PoolMember_AddBasecalls(obj, member_name, r, basecalls);
+                                                                    }
+                                                                }
+                                                            }
+                                                        }
+                                                    }
+                                                    if( read_found == 0 ) {
+                                                        rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcNotFound);
+                                                        PLOGERR(klogErr, (klogErr, rc, "MEMBER '$(m)' READ_LABEL '$(l)' in READ_SPEC", PLOG_2(PLOG_S(l),PLOG_S(m)), label, member_name));
+                                                    } else if( read_found > 1 ) {
+                                                        rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcInconsistent);
+                                                        PLOGERR(klogErr, (klogErr, rc, "MEMBER '$(m)' READ_LABEL '$(l)' in READ_SPEC", PLOG_2(PLOG_S(l),PLOG_S(m)), label, member_name));
+                                                    }
+                                                }
+                                            }
+                                            free(tag);
+                                            free(label);
+                                            KXMLNodeRelease(LABEL);
+                                        } else {
+                                            PLOGERR(klogErr, (klogErr, rc, "MEMBER '$(m)' READ_LABEL #$(i)", PLOG_2(PLOG_S(m),PLOG_U32(i)), member_name, l));
+                                        }
+                                    }
+                                } else {
+                                    rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcInvalid);
+                                    PLOGERR(klogErr, (klogErr, rc, "missing READ_LABEL element(s) in MEMBER '$(m)'", PLOG_S(m), member_name));
+                                }
+                                KXMLNodesetRelease(LABELS);
+                            }
+                            free(member_name);
+                        } else {
+                            PLOGERR(klogErr, (klogErr, rc, "'member_name' in MEMBER node #$(i)", PLOG_U32(i), i));
+                        }
+                        KXMLNodeRelease(MEMBER);
+                    } else {
+                        PLOGERR(klogErr, (klogErr, rc, "MEMBER node #$(i)", PLOG_U32(i), i));
+                    }
+                }
+            } else if( rc != 0 ) {
+                LOGERR(klogErr, rc, "POOL/MEMBER(s)");
+            }
+            KXMLNodesetRelease(MEMBERS);
+        } else {
+            LOGERR(klogErr, rc, "POOL/MEMBER(s)");
+        }
+    }
+#if _DEBUGGING
+    PoolMember_Dump(&obj->member_null->node, obj);
+    BSTreeForEach(obj->member_pool, false, PoolMember_Dump, obj);
+#endif
+    return rc;
+}
+
+typedef struct ExpectedTableMatch_struct {
+    /* in */
+    const char* seq;
+    uint32_t len;
+    const char* tag;
+    enum {
+        etm_Forward = 1,
+        etm_Reverse,
+        etm_Both
+    } direction;
+    bool left_adjusted;
+    /* out */
+    AgrepMatch match;
+    ReadSpecXML_read_BASECALL* bc;
+} ExpectedTableMatch;
+
+static
+bool Experiment_ExpectedTableMatch(const ReadSpecXML_read_BASECALL_TABLE* table, ExpectedTableMatch* data)
+{
+    uint32_t i;
+
+    assert(table && data && data->seq );
+
+    data->match.score = -1;
+    for(i = 0; i < table->count; i++) {
+        AgrepMatch match;
+        ReadSpecXML_read_BASECALL* bc = &table->table[i];
+
+        if( data->tag != NULL && strcmp(data->tag, bc->read_group_tag) != 0 ) {
+            continue;
+        }
+        if( data->direction != etm_Both ) {
+            if( bc->match_edge == match_edge_End ) {
+                if( data->direction == etm_Forward ) {
+                    continue;
+                }
+            } else if( data->direction != etm_Forward ) {
+                continue;
+            }
+        }
+        match.score = -1;
+        if( data->left_adjusted ) {
+            if( AgrepFindFirst(bc->agrep, bc->max_mismatch, data->seq, data->len, &match) ) {
+                if( data->direction == etm_Reverse ) {
+                    int32_t right_tail = data->len - match.position - strlen(bc->basecall);
+                    if( right_tail > bc->max_mismatch - match.score ) {
+                        match.score = -1;
+                    } else if( match.position > 0 ) {
+                        match.score += right_tail;
+                        match.length += right_tail;
+                        match.position = 0;
+                    }
+                } else {
+                    if( match.position > bc->max_mismatch - match.score ) {
+                        match.score = -1;
+                    } else if( match.position > 0 ) {
+                        match.score += match.position;
+                        match.length += match.position;
+                        match.position = 0;
+                    }
+                }
+            }
+        } else {
+            AgrepFindBest(bc->agrep, bc->max_mismatch, data->seq, data->len, &match);
+        }
+        if( !(match.score < 0) ) {
+            DEBUG_MSG(3, ("agrep match bc %s, min: %u, max: %u, edge: %s%s, [%d:%d] score %d\n", bc->basecall, bc->min_match, bc->max_mismatch,
+                       bc->match_edge == match_edge_Full ? "Full" : (bc->match_edge == match_edge_Start ? "Start" : "End"),
+                       data->left_adjusted ? " left adjusted" : "",
+                       match.position, match.length, match.score));
+            if( (data->match.score < 0 || data->match.score > match.score) ) {
+                memcpy(&data->match, &match, sizeof(data->match));
+                data->bc = bc;
+            }
+        }
+    }
+    return !(data->match.score < 0);
+}
+
+static
+rc_t Experiment_FillRead(const ReadSpecXML_read* spec, PoolReadSpec* pool,
+                         const char** tag, const uint32_t nreads, int16_t start, const char* bases, uint32_t nbases)
+{
+    rc_t rc = 0;
+
+    switch(spec->coord_type) {
+        case rdsp_RelativeOrder_ct:
+            if( pool[-1].length >= 0 ) {
+                if( pool[-1].start >= 0 ) {
+                    pool->start = pool[-1].start + pool[-1].length;
+                } else {
+                    pool->start = start;
+                }
+            } else {
+                pool->start = -1;
+            }
+            pool->length = -1;
+            if( nreads > 1 ) {
+                if( (rc = Experiment_FillRead(spec + 1, pool + 1, tag + 1, nreads - 1, start, bases, nbases)) != 0 ) {
+                    break;
+                }
+            }
+            if( pool->start < 0 ) {
+                pool->start = pool[1].start;
+            }
+            pool->length = pool[1].start - pool->start;
+            break;
+
+        case rdsp_BaseCoord_ct:
+        case rdsp_CycleCoord_ct:
+            pool->start = spec->coord.start_coord - 1;
+            pool->length = -1;
+            if( nreads > 1 ) {
+                if( (rc = Experiment_FillRead(spec + 1, pool + 1, tag + 1, nreads - 1, pool->start, bases, nbases)) != 0 ) {
+                    break;
+                }
+            }
+            pool->length = pool[1].start - pool->start;
+            break;
+
+        case rdsp_ExpectedBaseCall_ct:
+        case rdsp_ExpectedBaseCallTable_ct:
+            {{
+            int32_t gap;
+            if( spec->coord.expected_basecalls.base_coord > 0 ) {
+                pool->start = spec->coord.expected_basecalls.base_coord - 1;
+                start = pool->start;
+            } else {
+                pool->start = -1;
+            }
+            pool->length = -1;
+            pool->item[0] = NULL;
+            pool->score = -1;
+            if( spec->coord.expected_basecalls.match_start > 0 ) {
+                uint32_t i, stop = nbases;
+                ExpectedTableMatch data;
+                /* find terminator, if any */
+                for(i = 1; i < nreads; i++) {
+                    if( spec[i].coord_type == rdsp_BaseCoord_ct ||
+                        spec[i].coord_type == rdsp_CycleCoord_ct ||
+                        spec[i].coord_type == rdsp_FIXED_BRACKET_ct ) {
+                        stop = spec[i].coord.start_coord - 1;
+                        break;
+                    }
+                }
+                data.seq = &bases[start];
+                data.len = stop - start;
+                data.tag = *tag;
+                data.direction = etm_Forward;
+                data.left_adjusted = !(pool->start < 0) || !(pool[-1].length < 0);
+                DEBUG_MSG(3, ("agrep find read %u fwd in: '%.*s' = %u\n", nreads, data.len, data.seq, data.len));
+                if( Experiment_ExpectedTableMatch(&spec->coord.expected_basecalls, &data) ) {
+                    DEBUG_MSG(3, ("agrep found from %hd match %d:%d - %d '%s' in '%.*s...' \n",
+                                   start, data.match.position, data.match.length,
+                                   data.match.score, data.bc->basecall,
+                                   start + data.match.position + data.match.length * 3 + data.match.score, &bases[start]));
+                    pool->start = start + data.match.position;
+                    pool->length = data.match.length;
+                    pool->item[0] = data.bc;
+                    pool->score = data.match.score;
+                    start = pool->start + pool->length;
+                } else {
+                    DEBUG_MSG(3, ("agrep nothing found\n"));
+                }
+            }
+            if( pool[-1].length >= 0 && pool->length < 0 && spec->coord.expected_basecalls.match_end == 0 ) {
+                pool->length = spec->coord.expected_basecalls.default_length;
+                start += pool->length;
+            }
+            if( nreads > 1 ) {
+                if( (rc = Experiment_FillRead(spec + 1, pool + 1, tag + 1, nreads - 1, start, bases, nbases)) != 0 ) {
+                    break;
+                }
+            }
+            if( spec->coord.expected_basecalls.match_end > 0 ) {
+                /* match_end can have a better match even if match_start found smth before
+                   normally table has start or end match edge, not both */
+                char r[4096];
+                uint32_t i;
+                ExpectedTableMatch data;
+                
+                data.len = pool[1].start - start;
+                DEBUG_MSG(3, ("agrep find read %u rev in: '%.*s' = %u\n", nreads, data.len, &bases[start], data.len));
+                if( data.len > sizeof(r) ) {
+                    rc = RC(rcSRA, rcFormatter, rcResolving, rcBuffer, rcInsufficient);
+                    break;
+                }
+                for(i = 0; i < data.len; i++) {
+                    /* reverse a portion of seq */
+                    r[i] = bases[pool[1].start - i - 1];
+                }
+                data.seq = r;
+                data.tag = *tag;
+                data.direction = etm_Reverse;
+                data.left_adjusted = spec[1].coord_type != rdsp_RelativeOrder_ct && pool[1].start > 0;
+                DEBUG_MSG(3, ("agrep find read %u rev in: '%.*s' = %u\n", nreads, data.len, data.seq, data.len));
+                if( Experiment_ExpectedTableMatch(&spec->coord.expected_basecalls, &data) ) {
+                    DEBUG_MSG(3, ("agrep found rev from %hd match %d:%d - %d '%s' in '%.*s' \n",
+                                    start, data.match.position, data.match.length, data.match.score,
+                                    data.bc->basecall, data.len, &bases[pool[1].start - data.len]));
+                    if( pool->length < 0 || data.match.score < pool->score ) {
+                        pool->start = pool[1].start - data.match.position - data.match.length;
+                        pool->length = data.match.length;
+                        pool->item[0] = data.bc;
+                        pool->score = data.match.score;
+                    }
+                } else {
+                    DEBUG_MSG(3, ("agrep nothing found rev\n"));
+                }
+            }
+            if( pool->length < 0 ) {
+                pool->length = spec->coord.expected_basecalls.default_length;
+            }
+            if( pool->start < 0 ) {
+                pool->start = pool[1].start - pool->length;
+            }
+            gap = pool[1].start - (pool->start + pool->length);
+            if( gap > 0 ) {
+                /* right gap */
+                if( spec[1].coord_type == rdsp_RelativeOrder_ct ) {
+                    /* adjust right read's start to the tail of current read */
+                    pool[1].start -= gap;
+                    pool[1].length += gap;
+                    gap = 0;
+                } else if( spec[1].coord_type >= rdsp_ExpectedBaseCall_ct &&
+                    spec[1].coord.expected_basecalls.base_coord <= 0 && pool[1].item[0] != NULL ) {
+                    /* move left read's start to left as much as possible */
+                    int32_t left = pool[1].item[0]->max_mismatch - pool[1].score;
+                    if( left > 0 ) {
+                        if( left > gap ) {
+                            left = gap;
+                        }
+                        pool[1].length += left;
+                        pool[1].score += left;
+                        pool[1].start -= left;
+                        gap -= left;
+                    }
+                }
+                if( gap > 0 && pool->item[0] != NULL ) {
+                    /* add gap to end of self */
+                    int32_t left = pool->item[0]->max_mismatch - pool->score;
+                    if( left > 0 ) {
+                        if( left > gap ) {
+                            left = gap;
+                        }
+                        pool->length += left;
+                        pool->score += left;
+                    }
+                }
+            }
+            break;
+            }}
+        default:
+            rc = RC(rcSRA, rcFormatter, rcResolving, rcItem, rcUnexpected);
+            break;
+    }
+    return rc;
+}
+
+typedef struct PoolMember_FindReverse_Data_struct {
+    const char* tags[MAX_SPOT_DESCRIPTOR_READS];
+    uint8_t nreads;
+    const PoolMember* member;
+} PoolMember_FindReverse_Data;
+
+static
+bool CC PoolMember_FindReverse(BSTNode* n, void* d)
+{
+    const PoolMember* node = (const PoolMember*)n;
+    PoolMember_FindReverse_Data* data = (PoolMember_FindReverse_Data*)d;
+    int r, j, found;
+
+    for(r = 1; r <= data->nreads; r++) {
+        /* comparing pointers here because tags contains same pointers */
+        if( node->spec[r].item[0] == NULL && data->tags[r] == NULL ) {
+            continue;
+        }
+        found = 0;
+        for(j = 0; node->spec[r].item[j] != NULL; j++ ) {
+            if( node->spec[r].item[j]->read_group_tag == data->tags[r] ) {
+                found = 1;
+                break;
+            }
+        }
+        if( found == 0 ) {
+            return false;
+        }
+    }
+    data->member = node;
+    return true;
+}
+
+static
+rc_t Experiment_FillSegAgrep(const ExperimentXML* self, PoolReadSpec* pool, const PoolMember* src,
+                             uint32_t nbases, const char* bases,
+                             const char** const new_member_name)
+{
+    rc_t rc = 0;
+    uint32_t i;
+    PoolMember_FindReverse_Data data;
+
+    /* close left and right brackets tech reads as spot terminators */
+    pool[0].start = 0;
+    pool[0].length = 0;
+    pool[self->reads->nreads + 1].start = nbases;
+    pool[self->reads->nreads + 1].length = 0;
+
+    /* setup known tags if it is predefined member search */
+    for(i = 0; i <= self->reads->nreads + 1; i++) {
+        data.tags[i] = src->spec[i].item[0] ? src->spec[i].item[0]->read_group_tag : NULL;
+    }
+    /* start from read, not bracket read */
+    rc = Experiment_FillRead(self->reads->reads, &pool[1], &data.tags[1], self->reads->nreads, 0, bases, nbases);
+
+    if( rc != 0 ) {
+        DEBUG_MSG(3, ("ERROR: %R\n", rc));
+    }
+    DEBUG_MSG(3, ("%s: bases %u: '%.*s'\n", new_member_name ? *new_member_name : NULL, nbases, nbases, bases));
+    for(i = 1; i <= self->reads->nreads; i++) {
+        const char* b = NULL;
+        if( pool[i].start >= 0 ) {
+            b = &bases[pool[i].start];
+        }
+        DEBUG_MSG(3, ("Read %u. [%hd:%hd] - '%.*s'",
+                       i, pool[i].start, pool[i].length, pool[i].length < 0 ? 0 : pool[i].length, b));
+        if( self->reads->spec[i].coord_type == rdsp_FIXED_BRACKET_ct ) {
+            DEBUG_MSG(3, (" terminator???"));
+        }
+        if( self->reads->spec[i].coord_type >= rdsp_ExpectedBaseCall_ct ) {
+            if( pool[i].item[0] ) {
+                if( pool[i].item[0]->match_edge == match_edge_End ) {
+                    DEBUG_MSG(3, (" in reverse"));
+                }
+                DEBUG_MSG(3, (" matches %s", pool[i].item[0]->basecall));
+                if( pool[i].item[0]->read_group_tag ) {
+                    DEBUG_MSG(3, (" tagged %s", pool[i].item[0]->read_group_tag));
+                }
+                DEBUG_MSG(3, (" with %d mismatches", pool[i].score));
+            } else {
+                DEBUG_MSG(3, (" no match"));
+            }
+        }
+        DEBUG_MSG(3, ("\n"));
+    }
+
+    if( rc == 0 && new_member_name != NULL ) {
+        data.nreads = self->reads->nreads;
+        data.member = NULL;
+        for(i = 1; i <= self->reads->nreads; i++) {
+            if( self->reads->spec[i].coord_type == rdsp_ExpectedBaseCallTable_ct && pool[i].item[0] != NULL ) {
+                data.tags[i] = pool[i].item[0]->read_group_tag;
+            } else {
+                data.tags[i] = NULL;
+            }
+        }
+        if( BSTreeDoUntil(self->member_pool, false, PoolMember_FindReverse, &data) ) {
+            *new_member_name = data.member->name;
+            DEBUG_MSG(2, ("Assigned member_name '%s'\n", *new_member_name));
+        } else {
+#if _DEBUGGING
+            DEBUG_MSG(2, ("member_name reverse lookup failed for tags:"));
+            for(i = 1; i <= self->reads->nreads; i++) {
+                DEBUG_MSG(2, (" '%s'", data.tags[i]));
+            }
+            DEBUG_MSG(2, ("\n"));
+#endif
+        }
+    }
+    return rc;
+}
+
+rc_t Experiment_MemberSeg(const ExperimentXML* self,
+                          const char* const file_member_name, const char* const data_block_member_name,
+                          uint32_t nbases, const char* bases,
+                          SRASegment* seg, const char** const new_member_name)
+{
+    rc_t rc = 0;
+    uint32_t i;
+    PoolReadSpec pool[MAX_SPOT_DESCRIPTOR_READS];
+
+    if( self == NULL || bases == NULL || seg == NULL || new_member_name == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcResolving, rcParam, rcNull);
+    } else if( nbases < 1 ) {
+        rc = RC(rcSRA, rcFormatter, rcResolving, rcData, rcEmpty);
+    }
+
+    if( rc == 0 ) {
+        const char* mm = NULL;
+        switch(self->processing.barcode_rule) {
+            case eBarcodeRule_not_set:
+                mm = data_block_member_name ? data_block_member_name : file_member_name;
+                break;
+
+            case eBarcodeRule_use_file_spot_name:
+                mm = file_member_name;
+                break;
+
+            case eBarcodeRule_use_table_in_experiment:
+            case eBarcodeRule_ignore_barcode:
+                mm = NULL;
+                break;
+        }
+        if( self->member_pool == NULL || self->processing.barcode_rule == eBarcodeRule_ignore_barcode ) {
+            if( (rc = Experiment_FillSegAgrep(self, pool, self->member_null, nbases, bases, NULL)) == 0 ) {
+                *new_member_name = mm;
+            }
+        } else if( mm == NULL ) {
+            *new_member_name = NULL;
+	    rc = Experiment_FillSegAgrep(self, pool, self->member_null, nbases, bases, new_member_name);
+        } else {
+            PoolMember* pm = (PoolMember*)BSTreeFind(self->member_pool, mm, PoolMember_FindByName);
+            if( pm == NULL ) {
+                rc = RC(rcSRA, rcFormatter, rcResolving, rcData, rcNotFound);
+                PLOGERR(klogErr, (klogErr, rc, "specified member_name '$(m)'", PLOG_S(m), mm));
+            } else {
+                if( (rc = Experiment_FillSegAgrep(self, pool, pm, nbases, bases, NULL)) == 0 ) {
+                    *new_member_name = mm;
+                }
+            }
+        }
+    }
+
+    if( rc == 0 ) {
+        int32_t new_bases = 0;
+
+        for(i = 1; i <= self->reads->nreads; i++) {
+            if( pool[i].start < 0 || pool[i].length < 0 ) {
+                rc = RC(rcSRA, rcFormatter, rcResolving, rcData, rcIncomplete);
+                PLOGERR(klogErr, (klogErr, rc, "Read #$(i) boundaries", PLOG_U32(i), i));
+            } else if( i == 1 ) {
+                if( pool[i].start != 0 ) {
+                    rc = RC(rcSRA, rcFormatter, rcResolving, rcData, rcInvalid);
+                    PLOGERR(klogErr, (klogErr, rc, "Read #$(i) do not start at 0", PLOG_U32(i), i));
+                }
+            } else {
+                int16_t delta = pool[i].start - pool[i - 1].length - pool[i - 1].start;
+                /* try to close gap by failng back to default length IF:
+                   prev read was EXPECTED_BASECALL OR
+                                 EXPECTED_BASECALL_TABLE and there an BASECALL chosen
+                   AND
+                    defailt_length != 0 (was set)
+                   */
+                if( delta != 0 &&
+                    (self->reads->spec[i - 1].coord_type == rdsp_ExpectedBaseCall_ct ||
+                     (self->reads->spec[i - 1].coord_type == rdsp_ExpectedBaseCallTable_ct && pool[i - 1].item[0] != NULL)) &&
+                    self->reads->spec[i - 1].coord.expected_basecalls.default_length > 0 ) {
+                    new_bases -= pool[i - 1].length;
+                    pool[i - 1].length = self->reads->spec[i - 1].coord.expected_basecalls.default_length;
+                    DEBUG_MSG(2, ("trying to close delta %hi for read %u: length reset default %hi\n", delta, i - 1, pool[i - 1].length));
+                    if( pool[i - 1].item[0] != NULL  && pool[i - 1].item[0]->read_group_tag != NULL ) {
+                        DEBUG_MSG(2, ("member_name '%s' reset to ''\n", *new_member_name));
+                        *new_member_name = NULL;
+                    }
+                    delta = pool[i].start - pool[i - 1].length - pool[i - 1].start;
+                    new_bases += pool[i - 1].length;
+                    seg[i - 2].len = pool[i - 1].length;
+                }
+                if( delta > 0 ) {
+                    rc = RC(rcSRA, rcFormatter, rcResolving, rcData, rcInconsistent);
+                    PLOGERR(klogErr, (klogErr, rc, "Gap between reads #$(p) and #$(i)", PLOG_2(PLOG_U32(p),PLOG_U32(i)), i - 1, i));
+                } else if( delta < 0 ) {
+                    rc = RC(rcSRA, rcFormatter, rcResolving, rcData, rcInconsistent);
+                    PLOGERR(klogErr, (klogErr, rc, "Reads #$(p) and #$(i) overlap", PLOG_2(PLOG_U32(p),PLOG_U32(i)), i - 1, i));
+                }
+            }
+            seg[i - 1].start = pool[i].start;
+            seg[i - 1].len = pool[i].length;
+            new_bases += pool[i].length;
+        }
+        if( rc == 0 && (new_bases < 0 || nbases != new_bases) ) {
+            rc = RC(rcSRA, rcFormatter, rcResolving, rcData, rcInconsistent);
+            PLOGERR(klogErr, (klogErr, rc, "total read length $(c)", PLOG_U32(c), new_bases));
+        }
+        if( rc != 0 ) {
+            char err_buf[8192], *p = err_buf;
+            size_t max = sizeof(err_buf);
+
+            for(i = 1; i <= self->reads->nreads; i++) {
+                int x = snprintf(p, max, "[%hd:%d, len = %hd", pool[i].start, pool[i].start + pool[i].length, pool[i].length);
+                if( x > 0 && x < max ) {
+                    max -= x;
+                    p += x;
+                    if( self->reads->spec[i].coord_type == rdsp_ExpectedBaseCallTable_ct ) {
+                        if( pool[i].item[0] != NULL ) {
+                            if( pool[i].item[0]->read_group_tag != NULL ) {
+                                x = snprintf(p, max, ", matched tag '%s', mismatches %d]", pool[i].item[0]->read_group_tag, pool[i].score);
+                            } else {
+                                x = snprintf(p, max, ", mismatches %d]", pool[i].score);
+                            }
+                        } else {
+                            x = snprintf(p, max, ", no match]");
+                        }
+                    } else {
+                        x = snprintf(p, max, "]");
+                    }
+                }
+                if( x <= 0 || x >= max ) {
+                    max = strlen(err_buf);
+                    err_buf[max - 4] = '\0';
+                    strcat(err_buf, "... ");
+                    break;
+                }
+                max -= x;
+                p += x;
+            }
+            PLOGMSG(klogErr, (klogErr, "segments: $(seg) spot length actual: $(actual), calculated $(calc)",
+                "seg=%s,actual=%u,calc=%d", err_buf, nbases, new_bases));
+        }
+    }
+    return rc;
+}
+
+rc_t Experiment_MemberSegSimple(const ExperimentXML* self,
+                                const char* const file_member_name, const char* const data_block_member_name,
+                                const char** const new_member_name)
+{
+    rc_t rc = 0;
+    if( self == NULL || new_member_name == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcResolving, rcParam, rcNull);
+    } else {
+        switch(self->processing.barcode_rule) {
+            case eBarcodeRule_not_set:
+                *new_member_name = data_block_member_name ? data_block_member_name : file_member_name;
+                break;
+
+            case eBarcodeRule_use_file_spot_name:
+                *new_member_name = file_member_name;
+                break;
+
+            case eBarcodeRule_use_table_in_experiment:
+            case eBarcodeRule_ignore_barcode:
+                *new_member_name = NULL;
+                break;
+        }
+    }
+    return rc;
+}
+
+static
+rc_t Experiment_Apply_RUN_ATTRIBUTES(const ExperimentXML* cself, RunAttributes* attr, uint32_t spot_length)
+{
+    rc_t rc = 0;
+
+    if( cself == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcEvaluating, rcSelf, rcNull);
+    } else if( attr != NULL ) {
+        ExperimentXML* obj = (ExperimentXML*)cself;
+
+        obj->processing.barcode_rule = attr->barcode_rule;
+        if( attr->quality_offset != '\0' ) {
+            obj->processing.quality_offset = attr->quality_offset;
+        }
+        if( attr->quality_type != eExperimentQualityType_Undefined ) {
+            obj->processing.quality_type = attr->quality_type;
+        }
+        obj->spot_length = attr->spot_length ? attr->spot_length : spot_length;
+        if( obj->spot_length == 0 &&
+            (obj->platform->id == SRA_PLATFORM_ILLUMINA || obj->platform->id == SRA_PLATFORM_ABSOLID) ) {
+            PLOGMSG(klogWarn, (klogWarn,
+                "SPOT_LENGTH is not found or specified as $(l)", PLOG_U32(l), obj->spot_length));
+        }
+    }
+    return rc;
+}
+
+rc_t Experiment_Make(const ExperimentXML** self, const KXMLDoc* doc, RunAttributes* attr)
+{
+    rc_t rc = 0;
+    ExperimentXML* obj = NULL;
+    const KXMLNodeset* ns = NULL;
+    uint32_t p_spot_length = 0, r_spot_length = 0;
+
+    if( self == NULL || doc == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    obj = calloc(1, sizeof(*obj));
+    if( obj == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+    }
+    if( (rc = KXMLDocOpenNodesetRead(doc, &ns, "/EXPERIMENT_SET/EXPERIMENT | /EXPERIMENT")) == 0 ) {
+        uint32_t count = 0;
+        if( (rc = KXMLNodesetCount(ns, &count)) == 0 && count != 1 ) {
+            rc = RC(rcSRA, rcFormatter, rcConstructing, rcTag, count ? rcExcessive : rcNotFound);
+            LOGERR(klogErr, rc, "EXPERIMENT");
+        } else {
+            const KXMLNode* EXPERIMENT = NULL;
+            if( (rc = KXMLNodesetGetNodeRead(ns, &EXPERIMENT, 0)) == 0 ) {
+                if( (rc = PlatformXML_Make(&obj->platform, EXPERIMENT, &p_spot_length)) == 0 ) {
+                    if( attr->platform != NULL ) {
+                        if( obj->platform->id != attr->platform->id ) {
+                            rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcInconsistent);
+                            LOGERR(klogErr, rc, "EXPERIMENT and RUN platforms differ");
+                        } else {
+                            PlatformXML_Whack(obj->platform);
+                            obj->platform = attr->platform;
+                            /* take ownership */
+                            attr->platform = NULL;
+                        }
+                    }
+                    if( rc == 0 ) {
+                        if( attr->reads == NULL ) {
+                            if( (rc = ReadSpecXML_Make(&obj->reads, EXPERIMENT, "DESIGN/SPOT_DESCRIPTOR", &r_spot_length)) != 0 ) {
+                                LOGERR(klogErr, rc, "EXPERIMENT/.../READ_SPEC");
+                            }
+                        } else {
+                            obj->reads = attr->reads;
+                            /* take ownership */
+                            attr->reads = NULL;
+                        }
+                        if( rc == 0 && (rc = parse_POOL(EXPERIMENT, obj)) == 0 ) {
+                            rc = Experiment_Apply_RUN_ATTRIBUTES(obj, attr, r_spot_length ? r_spot_length : p_spot_length);
+                        }
+                        if( rc == 0 && p_spot_length != 0 && r_spot_length != 0 && p_spot_length != r_spot_length ) {
+                            PLOGMSG(klogWarn, (klogWarn,
+                                "in EXPERIMENT sequence length (cycle count) in PLATFORM $(p) differ"
+                                " from SPOT_LENGTH $(l) in SPOT_DECODE_SPEC",
+                                PLOG_2(PLOG_U32(p),PLOG_U32(l)), p_spot_length, r_spot_length));
+                        }
+                    }
+                } else {
+                    LOGERR(klogErr, rc, "EXPERIMENT/PLATFORM");
+                }
+                KXMLNodeRelease(EXPERIMENT);
+            }
+        }
+        KXMLNodesetRelease(ns);
+    }
+    if( rc != 0 ) {
+        *self = NULL;
+        Experiment_Whack(obj);
+    } else {
+        *self = obj;
+    }
+    return rc;
+}
+
+rc_t Experiment_GetPlatform(const ExperimentXML* cself, const PlatformXML** platform)
+{
+    rc_t rc = 0;
+    if( cself == NULL || platform == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcAccessing, rcParam, rcNull);
+    } else {
+        *platform = cself->platform;
+    }
+    return rc;
+}
+
+rc_t Experiment_GetProcessing(const ExperimentXML* cself, const ProcessingXML** processing)
+{
+    rc_t rc = 0;
+    if( cself == NULL || processing == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcAccessing, rcParam, rcNull);
+    } else {
+        *processing = &cself->processing;
+    }
+    return rc;
+}
+
+rc_t Experiment_GetReadNumber(const ExperimentXML* cself, uint8_t* nreads)
+{
+    rc_t rc = 0;
+    if( cself == NULL || nreads == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcAccessing, rcParam, rcNull);
+    } else {
+        *nreads = cself->reads->nreads;
+    }
+    return rc;
+}
+
+rc_t Experiment_GetSpotLength(const ExperimentXML* cself, uint32_t* spot_length)
+{
+    rc_t rc = 0;
+    if( cself == NULL || spot_length == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcAccessing, rcParam, rcNull);
+    } else {
+        *spot_length= cself->spot_length;
+    }
+    return rc;
+}
+
+rc_t Experiment_GetRead(const ExperimentXML* cself, uint8_t read_id, const ReadSpecXML_read** read_spec)
+{
+    rc_t rc = 0;
+    if( cself == NULL || read_spec == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcAccessing, rcParam, rcNull);
+    } else if( read_id >= cself->reads->nreads ) {
+        rc = RC(rcSRA, rcFormatter, rcAccessing, rcId, rcOutofrange);
+    } else {
+        *read_spec = &(cself->reads->reads[read_id]);
+    }
+    return rc;
+}
+
+typedef struct PoolMember_FindByTag_Data_struct {
+    /* in */
+    const char* tag;
+    uint8_t readid;
+    /* out */
+    const char* member_name;
+} PoolMember_FindByTag_Data;
+
+static
+bool CC PoolMember_FindByTag(BSTNode *node, void *data)
+{
+    PoolMember_FindByTag_Data* d = (PoolMember_FindByTag_Data*)data;
+    const PoolMember* n = (const PoolMember*)node;
+    int i = 0;
+
+    const ReadSpecXML_read_BASECALL* bc = n->spec[d->readid].item[i];
+    while( bc != NULL ) {
+        if( strcmp(bc->read_group_tag, d->tag) == 0 ) {
+            d->member_name = n->name;
+            return true;
+        }
+        bc = n->spec[d->readid].item[++i];
+    }
+    return false;
+}
+
+rc_t Experiment_FindReadInTable(const ExperimentXML* cself, uint8_t read_id, const char* key, const char** basecall, const char** member_name)
+{
+    rc_t rc = 0;
+    if( cself == NULL || key == NULL || (basecall == NULL && member_name == NULL) ) {
+        rc = RC(rcSRA, rcFormatter, rcAccessing, rcParam, rcNull);
+    } else if( read_id >= cself->reads->nreads ) {
+        rc = RC(rcSRA, rcFormatter, rcAccessing, rcId, rcOutofrange);
+    } else {
+        const ReadSpecXML_read* read_spec = &(cself->reads->reads[read_id++]);
+        if( read_spec->coord_type != rdsp_ExpectedBaseCallTable_ct ) {
+            rc = RC(rcSRA, rcFormatter, rcAccessing, rcName, rcNotFound);
+        } else {
+            ExpectedTableMatch match;
+
+            rc = RC(rcSRA, rcFormatter, rcAccessing, rcName, rcNotFound);
+            /* try to find key as basecall */
+            match.seq = key;
+            match.len = strlen(key);
+            match.tag = NULL;
+            match.direction = etm_Both;
+            match.left_adjusted = true;
+            if( Experiment_ExpectedTableMatch(&read_spec->coord.expected_basecalls, &match) ) {
+                rc = 0;
+                if( basecall != NULL ) {
+                    *basecall = match.bc->basecall;
+                }
+                if( member_name != NULL ) {
+                    if( cself->member_pool != NULL ) {
+                        PoolMember_FindByTag_Data data;
+                        data.readid = read_id;
+                        data.tag = match.bc->read_group_tag;
+                        if( BSTreeDoUntil(cself->member_pool, false, PoolMember_FindByTag, &data) ) {
+                            *member_name = data.member_name;
+                        } else {
+                            rc = RC(rcSRA, rcFormatter, rcAccessing, rcSelf, rcCorrupt);
+                        }
+                    } else {
+                        *member_name = NULL;
+                    }
+                }
+            } else if( cself->member_pool != NULL ) {
+                /* try to find key as member_name */
+                PoolMember* pm = (PoolMember*)BSTreeFind(cself->member_pool, key, PoolMember_FindByName);
+                if( pm != NULL ) {
+                    rc = 0;
+                    if( member_name != NULL ) {
+                        *member_name = pm->name;
+                    }
+                    if( basecall != NULL ) {
+                        if( pm->spec[read_id].item[0] != NULL ) {
+                            *basecall = pm->spec[read_id].item[0]->basecall;
+                            if( pm->spec[read_id].item[1] != NULL ) {
+                                rc = RC(rcSRA, rcFormatter, rcAccessing, rcData, rcAmbiguous);
+                            }
+                        } else {
+                            rc = RC(rcSRA, rcFormatter, rcAccessing, rcData, rcViolated);
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t Experiment_HasPool(const ExperimentXML* cself, bool* has_pool)
+{
+    rc_t rc = 0;
+    if( cself == NULL || has_pool == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcAccessing, rcParam, rcNull);
+    } else {
+        *has_pool = cself->member_pool != NULL;
+    }
+    return rc;
+}
+
+rc_t Experiment_ReadSegDefault(const ExperimentXML* self, SRASegment* seg)
+{
+    rc_t rc = 0;
+
+    /* TBD to do memberseg call based on junk seq of known length */
+    if( self == NULL || seg == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcResolving, rcParam, rcNull);
+    } else if( self->spot_length == 0 ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcUnsupported);
+    } else {
+        uint32_t i;
+        int32_t spot_len = self->spot_length;
+
+        i = self->reads->nreads;
+        do {
+            int16_t len = 0;
+            --i;
+            switch(self->reads->reads[i].coord_type) {
+                case rdsp_RelativeOrder_ct:
+                    if( i == 0 ) {
+                        len = spot_len;
+                    } else {
+                        len = 0;
+                    }
+                    break;
+                case rdsp_BaseCoord_ct:
+                case rdsp_CycleCoord_ct:
+                    len = spot_len - (self->reads->reads[i].coord.start_coord - 1);
+                    break;
+                case rdsp_ExpectedBaseCall_ct:
+                case rdsp_ExpectedBaseCallTable_ct:
+                    if( self->reads->reads[i].coord.expected_basecalls.base_coord > 0 ) {
+                        len = spot_len - (self->reads->reads[i].coord.expected_basecalls.base_coord - 1);
+                    }
+                    len += self->reads->reads[i].coord.expected_basecalls.default_length;
+                    break;
+                default:
+                    rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcUnexpected);
+                    LOGERR(klogErr, rc, "read type in default");
+                    break;
+            }
+            spot_len -= len;
+            if( spot_len < 0 || len < 0 ) {
+                rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcInconsistent);
+                LOGERR(klogErr, rc, "cumulative read lengths and SEQUENCE_LENGTH");
+                return rc;
+            } else {
+                seg[i].start = spot_len;
+                seg[i].len = len;
+            }
+        } while( i > 0 );
+    }
+    return rc;
+}
+
+void Experiment_Whack(const ExperimentXML* cself)
+{
+    if( cself != NULL ) {
+        ExperimentXML* self = (ExperimentXML*)cself;
+
+        free(self->processing.quality_scorer);
+        ReadSpecXML_Whack(self->reads);
+        BSTreeWhack(self->member_pool, PoolMember_Whack, NULL);
+        free(self->member_pool);
+        PoolMember_Whack(&self->member_null->node, NULL);
+        PlatformXML_Whack(self->platform);
+        free(self);
+    }
+}
diff --git a/tools/sra-load/experiment-xml.h b/tools/sra-load/experiment-xml.h
new file mode 100644
index 0000000..8ab869d
--- /dev/null
+++ b/tools/sra-load/experiment-xml.h
@@ -0,0 +1,77 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _sra_load_experiment_xml_
+#define _sra_load_experiment_xml_
+
+#include "common-xml.h"
+
+typedef struct ProcessingXML_struct {
+    char* quality_scorer;
+    ExperimentQualityType quality_type;
+    uint8_t quality_offset;
+    ExperimentBarcodeRule barcode_rule;
+
+} ProcessingXML;
+
+typedef struct ExperimentXML ExperimentXML;
+
+/* Make spot descriptor information structure based on XML file
+ */
+rc_t Experiment_Make(const ExperimentXML** self, const KXMLDoc* doc, RunAttributes* attr);
+
+rc_t Experiment_GetPlatform(const ExperimentXML* cself, const PlatformXML** platform);
+
+rc_t Experiment_GetProcessing(const ExperimentXML* cself, const ProcessingXML** processing);
+
+rc_t Experiment_GetReadNumber(const ExperimentXML* cself, uint8_t* nreads);
+
+rc_t Experiment_GetSpotLength(const ExperimentXML* cself, uint32_t* spot_length);
+
+/* ZERO-based read_id here! */
+rc_t Experiment_GetRead(const ExperimentXML* cself, uint8_t read_id, const ReadSpecXML_read** read_spec);
+
+/* find in read (EXPECTED_BASECALL_TABLE type ONLY) basecall and/or member_name by bases or mamber_name
+ * on of basecall or member_name must be not NULL
+ */
+rc_t Experiment_FindReadInTable(const ExperimentXML* cself, uint8_t read_id, const char* key, const char** basecall, const char** member_name);
+
+rc_t Experiment_HasPool(const ExperimentXML* cself, bool* has_pool);
+
+rc_t Experiment_ReadSegDefault(const ExperimentXML* self, SRASegment* seg);
+
+rc_t Experiment_MemberSeg(const ExperimentXML* self,
+                          const char* const file_member_name, const char* const data_block_member_name,
+                          uint32_t nbases, const char* bases,
+                          SRASegment* seg, const char** const new_member_name);
+
+rc_t Experiment_MemberSegSimple(const ExperimentXML* self,
+                                const char* const file_member_name, const char* const data_block_member_name,
+                                const char** const new_member_name);
+
+
+void Experiment_Whack(const ExperimentXML* cself);
+
+#endif /* _sra_load_experiment_xml_ */
diff --git a/tools/sra-load/fastq-fmt.c b/tools/sra-load/fastq-fmt.c
new file mode 100644
index 0000000..3ef58b4
--- /dev/null
+++ b/tools/sra-load/fastq-fmt.c
@@ -0,0 +1,700 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <os-native.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <errno.h>
+#include <limits.h>
+
+typedef struct FastqLoaderFmt FastqLoaderFmt;
+#define SRALOADERFMT_IMPL FastqLoaderFmt
+#include "loader-fmt.h"
+
+#include "writer-illumina.h"
+#include "writer-454.h"
+#include "writer-ion-torrent.h"
+#include "experiment-xml.h"
+#include "debug.h"
+
+typedef struct FileReadData_struct {
+    bool ready; /* if data is filled from file */
+    pstring name;
+    pstring barcode;
+    IlluminaRead read;
+} FileReadData;
+
+typedef struct FastqFileInfo_struct {
+    const SRALoaderFile* file;
+    /* parsed data from file for single spot */
+    FileReadData spot[2]; /* 2nd element is used for 8 line format file only */
+
+    int qualType;
+    ExperimentQualityEncoding qualEnc;
+    uint8_t qualOffset;
+    int8_t qualMin;
+    int8_t qualMax;
+
+    /* file line buffer */
+    const char* line; /* not NULL if contains unprocessed data */
+    size_t line_len;
+} FastqFileInfo;
+
+struct FastqLoaderFmt {
+    SRALoaderFmt dad;
+    const SRAWriterIllumina* wIllumina;
+    const SRAWriter454* w454;
+    const SRAWriterIonTorrent* wIonTorrent;
+
+    const ProcessingXML* processing;
+    int64_t spots_bad_allowed;
+    int64_t spots_bad_count;
+};
+
+static
+void FileReadData_init(FileReadData* read, bool name_only)
+{
+    pstring_clear(&read->name);
+    pstring_clear(&read->barcode);
+    IlluminaRead_Init(&read->read, name_only);
+    if( !name_only ) {
+        read->ready = false;
+    }
+}
+
+/* reads 1 line from given file
+ * if file->line pointer is not NULL line is in buffer already, nothing is read
+ * failes on error or if line empty and not optional
+ */
+static
+rc_t file_read_line(FastqFileInfo* file, bool optional)
+{
+    rc_t rc = 0;
+static unsigned long lineNo=0;
+
+    if( file->line == NULL ) {
+        if( (rc = SRALoaderFileReadline(file->file, (const void**)&file->line, &file->line_len)) == 0 ) {
+            if( file->line == NULL || file->line_len == 0 ) {
+                if( !optional ) {
+                    rc = RC(rcSRA, rcFormatter, rcReading, rcString, rcInsufficient);
+                }
+            }
+            if( rc == 0 && file->line != NULL ) {
+                if( file->line_len > 0 ) {
+                    const char* e = file->line + file->line_len;
+                    /* right trim */
+                    while( --e >= file->line ) {
+                        if( *e!=0 && !isspace(*e) ) {
+                            break;
+                        }
+                        file->line_len--;
+                    }
+                }
+            }
+        }
+        ++lineNo;
+    }
+    return rc;
+}
+
+/*
+ * compare seq to quality length ignoring traling spaces, no leading spaces expected
+ */
+static
+bool match_seq_to_qual(const char* seq, size_t seq_len, const char* qual, size_t qual_len)
+{
+    char *space = NULL;
+
+    /* cut trailing spaces */
+    while( seq_len > 0 && seq[seq_len - 1] == ' ') {
+        seq_len--;
+    }
+    while( qual_len > 0 && qual[qual_len - 1] == ' ') {
+        qual_len--;
+    }
+    space = memchr(qual, ' ', qual_len);
+    if( space != NULL ) {
+        /* spaced numbers form: count numbers */
+        int spaceCount = 1;
+        do {
+            if( (space = memchr(space, ' ', qual_len - (space - qual))) != NULL ) {
+                spaceCount++;
+                space++;
+            }
+        } while( space != NULL );
+        qual_len = spaceCount;
+    }
+    return seq_len == qual_len;
+}
+
+/* parses name as a given word number (1-based) in a str of size len
+ * looks for name(#barcode)?([\/.]\d)?
+ * returns score of found parts
+ * score == 0 word not found
+ */ 
+static
+uint8_t parse_spot_name(const SRALoaderFile* file, FileReadData* spot, const char* str, size_t len, uint8_t word_number)
+{
+    uint8_t w, score = 0;
+    const char* name, *name_end;
+
+    name = name_end = str;
+    /* set name_end to end of word_number-th word */
+    for(w = 1; w <= word_number || name_end == NULL; w++ ) {
+        /* skip consecutive spaces */
+        while( *name_end == ' ' && name_end != &str[len] ) {
+            name_end++;
+        }
+        name = name_end;
+        name_end = memchr(name, ' ', len - (name_end - str));
+        if( name_end == NULL ) {
+            if( w == word_number ) {
+                name_end = &str[len];
+            }
+            break;
+        }
+    }
+    if( name != name_end && name_end != NULL ) {
+        char* x;
+        rc_t rc;
+
+        /* init only name portion */
+        FileReadData_init(spot, true);
+        --name_end; /* goto last char */
+        if( isdigit(name_end[0])&& (name_end[-1] == '\\' || name_end[-1] == '/' )) {
+            score++;
+            spot->read.read_id = name_end[0] - '0';
+            name_end -= 2;
+        } else if( isdigit(*name_end) && name_end[-1] == '.' ) {
+            int q = 0;
+            if( memrchr(name, '#', name_end - name) != NULL ) {
+                /* have barode -> this is read id */
+                q = 4;
+            } else {
+                /* may a read id, check to see if 4 coords follow */
+                const char* end = name_end - 1;
+                while( --end >= name ) {
+                    if( strchr(":|_", *end) != NULL ) {
+                        q++;
+                    } else if( !isdigit(*end) ) {
+                        break;
+                    }
+                }
+            }
+            if( q == 4 ) {
+                score++;
+                spot->read.read_id = name_end[0] - '0';
+                name_end -= 2;
+            }
+        }
+        if( (x = memrchr(name, '#', name_end - name)) != NULL ) {
+            score++;
+            if( (rc = pstring_assign(&spot->barcode, x + 1, name_end - x)) != 0 ) {
+                SRALoaderFile_LOG(file, klogErr, rc, "barcode $(b)", "b=%.*s", name_end - x, x + 1);
+                return 0;
+            }
+            if( pstring_strcmp(&spot->barcode, "0") == 0 ) {
+                pstring_clear(&spot->barcode);
+            } else if( spot->barcode.len >= 4 &&
+                       (strncmp(spot->barcode.data, "0/1_", 4) == 0 || strncmp(spot->barcode.data, "0/2_", 4) == 0) ) {
+                spot->read.read_id = spot->barcode.data[2] - '0';
+                pstring_assign(&spot->barcode, &spot->barcode.data[4], spot->barcode.len - 4);
+            }
+            name_end = --x;
+        }
+        score++;
+        if( (rc = pstring_assign(&spot->name, name, name_end - name + 1)) != 0 ) {
+            SRALoaderFile_LOG(file, klogErr, rc, "spot name $(n)", "n=%.*s", name_end - name + 1, name);
+            return 0;
+        }
+        /* search for _R\d\D in name and use it as read id, remove from name or spot won't assemble */
+        x = spot->name.data;
+        while( (x = strrchr(x, 'R')) != NULL ) {
+            if( x != spot->name.data && *(x - 1) == '_' && isdigit(*(x + 1)) && !isalnum(*(x + 2)) ) {
+                score++;
+		if(spot->read.read_id == -1){
+			spot->read.read_id = *(x + 1) - '0';
+		}
+                strcpy(x - 1, x + 2);
+                spot->name.len -= 4;
+                break;
+            }
+            x++;
+        }
+        /* find last '=' and use only whatever is to the left of it */
+        if( (x = memrchr(spot->name.data, '=', spot->name.len)) != NULL ) {
+            rc = pstring_assign(&spot->name, spot->name.data, (x - spot->name.data) );
+        }
+    }
+    return score;
+}
+
+/*
+ * in a single line form tries to grab last to chunks defined by sep into seq and qual
+ * ignores spaces adjucent to sep
+ * normally line would look like "name sep seq sep sep qual"
+ */
+static
+bool find_seq_qual_by_sep(FastqLoaderFmt* self, FastqFileInfo* file, const char sep)
+{
+    const char* seq = NULL, *qual = NULL;
+    size_t seq_len = 0, qual_len = 0;
+
+    FileReadData_init(file->spot, false);
+    qual = memrchr(file->line, sep, file->line_len);
+    if( qual != NULL ) {
+        seq = memrchr(file->line, sep, qual - file->line);
+        if( seq != NULL ) {
+            if( parse_spot_name(file->file, file->spot, file->line, seq - file->line, 1) != 0 ) {
+                /* skip leading spaces */
+                do {
+                    seq = seq + 1;
+                } while( *seq == ' ' && seq < (file->line + file->line_len) );
+                seq_len = qual - seq;
+                do {
+                    qual = qual + 1;
+                } while( *qual == ' ' && qual < (file->line + file->line_len)  );
+                qual_len = file->line_len - (qual - file->line);
+                if( *seq != sep && *seq != ' ' && seq_len != 0 &&
+                    *qual != sep && *qual != ' ' && qual_len != 0 ) {
+                    if( match_seq_to_qual(seq, seq_len, qual, qual_len) ) {
+                        rc_t rc;
+                        if( (rc = pstring_assign(&file->spot->read.seq, seq, seq_len)) == 0 ) {
+                            if( pstring_is_fasta(&file->spot->read.seq) ) {
+                                if( (rc = pstring_assign(&file->spot->read.qual, qual, qual_len)) == 0 ) {
+                                    file->spot->read.qual_type = file->qualType;
+                                    return true;
+                                }
+                            }
+                            file->spot->read.seq.len = 0;
+                        }
+                        if( rc != 0 ) {
+                            SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=storing read data");
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return false;
+}
+
+/*
+ * read fasta or quality, which maybe wrapped on 70th column width,
+ * into asciiZ buffer
+ */
+static
+rc_t read_multiline_seq_or_qual(FastqFileInfo* file, const char stop, pstring* str)
+{
+    rc_t rc = 0;
+    bool append = false, optional = false;
+
+    while( rc == 0 ) {
+        if( (rc = file_read_line(file, optional)) == 0 ) {
+            if( optional && (file->line == NULL || (file->line_len > 0 && file->line[0] == stop)) ) {
+                /* eof or next line is defline -> stop, line stays in buffer */
+                break;
+            }
+            if( append && memchr(str->data, ' ', str->len) != NULL ) {
+                rc = pstring_append(str, " ", 1);
+            }
+            if( rc == 0 && (rc = pstring_append(str, file->line, file->line_len)) == 0 ) {
+                file->line = NULL; /* line processed */
+                optional = true;
+            }
+            append = true;
+        }
+    }
+    return rc;
+}
+
+static
+rc_t read_spot_data_3lines(FastqFileInfo* file, FileReadData* sd, uint8_t best_word, uint8_t best_score, int qualType)
+{
+    rc_t rc = 0;
+
+    file->line = NULL; /* discard defline */
+    /* read sequence */
+    if( (rc = read_multiline_seq_or_qual(file, '+', &sd->read.seq)) != 0 ) {
+        return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading sequence data");
+    }
+    if( !pstring_is_fasta(&sd->read.seq) ) {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcCorrupt);
+        return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=expected sequence data");
+    }
+    /* next defline */
+    if( (rc = file_read_line(file, false)) != 0 ) {
+        return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading quality defline");
+    }
+    if( file->line[0] != '+' ) {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcCorrupt);
+        return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=expected '+' on quality defline");
+    }
+    if( file->line_len != 1 ) { /* there may be just '+' on quality defline */
+        FileReadData d;
+        uint8_t score = parse_spot_name(file->file, &d, &file->line[1], file->line_len - 1, best_word);
+        /* sometimes quality defline may NOT contain barcode and readid, so score will be lower than bestscore,
+           but must be at least == 1 with none empty line, which means that name was found */
+        if( score < 1 ) {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcCorrupt);
+            return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=spot name not found");
+        }
+        if( pstring_cmp(&sd->name, &d.name) != 0 ||
+            (score == best_score && (pstring_cmp(&sd->barcode, &d.barcode) != 0 || sd->read.read_id != d.read.read_id)) ) {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcCorrupt);
+            return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=quality defline do not match sequence defline");
+        }
+    }
+    file->line = NULL; /* discard defline */
+    if( (rc = read_multiline_seq_or_qual(file, '@', &sd->read.qual)) != 0 ) {
+        return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=failed to read quality");
+    }
+    if( sd->read.qual.len <= 0 ) {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcEmpty);
+        return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=quality");
+    }
+    sd->read.qual_type = qualType;
+    sd->ready = true;
+    return 0;
+}
+
+/* reads from a file data for a sinlge spot, data may be partial */
+static
+rc_t read_next_spot(FastqLoaderFmt* self, FastqFileInfo* file)
+{
+    rc_t rc = 0;
+
+    if( file->spot->ready ) {
+        /* data still not used */
+        return 0;
+    }
+    FileReadData_init(file->spot, false);
+    FileReadData_init(&file->spot[1], false);
+    if( (rc = file_read_line(file, true)) != 0 ) {
+        return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading more data");
+    } else if( file->line == NULL ) {
+        return 0; /* eof */
+    }
+    if( find_seq_qual_by_sep(self, file, ':') || find_seq_qual_by_sep(self, file, ' ') ) {
+        /* single line forms */
+        file->line = NULL; /* line consumed */
+        file->spot->ready = true;
+    } else  if( file->line[0] == '>' || file->line[0] == '@' ) {
+        /* 4 or 8 line format */
+        FileReadData sd;
+        uint8_t word = 0, best_word = 0;
+        uint8_t score = 0, best_score = 0;
+        /* find and parse spot name on defline */
+        do {
+            score = parse_spot_name(file->file, &sd, &file->line[1], file->line_len - 1, ++word);
+            if( score > best_score ) {
+                if( (rc = pstring_copy(&file->spot->name, &sd.name)) != 0 ||
+                    (rc = pstring_copy(&file->spot->barcode, &sd.barcode)) != 0 ) {
+                    return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=copying read name");
+                }
+                file->spot->read.read_id = sd.read.read_id;
+                best_score = score;
+                best_word = word; /* used below for quality defline parsing */
+            }
+
+        } while(score != 0);
+        if( best_score == 0 ) {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcId, rcNotFound);
+            return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=spot name not detected");
+        }
+        if( file->line[0] == '@' ) {
+            if( (rc = read_spot_data_3lines(file, file->spot, best_word, best_score, file->qualType)) != 0 ) {
+                return rc;
+            }
+            /* now we MAY have 5th line in buffer so we can check if it's 2nd read for 8 lines format */
+            if( file->line_len != 0 && file->line != NULL && file->line[0] == '@' ) {
+                /* try to find read id on next line */
+                FileReadData_init(&file->spot[1], false);
+                if( parse_spot_name(file->file, &file->spot[1], &file->line[1], file->line_len - 1, best_word) == best_score ) {
+                    if( pstring_cmp(&file->spot->name, &file->spot[1].name) == 0 &&
+                        pstring_cmp(&file->spot->barcode, &file->spot[1].barcode) == 0 &&
+                        file->spot->read.read_id != file->spot[1].read.read_id ) {
+                        /* since it is different read id with same name and barcode, fill up second read */
+                        if( (rc = read_spot_data_3lines(file, &file->spot[1], best_word, best_score, file->qualType)) != 0 ) {
+                            return rc;
+                        }
+                    }
+                }
+            }
+        } else {
+            /* 2 line seq or quality form */
+            file->line = NULL; /* line consumed */
+            /* read sequence/quality */
+            if( (rc = read_multiline_seq_or_qual(file, '>', &file->spot->read.seq)) != 0 ) {
+                return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading seq/qual data");
+            }
+            if( file->spot->read.seq.len == 0 ) {
+                return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=empty string reading seq/qual data");
+            } else if( !pstring_is_fasta(&file->spot->read.seq) ) {
+                /* swap */
+                if( (rc = pstring_copy(&file->spot->read.qual, &file->spot->read.seq)) == 0 ) {
+                    file->spot->read.qual_type = file->qualType;
+                    pstring_clear(&file->spot->read.seq);
+                }
+            }
+            file->spot->ready = true;
+        }
+    } else {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcFile, rcInvalid);
+            return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=file corrupt or format unknown");
+    }
+    if( rc == 0 ) {
+        int k;
+        for(k = 0; k < 2; k++) {
+            FileReadData* rd = &file->spot[k];
+            if( rd->ready && rd->read.qual_type != ILLUMINAWRITER_COLMASK_NOTSET ) {
+                if( file->qualOffset == 0 ) {
+                    /* detect and remember */
+                    file->qualOffset = 33;
+		    file->qualMax = 94;
+                    rc = pstring_quality_convert(&rd->read.qual, file->qualEnc, file->qualOffset, file->qualMin, file->qualMax);
+                    if( GetRCState(rc) == rcOutofrange ) {
+                        file->qualOffset = 64;
+			file->qualMax = 61;
+                        rc = pstring_quality_convert(&rd->read.qual, file->qualEnc, file->qualOffset, file->qualMin, file->qualMax);
+                    }
+                } else {
+		    if(file->qualOffset == 33) file->qualMax = 94;
+                    rc = pstring_quality_convert(&rd->read.qual, file->qualEnc, file->qualOffset, file->qualMin, file->qualMax);
+                }
+                if( rc != 0 ) {
+                    return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=converting quality");
+                }
+            }
+        }
+    }
+    return 0;
+}
+
+static
+rc_t FastqLoaderFmt_WriteData(FastqLoaderFmt* self, uint32_t argc, const SRALoaderFile* const argv[], int64_t* spots_bad_count)
+{
+    rc_t rc = 0;
+    uint32_t i, g = 0;
+    FastqFileInfo* files = NULL;
+    bool done;
+    static IlluminaSpot spot;
+ 
+    if( (files = calloc(argc, sizeof(*files))) == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcMemory, rcInsufficient);
+    }
+
+    for(i = 0; rc == 0 && i < argc; i++) {
+        ExperimentQualityType qType;
+        FastqFileInfo* file = &files[i];
+
+        file->file = argv[i];
+        FileReadData_init(file->spot, false);
+        FileReadData_init(&file->spot[1], false);
+        if( (rc = SRALoaderFile_QualityScoringSystem(file->file, &qType)) == 0 &&
+            (rc = SRALoaderFile_QualityEncoding(file->file, &file->qualEnc)) == 0 &&
+            (rc = SRALoaderFile_AsciiOffset(file->file, &file->qualOffset)) == 0 ) {
+
+            file->qualType = ILLUMINAWRITER_COLMASK_NOTSET;
+
+            if( qType == eExperimentQualityType_Undefined ) {
+                qType = self->processing->quality_type;
+                file->qualOffset = self->processing->quality_offset;
+            }
+            switch(qType) {
+                case eExperimentQualityType_LogOdds:
+                case eExperimentQualityType_Other:
+                    if( self->w454 != NULL || self->wIonTorrent != NULL ) {
+                        rc = RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcInvalid);
+                        LOGERR(klogInt, rc, "quality type other than Phred is not supported for this PLATFORM");
+                    }
+                    file->qualMin = -40;
+                    file->qualMax = 41;
+                    file->qualType = ILLUMINAWRITER_COLMASK_QUALITY_LOGODDS1;
+                    break;
+                default:
+                    SRALoaderFile_LOG(file->file, klogWarn, rc, 
+                        "quality_scoring_system attribute not set for this file, using Phred as default", NULL);
+                case eExperimentQualityType_Phred:
+                    file->qualType = ILLUMINAWRITER_COLMASK_QUALITY_PHRED;
+                    file->qualMin = 0;
+                    file->qualMax = (self->wIllumina) ? 61: 127;
+                    break;
+            }
+        }
+    }
+    do {
+        done = true;
+        for(i = 0; rc == 0 && i < argc; i++) {
+            FastqFileInfo* file = &files[i];
+            if( (rc = read_next_spot(self, file)) != 0 || !file->spot->ready ) {
+                continue;
+            }
+            done = false;
+#if _DEBUGGING
+            {{
+                FileReadData* ss = file->spot;
+                do {
+                    DEBUG_MSG(3, ("file-%u: name:'%s', bc:%s, rd:%i, flt:%hu, seq '%.*s', qual %u bytes\n",
+                                  i + 1, ss->name.data, ss->barcode.data, ss->read.read_id, ss->read.filter,
+                                  ss->read.seq.len, ss->read.seq.data, ss->read.qual.len));
+                    if( ss == &file->spot[1]){ break; }
+                    ss = file->spot[1].ready ? &file->spot[1] : NULL;
+                } while( ss != NULL );
+            }}
+#endif
+        }
+        if( rc != 0 || done ) {
+            break;
+        }
+        /* collect spot reads, matching by spot name
+         * spot data may be split across multiple files
+         */
+        IlluminaSpot_Init(&spot);
+        for(i = 0; rc == 0 && i < argc; i++) {
+            FileReadData* fspot = files[i].spot[0].ready ? &files[i].spot[0] : NULL;
+            while(rc == 0 && fspot != NULL ) {
+                rc = IlluminaSpot_Add(&spot, &fspot->name, &fspot->barcode, &fspot->read);
+                if( rc == 0 ) {
+                    g = i;
+                    fspot->ready = false;
+                } else if( GetRCState(rc) == rcIgnored ) {
+                    rc = 0;
+                } else {
+                    SRALoaderFile_LOG(files[i].file, klogErr, rc, "$(msg)", "msg=adding data to spot");
+                }
+                if( fspot == &files[i].spot[1]) { break; }
+                fspot = files[i].spot[1].ready ? &files[i].spot[1] : NULL;
+            }
+        }
+        if( rc == 0 ) {
+            if( self->wIllumina != NULL ) {
+                if( (rc = SRAWriterIllumina_Write(self->wIllumina, argv[0], &spot)) != 0 &&
+                    GetRCTarget(rc) == rcFormatter && GetRCContext(rc) == rcValidating ) {
+                    SRALoaderFile_LOG(files[g].file, klogWarn, rc, "$(msg) $(spot_name)", "msg=bad spot,spot_name=%.*s",
+                                                spot.name->len, spot.name->data);
+                    self->spots_bad_count++;
+                    if( self->spots_bad_allowed < 0 ||
+                        self->spots_bad_count <= self->spots_bad_allowed ) {
+                        rc = 0;
+                    }
+                }
+            } else if( spot.nreads != 1 ) {
+                rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcUnsupported);
+                SRALoaderFile_LOG(files[g].file, klogErr, rc, "$(msg)", "msg=multiple reads for this platform");
+            } else if( self->wIonTorrent != NULL ) {
+                rc = SRAWriterIonTorrent_WriteRead(self->wIonTorrent, argv[0], spot.name,
+                                                   spot.reads[0].seq, spot.reads[0].qual, NULL, NULL, 0, 0, 0, 0);
+            } else {
+                rc = SRAWriter454_WriteRead(self->w454, argv[0], spot.name,
+                                            spot.reads[0].seq, spot.reads[0].qual, NULL, NULL, 0, 0, 0, 0);
+            }
+        }
+    } while( rc == 0 );
+    free(files);
+    *spots_bad_count = self->spots_bad_count;
+    return rc;
+}
+
+static
+rc_t FastqLoaderFmt_Whack(FastqLoaderFmt *self, SRATable** table)
+{
+    SRAWriterIllumina_Whack(self->wIllumina, table);
+    SRAWriter454_Whack(self->w454, table);
+    SRAWriterIonTorrent_Whack(self->wIonTorrent, table);
+    free(self);
+    return 0;
+}
+
+const char UsageDefaultName[] = "fastq-load";
+
+static
+rc_t FastqLoaderFmt_Version (const FastqLoaderFmt* self, uint32_t *vers, const char** name )
+{
+    *vers = KAppVersion();
+    *name = "Fastq";
+    return 0;
+}
+
+static SRALoaderFmt_vt_v1 vtFastqLoaderFmt =
+{
+    1, 0,
+    FastqLoaderFmt_Whack,
+    FastqLoaderFmt_Version,
+    NULL,
+    FastqLoaderFmt_WriteData
+};
+
+rc_t SRALoaderFmtMake(SRALoaderFmt **self, const SRALoaderConfig *config)
+{
+    rc_t rc = 0;
+    FastqLoaderFmt* fmt;
+    const PlatformXML* platform;
+    const ProcessingXML* processing;
+
+    if( self == NULL || config == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    *self = NULL;
+
+    if( (rc = Experiment_GetProcessing(config->experiment, &processing)) != 0 ||
+        (rc = Experiment_GetPlatform(config->experiment, &platform)) != 0 ) {
+        return rc;
+    }
+    fmt = calloc(1, sizeof(*fmt));
+    if(fmt == NULL) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+        LOGERR(klogInt, rc, "failed to initialize; out of memory");
+        return rc;
+    }
+    if( platform->id == SRA_PLATFORM_454 ) {
+        if( rc == 0 && (rc = SRAWriter454_Make(&fmt->w454, config)) != 0 ) {
+            LOGERR(klogInt, rc, "failed to initialize 454 writer");
+        }
+    } else if( platform->id == SRA_PLATFORM_ION_TORRENT ) {
+        if( rc == 0 && (rc = SRAWriterIonTorrent_Make(&fmt->wIonTorrent, config)) != 0 ) {
+            LOGERR(klogInt, rc, "failed to initialize Ion Torrent writer");
+        }
+    } else if(   (rc = SRAWriterIllumina_Make(&fmt->wIllumina, config)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize Illumina writer");
+    }
+    if( rc == 0 && (rc = SRALoaderFmtInit(&fmt->dad, (const SRALoaderFmt_vt*)&vtFastqLoaderFmt)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize parent object");
+    }
+    if( rc != 0 ) {
+        FastqLoaderFmt_Whack(fmt, NULL);
+    } else {
+        fmt->processing = processing;
+        fmt->spots_bad_allowed = config->spots_bad_allowed;
+        fmt->spots_bad_count = 0;
+        *self = &fmt->dad;
+    }
+    return rc;
+}
diff --git a/tools/sra-load/helicos-fmt.c b/tools/sra-load/helicos-fmt.c
new file mode 100644
index 0000000..c82a0c2
--- /dev/null
+++ b/tools/sra-load/helicos-fmt.c
@@ -0,0 +1,273 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <kapp/main.h>
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <os-native.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <errno.h>
+#include <limits.h>
+#include <assert.h>
+
+typedef struct HelicosLoaderFmt HelicosLoaderFmt;
+#define SRALOADERFMT_IMPL HelicosLoaderFmt
+#include "loader-fmt.h"
+
+#include "pstring.h"
+#include "writer-helicos.h"
+#include "debug.h"
+
+typedef enum EFileType_enum {
+    eNotSet = -1,
+    eCSFasta,
+    eQuality,
+    eSignalFTC,
+    eSignalCY3,
+    eSignalTXR,
+    eSignalCY5,
+    eFileTypeMax
+} EFileType;
+
+typedef struct HelicosFileInfo_struct {
+    /* parsed data from file for a single spot */
+    bool ready; /* if data is filled from file */
+    /* spot data */
+    pstring name;
+    pstring sequence;
+    pstring quality;
+
+    const SRALoaderFile* file;
+    /* file line buffer */
+    const char* line; /* not NULL if contains unprocessed data */
+    size_t line_len;
+} HelicosFileInfo;
+
+struct HelicosLoaderFmt {
+    SRALoaderFmt dad;
+    const SRAWriterHelicos* writer;
+};
+
+static
+void HelicosFileInfo_init(HelicosFileInfo* file)
+{
+    file->ready = false;
+    pstring_clear(&file->name);
+    pstring_clear(&file->sequence);
+    pstring_clear(&file->quality);
+}
+
+/* reads 1 line from given file
+ * if file->line pointer is not NULL line is in buffer already, nothing is read
+ * failes on error or if line empty and not optional
+ */
+static
+rc_t file_read_line(HelicosFileInfo* file, bool optional)
+{
+    rc_t rc = 0;
+
+    if( file->line == NULL ) {
+        if( (rc = SRALoaderFileReadline(file->file, (const void**)&file->line, &file->line_len)) == 0 ) {
+            if( file->line == NULL || file->line_len == 0 ) {
+                if( !optional ) {
+                    rc = RC(rcSRA, rcFormatter, rcReading, rcString, rcInsufficient);
+                }
+            }
+            if( rc == 0 && file->line != NULL ) {
+                if( file->line_len > 0 ) {
+                    const char* e = file->line + file->line_len;
+                    /* right trim */
+                    while( --e >= file->line ) {
+                        if( !isspace(*e) ) {
+                            break;
+                        }
+                        file->line_len--;
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+/* reads from a file data for a sinlge spot, data may be partial */
+static
+rc_t read_next_spot(HelicosLoaderFmt* self, HelicosFileInfo* file)
+{
+    rc_t rc = 0;
+
+    if( file->ready ) {
+        /* data still not used */
+        return 0;
+    }
+    HelicosFileInfo_init(file);
+    if( (rc = file_read_line(file, true)) != 0 ) {
+        return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading more data");
+    } else if( file->line == NULL ) {
+        return 0; /* eof */
+    }
+    if( file->line[0] == '@' ) { /*** fastq format **/
+        if( (rc = pstring_assign(&file->name, &file->line[1], file->line_len - 1)) != 0 ) {
+            return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading name");
+        }
+        file->line = NULL;
+        if( (rc = file_read_line(file, false)) != 0 || file->line_len > sizeof(file->sequence.data)-1 ||
+            (rc = pstring_assign(&file->sequence, file->line, file->line_len)) != 0 ||
+            !pstring_is_fasta(&file->sequence) ) {
+            rc = rc ? rc : RC(rcSRA, rcFormatter, rcReading, rcData, rcUnrecognized);
+            return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading sequence");
+        }
+        file->line = NULL;
+        if( (rc = file_read_line(file, false)) != 0 ||
+            file->line[0] != '+' || file->line_len != 1 ) {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcCorrupt);
+            return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading quality defline");
+        }
+        file->line = NULL;
+        if( (rc = file_read_line(file, false)) != 0 || file->line_len > sizeof(file->quality.data)-1 ||
+            (rc = pstring_assign(&file->quality, file->line, file->line_len)) != 0 ||
+            (rc = pstring_quality_convert(&file->quality, eExperimentQualityEncoding_Ascii, 33, 0, 0x7F)) != 0 ) {
+            return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading quality");
+        }
+        file->line = NULL;
+        file->ready = true;
+    } else if( file->line[0] == '>' ) { /** fasta format **/
+	if( (rc = pstring_assign(&file->name, &file->line[1], file->line_len - 1)) != 0 ) {
+            return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading name");
+        }
+        file->line = NULL;
+	if( (rc = file_read_line(file, false)) != 0 || file->line_len > sizeof(file->sequence.data)-1 ||
+            (rc = pstring_assign(&file->sequence, file->line, file->line_len)) != 0 ||
+            !pstring_is_fasta(&file->sequence) ) {
+            rc = rc ? rc : RC(rcSRA, rcFormatter, rcReading, rcData, rcUnrecognized);
+            return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading sequence");
+        }
+	file->line = NULL;
+	file->quality.len = file->sequence.len;
+	memset(file->quality.data,14,file->quality.len);
+	file->ready = true;
+    } else {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcFile, rcInvalid);
+        return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=expected '@'");
+    }
+#if _DEBUGGING
+ DEBUG_MSG(3, ("READ: name:'%s', seq[%u]:'%s', qual[%u]\n", file->name.data,
+                file->sequence.len, file->sequence.data, file->quality.len)); /*
+    DEBUG_MSG(3, ("READ: name:'%s', seq[%u]:'%s', qual[%u]:'%s'\n", file->name.data,
+                file->sequence.len, file->sequence.data, file->quality.len, file->quality.data));*/
+#endif
+    return 0;
+}
+
+static
+rc_t HelicosLoaderFmt_WriteData(HelicosLoaderFmt* self, uint32_t argc, const SRALoaderFile* const argv[], int64_t* spots_bad_count)
+{
+    rc_t rc = 0;
+    uint32_t i;
+    HelicosFileInfo* files = NULL;
+    bool done;
+
+    if( (files = calloc(argc, sizeof(*files))) == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcMemory, rcInsufficient);
+    }
+    for(i = 0; rc == 0 && i < argc; i++) {
+        HelicosFileInfo* file = &files[i];
+        HelicosFileInfo_init(file);
+        file->file = argv[i];
+    }
+    do {
+        done = true;
+        for(i = 0; rc == 0 && i < argc; i++) {
+            HelicosFileInfo* file = &files[i];
+            if( (rc = read_next_spot(self, file)) == 0 && file->ready ) {
+                done = false;
+                rc = SRAWriterHelicos_Write(self->writer, argv[0], &file->name, &file->sequence, &file->quality);
+                file->ready = false;
+            }
+        }
+    } while( rc == 0 && !done );
+    free(files);
+    return rc;
+}
+
+static
+rc_t HelicosLoaderFmt_Whack(HelicosLoaderFmt *self, SRATable** table)
+{
+    SRAWriterHelicos_Whack(self->writer, table);
+    free(self);
+    return 0;
+}
+
+const char UsageDefaultName[] = "helicos-load";
+
+static
+rc_t HelicosLoaderFmt_Version (const HelicosLoaderFmt* self, uint32_t *vers, const char** name )
+{
+    *vers = KAppVersion();
+    *name = "Helicos";
+    return 0;
+}
+
+static SRALoaderFmt_vt_v1 vtHelicosLoaderFmt =
+{
+    1, 0,
+    HelicosLoaderFmt_Whack,
+    HelicosLoaderFmt_Version,
+    NULL,
+    HelicosLoaderFmt_WriteData
+};
+
+rc_t SRALoaderFmtMake(SRALoaderFmt **self, const SRALoaderConfig *config)
+{
+    rc_t rc = 0;
+    HelicosLoaderFmt* fmt;
+
+    if( self == NULL || config == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    *self = NULL;
+    fmt = calloc(1, sizeof(*fmt));
+    if(fmt == NULL) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+        LOGERR(klogInt, rc, "failed to initialize; out of memory");
+        return rc;
+    }
+    if( (rc = SRAWriterHelicos_Make(&fmt->writer, config)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize writer");
+    } else if( (rc = SRALoaderFmtInit(&fmt->dad, (const SRALoaderFmt_vt*)&vtHelicosLoaderFmt)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize parent object");
+    }
+    /* Set result or free obj */
+    if( rc != 0 ) {
+        HelicosLoaderFmt_Whack(fmt, NULL);
+    } else {
+        *self = &fmt->dad;
+    }
+    return rc;
+}
diff --git a/tools/sra-load/illumina-fmt.c b/tools/sra-load/illumina-fmt.c
new file mode 100644
index 0000000..c192402
--- /dev/null
+++ b/tools/sra-load/illumina-fmt.c
@@ -0,0 +1,847 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <os-native.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <errno.h>
+#include <limits.h>
+#include <assert.h>
+
+typedef struct IlluminaLoaderFmt IlluminaLoaderFmt;
+#define SRALOADERFMT_IMPL IlluminaLoaderFmt
+#include "loader-fmt.h"
+
+#include "writer-illumina.h"
+#include "debug.h"
+
+typedef enum EIlluminaNativeFileType_enum {
+    eIlluminaNativeFileTypeNotSet = 0,
+    eIlluminaNativeFileTypeQuality4 = 0x01,
+    eIlluminaNativeFileTypeQSeq = 0x02,
+    eIlluminaNativeFileTypeFasta = 0x04,
+    eIlluminaNativeFileTypeNoise = 0x08,
+    eIlluminaNativeFileTypeIntensity = 0x10,
+    eIlluminaNativeFileTypeSignal = 0x20
+} EIlluminaNativeFileType;
+
+struct {
+    EIlluminaNativeFileType type;
+    const char* key[3];
+} const file_types[] = {
+    /* order important, see WritaData loop */
+    { eIlluminaNativeFileTypeSignal,
+        { "_sig2.", NULL } },
+    { eIlluminaNativeFileTypeIntensity,
+        { "_int.", NULL } },
+    { eIlluminaNativeFileTypeNoise,
+        { "_nse.", NULL } },
+    { eIlluminaNativeFileTypeFasta,
+        { "_seq.", NULL } },
+    { eIlluminaNativeFileTypeQSeq,
+        { "_qseq.", ".qseq", NULL } },
+    { eIlluminaNativeFileTypeQuality4,
+        { "_prb.", NULL } }
+};
+
+typedef struct IlluminaFileInfo_struct {
+    /* parsed data from file for a single spot */
+    bool ready; /* if data is filled from file */
+    EIlluminaNativeFileType type;
+    struct IlluminaFileInfo_struct* prev;
+    struct IlluminaFileInfo_struct* next;
+
+    /* spot data */
+    pstring name;
+    pstring barcode;
+    long coord[4]; /* lane, tile, x, y - sort-merge keys */
+
+    IlluminaRead read;
+
+    const SRALoaderFile* file;
+    /* file line buffer */
+    const char* line; /* not NULL if contains unprocessed data */
+    size_t line_len;
+} IlluminaFileInfo;
+
+static
+void IlluminaFileInfo_init(IlluminaFileInfo* file)
+{
+    assert(file);
+    file->ready = false;
+    pstring_clear(&file->name);
+    memset(file->coord, 0, sizeof(file->coord));
+    IlluminaRead_Init(&file->read, false);
+}
+
+/* reads 1 line from given file
+ * if file->line pointer is not NULL line is in buffer already, nothing is read
+ * failes on error or if line empty and not optional
+ */
+static
+rc_t file_read_line(IlluminaFileInfo* file, bool optional)
+{
+    rc_t rc = 0;
+
+    if( file->line == NULL ) {
+        if( (rc = SRALoaderFileReadline(file->file, (const void**)&file->line, &file->line_len)) == 0 ) {
+            if( file->line == NULL || file->line_len == 0 ) {
+                if( !optional ) {
+                    rc = RC(rcSRA, rcFormatter, rcReading, rcString, rcInsufficient);
+                }
+            }
+            if( rc == 0 && file->line != NULL ) {
+                if( file->line_len > 0 ) {
+                    const char* e = file->line + file->line_len;
+                    /* right trim */
+                    while( --e >= file->line ) {
+                        if( !isspace(*e) ) {
+                            break;
+                        }
+                        file->line_len--;
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+/*
+ * assumes tab separated file:
+ * first 2 postiions concatinated with "_" into spot prefix
+ * nextg 4 postiions concatinated with ":" into spot id: lane:tile:x:y
+ * 7th (index) ignored
+ * 8th is read id
+ * 9th fasta
+ * 10th quality
+ * 11th (optional) read filter
+ */
+static
+rc_t parse_qseq(IlluminaFileInfo* file, const char* data, size_t data_sz)
+{
+    rc_t rc = 0;
+    const char* t, *str = data, *end = data + data_sz;
+    int tabs = 0;
+    do {
+        if( (t = memchr(str, '\t', end - str)) != NULL ) {
+            switch(++tabs) {
+                case 1:
+                    rc = pstring_assign(&file->name, str, t - str);
+                    break;
+                case 2:
+                    if( (rc = pstring_append(&file->name, "_", 1)) == 0 ) {
+                        rc = pstring_append(&file->name, str, t - str);
+                    }
+                    break;
+                case 3:
+                case 4:
+                case 5:
+                case 6:
+                    errno = 0;
+                    file->coord[tabs - 3] = strtol(str, NULL, 10);
+                    if( errno != 0 ) {
+                        file->coord[tabs - 3] = 0;
+                    }
+                    if( (rc = pstring_append(&file->name, ":", 1)) == 0 ) {
+                        rc = pstring_append(&file->name, str, t - str);
+                    }
+                    break;
+                case 7:
+                    if( t - str != 1 || (*str != '0' && *str != '1') ) {
+                        rc = pstring_assign(&file->barcode, str, t - str);
+                    }
+                    break;
+                case 8:
+                    if( t - str != 1 || !isdigit(*str) ) {
+                        rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcInvalid);
+                    } else {
+                        file->read.read_id = *str - '0';
+                        if( file->read.read_id == 0 ) {
+                            file->read.read_id = ILLUMINAWRITER_READID_NONE;
+                        }
+                    }
+                    break;
+                case 9:
+                    rc = pstring_assign(&file->read.seq, str, t - str);
+                    break;
+                case 10:
+                    file->read.qual_type = ILLUMINAWRITER_COLMASK_QUALITY_PHRED;
+                    rc = pstring_assign(&file->read.qual, str, t - str);
+                    break;
+            }
+            str = ++t;
+        }
+    } while( rc == 0 && t != NULL && str < end );
+
+    if( rc == 0 ) {
+        if( tabs == 9 ) {
+            file->read.qual_type = ILLUMINAWRITER_COLMASK_QUALITY_PHRED;
+            rc = pstring_assign(&file->read.qual, str, end - str);
+        } else if( tabs == 10 ) {
+            if( end - str != 1 ) {
+                rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcInvalid);
+            } else if( *str == '1' ) {
+                file->read.filter = SRA_READ_FILTER_PASS;
+            } else if( *str == '0' ) {
+                file->read.filter = SRA_READ_FILTER_REJECT;
+            } else {
+                rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcInvalid);
+            }
+        } else {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcInvalid);
+        }
+        if( rc == 0 ) {
+            if( file->read.seq.len != file->read.qual.len ) {
+                rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcInconsistent);
+            } else {
+                rc = pstring_quality_convert(&file->read.qual, eExperimentQualityEncoding_Ascii, 64, 0, 0x7F);
+            }
+        }
+    }
+    return rc;
+}
+
+static
+rc_t read_quality(const char* data, size_t data_sz, IlluminaRead* read)
+{
+    rc_t rc = 0;
+
+    if( (rc = pstring_assign(&read->qual, data, data_sz)) == 0 ) {
+        if( (rc = pstring_quality_convert(&read->qual, eExperimentQualityEncoding_Decimal, 0, -128, 127)) == 0 ) {
+            read->qual_type = ILLUMINAWRITER_COLMASK_QUALITY_LOGODDS4;
+        }
+    }
+    return rc;
+}
+
+static
+rc_t read_spot_coord(IlluminaFileInfo* file, const char* data, size_t data_sz, const char** tail)
+{
+    rc_t rc = 0;
+    const char* t, *str = data, *end = data + data_sz;
+    int tabs = 0;
+
+    if( tail ) {
+        *tail = NULL;
+    }
+    do {
+        if( (t = memchr(str, '\t', end - str)) != NULL ) {
+            switch(++tabs) {
+                case 1:
+                    errno = 0;
+                    file->coord[0] = strtol(str, NULL, 10);
+                    if( errno != 0 ) {
+                        file->coord[0] = 0;
+                    }
+                    rc = pstring_assign(&file->name, str, t - str);
+                    break;
+                case 2:
+                case 3:
+                case 4:
+                    errno = 0;
+                    file->coord[tabs - 1] = strtol(str, NULL, 10);
+                    if( errno != 0 ) {
+                        file->coord[tabs - 1] = 0;
+                    }
+                    if( (rc = pstring_append(&file->name, ":", 1)) == 0 ) {
+                        rc = pstring_append(&file->name, str, t - str);
+                    }
+                    if( tail ) {
+                        *tail = t + 1;
+                    }
+                    break;
+            }
+            str = ++t;
+        }
+    } while( rc == 0 && t != NULL && str < end && tabs < 4 );
+
+    if( tabs < 4 ) {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcTooShort);
+    }
+    return rc;
+}
+
+static
+rc_t read_signal(const char* data, size_t data_sz, pstring* str)
+{
+    rc_t rc = 0;
+    double d;
+    const char* c = data, *end = data + data_sz;
+    float* f = (float*)str->data;
+    float* fend = (float*)(str->data + sizeof(str->data));
+
+    while( rc == 0 && c != end ) {
+        char* next;
+        errno = 0;
+        d = strtod(c, &next);
+        if( errno != 0 ) {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcOutofrange);
+        } else if( d == 0 && c == next ) {
+            break;
+        } else {
+            c = next;
+            if( f >= fend ) {
+                rc = RC(rcSRA, rcFormatter, rcReading, rcBuffer, rcInsufficient);
+            }
+            *f++ = d;
+        }
+    }
+    if( rc == 0 ) {
+        str->len = (f - (float*)str->data) * sizeof(*f);
+        if( str->len == 0 ) {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcEmpty);
+        }
+    }
+    return rc;
+}
+
+/* reads from a file data for a sinlge spot, data may be partial */
+static
+rc_t read_next_spot(const char* blk_pfx, IlluminaFileInfo* file)
+{
+    rc_t rc = 0;
+    const char* tail = file->line;
+
+    if( file->ready ) {
+        /* data still not used */
+        return 0;
+    }
+    IlluminaFileInfo_init(file);
+    if( (rc = file_read_line(file, true)) != 0 ) {
+        return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading more data");
+    } else if( file->line == NULL ) {
+        return 0; /* eof */
+    }
+    switch( file->type ) {
+        case eIlluminaNativeFileTypeQSeq:
+            if( (rc = parse_qseq(file, file->line, file->line_len)) != 0 ) {
+                return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading qseq");
+            }
+            break;
+
+        case eIlluminaNativeFileTypeFasta:
+        case eIlluminaNativeFileTypeNoise:
+        case eIlluminaNativeFileTypeIntensity:
+        case eIlluminaNativeFileTypeSignal:
+            {{
+                /* read only common first 4 coords into name and prepend with DATA_BLOCK/@name */
+                if( (rc = read_spot_coord(file, file->line, file->line_len, &tail)) == 0 ) {
+                    if( blk_pfx != NULL ) {
+                        pstring tmp_name;
+                        if( (rc = pstring_copy(&tmp_name, &file->name)) == 0 &&
+                            (rc = pstring_assign(&file->name, blk_pfx, strlen(blk_pfx))) == 0 &&
+                            (rc = pstring_append(&file->name, ":", 1)) == 0 ) {
+                            rc = pstring_concat(&file->name, &tmp_name);
+                        }
+                    }
+                }
+                if( rc != 0 ) {
+                    return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading spot coord");
+                }
+                break;
+            }}
+
+        case eIlluminaNativeFileTypeQuality4:
+            if( (rc = read_quality(file->line, file->line_len, &file->read)) != 0 ) {
+                return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading quality");
+            } else if( (rc = pstring_assign(&file->name, blk_pfx, strlen(blk_pfx))) != 0 ) {
+                return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=name for quality 4");
+            }
+            break;
+
+        default:
+            rc = RC(rcSRA, rcFormatter, rcReading, rcFileFormat, rcUnknown);
+            return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=processing data line");
+            break;
+    }
+
+    /* process tail (after coords) for some file types */
+    file->line_len -= tail - file->line; /* length of tail */
+    switch( file->type ) {
+        case eIlluminaNativeFileTypeQSeq:
+        case eIlluminaNativeFileTypeQuality4:
+        default:
+            /* completely processed before */
+            break;
+
+        case eIlluminaNativeFileTypeFasta:
+            if( (rc = pstring_assign(&file->read.seq, tail, file->line_len)) != 0 ||
+                !pstring_is_fasta(&file->read.seq) ) {
+                rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcCorrupt);
+                return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=reading fasta");
+            }
+            break;
+
+        case eIlluminaNativeFileTypeNoise:
+            if( (rc = read_signal(tail, file->line_len, &file->read.noise)) != 0 ) {
+                return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=converting noise");
+            }
+            break;
+
+        case eIlluminaNativeFileTypeIntensity:
+            if( (rc = read_signal(tail, file->line_len, &file->read.intensity)) != 0 ) {
+                return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=converting intensity");
+            }
+            break;
+
+        case eIlluminaNativeFileTypeSignal:
+            if( (rc = read_signal(tail, file->line_len, &file->read.signal)) != 0 ) {
+                return SRALoaderFile_LOG(file->file, klogErr, rc, "$(msg)", "msg=converting signal");
+            }
+            break;
+    }
+    file->line = NULL;
+    file->ready = true;
+#if _DEBUGGING
+    DEBUG_MSG(3, ("name:'%s' [%li:%li:%li:%li]\n", file->name.data, 
+                file->coord[0], file->coord[1], file->coord[2], file->coord[3]));
+    if( file->read.seq.len ) {
+        DEBUG_MSG(3, ("seq:'%.*s'\n", file->read.seq.len, file->read.seq.data));
+    }
+    if( file->read.qual.len ) {
+        DEBUG_MSG(3, ("qual{0x%x}: %u bytes\n", file->read.qual_type, file->read.qual.len));
+    }
+#endif
+    return 0;
+}
+
+struct IlluminaLoaderFmt {
+    SRALoaderFmt dad;
+    const SRAWriterIllumina* writer;
+    bool skip_intensity;
+    bool skip_signal;
+    bool skip_noise;
+    int64_t spots_bad_allowed;
+    int64_t spots_bad_count;
+};
+
+typedef struct FGroup_struct {
+    SLNode dad;
+    pstring key; /* part of filename w/o path up to ftypes value above */
+    const char* blk_pfx;
+    EIlluminaNativeFileType mask;
+    IlluminaFileInfo* files;
+} FGroup;
+
+typedef struct FGroup_Find_data_struct {
+    FGroup* found;
+    pstring key;
+} FGroup_Find_data;
+
+bool FGroup_Find( SLNode *node, void *data )
+{
+    FGroup* n = (FGroup*)node;
+    FGroup_Find_data* d = (FGroup_Find_data*)data;
+    IlluminaFileInfo* file = n->files;
+
+    while( file != NULL ) {
+        if( pstring_cmp(&file->name, &d->key) == 0 ) {
+            d->found = n;
+            return true;
+        }
+        file = file->next;
+    }
+    if( pstring_cmp(&d->key, &n->key) == 0 ) {
+        d->found = n;
+        return true;
+    }
+    return false;
+}
+
+void FGroup_Validate( SLNode *node, void *data )
+{
+    rc_t* rc = (rc_t*)data;
+    static EIlluminaNativeFileType mask = eIlluminaNativeFileTypeNotSet;
+    FGroup* n = (FGroup*)node;
+    IlluminaFileInfo* file = n->files;
+
+    DEBUG_MSG(3, ("==> group: '%s'\n", n->key.data));
+    while( file != NULL ) {
+        DEBUG_MSG(3, ("file: type %u '%s'\n", file->type, file->name.data));
+        if( mask == eIlluminaNativeFileTypeNotSet ) {
+            mask = n->mask;
+            if( !(mask & (eIlluminaNativeFileTypeFasta | eIlluminaNativeFileTypeQSeq)) ) {
+                *rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcNotFound);
+                SRALoaderFile_LOG(file->file, klogErr, *rc, "file group '$(p)*': sequence data", PLOG_S(p) , n->key.data);
+            }
+            if( (mask & eIlluminaNativeFileTypeFasta) && (mask & eIlluminaNativeFileTypeQSeq) ) {
+                *rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcDuplicate);
+                SRALoaderFile_LOG(file->file, klogErr, *rc, "file group '$(p)*': _seq and _qseq", PLOG_S(p) , n->key.data);
+            }
+            if( !(mask & eIlluminaNativeFileTypeQuality4) && !(mask & eIlluminaNativeFileTypeQSeq) ) {
+                *rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcNotFound);
+                SRALoaderFile_LOG(file->file, klogErr, *rc, "file group '$(p)*': quality data", PLOG_S(p) , n->key.data);
+            }
+        } else if( mask != n->mask ) {
+            *rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcInconsistent);
+            SRALoaderFile_LOG(file->file, klogErr, *rc, "file group '$(p)*': no match in spot names on 1st lines across files in group",
+                              PLOG_S(p) , n->key.data);
+        }
+        file = file->next;
+    }
+    DEBUG_MSG(3, ("<== group: '%s'\n", n->key.data));
+}
+
+void FGroup_Whack(SLNode *n, void *data )
+{
+    if( n != NULL ) {
+        FGroup* node = (FGroup*)n;
+        IlluminaFileInfo* file = node->files;
+
+        while( file != NULL ) {
+            IlluminaFileInfo* x = file;
+            file = file->next;
+            free(x);
+        }
+        free(node);
+    }
+}
+
+typedef struct FGroup_Parse_data_struct {
+    rc_t rc;
+    IlluminaLoaderFmt* self;
+    IlluminaSpot spot;
+} FGroup_Parse_data;
+
+bool FGroup_Parse( SLNode *n, void *d )
+{
+    FGroup_Parse_data* data = (FGroup_Parse_data*)d;
+    FGroup* g = (FGroup*)n;
+    bool done;
+    const SRALoaderFile* data_block_ref = NULL;
+
+    data->rc = 0;
+    do {
+        IlluminaFileInfo* file = g->files;
+        done = true;
+        while( data->rc == 0 && file != NULL ) {
+            if( (data->rc = read_next_spot(g->blk_pfx, file)) == 0 && file->ready ) {
+                done = false;
+            }
+            file = file->next;
+        }
+        if( data->rc != 0 || done ) {
+            break;
+        }
+        /* collect spot reads, matching by spot name
+         * spot data may be split across multiple files
+         */
+        IlluminaSpot_Init(&data->spot);
+        file = g->files;
+        while( data->rc == 0 && file != NULL ) {
+            if( file->ready ) {
+                if( (file->type == eIlluminaNativeFileTypeNoise && data->self->skip_noise) ||
+                    (file->type == eIlluminaNativeFileTypeIntensity && data->self->skip_intensity) ||
+                    (file->type == eIlluminaNativeFileTypeSignal && data->self->skip_signal) ) {
+                    file->ready = false;
+                } else {
+                    data_block_ref = file->file;
+                    if( file->type == eIlluminaNativeFileTypeQSeq && (g->mask & eIlluminaNativeFileTypeQuality4) ) {
+                        /* drop quality1 from qseq data */
+                        pstring_clear(&file->read.qual);
+                    } else if( file->type == eIlluminaNativeFileTypeQuality4 ) {
+                        IlluminaFileInfo* neib = file->next ? file->next : file->prev;
+                        /* need to fix spotname to be same cause prb do not have any name in it */
+                        if( (data->rc = pstring_copy(&file->name, &neib->name)) != 0 ) {
+                            SRALoaderFile_LOG(file->file, klogErr, data->rc, "$(msg) '$(n)'", "msg=syncing prb spot name,n=%s", neib->name.data);
+                        }
+                    }
+                    if( data->rc == 0 ) {
+                        data->rc = IlluminaSpot_Add(&data->spot, &file->name, &file->barcode, &file->read);
+                        if( data->rc == 0 ) {
+                            file->ready = false;
+                        } else {
+                            if( GetRCState(data->rc) == rcIgnored ) {
+                                SRALoaderFile_LOG(file->file, klogWarn, data->rc, "$(msg) '$(s1)' <> '$(s2)'",
+                                                "msg=spot name mismatch,s1=%.*s,s2=%.*s",
+                                                data->spot.name->len, data->spot.name->data, file->name.len, file->name.data);
+                                data->self->spots_bad_count++;
+                                /* skip spot for all files in a group */
+                                file = g->files;
+                                while( file != NULL ) {
+                                    file->ready = false;
+                                    SRALoaderFile_LOG(file->file, klogWarn, data->rc,
+                                                      "$(msg) '$(n)'", "msg=skipped spot,n=%s", file->name.data);
+                                    file = file->next;
+                                }
+                                if( data->self->spots_bad_allowed >= 0 &&
+                                    data->self->spots_bad_count > data->self->spots_bad_allowed ) {
+                                    data->rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcInvalid);
+                                }
+                                break;
+                            }
+                        }
+                    }
+                }
+            }
+            file = file->next;
+        }
+        if( GetRCState(data->rc) == rcIgnored ) {
+            data->rc = 0;
+            continue;
+        }
+        if( data->rc == 0 ) {
+            data->rc = SRAWriterIllumina_Write(data->self->writer, data_block_ref, &data->spot);
+        }
+    } while( data->rc == 0 );
+    return data->rc != 0;
+}
+
+static
+rc_t IlluminaLoaderFmt_WriteData(IlluminaLoaderFmt* self, uint32_t argc, const SRALoaderFile* const argv[], int64_t* spots_bad_count)
+{
+    rc_t rc = 0;
+    uint32_t t, i, k, ftype_q = sizeof(file_types) / sizeof(file_types[0]);
+    SLList files;
+    IlluminaFileInfo* file = NULL;
+
+    SLListInit(&files);
+
+    /* group files using spotname, for _prb. file name prefix is used,
+       files reviewed by type detected from name and ordered by file_type array */
+    for(t = 0; rc == 0 && t < ftype_q; t++) {
+        for(i = 0; rc == 0 && i < argc; i++) {
+            const char* fname, *blk_pfx;
+            int prefix_len = 0;
+            ERunFileType ftype;
+            EIlluminaNativeFileType type = eIlluminaNativeFileTypeNotSet;
+            FGroup_Find_data data;
+
+            if( (rc = SRALoaderFileName(argv[i], &fname)) != 0 ) {
+                SRALoaderFile_LOG(argv[i], klogErr, rc, "reading file name", NULL);
+                break;
+            }
+            if( (rc = SRALoaderFile_FileType(argv[i], &ftype)) != 0 ) {
+                SRALoaderFile_LOG(argv[i], klogErr, rc, "reading file type", NULL);
+                break;
+            }
+            if( (rc = SRALoaderFileBlockName(argv[i], &blk_pfx)) != 0 ) {
+                SRALoaderFile_LOG(argv[i], klogErr, rc, "reading DATA_BLOCK/@name", NULL);
+                break;
+            }
+            if( blk_pfx == NULL ) {
+                blk_pfx = "";
+            }
+            {{
+                /* skip path if present */
+                const char* p = strrchr(fname, '/');
+                fname = p ? p + 1 : fname;
+                p = NULL;
+                for(k = 0; type == eIlluminaNativeFileTypeNotSet && k < ftype_q; k++) {
+                    const char* const* e = file_types[k].key;
+                    while( *e != NULL ) {
+                        p = strstr(fname, *e++);
+                        if( p != NULL ) {
+                            type = file_types[k].type;
+                            break;
+                        } 
+                    }
+                }
+                if( p != NULL ) {
+                    prefix_len = p - fname;
+                }
+            }}
+            if( ftype == rft_IlluminaNativeSeq ) {
+                type = eIlluminaNativeFileTypeFasta;
+            } else if( ftype == rft_IlluminaNativePrb ) {
+                type = eIlluminaNativeFileTypeQuality4;
+            } else if( ftype == rft_IlluminaNativeInt ) {
+                type = eIlluminaNativeFileTypeIntensity;
+            } else if( ftype == rft_IlluminaNativeQseq ) {
+                type = eIlluminaNativeFileTypeQSeq;
+            }
+            if( type == eIlluminaNativeFileTypeNotSet ) {
+                rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcUnrecognized);
+                SRALoaderFile_LOG(argv[i], klogErr, rc, "detecting file type by file name", NULL);
+                break;
+            }
+            if( type != file_types[t].type ) {
+                /* one type at a time */
+                continue;
+            }
+            DEBUG_MSG(3, ("file '%s' type set to %d\n", fname, type));
+            file = calloc(1, sizeof(*file));
+            if( file == NULL ) {
+                rc = RC(rcSRA, rcFormatter, rcReading, rcMemory, rcExhausted);
+                SRALoaderFile_LOG(argv[i], klogErr, rc, "allocating file object", NULL);
+                break;
+            }
+            IlluminaFileInfo_init(file);
+            file->file = argv[i];
+            file->type = type;
+
+            if( file->type == eIlluminaNativeFileTypeQuality4 ) {
+                /* in _prb there is no spotname inside so use file prefix */
+                rc = pstring_assign(&data.key, fname, prefix_len);
+            } else {
+                /* try to get 1st spot so group can be organized by spot name */
+                if( (rc = read_next_spot(blk_pfx, file)) != 0 || !file->ready ) {
+                    rc = rc ? rc : RC(rcSRA, rcFormatter, rcReading, rcData, rcNotFound);
+                    SRALoaderFile_LOG(argv[i], klogErr, rc, "reading 1st spot", NULL);
+                    break;
+                }
+                rc = pstring_copy(&data.key, &file->name);
+            }
+
+            data.found = NULL;
+            if( SLListDoUntil(&files, FGroup_Find, &data) && data.found != NULL ) {
+                IlluminaFileInfo* ss = data.found->files;
+
+                while( rc == 0 && file != NULL ) {
+                    if( ss->type != eIlluminaNativeFileTypeQSeq && ss->type == file->type ) {
+                        rc = RC(rcSRA, rcFormatter, rcReading, rcFile, rcDuplicate);
+                        SRALoaderFile_LOG(argv[i], klogErr, rc, "type of file for lane", NULL);
+                    } else if( ss->next != NULL ) {
+                        ss = ss->next;
+                    } else {
+                        ss->next = file;
+                        file->prev = ss;
+                        data.found->mask |= file->type;
+                        file = NULL;
+                    }
+                }
+            } else {
+                data.found = calloc(1, sizeof(*data.found));
+                if( data.found == NULL ) {
+                    rc = RC(rcSRA, rcFormatter, rcReading, rcMemory, rcInsufficient);
+                    SRALoaderFile_LOG(argv[i], klogErr, rc, "preparing file group", NULL);
+                    break;
+                } else {
+                    if( (rc = pstring_assign(&data.found->key, fname, prefix_len)) != 0 ) {
+                        SRALoaderFile_LOG(argv[i], klogErr, rc, "setting file group key", NULL);
+                        FGroup_Whack(&data.found->dad, NULL);
+                        break;
+                    } else {
+                        FGroup* curr = (FGroup*)SLListHead(&files), *prev = NULL;
+                        data.found->blk_pfx = blk_pfx;
+                        data.found->files = file;
+                        data.found->mask = file->type;
+                        /* group inserted into list by coords in 1st spot */
+                        while( curr != NULL ) {
+                            if( curr->files[0].coord[0] > file->coord[0] ||
+                                (curr->files[0].coord[0] == file->coord[0] &&
+                                 curr->files[0].coord[1] > file->coord[1]) ) {
+                                data.found->dad.next = &curr->dad;
+                                if( prev == NULL ) {
+                                    files.head = &data.found->dad;
+                                } else {
+                                    prev->dad.next = &data.found->dad;
+                                }
+                                break;
+                            }
+                            prev = curr;
+                            curr = (FGroup*)curr->dad.next;
+                        }
+                        if( curr == NULL ) {
+                            SLListPushTail(&files, &data.found->dad);
+                        }
+                        file = NULL;
+                    }
+                }
+            }
+        }
+    }
+    if( rc == 0 ) {
+        SLListForEach(&files, FGroup_Validate, &rc);
+    }
+    if( rc == 0 ) {
+        FGroup_Parse_data data;
+        data.self = self;
+        if( SLListDoUntil(&files, FGroup_Parse, &data) ) {
+            rc = data.rc;
+        }
+    } else {
+        free(file);
+    }
+    SLListWhack(&files, FGroup_Whack, NULL);
+    *spots_bad_count = self->spots_bad_count;
+    return rc;
+}
+
+static
+rc_t IlluminaLoaderFmt_Whack(IlluminaLoaderFmt *self, SRATable** table)
+{
+    SRAWriterIllumina_Whack(self->writer, table);
+    free(self);
+    return 0;
+}
+
+const char UsageDefaultName[] = "illumina-load";
+
+static
+rc_t IlluminaLoaderFmt_Version (const IlluminaLoaderFmt* self, uint32_t *vers, const char** name )
+{
+    *vers = KAppVersion();
+    *name = "Illumina native";
+    return 0;
+}
+
+static SRALoaderFmt_vt_v1 vtIlluminaLoaderFmt =
+{
+    1, 0,
+    IlluminaLoaderFmt_Whack,
+    IlluminaLoaderFmt_Version,
+    NULL,
+    IlluminaLoaderFmt_WriteData
+};
+
+rc_t SRALoaderFmtMake(SRALoaderFmt **self, const SRALoaderConfig *config)
+{
+    rc_t rc = 0;
+    IlluminaLoaderFmt* fmt;
+
+    if( self == NULL || config == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    *self = NULL;
+    fmt = calloc(1, sizeof(*fmt));
+    if(fmt == NULL) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+        LOGERR(klogInt, rc, "failed to initialize; out of memory");
+        return rc;
+    }
+    if( (rc = SRAWriterIllumina_Make(&fmt->writer, config)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize writer");
+    } else if( (rc = SRALoaderFmtInit(&fmt->dad, (const SRALoaderFmt_vt*)&vtIlluminaLoaderFmt)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize parent object");
+    }
+    if( rc != 0 ) {
+        IlluminaLoaderFmt_Whack(fmt, NULL);
+    } else {
+        fmt->skip_signal = (config->columnFilter & (efltrSIGNAL | efltrDEFAULT));
+        fmt->skip_noise = (config->columnFilter & (efltrNOISE | efltrDEFAULT));
+        fmt->skip_intensity = (config->columnFilter & (efltrINTENSITY | efltrDEFAULT));
+        fmt->spots_bad_allowed = config->spots_bad_allowed;
+        fmt->spots_bad_count = 0;
+        *self = &fmt->dad;
+    }
+    return rc;
+}
diff --git a/tools/sra-load/loader-file.c b/tools/sra-load/loader-file.c
new file mode 100644
index 0000000..feeff1a
--- /dev/null
+++ b/tools/sra-load/loader-file.c
@@ -0,0 +1,191 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*/
+#include <klib/rc.h>
+
+#include "loader-file.h"
+#include "debug.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+struct SRALoaderFile
+{
+    const DataBlock* data_block;
+    const DataBlockFileAttr* file_attr;
+    const KLoaderFile *lfile;
+};
+
+rc_t SRALoaderFile_IsEof(const SRALoaderFile* cself, bool* eof)
+{
+    return KLoaderFile_IsEof(cself ? cself->lfile : NULL, eof);
+}
+
+rc_t SRALoaderFile_LOG(const SRALoaderFile* cself, KLogLevel lvl, rc_t rc, const char *msg, const char *fmt, ...)
+{
+    va_list args;
+    va_start(args, fmt);
+    rc = KLoaderFile_VLOG(cself ? cself->lfile : NULL, lvl, rc, msg, fmt, args);
+    va_end(args);
+    return rc;
+}
+
+rc_t SRALoaderFile_Offset(const SRALoaderFile* cself, uint64_t* offset)
+{
+    return KLoaderFile_Offset(cself ? cself->lfile : NULL, offset);
+}
+
+rc_t SRALoaderFileReadline(const SRALoaderFile* cself, const void** buffer, size_t* length)
+{
+    return KLoaderFile_Readline(cself ? cself->lfile : NULL, buffer, length);
+}
+
+rc_t SRALoaderFileRead(const SRALoaderFile* cself, size_t advance, size_t size, const void** buffer, size_t* length)
+{
+    return KLoaderFile_Read(cself ? cself->lfile : NULL, advance, size, buffer, length);
+}
+
+rc_t SRALoaderFileName(const SRALoaderFile *cself, const char **name)
+{
+    return KLoaderFile_Name(cself ? cself->lfile : NULL, name);
+}
+
+rc_t SRALoaderFileFullName(const SRALoaderFile *cself, const char **name)
+{
+    return KLoaderFile_FullName(cself ? cself->lfile : NULL, name);
+}
+
+rc_t SRALoaderFileResolveName(const SRALoaderFile *self, char *resolved, size_t rsize)
+{
+    return KLoaderFile_ResolveName(self ? self->lfile : NULL, resolved, rsize);
+}
+
+rc_t SRALoaderFileBlockName ( const SRALoaderFile *cself, const char **block_name )
+{
+    if( cself == NULL || block_name == NULL ) {
+        return RC(rcSRA, rcFile, rcAccessing, rcParam, rcNull);
+    }
+    *block_name = cself->data_block->name;
+    return 0;
+}
+
+rc_t SRALoaderFileMemberName(const SRALoaderFile *cself, const char **member_name)
+{
+    if( cself == NULL || member_name == NULL ) {
+        return RC(rcSRA, rcFile, rcAccessing, rcParam, rcNull);
+    }
+    *member_name = cself->data_block->member_name;
+    return 0;
+}
+
+rc_t SRALoaderFileSector( const SRALoaderFile *cself, int64_t* sector)
+{
+    if( cself == NULL || sector == NULL ) {
+        return RC(rcSRA, rcFile, rcAccessing, rcParam, rcNull);
+    }
+    *sector = cself->data_block->sector;
+    return 0;
+}
+
+rc_t SRALoaderFileRegion( const SRALoaderFile *cself, int64_t* region)
+{
+    if( cself == NULL || region == NULL ) {
+        return RC(rcSRA, rcFile, rcAccessing, rcParam, rcNull);
+    }
+    *region = cself->data_block->region;
+    return 0;
+}
+
+rc_t SRALoaderFile_QualityScoringSystem( const SRALoaderFile *cself, ExperimentQualityType* quality_scoring_system )
+{
+    if( cself == NULL || quality_scoring_system == NULL ) {
+        return RC(rcSRA, rcFile, rcAccessing, rcParam, rcNull);
+    }
+    *quality_scoring_system = cself->file_attr->quality_scoring_system;
+    return 0;
+}
+
+rc_t SRALoaderFile_QualityEncoding( const SRALoaderFile *cself, ExperimentQualityEncoding* quality_encoding )
+{
+    if( cself == NULL || quality_encoding == NULL ) {
+        return RC(rcSRA, rcFile, rcAccessing, rcParam, rcNull);
+    }
+    *quality_encoding = cself->file_attr->quality_encoding;
+    return 0;
+}
+
+rc_t SRALoaderFile_AsciiOffset( const SRALoaderFile *cself, uint8_t* ascii_offset )
+{
+    if( cself == NULL || ascii_offset == NULL ) {
+        return RC(rcSRA, rcFile, rcAccessing, rcParam, rcNull);
+    }
+    *ascii_offset = cself->file_attr->ascii_offset;
+    return 0;
+}
+
+rc_t SRALoaderFile_FileType( const SRALoaderFile *cself, ERunFileType* filetype )
+{
+    if( cself == NULL || filetype == NULL ) {
+        return RC(rcSRA, rcFile, rcAccessing, rcParam, rcNull);
+    }
+    *filetype = cself->file_attr->filetype;
+    return 0;
+}
+
+rc_t SRALoaderFile_Release(const SRALoaderFile* cself)
+{
+    rc_t rc = 0;
+
+    if( cself ) {
+        SRALoaderFile* self = (SRALoaderFile*)cself;
+        /* may return md5 check error here */
+        rc = KLoaderFile_Release(self->lfile, false);
+        free(self);
+    }
+    return rc;
+}
+
+rc_t SRALoaderFile_Make(const SRALoaderFile **cself, const KDirectory* dir, const char* filename,
+                        const DataBlock* block, const DataBlockFileAttr* fileattr, const uint8_t* md5_digest, bool read_ahead)
+{
+    rc_t rc = 0;
+    SRALoaderFile* obj;
+
+    if( cself == NULL || block == NULL || fileattr == NULL ) {
+        rc = RC(rcSRA, rcFile, rcConstructing, rcParam, rcNull);
+    } else {
+        if( (obj = calloc(1, sizeof(*obj))) == NULL ) {
+            rc = RC(rcSRA, rcFile, rcConstructing, rcMemory, rcExhausted);
+        } else if( (rc = KLoaderFile_Make(&obj->lfile, dir, filename, md5_digest, read_ahead)) == 0 ) {
+            obj->data_block = block;
+            obj->file_attr = fileattr;
+            *cself = obj;
+        }
+        if( rc != 0 ) {
+            *cself = NULL;
+            SRALoaderFile_Release(obj);
+        }
+    }
+    return rc;
+}
diff --git a/tools/sra-load/loader-file.h b/tools/sra-load/loader-file.h
new file mode 100644
index 0000000..261eb32
--- /dev/null
+++ b/tools/sra-load/loader-file.h
@@ -0,0 +1,113 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _sra_load_file_
+#define _sra_load_file_
+
+#include <klib/defs.h>
+#include <klib/log.h>
+#include <kfs/file.h>
+#include <kfs/directory.h>
+#include <kapp/loader-file.h>
+
+#include "run-xml.h"
+
+/*--------------------------------------------------------------------------
+* SRA reader buffered input file
+*/
+typedef struct SRALoaderFile SRALoaderFile;
+
+rc_t SRALoaderFile_Make(const SRALoaderFile **cself, const KDirectory* dir, const char* filename,
+                        const DataBlock* block, const DataBlockFileAttr* fileattr, const uint8_t* md5_digest, bool read_ahead);
+
+rc_t SRALoaderFile_Release(const SRALoaderFile* cself);
+
+/* returns true if eof is reached and buffer is empty */
+rc_t SRALoaderFile_IsEof(const SRALoaderFile* cself, bool* eof);
+
+/* print error msg file file info and return original!! rc
+   if msg is NULL fmt is not used so call with NULL, NULL if no msg needs to be printed */
+rc_t SRALoaderFile_LOG(const SRALoaderFile* cself, KLogLevel lvl, rc_t rc, const char *msg, const char *fmt, ...);
+
+/* returns current buffer position in file */
+rc_t SRALoaderFile_Offset(const SRALoaderFile* cself, uint64_t* offset);
+
+/* file name */
+rc_t SRALoaderFileName ( const SRALoaderFile *cself, const char **name );
+
+rc_t SRALoaderFileFullName(const SRALoaderFile *cself, const char **name);
+
+rc_t SRALoaderFileResolveName(const SRALoaderFile  *self, char *resolved, size_t rsize);
+
+/* DATA_BLOCK name attribute */
+rc_t SRALoaderFileBlockName ( const SRALoaderFile *cself, const char **block_name );
+
+/* DATA_BLOCK member_name attribute */
+rc_t SRALoaderFileMemberName ( const SRALoaderFile *cself, const char **member_name );
+
+/* DATA_BLOCK sector attribute */
+rc_t SRALoaderFileSector( const SRALoaderFile *cself, int64_t* sector);
+
+/* DATA_BLOCK region attribute */
+rc_t SRALoaderFileRegion( const SRALoaderFile *cself, int64_t* region);
+
+/* FILE @quality_scoring_system */
+rc_t SRALoaderFile_QualityScoringSystem( const SRALoaderFile *scelf, ExperimentQualityType* quality_scoring_system );
+
+/* FILE @quality_encoding */
+rc_t SRALoaderFile_QualityEncoding( const SRALoaderFile *cself, ExperimentQualityEncoding* quality_encoding );
+
+/* FILE @ascii_offset */
+rc_t SRALoaderFile_AsciiOffset( const SRALoaderFile *cself, uint8_t* ascii_offset );
+
+/* FILE @filetype */
+rc_t SRALoaderFile_FileType( const SRALoaderFile *cself, ERunFileType* filetype );
+
+/* Readline
+ *  makes next line from a file available in buffer.
+ *  eligable EOL symbols are: \n (unix), \r (older mac), \r\n (win)
+ *  EOL symbol(s) never included in buffer length.
+ *  if there is no EOL at EOF - not an error.
+ *  fails if internal buffer is insufficient.
+ *  buffer is NULL on EOF
+ *  rc state of (rcString rcTooLong) means line was too long
+ *              you may copy line and readline again for the tail of the line
+ *
+ *  "buffer" [ OUT ] and "length" [ OUT ] - returned line and it's length
+ */
+rc_t SRALoaderFileReadline(const SRALoaderFile* cself, const void** buffer, size_t* length);
+
+/* Read
+*  reads "size" bytes from file and makes them available through "buffer"
+*  if "advance" is > 0 than before reading skips "advance" bytes in file
+*  if "size" == 0 then nothing is read and available "length" bytes is returned in "buffer"
+*
+*  "buffer" [ OUT ] - pointer to read bytes, "buffer" NULL means EOF
+*  "length" [ OUT ] - number of read bytes, normally == size,
+                      if less than requested size, rc is [rcBuffer,rcInsufficient], advance and read more!
+*/
+rc_t SRALoaderFileRead(const SRALoaderFile* cself, size_t advance, size_t size, const void** buffer, size_t* length);
+
+#endif /* _sra_load_file_ */
diff --git a/tools/sra-load/loader-fmt.c b/tools/sra-load/loader-fmt.c
new file mode 100644
index 0000000..2e11457
--- /dev/null
+++ b/tools/sra-load/loader-fmt.c
@@ -0,0 +1,165 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include "loader-fmt.h"
+
+rc_t SRALoaderFmtInit( SRALoaderFmt *self, const SRALoaderFmt_vt *vt )
+{
+    rc_t rc = 0;
+
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcSelf, rcNull);
+    } else if( vt == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcInterface, rcNull);
+    } else {
+        switch( vt->v1.maj ) {
+            case 0:
+                rc = RC(rcSRA, rcFormatter, rcConstructing, rcInterface, rcInvalid);
+                break;
+            case 1:
+                if( vt->v1.destroy == NULL || vt->v1.version == NULL ||
+                    (vt->v1.write_data == NULL && vt->v1.exec_prep == NULL) ) {
+                    rc = RC(rcSRA, rcFormatter, rcConstructing, rcInterface, rcInvalid);
+                }
+                break;
+            default:
+                rc = RC(rcSRA, rcFormatter, rcConstructing, rcInterface, rcBadVersion);
+                break;
+        }
+    }
+    if( rc == 0 ) {
+        self->vt = vt;
+    } else if( KLogLastErrorCode() != rc ) {
+        PLOGERR( klogInt, (klogInt, rc, "failed to initialize loader formatter version $(maj).$(min)",
+                              "maj=%u,min=%u", vt ? vt->v1.maj : 0, vt ? vt->v1.min : 0));
+    }
+    return rc;
+}
+
+rc_t SRALoaderFmtRelease ( const SRALoaderFmt *cself, SRATable** table )
+{
+    rc_t rc = 0;
+
+    if( cself != NULL ) {
+        SRALoaderFmt *self = (SRALoaderFmt*)cself;
+        switch( self->vt->v1.maj ) {
+            case 1:
+                rc = self->vt ->v1.destroy(self, table);
+                break;
+
+            default:
+                rc = RC(rcSRA, rcFormatter, rcDestroying, rcInterface, rcBadVersion);
+                PLOGERR( klogInt, (klogInt, rc, "failed to release loader formatter with interface version $(maj).$(min)",
+                         "maj=%u,min=%u", self->vt->v1.maj, self->vt->v1.min));
+                break;
+        }
+    }
+    return rc;
+}
+
+rc_t SRALoaderFmtVersion ( const SRALoaderFmt *self, uint32_t *vers, const char** name )
+{
+    rc_t rc = 0;
+
+    if( self == NULL || vers == NULL || name == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcAccessing, rcParam, rcNull);
+    } else {
+        *vers = 0;
+        *name = NULL;
+        switch( self->vt->v1.maj ) {
+            case 1:
+                rc = self->vt->v1.version(self, vers, name);
+                break;
+            default:
+                rc = RC(rcSRA, rcFormatter, rcAccessing, rcInterface, rcBadVersion);
+                PLOGERR( klogInt, (klogInt, rc, "failed to read loader formatter version with interface version $(maj).$(min)",
+                    "maj=%u,min=%u", self ? self->vt->v1.maj : 0, self ? self->vt->v1.min : 0));
+                break;
+        }
+    }
+    return rc;
+}
+
+rc_t SRALoaderFmtWriteData ( SRALoaderFmt *self, uint32_t argc, const SRALoaderFile *const argv [], int64_t* spots_bad_count )
+{
+    rc_t rc = 0;
+
+    if( self == NULL ) {
+        rc = RC( rcSRA, rcFormatter, rcWriting, rcSelf, rcNull);
+    } else if( argv == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcArgv, rcNull);
+    } else if( argc == 0 ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcArgv, rcEmpty);
+    } else if( spots_bad_count == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcParam, rcNull);
+    } else {
+        switch( self->vt->v1.maj ) {
+            case 1:
+                if( self->vt->v1.write_data == NULL ) {
+                    rc = RC(rcSRA, rcFormatter, rcCreating, rcInterface, rcNull);
+                } else {
+                    rc = self->vt->v1.write_data(self, argc, argv, spots_bad_count);
+                }
+                break;
+            default:
+                rc = RC(rcSRA, rcFormatter, rcWriting, rcInterface, rcBadVersion);
+                PLOGERR ( klogInt, ( klogInt, rc, "failed to load data with interface version $(maj).$(min)",
+                    "maj=%u,min=%u", self ? self->vt->v1.maj : 0, self ? self->vt->v1.min : 0));
+                break;
+        }
+    }
+    return rc;
+}
+
+rc_t SRALoaderFmtExecPrep(const SRALoaderFmt *self, const TArgs* args, const SInput* input,
+                          const char** path, const char* eargs[], size_t max_eargs)
+{
+    rc_t rc = 0;
+
+    if( self == NULL ) {
+        rc = RC( rcSRA, rcFormatter, rcCreating, rcSelf, rcNull);
+    } else if( args == NULL || input == NULL || path == NULL || eargs == NULL || max_eargs == 0 ) {
+        rc = RC(rcSRA, rcFormatter, rcCreating, rcParam, rcInvalid);
+    } else {
+        switch( self->vt->v1.maj ) {
+            case 1:
+                if( self->vt->v1.exec_prep == NULL ) {
+                    rc = RC(rcSRA, rcFormatter, rcCreating, rcInterface, rcNull);
+                } else {
+                    rc = self->vt->v1.exec_prep(self, args, input, path, eargs, max_eargs);
+                }
+                break;
+            default:
+                rc = RC(rcSRA, rcFormatter, rcCreating, rcInterface, rcBadVersion);
+                PLOGERR ( klogInt, ( klogInt, rc, "failed to load data with interface version $(maj).$(min)",
+                    "maj=%u,min=%u", self ? self->vt->v1.maj : 0, self ? self->vt->v1.min : 0));
+                break;
+        }
+    }
+    return rc;
+}
diff --git a/tools/sra-load/loader-fmt.h b/tools/sra-load/loader-fmt.h
new file mode 100644
index 0000000..9ef888c
--- /dev/null
+++ b/tools/sra-load/loader-fmt.h
@@ -0,0 +1,171 @@
+/*=======================================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _sra_load_loader_fmt_
+#define _sra_load_loader_fmt_
+
+#include <kfs/directory.h>
+#include <kapp/args.h>
+#include <kapp/log-xml.h>
+
+#include "loader-file.h"
+#include "experiment-xml.h"
+
+typedef struct ResultXML {
+    char *file;
+    char *name;
+    char *region;
+    char *sector;
+    char *member_name;
+} ResultXML;
+
+typedef struct ExpectedXML {
+    uint8_t number_of_results;
+    ResultXML **result;
+} ExpectedXML;
+
+typedef struct TArgs_struct {
+    const char *_runXmlPath;
+    const char* _input_path;
+    uint32_t _input_unpacked; /* as bool */
+    uint32_t _no_read_ahead; /* as bool */
+
+    const char *_experimentXmlPath;
+    const char *_target;
+    uint32_t _force_target; /* as bool */
+
+    int64_t _spots_to_run;
+    int64_t _spots_bad_allowed;
+    int _spots_bad_allowed_percentage;
+
+    const char* _expectedXmlPath;
+    int _intensities; /* trie state: 0 - default, 1 - on, 2 - off */
+
+    Args* args;
+    const XMLLogger* _xml_log;
+    RunXML* _run;
+    const KDirectory* _input_dir;
+    const ExperimentXML* _experiment;
+    const ExpectedXML* _expected;
+    SRAMgr* _sra_mgr;
+} TArgs;
+
+typedef struct SInput_struct {
+    struct {
+        const SRALoaderFile** files;
+        uint32_t count;
+    } *blocks;
+    uint32_t count;
+} SInput;
+
+/* Filter output columns */
+enum ESRAColumnFilter {
+    efltrINTENSITY = 0x01,
+    efltrNOISE     = 0x02,
+    efltrSIGNAL    = 0x04,
+    efltrDEFAULT   = 0x08 /* if this bit is set FE must decide for itself ignoring other bits!! */
+};
+
+typedef struct SRALoaderConfig_struct {
+    /* if spots_to_run >= 0 then reader must stop after writing given number of spots */
+	int64_t spots_to_run;
+    int64_t spots_bad_allowed;
+    /* combination of SRAColumnFilter values. If the corresponding bit is set then the column should be skipped */
+	uint64_t columnFilter;
+    const ExperimentXML* experiment;
+    const char* table_path;
+    SRAMgr* sra_mgr;
+    bool force_table_overwrite;
+} SRALoaderConfig;
+
+
+typedef union SRALoaderFmt_vt SRALoaderFmt_vt;
+
+typedef struct SRALoaderFmt_struct {
+    const SRALoaderFmt_vt *vt;
+} SRALoaderFmt;
+
+#ifndef SRALOADERFMT_IMPL
+#define SRALOADERFMT_IMPL SRALoaderFmt
+#endif
+
+typedef struct SRALoaderFmt_vt_v1_struct {
+    /* version == 1.x */
+    uint32_t maj;
+    uint32_t min;
+
+    /* start minor version == 0 */
+    rc_t ( * destroy ) ( SRALOADERFMT_IMPL *self, SRATable** table  );
+    rc_t ( * version ) ( const SRALOADERFMT_IMPL *self, uint32_t *vers, const char** name );
+    rc_t ( * exec_prep ) (const SRALOADERFMT_IMPL *self, const TArgs* args, const SInput* input,
+                                                    const char** path, const char* eargs[], size_t max_eargs);
+    rc_t ( * write_data ) ( SRALOADERFMT_IMPL *self, uint32_t argc, const SRALoaderFile *const argv [], int64_t* spots_bad_count );
+    /* end minor version == 0 */
+
+} SRALoaderFmt_vt_v1;
+
+union SRALoaderFmt_vt {
+    SRALoaderFmt_vt_v1 v1;
+};
+
+/* Make
+ *  allocate object based on SRALoaderFmt type and initialize it both using
+ *  SRALoaderFmtInit and SRALoaderConfig data
+ */
+rc_t SRALoaderFmtMake( SRALoaderFmt **self, const SRALoaderConfig *config );
+
+/* Init
+ *  initialize a newly allocated loader object
+ */
+rc_t SRALoaderFmtInit( SRALoaderFmt *self, const SRALoaderFmt_vt *vt);
+
+rc_t SRALoaderFmtRelease ( const SRALoaderFmt *self, SRATable** table );
+
+/* Version
+ *  return 4-part version code: 0xMMmmrrrr, where
+ *      MM = major release
+ *      mm = minor release
+ *    rrrr = bug-fix release
+ */
+rc_t SRALoaderFmtVersion ( const SRALoaderFmt *self, uint32_t *vers, const char** name );
+
+/* WriteData
+ *  reader will parse data from input files and write them to table
+ *  a row at a time.
+ *
+ *  "table" [ IN ] - an open, writable table with no open columns.
+ *  the reader should open columns with the appropriate data type
+ *  based upon its format and input files as determined during construction
+ *
+ *  "argc" [ IN ] and "argv" [ IN ] - input files positionally
+ *  corresponding to information given in reader configuration
+ *  data in XML node.
+ */
+rc_t SRALoaderFmtWriteData ( SRALoaderFmt *self, uint32_t argc, const SRALoaderFile *const argv [], int64_t* spots_bad_count );
+
+rc_t SRALoaderFmtExecPrep (const SRALoaderFmt *self, const TArgs* args, const SInput* input,
+                           const char** path, const char* eargs[], size_t max_eargs);
+
+#endif /* _sra_load_loader_fmt_ */
diff --git a/tools/sra-load/loader.c b/tools/sra-load/loader.c
new file mode 100644
index 0000000..d721263
--- /dev/null
+++ b/tools/sra-load/loader.c
@@ -0,0 +1,1135 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <kapp/main.h>
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <kxml/xml.h>
+#include <kfs/md5.h>
+#include <kfs/arc.h>
+#include <kfs/tar.h>
+#include <kfs/bzip.h>
+#include <kfs/gzip.h>
+#include <kfs/file.h>
+#include <kfs/directory.h>
+#include <kdb/meta.h>
+#include <kapp/loader-meta.h>
+#include <sra/wsradb.h>
+
+#include <os-native.h>
+
+#include "debug.h"
+#include "loader-fmt.h"
+#include "run-xml.h"
+#include "experiment-xml.h"
+#include "loader-file.h"
+
+#include <ctype.h>
+#include <string.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <assert.h>
+#include <limits.h>
+
+static KDirectory* s_Directory = NULL;
+static const KXMLMgr *s_XmlMgr = NULL;
+
+enum TArgsIndex {
+    targs_RunXML = 0,
+    targs_InputPath,
+    targs_InputUnpacked,
+    targs_InputNoCache,
+    targs_ExperimentXML,
+    targs_Target,
+    targs_ForceTarget,
+    targs_SpotsNumber,
+    targs_BadSpotsNumber,
+    targs_BadSpotPercentage,
+    targs_ExpectedXML,
+    targs_Intensities,
+    targs_ArgsQty
+};
+
+const char* usage_text[targs_ArgsQty][5] = {
+	{ "path to run.xml describing input files", NULL },
+	{ "input files location, default '.'", NULL },
+	{ "input files are unpacked", NULL },
+    { "disable input files threaded caching", NULL },
+	{ "path to experiment.xml", NULL },
+    { "target location", NULL },
+	{ "force target overwrite", NULL },
+	{ "process only given number of spots from input", NULL },
+	{ "acceptable number of spot creation errors, default is 50", NULL },
+	{ "acceptable percentage of spots creation errors, default is 5", NULL },
+	{ "path to expected.xml", NULL },
+	{ "[on | off] load intensity data, default is off. For ",
+      "  Illumina: signal, intensity, noise;",
+      "  AB SOLiD: signal(s);",
+      "  LS454: signal, position (for SFF files this option is ON by default).", NULL },
+};
+
+OptDef TArgsDef[] =
+{
+    /* if you change order in this array, rearrange enum and usage_text above accordingly! */
+    {"run-xml", "r", NULL, usage_text[targs_RunXML], 1, true, true},
+    {"input-path", "i", NULL, usage_text[targs_InputPath], 1, true, false},
+    {"input-unpacked", "u", NULL, usage_text[targs_InputUnpacked], 1, false, false},
+    {"input-no-threads", "t", NULL, usage_text[targs_InputNoCache], 1, false, false},
+    {"experiment", "e", NULL, usage_text[targs_ExperimentXML], 1, true, true},
+    {"output-path", "o", NULL, usage_text[targs_Target], 1, true, true},
+    {"force", "f", NULL, usage_text[targs_ForceTarget], 1, false, false},
+    {"spots-number", "n", NULL, usage_text[targs_SpotsNumber], 1, true, false},
+    {"bad-spot-number", "bE", NULL, usage_text[targs_BadSpotsNumber], 1, true, false},
+    {"bad-spot-percentage", "p", NULL, usage_text[targs_BadSpotPercentage], 1, true, false},
+    {"expected", "x", NULL, usage_text[targs_ExpectedXML], 1, true, false},
+    {"intensities", "s", NULL, usage_text[targs_Intensities], 1, true, false}
+};
+
+rc_t CC UsageSummary (const char * progname)
+{
+    OUTMSG(( "\nUsage:\n\t%s [options] -r run.xml -e experiment.xml -o output-path\n\n", progname));
+    return 0;
+}
+
+rc_t Usage( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+    int i;
+
+    if(args == NULL) {
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    } else {
+        rc = ArgsProgram (args, &fullpath, &progname);
+    }
+    if(rc != 0 ) {
+        progname = fullpath = UsageDefaultName;
+    }
+    UsageSummary(progname);
+
+    for(i = 0; i < targs_ArgsQty; i++ ) {
+        if( TArgsDef[i].required && TArgsDef[i].help[0] != NULL ) {
+            HelpOptionLine(TArgsDef[i].aliases, TArgsDef[i].name, NULL, TArgsDef[i].help);
+        }
+    }
+    OUTMSG(("\nOptions:\n"));
+    for(i = 0; i < targs_ArgsQty; i++ ) {
+        if( !TArgsDef[i].required && TArgsDef[i].help[0] != NULL ) {
+            HelpOptionLine(TArgsDef[i].aliases, TArgsDef[i].name, NULL, TArgsDef[i].help);
+        }
+    }
+    XMLLogger_Usage();
+    OUTMSG(("\n"));
+    HelpOptionsStandard();
+    HelpVersion(fullpath, KAppVersion());
+    return rc;
+}
+
+static
+rc_t TArgsParse(TArgs *args, int argc, char *argv[])
+{
+    rc_t rc = 0;
+    uint32_t count;
+    char* end = NULL;
+    const char* errmsg = NULL;
+    const char* spot_qty = NULL, *bad_spots = NULL;
+    const char *bad_percent = NULL, *intense = NULL;
+
+    assert(args && argv);
+
+    /* no parameters accepted */
+    if( (rc = ArgsParamCount(args->args, &count)) != 0 || count != 0 ) {
+        rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcUnexpected);
+        ArgsParamValue(args->args, 0, (const void **)&errmsg);
+
+    } else if( (rc = ArgsOptionCount(args->args, TArgsDef[targs_RunXML].name, &count)) != 0 || count != 1 ) {
+        rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, count ? rcExcessive : rcInsufficient);
+        errmsg = TArgsDef[targs_RunXML].name;
+    } else if( (rc = ArgsOptionValue(args->args, TArgsDef[targs_RunXML].name, 0, (const void **)&args->_runXmlPath)) != 0 ) {
+        errmsg = TArgsDef[targs_RunXML].name;
+
+    } else if( (rc = ArgsOptionCount(args->args, TArgsDef[targs_ExperimentXML].name, &count)) != 0 || count != 1 ) {
+        rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, count ? rcExcessive : rcInsufficient);
+        errmsg = TArgsDef[targs_ExperimentXML].name;
+    } else if( (rc = ArgsOptionValue(args->args, TArgsDef[targs_ExperimentXML].name, 0, (const void **)&args->_experimentXmlPath)) != 0 ) {
+        errmsg = TArgsDef[targs_ExperimentXML].name;
+
+    } else if( (rc = ArgsOptionCount(args->args, TArgsDef[targs_Target].name, &count)) != 0 || count != 1 ) {
+        rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, count ? rcExcessive : rcInsufficient);
+        errmsg = TArgsDef[targs_Target].name;
+    } else if( (rc = ArgsOptionValue(args->args, TArgsDef[targs_Target].name, 0, (const void **)&args->_target)) != 0 ) {
+        errmsg = TArgsDef[targs_Target].name;
+
+    /* optional */
+    } else if( (rc = ArgsOptionCount(args->args, TArgsDef[targs_InputPath].name, &count)) != 0 || count > 1 ) {
+        rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+        errmsg = TArgsDef[targs_InputPath].name;
+    } else if( count > 0 && (rc = ArgsOptionValue(args->args, TArgsDef[targs_InputPath].name, 0, (const void **)&args->_input_path)) != 0 ) {
+        errmsg = TArgsDef[targs_InputPath].name;
+
+    } else if( (rc = ArgsOptionCount(args->args, TArgsDef[targs_InputUnpacked].name, &args->_input_unpacked)) != 0 ) {
+        errmsg = TArgsDef[targs_InputUnpacked].name;
+
+    } else if( (rc = ArgsOptionCount(args->args, TArgsDef[targs_InputNoCache].name, &args->_no_read_ahead)) != 0 ) {
+        errmsg = TArgsDef[targs_InputNoCache].name;
+
+    } else if( (rc = ArgsOptionCount(args->args, TArgsDef[targs_ForceTarget].name, &args->_force_target)) != 0 ) {
+        errmsg = TArgsDef[targs_ForceTarget].name;
+
+    } else if( (rc = ArgsOptionCount(args->args, TArgsDef[targs_SpotsNumber].name, &count)) != 0 || count > 1 ) {
+        rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+        errmsg = TArgsDef[targs_SpotsNumber].name;
+    } else if( count > 0 && (rc = ArgsOptionValue(args->args, TArgsDef[targs_SpotsNumber].name, 0, (const void **)&spot_qty)) != 0 ) {
+        errmsg = TArgsDef[targs_SpotsNumber].name;
+
+    } else if( (rc = ArgsOptionCount(args->args, TArgsDef[targs_BadSpotsNumber].name, &count)) != 0 || count > 1 ) {
+        rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+        errmsg = TArgsDef[targs_BadSpotsNumber].name;
+    } else if( count > 0 && (rc = ArgsOptionValue(args->args, TArgsDef[targs_BadSpotsNumber].name, 0, (const void **)&bad_spots)) != 0 ) {
+        errmsg = TArgsDef[targs_BadSpotsNumber].name;
+
+    } else if( (rc = ArgsOptionCount(args->args, TArgsDef[targs_BadSpotPercentage].name, &count)) != 0 || count > 1 ) {
+        rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+        errmsg = TArgsDef[targs_BadSpotPercentage].name;
+    } else if( count > 0 && (rc = ArgsOptionValue(args->args, TArgsDef[targs_BadSpotPercentage].name, 0, (const void **)&bad_percent)) != 0 ) {
+        errmsg = TArgsDef[targs_BadSpotPercentage].name;
+
+    } else if( (rc = ArgsOptionCount(args->args, TArgsDef[targs_ExpectedXML].name, &count)) != 0 || count > 1 ) {
+        rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+        errmsg = TArgsDef[targs_ExpectedXML].name;
+    } else if( count > 0 && (rc = ArgsOptionValue(args->args, TArgsDef[targs_ExpectedXML].name, 0, (const void **)&args->_expectedXmlPath)) != 0 ) {
+        errmsg = TArgsDef[targs_ExpectedXML].name;
+
+    } else if( (rc = ArgsOptionCount(args->args, TArgsDef[targs_Intensities].name, &count)) != 0 || count > 1 ) {
+        rc = rc ? rc : RC(rcExe, rcArgv, rcParsing, rcParam, rcExcessive);
+        errmsg = TArgsDef[targs_Intensities].name;
+    } else if( count > 0 && (rc = ArgsOptionValue(args->args, TArgsDef[targs_Intensities].name, 0, (const void **)&intense)) != 0 ) {
+        errmsg = TArgsDef[targs_Intensities].name;
+    }
+    while( rc == 0 ) {
+        long val = 0;
+        if( args->_input_path == NULL ) {
+            args->_input_path = "./";
+            if( (rc = KDirectoryAddRef(s_Directory)) == 0 ) {
+                args->_input_dir = s_Directory;
+            } else {
+                errmsg = TArgsDef[targs_InputPath].name;
+                break;
+            }
+        } else if( (rc = KDirectoryOpenDirRead(s_Directory, &args->_input_dir, true, args->_input_path)) != 0 ) {
+            errmsg = TArgsDef[targs_InputPath].name;
+            break;
+        }
+
+        if( spot_qty != NULL ) {
+            errno = 0;
+            val = strtol(spot_qty, &end, 10);
+            if( errno != 0 || spot_qty == end || *end != '\0' || val <= 0 ) {
+                rc = RC(rcExe, rcArgv, rcReading, rcParam, rcInvalid);
+                errmsg = TArgsDef[targs_SpotsNumber].name;
+                break;
+            }
+            args->_spots_to_run = val;
+        }
+        if( bad_spots != NULL ) {
+            errno = 0;
+            val = strtol(bad_spots, &end, 10);
+            if( errno != 0 || bad_spots == end || *end != '\0' || val < 0 ) {
+                rc = RC(rcExe, rcArgv, rcReading, rcParam, rcInvalid);
+                errmsg = TArgsDef[targs_BadSpotsNumber].name;
+                break;
+            }
+            args->_spots_bad_allowed = val;
+        }
+        if( bad_percent != NULL ) {
+            errno = 0;
+            val = strtol(bad_percent, &end, 10);
+            if( errno != 0 || bad_percent == end || *end != '\0' || val < 0 || val > 100 ) {
+                rc = RC(rcExe, rcArgv, rcReading, rcParam, rcInvalid);
+                errmsg = TArgsDef[targs_BadSpotPercentage].name;
+                break;
+            }
+            args->_spots_bad_allowed_percentage = val;
+        }
+        if( intense != NULL ) {
+            if( strcasecmp(intense, "on") == 0 ) {
+                args->_intensities = 1;
+            } else if( strcasecmp(intense, "off") == 0 ) {
+                args->_intensities = 2;
+            } else {
+                rc = RC(rcExe, rcArgv, rcReading, rcParam, rcInvalid);
+                errmsg = TArgsDef[targs_Intensities].name;
+                break;
+            }
+        }
+        break;
+    }
+    if( rc != 0 ) {
+        Usage(args->args);
+        LOGERR(klogErr, rc, errmsg ? errmsg : "check command line");
+    }
+    return rc;
+}
+
+static
+void TArgsRelease(const TArgs* cself)
+{
+    if(cself) {
+        TArgs* self = (TArgs*)cself;
+        RunXML_Whack(self->_run);
+        Experiment_Whack(self->_experiment);
+        KDirectoryRelease(self->_input_dir);
+        ArgsWhack(self->args);
+        SRAMgrRelease(self->_sra_mgr);
+        XMLLogger_Release(self->_xml_log);
+        free(self);
+    }
+}
+
+static
+rc_t TArgsMake(TArgs **args, int argc, char *argv[])
+{
+    rc_t rc = 0;
+    TArgs* r;
+
+    assert(args && argv);
+
+    if( (r = calloc(1, sizeof(*r))) == NULL) {
+        rc = RC(rcExe, rcArgv, rcAllocating, rcMemory, rcExhausted);
+    } else if( (rc = ArgsMakeAndHandle(&r->args, argc, argv, 2, TArgsDef, targs_ArgsQty, XMLLogger_Args, XMLLogger_ArgsQty)) == 0 &&
+               (rc = XMLLogger_Make(&r->_xml_log, s_Directory, r->args)) == 0 ) {
+        r->_force_target = false;
+        r->_spots_to_run = -1;
+        r->_spots_bad_allowed = 50;
+        r->_spots_bad_allowed_percentage = 5;
+        r->_input_unpacked = false;
+        if( argc > 1 ) {
+            rc = TArgsParse(r, argc, argv);
+        } else {
+            MiniUsage(r->args);
+            exit(0);
+        }
+    }
+    if( rc == 0 ) {
+        *args = r;
+    } else {
+        TArgsRelease(r);
+        *args = NULL;
+    }
+    return rc;
+}
+
+static rc_t read_required_node_data_cstr(const KXMLNode *node,
+    const char *attr, char **string)
+{
+    rc_t rc = attr == NULL ?
+            KXMLNodeReadCStr(node, string, NULL) :
+            KXMLNodeReadAttrCStr(node, attr, string, NULL);
+
+    if (rc && GetRCState(rc) == rcNotFound) {
+        const char *name = NULL;
+        if( (rc = KXMLNodeElementName(node, &name)) == 0 ) {
+            if (attr == NULL) {
+                PLOGERR(klogErr, (klogErr, rc, "XML node $(name)", "name=%s", name));
+            }
+            else {
+                PLOGERR(klogErr, (klogErr, rc, "XML attribute $(name)/@$(attr)",
+                                  "name=%s,attr=%s", name, attr));
+            }
+        }
+    }
+    return rc;
+}
+
+static rc_t read_optional_node_data_cstr(const KXMLNode *node,
+    const char *attr, char **string)
+{
+    rc_t rc = attr == NULL ?
+            KXMLNodeReadCStr(node, string, NULL) :
+            KXMLNodeReadAttrCStr(node, attr, string, "");
+
+    if (rc) {
+        if (GetRCState(rc) == rcNotFound) {
+            rc = 0;
+        }
+        else {
+            const char *name = NULL;
+            if( (rc = KXMLNodeElementName(node, &name)) == 0 ) {
+                PLOGERR(klogErr, (klogErr, rc, "XML attribute $(name)/@$(attr)",
+                                  "name=%s,attr=%s", name, attr));
+            }
+        }
+    }
+    return rc;
+}
+
+static rc_t ResultXML_make(ResultXML **rslt, const KXMLNode *Result)
+{
+    rc_t rc = 0;
+    ResultXML *r = NULL;
+
+    assert(rslt && Result);
+
+    r = calloc(1, sizeof *r);
+    if (r == NULL) {
+        rc = RC(rcExe, rcXmlDoc, rcAllocating, rcMemory, rcExhausted);
+    }
+
+    if (rc == 0) {
+        rc = read_required_node_data_cstr(Result, "file", &r->file);
+    }
+
+    if (rc == 0) {
+        rc = read_required_node_data_cstr(Result, "name", &r->name);
+    }
+
+    if (rc == 0) {
+        rc = read_required_node_data_cstr(Result, "sector", &r->sector);
+    }
+
+    if (rc == 0) {
+        rc = read_required_node_data_cstr(Result, "region", &r->region);
+    }
+
+    if (rc == 0) {
+        rc = read_optional_node_data_cstr(Result, "member_name", &r->member_name);
+    }
+
+    if (rc) {
+        free(r);
+    }
+    else {
+        *rslt = r;
+    }
+
+    return rc;
+}
+
+static rc_t ExpectedXMLWhack(const ExpectedXML *r)
+{
+    return 0;
+}
+
+static rc_t ExpectedXMLMake(const ExpectedXML **rslt,
+    const KXMLNode *Expected)
+{
+    rc_t rc = 0;
+    const KXMLNodeset *Results = NULL;
+    if (rslt == NULL) {
+        return RC(rcExe, rcXmlDoc, rcConstructing, rcParam, rcNull);
+    }
+    *rslt = NULL;
+    if (Expected == NULL) {
+        return RC(rcExe, rcXmlDoc, rcConstructing, rcParam, rcNull);
+    }
+    rc = KXMLNodeOpenNodesetRead(Expected, &Results, "Result");
+    if (rc == 0) {
+        ExpectedXML *r = calloc(1, sizeof *r);
+        if (r == NULL) {
+            rc = RC(rcExe, rcXmlDoc, rcAllocating, rcMemory, rcExhausted);
+        }
+        else {
+            uint32_t num = 0;
+            rc = KXMLNodesetCount(Results, &num);
+            if (rc == 0 && num > 0) {
+                r->number_of_results = num;
+                r->result = calloc(1, num * sizeof r->result[0]);
+                if (r->result == NULL) {
+                    rc = RC(rcExe, rcXmlDoc, rcAllocating, rcMemory, rcExhausted);
+                    free(r);
+                }
+                else {
+                    int i = 0;
+                    for (i = 0; rc == 0 && i < num; ++i) {
+                        const KXMLNode *Result = NULL;
+                        rc = KXMLNodesetGetNodeRead(Results, &Result, i);
+                        if (rc == 0) {
+                            rc = ResultXML_make(&r->result[i], Result);
+                        }
+                    }
+                    if (rc == 0) {
+                        *rslt = r;
+                    }
+                    else {
+                        ExpectedXMLWhack(r);
+                    }
+                }
+            }
+        }
+    }
+    else if (GetRCState(rc) != rcNotFound) {
+        LOGERR(klogErr, rc, "Cannot read Result node");
+    }
+    return rc;
+}
+
+static rc_t s_KXMLDocMake(const KXMLDoc **doc, const char *path)
+{
+    rc_t rc = 0;
+    const KFile *file = NULL;
+    if (doc == NULL || path == NULL) {
+        return RC(rcExe, rcXmlDoc, rcConstructing, rcParam, rcNull);
+    }
+    if (rc == 0) {
+        rc = KDirectoryOpenFileRead(s_Directory, &file, "%s", path);
+        if (rc != 0) {
+            PLOGERR(klogErr, (klogErr, rc, "Cannot open file $(file)", "file=%s", path));
+        }
+    }
+    if (rc == 0) {
+        rc = KXMLMgrMakeDocRead(s_XmlMgr, doc, file);
+        if (rc != 0) {
+            PLOGERR(klogErr, (klogErr, rc, "Cannot make XML document from $(file)",
+                              "file=%s", path));
+        }
+    }
+    KFileRelease(file);
+    return rc;
+}
+
+static rc_t KXMLNodeMakeFromDoc(const KXMLNode **node, const KXMLDoc *doc,
+    const char *root)
+{
+    rc_t rc = 0;
+    const KXMLNodeset *ns = NULL;
+    if (node == NULL || doc == NULL || root == NULL) {
+        return RC(rcExe, rcXmlDoc, rcConstructing, rcParam, rcNull);
+    }
+    if (rc == 0) {
+        rc = KXMLDocOpenNodesetRead(doc, &ns, root);
+    }
+    if (rc == 0) {
+        uint32_t count = 0;
+        rc = KXMLNodesetCount(ns, &count);
+        if (rc == 0) {
+            if (count == 0) {
+                rc = RC(rcExe, rcXmlDoc, rcReading, rcNode, rcNotFound);
+                PLOGERR(klogErr, (klogErr, rc, "$(path)", "path=%s", root));
+            }
+            else if (count > 1) {
+                rc = RC(rcExe, rcXmlDoc, rcParsing, rcData, rcExcessive);
+                PLOGERR(klogErr, (klogErr, rc,
+                                  "too many data $(node) nodes", "node=%s", root));
+            }
+        }
+    }
+    if (rc == 0) {
+        rc = KXMLNodesetGetNodeRead(ns, node, 0);
+    }
+    KXMLNodesetRelease(ns);
+    return rc;
+}
+
+static rc_t KXMLNodeMakeFromFile(const KXMLNode **node, const char *path,
+    const char *root)
+{
+    rc_t rc = 0;
+    const KXMLDoc *doc = NULL;
+    const char *rootPath = "/";
+    if (node == NULL || path == NULL) {
+        return RC(rcExe, rcXmlDoc, rcConstructing, rcParam, rcNull);
+    }
+    rc = s_KXMLDocMake(&doc, path);
+    if (rc == 0) {
+        if (root != NULL) {
+            rootPath = root;
+        }
+        rc = KXMLNodeMakeFromDoc(node, doc, rootPath);
+    }
+    KXMLDocRelease(doc);
+    return rc;
+}
+
+static
+rc_t TArgsParseRunXml(TArgs *args)
+{
+    rc_t rc = 0;
+    const KXMLNode *node = NULL;
+    const KXMLDoc *doc = NULL;
+    assert(args);
+    if (args->_runXmlPath == NULL) {
+        return rc;
+    }
+    if (rc == 0) {
+        rc = s_KXMLDocMake(&doc, args->_runXmlPath);
+    }
+    if (rc == 0) {
+        rc= KXMLNodeMakeFromDoc(&node, doc, "/RUN_SET/RUN | /RUN");
+    }
+    if (rc == 0) {
+        rc = RunXML_Make(&args->_run, node);
+    }
+    KXMLNodeRelease(node);
+    KXMLDocRelease(doc);
+    return rc;
+}
+
+static rc_t TArgsParseExpectedXml(TArgs *self)
+{
+    rc_t rc = 0;
+    const KXMLNode *node = NULL;
+    assert(self);
+    if (self->_expectedXmlPath == NULL) {
+        return rc;
+    }
+    if (rc == 0) {
+        rc = KXMLNodeMakeFromFile(&node, self->_expectedXmlPath, "//Expected");
+    }
+    if (rc == 0) {
+        rc = ExpectedXMLMake(&self->_expected, node);
+    }
+    KXMLNodeRelease(node);
+    return rc;
+}
+
+static rc_t TArgsParseXmls(TArgs *self)
+{
+    rc_t rc = 0;
+    const KXMLDoc *doc = NULL;
+
+    if( (rc = TArgsParseRunXml(self)) == 0 &&
+        (rc = s_KXMLDocMake(&doc, self->_experimentXmlPath)) == 0 &&
+        (rc = Experiment_Make(&self->_experiment, doc, &self->_run->attributes)) == 0 ) {
+        rc = TArgsParseExpectedXml(self);
+    }
+    KXMLDocRelease(doc);
+    return rc;
+}
+
+static rc_t TArgsLogResultTotal(const TArgs *self, rc_t status, uint64_t spotCount, uint64_t baseCount, int64_t bad_spot_count)
+{
+    rc_t rc = 0;
+    int i = 0;
+    const char* accession, *state;
+    KLogLevel tmp_lvl;
+
+    if (self == NULL) {
+        return rc;
+    }
+
+    accession = strrchr(self->_target, '/');
+    if( accession == NULL ) {
+        accession = self->_target;
+    } else {
+        accession++;
+    }
+    state = status == 0 ? "success" : "failure";
+    /* raise log level in order to print stats */
+    tmp_lvl = KLogLevelGet();
+    KLogLevelSet(klogInfo);
+    for(i = 0; self->_expected != NULL && i < self->_expected->number_of_results && rc == 0; i++) {
+        ResultXML *f = self->_expected->result[i];
+        PLOGMSG(klogInfo, (klogInfo, "loaded",
+                "severity=result,status=%s,accession=%s,spot_count=%lu,base_count=%lu,"
+                "file=%s,name=%s,region=%s,sector=%s,member_name=%s",
+                state, accession, spotCount, baseCount,
+                f->file, f->name, f->region, f->sector, f->member_name ? f->member_name : ""));
+    }
+    if(status == 0) {
+        PLOGMSG(klogInfo, (klogInfo, "loaded",
+                "severity=total,status=%s,accession=%s,spot_count=%lu,base_count=%lu,bad_spots=%ld",
+                state, accession, spotCount, baseCount, bad_spot_count));
+    } else {
+        PLOGERR(klogErr, (klogErr, status, "load failed: $(reason_short)",
+                "severity=total,status=%s,accession=%s",
+                state, accession));
+    }
+    KLogLevelSet(tmp_lvl);
+    return rc;
+}
+
+static
+void SInput_Release(const SInput* cself)
+{
+    if(cself) {
+        SInput* self = (SInput*)cself;
+        uint32_t i;
+        for(i = 0; i < self->count; i++) {
+            /* actual files must be released elsewhere */
+            free(self->blocks[i].files);
+        }
+        free(self->blocks);
+        free(self);
+    }
+}
+
+typedef struct SInputOpen_TarVisitData_struct {
+    uint32_t alloc;
+    char** files;
+    uint32_t count;
+    
+} SInputOpen_TarVisitData;
+
+static
+rc_t SInputOpen_TarVisit(const KDirectory *dir, uint32_t type, const char *name, void *data )
+{
+    rc_t rc = 0;
+
+    if( type == kptFile ) {
+        SInputOpen_TarVisitData* d = (SInputOpen_TarVisitData*)data;
+
+        if( d->alloc <= d->count ) {
+            void* p;
+            d->alloc = d->files == NULL ? 1024 : (d->alloc * 2);
+            if( (p = realloc(d->files, d->alloc * sizeof(*d->files))) == NULL ) {
+                rc = RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+            } else {
+                d->files = p;
+            }
+        }
+        if( rc == 0 ) {
+            char buf[1024];
+            if( (rc = KDirectoryResolvePath(dir, true, buf, sizeof(buf), "%s", name)) == 0 ) { 
+                d->files[d->count++] = strdup(buf);
+                if( d->files[d->count - 1] == NULL ) {
+                    rc = RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+static
+rc_t SInputOpen(const SInput **cself, TArgs *args)
+{
+    rc_t rc = 0;
+    SInput *self = calloc(1, sizeof(*self));
+    uint32_t file_qty = 0;
+
+    if(self == NULL) {
+        rc = RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+    } else {
+        self->blocks = calloc(args->_run->datablock_count, sizeof(*(self->blocks)));
+        if(self->blocks == NULL) {
+            rc = RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+        } else {
+            uint32_t i, ccdirs_qty = 0;
+            struct {
+                const char* uid;
+                const KDirectory* xdir;
+            } ccdirs[1024];
+
+            memset(ccdirs, 0, sizeof(ccdirs));
+            self->count = args->_run->datablock_count;
+            for(i = 0; rc == 0 && i < self->count; i++) {
+                const DataBlock* b = &args->_run->datablocks[i];
+                uint32_t f, j;
+                char fname[10240];
+
+                self->blocks[i].files = calloc(b->files_count, sizeof(*(self->blocks->files)));
+                if(self->blocks == NULL) {
+                    rc = RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+                    continue;
+                }
+                self->blocks[i].count = b->files_count;
+                for(f = 0, j = 0; rc == 0 && j < b->files_count; j++ ) {
+                    int fnlen = strlen(b->files[j].filename);
+                    if( b->files[j].cc_xml != NULL ) {
+                        const KDirectory* fdir = args->_input_dir;
+                        if( !args->_input_unpacked ) {
+                            uint32_t cd;
+                            for(cd = 0; cd < ccdirs_qty; cd++) {
+                                if( strcmp(ccdirs[cd].uid,  b->files[j].cc_xml) == 0 ) {
+                                    break;
+                                }
+                            }
+                            if( cd >= ccdirs_qty ) {
+                                const KFile* kf = NULL;
+                                if( ccdirs_qty + 1 > sizeof(ccdirs) / sizeof(ccdirs[0]) ) {
+                                    rc = RC(rcExe, rcStorage, rcAllocating, rcNamelist, rcTooLong);
+                                } else if( (rc = KDirectoryOpenFileRead(args->_input_dir, &kf, "%s.xml", b->files[j].cc_xml)) == 0) {
+                                    char base_path[4096];
+                                    int r = snprintf(base_path, sizeof base_path, "%s/", b->files[j].cc_xml);
+                                    if (r >= sizeof base_path) {
+                                        rc = RC(rcExe, rcStorage, rcAllocating, rcFile, rcTooLong);
+                                    } else if ((rc = KDirectoryOpenXTocDirRead(args->_input_dir, &ccdirs[ccdirs_qty].xdir, false, kf, "%s", base_path)) == 0 ) {
+                                        cd = ccdirs_qty++;
+                                        ccdirs[cd].uid = b->files[j].cc_xml;
+                                        KFileRelease(kf);
+                                    }
+                                }
+                            }
+                            fdir = ccdirs[cd].xdir;
+                        }
+                        if( rc == 0 ) {
+                            char* fn = strdup(b->files[j].cc_path);
+                            if( fn == NULL ) {
+                                rc = RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+                            } else {
+                                rc = SRALoaderFile_Make(&self->blocks[i].files[f++], fdir, fn, b, &b->files[j].attr,
+                                                        NULL, !args->_no_read_ahead);
+                                file_qty++;
+                                free(fn);
+                            }
+                        }
+                        continue;
+                    }
+                    if( fnlen >= sizeof(fname) ) {
+                        rc = RC(rcExe, rcStorage, rcAllocating, rcFile, rcTooLong);
+                        PLOGERR(klogErr, (klogErr, rc, "$(file)", PLOG_S(file), b->files[j].filename));
+                        continue;
+                    }
+                    strcpy(fname, b->files[j].filename);
+                    /* compressed archives supposed to be decompressed beforehand */
+                    if( fnlen > 7 && strcmp(&fname[fnlen - 7], ".tar.gz") == 0 ) {
+                        fnlen -= 3;
+                        fname[fnlen] = '\0';
+                    } else if( fnlen > 4 && strcmp(&fname[fnlen - 4], ".tgz") == 0 ) {
+                        fname[fnlen - 2] = 'a';
+                        fname[fnlen - 1] = 'r';
+                    } else if( fnlen > 7 && strcmp(&fname[fnlen - 7], ".tar.bz2") == 0 ) {
+                        fnlen -= 4;
+                        fname[fnlen] = '\0';
+                    }
+                    if( strcmp(&fname[fnlen - 4], ".tar") == 0 ) {
+                        const KDirectory* tar;
+                        if( (rc = KDirectoryOpenArcDirRead(args->_input_dir, &tar, true, fname,
+                                                           tocKFile, KArcParseTAR, NULL, NULL)) == 0 ) {
+                            uint32_t k;
+                            void* p;
+                            SInputOpen_TarVisitData data = {0, NULL, 0};
+
+                            if( (rc = KDirectoryVisit(tar, true, SInputOpen_TarVisit, &data, ".")) != 0 ) {
+                                continue;
+                            }
+                            if( data.count == 0 ) {
+                                rc = RC(rcExe, rcStorage, rcAllocating, rcFile, rcEmpty);
+                                PLOGERR(klogErr,(klogErr, rc, "Empty tar $(file)", PLOG_S(file), fname));
+                                continue;
+                            }
+                            self->blocks[i].count += data.count - 1; /* minus tar file */
+                            p = realloc(self->blocks[i].files, self->blocks[i].count * sizeof(*(self->blocks->files)));
+                            if( p == NULL) {
+                                rc = RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+                                continue;
+                            }
+                            self->blocks[i].files = p;
+                            for(k = 0; k < data.count; k++) {
+                                rc = SRALoaderFile_Make(&self->blocks[i].files[f++], tar, data.files[k], b, &b->files[j].attr,
+                                                        NULL, !args->_no_read_ahead);
+                                file_qty++;
+                            }
+                            free(data.files);
+                            KDirectoryRelease(tar);
+                        }
+                    } else {
+                        char* fn = strdup(fname);
+                        if( fn == NULL ) {
+                            rc = RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+                        } else {
+                            rc = SRALoaderFile_Make(&self->blocks[i].files[f++], args->_input_dir, fn, b, &b->files[j].attr,
+                                                    b->files[j].md5_digest, !args->_no_read_ahead);
+                            file_qty++;
+                            free(fn);
+                        }
+                    }
+                }
+            }
+            for(i = 0; i < ccdirs_qty; i++) {
+                KDirectoryRelease(ccdirs[i].xdir);
+            }
+        }
+    }
+    if( rc == 0 && file_qty < 1 ) {
+        rc = RC(rcExe, rcStorage, rcAllocating, rcData, rcEmpty);
+        LOGERR(klogErr, rc, "no files to load");
+    }
+    if( rc == 0 ) {
+        *cself = self;
+    } else {
+        SInput_Release(self);
+    }
+    return rc;
+}
+
+static
+rc_t WriteSoftwareVersionsMeta(SRATable* table, const char *argv0, uint32_t fe_version, const char* fe_name)
+{
+    rc_t rc = 0;
+    KMDataNode *node = NULL;
+
+    assert(table);
+
+    if( (rc = SRATableOpenMDataNodeUpdate(table, &node, "/")) == 0 ) {
+        rc = KLoaderMeta_Write(node, argv0, __DATE__, fe_name, fe_version);
+    }
+    if( rc != 0 ) {
+        LOGERR(klogErr, rc, "Cannot update loader meta");
+    }
+    KMDataNodeRelease(node);
+    return rc;
+}
+
+rc_t KMain(int argc, char *argv[])
+{
+    rc_t rc = 0, lastRc = 0;
+
+    TArgs *args = NULL;
+    const SInput *input = NULL;
+    SRATable* table = NULL;
+    SRALoaderFmt* fe = NULL;
+
+    SRALoaderConfig feInput;
+    memset(&feInput, 0, sizeof feInput);
+
+    /* Initialize statics */
+    if (rc == 0) {
+        rc = KDirectoryNativeDir(&s_Directory);
+    }
+    /* Parse command line arguments */
+    if (rc == 0) {
+        rc = TArgsMake(&args, argc, argv);
+    }
+    if( rc == 0 &&
+        (rc = SRAMgrMakeUpdate(&args->_sra_mgr, NULL)) == 0 &&
+        (rc = SRAMgrSetMD5Mode(args->_sra_mgr, true)) == 0 ) {
+        rc = KXMLMgrMakeRead(&s_XmlMgr);
+    }
+    if( rc == 0 && (rc = TArgsParseXmls(args)) == 0) {
+        if( args->_intensities == 2 ) {
+            feInput.columnFilter = efltrINTENSITY | efltrNOISE | efltrSIGNAL;
+        } else if( args->_intensities == 1 ) {
+            feInput.columnFilter = 0;
+        } else {
+            feInput.columnFilter = efltrDEFAULT;
+        }
+        feInput.spots_to_run = args->_spots_to_run;
+        feInput.spots_bad_allowed = args->_spots_bad_allowed;
+        feInput.experiment = args->_experiment;
+        feInput.sra_mgr = args->_sra_mgr;
+        feInput.table_path = args->_target;
+        feInput.force_table_overwrite = args->_force_target;
+
+        rc = SRALoaderFmtMake(&fe, &feInput);
+    }
+    if (rc == 0) {
+        rc = SInputOpen(&input, args);
+    }
+    if(rc == 0) {
+        if( fe->vt->v1.exec_prep ) {
+            const char* efile = NULL;
+            const char* eargs[64];
+            uint32_t i = 1, j, qty = 0, x = 0;
+            char extra[1024];
+
+            eargs[i++] = "-L";
+            eargs[i++] = KLogGetParamStrings()[KLogLevelGet()];
+            qty = KStsLevelGet();
+            while(qty-- > 0 ) {
+                eargs[i++] = "-v";
+            }
+#if _DEBUGGING
+            if( ArgsOptionCount(args->args, "+", &qty) == 0 ) {
+                uint32_t j;
+                for(j = 0; j < qty; j++) {
+                    const char* v;
+                    if( ArgsOptionValue(args->args, "+", j, (const void **)&v) == 0 ) {
+                        eargs[i++] = "-+";
+                        eargs[i++] = v;
+                    }
+                }
+            }
+            if( ArgsOptionCount(args->args, "debug", &qty) == 0) {
+                uint32_t j;
+                for(j = 0; j < qty; j++) {
+                    const char* v;
+                    if( ArgsOptionValue(args->args, "debug", j, (const void **)&v) == 0 ) {
+                        eargs[i++] = "-+";
+                        eargs[i++] = v;
+                    }
+                }
+            }
+#endif
+            for(j = 0; j < XMLLogger_ArgsQty; j++) {
+                const char* v;
+                if( XMLLogger_Args[j].aliases != NULL &&
+                    ArgsOptionCount(args->args, XMLLogger_Args[j].aliases, &qty) == 0 &&
+                    qty > 0 &&
+                    ArgsOptionValue(args->args, XMLLogger_Args[j].aliases, 0, (const void **)&v) == 0 ) {
+                        eargs[i++] = &extra[x];
+                        extra[x++] = '-';
+                        extra[x++] = '-';
+                        strcpy(&extra[x], XMLLogger_Args[j].name);
+                        x += strlen(XMLLogger_Args[j].name);
+                        eargs[i++] = v;
+                } else if( XMLLogger_Args[j].name != NULL &&
+                           ArgsOptionCount(args->args, XMLLogger_Args[j].name, &qty) == 0 &&
+                           qty > 0 &&
+                           ArgsOptionValue(args->args, XMLLogger_Args[j].name, 0, (const void **)&v) == 0 ) {
+                        eargs[i++] = &extra[x];
+                        extra[x++] = '-';
+                        extra[x++] = '-';
+                        strcpy(&extra[x], XMLLogger_Args[j].name);
+                        x += strlen(XMLLogger_Args[j].name);
+                        eargs[i++] = v;
+                }
+
+            }
+            eargs[i] = NULL;
+
+            if( (rc = SRALoaderFmtExecPrep(fe, args, input, &efile, eargs + i, sizeof(eargs) / sizeof(eargs[0]) - i)) == 0 ) {
+                eargs[0] = efile;
+#if _DEBUGGING
+                DEBUG_MSG(3, ("execv: '%s", efile));
+                for(i = 0; eargs[i] != NULL; i++) {
+                    DEBUG_MSG(3, (" %s", eargs[i]));
+                }
+                DEBUG_MSG(3, ("'\n"));
+#endif
+                execv(efile, (char* const*)eargs);
+                rc = RC(rcExe, rcFormatter, rcExecuting, rcInterface, rcFailed);
+                PLOGERR(klogErr, (klogErr, rc, "front-end exec: $(errno)", "errno=%s", strerror(errno)));
+            }
+        } else {
+            rc_t rc2 = 0;
+            uint64_t spotCount = 0;
+            uint64_t numBases = 0;
+            int64_t bad_spot_count = 0;
+            uint32_t fe_vers = 0;
+            const char* fe_name;
+
+            rc = SRALoaderFmtVersion(fe, &fe_vers, &fe_name);
+            if(rc == 0) {
+                uint32_t i, j;
+                for(i = 0; rc == 0 && i < input->count; i++) {
+                    rc = SRALoaderFmtWriteData(fe, input->blocks[i].count, input->blocks[i].files, &bad_spot_count);
+                    for(j = 0; j < input->blocks[i].count; j++) {
+                        bool eof = true;
+                        if( rc == 0 && SRALoaderFile_IsEof(input->blocks[i].files[j], &eof) == 0 ) {
+                            if( args->_spots_to_run < 0 && eof != true ) {
+                                const char* fn;
+                                SRALoaderFileName(input->blocks[i].files[j], &fn);
+                                rc2 = RC(rcExe, rcFormatter, rcReading, rcFile, rcExcessive);
+                                PLOGERR(klogErr, (klogErr, rc2, "File $(file) not completely parsed", PLOG_S(file), fn));
+                            }
+                        }
+                        SRALoaderFile_Release(input->blocks[i].files[j]);
+                    }
+                    if( GetRCObject(rc) == rcTransfer && GetRCState(rc) == rcDone ) {
+                        /* interrupted by requested spot count */
+                        rc = 0;
+                        break;
+                    }
+                    rc = rc ? rc : rc2;
+                }
+            }
+            /* release object to make sure it free's it's data and commits */
+            rc2 = SRALoaderFmtRelease(fe, &table);
+            rc = rc ? rc : rc2;
+            fe = NULL;
+
+            if( rc == 0 && table != NULL ) {
+                /* Write versions */
+                if (rc == 0) {
+                    rc = WriteSoftwareVersionsMeta(table, argv[0], fe_vers, fe_name);
+                }
+                if (rc == 0) {
+                    rc = SRATableCommit(table);
+                    if( GetRCObject(rc) == (enum RCObject)rcCursor && GetRCState(rc) == rcNotOpen ) {
+                        rc = 0;
+                    }
+                }
+                if (rc == 0) {
+                    rc = SRATableSpotCount(table, &spotCount);
+                    if (rc == 0) {
+                        rc = SRATableBaseCount(table, &numBases);
+                    }
+                    if(rc == 0) {
+                        if(spotCount > 0) {
+                            double percentage = ((double)bad_spot_count) / spotCount;
+                            double allowed = args->_spots_bad_allowed_percentage / 100.0;
+                            if(percentage > allowed ||
+                               (feInput.spots_bad_allowed >= 0 && bad_spot_count > feInput.spots_bad_allowed)) {
+                                rc = RC(rcExe, rcTable, rcClosing, rcData, rcInvalid);
+                                PLOGERR(klogErr, 
+                                        (klogErr, rc,
+                                         "Too many bad spots: "
+                                         "spots: $(spots), bad spots: $(bad_spots), "
+                                         "bad spots percentage: $(percentage), "
+                                         "allowed percentage: $(allowed), "
+                                         "allowed count: $(bad_allowed)",
+                                         "spots=%d,bad_spots=%li,percentage=%.2f,allowed=%.2f,bad_allowed=%li",
+                                         spotCount, bad_spot_count,
+                                         percentage, allowed, feInput.spots_bad_allowed));
+                            }
+                        }
+                    }
+                }
+                if( rc == 0) {
+                    rc = SRATableRelease(table);
+                    table = NULL;
+                }
+            }
+            if(rc == 0) {
+                if(spotCount == 0) {
+                    rc = RC(rcExe, rcFormatter, rcClosing, rcTable, rcEmpty);
+                    LOGERR(klogErr, rc, "0 spots were loaded after successful front-end run");
+                }
+            }
+            rc2 = TArgsLogResultTotal(args, rc, spotCount, numBases, bad_spot_count);
+            rc = rc ? rc : rc2;
+        }
+
+        if( rc != 0 ) {
+            if( table ) {
+                rc_t status = SRATableRelease(table);
+                table = NULL;
+                if(status == 0) {
+                    /* should go away as soon as cursor transactions are in place */
+                    status = SRAMgrDropTable(args->_sra_mgr, true, args->_target);
+                }
+                if(status != 0) {
+                    lastRc = KLogLastErrorCode();
+                    LOGERR(klogInt, status, "cannot DropRun after load failure");
+                }
+            }
+        }
+    }
+
+    /* make sure the error was reported */
+    if( rc != 0 &&
+        rc != SILENT_RC(rcExe, rcProcess, rcExecuting, rcProcess, rcCanceled) &&
+        rc != SILENT_RC(rcExe, rcProcess, rcExecuting, rcTransfer, rcDone)) {
+        if (lastRc == 0) {
+            lastRc = KLogLastErrorCode();
+        }
+        if (rc != lastRc) {
+            LOGERR(klogInt, rc, "no message text available");
+        }
+    }
+    SInput_Release(input);
+    SRALoaderFmtRelease(fe, NULL);
+    TArgsRelease(args);
+    KDirectoryRelease(s_Directory);
+    KXMLMgrRelease(s_XmlMgr);
+
+    return rc;
+}
diff --git a/tools/sra-load/pacbio-fmt.c b/tools/sra-load/pacbio-fmt.c
new file mode 100644
index 0000000..b100c95
--- /dev/null
+++ b/tools/sra-load/pacbio-fmt.c
@@ -0,0 +1,140 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <klib/text.h>
+#include <os-native.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <errno.h>
+#include <limits.h>
+
+typedef struct PacBioLoaderXmlFmt PacBioLoaderXmlFmt;
+#define SRALOADERFMT_IMPL PacBioLoaderXmlFmt
+#include "loader-fmt.h"
+
+#include "debug.h"
+
+struct PacBioLoaderXmlFmt {
+    SRALoaderFmt dad;
+};
+
+static
+rc_t PacBioLoaderXmlFmt_ExecPrep(const PacBioLoaderXmlFmt *self, const TArgs* args, const SInput* input,
+                                 const char** path, const char* eargs[], size_t max_eargs)
+{
+    rc_t rc = 0;
+    uint32_t i = 0;
+    ERunFileType type = rft_Unknown;
+
+    *path = "pacbio-load";
+
+    /* accept only single file submissions */
+    if( input->count != 1 ) {
+        rc = RC(rcSRA, rcFormatter, rcExecuting, rcParam, input->count ? rcExcessive : rcInsufficient);
+    } else if( input->blocks[0].count != 1 ) {
+        rc = RC(rcSRA, rcFormatter, rcExecuting, rcParam, input->blocks[0].count ? rcExcessive : rcInsufficient);
+    } else if( (rc = SRALoaderFile_FileType(input->blocks[0].files[0], &type)) == 0 && type != rft_PacBio_HDF5 ) {
+        rc = RC(rcSRA, rcFormatter, rcExecuting, rcFormat, rcUnsupported);
+    } else {
+        char resolved[4096];
+        size_t il = string_copy_measure(resolved, sizeof(resolved), args->_input_path);
+        resolved[il++] = '/';
+        if( (rc = SRALoaderFileResolveName(input->blocks[0].files[0], &resolved[il], sizeof(resolved) - il)) == 0 ) {
+            eargs[i] = strdup(resolved);
+            if( eargs[i++] == NULL ) {
+                rc = RC(rcSRA, rcFormatter, rcExecuting, rcMemory, rcExhausted);
+            }
+        }
+        if( rc == 0 ) {
+            eargs[i++] = "-o";
+            eargs[i++] = args->_target;
+
+            if( args->_force_target ) {
+                eargs[i++] = "-f";
+            }
+            eargs[i] = NULL;
+        }
+    }
+    return rc;
+}
+
+static
+rc_t PacBioLoaderXmlFmt_Whack(PacBioLoaderXmlFmt *self, SRATable** table)
+{
+    free(self);
+    return 0;
+}
+
+const char UsageDefaultName[] = "pacbio-loadxml";
+
+static
+rc_t PacBioLoaderXmlFmt_Version (const PacBioLoaderXmlFmt* self, uint32_t *vers, const char** name )
+{
+    *vers = KAppVersion();
+    *name = "PacBioXml";
+    return 0;
+}
+
+static SRALoaderFmt_vt_v1 vtPacBioLoaderXmlFmt =
+{
+    1, 0,
+    PacBioLoaderXmlFmt_Whack,
+    PacBioLoaderXmlFmt_Version,
+    PacBioLoaderXmlFmt_ExecPrep,
+    NULL
+};
+
+rc_t SRALoaderFmtMake(SRALoaderFmt **self, const SRALoaderConfig *config)
+{
+    rc_t rc = 0;
+    const PlatformXML* platform;
+
+    if( self == NULL || config == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
+    } else if( (rc = Experiment_GetPlatform(config->experiment, &platform)) != 0 ) {
+    } else if( platform->id != SRA_PLATFORM_PACBIO_SMRT ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcInvalid);
+        LOGERR(klogInt, rc, "platform type");
+    } else {
+        PacBioLoaderXmlFmt* fmt;
+
+        *self = NULL;
+        fmt = calloc(1, sizeof(*fmt));
+        if(fmt == NULL) {
+            rc = RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+        } else if( (rc = SRALoaderFmtInit(&fmt->dad, (const SRALoaderFmt_vt*)&vtPacBioLoaderXmlFmt)) != 0 ) {
+            LOGERR(klogInt, rc, "failed to initialize parent object");
+            PacBioLoaderXmlFmt_Whack(fmt, NULL);
+        } else {
+            *self = &fmt->dad;
+        }
+    }
+    return rc;
+}
diff --git a/tools/sra-load/pstring.c b/tools/sra-load/pstring.c
new file mode 100644
index 0000000..6966393
--- /dev/null
+++ b/tools/sra-load/pstring.c
@@ -0,0 +1,208 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <sra/wsradb.h>
+#include <sra/types.h>
+
+#include "common-xml.h"
+#include "pstring.h"
+#include "debug.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <ctype.h>
+#include <assert.h>
+
+rc_t pstring_clear(pstring* str)
+{
+    if( str == NULL ) {
+        return RC(rcSRA, rcFormatter, rcCopying, rcParam, rcNull);
+    }
+    str->data[0] = '\0';
+    str->len = 0;
+    return 0;
+}
+
+
+rc_t pstring_copy(pstring* dst, const pstring* src)
+{
+    if( src == NULL ) {
+        return RC(rcSRA, rcFormatter, rcCopying, rcParam, rcNull);
+    }
+    return pstring_assign(dst, src->data, src->len);
+}
+
+rc_t pstring_assign(pstring* str, const void* data, const size_t data_sz)
+{
+    if( str == NULL || data == NULL ) {
+        return RC(rcSRA, rcFormatter, rcCopying, rcParam, rcNull);
+    } else if( data_sz > sizeof(str->data) - 1 ) {
+        return RC(rcSRA, rcFormatter, rcCopying, rcBuffer, rcInsufficient);
+    }
+    memmove(str->data, data, data_sz);
+    str->len = data_sz;
+    str->data[str->len] = '\0';
+    return 0;
+}
+
+rc_t pstring_concat(pstring* dst, const pstring* src)
+{
+    return pstring_append(dst, src->data, src->len);
+}
+
+rc_t pstring_append(pstring* str, const void* data, const size_t data_sz)
+{
+    if( str == NULL || data == NULL ) {
+        return RC(rcSRA, rcFormatter, rcCopying, rcParam, rcNull);
+    } else if( str->len + data_sz > sizeof(str->data) - 1 ) {
+        return RC(rcSRA, rcFormatter, rcCopying, rcBuffer, rcInsufficient);
+    }
+    memmove(&str->data[str->len], data, data_sz);
+    str->len += data_sz;
+    str->data[str->len] = '\0';
+    return 0;
+}
+
+rc_t pstring_append_chr(pstring* str, char c, size_t count)
+{
+    if( str == NULL ) {
+        return RC(rcSRA, rcFormatter, rcCopying, rcParam, rcNull);
+    } else if( str->len + count > sizeof(str->data) - 1 ) {
+        return RC(rcSRA, rcFormatter, rcCopying, rcBuffer, rcInsufficient);
+    }
+    memset(&str->data[str->len], c, count);
+    str->len += count;
+    str->data[str->len] = '\0';
+    return 0;
+}
+
+int pstring_cmp(const pstring* str1, const pstring* str2)
+{
+    int r = str1->len - str2->len;
+    return r ? r : memcmp(str1->data, str2->data, str1->len);
+}
+
+int pstring_strcmp(const pstring* str1, const char* str2)
+{
+    int r = str1->len - strlen(str2);
+    return r ? r : memcmp(str1->data, str2, str1->len);
+}
+
+bool pstring_is_fasta(const pstring* str)
+{
+    if( str != NULL ) {
+        const char* s = str->data;
+        const char* end = s + str->len;
+        while( s != end ) {
+            if( strchr("ACGTNactgn.", *s++) == NULL ) {
+                return false;
+            }
+        }
+        return str->len != 0;
+    }
+    return false;
+}
+
+bool pstring_is_csfasta(const pstring* str)
+{
+    if( str != NULL ) {
+        const char* s = str->data;
+        const char* end = s + str->len;
+
+        if( s == end || strchr("ACGTacgt", *s++) == NULL ) {
+            return false;
+        }
+        while( s != end ) {
+            if( strchr("0123.", *s++) == NULL ) {
+                return false;
+            }
+        }
+        return true;
+    }
+    return false;
+}
+
+rc_t pstring_quality_convert(pstring* qstr, ExperimentQualityEncoding enc, const uint8_t offset, const int8_t min, const int8_t max)
+{
+    rc_t rc = 0;
+    char* c, *end, *next;
+    pstring qbin;
+
+    if( qstr == NULL || min > max ) {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcParam, rcInvalid);
+    }
+    errno = 0;
+    c = qstr->data;
+    end = qstr->data + qstr->len;
+    pstring_clear(&qbin);
+    if(enc == eExperimentQualityEncoding_Undefined) {
+	if(memchr(c, ' ', qstr->len) != NULL || memchr(c, '\t', qstr->len) != NULL){
+		enc = eExperimentQualityEncoding_Decimal;
+	} else {
+		enc = eExperimentQualityEncoding_Ascii;
+	}
+    }
+
+
+    while( rc == 0 && c < end ) {
+        long q;
+        switch(enc) {
+            case eExperimentQualityEncoding_Decimal:
+            case eExperimentQualityEncoding_Hexadecimal:
+                /* spaced numbers form */
+                errno = 0;
+                q = strtol(c, &next, enc == eExperimentQualityEncoding_Decimal ? 10 : 16);
+                if( q == 0 && c == next ) {
+                    /* no more digits in line */
+		    goto DONE; /*** need do break while loop as well ***/
+                }
+                c = next;
+                break;
+            case eExperimentQualityEncoding_Ascii:
+                /* textual form with offset */
+                q = (long)(*c++) - offset;
+                break;
+            default:
+                rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcUnrecognized);
+                break;
+        }
+        if( rc == 0 ) {
+            if( errno != 0 || q < min || q > max ) {
+                rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcOutofrange);
+            } else {
+                rc = pstring_append_chr(&qbin, (int8_t)q, 1);
+            }
+        }
+    }
+DONE:
+    if( rc == 0 ) {
+        rc = pstring_copy(qstr, &qbin);
+    }
+    return rc;
+}
diff --git a/tools/sra-load/pstring.h b/tools/sra-load/pstring.h
new file mode 100644
index 0000000..67a2142
--- /dev/null
+++ b/tools/sra-load/pstring.h
@@ -0,0 +1,58 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _sra_load_pstring_
+#define _sra_load_pstring_
+
+#include <klib/rc.h>
+
+typedef struct pstring_struct {
+    uint16_t len;
+    char data[64 * 1024];
+} pstring;
+
+rc_t pstring_clear(pstring* str);
+
+rc_t pstring_copy(pstring* dst, const pstring* src);
+
+rc_t pstring_assign(pstring* str, const void* data, const size_t data_sz);
+
+rc_t pstring_concat(pstring* dst, const pstring* src);
+
+rc_t pstring_append(pstring* str, const void* data, const size_t data_sz);
+
+rc_t pstring_append_chr(pstring* str, char c, size_t count);
+
+int pstring_cmp(const pstring* str1, const pstring* str2);
+
+int pstring_strcmp(const pstring* str1, const char* str2);
+
+bool pstring_is_fasta(const pstring* str);
+
+bool pstring_is_csfasta(const pstring* str);
+
+rc_t pstring_quality_convert(pstring* qstr, ExperimentQualityEncoding enc, const uint8_t offset, const int8_t min, const int8_t max);
+
+#endif /* _sra_load_pstring_ */
diff --git a/tools/sra-load/run-xml.c b/tools/sra-load/run-xml.c
new file mode 100644
index 0000000..2c97ee1
--- /dev/null
+++ b/tools/sra-load/run-xml.c
@@ -0,0 +1,487 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <os-native.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <errno.h>
+
+#include "run-xml.h"
+
+void DataBlockFile_Whack(DataBlockFile* self)
+{
+    if( self ) {
+        free(self->filename);
+        free(self->md5_digest);
+        free(self->cc_xml);
+        free(self->cc_path);
+    }
+}
+
+void DataBlock_Whack(DataBlock* self)
+{
+    if( self ) {
+        uint32_t i;
+        for(i = 0; i < self->files_count; i++) {
+            DataBlockFile_Whack(&self->files[i]);
+        }
+        free(self->files);
+        free(self->name);
+        free(self->member_name);
+    }
+}
+
+rc_t RunXML_Whack(const RunXML *cself)
+{
+    if( cself ) {
+        RunXML* self = (RunXML*)cself;
+        uint32_t i = 0;
+        for(i = 0; i < self->datablock_count; i++) {
+            DataBlock_Whack(&self->datablocks[i]);
+        }
+        free(self->datablocks);
+        PlatformXML_Whack(self->attributes.platform);
+        ReadSpecXML_Whack(self->attributes.reads);
+        free(self);
+    }
+    return 0;
+}
+
+static
+const struct {
+    const char* name;
+    ERunFileType type;
+} file_types[] = {
+    /* generic types giving us no useful information about file */
+    { "tab", rft_Unknown },
+    { "454_native", rft_Unknown },
+    { "454_native_seq", rft_Unknown },
+    { "454_native_qual", rft_Unknown },
+    { "Illumina_native", rft_Unknown },
+    { "Illumina_native_fastq", rft_Unknown },
+    { "Illumina_native_scarf", rft_Unknown },
+    { "SOLiD_native", rft_Unknown },
+    { "bam", rft_Unknown },
+    { "sra", rft_Unknown },
+    { "kar", rft_Unknown },
+    /* more specific information about file content */
+    { "fastq", rft_Fastq },
+    { "srf", rft_SRF },
+    { "sff", rft_SFF },
+    { "Helicos_native", rft_HelicosNative },
+    { "Illumina_native_seq", rft_IlluminaNativeSeq },
+    { "Illumina_native_prb", rft_IlluminaNativePrb },
+    { "Illumina_native_int", rft_IlluminaNativeInt },
+    { "Illumina_native_qseq", rft_IlluminaNativeQseq },
+    { "SOLiD_native_csfasta", rft_ABINativeCSFasta },
+    { "SOLiD_native_qual", rft_ABINativeQuality },
+    { "PacBio_HDF5", rft_PacBio_HDF5 }
+};
+
+static
+rc_t parse_FILE(const KXMLNode* FILE, DataBlockFile* file)
+{
+    rc_t rc = 0;
+    char* filetype = NULL, *checksum_method = NULL, *checksum = NULL;
+    char* quality_scoring_system = NULL, *quality_encoding = NULL, *ascii_offset = NULL;
+
+    if( (rc = KXMLNodeReadAttrCStr(FILE, "filename", &file->filename, NULL)) != 0 ||
+        file->filename == NULL || file->filename[0] == '\0' ) {
+        LOGERR(klogErr, rc, "FILE @filename");
+    } else if( (rc = KXMLNodeReadAttrCStr(FILE, "filetype", &filetype, NULL)) != 0 ||
+        filetype == NULL || filetype[0] == '\0' ) {
+        rc = rc ? rc : RC(rcExe, rcStorage, rcConstructing, rcTag, rcInvalid);
+        PLOGERR(klogErr, (klogErr, rc, "FILE $(file) @filetype", PLOG_S(file), file->filename));
+
+/* <!-- custom pipeline attributes, not from schema! */
+    } else if( (rc = KXMLNodeReadAttrCStr(FILE, "upload_id", &file->cc_xml, NULL)) != 0 &&
+               !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        PLOGERR(klogErr, (klogErr, rc, "FILE $(file) @upload_id", PLOG_S(file), file->filename));
+    } else if( file->cc_xml != NULL && file->cc_xml[0] == '\0' ) {
+        rc = RC(rcExe, rcStorage, rcConstructing, rcTag, rcInvalid);
+        PLOGERR(klogErr, (klogErr, rc, "FILE $(file) @upload_id", PLOG_S(file), file->filename));
+
+    } else if( (rc = KXMLNodeReadAttrCStr(FILE, "cc_path", &file->cc_path, NULL)) != 0 &&
+                !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        PLOGERR(klogErr, (klogErr, rc, "FILE $(file) @cc_path", PLOG_S(file), file->filename));
+    } else if( ((file->cc_path == NULL || file->cc_path[0] == '\0') && file->cc_xml != NULL) || 
+                (file->cc_path != NULL && file->cc_xml == NULL) ) {
+        rc = RC(rcExe, rcStorage, rcConstructing, rcTag, file->cc_xml ? rcEmpty : rcUnexpected);
+        PLOGERR(klogErr, (klogErr, rc, "FILE $(file) @cc_path", PLOG_S(file), file->filename));
+/* --> */
+
+    } else if( (rc = KXMLNodeReadAttrCStr(FILE, "quality_scoring_system", &quality_scoring_system, NULL)) != 0 &&
+                !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        PLOGERR(klogErr, (klogErr, rc, "FILE $(file) @quality_scoring_system", PLOG_S(file), file->filename));
+    } else if( (rc = KXMLNodeReadAttrCStr(FILE, "quality_encoding", &quality_encoding, NULL)) != 0 &&
+                !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        PLOGERR(klogErr, (klogErr, rc, "FILE $(file) @quality_encoding", PLOG_S(file), file->filename));
+    } else if( (rc = KXMLNodeReadAttrCStr(FILE, "ascii_offset", &ascii_offset, NULL)) != 0 &&
+                !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        PLOGERR(klogErr, (klogErr, rc, "FILE $(file) @ascii_offset", PLOG_S(file), file->filename));
+
+    } else if( (rc = KXMLNodeReadAttrCStr(FILE, "checksum_method", &checksum_method, NULL)) != 0 &&
+                !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        PLOGERR(klogErr, (klogErr, rc, "FILE $(file) @checksum_method", PLOG_S(file), file->filename));
+    } else if( (rc = KXMLNodeReadAttrCStr(FILE, "checksum", &checksum, NULL)) != 0 &&
+                !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        PLOGERR(klogErr, (klogErr, rc, "FILE $(file) @checksum", PLOG_S(file), file->filename));
+    } else if( checksum_method != NULL && strcasecmp(checksum_method, "MD5") != 0 ) {
+        rc = RC(rcExe, rcStorage, rcConstructing, rcData, rcInvalid);
+        PLOGERR(klogErr, (klogErr, rc, "FILE $(file) @checksum_method", PLOG_S(file), file->filename));
+    } else {
+        rc_t rc1 = 0, rc2 = 0, rc3 = 0, rc4 = 0;
+        if( quality_scoring_system != NULL ) {
+            if( quality_encoding == NULL ) {
+                rc1 = RC(rcExe, rcStorage, rcConstructing, rcParam, rcIncomplete);
+                PLOGERR(klogErr, (klogErr, rc1, "FILE $(file) @quality_encoding is required if @quality_scoring_system is specified",
+                    PLOG_S(file), file->filename));
+            } else if( strcmp(quality_scoring_system, "phred") == 0 ) {
+                file->attr.quality_scoring_system = eExperimentQualityType_Phred;
+            } else if( strcmp(quality_scoring_system, "log-odds") == 0 ) {
+                file->attr.quality_scoring_system = eExperimentQualityType_LogOdds;
+            } else {
+                rc1 = RC(rcExe, rcStorage, rcConstructing, rcAttr, rcOutofrange);
+                PLOGERR(klogErr, (klogErr, rc1, "FILE $(file) @quality_scoring_system", PLOG_S(file), file->filename));
+            }
+        }
+        if( quality_encoding != NULL ) {
+            if( quality_scoring_system == NULL ) {
+                rc2 = RC(rcExe, rcStorage, rcConstructing, rcParam, rcIncomplete);
+                PLOGERR(klogErr, (klogErr, rc2, "FILE $(file) @quality_scoring_system is required if @quality_encoding is specified",
+                    PLOG_S(file), file->filename));
+            } else if( strcmp(quality_encoding, "ascii") == 0 ) {
+                file->attr.quality_encoding = eExperimentQualityEncoding_Ascii;
+                if( ascii_offset == NULL ) {
+                    rc2 = RC(rcExe, rcStorage, rcConstructing, rcParam, rcIncomplete);
+                    PLOGERR(klogErr, (klogErr, rc2, "FILE $(file) @ascii_offset is required if @quality_encoding is 'ascii'",
+                        PLOG_S(file), file->filename));
+                } else if( strcmp(ascii_offset, "!") == 0 || strcmp(ascii_offset, "@") == 0 ) {
+                    file->attr.ascii_offset = ascii_offset[0];
+                } else {
+                    rc2 = RC(rcExe, rcStorage, rcConstructing, rcAttr, rcOutofrange);
+                    PLOGERR(klogErr, (klogErr, rc2, "FILE $(file) @ascii_offset", PLOG_S(file), file->filename));
+                }
+            } else if( strcmp(quality_encoding, "decimal") == 0 ) {
+                file->attr.quality_encoding = eExperimentQualityEncoding_Decimal;
+            } else if( strcmp(quality_encoding, "hexadecimal") == 0 ) {
+                file->attr.quality_encoding = eExperimentQualityEncoding_Hexadecimal;
+            } else {
+                rc2 = RC(rcExe, rcStorage, rcConstructing, rcAttr, rcOutofrange);
+                PLOGERR(klogErr, (klogErr, rc2, "FILE $(file) @quality_encoding", PLOG_S(file), file->filename));
+            }
+        }
+        if( ascii_offset != NULL ) {
+            if( file->attr.quality_encoding != eExperimentQualityEncoding_Ascii ) {
+                PLOGMSG(klogWarn, (klogWarn, "FILE $(file) @ascii_offset ignored since @quality_encoding is $(reason)",
+                    PLOG_2(PLOG_S(reason),PLOG_S(file)),
+                    file->attr.quality_encoding == eExperimentQualityEncoding_Undefined ? "undefined" : "not ascii", file->filename));
+            }
+        }
+        if( checksum_method == NULL && checksum != NULL ) {
+            PLOGMSG(klogWarn, (klogWarn, "FILE $(file) @checksum ignored since @checksum_method is not defined", PLOG_S(file), file->filename));
+            free(checksum);
+            checksum = NULL;
+        }
+        if( checksum != NULL ) {
+            if( strlen(checksum) != (16 * 2) ) {
+                /* MD5 sum is 16 bytes in hex format (2 hex digits per byte) */
+                rc3 = RC(rcExe, rcStorage, rcConstructing, rcData, rcUnrecognized);
+                PLOGERR(klogErr, (klogErr, rc3, "FILE $(file) MD5 @checksum", PLOG_S(file), file->filename));
+            } else if( (file->md5_digest = malloc(16 * sizeof(uint8_t))) == NULL ) {
+                rc3 = RC(rcExe, rcStorage, rcConstructing, rcMemory, rcExhausted);
+                PLOGERR(klogErr, (klogErr, rc3, "FILE $(file) MD5 @checksum allocation", PLOG_S(file), file->filename));
+            } else {
+                int i = 0;
+                char digit[3];
+                unsigned int xdig;
+                
+                digit[2] = '\0';
+                for(i = 0; rc3 == 0 && i < 16; i++) {
+                    digit[0] = tolower(checksum[2 * i]);
+                    digit[1] = tolower(checksum[2 * i + 1]);
+                    if(!isxdigit(digit[0]) || !isxdigit(digit[1])) {
+                        rc3 = RC(rcExe, rcStorage, rcConstructing, rcData, rcInvalid);
+                        PLOGERR(klogErr, (klogErr, rc3, "FILE $(file) MD5 @checksum $(digits)",
+                                 PLOG_2(PLOG_S(file),PLOG_S(digits)), file->filename, digit));
+                    } else {
+                        sscanf(digit, "%x", &xdig);
+                        file->md5_digest[i] = xdig;
+                    }
+                }
+            }
+        }
+        if( filetype != NULL ) {
+            int i;
+            for(i = 0; i < sizeof(file_types) / sizeof(file_types[0]); i++) {
+                if( strcmp(filetype, file_types[i].name) == 0 ) {
+                    file->attr.filetype = file_types[i].type;
+                    break;
+                }
+            }
+            if( file->attr.filetype == 0 ) {
+                rc4 = RC(rcExe, rcStorage, rcConstructing, rcAttr, rcOutofrange);
+                PLOGERR(klogErr, (klogErr, rc4, "FILE $(file) @filetype '$(type)'",
+                         PLOG_2(PLOG_S(file),PLOG_S(type)), file->filename, filetype));
+            }
+        }
+        rc = rc1 ? rc1 : (rc2 ? rc2 : (rc3 ? rc3 : rc4));
+    }
+    free(filetype);
+    free(checksum_method);
+    free(checksum);
+    free(quality_scoring_system);
+    free(quality_encoding);
+    free(ascii_offset);
+    return rc;
+}
+
+static
+rc_t parse_DATA_BLOCK(const KXMLNode* DATA_BLOCK, DataBlock* datablock)
+{
+    rc_t rc = 0;
+    const KXMLNodeset* FILES;
+
+    rc = KXMLNodeReadAttrCStr(DATA_BLOCK, "name", &datablock->name, NULL);
+    if( rc != 0 && !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        LOGERR(klogErr, rc, "DATA_BLOCK @name");
+        return rc;
+    }
+    rc = KXMLNodeReadAttrCStr(DATA_BLOCK, "member_name", &datablock->member_name, NULL);
+    if( rc != 0 && !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        LOGERR(klogErr, rc, "DATA_BLOCK @member_name");
+        return rc;
+    }
+    if( datablock->member_name != NULL && strcasecmp(datablock->member_name, "default") == 0 ) {
+        datablock->member_name[0] = '\0';
+    }
+    datablock->serial = ~0; /* file w/o serial pushed to end of list */
+    rc = KXMLNodeReadAttrAsU32(DATA_BLOCK, "serial", &datablock->serial);
+    if( rc != 0 && !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        LOGERR(klogErr, rc, "DATA_BLOCK @serial");
+        return rc;
+    }
+    datablock->sector = -1;
+    rc = KXMLNodeReadAttrAsU64(DATA_BLOCK, "sector", (uint64_t*)&datablock->sector);
+    if( rc != 0 && !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        LOGERR(klogErr, rc, "DATA_BLOCK @sector");
+        return rc;
+    }
+    datablock->region = -1;
+    rc = KXMLNodeReadAttrAsU64(DATA_BLOCK, "region", (uint64_t*)&datablock->region);
+    if( rc != 0 && !(GetRCObject(rc) == (enum RCObject)rcAttr && GetRCState(rc) == rcNotFound) ) {
+        LOGERR(klogErr, rc, "DATA_BLOCK @region");
+        return rc;
+    }
+
+    if( (rc = KXMLNodeOpenNodesetRead(DATA_BLOCK, &FILES, "FILES/FILE")) == 0) {
+        if( (rc = KXMLNodesetCount(FILES, &datablock->files_count)) != 0) {
+            LOGERR(klogErr, rc, "reading FILES/FILE node(s)");
+        } else if( datablock->files_count < 1 ) {
+            rc = RC(rcExe, rcStorage, rcConstructing, rcData, rcIncomplete);
+            LOGERR(klogErr, rc, "FILES/FILE at least one node is required");
+        } else if( (datablock->files = calloc(datablock->files_count, sizeof(*datablock->files))) == NULL ) {
+                rc = RC(rcExe, rcStorage, rcConstructing, rcMemory, rcExhausted);
+                LOGERR(klogErr, rc, "allocating FILES/FILE");
+        } else {
+            uint32_t i = 0;
+            for(i = 0; rc == 0 && i < datablock->files_count; i++) {
+                const KXMLNode *FILE = NULL;
+                if( (rc = KXMLNodesetGetNodeRead(FILES, &FILE, i)) == 0 ) {
+                    rc = parse_FILE(FILE, &datablock->files[i]);
+                    KXMLNodeRelease(FILE);
+                }
+                if( rc != 0 ) {
+                    PLOGERR(klogErr, (klogErr, rc, "reading FILES/FILE $(i)", PLOG_U32(i), i));
+                }
+            }
+        }
+        KXMLNodesetRelease(FILES);
+    }
+    return rc;
+}
+
+rc_t RunXML_Make(RunXML** rslt, const KXMLNode* RUN)
+{
+    rc_t rc = 0;
+    const KXMLNodeset* nset = NULL;
+    RunXML* obj = NULL;
+    uint32_t p_spot_length = 0, r_spot_length = 0;
+
+    if(rslt == NULL || RUN == NULL) {
+        return RC(rcExe, rcStorage, rcConstructing, rcParam, rcNull);
+    }
+    *rslt = NULL;
+    obj = calloc(1, sizeof(*obj));
+    if( obj == NULL ) {
+        rc = RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+    } else {
+        if( (rc = PlatformXML_Make(&obj->attributes.platform, RUN, &p_spot_length)) != 0 ) {
+            if( GetRCState(rc) == rcNotFound ) {
+                rc = 0;
+            } else {
+                LOGERR(klogErr, rc, "RUN/PLATFORM");
+            }
+        }
+        if( rc == 0 && (rc = ReadSpecXML_Make(&obj->attributes.reads, RUN, "SPOT_DESCRIPTOR", &r_spot_length)) != 0 ) {
+            if( GetRCState(rc) == rcNotFound ) {
+                rc = 0;
+            } else {
+                LOGERR(klogErr, rc, "RUN/.../READ_SPEC");
+            }
+        }
+        obj->attributes.spot_length = r_spot_length ? r_spot_length : p_spot_length;
+        if( rc == 0 && p_spot_length != 0 && r_spot_length != 0 && p_spot_length != r_spot_length ) {
+            PLOGMSG(klogWarn, (klogWarn,
+                "in RUN sequence length (cycle count) in PLATFORM $(p) differ"
+                " from SPOT_LENGTH $(l) in SPOT_DECODE_SPEC",
+                PLOG_2(PLOG_U32(p),PLOG_U32(l)), p_spot_length, r_spot_length));
+        }
+    }
+    if( rc == 0 ) {
+        if( (rc = KXMLNodeOpenNodesetRead(RUN, &nset, "DATA_BLOCK")) == 0) {
+            if( (rc = KXMLNodesetCount(nset, &obj->datablock_count)) == 0 && obj->datablock_count > 0 ) {
+                obj->datablocks = calloc(obj->datablock_count, sizeof(*obj->datablocks));
+                if( obj->datablocks == NULL ) {
+                    rc = RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+                } else {
+                    uint32_t i = 0;
+                    for(i = 0; rc == 0 && i < obj->datablock_count; i++) {
+                        const KXMLNode *DATA_BLOCK = NULL;
+                        if( (rc = KXMLNodesetGetNodeRead(nset, &DATA_BLOCK, i)) == 0 ) {
+                            rc = parse_DATA_BLOCK(DATA_BLOCK, &obj->datablocks[i]);
+                            KXMLNodeRelease(DATA_BLOCK);
+                        }
+                        if( rc != 0 ) {
+                            PLOGERR(klogErr, (klogErr, rc, "reading DATA_BLOCK $(i)", PLOG_U32(i), i));
+                        }
+                    }
+                    if( rc == 0 ) {
+                        /* serial ascending sort */
+                        bool swapped = true;
+                        while(swapped) {
+                            swapped = false;
+                            for(i = 1; i < obj->datablock_count; i++) {
+                                if( obj->datablocks[i].serial < obj->datablocks[i - 1].serial ) {
+                                    DataBlock db;
+                                    memcpy(&db, &obj->datablocks[i], sizeof(db));
+                                    memcpy(&obj->datablocks[i], &obj->datablocks[i - 1], sizeof(db));
+                                    memcpy(&obj->datablocks[i - 1], &db, sizeof(db));
+                                    swapped = true;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            KXMLNodesetRelease(nset);
+        } else {
+            LOGERR(klogErr, rc, "DATA_BLOCK node(s)");
+        }
+    }
+
+    if( rc == 0 ) {
+        if( (rc = KXMLNodeOpenNodesetRead(RUN, &nset, "RUN_ATTRIBUTES/RUN_ATTRIBUTE")) == 0) {
+            uint32_t num_attr = 0;
+            if( (rc = KXMLNodesetCount(nset, &num_attr)) == 0) {
+                uint32_t i = 0;
+                for(i = 0; rc == 0 && i < num_attr; i++) {
+                    const KXMLNode* RUN_ATTRIBUTE = NULL;
+                    if( (rc = KXMLNodesetGetNodeRead(nset, &RUN_ATTRIBUTE, i)) == 0 ) {
+                        const KXMLNode* TAG = NULL, *VALUE = NULL;
+                        if( (rc = KXMLNodeGetFirstChildNodeRead(RUN_ATTRIBUTE, &TAG, "TAG")) == 0 && 
+                            (rc = KXMLNodeGetFirstChildNodeRead(RUN_ATTRIBUTE, &VALUE, "VALUE")) == 0 ) {
+                            char* tag = NULL, *value = NULL;
+                            if( (rc = KXMLNodeReadCStr(TAG, &tag, NULL)) == 0 &&
+                                (rc = KXMLNodeReadCStr(VALUE, &value, NULL)) == 0 ) {
+                                if( strcasecmp(tag, "read_name_barcode_proc_directive") == 0 ) {
+                                    if( value == NULL || value[0] == '\0' ) {
+                                        obj->attributes.barcode_rule = eBarcodeRule_not_set;
+                                    } else if (strcasecmp(value, "interpret_as_spotgroup") == 0 || strcasecmp(value, "use_file_spot_name") == 0) {
+                                        obj->attributes.barcode_rule = eBarcodeRule_use_file_spot_name;
+                                    } else if (strcasecmp(value, "use_table_in_experiment") == 0) {
+                                        obj->attributes.barcode_rule = eBarcodeRule_use_table_in_experiment;
+                                    } else if(strcasecmp(value, "ignore") == 0) {
+                                        obj->attributes.barcode_rule = eBarcodeRule_ignore_barcode;
+                                    } else {
+                                        rc = RC(rcSRA, rcFormatter, rcParsing, rcAttr, rcUnrecognized);
+                                        PLOGERR(klogErr, (klogErr, rc, "RUN_ATTRIBUTE['$(t)'] VALUE='$(v)'", PLOG_2(PLOG_S(t),PLOG_S(v)), tag, value));
+                                    }
+                                } else if( strcasecmp(tag, "quality_scoring_system") == 0 ) {
+                                    if( value != NULL )  {
+                                        if( strcasecmp(value, "phred") == 0 ) {
+                                            obj->attributes.quality_type = eExperimentQualityType_Phred;
+                                        } else if( strcasecmp(value, "logodds") == 0 || strcasecmp(value, "log odds") == 0 ) {
+                                            obj->attributes.quality_type = eExperimentQualityType_LogOdds;
+                                        } else if( strcasecmp(value, "other") == 0 ) {
+                                            obj->attributes.quality_type = eExperimentQualityType_Other;
+                                        }
+                                    }
+                                    if( obj->attributes.quality_type == eExperimentQualityType_Undefined ) {
+                                        rc = RC(rcSRA, rcFormatter, rcParsing, rcAttr, rcUnrecognized);
+                                        PLOGERR(klogErr, (klogErr, rc, "RUN_ATTRIBUTE['$(t)'] VALUE='$(v)'", PLOG_2(PLOG_S(t),PLOG_S(v)), tag, value));
+                                    }
+                                } else if( strcasecmp(tag, "quality_book_char") == 0 ) {
+                                    if( value != NULL && value[0] != '\0' ) {
+                                        obj->attributes.quality_offset = value[0];
+                                    } else {
+                                        PLOGMSG(klogWarn, (klogWarn, "RUN_ATTRIBUTE['$(t)'] VALUE='$(v)' ignored", PLOG_2(PLOG_S(t),PLOG_S(v)), tag, value));
+                                    }
+                                }
+                            } else {
+                                PLOGERR(klogErr, (klogErr, rc, "RUN_ATTRIBUTE[$(i)]/VALUE", PLOG_U32(i), i));
+                            }
+                            free(value);
+                            free(tag);
+                        } else {
+                            PLOGERR(klogErr, (klogErr, rc, "RUN_ATTRIBUTE[$(i)]", PLOG_U32(i), i));
+                        }
+                        KXMLNodeRelease(VALUE);
+                        KXMLNodeRelease(TAG);
+                        KXMLNodeRelease(RUN_ATTRIBUTE);
+                    } else {
+                        PLOGERR(klogErr, (klogErr, rc, "RUN_ATTRIBUTE $(i)", PLOG_U32(i), i));
+                    }
+                }
+            }
+            KXMLNodesetRelease(nset);
+        } else if( GetRCState(rc) == rcNotFound ) {
+            rc = 0;
+        } else {
+            LOGERR(klogErr, rc, "RUN_ATTRIBUTES/RUN_ATTRIBUTE node(s)");
+        }
+    }
+    if (rc == 0) {
+        *rslt = obj;
+    } else {
+        RunXML_Whack(obj);
+    }
+    return rc;
+}
diff --git a/tools/sra-load/run-xml.h b/tools/sra-load/run-xml.h
new file mode 100644
index 0000000..b46172b
--- /dev/null
+++ b/tools/sra-load/run-xml.h
@@ -0,0 +1,90 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _sra_tools_run_xml_
+#define _sra_tools_run_xml_
+
+#ifndef _h_klib_container_
+#include <klib/container.h>
+#endif
+
+#include "common-xml.h"
+
+typedef enum ERunFileType_enum {
+    rft_Unknown = 1,
+    rft_Fastq,
+    rft_SRF,
+    rft_SFF,
+    rft_HelicosNative,
+    rft_IlluminaNativeSeq,
+    rft_IlluminaNativePrb,
+    rft_IlluminaNativeInt,
+    rft_IlluminaNativeQseq,
+    rft_ABINativeCSFasta,
+    rft_ABINativeQuality,
+    rft_PacBio_HDF5
+} ERunFileType;
+
+typedef struct DataBlockFileAttr_struct {
+    ERunFileType filetype;
+    ExperimentQualityType quality_scoring_system;
+    ExperimentQualityEncoding quality_encoding;
+    uint8_t ascii_offset;
+} DataBlockFileAttr;
+
+typedef struct DataBlockFile_struct {
+    DataBlockFileAttr attr;
+    char* filename;
+    uint8_t* md5_digest;
+    char* cc_xml;
+    char* cc_path;
+} DataBlockFile;
+
+typedef struct DataBlock_struct {
+    char* name;
+    char* member_name;
+    int64_t sector;
+    int64_t region;
+    uint32_t serial;
+    uint32_t files_count;
+    DataBlockFile* files;
+} DataBlock;
+
+typedef struct RunXML {
+    uint32_t datablock_count;
+    DataBlock* datablocks;
+    /* known/used run attribuites */
+    RunAttributes attributes;
+} RunXML;
+
+void DataBlockFile_Whack(DataBlockFile* self);
+
+void DataBlock_Whack(DataBlock* self);
+
+rc_t RunXML_Make(RunXML **rslt, const KXMLNode *RUN);
+
+rc_t RunXML_Whack(const RunXML *cself);
+
+#endif /* _sra_tools_run_xml_ */
diff --git a/tools/sra-load/sff-fmt.c b/tools/sra-load/sff-fmt.c
new file mode 100644
index 0000000..d651ef4
--- /dev/null
+++ b/tools/sra-load/sff-fmt.c
@@ -0,0 +1,490 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <sra/sff-file.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+
+typedef struct SFFLoaderFmt SFFLoaderFmt;
+
+#define SRALOADERFMT_IMPL SFFLoaderFmt
+#include "loader-fmt.h"
+
+#include "writer-454.h"
+#include "writer-ion-torrent.h"
+#include "debug.h"
+
+#include <byteswap.h>
+
+struct SFFLoaderFmt {
+    SRALoaderFmt dad; /* base type -> must be first in struct */ 
+    const SRAWriter454* w454;
+    const SRAWriterIonTorrent* wIonTorrent;
+    bool skip_signal;
+    uint32_t curr_read_number;
+
+    /* file buffer data */
+    const char* file_name;
+    const uint8_t* file_buf;
+    size_t file_advance;
+    uint64_t index_correction; /* used in case of concatinated files */
+
+    /* spot data */
+    SFFCommonHeader header;
+    pstring flow_chars;
+    pstring key_seq;
+
+    SFFReadHeader read_header;
+    pstring name;
+    pstring signal;
+    pstring position;
+    pstring read;
+    pstring quality;
+};
+
+static
+rc_t SFFLoaderFmt_ReadBlock(SFFLoaderFmt* self, const SRALoaderFile* file, size_t size, const char* location, bool silent)
+{
+    size_t read = 0;
+    rc_t rc = SRALoaderFileRead(file, self->file_advance, size, (const void**)&self->file_buf, &read);
+    self->file_advance = 0;
+    if( rc == 0 && (size > 0 && (self->file_buf == NULL || read < size)) ) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcInsufficient);
+    }
+    if( rc != 0 && !silent ) {
+        SRALoaderFile_LOG(file, klogErr, rc, "$(l), needed $(needed) got $(got) bytes",
+                PLOG_3(PLOG_S(l),PLOG_U32(needed),PLOG_U32(got)), location, size, read);
+    }
+    return rc;
+}
+
+static
+rc_t SFFLoaderFmtReadCommonHeader(SFFLoaderFmt* self, const SRALoaderFile *file)
+{
+    rc_t rc = 0;
+    bool skiped_idx_pad = false;
+    uint16_t head_sz;
+    SFFCommonHeader prev_head;
+    pstring prev_flow_chars;
+    pstring prev_key_seq;
+
+    if( (rc = SRALoaderFile_Offset(file, &self->index_correction)) != 0 ) {
+        SRALoaderFile_LOG(file, klogErr, rc, "Reading initial file position", NULL);
+        return rc;
+    }
+SkipIndexPad:
+    self->index_correction += self->file_advance;
+    if( (rc = SFFLoaderFmt_ReadBlock(self, file, SFFCommonHeader_size, NULL, true)) != 0) {
+        SRALoaderFile_LOG(file, klogErr, rc, "common header, needed $(needed) bytes",
+                          PLOG_U32(needed), SFFCommonHeader_size);
+        return rc;
+    }
+    if( self->header.magic_number != 0 ) {
+        /* next file in stream, remember prev to sync to each */
+        memcpy(&prev_head, &self->header, sizeof(SFFCommonHeader));
+        pstring_copy(&prev_flow_chars, &self->flow_chars);
+        pstring_copy(&prev_key_seq, &self->key_seq);
+    } else {
+        prev_head.magic_number = 0;
+        prev_head.index_length = 0;
+    }
+
+    memcpy(&self->header, self->file_buf, SFFCommonHeader_size);
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+    self->header.magic_number = bswap_32(self->header.magic_number);
+    self->header.version = bswap_32(self->header.version);
+    self->header.index_offset = bswap_64(self->header.index_offset);
+    self->header.index_length = bswap_32(self->header.index_length);
+    self->header.number_of_reads = bswap_32(self->header.number_of_reads);
+    self->header.header_length = bswap_16(self->header.header_length);
+    self->header.key_length = bswap_16(self->header.key_length);
+    self->header.num_flows_per_read = bswap_16(self->header.num_flows_per_read);
+#endif
+
+    if( self->header.magic_number != (('.'<<24)|('s'<<16)|('f'<<8)|('f'<<0)) ) {
+        if( !skiped_idx_pad && prev_head.magic_number != 0 ) {
+            /* possible concatination of 2 files with index at EOF and padded to 8 bytes with header values not padded,
+               try skipping padding and reread */
+            uint32_t pad = 8 - prev_head.index_length % 8;
+            if( pad != 0 ) {
+                self->file_advance += pad;
+                DEBUG_MSG(5, ("%s: trying to skip over %u bytes index section padding\n", self->file_name, pad));
+                skiped_idx_pad = true;
+                goto SkipIndexPad;
+            }
+        }
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcUnrecognized);
+        SRALoaderFile_LOG(file, klogErr, rc, "magic number: $(m)", PLOG_U32(m), self->header.magic_number);
+        return rc;
+    }
+    if( self->header.version != 1 ) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcBadVersion);
+        SRALoaderFile_LOG(file, klogErr, rc, "format version $(v)", PLOG_U32(v), self->header.version);
+        return rc;
+    }
+    if( self->header.flowgram_format_code != SFFFormatCodeUI16Hundreths ) {
+        /* NOTE: add a case here if flowgram coding gets new version to support different */
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcUnsupported);
+        SRALoaderFile_LOG(file, klogErr, rc, "common header flowgram format code", NULL);
+        return rc;
+    }
+    if( self->header.index_length % 8 != 0 ) {
+        DEBUG_MSG(5, ("%s: index_length field value is not 8 byte padded: %u\n", self->file_name, self->header.index_length));
+    }
+    head_sz = SFFCommonHeader_size + self->header.num_flows_per_read + self->header.key_length;
+    head_sz += (head_sz % 8) ? (8 - (head_sz % 8)) : 0;
+    if( head_sz != self->header.header_length ) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcFormat, rcInvalid);
+        SRALoaderFile_LOG(file, klogErr, rc, "header length $(h) <> $(s) ", PLOG_2(PLOG_U16(h),PLOG_U16(s)),
+                          self->header.header_length, head_sz);
+        return rc;
+    }
+    /* read flow chars and key */
+    self->file_advance = SFFCommonHeader_size;
+    if( (rc = SFFLoaderFmt_ReadBlock(self, file, head_sz - SFFCommonHeader_size, "common header", false)) != 0) {
+        return rc;
+    }
+    self->file_advance = head_sz - SFFCommonHeader_size;
+
+    if( (rc = pstring_assign(&self->flow_chars, self->file_buf, self->header.num_flows_per_read)) != 0 ||
+        (rc = pstring_assign(&self->key_seq, self->file_buf + self->header.num_flows_per_read, self->header.key_length)) != 0 ) {
+        SRALoaderFile_LOG(file, klogErr, rc, "reading flows/key sequence", NULL);
+        return rc;
+    }
+    if( prev_head.magic_number != 0 ) {
+        /* next file's common header must match previous file's common header, partially */
+        if( prev_head.key_length != self->header.key_length ||
+            prev_head.num_flows_per_read != self->header.num_flows_per_read ||
+            pstring_cmp(&prev_flow_chars, &self->flow_chars) != 0 ||
+            pstring_cmp(&prev_key_seq, &self->key_seq) != 0 ) {
+                rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcInconsistent);
+                SRALoaderFile_LOG(file, klogErr, rc, "previous file common header differ in flows/key sequence", NULL);
+        }
+    }
+    if( rc == 0 ) {
+        if( self->w454 ) {
+            rc = SRAWriter454_WriteHead(self->w454, &self->flow_chars, &self->key_seq);
+        } else {
+            rc = SRAWriterIonTorrent_WriteHead(self->wIonTorrent, &self->flow_chars, &self->key_seq);
+        }
+    }
+    return rc;
+}
+
+static
+rc_t SFFLoaderFmtReadDataHeader(SFFLoaderFmt* self, const SRALoaderFile* file)
+{
+    rc_t rc = 0;
+    uint16_t head_sz = 0;
+
+    /* Make sure the entire fixed portion of Read Header section is in the file buffer window */
+    if( (rc = SFFLoaderFmt_ReadBlock(self, file, SFFReadHeader_size, "read header", false)) != 0 ) {
+        return rc;
+    }
+    memcpy(&self->read_header, self->file_buf, SFFReadHeader_size);
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+    self->read_header.header_length = bswap_16(self->read_header.header_length);
+    self->read_header.name_length = bswap_16(self->read_header.name_length);
+    self->read_header.number_of_bases = bswap_32(self->read_header.number_of_bases);
+    self->read_header.clip_quality_left = bswap_16(self->read_header.clip_quality_left);
+    self->read_header.clip_quality_right = bswap_16(self->read_header.clip_quality_right);
+    self->read_header.clip_adapter_left = bswap_16(self->read_header.clip_adapter_left);
+    self->read_header.clip_adapter_right = bswap_16(self->read_header.clip_adapter_right);
+#endif
+
+    head_sz = SFFReadHeader_size + self->read_header.name_length;
+    head_sz += (head_sz % 8) ? (8 - (head_sz % 8)) : 0;
+    if( head_sz != self->read_header.header_length ) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcFormat, rcInvalid);
+        SRALoaderFile_LOG(file, klogErr, rc, "read header length $(h) != $(s)", PLOG_2(PLOG_U16(h),PLOG_U16(s)),
+                          self->header.header_length, head_sz);
+        return rc;
+    }
+    /* read name */
+    self->file_advance = SFFReadHeader_size;
+    if( (rc = SFFLoaderFmt_ReadBlock(self, file, head_sz - SFFReadHeader_size, "read header", false)) != 0) {
+        return rc;
+    }
+    self->file_advance = head_sz - SFFReadHeader_size;
+
+    if( (rc = pstring_assign(&self->name, self->file_buf, self->read_header.name_length)) != 0 ) {
+        SRALoaderFile_LOG(file, klogErr, rc, "copying read name", NULL);
+    }
+    return rc;
+}
+
+static
+rc_t SFFLoaderFmtReadData(SFFLoaderFmt* self, const SRALoaderFile* file)
+{
+    rc_t rc = 0;
+    uint32_t i;
+
+    /* calc signal chunk size */
+    size_t signal_sz = self->header.num_flows_per_read * sizeof(uint16_t);
+    /* plus position, read, quality */
+    size_t sz = signal_sz + self->read_header.number_of_bases * 3;
+    /* + padding */
+    sz += (sz % 8) ? (8 - (sz % 8)) : 0;
+
+    /* adjust the buffer window to full data block size */
+    if( (rc = SFFLoaderFmt_ReadBlock(self, file, sz, "read data", false)) != 0 ) { 
+        return rc;
+    }
+    self->file_advance = sz;
+
+    if( !self->skip_signal ) {
+        rc = pstring_assign(&self->signal, self->file_buf, signal_sz);
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+        if( rc == 0 ) {
+            uint16_t* sig = (uint16_t*)self->signal.data;
+            for(i = 0; i < self->header.num_flows_per_read; i++) {
+                sig[i] = bswap_16(sig[i]);
+            }
+        }
+#endif
+    }
+
+    if( rc == 0 ) {
+        const uint8_t* pos = self->file_buf + signal_sz;
+
+        if( !self->skip_signal ) {
+            INSDC_coord_one *p;
+            /* reset buffer to proper size */
+            pstring_clear(&self->position);
+            rc = pstring_append_chr(&self->position, 0, self->read_header.number_of_bases * sizeof(*p));
+            p = (INSDC_coord_one*)&self->position.data[0];
+            p[0] = pos[0];
+            for(i = 1; i < self->read_header.number_of_bases; i++) {
+                p[i] = p[i - 1] + pos[i];
+            }
+        }
+        if( rc == 0 ) {
+            pos += self->read_header.number_of_bases;
+            rc = pstring_assign(&self->read, pos, self->read_header.number_of_bases);
+            /*for(i = 0; i< self->read.len; i++ ) {
+                self->read.data[i] = tolower(self->read.data[i]);
+            }*/
+        }
+        if( rc == 0 ) {
+            pos += self->read_header.number_of_bases;
+            rc = pstring_assign(&self->quality, pos, self->read_header.number_of_bases);
+        }
+    }
+    if( rc != 0 ) {
+        SRALoaderFile_LOG(file, klogErr, rc, "copying read data", NULL);
+    }
+    return rc;
+}
+
+/**
+ * SFFLoaderFmtSkipIndex - skip through indexes section if current position in file is indexes offset from header
+ */
+static
+rc_t SFFLoaderFmtSkipIndex(SFFLoaderFmt* self, const SRALoaderFile* file)
+{
+    rc_t rc = 0;
+    uint64_t pos;
+    /* advance whatever and read file position */
+    if( (rc = SFFLoaderFmt_ReadBlock(self, file, 0, "index", false)) == 0 &&
+        (rc = SRALoaderFile_Offset(file, &pos)) == 0 ) {
+        if( pos == (self->header.index_offset + self->index_correction) ) {
+            /* skip */
+            size_t leftover;
+            self->file_advance += self->header.index_length;
+            DEBUG_MSG(5, ("%s: indexes skipped at 0x%016X, %u bytes\n",
+                          self->file_name, pos, self->header.index_length));
+            /* try to get more data while skipping index */
+            if( (rc = SRALoaderFileRead(file, self->file_advance, 16, (const void**)&self->file_buf, &leftover)) == 0 ) {
+                if( self->file_buf != NULL && leftover < 8 ) {
+                    /* smth short is read! possible last chunk in file was index and it was padded to 8 bytes,
+                       while in header index_length field value was not padded */
+                    if( leftover == (8 - self->header.index_length % 8) ) {
+                        /* read out padding */
+                        if( (rc = SRALoaderFileRead(file, leftover, 0, (const void**)&self->file_buf, &leftover)) == 0 ) {
+                            if( self->file_buf == NULL ) {
+                                /* ok EOF! */
+                                DEBUG_MSG(5, ("%s: ignored extra %u bytes index section padding\n",
+                                              self->file_name, 8 - self->header.index_length % 8));
+                            }
+                        }
+                    }
+                }
+            }
+            self->file_advance = 0;
+        }
+    }
+    return rc;
+}
+
+static
+rc_t SFFLoaderFmtWriteDataFile(SFFLoaderFmt* self, const SRALoaderFile* file)
+{
+    rc_t rc = 0;
+
+    while( rc == 0 ) {
+        if( self->curr_read_number == 0 ) {
+            if( (rc = SFFLoaderFmtReadCommonHeader(self, file)) == 0 ) {
+                DEBUG_MSG (5, ("%s: Common header ok: %u reads\n", self->file_name, self->header.number_of_reads));
+                DEBUG_MSG (8, ("%s: flow_chars: [%hu] %s\n", self->file_name, self->header.num_flows_per_read, self->flow_chars.data));
+                DEBUG_MSG (8, ("%s: key_seq: [%hu] %s\n", self->file_name, self->header.key_length, self->key_seq.data));
+            } else if( GetRCObject(rc) == (enum RCObject)rcData && GetRCState(rc) == rcIgnored ) {
+                rc = 0;
+                break;
+            }
+        }
+        if( rc == 0 && self->header.number_of_reads != 0 && 
+            (rc = SFFLoaderFmtSkipIndex(self, file)) == 0 &&
+            (rc = SFFLoaderFmtReadDataHeader(self, file)) == 0 &&
+            (rc = SFFLoaderFmtReadData(self, file)) == 0 ) {
+            if( self->w454 ) {
+                rc = SRAWriter454_WriteRead(self->w454, file, &self->name, &self->read, &self->quality,
+                                         self->skip_signal ? NULL : &self->signal,
+                                         self->skip_signal ? NULL : &self->position,
+                                         self->read_header.clip_quality_left, self->read_header.clip_quality_right,
+                                         self->read_header.clip_adapter_left, self->read_header.clip_adapter_right);
+            } else {
+                rc = SRAWriterIonTorrent_WriteRead(self->wIonTorrent, file, &self->name, &self->read, &self->quality,
+                         self->skip_signal ? NULL : &self->signal,
+                         self->skip_signal ? NULL : &self->position,
+                         self->read_header.clip_quality_left, self->read_header.clip_quality_right,
+                         self->read_header.clip_adapter_left, self->read_header.clip_adapter_right);
+            }
+            if( rc == 0 ) {
+                ++self->curr_read_number;
+            }
+        }
+        if( rc != 0 && (GetRCObject(rc) != rcTransfer && GetRCState(rc) != rcDone) ) {
+            SRALoaderFile_LOG(file, klogErr, rc, "on or about read #$(i)", PLOG_U32(i), self->curr_read_number + 1);
+        } else if( self->curr_read_number == self->header.number_of_reads ) {
+            DEBUG_MSG(5, ("%s: done loading declared %u reads\n", self->file_name, self->curr_read_number));
+            self->curr_read_number = 0;
+            /* will skip indexes if they are at eof */
+            if( (rc = SFFLoaderFmtSkipIndex(self, file)) == 0 ) {
+                /* This should be the end of file and/or beginning of next */
+                if( (rc = SFFLoaderFmt_ReadBlock(self, file, 0, "EOF", false)) == 0 ) {
+                    if( self->file_buf == NULL ) {
+                        DEBUG_MSG(5, ("%s: EOF detected\n", self->file_name));
+                        self->index_correction = 0;
+                        break;
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+const char UsageDefaultName[] = "sff-load";
+
+static
+rc_t SFFLoaderFmtVersion( const SFFLoaderFmt*self, uint32_t *vers, const char** name )
+{
+    *vers = KAppVersion();
+    *name = "SFF";
+    return 0;
+}
+
+static
+rc_t SFFLoaderFmtDestroy(SFFLoaderFmt* self, SRATable** table)
+{
+    SRAWriter454_Whack(self->w454, table);
+    SRAWriterIonTorrent_Whack(self->wIonTorrent, table);
+    free(self);
+    return 0;
+}
+
+static
+rc_t SFFLoaderFmtWriteData(SFFLoaderFmt* self, uint32_t argc, const SRALoaderFile* const argv[], int64_t* spots_bad_count)
+{
+    rc_t rc = 0;
+    uint32_t idx = 0;
+
+    for(idx = 0; rc == 0 && idx < argc; idx ++) {
+        if( (rc = SRALoaderFileName(argv[idx], &self->file_name)) == 0 ) {
+            self->curr_read_number = 0;
+            rc = SFFLoaderFmtWriteDataFile(self, argv[idx]);
+        }
+    }
+    return rc;
+}
+
+static SRALoaderFmt_vt_v1 vtSFFLoaderFmt = 
+{
+    1,
+    0,
+    SFFLoaderFmtDestroy,
+    SFFLoaderFmtVersion,
+    NULL,
+    SFFLoaderFmtWriteData
+};
+
+rc_t SFFLoaderFmtMake(SRALoaderFmt** self, const SRALoaderConfig* config)
+{
+    rc_t rc = 0;
+    SFFLoaderFmt* obj = NULL;
+    const PlatformXML* platform;
+
+    if( self == NULL || config == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcSelf, rcNull);
+    }
+    *self = NULL;
+    if( (rc = Experiment_GetPlatform(config->experiment, &platform)) != 0 ) {
+        return rc;
+    }
+    obj = calloc(1, sizeof(SFFLoaderFmt));
+    if(obj == NULL) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+    }
+    if( (rc = SRALoaderFmtInit(&obj->dad, (const SRALoaderFmt_vt*)&vtSFFLoaderFmt)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize parent object");
+    } else {
+        if( platform->id == SRA_PLATFORM_454 ) {
+            if( (rc = SRAWriter454_Make(&obj->w454, config)) != 0 ) {
+                LOGERR(klogInt, rc, "failed to initialize writer");
+            }
+        } else {
+            if( (rc = SRAWriterIonTorrent_Make(&obj->wIonTorrent, config)) != 0 ) {
+                LOGERR(klogInt, rc, "failed to initialize Ion Torrent writer");
+            }
+        }
+    }
+    if(rc == 0) {
+        obj->skip_signal = (config->columnFilter & efltrSIGNAL) && !(config->columnFilter & efltrDEFAULT);
+        *self = &obj->dad;
+    } else {
+        free(obj);
+    }
+    return rc;
+}
+
+rc_t SRALoaderFmtMake(SRALoaderFmt **self, const SRALoaderConfig *config)
+{
+    return SFFLoaderFmtMake(self, config);
+}
diff --git a/tools/sra-load/sra-writer.c b/tools/sra-load/sra-writer.c
new file mode 100644
index 0000000..bbfcb5b
--- /dev/null
+++ b/tools/sra-load/sra-writer.c
@@ -0,0 +1,370 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <kapp/main.h>
+#include <klib/rc.h>
+#include <klib/status.h>
+#include <klib/log.h>
+#include <sra/types.h>
+#include <sra/wsradb.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+
+#include "debug.h"
+#include "loader-fmt.h"
+#include "sra-writer.h"
+
+#define SRAWRITER_MAX_READS 256
+
+struct SRAWriter {
+    const SRALoaderConfig* config;
+    int64_t spots_to_run;
+
+    SRATable* table;
+    uint8_t nreads;
+    bool defaults;
+
+    uint32_t col_spot_group_id;
+    uint32_t col_read_start_id;
+    uint32_t col_read_len_id;
+    SRASegment read_segs[SRAWRITER_MAX_READS];
+};
+
+rc_t SRAWriter_Make( SRAWriter** self, const SRALoaderConfig* config)
+{
+    rc_t rc = 0;
+    SRAWriter* obj = NULL;
+    uint8_t nreads;
+
+    if( self == NULL || config == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    if( (rc = Experiment_GetReadNumber(config->experiment, &nreads)) != 0 ) {
+        return rc;
+    }
+    obj = calloc(1, sizeof(*obj));
+    if( obj == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+    }
+    obj->config = config;
+    obj->nreads = nreads;
+    obj->spots_to_run = config->spots_to_run;
+    *self = obj;
+    return 0;
+}
+
+void SRAWriter_Whack(SRAWriter* self, SRATable** table)
+{
+    if( self != NULL ) {
+        if( table != NULL ) {
+            *table = self->table;
+        } else {
+            SRATableRelease(self->table);
+        }
+        free(self);
+    }
+}
+
+rc_t SRAWriter_CreateTable(SRAWriter* self, const char* schema)
+{
+    rc_t rc = 0;
+
+    assert(self->table == NULL);
+    if( self == NULL ) {
+        rc = RC( rcSRA, rcFormatter, rcWriting, rcSelf, rcNull);
+    } else {
+retry:
+        rc = SRAMgrCreateTable(self->config->sra_mgr, &self->table, schema, "%s", self->config->table_path);
+        if( GetRCObject(rc) == (enum RCObject)rcTable && GetRCState(rc) == rcExists && self->config->force_table_overwrite ) {
+            if( (rc = SRAMgrDropTable(self->config->sra_mgr, true, "%s", self->config->table_path)) == 0 ) {
+                goto retry;
+            }
+        }
+    }
+    if( rc != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to create table with schema $(schema)", PLOG_S(schema), schema));
+    } else {
+        DEBUG_MSG (7, ("Created table with schema '%s'\n", schema));
+    }
+    return rc;
+}
+
+rc_t SRAWriter_OpenColumnWrite(SRAWriter* self, uint32_t *idx, const char *name, const char *datatype)
+{
+    if( self == NULL ) {
+        return RC( rcSRA, rcFormatter, rcWriting, rcSelf, rcNull);
+    }
+    return SRATableOpenColumnWrite(self->table, idx, NULL, name, datatype);
+}
+
+rc_t SRAWriter_NewSpot(SRAWriter* self, spotid_t *id)
+{
+    rc_t rc = 0;
+    spotid_t s;
+
+    if( self == NULL ) {
+        rc = RC( rcSRA, rcFormatter, rcWriting, rcSelf, rcNull);
+    } else {
+        id = id ? id : &s;
+        rc = SRATableNewSpot(self->table, id);
+        if(rc == 0 ) {
+            DEBUG_MSG(3, ("writing spot %lu data\n", *id));
+        }
+        if( (*id % 2000000) == 0 ) {
+            PLOGMSG(klogInt, (klogInfo, "spot $(spot_count)", "severity=status,spot_count=%u", *id));
+        }
+    }
+    return rc;
+}
+
+rc_t SRAWriter_WriteIdxColumn(SRAWriter* self, uint32_t idx, const void *base, uint64_t bytes, bool as_dflt)
+{
+    if( self == NULL ) {
+        return RC( rcSRA, rcFormatter, rcWriting, rcSelf, rcNull);
+    }
+    if( as_dflt ) {
+        return SRATableSetIdxColumnDefault(self->table, idx, base, 0, bytes * 8);
+    }
+    return SRATableWriteIdxColumn(self->table, idx, base, 0, bytes * 8);
+}
+
+rc_t SRAWriter_CloseSpot(SRAWriter* self)
+{
+    rc_t rc = 0;
+    if( self == NULL ) {
+        rc = RC( rcSRA, rcFormatter, rcWriting, rcSelf, rcNull);
+    } else {
+        if( (rc = SRATableCloseSpot(self->table)) == 0 ) {
+            rc = Quitting();
+            if( self->spots_to_run > 0 ) {
+                self->spots_to_run--;
+            }
+            if( rc == 0 && self->spots_to_run == 0 ) {
+                rc = RC( rcSRA, rcFormatter, rcWriting, rcTransfer, rcDone);
+            }
+        }
+    }
+    return rc;
+}
+
+/* if data is NULL no default value is written, only column is open */
+static
+rc_t SRAWriter_WDflt(SRAWriter* self, const char *cname, const char *type, const void *data, size_t size)
+{
+    rc_t rc = 0;
+    uint32_t ci = 0;
+
+    if( (rc = SRATableOpenColumnWrite(self->table, &ci, 0, cname, type)) != 0 && GetRCState(rc) != rcExists ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to open column $(column)", PLOG_S(column), cname));
+    } else if( data != NULL && (rc = SRATableSetIdxColumnDefault(self->table, ci, data, 0, size * 8)) != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to write default to column $(column)", PLOG_S(column), cname));
+    } else if( strcmp(cname, "SPOT_GROUP") == 0 ) {
+        self->col_spot_group_id = ci;
+    } else if( strcmp(cname, "READ_START") == 0 ) {
+        self->col_read_start_id = ci;
+    } else if( strcmp(cname, "READ_LEN") == 0 ) {
+        self->col_read_len_id = ci;
+    }
+    return rc;
+}
+
+rc_t SRAWriter_WriteDefaults(SRAWriter* self)
+{
+    rc_t rc = 0;
+    uint32_t i;
+    const PlatformXML* plat;
+    char labels[10240] = "\0";
+    INSDC_SRA_xread_type read_types[SRAWRITER_MAX_READS];
+    INSDC_coord_zero label_start[SRAWRITER_MAX_READS];
+    INSDC_coord_len label_len[SRAWRITER_MAX_READS];
+    bool has_read_seg = false;
+    INSDC_coord_zero read_start[SRAWRITER_MAX_READS];
+    INSDC_coord_len read_len[SRAWRITER_MAX_READS];
+
+    if( self == NULL ) {
+        return RC( rcSRA, rcFormatter, rcWriting, rcSelf, rcNull);
+    }
+    if( self->defaults ) {
+        return 0;
+    }
+    ((SRAWriter*)self)->defaults = true;
+
+    if( (rc = Experiment_GetPlatform(self->config->experiment, &plat)) == 0 ) {
+        SRASegment read_segs[SRAWRITER_MAX_READS];
+        if( (rc = Experiment_ReadSegDefault(self->config->experiment, read_segs)) == 0 ) {
+            has_read_seg = true;
+            for (i = 0; i != self->nreads; ++i) {
+                read_start[i] = read_segs[i].start;
+                read_len[i] = read_segs[i].len;
+            }
+        } else if( GetRCObject(rc) == (enum RCObject)rcData && GetRCState(rc) == rcUnsupported ) {
+            rc = 0;
+        }
+    }
+    for(i = 0; rc == 0 && i < self->nreads; i++) {
+        const ReadSpecXML_read* rspec = NULL;
+        if( (rc = Experiment_GetRead(self->config->experiment, i, &rspec)) != 0 ) {
+            continue;
+        }
+        label_start[i] = strlen(labels);
+        label_len[i] = 0;
+        if( rspec->read_label != NULL ) {
+            label_len[i] = strlen(rspec->read_label);
+            strncat(labels, rspec->read_label, label_len[i]);
+        }
+        read_types[i] = rspec->read_class;
+    }
+
+    if( rc == 0 ) {
+        uint8_t platform = plat->id;
+#if _DEBUGGING
+        DEBUG_MSG (7, ("Default: %hu reads per spot, labels: '%s'\n", self->nreads, labels));
+        for( i = 0; i < self->nreads; i++) {
+            DEBUG_MSG (5, ("Default: Read %u. %s: Label: [%2u:%2u]",
+                           i + 1, ( read_types[i] & SRA_READ_TYPE_BIOLOGICAL ) ? " Bio" : "Tech",
+                           label_start[i], label_len[i]));
+            if( has_read_seg ) {
+                DEBUG_MSG (5, (" Seg: [%3u:%3u]", read_start[i], read_len[i]));
+            }
+            DEBUG_MSG (5, ("\n"));
+        }
+#endif
+        /* TBD: SPOT_GROUP on demand, remove NREADS!! */
+        if( (rc = SRAWriter_WDflt(self, "PLATFORM", sra_platform_id_t, &platform, sizeof(platform))) != 0 ||
+            (rc = SRAWriter_WDflt(self, "NREADS", vdb_uint8_t, &self->nreads, sizeof(self->nreads))) != 0 ||
+            (rc = SRAWriter_WDflt(self, "LABEL", vdb_ascii_t, labels, strlen(labels))) != 0 ||
+            (rc = SRAWriter_WDflt(self, "LABEL_START", "INSDC:coord:zero", label_start, self->nreads * sizeof(label_start[0]))) != 0 ||
+            (rc = SRAWriter_WDflt(self, "LABEL_LEN", vdb_uint32_t, label_len, self->nreads * sizeof(label_len[0]))) != 0 ||
+            (rc = SRAWriter_WDflt(self, "READ_TYPE", sra_read_type_t, read_types, self->nreads * sizeof(read_types[0]))) != 0 ||
+            (rc = SRAWriter_WDflt(self, "SPOT_GROUP", vdb_ascii_t, "", 0)) != 0 ||
+            (rc = SRAWriter_WDflt(self, "READ_START", "INSDC:coord:zero", has_read_seg ? read_start : NULL, self->nreads * sizeof(read_start[0]))) != 0 ||
+            (rc = SRAWriter_WDflt(self, "READ_LEN", vdb_uint32_t, has_read_seg ? read_len : NULL, self->nreads * sizeof(read_len[0]))) != 0 ) {
+            return rc;
+        }
+    }
+    return rc;
+}
+
+rc_t SRAWriter_WriteSpotSegment(SRAWriter* self, const SRALoaderFile* file,
+                                const char* file_member_name, uint32_t nbases, const char* bases)
+{
+    rc_t rc = 0;
+
+    if( self == NULL || file == NULL || bases == NULL ) {
+        rc = RC( rcSRA, rcFormatter, rcMultiplexing, rcParam, rcNull);
+    } else if ( self->col_spot_group_id == 0 || self->col_read_start_id == 0 || self->col_read_len_id == 0 ) {
+        rc = RC( rcSRA, rcFormatter, rcMultiplexing, rcSelf, rcCorrupt);
+    } else {
+        const char* data_block_member_name = NULL;
+        const char* assigned_member_name = NULL;
+
+        DEBUG_MSG (5, ("file spot member_name '%s'\n", file_member_name));
+        if( file_member_name != NULL &&
+            (strcasecmp(file_member_name, "default") == 0 || strcasecmp(file_member_name, "0") == 0) ) {
+            file_member_name = "";
+        }
+        rc = SRALoaderFileMemberName(file, &data_block_member_name);
+        DEBUG_MSG (5, ("data block member_name '%s'\n", data_block_member_name));
+
+        if( rc == 0 && (rc = Experiment_MemberSeg(self->config->experiment, file_member_name, data_block_member_name,
+                                                  nbases, bases, ((SRAWriter*)self)->read_segs, &assigned_member_name)) == 0 ) {
+            DEBUG_MSG (5, ("Assigned member '%s'\n", assigned_member_name));
+            if( assigned_member_name != NULL ) {
+                if( (rc = SRATableWriteIdxColumn(self->table, self->col_spot_group_id, assigned_member_name, 0, strlen(assigned_member_name) * 8 )) != 0 ) {
+                    PLOGERR(klogInt, (klogInt, rc, "failed to write $(column) column", "column=SPOT_GROUP"));
+                }
+            }
+            if( rc == 0 ) {
+                int32_t read_start[SRAWRITER_MAX_READS];
+                uint32_t read_len[SRAWRITER_MAX_READS];
+                int i;
+
+                for (i = 0; i < self->nreads; i++) {
+                    read_start[i] = self->read_segs[i].start;
+                    read_len[i] = self->read_segs[i].len;
+                }
+
+                if( (rc = SRATableWriteIdxColumn(self->table, self->col_read_start_id, read_start, 0, sizeof(read_start[0]) * self->nreads * 8 )) != 0 ) {
+                    PLOGERR(klogInt, (klogInt, rc, "failed to write $(column) column", "column=READ_START"));
+                } else if( (rc = SRATableWriteIdxColumn(self->table, self->col_read_len_id, read_len, 0, sizeof(read_len[0]) * self->nreads * 8 )) != 0 ) {
+                    PLOGERR(klogInt, (klogInt, rc, "failed to write $(column) column", "column=READ_LEN"));
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t SRAWriter_WriteSpotSegmentSimple(SRAWriter* self, const SRALoaderFile* file, const char* file_member_name, const SRASegment* read_seg)
+{
+    rc_t rc = 0;
+
+    if( self == NULL || file == NULL ) {
+        rc = RC( rcSRA, rcFormatter, rcMultiplexing, rcParam, rcNull);
+    } else if ( self->col_spot_group_id == 0 || self->col_read_start_id == 0 || self->col_read_len_id == 0 ) {
+        rc = RC( rcSRA, rcFormatter, rcMultiplexing, rcSelf, rcCorrupt);
+    } else {
+        const char* data_block_member_name = NULL;
+        const char* assigned_member_name = NULL;
+
+        DEBUG_MSG (5, ("file spot member_name '%s'\n", file_member_name));
+        if( file_member_name != NULL &&
+            (strcasecmp(file_member_name, "default") == 0 || strcasecmp(file_member_name, "0") == 0) ) {
+            file_member_name = "";
+        }
+        rc = SRALoaderFileMemberName(file, &data_block_member_name);
+        DEBUG_MSG (5, ("data block member_name '%s'\n", data_block_member_name));
+
+        if( rc == 0 && (rc = Experiment_MemberSegSimple(self->config->experiment, file_member_name, data_block_member_name,
+                                                        &assigned_member_name)) == 0 ) {
+            DEBUG_MSG (5, ("Assigned member '%s'\n", assigned_member_name));
+            if( assigned_member_name != NULL ) {
+                if( (rc = SRATableWriteIdxColumn(self->table, self->col_spot_group_id, assigned_member_name, 0, strlen(assigned_member_name) * 8 )) != 0 ) {
+                    PLOGERR(klogInt, (klogInt, rc, "failed to write $(column) column", "column=SPOT_GROUP"));
+                }
+            }
+            if( rc == 0 ) {
+                int32_t read_start[SRAWRITER_MAX_READS];
+                uint32_t read_len[SRAWRITER_MAX_READS];
+                int i;
+
+                for (i = 0; i < self->nreads; i++) {
+                    read_start[i] = read_seg[i].start;
+                    read_len[i] = read_seg[i].len;
+                }
+
+                if( (rc = SRATableWriteIdxColumn(self->table, self->col_read_start_id, read_start, 0, sizeof(read_start[0]) * self->nreads * 8 )) != 0 ) {
+                    PLOGERR(klogInt, (klogInt, rc, "failed to write $(column) column", "column=READ_START"));
+                } else if( (rc = SRATableWriteIdxColumn(self->table, self->col_read_len_id, read_len, 0, sizeof(read_len[0]) * self->nreads * 8 )) != 0 ) {
+                    PLOGERR(klogInt, (klogInt, rc, "failed to write $(column) column", "column=READ_LEN"));
+                }
+            }
+        }
+    }
+    return rc;
+}
diff --git a/tools/sra-load/sra-writer.h b/tools/sra-load/sra-writer.h
new file mode 100644
index 0000000..bae5bb2
--- /dev/null
+++ b/tools/sra-load/sra-writer.h
@@ -0,0 +1,92 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _sra_load_sra_writer_
+#define _sra_load_sra_writer_
+
+#include <sra/sradb.h>
+
+typedef struct SRAWriter SRAWriter;
+
+/* Make SRAWriter from configuration
+ */
+rc_t SRAWriter_Make( SRAWriter** self, const SRALoaderConfig* config);
+
+rc_t SRAWriter_CreateTable(SRAWriter* self, const char* schema);
+
+rc_t SRAWriter_OpenColumnWrite(SRAWriter* self, uint32_t *idx, const char *name, const char *datatype);
+
+#define COL_OPEN(colid, name, type) \
+    if( (rc = SRAWriter_OpenColumnWrite(self->base, &colid, name, type)) != 0 ) { \
+        if( GetRCState(rc) != rcExists ) { \
+            LOGERR(klogInt, rc, "failed to open column " name " of type " type); \
+            return rc; \
+        } \
+        rc = 0; \
+    }
+
+rc_t SRAWriter_NewSpot(SRAWriter* self, spotid_t *id);
+
+rc_t SRAWriter_WriteIdxColumn(SRAWriter* self, uint32_t idx, const void *base, uint64_t bytes, bool as_dflt);
+
+#define COL_WRITE(colid, name, pstring) \
+    if( colid != 0 ) { \
+        if( (rc = SRAWriter_WriteIdxColumn(cself->base, colid, pstring.data, pstring.len, false)) != 0 ) { \
+            LOGERR(klogInt, rc, "failed to write column " name); \
+            return rc; \
+        } \
+    }
+
+#define COL_WRITE_DEFAULT(colid, name, pstring) \
+    if( colid != 0 ) { \
+        if( (rc = SRAWriter_WriteIdxColumn(cself->base, colid, pstring.data, pstring.len, true)) != 0 ) { \
+            LOGERR(klogInt, rc, "failed to write default to column " name); \
+            return rc; \
+        } \
+    }
+
+rc_t SRAWriter_CloseSpot(SRAWriter* self);
+
+/* Writes default values ONLY ONCE to common SRATable columns
+ * bases_per_spot [IN, OPTIONAL] - 0 ignored, otherwise used in default READ_SEG calculations
+ */
+rc_t SRAWriter_WriteDefaults(SRAWriter* self);
+
+/* WriteSpotSegment
+ *  Will determine SPOT_GROUP and READ_SEG values and write them to table to current spot
+ *
+ *  file [IN] - current file
+ *  member_name [IN,NULL] - value extracted from a spotname if present
+ *  bases [IN] - 2na FASTA string
+ *  nbases [IN] - bases number (length)
+ *  read_seg [OUT,OPTIONAL] - calculated READ_SEG values
+ */
+rc_t SRAWriter_WriteSpotSegment(SRAWriter* self, const SRALoaderFile* file, const char* file_member_name, uint32_t nbases, const char* bases);
+
+rc_t SRAWriter_WriteSpotSegmentSimple(SRAWriter* self, const SRALoaderFile* file, const char* file_member_name, const SRASegment* read_seg);
+
+void SRAWriter_Whack(SRAWriter* self, SRATable** table);
+
+#endif /* _sra_load_sra_writer_ */
diff --git a/tools/sra-load/srf-absolid.c b/tools/sra-load/srf-absolid.c
new file mode 100644
index 0000000..a938766
--- /dev/null
+++ b/tools/sra-load/srf-absolid.c
@@ -0,0 +1,497 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <kapp/main.h>
+
+typedef struct SRFAbsolidLoaderFmt SRFAbsolidLoaderFmt;
+
+#define SRALOADERFMT_IMPL SRFAbsolidLoaderFmt
+#include "loader-fmt.h"
+
+#include "srf.h"
+#include "ztr-absolid.h"
+#include "srf-fmt.h"
+#include "pstring.h"
+#include "writer-absolid.h"
+#include "debug.h"
+
+#include <endian.h>
+#include <byteswap.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <assert.h>
+
+typedef struct fe_context_t_struct {
+    SRF_context ctx;
+    bool skip_signal;
+    const SRAWriteAbsolid* writer;
+
+    pstring name_prefix;
+    
+    struct {
+        uint8_t nreads;
+        uint16_t start[ABSOLID_FMT_MAX_NUM_READS+1];
+        pstring label[ABSOLID_FMT_MAX_NUM_READS+1];
+        char cs_key[ABSOLID_FMT_MAX_NUM_READS+1];
+        EAbisolidReadType type[ABSOLID_FMT_MAX_NUM_READS+1];
+    } region;
+} fe_context_t;
+
+static
+rc_t set_label_type(const char* label, pstring* name, EAbisolidReadType* type)
+{
+    rc_t rc = 0;
+
+    assert(name && type);
+
+    *type = AbsolidRead_Suffix2ReadType(label);
+
+    if( *type == eAbisolidReadType_Unknown ) {
+        DEBUG_MSG(3, ("read label is not recognized: '%s'\n", label));
+    } else {
+        const char* l = AbisolidReadType2ReadLabel[*type];
+        rc = pstring_assign(name, l, strlen(l));
+    }
+    return rc;
+}
+
+static
+rc_t fe_new_region(fe_context_t *self, size_t region_count, const region_t region[])
+{
+    rc_t rc = 0;
+    int i;
+
+    self->region.nreads = region_count / 2;
+    DEBUG_MSG(3, ("REGION: %u -> %u reads\n", region_count, self->region.nreads));
+    if( self->region.nreads <= 0 || self->region.nreads > ABSOLID_FMT_MAX_NUM_READS ) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcUnsupported);
+        SRALoaderFile_LOG(self->ctx.file, klogErr, rc, "read count $(c)", PLOG_U8(c), self->region.nreads);
+    }
+    for(i = 0; rc == 0 && i < self->region.nreads ; i++ ) {
+        int j = i * 2 + 1;
+        self->region.start[i] = region[j].start;
+        if( (rc = set_label_type(region[j].name, &self->region.label[i], &self->region.type[i])) != 0 ) {
+            break;
+        }
+        self->region.cs_key[i] = region[j - 1].name[0];
+        DEBUG_MSG(3, ("REGION[%u]: '%s', %u, '%c', start: %u\n",
+                      i, self->region.label[i].data, self->region.type[i], self->region.cs_key[i], self->region.start[i]));
+        switch(region[j].type) {
+            case Biological:
+            case Normal:
+            case Paired:
+            case Technical:
+                break;
+            default:
+                rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcUnexpected);
+                SRALoaderFile_LOG(self->ctx.file, klogErr, rc, "read #$(read_id) type mismatch; expected $(expected), got $(got)",
+                        "read_id=%u,expected=%s,got=%u", i, "(B|N|P|T)", region[j].type);
+                return rc;
+        }
+    }
+    if( rc == 0 &&
+        self->region.nreads > 1 && self->region.type[0] == self->region.type[1] ) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcDuplicate);
+        SRALoaderFile_LOG(self->ctx.file, klogErr, rc, "both reads have same type", NULL);
+    }
+    return rc;
+}
+
+static
+rc_t parse_v1_header(SRF_context *ctx, ZTR_Context *ztr_ctx, const uint8_t *data, size_t size)
+{
+    rc_t rc = 0;
+    size_t parsed;
+    char prefixType;
+    uint32_t counter;
+    ztr_raw_t ztr_raw;
+    ztr_t ztr;
+    enum ztr_chunk_type type;
+    fe_context_t* fe = (fe_context_t*)ctx;
+    
+    if( (rc = SRF_ParseDataChunk(data, size, &parsed, &fe->name_prefix, &prefixType, &counter)) != 0 ) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+        return SRALoaderFile_LOG(ctx->file, klogErr, rc, "parse_v1_header - failed to parse SRF chunk", NULL);
+    }
+    DEBUG_MSG(3, ("HEADER PREFIX: '%s'\n", fe->name_prefix.data));
+    if((rc = ABI_ZTR_AddToBuffer(ztr_ctx, data + parsed, size - parsed)) != 0) {
+        return rc;
+    }
+    if((rc = ABI_ZTR_ParseHeader(ztr_ctx)) != 0) {
+        return SRALoaderFile_LOG(ctx->file, klogErr, rc, "parse_v1_header - failed to parse ZTR header", NULL);
+    }
+    while(rc == 0 && !ABI_ZTR_BufferIsEmpty(ztr_ctx)) {
+        if((rc = ABI_ZTR_ParseBlock(ztr_ctx, &ztr_raw)) != 0) {
+            return SRALoaderFile_LOG(ctx->file, klogErr, rc, "parse_v1_header - failed to parse ZTR chunk", NULL);
+        }
+        if((rc = ABI_ZTR_ProcessBlock(ztr_ctx, &ztr_raw, &ztr, &type)) != 0) {
+            SRALoaderFile_LOG(ctx->file, klogErr, rc, "parse_v1_header - failed to process ZTR chunk", NULL);
+        }
+        if(type == REGN) {
+            rc = fe_new_region(fe, ztr.region->count, ztr.region->region);
+        }
+        if(*(void **)&ztr != NULL) {
+            free(*(void **)&ztr);
+        }
+    }
+    return rc;
+}
+
+static
+rc_t fe_new_read(fe_context_t *self, pstring *readId, EAbisolidReadType* type, pstring* label)
+{
+    rc_t rc = 0;
+    pstring name_suffix;
+    const char* p;
+
+    assert(self && readId && type && label);
+    DEBUG_MSG(3, ("READ_LABEL: '%s'\n", readId->data));
+    /* spot name suffix may end with '_(F|R).+' */
+    p = strrchr(readId->data, '_');
+    if( p != NULL ) {
+        rc = set_label_type(p + 1, label, type);
+        if( rc == 0 && *type > eAbisolidReadType_SPOT) {
+            /* cut label */
+            readId->len -= label->len + 1;
+        }
+    } else {
+        pstring_clear(label);
+        *type = eAbisolidReadType_SPOT;
+    }
+    if( rc == 0 && (rc = pstring_copy(&name_suffix, readId)) == 0 ) {
+        rc = SRAWriteAbsolid_MakeName(&self->name_prefix, &name_suffix, readId);
+    }
+    return rc;
+}
+
+static
+rc_t parse_v1_read(SRF_context *ctx, ZTR_Context *ztr_ctx, const uint8_t *data, size_t size)
+{
+    rc_t rc = 0;
+    size_t i, parsed;
+    ztr_raw_t ztr_raw;
+    ztr_t ztr;
+    enum ztr_chunk_type type;
+    fe_context_t* fe = (fe_context_t*)ctx;
+
+    uint8_t flags;
+    pstring readId;
+    EAbisolidReadType read_type;
+    pstring label;
+
+    AbsolidRead read[ABSOLID_FMT_MAX_NUM_READS];
+        
+    if( fe->region.nreads == 0 ) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcNotFound);
+        return SRALoaderFile_LOG(ctx->file, klogErr, rc, "missing region chunk before 1st read chunk", NULL);
+    }
+    if( (rc = SRF_ParseReadChunk(data, size, &parsed, &flags, &readId)) != 0 ) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rc);
+        return SRALoaderFile_LOG(ctx->file, klogErr, rc, "SRF parsing failure", NULL);
+    }
+    ABI_ZTR_AddToBuffer(ztr_ctx, data + parsed, size - parsed);
+
+    /* readId will have spotname */
+    if( (rc = fe_new_read(fe, &readId, &read_type, &label)) != 0 ) {
+        return SRALoaderFile_LOG(ctx->file, klogErr, rc, "parsing spot name suffix", NULL);
+    }
+    for(i = 0; i < sizeof(read) / sizeof(read[0]); i++) {
+        AbsolidRead_Init(&read[i]);
+    }
+    while(!ABI_ZTR_BufferIsEmpty(ztr_ctx)) {
+        if( (rc = ABI_ZTR_ParseBlock(ztr_ctx, &ztr_raw)) != 0 ||
+            (rc = ABI_ZTR_ProcessBlock(ztr_ctx, &ztr_raw, &ztr, &type)) != 0 ) {
+            SRALoaderFile_LOG(ctx->file, klogErr, rc, "ZTR parsing failure", NULL);
+            break;
+        }
+        switch (type) {
+        case BASE:
+            if(ztr.sequence->datatype != i8) {
+                rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcUnexpected);
+                SRALoaderFile_LOG(ctx->file, klogErr, rc, "read: expected 8-bit datatype", NULL);
+            } else if( read_type > eAbisolidReadType_SPOT ) {
+                int read_number = AbisolidReadType2ReadNumber[read_type];
+                if( (rc = pstring_assign(&read[read_number].seq, ztr.sequence->data, ztr.sequence->datasize)) == 0 ) {
+                    /* grab 1st, may be the only cs_key */
+                    read[read_number].cs_key = fe->region.cs_key[0];
+                    for(i = 1; i < fe->region.nreads; i++) {
+                        if( read_type == fe->region.type[i] ) {
+                            read[read_number].cs_key = fe->region.cs_key[i];
+                            break;
+                        }
+                    }
+                    SRF_set_read_filter(&read[read_number].filter, flags);
+                    rc = pstring_copy(&read[read_number].label, &label);
+                    DEBUG_MSG(3, ("SRF READ: '%s'\n", read[read_number].seq.data));
+                }
+                if( rc != 0 ) {
+                    SRALoaderFile_LOG(ctx->file, klogErr, rc, "copying read", NULL);
+                }
+            } else {
+                for(i = 0; rc == 0 && i < fe->region.nreads; i++) {
+                    int read_number = AbisolidReadType2ReadNumber[fe->region.type[i]];
+                    size_t len = (i + 1 >= fe->region.nreads ? ztr.sequence->datasize : fe->region.start[i + 1]) - fe->region.start[i];
+                    rc = pstring_assign(&read[read_number].seq, &ztr.sequence->data[fe->region.start[i]], len);
+                    read[read_number].cs_key = fe->region.cs_key[i];
+                    SRF_set_read_filter(&read[read_number].filter, flags);
+                    if( fe->region.label[i].len != 0 ) {
+                        rc = pstring_copy(&read[read_number].label, &fe->region.label[i]);
+                    }
+                    DEBUG_MSG(3, ("SRF READ[%u]: '%s'\n", i, read[read_number].seq.data));
+                }
+                if( rc != 0 ) {
+                    SRALoaderFile_LOG(ctx->file, klogErr, rc, "copying reads", NULL);
+                }
+            }
+            break;
+        case CNF1:
+            if(ztr.quality1->datatype != i8) {
+                rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcUnexpected);
+                SRALoaderFile_LOG(ctx->file, klogErr, rc, "quality: expected 8-bit datatype", NULL);
+            } else if( read_type > eAbisolidReadType_SPOT ) {
+                int read_number = AbisolidReadType2ReadNumber[read_type];
+                if( (rc = pstring_assign(&read[read_number].qual, ztr.quality1->data, ztr.quality1->datasize)) == 0 ) {
+                    DEBUG_MSG(3, ("SRF QUAL: %u bytes\n", read[read_number].qual.len));
+                }
+                if( rc != 0 ) {
+                    SRALoaderFile_LOG(ctx->file, klogErr, rc, "copying quality", NULL);
+                }
+            } else {
+                for(i = 0; rc == 0 && i < fe->region.nreads; i++) {
+                    int read_number = AbisolidReadType2ReadNumber[fe->region.type[i]];
+                    size_t len = (i + 1 >= fe->region.nreads ? ztr.quality1->datasize : fe->region.start[i + 1]) - fe->region.start[i];
+                    rc = pstring_assign(&read[read_number].qual, &ztr.quality1->data[fe->region.start[i]], len);
+                    DEBUG_MSG(3, ("SRF QUAL[%u]: %u bytes\n", i, read[read_number].qual.len));
+                }
+                if( rc != 0 ) {
+                    SRALoaderFile_LOG(ctx->file, klogErr, rc, "copying qualities", NULL);
+                }
+            }
+            break;
+        case SAMP:
+            if( !fe->skip_signal ) {
+                size_t i;
+                int stype = ABSOLID_FMT_COLMASK_NOTSET;
+                if(ztr.signal->datatype != f32) {
+                    rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcUnexpected);
+                    SRALoaderFile_LOG(ctx->file, klogErr, rc, "signal: expected 32-bit float datatype", NULL);
+                } else if( (ztr.signal->datasize % sizeof(float)) != 0 ) {
+                    rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+                    SRALoaderFile_LOG(ctx->file, klogErr, rc, "signal: size not 32-bit float aligned", NULL);
+                } else if (ztr.signal->channel == NULL) {
+                    rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcIncomplete);
+                    SRALoaderFile_LOG(ctx->file, klogErr, rc, "SIGNAL column: missing channel type", NULL);
+                } else if(strcmp(ztr.signal->channel, "0FAM") == 0) {
+                    stype = ABSOLID_FMT_COLMASK_FAM;
+                } else if(strcmp(ztr.signal->channel, "1CY3") == 0) {
+                    stype = ABSOLID_FMT_COLMASK_CY3;
+                } else if(strcmp(ztr.signal->channel, "2TXR") == 0) {
+                    stype = ABSOLID_FMT_COLMASK_TXR;
+                } else if(strcmp(ztr.signal->channel, "3CY5") == 0) {
+                    stype = ABSOLID_FMT_COLMASK_CY5;
+                } else {
+                    rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcUnexpected);
+                    SRALoaderFile_LOG(ctx->file, klogErr, rc, "SIGNAL column: unexpected channel type", NULL);
+                }
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+                for(i = 0; rc == 0 && i < ztr.signal->datasize; i += 4) {
+                    uint32_t* r = (uint32_t*)&ztr.signal->data[i];
+                    *r = bswap_32(*r);
+                }
+#endif
+                if( rc == 0 ) {
+                    if( read_type > eAbisolidReadType_SPOT ) {
+                        int read_number = AbisolidReadType2ReadNumber[read_type];
+                        pstring* d = NULL;
+                        switch(stype) {
+                            case ABSOLID_FMT_COLMASK_FAM:
+                                read[read_number].fs_type = eAbisolidFSignalType_FAM;
+                                d = &read[read_number].fxx;
+                                break;
+                            case ABSOLID_FMT_COLMASK_CY3:
+                                d = &read[read_number].cy3;
+                               break;
+                            case ABSOLID_FMT_COLMASK_TXR:
+                                d = &read[read_number].txr;
+                                break;
+                            case ABSOLID_FMT_COLMASK_CY5:
+                                d = &read[read_number].cy5;
+                                break;
+                        }
+                        if( d ) {
+                            rc = pstring_assign(d, ztr.signal->data, ztr.signal->datasize);
+                            DEBUG_MSG(3, ("SRF SIGNAL[%s]: %u bytes\n", ztr.signal->channel, d->len));
+                        } else {
+                            rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcUnrecognized);
+                        }
+                        if( rc != 0 ) {
+                            SRALoaderFile_LOG(ctx->file, klogErr, rc, "copying signal", NULL);
+                        }
+                    } else {
+			 if( fe->region.nreads <= 0 || fe->region.nreads > ABSOLID_FMT_MAX_NUM_READS ) {
+				rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcUnsupported);
+				SRALoaderFile_LOG(fe->ctx.file, klogErr, rc, "read count $(c)", PLOG_U8(c), fe->region.nreads);
+			 }
+
+                        for(i = 0; rc == 0 && i < fe->region.nreads; i++) {
+                            pstring* d = NULL;
+                            int read_number = AbisolidReadType2ReadNumber[fe->region.type[i]];
+                            size_t len = (i + 1 >= fe->region.nreads) ? ztr.signal->datasize : (fe->region.start[i + 1] * sizeof(float));
+                            len -= fe->region.start[i] * sizeof(float);
+                            switch(stype) {
+                                case ABSOLID_FMT_COLMASK_FAM:
+                                    read[read_number].fs_type = eAbisolidFSignalType_FAM;
+                                    d = &read[read_number].fxx;
+                                    break;
+                                case ABSOLID_FMT_COLMASK_CY3:
+                                    d = &read[read_number].cy3;
+                                   break;
+                                case ABSOLID_FMT_COLMASK_TXR:
+                                    d = &read[read_number].txr;
+                                    break;
+                                case ABSOLID_FMT_COLMASK_CY5:
+                                    d = &read[read_number].cy5;
+                                    break;
+                            }
+                            if( d ) {
+                                rc = pstring_assign(d, &ztr.signal->data[fe->region.start[i] * sizeof(float)], len);
+                                DEBUG_MSG(3, ("SRF SIGNAL[%s]: %u bytes\n", ztr.signal->channel, d->len));
+                            } else {
+                                rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcUnrecognized);
+                            }
+                        }
+                        if( rc != 0 ) {
+                            SRALoaderFile_LOG(ctx->file, klogErr, rc, "copying signals", NULL);
+                        }
+                    }
+                }
+            }
+            break;
+        default:
+            break;
+        }
+        if(type != none && type != ignore) {
+            free(*(void **)&ztr);
+        }
+    }
+    if(rc == 0) {
+        if( read_type <= eAbisolidReadType_SPOT ) {
+            rc = SRAWriteAbsolid_Write(fe->writer, ctx->file, &readId, NULL, &read[0], &read[1]);
+        } else {
+            switch( AbisolidReadType2ReadNumber[read_type] ) {
+                case 0:
+                    rc = SRAWriteAbsolid_Write(fe->writer, ctx->file, &readId, NULL, &read[0], NULL);
+                    break;
+                case 1:
+                    rc = SRAWriteAbsolid_Write(fe->writer, ctx->file, &readId, NULL, NULL, &read[1]);
+                    break;
+                default:
+                    rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcUnsupported);
+                    SRALoaderFile_LOG(ctx->file, klogErr, rc, "more than 2 reads", NULL);
+                    break;
+            }
+        }
+    }
+    return rc;
+}
+
+struct SRFAbsolidLoaderFmt {
+    SRALoaderFmt dad;
+    fe_context_t fe;
+};
+
+static
+rc_t SRFAbsolidLoaderFmt_WriteData(SRFAbsolidLoaderFmt *self, uint32_t argc, const SRALoaderFile *const argv [], int64_t* spots_bad_count)
+{
+    rc_t rc = 0;
+    uint32_t i;
+    
+    for(i = 0; rc == 0 && i < argc; i++) {
+        self->fe.ctx.file = argv[i];
+        if( (rc = SRALoaderFileName(argv[i], &self->fe.ctx.file_name)) == 0 ) {
+            rc = SRF_parse(&self->fe.ctx, parse_v1_header, parse_v1_read, ABI_ZTR_CreateContext, ABI_ZTR_ContextRelease);
+        }
+    }
+    return rc;
+}
+
+static
+rc_t SRFAbsolidLoaderFmt_Whack(SRFAbsolidLoaderFmt* self, SRATable** table)
+{
+    SRAWriteAbsolid_Whack(self->fe.writer, table);
+    free(self);
+    return 0;
+}
+
+static
+rc_t SRFAbsolidLoaderFmt_Version( const SRFAbsolidLoaderFmt* self, uint32_t* vers, const char** name )
+{
+    *vers = KAppVersion();
+    *name = "AB SOLiD SRF";
+    return 0;
+}
+
+static SRALoaderFmt_vt_v1 SRFAbsolidLoaderFmt_vt_v1 =
+{
+    1, 0,
+    SRFAbsolidLoaderFmt_Whack,
+    SRFAbsolidLoaderFmt_Version,
+    NULL,
+    SRFAbsolidLoaderFmt_WriteData
+};
+
+rc_t SRFABSolidLoaderFmt_Make(SRALoaderFmt** self, const SRALoaderConfig* config)
+{
+    rc_t rc = 0;
+    SRFAbsolidLoaderFmt* fmt;
+
+    if( self == NULL || config == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+
+    fmt = calloc(1, sizeof(*fmt));
+    if(fmt == NULL) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+        LOGERR(klogInt, rc, "failed to initialize; out of memory");
+        return rc;
+    }
+    if( (rc = SRALoaderFmtInit(&fmt->dad, (const SRALoaderFmt_vt*)&SRFAbsolidLoaderFmt_vt_v1)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize parent object");
+    } else if( (rc = SRAWriteAbsolid_Make(&fmt->fe.writer, config)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize writer");
+    }
+    if( rc == 0 ) {
+        fmt->fe.skip_signal = (config->columnFilter & (efltrSIGNAL | efltrDEFAULT));
+        *self = &fmt->dad;
+    } else {
+        free(fmt);
+    }
+    return rc;
+}
diff --git a/tools/sra-load/srf-fmt.c b/tools/sra-load/srf-fmt.c
new file mode 100644
index 0000000..e8099c8
--- /dev/null
+++ b/tools/sra-load/srf-fmt.c
@@ -0,0 +1,267 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#include "srf.h"
+#include "ztr.h"
+#include "srf-fmt.h"
+#include "experiment-xml.h"
+#include "debug.h"
+
+
+const char UsageDefaultName[] = "srf-load";
+
+extern rc_t SRFIlluminaLoaderFmt_Make(SRALoaderFmt **self, const SRALoaderConfig *config);
+
+extern rc_t SRFABSolidLoaderFmt_Make(SRALoaderFmt **self, const SRALoaderConfig *config);
+
+rc_t SRALoaderFmtMake(SRALoaderFmt **self, const SRALoaderConfig *config)
+{
+    rc_t rc = 0;
+    const PlatformXML* platform;
+
+    if( self == NULL || config == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    if( (rc = Experiment_GetPlatform(config->experiment, &platform)) == 0 ) {
+        switch(platform->id) {
+            case SRA_PLATFORM_ILLUMINA:
+                rc = SRFIlluminaLoaderFmt_Make(self, config);
+                break;
+            case SRA_PLATFORM_ABSOLID:
+                rc = SRFABSolidLoaderFmt_Make(self, config);
+                break;
+
+            default:
+                rc = RC(rcSRA, rcFormatter, rcConstructing, rcFormat, rcUnknown);
+        }
+    }
+    return rc;
+}
+
+/* BIGGER than internal SRALoaderFile buffer chunks handling
+ * skips 'skipover' bytes in buffer and makes 'bsize' bytes available via 'data',
+ * caller may want to skip 'skipover' returned back after 'data' is used
+ * call with all params zero to deallocated internal buffer
+ */
+static
+rc_t SRF_parse_prepdata(SRF_context* ctx, uint64_t bsize, const uint8_t** data, size_t* skipover)
+{
+    rc_t rc = 0;
+    static size_t big_buffer_sz = 0;
+    static uint8_t* big_buffer = NULL;
+
+    if( ctx == NULL && bsize == 0 && data == NULL && skipover == NULL ) {
+        free(big_buffer);
+        big_buffer = NULL;
+        big_buffer_sz = 0;
+        return 0;
+    }
+    assert(ctx != NULL), assert(data != NULL), assert(skipover != NULL);
+
+    /* prepare bsize bytes in buffer */
+    rc = SRALoaderFileRead(ctx->file, *skipover, bsize, (const void**)&ctx->file_buf, &ctx->file_buf_sz);
+    if( rc != 0 || ctx->file_buf == NULL || ctx->file_buf_sz == 0 || ctx->file_buf_sz > bsize ) {
+        if( GetRCObject(rc) != (enum RCObject)rcBuffer || GetRCState(rc) != rcInsufficient ) {
+            rc = rc ? rc : RC(rcSRA, rcFormatter, rcParsing, rcData, ctx->file_buf_sz > bsize ? rcExcessive : rcInsufficient);
+            SRALoaderFile_LOG(ctx->file, klogErr, rc, "expected $(expected) bytes chunk", PLOG_U64(expected), bsize);
+            return rc;
+        }
+        rc = 0;
+    }
+    if( ctx->file_buf_sz == bsize ) {
+        /* data fitted in file buffer, use it directly */
+        *data = ctx->file_buf;
+        *skipover = bsize;
+    } else {
+        size_t to_read = bsize, inbuf = 0;
+
+        DEBUG_MSG(3, ("file buffer overflow on chunk %lu bytes\n", bsize));
+        if( big_buffer_sz < bsize ) {
+            uint8_t* d = realloc(big_buffer, bsize);
+            DEBUG_MSG(3, ("grow internal chunk buffer to %lu bytes\n", bsize));
+            if (d == NULL) {
+                rc = RC(rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted);
+                SRALoaderFile_LOG(ctx->file, klogErr, rc, "reading chunk of $(bytes) bytes", PLOG_U64(bytes), bsize);
+            } else {
+                big_buffer = d;
+                big_buffer_sz = bsize;
+            }
+        }
+        while( rc == 0 && to_read > 0 ) {
+            size_t x = to_read > ctx->file_buf_sz ? ctx->file_buf_sz : to_read;
+            memcpy(&big_buffer[inbuf], ctx->file_buf, x);
+            to_read -= x;
+            inbuf += x;
+            rc = SRALoaderFileRead(ctx->file, x, to_read, (const void**)&ctx->file_buf, &ctx->file_buf_sz);
+            if( rc != 0 || ((ctx->file_buf == NULL || ctx->file_buf_sz == 0) && to_read > 0) ) {
+                if( GetRCObject(rc) != (enum RCObject)rcBuffer || GetRCState(rc) != rcInsufficient ) {
+                    rc = rc ? rc : RC(rcSRA, rcFormatter, rcParsing, rcData, rcInsufficient);
+                    SRALoaderFile_LOG(ctx->file, klogErr, rc, "expected $(expected) bytes of $(chunk) chunk",
+                                      PLOG_2(PLOG_U64(expected),PLOG_U64(chunk)), to_read, bsize);
+                    return rc;
+                }
+                rc = 0;
+            }
+        }
+        *data = big_buffer;
+        *skipover = 0;
+    }
+    return rc;
+}
+
+rc_t SRF_parse(SRF_context *ctx, SRF_parse_header_func* header, SRF_parse_read_func* read,
+               rc_t (*zcreate)(ZTR_Context **ctx), rc_t (*zrelease)(ZTR_Context *self))
+{
+    rc_t rc = 0;
+    bool first_block = true;
+    enum SRF_ChunkTypes type = SRF_ChunkTypeUnknown;
+    uint64_t bsize;
+    size_t dataOffset;
+    size_t skipover = 0;
+    ZTR_Context *ztr_ctx = NULL;
+    const char* errmsg;
+    
+    while( rc == 0 ) {
+        errmsg = NULL;
+        /* SRF_ParseChunk needs 5-16 bytes to be in buffer */
+        if( (rc = SRALoaderFileRead(ctx->file, skipover, 16, (const void**)&ctx->file_buf, &ctx->file_buf_sz)) != 0 ) {
+            errmsg = "chunk start";
+            break;
+        }
+        if( ctx->file_buf == NULL ) {
+            /* EOF */
+            break;
+        }
+        rc = SRF_ParseChunk(ctx->file_buf, ctx->file_buf_sz, &bsize, &type, &dataOffset);
+        if( rc == rcInvalid ) {
+            /* not a chunk; might be an index pointer, if so then skip it */
+            skipover = 8;
+            /* reset to start in case files were concatinated */
+            first_block = true;
+            rc = 0;
+            continue;
+        } else if( rc != 0 ) {
+            rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rc);
+            errmsg = "chunk head";
+            break;
+        }
+        if( first_block && type != SRF_ChunkTypeContainer ) {
+            rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcCorrupt);
+            errmsg = "expected SRF container header";
+            break;
+        }
+        if( type == SRF_ChunkTypeIndex ) {
+            /* index is at least 16 bytes */
+            if( ctx->file_buf_sz < 16 ) {
+                rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcInsufficient);
+                errmsg = "index chunk";
+                break;
+            }
+            /* rest of the chunk index ignored */
+            skipover = bsize;
+        } else if( type == SRF_ChunkTypeXML ) {
+            /* ignore XML chunk */
+            skipover = bsize;
+        } else {
+            const uint8_t* data;
+            bsize -= dataOffset;
+            skipover = dataOffset;
+            if( (rc = SRF_parse_prepdata(ctx, bsize, &data, &skipover)) == 0 ) {
+                switch (type) {
+                    case SRF_ChunkTypeContainer:
+                        {{
+                            unsigned versMajor = 0;
+                            unsigned versMinor = 0;
+                            char contType = '\0';
+                            if( (rc = SRF_ParseContainerHeader(data, bsize, &versMajor, &versMinor, &contType, NULL, NULL)) != 0 ) {
+                                rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rc);
+                                errmsg = "container header";
+                            }
+                            if(versMajor != 1) {
+                                rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcBadVersion);
+                            } else if(contType != 'Z') {
+                                rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+                                errmsg = "container type";
+                            }
+                            SRALoaderFile_LOG(ctx->file, klogInfo, 0, "parsing SRF v$(vers)", "vers=%u.%u", versMajor, versMinor);
+                            first_block = false;
+                        }}
+                        break;
+
+                    case SRF_ChunkTypeHeader:
+                        if (ztr_ctx != NULL) {
+                            (*zrelease)(ztr_ctx);
+                            ztr_ctx = NULL;
+                        }
+                        if( (rc = (*zcreate)(&ztr_ctx)) == 0) {
+                            rc = (*header)(ctx, ztr_ctx, data, bsize);
+                        }
+                        break;
+
+                    case SRF_ChunkTypeRead:
+                        rc = (*read)(ctx, ztr_ctx, data, bsize);
+                        break;
+
+                    default:
+                        /* this is impossible */
+                        rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+                        errmsg = "unexpected chunk type";
+                        break;
+                }
+            }
+        }
+    }
+    SRF_parse_prepdata(NULL, 0, NULL, NULL); /* free internal buffer */
+    (*zrelease)(ztr_ctx);
+    if( rc != 0 ) {
+        if( errmsg ) {
+            SRALoaderFile_LOG(ctx->file, klogErr, rc, "$(msg) - chunk type '$(type)'",
+                             PLOG_2(PLOG_C(type),PLOG_S(msg)), type, errmsg);
+        } else {
+            SRALoaderFile_LOG(ctx->file, klogErr, rc, "chunk type '$(type)'", PLOG_C(type), type);
+        }
+    }
+    return rc;
+}
+
+void SRF_set_read_filter(uint8_t* filter, int SRF_flags)
+{
+    assert(filter != NULL);
+
+    if( ( SRF_flags & SRF_READ_WITHDRAWN ) != 0 ) {
+        *filter = SRA_READ_FILTER_REJECT;
+    } else if( ( SRF_flags & SRF_READ_BAD ) != 0 ) {
+        *filter = SRA_READ_FILTER_CRITERIA;
+    } else {
+        *filter = SRA_READ_FILTER_PASS;
+    }
+}
diff --git a/tools/sra-load/srf-fmt.h b/tools/sra-load/srf-fmt.h
new file mode 100644
index 0000000..f9ea3cf
--- /dev/null
+++ b/tools/sra-load/srf-fmt.h
@@ -0,0 +1,46 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _sra_load_srf_fmt_
+#define _sra_load_srf_fmt_
+
+#include "loader-fmt.h"
+
+typedef struct SRF_context_struct {
+    const SRALoaderFile *file;
+    const char* file_name;
+    const uint8_t* file_buf;
+    size_t file_buf_sz;
+} SRF_context;
+
+typedef rc_t (SRF_parse_header_func)(SRF_context* ctx, ZTR_Context *ztr_ctx, const uint8_t *data, size_t size);
+typedef rc_t (SRF_parse_read_func)(SRF_context* ctx, ZTR_Context *ztr_ctx, const uint8_t *data, size_t size);
+
+rc_t SRF_parse(SRF_context* ctx, SRF_parse_header_func* header, SRF_parse_read_func* read,
+               rc_t (*create)(ZTR_Context **ctx), rc_t (*release)(ZTR_Context *self));
+
+void SRF_set_read_filter(uint8_t* filter, int SRF_flags);
+
+#endif /* _sra_load_srf_fmt_ */
diff --git a/tools/sra-load/srf-illumina.c b/tools/sra-load/srf-illumina.c
new file mode 100644
index 0000000..e6dd438
--- /dev/null
+++ b/tools/sra-load/srf-illumina.c
@@ -0,0 +1,452 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <ctype.h>
+
+typedef struct SRFIlluminaLoaderFmt SRFIlluminaLoaderFmt;
+
+#define SRALOADERFMT_IMPL SRFIlluminaLoaderFmt
+#include "loader-fmt.h"
+
+#include "srf.h"
+#include "ztr.h"
+#include "srf-fmt.h"
+#include "ztr-illumina.h"
+#include "writer-illumina.h"
+#include "debug.h"
+
+typedef struct fe_context_t_struct {
+
+    SRF_context ctx;
+    bool skip_intensity;
+    bool skip_signal;
+    bool skip_noise;
+
+    const uint8_t *defered;
+    uint32_t defered_len;
+    
+    const SRAWriterIllumina* writer;
+
+    pstring name_prefix;
+
+    IlluminaRead read;
+
+    ztr_t sequence;
+    ztr_t quality1;
+    ztr_t quality4;
+    ztr_t signal;
+    ztr_t noise;
+    ztr_t intensity;
+} fe_context_t;
+
+static
+rc_t fe_new_read(fe_context_t *self, int flags, pstring *readId )
+{
+    rc_t rc;
+    char *suffix;
+    pstring readName, spotGroup;
+    static IlluminaSpot spot;
+
+    /* look for spot group */
+    suffix = strchr(readId->data, '#');
+    if( suffix != NULL ) {
+        readId->len = suffix++ - readId->data;
+        if( (rc = pstring_assign(&spotGroup, suffix, strlen(suffix))) != 0 ) {
+            SRALoaderFile_LOG(self->ctx.file, klogInt, rc,
+                "extracting barcode from spot '$(spotname)'", "spotname=%s", readId->data);
+            return rc;
+        }
+    } else {
+        pstring_clear(&spotGroup);
+    }
+
+    /* build the read name from prefix (self->name_prefix) and read id */
+    if(self->name_prefix.len > 0 ) {
+        if( (rc = pstring_copy(&readName, &self->name_prefix)) == 0 ) {
+            if( isdigit(readName.data[readName.len - 1]) ) {
+                rc = pstring_append(&readName, ":", 1);
+            }
+            if( rc == 0 ) {
+                rc = pstring_concat(&readName, readId);
+            }
+        }
+    } else {
+        rc = pstring_copy(&readName, readId);
+    }
+    if( rc != 0 ) {
+        SRALoaderFile_LOG(self->ctx.file, klogErr, rc,
+            "preparing spot name $(spotname)", "spotname=%s", readId->data);
+        return rc;
+    }
+    SRF_set_read_filter(&self->read.filter, flags);
+
+    IlluminaSpot_Init(&spot);
+    if( (rc = IlluminaSpot_Add(&spot, &readName, &spotGroup, &self->read)) == 0 ) {
+        rc = SRAWriterIllumina_Write(self->writer, self->ctx.file, &spot);
+    }
+    return rc;
+}
+
+static
+rc_t parse_header(SRF_context *ctx, ZTR_Context *ztr_ctx, const uint8_t *data, size_t size)
+{
+    rc_t rc = 0;
+    size_t parsed;
+    char prefixType;
+    uint32_t counter;
+    ztr_raw_t ztr_raw;
+    ztr_t ztr;
+    enum ztr_chunk_type type;
+    fe_context_t* fe = (fe_context_t*)ctx;
+    
+    rc = SRF_ParseDataChunk(data, size, &parsed, &fe->name_prefix, &prefixType, &counter);
+    if(rc) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+        return SRALoaderFile_LOG(ctx->file, klogErr, rc, "corrupt", NULL);
+    }
+    if(fe->defered != NULL) {
+        free((void *)fe->defered);
+        fe->defered = NULL;
+    }
+    if(parsed == size)
+        return 0;
+    
+    rc = ZTR_AddToBuffer(ztr_ctx, data + parsed, size - parsed);
+    if(rc)
+        return rc;
+
+    if((rc = ZTR_ParseHeader(ztr_ctx)) != 0) {
+        return SRALoaderFile_LOG(ctx->file, klogErr, rc, "corrupt", NULL);
+    }
+
+    while (rc == 0 && !ZTR_BufferIsEmpty(ztr_ctx)) {
+        if((rc = ZTR_ParseBlock(ztr_ctx, &ztr_raw)) != 0) {
+            if(GetRCState(rc) == rcInsufficient && GetRCObject(rc) == (enum RCObject)rcData)
+                rc = ZTR_BufferGetRemainder(ztr_ctx, &fe->defered, &fe->defered_len);
+            break;
+        }
+
+        if((rc = ZTR_ProcessBlock(ztr_ctx, &ztr_raw, &ztr, &type)) != 0) {
+            SRALoaderFile_LOG(ctx->file, klogErr, rc, "corrupt", NULL);
+            break;
+        }
+        if(*(void **)&ztr != NULL)
+            free(*(void **)&ztr);
+
+        if(ztr_raw.meta != NULL)
+            free(ztr_raw.meta);
+        if(ztr_raw.data != NULL)
+            free(ztr_raw.data);
+    }
+    return rc;
+}
+
+static
+rc_t parse_read(SRF_context *ctx, ZTR_Context *ztr_ctx, const uint8_t *data, size_t size)
+{
+    rc_t rc = 0;
+    size_t parsed;
+    uint8_t flags;
+    pstring readId;
+    ztr_raw_t ztr_raw;
+    ztr_t ztr;
+    enum ztr_chunk_type type;
+    fe_context_t* fe = (fe_context_t*)ctx;
+
+    *(void **)&fe->sequence =
+    *(void **)&fe->quality1 =
+    *(void **)&fe->quality4 =
+    *(void **)&fe->signal =
+    *(void **)&fe->intensity = 
+    *(void **)&fe->noise = NULL;
+    
+    rc = SRF_ParseReadChunk(data, size, &parsed, &flags, &readId);
+    if(rc) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rc);
+        return SRALoaderFile_LOG(ctx->file, klogErr, rc, "corrupt", NULL);
+    }
+    if(fe->defered != NULL)
+        ZTR_AddToBuffer(ztr_ctx, fe->defered, fe->defered_len);
+    ZTR_AddToBuffer(ztr_ctx, data + parsed, size - parsed);
+    if(fe->defered == NULL) {
+        rc = ZTR_ParseBlock(ztr_ctx, &ztr_raw);
+        if(rc == 0)
+            goto PARSE_BLOCK;
+        rc = ZTR_ParseHeader(ztr_ctx);
+        if(rc) {
+            return SRALoaderFile_LOG(ctx->file, klogErr, rc, "corrupt", NULL);
+        }
+    }
+    
+    while (!ZTR_BufferIsEmpty(ztr_ctx)) {
+        rc = ZTR_ParseBlock(ztr_ctx, &ztr_raw);
+    PARSE_BLOCK:
+        if(rc != 0 || (rc = ZTR_ProcessBlock(ztr_ctx, &ztr_raw, &ztr, &type)) != 0 ) {
+            return SRALoaderFile_LOG(ctx->file, klogErr, rc, "corrupt", NULL);
+        }
+        
+        switch (type) {
+            case READ:
+                if(ztr.sequence->datatype != i8) {
+                    rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcUnexpected);
+                    return SRALoaderFile_LOG(ctx->file, klogErr, rc, "invalid data type for sequence data", NULL);
+                }
+                fe->sequence = ztr;
+                break;
+            case QUALITY1:
+                if(ztr.quality1->datatype != i8) {
+                    rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcUnexpected);
+                    return SRALoaderFile_LOG(ctx->file, klogErr, rc, "invalid data type for quality1 data", NULL);
+                }
+                fe->quality1 = ztr;
+                break;
+            case QUALITY4:
+                if(ztr.quality4->datatype != i8) {
+                    rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcUnexpected);
+                    return SRALoaderFile_LOG(ctx->file, klogErr, rc, "invalid data type for quality4 data", NULL);
+                }
+                fe->quality4 = ztr;
+                break;
+            case SIGNAL4:
+                if(ztr.signal4->Type != NULL && strncmp(ztr.signal4->Type, "SLXI", 4) == 0 ) {
+                    if( !fe->skip_intensity ) {
+                        fe->intensity = ztr;
+                    } else if(ztr.signal4){
+			if(ztr.signal4->data) free(ztr.signal4->data);
+			free(ztr.signal4);
+		    }
+                } else if(ztr.signal4->Type != NULL && strncmp(ztr.signal4->Type, "SLXN", 4) == 0 ) {
+                    if( !fe->skip_noise ) {
+                        fe->noise = ztr;
+                    } else if(ztr.signal4){
+			if(ztr.signal4->data) free(ztr.signal4->data);
+			free(ztr.signal4);
+                    }
+                } else if( !fe->skip_signal ) {
+                    fe->signal = ztr;
+		} else if(ztr.signal4){
+			if(ztr.signal4->data) free(ztr.signal4->data);
+			free(ztr.signal4);
+                }
+                break;
+
+            default:
+                free(*(void **)&ztr);
+
+            case none:
+            case ignore:
+                if(ztr_raw.data) {
+                    free(ztr_raw.data);
+                }
+                break;
+        }
+	if(ztr_raw.meta){
+		free(ztr_raw.meta);
+		ztr_raw.meta=NULL;
+	}
+    }
+    
+    while(rc == 0) {
+        if(*(void **)&fe->sequence == NULL) {
+            rc = RC(rcSRA, rcFormatter, rcParsing, rcConstraint, rcViolated);
+            SRALoaderFile_LOG(ctx->file, klogErr, rc, "missing sequence data", NULL);
+            break;
+        }
+        if(*(void **)&fe->quality4 == NULL && *(void **)&fe->quality1 == NULL) {
+            rc = RC(rcSRA, rcFormatter, rcParsing, rcConstraint, rcViolated);
+            SRALoaderFile_LOG(ctx->file, klogErr, rc, "missing quality data", NULL);
+            break;
+        }
+
+        if( (rc = ILL_ZTR_Decompress(ztr_ctx, BASE, fe->sequence, fe->sequence)) != 0 ||
+            (rc = pstring_assign(&fe->read.seq, fe->sequence.sequence->data, fe->sequence.sequence->datasize)) != 0 ) {
+            SRALoaderFile_LOG(ctx->file, klogErr, rc, "failed to decompress sequence data", NULL);
+            break;
+        }
+        
+        if( *(void **)&fe->quality4 != NULL ) {
+            if( (rc = ILL_ZTR_Decompress(ztr_ctx, CNF4, fe->quality4, fe->sequence)) != 0 ||
+                (rc = pstring_assign(&fe->read.qual, fe->quality4.quality4->data, fe->quality4.quality4->datasize)) != 0 ) {
+                SRALoaderFile_LOG(ctx->file, klogErr, rc, "failed to decompress quality4 data", NULL);
+                break;
+            }
+            fe->read.qual_type = ILLUMINAWRITER_COLMASK_QUALITY_LOGODDS4;
+        } else if( *(void **)&fe->quality1 != NULL ) {
+            if( (rc = ILL_ZTR_Decompress(ztr_ctx, CNF1, fe->quality1, fe->sequence)) != 0 ||
+                (rc = pstring_assign(&fe->read.qual, fe->quality1.quality1->data, fe->quality1.quality4->datasize)) != 0 ) {
+                SRALoaderFile_LOG(ctx->file, klogErr, rc, "failed to decompress quality1 data", NULL);
+                break;
+            }
+            fe->read.qual_type = ILLUMINAWRITER_COLMASK_QUALITY_PHRED;
+        }
+        if( *(void **)&fe->signal != NULL ) {
+            if( (rc = ILL_ZTR_Decompress(ztr_ctx, SMP4, fe->signal, fe->sequence)) != 0 ||
+                (rc = pstring_assign(&fe->read.signal, fe->signal.signal4->data, fe->signal.signal4->datasize)) != 0 ) {
+                SRALoaderFile_LOG(ctx->file, klogErr, rc, "failed to decompress signal data", NULL);
+                break;
+            }
+        }
+        if( *(void **)&fe->intensity != NULL ) {
+            if( (rc = ILL_ZTR_Decompress(ztr_ctx, SMP4, fe->intensity, fe->sequence)) != 0 ||
+                (rc = pstring_assign(&fe->read.intensity, fe->intensity.signal4->data, fe->intensity.signal4->datasize)) != 0 ) {
+                SRALoaderFile_LOG(ctx->file, klogErr, rc, "failed to decompress intensity data", NULL);
+                break;
+            }
+        }
+        if( *(void **)&fe->noise != NULL ) {
+            if( (rc = ILL_ZTR_Decompress(ztr_ctx, SMP4, fe->noise, fe->sequence)) != 0 ||
+                (rc = pstring_assign(&fe->read.noise, fe->noise.signal4->data, fe->noise.signal4->datasize)) != 0 ) {
+                SRALoaderFile_LOG(ctx->file, klogErr, rc, "failed to decompress noise data", NULL);
+                break;
+            }
+        }
+        rc = fe_new_read(fe, flags, &readId);
+        break;
+    }
+    if(fe->sequence.sequence) {
+        if(fe->sequence.sequence->data)
+            free(fe->sequence.sequence->data);
+        free(fe->sequence.sequence);
+    }
+    if(fe->quality1.quality1) {
+        if(fe->quality1.quality1->data)
+            free(fe->quality1.quality1->data);
+        free(fe->quality1.quality1);
+    }
+    if(fe->quality4.quality4) {
+        if(fe->quality4.quality4->data)
+            free(fe->quality4.quality4->data);
+        free(fe->quality4.quality4);
+    }
+    if(fe->signal.signal4) {
+        if(fe->signal.signal4->data)
+            free(fe->signal.signal4->data);
+        free(fe->signal.signal4);
+    }
+    if(fe->intensity.signal4) {
+        if(fe->intensity.signal4->data)
+            free(fe->intensity.signal4->data);
+        free(fe->intensity.signal4);
+    }
+    if(fe->noise.signal4) {
+        if(fe->noise.signal4->data)
+            free(fe->noise.signal4->data);
+        free(fe->noise.signal4);
+    }
+    return rc;
+}
+
+struct SRFIlluminaLoaderFmt {
+    SRALoaderFmt dad;
+    fe_context_t fe;
+};
+
+static
+rc_t SRFIlluminaLoaderFmt_WriteData(SRFIlluminaLoaderFmt *self, uint32_t argc, const SRALoaderFile *const argv [], int64_t* spots_bad_count)
+{
+    rc_t rc = 0;
+    uint32_t i;
+
+    for(i = 0; rc == 0 && i < argc; i++) {
+        self->fe.ctx.file = argv[i];
+        if( (rc = SRALoaderFileName(argv[i], &self->fe.ctx.file_name)) == 0 ) {
+            rc = SRF_parse(&self->fe.ctx, parse_header, parse_read, ZTR_CreateContext, ZTR_ContextRelease);
+        }
+    }
+    return rc;
+}
+
+static
+rc_t SRFIlluminaLoaderFmt_Whack(SRFIlluminaLoaderFmt *self, SRATable** table)
+{
+    SRAWriterIllumina_Whack(self->fe.writer, table);
+    free(self);
+    return 0;
+}
+
+static
+rc_t SRFIlluminaLoaderFmt_Version( const SRFIlluminaLoaderFmt *self, uint32_t *vers, const char** name )
+{
+    *vers = KAppVersion();
+    *name = "Illumina SRF";
+    return 0;
+}
+
+static SRALoaderFmt_vt_v1 SRFIlluminaLoaderFmt_vt_v1 =
+{
+    1, 0,
+    SRFIlluminaLoaderFmt_Whack,
+    SRFIlluminaLoaderFmt_Version,
+    NULL,
+    SRFIlluminaLoaderFmt_WriteData
+};
+
+rc_t SRFIlluminaLoaderFmt_Init(SRFIlluminaLoaderFmt* self, const SRALoaderConfig* config)
+{
+    rc_t rc = 0;
+
+    self->fe.skip_signal = (config->columnFilter & (efltrSIGNAL | efltrDEFAULT));
+    self->fe.skip_noise = (config->columnFilter & (efltrNOISE | efltrDEFAULT));
+    self->fe.skip_intensity = (config->columnFilter & (efltrINTENSITY | efltrDEFAULT));
+
+    if( (rc = SRAWriterIllumina_Make(&self->fe.writer, config)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize writer");
+    }
+    return rc;
+}
+
+rc_t SRFIlluminaLoaderFmt_Make(SRALoaderFmt** self, const SRALoaderConfig* config)
+{
+    rc_t rc = 0;
+    SRFIlluminaLoaderFmt* fmt;
+
+    if( self == NULL || config == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    fmt = calloc(1, sizeof(*fmt));
+    if(fmt == NULL) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+        LOGERR(klogInt, rc, "failed to initialize; out of memory");
+        return rc;
+    }
+    if( (rc = SRFIlluminaLoaderFmt_Init(fmt, config)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize");
+    } else if( (rc = SRALoaderFmtInit(&fmt->dad, (const SRALoaderFmt_vt*)&SRFIlluminaLoaderFmt_vt_v1)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize parent object");
+    }
+    if( rc == 0 ) {
+        *self = &fmt->dad;
+    } else {
+        free(fmt);
+    }
+    return rc;
+}
diff --git a/tools/sra-load/srf.c b/tools/sra-load/srf.c
new file mode 100644
index 0000000..904cde6
--- /dev/null
+++ b/tools/sra-load/srf.c
@@ -0,0 +1,229 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <klib/rc.h>
+
+#include "debug.h"
+#include "srf.h"
+#include "ztr.h"
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <memory.h>
+#include <stdio.h>
+#include <endian.h>
+#include <byteswap.h>
+#include <assert.h>
+
+enum RCState SRF_ParseChunk(const uint8_t *src, size_t srclen, uint64_t *size, enum SRF_ChunkTypes *type, size_t *data)
+{
+    assert(size);
+    assert(type);
+    assert(data);
+    
+    *size = 0;
+    *type = SRF_ChunkTypeUnknown;
+    *data = 0;
+    
+    if(srclen == 0) {
+        return rcInsufficient;
+    }
+    *type = src[0];
+    switch(*type) {
+        case 'S':
+            if (srclen < 8) {
+                return rcInsufficient;
+            }
+            if (*(const uint32_t *)src != *(const uint32_t *)("SSRF")) {
+                return rcInvalid;
+            }
+            *size = (((((src[4] << 8) | src[5]) << 8) | src[6]) << 8) | src[7];
+            *data = 8;
+            break;
+        case 'I':
+            if(srclen >= 16) {
+                *size = (((((((((((((src[8] << 8) | src[9]) << 8) | src[10]) << 8) | src[11]) << 8) |
+                              src[12]) << 8) | src[13]) << 8) | src[14]) << 8) | src[15];
+            }
+            break;
+        case 'X':
+        case 'H':
+        case 'R':
+            if (srclen < 5) {
+                return rcInsufficient;
+            }
+            *size = (((((src[1] << 8) | src[2]) << 8) | src[3]) << 8) | src[4];
+            *data = 5;
+            break;
+        default:
+            return rcInvalid;
+    }
+    return 0;
+}
+
+int SRF_ParseContainerHeader(const uint8_t *src, uint64_t src_length,
+                             unsigned *versMajor, unsigned *versMinor,
+                             char *contType, pstring *baseCaller, pstring *baseCallerVersion)
+{
+    const uint8_t *vers = src + 1;
+    
+    src += *src + 1;
+    
+    if (versMajor != NULL) {
+        *versMajor = 0;
+        
+        while (vers != src && *vers != '.') {
+            if (*vers > '9' || *vers < '0')
+                return rcInvalid;
+            *versMajor = *versMajor * 10 + *vers - '0';
+            ++vers;
+        }
+        if (versMinor != NULL) {
+            *versMinor = 0;
+            
+            if (vers != src && *vers == '.')
+                ++vers;
+            while (vers != src) {
+                if (*vers > '9' || *vers < '0')
+                    return rcInvalid;
+                *versMinor = *versMinor * 10 + *vers - '0';
+                ++vers;
+            }
+        }
+    }
+    
+    if (contType != NULL)
+        *contType = *src;
+    ++src;
+    
+    if (baseCaller != NULL) {
+        if( pstring_assign(baseCaller, src, *src + 1) != 0 ) {
+            return rcInsufficient;
+        }
+    }
+    src += *src + 1;
+    
+    if (baseCallerVersion != NULL) {
+        if( pstring_assign(baseCallerVersion, src, *src + 1) != 0 ) {
+            return rcInsufficient;
+        }
+    }
+    return 0;
+}
+
+int SRF_ParseDataChunk(const uint8_t *src, size_t src_length, size_t *parsed_length, pstring *prefix,
+                       char *prefixType, uint32_t *counter)
+{
+    const uint8_t *const endp = src + src_length;
+    assert(src);
+    assert(parsed_length);
+    
+    if (counter != NULL)
+        *counter = 0;
+    if (prefix != NULL)
+        pstring_clear(prefix);
+    
+    if (src_length < 2)
+        return rcInsufficient;
+    
+    if (prefixType != NULL)
+        *prefixType = *src;
+    ++src;
+    if (*src == 0)
+        ++src;
+    else if (src + *src + 1 > endp)
+        return rcInsufficient;
+    else {
+        if (prefix != NULL) {
+            if( pstring_assign(prefix, src + 1, *src) != 0 ) {
+                return rcInsufficient;
+            }
+        }
+        src += *src + 1;
+    }
+#if 1
+    switch (endp - src) {
+        case 0:
+            break;
+        case 4:
+            if (counter != NULL)
+                *counter = (((((src[0] << 8) | src[1]) << 8) | src[2]) << 8) | src[3];
+            src += 4;
+            break;
+        default:
+            if (endp - src < 8)
+                return rcInsufficient;
+            if (memcmp(src, ZTR_SIG, 8) != 0) {
+                if (counter != NULL)
+                    *counter = (((((src[0] << 8) | src[1]) << 8) | src[2]) << 8) | src[3];
+                src += 4;
+            }
+            break;
+    }
+#else
+    if (!ZTR_IsSignature(src, endp - src)) {
+        if (src + 4 > endp)
+            return rcInsufficient;
+        if (counter != NULL)
+            *counter = (((((src[0] << 8) | src[1]) << 8) | src[2]) << 8) | src[3];
+        src += 4;
+    }
+#endif
+    *parsed_length = src_length - (endp - src);
+    return 0;
+}
+
+int SRF_ParseReadChunk(const uint8_t *src, size_t src_length, size_t *parsed_length, uint8_t *flags, pstring *id)
+{
+    const uint8_t* const endp = src + src_length;
+    
+    assert(src);
+    assert(parsed_length);
+    assert(flags);
+    assert(id);
+    
+    *flags = 0;
+    pstring_clear(id);
+
+    if(src_length < 2) {
+        return rcInsufficient;
+    }
+    *flags = *src++;
+    if(*src == '\0') {
+        ++src;
+    } else if(src + *src + 1 > endp) {
+        return rcInsufficient;
+    } else {
+        if( pstring_assign(id, src + 1, *src) != 0 ) {
+            return rcInsufficient;
+        }
+        src += *src + 1;
+    }
+    *parsed_length = src_length - (endp - src);
+    if( *flags != 0 ) {
+        DEBUG_MSG(5, ("SRF_FLAGS='%02X'\n", (int)(*flags)));
+    }
+    return 0;
+}
diff --git a/tools/sra-load/srf.h b/tools/sra-load/srf.h
new file mode 100644
index 0000000..b918120
--- /dev/null
+++ b/tools/sra-load/srf.h
@@ -0,0 +1,146 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _sra_load_srf_
+#define _sra_load_srf_
+
+#include "writer-illumina.h"
+
+#define SRF_READ_BAD (1U << 0)
+#define SRF_READ_WITHDRAWN (1U << 1)
+
+#define SRF_CONTAINER_HEADER_MIN_SIZE (8)
+#define SRF_BLOCK_HEADER_MIN_SIZE (5)
+
+enum SRF_ChunkTypes {
+    SRF_ChunkTypeUnknown = '?',
+    SRF_ChunkTypeContainer = 'S',
+    SRF_ChunkTypeIndex = 'I',
+    SRF_ChunkTypeHeader = 'H',
+    SRF_ChunkTypeRead = 'R',
+    SRF_ChunkTypeXML = 'X'
+};
+
+/* SRF_ParseChunk
+   try to parse an SRF chunk
+
+   returns:
+       0: no error
+       rcInsufficient: not enough src data to parse;
+           provide more data or declare an error
+       rcInvalid: the data is invalid
+
+   Parameters:
+       src [in, required]: the bytes to parse
+       srclen: the number of bytes parsable
+       size [out, required]: the total size of the chunk
+           the next chunk starts at src + size
+       type [out, required]: the type of chunk found
+       data [out, required]: the start of any inner data
+          in the chunk
+*/
+enum RCState SRF_ParseChunk(const uint8_t *src,
+		                    size_t srclen,
+		                    uint64_t *size,
+		                    enum SRF_ChunkTypes *type,
+		                    size_t *data);
+
+/* SRF_ParseContainerHeader
+ try to parse an SRF Container Header
+ 
+ Returns:
+	0: no error
+        rcInsufficient: not enough data
+	rcInvalid: data invalid
+
+ Parameters:
+	src [in, required]: the bytes to parse
+	src_length: the length of src
+	versMajor, versMinor [out, optional]: SRF version
+	contType [out, optional]: type of the data contained in
+		this SRF; *contType should be 'Z' per the spec.
+	baseCaller [out, optional]: the base caller program that
+		generated the contained data
+	baseCallerVersion [out, optional]: the version of
+		base caller program
+ */
+int SRF_ParseContainerHeader(const uint8_t *src,
+                             uint64_t src_length,
+                             unsigned *versMajor,
+                             unsigned *versMinor,
+                             char *contType,
+                             pstring *baseCaller,
+                             pstring *baseCallerVersion);
+
+/* SRF_ParseDataChunk
+ try to parse an SRF data chunk (i.e. block header type = 'H')
+ 
+ Returns:
+	0: no error
+        rcInsufficient: not enough data
+	rcInvalid: data invalid
+ 
+ Parameters:
+	src [in, required]: the bytes to parse
+	src_length: the length of src
+	parsed_length [out, required]: length of SRF data in
+		this chunk; the bytes src[parsed_length..src_length],
+		if any, are ZTR.
+	prefix [out, optional]: (pstring) read name prefix, if any
+	prefixType [out, optional]: read name prefix type 'E' or 'I'
+	counter [out, optional]: initial value of counter, only
+		relevant if prefixType == 'I'
+ */
+int SRF_ParseDataChunk(const uint8_t *src,
+                       size_t src_length,
+                       size_t *parsed_length,
+                       pstring *prefix,
+                       char *prefixType,
+                       uint32_t *counter);
+
+/* SRF_ParseReadChunk
+ try to parse an SRF read chunk (i.e. block header type = 'R')
+ 
+ Returns:
+	0: no error
+        rcInsufficient: not enough data
+	rcInvalid: data invalid
+ 
+ Parameters:
+	src [in, required]: the bytes to parse
+	src_length: the length of src
+	parsed_length [out, required]: length of SRF data in
+		this chunk; the bytes src[parsed_length..src_length],
+		if any, are ZTR.
+	flags [out, optional]: read flags
+	id [out, optional]: read Id
+ */
+int SRF_ParseReadChunk(const uint8_t *src,
+		               size_t src_length,
+		               size_t *parsed_length,
+		               uint8_t *flags,
+		               pstring *id);
+
+#endif /* _sra_load_srf_ */
diff --git a/tools/sra-load/writer-454.c b/tools/sra-load/writer-454.c
new file mode 100644
index 0000000..0b1992c
--- /dev/null
+++ b/tools/sra-load/writer-454.c
@@ -0,0 +1,262 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <sra/types.h>
+#include <insdc/insdc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <ctype.h>
+#include <assert.h>
+
+#include "debug.h"
+#include "writer-454.h"
+#include "sra-writer.h"
+
+struct SRAWriter454 {
+    SRAWriter* base;
+    pstring flows;
+    uint32_t flow_count;
+    pstring keys;
+
+    uint32_t ci_flowc;
+    uint32_t ci_keys;
+    uint32_t ci_name;
+    uint32_t ci_read;
+    uint32_t ci_qual;
+    uint32_t ci_signal;
+    uint32_t ci_position;
+    uint32_t ci_q_left;
+    uint32_t ci_q_right;
+    uint32_t ci_a_left;
+    uint32_t ci_a_right;
+};
+
+rc_t SRAWriter454_Make(const SRAWriter454** cself, const SRALoaderConfig* config)
+{
+    rc_t rc = 0;
+    SRAWriter454* self;
+    const PlatformXML* platform;
+
+    if( cself == NULL || config == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    if( (rc = Experiment_GetPlatform(config->experiment, &platform)) != 0 ) {
+        return rc;
+    }
+    if( platform->id != SRA_PLATFORM_454 ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcInvalid);
+        LOGERR(klogErr, rc, "platform type");
+        return rc;
+    }
+    self = calloc(1, sizeof(*self));
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+    } else if( (rc = SRAWriter_Make(&self->base, config)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize base writer");
+    } else {
+        if( platform->param.ls454.flow_sequence != NULL ) {
+            rc = pstring_assign(&self->flows, platform->param.ls454.flow_sequence,
+                                       strlen(platform->param.ls454.flow_sequence));
+        }
+        if( rc == 0 && platform->param.ls454.key_sequence != NULL ) {
+            rc = pstring_assign(&self->keys, platform->param.ls454.key_sequence,
+                                      strlen(platform->param.ls454.key_sequence));
+        }
+        self->flow_count = platform->param.ls454.flow_count;
+    }
+    if( rc == 0 ) {
+        *cself = self;
+    } else {
+        SRAWriter454_Whack(self, NULL);
+    }
+    return rc;
+}
+
+void SRAWriter454_Whack(const SRAWriter454* cself, SRATable** table)
+{
+    if( cself != NULL ) {
+        SRAWriter454* self = (SRAWriter454*)cself;
+        SRAWriter_Whack(self->base, table);
+        free(self);
+    }
+}
+
+static
+rc_t SRAWriter454_Open(const SRAWriter454* cself, bool sig_and_pos)
+{
+    rc_t rc = 0;
+    SRAWriter454* self = (SRAWriter454*)cself;
+
+    if( cself->ci_name == 0 ) {
+        INSDC_coord_one d = 0;
+        pstring x;
+
+        if( (rc = SRAWriter_CreateTable(self->base, "NCBI:SRA:_454_:tbl:v2")) != 0 ) {
+            return rc;
+        }
+        if( (rc = SRAWriter_WriteDefaults(self->base)) != 0 ) {
+            LOGERR(klogInt, rc, "failed to write table defaults");
+            return rc;
+        }
+        COL_OPEN(self->ci_name, "NAME", vdb_ascii_t);
+        COL_OPEN(self->ci_read, "READ", insdc_fasta_t);
+        COL_OPEN(self->ci_qual, "QUALITY", insdc_phred_t);
+        COL_OPEN(self->ci_q_left, "CLIP_QUALITY_LEFT", "INSDC:coord:one");
+        COL_OPEN(self->ci_q_right, "CLIP_QUALITY_RIGHT", "INSDC:coord:one");
+        COL_OPEN(self->ci_a_left, "CLIP_ADAPTER_LEFT", "INSDC:coord:one");
+        COL_OPEN(self->ci_a_right, "CLIP_ADAPTER_RIGHT", "INSDC:coord:one");
+        COL_OPEN(self->ci_flowc, "FLOW_CHARS", insdc_fasta_t);
+        COL_OPEN(self->ci_keys, "KEY_SEQUENCE", insdc_fasta_t);
+
+        COL_WRITE_DEFAULT(self->ci_flowc, "FLOW_CHARS", self->flows);
+        COL_WRITE_DEFAULT(self->ci_keys, "KEY_SEQUENCE", self->keys);
+        if( (rc = pstring_assign(&x, &d, sizeof(d))) == 0 ) {
+            COL_WRITE_DEFAULT(self->ci_q_left, "CLIP_QUALITY_LEFT", x);
+            COL_WRITE_DEFAULT(self->ci_q_right, "CLIP_QUALITY_RIGHT", x);
+            COL_WRITE_DEFAULT(self->ci_a_left, "CLIP_ADAPTER_LEFT", x);
+            COL_WRITE_DEFAULT(self->ci_a_right, "CLIP_ADAPTER_RIGHT", x);
+        }
+    }
+    if( sig_and_pos && (cself->ci_signal == 0 || cself->ci_position == 0) ) {
+        COL_OPEN(self->ci_signal, "SIGNAL", ncbi_isamp1_t);
+        COL_OPEN(self->ci_position, "POSITION", "INSDC:position:one");
+    }
+    return rc;
+}
+
+rc_t SRAWriter454_WriteHead(const SRAWriter454* cself, const pstring* flow_chars, const pstring* key_sequence)
+{
+    rc_t rc = 0;
+
+    if( (rc = SRAWriter454_Open(cself, false)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to create table");
+        return rc;
+    }
+    if( flow_chars && flow_chars->len != 0 ) {
+        if( cself->flows.len != 0 && pstring_cmp(&cself->flows, flow_chars) != 0 ) {
+            PLOGMSG(klogWarn, (klogWarn, "file FLOW_SEQUENCE do not match experiment: $(s)", PLOG_S(s), flow_chars->data));
+        }
+        /* update flow_count so signal data length will match below */
+        ((SRAWriter454*)cself)->flow_count = flow_chars->len;
+        COL_WRITE_DEFAULT(cself->ci_flowc, "FLOW_CHARS", (*flow_chars));
+    }
+    if( key_sequence && key_sequence->len != 0 ) {
+        if( cself->keys.len != 0 && pstring_cmp(&cself->keys, key_sequence) != 0 ) {
+            PLOGMSG(klogWarn, (klogWarn, "file KEY_SEQUENCE do not match experiment: $(s)", PLOG_S(s), key_sequence->data));
+        }
+        COL_WRITE_DEFAULT(cself->ci_keys, "KEY_SEQUENCE", (*key_sequence));
+    }
+    return 0;
+}
+
+rc_t SRAWriter454_WriteRead(const SRAWriter454* cself, const SRALoaderFile* data_block_ref,
+                            const pstring* name, const pstring* sequence, const pstring* quality,
+                            const pstring* signal, const pstring* position,
+                            INSDC_coord_one q_left, INSDC_coord_one q_right,
+                            INSDC_coord_one a_left, INSDC_coord_one a_right)
+{
+    rc_t rc = 0;
+    SRAWriter454* self =(SRAWriter454*)cself;
+    
+    assert(self != NULL);
+    assert(data_block_ref != NULL);
+
+    DEBUG_MSG(3, ("spot name '%s'\n", name ? name->data : NULL));
+
+    if( (rc = SRAWriter454_Open(cself, signal || position)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to open table");
+        return rc;
+    }
+    if( !name || name->len == 0 ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcEmpty);
+        LOGERR(klogErr, rc, "spot name");
+    }
+    if( !sequence || sequence->len == 0 ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcEmpty);
+        LOGERR(klogErr, rc, "sequence");
+    } else if( !quality || sequence->len != quality->len ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, quality ? rcInconsistent : rcEmpty);
+        LOGERR(klogErr, rc, "quality");
+    }
+    if( signal && signal->len / self->flow_count != sizeof(uint16_t) ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+        LOGERR(klogErr, rc, "signal and flow chars");
+    }
+    if( position && position->len / sequence->len != sizeof(INSDC_position_one) ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+        LOGERR(klogErr, rc, "sequence and position");
+    }
+    if( q_left < 0 || (sequence && q_left > sequence->len) ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+        LOGERR(klogErr, rc, "clip quality left and sequence");
+    }
+    if( q_right < 0 || (sequence && q_right > sequence->len) ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+        LOGERR(klogErr, rc, "clip quality right and sequence");
+    }
+    if( a_left < 0 || (sequence && a_left > sequence->len) ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+        LOGERR(klogErr, rc, "clip adapter left and sequence");
+    }
+    if( a_right < 0 || (sequence && a_right > sequence->len) ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+        LOGERR(klogErr, rc, "clip adapter right and sequence");
+    }
+    if( rc != 0 || (rc = SRAWriter_NewSpot(self->base, NULL)) != 0 ) {
+        return rc;
+    }
+    COL_WRITE(self->ci_name, "NAME", (*name));
+    COL_WRITE(self->ci_read, "READ", (*sequence));
+    COL_WRITE(self->ci_qual, "QUALITY", (*quality));
+    COL_WRITE(self->ci_signal, "SIGNAL", (*signal));
+    COL_WRITE(self->ci_position, "POSITION", (*position));
+
+    if( (rc = SRAWriter_WriteIdxColumn(self->base, self->ci_q_left, &q_left, sizeof(q_left), false)) != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to write $(column) column", "column=CLIP_QUALITY_LEFT"));
+        return rc;
+    }
+    if( (rc = SRAWriter_WriteIdxColumn(self->base, self->ci_q_right, &q_right, sizeof(q_right), false)) != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to write $(column) column", "column=CLIP_QUALITY_RIGHT"));
+        return rc;
+    }
+    if( (rc = SRAWriter_WriteIdxColumn(self->base, self->ci_a_left, &a_left, sizeof(a_left), false)) != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to write $(column) column", "column=CLIP_ADAPTER_LEFT"));
+        return rc;
+    }
+    if( (rc = SRAWriter_WriteIdxColumn(self->base, self->ci_a_right, &a_right, sizeof(a_right), false)) != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to write $(column) column", "column=CLIP_ADAPTER_RIGHT"));
+        return rc;
+    }
+    if( (rc = SRAWriter_WriteSpotSegment(self->base, data_block_ref, NULL, sequence->len, sequence->data)) != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to write $(column) column", "column=SPOT_GROUP/READ_SEG"));
+        return rc;
+    }
+    return SRAWriter_CloseSpot(self->base);
+}
diff --git a/tools/sra-load/writer-454.h b/tools/sra-load/writer-454.h
new file mode 100644
index 0000000..5bca626
--- /dev/null
+++ b/tools/sra-load/writer-454.h
@@ -0,0 +1,46 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _sra_load_writer_454_
+#define _sra_load_writer_454_
+
+#include "loader-fmt.h"
+#include "pstring.h"
+
+typedef struct SRAWriter454 SRAWriter454;
+
+rc_t SRAWriter454_Make(const SRAWriter454** cself, const SRALoaderConfig* config);
+
+void SRAWriter454_Whack(const SRAWriter454* cself, SRATable** table);
+
+rc_t SRAWriter454_WriteHead(const SRAWriter454* cself, const pstring* flow_chars, const pstring* key_sequence);
+
+rc_t SRAWriter454_WriteRead(const SRAWriter454* cself, const SRALoaderFile* data_block_ref,
+                            const pstring* name, const pstring* sequence, const pstring* quality,
+                            const pstring* signal, const pstring* position,
+                            INSDC_coord_one q_left, INSDC_coord_one q_right,
+                            INSDC_coord_one a_left, INSDC_coord_one a_right);
+
+#endif /* _sra_load_writer_454_ */
diff --git a/tools/sra-load/writer-absolid.c b/tools/sra-load/writer-absolid.c
new file mode 100644
index 0000000..17fa2ee
--- /dev/null
+++ b/tools/sra-load/writer-absolid.c
@@ -0,0 +1,501 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <sra/wsradb.h>
+#include <sra/types.h>
+
+#include "debug.h"
+#include "writer-absolid.h"
+#include "sra-writer.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+
+const int AbisolidReadType2ReadNumber [] = {0, 0, 0, 1, 1, 1, 1, 1, 1, 1};
+const char *AbisolidReadType2ReadLabel [] = {"", "", "F3", "R3", "F5-P2", "F5-BC", "F5-RNA", "F5-DNA", "F3-DNA", "BC"};
+
+void AbsolidRead_Init(AbsolidRead* read)
+{
+    if( read ) {
+        pstring_clear(&read->label);
+        read->cs_key = 0;
+        pstring_clear(&read->seq);
+        pstring_clear(&read->qual);
+        read->fs_type = eAbisolidFSignalType_NotSet;
+        pstring_clear(&read->fxx);
+        pstring_clear(&read->cy3);
+        pstring_clear(&read->txr);
+        pstring_clear(&read->cy5);
+        read->filter = 0;
+    }
+}
+
+EAbisolidReadType AbsolidRead_Suffix2ReadType(const char* s)
+{
+    EAbisolidReadType type;
+    size_t len;
+
+    assert(s != NULL);
+
+    len = strlen(s);
+    if( len == 0 ) {
+        type = eAbisolidReadType_SPOT;
+    } else if( len > 1 && strcmp(&s[len - 2], "F3") == 0 ) {
+        type = eAbisolidReadType_F3;
+    } else if( len > 1 && strcmp(&s[len - 2], "R3") == 0 ) {
+        type = eAbisolidReadType_R3;
+    } else if( len > 4 && strcmp(&s[len - 5], "F5-P2") == 0 ) {
+        type = eAbisolidReadType_F5_P2;
+    } else if( len > 4 && strcmp(&s[len - 5], "F5-BC") == 0 ) {
+        type = eAbisolidReadType_F5_BC;
+    } else if( len > 5 && strcmp(&s[len - 6], "F5-RNA") == 0 ) {
+        type = eAbisolidReadType_F5_RNA;
+    } else if( len > 5 && strcmp(&s[len - 6], "F5-DNA") == 0 ) {
+        type = eAbisolidReadType_F5_DNA;
+    } else if( len > 5 && strcmp(&s[len - 6], "F3-DNA") == 0 ) {
+        type = eAbisolidReadType_F3_DNA;
+    } else if( len > 1 && strcmp(&s[len - 2], "BC") == 0 ) {
+        type = eAbisolidReadType_BC;
+    } else {
+        int i;
+        for(i = 0; i < len; i++) {
+            if( !isdigit(s[i]) ) {
+                break;
+            }
+        }
+        type = i < len ? eAbisolidReadType_Unknown : eAbisolidReadType_SPOT;
+    }
+    return type;
+}
+
+struct SRAWriteAbsolid {
+    SRAWriter* base;
+    const PlatformXML* platform;
+    uint8_t nreads;
+    SRASegment read_seg[ABSOLID_FMT_MAX_NUM_READS];
+
+    uint32_t ci_name;
+    uint32_t ci_cs_key;
+    uint32_t ci_label;
+    uint32_t ci_label_start;
+    uint32_t ci_label_len;
+    uint32_t ci_csread;
+    uint32_t ci_qual;
+    uint32_t ci_fxx;
+    uint32_t ci_cy3;
+    uint32_t ci_txr;
+    uint32_t ci_cy5;
+    uint32_t ci_read_filter;
+};
+
+rc_t SRAWriteAbsolid_Make(const SRAWriteAbsolid** cself, const SRALoaderConfig* config)
+{
+    rc_t rc = 0;
+    SRAWriteAbsolid* self;
+    const PlatformXML* platform;
+    const ReadSpecXML_read* read;
+    uint32_t sequence_length;
+    uint8_t nreads;
+
+    if( cself == NULL || config == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    if( (rc = Experiment_GetPlatform(config->experiment, &platform)) != 0 ||
+        (rc = Experiment_GetSpotLength(config->experiment, &sequence_length)) != 0 ||
+        (rc = Experiment_GetReadNumber(config->experiment, &nreads)) != 0 ) {
+        return rc;
+    }
+    if( platform->id != SRA_PLATFORM_ABSOLID ) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+        LOGERR(klogErr, rc, "platform type");
+        return rc;
+    }
+    if( nreads > ABSOLID_FMT_MAX_NUM_READS ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcUnsupported);
+        PLOGERR(klogErr, (klogErr, rc, "expected up to $(max) reads", "max=%u", ABSOLID_FMT_MAX_NUM_READS));
+        return rc;
+    }
+    self = calloc(1, sizeof(*self));
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+        return rc;
+    }
+    if( (rc = SRAWriter_Make(&self->base, config)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize base writer");
+    } else if( (rc = Experiment_GetRead(config->experiment, 0, &read)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to get read 1 descriptor");
+    } else if( read->coord_type != rdsp_RelativeOrder_ct && read->coord_type != rdsp_BaseCoord_ct ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcInvalid);
+        LOGERR(klogErr, rc, "1st read can be BASE_COORD or RELATIVE_ORDER only");
+    } else if( read->read_type != rdsp_Forward_rt && read->read_type != rdsp_Reverse_rt ) {
+        LOGMSG(klogWarn, "expected 1st read to be of type 'Forward' or 'Reverse'");
+    }
+    self->read_seg[0].start = 0;
+    self->read_seg[0].len = sequence_length;
+
+    if( rc == 0 && nreads >= ABSOLID_FMT_MAX_NUM_READS ) {
+        if( nreads > ABSOLID_FMT_MAX_NUM_READS ) {
+            rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcUnsupported);
+            LOGERR(klogErr, rc, "more than 2 reads");
+        } else if( (rc = Experiment_GetRead(config->experiment, 1, &read)) != 0 ) {
+            LOGERR(klogErr, rc, "failed to get read 2 descriptor");
+        } else if( read->coord_type != rdsp_BaseCoord_ct ) {
+            rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcInvalid);
+            LOGERR(klogErr, rc, "2nd read can be BASE_COORD only");
+        } else if( read->read_type != rdsp_Forward_rt && read->read_type != rdsp_Reverse_rt ) {
+            LOGMSG(klogWarn, "expected 2ndt read to be of type 'Forward' or 'Reverse'");
+        }
+		if( rc == 0 ) {
+			self->read_seg[1].start = read->coord.start_coord - 1;
+			self->read_seg[1].len = sequence_length - self->read_seg[1].start;
+			self->read_seg[0].len = self->read_seg[1].start;
+		}
+    }
+#if _DEBUGGING
+    DEBUG_MSG(3, ("%s READ_SEG[%hu,%hu]\n", __func__, self->read_seg[0].start, self->read_seg[0].len));
+    if( nreads > 1 ) {
+        DEBUG_MSG(3, ("%s READ_SEG[%hu,%hu]\n", __func__, self->read_seg[1].start, self->read_seg[1].len));
+    }
+#endif
+    if( rc == 0 ) {
+        self->platform = platform;
+        self->nreads = nreads;
+        *cself = self;
+    } else {
+        SRAWriteAbsolid_Whack(self, NULL);
+    }
+    return rc;
+}
+
+rc_t SRAWriteAbsolid_MakeName(const pstring* prefix, const pstring* suffix, pstring* name)
+{
+    rc_t rc = 0;
+    if( prefix == NULL || name == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcParam, rcNull);
+    } else if( (rc = pstring_copy(name, prefix)) == 0 ) {
+        if( suffix && suffix->len > 0 ) {
+            if( name->len > 0 && name->data[name->len - 1] != '_' && suffix->data[0] != '_' ) {
+                rc = pstring_append(name, "_", 1);
+            }
+            if( rc == 0 ) {
+                pstring_concat(name, suffix);
+            }
+        }
+    }
+    if( rc != 0 ) {
+        LOGERR(klogErr, rc, "preparing spot name");
+    }
+    return rc;
+}
+
+void SRAWriteAbsolid_Whack(const SRAWriteAbsolid* cself, SRATable** table)
+{
+    if( cself != NULL ) {
+        SRAWriteAbsolid* self = (SRAWriteAbsolid*)cself;
+        SRAWriter_Whack(self->base, table);
+        free(self);
+    }
+}
+
+typedef struct AbsolidSpot_struct {
+    const pstring* spot_name;
+    uint32_t nreads;
+    pstring label;
+    SRASegment read_seg[ABSOLID_FMT_MAX_NUM_READS];
+    INSDC_coord_zero label_start[ABSOLID_FMT_MAX_NUM_READS];
+    uint32_t label_len[ABSOLID_FMT_MAX_NUM_READS];
+    char cs_key[ABSOLID_FMT_MAX_NUM_READS];
+    pstring seq;
+    pstring qual;
+    EAbisolidFSignalType fs_type;
+    pstring fxx;
+    pstring cy3;
+    pstring txr;
+    pstring cy5;
+    uint8_t filter[ABSOLID_FMT_MAX_NUM_READS];
+} AbsolidSpot;
+
+static
+void AbsolidSpot_Init(AbsolidSpot* spot, const pstring* spot_name,
+                      const uint16_t nreads, const SRASegment* read_seg)
+{
+    assert(spot != NULL);
+    assert(spot_name != NULL);
+    assert(nreads != 0);
+
+    spot->spot_name = spot_name;
+    pstring_clear(&spot->label);
+    memcpy(spot->read_seg, read_seg, sizeof(spot->read_seg[0]) * nreads);
+    memset(spot->label_start, 0, sizeof(spot->label_start[0]) * nreads);
+    memset(spot->label_len, 0, sizeof(spot->label_len[0]) * nreads);
+    memset(spot->cs_key, 0, sizeof(spot->cs_key[0]) * nreads);
+    pstring_clear(&spot->seq);
+    pstring_clear(&spot->qual);
+    spot->fs_type = eAbisolidFSignalType_NotSet;
+    pstring_clear(&spot->fxx);
+    pstring_clear(&spot->cy3);
+    pstring_clear(&spot->txr);
+    pstring_clear(&spot->cy5);
+    memset(spot->filter, 0, sizeof(spot->filter[0]) * nreads);
+}
+
+static
+rc_t  AbsolidSpot_AddRead(AbsolidSpot* spot, const int id, const AbsolidRead* read)
+{
+    rc_t rc = 0;
+    const char* what = NULL;
+
+    if( read == NULL ) {
+        if( id == 0 ) {
+            spot->read_seg[id].start = 0;
+            spot->label_start[id] = 0;
+        } else {
+            spot->read_seg[id].start = spot->read_seg[id - 1].start + spot->read_seg[id - 1].len;
+            spot->label_start[id] = spot->label_start[id - 1] + spot->label_len[id - 1];
+        }
+        spot->read_seg[id].len = 0;
+        spot->label_len[id] = 0;
+        spot->cs_key[id] = (id % 2) ? 'G' : 'T';
+        spot->filter[id] = SRA_READ_FILTER_REJECT;
+    } else {
+        if( read->seq.len != spot->read_seg[id].len ) {
+            rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+            what = "length do not match experiment";
+        } else if( read->qual.len != read->seq.len ) {
+            rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+            what = "quality length";
+        } else if( spot->fs_type != eAbisolidFSignalType_NotSet && spot->fs_type != read->fs_type ) {
+            rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcInconsistent);
+            what = "signal structure";
+        } else if( read->fs_type != eAbisolidFSignalType_NotSet ) {
+            if( read->fxx.len / read->seq.len != sizeof(float) ) {
+                rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+                what = read->fs_type == eAbisolidFSignalType_FTC ? "signal FTC length" : "signal FAM length";
+            } else if( read->cy3.len / read->seq.len != sizeof(float) ) {
+                rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+                what = "signal CY3 length";
+            } else if( read->txr.len / read->seq.len != sizeof(float) ) {
+                rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+                what = "signal TXR length";
+            } else if( read->cy5.len / read->seq.len != sizeof(float) ) {
+                rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+                what = "signal CY5 length";
+            }
+        }
+        if( rc == 0 ) {
+            if( (rc = pstring_concat(&spot->seq, &read->seq)) == 0 &&
+                (rc = pstring_concat(&spot->qual, &read->qual)) == 0 &&
+                (rc = pstring_concat(&spot->label, &read->label)) == 0 ) {
+                if( id == 0 ) {
+                    spot->read_seg[id].start = 0;
+                    spot->label_start[id] = 0;
+                } else {
+                    spot->read_seg[id].start = spot->read_seg[id - 1].start + spot->read_seg[id - 1].len;
+                    spot->label_start[id] = spot->label_start[id - 1] + spot->label_len[id - 1];
+                }
+                spot->label_len[id] = read->label.len;
+                spot->cs_key[id] = read->cs_key;
+                spot->filter[id] = read->filter;
+                if( read->fs_type != eAbisolidFSignalType_NotSet &&
+                    (rc = pstring_concat(&spot->fxx, &read->fxx)) == 0 &&
+                    (rc = pstring_concat(&spot->cy3, &read->cy3)) == 0 &&
+                    (rc = pstring_concat(&spot->txr, &read->txr)) == 0 &&
+                    (rc = pstring_concat(&spot->cy5, &read->cy5)) == 0 &&
+                    id == 0 ) {
+                    spot->fs_type = read->fs_type;
+                }
+            }
+        }
+    }
+    if( rc != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "read '$(label)' $(problem) in spot '$(spot_name)'",
+                "label=%.*s,problem=%s,spot_name=%s", read->label.len, read->label.data, what, spot->spot_name->data));
+    }
+    return rc;
+}
+
+rc_t SRAWriteAbsolid_Write(const SRAWriteAbsolid* cself, const SRALoaderFile* file, 
+                           const pstring* spot_name, const pstring* spot_group,
+                           const AbsolidRead* f3, const AbsolidRead* r3)
+{
+    rc_t rc = 0;
+    uint32_t nreads = ((f3 ? 1 : 0) + (r3 ? 1 : 0));
+    AbsolidSpot spot;
+
+    assert(cself != NULL);
+    assert(sizeof(cself->read_seg) == sizeof(spot.read_seg));
+    assert(file != NULL);
+    assert(spot_name);
+
+    DEBUG_MSG(3, ("spot name '%s', group '%s'\n", spot_name->data, spot_group ? spot_group->data : NULL));
+
+    if( nreads == 0 || nreads > cself->nreads ) {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcExcessive);
+        PLOGERR(klogErr, (klogErr, rc, "read count do not match experiment in spot $(spot): $(c)",
+                "spot=%s,c=%u", spot_name->data, nreads));
+        return rc;
+    }
+
+    AbsolidSpot_Init(&spot, spot_name, cself->nreads, cself->read_seg);
+    if( cself->nreads == 1 ) {
+        rc = AbsolidSpot_AddRead(&spot, 0, f3 ? f3 : r3);
+    } else if( cself->nreads == 2 ) {
+        rc = AbsolidSpot_AddRead(&spot, 0, f3);
+        rc = rc ? rc : AbsolidSpot_AddRead(&spot, 1, r3);
+    } else {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcFunction, rcCorrupt);
+        PLOGERR(klogInt, (klogInt, rc, "cannot handle reads: $(n) > 2!!!", "n=%hu", cself->nreads));
+        return rc;
+    }
+    if( rc == 0 && cself->ci_name == 0 ) {
+        SRAWriteAbsolid* self =(SRAWriteAbsolid*)cself;
+        if( (rc = SRAWriter_CreateTable(cself->base, "NCBI:SRA:ABI:tbl:v2")) != 0 ) {
+            return rc;
+        }
+        if( (rc = SRAWriter_WriteDefaults(cself->base)) != 0 ) {
+            LOGERR(klogInt, rc, "failed to write table defaults");
+            return rc;
+        }
+        COL_OPEN(self->ci_name, "NAME", vdb_ascii_t);
+        COL_OPEN(self->ci_cs_key, "CS_KEY", insdc_fasta_t);
+        COL_OPEN(self->ci_csread, "CSREAD", insdc_csfasta_t);
+        COL_OPEN(self->ci_qual, "QUALITY", insdc_phred_t);
+        COL_OPEN(self->ci_read_filter, "READ_FILTER", sra_read_filter_t);
+
+        if( spot.label.len != 0 ) {
+            COL_OPEN(self->ci_label, "LABEL", vdb_ascii_t);
+            COL_OPEN(self->ci_label_start, "LABEL_START", "INSDC:coord:zero");
+            COL_OPEN(self->ci_label_len, "LABEL_LEN", "U32");
+        }
+        if( spot.fs_type != eAbisolidFSignalType_NotSet ) {
+            if( spot.fs_type == eAbisolidFSignalType_FTC ) {
+                COL_OPEN(self->ci_fxx, "FTC", ncbi_fsamp1_t);
+            } else {
+                COL_OPEN(self->ci_fxx, "FAM", ncbi_fsamp1_t);
+            }
+            COL_OPEN(self->ci_cy3, "CY3", ncbi_fsamp1_t);
+            COL_OPEN(self->ci_txr, "TXR", ncbi_fsamp1_t);
+            COL_OPEN(self->ci_cy5, "CY5", ncbi_fsamp1_t);
+        }
+    }
+    if( rc != 0 || (rc = SRAWriter_NewSpot(cself->base, NULL)) != 0 ) {
+        return rc;
+    }
+#if _DEBUGGING
+    {{
+        uint32_t i;
+
+        DEBUG_MSG(13, ("NAME: '%.*s'\n", spot.spot_name->len, spot.spot_name->data));
+        DEBUG_MSG(13, ("CSREAD: len:%u %.*s\n", spot.seq.len, spot.seq.len, spot.seq.data));
+        DEBUG_MSG(13, ("QUAL: len:%u", spot.qual.len));
+        for(i = 0; i < spot.qual.len; i++ ) {
+            DEBUG_MSG(13, (" %i", spot.qual.data[i]));
+        }
+        DEBUG_MSG(13, ("\nLABEL: '%.*s'\n", spot.label.len, spot.label.data));
+        for(i = 0; i < cself->nreads; i++) {
+            DEBUG_MSG(13, ("READ_%02u ", i));
+            DEBUG_MSG(13, ("READ_SEG: [%2u,%2u] ", spot.read_seg[i].start, spot.read_seg[i].len));
+            DEBUG_MSG(13, ("LABEL_SEG: [%2u,%2u] ", spot.label_start[i], spot.label_len[i]));
+            DEBUG_MSG(13, ("CS_KEY: %c ", spot.cs_key[i]));
+            DEBUG_MSG(13, ("READ_FLT: %s", spot.filter[i] == SRA_READ_FILTER_PASS ? "PASS" : "REJECT"));
+            DEBUG_MSG(13, ("\n"));
+        }
+        if( spot.fs_type != eAbisolidFSignalType_NotSet ) {
+            float* f;
+            DEBUG_MSG(13, ("FXX len:%u", spot.fxx.len));
+            f = (float*)spot.fxx.data;
+            for(i = 0; i < spot.fxx.len / sizeof(*f); i++) {
+                DEBUG_MSG(13, (" %f", f[i]));
+            }
+            DEBUG_MSG(13, ("\nCY3: len%u:", spot.cy3.len));
+            f = (float*)spot.cy3.data;
+            for(i = 0; i < spot.cy3.len / sizeof(*f); i++) {
+                DEBUG_MSG(13, (" %f", f[i]));
+            }
+            DEBUG_MSG(13, ("\nTXR: len:%u:", spot.txr.len));
+            f = (float*)spot.txr.data;
+            for(i = 0; i < spot.txr.len / sizeof(*f); i++) {
+                DEBUG_MSG(13, (" %f", f[i]));
+            }
+            DEBUG_MSG(13, ("\nCY5: len:%u", spot.cy5.len));
+            f = (float*)spot.cy5.data;
+            for(i = 0; i < spot.cy5.len / sizeof(*f); i++) {
+                DEBUG_MSG(13, (" %f", f[i]));
+            }
+            DEBUG_MSG(13, ("\n"));
+        }
+    }}
+#endif
+    /* this column is the one that is most likely to fail as it is required to be unique
+     * so we put it first so that we can still close the spot if it fails
+     */
+    COL_WRITE(cself->ci_name, "NAME", (*spot_name));
+    COL_WRITE(cself->ci_csread, "CSREAD", spot.seq);
+    COL_WRITE(cself->ci_qual, "QUALITY", spot.qual);
+    if( cself->ci_fxx != 0 ) {
+        if( spot.fs_type == eAbisolidFSignalType_FTC ) {
+            COL_WRITE(cself->ci_fxx, "FTC", spot.fxx);
+        } else {
+            COL_WRITE(cself->ci_fxx, "FAM", spot.fxx);
+        }
+        COL_WRITE(cself->ci_cy3, "CY3", spot.cy3);
+        COL_WRITE(cself->ci_txr, "TXR", spot.txr);
+        COL_WRITE(cself->ci_cy5, "CY5", spot.cy5);
+    }
+    if( (rc = SRAWriter_WriteSpotSegmentSimple(cself->base, file, spot_group ? spot_group->data : NULL, spot.read_seg)) != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to write $(column) column", "column=SPOT_GROUP/READ_SEG"));
+        return rc;
+    }
+    if( cself->ci_label != 0 ) {
+        COL_WRITE(cself->ci_label, "LABEL", spot.label);
+        rc = SRAWriter_WriteIdxColumn(cself->base, cself->ci_label_start, spot.label_start, cself->nreads * sizeof(spot.label_start[0]), false);
+        if(rc) {
+            PLOGERR(klogErr, (klogErr, rc, "failed to write '$(column)' column", "column=LABEL_START"));
+            return rc;
+        }
+        rc = SRAWriter_WriteIdxColumn(cself->base, cself->ci_label_len, spot.label_len, cself->nreads * sizeof(spot.label_len[0]), false);
+        if(rc) {
+            PLOGERR(klogErr, (klogErr, rc, "failed to write '$(column)' column", "column=LABEL_LEN"));
+            return rc;
+        }
+    }
+
+    rc = SRAWriter_WriteIdxColumn(cself->base, cself->ci_cs_key, spot.cs_key, cself->nreads * sizeof(spot.cs_key[0]), false);
+    if(rc) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to write '$(column)' column", "column=CS_KEY"));
+        return rc;
+    }
+    rc = SRAWriter_WriteIdxColumn(cself->base, cself->ci_read_filter, spot.filter, cself->nreads * sizeof(spot.filter[0]), false);
+    if(rc) {
+        PLOGERR(klogInt, (klogInt, rc, "failed to write $(column) column", "column=READ_FILTER"));
+        return rc;
+    }
+    return SRAWriter_CloseSpot(cself->base);
+}
diff --git a/tools/sra-load/writer-absolid.h b/tools/sra-load/writer-absolid.h
new file mode 100644
index 0000000..2384977
--- /dev/null
+++ b/tools/sra-load/writer-absolid.h
@@ -0,0 +1,94 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _sra_load_writer_absolid_
+#define _sra_load_writer_absolid_
+
+#include "loader-fmt.h"
+#include "pstring.h"
+
+#define ABSOLID_FMT_MAX_NUM_READS 2
+
+#define ABSOLID_FMT_COLMASK_NOTSET 0x00
+#define ABSOLID_FMT_COLMASK_READ 0x01
+#define ABSOLID_FMT_COLMASK_QUALITY 0x02
+#define ABSOLID_FMT_COLMASK_FTC 0x04
+#define ABSOLID_FMT_COLMASK_FAM 0x08
+#define ABSOLID_FMT_COLMASK_CY3 0x10
+#define ABSOLID_FMT_COLMASK_TXR 0x20
+#define ABSOLID_FMT_COLMASK_CY5 0x40
+
+typedef enum EAbisolidReadType_enum {
+    eAbisolidReadType_Unknown = 0,
+    eAbisolidReadType_SPOT = 1,
+    eAbisolidReadType_F3 = 2,
+    eAbisolidReadType_R3 = 3,
+    eAbisolidReadType_F5_P2 = 4,
+    eAbisolidReadType_F5_BC = 5,
+    eAbisolidReadType_F5_RNA = 6,
+    eAbisolidReadType_F5_DNA = 7,
+    eAbisolidReadType_F3_DNA = 8,
+    eAbisolidReadType_BC = 9
+} EAbisolidReadType;
+
+extern const int AbisolidReadType2ReadNumber [];
+extern const char *AbisolidReadType2ReadLabel [];
+
+typedef enum EAbisolidFSignalType_enum {
+    eAbisolidFSignalType_NotSet = 0,
+    eAbisolidFSignalType_FAM = 1,
+    eAbisolidFSignalType_FTC = 2
+} EAbisolidFSignalType;
+
+typedef struct AbsolidRead_struct {
+    pstring label;
+    char cs_key;
+    pstring seq;
+    pstring qual;
+    EAbisolidFSignalType fs_type;
+    pstring fxx;
+    pstring cy3;
+    pstring txr;
+    pstring cy5;
+    SRAReadFilter filter;
+} AbsolidRead;
+
+void AbsolidRead_Init(AbsolidRead* read);
+
+EAbisolidReadType AbsolidRead_Suffix2ReadType(const char* s);
+
+typedef struct SRAWriteAbsolid SRAWriteAbsolid;
+
+rc_t SRAWriteAbsolid_Make(const SRAWriteAbsolid** cself, const SRALoaderConfig* config);
+
+rc_t SRAWriteAbsolid_MakeName(const pstring* prefix, const pstring* suffix, pstring* name);
+
+void SRAWriteAbsolid_Whack(const SRAWriteAbsolid* cself, SRATable** table);
+
+rc_t SRAWriteAbsolid_Write(const SRAWriteAbsolid* cself, const SRALoaderFile* file, 
+                           const pstring* spot_name, const pstring* spot_group,
+                           const AbsolidRead* f3, const AbsolidRead* r3);
+
+#endif /* _sra_load_writer_absolid_ */
diff --git a/tools/sra-load/writer-helicos.c b/tools/sra-load/writer-helicos.c
new file mode 100644
index 0000000..2935826
--- /dev/null
+++ b/tools/sra-load/writer-helicos.c
@@ -0,0 +1,135 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <sra/types.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <ctype.h>
+#include <assert.h>
+
+#include "debug.h"
+#include "writer-helicos.h"
+#include "sra-writer.h"
+
+struct SRAWriterHelicos {
+    SRAWriter* base;
+
+    uint32_t ci_name;
+    uint32_t ci_read;
+    uint32_t ci_qual;
+};
+
+rc_t SRAWriterHelicos_Make(const SRAWriterHelicos** cself, const SRALoaderConfig* config)
+{
+    rc_t rc = 0;
+    SRAWriterHelicos* self;
+    const PlatformXML* platform;
+
+    if( cself == NULL || config == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    if( (rc = Experiment_GetPlatform(config->experiment, &platform)) != 0 ) {
+        return rc;
+    }
+    if( platform->id != SRA_PLATFORM_HELICOS ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcInvalid);
+        LOGERR(klogErr, rc, "platform type");
+        return rc;
+    }
+    self = calloc(1, sizeof(*self));
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+    } else if( (rc = SRAWriter_Make(&self->base, config)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize base writer");
+    }
+
+    if( rc == 0 ) {
+        *cself = self;
+    } else {
+        SRAWriterHelicos_Whack(self, NULL);
+    }
+    return rc;
+}
+
+void SRAWriterHelicos_Whack(const SRAWriterHelicos* cself, SRATable** table)
+{
+    if( cself != NULL ) {
+        SRAWriterHelicos* self = (SRAWriterHelicos*)cself;
+        SRAWriter_Whack(self->base, table);
+        free(self);
+    }
+}
+
+rc_t SRAWriterHelicos_Write(const SRAWriterHelicos* cself, const SRALoaderFile* data_block_ref,
+                            const pstring* name, const pstring* sequence, const pstring* quality)
+{
+    rc_t rc = 0;
+    SRAWriterHelicos* self =(SRAWriterHelicos*)cself;
+    
+    assert(self != NULL);
+    assert(data_block_ref != NULL);
+
+    DEBUG_MSG(3, ("spot name '%s'\n", name ? name->data : NULL));
+
+    if( self->ci_name == 0 ) {
+        if( (rc = SRAWriter_CreateTable(self->base, "NCBI:SRA:Helicos:tbl:v2")) != 0 ) {
+            return rc;
+        }
+        if( (rc = SRAWriter_WriteDefaults(self->base)) != 0 ) {
+            LOGERR(klogInt, rc, "failed to write table defaults");
+            return rc;
+        }
+        COL_OPEN(self->ci_name, "NAME", vdb_ascii_t);
+        COL_OPEN(self->ci_read, "READ", insdc_fasta_t);
+        COL_OPEN(self->ci_qual, "QUALITY", insdc_phred_t);
+    }
+    if( !name || name->len == 0 ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcEmpty);
+        LOGERR(klogErr, rc, "spot name");
+    }
+    if( !sequence || sequence->len == 0 ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcEmpty);
+        LOGERR(klogErr, rc, "sequence");
+    } else if( !quality || sequence->len != quality->len ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, quality ? rcInconsistent : rcEmpty);
+        LOGERR(klogErr, rc, "quality");
+    }
+    if( rc != 0 || (rc = SRAWriter_NewSpot(self->base, NULL)) != 0 ) {
+        return rc;
+    }
+    COL_WRITE(self->ci_name, "NAME", (*name));
+    COL_WRITE(self->ci_read, "READ", (*sequence));
+    COL_WRITE(self->ci_qual, "QUALITY", (*quality));
+    if( (rc = SRAWriter_WriteSpotSegment(self->base, data_block_ref, NULL, sequence->len, sequence->data)) != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to write $(column) column", "column=SPOT_GROUP/READ_SEG"));
+        return rc;
+    }
+    return SRAWriter_CloseSpot(self->base);
+}
diff --git a/tools/sra-load/writer-helicos.h b/tools/sra-load/writer-helicos.h
new file mode 100644
index 0000000..a8a9f93
--- /dev/null
+++ b/tools/sra-load/writer-helicos.h
@@ -0,0 +1,41 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _sra_load_writer_454_
+#define _sra_load_writer_454_
+
+#include "loader-fmt.h"
+#include "pstring.h"
+
+typedef struct SRAWriterHelicos SRAWriterHelicos;
+
+rc_t SRAWriterHelicos_Make(const SRAWriterHelicos** cself, const SRALoaderConfig* config);
+
+void SRAWriterHelicos_Whack(const SRAWriterHelicos* cself, SRATable** table);
+
+rc_t SRAWriterHelicos_Write(const SRAWriterHelicos* cself, const SRALoaderFile* data_block_ref,
+                            const pstring* name, const pstring* sequence, const pstring* quality);
+
+#endif /* _sra_load_writer_454_ */
diff --git a/tools/sra-load/writer-illumina.c b/tools/sra-load/writer-illumina.c
new file mode 100644
index 0000000..8362abe
--- /dev/null
+++ b/tools/sra-load/writer-illumina.c
@@ -0,0 +1,720 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <sra/types.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <ctype.h>
+#include <assert.h>
+
+#include "debug.h"
+#include "writer-illumina.h"
+#include "sra-writer.h"
+
+void IlluminaRead_Init(IlluminaRead* read, bool name_only)
+{
+    assert(read != NULL);
+    read->read_id = ILLUMINAWRITER_READID_NONE;
+    if( !name_only ) {
+        pstring_clear(&read->seq);
+        read->qual_type = ILLUMINAWRITER_COLMASK_NOTSET;
+        pstring_clear(&read->qual);
+        pstring_clear(&read->noise);
+        pstring_clear(&read->intensity);
+        pstring_clear(&read->signal);
+        read->filter = SRA_READ_FILTER_PASS;
+    }
+}
+
+void IlluminaSpot_Init(IlluminaSpot* spot)
+{
+    memset(spot, 0, sizeof(*spot));
+    spot->qual_type = ILLUMINAWRITER_COLMASK_NOTSET;
+}
+
+static
+rc_t IlluminaSpot_Set(IlluminaSpot* spot, int r, const pstring* name, const pstring* barcode, const IlluminaRead* read)
+{
+    rc_t rc = 0;
+    if( r >= ILLUMINAWRITER_MAX_NUM_READS ) {
+        rc = RC(rcSRA, rcFormatter, rcCopying, rcData, rcOutofrange);
+    } else {
+        DEBUG_MSG(3, ("starting spot '%s' bc:'%s'\n", name->data, barcode->data));
+        spot->name = name;
+        spot->barcode = barcode;
+        spot->reads[r].read_id = read->read_id;
+        spot->reads[r].seq = read->seq.len > 0 ? &read->seq : NULL;
+        if( (read->qual_type == ILLUMINAWRITER_COLMASK_QUALITY_PHRED) ||
+            (read->qual_type == ILLUMINAWRITER_COLMASK_QUALITY_LOGODDS1) ||
+            (read->qual_type == ILLUMINAWRITER_COLMASK_QUALITY_LOGODDS4) ) {
+            spot->qual_type = read->qual_type;
+            spot->reads[r].qual = &read->qual;
+        } else if( read->qual_type != ILLUMINAWRITER_COLMASK_NOTSET ) {
+            rc = RC(rcSRA, rcFormatter, rcCopying, rcRange, rcUnrecognized);
+        }
+        spot->reads[r].noise = read->noise.len > 0 ? &read->noise : NULL;
+        spot->reads[r].intensity = read->intensity.len > 0 ? &read->intensity : NULL;
+        spot->reads[r].signal = read->signal.len > 0 ? &read->signal : NULL;
+        spot->reads[r].filter = &read->filter;
+    }
+    return rc;
+}
+
+static
+rc_t IlluminaSpot_Append(IlluminaSpot* spot, int r, const pstring* barcode, const IlluminaRead* read, const char** field)
+{
+    rc_t rc = 0;
+    /* spot->name and spot->reads[r].read_id assumed to be matched with read before call!!! */
+    if( r >= ILLUMINAWRITER_MAX_NUM_READS ) {
+        *field = "number of reads";
+        return RC(rcSRA, rcFormatter, rcCopying, rcData, rcOutofrange);
+    }
+    if( (spot->barcode == NULL && barcode != NULL) ||
+        (spot->barcode != NULL && barcode == NULL) ||
+        (spot->barcode != barcode && pstring_cmp(spot->barcode, barcode) != 0) ) {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcInconsistent);
+        *field = "barcode";
+        return rc;
+    }
+    if( read->seq.len > 0 ) {
+        if( spot->reads[r].seq ) {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcDuplicate);
+            *field = "sequence";
+            return rc;
+        } else {
+            spot->reads[r].seq = &read->seq;
+        }
+    }
+    if( read->qual_type != ILLUMINAWRITER_COLMASK_NOTSET ) {
+        if( spot->reads[r].qual ) {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcDuplicate);
+            *field = "quality";
+            return rc;
+        }
+        if( spot->qual_type != ILLUMINAWRITER_COLMASK_NOTSET && spot->qual_type != read->qual_type ) {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcInconsistent);
+            *field = "quality type";
+            return rc;
+        }
+        spot->qual_type = read->qual_type;
+        spot->reads[r].qual = &read->qual;
+    }
+
+    if( read->noise.len > 0 ) {
+        if( spot->reads[r].noise ) {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcDuplicate);
+            *field = "noise";
+            return rc;
+        } else {
+            spot->reads[r].noise = &read->noise;
+        }
+    }
+    if( read->intensity.len > 0 ) {
+        if( spot->reads[r].intensity ) {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcDuplicate);
+            *field = "intensity";
+            return rc;
+        } else {
+            spot->reads[r].intensity = &read->intensity;
+        }
+    }
+    if( read->signal.len > 0 ) {
+        if( spot->reads[r].signal ) {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcDuplicate);
+            *field = "signal";
+            return rc;
+        } else {
+            spot->reads[r].signal = &read->signal;
+        }
+    }
+    if( spot->reads[r].filter != NULL ) {
+        if( *(spot->reads[r].filter) != read->filter ) {
+            rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcInconsistent);
+            *field = "read_filter";
+            return rc;
+        }
+    } else {
+        spot->reads[r].filter = &read->filter;
+    }
+    return rc;
+}
+
+rc_t IlluminaSpot_Add(IlluminaSpot* spot, const pstring* name, const pstring* barcode, const IlluminaRead* read)
+{
+    rc_t rc = 0;
+
+    if( spot->nreads == 0 ) {
+        rc = IlluminaSpot_Set(spot, spot->nreads++, name, barcode, read);
+    } else if( pstring_cmp(spot->name, name) == 0 ) {
+        /* look if same read_id was already seen in this spot */
+        int32_t k;
+        for(k = 0; k < spot->nreads; k++) {
+            if( spot->reads[k].read_id == read->read_id ) {
+                const char* field;
+                rc = IlluminaSpot_Append(spot, k, barcode, read, &field);
+                if( GetRCState(rc) == rcDuplicate && read->read_id == ILLUMINAWRITER_READID_NONE ) {
+                    /* may be it is the case when readids are missing on defline and these are separate reads */
+                    k = spot->nreads + 1;
+                    rc = 0;
+                } else if( rc != 0 ) {
+                    PLOGERR(klogErr, (klogErr, rc, "$(field) for spot '$(s)'", PLOG_2(PLOG_S(field),PLOG_S(s)), field, spot->name->data));
+                }
+                break;
+            }
+        }
+        if( rc == 0 && k >= spot->nreads ) {
+            /* read was not found, adddind new read to this spot */
+            rc = IlluminaSpot_Set(spot, spot->nreads++, name, barcode, read);
+        }
+    } else {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcIgnored);
+    }
+    return rc;
+}
+
+struct SRAWriterIllumina {
+    SRAWriter* base;
+    const SRALoaderConfig* config;
+    const PlatformXML* platform;
+    uint8_t nreads;
+
+    SRASegment read_seg[ILLUMINAWRITER_MAX_NUM_READS];
+    int16_t barcode_read_id;
+    bool fixed_read_seg;
+    const ReadSpecXML_read* last_read;
+    uint32_t sequence_length;
+    
+    uint16_t col_mask;
+    uint32_t ci_name;
+    uint32_t ci_read;
+    uint32_t ci_qual;
+    uint32_t ci_signal;
+    uint32_t ci_noise;
+    uint32_t ci_intensity;
+    uint32_t ci_read_filter;
+
+};
+
+rc_t SRAWriterIllumina_Make(const SRAWriterIllumina** cself, const SRALoaderConfig* config)
+{
+    rc_t rc = 0;
+    SRAWriterIllumina* self;
+    const PlatformXML* platform;
+    const ReadSpecXML_read* last_read;
+    int32_t spot_len;
+    uint32_t sequence_length;
+    uint8_t nreads;
+
+    if( cself == NULL || config == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    if( (rc = Experiment_GetPlatform(config->experiment, &platform)) != 0 ||
+        (rc = Experiment_GetReadNumber(config->experiment, &nreads)) != 0 ||
+        (rc = Experiment_GetSpotLength(config->experiment, &sequence_length)) != 0 ||
+        (rc = Experiment_GetRead(config->experiment, nreads - 1, &last_read)) != 0 ) {
+        return rc;
+    }
+    if( platform->id != SRA_PLATFORM_ILLUMINA ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcInvalid);
+        LOGERR(klogErr, rc, "platform type");
+        return rc;
+    }
+    if( nreads > ILLUMINAWRITER_MAX_NUM_READS ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcUnsupported);
+        PLOGERR(klogErr, (klogErr, rc, "more than $(max) reads", PLOG_U8(max), (uint8_t)ILLUMINAWRITER_MAX_NUM_READS));
+        return rc;
+    }
+    self = calloc(1, sizeof(*self));
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+        return rc;
+    }
+    if( (rc = SRAWriter_Make(&self->base, config)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize base writer");
+    }
+    self->config = config;
+    self->platform = platform;
+    self->nreads = nreads;
+    self->barcode_read_id = ILLUMINAWRITER_READID_NONE;
+    self->last_read = last_read;
+    self->fixed_read_seg = true;
+    self->col_mask = ILLUMINAWRITER_COLMASK_NOTSET;
+    self->sequence_length = sequence_length;
+    spot_len = sequence_length;
+
+    do {
+        const ReadSpecXML_read* read_spec;
+        int16_t len = 0;
+        --nreads;
+        if( (rc = Experiment_GetRead(config->experiment, nreads, &read_spec)) != 0 ) {
+            break;
+        }
+        if( read_spec->read_type == rdsp_BarCode_rt ) {
+            if( self->barcode_read_id == ILLUMINAWRITER_READID_NONE ) {
+                self->barcode_read_id = nreads;
+            } else {
+                rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcDuplicate);
+                LOGERR(klogErr, rc, "only on BarCode READ_TYPE per spot supported");
+                break;
+            }
+        }
+        if( self->fixed_read_seg ) {
+            switch(read_spec->coord_type) {
+                case rdsp_BaseCoord_ct:
+                case rdsp_CycleCoord_ct:
+                    len = spot_len - read_spec->coord.start_coord + 1;
+                    break;
+                case rdsp_ExpectedBaseCall_ct:
+                case rdsp_ExpectedBaseCallTable_ct:
+                    if( read_spec->coord.expected_basecalls.default_length > 0 ) {
+                        len = read_spec->coord.expected_basecalls.default_length;
+                    } else {
+                        rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcUnsupported);
+                    }
+                    break;
+                case rdsp_RelativeOrder_ct:
+                    if( nreads == 0 ) {
+                        len = spot_len - 1 + 1; /* as if BASE_COORD == 1 */
+                        break;
+                    }
+                default:
+                    rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcUnsupported);
+            }
+            if( rc == 0 ) {
+                spot_len -= len;
+                if( spot_len < 0 || len <= 0 ) {
+                    rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcInconsistent);
+                    LOGERR(klogErr, rc, "SPOT_DECODE_SPEC and SEQUENCE_LENGTH");
+                } else {
+                    SRASegment* seg = &self->read_seg[nreads];
+                    seg->start = spot_len;
+                    seg->len = len;
+                    DEBUG_MSG(3, ("#%u read fixed length = %i\n", nreads, len));
+                }
+            } else if( GetRCState(rc) == rcUnsupported ) {
+                self->fixed_read_seg = false;
+                DEBUG_MSG(3, ("not fixed spot segmentation"));
+                rc = 0;
+            }
+        }
+    } while( rc == 0 && nreads > 0 );
+
+    if( rc == 0 ) {
+        *cself = self;
+    } else {
+        SRAWriterIllumina_Whack(self, NULL);
+    }
+    return rc;
+}
+
+void SRAWriterIllumina_Whack(const SRAWriterIllumina* cself, SRATable** table)
+{
+    if( cself != NULL ) {
+        SRAWriterIllumina* self = (SRAWriterIllumina*)cself;
+        SRAWriter_Whack(self->base, table);
+        free(self);
+    }
+}
+
+typedef struct IlluminaWriterSpot_struct {
+    pstring name;
+    const char* spot_group;
+    uint16_t col_mask;
+    bool adjust_last_read_len;
+    pstring seq;
+    pstring qual;
+    pstring noise;
+    pstring intensity;
+    pstring signal;
+    SRAReadFilter filter[ILLUMINAWRITER_MAX_NUM_READS+1];
+} IlluminaWriterSpot;
+
+static
+rc_t SRAWriterIllumina_Check(SRAWriterIllumina* self,
+    IlluminaSpot* spot, IlluminaWriterSpot* final)
+{
+    rc_t rc = 0;
+    bool done, inject_barcode = false;
+    int32_t i, flt_qty, spot_len;
+    const char* what = NULL, *member_basecall = NULL;
+
+    assert(self != NULL);
+    assert(spot != NULL);
+    assert(final != NULL);
+
+    /* reorder reads ascending by file's read_ids */
+    do {
+        IlluminaSpot tmp;
+        done = true;
+        for(i = 1; i < spot->nreads; i++) {
+            if( spot->reads[i].read_id < spot->reads[i - 1].read_id ) {
+                memcpy(&tmp.reads[0], &spot->reads[i], sizeof(tmp.reads[0]));
+                memcpy(&spot->reads[i], &spot->reads[i - 1], sizeof(tmp.reads[0]));
+                memcpy(&spot->reads[i - 1], &tmp.reads[0], sizeof(tmp.reads[0]));
+                done = false;
+            }
+        }
+    } while( !done );
+
+    /* get total spot length in bases */
+    spot_len = 0;
+    for(i = 0; rc == 0 && i < spot->nreads; i++) {
+        if( spot->reads[i].seq == NULL ) {
+            rc = RC(rcSRA, rcFormatter, rcValidating, rcData, rcNotFound);
+            what = "sequence";
+        } else {
+            spot_len += spot->reads[i].seq->len;
+            if( spot->reads[i].qual == NULL ) {
+                rc = RC(rcSRA, rcFormatter, rcValidating, rcData, rcNotFound);
+                what = "quality";
+            }
+        }
+    }
+    if( rc == 0 ) {
+        if( spot->name == NULL || spot->name->len < 1 ) {
+            rc = RC(rcSRA, rcFormatter, rcValidating, rcData, rcEmpty);
+            what = "spot name";
+        } else {
+            rc = pstring_copy(&final->name, spot->name);
+        }
+    }
+    if( rc == 0 ) {
+        final->spot_group = NULL;
+        if( spot->barcode != NULL && spot->barcode->len > 0 ) {
+            if( self->barcode_read_id != ILLUMINAWRITER_READID_NONE ) {
+                rc = Experiment_FindReadInTable(self->config->experiment, self->barcode_read_id,
+                                                spot->barcode->data, &member_basecall, &final->spot_group);
+                if( GetRCState(rc) == rcNotFound ) {
+                    /* experiment knows nothing about this barcode, so may be they assigned membership themselves, reset */
+                    member_basecall = NULL;
+                    final->spot_group = NULL;
+                    rc = 0;
+                } else if( rc != 0 ) {
+                    what = "barcode";
+                }
+            }
+            if( final->spot_group == NULL ) {
+                /* reset back to file value */
+                final->spot_group = spot->barcode->data;
+            }
+            if( member_basecall == NULL && pstring_is_fasta(spot->barcode) ) {
+                /* keep original barcode from file if it is fasta */
+                member_basecall = spot->barcode->data;
+            }
+        }
+    }
+    if( rc == 0 ) {
+        final->adjust_last_read_len = false;
+        if( self->sequence_length != spot_len ) {
+            uint16_t barc_len = member_basecall ? strlen(member_basecall) : 0;
+            if ((self->sequence_length != (spot_len + barc_len))
+
+             || (self->barcode_read_id == ILLUMINAWRITER_READID_NONE))
+      /* Otherwise inject_barcode is set
+         and when it is inserted below, it uses read_seg[self->barcode_read_id].
+         I.e. barcode_read_id should be >= 0
+         while ILLUMINAWRITER_READID_NONE == -1 */
+
+            {
+                if( spot_len > self->sequence_length ) {
+                    what = "spot too long";
+                    rc = RC(rcSRA, rcFormatter, rcValidating, rcData, rcExcessive);
+                    PLOGERR(klogErr, (klogErr, rc,
+                        "cumulative length of reads data in file(s): $(l) is greater than"
+                        " spot length declared in experiment: $(e) in spot '$(spot)'",
+                        "l=%d,e=%u,spot=%.*s", spot_len, self->sequence_length,
+                        (uint32_t)spot->name->len, spot->name->data));
+                } else if( self->fixed_read_seg && (self->last_read->read_class & SRA_READ_TYPE_BIOLOGICAL) &&
+                           spot_len > (self->sequence_length - self->read_seg[self->nreads - 1].len) &&
+                           (self->barcode_read_id == ILLUMINAWRITER_READID_NONE ||
+                            self->sequence_length - spot_len != self->read_seg[self->barcode_read_id].len) ) {
+                    final->adjust_last_read_len = true;
+                } else {
+                    what = "spot too short";
+                    rc = RC(rcSRA, rcFormatter, rcValidating, rcData, rcInconsistent);
+                    PLOGERR(klogErr, (klogErr, rc,
+                        "cumulative length of reads data in file(s): $(l) is less than"
+                        " spot length declared in experiment: $(e), most probably $(x) is absent in spot '$(spot)'",
+                        "l=%d,e=%u,spot=%.*s,x=%s", spot_len, self->sequence_length,
+                        (uint32_t)spot->name->len, spot->name->data,
+                        (self->barcode_read_id == ILLUMINAWRITER_READID_NONE ||
+                         self->sequence_length - spot_len != self->read_seg[self->barcode_read_id].len) ? "mate-pair" : "barcode" ));
+                }
+            } else {
+                spot_len += barc_len;
+                inject_barcode = true;
+                DEBUG_MSG(3, ("barcode needs to be injected into spot data\n"));
+            }
+        }
+    }
+
+    /* prepare seq/qual/signal/noise/intensity */
+    pstring_clear(&final->seq);
+    pstring_clear(&final->qual);
+    pstring_clear(&final->noise);
+    pstring_clear(&final->intensity);
+    pstring_clear(&final->signal);
+    final->col_mask = ILLUMINAWRITER_COLMASK_READ | spot->qual_type;
+    for(flt_qty = i = 0; rc == 0 && i < spot->nreads; i++, flt_qty++) {
+        /* presence of seq and qual data is checked above */
+        if( (rc = pstring_concat(&final->seq, spot->reads[i].seq)) != 0 ) {
+            what = "sequence";
+            break;
+        } else if( (rc = pstring_concat(&final->qual, spot->reads[i].qual)) != 0 ) {
+            what = "quality";
+            break;
+        }
+        if( spot->reads[i].signal != NULL ) {
+            if( (rc = pstring_concat(&final->signal, spot->reads[i].signal)) != 0 ) {
+                what = "signal";
+                break;
+            }
+            final->col_mask |= ILLUMINAWRITER_COLMASK_SIGNAL; 
+        }
+        if( spot->reads[i].noise != NULL ) {
+            if( (rc = pstring_concat(&final->noise, spot->reads[i].noise)) != 0 ) {
+                what = "noise";
+                break;
+            }
+            final->col_mask |= ILLUMINAWRITER_COLMASK_NOISE; 
+        }
+        if( spot->reads[i].intensity != NULL ) {
+            if( (rc = pstring_concat(&final->intensity, spot->reads[i].intensity)) != 0 ) {
+                what = "intensity";
+                break;
+            }
+            final->col_mask |= ILLUMINAWRITER_COLMASK_INTENSITY; 
+        }
+        if( spot->reads[i].filter != NULL && i == 0 ) {
+            final->col_mask |= ILLUMINAWRITER_COLMASK_RDFILTER; 
+        } else if( ((final->col_mask & ILLUMINAWRITER_COLMASK_RDFILTER) && spot->reads[i].filter == NULL) ||
+                   (!(final->col_mask & ILLUMINAWRITER_COLMASK_RDFILTER) && spot->reads[i].filter != NULL) ) {
+            rc = RC(rcSRA, rcFormatter, rcValidating, rcData, rcInconsistent);
+            what = "read filter";
+            break;
+        }
+        if( spot->reads[i].filter != NULL ) {
+            final->filter[flt_qty] = *(spot->reads[i].filter);
+        }
+    }
+    if( rc == 0 &&
+        (final->qual.len / final->seq.len) != ((final->col_mask & ILLUMINAWRITER_COLMASK_QUALITY_LOGODDS4) ? 4 : 1) ) {
+        rc = RC(rcSRA, rcFormatter, rcValidating, rcData, rcInconsistent);
+        what = "quality length vs sequence";
+    }
+    if( rc == 0 &&
+        ((final->col_mask & ILLUMINAWRITER_COLMASK_SIGNAL) && (final->signal.len != self->sequence_length * 16)) ) {
+        rc = RC(rcSRA, rcFormatter, rcValidating, rcData, rcInconsistent);
+        what = "signal data length";
+    }
+    if( rc == 0 &&
+        ((final->col_mask & ILLUMINAWRITER_COLMASK_NOISE) && (final->noise.len != self->sequence_length * 16)) ) {
+        rc = RC(rcSRA, rcFormatter, rcValidating, rcData, rcInconsistent);
+        what = "noise data length";
+    }
+    if( rc == 0 &&
+        ((final->col_mask & ILLUMINAWRITER_COLMASK_INTENSITY) && (final->intensity.len != self->sequence_length * 16)) ) {
+        rc = RC(rcSRA, rcFormatter, rcValidating, rcData, rcInconsistent);
+        what = "intensity data length";
+    }
+
+    if( rc == 0 && inject_barcode ) {
+        /* insert barcode into spot data using read_seg information */
+        /* verified above to be present, to be fasta, and length as in XML */
+        INSDC_coord_zero from = self->read_seg[self->barcode_read_id].start;
+        INSDC_coord_len l = self->read_seg[self->barcode_read_id].len;
+        INSDC_coord_len carry = final->seq.len - from;
+        const uint32_t qual_x = ((final->col_mask & ILLUMINAWRITER_COLMASK_QUALITY_LOGODDS4) ? 4 : 1);
+        pstring tmp;
+
+        DEBUG_MSG(3, ("injecting barcodr as read %i [%i,%u] \n", self->barcode_read_id, from, l));
+        final->seq.len = from;
+        final->qual.len = from * qual_x;
+        if( (rc = pstring_assign(&tmp, &final->seq.data[final->seq.len], carry)) != 0 ||
+            (rc = pstring_append(&final->seq, member_basecall, l)) != 0 ||
+            (rc = pstring_concat(&final->seq, &tmp)) != 0 ) {
+            what = "inserting barcode into sequence";
+        } else if( (rc = pstring_assign(&tmp, &final->qual.data[final->qual.len], carry * qual_x)) != 0 ||
+                   (rc = pstring_append_chr(&final->qual, 1, l * qual_x)) != 0 ||
+                   (rc = pstring_concat(&final->qual, &tmp)) != 0 ) {
+            what = "inserting barcode into quality";
+        }
+        if( rc == 0 && (final->col_mask & ILLUMINAWRITER_COLMASK_SIGNAL) ) {
+            final->signal.len = from * 16;
+            if( (rc = pstring_assign(&tmp, &final->signal.data[final->signal.len], carry * 16)) != 0 ||
+                (rc = pstring_append_chr(&final->signal, 0, l * 16)) != 0 ||
+                (rc = pstring_concat(&final->signal, &tmp)) != 0 ) {
+                what = "inserting barcode into signal";
+            }
+        }
+        if( rc == 0 && (final->col_mask & ILLUMINAWRITER_COLMASK_INTENSITY) ) {
+            final->intensity.len = from * 16;
+            if( (rc = pstring_assign(&tmp, &final->intensity.data[final->intensity.len], carry * 16)) != 0 ||
+                (rc = pstring_append_chr(&final->intensity, 0, l * 16)) != 0 ||
+                (rc = pstring_concat(&final->intensity, &tmp)) != 0 ) {
+                what = "inserting barcode into intensity";
+            }
+        }
+        if( rc == 0 && (final->col_mask & ILLUMINAWRITER_COLMASK_NOISE) ) {
+            final->noise.len = from * 16;
+            if( (rc = pstring_assign(&tmp, &final->noise.data[final->noise.len], carry * 16)) != 0 ||
+                (rc = pstring_append_chr(&final->noise, 0, l * 16)) != 0 ||
+                (rc = pstring_concat(&final->noise, &tmp)) != 0 ) {
+                what = "inserting barcode into noise";
+            }
+        }
+        for(i = flt_qty - 1; rc == 0 && i >= self->barcode_read_id; i--) {
+            final->filter[i + 1] = final->filter[i];
+        }
+        final->filter[self->barcode_read_id] = final->filter[0];
+        flt_qty++;
+    }
+    /* propogate filter value in case number of reads in files is less than in XML */
+    for(i = flt_qty; rc == 0 && i < self->nreads; i++) {
+        final->filter[i] = final->filter[0];
+    }
+
+#if _DEBUGGING
+    DEBUG_MSG(3, ("Ready: READ: %s\n", final->seq.data));
+    DEBUG_MSG(3, ("Ready: QUAL%c:", (final->col_mask & ILLUMINAWRITER_COLMASK_QUALITY_LOGODDS4) ? '4' : '1'));
+    for(i = 0; i < final->qual.len; i++ ) {
+        DEBUG_MSG(3, (" %i", final->qual.data[i]));
+    }
+    DEBUG_MSG(3, ("\nReady: SGRUP: %s\n", final->spot_group));
+    for(i = 0; i < self->nreads; i++ ) {
+        DEBUG_MSG(3, ("Ready: READ_FLT[%u]: %s\n", i, final->filter[i] == SRA_READ_FILTER_PASS ? "PASS" : "REJECT"));
+    }
+#endif
+    if( rc != 0 && rc != KLogLastErrorCode() ) {
+        PLOGERR(klogErr, (klogErr, rc, "$(msg) in spot '$(spot)'", "msg=%s,spot=%.*s", what, spot->name->len, spot->name->data));
+    }
+    return rc;
+}
+
+rc_t SRAWriterIllumina_Write(const SRAWriterIllumina* cself, const SRALoaderFile* data_block_ref, IlluminaSpot* spot)
+{
+    rc_t rc = 0;
+    SRAWriterIllumina* self =(SRAWriterIllumina*)cself;
+    IlluminaWriterSpot final;
+    
+    assert(self != NULL);
+    assert(data_block_ref != NULL);
+
+    DEBUG_MSG(3, ("spot name '%s', group '%s'\n", spot->name->data, spot->barcode ? spot->barcode->data : NULL));
+
+    if( (rc = SRAWriterIllumina_Check(self, spot, &final)) != 0 ) {
+        return rc;
+    }
+    if( self->col_mask == ILLUMINAWRITER_COLMASK_NOTSET ) {
+        const char* schema;
+
+        if( final.col_mask & ILLUMINAWRITER_COLMASK_QUALITY_LOGODDS4 ) {
+            schema = "NCBI:SRA:Illumina:tbl:q4:v2";
+        } else if( final.col_mask & ILLUMINAWRITER_COLMASK_QUALITY_LOGODDS1 ) {
+            schema = "NCBI:SRA:Illumina:tbl:q1:v2";
+        } else if( final.col_mask & ILLUMINAWRITER_COLMASK_QUALITY_PHRED ) {
+            schema = "NCBI:SRA:Illumina:tbl:phred:v2";
+        } else {
+            rc = RC(rcExe, rcTable, rcCreating, rcType, rcUnknown);
+            return rc;
+        }
+        if( (rc = SRAWriter_CreateTable(self->base, schema)) != 0 ) {
+            return rc;
+        }
+        if( (rc = SRAWriter_WriteDefaults(self->base)) != 0 ) {
+            LOGERR(klogInt, rc, "failed to write table defaults");
+            return rc;
+        }
+        COL_OPEN(self->ci_name, "NAME", vdb_ascii_t);
+        COL_OPEN(self->ci_read, "READ", insdc_fasta_t);
+        if( final.col_mask & ILLUMINAWRITER_COLMASK_QUALITY_LOGODDS4 ) {
+            COL_OPEN(self->ci_qual, "QUALITY", ncbi_qual4_t);
+        } else if( final.col_mask & ILLUMINAWRITER_COLMASK_QUALITY_LOGODDS1 ) {
+            COL_OPEN(self->ci_qual, "QUALITY", insdc_logodds_t);
+        } else if( final.col_mask & ILLUMINAWRITER_COLMASK_QUALITY_PHRED ) {
+            COL_OPEN(self->ci_qual, "QUALITY", insdc_phred_t);
+        }
+        if( final.col_mask & ILLUMINAWRITER_COLMASK_SIGNAL ) {
+            COL_OPEN(self->ci_signal, "SIGNAL", ncbi_fsamp4_t);
+        }
+        if( final.col_mask & ILLUMINAWRITER_COLMASK_NOISE ) {
+            COL_OPEN(self->ci_noise, "NOISE", ncbi_fsamp4_t);
+        }
+        if( final.col_mask & ILLUMINAWRITER_COLMASK_INTENSITY ) {
+            COL_OPEN(self->ci_intensity, "INTENSITY", ncbi_fsamp4_t);
+        }
+        if( final.col_mask & ILLUMINAWRITER_COLMASK_RDFILTER ) {
+            COL_OPEN(self->ci_read_filter, "READ_FILTER", sra_read_filter_t);
+        }
+        self->col_mask = final.col_mask;
+    }
+    if( self->col_mask != final.col_mask ) {
+        rc = RC(rcSRA, rcFormatter, rcReading, rcData, rcInconsistent);
+        LOGERR(klogInt, rc, "columns do not match to 1st spot");
+        return rc;
+    }
+    if( (rc = SRAWriter_NewSpot(self->base, NULL)) != 0 ) {
+        return rc;
+    }
+    COL_WRITE(self->ci_name, "NAME", final.name);
+    COL_WRITE(self->ci_read, "READ", final.seq);
+    COL_WRITE(self->ci_qual, "QUALITY", final.qual);
+    COL_WRITE(self->ci_noise, "NOISE", final.noise);
+    COL_WRITE(self->ci_intensity, "INTENSITY", final.intensity);
+    COL_WRITE(self->ci_signal, "SIGNAL", final.signal);
+
+    if( self->fixed_read_seg ) {
+        uint16_t tmp = 0;
+        if( final.adjust_last_read_len ) {
+            tmp = cself->read_seg[cself->nreads - 1].len;
+            self->read_seg[cself->nreads - 1].len -= cself->sequence_length - final.seq.len;
+        }
+        if( (rc = SRAWriter_WriteSpotSegmentSimple(self->base, data_block_ref, final.spot_group, cself->read_seg)) != 0 ) {
+            PLOGERR(klogErr, (klogErr, rc, "failed to write $(column) column", "column=SPOT_GROUP/READ_SEG"));
+            return rc;
+        }
+        if( final.adjust_last_read_len ) {
+            self->read_seg[cself->nreads - 1].len = tmp;
+        }
+    } else {
+        if( (rc = SRAWriter_WriteSpotSegment(self->base, data_block_ref, final.spot_group, final.seq.len, final.seq.data)) != 0 ) {
+            PLOGERR(klogErr, (klogErr, rc, "failed to write $(column) column", "column=SPOT_GROUP/READ_SEG"));
+            return rc;
+        }
+    }
+    if( self->ci_read_filter != 0 ) {
+        rc = SRAWriter_WriteIdxColumn(self->base, self->ci_read_filter, final.filter, self->nreads * sizeof(final.filter[0]), false);
+        if(rc) {
+            PLOGERR(klogInt, (klogInt, rc, "failed to write $(column) column", "column=READ_FILTER"));
+            return rc;
+        }
+    }
+    return SRAWriter_CloseSpot(self->base);
+}
diff --git a/tools/sra-load/writer-illumina.h b/tools/sra-load/writer-illumina.h
new file mode 100644
index 0000000..ca7eae5
--- /dev/null
+++ b/tools/sra-load/writer-illumina.h
@@ -0,0 +1,92 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _sra_load_writer_illumina_
+#define _sra_load_writer_illumina_
+
+#include "loader-fmt.h"
+#include "pstring.h"
+
+#define ILLUMINAWRITER_MAX_NUM_READS 5
+/* these readids have special meaning,
+ * from file we can get only single digit positive readid so they never overlap
+ * readid == -1 from file means no read id was found, must be whole spot data or single read submission
+ */
+#define ILLUMINAWRITER_READID_NONE -1
+
+#define ILLUMINAWRITER_COLMASK_NOTSET 0x00
+#define ILLUMINAWRITER_COLMASK_READ 0x01
+#define ILLUMINAWRITER_COLMASK_QUALITY_PHRED 0x02
+#define ILLUMINAWRITER_COLMASK_QUALITY_LOGODDS1 0x04
+#define ILLUMINAWRITER_COLMASK_QUALITY_LOGODDS4 0x08
+#define ILLUMINAWRITER_COLMASK_SIGNAL 0x10
+#define ILLUMINAWRITER_COLMASK_NOISE 0x20
+#define ILLUMINAWRITER_COLMASK_INTENSITY 0x40
+#define ILLUMINAWRITER_COLMASK_RDFILTER 0x80
+
+
+typedef struct IlluminaRead_struct {
+    int16_t read_id;
+    pstring seq;
+    int qual_type;
+    pstring qual;
+    pstring noise;
+    pstring intensity;
+    pstring signal;
+    SRAReadFilter filter;
+} IlluminaRead;
+
+void IlluminaRead_Init(IlluminaRead* read, bool name_only);
+
+typedef struct IlluminaSpot_struct {
+    const pstring* name;
+    const pstring* barcode;
+    int32_t nreads;
+    int qual_type;
+    struct {
+        int16_t read_id;
+        const pstring* seq;
+        const pstring* qual;
+        const pstring* noise;
+        const pstring* intensity;
+        const pstring* signal;
+        const SRAReadFilter* filter;
+    } reads[ILLUMINAWRITER_MAX_NUM_READS];
+} IlluminaSpot;
+
+void IlluminaSpot_Init(IlluminaSpot* spot);
+
+rc_t IlluminaSpot_Add(IlluminaSpot* spot, const pstring* name, const pstring* barcode, const IlluminaRead* read);
+
+
+typedef struct SRAWriterIllumina SRAWriterIllumina;
+
+rc_t SRAWriterIllumina_Make(const SRAWriterIllumina** cself, const SRALoaderConfig* config);
+
+void SRAWriterIllumina_Whack(const SRAWriterIllumina* cself, SRATable** table);
+
+rc_t SRAWriterIllumina_Write(const SRAWriterIllumina* cself, const SRALoaderFile* data_block_ref, IlluminaSpot* spot);
+
+#endif /* _sra_load_writer_illumina_ */
diff --git a/tools/sra-load/writer-ion-torrent.c b/tools/sra-load/writer-ion-torrent.c
new file mode 100644
index 0000000..174020c
--- /dev/null
+++ b/tools/sra-load/writer-ion-torrent.c
@@ -0,0 +1,262 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <sra/types.h>
+#include <insdc/insdc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <ctype.h>
+#include <assert.h>
+
+#include "debug.h"
+#include "writer-ion-torrent.h"
+#include "sra-writer.h"
+
+struct SRAWriterIonTorrent {
+    SRAWriter* base;
+    pstring flows;
+    uint32_t flow_count;
+    pstring keys;
+
+    uint32_t ci_flowc;
+    uint32_t ci_keys;
+    uint32_t ci_name;
+    uint32_t ci_read;
+    uint32_t ci_qual;
+    uint32_t ci_signal;
+    uint32_t ci_position;
+    uint32_t ci_q_left;
+    uint32_t ci_q_right;
+    uint32_t ci_a_left;
+    uint32_t ci_a_right;
+};
+
+rc_t SRAWriterIonTorrent_Make(const SRAWriterIonTorrent** cself, const SRALoaderConfig* config)
+{
+    rc_t rc = 0;
+    SRAWriterIonTorrent* self;
+    const PlatformXML* platform;
+
+    if( cself == NULL || config == NULL ) {
+        return RC(rcSRA, rcFormatter, rcConstructing, rcParam, rcNull);
+    }
+    if( (rc = Experiment_GetPlatform(config->experiment, &platform)) != 0 ) {
+        return rc;
+    }
+    if( platform->id != SRA_PLATFORM_ION_TORRENT ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcData, rcInvalid);
+        LOGERR(klogErr, rc, "platform type");
+        return rc;
+    }
+    self = calloc(1, sizeof(*self));
+    if( self == NULL ) {
+        rc = RC(rcSRA, rcFormatter, rcConstructing, rcMemory, rcExhausted);
+    } else if( (rc = SRAWriter_Make(&self->base, config)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to initialize base writer");
+    } else {
+        if( platform->param.ion_torrent.flow_sequence != NULL ) {
+            rc = pstring_assign(&self->flows, platform->param.ion_torrent.flow_sequence,
+                                       strlen(platform->param.ion_torrent.flow_sequence));
+        }
+        if( rc == 0 && platform->param.ion_torrent.key_sequence != NULL ) {
+            rc = pstring_assign(&self->keys, platform->param.ion_torrent.key_sequence,
+                                      strlen(platform->param.ion_torrent.key_sequence));
+        }
+        self->flow_count = platform->param.ion_torrent.flow_count;
+    }
+    if( rc == 0 ) {
+        *cself = self;
+    } else {
+        SRAWriterIonTorrent_Whack(self, NULL);
+    }
+    return rc;
+}
+
+void SRAWriterIonTorrent_Whack(const SRAWriterIonTorrent* cself, SRATable** table)
+{
+    if( cself != NULL ) {
+        SRAWriterIonTorrent* self = (SRAWriterIonTorrent*)cself;
+        SRAWriter_Whack(self->base, table);
+        free(self);
+    }
+}
+
+static
+rc_t SRAWriterIonTorrent_Open(const SRAWriterIonTorrent* cself, bool sig_and_pos)
+{
+    rc_t rc = 0;
+    SRAWriterIonTorrent* self = (SRAWriterIonTorrent*)cself;
+
+    if( cself->ci_name == 0 ) {
+        INSDC_coord_one d = 0;
+        pstring x;
+
+        if( (rc = SRAWriter_CreateTable(self->base, "NCBI:SRA:IonTorrent:tbl:v2")) != 0 ) {
+            return rc;
+        }
+        if( (rc = SRAWriter_WriteDefaults(self->base)) != 0 ) {
+            LOGERR(klogInt, rc, "failed to write table defaults");
+            return rc;
+        }
+        COL_OPEN(self->ci_name, "NAME", vdb_ascii_t);
+        COL_OPEN(self->ci_read, "READ", insdc_fasta_t);
+        COL_OPEN(self->ci_qual, "QUALITY", insdc_phred_t);
+        COL_OPEN(self->ci_q_left, "CLIP_QUALITY_LEFT", "INSDC:coord:one");
+        COL_OPEN(self->ci_q_right, "CLIP_QUALITY_RIGHT", "INSDC:coord:one");
+        COL_OPEN(self->ci_a_left, "CLIP_ADAPTER_LEFT", "INSDC:coord:one");
+        COL_OPEN(self->ci_a_right, "CLIP_ADAPTER_RIGHT", "INSDC:coord:one");
+        COL_OPEN(self->ci_flowc, "FLOW_CHARS", insdc_fasta_t);
+        COL_OPEN(self->ci_keys, "KEY_SEQUENCE", insdc_fasta_t);
+
+        COL_WRITE_DEFAULT(self->ci_flowc, "FLOW_CHARS", self->flows);
+        COL_WRITE_DEFAULT(self->ci_keys, "KEY_SEQUENCE", self->keys);
+        if( (rc = pstring_assign(&x, &d, sizeof(d))) == 0 ) {
+            COL_WRITE_DEFAULT(self->ci_q_left, "CLIP_QUALITY_LEFT", x);
+            COL_WRITE_DEFAULT(self->ci_q_right, "CLIP_QUALITY_RIGHT", x);
+            COL_WRITE_DEFAULT(self->ci_a_left, "CLIP_ADAPTER_LEFT", x);
+            COL_WRITE_DEFAULT(self->ci_a_right, "CLIP_ADAPTER_RIGHT", x);
+        }
+    }
+    if( sig_and_pos && (cself->ci_signal == 0 || cself->ci_position == 0) ) {
+        COL_OPEN(self->ci_signal, "SIGNAL", ncbi_isamp1_t);
+        COL_OPEN(self->ci_position, "POSITION", "INSDC:position:one");
+    }
+    return rc;
+}
+
+rc_t SRAWriterIonTorrent_WriteHead(const SRAWriterIonTorrent* cself, const pstring* flow_chars, const pstring* key_sequence)
+{
+    rc_t rc = 0;
+
+    if( (rc = SRAWriterIonTorrent_Open(cself, false)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to create table");
+        return rc;
+    }
+    if( flow_chars && flow_chars->len != 0 ) {
+        if( cself->flows.len != 0 && pstring_cmp(&cself->flows, flow_chars) != 0 ) {
+            PLOGMSG(klogWarn, (klogWarn, "file FLOW_SEQUENCE do not match experiment: $(s)", PLOG_S(s), flow_chars->data));
+        }
+        /* update flow_count so signal data length will match below */
+        ((SRAWriterIonTorrent*)cself)->flow_count = flow_chars->len;
+        COL_WRITE_DEFAULT(cself->ci_flowc, "FLOW_CHARS", (*flow_chars));
+    }
+    if( key_sequence && key_sequence->len != 0 ) {
+        if( cself->keys.len != 0 && pstring_cmp(&cself->keys, key_sequence) != 0 ) {
+            PLOGMSG(klogWarn, (klogWarn, "file KEY_SEQUENCE do not match experiment: $(s)", PLOG_S(s), key_sequence->data));
+        }
+        COL_WRITE_DEFAULT(cself->ci_keys, "KEY_SEQUENCE", (*key_sequence));
+    }
+    return 0;
+}
+
+rc_t SRAWriterIonTorrent_WriteRead(const SRAWriterIonTorrent* cself, const SRALoaderFile* data_block_ref,
+                            const pstring* name, const pstring* sequence, const pstring* quality,
+                            const pstring* signal, const pstring* position,
+                            INSDC_coord_one q_left, INSDC_coord_one q_right,
+                            INSDC_coord_one a_left, INSDC_coord_one a_right)
+{
+    rc_t rc = 0;
+    SRAWriterIonTorrent* self =(SRAWriterIonTorrent*)cself;
+    
+    assert(self != NULL);
+    assert(data_block_ref != NULL);
+
+    DEBUG_MSG(3, ("spot name '%s'\n", name ? name->data : NULL));
+
+    if( (rc = SRAWriterIonTorrent_Open(cself, signal || position)) != 0 ) {
+        LOGERR(klogInt, rc, "failed to open table");
+        return rc;
+    }
+    if( !name || name->len == 0 ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcEmpty);
+        LOGERR(klogErr, rc, "spot name");
+    }
+    if( !sequence || sequence->len == 0 ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcEmpty);
+        LOGERR(klogErr, rc, "sequence");
+    } else if( !quality || sequence->len != quality->len ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, quality ? rcInconsistent : rcEmpty);
+        LOGERR(klogErr, rc, "quality");
+    }
+    if( signal && signal->len / self->flow_count != sizeof(uint16_t) ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+        LOGERR(klogErr, rc, "signal and flow chars");
+    }
+    if( position && position->len / sequence->len != sizeof(INSDC_position_one) ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+        LOGERR(klogErr, rc, "sequence and position");
+    }
+    if( q_left < 0 || (sequence && q_left > sequence->len) ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+        LOGERR(klogErr, rc, "clip quality left and sequence");
+    }
+    if( q_right < 0 || (sequence && q_right > sequence->len) ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+        LOGERR(klogErr, rc, "clip quality right and sequence");
+    }
+    if( a_left < 0 || (sequence && a_left > sequence->len) ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+        LOGERR(klogErr, rc, "clip adapter left and sequence");
+    }
+    if( a_right < 0 || (sequence && a_right > sequence->len) ) {
+        rc = RC(rcSRA, rcFormatter, rcWriting, rcData, rcInconsistent);
+        LOGERR(klogErr, rc, "clip adapter right and sequence");
+    }
+    if( rc != 0 || (rc = SRAWriter_NewSpot(self->base, NULL)) != 0 ) {
+        return rc;
+    }
+    COL_WRITE(self->ci_name, "NAME", (*name));
+    COL_WRITE(self->ci_read, "READ", (*sequence));
+    COL_WRITE(self->ci_qual, "QUALITY", (*quality));
+    COL_WRITE(self->ci_signal, "SIGNAL", (*signal));
+    COL_WRITE(self->ci_position, "POSITION", (*position));
+
+    if( (rc = SRAWriter_WriteIdxColumn(self->base, self->ci_q_left, &q_left, sizeof(q_left), false)) != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to write $(column) column", "column=CLIP_QUALITY_LEFT"));
+        return rc;
+    }
+    if( (rc = SRAWriter_WriteIdxColumn(self->base, self->ci_q_right, &q_right, sizeof(q_right), false)) != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to write $(column) column", "column=CLIP_QUALITY_RIGHT"));
+        return rc;
+    }
+    if( (rc = SRAWriter_WriteIdxColumn(self->base, self->ci_a_left, &a_left, sizeof(a_left), false)) != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to write $(column) column", "column=CLIP_ADAPTER_LEFT"));
+        return rc;
+    }
+    if( (rc = SRAWriter_WriteIdxColumn(self->base, self->ci_a_right, &a_right, sizeof(a_right), false)) != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to write $(column) column", "column=CLIP_ADAPTER_RIGHT"));
+        return rc;
+    }
+    if( (rc = SRAWriter_WriteSpotSegment(self->base, data_block_ref, NULL, sequence->len, sequence->data)) != 0 ) {
+        PLOGERR(klogErr, (klogErr, rc, "failed to write $(column) column", "column=SPOT_GROUP/READ_SEG"));
+        return rc;
+    }
+    return SRAWriter_CloseSpot(self->base);
+}
diff --git a/tools/sra-load/writer-ion-torrent.h b/tools/sra-load/writer-ion-torrent.h
new file mode 100644
index 0000000..004e443
--- /dev/null
+++ b/tools/sra-load/writer-ion-torrent.h
@@ -0,0 +1,46 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _sra_load_writer_ion_torrent_
+#define _sra_load_writer_ion_torrent_
+
+#include "loader-fmt.h"
+#include "pstring.h"
+
+typedef struct SRAWriterIonTorrent SRAWriterIonTorrent;
+
+rc_t SRAWriterIonTorrent_Make(const SRAWriterIonTorrent** cself, const SRALoaderConfig* config);
+
+void SRAWriterIonTorrent_Whack(const SRAWriterIonTorrent* cself, SRATable** table);
+
+rc_t SRAWriterIonTorrent_WriteHead(const SRAWriterIonTorrent* cself, const pstring* flow_chars, const pstring* key_sequence);
+
+rc_t SRAWriterIonTorrent_WriteRead(const SRAWriterIonTorrent* cself, const SRALoaderFile* data_block_ref,
+                            const pstring* name, const pstring* sequence, const pstring* quality,
+                            const pstring* signal, const pstring* position,
+                            INSDC_coord_one q_left, INSDC_coord_one q_right,
+                            INSDC_coord_one a_left, INSDC_coord_one a_right);
+
+#endif /* _sra_load_writer_ion_torrent_ */
diff --git a/tools/sra-load/ztr-absolid.c b/tools/sra-load/ztr-absolid.c
new file mode 100644
index 0000000..8ef2e56
--- /dev/null
+++ b/tools/sra-load/ztr-absolid.c
@@ -0,0 +1,656 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <endian.h>
+#include <byteswap.h>
+#include <assert.h>
+
+#include "ztr-absolid.h"
+#include "debug.h"
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#define BE2H16(X) (bswap_16(X))
+#define BE2H32(X) (bswap_32(X))
+#else
+#define BE2H16(X) (X)
+#define BE2H32(X) (X)
+#endif
+
+struct ZTR_Context {
+    int versMajor;
+    int versMinor;
+    size_t current, buflen;
+    const uint8_t *buf;
+};
+
+#define METANAME_COMP strcmp
+
+static size_t strendlen(const char *src, const char *end) {
+    size_t n = 0;
+    
+    while (*src && src != end) {
+        ++src;
+        ++n;
+    }
+    return n;
+}
+
+static int count_pairs(const char *src, uint32_t len) {
+    int i, j;
+    
+    for (j = i = 0; i != len; ++i) {
+        if (*src++ == 0)
+            ++j;
+    }
+    return j >> 1;
+}
+
+#if 0
+static const char *meta_getValueForName(const nvp_t *meta, int count, const char *name) {
+    int i;
+    
+    for (i = 0; i != count; ++i) {
+        if (meta[i].name != NULL && METANAME_COMP(meta[i].name, name) == 0)
+            return meta[i].value;
+    }
+    return NULL;
+}
+#endif
+
+static const char *meta_getValueForNameAndRemove(nvp_t *meta, int count, const char *name) {
+    int i;
+    
+    for (i = 0; i != count; ++i) {
+        if (meta[i].name != NULL && METANAME_COMP(meta[i].name, name) == 0) {
+            meta[i].name = NULL;
+            return meta[i].value;
+        }
+    }
+    return NULL;
+}
+
+static void parse_meta(nvp_t *meta, int count, const char *metadata, const char *end) {
+    int i, j;
+    
+    for (i = 0; i != count && metadata <= end; ++i) {
+        j = strendlen(metadata, end);
+        if (j == 0)
+            break;
+        meta[i].name = metadata;
+        metadata += j; ++metadata;
+        meta[i].value = metadata;
+        metadata += strendlen(metadata, end); ++metadata;
+    }
+}
+
+bool ABI_ZTR_BufferIsEmpty(const ZTR_Context *ctx) {
+	return (ctx->buf == NULL || ctx->buflen == 0 || ctx->current == ctx->buflen) ? true : false;
+}
+
+static int isZTRchunk(const uint8_t type[4]) {
+  static const char *types[] = {
+    "BASE",
+    "BPOS",
+    "CLIP",
+    "CNF1",
+    "CNF4",
+    "COMM",
+    "CR32",
+    "HUFF",
+    "REGN",
+    "SAMP",
+    "SMP4",
+    "TEXT"
+  };
+  int i;
+
+  for (i = 0; i != sizeof(types) / sizeof(types[0]); ++i)
+    if (*(const uint32_t *)type == *(const uint32_t *)types[i])
+      return 1;
+  
+  return 0;
+}
+
+rc_t ABI_ZTR_ParseBlock(ZTR_Context *ctx, ztr_raw_t *ztr_raw) {
+  assert(ctx);
+  assert(ztr_raw);
+    
+  memset(ztr_raw, 0, sizeof(*ztr_raw));
+	
+  if (ABI_ZTR_BufferIsEmpty(ctx))
+    return RC ( rcSRA, rcFormatter, rcParsing, rcData, rcEmpty );
+	
+  if (ctx->current + 4 > ctx->buflen)
+    return RC ( rcSRA, rcFormatter, rcParsing, rcData, rcInsufficient );
+
+  *(uint32_t *)(ztr_raw->type) = *(uint32_t *)(ctx->buf + ctx->current);
+  ctx->current += 4;
+  if (ctx->current + 4 >= ctx->buflen)
+    return RC ( rcSRA, rcFormatter, rcParsing, rcData, rcInsufficient );
+  if (!isZTRchunk(ztr_raw->type))
+    return RC(rcSRA, rcFormatter, rcParsing, rcData, rcCorrupt);
+
+  ztr_raw->metalength = BE2H32(*(uint32_t *)(ctx->buf + ctx->current));
+  ctx->current += 4;
+  if (ztr_raw->metalength != 0) {
+    if (ctx->current + ztr_raw->metalength > ctx->buflen)
+      return RC ( rcSRA, rcFormatter, rcParsing, rcData, rcCorrupt );
+
+    ztr_raw->meta = ctx->buf + ctx->current;
+    ctx->current += ztr_raw->metalength;
+    if (memchr(ztr_raw->meta, 0, ztr_raw->metalength) == NULL)
+      return RC ( rcSRA, rcFormatter, rcParsing, rcData, rcCorrupt );
+  }
+  if (ctx->current + 4 > ctx->buflen)
+    return RC ( rcSRA, rcFormatter, rcParsing, rcData, rcInsufficient );
+
+  ztr_raw->datalength = BE2H32(*(uint32_t *)(ctx->buf + ctx->current));
+  ctx->current += 4;
+  if (ztr_raw->datalength != 0) {
+    if (ctx->current + ztr_raw->datalength > ctx->buflen)
+      return RC ( rcSRA, rcFormatter, rcParsing, rcData, rcCorrupt );
+
+    ztr_raw->data = ctx->buf + ctx->current;
+    ctx->current += ztr_raw->datalength;
+  }
+  return 0;
+}
+
+#if ZTR_USE_EXTRA_META
+rc_t ABI_ZTR_ProcessBlock(ZTR_Context *ctx, const ztr_raw_t *ztr_raw, ztr_t *dst, enum ztr_chunk_type *chunkType, nvp_t **extraMeta, int *extraMetaCount)
+#else
+rc_t ABI_ZTR_ProcessBlock(ZTR_Context *ctx, const ztr_raw_t *ztr_raw, ztr_t *dst, enum ztr_chunk_type *chunkType)
+#endif
+{
+    rc_t rc;
+    const uint8_t *ptype;
+    uint8_t format;
+    size_t metasize, datasize;
+    const uint8_t *data;
+    const char *metadata;
+    int count;
+    enum ztr_chunk_type type;
+    enum ztr_data_type datatype = i8;
+    nvp_t *meta = NULL;
+    ztr_t ztr;
+	int padded = 0;
+
+    assert(ctx);
+    assert(ztr_raw);
+    assert(dst);
+    assert(chunkType);
+
+    *chunkType = none;
+    *(void **)dst = NULL;
+    *(void **)&ztr = NULL;
+
+    ptype = ztr_raw->type;
+    count = 0;
+    metasize = ztr_raw->metalength;
+    if (metasize != 0) {
+        metadata = (char *)ztr_raw->meta;
+        assert(metadata);
+        count = count_pairs(metadata, metasize);
+        if (count < 0)
+            return RC ( rcSRA, rcFormatter, rcParsing, rcData, rcCorrupt );
+		if (count != 0) {
+			meta = malloc(sizeof(*meta) * count);
+			if (meta == NULL)
+				return RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+
+			parse_meta(meta, count, metadata, metadata + metasize);
+		}
+		else
+			meta = NULL;
+    }
+    
+    if (memcmp(ptype, "BASE", 4) == 0) {
+        type = BASE;
+        datatype = i8;
+		padded = 1;
+    }
+    else if (memcmp(ptype, "BPOS", 4) == 0) {
+        type = BPOS;
+        datatype = i32;
+		padded = 1;
+    }
+    else if (memcmp(ptype, "CLIP", 4) == 0) {
+        type = CLIP;
+        datatype = i32;
+    }
+    else if (memcmp(ptype, "CNF1", 4) == 0) {
+        type = CNF1;
+        datatype = i8;
+		padded = 1;
+    }
+    else if (memcmp(ptype, "CNF4", 4) == 0) {
+        type = CNF4;
+        datatype = i8;
+		padded = 1;
+    }
+    else if (memcmp(ptype, "COMM", 4) == 0) {
+        type = COMM;
+    }
+    else if (memcmp(ptype, "CR32", 4) == 0) {
+        type = CR32;
+        datatype = i32;
+    }
+    else if (memcmp(ptype, "HUFF", 4) == 0) {
+        type = HUFF;
+    }
+    else if (memcmp(ptype, "REGN", 4) == 0) {
+        type = REGN;
+        datatype = i32;
+    }
+    else if (memcmp(ptype, "SAMP", 4) == 0) {
+        type = SAMP;
+        datatype = i16;
+		padded = 1;
+    }
+    else if (memcmp(ptype, "SMP4", 4) == 0) {
+        type = SMP4;
+        datatype = i16v4;
+		padded = 1;
+    }
+    else if (memcmp(ptype, "TEXT", 4) == 0) {
+        type = TEXT;
+    }
+    else {
+        type = unknown;
+        DEBUG_MSG(1, ("$(func) - '$(type)' chunk unrecognized", "func=ZTR_ProcessBlock,type=%.*s\n", 4, & ztr_raw->type ));
+    }
+    {
+        metadata = meta_getValueForNameAndRemove(meta, count, "VALTYPE");
+        
+        if (metadata != NULL) {
+            if (strcmp(metadata, "16 bit integer") == 0)
+                datatype = i16;
+            else if (strcmp(metadata, "32 bit integer") == 0)
+                datatype = i32;
+            else if (strcmp(metadata, "32 bit IEEE float") == 0)
+                datatype = f32;
+            else if (strcmp(metadata, "64 bit IEEE float") == 0)
+                datatype = f64;
+        }
+    }
+    datasize = ztr_raw->datalength;
+    if (datasize == 0)
+        data = NULL;
+    else
+    {
+		static const char zero[8];
+		
+        data = ztr_raw->data;
+        assert(data);
+        format = *data;
+		switch (format) {
+			case 0:
+				if (padded) {
+					switch (datatype) {
+						case i16:
+						case i16v4:
+							if (memcmp(data, zero, 2) == 0)
+								padded = 2;
+							break;
+						case i32:
+						case f32:
+							if (memcmp(data, zero, 4) == 0)
+								padded = 4;
+							break;
+						case f64:
+							if (memcmp(data, zero, 8) == 0)
+								padded = 8;
+							break;
+						default:
+							break;
+					}
+					data += padded;
+					datasize -= padded;
+				}
+				else {
+					data += 1;
+					datasize -= 1;
+				}
+				break;
+			default:
+				rc = RC ( rcSRA, rcFormatter, rcParsing, rcData, rcUnexpected );
+				PLOGERR ( klogWarn, ( klogWarn, rc,
+                                                      "$(func) - '$(type)' unexpected ZTR chunk format '$(format)'",
+                                                      "func=ZTR_ProcessBlock,type=%.*s,format=%02X", 4,
+                                                      & ztr_raw->type, format ));
+				return rc;
+				break;
+		}
+    }
+	
+    switch (type) {
+        case BASE:
+            ztr.sequence = malloc(sizeof(*ztr.sequence));
+            if (ztr.sequence == NULL)
+                return RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+
+            *chunkType = type;
+            ztr.sequence->datatype = datatype;
+            ztr.sequence->datasize = datasize;
+            ztr.sequence->charset = (char *)meta_getValueForNameAndRemove(meta, count, "CSET");
+            ztr.sequence->data = (uint8_t *)data;
+            break;
+        case BPOS:
+            ztr.position = malloc(sizeof(*ztr.position));
+            if (ztr.position == NULL)
+                return RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+            
+            *chunkType = type;
+            ztr.position->datatype = datatype;
+            ztr.position->datasize = datasize;
+            ztr.position->data = (uint8_t *)data;
+            break;
+        case CLIP:
+            ztr.clip = malloc(sizeof(ztr.clip));
+            if (ztr.clip == NULL)
+                return RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+            
+            *chunkType = type;
+            ztr.clip->left  = (((((data[0] << 8) | data[1]) << 8) | data[2]) << 8) | data[3];
+            ztr.clip->right = (((((data[4] << 8) | data[5]) << 8) | data[6]) << 8) | data[7];
+            break;
+        case CNF1:
+            ztr.quality1 = malloc(sizeof(*ztr.quality1));
+            if (ztr.quality1 == NULL)
+                return RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+            
+            *chunkType = type;
+            ztr.quality1->datatype = datatype;
+            ztr.quality1->datasize = datasize;
+            if ((ztr.quality1->scale = (char *)meta_getValueForNameAndRemove(meta, count, "SCALE")) == NULL)
+                ztr.quality1->scale = "PH";
+            ztr.quality1->data = (uint8_t *)data;
+            break;
+        case CNF4:
+            metadata = meta_getValueForNameAndRemove(meta, count, "SCALE");
+            ztr.quality4 = malloc(sizeof(*ztr.quality4));
+            if (ztr.quality4 == NULL)
+                return RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+
+            *chunkType = type;
+            ztr.quality4->datatype = datatype;
+            ztr.quality4->datasize = datasize;
+            if ((ztr.quality4->scale = (char *)meta_getValueForNameAndRemove(meta, count, "SCALE")) == NULL)
+                ztr.quality4->scale = "PH";
+            ztr.quality4->data = (uint8_t *)data;
+            break;
+        case COMM:
+            ztr.comment = malloc(sizeof(*ztr.comment) + datasize);
+            if (ztr.comment == NULL)
+                return RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+            *chunkType = type;
+            ztr.comment->size = datasize;
+            ztr.comment->text = (char *)data;
+            break;
+        case CR32:
+            *chunkType = ignore;
+#if 0
+            if (ctx->checksum != ((((((data[0] << 8) | data[1]) << 8) | data[2]) << 8) | data[3]))
+            {
+                rc = RC ( rcSRA, rcFormatter, rcParsing, rcData, rcCorrupt );
+                PLOGERR (( klogErr, rc, "$(func) - checksum error", "func=ZTR_ProcessBlock" ));
+                return rc;
+            }
+            ctx->checksum = 0;
+#endif
+            break;
+        case HUFF:
+            *chunkType = ignore;
+            break;
+        case REGN:
+        {
+            int region_count;
+            int n;
+            
+            metadata = meta_getValueForNameAndRemove(meta, count, "NAME");
+            if (metadata) {
+                const char *cp;
+                
+                region_count = 1;
+                if (metadata[strlen(metadata) - 1] == ';')
+                    region_count = 0;
+                for (cp = metadata; (cp = strchr(cp, ';')) != NULL; ++cp)
+                    ++region_count;
+            }
+            else
+                region_count = 0;
+            ztr.region = NULL;
+            n = (size_t)(&ztr.region->region[region_count]) + (metadata ? (strlen(metadata) + 1) : 0);
+            ztr.region = malloc(n);
+            if (ztr.region == NULL)
+                return RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+
+            *chunkType = type;
+            ztr.region->count = region_count;
+            if (region_count > 0) {
+                char *temp = (char *)&ztr.region->region[region_count];
+                int i, st;
+                
+                strcpy(temp, metadata);
+                for (i = st = 0; *temp != '\0'; ++temp) {
+                    switch (st) {
+                        case 0:
+                            if (!isspace(*temp)) {
+                                ztr.region->region[i].name = temp;
+                                ++st;
+                            }
+                            break;
+                        case 1:
+                            if (*temp == ':') {
+                                char *cp = temp - 1;
+                                
+                                while (isspace(*cp))
+                                    *cp-- = '\0';
+                                *temp = '\0';
+                                ++st;
+                            }
+                            break;
+                        case 2:
+                            if (!isspace(*temp)) {
+                                ztr.region->region[i].type = *temp;
+                                if (i == region_count - 1)
+                                    ztr.region->region[0].start = 0;
+                                else
+                                    switch (datatype) {
+                                        case i16:
+                                            ztr.region->region[i + 1].start = BE2H16(((const int16_t *)data)[i]);
+                                            break;
+                                        case i32:
+                                            ztr.region->region[i + 1].start = BE2H32(((const int32_t *)data)[i]);
+                                            break;
+                                        default:
+                                            break;
+                                    }
+                                ++i;
+                                ++st;
+                            }
+                            break;
+                        case 3:
+                            if (*temp == ';')
+                                st = 0;
+                            break;
+                    }
+                }
+            }
+        }
+            break;
+        case SAMP:
+            ztr.signal = malloc(sizeof(*ztr.signal));
+            if (ztr.signal == NULL)
+                return RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+            
+            *chunkType = type;
+            ztr.signal->datatype = datatype;
+            ztr.signal->datasize = datasize;
+			metadata = meta_getValueForNameAndRemove(meta, count, "OFFS");
+            ztr.signal->offset  = metadata == NULL ? 0 : strtol(metadata, NULL, 0);
+            ztr.signal->channel = (char *)meta_getValueForNameAndRemove(meta, count, "TYPE");
+            ztr.signal->data = (uint8_t *)data;
+            break;
+        case SMP4:
+            ztr.signal4 = malloc(sizeof(*ztr.signal4));
+            if (ztr.signal4 == NULL)
+                return RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+            
+            *chunkType = type;
+            ztr.signal4->datatype = datatype;
+            ztr.signal4->datasize = datasize;
+			metadata = meta_getValueForNameAndRemove(meta, count, "OFFS");
+            ztr.signal->offset  = metadata == NULL ? 0 : strtol(metadata, NULL, 0);
+            ztr.signal4->data = (uint8_t *)data;
+            break;
+#if ZTR_USE_TEXT_CHUNK
+        case TEXT:
+        {
+            int n;
+            const char *const end = (const char *)(data + datasize);
+            const char *cp;
+
+            for (cp = (const char *)data, n = 0; cp < end; ++n) {
+                size_t len = strendlen(cp, end);
+                
+                if (len == 0)
+                    break;
+                cp += len + 1;
+                len = strendlen(cp, end);
+                cp += len + 1;
+            }
+            if (n != 0) {
+                int i;
+
+                ztr.xmeta = malloc(sizeof(*ztr.xmeta) + (n - 1) * sizeof(nvp_t));
+                if (ztr.xmeta == NULL)
+                    return RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+                
+                *chunkType = type;
+                ztr.xmeta->count = n;
+                for (i = 0, cp = (const char *)data; i != n; ++i) {
+                    size_t len = strendlen(cp, end);
+                    
+                    if (len == 0)
+                        break;
+                    ztr.xmeta->data[i].name = cp;
+                    cp += len + 1;
+                    ztr.xmeta->data[i].value = cp;
+                    len = strendlen(cp, end);
+                    cp += len + 1;
+                }
+            }
+        }
+            break;
+#endif
+        default:
+            *chunkType = ignore;
+            break;
+    }
+    *dst = ztr;
+#if ZTR_USE_EXTRA_META
+    if (extraMeta != NULL && extraMetaCount != NULL) {
+        int i, j, k;
+        
+        for (k = j = i = 0; i != count; ++i)
+            if (meta[i].name != NULL) {
+                k += strlen(meta[i].name) + strlen(meta[i].value) + 2;
+                ++j;
+            }
+        *extraMetaCount = 0;
+        *extraMeta = NULL;
+        if (j > 0) {
+            *extraMeta = malloc(sizeof(nvp_t) * j + k);
+            if (*extraMeta != NULL) {
+                char *temp = (char *)(*extraMeta + j);
+                
+                for (j = i = 0; i != count; ++i)
+                    if (meta[i].name != NULL) {
+                        strcpy(temp, meta[i].name);
+                        (*extraMeta)[j].name = temp;
+                        temp += strlen(temp) + 1;
+                        strcpy(temp, meta[i].value);
+                        (*extraMeta)[j].value = temp;
+                        temp += strlen(temp) + 1;
+                    }
+            }
+        }
+    }
+#endif
+    if (meta != NULL)
+        free(meta);
+    return 0;
+}
+
+rc_t ABI_ZTR_CreateContext(ZTR_Context **ctx)
+{
+    assert(ctx);
+
+    if ((*ctx = malloc(sizeof(**ctx))) == NULL)
+        return RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+
+    memset(*ctx, 0, sizeof(**ctx));
+    return 0;
+}
+
+rc_t ABI_ZTR_AddToBuffer(ZTR_Context *ctx, const uint8_t *data, uint32_t datasize) {
+    assert(ctx);
+	ctx->current = 0;
+	ctx->buf = data;
+	ctx->buflen = datasize;
+	return 0;
+}
+
+
+rc_t ABI_ZTR_ParseHeader(ZTR_Context *ctx) {
+    assert(ctx);
+    
+	if (ctx->current + 10 > ctx->buflen)
+        return RC ( rcSRA, rcFormatter, rcParsing, rcData, rcInsufficient );
+
+    if (memcmp(ctx->buf + ctx->current, ZTR_SIG, 8) != 0)
+        return RC ( rcSRA, rcFormatter, rcParsing, rcData, rcCorrupt );
+
+    if ((ctx->versMajor = ((uint8_t *)(ctx->buf + ctx->current))[8]) != 1)
+        return RC ( rcSRA, rcFormatter, rcParsing, rcData, rcBadVersion );
+
+    ctx->versMinor = ((uint8_t *)(ctx->buf + ctx->current))[9];    
+	ctx->current += 10;
+    return 0;
+}
+
+rc_t ABI_ZTR_ContextRelease(ZTR_Context *self) {
+    if (self != NULL) {
+        free(self);
+    }
+    return 0;
+}
diff --git a/tools/sra-load/ztr-absolid.h b/tools/sra-load/ztr-absolid.h
new file mode 100644
index 0000000..bfb1cc6
--- /dev/null
+++ b/tools/sra-load/ztr-absolid.h
@@ -0,0 +1,124 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _sra_load_ztr_absolid_
+#define _sra_load_ztr_absolid_
+
+#include <klib/defs.h>
+
+#include "ztr.h"
+
+typedef struct ztr_raw_t {
+    uint8_t type[4];
+    size_t metalength, datalength;
+    const uint8_t *meta, *data;
+} ztr_raw_t;
+
+/* allocate and initialize a ZTR parser context
+caller is responsible to free resulting pointer
+
+return 1 if context can't be allocated,
+0 for no error.
+*/
+rc_t ABI_ZTR_CreateContext(ZTR_Context **ctx);
+
+/* add some bytes to context's input buffer
+   the caller is responsible for ensuring that
+   the pointer remains valid until the bytes
+   are consumed.  the caller is responsible for
+   free'ing it.  the context will simply forget
+   the bytes when it has consumed them all.
+
+   returns 1 if data can't be added to the buffer chain,
+   0 for no error.
+*/
+rc_t ABI_ZTR_AddToBuffer(ZTR_Context *ctx, const uint8_t *data, uint32_t datasize);
+
+bool ABI_ZTR_BufferIsEmpty(const ZTR_Context *ctx);
+
+/* parse a ZTR header from the input buffer
+returns 0 if no error, 1 otherwise
+*/
+rc_t ABI_ZTR_ParseHeader(ZTR_Context *ctx);
+
+/* parse a ZTR block from the input buffer
+    returns
+        0: no error
+        1: not valid ZTR
+        2: out of memory
+
+   the caller is responsible for free'ing ztr_raw->meta and
+   ztr_raw->data when it is no longer needed
+*/
+rc_t ABI_ZTR_ParseBlock(ZTR_Context *ctx, ztr_raw_t *ztr_raw);
+
+/* cook a ztr_raw_t to produce a ztr_t
+   sets defaults, processes meta data, etc.
+
+    returns
+        0: no error
+        1: not valid ZTR
+        2: out of memory
+
+Parameters:
+    ctx [in]: the context returned from ZTR_CreateContext
+    ztr_raw [in]: the structure filled in by ZTR_ParseBlock
+    ztr [out]: the resulting data object
+    chunkType [out]: how to interpret the data object
+    if chunkType is none or unknown, it is probably an error
+    if chunkType is ignore, then the chunk was valid and known
+    but of no interest to you, e.g. a huffman dictionary chunk
+    extraMeta [out optional]: any unprocessed name-value pairs
+    extraMetaCount [out optional]: the number of unprocessed name-value pairs
+
+    NB. ztr and its pointers refer to ztr_raw, so don't free
+    ztr_raw before you are done with ztr
+
+    ztr can be free'ed in one-fell-swoop
+    *extraMeta can be free'ed in one-fell-swoop
+*/
+#if ZTR_USE_EXTRA_META
+
+rc_t ABI_ZTR_ProcessBlock(ZTR_Context *ctx,
+                          const ztr_raw_t *ztr_raw,
+                          ztr_t *ztr,
+                          enum ztr_chunk_type *chunkType,
+                          nvp_t **extraMeta,
+                          int *extraMetaCount);
+
+#else
+
+rc_t ABI_ZTR_ProcessBlock(ZTR_Context *ctx,
+                          const ztr_raw_t *ztr_raw,
+                          ztr_t *ztr,
+                          enum ztr_chunk_type *chunkType);
+#endif
+
+/* free a context created by ZTR_CreateContext
+   do this when done processing the ZTR stream.
+*/
+rc_t ABI_ZTR_ContextRelease(ZTR_Context *ctx);
+
+#endif /* _sra_load_ztr_absolid_ */
diff --git a/tools/sra-load/ztr-huffman.c b/tools/sra-load/ztr-huffman.c
new file mode 100644
index 0000000..2587cc6
--- /dev/null
+++ b/tools/sra-load/ztr-huffman.c
@@ -0,0 +1,664 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <klib/sort.h>
+#include <klib/rc.h>
+
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <memory.h>
+#include <byteswap.h>
+#include <endian.h>
+
+#include <assert.h>
+#include <stdio.h>
+
+#include "ztr-huffman.h"
+
+typedef uint8_t *sym_t;
+
+struct decode_table_t {
+	int sig_bits;
+	bitsz_t sym_len;
+	sym_t symbol;
+	decode_table_t *next;
+};
+
+static void assign(uint8_t *dst, const uint16_t code[32], int len) {
+	len = (len + 7) >> 3;
+	
+	while (len--)
+		*dst++ = *code++;
+}
+
+static void inc(uint16_t code[32], int len) {
+	int c;
+	
+	--len;
+	code[len >> 3] += 0x80 >> (len & 7);
+	len >>= 3;
+	c = code[len] >> 8;
+	while (len && c) {
+		code[len] &= 0xFF;
+		--len;
+		++code[len];
+		c = code[len] >> 8;
+	}
+}
+
+struct index_t {
+	uint16_t i, len;
+};
+
+static int64_t idx_cmp(const void *A, const void *B, void * ignored) {
+	const struct index_t *a = A;
+	const struct index_t *b = B;
+	
+    if ( a->len != b->len )
+        return (int64_t)a->len - (int64_t)b->len;
+
+    return (int64_t)a->i - (int64_t)b->i;
+}
+
+#if 0
+static void huffman_codes(uint8_t **codes, const uint8_t length[256]) {
+	struct index_t idx[256];
+	size_t total_len;
+	int i;
+	uint16_t code[32];
+	uint8_t *cp = (uint8_t *)&codes[256];
+	
+	for (total_len = 0, i = 0; i != 256; ++i) {
+		total_len += ((idx[i].len = length[i]) + 7) >> 3;
+		idx[i].i = i;
+	}
+	ksort(idx, 256, sizeof(*idx), idx_cmp, NULL);
+	for (i = 0; i != 256 && idx[i].len == 0; ++i)
+		;
+	memset(code, 0, 32);
+	for ( ; i != 256; ++i) {
+		uint16_t j = idx[i].i, n = idx[i].len;
+		codes[j] = cp;
+		assign(cp, code, n);
+		inc(code, n);
+		cp += (n + 7) >> 3;
+	}
+}
+#endif
+
+static void huffman_codes257(uint8_t **codes, const uint8_t length[257]) {
+	struct index_t idx[257];
+	size_t total_len;
+	int i;
+	uint16_t code[32];
+	uint8_t *cp = (uint8_t *)&codes[257];
+	
+	for (total_len = 0, i = 0; i != 257; ++i) {
+		total_len += ((idx[i].len = length[i]) + 7) >> 3;
+		idx[i].i = i;
+	}
+	ksort(idx, 257, sizeof(*idx), idx_cmp, NULL);
+	for (i = 0; i != 257 && idx[i].len == 0; ++i)
+		;
+	memset(code, 0, 32);
+	for ( ; i != 257; ++i) {
+		uint16_t j = idx[i].i, n = idx[i].len;
+		codes[j] = cp;
+		assign(cp, code, n);
+		inc(code, n);
+		cp += (n + 7) >> 3;
+	}
+}
+
+static void huffman_codes19(uint8_t **codes, const uint8_t length[19]) {
+	struct index_t idx[19];
+	size_t total_len;
+	int i;
+	uint16_t code[32];
+	uint8_t *cp = (uint8_t *)&codes[19];
+	
+	for (total_len = 0, i = 0; i != 19; ++i) {
+		total_len += ((idx[i].len = length[i]) + 7) >> 3;
+		idx[i].i = i;
+	}
+	ksort(idx, 19, sizeof(*idx), idx_cmp, NULL);
+	for (i = 0; i != 19 && idx[i].len == 0; ++i)
+		;
+	memset(code, 0, 32);
+	for ( ; i != 19; ++i) {
+		uint8_t j = idx[i].i, n = idx[i].len;
+		codes[j] = cp;
+		assign(cp, code, n);
+		inc(code, n);
+		cp += (n + 7) >> 3;
+	}
+}
+
+static uint16_t get_bits1(const uint8_t *data, int *bp, int bc) {
+	uint16_t val = *(uint16_t *)(data + (*bp >> 3));
+	
+#if __BYTE_ORDER == __BIG_ENDIAN
+	val = bswap_16(val);
+#endif
+	val >>= *bp & 0x07;
+	val &= (1 << bc) - 1;
+	*bp += bc;
+	return val;
+}
+
+static uint32_t get_bits4(const uint8_t *data, int *bp, int bc) {
+	uint32_t val = *(uint32_t *)(data + (*bp >> 3));
+	
+#if __BYTE_ORDER == __BIG_ENDIAN
+	val = bswap_32(val);
+#endif
+	val >>= *bp & 0x07;
+	val &= (1L << bc) - 1;
+	*bp += bc;
+	return val;
+}
+
+#if 0
+static int get_bits(const uint8_t *data, int *bp, int bc) {
+	uint32_t val = get_bits4(data, bp, bc);
+
+	fprintf(stderr, "%02X/%u\n", val, bc);
+	return val;
+}
+#else
+#define get_bits get_bits4
+#endif
+
+static rc_t build_table(
+						decode_table_t *tbl,
+						uint8_t *pcode,
+						bitsz_t len,
+						const sym_t sym,
+						bitsz_t sym_len
+) {
+	int i, code = *pcode, mask;
+	static const uint8_t rev[] = 
+		"\x00\x80\x40\xc0\x20\xa0\x60\xe0\x10\x90\x50\xd0\x30\xb0\x70\xf0"
+		"\x08\x88\x48\xc8\x28\xa8\x68\xe8\x18\x98\x58\xd8\x38\xb8\x78\xf8"
+		"\x04\x84\x44\xc4\x24\xa4\x64\xe4\x14\x94\x54\xd4\x34\xb4\x74\xf4"
+		"\x0c\x8c\x4c\xcc\x2c\xac\x6c\xec\x1c\x9c\x5c\xdc\x3c\xbc\x7c\xfc"
+		"\x02\x82\x42\xc2\x22\xa2\x62\xe2\x12\x92\x52\xd2\x32\xb2\x72\xf2"
+		"\x0a\x8a\x4a\xca\x2a\xaa\x6a\xea\x1a\x9a\x5a\xda\x3a\xba\x7a\xfa"
+		"\x06\x86\x46\xc6\x26\xa6\x66\xe6\x16\x96\x56\xd6\x36\xb6\x76\xf6"
+		"\x0e\x8e\x4e\xce\x2e\xae\x6e\xee\x1e\x9e\x5e\xde\x3e\xbe\x7e\xfe"
+		"\x01\x81\x41\xc1\x21\xa1\x61\xe1\x11\x91\x51\xd1\x31\xb1\x71\xf1"
+		"\x09\x89\x49\xc9\x29\xa9\x69\xe9\x19\x99\x59\xd9\x39\xb9\x79\xf9"
+		"\x05\x85\x45\xc5\x25\xa5\x65\xe5\x15\x95\x55\xd5\x35\xb5\x75\xf5"
+		"\x0d\x8d\x4d\xcd\x2d\xad\x6d\xed\x1d\x9d\x5d\xdd\x3d\xbd\x7d\xfd"
+		"\x03\x83\x43\xc3\x23\xa3\x63\xe3\x13\x93\x53\xd3\x33\xb3\x73\xf3"
+		"\x0b\x8b\x4b\xcb\x2b\xab\x6b\xeb\x1b\x9b\x5b\xdb\x3b\xbb\x7b\xfb"
+		"\x07\x87\x47\xc7\x27\xa7\x67\xe7\x17\x97\x57\xd7\x37\xb7\x77\xf7"
+		"\x0f\x8f\x4f\xcf\x2f\xaf\x6f\xef\x1f\x9f\x5f\xdf\x3f\xbf\x7f\xff";
+	
+	if (len > 8) {
+		int j = rev[code];
+		
+		if (tbl[j].next == NULL)
+			tbl[j].next = calloc(256, sizeof(decode_table_t));
+		if (tbl[j].next == NULL)
+			return RC(rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted);
+		
+		tbl[j].sig_bits = 8;
+		return build_table(tbl[j].next, pcode + 1, len - 8, sym, sym_len);
+	}
+	code &= (mask = (0xFF00 >> len) & 0xFF);
+	for (i = code; i != 256; ++i) {
+		int j = rev[i];
+		
+		if ((i & mask) != code)
+			break;
+		assert(tbl[j].sig_bits == 0);
+		tbl[j].sym_len = sym ? sym_len : 1;
+		tbl[j].symbol = sym;
+		tbl[j].sig_bits = len;
+	}
+	return 0;
+}
+
+static void	fixup_table(decode_table_t *dt, decode_table_t *root) {
+	int i;
+	
+	for (i = 0; i != 256; ++i) {
+		if (dt[i].next)
+			fixup_table(dt[i].next, root);
+		else
+			dt[i].next = root;
+	}
+}
+
+static void free_table(decode_table_t *dt, decode_table_t *root) {
+	int i;
+	
+	for (i = 0; i != 256; ++i) {
+		if (dt[i].next && dt[i].next != root)
+			free_table(dt[i].next, root);
+	}
+	free(dt);
+}
+
+
+static const uint8_t symbols[290] = 
+	"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
+	"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
+	"\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
+	"\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
+	"\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
+	"\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
+	"\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
+	"\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
+	"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+	"\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+	"\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+	"\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+	"\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+	"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+	"\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+	"\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff";
+
+static void decode_zlib_length_codes(uint8_t *length, const uint8_t *data, int *bp, size_t datasize) {
+	uint8_t length19[19];
+	int llc, dc, clc;
+	uint8_t storage19[19 * sizeof(uint8_t *) + 19 * 32];
+	uint8_t **codes19;
+	decode_table_t dt1[256];
+	static const uint8_t ndx[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 };
+	int i, n;
+	int bits = datasize << 3;
+	
+	codes19 = (uint8_t **)storage19;
+	memset(length19, 0, sizeof(length19));
+	memset(storage19, 0, sizeof(storage19));
+	
+	llc = get_bits1(data, bp, 5) + 257;
+	dc  = get_bits1(data, bp, 5) + 1;
+	clc = get_bits1(data, bp, 4) + 4;
+
+	for (i = 0; i != clc; ++i)
+		length19[ndx[i]] = get_bits(data, bp, 3);
+
+	huffman_codes19(codes19, length19);
+	memset(dt1, 0, sizeof(dt1));
+	for (i = 0; i != 19; ++i) {
+		if (codes19[i] != NULL)
+			build_table(dt1, codes19[i], length19[i], (sym_t)(symbols + i), 8);
+	}
+	fixup_table(dt1, dt1);
+	i = 0;
+	while (bits > *bp) {
+		uint8_t code;
+		const decode_table_t *cp;
+		int bc = 8;
+		
+		if (bits - *bp < 8)
+			bc = bits - *bp;
+		code = get_bits1(data, bp, bc);
+		cp = dt1 + code;
+		/* fprintf(stderr, "%02X/%u\n", code & ((1L << cp->sig_bits) - 1), cp->sig_bits); */
+		*bp -= bc - cp->sig_bits;
+
+		switch (cp->symbol[0]) {
+			case 16:
+				n = get_bits1(data, bp, 2) + 3;
+				memset(length + i, length[i - 1], n);
+				i += n;
+				break;
+			case 17:
+				n = get_bits1(data, bp, 3) + 3;
+				memset(length + i, 0, n);
+				i += n;
+				break;
+			case 18:
+				n = get_bits1(data, bp, 7) + 11;
+				memset(length + i, 0, n);
+				i += n;
+				break;
+			default:
+				length[i++] = cp->symbol[0];
+				break;
+		}
+		if (i >= llc)
+			break;
+	}
+	assert(i == llc);
+	i = 0;
+	while (bits > *bp) {
+		uint8_t code;
+		const decode_table_t *cp;
+		int bc = 8;
+		
+		if (bits - *bp < 8)
+			bc = bits - *bp;
+		code = get_bits1(data, bp, bc);
+		cp = dt1 + code;
+		/* fprintf(stderr, "%02X/%u\n", code & ((1L << cp->sig_bits) - 1), cp->sig_bits); */
+		*bp -= bc - cp->sig_bits;
+		
+		switch (cp->symbol[0]) {
+			case 16:
+				n = get_bits1(data, bp, 2) + 3;
+				i += n;
+				break;
+			case 17:
+				n = get_bits1(data, bp, 3) + 3;
+				i += n;
+				break;
+			case 18:
+				n = get_bits1(data, bp, 7) + 11;
+				i += n;
+				break;
+			default:
+				++i;
+				break;
+		}
+		if (i >= dc)
+			break;
+	}
+	assert(i == dc);
+}
+
+rc_t handle_huffman_codes(ztr_huffman_table *y, const uint8_t *data, size_t datasize) {
+	int bc = 0;
+	int i, j;
+	uint8_t storage[257 * sizeof(uint8_t *) + 257 * 32];
+	uint8_t **codes;
+
+	codes = (uint8_t **)storage;
+	
+	get_bits1(data, &bc, 1);
+	
+	switch (get_bits1(data, &bc, 2)) {
+		default:
+			return RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+		case 2:
+			y->tblcnt = 1;
+			break;
+		case 3:
+			y->tblcnt = get_bits(data, &bc, get_bits1(data, &bc, 4) + 1) + 1;
+			break;
+	}
+	y->tbl = calloc(y->tblcnt, sizeof(*y->tbl));
+	for (i = 0; i != y->tblcnt; ++i) {
+		uint8_t length[289];
+		
+		memset(length, 0, sizeof(length));
+		memset(storage, 0, sizeof(storage));
+		decode_zlib_length_codes(length, data, &bc, datasize);
+		huffman_codes257(codes, length);
+		y->tbl[i] = calloc(257, sizeof(decode_table_t));
+		for (j = 0; j != 256; ++j) {
+			if (codes[j] != NULL)
+				build_table(y->tbl[i], codes[j], length[j], (sym_t)(symbols + j), 8);
+		}
+		if (codes[256] != NULL)
+			build_table(y->tbl[i], codes[256], length[256], (sym_t)0, 0);
+	}
+	y->bits_left = (datasize << 3) - bc;
+	
+	return 0;
+}
+
+rc_t handle_special_huffman_codes(ztr_huffman_table *y, int which_one) {
+	typedef uint8_t length_array[257];
+	
+	static const length_array special0 = 
+        {
+            5, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
+            14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
+            14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
+            14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
+            14, 2, 14, 2, 14, 14, 14, 3, 14, 14, 14, 14, 14, 14, 4, 14, 
+            14, 14, 14, 14, 2, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
+            14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
+            14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
+            14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
+            14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
+            14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
+            14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
+            14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
+            14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
+            14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
+            14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
+            6
+        };
+	static const length_array special1 = 
+        {
+            7, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 7, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 2, 8, 2, 8, 15, 15, 3, 8, 15, 15, 8, 15, 8, 4, 15, 
+            15, 15, 8, 8, 2, 15, 8, 8, 15, 8, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            11
+        };
+	static const length_array special2 = 
+        {
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 6, 15, 15, 6, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            3, 11, 8, 15, 15, 15, 15, 10, 15, 15, 15, 15, 6, 9, 7, 15, 
+            11, 11, 15, 15, 15, 15, 15, 15, 15, 15, 15, 10, 15, 15, 15, 10, 
+            15, 9, 10, 10, 15, 10, 11, 11, 10, 8, 15, 15, 15, 10, 9, 15, 
+            15, 15, 15, 10, 9, 15, 15, 10, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 4, 7, 6, 5, 3, 6, 6, 5, 4, 15, 8, 5, 6, 4, 4, 
+            6, 15, 5, 4, 4, 5, 7, 6, 10, 6, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+            15
+        };
+	int i, j;
+	uint8_t storage[257 * sizeof(uint8_t *) + 257 * 32];
+	uint8_t **codes;
+	const uint8_t *special;
+    
+	codes = (uint8_t **)storage;
+	
+	switch (which_one) {
+	case 0:
+		special = special0;
+		break;
+	case 1:
+		special = special1;
+		break;
+	case 2:
+		special = special2;
+		break;
+	default:
+		assert (which_one >= 0 && which_one < 3);
+        return RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+	}
+
+	if (y->tbl)
+        return 0;
+	y->tbl = calloc(y->tblcnt, sizeof(*y->tbl));
+    y->tblcnt = 1;
+    
+	for (i = 0; i != y->tblcnt; ++i) {
+		memset(storage, 0, sizeof(storage));
+		huffman_codes257(codes, special);
+		y->tbl[i] = calloc(257, sizeof(decode_table_t));
+		for (j = 0; j != 256; ++j) {
+			if (codes[j] != NULL)
+				build_table(y->tbl[i], codes[j], special[j], (sym_t)(symbols + j), 8);
+		}
+		if (codes[256] != NULL)
+			build_table(y->tbl[i], codes[256], special[256], (sym_t)0, 0);
+	}
+	y->bits_left = 0;
+	
+	return 0;
+}
+
+rc_t decompress_huffman(const ztr_huffman_table *tbl, uint8_t **Data, size_t *datasize) {
+#if 0
+	const uint8_t *src = *Data;
+	size_t srclen = *datasize, dstlen = 0;
+	size_t sbits, dalloc;
+	uint8_t *dst, *Dst;
+	int bp, tblNo = 0, n = tbl->tblcnt;
+	const decode_table_t *cp = tbl->tbl[0];
+    
+    bp =  8 - tbl->bits_left;
+	src += 2; srclen -= 2;
+    
+	Dst = dst = malloc(dalloc = srclen << 1);
+	if (Dst != NULL) {
+		sbits = srclen << 3;
+		while (sbits) {
+			uint8_t code;
+			int bc = 8;
+			
+			if (sbits < 8)
+				bc = sbits;
+			code = get_bits1(src, &bp, bc);
+			cp += code;
+            
+			bp -= bc - cp->sig_bits;
+			sbits -= cp->sig_bits;
+			src += bp >> 3;
+			bp &= 7;
+			
+			if (cp->symbol == NULL) {
+				if (cp->next == NULL) {
+					break;
+                }
+			}
+			else {
+				if (++dstlen == dalloc) {
+					void *temp;
+					
+					temp = realloc(Dst, dalloc <<= 1);
+					if (temp == NULL)
+						goto NoMem;
+					
+					Dst = temp;
+					dst = Dst + dstlen - 1;
+				}
+				tblNo = (tblNo + 1) % n;
+				*dst++ = *cp->symbol;
+			}
+			cp = cp->next;
+			if (cp == NULL)
+				cp = tbl->tbl[tblNo];
+		}
+		free((void *)*Data);
+		*Data = Dst;
+		*datasize = dstlen;
+		return 0;
+	}
+#else
+	const uint8_t *src = *Data;
+	size_t srclen = *datasize, dstlen = 0;
+	const uint8_t *endp = src + srclen;
+	size_t dalloc;
+	uint8_t *dst, *Dst;
+	int tblNo = 0, n = tbl->tblcnt;
+	const decode_table_t *cp = tbl->tbl[0];
+    uint16_t code;
+    int bits = tbl->bits_left;
+    
+	src += 2; srclen -= 2;
+    code = (*src++) >> (8 - bits);
+    
+	Dst = dst = malloc(dalloc = srclen << 2);
+	if (Dst != NULL) {
+		while (src != endp) {
+            if (bits < 8) {
+                code |= ((uint16_t)(*src++)) << bits;
+                bits += 8;
+            }
+        PROCESS_BITS:
+			cp += code & 0xFF;
+            
+            bits -= cp->sig_bits;
+            code >>= cp->sig_bits;
+            
+			if (cp->symbol == NULL) {
+                cp = cp->next;
+                if (cp)
+                    continue;
+                assert(src == endp && bits < 8);
+                bits = 0;
+                break;
+			}
+            if (++dstlen == dalloc) {
+                void *temp;
+                
+                temp = realloc(Dst, dalloc <<= 1);
+                if (temp == NULL)
+                    goto NoMem;
+                
+                Dst = temp;
+                dst = Dst + dstlen - 1;
+            }
+            *dst++ = *cp->symbol;
+            tblNo = (tblNo + 1) % n;
+			cp = tbl->tbl[tblNo];
+		}
+        if (bits)
+            goto PROCESS_BITS;
+		free((void *)*Data);
+		*Data = Dst;
+		*datasize = dstlen;
+		return 0;
+	}
+#endif
+NoMem:
+	free((void *)*Data);
+	*Data = NULL;
+	*datasize = 0;
+	return RC(rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted);
+}
+
+rc_t free_huffman_table(ztr_huffman_table *tbl) {
+    int i;
+    
+    for (i = 0; i != tbl->tblcnt; ++i) {
+        free_table(tbl->tbl[i], tbl->tbl[i]);
+    }
+    free(tbl->tbl);
+    return 0;
+}
diff --git a/tools/sra-load/ztr-huffman.h b/tools/sra-load/ztr-huffman.h
new file mode 100644
index 0000000..3da48b4
--- /dev/null
+++ b/tools/sra-load/ztr-huffman.h
@@ -0,0 +1,45 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _sra_load_ztr_huffman_
+#define _sra_load_ztr_huffman_
+
+typedef struct decode_table_t decode_table_t;
+
+typedef struct ztr_huffman_table {
+    int bits_left;
+    int tblcnt;
+    decode_table_t **tbl;
+} ztr_huffman_table;
+
+rc_t handle_huffman_codes(ztr_huffman_table *tbl, const uint8_t *data, size_t datasize);
+
+rc_t handle_special_huffman_codes(ztr_huffman_table *y, int which_one);
+
+rc_t decompress_huffman(const ztr_huffman_table *tbl, uint8_t **Data, size_t *datasize);
+
+rc_t free_huffman_table(ztr_huffman_table *);
+
+#endif /* _sra_load_ztr_huffman_ */
diff --git a/tools/sra-load/ztr-illumina.c b/tools/sra-load/ztr-illumina.c
new file mode 100644
index 0000000..99cdaf1
--- /dev/null
+++ b/tools/sra-load/ztr-illumina.c
@@ -0,0 +1,1367 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <os-native.h>
+
+#include <stdlib.h>
+
+#include <string.h>
+#include <ctype.h>
+#include <endian.h>
+#include <byteswap.h>
+#include <assert.h>
+
+#include "ztr-illumina.h"
+#include "ztr-huffman.h"
+#include "debug.h"
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+
+#define ltoh16(X) (X)
+#define ltoh32(X) (X)
+
+#define btoh16(X) (bswap_16(X))
+#define btoh32(X) (bswap_32(X))
+
+#else
+
+#define ltoh16(X) (bswap_16(X))
+#define ltoh32(X) (bswap_32(X))
+
+#define btoh16(X) (X)
+#define btoh32(X) (X)
+
+#endif
+
+struct ZTR_Context {
+    int versMajor;
+    int versMinor;
+    uint32_t checksum;
+    ztr_huffman_table huffman_table[128], special[3];
+    size_t current, buflen[2];
+    const uint8_t *buf[2];
+};
+
+static int ztr_read(ZTR_Context *ctx, void *Dst, size_t n) {
+    char *dst = Dst;
+    size_t i, j = 0;
+    
+    assert(ctx);
+    do {
+        if (n == 0 || ctx->buf[0] == NULL)
+            break;
+        i = ctx->buflen[0] - ctx->current;
+        if (i > n)
+            i = n;
+        memcpy(dst + j, ctx->buf[0] + ctx->current, i);
+        ctx->current += i;
+        n -= i;
+        j += i;
+        if (ctx->current == ctx->buflen[0]) {
+            ctx->current = 0;
+            ctx->buflen[0] = ctx->buflen[1];
+            ctx->buf[0] = ctx->buf[1];
+            ctx->buflen[1] = 0;
+            ctx->buf[1] = NULL;
+        }
+    } while (1);
+
+    return j;
+}
+
+#define METANAME_COMP strcmp
+
+static size_t strendlen(const char *src, const char *end) {
+    size_t n = 0;
+    
+    while (*src && src != end) {
+        ++src;
+        ++n;
+    }
+    return n;
+}
+
+static int count_pairs(const char *src, uint32_t len) {
+    int i, j;
+    
+    for (j = i = 0; i != len; ++i) {
+        if (*src++ == 0)
+            ++j;
+    }
+    return (j % 2 == 0) ? (j >> 1) : 0;
+}
+
+#if 0
+static const char *meta_getValueForName(const nvp_t *meta, int count, const char *name) {
+    int i;
+    
+    for (i = 0; i != count; ++i) {
+        if (meta[i].name != NULL && METANAME_COMP(meta[i].name, name) == 0)
+            return meta[i].value;
+    }
+    return NULL;
+}
+#endif
+
+static const char *meta_getValueForNameAndRemove(nvp_t *meta, int count, const char *name) {
+    int i;
+    
+    for (i = 0; i != count; ++i) {
+        if (meta[i].name != NULL && METANAME_COMP(meta[i].name, name) == 0) {
+            meta[i].name = NULL;
+            return meta[i].value;
+        }
+    }
+    return NULL;
+}
+
+static void parse_meta(nvp_t *meta, int count, const char *metadata, const char *end) {
+    int i, j;
+    
+    for (i = 0; i != count && metadata <= end; ++i) {
+        j = strendlen(metadata, end);
+        if (j == 0)
+            break;
+        meta[i].name = metadata;
+        metadata += j; ++metadata;
+        meta[i].value = metadata;
+        metadata += strendlen(metadata, end); ++metadata;
+    }
+}
+
+bool ILL_ZTR_BufferIsEmpty(const ZTR_Context *ctx) {
+	return (ctx->buf[0] == NULL || ctx->buflen[0] == 0) ? true : false;
+}
+
+static int isZTRchunk(const uint8_t type[4]) {
+    static const char *types[] = {
+        "BASE",
+        "BPOS",
+        "CLIP",
+        "CNF1",
+        "CNF4",
+        "COMM",
+        "CR32",
+        "HUFF",
+        "REGN",
+        "SAMP",
+        "SMP4",
+        "TEXT"
+    };
+    int i;
+    
+    for (i = 0; i != sizeof(types) / sizeof(types[0]); ++i)
+        if (*(const uint32_t *)type == *(const uint32_t *)types[i])
+            return 1;
+    
+    return 0;
+}
+
+static rc_t parse_block(ZTR_Context *ctx, ztr_raw_t *ztr_raw) {
+    if (ztr_read(ctx, &ztr_raw->type, 4) != 4)
+        return RC(rcSRA, rcFormatter, rcParsing, rcData, rcInsufficient);
+    
+    if (!isZTRchunk(ztr_raw->type))
+        return RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+    
+    if (ztr_read(ctx, &ztr_raw->metalength, 4) != 4)
+        return RC(rcSRA, rcFormatter, rcParsing, rcData, rcInsufficient);
+    
+    if (ztr_raw->metalength != 0) {
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+        ztr_raw->metalength = bswap_32(ztr_raw->metalength);
+#endif
+        ztr_raw->meta = malloc(ztr_raw->metalength);
+
+        if (ztr_raw->meta == NULL)
+            return RC(rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted);
+
+        if (ztr_read(ctx, ztr_raw->meta, ztr_raw->metalength) != ztr_raw->metalength)
+            return RC(rcSRA, rcFormatter, rcParsing, rcData, rcInsufficient);
+    }
+    
+    if (ztr_read(ctx, &ztr_raw->datalength, 4) != 4)
+        return RC(rcSRA, rcFormatter, rcParsing, rcData, rcInsufficient);
+    
+    if (ztr_raw->datalength != 0) {
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+        ztr_raw->datalength = bswap_32(ztr_raw->datalength);
+#endif
+        ztr_raw->data = malloc(ztr_raw->datalength+1); /*** overallocating  **/
+
+        if (ztr_raw->data == NULL)
+            return RC(rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted);
+
+        if (ztr_read(ctx, ztr_raw->data, ztr_raw->datalength) != ztr_raw->datalength)
+            return RC(rcSRA, rcFormatter, rcParsing, rcData, rcInsufficient);
+    }
+    
+    return 0;
+}
+
+rc_t ILL_ZTR_ParseBlock(ZTR_Context *ctx, ztr_raw_t *ztr_raw)
+{
+    rc_t rc = 0;
+    uint32_t current, len[2];
+    const uint8_t *buf[2];
+    
+    assert(ctx);
+    assert(ztr_raw);
+    
+    memset(ztr_raw, 0, sizeof(*ztr_raw));
+	
+	if (ctx->buf[0] == NULL || ctx->buflen[0] == 0 || ctx->current == ctx->buflen[0] + ctx->buflen[1])
+		return RC ( rcSRA, rcFormatter, rcParsing, rcData, rcEmpty );
+	
+    /* save input buffer state for restoration upon error exit */
+    current = ctx->current;
+    len[0] = ctx->buflen[0];
+    len[1] = ctx->buflen[1];
+    buf[0] = ctx->buf[0];
+    buf[1] = ctx->buf[1];
+    
+    rc = parse_block(ctx, ztr_raw);
+    if (rc) {
+        /* clean up and restore buffer state */
+        if (ztr_raw->data)
+            free (ztr_raw->data);
+        if (ztr_raw->meta)
+            free (ztr_raw->meta);
+        
+        ctx->current = current;
+        ctx->buflen[0] = len[0];
+        ctx->buflen[1] = len[1];
+        ctx->buf[0] = buf[0];
+        ctx->buf[1] = buf[1];
+    }
+    return rc;
+}
+
+static rc_t undo_mode_4(uint8_t **Data, size_t *datasize) {
+	const uint8_t *src = *Data, *end;
+	size_t srclen = *datasize, dstlen = 0;
+	size_t dalloc;
+	uint8_t *dst, *Dst;
+	uint8_t dup = 0;
+	uint8_t esize;
+	rc_t rc = 0;
+	int st = 0;
+	int i;
+	
+	esize = src[1];
+	if (esize < 1 || srclen % esize != 0) {
+		rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+        return rc;
+    }
+    if (esize > 2) {
+        src += esize; srclen -= esize;
+    }
+    else {
+        src += 2; srclen -= 2;
+        if (srclen == 0) {
+            rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+            return rc;
+        }
+    }
+    Dst = dst = malloc(dalloc = srclen << 4);
+    if (Dst == NULL) {
+        rc = RC(rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted);
+        return rc;
+    }
+
+    end = src + srclen;
+    while (src != end) {
+        size_t out = esize;
+        
+        if (st == 2)
+            out *= (dup = *src);
+        if ((dstlen += out) >= dalloc) {
+            void *temp;
+            size_t n = dst - Dst;
+            
+            while (dalloc < dstlen)
+                dalloc <<= 1;
+            temp = realloc(Dst, dalloc);
+            if (temp == NULL) {
+                rc = RC(rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted);
+                break;
+            }
+            Dst = temp;
+            dst = Dst + n;
+        }
+        switch (st) {
+            case 0:
+                st = 1;
+                memcpy(dst, src, esize);
+                break;
+            case 1:
+                if (memcmp(dst, src, esize) == 0)
+                    st = 2;
+                dst += esize;
+                memcpy(dst, src, esize);
+                break;
+            case 2:
+                st = 0;
+                dst += esize;
+                for (i = 0; i != dup; ++i) {
+                    memcpy(dst, src - esize, esize);
+                    dst += esize;
+                }
+                break;
+        }
+        src += esize;
+    }
+
+	free((void *)*Data);
+	*Data = Dst;
+	*datasize = dstlen;
+	return rc;
+}
+
+static rc_t undo_mode_79(uint8_t **Data, size_t *datasize) {
+    uint8_t scratch[4 * 1024];
+	const uint8_t *src = *Data;
+	size_t srclen = *datasize;
+	uint8_t *dst0, *dst1, *Dst;
+	rc_t rc = 0;
+	int i, j, k, n;
+
+	if (srclen == 0) {
+		rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+        return rc;
+    }
+    assert(srclen % 4 == 0);
+    assert(srclen < sizeof(scratch));
+    
+    Dst = *Data;
+    Dst[0] = 0;
+    n = (srclen >> 2) - 1;
+    dst0 = scratch;
+    dst1 = dst0 + n;
+    src += 4;
+    for (k = i = j = 0; i != n; ++i, k += 3, j += 4) {
+        dst0[i + 0] = src[j + 0];
+        dst1[k + 0] = src[j + 1];
+        dst1[k + 1] = src[j + 2];
+        dst1[k + 2] = src[j + 3];
+    }
+
+    memcpy(Dst + 1, scratch, n << 2);
+	*Data = Dst;
+	*datasize = (n << 2) + 1;
+	return rc;
+}
+
+#if 0
+static rc_t undo_mode_80(uint8_t **Data, size_t *datasize, const uint8_t *sequence, size_t basecount) {
+	uint16_t temp[4 * 1024];
+	uint16_t *A = temp;
+	uint16_t *C = A + basecount;
+	uint16_t *G = C + basecount;
+	uint16_t *T = G + basecount;
+	uint8_t *dst;
+	int i, n;
+	const uint16_t *u;
+
+	assert(basecount < 1024);
+	dst = *Data;
+	*dst = 0;
+	u = (const uint16_t *)(dst + 8);
+	for (n = basecount, i = 0; i != n; ++i, u += 4) {
+		switch (sequence[i]) {
+			default:
+			case 'A':
+			case 'a':
+				A[i] = btoh16(u[0]);
+				C[i] = btoh16(u[1]);
+				G[i] = btoh16(u[2]);
+				T[i] = btoh16(u[3]);
+				break;					
+			case 'C':
+			case 'c':
+				C[i] = btoh16(u[0]);
+				A[i] = btoh16(u[1]);
+				G[i] = btoh16(u[2]);
+				T[i] = btoh16(u[3]);
+				break;					
+			case 'G':
+			case 'g':
+				G[i] = btoh16(u[0]);
+				A[i] = btoh16(u[1]);
+				C[i] = btoh16(u[2]);
+				T[i] = btoh16(u[3]);
+				break;					
+			case 'T':
+			case 't':
+				T[i] = btoh16(u[0]);
+				A[i] = btoh16(u[1]);
+				C[i] = btoh16(u[2]);
+				G[i] = btoh16(u[3]);
+				break;
+		}
+	}
+	memcpy(dst + 2, temp, 8 * basecount);
+	*datasize = 2 + 8 * basecount;
+	return 0;
+}
+#else
+static rc_t undo_mode_80(uint8_t **Data, size_t *datasize, const uint8_t *sequence, size_t basecount, long offset) {
+	const uint16_t *u = (const uint16_t *)(*Data + 8);
+	int i;
+    float *Dst = malloc(sizeof(Dst[0]) * 4 * basecount);
+    float *dst = Dst;
+
+    if (dst == NULL)
+        return RC(rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted);
+    
+	for (i = 0; i != basecount; ++i, u += 4, dst += 4) {
+		switch (sequence[i]) {
+			default:
+			case 'A':
+			case 'a':
+				dst[0] = (long)btoh16(u[0]) - offset;
+				dst[1] = (long)btoh16(u[1]) - offset;
+				dst[2] = (long)btoh16(u[2]) - offset;
+				dst[3] = (long)btoh16(u[3]) - offset;
+				break;					
+			case 'C':
+			case 'c':
+				dst[1] = (long)btoh16(u[0]) - offset;
+				dst[0] = (long)btoh16(u[1]) - offset;
+				dst[2] = (long)btoh16(u[2]) - offset;
+				dst[3] = (long)btoh16(u[3]) - offset;
+				break;					
+			case 'G':
+			case 'g':
+				dst[2] = (long)btoh16(u[0]) - offset;
+				dst[0] = (long)btoh16(u[1]) - offset;
+				dst[1] = (long)btoh16(u[2]) - offset;
+				dst[3] = (long)btoh16(u[3]) - offset;
+				break;					
+			case 'T':
+			case 't':
+				dst[3] = (long)btoh16(u[0]) - offset;
+				dst[0] = (long)btoh16(u[1]) - offset;
+				dst[1] = (long)btoh16(u[2]) - offset;
+				dst[2] = (long)btoh16(u[3]) - offset;
+				break;
+		}
+	}
+    free(*Data);
+    *Data = (void *)Dst;
+	*datasize =  sizeof(dst[0]) * 4 * basecount;
+	return 0;
+}
+#endif
+
+static void swab16(const void *Src, void *Dst, size_t len) {
+	const uint16_t *src = Src;
+	uint16_t *dst = Dst;
+	size_t n = len >> 1;
+	size_t i;
+	
+	assert((len & 1) == 0);
+	for (i = 0; i != n; ++i)
+		dst[i] = bswap_16(src[i]);
+}
+
+static void swab32(const void *Src, void *Dst, size_t len) {
+	const uint32_t *src = Src;
+	uint32_t *dst = Dst;
+	size_t n = len >> 2;
+	size_t i;
+	
+	assert((len & 3) == 0);
+	for (i = 0; i != n; ++i)
+		dst[i] = bswap_32(src[i]);
+}
+
+static void swab64(const void *Src, void *Dst, size_t len) {
+	const uint64_t *src = Src;
+	uint64_t *dst = Dst;
+	size_t n = len >> 3;
+	size_t i;
+	
+	assert((len & 7) == 0);
+	for (i = 0; i != n; ++i)
+		dst[i] = bswap_64(src[i]);
+}
+
+static rc_t fixup_read(uint8_t *read, size_t bases) {
+	int i;
+	
+	for (i = 0; i != bases; ++i)
+		switch (read[i]) {
+			case 'A':
+			case 'C':
+			case 'G':
+			case 'T':
+			case 'a':
+			case 'c':
+			case 'g':
+			case 't':
+				break;
+			default:
+				read[i] = 'N';
+				break;
+		}
+	return 0;
+}
+
+static rc_t fixup_quality4(uint8_t *qual, const uint8_t *read, size_t bases) {
+	uint8_t src[4 * 1024];
+	const uint8_t *src0 = src; /* called */
+	const uint8_t *src1 = src0 + bases; /* not called */
+	int i, j, k;
+	
+	assert(bases < 1024);
+	memcpy(src, qual, bases * 4);
+	
+	for (k = j = i = 0; i != bases; ++i, j += 3, k += 4) {
+		switch (read[i]) {
+			default:
+			case 'A':
+			case 'a':
+				qual[k + 0] = src0[i];
+				qual[k + 1] = src1[j + 0];
+				qual[k + 2] = src1[j + 1];
+				qual[k + 3] = src1[j + 2];
+				break;
+			case 'C':
+			case 'c':
+				qual[k + 0] = src1[j + 0];
+				qual[k + 1] = src0[i];
+				qual[k + 2] = src1[j + 1];
+				qual[k + 3] = src1[j + 2];
+				break;
+			case 'G':
+			case 'g':
+				qual[k + 0] = src1[j + 0];
+				qual[k + 1] = src1[j + 1];
+				qual[k + 2] = src0[i];
+				qual[k + 3] = src1[j + 2];
+				break;
+			case 'T':
+			case 't':
+				qual[k + 0] = src1[j + 0];
+				qual[k + 1] = src1[j + 1];
+				qual[k + 2] = src1[j + 2];
+				qual[k + 3] = src0[i];
+				break;
+		}
+	}
+	return 0;
+}
+
+static rc_t fixup_trace_reorder(float *dst, const uint16_t *src, long offset, size_t bases) {
+	size_t i, j;
+	const uint16_t *A = src;
+	const uint16_t *C = A + bases;
+	const uint16_t *G = C + bases;
+	const uint16_t *T = G + bases;
+	
+	for (j = i = 0; i < bases; ++i, j += 4) {
+		dst[j + 0] = ((long)A[i] - offset);
+		dst[j + 1] = ((long)C[i] - offset);
+		dst[j + 2] = ((long)G[i] - offset);
+		dst[j + 3] = ((long)T[i] - offset);
+	}
+	
+	return 0;
+}
+
+static rc_t fixup_trace(float *dst, const uint16_t *src, long offset, size_t bases) {
+	size_t i;
+	
+    /*
+     float x;
+     float y;
+     int t;
+     
+     y = clip(x + offset, 0, 64k);
+     t = rint(y);
+     write(t & 0xFFFF)
+    */
+    
+    if (offset == 0) {
+        for (i = 0; i != bases * 4; ++i)
+            dst[i] = src[i];
+        return 0;
+    }
+	for (i = 0; i != bases * 4; ++i)
+		dst[i] = ((long)src[i] - offset);
+	return 0;
+}
+
+rc_t ILL_ZTR_Decompress(ZTR_Context *ctx, enum ztr_chunk_type type, ztr_t ztr, const ztr_t base) {
+	int padded = 1;
+	size_t *datasize;
+	uint8_t **data;
+	enum ztr_data_type datatype;
+	static char zero[8];
+	rc_t rc = 0;
+	
+	if (ztr.sequence == NULL)
+		return 0;
+    switch (type) {
+        case BASE:
+			data = &ztr.sequence->data;
+			datasize = &ztr.sequence->datasize;
+			datatype = ztr.sequence->datatype;
+            break;
+        case BPOS:
+			data = &ztr.position->data;
+			datasize = &ztr.position->datasize;
+			datatype = ztr.position->datatype;
+            break;
+        case CNF1:
+			data = &ztr.quality1->data;
+			datasize = &ztr.quality1->datasize;
+			datatype = ztr.quality1->datatype;
+            break;
+        case CNF4:
+			data = &ztr.quality4->data;
+			datasize = &ztr.quality4->datasize;
+			datatype = ztr.quality4->datatype;
+            break;
+        case SAMP:
+			data = &ztr.signal->data;
+			datasize = &ztr.signal->datasize;
+			datatype = ztr.signal->datatype;
+            break;
+        case SMP4:
+			data = &ztr.signal4->data;
+			datasize = &ztr.signal4->datasize;
+			datatype = ztr.signal4->datatype;
+            break;
+        default:
+			return 0;
+    }
+	assert(*datasize);
+	assert(*data);
+
+    if ((*data)[0] == 0x4D) {
+        switch ((*data)[1]) {
+        case 1:
+            rc = handle_special_huffman_codes(&ctx->special[0], 0);
+            if (rc == 0)
+                rc = decompress_huffman(&ctx->special[0], data, datasize);
+            if (rc == 0)
+                (*data)[0] = 0;
+            break;
+        case 2:
+            rc = handle_special_huffman_codes(&ctx->special[1], 1);
+            if (rc == 0)
+                rc = decompress_huffman(&ctx->special[1], data, datasize);
+            if (rc == 0)
+                (*data)[0] = 0;
+            break;
+        case 3:
+            rc = handle_special_huffman_codes(&ctx->special[2], 2);
+            if (rc == 0)
+                rc = decompress_huffman(&ctx->special[2], data, datasize);
+            if (rc == 0)
+                (*data)[0] = 0;
+            break;
+        default:
+            if ((*data)[1] < 128)
+                rc = RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+            else
+                rc = decompress_huffman(&ctx->huffman_table[(*data)[1] - 128], data, datasize);
+        }
+    }
+	while (rc == 0) {
+		switch (**data) {
+		case 0:
+			switch (datatype) {
+				case i16:
+				case i16v4:
+					if (memcmp(*data, zero, 2) == 0)
+						padded = 2;
+					*datasize -= padded;
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+					swab16((*data) + padded, *data, *datasize);
+#else
+					memmove(*data, (*data) + padded, *datasize);
+#endif
+					break;
+				case i32:
+				case f32:
+					if (memcmp(*data, zero, 4) == 0)
+						padded = 4;
+					*datasize -= padded;
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+					swab32((*data) + padded, *data, *datasize);
+#else
+					memmove(*data, (*data) + padded, *datasize);
+#endif
+					break;
+				case f64:
+					if (memcmp(*data, zero, 8) == 0)
+						padded = 8;
+					*datasize -= padded;
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+					swab64((*data) + padded, *data, *datasize);
+#else
+					memmove(*data, (*data) + padded, *datasize);
+#endif
+					break;
+				default:
+					*datasize -= padded;
+					memmove(*data, (*data) + padded, *datasize);
+					break;
+			}
+			switch (type) {
+			case BASE:
+				rc = fixup_read(*data, *datasize);
+				break;
+			case CNF4:
+				rc = fixup_quality4(*data, base.sequence->data, base.sequence->datasize);
+				break;
+			case SMP4:
+                {
+                    float *dst = malloc(sizeof(*dst) * 4 * base.sequence->datasize);
+                    if (dst == NULL)
+                        return RC(rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted);
+                    
+                    if (ztr.signal4->Type != NULL && memcmp("SLXN", ztr.signal4->Type, 5) == 0)
+                        rc = fixup_trace_reorder(dst, (const uint16_t *)*data, ztr.signal4->offset, base.sequence->datasize);
+                    else
+                        rc = fixup_trace(dst, (const uint16_t *)*data, ztr.signal4->offset, base.sequence->datasize);
+                    free(*data);
+                    *data = ( uint8_t* ) dst;
+                    *datasize = sizeof(*dst) * 4 * base.sequence->datasize;
+                }
+				break;
+			default:
+				break;
+			}
+			return rc;
+		case 4:
+			rc = undo_mode_4(data, datasize);
+			if (rc)
+				return rc;
+			break;
+		case 79:
+			rc = undo_mode_79(data, datasize);
+			if (rc)
+				return rc;
+			break;
+		case 80:
+			if (base.sequence->data == NULL || base.sequence->datasize == 0) {
+				**(uint16_t **)data = 0;
+				memmove(*data + 2, *data + 8, *datasize - 8);
+				*datasize -= 6;
+			}
+			else {
+				rc = undo_mode_80(data, datasize, base.sequence->data, base.sequence->datasize, ztr.signal4->offset);
+                if (rc == 0)
+                    ztr.signal4->datatype = f32;
+                return rc;
+			}
+			break;
+		default:
+			rc = RC ( rcSRA, rcFormatter, rcParsing, rcData, rcUnexpected );
+			PLOGERR ( klogInt, ( klogInt, rc, "$(func) - don't know how to handle format '$(format)'",
+                                             "func=ZTR_Decompress,format=%02X", *data ));
+		}
+	}
+	return rc;
+}
+
+#if ZTR_USE_EXTRA_META
+rc_t ILL_ZTR_ProcessBlock(ZTR_Context *ctx, ztr_raw_t *ztr_raw, ztr_t *dst, enum ztr_chunk_type *chunkType, nvp_t **extraMeta, int *extraMetaCount)
+#else
+rc_t ILL_ZTR_ProcessBlock(ZTR_Context *ctx, ztr_raw_t *ztr_raw, ztr_t *dst, enum ztr_chunk_type *chunkType)
+#endif
+{
+    rc_t rc;
+    const uint8_t *ptype;
+    size_t metasize, datasize;
+    uint8_t *data;
+    const char *metadata;
+    int count;
+    enum ztr_chunk_type type = 0;
+    enum ztr_data_type datatype = 0;
+    nvp_t *meta = NULL;
+    ztr_t ztr;
+
+    assert(ctx);
+    assert(ztr_raw);
+    assert(dst);
+    assert(chunkType);
+
+    *chunkType = none;
+    *(void **)dst = NULL;
+    *(void **)&ztr = NULL;
+	
+    ptype = ztr_raw->type;
+    count = 0;
+    metasize = ztr_raw->metalength;
+    if (metasize != 0) {
+        metadata = (char *)ztr_raw->meta;
+
+        count = count_pairs(metadata, metasize);
+        if (count < 0) {
+            rc = RC ( rcSRA, rcFormatter, rcParsing, rcData, rcCorrupt );
+            PLOGERR ( klogErr, ( klogErr, rc, "$(func) - '$(type)' chunk metadata malformed pairs",
+                                 "func=ZTR_ProcessBlock,type=%.*s", 4, & ztr_raw->type ));
+            return rc;
+        }
+
+		if (count == 0)
+			meta = NULL;
+        else {
+			meta = calloc(count, sizeof(*meta));
+			if (meta == NULL) {
+				rc = RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+				PLOGERR ( klogSys, ( klogSys, rc, "$(func) - '$(type)' chunk metadata pair",
+						  "func=ZTR_ProcessBlock,type=%.*s", 4, & ztr_raw->type ));
+				return rc;
+			}
+			parse_meta(meta, count, metadata, metadata + metasize);
+		}
+    }
+    
+    if (memcmp(ptype, "BASE", 4) == 0) {
+        type = BASE;
+        datatype = i8;
+    }
+    else if (memcmp(ptype, "BPOS", 4) == 0) {
+        type = BPOS;
+        datatype = i32;
+    }
+    else if (memcmp(ptype, "CLIP", 4) == 0) {
+        type = CLIP;
+        datatype = i32;
+    }
+    else if (memcmp(ptype, "CNF1", 4) == 0) {
+        type = CNF1;
+        datatype = i8;
+    }
+    else if (memcmp(ptype, "CNF4", 4) == 0) {
+        type = CNF4;
+        datatype = i8;
+    }
+    else if (memcmp(ptype, "COMM", 4) == 0) {
+        type = COMM;
+    }
+    else if (memcmp(ptype, "CR32", 4) == 0) {
+        type = CR32;
+        datatype = i32;
+    }
+    else if (memcmp(ptype, "HUFF", 4) == 0) {
+        type = HUFF;
+    }
+    else if (memcmp(ptype, "REGN", 4) == 0) {
+        type = REGN;
+        datatype = i32;
+    }
+    else if (memcmp(ptype, "SAMP", 4) == 0) {
+        type = SAMP;
+        datatype = i16;
+    }
+    else if (memcmp(ptype, "SMP4", 4) == 0) {
+        type = SMP4;
+        datatype = i16v4;
+    }
+    else if (memcmp(ptype, "TEXT", 4) == 0) {
+        type = TEXT;
+    }
+
+    metadata = meta_getValueForNameAndRemove(meta, count, "VALTYPE");
+    if (metadata != NULL) {
+        if (strcmp(metadata, "16 bit integer") == 0)
+            datatype = i16;
+        else if (strcmp(metadata, "32 bit integer") == 0)
+            datatype = i32;
+        else if (strcmp(metadata, "32 bit IEEE float") == 0)
+            datatype = f32;
+        else if (strcmp(metadata, "64 bit IEEE float") == 0)
+            datatype = f64;
+    }
+
+    datasize = ztr_raw->datalength;
+    data = ztr_raw->data;
+#if 0
+	if (datasize > 0 && *data == 0x4D) {
+		if (data[1] < 128)
+			return RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+		rc = decompress_huffman(&ctx->huffman_table[data[1] - 128], (const uint8_t **)&data, &datasize);
+		if (rc)
+			return rc;
+		ztr_raw->datalength = datasize;
+		ztr_raw->data = (uint8_t *)data;
+	}
+#endif
+
+    switch (type) {
+        case BASE:
+            ztr.sequence = malloc(sizeof(*ztr.sequence));
+            if (ztr.sequence == NULL)
+            {
+                rc = RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+                PLOGERR ( klogErr, ( klogErr, rc, "$(func) - '$(type)' chunk data",
+                                     "func=ZTR_ProcessBlock,type=%.*s", 4, & ztr_raw->type ));
+                return rc;
+            }
+            *chunkType = type;
+            ztr.sequence->datatype = datatype;
+            ztr.sequence->datasize = datasize;
+            ztr.sequence->charset = (char *)meta_getValueForNameAndRemove(meta, count, "CSET");
+            ztr.sequence->data = (uint8_t *)data;
+            break;
+        case BPOS:
+            ztr.position = malloc(sizeof(*ztr.position));
+            if (ztr.position == NULL)
+            {
+                rc = RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+                PLOGERR ( klogErr, ( klogErr, rc, "$(func) - '$(type)' chunk data",
+                                     "func=ZTR_ProcessBlock,type=%.*s", 4, & ztr_raw->type ));
+                return rc;
+            }
+            *chunkType = type;
+            ztr.position->datatype = datatype;
+            ztr.position->datasize = datasize;
+            ztr.position->data = (uint8_t *)data;
+            break;
+        case CLIP:
+            ztr.clip = malloc(sizeof(ztr.clip));
+            if (ztr.clip == NULL)
+            {
+                rc = RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+                PLOGERR ( klogErr, ( klogErr, rc, "$(func) - '$(type)' chunk data",
+                                     "func=ZTR_ProcessBlock,type=%.*s", 4, & ztr_raw->type ));
+                return rc;
+            }
+            *chunkType = type;
+            ztr.clip->left  = (((((data[0] << 8) | data[1]) << 8) | data[2]) << 8) | data[3];
+            ztr.clip->right = (((((data[4] << 8) | data[5]) << 8) | data[6]) << 8) | data[7];
+            break;
+        case CNF1:
+            ztr.quality1 = malloc(sizeof(*ztr.quality1));
+            if (ztr.quality1 == NULL)
+            {
+                rc = RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+                PLOGERR ( klogErr, ( klogErr, rc, "$(func) - '$(type)' chunk data",
+                           "func=ZTR_ProcessBlock,type=%.*s", 4, & ztr_raw->type ));
+                return rc;
+            }
+            *chunkType = type;
+            ztr.quality1->datatype = datatype;
+            ztr.quality1->datasize = datasize;
+            if ((ztr.quality1->scale = (char *)meta_getValueForNameAndRemove(meta, count, "SCALE")) == NULL)
+                ztr.quality1->scale = "PH";
+            ztr.quality1->data = (uint8_t *)data;
+            break;
+        case CNF4:
+            ztr.quality4 = malloc(sizeof(*ztr.quality4));
+            if (ztr.quality4 == NULL)
+            {
+                rc = RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+                PLOGERR ( klogErr, ( klogErr, rc, "$(func) - '$(type)' chunk data",
+                           "func=ZTR_ProcessBlock,type=%.*s", 4, & ztr_raw->type ));
+                return rc;
+            }
+            *chunkType = type;
+            ztr.quality4->datatype = datatype;
+            ztr.quality4->datasize = datasize;
+            if ((ztr.quality4->scale = (char *)meta_getValueForNameAndRemove(meta, count, "SCALE")) == NULL)
+                ztr.quality4->scale = "PH";
+            ztr.quality4->data = (uint8_t *)data;
+            break;
+        case COMM:
+            ztr.comment = malloc(sizeof(*ztr.comment) + datasize);
+            if (ztr.comment == NULL)
+            {
+                rc = RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+                PLOGERR ( klogErr, ( klogErr, rc, "$(func) - '$(type)' chunk data",
+                           "func=ZTR_ProcessBlock,type=%.*s", 4, & ztr_raw->type ));
+                return rc;
+            }
+            *chunkType = type;
+            ztr.comment->size = datasize;
+            ztr.comment->text = (char *)data;
+            break;
+#if ZTR_USE_TEXT_CHUNK
+#else
+        case TEXT:
+#endif
+        case CR32:
+            *chunkType = ignore;
+#if 0
+            if (ctx->checksum != ((((((data[0] << 8) | data[1]) << 8) | data[2]) << 8) | data[3]))
+            {
+                rc = RC ( rcSRA, rcFormatter, rcParsing, rcData, rcCorrupt );
+                PLOGERR ( klogErr, ( klogErr, rc, "$(func) - checksum error", "func=ZTR_ProcessBlock" ));
+                return rc;
+            }
+            ctx->checksum = 0;
+#endif
+            break;
+        case HUFF:
+            *chunkType = ignore;
+			if (data[1] < 128)
+				return RC(rcSRA, rcFormatter, rcParsing, rcData, rcInvalid);
+			rc = handle_huffman_codes(&ctx->huffman_table[data[1] - 128], data + 2, datasize - 2);
+			if (rc)
+				return rc;
+            break;
+        case REGN:
+        {
+            int region_count;
+            int n;
+            
+            metadata = meta_getValueForNameAndRemove(meta, count, "NAME");
+            if (metadata) {
+                const char *cp;
+                
+                region_count = 1;
+                if (metadata[strlen(metadata) - 1] == ';')
+                    region_count = 0;
+                for (cp = metadata; (cp = strchr(cp, ';')) != NULL; ++cp)
+                    ++region_count;
+            }
+            else
+                region_count = 0;
+            switch (datatype) {
+                case i16:
+                    if ((datasize & 1) != 0) {
+                        --datasize;
+                        data = ((uint8_t *)data) + 1;
+                    }
+                    if ((datasize >> 1) < (region_count - 1)) {
+                        rc = RC ( rcSRA, rcFormatter, rcParsing, rcData, rcInsufficient );
+                        PLOGERR ( klogSys, ( klogSys, rc, "$(func) - '$(type)' chunk data",
+                                  "func=ZTR_ProcessBlock,type=%.*s", 4, & ztr_raw->type ));
+                        return rc;
+                    }
+                    break;
+                case i32:
+                    if ((datasize & 1) != 0) {
+                        --datasize;
+                        data = ((uint8_t *)data) + 1;
+                    }
+                    if ((datasize >> 2) < (region_count - 1)) {
+                        rc = RC ( rcSRA, rcFormatter, rcParsing, rcData, rcInsufficient );
+                        PLOGERR ( klogSys, ( klogSys, rc, "$(func) - '$(type)' chunk data",
+                                  "func=ZTR_ProcessBlock,type=%.*s", 4, & ztr_raw->type ));
+                        return rc;
+                    }
+                    break;
+                default:
+                    break;
+            }
+            ztr.region = NULL;
+            n = (size_t)(&ztr.region->region[region_count]) + (metadata ? (strlen(metadata) + 1) : 0);
+            ztr.region = malloc(n);
+            if (ztr.region == NULL)
+            {
+                rc = RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+                PLOGERR ( klogSys, ( klogSys, rc, "$(func) - '$(type)' chunk data",
+                           "func=ZTR_ProcessBlock,type=%.*s", 4, & ztr_raw->type ));
+                return rc;
+            }
+            *chunkType = type;
+            ztr.region->count = region_count;
+            if (region_count > 0) {
+                char *temp = (char *)&ztr.region->region[region_count];
+                int i, st;
+                
+                strcpy(temp, metadata);
+                for (i = st = 0; *temp != '\0'; ++temp) {
+                    switch (st) {
+                        case 0:
+                            if (!isspace(*temp)) {
+                                ztr.region->region[i].name = temp;
+                                ++st;
+                            }
+                            break;
+                        case 1:
+                            if (*temp == ':') {
+                                char *cp = temp - 1;
+                                
+                                while (isspace(*cp))
+                                    *cp-- = '\0';
+                                *temp = '\0';
+                                ++st;
+                            }
+                            break;
+                        case 2:
+                            if (!isspace(*temp)) {
+                                ztr.region->region[i].type = *temp;
+                                if (i == region_count - 1)
+                                    ztr.region->region[0].start = 0;
+                                else
+                                    switch (datatype) {
+                                        case i16:
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+                                            ztr.region->region[i + 1].start = bswap_16(((const int16_t *)data)[i]);
+#else
+                                            ztr.region->region[i + 1].start = ((const int16_t *)data)[i];
+#endif
+                                            break;
+                                        case i32:
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+                                            ztr.region->region[i + 1].start = bswap_32(((const int32_t *)data)[i]);
+#else
+                                            ztr.region->region[i + 1].start = ((const int32_t *)data)[i];
+#endif
+                                            break;
+                                        default:
+                                            break;
+                                    }
+                                ++i;
+                                ++st;
+                            }
+                            break;
+                        case 3:
+                            if (*temp == ';')
+                                st = 0;
+                            break;
+                    }
+                }
+            }
+        }
+            break;
+        case SAMP:
+            ztr.signal = malloc(sizeof(*ztr.signal));
+            if (ztr.signal == NULL)
+            {
+                rc = RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+                PLOGERR ( klogErr, ( klogErr, rc, "$(func) - '$(type)' chunk data",
+                           "func=ZTR_ProcessBlock,type=%.*s", 4, & ztr_raw->type ));
+                return rc;
+            }
+            *chunkType = type;
+            ztr.signal->datatype = datatype;
+            ztr.signal->datasize = datasize;
+			metadata = (char *)meta_getValueForNameAndRemove(meta, count, "OFFS");
+			ztr.signal->offset = metadata == NULL ? 0 : strtol(metadata, 0, 0);
+            ztr.signal->channel = (char *)meta_getValueForNameAndRemove(meta, count, "TYPE");
+            ztr.signal->data = (uint8_t *)data;
+            break;
+        case SMP4:
+            ztr.signal4 = malloc(sizeof(*ztr.signal4));
+            if (ztr.signal4 == NULL)
+            {
+                rc = RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+                PLOGERR ( klogErr, ( klogErr, rc, "$(func) - '$(type)' chunk data",
+                           "func=ZTR_ProcessBlock,type=%.*s", 4, & ztr_raw->type ));
+                return rc;
+            }
+            *chunkType = type;
+            ztr.signal4->datatype = datatype;
+            ztr.signal4->datasize = datasize;
+			metadata = (char *)meta_getValueForNameAndRemove(meta, count, "OFFS");
+			ztr.signal->offset = metadata == NULL ? 0 : strtol(metadata, 0, 0);
+            ztr.signal4->Type   = (char *)meta_getValueForNameAndRemove(meta, count, "TYPE");
+            ztr.signal4->data = (uint8_t *)data;
+            break;
+#if ZTR_USE_TEXT_CHUNK
+        case TEXT:
+        {
+            int n;
+            const char *const end = (const char *)(data + datasize);
+            const char *cp;
+
+            for (cp = (const char *)data, n = 0; cp < end; ++n) {
+                size_t len = strendlen(cp, end);
+                
+                if (len == 0)
+                    break;
+                cp += len + 1;
+                len = strendlen(cp, end);
+                cp += len + 1;
+            }
+            if (n != 0) {
+                int i;
+
+                ztr.xmeta = malloc(sizeof(*ztr.xmeta) + (n - 1) * sizeof(nvp_t));
+                if (ztr.xmeta == NULL)
+                {
+                    rc = RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+                    PLOGERR ( klogErr, ( klogErr, rc, "$(func) - '$(type)' chunk data",
+                               "func=ZTR_ProcessBlock,type=%.*s", 4, & ztr_raw->type ));
+                    return rc;
+                }
+                *chunkType = type;
+                ztr.xmeta->count = n;
+                for (i = 0, cp = (const char *)data; i != n; ++i) {
+                    size_t len = strendlen(cp, end);
+                    
+                    if (len == 0)
+                        break;
+                    ztr.xmeta->data[i].name = cp;
+                    cp += len + 1;
+                    ztr.xmeta->data[i].value = cp;
+                    len = strendlen(cp, end);
+                    cp += len + 1;
+                }
+            }
+        }
+            break;
+#endif
+        default:
+            *chunkType = unknown;
+            DEBUG_MSG(1, ("$(func) - chunk '$(type)' unrecognized", "func=ZTR_ProcessBlock,type=%.*s\n", 4, & ztr_raw->type ));
+            break;
+    }
+
+    *dst = ztr;
+#if ZTR_USE_EXTRA_META
+    if (extraMeta != NULL && extraMetaCount != NULL) {
+        int i, j, k;
+        
+        for (k = j = i = 0; i != count; ++i)
+            if (meta[i].name != NULL) {
+                k += strlen(meta[i].name) + strlen(meta[i].value) + 2;
+                ++j;
+            }
+        *extraMetaCount = 0;
+        *extraMeta = NULL;
+        if (j > 0) {
+            *extraMeta = malloc(sizeof(nvp_t) * j + k);
+            if (*extraMeta != NULL) {
+                char *temp = (char *)(*extraMeta + j);
+                
+                for (j = i = 0; i != count; ++i)
+                    if (meta[i].name != NULL) {
+                        strcpy(temp, meta[i].name);
+                        (*extraMeta)[j].name = temp;
+                        temp += strlen(temp) + 1;
+                        strcpy(temp, meta[i].value);
+                        (*extraMeta)[j].value = temp;
+                        temp += strlen(temp) + 1;
+                    }
+            }
+        }
+    }
+#endif
+    if (meta != NULL)
+        free(meta);
+    return 0;
+}
+
+rc_t ILL_ZTR_CreateContext(ZTR_Context **ctx)
+{
+    rc_t rc;
+
+    assert(ctx);
+
+    *ctx = malloc(sizeof(**ctx));
+    if (*ctx)
+    {
+        memset(*ctx, 0, sizeof(**ctx));
+        return 0;
+    }
+
+    rc = RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+    PLOGERR ( klogErr, ( klogErr, rc, "$(func)", "func=ZTR_CreateContext" ));
+    return rc;
+}
+
+rc_t ILL_ZTR_AddToBuffer(ZTR_Context *ctx, const uint8_t *data, uint32_t datasize)
+{
+    rc_t rc;
+
+    assert(ctx);
+    if (ctx->buf[0] == NULL) {
+        ctx->current = 0;
+        ctx->buf[0] = data;
+        ctx->buflen[0] = datasize;
+        return 0;
+    }
+    if (ctx->buf[1] == NULL) {
+        ctx->buf[1] = data;
+        ctx->buflen[1] = datasize;
+        return 0;
+    }
+
+    rc = RC ( rcSRA, rcFormatter, rcParsing, rcBuffer, rcExhausted );
+    PLOGERR ( klogErr, ( klogErr, rc, "$(func) - both buffers are in use",
+               "func=ZTR_AddToBuffer" ));
+    return rc;
+}
+
+
+rc_t ILL_ZTR_ParseHeader(ZTR_Context *ctx)
+{
+    uint8_t src[10];
+    int len;
+    
+    assert(ctx);
+    
+    len = ztr_read(ctx, src, 10);
+    if (len != 10)
+        return RC ( rcSRA, rcFormatter, rcParsing, rcData, rcInsufficient );
+
+    if (memcmp(src, ZTR_SIG, 8) != 0)
+        return RC ( rcSRA, rcFormatter, rcParsing, rcData, rcCorrupt );
+
+    if ((ctx->versMajor = src[8]) != 1)
+        return RC ( rcSRA, rcFormatter, rcParsing, rcData, rcBadVersion );
+
+    ctx->versMinor = src[9];
+
+    return 0;
+}
+
+rc_t ILL_ZTR_ContextRelease(ZTR_Context *self) {
+    int i;
+    
+    if (self != NULL)
+    {
+        for (i = 0; i != 128; ++i) {
+            free_huffman_table(self->huffman_table + i);
+        }
+        free(self);
+    }
+    return 0;
+}
+
+rc_t ILL_ZTR_BufferGetRemainder(ZTR_Context *ctx, const uint8_t **data, uint32_t *datasize)
+{
+    assert(ctx);
+    assert(data);
+    assert(datasize);
+    
+    *data = NULL;
+    *datasize = ctx->buflen[0] + ctx->buflen[1] - ctx->current;
+    if (*datasize != 0) {
+        void *r = malloc(*datasize);
+        if (r == NULL)
+        {
+            rc_t rc = RC ( rcSRA, rcFormatter, rcParsing, rcMemory, rcExhausted );
+            PLOGERR ( klogErr, ( klogErr, rc, "$(func)", "func=ZTR_BufferGetRemainder" ));
+            return rc;
+        }
+        ztr_read(ctx, r, *datasize);
+        *data = r;
+    }
+    return 0;
+}
diff --git a/tools/sra-load/ztr-illumina.h b/tools/sra-load/ztr-illumina.h
new file mode 100644
index 0000000..575348b
--- /dev/null
+++ b/tools/sra-load/ztr-illumina.h
@@ -0,0 +1,136 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _sra_load_ztr_illumina_
+#define _sra_load_ztr_illumina_
+
+#include <klib/defs.h>
+
+#include "ztr.h"
+
+typedef struct ztr_raw_t {
+    uint8_t type[4];
+    size_t metalength, datalength;
+    uint8_t *meta, *data;
+} ztr_raw_t;
+
+/* allocate and initialize a ZTR parser context
+   caller is responsible to free resulting pointer
+
+   return 1 if context can't be allocated,
+   0 for no error.
+ */
+rc_t ILL_ZTR_CreateContext(ZTR_Context **ctx);
+
+/* add some bytes to context's input buffer
+   the caller is responsible for ensuring that
+   the pointer remains valid until the bytes
+   are consumed.  the caller is responsible for
+   free'ing it.  the context will simply forget
+   the bytes when it has consumed them all.
+ 
+   returns 1 if data can't be added to the buffer chain,
+   0 for no error.
+ */
+rc_t ILL_ZTR_AddToBuffer(ZTR_Context *ctx, const uint8_t *data, uint32_t datasize);
+
+/* get a copy of any unconsumed input bytes from the context.
+   the bytes are consumed in the process.  the caller is
+   responsible for free'ing the resulting pointer.
+   the resulting pointer is should be sent in to AddToBuffer
+   when more bytes are available.
+ 
+   returns 1 if the *data can't be allocated, 0 for no error.
+ */
+rc_t ILL_ZTR_BufferGetRemainder(ZTR_Context *ctx, const uint8_t **data, uint32_t *datasize);
+
+bool ILL_ZTR_BufferIsEmpty(const ZTR_Context *ctx);
+
+/* parse a ZTR header from the input buffer
+   returns 0 if no error, 1 otherwise
+ */
+rc_t ILL_ZTR_ParseHeader(ZTR_Context *ctx);
+
+/* parse a ZTR block from the input buffer
+   returns
+        0: no error
+        1: not valid ZTR
+        2: out of memory
+
+   the caller is responsible for free'ing ztr_raw->meta and
+   ztr_raw->data when it is no longer needed
+ */
+rc_t ILL_ZTR_ParseBlock(ZTR_Context *ctx, ztr_raw_t *ztr_raw);
+
+/* cook a ztr_raw_t to produce a ztr_t
+   sets defaults, processes meta data, etc.
+
+   returns
+        0: no error
+        1: not valid ZTR
+        2: out of memory
+
+   Parameters:
+    ctx [in]: the context returned from ZTR_CreateContext
+    ztr_raw [in]: the structure filled in by ZTR_ParseBlock
+    ztr [out]: the resulting data object
+    chunkType [out]: how to interpret the data object
+        if chunkType is none or unknown, it is probably an error
+        if chunkType is ignore, then the chunk was valid and known
+        but of no interest to you, e.g. a huffman dictionary chunk
+    extraMeta [out optional]: any unprocessed name-value pairs
+    extraMetaCount [out optional]: the number of unprocessed name-value pairs
+ 
+   NB. ztr and its pointers refer to ztr_raw, so don't free
+   ztr_raw before you are done with ztr
+ 
+   ztr can be free'ed in one-fell-swoop
+   *extraMeta can be free'ed in one-fell-swoop
+ */
+#if ZTR_USE_EXTRA_META
+    rc_t ILL_ZTR_ProcessBlock(ZTR_Context *ctx, ztr_raw_t *ztr_raw, ztr_t *ztr,
+                              enum ztr_chunk_type *chunkType, nvp_t **extraMeta, int *extraMetaCount);
+#else
+    rc_t ILL_ZTR_ProcessBlock(ZTR_Context *ctx, ztr_raw_t *ztr_raw, ztr_t *ztr,
+                              enum ztr_chunk_type *chunkType);
+#endif
+
+/* free a context created by ZTR_CreateContext
+   do this when done processing the ZTR stream.
+ */
+rc_t ILL_ZTR_ContextRelease(ZTR_Context *ctx);
+
+rc_t ILL_ZTR_Decompress(ZTR_Context *ctx, enum ztr_chunk_type type, ztr_t ztr, const ztr_t base);
+
+#define ZTR_CreateContext		ILL_ZTR_CreateContext
+#define ZTR_ContextRelease		ILL_ZTR_ContextRelease
+#define ZTR_AddToBuffer			ILL_ZTR_AddToBuffer
+#define ZTR_BufferGetRemainder	ILL_ZTR_BufferGetRemainder
+#define ZTR_BufferIsEmpty		ILL_ZTR_BufferIsEmpty
+#define ZTR_ParseHeader			ILL_ZTR_ParseHeader
+#define ZTR_ParseBlock			ILL_ZTR_ParseBlock
+#define ZTR_ProcessBlock		ILL_ZTR_ProcessBlock
+
+#endif /* _sra_load_ztr_illumina_ */
diff --git a/tools/sra-load/ztr.h b/tools/sra-load/ztr.h
new file mode 100644
index 0000000..4265121
--- /dev/null
+++ b/tools/sra-load/ztr.h
@@ -0,0 +1,182 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#ifndef _sra_load_ztr_
+#define _sra_load_ztr_
+
+#define ZTR_USE_TEXT_CHUNK 0
+#define ZTR_USE_EXTRA_META 0
+
+#define ZTR_SIG "\xaeZTR\r\n\x1A\n"
+/* does buffer contain a ZTR signature?
+ */
+#define ZTR_IsSignature(X, N) ((N >= 8) && (memcmp(X, ZTR_SIG, 8) == 0) ? 1 : 0)
+
+#define METANAME_IS_CASE_SENSITIVE 1
+
+enum ztr_data_type {
+	i8,
+	i16,
+	i32,
+	f32,
+	f64,
+	vector4 = 16,
+	i8v4  = i8  | vector4,
+	i16v4 = i16 | vector4,
+	i32v4 = i32 | vector4,
+	f32v4 = f32 | vector4,
+	f64v4 = f64 | vector4
+};
+
+enum ztr_chunk_type {
+	none,
+	unknown,
+	ignore,
+	BASE,
+	BPOS,
+	CLIP,
+	CNF1,
+	CNF4,
+	REGN,
+	SAMP,
+	SMP4,
+	TEXT,
+	COMM,
+	CR32,
+	HUFF,
+
+	READ = BASE,
+	POSITION = BPOS,
+	QUALITY1 = CNF1,
+	QUALITY4 = CNF4,
+	READ_STRUCTURE = REGN,
+	SIGNAL1 = SAMP,
+	SIGNAL4 = SMP4
+};
+
+enum region_type {
+	Biological = 'B',
+	Duplicate = 'D',
+	Explicit = 'E',
+	Inverted = 'I',
+	Normal = 'N',
+	Paired = 'P',
+	Technical = 'T'
+};
+
+typedef struct region_t region_t;
+struct region_t {
+	int start;
+	enum region_type type;
+	char *name;
+};
+
+struct ztr_sequence_t {
+	enum ztr_data_type datatype;
+	size_t datasize;
+	uint8_t *data;
+	char *charset;
+};
+
+struct ztr_position_t {
+	enum ztr_data_type datatype;
+	size_t datasize;
+	uint8_t *data;
+};
+
+struct ztr_clip_t {
+	uint32_t left, right;
+};
+
+struct ztr_quality1_t {
+	enum ztr_data_type datatype;
+	size_t datasize;
+	uint8_t *data;
+	char *scale;
+};
+
+struct ztr_quality4_t {
+	enum ztr_data_type datatype;
+	size_t datasize;
+	uint8_t *data;
+	char *scale;
+};
+
+struct ztr_comment_t {
+	size_t size;
+	char *text;
+};
+
+struct ztr_region_t {
+	size_t count;
+	region_t region[1];
+};
+
+struct ztr_signal_t {
+	enum ztr_data_type datatype;
+	size_t datasize;
+	uint8_t *data;
+	char *channel;
+	long offset;
+};
+
+struct ztr_signal4_t {
+	enum ztr_data_type datatype;
+	size_t datasize;
+	uint8_t *data;
+	char *Type;
+	long offset;
+};
+
+typedef struct nvp_t {
+    const char *name,
+    *value;
+} nvp_t;
+
+#if ZTR_USE_TEXT_CHUNK
+struct ztr_xmetadata_t {
+	size_t count;
+	nvp_t data[1];
+};
+#endif
+
+typedef union ztr_t {
+	struct ztr_sequence_t   *sequence;  /* chunk type 'BASE' */
+	struct ztr_position_t   *position;  /* chunk type 'BPOS' */
+	struct ztr_clip_t       *clip;      /* chunk type 'CLIP' */
+	struct ztr_quality1_t   *quality1;  /* chunk type 'CNF1' */
+	struct ztr_quality4_t   *quality4;  /* chunk type 'CNF4' */
+	struct ztr_comment_t    *comment;   /* chunk type 'COMM' */
+	struct ztr_region_t     *region;    /* chunk type 'REGN' */
+	struct ztr_signal_t     *signal;    /* chunk type 'SAMP' */
+	struct ztr_signal4_t    *signal4;   /* chunk type 'SMP4' */
+#if ZTR_USE_TEXT_CHUNK
+	struct ztr_xmetadata_t  *xmeta;     /* chunk type 'TEXT' */
+#endif
+} ztr_t;
+
+typedef struct ZTR_Context ZTR_Context;
+
+#endif /* _sra_load_ztr_ */
diff --git a/tools/sra-pileup/.gitignore b/tools/sra-pileup/.gitignore
new file mode 100644
index 0000000..c112998
--- /dev/null
+++ b/tools/sra-pileup/.gitignore
@@ -0,0 +1,2 @@
+*.txt
+*.sh
diff --git a/tools/sra-pileup/4na_ascii.c b/tools/sra-pileup/4na_ascii.c
new file mode 100644
index 0000000..6a1d02a
--- /dev/null
+++ b/tools/sra-pileup/4na_ascii.c
@@ -0,0 +1,95 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <os-native.h>
+#include <insdc/sra.h>
+
+/***************************************
+    N (0x4E)  n (0x6E)  <--> 0x0
+    A (0x41)  a (0x61)  <--> 0x1
+    C (0x43)  c (0x63)  <--> 0x2
+    M (0x4D)  m (0x6D)  <--> 0x3
+    G (0x47)  g (0x67)  <--> 0x4
+    R (0x52)  r (0x72)  <--> 0x5
+    S (0x53)  s (0x73)  <--> 0x6
+    V (0x56)  v (0x76)  <--> 0x7
+    T (0x54)  t (0x74)  <--> 0x8
+    W (0x57)  w (0x77)  <--> 0x9
+    Y (0x59)  y (0x79)  <--> 0xA
+    H (0x48)  h (0x68)  <--> 0xB
+    K (0x4B)  k (0x6B)  <--> 0xC
+    D (0x44)  d (0x64)  <--> 0xD
+    B (0x42)  b (0x62)  <--> 0xE
+    N (0x4E)  n (0x6E)  <--> 0xF
+***************************************/
+
+
+static char _4na_2_ascii_tab[] =
+{
+/*  0x0  0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F */
+    'N', 'A', 'C', 'M', 'G', 'R', 'S', 'V', 'T', 'W', 'Y', 'H', 'K', 'D', 'B', 'N',
+    'n', 'a', 'c', 'm', 'g', 'r', 's', 'v', 't', 'w', 'y', 'h', 'k', 'd', 'b', 'n'
+};
+
+
+/***************************************
+    N (0x4E)  n (0x6E)  <--> 0x0
+    A (0x41)  a (0x61)  <--> 0x0
+    C (0x43)  c (0x63)  <--> 0x1
+    M (0x4D)  m (0x6D)  <--> 0x0
+    G (0x47)  g (0x67)  <--> 0x2
+    R (0x52)  r (0x72)  <--> 0x0
+    S (0x53)  s (0x73)  <--> 0x0
+    V (0x56)  v (0x76)  <--> 0x0
+    T (0x54)  t (0x74)  <--> 0x3
+    W (0x57)  w (0x77)  <--> 0x0
+    Y (0x59)  y (0x79)  <--> 0x0
+    H (0x48)  h (0x68)  <--> 0x0
+    K (0x4B)  k (0x6B)  <--> 0x0
+    D (0x44)  d (0x64)  <--> 0x0
+    B (0x42)  b (0x62)  <--> 0x0
+    N (0x4E)  n (0x6E)  <--> 0x0
+***************************************/
+
+
+static uint32_t _4na_2_index_tab[] =
+{
+/*  0x0  0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F */
+     0,   0,   1,   0,   2,   0,  0,   0,   3,   0,   0,   0,   0,   0,   0,   0 
+};
+
+
+/* ------------------------------------------------------------------------------------- */
+
+char _4na_to_ascii( INSDC_4na_bin c, bool reverse )
+{
+    return _4na_2_ascii_tab[ ( c & 0x0F ) | ( reverse ? 0x10 : 0 ) ];
+}
+
+uint32_t _4na_to_index( INSDC_4na_bin c )
+{
+    return _4na_2_index_tab[ ( c & 0x0F ) ];
+}
diff --git a/tools/sra-pileup/4na_ascii.h b/tools/sra-pileup/4na_ascii.h
new file mode 100644
index 0000000..8146778
--- /dev/null
+++ b/tools/sra-pileup/4na_ascii.h
@@ -0,0 +1,44 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_4na_ascii_
+#define _h_4na_ascii_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <os-native.h>
+#include <insdc/sra.h>
+
+char _4na_to_ascii( INSDC_4na_bin c, bool reverse );
+uint32_t _4na_to_index( INSDC_4na_bin c );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_4na_ascii_ */
diff --git a/tools/sra-pileup/Makefile b/tools/sra-pileup/Makefile
new file mode 100644
index 0000000..11b7207
--- /dev/null
+++ b/tools/sra-pileup/Makefile
@@ -0,0 +1,133 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/sra-pileup
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+	sra-pileup \
+	sam-dump
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# sra-pileup
+#
+TOOL_SRC = \
+	dyn_string \
+	cmdline_cmn \
+	out_redir \
+	perf_log \
+	reref \
+	cg_tools \
+	report_deletes \
+	ref_regions \
+	4na_ascii \
+	ref_walker_0 \
+	ref_walker \
+	walk_debug \
+	pileup_counters \
+	pileup_index \
+	pileup_indels \
+	pileup_varcount \
+	pileup_stat \
+	pileup_v2 \
+	sra-pileup
+
+TOOL_OBJ = \
+	$(addsuffix .$(OBJX),$(TOOL_SRC))
+
+TOOL_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lm
+
+$(BINDIR)/sra-pileup: $(TOOL_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(TOOL_LIB)
+
+
+#-------------------------------------------------------------------------------
+# sam-dump
+#
+SAMDUMP3_SRC = \
+	inputfiles \
+	perf_log \
+	rna_splice_log \
+	sam-dump-opts \
+	out_redir \
+	sam-hdr \
+	sam-hdr1 \
+	matecache \
+	read_fkt \
+	sam-aligned \
+	sam-unaligned \
+	md_flag \
+	cg_tools \
+	sam-dump \
+	sam-dump3
+
+SAMDUMP3_OBJ = \
+	$(addsuffix .$(OBJX),$(SAMDUMP3_SRC))
+
+SAMDUMP3_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lm
+
+ifdef NCBI
+CFLAGS += -DNCBI
+endif
+
+$(BINDIR)/sam-dump: $(SAMDUMP3_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(SAMDUMP3_LIB)
+
diff --git a/tools/sra-pileup/cg_tools.c b/tools/sra-pileup/cg_tools.c
new file mode 100644
index 0000000..df123d7
--- /dev/null
+++ b/tools/sra-pileup/cg_tools.c
@@ -0,0 +1,1723 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "cg_tools.h"
+#include "debug.h"
+#include <klib/out.h>
+
+#include <klib/printf.h>
+#include <sysalloc.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+
+static void SetCigOp( CigOps * dst, char op, uint32_t oplen )
+{
+    dst->op    = op;
+    dst->oplen = oplen;
+    switch( op ) 
+    { /*MX= DN B IS PH*/
+
+    case 'M' :
+    case 'X' :
+    case '=' :  dst->ref_sign = +1;
+                dst->seq_sign = +1;
+                break;
+
+    case 'D' :
+    case 'N' :  dst->ref_sign = +1;
+                dst->seq_sign = 0;
+                break;
+
+    case 'B' :  dst->ref_sign = -1;
+                dst->seq_sign = 0;
+                break;
+
+    case 'S' :
+    case 'I' :  dst->ref_sign = 0;
+                dst->seq_sign = +1;
+                break;
+
+    case 'P' :
+    case 'H' :
+    case 0   :  dst->ref_sign= 0;   /* terminating op */
+                dst->seq_sign= 0;
+                break;
+
+    default :   assert( 0 );
+                break;
+    }
+}
+
+
+int32_t ExplodeCIGAR( CigOps dst[], uint32_t len, char const cigar[], uint32_t ciglen )
+{
+    uint32_t i;
+    uint32_t j;
+    int32_t opLen;
+    
+    for ( i = j = opLen = 0; i < ciglen; ++i )
+    {
+        if ( isdigit( cigar[ i ] ) )
+        {
+            opLen = opLen * 10 + cigar[ i ] - '0';
+        }
+        else
+        {
+            assert( isalpha( cigar[ i ] ) );
+            SetCigOp( dst + j, cigar[ i ], opLen );
+            opLen = 0;
+            j++;
+        }
+    }
+    SetCigOp( dst + j, 0, 0 );
+    j++;
+    return j;
+}
+
+
+typedef struct cgOp_s
+{
+    uint16_t length;
+    uint8_t type; /* 0: match, 1: insert, 2: delete */
+    char code;
+} cgOp;
+
+
+static void print_CG_cigar( int line, cgOp const op[], unsigned const ops, unsigned const gap[ 3 ] )
+{
+#if _DEBUGGING
+    unsigned i;
+    
+    SAM_DUMP_DBG( 3, ( "%5i: ", line ) );
+    for ( i = 0; i < ops; ++i )
+    {
+        if ( gap && ( i == gap[ 0 ] || i == gap[ 1 ] || i == gap[ 2 ] ) )
+        {
+            SAM_DUMP_DBG( 3, ( "%u%c", op[ i ].length, tolower( op[ i ].code ) ) );
+        }
+        else
+        {
+            SAM_DUMP_DBG( 3, ( "%u%c", op[ i ].length, toupper( op[ i ].code ) ) );
+        }
+    }
+    SAM_DUMP_DBG( 3, ( "\n" ) );
+#endif
+}
+
+
+/* gap contains the indices of the wobbles in op
+ * gap[0] is between read 1 and 2; it is the 'B'
+ * gap[1] is between read 2 and 3; it is an 'N'
+ * gap[2] is between read 3 and 4; it is an 'N'
+ */
+
+typedef struct cg_cigar_temp
+{
+    unsigned gap[ 3 ];
+    cgOp cigOp[ MAX_READ_LEN ];
+    unsigned opCnt;
+    unsigned S_adjust;
+    unsigned CG_adjust;
+    bool     has_ref_offset_type;
+} cg_cigar_temp;
+
+
+static rc_t CIGAR_to_CG_Ops( const cg_cigar_input * input,
+                             cg_cigar_temp * tmp )
+{
+    unsigned i;
+    unsigned ops = 0;
+    unsigned gapno;
+
+    tmp->opCnt = 0;
+    tmp->S_adjust = 0;
+    tmp->CG_adjust = 0;
+    tmp->has_ref_offset_type = false;
+    for ( i = 0; i < input->p_cigar.len; ++ops )
+    {
+        char opChar = 0;
+        int opLen = 0;
+        int n;
+
+        for ( n = 0; ( ( n + i ) < input->p_cigar.len ) && ( isdigit( input->p_cigar.ptr[ n + i ] ) ); n++ )
+        {
+            opLen = opLen * 10 + input->p_cigar.ptr[ n + i ] - '0';
+        }
+
+        if ( ( n + i ) < input->p_cigar.len )
+        {
+            opChar = input->p_cigar.ptr[ n + i ];
+            n++;
+        }
+
+        if ( ( ops + 1 ) >= MAX_READ_LEN )
+            return RC( rcExe, rcData, rcReading, rcBuffer, rcInsufficient );
+
+        i += n;
+        
+        tmp->cigOp[ ops ].length = opLen;
+        tmp->cigOp[ ops ].code = opChar;
+        switch ( opChar )
+        {
+            case 'M' :
+            case '=' :
+            case 'X' :  tmp->cigOp[ ops ].type = 0;
+                        break;
+
+            case 'S' :  tmp->S_adjust += opLen;
+            case 'I' :  tmp->cigOp[ ops ].type = 1;
+                        tmp->cigOp[ ops ].code = 'I';
+                        break;
+	    case 'N':   tmp->has_ref_offset_type = true;
+            case 'D':   tmp->cigOp[ ops ].type = 2;
+                        break;
+
+            default :   return RC( rcExe, rcData, rcReading, rcConstraint, rcViolated );
+        }
+    }
+
+    tmp->opCnt = ops;
+    tmp->gap[ 0 ] = tmp->gap[ 1 ] = tmp->gap[ 2 ] = ops;
+    print_CG_cigar( __LINE__, tmp->cigOp, ops, NULL );
+
+
+    if ( ops < 3 )
+        return RC( rcExe, rcData, rcReading, rcFormat, rcNotFound ); /* CG pattern not found */
+
+    {
+        unsigned fwd = 0; /* 5 10 10 10 */
+        unsigned rev = 0; /* 10 10 10 5 */
+        unsigned acc; /* accumulated length */
+        
+        if ( ( input->seq_req_id == 1 && !input->orientation ) ||
+             ( input->seq_req_id == 2 && input->orientation ) )
+        {
+            for ( i = 0, acc = 0; i < ops  && acc <= 5; ++i )
+            {
+                if ( tmp->cigOp[ i ].type != 2 )
+                {
+                    acc += tmp->cigOp[ i ].length;
+                    if ( acc == 5 && tmp->cigOp[ i + 1 ].type == 1 )
+                    {
+                        fwd = i + 1;
+                        break;
+                    }
+                    else if ( acc > 5 )
+                    {
+                        unsigned const right = acc - 5;
+                        unsigned const left = tmp->cigOp[ i ].length - right;
+                        
+                        memmove( &tmp->cigOp[ i + 2 ], &tmp->cigOp[ i ], ( ops - i ) * sizeof( tmp->cigOp[ 0 ] ) );
+                        ops += 2;
+                        tmp->cigOp[ i ].length = left;
+                        tmp->cigOp[ i + 2 ].length = right;
+                        
+                        tmp->cigOp[ i + 1 ].type = 1;
+                        tmp->cigOp[ i + 1 ].code = 'B';
+                        tmp->cigOp[ i + 1 ].length = 0;
+                        
+                        fwd = i + 1;
+                        break;
+                    }
+                }
+            }
+        }
+        else if ( ( input->seq_req_id == 2 && !input->orientation ) ||
+                  ( input->seq_req_id == 1 && input->orientation ) )
+        {
+            for ( i = ops, acc = 0; i > 0 && acc <= 5; )
+            {
+                --i;
+                if ( tmp->cigOp[ i ].type != 2 )
+                {
+                    acc += tmp->cigOp[ i ].length;
+                    if ( acc == 5 && tmp->cigOp[ i ].type == 1 )
+                    {
+                        rev = i;
+                        break;
+                    }
+                    else if ( acc > 5 )
+                    {
+                        unsigned const left = acc - 5;
+                        unsigned const right = tmp->cigOp[ i ].length - left;
+                        
+                        memmove( &tmp->cigOp[ i + 2 ], &tmp->cigOp[ i ], ( ops - i ) * sizeof( tmp->cigOp[ 0 ] ) );
+                        ops += 2;
+                        tmp->cigOp[ i ].length = left;
+                        tmp->cigOp[ i + 2 ].length = right;
+                        
+                        tmp->cigOp[ i + 1 ].type = 1;
+                        tmp->cigOp[ i + 1 ].code = 'B';
+                        tmp->cigOp[ i + 1 ].length = 0;
+                         
+                        rev = i + 1;
+                        break;
+                    }
+                }
+            }
+        }
+        else
+        {
+            /* fprintf(stderr, "guessing layout\n"); */
+            for ( i = 0, acc = 0; i < ops  && acc <= 5; ++i )
+            {
+                if ( tmp->cigOp[ i ].type != 2 )
+                {
+                    acc += tmp->cigOp[ i ].length;
+                    if ( acc == 5 && tmp->cigOp[ i + 1 ].type == 1 )
+                    {
+                        fwd = i + 1;
+                    }
+                }
+            }
+            for ( i = ops, acc = 0; i > 0 && acc <= 5; )
+            {
+                --i;
+                if ( tmp->cigOp[ i ].type != 2 )
+                {
+                    acc += tmp->cigOp[ i ].length;
+                    if ( acc == 5 && tmp->cigOp[i].type == 1 )
+                    {
+                        rev = i;
+                    }
+                }
+            }
+            if ( !tmp->has_ref_offset_type && (( fwd == 0 && rev == 0 ) || ( fwd != 0 && rev != 0 ) ))
+            {
+                for ( i = 0; i < ops; ++i )
+                {
+                    if ( tmp->cigOp[ i ].type == 2 )
+                    {
+                        tmp->cigOp[ i ].code = 'N';
+                        tmp->CG_adjust += tmp->cigOp[ i ].length;
+                    }
+                }
+                return RC( rcExe, rcData, rcReading, rcFormat, rcNotFound ); /* CG pattern not found */
+            }
+        }
+        if ( fwd && tmp->cigOp[ fwd ].type == 1 )
+        {
+            for ( i = ops, acc = 0; i > fwd + 1; )
+            {
+                --i;
+                if ( tmp->cigOp[ i ].type != 2 )
+                {
+                    acc += tmp->cigOp[ i ].length;
+                    if ( acc >= 10 )
+                    {
+                        if ( acc > 10 )
+                        {
+                            unsigned const r = 10 + tmp->cigOp[ i ].length - acc;
+                            unsigned const l = tmp->cigOp[ i ].length - r;
+                            
+                            if ( ops + 2 >= MAX_READ_LEN )
+                                return RC( rcExe, rcData, rcReading, rcBuffer, rcInsufficient );
+                            memmove( &tmp->cigOp[ i + 2 ], &tmp->cigOp[ i ], ( ops - i ) * sizeof( tmp->cigOp[ 0 ] ) );
+                            ops += 2;
+                            tmp->cigOp[ i + 2 ].length = r;
+                            tmp->cigOp[ i ].length = l;
+                            
+                            tmp->cigOp[ i + 1 ].length = 0;
+                            tmp->cigOp[ i + 1 ].type = 2;
+                            tmp->cigOp[ i + 1 ].code = 'N';
+                            i += 2;
+                        }
+                        else if ( i - 1 > fwd )
+                        {
+                            if ( tmp->cigOp[ i - 1 ].type == 2 )
+                                 tmp->cigOp[ i - 1 ].code = 'N';
+                            else
+                            {
+                                if ( ops + 1 >= MAX_READ_LEN )
+                                    return RC( rcExe, rcData, rcReading, rcBuffer, rcInsufficient );
+                                memmove( &tmp->cigOp[ i + 1 ], &tmp->cigOp[ i ], ( ops - i ) * sizeof( tmp->cigOp[ 0 ] ) );
+                                ops += 1;
+                                tmp->cigOp[ i ].length = 0;
+                                tmp->cigOp[ i ].type = 2;
+                                tmp->cigOp[ i ].code = 'N';
+                                i += 1;
+                            }
+                        }
+                        acc = 0;
+                    }
+                }
+            }
+            /** change I to B+M **/
+            tmp->cigOp[ fwd ].code = 'B';
+            memmove( &tmp->cigOp[ fwd + 1 ], &tmp->cigOp[ fwd ], ( ops - fwd ) * sizeof( tmp->cigOp[ 0 ] ) );
+            ops += 1;
+            tmp->cigOp[ fwd + 1 ].code = 'M';
+            tmp->opCnt = ops;
+            /** set the gaps now **/
+            for ( gapno = 3, i = ops; gapno > 1 && i > 0; )
+            {
+                --i;
+                if ( tmp->cigOp[ i ].code == 'N' )
+                    tmp->gap[ --gapno ] = i;
+            }
+            tmp->gap[ 0 ] = fwd;
+            print_CG_cigar( __LINE__, tmp->cigOp, ops, tmp->gap );
+            return 0;
+        }
+        if ( rev && tmp->cigOp[ rev ].type == 1 )
+        {
+            for ( acc = i = 0; i < rev; ++i )
+            {
+                if ( tmp->cigOp[ i ].type != 2 )
+                {
+                    acc += tmp->cigOp[ i ].length;
+                    if ( acc >= 10 )
+                    {
+                        if ( acc > 10 )
+                        {
+                            unsigned const l = 10 + tmp->cigOp[ i ].length - acc;
+                            unsigned const r = tmp->cigOp[ i ].length - l;
+                            
+                            if ( ops + 2 >= MAX_READ_LEN )
+                                return RC( rcExe, rcData, rcReading, rcBuffer, rcInsufficient );
+                            memmove( &tmp->cigOp[ i + 2 ], &tmp->cigOp[ i ], ( ops - i ) * sizeof( tmp->cigOp[ 0 ] ) );
+                            ops += 2;
+                            tmp->cigOp[ i + 2 ].length = r;
+                            tmp->cigOp[ i ].length = l;
+                            
+                            tmp->cigOp[ i + 1 ].length = 0;
+                            tmp->cigOp[ i + 1 ].type = 2;
+                            tmp->cigOp[ i + 1 ].code = 'N';
+                            rev += 2;
+                            i += 2;
+                        }
+                        else if ( i + 1 < rev )
+                        {
+                            if ( tmp->cigOp[ i + 1 ].type == 2 )
+                                 tmp->cigOp[ i + 1 ].code = 'N';
+                            else
+                            {
+                                if ( ops + 1 >= MAX_READ_LEN )
+                                    return RC( rcExe, rcData, rcReading, rcBuffer, rcInsufficient );
+                                memmove( &tmp->cigOp[ i + 1 ], &tmp->cigOp[ i ], ( ops - i ) * sizeof( tmp->cigOp[ 0 ] ) );
+                                ops += 1;
+                                tmp->cigOp[ i + 1 ].length = 0;
+                                tmp->cigOp[ i + 1 ].type = 2;
+                                tmp->cigOp[ i + 1 ].code = 'N';
+                                rev += 1;
+                                i += 1;
+                            }
+                        }
+                        acc = 0;
+                    }
+                }
+            }
+            for ( gapno = 3, i = 0; gapno > 1 && i < ops; ++i )
+            {
+                if ( tmp->cigOp[ i ].code == 'N' )
+                    tmp->gap[ --gapno ] = i;
+            }
+            tmp->gap[ 0 ] = rev;
+            tmp->cigOp[ rev ].code = 'B';
+            memmove( &tmp->cigOp[ rev + 1 ], &tmp->cigOp[ rev ], ( ops - rev ) * sizeof( tmp->cigOp[ 0 ] ) );
+            ops += 1;
+            tmp->cigOp[ rev + 1 ].code = 'M';
+            tmp->opCnt = ops;
+            print_CG_cigar( __LINE__, tmp->cigOp, ops, tmp->gap );
+            return 0;
+        }
+    }
+    return RC( rcExe, rcData, rcReading, rcFormat, rcNotFound ); /* CG pattern not found */
+}
+
+
+static rc_t adjust_cigar( const cg_cigar_input * input, cg_cigar_temp * tmp, cg_cigar_output * output )
+{
+    rc_t rc = 0;
+    unsigned i, j;
+
+    print_CG_cigar( __LINE__, tmp->cigOp, tmp->opCnt, NULL );
+
+    /* remove zero length ops */
+    for ( j = i = 0; i < tmp->opCnt; )
+    {
+        if ( tmp->cigOp[ j ].length == 0 )
+        {
+            ++j;
+            --(tmp->opCnt);
+            continue;
+        }
+        tmp->cigOp[ i++ ] = tmp->cigOp[ j++ ];
+    }
+
+    print_CG_cigar( __LINE__, tmp->cigOp, tmp->opCnt, NULL );
+
+    if ( input->edit_dist_available )
+    {
+        int const adjusted = input->edit_dist + tmp->S_adjust - tmp->CG_adjust;
+        output->edit_dist = adjusted > 0 ? adjusted : 0;
+        SAM_DUMP_DBG( 4, ( "NM: before: %u, after: %u(+%u-%u)\n", input->edit_dist, output->edit_dist, tmp->S_adjust, tmp->CG_adjust ) );
+    }
+    else
+    {
+        output->edit_dist = input->edit_dist;
+    }
+
+    /* merge adjacent ops */
+    for ( i = tmp->opCnt; i > 1; )
+    {
+        --i;
+        if ( tmp->cigOp[ i - 1 ].code == tmp->cigOp[ i ].code )
+        {
+            tmp->cigOp[ i - 1 ].length += tmp->cigOp[ i ].length;
+            memmove( &tmp->cigOp[ i ], &tmp->cigOp[ i + 1 ], ( tmp->opCnt - 1 - i ) * sizeof( tmp->cigOp[ 0 ] ) );
+            --(tmp->opCnt);
+        }
+    }
+    print_CG_cigar( __LINE__, tmp->cigOp, tmp->opCnt, NULL );
+    for ( i = j = 0; i < tmp->opCnt && rc == 0; ++i )
+    {
+        size_t sz;
+        rc = string_printf( &output->cigar[ j ], sizeof( output->cigar ) - j, &sz, "%u%c", tmp->cigOp[ i ].length, tmp->cigOp[ i ].code );
+        j += sz;
+    }
+    output->cigar_len = j;
+    return rc;
+}
+
+
+rc_t make_cg_cigar( const cg_cigar_input * input, cg_cigar_output * output )
+{
+    rc_t rc;
+    cg_cigar_temp tmp;
+    memset( &tmp, 0, sizeof tmp );
+
+    rc = CIGAR_to_CG_Ops( input, &tmp );
+    if ( GetRCState( rc ) == rcNotFound && GetRCObject( rc ) == rcFormat )
+    {
+        memmove( &output->cigar[ 0 ], &input->p_cigar.ptr[ 0 ], input->p_cigar.len );
+        output->cigar_len = input->p_cigar.len;
+        output->cigar[ output->cigar_len ] = 0;
+        output->edit_dist = input->edit_dist;
+        output->p_cigar.ptr = output->cigar;
+        output->p_cigar.len = output->cigar_len;
+        rc = 0;
+    }
+    else if ( rc == 0 )
+    {
+        if ( tmp.CG_adjust == 0 && !tmp.has_ref_offset_type)
+        {
+            if ( tmp.gap[ 0 ] < tmp.opCnt )
+                tmp.CG_adjust = tmp.cigOp[ tmp.gap[ 0 ] ].length;
+
+            if ( tmp.gap[ 1 ] < tmp.opCnt )
+                tmp.CG_adjust += tmp.cigOp[ tmp.gap[ 1 ] ].length;
+
+            if ( tmp.gap[ 2 ] < tmp.opCnt )
+                tmp.CG_adjust += tmp.cigOp[ tmp.gap[ 2 ] ].length;
+        }
+
+        rc = adjust_cigar( input, &tmp, output );
+    }
+    return rc;
+}
+
+
+static char merge_M_type_ops( char a, char b )
+{ /*MX=*/
+    char c = 0;
+    switch( b )
+    {
+        case 'X' :  switch( a )
+                    {
+                        case '=' : c = 'X'; break;
+                        case 'X' : c = 'M'; break; /**we don't know - 2X may create '=' **/
+                        case 'M' : c = 'M'; break;
+                    }
+                    break;
+        case 'M' :  c = 'M'; break;
+        case '=' :  c = a; break;
+    }
+    assert( c != 0 );
+    return c;
+}
+
+
+static size_t fmt_cigar_elem( char * dst, uint32_t cig_oplen, char cig_op )
+{
+    size_t num_writ;
+    rc_t rc = string_printf ( dst, 11, &num_writ, "%d%c", cig_oplen, cig_op );
+    assert ( rc == 0 && num_writ > 1 );
+    return num_writ;
+}
+
+uint32_t CombineCIGAR( char dst[], CigOps const seqOp[], uint32_t seq_len,
+                       uint32_t refPos, CigOps const refOp[], uint32_t ref_len )
+{
+    bool done = false;
+    uint32_t ciglen = 0, last_ciglen = 0, last_cig_oplen = 0;
+    int32_t si = 0, ri = 0;
+    char last_cig_op = '0'; /* never used operation, forces a mismatch in MACRO_BUILD_CIGAR */
+    CigOps seq_cop = { 0, 0, 0, 0 }, ref_cop = { 0, 0, 0, 0 };
+    int32_t seq_pos = 0;        /** seq_pos is tracked roughly - with every extraction from seqOp **/
+    int32_t ref_pos = 0;        /** ref_pos is tracked precisely - with every delta and consumption in cigar **/
+    int32_t delta = refPos;     /*** delta in relative positions of seq and ref **/
+                                /*** when delta < 0 - rewind or extend the reference ***/
+                                /*** wher delta > 0 - skip reference  ***/
+#define MACRO_BUILD_CIGAR(OP,OPLEN) \
+	if( last_cig_oplen > 0 && last_cig_op == OP){							\
+                last_cig_oplen += OPLEN;								\
+                ciglen = last_ciglen + fmt_cigar_elem( dst + last_ciglen, last_cig_oplen,last_cig_op );	\
+        } else {											\
+                last_ciglen = ciglen;									\
+                last_cig_oplen = OPLEN;									\
+                last_cig_op    = OP;									\
+                ciglen = ciglen      + fmt_cigar_elem( dst + last_ciglen, last_cig_oplen, last_cig_op );	\
+        }
+    while( !done )
+    {
+        while ( delta < 0 )
+        { 
+            ref_pos += delta; /** we will make it to back up this way **/
+            if( ri > 0 )
+            { /** backing up on ref if possible ***/
+                int avail_oplen = refOp[ ri - 1 ].oplen - ref_cop.oplen;
+                if ( avail_oplen > 0 )
+                {
+                    if ( ( -delta ) <= avail_oplen * ref_cop.ref_sign )
+                    { /*** rewind within last operation **/
+                        ref_cop.oplen -= delta;
+                        delta -= delta * ref_cop.ref_sign;
+                    }
+                    else
+                    { /*** rewind the whole ***/
+                        ref_cop.oplen += avail_oplen;
+                        delta += avail_oplen * ref_cop.ref_sign;
+                    }
+                }
+                else
+                {
+                    ri--;
+                    /** pick the previous as used up **/
+                    ref_cop = refOp[ri-1];
+                    ref_cop.oplen =0; 
+                }
+            }
+            else
+            { /** extending the reference **/
+                SetCigOp( &ref_cop, '=', ref_cop.oplen - delta );
+                delta = 0;
+            }
+            ref_pos -= delta; 
+        }
+        if ( ref_cop.oplen == 0 )
+        { /*** advance the reference ***/
+            ref_cop = refOp[ri++];
+            if ( ref_cop.oplen == 0 )
+            { /** extending beyond the reference **/
+                SetCigOp( &ref_cop,'=', 1000 );
+            }
+            assert( ref_cop.oplen > 0 );
+        }
+        if ( delta > 0 )
+        { /***  skip refOps ***/
+            ref_pos += delta; /** may need to back up **/
+            if ( delta >=  ref_cop.oplen )
+            { /** full **/
+                delta -= ref_cop.oplen * ref_cop.ref_sign;
+                ref_cop.oplen = 0;
+            }
+            else
+            { /** partial **/
+                ref_cop.oplen -= delta;
+                delta -= delta * ref_cop.ref_sign;
+            }
+            ref_pos -= delta; /** if something left - restore ***/
+            continue;
+        }
+
+        /*** seq and ref should be synchronized here **/
+        assert( delta == 0 );
+        if ( seq_cop.oplen == 0 )
+        { /*** advance sequence ***/
+            if ( seq_pos < seq_len )
+            {
+                seq_cop = seqOp[ si++ ];
+                assert( seq_cop.oplen > 0 );
+                seq_pos += seq_cop.oplen * seq_cop.seq_sign;
+            }
+            else
+            {
+                done=true;
+            }
+        }
+
+        if( !done )
+        {
+            int seq_seq_step = seq_cop.oplen * seq_cop.seq_sign; /** sequence movement**/
+            int seq_ref_step = seq_cop.oplen * seq_cop.ref_sign; /** influence of sequence movement on intermediate reference **/
+            int ref_seq_step = ref_cop.oplen * ref_cop.seq_sign; /** movement of the intermediate reference ***/
+            int ref_ref_step = ref_cop.oplen * ref_cop.ref_sign; /** influence of the intermediate reference movement on final reference ***/
+            assert( ref_ref_step >= 0 ); /** no B in the reference **/
+            if ( seq_ref_step <= 0 )
+            { /** BSIPH in the sequence against anything ***/
+                MACRO_BUILD_CIGAR( seq_cop.op, seq_cop.oplen );
+                seq_cop.oplen = 0;
+                delta = seq_ref_step; /** if negative - will force rewind next cycle **/
+            }
+            else if ( ref_ref_step <= 0 )
+            { /** MX=DN against SIPH in the reference***/
+                if ( ref_seq_step == 0 )
+                { /** MX=DN against PH **/
+                    MACRO_BUILD_CIGAR( ref_cop.op,ref_cop.oplen);
+                    ref_cop.oplen = 0;
+                }
+                else
+                {
+                    int min_len = ( seq_cop.oplen < ref_cop.oplen ) ? seq_cop.oplen : ref_cop.oplen;
+                    if( seq_seq_step == 0 )
+                    { /** DN agains SI **/
+                        MACRO_BUILD_CIGAR( 'P', min_len );
+                    }
+                    else
+                    { /** MX= agains SI ***/
+                        MACRO_BUILD_CIGAR( ref_cop.op,min_len );
+                    }
+                    seq_cop.oplen -= min_len;
+                    ref_cop.oplen -= min_len;
+                }
+            }
+            else
+            {
+                /*MX=DN  against MX=DN*/
+                int min_len = ( seq_cop.oplen < ref_cop.oplen ) ? seq_cop.oplen : ref_cop.oplen;
+                if ( seq_seq_step == 0 )
+                { /* DN against MX=DN */
+                    if ( ref_seq_step == 0 )
+                    { /** padding DN against DN **/
+                        MACRO_BUILD_CIGAR( 'P', min_len );
+                        ref_cop.oplen -= min_len;
+                        seq_cop.oplen -= min_len;
+                    }
+                    else
+                    { /* DN against MX= **/
+                        MACRO_BUILD_CIGAR( seq_cop.op, min_len );
+                        seq_cop.oplen -= min_len;
+                    }
+                }
+                else if ( ref_cop.seq_sign == 0 )
+                { /* MX= against DN - always wins */
+                    MACRO_BUILD_CIGAR( ref_cop.op, min_len );
+                    ref_cop.oplen -= min_len;
+                }
+                else
+                { /** MX= against MX= ***/
+                    char curr_op = merge_M_type_ops( seq_cop.op, ref_cop.op );
+                    /* or otherwise merge_M_type_ops() will be called twice by the macro! */
+                    MACRO_BUILD_CIGAR( curr_op, min_len );
+                    ref_cop.oplen -= min_len;
+                    seq_cop.oplen -= min_len;
+                }
+                ref_pos += min_len;
+            }
+        }
+    }
+    return ciglen;
+}
+
+
+typedef struct cg_merger
+{
+    char newSeq[ MAX_READ_LEN ];
+    char newQual[ MAX_READ_LEN ];
+    char tags[ MAX_CG_CIGAR_LEN * 2 ];
+} cg_merger;
+
+
+rc_t merge_cg_cigar( const cg_cigar_input * input, cg_cigar_output * output )
+{
+    rc_t rc;
+    cg_cigar_temp tmp;
+    memset( &tmp, 0, sizeof tmp );
+
+    rc = CIGAR_to_CG_Ops( input, &tmp );
+    if ( GetRCState( rc ) == rcNotFound && GetRCObject( rc ) == rcFormat )
+    {
+        memmove( &output->cigar[ 0 ], &input->p_cigar.ptr[ 0 ], input->p_cigar.len );
+        output->cigar_len = input->p_cigar.len;
+        output->cigar[ output->cigar_len ] = 0;
+        output->edit_dist = input->edit_dist;
+        rc = 0;
+    }
+    else if ( rc == 0 )
+    {
+
+        if ( tmp.CG_adjust == 0  && !tmp.has_ref_offset_type )
+        {
+            if ( tmp.gap[ 0 ] < tmp.opCnt )
+                tmp.CG_adjust = tmp.cigOp[ tmp.gap[ 0 ] ].length;
+
+            if ( tmp.gap[ 1 ] < tmp.opCnt )
+                tmp.CG_adjust += tmp.cigOp[ tmp.gap[ 1 ] ].length;
+
+            if ( tmp.gap[ 2 ] < tmp.opCnt )
+                tmp.CG_adjust += tmp.cigOp[ tmp.gap[ 2 ] ].length;
+        }
+
+        rc = adjust_cigar( input, &tmp, output );
+
+    }
+    return rc;
+}
+
+
+rc_t make_cg_merge( const cg_cigar_input * input, cg_cigar_output * output )
+{
+    rc_t rc;
+    cg_cigar_temp tmp;
+    memset( &tmp, 0, sizeof tmp );
+
+    rc = CIGAR_to_CG_Ops( input, &tmp );
+    if ( GetRCState( rc ) == rcNotFound && GetRCObject( rc ) == rcFormat )
+    {
+        memmove( &output->cigar[ 0 ], &input->p_cigar.ptr[ 0 ], input->p_cigar.len );
+        output->cigar_len = input->p_cigar.len;
+        output->cigar[ output->cigar_len ] = 0;
+        output->edit_dist = input->edit_dist;
+        rc = 0;
+    }
+    else if ( rc == 0 )
+    {
+
+        if ( tmp.CG_adjust == 0  && !tmp.has_ref_offset_type )
+        {
+            if ( tmp.gap[ 0 ] < tmp.opCnt )
+                tmp.CG_adjust = tmp.cigOp[ tmp.gap[ 0 ] ].length;
+
+            if ( tmp.gap[ 1 ] < tmp.opCnt )
+                tmp.CG_adjust += tmp.cigOp[ tmp.gap[ 1 ] ].length;
+
+            if ( tmp.gap[ 2 ] < tmp.opCnt )
+                tmp.CG_adjust += tmp.cigOp[ tmp.gap[ 2 ] ].length;
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        uint32_t const B_len = tmp.cigOp[ tmp.gap[ 0 ] ].length;
+        uint32_t const B_at = tmp.gap[ 0 ] < tmp.gap[ 2 ] ? 5 : 30;
+            
+        if ( 0 < B_len && B_len < 5 )
+        {
+            memcpy( output->newSeq,  input->p_read.ptr, MAX_READ_LEN );
+            memcpy( output->newQual, input->p_quality.ptr, MAX_READ_LEN );
+            
+            output->p_read.ptr = output->newSeq;
+            output->p_read.len = ( MAX_READ_LEN - B_len );
+            
+            output->p_quality.ptr = output->newQual;
+            output->p_quality.len = ( MAX_READ_LEN - B_len );
+            
+            output->p_tags.ptr = output->tags;
+            output->p_tags.len = 0;
+
+            /* nBnM -> nB0M */
+            tmp.cigOp[ tmp.gap[ 0 ] + 1 ].length -= B_len;
+            if ( tmp.gap[ 0 ] < tmp.gap[ 2 ] )
+            {
+                size_t written;
+                rc = string_printf( output->tags, sizeof( output->tags ), &written,
+                                    "GC:Z:%uS%uG%uS\tGS:Z:%.*s\tGQ:Z:%.*s",
+                                    5 - B_len, B_len, 30 - B_len, 2 * B_len, &output->newSeq[ 5 - B_len ], 2 * B_len, &output->newQual[ 5 - B_len ] );
+                if ( rc == 0 )
+                    output->p_tags.len = written;
+                memmove( &tmp.cigOp[ tmp.gap[ 0 ] ],
+                         &tmp.cigOp[ tmp.gap[ 0 ] + 1 ],
+                         ( tmp.opCnt - ( tmp.gap[ 0 ] + 1 ) ) * sizeof( tmp.cigOp[ 0 ] ) );
+                --tmp.opCnt;
+            }
+            else
+            {
+                size_t written;
+                rc = string_printf( output->tags, sizeof( output->tags ), &written,
+                                    "GC:Z:%uS%uG%uS\tGS:Z:%.*s\tGQ:Z:%.*s",
+                                    30 - B_len, B_len, 5 - B_len, 2 * B_len, &output->newSeq[ 30 - B_len ], 2 * B_len, &output->newQual[ 30 - B_len ] );
+                if ( rc == 0 )
+                    output->p_tags.len = written;
+                memmove( &tmp.cigOp[ tmp.gap[ 0 ] ],
+                         &tmp.cigOp[ tmp.gap[ 0 ] + 1 ],
+                         ( tmp.opCnt - ( tmp.gap[ 0 ] + 1 ) ) * sizeof( tmp.cigOp[ 0 ] ) );
+                --tmp.opCnt;
+            }
+            if ( rc == 0 )
+            {
+                uint32_t i;
+                for ( i = B_at; i < B_at + B_len; ++i )
+                {
+                    uint32_t const Lq = output->newQual[ i - B_len ];
+                    uint32_t const Rq = output->newQual[ i ];
+
+                    if ( Lq <= Rq )
+                    {
+                        output->newSeq[ i - B_len ] = output->newSeq[ i ];
+                        output->newQual[ i - B_len ] = Rq;
+                    }
+                    else
+                    {
+                        output->newSeq[ i ] = output->newSeq[ i - B_len ];
+                        output->newQual[ i ] = Lq;
+                    }
+                }
+                memmove( &output->newSeq [ B_at ], &output->newSeq [ B_at + B_len ], MAX_READ_LEN - B_at - B_len );
+                memmove( &output->newQual[ B_at ], &output->newQual[ B_at + B_len ], MAX_READ_LEN - B_at - B_len );
+            }
+        }
+        else
+        {
+            uint32_t i, len = tmp.cigOp[ tmp.gap[ 0 ] ].length;
+            
+            tmp.cigOp[ tmp.gap[ 0 ] ].code = 'I';
+            for ( i = tmp.gap[ 0 ] + 1; i < tmp.opCnt && len > 0; ++i )
+            {
+                if ( tmp.cigOp[ i ].length <= len )
+                {
+                    len -= tmp.cigOp[ i ].length;
+                    tmp.cigOp[ i ].length = 0;
+                }
+                else
+                {
+                    tmp.cigOp[ i ].length -= len;
+                    len = 0;
+                }
+            }
+            tmp.CG_adjust -= tmp.cigOp[ tmp.gap[ 0 ] ].length;
+        }
+    }
+
+    if ( rc == 0 )
+        rc = adjust_cigar( input, &tmp, output );
+
+    return rc;
+}
+
+
+/* A-->0x00, C-->0x01 G-->0x02 T-->0x03 */
+
+static const uint8_t ASCII_to_2na[] = {
+/*      00  01  02  03  04  05  06  07  08  09  0A  0B  0C  0D  0E  0F  */
+        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+
+/*      10  11  12  13  14  15  16  17  18  19  1A  1B  1C  1D  1E  1F  */
+        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+
+/*      20  21  22  23  24  25  26  27  28  29  2A  2B  2C  2D  2E  2F  */
+        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+
+/*      30  31  32  33  34  35  36  37  38  39  3A  3B  3C  3D  3E  3F  */
+        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+
+/*      40  41  42  43  44  45  46  47  48  49  4A  4B  4C  4D  4E  4F  */
+        0,  0,  0,  1,  0,  0,  0,  2,  0,  0,  0,  0,  0,  0,  0,  0,
+
+/*      50  51  52  53  54  55  56  57  58  59  5A  5B  5C  5D  5E  5F  */
+        0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+
+/*      60  61  62  63  64  65  66  67  68  69  6A  6B  6C  6D  6E  6F  */
+        0,  0,  0,  1,  0,  0,  0,  2,  0,  0,  0,  0,  0,  0,  0,  0,
+
+/*      70  71  72  73  74  75  76  77  78  79  7A  7B  7C  7D  7E  7F  */
+        0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+};
+
+static uint8_t compress_4_bases_to_byte( uint8_t * bases )
+{
+    uint8_t res = ASCII_to_2na[ bases[ 0 ] & 0x7F ];
+    res <<= 2;
+    res |= ASCII_to_2na[ bases[ 1 ] & 0x7F ];
+    res <<= 2;
+    res |= ASCII_to_2na[ bases[ 2 ] & 0x7F ];
+    res <<= 2;
+    res |= ASCII_to_2na[ bases[ 3 ] & 0x7F ];
+    return res;
+}
+
+
+static const uint8_t compressed_to_fwd_reverse_0[] = {
+
+    /* 0000.0000    0x00 ... AAAA */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0000.0001    0x01 ... AAAC */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 0000.0010    0x02 ... AAAG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0000.0011    0x03 ... AAAT */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0000.0100    0x04 ... AACA */ RNA_SPLICE_UNKNOWN,
+    /* 0000.0101    0x05 ... AACC */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0000.0110    0x06 ... AACG */ RNA_SPLICE_UNKNOWN,
+    /* 0000.0111    0x07 ... AACT */ RNA_SPLICE_UNKNOWN,
+    /* 0000.1000    0x08 ... AAGA */ RNA_SPLICE_UNKNOWN,
+    /* 0000.1001    0x09 ... AAGC */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0000.1010    0x0A ... AAGG */ RNA_SPLICE_UNKNOWN,
+    /* 0000.1011    0x0B ... AAGT */ RNA_SPLICE_UNKNOWN,
+    /* 0000.1100    0x0C ... AATA */ RNA_SPLICE_UNKNOWN,
+    /* 0000.1101    0x0D ... AATC */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0000.1110    0x0E ... AATG */ RNA_SPLICE_UNKNOWN,
+    /* 0000.1111    0x0F ... AATT */ RNA_SPLICE_UNKNOWN,
+
+    /* 0001.0000    0x10 ... ACAA */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0001.0001    0x11 ... ACAC */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 0001.0010    0x12 ... ACAG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0001.0011    0x13 ... ACAT */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0001.0100    0x14 ... ACCA */ RNA_SPLICE_UNKNOWN,
+    /* 0001.0101    0x15 ... ACCC */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0001.0110    0x16 ... ACCG */ RNA_SPLICE_UNKNOWN,
+    /* 0001.0111    0x17 ... ACCT */ RNA_SPLICE_UNKNOWN,
+    /* 0001.1000    0x18 ... ACGA */ RNA_SPLICE_UNKNOWN,
+    /* 0001.1001    0x19 ... ACGC */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0001.1010    0x1A ... ACGG */ RNA_SPLICE_UNKNOWN,
+    /* 0001.1011    0x1B ... ACGT */ RNA_SPLICE_UNKNOWN,
+    /* 0001.1100    0x1C ... ACTA */ RNA_SPLICE_UNKNOWN,
+    /* 0001.1101    0x1D ... ACTC */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0001.1110    0x1E ... ACTG */ RNA_SPLICE_UNKNOWN,
+    /* 0001.1111    0x1F ... ACTT */ RNA_SPLICE_UNKNOWN,
+
+    /* 0010.0000    0x20 ... AGAA */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0010.0001    0x21 ... AGAC */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 0010.0010    0x22 ... AGAG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0010.0011    0x23 ... AGAT */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0010.0100    0x24 ... AGCA */ RNA_SPLICE_UNKNOWN,
+    /* 0010.0101    0x25 ... AGCC */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0010.0110    0x26 ... AGCG */ RNA_SPLICE_UNKNOWN,
+    /* 0010.0111    0x27 ... AGCT */ RNA_SPLICE_UNKNOWN,
+    /* 0010.1000    0x28 ... AGGA */ RNA_SPLICE_UNKNOWN,
+    /* 0010.1001    0x29 ... AGGC */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0010.1010    0x2A ... AGGG */ RNA_SPLICE_UNKNOWN,
+    /* 0010.1011    0x2B ... AGGT */ RNA_SPLICE_UNKNOWN,
+    /* 0010.1100    0x2C ... AGTA */ RNA_SPLICE_UNKNOWN,
+    /* 0010.1101    0x2D ... AGTC */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0010.1110    0x2E ... AGTG */ RNA_SPLICE_UNKNOWN,
+    /* 0010.1111    0x2F ... AGTT */ RNA_SPLICE_UNKNOWN,
+
+    /* 0011.0000    0x30 ... ATAA */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 0011.0001    0x31 ... ATAC */ RNA_SPLICE_FWD,            /* MINOR forward */
+    /* 0011.0010    0x32 ... ATAG */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 0011.0011    0x33 ... ATAT */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 0011.0100    0x34 ... ATCA */ RNA_SPLICE_UNKNOWN,
+    /* 0011.0101    0x35 ... ATCC */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 0011.0110    0x36 ... ATCG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0011.0111    0x37 ... ATCT */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0011.1000    0x38 ... ATGA */ RNA_SPLICE_UNKNOWN,
+    /* 0011.1001    0x39 ... ATGC */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 0011.1010    0x3A ... ATGG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0011.1011    0x3B ... ATGT */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0011.1100    0x3C ... ATTA */ RNA_SPLICE_UNKNOWN,
+    /* 0011.1101    0x3D ... ATTC */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 0011.1110    0x3E ... ATTG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0011.1111    0x3F ... ATTT */ ( RNA_SPLICE_REV | 0x20 ),
+
+    /* 0100.0000    0x40 ... CAAA */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0100.0001    0x41 ... CAAC */ ( RNA_SPLICE_REV | 0x10 ),
+    /* 0100.0010    0x42 ... CAAG */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0100.0011    0x43 ... CAAT */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0100.0100    0x44 ... CACA */ RNA_SPLICE_UNKNOWN,
+    /* 0100.0101    0x45 ... CACC */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0100.0110    0x46 ... CACG */ RNA_SPLICE_UNKNOWN,
+    /* 0100.0111    0x47 ... CACT */ RNA_SPLICE_UNKNOWN,
+    /* 0100.1000    0x48 ... CAGA */ RNA_SPLICE_UNKNOWN,
+    /* 0100.1001    0x49 ... CAGC */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0100.1010    0x4A ... CAGG */ RNA_SPLICE_UNKNOWN,
+    /* 0100.1011    0x4B ... CAGT */ RNA_SPLICE_UNKNOWN,
+    /* 0100.1100    0x4C ... CATA */ RNA_SPLICE_UNKNOWN,
+    /* 0100.1101    0x4D ... CATC */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0100.1110    0x4E ... CATG */ RNA_SPLICE_UNKNOWN,
+    /* 0100.1111    0x4F ... CATT */ RNA_SPLICE_UNKNOWN,
+
+    /* 0101.0000    0x50 ... CCAA */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0101.0001    0x51 ... CCAC */ ( RNA_SPLICE_REV | 0x10 ),
+    /* 0101.0010    0x52 ... CCAG */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0101.0011    0x53 ... CCAT */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0101.0100    0x54 ... CCCA */ RNA_SPLICE_UNKNOWN,
+    /* 0101.0101    0x55 ... CCCC */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0101.0110    0x56 ... CCCG */ RNA_SPLICE_UNKNOWN,
+    /* 0101.0111    0x57 ... CCCT */ RNA_SPLICE_UNKNOWN,
+    /* 0101.1000    0x58 ... CCGA */ RNA_SPLICE_UNKNOWN,
+    /* 0101.1001    0x59 ... CCGC */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0101.1010    0x5A ... CCGG */ RNA_SPLICE_UNKNOWN,
+    /* 0101.1011    0x5B ... CCGT */ RNA_SPLICE_UNKNOWN,
+    /* 0101.1100    0x5C ... CCTA */ RNA_SPLICE_UNKNOWN,
+    /* 0101.1101    0x5D ... CCTC */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0101.1110    0x5E ... CCTG */ RNA_SPLICE_UNKNOWN,
+    /* 0101.1111    0x5F ... CCTT */ RNA_SPLICE_UNKNOWN,
+
+    /* 0110.0000    0x60 ... CGAA */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0110.0001    0x61 ... CGAC */ ( RNA_SPLICE_REV | 0x10 ),
+    /* 0110.0010    0x62 ... CGAG */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0110.0011    0x63 ... CGAT */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0110.0100    0x64 ... CGCA */ RNA_SPLICE_UNKNOWN,
+    /* 0110.0101    0x65 ... CGCC */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0110.0110    0x66 ... CGCG */ RNA_SPLICE_UNKNOWN,
+    /* 0110.0111    0x67 ... CGCT */ RNA_SPLICE_UNKNOWN,
+    /* 0110.1000    0x68 ... CGGA */ RNA_SPLICE_UNKNOWN,
+    /* 0110.1001    0x69 ... CGGC */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0110.1010    0x6A ... CGGG */ RNA_SPLICE_UNKNOWN,
+    /* 0110.1011    0x6B ... CGGT */ RNA_SPLICE_UNKNOWN,
+    /* 0110.1100    0x6C ... CGTA */ RNA_SPLICE_UNKNOWN,
+    /* 0110.1101    0x6D ... CGTC */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0110.1110    0x6E ... CGTG */ RNA_SPLICE_UNKNOWN,
+    /* 0110.1111    0x6F ... CGTT */ RNA_SPLICE_UNKNOWN,
+
+    /* 0111.0000    0x70 ... CTAA */ ( RNA_SPLICE_REV | 0x10 ),
+    /* 0111.0001    0x71 ... CTAC */ RNA_SPLICE_REV,            /* MAJOR reverse */
+    /* 0111.0010    0x72 ... CTAG */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 0111.0011    0x73 ... CTAT */ ( RNA_SPLICE_REV | 0x10 ),
+    /* 0111.0100    0x74 ... CTCA */ RNA_SPLICE_UNKNOWN,
+    /* 0111.0101    0x75 ... CTCC */ ( RNA_SPLICE_REV | 0x10 ),
+    /* 0111.0110    0x76 ... CTCG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0111.0111    0x77 ... CTCT */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0111.1000    0x78 ... CTGA */ RNA_SPLICE_UNKNOWN,
+    /* 0111.1001    0x79 ... CTGC */ ( RNA_SPLICE_REV | 0x10 ),
+    /* 0111.1010    0x7A ... CTGG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0111.1011    0x7B ... CTGT */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 0111.1100    0x7C ... CTTA */ RNA_SPLICE_UNKNOWN,
+    /* 0111.1101    0x7D ... CTTC */ ( RNA_SPLICE_REV | 0x10 ),
+    /* 0111.1110    0x7E ... CTTG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 0111.1111    0x7F ... CTTT */ ( RNA_SPLICE_REV | 0x20 ),
+
+    /* 1000.0000    0x80 ... GAAA */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1000.0001    0x81 ... GAAC */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1000.0010    0x82 ... GAAG */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 1000.0011    0x83 ... GAAT */ ( RNA_SPLICE_REV | 0x10 ),
+    /* 1000.0100    0x84 ... GACA */ RNA_SPLICE_UNKNOWN,
+    /* 1000.0101    0x85 ... GACC */ RNA_SPLICE_UNKNOWN,
+    /* 1000.0110    0x86 ... GACG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1000.0111    0x87 ... GACT */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 1000.1000    0x88 ... GAGA */ RNA_SPLICE_UNKNOWN,
+    /* 1000.1001    0x89 ... GAGC */ RNA_SPLICE_UNKNOWN,
+    /* 1000.1010    0x8A ... GAGG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1000.1011    0x8B ... GAGT */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 1000.1100    0x8C ... GATA */ RNA_SPLICE_UNKNOWN,
+    /* 1000.1101    0x8D ... GATC */ RNA_SPLICE_UNKNOWN,
+    /* 1000.1110    0x8E ... GATG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1000.1111    0x8F ... GATT */ ( RNA_SPLICE_REV | 0x20 ),
+
+    /* 1001.0000    0x90 ... GCAA */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1001.0001    0x91 ... GCAC */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1001.0010    0x92 ... GCAG */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 1001.0011    0x93 ... GCAT */ ( RNA_SPLICE_REV | 0x10 ),
+    /* 1001.0100    0x94 ... GCCA */ RNA_SPLICE_UNKNOWN,
+    /* 1001.0101    0x95 ... GCCC */ RNA_SPLICE_UNKNOWN,
+    /* 1001.0110    0x96 ... GCCG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1001.0111    0x97 ... GCCT */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 1001.1000    0x98 ... GCGA */ RNA_SPLICE_UNKNOWN,
+    /* 1001.1001    0x99 ... GCGC */ RNA_SPLICE_UNKNOWN,
+    /* 1001.1010    0x9A ... GCGG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1001.1011    0x9B ... GCGT */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 1001.1100    0x9C ... GCTA */ RNA_SPLICE_UNKNOWN,
+    /* 1001.1101    0x9D ... GCTC */ RNA_SPLICE_UNKNOWN,
+    /* 1001.1110    0x9E ... GCTG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1001.1111    0x9F ... GCTT */ ( RNA_SPLICE_REV | 0x20 ),
+
+    /* 1010.0000    0xA0 ... GGAA */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1010.0001    0xA1 ... GGAC */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1010.0010    0xA2 ... GGAG */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 1010.0011    0xA3 ... GGAT */ ( RNA_SPLICE_REV | 0x10 ),
+    /* 1010.0100    0xA4 ... GGCA */ RNA_SPLICE_UNKNOWN,
+    /* 1010.0101    0xA5 ... GGCC */ RNA_SPLICE_UNKNOWN,
+    /* 1010.0110    0xA6 ... GGCG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1010.0111    0xA7 ... GGCT */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 1010.1000    0xA8 ... GGGA */ RNA_SPLICE_UNKNOWN,
+    /* 1010.1001    0xA9 ... GGGC */ RNA_SPLICE_UNKNOWN,
+    /* 1010.1010    0xAA ... GGGG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1010.1011    0xAB ... GGGT */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 1010.1100    0xAC ... GGTA */ RNA_SPLICE_UNKNOWN,
+    /* 1010.1101    0xAD ... GGTC */ RNA_SPLICE_UNKNOWN,
+    /* 1010.1110    0xAE ... GGTG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1010.1111    0xAF ... GGTT */ ( RNA_SPLICE_REV | 0x20 ),
+
+    /* 1011.0000    0xB0 ... GTAA */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 1011.0001    0xB1 ... GTAC */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 1011.0010    0xB2 ... GTAG */ RNA_SPLICE_FWD,            /* MAJOR forward */
+    /* 1011.0011    0xB3 ... GTAT */ RNA_SPLICE_REV,            /* MINOR reverse */
+    /* 1011.0100    0xB4 ... GTCA */ RNA_SPLICE_UNKNOWN,
+    /* 1011.0101    0xB5 ... GTCC */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 1011.0110    0xB6 ... GTCG */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 1011.0111    0xB7 ... GTCT */ ( RNA_SPLICE_REV | 0x10 ),
+    /* 1011.1000    0xB8 ... GTGA */ RNA_SPLICE_UNKNOWN,
+    /* 1011.1001    0xB9 ... GTGC */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 1011.1010    0xBA ... GTGG */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 1011.1011    0xBB ... GTGT */ ( RNA_SPLICE_REV | 0x10 ),
+    /* 1011.1100    0xBC ... GTTA */ RNA_SPLICE_UNKNOWN,
+    /* 1011.1101    0xBD ... GTTC */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 1011.1110    0xBE ... GTTG */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 1011.1111    0xBF ... GTTT */ ( RNA_SPLICE_REV | 0x10 ),
+
+    /* 1100.0000    0xC0 ... TAAA */ RNA_SPLICE_UNKNOWN,
+    /* 1100.0001    0xC1 ... TAAC */ RNA_SPLICE_UNKNOWN,
+    /* 1100.0010    0xC2 ... TAAG */ RNA_SPLICE_UNKNOWN,
+    /* 1100.0011    0xC3 ... TAAT */ RNA_SPLICE_UNKNOWN,
+    /* 1100.0100    0xC4 ... TACA */ RNA_SPLICE_UNKNOWN,
+    /* 1100.0101    0xC5 ... TACC */ RNA_SPLICE_UNKNOWN,
+    /* 1100.0110    0xC6 ... TACG */ RNA_SPLICE_UNKNOWN,
+    /* 1100.0111    0xC7 ... TACT */ RNA_SPLICE_UNKNOWN,
+    /* 1100.1000    0xC8 ... TAGA */ RNA_SPLICE_UNKNOWN,
+    /* 1100.1001    0xC9 ... TAGC */ RNA_SPLICE_UNKNOWN,
+    /* 1100.1010    0xCA ... TAGG */ RNA_SPLICE_UNKNOWN,
+    /* 1100.1011    0xCB ... TAGT */ RNA_SPLICE_UNKNOWN,
+    /* 1100.1100    0xCC ... TATA */ RNA_SPLICE_UNKNOWN,
+    /* 1100.1101    0xCD ... TATC */ RNA_SPLICE_UNKNOWN,
+    /* 1100.1110    0xCE ... TATG */ RNA_SPLICE_UNKNOWN,
+    /* 1100.1111    0xCF ... TATT */ RNA_SPLICE_UNKNOWN,
+
+    /* 1101.0000    0xE0 ... TCAA */ RNA_SPLICE_UNKNOWN,
+    /* 1101.0001    0xE1 ... TCAC */ RNA_SPLICE_UNKNOWN,
+    /* 1101.0010    0xE2 ... TCAG */ RNA_SPLICE_UNKNOWN,
+    /* 1101.0011    0xE3 ... TCAT */ RNA_SPLICE_UNKNOWN,
+    /* 1101.0100    0xE4 ... TCCA */ RNA_SPLICE_UNKNOWN,
+    /* 1101.0101    0xE5 ... TCCC */ RNA_SPLICE_UNKNOWN,
+    /* 1101.0110    0xE6 ... TCCG */ RNA_SPLICE_UNKNOWN,
+    /* 1101.0111    0xE7 ... TCCT */ RNA_SPLICE_UNKNOWN,
+    /* 1101.1000    0xE8 ... TCGA */ RNA_SPLICE_UNKNOWN,
+    /* 1101.1001    0xE9 ... TCGC */ RNA_SPLICE_UNKNOWN,
+    /* 1101.1010    0xEA ... TCGG */ RNA_SPLICE_UNKNOWN,
+    /* 1101.1011    0xEB ... TCGT */ RNA_SPLICE_UNKNOWN,
+    /* 1101.1100    0xEC ... TCTA */ RNA_SPLICE_UNKNOWN,
+    /* 1101.1101    0xED ... TCTC */ RNA_SPLICE_UNKNOWN,
+    /* 1101.1110    0xEE ... TCTG */ RNA_SPLICE_UNKNOWN,
+    /* 1101.1111    0xEF ... TCTT */ RNA_SPLICE_UNKNOWN,
+
+    /* 1111.0000    0xF0 ... TTAA */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1111.0001    0xF1 ... TTAC */ ( RNA_SPLICE_REV | 0x10 ),
+    /* 1111.0010    0xF2 ... TTAG */ ( RNA_SPLICE_FWD | 0x10 ),
+    /* 1111.0011    0xF3 ... TTAT */ ( RNA_SPLICE_REV | 0x10 ),
+    /* 1111.0100    0xF4 ... TTCA */ RNA_SPLICE_UNKNOWN,
+    /* 1111.0101    0xF5 ... TTCC */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 1111.0110    0xF6 ... TTCG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1111.0111    0xF7 ... TTCT */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 1111.1000    0xF8 ... TTGA */ RNA_SPLICE_UNKNOWN,
+    /* 1111.1001    0xF9 ... TTGC */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 1111.1010    0xFA ... TTGG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1111.1011    0xFB ... TTGT */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 1111.1100    0xFC ... TTTA */ RNA_SPLICE_UNKNOWN,
+    /* 1111.1101    0xFD ... TTTC */ ( RNA_SPLICE_REV | 0x20 ),
+    /* 1111.1110    0xFE ... TTTG */ ( RNA_SPLICE_FWD | 0x20 ),
+    /* 1111.1111    0xFF ... TTTT */ ( RNA_SPLICE_REV | 0x20 )
+};
+
+
+/*************************************************************
+    RNA-splice detector:
+
+    base  0   1   .......  n-2  n-1     direction
+
+          G   T             A    G      forward
+          A   T             A    C      forward
+
+          C   T             A    C      reverse
+          G   T             A    T      reverse
+
+
+    =========================================================
+
+    zero mismatches ( aka full matches ) :
+
+    ATAC    ... MINOR   [0x31]=RNA_SPLICE_FWD
+    CTAC    ... MAJOR   [0x71]=RNA_SPLICE_REV
+    GTAG    ... MAJOR   [0xB2]=RNA_SPLICE_FWD
+    GTAT    ... MINOR   [0xB3]=RNA_SPLICE_REV
+
+    =========================================================
+
+    one mismatch:
+
+    ATAC    ... MINOR, forward
+
+        *
+        CTAC ( is also MAJOR reverse ... )
+        GTAC ( is alow MAJOR reverse, 1 mismatch )
+        TTAC ( is alow MAJOR reverse, 1 mismatch )
+
+         *
+        AAAC [0x01]=( RNA_SPLICE_FWD | 0x10 )
+        ACAC [0x11]=( RNA_SPLICE_FWD | 0x10 )
+        AGAC [0x21]=( RNA_SPLICE_FWD | 0x10 )
+
+          *
+        ATCC [0x35]=( RNA_SPLICE_FWD | 0x10 )
+        ATGC [0x39]=( RNA_SPLICE_FWD | 0x10 )
+        ATTC [0x3D]=( RNA_SPLICE_FWD | 0x10 )
+
+           *
+        ATAA [0x30]=( RNA_SPLICE_FWD | 0x10 )
+        ATAG ( is also MAJOR forward, 1 mismatch )
+        ATAT [0x33]=( RNA_SPLICE_FWD | 0x10 )
+
+    -----------------------------------------------------------
+    CTAC    ... MAJOR, reverse
+
+        *
+        ATAC ( is also MINOR forward, full match )
+        GTAC ( is also MAJOR forward, 1 mismatch )
+        TTAC [0xF1]=( RNA_SPLICE_REV | 0x10 )
+
+         *
+        CAAC [0x41]=( RNA_SPLICE_REV | 0x10 )
+        CCAC [0x51]=( RNA_SPLICE_REV | 0x10 )
+        CGAC [0x61]=( RNA_SPLICE_REV | 0x10 )
+
+          *
+        CTCC [0x75]=( RNA_SPLICE_REV | 0x10 )
+        CTGC [0x79]=( RNA_SPLICE_REV | 0x10 )
+        CTTC [0x7D]=( RNA_SPLICE_REV | 0x10 )
+
+           *
+        CTAA [0x70]=( RNA_SPLICE_REV | 0x10 )
+        CTAG ( is also MAJOR forward, 1 mismatch )
+        CTAT [0x73]=( RNA_SPLICE_REV | 0x10 )
+
+    -----------------------------------------------------------
+    GTAG    ... MAJOR, forward
+
+        *
+        ATAG [0x32]=( RNA_SPLICE_FWD | 0x10 )
+        CTAG [0x72]=( RNA_SPLICE_FWD | 0x10 )
+        TTAG [0xF2]=( RNA_SPLICE_FWD | 0x10 )
+
+         *
+        GAAG [0x82]=( RNA_SPLICE_FWD | 0x10 )
+        GCAG [0x92]=( RNA_SPLICE_FWD | 0x10 )
+        GGAG [0xA2]=( RNA_SPLICE_FWD | 0x10 )
+
+          *
+        GTCG [0xB6]=( RNA_SPLICE_FWD | 0x10 )
+        GTGG [0xBA]=( RNA_SPLICE_FWD | 0x10 )
+        GTTG [0xBE]=( RNA_SPLICE_FWD | 0x10 )
+
+           *
+        GTAA [0xB0]=( RNA_SPLICE_FWD | 0x10 )
+        GTAC [0xB1]=( RNA_SPLICE_FWD | 0x10 )
+        GTAT ( is also MINOR reverse, full match )
+
+    -----------------------------------------------------------
+    GTAT    ... MINOR, reverse
+
+        *
+        ATAT ( is also MINOR forward, 1 mismatch )
+        CTAT ( is also MAJOR reverse, 1 mismatch )
+        TTAT [0xF3]=( RNA_SPLICE_REV | 0x10 )
+
+         *
+        GAAT [0x83]=( RNA_SPLICE_REV | 0x10 )
+        GCAT [0x93]=( RNA_SPLICE_REV | 0x10 )
+        GGAT [0xA3]=( RNA_SPLICE_REV | 0x10 )
+
+          *
+        GTCT [0xB7]=( RNA_SPLICE_REV | 0x10 )
+        GTGT [0xBB]=( RNA_SPLICE_REV | 0x10 )
+        GTTT [0xBF]=( RNA_SPLICE_REV | 0x10 )
+
+           *
+        GTAA ( is also MAJOR forward, 1 mismatch )
+        GTAC ( is also MAJOR forward, 1 mismatch )
+        GTAG ( is also MAJOR forward, full match )
+
+    =========================================================
+
+    two mismatches:
+
+    ATAC    ... MINOR, forward
+
+        * *
+        CTAC ( is also MAJOR reverse, full match )
+        CTCC ( is also MAJOR reverse, 1 mismatch )
+        CTGC ( is also MAJOR reverse, 1 mismatch )
+        CTTC ( is also MAJOR reverse, 1 mismatch )
+        GTAC ( is also MAJOR forward, 1 mismatch )
+        GTCC ( is also MAJOR reverse, 2 mismatches )
+        GTGC ( is also MAJOR reverse, 2 mismatches )
+        GTTC ( is also MAJOR reverse, 2 mismatches )
+        TTAC ( is also MAJOR reverse, 1 mismatch )
+        TTCC ( is also MAJOR reverse, 2 mismatches )
+        TTGC ( is also MAJOR reverse, 2 mismatches )
+        TTTC ( is also MAJOR reverse, 2 mismatches )
+
+         **
+        AAAC ( is also MAJOR forward, 1 mismatch )
+        AACC [0x05]=( RNA_SPLICE_FWD | 0x20 )
+        AAGC [0x09]=( RNA_SPLICE_FWD | 0x20 )
+        AATC [0x0D]=( RNA_SPLICE_FWD | 0x20 )
+        ACAC ( is also MINOR forward, 1 mismatch )
+        ACCC [0x15]=( RNA_SPLICE_FWD | 0x20 )
+        ACGC [0x19]=( RNA_SPLICE_FWD | 0x20 )
+        ACTC [0x1D]=( RNA_SPLICE_FWD | 0x20 )
+        AGAC ( is also MINOR forward, 1 mismatch )
+        AGCC [0x25]=( RNA_SPLICE_FWD | 0x20 )
+        AGGC [0x29]=( RNA_SPLICE_FWD | 0x20 )
+        AGTC [0x2D]=( RNA_SPLICE_FWD | 0x20 )
+
+        *  *
+        CTAA ( is also MAJOR reverse, 1 mismatch )
+        CTAC ( is also MAJOR reverse, full match )
+        CTAG ( is also MAJOR forward, 1 mismatch )
+        CTAT ( is also MAJOR reverse, 1 mismatch )
+        GTAA ( is also MAJOR forward, 1 mismatch )
+        GTAC ( is also MAJOR forward, 1 mismatch )
+        GTAG ( is also MAJOR forward, full match )
+        GTAT ( is also MINOR reverse, full match )
+        TTAA ( is also MAJOR reverse, 2 mismatches )
+        TTAC ( is also MAJOR reverse, 1 mismatch )
+        TTAG ( is also MAJOR forward, 1 mismatch )
+        TTAT ( is also MINOR reverse, 1 mismatch )
+
+         * *
+        AAAA [0x00]=( RNA_SPLICE_FWD | 0x20 )
+        AAAC ( is also MAJOR forward, 1 mismatch )
+        AAAG [0x02]=( RNA_SPLICE_FWD | 0x20 )
+        AAAT [0x03]=( RNA_SPLICE_FWD | 0x20 )
+        ACAA [0x10]=( RNA_SPLICE_FWD | 0x20 )
+        ACAC ( is also MINOR forward, 1 mismatch )
+        ACAG [0x12]=( RNA_SPLICE_FWD | 0x20 )
+        ACAT [0x13]=( RNA_SPLICE_FWD | 0x20 )
+        AGAA [0x20]=( RNA_SPLICE_FWD | 0x20 )
+        AGAC ( is also MINOR forward, 1 mismatch )
+        AGAG [0x22]=( RNA_SPLICE_FWD | 0x20 )
+        AGAT [0x23]=( RNA_SPLICE_FWD | 0x20 )
+
+    -----------------------------------------------------------
+    CTAC    ... MAJOR, reverse
+
+        * *
+        ATAC ( is also MINOR forward, full match )
+        ATCC ( is also MINOR forward, 1 mismatch )
+        ATGC ( is also MINOR forward, 1 mismatch )
+        ATTC ( is also MINOR forward, 1 mismatch )
+        GTAC ( is also MAJOR forward, 1 mismatch )
+        GTCC [0xB5]=( RNA_SPLICE_REV | 0x20 )
+        GTGC [0xB9]=( RNA_SPLICE_REV | 0x20 )
+        GTTC [0xBD]=( RNA_SPLICE_REV | 0x20 )
+        TTAC ( is also MAJOR reverse, 1 mismatch )
+        TTCC [0xF5]=( RNA_SPLICE_REV | 0x20 )
+        TTGC [0xF9]=( RNA_SPLICE_REV | 0x20 )
+        TTTC [0xFD]=( RNA_SPLICE_REV | 0x20 )
+
+         **
+        CAAC ( is also MAJOR reverse, 1 mismatch )
+        CACC [0x45]=( RNA_SPLICE_REV | 0x20 )
+        CAGC [0x49]=( RNA_SPLICE_REV | 0x20 )
+        CATC [0x4D]=( RNA_SPLICE_REV | 0x20 )
+        CCAC ( is also MAJOR reverse, 1 mismatch )
+        CCCC [0x55]=( RNA_SPLICE_REV | 0x20 )
+        CCGC [0x59]=( RNA_SPLICE_REV | 0x20 )
+        CCTC [0x5D]=( RNA_SPLICE_REV | 0x20 )
+        CGAC ( is also MAJOR reverse, 1 mismatch )
+        CGCC [0x65]=( RNA_SPLICE_REV | 0x20 )
+        CGGC [0x69]=( RNA_SPLICE_REV | 0x20 )
+        CGTC [0x6D]=( RNA_SPLICE_REV | 0x20 )
+
+        *  *
+        ATAA ( is also MINOR forward, 1 mismatch )
+        ATAC ( is also MINOR forward, full match )
+        ATAG ( is also MAJOR forward, 1 mismatch )
+        ATAT ( is also MINOR forward, 1 mismatch )
+        GTAA ( is also MAJOR forward, 1 mismatch )
+        GTAC ( is also MAJOR forward, 1 mismatch )
+        GTAG ( is also MAJOR forward, full match )
+        GTAT ( is also MINOR reverse, full match )
+        TTAA ( is also MAJOR forward, 2 mismatches )
+        TTAC ( is also MAJOR reverse, 1 mismatch )
+        TTAG ( is also MAJOR forward, 1 mismatch )
+        TTAT ( is also MINOR reverse, 1 mismatch )
+
+         * *
+        CAAA [0x40]=( RNA_SPLICE_REV | 0x20 )
+        CAAC ( is also MAJOR reverse, 1 mismatch )
+        CAAG [0x42]=( RNA_SPLICE_REV | 0x20 )
+        CAAT [0x43]=( RNA_SPLICE_REV | 0x20 )
+        CCAA [0x50]=( RNA_SPLICE_REV | 0x20 )
+        CCAC ( is also MAJOR reverse, 1 mismatch )
+        CCAG [0x52]=( RNA_SPLICE_REV | 0x20 )
+        CCAT [0x53]=( RNA_SPLICE_REV | 0x20 )
+        CGAA [0x60]=( RNA_SPLICE_REV | 0x20 )
+        CGAC ( is also MAJOR reverse, 1 mismatch )
+        CGAG [0x62]=( RNA_SPLICE_REV | 0x20 )
+        CGAT [0x63]=( RNA_SPLICE_REV | 0x20 )
+
+    -----------------------------------------------------------
+    GTAG    ... MAJOR, forward
+
+        * *
+        ATAG ( is also MAJOR forward, 1 mismatch )
+        ATCG [0x36]=( RNA_SPLICE_FWD | 0x20 )
+        ATGG [0x3A]=( RNA_SPLICE_FWD | 0x20 )
+        ATTG [0x3E]=( RNA_SPLICE_FWD | 0x20 )
+        CTAG ( is also MAJOR forward, 1 mismatch )
+        CTCG [0x76]=( RNA_SPLICE_FWD | 0x20 )
+        CTGG [0x7A]=( RNA_SPLICE_FWD | 0x20 )
+        CTTG [0x7E]=( RNA_SPLICE_FWD | 0x20 )
+        TTAG ( is also MAJOR forward, 1 mismatch )
+        TTCG [0xF6]=( RNA_SPLICE_FWD | 0x20 )
+        TTGG [0xFA]=( RNA_SPLICE_FWD | 0x20 )
+        TTTG [0xFE]=( RNA_SPLICE_FWD | 0x20 )
+
+         **
+        GAAG ( is also MAJOR forward, 1 mismatch )
+        GACG [0x86]=( RNA_SPLICE_FWD | 0x20 )
+        GAGG [0x8A]=( RNA_SPLICE_FWD | 0x20 )
+        GATG [0x8E]=( RNA_SPLICE_FWD | 0x20 )
+        GCAG ( is also MAJOR forward, 1 mismatch )
+        GCCG [0x96]=( RNA_SPLICE_FWD | 0x20 )
+        GCGG [0x9A]=( RNA_SPLICE_FWD | 0x20 )
+        GCTG [0x9E]=( RNA_SPLICE_FWD | 0x20 )
+        GGAG ( is also MAJOR forward, 1 mismatch )
+        GGCG [0xA6]=( RNA_SPLICE_FWD | 0x20 )
+        GGGG [0xAA]=( RNA_SPLICE_FWD | 0x20 )
+        GGTG [0xAE]=( RNA_SPLICE_FWD | 0x20 )
+
+        *  *
+        ATAA ( is also MINOR forward, 1 mismatch )
+        ATAC ( is also MINOR forward, full match )
+        ATAG ( is also MAJOR forward, 1 mismatch )
+        ATAT ( is also MINOR forward, 1 mismatch )
+        CTAA ( is also MAJOR reverse, 1 mismatch )
+        CTAC ( is also MAJOR reverse, full match )
+        CTAG ( is also MAJOR forward, 1 mismatch )
+        CTAT ( is also MAJOR reverse, 1 mismatch )
+        TTAA [0xF0]=( RNA_SPLICE_FWD | 0x20 )
+        TTAC ( is also MAJOR reverse, 1 mismatch )
+        TTAG ( is also MAJOR forward, 1 mismatch )
+        TTAT ( is also MINOR reverse, 1 mismatch )
+
+         * *
+        GAAA [0x80]=( RNA_SPLICE_FWD | 0x20 )
+        GAAC [0x81]=( RNA_SPLICE_FWD | 0x20 )
+        GAAG ( is also MAJOR forward, 1 mismatch )
+        GAAT ( is also MINOR reverse, 1 mismatch )
+        GCAA [0x90]=( RNA_SPLICE_FWD | 0x20 )
+        GCAC [0x91]=( RNA_SPLICE_FWD | 0x20 )
+        GCAG ( is also MAJOR forward, 1 mismatch )
+        GCAT ( is also MINOR reverse, 1 mismatch )
+        GGAA [0xA0]=( RNA_SPLICE_FWD | 0x20 )
+        GGAC [0xA1]=( RNA_SPLICE_FWD | 0x20 )
+        GGAG ( is also MAJOR forward, 1 mismatch )
+        GGAT ( is also MINOR reverse, 1 mismatch )
+
+    -----------------------------------------------------------
+    GTAT    ... MINOR, reverse
+
+        * *
+        ATAT ( is also MINOR forward, 1 mismatch )
+        ATCT [0x37]=( RNA_SPLICE_REV | 0x20 )
+        ATGT [0x3B]=( RNA_SPLICE_REV | 0x20 )
+        ATTT [0x3F]=( RNA_SPLICE_REV | 0x20 )
+        CTAT ( is also MAJOR reverse, 1 mismatch )
+        CTCT [0x77]=( RNA_SPLICE_REV | 0x20 )
+        CTGT [0x7B]=( RNA_SPLICE_REV | 0x20 )
+        CTTT [0x7F]=( RNA_SPLICE_REV | 0x20 )
+        TTAT ( is also MINOR reverse, 1 mismatch )
+        TTCT [0xF7]=( RNA_SPLICE_REV | 0x20 )
+        TTGT [0xFB]=( RNA_SPLICE_REV | 0x20 )
+        TTTT [0xFF]=( RNA_SPLICE_REV | 0x20 )
+
+         **
+        GAAT ( is also MINOR reverse, 1 mismatch )
+        GACT [0x87]=( RNA_SPLICE_REV | 0x20 )
+        GAGT [0x8B]=( RNA_SPLICE_REV | 0x20 )
+        GATT [0x8F]=( RNA_SPLICE_REV | 0x20 )
+        GCAT ( is also MINOR reverse, 1 mismatch )
+        GCCT [0x97]=( RNA_SPLICE_REV | 0x20 )
+        GCGT [0x9B]=( RNA_SPLICE_REV | 0x20 )
+        GCTT [0x9F]=( RNA_SPLICE_REV | 0x20 )
+        GGAT ( is also MINOR reverse, 1 mismatch )
+        GGCT [0xA7]=( RNA_SPLICE_REV | 0x20 )
+        GGGT [0xAB]=( RNA_SPLICE_REV | 0x20 )
+        GGTT [0xAF]=( RNA_SPLICE_REV | 0x20 )
+
+        *  *
+        ATAA ( is also MINOR forward, 1 mismatch )
+        ATAC ( is also MINOR forward, full match )
+        ATAG ( is also MAJOR forward, 1 mismatch )
+        ATAT ( is also MINOR forward, 1 mismatch )
+        CTAA ( is also MAJOR reverse, 1 mismatch )
+        CTAC ( is also MAJOR reverse, full match )
+        CTAG ( is also MAJOR forward, 1 mismatch )
+        CTAT ( is also MAJOR reverse, 1 mismatch )
+        TTAA ( is also MAJOR forward, 2 mismatches )
+        TTAC ( is also MAJOR reverse, 1 mismatch )
+        TTAG ( is also MAJOR forward, 1 mismatch )
+        TTAT ( is also MINOR reverse, 1 mismatch )
+
+         * *
+        GAAA ( is also MAJOR forward, 2 mismatches )
+        GAAC ( is also MAJOR forward, 2 mismatches )
+        GAAG ( is also MAJOR forward, 1 mismatch )
+        GAAT ( is also MINOR reverse, 1 mismatch )
+        GCAA ( is also MAJOR forward, 2 mismatches )
+        GCAC ( is also MAJOR forward, 2 mismatches )
+        GCAG ( is also MAJOR forward, 1 mismatch )
+        GCAT ( is also MINOR reverse, 1 mismatch )
+        GGAA ( is also MAJOR forward, 2 mismatches )
+        GGAC ( is also MAJOR forward, 2 mismatches )
+        GGAG ( is also MAJOR forward, 1 mismatch )
+        GGAT ( is also MINOR reverse, 1 mismatch )
+
+*************************************************************/
+
+rc_t check_rna_splicing_candidates_against_ref( struct ReferenceObj const * ref_obj,
+                                                uint32_t splice_level, /* 0, 1, 2 ... allowed mismatches */
+                                                INSDC_coord_zero pos,
+                                                rna_splice_candidates * candidates )
+{
+    rc_t rc = 0;
+    uint32_t idx;
+    for ( idx = 0; idx < candidates->count && rc == 0; ++idx )
+    {
+        uint8_t splice[ 4 ];
+        INSDC_coord_len written;
+        rna_splice_candidate * rsc = &candidates->candidates[ idx ];
+        INSDC_coord_zero rd_pos = ( pos + rsc->ref_offset );
+        rc = ReferenceObj_Read( ref_obj, rd_pos, 2, splice, &written );
+        if ( rc == 0 && written == 2 )
+        {
+            rd_pos += ( rsc->len - 2 );
+            rc = ReferenceObj_Read( ref_obj, rd_pos, 2, &splice[ 2 ], &written );
+            if ( rc == 0 && written == 2 )
+            {
+                uint8_t compressed = compress_4_bases_to_byte( splice );   /* 4 bases --> 1 byte */
+                uint8_t match = compressed_to_fwd_reverse_0[ compressed ]; /* table lookup */
+                uint8_t mismatches = ( match >> 4 );
+
+                if ( mismatches <= splice_level )
+                {
+                    rsc->matched = match;
+
+                    if ( ( match & RNA_SPLICE_FWD ) == RNA_SPLICE_FWD )
+                        candidates->fwd_matched++;
+                    else if ( ( match & RNA_SPLICE_REV ) == RNA_SPLICE_REV )
+                        candidates->rev_matched++;
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+rc_t discover_rna_splicing_candidates( uint32_t cigar_len, const char * cigar, uint32_t min_len, rna_splice_candidates * candidates )
+{
+    rc_t rc = 0;
+    candidates->cigops_len = ( cigar_len / 2 ) + 1;
+    candidates->cigops = malloc( ( sizeof * candidates->cigops ) * candidates->cigops_len );
+    if ( candidates->cigops == NULL )
+        rc = RC( rcExe, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+    else
+    {
+        uint32_t ref_offset = 0;
+        int32_t op_idx;
+        CigOps * cigops = candidates->cigops;
+
+        candidates->n_cigops = ExplodeCIGAR( cigops, candidates->cigops_len, cigar, cigar_len );
+        candidates->count = 0;
+        for ( op_idx = 0; op_idx < ( candidates->n_cigops - 1 ); op_idx++ )
+        {
+            char op_code = cigops[ op_idx ].op;
+            uint32_t op_len = cigops[ op_idx ].oplen;
+            if ( (op_code == 'D' || op_code == 'N') && op_len >= min_len && candidates->count < MAX_RNA_SPLICE_CANDIDATES )
+            {
+                rna_splice_candidate * rsc = &candidates->candidates[ candidates->count++ ];
+                rsc->ref_offset = ref_offset;
+                rsc->len = op_len;
+                rsc->op_idx = op_idx;
+                rsc->matched = RNA_SPLICE_UNKNOWN;  /* we dont know that yet, caller has to do that ( sam-aligned.c ) */
+            }
+            if ( op_code == 'M' || op_code == 'X' || op_code == '=' || op_code == 'D' || op_code == 'N' )
+                ref_offset += op_len;
+        }
+    }
+    return rc;
+}
+
+
+
+rc_t change_rna_splicing_cigar( uint32_t cigar_len, char * cigar, rna_splice_candidates * candidates, uint32_t * NM_adjustment )
+{
+    rc_t rc = 0;
+    uint32_t winner, sum_of_n_lengths = 0;
+    int32_t idx, dst;
+    CigOps * cigops = candidates->cigops;
+
+    /* handle the special case that we do have forward and reverse candidates in one alignement, that cannot be!
+       we declare a winner ( the direction that occurs most ), zero out the looser(s) and give a warning */
+    if ( candidates->fwd_matched > candidates->rev_matched )
+        winner = RNA_SPLICE_FWD;
+    else
+        winner = RNA_SPLICE_REV;
+
+    for ( idx = 0; idx < candidates->count; ++idx )    
+    {
+        rna_splice_candidate * rsc = &candidates->candidates[ idx ];
+        if ( ( rsc->matched & 0x0F ) == winner && cigops[ rsc->op_idx ].op == 'D' )
+        {
+            cigops[ rsc->op_idx ].op = 'N';
+            sum_of_n_lengths += rsc->len;
+        }
+    }
+
+    for ( idx = 0, dst = 0; idx < ( candidates->n_cigops - 1 ) && rc == 0; ++idx )
+    {
+        size_t sz;
+        rc = string_printf( &cigar[ dst ], cigar_len + 1 - dst, &sz, "%u%c", cigops[ idx ].oplen, cigops[ idx ].op );
+        dst += sz;
+    }
+    if ( NM_adjustment != NULL )
+        *NM_adjustment = sum_of_n_lengths;
+    return rc;
+}
+rc_t cg_canonical_print_cigar( const char * cigar, size_t cigar_len)
+{
+    rc_t rc;
+    if ( cigar_len > 0 )
+    {
+        int i,total_cnt,cnt;
+        char op;
+        for(i=0,cnt=0,op=0,cnt=0;i<cigar_len;i++){
+                if(isdigit(cigar[i])){
+                        cnt=cnt*10+(cigar[i]-'0');
+                } else if(isalpha(cigar[i])){
+                        if(op=='\0'){ /** first op **/
+                                total_cnt=cnt;
+                        } else if(op==cigar[i]){ /** merging consequitive ops **/
+                                total_cnt+=cnt;
+                        } else {
+                                if(total_cnt > 0) KOutMsg( "%d%c", total_cnt,op );
+                                total_cnt=cnt;
+                        }
+                        op=cigar[i];
+                        cnt=0;
+                } else {
+                        assert(0); /*** should never happen inside this function ***/
+                }
+        }
+        if(total_cnt && op) KOutMsg( "%d%c", total_cnt,op );
+    }
+    else
+        rc = KOutMsg( "*" );
+    return rc;
+}
+
diff --git a/tools/sra-pileup/cg_tools.h b/tools/sra-pileup/cg_tools.h
new file mode 100644
index 0000000..9f7bd66
--- /dev/null
+++ b/tools/sra-pileup/cg_tools.h
@@ -0,0 +1,137 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_cgtools_
+#define _h_cgtools_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include <klib/rc.h>
+#include <insdc/sra.h>
+#include <insdc/sra.h>
+#include <align/reference.h>
+
+#define MAX_CG_CIGAR_LEN ( ( 11 * 35 ) + 1 )
+#define MAX_GC_LEN ( ( 11 * 3 ) + 1 )
+#define MAX_READ_LEN ( 35 )
+
+
+typedef struct ptr_len
+{
+    const char * ptr;
+    uint32_t len;
+} ptr_len;
+
+typedef struct cg_cigar_input
+{
+    ptr_len p_cigar;
+    ptr_len p_read;
+    ptr_len p_quality;
+
+    bool orientation;
+    INSDC_coord_one seq_req_id;
+    bool edit_dist_available;
+    int32_t edit_dist;
+} cg_cigar_input;
+
+
+typedef struct cg_cigar_output
+{
+    char cigar[ MAX_CG_CIGAR_LEN ];
+    uint32_t cigar_len;
+
+    ptr_len p_cigar;
+    ptr_len p_read;
+    ptr_len p_quality;
+    ptr_len p_tags;
+
+    char newSeq[ MAX_READ_LEN ];
+    char newQual[ MAX_READ_LEN ];
+    char tags[ MAX_CG_CIGAR_LEN * 2 ];
+
+    int32_t edit_dist;
+} cg_cigar_output;
+
+
+rc_t make_cg_cigar( const cg_cigar_input * input, cg_cigar_output * output );
+
+rc_t make_cg_merge( const cg_cigar_input * input, cg_cigar_output * output );
+
+
+typedef struct CigOps
+{
+    char op;
+    int8_t   ref_sign; /* 0;+1;-1; ref_offset = ref_sign * offset */
+    int8_t   seq_sign; /* 0;+1;-1; seq_offset = seq_sign * offset */
+    uint32_t oplen;
+} CigOps;
+
+
+int32_t ExplodeCIGAR( CigOps dst[], uint32_t len, char const cigar[], uint32_t ciglen );
+
+uint32_t CombineCIGAR( char dst[], CigOps const seqOp[], uint32_t seq_len,
+                       uint32_t refPos, CigOps const refOp[], uint32_t ref_len );
+
+#define RNA_SPLICE_UNKNOWN 0
+#define RNA_SPLICE_FWD 1
+#define RNA_SPLICE_REV 2
+
+typedef struct rna_splice_candidate
+{
+    uint32_t ref_offset;
+    uint32_t len;
+    uint32_t op_idx;
+    uint32_t matched;   /* 0..unknown, 1..fwd, 2..rev */
+} rna_splice_candidate;
+
+
+#define MAX_RNA_SPLICE_CANDIDATES 20
+
+typedef struct rna_splice_candidates
+{
+    rna_splice_candidate candidates[ MAX_RNA_SPLICE_CANDIDATES ];
+    CigOps * cigops;
+    uint32_t count, fwd_matched, rev_matched, cigops_len;
+    int32_t n_cigops;
+} rna_splice_candidates;
+
+
+rc_t discover_rna_splicing_candidates( uint32_t cigar_len, const char * cigar, uint32_t min_len, rna_splice_candidates * candidates );
+
+rc_t check_rna_splicing_candidates_against_ref( struct ReferenceObj const * ref_obj,
+                                                uint32_t splice_level,
+                                                INSDC_coord_zero pos,
+                                                rna_splice_candidates * candidates );
+
+rc_t change_rna_splicing_cigar( uint32_t cigar_len, char * cigar, rna_splice_candidates * candidates, uint32_t * NM_adjustment );
+rc_t cg_canonical_print_cigar( const char * cigar, size_t cigar_len);
+
+#endif
diff --git a/tools/sra-pileup/cmdline_cmn.c b/tools/sra-pileup/cmdline_cmn.c
new file mode 100644
index 0000000..c9cc9e5
--- /dev/null
+++ b/tools/sra-pileup/cmdline_cmn.c
@@ -0,0 +1,711 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "cmdline_cmn.h"
+
+#include <kapp/args.h>
+
+#include <vdb/report.h> /* ReportResetTable */
+
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <klib/out.h>
+
+#include <sra/srapath.h>
+
+#include <vfs/manager.h>
+#include <vfs/path.h>
+#include <vfs/path-priv.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+const char * ref_usage[] = { "Filter by position on genome.",
+                             "Name can either be file specific name",
+                             "(ex: \"chr1\" or \"1\").",
+                             "\"from\" and \"to\" are 1-based coordinates",
+                             NULL };
+
+const char * outf_usage[] = { "Output will be written to this file",
+                              "instead of std-out", NULL };
+
+const char * table_usage[] = { "Which alignment table(s) to use (p|s|e):", 
+                               "p - primary, s - secondary, e - evidence-interval", 
+                               "(default = p)", NULL };
+
+const char * gzip_usage[] = { "Compress output using gzip", NULL };
+
+const char * bzip_usage[] = { "Compress output using bzip2", NULL };
+
+const char * inf_usage[] = { "File with all input-parameters / options", NULL };
+
+const char * schema_usage[] = { "optional schema-file to be used", NULL };
+
+const char * no_mt_usage[] = { "disable multithreading", NULL };
+
+const char * timing_usage[] = { "write timing log-file", NULL };
+
+#define OPTION_OUTF    "outfile"
+#define ALIAS_OUTF     "o"
+
+#define OPTION_TABLE   "table"
+#define ALIAS_TABLE    "t"
+
+#define OPTION_GZIP    "gzip"
+#define ALIAS_GZIP     NULL
+
+#define OPTION_BZIP    "bzip2"
+#define ALIAS_BZIP     NULL
+
+#define OPTION_INF    "infile"
+#define ALIAS_INF     "f"
+
+#define OPTION_SCHEMA "schema"
+#define ALIAS_SCHEMA  "S"
+
+#define OPTION_NO_MT  "disable-multithreading"
+#define OPTION_TIMING "timing"
+
+OptDef CommonOptions[] =
+{
+    /*name,           alias,         hfkt, usage-help,    maxcount, needs value, required */
+    { OPTION_REF,     ALIAS_REF,     NULL, ref_usage,     0,        true,        false },
+    { OPTION_OUTF,    ALIAS_OUTF,    NULL, outf_usage,    1,        true,        false },
+    { OPTION_TABLE,   ALIAS_TABLE,   NULL, table_usage,   1,        true,        false },
+    { OPTION_GZIP,    ALIAS_GZIP,    NULL, gzip_usage,    1,        false,       false },
+    { OPTION_BZIP,    ALIAS_BZIP,    NULL, bzip_usage,    1,        false,       false },
+    { OPTION_INF,     ALIAS_INF,     NULL, inf_usage,     0,        true,        false },
+    { OPTION_SCHEMA,  ALIAS_SCHEMA,  NULL, schema_usage,  1,        true,        false },
+    { OPTION_NO_MT,   NULL,          NULL, no_mt_usage,   1,        false,       false },  
+    { OPTION_TIMING,  NULL,          NULL, timing_usage,  1,        true,        false }
+};
+
+
+/* =========================================================================================== */
+
+static rc_t get_str_option( const Args *args, const char *name, const char ** res )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    *res = NULL;
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "ArgsOptionCount() failed" );
+    }
+    else
+    {
+        if ( count > 0 )
+        {
+            rc = ArgsOptionValue( args, name, 0, (const void **)res );
+            if ( rc != 0 )
+            {
+                LOGERR( klogInt, rc, "ArgsOptionValue() failed" );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t get_bool_option( const Args *args, const char *name, bool *res, const bool def )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    if ( rc == 0 && count > 0 )
+    {
+        *res = true;
+    }
+    else
+    {
+        *res = def;
+    }
+    return rc;
+}
+
+/* =========================================================================================== */
+
+rc_t get_common_options( Args * args, common_options *opts )
+{
+    rc_t rc = get_str_option( args, OPTION_OUTF, &opts->output_file );
+
+    if ( rc == 0 )
+        rc = get_str_option( args, OPTION_INF, &opts->input_file );
+
+    if ( rc == 0 )
+        rc = get_bool_option( args, OPTION_GZIP, &opts->gzip_output, false );
+
+    if ( rc == 0 )
+        rc = get_bool_option( args, OPTION_BZIP, &opts->bzip_output, false );
+
+    if ( rc == 0 )
+        rc = get_bool_option( args, OPTION_NO_MT, &opts->no_mt, false );
+        
+    if ( rc == 0 )
+        rc = get_str_option( args, OPTION_SCHEMA, &opts->schema_file );
+
+    if ( rc == 0 )
+        rc = get_str_option( args, OPTION_TIMING, &opts->timing_file );
+
+    if ( rc == 0 )
+    {
+        const char * table2use = NULL;
+        rc = get_str_option( args, OPTION_TABLE, &table2use );
+        opts->tab_select = primary_ats;
+        if ( rc == 0 && table2use != NULL )
+        {
+            size_t l = string_size ( table2use );
+            opts->tab_select = 0;
+            if ( ( string_chr ( table2use, l, 'p' ) != NULL )||
+                 ( string_chr ( table2use, l, 'P' ) != NULL ) )
+            { opts->tab_select |= primary_ats; };
+
+            if ( ( string_chr ( table2use, l, 's' ) != NULL )||
+                 ( string_chr ( table2use, l, 'S' ) != NULL ) )
+            { opts->tab_select |= secondary_ats; };
+
+            if ( ( string_chr ( table2use, l, 'e' ) != NULL )||
+                 ( string_chr ( table2use, l, 'E' ) != NULL ) )
+            { opts->tab_select |= evidence_ats; };
+        }
+    }
+
+    return rc;
+}
+
+void print_common_helplines( void )
+{
+    HelpOptionLine ( ALIAS_REF, OPTION_REF, "name[:from-to]", ref_usage );
+    HelpOptionLine ( ALIAS_OUTF, OPTION_OUTF, "output-file", outf_usage );
+    HelpOptionLine ( ALIAS_TABLE, OPTION_TABLE, "shortcut", table_usage );
+    HelpOptionLine ( ALIAS_BZIP, OPTION_BZIP, NULL, bzip_usage );
+    HelpOptionLine ( ALIAS_GZIP, OPTION_GZIP, NULL, gzip_usage );
+    HelpOptionLine ( NULL, OPTION_NO_MT, NULL, no_mt_usage );
+    HelpOptionLine ( NULL, OPTION_TIMING, NULL, timing_usage );
+}
+
+
+OptDef * CommonOptions_ptr( void )
+{
+    return &CommonOptions[ 0 ];
+}
+
+size_t CommonOptions_count( void )
+{
+    return ( sizeof CommonOptions / sizeof CommonOptions [ 0 ] );
+}
+
+
+/* =========================================================================================== */
+
+#if 0
+static int cmp_pchar( const char * a, const char * b )
+{
+    int res = 0;
+    if ( ( a != NULL )&&( b != NULL ) )
+    {
+        size_t len_a = string_size( a );
+        size_t len_b = string_size( b );
+        res = string_cmp ( a, len_a, b, len_b, ( len_a < len_b ) ? len_b : len_a );
+    }
+    return res;
+}
+#endif
+
+/* =========================================================================================== */
+
+
+rc_t init_ref_regions( BSTree * tree, Args * args )
+{
+    uint32_t count;
+    rc_t rc;
+
+    BSTreeInit( tree );
+    rc = ArgsOptionCount( args, OPTION_REF, &count );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "ArgsOptionCount() failed" );
+    }
+    else
+    {
+        uint32_t i;
+        for ( i = 0; i < count && rc == 0; ++i )
+        {
+            const char * s;
+            rc = ArgsOptionValue( args, OPTION_REF, i, (const void **)&s );
+            if ( rc != 0 )
+                LOGERR( klogInt, rc, "ArgsOptionValue() failed" );
+            else
+                rc = parse_and_add_region( tree, s );
+        }
+    }
+    return rc;
+}
+
+
+/* =========================================================================================== */
+
+#if TOOLS_USE_SRAPATH != 0
+static bool is_this_a_filesystem_path( const char * path )
+{
+    bool res = false;
+    size_t i, n = string_size ( path );
+    for ( i = 0; i < n && !res; ++i )
+    {
+        char c = path[ i ];
+        res = ( c == '.' || c == '/' || c == '\\' );
+    }
+    return res;
+}
+#endif
+
+#if TOOLS_USE_SRAPATH != 0
+static char *translate_accession( SRAPath *my_sra_path,
+                           const char *accession,
+                           const size_t bufsize )
+{
+    rc_t rc;
+    char * res = calloc( 1, bufsize );
+    if ( res == NULL ) return NULL;
+
+    rc = SRAPathFind( my_sra_path, accession, res, bufsize );
+    if ( GetRCState( rc ) == rcNotFound )
+    {
+        free( res );
+        return NULL;
+    }
+    else if ( GetRCState( rc ) == rcInsufficient )
+    {
+        free( res );
+        return translate_accession( my_sra_path, accession, bufsize * 2 );
+    }
+    else if ( rc != 0 )
+    {
+        free( res );
+        return NULL;
+    }
+    return res;
+}
+#endif
+
+#if TOOLS_USE_SRAPATH != 0
+static rc_t resolve_accession( const KDirectory *my_dir, char ** path )
+{
+    SRAPath *my_sra_path;
+    rc_t rc = 0;
+
+    if ( strchr ( *path, '/' ) != NULL )
+        return 0;
+
+    rc = SRAPathMake( &my_sra_path, my_dir );
+    if ( rc != 0 )
+    {
+        if ( GetRCState ( rc ) != rcNotFound || GetRCTarget ( rc ) != rcDylib )
+        {
+            if ( rc != 0 )
+            {
+                LOGERR( klogInt, rc, "SRAPathMake() failed" );
+            }
+        }
+        else
+            rc = 0;
+    }
+    else
+    {
+        if ( !SRAPathTest( my_sra_path, *path ) )
+        {
+            char *buf = translate_accession( my_sra_path, *path, 64 );
+            if ( buf != NULL )
+            {
+                free( (char*)(*path) );
+                *path = buf;
+            }
+        }
+        SRAPathRelease( my_sra_path );
+    }
+    return rc;
+}
+#endif
+
+
+/* =========================================================================================== */
+
+
+/****************************************************************************************
+    splits an argument
+
+    example: "/path/file=grp1" into path = "/path/file" and attribute = "grp1"
+    or
+    example: "/path/file" into path = "/path/file" and attribute = NULL
+
+****************************************************************************************/
+static rc_t split_argument( const char *argument, char ** path, char ** attribute, char delim )
+{
+    if ( argument == NULL || path == NULL || attribute == NULL )
+        return RC( rcApp, rcNoTarg, rcConstructing, rcParam, rcNull );
+    else
+    {
+        char * delim_ptr = string_chr ( argument, string_size ( argument ), delim );
+        if ( delim_ptr == NULL )
+        {
+            *path = string_dup_measure( argument, NULL );
+            *attribute = NULL;
+        }
+        else
+        {
+            size_t len = string_size( argument );
+            size_t len1 = ( delim_ptr - argument );
+            *path = string_dup ( argument, len1 );
+            if ( delim_ptr < argument + len - 1 )
+                *attribute = string_dup ( delim_ptr + 1, len - ( len1 + 1 ) );
+            else
+                *attribute = NULL;
+        }
+    }
+    return 0;
+}
+
+
+static rc_t split_vpath_into_path_and_readgroup( VPath *vpath, const char *argument, char ** path, char ** attribute )
+{
+    size_t zz;
+    char readgroup_buffer[ 256 ];
+    rc_t rc1 = VPathOption( vpath, vpopt_readgroup, readgroup_buffer, sizeof readgroup_buffer - 1, &zz );
+    if ( rc1 == 0 )
+        *attribute = string_dup( readgroup_buffer, zz );
+    *path = string_dup( argument, string_size( argument ) );
+    return 0;
+}
+
+
+static rc_t test_split_vpath_into_path_and_readgroup( VPath *vpath, const char *argument, char ** path, char ** attribute )
+{
+    rc_t rc = 0;
+#if 1
+    if ( VPathFromUri ( vpath ) )
+        rc = split_vpath_into_path_and_readgroup ( vpath, argument, path, attribute );
+    else
+        rc = split_argument ( argument, path, attribute, '=' );
+#else
+    VPUri_t uri_type = VPathGetUri_t( vpath );
+    switch ( uri_type )
+    {
+        default:
+        case vpuri_invalid:
+            rc = RC( rcExe, rcParam, rcAccessing, rcPath, rcInvalid );
+            break;
+
+        case vpuri_not_supported:
+            rc = RC( rcExe, rcParam, rcAccessing, rcPath, rcUnsupported );
+            break;
+
+        case vpuri_none:
+            rc = split_argument( argument, path, attribute, '=' );
+            break;
+
+        case vpuri_ncbi_vfs:
+        case vpuri_file:
+        case vpuri_ncbi_acc:
+        case vpuri_http:
+            rc = split_vpath_into_path_and_readgroup( vpath, argument, path, attribute );
+            break;
+    }
+#endif
+    return rc;
+}
+
+
+static rc_t split_argument_into_path_and_readgroup( const char *argument, char ** path, char ** attribute )
+{
+    rc_t rc;
+    char * colon_ptr = string_chr ( argument, string_size ( argument ), ':' );
+    if ( colon_ptr == NULL )
+    {
+        /* we do not have a colon in the argument, that means: there is no uri-syntax involved
+           ---> we can split the "old fashioned way" at the equal-sign */
+        rc = split_argument( argument, path, attribute, '=' );
+    }
+    else
+    {
+        VFSManager * mgr;
+        rc_t rc = VFSManagerMake ( & mgr );
+
+        *path = NULL;
+        *attribute = NULL;
+
+        if ( rc == 0 )
+        {
+            VPath * vpath;
+            rc = VFSManagerMakePath ( mgr, &vpath, "%s", argument );
+            if ( rc == 0 )
+            {
+                rc = test_split_vpath_into_path_and_readgroup( vpath, argument, path, attribute );
+                VPathRelease( vpath );
+            }
+
+            VFSManagerRelease ( mgr );
+        }
+    }
+    return rc;
+}
+
+
+/* =========================================================================================== */
+
+
+rc_t foreach_argument( Args * args, KDirectory *dir, bool div_by_spotgrp, bool * empty,
+    rc_t ( CC * on_argument ) ( const char * path, const char * spot_group, void * data ), void * data )
+{
+    uint32_t count;
+    rc_t rc = ArgsParamCount( args, &count );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "ArgsParamCount() failed" );
+    }
+    else
+    {
+        uint32_t idx;
+        if ( empty != NULL )
+        {
+            *empty = ( count == 0 );
+        }
+        for ( idx = 0; idx < count && rc == 0; ++idx )
+        {
+            const char *param = NULL;
+            rc = ArgsParamValue( args, idx, (const void **)&param );
+            if ( rc != 0 )
+            {
+                LOGERR( klogInt, rc, "ArgsParamvalue() failed" );
+            }
+            else
+            {
+                
+                char * path = NULL;
+                char * spot_group = NULL;
+
+                rc = split_argument_into_path_and_readgroup( param, &path, &spot_group );
+                if ( rc == 0 && path != NULL )
+                {
+                    /* in case there is no spotgroup-override from the commandline AND
+                       the option to divide by spot-group is set, let spot_group point
+                       to an empty string ---> divide by original spot-group! */
+                    if ( spot_group == NULL && div_by_spotgrp )
+                    {
+                        spot_group = calloc( 1, 1 );
+                    }
+
+#if TOOLS_USE_SRAPATH != 0
+                    if ( !is_this_a_filesystem_path( path ) )
+                    {
+                        rc = resolve_accession( dir, &path );
+                    }
+#endif
+
+                    if ( rc == 0 )
+                    {
+                        rc = on_argument( path, spot_group, data );
+                    }
+
+                    free( path );
+                    if ( spot_group != NULL )
+                        free( spot_group );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+/* =========================================================================================== */
+
+
+static rc_t prepare_whole_file( prepare_ctx * ctx )
+{
+    rc_t rc = 0;
+    if ( ctx->reflist != NULL )
+    {
+        uint32_t count;
+        rc = ReferenceList_Count( ctx->reflist, &count );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "ReferenceList_Count() failed" );
+        }
+        else
+        {
+            uint32_t idx;
+            for ( idx = 0; idx < count && rc == 0; ++idx )
+            {
+                rc = ReferenceList_Get( ctx->reflist, &ctx->refobj, idx );
+                if ( rc != 0 )
+                {
+                    LOGERR( klogInt, rc, "ReferenceList_Get() failed" );
+                }
+                else
+                {
+                    rc = ctx->on_section( ctx, NULL );
+                    if ( rc == 0 )
+                        ReferenceObj_Release( ctx->refobj );
+                }
+            }
+        }
+    }
+    else
+    {
+        ctx->refobj = NULL;
+        rc = ctx->on_section( ctx, NULL );
+    }
+    return rc;
+}
+
+
+static rc_t CC prepare_region_cb( const char * name, const struct reference_range * range, void * data )
+{
+    prepare_ctx * ctx = ( prepare_ctx * )data;
+    rc_t rc = ReferenceList_Find( ctx->reflist, &ctx->refobj, name, string_size( name ) );
+    if ( rc != 0 )
+    {
+        rc = 0;
+    }
+    else
+    {
+        rc = ctx->on_section( ctx, range );
+        if ( rc == 0 )
+            ReferenceObj_Release( ctx->refobj );
+    }
+    return rc;
+}
+
+
+static rc_t prepare_db_table( prepare_ctx *ctx,
+                              const VDBManager *vdb_mgr,
+                              VSchema *vdb_schema,
+                              const char * path )
+{
+    rc_t rc;
+    ctx->db = NULL;
+    ctx->seq_tab = NULL;
+
+    rc = VDBManagerOpenDBRead ( vdb_mgr, &ctx->db, vdb_schema, "%s", path );
+    if ( rc != 0 )
+    {
+        rc = VDBManagerOpenTableRead ( vdb_mgr, &ctx->seq_tab, NULL, "%s", path );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc, "failed to open '$(path)'", "path=%s", path ) );
+        }
+        else {
+            ReportResetTable(path, ctx->seq_tab);
+        }
+    }
+    else
+    {
+        rc = VDatabaseOpenTableRead( ctx->db, &ctx->seq_tab, "SEQUENCE" );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VDatabaseOpenTableRead( SEQUENCE ) failed" );
+        }
+        else
+        {
+            ReportResetDatabase( path, ctx->db );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t prepare_reflist( prepare_ctx *ctx )
+{
+    rc_t rc = 0;
+    ctx->reflist = NULL;
+    if ( ctx->db != NULL )
+    {
+        uint32_t reflist_options = ereferencelist_4na;
+
+        if ( ctx->use_primary_alignments )
+            reflist_options |= ereferencelist_usePrimaryIds;
+
+        if ( ctx->use_secondary_alignments )
+            reflist_options |= ereferencelist_useSecondaryIds;
+
+        if ( ctx->use_evidence_alignments )
+            reflist_options |= ereferencelist_useEvidenceIds;
+
+        rc = ReferenceList_MakeDatabase( &ctx->reflist, ctx->db, reflist_options, 0, NULL, 0 );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "ReferenceList_MakeDatabase() failed" );
+        }
+    }
+    return rc;
+}
+
+
+rc_t prepare_ref_iter( prepare_ctx *ctx,
+                       const VDBManager *vdb_mgr,
+                       VSchema *vdb_schema,
+                       const char * path,
+                       BSTree * regions )
+{
+    rc_t rc = prepare_db_table( ctx, vdb_mgr, vdb_schema, path );
+    if ( rc == 0 )
+    {
+        rc = prepare_reflist( ctx );
+        if( rc == 0 )
+        {
+            if ( ctx->reflist == NULL || count_ref_regions( regions ) == 0 )
+            {
+                /* the user has not specified a reference-range : use the whole file... */
+                rc = prepare_whole_file( ctx );
+            }
+            else
+            {
+                /* pick only the requested ranges... */
+                rc = foreach_ref_region( regions, prepare_region_cb, ctx ); /* ref_regions.c */
+            }
+        }
+        if ( ctx->reflist != NULL )
+        {
+            ReferenceList_Release( ctx->reflist );
+        }
+    }
+    VTableRelease ( ctx->seq_tab );
+    VDatabaseRelease ( ctx->db );
+    return rc;
+}
+
+
+/* =========================================================================================== */
+
+
+rc_t parse_inf_file( Args * args )
+{
+    return Args_parse_inf_file( args, OPTION_INF );
+}
diff --git a/tools/sra-pileup/cmdline_cmn.h b/tools/sra-pileup/cmdline_cmn.h
new file mode 100644
index 0000000..364bfcc
--- /dev/null
+++ b/tools/sra-pileup/cmdline_cmn.h
@@ -0,0 +1,150 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_cmdline_cmn_
+#define _h_cmdline_cmn_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "ref_regions.h"
+
+#include <kapp/args.h>
+
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <klib/text.h>
+#include <klib/container.h>
+
+#include <kfs/directory.h>
+/* #include <sra/srapath.h> */
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+
+#include <align/iterator.h>
+#include <align/reference.h>
+
+#include <strtol.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+
+#define OPTION_REF     "aligned-region"
+#define ALIAS_REF      "r"
+
+typedef uint8_t align_tab_select;
+enum { primary_ats = 1, secondary_ats = 2, evidence_ats = 4 };
+
+typedef struct common_options
+{
+    bool gzip_output;
+    bool bzip_output;
+    bool no_mt;
+    align_tab_select tab_select;
+    const char * output_file;
+    const char * input_file;
+    const char * schema_file;
+    const char * timing_file;
+} common_options;
+
+
+void print_common_helplines( void );
+
+rc_t get_common_options( Args * args, common_options *opts );
+OptDef * CommonOptions_ptr( void );
+size_t CommonOptions_count( void );
+
+/* get ref-ranges from the command-line and iterate them... */
+rc_t init_ref_regions( BSTree * regions, Args * args );
+
+rc_t foreach_argument( Args * args, KDirectory *dir, bool div_by_spotgrp, bool * empty,
+    rc_t ( CC * on_argument ) ( const char * path, const char * spot_group, void * data ), void * data );
+
+
+typedef struct pileup_col_ids
+{
+    uint32_t idx_quality;
+    uint32_t idx_ref_orientation;
+    uint32_t idx_read_filter;
+    uint32_t idx_template_len;
+} pileup_col_ids;
+
+    
+typedef struct prepare_ctx
+{
+    ReferenceIterator *ref_iter;
+    PlacementSetIterator *plset_iter;
+    const VDatabase *db;
+    const VTable *seq_tab;
+
+    const VCursor *prim_cur;
+    const VCursor *sec_cur;
+    const VCursor *ev_cur;
+
+    pileup_col_ids *prim_cur_ids;
+    pileup_col_ids *sec_cur_ids;
+    pileup_col_ids *ev_cur_ids;
+
+    const ReferenceList *reflist;
+    const ReferenceObj *refobj;
+    const char * spot_group;
+    bool omit_qualities;
+    bool read_tlen;
+    bool use_primary_alignments;
+    bool use_secondary_alignments;
+    bool use_evidence_alignments;
+    void * data;
+    const char *path;
+    rc_t ( CC * on_section ) ( struct prepare_ctx * ctx, const struct reference_range * range );
+} prepare_ctx;
+
+
+
+rc_t prepare_ref_iter( prepare_ctx *ctx,
+                       const VDBManager *vdb_mgr,
+                       VSchema *vdb_schema,
+                       const char * path,
+                       BSTree * regions );
+
+rc_t prepare_plset_iter( prepare_ctx *ctx,
+                         const VDBManager *vdb_mgr,
+                         VSchema *vdb_schema,
+                         const char * path,
+                         BSTree * ranges );
+
+
+rc_t parse_inf_file( Args * args );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_cmdline_cmn_ */
diff --git a/tools/sra-pileup/debug.h b/tools/sra-pileup/debug.h
new file mode 100644
index 0000000..d1a321b
--- /dev/null
+++ b/tools/sra-pileup/debug.h
@@ -0,0 +1,34 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _tools_sam_dump_debug_h_
+#define _tools_sam_dump_debug_h_
+
+#include <klib/debug.h>
+
+#define SAM_DUMP_DBG_PASTE(a,b) a##b
+#define SAM_DUMP_DBG(flag,msg) DBGMSG(DBG_APP,DBG_FLAG(SAM_DUMP_DBG_PASTE(DBG_APP_,flag)), msg)
+
+#endif /* _tools_sam_dump_debug_h_ */
diff --git a/tools/sra-pileup/dyn_string.c b/tools/sra-pileup/dyn_string.c
new file mode 100644
index 0000000..c8f5348
--- /dev/null
+++ b/tools/sra-pileup/dyn_string.c
@@ -0,0 +1,206 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "dyn_string.h"
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <klib/out.h>
+
+typedef struct dyn_string
+{
+    char * data;
+    size_t allocated;
+    size_t data_len;
+} dyn_string;
+
+
+rc_t allocated_dyn_string ( struct dyn_string **self, size_t size )
+{
+    rc_t rc = 0;
+    struct dyn_string * res = malloc( sizeof *res );
+    *self = NULL;
+    if ( res == NULL )
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+    else
+    {
+        res->data_len = 0;
+        res->data = malloc( size );
+        if ( res->data != NULL )
+            res->allocated = size;
+        else
+        {
+            res->allocated = 0;
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        }
+        if ( rc != 0 )
+            free( res );
+        else
+            *self = res;
+    }
+    return rc;
+}
+
+
+void free_dyn_string ( struct dyn_string *self )
+{
+    free( self->data );
+    self->data = NULL;
+    self->allocated = 0;
+    self->data_len = 0;
+    free( ( void * ) self );
+}
+
+
+void reset_dyn_string( struct dyn_string *self )
+{
+    self->data_len = 0;
+}
+
+
+rc_t expand_dyn_string( struct dyn_string *self, size_t new_size )
+{
+    rc_t rc = 0;
+    if ( new_size > self->allocated )
+    {
+        self->data = realloc ( self->data, new_size );
+        if ( self->data != NULL )
+        {
+            self->allocated = new_size;
+        }
+        else
+        {
+            self->allocated = 0;
+            self->data_len = 0;
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        }
+    }
+    return rc;
+}
+
+
+rc_t add_char_2_dyn_string( struct dyn_string *self, const char c )
+{
+    /* does nothing if self->data_len + 2 < self->allocated */
+    rc_t rc = expand_dyn_string( self, self->data_len + 2 );
+    if ( rc == 0 )
+    {
+        self->data[ self->data_len++ ] = c;
+        self->data[ self->data_len ] = 0;
+    }
+    return rc;
+}
+
+
+char * dyn_string_char( struct dyn_string *self, uint32_t idx )
+{
+    return( &self->data[ idx ] );
+}
+
+
+rc_t add_string_2_dyn_string( struct dyn_string *self, const char * s )
+{
+    rc_t rc;
+    size_t size = string_size ( s );
+    /* does nothing if self->data_len + size + 1 < self->allocated */
+    rc = expand_dyn_string( self, self->data_len + size + 1 );
+    if ( rc == 0 )
+    {
+        string_copy ( &(self->data[ self->data_len ]), self->allocated, s, size );
+        self->data_len += size;
+        self->data[ self->data_len ] = 0;
+    }
+    return rc;
+}
+
+
+rc_t add_dyn_string_2_dyn_string( struct dyn_string *self, struct dyn_string *other )
+{
+    rc_t rc = 0;
+    size_t size = other->data_len;
+	if ( size > 0 )
+	{
+		/* does nothing if self->data_len + size + 1 < self->allocated */
+		rc = expand_dyn_string( self, self->data_len + size + 1 );
+		if ( rc == 0 )
+		{
+			string_copy ( &(self->data[ self->data_len ]), self->allocated, other->data, size );
+			self->data_len += size;
+			self->data[ self->data_len ] = 0;
+		}
+	}
+    return rc;
+
+}
+
+
+rc_t print_2_dyn_string( struct dyn_string * self, const char *fmt, ... )
+{
+    rc_t rc = 0;
+    bool not_enough;
+
+    do
+    {
+        size_t num_writ;
+        va_list args;
+        va_start ( args, fmt );
+        rc = string_vprintf ( &(self->data[ self->data_len ]), 
+                              self->allocated - ( self->data_len + 1 ),
+                              &num_writ,
+                              fmt,
+                              args );
+        va_end ( args );
+
+        if ( rc == 0 )
+        {
+            self->data_len += num_writ;
+            self->data[ self->data_len ] = 0;
+        }
+        not_enough = ( GetRCState( rc ) == rcInsufficient );
+        if ( not_enough )
+        {
+            rc = expand_dyn_string( self, self->allocated + ( num_writ * 2 ) );
+        }
+    } while ( not_enough && rc == 0 );
+    return rc;
+}
+
+
+rc_t print_dyn_string( struct dyn_string * self )
+{
+    if ( self != NULL )
+        return KOutMsg( "%.*s", self->data_len, self->data );
+    else
+        return 0;
+}
+
+
+size_t dyn_string_len( struct dyn_string * self )
+{
+    if ( self != NULL )
+        return self->data_len;
+    else
+        return 0;
+}
diff --git a/tools/sra-pileup/dyn_string.h b/tools/sra-pileup/dyn_string.h
new file mode 100644
index 0000000..f3806d6
--- /dev/null
+++ b/tools/sra-pileup/dyn_string.h
@@ -0,0 +1,55 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_dyn_string_
+#define _h_dyn_string_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <klib/rc.h>
+
+struct dyn_string;
+
+rc_t allocated_dyn_string ( struct dyn_string **self, size_t size );
+void free_dyn_string ( struct dyn_string *self );
+
+void reset_dyn_string( struct dyn_string *self );
+rc_t expand_dyn_string( struct dyn_string *self, size_t new_size );
+rc_t add_char_2_dyn_string( struct dyn_string *self, const char c );
+char * dyn_string_char( struct dyn_string *self, uint32_t idx );
+rc_t add_string_2_dyn_string( struct dyn_string *self, const char * s );
+rc_t add_dyn_string_2_dyn_string( struct dyn_string *self, struct dyn_string *other );
+rc_t print_2_dyn_string( struct dyn_string * self, const char *fmt, ... );
+rc_t print_dyn_string( struct dyn_string * self );
+size_t dyn_string_len( struct dyn_string * self );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* dyn_string_ */
diff --git a/tools/sra-pileup/inputfiles.c b/tools/sra-pileup/inputfiles.c
new file mode 100644
index 0000000..a232677
--- /dev/null
+++ b/tools/sra-pileup/inputfiles.c
@@ -0,0 +1,377 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include "inputfiles.h"
+
+#include <sra/sraschema.h> /* VDBManagerMakeSRASchema */
+#include <vdb/schema.h> /* VSchemaRelease */
+
+#include <kdb/manager.h>
+#include <kfs/file.h>
+#include <vfs/manager.h>
+#include <vfs/path.h>
+
+#include <sysalloc.h>
+#include <stdlib.h>
+
+
+static void free_input_database( input_database * id )
+{
+    if ( id->path != NULL ) free( id->path );
+    if ( id->db != NULL ) VDatabaseRelease( id->db );
+    if ( id->reflist != NULL ) ReferenceList_Release( id->reflist );
+    if ( id->prim_ctx != NULL ) free( id->prim_ctx );
+    if ( id->sec_ctx != NULL ) free( id->sec_ctx );
+    if ( id->ev_ctx != NULL ) free( id->ev_ctx );
+    free( id );
+}
+
+
+static void free_input_table( input_table * it )
+{
+    if ( it->path != NULL ) free( it->path );
+    if ( it->tab != NULL ) VTableRelease( it->tab );
+    free( it );
+}
+
+
+static rc_t append_database( input_files *self, const VDatabase * db,
+                             const char * path, uint32_t reflist_options, bool show_err )
+{
+    const ReferenceList *reflist;
+    rc_t rc = ReferenceList_MakeDatabase( &reflist, db, reflist_options, 0, NULL, 0 );
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogErr, ( klogErr, rc, "cannot create reflist for '$(t)'", "t=%s", path ) );
+    }
+    else
+    {
+        input_database * id = calloc( sizeof * id, 1 );
+        if ( id == NULL )
+        {
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            (void)LOGERR( klogErr, rc, "cannot create input-database structure" );
+        }
+        else
+        {
+            uint32_t idx;
+
+            id->db = db;
+            id->reflist = reflist;
+            id->path = string_dup( path, string_size( path ) );
+
+            rc = VectorAppend( &self->dbs, &idx, id );
+            if ( rc != 0 )
+            {
+                (void)PLOGERR( klogErr, ( klogErr, rc, "cannot append db '$(t)' to inputfiles", "t=%s", path ) );
+                free_input_database( id );
+            }
+            else
+            {
+                ++(self->database_count);
+                id->db_idx = idx;
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t append_table( input_files *self, const VTable *tab, const char * path )
+{
+    rc_t rc = 0;
+    input_table * it = calloc( sizeof * it, 1 );
+    if ( it == NULL )
+    {
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        (void)LOGERR( klogErr, rc, "cannot create input-table structure" );
+    }
+    else
+    {
+        it->path = string_dup( path, string_size( path ) );
+        it->tab = tab;
+
+        rc = VectorAppend( &self->tabs, NULL, it );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogErr, ( klogErr, rc, "cannot append tab '$(t)' to inputfiles", "t=%s", path ) );
+            free_input_table( it );
+        }
+        else
+        {
+            ++(self->table_count);
+        }
+    }
+    return rc;
+}
+
+
+static int cmp_pchar( const char * a, const char * b )
+{
+    int res = 0;
+    if ( ( a != NULL )&&( b != NULL ) )
+    {
+        size_t len_a = string_size( a );
+        size_t len_b = string_size( b );
+        res = string_cmp ( a, len_a, b, len_b, ( len_a < len_b ) ? len_b : len_a );
+    }
+    return res;
+}
+
+
+static rc_t contains_ref_and_alignments( const VDatabase * db, const char * path, bool * res, bool show_err )
+{
+    KNamelist *tables;
+    rc_t rc = VDatabaseListTbl ( db, &tables );
+    if ( rc != 0 )
+    {
+        if ( show_err )
+        {
+            (void)PLOGERR( klogErr, ( klogErr, rc, "VDatabaseListTbl() failed on '$(t)'", "t=%s", path ) );
+        }
+    }
+    else
+    {
+        uint32_t count;
+        rc = KNamelistCount ( tables, &count );
+        if ( rc != 0 )
+        {
+            if ( show_err )
+            {
+                (void)PLOGERR( klogErr, ( klogErr, rc, "KNamelistCount on Table-Names-List failed on '$(t)'", "t=%s", path ) );
+            }
+        }
+        else
+        {
+            uint32_t idx;
+            bool has_ref = false;
+            bool has_alignment = false;
+            for ( idx = 0; rc == 0 && idx < count; ++idx )
+            {
+                const char * tabname;
+                rc = KNamelistGet ( tables, idx, &tabname );
+                if ( rc != 0 )
+                {
+                    if ( show_err )
+                    {
+                        (void)PLOGERR( klogErr, ( klogErr, rc, "KNamelistGet on Table-Names-List failed on '$(t)'", "t=%s", path ) );
+                    }
+                }
+                else
+                {
+                    if ( cmp_pchar( tabname, "REFERENCE" ) == 0 )
+                        has_ref = true;
+                    if ( cmp_pchar( tabname, "PRIMARY_ALIGNMENT" ) == 0 )
+                        has_alignment = true;
+                }
+            }
+            *res = ( has_ref && has_alignment );
+        }
+        KNamelistRelease( tables );
+    }
+    return rc;
+}
+
+
+static rc_t open_database( input_files *self, const VDBManager *mgr,
+                           const char * path, uint32_t reflist_options, bool show_err )
+{
+    const VDatabase * db;
+    rc_t rc = VDBManagerOpenDBRead( mgr, &db, NULL, "%s", path );
+    if ( rc != 0 )
+    {
+        if ( show_err )
+        {
+            (void)PLOGERR( klogErr, ( klogErr, rc, "cannot open db '$(t)'", "t=%s", path ) );
+        }
+    }
+    else
+    {
+        bool has_alignments = false;
+        rc = contains_ref_and_alignments( db, path, &has_alignments, show_err );
+        if ( rc == 0 )
+        {
+            if ( has_alignments )
+            {
+                rc = append_database( self, db, path, reflist_options, show_err );
+            }
+            else
+            {
+                const VTable *tab;
+                rc = VDatabaseOpenTableRead ( db, &tab, "SEQUENCE" );
+                if ( rc != 0 )
+                {
+                    if ( show_err )
+                    {
+                        (void)PLOGERR( klogErr, ( klogErr, rc, "cannot open table SEQUENCE for '$(t)'", "t=%s", path ) );
+                    }
+                }
+                else
+                {
+                    rc = append_table( self, tab, path );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t open_table( input_files *self, const VDBManager *mgr, const char * path, bool show_error )
+{
+    const VTable * tab;    
+
+    rc_t rc = VDBManagerOpenTableRead( mgr, &tab, NULL, "%s", path );
+    if ( rc != 0 )
+    {
+        struct VSchema* schema = NULL;
+        rc = VDBManagerMakeSRASchema( mgr, &schema );
+        if ( rc != 0 )
+        {
+            (void)LOGERR( klogErr, rc, "cannot MakeSRASchema" );
+        }
+        else
+        {
+            rc = VDBManagerOpenTableRead( mgr, &tab, schema, "%s", path );
+            if ( rc != 0 )
+            {
+                if ( show_error )
+                {
+                    (void)PLOGERR( klogErr, ( klogErr, rc, "cannot open tab '$(t)'", "t=%s", path ) );
+                }
+            }
+            VSchemaRelease( schema );
+        }
+    }
+
+    if ( rc == 0 )
+        rc = append_table( self, tab, path );
+
+    return rc;
+}
+
+
+static rc_t is_unknown( input_files *self, const char * path )
+{
+    rc_t rc = VNamelistAppend( self->not_found, path );
+    if ( rc == 0 )
+        ++( self->not_found_count );
+    return rc;
+}
+
+
+static rc_t split_input_files( input_files *self, const VDBManager *mgr,
+                               const VNamelist * src, uint32_t reflist_options )
+{
+    uint32_t src_count;
+    rc_t rc = VNameListCount( src, &src_count );
+    if ( rc != 0 )
+    {
+        (void)LOGERR( klogErr, rc, "VNameListCount failed" );
+    }
+    else
+    {
+        uint32_t src_idx;
+        for ( src_idx = 0; src_idx < src_count && rc == 0 ; ++src_idx )
+        {
+            const char * path;
+            rc = VNameListGet( src, src_idx, &path );
+            if ( rc == 0 && path != NULL )
+            {
+                int path_type = VDBManagerPathType ( mgr, "%s", path );
+                if ( rc == 0 )
+                {
+                    switch( path_type )
+                    {
+                        case kptDatabase : rc = open_database( self, mgr, path, reflist_options, true ); break;
+
+                        case kptPrereleaseTbl :
+                        case kptTable    : rc = open_table( self, mgr, path, true ); break;
+
+                        default          : rc = is_unknown( self, path ); break;
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+rc_t discover_input_files( input_files **self, const VDBManager *mgr,
+                           const VNamelist * src, uint32_t reflist_options )
+{
+    rc_t rc = 0;
+
+    input_files * ipf = calloc( sizeof * ipf, 1 );
+    *self = NULL;
+    if ( ipf == NULL )
+    {
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        (void)LOGERR( klogErr, rc, "cannot create inputfiles structure" );
+    }
+    else
+    {
+        rc = VNamelistMake( &( ipf->not_found ), 5 );
+        if ( rc != 0 )
+            (void)LOGERR( klogErr, rc, "cannot create inputfiles.not_found structure" );
+        else
+        {
+            VectorInit( &( ipf->dbs ), 0, 5 );
+            VectorInit( &( ipf->tabs ), 0, 5 );
+            rc = split_input_files( ipf, mgr, src, reflist_options );
+        }
+        if ( rc != 0 )
+            release_input_files( ipf );
+        else
+            *self = ipf;
+    }
+    return rc;
+}
+
+
+static void CC db_whack( void * item, void * data )
+{
+    input_database * id = ( input_database * )item;
+    free_input_database( id );
+}
+
+
+static void CC tab_whack( void * item, void * data )
+{
+    input_table * it = ( input_table * )item;
+    free( it->path );
+    VTableRelease( it->tab );
+    free( it );
+}
+
+
+void release_input_files( input_files *self )
+{
+    VectorWhack( &self->dbs, db_whack, NULL );
+    VectorWhack( &self->tabs, tab_whack, NULL );
+    VNamelistRelease( self->not_found );
+    free( self );
+}
diff --git a/tools/sra-pileup/inputfiles.h b/tools/sra-pileup/inputfiles.h
new file mode 100644
index 0000000..4698785
--- /dev/null
+++ b/tools/sra-pileup/inputfiles.h
@@ -0,0 +1,99 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_inputfiles_
+#define _h_inputfiles_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include <klib/vector.h>
+#include <klib/out.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <klib/namelist.h>
+
+#include <vdb/manager.h>
+#include <vdb/vdb-priv.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+
+#include <align/reference.h>
+#include <align/manager.h>
+
+/*
+    the VNamelist of input-files/accessions/uri's is tested one at a time
+    if it is: a database, a table or cannot be found
+    in case of a database : a vdb-db-handle is opened
+    in case of a table    : a vdb-tab-handle is opened
+    in case of not found  : name is put into the not-found list
+*/
+
+
+typedef struct input_database
+{
+    uint32_t db_idx;
+    char * path;
+    const VDatabase * db;
+    const ReferenceList *reflist;
+    void * prim_ctx;
+    void * sec_ctx;
+    void * ev_ctx;
+} input_database;
+
+
+typedef struct input_table
+{
+    char * path;
+    const VTable * tab;
+} input_table;
+
+
+
+typedef struct input_files
+{
+    uint32_t database_count;
+    uint32_t table_count;
+    uint32_t not_found_count;
+
+    Vector dbs;
+    Vector tabs;
+    VNamelist * not_found;
+} input_files;
+
+
+
+rc_t discover_input_files( input_files **self, const VDBManager *mgr,
+                           const VNamelist * src, uint32_t reflist_options );
+
+void release_input_files( input_files *self );
+
+#endif
diff --git a/tools/sra-pileup/make_opt.pl b/tools/sra-pileup/make_opt.pl
new file mode 100755
index 0000000..cc2a7c9
--- /dev/null
+++ b/tools/sra-pileup/make_opt.pl
@@ -0,0 +1,13 @@
+#!/usr/bin/perl -w
+
+my $ref    =  $ARGV[ 0 ];
+my $start  =  $ARGV[ 1 ];
+my $length =  $ARGV[ 2 ];
+my $space  =  $ARGV[ 3 ];
+my $count  =  $ARGV[ 4 ];
+
+for ( my $i = 0; $i < $count; $i++ )
+{
+    printf "-r %s:%d-%d\n", $ref, $start, $start + $length;
+    $start += $space;
+}
diff --git a/tools/sra-pileup/matecache.c b/tools/sra-pileup/matecache.c
new file mode 100644
index 0000000..bbe2e9c
--- /dev/null
+++ b/tools/sra-pileup/matecache.c
@@ -0,0 +1,439 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "matecache.h"
+#include <sysalloc.h>
+#include <stdlib.h>
+
+void release_matecache( matecache * const self )
+{
+    if ( self != NULL )
+    {
+        if ( self->per_file != NULL )
+        {
+            uint32_t idx;
+            for ( idx = 0; idx < self->count; ++idx )
+            {
+                if ( self->per_file[ idx ].same_ref_64 != NULL )
+                    KVectorRelease( self->per_file[ idx ].same_ref_64 );
+                if ( self->per_file[ idx ].same_ref_16 != NULL )
+                    KVectorRelease( self->per_file[ idx ].same_ref_16 );
+
+                if ( self->per_file[ idx ].unaligned_64_a != NULL )
+                    KVectorRelease( self->per_file[ idx ].unaligned_64_a );
+                if ( self->per_file[ idx ].unaligned_64_b != NULL )
+                    KVectorRelease( self->per_file[ idx ].unaligned_64_b );
+            }
+            free( self->per_file );
+        }
+        free( self );
+    }
+}
+
+
+rc_t make_matecache( matecache **self, uint32_t count )
+{
+    rc_t rc = 0;
+
+    matecache * mc = calloc( sizeof * mc, 1 );
+    *self = NULL;
+    if ( mc == NULL )
+    {
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        (void)LOGERR( klogErr, rc, "cannot create matecache structure" );
+    }
+    else
+    {
+        mc->count = count;
+        mc->per_file = calloc( sizeof *(mc->per_file), count );
+        if ( mc->per_file == NULL )
+        {
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            (void)LOGERR( klogErr, rc, "cannot create matecache internal structure" );
+        }
+        else
+        {
+            uint32_t idx;
+            for ( idx = 0; idx < count && rc == 0; ++idx )
+            {
+                rc = KVectorMake( &( mc->per_file[ idx ].same_ref_64 ) );
+                if ( rc != 0 )
+                    (void)LOGERR( klogErr, rc, "cannot create KVector (same-ref) U64" );
+                else
+                {
+                    rc = KVectorMake( &( mc->per_file[ idx ].same_ref_16 ) );
+                    if ( rc != 0 )
+                        (void)LOGERR( klogErr, rc, "cannot create KVector (same-ref) U16" );
+                    else
+                    {
+                        rc = KVectorMake( &( mc->per_file[ idx ].unaligned_64_a ) );
+                        if ( rc != 0 )
+                            (void)LOGERR( klogErr, rc, "cannot create KVector (unaligned a) U64" );
+                        else
+                        {
+                            rc = KVectorMake( &( mc->per_file[ idx ].unaligned_64_b ) );
+                            if ( rc != 0 )
+                                (void)LOGERR( klogErr, rc, "cannot create KVector (unaligned b) U64" );
+                        }
+                    }
+                }
+            }
+            if ( rc == 0 )
+                *self = mc;
+        }
+        if ( rc != 0 )
+            release_matecache( mc );
+    }
+    return rc;
+}
+
+#if 0
+static int32_t calc_tlen( uint32_t self_pos, uint32_t mate_pos,
+                   uint32_t self_len, uint32_t mate_len, uint32_t read_num )
+{
+    int32_t res = 0;
+    unsigned const self_left  = self_pos;
+    unsigned const mate_left  = mate_pos;
+    unsigned const self_right = self_left + self_len;
+    unsigned const mate_right = mate_left + mate_len;
+    unsigned const  leftmost  = (self_left  < mate_left ) ? self_left  : mate_left;
+    unsigned const rightmost  = (self_right > mate_right) ? self_right : mate_right;
+    unsigned const tlen = rightmost - leftmost;
+            
+    /* The standard says, "The leftmost segment has a plus sign and the rightmost has a minus sign." */
+    if (   ( self_left <= mate_left && self_right >= mate_right )      /* mate fully contained within self or */
+        || ( mate_left <= self_left && mate_right >= self_right ) )    /* self fully contained within mate; */
+    {
+        if ( self_left < mate_left || ( read_num == 1 && self_left == mate_left ) )
+            res = tlen;
+        else
+            res = -tlen;
+    }
+    else if ( ( self_right == mate_right && mate_left == leftmost ) /* both are rightmost, but mate is leftmost */
+             ||  self_right == rightmost )
+    {
+        res = -tlen;
+    }
+    else
+        res = tlen;
+
+    return res;
+}
+#endif
+
+static rc_t matecache_check( const matecache * const self, uint32_t db_idx, matecache_per_file ** mcpf )
+{
+    rc_t rc = 0;
+    if ( self == NULL )
+    {
+        rc = RC( rcApp, rcNoTarg, rcAccessing, rcSelf, rcNull );
+        (void)LOGERR( klogErr, rc, "cannot insert into same-ref-cache" );
+    }
+    else if ( db_idx < self->count )
+    {
+        *mcpf = &self->per_file[ db_idx ];
+        if ( mcpf == NULL )
+        {
+            rc = RC( rcApp, rcNoTarg, rcAccessing, rcParam, rcInvalid );
+            (void)LOGERR( klogErr, rc, "cannot insert into same-ref-cache" );
+        }
+    }
+    return rc;
+}
+
+
+rc_t matecache_insert_same_ref( matecache * const self,
+        uint32_t db_idx, int64_t key, INSDC_coord_zero ref_pos, uint32_t flags, INSDC_coord_len tlen )
+{
+    matecache_per_file * mcpf = NULL;
+    rc_t rc = matecache_check( self, db_idx, &mcpf );
+    if ( rc == 0 )
+    {
+        uint64_t ref_pos_and_tlen = ref_pos;
+        ref_pos_and_tlen <<= 32;
+        ref_pos_and_tlen |= tlen;
+        rc = KVectorSetU64( mcpf->same_ref_64, key, ref_pos_and_tlen );
+        if ( rc != 0 )
+            (void)LOGERR( klogErr, rc, "cannot insert into KVector (same-ref) U64" );
+        else
+        {
+            rc = KVectorSetU16( mcpf->same_ref_16, key, flags );
+            if ( rc != 0 )
+                (void)LOGERR( klogErr, rc, "cannot insert into KVector (same-ref) U16" );
+        }
+        if ( rc == 0 )
+        {
+            mcpf->stat_same_ref.count++;
+            if ( mcpf->stat_same_ref.count > mcpf->maxcount_same_ref )
+                mcpf->maxcount_same_ref = mcpf->stat_same_ref.count;
+            mcpf->stat_same_ref.inserts++;
+        }
+    }
+    return rc;
+}
+
+
+rc_t matecache_lookup_same_ref( const matecache * const self, uint32_t db_idx, int64_t key,
+                       INSDC_coord_zero *ref_pos, uint32_t *flags, INSDC_coord_len *tlen )
+{
+    matecache_per_file * mcpf = NULL;
+    rc_t rc = matecache_check( self, db_idx, &mcpf );
+    if ( rc == 0 )
+    {
+        uint64_t value64;
+        mcpf->stat_same_ref.lookups++;
+        rc = KVectorGetU64( mcpf->same_ref_64, key, &value64 );
+        if ( rc != 0 )
+        {
+            if ( GetRCState( rc ) != rcNotFound )
+                (void)LOGERR( klogErr, rc, "cannot retrieve value (same-ref) U64" );
+        }
+        else
+        {
+            uint16_t value16;
+            rc = KVectorGetU16( mcpf->same_ref_16, key, &value16 );
+            if ( rc != 0 )
+            {
+                if ( GetRCState( rc ) != rcNotFound )
+                    (void)LOGERR( klogErr, rc, "cannot retrieve value (same-ref) U16" );
+            }
+            else
+            {
+                *ref_pos = ( value64 >> 32 );
+                *tlen = ( value64 & 0xFFFFFFFF );
+                *flags = value16;
+                mcpf->stat_same_ref.finds++;
+            }
+        }
+    }
+    return rc;
+}
+
+
+rc_t matecache_remove_same_ref( matecache * const self, uint32_t db_idx, int64_t key )
+{
+    matecache_per_file * mcpf = NULL;
+    rc_t rc = matecache_check( self, db_idx, &mcpf );
+    if ( rc == 0 )
+    {
+        rc = KVectorUnset( mcpf->same_ref_64, key );
+        if ( rc != 0 )
+            (void)LOGERR( klogErr, rc, "cannot remove from same-ref-cache (64bit)" );
+        else
+        {
+            rc = KVectorUnset( mcpf->same_ref_16, key );
+            if ( rc != 0 )
+                (void)LOGERR( klogErr, rc, "cannot remove from same-ref-cache (16bit)" );
+        }
+        if ( rc == 0 && mcpf->stat_same_ref.count > 0 )
+            mcpf->stat_same_ref.count--;
+    }
+    return rc;
+}
+
+
+static rc_t matecache_clear_same_ref_per_file( matecache_per_file * const mcpf )
+{
+    rc_t rc = KVectorRelease( mcpf->same_ref_64 );
+    if ( rc != 0 )
+        (void)LOGERR( klogErr, rc, "cannot release same-ref-cache (64bit)" );
+    else
+    {
+        rc = KVectorRelease( mcpf->same_ref_16 );
+        if ( rc != 0 )
+            (void)LOGERR( klogErr, rc, "cannot release same-ref-cache (16bit)" );
+        else
+        {
+            rc = KVectorMake( &mcpf->same_ref_64 );
+            if ( rc != 0 )
+                (void)LOGERR( klogErr, rc, "cannot make same-ref-cache (64bit)" );
+            else
+            {
+                rc = KVectorMake( &mcpf->same_ref_16 );
+                if ( rc != 0 )
+                    (void)LOGERR( klogErr, rc, "cannot make same-ref-cache (16bit)" );
+            }
+        }
+    }
+    return rc;
+}
+
+
+rc_t matecache_clear_same_ref( matecache * const self )
+{
+    rc_t rc = 0;
+    if ( self == NULL )
+    {
+        rc = RC( rcApp, rcNoTarg, rcAccessing, rcSelf, rcNull );
+        (void)LOGERR( klogErr, rc, "cannot clear same-ref-cache" );
+    }
+    else
+    {
+        uint32_t idx;
+        for ( idx = 0; idx < self->count && rc == 0; ++idx )
+        {
+            rc = matecache_clear_same_ref_per_file( &self->per_file[ idx ] );
+        }
+        self->flashes++;
+   }
+    return rc;
+}
+
+
+rc_t matecache_report( const matecache * const self )
+{
+    rc_t rc = 0;
+    if ( self == NULL )
+    {
+        rc = RC( rcApp, rcNoTarg, rcAccessing, rcSelf, rcNull );
+        (void)LOGERR( klogErr, rc, "cannot report same-ref-cache" );
+    }
+    else
+    {
+        uint32_t idx;
+        for ( idx = 0; idx < self->count && rc == 0; ++idx )
+        {
+            rc = KOutMsg( "on same reference:\n" );
+            if ( rc == 0 )
+                rc = KOutMsg( "matecache[ %u ].maxcount = %,lu\n", idx, self->per_file[ idx ].maxcount_same_ref );
+            if ( rc == 0 )
+                rc = KOutMsg( "matecache[ %u ].inserts = %,lu\n", idx, self->per_file[ idx ].stat_same_ref.inserts );
+            if ( rc == 0 )
+                rc = KOutMsg( "matecache[ %u ].lookups = %,lu\n", idx, self->per_file[ idx ].stat_same_ref.lookups );
+            if ( rc == 0 )
+                rc = KOutMsg( "matecache[ %u ].finds = %,lu\n", idx, self->per_file[ idx ].stat_same_ref.finds );
+            if ( rc == 0 )
+                rc = KOutMsg( "unaligned:\n" );
+            if ( rc == 0 )
+                rc = KOutMsg( "matecache[ %u ].count = %,lu\n", idx, self->per_file[ idx ].stat_unaligned.count );
+            if ( rc == 0 )
+                rc = KOutMsg( "matecache[ %u ].lookups = %,lu\n", idx, self->per_file[ idx ].stat_unaligned.lookups );
+            if ( rc == 0 )
+                rc = KOutMsg( "matecache[ %u ].finds = %,lu\n", idx, self->per_file[ idx ].stat_unaligned.finds );
+        }
+        if ( rc == 0 )
+            rc = KOutMsg( "matecache.flashes = %,lu\n", idx, self->flashes );
+    }
+    return rc;
+}
+
+
+rc_t matecache_insert_unaligned( matecache * const self,
+        uint32_t db_idx, int64_t key, INSDC_coord_zero ref_pos, uint32_t ref_idx, int64_t seq_id )
+{
+    matecache_per_file * mcpf = NULL;
+    rc_t rc = matecache_check( self, db_idx, &mcpf );
+    if ( rc == 0 )
+    {
+        uint64_t ref_pos_and_ref_idx = ref_pos;
+        ref_pos_and_ref_idx <<= 32;
+        ref_pos_and_ref_idx |= ref_idx;
+        rc = KVectorSetU64( mcpf->unaligned_64_a, key, ref_pos_and_ref_idx );
+        if ( rc != 0 )
+            (void)LOGERR( klogErr, rc, "cannot insert into KVector (unaligned a) U64" );
+        else
+        {
+            rc = KVectorSetU64( mcpf->unaligned_64_b, key, seq_id );
+            if ( rc != 0 )
+                (void)LOGERR( klogErr, rc, "cannot insert into KVector (unaligned b) U64" );
+        }
+        if ( rc == 0 )
+        {
+            mcpf->stat_unaligned.count++;
+            mcpf->stat_unaligned.inserts++;
+        }
+    }
+    return rc;
+}
+
+
+rc_t matecache_lookup_unaligned( const matecache * const self, uint32_t db_idx, int64_t key,
+                                 INSDC_coord_zero * const ref_pos, uint32_t * const ref_idx, int64_t * const seq_id )
+{
+    matecache_per_file * mcpf = NULL;
+    rc_t rc = matecache_check( self, db_idx, &mcpf );
+    if ( rc == 0 )
+    {
+        uint64_t value64_a;
+        mcpf->stat_unaligned.lookups++;
+        rc = KVectorGetU64( mcpf->unaligned_64_a, key, &value64_a );
+        if ( rc != 0 )
+        {
+            if ( GetRCState( rc ) != rcNotFound )
+                (void)LOGERR( klogErr, rc, "cannot retrieve value (unaligned a) U64" );
+        }
+        else
+        {
+            uint64_t value64_b;
+            rc = KVectorGetU64( mcpf->unaligned_64_b, key, &value64_b );
+            if ( rc != 0 )
+            {
+                if ( GetRCState( rc ) != rcNotFound )
+                    (void)LOGERR( klogErr, rc, "cannot retrieve value (unaligned b) U64" );
+            }
+            else
+            {
+                *seq_id = ( int64_t )value64_b;
+                *ref_pos = ( value64_a >> 32 );
+                *ref_idx = ( value64_a & 0xFFFFFFFF );
+                mcpf->stat_unaligned.finds++;
+            }
+        }
+    }
+    return rc;
+}
+
+
+typedef struct visit_ctx
+{
+    rc_t ( CC * f ) ( int64_t seq_id, int64_t al_id, void * user_data );
+    void * user_data;
+} visit_ctx;
+
+
+static rc_t CC on_seq_id( uint64_t key, int64_t value, void *user_data )
+{
+    visit_ctx * vctx = user_data;
+    return vctx->f( value, ( int64_t )key, vctx->user_data );
+}
+
+
+rc_t foreach_unaligned_entry( const matecache * const self,
+                              uint32_t db_idx,
+                              rc_t ( CC * f ) ( int64_t seq_id, int64_t al_id, void * user_data ),
+                              void * user_data )
+{
+    matecache_per_file * mcpf = NULL;
+    rc_t rc = matecache_check( self, db_idx, &mcpf );
+    if ( rc == 0 )
+    {
+        visit_ctx vctx;
+        vctx.f = f;
+        vctx.user_data = user_data;
+        rc = KVectorVisitI64 ( mcpf->unaligned_64_b, false, on_seq_id, &vctx );
+    }
+    return rc;
+}
diff --git a/tools/sra-pileup/matecache.h b/tools/sra-pileup/matecache.h
new file mode 100644
index 0000000..0b8d9df
--- /dev/null
+++ b/tools/sra-pileup/matecache.h
@@ -0,0 +1,119 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_matecache_
+#define _h_matecache_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include <klib/vector.h>
+#include <klib/out.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include <insdc/sra.h>
+
+typedef struct matecache_stat
+{
+    uint64_t count;
+    uint64_t lookups;
+    uint64_t finds;
+    uint64_t inserts;
+} matecache_stat;
+
+
+typedef struct matecache_per_file
+{
+    KVector *same_ref_64;   /* ref-pos and ref-idx */
+    KVector *same_ref_16;   /* flags */
+
+    KVector *unaligned_64_a;  /* ref-pos and ref-idx */
+    KVector *unaligned_64_b;  /* seq_spot_id */
+
+    matecache_stat stat_same_ref;
+    matecache_stat stat_unaligned;
+    uint64_t maxcount_same_ref;
+} matecache_per_file;
+
+
+typedef struct matecache
+{
+    matecache_per_file *per_file;
+    uint32_t count;
+    uint32_t flashes;
+} matecache;
+
+
+/* general cache functions */
+
+rc_t make_matecache( matecache **self, uint32_t count );
+
+void release_matecache( matecache * const self );
+
+rc_t matecache_clear_same_ref( matecache * const self );
+
+rc_t matecache_report( const matecache * const self );
+
+
+/* cache functions for aligned mates on the same reference */
+
+rc_t matecache_insert_same_ref( matecache * const self,
+        uint32_t db_idx, int64_t key, INSDC_coord_zero ref_pos, uint32_t flags, INSDC_coord_len tlen );
+
+rc_t matecache_lookup_same_ref( const matecache * const self, uint32_t db_idx, int64_t key,
+                       INSDC_coord_zero *ref_pos, uint32_t *flags, INSDC_coord_len *tlen );
+
+rc_t matecache_remove_same_ref( matecache * const self, uint32_t db_idx, int64_t key );
+
+
+/* cache functions for half aligned mates */
+
+/*
+    db_idx  ... index, what input-file did the alignment come from
+    key     ... row-id of aligned half
+    pos     ... position of the aligned half
+    flags   ... sam-flags of the aligned half
+    ref_idx ... idx of reference the aligned half aligns to
+*/
+
+rc_t matecache_insert_unaligned( matecache * const self,
+        uint32_t db_idx, int64_t key, INSDC_coord_zero ref_pos, uint32_t ref_idx, int64_t seq_id );
+
+rc_t matecache_lookup_unaligned( const matecache * const self, uint32_t db_idx, int64_t key,
+                                 INSDC_coord_zero * const ref_pos, uint32_t * const ref_idx, int64_t * const seq_id );
+
+rc_t foreach_unaligned_entry( const matecache * const self,
+                              uint32_t db_idx,
+                              rc_t ( CC * f ) ( int64_t seq_id, int64_t al_id, void * user_data ),
+                              void * user_data );
+
+
+#endif
diff --git a/tools/sra-pileup/md_flag.c b/tools/sra-pileup/md_flag.c
new file mode 100644
index 0000000..491d475
--- /dev/null
+++ b/tools/sra-pileup/md_flag.c
@@ -0,0 +1,268 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/printf.h>
+#include <klib/out.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "md_flag.h"
+
+struct cigar_t
+{
+	char * op;
+	int * count;
+	size_t size, length;
+};
+
+
+static void init_cigar_t( struct cigar_t * c, size_t size )
+{
+	if ( c != NULL )
+	{
+		c->size = 0;
+		c->length = 0;
+		c->op = malloc( sizeof( c->op[ 0 ] ) * size );
+		if ( c->op != NULL )
+		{
+			c->count = malloc( sizeof( c->count[ 0 ] ) * size );
+			if ( c->count != NULL )
+				c->size = size;
+			else
+				free( ( void * ) c->op );
+		}
+	}
+}
+
+static void resize_cigar_t( struct cigar_t * c, size_t new_size )
+{
+	if ( c != NULL )
+	{
+		if ( c->size == 0 )
+			init_cigar_t( c, new_size );
+		else if ( c->size < new_size )
+		{
+			char * temp_op = c->op;
+			c->op = realloc( c->op, sizeof( c->op[ 0 ] ) * new_size );
+			if ( c->op != NULL )
+			{
+				int * temp_count = c->count;
+				c->count = realloc( c->count, sizeof( c->count[ 0 ] ) * new_size );
+				if ( c->count != NULL )
+					c->size = new_size;
+				else
+					c->count = temp_count;
+			}
+			else
+				c->op = temp_op;
+		}
+	}
+}
+
+static void append_to_cigar_t( struct cigar_t * c, char op, int count )
+{
+	if ( c->length < c->size )
+	{
+		c->op[ c->length ] = op;
+		c->count[ c->length ++ ] = count;
+	}
+}
+
+void parse_cigar_t( struct cigar_t * c, const char * cigar_str )
+{
+	if ( c != NULL && cigar_str != NULL && cigar_str[ 0 ] != 0 )
+	{
+		resize_cigar_t( c, strlen( cigar_str ) );
+		if ( c->size > 0 )
+		{
+			int count = 0;
+			while ( *cigar_str != 0 && c->length < c->size )
+			{
+				if ( isdigit( *cigar_str ) )
+				{
+					count = ( count * 10 ) + ( *cigar_str - '0' );
+				}
+				else
+				{
+					if ( count == 0 ) count = 1;
+					append_to_cigar_t( c, *cigar_str, count );
+					count = 0;
+				}
+				cigar_str++;
+			}
+		}
+	}
+}
+
+struct cigar_t * make_cigar_t( const char * cigar_str, const size_t cigar_len )
+{
+	struct cigar_t * res = malloc( sizeof * res );
+	if ( res != NULL )
+	{
+		size_t size;
+		if ( cigar_str != NULL && cigar_str[ 0 ] != 0 && cigar_len > 0 )
+			size = cigar_len;
+		else
+			size = 1024;
+		init_cigar_t( res, size );
+		if ( res->size == size )
+			parse_cigar_t( res, cigar_str );
+	}
+	return res;
+}
+
+
+void free_cigar_t( struct cigar_t * c )
+{
+	if ( c != NULL )
+	{
+		if ( c->op != NULL )
+		{
+			free( ( void * ) c->op );
+			c->op = NULL;
+		}
+		if ( c->count != NULL )
+		{
+			free( ( void * ) c->count );
+			c->count = NULL;
+		}
+		free( ( void * ) c );
+	}
+}
+
+
+static rc_t kout_delete( int count, int *match_count,
+						 const uint8_t * ref, const INSDC_coord_len ref_len, int *ref_idx )
+{
+	rc_t rc = 0;
+	
+	if ( *match_count > 0 )
+	{
+		rc = KOutMsg( "%d", *match_count );
+		*match_count = 0;
+	}
+	
+	if ( rc == 0 )
+	{
+		if ( ( *ref_idx + count ) < ref_len )
+		{
+			rc = KOutMsg( "^%.*s", count, &(ref[ *ref_idx ] ) );
+			(*ref_idx) += count;
+		}
+		else
+			rc = RC( rcExe, rcNoTarg, rcAllocating, rcItem, rcIncomplete );
+	}
+	return rc;
+}
+
+
+static rc_t kout_match( int count, int *match_count,
+						const char * read, size_t read_len, int *read_idx,
+						const uint8_t *ref, const INSDC_coord_len ref_len, int *ref_idx )
+{
+	rc_t rc = 0;
+	int i;
+	for ( i = 0; i < count && rc == 0; ++i )
+	{
+		if ( *read_idx < read_len && *ref_idx < ref_len )
+		{
+			if ( read[ (*read_idx)++ ] == ref[ *ref_idx ] )
+			{
+				(*match_count)++;
+			}
+			else
+			{
+				rc = KOutMsg( "%d%c", *match_count, ref[ *ref_idx ] );
+				*match_count = 0;
+			}
+			(*ref_idx)++;
+		}
+		else
+			rc = RC( rcExe, rcNoTarg, rcAllocating, rcItem, rcIncomplete );
+	}
+	return rc;
+}
+
+
+static rc_t kout_tag( const struct cigar_t * c,
+					  const char * read,
+					  const size_t read_len,
+					  const uint8_t * ref,
+					  const INSDC_coord_len ref_len )
+{
+	rc_t rc = 0;
+	if ( c != NULL && read != NULL && read_len > 0 && ref != NULL && ref_len > 0 )
+	{
+		rc = KOutMsg( "\tMD:Z:" );
+		if ( rc == 0 )
+		{
+			int read_idx = 0;
+			int ref_idx = 0;
+			int match_count = 0;
+			int cigar_idx;
+			for ( cigar_idx = 0; cigar_idx < c->length && rc == 0; ++cigar_idx )
+			{
+				int count = c->count[ cigar_idx ];
+				switch ( c->op[ cigar_idx ] )
+				{
+					case 'D' : rc = kout_delete( count, &match_count, ref, ref_len, &ref_idx ); break;
+					
+					case 'I' : read_idx += count; break;
+
+					case 'M' : rc = kout_match( count, &match_count, read, read_len, &read_idx, ref, ref_len, &ref_idx ); break;
+				}
+			}
+			if ( rc == 0 && match_count > 0 )
+				rc = KOutMsg( "%d", match_count );
+		}
+	}
+	else
+		rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcIncomplete );
+	return rc;
+}
+
+
+rc_t kout_md_tag_from_cigar_string( const char * cigar_str,
+									const size_t cigar_len,
+									const char * read,
+									const size_t read_len,
+									const uint8_t * ref,
+									const INSDC_coord_len ref_len )
+{
+	rc_t rc = 0;
+	struct cigar_t * cigar = make_cigar_t( cigar_str, cigar_len );
+	if ( cigar == NULL )
+		rc = RC( rcExe, rcNoTarg, rcAllocating, rcItem, rcIncomplete );
+	else
+	{
+		rc = kout_tag( cigar, read, read_len, ref, ref_len );
+		free_cigar_t( cigar );
+	}
+	return rc;
+}
diff --git a/tools/sra-pileup/md_flag.h b/tools/sra-pileup/md_flag.h
new file mode 100644
index 0000000..f430e94
--- /dev/null
+++ b/tools/sra-pileup/md_flag.h
@@ -0,0 +1,48 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_md_flag_
+#define _h_md_flag_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <klib/rc.h>
+#include <insdc/insdc.h>
+
+rc_t kout_md_tag_from_cigar_string( const char * cigar_str,
+									const size_t cigar_len,
+									const char * read,
+									const size_t read_len,
+									const uint8_t * ref,
+									const INSDC_coord_len ref_len );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/sra-pileup/out_redir.c b/tools/sra-pileup/out_redir.c
new file mode 100644
index 0000000..c089d78
--- /dev/null
+++ b/tools/sra-pileup/out_redir.c
@@ -0,0 +1,120 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "out_redir.h"
+
+#include <kfs/directory.h>
+#include <kfs/buffile.h>
+#include <kfs/bzip.h>
+#include <kfs/gzip.h>
+#include <sysalloc.h>
+
+static rc_t CC out_redir_callback( void * self, const char * buffer, size_t bufsize, size_t * num_writ )
+{
+    out_redir * redir = ( out_redir * )self;
+    rc_t rc = KFileWriteAll( redir->kfile, redir->pos, buffer, bufsize, num_writ );
+    if ( rc == 0 )
+        redir->pos += *num_writ;
+    return rc;
+}
+
+
+rc_t init_out_redir( out_redir * self, enum out_redir_mode mode, const char * filename, size_t bufsize )
+{
+    rc_t rc;
+    KFile *output_file;
+
+    if ( filename != NULL )
+    {
+        KDirectory *dir;
+        rc = KDirectoryNativeDir( &dir );
+        if ( rc != 0 )
+            LOGERR( klogInt, rc, "KDirectoryNativeDir() failed" );
+        else
+        {
+            rc = KDirectoryCreateFile ( dir, &output_file, false, 0664, kcmInit, "%s", filename );
+            KDirectoryRelease( dir );
+        }
+    }
+    else
+        rc = KFileMakeStdOut ( &output_file );
+
+    if ( rc == 0 )
+    {
+        KFile *temp_file;
+
+        /* wrap the output-file in compression, if requested */
+        switch ( mode )
+        {
+            case orm_gzip  : rc = KFileMakeGzipForWrite( &temp_file, output_file ); break;
+            case orm_bzip2 : rc = KFileMakeBzip2ForWrite( &temp_file, output_file ); break;
+            case orm_uncompressed : break;
+        }
+        if ( rc == 0 )
+        {
+            if ( mode != orm_uncompressed )
+            {
+                KFileRelease( output_file );
+                output_file = temp_file;
+            }
+
+            /* wrap the output/compressed-file in buffering, if requested */
+            if ( bufsize != 0 )
+            {
+                rc = KBufFileMakeWrite( &temp_file, output_file, false, bufsize );
+                if ( rc == 0 )
+                {
+                    KFileRelease( output_file );
+                    output_file = temp_file;
+                }
+            }
+
+            if ( rc == 0 )
+            {
+                self->kfile = output_file;
+                self->org_writer = KOutWriterGet();
+                self->org_data = KOutDataGet();
+                self->pos = 0;
+                rc = KOutHandlerSet( out_redir_callback, self );
+                if ( rc != 0 )
+                    LOGERR( klogInt, rc, "KOutHandlerSet() failed" );
+            }
+        }
+    }
+    return rc;
+}
+
+
+void release_out_redir( out_redir * self )
+{
+    KFileRelease( self->kfile );
+    if( self->org_writer != NULL )
+    {
+        KOutHandlerSet( self->org_writer, self->org_data );
+    }
+    self->org_writer = NULL;
+}
+
diff --git a/tools/sra-pileup/out_redir.h b/tools/sra-pileup/out_redir.h
new file mode 100644
index 0000000..6eacab5
--- /dev/null
+++ b/tools/sra-pileup/out_redir.h
@@ -0,0 +1,64 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_out_redir_
+#define _h_out_redir_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include <klib/out.h>
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include <kfs/file.h>
+
+enum out_redir_mode
+{
+    orm_uncompressed = 0,
+    orm_gzip,
+    orm_bzip2
+};
+
+
+/* GLOBAL VARIABLES */
+typedef struct out_redir
+{
+    KWrtWriter org_writer;
+    void* org_data;
+    KFile* kfile;
+    uint64_t pos;
+} out_redir;
+
+
+rc_t init_out_redir( out_redir * self, enum out_redir_mode mode, const char * filename, size_t bufsize );
+
+void release_out_redir( out_redir * self );
+
+#endif
diff --git a/tools/sra-pileup/perf_log.c b/tools/sra-pileup/perf_log.c
new file mode 100644
index 0000000..e21b475
--- /dev/null
+++ b/tools/sra-pileup/perf_log.c
@@ -0,0 +1,273 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/rc.h>
+#include <klib/time.h>
+#include <klib/printf.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+#include <stdarg.h>
+
+typedef struct perf_log perf_log;
+struct perf_log
+{
+    KFile * perf_log_file;
+    KTime time_stamp;
+    const char * tool_name;
+    const char * section_name;
+    const char * sub_section_name;
+
+    KTime_t tool_start;
+    KTime_t section_start;
+    KTime_t sub_section_start;
+    KTime_t chunk_start;
+
+    uint64_t file_pos;
+    uint64_t counter;
+    uint64_t limit;
+};
+
+
+const char * perf_log_unknown = "unknown";
+
+static const char * value_or_unknown( const char * value )
+{
+    const char * s;
+    if ( value == NULL ) s = perf_log_unknown; else s = value;
+    return s;
+}
+
+
+static void perf_log_write_args( struct perf_log * pl, const char *fmt, va_list vargs )
+{
+    if ( pl != NULL )
+    {
+        char buffer[ 1024 ];
+        size_t num_writ;
+        rc_t rc = string_vprintf ( buffer, sizeof buffer, &num_writ, fmt, vargs );
+        if ( rc == 0 )
+        {
+            size_t num_writ_2;
+            rc = KFileWriteAll ( pl->perf_log_file, pl->file_pos, buffer, num_writ, &num_writ_2 );
+            if ( rc == 0 )
+                pl->file_pos += num_writ_2;
+        }
+    }
+}
+
+
+static void perf_log_write( struct perf_log * pl, const char *fmt, ... )
+{
+    if ( pl != NULL )
+    {
+        va_list args;
+
+        va_start ( args, fmt );
+        perf_log_write_args ( pl, fmt, args );
+        va_end ( args );
+    }
+}
+
+
+static void write_tool_start( struct perf_log * pl )
+{
+    KTime t;
+    KTimeLocal ( &t, pl->tool_start );
+    perf_log_write( pl, "start >%s< at %T\n", value_or_unknown( pl->tool_name ), &t );
+}
+
+
+static void write_tool_end( struct perf_log * pl )
+{
+    KTime_t tool_end = KTimeStamp();
+    KTime t;
+    KTimeLocal ( &t, tool_end );
+    perf_log_write( pl, "end.. >%s< at %T ( %lu seconds )\n",
+                    value_or_unknown( pl->tool_name ), &t, ( tool_end - pl->tool_start ) );
+}
+
+struct perf_log * make_perf_log( const char * filename, const char * toolname )
+{
+    struct perf_log * res = NULL;
+    KDirectory * dir;
+    rc_t rc = KDirectoryNativeDir ( &dir );
+    if ( rc == 0 )
+    {
+        KFile * f;
+        rc = KDirectoryCreateFile ( dir, &f, false, 0664, kcmInit, "%s", filename );
+        if ( rc == 0 )
+        {
+            res = malloc( sizeof * res );
+            if ( res != NULL )
+            {
+                res->perf_log_file = f;
+                KTimeLocal ( &res->time_stamp, KTimeStamp() );
+                if ( toolname != NULL )
+                    res->tool_name = string_dup_measure ( toolname, NULL );
+                else
+                    res->tool_name = NULL;
+                res->section_name = NULL;
+                res->sub_section_name = NULL;
+                res->tool_start = KTimeStamp();
+                res->section_start = res->tool_start;
+                res->sub_section_start = res->tool_start;
+                res->chunk_start = res->tool_start;
+
+                res->file_pos = 0;
+                res->counter = 0;
+                res->limit = 10000;
+                write_tool_start( res );
+            }
+            else
+                KFileRelease ( f );
+        }
+        KDirectoryRelease ( dir );
+    }
+    return res;
+}
+
+
+void free_perf_log( struct perf_log * pl )
+{
+    if ( pl != NULL )
+    {
+        write_tool_end( pl );
+        KFileRelease ( pl->perf_log_file );
+        if ( pl->tool_name != NULL ) free( ( void * )pl->tool_name );
+        free( ( void * ) pl );
+    }
+}
+
+
+void perf_log_start_section( struct perf_log * pl, const char * section_name )
+{
+    if ( pl != NULL )
+    {
+        KTime t;
+        pl->section_start = KTimeStamp();
+        KTimeLocal ( &t, pl->section_start );
+
+        if ( pl->section_name != NULL ) free( ( void * ) pl->section_name );
+        if ( section_name != NULL )
+            pl->section_name = string_dup_measure ( section_name, NULL );
+        else
+            pl->section_name = NULL;
+
+        perf_log_write( pl, "start [%s] at %T\n",
+                        value_or_unknown( pl->section_name ), &t );
+    }
+}
+
+
+void perf_log_end_section( struct perf_log * pl )
+{
+    if ( pl != NULL )
+    {
+        KTime_t section_end = KTimeStamp();
+        KTime t;
+        KTimeLocal ( &t, section_end );
+        perf_log_write( pl, "end.. [%s] at %T ( %lu seconds )\n",
+                        value_or_unknown( pl->section_name ), &t, ( section_end - pl->section_start ) );
+
+        if ( pl->section_name != NULL )
+        {
+            free( ( void * ) pl->section_name );
+            pl->section_name = NULL;
+        }
+    }
+}
+
+
+void perf_log_start_sub_section( struct perf_log * pl, const char * sub_section_name )
+{
+    if ( pl != NULL )
+    {
+        KTime t;
+        pl->sub_section_start = KTimeStamp();
+        pl->chunk_start = pl->sub_section_start;
+        pl->counter = 0;
+        KTimeLocal ( &t, pl->sub_section_start );
+
+        if ( pl->sub_section_name != NULL ) free( ( void * ) pl->sub_section_name );
+        if ( sub_section_name != NULL )
+            pl->sub_section_name = string_dup_measure ( sub_section_name, NULL );
+        else
+            pl->sub_section_name = NULL;
+
+        perf_log_write( pl, "start (%s) at %T\n",
+                        value_or_unknown( pl->sub_section_name ), &t );
+    }
+}
+
+
+void perf_log_end_sub_section( struct perf_log * pl )
+{
+    if ( pl != NULL )
+    {
+        KTime_t sub_section_end = KTimeStamp();
+        KTime t;
+        KTimeLocal ( &t, sub_section_end );
+        perf_log_write( pl, "end.. (%s) at %T ( %lu seconds )\n",
+                        value_or_unknown( pl->sub_section_name ), &t, ( sub_section_end - pl->sub_section_start ) );
+
+        if ( pl->sub_section_name != NULL )
+        {
+            free( ( void * ) pl->sub_section_name );
+            pl->sub_section_name = NULL;
+        }
+    }
+}
+
+
+static uint64_t lpm( uint64_t seconds, uint64_t written )
+{
+    uint64_t res = 0;
+    if ( seconds > 0 )
+        res = ( written * 60 ) / seconds;
+    return res;
+}
+
+
+void perf_log_line( struct perf_log * pl, uint64_t pos )
+{
+    if ( pl != NULL )
+    {
+        pl->counter++;
+        if ( pl->counter > pl->limit )
+        {
+            KTime_t chunk_end = KTimeStamp();
+            uint64_t seconds = ( chunk_end - pl->chunk_start );
+            
+            perf_log_write( pl, "%lu lines in %lu seconds, at %lu, lpm = %lu\n",
+                            pl->limit, seconds, pos, lpm( seconds, pl->counter ) );
+
+            pl->counter = 0;
+            pl->chunk_start = chunk_end;
+        }
+    }
+}
\ No newline at end of file
diff --git a/tools/sra-pileup/perf_log.h b/tools/sra-pileup/perf_log.h
new file mode 100644
index 0000000..7ca9d13
--- /dev/null
+++ b/tools/sra-pileup/perf_log.h
@@ -0,0 +1,52 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_perf_log_
+#define _h_perf_log_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+struct perf_log;
+
+struct perf_log * make_perf_log( const char * filename, const char * toolname );
+void free_perf_log( struct perf_log * pl );
+
+void perf_log_start_section( struct perf_log * pl, const char * section_name );
+void perf_log_end_section( struct perf_log * pl );
+
+void perf_log_start_sub_section( struct perf_log * pl, const char * sub_section_name );
+void perf_log_end_sub_section( struct perf_log * pl );
+
+void perf_log_line( struct perf_log * pl, uint64_t pos );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_perf_log_ */
diff --git a/tools/sra-pileup/pileup_counters.c b/tools/sra-pileup/pileup_counters.c
new file mode 100644
index 0000000..b490139
--- /dev/null
+++ b/tools/sra-pileup/pileup_counters.c
@@ -0,0 +1,447 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/out.h>
+
+#include "ref_walker_0.h"
+#include "4na_ascii.h"
+
+static uint32_t percent( uint32_t v1, uint32_t v2 )
+{
+    uint32_t sum = v1 + v2;
+    uint32_t res = 0;
+    if ( sum > 0 )
+        res = ( ( v1 * 100 ) / sum );
+    return res;
+}
+
+typedef struct indel_fragment
+{
+    BSTNode node;
+    const char * bases;
+    uint32_t len;
+    uint32_t count;
+} indel_fragment;
+
+
+static indel_fragment * make_indel_fragment( const char * bases, uint32_t len )
+{
+    indel_fragment * res = malloc( sizeof * res );
+    if ( res != NULL )
+    {
+        res->bases = string_dup ( bases, len );
+        if ( res->bases == NULL )
+        {
+            free( res );
+            res = NULL;
+        }
+        else
+        {
+            res->len = len;
+            res->count = 1;
+        }
+    }
+    return res;
+}
+
+
+static void CC free_indel_fragment( BSTNode * n, void * data )
+{
+    indel_fragment * fragment = ( indel_fragment * ) n;
+    if ( fragment != NULL )
+    {
+        free( ( void * ) fragment->bases );
+        free( fragment );
+    }
+}
+
+
+static void free_fragments( BSTree * fragments )
+{    
+    BSTreeWhack ( fragments, free_indel_fragment, NULL );
+}
+
+
+typedef struct find_fragment_ctx
+{
+    const char * bases;
+    uint32_t len;
+} find_fragment_ctx;
+
+
+static int64_t CC cmp_fragment_vs_find_ctx( const void *item, const BSTNode *n )
+{
+    const indel_fragment * fragment = ( const indel_fragment * )n;
+    const find_fragment_ctx * fctx = ( const find_fragment_ctx * )item;
+    return string_cmp ( fctx->bases, fctx->len, fragment->bases, fragment->len, -1 );
+}
+
+
+static int64_t CC cmp_fragment_vs_fragment( const BSTNode *item, const BSTNode *n )
+{
+    const indel_fragment * f1 = ( const indel_fragment * )item;
+    const indel_fragment * f2 = ( const indel_fragment * )n;
+    return string_cmp ( f1->bases, f1->len, f2->bases, f2->len, -1 );
+}
+
+
+static void count_indel_fragment( BSTree * fragments, const INSDC_4na_bin *bases, uint32_t len )
+{
+    find_fragment_ctx fctx;
+
+    fctx.bases = malloc( len );
+    if ( fctx.bases != NULL )
+    {
+        indel_fragment * fragment;
+        uint32_t i;
+
+        fctx.len = len;
+        for ( i = 0; i < len; ++i )
+            ( ( char * )fctx.bases )[ i ] = _4na_to_ascii( bases[ i ], false );
+
+        fragment = ( indel_fragment * ) BSTreeFind ( fragments, &fctx, cmp_fragment_vs_find_ctx );
+        if ( fragment == NULL )
+        {
+            fragment = make_indel_fragment( fctx.bases, len );
+            if ( fragment != NULL )
+            {
+                rc_t rc = BSTreeInsert ( fragments, ( BSTNode * )fragment, cmp_fragment_vs_fragment );
+                if ( rc != 0 )
+                    free_indel_fragment( ( BSTNode * )fragment, NULL );
+            }
+        }
+        else
+            fragment->count++;
+
+        free( ( void * ) fctx.bases );
+    }
+}
+
+
+typedef struct walk_fragment_ctx
+{
+    rc_t rc;
+    uint32_t n;
+} walk_fragment_ctx;
+
+
+static void CC on_fragment( BSTNode *n, void *data )
+{
+    walk_fragment_ctx * wctx = data;
+    const indel_fragment * fragment = ( const indel_fragment * )n;
+    if ( wctx->rc == 0 )
+    {
+        if ( wctx->n == 0 )
+            wctx->rc = KOutMsg( "%u-%.*s", fragment->count, fragment->len, fragment->bases );
+        else
+            wctx->rc = KOutMsg( "|%u-%.*s", fragment->count, fragment->len, fragment->bases );
+        wctx->n++;
+    }
+}
+
+
+static rc_t print_fragments( BSTree * fragments )
+{
+    walk_fragment_ctx wctx;
+    wctx.rc = 0;
+    wctx.n = 0;
+    BSTreeForEach ( fragments, false, on_fragment, &wctx );
+    return wctx.rc;
+}
+
+/* =========================================================================================== */
+
+typedef struct pileup_counters
+{
+    uint32_t matches;
+    uint32_t mismatches[ 4 ];
+    uint32_t inserts;
+    uint32_t deletes;
+    uint32_t forward;
+    uint32_t reverse;
+    uint32_t starting;
+    uint32_t ending;
+    BSTree insert_fragments;
+    BSTree delete_fragments;
+} pileup_counters;
+
+
+static void clear_counters( pileup_counters * counters )
+{
+    uint32_t i;
+
+    counters->matches = 0;
+    for ( i = 0; i < 4; ++i )
+        counters->mismatches[ i ] = 0;
+    counters->inserts = 0;
+    counters->deletes = 0;
+    counters->forward = 0;
+    counters->reverse = 0;
+    counters->starting = 0;
+    counters->ending = 0;
+    BSTreeInit( &(counters->insert_fragments) );
+    BSTreeInit( &(counters->delete_fragments) );
+}
+
+
+static void walk_counter_state( ReferenceIterator *ref_iter, int32_t state, bool reverse,
+                                pileup_counters * counters )
+{
+    if ( ( state & align_iter_invalid ) == align_iter_invalid )
+        return;
+
+    if ( ( state & align_iter_skip ) != align_iter_skip )
+    {
+        if ( ( state & align_iter_match ) == align_iter_match )
+            (counters->matches)++;
+        else
+        {
+            char c = _4na_to_ascii( state, false );
+            switch( c )
+            {
+                case 'A' : ( counters->mismatches[ 0 ] )++; break;
+                case 'C' : ( counters->mismatches[ 1 ] )++; break;
+                case 'G' : ( counters->mismatches[ 2 ] )++; break;
+                case 'T' : ( counters->mismatches[ 3 ] )++; break;
+            }
+        }
+    }
+
+    if ( reverse )
+        (counters->reverse)++;
+    else
+        (counters->forward)++;
+
+    if ( ( state & align_iter_insert ) == align_iter_insert )
+    {
+        const INSDC_4na_bin *bases;
+        uint32_t n = ReferenceIteratorBasesInserted ( ref_iter, &bases );
+        (counters->inserts) += n;
+        count_indel_fragment( &(counters->insert_fragments), bases, n );
+    }
+
+    if ( ( state & align_iter_delete ) == align_iter_delete )
+    {
+        const INSDC_4na_bin *bases;
+        INSDC_coord_zero ref_pos;
+        uint32_t n = ReferenceIteratorBasesDeleted ( ref_iter, &ref_pos, &bases );
+        if ( bases != NULL )
+        {
+            (counters->deletes) += n;
+            count_indel_fragment( &(counters->delete_fragments), bases, n );
+            free( (void *) bases );
+        }
+    }
+
+    if ( ( state & align_iter_first ) == align_iter_first )
+        ( counters->starting)++;
+
+    if ( ( state & align_iter_last ) == align_iter_last )
+        ( counters->ending)++;
+}
+
+
+static rc_t print_counter_line( const char * ref_name,
+                                INSDC_coord_zero ref_pos,
+                                INSDC_4na_bin ref_base,
+                                uint32_t depth,
+                                pileup_counters * counters )
+{
+    char c = _4na_to_ascii( ref_base, false );
+
+    rc_t rc = KOutMsg( "%s\t%u\t%c\t%u\t", ref_name, ref_pos + 1, c, depth );
+
+    if ( rc == 0 && counters->matches > 0 )
+        rc = KOutMsg( "%u", counters->matches );
+
+    if ( rc == 0 /* && counters->mismatches[ 0 ] > 0 */ )
+        rc = KOutMsg( "\t%u-A", counters->mismatches[ 0 ] );
+
+    if ( rc == 0 /* && counters->mismatches[ 1 ] > 0 */ )
+        rc = KOutMsg( "\t%u-C", counters->mismatches[ 1 ] );
+
+    if ( rc == 0 /* && counters->mismatches[ 2 ] > 0 */ )
+        rc = KOutMsg( "\t%u-G", counters->mismatches[ 2 ] );
+
+    if ( rc == 0 /* && counters->mismatches[ 3 ] > 0 */ )
+        rc = KOutMsg( "\t%u-T", counters->mismatches[ 3 ] );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "\tI:" );
+    if ( rc == 0 )
+        rc = print_fragments( &(counters->insert_fragments) );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "\tD:" );
+    if ( rc == 0 )
+        rc = print_fragments( &(counters->delete_fragments) );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "\t%u%%", percent( counters->forward, counters->reverse ) );
+
+    if ( rc == 0 && counters->starting > 0 )
+        rc = KOutMsg( "\tS%u", counters->starting );
+
+    if ( rc == 0 && counters->ending > 0 )
+        rc = KOutMsg( "\tE%u", counters->ending );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "\n" );
+
+    free_fragments( &(counters->insert_fragments) );
+    free_fragments( &(counters->delete_fragments) );
+
+    return rc;
+}
+
+
+/* ........................................................................................... */
+
+
+static rc_t CC walk_counters_enter_ref_pos( walk_data * data )
+{
+    clear_counters( data->data );
+    return 0;
+}
+
+static rc_t CC walk_counters_exit_ref_pos( walk_data * data )
+{
+    rc_t rc = print_counter_line( data->ref_name, data->ref_pos, data->ref_base, data->depth, data->data );
+    return rc;
+}
+
+static rc_t CC walk_counters_placement( walk_data * data )
+{
+    walk_counter_state( data->ref_iter, data->state, data->xrec->reverse, data->data );
+    return 0;
+}
+
+rc_t walk_counters( ReferenceIterator *ref_iter, pileup_options *options )
+{
+    walk_data data;
+    walk_funcs funcs;
+    pileup_counters counters;
+
+    data.ref_iter = ref_iter;
+    data.options = options;
+    data.data = &counters;
+
+    funcs.on_enter_ref = NULL;
+    funcs.on_exit_ref = NULL;
+
+    funcs.on_enter_ref_window = NULL;
+    funcs.on_exit_ref_window = NULL;
+
+    funcs.on_enter_ref_pos = walk_counters_enter_ref_pos;
+    funcs.on_exit_ref_pos = walk_counters_exit_ref_pos;
+
+    funcs.on_enter_spotgroup = NULL;
+    funcs.on_exit_spotgroup = NULL;
+
+    funcs.on_placement = walk_counters_placement;
+
+    return walk_0( &data, &funcs );
+}
+
+
+/* =========================================================================================== */
+
+
+static rc_t print_mismatches_line( const char * ref_name,
+                                   INSDC_coord_zero ref_pos,
+                                   uint32_t depth,
+                                   uint32_t min_mismatch_percent,
+                                   pileup_counters * counters )
+{
+    rc_t rc = 0;
+    if ( depth > 0 )
+    {
+        uint32_t total_mismatches = counters->mismatches[ 0 ] +
+                                    counters->mismatches[ 1 ] +
+                                    counters->mismatches[ 2 ] +
+                                    counters->mismatches[ 3 ];
+	if ( total_mismatches * 100 >= min_mismatch_percent * depth) 
+        {
+                rc = KOutMsg( "%s\t%u\t%u\t%u\n", ref_name, ref_pos + 1, depth, total_mismatches );
+        }
+    }
+    
+    free_fragments( &(counters->insert_fragments) );
+    free_fragments( &(counters->delete_fragments) );
+
+    return rc;
+}
+
+
+/* ........................................................................................... */
+
+
+static rc_t CC walk_mismatches_enter_ref_pos( walk_data * data )
+{
+    clear_counters( data->data );
+    return 0;
+}
+
+static rc_t CC walk_mismatches_exit_ref_pos( walk_data * data )
+{
+    rc_t rc = print_mismatches_line( data->ref_name, data->ref_pos,
+                                     data->depth, data->options->min_mismatch, data->data );
+    return rc;
+}
+
+static rc_t CC walk_mismatches_placement( walk_data * data )
+{
+    walk_counter_state( data->ref_iter, data->state, data->xrec->reverse, data->data );
+    return 0;
+}
+
+
+rc_t walk_mismatches( ReferenceIterator *ref_iter, pileup_options * options )
+{
+    walk_data data;
+    walk_funcs funcs;
+    pileup_counters counters;
+
+    data.ref_iter = ref_iter;
+    data.options = options;
+    data.data = &counters;
+
+    funcs.on_enter_ref = NULL;
+    funcs.on_exit_ref = NULL;
+
+    funcs.on_enter_ref_window = NULL;
+    funcs.on_exit_ref_window = NULL;
+
+    funcs.on_enter_ref_pos = walk_mismatches_enter_ref_pos;
+    funcs.on_exit_ref_pos = walk_mismatches_exit_ref_pos;
+
+    funcs.on_enter_spotgroup = NULL;
+    funcs.on_exit_spotgroup = NULL;
+
+    funcs.on_placement = walk_mismatches_placement;
+
+    return walk_0( &data, &funcs );
+}
diff --git a/tools/sra-pileup/pileup_counters.h b/tools/sra-pileup/pileup_counters.h
new file mode 100644
index 0000000..f70f3a7
--- /dev/null
+++ b/tools/sra-pileup/pileup_counters.h
@@ -0,0 +1,41 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_pileup_counters_
+#define _h_pileup_counters_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+rc_t walk_counters( ReferenceIterator *ref_iter, pileup_options *options );
+rc_t walk_mismatches( ReferenceIterator *ref_iter, pileup_options * options );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_pileup_counters_ */
diff --git a/tools/sra-pileup/pileup_indels.c b/tools/sra-pileup/pileup_indels.c
new file mode 100644
index 0000000..ea10cea
--- /dev/null
+++ b/tools/sra-pileup/pileup_indels.c
@@ -0,0 +1,120 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/out.h>
+
+#include "ref_walker_0.h"
+#include "4na_ascii.h"
+
+typedef struct indel_counters
+{
+    uint32_t coverage;
+    uint32_t deletes;
+    uint32_t inserts;
+} indel_counters;
+
+
+static rc_t CC walk_indels_enter_ref_pos( walk_data * data )
+{
+    indel_counters * vc = data->data;
+    memset( vc, 0, sizeof *vc );
+    return 0;
+}
+
+
+static rc_t CC walk_indels_exit_ref_pos( walk_data * data )
+{
+	rc_t rc = 0;
+    if ( data->depth > 0 )
+    {
+        indel_counters * vc = data->data;
+		if ( ( vc -> deletes + vc -> inserts ) > 0 )
+		{
+			char ref_base = _4na_to_ascii( data->ref_base, false );
+
+/*
+        A ... ref-name
+        B ... ref-pos
+        C ... ref-base
+        D ... coverage
+
+        E ... total deletes
+        F ... total insertes
+                          A   B   C   D   E   F
+*/
+			rc = KOutMsg( "%s\t%u\t%c\t%u\t%u\t%u\n", 
+                     data->ref_name, data->ref_pos + 1, ref_base, data->depth,
+                     vc->deletes, vc->inserts );
+		}
+    }
+	return rc;
+}
+
+
+static rc_t CC walk_indels_placement( walk_data * data )
+{
+    int32_t state = data->state;
+    if ( ( state & align_iter_invalid ) != align_iter_invalid )
+    {
+        indel_counters * vc = data->data;
+
+        if ( ( state & align_iter_skip ) == align_iter_skip )
+            ( vc->deletes ) ++;
+
+        if ( ( state & align_iter_insert ) == align_iter_insert )
+            ( vc->inserts )++;
+    }
+    return 0;
+}
+
+
+rc_t walk_indels( ReferenceIterator *ref_iter, pileup_options * options )
+{
+    walk_data data;
+    walk_funcs funcs;
+
+    indel_counters v_counters;
+
+    data.ref_iter = ref_iter;
+    data.options = options;
+    data.data = &v_counters;
+
+    funcs.on_enter_ref = NULL;
+    funcs.on_exit_ref = NULL;
+
+    funcs.on_enter_ref_window = NULL;
+    funcs.on_exit_ref_window = NULL;
+
+    funcs.on_enter_ref_pos = walk_indels_enter_ref_pos;
+    funcs.on_exit_ref_pos = walk_indels_exit_ref_pos;
+
+    funcs.on_enter_spotgroup = NULL;
+    funcs.on_exit_spotgroup = NULL;
+
+    funcs.on_placement = walk_indels_placement;
+
+    return walk_0( &data, &funcs );
+}
diff --git a/tools/sra-pileup/pileup_indels.h b/tools/sra-pileup/pileup_indels.h
new file mode 100644
index 0000000..2eefc1c
--- /dev/null
+++ b/tools/sra-pileup/pileup_indels.h
@@ -0,0 +1,40 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_pileup_indels_
+#define _h_pileup_indels_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+rc_t walk_indels( ReferenceIterator *ref_iter, pileup_options * options );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_pileup_indels_ */
diff --git a/tools/sra-pileup/pileup_index.c b/tools/sra-pileup/pileup_index.c
new file mode 100644
index 0000000..7534c85
--- /dev/null
+++ b/tools/sra-pileup/pileup_index.c
@@ -0,0 +1,122 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/out.h>
+
+#include "ref_walker_0.h"
+#include "4na_ascii.h"
+
+static uint32_t percent( uint32_t v1, uint32_t v2 )
+{
+    uint32_t sum = v1 + v2;
+    uint32_t res = 0;
+    if ( sum > 0 )
+        res = ( ( v1 * 100 ) / sum );
+    return res;
+}
+
+
+typedef struct index_counters
+{
+    uint32_t base_counts[ 4 ];   /* 0...A, 1...C, 2...G, 3...T */
+    uint32_t inserts;
+    uint32_t deletes;
+    uint32_t forward;
+    uint32_t reverse;
+} index_counters;
+
+
+static rc_t CC walk_index_enter_ref_pos( walk_data * data )
+{
+    index_counters * ic = data->data;
+    memset( ic, 0, sizeof *ic );
+    return 0;
+}
+
+
+static rc_t CC walk_index_exit_ref_pos( walk_data * data )
+{
+    index_counters * ic = data->data;
+    if ( ic->forward + ic->reverse == 0 )
+        return 0;
+    else
+        return KOutMsg( "%s\t%u\t%u\t%u\t%u\t%u\t%u\t%u\t%u\n", 
+                     data->ref_name, data->ref_pos + 1, 
+                     ic->base_counts[ 0 ], ic->base_counts[ 1 ], ic->base_counts[ 2 ], ic->base_counts[ 3 ],
+                     ic->inserts, ic->deletes, percent( ic->forward, ic->reverse ) );
+}
+
+
+static rc_t CC walk_index_placement( walk_data * data )
+{
+    int32_t state = data->state;
+    if ( ( state & align_iter_invalid ) != align_iter_invalid )
+    {
+        index_counters * ic = data->data;
+
+        if ( ( state & align_iter_skip ) == align_iter_skip )
+            ( ic->deletes ) ++;
+        else
+            ic->base_counts[ _4na_to_index( state ) ] ++;
+
+        if ( data->xrec->reverse )
+            ( ic->reverse )++;
+        else
+            ( ic->forward )++;
+
+        if ( ( state & align_iter_insert ) == align_iter_insert )
+            ( ic->inserts )++;
+    }
+    return 0;
+}
+
+
+rc_t walk_index( ReferenceIterator *ref_iter, pileup_options * options )
+{
+    walk_data data;
+    walk_funcs funcs;
+    index_counters i_counters;
+
+    data.ref_iter = ref_iter;
+    data.options = options;
+    data.data = &i_counters;
+
+    funcs.on_enter_ref = NULL;
+    funcs.on_exit_ref = NULL;
+
+    funcs.on_enter_ref_window = NULL;
+    funcs.on_exit_ref_window = NULL;
+
+    funcs.on_enter_ref_pos = walk_index_enter_ref_pos;
+    funcs.on_exit_ref_pos = walk_index_exit_ref_pos;
+
+    funcs.on_enter_spotgroup = NULL;
+    funcs.on_exit_spotgroup = NULL;
+
+    funcs.on_placement = walk_index_placement;
+
+    return walk_0( &data, &funcs );
+}
diff --git a/tools/sra-pileup/pileup_index.h b/tools/sra-pileup/pileup_index.h
new file mode 100644
index 0000000..7e07bc9
--- /dev/null
+++ b/tools/sra-pileup/pileup_index.h
@@ -0,0 +1,40 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_pileup_index_
+#define _h_pileup_index_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+rc_t walk_index( ReferenceIterator *ref_iter, pileup_options * options );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_pileup_index_ */
diff --git a/tools/sra-pileup/pileup_options.h b/tools/sra-pileup/pileup_options.h
new file mode 100644
index 0000000..9b02adc
--- /dev/null
+++ b/tools/sra-pileup/pileup_options.h
@@ -0,0 +1,62 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_pileup_options_
+#define _h_pileup_options_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "ref_regions.h"
+#include "cmdline_cmn.h"
+
+typedef struct pileup_options
+{
+    common_options cmn;     /* from cmdline_cmn.h */
+    bool process_dups;
+    bool omit_qualities;
+    bool read_tlen;
+    bool no_skip;
+    bool show_id;
+    bool div_by_spotgrp;
+	bool depth_per_spotgrp;
+    bool use_seq_name;
+    uint32_t minmapq;
+    uint32_t min_mismatch;
+    uint32_t merge_dist;
+    uint32_t source_table;
+    uint32_t function;  /* sra_pileup_samtools, sra_pileup_counters, sra_pileup_stat, 
+                           sra_pileup_report_ref, sra_pileup_report_ref_ext, sra_pileup_debug, etc */
+    struct skiplist * skiplist;     /* from ref_regions.h */
+} pileup_options;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  pileup_options_ */
diff --git a/tools/sra-pileup/pileup_stat.c b/tools/sra-pileup/pileup_stat.c
new file mode 100644
index 0000000..8e74124
--- /dev/null
+++ b/tools/sra-pileup/pileup_stat.c
@@ -0,0 +1,391 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/out.h>
+#include <klib/sort.h>
+
+#include "ref_walker_0.h"
+#include "4na_ascii.h"
+
+static uint32_t percent( uint32_t v1, uint32_t v2 )
+{
+    uint32_t sum = v1 + v2;
+    uint32_t res = 0;
+    if ( sum > 0 )
+        res = ( ( v1 * 100 ) / sum );
+    return res;
+}
+
+typedef struct tlen_array
+{
+    uint32_t * values;
+    uint32_t capacity;
+    uint32_t members;
+    uint32_t zeros;
+} tlen_array;
+
+
+static rc_t init_tlen_array( tlen_array * a, uint32_t init_capacity )
+{
+    rc_t rc = 0;
+    a->values = malloc( sizeof ( a->values[ 0 ] ) * init_capacity );
+    if ( a->values == NULL )
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcMemory, rcExhausted );
+    else
+    {
+        a->capacity = init_capacity;
+        a->members = 0;
+        a->zeros = 0;
+    }
+    return rc;
+}
+
+
+static void finish_tlen_array( tlen_array * a )
+{
+    if ( a->values != NULL )
+    {
+        free( a->values );
+        a->values = NULL;
+    }
+}
+
+
+static rc_t realloc_tlen_array( tlen_array * a, uint32_t new_depth )
+{
+    rc_t rc = 0;
+    if ( new_depth > a->capacity )
+    {
+        void * p = realloc( a->values, ( sizeof ( a->values[ 0 ] ) ) * new_depth );
+        if ( a->values == NULL )
+            rc = RC ( rcApp, rcArgv, rcAccessing, rcMemory, rcExhausted );
+        else
+        {
+            a->values = p;
+            a->capacity = new_depth;
+        }
+    }
+    return rc;
+}
+
+
+static void remove_from_tlen_array( tlen_array * a, uint32_t count )
+{
+    if ( count > 0 )
+    {
+        if ( a->members < count )
+            a->members = 0;
+        else
+        {
+            a->members -= count;
+            memmove( &(a->values[ 0 ]), &(a->values[ count ]), a->members * ( sizeof a->values[ 0 ] ) );
+        }
+    }
+}
+
+
+static bool add_tlen_to_array( tlen_array * a, uint32_t value )
+{
+    bool res = ( value != 0 );
+    if ( !res )
+        a->zeros++;
+    else
+        a->values[ a->members++ ] = value;
+    return res;
+}
+
+
+#define INIT_WINDOW_SIZE 50
+#define MAX_SEQLEN_COUNT 500000
+
+typedef struct strand
+{
+    uint32_t alignment_count, window_size, window_max, seq_len_accu_count;
+    uint64_t seq_len_accu;
+    tlen_array tlen_w;          /* tlen accumulater for all alignmnts starting/ending in window ending at current position */
+    tlen_array tlen_l;          /* array holding the length of all position-slices in the window */
+    tlen_array zeros;
+} strand;
+
+
+typedef struct stat_counters
+{
+    strand pos;
+    strand neg;
+} stat_counters;
+
+
+static rc_t prepare_strand( strand * strand, uint32_t initial_size )
+{
+    rc_t rc = init_tlen_array( &strand->tlen_w, initial_size );
+    if ( rc == 0 )
+        rc = init_tlen_array( &strand->tlen_l, initial_size );
+    if ( rc == 0 )
+        rc = init_tlen_array( &strand->zeros, initial_size );
+    if ( rc == 0 )
+    {
+        strand->window_size = 0;
+        strand->window_max = INIT_WINDOW_SIZE;
+        strand->seq_len_accu_count = 0;
+        strand->seq_len_accu = 0;
+    }
+    return rc;
+}
+
+
+static rc_t prepare_stat_counters( stat_counters * counters, uint32_t initial_size )
+{
+    rc_t rc = prepare_strand( &counters->pos, initial_size );
+    if ( rc == 0 )
+        rc = prepare_strand( &counters->neg, initial_size );
+    return rc;
+}
+
+
+static void finish_strand( strand * strand )
+{
+    finish_tlen_array( &strand->tlen_w );
+    finish_tlen_array( &strand->tlen_l );
+    finish_tlen_array( &strand->zeros );
+}
+
+
+static void finish_stat_counters( stat_counters * counters )
+{
+    finish_strand( &counters->pos );
+    finish_strand( &counters->neg );
+}
+
+
+static rc_t realloc_strand( strand * strand, uint32_t new_depth )
+{
+    rc_t rc = realloc_tlen_array( &strand->tlen_w, strand->tlen_w.members + new_depth );
+    if ( rc == 0 )
+        rc = realloc_tlen_array( &strand->tlen_l, strand->tlen_l.members + new_depth );
+    if ( rc == 0 )
+        rc = realloc_tlen_array( &strand->zeros, strand->zeros.members + new_depth );
+    strand->alignment_count = 0;
+    return rc;
+}
+
+
+static void on_new_ref_position_strand( strand * strand )
+{
+    if ( ( strand->seq_len_accu_count < MAX_SEQLEN_COUNT ) && ( strand->seq_len_accu_count > 0 ) )
+    {
+        uint64_t w = ( strand->seq_len_accu / strand->seq_len_accu_count );
+        if ( w > strand->window_max )
+            strand->window_max = w;
+    }
+
+    if ( strand->window_size >= strand->window_max )
+    {
+        uint32_t to_remove = strand->tlen_l.values[ 0 ];
+        remove_from_tlen_array( &strand->tlen_w, to_remove );
+        remove_from_tlen_array( &strand->tlen_l, 1 );
+
+        to_remove = strand->zeros.values[ 0 ];
+        strand->tlen_w.zeros -= to_remove;
+        remove_from_tlen_array( &strand->zeros, 1 );
+    }
+    else
+        strand->window_size++;
+    strand->tlen_l.values[ strand->tlen_l.members++ ] = 0;
+    strand->zeros.values[ strand->zeros.members++ ] = 0;
+}
+
+
+static uint32_t medium( tlen_array * a )
+{
+    if ( a->members == 0 )
+        return 0;
+    else
+        return a->values[ a->members >> 1 ];
+}
+
+
+static uint32_t percentil( tlen_array * a, uint32_t p )
+{
+    if ( a->members == 0 )
+        return 0;
+    else
+        return a->values[ ( a->members * p ) / 100 ];
+}
+
+
+static rc_t print_header_line( void )
+{
+    return KOutMsg( "\nREFNAME----\tREFPOS\tREFBASE\tDEPTH\tSTRAND%%\tTL+#0\tTL+10%%\tTL+MED\tTL+90%%\tTL-#0\tTL-10%%\tTL-MED\tTL-90%%\n\n" );
+}
+
+
+/* ........................................................................................... */
+
+
+static rc_t CC walk_stat_enter_ref_window( walk_data * data )
+{
+    stat_counters * counters = data->data;
+    counters->pos.tlen_w.members = 0;
+    counters->pos.tlen_l.members = 0;
+    counters->neg.tlen_w.members = 0;
+    counters->neg.tlen_l.members = 0;
+    return 0;
+}
+
+
+static rc_t CC walk_stat_enter_ref_pos( walk_data * data )
+{
+    rc_t rc;
+    stat_counters * counters = data->data;
+
+    on_new_ref_position_strand( &counters->pos );
+    on_new_ref_position_strand( &counters->neg );
+
+    rc = realloc_strand( &counters->pos, data->depth );
+    if ( rc == 0 )
+        rc = realloc_strand( &counters->neg, data->depth );
+
+    return rc;
+}
+
+
+static rc_t CC walk_stat_exit_ref_pos( walk_data * data )
+{
+    char c = _4na_to_ascii( data->ref_base, false );
+    stat_counters * counters = data->data;
+
+    /* REF-NAME, REF-POS, REF-BASE, DEPTH */
+    rc_t rc = KOutMsg( "%s\t%u\t%c\t%u\t", data->ref_name, data->ref_pos + 1, c, data->depth );
+
+    /* STRAND-ness */
+    if ( rc == 0 )
+        rc = KOutMsg( "%u%%\t", percent( counters->pos.alignment_count, counters->neg.alignment_count ) );
+
+    /* TLEN-Statistic for sliding window, only starting/ending placements */
+    if ( rc == 0 )
+    {
+        tlen_array * a = &counters->pos.tlen_w;
+        if ( a->members > 1 )
+            ksort_uint32_t ( a->values, a->members );
+
+        rc = KOutMsg( "%u\t%u\t%u\t%u\t", a->zeros, percentil( a, 10 ), medium( a ), percentil( a, 90 ) );
+        if ( rc == 0 )
+        {
+            a = &counters->neg.tlen_w;
+            if ( a->members > 1 )
+                ksort_uint32_t ( a->values, a->members );
+            rc = KOutMsg( "%u\t%u\t%u\t%u\t", a->zeros, percentil( a, 10 ), medium( a ), percentil( a, 90 ) );
+        }
+    }
+
+/*
+    KOutMsg( "( %u,%u )\t", counters->pos.window_max, counters->neg.window_max );
+    KOutMsg( "< %u.%u, %u.%u ( %u.%u, %u.%u ) >",
+            counters->pos.tlen_w.members, counters->pos.tlen_w.capacity, counters->neg.tlen_w.members, counters->neg.tlen_w.capacity,
+            counters->pos.tlen_l.members, counters->pos.tlen_l.capacity, counters->neg.tlen_l.members, counters->neg.tlen_l.capacity );
+*/
+
+    if ( rc == 0 )
+        rc = KOutMsg( "\n" );
+
+    return rc;
+}
+
+
+static void walk_strand_placement( strand * strand, int32_t tlen, INSDC_coord_len seq_len )
+{
+    tlen_array * a;
+    uint32_t value =  ( tlen < 0 ) ? -tlen : tlen;
+    if ( add_tlen_to_array( &strand->tlen_w, value ) )
+        a = &strand->tlen_l;
+    else
+        a = &strand->zeros;
+    a->values[ a->members - 1 ]++;
+
+    if ( strand->seq_len_accu_count < MAX_SEQLEN_COUNT )
+    {
+        strand->seq_len_accu += seq_len;
+        strand->seq_len_accu_count++;
+    }
+}
+
+
+static rc_t CC walk_stat_placement( walk_data * data )
+{
+    int32_t state = data->state;
+    if ( ( state & align_iter_invalid ) != align_iter_invalid )
+    {
+        bool reverse = data->xrec->reverse;
+        stat_counters * counters = data->data;
+        strand * strand = ( reverse ) ? &counters->neg : &counters->pos;
+
+        strand->alignment_count++;
+
+        /* for TLEN-statistic on starting/ending placements at this pos */
+        if ( ( ( state & align_iter_last ) == align_iter_last )&&( reverse ) )
+            walk_strand_placement( strand, data->xrec->tlen, data->rec->len );
+        else if ( ( ( state & align_iter_first ) == align_iter_first )&&( !reverse ) )
+            walk_strand_placement( strand, data->xrec->tlen, data->rec->len );
+    }
+    return 0;
+}
+
+
+rc_t walk_stat( ReferenceIterator *ref_iter, pileup_options *options )
+{
+    walk_data data;
+    walk_funcs funcs;
+    stat_counters counters;
+
+    rc_t rc = print_header_line();
+    if ( rc == 0 )
+        rc = prepare_stat_counters( &counters, 1024 );
+    if ( rc == 0 )
+    {
+        data.ref_iter = ref_iter;
+        data.options = options;
+        data.data = &counters;
+
+        funcs.on_enter_ref = NULL;
+        funcs.on_exit_ref = NULL;
+
+        funcs.on_enter_ref_window = walk_stat_enter_ref_window;
+        funcs.on_exit_ref_window = NULL;
+
+        funcs.on_enter_ref_pos = walk_stat_enter_ref_pos;
+        funcs.on_exit_ref_pos = walk_stat_exit_ref_pos;
+
+        funcs.on_enter_spotgroup = NULL;
+        funcs.on_exit_spotgroup = NULL;
+
+        funcs.on_placement = walk_stat_placement;
+
+        rc = walk_0( &data, &funcs );
+
+        finish_stat_counters( &counters );
+    }
+    return rc;
+}
\ No newline at end of file
diff --git a/tools/sra-pileup/pileup_stat.h b/tools/sra-pileup/pileup_stat.h
new file mode 100644
index 0000000..7575822
--- /dev/null
+++ b/tools/sra-pileup/pileup_stat.h
@@ -0,0 +1,40 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_pileup_stat_
+#define _h_pileup_stat_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+rc_t walk_stat( ReferenceIterator *ref_iter, pileup_options *options );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_pileup_stat_ */
diff --git a/tools/sra-pileup/pileup_v2.c b/tools/sra-pileup/pileup_v2.c
new file mode 100644
index 0000000..015bf6a
--- /dev/null
+++ b/tools/sra-pileup/pileup_v2.c
@@ -0,0 +1,382 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/out.h>
+#include <kapp/args.h>
+
+#include "pileup_options.h"
+#include "dyn_string.h"
+#include "ref_walker.h"
+#include "4na_ascii.h"
+
+/*
+static rc_t CC pileup_test_enter_ref( ref_walker_data * rwd )
+{
+    return KOutMsg( "\nentering >%s<\n", rwd->ref_name );
+}
+
+static rc_t CC pileup_test_exit_ref( ref_walker_data * rwd )
+{
+    return KOutMsg( "exit >%s<\n", rwd->ref_name );
+}
+
+static rc_t CC pileup_test_enter_ref_window( ref_walker_data * rwd )
+{
+    return KOutMsg( "   enter window >%s< [ %,lu ... %,lu ]\n", rwd->ref_name, rwd->ref_start, rwd->ref_end );
+}
+
+static rc_t CC pileup_test_exit_ref_window( ref_walker_data * rwd )
+{
+    return KOutMsg( "   exit window >%s< [ %,lu ... %,lu ]\n", rwd->ref_name, rwd->ref_start, rwd->ref_end );
+}
+
+static rc_t CC pileup_test_enter_ref_pos( ref_walker_data * rwd )
+{
+    return KOutMsg( "   enter pos [ %,lu ], d=%u\n", rwd->pos, rwd->depth );
+}
+
+static rc_t CC pileup_test_exit_ref_pos( ref_walker_data * rwd )
+{
+    return KOutMsg( "   exit pos [ %,lu ], d=%u\n", rwd->pos, rwd->depth );
+}
+
+static rc_t CC pileup_test_enter_spot_group( ref_walker_data * rwd )
+{
+    return KOutMsg( "       enter spot-group [ %,lu ], %.*s\n", rwd->pos, rwd->spot_group_len, rwd->spot_group );
+}
+
+static rc_t CC pileup_test_exit_spot_group( ref_walker_data * rwd )
+{
+    return KOutMsg( "       exit spot-group [ %,lu ], %.*s\n", rwd->pos, rwd->spot_group_len, rwd->spot_group );
+}
+
+static rc_t CC pileup_test_alignment( ref_walker_data * rwd )
+{
+    rc_t rc = KOutMsg( "          alignment\t" );
+    if ( rc == 0 )
+    {
+        if ( !rwd->valid )
+        {
+            KOutMsg( "invalid" );
+        }
+        else
+        {
+            KOutMsg( "%s%s", rwd->reverse ? "<" : ">", rwd->match ? "." : "!" );
+        }
+    }
+    KOutMsg( "\n" );
+    return rc;
+}
+
+static rc_t pileup_test( Args * args, pileup_options *options )
+{
+    struct ref_walker * walker;
+    rc_t rc = ref_walker_create( &walker );
+    if ( rc == 0 )
+    {
+        uint32_t idx, count;
+        rc = ArgsParamCount( args, &count );
+        for ( idx = 0; idx < count && rc == 0; ++idx )
+        {
+            const char * src = NULL;
+            rc = ArgsParamValue( args, idx, (const void **)&src );
+            if ( rc == 0 && src != NULL )
+                rc = ref_walker_add_source( walker, src );
+        }
+
+        if ( rc == 0 )
+        {
+            rc = ArgsOptionCount( args, OPTION_REF, &count );
+            for ( idx = 0; idx < count && rc == 0; ++idx )
+            {
+                const char * s = NULL;
+                rc = ArgsOptionValue( args, OPTION_REF, idx, (const void **)&s );
+                if ( rc == 0 && s != NULL )
+                    rc = ref_walker_parse_and_add_range( walker, s );
+            }
+        }
+
+        if ( rc == 0 )
+        {
+            ref_walker_callbacks callbacks = 
+                {   pileup_test_enter_ref,
+                    pileup_test_exit_ref,
+                    pileup_test_enter_ref_window,
+                    pileup_test_exit_ref_window,
+                    pileup_test_enter_ref_pos,
+                    pileup_test_exit_ref_pos,
+                    pileup_test_enter_spot_group,
+                    pileup_test_exit_spot_group,
+                    pileup_test_alignment };
+            rc = ref_walker_set_callbacks( walker, &callbacks );
+        }
+
+        if ( rc == 0 )
+            rc = ref_walker_walk( walker, NULL );
+
+        ref_walker_destroy( walker );
+    }
+    return rc;
+}
+*/
+
+
+/* =========================================================================================== */
+
+
+typedef struct pileup_v2_ctx
+{
+    struct dyn_string * bases;
+    struct dyn_string * qual;
+    bool print_qual;
+    bool div_by_spotgrp;
+    bool debug;
+} pileup_v2_ctx;
+
+
+static rc_t CC pileup_v2_enter_ref_pos( ref_walker_data * rwd )
+{
+    pileup_v2_ctx * ctx = rwd->data;
+    /* make shure that bases/qual have the necessary length ( depth * 2 ) */
+    uint32_t l = ( rwd->depth * 2 );
+    rc_t rc = expand_dyn_string( ctx->bases, l );
+    if ( rc == 0 )
+        reset_dyn_string( ctx->bases );
+    if ( rc == 0 && ctx->print_qual )
+    {
+        rc = expand_dyn_string( ctx->qual, l );
+        if ( rc == 0 )
+            reset_dyn_string( ctx->qual );
+    }
+    return rc;
+}
+
+
+static rc_t CC pileup_v2_exit_ref_pos( ref_walker_data * rwd )
+{
+    pileup_v2_ctx * ctx = rwd->data;
+    rc_t rc = KOutMsg( "%s\t%u\t%c\t%u\t", rwd->ref_name, rwd->pos + 1, rwd->ascii_ref_base, rwd->depth );
+    if ( rc == 0 )
+        rc = print_dyn_string( ctx->bases );
+    if ( rc == 0 && ctx->print_qual )
+    {
+        rc = KOutMsg( "\t" );
+        if ( rc == 0 )
+            rc = print_dyn_string( ctx->qual );
+    }
+    if ( rc == 0 )
+        rc = KOutMsg( "\n" );
+    return rc;
+}
+
+
+static rc_t CC pileup_v2_enter_spot_group( ref_walker_data * rwd )
+{
+    rc_t rc = 0;
+    pileup_v2_ctx * ctx = rwd->data;
+    if ( ctx->div_by_spotgrp )
+    {
+        if ( dyn_string_len( ctx->bases ) > 0 )
+            rc = add_char_2_dyn_string( ctx->bases, '\t' );
+        if ( rc == 0 && ctx->print_qual && dyn_string_len( ctx->qual ) > 0 )
+            rc = add_char_2_dyn_string( ctx->qual, '\t' );
+    }
+    return rc;
+}
+
+
+static rc_t CC pileup_v2_alignment( ref_walker_data * rwd )
+{
+    rc_t rc = 0;
+    pileup_v2_ctx * ctx = rwd->data;
+
+    if ( !rwd->valid )
+    {
+        rc = add_char_2_dyn_string( ctx->bases, '?' );
+        if ( rc == 0 && ctx->print_qual )
+            rc = add_char_2_dyn_string( ctx->qual, '?' );
+    }
+    else
+    {
+        if ( rwd->first )
+        {
+            char s[ 3 ];
+            int32_t c = rwd->mapq + 33;
+            if ( c > '~' ) { c = '~'; }
+            if ( c < 33 ) { c = 33; }
+            s[ 0 ] = '^';
+            s[ 1 ] = c;
+            s[ 2 ] = 0;
+            rc = add_string_2_dyn_string( ctx->bases, s );
+        }
+
+
+        if ( rc == 0 )
+        {
+            if ( rwd->skip )
+            {
+                if ( rwd->reverse )
+                    rc = add_char_2_dyn_string( ctx->bases, '<' );
+                else
+                    rc = add_char_2_dyn_string( ctx->bases, '>' );
+            }
+            else
+            {
+                if ( rwd->match )
+                    rc = add_char_2_dyn_string( ctx->bases, ( rwd->reverse ? ',' : '.' ) );
+                else
+                    rc = add_char_2_dyn_string( ctx->bases, rwd->ascii_alignment_base );
+            }
+        }
+
+        if ( rc == 0 && rwd->ins )
+        {
+            uint32_t i, n = rwd->ins_bases_count;
+            
+            rc = print_2_dyn_string( ctx->bases, "+%u", rwd->ins_bases_count );
+            for ( i = 0; i < n && rc == 0; ++i )
+                rc = add_char_2_dyn_string( ctx->bases, _4na_to_ascii( rwd->ins_bases[ i ], rwd->reverse ) );
+        }
+
+        if ( rc == 0 && rwd->del && rwd->del_bases_count > 0 && rwd->del_bases != NULL )
+        {
+            uint32_t i, n = rwd->del_bases_count;
+            rc = print_2_dyn_string( ctx->bases, "-%u", n );
+            for ( i = 0; i < n && rc == 0; ++i )
+                rc = add_char_2_dyn_string( ctx->bases, _4na_to_ascii( rwd->del_bases[ i ], rwd->reverse ) );
+        }
+
+        if ( rc == 0 && rwd->last )
+            rc = add_char_2_dyn_string( ctx->bases, '$' );
+
+        if ( rc == 0 && ctx->print_qual )
+        {
+            rc = add_char_2_dyn_string( ctx->qual, rwd->quality );
+        }
+    }
+
+    return rc;
+}
+
+
+rc_t pileup_v2( Args * args, pileup_options *options )
+{
+    struct ref_walker * walker;
+
+    /* create walker */
+    rc_t rc = ref_walker_create( &walker );
+    if ( rc == 0 )
+    {
+        uint32_t idx, count;
+
+        /* add sources to walker */
+        rc = ArgsParamCount( args, &count );
+        for ( idx = 0; idx < count && rc == 0; ++idx )
+        {
+            const char * src = NULL;
+            rc = ArgsParamValue( args, idx, (const void **)&src );
+            if ( rc == 0 && src != NULL )
+                rc = ref_walker_add_source( walker, src );
+        }
+
+        /* add ranges to walker */
+        if ( rc == 0 )
+        {
+            rc = ArgsOptionCount( args, OPTION_REF, &count );
+            for ( idx = 0; idx < count && rc == 0; ++idx )
+            {
+                const char * s = NULL;
+                rc = ArgsOptionValue( args, OPTION_REF, idx, (const void **)&s );
+                if ( rc == 0 && s != NULL )
+                    rc = ref_walker_parse_and_add_range( walker, s );
+            }
+        }
+
+        /* set callbacks for walker */
+        if ( rc == 0 )
+        {
+            ref_walker_callbacks callbacks = 
+                {   NULL,
+                    NULL,
+                    NULL,
+                    NULL,
+                    pileup_v2_enter_ref_pos,
+                    pileup_v2_exit_ref_pos,
+                    pileup_v2_enter_spot_group,
+                    NULL,
+                    pileup_v2_alignment };
+            rc = ref_walker_set_callbacks( walker, &callbacks );
+        }
+
+        /* translate the commandline options into walker 'INTERESTS' */
+        if ( rc == 0 )
+        {
+            uint32_t interest = RW_INTEREST_INDEL | RW_INTEREST_BASE;
+
+            if ( options->process_dups ) interest |= RW_INTEREST_DUPS;
+            if ( !options->omit_qualities ) interest |= RW_INTEREST_QUAL;
+            if ( !options->no_skip ) interest |= RW_INTEREST_SKIP;
+            if ( options->show_id ) interest |= RW_INTEREST_DEBUG;
+            if ( options->use_seq_name ) interest |= RW_INTEREST_SEQNAME;
+            if ( options->cmn.tab_select & primary_ats ) interest |= RW_INTEREST_PRIM;
+            if ( options->cmn.tab_select & secondary_ats ) interest |= RW_INTEREST_SEC;
+            if ( options->cmn.tab_select & evidence_ats ) interest |= RW_INTEREST_EV;
+
+            rc = ref_walker_set_interest( walker, interest );
+            if ( rc == 0 )
+                rc = ref_walker_set_min_mapq( walker, options->minmapq );
+        }
+
+        /* let the walker call the callbacks while iterating over the sources/ranges */
+        if ( rc == 0 )
+        {
+            pileup_v2_ctx ctx;
+            memset( &ctx, 0, sizeof ctx );
+            rc = allocated_dyn_string ( &ctx.bases, 1000 );
+            if ( rc == 0 )
+            {
+                rc = allocated_dyn_string ( &ctx.qual, 1000 );
+                if ( rc == 0 )
+                {
+                    ctx.print_qual = !options->omit_qualities;
+                    ctx.div_by_spotgrp = options->div_by_spotgrp;
+                    ctx.debug = options->show_id;
+
+                    /***********************************/
+                    rc = ref_walker_walk( walker, &ctx );
+                    /***********************************/
+
+                    free_dyn_string ( ctx.qual );
+                }
+                free_dyn_string ( ctx.bases );
+            }
+        }
+
+        /* destroy the walker */
+        ref_walker_destroy( walker );
+    }
+    return rc;
+}
diff --git a/tools/sra-pileup/pileup_v2.h b/tools/sra-pileup/pileup_v2.h
new file mode 100644
index 0000000..7b1313c
--- /dev/null
+++ b/tools/sra-pileup/pileup_v2.h
@@ -0,0 +1,40 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_pileup_v2_
+#define _h_pileup_v2_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+rc_t pileup_v2( Args * args, pileup_options *options );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_pileup_v2_ */
diff --git a/tools/sra-pileup/pileup_varcount.c b/tools/sra-pileup/pileup_varcount.c
new file mode 100644
index 0000000..d5834cf
--- /dev/null
+++ b/tools/sra-pileup/pileup_varcount.c
@@ -0,0 +1,139 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/out.h>
+
+#include "ref_walker_0.h"
+#include "4na_ascii.h"
+
+typedef struct var_counters
+{
+    uint32_t coverage;
+    uint32_t base_counts[ 4 ];      /* 0...A, 1...C, 2...G, 3...T */
+    uint32_t deletes;
+    uint32_t inserts;
+    uint32_t insert_after[ 4 ];     /* 0...A, 1...C, 2...G, 3...T */
+} var_counters;
+
+
+static rc_t CC walk_varcount_enter_ref_pos( walk_data * data )
+{
+    var_counters * vc = data->data;
+    memset( vc, 0, sizeof *vc );
+    return 0;
+}
+
+
+static rc_t CC walk_varcount_exit_ref_pos( walk_data * data )
+{
+    if ( data->depth == 0 )
+        return 0;
+    else
+    {
+        var_counters * vc = data->data;
+        char ref_base = _4na_to_ascii( data->ref_base, false );
+
+/*
+        A ... ref-name
+        B ... ref-pos
+        C ... ref-base
+        D ... coverage
+
+        E ... A ( if mismatch )
+        F ... C ( if mismatch )
+        G ... G ( if mismatch )
+        H ... T ( if mismatch )
+
+        I ... total deletes
+        J ... total inserts
+
+        K ... inserts after A
+        L ... inserts after C
+        M ... inserts after G
+        N ... inserts after T
+
+                          A   B   C   D   E   F   G   H   I   J   K   L   M   N
+*/                         
+        return KOutMsg( "%s\t%u\t%c\t%u\t%u\t%u\t%u\t%u\t%u\t%u\t%u\t%u\t%u\t%u\n", 
+                     data->ref_name, data->ref_pos + 1, ref_base, data->depth,
+
+                     vc->base_counts[ 0 ], vc->base_counts[ 1 ], vc->base_counts[ 2 ], vc->base_counts[ 3 ],
+                     vc->deletes, vc->inserts,
+                     vc->insert_after[ 0 ], vc->insert_after[ 1 ], vc->insert_after[ 2 ], vc->insert_after[ 3 ] );
+    }
+}
+
+
+static rc_t CC walk_varcount_placement( walk_data * data )
+{
+    int32_t state = data->state;
+    if ( ( state & align_iter_invalid ) != align_iter_invalid )
+    {
+        var_counters * vc = data->data;
+        uint32_t idx = _4na_to_index( state );
+
+        if ( ( state & align_iter_skip ) == align_iter_skip )
+            ( vc->deletes ) ++;
+        else if ( ( state & align_iter_match ) != align_iter_match )
+            vc->base_counts[ idx ] ++;
+
+        if ( ( state & align_iter_insert ) == align_iter_insert )
+        {
+            ( vc->inserts )++;
+            vc->insert_after[ idx ] ++;
+        }
+    }
+    return 0;
+}
+
+
+rc_t walk_varcount( ReferenceIterator *ref_iter, pileup_options * options )
+{
+    walk_data data;
+    walk_funcs funcs;
+
+    var_counters v_counters;
+
+    data.ref_iter = ref_iter;
+    data.options = options;
+    data.data = &v_counters;
+
+    funcs.on_enter_ref = NULL;
+    funcs.on_exit_ref = NULL;
+
+    funcs.on_enter_ref_window = NULL;
+    funcs.on_exit_ref_window = NULL;
+
+    funcs.on_enter_ref_pos = walk_varcount_enter_ref_pos;
+    funcs.on_exit_ref_pos = walk_varcount_exit_ref_pos;
+
+    funcs.on_enter_spotgroup = NULL;
+    funcs.on_exit_spotgroup = NULL;
+
+    funcs.on_placement = walk_varcount_placement;
+
+    return walk_0( &data, &funcs );
+}
diff --git a/tools/sra-pileup/pileup_varcount.h b/tools/sra-pileup/pileup_varcount.h
new file mode 100644
index 0000000..a89ca9a
--- /dev/null
+++ b/tools/sra-pileup/pileup_varcount.h
@@ -0,0 +1,40 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_pileup_varcount_
+#define _h_pileup_varcount_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+rc_t walk_varcount( ReferenceIterator *ref_iter, pileup_options * options );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_pileup_varcount_ */
diff --git a/tools/sra-pileup/read_fkt.c b/tools/sra-pileup/read_fkt.c
new file mode 100644
index 0000000..4f2ae53
--- /dev/null
+++ b/tools/sra-pileup/read_fkt.c
@@ -0,0 +1,718 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "read_fkt.h"
+#include <sysalloc.h>
+
+/* ------------------------------------------------------------------------------------------------------------------- */
+
+rc_t read_bool( int64_t row_id, const VCursor * cursor, uint32_t idx, bool *res, bool dflt, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) bool",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        const bool * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) bool failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            *res = ( row_len > 0 ) ? *value : dflt;
+        }
+    }
+    return rc;
+}
+
+
+rc_t read_bool_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const bool **res, uint32_t *res_len, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) bool ptr",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        bool * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            if ( row_len > 0 )
+                *res = value;
+            if ( res_len != NULL )
+                *res_len = row_len;
+        }
+    }
+    return rc;
+}
+
+
+/* ------------------------------------------------------------------------------------------------------------------- */
+
+
+rc_t read_uint8( int64_t row_id, const VCursor * cursor, uint32_t idx, uint8_t *res, uint8_t dflt, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) uint8",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        const uint8_t * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) char_ptr failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            *res = ( row_len > 0 ) ? *value : dflt;
+        }
+    }
+    return rc;
+}
+
+
+rc_t read_uint8_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const uint8_t **res, uint32_t *len, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) uint8 ptr",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        const uint8_t * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) char_ptr failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            if ( row_len > 0 )
+                *res = value;
+            if ( len != NULL )
+                *len = row_len;
+        }
+    }
+    return rc;
+}
+
+
+/* ------------------------------------------------------------------------------------------------------------------- */
+
+
+rc_t read_uint32( int64_t row_id, const VCursor * cursor, uint32_t idx, uint32_t *res, uint32_t dflt, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) uint32",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        uint32_t * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) uint32_t failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            *res = ( row_len > 0 ) ? *value : dflt;
+        }
+    }
+    return rc;
+}
+
+
+rc_t read_uint32_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const uint32_t **res, uint32_t *len, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) uint32 ptr",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        uint32_t * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) uint32_t (ptr) failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            if ( row_len > 0 )
+                *res = value;
+            if ( len != NULL )
+                *len = row_len;
+        }
+    }
+    return rc;
+}
+
+
+/* ------------------------------------------------------------------------------------------------------------------- */
+
+
+rc_t read_int32( int64_t row_id, const VCursor * cursor, uint32_t idx, int32_t *res, int32_t dflt, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) int32",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        int32_t * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) uint32_t failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            *res = ( row_len > 0 ) ? *value : dflt;
+        }
+    }
+    return rc;
+}
+
+
+rc_t read_int32_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const int32_t **res, uint32_t *len, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) int32 ptr",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        int32_t * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) uint32_t (ptr) failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            if ( row_len > 0 )
+                *res = value;
+            if ( len != NULL )
+                *len = row_len;
+        }
+    }
+    return rc;
+}
+
+
+/* ------------------------------------------------------------------------------------------------------------------- */
+
+
+rc_t read_int64( int64_t row_id, const VCursor * cursor, uint32_t idx, int64_t *res, int64_t dflt, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) int64",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        const int64_t *value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) int64 failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            *res = ( row_len > 0 ) ? *value : dflt;
+        }
+    }
+    return rc;
+}
+
+
+rc_t read_int64_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const int64_t **res, uint32_t *len, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) int64 ptr",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        int64_t * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) uint64_t (ptr) failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            if ( row_len > 0 )
+                *res = value;
+            if ( len != NULL )
+                *len = row_len;
+        }
+    }
+    return rc;
+}
+
+
+/* ------------------------------------------------------------------------------------------------------------------- */
+
+
+rc_t read_char_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const char **res, uint32_t *len, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) char ptr",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        const char * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) char_ptr failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            if ( row_len > 0 )
+                *res = value;
+            if ( len != NULL )
+                *len = row_len;
+        }
+    }
+    return rc;
+}
+
+
+/* ------------------------------------------------------------------------------------------------------------------- */
+
+
+rc_t read_INSDC_coord_zero( int64_t row_id, const VCursor * cursor, uint32_t idx, INSDC_coord_zero *res, INSDC_coord_zero dflt, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) INSDC_coord_zero",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        INSDC_coord_zero * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) INSDC_coord_zero failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            *res = ( row_len > 0 ) ? *value : dflt;
+        }
+    }
+    return rc;
+}
+
+
+rc_t read_INSDC_coord_zero_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const INSDC_coord_zero **res, uint32_t *len, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) INSDC_coord_zero (ptr)",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        const INSDC_coord_zero * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) INSDC_coord_zero (ptr) failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            if ( row_len > 0 )
+                *res = value;
+            if ( len != NULL )
+                *len = row_len;
+        }
+    }
+    return rc;
+}
+
+
+/* ------------------------------------------------------------------------------------------------------------------- */
+
+
+rc_t read_INSDC_coord_one( int64_t row_id, const VCursor * cursor, uint32_t idx, INSDC_coord_one *res, INSDC_coord_one dflt, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) INSDC_coord_one",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        INSDC_coord_one * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) INSDC_coord_one failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            *res = ( row_len > 0 ) ? *value : dflt;
+        }
+    }
+    return rc;
+}
+
+
+rc_t read_INSDC_coord_one_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, INSDC_coord_one **res, uint32_t *len, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) INSDC_coord_one (ptr)",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        INSDC_coord_one * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) INSDC_coord_one (ptr) failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            if ( row_len > 0 )
+                *res = value;
+            if ( len != NULL )
+                *len = row_len;
+        }
+    }
+    return rc;
+}
+
+
+
+/* ------------------------------------------------------------------------------------------------------------------- */
+
+
+rc_t read_INSDC_coord_len( int64_t row_id, const VCursor * cursor, uint32_t idx, INSDC_coord_len *res, INSDC_coord_len dflt, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) INSDC_coord_len", 
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        INSDC_coord_len * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) INSDC_coord_len failed", 
+                "tr=%li,ti=%u,hi=$u", row_id, idx, hint ) );
+        }
+        else
+        {
+            *res = ( row_len > 0 ) ? *value : dflt;
+        }
+    }
+    return rc;
+}
+
+
+rc_t read_INSDC_coord_len_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const INSDC_coord_len **res, uint32_t *len, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) INSDC_coord_len (ptr)", 
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        const INSDC_coord_len * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) INSDC_coord_len (ptr) failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            if ( row_len > 0 )
+                *res = value;
+            if ( len != NULL )
+                *len = row_len;
+        }
+    }
+    return rc;
+}
+
+
+/* ------------------------------------------------------------------------------------------------------------------- */
+
+
+rc_t read_INSDC_read_type_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const INSDC_read_type **res, uint32_t *len, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) INSDC_read_type (ptr)", 
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        const INSDC_read_type * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) INSDC_read_type (ptr) failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            if ( row_len > 0 )
+                *res = value;
+            if ( len != NULL )
+                *len = row_len;
+        }
+    }
+    return rc;
+}
+
+
+rc_t read_INSDC_read_filter_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const INSDC_read_filter **res, uint32_t *len, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) INSDC_read_filter (ptr)",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        const INSDC_read_filter * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) INSDC_read_filter (ptr) failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            if ( row_len > 0 )
+                *res = value;
+            if ( len != NULL )
+                *len = row_len;
+        }
+    }
+    return rc;
+}
+
+
+rc_t read_INSDC_dna_text_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const INSDC_dna_text **res, uint32_t *len, const char * hint )
+{
+    rc_t rc;
+    if ( idx == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcItem, rcInvalid );    
+        (void)PLOGERR( klogInt, ( klogInt, rc, "column idx invalid at row#$(tr) . $(hi) ) INSDC_dna_text (ptr)",
+            "tr=%li,hi=%s", row_id, hint ) );
+    }
+    else
+    {
+        const INSDC_dna_text * value;
+        uint32_t elem_bits, boff, row_len;
+        rc = VCursorCellDataDirect( cursor, row_id, idx, &elem_bits, (const void**)&value, &boff, &row_len );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorCellDataDirect( row#$(tr) . idx#$(ti) . $(hi) ) INSDC_dna_text (ptr) failed", 
+                "tr=%li,ti=%u,hi=%s", row_id, idx, hint ) );
+        }
+        else
+        {
+            if ( row_len > 0 )
+                *res = value;
+            if ( len != NULL )
+                *len = row_len;
+        }
+    }
+    return rc;
+}
+
+
+/* ------------------------------------------------------------------------------------------------------------------- */
+
+bool namelist_contains( const KNamelist *names, const char * a_name )
+{
+    bool res = false;
+    uint32_t count;
+    rc_t rc = KNamelistCount( names, &count );
+    if ( rc == 0 && count > 0 )
+    {
+        uint32_t idx;
+        size_t a_name_len = string_size( a_name );
+        for ( idx = 0; idx < count && rc == 0 && !res; ++idx )
+        {
+            const char * s;
+            rc = KNamelistGet( names, idx, &s );
+            if ( rc == 0 && s != NULL )
+            {
+                size_t s_len = string_size( s );
+                size_t max_len = a_name_len > s_len ? a_name_len : s_len;
+                int cmp = string_cmp( a_name, a_name_len, s, s_len, max_len );
+                if ( cmp == 0 )
+                    res = true;
+            }
+        }
+    }
+    return res;
+}
+
+
+rc_t add_column( const VCursor * cursor, const char *colname, uint32_t * idx )
+{
+    rc_t rc = VCursorAddColumn( cursor, idx, "%s", colname );
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorAddColumn( $(cn) ) failed", "cn=%s", colname ) );
+    }
+    return rc;
+}
+
+
+static const char * col_name_without_type( const char * colname )
+{
+    const char * res = colname;
+    const char * s = string_chr( colname, string_size( colname ), ')' );
+    if ( s != NULL )
+        res = ++s;
+    return res;
+}
+
+void add_opt_column( const VCursor * cursor, const KNamelist *names, const char *colname, uint32_t * idx )
+{
+    bool available = namelist_contains( names, col_name_without_type( colname ) );
+    if ( available )
+    {
+        rc_t rc = VCursorAddColumn( cursor, idx, "%s", colname );
+        if ( rc != 0 )
+            *idx = COL_NOT_AVAILABLE;
+    }
+    else
+    {
+        *idx = COL_NOT_AVAILABLE;
+    }
+}
diff --git a/tools/sra-pileup/read_fkt.h b/tools/sra-pileup/read_fkt.h
new file mode 100644
index 0000000..6ba6fa8
--- /dev/null
+++ b/tools/sra-pileup/read_fkt.h
@@ -0,0 +1,82 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_read_fkt_
+#define _h_read_fkt_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include <klib/vector.h>
+#include <klib/out.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include <vdb/cursor.h>
+#include <insdc/sra.h>
+
+#define COL_NOT_AVAILABLE 0xFFFFFFFF
+#define INVALID_COLUMN 0xFFFFFFFF
+
+rc_t read_bool( int64_t row_id, const VCursor * cursor, uint32_t idx, bool *res, bool dflt, const char * hint );
+rc_t read_bool_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const bool **res, uint32_t *res_len, const char * hint );
+
+rc_t read_uint8( int64_t row_id, const VCursor * cursor, uint32_t idx, uint8_t *res, uint8_t dflt, const char * hint );
+rc_t read_uint8_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const uint8_t **res, uint32_t *len, const char * hint );
+
+rc_t read_uint32( int64_t row_id, const VCursor * cursor, uint32_t idx, uint32_t *res, uint32_t dflt, const char * hint );
+rc_t read_uint32_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const uint32_t **res, uint32_t *len, const char * hint );
+
+rc_t read_int32( int64_t row_id, const VCursor * cursor, uint32_t idx, int32_t *res, int32_t dflt, const char * hint );
+rc_t read_int32_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const int32_t **res, uint32_t *len, const char * hint );
+
+rc_t read_int64( int64_t row_id, const VCursor * cursor, uint32_t idx, int64_t *res, int64_t dflt, const char * hint );
+rc_t read_int64_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const int64_t **res, uint32_t *len, const char * hint );
+
+rc_t read_char_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const char **res, uint32_t *len, const char * hint );
+
+rc_t read_INSDC_coord_zero( int64_t row_id, const VCursor * cursor, uint32_t idx, INSDC_coord_zero *res, INSDC_coord_zero dflt, const char * hint );
+rc_t read_INSDC_coord_zero_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const INSDC_coord_zero **res, uint32_t *len, const char * hint );
+
+rc_t read_INSDC_coord_one( int64_t row_id, const VCursor * cursor, uint32_t idx, INSDC_coord_one *res, INSDC_coord_one dflt, const char * hint );
+rc_t read_INSDC_coord_one_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, INSDC_coord_one **res, uint32_t *len, const char * hint );
+
+rc_t read_INSDC_coord_len( int64_t row_id, const VCursor * cursor, uint32_t idx, INSDC_coord_len *res, INSDC_coord_len dflt, const char * hint );
+rc_t read_INSDC_coord_len_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const INSDC_coord_len **res, uint32_t *len, const char * hint );
+
+rc_t read_INSDC_read_type_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const INSDC_read_type **res, uint32_t *len, const char * hint );
+rc_t read_INSDC_read_filter_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const INSDC_read_filter **res, uint32_t *len, const char * hint );
+rc_t read_INSDC_dna_text_ptr( int64_t row_id, const VCursor * cursor, uint32_t idx, const INSDC_dna_text **res, uint32_t *len, const char * hint );
+
+bool namelist_contains( const KNamelist * names, const char * a_name );
+rc_t add_column( const VCursor * cursor, const char *colname, uint32_t * idx );
+void add_opt_column( const VCursor * cursor, const KNamelist *names, const char *colname, uint32_t * idx );
+
+#endif
diff --git a/tools/sra-pileup/ref_regions.c b/tools/sra-pileup/ref_regions.c
new file mode 100644
index 0000000..c628927
--- /dev/null
+++ b/tools/sra-pileup/ref_regions.c
@@ -0,0 +1,825 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include "ref_regions.h"
+
+#include <klib/rc.h>
+#include <klib/out.h>
+#include <klib/text.h>
+#include <klib/vector.h>
+#include <klib/container.h>
+
+#include <stdlib.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+#include <strtol.h>
+
+/* =========================================================================================== */
+
+
+static int cmp_pchar( const char * a, const char * b )
+{
+    int res = 0;
+    if ( ( a != NULL )&&( b != NULL ) )
+    {
+        size_t len_a = string_size( a );
+        size_t len_b = string_size( b );
+        res = string_cmp ( a, len_a, b, len_b, ( len_a < len_b ) ? len_b : len_a );
+    }
+    return res;
+}
+
+
+struct skip_range
+{
+    uint64_t start;
+    uint64_t end;
+} skip_range;
+
+
+static struct skip_range * make_skip_range( const uint64_t start, const uint64_t end )
+{
+    struct skip_range *res = calloc( 1, sizeof *res );
+    if ( res != NULL )
+    {
+        res->start = start;
+        res->end = end;
+    }
+    return res;
+}
+
+
+/* =========================================================================================== */
+
+struct reference_range
+{
+    uint64_t start;
+    uint64_t end;
+    Vector skip;
+} reference_range;
+
+
+static struct reference_range * make_range( const uint64_t start, const uint64_t end )
+{
+    struct reference_range *res = calloc( 1, sizeof *res );
+    if ( res != NULL )
+    {
+        res->start = start;
+        res->end = end;
+        VectorInit ( &res->skip, 0, 5 );
+    }
+    return res;
+}
+
+
+static void CC release_skip( void * item, void * data ) { free( item ); }
+
+static void free_range( struct reference_range * self )
+{
+    VectorWhack ( &self->skip, release_skip, NULL );
+    free( self );
+}
+
+static int64_t cmp_range( const struct reference_range * a, const struct reference_range * b )
+{
+	if ( a != NULL && b != NULL )
+	{
+        if ( a->start < b->start )
+            return -1;
+        else if ( a->start > b->start )
+            return 1;
+        else if ( a->end < b->end )
+            return -1;
+        else if ( a->end > b->end )
+            return 1;
+        else
+            return 0;
+	}
+	return 1; /* question from ukrainch: so, cmp_range cannot be used for sorting? */
+}
+
+
+static bool range_overlapp( const struct reference_range * a, const struct reference_range * b )
+{
+	if ( a != NULL && b != NULL )
+	    return ( !( ( b->end < a->start ) || ( b->start > a->end ) ) );
+	return false;
+}
+
+
+static uint64_t range_distance( const struct reference_range * a, const struct reference_range * b )
+{
+	if ( a != NULL && b != NULL )
+		return ( b->start - a->end );
+	return 0;
+}
+
+/* =========================================================================================== */
+
+struct reference_region
+{
+    BSTNode node;
+    const char * name;
+    Vector ranges;
+} reference_region;
+
+
+static struct reference_region * make_reference_region( const char *name )
+{
+    struct reference_region *res = calloc( sizeof *res, 1 );
+    if ( res != NULL )
+    {
+        res->name = string_dup_measure ( name, NULL );
+        VectorInit ( &res->ranges, 0, 5 );
+    }
+    return res;
+}
+
+
+static int64_t CC cmp_range_wrapper( const void *item, const void *n )
+{   return cmp_range( item, n ); }
+
+
+static rc_t add_ref_region_range( struct reference_region * self, const uint64_t start, const uint64_t end )
+{
+    rc_t rc = 0;
+    struct reference_range *r = make_range( start, end );
+    if ( r == NULL )
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+    else
+    {
+        rc = VectorInsert ( &self->ranges, r, NULL, cmp_range_wrapper );
+        if ( rc != 0 )
+            free( r );
+    }
+    return rc;
+}
+
+
+#define RR_NAME  1
+#define RR_START 2
+#define RR_END   3
+
+
+static void put_c( char *s, size_t size, size_t *dst, char c )
+{
+    if ( *dst < ( size - 1 ) )
+        s[ *dst ] = c;
+    (*dst)++;
+}
+
+static void finish_txt( char *s, size_t size, size_t *dst )
+{
+    if ( *dst > size )
+        s[ size - 1 ] = 0;
+    else
+        s[ *dst ] = 0;
+    *dst = 0;
+}
+
+static uint64_t finish_num( char *s, size_t size, size_t *dst )
+{
+    uint64_t res = 0;
+    char *endp;
+    finish_txt( s, size, dst );
+    res = strtou64( s, &endp, 10 );
+    return res;
+}
+
+
+/* s = refname:1000-2000 */
+static void parse_definition( const char *s, char * name, size_t len,
+                              uint64_t *start, uint64_t *end )
+{
+    size_t n = string_size( s );
+
+    *start = 0;
+    *end   = 0;
+    name[ 0 ] = 0;
+    if ( n > 0 )
+    {
+        size_t i, st, dst = 0;
+        char tmp[ 4096 ];
+        st = RR_NAME;
+        for ( i = 0; i < n; ++i )
+        {
+            char c = s[ i ];
+            switch( st )
+            {
+                case RR_NAME  : if ( c == ':' )
+                                {
+                                    finish_txt( name, len, &dst );
+                                    st = RR_START;
+                                }
+                                else
+                                {
+                                    put_c( name, len, &dst, c );
+                                }
+                                break;
+
+                case RR_START : if ( c == '-' )
+                                {
+                                    *start = finish_num( tmp, sizeof tmp, &dst );
+                                    st = RR_END;
+                                }
+                                else if ( ( c >= '0' )&&( c <= '9' ) )
+                                {
+                                    put_c( tmp, sizeof tmp, &dst, c );
+                                }
+                                break;
+
+                case RR_END   : if ( ( c >= '0' )&&( c <= '9' ) )
+                                {
+                                    put_c( tmp, sizeof tmp, &dst, c );
+                                }
+                                break;
+            }
+        }
+        switch( st )
+        {
+            case RR_NAME  : finish_txt( name, len, &dst );
+                            break;
+
+            case RR_START : *start = finish_num( tmp, sizeof tmp, &dst );
+                            break;
+
+            case RR_END   : *end = finish_num( tmp, sizeof tmp, &dst );
+                            break;
+        }
+    }
+}
+
+
+static void CC release_ranges_wrapper( void * item, void * data ) { free_range( item ); }
+
+static void free_reference_region( struct reference_region * self )
+{
+    free( (void*)self->name );
+    VectorWhack ( &self->ranges, release_ranges_wrapper, NULL );
+    free( self );
+}
+
+
+static void merge_overlapping_ranges( struct reference_region * self )
+{
+    uint32_t n = VectorLength( &self->ranges );
+    uint32_t i = 0;
+    struct reference_range * a = NULL;
+    while ( i < n )
+    {
+        struct reference_range * b = VectorGet ( &self->ranges, i );
+        bool remove = false;
+        if ( a != NULL )
+        {
+            remove = range_overlapp( a, b );
+            if ( remove )
+            {
+                struct reference_range * r;
+                a->end = b->end;
+                VectorRemove ( &self->ranges, i, (void**)&r );
+                free( r );
+                n--;
+            }
+        }
+        if ( !remove )
+        {
+            a = b;
+            ++i;
+        }
+    }
+}
+
+
+static void merge_close_ranges_and_create_filter( struct reference_region * self, uint64_t merge_diff )
+{
+    uint32_t n = VectorLength( &self->ranges );
+    uint32_t i = 0;
+    struct reference_range * a = NULL;
+    while ( i < n )
+    {
+        struct reference_range * b = VectorGet ( &self->ranges, i );
+        bool remove = false;
+        if ( a != NULL )
+        {
+            /* get the distance between a and b */
+            uint64_t d = range_distance( a, b );
+            remove = ( d < merge_diff );
+            if ( remove )
+            {
+                struct reference_range * r;
+
+                /* add the gap to the skip-vector of a */
+                struct skip_range * sr = make_skip_range( a->end + 1, b->start - 1 );
+                VectorAppend ( &( a->skip ), NULL, sr );
+
+                /* expand a to merge with b */
+                a->end = b->end;
+
+                /* remove b */
+                VectorRemove ( &self->ranges, i, (void**)&r );
+                free( r );
+                n--;
+            }
+        }
+        if ( !remove )
+        {
+            a = b;
+            ++i;
+        }
+    }
+}
+
+
+/* =========================================================================================== */
+
+static int64_t CC reference_vs_pchar_wrapper( const void *item, const BSTNode *n )
+{
+    const struct reference_region * r = ( const struct reference_region * )n;
+    return cmp_pchar( (const char *)item, r->name );
+}
+
+static struct reference_region * find_reference_region( BSTree * regions, const char * name )
+{
+    return ( struct reference_region * ) BSTreeFind ( regions, name, reference_vs_pchar_wrapper );
+}
+
+static int64_t CC ref_vs_ref_wrapper( const BSTNode *item, const BSTNode *n )
+{
+   const struct reference_region * a = ( const struct reference_region * )item;
+   const struct reference_region * b = ( const struct reference_region * )n;
+   return cmp_pchar( a->name, b->name );
+}
+
+
+rc_t add_region( BSTree * regions, const char * name, const uint64_t start, const uint64_t end )
+{
+    rc_t rc;
+
+    struct reference_region * r = find_reference_region( regions, name );
+    if ( r == NULL )
+    {
+        r = make_reference_region( name );
+        if ( r == NULL )
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        else
+            rc = add_ref_region_range( r, start, end );
+        if ( rc == 0 )
+            rc = BSTreeInsert ( regions, (BSTNode *)r, ref_vs_ref_wrapper );
+        if ( rc != 0 )
+            free_reference_region( r );
+    }
+    else
+    {
+        rc = add_ref_region_range( r, start, end );
+    }
+    return rc;
+}
+
+
+rc_t parse_and_add_region( BSTree * regions, const char * s )
+{
+    uint64_t start, end;
+    char name[ 4096 ];
+    parse_definition( s, name, sizeof name, &start, &end );
+    if ( name[ 0 ] == 0 )
+        return RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+    else
+        return add_region( regions, name, start, end );
+}
+
+
+/* =========================================================================================== */
+
+
+static void CC slice_report_wrapper( BSTNode *n, void *data )
+{
+    const struct reference_region * r = ( const struct reference_region * )n;
+    uint32_t nr = VectorLength( &( r->ranges ) );
+
+    KOutMsg( "\n-[%s]:\n", r->name );
+    if ( nr == 0 )
+        KOutMsg( " no ranges!\n" );
+    else
+    {
+        uint32_t i, j;
+        for ( i = 0; i < nr; ++i )
+        {
+            const struct reference_range * rr = ( const struct reference_range * ) VectorGet ( &( r->ranges ), i );
+            uint32_t ns = VectorLength( &( rr->skip ) );
+            KOutMsg( "  %u ... %u\n", rr->start, rr->end );
+            for ( j = 0; j < ns; ++j )
+            {
+                const struct skip_range * sr = ( const struct skip_range * ) VectorGet ( &( rr->skip ), j );
+                KOutMsg( "  ___skip %u ... %u\n", sr->start, sr->end );
+            }
+        }
+    }
+}
+
+
+void slice_report( BSTree * regions )
+{
+    KOutMsg( "\n\nstart slice-report:\n" );
+    BSTreeForEach ( regions, false, slice_report_wrapper, NULL );
+    KOutMsg( "\nend slice-report\n\n" );
+}
+
+static void CC check_refrange_wrapper( BSTNode *n, void *data )
+{
+    struct reference_region * rr = ( struct reference_region * )n;
+    uint64_t * merge_diff = data;
+    merge_overlapping_ranges( rr );
+    if ( *merge_diff > 0 )
+        merge_close_ranges_and_create_filter( rr, *merge_diff );
+}
+
+
+void check_ref_regions( BSTree * regions, uint64_t merge_diff )
+{
+    BSTreeForEach ( regions, false, check_refrange_wrapper, &merge_diff );
+}
+
+
+/* =========================================================================================== */
+
+
+static void CC release_ref_region_wrapper( BSTNode *n, void * data )
+{
+    free_reference_region( ( struct reference_region * ) n );
+}
+
+
+void free_ref_regions( BSTree * regions )
+{    
+    BSTreeWhack ( regions, release_ref_region_wrapper, NULL );
+}
+
+
+/* =========================================================================================== */
+
+
+static void CC count_ref_region_wrapper( BSTNode *n, void *data )
+{   
+    struct reference_region * r = ( struct reference_region * ) n;
+    uint32_t * count = ( uint32_t * ) data;
+    *count += VectorLength( &(r->ranges) );
+}
+
+
+uint32_t count_ref_regions( BSTree * regions )
+{
+    uint32_t res = 0;
+    BSTreeForEach ( regions, false, count_ref_region_wrapper, &res );
+    return res;
+}
+
+
+/* =========================================================================================== */
+
+
+typedef struct foreach_ref_region_func
+{
+    rc_t ( CC * on_region ) ( const char * name, const struct reference_range * range, void *data );
+    void * data;
+    rc_t rc;
+} foreach_ref_region_func;
+
+
+static bool CC foreach_ref_region_wrapper( BSTNode *n, void *data )
+{   
+    struct reference_region * r = ( struct reference_region * ) n;
+    foreach_ref_region_func * func = ( foreach_ref_region_func * )data;
+
+    if ( func->rc == 0 )
+    {
+        uint32_t i, v_count = VectorLength( &( r->ranges ) );
+
+        for ( i = 0; i < v_count && func->rc == 0; ++i )
+        {
+            struct reference_range * rr = VectorGet ( &( r->ranges ), i );
+            func->rc = func->on_region( r->name, rr, func->data );    
+        }
+    }
+    return ( func->rc != 0 );
+}
+
+
+rc_t foreach_ref_region( BSTree * regions,
+    rc_t ( CC * on_region ) ( const char * name, const struct reference_range * range, void *data ), 
+    void *data )
+{
+    foreach_ref_region_func func;
+
+    func.on_region = on_region;
+    func.data = data;
+    func.rc = 0;
+    BSTreeDoUntil ( regions, false, foreach_ref_region_wrapper, &func );
+    return func.rc;
+}
+
+
+/* =========================================================================================== */
+
+
+const struct reference_region * get_first_ref_node( const BSTree * regions )
+{
+    return ( const struct reference_region * ) BSTreeFirst ( regions );
+}
+
+
+const struct reference_region * get_next_ref_node( const struct reference_region * node )
+{
+    return ( const struct reference_region * ) BSTNodeNext( ( const BSTNode * ) node );
+}
+    
+
+const char * get_ref_node_name( const struct reference_region * node )
+{
+    return ( node->name );
+}
+
+
+uint32_t get_ref_node_range_count( const struct reference_region * node )
+{
+    return VectorLength( &( node->ranges ) );
+}
+
+
+const struct reference_range * get_ref_range( const struct reference_region * node, uint32_t idx )
+{
+    const struct reference_range * res = NULL;
+    if ( node != NULL )
+    {
+        uint32_t n = VectorLength( &( node->ranges ) );
+        if ( ( idx >=0 ) && ( idx < n ) )
+        {
+            res = ( const struct reference_range * ) VectorGet ( &( node->ranges ), idx );
+        }
+    }
+    return res;
+}
+
+
+uint64_t get_ref_range_start( const struct reference_range * range )
+{
+    uint64_t res = 0;
+    if ( range != NULL )
+        res = range->start;
+    return res;
+}
+
+
+uint64_t get_ref_range_end( const struct reference_range * range )
+{
+    uint64_t res = 0;
+    if ( range != NULL )
+        res = range->end;
+    return res;
+}
+
+
+/* =========================================================================================== */
+
+
+struct skiplist_ref_node
+{
+    BSTNode node;
+    const char * name;
+    int32_t current_id;
+    const struct skip_range * current_skip_range;
+    Vector skip_ranges;     /* holds skip_range structs */
+} skiplist_ref_node;
+
+
+struct skiplist
+{
+    BSTree nodes;           /* a tree of skiplist_ref_node 's */
+    uint32_t node_count;
+    struct skiplist_ref_node * current;
+} skiplist;
+
+
+/* helper func to detect if the given reference_region has ranges to be skiped */
+static bool reference_region_has_skip_ranges( const struct reference_region * r )
+{
+    bool res = false;
+	if ( r != NULL )
+	{
+		uint32_t i, n = VectorLength( &r->ranges );
+		for ( i = 0; i < n && !res; ++i )
+		{
+			const struct reference_range * rr = VectorGet ( &( r->ranges ), i );
+			if ( rr != NULL )
+			{
+				if ( VectorLength( &rr->skip ) > 0 ) res = true;
+			}
+		}
+	}
+    return res;
+}
+
+
+/* helper to create a skiplist-node, walk the given the ref-region fo find and enter all skip positions */
+static struct skiplist_ref_node * make_skiplist_ref_node( const struct reference_region * r )
+{
+    struct skiplist_ref_node * res = calloc( 1, sizeof *res );
+    if ( res != NULL )
+    {
+        uint32_t i, n = VectorLength( &r->ranges );
+        res->name = string_dup_measure ( r->name, NULL );
+        VectorInit ( &res->skip_ranges, 0, 5 );
+        /* walk the ranges-Vector of the reference-region */
+        for ( i = 0; i < n; ++i )
+        {
+            const struct reference_range * rr = VectorGet ( &( r->ranges ), i );
+            /* walk the skip-Vector of the reference-range */
+            uint32_t j, n1 = VectorLength( &rr->skip );
+            for ( j = 0; j < n1; ++j )
+            {
+                const struct skip_range * sr = VectorGet ( &( rr->skip ), j );
+                if ( sr != NULL )
+                {
+                    struct skip_range * csr = make_skip_range( sr->start, sr->end );
+                    if ( csr != NULL )
+                        VectorAppend ( &( res->skip_ranges ), NULL, csr );
+                }
+            }
+        }
+        res->current_id = 0;
+        res->current_skip_range = VectorGet ( &( res->skip_ranges ), 0 );
+    }
+    return res;
+}
+
+
+/* helper call back for BSTreeInsert into skiplist->nodes */
+static int64_t CC srn_vs_srn_wrapper( const BSTNode *item, const BSTNode *n )
+{
+   const struct skiplist_ref_node * a = ( const struct skiplist_ref_node * )item;
+   const struct skiplist_ref_node * b = ( const struct skiplist_ref_node * )n;
+   return cmp_pchar( a->name, b->name );
+}
+
+
+/* call back for each reference-region to generate eventually a skiplist_ref_node */
+static void CC visit_region_node_for_skiplist( BSTNode *n, void *data )
+{
+    const struct reference_region * r = ( const struct reference_region * ) n;
+    struct skiplist * skl = ( struct skiplist * ) data;
+    if ( r != NULL && skl != NULL )
+    {
+        /* walk the reference-region, detect if we even have something to skip in here */
+        if ( reference_region_has_skip_ranges( r ) )
+        {
+            struct skiplist_ref_node * srn = make_skiplist_ref_node( r );
+            if ( srn != NULL )
+            {
+                BSTreeInsert ( &(skl->nodes), ( BSTNode * )srn, srn_vs_srn_wrapper );
+                skl->node_count++;
+            }
+        }
+    }
+}
+
+struct skiplist * skiplist_make( BSTree * regions )
+{
+    struct skiplist *res = calloc( 1, sizeof *res );
+    if ( res != NULL )
+    {
+        BSTreeInit( &(res->nodes) );
+        res->current = NULL;
+        res->node_count = 0;
+
+        /* walk the given regions-tree to generate the skip-list */
+        BSTreeForEach ( regions, false, visit_region_node_for_skiplist, res );
+        if ( res->node_count == 0 )
+        {
+            skiplist_release( res );
+            res = NULL;
+        }
+    }
+    return res;
+}
+
+
+static void CC release_skiplist_entry( BSTNode * n, void * data )
+{
+    struct skiplist_ref_node * node = ( struct skiplist_ref_node * )n;
+    if ( node->name != NULL ) free( ( void * ) node->name );
+    VectorWhack ( &node->skip_ranges, release_skip, NULL );     /* wrapper callback reused from above */
+    free( ( void * ) node );
+}
+
+
+void skiplist_release( struct skiplist * list )
+{
+    if ( list != NULL )
+    {
+        BSTreeWhack ( &(list->nodes), release_skiplist_entry, NULL );
+        free( ( void * ) list );
+    }
+}
+
+
+static int64_t CC pchar_vs_srn_cmp( const void * item, const BSTNode * n )
+{
+   const char * name = item;
+   const struct skiplist_ref_node * b = ( const struct skiplist_ref_node * )n;
+   return cmp_pchar( name, b->name );
+
+}
+
+
+void skiplist_enter_ref( struct skiplist * list, const char * name )
+{
+    if ( list != NULL )
+    {
+        if ( name == NULL )
+            list->current = NULL;
+        else
+        {
+            struct skiplist_ref_node * cur_node = ( struct skiplist_ref_node * )BSTreeFind ( &( list->nodes ), name, pchar_vs_srn_cmp );
+            list->current = cur_node;
+			if ( cur_node != NULL )
+			{
+				cur_node->current_id = 0;
+				cur_node->current_skip_range = VectorGet ( &( cur_node->skip_ranges ), 0 );
+			}
+        }
+    }
+}
+
+
+bool skiplist_is_skip_position( struct skiplist * list, uint64_t pos )
+{
+    if ( list != NULL )
+    {
+        struct skiplist_ref_node * cur_node = list->current;
+        if ( cur_node != NULL )
+        {
+            const struct skip_range * curr_skip_range = cur_node->current_skip_range;
+            if ( curr_skip_range != NULL )
+            {
+                if ( pos < curr_skip_range->start ) return false;
+                if ( pos <= curr_skip_range->end ) return true;
+                cur_node->current_id++;
+                cur_node->current_skip_range = VectorGet ( &( cur_node->skip_ranges ), cur_node->current_id );
+            }
+        }
+    }
+    return false;
+}
+
+
+static void CC skiplist_report_cb( BSTNode *n, void *data )
+{
+    const struct skiplist_ref_node * node = ( const struct skiplist_ref_node * )n;
+    uint32_t nr = VectorLength( &( node->skip_ranges ) );
+
+    KOutMsg( "\n-[%s]:\n", node->name );
+    if ( n == 0 )
+        KOutMsg( " no ranges!\n" );
+    else
+    {
+        uint32_t i;
+        for ( i = 0; i < nr; ++i )
+        {
+            const struct skip_range * sr = ( const struct skip_range * ) VectorGet ( &( node->skip_ranges ), i );
+            KOutMsg( "  %u ... %u\n", sr->start, sr->end );
+        }
+    }
+}
+
+
+void skiplist_report( const struct skiplist * list )
+{
+    if ( list != NULL )
+    {
+        KOutMsg( "\n\nstart skiplist-report:\n" );
+        BSTreeForEach ( &( list->nodes ), false, skiplist_report_cb, NULL );
+        KOutMsg( "\nend skiplist-report\n\n" );
+    }
+}
diff --git a/tools/sra-pileup/ref_regions.h b/tools/sra-pileup/ref_regions.h
new file mode 100644
index 0000000..178c3b2
--- /dev/null
+++ b/tools/sra-pileup/ref_regions.h
@@ -0,0 +1,71 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_ref_regions_
+#define _h_ref_regions_
+
+#include <klib/container.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct reference_range;
+struct reference_region;
+struct skiplist;
+
+rc_t parse_and_add_region( BSTree * regions, const char * s );
+rc_t add_region( BSTree * regions, const char * name, const uint64_t start, const uint64_t end );
+void check_ref_regions( BSTree * regions, uint64_t merge_diff );
+void free_ref_regions( BSTree * regions );
+uint32_t count_ref_regions( BSTree * regions );
+rc_t foreach_ref_region( BSTree * regions,
+    rc_t ( CC * on_region ) ( const char * name, const struct reference_range * range, void *data ), 
+    void *data );
+
+
+const struct reference_region * get_first_ref_node( const BSTree * regions );
+const struct reference_region * get_next_ref_node( const struct reference_region * node );
+const char * get_ref_node_name( const struct reference_region * node );
+uint32_t get_ref_node_range_count( const struct reference_region * node );
+
+
+const struct reference_range * get_ref_range( const struct reference_region * node, uint32_t idx );
+uint64_t get_ref_range_start( const struct reference_range * range );
+uint64_t get_ref_range_end( const struct reference_range * range );
+
+
+struct skiplist * skiplist_make( BSTree * regions );
+void skiplist_release( struct skiplist * list );
+void skiplist_enter_ref( struct skiplist * list, const char * name );
+bool skiplist_is_skip_position( struct skiplist * list, uint64_t pos );
+void skiplist_report( const struct skiplist * list );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_ref_regions_ */
diff --git a/tools/sra-pileup/ref_walker.c b/tools/sra-pileup/ref_walker.c
new file mode 100644
index 0000000..4723343
--- /dev/null
+++ b/tools/sra-pileup/ref_walker.c
@@ -0,0 +1,1028 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "ref_regions.h"
+#include "ref_walker.h"
+
+#include <klib/rc.h>
+#include <klib/namelist.h>
+#include <klib/vector.h>
+#include <klib/log.h>
+#include <klib/out.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+#include <vfs/manager.h>
+#include <vfs/path.h>
+
+#include <kdb/manager.h>
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+
+#include <align/manager.h>
+#include <align/reference.h>
+#include <align/iterator.h>
+
+#include <sra/sraschema.h>
+
+#include <stdlib.h>
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <string.h>
+
+
+
+/* ================================================================================================ */
+
+
+/***************************************
+    N (0x4E)  n (0x6E)  <--> 0x0
+    A (0x41)  a (0x61)  <--> 0x1
+    C (0x43)  c (0x63)  <--> 0x2
+    M (0x4D)  m (0x6D)  <--> 0x3
+    G (0x47)  g (0x67)  <--> 0x4
+    R (0x52)  r (0x72)  <--> 0x5
+    S (0x53)  s (0x73)  <--> 0x6
+    V (0x56)  v (0x76)  <--> 0x7
+    T (0x54)  t (0x74)  <--> 0x8
+    W (0x57)  w (0x77)  <--> 0x9
+    Y (0x59)  y (0x79)  <--> 0xA
+    H (0x48)  h (0x68)  <--> 0xB
+    K (0x4B)  k (0x6B)  <--> 0xC
+    D (0x44)  d (0x64)  <--> 0xD
+    B (0x42)  b (0x62)  <--> 0xE
+    N (0x4E)  n (0x6E)  <--> 0xF
+***************************************/
+
+
+static char _4na_2_ascii_tab[] =
+{
+/*  0x0  0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F */
+    'N', 'A', 'C', 'M', 'G', 'R', 'S', 'V', 'T', 'W', 'Y', 'H', 'K', 'D', 'B', 'N',
+    'n', 'a', 'c', 'm', 'g', 'r', 's', 'v', 't', 'w', 'y', 'h', 'k', 'd', 'b', 'n'
+};
+
+
+static char _4na_to_ascii( INSDC_4na_bin c, bool reverse )
+{
+    return _4na_2_ascii_tab[ ( c & 0x0F ) | ( reverse ? 0x10 : 0 ) ];
+}
+
+
+/* ================================================================================================ */
+
+
+struct ref_walker
+{
+    /* objects that stay alive during the livetime of the ref-walker */
+    KDirectory * dir;
+    const VDBManager * vmgr;
+    VSchema * vschema;
+    const AlignMgr * amgr;
+    VFSManager * vfs_mgr;
+    PlacementRecordExtendFuncs cb_block;
+    struct skiplist * skiplist;
+    
+    /* options for the Reference-Iterator */
+    int32_t min_mapq;
+    uint32_t interest;
+    uint64_t merge_diff;
+    bool prepared;
+    char * spot_group;
+
+    /* manages the sources and regions requested */
+    VNamelist * sources;
+    BSTree regions;
+
+    /* enter/exit reference */
+    rc_t ( CC * on_enter_ref ) ( ref_walker_data * rwd );
+    rc_t ( CC * on_exit_ref ) ( ref_walker_data * rwd );
+
+    /* enter/exit reference-window */
+    rc_t ( CC * on_enter_ref_window ) ( ref_walker_data * rwd );
+    rc_t ( CC * on_exit_ref_window ) ( ref_walker_data * rwd );
+
+    /* enter/exit reference-pos */
+    rc_t ( CC * on_enter_ref_pos ) ( ref_walker_data * rwd );
+    rc_t ( CC * on_exit_ref_pos ) ( ref_walker_data * rwd );
+
+    /* enter/exit spot-group */
+    rc_t ( CC * on_enter_spot_group ) ( ref_walker_data * rwd );
+    rc_t ( CC * on_exit_spot_group ) ( ref_walker_data * rwd );
+
+    /* alignment */
+    rc_t ( CC * on_alignment ) ( ref_walker_data * rwd );
+
+    /* callbacks for different events */
+} ref_walker;
+
+
+static void ref_walker_release( struct ref_walker * self )
+{
+    KDirectoryRelease( self->dir );
+    VDBManagerRelease( self->vmgr );
+    VSchemaRelease( self->vschema );
+    AlignMgrRelease ( self->amgr );
+    VFSManagerRelease ( self->vfs_mgr );
+    VNamelistRelease ( self->sources );
+    free_ref_regions( &self->regions );
+    free( ( void * )self->spot_group );
+    if ( self->skiplist != NULL ) skiplist_release( self->skiplist );
+}
+
+
+/* ================================================================================================ */
+/* data/callbacks used by Reference-iterator */
+
+
+typedef struct walker_col_ids
+{
+    uint32_t idx_quality;
+    uint32_t idx_ref_orientation;
+    uint32_t idx_read_filter;
+    uint32_t idx_template_len;
+} walker_col_ids;
+
+
+typedef struct walker_rec
+{
+    bool reverse;   /* orientation towards reference ( false...in ref-orientation / true...reverse) */
+    int32_t tlen;   /* template-len, for statistical analysis */
+    uint8_t * quality;  /* ptr to quality... ( for sam-output ) */
+} walker_rec;
+
+
+static rc_t read_base_and_len( struct VCursor const *curs,
+                               uint32_t column_idx,
+                               int64_t row_id,
+                               const void ** base,
+                               uint32_t * len )
+{
+    uint32_t elem_bits, boff, len_intern;
+    const void * ptr;
+    rc_t rc = VCursorCellDataDirect ( curs, row_id, column_idx, &elem_bits, &ptr, &boff, &len_intern );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "VCursorCellDataDirect() failed" );
+    }
+    else
+    {
+        if ( len != NULL ) *len = len_intern;
+        if ( base != NULL ) *base = ptr;
+    }
+    return rc;
+}
+
+
+static rc_t CC populate_data( void *obj, const PlacementRecord *placement,
+        struct VCursor const *curs, INSDC_coord_zero ref_window_start, INSDC_coord_len ref_window_len,
+        void *data, void * placement_ctx )
+{
+    walker_rec * rec = obj;
+    struct ref_walker * walker = data;
+    walker_col_ids * col_ids = placement_ctx;
+    rc_t rc = 0;
+
+    rec->quality = NULL;
+    if ( !( walker->interest & RW_INTEREST_DUPS ) )
+    {
+        const uint8_t * read_filter;
+        uint32_t read_filter_len;
+        rc = read_base_and_len( curs, col_ids->idx_read_filter, placement->id,
+                                (const void **)&read_filter, &read_filter_len );
+        if ( rc == 0 )
+        {
+            if ( ( *read_filter == SRA_READ_FILTER_REJECT )||
+                 ( *read_filter == SRA_READ_FILTER_CRITERIA ) )
+            {
+                rc = RC( rcAlign, rcType, rcAccessing, rcId, rcIgnored );
+            }
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        const bool * orientation;
+        rc = read_base_and_len( curs, col_ids->idx_ref_orientation, placement->id,
+                                (const void **)&orientation, NULL );
+        if ( rc == 0 )
+            rec->reverse = *orientation;
+    }
+
+    if ( rc == 0 && ( walker->interest & RW_INTEREST_QUAL ) )
+    {
+        const uint8_t * quality;
+        uint32_t quality_len;
+
+        rc = read_base_and_len( curs, col_ids->idx_quality, placement->id,
+                                (const void **)&quality, &quality_len );
+        if ( rc == 0 )
+        {
+            rec->quality = ( uint8_t * )rec;
+            rec->quality += sizeof ( * rec );
+            memcpy( rec->quality, quality, quality_len );
+        }
+    }
+
+    if ( rc == 0 && ( walker->interest & RW_INTEREST_TLEN ) )
+    {
+        const int32_t * tlen;
+        uint32_t tlen_len;
+
+        rc = read_base_and_len( curs, col_ids->idx_template_len, placement->id,
+                                (const void **)&tlen, &tlen_len );
+        if ( rc == 0 && tlen_len > 0 )
+            rec->tlen = *tlen;
+        else
+            rec->tlen = 0;
+    }
+    else
+        rec->tlen = 0;
+
+    return rc;
+}
+
+
+static rc_t CC alloc_size( struct VCursor const *curs, int64_t row_id, size_t * size,
+                           void *data, void * placement_ctx )
+{
+    rc_t rc = 0;
+    walker_rec * rec;
+    struct ref_walker * walker = data;
+    walker_col_ids * col_ids = placement_ctx;
+    *size = ( sizeof *rec );
+
+    if ( walker->interest & RW_INTEREST_QUAL )
+    {
+        uint32_t q_len;
+        rc = read_base_and_len( curs, col_ids->idx_quality, row_id, NULL, &q_len );
+        if ( rc == 0 )
+            *size += q_len;
+    }
+    return rc;
+}
+
+
+/* ================================================================================================ */
+
+
+static rc_t ref_walker_init( struct ref_walker * self )
+{
+    rc_t rc = KDirectoryNativeDir( &self->dir );
+    if ( rc == 0 )
+        rc = VDBManagerMakeRead ( &self->vmgr, self->dir );
+    if ( rc == 0 )
+        rc = VDBManagerMakeSRASchema( self->vmgr, &self->vschema );
+    if ( rc == 0 )
+        rc = AlignMgrMakeRead ( &self->amgr );
+    if ( rc == 0 )
+        rc =  VFSManagerMake ( &self->vfs_mgr );        
+    if ( rc == 0 )
+        rc = VNamelistMake ( &self->sources, 10 );
+
+    self->cb_block.data = self;
+    self->cb_block.destroy = NULL;
+    self->cb_block.populate = populate_data;
+    self->cb_block.alloc_size = alloc_size;
+    self->cb_block.fixed_size = 0;
+
+    BSTreeInit( &self->regions );
+    self->interest = RW_INTEREST_PRIM;
+    self->skiplist = 0;
+    self->merge_diff = 0;
+    
+    if ( rc != 0 )
+        ref_walker_release( self );
+    return rc;
+}
+
+
+/* ================================================================================================ */
+
+
+rc_t ref_walker_create( struct ref_walker ** self )
+{
+    rc_t rc;
+    if ( self == NULL )
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcParam, rcNull );
+    else
+    {
+        struct ref_walker * o = calloc( 1, sizeof **self );
+        *self = NULL;
+        if ( o == NULL )
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        else
+        {
+            rc = ref_walker_init( o );
+            if ( rc == 0 )
+            {
+                *self = o;
+            }
+            else
+                free( ( void * )o );
+        }
+    }
+    return rc;
+}
+
+
+/* ================================================================================================ */
+
+
+rc_t ref_walker_set_min_mapq( struct ref_walker * self, int32_t min_mapq )
+{
+    if ( self == NULL )
+        return RC( rcApp, rcNoTarg, rcAccessing, rcSelf, rcNull );
+    self->min_mapq = min_mapq;
+    return 0;
+}
+
+
+rc_t ref_walker_set_spot_group( struct ref_walker * self, const char * spot_group )
+{
+    if ( self == NULL )
+        return RC( rcApp, rcNoTarg, rcAccessing, rcSelf, rcNull );
+    self->spot_group = string_dup ( spot_group, string_size( spot_group ) );
+    return 0;
+}
+    
+
+rc_t ref_walker_set_merge_diff( struct ref_walker * self, uint64_t merge_diff )
+{
+    if ( self == NULL )
+        return RC( rcApp, rcNoTarg, rcAccessing, rcSelf, rcNull );
+    self->merge_diff = merge_diff;
+    return 0;
+}
+
+rc_t ref_walker_set_interest( struct ref_walker * self, uint32_t interest )
+{
+    if ( self == NULL )
+        return RC( rcApp, rcNoTarg, rcAccessing, rcSelf, rcNull );
+    self->interest = interest;
+    return 0;
+}
+
+
+rc_t ref_walker_get_interest( struct ref_walker * self, uint32_t * interest )
+{
+    if ( self == NULL )
+        return RC( rcApp, rcNoTarg, rcAccessing, rcSelf, rcNull );
+    if ( interest == NULL )
+        return RC( rcApp, rcNoTarg, rcAccessing, rcParam, rcNull );
+    *interest = self->interest;
+    return 0;
+}
+
+/* ================================================================================================ */
+
+
+rc_t ref_walker_set_callbacks( struct ref_walker * self, ref_walker_callbacks * callbacks )
+{
+    if ( self == NULL )
+        return RC( rcApp, rcNoTarg, rcAccessing, rcSelf, rcNull );
+    if ( callbacks == NULL )
+        return RC( rcApp, rcNoTarg, rcAccessing, rcParam, rcNull );
+
+    self->on_enter_ref = callbacks->on_enter_ref;
+    self->on_exit_ref = callbacks->on_exit_ref;
+    self->on_enter_ref_window = callbacks->on_enter_ref_window;
+    self->on_exit_ref_window = callbacks->on_exit_ref_window;
+    self->on_enter_ref_pos = callbacks->on_enter_ref_pos;
+    self->on_exit_ref_pos = callbacks->on_exit_ref_pos;
+    self->on_enter_spot_group = callbacks->on_enter_spot_group;
+    self->on_exit_spot_group = callbacks->on_exit_spot_group;
+    self->on_alignment = callbacks->on_alignment;
+
+    return 0;
+}
+
+
+/* ================================================================================================ */
+
+
+rc_t ref_walker_add_source( struct ref_walker * self, const char * src )
+{
+    rc_t rc = 0;
+    if ( self == NULL )
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcSelf, rcNull );
+    else
+        rc = VNamelistAppend ( self->sources, src );
+    return rc;
+}
+
+
+rc_t ref_walker_parse_and_add_range( struct ref_walker * self, const char * range )
+{
+    rc_t rc = 0;
+    if ( self == NULL )
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcSelf, rcNull );
+    else
+        rc = parse_and_add_region( &self->regions, range );
+    return rc;
+}
+
+
+rc_t ref_walker_add_range( struct ref_walker * self, const char * name, const uint64_t start, const uint64_t end )
+{
+    rc_t rc = 0;
+    if ( self == NULL )
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcSelf, rcNull );
+    else
+        rc = add_region( &self->regions, name, start, end );
+    return rc;
+}
+
+
+static rc_t ref_walker_prepare_1_src( struct ref_walker * self, const char * name )
+{
+    VPath * path = NULL;
+    const VPath * local_cache = NULL;
+    const KFile * remote_file = NULL;
+    rc_t rc = VFSManagerResolveSpec ( self->vfs_mgr, name, &path, &remote_file, &local_cache, true );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogErr, ( klogErr, rc, "cannot resolve '$(n)' via VFSManager", "n=%s", name ) );
+    }
+    else
+    {
+        char buffer[ 4096 ];
+        size_t num_read;
+        rc = VPathReadPath ( path, buffer, sizeof buffer, &num_read );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogErr, ( klogErr, rc, "cannot read path from vpath for '$(n)'", "n=%s", name ) );
+        }
+        else
+        {
+            if ( rc == 0 )
+            {
+                int path_type = ( VDBManagerPathType ( self->vmgr, "%s", buffer ) & ~ kptAlias );
+                if ( path_type == kptDatabase )
+                {
+                    const ReferenceList * reflist;
+                    uint32_t options = ( ereferencelist_usePrimaryIds | 
+                                         ereferencelist_useSecondaryIds |
+                                         ereferencelist_useEvidenceIds );
+                    rc = ReferenceList_MakePath( &reflist, self->vmgr, name, options, 0, NULL, 0 );
+                    if ( rc != 0 )
+                    {
+                        PLOGERR( klogErr, ( klogErr, rc, "cannot create ReferenceList for '$(n)'", "n=%s", name ) );
+                    }
+                    else
+                    {
+                        uint32_t count;
+                        rc = ReferenceList_Count( reflist, &count );
+                        if ( rc != 0 )
+                        {
+                            PLOGERR( klogErr, ( klogErr, rc, "ReferenceList_Count() for '$(n)' failed", "n=%s", name ) );
+                        }
+                        else
+                        {
+                            uint32_t idx;
+                            for ( idx = 0; idx < count && rc == 0; ++idx )
+                            {
+                                const ReferenceObj * refobj;
+                                rc = ReferenceList_Get( reflist, &refobj, idx );
+                                if ( rc != 0 )
+                                {
+                                    LOGERR( klogInt, rc, "ReferenceList_Get() failed" );
+                                }
+                                else
+                                {
+                                    const char * seqid;
+                                    rc = ReferenceObj_SeqId( refobj, &seqid );
+                                    if ( rc == 0 )
+                                    {
+                                        INSDC_coord_len seqlen;
+                                        rc = ReferenceObj_SeqLength( refobj, &seqlen );
+                                        if ( rc == 0 )
+                                        {
+                                            rc = add_region( &self->regions, seqid, 0, seqlen - 1 );
+                                        }
+                                    }
+                                    ReferenceObj_Release( refobj );
+                                }
+                            }
+                        }
+                        ReferenceList_Release( reflist );
+                    }
+                }
+            }
+        }
+        KFileRelease( remote_file );
+        VPathRelease ( local_cache );
+        VPathRelease ( path );
+    }
+    return rc;
+}
+
+
+static rc_t ref_walker_prepare( struct ref_walker * self )
+{
+    rc_t rc = 0;
+    if ( self == NULL )
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcParam, rcNull );
+    else
+    {
+        uint32_t s_count = 0;
+        rc = VNameListCount ( self->sources, &s_count );
+        if ( rc == 0 && s_count > 0 )
+        {
+            uint32_t r_count = count_ref_regions( &self->regions );
+            if ( r_count == 0 )
+            {
+                uint32_t idx;
+                for ( idx = 0; idx < s_count && rc == 0; ++idx )
+                {
+                    const char * name = NULL;
+                    rc = VNameListGet ( self->sources, idx, &name );
+                    if ( rc == 0 && name != NULL )
+                        rc = ref_walker_prepare_1_src( self, name );
+                }
+            }
+        }
+        check_ref_regions( &self->regions, self->merge_diff );
+        if ( self->merge_diff > 0 )
+            self->skiplist = skiplist_make( &self->regions );
+        self->prepared = ( rc == 0 );
+    }
+    return rc;
+}
+
+
+static uint32_t ref_walker_make_reflist_options( struct ref_walker * self )
+{
+    uint32_t res = ereferencelist_4na;
+
+    if ( self->interest & RW_INTEREST_PRIM )
+        res |= ereferencelist_usePrimaryIds;
+
+    if ( self->interest & RW_INTEREST_SEC )
+        res |= ereferencelist_useSecondaryIds;
+
+    if ( self->interest & RW_INTEREST_EV )
+        res |= ereferencelist_useEvidenceIds;
+
+    return res;
+}
+
+
+static rc_t make_cursor_ids( Vector * cursor_id_vector, walker_col_ids ** cursor_ids )
+{
+    rc_t rc;
+    walker_col_ids * ids = malloc( sizeof * ids );
+    if ( ids == NULL )
+        rc = RC ( rcApp, rcNoTarg, rcOpening, rcMemory, rcExhausted );
+    else
+    {
+        rc = VectorAppend ( cursor_id_vector, NULL, ids );
+        if ( rc != 0 )
+            free( ids );
+        else
+            *cursor_ids = ids;
+    }
+    return rc;
+}
+
+#define COL_QUALITY "QUALITY"
+#define COL_REF_ORIENTATION "REF_ORIENTATION"
+#define COL_READ_FILTER "READ_FILTER"
+#define COL_TEMPLATE_LEN "TEMPLATE_LEN"
+
+static rc_t add_required_columns( struct ref_walker * self, const VTable *tbl, const VCursor ** cursor,
+                                  walker_col_ids * cursor_ids )
+{
+    rc_t rc = VTableCreateCursorRead ( tbl, cursor );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "VTableCreateCursorRead() failed" );
+    }
+
+    if ( rc == 0 && ( self->interest & RW_INTEREST_QUAL ) )
+    {
+        rc = VCursorAddColumn ( *cursor, &cursor_ids->idx_quality, COL_QUALITY );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VCursorAddColumn(QUALITY) failed" );
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        rc = VCursorAddColumn ( *cursor, &cursor_ids->idx_ref_orientation, COL_REF_ORIENTATION );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VCursorAddColumn(REF_ORIENTATION) failed" );
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        rc = VCursorAddColumn ( *cursor, &cursor_ids->idx_read_filter, COL_READ_FILTER );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VCursorAddColumn(READ_FILTER) failed" );
+        }
+    }
+
+    if ( rc == 0 && ( self->interest & RW_INTEREST_TLEN ) )
+    {
+        rc = VCursorAddColumn ( *cursor, &cursor_ids->idx_template_len, COL_TEMPLATE_LEN );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VCursorAddColumn(TEMPLATE_LEN) failed" );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t ref_walker_add_iterator( struct ref_walker * self, const char * ref_name,
+                        uint64_t start, uint64_t end, const char * src_name, Vector * cur_id_vector,
+                        const VDatabase *db, const ReferenceObj * ref_obj, ReferenceIterator * ref_iter,
+                        const char * table_name, align_id_src id_selector )
+{
+    walker_col_ids * cursor_ids;
+    rc_t rc = make_cursor_ids( cur_id_vector, &cursor_ids );
+    if ( rc == 0 )
+    {
+        const VTable *tbl;
+        rc_t rc = VDatabaseOpenTableRead ( db, &tbl, "%s", table_name );
+        if ( rc == 0 )
+        {
+            const VCursor *cursor;
+            rc = add_required_columns( self, tbl, &cursor, cursor_ids );
+            if ( rc == 0 )
+            {
+                rc = ReferenceIteratorAddPlacements ( ref_iter,             /* the outer ref-iter */
+                                                      ref_obj,              /* the ref-obj for this chromosome */
+                                                      start - 1,            /* start ( zero-based ) */
+                                                      ( end - start ) + 1,  /* length */
+                                                      NULL,                 /* ref-cursor */
+                                                      cursor,               /* align-cursor */
+                                                      id_selector,          /* which id's */
+                                                      self->spot_group,     /* what read-group */
+                                                      cursor_ids            /* placement-context */
+                                                     );
+                VCursorRelease( cursor );
+            }
+            VTableRelease ( tbl );
+        }
+    }
+    return rc;
+}
+
+
+#define TBL_PRIM "PRIMARY_ALIGNMENT"
+#define TBL_SEC  "SECONDARY_ALIGNMENT"
+#define TBL_EV   "EVIDENCE_ALIGNMENT"
+
+rc_t CC Quitting( void );
+
+static rc_t ref_walker_walk_alignment( struct ref_walker * self,
+                                       ReferenceIterator * ref_iter,
+                                       const PlacementRecord * rec,
+                                       ref_walker_data * rwd )
+{
+    rc_t rc;
+
+    /* cast the generic record comming from the iterator into the tool-specific one */
+    walker_rec * xrec = PlacementRecordCast ( rec, placementRecordExtension1 );
+
+    /* get all the state of the ref_iter out */
+    rwd->state = ReferenceIteratorState ( ref_iter, &rwd->seq_pos );
+    rwd->valid = ( ( rwd->state & align_iter_invalid ) == 0 );
+
+    rwd->first = ( ( rwd->state & align_iter_first ) == align_iter_first );
+    rwd->last  = ( ( rwd->state & align_iter_last ) == align_iter_last );
+
+    rwd->match = ( ( rwd->state & align_iter_match ) == align_iter_match );
+    rwd->skip  = ( ( rwd->state & align_iter_skip ) == align_iter_skip );
+
+    rwd->reverse = xrec->reverse;
+
+    if ( self->interest & RW_INTEREST_BASE )
+    {
+        rwd->bin_alignment_base = ( rwd->state & 0x0F );
+        if ( !rwd->match )
+            rwd->ascii_alignment_base = _4na_to_ascii( rwd->state, rwd->reverse );
+        else
+            rwd->ascii_alignment_base = rwd->ascii_ref_base;
+    }
+
+    if ( self->interest & RW_INTEREST_QUAL )
+    {
+        if ( rwd->skip )
+            rwd->quality = ( xrec->quality[ rwd->seq_pos + 1 ] + 33 );
+        else
+            rwd->quality = ( xrec->quality[ rwd->seq_pos ] + 33 );
+    }
+
+    rwd->mapq = rec->mapq;
+
+    if ( self->interest & RW_INTEREST_INDEL )
+    {
+        rwd->ins   = ( ( rwd->state & align_iter_insert ) == align_iter_insert );
+        rwd->del   = ( ( rwd->state & align_iter_delete ) == align_iter_delete );
+
+        if ( rwd->ins )
+            rwd->ins_bases_count = ReferenceIteratorBasesInserted ( ref_iter, &rwd->ins_bases );
+        if ( rwd->del )
+            rwd->del_bases_count = ReferenceIteratorBasesDeleted ( ref_iter, &rwd->del_ref_pos, &rwd->del_bases );
+    }
+
+    if ( self->interest & RW_INTEREST_DEBUG )
+    {
+        rwd->alignment_id = rec->id;
+        rwd->alignment_start_pos = rec->pos;
+        rwd->alignment_len = rec->len;
+    }
+
+    rc = self->on_alignment( rwd );
+
+    if ( self->interest & RW_INTEREST_INDEL && rwd->del && ( rwd->del_bases_count > 0 ) )
+        free( ( void * )rwd->del_bases );
+
+    return rc;
+}
+
+
+/* free all cursor-ids-blocks created in parallel with the alignment-cursor */
+static void CC cur_id_vector_entry_whack( void *item, void *data )
+{
+    walker_col_ids * ids = item;
+    free( ids );
+}
+
+static rc_t ref_walker_walk_ref_range( struct ref_walker * self, ref_walker_data * rwd )
+{
+    ReferenceIterator * ref_iter;
+    rc_t rc = AlignMgrMakeReferenceIterator ( self->amgr, &ref_iter, &self->cb_block, self->min_mapq ); /* align/iterator.h */
+    if ( rc == 0 )
+    {
+        /* construct the reference iterator */
+
+        uint32_t idx, count;
+        uint32_t reflist_options = ref_walker_make_reflist_options( self ); /* above */
+        Vector cur_id_vector;
+        VectorInit ( &cur_id_vector, 0, 12 );
+
+        rc = VNameListCount ( self->sources, &count );
+        for ( idx = 0; idx < count && rc == 0; ++idx )
+        {
+            const char * src_name = NULL;
+            rc = VNameListGet ( self->sources, idx, &src_name );
+            if ( rc == 0 && src_name != NULL )
+            {
+                const VDatabase *db;
+                rc = VDBManagerOpenDBRead ( self->vmgr, &db, self->vschema, "%s", src_name );
+                if ( rc == 0 )
+                {
+                    const ReferenceList * ref_list;
+                    rc = ReferenceList_MakeDatabase( &ref_list, db, reflist_options, 0, NULL, 0 );
+                    if ( rc == 0 )
+                    {
+                        const ReferenceObj * ref_obj;
+                        rc = ReferenceList_Find( ref_list, &ref_obj, rwd->ref_name, string_size( rwd->ref_name ) );
+                        if ( rc == 0 )
+                        {
+                            INSDC_coord_len len;
+                            rc = ReferenceObj_SeqLength( ref_obj, &len );
+                            if ( rc == 0 )
+                            {
+                                if ( rwd->ref_start == 0 )
+                                    rwd->ref_start = 1;
+                                if ( ( rwd->ref_end == 0 )||( rwd->ref_end > len + 1 ) )
+                                    rwd->ref_end = ( len - rwd->ref_start ) + 1;
+
+                                if ( self->interest & RW_INTEREST_PRIM )
+                                    rc = ref_walker_add_iterator( self, rwd->ref_name, rwd->ref_start, rwd->ref_end, src_name, 
+                                            &cur_id_vector, db, ref_obj, ref_iter, TBL_PRIM, primary_align_ids );
+
+                                if ( rc == 0 && ( self->interest & RW_INTEREST_SEC ) )
+                                    rc = ref_walker_add_iterator( self, rwd->ref_name, rwd->ref_start, rwd->ref_end, src_name, 
+                                            &cur_id_vector, db, ref_obj, ref_iter, TBL_SEC, secondary_align_ids );
+
+                                if ( rc == 0 && ( self->interest & RW_INTEREST_EV ) )
+                                    rc = ref_walker_add_iterator( self, rwd->ref_name, rwd->ref_start, rwd->ref_end, src_name, 
+                                            &cur_id_vector, db, ref_obj, ref_iter, TBL_EV, evidence_align_ids );
+
+                            }
+                            ReferenceObj_Release( ref_obj );
+                        }
+                        ReferenceList_Release( ref_list );
+                    }
+                    VDatabaseRelease( db );
+                }
+            }
+        }
+
+        if ( rc == 0 )
+        {
+            /* walk the reference iterator */
+            
+            /* because in this strategy, each ref-iter contains only 1 ref-obj, no need for a loop */
+            struct ReferenceObj const * ref_obj;
+            rc = ReferenceIteratorNextReference( ref_iter, NULL, NULL, &ref_obj );
+            if ( rc == 0 && ref_obj != NULL )
+            {
+
+                if ( self->interest & RW_INTEREST_SEQNAME )
+                    rc = ReferenceObj_Name( ref_obj, &rwd->ref_name );
+                else
+                    rc = ReferenceObj_SeqId( ref_obj, &rwd->ref_name );
+
+                if ( rc == 0 )
+                {
+                    INSDC_coord_zero first_pos;
+                    INSDC_coord_len len;
+                    rc_t rc_w = 0, rc_p;
+                    while ( rc == 0 && rc_w == 0 )
+                    {
+                        rc_w = ReferenceIteratorNextWindow ( ref_iter, &first_pos, &len );
+                        if ( rc_w == 0 )
+                        {
+                            rc_p = 0;
+                            while( rc == 0 && rc_p == 0 )
+                            {
+                                rc_p = ReferenceIteratorNextPos ( ref_iter, ( self->interest & RW_INTEREST_SKIP ) );
+                                if ( rc_p == 0 )
+                                {
+                                    rc = ReferenceIteratorPosition ( ref_iter, &rwd->pos, &rwd->depth, &rwd->bin_ref_base );
+                                    if ( rwd->depth > 0 && rc == 0 )
+                                    {
+                                        rc_t rc_sg = 0;
+                                        bool skip = false;
+
+                                        if ( self->skiplist != NULL )
+                                            skip = skiplist_is_skip_position( self->skiplist, rwd->pos + 1 );
+
+                                        if ( !skip )
+                                        {
+                                            rwd->ascii_ref_base = _4na_to_ascii( rwd->bin_ref_base, false );
+                                            if ( self->on_enter_ref_pos != NULL )
+                                                rc = self->on_enter_ref_pos( rwd );
+
+                                            while ( rc_sg == 0 && rc == 0 )
+                                            {
+                                                rc_sg = ReferenceIteratorNextSpotGroup ( ref_iter, &rwd->spot_group, &rwd->spot_group_len );
+                                                if ( rc_sg == 0 )
+                                                {
+                                                    rc_t rc_pr = 0;
+                                                    if ( self->on_enter_spot_group != NULL )
+                                                        rc = self->on_enter_spot_group( rwd );
+
+                                                    while ( rc == 0 && rc_pr == 0 )
+                                                    {
+                                                        const PlacementRecord * rec;
+                                                        rc_pr = ReferenceIteratorNextPlacement ( ref_iter, &rec );
+                                                        if ( rc_pr == 0 && self->on_alignment != NULL )
+                                                            rc = ref_walker_walk_alignment( self, ref_iter, rec, rwd );
+                                                    }
+
+                                                    if ( self->on_exit_spot_group != NULL )
+                                                        rc = self->on_exit_spot_group( rwd );
+                                                }
+                                            }
+                                            if ( self->on_exit_ref_pos != NULL )
+                                                rc = self->on_exit_ref_pos( rwd );
+                                        }
+                                    }
+                                    rc = Quitting();
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        ReferenceIteratorRelease ( ref_iter );
+
+        /* free cur_id_vector */
+        VectorWhack ( &cur_id_vector, cur_id_vector_entry_whack, NULL );
+    }
+    return rc;
+}
+
+
+static rc_t ref_walker_walk_ref_region( struct ref_walker * self, 
+                        const struct reference_region * region, ref_walker_data * rwd )
+{
+    rc_t rc = 0;
+    uint32_t idx, count = get_ref_node_range_count( region );
+    rwd->ref_name = get_ref_node_name( region );
+    
+    rwd->ref_start = 0;
+    rwd->ref_end = 0;
+    rwd->pos = 0;
+    rwd->depth = 0;
+    rwd->bin_ref_base = 0;
+    rwd->ascii_ref_base = 0;
+    rwd->spot_group = NULL;
+    rwd->spot_group_len = 0;
+    rwd->state = 0;
+    rwd->reverse = 0;
+    
+    if ( self->on_enter_ref != NULL )
+        rc = self->on_enter_ref( rwd );
+
+    if ( rc == 0 )
+    {
+        if ( self->skiplist != NULL )
+            skiplist_enter_ref( self->skiplist, rwd->ref_name );
+
+        for ( idx = 0; idx < count; ++ idx )
+        {
+            const struct reference_range * range = get_ref_range( region, idx );
+            if ( range != NULL )
+            {
+                rwd->ref_start = get_ref_range_start( range );
+                rwd->ref_end = get_ref_range_end( range );
+                if ( self->on_enter_ref_window != NULL )
+                    rc = self->on_enter_ref_window( rwd );
+                if ( rc == 0 )
+                {
+                    rc = ref_walker_walk_ref_range( self, rwd );
+                    if ( rc == 0 && self->on_exit_ref_window != NULL )
+                        rc = self->on_exit_ref_window( rwd );
+                }
+                rwd->ref_start = 0;
+                rwd->ref_end = 0;
+            }
+        }
+        
+        if ( self->on_exit_ref != NULL )
+            rc = self->on_exit_ref( rwd );
+    }
+    rwd->ref_name = NULL;
+
+    return rc;
+}
+
+
+rc_t ref_walker_walk( struct ref_walker * self, void * data )
+{
+    rc_t rc = 0;
+    if ( self == NULL )
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcParam, rcNull );
+    else
+    {
+        if ( !self->prepared )
+            rc = ref_walker_prepare( self );
+
+        if ( rc == 0 && self->prepared )
+        {
+            const struct reference_region * region = get_first_ref_node( &self->regions );
+            while ( region != NULL && rc == 0 )
+            {
+                ref_walker_data rwd;    /* this record will be passed to all the enter/exit callback's */
+                rwd.data = data;
+
+                rc = ref_walker_walk_ref_region( self, region, &rwd );
+                if ( rc == 0 )
+                    region = get_next_ref_node( region );
+            }
+        }
+    }
+    return rc;
+}
+
+
+rc_t ref_walker_destroy( struct ref_walker * self )
+{
+    rc_t rc = 0;
+    if ( self != NULL )
+    {
+        ref_walker_release( self );
+        free( ( void * ) self );
+    }
+    return rc;
+}
+
diff --git a/tools/sra-pileup/ref_walker.h b/tools/sra-pileup/ref_walker.h
new file mode 100644
index 0000000..db109a9
--- /dev/null
+++ b/tools/sra-pileup/ref_walker.h
@@ -0,0 +1,147 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_ref_walker_
+#define _h_ref_walker_
+
+#include <klib/container.h>
+#include <insdc/sra.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct ref_walker;
+
+
+/* create the ref-walker ( not ref-counted ) */
+rc_t ref_walker_create( struct ref_walker ** self );
+
+#define RW_INTEREST_INDEL   0x0001
+#define RW_INTEREST_DEBUG   0x0002
+#define RW_INTEREST_BASE    0x0004
+#define RW_INTEREST_QUAL    0x0008
+#define RW_INTEREST_SKIP    0x0010
+#define RW_INTEREST_DUPS    0x0020
+#define RW_INTEREST_TLEN    0x0040
+#define RW_INTEREST_SEQNAME 0x0080
+#define RW_INTEREST_PRIM    0x0100
+#define RW_INTEREST_SEC     0x0200
+#define RW_INTEREST_EV      0x0400
+
+typedef struct ref_walker_data
+{
+    /* for the reference - level */
+    const char * ref_name;
+    uint64_t ref_start;
+    uint64_t ref_end;
+
+    /* for the position - level */
+    INSDC_coord_zero pos;
+    uint32_t depth;
+    INSDC_4na_bin bin_ref_base;
+    char ascii_ref_base;
+
+    /* for the spot-group - level */
+    const char * spot_group;
+    size_t spot_group_len;
+
+    /* for the alignment - level */
+    int32_t state, mapq;
+    INSDC_4na_bin bin_alignment_base;
+    char ascii_alignment_base;
+    char quality;
+    INSDC_coord_zero seq_pos;
+    bool ins, del, reverse, first, last, skip, match, valid;
+
+    /* indels for alignment */
+    const INSDC_4na_bin * ins_bases;
+    uint32_t ins_bases_count;
+
+    INSDC_coord_zero del_ref_pos;
+    const INSDC_4na_bin * del_bases;
+    uint32_t del_bases_count;
+
+    /* for debugging purpose */
+    uint64_t alignment_id;
+    uint32_t alignment_start_pos;
+    uint32_t alignment_len;
+
+    void * data;
+} ref_walker_data;
+
+
+typedef rc_t ( CC * ref_walker_callback )( ref_walker_data * rwd );
+
+
+typedef struct ref_walker_callbacks
+{
+    ref_walker_callback on_enter_ref;
+    ref_walker_callback on_exit_ref;
+
+    ref_walker_callback on_enter_ref_window;
+    ref_walker_callback on_exit_ref_window;
+
+    ref_walker_callback on_enter_ref_pos;
+    ref_walker_callback on_exit_ref_pos;
+
+    ref_walker_callback on_enter_spot_group;
+    ref_walker_callback on_exit_spot_group;
+
+    ref_walker_callback on_alignment;
+} ref_walker_callbacks;
+
+
+/* set boolean / numeric parameters */
+rc_t ref_walker_set_min_mapq( struct ref_walker * self, int32_t min_mapq );
+rc_t ref_walker_set_spot_group( struct ref_walker * self, const char * spot_group );
+rc_t ref_walker_set_merge_diff( struct ref_walker * self, uint64_t merge_diff );
+rc_t ref_walker_set_interest( struct ref_walker * self, uint32_t interest );
+rc_t ref_walker_get_interest( struct ref_walker * self, uint32_t * interest );
+
+/* set callbacks */
+rc_t ref_walker_set_callbacks( struct ref_walker * self, ref_walker_callbacks * callbacks );
+
+/* add_sources and ranges */
+rc_t ref_walker_add_source( struct ref_walker * self, const char * src );
+
+rc_t ref_walker_parse_and_add_range( struct ref_walker * self, const char * range );
+
+rc_t ref_walker_add_range( struct ref_walker * self, const char * name, const uint64_t start, const uint64_t end );
+
+
+/* walk the sources/ranges by calling the supplied call-backs, passing data to the callbacks */
+rc_t ref_walker_walk( struct ref_walker * self, void * data );
+
+
+/* destroy the ref-walker */
+rc_t ref_walker_destroy( struct ref_walker * self );
+    
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_ref_walker_ */
diff --git a/tools/sra-pileup/ref_walker_0.c b/tools/sra-pileup/ref_walker_0.c
new file mode 100644
index 0000000..a620ec0
--- /dev/null
+++ b/tools/sra-pileup/ref_walker_0.c
@@ -0,0 +1,231 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "ref_walker_0.h"
+
+rc_t CC Quitting( void );
+
+static rc_t walk_placements( walk_data * data, walk_funcs * funcs )
+{
+    rc_t rc;
+    do
+    {
+        rc = ReferenceIteratorNextPlacement ( data->ref_iter, &data->rec );
+        if ( GetRCState( rc ) != rcDone )
+        {
+            if ( rc != 0 )
+            {
+                LOGERR( klogInt, rc, "ReferenceIteratorNextPlacement() failed" );
+            }
+            else
+            {
+                data->state = ReferenceIteratorState ( data->ref_iter, &data->seq_pos );
+                data->xrec = ( tool_rec * ) PlacementRecordCast ( data->rec, placementRecordExtension1 );
+                if ( funcs->on_placement != NULL )
+                    rc = funcs->on_placement( data );
+            }
+        }
+    } while ( rc == 0 );
+    if ( GetRCState( rc ) == rcDone ) { rc = 0; }
+    return rc;
+}
+
+
+static rc_t walk_spot_group( walk_data * data, walk_funcs * funcs )
+{
+    rc_t rc;
+    do
+    {
+        rc = ReferenceIteratorNextSpotGroup ( data->ref_iter, &data->spotgroup, &data->spotgroup_len );
+        if ( GetRCState( rc ) != rcDone )
+        {
+            if ( rc != 0 )
+            {
+                LOGERR( klogInt, rc, "ReferenceIteratorNextPos() failed" );
+            }
+            else
+            {
+                if ( funcs->on_enter_spotgroup != NULL )
+                    rc = funcs->on_enter_spotgroup( data );
+                if ( rc == 0 )
+                    rc = walk_placements( data, funcs );
+                if ( rc == 0 && funcs->on_exit_spotgroup != NULL )
+                    rc = funcs->on_exit_spotgroup( data );
+            }
+        }
+    } while ( rc == 0 );
+    if ( GetRCState( rc ) == rcDone ) { rc = 0; }
+    return rc;
+}
+
+
+static rc_t walk_ref_pos( walk_data * data, walk_funcs * funcs )
+{
+    rc_t rc;
+    do
+    {
+        rc = ReferenceIteratorNextPos ( data->ref_iter, !data->options->no_skip );
+        if ( GetRCState( rc ) != rcDone )
+        {
+            if ( rc != 0 )
+            {
+                LOGERR( klogInt, rc, "ReferenceIteratorNextPos() failed" );
+            }
+            else
+            {
+                rc = ReferenceIteratorPosition ( data->ref_iter, &data->ref_pos, &data->depth, &data->ref_base );
+                if ( rc != 0 )
+                {
+                    LOGERR( klogInt, rc, "ReferenceIteratorPosition() failed" );
+                }
+                else if ( data->depth > 0 )
+                {
+                    bool skip = false;
+
+                    if ( data->options->skiplist != NULL )
+                        skip = skiplist_is_skip_position( data->options->skiplist, data->ref_pos + 1 );
+
+                    if ( !skip )
+                    {
+                        if ( funcs->on_enter_ref_pos != NULL )
+                            rc = funcs->on_enter_ref_pos( data );
+                        if ( rc == 0 )
+                            rc = walk_spot_group( data, funcs );
+                        if ( rc == 0 && funcs->on_exit_ref_pos != NULL )
+                            rc = funcs->on_exit_ref_pos( data );
+                    }
+                }
+            }
+            if ( rc == 0 ) { rc = Quitting(); }
+        }
+    } while ( rc == 0 );
+    if ( GetRCState( rc ) == rcDone ) { rc = 0; }
+    return rc;
+}
+
+
+static rc_t walk_ref_window( walk_data * data, walk_funcs * funcs )
+{
+    rc_t rc;
+    do
+    {
+        rc = ReferenceIteratorNextWindow ( data->ref_iter, &data->ref_window_start, &data->ref_window_len );
+        if ( GetRCState( rc ) != rcDone )
+        {
+            if ( rc != 0 )
+            {
+                LOGERR( klogInt, rc, "ReferenceIteratorNextWindow() failed" );
+            }
+            else
+            {
+                if ( funcs->on_enter_ref_window != NULL )
+                    rc = funcs->on_enter_ref_window( data );
+                if ( rc == 0 )
+                    rc = walk_ref_pos( data, funcs );
+                if ( rc == 0 && funcs->on_exit_ref_window != NULL )
+                    rc = funcs->on_exit_ref_window( data );
+            }
+        }
+    } while ( rc == 0 );
+    if ( GetRCState( rc ) == rcDone ) { rc = 0; }
+    return rc;
+}
+
+
+rc_t walk_0( walk_data * data, walk_funcs * funcs )
+{
+    rc_t rc;
+
+    data->ref_start = 0;
+    data->ref_len = 0;
+    data->ref_name = NULL;
+    data->ref_obj = NULL;
+    data->ref_window_start = 0;
+    data->ref_window_len = 0;
+    data->ref_pos = 0;
+    data->depth = 0;
+    data->ref_base = 0;
+    data->spotgroup = NULL;
+    data->spotgroup_len = 0;
+    data->rec = NULL;
+    data->xrec = NULL;
+    data->state = 0;
+    data->seq_pos = 0;
+
+    do
+    {
+        rc = ReferenceIteratorNextReference( data->ref_iter, &data->ref_start, &data->ref_len, &data->ref_obj );
+        if ( GetRCState( rc ) != rcDone )
+        {
+            if ( rc != 0 )
+            {
+                LOGERR( klogInt, rc, "ReferenceIteratorNextReference() failed" );
+            }
+            else if ( data->ref_obj != NULL )
+            {
+                if ( data->options->use_seq_name )
+                    rc = ReferenceObj_Name( data->ref_obj, &data->ref_name );
+                else
+                    rc = ReferenceObj_SeqId( data->ref_obj, &data->ref_name );
+
+                if ( data->options->skiplist != NULL )
+                    skiplist_enter_ref( data->options->skiplist, data->ref_name );
+
+                if ( rc != 0 )
+                {
+                    if ( data->options->use_seq_name )
+                    {
+                        LOGERR( klogInt, rc, "ReferenceObj_Name() failed" );
+                    }
+                    else
+                    {
+                        LOGERR( klogInt, rc, "ReferenceObj_SeqId() failed" );
+                    }
+                }
+                else
+                {
+					rc = ReferenceObj_SeqLength( data->ref_obj, &data->ref_len );
+					if ( rc != 0 )
+                    {
+                        LOGERR( klogInt, rc, "ReferenceObj_SeqLength() failed" );
+                    }
+					else
+					{
+						if ( funcs->on_enter_ref != NULL )
+							rc = funcs->on_enter_ref( data );
+						if ( rc == 0 )
+							rc = walk_ref_window( data, funcs );
+						if ( rc == 0 && funcs->on_exit_ref != NULL )
+							rc = funcs->on_exit_ref( data );
+					}
+                }
+            }
+        }
+    } while ( rc == 0 );
+    if ( GetRCState( rc ) == rcDone ) { rc = 0; }
+    if ( GetRCState( rc ) == rcCanceled ) { rc = 0; }
+    return rc;
+}
diff --git a/tools/sra-pileup/ref_walker_0.h b/tools/sra-pileup/ref_walker_0.h
new file mode 100644
index 0000000..e7c0253
--- /dev/null
+++ b/tools/sra-pileup/ref_walker_0.h
@@ -0,0 +1,107 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_ref_walker_0_
+#define _h_ref_walker_0_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "pileup_options.h"
+
+#include <insdc/sra.h>
+
+#include <stdlib.h>
+#include <sysalloc.h>
+#include <string.h>
+#include <os-native.h>
+
+typedef struct tool_rec tool_rec;
+struct tool_rec
+{
+    bool reverse;   /* orientation towards reference ( false...in ref-orientation / true...reverse) */
+    int32_t tlen;   /* template-len, for statistical analysis */
+    uint32_t quality_len;
+    uint8_t * quality;  /* ptr to quality... ( for sam-output ) */
+};
+
+
+typedef struct walk_data walk_data;
+struct walk_data
+{
+    void *data;                             /* opaque pointer to data passed to each function */
+    ReferenceIterator *ref_iter;            /* the global reference-iter */
+    pileup_options *options;                /* the tool-options */
+    struct ReferenceObj const * ref_obj;    /* the current reference-object */
+    const char * ref_name;                  /* the name of the current reference */
+    INSDC_coord_zero ref_start;             /* start of the current reference */
+    INSDC_coord_len ref_len;                /* length of the current reference */
+    INSDC_coord_zero ref_window_start;      /* start of the current reference-window */
+    INSDC_coord_len ref_window_len;         /* length of the current reference-window */
+    INSDC_coord_zero ref_pos;               /* current position on the reference */
+    uint32_t depth;                         /* coverage at the current position */
+    INSDC_4na_bin ref_base;                 /* reference-base at the current position */
+    const char * spotgroup;                 /* name of the current spotgroup ( can be NULL! ) */
+    size_t spotgroup_len;                   /* length of the name of the current spotgroup ( can be 0 ) */
+    const PlacementRecord *rec;             /* current placement-record */
+    tool_rec * xrec;                        /* current extended placement-record (orientation, quality...) */
+    int32_t state;                          /* state of the current placement at the current ref-pos ( bitmasked!) */
+    INSDC_coord_zero seq_pos;               /* position inside the alignment at the current ref-pos */
+};
+
+
+typedef struct walk_funcs walk_funcs;
+struct walk_funcs
+{
+    /* changing reference */
+    rc_t ( CC * on_enter_ref ) ( walk_data * data );
+    rc_t ( CC * on_exit_ref ) ( walk_data * data );
+
+    /* changing reference-window */
+    rc_t ( CC * on_enter_ref_window ) ( walk_data * data );
+    rc_t ( CC * on_exit_ref_window ) ( walk_data * data );
+
+    /* changing reference-position */
+    rc_t ( CC * on_enter_ref_pos ) ( walk_data * data );
+    rc_t ( CC * on_exit_ref_pos ) ( walk_data * data );
+
+    /* changing spot-group */
+    rc_t ( CC * on_enter_spotgroup ) ( walk_data * data );
+    rc_t ( CC * on_exit_spotgroup ) ( walk_data * data );
+
+    /* on each alignment */
+    rc_t ( CC * on_placement ) ( walk_data * data );
+};
+
+
+rc_t walk_0( walk_data * data, walk_funcs * funcs );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_ref_walker_0_ */
diff --git a/tools/sra-pileup/report_deletes.c b/tools/sra-pileup/report_deletes.c
new file mode 100644
index 0000000..21e376e
--- /dev/null
+++ b/tools/sra-pileup/report_deletes.c
@@ -0,0 +1,259 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "report_deletes.h"
+#include "cg_tools.h"
+
+#include <klib/text.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <kfs/file.h>
+
+#include <vfs/manager.h>
+#include <vfs/path.h>
+#include <vfs/resolver.h>
+
+#include <kdb/manager.h>
+#include <vdb/manager.h>
+#include <vdb/vdb-priv.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+
+#include <sysalloc.h>
+#include <stdlib.h>
+
+rc_t CC Quitting ( void );
+
+static rc_t cigar_loop( const VCursor *cur,
+                        uint32_t cigar_idx,
+                        int64_t first,
+                        uint64_t count,
+                        uint32_t min_len )
+{
+    rc_t rc = 0;
+    int64_t row_id, last_row = ( first + count );
+    rna_splice_candidates candidates;
+
+    for ( row_id = first; ( row_id < last_row ) && ( rc == 0 ) && ( Quitting() == 0 ); row_id++ )
+    {
+        const char * cigar;
+        uint32_t row_len;
+        rc = VCursorCellDataDirect ( cur, row_id, cigar_idx, NULL, ( const void ** )&cigar, NULL, &row_len );
+        if ( rc == 0 )
+        {
+            candidates.count = 0;
+            candidates.fwd_matched = 0;
+            candidates.rev_matched = 0;
+
+            rc = discover_rna_splicing_candidates( row_len, cigar, min_len, &candidates );
+            if ( rc == 0 && candidates.count > 0 )
+            {
+                rc = KOutMsg( "%d rna-splice-candidates at row #%ld : %.*s\n", candidates.count, row_id, row_len, cigar );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t report_deletes_db( const VDBManager *vdb_mgr,
+                               const char * path,
+                               uint32_t min_len )
+{
+    const VDatabase *db;
+    rc_t rc = VDBManagerOpenDBRead( vdb_mgr, &db, NULL, "%s", path );
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogErr,
+                 ( klogInt, rc, "cannot open database $(db_name)", "db_name=%s", path ) );
+    }
+    else
+    {
+        const VTable *tab;
+        rc = VDatabaseOpenTableRead( db, &tab, "PRIMARY_ALIGNMENT" );
+        if ( rc != 0 )
+        {
+            (void)LOGERR( klogErr, rc, "cannot open table PRIMARY_ALIGNMENT" );
+        }
+        else
+        {
+            const VCursor *cur;
+            rc = VTableCreateCursorRead( tab, &cur );
+            if ( rc != 0 )
+            {
+                (void)LOGERR( klogErr, rc, "cannot open cursor on table PRIMARY_ALIGNMENT" );
+            }
+            else
+            {
+                uint32_t cigar_idx;
+                rc = VCursorAddColumn( cur, &cigar_idx, "CIGAR_SHORT" );
+                if ( rc != 0 )
+                {
+                    (void)LOGERR( klogErr, rc, "cannot add CIGAR_SHORT to cursor" );
+                }
+                else
+                {
+                    rc = VCursorOpen( cur );
+                    if ( rc != 0 )
+                    {
+                        (void)LOGERR( klogErr, rc, "cannot open cursor" );
+                    }
+                    else
+                    {
+                        int64_t first;
+                        uint64_t count;
+                        rc = VCursorIdRange ( cur, cigar_idx, &first, &count );
+                        if ( rc != 0 )
+                        {
+                            (void)LOGERR( klogErr, rc, "cannot detect row-range" );
+                        }
+                        else
+                        {
+                            rc = cigar_loop( cur, cigar_idx, first, count, min_len );
+                        }
+                    }
+                }
+                VCursorRelease( cur );
+            }
+            VTableRelease( tab );
+        }
+        VDatabaseRelease( db );
+    }
+    return rc;
+}
+
+
+static rc_t report_deletes_spec( const VDBManager *vdb_mgr,
+                                 VFSManager * vfs_mgr,
+                                 const char * spec,
+                                 uint32_t min_len )
+{
+    rc_t rc = KOutMsg( "\nreporting deletes of '%s'\n", spec );
+    if ( rc == 0 )
+    {
+        VPath * path = NULL;
+        const VPath * local_cache = NULL;
+        const KFile * remote_file = NULL;
+        rc = VFSManagerResolveSpec ( vfs_mgr, spec, &path, &remote_file, &local_cache, true );
+        if ( rc != 0 )
+        {
+            (void)LOGERR( klogErr, rc, "cannot resolve spec via VFSManager" );
+        }
+        else
+        {
+            char buffer[ 4096 ];
+            size_t num_read;
+            rc = VPathReadPath ( path, buffer, sizeof buffer, &num_read );
+            if ( rc != 0 )
+            {
+                (void)LOGERR( klogErr, rc, "cannot read path from vpath" );
+            }
+            else
+            {
+                int path_type = ( VDBManagerPathType ( vdb_mgr, "%s", buffer ) & ~ kptAlias );
+                switch( path_type )
+                {
+                    case kptDatabase : rc = report_deletes_db( vdb_mgr, buffer, min_len ); break;
+
+                    case kptTable    : KOutMsg( "cannot report deletes on a table-object\n" );
+                                        rc = RC ( rcApp, rcNoTarg, rcAccessing, rcParam, rcInvalid );
+                                        (void)LOGERR( klogErr, rc, "cannot report references on a table-object" );
+                                       break;
+
+                    default          : KOutMsg( "the given object is not a vdb-database\n" );
+                                        rc = RC ( rcApp, rcNoTarg, rcAccessing, rcParam, rcInvalid );
+                                        (void)LOGERR( klogErr, rc, "the given object is not a vdb-database" );
+                                       break;
+                }
+            }
+            KFileRelease( remote_file );
+            VPathRelease ( local_cache );
+            VPathRelease ( path );
+        }
+    }
+    return rc;
+
+}
+
+
+rc_t report_deletes( Args * args, uint32_t min_len )
+{
+    uint32_t count;
+    rc_t rc = ArgsParamCount( args, &count );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "ArgsParamCount() failed" );
+    }
+    else
+    {
+        KDirectory *dir; 
+        rc = KDirectoryNativeDir( &dir );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "KDirectoryNativeDir() failed" );
+        }
+        else
+        {
+            const VDBManager *vdb_mgr;
+            rc = VDBManagerMakeRead ( &vdb_mgr, dir );
+            if ( rc != 0 )
+            {
+                LOGERR( klogInt, rc, "VDBManagerMakeRead() failed" );
+            }
+            else
+            {
+                VFSManager * vfs_mgr;
+                rc =  VFSManagerMake ( &vfs_mgr );
+                if ( rc != 0 )
+                {
+                    (void)LOGERR( klogErr, rc, "cannot make vfs-manager" );
+                }
+                else
+                {
+                    uint32_t idx;
+                    for ( idx = 0; idx < count && rc == 0; ++idx )
+                    {
+                        const char *param = NULL;
+                        rc = ArgsParamValue( args, idx, (const void **)&param );
+                        if ( rc != 0 )
+                        {
+                            LOGERR( klogInt, rc, "ArgsParamvalue() failed" );
+                        }
+                        else
+                        {
+                            rc = report_deletes_spec( vdb_mgr, vfs_mgr, param, min_len );
+                        }
+                    }
+                    VFSManagerRelease ( vfs_mgr );
+                }
+                VDBManagerRelease( vdb_mgr );
+            }
+            KDirectoryRelease( dir );
+        }
+    }
+    return rc;
+}
diff --git a/tools/sra-pileup/report_deletes.h b/tools/sra-pileup/report_deletes.h
new file mode 100644
index 0000000..9cc12ac
--- /dev/null
+++ b/tools/sra-pileup/report_deletes.h
@@ -0,0 +1,41 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_report_deletes_
+#define _h_report_deletes_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include <kapp/args.h>
+#include <klib/rc.h>
+
+rc_t report_deletes( Args * args, uint32_t min_len );
+
+#endif
diff --git a/tools/sra-pileup/reref.c b/tools/sra-pileup/reref.c
new file mode 100644
index 0000000..d05dae9
--- /dev/null
+++ b/tools/sra-pileup/reref.c
@@ -0,0 +1,550 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "reref.h"
+
+#include <klib/text.h>
+#include <klib/log.h>
+
+#include <kfs/file.h>
+
+#include <vfs/manager.h>
+#include <vfs/path.h>
+#include <vfs/resolver.h>
+
+#include <align/reference.h>
+
+#include <vdb/manager.h>
+#include <vdb/vdb-priv.h>
+#include <kdb/manager.h>
+
+#include <sysalloc.h>
+#include <stdlib.h>
+
+#if 0
+
+typedef struct report_row_ctx
+{
+    uint32_t prim_idx;
+    uint32_t sec_idx;
+    int64_t row_id;
+} report_row_ctx;
+
+
+static rc_t report_ref_row( const VCursor *cur, report_row_ctx * row_ctx )
+{
+    rc_t rc = 0;
+    uint32_t elem_bits, boff, prim_count, sec_count;
+    const void *base;
+    rc = VCursorCellDataDirect ( cur, row_ctx->row_id, row_ctx->prim_idx, &elem_bits, &base, &boff, &prim_count );
+    if ( rc != 0 )
+    {
+        (void)LOGERR( klogErr, rc, "cannot read colum >PRIMARY_ALIGNMENT_IDS<" );
+    }
+    else
+    {
+        rc = VCursorCellDataDirect ( cur, row_ctx->row_id, row_ctx->sec_idx, &elem_bits, &base, &boff, &sec_count );
+        if ( rc != 0 )
+        {
+            (void)LOGERR( klogErr, rc, "cannot read colum >SECONDARY_ALIGNMENT_IDS<" );
+        }
+        else if ( prim_count > 0 || sec_count > 0 )
+        {
+            rc = KOutMsg( "ROW[ %,lu ]: PRIM:%,u SEC:%,u\n", row_ctx->row_id, prim_count, sec_count );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t report_ref_cursor( const VCursor *cur, int64_t start, int64_t stop )
+{
+    report_row_ctx row_ctx;
+    rc_t rc = VCursorAddColumn ( cur, &row_ctx.prim_idx, "PRIMARY_ALIGNMENT_IDS" );
+    if ( rc != 0 )
+    {
+        (void)LOGERR( klogErr, rc, "cannot add column >PRIMARY_ALIGNMENT_IDS<" );
+    }
+    else
+    {
+        rc = VCursorAddColumn ( cur, &row_ctx.sec_idx, "SECONDARY_ALIGNMENT_IDS" );
+        if ( rc != 0 )
+        {
+            (void)LOGERR( klogErr, rc, "cannot add column >SECONDARY_ALIGNMENT_IDS<" );
+        }
+        else
+        {
+            rc = VCursorOpen ( cur );
+            if ( rc != 0 )
+            {
+                (void)LOGERR( klogErr, rc, "cannot open REFERENCE-CURSOR" );
+            }
+            else
+            {
+                for ( row_ctx.row_id = start; rc == 0 && row_ctx.row_id <= stop; ++row_ctx.row_id )
+                {
+                    rc = report_ref_row( cur, &row_ctx );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t report_ref_table( const VDBManager *vdb_mgr, const char * path, int64_t start, int64_t stop )
+{
+    const VDatabase* db;
+    rc_t rc = VDBManagerOpenDBRead ( vdb_mgr, &db, NULL, "%s", path );
+    if ( rc != 0 )
+    {
+        (void)LOGERR( klogErr, rc, "cannot open vdb-database" );
+    }
+    else
+    {
+        const VTable* tb;
+        rc = VDatabaseOpenTableRead ( db, &tb, "REFERENCE" );
+        if ( rc != 0 )
+        {
+            (void)LOGERR( klogErr, rc, "cannot open REFERENCE-table" );
+        }
+        else
+        {
+            const VCursor *cur;
+            rc = VTableCreateCursorRead ( tb, &cur );
+            if ( rc != 0 )
+            {
+                (void)LOGERR( klogErr, rc, "cannot open REFERENCE-cursor" );
+            }
+            else
+            {
+                rc = report_ref_cursor( cur, start, stop );
+                VCursorRelease( cur );
+            }
+            VTableRelease ( tb );
+        }
+        VDatabaseRelease ( db );
+    }
+    return rc;
+}
+#endif
+
+
+static rc_t report_ref_table2( const ReferenceObj* ref_obj, int64_t start, int64_t stop )
+{
+    rc_t rc = 0;
+    int64_t row_id, max_prim_at, max_sec_at, max_ev_at;
+    uint64_t sum_prim, sum_sec, sum_ev, max_prim, max_sec, max_ev;
+    sum_prim = sum_sec = sum_ev = max_prim = max_sec = max_ev = 0;
+
+    for ( row_id = start; rc == 0 && row_id <= stop; ++row_id )
+    {
+        uint32_t count[ 3 ];
+        rc = ReferenceObj_GetIdCount( ref_obj, row_id, count );
+        if ( rc == 0 )
+        {
+            sum_prim += count[ 0 ];
+            sum_sec  += count[ 1 ];
+            sum_ev   += count[ 2 ];
+
+            if ( count[ 0 ] > max_prim )
+            {
+                max_prim = count[ 0 ];
+                max_prim_at = row_id;
+            }
+            if ( count[ 1 ] > max_sec )
+            {
+                max_sec = count[ 1 ];
+                max_sec_at = row_id;
+            }
+            if ( count[ 2 ] > max_ev )
+            {
+                max_ev = count[ 2 ];
+                max_ev_at = row_id;
+            }
+        }
+    }
+
+    rc = KOutMsg( "alignments:\t%,u PRI\t%,u SEC\t%,u EV\n", sum_prim, sum_sec, sum_ev );
+    if ( rc == 0 && max_prim > 0 )
+    {
+        uint64_t from = ( ( max_prim_at - start ) * 5000 ) + 1;
+        rc = KOutMsg( "max. PRI:\t%,u\tat row #%,i ( from pos: %,u ... %,u )\n", max_prim, max_prim_at, from, from + 4999 );
+    }
+    if ( rc == 0 && max_sec > 0 )
+    {
+        uint64_t from = ( ( max_sec_at - start ) * 5000 ) + 1;
+        rc = KOutMsg( "max. SEC:\t%,u\tat row #%,i ( from pos: %,u ... %,u )\n", max_sec, max_sec_at, from, from + 4999 );
+    }
+    if ( rc == 0 && max_ev > 0 )
+    {
+        uint64_t from = ( ( max_ev_at - start ) * 5000 ) + 1;
+        rc = KOutMsg( "max. EV:\t%,u\tat row #%,i ( from pos: %,u ... %,u )\n", max_ev, max_ev_at, from, from + 4999 );
+    }
+    return rc;
+}
+
+
+const char * ss_Database        = "Database";
+const char * ss_Table           = "Table";
+const char * ss_PrereleaseTbl   = "Prerelease Table";
+const char * ss_Column          = "Column";
+const char * ss_Index           = "Index";
+const char * ss_NotFound        = "not found";
+const char * ss_BadPath         = "bad path";
+const char * ss_File            = "File";
+const char * ss_Dir             = "Dir";
+const char * ss_CharDev         = "CharDev";
+const char * ss_BlockDev        = "BlockDev";
+const char * ss_FIFO            = "FIFO";
+const char * ss_ZombieFile      = "ZombieFile";
+const char * ss_Dataset         = "Dataset";
+const char * ss_Datatype        = "Datatype";
+const char * ss_unknown         = "unknown pathtype";
+
+
+static const char * path_type_2_str( const uint32_t pt )
+{
+    const char * res = ss_unknown;
+    switch ( pt )
+    {
+    case kptDatabase      :   res = ss_Database; break;
+    case kptTable         :   res = ss_Table; break;
+    case kptPrereleaseTbl :   res = ss_PrereleaseTbl; break;
+    case kptColumn        :   res = ss_Column; break;
+    case kptIndex         :   res = ss_Index; break;
+    case kptNotFound      :   res = ss_NotFound; break;
+    case kptBadPath       :   res = ss_BadPath; break;
+    case kptFile          :   res = ss_File; break;
+    case kptDir           :   res = ss_Dir; break;
+    case kptCharDev       :   res = ss_CharDev; break;
+    case kptBlockDev      :   res = ss_BlockDev; break;
+    case kptFIFO          :   res = ss_FIFO; break;
+    case kptZombieFile    :   res = ss_ZombieFile; break;
+    case kptDataset       :   res = ss_Dataset; break;
+    case kptDatatype      :   res = ss_Datatype; break;
+    default               :   res = ss_unknown; break;
+    }
+    return res;
+}
+
+/*
+static rc_t resolve_accession( VFSManager * vfs_mgr, const char * accession, const String ** path )
+{
+    VResolver * resolver;
+    rc_t rc = VFSManagerGetResolver( vfs_mgr, &resolver );
+    if ( rc != 0 )
+        KOutMsg( "cannot get VResolver from VFSManger for '%s'\n", accession );
+    else
+    {
+        VPath * vpath;
+        rc = VFSManagerMakePath( vfs_mgr, &vpath, "ncbi-acc:%s?vdb-ctx=refseq", accession );
+        if ( rc != 0 )
+            KOutMsg( "cannot make VPath from VFSManger for '%s'\n", accession );
+        else
+        {
+            const VPath * local;
+            const VPath * remote;
+
+            rc = VResolverQuery ( resolver, eProtocolHttp, vpath, &local, &remote, NULL );
+            if ( rc != 0 )
+                KOutMsg( "cannot resolve '%s'\n", accession );
+            else
+            {
+                if ( local != NULL )
+                    rc = VPathMakeString( local, path );
+                else 
+                    rc = VPathMakeString( remote, path );
+                if ( local != NULL )
+                    VPathRelease ( local );
+                if ( remote != NULL )
+                    VPathRelease ( remote );
+            }
+            VPathRelease ( vpath );
+        }
+        VResolverRelease( resolver );
+    }
+    return rc;
+}
+*/
+
+static rc_t resolve_accession( VFSManager * vfs_mgr, const char * acc, const String ** resolved )
+{
+	VResolver * resolver;
+	rc_t rc = VFSManagerGetResolver( vfs_mgr, &resolver );
+	if ( rc != 0 )
+	{
+		(void)LOGERR( klogErr, rc, "VFSManagerGetResolver() failed" );
+	}
+	else
+	{
+		VPath * acc_vpath;
+		rc = VFSManagerMakePath( vfs_mgr, &acc_vpath, "ncbi-acc:%s", acc );
+		if ( rc != 0 )
+		{
+			(void)LOGERR( klogErr, rc, "VFSManagerMakePath() failed" );
+		}
+		else
+		{
+			const VPath * local = NULL;
+			const VPath * remote = NULL;
+			rc = VResolverQuery ( resolver, eProtocolHttp, acc_vpath, &local, &remote, NULL );
+			if ( rc != 0 )
+			{
+				(void)LOGERR( klogErr, rc, "VResolverQuery() failed" );
+			}
+			else
+			{
+				if ( local != NULL )
+					rc = VPathMakeString( local, resolved );
+				else if ( remote != NULL )
+					rc = VPathMakeString( remote, resolved );
+				else
+					rc = KOutMsg( "cannot resolve '%s'\n", acc );					
+
+				if ( local != NULL ) VPathRelease ( local );
+				if ( remote != NULL ) VPathRelease ( remote );
+			}
+			VPathRelease ( acc_vpath );
+		}
+		VResolverRelease( resolver );
+	}
+    return rc;
+}
+
+
+static rc_t report_ref_loc( const VDBManager *vdb_mgr, VFSManager * vfs_mgr, const char * seq_id )
+{
+    const String * path;
+    rc_t rc = resolve_accession( vfs_mgr, seq_id, &path );
+    if ( rc == 0 )
+    {
+        rc = KOutMsg( "location:\t%S\n", path );
+        if ( rc == 0 )
+        {
+            uint32_t pt = VDBManagerPathType ( vdb_mgr, "%S", path );
+            const char * spt = path_type_2_str( pt );
+            rc = KOutMsg( "pathtype:\t%s\n", spt );
+        }
+        free ( (void*) path );
+    }
+    return rc;
+}
+
+
+static rc_t report_ref_obj( const VDBManager *vdb_mgr, VFSManager * vfs_mgr, const char * path, uint32_t idx,
+                            const ReferenceObj* ref_obj, bool extended )
+{
+    const char * s;
+    const char * seq_id;
+    INSDC_coord_len len;
+    bool circular, external;
+    int64_t start, stop;
+
+    rc_t rc = ReferenceObj_Name( ref_obj, &s );
+    if ( rc == 0 )
+        rc = KOutMsg( "\nREF[%u].Name     = '%s'\n", idx, s );
+
+    if ( rc == 0 )
+        rc = ReferenceObj_SeqId( ref_obj, &seq_id );
+    if ( rc == 0 )
+        rc = KOutMsg( "REF[%u].SeqId    = '%s'\n", idx, seq_id );
+
+    if ( rc == 0 )
+        rc = ReferenceObj_SeqLength( ref_obj, &len );
+    if ( rc == 0 )
+        rc = KOutMsg( "REF[%u].Length   = %,u\n", idx, len );
+
+    if ( rc == 0 )
+        rc = ReferenceObj_Circular( ref_obj, &circular );
+    if ( rc == 0 )
+        rc = KOutMsg( "REF[%u].Circular = %s\n", idx, circular ? "yes" : "no" );
+
+    if ( rc == 0 )
+        rc = ReferenceObj_IdRange( ref_obj, &start, &stop );
+    if ( rc == 0 )
+        rc = KOutMsg( "REF[%u].IdRange  = [%,lu]...[%,lu]\n", idx, start, stop );
+
+    if ( rc == 0 )
+        rc = ReferenceObj_External( ref_obj, &external, NULL );
+    if ( rc == 0 )
+        rc = KOutMsg( "REF[%u].Extern   = %s\n", idx, external ? "yes" : "no" );
+    if ( rc == 0 && external )
+    {
+        rc = report_ref_loc( vdb_mgr, vfs_mgr, seq_id );
+    }
+
+    if ( rc == 0 && extended )
+        rc = report_ref_table2( ref_obj, start, stop );
+
+    return rc;
+}
+
+
+static rc_t report_ref_database( const VDBManager *vdb_mgr, VFSManager * vfs_mgr, const char * path, bool extended )
+{
+	const VDatabase *db;
+	rc_t rc = VDBManagerOpenDBRead ( vdb_mgr, &db, NULL, "%s", path );
+    if ( rc != 0 )
+    {
+        (void)LOGERR( klogErr, rc, "VDBManagerOpenDBRead() failed" );
+    }
+	else
+	{
+		const ReferenceList * reflist;
+		uint32_t options = ( ereferencelist_usePrimaryIds | ereferencelist_useSecondaryIds | ereferencelist_useEvidenceIds );
+		rc = ReferenceList_MakeDatabase( &reflist, db, options, 0, NULL, 0 );
+		if ( rc != 0 )
+		{
+			(void)LOGERR( klogErr, rc, "ReferenceList_MakeDatabase() failed" );
+		}
+		else
+		{
+			uint32_t count;
+			rc = ReferenceList_Count( reflist, &count );
+			if ( rc != 0 )
+			{
+				(void)LOGERR( klogErr, rc, "ReferenceList_Count() failed" );
+			}
+			else
+			{
+				rc = KOutMsg( "this object uses %u references\n", count );
+				if ( rc == 0 )
+				{
+					uint32_t idx;
+					for ( idx = 0; idx < count && rc == 0; ++idx )
+					{
+						const ReferenceObj* ref_obj;
+						rc = ReferenceList_Get( reflist, &ref_obj, idx );
+						if ( rc != 0 )
+						{
+							(void)LOGERR( klogErr, rc, "ReferenceList_Get() failed" );
+						}
+						else
+						{
+							rc = report_ref_obj( vdb_mgr, vfs_mgr, path, idx, ref_obj, extended );
+							ReferenceObj_Release( ref_obj );
+						}
+					}
+				}
+			}
+			ReferenceList_Release( reflist );
+		}
+		VDatabaseRelease( db );
+    }
+    return rc;
+}
+
+static rc_t report_references( const VDBManager *vdb_mgr, VFSManager * vfs_mgr,
+							   const char * spec, bool extended )
+{
+	const String * resolved = NULL;
+	rc_t rc = resolve_accession( vfs_mgr, spec, &resolved );
+	if ( rc == 0 && resolved != NULL )
+	{
+		rc = KOutMsg( "resolved into '%S'\n", resolved );
+		if ( rc == 0 )
+		{
+			int path_type = ( VDBManagerPathType ( vdb_mgr, "%s", spec ) & ~ kptAlias );
+			switch( path_type )
+			{
+				case kptDatabase : rc = report_ref_database( vdb_mgr, vfs_mgr, spec, extended );
+								   break;
+
+				case kptTable    : KOutMsg( "cannot report references on a table-object\n" );
+									rc = RC ( rcApp, rcNoTarg, rcAccessing, rcParam, rcInvalid );
+									(void)LOGERR( klogErr, rc, "cannot report references on a table-object" );
+								   break;
+
+				default          : KOutMsg( "the given object is not a vdb-database\n" );
+									rc = RC ( rcApp, rcNoTarg, rcAccessing, rcParam, rcInvalid );
+									(void)LOGERR( klogErr, rc, "the given object is not a vdb-database" );
+								   break;
+			}
+		}
+		StringWhack ( resolved );
+	}
+    return rc;
+}
+
+
+rc_t report_on_reference( Args * args, bool extended )
+{
+    uint32_t count;
+    rc_t rc = ArgsParamCount( args, &count );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "ArgsParamCount() failed" );
+    }
+    else
+    {
+        KDirectory *dir; 
+        rc = KDirectoryNativeDir( &dir );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "KDirectoryNativeDir() failed" );
+        }
+        else
+        {
+            const VDBManager *vdb_mgr;
+            rc = VDBManagerMakeRead ( &vdb_mgr, dir );
+            if ( rc != 0 )
+            {
+                LOGERR( klogInt, rc, "VDBManagerMakeRead() failed" );
+            }
+            else
+            {
+                VFSManager * vfs_mgr;
+                rc =  VFSManagerMake ( &vfs_mgr );
+                if ( rc != 0 )
+                {
+                    (void)LOGERR( klogErr, rc, "cannot make vfs-manager" );
+                }
+                else
+                {
+                    uint32_t idx;
+                    for ( idx = 0; idx < count && rc == 0; ++idx )
+                    {
+                        const char *param = NULL;
+                        rc = ArgsParamValue( args, idx, (const void **)&param );
+                        if ( rc != 0 )
+                        {
+                            LOGERR( klogInt, rc, "ArgsParamvalue() failed" );
+                        }
+                        else
+                        {
+                            rc = report_references( vdb_mgr, vfs_mgr, param, extended );
+                        }
+                    }
+                    VFSManagerRelease ( vfs_mgr );
+                }
+                VDBManagerRelease( vdb_mgr );
+            }
+            KDirectoryRelease( dir );
+        }
+    }
+    return rc;
+}
diff --git a/tools/sra-pileup/reref.h b/tools/sra-pileup/reref.h
new file mode 100644
index 0000000..85bbd5d
--- /dev/null
+++ b/tools/sra-pileup/reref.h
@@ -0,0 +1,43 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_reref_
+#define _h_reref_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include <kapp/args.h>
+
+#include <klib/out.h>
+#include <klib/rc.h>
+
+rc_t report_on_reference( Args * args, bool extended );
+
+#endif
diff --git a/tools/sra-pileup/rna_splice_log.c b/tools/sra-pileup/rna_splice_log.c
new file mode 100644
index 0000000..ba26440
--- /dev/null
+++ b/tools/sra-pileup/rna_splice_log.c
@@ -0,0 +1,374 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/rc.h>
+#include <klib/printf.h>
+#include <klib/vector.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+#include <string.h>
+
+#include "rna_splice_log.h"
+
+typedef struct rna_splice_dict rna_splice_dict;
+struct rna_splice_dict
+{
+    KVector * v;
+};
+
+
+struct rna_splice_dict * make_rna_splice_dict( void )
+{
+    struct rna_splice_dict * res = NULL;
+    KVector * v;
+    rc_t rc = KVectorMake ( &v );
+    if ( rc == 0 )
+    {
+        res = calloc( 1, sizeof * res );
+        if ( res != NULL )
+        {
+            res->v = v;
+        }
+        else
+        {
+            KVectorRelease ( v );
+        }
+    }
+    return res;
+}
+
+
+void free_rna_splice_dict( struct rna_splice_dict * dict )
+{
+    if ( dict != NULL )
+    {
+        KVectorRelease ( dict->v );
+        free( dict );
+    }
+}
+
+
+typedef struct splice_dict_key splice_dict_key;
+struct splice_dict_key
+{
+    uint32_t len;
+    uint32_t pos;
+};
+
+union dict_key_union
+{
+    uint64_t key;
+    splice_dict_key key_struct;
+};
+
+union dict_value_union
+{
+    uint64_t value;
+    splice_dict_entry entry;
+};
+
+
+bool rna_splice_dict_get( struct rna_splice_dict * dict,
+                          uint32_t pos, uint32_t len, splice_dict_entry * entry )
+{
+    bool res = false;
+    if ( dict != NULL )
+    {
+        rc_t rc;
+        union dict_key_union ku;
+        union dict_value_union vu;
+
+        ku.key_struct.pos = pos;
+        ku.key_struct.len = len;
+        rc = KVectorGetU64 ( dict->v, ku.key, &(vu.value) );
+        res = ( rc == 0 );
+        if ( res && entry != NULL )
+        {
+            entry->count = vu.entry.count;
+            entry->intron_type = vu.entry.intron_type;
+        }
+    }
+    return res;
+}
+
+
+void rna_splice_dict_set( struct rna_splice_dict * dict,
+                          uint32_t pos, uint32_t len, const splice_dict_entry * entry )
+{
+    if ( dict != NULL && entry != NULL )
+    {
+        union dict_key_union ku;
+        union dict_value_union vu;
+
+        ku.key_struct.pos = pos;
+        ku.key_struct.len = len;
+        vu.entry.count = entry->count;
+        vu.entry.intron_type = entry->intron_type;
+        KVectorSetU64 ( dict->v, ku.key, vu.value );
+    }
+}
+
+
+/* --------------------------------------------------------------------------- */
+
+
+typedef struct rna_splice_log rna_splice_log;
+struct rna_splice_log
+{
+    KFile * log_file;
+    const char * tool_name;
+    struct ReferenceObj const * ref_obj;
+
+    char ref_name[ 1024 ];
+    uint64_t log_file_pos;
+};
+
+
+struct rna_splice_log * make_rna_splice_log( const char * filename, const char * toolname )
+{
+    struct rna_splice_log * res = NULL;
+    KDirectory * dir;
+    rc_t rc = KDirectoryNativeDir ( &dir );
+    if ( rc == 0 )
+    {
+        KFile * f;
+        rc = KDirectoryCreateFile ( dir, &f, false, 0664, kcmInit, "%s", filename );
+        if ( rc == 0 )
+        {
+            res = calloc( 1, sizeof * res );
+            if ( res != NULL )
+            {
+                res->log_file = f;
+                if ( toolname != NULL )
+                    res->tool_name = string_dup_measure ( toolname, NULL );
+            }
+            else
+                KFileRelease ( f );
+        }
+        KDirectoryRelease ( dir );
+    }
+    return res;
+}
+
+
+void free_rna_splice_log( struct rna_splice_log * sl )
+{
+    if ( sl != NULL )
+    {
+        KFileRelease ( sl->log_file );
+        if ( sl->tool_name != NULL ) free( ( void * )sl->tool_name );
+        free( ( void * ) sl );
+    }
+}
+
+
+void rna_splice_log_enter_ref( struct rna_splice_log * sl,
+                               const char * ref_name,
+                               struct ReferenceObj const * ref_obj )
+{
+    if ( sl != NULL )
+    {
+        if ( ref_name != NULL )
+            string_copy_measure ( sl->ref_name, sizeof( sl->ref_name ), ref_name );
+        else
+            sl->ref_name[ 0 ] = 0;
+
+        sl->ref_obj = ref_obj;
+    }
+}
+
+
+static void copy_read_and_reverse_complement( uint8_t * dst, const uint8_t * const src, INSDC_coord_len const count )
+{
+    static char const compl[] = {
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 , '.',  0 , 
+        '0', '1', '2', '3',  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 , 'T', 'V', 'G', 'H',  0 ,  0 , 'C', 
+        'D',  0 ,  0 , 'M',  0 , 'K', 'N',  0 , 
+         0 ,  0 , 'Y', 'S', 'A', 'A', 'B', 'W', 
+         0 , 'R',  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 , 'T', 'V', 'G', 'H',  0 ,  0 , 'C', 
+        'D',  0 ,  0 , 'M',  0 , 'K', 'N',  0 , 
+         0 ,  0 , 'Y', 'S', 'A', 'A', 'B', 'W', 
+         0 , 'R',  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , 
+         0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 ,  0
+    };
+
+    INSDC_coord_len i, j;
+    
+    for ( i = 0, j = count - 1; i != count; ++i, --j )
+    {
+        dst[ i ] = compl[ src[ j ] ];
+    }
+}
+
+
+#define PRE_POST_LEN 10
+#define EDGE_LEN ( ( PRE_POST_LEN * 2 ) + 2 )
+
+
+static rc_t write_to_file( struct rna_splice_log * sl, const uint8_t * src, size_t len )
+{
+    size_t num_writ;
+    rc_t rc = KFileWriteAll( sl->log_file, sl->log_file_pos, src, len, &num_writ );
+    if ( rc == 0 )
+        sl->log_file_pos += num_writ;
+    return rc;
+}
+
+static rc_t print_edge( struct rna_splice_log * sl,
+                        INSDC_coord_zero pos,
+                        bool const reverse_complement,
+                        bool const add_newline )
+{
+    rc_t rc;
+    INSDC_coord_len from_ref_obj, to_read;
+    uint8_t buffer[ EDGE_LEN + 1 ];
+    INSDC_coord_zero rd_pos = 0;
+    uint32_t pre_len = PRE_POST_LEN;
+    uint32_t post_len = PRE_POST_LEN;
+
+    if ( pos >= PRE_POST_LEN )
+        rd_pos = ( pos - PRE_POST_LEN ); /* in the rare case the delete is at the very beginning of the alignment */
+    else
+        pre_len = pos; /* rd_pos is still 0, what we want*/
+
+    to_read = pre_len + post_len + 2;
+    rc = ReferenceObj_Read( sl->ref_obj, rd_pos, to_read, buffer, &from_ref_obj );
+    if ( rc == 0 )
+    {
+        uint8_t complement[ EDGE_LEN + 1 ];
+        uint8_t to_write[ EDGE_LEN + 5 ];
+        uint8_t * ref_bytes = buffer;
+
+        if ( from_ref_obj < to_read )
+            post_len -= ( to_read - from_ref_obj );
+
+        if ( reverse_complement )
+        {
+            copy_read_and_reverse_complement( complement, buffer, from_ref_obj );
+            ref_bytes = complement;
+        }
+        memcpy( to_write, ref_bytes, pre_len );
+        to_write[ pre_len ] = '\t';
+        to_write[ pre_len + 1 ] = ref_bytes[ pre_len ];
+        to_write[ pre_len + 2 ] = ref_bytes[ pre_len + 1 ];
+        to_write[ pre_len + 3 ] = '\t';
+        memcpy( &( to_write[ pre_len + 4 ] ), &( ref_bytes[ pre_len + 2 ] ), post_len );
+
+        if ( add_newline )
+            to_write[ pre_len + post_len + 4 ] = '\n';
+        else
+            to_write[ pre_len + post_len + 4 ] = '\t';
+
+        rc = write_to_file( sl, to_write, pre_len + post_len + 5 );
+    }
+    return rc;
+}
+
+
+/*
+#define INTRON_UNKNOWN 0
+#define INTRON_FWD 1
+#define INTRON_REV 2
+*/
+
+static const char intron_type_to_ascii[] = { 'u', '+', '-', 'u' };
+
+static rc_t CC on_dict_key_value( uint64_t key, uint64_t value, void * user_data )
+{
+    rc_t rc = 0;
+    struct rna_splice_log * sl = ( struct rna_splice_log * )user_data;
+    if ( sl != NULL )
+    {
+        char tmp[ 512 ];
+        size_t num_writ;
+        union dict_key_union ku;
+        union dict_value_union vu;
+        char intron;
+        bool reverse_complement;
+
+        ku.key = key;
+        vu.value = value;
+        intron = intron_type_to_ascii[ vu.entry.intron_type & 0x03 ];
+        reverse_complement = ( ( vu.entry.intron_type & 0x03 ) == INTRON_REV );
+
+        rc = string_printf ( tmp, sizeof tmp, &num_writ,
+                             "%s\t%u\t%u\t%u\t%c\t",
+                             sl->ref_name, ku.key_struct.pos + 1, ku.key_struct.len, vu.entry.count, intron );
+        if ( rc == 0 )
+            rc = write_to_file( sl, ( uint8_t * )tmp, num_writ );
+
+        if ( reverse_complement )
+        {
+            if ( rc == 0 )
+                rc = print_edge( sl, ku.key_struct.pos + ku.key_struct.len - 2, true, false );
+            if ( rc == 0 )
+                rc = print_edge( sl, ku.key_struct.pos, true, true );
+        }
+        else
+        {
+            if ( rc == 0 )
+                rc = print_edge( sl, ku.key_struct.pos, false, false );
+            if ( rc == 0 )
+                rc = print_edge( sl, ku.key_struct.pos + ku.key_struct.len - 2, false, true );
+        }
+    }
+    return rc;
+}
+
+
+void rna_splice_log_exit_ref( struct rna_splice_log * sl, struct rna_splice_dict * dict )
+{
+    if ( sl != NULL && dict != NULL )
+    {
+        KVectorVisitU64 ( dict->v, false, on_dict_key_value, sl );
+    }
+}
+
diff --git a/tools/sra-pileup/rna_splice_log.h b/tools/sra-pileup/rna_splice_log.h
new file mode 100644
index 0000000..feb98eb
--- /dev/null
+++ b/tools/sra-pileup/rna_splice_log.h
@@ -0,0 +1,87 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_rna_splice_log_
+#define _h_rna_splice_log_
+
+#include <insdc/insdc.h>
+#include <align/reference.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define INTRON_UNKNOWN 0
+#define INTRON_FWD 1
+#define INTRON_REV 2
+
+typedef struct splice_dict_entry splice_dict_entry;
+struct splice_dict_entry
+{
+    uint32_t count;
+    uint32_t intron_type;
+};
+
+struct rna_splice_dict;
+
+struct rna_splice_dict * make_rna_splice_dict( void );
+
+void free_rna_splice_dict( struct rna_splice_dict * dict );
+
+bool rna_splice_dict_get( struct rna_splice_dict * dict,
+                          uint32_t pos,
+                          uint32_t len,
+                          splice_dict_entry * entry );
+
+void rna_splice_dict_set( struct rna_splice_dict * dict,
+                          uint32_t pos,
+                          uint32_t len,
+                          const splice_dict_entry * entry );
+
+/* --------------------------------------------------------------------------- */
+
+
+struct rna_splice_log;
+
+struct rna_splice_log * make_rna_splice_log( const char * filename,
+                                             const char * toolname );
+
+void free_rna_splice_log( struct rna_splice_log * sl );
+
+void rna_splice_log_enter_ref( struct rna_splice_log * sl,
+                               const char * ref_name,
+                               struct ReferenceObj const * ref_obj );
+
+void rna_splice_log_exit_ref( struct rna_splice_log * sl,
+                              struct rna_splice_dict * dict );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_rna_splice_log_ */
diff --git a/tools/sra-pileup/sam-aligned.c b/tools/sra-pileup/sam-aligned.c
new file mode 100644
index 0000000..ce1b601
--- /dev/null
+++ b/tools/sra-pileup/sam-aligned.c
@@ -0,0 +1,2367 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <align/manager.h>
+#include <align/iterator.h>
+#include <kapp/main.h>
+#include <ctype.h>
+#include <sysalloc.h>
+
+#include "read_fkt.h"
+#include "cg_tools.h"
+#include "rna_splice_log.h"
+#include "sam-aligned.h"
+#include "md_flag.h"
+
+const char * PRIM_TABLE = "PRIMARY_ALIGNMENT";
+const char * SEC_TABLE = "SECONDARY_ALIGNMENT";
+const char * EV_INT_TABLE = "EVIDENCE_INTERVAL";
+const char * EV_AL_TABLE = "EVIDENCE_ALIGNMENT";
+
+
+/* -------------------------------------------------------------------------------------------
+    column                      PRIM    SEC     EV_INT      EV_ALIGN ( outside of iterator )
+
+    SEQ_SPOT_ID                 X       X       -           X
+    SAM_FLAGS                   X       X       -           -
+    CIGAR_LONG                  X       X       X           X 
+    CIGAR_SHORT                 X       X       X           X
+    CIGAR_LONG_LEN              X       X       X           X 
+    CIGAR_SHORT_LEN             X       X       X           X
+    MATE_ALIGN_ID               X       X       -           -
+    MATE_REF_NAME               X       X       -           -
+    MATE_REF_POS                X       X       -           -
+    TEMPLATE_LEN                X       X       -           -
+    READ                        X       X       X           X
+    READ_LEN                    X       X       X           X
+    MISMATCH_READ               X       X       X           X
+    SAM_QUALITY                 X       X       X           X
+    REF_ORIENTATION             X       X       X           X
+    EDIT_DISTANCE               X       X       X           X
+    SEQ_SPOT_GROUP              X       X       -           X
+    SEQ_READ_ID                 X       X       -           X
+    RAW_READ                    X       X       X           X
+    READ_FILTER                 X       X       X           X
+    EVIDENCE_ALIGNMENT_IDS      -       -       X           -
+    REF_POS                                                 o
+    REF_PLOIDY                                              o
+    ALIGNMENT_COUNT             X       X       -           X
+    SEQ_NAME                                                X
+    MAPQ                                                    X
+    ALIGN_GROUP                 X       -       -           -
+    RNA_ORIENTATION             X       X
+    LINKAGE_GROUP               X       X
+   -------------------------------------------------------------------------------------------*/
+
+
+#define COL_NOT_AVAILABLE 0xFFFFFFFF
+
+#define COL_SEQ_SPOT_ID "(I64)SEQ_SPOT_ID"
+#define COL_SAM_FLAGS "(U32)SAM_FLAGS"
+#define COL_LONG_CIGAR "(ascii)CIGAR_LONG"
+#define COL_SHORT_CIGAR "(ascii)CIGAR_SHORT"
+#define COL_MATE_ALIGN_ID "(I64)MATE_ALIGN_ID"
+#define COL_MATE_REF_NAME "(ascii)MATE_REF_NAME"
+#define COL_MATE_REF_POS "(INSDC:coord:zero)MATE_REF_POS"
+#define COL_TEMPLATE_LEN "(I32)TEMPLATE_LEN"
+#define COL_MISMATCH_READ "(ascii)MISMATCH_READ"
+#define COL_SAM_QUALITY "(INSDC:quality:text:phred_33)SAM_QUALITY"
+#define COL_REF_ORIENTATION "(bool)REF_ORIENTATION"
+#define COL_EDIT_DIST "(U32)EDIT_DISTANCE"
+#define COL_SEQ_SPOT_GROUP "(ascii)SEQ_SPOT_GROUP"
+#define COL_SEQ_READ_ID "(INSDC:coord:one)SEQ_READ_ID"
+#define COL_RAW_READ "(INSDC:dna:text)RAW_READ"
+#define COL_PLOIDY "(NCBI:align:ploidy)PLOIDY"
+#define COL_CIGAR_LONG_LEN "(INSDC:coord:len)CIGAR_LONG_LEN"
+#define COL_CIGAR_SHORT_LEN "(INSDC:coord:len)CIGAR_SHORT_LEN"
+#define COL_READ_LEN "(INSDC:coord:len)READ_LEN"
+#define COL_EV_ALIGNMENTS "(I64)EVIDENCE_ALIGNMENT_IDS"
+#define COL_REF_POS "(INSDC:coord:zero)REF_POS"
+#define COL_REF_PLOIDY "(U32)REF_PLOIDY"
+#define COL_READ_FILTER "(INSDC:SRA:read_filter)READ_FILTER"
+#define COL_AL_COUNT "(U8)ALIGNMENT_COUNT"
+#define COL_SEQ_NAME "(ascii)SEQ_NAME"
+#define COL_MAPQ "(I32)MAPQ"
+#define COL_ALIGN_GROUP "(ascii)ALIGN_GROUP"
+#define COL_RNA_ORIENTATION "(ascii)RNA_ORIENTATION"
+#define COL_LNK_GROUP "(ascii)LINKAGE_GROUP"
+
+enum align_table_type
+{
+    att_primary = 0,
+    att_secondary,
+    att_evidence
+};
+
+
+/* the part common to prim/sec/ev-alignment */
+typedef struct align_cmn_context
+{
+    const VCursor * cursor;
+
+    uint32_t seq_spot_id_idx;
+    uint32_t cigar_idx;
+    uint32_t cigar_len_idx;
+    uint32_t read_idx;
+    uint32_t read_len_idx;
+    uint32_t edit_dist_idx;
+    uint32_t seq_spot_group_idx;
+    uint32_t seq_read_id_idx;
+    uint32_t raw_read_idx;
+    uint32_t sam_quality_idx;
+    uint32_t ref_orientation_idx;
+    uint32_t read_filter_idx;
+    uint32_t al_count_idx;
+} align_cmn_context;
+
+
+typedef struct align_table_context
+{
+    CigOps * cig_op_buffer;
+    uint32_t cig_op_buffer_len;
+
+    /* which Reference-Obj in the ReferenceList we are aligning against... */
+    const ReferenceObj* ref_obj;
+    uint32_t ref_idx;
+
+    /* which index into the input-files object / needed to distinguish cache entries with the same number
+       but comming from different input-files */
+    uint32_t db_idx;
+
+    /* objects of which table are we aligning PRIM/SEC/EV ? */
+    enum align_table_type align_table_type;
+
+    /* the part common to prim/sec/ev-alignment */
+    align_cmn_context cmn;
+
+    /* this is specific to pim/sec */
+    uint32_t sam_flags_idx;
+    uint32_t mate_align_id_idx;
+    uint32_t mate_ref_name_idx;
+    uint32_t mate_ref_pos_idx;
+    uint32_t tlen_idx;
+    uint32_t rna_orientation_idx;
+
+    /* this is only in prim */
+    uint32_t al_group_idx;
+    uint32_t lnk_group_idx;
+    
+    /* this is specific to ev-interval/ev-alignmnet */
+    uint32_t ploidy_idx;
+    uint32_t ev_alignments_idx;
+    uint32_t ref_pos_idx;
+    uint32_t ref_ploidy_idx;
+    uint32_t seq_name_idx;
+    uint32_t mapq_idx;
+
+    /* the common part repeats for evidence-alignment */
+    align_cmn_context eval;
+} align_table_context;
+
+
+static void invalidate_all_cmn_column_idx( align_cmn_context * const actx )
+{
+    actx->seq_spot_id_idx       = COL_NOT_AVAILABLE;
+    actx->cigar_idx             = COL_NOT_AVAILABLE;    
+    actx->cigar_len_idx         = COL_NOT_AVAILABLE;
+    actx->read_idx              = COL_NOT_AVAILABLE;
+    actx->read_len_idx          = COL_NOT_AVAILABLE;    
+    actx->edit_dist_idx         = COL_NOT_AVAILABLE;
+    actx->seq_spot_group_idx    = COL_NOT_AVAILABLE;
+    actx->seq_read_id_idx       = COL_NOT_AVAILABLE;
+    actx->raw_read_idx          = COL_NOT_AVAILABLE;
+    actx->sam_quality_idx       = COL_NOT_AVAILABLE;
+    actx->ref_orientation_idx   = COL_NOT_AVAILABLE;
+    actx->read_filter_idx       = COL_NOT_AVAILABLE;
+    actx->al_count_idx          = COL_NOT_AVAILABLE;
+}
+
+static void invalidate_all_column_idx( align_table_context * const atx )
+{
+    atx->sam_flags_idx      = COL_NOT_AVAILABLE;
+    atx->mate_align_id_idx  = COL_NOT_AVAILABLE;
+    atx->mate_ref_name_idx  = COL_NOT_AVAILABLE;
+    atx->mate_ref_pos_idx   = COL_NOT_AVAILABLE;
+    atx->tlen_idx           = COL_NOT_AVAILABLE;
+    atx->rna_orientation_idx= COL_NOT_AVAILABLE;
+    atx->ploidy_idx         = COL_NOT_AVAILABLE;
+    atx->ev_alignments_idx  = COL_NOT_AVAILABLE;
+    atx->ref_pos_idx        = COL_NOT_AVAILABLE;
+    atx->ref_ploidy_idx     = COL_NOT_AVAILABLE;
+    atx->seq_name_idx       = COL_NOT_AVAILABLE;
+    atx->mapq_idx           = COL_NOT_AVAILABLE;
+    atx->al_group_idx       = COL_NOT_AVAILABLE;
+    atx->lnk_group_idx      = COL_NOT_AVAILABLE;
+    invalidate_all_cmn_column_idx( &atx->cmn );
+    invalidate_all_cmn_column_idx( &atx->eval );
+}
+
+
+static void init_align_table_context( align_table_context * const atx,
+                                      const uint32_t db_idx,
+                                      const ReferenceObj* ref_obj )
+{
+    atx->db_idx = db_idx;
+    atx->ref_obj = ref_obj;
+    atx->cig_op_buffer = NULL;
+    atx->cig_op_buffer_len = 0;
+    invalidate_all_column_idx( atx );
+}
+
+
+static void free_align_table_context( align_table_context * atx )
+{
+    if ( atx != NULL )
+    {
+        if ( atx->cig_op_buffer != NULL )
+            free( atx->cig_op_buffer );
+
+        VCursorRelease( atx->cmn.cursor );
+        VCursorRelease( atx->eval.cursor );
+        free( atx );
+    }
+}
+
+
+static rc_t adjust_align_table_context_cig_op_buffer( align_table_context * atx, uint32_t read_len )
+{
+    rc_t rc = 0;
+
+    uint32_t reqested = ( read_len * 3 );
+    if ( reqested < 1024 ) reqested = 1024;
+
+    if ( atx->cig_op_buffer_len < reqested )
+    {
+        void * org_buffer = NULL;
+
+        if ( atx->cig_op_buffer == NULL )
+            atx->cig_op_buffer = malloc( reqested );
+        else
+        {
+            org_buffer = atx->cig_op_buffer;
+            atx->cig_op_buffer = realloc( org_buffer, reqested );
+        }
+
+        if ( atx->cig_op_buffer == NULL )
+        {
+            rc = RC( rcExe, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            (void)LOGERR( klogInt, rc, "cigar-op-buffer-allocation failed" );
+            if ( org_buffer != NULL )
+                free( org_buffer );
+        }
+        else
+        {
+            atx->cig_op_buffer_len = reqested;
+        }
+    }
+
+    return rc;
+}
+
+
+/* src: 'P'rimary, 'S'econdary, Evidence_'I'nterval, Evidence_'A'lignment */
+static rc_t prepare_cmn_table_rows( const samdump_opts * const opts,
+                                    const VTable * tbl,
+                                    align_cmn_context * const cmn,
+                                    char src,
+                                    struct KNamelist * available_columns )
+{
+    rc_t rc = 0;
+    const VCursor * cursor = cmn->cursor;
+
+    if ( src == 'P' || src == 'S' )
+        rc = add_column( cursor, COL_SEQ_SPOT_ID, &cmn->seq_spot_id_idx ); /* read_fkt.c */
+
+    if ( rc == 0 )
+    {
+        if ( opts->use_long_cigar )
+        {
+            rc = add_column( cursor, COL_LONG_CIGAR, &cmn->cigar_idx ); /* read_fkt.c */
+            if ( rc == 0 && ( src == 'I' || src == 'A' ) )
+                rc = add_column( cursor, COL_CIGAR_LONG_LEN, &cmn->cigar_len_idx ); /* read_fkt.c */
+        }
+        else
+        {
+            rc = add_column( cursor, COL_SHORT_CIGAR, &cmn->cigar_idx ); /* read_fkt.c */
+            if ( rc == 0 && ( src == 'I' || src == 'A' ) )
+                rc = add_column( cursor, COL_CIGAR_SHORT_LEN, &cmn->cigar_len_idx ); /* read_fkt.c */
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        if ( opts->print_matches_as_equal_sign )
+            rc = add_column( cursor, COL_MISMATCH_READ, &cmn->read_idx ); /* read_fkt.c */
+        else
+            rc = add_column( cursor, COL_READ, &cmn->read_idx ); /* read_fkt.c */
+    }
+
+    if ( rc == 0 )
+        rc = add_column( cursor, COL_READ_LEN, &cmn->read_len_idx ); /* read_fkt.c */
+
+    if ( rc == 0 )
+        rc = add_column( cursor, COL_SAM_QUALITY, &cmn->sam_quality_idx ); /* read_fkt.c */
+
+    if ( rc == 0 )
+        rc = add_column( cursor, COL_REF_ORIENTATION, &cmn->ref_orientation_idx ); /* read_fkt.c */
+
+    if ( rc == 0 )
+        rc = add_column( cursor, COL_EDIT_DIST, &cmn->edit_dist_idx ); /* read_fkt.c */
+
+    if ( rc == 0 && ( src == 'P' || src == 'S' || src == 'A' ) )
+        rc = add_column( cursor, COL_SEQ_SPOT_GROUP, &cmn->seq_spot_group_idx ); /* read_fkt.c */
+
+    if ( rc == 0 && ( src == 'P' || src == 'S' || src == 'A' ) )
+        rc = add_column( cursor, COL_SEQ_READ_ID, &cmn->seq_read_id_idx ); /* read_fkt.c */
+
+    if ( rc == 0 )
+        rc = add_column( cursor, COL_RAW_READ, &cmn->raw_read_idx ); /* read_fkt.c */
+
+    if ( rc == 0 )
+        rc = add_column( cursor, COL_READ_FILTER, &cmn->read_filter_idx ); /* read_fkt.c */
+
+    if ( rc == 0 && ( src == 'P' || src == 'S' || src == 'A' ) )
+        add_opt_column( cursor, available_columns, COL_AL_COUNT, &cmn->al_count_idx ); /* read_fkt.c */
+
+    return rc;
+}
+
+
+static rc_t prepare_prim_sec_table_cursor( const samdump_opts * const opts,
+                                           const VDatabase * db,
+                                           const char * table_name,
+                                           align_table_context * const atx )
+{
+    const VTable *tbl;
+    rc_t rc = VDatabaseOpenTableRead( db, &tbl, "%s", table_name );
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogInt, ( klogInt, rc, "VDatabaseOpenTableRead( $(tn) ) failed", "tn=%s", table_name ) );
+    }
+    else
+    {
+        if ( opts->cursor_cache_size == 0 )
+            rc = VTableCreateCursorRead( tbl, &atx->cmn.cursor );
+        else
+            rc = VTableCreateCachedCursorRead( tbl, &atx->cmn.cursor, opts->cursor_cache_size );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VTableCreateCursorRead( $(tn) ) failed", "tn=%s", table_name ) );
+        }
+        else
+        {
+            struct KNamelist * available_columns;
+            char table_char = 'P';
+            const VCursor * cursor = atx->cmn.cursor;
+            
+            if ( cmp_pchar( table_name, "SECONDARY_ALIGNMENT" ) == 0 )
+                table_char = 'S';
+            
+            rc = VTableListReadableColumns ( tbl, &available_columns );
+            if ( rc != 0 )
+            {
+                (void)PLOGERR( klogInt, ( klogInt, rc, 
+                    "VTableListReadableColumns( $(src) ) failed", "src=%c", table_char ) );
+            }
+            else
+            {
+                rc = prepare_cmn_table_rows( opts, tbl, &atx->cmn, table_char, available_columns );
+
+                if ( rc == 0 )
+                    rc = add_column( cursor, COL_SAM_FLAGS, &atx->sam_flags_idx ); /* read_fkt.c */
+
+                /*  i don't have to add REF_NAME or REF_SEQ_ID, because i have it from the ref_obj later
+                    i don't have to add REF_POS, because i have it from the iterator later
+                    i don't have to add MAPQ, it is in the PlacementRecord later
+                        ... when walking the iterator ...
+                */
+                if ( rc == 0 )
+                    rc = add_column( cursor, COL_MATE_ALIGN_ID, &atx->mate_align_id_idx ); /* read_fkt.c */
+                if ( rc == 0 )
+                    rc = add_column( cursor, COL_MATE_REF_NAME, &atx->mate_ref_name_idx ); /* read_fkt.c */
+                if ( rc == 0 )
+                    rc = add_column( cursor, COL_MATE_REF_POS, &atx->mate_ref_pos_idx ); /* read_fkt.c */
+                if ( rc == 0 )
+                    rc = add_column( cursor, COL_TEMPLATE_LEN, &atx->tlen_idx ); /* read_fkt.c */
+                if ( rc == 0 )
+                    add_opt_column( cursor, available_columns, COL_RNA_ORIENTATION, &atx->rna_orientation_idx ); /* read_fkt.c */
+
+                if ( table_char == 'P' )
+                {
+                    if ( rc == 0 )
+                        add_opt_column( cursor, available_columns, COL_ALIGN_GROUP, &atx->al_group_idx ); /* read_fkt.c */
+
+                    if ( rc == 0  )
+                        add_opt_column( cursor, available_columns, COL_LNK_GROUP, &atx->lnk_group_idx ); /* read_fkt.c */
+                }
+                
+                KNamelistRelease( available_columns );
+            }
+            if ( rc != 0 )
+                VCursorRelease( cursor );
+        }
+        VTableRelease ( tbl ); /* the cursor keeps the table alive */
+    }
+    return rc;
+}
+
+
+static rc_t prepare_sub_ev_alignment_table_cursor( const samdump_opts * const opts,
+                                                   const VDatabase * db,
+                                                   align_table_context * const atx )
+{
+    rc_t rc = add_column( atx->cmn.cursor, COL_EV_ALIGNMENTS, &atx->ev_alignments_idx );
+    if ( rc == 0 )
+    {
+        const VTable *evidence_alignment_tbl;
+        rc = VDatabaseOpenTableRead( db, &evidence_alignment_tbl, EV_AL_TABLE );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VDatabaseOpenTableRead( $(tn) ) failed", "tn=%s", EV_AL_TABLE ) );
+        }
+        else
+        {
+            if ( opts->cursor_cache_size == 0 )
+                rc = VTableCreateCursorRead( evidence_alignment_tbl, &atx->eval.cursor );
+            else
+                rc = VTableCreateCachedCursorRead( evidence_alignment_tbl, &atx->eval.cursor, opts->cursor_cache_size );
+            if ( rc != 0 )
+            {
+                (void)PLOGERR( klogInt, ( klogInt, rc, "VTableCreateCursorRead( $(tn) ) failed", "tn=%s", EV_AL_TABLE ) );
+            }
+            else
+            {
+                struct KNamelist * available_columns;
+
+                rc = VTableListReadableColumns ( evidence_alignment_tbl, &available_columns );
+                if ( rc != 0 )
+                {
+                    (void)PLOGERR( klogInt, ( klogInt, rc, 
+                        "VTableListReadableColumns( $(src) ) failed", "src=%c", 'A' ) );
+                }
+                else
+                {
+                    rc = prepare_cmn_table_rows( opts, evidence_alignment_tbl, &atx->eval,
+                                'A', available_columns ); /* common to prim/sec/ev-align */
+                    KNamelistRelease( available_columns );
+                }
+                
+                if ( rc == 0 )
+                {
+                    /* special to ev-align */
+                    rc = add_column( atx->eval.cursor, COL_REF_POS, &atx->ref_pos_idx ); /* read_fkt.c */
+                    if ( rc == 0 )
+                        rc = add_column( atx->eval.cursor, COL_REF_PLOIDY, &atx->ref_ploidy_idx ); /* read_fkt.c */
+                    if ( rc == 0 )
+                        rc = add_column( atx->eval.cursor, COL_SEQ_NAME, &atx->seq_name_idx ); /* read_fkt.c */
+                    if ( rc == 0 )
+                        rc = add_column( atx->eval.cursor, COL_MAPQ, &atx->mapq_idx ); /* read_fkt.c */
+                }
+                rc = VCursorOpen( atx->eval.cursor );
+                if ( rc != 0 )
+                {
+                    (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorOpen( $(tn) ) failed", "tn=%s", EV_AL_TABLE ) );
+                }
+            }
+            VTableRelease ( evidence_alignment_tbl ); /* the cursor keeps the table alive */
+        }
+    }
+    return rc;
+}
+
+
+static rc_t prepare_evidence_table_cursor( const samdump_opts * const opts,
+                                           const VDatabase * db,
+                                           const char * table_name,
+                                           align_table_context * const atx )
+{
+    const VTable *evidence_interval_tbl;
+    rc_t rc = VDatabaseOpenTableRead( db, &evidence_interval_tbl, "%s", table_name );
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogInt, ( klogInt, rc, "VDatabaseOpenTableRead( $(tn) ) failed", "tn=%s", table_name ) );
+    }
+    else
+    {
+        if ( opts->cursor_cache_size == 0 )
+            rc = VTableCreateCursorRead( evidence_interval_tbl, &atx->cmn.cursor );
+        else
+            rc = VTableCreateCachedCursorRead( evidence_interval_tbl, &atx->cmn.cursor, opts->cursor_cache_size );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VTableCreateCursorRead( $(tn) ) failed", "tn=%s", table_name ) );
+        }
+        else
+        {
+            struct KNamelist * available_columns;
+
+            rc = VTableListReadableColumns ( evidence_interval_tbl, &available_columns );
+            if ( rc != 0 )
+            {
+                (void)PLOGERR( klogInt, ( klogInt, rc, 
+                    "VTableListReadableColumns( $(src) ) failed", "src=%c", 'I' ) );
+            }
+            else
+            {
+                rc = prepare_cmn_table_rows( opts, evidence_interval_tbl, &atx->cmn,
+                            'I', available_columns ); /* common to prim/sec/ev-align */
+                KNamelistRelease( available_columns );
+            }
+        
+            if ( rc == 0 )
+                rc = add_column( atx->cmn.cursor, COL_PLOIDY, &atx->ploidy_idx ); /* read_fkt.c */
+
+            if ( rc == 0 && ( opts->dump_cg_sam || opts->dump_cg_ev_dnb ) )
+                rc = prepare_sub_ev_alignment_table_cursor( opts, db, atx );
+
+            if ( rc != 0 )
+                VCursorRelease( atx->cmn.cursor );
+        }
+        VTableRelease ( evidence_interval_tbl ); /* the cursor keeps the table alive */
+    }
+    return rc;
+}
+
+
+static rc_t add_table_pl_iter( const samdump_opts * const opts,
+                               PlacementSetIterator * const set_iter,
+                               const ReferenceObj * const ref_obj,
+                               const input_database * const idb,
+                               INSDC_coord_zero ref_pos,
+                               INSDC_coord_len ref_len,
+                               const char * spot_group,
+                               const char * table_name,
+                               align_id_src id_src_selector,
+                               Vector * const context_list )
+{
+    rc_t rc = 0;
+    align_table_context * atx;
+    PlacementRecordExtendFuncs ext_0; /* ReferenceObj_MakePlacementIterator makes copies of the elements */
+
+    memset( &ext_0, 0, sizeof ext_0 );
+    atx = calloc( 1, sizeof * atx );
+    if ( atx == NULL )
+    {
+        rc = RC( rcExe, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        (void)PLOGERR( klogInt, ( klogInt, rc, "align-context-allocation for $(tn) failed", "tn=%s", table_name ) );
+    }
+    else
+    {
+        init_align_table_context( atx, idb->db_idx, ref_obj );
+        rc = ReferenceObj_Idx( ref_obj, &atx->ref_idx );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "failed to detect ref-idx for $(tn) failed", "tn=%s", table_name ) );
+        }
+        else
+        {
+            switch( id_src_selector )
+            {
+                case primary_align_ids   :  atx->align_table_type = att_primary;
+                                            rc = prepare_prim_sec_table_cursor( opts, idb->db, table_name, atx );
+                                            break;
+
+                case secondary_align_ids :  atx->align_table_type = att_secondary;
+                                            rc = prepare_prim_sec_table_cursor( opts, idb->db, table_name, atx );
+                                            break;
+
+                case evidence_align_ids  :  atx->align_table_type = att_evidence;
+                                            rc = prepare_evidence_table_cursor( opts, idb->db, table_name, atx );
+                                            break;
+            }
+        }
+        if ( rc == 0 )
+        {
+            ext_0.data = atx;
+            /* we must put the atx-ptr into a global list, in order to close everything later at the end... */
+        }
+        else
+            free_align_table_context( atx );
+    }
+
+    if ( rc == 0 )
+    {
+        int32_t min_mapq = 0;
+        PlacementIterator *pl_iter;
+
+        if ( opts->use_min_mapq )
+            min_mapq = opts->min_mapq;
+
+        rc = ReferenceObj_MakePlacementIterator( ref_obj, /* the reference-obj it is made from */
+            &pl_iter,           /* the placement-iterator we want to make */
+            ref_pos,            /* where it starts on the reference */
+            ref_len,            /* the whole length of this reference/chromosome */
+            min_mapq,           /* no minimal mapping-quality to filter out */
+            NULL,               /* no special reference-cursor */
+            atx->cmn.cursor,    /* a cursor into the PRIMARY/SECONDARY/EVIDENCE-table */
+            id_src_selector,    /* what ID-source to select from REFERENCE-table (ref_obj) */
+            &ext_0,             /* placement-record extensions #0 with data-ptr pointing to cursor/index-struct */
+            NULL,               /* no placement-record extensions #1 */
+            spot_group,         /* optional spotgroup re-grouping */
+            NULL                /* source-cursor specific data/context */
+            );
+        if ( rc == 0 )
+        {
+            rc = PlacementSetIteratorAddPlacementIterator ( set_iter, pl_iter );
+            /* if the iterator-set was not able to take ownership of the new iterator
+               we have to release the iterator right here! */
+            if ( rc != 0 )
+                PlacementIteratorRelease( pl_iter );
+
+            /* if the new iterator has actually no placements inside, the call
+               to PlacementSetIteratorAddPlacementIterator() returned rcDone, which is OK - we continue... */
+            if ( GetRCState( rc ) == rcDone ) { rc = 0; }
+        }
+    }
+
+    if ( rc == 0 )
+        rc = VectorAppend ( context_list, NULL, atx );
+    return rc;
+}
+
+
+static rc_t add_pl_iters( const samdump_opts * const opts,
+                          PlacementSetIterator * const set_iter,
+                          const ReferenceObj * const ref_obj,
+                          const input_database * const idb,
+                          INSDC_coord_zero ref_pos,
+                          INSDC_coord_len ref_len,
+                          const char * spot_group,
+                          Vector * const context_list )
+{
+    KNamelist *tables;
+    rc_t rc = VDatabaseListTbl( idb->db, &tables );
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogInt, ( klogInt, rc, "VDatabaseListTbl( $(tn) ) failed", "tn=%s", idb->path ) );
+    }
+    else
+    {
+        if ( opts->dump_primary_alignments && namelist_contains( tables, PRIM_TABLE ) ) /* read_fkt.c */
+        {
+            rc = add_table_pl_iter( opts, set_iter, ref_obj, idb, ref_pos, ref_len, spot_group, 
+                                    PRIM_TABLE, primary_align_ids, context_list );
+        }
+
+        if ( rc == 0 && opts->dump_secondary_alignments && namelist_contains( tables, SEC_TABLE ) )
+        {
+            rc = add_table_pl_iter( opts, set_iter, ref_obj, idb, ref_pos, ref_len, spot_group, 
+                                    SEC_TABLE, secondary_align_ids, context_list );
+        }
+
+        if ( rc == 0 )
+        {
+            bool b0 = ( opts->dump_cg_evidence && 
+                        namelist_contains( tables, EV_INT_TABLE ) );
+
+            bool b1 = ( ( opts->dump_cg_sam || opts->dump_cg_ev_dnb ) && 
+                        namelist_contains( tables, EV_INT_TABLE ) &&
+                        namelist_contains( tables, EV_AL_TABLE ) );
+
+            if ( b0 || b1 )
+            {
+                rc = add_table_pl_iter( opts, set_iter, ref_obj, idb, ref_pos, ref_len, spot_group, 
+                                        EV_INT_TABLE, evidence_align_ids, context_list );
+            }
+        }
+        KNamelistRelease( tables );
+    }
+    return rc;
+}
+
+
+/* the user did not specify ranges on the reference, that means the whole file has to be dumped...
+   the reflist is iterated over all ref-objects it contains ... */
+static rc_t prepare_whole_files( const samdump_opts * const opts,
+                                 const input_files * const ifs,
+                                 PlacementSetIterator * const set_iter,
+                                 Vector * const context_list )
+{
+    rc_t rc = 0;
+    uint32_t db_idx;
+    /* we now loop through all input-databases... */
+    for ( db_idx = 0; db_idx < ifs->database_count && rc == 0; ++db_idx )
+    {
+        const input_database * idb = VectorGet( &ifs->dbs, db_idx );
+        if ( idb != NULL )
+        {
+            uint32_t refobj_count;
+            rc = ReferenceList_Count( idb->reflist, &refobj_count );
+            if ( rc == 0 && refobj_count > 0 )
+            {
+                uint32_t ref_idx;
+                for ( ref_idx = 0; ref_idx < refobj_count && rc == 0; ++ref_idx )
+                {
+                    const ReferenceObj* ref_obj;
+                    rc = ReferenceList_Get( idb->reflist, &ref_obj, ref_idx );
+                    if ( rc == 0 && ref_obj != NULL )
+                    {
+                        INSDC_coord_len ref_len;
+                        rc = ReferenceObj_SeqLength( ref_obj, &ref_len );
+                        if ( rc == 0 )
+                            rc = add_pl_iters( opts,
+                                set_iter,
+                                ref_obj,
+                                idb,
+                                0,                  /* where it starts on the reference */
+                                ref_len,            /* the whole length of this reference/chromosome */
+                                NULL,               /* no spotgroup re-grouping (yet) */
+                                context_list
+                                );
+                        ReferenceObj_Release( ref_obj );
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+typedef struct on_region_ctx
+{
+    rc_t rc;
+    const samdump_opts * opts;
+    input_database * idb;
+    PlacementSetIterator * set_iter;
+    Vector *context_list;
+} on_region_ctx;
+
+
+static void CC on_region( BSTNode *n, void *data )
+{
+    on_region_ctx * rctx = data;
+    if ( rctx->rc == 0 )
+    {
+        reference_region * ref_rgn = ( reference_region * )n;
+        const ReferenceObj * ref_obj;
+        rctx->rc = ReferenceList_Find( rctx->idb->reflist, &ref_obj, ref_rgn->name, string_size( ref_rgn->name ) );
+        if ( rctx->rc == 0 )
+        {
+            uint32_t range_idx, range_count = VectorLength( &ref_rgn->ranges );
+            for ( range_idx = 0; range_idx < range_count && rctx->rc == 0; ++range_idx )
+            {
+                range * r = VectorGet( &ref_rgn->ranges, range_idx );
+                if ( r != NULL )
+                {
+                    INSDC_coord_len len;
+                    if ( r->start == 0 && r->end == 0 )
+                    {
+                        r->start = 1;
+                        rctx->rc = ReferenceObj_SeqLength( ref_obj, &len );
+                        if ( rctx->rc == 0 )
+                            r->end = ( r->start + len );
+                    }
+                    else
+                    {
+                        len = ( r->end - r->start + 1 );
+                    }
+                    if ( rctx->rc == 0 )
+                    {
+                        rctx->rc = add_pl_iters( rctx->opts, rctx->set_iter, ref_obj, rctx->idb,
+                            r->start,           /* where the range starts on the reference */
+                            len,                /* the length of this range */
+                            NULL,               /* no spotgroup re-grouping (yet) */
+                            rctx->context_list
+                            );
+                    }
+                }
+            }
+            ReferenceObj_Release( ref_obj );
+        }
+        else
+        {
+            if ( GetRCState( rctx->rc ) == rcNotFound ) rctx->rc = 0;
+        }
+    }
+}
+
+
+static rc_t prepare_regions( const samdump_opts * const opts,
+                             const input_files * const ifs,
+                             PlacementSetIterator * const set_iter,
+                             Vector * const context_list )
+{
+    uint32_t db_idx;
+    on_region_ctx rctx;
+
+    rctx.rc = 0;
+    rctx.opts = opts;
+    rctx.set_iter = set_iter;
+    rctx.context_list = context_list;
+    /* we now loop through all input-databases... */
+    for ( db_idx = 0; db_idx < ifs->database_count && rctx.rc == 0; ++db_idx )
+    {
+        rctx.idb = VectorGet( &ifs->dbs, db_idx );
+        if ( rctx.idb != NULL )
+            BSTreeForEach( ( BSTree * ) &opts->regions, false, on_region, &rctx );
+    }
+    return rctx.rc;
+}
+
+
+static uint32_t calc_mate_flags( uint32_t flags )
+{
+    uint32_t res = ( flags & 0x1 ) |
+                   ( flags & 0x2 ) |
+                   ( ( flags & 0x8 ) >> 1 ) |
+                   ( ( flags & 0x4 ) << 1 ) |
+                   ( ( flags & 0x20 ) >> 1 ) |
+                   ( ( flags & 0x10 ) << 1 ) |
+                   ( ( flags & 0x40 ) ? 0x80 : 0x40 ) |
+                   ( flags & 0x700 );
+    return res;
+}
+
+
+static const char *equal_sign = "=";
+
+
+static rc_t print_qslice( const samdump_opts * const opts,
+                          bool reverse,
+                          const char * source,
+                          uint32_t source_str_len,
+                          uint32_t * source_offset,
+                          const uint32_t * source_len_vector,
+                          uint32_t source_len_vector_len,
+                          uint32_t slice_nr )
+{
+    rc_t rc = 0;
+    if ( *source_offset > source_str_len || slice_nr >= source_len_vector_len )
+        rc = RC( rcExe, rcNoTarg, rcReading, rcParam, rcInvalid );
+    else
+    {
+        uint32_t len = source_len_vector[ slice_nr ];
+        if ( len > 0 )
+        {
+            const char * ptr = &source[ *source_offset ];
+            rc = dump_quality_33( opts, ptr, len, reverse ); /* sam-dump-opts.c */
+            if ( rc == 0 )
+            {
+                rc = KOutMsg( "" );
+                if ( rc == 0 )
+                    *source_offset += len;
+            }
+        }
+        else
+            rc = KOutMsg( "*" );
+    }
+    return rc;
+}
+
+
+static rc_t modify_and_print_cigar( const char * cigar,
+                                    size_t cigar_len,
+                                    CigOps *ref_cig,
+                                    int32_t ref_cig_len,
+                                    INSDC_coord_zero ref_pos,
+                                    uint32_t read_len )
+{
+    rc_t rc;
+    if ( cigar_len > 0 )
+    {
+        char cigbuf[ MAX_CG_CIGAR_LEN ];
+        CigOps al_cig[ 1024 ];
+        ExplodeCIGAR( al_cig, 1024, cigar, cigar_len );
+        CombineCIGAR( cigbuf, al_cig, read_len, ref_pos, ref_cig, ref_cig_len );
+        rc = KOutMsg( "%s\t", cigbuf );
+    }
+    else
+        rc = KOutMsg( "*\t" );
+    return rc;
+}
+
+
+static rc_t get_READ_QUALITY_EDIT_DIST( cg_cigar_output * cgc_output,
+                                        int64_t align_id,
+                                        const align_cmn_context * acc )
+{
+    /* get READ, QUALITY and EIDT_DIST before cigar manipulation because we need/change these values */
+    rc_t rc = read_char_ptr( align_id, acc->cursor, acc->read_idx, &cgc_output->p_read.ptr, &cgc_output->p_read.len, "READ" );
+    if ( rc == 0 )
+        rc = read_char_ptr( align_id, acc->cursor, acc->sam_quality_idx, &cgc_output->p_quality.ptr, &cgc_output->p_quality.len, "SAM_QUALITY" );
+    if ( rc == 0 )
+        rc = read_int32( align_id, acc->cursor, acc->edit_dist_idx, &cgc_output->edit_dist, 0, "EDIT_DIST" );
+    cgc_output->p_tags.len = 0;
+    return rc;
+}
+
+
+static rc_t read_ref_orientation_and_seq_read_id( cg_cigar_input * cgc_input,
+                                                  int64_t align_id,
+                                                  const align_cmn_context * acc )
+{
+    rc_t rc = read_bool( align_id, acc->cursor, acc->ref_orientation_idx, &cgc_input->orientation, false, "REF_ORIENT" );
+    if ( rc == 0 )
+        rc = read_INSDC_coord_one( align_id, acc->cursor, acc->seq_read_id_idx, &cgc_input->seq_req_id, 0, "SEQ_READ_ID" );
+    return rc;
+}
+
+/* this function expects:
+    READ        in : cgc_output->p_read.ptr, cgc_output->p_read.len
+    SAM_QUALITY in : cgc_output->p_quality.ptr, cgc_output->p_quality.len
+    CIGAR       in : cgc_input->p_cigar.ptr, cgc_input->p_cigar.len
+    EDIT_DIST   in : cgc_output->edit_dist
+*/
+static rc_t cg_cigar_treatments( enum cigar_treatment what_treatment,
+                                 cg_cigar_input * cgc_input,
+                                 cg_cigar_output * cgc_output,
+                                 int64_t align_id,
+                                 const align_cmn_context * acc )
+{
+    rc_t rc = 0;
+    switch ( what_treatment )
+    {
+        case ct_unchanged : cgc_output->p_cigar.len  = cgc_input->p_cigar.len;
+                            cgc_output->p_cigar.ptr = cgc_input->p_cigar.ptr;
+                            break;
+
+        case ct_cg_style  : rc = read_ref_orientation_and_seq_read_id( cgc_input, align_id, acc );
+                            if ( rc == 0 )
+                            {
+                                cgc_input->edit_dist_available = true;
+                                cgc_input->edit_dist = cgc_output->edit_dist;
+                                rc = make_cg_cigar( cgc_input, cgc_output );
+                                if ( rc == 0 )
+                                {
+                                    cgc_output->p_cigar.len = cgc_output->cigar_len;
+                                    cgc_output->p_cigar.ptr = cgc_output->cigar;
+                                }
+                            }
+                            break;
+
+        case ct_cg_merge :  rc = read_ref_orientation_and_seq_read_id( cgc_input, align_id, acc );
+                            if ( rc == 0 )
+                            {
+                                cgc_input->p_read.ptr = cgc_output->p_read.ptr;
+                                cgc_input->p_read.len = cgc_output->p_read.len;
+                                cgc_input->p_quality.ptr = cgc_output->p_quality.ptr;
+                                cgc_input->p_quality.len = cgc_output->p_quality.len;
+                                cgc_input->edit_dist_available = true;
+                                cgc_input->edit_dist = cgc_output->edit_dist;
+                                rc = make_cg_merge( cgc_input, cgc_output );
+                                if ( rc == 0 )
+                                {
+                                    cgc_output->p_cigar.len = cgc_output->cigar_len;
+                                    cgc_output->p_cigar.ptr = cgc_output->cigar;
+                                }
+                            }
+                            break;
+    }
+    return rc;
+}
+
+
+static rc_t print_quality_or_star( const samdump_opts * const opts,
+                                   const char * const q,
+                                   uint32_t q_len,
+                                   uint32_t r_len )
+{
+    rc_t rc;
+    bool star_qual = ( q_len == 0 || q_len != r_len );
+    if ( !star_qual && q[ 0 ] == 255 )
+    {
+        uint32_t i = 0;
+        while ( i < q_len && q[ i ] == 255 ) i++;
+        star_qual = ( i == q_len );
+    }
+    
+    if ( star_qual )
+        rc = KOutMsg( "*" );
+    else
+        rc = dump_quality_33( opts, q, q_len, false ); /* sam-dump-opts.c */
+
+    return rc;
+}
+    
+
+/* triggered by option "--CG-SAM" */
+static rc_t print_evidence_alignment_cg_sam( const samdump_opts * const opts,
+                                             const PlacementRecord * const rec,
+                                             const align_table_context * const atx,
+                                             int64_t align_id,
+                                             uint32_t ploidy_idx,
+                                             const char * ref_name,
+                                             INSDC_coord_zero allele_pos,
+                                             int32_t ref_cig_len )
+{
+    const VCursor * cursor = atx->eval.cursor;
+    INSDC_coord_zero ref_pos;
+    uint32_t seq_name_len, sam_flags, spot_group_len = 0;
+    const char * seq_name, * spot_group;
+    int32_t mapq;
+    cg_cigar_output cgc_output;
+
+    rc_t rc = read_char_ptr( align_id, cursor, atx->seq_name_idx, &seq_name, &seq_name_len, "SEQ_NAME" );
+    if ( rc == 0 && atx->eval.seq_spot_group_idx != COL_NOT_AVAILABLE )
+        rc = read_char_ptr( align_id, cursor, atx->eval.seq_spot_group_idx, &spot_group, &spot_group_len, "SEQ_SPOT_GROUP" );
+
+    if ( rc == 0 )
+    {
+        if ( opts->print_cg_names )
+        {
+            if ( spot_group_len > 0 )
+                /* SAM-FIELD: QNAME     constructed from spot-group/seq-name */
+                rc = KOutMsg( "%.*s-1:%.*s\t", spot_group_len, spot_group, seq_name_len, seq_name );
+
+        }
+        else
+        {
+            if ( seq_name_len > 0 )
+                /* SAM-FIELD: QNAME     constructed from allel-id/sub-id */
+                rc = KOutMsg( "%.*s/ALLELE_%li.%u\t", seq_name_len, seq_name, rec->id, ploidy_idx );
+        }
+    }
+
+    if ( rc == 0 )
+        rc = read_INSDC_coord_zero( align_id, cursor, atx->ref_pos_idx, &ref_pos, 0, "REF_POS" );
+
+    if ( rc == 0 )
+        rc = read_int32( align_id, cursor, atx->mapq_idx, &mapq, 0, "MAPQ" );
+
+    if ( rc == 0 )
+    {
+        uint8_t ref_orient;
+        rc = read_uint8( align_id, cursor, atx->eval.ref_orientation_idx, &ref_orient, 0, "REF_ORIENT" );
+        if ( rc == 0 )
+        {
+            INSDC_coord_one seq_read_id;
+            bool cmpl = ref_orient;
+            rc = read_INSDC_coord_one( align_id, cursor, atx->eval.seq_read_id_idx, &seq_read_id, 0, "SEQ_READ_ID" );
+            sam_flags = ( 1 | ( cmpl ? 0x10 : 0 ) | ( seq_read_id == 1 ? 0x40 : 0x80 ) );
+        }
+    }
+
+    /* SAM-FIELD: FLAG      SRA-column: SAM_FLAGS ( uint32 ) */
+    /* SAM-FIELD: RNAME     SRA-column: ALLEL-NAME.ploidy_idx */
+    /* SAM-FIELD: POS       SRA-column: REF_POS + 1 */
+    /* SAM-FIELD: MAPQ      SRA-column: MAPQ ( from evidence-alignment-table, not from allel! ) */
+    if ( rc == 0 )
+        rc = KOutMsg( "%u\t%s\t%i\t%d\t", sam_flags, ref_name, allele_pos + ref_pos + 1, mapq );
+
+    /* get READ, QUALITY and EIDT_DIST before cigar manipulation because we need/change these values */
+    if ( rc == 0 )
+        rc = get_READ_QUALITY_EDIT_DIST( &cgc_output, align_id, &atx->eval );
+
+    /* SAM-FIELD: CIGAR     SRA-column: CIGAR_SHORT / with special treatment */
+    if ( rc == 0 )
+    {
+        cg_cigar_input cgc_input;
+        rc = read_char_ptr( align_id, cursor, atx->eval.cigar_idx, &cgc_input.p_cigar.ptr, &cgc_input.p_cigar.len, "CIGAR" );
+        if ( rc == 0 )
+            rc = cg_cigar_treatments( opts->cigar_treatment, &cgc_input, &cgc_output, align_id, &atx->eval );
+        if ( rc == 0 )
+            rc = modify_and_print_cigar( cgc_output.p_cigar.ptr, cgc_output.p_cigar.len,
+                                         atx->cig_op_buffer, ref_cig_len, ref_pos, cgc_output.p_read.len );
+    }
+
+    /* SAM-FIELD: RNEXT     SRA-column: MATE_REF_NAME '*' no mates! */
+    /* SAM-FIELD: PNEXT     SRA-column: MATE_REF_POS + 1 '0' no mates */
+    /* SAM-FIELD: TLEN      SRA-column: TEMPLATE_LEN '0' not in table */
+    /* SAM-FIELD: SEQ       SRA-column: READ  */
+    if ( rc == 0 )
+        rc = KOutMsg( "*\t0\t0\t%.*s\t", cgc_output.p_read.len, cgc_output.p_read.ptr );
+
+    /* SAM-FIELD: QUAL      SRA-column: SAM_QUALITY */
+    if ( rc == 0 )
+        rc = print_quality_or_star( opts, cgc_output.p_quality.ptr, cgc_output.p_quality.len, cgc_output.p_read.len ); /* above */
+    
+    /* OPT SAM-FIELD: RG     SRA-column: SEQ_SPOT_GROUP */
+    if ( rc == 0 && spot_group_len > 0 )
+        rc = KOutMsg( "\tRG:Z:%.*s", spot_group_len, spot_group );
+
+    if ( rc == 0 && cgc_output.p_tags.len > 0 )
+        rc = KOutMsg( "\t%.*s", cgc_output.p_tags.len, cgc_output.p_tags.ptr );
+
+    /* OPT SAM-FIELD: ZI     SRA-column: rec->id */
+    /* OPT SAM-FIELD: ZA     SRA-column: ploidy_idx */
+    if ( rc == 0 )
+        rc = KOutMsg( "\tZI:i:%li\tZA:i:%u", rec->id, ploidy_idx );
+
+    /* OPT SAM-FIELD: NH     SRA-column: ALIGNMENT_COUNT */
+    if ( rc == 0 && atx->eval.al_count_idx != COL_NOT_AVAILABLE )
+    {
+        const uint8_t * al_count;
+        uint32_t al_count_len;
+        rc = read_uint8_ptr( align_id, cursor, atx->eval.al_count_idx, &al_count, &al_count_len, "ALIGNMENT_COUNT" );
+        if ( rc == 0 && al_count_len > 0 )
+            rc = KOutMsg( "\tNH:i:%u", *al_count );
+    }
+
+    /* OPT SAM-FIELD: NM     SRA-column: EDIT_DISTANCE */
+    if ( rc == 0 )
+        rc = KOutMsg( "\tNM:i:%u", cgc_output.edit_dist );
+
+    /* OPT SAM-FIELD: XI     SRA-column: ALIGN_ID */
+    if ( rc == 0 && opts->print_alignment_id_in_column_xi )
+        rc = KOutMsg( "\tXI:i:%u", align_id );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "\n" );
+
+    return rc;
+}
+
+
+/*  triggered by option --CG-evidence-dnb */
+static rc_t print_evidence_alignment_cg_ev_dnb( const samdump_opts * const opts,
+                                                const PlacementRecord * const rec,
+                                                const align_table_context * const atx,
+                                                int64_t align_id,
+                                                uint32_t ploidy_idx )
+{
+    const VCursor * cursor = atx->eval.cursor;
+    INSDC_coord_zero ref_pos;
+    uint32_t seq_name_len, sam_flags, spot_group_len = 0;
+    int32_t mapq;
+    const char * seq_name, * spot_group;
+    cg_cigar_output cgc_output;
+
+    rc_t rc = read_char_ptr( align_id, cursor, atx->seq_name_idx, &seq_name, &seq_name_len, "SEQ_NAME" );
+    if ( rc == 0 && atx->eval.seq_spot_group_idx != COL_NOT_AVAILABLE )
+        rc = read_char_ptr( align_id, cursor, atx->eval.seq_spot_group_idx, &spot_group, &spot_group_len, "SEQ_SPOT_GROUP" );
+
+    if ( rc == 0 )
+    {
+        if ( opts->print_cg_names )
+        {
+            if ( spot_group_len > 0 )
+                /* SAM-FIELD: QNAME     constructed from spot-group/seq-name */
+                rc = KOutMsg( "%.*s-1:%.*s\t", spot_group_len, spot_group, seq_name_len, seq_name );
+
+        }
+        else
+        {
+            if ( seq_name_len > 0 )
+                /* SAM-FIELD: QNAME     constructed from allel-id/sub-id */
+                rc = KOutMsg( "%.*s/ALLELE_%li.%u\t", seq_name_len, seq_name, rec->id, ploidy_idx );
+        }
+    }
+
+    if ( rc == 0 )
+        rc = read_INSDC_coord_zero( align_id, cursor, atx->ref_pos_idx, &ref_pos, 0, "REF_POS" );
+
+    if ( rc == 0 )
+        rc = read_int32( align_id, cursor, atx->mapq_idx, &mapq, 0, "MAPQ" );
+
+    if ( rc == 0 )
+    {
+        uint8_t ref_orient;
+        rc = read_uint8( align_id, cursor, atx->eval.ref_orientation_idx, &ref_orient, 0, "REF_ORIENT" );
+        if ( rc == 0 )
+        {
+            INSDC_coord_one seq_read_id;
+            bool cmpl = ref_orient;
+            rc = read_INSDC_coord_one( align_id, cursor, atx->eval.seq_read_id_idx, &seq_read_id, 0, "SEQ_READ_ID" );
+            sam_flags = ( 1 | ( cmpl ? 0x10 : 0 ) | ( seq_read_id == 1 ? 0x40 : 0x80 ) );
+        }
+    }
+
+    /* SAM-FIELD: FLAG      SRA-column: SAM_FLAGS ( uint32 ) */
+    /* SAM-FIELD: RNAME     SRA-column: ALLEL-NAME.ploidy_idx */
+    /* SAM-FIELD: POS       SRA-column: REF_POS + 1 */
+    /* SAM-FIELD: MAPQ      SRA-column: MAPQ ( from evidence-alignment-table, not from allel! ) */
+    if ( rc == 0 )
+        rc = KOutMsg( "%u\tALLELE_%li.%u\t%i\t%d\t", sam_flags, rec->id, ploidy_idx, ref_pos + 1, mapq );
+
+    /* get READ, QUALITY and EIDT_DIST before cigar manipulation because we need/change these values */
+    if ( rc == 0 )
+        rc = get_READ_QUALITY_EDIT_DIST( &cgc_output, align_id, &atx->eval );
+
+    /* SAM-FIELD: CIGAR     SRA-column: CIGAR_SHORT / with or without treatment */
+    if ( rc == 0 )
+    {
+        cg_cigar_input cgc_input;
+        rc = read_char_ptr( align_id, cursor, atx->eval.cigar_idx, &cgc_input.p_cigar.ptr, &cgc_input.p_cigar.len, "CIGAR" );
+        if ( rc == 0 )
+        rc = cg_cigar_treatments( opts->cigar_treatment, &cgc_input, &cgc_output, align_id, &atx->eval );
+        if ( rc == 0 )
+            rc = cg_canonical_print_cigar( cgc_output.p_cigar.ptr, cgc_output.p_cigar.len);
+        if(rc == 0) rc = KOutMsg( "\t");
+    }
+
+    /* SAM-FIELD: RNEXT     SRA-column: MATE_REF_NAME '*' no mates! */
+    /* SAM-FIELD: PNEXT     SRA-column: MATE_REF_POS + 1 '0' no mates */
+    /* SAM-FIELD: TLEN      SRA-column: TEMPLATE_LEN '0' not in table */
+    /* SAM-FIELD: SEQ       SRA-column: READ  */
+    if ( rc == 0 )
+        rc = KOutMsg( "*\t0\t0\t%.*s\t", cgc_output.p_read.len, cgc_output.p_read.ptr );
+
+    /* SAM-FIELD: QUAL      SRA-column: SAM_QUALITY */
+    if ( rc == 0 )
+        rc = print_quality_or_star( opts, cgc_output.p_quality.ptr, cgc_output.p_quality.len, cgc_output.p_read.len ); /* above */
+    
+    /* OPT SAM-FIELD: RG     SRA-column: SEQ_SPOT_GROUP */
+    if ( rc == 0 && spot_group_len > 0 )
+        rc = KOutMsg( "\tRG:Z:%.*s", spot_group_len, spot_group );
+
+    if ( rc == 0 && cgc_output.p_tags.len > 0 )
+        rc = KOutMsg( "\t%.*s", cgc_output.p_tags.len, cgc_output.p_tags.ptr );
+
+    /* OPT SAM-FIELD: NH     SRA-column: ALIGNMENT_COUNT */
+    if ( rc == 0 && atx->eval.al_count_idx != COL_NOT_AVAILABLE )
+    {
+        const uint8_t * al_count;
+        uint32_t al_count_len;
+        rc = read_uint8_ptr( align_id, cursor, atx->eval.al_count_idx, &al_count, &al_count_len, "ALIGNMENT_COUNT" );
+        if ( rc == 0 && al_count_len > 0 )
+            rc = KOutMsg( "\tNH:i:%u", *al_count );
+    }
+
+    /* OPT SAM-FIELD: NM     SRA-column: EDIT_DISTANCE */
+    if ( rc == 0 )
+        rc = KOutMsg( "\tNM:i:%u", cgc_output.edit_dist );
+
+    /* OPT SAM-FIELD: XI     SRA-column: ALIGN_ID */
+    if ( rc == 0 && opts->print_alignment_id_in_column_xi )
+        rc = KOutMsg( "\tXI:i:%u", align_id );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "\n" );
+
+    return rc;
+}
+
+
+/* print minimal one alignment from the EVIDENCE-INTERVAL / EVIDENCE-ALIGNMENT - table(s) 
+   triggered by option "--CG-SAM / --CG-evidence / --CG-evidence-dnb */
+static rc_t print_alignment_sam_ev( const samdump_opts * const opts,
+                                    const char * ref_name,
+                                    INSDC_coord_zero pos,
+                                    const PlacementRecord * const rec,
+                                    align_table_context * const atx )
+{
+    uint32_t ploidy;
+    const VCursor * cursor = atx->cmn.cursor;
+    rc_t rc = read_uint32( rec->id, cursor, atx->ploidy_idx, &ploidy, 0, "PLOIDY" );
+    if ( rc == 0 && ploidy > 0 )
+    {
+        uint32_t ploidy_idx, cigar_len_vector_len, read_len_vector_len, edit_dist_vector_len, cigar_str_len, read_len, quality_str_len;
+        uint32_t quality_offset = 0;
+        const uint32_t *cigar_len_vector, *read_len_vector, *edit_dist_vector;
+        const char * cigar, *read, *quality;
+        char * transformed_cigar = NULL;
+        char * org_transformed_cigar = NULL;
+        
+        rc = read_char_ptr( rec->id, cursor, atx->cmn.cigar_idx, &cigar, &cigar_str_len, "CIGAR" );
+        if ( rc == 0 )
+        {
+            org_transformed_cigar = string_dup ( cigar, cigar_str_len );
+            if ( org_transformed_cigar != NULL )
+            {
+                uint32_t i;
+                for ( i = 0; i < cigar_str_len; ++i )
+                {
+                    if ( org_transformed_cigar[ i ] == 'S' ) org_transformed_cigar[ i ] = 'I';
+                }
+                transformed_cigar = org_transformed_cigar;
+            }
+        }
+        
+        if ( rc == 0 )
+            rc = read_uint32_ptr( rec->id, cursor, atx->cmn.cigar_len_idx, &cigar_len_vector, &cigar_len_vector_len, "CIGAR_LEN" );
+        if ( rc == 0 )
+            rc = read_char_ptr( rec->id, cursor, atx->cmn.read_idx, &read, &read_len, "READ" );
+        if ( rc == 0 )
+            rc = read_uint32_ptr( rec->id, cursor, atx->cmn.read_len_idx, &read_len_vector, &read_len_vector_len, "READ_LEN" );
+        if ( rc == 0 )
+            rc = read_char_ptr( rec->id, cursor, atx->cmn.sam_quality_idx, &quality, &quality_str_len, "QUALITY" );
+        if ( rc == 0 )
+            rc = read_uint32_ptr( rec->id, cursor, atx->cmn.edit_dist_idx, &edit_dist_vector, &edit_dist_vector_len, "EDIT_DIST" );
+
+        for ( ploidy_idx = 0; ploidy_idx < ploidy && rc == 0; ++ploidy_idx )
+        {
+            uint32_t cigar_slice_len = cigar_len_vector[ ploidy_idx ];
+            uint32_t read_slice_len = read_len_vector[ ploidy_idx ];
+            if ( opts->dump_cg_evidence )
+            {
+                /* SAM-FIELD: QNAME     SRA-column: eventually prefixed row-id into EVIDENCE_INTERVAL - table */
+                /* SAM-FIELD: FLAG      SRA-column: SAM_FLAGS ( uint32 ) */
+                /* SAM-FIELD: RNAME     SRA-column: REF_NAME / REF_SEQ_ID ( char * ) */
+                /* SAM-FIELD: POS       SRA-column: REF_POS + 1 */
+                /* SAM-FIELD: MAPQ      SRA-column: MAPQ */
+                if ( rc == 0 )
+                {
+                    if ( opts->print_cg_names )
+                        rc = KOutMsg( "-1:0\t" );
+                    else
+                        rc = KOutMsg( "ALLELE_%li.%u\t", rec->id, ploidy_idx + 1 );
+                }
+
+                if ( rc == 0 )
+                    rc = KOutMsg( "0\t%s\t%u\t%d\t", ref_name, pos + 1, rec->mapq );
+
+                /* SAM-FIELD: CIGAR     SRA-column: CIGAR_SHORT / CIGAR_LONG sliced!!! */
+                if ( rc == 0 )
+                    rc = KOutMsg( "%.*s\t", cigar_slice_len, transformed_cigar );
+
+                /* SAM-FIELD: RNEXT     SRA-column: MATE_REF_NAME ( !!! row_len can be zero !!! ) */
+                /* SAM-FIELD: PNEXT     SRA-column: MATE_REF_POS + 1 ( !!! row_len can be zero !!! ) */
+                /* SAM-FIELD: TLEN      SRA-column: TEMPLATE_LEN ( !!! row_len can be zero !!! ) */
+                /* SAM-FIELD: SEQ       SRA-column: READ sliced!!! */
+                if ( rc == 0 )
+                    rc = KOutMsg( "*\t0\t0\t%.*s\t", read_slice_len, read );
+
+                /* SAM-FIELD: QUAL      SRA-column: SAM_QUALITY sliced!!! */
+                if ( rc == 0 )
+                {
+                    if ( quality_str_len == read_slice_len )
+                        rc = print_qslice( opts, false, quality, quality_str_len, &quality_offset, read_len_vector, read_len_vector_len, ploidy_idx );
+                    else
+                        rc = KOutMsg( "*" );
+                }
+                
+                /* OPT SAM-FIELD: RG     SRA-column: ploidy_idx */
+                if ( rc == 0 )
+                    rc = KOutMsg( "\tRG:Z:ALLELE_%u", ploidy_idx + 1 );
+
+                /* OPT SAM-FIELD: XI     SRA-column: ALIGN_ID */
+                if ( rc == 0 && opts->print_alignment_id_in_column_xi )
+                    rc = KOutMsg( "\tXI:i:%u", rec->id );
+
+                /* OPT SAM-FIELD: NM     SRA-column: EDIT_DISTANCE sliced!!! */
+                if ( rc == 0 && ( ploidy_idx < edit_dist_vector_len ) )
+                    rc = KOutMsg( "\tNM:i:%u", edit_dist_vector[ ploidy_idx ] );
+
+                if ( rc == 0 )
+                    rc = KOutMsg( "\n" );
+            }
+
+            /* we do that here per ALLEL-READ, not at the end per ALLEL, because we have to test which alignments
+               fit the ploidy_idx */
+
+            if ( rc == 0 && ( opts->dump_cg_sam || opts->dump_cg_ev_dnb ) )
+            {
+                const int64_t *ev_al_ids;
+                uint32_t ev_al_ids_count, read_id;
+
+                rc = read_int64_ptr( rec->id, atx->cmn.cursor, atx->ev_alignments_idx, &ev_al_ids, &ev_al_ids_count, "EV_ALIGNMENTS" );
+                for ( read_id = 0; read_id < ev_al_ids_count && rc == 0; ++read_id )
+                {
+                    uint32_t ref_ploidy;
+                    int64_t align_id = ev_al_ids[ read_id ];
+                    rc = read_uint32( align_id, atx->eval.cursor, atx->ref_ploidy_idx, &ref_ploidy, 0, "PLOIDY" );
+
+                    if ( rc == 0 && ( ref_ploidy == ( ploidy_idx + 1 ) ) )
+                    {
+                        if ( rc == 0 && opts->dump_cg_sam )
+                        {
+                            rc = adjust_align_table_context_cig_op_buffer( atx, read_slice_len );
+                            if ( rc == 0 )
+                            {
+                                int32_t ref_cig_len = ExplodeCIGAR( atx->cig_op_buffer, atx->cig_op_buffer_len, cigar, cigar_slice_len );
+                                rc = print_evidence_alignment_cg_sam( opts, rec, atx, align_id, ploidy_idx + 1, ref_name, pos, ref_cig_len );
+                            }
+                        }
+
+                        if ( rc == 0 && opts->dump_cg_ev_dnb )
+                            rc = print_evidence_alignment_cg_ev_dnb( opts, rec, atx, align_id, ploidy_idx + 1 );
+                    }
+                }
+            }
+
+            /* advance the cigar-slice... */
+            cigar += cigar_slice_len;
+            if ( transformed_cigar != NULL )
+                transformed_cigar += cigar_slice_len;
+            read += read_slice_len;
+        }
+        if ( org_transformed_cigar != NULL )
+            free( org_transformed_cigar );
+    }
+    return rc;
+}
+
+
+static rc_t opt_field_spot_group( const VCursor * cursor, uint32_t col_id, int64_t row_id )
+{
+    const char * value = NULL;
+    uint32_t len;    
+    rc_t rc = read_char_ptr( row_id, cursor, col_id, &value, &len, "SPOT_GROUP" );
+    if ( rc == 0 && len > 0 )
+        rc = KOutMsg( "\tRG:Z:%.*s", len, value );
+    return rc;
+}
+
+
+static rc_t opt_field_lnk_group( const VCursor * cursor, uint32_t col_id, int64_t row_id )
+{
+    const char * value = NULL;
+    uint32_t len;    
+    rc_t rc = read_char_ptr( row_id, cursor, col_id, &value, &len, "LINKAGE_GROUP" );
+    if ( rc == 0 && len > 0 )
+        rc = KOutMsg( "\tBX:Z:%.*s", len, value );
+    return rc;
+}
+
+static rc_t print_alignment_sam_ps( const samdump_opts * const opts,
+                                    const char * ref_name,
+                                    INSDC_coord_zero pos,
+                                    matecache * const mc,
+                                    struct rna_splice_dict * splice_dict,
+                                    const PlacementRecord * const rec,
+                                    const align_table_context * const atx )
+{
+    uint32_t sam_flags = 0, NM_adjustments = 0, seq_spot_id_len, mate_ref_pos_len = 0, mate_ref_name_len = string_size( ref_name );
+    INSDC_coord_zero mate_ref_pos = 0;
+    INSDC_coord_len tlen = 0;
+    int64_t mate_align_id = 0, id = rec->id;
+    const int64_t * seq_spot_id;
+    const char * mate_ref_name = ref_name;
+    const VCursor * cursor = atx->cmn.cursor;
+    cg_cigar_output cgc_output;
+    rna_splice_candidates candidates; /* in cg_tools.h */
+    bool rna_not_homogeneous_flag = false;
+
+    /* SAM-FIELD: NONE      SRA-column: MATE_ALIGN_ID ( int64 ) ... for cache lookup's */
+    rc_t rc = read_int64( id, cursor, atx->mate_align_id_idx, &mate_align_id, 0, "MATE_ALIGN_ID" );
+
+    candidates.count = 0;
+    candidates.fwd_matched = 0;
+    candidates.rev_matched = 0;
+
+    /* pre-read seq-spot-id, needed for unaligned cache and SAM-field QNAME */
+    if ( rc == 0 )
+        rc = read_int64_ptr( id, cursor, atx->cmn.seq_spot_id_idx, &seq_spot_id, &seq_spot_id_len, "SEQ_SPOT_ID" );
+
+    /* try to find the info about the mate in the CACHE... */
+    if ( rc == 0 )
+    {
+        if ( mate_align_id != 0 )
+        {
+            if ( opts->use_mate_cache && mc != NULL )
+            {
+                rc = matecache_lookup_same_ref( mc, atx->db_idx, mate_align_id, &mate_ref_pos, &sam_flags, &tlen );
+                if ( rc == 0 )
+                {
+                    /* we found it in the the sam-ref-matecache */
+                    const INSDC_read_filter * read_filter;
+                    uint32_t read_filter_len;
+
+                    /* cache entry-found! (on the same reference) -> that means we have now mate_ref_pos, flags and tlen */
+                    matecache_remove_same_ref( mc, atx->db_idx, mate_align_id );
+                    mate_ref_name = equal_sign;
+                    mate_ref_name_len = 1;
+                    mate_ref_pos_len = 1;
+
+                    /* read the read-filter column and adjust the sam-flags value to reflect the presense
+                       of the flag SRA_READ_FILTER_REJECT, if it is there switch 0x200 on, of not switch 0x200 off */
+                    rc = read_INSDC_read_filter_ptr( id, cursor, atx->cmn.read_filter_idx, &read_filter, &read_filter_len, "RD_FILTER" );
+                    if ( rc == 0 && read_filter_len > 0 )
+                    {
+                        if ( ( read_filter[ 0 ] & READ_FILTER_REJECT ) == READ_FILTER_REJECT )
+                            sam_flags |= 0x200;
+                        else
+                            sam_flags &= ~0x200;
+
+                        if ( ( read_filter[ 0 ] & READ_FILTER_CRITERIA ) == READ_FILTER_CRITERIA )
+                            sam_flags |= 0x400;
+                        else
+                            sam_flags &= ~0x400;
+                    }
+                }
+                else
+                {
+                    /* we did not find it in the the sam-ref-matecache */
+                    rc = RC( rcApp, rcNoTarg, rcAccessing, rcItem, rcNotFound );
+                }
+            }
+            else
+            {
+                rc = RC( rcApp, rcNoTarg, rcAccessing, rcItem, rcNotFound );
+            }
+        }
+
+        if ( ( mate_align_id != 0 && GetRCState( rc ) == rcNotFound )||( mate_align_id == 0 ) )
+        {
+            /* no cache entry-found OR do not use mate-cache
+               ---> that means we have to read it from the table... */
+
+            rc = read_char_ptr( id, cursor, atx->mate_ref_name_idx, &mate_ref_name, &mate_ref_name_len, "MATE_REF_NAME" );
+            if ( rc == 0 )
+                rc = read_INSDC_coord_zero( id, cursor, atx->mate_ref_pos_idx, &mate_ref_pos, 0, "MATE_REF_POS" );
+            if ( rc == 0 )
+                rc = read_INSDC_coord_len( id, cursor, atx->tlen_idx, &tlen, 0, "TLEN" );
+            if ( rc == 0 )
+                rc = read_uint32( id, cursor, atx->sam_flags_idx, &sam_flags, 0, "SAM_FLAGS" );
+
+            if ( rc == 0 )
+            {
+                int32_t cmp = -1;
+                if ( mate_ref_name_len > 0 )
+                {
+                    size_t ref_name_len = string_size( ref_name );
+                    size_t cmp_len = ( mate_ref_name_len > ref_name_len ? mate_ref_name_len : ref_name_len );
+                    cmp = string_cmp( mate_ref_name, mate_ref_name_len, ref_name, ref_name_len, cmp_len );
+                    if ( cmp == 0 )
+                    {
+                        mate_ref_name = equal_sign;
+                        mate_ref_name_len = 1;
+                    }
+                }
+
+                if ( opts->use_mate_cache )
+                {
+                    if ( mate_align_id != 0 && mate_ref_name_len > 0 && cmp == 0 )
+                    {
+                        /* now that we have the data, store it in sam-ref-cache it the mate is on the same ref. */
+                        uint32_t mate_flags = calc_mate_flags( sam_flags );
+                        rc = matecache_insert_same_ref( mc, atx->db_idx, id, pos, mate_flags, -tlen );
+                    }
+
+                    if ( mate_align_id == 0 && mate_ref_name_len == 0 && opts->print_half_unaligned_reads &&
+                         atx->align_table_type == att_primary )
+                    {
+                        int64_t key = id;
+                        rc = matecache_insert_unaligned( mc, atx->db_idx, key, pos, atx->ref_idx, *seq_spot_id );
+                    }
+                }
+            }
+        }
+    }
+
+    if ( rc == 0 && opts->use_matepair_filter && !filter_by_matepair_dist( opts, tlen ) )
+        return 0;
+
+    /* SAM-FIELD: QNAME     SRA-column: SEQ_SPOT_ID ( int64 ) */
+    if ( rc == 0 )
+    {
+        if ( seq_spot_id_len > 0 )
+        {
+            if ( opts->print_spot_group_in_name | opts->print_cg_names )
+            {
+                const char * spot_group;
+                uint32_t spot_group_len;
+                rc = read_char_ptr( id, cursor, atx->cmn.seq_spot_group_idx, &spot_group, &spot_group_len, "SPOT_GROUP" );
+                if ( rc == 0 )
+                    rc = dump_name( opts, *seq_spot_id, spot_group, spot_group_len ); /* sam-dump-opts.c */
+            }
+            else
+                rc = dump_name( opts, *seq_spot_id, NULL, 0 ); /* sam-dump-opts.c */
+        }
+        else
+            rc = KOutMsg( "*" );
+    }
+
+    if ( rc == 0 )
+        rc = KOutMsg( "\t" );
+
+    /* massage the sam-flag if we are not dumping unaligned reads... */
+    if ( !opts->dump_unaligned_reads    /** not going to dump unaligned **/
+         && ( sam_flags & 0x1 )         /** but we have sequenced multiple fragments **/
+         && ( sam_flags & 0x8 ) )       /** and not all of them align **/
+        /*** remove flags talking about multiple reads **/
+        /* turn off 0x001 0x008 0x040 0x080 */
+        sam_flags &= ~0xC9;
+
+    /* SAM-FIELD: FLAG      SRA-column: SAM_FLAGS ( uint32 ) */
+    /* SAM-FIELD: RNAME     SRA-column: REF_NAME / REF_SEQ_ID ( char * ) */
+    /* SAM-FIELD: POS       SRA-column: REF_POS + 1 */
+    /* SAM-FIELD: MAPQ      SRA-column: MAPQ */
+    if ( rc == 0 )
+        rc = KOutMsg( "%u\t%s\t%u\t%d\t", sam_flags, ref_name, pos + 1, rec->mapq );
+
+    /* get READ, QUALITY and EIDT_DIST before cigar manipulation because we need/change these values */
+    if ( rc == 0 )
+        rc = get_READ_QUALITY_EDIT_DIST( &cgc_output, id, &atx->cmn );
+
+    /* SAM-FIELD: CIGAR     SRA-column: CIGAR_SHORT / with or without treatment */
+    if ( rc == 0 )
+    {
+        cg_cigar_input cgc_input;
+        char * temp_cigar = NULL;
+        static char const *bogus_quality = "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
+
+        rc = read_char_ptr( id, cursor, atx->cmn.cigar_idx, &cgc_input.p_cigar.ptr, &cgc_input.p_cigar.len, "CIGAR" );
+        if ( rc == 0 )
+        {
+            if ( cgc_output.p_quality.len == 0 )
+            {
+                cgc_output.p_quality.ptr = bogus_quality;
+                cgc_output.p_quality.len = 35;
+            }
+            rc = cg_cigar_treatments( opts->cigar_treatment, &cgc_input, &cgc_output, id, &atx->cmn );
+        }
+
+        if ( opts->rna_splicing )
+        {
+            { /*** reset previous identification of N to D ***/
+                int i;
+                char *c = ( char * )cgc_output.p_cigar.ptr;
+                for( i = 0; i < cgc_output.p_cigar.len; i++ )
+                {
+                    if ( c[ i ] == 'N' ) c[ i ] = 'D';
+                }
+            }
+            
+            /* discover which cigar-operations could be a RNA-splice ( it is a D-operation with min length of 10 ) */
+            rc = discover_rna_splicing_candidates( cgc_output.p_cigar.len, cgc_output.p_cigar.ptr, 10, &candidates ); /* cg_tools.c */
+            if ( rc == 0 && candidates.count > 0 )
+            {
+                /* we discover by comparing against the reference if a candidate is a RNA-splice and if it is forward or reverse */
+                rc = check_rna_splicing_candidates_against_ref( rec->ref, opts->rna_splice_level, pos, &candidates ); /* cg_tools.c */
+                if ( rc == 0 && ( candidates.fwd_matched > 0 || candidates.rev_matched > 0 ) )
+                {
+                    /* set the warning-flag that we have an alignment with not homogeneous RNA-splices */
+                    if ( candidates.fwd_matched > 0 && candidates.rev_matched > 0 )
+                        rna_not_homogeneous_flag = true;
+
+                    temp_cigar = malloc( cgc_output.p_cigar.len + 1 ); /* temp_cigar will be released at the end of this block */
+                    if ( temp_cigar != NULL )
+                    {
+                        /* create a new cigarstring by applying the candidates to the cigar-string */
+                        rc = change_rna_splicing_cigar( cgc_output.p_cigar.len, temp_cigar, &candidates, &NM_adjustments ); /* cg_tools.c */
+                        if ( rc == 0 )
+                            cgc_output.p_cigar.ptr = temp_cigar;
+                    }
+                }
+
+                /* rna-splice-log */
+                if ( opts->rna_splice_log != NULL )
+                {
+                    /* record all the candidates... */
+                    uint32_t c_idx;
+                    for ( c_idx = 0; c_idx < candidates.count; c_idx++ )
+                    {
+                        rna_splice_candidate * candidate = &( candidates.candidates[ c_idx ] );
+                        splice_dict_entry entry;
+                        uint32_t intron_pos = pos + candidate->ref_offset;
+                        if ( rna_splice_dict_get( splice_dict, intron_pos, candidate->len, &entry ) )
+                        {
+                            entry.count += 1;
+                            rna_splice_dict_set( splice_dict, intron_pos, candidate->len, &entry );
+                        }
+                        else
+                        {
+                            entry.count = 1;
+                            entry.intron_type = candidate->matched;
+                            rna_splice_dict_set( splice_dict, intron_pos, candidate->len, &entry );
+                        }
+                    }
+                }
+
+            }
+            if ( candidates.cigops != NULL )
+                free( ( void * ) candidates.cigops );
+        }
+        if ( rc == 0 )
+            rc = KOutMsg( "%.*s\t", cgc_output.p_cigar.len, cgc_output.p_cigar.ptr );
+
+        if ( temp_cigar != NULL )
+            free( temp_cigar );
+    }
+
+    /* SAM-FIELD: RNEXT     SRA-column: MATE_REF_NAME ( !!! row_len can be zero !!! ) */
+    /* SAM-FIELD: PNEXT     SRA-column: MATE_REF_POS + 1 ( !!! row_len can be zero !!! ) */
+    /* SAM-FIELD: TLEN      SRA-column: TEMPLATE_LEN ( !!! row_len can be zero !!! ) */
+    if ( rc == 0 )
+    {
+        if ( mate_ref_name_len > 0 )
+        {
+            rc = KOutMsg( "%.*s\t%u\t%d\t", mate_ref_name_len, mate_ref_name, mate_ref_pos + 1, tlen );
+        }
+        else
+        {
+            if ( mate_ref_pos_len == 0 )
+                rc = KOutMsg( "*\t0\t%d\t", tlen );
+            else
+                rc = KOutMsg( "*\t%u\t%d\t", mate_ref_pos, tlen );
+        }
+    }
+
+    /* SAM-FIELD: SEQ       SRA-column: READ */
+    if ( rc == 0 )
+        rc = KOutMsg( "%.*s\t", cgc_output.p_read.len, cgc_output.p_read.ptr );
+
+    /* SAM-FIELD: QUAL      SRA-column: SAM_QUALITY */
+    if ( rc == 0 )
+        rc = print_quality_or_star( opts, cgc_output.p_quality.ptr, cgc_output.p_quality.len, cgc_output.p_read.len ); /* above */    
+
+    /* OPT SAM-FIELD: RG     SRA-column: SPOT_GROUP */
+    if ( rc == 0 && ( atx->cmn.seq_spot_group_idx != COL_NOT_AVAILABLE ) )
+        rc = opt_field_spot_group( cursor, atx->cmn.seq_spot_group_idx, id );
+
+    /* OPT SAM-FIELD: BZ     SRA-column: LINKAGE_GROUP */
+    if ( rc == 0 && ( atx->lnk_group_idx != COL_NOT_AVAILABLE ) )
+        rc = opt_field_lnk_group( cursor, atx->lnk_group_idx, id );
+
+    if ( rc == 0 && cgc_output.p_tags.len > 0 )
+        rc = KOutMsg( "\t%.*s", cgc_output.p_tags.len, cgc_output.p_tags.ptr );
+
+    /* OPT SAM-FIELD: XI     SRA-column: ALIGN_ID */
+    if ( rc == 0 && opts->print_alignment_id_in_column_xi )
+        rc = KOutMsg( "\tXI:i:%u", id );
+
+    /* to match sam-tools output: in case we are dumping this in CG-mode.... */
+    if ( rc == 0 && ( opts->cigar_treatment != ct_unchanged ) && ( atx->al_group_idx != COL_NOT_AVAILABLE ) )
+    {
+        const char * align_grp;
+        uint32_t align_grp_len;
+        rc = read_char_ptr( id, cursor, atx->al_group_idx, &align_grp, &align_grp_len, "ALIGN_GROUP" );
+        if ( rc == 0 && align_grp_len > 0 )
+        {
+            uint32_t i;
+            for ( i = 0; rc == 0 && i < align_grp_len - 1; ++i )
+            {
+                if ( align_grp[ i ] == '_' )
+                {
+                    rc = KOutMsg( "\tZI:i:%.*s\tZA:i:%.1s", i, align_grp, align_grp + i + 1 );
+                    break;
+                }
+            }
+        }
+    }
+    
+    /* OPT SAM-FIELD: NH     SRA-column: ALIGNMENT_COUNT */
+    if ( rc == 0 && atx->cmn.al_count_idx != COL_NOT_AVAILABLE )
+    {
+        const uint8_t * al_count;
+        uint32_t al_count_len;
+        rc = read_uint8_ptr( id, cursor, atx->cmn.al_count_idx, &al_count, &al_count_len, "ALIGNMENT_COUNT" );
+        if ( rc == 0 && al_count_len > 0 )
+            rc = KOutMsg( "\tNH:i:%u", *al_count );
+    }
+
+    /* OPT SAM-FIELD: NM     SRA-column: EDIT_DISTANCE */
+    if ( rc == 0 )
+        rc = KOutMsg( "\tNM:i:%u", ( cgc_output.edit_dist - NM_adjustments ) );
+
+    /* OPT SAM-FIELD: XS:A:+/-  SRA-column: RNA-SPLICING detected via computation, or from the RNA_ORIENTATION - column */
+    if ( rc == 0 )
+    {
+        if ( opts->rna_splicing )
+        {
+            /* analysis of rna-splicing explicitly requested at the commandline */
+            if ( candidates.fwd_matched > 0 || candidates.rev_matched > 0 )
+            {
+                if ( candidates.fwd_matched > 0 )
+                    rc = KOutMsg( "\tXS:A:+" );
+                else 
+                    rc = KOutMsg( "\tXS:A:-" );
+            }
+        }
+        else
+        {
+            /* have a look if we have a RNA_ORIENTATION - column available */
+            if ( atx->rna_orientation_idx != COL_NOT_AVAILABLE )
+            {
+                const char * rna_orientation;
+                uint32_t rna_orientation_len;
+                rc = read_char_ptr( id, cursor, atx->rna_orientation_idx,
+                                    &rna_orientation, &rna_orientation_len, "RNA_ORIENTATION" );
+                if ( rc == 0 && rna_orientation_len > 0 )
+                {
+                    rc = KOutMsg( "\tXS:A:%c", rna_orientation[ 0 ] );
+                }
+            }
+        }
+    }
+
+    /* OPT SAM_FIELD: MD    reports Mismatches and Deletions */
+    if ( rc == 0 && opts->with_md_flag )
+    {
+        uint8_t * alig_ref = malloc( rec->len );
+        if ( alig_ref == NULL )
+            rc = RC( rcExe, rcNoTarg, rcAllocating, rcMemory, rcExhausted );
+        else
+        {
+            INSDC_coord_len ref_len;
+            rc = ReferenceObj_Read( rec->ref, pos, rec->len, alig_ref, &ref_len );
+            if ( rc == 0 )
+            {
+                rc = kout_md_tag_from_cigar_string( cgc_output.p_cigar.ptr, cgc_output.p_cigar.len, /* cigar */
+                        cgc_output.p_read.ptr, cgc_output.p_read.len,                               /* read */
+                        alig_ref, ref_len );                                                        /* reference */
+            }
+            free( alig_ref );
+        }
+    }
+    
+    if ( rc == 0 )
+        rc = KOutMsg( "\n" );
+
+    /* print a log-info if have to because RNA-splicing is requested and we have not homogeneous bits */
+    if ( rna_not_homogeneous_flag )
+    {
+        KLogLevel tmp_lvl = KLogLevelGet();
+        KLogLevelSet( klogInfo );
+
+        (void)PLOGMSG( klogInfo, ( klogInfo, "not homogeneous RNA-splices found in alignment #$(an) at $(ref).$(pos)", 
+                        "an=%lu,ref=%s,pos=%u", id, ref_name, pos ) );
+
+        KLogLevelSet( tmp_lvl );
+    }
+
+    return rc;
+}
+
+
+static rc_t print_alignment_fastx( const samdump_opts * const opts,
+                                   const char * ref_name,
+                                   INSDC_coord_zero pos,
+                                   matecache * const mc,
+                                   const PlacementRecord * const rec,
+                                   const align_table_context * const atx )
+{
+    bool orientation;
+    const VCursor *cursor = atx->cmn.cursor;
+    int64_t mate_align_id;
+    const int64_t * seq_spot_id;
+    uint32_t seq_spot_id_len;
+
+    rc_t rc = read_int64_ptr( rec->id, cursor, atx->cmn.seq_spot_id_idx, &seq_spot_id, &seq_spot_id_len, "SEQ_SPOT_ID" );
+
+    /* this is here to detect if the mate is aligned, if NOT, we want to put it into the unaligned-cache! */
+    if ( rc == 0 && opts->print_half_unaligned_reads )
+    {
+        rc = read_int64( rec->id, cursor, atx->mate_align_id_idx, &mate_align_id, 0, "MATE_ALIGN_ID" );
+        if ( rc == 0 && mate_align_id == 0 && mc != NULL && opts->use_mate_cache )
+        {
+            rc = matecache_insert_unaligned( mc, atx->db_idx, rec->id, pos, atx->ref_idx, *seq_spot_id );
+        }
+    }
+
+    if ( opts->output_format == of_fastq )
+        rc = KOutMsg( "@" );
+    else
+        rc = KOutMsg( ">" );
+
+    /* SAM-FIELD: QNAME     1.row: name */
+    if ( rc == 0 )
+    {
+        if ( seq_spot_id_len > 0 )
+        {
+            if ( opts->print_spot_group_in_name )
+            {
+                const char * spot_grp;
+                uint32_t spot_grp_len;
+                rc = read_char_ptr( rec->id, cursor, atx->cmn.seq_spot_group_idx, &spot_grp, &spot_grp_len, "SEQ_SPOT_GROUP" );
+                if ( rc == 0 )
+                    rc = dump_name( opts, *seq_spot_id, spot_grp, spot_grp_len ); /* sam-dump-opts.c */
+            }
+            else
+                rc = dump_name( opts, *seq_spot_id, NULL, 0 ); /* sam-dump-opts.c */
+        }
+        else
+            rc = KOutMsg( "*" );
+
+        if ( rc == 0 )
+        {
+            uint32_t seq_read_id;
+            rc = read_uint32( rec->id, cursor, atx->cmn.seq_read_id_idx, &seq_read_id, 0, "SEQ_READ_ID" );
+            if ( rc == 0 )
+                rc = KOutMsg( "/%u", seq_read_id );
+        }
+    }
+
+    /* SRA-column: REF_ORIENTATION ( bool ) ... needed for quality */
+    if ( rc == 0 )
+        rc = read_bool( rec->id, cursor, atx->cmn.ref_orientation_idx, &orientation, false, "REF_ORIENT" );
+
+    /* source of the alignment: primary/secondary/evidence */
+    if ( rc == 0 )
+    {
+        switch( atx->align_table_type )
+        {
+        case att_primary    :   rc = KOutMsg( " primary" ); break;
+        case att_secondary  :   rc = KOutMsg( " secondary" ); break;
+        case att_evidence   :   rc = KOutMsg( " evidence" ); break;
+        }
+    }
+
+    /* against what reference aligned, at what position, with what mapping-quality */
+    if ( rc == 0 )
+        rc = KOutMsg( " ref=%s pos=%u mapq=%i\n", ref_name, pos + 1, rec->mapq );
+
+    /* READ at a new line */
+    if ( rc == 0 )
+    {
+        const char * read;
+        uint32_t read_size;
+        rc = read_char_ptr( rec->id, cursor, atx->cmn.raw_read_idx, &read, &read_size, "RAW_READ" );
+        if ( rc == 0 )
+        {
+            if ( read_size > 0 )
+                rc = KOutMsg( "%.*s\n", read_size, read );
+            else
+                rc = KOutMsg( "*\n" );
+        }
+    }
+
+    /* QUALITY on a new line if in fastq-mode */
+    if ( rc == 0 && opts->output_format == of_fastq )
+    {
+        rc = KOutMsg( "+\n" );
+        if ( rc == 0 )
+        {
+            const char * quality;
+            uint32_t quality_size;
+            rc = read_char_ptr( rec->id, cursor, atx->cmn.sam_quality_idx, &quality, &quality_size, "SAM_QUALITY" );
+            if ( rc == 0 )
+            {
+                if ( quality_size > 0 )
+                    rc = dump_quality_33( opts, quality, quality_size, false );
+                else
+                    rc = KOutMsg( "*" );
+            }
+            if ( rc == 0 )
+                rc = KOutMsg( "\n" );
+        }
+    }
+
+    return rc;
+}
+
+
+/* print one record of alignment-information in SAM-format */
+static rc_t walk_position( const samdump_opts * const opts,
+                           PlacementSetIterator * const set_iter,
+                           const char * ref_name,
+                           INSDC_coord_zero pos,
+                           matecache * const mc,
+                           struct rna_splice_dict * splice_dict,
+                           INSDC_coord_zero first_pos,
+                           INSDC_coord_len len )
+{
+    rc_t rc = 0;
+    while ( rc == 0 )
+    {
+        rc = Quitting ();
+        if ( rc == 0 )
+        {
+            const PlacementRecord *rec;
+            rc = PlacementSetIteratorNextRecordAt( set_iter, pos, &rec );
+            if ( rc != 0 )
+            {
+                if ( GetRCState( rc ) != rcDone )
+                {
+                    LOGERR( klogInt, rc, "PlacementSetIteratorNextRecordAt() failed" );
+                }
+            }
+            else
+            {
+
+#if _DEBUGGING
+                if ( opts->perf_log != NULL )
+                    perf_log_line( opts->perf_log, pos );
+#endif
+
+                /* We have to do this here, becasue the nature of the iterator is to return all alignments that
+                   touch ( stick into ) the requested interval. But: sam-dump has to dump alignments that
+                   !! start !! in the requested interval. */
+                if ( pos >= first_pos )
+                {
+                    align_table_context * atx = PlacementRecord_get_ext_data_ptr( rec, placementRecordExtension0 );
+                    if ( atx == NULL )
+                    {
+                        rc = RC( rcExe, rcNoTarg, rcReading, rcParam, rcNull );
+                        LOGERR( klogInt, rc, "no placement-record-context available" );
+                    }
+                    else
+                    {
+                        if ( opts->output_format == of_sam )
+                        {
+                            if ( atx->align_table_type == att_evidence )
+                                rc = print_alignment_sam_ev( opts, ref_name, pos, rec, atx );
+                            else
+                                rc = print_alignment_sam_ps( opts, ref_name, pos, mc, splice_dict, rec, atx );
+                        }
+                        else
+                            rc = print_alignment_fastx( opts, ref_name, pos, mc, rec, atx );
+                    }
+                }
+                PlacementRecordWhack ( rec );
+
+
+            }
+        }
+    }
+    if ( GetRCState( rc ) == rcDone ) rc = 0;
+    return rc;
+}
+
+
+static rc_t walk_window( const samdump_opts * const opts,
+                         PlacementSetIterator * const set_iter,
+                         const char * ref_name,
+                         matecache * const mc,
+                         struct rna_splice_dict * splice_dict,
+                         INSDC_coord_zero first_pos,
+                         INSDC_coord_len len )
+{
+    rc_t rc = 0;
+    while ( rc == 0 )
+    {
+        rc = Quitting ();
+        if ( rc == 0 )
+        {
+            INSDC_coord_zero pos;
+            rc = PlacementSetIteratorNextAvailPos( set_iter, &pos, NULL );
+            if ( rc != 0 )
+            {
+                if ( GetRCState( rc ) != rcDone )
+                {
+                    LOGERR( klogInt, rc, "PlacementSetIteratorNextAvailPos() failed" );
+                }
+            }
+            else
+            {
+                rc = walk_position( opts, set_iter, ref_name, pos, mc, splice_dict, first_pos, len );
+            }
+        }
+    }
+    if ( GetRCState( rc ) == rcDone ) rc = 0;
+    return rc;
+}
+
+
+static rc_t walk_reference( const samdump_opts * const opts,
+                            PlacementSetIterator * const set_iter,
+                            struct ReferenceObj const * ref_obj,
+                            const char * ref_name,
+                            matecache * const mc )
+{
+    rc_t rc = 0;
+    struct rna_splice_dict * splice_dict = NULL;
+
+    if ( opts->rna_splicing )
+    {
+        splice_dict = make_rna_splice_dict();
+        /* rna-splice-log */
+        if ( opts->rna_splice_log != NULL )
+            rna_splice_log_enter_ref( opts->rna_splice_log, ref_name, ref_obj );
+    }
+
+    while ( rc == 0 )
+    {
+        rc = Quitting ();
+        if ( rc == 0 )
+        {
+            INSDC_coord_zero first_pos;
+            INSDC_coord_len len;
+            rc = PlacementSetIteratorNextWindow( set_iter, &first_pos, &len );
+            if ( rc != 0 )
+            {
+                if ( GetRCState( rc ) != rcDone )
+                {
+                    LOGERR( klogInt, rc, "PlacementSetIteratorNextWindow() failed" );
+                }
+            }
+            else
+                rc = walk_window( opts, set_iter, ref_name, mc, splice_dict, first_pos, len );
+        }
+    }
+    if ( GetRCState( rc ) == rcDone ) rc = 0;
+
+    if ( rc == 0 && mc != NULL && opts->use_mate_cache )
+        rc = matecache_clear_same_ref( mc );
+
+    if ( splice_dict != NULL )
+    {
+        /* rna-splice-log */
+        if ( opts->rna_splice_log != NULL )
+            rna_splice_log_exit_ref( opts->rna_splice_log, splice_dict );
+        free_rna_splice_dict( splice_dict );
+    }
+
+    return rc;
+}
+
+
+static rc_t walk_placements( const samdump_opts * const opts,
+                             PlacementSetIterator * const set_iter,
+                             matecache * const mc )
+{
+    rc_t rc = 0;
+    while ( rc == 0 )
+    {
+        struct ReferenceObj const * ref_obj;
+
+        rc = PlacementSetIteratorNextReference( set_iter, NULL, NULL, &ref_obj );
+        if ( rc == 0 )
+        {
+            if ( ref_obj != NULL )
+            {
+                const char * ref_name = NULL;
+                if ( opts->use_seqid_as_refname )
+                    rc = ReferenceObj_SeqId( ref_obj, &ref_name );
+                else
+                    rc = ReferenceObj_Name( ref_obj, &ref_name );
+
+                if ( rc == 0 )
+                {
+#if _DEBUGGING
+                    if ( opts->perf_log != NULL )
+                        perf_log_start_sub_section( opts->perf_log, ref_name );
+#endif
+
+                    rc = walk_reference( opts, set_iter, ref_obj, ref_name, mc );
+
+#if _DEBUGGING
+                    if ( opts->perf_log != NULL )
+                        perf_log_end_sub_section( opts->perf_log );
+#endif
+                }
+                else
+                {
+                    if ( opts->use_seqid_as_refname )
+                    {
+                        (void)LOGERR( klogInt, rc, "ReferenceObj_SeqId() failed" );
+                    }
+                    else
+                    {
+                        (void)LOGERR( klogInt, rc, "ReferenceObj_Name() failed" );
+                    }
+                }
+            }
+        }
+        else if ( GetRCState( rc ) != rcDone )
+        {
+            (void)LOGERR( klogInt, rc, "ReferenceIteratorNextReference() failed" );
+        }
+    }
+
+    if ( GetRCState( rc ) == rcDone )
+        rc = 0;
+    return rc;
+}
+
+
+
+static void CC destroy_align_table_context( void *item, void *data )
+{
+    align_table_context * atx = item;
+    free_align_table_context( atx );
+}
+
+
+static rc_t print_all_aligned_spots_of_this_reference( const samdump_opts * const opts,
+                                                       const input_database * const ids,
+                                                       matecache * const mc,
+                                                       const AlignMgr * const a_mgr,
+                                                       const ReferenceObj * const ref_obj )
+{
+    PlacementSetIterator * set_iter;
+    /* the we ask the alignment-manager to produce a placement-set-iterator... */
+    rc_t rc = AlignMgrMakePlacementSetIterator( a_mgr, &set_iter );
+    if ( rc != 0 )
+    {
+        (void)LOGERR( klogErr, rc, "cannot create PlacementSetIterator" );
+    }
+    else
+    {
+        /* here we need a vector to passed along into the creation of the iterators */
+        Vector context_list;
+        INSDC_coord_len ref_len;
+
+        VectorInit ( &context_list, 0, 5 );
+
+        rc = ReferenceObj_SeqLength( ref_obj, &ref_len );
+        if ( rc == 0 )
+        {
+            rc = add_pl_iters( opts, set_iter, ref_obj, ids,
+                0,                  /* where it starts on the reference */
+                ref_len,            /* the whole length of this reference/chromosome */
+                NULL,               /* no spotgroup re-grouping (yet) */
+                &context_list
+                );
+            if ( rc == 0 )
+                rc = walk_placements( opts, set_iter, mc );
+        }
+
+        /* walk the context_list to free the align_table_context records, close/free the cursors... */
+        VectorWhack ( &context_list, destroy_align_table_context, NULL );
+        PlacementSetIteratorRelease( set_iter );
+    }
+    return rc;
+}
+
+
+/*
+   the user did not specify regions, print all alignments from all input-files
+   this is strategy #1 to do this, create a ref_iter for every reference each
+    + ... less cursors will be open at the same time, more resource efficient
+    - ... if more than one input-file, the output will be sorted only within each reference
+*/
+static rc_t print_all_aligned_spots_0( const samdump_opts * const opts,
+                                       const input_files * const ifs,
+                                       matecache * const mc,
+                                       const AlignMgr * const a_mgr )
+{
+    rc_t rc = 0;
+    uint32_t db_idx;
+    /* we now loop through all input-databases... */
+    for ( db_idx = 0; db_idx < ifs->database_count && rc == 0; ++db_idx )
+    {
+        const input_database * ids = VectorGet( &ifs->dbs, db_idx );
+        if ( ids != NULL )
+        {
+            uint32_t refobj_count;
+            rc = ReferenceList_Count( ids->reflist, &refobj_count );
+            if ( rc == 0 && refobj_count > 0 )
+            {
+                uint32_t ref_idx;
+                for ( ref_idx = 0; ref_idx < refobj_count && rc == 0; ++ref_idx )
+                {
+                    const ReferenceObj * ref_obj;
+                    rc = ReferenceList_Get( ids->reflist, &ref_obj, ref_idx );
+                    if ( rc == 0 && ref_obj != NULL )
+                    {
+                        rc = print_all_aligned_spots_of_this_reference( opts, ids, mc, a_mgr, ref_obj );
+                        ReferenceObj_Release( ref_obj );
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+/*
+   the user did not specify regions, print all alignments from all input-files
+   this is strategy #2 to do this, throw all iterators for all input-files and all there references
+   into one set_iter.
+    + ... if more than one input-file, everything will be sorted
+    - ... creates a large number of open cursors ( because of sub-cursors due to schema-functions )
+          this can result in not beeing able to perform the functions at all because of running out of resources
+    - ... a long delay at start up, before the 1st alignment is printed ( all the cursors have to be opened )
+*/
+static rc_t print_all_aligned_spots_1( const samdump_opts * const opts,
+                                       const input_files * const ifs,
+                                       matecache * const mc,
+                                       const AlignMgr * const a_mgr )
+{
+    PlacementSetIterator * set_iter;
+    /* the we ask the alignment-manager to produce a placement-set-iterator... */
+    rc_t rc = AlignMgrMakePlacementSetIterator( a_mgr, &set_iter );
+    if ( rc != 0 )
+    {
+        (void)LOGERR( klogErr, rc, "cannot create PlacementSetIterator" );
+    }
+    else
+    {
+        /* here we need a vector to passed along into the creation of the iterators */
+        Vector context_list;
+        VectorInit ( &context_list, 0, 5 );
+
+        rc = prepare_whole_files( opts, ifs, set_iter, &context_list );
+
+        if ( rc == 0 )
+            rc = walk_placements( opts, set_iter, mc );
+
+        /* walk the context_list to free the align_table_context records, close/free the cursors... */
+        VectorWhack ( &context_list, destroy_align_table_context, NULL );
+        PlacementSetIteratorRelease( set_iter );
+    }
+    return rc;
+}
+
+
+/*
+   the user has specified certain regions on the references,
+   print only alignments, that start in these regions
+*/
+static rc_t print_selected_aligned_spots( const samdump_opts * const opts,
+                                          const input_files * const ifs,
+                                          matecache * const mc,
+                                          const AlignMgr * const a_mgr )
+{
+    PlacementSetIterator * set_iter;
+    /* the we ask the alignment-manager to produce a placement-set-iterator... */
+    rc_t rc = AlignMgrMakePlacementSetIterator( a_mgr, &set_iter );
+    if ( rc != 0 )
+    {
+        (void)LOGERR( klogErr, rc, "cannot create PlacementSetIterator" );
+    }
+    else
+    {
+        /* here we need a vector to passed along into the creation of the iterators */
+        Vector context_list;
+        VectorInit ( &context_list, 0, 5 );
+
+        rc = prepare_regions( opts, ifs, set_iter, &context_list );
+
+        if ( rc == 0 )
+            rc = walk_placements( opts, set_iter, mc );
+
+        /* walk the context_list to free the align_table_context records, close/free the cursors... */
+        VectorWhack ( &context_list, destroy_align_table_context, NULL );
+
+        PlacementSetIteratorRelease( set_iter );
+    }
+    return rc;
+}
+
+
+/*
+   this is called from sam-dump3.c, it prepares the iterators and then walks them
+   ---> only entry into this module <--- 
+*/
+rc_t print_aligned_spots( const samdump_opts * const opts,
+                          const input_files * const ifs,
+                          matecache * const mc )
+{
+    rc_t rc;
+    const AlignMgr * a_mgr;
+
+#if _DEBUGGING
+    if ( opts->perf_log != NULL )
+        perf_log_start_section( opts->perf_log, "aligned spots" );
+#endif
+
+    /* first we make an alignment-manager */
+    rc = AlignMgrMakeRead( &a_mgr );
+    if ( rc != 0 )
+    {
+        (void)LOGERR( klogErr, rc, "cannot create alignment-manager" );
+    }
+    else
+    {
+        if ( opts->region_count == 0 )
+        {
+            /* the user did not specify regions to be printed ==> print all alignments */
+            switch( opts->dump_mode )
+            {
+                case dm_one_ref_at_a_time : rc = print_all_aligned_spots_0( opts, ifs, mc, a_mgr ); break;
+                case dm_prepare_all_refs  : rc = print_all_aligned_spots_1( opts, ifs, mc, a_mgr ); break;
+            }
+        }
+        else
+        {
+            /* the user did specify regions to be printed ==> print only the alignments in these regions */
+            rc = print_selected_aligned_spots( opts, ifs, mc, a_mgr );
+        }
+        AlignMgrRelease( a_mgr );
+    }
+
+#if _DEBUGGING
+    if ( opts->perf_log != NULL )
+        perf_log_end_section( opts->perf_log );
+#endif
+
+    return rc;
+}
diff --git a/tools/sra-pileup/sam-aligned.h b/tools/sra-pileup/sam-aligned.h
new file mode 100644
index 0000000..0ef4204
--- /dev/null
+++ b/tools/sra-pileup/sam-aligned.h
@@ -0,0 +1,46 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_sam_aligned_
+#define _h_sam_aligned_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include "sam-dump-opts.h"
+#include "inputfiles.h"
+#include "matecache.h"
+
+#define COL_READ "(INSDC:dna:text)READ"
+
+rc_t print_aligned_spots( const samdump_opts * const opts,
+                          const input_files * const ifs,
+                          matecache * const mc );
+
+#endif
diff --git a/tools/sra-pileup/sam-dump-opts.c b/tools/sra-pileup/sam-dump-opts.c
new file mode 100644
index 0000000..24e262c
--- /dev/null
+++ b/tools/sra-pileup/sam-dump-opts.c
@@ -0,0 +1,1676 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+
+#include "sam-dump-opts.h"
+#include "perf_log.h"
+
+#include <klib/time.h>
+#include <align/quality-quantizer.h>
+#include <sysalloc.h>
+
+#define CURSOR_CACHE_SIZE 256*1024*1024
+
+/* =========================================================================================== */
+
+
+int cmp_pchar( const char * a, const char * b )
+{
+    int res = 0;
+    if ( ( a != NULL )&&( b != NULL ) )
+    {
+        size_t len_a = string_size( a );
+        size_t len_b = string_size( b );
+        res = string_cmp ( a, len_a, b, len_b, ( len_a < len_b ) ? len_b : len_a );
+    }
+    return res;
+}
+
+
+/* =========================================================================================== */
+
+
+static range * make_range( const uint64_t start, const uint64_t end )
+{
+    range *res = calloc( sizeof *res, 1 );
+    if ( res != NULL )
+    {
+        res->start = start;
+        res->end = end;
+    }
+    return res;
+}
+
+
+static int64_t cmp_range( const range * a, const range * b )
+{
+    if ( a->start < b->start )
+        return -1;
+    else if ( a->start > b->start )
+        return 1;
+    else if ( a->end < b->end )
+        return -1;
+    else if ( a->end > b->end )
+        return 1;
+    else
+        return 0;
+}
+
+
+static bool range_overlapp( const range * a, const range * b )
+{
+    return ( !( ( b->end < a->start ) || ( b->start > a->end ) ) );
+}
+
+
+/* =========================================================================================== */
+
+
+static reference_region * make_reference_region( const char *name )
+{
+    reference_region *res = calloc( sizeof *res, 1 );
+    if ( res != NULL )
+    {
+        res->name = string_dup_measure ( name, NULL );
+        if ( res->name == NULL )
+        {
+            free( res );
+            res = NULL;
+        }
+        else
+            VectorInit ( &res->ranges, 0, 5 );
+    }
+    return res;
+}
+
+
+static int64_t CC cmp_range_wrapper( const void *item, const void *n )
+{   return cmp_range( item, n ); }
+
+
+static rc_t add_ref_region_range( reference_region * self, const uint64_t start, const uint64_t end )
+{
+    rc_t rc = 0;
+    range *r = make_range( start, end );
+    if ( r == NULL )
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+    else
+    {
+        rc = VectorInsert ( &self->ranges, r, NULL, cmp_range_wrapper );
+        if ( rc != 0 )
+            free( r );
+    }
+    return rc;
+}
+
+
+#define RR_NAME  1
+#define RR_START 2
+#define RR_END   3
+
+
+static void put_c( char *s, size_t size, size_t *dst, char c )
+{
+    if ( *dst < ( size - 1 ) )
+        s[ *dst ] = c;
+    (*dst)++;
+}
+
+static void finish_txt( char *s, size_t size, size_t *dst )
+{
+    if ( *dst > size )
+        s[ size - 1 ] = 0;
+    else
+        s[ *dst ] = 0;
+    *dst = 0;
+}
+
+static uint64_t finish_num( char *s, size_t size, size_t *dst )
+{
+    uint64_t res = 0;
+    char *endp;
+    finish_txt( s, size, dst );
+    res = strtou64( s, &endp, 10 );
+    return res;
+}
+
+
+/* s = refname:1000-2000 */
+static void parse_definition( const char *s, char * name, size_t len,
+                              uint64_t *start, uint64_t *end )
+{
+    size_t n = string_size( s );
+
+    *start = 0;
+    *end   = 0;
+    name[ 0 ] = 0;
+    if ( n > 0 )
+    {
+        size_t i, st, dst = 0;
+        char tmp[ 32 ];
+        st = RR_NAME;
+        for ( i = 0; i < n; ++i )
+        {
+            char c = s[ i ];
+            switch( st )
+            {
+                case RR_NAME  : if ( c == ':' )
+                                {
+                                    finish_txt( name, len, &dst );
+                                    st = RR_START;
+                                }
+                                else
+                                {
+                                    put_c( name, len, &dst, c );
+                                }
+                                break;
+
+                case RR_START : if ( c == '-' )
+                                {
+                                    *start = finish_num( tmp, sizeof tmp, &dst );
+                                    st = RR_END;
+                                }
+                                else if ( ( c >= '0' )&&( c <= '9' ) )
+                                {
+                                    put_c( tmp, sizeof tmp, &dst, c );
+                                }
+                                break;
+
+                case RR_END   : if ( ( c >= '0' )&&( c <= '9' ) )
+                                {
+                                    put_c( tmp, sizeof tmp, &dst, c );
+                                }
+                                break;
+            }
+        }
+        switch( st )
+        {
+            case RR_NAME  : finish_txt( name, len, &dst );
+                            break;
+
+            case RR_START : *start = finish_num( tmp, sizeof tmp, &dst );
+                            break;
+
+            case RR_END   : *end = finish_num( tmp, sizeof tmp, &dst );
+                            break;
+        }
+    }
+}
+
+
+static void CC release_range_wrapper( void * item, void * data )
+{
+    free( item );
+}
+
+
+static void free_reference_region( reference_region * self )
+{
+    free( (void*)self->name );
+    VectorWhack ( &self->ranges, release_range_wrapper, NULL );
+    free( self );
+}
+
+
+static void check_ref_region_ranges( reference_region * self )
+{
+    uint32_t n = VectorLength( &self->ranges );
+    uint32_t i = 0;
+    range *a = NULL;
+    while ( i < n )
+    {
+        range *b = VectorGet ( &self->ranges, i );
+        bool remove = false;
+        if ( a != NULL )
+        {
+            remove = range_overlapp( a, b );
+            if ( remove )
+            {
+                range *r;
+                a->end = b->end;
+                VectorRemove ( &self->ranges, i, (void**)&r );
+                free( r );
+                n--;
+            }
+        }
+        if ( !remove )
+        {
+            a = b;
+            ++i;
+        }
+    }
+}
+
+
+/* =========================================================================================== */
+
+
+static int64_t CC reference_vs_pchar_wrapper( const void *item, const BSTNode *n )
+{
+    const reference_region * r = ( const reference_region * )n;
+    return cmp_pchar( (const char *)item, r->name );
+}
+
+static reference_region * find_reference_region( BSTree * regions, const char * name )
+{
+    return ( reference_region * ) BSTreeFind ( regions, name, reference_vs_pchar_wrapper );
+}
+
+
+typedef struct frrl
+{
+    const char * name;
+    size_t len;
+} frrl;
+
+
+static int cmp_pchar_vs_len( const char * a, const char * b, size_t len_b )
+{
+    int res = 0;
+    if ( ( a != NULL )&&( b != NULL ) )
+    {
+        size_t len_a = string_size( a );
+        res = string_cmp ( a, len_a, b, len_b, ( len_a < len_b ) ? len_b : len_a );
+    }
+    return res;
+}
+
+static int64_t CC reference_vs_frr_wrapper( const void *item, const BSTNode *n )
+{
+    const reference_region * r = ( const reference_region * )n;
+    const frrl * ctx = item;
+    return cmp_pchar_vs_len( r->name, ctx->name, ctx->len );
+}
+
+static reference_region * find_reference_region_len( BSTree * regions, const char * name, size_t len )
+{
+    frrl ctx;
+    ctx.name = name;
+    ctx.len  = len;
+    return ( reference_region * ) BSTreeFind ( regions, &ctx, reference_vs_frr_wrapper );
+}
+
+
+static int64_t CC ref_vs_ref_wrapper( const BSTNode *item, const BSTNode *n )
+{
+   const reference_region * a = ( const reference_region * )item;
+   const reference_region * b = ( const reference_region * )n;
+   return cmp_pchar( a->name, b->name );
+}
+
+static rc_t add_refrange( BSTree * regions, const char * name, const uint64_t start, const uint64_t end )
+{
+    rc_t rc;
+
+    reference_region * r = find_reference_region( regions, name );
+    if ( r == NULL )
+    {
+        r = make_reference_region( name );
+        if ( r == NULL )
+            rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        else
+            rc = add_ref_region_range( r, start, end );
+        if ( rc == 0 )
+            rc = BSTreeInsert ( regions, (BSTNode *)r, ref_vs_ref_wrapper );
+        if ( rc != 0 )
+            free_reference_region( r );
+    }
+    else
+    {
+        rc = add_ref_region_range( r, start, end );
+    }
+    return rc;
+}
+
+
+static rc_t parse_and_add_region( BSTree * regions, const char * s )
+{
+    rc_t rc = 0;
+    uint64_t start, end;
+    char name[ 4096 ];
+    parse_definition( s, name, sizeof name, &start, &end );
+    if ( name[ 0 ] == 0 )
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+    else
+    {
+        uint64_t start_0based = ( start > 0 ) ? start - 1 : 0;
+        uint64_t end_0based = ( end > 0 ) ? end - 1 : 0;
+        if ( end_0based != 0 && end_0based < start_0based )
+        {
+            uint64_t temp = end_0based;
+            end_0based = start_0based;
+            start_0based = temp;
+        }
+        rc = add_refrange( regions, name, start_0based, end_0based );
+    }
+    return rc;
+}
+
+
+static void CC check_refrange_wrapper( BSTNode *n, void *data )
+{
+    check_ref_region_ranges( ( reference_region * ) n );
+}
+
+
+static void check_ref_regions( BSTree * regions )
+{
+    BSTreeForEach ( regions, false, check_refrange_wrapper, NULL );
+}
+
+
+static void CC release_ref_region_wrapper( BSTNode *n, void * data )
+{
+    free_reference_region( ( reference_region * ) n );
+}
+
+
+static void free_ref_regions( BSTree * regions )
+{    
+    BSTreeWhack ( regions, release_ref_region_wrapper, NULL );
+}
+
+
+static void CC count_ref_region_wrapper( BSTNode *n, void *data )
+{   
+    reference_region * r = ( reference_region * ) n;
+    uint32_t * count = ( uint32_t * ) data;
+    *count += VectorLength( &(r->ranges) );
+}
+
+
+static uint32_t count_ref_regions( BSTree * regions )
+{
+    uint32_t res = 0;
+    BSTreeForEach ( regions, false, count_ref_region_wrapper, &res );
+    return res;
+}
+
+
+/* =========================================================================================== */
+
+
+static void CC foreach_reference_wrapper( BSTNode *n, void *data )
+{   
+    reference_region * r = ( reference_region * ) n;
+    foreach_reference_func * func = ( foreach_reference_func * )data;
+
+    if ( func->rc == 0 )
+        func->rc = func->on_reference( r->name, &(r->ranges), func->data );
+}
+
+
+rc_t foreach_reference( BSTree * regions,
+    rc_t ( CC * on_reference ) ( const char * name, Vector *ranges, void *data ), 
+    void *data )
+{
+    foreach_reference_func func;
+
+    func.on_reference = on_reference;
+    func.data = data;
+    func.rc = 0;
+    BSTreeForEach ( regions, false, foreach_reference_wrapper, &func );
+    return func.rc;
+}
+
+
+/* =========================================================================================== */
+
+/* s = 1000-2000 */
+static void parse_matepair_definition( const char *s, uint64_t *start, uint64_t *end )
+{
+    size_t n = string_size( s );
+    if ( n > 0 )
+    {
+        size_t i, st, dst = 0;
+        char tmp[ 32 ];
+        st = RR_START;
+        for ( i = 0; i < n; ++i )
+        {
+            char c = s[ i ];
+            switch( st )
+            {
+                case RR_START : if ( c == '-' )
+                                {
+                                    *start = finish_num( tmp, sizeof tmp, &dst );
+                                    st = RR_END;
+                                }
+                                else if ( ( c >= '0' )&&( c <= '9' ) )
+                                {
+                                    put_c( tmp, sizeof tmp, &dst, c );
+                                }
+                                break;
+
+                case RR_END   : if ( ( c >= '0' )&&( c <= '9' ) )
+                                {
+                                    put_c( tmp, sizeof tmp, &dst, c );
+                                }
+                                break;
+            }
+        }
+        switch( st )
+        {
+            case RR_START : *start = finish_num( tmp, sizeof tmp, &dst );
+                            break;
+
+            case RR_END   : *end = finish_num( tmp, sizeof tmp, &dst );
+                            break;
+        }
+    }
+}
+
+
+static rc_t parse_and_add_matepair_dist( Vector * dist_vector, const char * s )
+{
+    rc_t rc = 0;
+    uint64_t start = 0, end = 0;
+    range *r;
+
+    if ( cmp_pchar( s, "unknown" ) != 0 )
+        parse_matepair_definition( s, &start, &end );
+
+    r = make_range( start, end );
+    if ( r == NULL )
+    {
+        rc = RC( rcExe, rcNoTarg, rcValidating, rcMemory, rcExhausted );
+        (void)LOGERR( klogErr, rc, "error storing matepair-distance" );
+    }
+    else
+    {
+        rc = VectorInsert ( dist_vector, r, NULL, cmp_range_wrapper );
+        if ( rc != 0 )
+            free( r );
+    }
+    return rc;
+}
+
+
+bool filter_by_matepair_dist( const samdump_opts * opts, int32_t tlen )
+{
+    bool res = false;
+
+    uint32_t count = VectorLength( &opts->mp_dist );
+    if ( count > 0 )
+    {
+        uint32_t idx, tlen_v;
+
+        res = false;
+        if ( tlen < 0 )
+            tlen_v = -(tlen);
+        else
+            tlen_v = tlen;
+
+        for ( idx = 0; idx < count && !res; ++idx )
+        {
+            range * r = VectorGet( &opts->mp_dist, idx );
+            if ( r != NULL )
+                res = ( ( tlen_v >= r->start )&&( tlen_v <= r->end ) );
+        }
+    }
+    return res;
+}
+
+/* =========================================================================================== */
+
+
+static rc_t get_bool_option( Args * args, const char * name, bool *value )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogErr, ( klogErr, rc, "error reading comandline option '$(t)'", "t=%s", name ) );
+    }
+    else
+    {
+        *value = ( count > 0 );
+    }
+    return rc;
+}
+
+
+static rc_t gather_region_options( Args * args, samdump_opts * opts )
+{
+    uint32_t count;
+
+    rc_t rc = ArgsOptionCount( args, OPT_REGION, &count );
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogErr, ( klogErr, rc, "error counting comandline option '$(t)'", "t=%s", OPT_REGION ) );
+    }
+    else if ( count > 0 )
+    {
+        uint32_t i;
+
+        BSTreeInit( &opts->regions );
+        for ( i = 0; i < count && rc == 0; ++i )
+        {
+            const char * s;
+            rc = ArgsOptionValue( args, OPT_REGION, i, (const void **)&s );
+            if ( rc != 0 )
+            {
+                (void)PLOGERR( klogErr, ( klogErr, rc, "error retrieving comandline option '$(t)'", "t=%s", OPT_REGION ) );
+            }
+            else
+                rc = parse_and_add_region( &opts->regions, s );
+        }
+        if ( rc == 0 )
+        {
+            check_ref_regions( &opts->regions );
+            opts->region_count = count_ref_regions( &opts->regions );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t gather_matepair_distances( Args * args, samdump_opts * opts )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, OPT_MATE_DIST, &count );
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogErr, ( klogErr, rc, "error counting comandline option '$(t)'", "t=%s", OPT_REGION ) );
+    }
+    else if ( count > 0 )
+    {
+        uint32_t i;
+
+        VectorInit( &opts->mp_dist, 0, 10 );
+        for ( i = 0; i < count && rc == 0; ++i )
+        {
+            const char * s;
+            rc = ArgsOptionValue( args, OPT_MATE_DIST, i, (const void **)&s );
+            if ( rc != 0 )
+            {
+                (void)PLOGERR( klogErr, ( klogErr, rc, "error retrieving comandline option '$(t)'", "t=%s", OPT_MATE_DIST ) );
+            }
+            else
+                rc = parse_and_add_matepair_dist( &opts->mp_dist, s );
+        }
+        opts->use_matepair_filter = ( VectorLength( &opts->mp_dist ) > 0 );
+    }
+    return rc;
+}
+
+
+static rc_t gather_2_bool( Args * args, const char *name1, const char *name2, bool *b1, bool *b2 )
+{
+    rc_t rc = get_bool_option( args, name1, b1 );
+    if ( rc != 0 ) return rc;
+
+    rc = get_bool_option( args, name2, b2 );
+    if ( rc != 0 ) return rc;
+
+    if ( *b1 && *b2 )
+    {
+        rc = RC( rcExe, rcNoTarg, rcValidating, rcParam, rcInvalid );
+        (void)PLOGERR( klogErr, ( klogErr, rc, "the parameters '--$(p1)' and '--$(p2)' are mutually exclusive", 
+                      "p1=%s,p2=%s", name1, name2 ) );
+    }
+    return rc;
+}
+
+
+static rc_t gather_flag_options( Args * args, samdump_opts * opts )
+{
+    bool dump_prim_only;
+
+    /* do we have to dump unaligned reads too? */
+    rc_t rc = get_bool_option( args, OPT_UNALIGNED, &opts->dump_unaligned_reads );
+    if ( rc != 0 ) return rc;
+
+    /* assume we have to dump primary alignments, maybe switched off later by other option */
+    opts->dump_primary_alignments = true;
+
+    /* we are dumping secondary alignments only if the user does
+       not explicitly ask for "primary only" */
+    rc = get_bool_option( args, OPT_PRIM_ONLY, &dump_prim_only );
+    if ( rc != 0 ) return rc;
+    opts->dump_secondary_alignments = !dump_prim_only;
+
+    /* check if we are asked to be in cga-tool compatible mode */
+    rc = get_bool_option( args, OPT_CG_SAM, &opts->dump_cg_sam );
+    if ( rc != 0 ) return rc;
+
+    /* check if we have to dump "EVIDENCE_INTERVAL" against the reference */
+    rc = get_bool_option( args, OPT_CG_EVIDENCE, &opts->dump_cg_evidence );
+    if ( rc != 0 ) return rc;
+
+    /* check if we have to dump "EVIDENCE_ALIGNMENT" against "EVIDENCE_INTERVAL" */
+    rc = get_bool_option( args, OPT_CG_EV_DNB, &opts->dump_cg_ev_dnb );
+    if ( rc != 0 ) return rc;
+
+    {
+        bool dump_cg_mappings;
+
+        /* look if cg-mappings is requested */
+        rc = get_bool_option( args, OPT_CG_MAPP, &dump_cg_mappings );
+        if ( rc != 0 ) return rc;
+
+        /* do some mode logic ... */
+        if ( !dump_cg_mappings &&
+             ( opts->dump_cga_tools_mode || opts->dump_cg_evidence || opts->dump_cg_ev_dnb || opts->dump_cg_sam ) )
+        {
+            opts->dump_primary_alignments = false;
+            opts->dump_secondary_alignments = false;
+            opts->dump_unaligned_reads = false;
+        }
+        else
+        {
+            opts->dump_primary_alignments = true;
+            opts->dump_secondary_alignments = !dump_prim_only;
+            /* opts->dump_unaligned_reads = ( opts->dump_unaligned_reads && opts->region_count == 0 ); */
+        }
+    }
+
+    /* do we have to print the long-version of the cigar-string? */
+    rc = get_bool_option( args, OPT_CIGAR_LONG, &opts->use_long_cigar );
+    if ( rc != 0 ) return rc;
+
+    /* print the sequence-id instead of the sequence-name */
+    rc = get_bool_option( args, OPT_USE_SEQID, &opts->use_seqid_as_refname );
+    if ( rc != 0 ) return rc;
+
+    /* print the READ where matched bases are replaced with '=' */
+    rc = get_bool_option( args, OPT_HIDE_IDENT, &opts->print_matches_as_equal_sign );
+    if ( rc != 0 ) return rc;
+
+    {
+        bool recalc_header, dont_print_header;
+
+        /* do we have to recalculate the header instead of printing the meta-data */
+        rc = get_bool_option( args, OPT_RECAL_HDR, &recalc_header );
+        if ( rc != 0 ) return rc;
+        /* should we suppress the header completely */
+        rc = get_bool_option( args, OPT_NO_HDR, &dont_print_header );
+        if ( rc != 0 ) return rc;
+        if ( dont_print_header )
+            opts->header_mode = hm_none;
+        else if ( recalc_header )
+            opts->header_mode = hm_recalc;
+        else
+            opts->header_mode = hm_dump;
+    }
+
+    {
+        bool cigar_cg, cigar_cg_merge;
+
+        /* do we have to transform cigar into cg-style ( has B/N ) */
+        /* do we have to transform cg-data(length of read/patterns in cigar) into valid SAM (cigar/READ/QUALITY) */
+        rc = gather_2_bool( args, OPT_CIGAR_CG, OPT_CIGAR_CG_M, &cigar_cg, &cigar_cg_merge );
+        if ( rc != 0 ) return rc;
+        if ( cigar_cg )
+            opts->cigar_treatment = ct_cg_style;
+        if ( cigar_cg_merge )
+            opts->cigar_treatment = ct_cg_merge;
+    }
+
+    {
+        bool gzip, bzip2;
+
+        /* do we have to compress the output with gzip ? */
+        /* do we have to compress the output with bzip2 ? */
+        rc = gather_2_bool( args, OPT_GZIP, OPT_BZIP2, &gzip, &bzip2 );
+        if ( rc != 0 ) return rc;
+        if ( gzip )
+            opts->output_compression = oc_gzip;
+        if ( bzip2 )
+            opts->output_compression = oc_bzip2;
+    }
+
+
+    {
+        bool fasta, fastq;
+
+        /* output in FASTA - mode  ? */
+        /* output in FASTQ - mode  ? */
+        rc = gather_2_bool( args, OPT_FASTA, OPT_FASTQ, &fasta, &fastq );
+        if ( rc != 0 ) return rc;
+        if ( fasta )
+            opts->output_format = of_fasta;
+        if ( fastq )
+            opts->output_format = of_fastq;
+    }
+
+
+    /* do we have to reverse unaligned reads if the flag in the row says so */
+    rc = get_bool_option( args, OPT_REVERSE, &opts->reverse_unaligned_reads );
+    if ( rc != 0 ) return rc;
+
+    /* do we have to add the spotgroup to the qname-column */
+    rc = get_bool_option( args, OPT_SPOTGRP, &opts->print_spot_group_in_name );
+    if ( rc != 0 ) return rc;
+
+    /* do we have to report options instead of executing */
+    rc = get_bool_option( args, OPT_REPORT, &opts->report_options );
+    if ( rc != 0 ) return rc;
+
+    /* do we have to print the alignment id in column XI */
+    rc = get_bool_option( args, OPT_XI_DEBUG, &opts->print_alignment_id_in_column_xi );
+    if ( rc != 0 ) return rc;
+
+    /* do we have to print the alignment id in column XI */
+    rc = get_bool_option( args, OPT_CACHEREPORT, &opts->report_cache );
+    if ( rc != 0 ) return rc;
+
+    /* do we have to dump unaligned reads only */
+    rc = get_bool_option( args, OPT_UNALIGNED_ONLY, &opts->dump_unaligned_only );
+    if ( rc != 0 ) return rc;
+
+    /* do we have to print the spot-group in a special way */
+    rc = get_bool_option( args, OPT_CG_NAMES, &opts->print_cg_names );
+    if ( rc != 0 ) return rc;
+
+    /* do we use a mate-cache */
+    rc = get_bool_option( args, OPT_NO_MATE_CACHE, &opts->use_mate_cache );
+    if ( rc != 0 ) return rc;
+    opts->use_mate_cache = !opts->use_mate_cache;
+
+    /* do we use a mate-cache */
+    rc = get_bool_option( args, OPT_LEGACY, &opts->force_legacy );
+    if ( rc != 0 ) return rc;
+
+    rc = get_bool_option( args, OPT_NEW, &opts->force_new );
+    if ( rc != 0 ) return rc;
+
+    if ( opts->force_new && opts->force_legacy )
+        opts->force_new = false;
+
+    /* do we have to merge cigar ( and read/qual ) for cg-operations in cigar */
+    rc = get_bool_option( args, OPT_CIGAR_CG_M, &opts->merge_cg_cigar );
+    if ( rc != 0 ) return rc;
+
+    /* do we enable rna-splicing */
+    rc = get_bool_option( args, OPT_RNA_SPLICE, &opts->rna_splicing );
+    if ( rc != 0 ) return rc;
+    
+    /* do we disable multi-threading */    
+    rc = get_bool_option( args, OPT_NO_MT, &opts->no_mt );
+    
+    /* do we have to generate the MD-flag */ 
+    rc = get_bool_option( args, OPT_MD_FLAG, &opts->with_md_flag );
+	
+    /* forcing to use the legacy code in case of Evidence-Dnb was requested */
+    if ( rc == 0 )
+    {
+        if ( opts->dump_cg_ev_dnb )
+        {
+            opts->force_legacy = true;
+            opts->force_new = false;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t get_str_option( Args * args, const char * name, const char ** s )
+{
+    uint32_t count;
+
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    *s = NULL;
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogErr, ( klogErr, rc, "error counting comandline option '$(t)'", "t=%s", name ) );
+    }
+    else if ( count > 0 )
+    {
+        rc = ArgsOptionValue( args, name, 0, (const void **)s );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogErr, ( klogErr, rc, "error retrieving comandline option '$(t)'", "t=%s", name ) );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t get_uint32_option( Args * args, const char * name, uint32_t def, uint32_t * value, bool dflt_if_zero )
+{
+    const char * s;
+    rc_t rc = get_str_option( args, name, &s );
+    *value = def;
+    if ( rc == 0 && s != NULL )
+    {
+        char *endp;
+        *value = strtou32( s, &endp, 0 );
+        if ( *endp != '\0' )
+        {
+            rc = RC( rcExe, rcArgv, rcProcessing, rcParam, rcInvalid );
+            (void)PLOGERR( klogErr, ( klogErr, rc, "error converting string to integer option '$(t)'", "t=%s", name ) );
+        }
+        else if ( dflt_if_zero && *value == 0 )
+            *value = def;
+    }
+    return rc;
+}
+
+
+static rc_t get_int32_options( Args * args, const char * name, int32_t * value, bool * used )
+{
+    const char * s;
+    rc_t rc = get_str_option( args, name, &s );
+    if ( rc == 0 && s != NULL )
+    {
+        char *endp;
+        *value = strtoi32( s, &endp, 0 );
+        if ( *endp != '\0' )
+        {
+            rc = RC( rcExe, rcArgv, rcProcessing, rcParam, rcInvalid );
+            (void)PLOGERR( klogErr, ( klogErr, rc, "error converting string to integer option '$(t)'", "t=%s", name ) );
+        }
+        else
+        {
+            if ( used != NULL )
+                *used = true;
+        }
+    }
+    return rc;
+}
+
+/*
+static rc_t get_int64_option( Args * args, const char * name, uint64_t def, uint64_t * value )
+{
+    const char * s;
+    rc_t rc = get_str_option( args, name, &s );
+    *value = def;
+    if ( rc == 0 && s != NULL )
+    {
+        char *endp;
+        *value = strtou32( s, &endp, 0 );
+        if ( *endp != '\0' )
+        {
+            rc = RC( rcExe, rcArgv, rcProcessing, rcParam, rcInvalid );
+            (void)PLOGERR( klogErr, ( klogErr, rc, "error converting string to integer option '$(t)'", "t=%s", name ) );
+        }
+        else if ( *value == 0 )
+            *value = def;
+    }
+    return rc;
+}
+*/
+
+static rc_t gather_int_options( Args * args, samdump_opts * opts )
+{
+    rc_t rc = get_uint32_option( args, OPT_MATE_GAP, 10000, &opts->mape_gap_cache_limit, true );
+    if ( rc == 0 )
+        rc = get_uint32_option( args, OPT_OUTBUFSIZE, 1024 * 32, &opts->output_buffer_size, false );
+
+    if ( rc == 0 )
+    {
+        uint32_t cs;
+        rc = get_uint32_option( args, OPT_CURSOR_CACHE, CURSOR_CACHE_SIZE, &cs, false );
+        if ( rc == 0 )
+            opts->cursor_cache_size = ( size_t )cs;
+    }
+
+    if ( rc == 0 )
+    {
+        uint32_t mode;
+        rc = get_uint32_option( args, OPT_DUMP_MODE, 0, &mode, true );
+        if ( rc == 0 )
+        {
+            switch( mode )
+            {
+                case 0  : opts->dump_mode = dm_one_ref_at_a_time; break;
+                case 1  : opts->dump_mode = dm_prepare_all_refs; break;
+                default : opts->dump_mode = dm_one_ref_at_a_time; break;
+            }
+        }
+    }
+
+    if ( rc == 0 )
+        rc = get_int32_options( args, OPT_MIN_MAPQ, &opts->min_mapq, &opts->use_min_mapq );
+
+    if ( rc == 0 )
+        rc = get_uint32_option( args, OPT_RNA_SPLICEL, 0, &opts->rna_splice_level, true );
+
+    return rc;
+}
+
+
+static rc_t gather_string_options( Args * args, samdump_opts * opts )
+{
+    const char * s;
+    uint32_t count;
+
+    rc_t rc = get_str_option( args, OPT_PREFIX, &s );
+    if ( rc == 0 && s != NULL )
+    {
+        opts->qname_prefix = string_dup_measure( s, NULL );
+        if ( opts->qname_prefix == NULL )
+        {
+            rc = RC( rcExe, rcNoTarg, rcValidating, rcMemory, rcExhausted );
+            (void)LOGERR( klogErr, rc, "error storing QNAME-PREFIX" );
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        rc = get_str_option( args, OPT_Q_QUANT, &s );
+        if ( rc == 0 && s != NULL )
+        {
+            opts->qual_quant = string_dup_measure( s, NULL );
+            if ( opts->qual_quant == NULL )
+            {
+                rc = RC( rcExe, rcNoTarg, rcValidating, rcMemory, rcExhausted );
+                (void)LOGERR( klogErr, rc, "error storing QUAL-QUANT" );
+            }
+            else
+            {
+                bool bres = QualityQuantizerInitMatrix( opts->qual_quant_matrix, opts->qual_quant );
+                if ( !bres )
+                {
+                    rc = RC( rcExe, rcNoTarg, rcValidating, rcParam, rcInvalid );
+                    (void)LOGERR( klogErr, rc, "error initializing quality-quantizer-matrix" );
+                }
+            }
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        rc = get_str_option( args, OPT_OUTPUTFILE, &s );
+        if ( rc == 0 && s != NULL )
+        {
+            opts->outputfile = string_dup_measure( s, NULL );
+            if ( opts->outputfile == NULL )
+            {
+                rc = RC( rcExe, rcNoTarg, rcValidating, rcMemory, rcExhausted );
+                (void)LOGERR( klogErr, rc, "error storing OUTPUTFILE" );
+            }
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        rc = ArgsOptionCount( args, OPT_HDR_COMMENT, &count );
+        if ( rc == 0 && count > 0 )
+        {
+            uint32_t i;
+            rc = VNamelistMake( &opts->hdr_comments, 10 );
+            for ( i = 0; i < count && rc == 0; ++i )
+            {
+                const char * src;
+                rc = ArgsOptionValue( args, OPT_HDR_COMMENT, i, (const void **)&src );
+                if ( rc != 0 )
+                {
+                    (void)PLOGERR( klogErr, ( klogErr, rc, "error retrieving comandline option '$(t)' #$(n)", 
+                                              "t=%s,n=%u", OPT_HDR_COMMENT, i ) );
+                }
+                else
+                {
+                    rc = VNamelistAppend( opts->hdr_comments, src );
+                    if ( rc != 0 )
+                    {
+                        (void)PLOGERR( klogErr, ( klogErr, rc, "error appending hdr-comment '$(t)'", 
+                                                  "t=%s", src ) );
+                    }
+                }
+            }
+            if ( rc != 0 )
+            {
+                VNamelistRelease( opts->hdr_comments );
+                opts->hdr_comments = NULL;
+            }
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        rc = ArgsParamCount( args, &count );
+        if ( rc == 0 && count > 0 )
+        {
+            uint32_t i;
+            rc = VNamelistMake( &opts->input_files, 10 );
+            for ( i = 0; i < count && rc == 0; ++i )
+            {
+                const char * src;
+                rc = ArgsParamValue( args, i, (const void **)&src );
+                if ( rc != 0 )
+                {
+                    (void)PLOGERR( klogErr, ( klogErr, rc, "error retrieving comandline param #$(n)", 
+                                              "n=%u", i ) );
+                }
+                else
+                {
+                    rc = VNamelistAppend( opts->input_files, src );
+                    if ( rc != 0 )
+                    {
+                        (void)PLOGERR( klogErr, ( klogErr, rc, "error appending input_file '$(t)'", 
+                                                  "t=%s", src ) );
+                    }
+                }
+            }
+            if ( rc != 0 )
+            {
+                VNamelistRelease( opts->input_files );
+                opts->input_files = NULL;
+            }
+        }
+        opts->input_file_count = count;
+    }
+
+    rc = get_str_option( args, OPT_CIGAR_TEST, &s );
+    if ( rc == 0 && s != NULL )
+    {
+        opts->cigar_test = string_dup_measure( s, NULL );
+        if ( opts->cigar_test == NULL )
+        {
+            rc = RC( rcExe, rcNoTarg, rcValidating, rcMemory, rcExhausted );
+            (void)LOGERR( klogErr, rc, "error storing CIGAR-TEST into sam-dump-options" );
+        }
+    }
+
+    rc = get_str_option( args, OPT_HDR_FILE, &s );
+    if ( rc == 0 && s != NULL )
+    {
+        opts->header_file = string_dup_measure( s, NULL );
+        if ( opts->header_file == NULL )
+        {
+            rc = RC( rcExe, rcNoTarg, rcValidating, rcMemory, rcExhausted );
+            (void)LOGERR( klogErr, rc, "error storing HDR-FILE into sam-dump-options" );
+        }
+        else
+            opts->header_mode = hm_file;
+    }
+
+    opts->perf_log = NULL;
+
+#if _DEBUGGING
+    rc = get_str_option( args, OPT_TIMING, &s );
+    if ( rc == 0 && s != NULL )
+    {
+        opts->timing_file = string_dup_measure( s, NULL );
+        if ( opts->timing_file == NULL )
+        {
+            rc = RC( rcExe, rcNoTarg, rcValidating, rcMemory, rcExhausted );
+            (void)LOGERR( klogErr, rc, "error storing timing-FILE into sam-dump-options" );
+        }
+        else
+            opts->perf_log = make_perf_log( opts->timing_file, "sam-dump" );
+    }
+#endif
+
+    rc = get_str_option( args, OPT_RNA_SPLICE_LOG, &s );
+    if ( rc == 0 && s != NULL )
+    {
+        opts->rna_splice_log_file = string_dup_measure( s, NULL );
+        if ( opts->rna_splice_log_file == NULL )
+        {
+            rc = RC( rcExe, rcNoTarg, rcValidating, rcMemory, rcExhausted );
+            (void)LOGERR( klogErr, rc, "error storing rna-splice-log-FILE into sam-dump-options" );
+        }
+        else
+            opts->rna_splice_log = make_rna_splice_log( opts->rna_splice_log_file, "sam-dump" );
+    }
+
+    return rc;
+}
+
+
+/*********************************************************************************************
+
+                                            fa ... fully aligned reads
+                                            ha ... half aligned reads
+                                            hu ... half unaligned reads
+                                            fu ... fully unaligned reads
+
+    regions > 0     |   dump-unaligned  |
+    ----------------------------------------------------------------------
+        no          |       no          |   fa  ha  hu
+        no          |       yes         |   fa  ha  hu  fu
+        yes         |       no          |   fa  ha
+        yes         |       yes         |   fa  ha  hu
+
+*********************************************************************************************/
+static void gather_unaligned_options( samdump_opts * opts )
+{
+    if ( opts->region_count == 0 )
+    {
+        if ( opts->dump_unaligned_only )
+        {
+            opts->print_half_unaligned_reads  = false;
+            opts->print_fully_unaligned_reads = true;
+        }
+        else
+        {
+            opts->print_half_unaligned_reads  = true;
+            opts->print_fully_unaligned_reads = opts->dump_unaligned_reads;
+        }
+    }
+    else
+    {
+        opts->print_fully_unaligned_reads = false;
+        opts->print_half_unaligned_reads  = opts->dump_unaligned_reads;
+    }
+}
+
+/* =========================================================================================== */
+
+
+static rc_t CC report_reference_cb( const char * name, Vector * ranges, void *data )
+{
+    rc_t rc = KOutMsg( "region: <%s>\n",  name );
+    if ( rc == 0 )
+    {
+        uint32_t count = VectorLength( ranges );
+        if ( count > 0 )
+        {
+            uint32_t i;
+            for ( i = VectorStart( ranges ); i < count && rc == 0; ++i )
+            {
+                range *r = VectorGet( ranges, i );
+                if ( r->end == 0 )
+                {
+                    if ( r->start == 0 )
+                        rc = KOutMsg( "\t[ start ... end ]\n" );
+                    else
+                        rc = KOutMsg( "\t[ %u ... ]\n", r->start );
+                }
+                else
+                    rc = KOutMsg( "\t[ %u ... %u ]\n", r->start, r->end );
+            }
+        }
+    }
+    return rc;
+}
+
+
+void report_options( const samdump_opts * opts )
+{
+    rc_t rc;
+    uint32_t len;
+
+    KOutMsg( "dump unaligned reads  : %s\n",  opts->dump_unaligned_reads ? "YES" : "NO" );
+    KOutMsg( "dump unaligned only   : %s\n",  opts->dump_unaligned_only ? "YES" : "NO" );
+    KOutMsg( "dump prim. alignments : %s\n",  opts->dump_primary_alignments ? "YES" : "NO" );
+    KOutMsg( "dump sec. alignments  : %s\n",  opts->dump_secondary_alignments ? "YES" : "NO" );
+    KOutMsg( "dump cga-tools-mode   : %s\n",  opts->dump_cga_tools_mode ? "YES" : "NO" );
+    KOutMsg( "dump cg-evidence      : %s\n",  opts->dump_cg_evidence ? "YES" : "NO" );
+    KOutMsg( "dump cg-ev-dnb        : %s\n",  opts->dump_cg_ev_dnb ? "YES" : "NO" );
+    KOutMsg( "dump cg-sam           : %s\n",  opts->dump_cg_sam ? "YES" : "NO" );
+    KOutMsg( "merge cg-cigar        : %s\n",  opts->merge_cg_cigar ? "YES" : "NO" );
+
+    KOutMsg( "use long cigar        : %s\n",  opts->use_long_cigar ? "YES" : "NO" );
+    KOutMsg( "print seqid           : %s\n",  opts->use_seqid_as_refname ? "YES" : "NO" );
+    KOutMsg( "print READ with '='   : %s\n",  opts->print_matches_as_equal_sign ? "YES" : "NO" );
+    KOutMsg( "reverse unaligned rd  : %s\n",  opts->reverse_unaligned_reads ? "YES" : "NO" );
+    KOutMsg( "add spotgrp to qname  : %s\n",  opts->print_spot_group_in_name ? "YES" : "NO" );
+    KOutMsg( "print id in col. XI   : %s\n",  opts->print_alignment_id_in_column_xi ? "YES" : "NO" );
+    KOutMsg( "report matecache      : %s\n",  opts->report_cache ? "YES" : "NO" );
+    KOutMsg( "print cg-names        : %s\n",  opts->print_cg_names ? "YES" : "NO" );
+
+    switch( opts->header_mode )
+    {
+        case hm_none   : KOutMsg( "header-mode           : dont print\n" ); break;
+        case hm_recalc : KOutMsg( "header-mode           : recalculate\n" ); break;
+        case hm_dump   : KOutMsg( "header-mode           : print meta-data\n" ); break;
+        case hm_file   : KOutMsg( "header-mode           : take from '%s'\n", opts->header_file ); break;
+        default        : KOutMsg( "header-mode           : unknown\n" ); break;
+    }
+
+    switch( opts->cigar_treatment )
+    {
+        case ct_unchanged : KOutMsg( "cigar-treatment       : unchanged\n" ); break;
+        case ct_cg_style  : KOutMsg( "cigar-treatment       : transform cg to 'cg-style\n" ); break;
+        case ct_cg_merge  : KOutMsg( "cigar-treatment       : transform cg to valid SAM\n" ); break;
+        default           : KOutMsg( "cigar-treatment       : unknow'\n" ); break;
+    }
+
+    switch( opts->output_compression )
+    {
+        case oc_none  : KOutMsg( "output-compression    : none\n" ); break;
+        case oc_gzip  : KOutMsg( "output-compression    : gzip\n" ); break;
+        case oc_bzip2 : KOutMsg( "output-compression    : bzip2\n" ); break;
+        default       : KOutMsg( "output-compression    : unknown\n" ); break;
+    }
+
+    switch( opts->output_format )
+    {
+        case of_sam   : KOutMsg( "output-format         : SAM\n" ); break;
+        case of_fasta : KOutMsg( "output-format         : FASTA\n" ); break;
+        case of_fastq : KOutMsg( "output-format         : FASTQ\n" ); break;
+        default       : KOutMsg( "output-format         : unknown\n" ); break;
+    }
+
+    switch( opts->dump_mode )
+    {
+        case dm_one_ref_at_a_time : KOutMsg( "dump-mode             : one ref at a time\n" ); break;
+        case dm_prepare_all_refs  : KOutMsg( "dump-mode             : prepare all refs\n" ); break;
+        default                   : KOutMsg( "dump-mode             : unknown\n" ); break;
+    }
+
+    KOutMsg( "number of regions     : %u\n",  opts->region_count );
+    if ( opts->region_count > 0 )
+        foreach_reference( (BSTree *)&opts->regions, report_reference_cb, NULL );
+
+    if ( opts->qname_prefix == NULL )
+        KOutMsg( "qname-prefix          : NONE\n" );
+    else
+        KOutMsg( "qname-prefix          : '%s'\n",  opts->qname_prefix );
+
+    if ( opts->qual_quant == NULL )
+        KOutMsg( "quality-quantization  : NONE\n" );
+    else
+        KOutMsg( "quality-quantization  : '%s'\n",  opts->qual_quant );
+
+    if ( opts->hdr_comments != NULL )
+    {
+        rc = VNameListCount( opts->hdr_comments, &len );
+        if ( rc == 0 && len > 0 )
+        {
+            uint32_t i;
+
+            KOutMsg( "header-comments-count : %u\n",  len );
+            for ( i = 0; i < len; ++i )
+            {
+                const char * s;
+                rc = VNameListGet( opts->hdr_comments, i, &s );
+                if ( rc == 0 && s != NULL )
+                    KOutMsg( "header-comment[ %u ]  : '%s'\n",  i, s );
+            }
+        }
+    }
+
+    if ( opts->input_files != NULL )
+    {
+        rc = VNameListCount( opts->input_files, &len );
+        if ( rc == 0 && len > 0 )
+        {
+            uint32_t i;
+
+            KOutMsg( "input-file-count      : %u\n",  len );
+            for ( i = 0; i < len; ++i )
+            {
+                const char * s;
+                rc = VNameListGet( opts->input_files, i, &s );
+                if ( rc == 0 && s != NULL )
+                    KOutMsg( "input-file[ %u ]      : '%s'\n",  i, s );
+            }
+        }
+    }
+
+    len = VectorLength( &opts->mp_dist );
+    if ( len > 0 )
+    {
+        uint32_t i;
+
+        KOutMsg( "matepair-dist-filters : %u\n",  len );
+        for ( i = 0; i < len; ++i )
+        {
+            range *r = VectorGet( &opts->mp_dist, i );
+            if ( r != NULL )
+                KOutMsg( "matepair-dist[ %u ]   : '%u ... %u'\n",  i, r->start, r->end );
+        }
+    }
+
+    KOutMsg( "mate-gap-cache-limit  : %u\n",  opts->mape_gap_cache_limit );
+    KOutMsg( "outputfile            : %s\n",  opts->outputfile );
+    KOutMsg( "outputbuffer-size     : %u\n",  opts->output_buffer_size );
+    KOutMsg( "cursor-cache-size     : %u\n",  opts->cursor_cache_size );
+
+    KOutMsg( "use mate-cache        : %s\n",  opts->use_mate_cache ? "YES" : "NO" );
+    KOutMsg( "force legacy code     : %s\n",  opts->force_legacy ? "YES" : "NO" );
+    KOutMsg( "use min-mapq          : %s\n",  opts->use_min_mapq ? "YES" : "NO" );
+    KOutMsg( "min-mapq              : %i\n",  opts->min_mapq );
+    KOutMsg( "rna-splicing          : %s\n",  opts->rna_splicing ? "YES" : "NO" );
+    KOutMsg( "rna-splice-level      : %u\n",  opts->rna_splice_level );
+    KOutMsg( "rna-splice-log        : %s\n",  opts->rna_splice_log_file );
+
+    KOutMsg( "multithreading        : %s\n",  opts->no_mt ? "NO" : "YES" );  
+    KOutMsg( "with-MD-flag          : %s\n",  opts->with_md_flag ? "NO" : "YES" );
+	
+#if _DEBUGGING
+    if ( opts->timing_file != NULL )
+        KOutMsg( "timing-file           : '%s'\n",  opts->timing_file );
+    else
+        KOutMsg( "timing-file           : NONE\n" );
+#endif
+
+}
+
+
+/* =========================================================================================== */
+
+
+void release_options( samdump_opts * opts )
+{
+    free_ref_regions( &opts->regions );
+    if ( opts->qname_prefix != NULL )
+        free( (void*)opts->qname_prefix );
+    if ( opts->qual_quant != NULL )
+        free( (void*)opts->qual_quant );
+    if( opts->outputfile != NULL )
+        free( (void*)opts->outputfile );
+    if( opts->header_file != NULL )
+        free( (void*)opts->header_file );
+    if( opts->timing_file != NULL )
+        free( (void*)opts->timing_file );
+    if( opts->rna_splice_log_file != NULL )
+        free( (void*)opts->rna_splice_log_file );
+
+#if _DEBUGGING
+    if ( opts->perf_log != NULL )
+        free_perf_log( opts->perf_log );
+#endif
+
+    if ( opts->rna_splice_log != NULL )
+        free_rna_splice_log( opts->rna_splice_log );
+
+    VNamelistRelease( opts->hdr_comments );
+    VNamelistRelease( opts->input_files );
+    VectorWhack ( &opts->mp_dist, release_range_wrapper, NULL );
+}
+
+/* =========================================================================================== */
+
+
+rc_t gather_options( Args * args, samdump_opts * opts )
+{
+    rc_t rc = gather_region_options( args, opts );
+    if ( rc == 0 )
+        rc = gather_flag_options( args, opts );
+    if ( rc == 0 )
+        rc = gather_string_options( args, opts );
+    if ( rc == 0 )
+        rc = gather_int_options( args, opts );
+    if ( rc == 0 )
+        rc = gather_matepair_distances( args, opts );
+    if ( rc == 0 )
+        gather_unaligned_options( opts );
+    return rc;
+}
+
+
+bool is_this_alignment_requested( const samdump_opts * opts, const char *refname, uint32_t refname_len,
+                                  uint64_t start, uint64_t end )
+{
+    bool res = false;
+    if ( opts != NULL )
+    {
+        reference_region *rr = find_reference_region_len( ( BSTree * )&opts->regions, refname, refname_len );
+        if ( rr != NULL )
+        {
+            Vector *v = &(rr->ranges);
+            uint32_t i, count = VectorLength( v );
+            for ( i = 0; i < count && !res; ++i )
+            {
+                range * r = VectorGet ( v, i );
+                if ( r != NULL )
+                {
+                    res = ( ( end >= r->start )&&( start <= r->end ) );
+                }
+            }
+        }
+    }
+    return res;
+}
+
+
+rc_t dump_name( const samdump_opts * opts, int64_t seq_spot_id,
+                const char * spot_group, uint32_t spot_group_len )
+{
+    rc_t rc;
+
+    if ( opts->print_cg_names )
+    {
+        if ( spot_group != NULL && spot_group_len != 0 )
+            rc = KOutMsg( "%.*s-1:%lu", spot_group_len, spot_group, seq_spot_id );
+        else
+            rc = KOutMsg( "%lu", seq_spot_id );
+    }
+    else
+    {
+        if ( opts->qname_prefix != NULL )
+        {
+            /* we do have to print a prefix */
+            if ( opts->print_spot_group_in_name && spot_group != NULL && spot_group_len > 0 )
+                rc = KOutMsg( "%s.%lu.%.*s", opts->qname_prefix, seq_spot_id, spot_group_len, spot_group );
+            else
+            /* we do NOT have to append the spot-group */
+                rc = KOutMsg( "%s.%lu", opts->qname_prefix, seq_spot_id );
+        }
+        else
+        {
+            /* we do NOT have to print a prefix */
+            if ( opts->print_spot_group_in_name && spot_group != NULL && spot_group_len > 0 )
+                rc = KOutMsg( "%lu.%.*s", seq_spot_id, spot_group_len, spot_group );
+            else
+            /* we do NOT have to append the spot-group */
+                rc = KOutMsg( "%lu", seq_spot_id );
+        }
+    }
+    return rc;
+}
+
+
+rc_t dump_name_legacy( const samdump_opts * opts, const char * name, size_t name_len,
+                       const char * spot_group, uint32_t spot_group_len )
+{
+    rc_t rc;
+
+    if ( opts->qname_prefix != NULL )
+    {
+        /* we do have to print a prefix */
+        if ( opts->print_spot_group_in_name && spot_group != NULL && spot_group_len > 0 )
+            rc = KOutMsg( "%s.%.*s%.*s", opts->qname_prefix, name_len, name, spot_group_len, spot_group );
+        else
+        /* we do NOT have to append the spot-group */
+            rc = KOutMsg( "%s.%.*s", opts->qname_prefix, name_len, name );
+    }
+    else
+    {
+        /* we do NOT have to print a prefix */
+        if ( opts->print_spot_group_in_name && spot_group != NULL && spot_group_len > 0 )
+            rc = KOutMsg( "%.*s.%.*s", name_len, name, spot_group_len, spot_group );
+        else
+        /* we do NOT have to append the spot-group */
+            rc = KOutMsg( "%.*s", name_len, name );
+    }
+    return rc;
+}
+
+#define USE_KWRT_HANDLER 1
+
+rc_t dump_quality( const samdump_opts * opts, char const *quality, uint32_t qual_len, bool reverse )
+{
+    uint32_t i;
+    rc_t rc = 0;
+    bool quantize = ( opts->qual_quant != NULL );
+
+    size_t size = 0;
+    char buffer [ 4096 ];
+#if USE_KWRT_HANDLER
+    size_t num_writ;
+    KWrtHandler * kout_msg_handler = KOutHandlerGet ();
+    assert ( kout_msg_handler != NULL );
+#endif
+    if ( reverse )
+    {
+        if ( quantize )
+        {
+            for ( i = qual_len; i > 0; )
+            {
+                uint32_t qual = quality[ -- i ];
+                buffer [ size ] = ( opts->qual_quant_matrix[ qual ] + 33 );
+                if ( ++ size == sizeof buffer )
+                {
+#if USE_KWRT_HANDLER
+                    rc = ( * kout_msg_handler -> writer ) ( kout_msg_handler -> data, buffer, size, & num_writ );
+#else
+                    rc = KOutMsg( "%.*s", ( uint32_t ) size, buffer );
+#endif
+                    if ( rc != 0 )
+                        break;
+                    size = 0;
+                }
+            }
+        }
+        else
+        {
+            for ( i = qual_len; i > 0; )
+            {
+                buffer [ size ] = quality[ -- i ] + 33;
+                if ( ++ size == sizeof buffer )
+                {
+#if USE_KWRT_HANDLER
+                    rc = ( * kout_msg_handler -> writer ) ( kout_msg_handler -> data, buffer, size, & num_writ );
+#else
+                    rc = KOutMsg( "%.*s", ( uint32_t ) size, buffer );
+#endif
+                    if ( rc != 0 )
+                        break;
+                    size = 0;
+                }
+            }
+        }
+    }
+    else
+    {
+        if ( quantize )
+        {
+            for ( i = 0; i < qual_len; ++i )
+            {
+                uint32_t qual = quality[ i ];
+                buffer [ size ] = opts->qual_quant_matrix[ qual ] + 33;
+                if ( ++ size == sizeof buffer )
+                {
+#if USE_KWRT_HANDLER
+                    rc = ( * kout_msg_handler -> writer ) ( kout_msg_handler -> data, buffer, size, & num_writ );
+#else
+                    rc = KOutMsg( "%.*s", ( uint32_t ) size, buffer );
+#endif
+                    if ( rc != 0 )
+                        break;
+                    size = 0;
+                }
+            }
+
+        }
+        else
+        {
+            for ( i = 0; i < qual_len && rc == 0; ++i )
+            {
+                buffer [ size ] = quality[ i ] + 33;
+                if ( ++ size == sizeof buffer )
+                {
+#if USE_KWRT_HANDLER
+                    rc = ( * kout_msg_handler -> writer ) ( kout_msg_handler -> data, buffer, size, & num_writ );
+#else
+                    rc = KOutMsg( "%.*s", ( uint32_t ) size, buffer );
+#endif
+                    if ( rc != 0 )
+                        break;
+                    size = 0;
+                }
+            }
+        }
+    }
+
+    if ( rc == 0 && size != 0 )
+    {
+#if USE_KWRT_HANDLER
+        rc = ( * kout_msg_handler -> writer ) ( kout_msg_handler -> data, buffer, size, & num_writ );
+#else
+        rc = KOutMsg( "%.*s", ( uint32_t ) size, buffer );
+#endif
+    }
+    return rc;
+}
+
+
+rc_t dump_quality_33( const samdump_opts * opts, char const *quality, uint32_t qual_len, bool reverse )
+{
+    uint32_t i;
+    rc_t rc = 0;
+    bool quantize = ( opts->qual_quant != NULL );
+
+    size_t size = 0;
+    char buffer [ 4096 ];
+
+    if ( reverse )
+    {
+        if ( quantize )
+        {
+            for ( i = 0; i < qual_len && rc == 0; ++i )
+            {
+                uint32_t qual = quality[ qual_len - i - 1 ] - 33;
+                buffer [ size ] = ( opts->qual_quant_matrix[ qual ] + 33 );
+                if ( ++ size == sizeof buffer )
+                {
+                    rc = KOutMsg( "%.*s", ( uint32_t ) size, buffer );
+                    if ( rc != 0 )
+                        break;
+                    size = 0;
+                }
+            }
+        }
+        else
+        {
+            for ( i = 0; i < qual_len && rc == 0; ++i )
+            {
+                buffer [ size ] = quality[ qual_len - i - 1 ];
+                if ( ++ size == sizeof buffer )
+                {
+                    rc = KOutMsg( "%.*s", ( uint32_t ) size, buffer );
+                    if ( rc != 0 )
+                        break;
+                    size = 0;
+                }
+            }
+        }
+    }
+    else
+    {
+        if ( quantize )
+        {
+            for ( i = 0; i < qual_len && rc == 0; ++i )
+            {
+                uint32_t qual = quality[ i ] - 33;
+                buffer [ size ] = opts->qual_quant_matrix[ qual ] + 33;
+                if ( ++ size == sizeof buffer )
+                {
+                    rc = KOutMsg( "%.*s", ( uint32_t ) size, buffer );
+                    if ( rc != 0 )
+                        break;
+                    size = 0;
+                }
+            }
+
+        }
+        else
+        {
+            rc = KOutMsg( "%.*s", qual_len, quality );
+        }
+    }
+
+    if ( rc == 0 && size != 0 )
+        rc = KOutMsg( "%.*s", ( uint32_t ) size, buffer );
+
+    return rc;
+}
diff --git a/tools/sra-pileup/sam-dump-opts.h b/tools/sra-pileup/sam-dump-opts.h
new file mode 100644
index 0000000..71c0ba8
--- /dev/null
+++ b/tools/sra-pileup/sam-dump-opts.h
@@ -0,0 +1,306 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_sam_dump_opts_
+#define _h_sam_dump_opts_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include <klib/container.h>
+#include <klib/vector.h>
+#include <klib/out.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <klib/namelist.h>
+
+#include <kapp/args.h>
+#include "perf_log.h"
+#include "rna_splice_log.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <strtol.h>
+
+
+#define OPT_UNALIGNED   "unaligned"
+#define OPT_PRIM_ONLY   "primary"
+#define OPT_CIGAR_LONG  "cigar-long"
+#define OPT_CG_SAM      "CG-SAM"
+#define OPT_CG_EVIDENCE "CG-evidence"
+#define OPT_CG_EV_DNB   "CG-ev-dnb"
+#define OPT_CG_MAPP     "CG-mappings"
+#define OPT_REGION      "aligned-region"
+#define OPT_RECAL_HDR   "header"
+#define OPT_HDR_FILE    "header-file"
+#define OPT_NO_HDR      "no-header"
+#define OPT_USE_SEQID   "seqid"
+#define OPT_HIDE_IDENT  "hide-identical"
+#define OPT_CIGAR_CG    "cigar-CG"
+#define OPT_CIGAR_CG_M  "cigar-CG-merge"
+#define OPT_PREFIX      "prefix"
+#define OPT_REVERSE     "reverse"
+#define OPT_SPOTGRP     "spot-group"
+#define OPT_MATE_GAP    "mate-cache-row-gap"
+#define OPT_XI_DEBUG    "XI"
+#define OPT_Q_QUANT     "qual-quant"
+#define OPT_GZIP        "gzip"
+#define OPT_BZIP2       "bzip2"
+#define OPT_FASTQ       "fastq"
+#define OPT_FASTA       "fasta"
+#define OPT_HDR_COMMENT "header-comment"
+#define OPT_MATE_DIST   "matepair-distance"
+#define OPT_OUTPUTFILE  "output-file"
+#define OPT_OUTBUFSIZE  "output-buffer-size"
+#define OPT_REPORT      "report"
+#define OPT_CACHEREPORT "cachereport"
+#define OPT_UNALIGNED_ONLY "unaligned-spots-only"
+#define OPT_CG_NAMES    "CG-names"
+#define OPT_CIGAR_TEST  "cigar-test"
+#define OPT_CURSOR_CACHE "cursor-cache"
+#define OPT_DUMP_MODE   "dump-mode"
+#define OPT_MIN_MAPQ    "min-mapq"
+#define OPT_NO_MATE_CACHE "no-mate-cache"
+#define OPT_LEGACY      "legacy"
+#define OPT_NEW         "new"
+#define OPT_RNA_SPLICE  "rna-splicing"
+#define OPT_RNA_SPLICEL "rna-splice-level"
+#define OPT_RNA_SPLICE_LOG "rna-splice-log"
+#define OPT_NO_MT       "disable-multithreading"
+#define OPT_TIMING      "timing"
+#define OPT_MD_FLAG     "with-md-flag"
+
+typedef struct range
+{
+    uint64_t start;
+    uint64_t end;
+} range;
+
+
+typedef struct reference_region
+{
+    BSTNode node;
+    const char * name;      /* the name of the reference */
+    Vector ranges;          /* what regions on this reference */
+} reference_region;
+
+
+enum header_mode
+{
+    hm_none = 0,    /* do not dump the headers at all */
+    hm_recalc,      /* recalculate the headers */
+    hm_dump,        /* dump the header found in metadata */
+    hm_file         /* take the complete header part from a file */
+};
+
+enum output_format
+{
+    of_sam = 0,     /* use sam-tools format */
+    of_fasta,       /* use fasta-format */
+    of_fastq        /* use fastq-format */
+};
+
+enum output_compression
+{
+    oc_none = 0,    /* do not compress output */
+    oc_gzip,        /* compress output with gzip */
+    oc_bzip2        /* compress output with bzip2 */
+};
+
+enum cigar_treatment
+{
+    ct_unchanged = 0,   /* use the cigar-string as it is stored */
+    ct_cg_style,        /* transform cigar into cg-style ( has B/N ) */
+    ct_cg_merge         /* transform cg-data(length of read/patterns in cigar) into valid SAM (cigar/READ/QUALITY) */
+};
+
+
+enum dump_mode
+{
+    /* in case of: aligned reads requested + no regions given */
+    dm_one_ref_at_a_time = 0,   /* create a set-iter each for every reference sequentially, put only one reference into it */
+    dm_prepare_all_refs         /* create only ONE set-iter, put ALL references into it */
+};
+
+
+typedef struct samdump_opts
+{
+    /* tree with regions, each node has a sorted vector of ranges, can be empty ... */
+    BSTree regions;     /* contains reference_region structs */
+
+    /* vector with header-comments, can be empty... */
+    VNamelist * hdr_comments;
+
+    /* vector input files/accessions/url's */
+    VNamelist * input_files;
+
+    /* vector with metapair-distances... */
+    Vector mp_dist;
+
+    /* prepend qname with this prefix */
+    const char * qname_prefix;
+
+    /* the quality quantization string */
+    const char * qual_quant;
+
+    /* optional outputfile */
+    const char * outputfile;
+
+    /* optional header-file */
+    const char * header_file;
+
+    /* cigar-test >>> not advertized! */
+    const char * cigar_test;
+
+    /* timing-file >>> not advertized! */
+    const char * timing_file;
+
+    /* log file for rna-splicing-events */
+    const char * rna_splice_log_file;
+
+    /* timing-performane-log, created if timing_file given */
+    struct perf_log * perf_log;
+
+    /* logging of rna-splicing on reqest */
+    struct rna_splice_log * rna_splice_log;
+
+    uint32_t region_count;
+    uint32_t input_file_count;
+    uint32_t rna_splice_level;  /* can be 0 || 1 || 2 */
+
+    int32_t min_mapq;
+
+    /* how much buffering on the output-buffer, of OFF if zero */
+    uint32_t output_buffer_size;
+
+    /* mate's farther apart than this are not cached */
+    uint32_t mape_gap_cache_limit;
+
+    size_t cursor_cache_size;
+
+    /* how the sam-headers are treated */
+    enum header_mode header_mode;
+
+    /* how the cigar-string is treated */
+    enum cigar_treatment cigar_treatment;
+
+    /* in which format should the output be created */
+    enum output_format output_format;
+
+    /* should the output be compressed / in which format */
+    enum output_compression output_compression;
+
+    /* how to process in case of: aligned reads requested + no regions given */
+    enum dump_mode dump_mode;
+
+    /* use a mate-cache to dump aligned and half-aligned reads */
+    bool use_mate_cache;
+    bool force_legacy;
+    bool force_new;
+
+    /* which tables have to be processed/dumped */
+    bool dump_primary_alignments;
+    bool dump_secondary_alignments;
+    bool dump_cg_evidence;
+    bool dump_cg_sam;
+    bool dump_cg_ev_dnb;
+    bool merge_cg_cigar;
+
+    bool dump_unaligned_reads;
+    bool dump_unaligned_only;
+    bool dump_cga_tools_mode;
+
+    /* what alignment/unaligned reads should be dumped */
+    bool print_half_unaligned_reads;
+    bool print_fully_unaligned_reads;
+
+    /* flag that shows if we need to filter by matepair-distance */
+    bool use_matepair_filter;
+    bool use_min_mapq;
+
+    /* options changing the output-format */
+    bool use_seqid_as_refname;
+    bool use_long_cigar;
+    bool print_matches_as_equal_sign;
+    bool print_spot_group_in_name;
+    bool reverse_unaligned_reads;
+    bool print_alignment_id_in_column_xi;
+    bool report_options;
+    bool report_cache;
+    bool print_cg_names;
+    bool rna_splicing;
+
+    /* option to disable multi-threading */
+    bool no_mt;
+    
+	bool with_md_flag;
+	
+    uint8_t qual_quant_matrix[ 256 ];
+} samdump_opts;
+
+
+typedef struct foreach_reference_func
+{
+    rc_t ( CC * on_reference ) ( const char * name, Vector *ranges, void *data );
+    const char * name;
+    void * data;
+    rc_t rc;
+} foreach_reference_func;
+
+
+rc_t foreach_reference( BSTree * regions,
+    rc_t ( CC * on_reference ) ( const char * name, Vector *ranges, void *data ), 
+    void *data );
+
+int cmp_pchar( const char * a, const char * b );
+
+rc_t gather_options( Args * args, samdump_opts * opts );
+void report_options( const samdump_opts * opts );
+void release_options( samdump_opts * opts );
+
+bool filter_by_matepair_dist( const samdump_opts * opts, int32_t tlen );
+
+bool is_this_alignment_requested( const samdump_opts * opts, const char *refname, uint32_t refname_len,
+                                  uint64_t start, uint64_t len );
+
+rc_t dump_name( const samdump_opts * opts, int64_t seq_spot_id,
+                const char * spot_group, uint32_t spot_group_len );
+
+rc_t dump_name_legacy( const samdump_opts * opts, const char * name, size_t name_len,
+                       const char * spot_group, uint32_t spot_group_len );
+
+rc_t dump_quality( const samdump_opts * opts, char const *quality, uint32_t qual_len, bool reverse );
+
+rc_t dump_quality_33( const samdump_opts * opts, char const *quality, uint32_t qual_len, bool reverse );
+
+#endif
diff --git a/tools/sra-pileup/sam-dump.c b/tools/sra-pileup/sam-dump.c
new file mode 100644
index 0000000..d0f253a
--- /dev/null
+++ b/tools/sra-pileup/sam-dump.c
@@ -0,0 +1,4905 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/report.h>
+#include <klib/container.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/text.h>
+#include <klib/status.h>
+#include <klib/rc.h>
+#include <klib/vector.h>
+#include <klib/printf.h>
+#include <klib/data-buffer.h>
+#include <vfs/manager.h>
+#include <vfs/path.h>
+#include <vfs/path-priv.h>
+#include <kfs/file.h>
+#include <kfs/buffile.h>
+#include <kfs/gzip.h>
+#include <kfs/bzip.h>
+#include <kdb/meta.h>
+#include <kdb/namelist.h>
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <insdc/insdc.h>
+#include <insdc/sra.h>
+#include <vdb/report.h>
+#include <vdb/manager.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <vdb/vdb-priv.h>
+#include <vdb/schema.h>
+#include <vdb/dependencies.h>
+#include <sra/sraschema.h>
+#include <sra/srapath.h>
+#include <align/dna-reverse-cmpl.h>
+#include <align/iterator.h>
+#include <align/reference.h>
+#include <align/quality-quantizer.h>
+
+#include <kfs/directory.h>
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <limits.h>
+#include <string.h>
+#include <strtol.h>
+#include <ctype.h>
+#include <assert.h>
+
+#include "debug.h"
+
+#if _ARCH_BITS == 64
+#define USE_MATE_CACHE 1
+#define CURSOR_CACHE (4 * 1024 * 1024 * 1024UL)
+#else
+#define USE_MATE_CACHE 0
+#define CURSOR_CACHE (256 * 1024 * 1024)
+#endif
+
+rc_t cg_canonical_print_cigar( const char * cigar, size_t cigar_len);
+
+
+
+typedef struct TAlignedRegion_struct
+{
+    char name[1024];
+    struct {
+        INSDC_coord_zero from;
+        INSDC_coord_zero to;
+    } r[10240];
+    int rq;
+    INSDC_coord_zero max_to;
+    INSDC_coord_zero min_from;
+    int printed;
+} TAlignedRegion;
+
+
+typedef struct TMatepairDistance_struct
+{
+    uint32_t from;
+    uint32_t to;
+} TMatepairDistance;
+
+
+struct params_s
+{
+    /* which outputs are on */
+    bool primaries;
+    bool secondaries;
+    bool unaligned;
+    bool cg_evidence;
+    bool cg_ev_dnb;
+    bool cg_sam;
+    
+    bool use_seqid;
+    bool long_cigar;
+    bool reheader;
+    bool noheader;
+    bool hide_identical;
+    bool fasta;
+    bool fastq;
+    bool spot_group_in_name;
+    bool cg_friendly_names;
+    bool reverse_unaligned;
+    bool unaligned_spots;
+    
+    bool output_gzip;
+    bool output_bz2;
+    
+    bool xi;
+    int cg_style; /* 0: raw; 1: with B's; 2: without B's, fixed up SEQ/QUAL; */
+    char const *name_prefix;
+    /* region filter data */
+    TAlignedRegion* region;
+    uint32_t region_qty;
+    /* distance filter data */
+    bool mp_dist_unknown;
+    TMatepairDistance* mp_dist;
+    uint32_t mp_dist_qty;
+    uint32_t test_rows;
+
+    /* mate info cache */
+    int64_t mate_row_gap_cachable;
+    
+    char const **comments;
+    
+    bool quantizeQual;
+    uint8_t qualQuant[256];
+    uint8_t qualQuantSingle; /*** the quality is quantized - single value, no need to retrieve **/
+};
+
+
+struct params_s const *param;
+ReferenceList const *gRefList;
+
+
+typedef union UData_union
+{
+    void const *v;
+    uint32_t const *u32;
+    int32_t const *i32;
+    int64_t const *i64;
+    uint64_t const *u64;
+    uint8_t const *u8;
+    char const *str;
+    bool const *tf;
+    INSDC_coord_one* coord1;
+    INSDC_coord_zero* coord0;
+    INSDC_coord_len* coord_len;
+    INSDC_coord_val* coord_val;
+    INSDC_SRA_xread_type* read_type;
+    INSDC_SRA_read_filter* read_filter;
+} UData;
+
+
+typedef struct SCol_struct
+{
+    char const *name;
+    uint32_t idx;
+    UData base;
+    uint32_t len;
+    bool optional;
+} SCol;
+
+
+typedef struct STable_struct
+{
+    char const *name;
+    VTable const *vtbl;
+} STable;
+
+
+typedef struct SCursCache_struct
+{
+    KVector* cache;
+    KVector* cache_unaligned_mate; /* keeps unaligned-mate for a half-aligned spots */
+    uint32_t sam_flags;
+    INSDC_coord_zero pnext;
+    int32_t tlen;
+    ReferenceObj const *ref;
+    /* cache stats */
+    uint64_t projected;
+    uint64_t added;
+    uint64_t hit;
+    uint64_t bad;
+} SCursCache;
+
+
+typedef struct SCurs_struct
+{
+    STable const *tbl;
+    VCursor const *vcurs;
+    SCursCache* cache;
+    SCursCache cache_local;
+    uint64_t col_reads_qty;
+} SCurs;
+
+enum eDSTableType
+{
+    edstt_NotSpecified,
+    edstt_Reference,
+    edstt_Sequence,
+    edstt_PrimaryAlignment,
+    edstt_SecondaryAlignment,
+    edstt_EvidenceAlignment,
+    edstt_EvidenceInterval
+};
+
+
+typedef struct DataSource_s {
+    STable tbl;
+    SCurs curs;
+    SCol *cols;
+    enum eDSTableType type;
+} DataSource;
+
+
+#define DATASOURCE_INIT(O, NAME) do { memset(&O, 0, sizeof(O)); O.tbl.name = NAME; O.curs.tbl = &O.tbl; } while(0)
+
+
+typedef struct SAM_dump_ctx_s
+{
+    VDatabase const *db;
+    char const *fullPath;
+    char const *accession;
+    char const *readGroup;
+    
+    DataSource ref;
+    DataSource pri;
+    DataSource sec;
+    DataSource evi;
+    DataSource eva;
+    DataSource seq;
+} SAM_dump_ctx_t;
+
+
+enum ealg_col
+{
+    alg_SEQ_SPOT_ID = 0,
+    alg_SEQ_NAME,
+    alg_MAPQ,
+    alg_CIGAR,
+    alg_READ,
+    alg_READ_START,
+    alg_READ_LEN,
+    alg_CIGAR_LEN,
+    alg_SAM_QUALITY,
+    alg_SPOT_GROUP,
+    alg_SEQ_SPOT_GROUP,
+    alg_SEQ_READ_ID,
+    alg_REVERSED,
+    alg_ALIGNMENT_COUNT,
+    alg_EDIT_DISTANCE,
+    alg_READ_FILTER,
+    alg_MATE_ALIGN_ID,
+    alg_MATE_REF_NAME,
+    alg_SAM_FLAGS,
+    alg_REF_START,
+    alg_MATE_REF_POS,
+    alg_ALIGN_GROUP,
+    alg_EVIDENCE_ALIGNMENT_IDS,
+    alg_REF_PLOIDY,
+    alg_REF_ID,
+    alg_MATE_REF_ID,
+    alg_HAS_MISMATCH,
+    alg_REGION_FILTER,
+    alg_REF_NAME = alg_REGION_FILTER,
+    alg_REF_SEQ_ID,
+    alg_REF_POS,
+    alg_REF_LEN,
+    alg_DISTANCE_FILTER,
+    alg_TEMPLATE_LEN = alg_DISTANCE_FILTER,
+    alg_CG_TAGS_STR
+};
+
+
+SCol const g_alg_col_tmpl[] =
+{
+    { "SEQ_SPOT_ID", 0, {NULL}, 0, true },
+    { "SEQ_NAME", 0, {NULL}, 0, false },
+    { "MAPQ", 0, {NULL}, 0, false },
+    { "?CIGAR column name?", 0, {NULL}, 0, false },
+    { "?READ column name?", 0, {NULL}, 0, false },
+    { "READ_START", 0, {NULL}, 0, false }, /* READ_START */
+    { "READ_LEN", 0, {NULL}, 0, false }, /* READ_LEN */
+    { "?CIGAR_LEN column name?", 0, {NULL}, 0, true }, /* CIGAR_LEN */
+    { "SAM_QUALITY", 0, {NULL}, 0, false },
+    { "SPOT_GROUP", 0, {NULL}, 0, true },
+    { "SEQ_SPOT_GROUP", 0, {NULL}, 0, true },
+    { "SEQ_READ_ID", 0, {NULL}, 0, true },
+    { "REF_ORIENTATION", 0, {NULL}, 0, true },
+    { "ALIGNMENT_COUNT", 0, {NULL}, 0, true },
+    { "EDIT_DISTANCE", 0, {NULL}, 0, false },
+    { "", 0, {NULL}, 0, false },
+    /* start cols used as standalone in DumpUnaligned */
+    /* MATE_ALIGN_ID col must preceeed
+       MATE_REF_NAME, MATE_REF_POS, SAM_FLAGS, TEMPLATE_LEN for cache to work */
+    { "MATE_ALIGN_ID", 0, {NULL}, 0, false },
+    { "?MATE_REF_NAME column name?", 0, {NULL}, 0, false },
+    { "SAM_FLAGS", 0, {NULL}, 0, false },
+    { "REF_START", 0, {NULL}, 0, false },  /* priming cursor cache */
+    { "MATE_REF_POS", 0, {NULL}, 0, false },
+    { "ALIGN_GROUP", 0, {NULL}, 0, true },
+    { "", 0, {NULL}, 0, true }, /* EVIDENCE_ALIGNMENT_IDS */
+    { "", 0, {NULL}, 0, true }, /* REF_PLOIDY */
+    { "REF_ID", 0, {NULL}, 0, true }, /* REF_ID */
+    { "MATE_REF_ID", 0, {NULL}, 0, true }, /* priming cursor cache */
+    { "(bool)HAS_MISMATCH", 0, {NULL}, 0, true },
+    /* these are read before any other for filtering so they must be last */
+    { "REF_NAME", 0, {NULL}, 0, false },
+    { "REF_SEQ_ID", 0, {NULL}, 0, false },
+    { "REF_POS", 0, {NULL}, 0, false },
+    /* end cols used as standalone in DumpUnaligned */
+    { "REF_LEN", 0, {NULL}, 0, false },
+    { "TEMPLATE_LEN", 0, {NULL}, 0, false },
+    { NULL, 0, {NULL}, 0, false }, /* alg_CG_TAGS_STR */
+    { NULL, 0, {NULL}, 0, false }
+};
+
+enum eseq_col
+{
+    seq_READ = 0,
+    seq_QUALITY,
+    seq_SPOT_GROUP,
+    seq_READ_START,
+    seq_READ_LEN,
+    seq_READ_TYPE,
+    seq_READ_FILTER,
+    seq_NAME,
+    seq_PRIMARY_ALIGNMENT_ID
+};
+
+static 
+SCol const gSeqCol[] =
+{
+    { "READ", 0, {NULL}, 0, false },
+    { "(INSDC:quality:text:phred_33)QUALITY", 0, {NULL}, 0, false },
+    { "SPOT_GROUP", 0, {NULL}, 0, true },
+    { "READ_START", 0, {NULL}, 0, true },
+    { "READ_LEN", 0, {NULL}, 0, true },
+    { "READ_TYPE", 0, {NULL}, 0, true },
+    { "READ_FILTER", 0, {NULL}, 0, true },
+    { "NAME", 0, {NULL}, 0, true },
+    /* must be last in list to avoid reading all columns */
+    { "PRIMARY_ALIGNMENT_ID", 0, {NULL}, 0, true },
+    { NULL, 0, {NULL}, 0, false }
+};
+
+
+static rc_t RefSeqPrint( void )
+{
+    rc_t rc = 0;
+    uint32_t i, count = 0;
+    
+    rc = ReferenceList_Count( gRefList, &count );
+    for( i = 0; rc == 0 && i < count; i++ )
+    {
+        ReferenceObj const *obj;
+        rc = ReferenceList_Get( gRefList, &obj, i );
+        if ( rc == 0 )
+        {
+            char const *seqid = NULL;
+            rc = ReferenceObj_SeqId( obj, &seqid );
+            if ( rc == 0 )
+            {
+                char const *name = NULL;
+                rc = ReferenceObj_Name( obj, &name );
+                if ( rc == 0 )
+                {
+                    INSDC_coord_len len;
+                    rc = ReferenceObj_SeqLength( obj, &len );
+                    if ( rc == 0 )
+                    {
+                        char const *nm;
+                        if ( param->use_seqid && seqid != NULL && seqid[ 0 ] != '\0' )
+                        {
+                            nm = seqid;
+                        }
+                        else
+                        {
+                            nm = name;
+                        }
+                        KOutMsg( "@SQ\tSN:%s", nm );
+                        if ( nm != seqid && seqid != NULL && seqid[ 0 ] != '\0' && strcmp( nm, seqid ) != 0)
+                        {
+                            KOutMsg( "\tAS:%s", seqid );
+                        }
+                        KOutMsg( "\tLN:%u\n", len );
+                    }
+                }
+            }
+            ReferenceObj_Release( obj );
+        }
+    }
+    return rc;
+}
+
+
+#if USE_MATE_CACHE
+static rc_t Cache_Init( SCursCache* c )
+{
+    if ( c != NULL )
+    {
+	rc_t rc;
+        memset( c, 0, sizeof( *c ) );
+        rc=KVectorMake( &c->cache );
+	if(rc == 0){
+		rc=KVectorMake( &c->cache_unaligned_mate );
+	}
+    }
+    return 0;
+}
+
+
+static void Cache_Close( char const *name, SCursCache* c )
+{
+    if ( c != NULL )
+    {
+        KVectorRelease( c->cache );
+        KVectorRelease( c->cache_unaligned_mate );
+        if ( c->added > 0 )
+        {
+            SAM_DUMP_DBG( 2, ( "%s cache stats: projected %lu added of those %lu; "
+                               "hits %lu of those broken %lu;\n",
+                               name, c->projected, c->added, c->hit, c->bad ) );
+        }
+    }
+    memset( c, 0, sizeof( *c ) );
+}
+
+
+static rc_t Cache_Add( uint64_t key, SCurs const *curs, SCol const *cols )
+{
+    /* compact values for mate record to cache as:
+        pos_delta - 32bit, ref_proj - 11bit, flags - 11bit, rnext_idx - 10bit = 64bit
+    */
+    rc_t rc = 0;
+    ReferenceObj const *r = NULL;
+    uint32_t rid = 0;
+    uint64_t val = 0;
+    int64_t mate_id = cols[ alg_MATE_ALIGN_ID ].len > 0 ? cols[ alg_MATE_ALIGN_ID ].base.i64[ 0 ] : 0;
+
+    rc = ReferenceList_Find( gRefList, &r, cols[ alg_REF_NAME ].base.str, cols[ alg_REF_NAME ].len );
+    if ( rc == 0 )
+    {
+        rc = ReferenceObj_Idx( r, &rid );
+    }
+#if _DEBUGGING
+    {
+        char const *rname = NULL;
+        curs->cache->projected++;
+        ReferenceObj_Name( r, &rname );
+        SAM_DUMP_DBG( 10, ( "to cache row %li for mate %li: %u,%s[%hu],%u,%u,%i",
+            key, mate_id, cols[ alg_SAM_FLAGS ].base.u32[ 0 ], rname, rid,
+            cols[ alg_REF_POS ].len ? cols[ alg_REF_POS ].base.coord0[ 0 ] : 0,
+            cols[ alg_MATE_REF_POS ].len ? cols[ alg_MATE_REF_POS ].base.coord0[ 0 ] : 0,
+            cols[ alg_TEMPLATE_LEN ].len > 0 ? cols[ alg_TEMPLATE_LEN ].base.i32[ 0 ] : 0));
+    }
+#endif
+    if ( rc == 0 && !( rid & 0xFC00 ) )
+    {
+        int64_t pos_delta64;
+        int32_t pos_delta32;
+
+        if ( mate_id != 0 )
+        {
+            ReferenceObj const *rm = NULL;
+            uint32_t rm_id;
+
+            rc = ReferenceList_Find( gRefList, &rm, cols[ alg_MATE_REF_NAME ].base.str, cols[ alg_MATE_REF_NAME ].len );
+            if ( rc == 0 )
+            {
+                rc = ReferenceObj_Idx( rm, &rm_id );
+            }
+            assert( rm != NULL );
+            if ( rc == 0 && rid != rm_id )
+            {
+                char const *rm_name = NULL;
+                ReferenceObj_Name( rm, &rm_name );
+                mate_id = 0;
+                SAM_DUMP_DBG( 10, ( " mate ref differ: %s[%hu]!", rm_name, rm_id ) );
+            }
+            ReferenceObj_Release( rm );
+        }
+
+        if ( mate_id != 0 )
+        {
+            pos_delta64 = cols[ alg_MATE_REF_POS ].base.coord0[ 0 ] - cols[ alg_REF_POS ].base.coord0[ 0 ];
+        }
+        else
+        {
+            pos_delta64 = cols[ alg_REF_POS ].base.coord0[ 0 ];
+        }
+
+        pos_delta32 = pos_delta64;
+        if ( pos_delta64 == pos_delta32 )
+        {
+            int64_t ref_proj;
+            if ( mate_id == 0 )
+            {
+                ref_proj = 0; /* indicates full value in delta */
+            }
+            else if ( cols[ alg_TEMPLATE_LEN ].base.i32[ 0 ] < 0 )
+            {
+                assert( pos_delta32 <= 0 );
+                ref_proj = pos_delta32 - cols[ alg_TEMPLATE_LEN ].base.i32[ 0 ];
+            }
+            else
+            {
+                assert( pos_delta32 >= 0 );
+                ref_proj = cols[ alg_TEMPLATE_LEN ].base.i32[ 0 ] - pos_delta32;
+            }
+
+            if ( !( ref_proj & 0xFFFFF800 ) )
+            {
+                val = ( pos_delta64 << 32 ) | ( ref_proj << 21 ) | ( cols[ alg_SAM_FLAGS ].base.u32[ 0 ] << 10 ) | rid;
+                rc = KVectorSetU64( curs->cache->cache, key, val );
+            }
+        }
+    }
+    ReferenceObj_Release( r );
+
+#if _DEBUGGING
+    if ( val == 0 )
+    {
+        SAM_DUMP_DBG( 10, ( " --> out of range\n" ) );
+    }
+    else
+    {
+        SAM_DUMP_DBG( 10, ( " --> %016lX\n", val ) );
+        curs->cache->added++;
+    }
+#endif
+    return rc;
+}
+
+
+static rc_t Cache_Get( SCurs const *curs, uint64_t key, uint64_t* val )
+{
+    rc_t rc = KVectorGetU64( curs->cache->cache, key, val );
+    if ( rc == 0 )
+    {
+        uint32_t id = ( *val & 0x3FF );
+#if _DEBUGGING
+        curs->cache->hit++;
+#endif
+        KVectorUnset( curs->cache->cache, key );
+        rc = ReferenceList_Get( gRefList, &curs->cache->ref, id );
+        if ( rc != 0 )
+        {
+            *val = 0;
+            curs->cache->ref = NULL;
+            rc = RC( rcExe, rcNoTarg, rcSearching, rcItem, rcNotFound );
+#if _DEBUGGING
+            curs->cache->bad++;
+#endif
+        }
+        else
+        {
+            SAM_DUMP_DBG( 10, ( "from cache row %li %016lX", key, *val ) );
+        }
+    }
+    return rc;
+}
+
+
+static void Cache_Unpack( uint64_t val, int64_t mate_id, SCurs const *curs, SCol* cols )
+{
+    int32_t pos_delta = ( val & 0xFFFFFFFF00000000 ) >> 32;
+    uint32_t ref_proj = ( val & 0x00000000FFE00000 ) >> 21;
+    uint32_t flags = ( val & 0x00000000001FFC00 ) >> 10;
+
+    if ( mate_id != 0 )
+    {
+        /* adjust flags for mate record */
+        curs->cache->sam_flags = ( flags & 0x1 ) |
+                                 ( flags & 0x2 ) |
+                                 ( ( flags & 0x8 ) >> 1 ) |
+                                 ( ( flags & 0x4 ) << 1 ) |
+                                 ( ( flags & 0x20 ) >> 1 ) |
+                                 ( ( flags & 0x10 ) << 1 ) |
+                                 ( ( flags & 0x40 ) ? 0x80 : 0x40 ) |
+                                 ( flags & 0x700 );
+    }
+    else
+    {
+        /* preserve flags as if original records is restored */
+        curs->cache->sam_flags = flags;
+    }
+    cols[ alg_SAM_FLAGS ].base.u32 = &curs->cache->sam_flags;
+    cols[ alg_SAM_FLAGS ].len = sizeof( curs->cache->sam_flags );
+
+    if ( param->use_seqid )
+    {
+        ReferenceObj_SeqId( curs->cache->ref, &cols[ alg_MATE_REF_NAME ].base.str );
+    }
+    else
+    {
+        ReferenceObj_Name( curs->cache->ref, &cols[ alg_MATE_REF_NAME ].base.str );
+    }
+
+    cols[ alg_MATE_REF_NAME ].len = string_size( cols[ alg_MATE_REF_NAME ].base.str );
+
+    if ( ref_proj == 0 )
+    {
+        curs->cache->pnext = pos_delta;
+        curs->cache->tlen = 0;
+    }
+    else if ( pos_delta > 0 )
+    {
+        curs->cache->pnext = ( cols[ alg_REF_POS ].len > 0 ? cols[ alg_REF_POS ].base.coord0[ 0 ] : 0 ) - pos_delta;
+        curs->cache->tlen = - ( ref_proj + pos_delta );
+    }
+    else
+    {
+        curs->cache->pnext = ( cols[ alg_REF_POS ].len > 0 ? cols[ alg_REF_POS ].base.coord0[ 0 ] : 0 ) - pos_delta;
+        curs->cache->tlen = ref_proj - pos_delta;
+    }
+
+    cols[ alg_MATE_REF_POS ].base.coord0 = &curs->cache->pnext;
+    cols[ alg_MATE_REF_POS ].len = sizeof( curs->cache->pnext );
+    cols[ alg_TEMPLATE_LEN ].base.i32 = &curs->cache->tlen;
+    cols[ alg_TEMPLATE_LEN ].len = sizeof( curs->cache->tlen );
+    {
+        uint32_t id;
+        ReferenceObj_Idx( curs->cache->ref, &id );
+        SAM_DUMP_DBG( 10, ( " --> mate %li: %u,%s[%hu],%u,%i\n",
+            mate_id, curs->cache->sam_flags, cols[ alg_MATE_REF_NAME ].base.str,
+            id, curs->cache->pnext, curs->cache->tlen ) );
+    }
+}
+#endif /* USE_MATE_CACHE */
+
+#if 0
+static rc_t OpenVTable( VDatabase const *db, STable* tbl, char const *name, bool optional )
+{
+    rc_t rc = VDatabaseOpenTableRead( db, &tbl->vtbl, "%s", name );
+    if ( GetRCState( rc ) == rcNotFound && optional )
+    {
+        rc = 0;
+        tbl->vtbl = NULL;
+    }
+    tbl->name = name;
+    return rc;
+}
+#endif
+
+static rc_t Cursor_Open( STable const *const tbl, SCurs *const curs, SCol cols[], SCursCache* cache )
+{
+    rc_t rc = 0;
+    unsigned i;
+
+    curs->vcurs = NULL;
+    if ( tbl == NULL || tbl->vtbl == NULL )
+        return 0;
+
+    rc = VTableCreateCachedCursorRead( tbl->vtbl, &curs->vcurs, CURSOR_CACHE );
+    if ( rc != 0 )
+        return rc;
+    
+    rc = VCursorPermitPostOpenAdd( curs->vcurs );
+    if ( rc != 0 )
+        return rc;
+
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen( curs->vcurs );
+        if ( rc == 0 )
+        {
+#if USE_MATE_CACHE
+            if ( cache != NULL )
+            {
+                curs->cache = cache;
+            }
+            else
+            {
+                curs->cache = &curs->cache_local;
+                rc = Cache_Init( &curs->cache_local );
+            }
+#endif /* USE_MATE_CACHE */
+            curs->tbl = tbl;
+        }
+    }
+    
+    for ( i = 0; cols[ i ].name != NULL; ++i )
+    {
+        if ( cols[ i ].name[ 0 ] == 0 )
+            continue;
+        rc = VCursorAddColumn( curs->vcurs, &cols[ i ].idx, "%s", cols[ i ].name );
+        if ( GetRCObject( rc ) == ( enum RCObject ) rcColumn )
+        {
+            switch ( GetRCState( rc ) )
+            {
+            case rcNotFound:
+            case rcUndefined:
+                if ( !cols[ i ].optional )
+                    break;
+            case rcExists:
+                rc = 0;
+            default:
+                break;
+            }
+        }
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogErr, ( klogErr, rc, "table $(t) column $(c)", "t=%s,c=%s", tbl->name, cols[ i ].name ) );
+            break;
+        }
+    }
+    if ( rc != 0 )
+    {
+        VCursorRelease( curs->vcurs );
+        curs->vcurs = NULL;
+        if ( rc != KLogLastErrorCode() )
+        {
+            (void)PLOGERR( klogErr, ( klogErr, rc, "table $(t)", "t=%s", tbl->name ) );
+        }
+    }
+    else
+    {
+        SAM_DUMP_DBG( 2, ( "%s: table %s\n", __func__, curs->tbl->name ) );
+    }
+    return rc;
+}
+
+
+static void Cursor_Close( SCurs* curs )
+{
+    if ( curs != NULL && curs->vcurs != NULL )
+    {
+        SAM_DUMP_DBG( 2, ( "%s: table %s, columns rows read %lu\n", __func__, curs->tbl->name, curs->col_reads_qty ) );
+        VCursorRelease( curs->vcurs );
+#if USE_MATE_CACHE
+        if ( curs->cache == &curs->cache_local )
+        {
+            Cache_Close( curs->tbl->name, curs->cache );
+        }
+#endif /* USE_MATE_CACHE */
+        memset( curs, 0, sizeof( *curs ) );
+    }
+}
+
+
+static rc_t Cursor_Read( DataSource *ds, int64_t row_id, int firstCol, unsigned nCols )
+{
+    rc_t rc = 0;
+
+    if ( ds->curs.vcurs == NULL )
+    {
+        rc = Cursor_Open( &ds->tbl, &ds->curs, ds->cols, ds->curs.cache );
+        if ( rc != 0 )
+            return rc;
+    }
+    if (1)
+    {
+        SCol *const col = &ds->cols[ firstCol ];
+        unsigned i;
+        
+        for ( i = 0; i < nCols && col[ i ].name; ++i )
+        {
+            uint32_t const idx = col[ i ].idx;
+            
+            if ( idx != 0 )
+            {
+                uint32_t elem_bits;
+                uint32_t bit_offset;
+                uint32_t elem_count;
+                void const *base;
+                
+                rc = VCursorCellDataDirect( ds->curs.vcurs, row_id, idx, &elem_bits, &base, &bit_offset, &elem_count );
+                if ( rc != 0 )
+                {
+                    (void)PLOGERR( klogWarn, ( klogWarn, rc, "reading $(t) row $(r), column $(c)", "t=%s,r=%li,c=%s",
+                                               ds->tbl.name, row_id, col[ i ].name ) );
+                    return rc;
+                }
+                
+                assert( bit_offset == 0 );
+                assert( elem_bits % 8 == 0 );
+                
+                col[ i ].base.v = base;
+                col[ i ].len = elem_count;
+            }
+        }
+    }
+    return rc;
+}
+
+struct
+{
+    KWrtWriter writer;
+    void* data;
+    KFile* kfile;
+    uint64_t pos;
+} g_out_writer = {NULL};
+
+
+static rc_t CC BufferedWriter( void *const self, char const buffer[], size_t const bufsize, size_t *const pnum_writ )
+{
+    rc_t rc = 0;
+    size_t written = 0;
+
+    assert( buffer != NULL );
+
+    while ( written < bufsize )
+    {
+        size_t n;
+
+        rc = KFileWrite( g_out_writer.kfile, g_out_writer.pos + written, &buffer[ written ], bufsize - written, &n );
+        if ( rc != 0 )
+            break;
+        written += n;
+    }
+    g_out_writer.pos += written;
+    if ( pnum_writ != NULL )
+        *pnum_writ = written;
+    return rc;
+}
+
+
+static rc_t BufferedWriterMake( bool gzip, bool bzip2 )
+{
+    rc_t rc = 0;
+
+    if ( gzip && bzip2 )
+    {
+        rc = RC( rcApp, rcFile, rcConstructing, rcParam, rcAmbiguous );
+    }
+    else if ( g_out_writer.writer != NULL )
+    {
+        rc = RC( rcApp, rcFile, rcConstructing, rcParam, rcAmbiguous );
+    }
+    else
+    {
+        rc = KFileMakeStdOut( &g_out_writer.kfile );
+        if ( rc == 0 )
+        {
+            g_out_writer.pos = 0;
+            if ( gzip )
+            {
+                KFile* gz;
+                rc = KFileMakeGzipForWrite( &gz, g_out_writer.kfile );
+                if ( rc == 0 )
+                {
+                    KFileRelease( g_out_writer.kfile );
+                    g_out_writer.kfile = gz;
+                }
+            }
+            else if ( bzip2 )
+            {
+                KFile* bz;
+                rc = KFileMakeBzip2ForWrite( &bz, g_out_writer.kfile );
+                if ( rc == 0 )
+                {
+                    KFileRelease( g_out_writer.kfile );
+                    g_out_writer.kfile = bz;
+                }
+            }
+            if ( rc == 0 )
+            {
+                KFile* buf;
+                rc = KBufFileMakeWrite( &buf, g_out_writer.kfile, false, 128 * 1024 );
+                if ( rc == 0 )
+                {
+                    KFileRelease( g_out_writer.kfile );
+                    g_out_writer.kfile = buf;
+                    g_out_writer.writer = KOutWriterGet();
+                    g_out_writer.data = KOutDataGet();
+                    rc = KOutHandlerSet( BufferedWriter, &g_out_writer );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static void BufferedWriterRelease( bool flush )
+{
+    if ( flush )
+    {
+        /* avoid flushing buffered data after failure */
+        KFileRelease( g_out_writer.kfile );
+    }
+    if ( g_out_writer.writer != NULL )
+    {
+        KOutHandlerSet( g_out_writer.writer, g_out_writer.data );
+    }
+    g_out_writer.writer = NULL;
+}
+
+
+typedef struct ReadGroup
+{
+    BSTNode node;
+    char name[ 1024 ];
+} ReadGroup;
+
+
+static int64_t CC ReadGroup_sort( BSTNode const *item, BSTNode const *node )
+{
+    return strcmp( ( ( ReadGroup const * )item )->name, ( ( ReadGroup const * ) node )->name );
+}
+
+
+static rc_t ReadGroup_print( char const *nm )
+{
+    rc_t rc = 0;
+    if ( nm[ 0 ] != '\0' && strcasecmp( nm, "default" ) )
+    {
+        rc = KOutMsg( "@RG\tID:%s\n", nm );
+    }
+    return rc;
+}
+
+
+static void CC ReadGroup_dump( BSTNode *n, void *data )
+{
+    ReadGroup const *g = ( ReadGroup* )n;
+    ReadGroup_print( g->name );
+}
+
+
+static rc_t CC DumpReadGroupsScan( STable const *tbl )
+{
+    SCol cols[] =
+    {
+        { "SPOT_GROUP", 0, {NULL}, 0, false },
+        { NULL, 0, {NULL}, 0, false }
+    };
+    rc_t rc = 0;
+    BSTree tree;
+    DataSource ds;
+
+    memset( &ds, 0, sizeof( ds ) );
+    ds.cols = cols;
+
+    BSTreeInit( &tree );
+    rc = Cursor_Open( tbl, &ds.curs, ds.cols, NULL );
+    if ( rc == 0 )
+    {
+        int64_t start;
+        uint64_t count;
+
+        rc = VCursorIdRange( ds.curs.vcurs, 0, &start, &count );
+        if ( rc == 0 )
+        {
+            ReadGroup* node = NULL;
+            uint32_t last_len = 0;
+
+            while ( count > 0 && rc == 0 )
+            {
+                rc = Cursor_Read( &ds, start, 0, ~(unsigned)0 );
+                if ( rc == 0 && cols[ 0 ].len != 0 )
+                {
+                    if ( node == NULL ||
+                         last_len != cols[ 0 ].len ||
+                         strncmp( cols[ 0 ].base.str, node->name, cols[ 0 ].len ) != 0 )
+                    {
+                        node = malloc( sizeof( *node ) );
+                        if ( node == NULL )
+                        {
+                            rc = RC( rcExe, rcNode, rcConstructing, rcMemory, rcExhausted );
+                        }
+                        else if ( cols[ 0 ].len > sizeof( node->name ) )
+                        {
+                            rc = RC( rcExe, rcString, rcCopying, rcBuffer, rcInsufficient ); 
+                        }
+                        else
+                        {
+                            last_len = cols[ 0 ].len;
+                            string_copy( node->name, ( sizeof node->name ) - 1, cols[ 0 ].base.str, last_len );
+                            node->name[ last_len ] = '\0';
+                            rc = BSTreeInsertUnique( &tree, &node->node, NULL, ReadGroup_sort );
+                            if ( GetRCState( rc ) == rcExists )
+                            {
+                                free( node );
+                                rc = 0;
+                            }
+                        }
+                    }
+                }
+                else if ( GetRCState( rc ) == rcNotFound && GetRCObject( rc ) == rcRow )
+                {
+                    rc = 0;
+                }
+                start++;
+                count--;
+            }
+        }
+        Cursor_Close( &ds.curs );
+    }
+
+    if ( rc == 0 )
+    {
+        BSTreeForEach( &tree, false, ReadGroup_dump, NULL );
+    }
+    else if ( rc != KLogLastErrorCode() )
+    {
+        (void)PLOGERR( klogErr, ( klogErr, rc, "$(f)", "f=%s", __func__ ) );
+    }
+    BSTreeWhack( &tree, NULL, NULL );
+    return rc;
+}
+
+
+rc_t CC DumpReadGroups( STable const *tbl )
+{
+    rc_t rc = 0;
+    KMetadata const *m;
+
+    /* try getting list from stats meta */
+    rc = VTableOpenMetadataRead( tbl->vtbl, &m );
+    if ( rc == 0 )
+    {
+        KMDataNode const *n;
+        rc = KMetadataOpenNodeRead( m, &n, "/STATS/SPOT_GROUP" );
+        if ( rc == 0 )
+        {
+            KNamelist* names;
+            rc = KMDataNodeListChild( n, &names );
+            if ( rc == 0 )
+            {
+                uint32_t i, q;
+                rc = KNamelistCount( names, &q );
+                if ( rc == 0 )
+                {
+                    for ( i = 0; rc == 0 && i < q; i++ )
+                    {
+                        char const *nm;
+                        rc = KNamelistGet( names, i, &nm );
+                        if ( rc == 0 )
+                        {
+                            rc = ReadGroup_print( nm );
+                        }
+                    }
+                }
+                KNamelistRelease( names );
+            }
+            KMDataNodeRelease( n );
+        }
+        KMetadataRelease( m );
+    }
+
+    if ( GetRCState( rc ) == rcNotFound )
+    {
+        rc = DumpReadGroupsScan( tbl );
+    }
+    else if ( rc != 0 && rc != KLogLastErrorCode() )
+    {
+        (void)PLOGERR( klogErr, ( klogErr, rc, "$(f)", "f=%s", __func__ ) );
+    }
+    return rc;
+}
+
+static rc_t Cursor_ReadAlign( SCurs const *curs, int64_t row_id, SCol* cols, uint32_t idx )
+{
+    rc_t rc = 0;
+    SCol* c = NULL;
+    SCol* mate_id = NULL;
+#if USE_MATE_CACHE
+    uint64_t cache_val = 0;
+    bool cache_miss = false;
+#endif /* USE_MATE_CACHE */
+
+    
+    for( ; rc == 0 && cols[ idx ].name != NULL; idx++ )
+    {
+        c = &cols[ idx ];
+        if ( c->idx != 0 )
+        {
+#if USE_MATE_CACHE
+            if ( mate_id != NULL && curs->cache != NULL && !cache_miss &&
+                ( idx == alg_SAM_FLAGS || idx == alg_MATE_REF_NAME || idx == alg_MATE_REF_POS || idx == alg_TEMPLATE_LEN ) &&
+                mate_id->idx && mate_id->len > 0 && mate_id->base.i64[ 0 ] > 0 )
+            {
+                if ( cache_val != 0 )
+                {
+                    continue;
+                }
+                rc = Cache_Get( curs, mate_id->base.u64[ 0 ], &cache_val );
+                if ( rc == 0 )
+                {
+                    continue;
+                }
+                else if ( !( GetRCObject( rc ) == rcItem && GetRCState( rc ) == rcNotFound ) )
+                {
+                    break;
+                }
+                else
+                {
+                    /* avoid multiple lookups in cache */
+                    cache_miss = true;
+                }
+            }
+#endif /* USE_MATE_CACHE */
+            rc = VCursorCellDataDirect( curs->vcurs, row_id, c->idx, NULL, &c->base.v, NULL, &c->len );
+            if ( rc == 0 )
+            {
+                if ( idx == alg_SEQ_SPOT_ID && ( c->len  ==0 || c->base.i64[ 0 ] == 0 ) )
+                {
+                    return RC( rcExe, rcColumn, rcReading, rcRow, rcNotFound );
+                }
+                if ( idx == alg_MATE_ALIGN_ID )
+                {
+                    mate_id = &cols[ alg_MATE_ALIGN_ID ];
+                }
+#if _DEBUGGING
+                ( ( SCurs* )curs )->col_reads_qty++;
+#endif
+            }
+        }
+        else
+        {
+            static INSDC_coord_zero readStart;
+            static INSDC_coord_len  readLen;
+            static INSDC_coord_len  cigarLen;
+            
+            switch ( (int)idx )
+            {
+            case alg_READ_START:
+                readStart = 0;
+                c->base.coord0 = &readStart;
+                c->len = 1;
+                break;
+            case alg_READ_LEN:
+                readLen = cols[ alg_READ ].len;
+                c->base.coord_len = &readLen;
+                c->len = 1;
+                break;
+            case alg_CIGAR_LEN:
+                cigarLen = cols[ alg_CIGAR ].len;
+                c->base.coord_len = &cigarLen;
+                c->len = 1;
+                break;
+            }
+        }
+    }
+
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogWarn, ( klogWarn, rc, "reading $(t) row $(r), column $(c)", "t=%s,r=%li,c=%s",
+            curs->tbl->name, row_id, c ? c->name : "<none>" ) );
+#if USE_MATE_CACHE
+    }
+    else if ( curs->cache == NULL )
+    {
+    }
+    else if ( cache_val == 0 )
+    {
+        /* this row is not from cache */
+        int64_t mate_align_id = ( mate_id != NULL && mate_id->len > 0 ) ? mate_id->base.i64[ 0 ] : 0;
+        if ( cols[ 0 ].idx != 0 && /* we have full cursor which means we are reading alignment table */
+            /* no mate -> unaligned (not secondary!) */
+            ( ( mate_align_id == 0 && param->unaligned && curs->cache != &curs->cache_local ) ||
+            /* 2nd mate with higher rowid and more than set gap rows away */
+              ( mate_align_id != 0 && mate_align_id > row_id && ( mate_align_id - row_id) > param->mate_row_gap_cachable ) ) )
+        {
+          rc = Cache_Add( row_id, curs, cols );
+        }
+	if(param->unaligned == true && mate_align_id == 0 ){
+	  rc = KVectorSetBool( curs->cache->cache_unaligned_mate, cols[alg_SEQ_SPOT_ID].base.i64[0], true );
+        }
+    }
+    else
+    {
+        Cache_Unpack( cache_val, row_id, curs, cols );
+#endif /* USE_MATE_CACHE */
+    }
+    return rc;
+}
+
+
+static rc_t DumpName( char const *name, size_t name_len,
+                      const char spot_group_sep, char const *spot_group,
+                      size_t spot_group_len, int64_t spot_id )
+{
+    rc_t rc = 0;
+    if ( param->cg_friendly_names )
+    {
+        rc = KOutMsg( "%.*s-1:%lu", spot_group_len, spot_group, spot_id );
+    }
+    else
+    {
+        if ( param->name_prefix != NULL )
+        {
+            rc = KOutMsg( "%s.", param->name_prefix );
+        }
+        rc = BufferedWriter( NULL, name, name_len, NULL );
+        if ( rc == 0 && param->spot_group_in_name && spot_group_len > 0 )
+        {
+            rc = BufferedWriter( NULL, &spot_group_sep, 1, NULL );
+            if ( rc == 0 )
+                rc = BufferedWriter( NULL, spot_group, spot_group_len, NULL );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t DumpQuality( char const quality[], unsigned const count, bool const reverse, bool const quantize )
+{
+    rc_t rc = 0;
+    if ( quality == NULL )
+    {
+        unsigned i;
+
+        for ( i = 0; rc == 0 && i < count; ++i )
+        {
+            char const newValue = ((param->qualQuant && param->qualQuantSingle)?param->qualQuantSingle:30) + 33;
+            rc = BufferedWriter( NULL, &newValue, 1, NULL );
+        }
+    }
+    else if ( reverse || quantize )
+    {
+        unsigned i;
+
+        for ( i = 0; rc == 0 && i < count; ++i )
+        {
+            char const qual = quality[ reverse ? ( count - i - 1 ) : i ];
+            char const newValue = quantize ? param->qualQuant[ qual - 33 ] + 33 : qual;
+
+            rc = BufferedWriter( NULL, &newValue, 1, NULL );
+        }
+    }
+    else
+    {
+        rc = BufferedWriter( NULL, quality, count, NULL );
+    }
+    return rc;
+}
+
+
+static rc_t DumpUnalignedFastX( const SCol cols[], uint32_t read_id, INSDC_coord_zero readStart, INSDC_coord_len readLen, int64_t row_id )
+{
+    /* fast[AQ] represnted in SAM fields:
+       [@|>]QNAME unaligned
+       SEQ
+       +
+       QUAL
+    */
+    rc_t rc = BufferedWriter( NULL, param->fastq ? "@" : ">", 1, NULL );
+
+    /* QNAME: [PFX.]SEQUENCE:NAME[#SPOT_GROUP] */
+    if ( rc == 0 )
+        rc = DumpName( cols[ seq_NAME ].base.str, cols[ seq_NAME ].len, '#',
+                       cols[ seq_SPOT_GROUP ].base.str, cols[ seq_SPOT_GROUP ].len, row_id );
+    if ( rc == 0 && read_id > 0 )
+    {
+        rc = KOutMsg( "/%u", read_id );
+    }
+    if ( rc == 0 )
+        rc = BufferedWriter( NULL, " unaligned\n", 11, NULL );
+
+    /* SEQ: SEQUENCE.READ */
+    if ( rc == 0 )
+        rc = BufferedWriter( NULL, &cols[ seq_READ ].base.str[readStart], readLen, NULL );
+    if ( rc == 0 && param->fastq )
+    {
+        /* QUAL: SEQUENCE.QUALITY */
+        rc = BufferedWriter( NULL, "\n+\n", 3, NULL );
+        if ( rc == 0 )
+            rc = DumpQuality( &cols[ seq_QUALITY ].base.str[ readStart ], readLen, false, param->quantizeQual );
+    }
+    if ( rc == 0 )
+        rc = BufferedWriter( NULL, "\n", 1, NULL );
+    return rc;
+}
+
+
+static rc_t DumpAlignedFastX( const SCol cols[], int64_t const alignId, uint32_t read_id, bool primary, bool secondary )
+{
+    rc_t rc = 0;
+    size_t nm;
+    unsigned readId;
+    unsigned const nreads = cols[ alg_READ_LEN ].len;
+
+    for ( readId = 0; readId < nreads && rc == 0 ; ++readId )
+    {
+        char const *qname = cols[ alg_SEQ_NAME ].base.str;
+        size_t qname_len = cols[ alg_SEQ_NAME ].len;
+        char synth_qname[ 40 ];
+        int64_t const spot_id = cols[alg_SEQ_SPOT_ID].len > 0 ? cols[alg_SEQ_SPOT_ID].base.i64[0] : 0;
+        char const *const read = cols[ alg_READ ].base.str + cols[ alg_READ_START ].base.coord0[ readId ];
+        char const *const qual = cols[ alg_SAM_QUALITY ].base.v
+                               ? cols[ alg_SAM_QUALITY ].base.str + cols[ alg_READ_START ].base.coord0[ readId ]
+                               : NULL;
+        unsigned const readlen = cols[ alg_READ_LEN ].base.coord_len[ readId ];
+
+        /* fast[AQ] represnted in SAM fields:
+           [@|>]QNAME primary|secondary ref=RNAME pos=POS mapq=MAPQ
+           SEQ
+           +
+           QUAL
+        */
+        rc = BufferedWriter( NULL, param->fastq ? "@" : ">", 1, NULL );
+        /* QNAME: [PFX.]SEQ_NAME[#SPOT_GROUP] */
+        if ( qname_len == 0 || qname == NULL )
+        {
+            string_printf( synth_qname, sizeof( synth_qname ), &qname_len, "%li.%u", alignId, readId + 1 );
+            qname = synth_qname;
+        }
+        nm = cols[ alg_SPOT_GROUP ].len ? alg_SPOT_GROUP : alg_SEQ_SPOT_GROUP;
+        if ( rc == 0 )
+            rc = DumpName( qname, qname_len, '.', cols[ nm ].base.str, cols[ nm ].len, spot_id);
+
+        if ( rc == 0 && read_id > 0 )
+            rc = KOutMsg( "/%u", read_id );
+
+        if ( rc == 0 )
+        {
+            if ( primary )
+            {
+                rc = BufferedWriter( NULL, " primary", 8, NULL );
+            }
+            else if ( secondary )
+            {
+                rc = BufferedWriter( NULL, " secondary", 10, NULL );
+            }
+        }
+
+        /* RNAME: REF_NAME or REF_SEQ_ID */
+        if ( rc == 0 )
+            rc = BufferedWriter( NULL, " ref=", 5, NULL );
+        if ( rc == 0 )
+        {
+            if ( param->use_seqid )
+            {
+                rc = BufferedWriter( NULL, cols[ alg_REF_SEQ_ID ].base.str, cols[ alg_REF_SEQ_ID ].len, NULL );
+            }
+            else
+            {
+                rc = BufferedWriter( NULL, cols[ alg_REF_NAME ].base.str, cols[ alg_REF_NAME ].len, NULL );
+            }
+        }
+
+        /* POS: REF_POS, MAPQ: MAPQ */
+        if ( rc == 0 )
+            rc = KOutMsg( " pos=%u mapq=%i\n", cols[ alg_REF_POS ].base.coord0[ 0 ] + 1, cols[ alg_MAPQ ].base.i32[ 0 ] );
+        
+        /* SEQ: READ */
+        if ( rc == 0 )
+            rc = BufferedWriter( NULL, read, readlen, NULL );
+        if ( rc == 0 && param->fastq )
+        {
+            /* QUAL: SAM_QUALITY */
+            rc = BufferedWriter( NULL, "\n+\n", 3, NULL );
+            if ( rc == 0 )
+                rc = DumpQuality( qual, readlen, false, param->quantizeQual );
+        }
+        if ( rc == 0 )
+            rc = BufferedWriter( NULL, "\n", 1, NULL );
+    }
+    return rc;
+}
+
+
+static
+rc_t DumpUnalignedSAM( const SCol cols[], uint32_t flags, INSDC_coord_zero readStart, INSDC_coord_len readLen,
+                       char const *rnext, uint32_t rnext_len, INSDC_coord_zero pnext, char const readGroup[], int64_t row_id )
+{
+    unsigned i;
+
+    /* QNAME: [PFX.]NAME[.SPOT_GROUP] */
+    rc_t rc = DumpName( cols[ seq_NAME ].base.str, cols[ seq_NAME ].len, '.',
+              cols[ seq_SPOT_GROUP ].base.str, cols[ seq_SPOT_GROUP ].len, row_id );
+
+    /* all these fields are const text for now */
+    if ( rc == 0 )
+        rc = KOutMsg( "\t%u\t*\t0\t0\t*\t%.*s\t%u\t0\t",
+             flags, rnext_len ? rnext_len : 1, rnext_len ? rnext : "*", pnext );
+    /* SEQ: SEQUENCE.READ */
+    if ( flags & 0x10 )
+    {
+        for( i = 0; i < readLen && rc == 0; i++ )
+        {
+            char base;
+
+            DNAReverseCompliment( &cols[ seq_READ ].base.str[ readStart + readLen - 1 - i ], &base, 1 );
+            rc = BufferedWriter( NULL, &base, 1, NULL );
+        }
+    }
+    else
+    {
+        rc = BufferedWriter( NULL, &cols[ seq_READ ].base.str[ readStart ], readLen, NULL );
+    }
+
+    if ( rc == 0 )
+        rc = BufferedWriter( NULL, "\t", 1, NULL );
+    /* QUAL: SEQUENCE.QUALITY */
+    if ( rc == 0 )
+        rc = DumpQuality( &cols[ seq_QUALITY ].base.str[ readStart ], readLen, flags & 0x10, param->quantizeQual );
+
+    /* optional fields: */
+    if ( rc == 0 )
+    {
+        if ( readGroup )
+        {
+            rc = BufferedWriter( NULL, "\tRG:Z:", 6, NULL );
+            if ( rc == 0 )
+                rc = BufferedWriter( NULL, readGroup, string_size( readGroup ), NULL );
+        }
+        else if ( cols[ seq_SPOT_GROUP ].len > 0 )
+        {
+            /* read group */
+            rc = BufferedWriter( NULL, "\tRG:Z:", 6, NULL );
+            if ( rc == 0 )
+                rc = BufferedWriter( NULL, cols[ seq_SPOT_GROUP ].base.str, cols[ seq_SPOT_GROUP ].len, NULL );
+        }
+    }
+    if ( rc == 0 )
+        rc = BufferedWriter( NULL, "\n", 1, NULL );
+    return rc;
+}
+
+
+static
+rc_t DumpAlignedSAM( SAM_dump_ctx_t *const ctx,
+                     DataSource const *ds,
+                     int64_t alignId,
+                     char const readGroup[],
+                     int type)
+{
+    rc_t rc = 0;
+    unsigned const nreads = ds->cols[ alg_READ_LEN ].len;
+    SCol const *const cols = ds->cols;
+    int64_t const spot_id = cols[alg_SEQ_SPOT_ID].len > 0 ? cols[alg_SEQ_SPOT_ID].base.i64[0] : 0;
+    INSDC_coord_one const read_id = cols[alg_SEQ_READ_ID].len > 0 ? cols[alg_SEQ_READ_ID].base.coord1[0] : 0;
+    INSDC_SRA_read_filter const *align_filter = cols[alg_READ_FILTER].len == nreads ? cols[alg_READ_FILTER].base.read_filter : NULL;
+    INSDC_SRA_read_filter seq_filter = 0;
+    unsigned readId;
+    unsigned cigOffset = 0;
+    
+    if ( align_filter == NULL && spot_id && read_id && ctx->seq.cols )
+    {
+        rc_t rc;
+        
+        rc = Cursor_Read(&ctx->seq, spot_id, seq_READ_FILTER, 1);
+        if (rc == 0 && ctx->seq.cols[seq_READ_FILTER].len >= read_id)
+            seq_filter = ctx->seq.cols[seq_READ_FILTER].base.read_filter[read_id - 1];
+    }
+
+    for ( readId = 0; readId < nreads && rc == 0 ; ++readId )
+    {
+        char const *qname = cols[ alg_SEQ_NAME ].base.str;
+        size_t qname_len = cols[ alg_SEQ_NAME ].len;
+        char const *const read = cols[ alg_READ ].base.str + cols[ alg_READ_START ].base.coord0[ readId ];
+        char const *const qual = cols[ alg_SAM_QUALITY ].base.v
+                               ? cols[ alg_SAM_QUALITY ].base.str + cols[ alg_READ_START ].base.coord0[ readId ]
+                               : NULL;
+        unsigned const readlen = nreads > 1 ? cols[ alg_READ_LEN ].base.coord_len[ readId ] : cols[ alg_READ ].len;
+        unsigned const sflags = cols[ alg_SAM_FLAGS ].base.v ? cols[ alg_SAM_FLAGS ].base.u32[ readId ] : 0;
+        INSDC_SRA_read_filter const filt = align_filter ? align_filter[readId] : seq_filter;
+        unsigned const flags = (sflags & ~((unsigned)0x200)) | ((filt == SRA_READ_FILTER_REJECT) ? 0x200 : 0);
+        char const *const cigar = cols[ alg_CIGAR ].base.str + cigOffset;
+        unsigned const cigLen = nreads > 1 ? cols[ alg_CIGAR_LEN ].base.coord_len[ readId ] : cols[ alg_CIGAR ].len;
+        size_t nm;
+        char synth_qname[1024];
+        
+        cigOffset += cigLen;
+        if ( qname_len == 0 || qname == NULL )
+        {
+            string_printf( synth_qname, sizeof( synth_qname ), &qname_len, "ALLELE_%li.%u", alignId, readId + 1 );
+            qname = synth_qname;
+        }
+        else if (ds->type == edstt_EvidenceAlignment) {
+            string_printf( synth_qname, sizeof( synth_qname ), &qname_len, "%u/ALLELE_%li.%u", spot_id, cols[ alg_REF_ID ].base.i64[ readId ], cols[ alg_REF_PLOIDY ].base.u32[ readId ] );
+            qname = synth_qname;
+        }
+        nm = cols[ alg_SPOT_GROUP ].len ? alg_SPOT_GROUP : alg_SEQ_SPOT_GROUP;
+        rc = DumpName( qname, qname_len, '.', cols[ nm ].base.str, cols[ nm ].len, spot_id );
+
+        /* FLAG: SAM_FLAGS */
+        if ( rc == 0 )
+        {
+            if ( ds->type == edstt_EvidenceAlignment )
+            {
+                bool const cmpl = cols[alg_REVERSED].base.v && readId < cols[alg_REVERSED].len ? cols[alg_REVERSED].base.tf[readId] : false;
+                rc = KOutMsg( "\t%u\t", 1 | (cmpl ? 0x10 : 0) | (read_id == 1 ? 0x40 : 0x80) );
+            }
+            else if ( !param->unaligned      /** not going to dump unaligned **/
+                 && ( flags & 0x1 )     /** but we have sequenced multiple fragments **/
+                 && ( flags & 0x8 ) )   /** and not all of them align **/
+            {
+                /*** remove flags talking about multiple reads **/
+                /* turn off 0x001 0x008 0x040 0x080 */
+                rc = KOutMsg( "\t%u\t", flags & ~0xC9 );
+            }
+            else
+            {
+                rc = KOutMsg( "\t%u\t", flags );
+            }
+        }
+
+        if ( rc == 0 )
+        {
+            if ( ds->type == edstt_EvidenceAlignment && type == 0 )
+            {
+                rc = KOutMsg( "ALLELE_%li.%u", cols[ alg_REF_ID ].base.i64[ readId ], cols[ alg_REF_PLOIDY ].base.u32[ readId ] );
+            }
+            else
+            {
+                /* RNAME: REF_NAME or REF_SEQ_ID */
+                if ( param->use_seqid )
+                    rc = BufferedWriter( NULL, cols[ alg_REF_SEQ_ID ].base.str, cols[ alg_REF_SEQ_ID ].len, NULL );
+                else
+                    rc = BufferedWriter( NULL, cols[ alg_REF_NAME ].base.str, cols[ alg_REF_NAME ].len, NULL );
+            }
+        }
+
+        if ( rc == 0 )
+            rc = BufferedWriter( NULL, "\t", 1, NULL );
+        
+        /* POS: REF_POS */
+        if ( rc == 0 )
+            rc = KOutMsg( "%i\t", cols[ alg_REF_POS ].base.coord0[ 0 ] + 1 );
+
+        /* MAPQ: MAPQ */
+        if ( rc == 0 )
+            rc = KOutMsg( "%i\t", cols[ alg_MAPQ ].base.i32[ 0 ] );
+
+        /* CIGAR: CIGAR_* */
+        if ( ds->type == edstt_EvidenceInterval )
+        {
+            unsigned i;
+            
+            for ( i = 0; i != cigLen && rc == 0; ++i )
+            {
+                char ch = cigar[i];
+                if ( ch == 'S' ) ch = 'I';
+                rc = BufferedWriter(NULL, &ch, 1, NULL);
+            }
+        }
+	else if(ds->type == edstt_EvidenceAlignment)
+	{
+		rc = cg_canonical_print_cigar(cigar,cigLen);
+	}
+        else
+        {
+            if ( rc == 0 )
+                rc = BufferedWriter( NULL, cigar, cigLen, NULL );
+        }
+
+        if ( rc == 0 )
+            rc = BufferedWriter( NULL, "\t", 1, NULL );
+        
+        /* RNEXT: MATE_REF_NAME or '*' */
+        /* PNEXT: MATE_REF_POS or 0 */
+        if ( rc == 0 )
+        {
+            if ( cols[ alg_MATE_REF_NAME ].len )
+            {
+                if ( cols[ alg_MATE_REF_NAME ].len == cols[ alg_REF_NAME ].len &&
+                    memcmp( cols[ alg_MATE_REF_NAME ].base.str, cols[ alg_REF_NAME ].base.str, cols[ alg_MATE_REF_NAME ].len ) == 0 )
+                {
+                    rc = BufferedWriter( NULL, "=\t", 2, NULL );
+                }
+                else
+                {
+                    rc = BufferedWriter( NULL, cols[ alg_MATE_REF_NAME ].base.str, cols[ alg_MATE_REF_NAME ].len, NULL );
+                    if ( rc == 0 )
+                        rc = BufferedWriter( NULL, "\t", 1, NULL );
+                }
+                if ( rc == 0 )
+                    rc = KOutMsg( "%u\t", cols[ alg_MATE_REF_POS ].base.coord0[ 0 ] + 1 );
+            }
+            else
+            {
+                rc = BufferedWriter( NULL, "*\t0\t", 4, NULL );
+            }
+        }
+
+        /* TLEN: TEMPLATE_LEN */
+        if ( rc == 0 )
+            rc = KOutMsg( "%i\t", cols[ alg_TEMPLATE_LEN ].base.v ? cols[ alg_TEMPLATE_LEN ].base.i32[ 0 ] : 0 );
+
+        /* SEQ: READ */
+        if ( rc == 0 )
+            rc = BufferedWriter( NULL, read, readlen, NULL );
+        if ( rc == 0 )
+            rc = BufferedWriter( NULL, "\t", 1, NULL );
+
+        /* QUAL: SAM_QUALITY */
+        if ( rc == 0 )
+            rc = DumpQuality( qual, readlen, false, param->quantizeQual );
+    
+        /* optional fields: */
+        if ( rc == 0 && ds->type == edstt_EvidenceInterval )
+            rc = KOutMsg( "\tRG:Z:ALLELE_%u", readId + 1 );
+
+        if ( rc == 0 )
+        {
+            if ( readGroup )
+            {
+                rc = BufferedWriter( NULL, "\tRG:Z:", 6, NULL );
+                if ( rc == 0 )
+                    rc = BufferedWriter( NULL, readGroup, string_size( readGroup ), NULL );
+            }
+            else if ( cols[ alg_SPOT_GROUP ].len > 0 )
+            {
+                /* read group */
+                rc = BufferedWriter( NULL, "\tRG:Z:", 6, NULL );
+                if ( rc == 0 )
+                    rc = BufferedWriter( NULL, cols[ alg_SPOT_GROUP ].base.str, cols[ alg_SPOT_GROUP ].len, NULL );
+            }
+            else if ( cols[ alg_SEQ_SPOT_GROUP ].len > 0 )
+            {
+                /* backward compatibility */
+                rc = BufferedWriter( NULL, "\tRG:Z:", 6, NULL );
+                if ( rc == 0 )
+                    rc = BufferedWriter( NULL, cols[ alg_SEQ_SPOT_GROUP ].base.str, cols[ alg_SEQ_SPOT_GROUP ].len, NULL );
+            }
+        }
+
+        if ( rc == 0 && param->cg_style > 0 && cols[ alg_CG_TAGS_STR ].len > 0 )
+            rc = BufferedWriter( NULL, cols[ alg_CG_TAGS_STR ].base.str, cols[ alg_CG_TAGS_STR ].len, NULL );
+
+        if ( rc == 0 )
+        {
+            if ( param->cg_style > 0 && cols[ alg_ALIGN_GROUP ].len > 0 )
+            {
+                char const *ZI = cols[ alg_ALIGN_GROUP ].base.str;
+                unsigned i;
+                
+                for ( i = 0; rc == 0 && i < cols[ alg_ALIGN_GROUP ].len - 1; ++i )
+                {
+                    if ( ZI[ i ] == '_' )
+                    {
+                        rc = KOutMsg( "\tZI:i:%.*s\tZA:i:%.1s", i, ZI, ZI + i + 1 );
+                        break;
+                    }
+                }
+            }
+            else if ( ds->type == edstt_EvidenceAlignment && type == 1 )
+            {
+                rc = KOutMsg( "\tZI:i:%li\tZA:i:%u", cols[ alg_REF_ID ].base.i64[ readId ], cols[ alg_REF_PLOIDY ].base.u32[ readId ] );
+            }
+        }
+
+        /* align id */
+        if ( rc == 0 && param->xi )
+            rc = KOutMsg( "\tXI:i:%li", alignId );
+
+        /* hit count */
+        if ( rc == 0 && cols[alg_ALIGNMENT_COUNT].len )
+            rc = KOutMsg( "\tNH:i:%i", (int)cols[ alg_ALIGNMENT_COUNT ].base.u8[ readId ] );
+
+        /* edit distance */
+        if ( rc == 0 && cols[ alg_EDIT_DISTANCE ].len )
+            rc = KOutMsg( "\tNM:i:%i", cols[ alg_EDIT_DISTANCE ].base.i32[ readId ] );
+
+        if ( rc == 0 )
+            rc = KOutMsg( "\n" );
+    }
+    return rc;
+}
+
+
+static rc_t DumpUnalignedReads( SAM_dump_ctx_t *const ctx, SCol const calg_col[], int64_t row_id, uint64_t* rcount )
+{
+    rc_t rc = 0;
+    uint32_t i, nreads = 0;
+
+    if ( calg_col != NULL )
+    {
+        if ( calg_col[ alg_SAM_FLAGS ].base.u32[ 0 ] & 0x02 )
+        {
+            /* skip all aligned rows by flag */
+            return rc;
+        }
+        /* get primary alignments only */
+        rc = Cursor_Read( &ctx->seq, calg_col[ alg_SEQ_SPOT_ID ].base.i64[ 0 ], seq_PRIMARY_ALIGNMENT_ID, ~(unsigned)0 );
+        if ( rc == 0 )
+        {
+            for ( i = 0; i < ctx->seq.cols[ seq_PRIMARY_ALIGNMENT_ID ].len; i++ )
+            {
+                if ( ctx->seq.cols[ seq_PRIMARY_ALIGNMENT_ID ].base.i64[ i ] != 0 )
+                {
+                    if ( ctx->seq.cols[ seq_PRIMARY_ALIGNMENT_ID ].base.i64[ i ] < row_id )
+                    {
+                        /* unaligned were printed with 1st aligment */
+                        return rc;
+                    }
+                }
+                else
+                {
+                    nreads++;
+                }
+            }
+            if ( nreads == ctx->seq.cols[ seq_PRIMARY_ALIGNMENT_ID ].len )
+            {
+                /* skip all aligned rows by actual data, if flag above is not set properly */
+                return rc;
+            }
+            row_id = calg_col[ alg_SEQ_SPOT_ID ].base.i64[ 0 ];
+        }
+    }
+    if ( rc == 0 )
+    {
+        rc = Cursor_Read( &ctx->seq, row_id, 0, ~(unsigned)0 );
+        if ( rc == 0 )
+        {
+            unsigned non_empty_reads = 0;
+            
+            nreads = ctx->seq.cols[ seq_READ_LEN ].idx != 0 ? ctx->seq.cols[ seq_READ_LEN ].len : 1;
+
+            for( i = 0; i < nreads; i++ ) {
+                unsigned const readLen = ctx->seq.cols[ seq_READ_LEN ].idx
+                                       ? ctx->seq.cols[ seq_READ_LEN ].base.coord_len[ i ]
+                                       : 0;
+                
+                if (readLen)
+                    ++non_empty_reads;
+            }
+            for( i = 0; i < nreads; i++ )
+            {
+                INSDC_coord_zero readStart;
+                INSDC_coord_len readLen;
+
+                if ( ctx->seq.cols[ seq_PRIMARY_ALIGNMENT_ID ].idx != 0 && 
+                     ctx->seq.cols[ seq_PRIMARY_ALIGNMENT_ID ].base.i64[ i ] != 0 )
+                {
+                    continue;
+                }
+
+                if ( ctx->seq.cols[ seq_READ_TYPE ].idx != 0 && 
+                     !( ctx->seq.cols[ seq_READ_TYPE ].base.read_type[ i ] & SRA_READ_TYPE_BIOLOGICAL ) )
+                {
+                    continue;
+                }
+
+                readLen = ctx->seq.cols[ seq_READ_LEN ].idx ? 
+                            ctx->seq.cols[ seq_READ_LEN ].base.coord_len[ i ] :
+                            ctx->seq.cols[ seq_READ ].len;
+                if ( readLen == 0 )
+                {
+                    continue;
+                }
+
+                readStart = ctx->seq.cols[ seq_READ_START ].idx ?
+                                ctx->seq.cols[ seq_READ_START ].base.coord0[ i ] :
+                                0;
+                if ( param->fasta || param->fastq )
+                {
+                    rc = DumpUnalignedFastX( ctx->seq.cols, nreads > 1 ? i + 1 : 0, readStart, readLen, row_id );
+                }
+                else
+                {
+                    uint32_t cflags = 0x4;
+                    if ( param->reverse_unaligned )
+                    {
+                        if ( ctx->seq.cols[ seq_READ_TYPE ].base.read_type[ i ] & SRA_READ_TYPE_REVERSE )
+                        {
+                            cflags |= 0x10;
+                        }
+                        if ( ctx->seq.cols[ seq_READ_TYPE ].base.read_type[ i == nreads - 1 ? 0 : ( i + 1 ) ] & SRA_READ_TYPE_REVERSE )
+                        {
+                            cflags |= 0x20;
+                        }
+                    }
+                    if ( ctx->seq.cols[ seq_READ_FILTER ].idx != 0 )
+                    {
+                        if ( ctx->seq.cols[ seq_READ_FILTER ].base.read_filter[ i ] == SRA_READ_FILTER_REJECT )
+                        {
+                            cflags |= 0x200;
+                        }
+                        else if ( ctx->seq.cols[ seq_READ_FILTER ].base.read_filter[ i ] == SRA_READ_FILTER_CRITERIA )
+                        {
+                            cflags |= 0x400;
+                        }
+                    }
+                    if ( calg_col == NULL )
+                    {
+                        rc = DumpUnalignedSAM( ctx->seq.cols, cflags |
+                                          ( non_empty_reads > 1 ? ( 0x1 | 0x8 | ( i == 0 ? 0x40 : 0x00 ) | ( i == nreads - 1 ? 0x80 : 0x00 ) ) : 0x00 ),
+                                          readStart, readLen, NULL, 0, 0, ctx->readGroup, row_id );
+                    }
+                    else
+                    {
+                        int c = param->use_seqid ? alg_REF_SEQ_ID : alg_REF_NAME;
+                        uint16_t flags = cflags | 0x1 |
+                                         ( ( calg_col[ alg_SAM_FLAGS ].base.u32[ 0 ] & 0x10 ) << 1 ) |
+                                         ( ( calg_col[ alg_SAM_FLAGS ].base.u32[ 0 ] & 0x40 ) ? 0x80 : 0x40 );
+                        rc = DumpUnalignedSAM( ctx->seq.cols, flags, readStart, readLen,
+                                          calg_col[ c ].base.str, calg_col[ c ].len,
+                                          calg_col[ alg_REF_POS ].base.coord0[ 0 ] + 1, ctx->readGroup, row_id );
+                    }
+                }
+                *rcount = *rcount + 1;
+            }
+        }
+    }
+    return rc;
+}
+
+
+static bool AlignRegionFilter( SCol const *cols )
+{
+    if ( param->region_qty == 0 )
+        return true;
+    if ( cols[ alg_REF_NAME ].len != 0 || cols[ alg_REF_SEQ_ID ].len != 0 )
+    {
+        unsigned i;
+
+        assert( cols[ alg_REF_POS ].len == cols[ alg_REF_LEN ].len );
+
+        for ( i = 0; i < param->region_qty; i++ )
+        {
+            unsigned j;
+            
+            for ( j = 0; j < cols[ alg_REF_POS ].len; j++ )
+            {
+                unsigned const refStart_zero = cols[ alg_REF_POS ].base.coord0[ j ];
+                unsigned const refEnd_exclusive = refStart_zero + cols[ alg_REF_LEN ].base.coord_len[ j ];
+                unsigned k;
+                
+                for ( k = 0; k < param->region[ i ].rq; k++ )
+                {
+                    unsigned const from_zero = param->region[ i ].r[ k ].from;
+                    unsigned const to_inclusive = param->region[ i ].r[ k ].to;
+                    
+                    if ( from_zero < refEnd_exclusive && refStart_zero <= to_inclusive )
+                        return true;
+                }
+            }
+        }
+    }
+    return false;
+}
+
+
+static bool AlignDistanceFilter( SCol const *cols )
+{
+    if ( param->mp_dist_qty != 0 || param->mp_dist_unknown )
+    {
+        if ( cols[ alg_TEMPLATE_LEN ].len == 0 && param->mp_dist_unknown )
+        {
+            return true;
+        }
+        else
+        {
+            uint32_t i, j;
+            for( i = 0; i < param->mp_dist_qty; i++ )
+            {
+                for( j = 0; j < cols[ alg_TEMPLATE_LEN ].len; j++ )
+                {
+                    if ( ( cols[ alg_TEMPLATE_LEN ].base.i32[ j ] == 0 && param->mp_dist_unknown ) ||
+                         ( param->mp_dist[ i ].from <= cols[ alg_TEMPLATE_LEN ].base.i32[ j ] &&
+                         cols[ alg_TEMPLATE_LEN ].base.i32[ j ] <= param->mp_dist[ i ].to ) )
+                    {
+                        return true;
+                    }
+                }
+            }
+        }
+        return false;
+    }
+    return true;
+}
+
+
+typedef struct cgOp_s
+{
+    uint16_t length;
+    uint8_t type; /* 0: match, 1: insert, 2: delete */
+    char code;
+} cgOp;
+
+
+static void print_CG_cigar( int line, cgOp const op[], unsigned const ops, unsigned const gap[ 3 ] )
+{
+#if _DEBUGGING
+    unsigned i;
+    
+    SAM_DUMP_DBG( 3, ( "%5i: ", line ) );
+    for ( i = 0; i < ops; ++i )
+    {
+        if ( gap && ( i == gap[ 0 ] || i == gap[ 1 ] || i == gap[ 2 ] ) )
+        {
+            SAM_DUMP_DBG( 3, ( "%u%c", op[ i ].length, tolower( op[ i ].code ) ) );
+        }
+        else
+        {
+            SAM_DUMP_DBG( 3, ( "%u%c", op[ i ].length, toupper( op[ i ].code ) ) );
+        }
+    }
+    SAM_DUMP_DBG( 3, ( "\n" ) );
+#endif
+}
+
+/* gap contains the indices of the wobbles in op
+ * gap[0] is between read 1 and 2; it is the 'B'
+ * gap[1] is between read 2 and 3; it is an 'N'
+ * gap[2] is between read 3 and 4; it is an 'N'
+ */
+
+static rc_t CIGAR_to_CG_Ops( cgOp op[], unsigned const maxOps,
+                             unsigned *const opCnt,
+                             unsigned gap[ 3 ],
+                             char const cigar[], unsigned const ciglen,
+                             unsigned *const S_adjust,
+                             unsigned *const CG_adjust,
+                             unsigned const read,
+                             bool const reversed,
+			     bool * has_ref_offset_type)
+{
+    unsigned i;
+    unsigned ops = 0;
+    unsigned gapno;
+
+    *opCnt = 0;
+    *S_adjust = 0;
+    for ( i = 0; i < ciglen; ++ops )
+    {
+        char opChar=0;
+        int opLen=0;
+        int n;
+
+	for(n=0;n+i<ciglen && isdigit(cigar[n+i]);n++){
+		opLen = opLen * 10 + cigar[n+i] - '0';
+	}
+	if(n+i<ciglen){
+		opChar = cigar[n+i];
+		n++;
+	}
+        if ( ops + 1 >= maxOps )
+            return RC( rcExe, rcData, rcReading, rcBuffer, rcInsufficient );
+
+        i += n;
+        
+        op[ ops ].length = opLen;
+        op[ ops ].code = opChar;
+        switch ( opChar )
+        {
+        case 'M':
+        case '=':
+        case 'X':
+            op[ ops ].type = 0;
+            break;
+        case 'S':
+            *S_adjust += opLen;
+        case 'I':
+            op[ ops ].type = 1;
+            op[ ops ].code = 'I';
+            break;
+	case 'N':
+	    *has_ref_offset_type=true;
+        case 'D':
+            op[ ops ].type = 2;
+            break;
+        default:
+            return RC( rcExe, rcData, rcReading, rcConstraint, rcViolated );
+        }
+    }
+    *opCnt = ops;
+    gap[ 0 ] = gap[ 1 ] = gap[ 2 ] = ops;
+    print_CG_cigar( __LINE__, op, ops, NULL );
+    if ( ops < 3 )
+        return RC( rcExe, rcData, rcReading, rcFormat, rcNotFound ); /* CG pattern not found */
+
+    {
+        unsigned fwd = 0; /* 5 10 10 10 */
+        unsigned rev = 0; /* 10 10 10 5 */
+        unsigned acc; /* accumulated length */
+        
+        if ( ( read == 1 && !reversed ) || ( read == 2 && reversed ) )
+        {
+            for ( i = 0, acc = 0; i < ops  && acc <=5; ++i )
+            {
+                if ( op[ i ].type != 2 )
+                {
+                    acc += op[ i ].length;
+                    if ( acc == 5 && op[ i + 1 ].type == 1 )
+                    {
+                        fwd = i + 1;
+                        break;
+                    }
+                    else if ( acc > 5 )
+                    {
+                        unsigned const right = acc - 5;
+                        unsigned const left = op[ i ].length - right;
+                        
+                        memmove( &op[ i + 2 ], &op[ i ], ( ops - i ) * sizeof( op[ 0 ] ) );
+                        ops += 2;
+                        op[ i ].length = left;
+                        op[ i + 2 ].length = right;
+                        
+                        op[ i + 1 ].type = 1;
+                        op[ i + 1 ].code = 'B';
+                        op[ i + 1 ].length = 0;
+                        
+                        fwd = i + 1;
+                        break;
+                    }
+                }
+            }
+        }
+        else if ( ( read == 2 && !reversed ) || ( read == 1 && reversed ) )
+        {
+            for ( i = ops, acc = 0; i > 0 && acc <= 5; )
+            {
+                --i;
+                if ( op[ i ].type != 2 )
+                {
+                    acc += op[ i ].length;
+                    if ( acc == 5 && op[ i ].type == 1 )
+                    {
+                        rev = i;
+                        break;
+                    }
+                    else if ( acc > 5 )
+                    {
+                        unsigned const left = acc - 5;
+                        unsigned const right = op[ i ].length - left;
+                        
+                        memmove( &op[ i + 2 ], &op[ i ], ( ops - i ) * sizeof( op[ 0 ] ) );
+                        ops += 2;
+                        op[ i ].length = left;
+                        op[ i + 2 ].length = right;
+                        
+                        op[ i + 1 ].type = 1;
+                        op[ i + 1 ].code = 'B';
+                        op[ i + 1 ].length = 0;
+                         
+                        rev = i + 1;
+                        break;
+                    }
+                }
+            }
+        }
+        else
+        {
+            /* fprintf(stderr, "guessing layout\n"); */
+            for ( i = 0, acc = 0; i < ops  && acc <= 5; ++i )
+            {
+                if ( op[ i ].type != 2 )
+                {
+                    acc += op[ i ].length;
+                    if ( acc == 5 && op[ i + 1 ].type == 1 )
+                    {
+                        fwd = i + 1;
+                    }
+                }
+            }
+            for ( i = ops, acc = 0; i > 0 && acc <= 5; )
+            {
+                --i;
+                if ( op[ i ].type != 2 )
+                {
+                    acc += op[ i ].length;
+                    if ( acc == 5 && op[i].type == 1 )
+                    {
+                        rev = i;
+                    }
+                }
+            }
+            if ( ( fwd == 0 && rev == 0 ) || ( fwd != 0 && rev != 0 ) )
+            {
+                if(!(*has_ref_offset_type)) for ( i = 0; i < ops; ++i )
+                {
+                    if ( op[ i ].type == 2 )
+                    {
+                        op[ i ].code = 'N';
+                        *CG_adjust += op[ i ].length;
+                    }
+                }
+                return RC( rcExe, rcData, rcReading, rcFormat, rcNotFound ); /* CG pattern not found */
+            }
+        }
+        if ( fwd && op[ fwd ].type == 1 )
+        {
+            for ( i = ops, acc = 0; i > fwd + 1; )
+            {
+                --i;
+                if ( op[ i ].type != 2 )
+                {
+                    acc += op[ i ].length;
+                    if ( acc >= 10 )
+                    {
+                        if ( acc > 10 )
+                        {
+                            unsigned const r = 10 + op[ i ].length - acc;
+                            unsigned const l = op[ i ].length - r;
+                            
+                            if ( ops + 2 >= maxOps )
+                                return RC( rcExe, rcData, rcReading, rcBuffer, rcInsufficient );
+                            memmove( &op[ i + 2 ], &op[ i ], ( ops - i ) * sizeof( op[ 0 ] ) );
+                            ops += 2;
+                            op[ i + 2 ].length = r;
+                            op[ i ].length = l;
+                            
+                            op[ i + 1 ].length = 0;
+                            op[ i + 1 ].type = 2;
+                            op[ i + 1 ].code = 'N';
+                            i += 2;
+                        }
+                        else if ( i - 1 > fwd )
+                        {
+                            if ( op[ i - 1 ].type == 2 )
+                                 op[ i - 1 ].code = 'N';
+                            else
+                            {
+                                if ( ops + 1 >= maxOps )
+                                    return RC( rcExe, rcData, rcReading, rcBuffer, rcInsufficient );
+                                memmove( &op[ i + 1 ], &op[ i ], ( ops - i ) * sizeof( op[ 0 ] ) );
+                                ops += 1;
+                                op[ i ].length = 0;
+                                op[ i ].type = 2;
+                                op[ i ].code = 'N';
+                                i += 1;
+                            }
+                        }
+                        acc = 0;
+                    }
+                }
+            }
+            /** change I to B+M **/
+            op[ fwd ].code = 'B';
+            memmove( &op[ fwd + 1 ], &op[ fwd ], ( ops - fwd ) * sizeof( op[ 0 ] ) );
+            ops += 1;
+            op[ fwd + 1 ].code = 'M';
+            *opCnt = ops;
+            /** set the gaps now **/
+            for ( gapno = 3, i = ops; gapno > 1 && i > 0; )
+            {
+                --i;
+                if ( op[ i ].code == 'N' )
+                    gap[ --gapno ] = i;
+            }
+            gap[ 0 ] = fwd;
+            print_CG_cigar( __LINE__, op, ops, gap );
+            return 0;
+        }
+        if ( rev && op[ rev ].type == 1 )
+        {
+            for ( acc = i = 0; i < rev; ++i )
+            {
+                if ( op[ i ].type != 2 )
+                {
+                    acc += op[ i ].length;
+                    if ( acc >= 10 )
+                    {
+                        if ( acc > 10 )
+                        {
+                            unsigned const l = 10 + op[ i ].length - acc;
+                            unsigned const r = op[ i ].length - l;
+                            
+                            if ( ops + 2 >= maxOps )
+                                return RC( rcExe, rcData, rcReading, rcBuffer, rcInsufficient );
+                            memmove( &op[ i + 2 ], &op[ i ], ( ops - i ) * sizeof( op[ 0 ] ) );
+                            ops += 2;
+                            op[ i + 2 ].length = r;
+                            op[ i ].length = l;
+                            
+                            op[ i + 1 ].length = 0;
+                            op[ i + 1 ].type = 2;
+                            op[ i + 1 ].code = 'N';
+                            rev += 2;
+                            i += 2;
+                        }
+                        else if ( i + 1 < rev )
+                        {
+                            if ( op[ i + 1 ].type == 2)
+                                 op[ i + 1 ].code = 'N';
+                            else
+                            {
+                                if ( ops + 1 >= maxOps )
+                                    return RC( rcExe, rcData, rcReading, rcBuffer, rcInsufficient );
+                                memmove( &op[ i + 1 ], &op[ i ], ( ops - i ) * sizeof( op[ 0 ] ) );
+                                ops += 1;
+                                op[ i + 1 ].length = 0;
+                                op[ i + 1 ].type = 2;
+                                op[ i + 1 ].code = 'N';
+                                rev += 1;
+                                i += 1;
+                            }
+                        }
+                        acc = 0;
+                    }
+                }
+            }
+            for ( gapno = 3, i = 0; gapno > 1 && i < ops; ++i )
+            {
+                if ( op[ i ].code == 'N' )
+                    gap[ --gapno ] = i;
+            }
+            gap[ 0 ] = rev;
+            op[ rev ].code = 'B';
+            memmove( &op[ rev + 1 ], &op[ rev ], ( ops - rev ) * sizeof( op[ 0 ] ) );
+            ops += 1;
+            op[ rev + 1 ].code = 'M';
+            *opCnt = ops;
+            print_CG_cigar( __LINE__, op, ops, gap );
+            return 0;
+        }
+    }
+    return RC( rcExe, rcData, rcReading, rcFormat, rcNotFound ); /* CG pattern not found */
+}
+
+
+static rc_t GenerateCGData( SCol cols[], unsigned style )
+{
+    rc_t rc = 0;
+    
+    memset( &cols[ alg_CG_TAGS_STR], 0, sizeof( cols[ alg_CG_TAGS_STR ] ) );
+    
+    if ( cols[ alg_READ ].len == 35 && cols[ alg_SAM_QUALITY ].len == 35 )
+    {
+        static char newCIGAR[ 35 * 11 ];
+        static int32_t newEditDistance;
+        unsigned gap[ 3 ] = { 0, 0, 0 };
+        cgOp cigOp[ 35 ];
+        unsigned opCnt;
+        unsigned i;
+        unsigned j;
+        size_t sz;
+        unsigned S_adjust = 0;
+        unsigned CG_adjust = 0;
+        unsigned const read = cols[ alg_SEQ_READ_ID ].len && cols[ alg_REVERSED ].len ? cols[ alg_SEQ_READ_ID ].base.coord1[ 0 ] : 0;
+        bool const reversed = cols[ alg_REVERSED ].len ? cols[ alg_REVERSED ].base.u8[ 0 ] : false;
+	bool has_ref_offset_type = false;
+        
+        rc = CIGAR_to_CG_Ops( cigOp, sizeof( cigOp ) / sizeof( cigOp[ 0 ] ), &opCnt, gap,
+                              cols[ alg_CIGAR ].base.str, cols[ alg_CIGAR ].len,
+                              &S_adjust, &CG_adjust, read, reversed, &has_ref_offset_type );
+        if ( GetRCState( rc ) == rcNotFound && GetRCObject( rc ) == rcFormat )
+        {
+            rc = 0;
+            if ( style == 1 )
+                goto CLEAN_CIGAR;
+            else
+                goto PRINT_CIGAR;
+        }
+        if ( rc != 0 )
+            return 0;
+
+        if ( !has_ref_offset_type && CG_adjust == 0 )
+            CG_adjust = ( gap[ 0 ] < opCnt ? cigOp[ gap[ 0 ] ].length : 0 )
+                      + ( gap[ 1 ] < opCnt ? cigOp[ gap[ 1 ] ].length : 0 )
+                      + ( gap[ 2 ] < opCnt ? cigOp[ gap[ 2 ] ].length : 0 );
+
+        print_CG_cigar( __LINE__, cigOp, opCnt, NULL );
+        if ( style == 1 )
+        {
+            static char newSeq[ 35 ];
+            static char newQual[ 35 ];
+            static char tags[ 35*22 + 1 ];
+            unsigned const B_len = cigOp[ gap[ 0 ] ].length;
+            unsigned const B_at = gap[ 0 ] < gap[ 2 ] ? 5 : 30;
+            
+            if ( 0 < B_len && B_len < 5 )
+            {
+                memcpy( newSeq, cols[ alg_READ ].base.v, 35 );
+                memcpy( newQual, cols[ alg_SAM_QUALITY ].base.v, 35 );
+                
+                cols[ alg_CG_TAGS_STR ].base.v = tags;
+                
+                cols[ alg_READ ].base.v = newSeq;
+                cols[ alg_READ ].len = 35 - B_len;
+                
+                cols[ alg_SAM_QUALITY ].base.v = newQual;
+                cols[ alg_SAM_QUALITY ].len = 35 - B_len;
+                
+                /* nBnM -> nB0M */
+                cigOp[ gap[ 0 ] + 1 ].length -= B_len;
+                if ( gap[ 0 ] < gap[ 2 ] )
+                {
+                    rc = string_printf( tags, sizeof( tags ), &sz, "\tGC:Z:%uS%uG%uS\tGS:Z:%.*s\tGQ:Z:%.*s",
+                        5 - B_len, B_len, 30 - B_len, 2 * B_len, &newSeq[ 5 - B_len ], 2 * B_len, &newQual[ 5 - B_len ] );
+                    if ( rc == 0 )
+                    {
+                        cols[ alg_CG_TAGS_STR ].len = sz;
+                    }
+                    memmove( &cigOp[ gap[ 0 ] ],
+                             &cigOp[ gap[ 0 ] + 1 ],
+                             ( opCnt - ( gap[ 0 ] + 1 ) ) * sizeof( cigOp[ 0 ] ) );
+                    --opCnt;
+                }
+                else
+                {
+                    rc = string_printf( tags, sizeof( tags ), &sz, "\tGC:Z:%uS%uG%uS\tGS:Z:%.*s\tGQ:Z:%.*s",
+                        30 - B_len, B_len, 5 - B_len, 2 * B_len, &newSeq[ 30 - B_len ], 2 * B_len, &newQual[ 30 - B_len ] );
+                    if ( rc == 0 )
+                    {
+                        cols[ alg_CG_TAGS_STR ].len = sz;
+                    }
+                    memmove( &cigOp[ gap[ 0 ] ],
+                             &cigOp[ gap[ 0 ] + 1 ],
+                             ( opCnt - ( gap[ 0 ] + 1 ) ) * sizeof( cigOp[ 0 ] ) );
+                    --opCnt;
+                }
+                if ( rc == 0 )
+                {
+                    for ( i = B_at; i < B_at + B_len; ++i )
+                    {
+                        int const Lq = newQual[ i - B_len ];
+                        int const Rq = newQual[ i ];
+
+                        if ( Lq <= Rq )
+                        {
+                            newSeq[ i - B_len ] = newSeq[ i ];
+                            newQual[ i - B_len ] = Rq;
+                        }
+                        else
+                        {
+                            newSeq[ i ] = newSeq[ i - B_len ];
+                            newQual[ i ] = Lq;
+                        }
+                    }
+                    memmove( &newSeq [ B_at ], &newSeq [ B_at + B_len ], 35 - B_at - B_len );
+                    memmove( &newQual[ B_at ], &newQual[ B_at + B_len ], 35 - B_at - B_len );
+                }
+            }
+            else
+            {
+                int len = cigOp[ gap[ 0 ] ].length;
+                
+                cigOp[ gap[ 0 ] ].code = 'I';
+                for (i = gap[0] + 1; i < opCnt && len > 0; ++i) {
+                    if (cigOp[i].length <= len){
+                        len -= cigOp[i].length;
+                        cigOp[i].length = 0;
+                    }
+                    else {
+                        cigOp[i].length -= len;
+                        len = 0;
+                    }
+                }
+                if(!has_ref_offset_type) CG_adjust -= cigOp[ gap[ 0 ] ].length;
+            }
+        }
+        if ( rc == 0 )
+        {
+        PRINT_CIGAR:
+        CLEAN_CIGAR:
+            print_CG_cigar( __LINE__, cigOp, opCnt, NULL );
+            /* remove zero length ops */
+            for ( j = i = 0; i < opCnt; )
+            {
+                if ( cigOp[ j ].length == 0)
+                {
+                    ++j;
+                    --opCnt;
+                    continue;
+                }
+                cigOp[ i++ ] = cigOp[ j++ ];
+            }
+            print_CG_cigar( __LINE__, cigOp, opCnt, NULL );
+            if ( cols[ alg_EDIT_DISTANCE ].len )
+            {
+                int const edit_distance = cols[ alg_EDIT_DISTANCE ].base.i32[ 0 ];
+                int const adjusted = edit_distance + S_adjust - CG_adjust;
+            
+                newEditDistance = adjusted > 0 ? adjusted : 0;
+                SAM_DUMP_DBG( 4, ( "NM: before: %u, after: %u(+%u-%u)\n", edit_distance, newEditDistance, S_adjust, CG_adjust ) );
+                cols[ alg_EDIT_DISTANCE ].base.v = &newEditDistance;
+                cols[ alg_EDIT_DISTANCE ].len = 1;
+            }
+            /* merge adjacent ops */
+            for ( i = opCnt; i > 1; )
+            {
+                --i;
+                if ( cigOp[ i - 1 ].code == cigOp[ i ].code )
+                {
+                    cigOp[ i - 1 ].length += cigOp[ i ].length;
+                    memmove( &cigOp[ i ], &cigOp[ i + 1 ], ( opCnt - 1 - i ) * sizeof( cigOp[ 0 ] ) );
+                    --opCnt;
+                }
+            }
+            print_CG_cigar( __LINE__, cigOp, opCnt, NULL );
+            for ( i = j = 0; i < opCnt && rc == 0; ++i )
+            {
+                rc = string_printf( &newCIGAR[ j ], sizeof( newCIGAR ) - j, &sz, "%u%c", cigOp[ i ].length, cigOp[ i ].code);
+                j += sz;
+            }
+            cols[ alg_CIGAR ].base.v = newCIGAR;
+            cols[ alg_CIGAR ].len = j;
+        }
+    }
+    return rc;
+}
+
+
+static bool DumpAlignedRow( SAM_dump_ctx_t *const ctx, DataSource *const ds,
+                    int64_t row,
+                    bool const primary,
+                    int const cg_style,
+                    rc_t *prc )
+{
+    rc_t rc = 0;
+    
+    /* if SEQ_SPOT_ID is open then skip rows with no SEQ_SPOT_ID */
+    if ( ds->cols[ alg_SEQ_SPOT_ID ].idx )
+    {
+        rc = Cursor_Read( ds, row, alg_SEQ_SPOT_ID, 1 );
+        if ( rc != 0 )
+        {
+            if ( !( GetRCObject( rc ) == rcRow && GetRCState( rc ) == rcNotFound ) )
+                *prc = rc;
+            return false;
+        }
+        if ( ds->cols[ alg_SEQ_SPOT_ID ].len == 0 ||
+             ds->cols[ alg_SEQ_SPOT_ID ].base.i64[ 0 ] == 0 )
+            return false;
+    }
+
+    /* skip rows that fail mate distance filter */
+    if ( param->mp_dist_qty != 0 || param->mp_dist_unknown )
+    {
+        rc = Cursor_Read( ds, row, alg_TEMPLATE_LEN, 1 );
+        if ( rc != 0 )
+        {
+            if ( !( GetRCObject( rc ) == rcRow && GetRCState( rc ) == rcNotFound ) )
+                *prc = rc;
+            return false;
+        }
+        if ( !AlignDistanceFilter( ds->cols ) )
+            return false;
+    }
+
+    rc = Cursor_ReadAlign( &ds->curs, row, ds->cols, 0 );
+    if ( rc != 0 )
+    {
+        if ( !( GetRCObject( rc ) == rcRow && GetRCState( rc ) == rcNotFound ) )
+            *prc = rc;
+        return false;
+    }
+
+    if ( param->fasta || param->fastq )
+    {
+        unsigned const read_id = ds->cols[ alg_SEQ_READ_ID ].base.v ? ds->cols[ alg_SEQ_READ_ID ].base.coord1[ 0 ] : 0;
+        
+        rc = DumpAlignedFastX( ctx->pri.cols, row, read_id, primary, false );
+    }
+    else
+    {
+        if ( cg_style != 0 )
+        {
+            rc = GenerateCGData( ds->cols, cg_style );
+            if ( rc != 0 )
+            {
+                *prc = rc;
+                return false;
+            }
+        }
+        rc = DumpAlignedSAM(ctx, ds, row, ctx->readGroup, 0 );
+    }
+    *prc = rc;
+    return true;
+}
+
+
+static rc_t DumpAlignedRowList( SAM_dump_ctx_t *const ctx, DataSource *const ds, SCol const *const ids,
+                        int64_t *rcount,
+                        bool const primary,
+                        int const cg_style,
+                        bool const noFilter )
+{
+    rc_t rc;
+    unsigned i;
+    unsigned const n = ids->len;
+
+    for ( i = 0; ( rc = Quitting() ) == 0 && i < n; ++i )
+    {
+        int64_t const row = ids->base.i64[ i ];
+
+        if ( ! noFilter )
+            rc = Cursor_Read( ds, row, alg_REGION_FILTER, ~(unsigned)0 );
+
+        if ( rc == 0 )
+        {
+            if ( noFilter || AlignRegionFilter(ds->cols) )
+            {
+                if ( DumpAlignedRow( ctx, ds, row, primary, cg_style, &rc ) )
+                    ++*rcount;
+                if ( rc != 0 )
+                    break;
+            }
+        }
+    }
+    return rc;
+}
+
+static rc_t DumpAlignedRowListIndirect( SAM_dump_ctx_t *const ctx,
+                                DataSource *const indirectSource,
+                                DataSource *const directSource,
+                                SCol const *const directIDs,
+                                int64_t *rcount,
+                                bool const primary,
+                                int const cg_style )
+{
+    unsigned i;
+
+    for ( i = 0; i < directIDs->len; ++i )
+    {
+        int64_t const row = directIDs->base.i64[ i ];
+        rc_t rc = Cursor_Read( directSource, row, alg_REGION_FILTER, ~(unsigned)0 );
+        
+        if ( rc != 0 )
+            return rc;
+        
+        if ( !AlignRegionFilter( directSource->cols ) )
+            continue;
+            
+        rc = Cursor_Read( directSource, row, alg_EVIDENCE_ALIGNMENT_IDS, 1 );
+        if ( rc != 0 )
+            return rc;
+        
+        rc = DumpAlignedRowList( ctx, indirectSource, &directSource->cols[ alg_EVIDENCE_ALIGNMENT_IDS ],
+                                 rcount, primary, cg_style, true );
+        if ( rc != 0 )
+            return rc;
+    }
+    return 0;
+}
+
+
+enum e_tables
+{
+    primary_alignment,
+    secondary_alignment,
+    evidence_interval,
+    evidence_alignment
+};
+
+enum e_IDS_opts
+{
+    primary_IDS             = ( 1 << primary_alignment ),
+    secondary_IDS           = ( 1 << secondary_alignment ),
+    evidence_interval_IDS   = ( 1 << evidence_interval ),
+    evidence_alignment_IDS  = ( 1 << evidence_alignment )
+};
+
+
+static rc_t DumpAlignedRowList_cb( SAM_dump_ctx_t *const ctx, TAlignedRegion const *const rgn,
+                                   int options, int which, int64_t *rcount, SCol const *const IDS )
+{
+    /*SAM_DUMP_DBG(2, ("row %s index range is [%lu:%lu] pos %lu\n",
+        param->region[r].name, start, start + count - 1, cur_pos));*/
+    switch ( which )
+    {
+    case primary_IDS:
+        return DumpAlignedRowList( ctx, &ctx->pri, IDS, rcount, true, param->cg_style, false );
+
+    case secondary_IDS:
+        return DumpAlignedRowList( ctx, &ctx->sec, IDS, rcount, false, param->cg_style, false );
+
+    case evidence_interval_IDS:
+        {
+            rc_t rc = 0;
+
+            if ( ( options & evidence_interval_IDS ) != 0 )
+                rc = DumpAlignedRowList( ctx, &ctx->evi, IDS, rcount, true, 0, false );
+
+            if ( rc == 0 && ( options & evidence_alignment_IDS ) != 0 )
+                rc = DumpAlignedRowListIndirect( ctx, &ctx->eva, &ctx->evi, IDS, rcount, true, param->cg_style );
+
+            return rc;
+        }
+    }
+    return RC( rcExe, rcTable, rcReading, rcParam, rcUnexpected );
+}
+
+
+typedef struct CigOps{
+	char op;
+	int8_t	 ref_sign; /*** 0;+1;-1; ref_offset = ref_sign * offset ***/
+	int8_t	 seq_sign; /*** 0;+1;-1; seq_offset = seq_sign * offset ***/
+	uint32_t oplen;
+} CigOps;
+
+static void SetCigOp(CigOps *dst,char op,uint32_t oplen)
+{
+	dst->op    = op;
+	dst->oplen = oplen;
+	switch(op) { /*MX= DN B IS PH*/
+	 case 'M': case 'X': case '=':
+		dst->ref_sign=+1;
+		dst->seq_sign=+1;
+		break;
+	 case 'D': case 'N':
+		dst->ref_sign=+1;
+                dst->seq_sign= 0;
+                break;
+	 case 'B': 
+		dst->ref_sign=-1;
+                dst->seq_sign= 0;
+                break;
+	 case 'S': case 'I':
+		dst->ref_sign= 0;
+                dst->seq_sign=+1;
+                break;
+	 case 'P': case 'H':
+	  case 0: /** terminating op **/
+		dst->ref_sign= 0;
+                dst->seq_sign= 0;
+                break;
+	  default:
+		assert(0);
+                break;
+	}
+}
+
+static unsigned ExplodeCIGAR( CigOps dst[], unsigned len, char const cigar[], unsigned ciglen )
+{
+    unsigned i;
+    unsigned j;
+    int opLen;
+    
+    for ( i = j = opLen=0; i < ciglen; i++) {
+	if(isdigit(cigar[i])){
+		opLen = opLen * 10 + cigar[i] - '0';
+	} else {
+		assert(isalpha(cigar[i]));
+		SetCigOp(dst+j,cigar[i],opLen);
+		opLen=0;
+		j++;
+	}
+    }
+    SetCigOp(dst+j,0,0);
+    j++;
+    return j;
+}
+
+
+#define CG_CIGAR_STRING_MAX (35 * 11 + 1)
+
+
+#if 0
+static unsigned FormatCIGAR( char dst[], unsigned cp, unsigned oplen, int opcode )
+{
+    size_t sz;
+    string_printf( dst + cp, CG_CIGAR_STRING_MAX - cp, &sz, "%u%c", oplen, opcode );
+    return sz;
+}
+
+
+static unsigned DeletedCIGAR( char dst[], unsigned const cp, int opcode, unsigned D,
+                              uint32_t const Op[], int ri, unsigned len )
+{
+    unsigned i;
+    unsigned curPos = 0;
+    int curOp = opcode;
+    unsigned oplen = 0;
+    
+    for ( i = 0; i < D && ri < len; ++i, ++ri )
+    {
+        uint32_t const op = Op[ ri ];
+        int const d = op >> 2;
+        int const m = op & 1;
+        int const nxtOp = m ? opcode : 'P';
+        
+        if ( d != 0 )
+        {
+            if ( oplen != 0 )
+                curPos += FormatCIGAR( dst, curPos + cp, oplen, curOp );
+            curPos += FormatCIGAR( dst, cp, d, 'D' );
+            oplen = 0;
+        }
+        if ( oplen == 0 || nxtOp == curOp )
+        {
+            ++oplen;
+        }
+        else
+        {
+            curPos += FormatCIGAR( dst, curPos + cp, oplen, curOp );
+            oplen = 1;
+        }
+        curOp = nxtOp;
+    }
+
+    if ( oplen != 0 && curOp != opcode)
+    {
+        curPos += FormatCIGAR( dst, curPos + cp, oplen, curOp );
+        oplen = 0;
+    }
+    if ( i < D )
+        oplen += D - i;
+    if ( oplen )
+        curPos += FormatCIGAR( dst, curPos + cp, oplen, opcode );
+    return curPos;
+}
+#endif
+
+static char merge_M_type_ops(char a,char b)
+{ /*MX=*/
+	char c=0;
+	switch(b){
+	 case 'X':
+		switch(a){
+		 case '=': c='X'; break;
+		 case 'X': c='M'; break; /**we don't know - 2X may create '=' **/
+		 case 'M': c='M'; break;
+		}
+		break;
+	 case 'M':
+		c='M';
+		break;
+	 case '=':
+		c=a;
+		break;
+	}
+	assert(c!=0);
+	return c;
+}
+
+
+static unsigned CombineCIGAR( char dst[], CigOps const seqOp[], unsigned seq_len,
+                              int refPos, CigOps const refOp[], unsigned ref_len )
+{
+    bool     done=false;
+    unsigned ciglen=0,last_ciglen=0;
+    char     last_cig_op;
+    uint32_t last_cig_oplen=0;
+    int	     si=0,ri=0;
+    CigOps   seq_cop={0,0,0,0},ref_cop={0,0,0,0};
+    int	     seq_pos=0; /** seq_pos is tracked roughly - with every extraction from seqOp **/
+    int      ref_pos=0; /** ref_pos is tracked precisely - with every delta and consumption in cigar **/
+    int	     delta=refPos; /*** delta in relative positions of seq and ref **/
+			   /*** when delta < 0 - rewind or extend the reference ***/
+			   /*** wher delta > 0 - skip reference  ***/
+#define MACRO_BUILD_CIGAR(OP,OPLEN) \
+	if( last_cig_oplen > 0 && last_cig_op == OP){							\
+                last_cig_oplen += OPLEN;								\
+                ciglen = last_ciglen + sprintf(dst+last_ciglen,"%d%c",last_cig_oplen,last_cig_op);	\
+        } else {											\
+                last_ciglen = ciglen;									\
+                last_cig_oplen = OPLEN;									\
+                last_cig_op    = OP;									\
+                ciglen = ciglen      + sprintf(dst+last_ciglen,"%d%c",last_cig_oplen,last_cig_op);	\
+        }
+    while(!done){
+	while(delta < 0){ 
+		ref_pos += delta; /** we will make it to back up this way **/
+		if(ri > 0){ /** backing up on ref if possible ***/
+			int avail_oplen = refOp[ri-1].oplen - ref_cop.oplen;
+			if(avail_oplen > 0 ){
+				if((-delta) <= avail_oplen * ref_cop.ref_sign){ /*** rewind within last operation **/
+					ref_cop.oplen -= delta;
+					delta -= delta * ref_cop.ref_sign;
+				} else { /*** rewind the whole ***/
+					ref_cop.oplen += avail_oplen;
+					delta += avail_oplen * ref_cop.ref_sign;
+				}
+			} else {
+				ri--;
+				/** pick the previous as used up **/
+				ref_cop = refOp[ri-1];
+				ref_cop.oplen =0; 
+			}
+		} else { /** extending the reference **/
+			SetCigOp(&ref_cop,'=',ref_cop.oplen - delta);
+			delta = 0;
+		}
+		ref_pos -= delta; 
+	}
+	if(ref_cop.oplen == 0){ /*** advance the reference ***/
+		ref_cop = refOp[ri++];
+		if(ref_cop.oplen == 0) { /** extending beyond the reference **/
+			SetCigOp(&ref_cop,'=',1000);
+		}
+		assert(ref_cop.oplen > 0 );
+	}
+	if(delta > 0){ /***  skip refOps ***/
+		ref_pos += delta; /** may need to back up **/
+		if(delta >=  ref_cop.oplen){ /** full **/
+			delta -= ref_cop.oplen * ref_cop.ref_sign;
+			ref_cop.oplen = 0;
+		} else { /** partial **/
+			ref_cop.oplen -= delta;
+			delta -= delta * ref_cop.ref_sign;
+		}
+		ref_pos -= delta; /** if something left - restore ***/
+		continue;
+	}
+	/*** seq and ref should be synchronized here **/
+	assert(delta == 0);
+	if(seq_cop.oplen == 0){ /*** advance sequence ***/
+		if(seq_pos < seq_len){
+			seq_cop = seqOp[si++];
+			assert(seq_cop.oplen > 0 );
+			seq_pos += seq_cop.oplen * seq_cop.seq_sign;
+		} else {
+			done=true;
+		}
+	}
+        if(!done){
+		int seq_seq_step = seq_cop.oplen * seq_cop.seq_sign; /** sequence movement**/
+		int seq_ref_step = seq_cop.oplen * seq_cop.ref_sign; /** influence of sequence movement on intermediate reference **/
+		int ref_seq_step = ref_cop.oplen * ref_cop.seq_sign; /** movement of the intermediate reference ***/
+		int ref_ref_step = ref_cop.oplen * ref_cop.ref_sign; /** influence of the intermediate reference movement on final reference ***/
+		assert( ref_ref_step >= 0); /** no B in the reference **/
+		if( seq_ref_step <= 0){ /** BSIPH in the sequence against anything ***/
+			MACRO_BUILD_CIGAR( seq_cop.op, seq_cop.oplen );
+			seq_cop.oplen = 0;
+			delta = seq_ref_step; /** if negative - will force rewind next cycle **/
+		} else if(ref_ref_step <= 0){ /** MX=DN against SIPH in the reference***/
+			if(ref_seq_step == 0){ /** MX=DN against PH **/
+				MACRO_BUILD_CIGAR( ref_cop.op,ref_cop.oplen);
+				ref_cop.oplen = 0;
+			} else {
+				int min_len = (seq_cop.oplen<ref_cop.oplen)?seq_cop.oplen:ref_cop.oplen;
+				if(seq_seq_step == 0){ /** DN agains SI **/
+					MACRO_BUILD_CIGAR('P',min_len);
+				} else { /** MX= agains SI ***/
+					MACRO_BUILD_CIGAR( ref_cop.op,min_len);
+				}
+				seq_cop.oplen -= min_len;
+				ref_cop.oplen -= min_len;
+			}
+		} else { /*MX=DN  against MX=DN*/
+			int min_len = (seq_cop.oplen<ref_cop.oplen)?seq_cop.oplen:ref_cop.oplen;
+			if(seq_seq_step == 0){ /* DN against MX=DN */
+				if(ref_seq_step == 0){ /** padding DN against DN **/
+					MACRO_BUILD_CIGAR('P',min_len);
+					ref_cop.oplen -= min_len;
+					seq_cop.oplen -= min_len;
+				} else { /* DN against MX= **/
+					MACRO_BUILD_CIGAR(seq_cop.op,min_len);
+					seq_cop.oplen -= min_len;
+				}
+			} else if (ref_cop.seq_sign == 0){ /* MX= against DN - always wins */
+				MACRO_BUILD_CIGAR(ref_cop.op,min_len);
+				ref_cop.oplen -= min_len;
+			} else { /** MX= against MX= ***/
+				MACRO_BUILD_CIGAR(merge_M_type_ops(seq_cop.op,ref_cop.op),min_len);
+				ref_cop.oplen -= min_len;
+				seq_cop.oplen -= min_len;
+			}
+			ref_pos += min_len;
+		}
+        }
+    }
+    return ciglen;
+}
+
+
+static rc_t DumpCGSAM( SAM_dump_ctx_t *const ctx, TAlignedRegion const *const rgn, int options,
+                       int which, int64_t *rows, SCol const *const ids )
+{
+    if ( which == evidence_interval_IDS )
+    {
+        rc_t rc = 0;
+        unsigned i;
+        
+        for ( i = 0; i < ids->len; ++i )
+        {
+            int64_t const rowInterval = ids->base.i64[ i ];
+
+            rc = Cursor_Read( &ctx->evi, rowInterval, alg_REGION_FILTER, ~(0u) );
+            if ( rc == 0 )
+            {
+                if ( AlignRegionFilter( ctx->evi.cols ) )
+                {
+                    rc = Cursor_ReadAlign( &ctx->evi.curs, rowInterval, ctx->evi.cols, 0 );
+                    if ( rc == 0 )
+                    {
+                        unsigned const evidence = ctx->evi.cols[ alg_EVIDENCE_ALIGNMENT_IDS ].len;
+                        if ( evidence != 0 )
+                        {
+                            INSDC_coord_len const *const refLen = ctx->evi.cols[ alg_READ_LEN ].base.coord_len;
+                            INSDC_coord_len const *const cigLen = ctx->evi.cols[ alg_CIGAR_LEN ].base.coord_len;
+                            unsigned const ploids = ctx->evi.cols[ alg_CIGAR_LEN ].len;
+                            unsigned const totalIntervalReadLen = ctx->evi.cols[ alg_READ ].len;
+			    CigOps  refCigOps_stack[1024];
+			    CigOps *refCigOps_heap=NULL;
+                            CigOps *refCigOps;
+
+			    if( totalIntervalReadLen > 1000){
+				refCigOps=refCigOps_heap = malloc( sizeof( refCigOps[ 0 ] ) * (totalIntervalReadLen+ploids) );
+			    } else {
+				refCigOps=refCigOps_stack;
+			    }
+                            
+                            if ( refCigOps != NULL )
+                            {
+                                unsigned j;
+                                unsigned start;
+                                unsigned cigop_starts[256];
+                                
+                                assert(ploids < 256);
+                                
+                                for ( start = j = 0, cigop_starts[0]=0; j < ploids; ++j )
+                                {
+                                    unsigned len = cigLen[ j ];
+                                    cigop_starts[j+1] = cigop_starts[j] + ExplodeCIGAR( refCigOps + cigop_starts[j], refLen[ j ], 
+                                                                                       ctx->evi.cols[ alg_CIGAR ].base.str + start, len );
+                                    start += len;
+                                }
+                                
+                                for ( j = 0; j < evidence; ++j )
+                                {
+                                    int64_t const rowAlign = ctx->evi.cols[ alg_EVIDENCE_ALIGNMENT_IDS ].base.i64[ j ];
+                                    
+                                    rc = Cursor_ReadAlign( &ctx->eva.curs, rowAlign, ctx->eva.cols, 0 );
+                                    if ( rc == 0 )
+                                    {
+                                        if(param->cg_style != 0)
+                                            rc = GenerateCGData( ctx->eva.cols, param->cg_style );
+                                        if ( rc == 0 )
+                                        {
+                                            int const ploidy = ctx->eva.cols[ alg_REF_PLOIDY ].base.u32[ 0 ];
+                                            int const readLen = ctx->eva.cols[ alg_READ ].len;
+                                            INSDC_coord_zero refPos = ctx->eva.cols[ alg_REF_POS ].base.coord0[ 0 ];
+                                            CigOps op[ 36 ];
+                                            char cigbuf[ CG_CIGAR_STRING_MAX ];
+                                            
+                                            memset( cigbuf, 0, CG_CIGAR_STRING_MAX );
+                                            ExplodeCIGAR( op, readLen, ctx->eva.cols[ alg_CIGAR ].base.str,
+                                                         ctx->eva.cols[ alg_CIGAR ].len );
+                                            ctx->eva.cols[ alg_CIGAR ].len = CombineCIGAR( cigbuf, op, readLen, refPos, 
+                                                                                          refCigOps + cigop_starts[ ploidy - 1 ], refLen[ ploidy - 1 ] );
+                                            ctx->eva.cols[ alg_CIGAR ].base.str = cigbuf;
+                                            ctx->eva.cols[ alg_REF_POS ].base.v = &refPos;
+                                            refPos += ctx->evi.cols[ alg_REF_POS ].base.coord0[ 0 ] ;
+			  		    if(refPos < 0){
+						ReferenceObj const *r = NULL;
+    						rc = ReferenceList_Find( gRefList, &r,
+									ctx->evi.cols[ alg_REF_NAME ].base.str,
+									ctx->evi.cols[ alg_REF_NAME ].len );
+						if(rc == 0){
+							bool circular=false;
+							rc=ReferenceObj_Circular(r, &circular);
+							if(rc == 0 && circular){
+								INSDC_coord_len len;
+								rc=ReferenceObj_SeqLength(r,&len);
+								if(rc == 0)
+									refPos += len;
+							}
+							ReferenceObj_Release(r);
+						}
+					    }
+                                            rc = DumpAlignedSAM( ctx, &ctx->eva, rowAlign, ctx->readGroup, 1 );
+                                            ++*rows;
+                                        }
+                                        else
+                                            break;
+                                    }
+                                    else
+                                        break;
+                                }
+				if(refCigOps_heap) free( refCigOps_heap );
+                            }
+                            else
+                                rc = RC( rcExe, rcTable, rcReading, rcMemory, rcExhausted );
+                        }
+                    }
+                }
+            }
+            else
+                break;
+            rc = rc ? rc : Quitting();
+            if ( rc != 0 )
+                break;
+        }
+        return rc;
+    }
+    return RC( rcExe, rcTable, rcReading, rcParam, rcUnexpected );
+}
+
+
+static rc_t ForEachAlignedRegion( SAM_dump_ctx_t *const ctx, enum e_IDS_opts const Options,
+    rc_t ( *user_func )( SAM_dump_ctx_t *ctx, TAlignedRegion const *rgn, int options, int which, int64_t *rows, SCol const *IDS ) )
+{
+    SCol cols[] =
+    {
+        { "MAX_SEQ_LEN", 0, { NULL }, 0, false },
+        { "OVERLAP_REF_POS", 0, { NULL }, 0, true },
+        { "PRIMARY_ALIGNMENT_IDS", 0, { NULL }, 0, false },
+        { "SECONDARY_ALIGNMENT_IDS", 0, { NULL }, 0, true },
+        { "EVIDENCE_INTERVAL_IDS", 0, { NULL }, 0, true }, 
+        { NULL, 0, { NULL }, 0, false }
+    };
+    enum eref_col
+    {
+        ref_MAX_SEQ_LEN = 0,
+        ref_OVERLAP_REF_LEN,
+        ref_PRIMARY_ALIGNMENT_IDS,
+        ref_SECONDARY_ALIGNMENT_IDS,
+        ref_EVIDENCE_INTERVAL_IDS
+    };
+
+    KIndex const *iname = NULL;
+    int64_t rows = 0;
+    rc_t rc = 0;
+    int options = Options & 7;
+
+    if ( Options & evidence_alignment_IDS )
+        options |= evidence_interval_IDS;
+
+    if ( ( options & primary_IDS ) == 0 )
+        cols[ ref_PRIMARY_ALIGNMENT_IDS ].name = "";
+    if ( ( options & secondary_IDS ) == 0 )
+        cols[ ref_SECONDARY_ALIGNMENT_IDS ].name = "";
+    if ( ( options & evidence_interval_IDS ) == 0 )
+        cols[ ref_EVIDENCE_INTERVAL_IDS ].name = "";
+    
+    ctx->ref.cols = cols;
+    
+    rc = VTableOpenIndexRead( ctx->ref.tbl.vtbl, &iname, "i_name" );
+    if ( rc == 0 )
+    {
+        rc = Cursor_Open( &ctx->ref.tbl, &ctx->ref.curs, ctx->ref.cols, NULL );
+        if ( rc == 0 )
+        {
+            int64_t rowid = 1;
+            uint64_t count = 0;
+            char refname[ 1024 ];
+            size_t sz;
+            
+            if ( ctx->ref.cols[ ref_PRIMARY_ALIGNMENT_IDS ].idx == 0 )
+                options &= ~primary_IDS;
+            if ( ctx->ref.cols[ ref_SECONDARY_ALIGNMENT_IDS ].idx == 0 )
+                options &= ~secondary_IDS;
+            if ( ctx->ref.cols[ ref_EVIDENCE_INTERVAL_IDS ].idx == 0 )
+                options &= ~evidence_interval_IDS;
+
+            /* new: if we have a list of regions, reset the their print-flag */
+            if ( param->region_qty > 0 )
+            {
+                unsigned r;
+                for ( r = 0; r < param->region_qty; ++r )
+                {
+                    param->region[ r ].printed = 0;
+                }
+            }
+
+            while ( ( rc = KIndexProjectText(iname, rowid + count, &rowid, &count, refname, sizeof( refname ), &sz ) ) == 0 )
+            {
+                bool include;
+                unsigned r;
+                unsigned max_to = UINT_MAX;
+                unsigned min_from = 0;
+                
+                for ( include = false, r = 0; r < param->region_qty; ++r )
+                {
+                    if ( sz == string_size( param->region[ r ].name ) &&
+                         memcmp( param->region[ r ].name, refname, sz ) == 0 )
+                    {
+                        include = true;
+                        max_to = param->region[ r ].max_to;
+                        min_from = param->region[ r ].min_from;
+                        param->region[ r ].printed++; /* new: mark a region as printed */
+                        break;
+                    }
+                }
+
+                if ( param->region_qty == 0 || include )
+                {
+                    int64_t const endrow_exclusive = rowid + count;
+                    unsigned m;
+                    unsigned k;
+                    
+                    for ( k = 0, m = 1; rc == 0 && k < 3; ++k, m <<= 1 )
+                    {
+                        if ( m & options )
+                        {
+                            unsigned lookback = 0;
+                            int64_t row;
+                            int32_t row_start_offset;
+                            unsigned pos;
+			    unsigned const maxseqlen = 5000; /***** TODO: this code is to be rewritten anyway ****/
+                            
+                            if ( param->region_qty )
+                            {
+                                if ( ctx->ref.cols[ ref_OVERLAP_REF_LEN ].idx )
+                                {
+                                    rc = Cursor_Read( &ctx->ref, rowid, 0, ~(0u) );
+                                    if ( rc != 0 )
+                                        break;
+                                    if ( ctx->ref.cols[ ref_OVERLAP_REF_LEN ].len > k )
+                                    {
+                                        unsigned const overlap = ctx->ref.cols[ ref_OVERLAP_REF_LEN ].base.coord0[ k ];
+                                        
+                                        if ( overlap != 0 )
+                                        {
+                                            
+                                            assert( overlap < rowid * maxseqlen );
+                                            lookback = ( rowid - ( overlap / maxseqlen ) );
+                                        }
+                                    }
+                                }
+                                else
+                                    lookback = 1;
+                            }
+			    row_start_offset = min_from/maxseqlen - lookback;
+			   if(row_start_offset < 0) row_start_offset=0;
+			    
+
+                            for ( pos = row_start_offset*maxseqlen, row = rowid + row_start_offset; rc == 0 && row < endrow_exclusive; ++row )
+                            {
+                                if ( row < 1 )
+                                {
+                                    row = 0;
+                                    continue;
+                                }
+                                rc = Cursor_Read( &ctx->ref, row, 0, ~(0u) );
+                                if ( rc != 0 )
+                                    break;
+                                if ( ctx->ref.cols[ ref_PRIMARY_ALIGNMENT_IDS + k ].len > 0 )
+                                    rc = user_func( ctx, &param->region[r], Options, m, &rows,
+                                                    &ctx->ref.cols[ ref_PRIMARY_ALIGNMENT_IDS + k ] );
+                                pos += ctx->ref.cols[ ref_MAX_SEQ_LEN ].base.u32[ 0 ];
+                                if ( pos >= max_to )
+                                    break;
+                                if ( param->test_rows != 0 && rows > param->test_rows )
+                                    break;
+                            }
+                        }
+                    }
+                }
+                if ( param->test_rows != 0 && rows > param->test_rows )
+                    break;
+                if ( rc != 0 )
+                    break;
+            } /* while */
+
+            /* new: walk the list of regions and report what was NOT printed ( found ) ... */
+            if ( param->region_qty > 0 && GetRCState( rc ) != rcCanceled )
+            {
+                unsigned r;
+                for ( r = 0; r < param->region_qty; ++r )
+                {
+                    if ( param->region[ r ].printed == 0 )
+                    {
+                        (void)PLOGMSG( klogWarn, ( klogWarn, "reference >$(a)< not found", "a=%s", param->region[ r ].name ) );
+                    }
+                }
+            }
+
+            if ( GetRCObject( rc ) == rcId && GetRCState( rc ) == rcNotFound )
+            {
+                rc = 0;
+            }
+
+        }
+    }
+    Cursor_Close( &ctx->ref.curs );
+    KIndexRelease( iname );
+    
+    return rc;
+}
+
+
+static rc_t DumpAlignedTable( SAM_dump_ctx_t *const ctx, DataSource *const ds,
+                              bool const primary, int const cg_style, unsigned *const rcount )
+{
+    unsigned i;
+    int64_t start;
+    uint64_t count;
+    rc_t rc = VCursorIdRange( ds->curs.vcurs, 0, &start, &count );
+    
+    if ( rc != 0 )
+        return rc;
+    for ( i = 0; i != (unsigned)count; ++i )
+    {
+        if ( DumpAlignedRow(ctx, ds, start + i, primary, cg_style, &rc ) )
+            ++*rcount;
+        if ( rc != 0 || ( rc = Quitting() ) != 0 )
+            return rc;
+        if ( param->test_rows && *rcount > param->test_rows )
+            break;
+    }
+    return 0;
+}
+
+
+static rc_t DumpUnsorted( SAM_dump_ctx_t *const ctx )
+{
+    rc_t rc = 0;
+    unsigned rcount;
+    
+    if ( rc == 0 && param->cg_evidence )
+    {
+        SAM_DUMP_DBG( 2, ( "%s EVIDENCE_INTERVAL\n", ctx->accession ) );
+        rcount = 0;
+        rc = DumpAlignedTable( ctx, &ctx->evi, false, 0, &rcount );
+        (void)PLOGMSG( klogInfo, ( klogInfo, "$(a): $(c) allele sequences", "a=%s,c=%lu", ctx->accession, rcount ) );
+    }
+    if ( rc == 0 && param->cg_ev_dnb )
+    {
+        SAM_DUMP_DBG( 2, ( "%s EVIDENCE_ALIGNMENT\n", ctx->accession ) );
+        rcount = 0;
+        rc = DumpAlignedTable( ctx, &ctx->eva, false, param->cg_style, &rcount );
+        (void)PLOGMSG( klogInfo, ( klogInfo, "$(a): $(c) support sequences", "a=%s,c=%lu", ctx->accession, rcount ) );
+    }
+    if ( rc == 0 && ctx->pri.curs.vcurs )
+    {
+        SAM_DUMP_DBG( 2, ( "%s PRIMARY_ALIGNMENT\n", ctx->accession ) );
+        rcount = 0;
+        rc = DumpAlignedTable( ctx, &ctx->pri, true, param->cg_style, &rcount );
+        (void)PLOGMSG( klogInfo, ( klogInfo, "$(a): $(c) primary sequences", "a=%s,c=%lu", ctx->accession, rcount ) );
+    }
+    if ( rc == 0 && ctx->sec.curs.vcurs )
+    {
+        SAM_DUMP_DBG( 2, ( "%s SECONDARY_ALIGNMENT\n", ctx->accession ) );
+        rcount = 0;
+        rc = DumpAlignedTable( ctx, &ctx->sec, false, param->cg_style, &rcount );
+        (void)PLOGMSG( klogInfo, ( klogInfo, "$(a): $(c) secondary sequences", "a=%s,c=%lu", ctx->accession, rcount ) );
+    }
+    return rc;
+}
+
+
+static rc_t DumpUnaligned( SAM_dump_ctx_t *const ctx, bool const aligned )
+{
+    rc_t rc = 0;
+    int64_t start = 0;
+    uint64_t count = 0;
+
+    rc = VCursorIdRange( ctx->seq.curs.vcurs, 0, &start, &count );
+    if ( rc == 0 )
+    {
+        uint64_t rcount = 0;
+        if ( param->test_rows != 0 && count > param->test_rows )
+        {
+            count = param->test_rows;
+        }
+        SAM_DUMP_DBG( 2, ( "%s SEQUENCE table range from %ld qty %lu\n", ctx->accession, start, count ) );
+        while ( count > 0 && rc == 0 )
+        {
+            uint32_t i;
+
+            if ( ctx->seq.cols[ seq_PRIMARY_ALIGNMENT_ID ].idx == 0)
+            {
+                rc = DumpUnalignedReads( ctx, NULL, start, &rcount );
+            }
+            else
+            {
+                /* avoid reading whole sequence cursor data unnecessarily */
+                rc = Cursor_Read( &ctx->seq, start, seq_PRIMARY_ALIGNMENT_ID, ~(unsigned)0 );
+                if ( rc == 0 )
+                {
+                    /* find if its completely unaligned */
+                    int64_t min_prim_id = 0;
+                    bool has_unaligned = false;
+                    for ( i = 0; rc == 0 && i < ctx->seq.cols[ seq_PRIMARY_ALIGNMENT_ID ].len; i++ )
+                    {
+                        int64_t x = ctx->seq.cols[ seq_PRIMARY_ALIGNMENT_ID ].base.i64[ i ];
+                        has_unaligned |= x == 0;
+                        if ( ( min_prim_id == 0 && x != 0 ) || min_prim_id < x )
+                        {
+                            min_prim_id = x;
+                        }
+                    }
+                    if ( min_prim_id == 0 )
+                    {
+                        rc = DumpUnalignedReads( ctx, NULL, start, &rcount );
+                    }
+                    else if ( has_unaligned && !param->unaligned_spots )
+                    {
+                        if ( rc == 0 )
+                        {
+#if USE_MATE_CACHE
+                            uint64_t val;
+                            rc = Cache_Get( &ctx->pri.curs, min_prim_id, &val );
+                            if ( rc == 0 )
+                            {
+                                ctx->pri.cols[ alg_REF_POS ].len = 0;
+                                Cache_Unpack( val, 0, &ctx->pri.curs, ctx->pri.cols );
+                                ctx->pri.cols[ alg_SEQ_SPOT_ID ].base.i64 = &start;
+                                ctx->pri.cols[ alg_SEQ_SPOT_ID ].len = 1;
+                                memcpy( &ctx->pri.cols[ alg_REF_NAME ], &ctx->pri.cols[ alg_MATE_REF_NAME ], sizeof( SCol ) );
+                                memcpy( &ctx->pri.cols[ alg_REF_SEQ_ID ], &ctx->pri.cols[ alg_MATE_REF_NAME ], sizeof( SCol ) );
+                                memcpy( &ctx->pri.cols[ alg_REF_POS ], &ctx->pri.cols[ alg_MATE_REF_POS ], sizeof( SCol ) );
+                            }
+                            else if ( !( GetRCState( rc ) == rcNotFound && GetRCObject( rc ) == rcItem ) )
+                            {
+                                break;
+                            }
+                            else
+                            {
+#endif /* USE_MATE_CACHE */
+                                rc = Cursor_ReadAlign( &ctx->pri.curs, min_prim_id, ctx->pri.cols, alg_MATE_ALIGN_ID );
+#if USE_MATE_CACHE
+                            }
+#endif /* USE_MATE_CACHE */
+                            rc = rc ? rc : DumpUnalignedReads( ctx, ctx->pri.cols, min_prim_id, &rcount );
+                        }
+                    }
+                } else if ( GetRCState( rc ) == rcNotFound && GetRCObject( rc ) == rcRow )
+                {
+                    rc = 0;
+                }
+            }
+            start++;
+            count--;
+            rc = rc ? rc : Quitting();
+        }
+        (void)PLOGMSG( klogInfo, ( klogInfo, "$(a): $(c) unaligned sequences", "a=%s,c=%lu", ctx->accession, rcount ) );
+    }
+    return rc;
+}
+
+#if USE_MATE_CACHE
+static rc_t FlushUnalignedRead_cb (uint64_t key, bool value,void *user_data)
+{
+	rc_t rc;
+	int64_t spot_id = (int64_t) key;
+	int64_t aligned_mate_id = (int64_t) value;
+	SAM_dump_ctx_t *const ctx = user_data;
+	rc = Cursor_Read( &ctx->seq, spot_id, seq_PRIMARY_ALIGNMENT_ID, ~(unsigned)0 );
+	if ( rc == 0 ) {
+		uint64_t rcount;
+		uint64_t val;
+		assert(ctx->seq.cols[ seq_PRIMARY_ALIGNMENT_ID ].len == 2);
+		if(ctx->seq.cols[ seq_PRIMARY_ALIGNMENT_ID ].base.i64[0]==0){
+			aligned_mate_id = ctx->seq.cols[ seq_PRIMARY_ALIGNMENT_ID ].base.i64[1];
+			assert(aligned_mate_id != 0);
+		} else if(ctx->seq.cols[ seq_PRIMARY_ALIGNMENT_ID ].base.i64[1] == 0){
+			aligned_mate_id = ctx->seq.cols[ seq_PRIMARY_ALIGNMENT_ID ].base.i64[0];
+			assert(aligned_mate_id != 0);
+		} else {
+			assert(0);
+		}
+                rc = Cache_Get( &ctx->pri.curs, aligned_mate_id, &val );
+                if ( rc == 0 ) {
+			ctx->pri.cols[ alg_REF_POS ].len = 0;
+			Cache_Unpack( val, 0, &ctx->pri.curs, ctx->pri.cols );
+			ctx->pri.cols[ alg_SEQ_SPOT_ID ].base.i64 = &spot_id;
+			ctx->pri.cols[ alg_SEQ_SPOT_ID ].len = 1;
+			memcpy( &ctx->pri.cols[ alg_REF_NAME ], &ctx->pri.cols[ alg_MATE_REF_NAME ], sizeof( SCol ) );
+			memcpy( &ctx->pri.cols[ alg_REF_SEQ_ID ], &ctx->pri.cols[ alg_MATE_REF_NAME ], sizeof( SCol ) );
+			memcpy( &ctx->pri.cols[ alg_REF_POS ], &ctx->pri.cols[ alg_MATE_REF_POS ], sizeof( SCol ) );
+			rc =DumpUnalignedReads( ctx, ctx->pri.cols, aligned_mate_id, &rcount );
+		}
+	}
+        return rc;
+}
+static rc_t FlushUnaligned( SAM_dump_ctx_t *const ctx, const SCursCache * cache )
+{
+    return KVectorVisitBool (cache->cache_unaligned_mate, false, FlushUnalignedRead_cb, ctx );
+}
+#endif
+
+static rc_t DumpHeader( SAM_dump_ctx_t const *ctx )
+{
+    bool reheader = param->reheader;
+    rc_t rc = 0;
+    
+    if ( !reheader )
+    {
+        if ( ctx->db )
+        {
+            /* grab header from db meta node */
+            KMetadata const *meta;
+            
+            rc = VDatabaseOpenMetadataRead( ctx->db, &meta );
+            if ( rc == 0 )
+            {
+                KMDataNode const *node;
+                
+                rc = KMetadataOpenNodeRead( meta, &node, "BAM_HEADER" );
+                KMetadataRelease( meta );
+                
+                if ( rc == 0 )
+                {
+                    size_t offset = 0;
+                    
+                    for ( offset = 0; ; )
+                    {
+                        size_t remain;
+                        size_t nread;
+                        char buffer[ 4096 ];
+                        
+                        rc = KMDataNodeRead( node, offset, buffer, sizeof(buffer), &nread, &remain );
+                        if ( rc != 0 )
+                            break;
+                        BufferedWriter( NULL, buffer, nread, NULL );
+                        if ( remain == 0 )
+                        {
+                            if ( buffer[nread - 1] != '\n' )
+                            {
+                                 buffer[ 0 ] = '\n';
+                                 rc = BufferedWriter( NULL, buffer, 1, NULL );
+                            }
+                            break;
+                        }
+                        offset += nread;
+                    }
+                    KMDataNodeRelease(node);
+                }
+                else if ( GetRCState( rc ) == rcNotFound )
+                {
+                    reheader = true;
+                    rc = 0;
+                }
+            }
+        }
+        else
+        {
+            reheader = true;
+            rc = 0;
+        }
+    }
+
+    if ( rc == 0 && reheader )
+    {
+        rc = KOutMsg( "@HD\tVN:1.3\n" );
+        if ( rc == 0 && gRefList )
+            rc = RefSeqPrint();
+        if ( rc == 0 && ctx->readGroup )
+            rc = ReadGroup_print( ctx->readGroup );
+        if ( rc == 0 && ctx->seq.tbl.vtbl )
+            rc = DumpReadGroups( &ctx->seq.tbl );
+    }
+
+    if ( rc == 0 && param->comments )
+    {
+        unsigned i;
+        
+        for( i = 0; rc == 0 && param->comments[ i ]; ++i )
+            rc = KOutMsg( "@CO\t%s\n", param->comments[ i ] );
+    }
+    return rc;
+}
+
+
+static rc_t DumpDB( SAM_dump_ctx_t *const ctx )
+{
+    rc_t rc = 0;
+
+    if ( ctx->ref.tbl.vtbl != NULL )
+        rc = ReferenceList_MakeTable( &gRefList, ctx->ref.tbl.vtbl, 0, CURSOR_CACHE, NULL, 0 );
+    if ( !param->noheader )
+        rc = DumpHeader( ctx );
+    if ( rc == 0 )
+    {
+        if ( param->region_qty ){
+            rc = ForEachAlignedRegion(  ctx
+                                      ,   ( param->primaries   ? primary_IDS : 0 )
+                                        | ( param->secondaries ? secondary_IDS : 0 )
+                                        | ( param->cg_evidence ? evidence_interval_IDS : 0 )
+                                        | ( param->cg_ev_dnb   ? evidence_alignment_IDS : 0 )
+                                      , DumpAlignedRowList_cb );
+#if USE_MATE_CACHE
+	    if ( rc == 0 && param->unaligned ){
+                rc = FlushUnaligned( ctx,ctx->pri.curs.cache);
+	    }
+#endif
+	}
+        if ( param->cg_sam )
+            rc = ForEachAlignedRegion( ctx, evidence_interval_IDS, DumpCGSAM );
+
+        if ( param->region_qty == 0 )
+        {
+            rc = DumpUnsorted( ctx );
+            if ( rc == 0 && param->unaligned )
+                rc = DumpUnaligned( ctx, ctx->pri.tbl.vtbl != NULL );
+        }
+    }
+    ReferenceList_Release( gRefList );
+    return rc;
+}
+
+
+static rc_t DumpTable( SAM_dump_ctx_t *ctx )
+{
+    rc_t rc = 0;
+
+    if ( !param->noheader )
+        rc = DumpHeader( ctx );
+    if ( rc == 0 )
+        rc = DumpUnaligned( ctx, false );
+    return rc;
+}
+
+
+static rc_t ProcessTable( VDBManager const *mgr, char const fullPath[],
+                          char const accession[], char const readGroup[] )
+{
+    VTable const *tbl;
+    rc_t rc = VDBManagerOpenTableRead( mgr, &tbl, 0, "%s", fullPath );
+    
+    if ( rc != 0 )
+    {
+        VSchema *schema;
+        
+        rc = VDBManagerMakeSRASchema( mgr, &schema );
+        if ( rc == 0 )
+        {
+            rc = VDBManagerOpenTableRead( mgr, &tbl, schema, "%s", fullPath );
+            VSchemaRelease( schema );
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        SAM_dump_ctx_t ctx;
+        SCol seq_cols[ sizeof( gSeqCol ) / sizeof( gSeqCol[ 0 ] ) ];
+        
+        memset( &ctx, 0, sizeof( ctx ) );
+        
+        ctx.fullPath = fullPath;
+        ctx.accession = accession;
+        ctx.readGroup = readGroup;
+        
+        DATASOURCE_INIT( ctx.seq, accession );
+        ctx.seq.tbl.vtbl = tbl;
+        ctx.seq.type = edstt_Sequence;
+        
+        ReportResetTable( fullPath, tbl );
+
+        ctx.seq.cols = seq_cols;
+        memcpy( ctx.seq.cols, gSeqCol, sizeof( gSeqCol ) );
+        rc = Cursor_Open( &ctx.seq.tbl, &ctx.seq.curs, ctx.seq.cols, NULL );
+        if ( rc == 0 ) {
+            rc = DumpTable( &ctx );
+            Cursor_Close(&ctx.seq.curs);
+        }
+        VTableRelease( tbl );
+    }
+    return rc;
+}
+
+
+static void SetupColumns( DataSource *ds, enum eDSTableType type )
+{
+    memcpy( ds->cols, g_alg_col_tmpl, sizeof( g_alg_col_tmpl ) );
+    
+    ds->type = type;
+    if ( param->use_seqid )
+        ds->cols[ alg_MATE_REF_NAME ].name = "MATE_REF_SEQ_ID";
+    else
+        ds->cols[ alg_MATE_REF_NAME ].name = "MATE_REF_NAME";
+    
+    if ( param->fasta || param->fastq )
+        ds->cols[ alg_READ ].name = "RAW_READ";
+    else if ( param->hide_identical )
+        ds->cols[ alg_READ ].name = "MISMATCH_READ";
+    else
+        ds->cols[ alg_READ ].name = "READ";
+    
+    if ( param->long_cigar )
+    {
+        ds->cols[ alg_CIGAR ].name = "CIGAR_LONG";
+        ds->cols[ alg_CIGAR_LEN ].name = "CIGAR_LONG_LEN";
+    }
+    else
+    {
+        ds->cols[ alg_CIGAR ].name = "CIGAR_SHORT";
+        ds->cols[ alg_CIGAR_LEN ].name = "CIGAR_SHORT_LEN";
+    }
+
+    if(param->qualQuant && param->qualQuantSingle){ /** we don't really need quality ***/
+	ds->cols[ alg_SAM_QUALITY   ].name = "";
+    }
+    
+    switch ( type )
+    {
+    case edstt_EvidenceInterval:
+	
+        ds->cols[ alg_SEQ_SPOT_ID   ].name = "";
+        ds->cols[ alg_SEQ_NAME      ].name = "";
+        ds->cols[ alg_SAM_QUALITY   ].name = "";
+        ds->cols[ alg_SPOT_GROUP    ].name = "";
+        ds->cols[ alg_SEQ_SPOT_GROUP].name = "";
+        ds->cols[ alg_SEQ_READ_ID   ].name = "";
+        ds->cols[ alg_MATE_ALIGN_ID ].name = "";
+        ds->cols[ alg_MATE_REF_ID   ].name = "";
+        ds->cols[ alg_MATE_REF_NAME ].name = "";
+        ds->cols[ alg_SAM_FLAGS     ].name = "";
+        ds->cols[ alg_MATE_REF_POS  ].name = "";
+        ds->cols[ alg_ALIGN_GROUP   ].name = "";
+        ds->cols[ alg_TEMPLATE_LEN  ].name = "";
+        if ( param->cg_sam || param->cg_ev_dnb )
+            ds->cols[ alg_EVIDENCE_ALIGNMENT_IDS ].name = "EVIDENCE_ALIGNMENT_IDS";
+        break;
+
+    case edstt_EvidenceAlignment:
+        ds->cols[ alg_REF_PLOIDY    ].name = "REF_PLOIDY";
+        ds->cols[ alg_REF_ID        ].name = "REF_ID";
+        ds->cols[ alg_MATE_ALIGN_ID ].name = "";
+        ds->cols[ alg_MATE_REF_ID   ].name = "";
+        ds->cols[ alg_MATE_REF_NAME ].name = "";
+        ds->cols[ alg_SAM_FLAGS     ].name = "";
+        ds->cols[ alg_MATE_REF_POS  ].name = "";
+        ds->cols[ alg_ALIGN_GROUP   ].name = "";
+        ds->cols[ alg_TEMPLATE_LEN  ].name = "";
+        break;
+    default:
+        break;
+    }
+}
+
+
+static rc_t ProcessDB( VDatabase const *db, char const fullPath[],
+                       char const accession[], char const readGroup[] )
+{
+    char const *const refTableName = (   param->region_qty > 0
+                                      || param->cg_evidence
+                                      || param->cg_ev_dnb
+                                      || param->cg_sam
+                                      || param->reheader
+                                      || param->primaries
+                                      || param->secondaries
+                                     )
+                                   ? "REFERENCE"
+                                   : 0;
+    char const *const priTableName = param->primaries   ? "PRIMARY_ALIGNMENT" : 0;
+    char const *const secTableName = param->secondaries ? "SECONDARY_ALIGNMENT" : 0;
+    char const *const seqTableName = ( param->unaligned || param->reheader ) ? "SEQUENCE" : 0;
+    char const *const eviTableName = ( param->cg_evidence || ( param->cg_ev_dnb & ( param->region_qty > 0 ) ) || param->cg_sam ) ? "EVIDENCE_INTERVAL" : 0;
+    char const *const evaTableName = ( param->cg_ev_dnb   || param->cg_sam ) ? "EVIDENCE_ALIGNMENT" : 0;
+    
+    SAM_dump_ctx_t ctx;
+    SCol align_cols[ ( sizeof( g_alg_col_tmpl ) / sizeof( g_alg_col_tmpl[ 0 ] ) ) * 4 ];
+    SCol seq_cols[ sizeof( gSeqCol ) / sizeof( gSeqCol[ 0 ] ) ];
+    rc_t rc = 0;
+    
+    memset( &ctx, 0, sizeof( ctx ) );
+    memset( align_cols, 0, sizeof( align_cols ) );
+    memset( seq_cols, 0, sizeof( seq_cols ) );
+    
+    ctx.db = db;
+    ctx.fullPath = fullPath;
+    ctx.accession = accession;
+    ctx.readGroup = readGroup;
+    
+    DATASOURCE_INIT( ctx.seq, seqTableName );
+    DATASOURCE_INIT( ctx.ref, refTableName );
+    DATASOURCE_INIT( ctx.pri, priTableName );
+    DATASOURCE_INIT( ctx.sec, secTableName );
+    DATASOURCE_INIT( ctx.evi, eviTableName );
+    DATASOURCE_INIT( ctx.eva, evaTableName );
+    
+    if ( ctx.seq.tbl.name )
+    {
+        rc = VDatabaseOpenTableRead( db, &ctx.seq.tbl.vtbl, "%s", ctx.seq.tbl.name );
+        if ( rc == 0 )
+        {
+            ctx.seq.cols = seq_cols;
+            memcpy(seq_cols, gSeqCol, sizeof(gSeqCol));
+            rc = Cursor_Open( &ctx.seq.tbl, &ctx.seq.curs, ctx.seq.cols, NULL );
+        }
+    }
+    ctx.pri.cols = &align_cols[ 0 * ( sizeof( g_alg_col_tmpl ) / sizeof( g_alg_col_tmpl[ 0 ] ) ) ];
+    ctx.sec.cols = &align_cols[ 1 * ( sizeof( g_alg_col_tmpl ) / sizeof( g_alg_col_tmpl[ 0 ] ) ) ];
+    ctx.evi.cols = &align_cols[ 2 * ( sizeof( g_alg_col_tmpl ) / sizeof( g_alg_col_tmpl[ 0 ] ) ) ];
+    ctx.eva.cols = &align_cols[ 3 * ( sizeof( g_alg_col_tmpl ) / sizeof( g_alg_col_tmpl[ 0 ] ) ) ];
+    
+    SetupColumns( &ctx.pri, edstt_PrimaryAlignment );
+    SetupColumns( &ctx.sec, edstt_SecondaryAlignment );
+    SetupColumns( &ctx.evi, edstt_EvidenceInterval );
+    SetupColumns( &ctx.eva, edstt_EvidenceAlignment );
+    
+    if ( ctx.pri.tbl.name )
+        VDatabaseOpenTableRead( db, &ctx.pri.tbl.vtbl, "%s", ctx.pri.tbl.name );
+    if ( ctx.sec.tbl.name )
+        VDatabaseOpenTableRead( db, &ctx.sec.tbl.vtbl, "%s", ctx.sec.tbl.name );
+    if ( ctx.evi.tbl.name )
+        VDatabaseOpenTableRead( db, &ctx.evi.tbl.vtbl, "%s", ctx.evi.tbl.name );
+    if ( ctx.eva.tbl.name )
+        VDatabaseOpenTableRead( db, &ctx.eva.tbl.vtbl, "%s", ctx.eva.tbl.name );
+    
+    if (   ctx.pri.tbl.vtbl == NULL
+        && ctx.sec.tbl.vtbl == NULL
+        && ctx.evi.tbl.vtbl == NULL
+        && ctx.eva.tbl.vtbl == NULL )
+    {
+        memset (&ctx.pri, 0, sizeof( ctx.pri ) * 4 );
+        if ( ctx.seq.tbl.name == NULL )
+        {
+            ctx.seq.tbl.name = "SEQUENCE";
+            rc = VDatabaseOpenTableRead( db, &ctx.seq.tbl.vtbl, "%s", ctx.seq.tbl.name );
+        }
+        if ( rc == 0 )
+        {
+            ctx.seq.cols = seq_cols;
+            memcpy(seq_cols, gSeqCol, sizeof(gSeqCol));
+            rc = Cursor_Open(&ctx.seq.tbl, &ctx.seq.curs, ctx.seq.cols, NULL);
+            if ( rc == 0 )
+            {
+                rc = DumpTable( &ctx );
+                Cursor_Close(&ctx.seq.curs);
+            }
+            VTableRelease(ctx.seq.tbl.vtbl);
+        }
+        VDatabaseRelease( db );
+        return rc;
+    }
+    ReportResetDatabase( fullPath, db );
+    
+    if ( ctx.ref.tbl.name )
+    {
+        rc = VDatabaseOpenTableRead( db, &ctx.ref.tbl.vtbl, "%s", ctx.ref.tbl.name );
+        ctx.ref.type = edstt_Reference;
+    }
+    if ( rc == 0 )
+        rc = Cursor_Open( &ctx.pri.tbl, &ctx.pri.curs, ctx.pri.cols, ctx.seq.curs.cache );
+    if ( rc == 0 )
+        rc = Cursor_Open( &ctx.sec.tbl, &ctx.sec.curs, ctx.sec.cols, NULL );
+    if ( rc == 0 )
+        rc = Cursor_Open( &ctx.evi.tbl, &ctx.evi.curs, ctx.evi.cols, NULL );
+    if ( rc == 0 )
+        rc = Cursor_Open( &ctx.eva.tbl, &ctx.eva.curs, ctx.eva.cols, NULL );
+    if ( rc == 0 )
+        rc = DumpDB( &ctx );
+    
+    Cursor_Close(&ctx.ref.curs);
+    Cursor_Close(&ctx.pri.curs);
+    Cursor_Close(&ctx.sec.curs);
+    Cursor_Close(&ctx.evi.curs);
+    Cursor_Close(&ctx.eva.curs);
+    Cursor_Close(&ctx.seq.curs);
+    
+    VTableRelease( ctx.ref.tbl.vtbl );
+    VTableRelease( ctx.pri.tbl.vtbl );
+    VTableRelease( ctx.sec.tbl.vtbl );
+    VTableRelease( ctx.evi.tbl.vtbl );
+    VTableRelease( ctx.eva.tbl.vtbl );
+    VTableRelease( ctx.seq.tbl.vtbl );
+    
+    return rc;
+}
+
+#if 0
+rc_t ResolvePath( char const *accession, char const ** path )
+{
+    rc_t rc = 0;
+    static char tblpath[ 4096 ];
+#if TOOLS_USE_SRAPATH != 0
+    static SRAPath* pmgr = NULL;
+    
+    if ( accession == NULL && path == NULL )
+    {
+        SRAPathRelease( pmgr );
+        return 0;
+    }
+    if (   pmgr != NULL
+        || ( rc = SRAPathMake( &pmgr, NULL ) ) == 0
+        || ( GetRCState( rc ) == rcNotFound && GetRCTarget( rc ) == rcDylib ) )
+    {
+        *path = tblpath;
+        tblpath[ 0 ] = '\0';
+        rc = 0;
+        do {
+            if ( pmgr != NULL && !SRAPathTest( pmgr, accession ) )
+            {
+                /* try to resolve the path using mgr */
+                rc = SRAPathFind( pmgr, accession, tblpath, sizeof( tblpath ) );
+                if ( rc == 0 )
+                    break;
+            }
+            if ( string_size( accession ) >= sizeof( tblpath ) )
+            {
+                rc = RC( rcExe, rcPath, rcResolving, rcBuffer, rcInsufficient );
+            }
+            else
+            {
+                string_copy( tblpath, ( sizeof tblpath ) - 1, accession, string_size( accession ) );
+                rc = 0;
+            }
+        } while( false );
+    }
+#else
+    if ( accession != NULL && path != NULL )
+    {
+        *path = tblpath;
+        string_copy( tblpath, ( sizeof tblpath ) - 1, accession, string_size( accession ) );
+    }
+#endif
+
+    return rc;
+}
+#endif
+
+
+static rc_t ProcessPath( VDBManager const *mgr, char const Path[] )
+{
+#if 0
+    unsigned pathlen = string_size( Path );
+    char *readGroup = NULL;
+    char *path = NULL;
+    unsigned i;
+    rc_t rc;
+    
+    /* strip trailing path seperators */
+    for ( i = pathlen; i > 0; )
+    {
+        int const ch = Path[ --i ];
+        
+        if ( ch == '/' || ch == '\\' )
+            --pathlen;
+        else
+            break;
+    }
+
+    /* find read group alias */
+    for ( i = pathlen; i > 0; )
+    {
+        int const ch = Path[ --i ];
+        
+        if ( ch == '=' )
+        {
+            unsigned const pos = i + 1;
+            unsigned const len = pathlen - pos;
+            
+            pathlen = i;
+            
+            readGroup = malloc( len + 1 );
+            if ( readGroup == NULL )
+                return RC( rcExe, rcArgv, rcProcessing, rcMemory, rcExhausted );
+            memcpy( readGroup, &Path[ pos ], len );
+            readGroup[ len ] = '\0';
+            break;
+        }
+    }
+
+    path = malloc( pathlen + 1 );
+    if ( path == NULL )
+        return RC( rcExe, rcArgv, rcProcessing, rcMemory, rcExhausted );
+    memcpy( path, Path, pathlen );
+    path[ pathlen ] = '\0';
+    
+    rc = ReportResetObject( path );
+    if ( rc == 0 )
+    {
+        char const *fullPath;
+
+        rc = ResolvePath( path, &fullPath );
+        if ( rc == 0 )
+        {
+            char const *accession = fullPath;
+            VDatabase const *db;
+            
+            /* use last path element as accession */
+            for ( i = pathlen; i > 0; )
+            {
+                int const ch = path[ --i ];
+                
+                if ( ch == '/' || ch == '\\' )
+                {
+                    accession = &fullPath[ i + 1 ];
+                    break;
+                }
+            }
+            rc = VDBManagerOpenDBRead( mgr, &db, NULL, "%s", fullPath );
+            if ( rc == 0 )
+            {
+                rc = ProcessDB( db, fullPath, accession, readGroup );
+                VDatabaseRelease( db );
+            }
+            else
+                rc = ProcessTable( mgr, fullPath, accession, readGroup );
+        }
+    }
+    free( path );
+    free( readGroup );
+    return rc;
+
+#else
+
+    char * pc;
+    rc_t rc = 0;
+    size_t pathlen = string_size ( Path );
+
+    /* look for scheme */
+    pc = string_chr ( Path, pathlen, ':' );
+    if (pc == NULL)
+    {
+        char *readGroup;
+        char *path;
+        size_t i;
+
+        /* no scheme found - must be simple fs path */
+    /* old: ---unused label */
+        readGroup = NULL;
+        path = NULL;
+    
+        /* strip trailing path separators */
+        for ( i = pathlen; i > 0; -- pathlen )
+        {
+            int const ch = Path[ --i ];
+            if ( ch != '/' && ch != '\\' )
+                break;
+        }
+
+        /* find read group alias */
+        for ( i = pathlen; i > 0; )
+        {
+            int const ch = Path[ --i ];
+        
+            if ( ch == '=' )
+            {
+                size_t const pos = i + 1;
+                size_t const len = pathlen - pos;
+            
+                pathlen = i;
+            
+                readGroup = malloc( len + 1 );
+                if ( readGroup == NULL )
+                    return RC( rcExe, rcArgv, rcProcessing, rcMemory, rcExhausted );
+                memcpy( readGroup, &Path[ pos ], len );
+                readGroup[ len ] = '\0';
+                break;
+            }
+        }
+
+        path = malloc( pathlen + 1 );
+        if ( path == NULL )
+            return RC( rcExe, rcArgv, rcProcessing, rcMemory, rcExhausted );
+        memcpy( path, Path, pathlen );
+        path[ pathlen ] = '\0';
+    
+        rc = ReportResetObject( path );
+        if ( rc == 0 )
+        {
+            char const *accession = path;
+            VDatabase const *db;
+            
+            /* use last path element as accession */
+            for ( i = pathlen; i > 0; )
+            {
+                int const ch = path[ --i ];
+                
+                if ( ch == '/' || ch == '\\' )
+                {
+                    accession = &path[ i + 1 ];
+                    break;
+                }
+            }
+            rc = VDBManagerOpenDBRead( mgr, &db, NULL, "%s", path );
+            if ( rc == 0 )
+            {
+                rc = ProcessDB( db, path, accession, readGroup );
+                if (UIError(rc, db, NULL)) {
+                    UIDatabaseLOGError(rc, db, true);
+/*                  *error_reported = true; */
+                }
+                VDatabaseRelease( db );
+            }
+            else {
+                rc = ProcessTable( mgr, path, accession, readGroup );
+                if (UIError(rc, NULL, NULL)) {
+                    UITableLOGError(rc, NULL, true);
+/*                  *error_reported = true; */
+                }
+            }
+        }
+        free( path );
+        free( readGroup );
+        return rc;
+    }
+    else
+    {
+        VFSManager * vfs;
+        rc = VFSManagerMake ( & vfs );
+        if ( rc == 0 )
+        {
+            VPath * vpath;
+            char * basename;
+            size_t zz;
+            char buffer [8193];
+            char readgroup_ [257];
+            char * readgroup;
+
+            rc = VFSManagerMakePath (vfs, &vpath, "%s", Path);
+            VFSManagerRelease ( vfs );
+            if ( rc == 0 )
+            {
+                char * ext;
+
+                rc = VPathReadPath (vpath, buffer, sizeof buffer - 1, &zz);
+                if ( rc == 0 )
+                {
+                loop:
+                    basename = string_rchr (buffer, zz, '/');
+                    if ( basename == NULL )
+                        basename = buffer;
+                    else
+                    {
+                        if (basename[1] == '\0')
+                        {
+                            basename[0] = '\0';
+                            goto loop;
+                        }
+                        ++ basename;
+                        zz -= basename - buffer;
+                    }
+
+                    /* cut off [.lite].[c]sra[.nenc||.ncbi_enc] if any */
+                    ext = string_rchr( basename, zz, '.' );
+                    if ( ext != NULL )
+                    {
+                        if ( strcasecmp( ext, ".nenc" ) == 0 || strcasecmp( ext, ".ncbi_enc" ) == 0 )
+                        {
+                            zz -= ext - basename;
+                            *ext = '\0';
+                            ext = string_rchr( basename, zz, '.' );
+                        }
+
+                        if ( ext != NULL )
+                        {
+                            if ( strcasecmp( ext, ".sra" ) == 0 || strcasecmp( ext, ".csra" ) == 0 )
+                            {
+                                zz -= ext - basename;
+                                *ext = '\0';
+                                ext = string_rchr( basename, zz, '.' );
+                                if ( ext != NULL && strcasecmp( ext, ".lite" ) == 0 )
+                                    *ext = '\0';
+                            }
+                        }
+                    }
+                
+                    rc = VPathOption (vpath, vpopt_readgroup, readgroup_, 
+                                      sizeof readgroup_ - 1, &zz);
+                    if ( rc == 0 )
+                        readgroup = readgroup_;
+                    else if ( GetRCState ( rc ) == rcNotFound )
+                    {
+                        rc = 0;
+                        readgroup = NULL;
+                    }
+
+
+                    if ( rc == 0 )
+                    {
+                        VDatabase const *db;
+                        
+                        rc = VDBManagerOpenDBRead( mgr, &db, NULL, "%s", Path );
+                        if ( rc == 0 )
+                        {
+                            rc = ProcessDB( db, Path, basename, readgroup );
+                            VDatabaseRelease( db );
+                        }
+                        else
+                            rc = ProcessTable( mgr, Path, basename, readgroup );
+                    }
+                }
+
+                VPathRelease (vpath);
+            }
+        }
+    }
+    return rc;
+#endif
+}
+
+/*
+ver_t CC KAppVersion( void )
+{
+    return SAM_DUMP_VERS;
+}
+*/
+
+char const *unaligned_usage[] = {"Output unaligned reads", NULL};
+char const *unaligned_only_usage[] = {"Only output unaligned spots", NULL};
+char const *primaryonly_usage[] = {"Output only primary alignments", NULL};
+char const *cigartype_usage[] = {"Output long version of CIGAR", NULL};
+char const *cigarCG_usage[] = {"Output CG version of CIGAR", NULL};
+char const *cigarCGMerge_usage[] = {"Apply CG fixups to CIGAR/SEQ/QUAL and outputs CG-specific columns", NULL};
+char const *CG_evidence[] = {"Output CG evidence aligned to reference", NULL};
+char const *CG_ev_dnb[] = {"Output CG evidence DNB's aligned to evidence", NULL};
+char const *CG_SAM[] = {"Output CG evidence DNB's aligned to reference ", NULL};
+char const *CG_mappings[] = {"Output CG sequences aligned to reference ", NULL};
+char const *header_usage[] = {"Replace original BAM header with a reconstructed one", NULL};
+char const *noheader_usage[] = {"Do not output headers", NULL};
+char const *region_usage[] = {"Filter by position on genome.",
+                              "Name can either be file specific name (ex: \"chr1\" or \"1\").",
+                              "\"from\" and \"to\" are 1-based coordinates", NULL};
+char const *distance_usage[] = {"Filter by distance between matepairs.",
+                                "Use \"unknown\" to find matepairs split between the references.",
+                                "Use from-to to limit matepair distance on the same reference", NULL};
+char const *seq_id_usage[] = {"Print reference SEQ_ID in RNAME instead of NAME", NULL};
+char const *identicalbases_usage[] = {"Output '=' if base is identical to reference", NULL};
+char const *gzip_usage[] = {"Compress output using gzip", NULL};
+char const *bzip2_usage[] = {"Compress output using bzip2", NULL};
+char const *qname_usage[] = {"Add .SPOT_GROUP to QNAME", NULL};
+char const *fasta_usage[] = {"Produce Fasta formatted output", NULL};
+char const *fastq_usage[] = {"Produce FastQ formatted output", NULL};
+char const *prefix_usage[] = {"Prefix QNAME: prefix.QNAME", NULL};
+char const *reverse_usage[] = {"Reverse unaligned reads according to read type", NULL};
+char const *comment_usage[] = {"Add comment to header. Use multiple times for several lines. Use quotes", NULL};
+char const *XI_usage[] = {"Output cSRA alignment id in XI column", NULL};
+char const *qual_quant_usage[] = {"Quality scores quantization level",
+                                  "a string like '1:10,10:20,20:30,30:-'", NULL};
+char const *CG_names[] = { "Generate CG friendly read names", NULL};
+
+char const *usage_params[] =
+{
+    NULL,                       /* unaligned */
+    NULL,                       /* unaligned-only */
+    NULL,                       /* primaryonly */
+    NULL,                       /* cigartype */
+    NULL,                       /* cigarCG */
+    NULL,                       /* header */
+    NULL,                       /* no-header */
+    "text",                     /* comment */
+    "name[:from-to]",           /* region */
+    "from-to|'unknown'",        /* distance */
+    NULL,                       /* seq-id */
+    NULL,                       /* identical-bases */
+    NULL,                       /* gzip */
+    NULL,                       /* bzip2 */
+    NULL,                       /* qname */
+    NULL,                       /* fasta */
+    NULL,                       /* fastq */
+    "prefix",                   /* prefix */
+    NULL,                       /* reverse */
+    NULL,                       /* test-rows */
+    NULL,                       /* mate-row-gap-cacheable */
+    NULL,                       /* cigarCGMerge */
+    NULL,                       /* XI */
+    "quantization string",      /* qual-quant */
+    NULL,                       /* cigarCGMerge */
+    NULL,                       /* CG-evidence */
+    NULL,                       /* CG-ev-dnb */
+    NULL,                       /* CG-mappings */
+    NULL,                       /* CG-SAM */
+    NULL                        /* CG-names */
+};
+
+enum eArgs
+{
+    earg_unaligned = 0,         /* unaligned */
+    earg_unaligned_only,        /* unaligned */
+    earg_prim_only,             /* primaryonly */
+    earg_cigartype,             /* cigartype */
+    earg_cigarCG,               /* cigarCG */
+    earg_header,                /* header */
+    earg_noheader,              /* no-header */
+    earg_comment,               /* comment */
+    earg_region,                /* region */
+    earg_distance,              /* distance */
+    earg_seq_id,                /* seq-id */
+    earg_identicalbases,        /* identical-bases */
+    earg_gzip,                  /* gzip */
+    earg_bzip2,                 /* bzip2 */
+    earg_qname,                 /* qname */
+    earg_fastq,                 /* fasta */
+    earg_fasta,                 /* fastq */
+    earg_prefix,                /* prefix */
+    earg_reverse,               /* reverse */
+    earg_test_rows,             /* test-rows */
+    earg_mate_row_gap_cachable, /* mate-row-gap-cacheable */
+    earg_cigarCG_merge,         /* cigarCGMerge */
+    earg_XI,                    /* XI */
+    earg_QualQuant,             /* qual-quant */
+    earg_CG_evidence,           /* CG-evidence */
+    earg_CG_ev_dnb,             /* CG-ev-dnb */
+    earg_CG_mappings,           /* CG-mappings */
+    earg_CG_SAM,                /* CG-SAM */
+    earg_CG_names               /* CG-names */
+};
+
+OptDef DumpArgs[] =
+{
+    { "unaligned", "u", NULL, unaligned_usage, 0, false, false },           /* unaligned */
+    { "unaligned-only", "U", NULL, unaligned_usage, 0, false, false },      /* unaligned-only */
+    { "primary", "1", NULL, primaryonly_usage, 0, false, false },           /* primaryonly */
+    { "cigar-long", "c", NULL, cigartype_usage, 0, false, false },          /* cigartype */
+    { "cigar-CG", NULL, NULL, cigarCG_usage, 0, false, false },             /* cigarCG */
+    { "header", "r", NULL, header_usage, 0, false, false },                 /* header */
+    { "no-header", "n", NULL, noheader_usage, 0, false, false },            /* no-header */
+    { "header-comment", NULL, NULL, comment_usage, 0, true, false },        /* comment */
+    { "aligned-region", NULL, NULL, region_usage, 0, true, false },         /* region */
+    { "matepair-distance", NULL, NULL, distance_usage, 0, true, false },    /* distance */
+    { "seqid", "s", NULL, seq_id_usage, 0, false, false },                  /* seq-id */
+    { "hide-identical", "=", NULL, identicalbases_usage, 0, false, false }, /* identical-bases */
+    { "gzip", NULL, NULL, gzip_usage, 0, false, false },                    /* gzip */
+    { "bzip2", NULL, NULL, bzip2_usage, 0, false, false },                  /* bzip2 */
+    { "spot-group", "g", NULL, qname_usage, 0, false, false },              /* qname */
+    { "fastq", NULL, NULL, fastq_usage, 0, false, false },                  /* fasta */
+    { "fasta", NULL, NULL, fasta_usage, 0, false, false },                  /* fastq */
+    { "prefix", "p", NULL, prefix_usage, 0, true, false },                  /* prefix */
+    { "reverse", NULL, NULL, reverse_usage, 0, false, false },              /* reverse */
+    { "test-rows", NULL, NULL, NULL, 0, true, false },                      /* test-rows */
+    { "mate-cache-row-gap", NULL, NULL, NULL, 0, true, false },             /* mate-row-gap-cacheable */
+    { "cigar-CG-merge", NULL, NULL, cigarCGMerge_usage, 0, false, false },  /* cigarCGMerge */
+    { "XI", NULL, NULL, XI_usage, 0, false, false },                        /* XI */
+    { "qual-quant", "Q", NULL, qual_quant_usage, 0, true, false },          /* qual-quant */
+    { "CG-evidence", NULL, NULL, CG_evidence, 0, false, false },            /* CG-evidence */
+    { "CG-ev-dnb"  , NULL, NULL, CG_ev_dnb  , 0, false, false },            /* CG-ev-dnb */
+    { "CG-mappings", NULL, NULL, CG_mappings, 0, false, false },            /* CG-mappings */
+    { "CG-SAM", NULL, NULL, CG_SAM, 0, false, false },                      /* CG-SAM */
+    { "CG-names", NULL, NULL, CG_names, 0, false, false },                  /* CG-names */
+    { "legacy", NULL, NULL, NULL, 0, false, false }
+};
+
+
+/*
+const char UsageDefaultName[] = "sam-dump";
+
+
+rc_t CC UsageSummary( char const *progname )
+{
+    return KOutMsg( "Usage:\n"
+        "\t%s [options] path-to-run[ path-to-run ...] > output.sam\n\n", progname );
+}
+
+
+rc_t CC Usage( Args const *args)
+{
+    char const *progname = UsageDefaultName;
+    char const *fullpath = UsageDefaultName;
+    rc_t rc;
+    unsigned i;
+
+    rc = ArgsProgram( args, &fullpath, &progname );
+
+    UsageSummary( progname );
+
+    KOutMsg( "Options:\n" );
+    for( i = 0; i < sizeof( DumpArgs ) / sizeof( DumpArgs[ 0 ] ); i++ )
+    {
+        if ( DumpArgs[ i ].help != NULL )
+        {
+            HelpOptionLine( DumpArgs[ i ].aliases, DumpArgs[ i ].name,
+                            usage_params[ i ], DumpArgs[ i ].help);
+        }
+    }
+    KOutMsg( "\n" );
+    HelpOptionsStandard();
+
+    HelpVersion( fullpath, KAppVersion() );
+
+    return rc;
+}
+*/
+
+#define ARGS_COUNT (sizeof(DumpArgs)/sizeof(DumpArgs[0]))
+
+
+static unsigned ParamCount( Args const *const args, rc_t *const prc )
+{
+    uint32_t y = 0;
+    rc_t rc = ArgsParamCount( args, &y );
+    
+    if ( prc != NULL )
+        *prc = rc;
+    return y;
+}
+
+
+static unsigned ArgCount( Args const *const args, rc_t *const prc )
+{
+    uint32_t y = 0;
+    rc_t rc = ArgsArgvCount( args, &y );
+    
+    if ( prc != NULL )
+        *prc = rc;
+    return y;
+}
+
+
+static rc_t CountArgs( Args const *const args, unsigned count[],
+                       char const **const errmsg )
+{
+    rc_t rc;
+    unsigned const pcount = ParamCount( args, &rc );
+    
+    memset( count, 0, ARGS_COUNT );
+    if ( rc != 0 || pcount == 0 )
+    {
+        *errmsg = "";
+        MiniUsage( args );
+        return ( ArgCount( args, NULL ) < 2 )
+             ? 0
+             : RC( rcExe, rcArgv, rcParsing, rcParam, rcInsufficient );
+    }
+#define COUNT_ARG(E) do {\
+    char const *const optname = DumpArgs[ (E) ].name; \
+    if ( ( rc = ArgsOptionCount( args, optname, &count[ (E) ] ) ) != 0 ) { \
+        *errmsg = optname; \
+        return rc; \
+    } } while( 0 )
+    
+    
+    /* record source options */
+    COUNT_ARG( earg_unaligned );
+    COUNT_ARG( earg_unaligned_only );
+    COUNT_ARG( earg_prim_only );
+    COUNT_ARG( earg_CG_evidence );
+    COUNT_ARG( earg_CG_ev_dnb );
+    COUNT_ARG( earg_CG_mappings );
+    COUNT_ARG( earg_CG_SAM );
+    
+    /* record filter options */
+    COUNT_ARG( earg_region );
+    COUNT_ARG( earg_distance );
+    
+    /* output format options */
+    COUNT_ARG( earg_fastq );
+    COUNT_ARG( earg_fasta );
+    
+    /* SAM header options */
+    COUNT_ARG( earg_header );
+    COUNT_ARG( earg_noheader );
+    COUNT_ARG( earg_comment );
+    
+    /* SAM field options */
+    COUNT_ARG( earg_prefix );
+    COUNT_ARG( earg_qname );
+    COUNT_ARG( earg_seq_id );
+    COUNT_ARG( earg_CG_names );
+    
+    COUNT_ARG( earg_cigartype );
+    COUNT_ARG( earg_cigarCG );
+    COUNT_ARG( earg_cigarCG_merge );
+    
+    COUNT_ARG( earg_identicalbases );
+    COUNT_ARG( earg_reverse );
+    COUNT_ARG( earg_QualQuant );
+    
+    /* output encoding options */
+    COUNT_ARG( earg_gzip );
+    COUNT_ARG( earg_bzip2 );
+    
+    COUNT_ARG( earg_mate_row_gap_cachable );
+    
+    /* debug options */
+    COUNT_ARG( earg_XI );
+    COUNT_ARG( earg_test_rows );
+#undef COUNT_ARG
+    return 0;
+}
+
+
+static unsigned GetOptValU( Args const *const args, char const *const argname,
+                            unsigned const defval, rc_t *const prc )
+{
+    unsigned y = defval;
+    char const *valstr;
+    rc_t rc = ArgsOptionValue( args, argname, 0, (const void **)&valstr );
+    
+    if ( rc == 0 )
+    {
+        char *endp;
+        
+        y = strtou32( valstr, &endp, 0 );
+        if ( *endp != '\0' )
+        {
+            rc = RC( rcExe, rcArgv, rcProcessing, rcParam, rcInvalid );
+            y = 0;
+        }
+        if ( y == 0 )
+            y = defval;
+    }
+    if ( prc )
+        *prc = rc;
+    return y;
+}
+
+
+static rc_t GetComments( Args const *const args, struct params_s *const parms, unsigned const n )
+{
+    parms->comments = calloc( n + 1, sizeof( parms->comments[ 0 ] ) );
+    if ( parms->comments != NULL )
+    {
+        unsigned i;
+        
+        for ( i = 0; i < n; ++i )
+        {
+            rc_t const rc = ArgsOptionValue( args, DumpArgs[ earg_comment ].name, i, (const void **)&parms->comments[ i ] );
+            if ( rc != 0 )
+            {
+                free( ( void * )parms->comments );
+                parms->comments = NULL;
+                return rc;
+            }
+        }
+        return 0;
+    }
+    else
+        return RC( rcExe, rcArgv, rcProcessing, rcMemory, rcExhausted );
+}
+
+
+static rc_t ParseFromTo( int *const pFrom, int *const pTo, char const str[] )
+{
+    /* $str =~ /((\d+)-(\d+))|(-(\d+))|(\d+)/ */
+    int n;
+    char fr_str[ 16 ];
+    char to_str[ 16 ];
+    uint32_t fr = 0;
+    uint32_t to = 0;
+    int i = sscanf( str, "%15[0-9]-%15[0-9]%n", fr_str, to_str, &n );
+    
+    if ( i != 2 )
+    {
+        unsigned const offset = ( str[ 0 ] == '-' ) ? 1 : 0;
+        
+        fr = 0;
+        i = sscanf( str + offset, "%15[0-9]%n", to_str, &n );
+        if ( i != 1 )
+            return RC( rcExe, rcArgv, rcProcessing, rcParam, rcOutofrange );
+        to = strtou32( to_str, 0, 0 );
+    }
+    else
+    {
+        fr = strtou32( fr_str, 0, 0 );
+        to = strtou32( to_str, 0, 0 );
+        
+        if ( to < fr )
+        {
+            uint32_t const tmp = to;
+            to = fr;
+            fr = tmp;
+        }
+    }
+    /* was the entire string consumed */
+    if ( str[ n ] != 0 )
+        return RC( rcExe, rcArgv, rcProcessing, rcParam, rcInvalid );
+    *pFrom = ( int )fr;
+    *pTo = ( int )to;
+    return 0;
+}
+
+
+static rc_t GetDistance( Args const *const args, struct params_s *const parms, unsigned const n )
+{
+    rc_t rc;
+    TMatepairDistance *const mpd = calloc( n, sizeof( mpd[ 0 ] ) );
+    
+    if ( mpd == NULL )
+        rc = RC( rcExe, rcArgv, rcProcessing, rcMemory, rcExhausted );
+    else
+    {
+        unsigned i;
+        unsigned j;
+        
+        for ( j = i = 0; i < n; ++i )
+        {
+            char const *valstr;
+            int from = 0;
+            int to = 0;
+
+            rc = ArgsOptionValue( args, DumpArgs[earg_distance].name, i, (const void **)&valstr );
+            if ( rc != 0 )
+                break;
+            if ( strcasecmp( valstr, "unknown" ) == 0 )
+            {
+                parms->mp_dist_unknown = true;
+                continue;
+            }
+            rc = ParseFromTo( &from, &to, valstr );
+            if ( rc != 0 )
+                break;
+            if ( ( from != 0 ) || ( to != 0 ) )
+            {
+                mpd[ j ].from = from;
+                mpd[ j ].to = to;
+                ++j;
+            }
+        }
+        if ( rc == 0 )
+        {
+            parms->mp_dist = mpd;
+            parms->mp_dist_qty = j;
+            
+            SAM_DUMP_DBG( 2, ( "filter by mate pair distance\n" ) );
+            if ( parms->mp_dist_unknown )
+                SAM_DUMP_DBG( 2, ( "    distance: unknown\n" ) );
+            for ( i = 0; i < j; ++i )
+            {
+                SAM_DUMP_DBG( 2, ( "    distance [%lu-%lu]\n",
+                              parms->mp_dist[ i ].from, parms->mp_dist[ i ].to ) );
+            }
+        }
+        else
+            free( mpd );
+    }
+    return rc;
+}
+
+
+static rc_t GetRegion( Args const *const args, struct params_s *const parms, unsigned const n )
+{
+    rc_t rc;
+    TAlignedRegion *const reg = calloc( n, sizeof( reg[ 0 ] ) );
+    
+    if ( reg == NULL )
+        rc = RC( rcExe, rcArgv, rcProcessing, rcMemory, rcExhausted );
+    else
+    {
+        unsigned i;
+        unsigned j;
+        
+        for ( rc = 0, j = i = 0; i < n; ++i )
+        {
+            char const *valstr;
+            char const *sep;
+            unsigned namelen;
+            unsigned f;
+            unsigned e;
+            TAlignedRegion r;
+
+	    memset(&r,0,sizeof(r));
+            
+            rc = ArgsOptionValue( args, DumpArgs[ earg_region ].name, i, (const void **)&valstr );
+            if ( rc != 0 ) break;
+            
+            sep = strchr( valstr, ':' );
+            if ( sep != NULL )
+                namelen = sep - valstr;
+            else
+                namelen = string_size( valstr );
+            
+            if ( namelen >= sizeof( r.name ) )
+                return RC( rcExe, rcArgv, rcProcessing, rcParam, rcTooLong );
+            
+            memcpy( r.name, valstr, namelen );
+            r.name[ namelen ] = '\0';
+            
+            r.rq = UINT_MAX;
+            if ( sep != NULL )
+            {
+                int from = -1;
+                int to = -1;
+                
+                rc = ParseFromTo( &from, &to, sep + 1 );
+                if ( rc != 0 )
+                    break;
+                if ( from > 0 ) /* convert to 0-based */
+                    --from;
+                else if ( to > 0 )
+                    from = 0;
+                if ( to > 0 )
+                    --to;
+                else if ( from >= 0 && to < 0 )
+                    to = from;
+                if ( from >= 0 || to >= 0 )
+                {
+                    if ( from > to )
+                    {
+                        int tmp = to;
+                        to = from;
+                        from = tmp;
+                    }
+                    r.r[ 0 ].from = from;
+                    r.r[ 0 ].to = to;
+                    r.rq = 1;
+                }
+            }
+            
+            for ( f = 0, e = j; f < e; )
+            {
+                unsigned const m = ( ( f + e ) / 2 );
+                int const diff = strcmp( r.name, reg[ m ].name );
+                
+                if ( diff < 0 )
+                    e = m;
+                else
+                    f = m + 1;
+            }
+            if ( 0 < e && e < j && strcmp( r.name, reg[ e-1 ].name ) == 0 )
+            {
+                TAlignedRegion *const fnd = &reg[ e - 1 ];
+                
+                if ( fnd->rq != UINT_MAX )
+                {
+                    for ( f = 0, e = fnd->rq; f < e; )
+                    {
+                        unsigned const m = ( ( f + e ) / 2 );
+                        
+                        if ( r.r[ 0 ].from < fnd->r[ m ].from )
+                            e = m;
+                        else
+                            f = m + 1;
+                    }
+                    if ( fnd->rq >= ( sizeof( r.r ) / sizeof( r.r[0] ) ) )
+                    {
+                        rc = RC( rcExe, rcArgv, rcProcessing, rcBuffer, rcInsufficient );
+                        break;
+                    }
+                    memmove( &fnd->r[ e +1 ], &fnd->r[ e ], ( fnd->rq - e ) * sizeof( fnd->r[ 0 ] ) );
+                    fnd->r[ e ] = r.r[ 0 ];
+                    ++fnd->rq;
+                }
+            }
+            else
+            {
+                memmove( &reg[ e + 1 ], &reg[ e ], ( j - e ) * sizeof( reg[ 0 ] ) );
+                reg[ e ] = r;
+                ++j;
+            }
+        }
+        if ( rc == 0 )
+        {
+            parms->region = reg;
+            parms->region_qty = j;
+            
+            for ( i = 0; i < parms->region_qty; ++i )
+            {
+                TAlignedRegion *const r = &parms->region[ i ];
+                
+                SAM_DUMP_DBG( 2, ( "filter by %s\n", r->name ) );
+                if ( r->rq == UINT_MAX )
+                {
+                    r->rq = 1;
+                    r->r[ 0 ].from = 0;
+                    r->r[ 0 ].to = UINT_MAX;
+                }
+                for ( j = 0; j < r->rq; ++j )
+                {
+                    unsigned const to = r->r[ j ].to;
+                    unsigned const from = r->r[ j ].from;
+                    
+                    SAM_DUMP_DBG( 2, ( "   range: [%u:%u]\n", r->r[ j ].from, to ) );
+                    if ( r->max_to < to ) r->max_to = to;
+                    if ( r->min_from < from ) r->min_from = from;
+                }
+            }
+        }
+        else
+            free( reg );
+    }
+    return rc;
+}
+
+
+static rc_t GetQualQuant( Args const *const args, struct params_s *const parms )
+{
+    char const *valstr;
+    int i;
+    rc_t rc = ArgsOptionValue( args, DumpArgs[ earg_QualQuant ].name, 0, (const void **)&valstr );
+    
+    if ( rc == 0 && strcmp( valstr, "0" ) != 0 )
+        parms->quantizeQual = QualityQuantizerInitMatrix( parms->qualQuant, valstr );
+    for(i=1; parms->qualQuant[i]==parms->qualQuant[0] && i<256;i++){}
+    if(i<256) parms->qualQuantSingle=0;
+    else      parms->qualQuantSingle = parms->qualQuant[0];
+    return rc;
+}
+
+
+static rc_t GetArgs( Args const *const args, unsigned const count[],
+                     char const **const errmsg )
+{
+    static struct params_s parms;
+    bool const multipass = ParamCount( args, 0 ) > 1;
+    rc_t rc;
+    
+    memset( &parms, 0, sizeof( parms ) );
+    
+    if ( count[ earg_comment ] )
+    {
+        rc = GetComments( args, &parms, count[ earg_comment ] );
+        if ( rc != 0 )
+        {
+            *errmsg = DumpArgs[ earg_comment ].name;
+            return rc;
+        }
+    }
+    
+    if ( count[ earg_region ] && count[ earg_unaligned_only ] == 0 )
+    {
+        rc = GetRegion( args, &parms, count[ earg_region ] );
+        if ( rc != 0 )
+        {
+            *errmsg = DumpArgs[ earg_region ].name;
+            return rc;
+        }
+    }
+
+    if ( count[ earg_distance ] && count[ earg_unaligned_only ] == 0 )
+    {
+        rc = GetDistance( args, &parms, count[ earg_distance ] );
+        if ( rc != 0 )
+        {
+            *errmsg = DumpArgs[ earg_distance ].name;
+            return rc;
+        }
+    }
+
+    if ( count[ earg_QualQuant ] )
+    {
+        rc = GetQualQuant( args, &parms );
+        if ( rc != 0 )
+        {
+            *errmsg = DumpArgs[ earg_QualQuant ].name;
+            return rc;
+        }
+    }
+    
+    parms.cg_sam = ( count[ earg_CG_SAM ] != 0 );
+    parms.cg_evidence = ( count[ earg_CG_evidence ] != 0 );
+    parms.cg_ev_dnb = ( count[ earg_CG_ev_dnb ] != 0 );
+    
+    if ( count[ earg_CG_mappings ] == 0 &&
+         ( parms.cg_sam || parms.cg_evidence || parms.cg_ev_dnb ) )
+    {
+        parms.primaries = false;
+        parms.secondaries = false;
+        parms.unaligned = false;
+    }
+    else
+    {
+        parms.primaries = true;
+        parms.secondaries = ( count[ earg_prim_only ] == 0 );
+        parms.unaligned = ( ( count[ earg_unaligned ] != 0 ) /*&& ( parms.region_qty == 0 )*/ );
+    }
+    
+    parms.long_cigar = ( count[ earg_cigartype ] != 0 );
+    parms.use_seqid = ( ( count[ earg_seq_id ] != 0 ) || multipass );
+    parms.hide_identical = ( count[ earg_identicalbases ] != 0 );
+    parms.fasta = ( count[ earg_fasta ] != 0 );
+    parms.fastq = ( count[ earg_fastq ] != 0 );
+    parms.reverse_unaligned = ( count[ earg_reverse ] != 0 );
+    parms.cg_friendly_names = count[ earg_CG_names ] != 0;
+    parms.spot_group_in_name = ( count[ earg_qname ] != 0 || multipass );
+    parms.noheader = ( ( count[ earg_noheader ] != 0 ) || parms.fasta || parms.fastq || multipass );
+    parms.reheader = ( ( count[ earg_header ] != 0 ) && !parms.noheader );
+    parms.xi = ( count[ earg_XI ] != 0 );
+    if ( ( count[ earg_cigarCG ] == 0 ) && ( count[ earg_cigarCG_merge ] == 0 ) )
+    {
+        parms.cg_style = 0;
+    }
+    else if ( count[ earg_cigarCG ] == 0 )
+    {
+        parms.cg_style = 1;
+        parms.long_cigar = false;
+    }
+    else if ( count[ earg_cigarCG_merge ] == 0 )
+    {
+        parms.cg_style = 2;
+    }
+    else
+    {
+        rc = RC( rcExe, rcArgv, rcProcessing, rcParam, rcInconsistent );
+        *errmsg = "cigar-CG and CG are mutually exclusive";
+        parms.cg_style = 0;
+    }
+
+    if (count[ earg_unaligned_only ] > 0) {
+        parms.unaligned_spots = true;
+        
+        parms.primaries = false;
+        parms.secondaries = false;
+        parms.unaligned = true;
+        parms.cg_ev_dnb = false;
+        parms.cg_evidence = false;
+        parms.cg_sam = false;
+        parms.cg_style = 0;
+    }
+    
+    parms.test_rows = GetOptValU( args, DumpArgs[ earg_test_rows ].name, 0, NULL );
+    parms.mate_row_gap_cachable = GetOptValU( args, DumpArgs[ earg_mate_row_gap_cachable ].name, 1000000, NULL );
+    
+    param = &parms;
+    return 0;
+}
+
+
+static rc_t GetParams( Args const *const args, char const **const errmsg )
+{
+    unsigned count[ ARGS_COUNT ];
+    rc_t rc = CountArgs( args, count, errmsg );
+    
+    if ( rc == 0 )
+        rc = GetArgs( args, count, errmsg );
+    return rc;
+}
+
+
+rc_t CC SAM_Dump_Main( int argc, char* argv[] )
+{
+    rc_t rc = 0;
+    Args* args;
+    char const *errmsg = "stop";
+    bool error_reported = false;
+
+    memset( &g_out_writer, 0, sizeof( g_out_writer ) );
+    KOutHandlerSetStdOut();
+    KStsHandlerSetStdErr();
+    KLogHandlerSetStdErr();
+    (void)KDbgHandlerSetStdErr();
+
+    ReportBuildDate( __DATE__ );
+
+    rc = ArgsMakeAndHandle( &args, argc, argv, 1, DumpArgs, ARGS_COUNT );
+    if ( rc == 0 )
+    {
+        uint32_t pcount;
+
+        rc = ArgsParamCount( args, &pcount );
+        if ( rc != 0 || pcount < 1 )
+        {
+            errmsg = "";
+            rc = argc < 2 ? 0 : RC( rcExe, rcArgv, rcParsing, rcParam, rcInsufficient );
+            MiniUsage( args );
+        }
+        else if ( ( rc = GetParams( args, &errmsg ) ) != 0 )
+        {
+        }
+        else
+        {
+            VDBManager const *mgr;
+            
+            rc = VDBManagerMakeRead( &mgr, NULL );
+            if ( rc == 0 )
+            {
+                rc = BufferedWriterMake( param->output_gzip, param->output_bz2 );
+                if ( rc == 0 )
+                {
+                    unsigned i;
+                    
+                    for ( i = 0; i < pcount; ++i )
+                    {
+                        char const *arg;
+                        
+                        rc = ArgsParamValue( args, i, (const void **)&arg );
+                        if ( rc != 0 ) break;
+                        rc = ProcessPath( mgr, arg );
+#if _ARCH_BITS < 64
+                        /* look for "param excessive while writing vector within container module" */
+                        if (GetRCState(rc) == rcExcessive &&
+                            GetRCObject(rc) == rcParam &&
+                            GetRCContext(rc) == rcWriting &&
+                            GetRCTarget(rc) == rcVector &&
+                            GetRCModule(rc) == rcCont)
+                        {
+                            ( void )PLOGMSG( klogErr, (klogErr, "This run '$(run)' contains too many reads to be processed with a $(bits)-bit executable; please try again with a 64-bit executable.", "run=%s,bits=%u", arg, _ARCH_BITS));
+                        }
+#endif
+                        if ( rc != 0 ) break;
+                    }
+                    BufferedWriterRelease( rc == 0 );
+                }
+                VDBManagerRelease( mgr );
+            }
+        }
+        ArgsWhack( args );
+    }
+
+    if ( rc != 0 && !error_reported )
+    {
+        if ( errmsg[ 0 ] )
+        {
+            ( void )LOGERR( klogErr, rc, errmsg );
+        } else if ( KLogLastErrorCode() != rc )
+        {
+            ( void )LOGERR( klogErr, rc, "stop" );
+        }
+    }
+
+    {
+        /* Report execution environment if necessary */
+        rc_t rc2 = ReportFinalize( rc );
+        if ( rc == 0 )
+            rc = rc2;
+    }
+    return rc;
+}
+
+
+rc_t CC Legacy_KMain( int argc, char* argv[] )
+{
+    char filename[ 4096 ];
+    /*
+       Try to find a option-file - parameter in the original parameters 
+       This is a hack to teach sam-dump to read it's parameters from a file/pipe instead
+       of the commandline
+       It is neccessary because the code above does not use libkapp to parse parameters!
+    */
+    rc_t rc = Args_find_option_in_argv( argc, argv, "--option-file", filename, sizeof filename );
+    if ( rc == 0 )
+    {
+        int new_argc;
+        char ** new_argv;
+        /* we found it! Now comes the special treatment: we fake a new argc/argv-pair! */
+        rc = Args_tokenize_file_and_progname_into_argv( filename, "sam-dump", &new_argc, &new_argv );
+        if ( rc == 0 )
+        {
+            /* pass the faked input-parameters from */
+            rc = SAM_Dump_Main( new_argc, new_argv );
+
+            Args_free_token_argv( new_argc, new_argv );
+        }
+    }
+    else
+    {
+        /* we did not found the special option, just use the commandline-parameters unchanged */
+        rc = SAM_Dump_Main( argc, argv );
+    }
+    return rc;
+}
diff --git a/tools/sra-pileup/sam-dump3.c b/tools/sra-pileup/sam-dump3.c
new file mode 100644
index 0000000..2d80224
--- /dev/null
+++ b/tools/sra-pileup/sam-dump3.c
@@ -0,0 +1,563 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <kapp/main.h>
+#include <vdb/report.h> /* ReportSetVDBManager */
+#include <vdb/vdb-priv.h> /* VDBManagerDisablePagemapThread() */
+#include <klib/report.h>
+#include <sysalloc.h>
+
+#include "sam-dump-opts.h"
+#include "inputfiles.h"
+#include "sam-hdr.h"
+#include "sam-hdr1.h"
+#include "matecache.h"
+#include "cg_tools.h"
+#include "out_redir.h"
+#include "sam-aligned.h"
+#include "sam-unaligned.h"
+
+
+char const *sd_unaligned_usage[]      = { "Output unaligned reads along with aligned reads",
+                                       NULL };
+
+char const *sd_primaryonly_usage[]    = { "Output only primary alignments",
+                                       NULL };
+
+char const *sd_cigartype_usage[]      = { "Output long version of CIGAR",
+                                       NULL };
+
+char const *sd_cigarCG_usage[]        = { "Output CG version of CIGAR",
+                                       NULL };
+
+char const *sd_cigarCGMerge_usage[]   = { "Apply CG fixups to CIGAR/SEQ/QUAL and outputs CG-specific columns",
+                                       NULL };
+
+char const *sd_CG_evidence[]          = { "Output CG evidence aligned to reference", 
+                                       NULL };
+
+char const *sd_CG_ev_dnb[]            = { "Output CG evidence DNB's aligned to evidence",
+                                       NULL };
+
+char const *sd_CG_SAM[]               = { "Output CG evidence DNB's aligned to reference ", 
+                                       NULL };
+
+char const *sd_CG_mappings[]          = { "Output CG sequences aligned to reference ",
+                                       NULL };
+
+char const *sd_header_usage[]         = { "Always reconstruct header",
+                                       NULL };
+
+char const *sd_header_file_usage[]    = { "take all headers from this file",
+                                       NULL };
+
+char const *sd_noheader_usage[]       = { "Do not output headers",
+                                       NULL };
+
+char const *sd_region_usage[]         = { "Filter by position on genome.",
+                                       "Name can either be file specific name (ex: \"chr1\" or \"1\").",
+                                       "\"from\" and \"to\" (inclusive) are 1-based coordinates",
+                                       NULL };
+
+char const *sd_distance_usage[]       = { "Filter by distance between matepairs.",
+                                       "Use \"unknown\" to find matepairs split between the references.",
+                                       "Use from-to (inclusive) to limit matepair distance on the same reference",
+                                       NULL };
+
+char const *sd_seq_id_usage[]         = { "Print reference SEQ_ID in RNAME instead of NAME",
+                                       NULL };
+
+char const *sd_identicalbases_usage[] = { "Output '=' if base is identical to reference",
+                                       NULL };
+
+char const *sd_gzip_usage[]           = { "Compress output using gzip",
+                                       NULL };
+
+char const *sd_bzip2_usage[]          = { "Compress output using bzip2",
+                                       NULL };
+
+char const *sd_qname_usage[]          = { "Add .SPOT_GROUP to QNAME",
+                                       NULL };
+
+char const *sd_fasta_usage[]          = { "Produce Fasta formatted output",
+                                       NULL };
+
+char const *sd_fastq_usage[]          = { "Produce FastQ formatted output",
+                                       NULL };
+
+char const *sd_prefix_usage[]         = { "Prefix QNAME: prefix.QNAME",
+                                       NULL };
+
+char const *sd_reverse_usage[]        = { "Reverse unaligned reads according to read type",
+                                       NULL };
+
+char const *sd_comment_usage[]        = { "Add comment to header. Use multiple times for several lines. Use quotes",
+                                       NULL };
+
+char const *sd_XI_usage[]             = { "Output cSRA alignment id in XI column",
+                                       NULL };
+
+char const *sd_qual_quant_usage[]     = { "Quality scores quantization level",
+                                       "a string like '1:10,10:20,20:30,30:-'",
+                                       NULL };
+
+char const *sd_report_usage[]         = { "report options instead of executing",
+                                       NULL };
+
+char const *sd_outputfile_usage[]     = { "print output into this file (instead of STDOUT)",
+                                       NULL };
+
+char const *sd_outbufsize_usage[]     = { "size of output-buffer(dflt:32k, 0...off)",
+                                       NULL };
+
+char const *sd_cachereport_usage[]    = { "print report about mate-pair-cache",
+                                       NULL };
+
+char const *sd_unaligned_only_usage[] = { "output reads for spots with no aligned reads",
+                                       NULL };
+
+char const *sd_cg_names_usage[]       = { "prints cg-style spotgroup.spotid formed names",
+                                       NULL };
+
+char const *sd_cur_cache_usage[]      = { "open cached cursor with this size",
+                                       NULL };
+
+char const *sd_min_mapq_usage[]       = { "min. mapq an alignment has to have, to be printed",
+                                       NULL };
+
+char const *sd_no_mate_cache_usage[]  = { "do not use a mate-cache, slower but less memory usage",
+                                       NULL };
+
+char const *rna_splice_usage[]        = { "modify cigar-string (replace .D. with .N.) and add output flags (XS:A:+/-) ",
+                                           "when rna-splicing is detected by match to spliceosome recognition sites",
+                                       NULL };
+
+char const *rna_splicel_usage[]       = { "level of rna-splicing detection (0,1,2)",
+                                           "when testing for spliceosome recognition sites ",
+                                           "0=perfect match, 1=one mismatch, 2=two mismatches ",
+                                           "one on each site",
+                                       NULL };
+
+char const *rna_splice_log_usage[]    = { "file, into which rna-splice events are written", NULL };
+
+char const *no_mt_usage[]             = { "disable multithreading", NULL };
+
+char const *with_md_flag_usage[]      = { "print MD-flag", NULL };
+                                      
+OptDef SamDumpArgs[] =
+{
+    { OPT_UNALIGNED,     "u", NULL, sd_unaligned_usage,      0, false, false },  /* print unaligned reads */
+    { OPT_PRIM_ONLY,     "1", NULL, sd_primaryonly_usage,    0, false, false },  /* print only primary alignments */
+    { OPT_CIGAR_LONG,    "c", NULL, sd_cigartype_usage,      0, false, false },  /* use long cigar-string instead of short */
+    { OPT_CIGAR_CG,     NULL, NULL, sd_cigarCG_usage,        0, false, false },  /* transform cigar into cg-style ( has B/N ) */
+    { OPT_RECAL_HDR,     "r", NULL, sd_header_usage,         0, false, false },  /* recalculate header */
+    { OPT_HDR_FILE,     NULL, NULL, sd_header_file_usage,    0, true, false },  /* take headers from file */
+    { OPT_NO_HDR,        "n", NULL, sd_noheader_usage,       0, false, false },  /* do not print header */
+    { OPT_HDR_COMMENT,  NULL, NULL, sd_comment_usage,        0, true,  false },  /* insert this comment into header */
+    { OPT_REGION,       NULL, NULL, sd_region_usage,         0, true,  false },  /* filter by region */
+    { OPT_MATE_DIST,    NULL, NULL, sd_distance_usage,       0, true,  false },  /* filter by a list of mate-pair-distances */
+    { OPT_USE_SEQID,     "s", NULL, sd_seq_id_usage,         0, false, false },  /* print seq-id instead of seq-name*/
+    { OPT_HIDE_IDENT,    "=", NULL, sd_identicalbases_usage, 0, false, false },  /* replace bases that match the reference with '=' */
+    { OPT_GZIP,         NULL, NULL, sd_gzip_usage,           0, false, false },  /* compress the output with gzip */
+    { OPT_BZIP2,        NULL, NULL, sd_bzip2_usage,          0, false, false },  /* compress the output with bzip2 */
+    { OPT_SPOTGRP,       "g", NULL, sd_qname_usage,          0, false, false },  /* add spotgroup to qname */
+    { OPT_FASTQ,        NULL, NULL, sd_fastq_usage,          0, false, false },  /* output-format = fastq ( instead of SAM ) */
+    { OPT_FASTA,        NULL, NULL, sd_fasta_usage,          0, false, false },  /* output-format = fasta ( instead of SAM ) */
+    { OPT_PREFIX,        "p", NULL, sd_prefix_usage,         0, true,  false },  /* prefix QNAME with this string */
+    { OPT_REVERSE,      NULL, NULL, sd_reverse_usage,        0, false, false },  /* reverse unaligned reads if reverse-flag set*/
+    { OPT_MATE_GAP,     NULL, NULL, NULL,                    0, true,  false },  /* int value, mate's farther apart than this are not cached */
+    { OPT_CIGAR_CG_M,   NULL, NULL, sd_cigarCGMerge_usage,   0, false, false },  /* transform cg-data(length of read/patterns in cigar) into valid SAM (cigar/READ/QUALITY)*/
+    { OPT_XI_DEBUG,     NULL, NULL, sd_XI_usage,             0, false, false },  /* output alignment id for debugging... XI:I:NNNNNNN */
+    { OPT_Q_QUANT,       "Q", NULL, sd_qual_quant_usage,     0, true,  false },  /* quality-quantization string */
+    { OPT_CG_EVIDENCE,  NULL, NULL, sd_CG_evidence,          0, false, false },  /* CG-evidence */
+    { OPT_CG_EV_DNB,    NULL, NULL, sd_CG_ev_dnb,            0, false, false },  /* CG-ev-dnb */
+    { OPT_CG_MAPP,      NULL, NULL, sd_CG_mappings,          0, false, false },  /* CG-mappings */
+    { OPT_CG_SAM,       NULL, NULL, sd_CG_SAM,               0, false, false },  /* cga-tools emulation mode */
+    { OPT_REPORT,       NULL, NULL, sd_report_usage,         0, false, false },  /* report options instead of executing */
+    { OPT_OUTPUTFILE,   NULL, NULL, sd_outputfile_usage,     0, true,  false },  /* write into output-file */
+    { OPT_OUTBUFSIZE,   NULL, NULL, sd_outbufsize_usage,     0, true,  false },  /* size of output-buffer */
+    { OPT_CACHEREPORT,  NULL, NULL, sd_cachereport_usage,    0, false, false },  /* report usage of mate-pair-cache */
+    { OPT_UNALIGNED_ONLY,NULL, NULL, sd_unaligned_only_usage, 0, false, false }, /* print only unaligned spots */
+    { OPT_CG_NAMES,     NULL, NULL, sd_cg_names_usage,       0, false, false },  /* print cg-style spotnames */
+    { OPT_CURSOR_CACHE, NULL, NULL, sd_cur_cache_usage,      0, true,  false },  /* size of cursor cache */
+    { OPT_MIN_MAPQ,     NULL, NULL, sd_min_mapq_usage,       0, true,  false },  /* minimal mapping quality */
+    { OPT_NO_MATE_CACHE,NULL, NULL, sd_no_mate_cache_usage,  0, false, false },  /* do not use mate-cache */
+    { OPT_RNA_SPLICE,   NULL, NULL, rna_splice_usage,        0, false, false },  /* detect rna-splicing in sequence */
+    { OPT_RNA_SPLICEL,  NULL, NULL, rna_splicel_usage,       0, true,  false },  /* level of rna-splicing detection */
+    { OPT_RNA_SPLICE_LOG,  NULL, NULL, rna_splice_log_usage, 0, true,  false },  /* filename to log rna-splice events into */
+    { OPT_NO_MT,        NULL, NULL, no_mt_usage,              0, false, false },   /* force new code-path */    
+    { OPT_MD_FLAG,		NULL, NULL, with_md_flag_usage,       0, false, false },    /* print the MD-flag */	
+    { OPT_DUMP_MODE,    NULL, NULL, NULL,                    0, true,  false },  /* how to produce aligned reads if no regions given */
+    { OPT_CIGAR_TEST,   NULL, NULL, NULL,                    0, true,  false },  /* test cg-treatment of cigar string */
+    { OPT_LEGACY,       NULL, NULL, NULL,                    0, false, false },  /* force legacy code-path */
+    { OPT_NEW,          NULL, NULL, NULL,                    0, false, false },   /* force new code-path */
+    { OPT_TIMING,       NULL, NULL, NULL,                    0, true, false }    /* optional timing */
+};
+
+char const *sd_usage_params[] =
+{
+    NULL,                       /* unaligned */
+    NULL,                       /* primaryonly */
+    NULL,                       /* cigartype */
+    NULL,                       /* cigarCG */
+    NULL,                       /* recalc header */
+    "filename",                 /* take headers from file */
+    NULL,                       /* no-header */
+    "text",                     /* hdr-comment */
+    "name[:from-to]",           /* region */
+    "from-to|'unknown'",        /* mate distance filter*/
+    NULL,                       /* seq-id */
+    NULL,                       /* identical-bases */
+    NULL,                       /* gzip */
+    NULL,                       /* bzip2 */
+    NULL,                       /* qname */
+    NULL,                       /* fasta */
+    NULL,                       /* fastq */
+    "prefix",                   /* prefix */
+    NULL,                       /* reverse */
+    NULL,                       /* mate-row-gap-cacheable */
+    NULL,                       /* cigarCGMerge */
+    NULL,                       /* XI */
+    "quantization string",      /* qual-quant */
+    NULL,                       /* CG-evidence */
+    NULL,                       /* CG-ev-dnb */
+    NULL,                       /* CG-mappings */
+    NULL,                       /* CG-SAM */
+    NULL,                       /* report */
+    NULL,                       /* outputfile */
+    NULL,                       /* outputfile buffsize */
+    NULL,                       /* cachereport */
+    NULL,                       /* unaligned-only */
+    NULL,                       /* CG-names */
+    NULL,                       /* cursor cache */
+    NULL,                       /* min_mapq */
+    NULL,                       /* no mate-cache */
+    NULL,                       /* detect rna-splicing in sequence */
+    NULL,                       /* level of rna-splicing detection */
+    NULL,                       /* file to log rna-splice-events into */
+    NULL,                       /* no-mt */
+    NULL,                       /* with-md-flag */	
+    NULL,                       /* dump_mode */
+    NULL,                       /* cigar test */
+    NULL,                       /* force legacy code path */
+    NULL,                       /* force new code path */
+    NULL                        /* optional timing */
+};
+
+const char UsageDefaultName[] = "sam-dump";
+
+
+rc_t CC UsageSummary( char const *progname )
+{
+    return KOutMsg( "Usage:\n"
+        "\t%s [options] path-to-run[ path-to-run ...]\n\n", progname );
+}
+
+
+rc_t CC Usage( Args const *args )
+{
+    char const *progname = UsageDefaultName;
+    char const *fullpath = UsageDefaultName;
+    rc_t rc;
+    unsigned i, n;
+
+    rc = ArgsProgram( args, &fullpath, &progname );
+
+    UsageSummary( progname );
+
+    KOutMsg( "Options:\n" );
+
+    n = sizeof( SamDumpArgs ) / sizeof( SamDumpArgs[ 0 ] );
+    n--; /* do not print the last option in the SamDumpArgs as help */
+    for( i = 0; i < n; i++ )
+    {
+        if ( SamDumpArgs[ i ].help != NULL )
+        {
+            HelpOptionLine( SamDumpArgs[ i ].aliases, SamDumpArgs[ i ].name,
+                            sd_usage_params[ i ], SamDumpArgs[ i ].help );
+        }
+    }
+    KOutMsg( "\n" );
+    HelpOptionsStandard();
+
+    HelpVersion( fullpath, KAppVersion() );
+
+    return rc;
+}
+
+
+/* =========================================================================================== */
+
+
+static rc_t CC write_to_FILE( void *f, const char *buffer, size_t bytes, size_t *num_writ )
+{
+    * num_writ = fwrite ( buffer, 1, bytes, f );
+    if ( * num_writ != bytes )
+        return RC( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+    return 0;
+}
+
+
+/* =========================================================================================== */
+
+
+static uint32_t tabsel_2_ReferenceList_Options( const samdump_opts * opts )
+{
+    uint32_t res = 0;
+    if ( opts->dump_primary_alignments )
+        res |= ereferencelist_usePrimaryIds;
+    if ( opts->dump_secondary_alignments )
+        res |= ereferencelist_useSecondaryIds;
+    if ( opts->dump_cg_evidence | opts->dump_cg_ev_dnb | opts->dump_cg_sam )
+        res |= ereferencelist_useEvidenceIds;
+    return res;
+}
+
+
+static rc_t print_samdump( const samdump_opts * const opts )
+{
+    KDirectory *dir;
+
+    rc_t rc = KDirectoryNativeDir( &dir );
+    if ( rc != 0 )
+    {
+        (void)LOGERR( klogErr, rc, "cannot create native directory" );
+    }
+    else
+    {
+        const VDBManager *mgr;
+        rc = VDBManagerMakeRead( &mgr, dir );
+        if ( rc != 0 )
+        {
+            (void)LOGERR( klogErr, rc, "cannot create vdb-manager" );
+        }
+        else
+        {
+            input_files * ifs; /* input_files.h */
+            uint32_t reflist_opt = tabsel_2_ReferenceList_Options( opts );
+
+            ReportSetVDBManager( mgr ); /**/
+
+            if ( opts->no_mt )
+            {
+                rc = VDBManagerDisablePagemapThread ( mgr );
+                if ( rc != 0 )
+                {
+                    LOGERR( klogInt, rc, "VDBManagerDisablePagemapThread() failed" );
+                }
+            }
+
+            if ( rc == 0 )
+            {
+                rc = discover_input_files( &ifs, mgr, opts->input_files, reflist_opt ); /* inputfiles.c */
+                if ( rc == 0 )
+                {
+                    if ( ifs->database_count == 0 && ifs->table_count == 0 )
+                    {
+                        rc = RC( rcExe, rcFile, rcReading, rcItem, rcNotFound );
+                        (void)LOGERR( klogErr, rc, "input object(s) not found" );
+                    }
+                    else
+                    {
+                        matecache * mc = NULL;
+
+                        if ( opts->use_mate_cache )
+                            rc = make_matecache( &mc, ifs->database_count );
+
+                        if ( rc == 0 )
+                        {
+                            /* print output of header */
+                            if ( ( opts->output_format == of_sam )  &&
+                                 ( ifs->database_count > 0 )        &&
+                                 ( opts->header_mode != hm_none )   &&
+                                 !opts->dump_unaligned_only ) 
+                            /* ------------------------------------------------------ */
+                                rc = print_headers_1( opts, ifs ); /* sam-hdr.c */
+                            /* ------------------------------------------------------ */
+
+
+                            /* print output of aligned reads */
+                            if ( rc == 0 && 
+                                 ifs->database_count > 0 && 
+                                 !opts->dump_unaligned_only )
+                            /* ------------------------------------------------------ */
+                                rc = print_aligned_spots( opts, ifs, mc ); /* sam-aligned.c */
+                            /* ------------------------------------------------------ */
+
+
+                            /* print output of unaligned reads */
+                            if ( rc == 0 )
+                            {
+                                /* ------------------------------------------------------ */
+                                rc = print_unaligned_spots( opts, ifs, mc ); /* sam-unaligned.c */
+                                /* ------------------------------------------------------ */
+                            }
+
+                            if ( opts->use_mate_cache )
+                            {
+                                if ( opts->report_cache )
+                                    rc = matecache_report( mc ); /* matecache.c */
+                                release_matecache( mc ); /* matecache.c */
+                            }
+                        }
+                    }
+                    release_input_files( ifs ); /* inputfiles.c */
+                }
+            }
+            VDBManagerRelease( mgr );
+        }
+        KDirectoryRelease( dir );
+    }
+    return rc;
+}
+
+
+static rc_t perform_cigar_test( const samdump_opts * const opts )
+{
+    rc_t rc;
+    cg_cigar_input input;
+    cg_cigar_output output;
+
+    memset( &input, 0, sizeof input );
+    memset( &output, 0, sizeof output );
+
+    input.p_cigar.len = string_size( opts->cigar_test );
+    input.p_cigar.ptr = opts->cigar_test;
+
+    rc = make_cg_cigar( &input, &output );
+    if ( rc == 0 )
+    {
+        KOutMsg( "%s\n", output.cigar );
+    }
+    else
+    {
+        (void)PLOGERR( klogErr, ( klogErr, rc, "error testing cg-cigar treatment '$(t)'", 
+                                  "t=%s", opts->cigar_test ) );
+    }
+    return rc;
+}
+
+/* =========================================================================================== */
+
+static rc_t samdump_main( Args * args, const samdump_opts * const opts )
+{
+    rc_t rc = 0;
+    out_redir redir; /* from out_redir.h */
+    enum out_redir_mode mode;
+
+    switch( opts->output_compression )
+    {
+        case oc_none  : mode = orm_uncompressed; break;
+        case oc_gzip  : mode = orm_gzip; break;
+        case oc_bzip2 : mode = orm_bzip2; break;
+    }
+
+    rc = init_out_redir( &redir, mode, opts->outputfile, opts->output_buffer_size ); /* from out_redir.c */
+    if ( rc == 0 )
+    {
+        if ( opts->report_options )
+        {
+            report_options( opts ); /* from sam-dump-opts.c */
+        }
+        else if ( opts->cigar_test != NULL )
+        {
+            rc = perform_cigar_test( opts );
+        }
+        else
+        {
+            if ( opts->input_file_count < 1 )
+            {
+                rc = RC( rcExe, rcArgv, rcParsing, rcParam, rcInvalid );
+                (void)LOGERR( klogErr, rc, "no inputfiles given at commandline" );
+                Usage( args );
+            }
+            else
+            {
+            /* ------------------------------------------------------ */
+                rc = print_samdump( opts );
+            /* ------------------------------------------------------ */
+            }
+        }
+        release_out_redir( &redir ); /* from out_redir.c */
+    }
+    return rc;
+}
+
+
+/* forward declaration, code is in sam-dump.c */
+rc_t CC Legacy_KMain( int argc, char* argv[] );
+
+
+rc_t CC KMain( int argc, char *argv [] )
+{
+    bool call_legacy_dumper = false;
+
+    rc_t rc = KOutHandlerSet( write_to_FILE, stdout );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "KOutHandlerSet() failed" );
+    }
+    else
+    {
+        Args * args;
+
+        KLogHandlerSetStdErr();
+        rc = ArgsMakeAndHandle( &args, argc, argv, 1, 
+                                SamDumpArgs, sizeof SamDumpArgs / sizeof SamDumpArgs [ 0 ] );
+        if ( rc == 0 )
+        {
+            samdump_opts opts; /* from sam-dump-opts.h */
+
+            memset( &opts, 0, sizeof opts );
+            rc = gather_options( args, &opts ); /* from sam-dump-opts.c */
+            if ( rc == 0 )
+            {
+                call_legacy_dumper = opts.force_legacy;
+                if ( !call_legacy_dumper )
+                {
+                    ReportBuildDate( __DATE__ );
+                    rc = samdump_main( args, &opts );
+                }
+                /* because the options have sub-structures, like tree/vector's */
+                release_options( &opts ); /* from sam-dump-opts.c */
+            }
+            ArgsWhack( args );
+        }
+    }
+
+    /* trick to call the legacy sam-dump code if cg-functionality is requested */
+    if ( call_legacy_dumper )
+    {
+        rc = Legacy_KMain( argc, argv );
+    }
+    else
+    {
+        /* Report execution environment if necessary */
+        rc_t rc2 = ReportFinalize( rc );
+        if ( rc == 0 )
+            rc = rc2;
+    }
+    return rc;
+}
diff --git a/tools/sra-pileup/sam-hdr.c b/tools/sra-pileup/sam-hdr.c
new file mode 100644
index 0000000..1e5ca02
--- /dev/null
+++ b/tools/sra-pileup/sam-hdr.c
@@ -0,0 +1,728 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/time.h>
+#include <kfs/file.h>
+#include <kfs/filetools.h>
+#include <kdb/meta.h>
+#include <kdb/namelist.h>
+#include <align/reference.h>
+#include <sysalloc.h>
+
+#include "sam-dump-opts.h"
+#include "inputfiles.h"
+
+static rc_t print_headers_from_metadata( const VDatabase * db, bool * recalc, const char * path )
+{
+    const KMetadata * meta;
+    rc_t rc = VDatabaseOpenMetadataRead( db, &meta );
+    if ( rc != 0 )
+        (void)PLOGERR( klogErr, ( klogErr, rc, "cannot open metadata from '$(t)'", "t=%s", path ) );
+    else
+    {
+        const KMDataNode * node;
+        rc = KMetadataOpenNodeRead( meta, &node, "BAM_HEADER" );
+        if ( rc != 0 )
+        {
+            if ( GetRCState( rc ) == rcNotFound )
+            {
+                *recalc = true;
+                rc = 0;
+            }
+            else
+                (void)PLOGERR( klogErr, ( klogErr, rc, "cannot open meta-node 'BAM_HEADER' from '$(t)'", "t=%s", path ) );
+        }
+        else
+        {
+            size_t offset = 0, num_read, remaining = ~0;
+            char buffer[ 40960 ];
+            while ( rc == 0 && remaining > 0 )
+            {
+                rc = KMDataNodeRead( node, offset, buffer, sizeof( buffer ),
+                                     &num_read, &remaining );
+                if ( rc == 0 )
+                {
+                    rc = KOutMsg( "%.*s", ( uint32_t )num_read, buffer );
+                    offset += num_read;
+                }
+            }
+            if ( rc == 0 && buffer[ num_read - 1 ] != '\n' )
+            {
+                rc = KOutMsg( "\n" );
+            }
+            KMDataNodeRelease( node );
+        }
+        KMetadataRelease( meta );
+    }
+    return rc;
+}
+
+
+typedef struct seq_id_node
+{
+    BSTNode node;
+    char * seq_id;
+    char * name;
+    INSDC_coord_len seq_len;
+} seq_id_node;
+
+
+static int cmp_pchar_0( const char * a, const char * b )
+{
+    int res = 0;
+    if ( ( a != NULL )&&( b != NULL ) )
+    {
+        size_t len_a = string_size( a );
+        size_t len_b = string_size( b );
+        res = string_cmp ( a, len_a, b, len_b, ( len_a < len_b ) ? len_b : len_a );
+    }
+    return res;
+}
+
+
+static seq_id_node * make_seq_id_node( const char * seq_id, const char * name, INSDC_coord_len seq_len )
+{
+    seq_id_node *res = calloc( sizeof *res, 1 );
+    if ( res != NULL )
+    {
+        res->name = string_dup( name, string_size( name ) );
+        res->seq_id = string_dup( seq_id, string_size( seq_id ) );
+        res->seq_len = seq_len;
+    }
+    return res;
+}
+
+
+static void free_seq_id_node( seq_id_node * node )
+{
+    if ( node != NULL )
+    {
+        if ( node->seq_id != NULL )
+            free( node->seq_id );
+        if ( node->name != NULL )
+            free( node->name );
+        free( node );
+    }
+}
+
+
+static void CC free_seq_id_tree_callback( BSTNode *n, void * data )
+{
+    free_seq_id_node( ( seq_id_node * )n );
+}
+
+
+static void free_seq_id_tree( BSTree * tree )
+{
+    BSTreeWhack( tree, free_seq_id_tree_callback, NULL );
+}
+
+
+static int64_t CC seq_id_node_vs_pchar_wrapper( const void *item, const BSTNode *n )
+{
+    const seq_id_node * node = ( const seq_id_node * )n;
+    return cmp_pchar_0( (const char *)item, node->seq_id );
+}
+
+
+static seq_id_node * find_seq_id_node( BSTree * tree, const char * key )
+{
+    return ( seq_id_node * ) BSTreeFind( tree, key, seq_id_node_vs_pchar_wrapper );
+}
+
+
+static int64_t CC node_vs_node_wrapper( const BSTNode *item, const BSTNode *n )
+{
+   const seq_id_node * a = ( const seq_id_node * )item;
+   const seq_id_node * b = ( const seq_id_node * )n;
+   return cmp_pchar_0( a->seq_id, b->seq_id );
+}
+
+
+static rc_t add_seq_id_node( BSTree * tree, const char * seq_id, const char * name, INSDC_coord_len len )
+{
+    rc_t rc = 0;
+    seq_id_node * node = make_seq_id_node( seq_id, name, len );
+    if ( node != NULL )
+    {
+        rc = BSTreeInsert( tree, (BSTNode *)node, node_vs_node_wrapper );
+        if ( rc != 0 )
+            free_seq_id_node( node );
+    }
+    else
+        rc = RC( rcApp, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+    return rc;
+}
+
+
+static rc_t build_seq_id_tree( BSTree * tree, input_files * ifs )
+{
+    rc_t rc = 0;
+    uint32_t i;
+    for ( i = 0; i < ifs->database_count && rc == 0; ++i )
+    {
+        input_database * id = VectorGet( &ifs->dbs, i );
+        if ( id != NULL )
+        {
+            uint32_t rcount;
+            rc = ReferenceList_Count( id->reflist, &rcount );
+            if ( rc == 0 && rcount > 0 )
+            {
+                uint32_t r_idx;
+                for ( r_idx = 0; r_idx < rcount && rc == 0; ++r_idx )
+                {
+                    const ReferenceObj * ref_obj;
+                    rc = ReferenceList_Get( id->reflist, &ref_obj, r_idx );
+                    if ( rc == 0 && ref_obj != NULL )
+                    {
+                        const char * seqid;
+                        rc = ReferenceObj_SeqId( ref_obj, &seqid );
+                        if ( rc == 0 )
+                        {
+                            const char * name;
+                            rc = ReferenceObj_Name( ref_obj, &name );
+                            if ( rc == 0 )
+                            {
+                                INSDC_coord_len seq_len;
+                                rc = ReferenceObj_SeqLength( ref_obj, &seq_len );
+                                if ( rc == 0 )
+                                {
+                                    seq_id_node * node = find_seq_id_node( tree, seqid );
+                                    if ( node != NULL )
+                                    {
+                                        if ( node->seq_len != seq_len )
+                                            rc = RC( rcApp, rcNoTarg, rcConstructing, rcData, rcInvalid );
+                                    }
+                                    else
+                                        rc = add_seq_id_node( tree, seqid, name, seq_len );
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+typedef struct hdr_print_ctx
+{
+    rc_t rc;
+    bool use_seq_id;
+} hdr_print_ctx;
+
+
+static void CC print_header_callback( BSTNode *n, void *data )
+{
+    seq_id_node * node = ( seq_id_node * )n;
+    hdr_print_ctx * hctx = ( hdr_print_ctx * )data;
+    if ( hctx->rc == 0 )
+    {
+        if ( hctx->use_seq_id )
+            hctx->rc = KOutMsg( "@SQ\tSN:%s\tLN:%u\n", node->seq_id, node->seq_len );
+        else
+        {
+            if ( cmp_pchar_0( node->seq_id, node->name ) == 0 )
+                hctx->rc = KOutMsg( "@SQ\tSN:%s\tLN:%u\n", node->name, node->seq_len );
+            else
+                hctx->rc = KOutMsg( "@SQ\tSN:%s\tAS:%s\tLN:%u\n", node->name, node->seq_id, node->seq_len );
+        }
+    }
+}
+
+
+static rc_t extract_spotgroups_from_stats( VNamelist * spotgroups, input_database * id, const KMetadata * meta )
+{
+    const KMDataNode * node;
+    rc_t rc = KMetadataOpenNodeRead( meta, &node, "STATS/SPOT_GROUP" );
+    if ( rc != 0 )
+       (void)PLOGERR( klogErr, ( klogErr, rc, "cannot open meta-node 'STATS/SPOT_GROUP' from '$(t)'", "t=%s", id->path ) );
+    else
+    {
+        KNamelist * node_childs;
+        rc = KMDataNodeListChildren( node, &node_childs );
+        if ( rc != 0 )
+            (void)PLOGERR( klogErr, ( klogErr, rc, "cannot list children of SPOT_GROUP-node in '$(t)'", "t=%s", id->path ) );
+        else
+        {
+            uint32_t n_count;
+            rc = KNamelistCount( node_childs, &n_count );
+            if ( rc == 0 && n_count > 0 )
+            {
+                uint32_t n_idx;
+                for ( n_idx = 0; n_idx < n_count && rc == 0; ++n_idx )
+                {
+                    const char * spotgroup;
+                    rc = KNamelistGet( node_childs, n_idx, &spotgroup );
+                    if ( rc == 0 && spotgroup != NULL )
+                    {
+                        uint32_t found;
+                        rc_t rc1 = VNamelistIndexOf( spotgroups, spotgroup, &found );
+                        if ( GetRCState( rc1 ) == rcNotFound )
+                            rc = VNamelistAppend( spotgroups, spotgroup );
+                    }
+                }
+            }
+            KNamelistRelease( node_childs );
+        }
+        KMDataNodeRelease( node );
+    }
+    return rc;
+}
+
+
+#define STATE_ALPHA 0
+#define STATE_LF 1
+#define STATE_NL 2
+
+typedef struct buffer_range
+{
+    const char * start;
+    uint32_t processed, count, state;
+} buffer_range;
+
+
+static const char empty_str[ 2 ] = { ' ', 0 };
+
+
+static rc_t LoadFromBuffer( buffer_range * range,
+                            rc_t ( CC * wr ) ( void * dst, const String * S ), 
+                            void * dst )
+{
+    rc_t rc = 0;
+    uint32_t idx;
+    const char * p = range->start;
+    String S, S_empty;
+
+    S.addr = p;
+    S.len = S.size = range->processed;
+    S_empty.addr = empty_str;
+    S_empty.len = S_empty.size = 1;
+    for ( idx = range->processed; idx < range->count && rc == 0; ++idx )
+    {
+        switch( p[ idx ] )
+        {
+            case 0x0A : switch( range->state )
+                        {
+                            case STATE_ALPHA : /* ALPHA --> LF */
+                                                rc = wr ( dst, &S );
+                                                range->state = STATE_LF;
+                                                break;
+
+                            case STATE_LF : /* LF --> LF */
+                                             rc = wr ( dst, &S_empty );
+                                             break;
+
+                            case STATE_NL : /* NL --> LF */
+                                             rc = wr ( dst, &S_empty );
+                                             range->state = STATE_LF;
+                                             break;
+                        }
+                        break;
+
+            case 0x0D : switch( range->state )
+                        {
+                            case STATE_ALPHA : /* ALPHA --> NL */
+                                                rc = wr( dst, &S_empty );
+                                                range->state = STATE_NL;
+                                                break;
+
+                            case STATE_LF : /* LF --> NL */
+                                             range->state = STATE_NL;
+                                             break;
+
+                            case STATE_NL : /* NL --> NL */
+                                             rc = wr ( dst, &S_empty );
+                                             break;
+                        }
+                        break;
+
+            default   : switch( range->state )
+                        {
+                            case STATE_ALPHA : /* ALPHA --> ALPHA */
+                                                S.len++; S.size++;
+                                                break;
+
+                            case STATE_LF : /* LF --> ALPHA */
+                                             S.addr = &p[ idx ]; S.len = S.size = 1;
+                                             range->state = STATE_ALPHA;
+                                             break;
+
+                            case STATE_NL : /* NL --> ALPHA */
+                                             S.addr = &p[ idx ]; S.len = S.size = 1;
+                                             range->state = STATE_ALPHA;
+                                             break;
+                        }
+                        break;
+        }
+    }
+    if ( range->state == STATE_ALPHA )
+    {
+        range->start = S.addr;
+        range->count = S.len;
+    }
+    else
+        range->count = 0;
+    return rc;
+}
+
+
+static rc_t read_2_namelist( VNamelist * namelist, char * buffer, size_t bsize,
+                             rc_t ( CC * rd ) ( const void * src, uint64_t pos, void * buffer, size_t bsize, size_t * num_read ),
+                             rc_t ( CC * wr ) ( void * dst, const String * S ),
+                             const void * src, void * dst )
+{
+    rc_t rc = 0;
+    uint64_t pos = 0;
+    buffer_range range;
+    bool done = false;
+
+    range.start = buffer;
+    range.count = 0;
+    range.processed = 0;
+    range.state = STATE_ALPHA;
+
+    do
+    {
+        size_t num_read;
+        rc = rd ( src, pos, ( char * )( range.start + range.processed ),
+                            bsize - range.processed, &num_read );
+        if ( rc == 0 )
+        {
+            done = ( num_read == 0 );
+            if ( !done )
+            {
+                range.start = buffer;
+                range.count = range.processed + num_read;
+
+                LoadFromBuffer( &range, wr, dst );
+                if ( range.count > 0 )
+                {
+                    memmove ( buffer, range.start, range.count );
+                }
+                range.start = buffer;
+                range.processed = range.count;
+
+                pos += num_read;
+            }
+            else if ( range.state == STATE_ALPHA )
+            {
+                String S;
+                S.addr = range.start;
+                S.len = S.size = range.count;
+                rc = wr ( dst, &S );
+            }
+        }
+    } while ( rc == 0 && !done );
+
+    return rc;
+}
+
+
+static rc_t CC write_to_namelist( void * dst, const String * S )
+{
+    rc_t rc = 0;
+    VNamelist * namelist = dst;
+    if ( S->len > 3 && S->addr[ 0 ] == '@' && S->addr[ 1 ] == 'R' && S->addr[ 2 ] == 'G' )
+        rc = VNamelistAppendString ( namelist, S );
+    return rc;
+}
+
+static rc_t CC read_from_metadata_node( const void * src, uint64_t pos, void * buffer, size_t bsize, size_t * num_read )
+{
+    const KMDataNode * node = src;
+    size_t remaining;
+    return KMDataNodeRead( node, pos, buffer, bsize, num_read, &remaining );
+}
+
+
+static rc_t extract_spotgroups_from_bam_hdr( VNamelist * spotgroups, input_database * id, const KMetadata * meta )
+{
+    const KMDataNode * node;
+    rc_t rc = KMetadataOpenNodeRead( meta, &node, "BAM_HEADER" );
+    /* do not report if the node cannot be found, because this would produce an error message when a database does
+       not have this node, which can is OK */
+    if ( rc == 0 )
+    {
+        char buffer[ 4096 ];
+        rc = read_2_namelist( spotgroups, buffer, sizeof buffer, 
+                              read_from_metadata_node, write_to_namelist,
+                              node, spotgroups );
+        KMDataNodeRelease( node );
+    }
+    return rc;
+}
+
+
+static rc_t extract_spotgroups( VNamelist * spotgroups, input_files * ifs, bool from_stats )
+{
+    rc_t rc = 0;
+    uint32_t i;
+    for ( i = 0; i < ifs->database_count && rc == 0; ++i )
+    {
+        input_database * id = VectorGet( &ifs->dbs, i );
+        if ( id != NULL )
+        {
+            if ( from_stats )
+            {
+                const VTable * tab;
+                rc = VDatabaseOpenTableRead( id->db, &tab, "SEQUENCE" );
+                if ( rc != 0 )
+                    (void)PLOGERR( klogErr, ( klogErr, rc, "cannot open table SEQUENCE in '$(t)'", "t=%s", id->path ) );
+                else
+                {
+                    const KMetadata * meta;
+                    rc = VTableOpenMetadataRead( tab, &meta );
+                    if ( rc != 0 )
+                        (void)PLOGERR( klogErr, ( klogErr, rc, "cannot open metadata from '$(t)'", "t=%s", id->path ) );
+                    else
+                    {
+                        if ( from_stats )
+                            rc = extract_spotgroups_from_stats( spotgroups, id, meta );
+                        KMetadataRelease( meta );
+                    }
+                    VTableRelease( tab );
+                }
+            }
+            else
+            {
+                const KMetadata * meta;
+                rc = VDatabaseOpenMetadataRead( id->db, &meta );
+                /* do not report if metadata cannot be found, because this would produce an error message when a database has
+                   no metadata at all */
+                if ( rc == 0 )
+                {
+                    rc = extract_spotgroups_from_bam_hdr( spotgroups, id, meta );
+                    KMetadataRelease( meta );
+                }
+
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t print_spotgroups( VNamelist * spotgroups, bool from_stats )
+{
+    uint32_t count;
+    rc_t rc = VNameListCount( spotgroups, &count );
+    if ( rc == 0 && count > 0 )
+    {
+        uint32_t i;
+        for ( i = 0; i < count && rc == 0; ++i )
+        {
+            const char * s;
+            rc = VNameListGet( spotgroups, i, &s );
+            if ( rc == 0 && s != NULL )
+            {
+                if ( from_stats )
+                {
+                    if ( cmp_pchar( s, "default" ) != 0 )
+                        rc = KOutMsg( "@RG\tID:%s\n", s );
+                }
+                else
+                {
+                    rc = KOutMsg( "%s\n", s );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t print_headers_by_recalculating( const samdump_opts * opts, input_files * ifs )
+{
+    rc_t rc = KOutMsg( "@HD\tVN:1.3\n" );
+    if ( rc == 0 )
+    {
+        BSTree tree;
+
+        /* collect sequenc-id's and names and their lengths, unique by sequence-id */
+        BSTreeInit( &tree );
+        rc = build_seq_id_tree( &tree, ifs );
+        if ( rc == 0 )
+        {
+            hdr_print_ctx hctx;
+            hctx.rc = 0;
+            hctx.use_seq_id = opts->use_seqid_as_refname;
+            /* ptrint it */
+            BSTreeForEach( &tree, false, print_header_callback, &hctx );
+            rc = hctx.rc;
+        }
+        free_seq_id_tree( &tree );
+
+        /* collect spot-groups ( unique ) */
+        if ( rc == 0 )
+        {
+            VNamelist * spotgroups;
+            rc = VNamelistMake( &spotgroups, 10 );
+            if ( rc == 0 )
+            {
+                bool from_stats = false;
+                rc = extract_spotgroups( spotgroups, ifs, from_stats );
+                if ( rc == 0 )
+                    rc = print_spotgroups( spotgroups, from_stats );
+                else
+                    rc = 0; /* otherwise the tool would be not able to handle something that has no headers */
+                VNamelistRelease( spotgroups );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t print_headers_from_file( const samdump_opts * opts )
+{
+    KDirectory * dir;
+    rc_t rc = KDirectoryNativeDir ( &dir );
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogErr, ( klogErr, rc, "cant created native directory for file '$(t)'", "t=%s", opts->header_file ) );
+    }
+    else
+    {
+        const struct KFile * f;
+        rc = KDirectoryOpenFileRead ( dir, &f, "%s", opts->header_file );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogErr, ( klogErr, rc, "cant open file '$(t)'", "t=%s", opts->header_file ) );
+        }
+        else
+        {
+            VNamelist * headers;
+            rc = VNamelistMake ( &headers, 25 );
+            if ( rc != 0 )
+            {
+                (void)PLOGERR( klogErr, ( klogErr, rc, "cant create container for file '$(t)'", "t=%s", opts->header_file ) );
+            }
+            else
+            {
+                rc = LoadKFileToNameList( f, headers );
+                if ( rc != 0 )
+                {
+                    (void)PLOGERR( klogErr, ( klogErr, rc, "cant load file '$(t)' into container", "t=%s", opts->header_file ) );
+                }
+                else
+                {
+                    uint32_t count;
+                    rc = VNameListCount ( headers, &count );
+                    if ( rc != 0 )
+                    {
+                        (void)PLOGERR( klogErr, ( klogErr, rc, "cant get count for container of '$(t)'", "t=%s", opts->header_file ) );
+                    }
+                    else
+                    {
+                        uint32_t i;
+                        for ( i = 0; i < count && rc == 0; ++i )
+                        {
+                            const char * line;
+                            rc = VNameListGet ( headers, i, &line );
+                            if ( rc != 0 )
+                            {
+                                (void)PLOGERR( klogErr, ( klogErr, rc, "cant get line #$(t) from container", "t=%u", i ) );
+                            }
+                            else
+                            {
+                                rc = KOutMsg( "%s\n", line );
+                            }
+                        }
+                    }
+                }
+                VNamelistRelease ( headers );
+            }
+            KFileRelease ( f );
+        }
+        KDirectoryRelease ( dir );
+    }
+    return rc;
+}
+
+
+static rc_t print_org_headers( const samdump_opts * opts, input_files * ifs )
+{
+    rc_t rc = 0;
+    bool recalc = ( ifs->database_count > 1 );
+    if ( !recalc )
+    {
+        input_database * id = VectorGet( &ifs->dbs, 0 );
+        rc = print_headers_from_metadata( id->db, &recalc, id->path );
+    }
+    if ( rc == 0 && recalc )
+        rc = print_headers_by_recalculating( opts, ifs );
+    return rc;
+}
+
+
+rc_t print_headers( const samdump_opts * opts, input_files * ifs )
+{
+    rc_t rc = 0;
+
+#if _DEBUGGING
+    if ( opts->perf_log != NULL )
+        perf_log_start_section( opts->perf_log, "headers" );
+#endif
+
+    switch( opts->header_mode )
+    {
+        case hm_dump    :  rc = print_org_headers( opts, ifs ); break;
+
+        case hm_recalc  :   rc = print_headers_by_recalculating( opts, ifs ); break;
+
+        case hm_file    :   rc = print_headers_from_file( opts ); break;
+
+        case hm_none    :   break; /* to not let the compiler complain about not handled enum */
+    }
+
+    /* attach header comments from the commandline */
+    if ( rc == 0 && opts->hdr_comments != NULL )
+    {
+        uint32_t count;
+        rc = VNameListCount( opts->hdr_comments, &count );
+        if ( rc == 0 && count > 0 )
+        {
+            uint32_t i;
+            for ( i = 0; i < count && rc == 0; ++i )
+            {
+                const char * s;
+                rc = VNameListGet( opts->hdr_comments, i, &s );
+                if ( rc == 0 && s != NULL )
+                    rc = KOutMsg( "@CO\t%s\n", s );
+            }
+        }
+    }
+
+#if _DEBUGGING
+    if ( opts->perf_log != NULL )
+        perf_log_end_section( opts->perf_log );
+#endif
+
+    return rc;
+}
diff --git a/tools/sra-pileup/sam-hdr.h b/tools/sra-pileup/sam-hdr.h
new file mode 100644
index 0000000..7b373c4
--- /dev/null
+++ b/tools/sra-pileup/sam-hdr.h
@@ -0,0 +1,41 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_sam_headers_
+#define _h_sam_headers_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include "sam-dump-opts.h"
+#include "inputfiles.h"
+
+rc_t print_headers( const samdump_opts * opts, input_files * ifs );
+
+#endif
diff --git a/tools/sra-pileup/sam-hdr1.c b/tools/sra-pileup/sam-hdr1.c
new file mode 100644
index 0000000..3195707
--- /dev/null
+++ b/tools/sra-pileup/sam-hdr1.c
@@ -0,0 +1,872 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/rc.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <kfs/filetools.h>
+#include <kdb/meta.h>
+#include <kdb/namelist.h>
+#include <sysalloc.h>
+
+#include "sam-hdr1.h"
+
+
+typedef struct headers
+{
+    VNamelist * SQ_Lines_1;
+    VNamelist * SQ_Lines_2;
+    
+    VNamelist * RG_Lines_1;
+    VNamelist * RG_Lines_2;
+    
+    VNamelist * Other_Lines;
+    VNamelist * HD_Lines;
+} headers;
+
+
+static void release_lines( VNamelist ** lines )
+{
+    if ( *lines != NULL )
+    {
+        VNamelistRelease ( *lines );
+        lines = NULL;
+    }
+}
+
+
+static void release_headers( headers * h )
+{
+    release_lines( &h->HD_Lines );
+    release_lines( &h->Other_Lines );
+    release_lines( &h->RG_Lines_1 );
+    release_lines( &h->RG_Lines_2 );    
+    release_lines( &h->SQ_Lines_1 );
+    release_lines( &h->SQ_Lines_2 );    
+}
+
+
+static rc_t init_headers( headers * h, uint32_t blocksize )
+{
+    rc_t rc;
+    h->SQ_Lines_1 = NULL;
+    h->SQ_Lines_2 = NULL;    
+    h->RG_Lines_1 = NULL;
+    h->RG_Lines_2 = NULL;
+    h->Other_Lines = NULL;
+    h->HD_Lines = NULL;
+    
+    rc = VNamelistMake( &h->SQ_Lines_1, blocksize );
+    if ( rc == 0 )
+        rc = VNamelistMake( &h->SQ_Lines_2, blocksize );
+    if ( rc == 0 )
+        rc = VNamelistMake( &h->RG_Lines_1, blocksize );
+    if ( rc == 0 )
+        rc = VNamelistMake( &h->RG_Lines_2, blocksize );
+    if ( rc == 0 )
+        rc = VNamelistMake( &h->Other_Lines, blocksize );
+    if ( rc == 0 )
+        rc = VNamelistMake( &h->HD_Lines, blocksize );
+
+    if ( rc != 0 )
+        release_headers( h );
+        
+    return rc;
+}
+
+
+static void process_line( headers * h, int idx, const char * line, size_t len )
+{
+    if ( len > 3 && line[ 0 ] == '@' )
+    {
+        if ( line[ 1 ] == 'S' && line[ 2 ] == 'Q' )
+        {
+            if ( idx == 1 )
+                VNamelistAppend( h->SQ_Lines_1, line );
+            else
+                VNamelistAppend( h->SQ_Lines_2, line );            
+        }
+        else if ( line[ 1 ] == 'R' && line[ 2 ] == 'G' )
+        {
+            if ( idx == 1 )
+                VNamelistAppend( h->RG_Lines_1, line );
+            else
+                VNamelistAppend( h->RG_Lines_2, line );
+        }
+        else if ( line[ 1 ] == 'H' && line[ 2 ] == 'D' )
+            VNamelistAppend( h->HD_Lines, line );
+        else
+            VNamelistAppend( h->Other_Lines, line );
+    }
+}
+
+
+static rc_t process_lines( headers * h, int idx, VNamelist * content, const char * identifier )
+{
+    uint32_t i, count;
+    rc_t rc = VNameListCount( content, &count );
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogErr, ( klogErr, rc, "cant get count for content of '$(t)'", "t=%s", identifier ) );
+    }
+    else
+    {
+        const char * line = NULL;
+        for ( i = 0; i < count && rc == 0; ++i )
+        {
+            rc = VNameListGet( content, i, &line );
+            if ( rc != 0 )
+            {
+                (void)PLOGERR( klogErr, ( klogErr, rc, "cant get line #$(t) from content", "t=%u", i ) );
+            }
+            else
+                process_line( h, idx, line, string_measure( line, NULL ) );
+        }
+    }
+    return rc;
+}
+
+
+#define STATE_ALPHA 0
+#define STATE_LF 1
+#define STATE_NL 2
+
+typedef struct buffer_range
+{
+    const char * buffer;
+    size_t size, state;
+} buffer_range;
+
+
+static const char empty_str[ 2 ] = { ' ', 0 };
+
+
+static void LoadFromBuffer( VNamelist * nl, buffer_range * range )
+{
+    size_t idx;
+    const char * p = range->buffer;
+    String S;
+
+    S.addr = p;
+    S.len = S.size = 0;
+    for ( idx = 0; idx < range->size; ++idx )
+    {
+        switch( p[ idx ] )
+        {
+            case 0x0A : switch( range->state )
+                        {
+                            case STATE_ALPHA : /* ALPHA --> LF */
+                                                VNamelistAppendString ( nl, &S );
+                                                range->state = STATE_LF;
+                                                break;
+
+                            case STATE_LF : /* LF --> LF */
+                                             VNamelistAppend ( nl, empty_str );
+                                             break;
+
+                            case STATE_NL : /* NL --> LF */
+                                             VNamelistAppend ( nl, empty_str );
+                                             range->state = STATE_LF;
+                                             break;
+                        }
+                        break;
+
+            case 0x0D : switch( range->state )
+                        {
+                            case STATE_ALPHA : /* ALPHA --> NL */
+                                                VNamelistAppendString ( nl, &S );
+                                                range->state = STATE_NL;
+                                                break;
+
+                            case STATE_LF : /* LF --> NL */
+                                             range->state = STATE_NL;
+                                             break;
+
+                            case STATE_NL : /* NL --> NL */
+                                             VNamelistAppend ( nl, empty_str );
+                                             break;
+                        }
+                        break;
+
+            default   : switch( range->state )
+                        {
+                            case STATE_ALPHA : /* ALPHA --> ALPHA */
+                                                S.len++; S.size++;
+                                                break;
+
+                            case STATE_LF : /* LF --> ALPHA */
+                                             S.addr = &p[ idx ]; S.len = S.size = 1;
+                                             range->state = STATE_ALPHA;
+                                             break;
+
+                            case STATE_NL : /* NL --> ALPHA */
+                                             S.addr = &p[ idx ]; S.len = S.size = 1;
+                                             range->state = STATE_ALPHA;
+                                             break;
+                        }
+                        break;
+        }
+    }
+    if ( range->state == STATE_ALPHA && S.len > 0 )
+        VNamelistAppendString ( nl, &S );
+}
+
+
+static rc_t Load_Namelist_From_Node( VNamelist * dst, const KMDataNode * node )
+{
+    size_t num_read, remaining;
+    char b[ 10 ];
+    rc_t rc = KMDataNodeRead( node, 0, b, sizeof( b ), &num_read, &remaining );
+    if ( rc == 0 )
+    {
+        size_t bsize = num_read + remaining;
+        buffer_range range;
+        range.buffer = malloc( bsize );
+        if ( range.buffer != NULL )
+        {
+            rc = KMDataNodeRead( node, 0, ( void * )range.buffer, bsize, &range.size, &remaining );
+            if ( rc == 0 )
+            {
+                range.state = STATE_ALPHA;
+                LoadFromBuffer( dst, &range );
+            }
+            free( ( void * ) range.buffer );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t collect_from_BAM_HEADER( headers * h, int hdr_idx, input_files * ifs )
+{
+    rc_t rc = 0;
+    if ( ifs->database_count > 0 )
+    {
+        uint32_t idx;
+        for ( idx = 0; idx < ifs->database_count && rc == 0; ++idx )
+        {
+            input_database * id = VectorGet( &ifs->dbs, idx );
+            if ( id != NULL )
+            {
+                const KMetadata * meta;
+                rc = VDatabaseOpenMetadataRead( id->db, &meta );
+                if ( rc == 0 )
+                {
+                    const KMDataNode * node;
+                    rc = KMetadataOpenNodeRead( meta, &node, "BAM_HEADER" );
+                    if ( rc == 0 )
+                    {
+                        VNamelist * content;
+                        rc = VNamelistMake ( &content, 25 );
+                        if ( rc != 0 )
+                        {
+                            (void)PLOGERR( klogErr, ( klogErr, rc, "cant create container for '$(t)'", "t=%s", id->path ) );
+                        }
+                        else
+                        {
+                            rc = Load_Namelist_From_Node( content, node );
+                            if ( rc == 0 )
+                                rc = process_lines( h, hdr_idx, content, id->path );
+                            VNamelistRelease( content );
+                        }
+                        KMDataNodeRelease( node );
+                    }
+                    else
+                        rc = 0;
+                    KMetadataRelease( meta );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t collect_from_spotgroup_stats( headers * h, int hdr_idx, const KMDataNode * node, const KNamelist * spot_groups )
+{
+    uint32_t count;
+    rc_t rc = KNamelistCount( spot_groups, &count );
+    if ( rc == 0 && count > 0 )
+    {
+        uint32_t i;
+        for ( i = 0; i < count && rc == 0; ++i )
+        {
+            const char * name = NULL; /* this is the name of the node !!!NOT!!! the name of the spotgroup! */
+            rc = KNamelistGet( spot_groups, i, &name );
+            if ( rc == 0 && name != NULL )
+            {
+                const KMDataNode * spot_count_node;
+                rc = KMDataNodeOpenNodeRead( node, &spot_count_node, "%s/SPOT_COUNT", name );
+                if ( rc == 0 )
+                {
+                    uint64_t spot_count = 0;
+                    rc = KMDataNodeReadAsU64( spot_count_node, &spot_count );
+                    if ( rc == 0 )
+                    {
+                        if ( spot_count > 0 )
+                        {
+                            const KMDataNode * spot_group_node;
+                            rc = KMDataNodeOpenNodeRead( node, &spot_group_node, name );            
+                            if ( rc == 0 )
+                            {
+                                char name_attr[ 2048 ];
+                                char buffer[ 2048 ];
+                                size_t num_writ;
+                                rc = KMDataNodeReadAttr( spot_group_node, "name", name_attr, sizeof name_attr, &num_writ );
+                                rc = string_printf( buffer, sizeof buffer, &num_writ,
+                                            "@RG\tID:%s", rc == 0 ? name_attr : name );
+                                if ( rc == 0 )
+                                    process_line( h, hdr_idx, buffer, num_writ );
+                                KMDataNodeRelease( spot_group_node );                
+                            }
+                        }
+                    }
+                    else
+                        rc = 0;
+                    KMDataNodeRelease( spot_count_node );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t collect_from_stats( headers * h, int hdr_idx, input_files * ifs )
+{
+    rc_t rc = 0;
+    if ( ifs->database_count > 0 )
+    {
+        uint32_t idx;
+        for ( idx = 0; idx < ifs->database_count && rc == 0; ++idx )
+        {
+            input_database * id = VectorGet( &ifs->dbs, idx );
+            if ( id != NULL )
+            {
+                const VTable * seq_table = NULL;
+                rc = VDatabaseOpenTableRead( id->db, &seq_table, "SEQUENCE" );
+                if ( rc == 0 )
+                {
+                    const KMetadata * meta;
+                    rc = VTableOpenMetadataRead( seq_table, &meta );
+                    if ( rc == 0 )
+                    {
+                        const KMDataNode * node;
+                        rc = KMetadataOpenNodeRead( meta, &node, "STATS/SPOT_GROUP" );
+                        if ( rc == 0 )
+                        {
+                            KNamelist * spot_groups;
+                            rc = KMDataNodeListChildren( node, &spot_groups );
+                            if ( rc == 0 )
+                            {
+                                rc = collect_from_spotgroup_stats( h, hdr_idx, node, spot_groups );
+                                KNamelistRelease( spot_groups );
+                            }
+                            KMDataNodeRelease( node );
+                        }
+                        KMetadataRelease( meta );
+                    }
+                    VTableRelease( seq_table );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t collect_from_file( headers * h, int hdr_idx, const char * filename )
+{
+    KDirectory * dir;
+    rc_t rc = KDirectoryNativeDir ( &dir );
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogErr, ( klogErr, rc, "cant created native directory for file '$(t)'", "t=%s", filename ) );
+    }
+    else
+    {
+        const struct KFile * f;
+        rc = KDirectoryOpenFileRead ( dir, &f, "%s", filename );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogErr, ( klogErr, rc, "cant open file '$(t)'", "t=%s", filename ) );
+        }
+        else
+        {
+            VNamelist * content;
+            rc = VNamelistMake ( &content, 25 );
+            if ( rc != 0 )
+            {
+                (void)PLOGERR( klogErr, ( klogErr, rc, "cant create container for file '$(t)'", "t=%s", filename ) );
+            }
+            else
+            {
+                rc = LoadKFileToNameList( f, content );
+                if ( rc != 0 )
+                {
+                    (void)PLOGERR( klogErr, ( klogErr, rc, "cant load file '$(t)' into container", "t=%s", filename ) );
+                }
+                else
+                    rc = process_lines( h, hdr_idx, content, filename );
+                VNamelistRelease( content );
+            }
+            KFileRelease ( f );
+        }
+        KDirectoryRelease ( dir );
+    }
+    return rc;
+}
+
+
+static rc_t collect_from_references( headers * h, int hdr_idx, input_files * ifs )
+{
+    rc_t rc = 0;
+    uint32_t i;
+    for ( i = 0; i < ifs->database_count && rc == 0; ++i )
+    {
+        input_database * id = VectorGet( &ifs->dbs, i );
+        if ( id != NULL )
+        {
+            uint32_t rcount;
+            rc = ReferenceList_Count( id->reflist, &rcount );
+            if ( rc == 0 && rcount > 0 )
+            {
+                uint32_t r_idx;
+                for ( r_idx = 0; r_idx < rcount && rc == 0; ++r_idx )
+                {
+                    const ReferenceObj * ref_obj;
+                    rc = ReferenceList_Get( id->reflist, &ref_obj, r_idx );
+                    if ( rc == 0 && ref_obj != NULL )
+                    {
+                        const char * seqid;
+                        rc = ReferenceObj_SeqId( ref_obj, &seqid );
+                        if ( rc == 0 )
+                        {
+                            const char * name;
+                            rc = ReferenceObj_Name( ref_obj, &name );
+                            if ( rc == 0 )
+                            {
+                                INSDC_coord_len seq_len;
+                                rc = ReferenceObj_SeqLength( ref_obj, &seq_len );
+                                if ( rc == 0 )
+                                {
+                                    char buffer[ 2048 ];
+                                    size_t num_writ;
+                                    rc = string_printf( buffer, sizeof buffer, &num_writ, "@SQ\tSN:%s\tLN:%lu", name, seq_len );
+                                    if ( rc == 0 )
+                                        process_line( h, hdr_idx, buffer, num_writ );
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+typedef struct hdr_tag
+{
+    String key, value;
+} hdr_tag;
+
+
+typedef struct hdr_line
+{
+    String line_key;
+    hdr_tag tags[ 32 ];
+    uint32_t n_tags;
+} hdr_line;
+
+
+static bool parse_hdr_line( hdr_line * hl, const char * line )
+{
+    size_t i, tl = 0, start = 3, len = string_size( line );
+    bool res = ( len > start && line[ 0 ] == '@' );
+    hl->n_tags = 0;
+    if ( res )
+    {
+        uint32_t colons = 0;
+        StringInit( &hl->line_key, &line[ 1 ], 2, 2 );
+        for( i = start; i < len; ++i )
+        {
+            switch ( line[ i ] )
+            {
+                case '\t' :        if ( tl > 0 )
+                                {
+                                    StringInit( &hl->tags[ hl->n_tags ].value, &line[ start ], tl, tl );
+                                    ( hl->n_tags )++;
+                                    tl = 0;
+                                }
+                                start = i + 1;
+                                colons = 0;
+                                break;
+
+                case ':'  :        if ( colons == 0 )
+                                {
+                                    if ( tl > 0 )
+                                    {
+                                        StringInit( &hl->tags[ hl->n_tags ].key, &line[ start ], tl, tl );
+                                        tl = 0;
+                                    }
+                                    start = i + 1;
+                                }
+                                else
+                                    tl++;
+                                colons++;
+                                break;
+                
+                default :         tl++;
+                                break;
+            }
+        }
+        if ( tl > 0 )
+        {
+            StringInit( &hl->tags[ hl->n_tags ].value, &line[ start ], tl, tl );
+            ( hl->n_tags )++;
+        }
+    }
+    else
+        StringInit( &hl->line_key, NULL, 0, 0 );
+    return res;
+}
+
+
+static rc_t print_hdr_line( char * buffer, size_t buflen, const hdr_line * hl )
+{
+    rc_t rc = 0;
+    buffer[ 0 ] = 0;
+    if ( hl->line_key.len > 0 )
+    {
+        size_t num_writ, total_writ = 0, i;
+        rc = string_printf( buffer, buflen, &num_writ, "@%S", &hl->line_key );
+        for ( i = 0; i < hl->n_tags && rc == 0; ++i )
+        {
+            total_writ += num_writ;
+            if ( buflen > total_writ )
+                rc = string_printf( &buffer[ total_writ ], buflen - total_writ, &num_writ,
+                                "\t%S:%S", &hl->tags[ i ].key, &hl->tags[ i ].value );
+        }
+    }
+    return rc;
+}
+
+static bool sam_hdr_id( const hdr_line * hl1, const hdr_line * hl2 )
+{
+    bool res = ( hl1 != NULL && hl2 != NULL );
+    if ( res )
+        res = ( ( hl1->n_tags > 0 ) && ( hl2->n_tags > 0 ) );
+    if ( res )
+        res = ( 0 == StringCompare( &hl1->tags[ 0 ].value, &hl2->tags[ 0 ].value ) );
+    return res;
+}
+
+static bool has_tag( const String * tag_id, hdr_line * dst )
+{
+    bool res = false;
+    uint32_t i;
+    for ( i = 0; i < dst->n_tags && !res; ++i )
+        res = ( 0 == StringCompare( tag_id, &dst->tags[ i ].key ) );
+    return res;
+}
+
+static void merge_tag( const hdr_tag * tag, hdr_line * dst )
+{
+    if ( !has_tag( &tag->key, dst ) )
+    {
+        dst->tags[ dst->n_tags ] = *tag;
+        ( dst->n_tags )++;
+    }
+}
+
+static void merge_hdr_line( const hdr_line * src, hdr_line * dst )
+{
+    if ( src != NULL && dst != NULL )
+    {
+        uint32_t i;
+        for ( i = 0; i < src->n_tags; ++i )
+            merge_tag( &src->tags[ i ], dst );
+    }
+}
+
+
+static rc_t for_each_line( const VNamelist * src,
+                           rc_t ( * f ) ( const char * line, void * context ),
+                           void * context )
+{
+    uint32_t idx, count;
+    rc_t rc = VNameListCount( src, &count );
+    for ( idx = 0; idx < count && rc == 0; ++idx )
+    {
+        const char * line = NULL;
+        rc = VNameListGet( src, idx, &line );
+        if ( rc == 0 )
+            rc = f( line, context );
+    }
+    return rc;
+}
+
+
+static rc_t merge_header_tags( const char * line, void * context )
+{
+    hdr_line * h_parent = context;
+    hdr_line h;
+    if ( parse_hdr_line( &h, line ) )
+    {
+        /* merge the tags! */
+        if ( sam_hdr_id( h_parent, &h ) )
+            merge_hdr_line( h_parent, &h );
+    }
+    return 0;
+}
+
+
+typedef struct merge_ctx
+{
+    VNamelist * dst;
+    const VNamelist * other;
+    bool unique;
+} merge_ctx;
+
+
+static rc_t merge_callback( const char * line, void * context )
+{
+    rc_t rc = 0;
+    merge_ctx * mc = context;
+    hdr_line h;
+    if ( parse_hdr_line( &h, line ) )
+    {
+        rc = for_each_line( mc->other, merge_header_tags, &h );
+        if ( rc == 0 )
+        {
+            char buffer[ 2048 ];
+            rc = print_hdr_line( buffer, sizeof buffer, &h );
+            if ( rc == 0 && buffer[ 0 ] != 0 )
+            {
+                bool do_append = true;
+                if ( mc->unique )
+                {
+                    uint32_t found;
+                    rc_t rc1 = VNamelistIndexOf( mc->dst, buffer, &found );
+                    do_append = ( rc1 != 0 );
+                }
+                if ( do_append )
+                    rc = VNamelistAppend( mc->dst, buffer );
+            }
+        }
+    }
+    return rc;
+}
+
+
+/* SQ-lines have to be uniue by the SN-tag */
+/* RG-lines have to be uniue by the ID-tag */
+static rc_t merge_lines( VNamelist ** lines_1, const VNamelist * lines_2, bool unique )
+{
+    rc_t rc;
+    merge_ctx mc;
+    memset( &mc, 0, sizeof mc );
+    mc.unique = unique;
+    rc = VNamelistMake( &mc.dst, 25 );
+    if ( rc == 0 )
+    {
+        mc.other = lines_2;
+        rc = for_each_line( *lines_1, merge_callback, &mc );
+        if ( rc == 0 )
+        {
+            VNamelistRelease( *lines_1 );
+            *lines_1 = mc.dst;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t collect_from_bam_hdr( headers * h, input_files * ifs )
+{
+    uint32_t count;
+    rc_t rc = collect_from_BAM_HEADER( h, 1, ifs );
+    if ( rc == 0 )
+    {
+        rc = VNameListCount( h->SQ_Lines_1, &count );
+        if ( rc == 0 && count == 0 )
+            rc = collect_from_references( h, 1, ifs );    
+    }
+    if ( rc == 0 )
+    {
+        rc = VNameListCount( h->RG_Lines_1, &count );
+        if ( rc == 0 && count == 0 )
+            rc = collect_from_stats( h, 1, ifs );    
+    }
+    return rc;
+}
+
+
+static rc_t collect_by_recalc( headers * h, input_files * ifs )
+{
+    rc_t rc = collect_from_references( h, 1, ifs );
+    if ( rc == 0 )
+        rc = collect_from_stats( h, 1, ifs );
+    return rc;
+}
+
+
+static rc_t collect_from_src_and_files( headers * h, input_files * ifs, const char * filename )
+{
+    rc_t rc = collect_from_bam_hdr( h, ifs );
+    if ( rc == 0 && filename != NULL )
+        rc = collect_from_file( h, 2, filename );
+    return rc;
+}
+
+
+static rc_t print_HD_line( const VNamelist * lines )
+{
+    uint32_t count;
+    rc_t rc = VNameListCount( lines, &count );
+    if ( rc == 0 && count > 0 )
+    {
+        const char * line = NULL;
+        rc = VNameListGet( lines, 0, &line );
+        if ( rc == 0 && line != NULL )
+            rc = KOutMsg( "%s\n", line );
+        else
+            rc = KOutMsg( "@HD\tVN:1.2\tSO:coordinate\n" );
+    }
+    else
+        rc = KOutMsg( "@HD\tVN:1.2\tSO:coordinate\n" );
+    return rc;
+}
+
+
+static rc_t print_callback( const char * line, void * context ) { return KOutMsg( "%s\n", line ); }
+
+/*
+static void print_header_info( const headers * h )
+{
+    uint32_t count;
+    
+    VNameListCount( h->SQ_Lines_1, &count );
+    KOutMsg( "h->SQ_Lines_1 = %d\n", count );
+
+    VNameListCount( h->SQ_Lines_2, &count );
+    KOutMsg( "h->SQ_Lines_2 = %d\n", count );
+
+    VNameListCount( h->RG_Lines_1, &count );
+    KOutMsg( "h->RG_Lines_1 = %d\n", count );
+
+    VNameListCount( h->RG_Lines_2, &count );
+    KOutMsg( "h->RG_Lines_2 = %d\n", count );
+
+    VNameListCount( h->Other_Lines, &count );
+    KOutMsg( "h->Other_Lines = %d\n", count );
+
+    VNameListCount( h->HD_Lines, &count );
+    KOutMsg( "h->HD_Lines = %d\n", count );
+}
+*/
+
+static rc_t merge_and_print( VNamelist ** L1, const VNamelist * L2 )
+{
+    uint32_t count1, count2;
+    
+    rc_t rc = VNameListCount( *L1, &count1 );
+    if ( rc == 0 )
+        rc = VNameListCount( L2, &count2 );
+    if ( rc == 0 )
+    {
+        if ( count1 > 0 && count2 > 0 )
+        {
+            if ( rc == 0 )
+                rc = merge_lines( L1, L2, true );
+            if ( rc == 0 )
+                rc = for_each_line( *L1, print_callback, NULL );
+        }
+        else if ( count1 > 0 )
+        {
+            rc = for_each_line( *L1, print_callback, NULL );
+        }
+        else if ( count2 > 0 )
+        {
+            rc = for_each_line( L2, print_callback, NULL );
+        }
+    }
+    return rc;
+}
+
+
+rc_t print_headers_1( const samdump_opts * opts, input_files * ifs )
+{
+    headers h;
+    rc_t rc = init_headers( &h, 25 );
+    if ( rc == 0 )
+    {
+        /* collect ... */
+        
+        switch( opts->header_mode )
+        {
+            case hm_dump    :  rc = collect_from_bam_hdr( &h, ifs ); break;
+
+            case hm_recalc  :  rc = collect_by_recalc( &h, ifs ); break;
+
+            case hm_file    :  rc = collect_from_src_and_files( &h, ifs, opts->header_file ); break;
+
+            case hm_none    :  break; /* to not let the compiler complain about not handled enum */
+        }
+
+        if ( rc == 0 )
+            rc = print_HD_line( h.HD_Lines );
+
+        if ( rc == 0 )
+            rc = merge_and_print( &h.SQ_Lines_1, h.SQ_Lines_2 );
+            
+        if ( rc == 0 )
+            rc = merge_and_print( &h.RG_Lines_1, h.RG_Lines_2 );
+
+        /* merge ... */
+        /*
+        if ( rc == 0 )
+            rc = merge_lines( &h.SQ_Lines_1, h.SQ_Lines_2, true );
+        if ( rc == 0 )
+            rc = merge_lines( &h.RG_Lines_1, h.RG_Lines_2, true );
+        */
+        
+        /* print ... */
+        /*
+        if ( rc == 0 )
+            rc = for_each_line( h.SQ_Lines_1, print_callback, NULL );
+        if ( rc == 0 )
+            rc = for_each_line( h.RG_Lines_1, print_callback, NULL );
+        */
+        if ( rc == 0 )
+            rc = for_each_line( h.Other_Lines, print_callback, NULL );
+        
+        release_headers( &h );
+    }
+    return rc;
+}
\ No newline at end of file
diff --git a/tools/sra-pileup/sam-hdr1.h b/tools/sra-pileup/sam-hdr1.h
new file mode 100644
index 0000000..4e7f645
--- /dev/null
+++ b/tools/sra-pileup/sam-hdr1.h
@@ -0,0 +1,42 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_sam_headers_1_
+#define _h_sam_headers_1_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include <klib/rc.h>
+#include "sam-dump-opts.h"
+#include "inputfiles.h"
+
+rc_t print_headers_1( const samdump_opts * opts, input_files * ifs );
+
+#endif
diff --git a/tools/sra-pileup/sam-unaligned.c b/tools/sra-pileup/sam-unaligned.c
new file mode 100644
index 0000000..9d0d72a
--- /dev/null
+++ b/tools/sra-pileup/sam-unaligned.c
@@ -0,0 +1,1565 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "read_fkt.h"
+#include "sam-unaligned.h"
+#include <kapp/main.h>
+#include <sysalloc.h>
+#include <ctype.h>
+
+#define COL_READ "(INSDC:dna:text)READ"
+#define COL_REF_NAME "(ascii)REF_NAME"
+#define COL_REF_SEQ_ID "(ascii)REF_SEQ_ID"
+#define COL_REF_POS "(INSDC:coord:zero)REF_POS"
+
+typedef struct prim_table_ctx
+{
+    const VCursor * cursor;
+
+    uint32_t ref_name_idx;
+    uint32_t ref_seq_id_idx;
+    uint32_t ref_pos_idx;
+} prim_table_ctx;
+
+
+static rc_t prepare_prim_table_ctx( const samdump_opts * const opts,
+                                    const input_table * const itab,
+                                    prim_table_ctx * const ptx )
+{
+    rc_t rc;
+
+    if ( opts->cursor_cache_size == 0 )
+        rc = VTableCreateCursorRead( itab->tab, &ptx->cursor );
+    else
+        rc = VTableCreateCachedCursorRead( itab->tab, &ptx->cursor, opts->cursor_cache_size );
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogInt, ( klogInt, rc, "VTableCreateCursorRead( PRIMARY_ALIGNMENT ) for $(tn) failed", "tn=%s", itab->path ) );
+    }
+    else
+    {
+        rc = add_column( ptx->cursor, COL_REF_NAME, &ptx->ref_name_idx );
+        if ( rc == 0 )
+            rc = add_column( ptx->cursor, COL_REF_SEQ_ID, &ptx->ref_seq_id_idx );
+        if ( rc == 0 )
+            rc = add_column( ptx->cursor, COL_REF_POS, &ptx->ref_pos_idx );
+        if ( rc == 0 )
+        {
+            rc = VCursorOpen( ptx->cursor );
+            if ( rc != 0 )
+            {
+                (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorOpen( PRIMARY_ALIGNMENT ) for $(tn) failed", "tn=%s", itab->path ) );
+            }
+        }
+    }
+    return rc;
+}
+
+
+#define COL_ALIGN_COUNT "(U8)ALIGNMENT_COUNT"
+#define COL_SPOT_ID "(INSDC:SRA:spotid_t)SPOT_ID"
+#define COL_PRIM_AL_ID "(I64)PRIMARY_ALIGNMENT_ID"
+#define COL_READ_TYPE "(INSDC:SRA:xread_type)READ_TYPE"
+#define COL_READ_FILTER "(INSDC:SRA:read_filter)READ_FILTER"
+#define COL_READ_LEN "(INSDC:coord:len)READ_LEN"
+#define COL_READ_START "(INSDC:coord:zero)READ_START"
+/* #define COL_QUALITY "(INSDC:quality:text:phred_33)QUALITY" */
+#define COL_QUALITY "(INSDC:quality:phred)QUALITY"
+#define COL_SPOT_GROUP "(ascii)SPOT_GROUP"
+#define COL_NAME "(ascii)NAME"
+#define COL_LNK_GROUP "(ascii)LINKAGE_GROUP"
+
+typedef struct seq_table_ctx
+{
+    const VCursor * cursor;
+
+    uint32_t align_count_idx;
+    uint32_t prim_al_id_idx;
+    uint32_t read_type_idx;
+    uint32_t read_filter_idx;
+    uint32_t read_len_idx;
+    uint32_t read_start_idx;
+    uint32_t read_idx;
+    uint32_t quality_idx;
+    uint32_t spot_group_idx;
+    uint32_t name_idx;
+    uint32_t lnk_group_idx;
+} seq_table_ctx;
+
+
+static rc_t prepare_seq_table_ctx( const samdump_opts * const opts,
+                                   const input_table * const itab,
+                                   seq_table_ctx * const stx )
+{
+    struct KNamelist * available_columns;
+    rc_t rc = VTableListReadableColumns ( itab->tab, &available_columns );
+    if ( rc != 0 )
+    {
+        (void)PLOGERR( klogInt, ( klogInt, rc, 
+            "VTableListReadableColumns( SEQUENCE ) for $(tn) failed", "tn=%s", itab->path ) );
+    }
+    else
+    {
+        if ( opts->cursor_cache_size == 0 )
+            rc = VTableCreateCursorRead( itab->tab, &stx->cursor );
+        else
+            rc = VTableCreateCachedCursorRead( itab->tab, &stx->cursor, opts->cursor_cache_size );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VTableCreateCursorRead( SEQUENCE ) for $(tn) failed", "tn=%s", itab->path ) );
+        }
+        else
+        {
+            add_opt_column( stx->cursor, available_columns, COL_ALIGN_COUNT, &stx->align_count_idx ); /* read_fkt.c */
+            add_opt_column( stx->cursor, available_columns, COL_PRIM_AL_ID, &stx->prim_al_id_idx );
+            add_opt_column( stx->cursor, available_columns, COL_NAME, &stx->name_idx );
+            add_opt_column( stx->cursor, available_columns, COL_LNK_GROUP, &stx->lnk_group_idx );
+            
+            if ( rc == 0 )
+                rc = add_column( stx->cursor, COL_READ_TYPE, &stx->read_type_idx ); /* read_fkt.c */
+            if ( rc == 0 )
+                rc = add_column( stx->cursor, COL_READ_FILTER, &stx->read_filter_idx );
+            if ( rc == 0 )
+                rc = add_column( stx->cursor, COL_READ_LEN, &stx->read_len_idx );
+            if ( rc == 0 )
+                rc = add_column( stx->cursor, COL_READ_START, &stx->read_start_idx );
+            if ( rc == 0 )
+                rc = add_column( stx->cursor, COL_READ, &stx->read_idx );
+            if ( rc == 0 )
+                rc = add_column( stx->cursor, COL_QUALITY, &stx->quality_idx );
+            if ( rc == 0 )
+                rc = add_column( stx->cursor, COL_SPOT_GROUP, &stx->spot_group_idx );
+        }
+        KNamelistRelease( available_columns );
+    }
+    return rc;
+}
+
+
+typedef struct seq_row
+{
+    uint32_t nreads;
+
+    bool fully_unaligned;
+    bool partly_unaligned;
+    bool filtered_out;
+} seq_row;
+
+
+static rc_t complain_size_diff( int64_t row_id, const char * txt )
+{
+    rc_t rc = RC( rcExe, rcNoTarg, rcConstructing, rcSize, rcInvalid );
+    (void)PLOGERR( klogInt, ( klogInt, rc, "in row $(rn) of SEQUENCE.$(tx)", "rn=%ld,tx=%s", row_id, txt ) );
+    return rc;
+}
+
+
+static rc_t read_seq_row( const samdump_opts * const opts,
+                          const seq_table_ctx * const stx,
+                          const int64_t row_id,
+                          seq_row * const row )
+{
+    rc_t rc = 0;
+
+    if ( stx->align_count_idx == INVALID_COLUMN )
+    {
+        const INSDC_read_type *ptr;
+
+        row->fully_unaligned = true;
+        row->partly_unaligned = false;
+        row->filtered_out = false;
+        rc = read_INSDC_read_type_ptr( row_id, stx->cursor, stx->read_type_idx, &ptr, &row->nreads, "READ_TYPE" );
+    }
+    else
+    {
+        const uint8_t * u8ptr;
+        uint32_t len;
+
+        /* ALIGNMENT_COUNT ... only to detect if reads are unaligned, could be done with PRIMARY_ALINGMENT too,
+           but this one is only 8 bit instead of 64 bit, that means faster */
+        rc = read_uint8_ptr( row_id, stx->cursor, stx->align_count_idx, &u8ptr, &len, "ALIGN_COUNT" );
+        if ( rc == 0 )
+        {
+            uint32_t i, n;
+
+            row->nreads = len;
+            for ( i = 0, n = 0; i < len; ++i )
+                if ( u8ptr[ i ] != 0 )
+                    n++;
+            row->fully_unaligned = ( n == 0 );
+            row->partly_unaligned = ( n < len && n > 0 );
+
+            if ( row->partly_unaligned )
+                row->filtered_out = !opts->print_half_unaligned_reads;
+            else if ( row->fully_unaligned )
+                row->filtered_out = !opts->print_fully_unaligned_reads;
+            else
+                row->filtered_out = true;
+        }
+    }
+    return rc;
+}
+
+
+/**********************************************************************************
+
+    0x001   template having multiple fragments in sequencing
+            (row->nreads > 1 )
+
+    0x002   each fragment properly aligned according to the aligner
+            ( never the case in an unaligned read )
+
+    0x004   fragment unmapped
+            ( always true in an unaligned read )
+
+    0x008   next fragment in the template unmapped
+            ( is the mate aligned? next: read_idx+1, if read_idx==row->nreads-1 then read_idx-1 )
+
+    0x010   SEQ being reverse complemented
+            ( column 'READ_TYPE' has bit READ_TYPE_REVERSE set )
+
+    0x020   SEQ of the next fragment in the template being reversed
+            ( is the mate reversed? )
+
+    0x040   the first fragment in the template
+            ( read_idx == 0 )
+
+    0x080   the last fragment in the template
+            ( read_idx == ( row->nreads - 1 ) )
+
+    0x100   secondary alignment
+            ( never the case in an unaligned read )
+
+    0x200   not passing quality controls
+            ( column 'READ_FILTER' has bit READ_FILTER_REJECT set )
+
+    0x400   PCR or optical duplicate
+            ( column 'READ_FILTER' has bit READ_FILTER_CRITERIA set )
+
+**********************************************************************************/
+static uint32_t calculate_unaligned_sam_flags_db( uint32_t nreads,
+                                                  uint32_t read_idx,
+                                                  uint32_t mate_idx,
+                                                  int64_t mate_id,
+                                                  const INSDC_read_type * read_type,
+                                                  bool reverse_flag,
+                                                  const INSDC_read_filter * read_filter )
+{
+    uint32_t res = 0x04;
+
+    if ( nreads > 1 )
+    {
+        res |= 0x01;
+        /* the following test only make sense if there is a mate */
+
+        if ( mate_id == 0 )
+            res |= 0x08;
+        if ( ( read_type[ mate_idx ] & READ_TYPE_REVERSE ) == READ_TYPE_REVERSE )
+            res |= 0x020;
+        if ( read_idx == 0 )
+            res |= 0x040;
+        if ( read_idx == ( nreads - 1 ) )
+            res |= 0x080;
+    }
+
+    if ( reverse_flag )
+        res |= 0x010;
+    if ( ( read_filter[ read_idx ] & READ_FILTER_REJECT ) == READ_FILTER_REJECT )
+        res |= 0x200;
+    if ( ( read_filter[ read_idx ] & READ_FILTER_CRITERIA ) == READ_FILTER_CRITERIA )
+        res |= 0x400;
+    return res;
+}
+
+
+const char * ref_name_star = "*";
+
+static rc_t get_mate_info( const prim_table_ctx * const ptx,
+                           const matecache * const mc,
+                           const input_database * const ids,
+                           const int64_t row_id,
+                           const int64_t mate_id,
+                           const uint32_t nreads,
+                           const char ** mate_ref_name,
+                           uint32_t * const mate_ref_name_len,
+                           INSDC_coord_zero * const mate_ref_pos )
+{
+    rc_t rc = 0;
+
+    *mate_ref_name = ref_name_star;
+    *mate_ref_name_len = 1;
+    *mate_ref_pos = 0;
+    if ( nreads < 2 )
+        return rc;
+
+    if ( mate_id != 0 )
+    {
+        uint32_t ref_idx;
+        int64_t seq_spot_id;
+        rc = matecache_lookup_unaligned( mc, ids->db_idx, mate_id, mate_ref_pos, &ref_idx, &seq_spot_id );
+        if ( rc == 0 )
+        {
+            const ReferenceObj* refobj;
+            *mate_ref_pos += 1;
+            /* now we have to lookup the reference-name based on it's index into the ids->reflist */
+            rc = ReferenceList_Get( ids->reflist, &refobj, ref_idx );
+            if ( rc != 0 )
+            {
+                (void)PLOGERR( klogInt, ( klogInt, rc, "in row $(rn) of SEQUENCE.$(rx)", "rn=%ld,rx=%ld", mate_id, row_id ) );
+            }
+            else
+            {
+                rc = ReferenceObj_Name( refobj, mate_ref_name );
+                if ( rc != 0 )
+                {
+                    (void)PLOGERR( klogInt, ( klogInt, rc, "in row $(rn) of SEQUENCE.$(rx)", "rn=%ld,rx=%ld", mate_id, row_id ) );
+                }
+                else
+                {
+                    *mate_ref_name_len = string_size( *mate_ref_name );
+                }
+            }
+        }
+        else if ( GetRCState( rc ) == rcNotFound )
+        {
+            /* we have a mate and it is aligned! ---> look it up in the PRIMARY_ALIGNMENT - table*/
+            const char * ptr;
+            uint32_t len;
+
+            rc = read_char_ptr( mate_id, ptx->cursor, ptx->ref_name_idx, &ptr, &len, "REF_NAME" );
+            if ( rc == 0 && len > 0 )
+            {
+                *mate_ref_name = ptr;
+                *mate_ref_name_len = len;
+            }
+
+            if ( rc == 0 )
+            {
+                INSDC_coord_zero pos;
+                rc = read_INSDC_coord_zero( mate_id, ptx->cursor, ptx->ref_pos_idx, &pos, 0, "REF_POS" );
+                if ( rc == 0 )
+                {
+                    *mate_ref_pos = ( pos + 1 );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t print_sliced_read( const INSDC_dna_text * read,
+                               uint32_t read_idx,
+                               bool reverse,
+                               const INSDC_coord_zero * read_start,
+                               const INSDC_coord_len * read_len )
+{
+    rc_t rc = 0;
+    const INSDC_dna_text * ptr = read + read_start[ read_idx ];
+    if ( !reverse )
+    {
+        rc = KOutMsg( "%.*s", read_len[ read_idx ], ptr );
+    }
+    else
+    {
+        const char cmp_tbl [] =
+        {
+            'T', 'V', 'G', 'H', 'E', 'F', 'C', 'D',
+            'I', 'J', 'M', 'L', 'K', 'N', 'O', 'P',
+            'Q', 'Y', 'S', 'A', 'U', 'B', 'W', 'X',
+            'R', 'Z'
+        };
+
+        int32_t i = ( read_len[ read_idx ] - 1 );
+        while( i >= 0 && rc == 0 )
+        {
+            int c = ptr [ i ];
+            if ( isalpha ( c ) )
+            {
+                if ( islower ( c )  )
+                     c = tolower ( cmp_tbl [ toupper ( c ) - 'A' ] );
+                else
+                     c = cmp_tbl [ c - 'A' ];
+            }
+
+            rc = KOutMsg( "%c", ( char ) c );
+            i--;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t print_sliced_quality( const samdump_opts * const opts,
+                                  const char * quality,
+                                  uint32_t read_idx,
+                                  bool reverse,
+                                  const INSDC_coord_zero * read_start,
+                                  const INSDC_coord_len * read_len )
+{
+    const char * ptr = quality + read_start[ read_idx ];
+    return dump_quality( opts, ptr, read_len[ read_idx ], reverse ); /* sam-dump-opts.c */
+}
+
+
+static rc_t dump_the_other_read( const seq_table_ctx * const stx,
+                                 const prim_table_ctx * const ptx,
+                                 const int64_t row_id,
+                                 const uint32_t mate_idx )
+{
+    uint32_t row_len;
+    const int64_t *prim_al_id_ptr;
+
+    /* read from the SEQUENCE-table the value of the colum "PRIMARY_ALIGNMENT_ID"[ mate_idx ] */
+    rc_t rc = read_int64_ptr( row_id, stx->cursor, stx->prim_al_id_idx, &prim_al_id_ptr, &row_len, "PRIM_AL_ID" );
+    if ( rc == 0 )
+    {
+        if ( row_len == 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "rowlen zero in row $(rn) of SEQUENCE.PRIMARY_ALIGNMENT_ID", "rn=%ld", row_id ) );
+        }
+        else if ( mate_idx >= row_len )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "mate_idx invalid in row $(rn) of SEQUENCE.PRIMARY_ALIGNMENT_ID", "rn=%ld", row_id ) );
+        }
+        else
+        {
+            /* read from the PRIMARY_ALIGNMENT_TABLE the value of the columns "REF_NAME" and "REF_POS" */
+            int64_t a_row_id = prim_al_id_ptr[ mate_idx ];
+            if ( a_row_id == 0 )
+            {
+                rc = KOutMsg( "*\t0\t" );
+            }
+            else
+            {
+                const char * ref_name;
+                uint32_t ref_name_len;
+                rc = read_char_ptr( a_row_id, ptx->cursor, ptx->ref_name_idx, &ref_name, &ref_name_len, "REF_NAME" );
+                if ( rc == 0 )
+                {
+                    if ( ref_name_len == 0 )
+                    {
+                        (void)PLOGERR( klogInt, ( klogInt, rc, "rowlen zero in row $(rn) of PRIM.REF_NAME", "rn=%ld", a_row_id ) );
+                    }
+                    else
+                    {
+                        const INSDC_coord_zero *ref_pos;
+                        rc = read_INSDC_coord_zero_ptr( a_row_id, ptx->cursor, ptx->ref_pos_idx, &ref_pos, &row_len, "REF_POS" );
+                        if ( rc == 0 )
+                        {
+                            rc = KOutMsg( "%.*s\t%i\t", ref_name_len, ref_name, ref_pos[ 0 ] + 1 );
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static uint32_t calc_mate_idx( const uint32_t n_reads, const uint32_t read_idx )
+{
+    if ( read_idx == ( n_reads - 1 ) )
+        return ( read_idx - 1 );
+    else
+        return ( read_idx + 1 );
+}
+
+
+static rc_t read_quality( const seq_table_ctx * const stx,
+                          const int64_t row_id,
+                          const char **quality,
+                          const uint32_t read_len )
+{
+    uint32_t quality_len;
+    rc_t rc = read_char_ptr( row_id, stx->cursor, stx->quality_idx, quality, &quality_len, "QUALITY" );
+    if ( rc == 0 && read_len != quality_len )
+        rc = complain_size_diff( row_id, "QUALITY" );
+    return rc;
+}
+
+
+static rc_t read_read_type( const seq_table_ctx * const stx,
+                            const int64_t row_id,
+                            const INSDC_read_type **read_type,
+                            const uint32_t read_len )
+{
+    uint32_t read_type_len;
+    rc_t rc = read_INSDC_read_type_ptr( row_id, stx->cursor, stx->read_type_idx, read_type, &read_type_len, "READ_TYPE" );
+    if ( rc == 0 && read_type_len != read_len )
+        rc = complain_size_diff( row_id, "READ_TYPE" );
+    return rc;
+}
+
+
+static rc_t read_read_filter( const seq_table_ctx * const stx,
+                              const int64_t row_id,
+                              const INSDC_read_filter **read_filter,
+                              const uint32_t read_len )
+{
+    uint32_t read_filter_len;
+    rc_t rc = read_INSDC_read_filter_ptr( row_id, stx->cursor, stx->read_filter_idx, read_filter, &read_filter_len, "READ_FILTER" );
+    if ( rc == 0 && read_filter_len != read_len )
+        rc = complain_size_diff( row_id, "READ_FILTER" );
+    return rc;
+}
+
+
+static rc_t read_read_start( const seq_table_ctx * const stx,
+                             const int64_t row_id,
+                             const INSDC_coord_zero **read_start,
+                             const uint32_t nreads )
+{
+    uint32_t read_start_len;
+    rc_t rc = read_INSDC_coord_zero_ptr( row_id, stx->cursor, stx->read_start_idx, read_start, &read_start_len, "READ_START" );
+    if ( rc == 0 && nreads != read_start_len )
+        rc = complain_size_diff( row_id, "READ_START" );
+    return rc;
+}
+
+
+static rc_t read_read_len( const seq_table_ctx * const stx,
+                           const int64_t row_id,
+                           const INSDC_coord_len **read_len,
+                           const uint32_t nreads )
+{
+    uint32_t read_len_len;
+    rc_t rc = read_INSDC_coord_len_ptr( row_id, stx->cursor, stx->read_len_idx, read_len, &read_len_len, "READ_LEN" );
+    if ( rc == 0 && nreads != read_len_len )
+        rc = complain_size_diff( row_id, "READ_LEN" );
+    return rc;
+}
+
+
+static bool calc_reverse_flag( const samdump_opts * const opts,
+                               const uint32_t read_idx,
+                               const INSDC_read_type * read_type )
+{
+    bool res = ( ( read_type[ read_idx ] & READ_TYPE_REVERSE ) == READ_TYPE_REVERSE );
+    if ( res )
+        res = opts -> reverse_unaligned_reads;
+    return res;
+}
+
+
+static rc_t opt_field_spot_group( const seq_table_ctx * const stx, int64_t row_id )
+{
+    const char * spot_group = NULL;
+    uint32_t spot_group_len;    
+    rc_t rc = read_char_ptr( row_id, stx->cursor, stx->spot_group_idx, &spot_group, &spot_group_len, "SPOT_GROUP" );
+    if ( rc == 0 && spot_group_len > 0 )
+        rc = KOutMsg( "\tRG:Z:%.*s", spot_group_len, spot_group );
+    return rc;
+}
+
+static rc_t opt_field_lnk_group( const seq_table_ctx * const stx, int64_t row_id )
+{
+    const char * lnk_grp;
+    uint32_t lnk_grp_len;
+    rc_t rc = read_char_ptr( row_id, stx->cursor, stx->lnk_group_idx, &lnk_grp, &lnk_grp_len, "LINKAGE_GROUP" );
+    if ( rc == 0 && lnk_grp_len > 0 )
+        rc = KOutMsg( "\tBX:Z:%.*s", lnk_grp_len, lnk_grp );
+    return rc;
+}
+
+static rc_t dump_seq_row_sam_filtered( const samdump_opts * const opts,
+                                       const seq_table_ctx * const stx,
+                                       const prim_table_ctx * const ptx,
+                                       const matecache * const mc,
+                                       const input_database * const ids,
+                                       const int64_t row_id,
+                                       const uint32_t nreads )
+{
+    uint32_t read_idx, rd_len, prim_align_ids_len;
+    const int64_t * prim_align_ids;
+    const char * quality = NULL;
+    const INSDC_dna_text * read = NULL;
+    const INSDC_read_type * read_type = NULL;
+    const INSDC_read_filter * read_filter = NULL;
+    const INSDC_coord_zero * read_start = NULL;
+    const INSDC_coord_len * read_len;
+
+    rc_t rc = read_int64_ptr( row_id, stx->cursor, stx->prim_al_id_idx, &prim_align_ids, &prim_align_ids_len, "PRIM_AL_ID" );
+    if ( rc == 0 && nreads != prim_align_ids_len )
+        rc = complain_size_diff( row_id, "PRIMARY_ALIGNMENT_ID" );
+    if ( rc == 0 )
+        rc = read_read_len( stx, row_id, &read_len, nreads );
+
+    for ( read_idx = 0; ( read_idx < nreads ) && ( rc == 0 ); ++read_idx )
+    {
+        int64_t align_id = prim_align_ids[ read_idx ];
+        if ( align_id == 0 &&              /* read is NOT aligned! */
+             read_len[ read_idx ] > 0 )    /* and has a length! */
+        {
+            uint32_t mate_idx = calc_mate_idx( nreads, read_idx );
+
+            /*  here we have to find out if the read is actually requested: 
+                -----------------------------------------------------------
+                read from the SEQ-table the ID of the mate in PRIM-table
+                look if we have the requested ID in the mate-cache, if not here it ends...
+            */
+            align_id = prim_align_ids[ mate_idx ];
+            if ( align_id != 0 )
+            {
+                uint32_t ref_idx;
+                INSDC_coord_zero mate_ref_pos;
+                int64_t seq_spot_id;
+                /* this is the filter: we look up in the mate-cache! */
+                rc = matecache_lookup_unaligned( mc, ids->db_idx, align_id, &mate_ref_pos, &ref_idx, &seq_spot_id );
+                if ( rc == 0 )
+                {
+                    const ReferenceObj* refobj;
+                    /* now we have to lookup the reference-name based on it's index into the ids->reflist */
+                    rc = ReferenceList_Get( ids->reflist, &refobj, ref_idx );
+                    if ( rc != 0 )
+                    {
+                        (void)PLOGERR( klogInt, ( klogInt, rc, "in row $(rn) of SEQUENCE.$(rx)", "rn=%ld,rx=%ld", mate_idx, row_id ) );
+                    }
+                    else
+                    {
+                        const char * mate_ref_name;
+                        rc = ReferenceObj_Name( refobj, &mate_ref_name );
+                        if ( rc != 0 )
+                        {
+                            (void)PLOGERR( klogInt, ( klogInt, rc, "in row $(rn) of SEQUENCE.$(rx)", "rn=%ld,rx=%ld", mate_idx, row_id ) );
+                        }
+                        else
+                        {
+                            bool reverse = false;
+
+                            /* SAM-FIELD: QNAME     SRA-column: SPOT_ID ( int64 ) */
+                            if ( rc == 0 )
+                                rc = KOutMsg( "%ld\t", seq_spot_id );
+
+                            if ( rc == 0 && read_type == NULL )
+                                rc = read_read_type( stx, row_id, &read_type, nreads );
+
+                            if ( rc == 0 )
+                                reverse = calc_reverse_flag( opts, read_idx, read_type );
+
+                            if ( rc == 0 && read_filter == NULL )
+                                rc = read_read_filter( stx, row_id, &read_filter, nreads );
+
+                            /* SAM-FIELD: FLAG      SRA-column: calculated from READ_TYPE, READ_FILTER etc. */
+                            if ( rc == 0 )
+                            {
+                                uint32_t sam_flags = calculate_unaligned_sam_flags_db( nreads, read_idx, mate_idx, 
+                                                                                    align_id, read_type, reverse, read_filter );
+                                rc = KOutMsg( "%u\t", sam_flags );
+                            }
+
+                            /* SAM-FIELD: RNAME     SRA-column: none, fix '*' */
+                            /* SAM-FIELD: POS       SRA-column: none, fix '0' */
+                            /* SAM-FIELD: MAPQ      SRA-column: none, fix '0' */
+                            /* SAM-FIELD: CIGAR     SRA-column: none, fix '*' */
+                            if ( rc == 0 )
+                                rc = KOutMsg( "*\t0\t0\t*\t" );
+
+                            /* SAM-FIELD: RNEXT     SRA-column: found in cache */
+                            /* SAM-FIELD: POS       SRA-column: found in cache */
+                            if ( rc == 0 )
+                                rc = KOutMsg( "%s\t%li\t", mate_ref_name, mate_ref_pos + 1 );
+
+                            /* SAM-FIELD: TLEN      SRA-column: none, fix '0' */
+                            if ( rc == 0 )
+                                rc = KOutMsg( "0\t" );
+
+                            if ( rc == 0 && read == NULL )
+                                rc = read_INSDC_dna_text_ptr( row_id, stx->cursor, stx->read_idx, &read, &rd_len, "READ" );
+                            if ( rc == 0 && quality == NULL )
+                                rc = read_quality( stx, row_id, &quality, rd_len );
+                            if ( rc == 0 && read_start == NULL )
+                                rc = read_read_start( stx, row_id, &read_start, nreads );
+
+                            /* SAM-FIELD: SEQ       SRA-column: READ, sliced by READ_START/READ_LEN */
+                            if ( rc == 0 )
+                                rc = print_sliced_read( read, read_idx, reverse, read_start, read_len );
+                            if ( rc == 0 )
+                                rc = KOutMsg( "\t" );
+
+                            /* SAM-FIELD: QUAL      SRA-column: QUALITY, sliced by READ_START/READ_LEN */
+                            if ( rc == 0 )
+                                rc = print_sliced_quality( opts, quality, read_idx, reverse, read_start, read_len );
+
+                            /* OPT SAM-FIELD:       SRA-column: ALIGN_ID */
+                            if ( rc == 0 && opts->print_alignment_id_in_column_xi )
+                                rc = KOutMsg( "\tXI:i:%u", row_id );
+
+                            /* OPT SAM-FIELD:      SRA-column: SPOT_GROUP */
+                            if ( rc == 0 && stx->spot_group_idx != COL_NOT_AVAILABLE )
+                                rc = opt_field_spot_group( stx, row_id );
+
+                            /* OPT SAM-FIELD:       SRA-column: LINKAGE_GROUP */
+                            if ( rc == 0 && stx->lnk_group_idx != COL_NOT_AVAILABLE )
+                                rc = opt_field_lnk_group( stx, row_id );
+                            
+                            if ( rc == 0 )
+                                rc = KOutMsg( "\n" );
+                        }
+                    }
+                }
+                else
+                {
+                    rc = 0;     /* it is OK if an alignment is not found in the cache, do not terminate! */
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t dump_seq_prim_row_sam( const samdump_opts * const opts,
+                                   const seq_table_ctx * const stx,
+                                   const prim_table_ctx * const ptx,
+                                   const matecache * const mc,
+                                   const input_database * const ids,
+                                   const int64_t row_id,
+                                   const uint32_t nreads )
+{
+    uint32_t read_idx, rd_len, prim_align_ids_len;
+    const int64_t * prim_align_ids;
+    const char * quality = NULL;
+    const INSDC_dna_text * read = NULL;
+    const INSDC_read_type * read_type = NULL;
+    const INSDC_read_filter * read_filter = NULL;
+    const INSDC_coord_zero * read_start = NULL;
+    const INSDC_coord_len * read_len;
+
+    rc_t rc = read_int64_ptr( row_id, stx->cursor, stx->prim_al_id_idx, &prim_align_ids, &prim_align_ids_len, "PRIM_AL_ID" );
+    if ( rc == 0 && nreads != prim_align_ids_len )
+        rc = complain_size_diff( row_id, "PRIMARY_ALIGNMENT_ID" );
+    if ( rc == 0 )
+        rc = read_read_len( stx, row_id, &read_len, nreads );
+
+    for ( read_idx = 0; ( read_idx < nreads ) && ( rc == 0 ); ++read_idx )
+    {
+        if ( prim_align_ids[ read_idx ] == 0 &&     /* read is NOT aligned! */
+             read_len[ read_idx ] > 0 )             /* and has a length! */
+        {
+            bool reverse = false, mate_available = false;
+            uint32_t mate_idx = 0;
+            int64_t mate_id = 0;
+
+            if ( nreads > 1 )
+            {
+                if ( read_idx == ( nreads - 1 ) )
+                    mate_idx = read_idx - 1;
+                else
+                    mate_idx = read_idx + 1;
+                mate_available = true;
+            }
+
+            if ( mate_available && mate_idx < prim_align_ids_len ) 
+                mate_id = prim_align_ids[ mate_idx ];
+
+            if ( rc == 0 && read_type == NULL )
+                rc = read_read_type( stx, row_id, &read_type, nreads );
+            if ( rc == 0 )
+                reverse = calc_reverse_flag( opts, read_idx, read_type );
+
+            if ( rc == 0 && read_filter == NULL )
+                rc = read_read_filter( stx, row_id, &read_filter, nreads );
+
+            /* SAM-FIELD: QNAME     SRA-column: SPOT_ID ( int64 ) */
+            if ( rc == 0 )
+                rc = KOutMsg( "%ld\t", row_id );
+
+            /* SAM-FIELD: FLAG      SRA-column: calculated from READ_TYPE, READ_FILTER etc. */
+            if ( rc == 0 )
+            {
+                uint32_t sam_flags;
+                if ( stx->prim_al_id_idx != INVALID_COLUMN )
+                {
+                    uint32_t temp_nreads = nreads;
+                    if ( mate_id == 0 && read_len[ mate_idx ] == 0 ) temp_nreads--;
+                    sam_flags = calculate_unaligned_sam_flags_db( temp_nreads, read_idx, mate_idx, 
+                                            mate_id, read_type, reverse, read_filter );
+                }
+                else
+                {
+                    if ( reverse )
+                        sam_flags = ( 0x04 | 0x10 );
+                    else
+                        sam_flags = 0x04;
+                }
+                rc = KOutMsg( "%u\t", sam_flags );
+            }
+
+            /* SAM-FIELD: RNAME     SRA-column: none, fix '*' */
+            /* SAM-FIELD: POS       SRA-column: none, fix '0' */
+            /* SAM-FIELD: MAPQ      SRA-column: none, fix '0' */
+            /* SAM-FIELD: CIGAR     SRA-column: none, fix '*' */
+            if ( rc == 0 )
+                rc = KOutMsg( "*\t0\t0\t*\t" );
+
+            /* SAM-FIELD: RNEXT     SRA-column: look up in cache, or none */
+            /* SAM-FIELD: POS       SRA-column: look up in cache, or none */
+            if ( rc == 0 )
+            {
+                if ( ptx == NULL )
+                {
+                    rc = KOutMsg( "0\t0\t" );   /* no way to get that without PRIM_ALIGN-table */
+                }
+                else
+                {
+                    if ( opts->use_mate_cache && mc != NULL && ids != NULL )
+                    {
+                        const char * mate_ref_name;
+                        uint32_t mate_ref_name_len;
+                        INSDC_coord_zero mate_ref_pos;
+
+                        rc = get_mate_info( ptx, mc, ids, row_id, mate_id, nreads, &mate_ref_name, &mate_ref_name_len, &mate_ref_pos );
+                        if ( rc == 0 )
+                            rc = KOutMsg( "%.*s\t%li\t", mate_ref_name_len, mate_ref_name, mate_ref_pos );
+                    }
+                    else
+                    {
+                        /* print the mate info */
+                        rc = dump_the_other_read( stx, ptx, row_id, mate_idx );
+                    }
+                }
+            }
+
+
+            /* SAM-FIELD: TLEN      SRA-column: none, fix '0' */
+            if ( rc == 0 )
+                rc = KOutMsg( "0\t" );
+
+            if ( rc == 0 && read == NULL )
+                rc = read_INSDC_dna_text_ptr( row_id, stx->cursor, stx->read_idx, &read, &rd_len, "READ" );
+            if ( rc == 0 && read_start == NULL )
+                rc = read_read_start( stx, row_id, &read_start, nreads );
+
+            /* SAM-FIELD: SEQ       SRA-column: READ, sliced by READ_START/READ_LEN */
+            if ( rc == 0 )
+                rc = print_sliced_read( read, read_idx, reverse, read_start, read_len );
+            if ( rc == 0 )
+                rc = KOutMsg( "\t" );
+
+            if ( rc == 0 && quality == NULL )
+                rc = read_quality( stx, row_id, &quality, rd_len );
+
+            /* SAM-FIELD: QUAL      SRA-column: QUALITY, sliced by READ_START/READ_LEN */
+            if ( rc == 0 )
+                rc = print_sliced_quality( opts, quality, read_idx, reverse, read_start, read_len );
+
+            /* OPT SAM-FIIELD:      SRA-column: ALIGN_ID */
+            if ( rc == 0 && opts->print_alignment_id_in_column_xi )
+                rc = KOutMsg( "\tXI:i:%u", row_id );
+
+            /* OPT SAM-FIIELD:      SRA-column: SPOT_GROUP */
+            if ( rc == 0 && stx->spot_group_idx != COL_NOT_AVAILABLE )
+                rc = opt_field_spot_group( stx, row_id );
+
+            /* OPT SAM-FIELD:       SRA-column: LINKAGE_GROUP */
+            if ( rc == 0 && stx->lnk_group_idx != COL_NOT_AVAILABLE )
+                rc = opt_field_lnk_group( stx, row_id );
+
+            if ( rc == 0 )
+                rc = KOutMsg( "\n" );
+        }
+    }
+    return rc;
+}
+
+
+/* called if we are dumping from a legacy table instead from a database */
+static rc_t dump_seq_row_sam( const samdump_opts * const opts,
+                              const seq_table_ctx * const stx,
+                              const int64_t row_id,
+                              const uint32_t nreads )
+{
+    uint32_t read_idx, rd_len, name_len;
+    const char * quality = NULL;
+    const char * name = NULL;
+    const INSDC_dna_text * read = NULL;
+    const INSDC_read_type * read_type;
+    const INSDC_read_filter * read_filter = NULL;
+    const INSDC_coord_zero * read_start = NULL;
+    const INSDC_coord_len * read_len;
+
+    rc_t rc = read_read_len( stx, row_id, &read_len, nreads );
+    if ( rc == 0 )
+    {
+        if ( stx->name_idx != COL_NOT_AVAILABLE )
+            rc = read_char_ptr( row_id, stx->cursor, stx->name_idx, &name, &name_len, "NAME" );
+        else
+            name_len = 0;
+    }
+    if ( rc == 0 )
+        rc = read_read_type( stx, row_id, &read_type, nreads );
+
+    for ( read_idx = 0; ( read_idx < nreads ) && ( rc == 0 ); ++read_idx )
+    {
+        if ( ( read_len[ read_idx ] > 0 ) &&             /* has a length! */
+             ( ( read_type[ read_idx ] & READ_TYPE_BIOLOGICAL ) == READ_TYPE_BIOLOGICAL ) )
+        {
+            bool reverse = false;
+            uint32_t mate_idx = 0;
+
+            if ( nreads > 1 )
+            {
+                if ( read_idx == ( nreads - 1 ) )
+                    mate_idx = read_idx - 1;
+                else
+                    mate_idx = read_idx + 1;
+            }
+
+            if ( rc == 0 ) /* types in interfaces/insdc/insdc.h */
+                reverse = calc_reverse_flag( opts, read_idx, read_type );
+
+            if ( rc == 0 && read_filter == NULL )
+                rc = read_read_filter( stx, row_id, &read_filter, nreads );
+
+            /* SAM-FIELD: QNAME     SRA-column: SPOT_ID ( int64 ) */
+            if ( rc == 0 )
+            {
+                if ( name != NULL && name_len > 0 )
+                    rc = KOutMsg( "%.*s\t", name_len, name );
+                else
+                    rc = KOutMsg( "%lu\t", row_id );
+            }
+
+            /* SAM-FIELD: FLAG      SRA-column: calculated from READ_TYPE, READ_FILTER etc. */
+            if ( rc == 0 )
+            {
+                uint32_t sam_flags = calculate_unaligned_sam_flags_db( nreads, read_idx, mate_idx, 
+                                            0, read_type, reverse, read_filter );
+                rc = KOutMsg( "%u\t", sam_flags );
+            }
+
+            /* SAM-FIELD: RNAME     SRA-column: none, fix '*' */
+            /* SAM-FIELD: POS       SRA-column: none, fix '0' */
+            /* SAM-FIELD: MAPQ      SRA-column: none, fix '0' */
+            /* SAM-FIELD: CIGAR     SRA-column: none, fix '*' */
+            /* SAM-FIELD: RNEXT     SRA-column: none, fix '*' */
+            /* SAM-FIELD: POS       SRA-column: none, fix '0' */
+            /* SAM-FIELD: TLEN      SRA-column: none, fix '0' */
+
+            if ( rc == 0 )
+                rc = KOutMsg( "*\t0\t0\t*\t*\t0\t0\t" );
+
+            if ( rc == 0 && read == NULL )
+                rc = read_INSDC_dna_text_ptr( row_id, stx->cursor, stx->read_idx, &read, &rd_len, "READ" );
+            if ( rc == 0 && read_start == NULL )
+                rc = read_read_start( stx, row_id, &read_start, nreads );
+
+            /* SAM-FIELD: SEQ       SRA-column: READ, sliced by READ_START/READ_LEN */
+            if ( rc == 0 )
+                rc = print_sliced_read( read, read_idx, reverse, read_start, read_len );
+            if ( rc == 0 )
+                rc = KOutMsg( "\t" );
+
+            if ( rc == 0 && quality == NULL )
+                rc = read_quality( stx, row_id, &quality, rd_len );
+
+            /* SAM-FIELD: QUAL      SRA-column: QUALITY, sliced by READ_START/READ_LEN */
+            if ( rc == 0 )
+                rc = print_sliced_quality( opts, quality, read_idx, reverse, read_start, read_len );
+
+            /* OPT SAM-FIIELD:      SRA-column: ALIGN_ID */
+            if ( rc == 0 && opts->print_alignment_id_in_column_xi )
+                rc = KOutMsg( "\tXI:i:%u", row_id );
+
+            /* OPT SAM-FIIELD:      SRA-column: SPOT_GROUP */
+            if ( rc == 0 && stx->spot_group_idx != COL_NOT_AVAILABLE )
+                rc = opt_field_spot_group( stx, row_id );
+
+            /* OPT SAM-FIELD:       SRA-column: LINKAGE_GROUP */
+            if ( rc == 0 && stx->lnk_group_idx != COL_NOT_AVAILABLE )
+                rc = opt_field_lnk_group( stx, row_id );
+
+            if ( rc == 0 )
+                rc = KOutMsg( "\n" );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t dump_seq_row_fastx_filtered( const samdump_opts * const opts,
+                                         const seq_table_ctx * const stx,
+                                         const prim_table_ctx * const ptx,
+                                         const matecache * const mc,
+                                         const input_database * const ids,
+                                         const int64_t row_id,
+                                         const uint32_t nreads )
+{
+    uint32_t read_idx, rd_len, prim_align_ids_len, spot_group_len = 0;
+    const int64_t * prim_align_ids;
+    const char * quality = NULL;
+    const INSDC_dna_text * read = NULL;
+    const char * spot_group = NULL;
+    const INSDC_read_type * read_type = NULL;
+    const INSDC_coord_zero * read_start = NULL;
+    const INSDC_coord_len * read_len;
+
+    rc_t rc = read_int64_ptr( row_id, stx->cursor, stx->prim_al_id_idx, &prim_align_ids, &prim_align_ids_len, "PRIM_AL_ID" );
+    if ( rc == 0 && nreads != prim_align_ids_len )
+        rc = complain_size_diff( row_id, "PRIMARY_ALIGNMENT_ID" );
+    if ( rc == 0 )
+        rc = read_read_len( stx, row_id, &read_len, nreads );
+
+    for ( read_idx = 0; ( read_idx < nreads ) && ( rc == 0 ); ++read_idx )
+    {
+        if ( prim_align_ids[ read_idx ] == 0 &&    /* read is NOT aligned! */
+             read_len[ read_idx ] > 0 )            /* and has a length! */
+        {
+            uint32_t mate_idx = calc_mate_idx( nreads, read_idx );
+            int64_t align_id = prim_align_ids[ mate_idx ];
+            if ( align_id != 0 )
+            {
+                uint32_t ref_idx;
+                INSDC_coord_zero mate_ref_pos;
+                int64_t seq_spot_id;
+                rc = matecache_lookup_unaligned( mc, ids->db_idx, align_id, &mate_ref_pos, &ref_idx, &seq_spot_id );
+                if ( rc == 0 )
+                {
+                    bool reverse;
+
+                    /* the NAME */
+                    if ( opts->output_format == of_fastq )
+                        rc = KOutMsg( "@" );
+                    else
+                        rc = KOutMsg( ">" );
+
+                    if ( rc == 0 )
+                    {
+                        if ( opts->print_spot_group_in_name && spot_group == NULL )
+                            rc = read_char_ptr( row_id, stx->cursor, stx->spot_group_idx, &spot_group, &spot_group_len, "SPOT_GROUP" );
+                        if ( rc == 0 )
+                            rc = dump_name( opts, seq_spot_id, spot_group, spot_group_len ); /* sam-dump-opts.c */
+                        if ( rc == 0 )
+                            rc = KOutMsg( "/%u unaligned\n", read_idx + 1 );
+                    }
+
+                    if ( rc == 0 && read == NULL )
+                        rc = read_INSDC_dna_text_ptr( row_id, stx->cursor, stx->read_idx, &read, &rd_len, "READ" );
+                    if ( rc == 0 && quality == NULL )
+                        rc = read_quality( stx, row_id, &quality, rd_len );
+                    if ( rc == 0 && read_type == NULL )
+                        rc = read_read_type( stx, row_id, &read_type, nreads );
+                    if ( rc == 0 )
+                        reverse = ( ( read_type[ read_idx ] & READ_TYPE_REVERSE ) == READ_TYPE_REVERSE );
+                    if ( rc == 0 && read_start == NULL )
+                        rc = read_read_start( stx, row_id, &read_start, nreads );
+
+                    /* the READ */
+                    if ( rc == 0 )
+                        rc = print_sliced_read( read, read_idx, reverse, read_start, read_len );
+                    if ( rc == 0 )
+                        rc = KOutMsg( "\n" );
+
+                    /* in case of fastq : the QUALITY-line */
+                    if ( rc == 0 && opts->output_format == of_fastq )
+                    {
+                        rc = KOutMsg( "+\n" );
+                        if ( rc == 0 )
+                            rc = print_sliced_quality( opts, quality, read_idx, reverse, read_start, read_len );
+                        if ( rc == 0 )
+                            rc = KOutMsg( "\n" );
+                    }
+                }
+                else
+                {
+                    rc = 0;
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t dump_seq_row_fastx( const samdump_opts * const opts,
+                                const seq_table_ctx * const stx,
+                                const int64_t row_id,
+                                const uint32_t nreads )
+{
+    uint32_t read_idx, rd_len, prim_align_ids_len, spot_group_len = 0;
+    const int64_t * prim_align_ids;
+    const char * quality = NULL;
+    const INSDC_dna_text * read = NULL ;
+    const char * spot_group = NULL;
+    const INSDC_read_type * read_type = NULL;
+    const INSDC_coord_zero * read_start = NULL;
+    const INSDC_coord_len * read_len;
+
+    rc_t rc = read_int64_ptr( row_id, stx->cursor, stx->prim_al_id_idx, &prim_align_ids, &prim_align_ids_len, "PRIM_AL_IDS" );
+    if ( rc == 0 && nreads != prim_align_ids_len )
+        rc = complain_size_diff( row_id, "PRIMARY_ALIGNMENT_ID" );
+    if ( rc == 0 )
+        rc = read_read_len( stx, row_id, &read_len, nreads );
+
+    for ( read_idx = 0; ( read_idx < nreads ) && ( rc == 0 ); ++read_idx )
+    {
+        if ( prim_align_ids[ read_idx ] == 0 &&    /* read is NOT aligned! */
+             read_len[ read_idx ] > 0 )            /* and has a length! */
+        {
+            bool reverse;
+
+            /* the NAME */
+            if ( opts->output_format == of_fastq )
+                rc = KOutMsg( "@" );
+            else
+                rc = KOutMsg( ">" );
+            if ( rc == 0 )
+            {
+                if ( opts->print_spot_group_in_name && spot_group == NULL )
+                    rc = read_char_ptr( row_id, stx->cursor, stx->spot_group_idx, &spot_group, &spot_group_len, "SPOT_GROUP" );
+                if ( rc == 0 )
+                    rc = dump_name( opts, row_id, spot_group, spot_group_len ); /* sam-dump-opts.c */
+                if ( rc == 0 )
+                    rc = KOutMsg( "/%u unaligned\n", read_idx + 1 );
+            }
+
+            if ( rc == 0 && read == NULL )
+                rc = read_INSDC_dna_text_ptr( row_id, stx->cursor, stx->read_idx, &read, &rd_len, "READ" );
+            if ( rc == 0 && quality == NULL )
+                rc = read_quality( stx, row_id, &quality, rd_len );
+            if ( rc == 0 && read_type == NULL )
+                rc = read_read_type( stx, row_id, &read_type, nreads );
+            if ( rc == 0 )
+                reverse = ( ( read_type[ read_idx ] & READ_TYPE_REVERSE ) == READ_TYPE_REVERSE );
+            if ( rc == 0 && read_start == NULL )
+                rc = read_read_start( stx, row_id, &read_start, nreads );
+
+            /* the READ */
+            if ( rc == 0 )
+                rc = print_sliced_read( read, read_idx, reverse, read_start, read_len );
+            if ( rc == 0 )
+                rc = KOutMsg( "\n" );
+
+            /* in case of fastq : the QUALITY-line */
+            if ( rc == 0 && opts->output_format == of_fastq )
+            {
+                rc = KOutMsg( "+\n" );
+                if ( rc == 0 )
+                    rc = print_sliced_quality( opts, quality, read_idx, reverse, read_start, read_len );
+                if ( rc == 0 )
+                    rc = KOutMsg( "\n" );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t dump_seq_tab_row_fastx( const samdump_opts * const opts,
+                                    const seq_table_ctx * const stx,
+                                    const int64_t row_id,
+                                    const uint32_t nreads )
+{
+    uint32_t read_idx, rd_len, name_len, spot_group_len = 0;
+    const char * quality = NULL;
+    const char * name;
+    const INSDC_dna_text * read = NULL ;
+    const char * spot_group = NULL;
+    const INSDC_read_type * read_type;
+    const INSDC_coord_zero * read_start = NULL;
+    const INSDC_coord_len * read_len;
+
+    rc_t rc = read_read_len( stx, row_id, &read_len, nreads );
+    if ( rc == 0 )
+        rc = read_char_ptr( row_id, stx->cursor, stx->name_idx, &name, &name_len, "NAME" );
+    if ( rc == 0 )
+        rc = read_read_type( stx, row_id, &read_type, nreads );
+
+    for ( read_idx = 0; ( read_idx < nreads ) && ( rc == 0 ); ++read_idx )
+    {
+        if ( ( read_len[ read_idx ] > 0 ) &&            /* has a length! */
+             ( ( read_type[ read_idx ] & READ_TYPE_BIOLOGICAL ) == READ_TYPE_BIOLOGICAL ) )
+        {
+            bool reverse;
+
+            /* the NAME */
+            if ( opts->output_format == of_fastq )
+                rc = KOutMsg( "@" );
+            else
+                rc = KOutMsg( ">" );
+            if ( rc == 0 )
+            {
+                if ( opts->print_spot_group_in_name && spot_group == NULL )
+                    rc = read_char_ptr( row_id, stx->cursor, stx->spot_group_idx, &spot_group, &spot_group_len, "SPOT_GROUP" );
+
+                if ( rc == 0 )
+                    rc = dump_name_legacy( opts, name, name_len, spot_group, spot_group_len ); /* sam-dump-opts.c */
+
+                if ( rc == 0 )
+                    rc = KOutMsg( "/%u unaligned\n", read_idx + 1 );
+            }
+
+            if ( rc == 0 && read == NULL )
+                rc = read_INSDC_dna_text_ptr( row_id, stx->cursor, stx->read_idx, &read, &rd_len, "READ" );
+            if ( rc == 0 && quality == NULL )
+                rc = read_quality( stx, row_id, &quality, rd_len );
+            if ( rc == 0 )
+                reverse = ( ( read_type[ read_idx ] & READ_TYPE_REVERSE ) == READ_TYPE_REVERSE );
+            if ( rc == 0 && read_start == NULL )
+                rc = read_read_start( stx, row_id, &read_start, nreads );
+
+            /* the READ */
+            if ( rc == 0 )
+                rc = print_sliced_read( read, read_idx, reverse, read_start, read_len );
+            if ( rc == 0 )
+                rc = KOutMsg( "\n" );
+
+            /* in case of fastq : the QUALITY-line */
+            if ( rc == 0 && opts->output_format == of_fastq )
+            {
+                if ( quality == NULL )
+                    rc = read_quality( stx, row_id, &quality, rd_len );
+                if ( rc == 0 )
+                    rc = KOutMsg( "+\n" );
+                if ( rc == 0 )
+                    rc = print_sliced_quality( opts, quality, read_idx, reverse, read_start, read_len );
+                if ( rc == 0 )
+                    rc = KOutMsg( "\n" );
+            }
+        }
+    }
+    return rc;
+}
+
+
+typedef struct unaligned_callback_ctx
+{
+    const samdump_opts * opts;
+    const input_database * ids;
+    const matecache * mc;
+    seq_table_ctx * stx;
+    prim_table_ctx * ptx;
+} unaligned_callback_ctx;
+
+
+static rc_t CC on_unaligned_seq_id( int64_t seq_id, int64_t al_id, void * user_data )
+{
+    rc_t rc = Quitting();
+    if ( rc == 0 )
+    {
+        seq_row row;
+        unaligned_callback_ctx * u_ctx = user_data;
+        rc = read_seq_row( u_ctx->opts, u_ctx->stx, seq_id, &row );
+        if ( rc == 0 && !row.filtered_out )
+        {
+            switch( u_ctx->opts->output_format )
+            {
+                case of_sam   : rc = dump_seq_row_sam_filtered( u_ctx->opts, u_ctx->stx, u_ctx->ptx, u_ctx->mc, u_ctx->ids, seq_id, row.nreads ); break;
+                case of_fasta : /* fall through intended ! */
+                case of_fastq : rc = dump_seq_row_fastx_filtered( u_ctx->opts, u_ctx->stx, u_ctx->ptx, u_ctx->mc, u_ctx->ids, seq_id, row.nreads ); break;
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t print_unaligned_database_filtered_2( const samdump_opts * const opts,
+                                                 const input_table * const seq,
+                                                 const input_table * const prim,
+                                                 const matecache * const mc,
+                                                 const input_database * const ids )
+{
+    seq_table_ctx stx;
+    rc_t rc = prepare_seq_table_ctx( opts, seq, &stx );
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen( stx.cursor );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorOpen( SEQUENCE ) for $(tn) failed", "tn=%s", seq->path ) );
+        }
+        else
+        {
+            prim_table_ctx ptx;
+            rc = prepare_prim_table_ctx( opts, prim, &ptx );
+            if ( rc == 0 )
+            {
+                unaligned_callback_ctx u_ctx;
+                u_ctx.opts = opts;
+                u_ctx.ids = ids;
+                u_ctx.mc = mc;
+                u_ctx.stx = &stx;
+                u_ctx.ptx = &ptx;
+                rc = foreach_unaligned_entry( mc, ids->db_idx, on_unaligned_seq_id, &u_ctx );
+                VCursorRelease( ptx.cursor );
+            }
+        }
+    }
+    return rc;
+}
+
+
+/* we are printing from a sra-database, we print half aligned reads only if we find them in the mate-cache */
+static rc_t print_unaligned_database_filtered( const samdump_opts * const opts,
+                                               const input_table * const seq,
+                                               const input_table * const prim,
+                                               const matecache * const mc,
+                                               const input_database * const ids )
+{
+    return print_unaligned_database_filtered_2( opts, seq, prim, mc, ids );
+#if 0
+    seq_table_ctx stx;
+    rc_t rc = prepare_seq_table_ctx( opts, seq, &stx );
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen( stx.cursor );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorOpen( SEQUENCE ) for $(tn) failed", "tn=%s", seq->path ) );
+        }
+        else
+        {
+            int64_t first_row;
+            uint64_t row_count;
+            rc = VCursorIdRange( stx.cursor, stx.prim_al_id_idx, &first_row, &row_count );
+            if ( rc != 0 )
+            {
+                (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorIdRange( SEQUENCE ) for $(tn) failed", "tn=%s", seq->path ) );
+            }
+            else
+            {
+                prim_table_ctx ptx;
+                rc = prepare_prim_table_ctx( opts, prim, &ptx );
+                if ( rc == 0 )
+                {
+                    int64_t row_id;
+                    seq_row row;
+
+                    for ( row_id = first_row; ( ( row_id - first_row ) < row_count ) && rc == 0; ++row_id )
+                    {
+                        rc = Quitting();
+                        if ( rc == 0 )
+                        {
+                            rc = read_seq_row( opts, &stx, row_id, &row );
+                            if ( rc == 0 && !row.filtered_out )
+                            {
+                                switch( opts->output_format )
+                                {
+                                    case of_sam   : rc = dump_seq_row_sam_filtered( opts, &stx, &ptx, mc, ids, row_id, row.nreads ); break;
+                                    case of_fasta : /* fall through intended ! */
+                                    case of_fastq : rc = dump_seq_row_fastx_filtered( opts, &stx, &ptx, mc, ids, row_id, row.nreads ); break;
+                                }
+                            }
+                        }
+                    }
+                    VCursorRelease( ptx.cursor );
+                }
+            }
+        }
+        VCursorRelease( stx.cursor );
+    }
+    return rc;
+#endif
+}
+
+
+/* we are printing from a sra-database, we print all unaligned read we can find */
+static rc_t print_unaligned_database_full( const samdump_opts * const opts,
+                                           const input_table * const seq,
+                                           const input_table * const prim,
+                                           const matecache * const mc,
+                                           const input_database * const ids )
+{
+    seq_table_ctx stx;
+    rc_t rc = prepare_seq_table_ctx( opts, seq, &stx );
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen( stx.cursor );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorOpen( SEQUENCE ) for $(tn) failed", "tn=%s", seq->path ) );
+        }
+        else
+        {
+            prim_table_ctx ptx;
+            if ( opts->output_format == of_sam )
+                rc = prepare_prim_table_ctx( opts, prim, &ptx );
+            if ( rc == 0 )
+            {
+                int64_t first_row, row_id;
+                uint64_t row_count;
+                rc = VCursorIdRange( stx.cursor, stx.read_type_idx, &first_row, &row_count );
+                if ( rc != 0 )
+                {
+                    (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorIdRange( SEQUENCE ) for $(tn) failed", "tn=%s", seq->path ) );
+                }
+                else
+                {
+                    seq_row row;
+                    for ( row_id = first_row; ( ( row_id - first_row ) < row_count ) && rc == 0; ++row_id )
+                    {
+                        rc = Quitting();
+                        if ( rc == 0 )
+                        {
+                            rc = read_seq_row( opts, &stx, row_id, &row );
+                            if ( rc == 0 && !row.filtered_out )
+                            {
+                                switch( opts->output_format )
+                                {
+                                    case of_sam   : rc = dump_seq_prim_row_sam( opts, &stx, &ptx, mc, ids, row_id, row.nreads ); break;
+                                    case of_fasta : /* fall through intended ! */
+                                    case of_fastq : rc = dump_seq_row_fastx( opts, &stx, row_id, row.nreads ); break;
+                                }
+                            }
+                        }
+                    }
+                }
+                if ( opts->output_format == of_sam )
+                    VCursorRelease( ptx.cursor );
+            }
+        }
+        VCursorRelease( stx.cursor );
+    }
+    return rc;
+}
+
+
+/* we are printing from a (legacy) table not from a database! */
+static rc_t print_unaligned_table( const samdump_opts * const opts,
+                                   const input_table * const seq )
+{
+    seq_table_ctx stx;
+    rc_t rc = prepare_seq_table_ctx( opts, seq, &stx );
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen( stx.cursor );
+        if ( rc != 0 )
+        {
+            (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorOpen( SEQUENCE ) for $(tn) failed", "tn=%s", seq->path ) );
+        }
+        else
+        {
+            int64_t first_row, row_id;
+            uint64_t row_count;
+            rc = VCursorIdRange( stx.cursor, stx.read_type_idx, &first_row, &row_count );
+            if ( rc != 0 )
+            {
+                (void)PLOGERR( klogInt, ( klogInt, rc, "VCursorIdRange( SEQUENCE ) for $(tn) failed", "tn=%s", seq->path ) );
+            }
+            else
+            {
+                seq_row row;
+                for ( row_id = first_row; ( ( row_id - first_row ) < row_count ) && rc == 0; ++row_id )
+                {
+                    rc = Quitting();
+                    if ( rc == 0 )
+                    {
+                        rc = read_seq_row( opts, &stx, row_id, &row );
+                        if ( rc == 0 && !row.filtered_out )
+                        {
+                            switch( opts->output_format )
+                            {
+                                case of_sam   : rc = dump_seq_row_sam( opts, &stx, row_id, row.nreads ); break;
+                                case of_fasta : /* fall through intended ! */
+                                case of_fastq : rc = dump_seq_tab_row_fastx( opts, &stx, row_id, row.nreads ); break;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        VCursorRelease( stx.cursor );
+    }
+    return rc;
+}
+
+
+/* entry point from sam-dump3.c */
+rc_t print_unaligned_spots( const samdump_opts * const opts,
+                            const input_files * const ifs,
+                            const matecache * const mc )
+{
+    rc_t rc = 0;
+
+#if _DEBUGGING
+    if ( opts->perf_log != NULL )
+        perf_log_start_section( opts->perf_log, "unaligned spots" );
+#endif
+
+    if ( ( ifs->database_count > 0 ) && ( opts->dump_unaligned_reads || opts->dump_unaligned_only ) )
+    {
+        uint32_t db_idx;
+        for ( db_idx = 0; db_idx < ifs->database_count && rc == 0; ++db_idx )
+        {
+            const input_database * ids = VectorGet( &ifs->dbs, db_idx );
+            if ( ids != NULL )
+            {
+                input_table seq;
+
+                seq.path = ids->path;
+                rc = VDatabaseOpenTableRead( ids->db, &seq.tab, "SEQUENCE" );
+                if ( rc != 0 )
+                {
+                    (void)PLOGERR( klogInt, ( klogInt, rc, "cannot open table SEQUENCE for $(tn)", "tn=%s", ids->path ) );
+                }
+                else
+                {
+                    input_table prim;
+                    prim.path = ids->path;
+                    rc = VDatabaseOpenTableRead( ids->db, &prim.tab, "PRIMARY_ALIGNMENT" );
+                    if ( rc != 0 )
+                    {
+                        (void)PLOGERR( klogInt, ( klogInt, rc, "cannot open table PRIMARY_ALIGNMENT $(tn)", "tn=%s", ids->path ) );
+                    }
+                    else
+                    {
+                        if ( opts->region_count > 0 )
+                        {
+                            rc = print_unaligned_database_filtered( opts, &seq, &prim, mc, ids );
+                        }
+                        else
+                        {
+                            rc = print_unaligned_database_full( opts, &seq, &prim, mc, ids );
+                        }
+                        VTableRelease( prim.tab );
+                    }
+                    VTableRelease( seq.tab );
+                }
+            }
+        }
+    }
+
+    if ( rc == 0 && ifs->table_count > 0 )
+    {
+        uint32_t tab_idx;
+        for ( tab_idx = 0; tab_idx < ifs->table_count && rc == 0; ++tab_idx )
+        {
+            input_table * itab = VectorGet( &ifs->tabs, tab_idx );
+            if ( itab != NULL )
+                rc = print_unaligned_table( opts, itab );
+        }
+    }
+
+#if _DEBUGGING
+    if ( opts->perf_log != NULL )
+        perf_log_end_section( opts->perf_log );
+#endif
+
+    return rc;
+}
diff --git a/tools/sra-pileup/sam-unaligned.h b/tools/sra-pileup/sam-unaligned.h
new file mode 100644
index 0000000..98624be
--- /dev/null
+++ b/tools/sra-pileup/sam-unaligned.h
@@ -0,0 +1,44 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_sam_unaligned_
+#define _h_sam_unaligned_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include "sam-dump-opts.h"
+#include "inputfiles.h"
+#include "matecache.h"
+
+rc_t print_unaligned_spots( const samdump_opts * const opts,
+                            const input_files * const ifs,
+                            const matecache * const mc );
+
+#endif
diff --git a/tools/sra-pileup/splitfastq.pl b/tools/sra-pileup/splitfastq.pl
new file mode 100755
index 0000000..c110599
--- /dev/null
+++ b/tools/sra-pileup/splitfastq.pl
@@ -0,0 +1,46 @@
+#!/usr/bin/perl -w
+
+use IO::File;
+
+my $line;
+my $state = 0;
+my %filehandles;
+my $current_filehandle;
+my $base =  $ARGV[ 0 ];
+
+if ( !defined ( $base ) )
+{
+    $base = "out";
+}
+
+while ( defined ( $line = <STDIN> ) )
+{
+    #remove line-feeds, white space etc.
+    chomp( $line );
+
+    if ( $state == 0 )
+    {
+        # get the first word
+        my $word0 = ( split( /\s+/, $line ) )[ 0 ];
+
+        # start with the beginning of the word, until '/' found, continue with numbers to end of string
+        if ( $word0 =~ /^[^\/]+\/(\d+)$/ )
+        {
+            # grep what matched after the '/'
+            my $selector = $1;
+            if ( !defined ( $filehandles{$selector}) )
+            {
+                $filehandles{$selector} = new IO::File( "$base.$selector.fastq", "w" );
+            }
+            $current_filehandle = $filehandles{$selector};
+        }
+    }
+
+    if ( defined( $current_filehandle ) )
+    {
+        $current_filehandle -> print( "$line\n" );
+    }
+
+    $state ++;
+    $state &= 0x3;
+}
\ No newline at end of file
diff --git a/tools/sra-pileup/sra-pileup.c b/tools/sra-pileup/sra-pileup.c
new file mode 100644
index 0000000..c695026
--- /dev/null
+++ b/tools/sra-pileup/sra-pileup.c
@@ -0,0 +1,1640 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "ref_regions.h"
+#include "cmdline_cmn.h"
+#include "out_redir.h"
+#include "pileup_options.h"
+#include "dyn_string.h"
+#include "reref.h"
+#include "report_deletes.h"
+#include "ref_walker_0.h"
+#include "ref_walker.h"
+#include "walk_debug.h"
+#include "4na_ascii.h"
+#include "pileup_counters.h"
+#include "pileup_index.h"
+#include "pileup_varcount.h"
+#include "pileup_indels.h"
+#include "pileup_stat.h"
+#include "pileup_v2.h"
+
+#include <kapp/main.h>
+
+#include <klib/out.h>
+#include <klib/printf.h>
+#include <klib/report.h>
+#include <klib/vector.h>
+
+#include <kfs/file.h>
+#include <kfs/buffile.h>
+#include <kfs/bzip.h>
+#include <kfs/gzip.h>
+
+#include <insdc/sra.h>
+
+#include <kdb/manager.h>
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/report.h> /* ReportSetVDBManager() */
+#include <vdb/vdb-priv.h> /* VDBManagerDisablePagemapThread() */
+
+#include <sra/sraschema.h>
+#include <align/manager.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+#include <string.h>
+
+#define COL_QUALITY "QUALITY"
+#define COL_REF_ORIENTATION "REF_ORIENTATION"
+#define COL_READ_FILTER "READ_FILTER"
+#define COL_TEMPLATE_LEN "TEMPLATE_LEN"
+
+#define OPTION_MINMAPQ "minmapq"
+#define ALIAS_MINMAPQ  "q"
+
+#define OPTION_DUPS    "duplicates"
+#define ALIAS_DUPS     "d"
+
+#define OPTION_NOQUAL  "noqual"
+#define ALIAS_NOQUAL   "n"
+
+#define OPTION_NOSKIP  "noskip"
+#define ALIAS_NOSKIP   "s"
+
+#define OPTION_SHOWID  "showid"
+#define ALIAS_SHOWID   "i"
+
+#define OPTION_SPOTGRP "spotgroups"
+#define ALIAS_SPOTGRP  "p"
+
+#define OPTION_SEQNAME "seqname"
+#define ALIAS_SEQNAME  "e"
+
+#define OPTION_MIN_M   "minmismatch"
+#define OPTION_MERGE   "merge-dist"
+
+#define OPTION_DEPTH_PER_SPOTGRP	"depth-per-spotgroup"
+
+#define OPTION_FUNC    "function"
+#define ALIAS_FUNC     NULL
+
+#define FUNC_COUNTERS   "count"
+#define FUNC_STAT       "stat"
+#define FUNC_RE_REF     "ref"
+#define FUNC_RE_REF_EXT "ref-ex"
+#define FUNC_DEBUG      "debug"
+#define FUNC_MISMATCH   "mismatch"
+#define FUNC_INDEX      "index"
+#define FUNC_TEST       "test"
+#define FUNC_VARCOUNT   "varcount"
+#define FUNC_DELETES    "deletes"
+#define FUNC_INDELS     "indels"
+
+enum
+{
+    sra_pileup_samtools = 0,
+    sra_pileup_counters = 1,
+    sra_pileup_stat = 2,
+    sra_pileup_report_ref = 3,
+    sra_pileup_report_ref_ext = 4,
+    sra_pileup_debug = 5,
+    sra_pileup_mismatch = 6,
+    sra_pileup_index = 7,
+    sra_pileup_test = 8,
+    sra_pileup_varcount = 9,
+    sra_pileup_deletes = 10,
+	sra_pileup_indels = 11
+};
+
+static const char * minmapq_usage[]         = { "Minimum mapq-value, ", 
+                                                "alignments with lower mapq",
+                                                "will be ignored (default=0)", NULL };
+
+static const char * dups_usage[]            = { "process duplicates 0..off/1..on", NULL };
+
+static const char * noqual_usage[]          = { "Omit qualities in output", NULL };
+
+static const char * noskip_usage[]          = { "Does not skip reference-regions without alignments", NULL };
+
+static const char * showid_usage[]          = { "Shows alignment-id for every base", NULL };
+
+static const char * spotgrp_usage[]         = { "divide by spotgroups", NULL };
+
+static const char * dpgrp_usage[]         	= { "print depth per spotgroup", NULL };
+
+static const char * seqname_usage[]         = { "use original seq-name", NULL };
+
+static const char * min_m_usage[]           = { "min percent of mismatches used in function mismatch, default is 5%", NULL };
+
+static const char * merge_usage[]           = { "If adjacent slices are closer than this, ",
+                                                "they are merged and a skiplist is created. ", 
+                                                "a value of zero disables the feature, default is 10000", NULL };
+
+static const char * no_qual_usage[]         = { "omit qualities", NULL };
+
+static const char * func_ref_usage[]        = { "list references", NULL };
+static const char * func_ref_ex_usage[]     = { "list references + coverage", NULL };
+static const char * func_count_usage[]      = { "sort pileup with counters", NULL };
+static const char * func_stat_usage[]       = { "strand/tlen statistic", NULL };
+static const char * func_mismatch_usage[]   = { "only lines with mismatch", NULL };
+static const char * func_index_usage[]      = { "list deletion counts", NULL };
+static const char * func_indels_usage[]     = { "list only inserts/deletions", NULL };
+
+static const char * func_varcount_usage[]   = { "variation counters: ", 
+                                                "ref-name, ref-pos, ref-base, coverage, ",
+                                                "mismatch A, mismatch C, mismatch G, mismatch T,",
+                                                "deletes, inserts,",
+                                                "ins after A, ins after C, ins after G, ins after T", NULL };
+
+static const char * func_deletes_usage[]    = { "list deletions greater then 20", NULL };
+
+static const char * func_usage[]            = { "alternative functionality", NULL };
+
+OptDef MyOptions[] =
+{
+    /*name,           	alias,         	hfkt,	usage-help,		maxcount, needs value, required */
+    { OPTION_MINMAPQ,	ALIAS_MINMAPQ,	NULL,	minmapq_usage,	1,        true,        false },
+    { OPTION_DUPS,		ALIAS_DUPS,		NULL,	dups_usage,		1,        true,        false },
+    { OPTION_NOQUAL,	ALIAS_NOQUAL,	NULL,	noqual_usage,	1,        false,       false },
+    { OPTION_NOSKIP,	ALIAS_NOSKIP,	NULL,	noskip_usage,	1,        false,       false },
+    { OPTION_SHOWID,	ALIAS_SHOWID,	NULL,	showid_usage,	1,        false,       false },
+    { OPTION_SPOTGRP,	ALIAS_SPOTGRP,	NULL,	spotgrp_usage,	1,        false,       false },
+	{ OPTION_DEPTH_PER_SPOTGRP, NULL,	NULL,	dpgrp_usage,	1,        false,       false },
+    { OPTION_SEQNAME,	ALIAS_SEQNAME,	NULL,	seqname_usage,	1,        false,       false },
+    { OPTION_MIN_M,		NULL,			NULL,	min_m_usage,	1,        true,        false },
+    { OPTION_MERGE,		NULL,			NULL,	merge_usage,	1,        true,        false },
+    { OPTION_FUNC,		ALIAS_FUNC,		NULL,	func_usage,		1,        true,        false }
+};
+
+/* =========================================================================================== */
+
+typedef struct pileup_callback_data
+{
+    const AlignMgr *almgr;
+    pileup_options *options;
+} pileup_callback_data;
+
+
+/* =========================================================================================== */
+
+static rc_t get_str_option( const Args *args, const char *name, const char ** res )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    *res = NULL;
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "ArgsOptionCount() failed" );
+    }
+    else
+    {
+        if ( count > 0 )
+        {
+            rc = ArgsOptionValue( args, name, 0, (const void **)res );
+            if ( rc != 0 )
+            {
+                LOGERR( klogInt, rc, "ArgsOptionValue() failed" );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t get_uint32_option( const Args *args, const char *name,
+                        uint32_t *res, const uint32_t def )
+{
+    const char * s;
+    rc_t rc = get_str_option( args, name, &s );
+    if ( rc == 0 && s != NULL )
+        *res = atoi( s );
+    else
+        *res = def;
+    return rc;
+}
+
+
+static rc_t get_bool_option( const Args *args, const char *name, bool *res, const bool def )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    if ( rc == 0 && count > 0 )
+    {
+        *res = true;
+    }
+    else
+    {
+        *res = def;
+    }
+    return rc;
+}
+
+
+static int cmp_pchar( const char * a, const char * b )
+{
+    int res = -1;
+    if ( ( a != NULL )&&( b != NULL ) )
+    {
+        size_t len_a = string_size( a );
+        size_t len_b = string_size( b );
+        res = string_cmp ( a, len_a, b, len_b, ( len_a < len_b ) ? len_b : len_a );
+    }
+    return res;
+}
+
+/* =========================================================================================== */
+
+
+static rc_t get_pileup_options( Args * args, pileup_options *opts )
+{
+    rc_t rc = get_common_options( args, &opts->cmn );
+    opts->function = sra_pileup_samtools;
+
+    if ( rc == 0 )
+        rc = get_uint32_option( args, OPTION_MINMAPQ, &opts->minmapq, 0 );
+
+    if ( rc == 0 )
+        rc = get_uint32_option( args, OPTION_MIN_M, &opts->min_mismatch, 5 );
+
+    if ( rc == 0 )
+        rc = get_uint32_option( args, OPTION_MERGE, &opts->merge_dist, 10000 );
+        
+    if ( rc == 0 )
+        rc = get_bool_option( args, OPTION_DUPS, &opts->process_dups, false );
+
+    if ( rc == 0 )
+        rc = get_bool_option( args, OPTION_NOQUAL, &opts->omit_qualities, false );
+
+    if ( rc == 0 )
+        rc = get_bool_option( args, OPTION_NOSKIP, &opts->no_skip, false );
+
+    if ( rc == 0 )
+        rc = get_bool_option( args, OPTION_SHOWID, &opts->show_id, false );
+
+    if ( rc == 0 )
+        rc = get_bool_option( args, OPTION_SPOTGRP, &opts->div_by_spotgrp, false );
+
+    if ( rc == 0 )
+        rc = get_bool_option( args, OPTION_DEPTH_PER_SPOTGRP, &opts->depth_per_spotgrp, false );
+		
+    if ( rc == 0 )
+        rc = get_bool_option( args, OPTION_SEQNAME, &opts->use_seq_name, false );
+
+    if ( rc == 0 )
+    {
+        const char * fkt = NULL;
+        rc = get_str_option( args, OPTION_FUNC, &fkt );
+        if ( rc == 0 && fkt != NULL )
+        {
+            if ( cmp_pchar( fkt, FUNC_COUNTERS ) == 0 )
+                opts->function = sra_pileup_counters;
+            else if ( cmp_pchar( fkt, FUNC_STAT ) == 0 )
+                opts->function = sra_pileup_stat;
+            else if ( cmp_pchar( fkt, FUNC_RE_REF ) == 0 )
+                opts->function = sra_pileup_report_ref;
+            else if ( cmp_pchar( fkt, FUNC_RE_REF_EXT ) == 0 )
+                opts->function = sra_pileup_report_ref_ext;
+            else if ( cmp_pchar( fkt, FUNC_DEBUG ) == 0 )
+                opts->function = sra_pileup_debug;
+            else if ( cmp_pchar( fkt, FUNC_MISMATCH ) == 0 )
+                opts->function = sra_pileup_mismatch;
+            else if ( cmp_pchar( fkt, FUNC_INDEX ) == 0 )
+                opts->function = sra_pileup_index;
+            else if ( cmp_pchar( fkt, FUNC_TEST ) == 0 )
+                opts->function = sra_pileup_test;
+            else if ( cmp_pchar( fkt, FUNC_VARCOUNT ) == 0 )
+                opts->function = sra_pileup_varcount;
+            else if ( cmp_pchar( fkt, FUNC_DELETES ) == 0 )
+                opts->function = sra_pileup_deletes;
+            else if ( cmp_pchar( fkt, FUNC_INDELS ) == 0 )
+                opts->function = sra_pileup_indels;
+        }
+    }
+    return rc;
+}
+
+/* GLOBAL VARIABLES */
+struct {
+    KWrtWriter org_writer;
+    void* org_data;
+    KFile* kfile;
+    uint64_t pos;
+} g_out_writer = { NULL };
+
+const char UsageDefaultName[] = "sra-pileup";
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s <path> [options]\n"
+                    "\n", progname);
+}
+
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if ( args == NULL )
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+        rc = ArgsProgram ( args, &fullpath, &progname );
+
+    if ( rc )
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary ( progname );
+    KOutMsg ( "Options:\n" );
+    print_common_helplines();
+    HelpOptionLine ( ALIAS_MINMAPQ, OPTION_MINMAPQ, "min. mapq", minmapq_usage );
+    HelpOptionLine ( ALIAS_DUPS, OPTION_DUPS, "dup-mode", dups_usage );
+    HelpOptionLine ( ALIAS_SPOTGRP, OPTION_SPOTGRP, NULL, spotgrp_usage );
+    HelpOptionLine ( NULL, OPTION_DEPTH_PER_SPOTGRP, NULL, dpgrp_usage );	
+    HelpOptionLine ( ALIAS_SEQNAME, OPTION_SEQNAME, NULL, seqname_usage );
+    HelpOptionLine ( NULL, OPTION_MIN_M, NULL, min_m_usage );
+    HelpOptionLine ( NULL, OPTION_MERGE, NULL, merge_usage );
+    HelpOptionLine ( ALIAS_NOQUAL, OPTION_NOQUAL, NULL, no_qual_usage );
+
+    HelpOptionLine ( NULL, "function ref",      NULL, func_ref_usage );
+    HelpOptionLine ( NULL, "function ref-ex",   NULL, func_ref_ex_usage );
+    HelpOptionLine ( NULL, "function count",    NULL, func_count_usage );
+    HelpOptionLine ( NULL, "function stat",     NULL, func_stat_usage );
+    HelpOptionLine ( NULL, "function mismatch", NULL, func_mismatch_usage );
+    HelpOptionLine ( NULL, "function index",    NULL, func_index_usage );
+    HelpOptionLine ( NULL, "function varcount", NULL, func_varcount_usage );
+    HelpOptionLine ( NULL, "function deletes",  NULL, func_deletes_usage );
+    HelpOptionLine ( NULL, "function indels",   NULL, func_indels_usage );
+	
+    KOutMsg ( "\nGrouping of accessions into artificial spotgroups:\n" );
+    KOutMsg ( "  sra-pileup SRRXXXXXX=a SRRYYYYYY=b SRRZZZZZZ=a\n\n" );
+
+    HelpOptionsStandard ();
+    HelpVersion ( fullpath, KAppVersion() );
+    return rc;
+}
+
+
+/* =========================================================================================== */
+
+/*
+static rc_t CC BufferedWriter ( void* self, const char* buffer, size_t bufsize, size_t* num_writ )
+{
+    rc_t rc = 0;
+
+    assert( buffer != NULL );
+    assert( num_writ != NULL );
+
+    do {
+        rc = KFileWrite( g_out_writer.kfile, g_out_writer.pos, buffer, bufsize, num_writ );
+        if ( rc == 0 )
+        {
+            buffer += *num_writ;
+            bufsize -= *num_writ;
+            g_out_writer.pos += *num_writ;
+        }
+    } while ( rc == 0 && bufsize > 0 );
+    return rc;
+}
+
+
+static rc_t set_stdout_to( bool gzip, bool bzip2, const char * filename, size_t bufsize )
+{
+    rc_t rc = 0;
+    if ( gzip && bzip2 )
+    {
+        rc = RC( rcApp, rcFile, rcConstructing, rcParam, rcAmbiguous );
+    }
+    else
+    {
+        KDirectory *dir;
+        rc = KDirectoryNativeDir( &dir );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "KDirectoryNativeDir() failed" );
+        }
+        else
+        {
+            KFile *of;
+            rc = KDirectoryCreateFile ( dir, &of, false, 0664, kcmInit, "%s", filename );
+            if ( rc == 0 )
+            {
+                KFile *buf;
+                if ( gzip )
+                {
+                    KFile *gz;
+                    rc = KFileMakeGzipForWrite( &gz, of );
+                    if ( rc == 0 )
+                    {
+                        KFileRelease( of );
+                        of = gz;
+                    }
+                }
+                if ( bzip2 )
+                {
+                    KFile *bz;
+                    rc = KFileMakeBzip2ForWrite( &bz, of );
+                    if ( rc == 0 )
+                    {
+                        KFileRelease( of );
+                        of = bz;
+                    }
+                }
+
+                rc = KBufFileMakeWrite( &buf, of, false, bufsize );
+                if ( rc == 0 )
+                {
+                    g_out_writer.kfile = buf;
+                    g_out_writer.org_writer = KOutWriterGet();
+                    g_out_writer.org_data = KOutDataGet();
+                    rc = KOutHandlerSet( BufferedWriter, &g_out_writer );
+                    if ( rc != 0 )
+                    {
+                        LOGERR( klogInt, rc, "KOutHandlerSet() failed" );
+                    }
+                }
+                KFileRelease( of );
+            }
+            KDirectoryRelease( dir );
+        }
+    }
+    return rc;
+}
+
+
+static void release_stdout_redirection( void )
+{
+    KFileRelease( g_out_writer.kfile );
+    if( g_out_writer.org_writer != NULL )
+    {
+        KOutHandlerSet( g_out_writer.org_writer, g_out_writer.org_data );
+    }
+    g_out_writer.org_writer = NULL;
+}
+*/
+
+static rc_t CC write_to_FILE( void *f, const char *buffer, size_t bytes, size_t *num_writ )
+{
+    * num_writ = fwrite ( buffer, 1, bytes, f );
+    if ( * num_writ != bytes )
+        return RC( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+    return 0;
+}
+
+
+/* =========================================================================================== */
+
+
+static rc_t read_base_and_len( struct VCursor const *curs,
+                               uint32_t column_idx,
+                               int64_t row_id,
+                               const void ** base,
+                               uint32_t * len )
+{
+    uint32_t elem_bits, boff, len_intern;
+    const void * ptr;
+    rc_t rc = VCursorCellDataDirect ( curs, row_id, column_idx, &elem_bits, &ptr, &boff, &len_intern );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "VCursorCellDataDirect() failed" );
+    }
+    else
+    {
+        if ( len != NULL ) *len = len_intern;
+        if ( base != NULL ) *base = ptr;
+    }
+    return rc;
+}
+
+
+static rc_t CC populate_tooldata( void *obj, const PlacementRecord *placement,
+        struct VCursor const *curs, INSDC_coord_zero ref_window_start, INSDC_coord_len ref_window_len,
+        void *data, void * placement_ctx )
+{
+    tool_rec * rec = ( tool_rec * ) obj;
+    pileup_callback_data * cb_data = ( pileup_callback_data * )data;
+    pileup_col_ids * col_ids = placement_ctx;
+    rc_t rc = 0;
+
+    rec->quality = NULL;
+    if ( !cb_data->options->process_dups )
+    {
+        const uint8_t * read_filter;
+        uint32_t read_filter_len;
+        rc = read_base_and_len( curs, col_ids->idx_read_filter, placement->id,
+                                (const void **)&read_filter, &read_filter_len );
+        if ( rc == 0 )
+        {
+            if ( ( *read_filter == SRA_READ_FILTER_REJECT )||
+                 ( *read_filter == SRA_READ_FILTER_CRITERIA ) )
+            {
+                rc = RC( rcAlign, rcType, rcAccessing, rcId, rcIgnored );
+            }
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        const bool * orientation;
+        rc = read_base_and_len( curs, col_ids->idx_ref_orientation, placement->id,
+                                (const void **)&orientation, NULL );
+        if ( rc == 0 )
+            rec->reverse = *orientation;
+    }
+
+    if ( rc == 0 && !cb_data->options->omit_qualities )
+    {
+        const uint8_t * quality;
+        /*uint32_t quality_len;*/
+
+        rc = read_base_and_len( curs, col_ids->idx_quality, placement->id,
+                                (const void **)&quality, &rec->quality_len );
+        if ( rc == 0 )
+        {
+            rec->quality = ( uint8_t * )rec;
+            rec->quality += sizeof ( * rec );
+            memcpy( rec->quality, quality, rec->quality_len );
+        }
+    }
+
+    if ( rc == 0 && cb_data->options->read_tlen )
+    {
+        const int32_t * tlen;
+        uint32_t tlen_len;
+
+        rc = read_base_and_len( curs, col_ids->idx_template_len, placement->id,
+                                (const void **)&tlen, &tlen_len );
+        if ( rc == 0 && tlen_len > 0 )
+            rec->tlen = *tlen;
+        else
+            rec->tlen = 0;
+    }
+    else
+        rec->tlen = 0;
+
+    return rc;
+}
+
+
+static rc_t CC alloc_size( struct VCursor const *curs, int64_t row_id, size_t * size, void *data, void * placement_ctx )
+{
+    rc_t rc = 0;
+    tool_rec * rec;
+    pileup_callback_data *cb_data = ( pileup_callback_data * )data;
+    pileup_col_ids * col_ids = placement_ctx;
+    *size = ( sizeof *rec );
+
+    if ( !cb_data->options->omit_qualities )
+    {
+        uint32_t q_len;
+        rc = read_base_and_len( curs, col_ids->idx_quality, row_id, NULL, &q_len );
+        if ( rc == 0 )
+            *size += q_len;
+    }
+    return rc;
+}
+
+
+static rc_t walk_ref_position( ReferenceIterator *ref_iter,
+                               const PlacementRecord *rec,
+                               struct dyn_string *line,
+                               char * qual,
+                               pileup_options *options )
+{
+    rc_t rc = 0;
+    INSDC_coord_zero seq_pos;
+    int32_t state = ReferenceIteratorState ( ref_iter, &seq_pos );
+    tool_rec *xrec = ( tool_rec * ) PlacementRecordCast ( rec, placementRecordExtension1 );
+    bool reverse = xrec->reverse;
+
+    if ( !options->omit_qualities )
+    {
+        if ( seq_pos < xrec->quality_len )
+            *qual = xrec->quality[ seq_pos ];
+        else
+            *qual = 2;
+    }
+
+    if ( ( state & align_iter_invalid ) == align_iter_invalid )
+    {
+        return add_char_2_dyn_string( line, '?' );
+    }
+
+    if ( ( state & align_iter_first ) == align_iter_first )
+    {
+        char s[ 3 ];
+        int32_t c = rec->mapq + 33;
+        if ( c > '~' ) { c = '~'; }
+        if ( c < 33 ) { c = 33; }
+        s[ 0 ] = '^';
+        s[ 1 ] = c;
+        s[ 2 ] = 0;
+        rc = add_string_2_dyn_string( line, s );
+    }
+
+    if ( rc == 0 )
+    {
+        if ( ( state & align_iter_skip ) == align_iter_skip )
+        {
+            if ( reverse )
+                rc = add_char_2_dyn_string( line, '<' );
+            else
+                rc = add_char_2_dyn_string( line, '>' );
+            if ( !options->omit_qualities )
+                *qual = xrec->quality[ seq_pos + 1 ];
+        }
+        else
+        {
+            if ( ( state & align_iter_match ) == align_iter_match )
+                rc = add_char_2_dyn_string( line, ( reverse ? ',' : '.' ) );
+            else
+                rc = add_char_2_dyn_string( line, _4na_to_ascii( state, reverse ) );
+        }
+    }
+
+    if ( ( state & align_iter_insert ) == align_iter_insert )
+    {
+        const INSDC_4na_bin *bases;
+        uint32_t i;
+        uint32_t n = ReferenceIteratorBasesInserted ( ref_iter, &bases );
+        
+        rc = print_2_dyn_string( line, "+%u", n );
+        for ( i = 0; i < n && rc == 0; ++i )
+        {
+            rc = add_char_2_dyn_string( line, _4na_to_ascii( bases[ i ], reverse ) );
+        }
+    }
+
+    if ( ( state & align_iter_delete ) == align_iter_delete )
+    {
+        const INSDC_4na_bin *bases;
+        INSDC_coord_zero ref_pos;
+        uint32_t n = ReferenceIteratorBasesDeleted ( ref_iter, &ref_pos, &bases );
+        if ( bases != NULL )
+        {
+            uint32_t i;
+            rc = print_2_dyn_string( line, "-%u", n );
+            for ( i = 0; i < n && rc == 0; ++i )
+            {
+                rc = add_char_2_dyn_string( line, _4na_to_ascii( bases[ i ], reverse ) );
+            }
+            free( (void *) bases );
+        }
+    }
+
+    if ( ( ( state & align_iter_last ) == align_iter_last )&& ( rc == 0 ) )
+        rc = add_char_2_dyn_string( line, '$' );
+
+    if ( options->show_id )
+        rc = print_2_dyn_string( line, "(%,lu:%,d-%,d/%u)",
+                                 rec->id, rec->pos + 1, rec->pos + rec->len, seq_pos );
+
+    return rc;
+}
+
+
+static rc_t walk_alignments( ReferenceIterator *ref_iter,
+                             struct dyn_string *line,
+							 struct dyn_string *events,
+                             struct dyn_string *qualities,
+                             pileup_options *options )
+{
+    uint32_t depth = 0;
+    rc_t rc;
+	
+	reset_dyn_string( events );
+    do
+    {
+        const PlacementRecord *rec;
+        rc = ReferenceIteratorNextPlacement ( ref_iter, &rec );
+        if ( rc == 0 )
+            rc = walk_ref_position( ref_iter, rec, events, dyn_string_char( qualities, depth++ ), options );
+        if ( rc == 0 )
+            rc = Quitting();
+    } while ( rc == 0 );
+
+	if ( options->depth_per_spotgrp )
+		print_2_dyn_string( line, "%d\t", depth );
+
+	add_dyn_string_2_dyn_string( line, events );
+	
+    if ( !options->omit_qualities )
+    {
+        uint32_t i;
+        add_char_2_dyn_string( line, '\t' );
+        for ( i = 0; i < depth; ++i )
+        {
+            char * c = dyn_string_char( qualities, i );
+            add_char_2_dyn_string( line, *c + 33 );
+        }
+    }
+
+    if ( GetRCState( rc ) == rcDone ) { rc = 0; }
+    return rc;
+}
+
+
+static rc_t walk_spot_groups( ReferenceIterator *ref_iter,
+                              struct dyn_string *line,
+							  struct dyn_string *events,
+                              struct dyn_string *qualities,
+                              pileup_options *options )
+{
+    rc_t rc;
+	reset_dyn_string( events );
+    do
+    {
+        rc = ReferenceIteratorNextSpotGroup ( ref_iter, NULL, NULL );
+        if ( rc == 0 )
+            add_char_2_dyn_string( line, '\t' );
+        if ( rc == 0 )
+            rc = walk_alignments( ref_iter, line, events, qualities, options );
+    } while ( rc == 0 );
+
+    if ( GetRCState( rc ) == rcDone ) { rc = 0; }
+    return rc;
+}
+
+
+static rc_t walk_position( ReferenceIterator *ref_iter,
+                           const char * refname,
+                           struct dyn_string *line,
+						   struct dyn_string *events,
+                           struct dyn_string *qualities,
+                           pileup_options *options )
+{
+    INSDC_coord_zero pos;
+    uint32_t depth;
+    INSDC_4na_bin base;
+
+    rc_t rc = ReferenceIteratorPosition ( ref_iter, &pos, &depth, &base );
+    if ( rc != 0 )
+    {
+        if ( GetRCState( rc ) != rcDone )
+        {
+            LOGERR( klogInt, rc, "ReferenceIteratorNextPos() failed" );
+        }
+    }
+    else if ( ( depth > 0 )||( options->no_skip ) )
+    {
+        bool skip = skiplist_is_skip_position( options->skiplist, pos + 1 );
+        if ( !skip )
+        {
+            rc = expand_dyn_string( line, ( 5 * depth ) + 100 );
+            if ( rc == 0 )
+            {
+				rc = expand_dyn_string( events, ( 5 * depth ) + 100 );
+				if ( rc == 0 )
+				{
+					rc = expand_dyn_string( qualities, depth + 100 );
+					if ( rc == 0 )
+					{
+						char c = _4na_to_ascii( base, false );
+
+						reset_dyn_string( line );
+					
+						if ( options->depth_per_spotgrp )
+							rc = print_2_dyn_string( line, "%s\t%u\t%c", refname, pos + 1, c );
+						else
+							rc = print_2_dyn_string( line, "%s\t%u\t%c\t%u", refname, pos + 1, c, depth );
+							
+						if ( rc == 0 )
+						{
+							if ( depth > 0 )
+								rc = walk_spot_groups( ref_iter, line, events, qualities, options );
+
+							/* only one KOutMsg() per line... */
+							if ( rc == 0 )
+								rc = KOutMsg( "%s\n", dyn_string_char( line, 0 ) );
+
+							if ( GetRCState( rc ) == rcDone )
+								rc = 0;
+						}
+					}
+				}
+            }
+        }
+    } 
+    return rc;
+}
+
+
+static rc_t walk_reference_window( ReferenceIterator *ref_iter,
+                                   const char * refname,
+                                   struct dyn_string *line,
+								   struct dyn_string *events,
+                                   struct dyn_string *qualities,
+                                   pileup_options *options )
+{
+    rc_t rc = 0;
+    while ( rc == 0 )
+    {
+        rc = ReferenceIteratorNextPos ( ref_iter, !options->no_skip );
+        if ( rc != 0 )
+        {
+            if ( GetRCState( rc ) != rcDone )
+            {
+                LOGERR( klogInt, rc, "ReferenceIteratorNextPos() failed" );
+            }
+        }
+        else
+        {
+            rc = walk_position( ref_iter, refname, line, events, qualities, options );
+        }
+        if ( rc == 0 )
+        {
+            rc = Quitting();
+        }
+    }
+    if ( GetRCState( rc ) == rcDone ) rc = 0;
+    return rc;
+}
+
+
+static rc_t walk_reference( ReferenceIterator *ref_iter,
+                            const char * refname,
+                            pileup_options *options )
+{
+    struct dyn_string * line;
+    rc_t rc = allocated_dyn_string ( &line, 4096 );
+    if ( rc == 0 )
+    {
+		struct dyn_string * events;
+		rc_t rc = allocated_dyn_string ( &events, 4096 );
+		if ( rc == 0 )
+		{
+			struct dyn_string * qualities;
+			rc = allocated_dyn_string ( &qualities, 4096 );
+			if ( rc == 0 )
+			{
+				while ( rc == 0 )
+				{
+					rc = Quitting ();
+					if ( rc == 0 )
+					{
+						INSDC_coord_zero first_pos;
+						INSDC_coord_len len;
+						rc = ReferenceIteratorNextWindow ( ref_iter, &first_pos, &len );
+						if ( rc != 0 )
+						{
+							if ( GetRCState( rc ) != rcDone )
+							{
+								LOGERR( klogInt, rc, "ReferenceIteratorNextWindow() failed" );
+							}
+						}
+						else
+							rc = walk_reference_window( ref_iter, refname, line, events, qualities, options );
+					}
+				}
+				free_dyn_string ( qualities );
+			}
+			free_dyn_string( events );
+		}
+        free_dyn_string ( line );
+    }
+    if ( GetRCState( rc ) == rcDone ) rc = 0;
+    return rc;
+}
+
+
+/* =========================================================================================== */
+
+
+static rc_t walk_ref_iter( ReferenceIterator *ref_iter, pileup_options *options )
+{
+    rc_t rc = 0;
+    while( rc == 0 )
+    {
+        /* this is the 1st level of walking the reference-iterator: 
+           visiting each (requested) reference */
+        struct ReferenceObj const * refobj;
+
+        rc = ReferenceIteratorNextReference( ref_iter, NULL, NULL, &refobj );
+        if ( rc == 0 )
+        {
+            if ( refobj != NULL )
+            {
+                const char * refname = NULL;
+                if ( options->use_seq_name )
+                    rc = ReferenceObj_Name( refobj, &refname );
+                else
+                    rc = ReferenceObj_SeqId( refobj, &refname );
+
+                if ( rc == 0 )
+                {
+                    if ( options->skiplist != NULL )
+                        skiplist_enter_ref( options->skiplist, refname );
+                    rc = walk_reference( ref_iter, refname, options );
+                }
+                else
+                {
+                    if ( options->use_seq_name )
+                    {
+                        LOGERR( klogInt, rc, "ReferenceObj_Name() failed" );
+                    }
+                    else
+                    {
+                        LOGERR( klogInt, rc, "ReferenceObj_SeqId() failed" );
+                    }
+                }
+            }
+        }
+        else
+        {
+            if ( GetRCState( rc ) != rcDone )
+            {
+                LOGERR( klogInt, rc, "ReferenceIteratorNextReference() failed" );
+            }
+        }
+    }
+    if ( GetRCState( rc ) == rcDone ) { rc = 0; }
+    if ( GetRCState( rc ) == rcCanceled ) { rc = 0; }
+    return rc;
+}
+
+
+/* =========================================================================================== */
+
+static rc_t add_quality_and_orientation( const VTable *tbl, const VCursor ** cursor,
+                                         bool omit_qualities, bool read_tlen, pileup_col_ids * cursor_ids )
+{
+    rc_t rc = VTableCreateCursorRead ( tbl, cursor );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "VTableCreateCursorRead() failed" );
+    }
+
+    if ( rc == 0 && !omit_qualities )
+    {
+        rc = VCursorAddColumn ( *cursor, &cursor_ids->idx_quality, COL_QUALITY );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VCursorAddColumn(QUALITY) failed" );
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        rc = VCursorAddColumn ( *cursor, &cursor_ids->idx_ref_orientation, COL_REF_ORIENTATION );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VCursorAddColumn(REF_ORIENTATION) failed" );
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        rc = VCursorAddColumn ( *cursor, &cursor_ids->idx_read_filter, COL_READ_FILTER );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VCursorAddColumn(READ_FILTER) failed" );
+        }
+    }
+
+    if ( rc == 0 && read_tlen )
+    {
+        rc = VCursorAddColumn ( *cursor, &cursor_ids->idx_template_len, COL_TEMPLATE_LEN );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VCursorAddColumn(TEMPLATE_LEN) failed" );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t prepare_prim_cursor( const VDatabase *db, const VCursor ** cursor,
+                                 bool omit_qualities, bool read_tlen, pileup_col_ids * cursor_ids )
+{
+    const VTable *tbl;
+    rc_t rc = VDatabaseOpenTableRead ( db, &tbl, "PRIMARY_ALIGNMENT" );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "VDatabaseOpenTableRead(PRIMARY_ALIGNMENT) failed" );
+    }
+    else
+    {
+        rc = add_quality_and_orientation( tbl, cursor, omit_qualities, read_tlen, cursor_ids );
+        VTableRelease ( tbl );
+    }
+    return rc;
+}
+
+
+static rc_t prepare_sec_cursor( const VDatabase *db, const VCursor ** cursor,
+                                bool omit_qualities, bool read_tlen, pileup_col_ids * cursor_ids )
+{
+    const VTable *tbl;
+    rc_t rc = VDatabaseOpenTableRead ( db, &tbl, "SECONDARY_ALIGNMENT" );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "VDatabaseOpenTableRead(SECONDARY_ALIGNMENT) failed" );
+    }
+    else
+    {
+        rc = add_quality_and_orientation( tbl, cursor, omit_qualities, read_tlen, cursor_ids );
+        VTableRelease ( tbl );
+    }
+    return rc;
+}
+
+
+static rc_t prepare_evidence_cursor( const VDatabase *db, const VCursor ** cursor,
+                                     bool omit_qualities, bool read_tlen, pileup_col_ids * cursor_ids )
+{
+    const VTable *tbl;
+    rc_t rc = VDatabaseOpenTableRead ( db, &tbl, "EVIDENCE_ALIGNMENT" );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "VDatabaseOpenTableRead(EVIDENCE) failed" );
+    }
+    else
+    {
+        rc = add_quality_and_orientation( tbl, cursor, omit_qualities, read_tlen, cursor_ids );
+        VTableRelease ( tbl );
+    }
+    return rc;
+}
+
+#if 0
+static void show_placement_params( const char * prefix, const ReferenceObj *refobj,
+                                   uint32_t start, uint32_t end )
+{
+    const char * name;
+    rc_t rc = ReferenceObj_SeqId( refobj, &name );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "ReferenceObj_SeqId() failed" );
+    }
+    else
+    {
+        KOutMsg( "prepare %s: <%s> %u..%u\n", prefix, name, start, end ) ;
+    }
+}
+#endif
+
+
+static rc_t make_cursor_ids( Vector *cursor_id_vector, pileup_col_ids ** cursor_ids )
+{
+    rc_t rc;
+    pileup_col_ids * ids = malloc( sizeof * ids );
+    if ( ids == NULL )
+        rc = RC ( rcApp, rcNoTarg, rcOpening, rcMemory, rcExhausted );
+    else
+    {
+        rc = VectorAppend ( cursor_id_vector, NULL, ids );
+        if ( rc != 0 )
+            free( ids );
+        else
+            *cursor_ids = ids;
+    }
+    return rc;
+}
+
+
+static rc_t CC prepare_section_cb( prepare_ctx * ctx, const struct reference_range * range )
+{
+    rc_t rc = 0;
+    INSDC_coord_len len;
+    if ( ctx->db == NULL || ctx->refobj == NULL )
+    {
+        rc = SILENT_RC ( rcApp, rcNoTarg, rcOpening, rcSelf, rcInvalid );
+        /* it is opened in prepare_db_table even if ctx->db == NULL */
+        PLOGERR( klogErr, ( klogErr, rc, "failed to process $(path)",
+            "path=%s", ctx->path == NULL ? "input argument" : ctx->path));
+        ReportSilence();
+    }
+    else
+    {
+        rc = ReferenceObj_SeqLength( ctx->refobj, &len );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "ReferenceObj_SeqLength() failed" );
+        }
+        else
+        {
+            uint32_t start, end;
+            rc_t rc1 = 0, rc2 = 0, rc3 = 0;
+
+            if ( range == NULL )
+            {
+                start = 1;
+                end = ( len - start ) + 1;
+            }
+            else
+            {
+                start = get_ref_range_start( range );
+                end   = get_ref_range_end( range );
+            }
+
+            if ( start == 0 ) start = 1;
+            if ( ( end == 0 )||( end > len + 1 ) )
+            {
+                end = ( len - start ) + 1;
+            }
+            
+            /* depending on ctx->select prepare primary, secondary or both... */
+            if ( ctx->use_primary_alignments )
+            {
+                if ( ctx->prim_cur == NULL )
+                {
+                    rc1 = make_cursor_ids( ctx->data, &ctx->prim_cur_ids );
+                    if ( rc1 != 0 )
+                    {
+                        LOGERR( klogInt, rc1, "cannot create cursor-ids for prim. alignment cursor" );
+                    }
+                    else
+                        rc1 = prepare_prim_cursor( ctx->db, &ctx->prim_cur, ctx->omit_qualities,
+                                                   ctx->read_tlen, ctx->prim_cur_ids );
+                }
+
+                if ( rc1 == 0 )
+                {
+                    /* show_placement_params( "primary", ctx->refobj, start, end ); */
+                    rc1 = ReferenceIteratorAddPlacements ( ctx->ref_iter,       /* the outer ref-iter */
+                                                          ctx->refobj,          /* the ref-obj for this chromosome */
+                                                          start - 1,            /* start ( zero-based ) */
+                                                          end - start + 1,      /* length */
+                                                          NULL,                 /* ref-cursor */
+                                                          ctx->prim_cur,        /* align-cursor */
+                                                          primary_align_ids,    /* which id's */
+                                                          ctx->spot_group,      /* what read-group */
+                                                          ctx->prim_cur_ids     /* placement-context */
+                                                         );
+                    if ( rc1 != 0 )
+                    {
+                        LOGERR( klogInt, rc1, "ReferenceIteratorAddPlacements(prim) failed" );
+                    }
+                }
+            }
+
+            if ( ctx->use_secondary_alignments )
+            {
+                if ( ctx->sec_cur == NULL )
+                {
+                    rc2 = make_cursor_ids( ctx->data, &ctx->sec_cur_ids );
+                    if ( rc2 != 0 )
+                    {
+                        LOGERR( klogInt, rc2, "cannot create cursor-ids for sec. alignment cursor" );
+                    }
+                    else
+                        rc2 = prepare_sec_cursor( ctx->db, &ctx->sec_cur, ctx->omit_qualities,
+                                                  ctx->read_tlen, ctx->sec_cur_ids );
+                }
+
+                if ( rc2 == 0 )
+                {
+                    /* show_placement_params( "secondary", ctx->refobj, start, end ); */
+                    rc2 = ReferenceIteratorAddPlacements ( ctx->ref_iter,       /* the outer ref-iter */
+                                                          ctx->refobj,          /* the ref-obj for this chromosome */
+                                                          start - 1,            /* start ( zero-based ) */
+                                                          end - start + 1,      /* length */
+                                                          NULL,                 /* ref-cursor */
+                                                          ctx->sec_cur,         /* align-cursor */
+                                                          secondary_align_ids,  /* which id's */
+                                                          ctx->spot_group,      /* what read-group */
+                                                          ctx->sec_cur_ids      /* placement-context */
+                                                         );
+                    if ( rc2 != 0 )
+                    {
+                        LOGERR( klogInt, rc2, "ReferenceIteratorAddPlacements(sec) failed" );
+                    }
+                }
+            }
+
+            if ( ctx->use_evidence_alignments )
+            {
+                if ( ctx->ev_cur == NULL )
+                {
+                    rc3 = make_cursor_ids( ctx->data, &ctx->ev_cur_ids );
+                    if ( rc3 != 0 )
+                    {
+                        LOGERR( klogInt, rc3, "cannot create cursor-ids for ev. alignment cursor" );
+                    }
+                    else
+                        rc3 = prepare_evidence_cursor( ctx->db, &ctx->ev_cur, ctx->omit_qualities,
+                                                       ctx->read_tlen, ctx->ev_cur_ids );
+                }
+
+                if ( rc3 == 0 )
+                {
+                    /* show_placement_params( "evidende", ctx->refobj, start, end ); */
+                    rc3 = ReferenceIteratorAddPlacements ( ctx->ref_iter,       /* the outer ref-iter */
+                                                          ctx->refobj,          /* the ref-obj for this chromosome */
+                                                          start - 1,            /* start ( zero-based ) */
+                                                          end - start + 1,      /* length */
+                                                          NULL,                 /* ref-cursor */
+                                                          ctx->ev_cur,          /* align-cursor */
+                                                          evidence_align_ids,   /* which id's */
+                                                          ctx->spot_group,      /* what read-group */
+                                                          ctx->ev_cur_ids       /* placement-context */
+                                                         );
+                    if ( rc3 != 0 )
+                    {
+                        LOGERR( klogInt, rc3, "ReferenceIteratorAddPlacements(evidence) failed" );
+                    }
+                }
+            }
+
+            if ( rc1 == SILENT_RC( rcAlign, rcType, rcAccessing, rcRow, rcNotFound ) )
+            { /* from allocate_populate_rec */
+                rc = rc1;
+            }
+            else if ( rc1 == 0 )
+                rc = 0;
+            else if ( rc2 == 0 )
+                rc = 0;
+            else if ( rc3 == 0 )
+                rc = 0;
+            else
+                rc = rc1;
+        }
+    }
+    return rc;
+}
+
+
+typedef struct foreach_arg_ctx
+{
+    pileup_options *options;
+    const VDBManager *vdb_mgr;
+    VSchema *vdb_schema;
+    ReferenceIterator *ref_iter;
+    BSTree *ranges;
+    Vector *cursor_ids;
+} foreach_arg_ctx;
+
+
+/* called for each source-file/accession */
+static rc_t CC on_argument( const char * path, const char * spot_group, void * data )
+{
+    rc_t rc = 0;
+    foreach_arg_ctx * ctx = ( foreach_arg_ctx * )data;
+
+    int path_type = ( VDBManagerPathType ( ctx->vdb_mgr, "%s", path ) & ~ kptAlias );
+    if ( path_type != kptDatabase )
+    {
+        rc = RC ( rcApp, rcNoTarg, rcOpening, rcItem, rcUnsupported );
+        PLOGERR( klogErr, ( klogErr, rc, "failed to open '$(path)', it is not a vdb-database", "path=%s", path ) );
+    }
+    else
+    {
+        const VDatabase *db;
+        rc = VDBManagerOpenDBRead ( ctx->vdb_mgr, &db, ctx->vdb_schema, "%s", path );
+        if ( rc != 0 )
+        {
+            rc = RC ( rcApp, rcNoTarg, rcOpening, rcItem, rcUnsupported );
+            PLOGERR( klogErr, ( klogErr, rc, "failed to open '$(path)'", "path=%s", path ) );
+        }
+        else
+        {
+            bool is_csra = VDatabaseIsCSRA ( db );
+            VDatabaseRelease ( db );
+            if ( !is_csra )
+            {
+                rc = RC ( rcApp, rcNoTarg, rcOpening, rcItem, rcUnsupported );
+                PLOGERR( klogErr, ( klogErr, rc, "failed to open '$(path)', it is not a csra-database", "path=%s", path ) );
+            }
+            else
+            {
+                prepare_ctx prep;   /* from cmdline_cmn.h */
+
+                prep.omit_qualities = ctx->options->omit_qualities;
+                prep.read_tlen = ctx->options->read_tlen;
+                prep.use_primary_alignments = ( ( ctx->options->cmn.tab_select & primary_ats ) == primary_ats );
+                prep.use_secondary_alignments = ( ( ctx->options->cmn.tab_select & secondary_ats ) == secondary_ats );
+                prep.use_evidence_alignments = ( ( ctx->options->cmn.tab_select & evidence_ats ) == evidence_ats );
+                prep.ref_iter = ctx->ref_iter;
+                prep.spot_group = spot_group;
+                prep.on_section = prepare_section_cb;
+                prep.data = ctx->cursor_ids;
+                prep.path = path;
+                prep.db = NULL;
+                prep.prim_cur = NULL;
+                prep.sec_cur = NULL;
+                prep.ev_cur = NULL;
+                
+                rc = prepare_ref_iter( &prep, ctx->vdb_mgr, ctx->vdb_schema, path, ctx->ranges ); /* cmdline_cmn.c */
+                if ( rc == 0 && prep.db == NULL )
+                {
+                    rc = RC ( rcApp, rcNoTarg, rcOpening, rcSelf, rcInvalid );
+                    LOGERR( klogInt, rc, "unsupported source" );
+                }
+                if ( prep.prim_cur != NULL ) VCursorRelease( prep.prim_cur );
+                if ( prep.sec_cur != NULL ) VCursorRelease( prep.sec_cur );
+                if ( prep.ev_cur != NULL ) VCursorRelease( prep.ev_cur );
+            }
+        }
+    }
+    return rc;
+}
+
+
+/* free all cursor-ids-blocks created in parallel with the alignment-cursor */
+static void CC cur_id_vector_entry_whack( void *item, void *data )
+{
+    pileup_col_ids * ids = item;
+    free( ids );
+}
+
+
+static rc_t pileup_main( Args * args, pileup_options *options )
+{
+    foreach_arg_ctx arg_ctx;
+    pileup_callback_data cb_data;
+    KDirectory * dir = NULL;
+    Vector cur_ids_vector;
+
+    /* (1) make the align-manager ( necessary to make a ReferenceIterator... ) */
+    rc_t rc = AlignMgrMakeRead ( &cb_data.almgr );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "AlignMgrMake() failed" );
+    }
+
+    VectorInit ( &cur_ids_vector, 0, 20 );
+    cb_data.options = options;
+    arg_ctx.options = options;
+    arg_ctx.vdb_schema = NULL;
+    arg_ctx.cursor_ids = &cur_ids_vector;
+
+    /* (2) make the reference-iterator */
+    if ( rc == 0 )
+    {
+        PlacementRecordExtendFuncs cb_block;
+
+        cb_block.data = &cb_data;
+        cb_block.destroy = NULL;
+        cb_block.populate = populate_tooldata;
+        cb_block.alloc_size = alloc_size;
+        cb_block.fixed_size = 0;
+
+        rc = AlignMgrMakeReferenceIterator ( cb_data.almgr, &arg_ctx.ref_iter, &cb_block, options->minmapq );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "AlignMgrMakeReferenceIterator() failed" );
+        }
+    }
+
+    /* (3) make a KDirectory ( necessary to make a vdb-manager ) */
+    if ( rc == 0 )
+    {
+        rc = KDirectoryNativeDir( &dir );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "KDirectoryNativeDir() failed" );
+        }
+    }
+
+    /* (4) make a vdb-manager */
+    if ( rc == 0 )
+    {
+        rc = VDBManagerMakeRead ( &arg_ctx.vdb_mgr, dir );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VDBManagerMakeRead() failed" );
+        }
+        else
+        {
+            ReportSetVDBManager( arg_ctx.vdb_mgr );
+        }
+    }
+
+
+    if ( rc == 0 && options->cmn.no_mt )
+    {
+        rc = VDBManagerDisablePagemapThread ( arg_ctx.vdb_mgr );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VDBManagerDisablePagemapThread() failed" );
+        }
+    }
+    
+    /* (5) make a vdb-schema */
+    if ( rc == 0 )
+    {
+        rc = VDBManagerMakeSRASchema( arg_ctx.vdb_mgr, &arg_ctx.vdb_schema );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VDBManagerMakeSRASchema() failed" );
+        }
+        else if ( options->cmn.schema_file != NULL )
+        {
+            rc = VSchemaParseFile( arg_ctx.vdb_schema, "%s", options->cmn.schema_file );
+            if ( rc != 0 )
+            {
+                LOGERR( klogInt, rc, "VSchemaParseFile() failed" );
+            }
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        switch( options->function )
+        {
+            case sra_pileup_counters    : options->omit_qualities = true;
+                                          options->read_tlen = false;
+                                          break;
+
+            case sra_pileup_stat        : options->omit_qualities = true;
+                                          options->read_tlen = true;
+                                          break;
+
+            case sra_pileup_debug       : options->omit_qualities = true;
+                                          options->read_tlen = true;
+                                          break;
+
+            case sra_pileup_samtools    : options->read_tlen = false;
+                                          break;
+                                          
+            case sra_pileup_mismatch    : options->omit_qualities = true;
+                                          options->read_tlen = false;
+                                          break;
+
+            case sra_pileup_index      : options->omit_qualities = true;
+                                          options->read_tlen = false;
+                                          break;
+
+            case sra_pileup_varcount   : options->omit_qualities = true;
+                                          options->read_tlen = false;
+                                          break;
+        }
+    }
+
+    /* (5) loop through the given input-filenames and load the ref-iter with it's input */
+    if ( rc == 0 )
+    {
+        BSTree regions;
+        rc = init_ref_regions( &regions, args ); /* cmdline_cmn.c */
+        if ( rc == 0 )
+        {
+            bool empty = false;
+
+            check_ref_regions( &regions, options->merge_dist ); /* sanitize input, merge slices... */
+            options->skiplist = skiplist_make( &regions ); /* create skiplist for neighboring slices */
+
+            arg_ctx.ranges = ®ions;
+            rc = foreach_argument( args, dir, options->div_by_spotgrp, &empty, on_argument, &arg_ctx ); /* cmdline_cmn.c */
+            if ( empty )
+            {
+                Usage ( args );
+                rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcInsufficient );
+            }
+            free_ref_regions( &regions );
+        }
+    }
+
+    /* (6) walk the "loaded" ref-iterator ===> perform the pileup */
+    if ( rc == 0 )
+    {
+        /* ============================================== */
+        switch( options->function )
+        {
+            case sra_pileup_stat        : rc = walk_stat( arg_ctx.ref_iter, options ); break;
+            case sra_pileup_counters    : rc = walk_counters( arg_ctx.ref_iter, options ); break;
+            case sra_pileup_debug       : rc = walk_debug( arg_ctx.ref_iter, options ); break;
+            case sra_pileup_mismatch    : rc = walk_mismatches( arg_ctx.ref_iter, options ); break;
+            case sra_pileup_index       : rc = walk_index( arg_ctx.ref_iter, options ); break;
+            case sra_pileup_varcount    : rc = walk_varcount( arg_ctx.ref_iter, options ); break;
+			case sra_pileup_indels      : rc = walk_indels( arg_ctx.ref_iter, options ); break;
+            default :  rc = walk_ref_iter( arg_ctx.ref_iter, options ); break;
+        }
+        /* ============================================== */
+    }
+
+    if ( arg_ctx.vdb_mgr != NULL ) VDBManagerRelease( arg_ctx.vdb_mgr );
+    if ( arg_ctx.vdb_schema != NULL ) VSchemaRelease( arg_ctx.vdb_schema );
+    if ( dir != NULL ) KDirectoryRelease( dir );
+    if ( arg_ctx.ref_iter != NULL ) ReferenceIteratorRelease( arg_ctx.ref_iter );
+    if ( cb_data.almgr != NULL ) AlignMgrRelease ( cb_data.almgr );
+    VectorWhack ( &cur_ids_vector, cur_id_vector_entry_whack, NULL );
+
+    return rc;
+}
+
+
+/* =========================================================================================== */
+
+
+rc_t CC KMain( int argc, char *argv [] )
+{
+    rc_t rc = KOutHandlerSet( write_to_FILE, stdout );
+    ReportBuildDate( __DATE__ );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "KOutHandlerSet() failed" );
+    }
+    else
+    {
+        Args * args;
+
+        /* KLogHandlerSetStdErr(); */
+        rc = ArgsMakeAndHandle( &args, argc, argv, 2,
+            MyOptions, sizeof MyOptions / sizeof MyOptions [ 0 ],
+            CommonOptions_ptr(), CommonOptions_count() );
+        if ( rc == 0 )
+        {
+            rc = parse_inf_file( args ); /* cmdline_cmn.h */
+            if ( rc == 0 )
+            {
+                pileup_options options;
+                rc = get_pileup_options( args, &options );
+                if ( rc == 0 )
+                {
+					out_redir redir; /* from out_redir.h */
+					enum out_redir_mode mode;
+
+					options.skiplist = NULL;
+					
+					if ( options.cmn.gzip_output )
+						mode = orm_gzip;
+					else if ( options.cmn.bzip_output )
+						mode = orm_bzip2;
+					else
+						mode = orm_uncompressed;
+
+					rc = init_out_redir( &redir, mode, options.cmn.output_file, 32 * 1024 ); /* from out_redir.c */
+					
+					/*
+                    if ( options.cmn.output_file != NULL )
+                    {
+                        rc = set_stdout_to( options.cmn.gzip_output,
+                                            options.cmn.bzip_output,
+                                            options.cmn.output_file,
+                                            32 * 1024 );
+                    }
+					*/
+					
+                    if ( rc == 0 )
+                    {
+                        if ( options.function == sra_pileup_report_ref ||
+                             options.function == sra_pileup_report_ref_ext )
+                        {
+                            rc = report_on_reference( args, options.function == sra_pileup_report_ref_ext ); /* reref.c */
+                        }
+                        else if ( options.function == sra_pileup_deletes )
+                        {
+                            rc = report_deletes( args, 10 ); /* see above */
+                        }
+                        else if ( options.function == sra_pileup_test )
+                        {
+                            rc = pileup_v2( args, &options ); /* see above */
+                        }
+                        else
+                        {
+                            /* ============================== */
+                            rc = pileup_main( args, &options );
+                            /* ============================== */
+                        }
+                    }
+
+					/*
+                    if ( options.cmn.output_file != NULL )
+                        release_stdout_redirection();
+					*/
+					release_out_redir( &redir ); /* from out_redir.c */
+					
+                    if ( options.skiplist != NULL )
+                        skiplist_release( options.skiplist );
+                }
+            }
+            ArgsWhack( args );
+        }
+    }
+
+    {
+        /* Report execution environment if necessary */
+        rc_t rc2 = ReportFinalize( rc );
+        if ( rc == 0 )
+            rc = rc2;
+    }
+    return rc;
+}
diff --git a/tools/sra-pileup/walk_debug.c b/tools/sra-pileup/walk_debug.c
new file mode 100644
index 0000000..18d7ae7
--- /dev/null
+++ b/tools/sra-pileup/walk_debug.c
@@ -0,0 +1,147 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "ref_walker_0.h"
+#include "4na_ascii.h"
+
+#include <klib/out.h>
+#include <klib/printf.h>
+
+static rc_t CC walk_debug_enter_ref( walk_data * data )
+{   return KOutMsg( "ENTER REF '%s' ( start:%,u / len:%,u )\n", data->ref_name, data->ref_start, data->ref_len );   }
+
+static rc_t CC walk_debug_exit_ref( walk_data * data )
+{   return KOutMsg( "EXIT  REF '%s' ( start: %,u / len:%,u )\n", data->ref_name, data->ref_start, data->ref_len );   }
+
+static rc_t CC walk_debug_enter_ref_window( walk_data * data )
+{   return KOutMsg( "  ENTER REF-WINDOW ( start: %,u / len:%,u )\n", data->ref_window_start, data->ref_window_len );   }
+
+static rc_t CC walk_debug_exit_ref_window( walk_data * data )
+{   return KOutMsg( "  EXIT  REF-WINDOW ( start: %,u / len:%,u )\n", data->ref_window_start, data->ref_window_len );   }
+
+static rc_t CC walk_debug_enter_ref_pos( walk_data * data )
+{   return KOutMsg( "    ENTER REF-POS ( %u / depth=%u / '%c' )\n", data->ref_pos, data->depth, _4na_to_ascii( data->ref_base, false ) );   }
+
+static rc_t CC walk_debug_exit_ref_pos( walk_data * data )
+{   return KOutMsg( "    EXIT  REF-POS ( %u / depth=%u / '%c' )\n", data->ref_pos, data->depth, _4na_to_ascii( data->ref_base, false ) );   }
+
+static rc_t CC walk_debug_enter_sg( walk_data * data )
+{   return KOutMsg( "      ENTER SPOTGROUP '%s'\n", data->spotgroup );   }
+
+static rc_t CC walk_debug_exit_sg( walk_data * data )
+{   return KOutMsg( "      EXIT SPOTGROUP '%s'\n", data->spotgroup );   }
+
+static rc_t CC walk_debug_placement( walk_data * data )
+{
+	int32_t state = data->state;
+	bool m = ( ( state & align_iter_match ) == align_iter_match );
+
+    rc_t rc = KOutMsg( "        #%.08lu %c %c %c ",
+						data->rec->id,
+						( data->xrec->reverse ? 'R' : 'F' ),
+						_4na_to_ascii( data->state, data->xrec->reverse ),
+						( m ? 'M' : '!' ) );
+	if ( rc == 0 )
+	{
+		if ( ( state & align_iter_first ) == align_iter_first )
+		{
+			char c = data->rec->mapq + 33;
+			if ( c > '~' ) { c = '~'; }
+			if ( c < 33 ) { c = 33; }
+			rc = KOutMsg( "^%c ", c );
+		}
+		else if ( ( state & align_iter_last ) == align_iter_last )	
+		{
+			rc = KOutMsg( "$ " );
+		}
+	}
+
+	if ( rc == 0 && ( ( state & align_iter_skip ) == align_iter_skip ) )
+	{
+		rc = KOutMsg( "%c ", ( data->xrec->reverse ? '<' : '>' ) );
+	}
+
+    if ( rc == 0 && ( ( state & align_iter_insert ) == align_iter_insert ) )
+    {
+		const INSDC_4na_bin *bases;
+        uint32_t i, n = ReferenceIteratorBasesInserted ( data -> ref_iter, &bases );
+		if ( bases != NULL )
+		{
+			char temp[ 4096 ];
+			if ( n > sizeof temp ) n = sizeof temp;
+			for ( i = 0; i < n; ++i ) temp[ i ] = _4na_to_ascii( bases[ i ], data->xrec->reverse );
+			rc = KOutMsg( "+%u{%.*s} ", n, n, temp );
+		}
+    }
+	
+    if ( rc == 0 && ( ( state & align_iter_delete ) == align_iter_delete ) )
+    {
+        INSDC_coord_zero ref_pos;
+		const INSDC_4na_bin *bases;
+        uint32_t i, n = ReferenceIteratorBasesDeleted ( data -> ref_iter, &ref_pos, &bases );
+        if ( bases != NULL )
+        {
+			char temp[ 4096 ];
+			if ( n > sizeof temp ) n = sizeof temp;
+			for ( i = 0; i < n; ++i ) temp[ i ] = _4na_to_ascii( bases[ i ], data->xrec->reverse );
+			rc = KOutMsg( "-%u{%.*s} ", n, n, temp );
+            free( (void *) bases );
+        }
+    }
+	
+	if ( rc == 0 )
+		rc = KOutMsg( "( TLEN %,i )\n",	data->xrec->tlen );
+		
+	return rc;
+}
+
+
+rc_t walk_debug( ReferenceIterator *ref_iter, pileup_options *options )
+{
+    rc_t rc;
+    walk_data data;
+    walk_funcs funcs;
+
+    data.ref_iter = ref_iter;
+    data.options = options;
+    
+    funcs.on_enter_ref = walk_debug_enter_ref;
+    funcs.on_exit_ref = walk_debug_exit_ref;
+
+    funcs.on_enter_ref_window = walk_debug_enter_ref_window;
+    funcs.on_exit_ref_window = walk_debug_exit_ref_window;
+
+    funcs.on_enter_ref_pos = walk_debug_enter_ref_pos;
+    funcs.on_exit_ref_pos = walk_debug_exit_ref_pos;
+
+    funcs.on_enter_spotgroup = walk_debug_enter_sg;
+    funcs.on_exit_spotgroup = walk_debug_exit_sg;
+    
+    funcs.on_placement = walk_debug_placement;
+
+    rc = walk_0( &data, &funcs );
+    return rc;
+}
diff --git a/tools/sra-pileup/walk_debug.h b/tools/sra-pileup/walk_debug.h
new file mode 100644
index 0000000..03fc1b0
--- /dev/null
+++ b/tools/sra-pileup/walk_debug.h
@@ -0,0 +1,42 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_walk_debug_
+#define _h_walk_debug_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "ref_walker_0.h"
+
+rc_t walk_debug( ReferenceIterator *ref_iter, pileup_options *options );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_walk_debug_ */
diff --git a/tools/sra-pileup/writer.c b/tools/sra-pileup/writer.c
new file mode 100644
index 0000000..b24c1d9
--- /dev/null
+++ b/tools/sra-pileup/writer.c
@@ -0,0 +1,137 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/report.h>
+#include <klib/container.h>
+#include <klib/log.h>
+#include <klib/debug.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <kfs/file.h>
+#include <kfs/directory.h>
+#include <kfs/buffile.h>
+#include <kfs/gzip.h>
+#include <kfs/bzip.h>
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include "cmdline_cmn.h"
+#include "writer.h"
+
+struct {
+    KWrtWriter writer;
+    void* data;
+    KFile* kfile;
+    uint64_t pos;
+} g_out_writer = {NULL};
+
+static
+rc_t CC BufferedWriter(void* self, const char* buffer, size_t bufsize, size_t* num_writ)
+{
+    rc_t rc = 0;
+
+    assert(buffer != NULL);
+    assert(num_writ != NULL);
+
+    do {
+        if( (rc = KFileWrite(g_out_writer.kfile, g_out_writer.pos, buffer, bufsize, num_writ)) == 0 ) {
+            buffer += *num_writ;
+            bufsize -= *num_writ;
+            g_out_writer.pos += *num_writ;
+        }
+    } while(rc == 0 && bufsize > 0);
+    return rc;
+}
+
+rc_t OUTSTR_(const char* buf, size_t buf_sz)
+{
+    size_t nm;
+    return BufferedWriter(NULL, buf, buf_sz, &nm);
+}
+
+rc_t BufferedWriterMake(const common_options* opt)
+{
+    rc_t rc = 0;
+
+    if( opt == NULL || (opt->gzip_output && opt->bzip_output) ) {
+        rc = RC(rcApp, rcFile, rcConstructing, rcParam, rcInvalid);
+    } else if( g_out_writer.writer != NULL ) {
+        rc = RC(rcApp, rcFile, rcConstructing, rcParam, rcAmbiguous);
+    }
+    if( opt->output_file != NULL ) {
+        KDirectory *dir;
+        if( (rc = KDirectoryNativeDir(&dir)) == 0 ) {
+            rc = KDirectoryCreateFile(dir, &g_out_writer.kfile, false, 0664, kcmInit, "%s", opt->output_file);
+            KDirectoryRelease(dir);
+        }
+    } else {
+        KOutHandlerSetStdOut();
+        KStsHandlerSetStdErr();
+        KLogHandlerSetStdErr();
+        KDbgHandlerSetStdErr();
+        rc = KFileMakeStdOut(&g_out_writer.kfile);
+    }
+    if( rc == 0 ) {
+        g_out_writer.pos = 0;
+        if( opt->gzip_output ) {
+            KFile* gz;
+            if( (rc = KFileMakeGzipForWrite(&gz, g_out_writer.kfile)) == 0 ) {
+                KFileRelease(g_out_writer.kfile);
+                g_out_writer.kfile = gz;
+            }
+        } else if( opt->bzip_output ) {
+            KFile* bz;
+            if( (rc = KFileMakeBzip2ForWrite(&bz, g_out_writer.kfile)) == 0 ) {
+                KFileRelease(g_out_writer.kfile);
+                g_out_writer.kfile = bz;
+            }
+        }
+        if( rc == 0 ) {
+            KFile* buf;
+            if( (rc = KBufFileMakeWrite(&buf, g_out_writer.kfile, false, 128 * 1024)) == 0 ) {
+                KFileRelease(g_out_writer.kfile);
+                g_out_writer.kfile = buf;
+                g_out_writer.writer = KOutWriterGet();
+                g_out_writer.data = KOutDataGet();
+                rc = KOutHandlerSet(BufferedWriter, &g_out_writer);
+            }
+        }
+    }
+    return rc;
+}
+
+void BufferedWriterRelease( bool flush )
+{
+    if( flush ) {
+        /* avoid flushing buffered data after failure */
+        KFileRelease(g_out_writer.kfile);
+    }
+    if( g_out_writer.writer != NULL ) {
+        KOutHandlerSet(g_out_writer.writer, g_out_writer.data);
+    }
+    g_out_writer.writer = NULL;
+}
diff --git a/tools/sra-pileup/writer.h b/tools/sra-pileup/writer.h
new file mode 100644
index 0000000..9ef8a0c
--- /dev/null
+++ b/tools/sra-pileup/writer.h
@@ -0,0 +1,32 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include <klib/rc.h>
+
+rc_t BufferedWriterMake(const common_options* opt);
+
+void BufferedWriterRelease(bool flush);
+
+rc_t OUTSTR_(const char* buf, size_t buf_sz);
diff --git a/tools/sra-seq-count/Makefile b/tools/sra-seq-count/Makefile
new file mode 100644
index 0000000..bfb1d33
--- /dev/null
+++ b/tools/sra-seq-count/Makefile
@@ -0,0 +1,83 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/sra-seq-count
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+	sra-seq-count
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# Common dumper definitions
+#
+TOOL_LIBS = \
+	-skapp	\
+	-stk-version \
+	-sncbi-ngs-c++ \
+	-sngs-c++ \
+	-sncbi-vdb-static
+
+#-------------------------------------------------------------------------------
+# fastq-dump
+#
+TOOL_SRC = \
+	main_fkt \
+	sra-seq-count
+	
+INCDIRS += -I $(TOP)/ngs/ngs-c++
+
+TOOL_OBJ = \
+	$(addsuffix .$(OBJX),$(TOOL_SRC))
+
+$(BINDIR)/sra-seq-count: $(TOOL_OBJ)
+	$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(TOOL_LIBS)
diff --git a/tools/sra-seq-count/main_fkt.c b/tools/sra-seq-count/main_fkt.c
new file mode 100644
index 0000000..60d0720
--- /dev/null
+++ b/tools/sra-seq-count/main_fkt.c
@@ -0,0 +1,203 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "options.h"
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+
+#include <klib/rc.h>
+#include <klib/out.h>
+#include <klib/text.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#define OPTION_ID_ATTR         	"id_attr"
+#define OPTION_FEATURE_TYPE    	"feature_type"
+#define OPTION_MODE            	"mode"
+
+#define ALIAS_ID_ATTR          	"i"
+#define ALIAS_FEATURE_TYPE     	"f"
+#define ALIAS_MODE     			"m"
+
+#define DEFAULT_ID_ATTR         "gene_id"
+#define DEFAULT_FEATURE_TYPE    "exon"
+
+static const char * id_attr_usage[] 		= { "id-attr (default gene_id)", NULL };
+static const char * feature_type_usage[] 	= { "feature-type (default exon)", NULL };
+static const char * mode_usage[] 			= { "output-mode (norm, debug)", NULL };
+
+OptDef sra_seq_count_options[] =
+{
+    { OPTION_ID_ATTR, 		ALIAS_ID_ATTR,			NULL, id_attr_usage,		1, true, false },
+    { OPTION_FEATURE_TYPE, 	ALIAS_FEATURE_TYPE, 	NULL, feature_type_usage, 	1, true, false },
+    { OPTION_MODE, 			ALIAS_MODE, 			NULL, mode_usage, 			1, true, false }	
+};
+
+const char UsageDefaultName[] = "sra-seq-count";
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    return KOutMsg ( 	"\n"
+						"Usage:\n"
+						"  %s <sra-accession> <gtf-file> [options]\n"
+						"\n", progname );
+}
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if ( args == NULL )
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+        rc = ArgsProgram ( args, &fullpath, &progname );
+
+    if ( rc )
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary ( progname );
+
+    KOutMsg ( "Options:\n" );
+    HelpOptionLine ( ALIAS_ID_ATTR,			OPTION_ID_ATTR,			NULL, 		id_attr_usage );
+    HelpOptionLine ( ALIAS_FEATURE_TYPE, 	OPTION_FEATURE_TYPE, 	NULL, 		feature_type_usage );
+    HelpOptionLine ( ALIAS_MODE, 			OPTION_MODE, 			NULL, 		mode_usage );
+
+    KOutMsg ( "\n" );	
+    HelpOptionsStandard ();
+    HelpVersion ( fullpath, KAppVersion() );
+
+    return rc;
+}
+
+static rc_t get_str_option( const Args * args, const char * option_name, const char ** dst, const char * default_value )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, option_name, &count );
+    if ( ( rc == 0 )&&( count > 0 ) )
+        rc = ArgsOptionValue( args, option_name, 0, (const void **)dst );
+	else
+		(*dst) = string_dup_measure ( default_value, NULL );
+    return rc;
+}
+
+
+static rc_t gather_options( const Args * args, struct sra_seq_count_options * options )
+{
+	rc_t rc;
+
+	memset ( options, 0, sizeof *options );
+	rc = get_str_option( args, OPTION_ID_ATTR, &options->id_attrib, DEFAULT_ID_ATTR );
+	if ( rc == 0 )
+		rc = get_str_option( args, OPTION_FEATURE_TYPE, &options->feature_type, DEFAULT_FEATURE_TYPE );
+	if ( rc == 0 )
+	{
+		const char * mode;
+		rc = get_str_option( args, OPTION_MODE, &mode, "norm" );
+		if ( rc == 0 )
+		{
+			if ( mode[ 0 ] == 'd' && mode[ 1 ] == 'e' && mode[ 2 ] == 'b' && mode[ 3 ] == 'u' &&
+				 mode[ 4 ] == 'g' && mode[ 5 ] == 0 )
+			{
+				options -> output_mode = SSC_MODE_DEBUG;
+			}
+		}
+	}
+	
+	if ( rc == 0 )
+	{
+		uint32_t count;
+		rc = ArgsParamCount( args, &count );
+		if ( rc == 0 )
+		{
+			if ( count == 2 )
+			{
+				rc = ArgsParamValue( args, 0, (const void **)&options->sra_accession );
+				if ( rc == 0 )
+					rc = ArgsParamValue( args, 1, (const void **)&options->gtf_file );
+				if ( rc == 0 )
+					options -> valid = true;
+			}
+			else
+			{
+				UsageSummary ( UsageDefaultName );
+			}
+		}
+	}
+	return rc;
+}
+
+
+static rc_t report_options( const struct sra_seq_count_options * options )
+{
+	rc_t rc = KOutMsg( "accession    : %s\n", options->sra_accession );
+	if ( rc == 0 )
+		rc =  KOutMsg( "gtf-file     : %s\n", options->gtf_file );
+	if ( rc == 0 )
+		rc =  KOutMsg( "id-attr      : %s\n", options->id_attrib );
+	if ( rc == 0 )
+		rc =  KOutMsg( "feature-type : %s\n", options->feature_type );
+	if ( rc == 0 )
+	{
+		switch ( options->output_mode )
+		{
+			case SSC_MODE_NORMAL : rc =  KOutMsg( "output-mode  : mormal\n" ); break;
+			case SSC_MODE_DEBUG  : rc =  KOutMsg( "output-mode  : debug\n" ); break;
+			default              : rc =  KOutMsg( "output-mode  : unknown\n" ); break;
+		}
+	}
+	return rc;
+}
+
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args * args;
+    rc_t rc = ArgsMakeAndHandle ( &args, argc, argv, 1,
+								  sra_seq_count_options, 
+								  ( sizeof sra_seq_count_options / sizeof sra_seq_count_options [ 0 ] ) );
+    if ( rc == 0 )
+    {
+        struct sra_seq_count_options options;
+		rc = gather_options( args, &options );
+		if ( rc == 0 && options.valid )
+		{
+			rc = report_options( &options );
+			if ( rc == 0 )
+			{
+				rc = matching( &options );	/* here we are calling into C++ */
+			}
+		}
+        ArgsWhack ( args );
+    }
+    return rc;
+}
diff --git a/tools/sra-seq-count/options.h b/tools/sra-seq-count/options.h
new file mode 100644
index 0000000..95d4c57
--- /dev/null
+++ b/tools/sra-seq-count/options.h
@@ -0,0 +1,56 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_sra_seq_count_options_
+#define _h_sra_seq_count_options_
+
+#include <os-native.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define SSC_MODE_NORMAL	0
+#define SSC_MODE_DEBUG	1
+
+struct sra_seq_count_options
+{
+    const char * sra_accession;
+    const char * gtf_file;
+    const char * id_attrib;
+    const char * feature_type;
+	int output_mode;
+	bool valid;
+};
+
+int matching( const struct sra_seq_count_options * options );
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/tools/sra-seq-count/range.hpp b/tools/sra-seq-count/range.hpp
new file mode 100644
index 0000000..c91498b
--- /dev/null
+++ b/tools/sra-seq-count/range.hpp
@@ -0,0 +1,307 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _hpp_seq_ranges_
+#define _hpp_seq_ranges_
+
+#include <list>
+
+namespace seq_ranges {
+
+enum e_range_relation {
+	rr_before,
+	rr_begin,
+	rr_span,
+	rr_inside,
+	rr_end,
+	rr_after
+};
+
+
+/* -----------------------------------------------------------------------
+	range-relations:
+
+	A            |-------------|
+	B   |-----|
+	A.range_rel( B ) = rr_before
+
+	A      |-------------|
+	B   |-----|
+	A.range_rel( B ) = rr_begin
+
+	A      |-------------|
+	B   |-------------------|
+	A.range_rel( B ) = rr_span
+	
+	A      |-------------|
+	B           |-----|
+	A.range_rel( B ) = rr_inside
+	
+	A   |-------------|
+	B              |-----|
+	A.range_rel( B ) = rr_end
+
+	A   |-------------|
+	B                    |-----|
+	A.range_rel( B ) = rr_after
+	
+   ----------------------------------------------------------------------- */
+
+class range
+{
+	private :
+		long start;
+		long end;
+
+	public :
+		range( void ) : start( 0 ), end( 0 ) { }
+		range( long start_, long end_ ) : start( start_ ), end( end_ ) { }
+		range( const range &other ) : start( other.start ), end( other.end ) { }
+		
+		range( const std::string &start_, const std::string &end_ ) : start( 0 ), end( 0 )
+		{
+			bool valid = ( convert_value( start_, start ) && convert_value( end_, end ) );
+			if ( !valid ) set( 0, 0 );
+		}
+
+		range& operator= ( const range &other )
+		{
+			if ( this == &other ) return *this;
+			start = other.start;
+			end = other.end;
+			return *this;
+		}
+
+		void set( long start_, long end_ ) { start = start_; end = end_; }
+
+		static bool convert_value( const std::string value_, long &value )
+		{
+			bool res = true;
+			std::istringstream ( value_ ) >> value;
+			if ( value < 1 )
+				res = false;
+			return res;
+		}
+		
+		/* does this range end before the other range starts ? */
+		bool ends_before( const range &other ) const { return ( end < other.start ); }
+
+		/* does this range start after the other range ends ? */
+		bool starts_after( const range &other ) const { return ( start > other.end ); }
+		
+		bool intersect( const range &other ) const
+		{
+			e_range_relation rr = range_relation( other );
+			return ( rr == rr_begin || rr == rr_span || rr == rr_inside || rr == rr_end );
+		}
+
+		bool intersect( const long value ) const
+		{ return ( value >= start && value <= end ); }
+		
+		void include( const range &other )
+		{
+			if ( other.start < start ) start = other.start;
+			if ( other.end > end ) end = other.end;
+		}
+		
+		bool merge( const range &other )
+		{
+			bool res = intersect( other );
+			if ( res ) include( other );
+			return res;
+		}
+
+		enum e_range_relation range_relation( const range &other ) const
+		{
+			enum e_range_relation res;
+			if ( other.start < start )
+			{
+				if ( other.end < start )
+					res = rr_before;
+				else if ( other.end <= end )
+					res = rr_begin;
+				else
+					res = rr_span;
+			}
+			else
+			{
+				if ( other.start <= end )
+				{
+					if ( other.end <= end )
+						res = rr_inside;
+					else
+						res = rr_end;
+				}
+				else
+					res = rr_after;
+			}
+			
+			return res;
+		}
+		
+		long get_start( void ) const { return start; }
+		long get_end( void ) const { return end; }
+		bool empty( void ) const { return ( start == 0 && end == 0 ); }
+
+		void print( std::ostream &stream ) const { stream << "[ " << start << " .. " << end << " ]"; }
+
+		friend std::ostream& operator<< ( std::ostream &stream, const range &other )
+		{
+			other.print( stream );
+			return stream;
+		}
+		
+		static std::string range_relation_2_str( enum e_range_relation rr )
+		{
+			switch ( rr )
+			{
+				case rr_before : return std::string( "before" ); break;
+				case rr_begin  : return std::string( "begin" ); break;
+				case rr_span   : return std::string( "span" ); break;
+				case rr_inside : return std::string( "inside" ); break;		
+				case rr_end    : return std::string( "end" ); break;		
+				case rr_after  : return std::string( "after" ); break;				
+			}
+			return std::string( "unknown" );
+		}
+		
+};
+
+
+bool compare_ranges ( const range * first, const range * second )
+{
+	return ( first -> get_start() < second -> get_start() );
+}
+
+
+struct ranges_relation
+{
+	bool has_inside;
+	bool has_partial;
+
+	void clear( void ) { has_inside = has_partial = false; }
+	
+	void print( std::ostream &stream ) const { stream << "inside: " << has_inside << ", partial: " << has_partial; }
+	
+	friend std::ostream& operator<< ( std::ostream &stream, const ranges_relation &other )
+	{
+		other.print( stream );
+		return stream;
+	}
+};
+
+
+class ranges
+{
+	private :
+		std::list< range * > range_list;
+		long count;
+		
+	public :
+		ranges( void ) : count( 0 ) {}
+		~ranges( void ) { clear(); }
+		
+		void clear( void )
+		{
+			while ( !range_list.empty() )
+			{
+				range * r = range_list.front();
+				range_list.pop_front();
+				if ( r != NULL ) delete r;
+			}
+			count = 0;
+		}
+		
+		void add( range * r ){ if ( r != NULL ) { range_list.push_back( r ); count++; } }
+		void add( const range &r ){ add( new range( r ) ); }
+
+		void merge( const range &r1 )
+		{
+			bool merged = false;
+			std::list< range * >::iterator it;
+			for ( it = range_list.begin(); it != range_list.end() && !merged; ++it )
+			{
+				range * r = *it;
+				if ( r != NULL )
+					merged = r -> merge( r1 );
+			}
+			if ( !merged ) add( r1 );
+		}
+		
+		void sort( void ) { range_list.sort( compare_ranges ); }
+		long get_count( void ) { return count; }
+		
+		void compare_sample( const ranges &sample, ranges_relation &res ) const
+		{
+			res.clear();
+			bool done = false;
+			
+			// we take each range of the sample and compare it against each range of self
+			std::list< range * >::const_iterator sample_it;
+			for ( sample_it = sample.range_list.begin(); sample_it != sample.range_list.end() && !done; ++sample_it )
+			{
+				const range * sample_range = *sample_it;
+				std::list< range * >::const_iterator pattern_it;
+				for ( pattern_it = range_list.begin(); pattern_it != range_list.end() && !done; ++pattern_it )	
+				{
+					const range * pattern_range( *pattern_it );
+					enum e_range_relation rr = pattern_range -> range_relation( *sample_range );
+					switch( rr )
+					{
+						case rr_before 	: break;
+						case rr_begin	: res.has_partial = true; break;
+						case rr_span	: res.has_partial = true; break;
+						case rr_inside 	: res.has_inside = true; break;
+						case rr_end		: res.has_partial = true; break;
+						case rr_after	: break;
+					}
+					done = ( res.has_partial && res.has_inside );
+				}
+			}
+		}
+		
+		void print( std::ostream &stream ) const
+		{
+			std::list< range * >::const_iterator it;
+			for ( it = range_list.begin(); it != range_list.end(); ++it )
+			{
+				range * r = *it;
+				if ( r != NULL ) stream << *r << " ";
+			}
+		}		
+
+		friend std::ostream& operator<< ( std::ostream &stream, const ranges &other )
+		{
+			other.print( stream );
+			return stream;
+		}
+
+};
+
+};  // namespace seq_ranges
+
+#endif // _hpp_seq_ranges_
+
diff --git a/tools/sra-seq-count/sra-seq-count.cpp b/tools/sra-seq-count/sra-seq-count.cpp
new file mode 100644
index 0000000..ccf1faa
--- /dev/null
+++ b/tools/sra-seq-count/sra-seq-count.cpp
@@ -0,0 +1,688 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <ngs/ncbi/NGS.hpp>
+#include <ngs/ErrorMsg.hpp>
+#include <ngs/ReadCollection.hpp>
+#include <ngs/AlignmentIterator.hpp>
+#include <ngs/Alignment.hpp>
+
+#include <iostream>
+#include <fstream>
+#include <sstream>
+#include <string>
+#include <stdexcept>
+#include <vector>
+#include <list>
+#include <algorithm>
+
+#include "options.h"
+#include "range.hpp"
+
+using namespace seq_ranges;
+
+
+struct feature_range
+{
+	const std::string ref_name;
+	const std::string feature_id;
+	const char strand;
+	range ft_range;
+
+	feature_range( const std::string &ref_name_, const std::string &feature_id_,
+				   const long start_, const long end_, const char strand_ )
+		: ref_name( ref_name_ ), feature_id( feature_id_ ), strand( strand_ ), ft_range( start_, end_ )
+	{ }
+};
+
+
+class feature
+{
+	private :
+		const std::string ref_name;
+		const std::string feature_id;
+		const char strand;		
+		ranges feature_ranges;
+		range outer;
+		long counter;
+
+	public :
+		feature( const feature_range &fr ) : ref_name( fr.ref_name ), feature_id( fr.feature_id ),
+				strand( fr.strand ), outer( fr.ft_range ), counter( 0 )
+		{
+			feature_ranges.add( fr.ft_range );
+		}
+	
+		bool add( const feature_range &fr )
+		{
+			bool res = ( feature_id == fr.feature_id );
+			if ( res )
+			{
+				feature_ranges.merge( fr.ft_range );
+				outer.include( fr.ft_range );
+			}
+			return res;
+		}
+
+		void debug_report ( void )
+		{
+			std::cout << "FEATURE: " << feature_id << " ( refname: " << ref_name << " ) strand = '" << strand << "' " << outer << std::endl;
+			std::cout << feature_ranges << std::endl;
+			std::cout << "counter : " << counter << std::endl;
+			std::cout << std::endl;
+		}
+
+		void report ( int output_mode )
+		{
+			if ( counter > 0 )
+			{
+				if ( output_mode == SSC_MODE_NORMAL )
+				{
+					std::cout << feature_id << "\t" << counter << std::endl;
+				}
+				else
+				{
+					std::cout << ref_name << "." << outer << "(" << feature_ranges.get_count() << ") "
+						<< feature_id << "\t" << counter << std::endl;
+				}
+			}
+		}
+
+		void sort_ranges( void ) { feature_ranges.sort(); }		
+		void get_ref_name( std::string &s ) { s = ref_name; }
+		void get_outer_range( range &r ) { r = outer; }
+
+		/* does this feature end before the given range */
+		bool ends_before( const range &r ) const { return outer.ends_before( r ); }
+		bool is_ref( const std::string &r_name ) { return ( ref_name == r_name ); }
+		long start( void ) { return outer.get_start(); }
+		
+		void check( const range &r ) { if ( outer.intersect( r ) ) counter++; }
+};
+
+
+void trim( std::string &s )
+{
+	bool to_trim = false;
+	std::size_t pos = 0;
+	std::size_t len = s.length();
+	while ( s[ pos ] == ' ' && len > 0 )
+	{
+		pos++;
+		len--;
+		to_trim = true;
+	}
+	while ( s[ pos + len - 1 ] == ' ' )
+	{
+		len--;
+		to_trim = true;
+	}
+	if ( to_trim )
+		s = s.substr( pos, len );
+}
+
+
+void split_attr( const std::string &attr, const std::string &idattr, std::string &feature_id )
+{
+	std::size_t from = 0;
+	std::size_t pos = 0;
+	bool done = false;
+	feature_id.clear();
+	while ( !done )
+	{
+		pos = attr.find( ";", from );
+		done = ( pos == std::string::npos );
+		std::string sub_attr = attr.substr( from, pos - from );
+		std::size_t sub_pos = sub_attr.find( "\"" );
+		if ( sub_pos != std::string::npos )
+		{
+			std::string sub_name = sub_attr.substr( 0, sub_pos - 1 );
+			trim( sub_name );
+			if ( sub_name == idattr )
+			{
+				feature_id = sub_attr.substr( sub_pos + 1, sub_attr.length() - ( sub_pos + 2 ) );
+				done = true;
+			}
+		}
+		if ( !done ) from = pos + 1;
+	}
+}
+
+
+bool split_line( const std::string &line, const std::string feature_type, const std::string &idattr,
+				 std::string &ref_name, std::string &feature_id,
+				 long &start, long &end, char &strand )
+{
+	bool res = ( ( line.length() > 0 )&&( line[ 0 ] != '#' ) );
+	if ( res )
+	{
+		int field = 0;
+		std::string attr;
+		std::size_t from = 0;
+		std::size_t pos = 0;
+		start = end = 0;
+		long value;
+		bool done = false;
+		while ( !done )
+		{
+			pos = line.find( "\t", from );
+			done = ( pos == std::string::npos );
+			switch( field++ )
+			{
+				case 0 : ref_name = line.substr( from, pos - from ); break;
+				case 2 : if ( feature_type != line.substr( from, pos - from ) )
+						  {
+								done = true;
+								res = false;
+						  }
+						  break;
+				case 3 : if ( range::convert_value( line.substr( from, pos - from ), value ) ) start = value; break;
+				case 4 : if ( range::convert_value( line.substr( from, pos - from ), value ) ) end = value; break;
+				case 6 : if ( ( pos - from ) > 0 ) strand = line[ from ]; else strand = '?'; break;
+				case 8 : attr = line.substr( from, pos - from ); break;
+			}
+			if ( !done ) from = pos + 1;
+		}
+		
+		if ( res ) split_attr( attr, idattr, feature_id );
+	}
+	return res;
+}
+
+
+class gtf_iter
+{
+	private :
+		const std::string filename;
+		const std::string idattr;
+		const std::string feature_type;
+		feature_range * stored_feature_range;
+		feature * stored_next_feature;
+		std::ifstream inputstream;
+		
+		feature_range * read_next_feature_range( void )
+		{
+			feature_range * res = NULL;
+			if ( inputstream.good() )
+			{
+				std::string line;
+				if ( std::getline( inputstream, line ) )
+				{
+					std::string ref_name, feature_id;
+					long start, end;
+					char strand;
+					if ( split_line( line, feature_type, idattr,
+									  ref_name, feature_id, start, end, strand ) )
+					{
+						res = new feature_range( ref_name, feature_id, start, end, strand );
+					}
+				}
+			}
+			return res;
+		}
+
+		feature_range * next_feature_range( void )
+		{
+			feature_range * res = NULL;
+			if ( stored_feature_range != NULL )
+			{
+				res = stored_feature_range;
+				stored_feature_range = NULL;
+			}
+			else while ( inputstream.good() && res == NULL )
+			{
+				/* because read_next_feature_range can return NULL if the line contains the wrong feature_type */
+				res = read_next_feature_range();
+			}
+			return res;
+		}
+
+		feature * read_next_feature( void )
+		{
+			feature * res = NULL;
+			feature_range * fr = next_feature_range();
+			if ( fr != NULL )
+			{
+				res = new feature( *fr );
+				delete fr;
+				bool done = ( res == NULL );
+				while ( !done )
+				{
+					fr = next_feature_range();
+					done = ( fr == NULL );
+					if ( !done )
+					{
+						done = !( res -> add( *fr ) );
+						if ( done )
+							stored_feature_range = fr;
+						else
+							delete fr;
+					}
+				}
+				if ( done ) res->sort_ranges();
+			}
+			return res;
+		}
+		
+	public :
+		gtf_iter( const char * filename_, const std::string &idattr_, const std::string &feature_type_  ) :
+			filename( filename_ ), idattr( idattr_ ), feature_type( feature_type_ ),
+			stored_feature_range( NULL ), inputstream( filename_ )
+			{
+				stored_next_feature = read_next_feature();
+			}
+		
+		bool good( void ) { return ( stored_next_feature != NULL ); }
+		
+		feature * next_feature( void )
+		{
+			feature * res = stored_next_feature;
+			if ( res != NULL )
+				stored_next_feature = read_next_feature();
+			return res;
+		}
+
+		feature * forward_to_next_ref( const std::string & ref )
+		{
+			feature * res = NULL;
+			bool done = false;
+			while ( !done )
+			{
+				res = next_feature();
+				done = ( res == NULL );
+				if ( !done )
+				{
+					if ( res -> is_ref( ref ) )
+						delete res;
+					else
+						done = true;
+				}
+			}
+			return res;
+		}
+		
+		long peek_next_feature_start( void )
+		{
+			if ( stored_next_feature != NULL )
+				return stored_next_feature -> start();
+			else
+				return 0;
+		}
+
+		bool peek_next_feature_range( range &r )
+		{
+			bool res = ( stored_next_feature != NULL );
+			if ( res ) stored_next_feature -> get_outer_range( r );
+			return res;
+		}
+		
+		bool peek_next_feature_is_ref( const std::string &ref_name )
+		{
+			if ( stored_next_feature != NULL )
+				return stored_next_feature -> is_ref( ref_name );
+			else
+				return false;
+		}
+};
+
+
+class global_counter
+{
+	private:
+		long refs;
+		long total_alignments;
+		long no_feature;
+		long ambiguous;
+		long too_low_qual;
+		long not_aligned;
+		long not_unique;
+		
+	public:
+		global_counter( void ) : refs( 0 ), total_alignments( 0 ), no_feature( 0 ), ambiguous( 0 ),
+				too_low_qual( 0 ), not_aligned( 0 ), not_unique( 0 ) {}
+
+		void inc_refs( void ) { refs++; }		
+		void inc_total_alignments( void ) { total_alignments++; }
+		void inc_no_feature( void ) { no_feature++; }
+		void inc_ambiguous( void ) { ambiguous++; }
+		void inc_too_low_qual( void ) { too_low_qual++; }
+		void inc_not_aligned( void ) { not_aligned++; }
+		void inc_not_unique( void ) { not_unique++; }
+		
+		void report( void )
+		{
+			std::cout << std::endl;
+			std::cout << "__no_feature\t" << no_feature << std::endl;
+			std::cout << "__ambiguous\t" << ambiguous << std::endl;
+			std::cout << "__too_low_aQual\t" << too_low_qual << std::endl;
+			std::cout << "__not_aligned\t" << not_aligned << std::endl;
+			std::cout << "__alignment_not_unique\t" << not_unique << std::endl;
+
+			std::cout << std::endl << "total\t" << total_alignments << std::endl;
+			std::cout << "refs\t" << refs << std::endl << std::endl;
+		}
+};
+
+
+class feature_list
+{
+	private :
+		const std::string &ref_name;
+		int output_mode;
+		std::list< feature * > flist;
+
+		void clear( void )
+		{
+			while ( !flist.empty() )
+			{
+				feature * f = flist.front();
+				flist.pop_front();
+				if ( f != NULL ) delete f;
+			}
+		}
+
+		void add( feature * f )
+		{
+			flist.push_back( f );
+		}
+		
+	public :
+		feature_list( const std::string &ref_name_, int output_mode_, feature * f )
+			: ref_name( ref_name_ ), output_mode( output_mode_ ) { add( f ); }
+		~feature_list( void ) { clear(); }
+
+		bool empty( void ) { return flist.empty(); }
+		
+		void remove_all_features_before( const range &al_range )
+		{
+			bool done = flist.empty();
+			while ( !done )
+			{
+				feature * f = flist.front();
+				if ( f -> ends_before( al_range ) )
+				{
+					flist.pop_front();
+					f -> report( output_mode );
+					done = flist.empty();
+					delete f;
+				}
+				else
+					done = true;
+			}
+		}
+
+		void load_all_features_starting_inside( const range &al_range, gtf_iter &gtf_it )
+		{
+			bool done = false;
+			while ( !done )
+			{
+				done = !gtf_it.peek_next_feature_is_ref( ref_name );
+				if ( !done )
+				{
+					range r;
+					done = !gtf_it.peek_next_feature_range( r );
+					if ( !done )
+					{
+						if ( r.ends_before( al_range ) )
+						{
+							/* we can skip this feature! */
+							feature * f = gtf_it.next_feature();
+							delete f;
+						}
+						else if ( r.starts_after( al_range ) )
+						{
+							/* we are done, this feature if for alignments that come later */
+							done = true;
+						}
+						else
+						{
+							feature * f = gtf_it.next_feature();
+							if ( f != NULL ) add( f );
+						}
+					}
+				}
+			}
+		}
+		
+		void count_matches_between_alignment_and_features( const range &al_range )
+		{
+			std::list< feature * >::iterator it;
+			for ( it = flist.begin(); it != flist.end(); ++it )
+			{
+				feature * f = *it;
+				if ( f != NULL )
+				{
+					f -> check( al_range );
+				}
+			}
+		}
+};
+
+
+class iter_window
+{
+	private :
+		ngs::ReadCollection &run;	
+		gtf_iter &gtf_it;
+		int output_mode;
+		global_counter counter;
+		
+	public :
+		iter_window( ngs::ReadCollection &run_, gtf_iter &gtf_it_, int output_mode_ )
+			: run( run_ ), gtf_it( gtf_it_ ), output_mode( output_mode_ ) {}
+
+		void walk( void )
+		{
+			feature * f = gtf_it.next_feature();
+			while ( f != NULL )
+			{
+				/* get the name of the reference of the fist feature in here... */
+				std::string ref_name;
+				f -> get_ref_name( ref_name );
+				try
+				{
+					ngs::Reference ref = run.getReference ( ref_name );
+					try
+					{
+						bool done = false;
+						feature_list flist( ref_name, output_mode, f );
+						ngs::AlignmentIterator al_iter = ref.getAlignments( ngs::Alignment::primaryAlignment );
+
+						std::cout << std::endl << "processing ref: " << ref_name << std::endl;
+						std::cout << "-------------------------------------------" << std::endl;
+						counter.inc_refs();
+						
+						/* now walk all alignments of this al_iter */
+						while ( al_iter.nextAlignment() && !done )
+						{
+							int64_t  pos = al_iter.getAlignmentPosition() + 1; /* al_iter returns 0-based ! */
+							uint64_t len = al_iter.getAlignmentLength();
+							
+							const range al_range( pos, pos + len - 1 );
+							
+							/* remove and report all features that end before this alignment */
+							flist.remove_all_features_before( al_range );
+							flist.load_all_features_starting_inside( al_range, gtf_it );
+							
+							/* now we can count matches between the feature-list and this alignment */
+							flist.count_matches_between_alignment_and_features( al_range );
+							
+							/* look if we have to cancel the loop if the feature-list is empty
+							   and we have no more features in this reference */
+							if ( flist.empty() )
+							{
+								done = ( gtf_it.peek_next_feature_start() == 0 );
+								if ( !done )
+									done = !gtf_it.peek_next_feature_is_ref( ref_name );
+							}
+							counter.inc_total_alignments();
+						}
+						f = gtf_it.forward_to_next_ref( ref_name );
+					}
+					catch ( ngs::ErrorMsg e )
+					{
+						std::cout << "error in ref " << ref_name << " : " << e.what() << std::endl;
+						f = NULL;
+					}
+				}
+				catch ( ngs::ErrorMsg e )
+				{
+					f = gtf_it.forward_to_next_ref( ref_name );
+				}
+
+			}
+			counter.report();
+		}
+};
+
+
+int matching( const struct sra_seq_count_options * options )
+{
+	int res = 0;
+	
+	std::string id_attr( options->id_attrib );
+	std::string feature_type( options->feature_type );
+
+	/* create the ngs-iterator, which delivers references and alignments */
+	try
+	{
+		ngs::ReadCollection run ( ncbi::NGS::openReadCollection( options->sra_accession ) );
+		
+		/* create the gtf-iterator, which delivers gtf-features */		
+		gtf_iter gtf_it( options->gtf_file, id_attr, feature_type );
+		
+		/* create a iterator window that walks both iterators to count alignments for the features */
+		iter_window window( run, gtf_it, options->output_mode );
+		
+		/* walk the window... */
+		window.walk();
+	}
+	catch ( ngs::ErrorMsg e )
+	{
+		std::cout << "cannot open " << options->sra_accession << " because " << e.what() << std::endl;
+	}
+	return res;
+}
+
+
+int list_refs_in_gtf( const char * gtf )
+{
+	int res = 0;
+	long feature_count = 0;
+	long feature_ref_count = 0;
+	std::string ref_name;
+	std::string id_attr( "gene_id" );
+	std::string feature_type( "exon" );
+
+	/* create the gtf-iterator, which delivers gtf-features */		
+	gtf_iter gtf_it( gtf, id_attr, feature_type );
+	
+	feature * f = gtf_it.next_feature();
+	while ( f != NULL )
+	{
+		/* count feature */
+		feature_count ++;
+
+		if ( f -> is_ref( ref_name ) )
+		{
+			feature_ref_count++;
+		}
+		else
+		{
+			if ( feature_ref_count > 0 )
+			{
+				std::cout << ref_name << "\t" << feature_ref_count << std::endl;
+				feature_ref_count = 0;
+			}
+			f -> get_ref_name( ref_name );
+		}
+
+		/* dispose feature */
+		delete f;
+		f = gtf_it.next_feature();	
+	}
+	std::cout << feature_count << " features" << std::endl;
+	
+	return res;
+}
+
+
+void print_rr( const range &A, const range &B )
+{
+	std::cout << A << " --- " << B << " : " << range::range_relation_2_str( A.range_relation( B ) ) << std::endl;
+}
+
+void rr_test( void )
+{
+	/*
+	print_rr( range( 10, 20 ), range( 5, 7 ) );
+	print_rr( range( 10, 20 ), range( 5, 10 ) );
+
+	print_rr( range( 10, 20 ), range( 5, 12 ) );
+	print_rr( range( 10, 20 ), range( 5, 20 ) );
+	
+	print_rr( range( 10, 20 ), range( 5, 22 ) );
+	
+	print_rr( range( 10, 20 ), range( 10, 20 ) );
+	print_rr( range( 10, 20 ), range( 5, 25 ) );
+	
+	print_rr( range( 10, 20 ), range( 15, 25 ) );
+	print_rr( range( 10, 20 ), range( 20, 25 ) );
+
+	print_rr( range( 10, 20 ), range( 25, 35 ) );
+	*/
+	
+	ranges rl;
+	rl.add( range( 10, 20 ) );
+	rl.add( range( 70, 80 ) );	
+	rl.add( range( 30, 40 ) );
+	rl.add( range( 50, 60 ) );
+	rl.merge( range( 18, 22 ) );	
+	
+	rl.sort();
+	
+	std::cout << rl << std::endl;
+}
+
+/*
+int main( int argc, const char* argv[] )
+{
+	int res = 0;
+	if ( argc < 3 )
+	{
+		std::cout << "\nusage : gene_count sra_accession genes.gtf\n";
+		res = -1;
+	}
+	else
+	{
+		matching( argv[ 1 ], argv[ 2 ] );
+		// list_refs_in_gtf( argv[ 2 ] );
+		// rr_test();
+	}
+	
+    return res;
+}
+*/
diff --git a/tools/sra-shell/Makefile b/tools/sra-shell/Makefile
new file mode 100644
index 0000000..a3f9d33
--- /dev/null
+++ b/tools/sra-shell/Makefile
@@ -0,0 +1,58 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+TOP ?= $(abspath ../..)
+MODULE = tools/sra-shell
+
+include $(TOP)/build/Makefile.shell
+
+
+#-------------------------------------------------------------------------------
+# default
+#
+SUBDIRS = \
+	parser \
+	job-exec \
+	sra-shell \
+	turboVision \
+	guilib \
+	sra-gui
+
+
+# common targets for non-leaf Makefiles; must follow a definition of SUBDIRS
+include $(TOP)/build/Makefile.targets
+
+$(SUBDIRS):
+	@ $(MAKE) -C $@
+
+.PHONY: default $(SUBDIRS) 
+
+#-------------------------------------------------------------------------------
+# pass-through
+#
+out debug profile release GCC ICC VC++:
+	@ $(MAKE) TOP=$(TOP) -f $(TOP)/build/Makefile.env $@
+
+.PHONY: out debug profile release GCC ICC VC++
diff --git a/tools/sra-shell/guilib/Makefile b/tools/sra-shell/guilib/Makefile
new file mode 100644
index 0000000..6910c3d
--- /dev/null
+++ b/tools/sra-shell/guilib/Makefile
@@ -0,0 +1,71 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: std
+
+TOP ?= $(abspath ../../..)
+MODULE = tools/sra-shell/guilib
+
+include $(TOP)/build/Makefile.env
+
+INT_LIBS = \
+	guilib
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/std
+	
+$(INT_LIBS): makedirs
+	@ $(MAKE_CMD) $(ILIBDIR)/$@
+
+.PHONY: all std $(INT_LIBS)
+
+#-------------------------------------------------------------------------------
+# std
+#
+$(TARGDIR)/std: \
+	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
+
+.PHONY: $(TARGDIR)/std
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# guilib
+#
+
+GUILIB_SRC = \
+
+GUILIB_OBJ = \
+	$(addsuffix .$(OBJX),$(GUILIB_SRC))
+
+$(ILIBDIR)/guilib: $(GUILIB_OBJ)
+	$(LP) --slib -o $@ $^ 
diff --git a/tools/sra-shell/job-exec/Makefile b/tools/sra-shell/job-exec/Makefile
new file mode 100644
index 0000000..5b900d8
--- /dev/null
+++ b/tools/sra-shell/job-exec/Makefile
@@ -0,0 +1,71 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: std
+
+TOP ?= $(abspath ../../..)
+MODULE = tools/sra-shell/job-exec
+
+include $(TOP)/build/Makefile.env
+
+INT_LIBS = \
+	job-exec
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/std
+	
+$(INT_LIBS): makedirs
+	@ $(MAKE_CMD) $(ILIBDIR)/$@
+
+.PHONY: all std $(INT_LIBS)
+
+#-------------------------------------------------------------------------------
+# std
+#
+$(TARGDIR)/std: \
+	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
+
+.PHONY: $(TARGDIR)/std
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# job-exec
+#
+
+JOB_EXEC_SRC = \
+
+JOB_EXEC_OBJ = \
+	$(addsuffix .$(OBJX),$(JOB_EXEC_SRC))
+
+$(ILIBDIR)/job-exec: $(JOB_EXEC_OBJ)
+	$(LP) --slib -o $@ $^ 
diff --git a/tools/sra-shell/parser/Makefile b/tools/sra-shell/parser/Makefile
new file mode 100644
index 0000000..741d0f1
--- /dev/null
+++ b/tools/sra-shell/parser/Makefile
@@ -0,0 +1,71 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: std
+
+TOP ?= $(abspath ../../..)
+MODULE = tools/sra-shell/parser
+
+include $(TOP)/build/Makefile.env
+
+INT_LIBS = \
+	sra-shell-parser
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/std
+	
+$(INT_LIBS): makedirs
+	@ $(MAKE_CMD) $(ILIBDIR)/$@
+
+.PHONY: all std $(INT_LIBS)
+
+#-------------------------------------------------------------------------------
+# std
+#
+$(TARGDIR)/std: \
+	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
+
+.PHONY: $(TARGDIR)/std
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# sra-shell-parser
+#
+
+PARSER_SRC = \
+
+PARSER_OBJ = \
+	$(addsuffix .$(OBJX),$(PARSER_SRC))
+
+$(ILIBDIR)/sra-shell-parser: $(PARSER_OBJ)
+	$(LP) --slib -o $@ $^ 
diff --git a/tools/sra-shell/parser/sra-shell-lex.l b/tools/sra-shell/parser/sra-shell-lex.l
new file mode 100644
index 0000000..a2f883f
--- /dev/null
+++ b/tools/sra-shell/parser/sra-shell-lex.l
@@ -0,0 +1,103 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+ 
+%{ 
+    #include "sra-shell-parse.h"
+    #include "sra-shell-tokens.h"    
+    
+    #define YYSTYPE SRAShellToken
+
+    /* code to populate token with internal values */
+    #define YY_USER_ACTION              \
+        yylval -> tokenText     = yytext;   \
+        yylval -> tokenLength   = yyleng;   \
+        yylval -> line_no       = yylineno; \
+        yylval -> column_no     = yyextra -> column; \
+        yyextra -> column += yyleng; \
+        yyextra -> length += yyleng; \
+        yyextra -> lastToken = yylval; 
+
+    #define ENDLINE \
+        yyextra -> column=1;\
+        return shENDLINE;
+
+    #define YY_INPUT(buf, result, max_size) \
+        result = yyextra->input(yyextra, buf, max_size)
+
+    #define ECHO
+
+    static void SRAShell_fatal_error(yyconst char* msg);
+    #define YY_FATAL_ERROR(msg) SRAShell_fatal_error(msg)
+    
+%}
+
+%option never-interactive nounistd yylineno reentrant bison-bridge stack noyywrap
+
+%option prefix="SRAShell"
+%option extra-type="SRAShellParseBlock*"
+
+ /*%option debug*/
+
+ws          [ \t]+
+digits      [0-9]+
+alphanum    [A-Za-z0-9\-_]+
+eol         (\r\n|\r|\n)
+
+%%
+
+. { return yytext[0]; }
+
+{eol} { ENDLINE; }
+
+%%    
+
+rc_t CC SRAShellScan_yylex_init(SRAShellParseBlock* sb, bool debug)
+{
+    if (yylex_init_extra(sb, &sb->scanner) != 0)
+    {
+        return RC ( rcApp, rcFile, rcParsing, rcMemory, rcExhausted );
+    }       
+
+    yyset_debug(debug ? 1 : 0, sb->scanner);
+
+    return 0;
+}
+
+void CC SRAShellScan_yylex_destroy(SRAShellParseBlock* sb)
+{
+    if (sb->scanner)
+    {
+        yylex_destroy(sb->scanner);
+    }       
+    sb->scanner=0;
+}
+
+void SRAShell_fatal_error(yyconst char* msg)
+{
+    rc_t rc = RC ( rcApp, rcFile, rcParsing, rcError, rcUnexpected );
+    LogErr(klogErr, rc, msg);
+    exit(rc);  
+}
diff --git a/tools/sra-shell/parser/sra-shell.y b/tools/sra-shell/parser/sra-shell.y
new file mode 100644
index 0000000..cf72beb
--- /dev/null
+++ b/tools/sra-shell/parser/sra-shell.y
@@ -0,0 +1,54 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+ 
+%{  
+    #include "sra-shell-parse.h"
+
+    #define YYSTYPE SRAShellToken
+    #define YYLEX_PARAM pb->scanner
+    #define YYDEBUG 1
+
+    #include "sra-shell-tokens.h"
+%}
+
+%pure-parser
+%parse-param {SRAShellParseBlock* pb }
+%lex-param {SRAShellParseBlock* pb }
+%error-verbose 
+%name-prefix="SRAShell"
+
+%token shNUMBER
+%token shALPHANUM
+%token shWS
+%token shENDLINE
+%token shTOKEN
+%token shUNRECOGNIZED
+%token shENDOFTEXT 0
+
+%%
+
+%%
+
diff --git a/tools/sra-shell/sra-gui/Makefile b/tools/sra-shell/sra-gui/Makefile
new file mode 100644
index 0000000..3ef9778
--- /dev/null
+++ b/tools/sra-shell/sra-gui/Makefile
@@ -0,0 +1,80 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: std
+
+TOP ?= $(abspath ../../..)
+MODULE = tools/sra-shell/sra-gui
+
+EXT_TOOLS = \
+    sra-gui
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)    
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs 
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(INT_LIBS): makedirs
+	@ $(MAKE_CMD) $(ILIBDIR)/$@
+
+$(EXT_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@    
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+.PHONY: all std $(ALL_LIBS) 
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#------------------------------------------------------------------------------
+# sra-gui
+#
+SRA_GUI_SRC = \
+	sra-gui
+
+SRA_GUI_OBJ = \
+	$(addsuffix .$(OBJX),$(SRA_GUI_SRC))
+
+SRA_GUI_LIB = \
+	-lkapp \
+	-stk-version \
+	-lncbi-vdb \
+
+$(BINDIR)/sra-gui: $(SRA_GUI_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../../shared/toolkit.vers -o $@ $^ $(SRA_GUI_LIB)
+
diff --git a/tools/sra-shell/sra-gui/sra-gui.c b/tools/sra-shell/sra-gui/sra-gui.c
new file mode 100644
index 0000000..f9095ea
--- /dev/null
+++ b/tools/sra-shell/sra-gui/sra-gui.c
@@ -0,0 +1,49 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <klib/out.h>
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+
+rc_t CC Usage ( const Args * args )
+{
+    return 0;
+}
+
+const char UsageDefaultName[] = "sra-gui";
+
+rc_t CC UsageSummary(const char *prog_name)
+{
+    return KOutMsg ( "Usage: %s [options] path [ path... ]\n"
+                     "\n"
+                     , prog_name );
+}
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    return 0;
+}
diff --git a/tools/sra-shell/sra-shell/Makefile b/tools/sra-shell/sra-shell/Makefile
new file mode 100644
index 0000000..ef36c2e
--- /dev/null
+++ b/tools/sra-shell/sra-shell/Makefile
@@ -0,0 +1,87 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: std
+
+TOP ?= $(abspath ../../..)
+MODULE = tools/sra-shell/sra-shell
+
+EXT_TOOLS = \
+    sra-shell
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)    
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs 
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(INT_LIBS): makedirs
+	@ $(MAKE_CMD) $(ILIBDIR)/$@
+
+$(EXT_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@    
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+.PHONY: all std $(ALL_LIBS) 
+
+#-------------------------------------------------------------------------------
+# clean
+#
+INTERM_SRC = \
+	$(SRCDIR)/shell-lex.c \
+	$(SRCDIR)/shell-grammar.c \
+	$(SRCDIR)/shell-tokens.h 
+
+clean: stdclean
+
+.PHONY: clean
+
+.PRECIOUS: $(INTERM_SRC)
+
+#------------------------------------------------------------------------------
+# sra-shell
+#
+SRA_SHELL_SRC = \
+	sra-shell
+
+SRA_SHELL_OBJ = \
+	$(addsuffix .$(OBJX),$(SRA_SHELL_SRC))
+
+SRA_SHELL_LIB = \
+	-lkapp \
+	-stk-version \
+	-lncbi-vdb \
+
+$(BINDIR)/sra-shell: $(SRA_SHELL_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../../shared/toolkit.vers -o $@ $^ $(SRA_SHELL_LIB)
+
diff --git a/tools/sra-shell/sra-shell/sra-shell.c b/tools/sra-shell/sra-shell/sra-shell.c
new file mode 100644
index 0000000..66d30dd
--- /dev/null
+++ b/tools/sra-shell/sra-shell/sra-shell.c
@@ -0,0 +1,49 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <klib/out.h>
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+
+rc_t CC Usage ( const Args * args )
+{
+    return 0;
+}
+
+const char UsageDefaultName[] = "sra-shell";
+
+rc_t CC UsageSummary(const char *prog_name)
+{
+    return KOutMsg ( "Usage: %s [options] path [ path... ]\n"
+                     "\n"
+                     , prog_name );
+}
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    return 0;
+}
diff --git a/tools/sra-shell/turboVision/Makefile b/tools/sra-shell/turboVision/Makefile
new file mode 100644
index 0000000..9ff9c76
--- /dev/null
+++ b/tools/sra-shell/turboVision/Makefile
@@ -0,0 +1,71 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: std
+
+TOP ?= $(abspath ../../..)
+MODULE = tools/sra-shell/turboVision
+
+include $(TOP)/build/Makefile.env
+
+INT_LIBS = \
+	turboVision
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/std
+	
+$(INT_LIBS): makedirs
+	@ $(MAKE_CMD) $(ILIBDIR)/$@
+
+.PHONY: all std $(INT_LIBS)
+
+#-------------------------------------------------------------------------------
+# std
+#
+$(TARGDIR)/std: \
+	$(addprefix $(ILIBDIR)/,$(INT_LIBS))
+
+.PHONY: $(TARGDIR)/std
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# turboVision
+#
+
+TURBOVISION_SRC = \
+
+TURBOVISION_OBJ = \
+	$(addsuffix .$(OBJX),$(TURBOVISION_SRC))
+
+$(ILIBDIR)/turboVision: $(TURBOVISION_OBJ)
+	$(LP) --slib -o $@ $^ 
diff --git a/tools/sra-sort/Makefile b/tools/sra-sort/Makefile
new file mode 100644
index 0000000..7cfe85b
--- /dev/null
+++ b/tools/sra-sort/Makefile
@@ -0,0 +1,125 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/sra-sort
+
+include $(TOP)/build/Makefile.shell
+
+INT_TOOLS = \
+	dump-blob-boundaries
+
+EXT_TOOLS = \
+
+ifneq (win,$(OS))
+EXT_TOOLS += sra-sort
+endif	
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+include $(SRCDIR)/Makefile.$(COMP)
+
+#------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# sra-sort
+#
+SRA_SORT_SRC = \
+	caps \
+	mem \
+	membank \
+	paged-membank \
+	paged-mmapbank \
+	except \
+	idx-mapping \
+	map-file \
+	col-pair \
+	row-set \
+	simple-row-set \
+	mapping-row-set \
+	sorting-row-set \
+	meta-pair \
+	dir-pair \
+	tbl-pair \
+	db-pair \
+	glob-poslen \
+	poslen-col-pair \
+	ref-alignid-col \
+	buff-writer \
+	id-mapper-col \
+	capture-first-half-aligned \
+	csra-tbl \
+	csra-pair \
+	run \
+	sra-sort \
+	xcheck-ref-align
+
+SRA_SORT_OBJ = \
+	$(addsuffix .$(OBJX),$(SRA_SORT_SRC))
+
+SRA_SORT_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-wvdb \
+	-lm
+
+$(BINDIR)/sra-sort: $(SRA_SORT_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(SRA_SORT_LIB)
+
+#-------------------------------------------------------------------------------
+# dump-blob-boundaries
+#
+DBB_SRC = \
+	dump-blob-boundaries
+
+DBB_OBJ = \
+	$(addsuffix .$(OBJX),$(DBB_SRC))
+
+DBB_LIB = \
+	-lncbi-vdb \
+
+$(BINDIR)/dump-blob-boundaries: $(DBB_OBJ)
+	$(LD) --exe -o $@ $^ $(DBB_LIB)
diff --git a/tools/sra-sort/Makefile.cc b/tools/sra-sort/Makefile.cc
new file mode 100644
index 0000000..ca33e13
--- /dev/null
+++ b/tools/sra-sort/Makefile.cc
@@ -0,0 +1,24 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
diff --git a/tools/sra-sort/Makefile.clang b/tools/sra-sort/Makefile.clang
new file mode 100644
index 0000000..bad5e3a
--- /dev/null
+++ b/tools/sra-sort/Makefile.clang
@@ -0,0 +1,27 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+PED = -std=gnu99 -fgnu89-inline
+
diff --git a/tools/sra-sort/Makefile.gcc b/tools/sra-sort/Makefile.gcc
new file mode 100644
index 0000000..02182c4
--- /dev/null
+++ b/tools/sra-sort/Makefile.gcc
@@ -0,0 +1,27 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+PED = $(shell $(SRCDIR)/gcc-ped.sh -std=gnu99 -fgnu89-inline)
+
diff --git a/tools/sra-sort/Makefile.vc++ b/tools/sra-sort/Makefile.vc++
new file mode 100644
index 0000000..ca33e13
--- /dev/null
+++ b/tools/sra-sort/Makefile.vc++
@@ -0,0 +1,24 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
diff --git a/tools/sra-sort/buff-writer.c b/tools/sra-sort/buff-writer.c
new file mode 100644
index 0000000..c1ee43d
--- /dev/null
+++ b/tools/sra-sort/buff-writer.c
@@ -0,0 +1,789 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct BufferedPairColWriter BufferedPairColWriter;
+#define COLWRITER_IMPL BufferedPairColWriter
+
+#include "buff-writer.h"
+#include "row-set.h"
+#include "idx-mapping.h"
+#include "map-file.h"
+#include "csra-tbl.h"
+#include "col-pair.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+#include "sra-sort.h"
+
+#include <klib/sort.h>
+#include <klib/rc.h>
+#include <kdb/btree.h>
+
+#include <string.h>
+#include <bitstr.h>
+
+FILE_ENTRY ( buff-writer );
+
+
+/*--------------------------------------------------------------------------
+ * BufferedPairColWriter
+ */
+struct BufferedPairColWriter
+{
+    ColumnWriter dad;
+
+    cSRATblPair *tbl;   /* borrowed reference to table        */
+
+    ColumnWriter *cw;   /* where to write data                */
+
+    MemBank *mbank;     /* paged memory bank                  */
+#define MAX_VOCAB_SIZE 32*1024
+    /*** introducing VOCABULARY value->id->vocab_value ***/
+    KBTree	*vocab_key2id;
+    const void	*vocab_id2val[MAX_VOCAB_SIZE];
+    uint32_t	vocab_cnt;
+    /******************************************************/
+    MapFile *idx;       /* optional row-id mapping index      */
+
+    union
+    {
+        /* for mapping writers */
+        struct
+        {
+            union
+            {
+                /* "immediate" data - size <= 64 bits and row_len == 1 */
+                uint64_t imm;
+
+                /* "indirect" data - stored in "mbank" */
+                void *ptr;
+
+            } val;
+            int64_t new_id;
+        } *data;
+
+        /* standard ( old_id, new_id ) mapping pair */
+        IdxMapping *map;
+
+        /* for non-mapping writers */
+        int64_t *ids;
+
+    } u;
+
+    /* for non-mapping writers - new=>old ord */
+    uint32_t *ord;
+
+    size_t num_items;   /* total number of items              */
+    size_t cur_item;    /* index of currently available item  */
+    size_t num_immed;   /* number of immediate items written  */
+
+    uint32_t elem_bits; /* number of bits of each element     */
+    uint32_t min_row_len;
+    uint32_t max_row_len;
+};
+
+static
+void BufferedPairColWriterWhack ( BufferedPairColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    MapFileRelease ( self -> idx, ctx );
+    MemBankRelease ( self -> mbank, ctx );
+    if(self -> vocab_key2id) KBTreeRelease  ( self -> vocab_key2id );
+    ColumnWriterRelease ( self -> cw, ctx );
+    MemFree ( ctx, self, sizeof * self );
+}
+
+static
+const char *BufferedPairColWriterFullSpec ( const BufferedPairColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    return ColumnWriterFullSpec ( self -> cw, ctx );
+}
+
+static
+void BufferedPairColWriterPreCopy ( BufferedPairColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    ColumnWriterPreCopy ( self -> cw, ctx );
+}
+
+static
+void BufferedPairColWriterPostCopy ( BufferedPairColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( self -> mbank != NULL )
+    {
+        MemBankRelease ( self -> mbank, ctx );
+        self -> mbank = NULL;
+    }
+    if ( self -> vocab_key2id != NULL )
+    {
+	KBTreeRelease  ( self -> vocab_key2id );
+	self -> vocab_key2id = 0;
+	self -> vocab_cnt = 0;
+    }
+
+    ColumnWriterPostCopy ( self -> cw, ctx );
+}
+
+static
+void BufferedPairColWriterMapValues ( BufferedPairColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    size_t i;
+    int64_t id;
+    bool assign_ids = ( bool ) self -> dad . align [ 0 ];
+
+    if ( self -> elem_bits != 64 )
+    {
+        rc = RC ( rcExe, rcColumn, rcWriting, rcType, rcIncorrect );
+        INTERNAL_ERROR ( rc, "column '%s' does not have 64-bit elements and cannot be mapped",
+            ColumnWriterFullSpec ( self -> cw, ctx ) );
+        return;
+    }
+
+    if ( self -> num_immed != self -> num_items )
+    {
+#if DISALLOW_VARIABLE_ROW_LENGTH_MAPPING
+        rc = RC ( rcExe, rcColumn, rcWriting, rcType, rcIncorrect );
+        INTERNAL_ERROR ( rc, "column '%s' does not have fixed row-length of 1 and cannot be mapped",
+            ColumnWriterFullSpec ( self -> cw, ctx ) );
+#else
+        const uint32_t *base;
+        /* detect case when we have ids that were written
+           sparsely ( as NULLs ) rather than densely ( zeros for NULL ). */
+        if ( self -> min_row_len == 0 && self -> max_row_len == 1 )
+        {
+            for ( i = 0; i < self -> num_items; ++ i )
+            {
+                base = self -> u . data [ i ] . val . ptr;
+                if ( base != NULL )
+                    memcpy ( & self -> u . data [ i ] . val . imm, & base [ 1 ], 8 );
+            }
+
+            MemBankRelease ( self -> mbank, ctx );
+            self -> mbank = NULL;
+            self -> num_immed = self -> num_items;
+            self -> min_row_len = 1;
+	    
+        }
+        else
+        {
+            STATUS ( 3, "randomly mapping old=>new values" );
+            for ( i = 0; i < self -> num_immed; ++ i )
+            {
+                uint32_t *base;
+
+                id = self -> u . data [ i ] . val . imm;
+
+                ON_FAIL ( base = MemBankAlloc ( self -> mbank, ctx, sizeof id + sizeof * base, false ) )
+                    return;
+
+                if ( id != 0 )
+                {
+                    ON_FAIL ( id = MapFileMapSingleOldToNew ( self -> idx, ctx, id, assign_ids ) )
+                        return;
+                }
+
+                memcpy ( & base [ 1 ], & id, sizeof id );
+                base [ 0 ] = 1;
+                self -> u . data [ i ] . val . ptr = base;
+            }
+            for ( self -> num_immed = 0; i < self -> num_items; ++ i )
+            {
+                base = self -> u . data [ i ] . val . ptr;
+                if ( base != NULL )
+                {
+                    uint32_t j, row_len = base [ 0 ];
+                    int64_t *ids = ( int64_t* ) & base [ 1 ];
+                    for ( j = 0; j < row_len; ++ j )
+                    {
+                        id = ids [ j ];
+                        if ( id != 0 )
+                        {
+                            ON_FAIL ( ids [ j ] = MapFileMapSingleOldToNew ( self -> idx, ctx, id, assign_ids ) )
+                                return;
+                        }
+                    }
+                }
+            }
+            return;
+        }
+#endif
+    }
+
+    STATUS ( 3, "sorting %,u ( data, new_id ) map entries on immediate value", self -> num_items );
+#if USE_OLD_KSORT
+    ksort ( self -> u . map, self -> num_items, sizeof self -> u . map [ 0 ], IdxMappingCmpOld, ( void* ) ctx );
+#else
+    IdxMappingSortOld ( self -> u . map, ctx, self -> num_items );
+#endif
+
+    STATUS ( 3, "mapping old=>new values" );
+    for ( i = 0; i < self -> num_items; ++ i )
+    {
+        id = self -> u . map [ i ] . old_id;
+        if ( id != 0 )
+        {
+            ON_FAIL ( self -> u . map [ i ] . old_id = MapFileMapSingleOldToNew ( self -> idx, ctx, id, assign_ids ) )
+                break;
+        }
+    }
+}
+
+static
+void BufferedPairColWriterWriteMapped ( BufferedPairColWriter *self, const ctx_t *ctx,
+    uint32_t elem_bits, const void *data, uint32_t boff, uint32_t row_len )
+{
+    FUNC_ENTRY ( ctx );
+
+    uint32_t *base;
+    size_t i, row_bytes;
+    const size_t pg_size = 256 * 1024;
+
+    /* detect first write */
+    if ( self -> u . data == NULL )
+    {
+        /* get map and content length from table */
+        assert ( self -> idx != NULL );
+        ON_FAIL ( self -> u . map = RowSetIteratorGetIdxMapping ( self -> tbl -> rsi, ctx, & self -> num_items ) )
+        {
+            ANNOTATE ( "failed to get ( old_id, new_id ) map for column '%s'", ColumnWriterFullSpec ( self -> cw, ctx ) );
+            return;
+        }
+
+        /* require elem_bits to be constant for column */
+        self -> elem_bits = elem_bits;
+
+        /* OPTIMIZATION:
+           IFF elem_bits <= 64 and row_len == 1, store in union
+           otherwise, use membank. This requires that if row_len
+           ever changes, we have to recover. */
+        if ( elem_bits > 64 || row_len != 1 )
+        {
+            /* create a memory bank */
+            /* TBD - used configured page size rather than 256K */
+            ON_FAIL ( self -> mbank = MemBankMakePaged ( ctx, -1L, pg_size ) )
+                return;
+        }
+
+        /* initialize min/max */
+        self -> min_row_len = self -> max_row_len = row_len;
+    }
+
+    /* elem_bits should be constant */
+    assert ( self -> elem_bits == elem_bits );
+
+    /* handle optimized case */
+    if ( self -> mbank == NULL )
+    {
+        /* first, detect a change */
+        if ( row_len == 1 )
+        {
+            /* continue on optimized case */
+            row_bytes = ( ( size_t ) elem_bits + 7 ) >> 3;
+            if ( boff != 0 )
+            {
+                bitcpy ( & self -> u . data [ self -> cur_item ] . val . imm,
+                    0, data, boff, ( bitsz_t ) elem_bits * row_len );
+            }
+            else
+            {
+                memcpy ( & self -> u . data [ self -> cur_item ] . val . imm, data, row_bytes );
+            }
+
+            /* record another immediate row */
+            ++ self -> num_immed;
+
+            /* detect last row */
+            if ( ++ self -> cur_item < self -> num_items )
+                return;
+
+            /* map values */
+            TRY ( BufferedPairColWriterMapValues ( self, ctx ) )
+            {
+                /* need to resort map on new_id */
+                STATUS ( 3, "sorting %,u ( data, new_id ) map entries on new_id", self -> num_items );
+#if USE_OLD_KSORT
+                ksort ( self -> u . map, self -> num_items, sizeof self -> u . map [ 0 ], IdxMappingCmpNew, ( void* ) ctx );
+#else
+                IdxMappingSortNew ( self -> u . map, ctx, self -> num_items );
+#endif
+
+                /* write all rows to column writer */
+                STATUS ( 3, "writing cell data to '%s'", ColumnWriterFullSpec ( self -> cw, ctx ) );
+                for ( i = 0; i < self -> num_items; ++ i )
+                {
+                    /* write out row */
+                    ON_FAIL ( ColumnWriterWrite ( self -> cw, ctx, self -> elem_bits, & self -> u . data [ i ] . val . imm, 0, 1 ) )
+                        break;
+                }
+            }
+
+            /* forget about map */
+            self -> u . map = NULL;
+            self -> cur_item = self -> num_items = self -> num_immed = 0;
+            self -> elem_bits = 0;
+
+            return;
+        }
+
+        /* need to recover */
+        ON_FAIL ( self -> mbank = MemBankMakePaged ( ctx, -1L, pg_size ) )
+            return;
+    }
+
+    /* update min/max row-len */
+    if ( row_len < self -> min_row_len )
+        self -> min_row_len = row_len;
+    else if ( row_len > self -> max_row_len )
+        self -> max_row_len = row_len;
+
+    /* handle zero-length rows specially */
+    if ( row_len == 0 )
+        self -> u . data [ self -> cur_item ] . val . ptr = NULL;
+    else
+    {
+        /* allocate space for the row */
+        row_bytes = ( ( size_t ) elem_bits * row_len + 7 ) >> 3;
+        TRY ( base = MemBankAlloc ( self -> mbank, ctx, row_bytes + sizeof row_len, false ) )
+        {
+            /* copy it in */
+            memcpy ( base, & row_len, sizeof row_len );
+            if ( boff != 0 )
+                bitcpy ( & base [ 1 ], 0, data, boff, ( bitsz_t ) elem_bits * row_len );
+            else
+                memcpy ( & base [ 1 ], data, row_bytes );
+
+            /* remember its location in the map */
+            self -> u . data [ self -> cur_item ] . val . ptr = base;
+
+            /* remember the last input pointer */
+        }
+    }
+
+    if ( ! FAILED () )
+    {
+        /* detect last row */
+        if ( ++ self -> cur_item == self -> num_items )
+        {
+            /* map values */
+            TRY ( BufferedPairColWriterMapValues ( self, ctx ) )
+            {
+                /* need to resort map on new_id */
+                STATUS ( 3, "sorting %,u ( data, new_id ) map entries on new_id", self -> num_items );
+#if USE_OLD_KSORT
+                ksort ( self -> u . map, self -> num_items, sizeof self -> u . map [ 0 ], IdxMappingCmpNew, ( void* ) ctx );
+#else
+                IdxMappingSortNew ( self -> u . map, ctx, self -> num_items );
+#endif
+
+                /* write all rows to column writer */
+                STATUS ( 3, "writing cell data to '%s'", ColumnWriterFullSpec ( self -> cw, ctx ) );
+                for ( i = 0; i < self -> num_immed; ++ i )
+                {
+                    /* write out row */
+                    ON_FAIL ( ColumnWriterWrite ( self -> cw, ctx, self -> elem_bits, & self -> u . data [ i ] . val . imm, 0, 1 ) )
+                        break;
+                }
+                for ( ; ! FAILED () && i < self -> num_items; ++ i )
+                {
+                    /* write out row */
+                    base = self -> u . data [ i ] . val . ptr;
+                    if ( base == NULL )
+                        ColumnWriterWrite ( self -> cw, ctx, self -> elem_bits, "", 0, 0 );
+                    else
+                        ColumnWriterWrite ( self -> cw, ctx, self -> elem_bits, & base [ 1 ], 0, base [ 0 ] );
+                }
+            }
+
+            /* drop the mem-bank */
+            MemBankRelease ( self -> mbank, ctx );
+            self -> mbank = NULL;
+
+            /* forget about map */
+            self -> u . data = NULL;
+            self -> cur_item = self -> num_items = self -> num_immed = 0;
+            self -> elem_bits = 0;
+        }
+    }
+}
+
+static
+void BufferedPairColWriterWriteUnmapped ( BufferedPairColWriter *self, const ctx_t *ctx,
+    uint32_t elem_bits, const void *data, uint32_t boff, uint32_t row_len )
+{
+    FUNC_ENTRY ( ctx );
+
+    size_t i, j, row_bytes;
+    const size_t pg_size = 256 * 1024;
+
+    /* detect first write */
+    if ( self -> u . data == NULL )
+    {
+        /* get ids, ord and content length from table */
+        assert ( self -> idx == NULL );
+        ON_FAIL ( self -> u . ids = RowSetIteratorGetSourceIds ( self -> tbl -> rsi, ctx, & self -> ord, & self -> num_items ) )
+        {
+            ANNOTATE ( "failed to get old_id, ord maps for column '%s'", ColumnWriterFullSpec ( self -> cw, ctx ) );
+            return;
+        }
+
+        /* require elem_bits to be constant for column */
+        self -> elem_bits = elem_bits;
+
+        /* OPTIMIZATION:
+           IFF elem_bits <= 64 and row_len == 1, store in union
+           otherwise, use membank. This requires that if row_len
+           ever changes, we have to recover. */
+        if ( elem_bits > 64 || row_len != 1 )
+        {
+	    rc_t rc=KBTreeMakeUpdate(&self->vocab_key2id, NULL, 100*1024*1024,
+                              false, kbtOpaqueKey,
+                              1, 1024, sizeof ( uint32_t ),
+                              NULL
+                              );
+	    if(rc != 0) self->vocab_key2id = NULL;
+	    self->vocab_cnt=0;
+            /* create a memory bank */
+            /* TBD - used configured page size rather than 256K */
+            ON_FAIL ( self -> mbank = MemBankMakePaged ( ctx, -1L, pg_size ) )
+               return;
+        }
+        /* initialize min/max */
+        self -> min_row_len = self -> max_row_len = row_len;
+    }
+
+    /* elem_bits should be constant */
+    assert ( self -> elem_bits == elem_bits );
+
+    /* handle optimized case */
+    if ( self -> mbank == NULL )
+    {
+        /* first, detect a change */
+        if ( row_len == 1 )
+        {
+            /* continue on optimized case */
+            row_bytes = ( ( size_t ) elem_bits + 7 ) >> 3;
+            if ( boff != 0 )
+            {
+                bitcpy ( & self -> u . ids [ self -> cur_item ],
+                    0, data, boff, ( bitsz_t ) elem_bits * row_len );
+            }
+            else
+            {
+                memcpy ( & self -> u . ids [ self -> cur_item ], data, row_bytes );
+            }
+
+            /* record another immediate row */
+            ++ self -> num_immed;
+
+            /* detect last row */
+            if ( ++ self -> cur_item < self -> num_items )
+                return;
+
+            /* write all rows to column writer */
+            STATUS ( 3, "writing cell data to '%s'", ColumnWriterFullSpec ( self -> cw, ctx ) );
+            for ( i = 0; i < self -> num_items; ++ i )
+            {
+                /* map to new order */
+                j = self -> ord [ i ];
+
+                /* write out row */
+                ON_FAIL ( ColumnWriterWrite ( self -> cw, ctx, self -> elem_bits, & self -> u . ids [ j ], 0, 1 ) )
+                    break;
+            }
+
+            /* forget about map */
+            self -> u . ids = NULL;
+            self -> ord = NULL;
+            self -> cur_item = self -> num_items = self -> num_immed = 0;
+            self -> elem_bits = 0;
+
+            return;
+        }
+
+        /* need to recover */
+	{
+	    rc_t rc=KBTreeMakeUpdate(&self->vocab_key2id, NULL, 100*1024*1024,
+                              false, kbtOpaqueKey,
+                              1, 1024, sizeof ( uint32_t ),
+                              NULL
+                              );
+	    if(rc != 0) self->vocab_key2id = NULL;
+	    self->vocab_cnt=0;
+            /* create a memory bank */
+            /* create a memory bank */
+            /* TBD - used configured page size rather than 256K */
+            ON_FAIL ( self -> mbank = MemBankMakePaged ( ctx, -1L, pg_size ) )
+               return;
+	}
+    }
+
+    /* update min/max row-len */
+    if ( row_len < self -> min_row_len )
+        self -> min_row_len = row_len;
+    else if ( row_len > self -> max_row_len )
+        self -> max_row_len = row_len;
+
+    /* handle zero-length rows specially */
+    if ( row_len == 0 ){
+        self -> u . ids [ self -> cur_item ] = 0;
+    } else {
+    	uint32_t *base = NULL; 
+        row_bytes = ( ( size_t ) elem_bits * row_len + 7 ) >> 3;
+	if(self -> vocab_key2id){
+		rc_t rc;
+		bool wasInserted;
+		uint64_t tmp_id=self -> vocab_cnt;
+		if( self -> vocab_cnt < sizeof(self -> vocab_id2val)/sizeof(self -> vocab_id2val[0])){
+			rc = KBTreeEntry(self -> vocab_key2id, &tmp_id, &wasInserted, data, row_bytes);
+		} else {
+			rc = KBTreeFind (self -> vocab_key2id, &tmp_id, data, row_bytes);
+			if(rc == 0) wasInserted=false;
+		}
+		if(rc == 0){ /*** either entered or found **/
+			if(wasInserted){/** allocate and remember in vocabulary ***/
+				/* allocate space for the row */
+				TRY ( base = MemBankAlloc ( self -> mbank, ctx, row_bytes + sizeof row_len, false ) )
+				{
+				    /* copy it in */
+				    base[0] = row_len;
+				    if ( boff != 0 ) bitcpy ( & base [ 1 ], 0, data, boff, ( bitsz_t ) elem_bits * row_len );
+				    else memcpy ( & base [ 1 ], data, row_bytes );
+				    self -> vocab_id2val[self -> vocab_cnt++] = base; 
+				}
+			} else { /** get from vocabulary **/
+				assert(tmp_id < self -> vocab_cnt);
+				base = (uint32_t*)self -> vocab_id2val[tmp_id];
+			}
+		}
+		rc = 0;
+	}
+	if(base == NULL){
+		TRY ( base = MemBankAlloc ( self -> mbank, ctx, row_bytes + sizeof row_len, false ) )
+		{
+		    /* copy it in */
+		    base[0] = row_len;
+		    if ( boff != 0 )
+			bitcpy ( & base [ 1 ], 0, data, boff, ( bitsz_t ) elem_bits * row_len );
+		    else
+			memcpy ( & base [ 1 ], data, row_bytes );
+		}
+
+	}
+	/* remember base location in the map */
+	self -> u . ids [ self -> cur_item ] = ( int64_t ) ( size_t ) base;
+	/* remember the last input pointer */
+    }
+
+    if ( ! FAILED () )
+    {
+        /* detect last row */
+        if ( ++ self -> cur_item == self -> num_items )
+        {
+            /* write all rows to column writer */
+	    uint32_t *last_base=NULL;
+	    uint32_t   cnt=0;
+            STATUS ( 3, "writing cell data to '%s' num_items=%ld vocab_size=%d num_immed=%d", ColumnWriterFullSpec ( self -> cw, ctx ), self -> num_items, self ->vocab_cnt, self -> num_immed );
+            for ( i = 0; ! FAILED () && i < self -> num_items; ++ i )
+            {
+                /* map to new order */
+                j = self -> ord [ i ];
+                if ( j < self -> num_immed ){
+		    if(cnt > 0){ /*** flush accumulated count ***/
+			if(last_base==NULL) ColumnWriterWriteStatic(self->cw,ctx,self->elem_bits,           "",0,           0,cnt);
+			else		    ColumnWriterWriteStatic(self->cw,ctx,self->elem_bits,&last_base[1],0,last_base[0],cnt);
+			last_base=NULL;
+			cnt=0;
+		    }
+                    ColumnWriterWrite ( self -> cw, ctx, self -> elem_bits, & self -> u . ids [ j ], 0, 1 );
+                } else {
+                    /* accumulate repeated rows */
+                    void* ptr = (void*)(size_t)self->u.ids [ j ];
+		    if (cnt == 0){
+			cnt=1;
+			last_base = ptr;
+		    } else if (ptr == last_base){
+			cnt++;
+		    } else {
+			if(last_base==NULL) ColumnWriterWriteStatic(self->cw,ctx,self->elem_bits,           "",0,           0,cnt);
+			else		    ColumnWriterWriteStatic(self->cw,ctx,self->elem_bits,&last_base[1],0,last_base[0],cnt);
+			last_base = ptr;
+			cnt=1;
+		    }
+                }
+	   }
+	   if(cnt > 0){ /*** flush accumulated count ***/
+		if(last_base==NULL) ColumnWriterWriteStatic(self->cw,ctx,self->elem_bits,           "",0,           0,cnt);
+		else		    ColumnWriterWriteStatic(self->cw,ctx,self->elem_bits,&last_base[1],0,last_base[0],cnt);
+            }
+            /* drop the mem-bank */
+            MemBankRelease ( self -> mbank, ctx );
+            self -> mbank = NULL;
+
+            /* forget about map */
+            self -> u . ids = NULL;
+            self -> ord = NULL;
+            self -> cur_item = self -> num_items = self -> num_immed = 0;
+            self -> elem_bits = 0;
+
+            /* cleanup vocabulary */
+            if(self -> vocab_key2id ) {
+                KBTreeRelease  ( self -> vocab_key2id );
+                self -> vocab_key2id = 0;
+            }
+            self -> vocab_cnt = 0;
+
+        }
+    }
+}
+
+static
+void BufferedPairColWriterWriteStatic ( BufferedPairColWriter *self, const ctx_t *ctx,
+    uint32_t elem_bits, const void *data, uint32_t boff, uint32_t row_len, uint64_t count )
+{
+    FUNC_ENTRY ( ctx );
+    rc_t rc = RC ( rcExe, rcColumn, rcWriting, rcType, rcIncorrect );
+    INTERNAL_ERROR ( rc, "writing to a non-static column" );
+}
+
+
+static
+void BufferedPairColWriterCommit ( BufferedPairColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    ColumnWriterCommit ( self -> cw, ctx );
+}
+
+
+struct ColumnWriter_vt UnmappedBufferedPairColWriter_vt =
+{
+    BufferedPairColWriterWhack,
+    BufferedPairColWriterFullSpec,
+    BufferedPairColWriterPreCopy,
+    BufferedPairColWriterPostCopy,
+    BufferedPairColWriterWriteUnmapped,
+    BufferedPairColWriterWriteStatic,
+    BufferedPairColWriterCommit
+};
+
+
+struct ColumnWriter_vt MappedBufferedPairColWriter_vt =
+{
+    BufferedPairColWriterWhack,
+    BufferedPairColWriterFullSpec,
+    BufferedPairColWriterPreCopy,
+    BufferedPairColWriterPostCopy,
+    BufferedPairColWriterWriteMapped,
+    BufferedPairColWriterWriteStatic,
+    BufferedPairColWriterCommit
+};
+
+
+/*--------------------------------------------------------------------------
+ * cSRATblPair
+ *  interface to pairing of source and destination tables
+ */
+
+/* MakeBufferedColumnWriter
+ *  make a wrapper that buffers all rows written
+ *  then sorts on flush
+ */
+ColumnWriter *cSRATblPairMakeBufferedColumnWriter ( cSRATblPair *self,
+    const ctx_t *ctx, ColumnWriter *writer )
+{
+    FUNC_ENTRY ( ctx );
+
+    BufferedPairColWriter *buff;
+
+    TRY ( buff = MemAlloc ( ctx, sizeof * buff, true ) )
+    {
+        TRY ( ColumnWriterInit ( & buff -> dad, ctx, & UnmappedBufferedPairColWriter_vt, false ) )
+        {
+            /* duplicate our friend */
+            TRY ( buff -> cw = ColumnWriterDuplicate ( writer, ctx ) )
+            {
+                /* borrowed ( weak ) reference
+                   cannot duplicate without creating cycle */
+                buff -> tbl = self;
+
+                return & buff -> dad;
+            }
+        }
+
+        MemFree ( ctx, buff, sizeof * buff );
+    }
+
+    return NULL;
+}
+
+/* MakeBufferedIdRemapColumnWriter
+ *  make a wrapper that buffers all rows written
+ *  maps all ids through index MapFile
+ *  then sorts on flush
+ */
+ColumnWriter *cSRATblPairMakeBufferedIdRemapColumnWriter ( cSRATblPair *self,
+    const ctx_t *ctx, ColumnWriter *writer, MapFile *idx, bool assign_ids )
+{
+    FUNC_ENTRY ( ctx );
+
+    BufferedPairColWriter *buff;
+
+    TRY ( buff = MemAlloc ( ctx, sizeof * buff, true ) )
+    {
+        TRY ( ColumnWriterInit ( & buff -> dad, ctx, & MappedBufferedPairColWriter_vt, idx != NULL ) )
+        {
+            /* duplicate our friend */
+            TRY ( buff -> cw = ColumnWriterDuplicate ( writer, ctx ) )
+            {
+                TRY ( buff -> idx = MapFileDuplicate ( idx, ctx ) )
+                {
+                    /* borrowed ( weak ) reference
+                       cannot duplicate without creating cycle */
+                    buff -> tbl = self;
+
+                    /* preserve boolean in one of Dad's align bytes */
+                    buff -> dad . align [ 0 ] = assign_ids;
+
+                    return & buff -> dad;
+                }
+
+                ColumnWriterRelease ( writer, ctx );
+            }
+        }
+
+        MemFree ( ctx, buff, sizeof * buff );
+    }
+
+    return NULL;
+}
diff --git a/tools/sra-sort/buff-writer.h b/tools/sra-sort/buff-writer.h
new file mode 100644
index 0000000..261788a
--- /dev/null
+++ b/tools/sra-sort/buff-writer.h
@@ -0,0 +1,64 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_buff_writer_
+#define _h_sra_sort_buff_writer_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct MapFile;
+struct cSRATblPair;
+struct ColumnWriter;
+
+
+/*--------------------------------------------------------------------------
+ * cSRATblPair
+ *  interface to pairing of source and destination tables
+ */
+
+/* MakeBufferedColumnWriter
+ *  make a wrapper that buffers all rows written
+ *  then sorts on flush
+ */
+struct ColumnWriter *cSRATblPairMakeBufferedColumnWriter ( struct cSRATblPair *self,
+    const ctx_t *ctx, struct ColumnWriter *writer );
+
+/* MakeBufferedIdRemapColumnWriter
+ *  make a wrapper that buffers all rows written
+ *  maps all ids through index MapFile
+ *  then sorts on flush
+ */
+struct ColumnWriter *cSRATblPairMakeBufferedIdRemapColumnWriter ( struct cSRATblPair *self,
+    const ctx_t *ctx, struct ColumnWriter *writer, struct MapFile *idx, bool assign_ids );
+
+
+#endif /* _h_sra_sort_buff_writer_ */
diff --git a/tools/sra-sort/caps.c b/tools/sra-sort/caps.c
new file mode 100644
index 0000000..9becbb1
--- /dev/null
+++ b/tools/sra-sort/caps.c
@@ -0,0 +1,125 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "caps.h"
+#include "ctx.h"
+#include "mem.h"
+#include "except.h"
+
+#include <vdb/manager.h>
+#include <kdb/manager.h>
+#include <kfg/config.h>
+
+#include <string.h>
+
+FILE_ENTRY ( caps );
+
+/*--------------------------------------------------------------------------
+ * Caps
+ *  a very watered down version of vdb-3 capabilities
+ */
+
+
+/* Init
+ *  initialize a local block from another
+ */
+void CapsInit ( Caps *caps, const ctx_t *ctx )
+{
+    if ( caps != NULL )
+    {
+        memset ( caps, 0, sizeof * caps );
+        if ( ctx != NULL && ctx -> caps != NULL )
+        {
+            const Caps *orig = ctx -> caps;
+            FUNC_ENTRY ( ctx );
+            TRY ( caps -> mem = MemBankDuplicate ( orig -> mem, ctx ) )
+            {
+                rc_t rc = KConfigAddRef ( caps -> cfg = orig -> cfg );
+                if ( rc != 0 )
+                {
+                    caps -> cfg = NULL;
+                    ERROR ( rc, "failed to duplicate reference to KConfig" );
+                }
+                else
+                {
+                    rc = KDBManagerAddRef ( caps -> kdb = orig -> kdb );
+                    if ( rc != 0 )
+                    {
+                        caps -> kdb = NULL;
+                        ERROR ( rc, "failed to duplicate reference to KDBManager" );
+                    }
+                    else
+                    {
+                        rc = VDBManagerAddRef ( caps -> vdb = orig -> vdb );
+                        if ( rc != 0 )
+                        {
+                            caps -> vdb = NULL;
+                            ERROR ( rc, "failed to duplicate reference to VDBManager" );
+                        }
+                        else
+                        {
+                            caps -> tool = orig -> tool;
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+
+
+/* Whack
+ *  release references
+ */
+void CapsWhack ( Caps *self, const ctx_t *ctx )
+{
+    if ( self != NULL )
+    {
+        rc_t rc;
+        MemBank *mem;
+
+        self -> tool = NULL;
+
+        rc = VDBManagerRelease ( self -> vdb );
+        if ( rc != 0 )
+            ABORT ( rc, "failed to release reference to VDBManager" );
+        self -> vdb = NULL;
+
+        rc = KDBManagerRelease ( self -> kdb );
+        if ( rc != 0 )
+            ABORT ( rc, "failed to release reference to KDBManager" );
+        self -> kdb = NULL;
+
+        rc = KConfigRelease ( self -> cfg );
+        if ( rc != 0 )
+            ABORT ( rc, "failed to release reference to KConfig" );
+        self -> cfg = NULL;
+
+        mem = self -> mem;
+        MemBankRelease ( mem, ctx );
+        self -> mem = NULL;
+    }
+}
diff --git a/tools/sra-sort/caps.h b/tools/sra-sort/caps.h
new file mode 100644
index 0000000..7368556
--- /dev/null
+++ b/tools/sra-sort/caps.h
@@ -0,0 +1,70 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_caps_
+#define _h_sra_sort_caps_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct MemBank;
+struct KConfig;
+struct KDBManager;
+struct VDBManager;
+struct Tool;
+
+
+/*--------------------------------------------------------------------------
+ * Caps
+ *  a very watered-down version of vdb-3 capabilities
+ */
+typedef struct Caps Caps;
+struct Caps
+{
+    struct MemBank *mem;
+    struct KConfig const *cfg;
+    struct KDBManager *kdb;
+    struct VDBManager *vdb;
+    struct Tool const *tool;
+};
+
+
+/* Init
+ *  initialize a local block from another
+ */
+void CapsInit ( Caps *caps, const ctx_t *ctx );
+
+
+/* Whack
+ *  release references
+ */
+void CapsWhack ( Caps *self, const ctx_t *ctx );
+
+#endif
diff --git a/tools/sra-sort/capture-first-half-aligned.c b/tools/sra-sort/capture-first-half-aligned.c
new file mode 100644
index 0000000..73cd829
--- /dev/null
+++ b/tools/sra-sort/capture-first-half-aligned.c
@@ -0,0 +1,192 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct CaptureFirstHalfAlignedColWriter CaptureFirstHalfAlignedColWriter;
+#define COLWRITER_IMPL CaptureFirstHalfAlignedColWriter
+
+#include "csra-pair.h"
+#include "col-pair.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+#include "sra-sort.h"
+
+#include <klib/rc.h>
+
+FILE_ENTRY ( capture-first-half-aligned );
+
+
+/*--------------------------------------------------------------------------
+ * CaptureFirstHalfAlignedColWriter
+ */
+struct CaptureFirstHalfAlignedColWriter
+{
+    ColumnWriter dad;
+
+    int64_t row_id;
+    cSRAPair *csra;
+    ColumnWriter *writer;
+};
+
+static
+void CaptureFirstHalfAlignedColWriterWhack ( CaptureFirstHalfAlignedColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    ColumnWriterRelease ( self -> writer, ctx );
+    self -> csra = NULL;
+    self -> writer = NULL;
+    MemFree ( ctx, self, sizeof * self );
+}
+
+static
+const char *CaptureFirstHalfAlignedColWriterFullSpec ( const CaptureFirstHalfAlignedColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    return ColumnWriterFullSpec ( self -> writer, ctx );
+}
+
+static
+void CaptureFirstHalfAlignedColWriterPreCopy ( CaptureFirstHalfAlignedColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    ColumnWriterPreCopy ( self -> writer, ctx );
+}
+
+static
+void CaptureFirstHalfAlignedColWriterPostCopy ( CaptureFirstHalfAlignedColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    ColumnWriterPostCopy ( self -> writer, ctx );
+}
+
+static
+void CaptureFirstHalfAlignedColWriterWrite ( CaptureFirstHalfAlignedColWriter *self, const ctx_t *ctx,
+    uint32_t elem_bits, const void *data, uint32_t boff, uint32_t row_len )
+{
+    FUNC_ENTRY ( ctx );
+
+    cSRAPair *csra = self -> csra;
+    if ( csra -> first_half_aligned_spot == 0 )
+    {
+        uint32_t i;
+        const int64_t *row = data;
+
+        for ( i = 0; i < row_len; ++ i )
+        {
+            if ( row [ i ] == 0 )
+            {
+                csra -> first_half_aligned_spot = self -> row_id;
+                break;
+            }
+        }
+    }
+
+    TRY ( ColumnWriterWrite ( self -> writer, ctx, elem_bits, data, boff, row_len ) )
+    {
+        ++ self -> row_id;
+    }
+}
+
+static
+void CaptureFirstHalfAlignedColWriterWriteStatic ( CaptureFirstHalfAlignedColWriter *self, const ctx_t *ctx,
+    uint32_t elem_bits, const void *data, uint32_t boff, uint32_t row_len, uint64_t count )
+{
+    FUNC_ENTRY ( ctx );
+
+    cSRAPair *csra = self -> csra;
+    if ( csra -> first_half_aligned_spot == 0 )
+    {
+        uint32_t i;
+        const int64_t *row = data;
+
+        for ( i = 0; i < row_len; ++ i )
+        {
+            if ( row [ i ] == 0 )
+            {
+                csra -> first_half_aligned_spot = self -> row_id;
+                break;
+            }
+        }
+    }
+
+    TRY ( ColumnWriterWriteStatic ( self -> writer, ctx, elem_bits, data, boff, row_len, count ) )
+    {
+        self -> row_id += count;
+    }
+}
+
+static
+void CaptureFirstHalfAlignedColWriterCommit ( CaptureFirstHalfAlignedColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    ColumnWriterCommit ( self -> writer, ctx );
+}
+
+static ColumnWriter_vt CaptureFirstHalfAlignedColWriter_vt =
+{
+    CaptureFirstHalfAlignedColWriterWhack,
+    CaptureFirstHalfAlignedColWriterFullSpec,
+    CaptureFirstHalfAlignedColWriterPreCopy,
+    CaptureFirstHalfAlignedColWriterPostCopy,
+    CaptureFirstHalfAlignedColWriterWrite,
+    CaptureFirstHalfAlignedColWriterWriteStatic,
+    CaptureFirstHalfAlignedColWriterCommit
+};
+
+/*--------------------------------------------------------------------------
+ * cSRAPair
+ */
+
+/* MakeFirstHalfAlignedRowIdCaptureWriter
+ *  a simple monitor on SEQUENCE.PRIMARY_ALIGNMENT_ID looking for
+ *  half-aligned spots and capturing the first occurrence.
+ */
+ColumnWriter *cSRAPairMakeFirstHalfAlignedRowIdCaptureWriter ( cSRAPair *self,
+    const ctx_t *ctx, ColumnWriter *writer )
+{
+    FUNC_ENTRY ( ctx );
+
+    CaptureFirstHalfAlignedColWriter *mon;
+
+    TRY ( mon = MemAlloc ( ctx, sizeof * mon, false ) )
+    {
+        TRY ( ColumnWriterInit ( & mon -> dad, ctx, & CaptureFirstHalfAlignedColWriter_vt, false ) )
+        {
+            mon -> row_id = 1;
+            mon -> csra = self;
+            TRY ( mon -> writer = ColumnWriterDuplicate ( writer, ctx ) )
+            {
+                return & mon -> dad;
+            }
+        }
+
+        MemFree ( ctx, mon, sizeof * mon );
+    }
+
+    return NULL;
+}
diff --git a/tools/sra-sort/col-pair.c b/tools/sra-sort/col-pair.c
new file mode 100644
index 0000000..4394bff
--- /dev/null
+++ b/tools/sra-sort/col-pair.c
@@ -0,0 +1,818 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct SimpleColumnReader SimpleColumnReader;
+#define COLREADER_IMPL SimpleColumnReader
+
+typedef struct SimpleColumnWriter SimpleColumnWriter;
+#define COLWRITER_IMPL SimpleColumnWriter
+
+#include "col-pair.h"
+#include "tbl-pair.h"
+#include "row-set.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+
+#include <vdb/cursor.h>
+#include <vdb/vdb-priv.h>
+#include <kapp/main.h>
+#include <kfs/defs.h>
+#include <klib/printf.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+
+#include <string.h>
+
+FILE_ENTRY ( col-pair );
+
+
+/*--------------------------------------------------------------------------
+ * SimpleColumnReader
+ *  implementation of ColumnReader based upon VCursor direct read
+ */
+struct SimpleColumnReader
+{
+    ColumnReader dad;
+
+    const VCursor *curs;
+    uint32_t idx;
+
+    uint32_t full_spec_size;
+    char full_spec [ 1 ];
+};
+
+
+/* Whack
+ */
+static
+void SimpleColumnReaderWhack ( SimpleColumnReader *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    size_t bytes = sizeof * self + self -> full_spec_size;
+
+    rc = VCursorRelease ( self -> curs );
+    if ( rc != 0 )
+        WARN ( "VCursorRelease failed on '%s'", self -> full_spec );
+
+    self -> curs = NULL;
+    MemFree ( ctx, self, bytes );
+}
+
+/* FullSpec
+ */
+static
+const char *SimpleColumnReaderFullSpec ( const SimpleColumnReader *self, const ctx_t *ctx )
+{
+    return self -> full_spec;
+}
+
+
+/* IdRange
+ *  returns the number of ids available
+ *  and optionally the first id
+ */
+static
+uint64_t SimpleColumnReaderIdRange ( const SimpleColumnReader *self,
+    const ctx_t *ctx, int64_t *opt_first )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    uint64_t count;
+
+    rc = VCursorIdRange ( self -> curs, self -> idx, opt_first, & count );
+    if ( rc != 0 )
+        INTERNAL_ERROR ( rc, "VCursorIdRange failed for column '%s'", self -> full_spec );
+
+    return count;
+}
+
+
+/* DummyStub
+ *  useful for pre/post-copy
+ */
+static
+void SimpleColumnReaderDummyStub ( SimpleColumnReader *self, const ctx_t *ctx )
+{
+}
+
+
+/* Read
+ *  read next row of data
+ *  returns NULL if no rows are available
+ */
+static
+const void *SimpleColumnReaderRead ( SimpleColumnReader *self, const ctx_t *ctx,
+    int64_t row_id, uint32_t *elem_bits, uint32_t *boff, uint32_t *row_len )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    const void *base;
+
+    rc = VCursorCellDataDirect ( self -> curs, row_id, self -> idx, elem_bits, & base, boff, row_len );
+    if ( rc != 0 )
+        INTERNAL_ERROR ( rc, "VCursorCellDataDirect ( %ld ) failed for column '%s'", row_id, self -> full_spec );
+
+    return base;
+}
+
+static ColumnReader_vt SimpleColumnReader_vt =
+{
+    SimpleColumnReaderWhack,
+    SimpleColumnReaderFullSpec,
+    SimpleColumnReaderIdRange,
+    SimpleColumnReaderDummyStub,
+    SimpleColumnReaderDummyStub,
+    SimpleColumnReaderRead
+};
+
+
+/*--------------------------------------------------------------------------
+ * ColumnReader
+ *  interface to read column in serial order
+ */
+
+
+/* MakeColumnReader
+ *  make simple column reader
+ */
+ColumnReader *TablePairMakeColumnReader ( TablePair *self, const ctx_t *ctx,
+    const VCursor *opt_curs, const char *colspec, bool required )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    const VCursor *curs;
+
+    if ( opt_curs != NULL )
+        rc = VCursorAddRef ( curs = opt_curs );
+    else
+        rc = VTableCreateCursorRead ( self -> stbl, & curs );
+    if ( rc != 0 )
+        ERROR ( rc, "failed to create cursor on column 'src.%s.%s'", self -> full_spec, colspec );
+    else
+    {
+        uint32_t idx;
+        rc = VCursorAddColumn ( curs, & idx, "%s", colspec );
+        if ( rc != 0 && GetRCState ( rc ) != rcExists )
+        {
+            if ( required )
+                ERROR ( rc, "failed to add column 'src.%s.%s' to cursor", self -> full_spec, colspec );
+        }
+        else
+        {
+            rc = VCursorOpen ( curs );
+            if ( rc != 0 )
+            {
+                if ( required )
+                    ERROR ( rc, "failed to open cursor on column 'src.%s.%s'", self -> full_spec, colspec );
+            }
+            else
+            {
+                SimpleColumnReader *col;
+                size_t full_spec_size = self -> full_spec_size + string_size ( colspec ) + sizeof "src.." - 1;
+
+                TRY ( col = MemAlloc ( ctx, sizeof * col + full_spec_size, false ) )
+                {
+                    ColumnReaderInit ( & col -> dad, ctx, & SimpleColumnReader_vt );
+                    col -> curs = curs;
+                    col -> idx = idx;
+                    col -> full_spec_size = ( uint32_t ) full_spec_size;
+
+                    rc = string_printf ( col -> full_spec, full_spec_size + 1, NULL,
+                        "src.%s.%s", self -> full_spec, colspec );
+                    if ( rc == 0 )
+                        return & col -> dad;
+
+                    ABORT ( rc, "miscalculated string size" );
+                }
+                CATCH_ALL ()
+                {
+                    ANNOTATE ( "failed to allocate %zu bytes for SimpleColumnReader", sizeof * col + full_spec_size );
+                }
+            }
+        }
+
+        VCursorRelease ( curs );
+    }
+
+    return NULL;
+}
+
+
+/* Release
+ *  releases reference
+ */
+void ColumnReaderRelease ( const ColumnReader *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountDrop ( & self -> refcount, "ColumnReader" ) )
+        {
+        case krefOkay:
+            break;
+        case krefWhack:
+            ( * self -> vt -> whack ) ( ( void* ) self, ctx );
+            break;
+        case krefZero:
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcCursor, rcDestroying, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to release ColumnReader" );
+        }
+    }
+}
+
+/* Duplicate
+ */
+ColumnReader *ColumnReaderDuplicate ( const ColumnReader *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountAdd ( & self -> refcount, "ColumnReader" ) )
+        {
+        case krefOkay:
+        case krefWhack:
+        case krefZero:
+            break;
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcCursor, rcAttaching, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to duplicate ColumnReader" );
+            return NULL;
+        }
+    }
+
+    return ( ColumnReader* ) self;
+}
+
+
+/* Init
+ */
+void ColumnReaderInit ( ColumnReader *self, const ctx_t *ctx, const ColumnReader_vt *vt )
+{
+    if ( self == NULL )
+    {
+        rc_t rc = RC ( rcExe, rcCursor, rcConstructing, rcSelf, rcNull );
+        INTERNAL_ERROR ( rc, "bad ColumnReader" );
+    }
+    else
+    {
+        self -> vt = vt;
+        KRefcountInit ( & self -> refcount, 1, "ColumnReader", "init", "" );
+        self -> presorted = false;
+        memset ( self -> align, 0, sizeof self -> align );
+    }
+}
+
+
+/*--------------------------------------------------------------------------
+ * SimpleColumnWriter
+ *  implementation of ColumnWriter based upon VCursor
+ */
+struct SimpleColumnWriter
+{
+    ColumnWriter dad;
+
+    VCursor *curs;
+    uint32_t idx;
+
+    uint32_t full_spec_size;
+    char full_spec [ 1 ];
+};
+
+static
+void SimpleColumnWriterWhack ( SimpleColumnWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    rc = VCursorRelease ( self -> curs );
+    if ( rc != 0 )
+        ERROR ( rc, "VCursorRelease failed on column '%s'", self -> full_spec );
+
+    MemFree ( ctx, self, sizeof * self + self -> full_spec_size );
+}
+
+
+static
+const char *SimpleColumnWriterFullSpec ( const SimpleColumnWriter *self, const ctx_t *ctx )
+{
+    return self -> full_spec;
+}
+
+static
+void SimpleColumnWriterDummyStub ( SimpleColumnWriter *self, const ctx_t *ctx )
+{
+}
+
+static
+void SimpleColumnWriterWrite ( SimpleColumnWriter *self, const ctx_t *ctx,
+    uint32_t elem_bits, const void *data, uint32_t boff, uint32_t row_len )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    rc = VCursorOpenRow ( self -> curs );
+    if ( rc != 0 )
+        INTERNAL_ERROR ( rc, "VCursorOpenRow failed on column '%s'", self -> full_spec );
+    else
+    {
+        rc = VCursorWrite ( self -> curs, self -> idx, elem_bits, data, boff, row_len );
+        if ( rc != 0 )
+            SYSTEM_ERROR ( rc, "VCursorWrite failed for column '%s'", self -> full_spec );
+        else
+        {
+            rc = VCursorCommitRow ( self -> curs );
+            if ( rc != 0 )
+                SYSTEM_ERROR ( rc, "VCursorCommit failed for column '%s'", self -> full_spec );
+        }
+
+        rc = VCursorCloseRow ( self -> curs );
+        if ( rc != 0 )
+            INTERNAL_ERROR ( rc, "VCursorCloseRow failed on column '%s'", self -> full_spec );
+    }
+}
+
+static
+void SimpleColumnWriterWriteStatic ( SimpleColumnWriter *self, const ctx_t *ctx,
+    uint32_t elem_bits, const void *data, uint32_t boff, uint32_t row_len, uint64_t count )
+{
+    FUNC_ENTRY ( ctx );
+
+    for ( ; ! FAILED () && count > 0; -- count )
+    {
+        rc_t rc = VCursorOpenRow ( self -> curs );
+        if ( rc != 0 )
+            INTERNAL_ERROR ( rc, "VCursorOpenRow failed on column '%s'", self -> full_spec );
+        else
+        {
+            rc = VCursorWrite ( self -> curs, self -> idx, elem_bits, data, boff, row_len );
+            if ( rc != 0 )
+                SYSTEM_ERROR ( rc, "VCursorWrite failed for column '%s'", self -> full_spec );
+            else
+            {
+                rc = VCursorCommitRow ( self -> curs );
+                if ( rc != 0 )
+                    SYSTEM_ERROR ( rc, "VCursorCommitRow failed for column '%s'", self -> full_spec );
+                else if ( count > 1 )
+                {
+                    /* setting it small since threshold is detected in CommitRow, but execused on CloseRow */
+                    uint64_t cnt = ( count < 0x10000000U ) ? count : 0x10000000U; 
+                    rc = VCursorRepeatRow ( self -> curs, cnt - 1 );
+                    if ( rc != 0 )
+                        SYSTEM_ERROR ( rc, "VCursorRepeatRow failed for column '%s'", self -> full_spec );
+                    else
+                        count -= cnt - 1;
+                }
+            }
+
+            rc = VCursorCloseRow ( self -> curs );
+            if ( rc != 0 )
+                INTERNAL_ERROR ( rc, "VCursorCloseRow failed on column '%s'", self -> full_spec );
+        }
+    }
+}
+
+static
+void SimpleColumnWriterCommit ( SimpleColumnWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    rc = VCursorCommit ( self -> curs );
+    if ( rc != 0 )
+        ERROR ( rc, "VCursorCommit failed on column '%s'", self -> full_spec );
+    else
+    {
+        rc = VCursorRelease ( self -> curs );
+        if ( rc != 0 )
+            ERROR ( rc, "VCursorRelease failed on column '%s'", self -> full_spec );
+        else
+        {
+            self -> curs = NULL;
+        }
+    }
+}
+
+
+static ColumnWriter_vt SimpleColumnWriter_vt =
+{
+    SimpleColumnWriterWhack,
+    SimpleColumnWriterFullSpec,
+    SimpleColumnWriterDummyStub,
+    SimpleColumnWriterDummyStub,
+    SimpleColumnWriterWrite,
+    SimpleColumnWriterWriteStatic,
+    SimpleColumnWriterCommit
+};
+
+
+
+/*--------------------------------------------------------------------------
+ * ColumnWriter
+ *  interface to write column in serial order
+ */
+
+
+/* MakeColumnWriter
+ *  make simple column writer
+ */
+ColumnWriter *TablePairMakeColumnWriter ( TablePair *self, const ctx_t *ctx,
+   VCursor *opt_curs, const char *colspec )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    VCursor *curs;
+
+    if ( opt_curs != NULL )
+        rc = VCursorAddRef ( curs = opt_curs );
+    else
+        rc = VTableCreateCursorWrite ( self -> dtbl, & curs, kcmInsert );
+    if ( rc != 0 )
+        ERROR ( rc, "failed to create cursor on column 'dst.%s.%s'", self -> full_spec, colspec );
+    else
+    {
+        uint32_t idx;
+        rc = VCursorAddColumn ( curs, & idx, "%s", colspec );
+        if ( rc != 0 )
+            ERROR ( rc, "failed to add column 'dst.%s.%s' to cursor", self -> full_spec, colspec );
+        else
+        {
+            VCursorSuspendTriggers ( curs );
+
+            rc = VCursorOpen ( curs );
+            if ( rc != 0 )
+                ERROR ( rc, "failed to open cursor on column 'dst.%s.%s'", self -> full_spec, colspec );
+            else
+            {
+                SimpleColumnWriter *col;
+                size_t full_spec_size = self -> full_spec_size + string_size ( colspec ) + sizeof "dst.." - 1;
+
+                TRY ( col = MemAlloc ( ctx, sizeof * col + full_spec_size, false ) )
+                {
+                    ColumnWriterInit ( & col -> dad, ctx, & SimpleColumnWriter_vt, false );
+                    col -> curs = curs;
+                    col -> idx = idx;
+
+                    col -> full_spec_size = ( uint32_t ) full_spec_size;
+                    rc = string_printf ( col -> full_spec, full_spec_size + 1, NULL,
+                        "dst.%s.%s", self -> full_spec, colspec );
+                    if ( rc == 0 )
+                        return & col -> dad;
+
+                    ABORT ( rc, "miscalculated string size" );
+                }
+                CATCH_ALL ()
+                {
+                    ANNOTATE ( "failed to allocate %zu bytes for SimpleColumnWriter", sizeof * col + full_spec_size );
+                }
+            }
+        }
+
+        VCursorRelease ( curs );
+    }
+
+    return NULL;
+}
+
+
+/* Release
+ *  releases reference
+ */
+void ColumnWriterRelease ( ColumnWriter *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountDrop ( & self -> refcount, "ColumnWriter" ) )
+        {
+        case krefOkay:
+            break;
+        case krefWhack:
+            ( * self -> vt -> whack ) ( ( void* ) self, ctx );
+            break;
+        case krefZero:
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcCursor, rcDestroying, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to release ColumnWriter" );
+        }
+    }
+}
+
+/* Duplicate
+ */
+ColumnWriter *ColumnWriterDuplicate ( const ColumnWriter *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountAdd ( & self -> refcount, "ColumnWriter" ) )
+        {
+        case krefOkay:
+        case krefWhack:
+        case krefZero:
+            break;
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcCursor, rcAttaching, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to duplicate ColumnWriter" );
+            return NULL;
+        }
+    }
+
+    return ( ColumnWriter* ) self;
+}
+
+
+/* Init
+ */
+void ColumnWriterInit ( ColumnWriter *self, const ctx_t *ctx, const ColumnWriter_vt *vt, bool mapped )
+{
+    if ( self == NULL )
+    {
+        rc_t rc = RC ( rcExe, rcCursor, rcConstructing, rcSelf, rcNull );
+        INTERNAL_ERROR ( rc, "bad ColumnWriter" );
+    }
+    else
+    {
+        self -> vt = vt;
+        KRefcountInit ( & self -> refcount, 1, "ColumnWriter", "init", "" );
+        self -> mapped = mapped;
+        memset ( self -> align, 0, sizeof self -> align );
+    }
+}
+
+
+
+/*--------------------------------------------------------------------------
+ * ColumnPair
+ *  interface to pairing of source and destination columns
+ */
+
+/* Whack
+ */
+static
+void ColumnPairWhack ( ColumnPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    ColumnReaderRelease ( self -> reader, ctx );
+    ColumnWriterRelease ( self -> writer, ctx );
+    MemFree ( ctx, self, sizeof * self + self -> full_spec_size );
+}
+
+/* MakeColumnPair
+ *  make a simple ColumnPair
+ *  takes an optional source VCursor
+ *  and a colspec
+ */
+ColumnPair *TablePairMakeColumnPair ( TablePair *self, const ctx_t *ctx,
+    ColumnReader *reader, ColumnWriter *writer, const char *colspec, bool large )
+{
+    FUNC_ENTRY ( ctx );
+
+    ColumnPair *col;
+    size_t full_spec_size = self -> full_spec_size + string_size ( colspec ) + 1;
+
+    TRY ( col = MemAlloc ( ctx, sizeof * col + full_spec_size, false ) )
+    {
+        TRY ( col -> reader = ColumnReaderDuplicate ( reader, ctx ) )
+        {
+            TRY ( col -> writer = ColumnWriterDuplicate ( writer, ctx ) )
+            {
+                rc_t rc;
+
+                col -> full_spec_size = full_spec_size;
+                KRefcountInit ( & col -> refcount, 1, "ColumnPair", "make", colspec );
+                col -> is_static = false;
+                col -> is_mapped = writer -> mapped;
+                col -> presorted = reader -> presorted;
+                col -> large = large;
+
+                rc = string_printf ( col -> full_spec, full_spec_size + 1, NULL,
+                    "%s.%s", self -> full_spec, colspec );
+                if ( rc == 0 )
+                {
+                    col -> colspec = & col -> full_spec [ self -> full_spec_size + 1 ];
+                    return col;
+                }
+
+                ABORT ( rc, "miscalculated string size" );
+            }
+
+            ColumnReaderRelease ( col -> reader, ctx );
+        }
+
+        MemFree ( ctx, col, sizeof * col + full_spec_size );
+    }
+
+    return NULL;
+}
+
+ColumnPair *TablePairMakeStaticColumnPair ( TablePair *self, const ctx_t *ctx,
+    ColumnReader *reader, ColumnWriter *writer, const char *colspec )
+{
+    FUNC_ENTRY ( ctx );
+
+    ColumnPair *col;
+
+    TRY ( col = TablePairMakeColumnPair ( self, ctx, reader, writer, colspec, false ) )
+    {
+        if ( col != NULL )
+            col -> is_static = true;
+    }
+
+    return col;
+}
+
+
+/* Release
+ *  called by table at end of copy
+ */
+void ColumnPairRelease ( ColumnPair *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountDrop ( & self -> refcount, "ColumnPair" ) )
+        {
+        case krefOkay:
+            break;
+        case krefWhack:
+            ColumnPairWhack ( self, ctx );
+            break;
+        case krefZero:
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcColumn, rcDestroying, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to release ColumnPair" );
+        }
+    }
+}
+
+/* Duplicate
+ */
+ColumnPair *ColumnPairDuplicate ( const ColumnPair *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountAdd ( & self -> refcount, "ColumnPair" ) )
+        {
+        case krefOkay:
+        case krefWhack:
+        case krefZero:
+            break;
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcColumn, rcAttaching, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to duplicate ColumnPair" );
+            return NULL;
+        }
+    }
+
+    return ( ColumnPair* ) self;
+}
+
+
+/* PreCopy
+ * PostCopy
+ */
+void ColumnPairPreCopy ( const ColumnPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    ColumnReaderPreCopy ( self -> reader, ctx );
+    ColumnWriterPreCopy ( self -> writer, ctx );
+}
+
+void ColumnPairPostCopy ( const ColumnPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    ColumnReaderPostCopy ( self -> reader, ctx );
+    ColumnWriterPostCopy ( self -> writer, ctx );
+}
+
+
+/* Copy
+ *  copy from source to destination column
+ */
+void ColumnPairCopy ( ColumnPair *self, const ctx_t *ctx, RowSet *rs )
+{
+    FUNC_ENTRY ( ctx );
+
+    STATUS ( 3, "copying column '%s'", self -> full_spec );
+
+    TRY ( RowSetReset ( rs, ctx, self -> is_static ) )
+    {
+        TRY ( ColumnPairPreCopy ( self, ctx ) )
+        {
+            while ( ! FAILED () )
+            {
+                rc_t rc;
+                size_t i, count;
+                int64_t row_ids [ 8 * 1024 ];
+
+                ON_FAIL ( count = RowSetNext ( rs, ctx, row_ids, sizeof row_ids / sizeof row_ids [ 0 ] ) )
+                    break;
+                if ( count == 0 )
+                    break;
+
+                rc = Quitting ();
+                if ( rc != 0 )
+                {
+                    INFO_ERROR ( rc, "quitting" );
+                    break;
+                }
+
+                for ( i = 0; ! FAILED () && i < count; ++ i )
+                {
+                    const void *base;
+                    uint32_t elem_bits, boff, row_len;
+                    
+                    TRY ( base = ColumnReaderRead ( self -> reader, ctx, row_ids [ i ], & elem_bits, & boff, & row_len ) )
+                    {
+                        ColumnWriterWrite ( self -> writer, ctx, elem_bits, base, boff, row_len );
+                    }
+                }
+            }
+
+            ColumnPairPostCopy ( self, ctx );
+        }
+    }
+}
+
+
+/* CopyStatic
+ *  copy static column from source to destination
+ */
+void ColumnPairCopyStatic ( ColumnPair *self, const ctx_t *ctx, int64_t first_id, uint64_t count )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    const void *base;
+    uint32_t elem_bits, boff, row_len;
+
+    if ( ! self -> is_static )
+    {
+        rc = RC ( rcExe, rcColumn, rcCopying, rcType, rcIncorrect );
+        INTERNAL_ERROR ( rc, "'%s' IS NOT A STATIC COLUMN", self -> full_spec );
+        return;
+    }
+
+    STATUS ( 3, "copying static column '%s'", self -> full_spec );
+                    
+    TRY ( base = ColumnReaderRead ( self -> reader, ctx, first_id, & elem_bits, & boff, & row_len ) )
+    {
+        ColumnWriterWriteStatic ( self -> writer, ctx, elem_bits, base, boff, row_len, count );
+    }
+}
diff --git a/tools/sra-sort/col-pair.h b/tools/sra-sort/col-pair.h
new file mode 100644
index 0000000..b14df08
--- /dev/null
+++ b/tools/sra-sort/col-pair.h
@@ -0,0 +1,323 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_col_pair_
+#define _h_sra_sort_col_pair_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+#ifndef _h_klib_refcount_
+#include <klib/refcount.h>
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct VCursor;
+struct TablePair;
+struct RowSet;
+
+
+/*--------------------------------------------------------------------------
+ * ColumnReader
+ *  interface to read column in random order
+ */
+typedef struct ColumnReader_vt ColumnReader_vt;
+
+typedef struct ColumnReader ColumnReader;
+struct ColumnReader
+{
+    const ColumnReader_vt *vt;
+    KRefcount refcount;
+    bool presorted;
+    uint8_t align [ 3 ];
+};
+
+#ifndef COLREADER_IMPL
+#define COLREADER_IMPL ColumnReader
+#endif
+
+struct ColumnReader_vt
+{
+    /* called by Release */
+    void ( * whack ) ( COLREADER_IMPL *self, const ctx_t *ctx );
+
+    /* full spec */
+    const char* ( * full_spec ) ( const COLREADER_IMPL *self, const ctx_t *ctx );
+
+    /* id-range */
+    uint64_t ( * id_range ) ( const COLREADER_IMPL *self, const ctx_t *ctx, int64_t *opt_first );
+
+    /* pre-post copy handlers */
+    void ( * pre_copy ) ( COLREADER_IMPL *self, const ctx_t *ctx );
+    void ( * post_copy ) ( COLREADER_IMPL *self, const ctx_t *ctx );
+
+    /* retrieve next source row */
+    const void* ( * read ) ( COLREADER_IMPL *self, const ctx_t *ctx,
+        int64_t row_id, uint32_t *elem_bits, uint32_t *boff, uint32_t *row_len );
+};
+
+
+/* MakeColumnReader
+ *  make simple column reader
+ */
+ColumnReader *TablePairMakeColumnReader ( struct TablePair *self, const ctx_t *ctx,
+    struct VCursor const *opt_curs, const char *colspec, bool required );
+
+
+/* Release
+ *  releases reference
+ */
+void ColumnReaderRelease ( const ColumnReader *self, const ctx_t *ctx );
+
+/* Duplicate
+ */
+ColumnReader *ColumnReaderDuplicate ( const ColumnReader *self, const ctx_t *ctx );
+
+
+/* FullSpec
+ *  returns 'src.<tbl>.<colspec>'
+ */
+#define ColumnReaderFullSpec( self, ctx ) \
+    POLY_DISPATCH_PTR ( full_spec, self, const COLREADER_IMPL, ctx )
+
+
+/* IdRange
+ *  returns the number of ids available
+ *  and optionally the first id
+ */
+#define ColumnReaderIdRange( self, ctx, opt_first ) \
+    POLY_DISPATCH_INT ( id_range, self, const COLREADER_IMPL, ctx, opt_first )
+
+
+/* PreCopy
+ * PostCopy
+ *  handlers for any operations
+ */
+#define ColumnReaderPreCopy( self, ctx ) \
+    POLY_DISPATCH_VOID ( pre_copy, self, COLREADER_IMPL, ctx )
+#define ColumnReaderPostCopy( self, ctx ) \
+    POLY_DISPATCH_VOID ( post_copy, self, COLREADER_IMPL, ctx )
+
+
+/* Read
+ *  read next row of data
+ *  returns NULL if no rows are available
+ */
+#define ColumnReaderRead( self, ctx, row_id, elem_bits, boff, row_len )  \
+    POLY_DISPATCH_PTR ( read, self, COLREADER_IMPL, ctx, row_id, elem_bits, boff, row_len )
+
+
+/* Init
+ */
+void ColumnReaderInit ( ColumnReader *self, const ctx_t *ctx, const ColumnReader_vt *vt );
+
+/* Destroy
+ */
+#define ColumnReaderDestroy( self, ctx ) \
+    ( ( void ) 0 )
+
+
+/*--------------------------------------------------------------------------
+ * ColumnWriter
+ *  interface to write column in serial order
+ */
+typedef struct ColumnWriter_vt ColumnWriter_vt;
+
+typedef struct ColumnWriter ColumnWriter;
+struct ColumnWriter
+{
+    const ColumnWriter_vt *vt;
+    KRefcount refcount;
+    bool mapped;
+    uint8_t align [ 3 ];
+};
+
+#ifndef COLWRITER_IMPL
+#define COLWRITER_IMPL ColumnWriter
+#endif
+
+struct ColumnWriter_vt
+{
+    /* called by Release */
+    void ( * whack ) ( COLWRITER_IMPL *self, const ctx_t *ctx );
+
+    /* full spec */
+    const char* ( * full_spec ) ( const COLWRITER_IMPL *self, const ctx_t *ctx );
+
+    /* pre-post copy handlers */
+    void ( * pre_copy ) ( COLWRITER_IMPL *self, const ctx_t *ctx );
+    void ( * post_copy ) ( COLWRITER_IMPL *self, const ctx_t *ctx );
+
+    /* write row to destination */
+    void ( * write ) ( COLWRITER_IMPL *self, const ctx_t *ctx,
+        uint32_t elem_bits, const void *data, uint32_t boff, uint32_t row_len );
+    void ( * write_static ) ( COLWRITER_IMPL *self, const ctx_t *ctx,
+        uint32_t elem_bits, const void *data, uint32_t boff, uint32_t row_len, uint64_t count );
+
+    /* commit all writes */
+    void ( * commit ) ( COLWRITER_IMPL *self, const ctx_t *ctx );
+};
+
+
+/* MakeColumnWriter
+ *  make simple column writer
+ */
+ColumnWriter *TablePairMakeColumnWriter ( struct TablePair *self, const ctx_t *ctx,
+    struct VCursor *opt_curs, const char *colspec );
+
+
+/* Release
+ *  releases reference
+ */
+void ColumnWriterRelease ( ColumnWriter *self, const ctx_t *ctx );
+
+/* Duplicate
+ */
+ColumnWriter *ColumnWriterDuplicate ( const ColumnWriter *self, const ctx_t *ctx );
+
+
+/* FullSpec
+ *  returns 'dst.<tbl>.<colspec>'
+ */
+#define ColumnWriterFullSpec( self, ctx ) \
+    POLY_DISPATCH_PTR ( full_spec, self, const COLWRITER_IMPL, ctx )
+
+
+/* PreCopy
+ * PostCopy
+ *  handlers for any operations
+ */
+#define ColumnWriterPreCopy( self, ctx ) \
+    POLY_DISPATCH_VOID ( pre_copy, self, COLWRITER_IMPL, ctx )
+#define ColumnWriterPostCopy( self, ctx ) \
+    POLY_DISPATCH_VOID ( post_copy, self, COLWRITER_IMPL, ctx )
+
+
+/* Write
+ *  write a row of data
+ */
+#define ColumnWriterWrite( self, ctx, elem_bits, data, boff, row_len ) \
+    POLY_DISPATCH_VOID ( write, self, COLWRITER_IMPL, ctx, elem_bits, data, boff, row_len )
+
+/* WriteStatic
+ *  writes a repeated row
+ */
+#define ColumnWriterWriteStatic( self, ctx, elem_bits, data, boff, row_len, count ) \
+    POLY_DISPATCH_VOID ( write_static, self, COLWRITER_IMPL, ctx, elem_bits, data, boff, row_len, count )
+
+
+/* Commit
+ *  commits all writes
+ */
+#define ColumnWriterCommit( self, ctx ) \
+    POLY_DISPATCH_VOID ( commit, self, COLWRITER_IMPL, ctx )
+
+
+/* Init
+ */
+void ColumnWriterInit ( ColumnWriter *self, const ctx_t *ctx,
+    const ColumnWriter_vt *vt, bool mapped );
+
+/* Destroy
+ */
+#define ColumnWriterDestroy( self, ctx ) \
+    ( ( void ) 0 )
+
+
+/*--------------------------------------------------------------------------
+ * ColumnPair
+ *  interface to pairing of source and destination columns
+ */
+typedef struct ColumnPair ColumnPair;
+struct ColumnPair
+{
+    ColumnReader *reader;
+    ColumnWriter *writer;
+
+    const char *colspec;
+
+    size_t full_spec_size;
+
+    KRefcount refcount;
+
+    bool is_static;
+
+    bool is_mapped;
+
+    bool presorted;
+
+    bool large;
+
+    char full_spec [ 1 ];
+};
+
+
+/* MakeColumnPair
+ *  make a simple ColumnPair
+ *  takes an optional source VCursor
+ *  and a colspec
+ */
+ColumnPair *TablePairMakeColumnPair ( struct TablePair *self, const ctx_t *ctx,
+    ColumnReader *reader, ColumnWriter *writer, const char *colspec, bool large );
+
+ColumnPair *TablePairMakeStaticColumnPair ( struct TablePair *self, const ctx_t *ctx,
+    ColumnReader *reader, ColumnWriter *writer, const char *colspec );
+
+
+/* Release
+ *  called by table at end of copy
+ */
+void ColumnPairRelease ( ColumnPair *self, const ctx_t *ctx );
+
+/* Duplicate
+ */
+ColumnPair *ColumnPairDuplicate ( const ColumnPair *self, const ctx_t *ctx );
+
+
+/* PreCopy
+ * PostCopy
+ */
+void ColumnPairPreCopy ( const ColumnPair *self, const ctx_t *ctx );
+void ColumnPairPostCopy ( const ColumnPair *self, const ctx_t *ctx );
+
+
+/* Copy
+ *  copy from source to destination column
+ */
+void ColumnPairCopy ( ColumnPair *self, const ctx_t *ctx, struct RowSet *rs );
+
+
+/* CopyStatic
+ *  copy static column from source to destination
+ */
+void ColumnPairCopyStatic ( ColumnPair *self, const ctx_t *ctx, int64_t first_id, uint64_t count );
+
+
+#endif /* _h_sra_sort_col_pair_ */
diff --git a/tools/sra-sort/csra-pair.c b/tools/sra-sort/csra-pair.c
new file mode 100644
index 0000000..f58d9ff
--- /dev/null
+++ b/tools/sra-sort/csra-pair.c
@@ -0,0 +1,228 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+struct cSRAPair;
+#define DBPAIR_IMPL struct cSRAPair
+
+#include "csra-pair.h"
+#include "csra-tbl.h"
+#include "meta-pair.h"
+#include "dir-pair.h"
+#include "sra-sort.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+#include "map-file.h"
+
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <klib/printf.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+
+#include <string.h>
+
+
+FILE_ENTRY ( csra-pair );
+
+
+/*--------------------------------------------------------------------------
+ * cSRAPair
+ */
+
+static
+void cSRAPairWhack ( cSRAPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* destroy me */
+    MapFileRelease ( self -> seq_idx, ctx );
+    MapFileRelease ( self -> sa_idx, ctx );
+    MapFileRelease ( self -> pa_idx, ctx );
+
+    DbPairDestroy ( & self -> dad, ctx );
+
+    MemFree ( ctx, self, sizeof * self );
+}
+
+static
+TablePair *cSRAPairMakeTablePair ( cSRAPair *self, const ctx_t *ctx,
+     const char *member, const char *name, uint32_t align_idx, bool required, bool reorder,
+     TablePair* ( * make ) ( DbPair *self, const ctx_t *ctx, const VTable *src, VTable *dst, const char *name, bool reorder ) )
+{
+    FUNC_ENTRY ( ctx );
+
+    TablePair *tbl;
+
+    if ( name == NULL )
+        name = member;
+
+    TRY ( tbl = DbPairMakeTablePair ( & self -> dad, ctx, member, name, required, reorder, make ) )
+    {
+        if ( tbl != NULL )
+        {
+            TRY ( DbPairAddTablePair ( & self -> dad, ctx, tbl ) )
+            {
+                ( ( cSRATblPair* ) tbl ) -> align_idx = align_idx;
+                return tbl;
+            }
+
+            TablePairRelease ( tbl, ctx );
+        }
+    }
+
+    return NULL;
+}
+
+static
+void cSRAPairExplode ( cSRAPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    DirPair * dir;
+    TablePair * tbl;
+
+    TRY ( tbl = cSRAPairMakeTablePair ( self, ctx, "REFERENCE", NULL, 0, true, false, cSRATblPairMakeRef ) )
+    {
+        self -> reference = tbl;
+
+        TRY ( tbl = cSRAPairMakeTablePair ( self, ctx, "PRIMARY_ALIGNMENT", NULL, 1, true, true, cSRATblPairMakeAlign ) )
+        {
+            self -> prim_align = tbl;
+
+#if SEQUENCE_BEFORE_SECONDARY
+            TRY ( tbl = cSRAPairMakeTablePair ( self, ctx, NULL, "SEQUENCE", 0, false, true, cSRATblPairMakeSeq ) )
+            {
+                self -> sequence = tbl;
+#endif
+
+                TRY ( tbl = cSRAPairMakeTablePair ( self, ctx, "SECONDARY_ALIGNMENT", NULL, 2, false, true, cSRATblPairMakeAlign ) )
+                {
+                    self -> sec_align = tbl;
+
+                    TRY ( tbl = cSRAPairMakeTablePair ( self, ctx, NULL, "EVIDENCE_ALIGNMENT", 3, false, false, cSRATblPairMakeAlign ) )
+                    {
+                        self -> evidence_align = tbl;
+
+#if ! SEQUENCE_BEFORE_SECONDARY
+                        TRY ( tbl = cSRAPairMakeTablePair ( self, ctx, NULL, "SEQUENCE", 0, false, true, cSRATblPairMakeSeq ) )
+                        {
+                            self -> sequence = tbl;
+#endif
+
+                            TRY ( dir = DbPairMakeDirPair ( & self -> dad, ctx, "extra", false, DbPairMakeStdDirPair ) )
+                            {
+                                ON_FAIL ( DbPairAddDirPair ( & self -> dad, ctx, dir ) )
+                                    DirPairRelease ( dir, ctx );
+                            }
+#if ! SEQUENCE_BEFORE_SECONDARY
+                        }
+#endif
+                    }
+                }
+#if SEQUENCE_BEFORE_SECONDARY
+            }
+#endif
+        }
+    }
+}
+
+static
+const char *cSRAPairGetTblMember ( const cSRAPair *self, const ctx_t *ctx, const VTable *src, const char *name )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* special kludge for "SEQUENCE" table */
+    if ( strcmp ( name, "SEQUENCE" ) == 0 )
+    {
+        /* determine whether table has CMP_CSREAD */
+        rc_t rc;
+        const VCursor *curs;
+
+        STATUS ( 4, "determining member name of SEQUENCE table" );
+
+        rc = VTableCreateCursorRead ( src, & curs );
+        if ( rc != 0 )
+            ERROR ( rc, "VTableOpenCursorRead failed on '%s.%s'", self -> dad . full_spec, name );
+        else
+        {
+            uint32_t idx;
+            rc = VCursorAddColumn ( curs, & idx, "CMP_CSREAD" );
+            if ( rc == 0 )
+            {
+                rc = VCursorOpen ( curs );
+                if ( rc == 0 )
+                    name = "CS_SEQUENCE";
+            }
+
+            VCursorRelease ( curs );
+        }
+
+        STATUS ( 4, "SEQUENCE table member name determined to be '%s'", name );
+    }
+
+    return name;
+}
+
+static DbPair_vt cSRAPair_vt =
+{
+    cSRAPairWhack,
+    cSRAPairExplode,
+    cSRAPairGetTblMember
+};
+
+DbPair *cSRAPairMake ( const ctx_t *ctx,
+    const VDatabase *src, VDatabase *dst, const char *name )
+{
+    FUNC_ENTRY ( ctx );
+
+    cSRAPair *db;
+
+    TRY ( db = MemAlloc ( ctx, sizeof * db, true ) )
+    {
+        TRY ( DbPairInit ( & db -> dad, ctx, & cSRAPair_vt, src, dst, name, NULL ) )
+        {
+            static const char *exclude_tbls [] =
+            {
+                "EVIDENCE_ALIGNMENT",
+                "PRIMARY_ALIGNMENT",
+                "REFERENCE",
+                "SECONDARY_ALIGNMENT",
+                "SEQUENCE"
+            };
+            db -> dad . exclude_tbls = exclude_tbls;
+
+            return & db -> dad;
+        }
+
+        MemFree ( ctx, db, sizeof * db );
+    }
+
+    return NULL;
+}
diff --git a/tools/sra-sort/csra-pair.h b/tools/sra-sort/csra-pair.h
new file mode 100644
index 0000000..48791d0
--- /dev/null
+++ b/tools/sra-sort/csra-pair.h
@@ -0,0 +1,87 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_csra_pair_
+#define _h_sra_sort_csra_pair_
+
+#ifndef _h_sra_sort_db_pair_
+#include "db-pair.h"
+#endif
+
+
+#define SEQUENCE_BEFORE_SECONDARY 1
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct TablePair;
+struct ColumnWriter;
+
+
+/*--------------------------------------------------------------------------
+ * cSRAPair
+ *  interface to pairing of source and destination tables
+ */
+typedef struct cSRAPair cSRAPair;
+struct cSRAPair
+{
+    DbPair dad;
+
+    /* for ultimate metadata */
+    int64_t first_half_aligned_spot;
+    int64_t first_unaligned_spot;
+
+    /* the reference table */
+    struct TablePair *reference;
+
+    /* the alignment tables */
+    struct TablePair *prim_align, *sec_align, *evidence_align;
+
+    /* the sequence table */
+    struct TablePair *sequence;
+
+    /* mapping indices */
+    struct MapFile *pa_idx, *sa_idx, *seq_idx;
+};
+
+
+/* Make
+ *  makes an object based upon open source and destination VDatabase objects
+ */
+DbPair *cSRAPairMake ( const ctx_t *ctx,
+    struct VDatabase const *src, struct VDatabase *dst, const char *name );
+
+
+/* MakeFirstHalfAlignedRowIdCaptureWriter
+ *  a simple monitor on SEQUENCE.PRIMARY_ALIGNMENT_ID looking for
+ *  half-aligned spots and capturing the first occurrence.
+ */
+struct ColumnWriter *cSRAPairMakeFirstHalfAlignedRowIdCaptureWriter ( cSRAPair *self,
+    const ctx_t *ctx, struct ColumnWriter *writer );
+
+
+#endif /* _h_sra_sort_csra_pair_ */
diff --git a/tools/sra-sort/csra-tbl.c b/tools/sra-sort/csra-tbl.c
new file mode 100644
index 0000000..5b3401a
--- /dev/null
+++ b/tools/sra-sort/csra-tbl.c
@@ -0,0 +1,798 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+struct cSRATblPair;
+#define TBLPAIR_IMPL struct cSRATblPair
+
+#include "csra-tbl.h"
+#include "csra-pair.h"
+#include "ref-alignid-col.h"
+#include "row-set.h"
+#include "id-mapper-col.h"
+#include "buff-writer.h"
+#include "poslen-col-pair.h"
+#include "meta-pair.h"
+#include "map-file.h"
+#include "xcheck.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+
+#include <vdb/table.h>
+#include <kdb/meta.h>
+#include <klib/printf.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+
+#include <string.h>
+
+
+FILE_ENTRY ( csra-tbl );
+
+
+/*--------------------------------------------------------------------------
+ * RefTblPair
+ *  generic database object pair
+ */
+
+static
+void cSRATblPairWhack ( cSRATblPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    RowSetIteratorRelease ( self -> rsi, ctx );
+    TablePairDestroy ( & self -> dad, ctx );
+    MemFree ( ctx, self, sizeof * self );
+}
+
+static
+void cSRATblPairDummyStub ( cSRATblPair *self, const ctx_t *ctx )
+{
+}
+
+
+/* REFERENCE table
+ */
+static
+ColumnPair *cSRATblPairMakePrimAlignIdColPair ( cSRATblPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    ColumnPair *col = NULL;
+    cSRAPair *csra = self -> csra;
+
+    ColumnReader *reader;
+    const char *colspec = "(I64)PRIMARY_ALIGNMENT_IDS";
+
+    TRY ( reader = TablePairMakeAlignIdReader ( & self -> dad, ctx,
+              csra -> prim_align, csra -> pa_idx, colspec ) )
+    {
+        ColumnWriter *writer;
+        TRY ( writer = TablePairMakeColumnWriter ( & self -> dad, ctx, NULL, colspec ) )
+        {
+            col = TablePairMakeColumnPair ( & self -> dad, ctx, reader, writer, colspec, false );
+                
+            ColumnWriterRelease ( writer, ctx );
+        }
+
+        ColumnReaderRelease ( reader, ctx );
+    }
+
+    return col;
+}
+
+static
+ColumnPair *cSRATblPairMakeSecAlignIdColPair ( cSRATblPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    ColumnPair *col = NULL;
+    cSRAPair *csra = self -> csra;
+
+    if ( csra -> sec_align != NULL )
+    {
+        ColumnReader *reader;
+        const char *colspec = "(I64)SECONDARY_ALIGNMENT_IDS";
+
+        TRY ( reader = TablePairMakeAlignIdReader ( & self -> dad, ctx,
+                  csra -> sec_align, csra -> sa_idx, colspec ) )
+        {
+            ColumnWriter *writer;
+            TRY ( writer = TablePairMakeColumnWriter ( & self -> dad, ctx, NULL, colspec ) )
+            {
+                col = TablePairMakeColumnPair ( & self -> dad, ctx, reader, writer, colspec, false );
+                
+                ColumnWriterRelease ( writer, ctx );
+            }
+            
+            ColumnReaderRelease ( reader, ctx );
+        }
+    }
+
+    return col;
+}
+
+static
+void cSRATblPairExplodeRef ( cSRATblPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    ColumnPair *col;
+
+    TRY ( col = cSRATblPairMakePrimAlignIdColPair ( self, ctx ) )
+    {
+        TRY ( TablePairAddColumnPair ( & self -> dad, ctx, col ) )
+        {
+            TRY ( col = cSRATblPairMakeSecAlignIdColPair ( self, ctx ) )
+            {
+                TRY ( TablePairAddColumnPair ( & self -> dad, ctx, col ) )
+                {
+                }
+                CATCH_ALL ()
+                {
+                    ColumnPairRelease ( col, ctx );
+                }
+            }
+        }
+        CATCH_ALL ()
+        {
+            ColumnPairRelease ( col, ctx );
+        }
+    }
+}
+
+static
+ColumnPair *cSRATblPairMakeColumnPairRef ( cSRATblPair *self, const ctx_t *ctx,
+    struct ColumnReader *reader, struct ColumnWriter *writer, const char *colspec, bool large )
+{
+    FUNC_ENTRY ( ctx );
+    return TablePairMakeColumnPair ( & self -> dad, ctx, reader, writer, colspec, large );
+}
+
+static
+RowSetIterator *cSRATblPairGetRowSetIteratorRef ( cSRATblPair *self, const ctx_t *ctx, bool mapping, bool large )
+{
+    FUNC_ENTRY ( ctx );
+    const bool is_paired = false;
+    assert ( mapping == false );
+    return TablePairMakeRowSetIterator ( & self -> dad, ctx, NULL, is_paired, large );
+}
+
+static TablePair_vt cSRATblPair_Ref_vt =
+{
+    cSRATblPairWhack,
+    cSRATblPairDummyStub,
+    cSRATblPairExplodeRef,
+    cSRATblPairMakeColumnPairRef,
+    cSRATblPairDummyStub,
+    cSRATblPairDummyStub,
+    cSRATblPairGetRowSetIteratorRef
+};
+
+
+
+/* *_ALIGNMENT tables
+ */
+
+static
+void cSRATblPairWhackMappingIdx ( cSRATblPair * self, const ctx_t * ctx )
+{
+    cSRAPair *csra = self -> csra;
+
+    RowSetIteratorRelease ( self -> rsi, ctx );
+    self -> rsi = NULL;
+
+    MapFileRelease ( csra -> pa_idx, ctx );
+    csra -> pa_idx = NULL;
+
+    MapFileRelease ( csra -> seq_idx, ctx );
+    csra -> seq_idx = NULL;
+}
+
+static
+ColumnPair *cSRATblPairMakeSeqSpotIdColPairPrim ( cSRATblPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    ColumnPair *col = NULL;
+    cSRAPair *csra = self -> csra;
+
+    ColumnReader *reader;
+    const char *colspec = "(I64)SEQ_SPOT_ID";
+
+    /* we expect this column to be present */
+    TRY ( reader = TablePairMakeColumnReader ( & self -> dad, ctx, NULL, colspec, true ) )
+    {
+        ColumnWriter *writer;
+        TRY ( writer = TablePairMakeColumnWriter ( & self -> dad, ctx, NULL, colspec ) )
+        {
+            ColumnWriter *mapped;
+            const bool can_assign_ids = true;
+            TRY ( mapped = TablePairMakeMapRowIdWriter ( & self -> dad, ctx, writer, csra -> seq_idx, can_assign_ids ) )
+            {
+                ColumnWriter *buffered;
+                TRY ( buffered = cSRATblPairMakeBufferedColumnWriter ( self, ctx, mapped ) )
+                {
+                    col = TablePairMakeColumnPair ( & self -> dad, ctx, reader, buffered, colspec, false );
+
+                    ColumnWriterRelease ( buffered, ctx );
+                }
+
+                ColumnWriterRelease ( mapped, ctx );
+            }
+                
+            ColumnWriterRelease ( writer, ctx );
+        }
+
+        ColumnReaderRelease ( reader, ctx );
+    }
+
+    return col;
+}
+
+static
+ColumnPair *cSRATblPairMakeSeqSpotIdColPair ( cSRATblPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    ColumnPair *col = NULL;
+    cSRAPair *csra = self -> csra;
+
+    ColumnReader *reader;
+    const char *colspec = "(I64)SEQ_SPOT_ID";
+
+    /* we expect this column to be present */
+    TRY ( reader = TablePairMakeColumnReader ( & self -> dad, ctx, NULL, colspec, true ) )
+    {
+        ColumnWriter *writer;
+        TRY ( writer = TablePairMakeColumnWriter ( & self -> dad, ctx, NULL, colspec ) )
+        {
+            ColumnWriter *buffered;
+            /* create a buffered writer with NO id-assignment capabilities. */
+            TRY ( buffered = cSRATblPairMakeBufferedIdRemapColumnWriter ( self, ctx,
+                      writer, csra -> seq_idx, false ) )
+            {
+                col = TablePairMakeColumnPair ( & self -> dad, ctx, reader, buffered, colspec, false );
+
+                ColumnWriterRelease ( buffered, ctx );
+            }
+                
+            ColumnWriterRelease ( writer, ctx );
+        }
+
+        ColumnReaderRelease ( reader, ctx );
+    }
+
+    return col;
+}
+
+static
+ColumnPair *cSRATblPairMakePoslenColPair ( cSRATblPair *self, const ctx_t *ctx, const MapFile *idx )
+{
+    FUNC_ENTRY ( ctx );
+
+    ColumnPair *col = NULL;
+
+    ColumnReader *reader;
+    const char *colspec = "(U64)GLOBAL_POSLEN";
+
+    /* we expect this column to be present */
+    TRY ( reader = TablePairMakePoslenColReader ( & self -> dad, ctx, idx, colspec ) )
+    {
+        ColumnWriter *writer;
+        TRY ( writer = TablePairMakePoslenColWriter ( & self -> dad, ctx, NULL, colspec ) )
+        {
+            col = TablePairMakeColumnPair ( & self -> dad, ctx, reader, writer, colspec, false );
+                
+            ColumnWriterRelease ( writer, ctx );
+        }
+
+        ColumnReaderRelease ( reader, ctx );
+    }
+
+    return col;
+}
+
+static
+void cSRATblPairPreExplodeAlign ( cSRATblPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    cSRAPair *csra = self -> csra;
+
+    switch ( self -> align_idx )
+    {
+    case 1:
+        csra -> pa_idx = MapFileMakeForPoslen ( ctx, csra -> prim_align -> name );
+        break;
+    case 2:
+        csra -> sa_idx = MapFileMakeForPoslen ( ctx, csra -> sec_align -> name );
+        break;
+    }
+}
+
+static
+void cSRATblPairExplodeAlign ( cSRATblPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    ColumnPair *col;
+
+    /* create special case for SEQ_SPOT_ID */
+    switch ( self -> align_idx )
+    {
+    case 1:
+        col = cSRATblPairMakeSeqSpotIdColPairPrim ( self, ctx );
+        break;
+    case 0:
+    case 2:
+    case 3:
+        col = cSRATblPairMakeSeqSpotIdColPair ( self, ctx );
+        break;
+    default:
+        ANNOTATE ( "not going to dignify with an rc - bad align_idx" );
+        return;
+    }
+
+    if ( ! FAILED () )
+    {
+        TRY ( TablePairAddColumnPair ( & self -> dad, ctx, col ) )
+        {
+            cSRAPair *csra = self -> csra;
+
+            switch ( self -> align_idx )
+            {
+            case 1:
+                col = cSRATblPairMakePoslenColPair ( self, ctx, csra -> pa_idx );
+                break;
+            case 2:
+                col = cSRATblPairMakePoslenColPair ( self, ctx, csra -> sa_idx );
+                break;
+            default:
+                return;
+            }
+
+            if ( ! FAILED () )
+            {
+                TRY ( TablePairAddColumnPair ( & self -> dad, ctx, col ) )
+                {
+                    return;
+                }
+            }
+        }
+
+        ColumnPairRelease ( col, ctx );
+    }
+}
+
+static
+ColumnPair *cSRATblPairMakeColumnPairAlign ( cSRATblPair *self, const ctx_t *ctx,
+    struct ColumnReader *reader, struct ColumnWriter *writer, const char *colspec, bool large )
+{
+    FUNC_ENTRY ( ctx );
+
+    MapFile *idx = NULL;
+    ColumnPair *col = NULL;
+    ColumnWriter *buffered;
+
+    switch ( self -> align_idx )
+    {
+    case 0:
+    case 3:
+        return TablePairMakeColumnPair ( & self -> dad, ctx, reader, writer, colspec, large );
+    case 1:
+    case 2:
+    {
+        /* look for special MATE_ALIGN_ID column */
+        const char *colname = strrchr ( colspec, ')' );
+        if ( colname ++ == NULL )
+            colname = colspec;
+        if ( strcmp ( colname, "MATE_ALIGN_ID" ) == 0 )
+        {
+            cSRAPair *csra = self -> csra;
+            idx = self -> align_idx == 1 ? csra -> pa_idx : csra -> sa_idx;
+        }
+        break;
+    }
+
+    default:
+        ANNOTATE ( "not going to dignify with an rc - bad align_idx" );
+        return NULL;
+    }
+
+    /* create a buffer on writer, possibly with mapping */
+    buffered = ( idx != NULL ) ?
+        /* create a buffered mapping writer but WITHOUT id assignment capabilities */
+        cSRATblPairMakeBufferedIdRemapColumnWriter ( self, ctx, writer, idx, false ):
+        /* create a normal buffered writer */
+        cSRATblPairMakeBufferedColumnWriter ( self, ctx, writer );
+
+    if ( ! FAILED () )
+    {
+        col = TablePairMakeColumnPair ( & self -> dad, ctx, reader, buffered, colspec, large );
+        ColumnWriterRelease ( buffered, ctx );
+    }
+
+    return col;
+}
+
+static
+void cSRATblPairPostCopyAlign ( cSRATblPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    cSRAPair *csra = self -> csra;
+
+    RowSetIteratorRelease ( self -> rsi, ctx );
+    self -> rsi = NULL;
+
+    if ( self -> align_idx == 2 )
+    {
+        MapFileRelease ( self -> csra -> sa_idx, ctx );
+        self -> csra -> sa_idx = NULL;
+    }
+
+    switch ( self -> align_idx )
+    {
+    case 1:
+        CrossCheckRefAlignTbl ( ctx, csra -> reference -> dtbl, csra -> prim_align -> dtbl, "PRIMARY_ALIGNMENT" );
+        break;
+    case 2:
+        CrossCheckRefAlignTbl ( ctx, csra -> reference -> dtbl, csra -> sec_align -> dtbl, "SECONDARY_ALIGNMENT" );
+
+#if SEQUENCE_BEFORE_SECONDARY
+        cSRATblPairWhackMappingIdx ( self, ctx );
+#endif
+
+        break;
+    }
+}
+
+static
+RowSetIterator *cSRATblPairGetRowSetIteratorAlign ( cSRATblPair *self, const ctx_t *ctx, bool mapping, bool large )
+{
+    FUNC_ENTRY ( ctx );
+
+    TRY ( RowSetIteratorRelease ( self -> rsi, ctx ) )
+    {
+        cSRAPair *csra = self -> csra;
+        MapFile *idx = self -> align_idx == 1 ? csra -> pa_idx : csra -> sa_idx;
+        TRY ( self -> rsi = TablePairMakeRowSetIterator ( & self -> dad, ctx, idx, mapping, large ) )
+        {
+            return RowSetIteratorDuplicate ( self -> rsi, ctx );
+        }
+    }
+
+    return NULL;
+}
+
+
+static TablePair_vt cSRATblPair_Align_vt =
+{
+    cSRATblPairWhack,
+    cSRATblPairPreExplodeAlign,
+    cSRATblPairExplodeAlign,
+    cSRATblPairMakeColumnPairAlign,
+    cSRATblPairDummyStub,
+    cSRATblPairPostCopyAlign,
+    cSRATblPairGetRowSetIteratorAlign
+};
+
+
+
+/* SEQUENCE table
+ */
+
+static
+ColumnPair *cSRATblPairMakeSeqPrimAlignIdColPair ( cSRATblPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    ColumnPair *col = NULL;
+    cSRAPair *csra = self -> csra;
+
+
+    ColumnReader *reader;
+    const char *colspec = "(I64)PRIMARY_ALIGNMENT_ID";
+
+    /* this column may not be present if there are no alignments */
+    TRY ( reader = TablePairMakeColumnReader ( & self -> dad, ctx, NULL, colspec, false ) )
+    {
+        if ( reader != NULL )
+        {
+            ColumnWriter *writer;
+            TRY ( writer = TablePairMakeColumnWriter ( & self -> dad, ctx, NULL, colspec ) )
+            {
+                ColumnWriter *capture;
+                TRY ( capture = cSRAPairMakeFirstHalfAlignedRowIdCaptureWriter ( csra, ctx, writer ) )
+                {
+                    ColumnWriter *buffered;
+
+                    /* create a buffered writer WITHOUT id-assignment capabilities. */
+                    TRY ( buffered = cSRATblPairMakeBufferedIdRemapColumnWriter ( self, ctx,
+                              capture, csra -> pa_idx, false ) )
+                    {
+                        col = TablePairMakeColumnPair ( & self -> dad, ctx, reader, buffered, colspec, true );
+
+                        ColumnWriterRelease ( buffered, ctx );
+                    }
+
+                    ColumnWriterRelease ( capture, ctx );
+                }
+                
+                ColumnWriterRelease ( writer, ctx );
+            }
+            
+            ColumnReaderRelease ( reader, ctx );
+        }
+    }
+
+    return col;
+}
+
+static
+void cSRATblPairPreExplodeSeq ( cSRATblPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    TRY ( TablePairExplode ( & self -> dad, ctx ) )
+    {
+        cSRAPair *csra = self -> csra;
+        TRY ( csra -> seq_idx = MapFileMake ( ctx, self -> dad . name, true ) )
+        {
+            TRY ( MapFileSetIdRange ( csra -> seq_idx, ctx, self -> dad . first_id,
+                      self -> dad . last_excl - self -> dad . first_id ) )
+            {
+                ColumnPair *col;
+
+                /* create special case for PRIMARY_ALIGNMENT_ID */
+                TRY ( col = cSRATblPairMakeSeqPrimAlignIdColPair ( self, ctx ) )
+                {
+                    TablePairAddColumnPair ( & self -> dad, ctx, col );
+                }
+            }
+        }
+    }
+}
+
+static
+ColumnPair *cSRATblPairMakeColumnPairSeq ( cSRATblPair *self, const ctx_t *ctx,
+    struct ColumnReader *reader, struct ColumnWriter *writer, const char *colspec, bool large )
+{
+    FUNC_ENTRY ( ctx );
+
+    ColumnPair *col = NULL;
+    ColumnWriter *buffered;
+
+    TRY ( buffered = cSRATblPairMakeBufferedColumnWriter ( self, ctx, writer ) )
+    {
+        col = TablePairMakeColumnPair ( & self -> dad, ctx, reader, buffered, colspec, large );
+        ColumnWriterRelease ( buffered, ctx );
+    }
+
+    return col;
+}
+
+static
+void cSRATblPairPreCopySeq ( cSRATblPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    cSRAPair *csra = self -> csra;
+
+    STATUS ( 3, "assigning new row-ids to unaligned sequences" );
+    csra -> first_unaligned_spot = MapFileAllocMissingNewIds ( self -> csra -> seq_idx, ctx );
+}
+
+static
+void cSRATblPairPostCopySeq ( cSRATblPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    cSRAPair *csra = self -> csra;
+
+#if ! SEQUENCE_BEFORE_SECONDARY
+    cSRATblPairWhackMappingIdx ( self, ctx );
+#endif
+
+    /* record markers in metadata */
+    if ( ! FAILED () && ( csra -> first_half_aligned_spot != 0 || csra -> first_unaligned_spot != 0 ) )
+    {
+        MetaPair *meta = self -> dad . meta;
+        KMDataNode *unaligned_node;
+        const char *node_path = "unaligned";
+        rc_t rc = KMetadataOpenNodeUpdate ( meta -> dmeta, & unaligned_node, "%s", node_path );
+        if ( rc != 0 )
+            INTERNAL_ERROR ( rc, "KMetadataOpenNodeUpdate failed to open '%s'", node_path );
+        else
+        {
+            KMDataNode *node;
+            if ( csra -> first_half_aligned_spot != 0 )
+            {
+                node_path = "first-half-aligned";
+                rc = KMDataNodeOpenNodeUpdate ( unaligned_node, & node, "%s", node_path );
+                if ( rc != 0 )
+                    INTERNAL_ERROR ( rc, "KMDataNodeOpenNodeUpdate failed to open 'unaligned/%s'", node_path );
+                else
+                {
+                    rc = KMDataNodeWriteB64 ( node, & csra -> first_half_aligned_spot );
+                    if ( rc != 0 )
+                        INTERNAL_ERROR ( rc, "KMDataNodeWriteB64 failed to write 'unaligned/%s'", node_path );
+
+                    KMDataNodeRelease ( node );
+                }
+            }
+
+            if ( ! FAILED () && csra -> first_unaligned_spot != 0 )
+            {
+                node_path = "first-unaligned";
+                rc = KMDataNodeOpenNodeUpdate ( unaligned_node, & node, "%s", node_path );
+                if ( rc != 0 )
+                    INTERNAL_ERROR ( rc, "KMDataNodeOpenNodeUpdate failed to open 'unaligned/%s'", node_path );
+                else
+                {
+                    rc = KMDataNodeWriteB64 ( node, & csra -> first_unaligned_spot );
+                    if ( rc != 0 )
+                        INTERNAL_ERROR ( rc, "KMDataNodeWriteB64 failed to write 'unaligned/%s'", node_path );
+
+                    KMDataNodeRelease ( node );
+                }
+            }
+
+            KMDataNodeRelease ( unaligned_node );
+        }
+    }
+}
+
+static
+RowSetIterator *cSRATblPairGetRowSetIteratorSeq ( cSRATblPair *self, const ctx_t *ctx, bool mapping, bool large )
+{
+    FUNC_ENTRY ( ctx );
+
+    TRY ( RowSetIteratorRelease ( self -> rsi, ctx ) )
+    {
+        cSRAPair *csra = self -> csra;
+        TRY ( self -> rsi = TablePairMakeRowSetIterator ( & self -> dad, ctx, csra -> seq_idx, mapping, large ) )
+        {
+            return RowSetIteratorDuplicate ( self -> rsi, ctx );
+        }
+    }
+
+    return NULL;
+}
+
+static TablePair_vt cSRATblPair_Seq_vt =
+{
+    cSRATblPairWhack,
+    cSRATblPairPreExplodeSeq,
+    cSRATblPairDummyStub,
+    cSRATblPairMakeColumnPairSeq,
+    cSRATblPairPreCopySeq,
+    cSRATblPairPostCopySeq,
+    cSRATblPairGetRowSetIteratorSeq
+};
+
+
+
+/* Init
+ *  common initialization code
+ */
+static
+void cSRATblPairInit ( void *self, cSRATblPair *tbl )
+{
+    tbl -> csra = self;
+    tbl -> rsi = NULL;
+    tbl -> align_idx = 0;
+}
+
+
+/* MakeRef
+ *  special cased for REFERENCE table
+ */
+TablePair *cSRATblPairMakeRef ( DbPair *self, const ctx_t *ctx,
+    const VTable *src, VTable *dst, const char *name, bool reorder )
+{
+    FUNC_ENTRY ( ctx );
+
+    cSRATblPair *tbl;
+
+    TRY ( tbl = MemAlloc ( ctx, sizeof * tbl, false ) )
+    {
+        TRY ( TablePairInit ( & tbl -> dad, ctx, & cSRATblPair_Ref_vt, src, dst, name, self -> full_spec, reorder ) )
+        {
+            static const char *exclude_cols [] = { "PRIMARY_ALIGNMENT_IDS", "SECONDARY_ALIGNMENT_IDS", "READ", "SPOT_GROUP", NULL };
+            static const char *nonstatic_cols [] = { "NAME", NULL };
+            tbl -> dad . exclude_col_names = exclude_cols;
+            tbl -> dad . nonstatic_col_names = nonstatic_cols;
+            cSRATblPairInit ( self, tbl );
+            return & tbl -> dad;
+        }
+
+        MemFree ( ctx, tbl, sizeof * tbl );
+    }
+
+    return NULL;
+}
+
+
+/* MakeAlign
+ *  special cased for *_ALIGNMENT tables
+ */
+TablePair *cSRATblPairMakeAlign ( DbPair *self, const ctx_t *ctx,
+    const VTable *src, VTable *dst, const char *name, bool reorder )
+{
+    FUNC_ENTRY ( ctx );
+
+    cSRATblPair *tbl;
+
+    TRY ( tbl = MemAlloc ( ctx, sizeof * tbl, false ) )
+    {
+        TRY ( TablePairInit ( & tbl -> dad, ctx, & cSRATblPair_Align_vt, src, dst, name, self -> full_spec, reorder ) )
+        {
+            static const char *exclude_cols [] = { "GLOBAL_REF_START", "READ_LEN", "REF_ID", "REF_START", "REF_LEN", "SEQ_SPOT_ID", NULL };
+            static const char *unsorted_exclude_cols [] = { "READ_LEN", "SEQ_SPOT_ID", NULL };
+            tbl -> dad . exclude_col_names = reorder ? exclude_cols : unsorted_exclude_cols;
+            cSRATblPairInit ( self, tbl );
+            return & tbl -> dad;
+        }
+
+        MemFree ( ctx, tbl, sizeof * tbl );
+    }
+
+    return NULL;
+}
+
+
+/* MakeSeq
+ *  special cased for SEQUENCE table
+ */
+TablePair *cSRATblPairMakeSeq ( DbPair *self, const ctx_t *ctx,
+    const VTable *src, VTable *dst, const char *name, bool reorder )
+{
+    FUNC_ENTRY ( ctx );
+
+    cSRATblPair *tbl;
+
+    TRY ( tbl = MemAlloc ( ctx, sizeof * tbl, false ) )
+    {
+        TRY ( TablePairInit ( & tbl -> dad, ctx, & cSRATblPair_Seq_vt, src, dst, name, self -> full_spec, reorder ) )
+        {
+            static const char *exclude_cols [] = { "PRIMARY_ALIGNMENT_ID", NULL };
+            static const char *nonstatic_cols [] = { "NAME_FMT", NULL };
+            static const char *large_cols [] = { "CMP_READ", "QUALITY", NULL };
+            static const char *exclude_meta [] = { "unaligned", NULL };
+            tbl -> dad . exclude_col_names = exclude_cols;
+            tbl -> dad . nonstatic_col_names = nonstatic_cols;
+            tbl -> dad . large_col_names = large_cols;
+            tbl -> dad . exclude_meta = exclude_meta;
+            cSRATblPairInit ( self, tbl );
+            return & tbl -> dad;
+        }
+
+        MemFree ( ctx, tbl, sizeof * tbl );
+    }
+
+    return NULL;
+}
diff --git a/tools/sra-sort/csra-tbl.h b/tools/sra-sort/csra-tbl.h
new file mode 100644
index 0000000..7eae0b2
--- /dev/null
+++ b/tools/sra-sort/csra-tbl.h
@@ -0,0 +1,83 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_csra_tbl_
+#define _h_sra_sort_csra_tbl_
+
+#ifndef _h_sra_sort_tbl_pair_
+#include "tbl-pair.h"
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct cSRAPair;
+struct RowSetIterator;
+
+
+/*--------------------------------------------------------------------------
+ * cSRATblPair
+ *  interface to pairing of source and destination tables
+ */
+typedef struct cSRATblPair cSRATblPair;
+struct cSRATblPair
+{
+    TablePair dad;
+
+    /* database */
+    struct cSRAPair *csra;
+
+    /* special rowset iterator */
+    struct RowSetIterator *rsi;
+
+    /* if an alignment table, which one? */
+    uint32_t align_idx;
+};
+
+
+/* MakeRef
+ *  special cased for REFERENCE table
+ */
+TablePair *cSRATblPairMakeRef ( struct DbPair *self, const ctx_t *ctx,
+    struct VTable const *src, struct VTable *dst, const char *name, bool reorder );
+
+
+/* MakeAlign
+ *  special cased for *_ALIGNMENT tables
+ */
+TablePair *cSRATblPairMakeAlign ( struct DbPair *self, const ctx_t *ctx,
+    struct VTable const *src, struct VTable *dst, const char *name, bool reorder );
+
+
+/* MakeSeq
+ *  special cased for SEQUENCE table
+ */
+TablePair *cSRATblPairMakeSeq ( struct DbPair *self, const ctx_t *ctx,
+    struct VTable const *src, struct VTable *dst, const char *name, bool reorder );
+
+
+#endif /* _h_sra_sort_csra_tbl_ */
diff --git a/tools/sra-sort/ctx.h b/tools/sra-sort/ctx.h
new file mode 100644
index 0000000..cfd4275
--- /dev/null
+++ b/tools/sra-sort/ctx.h
@@ -0,0 +1,109 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_ctx_
+#define _h_sra_sort_ctx_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct Caps;
+
+
+/*--------------------------------------------------------------------------
+ * file entry
+ *  modified from vdb-3 to not place requirements on Makefile
+ */
+#if ! defined __mod__ && ! defined __file__
+#define FILE_ENTRY( __file_name__ )                                     \
+    static const char __mod__ [] = "tools/sra-sort";                    \
+    static const char __file__ [] = STRINGIZE_DEFINE ( __file_name__ )
+#else
+#define FILE_ENTRY( __file_name__ ) /* already defined */
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * ctx_info_t
+ */
+typedef struct ctx_info_t ctx_info_t;
+struct ctx_info_t
+{
+    const char *mod;
+    const char *file;
+    const char *func;
+};
+
+#define DECLARE_CTX_INFO() \
+    static ctx_info_t ctx_info = { __mod__, __file__, __func__ }
+
+
+/*--------------------------------------------------------------------------
+ * ctx_t
+ *  modified from vdb-3
+ */
+struct ctx_t
+{
+    struct Caps const *caps;
+    const ctx_t *caller;
+    const ctx_info_t *info;
+    volatile rc_t rc;
+};
+
+
+/* INIT
+ *  initialize local context block
+ */
+static __inline__
+const ctx_t ctx_init ( ctx_t *new_ctx, const ctx_t **ctxp, const ctx_info_t *info )
+{
+    const ctx_t *ctx = * ctxp;
+    ctx_t local_ctx = { ctx -> caps, ctx, info };
+    * ctxp = new_ctx;
+    return local_ctx;
+}
+
+
+/* FUNC_ENTRY
+ */
+#define FUNC_ENTRY( ctx )                                               \
+    DECLARE_CTX_INFO ();                                                \
+    ctx_t local_ctx = ctx_init ( & local_ctx, & ( ctx ), & ctx_info )
+
+
+/* POP_CTX
+ *  intended to have VERY specific usage
+ */
+#define POP_CTX( ctx ) \
+    ctx = ctx -> caller
+
+
+#endif
diff --git a/tools/sra-sort/db-pair.c b/tools/sra-sort/db-pair.c
new file mode 100644
index 0000000..7be477d
--- /dev/null
+++ b/tools/sra-sort/db-pair.c
@@ -0,0 +1,885 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct DbPair StdDbPair;
+#define DBPAIR_IMPL StdDbPair
+
+#include "db-pair.h"
+#include "csra-pair.h"
+#include "tbl-pair.h"
+#include "dir-pair.h"
+#include "meta-pair.h"
+#include "sra-sort.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/vdb-priv.h>
+#include <kdb/database.h>
+#include <kdb/meta.h>
+#include <kdb/kdb-priv.h>
+#include <kfs/directory.h>
+#include <klib/printf.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+
+#include <string.h>
+
+
+FILE_ENTRY ( db-pair );
+
+
+/*--------------------------------------------------------------------------
+ * StdDbPair
+ *  generic database object pair
+ */
+
+static
+void StdDbPairWhack ( StdDbPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    DbPairDestroy ( self, ctx );
+    MemFree ( ctx, self, sizeof * self );
+}
+
+static
+void StdDbPairExplode ( StdDbPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+}
+
+static
+const char *StdDbPairGetTblMember ( const StdDbPair *self, const ctx_t *ctx, const VTable *src, const char *name )
+{
+    return name;
+}
+
+static DbPair_vt StdDbPair_vt =
+{
+    StdDbPairWhack,
+    StdDbPairExplode,
+    StdDbPairGetTblMember
+};
+
+static
+DbPair *StdDbPairMake ( const ctx_t *ctx,
+    const VDatabase *src, VDatabase *dst, const char *name, const char *opt_full_spec )
+{
+    FUNC_ENTRY ( ctx );
+
+    StdDbPair *db;
+
+    TRY ( db = MemAlloc ( ctx, sizeof * db, false ) )
+    {
+        TRY ( DbPairInit ( db, ctx, & StdDbPair_vt, src, dst, name, opt_full_spec ) )
+        {
+            return db;
+        }
+
+        MemFree ( ctx, db, sizeof * db );
+    }
+
+    return NULL;
+}
+
+/*--------------------------------------------------------------------------
+ * DbPair
+ *  interface code
+ */
+
+
+/* Make
+ *  makes an object based upon open source and destination VDatabase objects
+ */
+static
+bool is_csra_db ( const VDatabase *src, const ctx_t *ctx )
+{
+    /* TBD - hack'o-matic */
+    return true;
+}
+
+DbPair *DbPairMake ( const ctx_t *ctx,
+    const VDatabase *src, VDatabase *dst, const char *name )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* intercept certain types of databases - right now cSRA */
+    if ( is_csra_db ( src, ctx ) )
+        return cSRAPairMake ( ctx, src, dst, name );
+
+    return StdDbPairMake ( ctx, src, dst, name, NULL );
+}
+
+DbPair *DbPairMakeStdDbPair ( DbPair *self, const ctx_t *ctx,
+    const VDatabase *src, VDatabase *dst, const char *name )
+{
+    FUNC_ENTRY ( ctx );
+    return StdDbPairMake ( ctx, src, dst, name, self -> full_spec );
+}
+
+
+/* Release
+ */
+void DbPairRelease ( DbPair *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountDrop ( & self -> refcount, "DbPair" ) )
+        {
+        case krefOkay:
+            break;
+        case krefWhack:
+            ( * self -> vt -> whack ) ( ( void* ) self, ctx );
+            break;
+        case krefZero:
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcDatabase, rcDestroying, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to release DbPair" );
+        }
+    }
+}
+
+/* Duplicate
+ */
+DbPair *DbPairDuplicate ( DbPair *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountAdd ( & self -> refcount, "DbPair" ) )
+        {
+        case krefOkay:
+        case krefWhack:
+        case krefZero:
+            break;
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcDatabase, rcAttaching, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to duplicate DbPair" );
+            return NULL;
+        }
+    }
+
+    return ( DbPair* ) self;
+}
+
+
+/* Copy
+ */
+static
+bool CC DbPairCopyDbPair ( void *item, void *data )
+{
+    const ctx_t *ctx = ( const void* ) data;
+    FUNC_ENTRY ( ctx );
+    TRY ( DbPairCopy ( item, ctx ) )
+    {
+        return false;
+    }
+    return true;
+}
+
+static
+bool CC DbPairCopyTablePair ( void *item, void *data )
+{
+    const ctx_t *ctx = ( const void* ) data;
+    FUNC_ENTRY ( ctx );
+    TRY ( TablePairCopy ( item, ctx ) )
+    {
+        return false;
+    }
+    return true;
+}
+
+static
+bool CC DbPairCopyDirPair ( void *item, void *data )
+{
+    const ctx_t *ctx = ( const void* ) data;
+    FUNC_ENTRY ( ctx );
+    TRY ( DirPairCopy ( item, ctx ) )
+    {
+        return false;
+    }
+    return true;
+}
+
+void DbPairCopy ( DbPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    STATUS ( 2, "copying database '%s'", self -> full_spec );
+
+    /* copy metadata */
+    MetaPairCopy ( self -> meta, ctx, self -> full_spec, self -> exclude_meta );
+
+    /* copy all child databases */
+    if ( ! FAILED () && VectorLength ( & self -> dbs ) != 0 )
+    {
+        STATUS ( 2, "copying '%s' sub-databases", self -> full_spec );
+        VectorDoUntil ( & self -> dbs, false, DbPairCopyDbPair, ( void* ) ctx );
+    }
+
+    /* now we should be able to copy each table */
+    if ( ! FAILED () && VectorLength ( & self -> tbls ) != 0 )
+    {
+        STATUS ( 2, "copying '%s' tables", self -> full_spec );
+        VectorDoUntil ( & self -> tbls, false, DbPairCopyTablePair, ( void* ) ctx );
+    }
+
+    /* copy any directories - extra */
+    if ( ! FAILED () && VectorLength ( & self -> dirs ) != 0 )
+    {
+        STATUS ( 2, "copying '%s' directories", self -> full_spec );
+        VectorDoUntil ( & self -> dirs, false, DbPairCopyDirPair, ( void* ) ctx );
+    }
+}
+
+
+/* Explode
+ *  probably a bad name, but it is intended to mean
+ *  register all enclosed tables and databases
+ *  and create a proper pair of KMetadata
+ */
+static
+MetaPair *DbPairExplodeMetaPair ( DbPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    MetaPair *meta = NULL;
+    const KMetadata *smeta;
+
+    rc = VDatabaseOpenMetadataRead ( self -> sdb, & smeta );
+    if ( rc != 0 )
+        ERROR ( rc, "VDatabaseOpenMetadataRead failed on 'src.%s'", self -> full_spec );
+    else
+    {
+        KMetadata *dmeta;
+        rc = VDatabaseOpenMetadataUpdate ( self -> ddb, & dmeta );
+        if ( rc != 0 )
+            ERROR ( rc, "VDatabaseOpenMetadataUpdate failed on 'dst.%s'", self -> full_spec );
+        else
+        {
+            meta = MetaPairMake ( ctx, smeta, dmeta, self -> full_spec );
+
+            KMetadataRelease ( dmeta );
+        }
+        
+        KMetadataRelease ( smeta );
+    }
+
+    return meta;
+}
+
+static
+void DbPairExplode ( DbPair *self, const ctx_t *ctx );
+
+static
+bool CC DbPairExplodeDbPair ( void *item, void *data )
+{
+    const ctx_t *ctx = ( const void* ) data;
+    FUNC_ENTRY ( ctx );
+    TRY ( DbPairExplode ( item, ctx ) )
+    {
+        return false;
+    }
+    return true;
+}
+
+static
+bool CC DbPairPreExplodeTablePair ( void *item, void *data )
+{
+    const ctx_t *ctx = ( const void* ) data;
+    FUNC_ENTRY ( ctx );
+    TRY ( TablePairPreExplode ( ( ( TablePair* ) item ), ctx ) )
+    {
+        return false;
+    }
+    return true;
+}
+
+#if 0
+static
+void DbPairDefaultExplodeDB ( DbPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    KNamelist *names;
+
+    rc = VDatabaseListDB ( self -> sdb, & names );
+    if ( rc != 0 )
+        ERROR ( rc, "VDatabaseListDB failed listing '%s' databases", self -> full_spec );
+    else
+    {
+        uint32_t count;
+        rc = KNamelistCount ( names, & count );
+        if ( rc != 0 )
+            ERROR ( rc, "KNamelistCount failed listing '%s' databases", self -> full_spec );
+        else if ( count > 0 )
+        {
+            uint32_t i;
+            for ( i = 0; ! FAILED () && i < count; ++ i )
+            {
+                DbPair *db;
+
+                const char *name;
+                rc = KNamelistGet ( names, i, & name );
+                if ( rc != 0 )
+                {
+                    ERROR ( rc, "KNamelistGet ( %u ) failed listing '%s' databases", i, self -> full_spec );
+                    break;
+                }
+
+                if ( self -> exclude_dbs != NULL )
+                {
+                    uint32_t j;
+                    for ( j = 0; self -> exclude_dbs [ j ] != NULL; ++ j )
+                    {
+                        if ( strcmp ( name, self -> exclude_dbs [ j ] ) == 0 )
+                        {
+                            name = NULL;
+                            break;
+                        }
+                    }
+                    if ( name == NULL )
+                        continue;
+                }
+
+                TRY ( db = DbPairMakeDbPair ( self, ctx, name, name, true, DbPairMakeStdDbPair ) )
+                {
+                    ON_FAIL ( DbPairAddDbPair ( self, ctx, db ) )
+                    {
+                        DbPairRelease ( db, ctx );
+                    }
+                }
+            }
+        }
+
+        KNamelistRelease ( names );
+    }
+}
+#endif
+
+static
+void DbPairDefaultExplodeTbl ( DbPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    KNamelist *names;
+
+    rc = VDatabaseListTbl ( self -> sdb, & names );
+    if ( rc != 0 )
+        ERROR ( rc, "VDatabaseListTbl failed listing '%s' tables", self -> full_spec );
+    else
+    {
+        uint32_t count;
+        rc = KNamelistCount ( names, & count );
+        if ( rc != 0 )
+            ERROR ( rc, "KNamelistCount failed listing '%s' tables", self -> full_spec );
+        else if ( count > 0 )
+        {
+            uint32_t i;
+            for ( i = 0; ! FAILED () && i < count; ++ i )
+            {
+                TablePair *tbl;
+
+                const char *name;
+                rc = KNamelistGet ( names, i, & name );
+                if ( rc != 0 )
+                {
+                    ERROR ( rc, "KNamelistGet ( %u ) failed listing '%s' tables", i, self -> full_spec );
+                    break;
+                }
+
+                if ( self -> exclude_tbls != NULL )
+                {
+                    uint32_t j;
+                    for ( j = 0; self -> exclude_tbls [ j ] != NULL; ++ j )
+                    {
+                        if ( strcmp ( name, self -> exclude_tbls [ j ] ) == 0 )
+                        {
+                            name = NULL;
+                            break;
+                        }
+                    }
+                    if ( name == NULL )
+                        continue;
+                }
+
+                TRY ( tbl = DbPairMakeTablePair ( self, ctx, name, name, true, false, DbPairMakeStdTblPair ) )
+                {
+                    ON_FAIL ( DbPairAddTablePair ( self, ctx, tbl ) )
+                    {
+                        TablePairRelease ( tbl, ctx );
+                    }
+                }
+            }
+        }
+
+        KNamelistRelease ( names );
+    }
+}
+
+static
+void DbPairDefaultExplode ( DbPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+#if 0
+    TRY ( DbPairDefaultExplodeDB ( self, ctx ) )
+#endif
+    {
+        DbPairDefaultExplodeTbl ( self, ctx );
+    }
+}
+
+static
+void DbPairExplode ( DbPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    STATUS ( 2, "exploding database '%s'", self -> full_spec );
+
+    /* first, ask subclass to perform explicit explode */
+    if ( self == NULL )
+    {
+        rc_t rc = RC ( rcExe, rcDatabase, rcAccessing, rcSelf, rcNull );
+        INTERNAL_ERROR ( rc, "bad DbPair" );
+    }
+    else
+    {
+        TRY ( ( * self -> vt -> explode ) ( self, ctx ) )
+        {
+            /* next, perform default self-explode for all dbs, tbls not excluded */
+            TRY ( DbPairDefaultExplode ( self, ctx ) )
+            {
+                /* now create metadata pair */
+                if ( self -> meta == NULL )
+                    self -> meta = DbPairExplodeMetaPair ( self, ctx );
+                if ( ! FAILED () )
+                {
+                    /* now explode all child dbs, tbls */
+                    TRY ( VectorDoUntil ( & self -> dbs, false, DbPairExplodeDbPair, ( void* ) ctx ) )
+                    {
+                        VectorDoUntil ( & self -> tbls, false, DbPairPreExplodeTablePair, ( void* ) ctx );
+                    }
+                }
+            }
+        }
+    }
+}
+
+
+/* Run
+ */
+void DbPairRun ( DbPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    const Tool *tp = ctx -> caps -> tool;
+
+    STATUS ( 1, "input database is '%s'", tp -> src_path );
+    STATUS ( 1, "output database is '%s'", tp -> dst_path );
+
+    /* the first thing to do is to explode the database
+       to create sub-dbs, sub-tables, and metadata */
+    TRY ( DbPairExplode ( self, ctx ) )
+    {
+        /* now copy */
+        DbPairCopy ( self, ctx );
+    }
+
+    if ( FAILED () )
+        STATUS ( 1, "failed processing database '%s'", self -> full_spec );
+    else
+        STATUS ( 1, "finished processing database '%s'", self -> full_spec );
+}
+
+
+/* MakeDbPair
+ */
+DbPair *DbPairMakeDbPair ( DbPair *self, const ctx_t *ctx, const char *member, const char *name, bool required,
+    DbPair* ( * make ) ( DbPair *self, const ctx_t *ctx, const VDatabase *src, VDatabase *dst, const char *name ) )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    const VDatabase *src;
+    DbPair *db = NULL;
+                
+    STATUS ( 4, "creating db pair '%s.%s'", self -> full_spec, name );
+    rc = VDatabaseOpenDBRead ( self -> sdb, & src, "%s", name );
+    if ( rc != 0 )
+    {
+        if ( required )
+            ERROR ( rc, "VDatabaseOpenDBRead: failed to open db '%s.%s'", self -> full_spec, name );
+        else
+            STATUS ( 4, "optional db '%s.%s' was not opened", self -> full_spec, name );
+    }
+    else
+    {
+#if 0
+        if ( member == NULL )
+            member = DbPairGetTblMember ( self, ctx, src, name );
+#endif
+
+        if ( ! FAILED () )
+        {
+            VDatabase *dst;
+            const Tool *tp = ctx -> caps -> tool;
+            rc = VDatabaseCreateDB ( self -> ddb, & dst, member, kcmOpen | ( tp -> db . cmode & kcmMD5 ), "%s", name );
+            if ( rc != 0 )
+                ERROR ( rc, "VDatabaseCreateDB: failed to create %s db '%s.%s'", member, self -> full_spec, name );
+            else
+            {
+                db = ( * make ) ( self, ctx, src, dst, name );
+
+                VDatabaseRelease ( dst );
+            }
+        }
+
+        VDatabaseRelease ( src );
+    }
+
+    return db;
+}
+
+
+/* MakeTablePair
+ */
+TablePair *DbPairMakeTablePair ( DbPair *self, const ctx_t *ctx, const char *member, const char *name, bool required, bool reorder,
+    TablePair* ( * make ) ( DbPair *self, const ctx_t *ctx, const VTable *src, VTable *dst, const char *name, bool reorder ) )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    const VTable *src;
+    TablePair *tbl = NULL;
+                
+    STATUS ( 4, "creating table pair '%s.%s'", self -> full_spec, name );
+    rc = VDatabaseOpenTableRead ( self -> sdb, & src, "%s", name );
+    if ( rc != 0 )
+    {
+        if ( required )
+            ERROR ( rc, "VDatabaseOpenTableRead: failed to open table '%s.%s'", self -> full_spec, name );
+        else
+            STATUS ( 4, "optional table '%s.%s' was not opened", self -> full_spec, name );
+    }
+    else
+    {
+        if ( member == NULL )
+            member = DbPairGetTblMember ( self, ctx, src, name );
+
+        if ( ! FAILED () )
+        {
+            VTable *dst;
+            const Tool *tp = ctx -> caps -> tool;
+            rc = VDatabaseCreateTable ( self -> ddb, & dst, member, kcmOpen | ( tp -> db . cmode & kcmMD5 ), "%s", name );
+            if ( rc != 0 )
+                ERROR ( rc, "VDatabaseCreateTable: failed to create %s table '%s.%s'", member, self -> full_spec, name );
+            else
+            {
+                tbl = ( * make ) ( self, ctx, src, dst, name, reorder );
+
+                VTableRelease ( dst );
+            }
+        }
+
+        VTableRelease ( src );
+    }
+
+    return tbl;
+}
+
+
+/* AddDbPair
+ *  called from implementations
+ */
+void DbPairAddDbPair ( DbPair *self, const ctx_t *ctx, DbPair *db )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    STATUS ( 4, "adding db pair '%s'", db -> full_spec );
+    rc = VectorAppend ( & self -> dbs, NULL, ( const void* ) db );
+    if ( rc != 0 )
+        SYSTEM_ERROR ( rc, "failed to add db pair '%s'", db -> full_spec );
+}
+
+
+/* AddTablePair
+ *  called from implementations
+ */
+void DbPairAddTablePair ( DbPair *self, const ctx_t *ctx, TablePair *tbl )
+{
+    if ( tbl != NULL )
+    {
+        FUNC_ENTRY ( ctx );
+
+        rc_t rc;
+
+        STATUS ( 4, "adding table pair '%s'", tbl -> full_spec );
+        rc = VectorAppend ( & self -> tbls, NULL, ( const void* ) tbl );
+        if ( rc != 0 )
+            SYSTEM_ERROR ( rc, "failed to add table pair '%s'", tbl -> full_spec );
+    }
+}
+
+
+/* MakeDirPair
+ */
+DirPair *DbPairMakeDirPair ( DbPair *self, const ctx_t *ctx, const char *name, bool required,
+    DirPair* ( * make ) ( DbPair *self, const ctx_t *ctx, const KDirectory *src, KDirectory *dst, const char *name ) )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    DirPair *dir = NULL;
+    const KDatabase *sdb;
+                
+    STATUS ( 4, "creating directory pair '%s./%s'", self -> full_spec, name );
+
+    rc = VDatabaseOpenKDatabaseRead ( self -> sdb, & sdb );
+    if ( rc != 0 )
+        INTERNAL_ERROR ( rc, "VDatabaseOpenKDatabaseRead: failed to access KDatabase 'src.%s'", self -> full_spec );
+    else
+    {
+        KDatabase *ddb;
+        rc = VDatabaseOpenKDatabaseUpdate ( self -> ddb, & ddb );
+        if ( rc != 0 )
+            INTERNAL_ERROR ( rc, "VDatabaseOpenKDatabaseUpdate: failed to access KDatabase 'dst.%s'", self -> full_spec );
+        else
+        {
+            const KDirectory *sdir;
+            rc = KDatabaseOpenDirectoryRead ( sdb, & sdir );
+            if ( rc != 0 )
+                INTERNAL_ERROR ( rc, "KDatabaseOpenDirectoryRead: failed to access KDirectory 'src.%s'", self -> full_spec );
+            else
+            {
+                KDirectory *ddir;
+                rc = KDatabaseOpenDirectoryUpdate ( ddb, & ddir );
+                if ( rc != 0 )
+                    INTERNAL_ERROR ( rc, "KDatabaseOpenDirectoryUpdate: failed to access KDirectory 'dst.%s'", self -> full_spec );
+                else
+                {
+                    switch ( KDirectoryPathType ( sdir, "%s", name ) )
+                    {
+                    case kptNotFound:
+                        if ( required )
+                        {
+                            rc = RC ( rcExe, rcDirectory, rcOpening, rcPath, rcNotFound );
+                            ERROR ( rc, "required directory 'src.%s./%s' does not exist", self -> full_spec, name );
+                        }
+                        break;
+
+                    case kptBadPath:
+                        rc = RC ( rcExe, rcDirectory, rcOpening, rcPath, rcInvalid );
+                        INTERNAL_ERROR ( rc, "directory path 'src.%s./%s' is invalid", self -> full_spec, name );
+                        break;
+
+                    case kptDir:
+                    case kptDir | kptAlias:
+                    {
+                        dir = ( * make ) ( self, ctx, sdir, ddir, name );
+                        break;
+                    }
+
+                    default:
+                        rc = RC ( rcExe, rcDirectory, rcOpening, rcPath, rcIncorrect );
+                        INTERNAL_ERROR ( rc, "directory path 'src.%s./%s' is not a directory", self -> full_spec, name );
+                    }
+
+                    KDirectoryRelease ( ddir );
+                }
+
+                KDirectoryRelease ( sdir );
+            }
+
+            KDatabaseRelease ( ddb );
+        }
+
+        KDatabaseRelease ( sdb );
+    }
+
+    return dir;
+}
+
+
+/* AddDirPair
+ *  called from implementations
+ */
+void DbPairAddDirPair ( DbPair *self, const ctx_t *ctx, struct DirPair *dir )
+{
+    if ( dir != NULL )
+    {
+        FUNC_ENTRY ( ctx );
+
+        rc_t rc;
+
+        STATUS ( 4, "adding directory pair '%s'", dir -> full_spec );
+        rc = VectorAppend ( & self -> dirs, NULL, ( const void* ) dir );
+        if ( rc != 0 )
+            SYSTEM_ERROR ( rc, "failed to add directory pair '%s'", dir -> full_spec );
+    }
+}
+
+
+/* Init
+ */
+void DbPairInit ( DbPair *self, const ctx_t *ctx, const DbPair_vt *vt,
+    const VDatabase *src, VDatabase *dst, const char *name, const char *opt_full_spec )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    if ( self == NULL )
+    {
+        rc = RC ( rcExe, rcDatabase, rcConstructing, rcSelf, rcNull );
+        INTERNAL_ERROR ( rc, "bad DbPair" );
+        return;
+    }
+
+    memset ( self, 0, sizeof * self );
+    self -> vt = vt;
+    VectorInit ( & self -> dbs, 0, 4 );
+    VectorInit ( & self -> tbls, 0, 8 );
+    VectorInit ( & self -> dirs, 0, 8 );
+
+    if ( opt_full_spec == NULL )
+        opt_full_spec = "";
+
+    rc = VDatabaseAddRef ( self -> sdb = src );
+    if ( rc != 0 )
+        ERROR ( rc, "failed to duplicate db 'src.%s%s%s'", opt_full_spec, opt_full_spec [ 0 ] ? "." : "", name );
+    else
+    {
+        rc = VDatabaseAddRef ( self -> ddb = dst );
+        if ( rc != 0 )
+            ERROR ( rc, "failed to duplicate db 'dst.%s%s%s'", opt_full_spec, opt_full_spec [ 0 ] ? "." : "", name );
+        else
+        {
+            char *full_spec;
+
+            self -> full_spec_size = string_size ( opt_full_spec ) + string_size ( name );
+            if ( opt_full_spec [ 0 ] != 0  )
+                ++ self -> full_spec_size;
+
+            TRY ( full_spec = MemAlloc ( ctx, self -> full_spec_size + 1, false ) )
+            {
+                if ( opt_full_spec [ 0 ] != 0 )
+                    rc = string_printf ( full_spec, self -> full_spec_size + 1, NULL, "%s.%s", opt_full_spec, name );
+                else
+                    strcpy ( full_spec, name );
+                if ( rc != 0 )
+                    ABORT ( rc, "miscalculated string size" );
+                else
+                {
+                    static const char *no_exclude [] = { NULL };
+
+                    self -> full_spec = full_spec;
+                    self -> name = full_spec;
+                    if ( opt_full_spec [ 0 ] != 0 )
+                        self -> name += string_size ( opt_full_spec ) + 1;
+
+                    self -> exclude_dbs = no_exclude;
+                    self -> exclude_tbls = no_exclude;
+                    self -> exclude_meta = no_exclude;
+
+                    KRefcountInit ( & self -> refcount, 1, "DbPair", "init", name );
+                    return;
+                }
+            }
+
+            VDatabaseRelease ( self -> ddb );
+            self -> ddb = NULL;
+        }
+
+        VDatabaseRelease ( self -> sdb );
+        self -> sdb = NULL;
+    }
+}
+
+/* Destroy
+ *  destroys superclass items
+ */
+static
+void CC DbPairReleaseDbPair ( void *item, void *data )
+{
+    const ctx_t *ctx = ( const void* ) data;
+    FUNC_ENTRY ( ctx );
+    DbPairRelease ( item, ctx );
+}
+
+static
+void CC DbPairReleaseTablePair ( void *item, void *data )
+{
+    const ctx_t *ctx = ( const void* ) data;
+    FUNC_ENTRY ( ctx );
+    TablePairRelease ( item, ctx );
+}
+
+static
+void CC DbPairReleaseDirPair ( void *item, void *data )
+{
+    const ctx_t *ctx = ( const void* ) data;
+    FUNC_ENTRY ( ctx );
+    DirPairRelease ( item, ctx );
+}
+
+void DbPairDestroy ( DbPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    VectorWhack ( & self -> dbs, DbPairReleaseDbPair, ( void* ) ctx );
+    VectorWhack ( & self -> tbls, DbPairReleaseTablePair, ( void* ) ctx );
+    VectorWhack ( & self -> dirs, DbPairReleaseDirPair, ( void* ) ctx );
+
+    MetaPairRelease ( self -> meta, ctx );
+
+    rc = VDatabaseRelease ( self -> ddb );
+    if ( rc != 0 )
+        WARN ( "VDatabaseRelease failed on 'dst.%s'", self -> full_spec );
+    VDatabaseRelease ( self -> sdb );
+
+    MemFree ( ctx, ( void* ) self -> full_spec, self -> full_spec_size + 1 );
+
+    memset ( self, 0, sizeof * self );
+}
diff --git a/tools/sra-sort/db-pair.h b/tools/sra-sort/db-pair.h
new file mode 100644
index 0000000..94bf817
--- /dev/null
+++ b/tools/sra-sort/db-pair.h
@@ -0,0 +1,208 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_db_pair_
+#define _h_sra_sort_db_pair_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+#ifndef _h_klib_vector_
+#include <klib/vector.h>
+#endif
+
+#ifndef _h_klib_refcount_
+#include <klib/refcount.h>
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct KDirectory;
+struct VTable;
+struct VDatabase;
+struct TablePair;
+struct MetaPair;
+struct DirPair;
+
+
+/*--------------------------------------------------------------------------
+ * DbPair
+ *  interface to pairing of source and destination tables
+ */
+typedef struct DbPair_vt DbPair_vt;
+
+typedef struct DbPair DbPair;
+struct DbPair
+{
+    /* polymorphic */
+    const DbPair_vt *vt;
+
+    /* the pair of VDatabases */
+    struct VDatabase const *sdb;
+    struct VDatabase *ddb;
+
+    /* the set of enclosed DbPairs */
+    Vector dbs;
+
+    /* the set of TablePairs */
+    Vector tbls;
+
+    /* the set of DirPairs */
+    Vector dirs;
+
+    /* the pair of KMetadata */
+    struct MetaPair *meta;
+
+    /* exclusions */
+    const char **exclude_dbs;
+    const char **exclude_tbls;
+    const char **exclude_meta;
+
+    /* simple db name */
+    const char *name;
+
+    /* full db spec */
+    size_t full_spec_size;
+    const char *full_spec;
+
+    /* reference counting */
+    KRefcount refcount;
+    uint32_t align;
+};
+
+#ifndef DBPAIR_IMPL
+#define DBPAIR_IMPL DbPair
+#endif
+
+struct DbPair_vt
+{
+    void ( * whack ) ( DBPAIR_IMPL *self, const ctx_t *ctx );
+    void ( * explode ) ( DBPAIR_IMPL *self, const ctx_t *ctx );
+    const char* ( * get_tbl_mbr ) ( const DBPAIR_IMPL *self, const ctx_t *ctx,
+        struct VTable const *src, const char *name );
+};
+
+
+/* Make
+ *  makes an object based upon open source and destination VDatabase objects
+ */
+DbPair *DbPairMake ( const ctx_t *ctx,
+    struct VDatabase const *src, struct VDatabase *dst, const char *name );
+
+
+/* Release
+ */
+void DbPairRelease ( DbPair *self, const ctx_t *ctx );
+
+/* Duplicate
+ */
+DbPair *DbPairDuplicate ( DbPair *self, const ctx_t *ctx );
+
+
+/* Copy
+ *  copy from source to destination
+ */
+void DbPairCopy ( DbPair *self, const ctx_t *ctx );
+
+
+/* Run
+ */
+void DbPairRun ( DbPair *self, const ctx_t *ctx );
+
+
+/* MakeDbPair
+ */
+DbPair *DbPairMakeDbPair ( DbPair *self, const ctx_t *ctx, const char *member, const char *name, bool required,
+    DbPair* ( * make ) ( DbPair *self, const ctx_t *ctx,
+        struct VDatabase const *src, struct VDatabase *dst, const char *name )
+     );
+
+DbPair *DbPairMakeStdDbPair ( struct DbPair *self, const ctx_t *ctx,
+    struct VDatabase const *src, struct VDatabase *dst, const char *name );
+
+
+/* MakeTablePair
+ */
+struct TablePair *DbPairMakeTablePair ( DbPair *self, const ctx_t *ctx,
+    const char *member, const char *name, bool required, bool reorder,
+    struct TablePair* ( * make ) ( DbPair *self, const ctx_t *ctx,
+        struct VTable const *src, struct VTable *dst, const char *name, bool reorder )
+     );
+
+
+/* GetTblMember
+ *  v1 schema does not preserve member name with an object
+ *  some schemas confuse types with the same name
+ */
+#define DbPairGetTblMember( self, ctx, src, name ) \
+    POLY_DISPATCH_PTR ( get_tbl_mbr, self, const DBPAIR_IMPL, ctx, src, name )
+
+
+/* AddDbPair
+ *  called from implementations
+ */
+void DbPairAddDbPair ( DbPair *self, const ctx_t *ctx, DbPair *db );
+
+
+/* AddTablePair
+ *  called from implementations
+ */
+void DbPairAddTablePair ( DbPair *self, const ctx_t *ctx, struct TablePair *tbl );
+
+
+/* MakeDirPair
+ */
+struct DirPair *DbPairMakeDirPair ( DbPair *self, const ctx_t *ctx, const char *name, bool required,
+    struct DirPair* ( * make ) ( DbPair *self, const ctx_t *ctx,
+        struct KDirectory const *src, struct KDirectory *dst, const char *name )
+     );
+
+
+/* AddDirPair
+ *  called from implementations
+ */
+void DbPairAddDirPair ( DbPair *self, const ctx_t *ctx, struct DirPair *dir );
+
+
+/* Init
+ *  initialize superclass with vt
+ *  also db pair and name
+ *  plus optional full-spec
+ */
+void DbPairInit ( DbPair *self, const ctx_t *ctx, const DbPair_vt *vt,
+    struct VDatabase const *src, struct VDatabase *dst,
+    const char *name, const char *opt_full_spec );
+
+/* Destroy
+ *  destroys superclass items
+ */
+void DbPairDestroy ( DbPair *self, const ctx_t *ctx );
+
+
+#endif /* _h_sra_sort_db_pair_ */
diff --git a/tools/sra-sort/dir-pair.c b/tools/sra-sort/dir-pair.c
new file mode 100644
index 0000000..da46b74
--- /dev/null
+++ b/tools/sra-sort/dir-pair.c
@@ -0,0 +1,504 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct DirPair StdDirPair;
+#define DIRPAIR_IMPL StdDirPair
+
+#include "dir-pair.h"
+#include "db-pair.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/mmap.h>
+#include <klib/printf.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+
+#include <string.h>
+
+
+FILE_ENTRY ( dir-pair );
+
+
+static
+void StdDirPairWhack ( StdDirPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    DirPairDestroy ( self, ctx );
+    MemFree ( ctx, self, sizeof * self );
+}
+
+static DirPair_vt StdDirPair_vt =
+{
+    StdDirPairWhack
+};
+
+
+/* Make
+ *  make a standard directory pair from existing KDirectory objects
+ */
+DirPair *DirPairMake ( const ctx_t *ctx,
+    const KDirectory *src, KDirectory *dst,
+    const char *name, const char *opt_full_spec )
+{
+    FUNC_ENTRY ( ctx );
+
+    StdDirPair *dir;
+
+    TRY ( dir = MemAlloc ( ctx, sizeof * dir, false ) )
+    {
+        TRY ( DirPairInit ( dir, ctx, & StdDirPair_vt, src, dst, name, opt_full_spec ) )
+        {
+            return dir;
+        }
+
+        MemFree ( ctx, dir, sizeof * dir );
+    }
+
+    return NULL;
+}
+
+
+DirPair *DbPairMakeStdDirPair ( DbPair *self, const ctx_t *ctx,
+    const KDirectory *src, KDirectory *dst, const char *name )
+{
+    FUNC_ENTRY ( ctx );
+    return DirPairMake ( ctx, src, dst, name, self -> full_spec );
+}
+
+
+/* Release
+ *  called by db at end of copy
+ */
+void DirPairRelease ( DirPair *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountDrop ( & self -> refcount, "DirPair" ) )
+        {
+        case krefOkay:
+            break;
+        case krefWhack:
+            ( * self -> vt -> whack ) ( ( void* ) self, ctx );
+            break;
+        case krefZero:
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcDirectory, rcDestroying, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to release DirPair" );
+        }
+    }
+}
+
+/* Duplicate
+ */
+DirPair *DirPairDuplicate ( DirPair *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountAdd ( & self -> refcount, "DirPair" ) )
+        {
+        case krefOkay:
+        case krefWhack:
+        case krefZero:
+            break;
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcDirectory, rcAttaching, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to duplicate DirPair" );
+            return NULL;
+        }
+    }
+
+    return ( DirPair* ) self;
+}
+
+
+/* Copy
+ *  copy from source to destination directory
+ */
+typedef struct DirPairCopyParams DirPairCopyParams;
+struct DirPairCopyParams
+{
+    const DirPair *self;
+    const ctx_t *ctx;
+    char *relpath;
+    size_t psize;
+    const KDirectory *src;
+    KDirectory *dst;
+};
+
+static
+rc_t DirPairCopyDir ( const DirPair *self, const ctx_t *ctx,
+    const KDirectory *src, KDirectory *dst, char *relpath, size_t psize );
+
+static
+rc_t DirPairCopyFile ( const DirPair *self, const ctx_t *ctx,
+    const KDirectory *src, KDirectory *dst, char *relpath )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* get source access mode */
+    uint32_t access;
+    rc_t rc = KDirectoryAccess ( src, & access, "%s", relpath );
+    if ( rc != 0 )
+    {
+        ERROR ( rc, "failed to determine access mode of file 'dst.%.*s%s'",
+                self -> owner_spec_size, self -> full_spec, relpath );
+    }
+    else
+    {
+        KFile *d;
+        rc = KDirectoryCreateFile ( dst, & d, false, access, kcmInit | kcmParents, "%s", relpath );
+        if ( rc != 0 )
+        {
+            ERROR ( rc, "failed to create file 'dst.%.*s%s'",
+                    self -> owner_spec_size, self -> full_spec, relpath );
+        }
+        else
+        {
+            const KFile *s;
+            /* open source */
+            rc = KDirectoryOpenFileRead ( src, & s, "%s", relpath );
+            if ( rc != 0 )
+            {
+                ERROR ( rc, "failed to open file 'src.%.*s%s'",
+                        self -> owner_spec_size, self -> full_spec, relpath );
+            }
+            else
+            {
+                const KMMap *mm;
+                rc = KMMapMakeMaxRead ( & mm, s );
+                if ( rc != 0 )
+                {
+                    ERROR ( rc, "failed to map file 'src.%.*s%s'",
+                            self -> owner_spec_size, self -> full_spec, relpath );
+                }
+                else
+                {
+                    uint64_t mm_pos;
+
+                    /* get initial position and size */
+                    rc = KMMapPosition ( mm, & mm_pos );
+                    if ( rc != 0 )
+                    {
+                        ERROR ( rc, "failed to determine position of map file 'src.%.*s%s'",
+                                self -> owner_spec_size, self -> full_spec, relpath );
+                    }
+                    else
+                    {
+                        size_t mm_size;
+                        rc = KMMapSize ( mm, & mm_size );
+                        if ( rc != 0 )
+                        {
+                            ERROR ( rc, "failed to determine size of map file 'src.%.*s%s'",
+                                    self -> owner_spec_size, self -> full_spec, relpath );
+                        }
+                        else while ( mm_size != 0 )
+                        {
+                            size_t num_writ;
+                            const void *mm_addr;
+
+                            /* access address */
+                            rc = KMMapAddrRead ( mm, & mm_addr );
+                            if ( rc != 0 )
+                            {
+                                ERROR ( rc, "failed to access address of map file 'src.%.*s%s'",
+                                        self -> owner_spec_size, self -> full_spec, relpath );
+                                break;
+                            }
+
+                            /* write region to output */
+                            rc = KFileWriteAll ( d, mm_pos, mm_addr, mm_size, & num_writ );
+                            if ( rc != 0 )
+                            {
+                                ERROR ( rc, "failed to write to file 'dst.%.*s%s'",
+                                        self -> owner_spec_size, self -> full_spec, relpath );
+                                break;
+                            }
+                            if ( num_writ != mm_size )
+                            {
+                                rc = RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+                                ERROR ( rc, "failed to write to file 'dst.%.*s%s'",
+                                        self -> owner_spec_size, self -> full_spec, relpath );
+                                break;
+                            }
+
+                            /* now try to shift region */
+                            mm_pos += mm_size;
+                            rc = KMMapReposition ( mm, mm_pos, & mm_size );
+                            if ( rc != 0 )
+                            {
+                                if ( GetRCState ( rc ) == rcInvalid )
+                                    rc = 0;
+                                else
+                                {
+                                    ERROR ( rc, "failed to remap file 'src.%.*s%s'",
+                                            self -> owner_spec_size, self -> full_spec, relpath );
+                                }
+                                break;
+                            }
+                        }
+                    }
+
+                    KMMapRelease ( mm );
+                }
+
+                KFileRelease ( s );
+            }
+
+            KFileRelease ( d );
+        }
+    }
+
+    return rc;
+}
+
+static
+rc_t DirPairCopyAlias ( const DirPair *self, const ctx_t *ctx,
+    const KDirectory *src, KDirectory *dst, char *relpath )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+#if WINDOWS
+    rc = RC ( rcExe, rcAlias, rcCopying, rcFunction, rcUnsupported );
+    ERROR ( rc, "Windows... failed to create alias 'dst.%.*s%s'",
+            self -> owner_spec_size, self -> full_spec, relpath );
+#else
+    char apath [ 4096 ];
+
+    /* resolve the alias */
+    rc = KDirectoryResolveAlias ( src, false, apath, sizeof apath, "%s", relpath );    
+    if ( rc != 0 )
+    {
+        ERROR ( rc, "failed to resolve alias 'src.%.*s%s'",
+                self -> owner_spec_size, self -> full_spec, relpath );
+    }
+    else
+    {
+        rc = KDirectoryCreateAlias ( dst, 0777, kcmInit, apath, relpath );
+        if ( rc != 0 )
+        {
+            ERROR ( rc, "failed to create alias 'dst.%.*s%s'",
+                    self -> owner_spec_size, self -> full_spec, relpath );
+        }
+    }
+#endif
+
+    return rc;
+}
+
+static
+rc_t CC DirPairCopyEntry ( const KDirectory *local, uint32_t type, const char *name, void *data )
+{
+    DirPairCopyParams *pb = data;
+    const ctx_t *ctx = pb -> ctx;
+
+    FUNC_ENTRY ( ctx );
+
+    const DirPair *self = pb -> self;
+    char *relpath = pb -> relpath;
+    size_t num_writ, psize = pb -> psize;
+
+    /* since we are walking two directories in parallel,
+       build a path relative to each base directory and go */
+    rc_t rc = string_printf ( & relpath [ psize ], 4096 - psize, & num_writ, "/%s", name );
+    if ( rc != 0 )
+    {
+        ERROR ( rc, "failed to build path for entry '%.*s%.*s/%s'",
+                self -> owner_spec_size, self -> full_spec,
+                ( uint32_t ) psize, relpath, name );
+        return rc;
+    }
+
+    /* see what type of entry we have */
+    switch ( type )
+    {
+    case kptFile:
+        return DirPairCopyFile ( pb -> self, ctx, pb -> src, pb -> dst, relpath );
+    case kptDir:
+        return DirPairCopyDir ( pb -> self, ctx, pb -> src, pb -> dst, relpath, psize + num_writ );
+    case kptFile | kptAlias:
+    case kptDir | kptAlias:
+        return DirPairCopyAlias ( pb -> self, ctx, pb -> src, pb -> dst, relpath );
+    }
+
+    rc = RC ( rcExe, rcDirectory, rcVisiting, rcType, rcUnsupported );
+    ERROR ( rc, "cannot copy entry '%.*s%s' - not a supported file system type",
+            self -> owner_spec_size, self -> full_spec, relpath );
+    return rc;
+}
+
+static
+rc_t DirPairCopyDir ( const DirPair *self, const ctx_t *ctx,
+    const KDirectory *src, KDirectory *dst, char *relpath, size_t psize )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* get source access mode */
+    uint32_t access;
+    rc_t rc = KDirectoryAccess ( src, & access, "%s", relpath );
+    if ( rc != 0 )
+    {
+        ERROR ( rc, "failed to determine access mode of directory 'src.%.*s%s'",
+                self -> owner_spec_size, self -> full_spec, relpath );
+    }
+    else
+    {
+        /* create the destination directory */
+        rc = KDirectoryCreateDir ( dst, access, kcmOpen | kcmParents, "%s", relpath );
+        if ( rc != 0 )
+            ERROR ( rc, "failed to create directory 'dst.%.*s%s'",
+                    self -> owner_spec_size, self -> full_spec, relpath );
+        else
+        {
+            DirPairCopyParams pb;
+
+            pb . self = self;
+            pb . ctx = ctx;
+            pb . relpath = relpath;
+            pb . psize = psize;
+            pb . src = src;
+            pb . dst = dst;
+
+            /* going to perform shallow copy */
+            rc = KDirectoryVisit ( src, false, DirPairCopyEntry, & pb, "%s", relpath );
+        }
+    }
+
+    return rc;
+}
+
+
+void DirPairCopy ( DirPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    size_t psize;
+    char relpath [ 4096 ];
+
+    STATUS ( 2, "copying directory '%s'", self -> full_spec );
+
+    rc = string_printf ( relpath, sizeof relpath, & psize, "./%s", self -> name );
+    if ( rc != 0 )
+        INTERNAL_ERROR ( rc, "failed to build initial path string for '%s'", self -> full_spec );
+    else
+    {
+        DirPairCopyDir ( self, ctx, self -> sdir, self -> ddir, relpath, psize );
+    }
+}
+
+
+/* Init
+ */
+void DirPairInit ( DirPair *self, const ctx_t *ctx, const DirPair_vt *vt,
+    const KDirectory *src, KDirectory *dst,
+    const char *name, const char *full_spec )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    if ( self == NULL )
+    {
+        rc = RC ( rcExe, rcDirectory, rcConstructing, rcSelf, rcNull );
+        INTERNAL_ERROR ( rc, "bad DirPair" );
+        return;
+    }
+
+    memset ( self, 0, sizeof * self );
+    self -> vt = vt;
+
+    rc = KDirectoryAddRef ( self -> sdir = src );
+    if ( rc != 0 )
+        ERROR ( rc, "failed to duplicate dir 'src.%s./%s'", full_spec, name );
+    else
+    {
+        rc = KDirectoryAddRef ( self -> ddir = dst );
+        if ( rc != 0 )
+            ERROR ( rc, "failed to duplicate dir 'dst.%s./%s'", full_spec, name );
+        else
+        {
+            char *new_full_spec;
+
+            self -> owner_spec_size = ( uint32_t ) string_size ( full_spec );
+            self -> full_spec_size = self -> owner_spec_size + string_size ( name ) + 2;
+
+            TRY ( new_full_spec = MemAlloc ( ctx, self -> full_spec_size + 1, false ) )
+            {
+                rc = string_printf ( new_full_spec, self -> full_spec_size + 1, NULL, "%s./%s", full_spec, name );
+                if ( rc != 0 )
+                    ABORT ( rc, "miscalculated string size" );
+                else
+                {
+                    self -> full_spec = new_full_spec;
+                    self -> name = new_full_spec + self -> owner_spec_size + 2;
+
+                    KRefcountInit ( & self -> refcount, 1, "DirPair", "init", name );
+                    return;
+                }
+            }
+
+            KDirectoryRelease ( self -> ddir );
+            self -> ddir = NULL;
+        }
+
+        KDirectoryRelease ( self -> sdir );
+        self -> sdir = NULL;
+    }
+}
+
+/* Destroy
+ */
+void DirPairDestroy ( DirPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    rc = KDirectoryRelease ( self -> ddir );
+    if ( rc != 0 )
+        WARN ( "KDirectoryRelease failed on 'dst.%s'", self -> full_spec );
+    KDirectoryRelease ( self -> sdir );
+
+    MemFree ( ctx, ( void* ) self -> full_spec, self -> full_spec_size + 1 );
+
+    memset ( self, 0, sizeof * self );
+}
diff --git a/tools/sra-sort/dir-pair.h b/tools/sra-sort/dir-pair.h
new file mode 100644
index 0000000..7bccb93
--- /dev/null
+++ b/tools/sra-sort/dir-pair.h
@@ -0,0 +1,124 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_dir_pair_
+#define _h_sra_sort_dir_pair_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+#ifndef _h_klib_refcount_
+#include <klib/refcount.h>
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct DbPair;
+struct KDirectory;
+
+
+/*--------------------------------------------------------------------------
+ * DirPair
+ *  interface to pairing of source and destination directories
+ */
+typedef struct DirPair_vt DirPair_vt;
+
+typedef struct DirPair DirPair;
+struct DirPair
+{
+    /* polymorphic */
+    const DirPair_vt *vt;
+
+    /* the pair of KDirectories */
+    struct KDirectory const *sdir;
+    struct KDirectory *ddir;
+
+    /* simple directory name */
+    const char *name;
+
+    /* full directory spec */
+    size_t full_spec_size;
+    const char *full_spec;
+
+    /* reference counting */
+    KRefcount refcount;
+
+    /* owner spec size */
+    uint32_t owner_spec_size;
+};
+
+#ifndef DIRPAIR_IMPL
+#define DIRPAIR_IMPL DirPair
+#endif
+
+struct DirPair_vt
+{
+    void ( * whack ) ( DIRPAIR_IMPL *self, const ctx_t *ctx );
+};
+
+
+/* Make
+ *  make a standard directory pair from existing KDirectory objects
+ */
+DirPair *DirPairMake ( const ctx_t *ctx,
+    struct KDirectory const *src, struct KDirectory *dst,
+    const char *name, const char *full_spec );
+
+DirPair *DbPairMakeStdDirPair ( struct DbPair *self, const ctx_t *ctx,
+    struct KDirectory const *src, struct KDirectory *dst, const char *name );
+
+
+/* Release
+ *  called by db at end of copy
+ */
+void DirPairRelease ( DirPair *self, const ctx_t *ctx );
+
+/* Duplicate
+ */
+DirPair *DirPairDuplicate ( DirPair *self, const ctx_t *ctx );
+
+
+/* Copy
+ *  copy from source to destination directory
+ */
+void DirPairCopy ( DirPair *self, const ctx_t *ctx );
+
+
+/* Init
+ */
+void DirPairInit ( DirPair *self, const ctx_t *ctx, const DirPair_vt *vt,
+    struct KDirectory const *src, struct KDirectory *dst,
+    const char *name, const char *opt_full_spec );
+
+/* Destroy
+ */
+void DirPairDestroy ( DirPair *self, const ctx_t *ctx );
+
+
+#endif /* _h_sra_sort_dir_pair_ */
diff --git a/tools/sra-sort/dump-blob-boundaries.c b/tools/sra-sort/dump-blob-boundaries.c
new file mode 100644
index 0000000..76cef4e
--- /dev/null
+++ b/tools/sra-sort/dump-blob-boundaries.c
@@ -0,0 +1,203 @@
+#include <kdb/manager.h>
+#include <kdb/database.h>
+#include <kdb/table.h>
+#include <kdb/column.h>
+#include <kdb/namelist.h>
+#include <klib/namelist.h>
+#include <klib/rc.h>
+
+#include <stdio.h>
+
+static int64_t blob_limit = 10;
+
+static
+uint32_t dump_col ( const KColumn *col, const char *dbname, const char *tblname, const char *colname )
+{
+    rc_t rc = 0;
+    int64_t row, first;
+    const KColumnBlob *blob;
+    uint32_t count, num_blobs;
+
+    for ( num_blobs = 0, row = 1; rc == 0 && num_blobs < blob_limit; ++ num_blobs, row = first + count )
+    {
+        rc = KColumnOpenBlobRead ( col, & blob, row );
+        if ( rc == 0 )
+        {
+            rc = KColumnBlobIdRange ( blob, & first, & count );
+            if ( rc != 0 )
+                fprintf ( stderr, "failed to get row-range for blob containing row '%s.%s.%s.%ld'\n", dbname, tblname, colname, row );
+            else
+            {
+                size_t num_read, remaining;
+                rc = KColumnBlobRead ( blob, 0, & first, 0, & num_read, & remaining );
+                if ( rc != 0 )
+                    fprintf ( stderr, "failed to get size of blob containing row '%s.%s.%s.%ld'\n", dbname, tblname, colname, row );
+                else
+                {
+                    printf ( "  %ld .. %ld ( %u rows ), %zu bytes\n", first, first + count - 1, count, remaining );
+                }
+            }
+
+            KColumnBlobRelease ( blob );
+        }
+        else if ( GetRCState ( rc ) == rcNotFound )
+            return num_blobs;
+        else
+        {
+            fprintf ( stderr, "failed to open blob for row '%s.%s.%s.%ld'\n", dbname, tblname, colname, row );
+        }
+    }
+
+    for ( ; rc == 0; ++ num_blobs, row = first + count )
+    {
+        rc = KColumnOpenBlobRead ( col, & blob, row );
+        if ( rc == 0 )
+        {
+            rc = KColumnBlobIdRange ( blob, & first, & count );
+            KColumnBlobRelease ( blob );
+        }
+    }
+
+    return num_blobs;
+}
+
+static
+void dump_col_name ( const KTable *tbl, const char *dbname, const char *tblname, const char *colname )
+{
+    const KColumn *col;
+    rc_t rc = KTableOpenColumnRead ( tbl, & col, "%s", colname );
+    if ( rc != 0 )
+        fprintf ( stderr, "failed to open column '%s.%s.%s'\n", dbname, tblname, colname );
+    else
+    {
+        uint32_t num_blobs;
+        printf ( "COLUMN '%s.%s.%s'\n", dbname, tblname, colname );
+        num_blobs = dump_col ( col, dbname, tblname, colname );
+        KColumnRelease ( col );
+        if ( num_blobs > blob_limit )
+            printf ( "  %u blobs in column\n", num_blobs );
+    }
+}
+
+static
+void dump_tbl ( const KTable *tbl, const char *tblname, int argc, char *argv [] )
+{
+    if ( argc >= 4 )
+    {
+        int i;
+        for ( i = 3; i < argc; ++ i )
+        {
+            dump_col_name ( tbl, argv [ 1 ], tblname, argv [ i ] );
+        }
+    }
+    else
+    {
+        KNamelist *names;
+        rc_t rc = KTableListCol ( tbl, & names );
+        if ( rc != 0 )
+            fprintf ( stderr, "failed to list columns for tbl '%s.%s'\n", argv [ 1 ], tblname );
+        else
+        {
+            uint32_t count;
+            rc = KNamelistCount ( names, & count );
+            if ( rc != 0 )
+                fprintf ( stderr, "failed to count columns for tbl '%s.%s'\n", argv [ 1 ], tblname );
+            else
+            {
+                uint32_t i;
+                for ( i = 0; i < count; ++ i )
+                {
+                    const char *name;
+                    rc = KNamelistGet ( names, i, & name );
+                    if ( rc != 0 )
+                        fprintf ( stderr, "failed to access column name [ %u ] for tbl '%s.%s'\n", i, argv [ 1 ], tblname );
+                    else
+                    {
+                        dump_col_name ( tbl, argv [ 1 ], tblname, name );
+                    }
+                }
+            }
+
+            KNamelistRelease ( names );
+        }
+    }
+}
+
+static
+void dump_tbl_name ( const KDatabase *db, const char *tblname, int argc, char *argv [] )
+{
+    const KTable *tbl;
+    rc_t rc = KDatabaseOpenTableRead ( db, & tbl, "%s", tblname );
+    if ( rc != 0 )
+        fprintf ( stderr, "failed to open table '%s.%s'\n", argv [ 1 ], tblname );
+    else
+    {
+        dump_tbl ( tbl, tblname, argc, argv );
+        KTableRelease ( tbl );
+    }
+}
+
+static
+void dump_db ( const KDatabase *db, int argc, char *argv [] )
+{
+    if ( argc >= 3 )
+        dump_tbl_name ( db, argv [ 2 ], argc, argv );
+    else
+    {
+        KNamelist *names;
+        rc_t rc = KDatabaseListTbl ( db, & names );
+        if ( rc != 0 )
+            fprintf ( stderr, "failed to list tables for db '%s'\n", argv [ 1 ] );
+        else
+        {
+            uint32_t count;
+            rc = KNamelistCount ( names, & count );
+            if ( rc != 0 )
+                fprintf ( stderr, "failed to count tables for db '%s'\n", argv [ 1 ] );
+            else
+            {
+                uint32_t i;
+                for ( i = 0; i < count; ++ i )
+                {
+                    const char *name;
+                    rc = KNamelistGet ( names, i, & name );
+                    if ( rc != 0 )
+                        fprintf ( stderr, "failed to access table name [ %u ] for db '%s'\n", i, argv [ 1 ] );
+                    else
+                    {
+                        dump_tbl_name ( db, name, argc, argv );
+                    }
+                }
+            }
+
+            KNamelistRelease ( names );
+        }
+    }
+}
+
+int main ( int argc, char *argv [] )
+{
+    if ( argc < 2 )
+        printf ( "Usage: %s database [ table [ col ... ] ]\n", argv [ 0 ] );
+    else
+    {
+        const KDBManager *mgr;
+        rc_t rc = KDBManagerMakeRead ( & mgr, NULL );
+        if ( rc == 0 )
+        {
+            const KDatabase *db;
+            rc = KDBManagerOpenDBRead ( mgr, & db, "%s", argv [ 1 ] );
+            if ( rc != 0 )
+                fprintf ( stderr, "failed to open database '%s'\n", argv [ 1 ] );
+            else
+            {
+                dump_db ( db, argc, argv );
+                KDatabaseRelease ( db );
+            }
+
+            KDBManagerRelease ( mgr );
+        }
+    }
+
+    return 0;
+}
diff --git a/tools/sra-sort/except.c b/tools/sra-sort/except.c
new file mode 100644
index 0000000..c95d7e0
--- /dev/null
+++ b/tools/sra-sort/except.c
@@ -0,0 +1,231 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "caps.h"
+#include "ctx.h"
+#include "except.h"
+#include "status.h"
+
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <klib/status.h>
+#include <klib/printf.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+
+FILE_ENTRY ( except );
+
+
+/*--------------------------------------------------------------------------
+ * exception-related activities
+ */
+
+static
+rc_t log_msg ( const ctx_t *ctx, uint32_t lineno, KLogLevel lvl, const char *msg )
+{
+#if _DEBUGGING
+    const ctx_info_t *ctx_info = ctx -> info;
+    return pLogMsg ( lvl, "$(mod)/$(file).c:$(line): $(func): $(msg)",
+                     "mod=%s,file=%s,line=%u,func=%s,msg=%s",
+                     ctx_info -> mod,
+                     ctx_info -> file,
+                     lineno,
+                     ctx_info -> func,
+                     msg );
+#else
+    return LogMsg ( lvl, msg );
+#endif
+}
+
+static
+rc_t log_err ( const ctx_t *ctx, uint32_t lineno, KLogLevel lvl, rc_t rc, const char *msg )
+{
+#if _DEBUGGING
+    const ctx_info_t *ctx_info = ctx -> info;
+    return pLogErr ( lvl, rc, "$(mod)/$(file).c:$(line): $(func): $(msg)",
+                     "mod=%s,file=%s,line=%u,func=%s,msg=%s",
+                     ctx_info -> mod,
+                     ctx_info -> file,
+                     lineno,
+                     ctx_info -> func,
+                     msg );
+#else
+    return LogErr ( lvl, rc, msg );
+#endif
+}
+
+static
+rc_t status_msg ( const ctx_t *ctx, uint32_t lineno, uint32_t level, const char *msg )
+{
+#if _DEBUGGING
+    const ctx_info_t *ctx_info = ctx -> info;
+    return KStsMsg ( "%s/%s.c:%u: %s: [ %u ] %s",
+                     ctx_info -> mod,
+                     ctx_info -> file,
+                     lineno,
+                     ctx_info -> func,
+                     level,
+                     msg );
+#else
+    return KStsMsg ( "%s", msg );
+#endif
+}
+
+
+/* Annotate
+ *  make some annotation
+ *  but not an error
+ */
+void Annotate ( const ctx_t *ctx, uint32_t lineno, KLogLevel level, const char *msg, ... )
+{
+    rc_t rc2;
+    size_t num_writ;
+    char buff [ 8 * 1024 ];
+
+    va_list args;
+    va_start ( args, msg );
+
+    rc2 = string_vprintf ( buff, sizeof buff, & num_writ, msg, args );
+    if ( rc2 != 0 )
+        log_err ( ctx, lineno, klogInt, rc2, "Annotate failure" );
+    else
+        log_msg ( ctx, lineno, level, buff );
+
+    va_end ( args );
+}
+
+
+/* Error
+ *  make an annotation
+ *  record an error as an rc_t
+ */
+void Error ( const ctx_t *ctx, uint32_t lineno, KLogLevel level, rc_t rc, const char *msg, ... )
+{
+    rc_t rc2;
+    ctx_t *mctx;
+    size_t num_writ;
+    char buff [ 8 * 1024 ];
+
+    va_list args;
+    va_start ( args, msg );
+
+    rc2 = string_vprintf ( buff, sizeof buff, & num_writ, msg, args );
+    if ( rc2 != 0 )
+        log_err ( ctx, lineno, klogInt, rc2, "Error annotation failure" );
+    else
+        log_err ( ctx, lineno, level, rc, buff );
+
+    va_end ( args );
+
+    for ( mctx = ( ctx_t* ) ctx; mctx != NULL && mctx -> rc == 0; mctx = ( ctx_t* ) mctx -> caller )
+        mctx -> rc = rc;
+}
+
+
+/* Abort
+ *  make an annotation
+ *  record an error as an rc_t
+ *  exit process
+ */
+void Abort ( const ctx_t *ctx, uint32_t lineno, rc_t rc, const char *msg, ... )
+{
+    rc_t rc2;
+    ctx_t *mctx;
+    size_t num_writ;
+    char buff [ 8 * 1024 ];
+
+    va_list args;
+    va_start ( args, msg );
+
+    rc2 = string_vprintf ( buff, sizeof buff, & num_writ, msg, args );
+    if ( rc2 != 0 )
+        log_err ( ctx, lineno, klogFatal, rc2, "Abort annotation failure" );
+    else
+        log_err ( ctx, lineno, klogFatal, rc, buff );
+
+    va_end ( args );
+
+    for ( mctx = ( ctx_t* ) ctx; mctx != NULL && mctx -> rc == 0; mctx = ( ctx_t* ) mctx -> caller )
+        mctx -> rc = rc;
+
+    exit ( -1 );
+}
+
+
+/* Clear
+ *  clears annotation and error
+ */
+void ClearAnnotation ( const ctx_t *ctx )
+{
+    ClearError ( ctx );
+}
+
+
+/* ClearError
+ *  clears error, leaving any annotation
+ */
+void ClearError ( const ctx_t *ctx )
+{
+    ctx_t *mctx;
+    for ( mctx = ( ctx_t* ) ctx; mctx != NULL && mctx -> rc != 0; mctx = ( ctx_t* ) mctx -> caller )
+        mctx -> rc = 0;
+}
+
+
+/* Status
+ *  report status
+ */
+void Status ( const ctx_t *ctx, uint32_t lineno, uint32_t level, const char *msg, ... )
+{
+    if ( KStsLevelGet () >= level )
+    {
+        rc_t rc2;
+        size_t num_writ;
+        char buff [ 8 * 1024 ];
+
+        va_list args;
+        va_start ( args, msg );
+
+        rc2 = string_vprintf ( buff, sizeof buff, & num_writ, msg, args );
+        if ( rc2 != 0 )
+            log_err ( ctx, lineno, klogInt, rc2, "Status failure" );
+        else
+            status_msg ( ctx, lineno, level, buff );
+
+        va_end ( args );
+    }
+}
+
+/* POLY_DISPATCH
+ *  dispatch a polymorphic message
+ */
+void null_self_error ( const ctx_t *ctx, uint32_t lineno, const char *msg )
+{
+    rc_t rc = RC ( rcExe, rcFunction, rcResolving, rcSelf, rcNull );
+    Error ( ctx, lineno, klogInt, rc, "cannot dispatch message '%s'", msg );
+}
diff --git a/tools/sra-sort/except.h b/tools/sra-sort/except.h
new file mode 100644
index 0000000..911149b
--- /dev/null
+++ b/tools/sra-sort/except.h
@@ -0,0 +1,160 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_except_
+#define _h_sra_sort_except_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+#ifndef _h_klib_log_
+#include <klib/log.h>
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * exception-related macros
+ */
+
+
+/* ANNOTATE
+ *  make some annotation
+ *  but not an error
+ */
+void Annotate ( const ctx_t *ctx, uint32_t lineno, KLogLevel level, const char *msg, ... );
+#define ANNOTATE( msg, ... ) \
+    Annotate ( ctx, __LINE__, klogInfo, msg, ## __VA_ARGS__ )
+
+
+/* WARN
+ *  make some annotation
+ *  but not an error
+ */
+#define WARN( msg, ... ) \
+    Annotate ( ctx, __LINE__, klogWarn, msg, ## __VA_ARGS__ )
+
+
+/* INFO_ERROR
+ *  make an annotation
+ *  record an informational error as an rc_t
+ */
+void Error ( const ctx_t *ctx, uint32_t lineno, KLogLevel level, rc_t rc, const char *msg, ... );
+#define INFO_ERROR( rc, msg, ... ) \
+    Error ( ctx, __LINE__, klogInfo, rc, msg, ## __VA_ARGS__ )
+
+
+/* ERROR
+ *  make an annotation
+ *  record an error as an rc_t
+ */
+#ifdef ERROR
+#undef ERROR
+#endif
+#define ERROR( rc, msg, ... ) \
+    Error ( ctx, __LINE__, klogErr, rc, msg, ## __VA_ARGS__ )
+
+
+/* INTERNAL_ERROR
+ *  make an annotation
+ *  record an internal error as an rc_t
+ */
+#define INTERNAL_ERROR( rc, msg, ... ) \
+    Error ( ctx, __LINE__, klogInt, rc, msg, ## __VA_ARGS__ )
+
+
+/* SYSTEM_ERROR
+ *  make an annotation
+ *  record a system error as an rc_t
+ */
+#define SYSTEM_ERROR( rc, msg, ... ) \
+    Error ( ctx, __LINE__, klogSys, rc, msg, ## __VA_ARGS__ )
+
+
+/* ABORT
+ *  make an annotation
+ *  record an error as an rc_t
+ *  exit process
+ */
+void Abort ( const ctx_t *ctx, uint32_t lineno, rc_t rc, const char *msg, ... );
+#define ABORT( rc, msg, ... )                        \
+    Abort ( ctx, __LINE__, rc, msg, ## __VA_ARGS__ )
+
+
+/* FAILED
+ *  a test of rc within ctx_t
+ */
+#ifdef FAILED
+#undef FAILED
+#endif
+#define FAILED() \
+    ( ctx -> rc != 0 )
+
+
+/* TRY
+ *  another C language "try" macro
+ */
+#define TRY( expr ) \
+    expr; \
+    if ( ! FAILED () )
+
+
+/* CATCH
+ *  attempts to catch rc on certain types
+ */
+#define CATCH( obj_code, state_code ) \
+    else if ( GetRCObject ( ctx -> rc ) == obj_code && GetRCState ( ctx -> rc ) == state_code )
+#define CATCH_STATE( state_code ) \
+    else if ( GetRCState ( ctx -> rc ) == state_code )
+#define CATCH_OBJ( obj_code ) \
+    else if ( GetRCObject ( ctx -> rc ) == obj_code )
+#define CATCH_ALL() \
+    else
+
+/* ON_FAIL
+ */
+#define ON_FAIL( expr ) \
+    expr; \
+    if ( FAILED () )
+
+
+/* CLEAR
+ *  clears annotation and error
+ */
+void ClearAnnotation ( const ctx_t *ctx );
+#define CLEAR() \
+    ClearAnnotation ( ctx )
+
+
+/* CLEAR_ERR
+ *  clears error, leaving any annotation
+ */
+void ClearError ( const ctx_t *ctx );
+#define CLEAR_ERR() \
+    ClearError ( ctx )
+
+
+#endif
diff --git a/tools/sra-sort/gcc-ped.sh b/tools/sra-sort/gcc-ped.sh
new file mode 100755
index 0000000..7db5891
--- /dev/null
+++ b/tools/sra-sort/gcc-ped.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# test gcc for support of supplied parameters
+
+if test $# -ge 4
+then
+    if ( echo "typedef int x;" | gcc -c -xc - -o /dev/null $1 $2 $3 $4 > /dev/null 2>&1 )
+    then
+	echo $1 $2 $3 $4
+	exit 0
+    fi
+fi
+
+if test $# -ge 3
+then
+    if ( echo "typedef int x;" | gcc -c -xc - -o /dev/null $1 $2 $3 > /dev/null 2>&1 )
+    then
+	echo $1 $2 $3
+	exit 0
+    fi
+fi
+
+if test $# -ge 2
+then
+    if ( echo "typedef int x;" | gcc -c -xc - -o /dev/null $1 $2 > /dev/null 2>&1 )
+    then
+	echo $1 $2
+	exit 0
+    fi
+fi
+
+if test $# -ge 1
+then
+    if ( echo "typedef int x;" | gcc -c -xc - -o /dev/null $1 > /dev/null 2>&1 )
+    then
+	echo $1
+	exit 0
+    fi
+fi
diff --git a/tools/sra-sort/glob-poslen.c b/tools/sra-sort/glob-poslen.c
new file mode 100644
index 0000000..4f028a4
--- /dev/null
+++ b/tools/sra-sort/glob-poslen.c
@@ -0,0 +1,349 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+struct GlobalPosLenReader;
+#define COLREADER_IMPL struct GlobalPosLenReader
+
+#include "glob-poslen.h"
+#include "tbl-pair.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+#include "map-file.h"
+#include "sra-sort.h"
+
+#include <insdc/insdc.h>
+#include <vdb/cursor.h>
+#include <vdb/vdb-priv.h>
+#include <klib/printf.h>
+#include <klib/sort.h>
+#include <klib/rc.h>
+
+#include <string.h>
+#include <assert.h>
+
+FILE_ENTRY ( glob-poslen );
+
+
+/*--------------------------------------------------------------------------
+ * GlobalPosLenReader
+ */
+struct GlobalPosLenReader
+{
+    ColumnReader dad;
+
+    uint64_t poslen;
+
+    const VCursor *curs;
+    uint32_t idx [ 3 ];
+
+    uint32_t chunk_size;
+
+    size_t full_spec_size;
+    char full_spec [ 1 ];
+};
+
+static
+void GlobalPosLenReaderWhack ( GlobalPosLenReader *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    VCursorRelease ( self -> curs );
+    MemFree ( ctx, self, sizeof * self + self -> full_spec_size );
+}
+
+static
+const char *GlobalPosLenReaderFullSpec ( const GlobalPosLenReader *self, const ctx_t *ctx )
+{
+    return self -> full_spec;
+}
+
+static
+uint64_t GlobalPosLenReaderIdRange ( const GlobalPosLenReader *self, const ctx_t *ctx, int64_t *opt_first )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    uint64_t count;
+
+    rc = VCursorIdRange ( self -> curs, 0, opt_first, & count );
+    if ( rc != 0 )
+        ERROR ( rc, "VCursorIdRange failed on '%s'", self -> full_spec );
+
+    return count;
+}
+
+static
+void GlobalPosLenReaderPreCopy ( GlobalPosLenReader *self, const ctx_t *ctx )
+{
+}
+
+static
+void GlobalPosLenReaderPostCopy ( GlobalPosLenReader *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    /* called after a single copy
+       assumes that entire row-range of table has been copied */
+
+    rc = VCursorRelease ( self -> curs );
+    if ( rc != 0 )
+        ERROR ( rc, "VCursorRelease failed on '%s'", self -> full_spec );
+    else
+        self -> curs = NULL;
+}
+
+static
+const void *GlobalPosLenReaderReadGlobal ( GlobalPosLenReader *self, const ctx_t *ctx,
+    int64_t row_id, uint32_t *elem_bits, uint32_t *boff, uint32_t *row_len )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    const void *base;
+
+    assert ( elem_bits != NULL );
+    assert ( boff != NULL );
+    assert ( row_len != NULL );
+
+    rc = VCursorCellDataDirect ( self -> curs, row_id, self -> idx [ 0 ],
+        elem_bits, & base, boff, row_len );
+    if ( rc != 0 )
+        ERROR ( rc, "failed to read REF_LEN for row %ld", row_id );
+    else
+    {
+        INSDC_coord_len ref_len;
+        assert ( * boff == 0 );
+        assert ( * row_len == 1 );
+        assert ( * elem_bits == sizeof ref_len * 8 );
+        ref_len = ( ( const INSDC_coord_len* ) base ) [ 0 ];
+
+        rc = VCursorCellDataDirect ( self -> curs, row_id, self -> idx [ 1 ],
+            elem_bits, & base, boff, row_len );
+        if ( rc != 0 )
+            ERROR ( rc, "failed to read GLOBAL_REF_START for row %ld", row_id );
+        else
+        {
+            uint64_t pos;
+            assert ( * boff == 0 );
+            assert ( * row_len == 1 );
+            assert ( * elem_bits == sizeof ( uint64_t ) * 8 );
+            pos = ( ( const uint64_t* ) base ) [ 0 ];
+
+            self -> poslen = encode_pos_len ( pos, ref_len );
+#if 1
+            assert ( decode_pos_len ( self -> poslen ) == pos );
+            assert ( poslen_to_len ( self -> poslen ) == ref_len );
+#endif
+            return & self -> poslen;
+        }
+    }
+
+    return NULL;
+
+}
+
+static
+const void *GlobalPosLenReaderReadLocal ( GlobalPosLenReader *self, const ctx_t *ctx,
+    int64_t row_id, uint32_t *elem_bits, uint32_t *boff, uint32_t *row_len )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    const void *base;
+
+    assert ( elem_bits != NULL );
+    assert ( boff != NULL );
+    assert ( row_len != NULL );
+
+    rc = VCursorCellDataDirect ( self -> curs, row_id, self -> idx [ 0 ],
+        elem_bits, & base, boff, row_len );
+    if ( rc != 0 )
+        ERROR ( rc, "failed to read REF_LEN for row %ld", row_id );
+    else
+    {
+        INSDC_coord_len ref_len;
+        assert ( * boff == 0 );
+        assert ( * row_len == 1 );
+        assert ( * elem_bits == sizeof ref_len * 8 );
+        ref_len = ( ( const INSDC_coord_len* ) base ) [ 0 ];
+
+        rc = VCursorCellDataDirect ( self -> curs, row_id, self -> idx [ 1 ],
+            elem_bits, & base, boff, row_len );
+        if ( rc != 0 )
+            ERROR ( rc, "failed to read REF_START for row %ld", row_id );
+        else
+        {
+            INSDC_coord_zero ref_start;
+            assert ( * boff == 0 );
+            assert ( * row_len == 1 );
+            assert ( * elem_bits == sizeof ref_start * 8 );
+            ref_start = ( ( const INSDC_coord_zero* ) base ) [ 0 ];
+
+            rc = VCursorCellDataDirect ( self -> curs, row_id, self -> idx [ 2 ],
+                elem_bits, & base, boff, row_len );
+            if ( rc != 0 )
+                ERROR ( rc, "failed to read REF_ID for row %ld", row_id );
+            else
+            {
+                int64_t ref_id;
+                assert ( * boff == 0 );
+                assert ( * row_len == 1 );
+                assert ( * elem_bits == sizeof ref_id * 8 );
+                ref_id = ( ( const int64_t* ) base ) [ 0 ];
+
+                if ( ref_id <= 0 )
+                    self -> poslen = 0;
+                else
+                {
+                    uint64_t pos = local_to_global ( ref_id, self -> chunk_size, ref_start );
+                    self -> poslen = encode_pos_len ( pos, ref_len );
+#if 1
+                    assert ( global_to_row_id ( pos, self -> chunk_size ) == ref_id );
+                    assert ( decode_pos_len ( self -> poslen ) == pos );
+                    assert ( poslen_to_len ( self -> poslen ) == ref_len );
+#endif
+                }
+
+                return & self -> poslen;
+            }
+        }
+    }
+
+    return NULL;
+}
+
+static  ColumnReader_vt GlobalPosLenReader_vt =
+{
+    GlobalPosLenReaderWhack,
+    GlobalPosLenReaderFullSpec,
+    GlobalPosLenReaderIdRange,
+    GlobalPosLenReaderPreCopy,
+    GlobalPosLenReaderPostCopy,
+    GlobalPosLenReaderReadGlobal
+};
+
+static  ColumnReader_vt LocalPosLenReader_vt =
+{
+    GlobalPosLenReaderWhack,
+    GlobalPosLenReaderFullSpec,
+    GlobalPosLenReaderIdRange,
+    GlobalPosLenReaderPreCopy,
+    GlobalPosLenReaderPostCopy,
+    GlobalPosLenReaderReadLocal
+};
+
+
+
+/* MakeGlobalPosLenReader
+ */
+ColumnReader *TablePairMakeGlobalPosLenReader ( TablePair *self, const ctx_t *ctx, uint32_t chunk_size )
+{
+    FUNC_ENTRY ( ctx );
+
+    GlobalPosLenReader *reader;
+    size_t full_spec_size = self -> full_spec_size + sizeof "src..GLOBAL_POSLEN" - 1;
+
+    TRY ( reader = MemAlloc ( ctx, sizeof * reader + full_spec_size, false ) )
+    {
+        /* we don't yet know whether the reader will have GLOBAL_REF_START */
+        TRY ( ColumnReaderInit ( & reader -> dad, ctx, & GlobalPosLenReader_vt ) )
+        {
+            rc_t rc = string_printf ( reader -> full_spec, full_spec_size + 1, NULL, "src.%s.GLOBAL_POSLEN", self -> full_spec );
+            if ( rc != 0 )
+                ABORT ( rc, "cannot seem to calculate string sizes" );
+            else
+            {
+                rc = VTableCreateCursorRead ( self -> stbl, & reader -> curs );
+                if ( rc != 0 )
+                    ERROR ( rc, "failed to create cursor on 'src.%s'", self -> full_spec );
+                else
+                {
+                    /* we need length as a 2nd sorting key */
+                    rc = VCursorAddColumn ( reader -> curs, & reader -> idx [ 0 ], "REF_LEN" );
+                    if ( rc != 0 )
+                        ERROR ( rc, "VCursorAddColumn failed on '%s' cursor", self -> full_spec );
+                    else
+                    {
+                        /* add columns AFTER open */
+                        rc = VCursorPermitPostOpenAdd ( reader -> curs );
+                        if ( rc != 0 )
+                            ERROR ( rc, "VCursorPermitPostOpenAdd failed on '%s' cursor", self -> full_spec );
+                        else
+                        {
+                            /* open single-column cursor - errors adding further columns
+                               help determine what type of positioning we have */
+                            rc = VCursorOpen ( reader -> curs );
+                            if ( rc != 0 )
+                                ERROR ( rc, "VCursorOpen failed on '%s' cursor", self -> full_spec );
+                            else
+                            {
+                                /* finish initialization */
+                                reader -> chunk_size = chunk_size;
+                                reader -> full_spec_size = ( uint32_t ) full_spec_size;
+
+                                /* now try to get GLOBAL_REF_START */
+                                rc = VCursorAddColumn ( reader -> curs, & reader -> idx [ 1 ], "GLOBAL_REF_START" );
+                                if ( rc == 0 )
+                                {
+                                    STATUS ( 3, "'%s' table has GLOBAL_REF_START", self -> full_spec );
+                                    
+                                    /* retrieval function returns this position directly */
+                                    return & reader -> dad;
+                                }
+
+                                /* try for local refpos */
+                                rc = VCursorAddColumn ( reader -> curs, & reader -> idx [ 1 ], "REF_START" );
+                                if ( rc == 0 )
+                                    rc = VCursorAddColumn ( reader -> curs, & reader -> idx [ 2 ], "REF_ID" );
+                                if ( rc == 0 )
+                                {
+                                    STATUS ( 3, "'%s' table has local REF_START", self -> full_spec );
+
+                                    /* retrieval function synthesizes local to global */
+                                    reader -> dad . vt = & LocalPosLenReader_vt;
+                                    return & reader -> dad;
+                                }
+
+                                ERROR ( rc, "failed to populate '%s' cursor", reader -> full_spec );
+                            }
+                        }
+                    }
+
+                    VCursorRelease ( reader -> curs );
+                }
+            }
+        }
+
+        MemFree ( ctx, reader, sizeof * reader + full_spec_size );
+    }
+
+    return NULL;
+}
diff --git a/tools/sra-sort/glob-poslen.h b/tools/sra-sort/glob-poslen.h
new file mode 100644
index 0000000..0a39102
--- /dev/null
+++ b/tools/sra-sort/glob-poslen.h
@@ -0,0 +1,95 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_glob_poslen_
+#define _h_sra_sort_glob_poslen_
+
+#ifndef _h_sra_sort_col_pair_
+#include "col-pair.h"
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct TablePair;
+
+
+/*--------------------------------------------------------------------------
+ * inline functions
+ */
+#define MAX_POS_BITS 34
+#define MAX_LEN_BITS ( 64 - MAX_POS_BITS )
+
+
+static __inline__
+uint64_t encode_pos_len ( uint64_t pos, uint32_t len )
+{
+    assert ( pos < ( ( ~ ( uint64_t ) 0 ) >> MAX_LEN_BITS ) );
+    assert ( 0 < len && len <= ( ( ~ ( uint32_t ) 0 ) >> ( 32 - MAX_LEN_BITS ) ) );
+
+    /* position ascending, length descending */
+    return ( ( pos + 1 ) << MAX_LEN_BITS ) - len;
+}
+
+static __inline__
+uint64_t decode_pos_len ( uint64_t pos_len )
+{
+    return pos_len >> MAX_LEN_BITS;
+}
+
+static __inline__
+uint32_t poslen_to_len ( uint64_t pos_len )
+{
+    return ( 1U << MAX_LEN_BITS ) - ( ( uint32_t ) pos_len & ( ( ~ ( uint32_t ) 0 ) >> ( 32 - MAX_LEN_BITS ) ) );
+}
+
+static __inline__
+uint64_t local_to_global ( int64_t row_id, uint32_t chunk_size, uint32_t offset )
+{
+    assert ( row_id > 0 );
+    return ( row_id - 1 ) * chunk_size + offset;
+}
+
+static __inline__
+int64_t global_to_row_id ( uint64_t pos, uint32_t chunk_size )
+{
+    return ( pos / chunk_size ) + 1;
+}
+
+
+/*--------------------------------------------------------------------------
+ * GlobalPosLenReader
+ */
+typedef struct GlobalPosLenReader GlobalPosLenReader;
+
+
+/* MakeGlobalPosLenReader
+ */
+ColumnReader *TablePairMakeGlobalPosLenReader ( struct TablePair *self, const ctx_t *ctx, uint32_t chunk_size );
+
+
+#endif /* _h_sra_sort_glob_poslen_ */
diff --git a/tools/sra-sort/id-mapper-col.c b/tools/sra-sort/id-mapper-col.c
new file mode 100644
index 0000000..0bfea9b
--- /dev/null
+++ b/tools/sra-sort/id-mapper-col.c
@@ -0,0 +1,260 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct MapRowIdColWriter MapRowIdColWriter;
+#define COLWRITER_IMPL MapRowIdColWriter
+
+#include "id-mapper-col.h"
+#include "map-file.h"
+#include "csra-tbl.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+#include "sra-sort.h"
+
+#include <klib/rc.h>
+
+#include <string.h>
+
+FILE_ENTRY ( id-mapper-col );
+
+
+/*--------------------------------------------------------------------------
+ * MapRowIdColWriter
+ */
+
+struct MapRowIdColWriter
+{
+    ColumnWriter dad;
+
+    ColumnWriter *cw;
+
+    MapFile *idx;
+
+    int64_t *row;
+    uint32_t max_row_len;
+
+    bool assign_ids;
+};
+
+/* called by Release */
+static
+void MapRowIdColWriterDestroy ( MapRowIdColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    ColumnWriterRelease ( self -> cw, ctx );
+    self -> cw = NULL;
+
+    MapFileRelease ( self -> idx, ctx );
+    self -> idx = NULL;
+
+    if ( self -> row != NULL )
+    {
+        MemFree ( ctx, self -> row, sizeof * self -> row * self -> max_row_len );
+        self -> row = NULL;
+        self -> max_row_len = 0;
+    }
+}
+
+static
+void MapRowIdColWriterWhack ( MapRowIdColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    MapRowIdColWriterDestroy ( self, ctx );
+    ColumnWriterDestroy ( & self -> dad, ctx );
+    MemFree ( ctx, self, sizeof * self );
+}
+
+/* full spec */
+static
+const char* MapRowIdColWriterFullSpec ( const MapRowIdColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    return ColumnWriterFullSpec ( self -> cw, ctx );
+}
+
+static
+void MapRowIdColWriterPreCopy ( MapRowIdColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    ColumnWriterPreCopy ( self -> cw, ctx );
+}
+
+static
+void MapRowIdColWriterPostCopy ( MapRowIdColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( self -> max_row_len > 16 )
+    {
+        void *row;
+        TRY ( row = MemAlloc ( ctx, sizeof * self -> row * 16, false ) )
+        {
+            MemFree ( ctx, self -> row, sizeof * self -> row * self -> max_row_len );
+            self -> row = row;
+            self -> max_row_len = 16;
+        }
+        CATCH_ALL ()
+        {
+            CLEAR ();
+        }
+    }
+
+    ColumnWriterPostCopy ( self -> cw, ctx );
+}
+
+/* write row to destination */
+static
+void MapRowIdColWriterWrite ( MapRowIdColWriter *self, const ctx_t *ctx,
+    uint32_t elem_bits, const void *data, uint32_t boff, uint32_t row_len )
+{
+    FUNC_ENTRY ( ctx );
+
+    uint32_t i;
+
+    /* here is where the VALUE coming in, which is a row-id,
+       gets mapped to its new value before being written out */
+    assert ( elem_bits == sizeof * self -> row * 8 );
+    assert ( boff == 0 );
+
+    /* resize row if needed */
+    if ( self -> max_row_len < row_len )
+    {
+        MemFree ( ctx, self -> row, sizeof * self -> row * self -> max_row_len );
+
+        self -> max_row_len = ( row_len + 15 ) & ~ 15U;
+        ON_FAIL ( self -> row = MemAlloc ( ctx, sizeof * self -> row * self -> max_row_len, false ) )
+        {
+            ANNOTATE ( "failed to allocate memory for %u row-ids", self -> max_row_len );
+            return;
+        }
+    }
+
+    /* copy row */
+    memcpy ( self -> row, data, row_len * sizeof * self -> row );
+
+    /* map ids */
+    for ( i = 0; i < row_len; ++ i )
+    {
+        if ( self -> row [ i ] != 0 )
+        {
+            int64_t new_id;
+
+            /* map old row-id to new row-id */
+            ON_FAIL ( new_id = MapFileMapSingleOldToNew ( self -> idx, ctx, self -> row [ i ], self -> assign_ids ) )
+            {
+                ANNOTATE ( "failed to map source row-id %ld", self -> row [ i ] );
+                return;
+            }
+            if ( new_id == 0 )
+            {
+                rc_t rc = RC ( rcExe, rcColumn, rcWriting, rcId, rcNotFound );
+                ERROR ( rc, "failed to map source row-id %ld", self -> row [ i ] );
+                return;
+            }
+
+            self -> row [ i ] = new_id;
+        }
+    }
+
+    /* now write the translated ids */
+    ColumnWriterWrite ( self -> cw, ctx, sizeof * self -> row * 8, self -> row, 0, row_len );
+}
+
+static
+void MapRowIdColWriterWriteStatic ( MapRowIdColWriter *self, const ctx_t *ctx,
+    uint32_t elem_bits, const void *data, uint32_t boff, uint32_t row_len, uint64_t count )
+{
+    FUNC_ENTRY ( ctx );
+    rc_t rc = RC ( rcExe, rcColumn, rcWriting, rcType, rcIncorrect );
+    INTERNAL_ERROR ( rc, "writing to a non-static column" );
+}
+
+/* commit all writes */
+static
+void MapRowIdColWriterCommit ( MapRowIdColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    ColumnWriterCommit ( self -> cw, ctx );
+    MapRowIdColWriterDestroy ( self, ctx );
+}
+
+static ColumnWriter_vt MapRowIdColWriter_vt =
+{
+    MapRowIdColWriterWhack,
+    MapRowIdColWriterFullSpec,
+    MapRowIdColWriterPreCopy,
+    MapRowIdColWriterPostCopy,
+    MapRowIdColWriterWrite,
+    MapRowIdColWriterWriteStatic,
+    MapRowIdColWriterCommit
+};
+
+
+/* MakeMapRowIdWriter
+ *  if "assign_ids" is true, the MapFile will be asked to
+ *  map an old=>new id or assign (and record) a new id.
+ */
+ColumnWriter *TablePairMakeMapRowIdWriter ( TablePair *self,
+    const ctx_t *ctx, ColumnWriter *cw, MapFile *idx, bool assign_ids )
+{
+    FUNC_ENTRY ( ctx );
+
+    MapRowIdColWriter *writer;
+
+    TRY ( writer = MemAlloc ( ctx, sizeof * writer, false ) )
+    {
+        TRY ( ColumnWriterInit ( & writer -> dad, ctx, & MapRowIdColWriter_vt, true ) )
+        {
+            writer -> max_row_len = 16;
+            TRY ( writer -> row = MemAlloc ( ctx, sizeof * writer -> row * writer -> max_row_len, false ) )
+            {
+                TRY ( writer -> idx = MapFileDuplicate ( idx, ctx ) )
+                {
+                    TRY ( writer -> cw = ColumnWriterDuplicate ( cw, ctx ) )
+                    {
+                        writer -> assign_ids = assign_ids;
+                        return & writer -> dad;
+                    }
+
+                    MapFileRelease ( writer -> idx, ctx );
+                }
+
+                ColumnWriterDestroy ( & writer -> dad, ctx );
+            }
+
+            MemFree ( ctx, writer -> row, sizeof * writer -> row * writer -> max_row_len );
+        }
+
+        MemFree ( ctx, writer, sizeof * writer );
+    }
+
+    return NULL;
+}
diff --git a/tools/sra-sort/id-mapper-col.h b/tools/sra-sort/id-mapper-col.h
new file mode 100644
index 0000000..ae5770f
--- /dev/null
+++ b/tools/sra-sort/id-mapper-col.h
@@ -0,0 +1,55 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_id_mapper_col_
+#define _h_sra_sort_id_mapper_col_
+
+#ifndef _h_sra_sort_col_pair_
+#include "col-pair.h"
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct MapFile;
+struct TablePair;
+
+
+/*--------------------------------------------------------------------------
+ * MapRowIdColWriter
+ */
+
+
+/* MakeMapRowIdWriter
+ *  if "assign_ids" is true, the MapFile will be asked to
+ *  map an old=>new id or assign (and record) a new id.
+ */
+ColumnWriter *TablePairMakeMapRowIdWriter ( struct TablePair *self,
+    const ctx_t *ctx, ColumnWriter *cw, struct MapFile *idx, bool assign_ids );
+
+
+#endif /* _h_sra_sort_id_mapper_col_ */
diff --git a/tools/sra-sort/idx-mapping.c b/tools/sra-sort/idx-mapping.c
new file mode 100644
index 0000000..5552415
--- /dev/null
+++ b/tools/sra-sort/idx-mapping.c
@@ -0,0 +1,88 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "idx-mapping.h"
+#include "ctx.h"
+
+#include <klib/sort.h>
+
+FILE_ENTRY ( idx-mapping );
+
+
+/*--------------------------------------------------------------------------
+ * IdxMapping
+ *  
+ */
+
+#if USE_OLD_KSORT
+
+int64_t CC IdxMappingCmpOld ( const void *a, const void *b, void *data )
+{
+    const IdxMapping *ap = a;
+    const IdxMapping *bp = b;
+
+    return ap -> old_id < bp -> old_id ? -1 : ap -> old_id > bp -> old_id;
+}
+
+int64_t CC IdxMappingCmpNew ( const void *a, const void *b, void *data )
+{
+    const IdxMapping *ap = a;
+    const IdxMapping *bp = b;
+
+    return ap -> new_id < bp -> new_id ? -1 : ap -> new_id > bp -> new_id;
+}
+
+#else /* USE_OLD_KSORT */
+
+#define T( x ) ( ( const IdxMapping* ) ( x ) )
+
+#define SWAP( a, b, off, size ) KSORT_TSWAP ( IdxMapping, a, b )
+
+
+void IdxMappingSortOld ( IdxMapping *self, const ctx_t *ctx, size_t count )
+{
+#define CMP( a, b ) \
+    ( ( T ( a ) -> old_id < T ( b ) -> old_id ) ? -1 : ( T ( a ) -> old_id > T ( b ) -> old_id ) )
+
+    KSORT ( self, count, sizeof * self, 0, sizeof * self );
+
+#undef CMP
+}
+
+void IdxMappingSortNew ( IdxMapping *self, const ctx_t *ctx, size_t count )
+{
+#define CMP( a, b ) \
+    ( ( T ( a ) -> new_id < T ( b ) -> new_id ) ? -1 : ( T ( a ) -> new_id > T ( b ) -> new_id ) )
+
+    KSORT ( self, count, sizeof * self, 0, sizeof * self );
+
+#undef CMP
+}
+
+#undef T
+#undef SWAP
+
+#endif /* USE_OLD_KSORT */
diff --git a/tools/sra-sort/idx-mapping.h b/tools/sra-sort/idx-mapping.h
new file mode 100644
index 0000000..bbd031b
--- /dev/null
+++ b/tools/sra-sort/idx-mapping.h
@@ -0,0 +1,59 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_idx_mapping_
+#define _h_sra_sort_idx_mapping_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * IdxMapping
+ *  
+ */
+typedef struct IdxMapping IdxMapping;
+struct IdxMapping
+{
+    int64_t old_id, new_id;
+};
+
+#if USE_OLD_KSORT
+
+/* ksort callbacks */
+int64_t CC IdxMappingCmpOld ( const void *a, const void *b, void *data );
+int64_t CC IdxMappingCmpNew ( const void *a, const void *b, void *data );
+
+#else
+
+/* ksort_inlines */
+void IdxMappingSortOld ( IdxMapping *self, const ctx_t *ctx, size_t count );
+void IdxMappingSortNew ( IdxMapping *self, const ctx_t *ctx, size_t count );
+
+#endif
+
+#endif /* _h_sra_sort_idx_mapping_ */
diff --git a/tools/sra-sort/map-file.c b/tools/sra-sort/map-file.c
new file mode 100644
index 0000000..209876f
--- /dev/null
+++ b/tools/sra-sort/map-file.c
@@ -0,0 +1,1192 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "map-file.h"
+#include "idx-mapping.h"
+#include "ctx.h"
+#include "caps.h"
+#include "status.h"
+#include "mem.h"
+#include "sra-sort.h"
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/buffile.h>
+#include <klib/refcount.h>
+#include <klib/sort.h>
+#include <klib/rc.h>
+
+#include <string.h>
+#include <endian.h>
+#include <byteswap.h>
+
+#include "except.h"
+
+FILE_ENTRY ( map-file );
+
+
+/*--------------------------------------------------------------------------
+ * MapFile
+ *  a file for storing id mappings
+ */
+struct MapFile
+{
+    int64_t first_id;
+    uint64_t num_ids;
+    uint64_t num_mapped_ids;
+    int64_t max_new_id;
+    KFile *f_old, *f_new, *f_pos;
+    size_t id_size;
+    KRefcount refcount;
+};
+
+
+/* Whack
+ */
+static
+void MapFileWhack ( MapFile *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    rc_t rc = KFileRelease ( self -> f_old );
+    if ( rc != 0 )
+        SYSTEM_ERROR ( rc, "KFileRelease failed on old=>new" );
+    else
+    {
+        rc = KFileRelease ( self -> f_new );
+        if ( rc != 0 )
+            ABORT ( rc, "KFileRelease failed on new=>old" );
+        else if ( self -> f_pos != NULL )
+        {
+            rc = KFileRelease ( self -> f_pos );
+            if ( rc != 0 )
+                ABORT ( rc, "KFileRelease failed on global poslen temp column" );
+        }
+        
+        MemFree ( ctx, self, sizeof * self );
+    }
+}
+
+
+/* Make
+ *  creates an id map
+ */
+static
+void MapFileMakeFork ( KFile **fp, const ctx_t *ctx, const char *name,
+    KDirectory *wd, const char *tmpdir, int pid, size_t bsize, const char *fork )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* create temporary KFile */
+    rc_t rc;
+    KFile *backing;
+
+    rc = KDirectoryCreateFile ( wd, & backing, true,
+        0600, kcmInit | kcmParents, "%s/sra-sort-%s.%s.%d", tmpdir, name, fork, pid );
+    if ( rc != 0 )
+        SYSTEM_ERROR ( rc, "failed to create %s id map file '%s'", fork, name );
+    else
+    {
+#if ! WINDOWS
+        /* never try to remove files on Windows */
+        if ( ctx -> caps -> tool -> unlink_idx_files )
+        {
+            /* unlink KFile */
+            rc = KDirectoryRemove ( wd, false, "%s/sra-sort-%s.%s.%d", tmpdir, name, fork, pid );
+            if ( rc != 0 )
+                WARN ( "failed to unlink %s id map file '%s'", fork, name );
+        }
+#endif
+
+        /* create a read/write buffer file */
+        rc = KBufFileMakeWrite ( fp, backing, true, bsize );
+        if ( rc != 0 )
+            INTERNAL_ERROR ( rc, "failed to create buffer for %s id map file '%s'", fork, name );
+
+        KFileRelease ( backing );
+    }
+}
+
+static
+MapFile *MapFileMakeInt ( const ctx_t *ctx, const char *name, bool random, bool for_poslen )
+{
+    MapFile *mf;
+    TRY ( mf = MemAlloc ( ctx, sizeof * mf, true ) )
+    {
+        /* create KDirectory */
+        KDirectory *wd;
+        rc_t rc = KDirectoryNativeDir ( & wd );
+        if ( rc != 0 )
+            SYSTEM_ERROR ( rc, "failed to create native directory" );
+        else
+        {
+            const Tool *tp = ctx -> caps -> tool;
+            size_t bsize = random ? tp -> map_file_random_bsize : tp -> map_file_bsize;
+
+            /* create old=>new id file */
+            TRY ( MapFileMakeFork ( & mf -> f_old, ctx, name, wd, tp -> tmpdir, tp -> pid, bsize, "old" ) )
+            {
+                TRY ( MapFileMakeFork ( & mf -> f_new, ctx, name, wd, tp -> tmpdir, tp -> pid, 32 * 1024, "new" ) )
+                {
+                    if ( for_poslen )
+                        MapFileMakeFork ( & mf -> f_pos, ctx, name, wd, tp -> tmpdir, tp -> pid, 32 * 1024, "pos" );
+
+                    KDirectoryRelease ( wd );
+
+                    if ( ! FAILED () )
+                    {
+                        /* this is our guy */
+                        KRefcountInit ( & mf -> refcount, 1, "MapFile", "make", name );
+                        
+                        return mf;
+                    }
+
+                    KFileRelease ( mf -> f_new );
+                }
+
+                KFileRelease ( mf -> f_old );
+            }
+
+            KDirectoryRelease ( wd );
+        }
+
+        MemFree ( ctx, mf, sizeof * mf );
+    }
+
+    return NULL;
+}
+
+MapFile *MapFileMake ( const ctx_t *ctx, const char *name, bool random )
+{
+    FUNC_ENTRY ( ctx );
+    return MapFileMakeInt ( ctx, name, random, false );
+}
+
+/* MakeForPoslen
+ *  creates an id map with an additional poslen file
+ *  this is specially for PRIMARY_ALIGNMENT_IDS and SECONDARY_ALIGNMENT_IDS
+ *  that use *_ALIGNMENT global position and length as a sorting key
+ *  we drop it to a file after its generation so that it can be
+ *  picked up later when copying the corresponding alignment table.
+ */
+MapFile *MapFileMakeForPoslen ( const ctx_t *ctx, const char *name )
+{
+    FUNC_ENTRY ( ctx );
+    return MapFileMakeInt ( ctx, name, false, true );
+}
+
+
+/* Release
+ */
+void MapFileRelease ( const MapFile *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountDrop ( & self -> refcount, "MapFile" ) )
+        {
+        case krefOkay:
+            break;
+        case krefWhack:
+            MapFileWhack ( ( MapFile* ) self, ctx );
+            break;
+        case krefZero:
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcFile, rcDestroying, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to release MapFile" );
+        }
+    }
+}
+
+/* Duplicate
+ */
+MapFile *MapFileDuplicate ( const MapFile *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountAdd ( & self -> refcount, "MapFile" ) )
+        {
+        case krefOkay:
+        case krefWhack:
+        case krefZero:
+            break;
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcFile, rcAttaching, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to duplicate MapFile" );
+            return NULL;
+        }
+    }
+
+    return ( MapFile* ) self;
+}
+
+
+/* SsetIdRange
+ *  required second-stage initialization
+ *  must be called before any writes occur
+ */
+void MapFileSetIdRange ( MapFile *self, const ctx_t *ctx,
+    int64_t first_id, uint64_t num_ids )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self == NULL )
+    {
+        rc = RC ( rcExe, rcFile, rcUpdating, rcSelf, rcNull );
+        INTERNAL_ERROR ( rc, "bad self" );
+    }
+    else if ( self -> max_new_id != 0 )
+    {
+        rc = RC ( rcExe, rcFile, rcUpdating, rcConstraint, rcViolated );
+        INTERNAL_ERROR ( rc, "cannot change id range after writing has begun" );
+    }
+    else
+    {
+        /* record new first id and count */
+        self -> first_id = first_id;
+        self -> num_ids = num_ids;
+
+        /* determine id size for all ids PLUS 0 for NULL */
+        for ( ++ num_ids, self -> id_size = 1; self -> id_size < 8; ++ self -> id_size )
+        {
+            if ( num_ids <= ( ( uint64_t ) 1 ) << ( self -> id_size * 8 ) )
+                break;
+        }
+    }
+}
+
+
+/* First
+ *  return first mapped id
+ */
+int64_t MapFileFirst ( const MapFile *self, const ctx_t *ctx )
+{
+    return self -> first_id;
+}
+
+
+/* Count
+ *  return num_ids
+ */
+uint64_t MapFileCount ( const MapFile *self, const ctx_t *ctx )
+{
+    return self -> num_ids;
+}
+
+
+/* SetOldToNew
+ *  write old=>new id mappings
+ */
+void MapFileSetOldToNew ( MapFile *self, const ctx_t *ctx, const IdxMapping *ids, size_t count )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self == NULL )
+    {
+        rc = RC ( rcExe, rcFile, rcWriting, rcSelf, rcNull );
+        INTERNAL_ERROR ( rc, "bad self reference" );
+    }
+    else if ( self -> num_ids == 0 )
+    {
+        rc = RC ( rcExe, rcFile, rcWriting, rcRange, rcUndefined );
+        INTERNAL_ERROR ( rc, "SetIdRange must be called with a non-empty range" );
+    }
+    else
+    {
+        size_t i;
+        for ( i = 0; i < count; ++ i )
+        {
+            size_t num_writ;
+            /* zero-based index */
+            int64_t old_id = ids [ i ] . old_id - self -> first_id;
+            /* position in bytes */
+            uint64_t pos = old_id * self -> id_size;
+            /* 1-based translated new-id */
+            int64_t new_id = ids [ i ] . new_id - self -> first_id + 1;
+            assert ( old_id >= 0 );
+            assert ( new_id >= 0 );
+#if __BYTE_ORDER == __BIG_ENDIAN
+            new_id = bswap_64 ( new_id );
+#endif
+            rc = KFileWriteAll ( self -> f_old, pos, & new_id, self -> id_size, & num_writ );
+            if ( rc != 0 )
+            {
+                SYSTEM_ERROR ( rc, "failed to write old=>new id mapping" );
+                break;
+            }
+
+            if ( num_writ != self -> id_size )
+            {
+                rc = RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+                SYSTEM_ERROR ( rc, "failed to write old=>new id mapping" );
+                break;
+            }
+        }
+    }
+}
+
+
+/* SetNewToOld
+ *  write new=>old id mappings
+ */
+void MapFileSetNewToOld ( MapFile *self, const ctx_t *ctx, const IdxMapping *ids, size_t count )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self == NULL )
+    {
+        rc = RC ( rcExe, rcFile, rcWriting, rcSelf, rcNull );
+        INTERNAL_ERROR ( rc, "bad self reference" );
+    }
+    else if ( self -> num_ids == 0 )
+    {
+        rc = RC ( rcExe, rcFile, rcWriting, rcRange, rcUndefined );
+        INTERNAL_ERROR ( rc, "SetIdRange must be called with a non-empty range" );
+    }
+    else
+    {
+        if ( ! ctx -> caps -> tool -> write_new_to_old )
+            self -> max_new_id = self -> first_id + count - 1;
+        else
+        {
+            size_t i;
+            for ( i = 0; i < count; ++ i )
+            {
+                size_t num_writ;
+                /* zero based index */
+                int64_t new_id = ids [ i ] . new_id - self -> first_id;
+                /* zero based byte offset */
+                uint64_t pos = new_id * self -> id_size;
+                /* 1-based translated old-id */
+                int64_t old_id = ids [ i ] . old_id - self -> first_id + 1;
+                assert ( new_id >= 0 );
+                assert ( old_id >= 0 );
+#if __BYTE_ORDER == __BIG_ENDIAN
+                old_id = bswap_64 ( old_id );
+#endif
+                rc = KFileWriteAll ( self -> f_new, pos, & old_id, self -> id_size, & num_writ );
+                if ( rc != 0 )
+                {
+                    SYSTEM_ERROR ( rc, "failed to write new=>old id mapping" );
+                    break;
+                }
+                
+                if ( num_writ != self -> id_size )
+                {
+                    rc = RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+                    SYSTEM_ERROR ( rc, "failed to write new=>old id mapping" );
+                    break;
+                }
+                
+                self -> max_new_id = new_id + self -> first_id;
+            }
+        }
+    }
+}
+
+
+/* SetPoslen
+ *  write global position/length in new-id order
+ */
+void MapFileSetPoslen ( MapFile *self, const ctx_t *ctx, const IdxMapping *ids, size_t count )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self == NULL )
+    {
+        rc = RC ( rcExe, rcFile, rcWriting, rcSelf, rcNull );
+        INTERNAL_ERROR ( rc, "bad self reference" );
+    }
+    else if ( self -> f_pos == NULL )
+    {
+        rc = RC ( rcExe, rcFile, rcWriting, rcFile, rcIncorrect );
+        INTERNAL_ERROR ( rc, "MapFile must be created with MapFileMakeForPoslen" );
+    }
+    else if ( self -> num_ids == 0 )
+    {
+        rc = RC ( rcExe, rcFile, rcWriting, rcRange, rcUndefined );
+        INTERNAL_ERROR ( rc, "SetIdRange must be called with a non-empty range" );
+    }
+    else
+    {
+        /* start writing after the last new id recorded */
+        uint64_t pos = ( self -> max_new_id - self -> first_id + 1 ) * sizeof ids -> new_id;
+
+        size_t i;
+        for ( i = 0; i < count; pos += sizeof ids -> new_id, ++ i )
+        {
+            size_t num_writ;
+            int64_t poslen = ids [ i ] . new_id;
+#if __BYTE_ORDER == __BIG_ENDIAN
+            poslen = bswap_64 ( poslen );
+#endif
+            rc = KFileWriteAll ( self -> f_pos, pos, & poslen, sizeof ids -> new_id, & num_writ );
+            if ( rc != 0 )
+            {
+                SYSTEM_ERROR ( rc, "failed to write poslen temporary column" );
+                break;
+            }
+
+            if ( num_writ != sizeof ids -> new_id )
+            {
+                rc = RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+                SYSTEM_ERROR ( rc, "failed to write poslen temporary column" );
+                break;
+            }
+        }
+    }
+}
+
+
+/* ReadPoslen
+ *  read global position/length in new-id order
+ *  starts reading at the indicated row
+ *  returns the number read
+ */
+size_t MapFileReadPoslen ( const MapFile *self, const ctx_t *ctx,
+    int64_t start_id, uint64_t *poslen, size_t max_count )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    size_t total = 0;
+
+    if ( self == NULL )
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcSelf, rcNull );
+        INTERNAL_ERROR ( rc, "bad self reference" );
+    }
+    else if ( self -> f_pos == NULL )
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcFile, rcIncorrect );
+        INTERNAL_ERROR ( rc, "MapFile must be created with MapFileMakeForPoslen" );
+    }
+    /* the column is read until end, but
+       this is not an error. just return no-more-data */
+    else if ( start_id == self -> first_id + self -> num_ids )
+        return 0;
+    else if ( start_id < self -> first_id || start_id > self -> first_id + self -> num_ids )
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcParam, rcInvalid );
+        INTERNAL_ERROR ( rc, "start_id ( %ld ) is not within column range ( %ld .. %ld )",
+            start_id, self -> first_id, self -> first_id + self -> num_ids - 1 );
+    }
+    else if ( max_count != 0 )
+    {
+        /* limit read to number of ids in index */
+        if ( start_id + max_count > self -> first_id + self -> num_ids )
+            max_count = ( size_t ) ( self -> first_id + self -> num_ids - start_id );
+
+        if ( poslen == NULL )
+        {
+            rc = RC ( rcExe, rcFile, rcReading, rcBuffer, rcNull );
+            INTERNAL_ERROR ( rc, "bad buffer parameter" );
+        }
+        else
+        {
+            /* read as many bytes of id as possible */
+            size_t num_read, to_read = max_count * sizeof * poslen;
+            uint64_t pos = ( start_id - self -> first_id ) * sizeof * poslen;
+            rc = KFileReadAll ( self -> f_pos, pos, poslen, to_read, & num_read );
+            if ( rc != 0 )
+                SYSTEM_ERROR ( rc, "failed to read new=>old map" );
+            else
+            {
+                total = ( size_t ) ( num_read / sizeof * poslen );
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+                {
+                    /* revert byte-order */
+                    size_t i;
+                    for ( i = 0; i < total; ++ i )
+                        poslen [ i ] = bswap_64 ( poslen [ i ] );
+                }
+#endif
+            }
+        }
+    }
+
+    return total;
+}
+
+
+/* AllocMissingNewIds
+ *  it is possible to have written fewer new=>old mappings
+ *  than are supposed to be there, e.g. SEQUENCE that gets
+ *  initially written by align tables. unaligned sequences
+ *  need to fill in the remainder.
+ */
+static
+size_t make_missing_entry ( MapFile *self, const ctx_t *ctx,
+    IdxMapping *missing, size_t i, size_t max_missing_ids,
+    int64_t old_id, int64_t new_id )
+{
+    if ( i == max_missing_ids )
+    {
+        ON_FAIL ( MapFileSetNewToOld ( self, ctx, missing, i ) )
+            return i;
+
+        i = 0;
+    }
+
+    /* insert into missing id map */
+    missing [ i ] . old_id = old_id;
+    missing [ i ] . new_id = new_id;
+
+    /* update old=>new mapping */
+    MapFileSetOldToNew ( self, ctx, & missing [ i ], 1 );
+
+    return i + 1;
+}
+
+int64_t MapFileAllocMissingNewIds ( MapFile *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    int64_t first_allocated = 0;
+
+    if ( self == NULL )
+    {
+        rc = RC ( rcExe, rcFile, rcUpdating, rcSelf, rcNull );
+        INTERNAL_ERROR ( rc, "bad self reference" );
+    }
+    else if ( self -> num_ids == 0 )
+    {
+        rc = RC ( rcExe, rcFile, rcWriting, rcRange, rcUndefined );
+        INTERNAL_ERROR ( rc, "SetIdRange must be called with a non-empty range" );
+    }
+    else
+    {
+        uint64_t num_missing_ids = self -> num_ids - ( self -> max_new_id - self -> first_id + 1 );
+        if ( num_missing_ids != 0 )
+        {
+            IdxMapping *missing;
+
+            /* determine maximum missing id mappings */
+            size_t max_missing_ids = ctx -> caps -> tool -> max_missing_ids;
+            if ( ( uint64_t ) max_missing_ids > num_missing_ids )
+                max_missing_ids = ( size_t ) num_missing_ids;
+
+            /* allocate a buffer of IdxMapping */
+            TRY ( missing = MemAlloc ( ctx, sizeof * missing * max_missing_ids, false ) )
+            {
+                /* use a scan buffer somewhere around 32K,
+                   to keep page-file cache focused on a few pages */
+                void *scan_buffer;
+                const size_t scan_buffer_size = 32 * 1024;
+                TRY ( scan_buffer = MemAlloc ( ctx, scan_buffer_size, false ) )
+                {
+                    size_t i, num_read;
+                    int64_t new_id, old_id = self -> first_id;
+                    uint64_t eof = self -> num_ids * self -> id_size;
+
+                    /* this guy will be used to assign new ids */
+                    int64_t max_new_id = self -> max_new_id;
+                    int64_t entry_max_new_id = self -> max_new_id;
+
+
+                    /* in a loop, read as many ids as possible into scan buffer
+                       the number is dependent upon self->id_size */
+                    for ( i = 0; ; old_id += num_read )
+                    {
+                        size_t j, to_read;
+
+                        /* determine position from old_id */
+                        uint64_t pos = ( old_id - self -> first_id ) * self -> id_size;
+                        if ( pos == eof )
+                            break;
+
+                        /* determine bytes to read - this must be limited
+                           or we risk tricking page-buffer into resizing */
+                        to_read = scan_buffer_size;
+                        if ( pos + to_read > eof )
+                            to_read = ( size_t ) ( eof - pos );
+
+                        /* read as many bytes as we can */
+                        rc = KFileReadAll ( self -> f_old, pos, scan_buffer, to_read, & num_read );
+                        if ( rc != 0 )
+                        {
+                            SYSTEM_ERROR ( rc, "failed to read old=>new map" );
+                            break;
+                        }
+
+                        /* convert to count */                        
+                        num_read /= self -> id_size;
+                        if ( num_read == 0 )
+                        {
+                            rc = RC ( rcExe, rcFile, rcReading, rcTransfer, rcIncomplete );
+                            SYSTEM_ERROR ( rc, "failed to read old=>new map" );
+                            break;
+                        }
+
+                        /* scan for zeros, and for every zero found,
+                           make entry into IdxMapping table, writing
+                           new-id back to old=>new map */
+                        switch ( self -> id_size )
+                        {
+                        case 1:
+                            for ( j = 0; j < num_read; ++ j )
+                            {
+                                if ( ( ( const uint8_t* ) scan_buffer ) [ j ] == 0 )
+                                {
+                                    ON_FAIL ( i = make_missing_entry ( self, ctx, missing,
+                                              i, max_missing_ids, old_id + j, ++ max_new_id ) )
+                                        break;
+                                }
+                            }
+                            break;
+                        case 2:
+                            for ( j = 0; j < num_read; ++ j )
+                            {
+                                if ( ( ( const uint16_t* ) scan_buffer ) [ j ] == 0 )
+                                {
+                                    ON_FAIL ( i = make_missing_entry ( self, ctx, missing,
+                                              i, max_missing_ids, old_id + j, ++ max_new_id ) )
+                                        break;
+                                }
+                            }
+                            break;
+                        case 3:
+                            for ( num_read *= 3, j = 0; j < num_read; j += 3 )
+                            {
+                                if ( ( ( const uint8_t* ) scan_buffer ) [ j + 0 ] == 0 &&
+                                     ( ( const uint8_t* ) scan_buffer ) [ j + 1 ] == 0 &&
+                                     ( ( const uint8_t* ) scan_buffer ) [ j + 2 ] == 0 )
+                                {
+                                    ON_FAIL ( i = make_missing_entry ( self, ctx, missing,
+                                              i, max_missing_ids, old_id + j / 3, ++ max_new_id ) )
+                                        break;
+                                }
+                            }
+                            num_read /= 3;
+                            break;
+                        case 4:
+                            for ( j = 0; j < num_read; ++ j )
+                            {
+                                if ( ( ( const uint32_t* ) scan_buffer ) [ j ] == 0 )
+                                {
+                                    ON_FAIL ( i = make_missing_entry ( self, ctx, missing,
+                                              i, max_missing_ids, old_id + j, ++ max_new_id ) )
+                                        break;
+                                }
+                            }
+                            break;
+                        case 8:
+                            for ( j = 0; j < num_read; ++ j )
+                            {
+                                if ( ( ( const uint64_t* ) scan_buffer ) [ j ] == 0 )
+                                {
+                                    ON_FAIL ( i = make_missing_entry ( self, ctx, missing,
+                                              i, max_missing_ids, old_id + j, ++ max_new_id ) )
+                                        break;
+                                }
+                            }
+                            break;
+                        default:
+                            for ( num_read *= self -> id_size, j = 0; j < num_read; j += self -> id_size )
+                            {
+                                new_id = 0;
+                                memcpy ( & new_id, & ( ( const uint8_t* ) scan_buffer ) [ j ], self -> id_size );
+                                if ( new_id == 0 )
+                                {
+                                    ON_FAIL ( i = make_missing_entry ( self, ctx, missing,
+                                              i, max_missing_ids, old_id + j / self -> id_size, ++ max_new_id ) )
+                                        break;
+                                }
+                            }
+                            num_read /= self -> id_size;
+                        }
+                    }
+
+                    if ( ! FAILED () && i != 0 )
+                        MapFileSetNewToOld ( self, ctx, missing, i );
+
+                    assert ( FAILED () || self -> max_new_id == max_new_id );
+
+                    if ( max_new_id != entry_max_new_id )
+                        first_allocated = entry_max_new_id + 1;
+
+                    MemFree ( ctx, scan_buffer, scan_buffer_size );
+                }
+
+                MemFree ( ctx, missing, sizeof * missing * max_missing_ids );
+            }
+        }
+    }
+
+    return first_allocated;
+}
+
+
+/* ReadNewToOld
+ *  reads a bunch of new=>old mappings
+ */
+static
+size_t MapFileReadNewToOld ( const MapFile *self, const ctx_t *ctx,
+    int64_t start_id, IdxMapping *ids, size_t max_count )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    size_t total = 0;
+
+    if ( self == NULL )
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcSelf, rcNull );
+        INTERNAL_ERROR ( rc, "bad self reference" );
+    }
+    /* the new=>old mapping is read until end, but
+       this is not an error. just return no-more-data */
+    else if ( start_id == self -> first_id + self -> num_ids )
+        return 0;
+    else if ( start_id < self -> first_id || start_id > self -> first_id + self -> num_ids )
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcParam, rcInvalid );
+        INTERNAL_ERROR ( rc, "start_id ( %ld ) is not within map range ( %ld .. %ld )",
+            start_id, self -> first_id, self -> first_id + self -> num_ids - 1 );
+    }
+    else if ( max_count != 0 )
+    {
+        /* limit read to number of ids in index */
+        if ( start_id + max_count > self -> first_id + self -> num_ids )
+            max_count = ( size_t ) ( self -> first_id + self -> num_ids - start_id );
+
+        if ( ids == NULL )
+        {
+            rc = RC ( rcExe, rcFile, rcReading, rcBuffer, rcNull );
+            INTERNAL_ERROR ( rc, "bad buffer parameter" );
+        }
+        else
+        {
+            /* read as many bytes of id as possible */
+            size_t num_read, to_read = max_count * self -> id_size;
+            uint64_t pos = ( start_id - self -> first_id ) * self -> id_size;
+            rc = KFileReadAll ( self -> f_new, pos, ids, to_read, & num_read );
+            if ( rc != 0 )
+                SYSTEM_ERROR ( rc, "failed to read new=>old map" );
+            else
+            {
+                size_t i;
+                const char *packed = ( const char* ) ids;
+                total = ( size_t ) ( num_read /self -> id_size );
+
+                /* read each packed id as little-endian integer onto
+                   pre-zeroed 64-bit integer, swap if needed */
+                for ( num_read = total * self -> id_size, i = total; i > 0; )
+                {
+                    int64_t unpacked = 0;
+
+                    num_read -= self -> id_size;
+                    -- i;
+
+                    memcpy ( & unpacked, & packed [ num_read ], self -> id_size );
+#if __BYTE_ORDER == __BIG_ENDIAN
+                    unpacked = bswap_64 ( unpacked );
+#endif
+                    if ( unpacked != 0 )
+                        unpacked += self -> first_id - 1;
+
+                    ids [ i ] . old_id = unpacked;
+                    ids [ i ] . new_id = start_id + i;
+                }
+            }
+        }
+    }
+
+    return total;
+}
+
+
+/* SelectOldToNewPairs
+ *  specify the range of new ids to select from
+ *  read them in old=>new order
+ */
+size_t MapFileSelectOldToNewPairs ( const MapFile *self, const ctx_t *ctx,
+    int64_t start_id, IdxMapping *ids, size_t max_count )
+{
+    FUNC_ENTRY ( ctx );
+
+    uint64_t eof;
+    int64_t end_excl;
+    size_t i, j, total;
+
+    /* limit read to number of ids in index */
+    if ( start_id + max_count > self -> first_id + self -> num_ids )
+        max_count = ( size_t ) ( self -> first_id + self -> num_ids - start_id );
+
+    /* range is start_id to end_excl */
+    end_excl = start_id + max_count;
+
+    /* eof for f_old */
+    eof = self -> num_ids * self -> id_size;
+
+    for ( total = i = 0; i < max_count; total += j )
+    {
+        rc_t rc;
+        size_t off, num_read;
+        char buff [ 32 * 1024 ];
+
+        /* read some data from file */
+        uint64_t pos = total * self -> id_size;
+        size_t to_read = sizeof buff;
+	if ( pos == eof )
+	    break;
+        if ( pos + to_read > eof )
+            to_read = ( size_t ) ( eof - pos );
+        rc = KFileReadAll ( self -> f_old, pos, buff, to_read, & num_read );
+        if ( rc != 0 )
+        {
+            SYSTEM_ERROR ( rc, "failed to read old=>new map" );
+            break;
+        }
+
+        /* reached end - requested more ids than we have */
+        if ( num_read == 0 )
+            break;
+
+        /* the number of whole ids actually read */
+        if ( ( num_read /= self -> id_size ) == 0 )
+        {
+            rc = RC ( rcExe, rcFile, rcReading, rcTransfer, rcIncomplete );
+            SYSTEM_ERROR ( rc, "failed to read old=>new map - file incomplete" );
+            break;
+        }
+
+        /* select new-ids from ids read */
+        for ( off = j = 0; j < num_read; off += self -> id_size, ++ j )
+        {
+            int64_t unpacked = 0;
+            memcpy ( & unpacked, & buff [ off ], self -> id_size );
+#if __BYTE_ORDER == __BIG_ENDIAN
+            unpacked = bswap_64 ( unpacked );
+#endif
+            /* only offset non-zero (NULL) ids */
+            if ( unpacked != 0 )
+                unpacked += self -> first_id - 1;
+
+            /* if id meets criteria */
+            if ( unpacked >= start_id && unpacked < end_excl )
+            {
+                ids [ i ] . old_id = self -> first_id + total + j;
+                ids [ i ] . new_id = unpacked;
+                if ( ++ i == max_count )
+                    break;
+            }
+        }
+    }
+
+    return i;
+}
+
+
+/* SelectOldToNewSingle
+ *  specify the range of new ids to select from
+ *  read them in old=>new order
+ */
+size_t MapFileSelectOldToNewSingle ( const MapFile *self, const ctx_t *ctx,
+    int64_t start_id, int64_t *ids, uint32_t *opt_ord, size_t max_count )
+{
+    FUNC_ENTRY ( ctx );
+
+    uint64_t eof;
+    int64_t end_excl;
+    size_t i, j, total;
+
+    /* limit read to number of ids in index */
+    if ( start_id + max_count > self -> first_id + self -> num_ids )
+        max_count = ( size_t ) ( self -> first_id + self -> num_ids - start_id );
+
+    /* range is start_id to end_excl */
+    end_excl = start_id + max_count;
+
+    /* eof for f_old */
+    eof = self -> num_ids * self -> id_size;
+
+    for ( total = i = 0; i < max_count; total += j )
+    {
+        rc_t rc;
+        size_t off, num_read;
+        char buff [ 32 * 1024 ];
+
+        /* read some data from file */
+        uint64_t pos = total * self -> id_size;
+        size_t to_read = sizeof buff;
+	if ( pos == eof )
+            break;
+        if ( pos + to_read > eof )
+            to_read = ( size_t ) ( eof - pos );
+        rc = KFileReadAll ( self -> f_old, pos, buff, to_read, & num_read );
+        if ( rc != 0 )
+        {
+            SYSTEM_ERROR ( rc, "failed to read old=>new map" );
+            break;
+        }
+
+        /* reached end - requested more ids than we have */
+        if ( num_read == 0 )
+            break;
+
+        /* the number of whole ids actually read */
+        if ( ( num_read /= self -> id_size ) == 0 )
+        {
+            rc = RC ( rcExe, rcFile, rcReading, rcTransfer, rcIncomplete );
+            SYSTEM_ERROR ( rc, "failed to read old=>new map - file incomplete" );
+            break;
+        }
+
+        /* select new-ids from ids read */
+        for ( off = j = 0; j < num_read; off += self -> id_size, ++ j )
+        {
+            int64_t unpacked = 0;
+            memcpy ( & unpacked, & buff [ off ], self -> id_size );
+#if __BYTE_ORDER == __BIG_ENDIAN
+            unpacked = bswap_64 ( unpacked );
+#endif
+            /* only offset non-zero (NULL) ids */
+            if ( unpacked != 0 )
+                unpacked += self -> first_id - 1;
+
+            /* if id meets criteria */
+            if ( unpacked >= start_id && unpacked < end_excl )
+            {
+                ids [ i ] = self -> first_id + total + j;
+                assert ( i <= 0xFFFFFFFF );
+                if ( opt_ord != NULL )
+                    opt_ord [ unpacked - start_id ] = ( uint32_t ) i;
+                if ( ++ i == max_count )
+                    break;
+            }
+        }
+    }
+
+    return i;
+}
+
+
+/* MapSingleOldToNew
+ *  reads a single old=>new mapping
+ *  returns new id or 0 if not found
+ *  optionally allocates a new id if "insert" is true
+ */
+int64_t MapFileMapSingleOldToNew ( MapFile *self, const ctx_t *ctx,
+    int64_t old_id, bool insert )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    int64_t new_id = 0;
+
+    if ( self == NULL )
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcSelf, rcNull );
+        INTERNAL_ERROR ( rc, "bad self reference" );
+    }
+    else if ( old_id < self -> first_id || old_id >= self -> first_id + self -> num_ids )
+    {
+        rc = RC ( rcExe, rcFile, rcReading, rcParam, rcInvalid );
+        INTERNAL_ERROR ( rc, "old_id ( %ld ) is not within map range ( %ld .. %ld )",
+            old_id, self -> first_id, self -> first_id + self -> num_ids - 1 );
+    }
+    else
+    {
+        size_t num_read, to_read = self -> id_size;
+        uint64_t pos = ( old_id - self -> first_id ) * self -> id_size;
+        rc = KFileReadAll ( self -> f_old, pos, & new_id, to_read, & num_read );
+        if ( rc != 0 )
+            SYSTEM_ERROR ( rc, "failed to read old=>new map" );
+        else
+        {
+#if __BYTE_ORDER == __BIG_ENDIAN
+            new_id = bswap_64 ( new_id );
+#endif
+            if ( new_id != 0 )
+                new_id += self -> first_id - 1;
+            else if ( insert )
+            {
+                /* create a mapping using the last known
+                   new id plus one as the id to assign on insert */
+                IdxMapping mapping;
+                mapping . old_id = old_id;
+                mapping . new_id = self -> max_new_id + 1;
+
+                TRY ( MapFileSetOldToNew ( self, ctx, & mapping, 1 ) )
+                {
+                    TRY ( MapFileSetNewToOld ( self, ctx, & mapping, 1 ) )
+                    {
+                        new_id = mapping . new_id;
+
+                        if ( self -> num_ids >= 100000 )
+                        {
+                            uint64_t scaled = ++ self -> num_mapped_ids * 100;
+                            uint64_t prior = scaled - 100;
+                            if ( ( prior / self -> num_ids ) != ( scaled /= self -> num_ids ) )
+                                STATUS ( 2, "have mapped %lu%% ids", scaled );
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    return new_id;
+}
+
+
+/* ConsistencyCheck
+ */
+static
+void MapFileCrossCheck ( const MapFile *self, const ctx_t *ctx, IdxMapping *ids, size_t max_ids )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    uint64_t total;
+    size_t num_read;
+    int64_t last_old, last_new;
+
+    for ( last_old = last_new = -1, total = 0; total < self -> num_ids; total += num_read )
+    {
+        int64_t id;
+        size_t i;
+
+        STATUS ( 2, "reading new=>old ids" );
+
+        ON_FAIL ( num_read = MapFileReadNewToOld ( self, ctx, self -> first_id + total, ids, max_ids ) )
+        {
+            ANNOTATE ( "failed to read new=>old ids" );
+            return;
+        }
+
+        STATUS ( 2, "read %,u pairs", num_read );
+
+        STATUS ( 2, "checking for repeats in new-id space" );
+        for ( i = 0; i < num_read; last_new = id, ++ i )
+        {
+            id = ids [ i ] . new_id;
+            if ( id == last_new )
+            {
+                rc = RC ( rcExe, rcIndex, rcValidating, rcId, rcDuplicate );
+                ERROR ( rc, "new id %,ld repeats", id );
+                return;
+            }
+        }
+
+        STATUS ( 2, "sorting on old id" );
+
+#if USE_OLD_KSORT
+        ksort ( ids, num_read, sizeof ids [ 0 ], IdxMappingCmpOld, ( void* ) ctx );
+#else
+        IdxMappingSortOld ( ids, ctx, num_read );
+#endif
+
+        STATUS ( 2, "checking for repeats in old-id space" );
+        for ( i = 0; i < num_read; last_old = id, ++ i )
+        {
+            id = ids [ i ] . old_id;
+            if ( id == last_old )
+            {
+                rc = RC ( rcExe, rcIndex, rcValidating, rcId, rcDuplicate );
+                ERROR ( rc, "old id %,ld repeats", id );
+                return;
+            }
+        }
+
+        STATUS ( 2, "cross-checking against old=>new index" );
+
+        for ( i = 0; i < num_read; ++ i )
+        {
+            int64_t new_id;
+
+            /* cast away const on "self" for prototype,
+               but function is only non-const if "insert"
+               were true - we use "false" */
+            ON_FAIL ( new_id = MapFileMapSingleOldToNew ( ( MapFile* ) self, ctx, ids [ i ] . old_id, false ) )
+                return;
+
+            if ( new_id != ids [ i ] . new_id )
+            {
+                rc = RC ( rcExe, rcIndex, rcValidating, rcId, rcUnequal );
+                ERROR ( rc, "mismatch of new ids %,ld != %,ld", new_id, ids [ i ] . new_id );
+                return;
+            }
+        }
+    }
+}
+
+void MapFileConsistencyCheck ( const MapFile *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    IdxMapping *ids;
+    const size_t max_ids = 1024 * 1024;
+
+    STATUS ( 2, "running consistency check on index files" );
+
+    /* "self" is valid */
+    if ( self == NULL )
+    {
+        ANNOTATE ( "checking the validity of a NULL MapFile" );
+        return;
+    }
+
+    STATUS ( 2, "checking id_size" );
+
+    /* number of ids requires some number of bits */
+    if ( ( ( uint64_t ) 1 << ( self -> id_size * 8 ) ) < self -> num_ids )
+    {
+        rc = RC ( rcExe, rcIndex, rcValidating, rcSize, rcIncorrect );
+        ERROR ( rc, "calculated id size ( %zu bytes ) is insufficient to represent count of %,lu ids",
+                self -> id_size, self -> num_ids );
+        return;
+    }
+
+    STATUS ( 2, "allocating id buffer" );
+
+    TRY ( ids = MemAlloc ( ctx, sizeof * ids * max_ids, false ) )
+    {
+        MapFileCrossCheck ( self, ctx, ids, max_ids );
+        MemFree ( ctx, ids, sizeof * ids * max_ids );
+    }
+    CATCH_ALL ()
+    {
+        ANNOTATE ( "failed to allocate memory ( %zu pairs ) for consistency check", max_ids );
+        return;
+    }
+
+    STATUS ( 2, "finished idx consistency check" );
+}
diff --git a/tools/sra-sort/map-file.h b/tools/sra-sort/map-file.h
new file mode 100644
index 0000000..992d765
--- /dev/null
+++ b/tools/sra-sort/map-file.h
@@ -0,0 +1,172 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_map_file_
+#define _h_sra_sort_map_file_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct IdxMapping;
+
+
+/*--------------------------------------------------------------------------
+ * MapFile
+ *  a file for storing id mappings
+ */
+typedef struct MapFile MapFile;
+
+
+/* Make
+ *  creates an id map
+ */
+MapFile *MapFileMake ( const ctx_t *ctx, const char *name, bool random_access );
+
+
+/* MakeForPoslen
+ *  creates an id map with an additional poslen file
+ *  this is specially for PRIMARY_ALIGNMENT_IDS and SECONDARY_ALIGNMENT_IDS
+ *  that use *_ALIGNMENT global position and length as a sorting key
+ *  we drop it to a file after its generation so that it can be
+ *  picked up later when copying the corresponding alignment table.
+ */
+MapFile *MapFileMakeForPoslen ( const ctx_t *ctx, const char *name );
+
+
+/* Release
+ */
+void MapFileRelease ( const MapFile *self, const ctx_t *ctx );
+
+/* Duplicate
+ */
+MapFile *MapFileDuplicate ( const MapFile *self, const ctx_t *ctx );
+
+
+/* SetIdRange
+ *  required second-stage initialization
+ *  must be called before any writes occur
+ */
+void MapFileSetIdRange ( MapFile *self, const ctx_t *ctx,
+    int64_t first_id, uint64_t num_ids );
+
+
+/* First
+ *  return first mapped id
+ * Count
+ *  return number of ids
+ */
+int64_t MapFileFirst ( const MapFile *self, const ctx_t *ctx );
+uint64_t MapFileCount ( const MapFile *self, const ctx_t *ctx );
+
+
+/* SetOldToNew
+ *  write new=>old id mappings
+ */
+void MapFileSetOldToNew ( MapFile *self, const ctx_t *ctx,
+    struct IdxMapping const *ids, size_t count );
+
+
+/* SetNewToOld
+ *  write new=>old id mappings
+ */
+void MapFileSetNewToOld ( MapFile *self, const ctx_t *ctx,
+    struct IdxMapping const *ids, size_t count );
+
+
+/* SetPoslen
+ *  write global position/length in new-id order
+ */
+void MapFileSetPoslen ( MapFile *self, const ctx_t *ctx,
+    struct IdxMapping const *ids, size_t count );
+
+
+/* ReadPoslen
+ *  read global position/length in new-id order
+ *  starts reading at the indicated row
+ *  returns the number read
+ */
+size_t MapFileReadPoslen ( const MapFile *self, const ctx_t *ctx,
+    int64_t start_id, uint64_t *poslen, size_t max_count );
+
+
+/* AllocMissingNewIds
+ *  it is possible to have written fewer new=>old mappings
+ *  than are supposed to be there, e.g. SEQUENCE that gets
+ *  initially written by align tables. unaligned sequences
+ *  need to fill in the remainder.
+ *
+ *  returns the first newly allocated id
+ */
+int64_t MapFileAllocMissingNewIds ( MapFile *self, const ctx_t *ctx );
+
+
+/* SelectOldToNewPairs
+ *  specify the range of new ids to select from
+ *  read them in old=>new order
+ */
+size_t MapFileSelectOldToNewPairs ( const MapFile *self, const ctx_t *ctx,
+    int64_t start_id, struct IdxMapping *ids, size_t max_count );
+
+
+/* SelectOldToNewSingle
+ *  specify the range of new ids to select from
+ *  read them in old=>new order
+ */
+size_t MapFileSelectOldToNewSingle ( const MapFile *self, const ctx_t *ctx,
+    int64_t start_id, int64_t *ids, uint32_t *opt_ord, size_t max_count );
+
+
+/* MapSingleOldToNew
+ *  reads a single old=>new mapping
+ *  returns new id or 0 if not found
+ *  optionally allocates a new id if "insert" is true
+ */
+int64_t MapFileMapSingleOldToNew ( MapFile *self, const ctx_t *ctx,
+    int64_t old_id, bool insert );
+
+
+/* MapMultipleOldToNew
+ *  reads a single old=>new mapping
+ *  returns new id or 0 if not found
+ *  optionally allocates a new id if "insert" is true
+ */
+void MapFileMapMultipleOldToNew ( MapFile *self, const ctx_t *ctx,
+    int64_t *ids, size_t count, bool insert );
+
+
+/* ConsistencyCheck
+ *  should be const, but MapFileOldToNew claims to be non-const
+ *  and is used within. only non-const if "insert" is true.
+ */
+void MapFileConsistencyCheck ( const MapFile *self, const ctx_t *ctx );
+
+
+#endif
diff --git a/tools/sra-sort/mapping-row-set.c b/tools/sra-sort/mapping-row-set.c
new file mode 100644
index 0000000..6e69549
--- /dev/null
+++ b/tools/sra-sort/mapping-row-set.c
@@ -0,0 +1,496 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct MappingRowSet MappingRowSet;
+#define ROWSET_IMPL MappingRowSet
+
+typedef struct MappingRowSetIterator MappingRowSetIterator;
+#define ROWSET_ITER_IMPL MappingRowSetIterator
+
+#include "row-set-priv.h"
+#include "tbl-pair.h"
+#include "idx-mapping.h"
+#include "map-file.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+#include "sra-sort.h"
+
+#include <klib/rc.h>
+
+FILE_ENTRY ( mapping-row-set );
+
+
+/*--------------------------------------------------------------------------
+ * MappingRowSetIterator
+ *  interface to iterate RowSets
+ */
+struct MappingRowSetIterator
+{
+    RowSetIterator dad;
+
+    /* base row-id */
+    int64_t row_id;
+
+    /* last row-id + 1 */
+    int64_t last_excl;
+
+    /* takes its input from new=>old index */
+    const MapFile *idx;
+
+    /* working data within map */
+    IdxMapping *map;
+    size_t max_elems;
+    size_t num_elems;
+
+    bool large;
+};
+
+/*--------------------------------------------------------------------------
+ * MappingRowSet
+ *  implementation of RowSet based upon auto-generated id pairs
+ */
+struct MappingRowSet
+{
+    RowSet dad;
+
+    /* keep-alive reference */
+    MappingRowSetIterator *iter;
+
+    /* working data within map */
+    IdxMapping *map;
+    size_t num_elems;
+    size_t cur_elem;
+};
+
+static
+void MappingRowSetWhack ( MappingRowSet *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    RowSetIteratorRelease ( & self -> iter -> dad, ctx );
+    MemFree ( ctx, self, sizeof *self );
+}
+
+static
+size_t MappingRowSetNextStat ( MappingRowSet *self, const ctx_t *ctx,
+    int64_t *ids, size_t max_ids )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* the starting row-id is taken from row-set-iterator
+       and offset by our current element counter */
+    int64_t row_id = self -> iter -> row_id + self -> cur_elem;
+
+    /* limit id generation to request */
+    size_t i, to_set = self -> num_elems - self -> cur_elem;
+    if ( to_set > max_ids )
+        to_set = max_ids;
+
+    /* fill request with serial numbers
+       could just as easily be the same number
+       the important thing is to limit the count
+       and produce the correct range */
+    for ( i = 0; i < to_set; ++ i )
+        ids [ i ] = row_id + i;
+
+    /* advance counter */
+    self -> cur_elem += to_set;
+    return to_set;
+}
+
+static
+size_t MappingRowSetNextPhys ( MappingRowSet *self, const ctx_t *ctx,
+    int64_t *ids, size_t max_ids )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* limit copy to request */
+    size_t i, to_copy = self -> num_elems - self -> cur_elem;
+    if ( to_copy > max_ids )
+        to_copy = max_ids;
+
+    /* copy out old-ids */
+    for ( i = 0; i < to_copy; ++ i )
+        ids [ i ] = self -> map [ self -> cur_elem + i ] . old_id;
+
+    /* advance counter */
+    self -> cur_elem += to_copy;
+    return to_copy;
+}
+
+static
+void MappingRowSetReset ( MappingRowSet *self, const ctx_t *ctx, bool for_static );
+
+static RowSet_vt MappingRowSetPhys_vt =
+{
+    MappingRowSetWhack,
+    MappingRowSetNextPhys,
+    MappingRowSetReset
+};
+
+static RowSet_vt MappingRowSetStat_vt =
+{
+    MappingRowSetWhack,
+    MappingRowSetNextStat,
+    MappingRowSetReset
+};
+
+static
+void MappingRowSetReset ( MappingRowSet *self, const ctx_t *ctx, bool for_static )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( for_static )
+    {
+        /* go static */
+        self -> dad . vt = & MappingRowSetStat_vt;
+    }
+    else
+    {
+        size_t i, max_elems;
+        MappingRowSetIterator *iter = self -> iter;
+
+        /* go physical */
+        self -> dad . vt = & MappingRowSetPhys_vt;
+
+        /* limit id generation */
+        max_elems = iter -> max_elems;
+        if ( iter -> row_id + max_elems >= iter -> last_excl )
+            max_elems = ( size_t ) ( iter -> last_excl - iter -> row_id );
+
+        STATUS ( 4, "auto-generating %,zu ( old_id, new_id ) pairs where new_id >= %ld",
+                 max_elems, iter -> row_id );
+        for ( i = 0; i < max_elems; ++ i )
+            iter -> map [ i ] . old_id = iter -> map [ i ] . new_id = iter -> row_id + i;
+
+        self -> num_elems = iter -> num_elems = max_elems;
+    }
+
+    /* ready */
+    self -> cur_elem = 0;
+}
+
+static
+void MapFileMappingRowSetReset ( MappingRowSet *self, const ctx_t *ctx, bool for_static );
+
+static RowSet_vt MapFileMappingRowSetPhys_vt =
+{
+    MappingRowSetWhack,
+    MappingRowSetNextPhys,
+    MapFileMappingRowSetReset
+};
+
+static RowSet_vt MapFileMappingRowSetStat_vt =
+{
+    MappingRowSetWhack,
+    MappingRowSetNextStat,
+    MapFileMappingRowSetReset
+};
+
+static
+void MapFileMappingRowSetReset ( MappingRowSet *self, const ctx_t *ctx, bool for_static )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( for_static )
+    {
+        /* go static */
+        self -> dad . vt = & MapFileMappingRowSetStat_vt;
+    }
+    else
+    {
+        MappingRowSetIterator *iter = self -> iter;
+
+        /* go physical */
+        self -> dad . vt = & MapFileMappingRowSetPhys_vt;
+
+        /* read new-ids from file, selecting only those within range */
+        STATUS ( 3, "selecting first %,zu ( old_id, new_id ) pairs from old=>new where new_id >= %,ld",
+                 iter -> max_elems, iter -> row_id );
+        ON_FAIL ( iter -> num_elems = MapFileSelectOldToNewPairs ( iter -> idx, ctx,
+                      iter -> row_id, iter -> map, iter -> max_elems ) )
+            return;
+
+        self -> num_elems = iter -> num_elems;
+        STATUS ( 3, "selected %,zu ( old_id, new_id ) pairs", self -> num_elems );
+    }
+
+    /* ready */
+    self -> cur_elem = 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ * MappingRowSetIterator
+ *  interface to iterate RowSets
+ */
+
+static
+void MappingRowSetIteratorWhack ( MappingRowSetIterator *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( self -> map != NULL )
+        MemFree ( ctx, self -> map, sizeof self -> map [ 0 ] * self -> max_elems );
+
+    RowSetIteratorDestroy ( & self -> dad, ctx );
+    MemFree ( ctx, self, sizeof * self );
+}
+
+static
+void MapFileMappingRowSetIteratorWhack ( MappingRowSetIterator *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( self -> map != NULL )
+        MemFree ( ctx, self -> map, sizeof self -> map [ 0 ] * self -> max_elems );
+
+    MapFileRelease ( self -> idx, ctx );
+
+    RowSetIteratorDestroy ( & self -> dad, ctx );
+    MemFree ( ctx, self, sizeof * self );
+}
+
+static
+RowSet *MappingRowSetIteratorMakeTheRowSet ( MappingRowSetIterator *self, const ctx_t *ctx, const RowSet_vt *vt )
+{
+    FUNC_ENTRY ( ctx );
+
+    MappingRowSet *rs;
+    TRY ( rs = MemAlloc ( ctx, sizeof * rs, false ) )
+    {
+        TRY ( RowSetInit ( & rs -> dad, ctx, vt ) )
+        {
+            /* initialize the row-set with map and self reference */
+            rs -> map = self -> map;
+            rs -> iter = ( MappingRowSetIterator* ) RowSetIteratorDuplicate ( & self -> dad, ctx );
+            rs -> num_elems = self -> num_elems;
+            rs -> cur_elem = 0;
+            return & rs -> dad;
+        }
+
+        MemFree ( ctx, rs, sizeof * rs );
+    }
+
+    return NULL;
+ }
+
+static
+struct IdxMapping *MappingRowSetIteratorGetIdxMapping ( MappingRowSetIterator *self, const ctx_t *ctx, size_t *num_items )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( self -> map == NULL )
+    {
+        rc_t rc = RC ( rcExe, rcCursor, rcAccessing, rcSelf, rcInconsistent );
+        ERROR ( rc, "IdxMapping array is NULL" );
+        if ( num_items != NULL )
+            * num_items = 0;
+        return NULL;
+    }
+
+    if ( num_items != NULL )
+        * num_items = self -> num_elems;
+    return self -> map;
+}
+
+static
+int64_t *MappingRowSetIteratorGetSourceIds ( MappingRowSetIterator *self, const ctx_t *ctx, uint32_t **opt_ord, size_t *num_items )
+{
+    FUNC_ENTRY ( ctx );
+
+    ANNOTATE ( "CALLING GetSourceIds ON MAPPING ROWSET ITERATOR" );
+
+    if ( opt_ord != NULL )
+        * opt_ord = NULL;
+
+    if ( num_items != NULL )
+        * num_items = 0;
+
+    return NULL;
+}
+
+static
+void MappingRowSetIteratorAllocMap ( MappingRowSetIterator *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* determine the maximum number of elements */
+    const Tool *tp = ctx -> caps -> tool;
+    uint64_t count = self -> last_excl - self -> row_id;
+    self -> max_elems = self -> large ? tp -> max_large_idx_ids : tp -> max_idx_ids;
+    if ( ( uint64_t ) self -> max_elems > count )
+        self -> max_elems = ( size_t ) count;
+
+    /* try to allocate the memory
+       this may be limited by the MemBank */
+    do
+    {
+        CLEAR ();
+
+        TRY ( self -> map = MemAlloc ( ctx, sizeof self -> map [ 0 ] * self -> max_elems, false ) )
+        {
+            STATUS ( 4, "allocated mapping array of %,u elements", self -> max_elems );
+            return;
+        }
+
+        self -> max_elems >>= 1;
+    }
+    while ( self -> max_elems >= ctx -> caps -> tool -> min_idx_ids );
+
+    ANNOTATE ( "failed to allocate map for row-set" );
+}
+
+static
+RowSet *MappingRowSetIteratorNextInt ( MappingRowSetIterator *self, const ctx_t *ctx, const RowSet_vt *vt )
+{
+    /* no FUNC_ENTRY */
+
+    RowSet *rs = NULL;
+
+    /* on first invocation, allocate the map */
+    if ( self -> map == NULL )
+    {
+        ON_FAIL ( MappingRowSetIteratorAllocMap ( self, ctx ) )
+            return NULL;
+    }
+
+    /* advance row_id */
+    self -> row_id += self -> num_elems;
+    self -> num_elems = 0;
+
+    /* create the empty row-set */
+    if ( self -> row_id < self -> last_excl )
+        rs = MappingRowSetIteratorMakeTheRowSet ( self, ctx, vt );
+
+    return rs;
+}
+
+static
+RowSet *MappingRowSetIteratorNext ( MappingRowSetIterator *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    return MappingRowSetIteratorNextInt ( self, ctx, & MappingRowSetPhys_vt );
+}
+
+static
+RowSet *MapFileMappingRowSetIteratorNext ( MappingRowSetIterator *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    return MappingRowSetIteratorNextInt ( self, ctx, & MapFileMappingRowSetPhys_vt );
+}
+
+
+/*--------------------------------------------------------------------------
+ * TablePair
+ */
+
+static RowSetIterator_vt MappingRowSetIterator_vt =
+{
+    MappingRowSetIteratorWhack,
+    MappingRowSetIteratorGetIdxMapping,
+    MappingRowSetIteratorGetSourceIds,
+    MappingRowSetIteratorNext
+};
+
+/* MakeMappingRowSetIterator
+ *  runs from first to last id in cursor
+ */
+RowSetIterator *TablePairMakeMappingRowSetIterator ( TablePair *self, const ctx_t *ctx, bool large )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( self -> first_id > self -> last_excl )
+    {
+        rc_t rc = RC ( rcExe, rcCursor, rcConstructing, rcRange, rcInvalid );
+        INTERNAL_ERROR ( rc, "union of all column ranges improperly set" );
+    }
+    else
+    {
+        MappingRowSetIterator *rsi;
+
+        TRY ( rsi = MemAlloc ( ctx, sizeof * rsi, true ) )
+        {
+            TRY ( RowSetIteratorInit ( & rsi -> dad, ctx, & MappingRowSetIterator_vt ) )
+            {
+                rsi -> row_id = self -> first_id;
+                rsi -> last_excl = self -> last_excl;
+                rsi -> large = large;
+                return & rsi -> dad;
+            }
+
+            MemFree ( ctx, rsi, sizeof * rsi );
+        }
+    }
+
+    return NULL;
+}
+
+
+/*--------------------------------------------------------------------------
+ * MapFile
+ */
+
+static RowSetIterator_vt MapFileMappingRowSetIterator_vt =
+{
+    MapFileMappingRowSetIteratorWhack,
+    MappingRowSetIteratorGetIdxMapping,
+    MappingRowSetIteratorGetSourceIds,
+    MapFileMappingRowSetIteratorNext
+};
+
+RowSetIterator * MapFileMakeMappingRowSetIterator ( const MapFile *self, const ctx_t *ctx, bool large )
+{
+    FUNC_ENTRY ( ctx );
+
+    MappingRowSetIterator *rsi;
+
+    /* create the iterator */
+    TRY ( rsi = MemAlloc ( ctx, sizeof * rsi, true ) )
+    {
+        TRY ( RowSetIteratorInit ( & rsi -> dad, ctx, & MapFileMappingRowSetIterator_vt ) )
+        {
+            /* initialize the row-set with map and self reference */
+            TRY ( rsi -> row_id = MapFileFirst ( self, ctx ) )
+            {
+                TRY ( rsi -> last_excl = rsi -> row_id + MapFileCount ( self, ctx ) )
+                {
+                    TRY ( rsi -> idx = MapFileDuplicate ( self, ctx ) )
+                    {
+                        rsi -> large = large;
+                        return & rsi -> dad;
+                    }
+                }
+            }
+        }
+
+        MemFree ( ctx, rsi, sizeof * rsi );
+    }
+
+    return NULL;
+}
diff --git a/tools/sra-sort/mem.c b/tools/sra-sort/mem.c
new file mode 100644
index 0000000..313a90f
--- /dev/null
+++ b/tools/sra-sort/mem.c
@@ -0,0 +1,68 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "caps.h"
+#include "ctx.h"
+#include "mem.h"
+#include "except.h"
+#include "status.h"
+
+FILE_ENTRY ( mem );
+
+
+/*--------------------------------------------------------------------------
+ * Mem
+ *  memory allocation via MemBank in Caps
+ */
+void *MemAlloc ( const ctx_t *ctx, size_t bytes, bool clear )
+{
+    assert ( ctx != NULL );
+    assert ( ctx -> caps != NULL );
+    assert ( ctx -> caps -> mem != NULL );
+
+    return MemBankAlloc ( ctx -> caps -> mem, ctx, bytes, clear );
+}
+
+void MemFree ( const ctx_t *ctx, void *mem, size_t bytes )
+{
+    if ( mem != NULL )
+    {
+        assert ( ctx != NULL );
+        assert ( ctx -> caps != NULL );
+        assert ( ctx -> caps -> mem != NULL );
+
+        MemBankFree ( ctx -> caps -> mem, ctx, mem, bytes );
+    }
+}
+
+size_t MemInUse ( const ctx_t *ctx, size_t *opt_quota )
+{
+    assert ( ctx != NULL );
+    assert ( ctx -> caps != NULL );
+    assert ( ctx -> caps -> mem != NULL );
+
+    return MemBankInUse ( ctx -> caps -> mem, ctx, opt_quota );
+}
diff --git a/tools/sra-sort/mem.h b/tools/sra-sort/mem.h
new file mode 100644
index 0000000..fc3db7e
--- /dev/null
+++ b/tools/sra-sort/mem.h
@@ -0,0 +1,128 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_mem_
+#define _h_sra_sort_mem_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+#ifndef _h_klib_refcount_
+#include <klib/refcount.h>
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * Mem
+ *  memory allocation via MemBank in Caps
+ */
+void *MemAlloc ( const ctx_t *ctx, size_t bytes, bool clear );
+void MemFree ( const ctx_t *ctx, void *mem, size_t bytes );
+size_t MemInUse ( const ctx_t *ctx, size_t *opt_quota );
+
+
+
+/*--------------------------------------------------------------------------
+ * MemBank
+ *  very, very, very watered down memory bank
+ */
+typedef struct MemBank_vt MemBank_vt;
+
+typedef struct MemBank MemBank;
+struct MemBank
+{
+    const MemBank_vt *vt;
+    KRefcount refcount;
+    uint32_t align;
+};
+
+#ifndef MEMBANK_IMPL
+#define MEMBANK_IMPL MemBank
+#endif
+
+struct MemBank_vt
+{
+    void ( * whack ) ( MEMBANK_IMPL *self, const ctx_t *ctx );
+    size_t ( * in_use ) ( const MEMBANK_IMPL *self, const ctx_t *ctx, size_t *opt_quota );
+    void* ( * alloc ) ( MEMBANK_IMPL *self, const ctx_t *ctx, size_t bytes, bool clear );
+    void ( * free ) ( MEMBANK_IMPL *self, const ctx_t *ctx, void *mem, size_t bytes );
+};
+
+
+/* Make
+ *  make a new memory bank
+ */
+MemBank *MemBankMake ( const ctx_t *ctx, size_t quota );
+
+
+/* MakePaged
+ *  make a new paged memory bank
+ */
+MemBank *MemBankMakePaged ( const ctx_t *ctx, size_t quota, size_t pgsize );
+
+
+/* Duplicate
+ * Release
+ */
+MemBank *MemBankDuplicate ( const MemBank *self, const ctx_t *ctx );
+void MemBankRelease ( const MemBank *self, const ctx_t *ctx );
+
+
+/* InUse
+ *  report the number of bytes in use
+ *  optionally returns quota
+ */
+#define MemBankInUse( self, ctx, opt_quota ) \
+    POLY_DISPATCH_INT ( in_use, self, const MEMBANK_IMPL, ctx, opt_quota )
+
+
+/* Alloc
+ *  allocates some memory from bank
+ */
+#define MemBankAlloc( self, ctx, bytes, clear ) \
+    POLY_DISPATCH_PTR ( alloc, self, MEMBANK_IMPL, ctx, bytes, clear )
+
+
+/* Free
+ *  returns memory to bank
+ *  ignored by paged bank
+ *  burden on caller to remember allocation size
+ */
+#define MemBankFree( self, ctx, mem, bytes ) \
+    POLY_DISPATCH_VOID ( free, self, MEMBANK_IMPL, ctx, mem, bytes )
+
+
+/* Init
+ */
+void MemBankInit ( MemBank *self, const ctx_t *ctx, const MemBank_vt *vt, const char *name );
+
+/* Destroy
+ */
+#define MemBankDestroy( self, ctx ) \
+    ( ( void ) 0 )
+
+#endif
diff --git a/tools/sra-sort/membank-priv.h b/tools/sra-sort/membank-priv.h
new file mode 100644
index 0000000..69301d4
--- /dev/null
+++ b/tools/sra-sort/membank-priv.h
@@ -0,0 +1,44 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_membank_priv_
+#define _h_sra_sort_membank_priv_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * MemBank
+ */
+
+/* MakePagedMMap
+ *  make a new paged memory bank backed by memory map
+ */
+MemBank *MemBankMakePagedMMap ( const ctx_t *ctx, size_t quota, size_t pgsize );
+
+#endif
diff --git a/tools/sra-sort/membank.c b/tools/sra-sort/membank.c
new file mode 100644
index 0000000..6f29b75
--- /dev/null
+++ b/tools/sra-sort/membank.c
@@ -0,0 +1,296 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct MemBankImpl MemBankImpl;
+#define MEMBANK_IMPL MemBankImpl
+
+#include <sysalloc.h>
+
+#include "caps.h"
+#include "ctx.h"
+#include "mem.h"
+#include "except.h"
+#include "status.h"
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/mmap.h>
+#include <klib/refcount.h>
+#include <klib/container.h>
+#include <klib/rc.h>
+#include <atomic.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+FILE_ENTRY ( membank );
+
+
+/*--------------------------------------------------------------------------
+ * MemBankImpl
+ *  maintains a quota
+ */
+struct MemBankImpl
+{
+    MemBank dad;
+    size_t quota;
+    atomic_t avail;
+};
+
+static
+void MemBankImplWhack ( MemBankImpl *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    Caps *caps;
+
+    MemBankDestroy ( & self -> dad, ctx );
+
+    caps = ( Caps* ) ctx -> caps;
+    if ( & self -> dad != caps -> mem )
+        MemBankFree ( caps -> mem, ctx, self, sizeof * self );
+    else
+    {
+        free ( self );
+        caps -> mem = NULL;
+    }
+}
+
+
+/* InUse
+ *  report the number of bytes in use
+ *  optionally returns quota
+ */
+static
+size_t MemBankImplInUse ( const MemBankImpl *self, const ctx_t *ctx, size_t *quota )
+{
+    size_t dummy;
+
+    if ( quota == NULL )
+        quota = & dummy;
+
+    if ( self != NULL )
+    {
+        * quota = self -> quota;
+        return self -> quota - atomic_read ( & self -> avail );
+    }
+
+    * quota = 0;
+    return 0;
+}
+
+
+/* Alloc
+ *  allocates some memory from bank
+ */
+static
+void *MemBankImplAlloc ( MemBankImpl *self, const ctx_t *ctx, size_t bytes, bool clear )
+{
+    if ( self != NULL )
+    {
+        /* allocation from the raw bank */
+        rc_t rc;
+        FUNC_ENTRY ( ctx );
+
+        /* update "avail" atomicially */
+        size_t remaining, avail;
+        for ( avail = atomic_read ( & self -> avail ); avail >= bytes; avail = remaining )
+        {
+            /* subtract the bytes */
+            remaining = atomic_test_and_set ( & self -> avail,
+                ( atomic_int ) ( avail - bytes ), ( atomic_int ) avail );
+            if ( remaining == avail )
+            {
+                /* try to allocate the memory directly */
+                void *mem = clear ? calloc ( 1, bytes ) : malloc ( bytes );
+                if ( mem == NULL )
+                {
+                    /* failed to get memory */
+                    atomic_add ( & self -> avail, ( atomic_int ) bytes );
+                    rc = RC ( rcExe, rcMemory, rcAllocating, rcMemory, rcExhausted );
+                    ERROR ( rc, "failed to allocate %zu bytes of memory", bytes );
+                }
+                else if ( bytes > 256 * 1024 )
+                {
+                    if ( bytes > 1024 * 1024 )
+                        STATUS ( 3, "allocated %,zu bytes of memory", bytes );
+                    else
+                        STATUS ( 4, "allocated %,zu bytes of memory", bytes );
+                }
+
+                return mem;
+            }
+        }
+
+        /* at this point we could be using a timeout */
+        rc = RC ( rcExe, rcMemory, rcAllocating, rcRange, rcExcessive );
+        ERROR ( rc, "quota exceeded allocating %zu bytes of memory", bytes );
+    }
+
+    return NULL;
+}
+
+
+/* Free
+ *  returns memory to bank
+ *  ignored by paged bank
+ *  burden on caller to remember allocation size
+ */
+static
+void MemBankImplFree ( MemBankImpl *self, const ctx_t *ctx, void *mem, size_t bytes )
+{
+    if ( mem != NULL )
+    {
+        FUNC_ENTRY ( ctx );
+
+        if ( self == NULL )
+        {
+            rc_t rc = RC ( rcExe, rcMemory, rcReleasing, rcSelf, rcNull );
+            ERROR ( rc, "attempt to return memory to NULL MemBank" );
+        }
+        else
+        {
+            /* release the memory */
+            free ( mem );
+
+            /* update the counters */
+            if ( bytes == 0 )
+                ANNOTATE ( "freed memory with size of 0 bytes" );
+            else
+            {
+                atomic_add ( & self -> avail, ( atomic_int ) bytes );
+
+                if ( bytes > 256 * 1024 )
+                {
+                    if ( bytes > 1024 * 1024 )
+                        STATUS ( 3, "freed %,zu bytes of memory", bytes );
+                    else
+                        STATUS ( 4, "freed %,zu bytes of memory", bytes );
+                }
+            }
+        }
+    }
+}
+
+static MemBank_vt MemBankImpl_vt =
+{
+    MemBankImplWhack,
+    MemBankImplInUse,
+    MemBankImplAlloc,
+    MemBankImplFree
+};
+
+
+/*--------------------------------------------------------------------------
+ * MemBank
+ *  very, very, very watered down memory bank
+ */
+
+
+/* Make
+ *  make a new memory bank
+ *  in a real system, this could make a bank linked to
+ *  the primordial one. in this system, there is only
+ *  a single bank, so this function is overloaded to
+ *  create both the primordial and to reset quota on it.
+ */
+MemBank *MemBankMake ( const ctx_t *ctx, size_t quota )
+{
+    FUNC_ENTRY ( ctx );
+
+    MemBankImpl *mem = malloc ( sizeof * mem );
+    if ( mem == NULL )
+        exit ( -1 );
+
+    MemBankInit ( & mem -> dad, ctx, & MemBankImpl_vt, "Process MemBank" );
+
+    if ( quota < 4096 )
+        quota = 4096;
+
+    mem -> quota = quota;
+    atomic_set ( & mem -> avail, ( atomic_int ) ( quota - sizeof * mem ) );
+
+    return & mem -> dad;
+}
+
+
+/* Init
+ */
+void MemBankInit ( MemBank *self, const ctx_t *ctx, const MemBank_vt *vt, const char *name )
+{
+    FUNC_ENTRY ( ctx );
+
+    self -> vt = vt;
+    KRefcountInit ( & self -> refcount, 1, "MemBank", "Make", name );
+    self -> align = 0;
+}
+
+
+/* Duplicate
+ * Release
+ */
+MemBank *MemBankDuplicate ( const MemBank *self, const ctx_t *ctx )
+{
+    if ( self != NULL )
+    {
+        switch ( KRefcountAdd ( & self -> refcount, "MemBank" ) )
+        {
+        case krefOkay:
+        case krefWhack:
+        case krefZero:
+            break;
+        case krefLimit:
+        case krefNegative: {
+            FUNC_ENTRY ( ctx );
+            rc_t rc = RC ( rcExe, rcMemory, rcAttaching, rcRange, rcExcessive );
+            ERROR ( rc, "excessive references on MemBank" );
+            return NULL;
+        }}
+    }
+    return ( MemBank* ) self;
+}
+
+void MemBankRelease ( const MemBank *self, const ctx_t *ctx )
+{
+    if ( self != NULL )
+    {
+        switch ( KRefcountDrop ( & self -> refcount, "MemBank" ) )
+        {
+        case krefOkay:
+            break;
+        case krefWhack:
+            ( * self -> vt -> whack ) ( ( MEMBANK_IMPL* ) self, ctx );
+            break;
+        case krefZero:
+            break;
+        case krefLimit:
+        case krefNegative: {
+            FUNC_ENTRY ( ctx );
+            rc_t rc = RC ( rcExe, rcMemory, rcReleasing, rcRange, rcExcessive );
+            ERROR ( rc, "excessive releases on MemBank" );
+        }}
+    }
+}
diff --git a/tools/sra-sort/meta-pair.c b/tools/sra-sort/meta-pair.c
new file mode 100644
index 0000000..a067fe2
--- /dev/null
+++ b/tools/sra-sort/meta-pair.c
@@ -0,0 +1,458 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct MetaPair StdMetaPair;
+#define METAPAIR_IMPL StdMetaPair
+
+#include "meta-pair.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+
+#include <kdb/meta.h>
+#include <kdb/namelist.h>
+#include <klib/namelist.h>
+#include <klib/printf.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+
+#include <string.h>
+
+
+FILE_ENTRY ( meta-pair );
+
+
+/*--------------------------------------------------------------------------
+ * StdMetaPair
+ */
+
+static
+void StdMetaPairWhack ( StdMetaPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    MetaPairDestroy ( self, ctx );
+    MemFree ( ctx, self, sizeof * self );
+}
+
+static MetaPair_vt StdMetaPair_vt =
+{
+    StdMetaPairWhack
+};
+
+
+/*--------------------------------------------------------------------------
+ * MetaPair
+ *  interface to pairing of source and destination tables
+ */
+
+
+/* Make
+ *  make a standard metadata pair from existing KMetadata objects
+ */
+MetaPair *MetaPairMake ( const ctx_t *ctx,
+    const KMetadata *src, KMetadata *dst, const char *full_path )
+{
+    FUNC_ENTRY ( ctx );
+
+    StdMetaPair *meta;
+
+    TRY ( meta = MemAlloc ( ctx, sizeof * meta, false ) )
+    {
+        TRY ( MetaPairInit ( meta, ctx, & StdMetaPair_vt, src, dst, full_path ) )
+        {
+            return meta;
+        }
+
+        MemFree ( ctx, meta, sizeof * meta );
+    }
+
+    return NULL;
+}
+
+
+/* Release
+ *  called by table at end of copy
+ */
+void MetaPairRelease ( MetaPair *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountDrop ( & self -> refcount, "MetaPair" ) )
+        {
+        case krefOkay:
+            break;
+        case krefWhack:
+            ( * self -> vt -> whack ) ( ( void* ) self, ctx );
+            break;
+        case krefZero:
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcMetadata, rcDestroying, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to release MetaPair" );
+        }
+    }
+}
+
+/* Duplicate
+ */
+MetaPair *MetaPairDuplicate ( MetaPair *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountAdd ( & self -> refcount, "MetaPair" ) )
+        {
+        case krefOkay:
+        case krefWhack:
+        case krefZero:
+            break;
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcMetadata, rcAttaching, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to duplicate MetaPair" );
+            return NULL;
+        }
+    }
+
+    return ( MetaPair* ) self;
+}
+
+
+/* Init
+ */
+void MetaPairInit ( MetaPair *self, const ctx_t *ctx, const MetaPair_vt *vt,
+    const KMetadata *src, KMetadata *dst, const char *full_spec )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    if ( self == NULL )
+    {
+        rc = RC ( rcExe, rcMetadata, rcConstructing, rcSelf, rcNull );
+        INTERNAL_ERROR ( rc, "bad MetaPair" );
+        return;
+    }
+
+    memset ( self, 0, sizeof * self );
+    self -> vt = vt;
+
+    rc = KMetadataAddRef ( self -> smeta = src );
+    if ( rc != 0 )
+        ERROR ( rc, "failed to duplicate metadata 'src.%s'", full_spec );
+    else
+    {
+        rc = KMetadataAddRef ( self -> dmeta = dst );
+        if ( rc != 0 )
+            ERROR ( rc, "failed to duplicate metadata 'dst.%s'", full_spec );
+        else
+        {
+            KRefcountInit ( & self -> refcount, 1, "MetaPair", "init", full_spec );
+            return;
+        }
+
+        KMetadataRelease ( self -> smeta );
+        self -> smeta = NULL;
+    }
+}
+
+/* Destroy
+ */
+void MetaPairDestroy ( MetaPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    rc = KMetadataRelease ( self -> dmeta );
+    if ( rc != 0 )
+        WARN ( "KMetadataRelease failed" );
+    KMetadataRelease ( self -> smeta );
+
+    memset ( self, 0, sizeof * self );
+}
+
+
+static
+void copy_meta_node_value ( const KMDataNode *src, const ctx_t *ctx, KMDataNode *dst )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    char buff [ 32*1024 ];
+    size_t num_read, remaining;
+
+    rc = KMDataNodeRead ( src, 0, buff, sizeof buff, & num_read, & remaining );
+    if ( rc != 0 )
+        INTERNAL_ERROR ( rc, "KMDataNodeRead failed" );
+    else if ( num_read != 0 )
+    {
+        rc = KMDataNodeWrite ( dst, buff, num_read );
+        if ( rc != 0 )
+            SYSTEM_ERROR ( rc, "KMDataNodeWrite failed" );
+        else
+        {
+            size_t offset;
+            for ( offset = num_read; remaining != 0; offset += num_read )
+            {
+                rc = KMDataNodeRead ( src, offset, buff, sizeof buff, & num_read, & remaining );
+                if ( rc != 0 )
+                {
+                    INTERNAL_ERROR ( rc, "KMDataNodeRead failed" );
+                    break;
+                }
+                rc = KMDataNodeAppend ( dst, buff, num_read );
+                if ( rc != 0 )
+                {
+                    SYSTEM_ERROR ( rc, "KMDataNodeAppend failed" );
+                    break;
+                }
+            }
+        }
+    }
+}
+
+static
+void copy_meta_node_attr ( const KMDataNode *src, const ctx_t *ctx, KMDataNode *dst, const char *name )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    size_t num_read;
+    char buff [ 32*1024 ];
+
+    rc = KMDataNodeReadAttr ( src, name, buff, sizeof buff, & num_read );
+    if ( rc != 0 )
+        ERROR ( rc, "KMDataNodeReadAttr '%s' failed", name );
+    else
+    {
+        rc = KMDataNodeWriteAttr ( dst, name, buff );
+        if ( rc != 0 )
+            ERROR ( rc, "KMDataNodeWriteAttr '%s' failed", name );
+    }
+}
+
+
+static
+const char *filter_node_name ( const char *name, size_t nsize, const char **exclude )
+{
+    uint32_t i;
+    for ( i = 0; exclude [ i ] != NULL; ++ i )
+    {
+        const char *x = exclude [ i ];
+        size_t xsize = strlen ( x );
+
+        /* allow exclude to be a prefix */
+        if ( xsize > 0 && x [ xsize - 1 ] == '*' )
+        {
+            if ( nsize < -- xsize )
+                continue;
+        }
+        else if ( nsize != xsize )
+        {
+            continue;
+        }
+
+        if ( memcmp ( name, x, xsize ) == 0 )
+            return NULL;
+    }
+
+    return name;
+ }
+
+
+static
+void copy_meta_node ( const KMDataNode *src, const ctx_t *ctx, KMDataNode *dst,
+    char path [ 32*1024 ], size_t psize, const char *owner_spec, const char **exclude )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* first, copy value */
+    TRY ( copy_meta_node_value ( src, ctx, dst ) )
+    {
+        /* next, copy attributes */
+        KNamelist *names;
+        rc_t rc = KMDataNodeListAttr ( src, & names );
+        if ( rc != 0 )
+            INTERNAL_ERROR ( rc, "KMDataNodeListAttr failed" );
+        else
+        {
+            uint32_t count;
+            rc = KNamelistCount ( names, & count );
+            if ( rc != 0 )
+                INTERNAL_ERROR ( rc, "KNamelistCount failed" );
+            else
+            {
+                uint32_t i;
+                const char *name;
+                for ( i = 0; i < count; ++ i )
+                {
+                    rc = KNamelistGet ( names, i, & name );
+                    if ( rc != 0 )
+                    {
+                        INTERNAL_ERROR ( rc, "KNamelistGet [ %u ] failed", i );
+                        break;
+                    }
+
+                    ON_FAIL ( copy_meta_node_attr ( src, ctx, dst, name ) )
+                        break;
+                }
+
+                if ( ! FAILED () )
+                {
+                    KNamelistRelease ( names );
+
+                    /* last, copy children */
+                    rc = KMDataNodeListChildren ( src, & names );
+                    if ( rc != 0 )
+                        INTERNAL_ERROR ( rc, "KMDataNodeListChildren failed" );
+                    else
+                    {
+                        rc = KNamelistCount ( names, & count );
+                        if ( rc != 0 )
+                            INTERNAL_ERROR ( rc, "KNamelistCount failed" );
+                        else if ( psize + 1 == 32*1024 )
+                        {
+                            rc = RC ( rcExe, rcNode, rcCopying, rcBuffer, rcInsufficient );
+                            ERROR ( rc, "metadata path too long" );
+                        }
+                        else
+                        {
+                            for ( i = 0; i < count; ++ i )
+                            {
+                                KMDataNode *dchild;
+                                const KMDataNode *schild;
+
+                                size_t nsize;
+                                static const char *always_exclude [] =
+                                {
+                                    ".seq", "col", "schema", 
+                                    "HUFFMAN*", "MSC454*", "NREADS", "NUMBER_P*", "NUMBER_S*",
+                                    NULL
+                                };
+
+                                rc = KNamelistGet ( names, i, & name );
+                                if ( rc != 0 )
+                                {
+                                    INTERNAL_ERROR ( rc, "KNamelistGet [ %u ] failed", i );
+                                    break;
+                                }
+
+                                nsize = string_size ( name );
+                                if ( psize + nsize + 1 >= 32*1024 )
+                                {
+                                    WARN ( "skipping node '%.*s/%s' - path too long", ( uint32_t ) psize, path, name );
+                                    continue;
+                                }
+
+                                if ( psize != 0 )
+                                    path [ psize ++ ] = '/';
+                                strcpy ( & path [ psize ], name );
+
+                                if ( exclude != NULL )
+                                {
+                                    name = filter_node_name ( name, nsize, exclude );
+                                    if ( name == NULL )
+                                        continue;
+                                }
+
+                                name = filter_node_name ( name, nsize, always_exclude );
+                                if ( name == NULL )
+                                    continue;
+
+                                rc = KMDataNodeOpenNodeRead ( src, & schild, "%s", name );
+                                if ( rc != 0 )
+                                    ERROR ( rc, "failed to open source metadata node '%s'", name );
+                                else
+                                {
+                                    rc = KMDataNodeOpenNodeUpdate ( dst, & dchild, "%s", name );
+                                    if ( rc != 0 )
+                                        ERROR ( rc, "failed to open destination metadata node '%s'", name );
+                                    else
+                                    {
+                                        copy_meta_node ( schild, ctx, dchild, path, psize + nsize, owner_spec, exclude );
+                                        KMDataNodeRelease ( dchild );
+                                    }
+
+                                    KMDataNodeRelease ( schild );
+                                }
+
+                                if ( FAILED () )
+                                    break;
+                            }
+                        }
+                    }
+                }
+            }
+
+            KNamelistRelease ( names );
+        }
+    }
+}
+
+
+/* Copy
+ *  copy from source to destination
+ */
+void MetaPairCopy ( MetaPair *self, const ctx_t *ctx, const char *owner_spec, const char **exclude )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    char path [ 32*1024 ];
+    const KMDataNode *src;
+
+    STATUS ( 3, "copying '%s' metadata", owner_spec );
+
+    rc = KMetadataOpenNodeRead ( self -> smeta, & src, "/" );
+    if ( rc != 0 )
+        INTERNAL_ERROR ( rc, "KMetadataOpenNodeRead failed to obtain '%s' root node", owner_spec );
+    else
+    {
+        KMDataNode *dst;
+        rc = KMetadataOpenNodeUpdate ( self -> dmeta, & dst, "/" );
+        if ( rc != 0 )
+            INTERNAL_ERROR ( rc, "KMetadataOpenNodeUpdate failed to obtain '%s' root node", owner_spec );
+        else
+        {
+            path [ 0 ] = 0;
+            copy_meta_node ( src, ctx, dst, path, 0, owner_spec, exclude );
+
+            KMDataNodeRelease ( dst );
+        }
+
+        KMDataNodeRelease ( src );
+    }
+
+    STATUS ( 3, "finished copying metadata" );
+}
diff --git a/tools/sra-sort/meta-pair.h b/tools/sra-sort/meta-pair.h
new file mode 100644
index 0000000..1aa65e5
--- /dev/null
+++ b/tools/sra-sort/meta-pair.h
@@ -0,0 +1,109 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_meta_pair_
+#define _h_sra_sort_meta_pair_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+#ifndef _h_klib_refcount_
+#include <klib/refcount.h>
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct KMetadata;
+
+
+/*--------------------------------------------------------------------------
+ * MetaPair
+ *  interface to pairing of source and destination tables
+ */
+typedef struct MetaPair_vt MetaPair_vt;
+
+typedef struct MetaPair MetaPair;
+struct MetaPair
+{
+    /* polymorphic */
+    const MetaPair_vt *vt;
+
+    /* the pair of KMetadata */
+    struct KMetadata const *smeta;
+    struct KMetadata *dmeta;
+
+    KRefcount refcount;
+};
+
+#ifndef METAPAIR_IMPL
+#define METAPAIR_IMPL MetaPair
+#endif
+
+struct MetaPair_vt
+{
+    void ( * whack ) ( METAPAIR_IMPL *self, const ctx_t *ctx );
+};
+
+
+/* Make
+ *  make a standard metadata pair from existing KMetadata objects
+ */
+MetaPair *MetaPairMake ( const ctx_t *ctx,
+    struct KMetadata const *src, struct KMetadata *dst,
+    const char *full_path );
+
+
+/* Release
+ *  called by table at end of copy
+ */
+void MetaPairRelease ( MetaPair *self, const ctx_t *ctx );
+
+/* Duplicate
+ */
+MetaPair *MetaPairDuplicate ( MetaPair *self, const ctx_t *ctx );
+
+
+/* Init
+ */
+void MetaPairInit ( MetaPair *self, const ctx_t *ctx, const MetaPair_vt *vt,
+    struct KMetadata const *src, struct KMetadata *dst, const char *full_spec );
+
+/* Destroy
+ */
+void MetaPairDestroy ( MetaPair *self, const ctx_t *ctx );
+
+
+/* Copy
+ *  copy from source to destination
+ */
+void MetaPairCopy ( MetaPair *self, const ctx_t *ctx,
+    const char *owner_spec, const char **exclude );
+
+
+#endif /* _h_sra_sort_meta_pair_ */
diff --git a/tools/sra-sort/paged-membank.c b/tools/sra-sort/paged-membank.c
new file mode 100644
index 0000000..a91c4d4
--- /dev/null
+++ b/tools/sra-sort/paged-membank.c
@@ -0,0 +1,244 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct PagedMemBank PagedMemBank;
+#define MEMBANK_IMPL PagedMemBank
+
+#include "caps.h"
+#include "ctx.h"
+#include "mem.h"
+#include "except.h"
+#include "status.h"
+#include "sra-sort.h"
+
+#include "membank-priv.h"
+
+#include <klib/container.h>
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+FILE_ENTRY ( paged-membank );
+
+
+/*--------------------------------------------------------------------------
+ * MemPage
+ */
+typedef struct MemPage MemPage;
+struct MemPage
+{
+    SLNode n;
+    size_t used;
+};
+
+/*--------------------------------------------------------------------------
+ * PagedMemBank
+ *  designed to allocate a lot of little bits of memory
+ *  and then free them all at once
+ */
+struct PagedMemBank
+{
+    MemBank dad;
+    size_t quota;
+    size_t avail;
+    size_t pgsize;
+    SLList pages;
+};
+
+
+/* Whack
+ */
+static
+void PagedMemBankWhack ( PagedMemBank *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    MemPage *pg = ( MemPage* ) SLListPopHead ( & self -> pages );
+    while ( pg != NULL )
+    {
+        MemFree ( ctx, pg, self -> pgsize );
+        pg = ( MemPage* ) SLListPopHead ( & self -> pages );
+    }
+
+    MemBankDestroy ( & self -> dad, ctx );
+
+    MemFree ( ctx, self, sizeof * self );
+}
+
+
+/* InUse
+ *  report the number of bytes in use
+ *  optionally returns quota
+ */
+static
+size_t PagedMemBankInUse ( const PagedMemBank *self, const ctx_t *ctx, size_t *quota )
+{
+    size_t dummy;
+
+    if ( quota == NULL )
+        quota = & dummy;
+
+    if ( self != NULL )
+    {
+        * quota = self -> quota;
+        return self -> quota - self -> avail;
+    }
+
+    * quota = 0;
+    return 0;
+}
+
+
+/* Alloc
+ *  allocates some memory from bank
+ */
+static
+void *PagedMemBankAlloc ( PagedMemBank *self, const ctx_t *ctx, size_t bytes, bool clear )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    void *mem;
+    size_t avail;
+
+    /* check current alloc page */
+    MemPage *pg = ( MemPage* ) SLListHead ( & self -> pages );
+    if ( pg != NULL )
+    {
+        /* calculate bytes available */
+        avail = self -> pgsize - pg -> used;
+        if ( avail >= bytes )
+        {
+            /* got the memory */
+            mem = & ( ( uint8_t* ) pg ) [ pg -> used ];
+            pg -> used += bytes;
+
+            /* zero it out if so requested */
+            if ( clear )
+                memset ( mem, 0, bytes );
+
+            return mem;
+        }
+    }
+
+    /* either didn't have a page or didn't have enough memory
+       test for being able to fit in ANY page */
+    if ( bytes > self -> pgsize - sizeof * pg )
+    {
+        rc = RC ( rcExe, rcMemory, rcAllocating, rcData, rcExcessive );
+        ERROR ( rc, "requested memory allocation of %zu bytes is too large to fit into a page", bytes );
+        return NULL;
+    }
+
+    /* allocate the bytes */
+    if ( self -> avail >= self -> pgsize )
+    {
+        /* going to allocate a full page */
+        self -> avail -= self -> pgsize;
+
+        /* ask process for memory block */
+        TRY ( pg = MemAlloc ( ctx, self -> pgsize, false ) )
+        {
+            /* got it - push it onto stack */
+            pg -> used = sizeof * pg + bytes;
+            SLListPushHead ( & self -> pages, & pg -> n );
+
+            /* clear memory of asked */
+            mem = pg + 1;
+            if ( clear )
+                memset ( mem, 0, bytes );
+
+            return mem;
+        }
+
+        /* return with error from main MemBank */
+        return NULL;
+    }
+
+    /* at this point we could be using a timeout */
+    rc = RC ( rcExe, rcMemory, rcAllocating, rcRange, rcExcessive );
+    ERROR ( rc, "quota exceeded allocating %zu bytes of page memory for a %zu byte block", self -> pgsize, bytes );
+
+    return NULL;
+}
+
+
+/* Free
+ *  ignored by paged bank
+ */
+static
+void PagedMemBankFree ( PagedMemBank *self, const ctx_t *ctx, void *mem, size_t bytes )
+{
+}
+
+
+static MemBank_vt PagedMemBank_vt =
+{
+    PagedMemBankWhack,
+    PagedMemBankInUse,
+    PagedMemBankAlloc,
+    PagedMemBankFree
+};
+
+
+/*--------------------------------------------------------------------------
+ * MemBank
+ *  very, very, very watered down memory bank
+ */
+
+/* MakePaged
+ *  make a new paged memory bank
+ */
+MemBank *MemBankMakePaged ( const ctx_t *ctx, size_t quota, size_t pgsize )
+{
+    FUNC_ENTRY ( ctx );
+    PagedMemBank *mem;
+
+    /* special case for using memory mapped banks */
+    if ( ctx -> caps -> tool -> mmapdir != NULL )
+        return MemBankMakePagedMMap ( ctx, quota, pgsize );
+
+    if ( pgsize < 4096 )
+        pgsize = 4096;
+
+    if ( quota < pgsize )
+        quota = pgsize;
+
+    TRY ( mem = MemAlloc ( ctx, sizeof * mem, true ) )
+    {
+        TRY ( MemBankInit ( & mem -> dad, ctx, & PagedMemBank_vt, "Task MemBank" ) )
+        {
+            mem -> quota = mem -> avail = quota;
+            mem -> pgsize = pgsize;
+            return & mem -> dad;
+        }
+
+        MemFree ( ctx, mem, sizeof * mem );
+    }
+
+    return NULL;
+}
diff --git a/tools/sra-sort/paged-mmapbank.c b/tools/sra-sort/paged-mmapbank.c
new file mode 100644
index 0000000..aa6d6e5
--- /dev/null
+++ b/tools/sra-sort/paged-mmapbank.c
@@ -0,0 +1,399 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct PagedMMapBank PagedMMapBank;
+#define MEMBANK_IMPL PagedMMapBank
+
+#include "caps.h"
+#include "ctx.h"
+#include "mem.h"
+#include "except.h"
+#include "status.h"
+#include "sra-sort.h"
+
+#include "membank-priv.h"
+
+#include <kfs/mmap.h>
+#include <kfs/file.h>
+#include <kfs/directory.h>
+#include <klib/container.h>
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+FILE_ENTRY ( paged-mmapbank );
+
+
+/*--------------------------------------------------------------------------
+ * MMapPage
+ *  a "page" which is really an entire mmap
+ */
+typedef struct MMapPage MMapPage;
+struct MMapPage
+{
+    SLNode n;
+    KMMap *mmap;
+    uint8_t *addr;
+    size_t size;
+    size_t used;
+};
+
+static
+void CC MMapPageWhack ( SLNode *n, void *data )
+{
+    MMapPage *self = ( MMapPage* ) n;
+    const ctx_t *ctx = ( const void* ) data;
+
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc = KMMapRelease ( self -> mmap );
+    if ( rc != 0 )
+        SYSTEM_ERROR ( rc, "KMMapRelease failed" );
+
+    MemFree ( ctx, self, sizeof * self );
+}
+
+
+/*--------------------------------------------------------------------------
+ * PagedMMapBank
+ *  a memory bank based upon system mmap
+ */
+struct PagedMMapBank
+{
+    MemBank dad;
+    size_t quota;
+    size_t used;
+    size_t pgsize;
+    KFile *backing;
+    SLList pages;
+};
+
+
+/* Whack
+ */
+static
+void PagedMMapBankWhack ( PagedMMapBank *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    SLListWhack ( & self -> pages, MMapPageWhack, ( void* ) ctx );
+
+    rc = KFileRelease ( self -> backing );
+    if ( rc != 0 )
+        SYSTEM_ERROR ( rc, "KFileRelease failed on backing file" );
+    self -> backing = NULL;
+
+    MemBankDestroy ( & self -> dad, ctx );
+
+    MemFree ( ctx, self, sizeof * self );
+}
+
+
+/* InUse
+ *  report the number of bytes in use
+ *  optionally returns quota
+ */
+static
+size_t PagedMMapBankInUse ( const PagedMMapBank *self, const ctx_t *ctx, size_t *quota )
+{
+    size_t dummy;
+
+    if ( quota == NULL )
+        quota = & dummy;
+
+    if ( self != NULL )
+    {
+        * quota = self -> quota;
+        return self -> used;
+    }
+
+    * quota = 0;
+    return 0;
+}
+
+
+/* CreateBacking
+ */
+static
+void PagedMMapBankCreateBacking ( PagedMMapBank *self, const ctx_t *ctx, KFile **backing )
+{
+    FUNC_ENTRY ( ctx );
+
+    KDirectory *wd;
+    rc_t rc = KDirectoryNativeDir ( & wd );
+    if ( rc != 0 )
+        ABORT ( rc, "KDirectoryNativeDir failed" );
+    else
+    {
+        static uint32_t file_no;
+        const Tool *tp = ctx -> caps -> tool;
+
+        ++ file_no;
+        STATUS ( 5, "creating backing file '%s/sra-sort-buffer.%d.%u'", tp -> mmapdir, tp -> pid, file_no );
+
+        rc = KDirectoryCreateFile ( wd, backing, true,
+            0600, kcmInit | kcmParents, "%s/sra-sort-buffer.%d.%u",
+            tp -> mmapdir, tp -> pid, file_no );
+        if ( rc != 0 )
+            ABORT ( rc, "KDirectoryCreateFile failed when creating mem-mapped buffer" );
+        else
+        {
+#if ! WINDOWS
+            /* unlinking file is a wonderful thing */
+            if ( tp -> unlink_idx_files )
+            {
+                /* unlink KFile */
+                STATUS ( 5, "unlinking backing file '%s/sra-sort-buffer.%d.%u'", tp -> mmapdir, tp -> pid, file_no );
+                rc = KDirectoryRemove ( wd, false, "%s/sra-sort-buffer.%d.%u",
+                    tp -> mmapdir, tp -> pid, file_no );
+                if ( rc != 0 )
+                    WARN ( "failed to unlink mem-mapped buffer file #%u", file_no );
+            }
+#endif
+            /* set initial size to a page */
+            rc = KFileSetSize ( * backing, self -> pgsize );
+            if ( rc != 0 )
+                SYSTEM_ERROR ( rc, "KFileSetSize failed to set file to %zu bytes", self -> pgsize );
+        }
+
+        KDirectoryRelease ( wd );
+    }
+}
+
+
+/* ExtendBacking
+ *  creates a backing file if not there
+ *  extends it otherwise
+ */
+static
+void PagedMMapBankExtendBacking ( PagedMMapBank *self, const ctx_t *ctx )
+{
+#if USE_SINGLE_BACKING_FILE
+
+    /* this code is only useful if using a single file for all maps */
+    FUNC_ENTRY ( ctx );
+
+    /* create the file on first attempt */
+    if ( self -> backing == NULL )
+    {
+        assert ( self -> used == 0 );
+        PagedMMapBankCreateBacking ( self, ctx, & self -> backing )l
+    }
+    else
+    {
+        /* extend the file */
+        rc_t rc;
+        STATUS ( 4, "extending common buffer file to %,zu bytes", self -> used + self -> pgsize );
+        rc = KFileSetSize ( self -> backing, self -> used + self -> pgsize );
+        if ( rc != 0 )
+            SYSTEM_ERROR ( rc, "KFileSetSize failed to extend file size to %zu bytes", self -> used + self -> pgsize );
+    }
+#endif
+}
+
+
+/* MapPage
+ */
+static
+void PagedMMapBankMapPage ( PagedMMapBank *self, const ctx_t *ctx, MMapPage *pg )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+#if USE_SINGLE_BACKING_FILE
+    STATUS ( 4, "allocating new mmap of %,zu bytes onto common file at offset %,zu", self -> pgsize, self -> used );
+    rc = KMMapMakeRgnUpdate ( & pg -> mmap, self -> backing, self -> used, self -> pgsize );
+#else
+    KFile *backing;
+    ON_FAIL ( PagedMMapBankCreateBacking ( self, ctx, & backing ) )
+        return;
+
+    STATUS ( 4, "allocating new mmap of %,zu bytes onto its own file", self -> pgsize );
+    rc = KMMapMakeRgnUpdate ( & pg -> mmap, backing, 0, self -> pgsize );
+    KFileRelease ( backing );
+#endif
+
+    if ( rc != 0 )
+        SYSTEM_ERROR ( rc, "KMMapMakeRgnUpdate failed creating %zu byte region", self -> pgsize );
+    else
+    {
+        rc = KMMapAddrUpdate ( pg -> mmap, ( void** ) & pg -> addr );
+        if ( rc != 0 )
+            INTERNAL_ERROR ( rc, "KMMapAddrUpdate failed" );
+        else
+        {
+            rc = KMMapSize ( pg -> mmap, & pg -> size );
+            if ( rc != 0 )
+                INTERNAL_ERROR ( rc, "KMMapSize failed" );
+            else
+            {
+                pg -> used = 0;
+                self -> used += self -> pgsize;
+                STATUS ( 4, "total mem-mapped buffer space: %,zu bytes", self -> used );
+                return;
+            }
+        }
+
+        KMMapRelease ( pg -> mmap );
+        pg -> mmap = NULL;
+    }
+}
+
+
+/* Alloc
+ *  allocates some memory from bank
+ */
+static
+void *PagedMMapBankAlloc ( PagedMMapBank *self, const ctx_t *ctx, size_t bytes, bool clear )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    void *mem;
+    size_t avail;
+
+    /* check current alloc page */
+    MMapPage *pg = ( MMapPage* ) SLListHead ( & self -> pages );
+    if ( pg != NULL )
+    {
+        /* calculate bytes available */
+        avail = pg -> size - pg -> used;
+        if ( avail >= bytes )
+        {
+            /* got the memory */
+            mem = & pg -> addr [ pg -> used ];
+            pg -> used += bytes;
+
+            /* zero it out if so requested */
+            if ( clear )
+                memset ( mem, 0, bytes );
+
+            return mem;
+        }
+    }
+
+    /* either didn't have a page or didn't have enough memory
+       test for being able to fit in ANY page */
+    if ( bytes > self -> pgsize )
+    {
+        rc = RC ( rcExe, rcMemory, rcAllocating, rcData, rcExcessive );
+        ERROR ( rc, "requested memory allocation of %zu bytes is too large to fit into a page", bytes );
+        return NULL;
+    }
+
+    /* allocate the bytes */
+    if ( self -> used + self -> pgsize <= self -> quota )
+    {
+        /* ask process for memory block */
+        TRY ( pg = MemAlloc ( ctx, sizeof * pg, false ) )
+        {
+            /* increase size of underlying file */
+            TRY ( PagedMMapBankExtendBacking ( self, ctx ) )
+            {
+                TRY ( PagedMMapBankMapPage ( self, ctx, pg ) )
+                {
+                    /* got it - push it onto stack */
+                    SLListPushHead ( & self -> pages, & pg -> n );
+
+                    /* clear memory of asked */
+                    mem = pg  -> addr;
+                    pg -> used = bytes;
+                    if ( clear )
+                        memset ( mem, 0, bytes );
+
+                    return mem;
+                }
+            }
+
+            MemFree ( ctx, pg, sizeof * pg );
+        }
+
+        return NULL;
+    }
+
+    /* at this point we could be using a timeout */
+    rc = RC ( rcExe, rcMemory, rcAllocating, rcRange, rcExcessive );
+    ERROR ( rc, "quota exceeded allocating %zu bytes of page memory for a %zu byte block", self -> pgsize, bytes );
+
+    return NULL;
+}
+
+
+/* Free
+ *  ignored by paged bank
+ */
+static
+void PagedMMapBankFree ( PagedMMapBank *self, const ctx_t *ctx, void *mem, size_t bytes )
+{
+}
+
+
+static MemBank_vt PagedMMapBank_vt =
+{
+    PagedMMapBankWhack,
+    PagedMMapBankInUse,
+    PagedMMapBankAlloc,
+    PagedMMapBankFree
+};
+
+
+/*--------------------------------------------------------------------------
+ * MemBank
+ *  very, very, very watered down memory bank
+ */
+
+/* MakePagedMMap
+ *  make a new paged memory bank backed by memory map
+ */
+MemBank *MemBankMakePagedMMap ( const ctx_t *ctx, size_t quota, size_t pgsize )
+{
+    FUNC_ENTRY ( ctx );
+    PagedMMapBank *mem;
+
+    if ( pgsize < 256 * 1024 * 1024 )
+        pgsize = 256 * 1024 * 1024;
+
+    if ( quota < pgsize )
+        quota = pgsize;
+
+    TRY ( mem = MemAlloc ( ctx, sizeof * mem, true ) )
+    {
+        TRY ( MemBankInit ( & mem -> dad, ctx, & PagedMMapBank_vt, "Memory Mapped Task MemBank" ) )
+        {
+            mem -> quota = quota;
+            mem -> pgsize = pgsize;
+            return & mem -> dad;
+        }
+
+        MemFree ( ctx, mem, sizeof * mem );
+    }
+
+    return NULL;
+}
diff --git a/tools/sra-sort/poslen-col-pair.c b/tools/sra-sort/poslen-col-pair.c
new file mode 100644
index 0000000..4d9ce46
--- /dev/null
+++ b/tools/sra-sort/poslen-col-pair.c
@@ -0,0 +1,559 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct PoslenColReader PoslenColReader;
+#define COLREADER_IMPL PoslenColReader
+
+typedef struct PoslenColWriter PoslenColWriter;
+#define COLWRITER_IMPL PoslenColWriter
+
+#include "col-pair.h"
+#include "tbl-pair.h"
+#include "map-file.h"
+#include "glob-poslen.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+#include "sra-sort.h"
+
+#include <vdb/cursor.h>
+#include <vdb/vdb-priv.h>
+#include <kapp/main.h>
+#include <kfs/defs.h>
+#include <klib/printf.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+
+#include <string.h>
+
+FILE_ENTRY ( poslen-col-pair );
+
+
+/*--------------------------------------------------------------------------
+ * PoslenColReader
+ *  implementation of ColumnReader based upon MapFile temp column read
+ */
+struct PoslenColReader
+{
+    ColumnReader dad;
+
+    /* cached first id in column */
+    int64_t first_id;
+
+    /* buffer for reading poslen */
+    int64_t start_id, excl_stop_id;
+    uint64_t *buff;
+    size_t max_ids;
+
+    /* source of poslen */
+    const MapFile *tmp_col;
+
+    size_t full_spec_size;
+    char full_spec [ 1 ];
+};
+
+
+/* Whack
+ */
+static
+void PoslenColReaderWhack ( PoslenColReader *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* self-bytes */
+    size_t bytes = sizeof * self + self -> full_spec_size;
+
+    /* free buffer */
+    if ( self -> buff != NULL )
+    {
+        ON_FAIL ( MemFree ( ctx, self -> buff, self -> max_ids * sizeof * self -> buff ) )
+        {
+            CLEAR ();
+        }
+        self -> buff = NULL;
+    }
+
+    /* release MapFile */
+    ON_FAIL ( MapFileRelease ( self -> tmp_col, ctx ) )
+    {
+        WARN ( "MapFileRelease failed on '%s'", self -> full_spec );
+        CLEAR ();
+    }
+    self -> tmp_col = NULL;
+
+    /* free self */
+    MemFree ( ctx, self, bytes );
+}
+
+/* FullSpec
+ */
+static
+const char *PoslenColReaderFullSpec ( const PoslenColReader *self, const ctx_t *ctx )
+{
+    return self -> full_spec;
+}
+
+
+/* IdRange
+ *  returns the number of ids available
+ *  and optionally the first id
+ */
+static
+uint64_t PoslenColReaderIdRange ( const PoslenColReader *self,
+    const ctx_t *ctx, int64_t *opt_first )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( opt_first != NULL )
+    {
+        ON_FAIL ( * opt_first = self -> first_id )
+            return 0;
+    }
+
+    return MapFileCount ( self -> tmp_col, ctx );
+}
+
+
+/* PreCopy
+ *  create buffer
+ */
+static
+void PoslenColReaderPreCopy ( PoslenColReader *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    const Tool *tp = ctx -> caps -> tool;
+
+    self -> max_ids = tp -> max_poslen_ids;
+    if ( tp -> max_poslen_ids < 4096 )
+        self -> max_ids = 4096;
+
+    TRY ( self -> buff = MemAlloc ( ctx, self -> max_ids * sizeof * self -> buff, false ) )
+    {
+        self -> start_id = self -> excl_stop_id = self -> first_id;
+    }
+    CATCH_ALL ()
+    {
+        ANNOTATE ( "failed to allocate buffer for PoslenColReader" );
+    }
+}
+
+
+/* PostCopy
+ *  douse buffer
+ */
+static
+void PoslenColReaderPostCopy ( PoslenColReader *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( self -> buff != NULL )
+    {
+        TRY ( MemFree ( ctx, self -> buff, self -> max_ids * sizeof * self -> buff ) )
+        {
+            self -> buff = NULL;
+        }
+    }
+}
+
+
+/* Read
+ *  read next row of data
+ *  returns NULL if no rows are available
+ */
+static
+const void *PoslenColReaderRead ( PoslenColReader *self, const ctx_t *ctx,
+    int64_t row_id, uint32_t *elem_bits, uint32_t *boff, uint32_t *row_len )
+{
+    FUNC_ENTRY ( ctx );
+
+    uint32_t dummy;
+
+    if ( elem_bits == NULL )
+        elem_bits = & dummy;
+    if ( boff == NULL )
+        boff = & dummy;
+    if ( row_len == NULL )
+        row_len = & dummy;
+
+    * elem_bits = 64;
+    * boff = 0;
+    * row_len = 0;
+
+    assert ( self -> buff != NULL );
+
+    if ( row_id < self -> start_id || row_id >= self -> excl_stop_id )
+    {
+        size_t num_read;
+
+        if ( row_id < self -> first_id )
+            return NULL;
+
+        /* generate page-aligned starting id */
+        self -> start_id = ( row_id - self -> first_id );
+        self -> start_id -= self -> start_id % self -> max_ids;
+        self -> start_id += self -> first_id;
+        assert ( self -> start_id + self -> max_ids > row_id );
+
+        /* read into buffer */
+        ON_FAIL ( num_read = MapFileReadPoslen ( self -> tmp_col, ctx, self -> start_id, self -> buff, self -> max_ids ) )
+        {
+            self -> start_id = self -> excl_stop_id = self -> first_id;
+            return NULL;
+        }
+        self -> excl_stop_id = self -> start_id + num_read;
+
+        if ( row_id >= self -> excl_stop_id )
+            return NULL;
+    }
+
+    * row_len = 1;
+    return & self -> buff [ row_id - self -> start_id ];
+}
+
+static ColumnReader_vt PoslenColReader_vt =
+{
+    PoslenColReaderWhack,
+    PoslenColReaderFullSpec,
+    PoslenColReaderIdRange,
+    PoslenColReaderPreCopy,
+    PoslenColReaderPostCopy,
+    PoslenColReaderRead
+};
+
+
+/*--------------------------------------------------------------------------
+ * TablePair
+ */
+
+
+/* MakePoslenColReader
+ *  make temporary column reader
+ */
+ColumnReader *TablePairMakePoslenColReader ( TablePair *self, const ctx_t *ctx,
+    const MapFile *tmp_col, const char *colspec )
+{
+    FUNC_ENTRY ( ctx );
+
+    PoslenColReader *col;
+    size_t full_spec_size = self -> full_spec_size + string_size ( colspec ) + sizeof "src.." - 1;
+
+    TRY ( col = MemAlloc ( ctx, sizeof * col + full_spec_size, false ) )
+    {
+        TRY ( ColumnReaderInit ( & col -> dad, ctx, & PoslenColReader_vt ) )
+        {
+            TRY ( col -> first_id = MapFileFirst ( tmp_col, ctx ) )
+            {
+                TRY ( col -> tmp_col = MapFileDuplicate ( tmp_col, ctx ) )
+                {
+                    rc_t rc;
+
+                    col -> dad . presorted = true;
+                    col -> start_id = col -> excl_stop_id = col -> first_id;
+                    col -> buff = NULL;
+                    col -> max_ids = ctx -> caps -> tool -> max_poslen_ids;
+                    col -> full_spec_size = ( uint32_t ) full_spec_size;
+
+                    rc = string_printf ( col -> full_spec, full_spec_size + 1, NULL,
+                        "src.%s.%s", self -> full_spec, colspec );
+                    if ( rc == 0 )
+                        return & col -> dad;
+
+                    ABORT ( rc, "miscalculated string size" );
+                }
+            }
+        }
+
+        MemFree ( ctx, col, sizeof * col + full_spec_size );
+    }
+    CATCH_ALL ()
+    {
+        ANNOTATE ( "failed to allocate %zu bytes for PoslenColReader", sizeof * col + full_spec_size );
+    }
+
+    return NULL;
+
+}
+
+
+/*--------------------------------------------------------------------------
+ * PoslenColWriter
+ *  implementation of ColumnWriter based upon VCursor
+ */
+struct PoslenColWriter
+{
+    ColumnWriter dad;
+
+    VCursor *curs;
+    uint32_t global_ref_start;
+    uint32_t ref_len;
+
+    uint32_t full_spec_size;
+    char full_spec [ 1 ];
+};
+
+static
+void PoslenColWriterWhack ( PoslenColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    rc = VCursorRelease ( self -> curs );
+    if ( rc != 0 )
+        ERROR ( rc, "VCursorRelease failed on column '%s'", self -> full_spec );
+
+    MemFree ( ctx, self, sizeof * self + self -> full_spec_size );
+}
+
+
+static
+const char *PoslenColWriterFullSpec ( const PoslenColWriter *self, const ctx_t *ctx )
+{
+    return self -> full_spec;
+}
+
+static
+void PoslenColWriterDummyStub ( PoslenColWriter *self, const ctx_t *ctx )
+{
+}
+
+static
+void PoslenColWriterWrite ( PoslenColWriter *self, const ctx_t *ctx,
+    uint32_t elem_bits, const void *data, uint32_t boff, uint32_t row_len )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    uint64_t poslen;
+
+    uint32_t ref_len;
+    uint64_t global_ref_start;
+
+    assert ( elem_bits == 64 );
+    assert ( boff == 0 );
+    assert ( row_len == 1 );
+
+    memcpy ( & poslen, data, sizeof poslen );
+    global_ref_start = decode_pos_len ( poslen );
+    ref_len = poslen_to_len ( poslen );
+
+    rc = VCursorOpenRow ( self -> curs );
+    if ( rc != 0 )
+        INTERNAL_ERROR ( rc, "VCursorOpenRow failed on column '%s'", self -> full_spec );
+    else
+    {
+        rc = VCursorWrite ( self -> curs, self -> global_ref_start, sizeof global_ref_start * 8, & global_ref_start, 0, 1 );
+        if ( rc != 0 )
+            SYSTEM_ERROR ( rc, "VCursorWrite failed for GLOBAL_REF_START of column '%s'", self -> full_spec );
+        else
+        {
+            rc = VCursorWrite ( self -> curs, self -> ref_len, sizeof ref_len * 8, & ref_len, 0, 1 );
+            if ( rc != 0 )
+                SYSTEM_ERROR ( rc, "VCursorWrite failed for REF_LEN of column '%s'", self -> full_spec );
+            else
+            {
+                rc = VCursorCommitRow ( self -> curs );
+                if ( rc != 0 )
+                    SYSTEM_ERROR ( rc, "VCursorCommit failed for column '%s'", self -> full_spec );
+            }
+        }
+
+        rc = VCursorCloseRow ( self -> curs );
+        if ( rc != 0 )
+            INTERNAL_ERROR ( rc, "VCursorCloseRow failed on column '%s'", self -> full_spec );
+    }
+}
+
+static
+void PoslenColWriterWriteStatic ( PoslenColWriter *self, const ctx_t *ctx,
+    uint32_t elem_bits, const void *data, uint32_t boff, uint32_t row_len, uint64_t count )
+{
+    FUNC_ENTRY ( ctx );
+
+    uint64_t poslen;
+
+    uint32_t ref_len;
+    uint64_t global_ref_start;
+
+    assert ( elem_bits == 64 );
+    assert ( boff == 0 );
+    assert ( row_len == 1 );
+
+    memcpy ( & poslen, data, sizeof poslen );
+    global_ref_start = decode_pos_len ( poslen );
+    ref_len = poslen_to_len ( poslen );
+
+    for ( ; ! FAILED () && count > 0; -- count )
+    {
+        rc_t rc = VCursorOpenRow ( self -> curs );
+        if ( rc != 0 )
+            INTERNAL_ERROR ( rc, "VCursorOpenRow failed on column '%s'", self -> full_spec );
+        else
+        {
+            rc = VCursorWrite ( self -> curs, self -> global_ref_start, sizeof global_ref_start * 8, & global_ref_start, 0, 1 );
+            if ( rc != 0 )
+                SYSTEM_ERROR ( rc, "VCursorWrite failed for GLOBAL_REF_START of column '%s'", self -> full_spec );
+            else
+            {
+                rc = VCursorWrite ( self -> curs, self -> ref_len, sizeof ref_len * 8, & ref_len, 0, 1 );
+                if ( rc != 0 )
+                    SYSTEM_ERROR ( rc, "VCursorWrite failed for REF_LEN of column '%s'", self -> full_spec );
+                else
+                {
+                    rc = VCursorCommitRow ( self -> curs );
+                    if ( rc != 0 )
+                        SYSTEM_ERROR ( rc, "VCursorCommit failed for column '%s'", self -> full_spec );
+                    else if ( count > 1 )
+                    {
+                        uint64_t cnt = (count < 0x10000000U ) ? count : 0x10000000U;
+                        rc = VCursorRepeatRow ( self -> curs, cnt - 1 );
+                        if ( rc != 0 )
+                            SYSTEM_ERROR ( rc, "VCursorRepeatRow failed for column '%s'", self -> full_spec );
+                        count -= cnt - 1;
+                    }
+                }
+            }
+
+            rc = VCursorCloseRow ( self -> curs );
+            if ( rc != 0 )
+                INTERNAL_ERROR ( rc, "VCursorCloseRow failed on column '%s'", self -> full_spec );
+        }
+    }
+}
+
+static
+void PoslenColWriterCommit ( PoslenColWriter *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    rc = VCursorCommit ( self -> curs );
+    if ( rc != 0 )
+        ERROR ( rc, "VCursorCommit failed on column '%s'", self -> full_spec );
+    else
+    {
+        rc = VCursorRelease ( self -> curs );
+        if ( rc != 0 )
+            ERROR ( rc, "VCursorRelease failed on column '%s'", self -> full_spec );
+        else
+        {
+            self -> curs = NULL;
+        }
+    }
+}
+
+
+static ColumnWriter_vt PoslenColWriter_vt =
+{
+    PoslenColWriterWhack,
+    PoslenColWriterFullSpec,
+    PoslenColWriterDummyStub,
+    PoslenColWriterDummyStub,
+    PoslenColWriterWrite,
+    PoslenColWriterWriteStatic,
+    PoslenColWriterCommit
+};
+
+
+
+/*--------------------------------------------------------------------------
+ * TablePair
+ */
+
+
+/* MakePoslenColWriter
+ */
+ColumnWriter *TablePairMakePoslenColWriter ( TablePair *self, const ctx_t *ctx,
+   VCursor *opt_curs, const char *colspec )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    VCursor *curs;
+
+    if ( opt_curs != NULL )
+        rc = VCursorAddRef ( curs = opt_curs );
+    else
+        rc = VTableCreateCursorWrite ( self -> dtbl, & curs, kcmInsert );
+    if ( rc != 0 )
+        ERROR ( rc, "failed to create cursor on column 'dst.%s.%s'", self -> full_spec, colspec );
+    else
+    {
+        uint32_t global_ref_start;
+        const char *subcolspec = "(U64)GLOBAL_REF_START";
+        rc = VCursorAddColumn ( curs, & global_ref_start, subcolspec );
+        if ( rc != 0 )
+            ERROR ( rc, "failed to add column 'dst.%s.%s' to cursor", self -> full_spec, subcolspec );
+        else
+        {
+            uint32_t ref_len;
+            subcolspec = "(INSDC:coord:len)REF_LEN";
+            rc = VCursorAddColumn ( curs, & ref_len, subcolspec );
+            if ( rc != 0 )
+                ERROR ( rc, "failed to add column 'dst.%s.%s' to cursor", self -> full_spec, subcolspec );
+            else
+            {
+                VCursorSuspendTriggers ( curs );
+                rc = VCursorOpen ( curs );
+                if ( rc != 0 )
+                    ERROR ( rc, "failed to open cursor on columns for 'dst.%s.%s'", self -> full_spec, colspec );
+                else
+                {
+                    PoslenColWriter *col;
+                    size_t full_spec_size = self -> full_spec_size + string_size ( colspec ) + sizeof "dst.." - 1;
+
+                    TRY ( col = MemAlloc ( ctx, sizeof * col + full_spec_size, false ) )
+                    {
+                        ColumnWriterInit ( & col -> dad, ctx, & PoslenColWriter_vt, false );
+                        col -> curs = curs;
+                        col -> global_ref_start = global_ref_start;
+                        col -> ref_len = ref_len;
+
+                        col -> full_spec_size = ( uint32_t ) full_spec_size;
+                        rc = string_printf ( col -> full_spec, full_spec_size + 1, NULL,
+                            "dst.%s.%s", self -> full_spec, colspec );
+                        if ( rc == 0 )
+                            return & col -> dad;
+
+                        ABORT ( rc, "miscalculated string size" );
+                    }
+                    CATCH_ALL ()
+                    {
+                        ANNOTATE ( "failed to allocate %zu bytes for PoslenColWriter", sizeof * col + full_spec_size );
+                    }
+                }
+            }
+        }
+
+        VCursorRelease ( curs );
+    }
+
+    return NULL;
+}
diff --git a/tools/sra-sort/poslen-col-pair.h b/tools/sra-sort/poslen-col-pair.h
new file mode 100644
index 0000000..e4f4087
--- /dev/null
+++ b/tools/sra-sort/poslen-col-pair.h
@@ -0,0 +1,63 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_poslen_col_pair_
+#define _h_sra_sort_poslen_col_pair_
+
+#ifndef _h_sra_sort_defs_
+#include "defs.h"
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct VCursor;
+struct TablePair;
+struct ColumnReader;
+struct ColumnWriter;
+
+
+/*--------------------------------------------------------------------------
+ * TablePair
+ */
+
+
+/* MakePoslenColReader
+ *  make temporary column reader
+ */
+struct ColumnReader *TablePairMakePoslenColReader ( struct TablePair *self, const ctx_t *ctx,
+    struct MapFile const *tmp_col, const char *colspec );
+
+
+/* MakePoslenColWriter
+ */
+struct ColumnWriter *TablePairMakePoslenColWriter ( struct TablePair *self,
+    const ctx_t *ctx, struct VCursor *opt_curs, const char *colspec );
+
+
+
+#endif /* _h_sra_sort_poslen_col_pair_ */
diff --git a/tools/sra-sort/ref-alignid-col.c b/tools/sra-sort/ref-alignid-col.c
new file mode 100644
index 0000000..89e4b46
--- /dev/null
+++ b/tools/sra-sort/ref-alignid-col.c
@@ -0,0 +1,702 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+struct AlignIdColReader;
+#define COLREADER_IMPL struct AlignIdColReader
+
+#include "ref-alignid-col.h"
+#include "glob-poslen.h"
+#include "csra-tbl.h"
+#include "csra-pair.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+#include "idx-mapping.h"
+#include "map-file.h"
+#include "sra-sort.h"
+
+#include <vdb/cursor.h>
+#include <kapp/main.h>
+#include <klib/sort.h>
+#include <klib/rc.h>
+
+#include <string.h>
+#include <assert.h>
+
+FILE_ENTRY ( ref-alignid-col );
+
+
+/*--------------------------------------------------------------------------
+ * IdPosLen
+ */
+typedef struct IdPosLen IdPosLen;
+struct IdPosLen
+{
+    int64_t id;
+    uint64_t poslen;
+};
+
+#if USE_OLD_KSORT
+static
+int64_t CC IdPosLenCmpPos ( const void *a, const void *b, void *data )
+{
+    const IdPosLen *ap = a;
+    const IdPosLen *bp = b;
+
+    if ( ap -> poslen < bp -> poslen )
+        return -1;
+    if ( ap -> poslen > bp -> poslen )
+        return 1;
+
+    return ap -> id < bp -> id ? -1 : ap -> id > bp -> id;
+}
+
+static
+int64_t CC cmp_int64_t ( const void *a, const void *b, void *data )
+{
+    const int64_t *ap = a;
+    const int64_t *bp = b;
+
+    return * ap < * bp ? -1 : * ap > * bp;
+}
+#else
+
+static
+void ksort_IdPosLen_pos ( IdPosLen *pbase, size_t total_elems )
+{
+#define SWAP( a, b, off, size )                               \
+    do                                                        \
+    {                                                         \
+        IdPosLen tmp = * ( const IdPosLen* ) ( a );           \
+        * ( IdPosLen* ) ( a ) = * ( const IdPosLen* ) ( b );  \
+        * ( IdPosLen* ) ( b ) = tmp;                          \
+    } while ( 0 )
+
+
+#define CMP( a, b )                                                                                   \
+     ( ( ( ( const IdPosLen* ) ( a ) ) -> poslen == ( ( const IdPosLen* ) ( b ) ) -> poslen ) ?       \
+       ( ( ( const IdPosLen* ) ( a ) ) -> id < ( ( const IdPosLen* ) ( b ) ) -> id ) ? -1 :           \
+       ( ( ( const IdPosLen* ) ( a ) ) -> id > ( ( const IdPosLen* ) ( b ) ) -> id )                  \
+       : ( ( ( const IdPosLen* ) ( a ) ) -> poslen < ( ( const IdPosLen* ) ( b ) ) -> poslen ) ? -1 : \
+       ( ( ( const IdPosLen* ) ( a ) ) -> poslen > ( ( const IdPosLen* ) ( b ) ) -> poslen ) )
+
+    KSORT ( pbase, total_elems, sizeof * pbase, 0, sizeof * pbase );
+
+#undef SWAP
+#undef CMP
+
+}
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * AlignIdColReader
+ */
+typedef struct AlignIdColReader AlignIdColReader;
+struct AlignIdColReader
+{
+    ColumnReader dad;
+
+    /* state for id range:
+       first = slot [ 0 ] of map
+       row_id = needs to match request - we only accept serial scans
+       next_id = next id to fetch from "ids"
+       last_excl = end of "ids" */
+    int64_t first, row_id, next_id, last_excl;
+
+    /* sequence for handing out new ids */
+    int64_t new_id;
+
+    /* reader onto our join index column */
+    ColumnReader *ids;
+
+    /* reader onto alignment table
+       to retrieve GLOBAL_REF_START + REF_LEN */
+    ColumnReader *poslen;
+
+    /* bi-directional index for writing
+       new=>old and old=>new mappings */
+    MapFile *idx;
+
+    /* buffer for sorted data */
+    union
+    {
+        int64_t *ids;
+        IdPosLen *id_poslen;
+        IdxMapping *id_map;
+    } u;
+    size_t max_elems;
+    size_t num_elems;
+    size_t cur_elem;
+
+    /* buffer for id row */
+    int64_t *row;
+    size_t max_row_len;
+
+    /* chunk-size */
+    size_t chunk_size;
+
+    /* whether we have all ids or not */
+    bool entire_table;
+};
+
+static
+void AlignIdColReaderDestroy ( AlignIdColReader *self, const ctx_t *ctx )
+{
+    if ( self -> ids != NULL )
+    {
+        FUNC_ENTRY ( ctx );
+
+        STATUS ( 4, "destroying align-column reader '%s'", ColumnReaderFullSpec ( self -> ids, ctx ) );
+
+        /* tear everything down */
+        MapFileRelease ( self -> idx, ctx );
+        self -> idx = NULL;
+
+        ColumnReaderRelease ( self -> poslen, ctx );
+        self -> poslen = NULL;
+
+        ColumnReaderRelease ( self -> ids, ctx );
+        self -> ids = NULL;
+
+        if ( self -> u . id_poslen != NULL )
+        {
+            MemFree ( ctx, self -> u . id_poslen, sizeof * self -> u . id_poslen * self -> max_elems );
+            self -> u . id_poslen = NULL;
+        }
+        if ( self -> row != NULL )
+        {
+            MemFree ( ctx, self -> row, sizeof self -> row [ 0 ] * self -> max_row_len );
+            self -> row = NULL;
+        }
+    }
+}
+
+static
+void AlignIdColReaderWhack ( AlignIdColReader *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* tear down self */
+    AlignIdColReaderDestroy ( self, ctx );
+
+    /* tear down super-class */
+    ColumnReaderDestroy ( & self -> dad, ctx );
+
+    /* gone */
+    MemFree ( ctx, self, sizeof * self );
+}
+
+static
+const char *AlignIdColReaderFullSpec ( const AlignIdColReader *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    return ColumnReaderFullSpec ( self -> ids, ctx );
+}
+
+static
+uint64_t AlignIdColReaderIdRange ( const AlignIdColReader *self, const ctx_t *ctx, int64_t *opt_first )
+{
+    FUNC_ENTRY ( ctx );
+    return ColumnReaderIdRange ( self -> ids, ctx, opt_first );
+}
+
+static
+void AlignIdColReaderFlushToIdx ( AlignIdColReader *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( self -> idx != NULL )
+    {
+        const Tool *tp = ctx -> caps -> tool;
+
+        /* write new=>old ids  */
+        STATUS ( 3, "%s new=>old id map", tp -> write_new_to_old ? "writing" : "setting" );
+        ON_FAIL ( MapFileSetNewToOld ( self -> idx, ctx, self -> u . id_map, self -> num_elems ) )
+        {
+            ANNOTATE ( "failed to record new to old id mappings for '%s'", ColumnReaderFullSpec ( self -> ids, ctx ) );
+            return;
+        }
+        if ( tp -> sort_before_old2new )
+        {
+            /* sort by old ids */
+            STATUS ( 3, "sorting id-map by old-id" );
+#if USE_OLD_KSORT
+            ksort ( self -> u . id_map, self -> num_elems, sizeof self -> u . id_map [ 0 ], IdxMappingCmpOld, ( void* ) ctx );
+#else
+            IdxMappingSortOld ( self -> u . id_map, ctx, self -> num_elems );
+#endif
+        }
+
+        /* write old=>new ids  */
+        STATUS ( 3, "writing old=>new id map" );
+        ON_FAIL ( MapFileSetOldToNew ( self -> idx, ctx, self -> u . id_map, self -> num_elems ) )
+        {
+            ANNOTATE ( "failed to record old to new id mappings for '%s'", ColumnReaderFullSpec ( self -> ids, ctx ) );
+            return;
+        }
+
+        STATUS ( 3, "done writing id maps" );
+    }
+
+    /* empty buffer */
+    self -> first = self -> next_id;
+}
+
+static
+void AlignIdColReaderPreCopy ( AlignIdColReader *self, const ctx_t *ctx )
+{
+    /* TBD - a good place to allocate memory */
+}
+
+static
+void AlignIdColReaderPostCopy ( AlignIdColReader *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* called after a single copy
+       assumes that entire row-range of table has been copied */
+
+    /* tear down self */
+    AlignIdColReaderDestroy ( self, ctx );
+}
+
+static
+const void *AlignIdColReaderRead ( AlignIdColReader *self, const ctx_t *ctx,
+    int64_t row_id, uint32_t *elem_bits, uint32_t *boff, uint32_t *row_len )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    const void *base;
+    uint32_t num_read32;
+    size_t i, num_read;
+
+    /* handle bad parameters */
+    uint32_t dummy [ 3 ];
+    if ( elem_bits == NULL )
+        elem_bits = & dummy [ 0 ];
+    if ( boff == NULL )
+        boff = & dummy [ 1 ];
+    if ( row_len == NULL )
+        row_len = & dummy [ 2 ];
+
+    /* THERE ARE three stages to this method:
+       1a. detect need to allocate id map
+       1b. detect need to flush to index
+       2.  detect need to refresh id map
+       3.  respond to read request
+     */
+
+    if ( row_id != self -> row_id )
+    {
+        /* error condition */
+        rc = RC ( rcExe, rcCursor, rcReading, rcParam, rcIncorrect );
+        INTERNAL_ERROR ( rc, "AlignIdColReader only supports serial access" );
+        return NULL;
+    }
+
+    /* stage 1 - allocate or flush */
+    if ( self -> u . ids == NULL && ! self -> entire_table )
+    {
+        /* limit ids to actual count */
+        uint64_t num_ids = MapFileCount ( self -> idx, ctx );
+        self -> max_elems = ctx -> caps -> tool -> max_ref_idx_ids;
+        if ( ( uint64_t ) self -> max_elems > num_ids )
+            self -> max_elems = ( size_t ) num_ids;
+
+        /* allocate the buffer */
+        do
+        {
+            CLEAR ();
+
+            TRY ( self -> u . id_poslen = MemAlloc ( ctx, sizeof self -> u . id_poslen [ 0 ] * self -> max_elems, false ) )
+            {
+                STATUS ( 4, "allocated map buffer with %,zu elements", self -> max_elems );
+                break;
+            }
+
+            self -> max_elems >>= 1;
+        }
+        while ( self -> max_elems >= 1024 * 1024 );
+
+        if ( FAILED () )
+        {
+            ANNOTATE ( "failed to allocate id buffer" );
+            return NULL;
+        }
+
+        /* notice if we have the entire table */
+        if ( ( uint64_t ) self -> max_elems == num_ids )
+            self -> entire_table = true;
+
+        /* allocate a row buffer */
+        self -> max_row_len = 8 * 1024;
+        ON_FAIL ( self -> row = MemAlloc ( ctx, sizeof self -> row [ 8 ] * self -> max_row_len, false ) )
+        {
+            ANNOTATE ( "failed to allocate row buffer" );
+            return NULL;
+        }
+
+        assert ( self -> first == self -> next_id );
+        assert ( self -> first == row_id );
+    }
+    else if ( row_id == self -> next_id && self -> first < row_id )
+    {
+        ON_FAIL ( AlignIdColReaderFlushToIdx ( self, ctx ) )
+            return NULL;
+    }
+
+    /* stage 2 - refresh */
+    if ( self -> first == self -> next_id )
+    {
+        /* if there are no more rows, return NULL  */
+        if ( self -> next_id == self -> last_excl )
+        {
+            STATUS ( 3, "done reading '%s'", ColumnReaderFullSpec ( self -> ids, ctx ) );
+            return NULL;
+        }
+
+        self -> cur_elem = 0;
+
+        /* if the entire table will be read into memory,
+           there is no point in reading/sorting the ids */
+        if ( self -> entire_table )
+        {
+            STATUS ( 3, "auto-generating %,zu ids for '%s'", self -> max_elems, ColumnReaderFullSpec ( self -> ids, ctx ) );
+            for ( i = 0; i < self -> max_elems; ++ i )
+            {
+                self -> u . id_poslen [ i ] . id = self -> first + i;
+#if _DEBUGGING
+                self -> u . id_poslen [ i ] . poslen = 0;
+#endif
+            }
+
+            self -> num_elems = self -> max_elems;
+            self -> next_id = self -> last_excl;
+        }
+        else
+        {
+            /* read up to max_elems into id array */
+            STATUS ( 3, "reading ids from '%s'", ColumnReaderFullSpec ( self -> ids, ctx ) );
+            for ( self -> num_elems = 0; self -> next_id < self -> last_excl; self -> num_elems += num_read, ++ self -> next_id )
+            {
+                /* read a row of ids */
+                ON_FAIL ( base = ColumnReaderRead ( self -> ids, ctx, self -> next_id, elem_bits, boff, & num_read32 ) )
+                {
+                    ANNOTATE ( "failed to read id column" );
+                    return NULL;
+                }
+
+                /* we expect empty rows */
+                num_read = num_read32;
+                if ( num_read == 0 )
+                    continue;
+
+                assert ( * elem_bits == sizeof self -> u . ids [ 0 ] * 8 );
+                assert ( * boff == 0 );
+
+                /* detect when buffer is full */
+                if ( self -> num_elems + num_read > self -> max_elems )
+                {
+                    /* if we've read at least one row, then we're okay */
+                    if ( self -> first < self -> next_id )
+                        break;
+
+                    /* error condition - buffer was too small to read a single row */
+                    rc = RC ( rcExe, rcCursor, rcReading, rcBuffer, rcInsufficient );
+                    ERROR ( rc, "allocated buffer was too small ( %zu elems ) to read a single row ( id %ld, row-len %zu )",
+                            self -> max_elems, self -> next_id, num_read );
+                    return NULL;
+                }
+
+                /* bring them in */
+                memcpy ( & self -> u . ids [ self -> num_elems ], base, num_read * sizeof self -> u . ids [ 0 ] );
+            }
+
+            /* sort to produce sparse but ordered list */
+            STATUS ( 3, "sorting %,zu 64-bit ids", self -> num_elems );
+#if USE_OLD_KSORT
+            ksort ( self -> u . ids, self -> num_elems, sizeof self -> u . ids [ 0 ], cmp_int64_t, ( void* ) ctx );
+#else
+            ksort_int64_t ( self -> u . ids, self -> num_elems );
+#endif
+
+            /* transform from ids to id_poslen */
+            STATUS ( 3, "expanding ids to ( id, position, len ) tuples" );
+            for ( i = self -> num_elems; i > 1 ; )
+            {
+                -- i;
+                self -> u . id_poslen [ i ] . id = self -> u . ids [ i ];
+            }
+        }
+
+        /* read num_elems from poslen */
+        STATUS ( 3, "reading ( position, len ) pairs from '%s'", ColumnReaderFullSpec ( self -> poslen, ctx ) );
+        for ( i = 0; i < self -> num_elems; ++ i )
+        {
+            ON_FAIL ( base = ColumnReaderRead ( self -> poslen, ctx, self -> u . id_poslen [ i ] . id, elem_bits, boff, & num_read32 ) )
+            {
+                ANNOTATE ( "failed to read global ref-start from alignment table" );
+                return NULL;
+            }
+
+            num_read = num_read32;
+            assert ( * elem_bits == sizeof self -> u . id_poslen [ 0 ] . poslen * 8 );
+            assert ( * boff == 0 );
+            assert ( num_read == 1 );
+
+            self -> u . id_poslen [ i ] . poslen = * ( uint64_t* ) base;
+        }
+
+        /* sort by poslen */
+        STATUS ( 3, "sorting ( id, position, len ) tuples on position, len DESC" );
+#if USE_OLD_KSORT
+        ksort ( self -> u . id_poslen, self -> num_elems, sizeof self -> u . id_poslen [ 0 ], IdPosLenCmpPos, ( void* ) ctx );
+#else
+        ksort_IdPosLen_pos ( self -> u . id_poslen, self -> num_elems );
+#endif
+
+        /* write poslen to temp column */
+        STATUS ( 3, "writing ( position, len ) to temp column" );
+        ON_FAIL ( MapFileSetPoslen ( self -> idx, ctx, self -> u . id_map, self -> num_elems ) )
+        {
+            ANNOTATE ( "failed to write temporary poslen column for '%s'", ColumnReaderFullSpec ( self -> ids, ctx ) );
+            return NULL;
+        }
+
+        STATUS ( 3, "done writing ( position, len )" );
+    }
+
+    /* stage 3 - build a row */
+    for ( num_read = ( size_t ) ( self -> num_elems - self -> cur_elem ), i = 0; i < num_read; ++ i )
+    {
+        /* whatever the current element is, it must belong to this row */
+        uint64_t pos = decode_pos_len ( self -> u . id_poslen [ self -> cur_elem + i ] . poslen );
+        int64_t cur_row_id = global_to_row_id ( pos, self -> chunk_size );
+        if ( cur_row_id != row_id )
+        {
+            num_read = i;
+            break;
+        }
+    }
+
+    /* "num_read" now has the number of elements in this row */
+    if ( num_read > self -> max_row_len )
+    {
+        STATUS ( 4, "reallocating row buffer for row-length %,zu", num_read );
+
+        /* realloc the row buffer */
+        MemFree ( ctx, self -> row, self -> max_row_len * sizeof self -> row [ 0 ] );
+
+        self -> max_row_len = ( num_read + 4095 ) & ~ ( size_t ) 4095;
+        ON_FAIL ( self -> row = MemAlloc ( ctx, sizeof self -> row [ 0 ] * self -> max_row_len, false ) )
+        {
+            ANNOTATE ( "failed to reallocate row buffer" );
+            return NULL;
+        }
+    }
+
+    /* build the row, assigning new ids */
+    for ( i = 0; i < num_read; ++ i )
+    {
+        self -> row [ i ] = ++ self -> new_id;
+        self -> u . id_map [ self -> cur_elem + i ] . new_id = self -> new_id;
+    }
+
+    /* advance row_id */
+    self -> cur_elem += num_read;
+    if ( ++ self -> row_id == self -> last_excl )
+    {
+        /* if this was the last row, flush index  */
+        ON_FAIL ( AlignIdColReaderFlushToIdx ( self, ctx ) )
+            return NULL;
+
+        if ( ctx -> caps -> tool -> idx_consistency_check && self -> idx != NULL )
+        {
+            ON_FAIL ( MapFileConsistencyCheck ( self -> idx, ctx ) )
+                return NULL;
+        }
+    }
+
+    /* return row */
+    * elem_bits = sizeof self -> row [ 0 ] * 8;
+    * boff = 0;
+    * row_len = num_read;
+    return self -> row;
+}
+
+static ColumnReader_vt AlignIdColReader_vt =
+{
+    AlignIdColReaderWhack,
+    AlignIdColReaderFullSpec,
+    AlignIdColReaderIdRange,
+    AlignIdColReaderPreCopy,
+    AlignIdColReaderPostCopy,
+    AlignIdColReaderRead
+};
+
+
+/*--------------------------------------------------------------------------
+ * RefTblPair
+ */
+static
+size_t RefTblPairGetChunkSize ( TablePair *self, const ctx_t *ctx, const VCursor **cursp )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    rc = VTableCreateCursorRead ( self -> stbl, cursp );
+    if ( rc != 0 )
+        ERROR ( rc, "failed to create cursor on '%s'", self -> full_spec );
+    else
+    {
+        uint32_t idx;
+        const VCursor *curs = * cursp;
+        rc = VCursorAddColumn ( curs, & idx, "MAX_SEQ_LEN" );
+        if ( rc != 0 )
+            rc = VCursorAddColumn ( curs, & idx, "CHUNK_SIZE" );
+        if ( rc != 0 )
+            ERROR ( rc, "VCursorAddColumn - failed to determine chunk size of '%s'", self -> full_spec );
+        else
+        {
+            rc = VCursorOpen ( curs );
+            if ( rc != 0 )
+                ERROR ( rc, "VCursorOpen - failed to determine chunk size of '%s'", self -> full_spec );
+            else
+            {
+                uint32_t row_len, chunk_size;
+                rc = VCursorReadDirect ( curs, 1, idx,
+                    sizeof chunk_size * 8, & chunk_size, 1, & row_len );
+                if ( rc != 0 )
+                    ERROR ( rc, "VCursorReadDirect - failed to determine chunk size of '%s'", self -> full_spec );
+                else if ( row_len != 1 )
+                {
+                    rc = RC ( rcExe, rcCursor, rcReading, rcData, rcInsufficient );
+                    ERROR ( rc, "VCursorReadDirect - failed to determine chunk size of '%s'", self -> full_spec );
+                }
+                else
+                {
+                    STATUS ( 3, "'%s' chunk size determined to be %u", self -> full_spec, chunk_size );
+                    return chunk_size;
+                }
+            }
+        }
+
+        VCursorRelease ( curs );
+        * cursp = NULL;
+    }
+
+    return 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ * ColumnReader
+ *  interface to read column in random order
+ */
+
+
+/* MakeAlignIdReader
+ */
+ColumnReader *TablePairMakeAlignIdReader ( TablePair *self,
+    const ctx_t *ctx, TablePair *align_tbl, MapFile *idx, const char *colspec )
+{
+    FUNC_ENTRY ( ctx );
+
+    size_t chunk_size;
+    const VCursor *curs;
+
+    /* determine chunk size and keep cursor for id reader */
+    TRY ( chunk_size = RefTblPairGetChunkSize ( self, ctx, & curs ) )
+    {
+        ColumnReader *ids;
+
+        /* need to create a traditional reader on self */
+        TRY ( ids = TablePairMakeColumnReader ( self, ctx, curs, colspec, true ) )
+        {
+            ColumnReader *poslen;
+
+            /* need to create a poslen reader on align_tbl */
+            TRY ( poslen = TablePairMakeGlobalPosLenReader ( align_tbl, ctx, ( uint32_t ) chunk_size ) )
+            {
+                int64_t first;
+                uint64_t count;
+
+                /* need to create a mapfile based on range of poslen */
+                TRY ( count = ColumnReaderIdRange ( poslen, ctx, & first ) )
+                {
+                    TRY ( MapFileSetIdRange ( idx, ctx, first, count ) )
+                    {
+                        AlignIdColReader *col;
+                        TRY ( col = MemAlloc ( ctx, sizeof * col, true ) )
+                        {
+                            TRY ( ColumnReaderInit ( & col -> dad, ctx, & AlignIdColReader_vt ) )
+                            {
+                                /* one more point of failure when obtaining the id range */
+                                TRY ( count = ColumnReaderIdRange ( ids, ctx, & first ) )
+                                {
+                                    TRY ( col -> idx = MapFileDuplicate ( idx, ctx ) )
+                                    {
+                                        col -> first = col -> row_id = col -> next_id = first;
+                                        col -> last_excl = first + count;
+                                        col -> ids = ids;
+                                        col -> poslen = poslen;
+                                        col -> chunk_size = chunk_size;
+                                        col -> entire_table = false;
+                                    
+                                        /* the actual working buffer is allocated upon demand
+                                           to avoid occupying space while waiting to execute */
+
+                                        /* douse the cursor here */
+                                        VCursorRelease ( curs );
+
+                                        return & col -> dad;
+                                    }
+                                }
+                            }
+                            
+                            MemFree ( ctx, col, sizeof * col );
+                        }
+                        
+                        MapFileRelease ( idx, ctx );
+                    }
+                }
+                
+                ColumnReaderRelease ( poslen, ctx );
+            }
+            
+            ColumnReaderRelease ( ids, ctx );
+        }
+
+        VCursorRelease ( curs );
+    }
+
+    return NULL;
+}
diff --git a/tools/sra-sort/ref-alignid-col.h b/tools/sra-sort/ref-alignid-col.h
new file mode 100644
index 0000000..9b5ee84
--- /dev/null
+++ b/tools/sra-sort/ref-alignid-col.h
@@ -0,0 +1,53 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_ref_alignid_col_
+#define _h_sra_sort_ref_alignid_col_
+
+#ifndef _h_sra_sort_col_pair_
+#include "col-pair.h"
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct MapFile;
+struct TablePair;
+
+
+/*--------------------------------------------------------------------------
+ * AlignIdColReader
+ */
+
+
+/* MakeAlignIdReader
+ */
+ColumnReader *TablePairMakeAlignIdReader ( struct TablePair *self,
+    const ctx_t *ctx, struct TablePair *align_tbl, struct MapFile *idx, const char *colspec );
+
+
+#endif /* _h_sra_sort_ref_alignid_col_ */
diff --git a/tools/sra-sort/row-set-priv.h b/tools/sra-sort/row-set-priv.h
new file mode 100644
index 0000000..62c50d6
--- /dev/null
+++ b/tools/sra-sort/row-set-priv.h
@@ -0,0 +1,44 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_row_set_priv_
+#define _h_sra_sort_row_set_priv_
+
+#ifndef _h_sra_sort_row_set_
+#include "row-set.h"
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * RowSetIterator
+ *  the basic 4 types
+ */
+RowSetIterator * MapFileMakeMappingRowSetIterator ( struct MapFile const *self, const ctx_t *ctx, bool large );
+RowSetIterator * MapFileMakeSortingRowSetIterator ( struct MapFile const *self, const ctx_t *ctx, bool large );
+RowSetIterator * TablePairMakeMappingRowSetIterator ( struct TablePair *self, const ctx_t *ctx, bool large );
+RowSetIterator * TablePairMakeSimpleRowSetIterator ( struct TablePair *self, const ctx_t *ctx );
+
+#endif /* _h_sra_sort_row_set_priv_ */
diff --git a/tools/sra-sort/row-set.c b/tools/sra-sort/row-set.c
new file mode 100644
index 0000000..59f1851
--- /dev/null
+++ b/tools/sra-sort/row-set.c
@@ -0,0 +1,208 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "row-set-priv.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+
+#include <vdb/cursor.h>
+#include <klib/rc.h>
+
+FILE_ENTRY ( row-set );
+
+
+/*--------------------------------------------------------------------------
+ * RowSet
+ *  interface to iterate row-ids
+ */
+
+
+/* Release
+ *  releases reference
+ */
+void RowSetRelease ( const RowSet *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountDrop ( & self -> refcount, "RowSet" ) )
+        {
+        case krefOkay:
+            break;
+        case krefWhack:
+            ( * self -> vt -> whack ) ( ( void* ) self, ctx );
+            break;
+        case krefZero:
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcCursor, rcDestroying, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to release RowSet" );
+        }
+    }
+}
+
+/* Duplicate
+ */
+RowSet *RowSetDuplicate ( const RowSet *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountAdd ( & self -> refcount, "RowSet" ) )
+        {
+        case krefOkay:
+        case krefWhack:
+        case krefZero:
+            break;
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcCursor, rcAttaching, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to duplicate RowSet" );
+            return NULL;
+        }
+    }
+
+    return ( RowSet* ) self;
+}
+
+
+/* Init
+ */
+void RowSetInit ( RowSet *self, const ctx_t *ctx, const RowSet_vt *vt )
+{
+    self -> vt = vt;
+    KRefcountInit ( & self -> refcount, 1, "RowSet", "init", "" );
+    self -> align = 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ * RowSetIterator
+ *  interface to iterate RowSets
+ */
+
+/* MakeRowSetIterator
+ *  make RowSet iterator based upon parameters
+ *  each RowSet will generate row-ids in src order
+ *
+ *  "sort_idx" [ IN ]
+ *    if NULL, the RowSet objects will auto-generate row-ids
+ *    otherwise, src row-ids will be selected from MapFile
+ *
+ *  "pairs" [ IN ]
+ *    if true, the row-ids will be generated into an IdxMapping pair
+ *    if false but "idx" is not NULL, the src row-ids will be generated
+ *      into a single-id map, and new ordering preserved in parallel
+ *    if false and "idx" is NULL, no additional structure will be generated
+ */
+RowSetIterator *TablePairMakeRowSetIterator ( struct TablePair *self, const ctx_t *ctx,
+    struct MapFile const *sort_idx, bool pairs, bool large )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( sort_idx != NULL )
+    {
+        if ( pairs )
+            return MapFileMakeMappingRowSetIterator ( sort_idx, ctx, large );
+
+        return MapFileMakeSortingRowSetIterator ( sort_idx, ctx, large );
+    }
+
+    if ( pairs )
+        return TablePairMakeMappingRowSetIterator ( self, ctx, large );
+
+    return TablePairMakeSimpleRowSetIterator ( self, ctx );
+}
+
+
+/* Release
+ *  releases reference
+ */
+void RowSetIteratorRelease ( const RowSetIterator *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountDrop ( & self -> refcount, "RowSetIterator" ) )
+        {
+        case krefOkay:
+            break;
+        case krefWhack:
+            ( * self -> vt -> whack ) ( ( void* ) self, ctx );
+            break;
+        case krefZero:
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcCursor, rcDestroying, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to release RowSetIterator" );
+        }
+    }
+}
+
+/* Duplicate
+ */
+RowSetIterator *RowSetIteratorDuplicate ( const RowSetIterator *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountAdd ( & self -> refcount, "RowSetIterator" ) )
+        {
+        case krefOkay:
+        case krefWhack:
+        case krefZero:
+            break;
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcCursor, rcAttaching, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to duplicate RowSetIterator" );
+            return NULL;
+        }
+    }
+
+    return ( RowSetIterator* ) self;
+}
+
+
+/* Init
+ */
+void RowSetIteratorInit ( RowSetIterator *self, const ctx_t *ctx, const RowSetIterator_vt *vt )
+{
+    self -> vt = vt;
+    KRefcountInit ( & self -> refcount, 1, "RowSetIterator", "init", "" );
+    self -> align = 0;
+}
diff --git a/tools/sra-sort/row-set.h b/tools/sra-sort/row-set.h
new file mode 100644
index 0000000..8ffa38a
--- /dev/null
+++ b/tools/sra-sort/row-set.h
@@ -0,0 +1,215 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_row_set_
+#define _h_sra_sort_row_set_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+#ifndef _h_klib_refcount_
+#include <klib/refcount.h>
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct MapFile;
+struct TablePair;
+struct IdxMapping;
+
+
+/*--------------------------------------------------------------------------
+ * RowSet
+ *  interface to iterate row-ids
+ */
+typedef struct RowSet_vt RowSet_vt;
+
+typedef struct RowSet RowSet;
+struct RowSet
+{
+    const RowSet_vt *vt;
+    KRefcount refcount;
+    uint32_t align;
+};
+
+#ifndef ROWSET_IMPL
+#define ROWSET_IMPL RowSet
+#endif
+
+struct RowSet_vt
+{
+    /* called by Release */
+    void ( * whack ) ( ROWSET_IMPL *self, const ctx_t *ctx );
+
+    /* retrieve next set of row-ids */
+    size_t ( * next ) ( ROWSET_IMPL *self, const ctx_t *ctx,
+        int64_t *ids, size_t max_ids );
+
+    /* reset iterator to initial state */
+    void ( * reset ) ( ROWSET_IMPL *self, const ctx_t *ctx,
+        bool for_static );
+};
+
+
+/* Release
+ *  releases reference
+ */
+void RowSetRelease ( const RowSet *self, const ctx_t *ctx );
+
+/* Duplicate
+ */
+RowSet *RowSetDuplicate ( const RowSet *self, const ctx_t *ctx );
+
+
+/* Next
+ *  return next set of row-ids
+ *  returns 0 if no rows are available
+ */
+#define RowSetNext( self, ctx, ids, max_ids ) \
+    POLY_DISPATCH_INT ( next, self, ROWSET_IMPL, ctx, ids, max_ids )
+
+
+/* Reset
+ *  reset iterator to beginning
+ */
+#define RowSetReset( self, ctx, for_static ) \
+    POLY_DISPATCH_VOID ( reset, self, ROWSET_IMPL, ctx, for_static )
+
+
+/* Init
+ */
+void RowSetInit ( RowSet *self, const ctx_t *ctx, const RowSet_vt *vt );
+
+/* Destroy
+ */
+#define RowSetDestroy( self, ctx ) \
+    ( ( void ) 0 )
+
+
+/*--------------------------------------------------------------------------
+ * RowSetIterator
+ *  interface to iterate RowSets
+ */
+typedef struct RowSetIterator_vt RowSetIterator_vt;
+
+typedef struct RowSetIterator RowSetIterator;
+struct RowSetIterator
+{
+    const RowSetIterator_vt *vt;
+    KRefcount refcount;
+    uint32_t align;
+};
+
+#ifndef ROWSET_ITER_IMPL
+#define ROWSET_ITER_IMPL RowSetIterator
+#endif
+
+struct RowSetIterator_vt
+{
+    /* called by Release */
+    void ( * whack ) ( ROWSET_ITER_IMPL *self, const ctx_t *ctx );
+
+    /* retrieve row-id mapping pair */
+    struct IdxMapping* ( * get_idx_mapping ) ( ROWSET_ITER_IMPL *self, const ctx_t *ctx,
+        size_t *num_items );
+
+    /* retrieve src row-id array */
+    int64_t* ( * get_src_ids ) ( ROWSET_ITER_IMPL *self, const ctx_t *ctx,
+        uint32_t **opt_ord, size_t *num_items );
+
+    /* retrieve next row-set */
+    RowSet* ( * next ) ( ROWSET_ITER_IMPL *self, const ctx_t *ctx );
+};
+
+
+/* MakeRowSetIterator
+ *  make RowSet iterator based upon parameters
+ *  each RowSet will generate row-ids in src order
+ *
+ *  "sort_idx" [ IN ]
+ *    if NULL, the RowSet objects will auto-generate row-ids
+ *    otherwise, src row-ids will be selected from MapFile
+ *
+ *  "pairs" [ IN ]
+ *    if true, the row-ids will be generated into an IdxMapping pair
+ *    if false but "idx" is not NULL, the src row-ids will be generated
+ *      into a single-id map, and new ordering preserved in parallel
+ *    if false and "idx" is NULL, no additional structure will be generated
+ *
+ *  "large" [ IN ]
+ *    if true, use a reduced id-range for the row-set
+ */
+RowSetIterator *TablePairMakeRowSetIterator ( struct TablePair *self, const ctx_t *ctx,
+    struct MapFile const *sort_idx, bool pairs, bool large );
+
+
+/* Release
+ *  releases reference
+ */
+void RowSetIteratorRelease ( const RowSetIterator *self, const ctx_t *ctx );
+
+/* Duplicate
+ */
+RowSetIterator *RowSetIteratorDuplicate ( const RowSetIterator *self, const ctx_t *ctx );
+
+
+/* GetIdxMapping
+ *  a little bit of plumbing to get the IdxMapping map
+ */
+#define RowSetIteratorGetIdxMapping( self, ctx, num_items ) \
+    POLY_DISPATCH_PTR ( get_idx_mapping, self, ROWSET_ITER_IMPL, ctx, num_items )
+
+
+/* GetSourceIds
+ *  a little bit of plumbing to get the individual source ids
+ *  and optional new id ordering
+ */
+#define RowSetIteratorGetSourceIds( self, ctx, opt_ord, num_items ) \
+    POLY_DISPATCH_PTR ( get_src_ids, self, ROWSET_ITER_IMPL, ctx, opt_ord, num_items )
+
+
+/* Next
+ *  return next RowSet
+ *  returns NULL if no rows are available
+ */
+#define RowSetIteratorNext( self, ctx ) \
+    POLY_DISPATCH_PTR ( next, self, ROWSET_ITER_IMPL, ctx )
+
+
+/* Init
+ */
+void RowSetIteratorInit ( RowSetIterator *self, const ctx_t *ctx, const RowSetIterator_vt *vt );
+
+/* Destroy
+ */
+#define RowSetIteratorDestroy( self, ctx ) \
+    ( ( void ) 0 )
+
+
+#endif /* _h_sra_sort_row_set_ */
diff --git a/tools/sra-sort/run.c b/tools/sra-sort/run.c
new file mode 100644
index 0000000..e64d31d
--- /dev/null
+++ b/tools/sra-sort/run.c
@@ -0,0 +1,388 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "sra-sort.h"
+#include "db-pair.h"
+#include "ctx.h"
+#include "caps.h"
+#include "mem.h"
+#include "except.h"
+#include "status.h"
+
+#include <sra/sraschema.h>
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <kfg/config.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+
+#include <string.h>
+
+
+FILE_ENTRY ( run );
+
+static
+void typename_to_config_path ( const char *in, char *out )
+{
+    bool end;
+    uint32_t i;
+
+    for ( end = false, i = 0; ! end; ++ i )
+    {
+        switch ( out [ i ] = in [ i ] )
+        {
+        case ':':
+            out [ i ] = '/';
+            break;
+        case ' ':
+        case '#':
+            out [ i ] = 0;
+        case 0:
+            end = true;
+            return;
+        }
+    }
+}
+
+static
+bool map_typename_builtin ( const ctx_t *ctx, const char *sub_node, const char *in, char *out, char *schema_src, size_t size )
+{
+    FUNC_ENTRY ( ctx );
+
+    size_t copied;
+
+#define ALIGN_EVIDENCE_MAP "NCBI:align:db:alignment_evidence_sorted"
+#define ALIGN_UNSORTED_MAP "NCBI:align:db:alignment_sorted"
+#define ALIGN_SRC          "align/align.vschema"
+
+    if ( strcmp ( out, "NCBI/align/db/alignment_evidence" ) == 0 )
+        copied = string_copy ( out, size, ALIGN_EVIDENCE_MAP, sizeof ALIGN_EVIDENCE_MAP - 1 );
+    else if ( strcmp ( out, "NCBI/align/db/alignment_unsorted" ) == 0 )
+        copied = string_copy ( out, size, ALIGN_UNSORTED_MAP, sizeof ALIGN_UNSORTED_MAP - 1 );
+    else
+    {
+        strcpy ( out, in );
+        schema_src [ 0 ] = 0;
+        return false;
+    }
+
+    if ( copied != size )
+    {
+        out [ copied ] = 0;
+        copied = string_copy ( schema_src, size, ALIGN_SRC, sizeof ALIGN_SRC - 1 );
+    }
+
+    if ( copied == size )
+    {
+        rc_t rc = RC ( rcExe, rcType, rcCopying, rcBuffer, rcInsufficient );
+        INTERNAL_ERROR ( rc, "failed to copy a built-in constant" );
+        strcpy ( out, in );
+        schema_src [ 0 ] = 0;
+        return false;
+    }
+
+#undef ALIGN_EVIDENCE_MAP
+#undef ALIGN_UNSORTED_MAP
+#undef ALIGN_SRC
+
+    schema_src [ copied ] = 0;
+    return true;
+}
+
+static
+bool map_typename ( const ctx_t *ctx, const char *sub_node, const char *in, char *out, char *schema_src, size_t size )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    const KConfigNode *n;
+    size_t num_read, remaining;
+
+    typename_to_config_path ( in, out );
+
+    rc = KConfigOpenNodeRead ( ctx -> caps -> cfg, & n, "sra-sort/%s/%s", sub_node, out );
+    if ( rc != 0 )
+        return map_typename_builtin ( ctx, sub_node, in, out, schema_src, size );
+
+    rc = KConfigNodeRead ( n, 0, out, size - 1, & num_read, & remaining );
+    if ( rc != 0 )
+        ERROR ( rc, "KConfigNodeRead failed" );
+    else if ( remaining != 0 )
+    {
+        rc = RC ( rcExe, rcNode, rcReading, rcBuffer, rcInsufficient );
+        ERROR ( rc, "type map of '%s' is too long", in );
+    }
+    else
+    {
+        out [ num_read ] = 0;
+        typename_to_config_path ( out, schema_src );
+
+        KConfigNodeRelease ( n );
+        rc = KConfigOpenNodeRead ( ctx -> caps -> cfg, & n, "sra-sort/schema-src/%s", schema_src );
+        if ( rc != 0 )
+            ERROR ( rc, "KConfigOpenNodeRead - failed to find entry 'sra-sort/schema-src/%s'", schema_src );
+        else
+        {
+            rc = KConfigNodeRead ( n, 0, schema_src, size - 1, & num_read, & remaining );
+            if ( rc != 0 )
+                ERROR ( rc, "KConfigNodeRead failed" );
+            else if ( remaining != 0 )
+            {
+                rc = RC ( rcExe, rcNode, rcReading, rcBuffer, rcInsufficient );
+                ERROR ( rc, "type map of '%s' is too long", in );
+            }
+            else
+            {
+                schema_src [ num_read ] = 0;
+            }
+        }
+    }
+
+    KConfigNodeRelease ( n );
+    return true;
+}
+
+static
+VSchema *map_schema_types ( TypeParams *type, const ctx_t *ctx, const VSchema *src_schema )
+{
+    FUNC_ENTRY ( ctx );
+
+    bool mapped;
+    char schema_src [ 256 ];
+    assert ( sizeof schema_src == sizeof type -> dst_type );
+
+    TRY ( mapped = map_typename ( ctx, "out-map", type -> src_type, type -> dst_type, schema_src, sizeof schema_src ) )
+    {
+        rc_t rc;
+        VSchema *dst_schema;
+
+        if ( ! mapped )
+        {
+            type -> view_type [ 0 ] = 0;
+            rc = VSchemaAddRef ( src_schema );
+            if ( rc != 0 )
+                ERROR ( rc, "VSchemaAddRef failed" );
+            return ( VSchema* ) src_schema;
+        }
+
+        rc = VDBManagerMakeSchema ( ctx -> caps -> vdb, & dst_schema );
+        if ( rc != 0 )
+            ERROR ( rc, "VDBManagerMakeSchema failed" );
+        else
+        {
+            rc = VSchemaParseFile ( dst_schema, "%s", schema_src );
+            if ( rc != 0 )
+                ERROR ( rc, "VSchemaParseFile failed adding file '%s' for destination", src_schema );
+            else
+            {
+                TRY ( mapped = map_typename ( ctx, "view-map", type -> src_type, type -> view_type, schema_src, sizeof schema_src ) )
+                {
+                    if ( ! mapped )
+                    {
+                        type -> view_type [ 0 ] = 0;
+                        return dst_schema;
+                    }
+
+                    rc = VSchemaParseFile ( dst_schema, "%s", schema_src );
+                    if ( rc == 0 )
+                        return dst_schema;
+
+                    ERROR ( rc, "VSchemaParseFile failed adding file '%s' for view", src_schema );
+                }
+            }
+
+            VSchemaRelease ( dst_schema );
+        }
+    }
+
+    return NULL;
+}
+
+/* open_db
+ *  called from run
+ *  determines the type of schema
+ *  opens output object
+ *  dispatches to the appropriate handler
+ */
+static
+void open_db ( const ctx_t *ctx, const VDatabase **srcp )
+{
+    FUNC_ENTRY ( ctx );
+
+    const VDatabase *src = *srcp;
+
+    const VSchema *src_schema;
+    rc_t rc = VDatabaseOpenSchema ( src, & src_schema );
+    if ( rc != 0 )
+        ERROR ( rc, "VDatabaseOpenSchema failed" );
+    else
+    {
+        TypeParams type;
+        rc = VDatabaseTypespec ( src, type . src_type, sizeof type . src_type );
+        if ( rc != 0 )
+            ERROR ( rc, "failed to obtain database typespec" );
+        else
+        {
+            VSchema *dst_schema;
+
+            /* map input type to output type */
+            TRY ( dst_schema = map_schema_types ( & type, ctx, src_schema ) )
+            {
+                const Tool *tp = ctx -> caps -> tool;
+
+                /* if view was remapped, reopen the database */
+                if ( type . view_type [ 0 ] != 0 )
+                {
+                    VSchemaRelease ( src_schema );
+                    rc = VSchemaAddRef ( dst_schema );
+                    if ( rc != 0 )
+                    {
+                        ERROR ( rc, "VSchemaAddRef failed" );
+                        src_schema = NULL;
+                    }
+                    else
+                    {
+                        src_schema = dst_schema;
+                        VDatabaseRelease ( src );
+                        rc = VDBManagerOpenDBRead ( ctx -> caps -> vdb, srcp, src_schema, "%s", tp -> src_path );
+                        if ( rc != 0 )
+                            ERROR ( rc, "VDBManagerOpenDBRead failed reopening db '%s'", tp -> src_path );
+                        src = *srcp;
+                    }
+                }
+
+                if ( ! FAILED () )
+                {
+                    VDatabase *dst;
+                    rc = VDBManagerCreateDB ( ctx -> caps -> vdb, & dst, dst_schema,
+                                              type . dst_type, tp -> db . cmode, "%s", tp -> dst_path );
+                    if ( rc != 0 )
+                        ERROR ( rc, "VDBManagerCreateDB failed to create '%s' with type '%s'", tp -> dst_path, type . dst_type );
+                    else
+                    {
+                        rc = VDatabaseColumnCreateParams ( dst, tp -> col . cmode, tp -> col . checksum, tp -> col . pgsize );
+                        if ( rc != 0 )
+                            ERROR ( rc, "VDatabaseColumnCreateParams: failed to set column create params on db '%s'", tp -> dst_path );
+                        else
+                        {
+                            DbPair *pb;
+
+                            /* TBD - this has to be fixed to use proper stuff */
+                            const char *name = strrchr ( tp -> src_path, '/' );
+                            if ( name ++ == NULL )
+                                name = tp -> src_path;
+
+                            TRY ( pb = DbPairMake ( ctx, src, dst, name ) )
+                            {
+                                DbPairRun ( pb, ctx );
+                                DbPairRelease ( pb, ctx );
+                            }
+                        }
+
+                        rc = VDatabaseRelease ( dst );
+                        if ( rc != 0 )
+                            ERROR ( rc, "VDatabaseRelease failed on '%s'", tp -> dst_path );
+                    }
+                }
+
+                VSchemaRelease ( dst_schema );
+            }
+        }
+
+        VSchemaRelease ( src_schema );
+    }
+}
+
+
+/* open_tbl
+ *  called from run
+ *  determines the type of schema
+ *  opens output object
+ *  dispatches to the appropriate handler
+ */
+static
+void open_tbl ( const ctx_t *ctx, const VTable **tblp )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc = RC ( rcExe, rcFunction, rcExecuting, rcFunction, rcUnsupported );
+    ERROR ( rc, "unimplemented function" );
+}
+
+/* run
+ *  called from KMain
+ *  determines the type of object being copied/sorted
+ *  opens input object
+ *  dispatches to the appropriate handler
+ */
+void run ( const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    VDBManager *mgr = ctx -> caps -> vdb;
+    const Tool *tp = ctx -> caps -> tool;
+
+    const VDatabase *db;
+    rc_t rc = VDBManagerOpenDBRead ( mgr, & db, NULL, "%s", tp -> src_path );
+    if ( rc == 0 )
+    {
+        open_db ( ctx, & db );
+        VDatabaseRelease ( db );
+    }
+    else
+    {
+        const VTable *tbl;
+        rc_t rc2 = VDBManagerOpenTableRead ( mgr, & tbl, NULL, "%s", tp -> src_path );
+        if ( rc2 == 0 )
+        {
+            rc = 0;
+            open_tbl ( ctx, & tbl );
+            VTableRelease ( tbl );
+        }
+        else
+        {
+            VSchema *sra_dflt;
+            rc2 = VDBManagerMakeSRASchema ( mgr, & sra_dflt );
+            if ( rc2 == 0 )
+            {
+                rc2 = VDBManagerOpenTableRead ( mgr, & tbl, sra_dflt, "%s", tp -> src_path );
+                if ( rc2 == 0 )
+                {
+                    rc = 0;
+                    open_tbl ( ctx, & tbl );
+                    VTableRelease ( tbl );
+                }
+                
+                VSchemaRelease ( sra_dflt );
+            }
+        }
+    }
+
+    if ( rc != 0 )
+        ERROR ( rc, "failed to open object '%s'", tp -> src_path );
+}
diff --git a/tools/sra-sort/simple-row-set.c b/tools/sra-sort/simple-row-set.c
new file mode 100644
index 0000000..e4e5833
--- /dev/null
+++ b/tools/sra-sort/simple-row-set.c
@@ -0,0 +1,212 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct SimpleRowSet SimpleRowSet;
+#define ROWSET_IMPL SimpleRowSet
+
+typedef struct SimpleRowSetIterator SimpleRowSetIterator;
+#define ROWSET_ITER_IMPL SimpleRowSetIterator
+
+#include "row-set-priv.h"
+#include "tbl-pair.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+
+#include <klib/rc.h>
+
+FILE_ENTRY ( simple-row-set );
+
+
+/*--------------------------------------------------------------------------
+ * SimpleRowSet
+ *  implementation of RowSet based upon auto-generated serial ids
+ */
+struct SimpleRowSet
+{
+    RowSet dad;
+    int64_t first, row_id, last_excl;
+};
+
+static
+void SimpleRowSetWhack ( SimpleRowSet *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    MemFree ( ctx, self, sizeof *self );
+}
+
+static
+size_t SimpleRowSetNext ( SimpleRowSet *self, const ctx_t *ctx,
+    int64_t *row_ids, size_t max_ids )
+{
+    if ( row_ids != NULL )
+    {
+        size_t i;
+
+        uint64_t max_avail = self -> last_excl - self -> row_id;
+        if ( max_avail < ( uint64_t ) max_ids )
+            max_ids = ( size_t ) max_avail;
+
+        for ( i = 0; i < max_ids; ++ i )
+            row_ids [ i ] = self -> row_id + i;
+
+        self -> row_id += max_ids;
+        return max_ids;
+    }
+    return 0;
+}
+
+static
+void SimpleRowSetReset ( SimpleRowSet *self, const ctx_t *ctx, bool for_static )
+{
+    self -> row_id = self -> first;
+}
+
+static RowSet_vt SimpleRowSet_vt =
+{
+    SimpleRowSetWhack,
+    SimpleRowSetNext,
+    SimpleRowSetReset
+};
+
+
+/* Make
+ */
+static
+RowSet *SimpleRowSetMake ( const ctx_t *ctx, int64_t first, int64_t last_excl )
+{
+    FUNC_ENTRY ( ctx );
+
+    SimpleRowSet *rs;
+    TRY ( rs = MemAlloc ( ctx, sizeof * rs, false ) )
+    {
+        RowSetInit ( & rs -> dad, ctx, & SimpleRowSet_vt );
+        rs -> first = rs -> row_id = first;
+        rs -> last_excl = last_excl;
+        return & rs -> dad;
+    }
+
+    return NULL;
+}
+
+
+/*--------------------------------------------------------------------------
+ * SimpleRowSetIterator
+ *  interface to iterate RowSets
+ */
+struct SimpleRowSetIterator
+{
+    RowSetIterator dad;
+    RowSet *rs;
+};
+
+static
+void SimpleRowSetIteratorWhack ( SimpleRowSetIterator *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    RowSetRelease ( self -> rs, ctx );
+    MemFree ( ctx, self, sizeof * self );
+}
+
+static
+struct IdxMapping *SimpleRowSetIteratorGetIdxMapping ( SimpleRowSetIterator *self, const ctx_t *ctx, size_t *num_items )
+{
+    FUNC_ENTRY ( ctx );
+
+    ANNOTATE ( "CALLING GetIdxMapping ON SIMPLE ROWSET ITERATOR" );
+
+    if ( num_items != NULL )
+        * num_items = 0;
+
+    return NULL;
+}
+
+static
+int64_t *SimpleRowSetIteratorGetSourceIds ( SimpleRowSetIterator *self, const ctx_t *ctx, uint32_t **opt_ord, size_t *num_items )
+{
+    FUNC_ENTRY ( ctx );
+
+    ANNOTATE ( "CALLING GetSourceIds ON SIMPLE ROWSET ITERATOR" );
+
+    if ( opt_ord != NULL )
+        * opt_ord = NULL;
+
+    if ( num_items != NULL )
+        * num_items = 0;
+
+    return NULL;
+}
+
+static
+RowSet *SimpleRowSetIteratorNext ( SimpleRowSetIterator *self, const ctx_t *ctx )
+{
+    RowSet *rs = self -> rs;
+    self -> rs = NULL;
+    return rs;    
+}
+
+static RowSetIterator_vt SimpleRowSetIterator_vt =
+{
+    SimpleRowSetIteratorWhack,
+    SimpleRowSetIteratorGetIdxMapping,
+    SimpleRowSetIteratorGetSourceIds,
+    SimpleRowSetIteratorNext
+};
+
+
+/* MakeSimpleRowSetIterator
+ *  make simple row-id iterator
+ *  runs from first to last id in cursor
+ */
+RowSetIterator *TablePairMakeSimpleRowSetIterator ( TablePair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( self -> first_id > self -> last_excl )
+    {
+        rc_t rc = RC ( rcExe, rcCursor, rcConstructing, rcRange, rcInvalid );
+        INTERNAL_ERROR ( rc, "union of all column ranges improperly set" );
+    }
+    else
+    {
+        SimpleRowSetIterator *it;
+
+        TRY ( it = MemAlloc ( ctx, sizeof * it, false ) )
+        {
+            RowSetIteratorInit ( & it -> dad, ctx, & SimpleRowSetIterator_vt );
+            TRY ( it -> rs = SimpleRowSetMake ( ctx, self -> first_id, self -> last_excl ) )
+            {
+                return & it -> dad;
+            }
+
+            MemFree ( ctx, it, sizeof * it );
+        }
+    }
+
+    return NULL;
+}
diff --git a/tools/sra-sort/sort-defs.h b/tools/sra-sort/sort-defs.h
new file mode 100644
index 0000000..329143d
--- /dev/null
+++ b/tools/sra-sort/sort-defs.h
@@ -0,0 +1,109 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_defs_
+#define _h_sra_sort_defs_
+
+#ifndef _h_kfc_callconv_
+#include <kfc/callconv.h>
+#endif
+
+#include <stdint.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <assert.h>
+
+/* prevent inclusion of <kfc/defs.h> */
+#define _h_kfc_defs_ 1
+
+
+/*--------------------------------------------------------------------------
+ * NAME_VERS
+ *  synthesize versioned type and message names
+ */
+#define NAME_VERS( name, maj_vers ) \
+    MAKE_NAME_VERS1 ( name, maj_vers )
+#define MAKE_NAME_VERS1( name, maj_vers ) \
+    MAKE_NAME_VERS2 ( name, maj_vers )
+#define MAKE_NAME_VERS2( name, maj_vers ) \
+    name ## _v ## maj_vers
+
+typedef uint32_t rc_t, ver_t;
+
+#ifndef _h_klib_defs_
+#include <klib/defs.h>
+#endif
+
+#include <assert.h>
+
+#if _DEBUGGING &&! defined SRA_SORT_CHECK_NULL_SELF
+#define SRA_SORT_CHECK_NULL_SELF 1
+#endif
+
+#define USE_OLD_KSORT 0
+
+
+/*--------------------------------------------------------------------------
+ * vdb-3 items missing from klib/defs.h
+ */
+typedef uint32_t caps_t;
+typedef struct ctx_t ctx_t;
+#define STRINGIZE( str ) # str
+#define STRINGIZE_DEFINE( def ) STRINGIZE ( def )
+
+
+/* POLY_DISPATCH
+ *  dispatch a polymorphic message
+ */
+#if  SRA_SORT_CHECK_NULL_SELF
+
+void null_self_error ( const ctx_t *ctx, uint32_t lineno, const char *msg );
+
+#define POLY_DISPATCH_VOID( msg, self, cast_expr, ctx, ... ) \
+    ( ( ( self ) == NULL ) ? null_self_error ( ctx, __LINE__, # msg ) : \
+      ( * ( self ) -> vt -> msg ) ( ( cast_expr* ) ( self ), ctx, ## __VA_ARGS__ ) )
+
+#define POLY_DISPATCH_INT( msg, self, cast_expr, ctx, ... ) \
+    ( ( ( self ) == NULL ) ? ( null_self_error ( ctx, __LINE__, # msg ), 0 ) : \
+      ( * ( self ) -> vt -> msg ) ( ( cast_expr* ) ( self ), ctx, ## __VA_ARGS__ ) )
+
+#define POLY_DISPATCH_PTR( msg, self, cast_expr, ctx, ... ) \
+    ( ( ( self ) == NULL ) ? ( null_self_error ( ctx, __LINE__, # msg ), NULL ) : \
+      ( * ( self ) -> vt -> msg ) ( ( cast_expr* ) ( self ), ctx, ## __VA_ARGS__ ) )
+
+#else
+
+#define POLY_DISPATCH_VOID( msg, self, cast_expr, ctx, ... ) \
+    ( * ( self ) -> vt -> msg ) ( ( cast_expr* ) ( self ), ctx, ## __VA_ARGS__ )
+#define POLY_DISPATCH_INT( msg, self, cast_expr, ctx, ... ) \
+    ( * ( self ) -> vt -> msg ) ( ( cast_expr* ) ( self ), ctx, ## __VA_ARGS__ )
+#define POLY_DISPATCH_PTR( msg, self, cast_expr, ctx, ... ) \
+    ( * ( self ) -> vt -> msg ) ( ( cast_expr* ) ( self ), ctx, ## __VA_ARGS__ )
+
+#endif
+
+#endif /* _h_sra_sort_defs_ */
diff --git a/tools/sra-sort/sorting-row-set.c b/tools/sra-sort/sorting-row-set.c
new file mode 100644
index 0000000..e94336c
--- /dev/null
+++ b/tools/sra-sort/sorting-row-set.c
@@ -0,0 +1,405 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct SortingRowSet SortingRowSet;
+#define ROWSET_IMPL SortingRowSet
+
+typedef struct SortingRowSetIterator SortingRowSetIterator;
+#define ROWSET_ITER_IMPL SortingRowSetIterator
+
+#include "row-set-priv.h"
+#include "tbl-pair.h"
+#include "map-file.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+#include "sra-sort.h"
+
+#include <klib/rc.h>
+
+#include <string.h>
+
+FILE_ENTRY ( sorting-row-set );
+
+
+/*--------------------------------------------------------------------------
+ * SortingRowSetIterator
+ *  interface to iterate RowSets
+ */
+struct SortingRowSetIterator
+{
+    RowSetIterator dad;
+
+    /* base row-id */
+    int64_t row_id;
+
+    /* last row-id + 1 */
+    int64_t last_excl;
+
+    /* takes its input from new=>old index */
+    const MapFile *idx;
+
+    /* working data within map */
+    int64_t *src_ids;
+    uint32_t *new_ord;
+    size_t max_elems;
+    size_t num_elems;
+
+    /* if true, use setting for large-columns */
+    bool large;
+
+    /* if true, no need to regenerate new_ord */
+    bool new_ord_valid;
+};
+
+/*--------------------------------------------------------------------------
+ * SortingRowSet
+ *  implementation of RowSet based upon auto-generated id pairs
+ */
+struct SortingRowSet
+{
+    RowSet dad;
+
+    /* keep-alive reference */
+    SortingRowSetIterator *iter;
+
+    /* working data within map */
+    int64_t *src_ids;
+    size_t num_elems;
+    size_t cur_elem;
+};
+
+static
+void SortingRowSetWhack ( SortingRowSet *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    RowSetIteratorRelease ( & self -> iter -> dad, ctx );
+    MemFree ( ctx, self, sizeof *self );
+}
+
+static
+size_t SortingRowSetNextStat ( SortingRowSet *self, const ctx_t *ctx,
+    int64_t *ids, size_t max_ids )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* the starting row-id is taken from row-set-iterator
+       and offset by our current element counter */
+    int64_t row_id = self -> iter -> row_id + self -> cur_elem;
+
+    /* limit id generation to request */
+    size_t i, to_set = self -> num_elems - self -> cur_elem;
+    if ( to_set > max_ids )
+        to_set = max_ids;
+
+    /* fill request with serial numbers
+       could just as easily be the same number
+       the important thing is to limit the count
+       and produce the correct range */
+    for ( i = 0; i < to_set; ++ i )
+        ids [ i ] = row_id + i;
+
+    /* advance counter */
+    self -> cur_elem += to_set;
+    return to_set;
+}
+
+static
+size_t SortingRowSetNextPhys ( SortingRowSet *self, const ctx_t *ctx,
+    int64_t *ids, size_t max_ids )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* limit copy to request */
+    size_t to_copy = self -> num_elems - self -> cur_elem;
+    if ( to_copy > max_ids )
+        to_copy = max_ids;
+
+    /* copy out old-ids */
+    memcpy ( ids, & self -> src_ids [ self -> cur_elem ], to_copy * sizeof ids [ 0 ] );
+
+    /* advance counter */
+    self -> cur_elem += to_copy;
+    return to_copy;
+}
+
+static
+void SortingRowSetReset ( SortingRowSet *self, const ctx_t *ctx, bool for_static );
+
+static RowSet_vt SortingRowSetPhys_vt =
+{
+    SortingRowSetWhack,
+    SortingRowSetNextPhys,
+    SortingRowSetReset
+};
+
+static RowSet_vt SortingRowSetStat_vt =
+{
+    SortingRowSetWhack,
+    SortingRowSetNextStat,
+    SortingRowSetReset
+};
+
+static
+void SortingRowSetReset ( SortingRowSet *self, const ctx_t *ctx, bool for_static )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( for_static )
+    {
+        /* go static */
+        self -> dad . vt = & SortingRowSetStat_vt;
+    }
+    else
+    {
+        SortingRowSetIterator *iter = self -> iter;
+
+        /* go physical */
+        self -> dad . vt = & SortingRowSetPhys_vt;
+
+        if ( iter -> new_ord_valid )
+        {
+            /* read new-ids from file, selecting old-ids within range */
+            STATUS ( 3, "selecting first %,zu ids from old=>new where new_id >= %,ld",
+                     iter -> max_elems, iter -> row_id );
+            iter -> num_elems = MapFileSelectOldToNewSingle ( iter -> idx, ctx,
+                iter -> row_id, iter -> src_ids, NULL, iter -> max_elems );
+        }
+        else
+        {
+            /* read new-ids from file, init new-ord, selecting old-ids within range */
+            STATUS ( 3, "selecting first %,zu ids, new_ord from old=>new where new_id >= %,ld",
+                     iter -> max_elems, iter -> row_id );
+            TRY ( iter -> num_elems = MapFileSelectOldToNewSingle ( iter -> idx, ctx,
+                      iter -> row_id, iter -> src_ids, iter -> new_ord, iter -> max_elems ) )
+            {
+                iter -> new_ord_valid = true;
+            }
+        }
+
+        if ( FAILED () )
+            return;
+
+        self -> num_elems = iter -> num_elems;
+        STATUS ( 3, "selected %,zu ids", self -> num_elems );
+    }
+
+    /* ready */
+    self -> cur_elem = 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ * SortingRowSetIterator
+ *  interface to iterate RowSets
+ */
+
+static
+void SortingRowSetIteratorWhack ( SortingRowSetIterator *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( self -> src_ids != NULL )
+        MemFree ( ctx, self -> src_ids, sizeof self -> src_ids [ 0 ] * self -> max_elems );
+    if ( self -> new_ord != NULL )
+        MemFree ( ctx, self -> new_ord, sizeof self -> new_ord [ 0 ] * self -> max_elems );
+
+    MapFileRelease ( self -> idx, ctx );
+
+    RowSetIteratorDestroy ( & self -> dad, ctx );
+    MemFree ( ctx, self, sizeof * self );
+}
+
+static
+RowSet *SortingRowSetIteratorMakeTheRowSet ( SortingRowSetIterator *self, const ctx_t *ctx, const RowSet_vt *vt )
+{
+    FUNC_ENTRY ( ctx );
+
+    SortingRowSet *rs;
+    TRY ( rs = MemAlloc ( ctx, sizeof * rs, false ) )
+    {
+        TRY ( RowSetInit ( & rs -> dad, ctx, vt ) )
+        {
+            /* initialize the row-set with map and self reference */
+            rs -> src_ids = self -> src_ids;
+            rs -> iter = ( SortingRowSetIterator* ) RowSetIteratorDuplicate ( & self -> dad, ctx );
+            rs -> num_elems = self -> num_elems;
+            rs -> cur_elem = 0;
+            return & rs -> dad;
+        }
+
+        MemFree ( ctx, rs, sizeof * rs );
+    }
+
+    return NULL;
+ }
+
+static
+struct IdxMapping *SortingRowSetIteratorGetIdxMapping ( SortingRowSetIterator *self, const ctx_t *ctx, size_t *num_items )
+{
+    FUNC_ENTRY ( ctx );
+
+    ANNOTATE ( "CALLING GetIdxMapping ON SORTING ROWSET ITERATOR" );
+
+    if ( num_items != NULL )
+        * num_items = 0;
+
+    return NULL;
+}
+
+static
+int64_t *SortingRowSetIteratorGetSourceIds ( SortingRowSetIterator *self, const ctx_t *ctx, uint32_t **opt_ord, size_t *num_items )
+{
+    FUNC_ENTRY ( ctx );
+
+    if ( opt_ord != NULL )
+        * opt_ord = self -> new_ord;
+
+    if ( self -> src_ids == NULL )
+    {
+        rc_t rc = RC ( rcExe, rcCursor, rcAccessing, rcSelf, rcInconsistent );
+        ERROR ( rc, "source id array is NULL" );
+        if ( num_items != NULL )
+            * num_items = 0;
+        return NULL;
+    }
+
+    if ( num_items != NULL )
+        * num_items = self -> num_elems;
+    return self -> src_ids;
+}
+
+static
+void SortingRowSetIteratorAllocMap ( SortingRowSetIterator *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* determine the maximum number of elements */
+    const Tool *tp = ctx -> caps -> tool;
+    uint64_t count = self -> last_excl - self -> row_id;
+    self -> max_elems = self -> large ? tp -> max_large_idx_ids : tp -> max_idx_ids;
+    if ( ( uint64_t ) self -> max_elems > count )
+        self -> max_elems = ( size_t ) count;
+
+    /* try to allocate the memory
+       this may be limited by the MemBank */
+    do
+    {
+        CLEAR ();
+
+        TRY ( self -> src_ids = MemAlloc ( ctx, sizeof self -> src_ids [ 0 ] * self -> max_elems, false ) )
+        {
+            TRY ( self -> new_ord = MemAlloc ( ctx, sizeof self -> new_ord [ 0 ] * self -> max_elems, false ) )
+            {
+                STATUS ( 4, "allocated mapping array of %,u elements", self -> max_elems );
+                return;
+            }
+
+            MemFree ( ctx, self -> src_ids, sizeof self -> src_ids [ 0 ] * self -> max_elems );
+            self -> src_ids = NULL;
+        }
+
+        self -> max_elems >>= 1;
+    }
+    while ( self -> max_elems >= ctx -> caps -> tool -> min_idx_ids );
+
+    ANNOTATE ( "failed to allocate map for row-set" );
+}
+
+static
+RowSet *SortingRowSetIteratorNext ( SortingRowSetIterator *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    RowSet *rs = NULL;
+
+    /* on first invocation, allocate the map */
+    if ( self -> src_ids == NULL )
+    {
+        ON_FAIL ( SortingRowSetIteratorAllocMap ( self, ctx ) )
+            return NULL;
+
+        assert ( self -> src_ids != NULL );
+        assert ( self -> new_ord != NULL );
+    }
+
+    /* advance row_id */
+    self -> row_id += self -> num_elems;
+    self -> num_elems = 0;
+    self -> new_ord_valid = false;
+
+    /* create the empty row-set */
+    if ( self -> row_id < self -> last_excl )
+        rs = SortingRowSetIteratorMakeTheRowSet ( self, ctx, & SortingRowSetPhys_vt );
+
+    return rs;
+}
+
+
+/*--------------------------------------------------------------------------
+ * MapFile
+ */
+
+static RowSetIterator_vt SortingRowSetIterator_vt =
+{
+    SortingRowSetIteratorWhack,
+    SortingRowSetIteratorGetIdxMapping,
+    SortingRowSetIteratorGetSourceIds,
+    SortingRowSetIteratorNext
+};
+
+RowSetIterator * MapFileMakeSortingRowSetIterator ( const MapFile *self, const ctx_t *ctx, bool large )
+{
+    FUNC_ENTRY ( ctx );
+
+    SortingRowSetIterator *rsi;
+
+    /* create the iterator */
+    TRY ( rsi = MemAlloc ( ctx, sizeof * rsi, true ) )
+    {
+        TRY ( RowSetIteratorInit ( & rsi -> dad, ctx, & SortingRowSetIterator_vt ) )
+        {
+            /* initialize the row-set with map and self reference */
+            TRY ( rsi -> row_id = MapFileFirst ( self, ctx ) )
+            {
+                TRY ( rsi -> last_excl = rsi -> row_id + MapFileCount ( self, ctx ) )
+                {
+                    TRY ( rsi -> idx = MapFileDuplicate ( self, ctx ) )
+                    {
+                        rsi -> large = large;
+                        return & rsi -> dad;
+                    }
+                }
+            }
+        }
+
+        MemFree ( ctx, rsi, sizeof * rsi );
+    }
+
+    return NULL;
+}
diff --git a/tools/sra-sort/sra-sort.c b/tools/sra-sort/sra-sort.c
new file mode 100644
index 0000000..4845f86
--- /dev/null
+++ b/tools/sra-sort/sra-sort.c
@@ -0,0 +1,746 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "ctx.h"
+#include "caps.h"
+#include "mem.h"
+#include "except.h"
+#include "status.h"
+#include "sra-sort.h"
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <vdb/manager.h>
+#include <vdb/vdb-priv.h>
+#include <kdb/manager.h>
+#include <kfg/config.h>
+#include <kfs/directory.h>
+#include <klib/printf.h>
+#include <klib/text.h>
+#include <klib/out.h>
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <strtol.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef _WIN32
+#include <process.h>
+#else
+#include <unistd.h>
+#endif
+
+FILE_ENTRY ( sra-sort );
+
+
+/* this goes away in vdb-3 */
+const char UsageDefaultName [] = "sra-sort";
+
+rc_t CC UsageSummary ( const char *prog_name )
+{
+    return KOutMsg ( "Usage: %s [options] src-object dst-object\n"
+                     "       %s [options] src-object [src-object...] dst-dir\n"
+                     "\n"
+                     , prog_name
+                     , prog_name
+        );
+}
+
+#define OPT_IGNORE_FAILURE "ignore-failure"
+#define OPT_FORCE "force"
+#define OPT_MEM_LIMIT "mem-limit"
+#define OPT_MAP_FILE_BSIZE "map-file-bsize"
+#define OPT_MAX_IDX_IDS "max-idx-ids"
+#define OPT_MAX_REF_IDX_IDS "max-ref-idx-ids"
+#define OPT_MAX_LARGE_IDX_IDS "max-large-idx-ids"
+#define OPT_TEMP_DIR "tempdir"
+#define OPT_MMAP_DIR "mmapdir"
+#define OPT_UNSORTED_OLD_NEW "unsorted-old-new"
+
+#define OPT_COLUMN_MD5 "column-md5"
+#define OPT_NO_COLUMN_CHECKSUM "no-column-checksum"
+
+#define OPT_BLOB_CRC32 "blob-crc32"
+#define OPT_BLOB_MD5 "blob-md5"
+#define OPT_NO_BLOB_CHECKSUM "no-blob-checksum"
+
+#define OPT_KEEP_IDX_FILES "keep-idx-files"
+#define OPT_IDX_CONSISTENCY_CHECK "idx-cc"
+
+static const char *hlp_ignore_failure [] = { "ignore failure when sorting multiple objects",
+                                             "i.e. continue in spite of previous errors", NULL };
+static const char *hlp_force [] = { "force overwrite of existing destination", NULL };
+static const char *hlp_mem_limit [] = { "sets limit on dynamic memory usage", NULL };
+static const char *hlp_map_file_bsize [] = { "sets id map-file cache size", NULL };
+static const char *hlp_max_idx_ids [] = { "sets number of join-index ids to process at a time", NULL };
+static const char *hlp_max_ref_idx_ids [] = { "sets number of join-index ids to process within REFERENCE table", NULL };
+static const char *hlp_max_large_idx_ids [] = { "sets number of rows to process with large columns", NULL };
+static const char *hlp_temp_dir [] = { "sets a specific directory to use for temporary files", NULL };
+static const char *hlp_mmap_dir [] = { "sets a specific directory to use for memory-mapped buffers", NULL };
+static const char *hlp_unsorted_old_new [] = { "write old=>new index in unsorted order", NULL };
+
+static const char *hlp_column_md5 [] = { "generate md5sum compatible checksum files for each column [default]", NULL };
+static const char *hlp_no_column_checksum [] = { "disable generation of column checksums", NULL };
+
+static const char *hlp_blob_crc32 [] = { "generate CRC32 checksums for each blob [default]", NULL };
+static const char *hlp_blob_md5 [] = { "generate MD5 checksums for each blob", NULL };
+static const char *hlp_no_blob_checksum [] = { "disable generation of blob checksums", NULL };
+
+#if _DEBUGGING
+static const char *hlp_keep_idx_files [] = { "keep temporary index files for debugging", NULL };
+static const char *hlp_idx_consistency_check [] = { "run consistency check on index files", NULL };
+#endif
+
+static OptDef options [] =
+{
+    /* 1. long-name
+       2. list of single character short names
+       3. help-gen function
+       4. list of help strings, NULL terminated
+       5. max count
+       6. option requires value
+       7. option is required
+    */
+    { OPT_IGNORE_FAILURE, "i", NULL, hlp_ignore_failure, 1, false, false }
+  , { OPT_FORCE, "f", NULL, hlp_force, 1, false, false }
+  , { OPT_MEM_LIMIT, NULL, NULL, hlp_mem_limit, 1, true, false }
+  , { OPT_MAP_FILE_BSIZE, NULL, NULL, hlp_map_file_bsize, 1, true, false }
+  , { OPT_MAX_IDX_IDS, NULL, NULL, hlp_max_idx_ids, 1, true, false }
+  , { OPT_MAX_REF_IDX_IDS, NULL, NULL, hlp_max_ref_idx_ids, 1, true, false }
+  , { OPT_MAX_LARGE_IDX_IDS, NULL, NULL, hlp_max_large_idx_ids, 1, true, false }
+  , { OPT_TEMP_DIR, NULL, NULL, hlp_temp_dir, 1, true, false }
+  , { OPT_MMAP_DIR, NULL, NULL, hlp_mmap_dir, 1, true, false }
+  , { OPT_UNSORTED_OLD_NEW, NULL, NULL, hlp_unsorted_old_new, 1, false, false }
+
+  , { OPT_COLUMN_MD5, NULL, NULL, hlp_column_md5, 1, false, false }
+  , { OPT_NO_COLUMN_CHECKSUM, NULL, NULL, hlp_no_column_checksum, 1, false, false }
+  , { OPT_BLOB_CRC32, NULL, NULL, hlp_blob_crc32, 1, false, false }
+  , { OPT_BLOB_MD5, NULL, NULL, hlp_blob_md5, 1, false, false }
+  , { OPT_NO_BLOB_CHECKSUM, NULL, NULL, hlp_no_blob_checksum, 1, false, false }
+#if _DEBUGGING
+  , { OPT_KEEP_IDX_FILES, NULL, NULL, hlp_keep_idx_files, 1, false, false }
+  , { OPT_IDX_CONSISTENCY_CHECK, NULL, NULL, hlp_idx_consistency_check, 1, false, false }
+#endif
+};
+
+static const char *option_params [] =
+{
+    NULL
+  , NULL
+  , "bytes"
+  , "cache-size"
+  , "num-ids"
+  , "num-ids"
+  , "num-ids"
+  , "path-to-tmp"
+  , "path-to-mmaps"
+  , NULL
+  , NULL
+  , NULL
+  , NULL
+  , NULL
+  , NULL
+#if _DEBUGGING
+  , NULL
+  , NULL
+#endif
+};
+
+rc_t CC Usage ( const Args *args )
+{
+    uint32_t i;
+    const char *progname, *fullpath;
+    rc_t rc = ArgsProgram ( args, & fullpath, & progname );
+    if ( rc != 0 )
+        progname = fullpath = UsageDefaultName;
+    
+    UsageSummary ( progname );
+    
+    KOutMsg ( "Options:\n" );
+    
+    for ( i = 0; i < sizeof options / sizeof options [ 0 ]; ++ i )
+    {
+        HelpOptionLine ( options [ i ] . aliases, options [ i ] . name,
+            option_params [ i ], options [ i ] . help );
+    }
+
+    HelpOptionsStandard ();
+    
+    HelpVersion ( fullpath, KAppVersion () );
+
+    return 0;
+}
+
+static
+const char *ArgsGetOptStr ( Args *self, const ctx_t *ctx, const char *optname, uint32_t *count )
+{
+    rc_t rc;
+    const char *val = NULL;
+
+    uint32_t dummy;
+    if ( count == NULL )
+        count = & dummy;
+
+    rc = ArgsOptionCount ( self, optname, count );
+    if ( rc == 0 && * count != 0 )
+    {
+        rc = ArgsOptionValue ( self, optname, 0, (const void **)& val );
+        if ( rc != 0 )
+            INTERNAL_ERROR ( rc, "failed to retrieve '%s' parameter", optname );
+    }
+
+    return val;
+}
+
+static
+uint64_t ArgsGetOptU64 ( Args *self, const ctx_t *ctx, const char *optname, uint32_t *count )
+{
+    rc_t rc;
+    uint64_t val = 0;
+
+    uint32_t dummy;
+    if ( count == NULL )
+        count = & dummy;
+
+    rc = ArgsOptionCount ( self, optname, count );
+    if ( rc == 0 && * count != 0 )
+    {
+        const char *str;
+        rc = ArgsOptionValue ( self, optname, 0, (const void **)& str );
+        if ( rc != 0 )
+            INTERNAL_ERROR ( rc, "failed to retrieve '%s' parameter", optname );
+        else
+        {
+            char *end;
+            val = strtou64 ( str, & end, 0 );
+            if ( end [ 0 ] != 0 )
+            {
+                rc = RC ( rcExe, rcArgv, rcParsing, rcParam, rcIncorrect );
+                ERROR ( rc, "bad '%s' parameter: '%s'", optname, str );
+            }
+        }
+    }
+
+    return val;
+}
+
+static
+bool ArgsGetOptBool ( Args *self, const ctx_t *ctx, const char *optname, uint32_t *count )
+{
+    rc_t rc;
+    bool val = false;
+
+    uint32_t dummy;
+    if ( count == NULL )
+        count = & dummy;
+
+    rc = ArgsOptionCount ( self, optname, count );
+    if ( rc == 0 && * count != 0 )
+        val = true;
+
+    return val;
+}
+
+static
+uint64_t KConfigGetNodeU64 ( const ctx_t *ctx, const char *path, bool *found )
+{
+    rc_t rc;
+    uint64_t val = 0;
+    const KConfigNode *n;
+
+    bool dummy;
+    if ( found == NULL )
+        found = & dummy;
+
+    rc = KConfigOpenNodeRead ( ctx -> caps -> cfg, & n, "sra-sort/map_file_bsize" );
+    if ( rc == 0 )
+    {
+        char buff [ 256 ];
+        size_t num_read, remaining;
+
+        rc = KConfigNodeRead ( n, 0, buff, sizeof buff - 1, & num_read, & remaining );
+        if ( rc != 0 )
+            ERROR ( rc, "failed to read KConfig node '%s'", path );
+        else if ( remaining != 0 )
+        {
+            rc = RC ( rcExe, rcNode, rcReading, rcBuffer, rcInsufficient );
+            ERROR ( rc, "failed to read KConfig node '%s'", path );
+        }
+        else
+        {
+            char *end;
+            buff [ num_read ] = 0;
+            val = strtou64 ( buff, & end, 0 );
+            if ( end [ 0 ] != 0 )
+            {
+                rc = RC ( rcExe, rcNode, rcReading, rcNumeral, rcIncorrect );
+                ERROR ( rc, "bad '%s' config value: '%s'", path, buff );
+            }
+        }
+
+        KConfigNodeRelease ( n );
+    }
+
+    return val;
+}
+
+static
+void initialize_params ( const ctx_t *ctx, Caps *caps, Tool *tp, Selection *sel, Args *args )
+{
+    bool found=false;
+    uint64_t val;
+    uint32_t count;
+    const char *str;
+
+    int col_md5 = kcmMD5;
+
+    memset ( sel, 0, sizeof * sel );
+    memset ( tp, 0, sizeof * tp );
+    tp -> sel = sel;
+
+    /* default to host tmp */
+    tp -> tmpdir = "/tmp";
+
+    /* default to mmap dir */
+    tp -> mmapdir = NULL;
+
+    /* default buffer size for map cache */
+    tp -> map_file_bsize = 64 * 1024 * 1024;
+    tp -> map_file_random_bsize = tp -> map_file_bsize;
+
+    /* default max index ids to gather at a time */
+    tp -> max_ref_idx_ids = tp -> max_large_idx_ids = tp -> max_idx_ids = 256 * 1024 * 1024;
+    tp -> max_poslen_ids = 64 * 1024 * 1024;
+    tp -> min_idx_ids =  64 * 1024 * 1024;
+    tp -> max_missing_ids = tp -> max_idx_ids;
+
+#if 0
+    /* refpos cache size */
+    tp -> refpos_cache_capacity = 100 * 1024 * 1024;
+#endif
+
+    /* for creating mapping files */
+    tp -> pid = getpid ();
+
+    /* db create defaults */
+    tp -> db . cmode = kcmCreate;
+
+    /* tbl create defaults */
+    tp -> tbl . cmode = kcmCreate;
+
+    /* column create mode defaults */
+    tp -> col . pgsize = 1;
+    tp -> col . cmode = kcmInit;
+    tp -> col . checksum = kcsCRC32;
+
+    /* normally do not ignore failures */
+    tp -> ignore = false;
+
+    /* normally do not force overwrite */
+    tp -> force = false;
+
+    /* not needed under normal circumstances */
+    tp -> write_new_to_old = false;
+tp->write_new_to_old=true;
+
+    /* default is to sort on old */
+    tp -> sort_before_old2new = true;
+
+    /* when debugging, this can be turned off */
+    tp -> unlink_idx_files = true;
+    tp -> idx_consistency_check = false;
+
+
+    /* record them as caps */
+    caps -> tool = tp;
+
+    /* look in config */
+    /* TBD - COMPLETE THIS */
+    ON_FAIL ( val = KConfigGetNodeU64 ( ctx, "sra-sort/map_file_bsize", & found ) )
+        return;
+    if ( found )
+        tp -> map_file_bsize = tp -> map_file_random_bsize = ( size_t ) val;
+
+    ON_FAIL ( val = KConfigGetNodeU64 ( ctx, "sra-sort/map_file_random_bsize", & found ) )
+        return;
+    if ( found )
+        tp -> map_file_random_bsize = ( size_t ) val;
+
+    ON_FAIL ( val = KConfigGetNodeU64 ( ctx, "sra-sort/max_idx_ids", & found ) )
+        return;
+    if ( found )
+        tp -> max_idx_ids = ( size_t ) val;
+
+    ON_FAIL ( val = KConfigGetNodeU64 ( ctx, "sra-sort/max_ref_idx_ids", & found ) )
+        return;
+    if ( found )
+        tp -> max_ref_idx_ids = ( size_t ) val;
+
+    /* finally look in args */
+    ON_FAIL ( str = ArgsGetOptStr ( args, ctx, OPT_TEMP_DIR, & count ) )
+        return;
+    if ( count != 0 && str [ 0 ] != 0 )
+        tp -> tmpdir = str;
+
+    ON_FAIL ( str = ArgsGetOptStr ( args, ctx, OPT_MMAP_DIR, & count ) )
+        return;
+    if ( count != 0 && str [ 0 ] != 0 )
+        tp -> mmapdir = str;
+
+    ON_FAIL ( val = ArgsGetOptU64 ( args, ctx, OPT_MAP_FILE_BSIZE, & count ) )
+        return;
+    if ( count != 0 )
+        tp -> map_file_random_bsize = ( size_t ) val;
+   
+    ON_FAIL ( val = ArgsGetOptU64 ( args, ctx, OPT_MAX_IDX_IDS, & count ) )
+        return;
+    if ( count != 0 )
+        tp -> max_idx_ids = tp -> max_ref_idx_ids = ( size_t ) val;
+   
+    ON_FAIL ( val = ArgsGetOptU64 ( args, ctx, OPT_MAX_REF_IDX_IDS, & count ) )
+        return;
+    if ( count != 0 )
+        tp -> max_ref_idx_ids = ( size_t ) val;
+   
+    ON_FAIL ( val = ArgsGetOptU64 ( args, ctx, OPT_MAX_LARGE_IDX_IDS, & count ) )
+        return;
+    if ( count != 0 )
+        tp -> max_large_idx_ids = ( size_t ) val;
+
+    ON_FAIL ( found = ArgsGetOptBool ( args, ctx, OPT_IGNORE_FAILURE, & count ) )
+        return;
+    if ( count != 0 )
+        tp -> ignore = true;
+
+    ON_FAIL ( found = ArgsGetOptBool ( args, ctx, OPT_FORCE, & count ) )
+        return;
+    if ( count != 0 )
+        tp -> force = true;
+   
+    ON_FAIL ( found = ArgsGetOptBool ( args, ctx, OPT_UNSORTED_OLD_NEW, & count ) )
+        return;
+    if ( count != 0 )
+        tp -> sort_before_old2new = false;
+
+    ON_FAIL ( found = ArgsGetOptBool ( args, ctx, OPT_COLUMN_MD5, & count ) )
+        return;
+    if ( count != 0 )
+        col_md5 = kcmMD5;
+    else
+    {
+        ON_FAIL ( found = ArgsGetOptBool ( args, ctx, OPT_NO_COLUMN_CHECKSUM, & count ) )
+            return;
+        if ( count != 0 )
+            col_md5 = 0;
+    }
+
+    tp -> db . cmode |= col_md5;
+    tp -> tbl . cmode |= col_md5;
+    tp -> col . cmode |= col_md5;
+
+    ON_FAIL ( found = ArgsGetOptBool ( args, ctx, OPT_BLOB_CRC32, & count ) )
+        return;
+    if ( count != 0 )
+        tp -> col . checksum = kcsCRC32;
+    else
+    {
+        ON_FAIL ( found = ArgsGetOptBool ( args, ctx, OPT_BLOB_MD5, & count ) )
+            return;
+        if ( count != 0 )
+            tp -> col . checksum = kcsMD5;
+        else
+        {
+            ON_FAIL ( found = ArgsGetOptBool ( args, ctx, OPT_NO_BLOB_CHECKSUM, & count ) )
+                return;
+            if ( count != 0 )
+                tp -> col . checksum = kcsNone;
+        }
+    }
+
+#if _DEBUGGING
+    ON_FAIL ( found = ArgsGetOptBool ( args, ctx, OPT_KEEP_IDX_FILES, & count ) )
+        return;
+    if ( count != 0 )
+        tp -> unlink_idx_files = false;
+
+    ON_FAIL ( found = ArgsGetOptBool ( args, ctx, OPT_IDX_CONSISTENCY_CHECK, & count ) )
+        return;
+    if ( count != 0 )
+        tp -> idx_consistency_check = tp -> write_new_to_old = true;
+#endif
+}
+
+static
+void initialize_caps ( const ctx_t *ctx, Caps *caps, Args *args )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* get specified limit */
+    uint32_t count;
+    size_t mem_limit = ( size_t ) ArgsGetOptU64 ( args, ctx, OPT_MEM_LIMIT, & count );
+    if ( ! FAILED () && count != 0 )
+    {
+        MemBank *mem;
+        TRY ( mem = MemBankMake ( ctx, mem_limit ) )
+        {
+            MemBankRelease ( caps -> mem, ctx );
+            caps -> mem = mem;
+        }
+    }
+
+    if ( ! FAILED () )
+    {
+        /* here's a chance to pick up special config */
+        /* TBD */
+
+        /* open up KConfig */
+        rc_t rc = KConfigMake ( ( KConfig** ) & caps -> cfg, NULL );
+        if ( rc != 0 )
+            ERROR ( rc, "KConfigMake failed" );
+    }
+}
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    DECLARE_CTX_INFO ();
+
+    /* initialize context */
+    Caps caps;
+    ctx_t main_ctx = { & caps, NULL, & ctx_info };
+    const ctx_t *ctx = & main_ctx;
+    CapsInit ( & caps, NULL );
+
+    if ( argc <= 1 )
+        main_ctx . rc = UsageSummary ( "sra-sort" );
+    else
+    {
+        /* create MemBank with unlimited quota */
+        TRY ( caps . mem = MemBankMake (  ctx, -1 ) )
+        {
+            rc_t rc = VDBManagerMakeUpdate ( & caps . vdb, NULL );
+            if ( rc != 0 )
+                ERROR ( rc, "failed to create VDBManager" );
+            else
+            {
+                rc = VDBManagerOpenKDBManagerUpdate ( caps . vdb, & caps . kdb );
+                if ( rc != 0 )
+                    ERROR ( rc, "failed to create KDBManager" );
+                else
+                {
+                    Args * args;
+                    rc = ArgsMakeAndHandle ( & args, argc, argv, 1,
+                        options, sizeof options / sizeof options [ 0 ] );
+                    if ( rc != 0 )
+                        ERROR ( rc, "failed to parse command line" );
+                    else
+                    {
+                        TRY ( initialize_caps ( ctx, & caps, args ) )
+                        {
+                            Tool tp;
+                            Selection sel;
+                            TRY ( initialize_params ( ctx, & caps, & tp, & sel, args ) )
+                            {
+                                uint32_t count;
+                                rc = ArgsParamCount ( args, & count );
+                                if ( rc != 0 )
+                                    ERROR ( rc, "ArgsParamCount failed" );
+                                else if ( count < 2 )
+                                {
+                                    rc = RC ( rcExe, rcArgv, rcParsing, rcParam, rcInsufficient );
+                                    ERROR ( rc, "expected source and destination parameters" );
+                                }
+                                else
+                                {
+                                    /* check type of last parameter */
+                                    const char *dst;
+                                    rc = ArgsParamValue ( args, count - 1, (const void **)& dst );
+                                    if ( rc != 0 )
+                                        ERROR ( rc, "ArgsParamValue [ %u ] failed", count - 1 );
+                                    else
+                                    {
+                                        enum RCTarget targ = rcNoTarg;
+
+                                        bool dst_is_dir = false;
+                                        int dst_type = KDBManagerPathType ( caps . kdb, "%s", dst ) & ~ kptAlias;
+                                        if ( dst_type == kptDir )
+                                            dst_is_dir = true;
+                                        else if ( count != 2 )
+                                        {
+                                            rc = RC ( rcExe, rcArgv, rcParsing, rcArgv, rcIncorrect );
+                                            ERROR ( rc, "multiple source objects require last parameter to be a directory" );
+                                        }
+                                        else switch ( dst_type )
+                                        {
+                                        case kptNotFound:
+                                            tp . db . cmode |= kcmParents;
+                                            tp . tbl . cmode |= kcmParents;
+                                            break;
+                                        case kptFile:
+                                        case kptFile | kptAlias:
+                                            rc = RC ( rcExe, rcArgv, rcParsing, rcArgv, rcIncorrect );
+                                            ERROR ( rc, "destination object is a file - remove first or rename before trying again" );
+                                            break;
+                                        case kptDatabase:
+                                            targ = rcDatabase;
+                                            break;
+                                        case kptTable:
+                                            targ = rcTable;
+                                            break;
+                                        case kptPrereleaseTbl:
+                                            dst_type = kptTable;
+                                            break;
+                                        default:
+                                            rc = RC ( rcExe, rcArgv, rcParsing, rcArgv, rcIncorrect );
+                                            ERROR ( rc, "destination object type cannot be overwritten" );
+                                            break;
+                                        }
+
+                                        if ( ! FAILED () )
+                                        {
+                                            if ( dst_is_dir )
+                                            {
+                                                uint32_t i;
+                                                rc_t first_rc = 0;
+                                                bool issue_divider_line;
+
+                                                if ( tp . force )
+                                                {
+                                                    tp . db . cmode = kcmInit | ( tp . db . cmode & ~ kcmValueMask );
+                                                    tp . tbl . cmode = kcmInit | ( tp . tbl . cmode & ~ kcmValueMask );
+                                                }
+                                                
+                                                for ( issue_divider_line = false, i = 0; i < count - 1; issue_divider_line = true, ++ i )
+                                                {
+                                                    rc = ArgsParamValue ( args, i, (const void **)& tp . src_path );
+                                                    if ( rc != 0 )
+                                                        ERROR ( rc, "ArgParamValue [ %u ] failed", i );
+                                                    else
+                                                    {
+                                                        char dst_path [ 4096 ];
+                                                        const char *leaf = strrchr ( tp . src_path, '/' );
+                                                        if ( leaf ++ == NULL )
+                                                            leaf = tp . src_path;
+                                                        rc = string_printf ( dst_path, sizeof dst_path, NULL, "%s/%s", dst, leaf );
+                                                        if ( rc != 0 )
+                                                            ERROR ( rc, "string_printf on param [ %u ] failed", i );
+                                                        else
+                                                        {
+                                                            size_t size = string_size ( dst_path );
+                                                            char *ext = string_rchr ( dst_path, size, '.' );
+                                                            if ( ext != NULL )
+                                                            {
+                                                                size -= ext - dst_path;
+                                                                switch ( size )
+                                                                {
+                                                                case 4:
+                                                                    if ( strcase_cmp ( ext, 4, ".sra", 4, 4 ) == 0 )
+                                                                        * ext = 0;
+                                                                    break;
+                                                                case 5:
+                                                                    if ( strcase_cmp ( ext, 5, ".csra", 5, 5 ) == 0 )
+                                                                        * ext = 0;
+                                                                    break;
+                                                                }
+                                                            }
+
+                                                            if ( issue_divider_line )
+                                                                STATUS ( 1, "################################################################" );
+
+                                                            tp . dst_path = dst_path;
+                                                            ON_FAIL ( run ( ctx ) )
+                                                            {
+                                                                if ( ! tp . ignore )
+                                                                    break;
+
+                                                                if ( first_rc == 0 )
+                                                                    first_rc = ctx -> rc;
+
+                                                                CLEAR ();
+                                                            }
+                                                        }
+                                                    }
+                                                }
+
+                                                if ( first_rc != 0 )
+                                                    main_ctx . rc = first_rc;
+                                            }
+                                            else
+                                            {
+                                                tp . dst_path = dst;
+                                                rc = ArgsParamValue ( args, 0, (const void **)& tp . src_path );
+                                                if ( rc != 0 )
+                                                    ERROR ( rc, "ArgParamValue [ 0 ] failed" );
+                                                else
+                                                {
+                                                    int src_type;
+
+                                                    switch ( dst_type )
+                                                    {
+                                                    case kptDatabase:
+                                                    case kptTable:
+                                                        src_type = KDBManagerPathType ( caps . kdb, "%s", tp . src_path ) & ~ kptAlias;
+                                                        if ( src_type == kptPrereleaseTbl )
+                                                            src_type = kptTable;
+                                                        if ( src_type != dst_type )
+                                                        {
+                                                            rc = RC ( rcExe, rcArgv, rcParsing, rcArgv, rcIncorrect );
+                                                            ERROR ( rc, "source and destination object types are not compatible" );
+                                                        }
+                                                        else if ( ! tp . force )
+                                                        {
+                                                            rc = RC ( rcExe, targ, rcCopying, targ, rcExists );
+                                                            ERROR ( rc, "destination object cannot be overwritten - try again with '-f'" );
+                                                        }
+                                                        else
+                                                        {
+                                                            tp . db . cmode = kcmInit | ( tp . db . cmode & ~ kcmValueMask );
+                                                            tp . tbl . cmode = kcmInit | ( tp . tbl . cmode & ~ kcmValueMask );
+                                                        }
+                                                    }
+
+                                                    if ( ! FAILED () )
+                                                        run ( ctx );
+                                                }
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        }
+
+                        ArgsWhack ( args );
+                    }
+                }
+            }
+
+            CapsWhack ( & caps, ctx );
+        }
+    }
+
+    return main_ctx . rc;
+}
diff --git a/tools/sra-sort/sra-sort.h b/tools/sra-sort/sra-sort.h
new file mode 100644
index 0000000..027d591
--- /dev/null
+++ b/tools/sra-sort/sra-sort.h
@@ -0,0 +1,171 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_
+#define _h_sra_sort_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+#ifndef _h_kfs_defs_
+#include <kfs/defs.h>
+#endif
+
+#ifndef _h_kdb_column_
+#include <kdb/column.h>
+#endif
+
+
+#define NEW_TYPES 1
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct DbPair;
+struct TablePair;
+
+
+/*--------------------------------------------------------------------------
+ * Selection
+ *  input selection criteria
+ */
+typedef struct Selection Selection;
+struct Selection
+{
+    int dummy;
+};
+
+/*--------------------------------------------------------------------------
+ * Tool
+ *  parameter block generated by KMain
+ */
+typedef struct Tool Tool;
+struct Tool
+{
+    /* input selection */
+    const Selection *sel;
+
+    /* directory for temporary files */
+    const char *tmpdir;
+
+    /* directory for mmap page files */
+    const char *mmapdir;
+
+    /* source object path */
+    const char *src_path;
+
+    /* destination object path */
+    const char *dst_path;
+
+    /* buffer size for id map files */
+    size_t map_file_bsize;
+    size_t map_file_random_bsize;
+
+    /* the number of ids to gather at a time */
+    size_t max_ref_idx_ids;
+    size_t max_large_idx_ids;
+    size_t max_poslen_ids;
+    size_t max_idx_ids;
+    size_t min_idx_ids;
+
+    /* the number of missing SEQUENCE ids to gather at a time */
+    size_t max_missing_ids;
+
+    /* pid of tool */
+    int pid;
+
+    /* db create mode */
+    struct
+    {
+        KCreateMode cmode;
+    } db;
+
+    /* tbl create mode */
+    struct
+    {
+        KCreateMode cmode;
+    } tbl;
+
+    /* column blob checksum mode */
+    struct
+    {
+        size_t pgsize;
+        KCreateMode cmode;
+        KChecksum checksum;
+    } col;
+
+    /* ignore failure on multiple sorts */
+    bool ignore;
+
+    /* force overwrite */
+    bool force;
+
+    /* write new=>old mappings
+       not normally needed */
+    bool write_new_to_old;
+
+    /* whether to apply a sort on old-id
+       before writing old=>new mapping or
+       to let pagefile handle it */
+    bool sort_before_old2new;
+
+    /* normally remove idx files right away
+       but if they are being debugged... */
+    bool unlink_idx_files;
+
+    /* perform consistency check on index */
+    bool idx_consistency_check;
+};
+
+
+/*--------------------------------------------------------------------------
+ * TypeParams
+ *  object type params
+ */
+typedef struct TypeParams TypeParams;
+struct TypeParams
+{
+    char src_type [ 256 ];
+    char dst_type [ 256 ];
+    char view_type [ 256 ];
+};
+
+
+/*--------------------------------------------------------------------------
+ * sra-sort functions
+ */
+
+/* run
+ *  called from KMain
+ *  determines the type of object being copied/sorted
+ *  opens input object
+ *  dispatches to the appropriate handler
+ */
+void run ( const ctx_t *ctx );
+
+
+#endif
diff --git a/tools/sra-sort/status.h b/tools/sra-sort/status.h
new file mode 100644
index 0000000..bbf15ab
--- /dev/null
+++ b/tools/sra-sort/status.h
@@ -0,0 +1,48 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_status_
+#define _h_sra_sort_status_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * status generation
+ */
+
+
+/* STATUS
+ *  give feedback
+ */
+void Status ( const ctx_t *ctx, uint32_t lineno, uint32_t level, const char *msg, ... );
+#define STATUS( lvl, msg, ... ) \
+    Status ( ctx, __LINE__, lvl, msg, ## __VA_ARGS__ )
+
+
+#endif
diff --git a/tools/sra-sort/tbl-pair.c b/tools/sra-sort/tbl-pair.c
new file mode 100644
index 0000000..01e2a0a
--- /dev/null
+++ b/tools/sra-sort/tbl-pair.c
@@ -0,0 +1,1055 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+typedef struct TablePair StdTblPair;
+#define TBLPAIR_IMPL StdTblPair
+
+#include "tbl-pair.h"
+#include "col-pair.h"
+#include "db-pair.h"
+#include "meta-pair.h"
+#include "row-set-priv.h"
+#include "ctx.h"
+#include "caps.h"
+#include "except.h"
+#include "status.h"
+#include "mem.h"
+#include "sra-sort.h"
+
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <vdb/vdb-priv.h>
+#include <kdb/meta.h>
+#include <klib/printf.h>
+#include <klib/text.h>
+#include <klib/namelist.h>
+#include <klib/rc.h>
+
+#include <string.h>
+
+
+FILE_ENTRY ( tbl-pair );
+
+
+/*--------------------------------------------------------------------------
+ * StdTblPair
+ *  generic database object pair
+ */
+
+static
+void StdTblPairWhack ( StdTblPair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+    TablePairDestroy ( self, ctx );
+    MemFree ( ctx, self, sizeof * self );
+}
+
+static
+void StdTblPairDummyStub ( StdTblPair *self, const ctx_t *ctx )
+{
+}
+
+static
+ColumnPair *StdTblPairMakeColumnPair ( StdTblPair *self, const ctx_t *ctx,
+    struct ColumnReader *reader, struct ColumnWriter *writer, const char *colspec, bool large )
+{
+    FUNC_ENTRY ( ctx );
+    return TablePairMakeColumnPair ( self, ctx, reader, writer, colspec, large );
+}
+
+static
+RowSetIterator *StdTblPairGetRowSetIterator ( StdTblPair *self, const ctx_t *ctx, bool mapped, bool large )
+{
+    FUNC_ENTRY ( ctx );
+    return TablePairMakeRowSetIterator ( self, ctx, NULL, mapped, large );
+}
+
+static TablePair_vt StdTblPair_vt =
+{
+    StdTblPairWhack,
+    StdTblPairDummyStub,
+    StdTblPairDummyStub,
+    StdTblPairMakeColumnPair,
+    StdTblPairDummyStub,
+    StdTblPairDummyStub,
+    StdTblPairGetRowSetIterator
+};
+
+
+/*--------------------------------------------------------------------------
+ * TablePair
+ *  interface code
+ */
+
+
+/* Make
+ *  makes an object based upon open source and destination VDatabase objects
+ */
+TablePair *TablePairMake ( const ctx_t *ctx,
+    const VTable *src, VTable *dst, const char *name, const char *opt_full_spec, bool reorder )
+{
+    FUNC_ENTRY ( ctx );
+
+    StdTblPair *tbl;
+
+    TRY ( tbl = MemAlloc ( ctx, sizeof * tbl, false ) )
+    {
+        TRY ( TablePairInit ( tbl, ctx, & StdTblPair_vt, src, dst, name, opt_full_spec, reorder ) )
+        {
+            return tbl;
+        }
+
+        MemFree ( ctx, tbl, sizeof * tbl );
+    }
+
+    return NULL;
+}
+
+TablePair *DbPairMakeStdTblPair ( DbPair *self, const ctx_t *ctx,
+    const VTable *src, VTable *dst, const char *name, bool reorder )
+{
+    FUNC_ENTRY ( ctx );
+    return TablePairMake ( ctx, src, dst, name, self -> full_spec, reorder );
+}
+
+
+/* Release
+ */
+void TablePairRelease ( TablePair *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountDrop ( & self -> refcount, "TablePair" ) )
+        {
+        case krefOkay:
+            break;
+        case krefWhack:
+            ( * self -> vt -> whack ) ( ( void* ) self, ctx );
+            break;
+        case krefZero:
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcTable, rcDestroying, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to release TablePair" );
+        }
+    }
+}
+
+/* Duplicate
+ */
+TablePair *TablePairDuplicate ( TablePair *self, const ctx_t *ctx )
+{
+    rc_t rc;
+    FUNC_ENTRY ( ctx );
+
+    if ( self != NULL )
+    {
+        switch ( KRefcountAdd ( & self -> refcount, "TablePair" ) )
+        {
+        case krefOkay:
+        case krefWhack:
+        case krefZero:
+            break;
+        case krefLimit:
+        case krefNegative:
+            rc = RC ( rcExe, rcTable, rcAttaching, rcRefcount, rcInvalid );
+            INTERNAL_ERROR ( rc, "failed to duplicate TablePair" );
+            return NULL;
+        }
+    }
+
+    return ( TablePair* ) self;
+}
+
+
+/* CommitColumnPair
+ */
+static
+bool CC TablePairCommitColumnPair ( void *item, void *data )
+{
+    const ctx_t *ctx = ( const void* ) data;
+    FUNC_ENTRY ( ctx );
+    ColumnPair *col = item;
+    TRY ( ColumnWriterCommit ( col -> writer, ctx ) )
+    {
+        return false;
+    }
+    return true;
+}
+
+
+/* ReleaseColumnPair
+ */
+static
+void CC TablePairReleaseColumnPair ( void *item, void *data )
+{
+    const ctx_t *ctx = ( const void* ) data;
+    FUNC_ENTRY ( ctx );
+    ColumnPairRelease ( item, ctx );
+}
+
+
+/* Copy
+ *  the table has to obtain a RowSetIterator
+ *  which it walks vertically
+ *
+ *  for each RowSet, it walks its columns horizontally,
+ *  resetting it between columns
+ */
+static
+void TablePairCopyStaticColumns ( TablePair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* copy static columns */
+    uint32_t count = VectorLength ( & self -> static_cols );
+    if ( count != 0 )
+    {
+#if OLD_STATIC_WRITE
+        RowSetIterator *rsi;
+        TRY ( rsi = TablePairMakeRowSetIterator ( self, ctx, NULL, false ) )
+        {
+#endif
+            STATUS ( 2, "copying '%s' static columns", self -> full_spec );
+
+            while ( ! FAILED () )
+            {
+                uint32_t i;
+
+#if OLD_STATIC_WRITE
+                RowSet *rs;
+                ON_FAIL ( rs = RowSetIteratorNext ( rsi, ctx ) )
+                    break;
+                if ( rs == NULL )
+                    break;
+#endif
+                for ( i = 0; i < count; ++ i )
+                {
+                    ColumnPair *col = VectorGet ( & self -> static_cols, i );
+                    assert ( col != NULL );
+#if OLD_STATIC_WRITE
+                    ON_FAIL ( ColumnPairCopy ( col, ctx, rs ) )
+                        break;
+#else
+                    ON_FAIL ( ColumnPairCopyStatic ( col, ctx, self -> first_id, self -> last_excl - self -> first_id ) )
+                        break;
+#endif
+                }
+
+#if OLD_STATIC_WRITE
+                RowSetRelease ( rs, ctx );
+#else
+                break;
+#endif
+            }
+
+#if OLD_STATIC_WRITE
+            RowSetIteratorRelease ( rsi, ctx );
+        }
+#endif
+
+        /* commit columns */
+        if ( ! FAILED () )
+        {
+            STATUS ( 3, "committing static columns" );
+            VectorDoUntil ( & self -> static_cols, false, TablePairCommitColumnPair, ( void* ) ctx );
+        }
+
+        /* douse columns */
+        STATUS ( 3, "releasing static columns" );
+        VectorWhack ( & self -> static_cols, TablePairReleaseColumnPair, ( void* ) ctx );
+    }
+}
+
+static
+void TablePairCopyPresortColumns ( TablePair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* copy remaining columns */
+    uint32_t count = VectorLength ( & self -> presort_cols );
+    if ( count != 0 )
+    {
+        RowSetIterator *rsi;
+        TRY ( rsi = TablePairMakeSimpleRowSetIterator ( self, ctx ) )
+        {
+            STATUS ( 2, "copying '%s' presorted columns", self -> full_spec );
+
+            while ( ! FAILED () )
+            {
+                uint32_t i;
+
+                RowSet *rs;
+                ON_FAIL ( rs = RowSetIteratorNext ( rsi, ctx ) )
+                    break;
+                if ( rs == NULL )
+                    break;
+
+                for ( i = 0; i < count; ++ i )
+                {
+                    ColumnPair *col = VectorGet ( & self -> presort_cols, i );
+                    assert ( col != NULL );
+                    ON_FAIL ( ColumnPairCopy ( col, ctx, rs ) )
+                        break;
+                }
+
+                RowSetRelease ( rs, ctx );
+            }
+
+            RowSetIteratorRelease ( rsi, ctx );
+        }
+
+        /* commit columns */
+        if ( ! FAILED () )
+        {
+            STATUS ( 3, "committing presorted columns" );
+            VectorDoUntil ( & self -> presort_cols, false, TablePairCommitColumnPair, ( void* ) ctx );
+        }
+
+        /* douse columns */
+        STATUS ( 3, "releasing presorted columns" );
+        VectorWhack ( & self -> presort_cols, TablePairReleaseColumnPair, ( void* ) ctx );
+    }
+}
+
+static
+void TablePairCopyMappedColumns ( TablePair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* copy mapped columns */
+    uint32_t count = VectorLength ( & self -> mapped_cols );
+    if ( count != 0 )
+    {
+        RowSetIterator *rsi;
+        const bool is_mapped = true;
+        const bool is_large = false;
+        TRY ( rsi = TablePairGetRowSetIterator ( self, ctx, is_mapped, is_large ) )
+        {
+            STATUS ( 2, "copying '%s' mapped columns", self -> full_spec );
+
+            while ( ! FAILED () )
+            {
+                uint32_t i;
+
+                RowSet *rs;
+                ON_FAIL ( rs = RowSetIteratorNext ( rsi, ctx ) )
+                    break;
+                if ( rs == NULL )
+                    break;
+
+                for ( i = 0; i < count; ++ i )
+                {
+                    ColumnPair *col = VectorGet ( & self -> mapped_cols, i );
+                    assert ( col != NULL );
+                    ON_FAIL ( ColumnPairCopy ( col, ctx, rs ) )
+                        break;
+                }
+
+                RowSetRelease ( rs, ctx );
+            }
+
+            RowSetIteratorRelease ( rsi, ctx );
+        }
+
+        /* commit columns */
+        if ( ! FAILED () )
+        {
+            STATUS ( 3, "committing mapped columns" );
+            VectorDoUntil ( & self -> mapped_cols, false, TablePairCommitColumnPair, ( void* ) ctx );
+        }
+
+        /* douse columns */
+        STATUS ( 3, "releasing mapped columns" );
+        VectorWhack ( & self -> mapped_cols, TablePairReleaseColumnPair, ( void* ) ctx );
+    }
+}
+
+static
+void TablePairCopyLargeColumns ( TablePair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* copy large columns */
+    uint32_t count = VectorLength ( & self -> large_cols );
+    if ( count != 0 )
+    {
+        RowSetIterator *rsi;
+        const bool is_mapped = false;
+        const bool is_large = true;
+        TRY ( rsi = TablePairGetRowSetIterator ( self, ctx, is_mapped, is_large ) )
+        {
+            STATUS ( 2, "copying '%s' large columns", self -> full_spec );
+
+            while ( ! FAILED () )
+            {
+                uint32_t i;
+
+                RowSet *rs;
+                ON_FAIL ( rs = RowSetIteratorNext ( rsi, ctx ) )
+                    break;
+                if ( rs == NULL )
+                    break;
+
+                for ( i = 0; i < count; ++ i )
+                {
+                    ColumnPair *col = VectorGet ( & self -> large_cols, i );
+                    assert ( col != NULL );
+                    ON_FAIL ( ColumnPairCopy ( col, ctx, rs ) )
+                        break;
+                }
+
+                RowSetRelease ( rs, ctx );
+            }
+
+            RowSetIteratorRelease ( rsi, ctx );
+        }
+
+        /* commit columns */
+        if ( ! FAILED () )
+        {
+            STATUS ( 3, "committing large columns" );
+            VectorDoUntil ( & self -> large_cols, false, TablePairCommitColumnPair, ( void* ) ctx );
+        }
+
+        /* douse columns */
+        STATUS ( 3, "releasing large columns" );
+        VectorWhack ( & self -> large_cols, TablePairReleaseColumnPair, ( void* ) ctx );
+    }
+}
+
+static
+void TablePairCopyLargeMappedColumns ( TablePair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* copy large mapped columns */
+    uint32_t count = VectorLength ( & self -> large_mapped_cols );
+    if ( count != 0 )
+    {
+        RowSetIterator *rsi;
+        const bool is_mapped = true;
+        const bool is_large = true;
+        TRY ( rsi = TablePairGetRowSetIterator ( self, ctx, is_mapped, is_large ) )
+        {
+            STATUS ( 2, "copying '%s' large mapped columns", self -> full_spec );
+
+            while ( ! FAILED () )
+            {
+                uint32_t i;
+
+                RowSet *rs;
+                ON_FAIL ( rs = RowSetIteratorNext ( rsi, ctx ) )
+                    break;
+                if ( rs == NULL )
+                    break;
+
+                for ( i = 0; i < count; ++ i )
+                {
+                    ColumnPair *col = VectorGet ( & self -> large_mapped_cols, i );
+                    assert ( col != NULL );
+                    ON_FAIL ( ColumnPairCopy ( col, ctx, rs ) )
+                        break;
+                }
+
+                RowSetRelease ( rs, ctx );
+            }
+
+            RowSetIteratorRelease ( rsi, ctx );
+        }
+
+        /* commit columns */
+        if ( ! FAILED () )
+        {
+            STATUS ( 3, "committing large mapped columns" );
+            VectorDoUntil ( & self -> large_mapped_cols, false, TablePairCommitColumnPair, ( void* ) ctx );
+        }
+
+        /* douse columns */
+        STATUS ( 3, "releasing large mapped columns" );
+        VectorWhack ( & self -> large_mapped_cols, TablePairReleaseColumnPair, ( void* ) ctx );
+    }
+}
+
+static
+void TablePairCopyNormalColumns ( TablePair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    /* copy remaining columns */
+    uint32_t count = VectorLength ( & self -> normal_cols );
+    if ( count != 0 )
+    {
+        RowSetIterator *rsi;
+        const bool is_mapped = false;
+        const bool is_large = false;
+        TRY ( rsi = TablePairGetRowSetIterator ( self, ctx, is_mapped, is_large ) )
+        {
+            STATUS ( 2, "copying '%s' columns", self -> full_spec );
+
+            while ( ! FAILED () )
+            {
+                uint32_t i;
+
+                RowSet *rs;
+                ON_FAIL ( rs = RowSetIteratorNext ( rsi, ctx ) )
+                    break;
+                if ( rs == NULL )
+                    break;
+
+                for ( i = 0; i < count; ++ i )
+                {
+                    ColumnPair *col = VectorGet ( & self -> normal_cols, i );
+                    assert ( col != NULL );
+                    ON_FAIL ( ColumnPairCopy ( col, ctx, rs ) )
+                        break;
+                }
+
+                RowSetRelease ( rs, ctx );
+            }
+
+            RowSetIteratorRelease ( rsi, ctx );
+        }
+
+        /* commit columns */
+        if ( ! FAILED () )
+        {
+            STATUS ( 3, "committing columns" );
+            VectorDoUntil ( & self -> normal_cols, false, TablePairCommitColumnPair, ( void* ) ctx );
+        }
+
+        /* douse columns */
+        STATUS ( 3, "releasing columns" );
+        VectorWhack ( & self -> normal_cols, TablePairReleaseColumnPair, ( void* ) ctx );
+    }
+}
+
+void TablePairCopy ( TablePair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    size_t in_use, quota;
+
+    /* copy columns */
+    
+
+    ON_FAIL ( TablePairExplode ( self, ctx ) )
+        return;
+
+    STATUS ( 2, "copying table '%s'", self -> full_spec );
+
+    in_use = MemInUse ( ctx, & quota );
+    if ( ( quota + 1 ) != 0 )
+        STATUS ( 4, "MEMORY: %,zu bytes used out of %,zu total ( %u%% )", in_use, quota, ( uint32_t ) ( in_use * 100 ) / quota );
+    else
+        STATUS ( 4, "MEMORY: %,zu bytes used", in_use );
+
+    TRY ( TablePairPreCopy ( self, ctx ) )
+    {
+        TRY ( TablePairCopyStaticColumns ( self, ctx ) )
+        {
+            TRY ( TablePairCopyPresortColumns ( self, ctx ) )
+            {
+                TRY ( TablePairCopyMappedColumns ( self, ctx ) )
+                {
+                    TRY ( TablePairCopyLargeColumns ( self, ctx ) )
+                    {
+                        TRY ( TablePairCopyLargeMappedColumns ( self, ctx ) )
+                        {
+                            TablePairCopyNormalColumns ( self, ctx );
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    /* cleanup */
+    if ( ! FAILED () )
+        TablePairPostCopy ( self, ctx );
+
+    in_use = MemInUse ( ctx, & quota );
+    if ( ( quota + 1 ) != 0 )
+        STATUS ( 4, "MEMORY: %,zu bytes used out of %,zu total ( %u%% )", in_use, quota, ( uint32_t ) ( in_use * 100 ) / quota );
+    else
+        STATUS ( 4, "MEMORY: %,zu bytes used", in_use );
+
+    STATUS ( 2, "finished with table '%s'", self -> full_spec );
+}
+
+
+/* Explode
+ *  probably a bad name, but it is intended to mean
+ *  register all enclosed columns
+ *  and create a proper pair of KMetadata
+ */
+static
+MetaPair *TablePairExplodeMetaPair ( TablePair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    MetaPair *meta = NULL;
+    const KMetadata *smeta;
+
+    rc = VTableOpenMetadataRead ( self -> stbl, & smeta );
+    if ( rc != 0 )
+        ERROR ( rc, "VTableOpenMetadataRead failed on 'src.%s'", self -> full_spec );
+    else
+    {
+        KMetadata *dmeta;
+        rc = VTableOpenMetadataUpdate ( self -> dtbl, & dmeta );
+        if ( rc != 0 )
+            ERROR ( rc, "VTableOpenMetadataUpdate failed on 'dst.%s'", self -> full_spec );
+        else
+        {
+            meta = MetaPairMake ( ctx, smeta, dmeta, self -> full_spec );
+
+            KMetadataRelease ( dmeta );
+        }
+        
+        KMetadataRelease ( smeta );
+    }
+
+    return meta;
+}
+
+static
+ColumnPair *TablePairMatchColumnPair ( TablePair *self, const ctx_t *ctx, const char *name, bool required )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    KNamelist *types;
+    ColumnPair *col = NULL;
+
+    rc = VTableListWritableDatatypes ( self -> dtbl, name, & types );
+    if ( rc != 0 )
+        ERROR ( rc, "VTableListWritableDatatypes failed listing 'dst.%s.%s' datatypes", self -> full_spec, name );
+    else
+    {
+        uint32_t count;
+        rc = KNamelistCount ( types, & count );
+        if ( rc != 0 )
+            ERROR ( rc, "KNamelistCount failed listing 'dst.%s.%s' datatypes", self -> full_spec, name );
+        else
+        {
+            const VCursor *scurs;
+            rc = VTableCreateCursorRead ( self -> stbl, & scurs );
+            if ( rc != 0 )
+                ERROR ( rc, "VTableCreateCursorRead failed on 'src.%s'", self -> full_spec, name );
+            else
+            {
+                rc = VCursorPermitPostOpenAdd ( scurs );
+                if ( rc != 0 )
+                    ERROR ( rc, "VCursorPermitPostOpenAdd failed on 'src.%s'", self -> full_spec, name );
+                else
+                {
+                    rc = VCursorOpen ( scurs );
+                    if ( rc != 0 )
+                        ERROR ( rc, "VCursorOpen failed with no contents on 'src.%s'", self -> full_spec, name );
+                    else
+                    {
+                        uint32_t i;
+                        for ( i = 0; i < count; ++ i )
+                        {
+                            uint32_t idx;
+                            char colspec [ 256 ];
+
+                            const char *td;
+                            rc = KNamelistGet ( types, i, & td );
+                            if ( rc != 0 )
+                            {
+                                ERROR ( rc, "KNamelistGet ( %u ) failed listing 'dst.%s.%s' datatypes", i, self -> full_spec, name );
+                                break;
+                            }
+
+                            rc = string_printf ( colspec, sizeof colspec, NULL, "(%s)%s", td, name );
+                            if ( rc != 0 )
+                            {
+                                ABORT ( rc, "failed creating colspec for 'dst.%s.%s'", self -> full_spec, name );
+                                break;
+                            }
+
+                            rc = VCursorAddColumn ( scurs, & idx, "%s", colspec );
+                            if ( rc == 0 )
+                            {
+                                ColumnReader *reader;
+                                TRY ( reader = TablePairMakeColumnReader ( self, ctx, scurs, colspec, true ) )
+                                {
+                                    ColumnWriter *writer;
+                                    TRY ( writer = TablePairMakeColumnWriter ( self, ctx, NULL, colspec ) )
+                                    {
+                                        uint32_t j;
+                                        bool large = false;
+                                        bool is_static = VTableHasStaticColumn ( self -> stbl, name );
+                                        if ( is_static )
+                                        {
+                                            if ( self -> nonstatic_col_names != NULL )
+                                            {
+                                                for ( j = 0; self -> nonstatic_col_names [ j ] != NULL; ++ j )
+                                                {
+                                                    if ( strcmp ( name, self -> nonstatic_col_names [ j ] ) == 0 )
+                                                    {
+                                                        is_static = false;
+                                                        break;
+                                                    }
+                                                }
+                                            }
+                                        }
+                                        else if ( self -> large_col_names != NULL )
+                                        {
+                                            for ( j = 0; self -> large_col_names [ j ] != NULL; ++ j )
+                                            {
+                                                if ( strcmp ( name, self -> large_col_names [ j ] ) == 0 )
+                                                {
+                                                    large = true;
+                                                    break;
+                                                }
+                                            }
+                                        }
+
+                                        /* at this point, if the column is static, then avoid
+                                           any rigorous treatment and create an otherwise normal
+                                           column pair. may want to special case it for reporting */
+                                        col = is_static
+                                            ? TablePairMakeStaticColumnPair ( self, ctx, reader, writer, colspec )
+                                            : ( * self -> vt -> make_column_pair ) ( ( TBLPAIR_IMPL* ) self, ctx, reader, writer, colspec, large );
+
+                                        ColumnWriterRelease ( writer, ctx );
+                                    }
+
+                                    ColumnReaderRelease ( reader, ctx );
+                                }
+                                break;
+                            }
+                        }
+
+                        if ( col == NULL && ! FAILED () )
+                            ANNOTATE ( "column '%s' cannot be written", name );
+                    }
+                }
+
+
+                VCursorRelease ( scurs );
+            }
+        }
+
+        KNamelistRelease ( types );
+    }
+
+    return col;
+}
+
+static
+void TablePairDefaultExplode ( TablePair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    KNamelist *pnames;
+
+    /* look at the physical columns in source */
+    rc = VTableListPhysColumns ( self -> stbl, & pnames );
+    if ( rc != 0 )
+        ERROR ( rc, "VTableListWritableColumns failed listing 'src.%s' physical columns", self -> full_spec );
+    else
+    {
+        KNamelist *dnames;
+
+        /* this gives us the columns that could potentially take input */
+        rc = VTableListSeededWritableColumns ( self -> dtbl, & dnames, pnames );
+        if ( rc != 0 )
+            ERROR ( rc, "VTableListWritableColumns failed listing 'dst.%s' columns", self -> full_spec );
+        else
+        {
+            uint32_t count;
+            rc = KNamelistCount ( dnames, & count );
+            if ( rc != 0 )
+                ERROR ( rc, "KNamelistCount failed listing 'dst.%s' columns", self -> full_spec );
+            else if ( count > 0 )
+            {
+                uint32_t i;
+                for ( i = 0; ! FAILED () && i < count; ++ i )
+                {
+                    ColumnPair *col;
+
+                    const char *name;
+                    rc = KNamelistGet ( dnames, i, & name );
+                    if ( rc != 0 )
+                    {
+                        ERROR ( rc, "KNamelistGet ( %u ) failed listing 'dst.%s' columns", i, self -> full_spec );
+                        break;
+                    }
+
+                    /* filter out the column names that are specifically excluded */
+                    if ( self -> exclude_col_names != NULL )
+                    {
+                        uint32_t j;
+                        for ( j = 0; self -> exclude_col_names [ j ] != NULL; ++ j )
+                        {
+                            if ( strcmp ( name, self -> exclude_col_names [ j ] ) == 0 )
+                            {
+                                name = NULL;
+                                break;
+                            }
+                        }
+                        if ( name == NULL )
+                            continue;
+                    }
+
+                    TRY ( col = TablePairMatchColumnPair ( self, ctx, name, true ) )
+                    {
+                        if ( col != NULL )
+                        {
+                            ON_FAIL ( TablePairAddColumnPair ( self, ctx, col ) )
+                            {
+                                ColumnPairRelease ( col, ctx );
+                            }
+                        }
+                    }
+                }
+            }
+            
+            KNamelistRelease ( dnames );
+        }
+
+        KNamelistRelease ( pnames );
+    }
+}
+
+void TablePairExplode ( TablePair *self, const ctx_t *ctx )
+{
+    if ( ! self -> exploded )
+    {
+        FUNC_ENTRY ( ctx );
+
+        STATUS ( 2, "exploding table '%s'", self -> full_spec );
+
+        /* first, ask subclass to perform explicit explode */
+        TRY ( ( * self -> vt -> explode ) ( self, ctx ) )
+        {
+            if ( self -> meta == NULL )
+            {
+                TRY ( self -> meta = TablePairExplodeMetaPair ( self, ctx ) )
+                {
+                    MetaPairCopy ( self -> meta, ctx, self -> full_spec, self -> exclude_meta );
+                    STATUS ( 3, "releasing metadata" );
+                    MetaPairRelease ( self -> meta, ctx );
+                    self -> meta = NULL;
+                }
+            }
+
+            if ( ! FAILED () )
+            {
+                /* next, perform default self-explode for all columns not excluded */
+                TRY ( TablePairDefaultExplode ( self, ctx ) )
+                {
+                    /* now create metadata pair */
+                    if ( self -> meta == NULL )
+                        self -> meta = TablePairExplodeMetaPair ( self, ctx );
+                    if ( ! FAILED () )
+                        self -> exploded = true;
+                }
+            }
+        }
+    }
+}
+
+
+/* AddColumnPair
+ *  called from implementations
+ */
+void TablePairAddColumnPair ( TablePair *self, const ctx_t *ctx, ColumnPair *col )
+{
+    if ( col != NULL )
+    {
+        FUNC_ENTRY ( ctx );
+
+        rc_t rc;
+        Vector *v = & self -> normal_cols;
+
+        const char *col_type = "";
+        const char *col_size = "";
+
+        if ( col -> large )
+        {
+            col_size = "large ";
+            v = & self -> large_cols;
+        }
+
+        if ( col -> is_static )
+        {
+            col_type = "static ";
+            v = & self -> static_cols;
+        }
+        else if ( col -> presorted )
+        {
+            col_type = "presorted ";
+            v = & self -> presort_cols;
+        }
+        else if ( col -> is_mapped )
+        {
+            col_type = "mapped ";
+            v = col -> large ? & self -> large_mapped_cols : & self -> mapped_cols;
+        }
+
+        STATUS ( 4, "adding %s%scolumn pair '%s'", col_size, col_type, col -> full_spec );
+        rc = VectorAppend ( v, NULL, ( const void* ) col );
+        if ( rc != 0 )
+            SYSTEM_ERROR ( rc, "failed to add column pair '%s'", col -> full_spec );
+        else
+        {
+            int64_t first;
+            uint64_t count;
+
+            TRY ( count = ColumnReaderIdRange ( col -> reader, ctx, & first ) )
+            {
+                int64_t last_excl = first + count;
+                if ( first < self -> first_id )
+                    self -> first_id = first;
+                /* Static columns may have incorrect range in legacy data */
+                if ( last_excl > self -> last_excl && !col->is_static)
+                    self -> last_excl = last_excl;
+            }
+        }
+    }
+}
+
+
+/* Init
+ */
+void TablePairInit ( TablePair *self, const ctx_t *ctx, const TablePair_vt *vt,
+    const VTable *src, VTable *dst, const char *name, const char *opt_full_spec, bool reorder )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    memset ( self, 0, sizeof * self );
+    self -> vt = vt;
+
+    VectorInit ( & self -> static_cols, 0, 32 );
+    VectorInit ( & self -> presort_cols, 0, 4 );
+    VectorInit ( & self -> large_cols, 0, 32 );
+    VectorInit ( & self -> mapped_cols, 0, 32 );
+    VectorInit ( & self -> large_mapped_cols, 0, 32 );
+    VectorInit ( & self -> normal_cols, 0, 32 );
+
+    if ( opt_full_spec == NULL )
+        opt_full_spec = "";
+
+    rc = VTableAddRef ( self -> stbl = src );
+    if ( rc != 0 )
+        ERROR ( rc, "failed to duplicate tbl 'src.%s%s%s'", opt_full_spec, opt_full_spec [ 0 ] ? "." : "", name );
+    else
+    {
+        rc = VTableAddRef ( self -> dtbl = dst );
+        if ( rc != 0 )
+            ERROR ( rc, "failed to duplicate tbl 'dst.%s%s%s'", opt_full_spec, opt_full_spec [ 0 ] ? "." : "", name );
+        else
+        {
+            char *full_spec;
+
+            self -> full_spec_size = string_size ( opt_full_spec ) + string_size ( name );
+            if ( opt_full_spec [ 0 ] != 0  )
+                ++ self -> full_spec_size;
+
+            TRY ( full_spec = MemAlloc ( ctx, self -> full_spec_size + 1, false ) )
+            {
+                if ( opt_full_spec [ 0 ] != 0 )
+                    rc = string_printf ( full_spec, self -> full_spec_size + 1, NULL, "%s.%s", opt_full_spec, name );
+                else
+                    strcpy ( full_spec, name );
+                if ( rc != 0 )
+                    ABORT ( rc, "miscalculated string size" );
+                else
+                {
+                    const Tool *tp = ctx -> caps -> tool;
+
+                    self -> full_spec = full_spec;
+                    self -> name = full_spec;
+                    if ( opt_full_spec [ 0 ] != 0 )
+                        self -> name += string_size ( opt_full_spec ) + 1;
+
+                    /* start with an invalid range */
+                    self -> first_id = ( int64_t ) ( ~ ( uint64_t ) 0 >> 1 );
+                    self -> last_excl = - self -> first_id;
+
+                    /* row-set id ranges */
+                    self -> max_idx_ids = tp -> max_idx_ids;
+                    self -> min_idx_ids = tp -> min_idx_ids;
+
+                    /* record reordering */
+                    self -> reorder = reorder;
+
+                    KRefcountInit ( & self -> refcount, 1, "TablePair", "init", name );
+                    return;
+                }
+            }
+
+            VTableRelease ( self -> dtbl );
+            self -> dtbl = NULL;
+        }
+
+        VTableRelease ( self -> stbl );
+        self -> stbl = NULL;
+    }
+}
+
+/* Destroy
+ *  destroys superclass items
+ */
+void TablePairDestroy ( TablePair *self, const ctx_t *ctx )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+
+    VectorWhack ( & self -> static_cols, TablePairReleaseColumnPair, ( void* ) ctx );
+    VectorWhack ( & self -> presort_cols, TablePairReleaseColumnPair, ( void* ) ctx );
+    VectorWhack ( & self -> large_cols, TablePairReleaseColumnPair, ( void* ) ctx );
+    VectorWhack ( & self -> mapped_cols, TablePairReleaseColumnPair, ( void* ) ctx );
+    VectorWhack ( & self -> large_mapped_cols, TablePairReleaseColumnPair, ( void* ) ctx );
+    VectorWhack ( & self -> normal_cols, TablePairReleaseColumnPair, ( void* ) ctx );
+
+    MetaPairRelease ( self -> meta, ctx );
+
+    rc = VTableReindex ( self -> dtbl );
+    if ( rc != 0 )
+        WARN ( "VTableReindex failed on 'dst.%s'", self -> full_spec );
+    rc = VTableRelease ( self -> dtbl );
+    if ( rc != 0 )
+        WARN ( "VTableRelease failed on 'dst.%s'", self -> full_spec );
+    VTableRelease ( self -> stbl );
+
+    MemFree ( ctx, ( void* ) self -> full_spec, self -> full_spec_size + 1 );
+
+    memset ( self, 0, sizeof * self );
+}
diff --git a/tools/sra-sort/tbl-pair.h b/tools/sra-sort/tbl-pair.h
new file mode 100644
index 0000000..4ee383e
--- /dev/null
+++ b/tools/sra-sort/tbl-pair.h
@@ -0,0 +1,209 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_tbl_pair_
+#define _h_sra_sort_tbl_pair_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+#ifndef _h_klib_vector_
+#include <klib/vector.h>
+#endif
+
+#ifndef _h_klib_refcount_
+#include <klib/refcount.h>
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct VTable;
+struct DbPair;
+struct ColumnReader;
+struct ColumnWriter;
+struct ColumnPair;
+struct MetaPair;
+struct RowSetIterator;
+
+
+/*--------------------------------------------------------------------------
+ * TablePair
+ *  interface to pairing of source and destination tables
+ */
+typedef struct TablePair_vt TablePair_vt;
+
+typedef struct TablePair TablePair;
+struct TablePair
+{
+    /* table id range */
+    int64_t first_id, last_excl;
+
+    /* polymorphic */
+    const TablePair_vt *vt;
+
+    /* the pair of VTables */
+    struct VTable const *stbl;
+    struct VTable *dtbl;
+
+    /* the pair of KMetadata */
+    struct MetaPair *meta;
+
+    /* the ColumnPairs */
+    Vector static_cols;
+    Vector presort_cols;
+    Vector large_cols;
+    Vector mapped_cols;
+    Vector large_mapped_cols;
+    Vector normal_cols;
+
+    /* filters */
+    const char **exclude_meta;
+    const char **exclude_col_names;
+    const char **mapped_col_names;
+    const char **nonstatic_col_names;
+    const char **large_col_names;
+
+    /* row-set id ranges */
+    size_t max_idx_ids;
+    size_t min_idx_ids;
+
+    /* simple table name */
+    const char *name;
+
+    /* full table spec */
+    size_t full_spec_size;
+    const char *full_spec;
+
+    /* reference counting */
+    KRefcount refcount;
+
+    /* true if table will be reordered */
+    bool reorder;
+
+    /* true if already exploded */
+    bool exploded;
+
+    uint8_t align [ 2 ];
+};
+
+#ifndef TBLPAIR_IMPL
+#define TBLPAIR_IMPL TablePair
+#endif
+
+struct TablePair_vt
+{
+    void ( * whack ) ( TBLPAIR_IMPL *self, const ctx_t *ctx );
+    void ( * pre_explode ) ( TBLPAIR_IMPL *self, const ctx_t *ctx );
+    void ( * explode ) ( TBLPAIR_IMPL *self, const ctx_t *ctx );
+    struct ColumnPair* ( *make_column_pair ) ( TBLPAIR_IMPL *self, const ctx_t *ctx,
+        struct ColumnReader *reader, struct ColumnWriter *writer, const char *colspec, bool large );
+    void ( * pre_copy ) ( TBLPAIR_IMPL *self, const ctx_t *ctx );
+    void ( * post_copy ) ( TBLPAIR_IMPL *self, const ctx_t *ctx );
+    struct RowSetIterator* ( *get_rowset_iter ) ( TBLPAIR_IMPL *self,
+        const ctx_t *ctx, bool mapped, bool large );
+};
+
+
+/* Make
+ *  make a standard table pair from existing VTable objects
+ */
+TablePair *TablePairMake ( const ctx_t *ctx,
+    struct VTable const *src, struct VTable *dst,
+    const char *name, const char *opt_full_spec, bool reorder );
+
+TablePair *DbPairMakeStdTblPair ( struct DbPair *self, const ctx_t *ctx,
+    struct VTable const *src, struct VTable *dst, const char *name, bool reorder );
+
+
+/* Release
+ *  called by table at end of copy
+ */
+void TablePairRelease ( TablePair *self, const ctx_t *ctx );
+
+/* Duplicate
+ */
+TablePair *TablePairDuplicate ( TablePair *self, const ctx_t *ctx );
+
+
+/* Copy
+ *  copy from source to destination table
+ */
+void TablePairCopy ( TablePair *self, const ctx_t *ctx );
+
+
+/* PreExplode
+ *  perform explosion before overall coopy
+ */
+#define TablePairPreExplode( self, ctx ) \
+    POLY_DISPATCH_VOID ( pre_explode, self, TBLPAIR_IMPL, ctx )
+
+
+/* Explode
+ *  probably a bad name, but it is intended to mean
+ *  register all enclosed columns
+ *  and create a proper pair of KMetadata
+ */
+void TablePairExplode ( TablePair *self, const ctx_t *ctx );
+
+
+/* AddColumnPair
+ *  called from implementations
+ */
+void TablePairAddColumnPair ( TablePair *self, const ctx_t *ctx, struct ColumnPair *col );
+
+
+/* PreCopy
+ * PostCopy
+ *  give table a chance to prepare and cleanup
+ */
+#define TablePairPreCopy( self, ctx ) \
+    POLY_DISPATCH_VOID ( pre_copy, self, TBLPAIR_IMPL, ctx )
+#define TablePairPostCopy( self, ctx ) \
+    POLY_DISPATCH_VOID ( post_copy, self, TBLPAIR_IMPL, ctx )
+
+
+/* GetRowSetIterator
+ *  returns an iterator for copying
+ */
+#define TablePairGetRowSetIterator( self, ctx, mapped, large ) \
+    POLY_DISPATCH_PTR ( get_rowset_iter, self, TBLPAIR_IMPL, ctx, mapped, large )
+
+
+/* Init
+ */
+void TablePairInit ( TablePair *self, const ctx_t *ctx, const TablePair_vt *vt,
+    struct VTable const *src, struct VTable *dst,
+    const char *name, const char *opt_full_spec, bool reorder );
+
+/* Destroy
+ */
+void TablePairDestroy ( TablePair *self, const ctx_t *ctx );
+
+
+#endif /* _h_sra_sort_tbl_pair_ */
diff --git a/tools/sra-sort/xcheck-ref-align.c b/tools/sra-sort/xcheck-ref-align.c
new file mode 100644
index 0000000..4a0288b
--- /dev/null
+++ b/tools/sra-sort/xcheck-ref-align.c
@@ -0,0 +1,411 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "caps.h"
+#include "ctx.h"
+#include "mem.h"
+#include "except.h"
+#include "status.h"
+
+#include <kapp/main.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <vdb/vdb-priv.h>
+#include <kproc/thread.h>
+#include <klib/rc.h>
+
+#include <string.h>
+
+#if ! _DEBUGGING
+#define USE_BGTHREAD 1
+#endif
+
+FILE_ENTRY ( xcheck-ref-align );
+
+
+/*--------------------------------------------------------------------------
+ * TestReferenceCell
+ *  properly sorted tables will allow both columns to be walked.
+ *  each row of the REFERENCE table column MUST contain zero or more
+ *  sequential integers, and the first integer MUST continue the sequence
+ *  established by previous rows. therefore, the row will be fully specified
+ *  by a start and stop id pair.
+ */
+static
+int64_t TestReferenceCell ( const ctx_t *ctx,
+    const VCursor *ref_curs, uint32_t align_ids_idx,
+    const char *align_name, int64_t ref_row_id, int64_t excl_ref_last_idx )
+{
+    FUNC_ENTRY ( ctx );
+
+    const int64_t *cell;
+    uint32_t elem_bits, boff, row_len;
+
+    rc_t rc = VCursorCellDataDirect ( ref_curs, ref_row_id, align_ids_idx,
+        & elem_bits, ( const void** ) & cell, & boff, & row_len );
+    if ( rc != 0 )
+        ERROR ( rc, "VCursorCellDataDirect - failed to read row %ld from REFERENCE cursor", ref_row_id );
+    else if ( elem_bits != sizeof * cell * 8 )
+    {
+        rc = RC ( rcExe, rcIndex, rcValidating, rcSize, rcIncorrect );
+        ERROR ( rc, "VCursorCellDataDirect - elem_bits of %u reading row %ld from REFERENCE cursor", elem_bits, ref_row_id );
+    }
+    else if ( boff != 0 )
+    {
+        rc = RC ( rcExe, rcIndex, rcValidating, rcOffset, rcIncorrect );
+        ERROR ( rc, "VCursorCellDataDirect - bit offset of %u reading row %ld from REFERENCE cursor", boff, ref_row_id );
+    }
+    else
+    {
+        uint32_t i;
+        for ( i = 0; i < row_len; ++ i )
+        {
+            if ( cell [ i ] != excl_ref_last_idx + i )
+            {
+                rc = RC ( rcExe, rcIndex, rcValidating, rcId, rcIncorrect );
+                ERROR ( rc, "REFERENCE.%s_IDS.%ld: expected id %ld but found %ld",
+                        align_name, ref_row_id, excl_ref_last_idx + i, cell [ i ] );
+                break;
+            }
+        }
+
+        excl_ref_last_idx += row_len;
+    }
+
+    return excl_ref_last_idx;
+}
+
+static
+void TestAlignCell ( const ctx_t *ctx,
+    const VCursor *align_curs, uint32_t ref_id_idx,
+    const char *align_name, int64_t align_row_id, int64_t ref_row_id )
+{
+    FUNC_ENTRY ( ctx );
+
+    const int64_t *cell;
+    uint32_t elem_bits, boff, row_len;
+
+
+    rc_t rc = VCursorCellDataDirect ( align_curs, align_row_id, ref_id_idx,
+        & elem_bits, ( const void** ) & cell, & boff, & row_len );
+    if ( rc != 0 )
+        ERROR ( rc, "VCursorCellDataDirect - failed to read row %ld from %s cursor", align_row_id, align_name );
+    else if ( elem_bits != sizeof * cell * 8 )
+    {
+        rc = RC ( rcExe, rcIndex, rcValidating, rcSize, rcIncorrect );
+        ERROR ( rc, "VCursorCellDataDirect - elem_bits of %u reading row %ld from %s cursor", elem_bits, align_row_id, align_name );
+    }
+    else if ( boff != 0 )
+    {
+        rc = RC ( rcExe, rcIndex, rcValidating, rcOffset, rcIncorrect );
+        ERROR ( rc, "VCursorCellDataDirect - bit offset of %u reading row %ld from %s cursor", boff, align_row_id, align_name );
+    }
+    else if ( row_len != 1 )
+    {
+        rc = RC ( rcExe, rcIndex, rcValidating, rcRange, rcIncorrect );
+        ERROR ( rc, "VCursorCellDataDirect - row_len of %u reading row %ld from %s cursor", row_len, align_row_id, align_name );
+    }
+    else if ( * cell != ref_row_id )
+    {
+        rc = RC ( rcExe, rcIndex, rcValidating, rcId, rcIncorrect );
+        ERROR ( rc, "%s.REF_ID.%ld: expected id %ld but found %ld",
+                align_name, align_row_id, ref_row_id, cell [ 0 ] );
+    }
+}
+
+/*--------------------------------------------------------------------------
+ * CrossCheckRefAlignCols
+ *  performs the cross-check
+ */
+static
+void CrossCheckRefAlignCols ( const ctx_t *ctx,
+    const VCursor *ref_curs, uint32_t align_ids_idx,
+    const VCursor *align_curs, uint32_t ref_id_idx, const char *align_name )
+{
+    FUNC_ENTRY ( ctx );
+
+    int64_t ref_row_id, excl_ref_last_id;
+    rc_t rc = VCursorIdRange ( ref_curs, 0, & ref_row_id, ( uint64_t* ) & excl_ref_last_id );
+    if ( rc != 0 )
+        INTERNAL_ERROR ( rc, "VCursorIdRange - failed to establish row range on REFERENCE cursor" );
+    else
+    {
+        int64_t align_row_id, excl_align_last_id;
+
+        excl_ref_last_id += ref_row_id;
+
+        rc = VCursorIdRange ( align_curs, 0, & align_row_id, ( uint64_t* ) & excl_align_last_id );
+        if ( rc != 0 )
+            INTERNAL_ERROR ( rc, "VCursorIdRange - failed to establish row range on %s cursor", align_name );
+        else
+        {
+            int64_t excl_last_align_idx;
+
+            excl_align_last_id += align_row_id;
+
+            for ( excl_last_align_idx = 1; ref_row_id < excl_ref_last_id; ++ ref_row_id )
+            {
+                int64_t first_align_idx = excl_last_align_idx;
+
+                /* rule for bailing out */
+                rc = Quitting ();
+                if ( rc != 0 || FAILED () )
+                    break;
+
+                /* the REFERENCE id cell should be filled purely with sequential ids */
+                TRY ( excl_last_align_idx = TestReferenceCell ( ctx, ref_curs, align_ids_idx,
+                          align_name, ref_row_id, excl_last_align_idx ) )
+                {
+                    /* the ids must be within the range of the alignment table */
+                    if ( excl_last_align_idx > excl_align_last_id )
+                    {
+                        rc = RC ( rcExe, rcIndex, rcValidating, rcId, rcExcessive );
+                        ERROR ( rc, "REFERENCE.%s_IDS.%ld: references non-existant rows ( %ld .. %ld : max %ld )",
+                                align_name, ref_row_id, first_align_idx, excl_last_align_idx, excl_align_last_id );
+                        break;
+                    }
+
+                    /* this is more of a permanent assert */
+                    if ( first_align_idx != align_row_id )
+                    {
+                        rc = RC ( rcExe, rcIndex, rcValidating, rcId, rcIncorrect );
+                        ERROR ( rc, "REFERENCE.%s_IDS.%ld: expected id %ld but found %ld",
+                                align_name, ref_row_id, first_align_idx, align_row_id );
+                        break;
+                    }
+
+                    /* each of the rows in alignment table must point back
+                       to the same row in the REFERENCE table */
+                    for ( ; align_row_id < excl_last_align_idx; ++ align_row_id )
+                    {
+                        ON_FAIL ( TestAlignCell ( ctx, align_curs, ref_id_idx,
+                                      align_name, align_row_id, ref_row_id ) )
+                            break;
+                    }
+                }
+            }
+
+            /* at this point, we must have seen every record */
+            if ( ! FAILED () )
+            {
+                if ( ref_row_id != excl_ref_last_id )
+                {
+                    rc = RC ( rcExe, rcIndex, rcValidating, rcRange, rcIncomplete );
+                    ERROR ( rc, "REFERENCE.%s_IDS: scan stopped on row %ld of %ld",
+                            align_name, ref_row_id, excl_ref_last_id );
+                }
+                if ( align_row_id != excl_align_last_id )
+                {
+                    rc = RC ( rcExe, rcIndex, rcValidating, rcRange, rcIncomplete );
+                    ERROR ( rc, "%s.REF_ID: scan stopped on row %ld of %ld",
+                            align_name, align_row_id, excl_align_last_id );
+                }
+            }
+        }
+    }
+}
+
+
+
+/*--------------------------------------------------------------------------
+ * CrossCheckRefAlignCurs
+ *  adds columns and opens cursors
+ */
+static
+void CrossCheckRefAlignCurs ( const ctx_t *ctx,
+    const VCursor *ref_curs, const VCursor *align_curs, const char *align_name )
+{
+    FUNC_ENTRY ( ctx );
+
+    uint32_t align_ids_idx;
+    rc_t rc = VCursorAddColumn ( ref_curs, & align_ids_idx, "%s_IDS", align_name );
+    if ( rc != 0 )
+        INTERNAL_ERROR ( rc, "VCursorAddColumn - failed to add column '%s_IDS' to REFERENCE cursor", align_name );
+    else
+    {
+        uint32_t ref_id_idx;
+        rc = VCursorAddColumn ( align_curs, & ref_id_idx, "REF_ID" );
+        if ( rc != 0 )
+            INTERNAL_ERROR ( rc, "VCursorAddColumn - failed to add column 'REF_ID' to %s cursor", align_name );
+        else
+        {
+            rc = VCursorOpen ( ref_curs );
+            if ( rc != 0 )
+                INTERNAL_ERROR ( rc, "VCursorOpen - failed to open cursor on REFERENCE table" );
+            else
+            {
+                rc = VCursorOpen ( align_curs );
+                if ( rc != 0 )
+                    INTERNAL_ERROR ( rc, "VCursorOpen - failed to open cursor on %s table", align_name );
+                else
+                {
+                    rc = VCursorSetRowId ( ref_curs, 1 );
+                    if ( rc != 0 )
+                        INTERNAL_ERROR ( rc, "VCursorSetRowId - failed to set row-id on REFERENCE cursor" );
+                    else
+                    {
+                        rc = VCursorSetRowId ( align_curs, 1 );
+                        if ( rc != 0 )
+                            INTERNAL_ERROR ( rc, "VCursorSetRowId - failed to set row-id on %s cursor", align_name );
+                        else
+                        {
+                            CrossCheckRefAlignCols ( ctx, ref_curs, align_ids_idx, align_curs, ref_id_idx, align_name );
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+
+
+/*--------------------------------------------------------------------------
+ * CrossCheckRefAlignTbl
+ *  checks REFERENCE.<name>_IDS for properly sorted form
+ *  runs a cross-check of REFERENCE.<name>_IDS against <name>.REF_ID
+ */
+static
+void CrossCheckRefAlignTblInt ( const ctx_t *ctx,
+    const VTable *ref_tbl, const VTable *align_tbl, const char *align_name )
+{
+    FUNC_ENTRY ( ctx );
+
+    rc_t rc;
+    const VCursor *ref_curs;
+
+    rc = VTableCreateCursorRead ( ref_tbl, & ref_curs );
+    if ( rc != 0 )
+        INTERNAL_ERROR ( rc, "VTableCreateCursorRead - failed to open cursor on REFERENCE table" );
+    else
+    {
+        const VCursor *align_curs;
+        rc = VTableCreateCursorRead ( align_tbl, & align_curs );
+        if ( rc != 0 )
+            INTERNAL_ERROR ( rc, "VTableCreateCursorRead - failed to open cursor on %s table", align_name );
+        else
+        {
+            rc = VCursorLinkedCursorSet(align_curs,"REFERENCE",ref_curs);
+            if ( rc != 0 )
+                INTERNAL_ERROR ( rc, "VCursorLinkedCursorSet - failed to link cursor on REFERENCE table" );
+            else
+            {
+                CrossCheckRefAlignCurs ( ctx, ref_curs, align_curs, align_name );
+            }
+
+            VCursorRelease ( align_curs );
+        }
+
+        VCursorRelease ( ref_curs );
+    }
+}
+
+#if USE_BGTHREAD
+
+typedef struct CrossCheckRefAlignTblData CrossCheckRefAlignTblData;
+struct CrossCheckRefAlignTblData
+{
+    Caps caps;
+    const VTable *ref_tbl, *align_tbl;
+    char align_name [ 1 ];
+};
+
+static
+rc_t CC CrossCheckRefAlignTblRun ( const KThread *self, void *data )
+{
+    CrossCheckRefAlignTblData *pb = data;
+
+    DECLARE_CTX_INFO ();
+    ctx_t thread_ctx = { & pb -> caps, NULL, & ctx_info };
+    const ctx_t *ctx = & thread_ctx;
+
+    STATUS ( 2, "running consistency-check on background thread" );
+
+    CrossCheckRefAlignTblInt ( ctx, pb -> ref_tbl, pb -> align_tbl, pb -> align_name );
+
+    STATUS ( 2, "finished consistency-check on background thread" );
+
+    VTableRelease ( pb -> align_tbl );
+    VTableRelease ( pb -> ref_tbl );
+    CapsWhack ( & pb -> caps, ctx );
+
+    return ctx -> rc;
+}
+
+#endif
+
+void CrossCheckRefAlignTbl ( const ctx_t *ctx,
+    const VTable *ref_tbl, const VTable *align_tbl, const char *align_name )
+{
+    FUNC_ENTRY ( ctx );
+
+#if USE_BGTHREAD
+    size_t name_len;
+    CrossCheckRefAlignTblData *pb;
+#endif
+
+    STATUS ( 2, "consistency-check on join indices between REFERENCE and %s tables", align_name );
+
+#if USE_BGTHREAD
+    name_len = strlen ( align_name );
+    TRY ( pb = MemAlloc ( ctx, sizeof * pb + name_len, false ) )
+    {
+        TRY ( CapsInit ( & pb -> caps, ctx ) )
+        {
+            rc_t rc = VTableAddRef ( pb -> ref_tbl = ref_tbl );
+            if ( rc != 0 )
+                ERROR ( rc, "VTableAddRef failed on REFERENCE table" );
+            else
+            {
+                rc = VTableAddRef ( pb -> align_tbl = align_tbl );
+                if ( rc != 0 )
+                    ERROR ( rc, "VTableAddRef failed on %s table", align_name );
+                else
+                {
+                    KThread *t;
+
+                    strcpy ( pb -> align_name, align_name );
+
+                    rc = KThreadMake ( & t, CrossCheckRefAlignTblRun, pb );
+                    if ( rc == 0 )
+                    {
+                        return;
+                    }
+
+                    VTableRelease ( pb -> align_tbl );
+                }
+
+                VTableRelease ( pb -> ref_tbl );
+            }
+
+            CapsWhack ( & pb -> caps, ctx );
+        }
+
+        MemFree ( ctx, pb, sizeof * pb + name_len );
+    }
+#else
+    CrossCheckRefAlignTblInt ( ctx, ref_tbl, align_tbl, align_name );
+#endif
+}
diff --git a/tools/sra-sort/xcheck.h b/tools/sra-sort/xcheck.h
new file mode 100644
index 0000000..adf44c5
--- /dev/null
+++ b/tools/sra-sort/xcheck.h
@@ -0,0 +1,49 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_sra_sort_xcheck_
+#define _h_sra_sort_xcheck_
+
+#ifndef _h_sra_sort_defs_
+#include "sort-defs.h"
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct VTable;
+
+
+/*--------------------------------------------------------------------------
+ * CrossCheckRefAlignTbl
+ *  checks REFERENCE.<name>_IDS for properly sorted form
+ *  runs a cross-check of REFERENCE.<name>_IDS against <name>.REF_ID
+ */
+void CrossCheckRefAlignTbl ( const ctx_t *ctx,
+    struct VTable const *ref_tbl, struct VTable const *align_tbl, const char *align_name );
+
+#endif
diff --git a/tools/sra-stat/Makefile b/tools/sra-stat/Makefile
new file mode 100644
index 0000000..65cceea
--- /dev/null
+++ b/tools/sra-stat/Makefile
@@ -0,0 +1,80 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/sra-stat
+
+INT_TOOLS =
+
+EXT_TOOLS = \
+	sra-stat \
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# sra-stat
+#  sra statistics
+#
+SRASTAT_SRC = \
+	sra \
+	sra-stat \
+
+SRASTAT_OBJ = \
+	$(addsuffix .$(OBJX),$(SRASTAT_SRC))
+
+SRASTAT_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+	-sload \
+	-lm \
+
+$(BINDIR)/sra-stat: $(SRASTAT_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(SRASTAT_LIB)
+
diff --git a/tools/sra-stat/sra-stat.c b/tools/sra-stat/sra-stat.c
new file mode 100644
index 0000000..eba31e3
--- /dev/null
+++ b/tools/sra-stat/sra-stat.c
@@ -0,0 +1,3634 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "sra-stat.h" /* VTableMakeSingleFileArchive_ */
+
+#include <insdc/sra.h> /* SRA_READ_TYPE_BIOLOGICAL */
+
+#include <kapp/log-xml.h> /* XMLLogger */
+#include <kapp/main.h>
+#include <kapp/progressbar.h> /* KLoadProgressbar */
+
+#include <kdb/database.h> /* KDatabase */
+#include <kdb/kdb-priv.h>
+#include <kdb/manager.h> /* KDBManager */
+#include <kdb/meta.h> /* KMetadata */
+#include <kdb/namelist.h> /* KMDataNodeListChild */
+#include <kdb/table.h>
+
+#include <kfs/directory.h> /* KDirectory */
+#include <kfs/file.h> /* KFile */
+
+#include <klib/checksum.h>
+#include <klib/container.h>
+#include <klib/debug.h> /* DBGMSG */
+#include <klib/log.h> /* LOGERR */
+#include <klib/namelist.h>
+#include <klib/out.h>
+#include <klib/printf.h>
+#include <klib/rc.h>
+#include <klib/sort.h> /* ksort */
+
+#include <sra/sraschema.h> /* VDBManagerMakeSRASchema */
+
+#include <vdb/cursor.h> /* VCursor */
+#include <vdb/database.h> /* VDatabaseRelease */
+#include <vdb/dependencies.h> /* VDBDependencies */
+#include <vdb/manager.h> /* VDBManager */
+#include <vdb/schema.h> /* VSchema */
+#include <vdb/table.h> /* VTableRelease */
+#include <vdb/vdb-priv.h> /* VDBManagerGetKDBManagerRead */
+
+#include <vfs/manager.h> /* VFSManager */
+#include <vfs/path.h> /* VPath */
+#include <vfs/resolver.h> /* VResolver */
+
+#include <os-native.h> /* strtok_r on Windows */
+
+#include <assert.h>
+#include <math.h> /* sqrt */
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+/* #include <stdio.h> */ /* stderr */
+
+#define DISP_RC(rc, msg) (void)((rc == 0) ? 0 : LOGERR(klogInt, rc, msg))
+
+#define DISP_RC2(rc, name, msg) (void)((rc == 0) ? 0 : \
+    PLOGERR(klogInt, (klogInt, rc, \
+        "$(name): $(msg)", "name=%s,msg=%s", name, msg)))
+
+#define DISP_RC_Read(rc, name, spot, msg) (void)((rc == 0) ? 0 : \
+    PLOGERR(klogInt, (klogInt, rc, "column $(name), spot $(spot): $(msg)", \
+        "name=%s,spot=%lu,msg=%s", name, spot, msg)))
+
+#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
+    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
+
+#define MAX_NREADS 2*1024
+
+#define DEFAULT_CURSOR_CAPACITY (1024*1024*1024UL)
+
+/********** _XMLLogger_Encode : copied from kapp/log-xml.c (-lload) ***********/
+
+static
+rc_t CC _XMLLogger_Encode(const char* src,
+    char* aDst, size_t dst_sz, size_t *num_writ)
+{
+    rc_t rc = 0;
+    size_t bytes;
+    const char* p;
+    char* dst = aDst;
+
+    assert(src != NULL && num_writ != NULL);
+
+    *num_writ = 0;
+    if( *src == '\0' ) {
+        *dst = *src;
+    } else {
+        do {
+            switch(*src) {
+                case '\'':
+                    bytes = 6;
+                    p = "'";
+                    break;
+                case '"':
+                    bytes = 6;
+                    p = """;
+                    break;
+                case '&':
+                    bytes = 5;
+                    p = "&";
+                    break;
+                case '<':
+                    bytes = 4;
+                    p = "<";
+                    break;
+                case '>':
+                    bytes = 4;
+                    p = ">";
+                    break;
+                default:
+                    bytes = 1;
+                    p = src;
+                    break;
+            }
+            if( (*num_writ + bytes) > dst_sz ) {
+                rc = RC(rcExe, rcLog, rcEncoding, rcBuffer, rcInsufficient);
+            } else {
+                memcpy(dst, p, bytes);
+                *num_writ = *num_writ + bytes;
+                dst += bytes;
+            }
+        } while(rc == 0 && *++src != '\0');
+        if (rc == 0 && *src == '\0' && ((*num_writ + bytes) <= dst_sz)) {
+            *dst = *src;
+        }
+    }
+    return rc;
+}
+
+/*********** XMLLogger_Encode : copied from kapp/log-xml.c (-lload) ***********/
+
+typedef struct BAM_HEADER_RG { /* @RG: Read group. */
+    char* ID; /* Read group identifier. */
+    char* LB; /* Library. */
+    char* SM; /* Sample. */
+} BAM_HEADER_RG;
+static
+rc_t BAM_HEADER_RG_copy(BAM_HEADER_RG* dest, const BAM_HEADER_RG* src)
+{
+    assert(dest && !dest->ID && !dest->LB && !dest->SM
+        && src  &&  src ->ID &&  src ->LB &&  src ->SM);
+
+    dest->ID = strdup(src->ID);
+    dest->LB = strdup(src->LB);
+    dest->SM = strdup(src->SM);
+
+    if (!dest->ID || !dest->LB || !dest->SM) {
+        return RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+    }
+
+    return 0;
+}
+
+static void BAM_HEADER_RG_free(BAM_HEADER_RG* rg) {
+    assert(rg);
+
+    free(rg->ID);
+    free(rg->LB);
+    free(rg->SM);
+
+    rg->ID = rg->LB = rg->SM = NULL;
+}
+
+static void BAM_HEADER_RG_print_xml(const BAM_HEADER_RG* rg) {
+    rc_t rc = 0;
+    char library[1024] = "";
+    char sample[1024] = "";
+    char* l = library;
+    char* s = sample;
+    size_t num_writ = 0;
+
+    assert(rg);
+
+    if (rg->LB) {
+        rc = _XMLLogger_Encode(rg->LB, library, sizeof library, &num_writ);
+        if (rc != 0) {
+            l = rg->LB;
+            PLOGMSG(klogWarn, (klogWarn, "Library value is too long: "
+                "XML-safe conversion was disabled for @RG\tID:$(ID)\tLB:$(LB)"
+                "ID=%s,LB=%s", rg->ID, rg->LB));
+        }
+
+        OUTMSG((" library=\"%s\"", l ? l : ""));
+    }
+
+    if (rg->SM) {
+        rc = _XMLLogger_Encode(rg->SM, sample, sizeof sample, &num_writ);
+        if (rc != 0) {
+            s = rg->SM;
+            PLOGMSG(klogWarn, (klogWarn, "Sample value is too long: "
+                "XML-safe conversion was disabled for @RG\tID:$(ID)\tSM:$(SM)"
+                "ID=%s,SM=%s", rg->ID, rg->SM));
+        }
+
+        OUTMSG((" sample=\"%s\"" , s ? s : ""));
+    }
+}
+
+typedef struct SraStats {
+    BSTNode n;
+    char     spot_group[1024]; /* SPOT_GROUP Column */
+    uint64_t spot_count; /*** spot count ***/
+    uint64_t spot_count_mates; /*** spots with mates ***/
+    uint64_t bio_len; /** biological len (BIO_BASE_COUNT) **/
+    uint64_t bio_len_mates; /** biological len when mates are present**/
+    uint64_t total_len; /** total len (BASE_COUNT) **/
+    uint64_t bad_spot_count; /** number of spots flagged with rd_filter=2 **/
+    uint64_t bad_bio_len;        /** biological length of bad spots ***/
+    uint64_t filtered_spot_count; /* number of spots flagged with rd_filter=2 */
+    uint64_t filtered_bio_len;   /** biological length of filtered spots **/
+    uint64_t total_cmp_len; /* CMP_READ : compressed */
+    BAM_HEADER_RG BAM_HEADER;
+} SraStats;
+typedef struct Statistics {  /* READ_LEN columnn */
+    /* average READ_LEN value */
+    /* READ_LEN standard deviation. Is calculated just when requested. */
+    /* running (continuous) standard deviation */
+
+    int64_t n; /* number of values */
+    double a; /* the mean value */
+    double q; /* Qi = Q[i-1] + (Xi - A[i-1])(Xi - Ai) */
+
+    bool variable; /* variable or fixed value */
+    double prev_val;
+} Statistics;
+typedef struct Statistics2 {
+    int n;
+    double average;
+    double diff_sq_sum;
+} Statistics2;
+static
+void Statistics2Init(Statistics2* self, double sum, int64_t  count)
+{
+    assert(self);
+
+    if (count) {
+        self->average = sum / count;
+    }
+}
+
+static void Statistics2Add(Statistics2* self, double value) {
+    double diff = 0;
+
+    assert(self);
+
+    ++self->n;
+
+    diff = value - self->average;
+    self->diff_sq_sum += diff * diff;
+}
+
+static void Statistics2Print(const Statistics2* selfs,
+    uint32_t nreads, const char* indent,
+
+     /* the same as in <Statistics: just to make <Statistics> and <Statistics2>
+        look the same */
+    uint64_t spot_count)
+{
+    int i = 0;
+
+    if (nreads) {
+        assert(selfs && indent);
+    }
+
+    OUTMSG(("%s<Statistics2 nreads=\"%u\" nspots=\"%lu\">\n",
+        indent, nreads, spot_count));
+
+    for (i = 0; i < nreads; ++i) {
+        double dev = 0;
+        const Statistics2* stats = selfs + i;
+        double avr = stats->average;
+        if (stats->n > 0) {
+            dev = sqrt(stats->diff_sq_sum / stats->n);
+        }
+
+        OUTMSG(("%s  "
+            "<Read index=\"%d\" count=\"%ld\" average=\"%f\" stdev=\"%f\"/>\n",
+            indent, i, stats->n, avr, dev));
+    }
+
+    OUTMSG(("%s</Statistics2>\n", indent));
+}
+
+static bool columnUndefined(rc_t rc) {
+    return rc == SILENT_RC(rcVDB, rcCursor, rcOpening , rcColumn, rcUndefined)
+        || rc == SILENT_RC(rcVDB, rcCursor, rcUpdating, rcColumn, rcNotFound );
+}
+
+typedef struct {
+    uint64_t cnt[5];
+    bool CS_NATIVE;
+    const VCursor   *curs;
+    uint32_t         idx;
+
+    bool finalized;
+} Bases;
+
+static rc_t BasesInit(Bases *self, const VTable *vtbl) {
+    rc_t rc = 0;
+
+    assert(self);
+    memset(self, 0, sizeof *self);
+
+    if (rc == 0) {
+        const char name[] = "CS_NATIVE";
+        const void *base = NULL;
+
+        const VCursor *curs = NULL;
+        uint32_t idx = 0;
+
+        self->CS_NATIVE = true;
+
+        rc = VTableCreateCachedCursorRead(vtbl, &curs, DEFAULT_CURSOR_CAPACITY);
+        DISP_RC(rc, "Cannot VTableCreateCachedCursorRead");
+
+        if (rc == 0) {
+            rc = VCursorPermitPostOpenAdd(curs);
+            DISP_RC(rc, "Cannot VCursorPermitPostOpenAdd");
+        }
+
+        if (rc == 0) {
+            rc = VCursorOpen(curs);
+            DISP_RC(rc, "Cannot VCursorOpen");
+        }
+
+        if (rc == 0) {
+            rc = VCursorAddColumn(curs, &idx, "%s", name);
+            if (rc != 0) {
+                if (columnUndefined(rc)) {
+                    self->CS_NATIVE = false;
+                    rc = 0;
+                }
+                else {
+                    DISP_RC(rc, "Cannot VCursorAddColumn(CS_NATIVE)");
+                }
+            }
+            else {
+                bitsz_t boff = ~0;
+                bitsz_t row_bits = ~0;
+
+                uint32_t elem_bits = 0, elem_off = 0, elem_cnt = 0;
+                rc = VCursorCellDataDirect(curs, 1, idx,
+                    &elem_bits, &base, &elem_off, &elem_cnt);
+                boff     = elem_off * elem_bits;
+                row_bits = elem_cnt * elem_bits;
+
+                if (boff != 0 || row_bits != 8) {
+                    rc = RC(rcExe, rcColumn, rcReading, rcData, rcInvalid);
+                    PLOGERR(klogInt, (klogErr, rc, "invalid boff or row_bits "
+                        "while VCursorCellDataDirect($(name))",
+                        "name=%s", name));
+                }
+
+                if (rc == 0) {
+                    self->CS_NATIVE = *((bool*)base);
+                }
+
+            }
+        }
+
+        RELEASE(VCursor, curs);
+    }
+
+    {
+        const char *name = self->CS_NATIVE ? "CSREAD" : "READ";
+        const char *datatype
+            = self->CS_NATIVE ? "INSDC:x2cs:bin" : "INSDC:x2na:bin";
+        rc = VTableCreateCachedCursorRead(vtbl, &self->curs, DEFAULT_CURSOR_CAPACITY);
+        DISP_RC(rc, "Cannot VTableCreateCachedCursorRead");
+        if (rc == 0) {
+            rc = VCursorAddColumn(self->curs,
+                &self->idx, "(%s)%s", datatype, name);
+            if (rc != 0) {
+                PLOGERR(klogInt, (klogInt, rc,
+                    "Cannot VCursorAddColumn(($(type)),$(name)",
+                    "type=%s,name=%s", datatype, name));
+            }
+        }
+        if (rc == 0) {
+            rc = VCursorOpen(self->curs);
+            if (rc != 0) {
+                PLOGERR(klogInt, (klogInt, rc,
+                    "Cannot VCursorOpen(($(type)),$(name)))",
+                    "type=%s,name=%s", datatype, name));
+            }
+        }
+    }
+
+    return rc;
+}
+
+static void BasesFinalize(Bases *self) {
+    assert(self);
+
+    if (self->curs == NULL) {
+        LOGMSG(klogInfo, "Bases statistics will not be printed : "
+            "READ cursor was not opened during BasesFinalize()");
+        return;
+    }
+
+    self->finalized = true;
+}
+
+static rc_t BasesRelease(Bases *self) {
+    rc_t rc = 0;
+
+    assert(self);
+
+    RELEASE(VCursor  , self->curs);
+
+    return rc;
+}
+
+static void BasesAdd(Bases *self, int64_t spotid) {
+    rc_t rc = 0;
+    const void *base = NULL;
+    bitsz_t row_bits = ~0;
+    bitsz_t i = ~0;
+    const unsigned char *bases = NULL;
+
+    assert(self);
+
+    if (self->curs == NULL) {
+        return;
+    }
+
+    {
+        uint32_t elem_bits = 0, elem_off = 0, elem_cnt = 0;
+        rc = VCursorCellDataDirect(self->curs, spotid, self->idx,
+            &elem_bits, &base, &elem_off, &elem_cnt);
+        if (rc != 0) {
+            PLOGERR(klogInt, (klogErr, rc,
+                "while VCursorCellDataDirect(READ, $(type))",
+                "type=%s", self->CS_NATIVE ? "CS_NATIVE" : "not CS_NATIVE"));
+            BasesRelease(self);
+            return;
+        }
+
+        row_bits = elem_cnt * elem_bits;
+    }
+
+    if ((row_bits % 8) != 0) {
+        rc = RC(rcExe, rcColumn, rcReading, rcData, rcInvalid);
+        PLOGERR(klogInt, (klogErr, rc, "Invalid row_bits '$(row_bits) "
+            "while VCursorCellDataDirect(READ, $(type), spotid=$(spotid))",
+            "row_bits=%lu,type=%s,spotid=%lu",
+            row_bits, self->CS_NATIVE ? "CS_NATIVE" : "not CS_NATIVE", spotid));
+        BasesRelease(self);
+        return;
+    }
+
+    row_bits /= 8;
+    bases = base;
+    for (i = 0; i < row_bits; ++i) {
+        unsigned char base = bases[i];
+        if (base > 4) {
+            rc = RC(rcExe, rcColumn, rcReading, rcData, rcInvalid);
+            PLOGERR(klogInt, (klogErr, rc,
+                "Invalid READ column value '$(base) while VCursorCellDataDirect"
+                "($(type), spotid=$(spotid), index=$(i))",
+                "base=%d,type=%s,spotid=%lu,index=%lu",
+                base, self->CS_NATIVE ? "CS_NATIVE" : "not CS_NATIVE",
+                spotid, i));
+            BasesRelease(self);
+            return;
+        }
+        ++self->cnt[base];
+    }
+}
+
+static rc_t BasesPrint(const Bases *self,
+    uint64_t base_count, const char* indent)
+{
+    rc_t rc = 0;
+
+    const char tag[] = "Bases";
+    const char *name = NULL;
+    int i = ~0;
+
+    assert(self);
+
+    if (!self->finalized) {
+        LOGMSG(klogInfo, "Bases statistics will not be printed : "
+            "Bases object was not finalized during BasesPrint()");
+        return rc;
+    }
+
+    name = self->CS_NATIVE ? "0123." : "ACGTN";
+
+    OUTMSG(("%s<%s cs_native=\"%s\" count=\"%lu\">\n",
+        indent, tag, self->CS_NATIVE ? "true" : "false", base_count));
+
+    for (i = 0; i < 5; ++i) {
+        OUTMSG(("%s  <Base value=\"%c\" count=\"%lu\"/>\n",
+            indent, name[i], self->cnt[i]));
+    }
+
+    OUTMSG(("%s</%s>\n", indent, tag));
+
+    if (self->cnt[0] + self->cnt[1] + self->cnt[2] +
+        self->cnt[3] + self->cnt[4] != base_count)
+    {
+        rc = RC(rcExe, rcNumeral, rcComparing, rcData, rcInvalid);
+        LOGERR(klogErr, rc, "stored base count did not match observed base count");
+    }
+
+    return rc;
+}
+
+typedef struct {
+    uint64_t spot_count;
+    uint64_t spot_count_mates;
+    uint64_t BIO_BASE_COUNT; /* bio_len */
+    uint64_t bio_len_mates;
+    uint64_t BASE_COUNT; /* total_len */
+    uint64_t bad_spot_count;
+    uint64_t bad_bio_len;
+    uint64_t filtered_spot_count;
+    uint64_t filtered_bio_len;
+    uint64_t total_cmp_len; /* CMP_READ : compressed */
+
+    bool variable_nreads;
+    uint32_t nreads; /* if (nreads == 0) then (nreads is variable) */
+    Statistics * stats ; /* nreads elements */
+    Statistics2* stats2; /* nreads elements */
+
+    Bases bases_count;
+} SraStatsTotal;
+static
+rc_t SraStatsTotalMakeStatistics(SraStatsTotal* self, uint32_t nreads)
+{
+    assert(self);
+
+    if (nreads == 0) {
+        return 0;
+    }
+
+    assert(self->stats == NULL);
+    self->stats = calloc(nreads, sizeof *self->stats);
+    if (self->stats == NULL) {
+        return RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+    }
+
+    assert(self->stats2 == NULL);
+    self->stats2 = calloc(nreads, sizeof *self->stats2);
+    if (self->stats2 == NULL) {
+        free(self->stats);
+        self->stats = NULL;
+        return RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+    }
+
+    self->nreads = nreads;
+
+    return 0;
+}
+
+static
+void SraStatsTotalStatistics2Init(SraStatsTotal* self,
+    int nreads, uint64_t* sums, uint64_t* count)
+{
+    int i = 0;
+    assert(self);
+    if (nreads) {
+        assert(sums);
+    }
+    for (i = 0; i < nreads; ++i) {
+        uint64_t sum = sums[i];
+        Statistics2* stats = self->stats2 + i;
+        assert(stats);
+        Statistics2Init(stats, sum, count[i]);
+    }
+}
+
+static rc_t SraStatsTotalFree(SraStatsTotal* self) {
+    assert(self);
+
+    free(self->stats);
+    self->stats = NULL;
+
+    free(self->stats2);
+    self->stats2 = NULL;
+
+    BasesRelease(&self->bases_count);
+
+    self->nreads = 0;
+
+    return 0;
+}
+
+static void StatisticsAdd(Statistics* self, double value) {
+    double a_1 = 0;
+
+    /* http://en.wikipedia.org/wiki/Stdev#Rapid_calculation_methods */
+
+    assert(self);
+
+    a_1 = self->a;
+
+    if (self->n++ == 0) {
+        self->prev_val = value;
+    }
+    else if (self->prev_val != value) {
+        self->variable = true;
+    }
+
+    self->a += (value - a_1) / self->n;
+    self->q += ((double)value - a_1) * ((double)value - self->a);
+}
+
+static double StatisticsAverage(const Statistics* self) {
+    assert(self);
+
+    return self->a;
+}
+
+static double StatisticsStdev(const Statistics* self) {
+    assert(self);
+
+    if (self->n == 0) {
+        return 0;
+    }
+
+    return sqrt(self->q / self->n);
+}
+
+static
+void SraStatsTotalAdd(SraStatsTotal* self,
+    uint32_t* values, uint32_t nreads)
+{
+    int i = ~0;
+
+    assert(self && values);
+
+    if (self->nreads != nreads) {
+        self->variable_nreads = true;
+    }
+
+    if (self->variable_nreads) {
+        return;
+    }
+
+    for (i = 0; i < nreads; ++i) {
+        uint32_t value = values[i];
+        if (value > 0) {
+            Statistics* stats = self->stats + i;
+            assert(stats);
+
+            StatisticsAdd(stats, value);
+        }
+    }
+}
+
+static
+void SraStatsTotalAdd2(SraStatsTotal* self, uint32_t* values) {
+    int i = 0;
+
+    assert(self && values);
+
+    for (i = 0; i < self->nreads; ++i) {
+        uint32_t value = values[i];
+        if (value > 0) {
+            Statistics2* stats = self->stats2 + i;
+            assert(stats);
+
+            Statistics2Add(stats, value);
+        }
+    }
+}
+
+static double s_Round(double X) { return floor(X + 0.5); }
+
+static
+void print_double_or_int(const char* name, double val, bool variable) {
+    double rnd = s_Round(val);
+    assert(name);
+    if (variable) {
+        OUTMSG((" %s=\"%.2f\"", name, val));
+    }
+    else {
+        OUTMSG((" %s=\"%d\"", name, (int)rnd));
+    }
+}
+
+static void StatisticsPrint(const Statistics* selfs,
+    uint32_t nreads, const char* indent)
+{
+    int i = ~0;
+
+    if (nreads) {
+        assert(selfs && indent);
+    }
+
+    for (i = 0; i < nreads; ++i) {
+        const Statistics* stats = selfs + i;
+        double avr = StatisticsAverage(stats);
+        double dev = StatisticsStdev(stats);
+
+        OUTMSG(("%s  <Read index=\"%d\"", indent, i));
+        OUTMSG((" count=\"%ld\"", stats->n, i));
+        print_double_or_int("average", avr, stats->variable);
+        print_double_or_int("stdev"  , dev, stats->variable);
+        OUTMSG(("/>\n"));
+    }
+}
+
+static rc_t StatisticsDiff(const Statistics* ss,
+    const Statistics2* ss2, uint32_t nreads)
+{
+    rc_t rc = 0;
+
+    int i = ~0;
+
+    assert(ss && ss2);
+
+    for (i = 0; i < nreads; ++i) {
+        const Statistics * s  = ss  + i;
+        const Statistics2* s2 = ss2 + i;
+
+        double d  = StatisticsStdev(s);
+        double d2 = sqrt(s2->diff_sq_sum / s2->n);
+
+        double diff = d - d2;
+        if (diff < 0) {
+            diff = -diff;
+        }
+
+        if (diff > 1e-6) {
+              /* RC(rcExe, rcTest, rcExecuting, rcTest, rcFailed); */
+            rc = RC(rcExe, rcNumeral, rcComparing, rcData, rcInvalid);
+            DISP_RC(rc, "While comparing calculated standard deviations");
+        }
+
+        if (s->n != s2->n) {
+            rc = RC(rcExe, rcNumeral, rcComparing, rcData, rcInvalid);
+            DISP_RC(rc, "While comparing read statistics counts");
+        }
+
+        diff = StatisticsAverage(s) - s2->average;
+        if (diff < 0) {
+            diff = -diff;
+        }
+        if (diff > 1e-10) {
+              /* RC(rcExe, rcTest, rcExecuting, rcTest, rcFailed); */
+            rc = RC(rcExe, rcNumeral, rcComparing, rcData, rcInvalid);
+            DISP_RC(rc, "While comparing calculated average");
+        }
+    }
+
+    return rc;
+}
+
+static rc_t SraStatsTotalPrintStatistics(
+    const SraStatsTotal* self, const char* indent, bool test)
+{
+    rc_t rc = 0;
+
+    assert(self && indent);
+
+    OUTMSG(("%s<Statistics nreads=\"", indent));
+
+    if (self->variable_nreads) {
+        OUTMSG(("variable\"/>\n"));
+    }
+    else {
+        OUTMSG(("%u\"", self->nreads));
+        OUTMSG((" nspots=\"%lu\">\n", self->spot_count));
+        StatisticsPrint(self->stats, self->nreads, indent);
+        OUTMSG(("%s</Statistics>\n", indent));
+
+        if (test) {
+            Statistics2Print(self->stats2, self->nreads, indent,
+                self->spot_count);
+            rc = StatisticsDiff(self->stats, self->stats2, self->nreads);
+        }
+    }
+
+    return rc;
+}
+
+typedef struct srastat_parms {
+    const char* table_path;
+
+    bool xml; /* output format (txt or xml) */
+    bool printMeta;
+    bool quick; /* quick mode: stats from meta */
+    bool skip_members; /* not to print spot_group statistics */
+    bool progress;     /* show progress */
+    bool skip_alignment; /* not to print alignment info */
+    bool print_arcinfo;
+    bool statistics; /* calculate average and stdev */
+    bool test; /* test stdev */
+
+    const XMLLogger *logger;
+
+    int64_t  start, stop;
+
+    bool hasSPOT_GROUP;
+    bool variableReadLength;
+
+    SraStatsTotal total; /* is used in srastat_print */
+} srastat_parms;
+typedef struct SraStatsMeta {
+    bool found;
+    uint64_t BASE_COUNT;
+    uint64_t BIO_BASE_COUNT;
+    uint64_t CMP_BASE_COUNT; /* compressed base count when present */
+    uint64_t spot_count;
+    char* spot_group; /* optional */
+    BAM_HEADER_RG BAM_HEADER;
+} SraStatsMeta;
+typedef struct MetaDataStats {
+    bool found;
+    SraStatsMeta table;
+    uint32_t spotGroupN;
+    SraStatsMeta *spotGroup;
+} MetaDataStats;
+typedef struct SraSizeStats { uint64_t size; } SraSizeStats;
+typedef struct Formatter {
+    char name[256];
+    char vers[256];
+} Formatter;
+typedef struct Loader {
+    char date[256];
+    char name[256];
+    char vers[256];
+} Loader;
+typedef struct SraMeta {
+    uint32_t metaVersion;
+    int32_t tblVersion;
+    time_t loadTimestamp;
+    Formatter formatter;
+    Loader loader;
+} SraMeta;
+typedef struct ArcInfo_struct {
+    KTime_t timestamp;
+    struct {
+        const char* tag;
+        uint64_t size;
+        char md5[32 + 1];
+    } i[2];
+} ArcInfo;
+typedef struct Quality {
+    uint32_t value;
+    uint64_t count;
+} Quality;
+typedef struct QualityStats {
+    Quality* QUALITY;
+    size_t allocated;
+    size_t used;
+} QualityStats;
+typedef enum EMetaState {
+    eMSNotFound,
+    eMSFound
+} EMetaState;
+typedef struct Count {
+    EMetaState state;
+    uint64_t value;
+} Count;
+typedef struct Counts {
+    char* tableName;
+    EMetaState tableState;
+    EMetaState metaState;
+    Count BASE_COUNT;
+    Count SPOT_COUNT;
+} Counts;
+typedef struct TableCounts {
+    EMetaState state;
+    Counts* count;
+    size_t allocated;
+    size_t used;
+} TableCounts;
+typedef struct Ctx {
+    const BSTree* tr;
+    const MetaDataStats* meta;
+    const SraMeta* info;
+    const SraSizeStats* sizes;
+    const ArcInfo* arc_info;
+    srastat_parms* pb;
+    SraStatsTotal* total;
+    const VDatabase* db;
+    QualityStats quality;
+    TableCounts tables;
+} Ctx;
+typedef rc_t (CC * RG_callback)(const BAM_HEADER_RG* rg, const void* data);
+static
+rc_t CC meta_RG_callback(const BAM_HEADER_RG* rg, const void* data)
+{
+    rc_t rc = 0;
+
+    const MetaDataStats* meta = data;
+
+    int i = 0;
+    bool found = false;
+
+    assert(rg && meta && rg->ID);
+
+    for (i = 0; i < meta->spotGroupN && rc == 0; ++i) {
+        SraStatsMeta* ss = &meta->spotGroup[i];
+        const char* spot_group = ss->spot_group;
+
+        assert(spot_group);
+        if (strcmp(spot_group, rg->ID) == 0) {
+            rc = BAM_HEADER_RG_copy(&ss->BAM_HEADER, rg);
+            found = true;
+            break;
+        }
+    }
+
+    if (rc == 0 && !found) {
+        /* There could be Read groups that are present in the BAM_HEADER 
+        but missed in the csra. We was just ignore them. */
+    }
+
+    return rc;
+}
+
+static int64_t CC srastats_cmp(const void *item, const BSTNode *n) {
+    const char *sg = item;
+    const SraStats *ss = ( const SraStats* ) n;
+
+    return strcmp(sg,ss->spot_group);
+}
+
+static
+rc_t CC tree_RG_callback(const BAM_HEADER_RG* rg, const void* data)
+{
+    rc_t rc = 0;
+
+    const BSTree* tr = data;
+    SraStats* ss = NULL;
+
+    assert(rg && tr && rg->ID);
+
+    ss = (SraStats*) BSTreeFind(tr, rg->ID, srastats_cmp);
+    if (ss == NULL) {
+        /* There could be Read groups that are present in the BAM_HEADER 
+        but missed in the csra. We was just ignore them. */
+    }
+    else {
+        rc = BAM_HEADER_RG_copy(&ss->BAM_HEADER, rg);
+    }
+
+    return rc;
+}
+
+static int64_t CC QualityCmp(const void* s1, const void* s2, void *data) {
+    const Quality* q1 = s1;
+    const Quality* q2 = s2;
+    assert(q1 && q2);
+    return (int64_t)q1->value - (int64_t)q2->value;
+}
+
+static int64_t CC CountsCmp(const void* v1, const void* v2, void *data) {
+    const Counts* e1 = v1;
+    const Counts* e2 = v2;
+    assert(e1 && e2 && e1->tableName && e2->tableName);
+    return strcmp(e1->tableName, e2->tableName);
+}
+
+static rc_t QualityParse(Quality* self,
+    const KMDataNode* node, const char* name)
+{
+    rc_t rc = 0;
+    const char start[] = "PHRED_";
+    int i = strlen(start);
+
+    assert(self && name);
+
+    if (strlen(name) <= strlen(start)) {
+        rc = RC(rcExe, rcXmlDoc, rcParsing, rcName, rcInvalid);
+        PLOGERR(klogInt, (klogErr, rc,
+            "Bad node name: STATS/QUALITY/$(name)", "name=%s", name));
+        return rc;
+    }
+
+    self->value = 0;
+    for (; i < strlen(name); ++i) {
+        if (name[i] < '0' || name[i] > '9') {
+            rc_t rc = RC(rcExe, rcXmlDoc, rcParsing, rcName, rcInvalid);
+            PLOGERR(klogInt, (klogErr, rc,
+                "Bad node name: STATS/QUALITY/$(name)", "name=%s", name));
+            return rc;
+        }
+        self->value = self->value * 10 + name[i] - '0';
+    }
+
+    rc = KMDataNodeReadAsU64(node, &self->count);
+    if (rc != 0) {
+        PLOGERR(klogInt, (klogErr, rc,
+            "while reading the value of STATS/QUALITY/$(name)",
+            "name=%s", name));
+    }
+
+    return rc;
+}
+
+static rc_t QualityStatsRead1(QualityStats* self,
+    const KMDataNode* parent, const char* name)
+{
+    const KMDataNode* node = NULL;
+
+    rc_t rc = KMDataNodeOpenNodeRead(parent, &node, "%s", name);
+    DISP_RC2(rc, name, "while calling KMDataNodeOpenNodeRead");
+
+    if (rc == 0) {
+        size_t size = 64;
+        assert(self);
+        if (self->allocated == 0) {
+            assert(self->QUALITY == NULL && self->used == 0);
+            self->QUALITY = malloc(size * sizeof *self->QUALITY);
+            if (self->QUALITY == NULL) {
+                return
+                    RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+            }
+            self->allocated = size;
+        }
+        else if (self->used >= self->allocated) {
+            Quality* tmp = NULL;
+            size = self->allocated * 2;
+            tmp = realloc(self->QUALITY, size * sizeof *self->QUALITY);
+            if (tmp == NULL) {
+                return
+                    RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+            }
+            self->QUALITY = tmp;
+            self->allocated = size;
+        }
+    }
+
+    if (rc == 0) {
+        assert((self->used < self->allocated) && self->QUALITY);
+        rc = QualityParse(&self->QUALITY[self->used], node, name);
+        if (rc == 0)
+        {   ++self->used; }
+    }
+
+    RELEASE(KMDataNode, node);
+
+    return rc;
+}
+
+static rc_t QualityStatsRead(QualityStats* self, const KMetadata* meta) {
+    rc_t rc = 0;
+    const char name[] = "STATS/QUALITY";
+    const KMDataNode* node = NULL;
+
+    assert(self && meta);
+
+    memset(self, 0, sizeof *self);
+
+    rc = KMetadataOpenNodeRead(meta, &node, "%s", name);
+
+    if (rc != 0) {
+        if (GetRCState(rc) == rcNotFound) {
+            DBGMSG(DBG_APP,DBG_COND_1, ("%s: not found\n", name));
+            return 0;
+        }
+        DISP_RC2(rc, name, "while calling KMetadataOpenNodeRead");
+    }
+
+    if (rc == 0 && node) {
+        KNamelist* names = NULL;
+        rc = KMDataNodeListChild(node, &names);
+        DISP_RC2(rc, name, "while calling KMDataNodeListChild");
+        if (rc == 0) {
+            uint32_t count = 0;
+            rc = KNamelistCount(names, &count);
+            DISP_RC2(rc, name, "while calling KNamelistCount");
+            if (rc == 0) {
+                uint32_t i = ~0;
+                for (i = 0; i < count && rc == 0; ++i) {
+                    const char* child = NULL;
+                    rc = KNamelistGet(names, i, &child);
+                    if (rc != 0) {
+                       PLOGERR(klogInt, (klogInt, rc,
+                            "while calling STATS/QUALITY::KNamelistGet($(idx))",
+                            "idx=%i", i));
+                    }
+                    else
+                    {   rc = QualityStatsRead1(self, node, child); }
+                }
+            }
+        }
+        RELEASE(KNamelist, names);
+    }
+
+    RELEASE(KMDataNode, node);
+
+    return 0;
+}
+
+static
+void QualityStatsSort(QualityStats* self)
+{
+    assert(self);
+    ksort(self->QUALITY, self->used, sizeof *self->QUALITY, QualityCmp, NULL);
+}
+
+static
+void TableCountsSort(TableCounts* self)
+{
+    assert(self);
+    ksort(self->count, self->used, sizeof *self->count, CountsCmp, NULL);
+}
+static
+rc_t QualityStatsPrint(const QualityStats* self, const char* indent)
+{
+    size_t i = ~0;
+    const char tag[] = "QualityCount";
+    assert(self && indent);
+
+    if (self->allocated == 0)
+    {   return 0; }
+
+    OUTMSG(("%s<%s>\n", indent, tag));
+    for (i = 0; i < self->used; ++i) {
+        Quality* q = &self->QUALITY[i];
+        OUTMSG(("  %s<Quality value=\"%lu\" count=\"%lu\"/>\n",
+            indent, q->value, q->count));
+    }
+    OUTMSG(("%s</%s>\n", indent, tag));
+
+    return 0;
+}
+
+static
+void QualityStatsRelease(QualityStats* self)
+{
+    assert(self);
+    free(self->QUALITY);
+    memset(self, 0, sizeof *self);
+}
+
+static
+rc_t CountRead(Count* self, const char* name, const KMDataNode* parent)
+{
+    rc_t rc = 0;
+
+    const KMDataNode* node = NULL;
+
+    assert(self && parent && name);
+
+    memset(self, 0, sizeof *self);
+
+    rc = KMDataNodeOpenNodeRead(parent, &node, "%s", name);
+    if (rc != 0) {
+        if (GetRCState(rc) == rcNotFound) {
+            DBGMSG(DBG_APP,DBG_COND_1, ("%s: not found\n", name));
+            rc = 0;
+        }
+        DISP_RC2(rc, name, "while calling KMetadataOpenNodeRead");
+    }
+    else {
+        rc = KMDataNodeReadAsU64(node, &self->value);
+        DISP_RC2(rc, name, "while calling KMDataNodeReadAsU64");
+        if (rc == 0)
+        {   self->state = eMSFound; }
+    }
+
+    RELEASE(KMDataNode, node);
+
+    return rc;
+}
+
+static
+rc_t TableCountsRead1(TableCounts* self,
+    const VDatabase* db, const char* tableName)
+{
+    const VTable* tbl = NULL;
+    const KMetadata* meta = NULL;
+    const char name[] = "STATS/TABLE";
+    const KMDataNode* node = NULL;
+    rc_t rc = VDatabaseOpenTableRead(db, &tbl, "%s", tableName);
+    DISP_RC2(rc, tableName, "while calling VDatabaseOpenTableRead");
+
+    if (rc == 0) {
+        size_t size = 8;
+        assert(self);
+        if (self->allocated == 0) {
+            assert(self->count == NULL && self->used == 0);
+            self->count = malloc(size * sizeof *self->count);
+            if (self->count == NULL) {
+                return
+                    RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+            }
+            self->allocated = size;
+        }
+        else if (self->used >= self->allocated) {
+            Counts* tmp = NULL;
+            size = self->allocated * 2;
+            tmp = realloc(self->count, size * sizeof *self->count);
+            if (tmp == NULL) {
+                return
+                    RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+            }
+            self->count = tmp;
+            self->allocated = size;
+        }
+    }
+    if (rc == 0) {
+        assert(self->used < self->allocated && self->count);
+    }
+    if (rc == 0) {
+        rc = VTableOpenMetadataRead(tbl, &meta);
+        DISP_RC2(rc, name, "while calling VTableOpenMetadataRead");
+    }
+    if (rc == 0) {
+        rc = KMetadataOpenNodeRead(meta, &node, "%s", name);
+        if (rc != 0) {
+            if (GetRCState(rc) == rcNotFound) {
+                DBGMSG(DBG_APP,DBG_COND_1, ("%s: not found\n", name));
+                rc = 0;
+            }
+            DISP_RC2(rc, name, "while calling KMetadataOpenNodeRead");
+        }
+        else
+        {   assert(node); }
+    }
+
+    if (rc == 0 && node != NULL) {
+        Counts* c = NULL;
+        assert((self->used < self->allocated) && (self->count != NULL));
+        c = &self->count[self->used];
+        memset(c, 0, sizeof *c);
+        c->tableName = strdup(tableName);
+        if (c->tableName == NULL)
+        {   return RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted); }
+        c->tableState = eMSFound;
+        c->metaState = eMSFound;
+        rc = CountRead(&c->BASE_COUNT, "BASE_COUNT", node);
+
+        {
+            rc_t rc2 = CountRead(&c->SPOT_COUNT, "SPOT_COUNT", node);
+            if (rc2 != 0 && rc == 0)
+            {   rc = rc2; }
+        }
+
+        if (rc == 0)
+        {   ++self->used; }
+    }
+
+    RELEASE(KMDataNode, node);
+    RELEASE(KMetadata, meta);
+    RELEASE(VTable, tbl);
+
+    return rc;
+}
+
+static
+rc_t TableCountsRead(TableCounts* self, const VDatabase* db)
+{
+    rc_t rc = 0;
+    KNamelist* names = NULL;
+
+    assert(self);
+
+    memset(self, 0, sizeof *self);
+
+    if (db == NULL)
+    {   return 0; }
+
+    rc = VDatabaseListTbl(db, &names);
+    DISP_RC(rc, "while calling VDatabaseListTbl");
+    if (rc == 0) {
+        uint32_t count = 0;
+        rc = KNamelistCount(names, &count);
+        DISP_RC(rc, "while calling VDatabaseListTbl::KNamelistCount");
+        if (rc == 0) {
+            uint32_t i = ~0;
+            for (i = 0; i < count && rc == 0; ++i) {
+                const char* table = NULL;
+                rc = KNamelistGet(names, i, &table);
+                if (rc != 0) {
+                   PLOGERR(klogInt, (klogInt, rc,
+                        "while calling VDatabaseListTbl::KNamelistGet($(idx))",
+                        "idx=%i", i));
+                }
+                else
+                {   rc = TableCountsRead1(self, db, table); }
+            }
+        }
+    }
+
+    RELEASE(KNamelist, names);
+
+    return rc;
+}
+
+static
+rc_t CountPrint(const Count* self, const char* indent, const char* tag)
+{
+    assert(self && indent && tag);
+    switch (self->state) {
+        case eMSNotFound:
+            OUTMSG(("  %s<%s state=\"not found\"/>\n", indent, tag));
+            break;
+        case eMSFound:
+            OUTMSG(("  %s<%s count=\"%lu\"/>\n", indent, tag, self->value));
+            break;
+        default:
+            assert(0);
+            OUTMSG(("  %s<%s state=\"UNEXPECTED\"/>\n", indent, tag));
+            break;
+    }
+    return 0;
+}
+
+static
+rc_t TableCountsPrint(const TableCounts* self, const char* indent)
+{
+    rc_t rc = 0;
+    const char tag[] = "Databases";
+
+    assert(self && indent);
+
+    if (self->allocated == 0)
+    {   return 0; }
+
+    OUTMSG(("%s<%s>\n", indent, tag));
+    {
+        size_t i = ~0;
+        const char tag[] = "Database";
+        OUTMSG(("  %s<%s>\n", indent, tag));
+        for (i = 0; i < self->used; ++i) {
+            const char tag[] = "Statistics";
+            const Counts* p = &self->count[i];
+            OUTMSG(("    %s<Table name=\"%s\">\n", indent, p->tableName));
+            switch (p->metaState) {
+            case eMSNotFound:
+                OUTMSG(("      %s<%s source=\"meta\" state=\"not found\"/>\n",
+                    indent, tag));
+                break;
+            case eMSFound: {
+                char buf[512];
+                OUTMSG(("      %s<%s source=\"meta\">\n", indent, tag));
+                rc = string_printf(buf, sizeof buf, NULL, "      %s", indent);
+                if (rc == 0) {
+                    CountPrint(&p->SPOT_COUNT, buf, "Rows");
+                    CountPrint(&p->BASE_COUNT, buf, "Elements");
+                }
+                OUTMSG(("      %s</%s>\n", indent, tag));
+                break;
+              }
+            default:
+                assert(0);
+                OUTMSG(("      %s<%s source=\"meta\" state=\"UNEXPECTED\"/>\n",
+                    indent, tag));
+                break;
+            }
+            OUTMSG(("    %s</Table>\n", indent));
+        }
+        OUTMSG(("  %s</%s>\n", indent, tag));
+    }
+    OUTMSG(("%s</%s>\n", indent, tag));
+
+    return rc;
+}
+
+static
+void TableCountsRelease(TableCounts* self)
+{
+    size_t i = ~0;
+    assert(self);
+    for (i = 0; i < self->used; ++i) {
+        assert(self->count);
+        free(self->count[i].tableName);
+        self->count[i].tableName = NULL;
+    }
+    free(self->count);
+    memset(self, 0, sizeof *self);
+}
+
+static
+rc_t parse_bam_header(const VDatabase* db,
+    const RG_callback cb, const void* data)
+{
+    rc_t rc = 0;
+    const char name[] = "BAM_HEADER";
+    const KMetadata* meta = NULL;
+    const KMDataNode* node = NULL;
+    char* buffer = NULL;
+
+    if (db == NULL) {
+        return rc;
+    }
+    assert(cb);
+
+    if (rc == 0) {
+        rc = VDatabaseOpenMetadataRead(db, &meta);
+        DISP_RC(rc, "while calling VDatabaseOpenMetadataRead");
+    }
+
+    if (rc == 0) {
+        rc = KMetadataOpenNodeRead(meta, &node, "%s", name);
+        if (rc != 0) {
+            if (GetRCState(rc) == rcNotFound) {
+                return 0;
+            }
+            DISP_RC2(rc, name, "while calling KMetadataOpenNodeRead");
+        }
+    }
+
+    if (rc == 0) {
+        size_t num_read = 0;
+        size_t remaining = 0;
+        rc = KMDataNodeRead(node, 0, NULL, 0, &num_read, &remaining);
+        DISP_RC2(rc, name, "while calling KMDataNodeRead");
+        assert(num_read == 0);
+        if (rc == 0 && remaining > 0) {
+            buffer = malloc(remaining + 1);
+            if (buffer == NULL) {
+                rc = RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+            }
+            else {
+                size_t size = 0;
+                rc = KMDataNodeReadCString(node, buffer, remaining + 1, &size);
+                DISP_RC2(rc, name, "while calling KMDataNodeReadCString");
+                assert(size == remaining);
+            }
+        }
+    }
+
+    if (rc == 0 && buffer) {
+        const char* token = strtok(buffer, "\n");
+        while (token) {
+            const char RG[] = "@RG\t";
+            if (strncmp(token, RG, sizeof RG - 1) == 0) {
+                const char ID[] = "\tID:";
+                const char LB[] = "\tLB:";
+                const char SM[] = "\tSM:";
+                char* id_end = NULL;
+                char* lb_end = NULL;
+                char* sm_end = NULL;
+                BAM_HEADER_RG rg;
+                memset(&rg, 0, sizeof rg);
+                rg.ID = strstr(token, ID);
+                rg.LB = strstr(token, LB);
+                rg.SM = strstr(token, "\tSM:");
+                if (rg.ID) {
+                    rg.ID += sizeof ID - 1;
+                }
+                if (rg.ID) {
+                    id_end = strchr(rg.ID, '\t');
+                }
+                if (rg.LB) {
+                    rg.LB += sizeof LB - 1;
+                }
+                if (rg.LB) {
+                    lb_end = strchr(rg.LB, '\t');
+                }
+                if (rg.SM) {
+                    rg.SM += sizeof SM - 1;
+                }
+                if (rg.SM) {
+                    sm_end = strchr(rg.SM, '\t');
+                }
+                if (id_end) {
+                    *id_end = '\0';
+                }
+                if (lb_end) {
+                    *lb_end = '\0';
+                }
+                if (sm_end) {
+                    *sm_end = '\0';
+                }
+                if (rg.ID && rg.LB && rg.SM) {
+                    rc = cb(&rg, data);
+                }
+                if (rc) {
+                    break;
+                }
+            }
+            token = strtok(NULL, "\n");
+        }
+    }
+    free(buffer);
+    buffer = NULL;
+    RELEASE(KMDataNode, node);
+    RELEASE(KMetadata, meta);
+    return rc;
+}
+
+static
+void SraStatsMetaDestroy(SraStatsMeta* self)
+{
+    if (self == NULL)
+    {   return; }
+    BAM_HEADER_RG_free(&self->BAM_HEADER);
+    free(self->spot_group);
+    self->spot_group = NULL;
+}
+
+static
+rc_t CC fileSizeVisitor(const KDirectory* dir,
+    uint32_t type, const char* name, void* data)
+{
+    rc_t rc = 0;
+
+    SraSizeStats* sizes = (SraSizeStats*) data;
+
+    if (type & kptAlias)
+    {   return rc; }
+
+    assert(sizes);
+
+    switch (type) {
+        case kptFile: {
+            uint64_t size = 0;
+            rc = KDirectoryFileSize(dir, &size, "%s", name);
+            DISP_RC2(rc, name, "while calling KDirectoryFileSize");
+            if (rc == 0) {
+                sizes->size += size;
+                DBGMSG(DBG_APP, DBG_COND_1,
+                    ("File '%s', size %lu\n", name, size));
+            }
+            break;
+        }
+        case kptDir: 
+            DBGMSG(DBG_APP, DBG_COND_1, ("Dir '%s'\n", name));
+            rc = KDirectoryVisit(dir, false, fileSizeVisitor, sizes, "%s", name);
+            DISP_RC2(rc, name, "while calling KDirectoryVisit");
+            break;
+        default:
+            rc = RC(rcExe, rcDirectory, rcVisiting, rcType, rcUnexpected);
+            DISP_RC2(rc, name, "during KDirectoryVisit");
+            break;
+    }
+
+    return rc;
+}
+
+static rc_t GetTableModDate(const VDBManager *mgr,
+    KTime_t *mtime, const char *spec)
+{
+    VFSManager *vfs = NULL;
+    VResolver  *resolver = NULL;
+    VPath *accession = NULL;
+    const VPath *tblpath = NULL;
+    const KDBManager *kmgr = NULL;
+    char aPath[4096] = "";
+    const char *path = aPath;
+    rc_t rc = VFSManagerMake(&vfs);
+    DISP_RC(rc, "VFSManagerMake");
+    assert(mtime);
+    *mtime = 0;
+    if (rc == 0) {
+        rc = VFSManagerGetResolver(vfs, &resolver);
+        DISP_RC(rc, "VFSManagerGetResolver");
+    }
+    if (rc == 0) {
+        rc = VFSManagerMakePath(vfs, &accession, spec);
+        DISP_RC(rc, "VFSManagerMakePath");
+    }
+    if (rc == 0) {
+        assert(accession);
+        if (VPathIsAccessionOrOID(accession)) {
+            rc = VResolverLocal(resolver, accession, &tblpath);
+            DISP_RC(rc, "VResolverLocal");
+            if (rc == 0) {
+                //size_t size;
+                rc = VPathReadPath(tblpath, aPath, sizeof aPath, NULL);//& size)
+                path = aPath;
+            }
+        }
+        else {
+            path = spec;
+        }
+    }
+    if (rc == 0) {
+        rc = VDBManagerGetKDBManagerRead(mgr, &kmgr);
+        DISP_RC(rc, "VDBManagerGetKDBManagerRead");
+    }
+    if (rc == 0) {
+        rc = KDBManagerGetTableModDate(kmgr, mtime, "%s", path);
+    }
+    RELEASE(KDBManager, kmgr);
+    RELEASE(VPath, tblpath);
+    RELEASE(VPath, accession);
+    RELEASE(VResolver, resolver);
+    RELEASE(VFSManager, vfs);
+    return rc;
+}
+
+static rc_t get_arc_info(const char *path, ArcInfo *arc_info,
+    const VDBManager *vmgr, const VTable *vtbl)
+{
+    rc_t rc = 0;
+    memset(arc_info, 0, sizeof(*arc_info));
+
+    if ((rc = GetTableModDate(vmgr, &arc_info->timestamp, path)) == 0 ) {
+        uint32_t i;
+        for(i = 0; i < sizeof(arc_info->i) / sizeof(arc_info->i[0]); i++) {
+            const KFile* kfile;
+            arc_info->i[i].tag = i == 0 ? "sra" : "lite.sra";
+            if ((rc = VTableMakeSingleFileArchive(vtbl, &kfile, i == 1)) == 0) {
+                MD5State md5;
+                uint64_t pos = 0;
+                uint8_t buffer[256 * 1024];
+                size_t num_read = 0, x;
+
+                MD5StateInit(&md5);
+                do {
+                    if( (rc = KFileRead(kfile, pos, buffer, sizeof(buffer), &num_read)) == 0 ) {
+                        MD5StateAppend(&md5, buffer, num_read);
+                        pos += num_read;
+                    }
+                    rc = Quitting();
+                    if (rc != 0) {
+                        LOGMSG(klogWarn, "Interrupted");
+                    }
+                } while(rc == 0 && num_read != 0);
+                if (rc == 0 &&
+                    (rc = KFileSize(kfile, &arc_info->i[i].size)) == 0)
+                {
+                    uint8_t digest[16];
+                    MD5StateFinish(&md5, digest);
+                    for(pos = 0, x = 0; rc == 0 && pos < sizeof(digest); pos++) {
+                        rc = string_printf(&arc_info->i[i].md5[x], sizeof(arc_info->i[i].md5) - x, &num_read, "%02x", digest[pos]);
+                        x += num_read;
+                    }
+                }
+                KFileRelease(kfile);
+            }
+        }
+    }
+    return rc;
+}
+
+static rc_t get_size( SraSizeStats* sizes, const VTable *vtbl) {
+    rc_t rc = 0;
+
+    const KDatabase* kDb = NULL;
+    const KTable* kTbl = NULL;
+    const KDirectory* dir = NULL;
+
+    assert(vtbl && sizes);
+    rc = VTableOpenKTableRead(vtbl, &kTbl);
+    DISP_RC(rc, "while calling VTableOpenKTableRead");
+
+    if (rc == 0) {
+        rc = KTableOpenParentRead(kTbl, &kDb);
+        DISP_RC(rc, "while calling KTableOpenParentRead");
+    }
+
+    if (rc == 0 && kDb) {
+        while (rc == 0) {
+            const KDatabase* par = NULL;
+            rc = KDatabaseOpenParentRead(kDb, &par);
+            DISP_RC(rc, "while calling KDatabaseOpenParentRead");
+            if (par == NULL)
+            {   break; }
+            else {
+                RELEASE(KDatabase, kDb);
+                kDb = par;
+            }
+        }
+        if (rc == 0) {
+            rc = KDatabaseOpenDirectoryRead(kDb, &dir);
+            DISP_RC(rc, "while calling KDatabaseOpenDirectoryRead");
+        }
+    }
+
+    if (rc == 0 && dir == NULL) {
+        rc = KTableOpenDirectoryRead(kTbl, &dir);
+        DISP_RC(rc, "while calling KTableOpenDirectoryRead");
+    }
+
+    memset(sizes, 0, sizeof *sizes);
+
+    if (rc == 0) {
+        rc = KDirectoryVisit(dir, false, fileSizeVisitor, sizes, NULL);
+        DISP_RC(rc, "while calling KDirectoryVisit");
+    }
+
+    RELEASE(KDirectory, dir);
+    RELEASE(KTable, kTbl);
+    RELEASE(KDatabase, kDb);
+
+    return rc;
+}
+
+static
+rc_t readTxtAttr(const KMDataNode* self, const char* name, const char* attrName,
+    char* buf, size_t buf_size)
+{
+    rc_t rc = 0;
+    size_t num_read = 0;
+
+    if (self == NULL) {
+        rc = RC(rcExe, rcMetadata, rcReading, rcSelf, rcNull);
+        return rc;
+    }
+
+    assert(self && name && attrName && buf && buf_size);
+
+    rc = KMDataNodeReadAttr(self, attrName, buf, buf_size, &num_read);
+    if (rc != 0) {
+        PLOGERR(klogErr, (klogErr, rc, "Cannot read '$(name)@$(attr)'",
+            "name=%s,attr=%s", name, attrName));
+    }
+    else { DBGMSG(DBG_APP, DBG_COND_1, ("%s@%s = %s\n", name, attrName, buf)); }
+
+    return rc;
+}
+
+static
+rc_t get_load_info(const KMetadata* meta, SraMeta* info)
+{
+    rc_t rc = 0;
+    const KMDataNode* node = NULL;
+    assert(meta && info);
+    memset(info, 0, sizeof *info);
+    info->metaVersion = 99;
+    info->tblVersion = -1;
+
+    if (rc == 0) {
+        rc = KMetadataVersion(meta, &info->metaVersion);
+        DISP_RC(rc, "While calling KMetadataVersion");
+        if (rc == 0) {
+            DBGMSG(DBG_APP, DBG_COND_1,
+                ("KMetadataVersion=%d\n",info->metaVersion));
+            switch (info->metaVersion) {
+                case 1:
+                    info->tblVersion = 0;
+                    break;
+                case 2: {
+                    const char name[] = "SOFTWARE/loader";
+                    rc = KMetadataOpenNodeRead(meta, &node, "%s", name);
+                    if (rc != 0) {
+                        if (GetRCState(rc) == rcNotFound) {
+                            DBGMSG(DBG_APP,DBG_COND_1,("%s: not found\n",name));
+                            rc = 0;
+                        }
+                        DISP_RC2(rc, name,
+                            "while calling KMetadataOpenNodeRead");
+                    }
+                    else {
+                        rc = readTxtAttr(node, name, "vers",
+                            info->loader.vers, sizeof info->loader.vers);
+                        if (rc == 0) {
+                            if (strncmp("2.", info->loader.vers, 2) == 0)
+                            {      info->tblVersion = 2; }
+                            else { info->tblVersion = 1; }
+                        }
+                        else if (GetRCState(rc) == rcNotFound) {
+                            DBGMSG(DBG_APP,DBG_COND_1,
+                                ("%s/@%s: not found\n", name, "vers"));
+                            rc = 0;
+                        }
+                        if (rc == 0) {
+                            rc = readTxtAttr(node, name, "date",
+                                info->loader.date, sizeof info->loader.date);
+                            if (GetRCState(rc) == rcNotFound) {
+                                DBGMSG(DBG_APP,DBG_COND_1,
+                                    ("%s/@%s: not found\n", name, "date"));
+                                rc = 0;
+                            }
+                        }
+                        if (rc == 0) {
+                            rc = readTxtAttr(node, name, "name",
+                                info->loader.name, sizeof info->loader.name);
+                            if (GetRCState(rc) == rcNotFound) {
+                                DBGMSG(DBG_APP,DBG_COND_1,
+                                    ("%s/@%s: not found\n", name, "name"));
+                                rc = 0;
+                            }
+                        }
+                    }
+                    break;
+                }
+                default:
+                    rc = RC(rcExe, rcMetadata, rcReading, rcData, rcUnexpected);
+                    PLOGERR(klogErr, (klogErr, rc,
+                        "Unexpected MetadataVersion: $(version)",
+                        "version=%d", info->metaVersion));
+                    break;
+            }
+        }
+    }
+
+    if (rc == 0) {
+        const char name[] = "SOFTWARE/formatter";
+        RELEASE(KMDataNode, node);
+        rc = KMetadataOpenNodeRead(meta, &node, "%s", name);
+        if (rc != 0) {
+            if (GetRCState(rc) == rcNotFound ) {
+                DBGMSG(DBG_APP,DBG_COND_1,("%s: not found\n",name));
+                rc = 0;
+            }
+            DISP_RC2(rc, name, "while calling KMetadataOpenNodeRead");
+        }
+        else {
+            if (rc == 0) {
+                rc = readTxtAttr(node, name, "vers",
+                    info->formatter.vers, sizeof info->formatter.vers);
+                if (GetRCState(rc) == rcNotFound) {
+                    DBGMSG(DBG_APP,DBG_COND_1,
+                        ("%s/@%s: not found\n", name, "vers"));
+                    rc = 0;
+                }
+            }
+            if (rc == 0) {
+                rc = readTxtAttr(node, name, "name",
+                    info->formatter.name, sizeof info->formatter.name);
+                if (GetRCState(rc) == rcNotFound) {
+                    DBGMSG(DBG_APP,DBG_COND_1,
+                        ("%s/@%s: not found\n", name, "name"));
+                    rc = 0;
+                }
+            }
+        }
+    }
+
+    if (rc == 0) {
+        const char name[] = "LOAD/timestamp";
+        RELEASE(KMDataNode, node);
+        rc = KMetadataOpenNodeRead(meta, &node, "%s", name);
+        if (rc != 0) {
+            if (GetRCState(rc) == rcNotFound ) {
+                DBGMSG(DBG_APP,DBG_COND_1,("%s: not found\n",name));
+                rc = 0;
+            }
+            DISP_RC2(rc, name, "while calling KMetadataOpenNodeRead");
+        }
+        else {
+            size_t num_read = 0;
+            size_t remaining = 0;
+            rc = KMDataNodeRead(node, 0,
+                &info->loadTimestamp, sizeof info->loadTimestamp,
+                &num_read, &remaining);
+            if (rc == 0) {
+                if (remaining || num_read != sizeof info->loadTimestamp) {
+                    rc = RC(rcExe, rcMetadata, rcReading, rcData, rcIncorrect);
+                }
+            }
+            else {
+                if (GetRCState(rc) == rcNotFound) {
+                    DBGMSG(DBG_APP, DBG_COND_1, ("%s: not found\n", name));
+                    rc = 0;
+                }
+            }
+            DISP_RC2(rc, name, "while calling KMetadataOpenNodeRead");
+        }
+    }
+
+    RELEASE(KMDataNode, node);
+
+    return rc;
+}
+
+static
+rc_t readStatsMetaNode(const KMDataNode* parent, const char* parentName,
+    const char* name, uint64_t* result, bool quick, bool optional)
+{
+    rc_t rc = 0;
+
+    const KMDataNode* node = NULL;
+
+    assert(parent && parentName && name && result);
+
+    rc = KMDataNodeOpenNodeRead(parent, &node, "%s", name);
+    if (rc != 0)
+    {
+        if (GetRCState(rc) == rcNotFound && optional)
+        {
+            *result = 0;
+            rc = 0;
+        }
+        else if ( quick )
+        {
+            PLOGERR(klogInt, (klogInt, rc, "while opening $(parent)/$(child)",
+                              "parent=%s,child=%s", parentName, name));
+        }
+    }
+    else {
+        rc = KMDataNodeReadAsU64(node, result);
+        if (GetRCObject(rc) == rcTransfer && GetRCState(rc) == rcIncomplete) {
+            *result = 0;
+            rc = 0;
+        }
+        if ( rc != 0 && quick )
+        {
+            PLOGERR(klogInt, (klogInt, rc, "while reading $(parent)/$(child)",
+                              "parent=%s,child=%s", parentName, name));
+        }
+    }
+    
+    RELEASE(KMDataNode, node);
+    
+    return rc;
+}
+
+static
+rc_t readStatsMetaAttr(const KMDataNode* parent, const char* parentName,
+    const char* name, char ** result, bool quick, bool optional)
+{
+    rc_t rc = 0;
+    char temp[4096];
+    size_t actsize;
+
+    assert(parent && parentName && name && result);
+
+    rc = KMDataNodeReadAttr(parent, name, temp, sizeof(temp), &actsize);
+    if (GetRCState(rc) == rcInsufficient)
+    {
+        *result = malloc(actsize + 1);
+        if (*result)
+            rc = KMDataNodeReadAttr(parent, name, *result, actsize, &actsize);
+    }
+    else if (rc == 0)
+    {
+        *result = strdup(temp);
+    }
+    if (rc == 0 && *result == NULL)
+    {
+        rc = RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+    }
+    else if (rc != 0)
+    {
+        if (GetRCState(rc) == rcNotFound && optional)
+        {
+            *result = 0;
+            rc = 0;
+        }
+        else
+        {
+            PLOGERR(klogInt, (klogInt, rc, "while opening $(parent)[$(child)]",
+                "parent=%s,child=%s", parentName, name));
+        }
+    }
+
+    return rc;
+}
+
+static
+rc_t readStatsMetaNodes(const KMDataNode* parent, const char* name,
+                        SraStatsMeta* stats, bool quick)
+{
+    rc_t rc = 0;
+    const char *const parentName = name ? name : "STATS/TABLE";
+
+    assert(parent && stats);
+
+    if (name) {
+        char *tempname;
+
+        rc = readStatsMetaAttr(parent, parentName, "name", &tempname, quick, true);
+        if (rc == 0) {
+            if (tempname)
+                stats->spot_group = tempname;
+            else {
+                stats->spot_group = strdup(name);
+                if (stats->spot_group == NULL)
+                {   rc = RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted); }
+            }
+        }
+    }
+
+    if (rc == 0) {
+        rc = readStatsMetaNode(parent,
+            parentName, "BASE_COUNT", &stats->BASE_COUNT, quick, false);
+    }
+    if (rc == 0) {
+        rc = readStatsMetaNode(parent,
+            parentName, "BIO_BASE_COUNT", &stats->BIO_BASE_COUNT, quick, false);
+    }
+    if (rc == 0) {
+        rc = readStatsMetaNode(parent,
+            parentName, "SPOT_COUNT", &stats->spot_count, quick, false);
+    }
+    if (rc == 0) {
+        rc = readStatsMetaNode(parent,
+            parentName, "CMP_BASE_COUNT", &stats->CMP_BASE_COUNT, quick, true);
+    }
+
+    if (rc == 0)
+    {   stats->found = true; }
+    else { SraStatsMetaDestroy(stats); }
+
+    return rc;
+}
+
+static
+rc_t get_stats_meta(const KMetadata* meta,
+    MetaDataStats* stats, bool quick)
+{
+    rc_t rc = 0;
+    assert(meta && stats);
+    memset(stats, 0, sizeof *stats);
+
+    if (rc == 0) {
+        const char name[] = "STATS/TABLE";
+        const KMDataNode* node = NULL;
+        rc = KMetadataOpenNodeRead(meta, &node, "%s", name);
+        if (rc != 0) {
+            if (GetRCState(rc) == rcNotFound) {
+                DBGMSG(DBG_APP,DBG_COND_1, ("%s: not found\n", name));
+                rc = 0;
+            }
+            DISP_RC2(rc, name, "while calling KMetadataOpenNodeRead");
+        }
+        if (rc == 0 && node)
+        {   rc = readStatsMetaNodes(node, NULL, &stats->table, quick); }
+        RELEASE(KMDataNode, node);
+    }
+
+    if (rc == 0) {
+        const char name[] = "STATS/SPOT_GROUP";
+        const KMDataNode* parent = NULL;
+        rc = KMetadataOpenNodeRead(meta, &parent, "%s", name);
+        if (rc != 0) {
+            if (GetRCState(rc) == rcNotFound) {
+                DBGMSG(DBG_APP,DBG_COND_1, ("%s: not found\n", name));
+                rc = 0;
+            }
+            DISP_RC2(rc, name, "while calling KMetadataOpenNodeRead");
+        }
+
+        if (rc == 0 && parent) {
+            uint32_t count = 0, i = 0;
+            KNamelist* names = NULL;
+            rc = KMDataNodeListChild(parent, &names);
+            DISP_RC2(rc, name, "while calling KMDataNodeListChild");
+            if (rc == 0) {
+                rc = KNamelistCount(names, &count);
+                DISP_RC2(rc, name, "while calling KNamelistCount");
+                if (rc == 0) {
+                    stats->spotGroupN = count;
+                    stats->spotGroup = calloc(count, sizeof *stats->spotGroup);
+                    if (stats->spotGroup == NULL) {
+                        rc = RC(rcExe,
+                            rcStorage, rcAllocating, rcMemory, rcExhausted);
+                    }
+                }
+            }
+
+            for (i = 0; i < count && rc == 0; ++i) {
+                const KMDataNode* node = NULL;
+                const char* child = NULL;
+                rc = KNamelistGet(names, i, &child);
+                if (rc != 0) {
+                    PLOGERR(klogInt, (klogInt, rc,
+                        "while calling STATS/SPOT_GROUP::KNamelistGet($(idx))",
+                        "idx=%i", i));
+                }
+                else {
+                    rc = KMDataNodeOpenNodeRead(parent, &node, "%s", child);
+                    DISP_RC2(rc, child, "while calling KMDataNodeOpenNodeRead");
+                }
+                if (rc == 0) {
+                    rc = readStatsMetaNodes
+                        (node, child, &stats->spotGroup[i], quick);
+                }
+                RELEASE(KMDataNode, node);
+            }
+            RELEASE(KNamelist, names);
+        }
+        RELEASE(KMDataNode, parent);
+    }
+
+    if (rc == 0) {
+        uint32_t i = 0;
+        bool found = stats->table.found;
+        for (i = 0; i < stats->spotGroupN && found; ++i)
+        {   found = stats->spotGroup[i].found; }
+        stats->found = found;
+    }
+
+    return rc;
+}
+
+static
+void srastatmeta_print(const MetaDataStats* meta, srastat_parms *pb)
+{
+    uint32_t i = 0;
+    assert(pb && meta);
+
+    if (meta->spotGroupN) {
+        for (i = 0; i < meta->spotGroupN; ++i) {
+            const SraStatsMeta* ss = &meta->spotGroup[i];
+            if (!pb->skip_members) {
+                const char* spot_group = "";
+                if (strcmp("default", ss->spot_group) != 0)
+                {   spot_group = ss->spot_group; }
+                if ((spot_group == NULL || spot_group[0] == '\0')
+                    && meta->spotGroupN > 1)
+                {
+                    /* skip an empty "extra" 'default' spot_group */
+                    if (ss->BASE_COUNT == 0     && ss->BIO_BASE_COUNT == 0 &&
+                        ss->CMP_BASE_COUNT == 0 && ss->spot_count == 0)
+                    {   continue; }
+                }
+                if (pb->xml) {
+                    if (pb->hasSPOT_GROUP) {
+                       OUTMSG(("  <Member member_name=\"%s\"", ss->spot_group));
+                       OUTMSG((" spot_count=\"%ld\" base_count=\"%ld\"",
+                            ss->spot_count, ss->BASE_COUNT));
+                       OUTMSG((" base_count_bio=\"%ld\"", ss->BIO_BASE_COUNT));
+                       if (ss->CMP_BASE_COUNT > 0) {
+                           OUTMSG((" cmp_base_count=\"%ld\"",
+                               ss->CMP_BASE_COUNT));
+                       }
+                       BAM_HEADER_RG_print_xml(&ss->BAM_HEADER);
+                       OUTMSG(("/>\n"));
+                    }
+                }
+                else {
+                    OUTMSG(("%s|%s|%ld:%ld:%ld|:|:|:\n",
+                        pb->table_path, spot_group, ss->spot_count,
+                        ss->BASE_COUNT, ss->BIO_BASE_COUNT));
+                }
+            }
+            pb->total.spot_count += ss->spot_count;
+            pb->total.BASE_COUNT += ss->BASE_COUNT;
+            pb->total.BIO_BASE_COUNT += ss->BIO_BASE_COUNT;
+            pb->total.total_cmp_len += ss->CMP_BASE_COUNT;
+        }
+    }
+    else {
+        if (!pb->xml && !(pb->quick && pb->skip_members)) {
+                const char* spot_group = "";
+                OUTMSG(("%s|%s|%ld:%ld:%ld|:|:|:\n",
+                        pb->table_path, spot_group, meta->table.spot_count,
+                        meta->table.BASE_COUNT, meta->table.BIO_BASE_COUNT));
+        }
+        pb->total.spot_count = meta->table.spot_count;
+        pb->total.BASE_COUNT = meta->table.BASE_COUNT;
+        pb->total.BIO_BASE_COUNT = meta->table.BIO_BASE_COUNT;
+        pb->total.total_cmp_len = meta->table.CMP_BASE_COUNT;
+    }
+}
+
+static
+void CC srastat_print( BSTNode* n, void* data )
+{
+    srastat_parms *pb = (srastat_parms*) data;
+    const SraStats *ss = (const SraStats*) n;
+    assert(pb && ss);
+    if (!pb->skip_members) {
+        if (pb->xml) {
+            if (pb->hasSPOT_GROUP) {
+                OUTMSG(("  <Member member_name=\"%s\"", ss->spot_group));
+                OUTMSG((" spot_count=\"%ld\" base_count=\"%ld\"", ss->spot_count, ss->total_len));
+                OUTMSG((" base_count_bio=\"%ld\"", ss->bio_len));
+                OUTMSG((" spot_count_mates=\"%ld\" base_count_bio_mates=\"%ld\"", ss->spot_count_mates, ss->bio_len_mates));
+                OUTMSG((" spot_count_bad=\"%ld\" base_count_bio_bad=\"%ld\"", ss->bad_spot_count, ss->bad_bio_len));
+                OUTMSG((" spot_count_filtered=\"%ld\" base_count_bio_filtered=\"%ld\"",
+                    ss->filtered_spot_count, ss->filtered_bio_len));
+                if (ss->total_cmp_len > 0)
+                {   OUTMSG((" cmp_base_count=\"%ld\"", ss->total_cmp_len)); }
+                BAM_HEADER_RG_print_xml(&ss->BAM_HEADER);
+                OUTMSG(("/>\n"));
+            }
+        }
+        else {
+            OUTMSG(("%s|%s|%ld:%ld:%ld|%ld:%ld|%ld:%ld|%ld:%ld\n",
+                pb->table_path,ss->spot_group,ss->spot_count,ss->total_len,ss->bio_len,ss->spot_count_mates,ss->bio_len_mates,
+                ss->bad_spot_count,ss->bad_bio_len,ss->filtered_spot_count,ss->filtered_bio_len));
+        }
+    }
+    pb->total.spot_count += ss->spot_count;
+    pb->total.spot_count_mates += ss->spot_count_mates;
+    pb->total.BIO_BASE_COUNT += ss->bio_len;
+    pb->total.bio_len_mates += ss->bio_len_mates;
+    pb->total.BASE_COUNT += ss->total_len;
+    pb->total.bad_spot_count += ss->bad_spot_count;
+    pb->total.bad_bio_len += ss->bad_bio_len;
+    pb->total.filtered_spot_count += ss->filtered_spot_count;
+    pb->total.filtered_bio_len += ss->filtered_bio_len;
+    pb->total.total_cmp_len += ss->total_cmp_len;
+}
+
+static
+rc_t process_align_info(const char* indent, const Ctx* ctx)
+{
+    rc_t rc = 0;
+    uint32_t count = 0;
+    int i = 0;
+    const VDBDependencies* dep = NULL;
+
+    assert(indent && ctx);
+
+    if (ctx->db == NULL) {
+        return rc;
+    }
+
+    rc = VDatabaseListDependencies(ctx->db, &dep, false);
+    DISP_RC2(rc, ctx->pb->table_path,
+        "while calling VDatabaseListDependencies");
+
+    rc = VDBDependenciesCount(dep, &count);
+    if (rc) {
+        DISP_RC(rc, "while calling VDBDependenciesCount");
+        return rc;
+    }
+
+
+    OUTMSG(("%s<AlignInfo>\n", indent));
+
+    for (i = 0; i < count && rc == 0; ++i) {
+        bool circular = false;
+        const char* name = NULL;
+        const char* path = NULL;
+        bool local = false;
+        const char* seqId = NULL;
+
+        rc = VDBDependenciesCircular(dep, &circular, i);
+        if (rc != 0) {
+            DISP_RC(rc, "while calling VDBDependenciesCircular");
+            break;
+        }
+        rc = VDBDependenciesName(dep, &name, i);
+        if (rc != 0) {
+            DISP_RC(rc, "while calling VDBDependenciesName");
+            break;
+        }
+        rc = VDBDependenciesPath(dep, &path, i);
+        if (rc != 0) {
+            DISP_RC(rc, "while calling VDBDependenciesPath");
+            break;
+        }
+        rc = VDBDependenciesLocal(dep, &local, i);
+        if (rc != 0) {
+            DISP_RC(rc, "while calling VDBDependenciesLocal");
+            break;
+        }
+        rc = VDBDependenciesSeqId(dep, &seqId, i);
+        if (rc != 0) {
+            DISP_RC(rc, "while calling VDBDependenciesSeqId");
+            break;
+        }
+
+        OUTMSG((
+            "%s  <Ref seqId=\"%s\" name=\"%s\" circular=\"%s\" local=\"%s\"",
+            indent, seqId, name, (circular ? "true" : "false"),
+            (local ? "local" : "remote")));
+        if (path && path[0]) {
+            OUTMSG((" path=\"%s\"", path));
+        }
+        OUTMSG(("/>\n"));
+    }
+
+    OUTMSG(("%s</AlignInfo>\n", indent));
+
+    RELEASE(VDBDependencies, dep);
+
+    return rc;
+}
+
+static
+rc_t print_results(const Ctx* ctx)
+{
+    rc_t rc = 0;
+    rc_t rc2 = 0;
+    bool mismatch = false;
+
+    assert(ctx && ctx->pb
+        && ctx->tr && ctx->sizes && ctx->info && ctx->meta && ctx->total);
+
+    if (ctx->pb->quick) {
+        if ( ! ctx->meta -> found )
+            LOGMSG(klogWarn, "Statistics metadata not found");
+        else
+        {
+            ctx->pb->hasSPOT_GROUP = ctx->meta->spotGroupN > 1 ||
+                (ctx->meta->spotGroupN == 1
+                 && strcmp("default", ctx->meta->spotGroup[0].spot_group) != 0);
+        }
+    }
+
+    if (ctx->meta->found && ! ctx->pb->quick) {
+/*      bool mismatch = false; */
+        SraStats* ss = (SraStats*)BSTreeFind(ctx->tr, "", srastats_cmp);
+        const SraStatsMeta* m = &ctx->meta->table;
+        if (ctx->total->BASE_COUNT != m->BASE_COUNT)
+        { mismatch = true; }
+        if (ctx->total->BIO_BASE_COUNT != m->BIO_BASE_COUNT)
+        { mismatch = true; }
+        if (ctx->total->spot_count != m->spot_count)
+        { mismatch = true; }
+        if (ctx->total->total_cmp_len != m->CMP_BASE_COUNT)
+        { mismatch = true; }
+        if (ss != NULL) {
+            const SraStatsMeta* m = &ctx->meta->table;
+            uint32_t i = 0;
+            for (i = 0; i < ctx->meta->spotGroupN && !mismatch; ++i) {
+                const char* spot_group = "";
+                m = &ctx->meta->spotGroup[i];
+                assert(m);
+                if (strcmp("default", m->spot_group) != 0)
+                {   spot_group = m->spot_group; }
+                ss = (SraStats*)BSTreeFind(ctx->tr, spot_group, srastats_cmp);
+                if (ss == NULL) {
+                    mismatch = true;
+                    break;
+                }
+                if (ss->total_len != m->BASE_COUNT
+                    || ss->bio_len != m->BIO_BASE_COUNT
+                    || ss->spot_count != m->spot_count
+                    || ss->total_cmp_len != m->CMP_BASE_COUNT)
+                {
+                    mismatch = true;
+                    break;
+                }
+            }
+        }
+    }
+
+    if (ctx->pb->xml) {
+        OUTMSG(("<Run accession=\"%s\"", ctx->pb->table_path));
+        if (!ctx->pb->quick || ! ctx->meta->found) {
+            OUTMSG((" read_length=\"%s\"",
+                ctx->pb->variableReadLength ? "variable" : "fixed"));
+        }
+        if (ctx->pb->quick) {
+            OUTMSG((" spot_count=\"%ld\" base_count=\"%ld\"",
+                ctx->meta->table.spot_count, ctx->meta->table.BASE_COUNT));
+            OUTMSG((" base_count_bio=\"%ld\"",
+                ctx->meta->table.BIO_BASE_COUNT));
+            if (ctx->meta->table.CMP_BASE_COUNT > 0) {
+                OUTMSG((" cmp_base_count=\"%ld\"",
+                    ctx->meta->table.CMP_BASE_COUNT));
+            }
+        }
+        else {
+            OUTMSG((" spot_count=\"%ld\" base_count=\"%ld\"",
+                ctx->total->spot_count, ctx->total->BASE_COUNT));
+            OUTMSG((" base_count_bio=\"%ld\"", ctx->total->BIO_BASE_COUNT));
+            OUTMSG((" spot_count_mates=\"%ld\" base_count_bio_mates=\"%ld\"",
+                ctx->total->spot_count_mates, ctx->total->bio_len_mates));
+            OUTMSG((" spot_count_bad=\"%ld\" base_count_bio_bad=\"%ld\"",
+                ctx->total->bad_spot_count, ctx->total->bad_bio_len));
+            OUTMSG((
+                " spot_count_filtered=\"%ld\" base_count_bio_filtered=\"%ld\"",
+                ctx->total->filtered_spot_count, ctx->total->filtered_bio_len));
+            if (ctx->total->total_cmp_len > 0) {
+                OUTMSG((" cmp_base_count=\"%ld\"", ctx->total->total_cmp_len));
+            }
+        }
+        OUTMSG((">\n"));
+    }
+    else if (ctx->pb->skip_members) {
+        if (ctx->pb->quick) {
+            OUTMSG(("%s||%ld:%ld:%ld|:|:|:\n",
+                ctx->pb->table_path, ctx->meta->table.spot_count,
+                ctx->meta->table.BASE_COUNT, ctx->meta->table.BIO_BASE_COUNT));
+        }
+        else {
+            OUTMSG(("%s||%ld:%ld:%ld|%ld:%ld|%ld:%ld|%ld:%ld\n",
+                ctx->pb->table_path,
+                ctx->total->spot_count, ctx->total->BASE_COUNT,
+                ctx->total->BIO_BASE_COUNT,
+                ctx->total->spot_count_mates, ctx->total->bio_len_mates,
+                ctx->total->bad_spot_count, ctx->total->bad_bio_len,
+                ctx->total->filtered_spot_count, ctx->total->filtered_bio_len));
+        }
+    }
+
+    if (ctx->pb->quick && ctx->meta->found) {
+        memset(&ctx->pb->total, 0, sizeof ctx->pb->total);
+        rc = parse_bam_header(ctx->db, meta_RG_callback, ctx->meta);
+        srastatmeta_print(ctx->meta, ctx->pb);
+        if (ctx->pb->total.spot_count != ctx->meta->table.spot_count ||
+            ctx->pb->total.BIO_BASE_COUNT != ctx->meta->table.BIO_BASE_COUNT ||
+            ctx->pb->total.BASE_COUNT != ctx->meta->table.BASE_COUNT ||
+            ctx->pb->total.total_cmp_len != ctx->meta->table.CMP_BASE_COUNT)
+        {
+            rc = RC(rcExe, rcData, rcValidating, rcData, rcUnequal);
+        }
+        assert(rc == 0);
+    }
+    else {
+        memset(&ctx->pb->total, 0, sizeof ctx->pb->total);
+        rc = parse_bam_header(ctx->db, tree_RG_callback, ctx->tr);
+        BSTreeForEach(ctx->tr, false, srastat_print, ctx->pb);
+        if (ctx->meta->found) {
+            const SraStatsMeta* m = &ctx->meta->table;
+            if (ctx->pb->total.BASE_COUNT != m->BASE_COUNT
+                || ctx->pb->total.BIO_BASE_COUNT != m->BIO_BASE_COUNT
+                || ctx->pb->total.spot_count != m->spot_count)
+            {
+                mismatch = true;
+            }
+            if (ctx->pb->total.total_cmp_len != m->CMP_BASE_COUNT)
+            {   mismatch = true; }
+        }
+        if (ctx->pb->total.spot_count != ctx->total->spot_count ||
+            ctx->pb->total.spot_count_mates != ctx->total->spot_count_mates ||
+            ctx->pb->total.BIO_BASE_COUNT != ctx->total->BIO_BASE_COUNT ||
+            ctx->pb->total.bio_len_mates != ctx->total->bio_len_mates ||
+            ctx->pb->total.BASE_COUNT != ctx->total->BASE_COUNT ||
+            ctx->pb->total.bad_spot_count != ctx->total->bad_spot_count ||
+            ctx->pb->total.bad_bio_len != ctx->total->bad_bio_len ||
+            ctx->pb->total.filtered_spot_count
+                != ctx->total->filtered_spot_count ||
+            ctx->pb->total.filtered_bio_len != ctx->total->filtered_bio_len ||
+            ctx->pb->total.total_cmp_len != ctx->total->total_cmp_len)
+        {
+            rc = RC(rcExe, rcData, rcValidating, rcData, rcUnequal);
+        }
+        assert(rc == 0);
+    }
+
+    if (ctx->pb->xml) {
+        if (ctx->sizes) {
+            OUTMSG(("  <Size value=\"%lu\" units=\"bytes\"/>\n",
+                ctx->sizes->size));
+        }
+        if (ctx->pb->printMeta && ctx->info->tblVersion >= 0) {
+            OUTMSG(("  <Table vers=\"%d\">\n    <Meta vers=\"%d\">\n",
+                ctx->info->tblVersion, ctx->info->metaVersion));
+            if (ctx->info->formatter.name[0] || ctx->info->formatter.vers[0] ||
+                ctx->info->loader.date[0] || ctx->info->loader.name[0] ||
+                ctx->info->loader.vers[0])
+            {
+                OUTMSG(("      <SOFTWARE>\n"));
+                if (ctx->info->formatter.name[0] ||
+                    ctx->info->formatter.vers[0])
+                {
+                    OUTMSG(("        <formatter"));
+                    if (ctx->info->formatter.name[0])
+                    {   OUTMSG((" name=\"%s\"", ctx->info->formatter.name)); }
+                    if (ctx->info->formatter.vers[0])
+                    {   OUTMSG((" vers=\"%s\"", ctx->info->formatter.vers)); }
+                    OUTMSG(("/>\n"));
+                }
+                if (ctx->info->loader.date[0] || ctx->info->loader.name[0] ||
+                    ctx->info->loader.vers[0])
+                {
+                    OUTMSG(("        <loader"));
+                    if (ctx->info->loader.date[0])
+                    {   OUTMSG((" date=\"%s\"", ctx->info->loader.date)); }
+                    if (ctx->info->loader.name[0])
+                    {   OUTMSG((" name=\"%s\"", ctx->info->loader.name)); }
+                    if (ctx->info->loader.vers[0])
+                    {   OUTMSG((" vers=\"%s\"", ctx->info->loader.vers)); }
+                    OUTMSG(("/>\n"));
+                }
+                OUTMSG(("      </SOFTWARE>\n"));
+            }
+            if (ctx->info->loadTimestamp) {
+                char       buf[80];
+                struct tm* ts = localtime(&ctx->info->loadTimestamp);
+                strftime(buf, sizeof(buf), "%a %Y-%m-%d %H:%M:%S %Z", ts);
+                OUTMSG(("      <LOAD timestamp=\"%lX\">%s</LOAD>\n",
+                    ctx->info->loadTimestamp, buf));
+            }
+            OUTMSG(("    </Meta>\n  </Table>\n"));
+        }
+        if (rc == 0 && !ctx->pb->quick) {
+            rc2 = BasesPrint(&ctx->total->bases_count,
+                ctx->total->BASE_COUNT, "  ");
+        }
+        if (rc == 0 && !ctx->pb->skip_alignment) {
+            rc = process_align_info("  ", ctx);
+        }
+        if (rc == 0 && ctx->pb->statistics) {
+            rc = SraStatsTotalPrintStatistics(ctx->total, "  ", ctx->pb->test);
+        }
+        if (rc == 0 && ctx->pb->print_arcinfo) {
+            const ArcInfo* a = ctx->arc_info;
+            uint32_t i;
+            char b[1024];
+            time_t ts = a->timestamp;
+            struct tm* tm = localtime(&ts);
+
+            if( tm == NULL ) {
+                rc = RC(rcExe, rcData, rcReading, rcParam, rcInvalid);
+            }
+            else {
+                size_t k = strftime(b, sizeof(b), "%Y-%m-%dT%H:%M:%S", tm);
+                OUTMSG(("  <Archive timestamp=\"%.*s\"", k, b));
+                for(i = 0; i < sizeof(a->i) / sizeof(a->i[0]); i++) {
+                    OUTMSG((" size.%s=\"%lu\" md5.%s=\"%s\"",
+                        a->i[i].tag, a->i[i].size, a->i[i].tag, a->i[i].md5));
+                }
+                OUTMSG((" />\n"));
+            }
+        }
+        if (rc == 0)
+        {   rc = QualityStatsPrint(&ctx->quality, "  "); }
+        if (rc == 0)
+        {   rc = TableCountsPrint(&ctx->tables, "  "); }
+        OUTMSG(("</Run>\n"));
+    }
+    if (mismatch && ctx->pb->start == 0 && ctx->pb->stop == 0) {
+        /* check mismatch just when no --start, --stop specified */
+        LOGMSG(klogWarn,
+            "Mismatch between calculated and recorded statistics");
+    }
+    if (rc == 0 && rc2 != 0) {
+        rc = rc2;
+    }
+    return rc;
+}
+
+static
+void CC bst_whack_free ( BSTNode *n, void *ignore )
+{
+    SraStats* ss = (SraStats*)n;
+    BAM_HEADER_RG_free(&ss->BAM_HEADER);
+    free(ss);
+}
+
+static 
+int64_t CC srastats_sort ( const BSTNode *item, const BSTNode *n )
+{
+    const SraStats *ss = ( const SraStats* ) item;
+    return srastats_cmp(ss->spot_group,n);
+}
+
+static rc_t sra_stat(srastat_parms* pb, BSTree* tr,
+    SraStatsTotal* total, const VTable *vtbl)
+{
+    rc_t rc = 0;
+
+    const VCursor *curs = NULL;
+
+/*  const char CMP_READ  [] = "CMP_READ"; */
+    const char PRIMARY_ALIGNMENT_ID[] = "PRIMARY_ALIGNMENT_ID";
+    const char RD_FILTER [] = "RD_FILTER";
+    const char READ_LEN  [] = "READ_LEN";
+    const char READ_TYPE [] = "READ_TYPE";
+    const char SPOT_GROUP[] = "SPOT_GROUP";
+
+    uint32_t idxPRIMARY_ALIGNMENT_ID = 0;
+    uint32_t idxRD_FILTER = 0;
+    uint32_t idxREAD_LEN = 0;
+    uint32_t idxREAD_TYPE = 0;
+    uint32_t idxSPOT_GROUP = 0;
+
+    int g_nreads = 0;
+    int64_t  n_spots = 0;
+    int64_t start = 0;
+    int64_t stop  = 0;
+
+    /* filled with dREAD_LEN[i] for (spotid == start);
+       used to check fixedReadLength */
+    uint64_t g_totalREAD_LEN[MAX_NREADS];
+    uint64_t g_nonZeroLenReads[MAX_NREADS];
+    memset(g_totalREAD_LEN, 0, sizeof g_totalREAD_LEN);
+    memset(g_nonZeroLenReads, 0, sizeof g_nonZeroLenReads);
+
+    rc = VTableCreateCachedCursorRead(vtbl, &curs, DEFAULT_CURSOR_CAPACITY);
+    DISP_RC(rc, "Cannot VTableCreateCachedCursorRead");
+
+    if (rc == 0) {
+        rc = VCursorPermitPostOpenAdd(curs);
+        DISP_RC(rc, "Cannot VCursorPermitPostOpenAdd");
+    }
+
+    if (rc == 0) {
+        rc = VCursorOpen(curs);
+        DISP_RC(rc, "Cannot VCursorOpen");
+    }
+
+    assert(pb && vtbl && tr && total);
+
+    if (rc == 0) {
+        const char* name = READ_LEN;
+        rc = VCursorAddColumn(curs, &idxREAD_LEN, "%s", name);
+        DISP_RC2(rc, name, "while calling VCursorAddColumn");
+    }
+    if (rc == 0) {
+        const char* name = READ_TYPE;
+        rc = VCursorAddColumn(curs, &idxREAD_TYPE, "%s", name);
+        DISP_RC2(rc, name, "while calling VCursorAddColumn");
+    }
+
+    if (rc == 0) {
+        {
+            const char* name = SPOT_GROUP;
+            rc = VCursorAddColumn(curs, &idxSPOT_GROUP, "%s", name);
+            if (columnUndefined(rc)) {
+                idxSPOT_GROUP = 0;
+                rc = 0;
+            }
+            DISP_RC2(rc, name, "while calling VCursorAddColumn");
+        }
+        if (rc == 0) {
+            if (rc == 0) {
+                const char* name = RD_FILTER;
+                rc = VCursorAddColumn(curs, &idxRD_FILTER, "%s", name);
+                if (columnUndefined(rc)) {
+                    idxRD_FILTER = 0;
+                    rc = 0;
+                }
+                DISP_RC2(rc, name, "while calling VCursorAddColumn");
+            }
+/*          if (rc == 0) {
+                const char* name = CMP_READ;
+                rc = SRATableOpenColumnRead
+                    (tbl, &cCMP_READ, name, "INSDC:dna:text");
+                if (GetRCState(rc) == rcNotFound)
+                {   rc = 0; }
+                DISP_RC2(rc, name, "while calling SRATableOpenColumnRead");
+            } */
+            if (rc == 0) {
+                const char* name = PRIMARY_ALIGNMENT_ID;
+                rc = VCursorAddColumn(curs, &idxPRIMARY_ALIGNMENT_ID,
+                    "%s", name);
+                if (columnUndefined(rc)) {
+                    idxPRIMARY_ALIGNMENT_ID = 0;
+                    rc = 0;
+                }
+                DISP_RC2(rc, name, "while calling VCursorAddColumn");
+            }
+            if (rc == 0) {
+                int64_t first = 0;
+                uint64_t count = 0;
+                int64_t spotid;
+                pb->hasSPOT_GROUP = 0;
+                rc = VCursorIdRange(curs, 0, &first, &count);
+                DISP_RC(rc, "VCursorIdRange() failed");
+                if (rc == 0) {
+                    rc = BasesInit(&total->bases_count, vtbl);
+                }
+                if (rc == 0) {
+                    const KLoadProgressbar *pr = NULL;
+                    bool bad_read_filter = false;
+                    bool fixedNReads = true;
+                    bool fixedReadLength = true;
+
+                    uint32_t g_dREAD_LEN[MAX_NREADS];
+
+                    memset(g_dREAD_LEN, 0, sizeof g_dREAD_LEN);
+
+                    if (pb->start > 0) {
+                        start = pb->start;
+                        if (start < first) {
+                            start = first;
+                        }
+                    }
+                    else {
+                        start = first;
+                    }
+
+                    if (pb->stop > 0) {
+                        stop = pb->stop;
+                        if (stop > first + count) {
+                            stop = first + count;
+                        }
+                    }
+                    else {
+                        stop = first + count;
+                    }
+
+                    for (spotid = start; spotid < stop && rc == 0; ++spotid) {
+                        SraStats* ss;
+                        uint32_t dREAD_LEN  [MAX_NREADS];
+                        uint8_t  dREAD_TYPE [MAX_NREADS];
+                        uint8_t  dRD_FILTER [MAX_NREADS];
+                        char     dSPOT_GROUP[MAX_NREADS] = "NULL";
+
+                        const void* base;
+                        bitsz_t boff, row_bits;
+                        int nreads;
+
+                        rc = Quitting();
+                        if (rc != 0) {
+                            LOGMSG(klogWarn, "Interrupted");
+                        }
+
+                        if (rc == 0 && pb->progress && pr == NULL) {
+                            rc = KLoadProgressbar_Make(&pr, stop + 1 - start);
+                            if (rc != 0) {
+                                DISP_RC(rc, "cannot initialize progress bar");
+                                rc = 0;
+                                pr = NULL;
+                            }
+                            else if (stop - start > 99) {
+                                KLoadProgressbar_Process(pr, 0, true);
+                            }
+                        }
+
+                        if (rc == 0) {
+                            rc = VCursorColumnRead(curs, spotid,
+                                idxREAD_LEN, &base, &boff, &row_bits);
+                            DISP_RC_Read(rc, READ_LEN, spotid,
+                                "while calling VCursorColumnRead");
+                        }
+                        if (rc == 0) {
+                            if (boff & 7) {
+                                rc = RC(rcExe, rcColumn, rcReading,
+                                    rcOffset, rcInvalid);
+                            }
+                            if (row_bits & 7) {
+                                rc = RC(rcExe, rcColumn, rcReading,
+                                    rcSize, rcInvalid);
+                            }
+                            if ((row_bits >> 3) > sizeof(dREAD_LEN)) {
+                                rc = RC(rcExe, rcColumn, rcReading,
+                                    rcBuffer, rcInsufficient);
+                            }
+                            DISP_RC_Read(rc, READ_LEN, spotid,
+                                "after calling VCursorColumnRead");
+                        }
+                        if (rc == 0) {
+                            int i, bio_len, bio_count, bad_cnt, filt_cnt;
+                            memcpy(dREAD_LEN,
+                                ((const char*)base) + (boff>>3), row_bits >> 3);
+                            nreads = (row_bits >> 3) / sizeof(*dREAD_LEN);
+                            if (spotid == start) {
+                                g_nreads = nreads;
+                                if (pb->statistics) {
+                                    rc = SraStatsTotalMakeStatistics
+                                        (total, g_nreads);
+                                }
+                            }
+                            else if (g_nreads != nreads) {
+                                fixedNReads = false;
+                            }
+
+                            if (rc == 0) {
+                                rc = VCursorColumnRead(curs, spotid,
+                                    idxREAD_TYPE, &base, &boff, &row_bits);
+                                DISP_RC_Read(rc, READ_TYPE, spotid,
+                                    "while calling VCursorColumnRead");
+                                if (rc == 0) {
+                                    if (boff & 7) {
+                                        rc = RC(rcExe, rcColumn, rcReading,
+                                            rcOffset, rcInvalid);
+                                    }
+                                    if (row_bits & 7) {
+                                        rc = RC(rcExe, rcColumn, rcReading,
+                                            rcSize, rcInvalid);
+                                    }
+                                    if ((row_bits >> 3) > sizeof(dREAD_TYPE)) {
+                                        rc = RC(rcExe, rcColumn, rcReading,
+                                            rcBuffer, rcInsufficient);
+                                    }
+                                    if ((row_bits >> 3) !=  nreads) {
+                                        rc = RC(rcExe, rcColumn, rcReading,
+                                            rcData, rcIncorrect);
+                                    }
+                                    DISP_RC_Read(rc, READ_TYPE, spotid,
+                                        "after calling VCursorColumnRead");
+                                }
+                            }
+                            if (rc == 0) {
+                                memcpy(dREAD_TYPE,
+                                    ((const char*)base) + (boff >> 3),
+                                    row_bits >> 3);
+                                if (idxSPOT_GROUP != 0) {
+                                    rc = VCursorColumnRead(curs, spotid,
+                                        idxSPOT_GROUP, &base, &boff, &row_bits);
+                                    DISP_RC_Read(rc, SPOT_GROUP, spotid,
+                                        "while calling VCursorColumnRead");
+                                    if (rc == 0) {
+                                        if (row_bits > 0) {
+                                            if (boff & 7) {
+                                                rc = RC(rcExe, rcColumn,
+                                                    rcReading,
+                                                    rcOffset, rcInvalid);
+                                            }
+                                            if (row_bits & 7) {
+                                                rc = RC(rcExe, rcColumn,
+                                                    rcReading,
+                                                    rcSize, rcInvalid); }
+                                            if ((row_bits >> 3)
+                                                > sizeof(dSPOT_GROUP))
+                                            {
+                                                rc = RC(rcExe, rcColumn,
+                                                    rcReading,
+                                                    rcBuffer, rcInsufficient);
+                                            }
+                                            DISP_RC_Read(rc, SPOT_GROUP, spotid,
+                                               "after calling VCursorColumnRead"
+                                               );
+                                            if (rc == 0) {
+                                                int n = row_bits >> 3;
+                                                memcpy(dSPOT_GROUP,
+                                                  ((const char*)base)+(boff>>3),
+                                                  row_bits>>3);
+                                                dSPOT_GROUP[n]='\0';
+                                                if (n > 1 ||
+                                                    (n == 1 && dSPOT_GROUP[0]))
+                                                {
+                                                    pb -> hasSPOT_GROUP = 1;
+                                                }
+                                            }
+                                        }
+                                        else {
+                                            dSPOT_GROUP[0]='\0';
+                                        }
+                                    }
+                                    else {
+                                        break;
+                                    }
+                                }
+                            }
+                            if (rc == 0) {
+                                uint64_t cmp_len = 0; /* CMP_READ */
+                                if (idxRD_FILTER != 0) {
+                                    rc = VCursorColumnRead(curs, spotid,
+                                        idxRD_FILTER, &base, &boff, &row_bits);
+                                    DISP_RC_Read(rc, RD_FILTER, spotid,
+                                        "while calling VCursorColumnRead");
+                                    if (rc == 0) {
+                                        int size = row_bits >> 3;
+                                        if (boff & 7) {
+                                            rc = RC(rcExe, rcColumn, rcReading,
+                                                rcOffset, rcInvalid); }
+                                        if (row_bits & 7) {
+                                            rc = RC(rcExe, rcColumn, rcReading,
+                                                rcSize, rcInvalid);
+                                        }
+                                        if (size > sizeof dRD_FILTER) {
+                                            rc = RC(rcExe, rcColumn, rcReading,
+                                                rcBuffer, rcInsufficient);
+                                        }
+                                        DISP_RC_Read(rc, RD_FILTER, spotid,
+                                            "after calling VCursorColumnRead");
+                                        if (rc == 0) {
+                                            memcpy(dRD_FILTER,
+                                                ((const char*)base) + (boff>>3),
+                                                size);
+                                            if (size < nreads) {
+                             /* RD_FILTER is expected to have nreads elements */
+                                                if (size == 1) {
+                             /* fill all RD_FILTER elements with RD_FILTER[0] */
+                                                    int i = 0;
+                                                    for (i = 1; i < nreads;
+                                                        ++i)
+                                                    {
+                                                        memcpy(dRD_FILTER + i,
+                                                  ((const char*)base)+(boff>>3),
+                                                  1);
+                                                    }
+                                                    if
+                                                     (!bad_read_filter)
+                                                    {
+                                                        bad_read_filter = true;
+                                                        PLOGMSG(klogWarn,
+                                                            (klogWarn,
+             "RD_FILTER column size is 1 but it is expected to be $(n)",
+                                                            "n=%d", nreads));
+                                                    }
+                                                }
+                                                else {
+                                  /* something really bad with RD_FILTER column:
+                                     let's pretend it does not exist */
+                                                    idxRD_FILTER = 0;
+                                                    bad_read_filter = true;
+                                                    PLOGMSG(klogWarn,
+                                                        (klogWarn,
+             "RD_FILTER column size is $(real) but it is expected to be $(exp)",
+                                                        "real=%d,exp=%d",
+                                                        size, nreads));
+                                                }
+                                            }
+                                        }
+                                    }
+                                    else {
+                                        break;
+                                    }
+                                }
+                                if (idxPRIMARY_ALIGNMENT_ID != 0) {
+                                    rc = VCursorColumnRead(curs, spotid,
+                                        idxPRIMARY_ALIGNMENT_ID,
+                                        &base, &boff, &row_bits);
+                                    DISP_RC_Read(rc, PRIMARY_ALIGNMENT_ID,
+                                        spotid,
+                                        "while calling VCursorColumnRead");
+                                    if (boff & 7) {
+                                        rc = RC(rcExe, rcColumn, rcReading,
+                                            rcOffset, rcInvalid); }
+                                    if (row_bits & 7) {
+                                        rc = RC(rcExe, rcColumn, rcReading,
+                                            rcSize, rcInvalid);
+                                    }
+                                    DISP_RC_Read(rc, PRIMARY_ALIGNMENT_ID,
+                                       spotid,
+                                       "after calling calling VCursorColumnRead"
+                                       );
+                                    if (rc == 0) {
+                                        int i = 0;
+                                        const int64_t* pii = base;
+                                        assert(nreads);
+                                        for (i = 0; i < nreads; ++i) {
+                                            if (pii[i] == 0) {
+                                                cmp_len += dREAD_LEN[i];
+                                            }
+                                        }
+                                    }
+                                }
+/*                              if (cCMP_READ) {
+      rc = SRAColumnRead(cCMP_READ, spotid, &base, &boff, &row_bits);
+      DISP_RC_Read(rc, CMP_READ, spotid, "while calling SRAColumnRead");
+      if (boff & 7)
+      {   rc = RC(rcExe, rcColumn, rcReading, rcOffset, rcInvalid); }
+      if (row_bits & 7)
+      {   rc = RC(rcExe, rcColumn, rcReading, rcSize, rcInvalid); }
+      DISP_RC_Read(rc, CMP_READ, spotid, "after calling calling SRAColumnRead");
+      if (rc == 0)
+      {   assert(cmp_len == row_bits >> 3); }
+                                               } */
+
+                                ss = (SraStats*)BSTreeFind
+                                    (tr, dSPOT_GROUP, srastats_cmp);
+                                if (ss == NULL) {
+                                    ss = calloc(1, sizeof(*ss));
+                                    if (ss == NULL) {
+                                        rc = RC(rcExe, rcStorage, rcAllocating,
+                                            rcMemory, rcExhausted);
+                                        break;
+                                    }
+                                    else {
+                                        strcpy(ss->spot_group, dSPOT_GROUP);
+                                        BSTreeInsert
+                                            (tr, (BSTNode*)ss, srastats_sort);
+                                    }
+                                }
+                                ++ss->spot_count;
+                                ++total->spot_count;
+
+                                ss->total_cmp_len += cmp_len;
+                                total->total_cmp_len += cmp_len;
+
+                                BasesAdd(&total->bases_count, spotid);
+
+                                if (pb->statistics) {
+                                    SraStatsTotalAdd(total, dREAD_LEN, nreads);
+                                }
+                                for (bio_len = bio_count = i = bad_cnt
+                                        = filt_cnt = 0;
+                                    (i < nreads) && (rc == 0); i++)
+                                {
+                                    if (dREAD_LEN[i] > 0) {
+                                        g_totalREAD_LEN[i] += dREAD_LEN[i];
+                                        ++g_nonZeroLenReads[i];
+                                    }
+                                    if (spotid == start) {
+                                        g_dREAD_LEN[i] = dREAD_LEN[i];
+                                    }
+                                    else if (g_dREAD_LEN[i] != dREAD_LEN[i]) {
+                                        fixedReadLength = false;
+                                    }
+
+                                    if (dREAD_LEN[i] > 0) {
+                                        bool biological = false;
+                                        ss->total_len += dREAD_LEN[i];
+                                        total->BASE_COUNT += dREAD_LEN[i];
+                                        if ((dREAD_TYPE[i]
+                                            & SRA_READ_TYPE_BIOLOGICAL) != 0)
+                                        {
+                                            biological = true;
+                                            bio_len += dREAD_LEN[i];
+                                            bio_count++;
+                                        }
+                                        if (idxRD_FILTER != 0) {
+                                            switch (dRD_FILTER[i]) {
+                                                case SRA_READ_FILTER_PASS:
+                                                    break;
+                                                case SRA_READ_FILTER_REJECT:
+                                                case SRA_READ_FILTER_CRITERIA:
+                                                    if (biological) {
+                                                        ss->bad_bio_len
+                                                            += dREAD_LEN[i];
+                                                        total->bad_bio_len
+                                                            += dREAD_LEN[i];
+                                                    }
+                                                    bad_cnt++;
+                                                    break;
+                                                case SRA_READ_FILTER_REDACTED:
+                                                    if (biological) {
+                                                        ss->filtered_bio_len
+                                                            += dREAD_LEN[i];
+                                                        total->filtered_bio_len
+                                                            += dREAD_LEN[i];
+                                                    }
+                                                    filt_cnt++;
+                                                    break;
+                                                default:
+                                                    rc = RC(rcExe, rcColumn,
+                                                        rcReading,
+                                                        rcData, rcUnexpected);
+                                                    PLOGERR(klogInt,
+                                                        (klogInt, rc,
+    "spot=$(spot), read=$(read), READ_FILTER=$(val)", "spot=%lu,read=%d,val=%d",
+                                                        spotid, i,
+                                                        dRD_FILTER[i]));
+                                                    break;
+                                            }
+                                        }
+                                    }
+                                }
+                                ss->bio_len += bio_len;
+                                total->BIO_BASE_COUNT += bio_len;
+                                if (bio_count > 1) {
+                                    ++ss->spot_count_mates;
+                                    ++total->spot_count_mates;
+                                    ss->bio_len_mates += bio_len;
+                                    total->bio_len_mates += bio_len;
+                                }
+                                if (bad_cnt) {
+                                    ss->bad_spot_count++;
+                                    total->bad_spot_count++;
+                                }
+                                if (filt_cnt) {
+                                    ss->filtered_spot_count++;
+                                    total->filtered_spot_count++;
+                                }
+                            }
+
+                            if (rc == 0 && pb->progress) {
+                                KLoadProgressbar_Process(pr, 1, false);
+                            }
+                        }
+                    } /* for (spotid = start; spotid <= stop && rc == 0;
+                              ++spotid) */
+
+                    if (rc == 0) {
+                        BasesFinalize(&total->bases_count);
+                        pb->variableReadLength = !fixedReadLength;
+
+              /* --- g_totalREAD_LEN[i] is sum(READ_LEN[i]) for all spots --- */
+                        if (fixedNReads) {
+                            int i = 0;
+                            if (stop >= start) {
+                                n_spots = stop - start;
+                            }
+                            if (n_spots > 0) {
+                                for (i = 0; i < g_nreads && rc == 0; ++i) {
+                                    if (fixedReadLength) {
+                                        assert(g_totalREAD_LEN[i] / n_spots
+                                            == g_dREAD_LEN[i]);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    if (rc == 0) {
+                        KLoadProgressbar_Release(pr, true);
+                        pr = NULL;
+                    }
+                }
+            }
+        }
+    }
+
+    RELEASE(VCursor, curs);
+
+    if (pb->test && rc == 0) {
+        uint32_t idx = 0;
+        int i = 0;
+        int64_t spotid = 0;
+
+        double average[MAX_NREADS];
+        double diff_sq[MAX_NREADS];
+        SraStatsTotalStatistics2Init(total,
+            g_nreads, g_totalREAD_LEN, g_nonZeroLenReads);
+        memset(diff_sq, 0, sizeof diff_sq);
+        for (i = 0; i < g_nreads; ++i) {
+            average[i] = (double)g_totalREAD_LEN[i] / n_spots;
+        }
+
+        rc = VTableCreateCachedCursorRead(vtbl, &curs, DEFAULT_CURSOR_CAPACITY);
+        DISP_RC(rc, "Cannot VTableCreateCachedCursorRead");
+
+        if (rc == 0) {
+            const char* name = READ_LEN;
+            rc = VCursorAddColumn(curs, &idx, "%s", name);
+            DISP_RC(rc, "Cannot VCursorAddColumn(READ_LEN)");
+            if (rc == 0) {
+                rc = VCursorOpen(curs);
+                if (rc != 0) {
+                    PLOGERR(klogInt, (klogInt,
+                        rc, "Cannot VCursorOpen($(name))", "name=%s", name));
+                }
+            }
+        }
+
+        for (spotid = start; spotid < stop && rc == 0; ++spotid) {
+            uint32_t dREAD_LEN[MAX_NREADS];
+            const void* base;
+            bitsz_t boff, row_bits;
+            if (rc == 0) {
+                rc = VCursorColumnRead(curs, spotid,
+                    idx, &base, &boff, &row_bits);
+                DISP_RC_Read(rc, READ_LEN, spotid,
+                    "while calling VCursorColumnRead");
+            }
+            if (rc == 0) {
+                memcpy(dREAD_LEN, ((const char*)base) + (boff>>3), row_bits>>3);
+            }
+            for (i = 0; i < g_nreads; ++i) {
+                diff_sq[i] +=
+                    (dREAD_LEN[i] - average[i]) * (dREAD_LEN[i] - average[i]);
+            }
+            SraStatsTotalAdd2(total, dREAD_LEN);
+        }
+        RELEASE(VCursor, curs);
+    }
+
+    return rc;
+}
+
+static
+void CtxRelease(Ctx* ctx)
+{
+    assert(ctx);
+
+    QualityStatsRelease(&ctx->quality);
+    TableCountsRelease(&ctx->tables);
+
+    memset(ctx, 0, sizeof *ctx);
+}
+static
+rc_t run(srastat_parms* pb)
+{
+    rc_t rc = 0;
+    const VDBManager* vmgr = NULL;
+
+    assert(pb && pb->table_path);
+
+    rc = VDBManagerMakeRead(&vmgr, NULL);
+    if (rc != 0) {
+        LOGERR(klogInt, rc, "failed to open VDBManager");
+    }
+    else {
+        SraSizeStats sizes;
+        ArcInfo arc_info;
+        SraMeta info;
+        const VTable* vtbl = NULL;
+
+        VSchema *schema = NULL;
+
+        rc = VDBManagerMakeSRASchema(vmgr, &schema);
+        if (rc != 0) {
+            LOGERR(klogInt, rc, "cannot VDBManagerMakeSRASchema");
+        }
+        if (rc == 0) {
+            rc = VDBManagerOpenTableRead(vmgr, &vtbl,
+                schema, "%s", pb->table_path);
+            if (rc != 0 && GetRCObject(rc) == (enum RCObject)rcTable
+                        && GetRCState (rc) == rcIncorrect)
+            {
+                const char altname[] = "SEQUENCE";
+                const VDatabase *db = NULL;
+                rc_t rc2 = VDBManagerOpenDBRead(vmgr,
+                    &db, schema, pb->table_path);
+                if (rc2 == 0) {
+                    rc2 = VDatabaseOpenTableRead(db, &vtbl, "%s", altname);
+                    if (rc2 == 0) {
+                        rc = 0;
+                    }
+                }
+                VDatabaseRelease ( db );
+            }
+            if (rc != 0) {
+                PLOGERR(klogInt, (klogInt, rc,
+                    "'$(spec)'", "spec=%s", pb->table_path));
+            }
+        }
+        if (rc == 0) {
+            MetaDataStats stats;
+            SraStatsTotal total;
+            const KTable* ktbl = NULL;
+            const KMetadata* meta = NULL;
+            const VDatabase* db = NULL;
+
+            BSTree tr;
+            Ctx ctx;
+
+            BSTreeInit(&tr);
+            memset(&ctx, 0, sizeof ctx);
+
+            memset(&total, 0, sizeof total);
+
+            rc = VTableOpenKTableRead(vtbl, &ktbl);
+            DISP_RC(rc, "While calling VTableOpenKTableRead");
+            if (rc == 0) {
+                rc = KTableOpenMetadataRead(ktbl, &meta);
+                DISP_RC(rc, "While calling KTableOpenMetadataRead");
+            }
+            if (rc == 0) {
+                rc = VTableOpenParentRead(vtbl, &db);
+                DISP_RC2(rc, pb->table_path,
+                    "while calling VTableOpenParentRead");
+            }
+            if (rc == 0) {
+                rc = get_stats_meta(meta, &stats, pb->quick);
+                if (rc == 0) {
+                    if (pb->quick && !stats.found) {
+                        LOGMSG(klogWarn, "Statistics metadata not found: "
+                            "performing full table scan");
+                        pb->quick = false;
+                    }
+                }
+                rc = 0;
+            }
+            if (rc == 0) {
+                rc = get_size(&sizes, vtbl);
+            }
+            if (rc == 0 && pb->printMeta) {
+                rc = get_load_info(meta, &info);
+            }
+            if (rc == 0 && !pb->quick) {
+                rc = sra_stat(pb, &tr, &total, vtbl);
+            }
+            if (rc == 0 && pb->print_arcinfo ) {
+                rc = get_arc_info(pb->table_path, &arc_info, vmgr, vtbl);
+            }
+            if (rc == 0) {
+                rc = QualityStatsRead(&ctx.quality, meta);
+                if (rc == 0) {
+                    QualityStatsSort(&ctx.quality);
+                }
+            }
+            if (rc == 0) {
+                rc = TableCountsRead(&ctx.tables, db);
+                if (rc == 0) {
+                    TableCountsSort(&ctx.tables);
+                }
+            }
+            if (rc == 0) {
+                ctx.db = db;
+                ctx.info = &info;
+                ctx.meta = &stats;
+                ctx.pb = pb;
+                ctx.sizes = &sizes;
+                ctx.total = &total;
+                ctx.arc_info = &arc_info;
+                ctx.tr = &tr;
+                rc = print_results(&ctx);
+            }
+            BSTreeWhack(&tr, bst_whack_free, NULL);
+            SraStatsTotalFree(&total);
+            RELEASE(VDatabase, db);
+            RELEASE(KTable, ktbl);
+            {
+                int i; 
+                for (i = 0; i < stats.spotGroupN; ++i) {
+                    SraStatsMetaDestroy(&stats.spotGroup[i]);
+                }
+
+                SraStatsMetaDestroy(&stats.table);
+
+                free(stats.spotGroup);
+                stats.spotGroup = NULL;
+            }
+            CtxRelease(&ctx);
+            RELEASE(KMetadata, meta);
+        }
+        RELEASE(VSchema, schema);
+        RELEASE(VTable, vtbl);
+    }
+
+    RELEASE(VDBManager, vmgr);
+
+    return rc;
+}
+
+/* Usage */
+#define ALIAS_ALIGN    "a"
+#define OPTION_ALIGN   "alignment"
+
+#define ALIAS_ARCINFO  NULL
+#define OPTION_ARCINFO "archive-info"
+
+#define ALIAS_START    "b"
+#define OPTION_START   "start"
+
+#define ALIAS_STOP     "e"
+#define OPTION_STOP    "stop"
+
+#define ALIAS_SPT_D    "d"
+#define OPTION_SPT_D   "spot-desc"
+
+#define ALIAS_META     "m"
+#define OPTION_META    "meta"
+
+#define ALIAS_MEMBR    NULL
+#define OPTION_MEMBR   "member-stats"
+
+#define ALIAS_PROGRESS "p"
+#define OPTION_PROGRESS "show_progress"
+
+#define ALIAS_QUICK    "q"
+#define OPTION_QUICK   "quick"
+
+#define ALIAS_STATS    "s"
+#define OPTION_STATS   "statistics"
+
+#define ALIAS_TEST     "t"
+#define OPTION_TEST    "test"
+
+#define ALIAS_XML      "x"
+#define OPTION_XML     "xml"
+
+static const char * align_usage[] = { "print alignment info, default is on"
+                                                                   , NULL };
+static const char * spt_d_usage[] = { "print table spot descriptor", NULL };
+static const char * membr_usage[] = { "print member stats, default is on"
+                                                          , NULL };
+static const char *progress_usage[] = { "show the percentage of completion"
+                                                          , NULL };
+static const char * meta_usage[] = { "print load metadata", NULL };
+static const char * start_usage[] = { "starting spot id, default is 1", NULL };
+static const char * stop_usage[] = { "ending spot id, default is max", NULL };
+static const char * stats_usage[] = {
+       "calculate READ_LEN average and standard deviation", NULL };
+static const char * quick_usage[] = {
+   "quick mode: get statistics from metadata;", "do not scan the table", NULL };
+static const char * test_usage[] = {
+   "test READ_LEN average and standard deviation calculation", NULL };
+static const char * xml_usage[] = { "output as XML, default is text", NULL };
+static const char * arcinfo_usage[] = { "output archive info, default is off"
+                                                                    , NULL };
+
+OptDef Options[] = {
+      { OPTION_ALIGN   , ALIAS_ALIGN   , NULL, align_usage   , 1, true , false }
+    , { OPTION_SPT_D   , ALIAS_SPT_D   , NULL, spt_d_usage   , 1, false, false }
+    , { OPTION_MEMBR   , ALIAS_MEMBR   , NULL, membr_usage   , 1, true , false }
+    , { OPTION_PROGRESS, ALIAS_PROGRESS, NULL, progress_usage, 1, false, false }
+    , { OPTION_ARCINFO , ALIAS_ARCINFO , NULL, arcinfo_usage , 0, false, false }
+    , { OPTION_META    , ALIAS_META    , NULL, meta_usage    , 1, false, false }
+    , { OPTION_QUICK   , ALIAS_QUICK   , NULL, quick_usage   , 1, false, false }
+    , { OPTION_START   , ALIAS_START   , NULL, start_usage   , 1, true,  false }
+    , { OPTION_STATS   , ALIAS_STATS   , NULL, stats_usage   , 1, false, false }
+    , { OPTION_STOP    , ALIAS_STOP    , NULL, stop_usage    , 1, true,  false }
+    , { OPTION_TEST    , ALIAS_TEST    , NULL, test_usage    , 1, false, false }
+    , { OPTION_XML     , ALIAS_XML     , NULL, xml_usage     , 1, false, false }
+};
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg (
+        "\n"
+        "Usage:\n"
+        "  %s [options] table\n"
+        "\n"
+        "Summary:\n"
+        "  Display table statistics\n"
+        "\n", progname);
+}
+
+const char UsageDefaultName[] = "sra-stat";
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary (progname);
+
+    KOutMsg ("Options:\n");
+
+    HelpOptionLine(ALIAS_XML     , OPTION_XML     , NULL      , xml_usage);
+    HelpOptionLine(ALIAS_START   , OPTION_START   , "row-id"  , start_usage);
+    HelpOptionLine(ALIAS_STOP    , OPTION_STOP    , "row-id"  , stop_usage);
+    HelpOptionLine(ALIAS_META    , OPTION_META    , NULL      , meta_usage);
+    HelpOptionLine(ALIAS_QUICK   , OPTION_QUICK   , NULL      , quick_usage);
+    HelpOptionLine(ALIAS_MEMBR   , OPTION_MEMBR   , "on | off", membr_usage);
+    HelpOptionLine(ALIAS_ARCINFO , OPTION_ARCINFO , NULL      , arcinfo_usage);
+    HelpOptionLine(ALIAS_STATS   , OPTION_STATS   , NULL      , stats_usage);
+    HelpOptionLine(ALIAS_ALIGN   , OPTION_ALIGN   , "on | off", align_usage);
+    HelpOptionLine(ALIAS_PROGRESS, OPTION_PROGRESS, NULL      , progress_usage);
+    XMLLogger_Usage();
+
+    KOutMsg ("\n");
+
+    HelpOptionsStandard ();
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+
+/* KMain - EXTERN
+ *  executable entrypoint "main" is implemented by
+ *  an OS-specific wrapper that takes care of establishing
+ *  signal handlers, logging, etc.
+ *
+ *  in turn, OS-specific "main" will invoke "KMain" as
+ *  platform independent main entrypoint.
+ *
+ *  "argc" [ IN ] - the number of textual parameters in "argv"
+ *  should never be < 0, but has been left as a signed int
+ *  for reasons of tradition.
+ *
+ *  "argv" [ IN ] - array of NUL terminated strings expected
+ *  to be in the shell-native character set: ASCII or UTF-8
+ *  element 0 is expected to be executable identity or path.
+ */
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args* args = NULL;
+    rc_t rc = 0;
+
+    srastat_parms pb;
+    memset(&pb, 0, sizeof pb);
+
+    rc = ArgsMakeAndHandle(&args, argc, argv, 2, Options,
+        sizeof Options / sizeof(OptDef), XMLLogger_Args, XMLLogger_ArgsQty);
+    if (rc == 0) {
+        do {
+            uint32_t pcount = 0;
+            const char* pc = NULL;
+
+            {
+                rc = ArgsOptionCount (args, OPTION_START, &pcount);
+                if (rc != 0) {
+                    break;
+                }
+
+                if (pcount == 1) {
+                    rc = ArgsOptionValue (args, OPTION_START, 0, (const void **)&pc);
+                    if (rc != 0) {
+                        break;
+                    }
+
+                    pb.start = AsciiToU32 (pc, NULL, NULL);
+                }
+
+
+                rc = ArgsOptionCount (args, OPTION_STOP, &pcount);
+                if (rc != 0) {
+                    break;
+                }
+
+
+                if (pcount == 1) {
+                    rc = ArgsOptionValue (args, OPTION_STOP, 0, (const void **)&pc);
+                    if (rc != 0) {
+                        break;
+                    }
+
+                    pb.stop = AsciiToU32 (pc, NULL, NULL);
+                }
+
+
+                rc = ArgsOptionCount (args, OPTION_XML, &pcount);
+                if (rc != 0) {
+                    break;
+                }
+
+                if (pcount > 0) {
+                    pb.xml = true;
+                }
+            }
+
+            {
+                rc = ArgsOptionCount (args, OPTION_QUICK, &pcount);
+                if (rc != 0) {
+                    break;
+                }
+
+                if (pcount > 0) {
+                    pb.quick = true;
+                }
+
+
+                rc = ArgsOptionCount (args, OPTION_META, &pcount);
+                if (rc != 0) {
+                    break;
+                }
+
+                if (pcount > 0) {
+                    pb.printMeta = true;
+                }
+
+
+                rc = ArgsOptionCount (args, OPTION_MEMBR, &pcount);
+                if (rc != 0) {
+                    break;
+                }
+
+                if (pcount > 0) {
+                    const char* v = NULL;
+                    rc = ArgsOptionValue (args, OPTION_MEMBR, 0, (const void **)&v);
+                    if (rc != 0) {
+                        break;
+                    }
+                    if (!strcmp(v, "off")) {
+                        pb.skip_members = true;
+                    }
+                }
+            }
+
+            {
+                rc = ArgsOptionCount(args, OPTION_PROGRESS, &pcount);
+                if (rc != 0) {
+                    break;
+                }
+                if (pcount > 0) {
+                    KLogLevel l = KLogLevelGet();
+                    pb.progress = true;
+                    rc = ArgsOptionCount(args, OPTION_LOG_LEVEL, &pcount);
+                    if (rc == 0) {
+                        if (pcount == 0) {
+                            if (l < klogInfo) {
+                                KLogLevelSet(klogInfo);
+                            }
+                        }
+                        else if (l < klogInfo) {
+                            LOGMSG(klogWarn, "log-level was set: "
+                                "progress will not be shown");
+                        }
+                    }
+                }
+
+
+                rc = ArgsOptionCount (args, OPTION_ARCINFO, &pcount);
+                if (rc != 0) {
+                    break;
+                }
+
+                pb.print_arcinfo = pcount > 0;
+            }
+
+            {
+                rc = ArgsOptionCount (args, OPTION_ALIGN, &pcount);
+                if (rc != 0) {
+                    break;
+                }
+
+                if (pcount > 0) {
+                    const char* v = NULL;
+                    rc = ArgsOptionValue (args, OPTION_ALIGN, 0, (const void **)&v);
+                    if (rc != 0) {
+                        break;
+                    }
+                    if (!strcmp(v, "off")) {
+                        pb.skip_alignment = true;
+                    }
+                }
+
+
+                rc = ArgsOptionCount (args, OPTION_STATS, &pcount);
+                if (rc != 0) {
+                    break;
+                }
+
+                if (pcount > 0) {
+                    pb.statistics = true;
+                }
+
+
+                rc = ArgsOptionCount (args, OPTION_TEST, &pcount);
+                if (rc != 0) {
+                    break;
+                }
+
+                if (pcount > 0) {
+                    pb.test = pb.statistics = true;
+                }
+            }
+
+            {
+                rc = ArgsParamCount (args, &pcount);
+                if (rc != 0) {
+                    break;
+                }
+
+                if (pcount == 0) {
+                    MiniUsage (args);
+                    exit(1);
+                }
+
+
+                rc = ArgsParamValue (args, 0, (const void **)&pb.table_path);
+                if (rc != 0) {
+                    break;
+                }
+
+                if (pb.statistics && (pb.quick || ! pb.xml)) {
+                    KOutMsg("\n--" OPTION_STATS
+                        " option can be used just in XML NON-QUICK mode\n");
+                    MiniUsage (args);
+                    exit(1);
+                }
+
+                rc = XMLLogger_Make(&pb.logger, NULL, args);
+                if (rc != 0) {
+                    DISP_RC(rc, "cannot initialize XMLLogger");
+                    rc = 0;
+                }
+            }
+        } while (0);
+    }
+
+    if (rc == 0) {
+        rc = run(&pb);
+    }
+    else {
+        DISP_RC(rc, "while processing command line");
+    }
+
+    XMLLogger_Release(pb.logger);
+
+    {
+        rc_t rc2 = ArgsWhack(args);
+        if (rc == 0) {
+            rc = rc2;
+        }
+    }
+
+    return rc;
+}
diff --git a/tools/sra-stat/sra-stat.h b/tools/sra-stat/sra-stat.h
new file mode 100644
index 0000000..1415ae2
--- /dev/null
+++ b/tools/sra-stat/sra-stat.h
@@ -0,0 +1,42 @@
+#ifndef _h_sra_stat_tools_
+#define _h_sra_stat_tools_
+
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/defs.h> /* rc_t */
+
+struct KFile;
+struct VCursor;
+struct VTable;
+
+rc_t CC VCursorColumnRead(const struct VCursor *self, int64_t id,
+    uint32_t idx, const void **base, bitsz_t *offset, bitsz_t *size);
+
+rc_t CC VTableMakeSingleFileArchive(const struct VTable *self,
+    const struct KFile **sfa, bool lightweight);
+
+#endif /* _h_sra_stat_tools_ */
diff --git a/tools/sra-stat/sra.c b/tools/sra-stat/sra.c
new file mode 100644
index 0000000..b68e533
--- /dev/null
+++ b/tools/sra-stat/sra.c
@@ -0,0 +1,446 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*  A couple of function to ease migration from libsra to libvdb use.
+*  Maybe could be improved/optimized/removed later.
+*/
+
+#include "sra-stat.h" /* VTableMakeSingleFileArchive_ */
+
+#include <kdb/database.h> /* KDatabase */
+#include <kdb/kdb-priv.h> /* KDatabaseOpenDirectoryRead */
+#include <kdb/table.h> /* KTableRelease */
+
+#include <kfs/directory.h> /* KDirectory */
+#include <kfs/file.h> /* KFile */
+#include <kfs/toc.h> /* KDirectoryOpenTocFileRead */
+
+#include <klib/debug.h> /* DBGMSG */
+#include <klib/log.h> /* LOGERR */
+#include <klib/rc.h>
+#include <klib/vector.h> /* Vector */
+
+#include <vdb/cursor.h> /* VCursor */
+#include <vdb/database.h> /* VDatabase */
+#include <vdb/table.h> /* VTableOpenParentRead */
+#include <vdb/vdb-priv.h> /* VDatabaseOpenKDatabaseRead */
+
+#include <string.h> /* memcmp */
+
+#define DISP_RC(rc, msg) (void)((rc == 0) ? 0 : LOGERR(klogInt, rc, msg))
+
+#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
+    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
+
+/* sfa_sort
+ *  reorders list
+ */
+enum sfa_path_type_id {
+    sfa_not_set = -1,
+    sfa_exclude,
+    sfa_non_column,
+    sfa_required,
+    sfa_preferred,
+    sfa_optional
+};
+#if _DEBUGGING
+static const char* sfa_path_type_id[] = {
+    "not_set",
+    "exclude",
+    "non_column",
+    "required",
+    "preferred",
+    "optional"
+};
+#endif
+
+#define MATCH( ptr, str ) \
+    ( (memcmp(ptr, str, sizeof(str) - 2) == 0 && \
+       ((ptr)[sizeof(str) - 2] == '\0' || (ptr)[sizeof(str) - 2] == '/')) \
+        ? (ptr) += sizeof(str) - (((ptr)[sizeof(str) - 2] == '/') ? 1 : 2) \
+        : (const char*) 0)
+
+static
+enum sfa_path_type_id CC sfa_path_type_tbl( const char *path )
+{
+    /* use first character as distinguisher for match */
+    switch ( path [ 0 ] )
+    {
+    case 'c':
+        /* perhaps it's a column */
+        if ( MATCH ( path, "col/" ) )
+        {
+            switch ( path [ 0 ] )
+            {
+            case 'D':
+                if ( MATCH ( path, "DELETION_QV/" ) )
+                    return sfa_optional;
+                if ( MATCH ( path, "DELETION_TAG/" ) )
+                    return sfa_optional;
+                break;
+            case 'H':
+                if ( MATCH ( path, "HOLE_NUMBER/" ) )
+                    return sfa_optional;
+                if ( MATCH ( path, "HOLE_STATUS/" ) )
+                    return sfa_optional;
+                break;
+            case 'I':
+                if ( MATCH ( path, "INTENSITY/" ) )
+                    return sfa_optional;
+                if ( MATCH ( path, "INSERTION_QV/" ) )
+                    return sfa_optional;
+                break;
+            case 'N':
+                if ( MATCH ( path, "NAME_FMT/" ) )
+                    return sfa_preferred;
+                if ( MATCH ( path, "NAME/" ) )
+                    return sfa_preferred;
+                if ( MATCH ( path, "NOISE/" ) )
+                    return sfa_optional;
+                if ( MATCH ( path, "NUM_PASSES/" ) )
+                    return sfa_optional;
+                break;
+            case 'P':
+                if ( MATCH ( path, "POSITION/" ) )
+                    return sfa_optional;
+                if ( MATCH ( path, "PRE_BASE_FRAMES/" ) )
+                    return sfa_optional;
+                if ( MATCH ( path, "PULSE_INDEX/" ) )
+                    return sfa_optional;
+                break;
+            case 'Q':
+                if ( MATCH ( path, "QUALITY2/" ) )
+                    return sfa_optional;
+                break;
+            case 'S':
+                if ( MATCH ( path, "SIGNAL/" ) )
+                    return sfa_optional;
+                if ( MATCH ( path, "SPOT_NAME/" ) )
+                    return sfa_preferred;
+                if ( MATCH ( path, "SUBSTITUTION_QV/" ) )
+                    return sfa_optional;
+                if ( MATCH ( path, "SUBSTITUTION_TAG/" ) )
+                    return sfa_optional;
+                break;
+            case 'W':
+                if ( MATCH ( path, "WIDTH_IN_FRAMES/" ) )
+                    return sfa_optional;
+                break;
+            case 'X':
+            case 'Y':
+                if ( path [ 1 ] == '/' )
+                    return sfa_preferred;
+                break;
+            }
+        }
+        return sfa_required;
+
+    case 'i':
+        /* look for skey index */
+        if ( MATCH ( path, "idx/skey" ) )
+            if ( path [ 0 ] == 0 || strcmp ( path, ".md5" ) == 0 )
+                return sfa_preferred;
+        if ( MATCH ( path, "idx/fuse-" ) )
+            return sfa_exclude;
+        break;
+
+    case 's':
+        /* look for old skey index */
+        if ( MATCH ( path, "skey" ) )
+            if ( path [ 0 ] == 0 || strcmp ( path, ".md5" ) == 0 )
+                return sfa_preferred;
+        break;
+    }
+    /* anything not recognized is non-column required */
+    return sfa_non_column;
+}
+
+static
+enum sfa_path_type_id CC sfa_path_type_db ( const char *path )
+{
+    /* use first character as distinguisher for match */
+    switch ( path [ 0 ] )
+    {
+    case 't':
+        /* perhaps it's a table */
+        if ( MATCH ( path, "tbl/" ) )
+        {
+            switch ( path [ 0 ] )
+            {
+            case 0:
+                return sfa_non_column;
+            case 'S':
+                if ( MATCH ( path, "SEQUENCE/" ) )
+                    return sfa_path_type_tbl(path);
+                break;
+            case 'C':
+                if ( MATCH ( path, "CONSENSUS/" ) )
+                    return sfa_path_type_tbl(path);
+                break;
+            case 'P':
+                if ( MATCH ( path, "PRIMARY_ALIGNMENT/" ) )
+                    return sfa_path_type_tbl(path);
+                break;
+            case 'R':
+                if ( MATCH ( path, "REFERENCE/" ) )
+                    return sfa_path_type_tbl(path);
+                break;
+            }
+            /* all other tables are optional */
+            return sfa_optional;
+        }
+    }
+    /* anything not recognized is non-column required */
+    return sfa_non_column;
+}
+
+typedef enum sfa_path_type_id (CC *sfa_path_type_func)( const char *path );
+
+typedef
+struct to_nv_data_struct
+{
+    const KDirectory * d;
+    Vector * v;
+    rc_t rc;
+    sfa_path_type_func path_type;
+} to_nv_data;
+
+/* sfa_filter
+ *  if a name is found in list, exclude it
+ */
+#define DEBUG_SORT(msg) DBGMSG (DBG_APP, DBG_FLAG(DBG_APP_0), msg)
+
+typedef struct reorder_t_struct {
+    const char * path;
+    uint64_t     size;
+    enum sfa_path_type_id type_id;
+} reorder_t;
+
+static
+void CC to_nv (void * _item, void * _data)
+{
+    const char* path = _item;
+    to_nv_data* data = _data;
+    reorder_t* obj;
+
+    if (data->rc == 0)
+    {
+        obj = malloc (sizeof (*obj));
+        if (obj == NULL)
+            data->rc
+            = RC(rcSRA, rcVector, rcConstructing, rcMemory, rcExhausted);
+        else
+        {
+            rc_t rc = KDirectoryFileSize (data->d, &obj->size, "%s", path);
+            if (rc == 0)
+            {
+                obj->path = path;
+                obj->type_id = data->path_type(path);
+                rc = VectorAppend (data->v, NULL, obj);
+            }
+
+            if (rc)
+            {
+                free (obj);
+                data->rc = rc;
+            }
+        }
+    }
+}
+
+static
+int64_t CC sfa_path_cmp ( const void **_a, const void **_b, void * ignored )
+{
+    const reorder_t * a = *_a;
+    const reorder_t * b = *_b;
+    int ret;
+
+    DEBUG_SORT(("%s enter\t%s %s %lu \t%s %s %lu", __func__, 
+                a->path, sfa_path_type_id[a->type_id + 1], a->size,
+                b->path, sfa_path_type_id[b->type_id + 1], b->size));
+
+    ret = a->type_id - b->type_id;
+    if (ret == 0)
+    {
+        if (a->size > b->size)
+            ret = 1;
+        else if (a->size < b->size)
+            ret = -1;
+        else
+            ret = strcmp (a->path, b->path);
+    }
+    DEBUG_SORT(("\t%d\n", ret));
+    return ret;
+}
+
+static
+void CC item_whack (void * item, void * ignored)
+{
+    free (item);
+}
+
+static
+rc_t CC sfa_sort(const KDirectory *dir, Vector *v, sfa_path_type_func func) {
+    /* assume "v" is a vector of paths - hopefully relative to "dir" */
+    Vector nv;
+    to_nv_data data;
+    uint32_t base;
+
+    DEBUG_SORT(("%s enter\n", __func__));
+
+    base = VectorStart (v);
+    VectorInit (&nv, base, VectorLength (v));
+    data.d = dir;
+    data.v = &nv;
+    data.rc = 0;
+    data.path_type = func;
+
+    VectorForEach (v, false, to_nv, &data);
+
+    if(data.rc == 0) {
+        uint32_t idx = 0;
+        uint32_t limit = VectorLength (v) + base;
+
+        VectorReorder(&nv, sfa_path_cmp, NULL);
+
+        for (idx = base; idx < limit; ++idx) {
+            const reorder_t * tmp;
+            void * ignore;
+
+            tmp = VectorGet (&nv, idx);
+            data.rc = VectorSwap (v, idx + base, tmp->path, &ignore);
+            if(data.rc) {
+                break;
+            }
+        }
+    }
+    VectorWhack (&nv, item_whack, NULL);
+    DEBUG_SORT(("%s exit %d %R\n", __func__, data.rc, data.rc));
+    return data.rc;
+}
+
+static rc_t CC sfa_sort_db(const KDirectory *dir, Vector *v) {
+    return sfa_sort(dir, v, sfa_path_type_db);
+}
+
+static
+bool CC sfa_filter(const KDirectory *dir, const char *leaf, void* func)
+{
+    bool ret = true;
+    sfa_path_type_func f = (sfa_path_type_func)func;
+    enum sfa_path_type_id type = f(leaf);
+
+    ret = type >= sfa_non_column;
+    DEBUG_SORT(("%s: %s %s %s\n",
+        __func__, leaf, sfa_path_type_id[type + 1], ret ? "keep" : "drop"));
+    return ret;
+}
+
+static
+bool CC sfa_filter_light(const KDirectory *dir, const char *leaf, void* func)
+{
+    bool ret = true;
+    sfa_path_type_func f = (sfa_path_type_func)func;
+
+    enum sfa_path_type_id type = f(leaf);
+
+    ret = type >= sfa_non_column && type < sfa_optional;
+    DEBUG_SORT(("%s: %s %s %s\n",
+        __func__, leaf, sfa_path_type_id[type + 1], ret ? "keep" : "drop"));
+    return ret;
+}
+
+static rc_t CC sfa_sort_tbl(const KDirectory *dir, Vector *v) {
+    return sfa_sort(dir, v, sfa_path_type_tbl);
+}
+
+rc_t CC VTableMakeSingleFileArchive(const VTable *self,
+    const KFile **sfa, bool  lightweight)
+{
+    const VDatabase *db = NULL;
+    rc_t rc = VTableOpenParentRead(self, &db);
+
+    assert(sfa);
+
+    *sfa = NULL;
+
+    if (rc == 0 && db != NULL) {
+        const KDatabase *kdb = NULL;
+        const KDirectory *db_dir = NULL;
+        rc = VDatabaseOpenKDatabaseRead(db, &kdb);
+        DISP_RC(rc, "VDatabaseOpenKDatabaseRead");
+
+        if (rc == 0) {
+            rc = KDatabaseOpenDirectoryRead(kdb, &db_dir);
+            DISP_RC(rc, "KDatabaseOpenDirectoryRead");
+        }
+
+        if (rc == 0) {
+            rc = KDirectoryOpenTocFileRead(db_dir, sfa, sraAlign4Byte,
+                lightweight ? sfa_filter_light : sfa_filter,
+                (void *)sfa_path_type_db, sfa_sort_db);
+        }
+
+        RELEASE(KDirectory, db_dir);
+        RELEASE(KDatabase, kdb);
+    }
+    else {
+        const KTable *ktbl = NULL;
+        rc = VTableOpenKTableRead(self, &ktbl);
+        if (rc == 0) {
+            const KDirectory *tbl_dir = NULL;
+            rc = KTableGetDirectoryRead(ktbl, &tbl_dir);
+            if (rc == 0) {
+                rc = KDirectoryOpenTocFileRead(tbl_dir, sfa, sraAlign4Byte,
+                    lightweight ? sfa_filter_light : sfa_filter,
+                    (void *)sfa_path_type_tbl, sfa_sort_tbl);
+                KDirectoryRelease( tbl_dir );
+                KTableRelease(ktbl);
+            }
+        }
+    }
+
+    RELEASE(VDatabase, db);
+
+    return rc;
+}
+
+rc_t CC VCursorColumnRead(const VCursor *self, int64_t id,
+    uint32_t idx, const void **base, bitsz_t *offset, bitsz_t *size)
+{
+    uint32_t elem_bits = 0, elem_off = 0, elem_cnt = 0;
+    rc_t rc = VCursorCellDataDirect(self, id, idx,
+        &elem_bits, base, &elem_off, &elem_cnt);
+
+    assert(offset && size);
+
+    if (rc == 0) {
+        *offset = elem_off * elem_bits;
+        *size   = elem_cnt * elem_bits;
+    }
+    else {
+        *offset = *size = 0;
+    }
+
+    return rc;
+}
diff --git a/libs/svdb/.gitignore b/tools/sra/.cvsignore
similarity index 100%
copy from libs/svdb/.gitignore
copy to tools/sra/.cvsignore
diff --git a/tools/sra/Makefile b/tools/sra/Makefile
new file mode 100644
index 0000000..fea3026
--- /dev/null
+++ b/tools/sra/Makefile
@@ -0,0 +1,77 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/sra
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+	table-vers
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# table-vers
+#
+TABLE_VERS_SRC = \
+	table-vers
+
+TABLE_VERS_OBJ = \
+	$(addsuffix .$(OBJX),$(TABLE_VERS_SRC))
+
+TABLE_VERS_LIB = \
+	-lkapp \
+	-stk-version \
+	-lncbi-vdb \
+	-lm
+
+$(BINDIR)/table-vers: $(TABLE_VERS_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(TABLE_VERS_LIB)
+
diff --git a/tools/sra/sra-dbcc.c b/tools/sra/sra-dbcc.c
new file mode 100644
index 0000000..da6c00d
--- /dev/null
+++ b/tools/sra/sra-dbcc.c
@@ -0,0 +1,435 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+#include <kapp/main.h>
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <klib/namelist.h>
+#include <klib/container.h>
+#include <klib/debug.h>
+#include <kdb/manager.h>
+#include <kdb/database.h>
+#include <kdb/table.h>
+#include <kdb/column.h>
+#include <kdb/namelist.h>
+#include <kdb/meta.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/md5.h>
+#include <kfs/arc.h>
+#include <kfs/sra.h>
+#include <sysalloc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+rc_t CC Usage ( struct Args const * args ) { return 0; }
+
+static rc_t ValidateColumn(const KColumn *col,
+                           const char *name,
+                           int64_t start, int64_t stop,
+                           int64_t *min, int64_t *max,
+                           bool *gapped)
+{
+    rc_t rc;
+    int64_t row;
+    const KColumnBlob *blob;
+    
+    for (row = start; (rc = Quitting()) == 0 && row < stop; ) {
+        int64_t first;
+        uint32_t count;
+        
+        rc = KColumnOpenBlobRead(col, &blob, row);
+        if (rc == 0) {
+            rc = KColumnBlobIdRange(blob, &first, &count);
+            if (rc == 0)
+                rc = KColumnBlobValidate(blob);
+            rc = KColumnBlobRelease(blob);
+        }
+        if (rc) {
+            PLOGERR(klogErr, (klogErr, rc, "$(column) rows $(start) to $(stop)", PLOG_3(PLOG_S(column), PLOG_I64(start), PLOG_I64(stop)), name, first, first + count));
+            return rc;
+        }
+        if (row != first)
+            *gapped |= true;
+        if (row == start)
+            *min = first;
+        row = first + count;
+        *max = row;
+    }
+    if (row != stop)
+        *gapped |= true;
+    return rc;
+}
+
+static
+rc_t CheckTable(const char path[])
+{
+    rc_t rc;
+    const KDBManager *mgr;
+    bool gapped = false;
+    bool allsame = true;
+    int64_t first_row;
+    int64_t last_row;
+    
+    PLOGMSG(klogInfo, (klogInfo, "verifying column data for '$(path)'", PLOG_S(path), path));
+    rc = KDBManagerMakeRead(&mgr, NULL);
+    if (rc == 0) {
+        const KTable* tbl;
+        
+        rc = KDBManagerOpenTableRead(mgr, &tbl, "%s", path);
+        if (rc == 0) {
+            KNamelist *names;
+            
+            rc = KTableListCol(tbl, &names);
+            if (rc == 0) {
+                uint32_t count;
+                rc = KNamelistCount(names, &count);
+                if (rc == 0) {
+                    unsigned i;
+                    const char *colname;
+                    
+                    for (i = 0; i != count && rc == 0; ++i) {
+                        rc = KNamelistGet(names, i, &colname);
+                        if (rc == 0) {
+                            const KColumn *kcol;
+                            
+                            rc = KTableOpenColumnRead(tbl, &kcol, "%s", colname);
+                            if (rc == 0) {
+                                int64_t start;
+                                uint64_t rcount;
+                                int64_t min;
+                                int64_t max;
+                                
+                                rc = KColumnIdRange(kcol, &start, &rcount);
+                                if (rc == 0) {
+                                    PLOGMSG(klogInfo, (klogInfo, "validating data for column '$(name)'...", PLOG_S(name), colname));
+                                    rc = ValidateColumn(kcol, colname, start, start + rcount, &min, &max, &gapped);
+                                    if (rc == 0) {
+                                        PLOGMSG(klogInfo, (klogInfo, "data for column '$(name)' ok", PLOG_S(name), colname));
+                                        if (i == 0) {
+                                            first_row = min;
+                                            last_row = max;
+                                        }
+                                        else if (first_row != min || last_row != max)
+                                            allsame = false;
+                                    }
+                                    else {
+                                        PLOGERR(klogErr, (klogErr, rc, "data for column '$(name)'", PLOG_S(name), colname));
+                                    }
+
+                                    rc = 0;
+                                }
+                                else {
+                                    PLOGERR(klogErr, (klogErr, rc, "KColumn '$(name)'", PLOG_S(name), colname));
+                                    rc = 0;
+                                }
+                                KColumnRelease(kcol);
+                            }
+                            else {
+                                PLOGERR(klogErr, (klogErr, rc, "KColumn '$(name)'", PLOG_S(name), colname));
+                                rc = 0;
+                            }
+                        }
+                        else {
+                            PLOGERR(klogErr, (klogErr, rc, "KColumn #$(number)", PLOG_U32(number), (uint32_t)i));
+                            rc = 0;
+                        }
+                    }
+                }
+                else {
+                    PLOGERR(klogErr, (klogErr, rc, "KNamelistCount", ""));
+                }
+            }
+            KTableRelease(tbl);
+        }
+        else {
+            PLOGERR(klogErr, (klogErr, rc, "KTable '$(name)'", PLOG_S(name), path));
+        }
+        KDBManagerRelease(mgr);
+    }
+    else {
+        PLOGERR(klogErr, (klogErr, rc, "KDBManagerMakeRead", ""));
+    }
+    return rc;
+}
+
+typedef struct CheckMD5Node_struct {
+    BSTNode dad;
+    char file[4096];
+    bool md5;
+    uint8_t digest[16];
+} CheckMD5Node;
+
+typedef struct CheckMD5_Data_struct {
+    BSTree files;
+    bool md5;
+    uint8_t digest[16];
+} CheckMD5_Data;
+
+static
+int CC CheckMD5Node_Cmp( const BSTNode *item, const BSTNode *n )
+{
+    return strcmp(((CheckMD5Node*)item)->file, ((CheckMD5Node*)n)->file);
+}
+
+static
+rc_t CC CheckMD5Visitor(const KDirectory *dir, uint32_t type, const char *name, void *data)
+{
+    rc_t rc = 0;
+    CheckMD5_Data* d = (CheckMD5_Data*)data;
+    
+    if(type == kptFile ) {
+        if( strcmp(name, "md5") == 0 || strcmp(&name[strlen(name) - 4], ".md5") == 0 ) {
+            const KFile* kfmd5;
+            if( (rc = KDirectoryOpenFileRead(dir, &kfmd5, "%s", name)) == 0 ) {
+                const KMD5SumFmt *md5;
+                if( (rc = KMD5SumFmtMakeRead(&md5, kfmd5)) == 0 ) {
+                    uint32_t count = 0;
+                    if( (rc = KMD5SumFmtCount(md5, &count)) == 0 ) {
+                        char buf[4096];
+                        bool bin;
+                        do {
+                            if( (rc = KMD5SumFmtGet(md5, --count, buf, sizeof(buf) - 1, d->digest, &bin)) == 0 ) {
+                                DBGMSG(DBG_APP, 0, ("md5 for $(nm) ", PLOG_S(nm), buf));
+                                d->md5 = true;
+                                rc = CheckMD5Visitor(dir, kptFile, buf, data);
+                                d->md5 = false;
+                            }
+                        } while( rc == 0 && count > 0 );
+                    }
+                    rc = KMD5SumFmtRelease(md5);
+                } else {
+                    KFileRelease(kfmd5);
+                }
+            }
+        } else {
+            CheckMD5Node* node = calloc(1, sizeof(*node));
+            if( (rc = KDirectoryResolvePath(dir, true, node->file, sizeof(node->file) - 1, "%s", name)) == 0 ) {
+                BSTNode* existing = NULL;
+                if( (rc = BSTreeInsertUnique(&d->files, &node->dad, &existing, CheckMD5Node_Cmp)) == 0 ) {
+                    DBGMSG(DBG_APP, 0, ("adding $(nm) ", PLOG_S(nm), node->file));
+                    if( d->md5 ) {
+                        node->md5 = true;
+                        memcpy(node->digest, d->digest, sizeof(d->digest));
+                    }
+                } else if( GetRCState(rc) == rcExists ) {
+                    DBGMSG(DBG_APP, 0, ("updating $(nm) ", PLOG_S(nm), node->file));
+                    if( d->md5 ) {
+                        ((CheckMD5Node*)existing)->md5 = true;
+                        memcpy(((CheckMD5Node*)existing)->digest, d->digest, sizeof(d->digest));
+                    }
+                    free(node);
+                    rc = 0;
+                }
+                if( rc != 0 ) {
+                    free(node);
+                }
+            }
+        }
+    } else if( (type != kptDir) && !(type & kptAlias) ) {
+        rc = RC(rcExe, rcTable, rcVisiting, rcDirEntry, rcInvalid);
+        PLOGERR(klogInfo, (klogInfo, rc, "$(nm)", PLOG_S(nm), name));
+    }
+    return rc;
+}
+
+typedef struct CheckMD5_WalkData_struct {
+    const KDirectory* dir;
+    rc_t rc;
+} CheckMD5_WalkData;
+
+static
+bool CC CheckMD5_Walk( BSTNode *n, void *data )
+{
+    rc_t rc = 0;
+    CheckMD5Node* m = (CheckMD5Node*)n;
+    CheckMD5_WalkData* d = (CheckMD5_WalkData*)data;
+    
+    if( m->md5 ) {
+        const KFile* kf;
+        DBGMSG(DBG_APP, 0, ("verifying $(nm) ", PLOG_S(nm), m->file));
+        if( (rc = KDirectoryOpenFileRead(d->dir, &kf, "%s", m->file)) == 0 ) {
+            const KFile* kfmd5;
+            if( (rc = KFileMakeMD5Read(&kfmd5, kf, m->digest)) == 0 ) {
+                char buf[10240];
+                size_t nr;
+                if( (rc = KFileRead(kfmd5, ~0, buf, sizeof(buf), &nr)) != 0 ) {
+                    PLOGERR(klogErr, (klogErr, rc, "MD5 check failed for file $(name)", PLOG_S(name), m->file));
+                }
+                KFileRelease(kfmd5);
+            } else {
+                KFileRelease(kf);
+            }
+        }
+    } else if( strcmp(&m->file[strlen(m->file) - 5 ], "/lock") != 0 &&
+              strcmp(&m->file[strlen(m->file) - 7 ], "/sealed") != 0) {
+        rc = RC(rcExe, rcTable, rcValidating, rcConstraint, rcInconsistent);
+        PLOGERR(klogWarn, (klogWarn, rc, "missing MD5 for file $(name)", PLOG_S(name), m->file));
+    }
+    d->rc = rc ? rc : d->rc;
+    if( d->rc == 0 && (d->rc = Quitting()) != 0 ) {
+        return true;
+    }
+    return false;
+}
+
+static
+rc_t CheckMD5(const char* path)
+{
+    rc_t rc = 0;
+    const KDirectory* dir = NULL;
+    
+    PLOGMSG(klogInfo, (klogInfo, "verifying MD5 for '$(path)'", PLOG_S(path), path));
+    if( (rc = KDirectoryNativeDir((KDirectory**)&dir)) == 0 ) {
+        uint32_t type = KDirectoryPathType(dir, "%s", path) & ~kptAlias;
+        
+        if( type == kptFile ) {
+            const KDirectory* adir = NULL;
+            
+            rc = KDirectoryOpenSraArchiveRead(dir, &adir, true, "%s", path);
+            if (rc == 0 ) {
+                KDirectoryRelease(dir);
+                dir = adir;
+                path = ".";
+            }
+        } else if( type != kptDir ) {
+            rc = RC(rcExe, rcTable, rcValidating, rcArc, rcUnknown);
+        }
+        if( rc == 0 ) {
+            CheckMD5_Data data;
+            BSTreeInit(&data.files);
+            data.md5 = false;
+            if( (rc = KDirectoryVisit(dir, true, CheckMD5Visitor, &data, "%s", path)) == 0 ) {
+                CheckMD5_WalkData wd;
+                wd.dir = dir;
+                wd.rc = 0;
+                BSTreeDoUntil(&data.files, false, CheckMD5_Walk, &wd);
+                rc = wd.rc;
+                LOGERR(rc ? klogErr : klogInfo, rc, "verifying MD5");
+            }
+        }
+        KDirectoryRelease(dir);
+    }
+    return rc;
+}
+
+
+static char const* const defaultLogLevel = 
+#if _DEBUGGING
+"debug5";
+#else
+"info";
+#endif
+
+/*******************************************************************************
+ * Usage
+ *******************************************************************************/
+static void usage(const char *progName)
+{
+    const char* p = strrchr(progName, '/');
+    p = p ? p + 1 : progName;
+    printf("\nUsage: %s [options] table\n\n", p);
+    printf(
+           "    -5, --md5        Check components md5s if present, fail otherwise, unless other checks are requested (default: yes)\n"
+           "    -b, --blob-crc   Check blobs CRC32 (default: no)\n"
+/*           "    -i, --index      Check 'skey' index (default: no)\n"*/
+           "\n"
+           "    -h, --help       This help\n"
+           "    -v, --version    Program version\n"
+           "\n");
+}
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    rc_t rc = 0;
+    int i;
+    const char* arg;
+    const char* src_path = "missing parameter";
+    bool md5_chk = true, md5_chk_explicit = false;
+    bool blob_crc = false;
+    bool index_chk = false;
+
+    KLogLevelSet(klogInfo);
+    
+    for(i = 1; rc == 0 && i < argc; i++) {
+        if( argv[i][0] != '-' ) {
+            src_path = argv[i];
+            break;
+        } else if(strcmp(argv[i], "-5") == 0 || strcmp(argv[i], "--md5") == 0 ) {
+            md5_chk_explicit = true;
+        } else if(strcmp(argv[i], "-b") == 0 || strcmp(argv[i], "--blob-crc") == 0 ) {
+            blob_crc = true;
+/*        } else if(strcmp(argv[i], "-i") == 0 || strcmp(argv[i], "--index") == 0 ) {
+            index_chk = true;
+*/
+        } else if(strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0 ) {
+            usage(argv[0]);
+            return 0;
+        } else if(strcmp(argv[i], "-v") == 0 || strcmp(argv[i], "--version") == 0 ) {
+            printf("Version: %u.%u.%u\n", KAppVersion() >> 24, (KAppVersion() >> 16) & 0xFF, KAppVersion() & 0xFFFF);
+            return 0;
+        } else {
+            usage(argv[0]);
+            rc = RC(rcExe, rcArgv, rcReading, rcParam, rcUnknown);
+        }
+    }
+    if(i != argc - 1) {
+        usage(argv[0]);
+        rc = RC(rcExe, rcArgv, rcReading, rcParam, rcUnexpected);
+    }
+    
+    if( rc != 0 ) {
+    }
+    else if( src_path == NULL ) {
+        rc = RC(rcExe, rcArgv, rcReading, rcParam, rcNotFound);
+    }
+    else {
+        if( blob_crc || index_chk ) {
+            /* if blob or index is requested, md5 is off unless explicitly requested */
+            md5_chk = md5_chk_explicit;
+        }
+        if( md5_chk ) {
+            rc = CheckMD5(src_path);
+            if( GetRCObject(rc) == rcConstraint && GetRCState(rc) == rcInconsistent ) {
+                blob_crc = true;
+                rc = 0;
+            }
+        }
+        if (rc == 0 && blob_crc) {
+            rc = CheckTable(src_path);
+        }
+        if (rc == 0 && index_chk) {
+            /* rc = ValidateSKeyIndex(tbl); */
+        }
+    }
+    if( rc == 0 ) {
+        LOGMSG(klogInfo, "check ok");
+    } else {
+        PLOGERR(klogErr, (klogErr, rc, "check failed: '$(table)'", PLOG_S(table), src_path));
+    }
+    return rc;
+}
diff --git a/tools/sra/table-vers.c b/tools/sra/table-vers.c
new file mode 100644
index 0000000..ff9c9a8
--- /dev/null
+++ b/tools/sra/table-vers.c
@@ -0,0 +1,232 @@
+/*******************************************************************************
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * =============================================================================
+ */
+
+#include <kapp/main.h>
+
+#include <vdb/manager.h> /* VDBManager */
+
+#include <kdb/database.h> /* KDatabase */
+#include <kdb/table.h> /* KDBTable */
+
+#include <klib/log.h> /* LOGERR */
+#include <klib/out.h> /* OUTMSG */
+#include <klib/debug.h> /* DBGMSG */
+#include <klib/rc.h> /* RC */
+
+#include <assert.h>
+#include <stdio.h> /* printf */
+#include <string.h> /* memset */
+
+#define DISP_RC(rc,msg) (void)((rc == 0) ? 0 : LOGERR(klogInt, rc, msg))
+#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
+    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
+
+typedef enum EOutType {
+    eTxt,
+    eXml
+} EOutType;
+
+typedef struct CmdLine {
+	const char* table;
+    EOutType outType;
+} CmdLine;
+
+#define OPTION_OUTPUT  "output"
+#define ALIAS_OUTPUT   "o"
+
+static const char* output_usage[] = {
+    "Output type: one of (t | x)", "where 't' - text (default), 'x' - xml", NULL
+};
+
+OptDef Options[] =  {
+     { OPTION_OUTPUT, ALIAS_OUTPUT, NULL, output_usage, 1, true, false }
+};
+
+const char UsageDefaultName[] = "vable-vers";
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg("Usage:\n"
+            "  %s [Options] <table>\n", progname);
+}
+
+rc_t CC Usage(const Args* args)
+{
+    rc_t rc = 0;
+    const char* progname = UsageDefaultName;
+    const char* fullpath = UsageDefaultName;
+
+    assert(args);
+
+    rc = ArgsProgram(args, &fullpath, &progname);
+    if (rc)
+    {    progname = fullpath = UsageDefaultName; }
+
+    UsageSummary(progname);
+
+    OUTMSG(("\nOptions\n"));
+
+    HelpOptionLine(ALIAS_OUTPUT, OPTION_OUTPUT, "type", output_usage);
+
+    HelpOptionsStandard();
+
+    HelpVersion(fullpath, KAppVersion());
+
+    return rc;
+}
+
+static rc_t CmdLineInit(const Args* args, CmdLine* cmdArgs)
+{
+    rc_t rc = 0;
+
+    assert(args && cmdArgs);
+
+    memset(cmdArgs, 0, sizeof *cmdArgs);
+
+    while (rc == 0) {
+        const char* outType = NULL;
+        uint32_t pcount = 0;
+
+        /* output type */
+        rc = ArgsOptionCount(args, OPTION_OUTPUT, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure parsing output type");
+            break;
+        }
+        if (pcount > 1) {
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcAmbiguous);
+            LOGERR(klogErr, rc, "Too many output type parameters");
+            break;
+        }
+        else if (pcount == 1) {
+            rc = ArgsOptionValue(args, OPTION_OUTPUT, 0, (const void **)&outType);
+            if (rc) {
+                LOGERR(klogErr, rc, "Failure retrieving output type");
+                break;
+            }
+            else if (outType != NULL) {
+                if (strncmp(outType, "x", 1) == 0) {
+                    cmdArgs->outType = eXml;
+                }
+                else if (strncmp(outType, "t", 1) == 0) {
+                    cmdArgs->outType = eTxt;
+                }
+                else {
+                    rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInvalid);
+                    LOGERR(klogErr, rc, "Bad output type value");
+                    break;
+                }
+            }
+        }
+
+        /* table path parameter */
+        rc = ArgsParamCount(args, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure parsing table name");
+            break;
+        }
+        if (pcount < 1) {
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInsufficient);
+            LOGERR(klogErr, rc, "Missing table parameter");
+            break;
+        }
+        if (pcount > 1) {
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcAmbiguous);
+            LOGERR(klogErr, rc, "Too many table parameters");
+            break;
+        }
+        rc = ArgsParamValue(args, 0, (const void **)&cmdArgs->table);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure retrieving table name");
+            break;
+        }
+
+        break;
+    }
+
+    if (rc != 0) {
+        MiniUsage (args);
+    }
+
+    return rc;
+}
+
+rc_t CC KMain(int argc, char* argv[])
+{
+    rc_t rc = 0;
+    Args* args = NULL;
+    const VDBManager* mgr = NULL;
+
+    CmdLine cmdArgs;
+
+    LogLevelSet("info");
+
+    rc = ArgsMakeAndHandle
+        (&args, argc, argv, 1, Options, sizeof Options / sizeof(Options[0]));
+
+    if (rc == 0) {
+        rc = CmdLineInit(args, &cmdArgs);
+    }
+    if (rc == 0) {
+        DBGMSG(DBG_APP,DBG_COND_1, ("out type = '%d'\n",cmdArgs.outType));
+        PLOGMSG
+            (klogInfo,(klogInfo, "Checking $(tbl)", "tbl=%s", cmdArgs.table));
+        rc = VDBManagerMakeRead(&mgr, NULL);
+        DISP_RC(rc, "while calling VDBManagerMakeRead");
+    }
+    if (rc == 0) {
+        ver_t version = 0;
+        rc = VDBManagerGetObjVersion(mgr, &version, cmdArgs.table);
+        if (rc == 0) {
+            uint32_t maj =  version >> 24;
+            uint32_t min = (version >> 16) & 0xFF;
+            uint32_t rel =  version & 0xFFFF;
+            switch (cmdArgs.outType) {
+                case eTxt:
+                    OUTMSG(("v%d\n", maj));
+                    break;
+                case eXml:
+                    OUTMSG(("<Object vers=\"%u\" path=\"%s\">",
+                        maj, cmdArgs.table));
+                    if (min || rel) {
+                        OUTMSG(("<loader vers=\"%u.%u.%u\"/>", maj, min, rel));
+                    }
+                    OUTMSG(("</Object>\n"));
+                    break;
+            }
+        } else {
+            PLOGERR(klogErr,
+                (klogErr, rc, "'$(path)'", "path=%s", cmdArgs.table));
+        }
+    }
+
+    RELEASE(VDBManager, mgr);
+
+    ArgsWhack(args);
+
+    return rc;
+}
+
+/************************************ EOF ****************** ******************/
diff --git a/tools/srapath/Makefile b/tools/srapath/Makefile
new file mode 100644
index 0000000..d4b20ff
--- /dev/null
+++ b/tools/srapath/Makefile
@@ -0,0 +1,79 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/srapath
+
+INT_TOOLS =
+
+EXT_TOOLS = \
+	srapath
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+	
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# srapath
+#
+SRAPATH_SRC = \
+	helper \
+	line_iter \
+	cgi_request \
+	srapath
+
+SRAPATH_OBJ = \
+	$(addsuffix .$(OBJX),$(SRAPATH_SRC))
+
+SRAPATH_LIB += \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+
+$(BINDIR)/srapath: $(SRAPATH_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(SRAPATH_LIB)
+
diff --git a/tools/srapath/cgi_request.c b/tools/srapath/cgi_request.c
new file mode 100644
index 0000000..2afa28b
--- /dev/null
+++ b/tools/srapath/cgi_request.c
@@ -0,0 +1,853 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "cgi_request.h"
+#include "helper.h"
+#include "line_iter.h"
+
+#include <klib/text.h>
+#include <klib/namelist.h>
+#include <klib/printf.h>
+#include <klib/vector.h>
+#include <klib/out.h>
+#include <kns/manager.h>
+#include <kns/http.h>
+#include <kns/stream.h>
+
+#include <string.h>
+
+typedef struct cgi_request
+{
+    char * url;
+    KNSManager * kns_mgr;
+    VNamelist * params;
+} cgi_request;
+
+
+void release_cgi_request( struct cgi_request * request )
+{
+    if ( request != NULL )
+    {
+        if ( request->kns_mgr != NULL )
+            KNSManagerRelease( request->kns_mgr );
+        if ( request->params != NULL )
+            VNamelistRelease( request->params );
+        if ( request->url != NULL )
+            free( ( void * ) request->url );
+        free( ( void * ) request );
+    }
+}
+
+
+rc_t make_cgi_request( struct cgi_request ** request, const char * url )
+{
+    rc_t rc = 0;
+    cgi_request * r = calloc( 1, sizeof * r );
+    if ( r == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        ErrMsg( "calloc( %d ) -> %R", ( sizeof * r ), rc );
+    }
+    else
+    {
+        r->url = string_dup_measure( url, NULL );
+        if ( r->url == NULL )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            ErrMsg( "string_dup_measure( '%s' ) -> %R", url, rc );
+        }
+        else
+        {
+            rc = VNamelistMake( &r->params, 10 );
+            if ( rc != 0 )
+                ErrMsg( "VNamelistMake() -> %R", rc );
+            else
+            {
+                rc = KNSManagerMake( &r->kns_mgr );
+                if ( rc != 0 )
+                    ErrMsg( "KNSManagerMake() -> %R", rc );
+                else
+                    *request = r;
+            }
+        }
+        if ( rc != 0 )
+            release_cgi_request( r );
+    }
+    return rc;
+}
+
+
+rc_t add_cgi_request_param( struct cgi_request * request, const char * fmt, ... )
+{
+    rc_t rc;
+    if ( request == NULL || fmt == NULL )
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    else
+    {
+        va_list args;
+        char buffer[ 4096 ];
+        size_t num_writ;
+        
+        va_start ( args, fmt );
+        rc = string_vprintf( buffer, sizeof buffer, &num_writ, fmt, args );
+        if ( rc != 0 )
+            ErrMsg( "string_vprintf( '%s' ) -> %R", fmt, rc );
+        else
+        {
+            rc = VNamelistAppend( request->params, buffer );
+            if ( rc != 0 )
+                ErrMsg( "VNamelistAppend( '%s' ) -> %R", buffer, rc );
+        }   
+        va_end ( args );
+    }
+    return rc;
+}
+
+
+typedef struct add_ctx
+{
+    struct cgi_request * request;
+    const char * fmt;
+} add_ctx;
+
+static rc_t add_item( const char * item, void * data )
+{
+    add_ctx * actx = data;
+    return add_cgi_request_param( actx->request, actx->fmt, item );
+}
+
+rc_t add_cgi_request_params( struct cgi_request * request, const char * fmt, const VNamelist * src )
+{
+    rc_t rc;
+    if ( request == NULL || fmt == NULL || src == NULL )
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    else
+    {
+        add_ctx actx = { request, fmt };
+        rc = foreach_item( src, add_item, &actx );
+    }
+    return rc;
+}
+
+rc_t clear_cgi_request_params( struct cgi_request * request )
+{
+    rc_t rc;
+    if ( request == NULL )
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    else
+    {
+        if ( request->params != NULL )
+        {
+            rc = VNamelistRelease( request->params );
+            if ( rc == 0 )
+                rc = VNamelistMake( &request->params, 10 );
+        }
+    }
+    return rc;
+}
+
+char * get_url_of_cgi_request( struct cgi_request * request )
+{
+    if ( request != NULL )
+        return request->url;
+    return NULL;
+}
+
+rc_t perform_cgi_request( struct cgi_request * request,
+                          struct KStream ** reply_stream,
+                          uint32_t * rslt_code )
+{
+    rc_t rc;
+    if ( request == NULL || reply_stream == NULL || rslt_code == NULL )
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    else
+    {
+        ver_t http_vers = 0x01010000;
+        KClientHttpRequest * kns_req;
+
+        *reply_stream = NULL;
+        rc = KNSManagerMakeClientRequest( request->kns_mgr, &kns_req, http_vers, NULL, "%s", request->url );
+        if ( rc != 0 )
+            ErrMsg( "KNSManagerMakeClientRequest( '%s' ) -> %R", request->url, rc );
+        else
+        {
+            uint32_t count;
+            rc = VNameListCount( request->params, &count );
+            if ( rc != 0 )
+                ErrMsg( "VNameListCount() -> %R", rc );
+            else
+            {
+                uint32_t idx;
+                for ( idx = 0; idx < count && rc == 0; ++idx )
+                {
+                    const char * s;
+                    rc = VNameListGet( request->params, idx, &s );
+                    if ( rc != 0 )
+                        ErrMsg( "VNameListGet( #%d ) -> %R", idx, rc );
+                    else
+                    {
+                        rc = KClientHttpRequestAddPostParam( kns_req, "%s", s );
+                        if ( rc != 0 )
+                            ErrMsg( "KClientHttpRequestAddPostParam( '%s' ) -> %R", s, rc );
+                    }
+                }
+                if ( rc == 0 )
+                {
+                    KClientHttpResult * kns_rslt;
+                    rc = KClientHttpRequestPOST( kns_req, &kns_rslt );
+                    if ( rc != 0 )
+                        ErrMsg( "KClientHttpRequestPOST() -> %R", rc );
+                    else
+                    {
+                        rc = KClientHttpResultStatus( kns_rslt, rslt_code, NULL, 0, NULL );
+                        if ( rc != 0 )
+                            ErrMsg( "KClientHttpResultStatus() -> %R", rc );
+                        else
+                        {
+                            rc = KClientHttpResultGetInputStream( kns_rslt, reply_stream );
+                            if ( rc != 0 )
+                                ErrMsg( "KClientHttpResultGetInputStream() -> %R", rc );
+                        }
+                        KClientHttpResultRelease( kns_rslt );
+                    }
+                }
+            }
+            KClientHttpRequestRelease( kns_req );
+        }
+    }
+    return rc;
+}
+
+
+/* ------------------------------------------------------------------------ */
+
+static void CC free_reply_obj( void * obj, void * data )
+{
+    if ( obj != NULL )
+    {
+        reply_obj * o = obj;
+        if ( o->prj_id != NULL ) StringWhack( o->prj_id );        
+        if ( o->obj_type != NULL ) StringWhack( o->obj_type );
+        if ( o->id != NULL ) StringWhack( o->id );
+        if ( o->name != NULL ) StringWhack( o->name );
+        if ( o->date != NULL ) StringWhack( o->date );
+        if ( o->checksum != NULL ) StringWhack( o->checksum );
+        if ( o->ticket != NULL ) StringWhack( o->ticket );
+        if ( o->path != NULL ) StringWhack( o->path );
+        if ( o->message != NULL ) StringWhack( o->message );
+        free( obj );
+    }
+}
+
+static rc_t clone_reply_obj( const reply_obj * src, reply_obj ** dst )
+{
+    rc_t rc = 0;
+    reply_obj * o = calloc( 1, sizeof * o );
+    if ( o == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        ErrMsg( "calloc( %d ) -> %R", ( sizeof * o ), rc );
+    }
+    else
+    {
+        if ( src->prj_id != NULL ) rc = StringCopy( &o->prj_id, src->prj_id );    
+        if ( rc == 0 && src->obj_type != NULL ) rc = StringCopy( &o->obj_type, src->obj_type );
+        if ( rc == 0 && src->id != NULL ) rc = StringCopy( &o->id, src->id );
+        if ( rc == 0 && src->name != NULL ) rc = StringCopy( &o->name, src->name );
+        if ( rc == 0 && src->date != NULL ) rc = StringCopy( &o->date, src->date );
+        if ( rc == 0 && src->checksum != NULL ) rc = StringCopy( &o->checksum, src->checksum );
+        if ( rc == 0 && src->ticket != NULL ) rc = StringCopy( &o->ticket, src->ticket );
+        if ( rc == 0 && src->path != NULL ) rc = StringCopy( &o->path, src->path );
+        if ( rc == 0 && src->message != NULL ) rc = StringCopy( &o->message, src->message );
+        
+        o->version = src->version;
+        o->size = src->size;
+        o->code = src->code;
+        
+        if ( rc == 0 )
+            *dst = o;
+        else
+            free_reply_obj( o, NULL );
+    }
+    return rc;
+}
+
+
+typedef struct reply_obj_list
+{
+    Vector v;
+} reply_obj_list;
+
+
+void release_reply_obj_list( struct reply_obj_list * list )
+{
+    VectorWhack( &list->v, free_reply_obj, NULL );
+}
+
+static rc_t make_reply_obj_list( struct reply_obj_list ** list )
+{
+    rc_t rc = 0;
+    reply_obj_list * l = calloc( 1, sizeof * l );
+    if ( l == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        ErrMsg( "calloc( %d ) -> %R", ( sizeof * l ), rc );
+    }
+    else
+    {
+        VectorInit( &l->v, 0, 5 );
+        *list = l;
+    }
+    return rc;
+}
+
+static rc_t add_clone_to_reply_obj_list( reply_obj_list * list, const reply_obj * src )
+{
+    reply_obj * clone;
+    rc_t rc = clone_reply_obj( src, &clone );
+    if ( rc == 0 )
+        rc = VectorAppend( &list->v, NULL, clone );
+    return rc;
+}
+
+static rc_t add_reply_to_list_cb( const reply_obj * obj, void * data )
+{
+    reply_obj_list * l = data;
+    return add_clone_to_reply_obj_list( l, obj );
+}
+
+typedef struct reply_obj_ctx
+{
+    on_reply_obj_t on_obj;
+    void * data;
+    rc_t rc;
+} reply_obj_ctx;
+
+static void CC reply_obj_cb( void * item, void * data )
+{
+    reply_obj_ctx * rctx = data;
+    if ( rctx->rc == 0 )
+        rctx->rc = rctx->on_obj( item, rctx->data );
+}
+
+rc_t foreach_reply_obj( struct reply_obj_list * list,
+                        on_reply_obj_t on_obj,
+                        void * data )
+{
+    reply_obj_ctx rctx = { on_obj, data, 0 };
+    VectorForEach( &list->v, false, reply_obj_cb, &rctx );
+    return rctx.rc;
+}
+
+
+static int64_t find_obj_cmp( const void *key, const void *n )
+{
+    const String * id = key;
+    const reply_obj * obj = n;
+    return StringCompare( id, obj->id );
+}
+
+static reply_obj * find_obj( struct reply_obj_list * list, const String * id )
+{
+    return VectorFind( &list->v, id, NULL, find_obj_cmp );
+}
+
+typedef struct reply_parse_ctx
+{
+    on_reply_obj_t on_obj;
+    void * data;
+    ver_maj_min version;
+} reply_parse_ctx;
+
+
+/* ------------------------------------------------------------------------ */
+
+enum request_type { request_type_names, request_type_search };
+
+static const char * names_cgi_url = "http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi";
+static const char * search_cgi_url = "http://www.ncbi.nlm.nih.gov/Traces/names/search.cgi";
+
+static const char * validate_url( const char * src, enum request_type request_type )
+{
+    const char * res = src;
+    if ( src == NULL )
+    {
+        switch( request_type )
+        {
+            case request_type_names  : res = names_cgi_url; break;
+            case request_type_search : res = search_cgi_url; break;
+        }
+    }
+    return res;
+}
+
+
+static const char * names_cgi_ver = "3.0";
+static const char * search_cgi_ver = "1.0";
+
+static const char * validate_ver( const char * src, enum request_type request_type )
+{
+    const char * res = src;
+    if ( src == NULL )
+    {
+        switch( request_type )
+        {
+            case request_type_names  : res = names_cgi_ver; break;
+            case request_type_search : res = search_cgi_ver; break;
+        }
+    }
+    return res;
+}
+
+
+static void validate_request_params( const request_params * src, request_params * dst )
+{
+    dst->names_url      = validate_url( src->names_url,  request_type_names );
+    dst->names_ver      = validate_ver( src->names_ver,  request_type_names );
+    dst->search_url     = validate_url( src->search_url, request_type_search );
+    dst->search_ver     = validate_ver( src->search_ver, request_type_search );
+
+    dst->params         = src->params;
+    dst->terms          = src->terms;
+    dst->buffer_size    = src->buffer_size;
+    dst->timeout_ms     = src->timeout_ms;
+}
+
+/* ------------------------------------------------------------------------ */
+
+
+rc_t raw_names_request( const request_params * request,
+                        on_string_t on_line,
+                        uint32_t * rslt_code,
+                        void * data )
+{
+    rc_t rc;
+    cgi_request * req;
+    request_params validated_request;
+
+    validate_request_params( request, &validated_request );
+    rc = make_cgi_request( &req, validated_request.names_url );
+    if ( rc == 0 )
+    {
+        const char ** ptr = validated_request.terms;
+        rc = add_cgi_request_param( req, "version=%s", validated_request.names_ver );
+        while ( rc == 0 && *ptr != NULL )
+        {
+            rc = add_cgi_request_param( req, "acc=%s", *ptr );
+            ptr++;
+        }
+        ptr = validated_request.params;
+        while ( rc == 0 && *ptr != NULL )
+        {
+            rc = add_cgi_request_param( req, "%s", *ptr );
+            ptr++;
+        }
+        if ( rc == 0 )
+        {
+            struct KStream * stream;
+            rc = perform_cgi_request( req, &stream, rslt_code );
+            if ( rc == 0 )
+            {
+                rc = stream_line_read( stream, on_line,
+                    validated_request.buffer_size, validated_request.timeout_ms, data );
+                KStreamRelease( stream );
+            }
+        }
+        release_cgi_request( req );
+    }
+    return rc;
+}
+
+
+static rc_t names_token_v_1_0( const String * token, uint32_t id, void * data )
+{
+    rc_t rc = 0;
+    if ( token->len > 0 )
+    {
+        reply_obj * obj = data;
+        switch( id )
+        {
+            case 0 : rc = StringCopy( &obj->id, token ); break;
+            case 1 : rc = StringCopy( &obj->ticket, token ); break;
+            case 2 : rc = StringCopy( &obj->path, token ); break;
+            case 3 : obj->code = StringToU64( token, &rc ); break;
+            case 4 : rc = StringCopy( &obj->message, token ); break;
+        }
+    }
+    return rc;
+}
+
+static rc_t names_token_v_1_1( const String * token, uint32_t id, void * data )
+{
+    rc_t rc = 0;
+    if ( token->len > 0 )
+    {
+        reply_obj * obj = data;
+        switch( id )
+        {
+            case 0 : rc = StringCopy( &obj->id, token ); break;
+            case 1 : /* ??? */ break;
+            case 2 : /* ??? */ break;
+            case 3 : obj->size = StringToU64( token, &rc ); break;
+            case 4 : rc = StringCopy( &obj->date, token ); break;
+            case 5 : rc = StringCopy( &obj->checksum, token ); break;
+            case 6 : rc = StringCopy( &obj->ticket, token ); break;
+            case 7 : rc = StringCopy( &obj->path, token ); break;
+            case 8 : obj->code = StringToU64( token, &rc ); break;
+            case 9 : rc = StringCopy( &obj->message, token ); break;
+        }
+    }
+    return rc;
+}
+
+static rc_t names_token_v_3_0( const String * token, uint32_t id, void * data )
+{
+    rc_t rc = 0;
+    if ( token->len > 0 )
+    {
+        reply_obj * obj = data;
+        switch( id )
+        {
+            case 0 : rc = StringCopy( &obj->obj_type, token ); break;
+            case 1 : rc = StringCopy( &obj->id, token ); break;
+            case 2 : obj->size = StringToU64( token, &rc ); break;
+            case 3 : rc = StringCopy( &obj->date, token ); break;
+            case 4 : rc = StringCopy( &obj->checksum, token ); break;
+            case 5 : rc = StringCopy( &obj->ticket, token ); break;
+            case 6 : rc = StringCopy( &obj->path, token ); break;
+            case 7 : obj->code = StringToU64( token, &rc ); break;
+            case 8 : rc = StringCopy( &obj->message, token ); break;
+        }
+    }
+    return rc;
+}
+
+static rc_t on_names_line( const String * line, void * data )
+{
+    rc_t rc = 0;
+    reply_parse_ctx * rctx = data;
+    if ( line != NULL && line->len > 0 )
+    {
+        if ( line->addr[ 0 ] == '#' ) /* helper.c */
+        {
+            extract_versionS( &rctx->version, line );
+        }
+        else
+        {
+            reply_obj obj;
+            memset( &obj, 0, sizeof obj );
+            
+            if ( rctx->version.major == 1 )
+            {
+                switch( rctx->version.minor )
+                {
+                    case 0 : rc = foreach_token( line, names_token_v_1_0, '|', &obj ); break;
+                    case 1 : rc = foreach_token( line, names_token_v_1_1, '|', &obj ); break;
+                }
+            }
+            else if ( rctx->version.major == 3 )
+                rc = foreach_token( line, names_token_v_3_0, '|', &obj );
+
+            obj.version = rctx->version;
+            if ( rc == 0 )
+                rc = rctx->on_obj( &obj, rctx->data );
+        }
+    }
+    return rc;
+}
+
+
+rc_t parsed_names_request( const request_params * request,
+                           on_reply_obj_t on_obj,
+                           uint32_t * rslt_code,
+                           void * data )
+{
+    reply_parse_ctx rctx = { on_obj, data, { 0, 0 } };
+    return raw_names_request( request, on_names_line, rslt_code, &rctx );
+}
+
+rc_t names_request_to_list( const request_params * request,
+                            uint32_t * rslt_code,
+                            struct reply_obj_list ** list )
+{
+    reply_obj_list * l;
+    rc_t rc = make_reply_obj_list( &l );
+    if ( rc == 0 )
+    {
+        rc = parsed_names_request( request, add_reply_to_list_cb, rslt_code, l );
+        if ( rc == 0 )
+            *list = l;
+        else
+            release_reply_obj_list( l );
+    }
+    return rc;
+}
+
+
+/* ------------------------------------------------------------------------ */
+
+
+rc_t raw_search_request( const request_params * request,
+                        on_string_t on_line,
+                        uint32_t * rslt_code,
+                        void * data )
+{
+    rc_t rc;
+    cgi_request * req;
+    request_params validated_request;
+
+    validate_request_params( request, &validated_request );
+    rc = make_cgi_request( &req, validated_request.search_url );
+    if ( rc == 0 )
+    {
+        const char ** ptr = validated_request.terms;
+        rc = add_cgi_request_param( req, "version=%s", validated_request.search_ver );
+        while ( rc == 0 && *ptr != NULL )
+        {
+            rc = add_cgi_request_param( req, "term=%s", *ptr );
+            ptr++;
+        }
+        ptr = validated_request.params;
+        while ( rc == 0 && *ptr != NULL )
+        {
+            rc = add_cgi_request_param( req, "%s", *ptr );
+            ptr++;
+        }
+        if ( rc == 0 )
+        {
+            struct KStream * stream;
+            rc = perform_cgi_request( req, &stream, rslt_code );
+            if ( rc == 0 )
+            {
+                rc = stream_line_read( stream, on_line,
+                    validated_request.buffer_size, validated_request.timeout_ms, data );
+                KStreamRelease( stream );
+            }
+        }
+        release_cgi_request( req );
+    }
+    return rc;
+}
+
+static rc_t search_token_v_2_0( const String * token, uint32_t id, void * data )
+{
+    rc_t rc = 0;
+    if ( token->len > 0 )
+    {
+        reply_obj * obj = data;
+        switch( id )
+        {
+            case 0 : rc = StringCopy( &obj->prj_id, token ); break;
+            case 1 : rc = StringCopy( &obj->obj_type, token ); break;
+            case 2 : rc = StringCopy( &obj->id, token ); break;
+            case 3 : rc = StringCopy( &obj->name, token ); break;
+            case 4 : rc = StringCopy( &obj->path, token ); break;
+            case 5 : obj->size = StringToU64( token, &rc ); break;
+            case 6 : rc = StringCopy( &obj->message, token ); break;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t on_search_line( const String * line, void * data )
+{
+    rc_t rc = 0;
+    reply_parse_ctx * rctx = data;
+    if ( line != NULL && line->len > 0 )
+    {
+        switch( line->addr[ 0 ] )
+        {
+            case '#' : extract_versionS( &rctx->version, line ); break;
+            case '$' : break;
+            default  : {
+                            reply_obj obj;
+                            memset( &obj, 0, sizeof obj );
+                            if ( rctx->version.major == 2 )
+                            {
+                                if ( rctx->version.minor == 0 )
+                                    rc = foreach_token( line, search_token_v_2_0, '|', &obj );
+                            }
+                            obj.version = rctx->version;
+                            if ( rc == 0 )
+                                rc = rctx->on_obj( &obj, rctx->data );
+                        }
+                        break;
+        }
+    }
+    return rc;
+}
+
+
+rc_t parsed_search_request( const request_params * request,
+                            on_reply_obj_t on_obj,
+                            uint32_t * rslt_code,
+                            void * data )
+{
+    reply_parse_ctx rctx = { on_obj, data, { 0, 0 } };
+    return raw_search_request( request, on_search_line, rslt_code, &rctx );
+}
+
+
+static rc_t on_obj_for_count( const reply_obj * obj, void * data )
+{
+    if ( obj != NULL && data != NULL )
+    {
+        uint32_t * count = data;
+        if ( obj->id != NULL ) *count += 1;
+    }
+    return 0;
+}
+
+
+typedef struct obj_add_ptr
+{
+    const char ** ptr;
+    uint32_t idx;
+} obj_add_ptr;
+
+static rc_t on_obj_for_add_ptr( const reply_obj * obj, void * data )
+{
+    if ( obj != NULL && data != NULL )
+    {
+        obj_add_ptr * o = data;
+        if ( obj->id != NULL )
+        {
+            o->ptr[ o->idx ] = obj->id->addr;
+            o->idx++;
+        }
+    }
+    return 0;
+}
+
+static rc_t reply_obj_list_2_ptrs( struct reply_obj_list * list, const char *** ptr )
+{
+    uint32_t count = 0;
+    rc_t rc = foreach_reply_obj( list, on_obj_for_count, &count );
+    *ptr = NULL;
+    if ( rc == 0 )
+    {
+        if ( count > 0 )
+        {
+            const char ** x = calloc( count + 1, sizeof *x );
+            if ( x == NULL )
+            {
+                rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                ErrMsg( "calloc( %d ) -> %R", count * ( sizeof * x ), rc );
+            }
+            else
+            {
+                obj_add_ptr o = { x, 0 };
+                rc = foreach_reply_obj( list, on_obj_for_add_ptr, &o );
+                if ( rc == 0 )
+                    *ptr = x;
+                else
+                    free( ( void * ) x );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t on_enter_path( const reply_obj * obj, void * data )
+{
+    rc_t rc = 0;
+    if ( obj != NULL && data != NULL )
+    {
+        reply_obj_list * list = data;
+        reply_obj * found = find_obj( list, obj->id );
+        if ( found != NULL )
+        {
+            if ( found->path != NULL ) StringWhack( found->path );
+            rc = StringCopy( &found->path, obj->path );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t perform_sub_request( const request_params * request,
+                                 uint32_t * rslt_code,
+                                 struct reply_obj_list * list )
+{
+    rc_t rc;
+    request_params sub_request;
+    
+    sub_request.names_url   = request->names_url;
+    sub_request.search_url  = request->search_url;
+    sub_request.names_ver   = request->names_ver;
+    sub_request.search_ver  = request->search_ver;
+    sub_request.params      = request->params;
+    sub_request.terms       = NULL;
+    sub_request.buffer_size = request->buffer_size;
+    sub_request.timeout_ms  = request->timeout_ms;
+
+    rc = reply_obj_list_2_ptrs( list, &sub_request.terms );
+    if ( rc == 0 && sub_request.terms != NULL )
+    {
+        struct reply_obj_list * sub_list;
+        rc = names_request_to_list( &sub_request, rslt_code, &sub_list );
+        if ( rc == 0 )
+        {
+            /* walk the sub-list and enter the paths found into the list */
+            rc = foreach_reply_obj( sub_list, on_enter_path, list );
+            release_reply_obj_list( sub_list );
+        }
+        free( ( void * )sub_request.terms );
+    }
+    return rc;
+}
+
+
+rc_t search_request_to_list( const request_params * request,
+                            uint32_t * rslt_code,
+                            struct reply_obj_list ** list,
+                            bool resolve_path )
+{
+    reply_obj_list * l;
+    rc_t rc = make_reply_obj_list( &l );
+    if ( rc == 0 )
+    {
+        rc = parsed_search_request( request, add_reply_to_list_cb, rslt_code, l );
+        if ( rc == 0 )
+        {
+            if ( resolve_path )
+            {
+                rc = perform_sub_request( request, rslt_code, l );
+                if ( rc == 0 )
+                    *list = l;
+                else
+                    release_reply_obj_list( l );
+            }
+            else
+                *list = l;
+        }
+        else
+            release_reply_obj_list( l );
+    }
+    return rc;
+}
diff --git a/tools/srapath/cgi_request.h b/tools/srapath/cgi_request.h
new file mode 100644
index 0000000..7f4b91c
--- /dev/null
+++ b/tools/srapath/cgi_request.h
@@ -0,0 +1,129 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_cgi_request_
+#define _h_cgi_request_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_helper_
+#include "helper.h"
+#endif
+
+/* ------------------------------------------------------------------------ */
+
+
+typedef struct request_params
+{
+    const char * names_url;     /* NULL ... default url  */
+    const char * search_url;    /* NULL ... default url  */
+    const char * names_ver;     /* NULL ... default vers */
+    const char * search_ver;    /* NULL ... default vers */
+    const char ** params;       /* NULL ... none */
+    const char ** terms;        /* mandatory... NULL-terminated list of terms */
+    size_t buffer_size;
+    uint32_t timeout_ms;
+} request_params;
+
+
+/* ------------------------------------------------------------------------ */
+
+
+typedef rc_t ( * on_string_t )( const String * line, void * data );
+
+typedef struct reply_obj        /*  names       search  */
+{
+    const String * prj_id;       /*  -           X       */
+    const String * obj_type;     /*  X           X       */
+    const String * id;           /*  X           X       */
+    const String * date;         /*  X           -       */
+    const String * checksum;     /*  X           -       */
+    const String * ticket;       /*  X           -       */
+    const String * name;         /*  -           X       */
+    const String * path;         /*  X           X       */
+    const String * message;      /*  X           X       */
+    size_t size;                 /*  X           X       */    
+    ver_maj_min version;         /*  X           X       */
+    uint32_t code;               /*  X           -       */    
+} reply_obj;
+
+struct reply_obj_list;
+
+void release_reply_obj_list( struct reply_obj_list * list );
+
+typedef rc_t ( * on_reply_obj_t )( const reply_obj * obj, void * data );
+
+rc_t foreach_reply_obj( struct reply_obj_list * list,
+                        on_reply_obj_t on_obj,
+                        void * data );
+
+
+/* ------------------------------------------------------------------------ */
+
+
+rc_t raw_names_request( const request_params * request,
+                        on_string_t on_line,
+                        uint32_t * rslt_code,
+                        void * data );
+
+rc_t parsed_names_request( const request_params * request,
+                           on_reply_obj_t on_obj,
+                           uint32_t * rslt_code,
+                           void * data );
+
+rc_t names_request_to_list( const request_params * request,
+                            uint32_t * rslt_code,
+                            struct reply_obj_list ** list );
+
+/* ------------------------------------------------------------------------ */
+
+
+rc_t raw_search_request( const request_params * request,
+                        on_string_t on_line,
+                        uint32_t * rslt_code,
+                        void * data );
+
+rc_t parsed_search_request( const request_params * request,
+                            on_reply_obj_t on_obj,
+                            uint32_t * rslt_code,
+                            void * data );
+
+rc_t search_request_to_list( const request_params * request,
+                            uint32_t * rslt_code,
+                            struct reply_obj_list ** list,
+                            bool resolve_path );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/srapath/helper.c b/tools/srapath/helper.c
new file mode 100644
index 0000000..1244e35
--- /dev/null
+++ b/tools/srapath/helper.c
@@ -0,0 +1,464 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "helper.h"
+
+#include <klib/log.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <klib/out.h>
+
+rc_t ErrMsg( const char * fmt, ... )
+{
+    rc_t rc;
+    char buffer[ 4096 ];
+    size_t num_writ;
+
+    va_list list;
+    va_start( list, fmt );
+    rc = string_vprintf( buffer, sizeof buffer, &num_writ, fmt, list );
+    if ( rc == 0 )
+        rc = pLogMsg( klogErr, "$(E)", "E=%s", buffer );
+    va_end( list );
+    return rc;
+} 
+
+rc_t CC ArgsOptionCount( const struct Args * self, const char * option_name, uint32_t * count );
+rc_t CC ArgsOptionValue( const struct Args * self, const char * option_name, uint32_t iteration, const void ** value );
+
+const char * get_str_option( const struct Args *args, const char *name, const char * dflt )
+{
+    const char* res = dflt;
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    if ( rc == 0 && count > 0 )
+    {
+        rc = ArgsOptionValue( args, name, 0, (const void**)&res );
+        if ( rc != 0 ) res = dflt;
+    }
+    return res;
+}
+
+bool get_bool_option( const struct Args *args, const char *name )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, name, &count );
+    return ( rc == 0 && count > 0 );
+}
+
+
+uint64_t get_uint64_t_option( const struct Args * args, const char *name, uint64_t dflt )
+{
+    uint64_t res = dflt;
+    const char * s = get_str_option( args, name, NULL );
+    if ( s != NULL )
+    {
+        size_t l = string_size( s );
+        if ( l > 0 )
+        {
+            char * endptr;
+            res = strtol( s, &endptr, 0 );
+        }
+    }
+    return res;
+}
+
+uint32_t get_uint32_t_option( const struct Args * args, const char *name, uint32_t dflt )
+{
+    return ( get_uint64_t_option( args, name, dflt ) & 0xFFFFFFFF );
+}
+
+size_t get_size_t_option( const struct Args * args, const char *name, size_t dflt )
+{
+    size_t res = dflt;
+    const char * s = get_str_option( args, name, NULL );
+    if ( s != NULL )
+    {
+        size_t l = string_size( s );
+        if ( l > 0 )
+        {
+            size_t multipl = 1;
+            switch( s[ l - 1 ] )
+            {
+                case 'k' :
+                case 'K' : multipl = 1024; break;
+                case 'm' :
+                case 'M' : multipl = 1024 * 1024; break;
+                case 'g' :
+                case 'G' : multipl = 1024 * 1024 * 1024; break;
+            }
+            
+            if ( multipl > 1 )
+            {
+                char * src = string_dup( s, l - 1 );
+                if ( src != NULL )
+                {
+                    char * endptr;
+                    res = strtol( src, &endptr, 0 ) * multipl;
+                    free( src );
+                }
+            }
+            else
+            {
+                char * endptr;
+                res = strtol( s, &endptr, 0 );
+            }
+        }
+    }
+    return res;
+}
+
+
+func_t get_func_t( const char * function )
+{
+    func_t res = ft_resolve;
+    if ( function != NULL && function[ 0 ] != 0 )
+    {
+        String Function, F_names;
+        StringInitCString( &Function, function );
+        StringInitCString( &F_names, "names" );
+        if ( 0 == StringCaseCompare ( &Function, &F_names ) )
+            res = ft_names;
+        else
+        {
+            String F_search;
+            StringInitCString( &F_search, "search" );
+            if ( 0 == StringCaseCompare ( &Function, &F_search ) )
+                res = ft_search;
+        }
+    }
+    return res;
+}
+
+typedef enum evs{ evs_pre_txt, evs_maj, evs_mid_txt, evs_min, evs_post_txt } evs_t;
+
+static evs_t txt_2_num( String * S, const char * src, evs_t next )
+{
+    if ( S->addr == NULL ) StringInit( S, src, 0, 0 );
+    S->len++;
+    S->size++;
+    return next;
+}
+
+static evs_t num_2_txt( String * S, uint8_t * vers_part, evs_t next )
+{
+    uint64_t value = StringToU64( S, NULL );
+    *vers_part = ( value & 0xFF );
+    StringInit( S, NULL, 0, 0 );
+    return next;
+}
+
+void extract_versionS( ver_maj_min * ver, const String * version_string )
+{
+    if ( ver != NULL && version_string != NULL )
+    {
+        evs_t status = evs_pre_txt;
+        uint32_t idx = 0;
+        String S;
+
+        ver->major = 0;
+        ver->minor = 0;
+        StringInit( &S, NULL, 0, 0 );
+        while( idx < version_string->len )
+        {
+            const char * src = &version_string->addr[ idx ];
+            bool is_num = ( *src >= '0' && *src <= '9' );
+            switch( status )
+            {
+                case evs_pre_txt  : if ( is_num ) status = txt_2_num( &S, src, evs_maj );
+                                    break;
+                                    
+                case evs_maj      : if ( is_num )
+                                        { S.len++; S.size++; }
+                                    else
+                                        status = num_2_txt( &S, &ver->major, evs_mid_txt );
+                                    break;
+                
+                case evs_mid_txt  : if ( is_num ) status = txt_2_num( &S, src, evs_min );
+                                    break;
+                                    
+                case evs_min      : if ( is_num )
+                                        { S.len++; S.size++; }
+                                    else
+                                        status = num_2_txt( &S, &ver->minor, evs_post_txt );
+                                    break;
+                                    
+                case evs_post_txt : break;
+            }
+            idx++;
+        }
+        if ( status == evs_maj )
+            num_2_txt( &S, &ver->major, evs_maj );
+        else if ( status == evs_min )
+            num_2_txt( &S, &ver->minor, evs_min );
+    }
+}
+
+void extract_version( ver_maj_min * ver, const char * version_string )
+{
+    String S;
+    StringInitCString( &S, version_string );
+    extract_versionS( ver, &S );
+}
+
+pns_ver_t get_ver_t_S( const String * version, pns_ver_t default_version )
+{
+    pns_ver_t res = default_version;
+    if ( version != NULL && version->len > 0 )
+    {
+        String V_1_0;
+        StringInitCString( &V_1_0, "1.0" );
+        if ( 0 == StringCaseCompare( version, &V_1_0 ) )
+            res = vt_1_0;
+        else
+        {
+            String V_1_1;
+            StringInitCString( &V_1_1, "1.1" );
+            if ( 0 == StringCaseCompare( version, &V_1_1 ) )
+                res = vt_1_1;
+            else
+            {
+                String V_3_0;
+                StringInitCString( &V_3_0, "3.0" );
+                if ( 0 == StringCaseCompare( version, &V_3_0 ) )
+                    res = vt_3_0;
+            }
+        }
+    }
+    return res;
+}
+
+pns_ver_t get_ver_t( const char * version, pns_ver_t default_version )
+{
+    pns_ver_t res = default_version;
+    if ( version != NULL && version[ 0 ] != 0 )
+    {
+        String Sversion;
+        if ( version[ 0 ] == '#' )
+            StringInitCString( &Sversion, &version[ 1 ] );
+        else
+            StringInitCString( &Sversion, version );
+        res = get_ver_t_S( &Sversion, default_version );
+    }
+    return res;
+}
+
+
+rc_t CC ArgsParamCount( const struct Args * self, uint32_t * count );
+rc_t CC ArgsParamValue( const struct Args * self, uint32_t iteration, const void ** value );
+rc_t CC ArgsOptionValue ( const struct Args * self, const char * option_name, uint32_t iteration, const void ** value );
+
+rc_t foreach_arg( const struct Args * args,
+                  rc_t ( * on_arg )( const char * arg, void * data ),
+                  void * data )
+{
+    uint32_t count;
+    rc_t rc = ArgsParamCount( args, &count );
+    if ( rc != 0 )
+        ErrMsg( "ArgsParamCount() -> %R", rc );
+    else
+    {
+        uint32_t idx;
+        for ( idx = 0; rc == 0 && idx < count; ++ idx )
+        {
+            const char * value;
+            rc = ArgsParamValue( args, idx, ( const void ** )&value );
+            if ( rc != 0 )
+                ErrMsg( "ArgsParamValue( #%d) -> %R", idx, rc );
+            else
+                rc = on_arg( value, data );
+        }
+    }
+    return rc;
+}
+
+rc_t args_to_ptrs( const struct Args * args, const char *** ptr )
+{
+    uint32_t count;
+    rc_t rc = ArgsParamCount( args, &count );
+    if ( rc != 0 )
+        ErrMsg( "ArgsOptionCount() -> %R", rc );
+    else
+    {
+        const char ** x = calloc( count + 1, sizeof *x );
+        if ( x == NULL )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            ErrMsg( "calloc( %d ) -> %R", count * ( sizeof * x ), rc );
+        }
+        else
+        {
+            uint32_t idx;
+            for ( idx = 0; rc == 0 && idx < count; ++idx )
+            {
+                rc = ArgsParamValue( args, idx, ( const void ** )&( x[ idx ] ) );
+                if ( rc != 0 )
+                    ErrMsg( "ArgsParamValue( #%d) -> %R", idx, rc );
+            }
+            if ( rc == 0 )
+                *ptr = x;
+            else
+                free( ( void * ) x );
+        }
+    }
+    return rc;
+
+}
+
+rc_t foreach_option( const struct Args * args, const char * option_name,
+                     rc_t ( * on_option )( const char * arg, void * data ),
+                     void * data )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, option_name, &count );
+    if ( rc != 0 )
+        ErrMsg( "ArgsOptionCount() -> %R", rc );
+    else
+    {
+        uint32_t idx;
+        for ( idx = 0; rc == 0 && idx < count; ++ idx )
+        {
+            const char * value;
+            rc = ArgsOptionValue( args, option_name, idx, ( const void ** )&value );
+            if ( rc != 0 )
+                ErrMsg( "ArgsOptionValue( #%d) -> %R", idx, rc );
+            else
+                rc = on_option( value, data );
+        }
+    }
+    return rc;
+}
+
+static rc_t add_to_namelist( const char * arg, void * data )
+{
+    VNamelist * dst = data;
+    return VNamelistAppend( dst, arg );
+}
+
+
+rc_t args_to_namelist( const struct Args * args, VNamelist ** dst )
+{
+    rc_t rc = VNamelistMake( dst, 10 );
+    if ( rc != 0 )
+        ErrMsg( "VNamelistMake() -> %R", rc );
+    else
+        rc = foreach_arg( args, add_to_namelist, *dst );
+    return rc;
+}
+
+rc_t options_to_namelist( const struct Args * args, const char * option_name,
+                          VNamelist ** dst )
+{
+    rc_t rc = VNamelistMake( dst, 10 );
+    if ( rc != 0 )
+        ErrMsg( "VNamelistMake() -> %R", rc );
+    else
+        rc = foreach_option( args, option_name, add_to_namelist, *dst );
+    return rc;
+}
+
+rc_t options_to_ptrs( const struct Args * args, const char * option_name, const char *** ptr )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, option_name, &count );
+    if ( rc != 0 )
+        ErrMsg( "ArgsOptionCount() -> %R", rc );
+    else
+    {
+        const char ** x = calloc( count + 1, sizeof *x );
+        if ( x == NULL )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            ErrMsg( "calloc( %d ) -> %R", count * ( sizeof * x ), rc );
+        }
+        else
+        {
+            uint32_t idx;
+            for ( idx = 0; rc == 0 && idx < count; ++idx )
+            {
+                rc = ArgsOptionValue( args, option_name, idx, ( const void ** )&( x[ idx ] ) );
+                if ( rc != 0 )
+                    ErrMsg( "ArgsOptionValue( #%d) -> %R", idx, rc );
+            }
+            if ( rc == 0 )
+                *ptr = x;
+            else
+                free( ( void * ) x );
+        }
+    }
+    return rc;
+}
+
+rc_t foreach_item( const VNamelist * src, 
+                   rc_t ( * on_item )( const char * item, void * data ),
+                   void * data )
+{
+    uint32_t count;
+    rc_t rc = VNameListCount( src, &count );
+    if ( rc == 0 )
+    {
+        uint32_t idx;
+        for ( idx = 0; idx < count && rc == 0; ++idx )
+        {
+            const char * value;
+            rc = VNameListGet( src, idx, &value );
+            if ( rc == 0 && value != NULL )
+                rc = on_item( value, data );
+        }
+    }
+    return rc;
+}
+
+rc_t foreach_token( const String * line,
+                    token_handler_t token_handler,
+                    char delim,
+                    void * data )
+{
+    rc_t rc = 0;
+    String token;
+    uint32_t idx, id;
+    
+    token.addr = line->addr;
+    token.len = token.size = 0;
+    for ( idx = 0, id = 0; rc == 0 && idx < line->len; ++idx )
+    {
+        if ( line->addr[ idx ] == delim )
+        {
+            rc = token_handler( &token, id++, data );
+            token.len = token.size = 0;
+        }
+        else
+        {
+            if ( token.len == 0 )
+                token.addr = &line->addr[ idx ];
+            token.len++;
+            token.size++;
+        }
+    }
+    if ( token.len > 0 )
+        rc = token_handler( &token, id, data );
+    return rc;
+}
\ No newline at end of file
diff --git a/tools/srapath/helper.h b/tools/srapath/helper.h
new file mode 100644
index 0000000..fac432d
--- /dev/null
+++ b/tools/srapath/helper.h
@@ -0,0 +1,108 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_helper_
+#define _h_helper_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_klib_text_
+#include <klib/text.h>
+#endif
+
+#ifndef _h_klib_namelist_
+#include <klib/namelist.h>
+#endif
+
+#ifndef _h_kns_stream_
+#include <kns/stream.h>
+#endif
+
+rc_t ErrMsg( const char * fmt, ... );
+
+struct Args;
+
+const char * get_str_option( const struct Args *args, const char *name, const char * dflt );
+bool get_bool_option( const struct Args *args, const char *name );
+size_t get_size_t_option( const struct Args * args, const char *name, size_t dflt );
+uint32_t get_uint32_t_option( const struct Args * args, const char *name, uint32_t dflt );
+uint64_t get_uint64_t_option( const struct Args * args, const char *name, uint64_t dflt );
+
+typedef enum func_t { ft_resolve, ft_names, ft_search } func_t;
+func_t get_func_t( const char * function );
+
+rc_t foreach_arg( const struct Args * args,
+                  rc_t ( * on_arg )( const char * arg, void * data ),
+                  void * data );
+rc_t args_to_namelist( const struct Args * args, VNamelist ** dst );
+rc_t args_to_ptrs( const struct Args * args, const char *** ptr );
+
+rc_t foreach_option( const struct Args * args, const char * option_name,
+                     rc_t ( * on_option )( const char * arg, void * data ),
+                     void * data );
+rc_t options_to_namelist( const struct Args * args, const char * option_name, VNamelist ** dst );
+rc_t options_to_ptrs( const struct Args * args, const char * option_name, const char *** ptr );
+
+rc_t foreach_item( const VNamelist * src, 
+                   rc_t ( * on_item )( const char * item, void * data ),
+                   void * data );
+                  
+typedef enum pns_ver_t { vt_unknown, vt_1_0, vt_1_1, vt_3_0 } pns_ver_t;
+
+pns_ver_t get_ver_t( const char * version, pns_ver_t default_version );
+pns_ver_t get_ver_t_S( const String * version, pns_ver_t default_version );
+
+typedef struct ver_maj_min
+{
+    uint8_t major;
+    uint8_t minor;
+} ver_maj_min;
+
+
+void extract_versionS( ver_maj_min * ver, const String * version_string );
+void extract_version( ver_maj_min * ver, const char * version_string );
+
+pns_ver_t get_ver_t_S( const String * version, pns_ver_t default_version );
+
+
+typedef rc_t ( * token_handler_t )( const String * token, uint32_t id, void * data );
+
+rc_t foreach_token( const String * line,
+                    token_handler_t token_handler,
+                    char delim,
+                    void * data );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/srapath/line_iter.c b/tools/srapath/line_iter.c
new file mode 100644
index 0000000..a5ead82
--- /dev/null
+++ b/tools/srapath/line_iter.c
@@ -0,0 +1,241 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "line_iter.h"
+#include "helper.h"
+
+#include <kfs/file.h>
+#include <klib/out.h>
+#include <klib/time.h>
+#include <kproc/timeout.h>
+
+#include "os-native.h"
+
+#define ITER_DONE 0x01
+#define ITER_EOF  0x02
+
+typedef struct line_iter
+{
+    const struct KStream * stream;
+    String buffer, content, line;
+    uint32_t state, timeout_ms;
+} line_iter;
+
+
+void release_line_iter( struct line_iter * iter )
+{
+    if ( iter != NULL )
+    {
+        if ( iter->buffer.addr != NULL )
+            free( ( void * ) iter->buffer.addr );
+        free( ( void * ) iter );
+    }
+}
+
+
+static uint32_t read_line_iter( struct line_iter * iter )
+{
+    uint32_t res = 0;
+    if ( iter->content.size > 0 )
+        memmove( (void *)iter->buffer.addr, iter->content.addr, iter->content.size );
+    iter->content.addr = iter->buffer.addr;
+    {
+        char * dst = ( char * )iter->buffer.addr + iter->content.size;
+        size_t num_read;
+        size_t to_read = ( ( iter->buffer.size - 1 ) - iter->content.size );
+        timeout_t tm;
+        
+        rc_t rc = TimeoutInit( &tm, iter->timeout_ms );
+        if ( rc != 0 )
+            ErrMsg( "TimeoutInit( 5000 ) -> %R", rc );
+        else
+        {
+            rc = TimeoutPrepare( &tm );
+            if ( rc != 0 )
+                ErrMsg( "TimeoutPrepare() -> %R", rc );
+            else
+            {
+                rc = KStreamTimedRead( iter->stream, dst, iter->buffer.size - iter->content.size, &num_read, &tm );
+                if ( rc == 0 )
+                {
+                    iter->content.size += num_read;
+                    res = num_read;
+                    if ( num_read < to_read )
+                        iter->state |= ITER_EOF;
+                    else
+                        iter->state &= ~ITER_EOF;
+                }
+                else
+                {
+                    KOutMsg( "KStreamTimedRead() = %R, (%d)\n", rc, num_read );
+                    iter->state |= ITER_DONE;
+                }
+            }
+        }
+    }
+    return res;
+}
+
+
+static bool slice_iter_content( struct line_iter * iter, size_t by )
+{
+    size_t l;                
+    iter->line.addr = iter->content.addr;
+    iter->line.len  = by;
+    iter->line.size = by;
+    l = ( by + 1 );
+    iter->content.addr += l;
+    if ( l < iter->content.size )
+        iter->content.size -= l;
+    else
+        iter->content.size = 0;
+    return true;
+}
+
+
+bool advance_line_iter( struct line_iter * iter )
+{
+    bool res = ( 0 == ( iter->state & ITER_DONE ) );
+    if ( res )
+    {
+        if ( iter->content.size == 0 )
+            read_line_iter( iter );
+
+        if ( iter->content.size == 0 && ( iter->state & ITER_EOF ) )
+        {
+            iter->state |= ITER_DONE;
+            res = false;
+        }
+        else
+        {
+            char * newline = string_chr( iter->content.addr, iter->content.size, '\n' );
+            if ( newline == NULL )
+            {
+                if ( read_line_iter( iter ) == 0 )
+                    KSleepMs( 100 );
+                res = advance_line_iter( iter ); /* recursion! */
+            }
+            else
+                res = slice_iter_content( iter, newline - iter->content.addr );
+        }
+    }
+    return res;
+}
+
+
+String * get_line_iter( struct line_iter * iter )
+{
+    String * res = NULL;
+    if ( iter != NULL )
+    {
+        if ( 0 == ( iter->state & ITER_DONE ) )
+            res = &iter->line;
+    }
+    return res;
+}
+
+
+bool is_line_iter_done( const struct line_iter * iter )
+{
+    if ( iter != NULL )
+        return ( iter->state & ITER_DONE );
+    return true;
+}
+
+
+rc_t make_line_iter( struct line_iter ** iter,
+                     const struct KStream * stream,
+                     size_t buffer_size,
+                     uint32_t timeout_ms )
+{
+    rc_t rc = 0;
+    line_iter * l = calloc( 1, sizeof * l );
+    if ( l == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        ErrMsg( "calloc( %d ) -> %R", ( sizeof * l ), rc );
+    }
+    else
+    {
+        l->stream = stream;
+        l->buffer.addr = malloc( buffer_size );
+        if ( l->buffer.addr == NULL )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            ErrMsg( "malloc( %d ) -> %R", ( buffer_size ), rc );
+            free( ( void * ) l );
+        }
+        else
+        {
+            l->buffer.size = buffer_size;
+            l->buffer.len = buffer_size;
+            l->content.addr = l->buffer.addr;
+            l->timeout_ms = timeout_ms;
+            read_line_iter( l );
+            if ( advance_line_iter( l ) )
+            {
+                *iter = l;
+            }
+            else
+            {
+                rc = RC( rcVDB, rcNoTarg, rcConstructing, rcRange, rcInvalid );
+                release_line_iter( l );
+            }
+        }
+    }
+    return rc;
+}
+
+
+rc_t stream_line_read( const struct KStream * stream, stream_line_handler_t on_line,
+                       size_t buffer_size, uint32_t timeout_ms, void * data )
+{
+    struct line_iter * iter;
+    rc_t rc = make_line_iter( &iter, stream, buffer_size, timeout_ms );
+    if ( rc == 0 )
+    {
+        while ( rc == 0 && !is_line_iter_done( iter ) )
+        {
+            String * line = get_line_iter( iter );
+            rc = on_line( line, data );
+            advance_line_iter( iter );
+        }
+        release_line_iter( iter );
+    }
+    return rc;
+}
+
+
+static rc_t print_stream_line( const String * line, void * data )
+{
+    return KOutMsg( "%S\n", line );
+}
+
+rc_t print_stream( const struct KStream * stream, size_t buffer_size,
+        uint32_t timeout_ms, void * data )
+{
+    return stream_line_read( stream, print_stream_line, buffer_size, timeout_ms, data );
+}
diff --git a/tools/srapath/line_iter.h b/tools/srapath/line_iter.h
new file mode 100644
index 0000000..94a524d
--- /dev/null
+++ b/tools/srapath/line_iter.h
@@ -0,0 +1,71 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_line_iter_
+#define _h_line_iter_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_klib_text_
+#include <klib/text.h>
+#endif
+
+#ifndef _h_kns_stream_
+#include <kns/stream.h>
+#endif
+
+struct line_iter;
+
+void release_line_iter( struct line_iter * iter );
+bool advance_line_iter( struct line_iter * iter );
+String * get_line_iter( struct line_iter * iter );
+bool is_line_iter_done( const struct line_iter * iter );
+
+rc_t make_line_iter( struct line_iter ** iter, const struct KStream * stream,
+        size_t buffer_size, uint32_t timeout_ms );
+
+typedef rc_t ( * stream_line_handler_t )( const String * line, void * data );
+
+rc_t stream_line_read( const struct KStream * stream, stream_line_handler_t on_line,
+        size_t buffer_size, uint32_t timeout_ms, void * data );
+
+typedef rc_t ( * stream_handler_t )( const struct KStream * stream, void * data );
+
+rc_t print_stream( const struct KStream * stream, size_t buffer_size,
+        uint32_t timeout_ms, void * data );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/srapath/srapath.c b/tools/srapath/srapath.c
new file mode 100644
index 0000000..1558b53
--- /dev/null
+++ b/tools/srapath/srapath.c
@@ -0,0 +1,439 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "helper.h"
+#include "cgi_request.h"
+#include "line_iter.h"
+
+#include <vfs/resolver.h>
+#include <vfs/path.h>
+#include <vfs/manager.h>
+#include <kfs/directory.h>
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/text.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h> /* STSMSG */
+#include <klib/rc.h>
+#include <klib/vector.h>
+#include <sysalloc.h>
+
+
+#include <limits.h> /* PATH_MAX */
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+
+static const char * func_usage[] = { "function to perform (resolve, names, search) default=resolve", NULL };
+#define OPTION_FUNC   "funtion"
+#define ALIAS_FUNC    "f"
+
+static const char * timeout_usage[] = { "timeout-value for request", NULL };
+#define OPTION_TIMEOUT "timeout"
+#define ALIAS_TIMEOUT "t"
+
+static const char * vers_usage[] = { "version-string for cgi-calls", NULL };
+#define OPTION_VERS   "vers"
+#define ALIAS_VERS    "e"
+
+static const char * url_usage[] = { "url to be used for cgi-calls", NULL };
+#define OPTION_URL    "url"
+#define ALIAS_URL     "u"
+
+static const char * param_usage[] = { "param to be added to cgi-call (tic=XXXXX)", NULL };
+#define OPTION_PARAM  "param"
+#define ALIAS_PARAM   "p"
+
+static const char * raw_usage[] = { "print the raw reply (instead of parsing it)", NULL };
+#define OPTION_RAW    "raw"
+#define ALIAS_RAW     "r"
+
+static const char * size_usage[] = { "print size of object", NULL };
+#define OPTION_SIZE   "size"
+#define ALIAS_SIZE    "s"
+
+static const char * date_usage[] = { "print date of object", NULL };
+#define OPTION_DATE   "date"
+#define ALIAS_DATE    "d"
+
+OptDef ToolOptions[] =
+{
+    { OPTION_FUNC,      ALIAS_FUNC,      NULL, func_usage,       1,  true,   false },
+    { OPTION_TIMEOUT,   ALIAS_TIMEOUT,   NULL, timeout_usage,    1,  true,   false },
+    { OPTION_VERS,      ALIAS_VERS,      NULL, vers_usage,       1,  true,   false },
+    { OPTION_URL,       ALIAS_URL,       NULL, url_usage,        1,  true,   false },
+    { OPTION_PARAM,     ALIAS_PARAM,     NULL, param_usage,      10, true,   false },
+    { OPTION_SIZE,      ALIAS_SIZE,      NULL, size_usage,       1,  false,  false },
+    { OPTION_DATE,      ALIAS_DATE,      NULL, date_usage,       1,  false,  false },
+    { OPTION_RAW,       ALIAS_RAW,       NULL, raw_usage,        1,  false,  false }
+};
+
+const char UsageDefaultName[] = "srapath";
+
+
+rc_t CC UsageSummary( const char * progname )
+{
+    return OUTMSG(("\n"
+        "Usage:\n"
+        "  %s [options] <accession> ...\n\n"
+        "Summary:\n"
+        "  Tool to produce a list of full paths to files\n"
+        "  (SRA and WGS runs, refseqs: reference sequences)\n"
+        "  from list of NCBI accessions.\n"
+        "\n", progname));
+}
+
+
+rc_t CC Usage( const Args *args )
+{
+    rc_t rc;
+    uint32_t idx, count = ( sizeof ToolOptions ) / ( sizeof ToolOptions[ 0 ] );
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+
+    if ( args == NULL )
+        rc = RC( rcExe, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+        rc = ArgsProgram( args, &fullpath, &progname );
+
+    if ( rc != 0 )
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary( progname );
+
+    OUTMSG((
+        "  Output paths are ordered according to accession list.\n"
+        "\n"
+        "  The accession search path will be determined according to the\n"
+        "  configuration. It will attempt to find files in local and site\n"
+        "  repositories, and will also check remote repositories for run\n"
+        "  location.\n"));
+    OUTMSG((
+        "  This tool produces a path that is 'likely' to be a run, in that\n"
+        "  an entry exists in the file system at the location predicted.\n"
+        "  It is possible that this path will fail to produce success upon\n"
+        "  opening a run if the path does not point to a valid object.\n\n"));
+
+    OUTMSG(( "Options:\n" ));
+
+    for ( idx = 0; idx < count; ++idx ) /* start with 1, do not advertize row-range-option*/
+        HelpOptionLine( ToolOptions[ idx ].aliases, ToolOptions[ idx ].name, NULL, ToolOptions[ idx ].help );
+
+    OUTMSG(( "\n" ));
+    HelpOptionsStandard();
+    HelpVersion( fullpath, KAppVersion() );
+
+    return rc;
+}
+
+
+static rc_t resolve_one_argument( VFSManager * mgr, VResolver * resolver, const char * pc )
+{
+    const VPath * upath = NULL;
+    rc_t rc = VFSManagerMakePath( mgr, ( VPath** )&upath, "%s", pc );
+    if ( rc != 0 )
+        PLOGMSG( klogErr, ( klogErr, "failed to create VPath-object from '$(name)'", "name=%s", pc ) );
+    else
+    {
+        const VPath * local;
+        const VPath * remote;
+
+        rc = VResolverQuery( resolver, eProtocolHttp, upath, &local, &remote, NULL );
+        if ( rc == 0 )
+        {
+            const String * s;
+
+            if ( local != NULL )
+                rc = VPathMakeString( local, &s );
+            else 
+                rc = VPathMakeString( remote, &s );
+            if ( rc == 0 )
+            {
+                OUTMSG(("%S\n", s));
+                free( ( void* )s );
+            }
+            VPathRelease( local );
+            VPathRelease( remote );
+        }
+        else
+        {
+            KDirectory * cwd;
+            rc_t orc = VFSManagerGetCWD( mgr, &cwd );
+            if ( orc == 0 )
+            {
+                KPathType kpt = KDirectoryPathType( cwd, "%s", pc );
+                switch ( kpt &= ~kptAlias )
+                {
+                    case kptNotFound : STSMSG( 1, ( "'%s': not found while "
+                                                     "searching the file system",
+                                                     pc ) );
+                                        break;
+
+                    case kptBadPath  : STSMSG( 1, ( "'%s': bad path while "
+                                                     "searching the file system",
+                                                     pc ) );
+                                        break;
+
+                    default :          STSMSG( 1, ( "'%s': "
+                                                     "found in the file system",
+                                                     pc ) );
+                                        rc = 0;
+                                        break;
+                }
+            }
+            if ( orc == 0 && rc == 0 )
+            {
+                if ( rc != 0 )
+                {
+                    PLOGMSG( klogErr, ( klogErr, "'$(name)': not found", "name=%s", pc ) );
+                }
+                else
+                {
+                    char resolved[ PATH_MAX ] = "";
+                    rc = KDirectoryResolvePath( cwd, true, resolved, sizeof resolved, "%s", pc );
+                    if ( rc == 0 )
+                    {
+                        STSMSG( 1, ( "'%s': found in "
+                                     "the current directory at '%s'",
+                                     pc, resolved ) );
+                        OUTMSG(( "%s\n", resolved ));
+                    }
+                    else
+                    {
+                        STSMSG( 1, ( "'%s': cannot resolve "
+                                     "in the current directory",
+                                     pc ) );
+                        OUTMSG(( "./%s\n", pc ));
+                    }
+                }
+            }
+            KDirectoryRelease( cwd );
+        }
+    }
+    VPathRelease( upath );
+    return rc;
+}
+
+
+static rc_t resolve_arguments( Args * args )
+{
+    uint32_t acount;
+    rc_t rc = ArgsParamCount( args, &acount );
+    if ( rc != 0 )
+        LOGERR ( klogInt, rc, "failed to count parameters" );
+    else if ( acount < 1 )
+    {
+        /* That useless: rc = */ MiniUsage( args );
+        rc = RC( rcExe, rcArgv, rcParsing, rcParam, rcInsufficient );
+    }
+    else
+    {
+        VFSManager * mgr;
+        rc = VFSManagerMake( &mgr );
+        if ( rc != 0 )
+            LOGERR ( klogErr, rc, "failed to create VFSManager object" );
+        else
+        {
+            VResolver * resolver;
+            rc = VFSManagerGetResolver( mgr, &resolver );
+            if ( rc != 0 )
+                LOGERR ( klogErr, rc, "failed to get VResolver object" );
+            else
+            {
+                uint32_t idx;
+                for ( idx = 0; rc == 0 && idx < acount; ++ idx )
+                {
+                    const char * pc;
+                    rc = ArgsParamValue( args, idx, ( const void ** )&pc );
+                    if ( rc != 0 )
+                        LOGERR( klogInt, rc, "failed to retrieve parameter value" );
+                    else
+                        rc = resolve_one_argument( mgr, resolver, pc );
+                }
+                VResolverRelease( resolver );
+            }
+            VFSManagerRelease( mgr );
+        }
+    }
+    return rc;
+}
+
+
+/* ---------------------------------------------------------------------------- */
+
+static rc_t on_reply_line( const String * line, void * data )
+{
+    return KOutMsg( "%S\n", line );
+}
+
+typedef struct out_fmt
+{
+    bool raw, print_size, print_date;
+} out_fmt;
+
+
+static rc_t prepare_request( const Args * args, request_params * r, out_fmt * fmt,
+                             bool for_names )
+{
+    rc_t rc = args_to_ptrs( args, &r->terms ); /* helper.c */
+    if ( rc == 0 )
+        rc = options_to_ptrs( args, OPTION_PARAM, &r->params ); /* helper.c */
+    if ( rc == 0 )
+    {
+        if ( for_names )
+        {
+            r->names_url  = get_str_option( args, OPTION_URL, NULL ); /* helper.c */
+            r->names_ver  = get_str_option( args, OPTION_VERS, NULL ); /* helper.c */
+            r->search_url = NULL;
+            r->search_ver = NULL;
+            
+        }
+        else
+        {
+            r->names_url  = NULL;
+            r->names_ver  = NULL;
+            r->search_url = get_str_option( args, OPTION_URL, NULL ); /* helper.c */
+            r->search_ver = get_str_option( args, OPTION_VERS, NULL ); /* helper.c */
+        }
+        r->buffer_size = 4096;
+        r->timeout_ms = get_uint32_t_option( args, OPTION_TIMEOUT, 5000 );
+    }
+    fmt->raw = get_bool_option( args, OPTION_RAW );
+    fmt->print_size = get_bool_option( args, OPTION_SIZE );
+    fmt->print_date = get_bool_option( args, OPTION_DATE );
+    return rc;
+}
+
+
+/* ---------------------------------------------------------------------------- */
+
+static rc_t print_names_reply( const reply_obj * obj, void * data )
+{
+    rc_t rc;
+    out_fmt * fmt = data;
+    
+    if ( obj->code == 200 )
+    {
+        if ( fmt->print_size )
+            rc = KOutMsg( "%22S %,12lu --> %S\n", obj->id, obj->size, obj->path );
+        else
+            rc = KOutMsg( "%22S --> %S\n", obj->id, obj->path );
+    }
+    else
+        rc = KOutMsg( "%22S --> %S (%d)\n", obj->id, obj->message, obj->code );
+
+    return rc;
+}
+
+static rc_t names_cgi( const Args * args )
+{
+    request_params r; /* cgi_request.h */
+    out_fmt fmt;
+    rc_t rc = prepare_request( args, &r, &fmt, true );
+    if ( rc == 0 )
+    {
+        uint32_t rslt_code;
+
+        if ( fmt.raw )
+            rc = raw_names_request( &r, on_reply_line, &rslt_code, NULL ); /* cgi_request.c */
+        else
+        {
+            struct reply_obj_list * list; /* cgi_request.h */
+            rc = names_request_to_list( &r, &rslt_code, &list ); /* cgi_request.c */
+            if ( rc == 0 )
+            {
+                rc = foreach_reply_obj( list, print_names_reply, &fmt ); /* cgi_request.c */
+                release_reply_obj_list( list ); /* cgi_request.c */
+            }
+        }
+        
+        free( ( void * ) r.terms );
+        free( ( void * ) r.params );
+    }
+    return rc;
+}
+
+/* ---------------------------------------------------------------------------- */
+
+static rc_t print_search_reply( const reply_obj * obj, void * data )
+{
+    return KOutMsg( "(%S) %S --> %S\n", obj->obj_type, obj->id, obj->path );
+}
+
+static rc_t search_cgi( const Args * args )
+{
+    request_params r; /* cgi_request.h */
+    out_fmt fmt;
+    rc_t rc = prepare_request( args, &r, &fmt, false );
+    if ( rc == 0 )
+    {
+        uint32_t rslt_code;
+
+        if ( fmt.raw )
+            rc = raw_search_request( &r, on_reply_line, &rslt_code, NULL ); /* cgi_request.c */
+        else
+        {
+            struct reply_obj_list * list; /* cgi_request.h */
+            rc = search_request_to_list( &r, &rslt_code, &list, true ); /* cgi_request.c */
+            if ( rc == 0 )
+            {
+                rc = foreach_reply_obj( list, print_search_reply, &fmt ); /* cgi_request.c */
+                release_reply_obj_list( list ); /* cgi_request.c */
+            }
+        }
+
+        free( ( void * ) r.terms );
+        free( ( void * ) r.params );
+    }
+    return rc;
+}
+
+/* ---------------------------------------------------------------------------- */
+
+rc_t CC KMain( int argc, char *argv [] )
+{
+    Args * args;
+    uint32_t num_options = sizeof ToolOptions / sizeof ToolOptions [ 0 ];
+    rc_t rc = ArgsMakeAndHandle ( &args, argc, argv, 1, ToolOptions, num_options );
+    if ( rc != 0 )
+        LOGERR( klogInt, rc, "failed to parse arguments" );
+    else
+    {
+        const char * f = get_str_option( args, OPTION_FUNC, NULL );
+        func_t ft = get_func_t( f );
+        switch ( ft )
+        {
+            case ft_resolve : rc = resolve_arguments( args ); break;
+            case ft_names   : rc = names_cgi( args ); break;
+            case ft_search  : rc = search_cgi( args ); break;
+        }
+        ArgsWhack( args );
+    }
+    return rc;
+}
diff --git a/libs/svdb/.gitignore b/tools/update-schema/.cvsignore
similarity index 100%
rename from libs/svdb/.gitignore
rename to tools/update-schema/.cvsignore
diff --git a/tools/update-schema/Makefile b/tools/update-schema/Makefile
new file mode 100644
index 0000000..dba9840
--- /dev/null
+++ b/tools/update-schema/Makefile
@@ -0,0 +1,77 @@
+# ==============================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/update-schema
+
+INT_TOOLS =
+
+EXT_TOOLS = \
+	vdb-update-schema
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# update-schema
+#
+UPDATE_SCHEMA_SRC = \
+	update-schema \
+
+UPDATE_SCHEMA_OBJ = \
+	$(addsuffix .$(OBJX),$(UPDATE_SCHEMA_SRC))
+
+UPDATE_SCHEMA_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-wvdb \
+
+$(BINDIR)/vdb-update-schema: $(UPDATE_SCHEMA_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(UPDATE_SCHEMA_LIB)
+
+#-------------------------------------------------------------------------------
diff --git a/tools/update-schema/update-schema.c b/tools/update-schema/update-schema.c
new file mode 100644
index 0000000..2ca2905
--- /dev/null
+++ b/tools/update-schema/update-schema.c
@@ -0,0 +1,454 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <kapp/main.h>
+#include <vdb/vdb-priv.h> /* VTableStoreSchema */
+#include <vdb/manager.h> /* VDBManager */
+#include <vdb/table.h>
+#include <vdb/schema.h> /* VSchema */
+#include <kdb/meta.h>
+#include <klib/out.h> /* OUTMSG */
+#include <klib/log.h> /* LOGERR */
+#include <klib/rc.h>
+#include <insdc/sra.h> /* SRA_PLATFORM_ ... */
+#include <assert.h>
+#include <string.h> /* memset */
+
+#define DISP_RC(rc, msg) (void)((rc == 0) ? 0 : LOGERR(klogInt, rc, msg))
+#define DISP_RC2(rc, name, msg) (void)((rc == 0) ? 0 : \
+    PLOGERR(klogInt, (klogInt,rc, "$(msg): $(name)","msg=%s,name=%s",msg,name)))
+#define DESTRUCT(type, obj) do { rc_t rc2 = type##Release(obj); \
+    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
+
+typedef struct CmdArgs {
+    const char* run;
+    const char* schema;
+    const char* sPlatform;
+    uint8_t platform;
+    Args* args;
+    uint32_t count;
+    uint32_t i;
+} CmdArgs;
+typedef struct Db {
+    VDBManager* mgr;
+    VSchema* schema;
+    VTable* tbl;
+    KMetadata* meta;
+    bool frozen;
+    bool updatedPlatf;
+    bool deletedSchema;
+} Db;
+#define OPTION_PLATF "platform"
+#define ALIAS_PLATF  "p"
+static const char* platf_usage[] = { "Platform: LS454 | ILLUMINA | HELICOS",
+    " | ABI_SOLID | COMPLETE_GENOMICS", " | PACBIO_SMRT | ION_TORRENT | CAPILLARY | OXFORD_NANOPORE", NULL };
+#define OPTION_SCHEMA "schema"
+#define ALIAS_SCHEMA  "s"
+static const char* schema_usage[] = { "Schema", NULL };
+#define OPTION_RUN   "out"
+#define ALIAS_RUN    "o"
+static const char* run_usage   [] = { "Run", NULL };
+OptDef Options[] =  {
+      { OPTION_RUN   , ALIAS_RUN   , NULL, run_usage   , 1, true , true }
+    , { OPTION_SCHEMA, ALIAS_SCHEMA, NULL, schema_usage, 1, true , true }
+    , { OPTION_PLATF , ALIAS_PLATF , NULL, platf_usage , 1, true , true }
+};
+
+rc_t CC UsageSummary (const char * progname)
+{    
+    OUTMSG (("\n"
+             "Usage:\n"
+             "  %s -o <run> [ -s <schema-table-or-db-spec>\n"
+             "      [ -p <platform-name> ] ] <schema-file> ...\n"
+             "\n"
+             "Summary:\n"
+             "  Update table schema\n"
+             "\n", progname));
+    return 0;
+}
+
+const char UsageDefaultName[] = "check-blob-size";
+#define def_name UsageDefaultName
+
+rc_t CC Usage(const Args* args)
+{
+    rc_t rc = 0;
+    const char* progname = def_name;
+    const char* fullpath = def_name;
+    assert(args);
+    rc = ArgsProgram(args, &fullpath, &progname);
+    if (rc)
+    {    progname = fullpath = def_name; }
+    UsageSummary(progname);
+    OUTMSG(("\nOptions\n"));
+    HelpOptionLine(ALIAS_RUN, OPTION_RUN   , "run"              , run_usage);
+    HelpOptionLine
+               (ALIAS_SCHEMA, OPTION_SCHEMA, "schema-table-spec", schema_usage);
+    HelpOptionLine(ALIAS_PLATF, OPTION_PLATF, "platform-name"   , platf_usage);
+    HelpOptionsStandard();
+    HelpVersion(fullpath, KAppVersion());
+    return rc;
+}
+
+/* MINIUSAGE(def_name) */
+static rc_t CmdArgsInit(int argc, char** argv, CmdArgs* cmdArgs)
+{
+    rc_t rc = 0;
+    Args* args = NULL;
+    assert(argv && cmdArgs);
+
+    memset(cmdArgs, 0, sizeof *cmdArgs);
+
+    rc = ArgsMakeAndHandle(&cmdArgs->args,
+        argc, argv, 1, Options, sizeof Options / sizeof Options[0]);
+    DISP_RC(rc, "while calling ArgsMakeAndHandle");
+    args = cmdArgs->args;
+
+    while (rc == 0) {
+        uint32_t pcount = 0;
+
+        /* run parameter */
+        rc = ArgsOptionCount(args, OPTION_RUN, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure parsing run name");
+            break;
+        }
+        if (pcount < 1) {
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInsufficient);
+            LOGERR(klogErr, rc, "Missing run parameter");
+            break;
+        }
+        if (pcount > 1) {
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcAmbiguous);
+            LOGERR(klogErr, rc, "Too many run parameters");
+            break;
+        }
+        rc = ArgsOptionValue (args, OPTION_RUN, 0, (const void **)&cmdArgs->run);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure retrieving run name");
+            break;
+        }
+
+        /* platform parameter */
+        rc = ArgsOptionCount(args, OPTION_PLATF, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure parsing platform");
+            break;
+        }
+        if (pcount > 1) {
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcAmbiguous);
+            LOGERR(klogErr, rc, "Too many platform parameters");
+            break;
+        }
+        assert(SRA_PLATFORM_UNDEFINED == 0);
+        if (pcount == 1) {
+            uint8_t p = SRA_PLATFORM_UNDEFINED;
+            const char* arg = NULL;
+            rc = ArgsOptionValue(args, OPTION_PLATF, 0, (const void **)&arg);
+            if (rc) {
+                LOGERR(klogErr, rc, "Failure retrieving platform");
+                break;
+            }
+            if      (!strcmp(arg, "454"))
+            {   p = SRA_PLATFORM_454; }
+            else if (!strcmp(arg, "LS454"))
+            {   p = SRA_PLATFORM_454; }
+            else if (!strcmp(arg, "ILLUMINA"))
+            {   p = SRA_PLATFORM_ILLUMINA; }
+            else if (!strcmp(arg, "HELICOS"))
+            {   p = SRA_PLATFORM_HELICOS; }
+            else if (!strcmp(arg, "ABI_SOLID"))
+            {   p = SRA_PLATFORM_ABSOLID; }
+            else if (!strcmp(arg, "COMPLETE_GENOMICS"))
+            {   p = SRA_PLATFORM_COMPLETE_GENOMICS; }
+            else if (!strcmp(arg, "PACBIO_SMRT"))
+            {   p = SRA_PLATFORM_PACBIO_SMRT; }
+            else if (!strcmp(arg, "ION_TORRENT"))
+            {   p = SRA_PLATFORM_ION_TORRENT; }
+            else if (!strcmp(arg, "CAPILLARY"))
+            {   p = SRA_PLATFORM_CAPILLARY; }
+            else if (!strcmp(arg, "OXFORD_NANOPORE"))
+            {   p = SRA_PLATFORM_OXFORD_NANOPORE; }
+            else {
+                rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInvalid);
+                PLOGERR(klogInt, (klogInt, rc, "Invalid platform: $(name)",
+                    "name=%s", arg));
+                break;
+            }
+            cmdArgs->platform = p;
+            cmdArgs->sPlatform = arg;
+        }
+
+        /* schema parameter */
+        rc = ArgsOptionCount(args, OPTION_SCHEMA, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure parsing schema");
+            break;
+        }
+        if (pcount > 1) {
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcAmbiguous);
+            LOGERR(klogErr, rc, "Too many schema parameters");
+            break;
+        }
+        else if (pcount == 1) {
+            rc = ArgsOptionValue(args, OPTION_SCHEMA, 0, (const void **)&cmdArgs->schema);
+            if (rc) {
+                LOGERR(klogErr, rc, "Failure retrieving schema");
+                break;
+            }
+        }
+        else if (/* pcount < 0 && */ cmdArgs->platform) {
+            rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInsufficient);
+            LOGERR
+                (klogErr, rc, "Schema is required when platform is specified");
+        }
+
+        break;
+    }
+
+    if (rc == 0) {
+        do {
+            rc = ArgsParamCount(args, &cmdArgs->count);
+            if (rc) {
+                DISP_RC(rc, "while calling ArgsParamCount");
+                break;
+            }
+            if (cmdArgs->count < 1) {
+                rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInsufficient);
+                LOGERR(klogErr, rc, "Missing schema parameter");
+                break;
+            }
+        } while (false);
+    }
+
+    if (rc != 0)
+    {   MiniUsage(cmdArgs->args); }
+
+    return rc;
+}
+
+static rc_t CmdArgsGetNextParam(CmdArgs* args, const char** param)
+{
+    rc_t rc = 0;
+    assert(args && param);
+    *param = NULL;
+    if (args->i >= args->count) /* no more parameters to give :( */
+    {   return rc; }
+    rc = ArgsParamValue(args->args, args->i, (const void **)param);
+    if (rc) {
+        PLOGERR(klogInt, (klogInt, rc,
+            "while calling ArgsParamValue($(i))", "i=%d", args->i));
+    }
+    ++args->i;
+    return rc;
+}
+
+static rc_t DbConstruct(Db* db, CmdArgs* args) {
+    rc_t rc = 0;
+    assert(db && args);
+    memset(db, 0, sizeof *db);
+    if (rc == 0) {
+        rc = VDBManagerMakeUpdate(&db->mgr, NULL);
+        DISP_RC(rc, "While calling VDBManagerMakeUpdate");
+    }
+    if (rc == 0) {
+        rc = VDBManagerMakeSchema(db->mgr, &db->schema);
+        DISP_RC(rc, "While calling VDBManagerMakeSchema");
+    }
+    while (rc == 0) {
+        const char* param = NULL;
+        rc = CmdArgsGetNextParam(args, &param);
+        if (param == NULL)
+        {   break; }
+        rc = VSchemaParseFile(db->schema, "%s", param);
+        DISP_RC2(rc, param, "While calling VSchemaParseFile");
+    }
+    if (rc == 0) {
+        rc =
+            VDBManagerOpenTableUpdate(db->mgr, &db->tbl, db->schema, args->run);
+        DISP_RC2(rc, args->run, "While calling VDBManagerOpenTableUpdate");
+    }
+    if (rc == 0) {
+        rc = VTableOpenMetadataUpdate(db->tbl, &db->meta);
+        DISP_RC(rc, "While calling VTableOpenMetadataUpdate");
+    }
+    return rc;
+}
+
+static rc_t DbBeginTran(Db* self)
+{
+    rc_t rc = 0;
+    assert(self);
+    if (rc == 0) {
+        rc = KMetadataFreeze(self->meta);
+        DISP_RC(rc, "While calling KMetadataFreeze");
+        if (rc == 0)
+        {   self->frozen = true; }
+    }
+    return rc;
+}
+
+static rc_t DbUpdatePlatform(Db* self, const CmdArgs* args)
+{
+    rc_t rc = 0;
+    bool toUpdate = false;
+    const char path[] = "col/PLATFORM/row";
+    const KMDataNode* rNode = NULL;
+    KMDataNode* uNode = NULL;
+    assert(self && args);
+    if (rc == 0) {
+        rc = KMetadataOpenNodeRead(self->meta, &rNode, "%s", path);
+        DISP_RC2(rc, path, "While calling KMetadataOpenNodeRead");
+    }
+    if (rc == 0) {
+        uint8_t p = SRA_PLATFORM_UNDEFINED;
+        rc = KMDataNodeReadB8(rNode, &p);
+        DISP_RC2(rc, path, "While reading KMetaNode");
+        if (rc == 0 && p == args->platform) {
+            PLOGMSG(klogWarn, (klogWarn,
+                "PLATFORM is set already to $(PLATFORM)",
+                "PLATFORM=%s", args->sPlatform));
+        }
+        else { toUpdate = true; }
+    }
+    DESTRUCT(KMDataNode, rNode);
+    if (toUpdate) {
+        if (rc == 0) {
+            rc = KMetadataOpenNodeUpdate(self->meta, &uNode, "%s", path);
+            DISP_RC2(rc, path, "While calling KMetadataOpenNodeUpdate");
+        }
+        if (rc == 0) {
+            rc = KMDataNodeWriteB8(uNode, &args->platform);
+            DISP_RC2(rc, path, "While writing KMetaNode");
+            if (rc == 0)
+            {   self->updatedPlatf = true; }
+        }
+    }
+    DESTRUCT(KMDataNode, uNode);
+    return rc;
+}
+
+static rc_t DbDeleteSchema(Db* self)
+{
+    rc_t rc = 0;
+    KMDataNode* uNode = NULL;
+    const char path[] = "schema";
+    assert(self);
+    if (rc == 0) {
+        rc = KMetadataOpenNodeUpdate(self->meta, &uNode, "%s", path);
+        DISP_RC2(rc, path, "While calling KMetadataOpenNodeUpdate");
+    }
+    if (rc == 0) {
+        rc = KMDataNodeDropAll(uNode);
+        DISP_RC2(rc, path, "While calling KMDataNodeDropAll");
+        if (rc == 0)
+        {   self->deletedSchema = true; }
+    }
+    DESTRUCT(KMDataNode, uNode);
+    return rc;
+}
+
+static rc_t DbCloseTbl(Db* self)
+{
+    rc_t rc = 0;
+    assert(self);
+    DESTRUCT(KMetadata, self->meta);
+    DESTRUCT(VTable, self->tbl);
+    return rc;
+}
+
+static rc_t DbDestruct(Db* self) {
+    rc_t rc = 0;
+    assert(self);
+    DESTRUCT(KMetadata, self->meta);
+    DESTRUCT(VTable, self->tbl);
+    DESTRUCT(VSchema, self->schema);
+    DESTRUCT(VDBManager, self->mgr);
+    return rc;
+}
+
+static rc_t DbStoreSchema(Db* self, const CmdArgs* args)
+{
+    rc_t rc = 0;
+    bool metaUpdated = false;
+    assert(self && args);
+    if (self->updatedPlatf || self->deletedSchema)
+    {   metaUpdated = true; }
+    if (metaUpdated) {
+        if (rc == 0) {
+            rc = DbCloseTbl(self);
+            DISP_RC(rc, "While calling VTableRelease");
+        }
+        if (rc == 0) {
+            rc = VDBManagerCreateTable(self->mgr,
+                                       &self->tbl, self->schema, args->schema, kcmOpen, "%s", args->run);
+            DISP_RC2(rc, args->run, "While calling VDBManagerCreateTable");
+        }
+    }
+    else {
+        rc = VTableStoreSchema(self->tbl);
+        DISP_RC(rc, "While calling VTableStoreSchema");
+    }
+    return rc;
+}
+
+static rc_t DbRollbackTran(Db* self)
+{
+    rc_t rc = 0;
+    assert(self);
+    return rc;
+}
+
+rc_t CC KMain(int argc, char* argv[])
+{
+    rc_t rc = 0;
+    CmdArgs args;
+    Db db;
+    memset(&db, 0, sizeof db);
+    if (rc == 0)
+    {   rc = CmdArgsInit(argc, argv, &args); }
+    if (rc == 0)
+    {   rc = DbConstruct(&db, &args); }
+    if (rc == 0) {
+        rc = DbBeginTran(&db);
+        if (rc == 0 && args.platform)
+        {   rc = DbUpdatePlatform(&db, &args); }
+        if (rc == 0 && args.schema)
+        {   rc = DbDeleteSchema(&db); }
+        if (rc == 0)
+        {   rc = DbStoreSchema(&db, &args); }
+        if (rc != 0)
+        {   DbRollbackTran(&db); }
+    }
+    {
+        rc_t rc2 = DbDestruct(&db);
+        if (rc2 != 0 && rc == 0)
+        {   rc = rc2; }
+    }
+    return rc;
+}
+
+/* EOF */
diff --git a/tools/util/Makefile b/tools/util/Makefile
new file mode 100644
index 0000000..60d2491
--- /dev/null
+++ b/tools/util/Makefile
@@ -0,0 +1,392 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/util
+
+INT_TOOLS = \
+	testld \
+	txt2kdb \
+	rowwritetest \
+	sortreadtest \
+	pacbio-correct \
+	crc32sum \
+	samview \
+	kdb-index \
+	pseudo-aligner \
+	schema-replace \
+
+EXT_TOOLS = \
+	rcexplain \
+	kdbmeta \
+	md5cp \
+	vdb-lock \
+	vdb-unlock \
+	test-sra \
+	vdb-passwd \
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+	
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# rcexplain - explain a return code observed in debugger
+#
+RCEXPLAIN_SRC = \
+	rcexplain
+
+RCEXPLAIN_OBJ = \
+	$(addsuffix .$(OBJX),$(RCEXPLAIN_SRC))
+
+RCEXPLAIN_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-vdb \
+
+$(BINDIR)/rcexplain: $(RCEXPLAIN_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(RCEXPLAIN_LIB)
+
+
+#-------------------------------------------------------------------------------
+# kdbmeta - query and update metadata files
+#
+KDBMETA_SRC = \
+	kdbmeta
+
+KDBMETA_OBJ = \
+	$(addsuffix .$(OBJX),$(KDBMETA_SRC))
+
+KDBMETA_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-wvdb \
+	-lm
+
+$(BINDIR)/kdbmeta: $(KDBMETA_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(KDBMETA_LIB)
+
+
+#-------------------------------------------------------------------------------
+# vdb-lock
+#  lock a vdb object
+#
+VDB_LOCK_SRC = \
+	vdb-lock
+
+VDB_LOCK_OBJ = \
+	$(addsuffix .$(OBJX),$(VDB_LOCK_SRC))
+
+VDB_LOCK_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-wvdb \
+	-lm
+
+$(BINDIR)/vdb-lock: $(VDB_LOCK_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(VDB_LOCK_LIB)
+
+
+#-------------------------------------------------------------------------------
+# vdb-unlock
+#  unlock a vdb object
+#
+VDB_UNLOCK_SRC = \
+	vdb-unlock
+
+VDB_UNLOCK_OBJ = \
+	$(addsuffix .$(OBJX),$(VDB_UNLOCK_SRC))
+
+VDB_UNLOCK_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-wvdb \
+	-lm
+
+$(BINDIR)/vdb-unlock: $(VDB_UNLOCK_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(VDB_UNLOCK_LIB)
+
+
+#-------------------------------------------------------------------------------
+# testld - test dynamic load of libraries
+#
+TESTLD_SRC = \
+	testld
+
+TESTLD_OBJ = \
+	$(addsuffix .$(OBJX),$(TESTLD_SRC))
+
+TESTLD_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-vdb \
+
+
+$(BINDIR)/testld: $(TESTLD_OBJ)
+	$(LD) --exe -o $@ $^ $(TESTLD_LIB)
+
+
+#-------------------------------------------------------------------------------
+# test-sra: print config, resolve sra, check dependencies
+#
+
+T_SRC = \
+	PrintOS \
+	test-sra \
+
+T_OBJ = \
+	$(addsuffix .$(OBJX),$(T_SRC))
+
+T_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lm
+
+$(BINDIR)/test-sra: $(T_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(T_LIB)
+
+#-------------------------------------------------------------------------------
+# txt2kdb - test dynamic load of libraries
+#
+TXT2KDB_SRC = \
+	txt2kdb
+
+TXT2KDB_OBJ = \
+	$(addsuffix .$(OBJX),$(TXT2KDB_SRC))
+
+TXT2KDB_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-wvdb \
+
+
+$(BINDIR)/txt2kdb: $(TXT2KDB_OBJ)
+	$(LD) --exe -o $@ $^ $(TXT2KDB_LIB)
+
+#----------------------------------------------------------------
+# md5cp
+#
+MD5CP_SRC = \
+	md5cp
+
+MD5CP_OBJ = \
+	$(addsuffix .$(OBJX),$(MD5CP_SRC))
+
+MD5CP_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-vdb \
+
+
+$(BINDIR)/md5cp: $(MD5CP_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(MD5CP_LIB)
+
+
+#----------------------------------------------------------------
+# rowwritetest
+#
+ROWWRITETEST_SRC = \
+	rowwritetest
+
+ROWWRITETEST_OBJ = \
+	$(addsuffix .$(OBJX),$(ROWWRITETEST_SRC))
+
+ROWWRITETEST_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-wvdb \
+
+
+$(BINDIR)/rowwritetest: $(ROWWRITETEST_OBJ)
+	$(LD) --exe -o $@ $^ $(ROWWRITETEST_LIB)
+
+
+#-------------------------------------------------------------------------------
+# crc32sum 
+#  behaves a lot like md5sum
+#
+CRC32SUM_SRC = \
+	crc32sum
+
+CRC32SUM_OBJ = \
+	$(addsuffix .$(OBJX),$(CRC32SUM_SRC))
+
+CRC32SUM_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+
+
+$(BINDIR)/crc32sum: $(CRC32SUM_OBJ)
+	$(LD) --exe -o $@ $^ $(CRC32SUM_LIB)
+
+
+#-------------------------------------------------------------------------------
+# samview
+#  for testing bam/sam code
+#
+SAMVIEW_SRC = \
+	samview
+
+SAMVIEW_OBJ = \
+	$(addsuffix .$(OBJX),$(SAMVIEW_SRC))
+
+SAMVIEW_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+
+
+$(BINDIR)/samview: $(SAMVIEW_OBJ)
+	$(LD) --exe -o $@ $^ $(SAMVIEW_LIB)
+
+
+#-------------------------------------------------------------------------------
+# pseudo-aligner
+#  for generating test data
+#
+SUDO_ALGN_SRC = \
+	pseudo-aligner
+
+SUDO_ALGN_OBJ = \
+	$(addsuffix .$(OBJX),$(SUDO_ALGN_SRC))
+
+$(BINDIR)/pseudo-aligner: $(SUDO_ALGN_OBJ)
+	$(LP) --exe -o $@ $^
+
+
+#----------------------------------------------------------------
+# sortreadtest
+#
+SORTREADTEST_SRC = \
+	sortreadtest
+
+SORTREADTEST_OBJ = \
+	$(addsuffix .$(OBJX),$(SORTREADTEST_SRC))
+
+SORTREADTEST_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-wvdb \
+
+
+$(BINDIR)/sortreadtest: $(SORTREADTEST_OBJ)
+	$(LD) --exe -o $@ $^ $(SORTREADTEST_LIB)
+
+
+#----------------------------------------------------------------
+# vdb-passwd
+#
+VDB_PASSWD_SRC = \
+	vdb-passwd \
+	syspass
+
+VDB_PASSWD_OBJ = \
+	$(addsuffix .$(OBJX),$(VDB_PASSWD_SRC))
+
+VDB_PASSWD_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-vdb \
+
+
+$(BINDIR)/vdb-passwd: $(VDB_PASSWD_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(VDB_PASSWD_LIB)
+
+
+#----------------------------------------------------------------
+# schema-replace
+#
+SCHEMA_REPLACE_SRC = \
+	schema-replace
+
+SCHEMA_REPLACE_OBJ = \
+	$(addsuffix .$(OBJX),$(SCHEMA_REPLACE_SRC))
+
+SCHEMA_REPLACE_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-wvdb \
+	-lm
+
+$(BINDIR)/schema-replace: $(SCHEMA_REPLACE_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(SCHEMA_REPLACE_LIB)
+
+#-------------------------------------------------------------------------------
+# pacbio-correct-tool
+#
+PACBIO_CORRECT_SRC = \
+	pacbio-correct
+
+PACBIO_CORRECT_OBJ = \
+	$(addsuffix .$(OBJX),$(PACBIO_CORRECT_SRC))
+
+PACBIO_CORRECT_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-wvdb \
+
+
+$(BINDIR)/pacbio-correct: $(PACBIO_CORRECT_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(PACBIO_CORRECT_LIB)
+
+#-------------------------------------------------------------------------------
+# kdb-index
+#
+KDBINDEX_SRC = \
+	kdb-index
+
+KDBINDEX_OBJ = \
+	$(addsuffix .$(OBJX),$(KDBINDEX_SRC))
+
+KDBINDEX_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-vdb \
+
+$(BINDIR)/kdb-index: $(KDBINDEX_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(KDBINDEX_LIB)
diff --git a/tools/util/crc32sum.c b/tools/util/crc32sum.c
new file mode 100644
index 0000000..5d13c9e
--- /dev/null
+++ b/tools/util/crc32sum.c
@@ -0,0 +1,272 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <kapp/args.h>
+#include <klib/checksum.h>
+#include <klib/status.h>
+#include <klib/out.h>
+#include <klib/rc.h>
+#include <kapp/main.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <ctype.h>
+#include <assert.h>
+
+static
+int crc32sum_calc ( FILE *in, uint32_t *crc32 )
+{
+    int status;
+    char *buff = malloc ( 32 * 1024 );
+    if ( buff == NULL )
+        return errno;
+
+    for ( status = 0, * crc32 = 0;; )
+    {
+        size_t num_read = fread ( buff, 1, 32 * 1024, in );
+        if ( num_read == 0 )
+        {
+            if ( ! feof ( in ) )
+                status = ferror ( in );
+            break;
+        }
+
+        * crc32 = CRC32 ( * crc32, buff, num_read );
+    }
+
+    free ( buff );
+
+    return status;
+}
+
+static
+int crc32sum_check ( FILE *in, const char *fname )
+{
+    int cnt, mismatches;
+    char line [ 5 * 1024 ];
+    for ( cnt = mismatches = 0; fgets ( line, sizeof line, in ) != NULL; ++ cnt )
+    {
+        char *p;
+        FILE *src;
+        int status, bin = 0;
+        uint32_t prior, crc32;
+
+        if ( line [ 0 ] == 0 )
+        {
+            -- cnt;
+            continue;
+        }
+
+        p = strrchr ( line, '\n' );
+        if ( p != 0 )
+            * p = 0;
+
+        prior = strtoul ( line, & p, 16 );
+        if ( ( p - line ) != 8 || p [ 0 ] != ' ' )
+        {
+            fprintf ( stderr, "badly formatted file '%s'\n", fname );
+            return EINVAL;
+        }
+
+        if ( p [ 1 ] == '*' )
+            bin = 1;
+        else if ( p [ 1 ] != ' ' )
+        {
+            fprintf ( stderr, "badly formatted file '%s'\n", fname );
+            return EINVAL;
+        }
+ 
+        src = fopen ( p += 2, bin ? "rb" : "r" );
+        if ( src == NULL )
+        {
+            status = errno;
+            fprintf ( stderr, "failed to open file '%s': %s\n", p, strerror ( status ) );
+            return status;
+        }
+
+        status = crc32sum_calc ( src, & crc32 );
+
+        fclose ( src );
+
+        if ( status != 0 )
+            fprintf ( stderr, "error processing file '%s': %s\n", p, strerror ( status ) );
+        else
+        {
+            printf ( "%s: %s\n", p, ( crc32 == prior ) ? "OK" : "FAILED" );
+            if ( crc32 != prior )
+                ++ mismatches;
+        }
+    }
+
+    if ( mismatches != 0 )
+        fprintf ( stderr, "WARNING: %d of %d computed checksums did NOT match\n", mismatches, cnt );
+
+    if ( ! feof ( in ) )
+        return ferror ( in );
+    return 0;
+}
+
+static
+int crc32sum_gen ( FILE *in, const char *fname, int bin )
+{
+    uint32_t crc32;
+    int status = crc32sum_calc ( in, & crc32 );
+    if ( status != 0 )
+        fprintf ( stderr, "error processing file '%s': %s\n", fname, strerror ( status ) );
+    else
+        printf ( "%08x %c%s\n", crc32, bin ? '*' : ' ', fname );
+    return status;
+}
+
+
+#define OPTION_BINARY "binary"
+#define OPTION_CHECK  "check"
+#define ALIAS_BINARY  "b"
+#define ALIAS_CHECK   "c"
+
+static const char * binary_usage[] = { "open file in binary mode", NULL };
+static const char * check_usage[]  = { "check CRC32 against given list", NULL };
+
+OptDef Options[] =
+{
+    { OPTION_BINARY, ALIAS_BINARY, NULL, binary_usage, 0, false, false },
+    { OPTION_CHECK,  ALIAS_CHECK,  NULL, check_usage,  0, false, false }
+};
+
+
+
+const char UsageDefaultName[] = "crc32sum";
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg("\n"
+                   "Usage:\n"
+                   "  %s [Options] File [File ...]\n"
+                   "\n"
+                   "Summary:\n"
+                   "  Generate or test crc32 file checks\n"
+                   "\n", progname);
+}
+
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+
+    UsageSummary (progname);
+
+    KOutMsg ("Options\n");
+
+    HelpOptionLine (ALIAS_BINARY, OPTION_BINARY, NULL, binary_usage);
+
+    HelpOptionLine (ALIAS_CHECK, OPTION_CHECK, NULL, check_usage);
+
+    HelpOptionsStandard ();
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+rc_t CC KMain (int argc, char * argv [])
+{
+    Args *args;
+    rc_t rc;
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 1,
+                            Options, sizeof (Options) / sizeof (OptDef));
+    if (rc == 0)
+    {
+        do
+        {
+            uint32_t pcount;
+            int check;
+            int bin;
+
+            rc = ArgsOptionCount (args, OPTION_BINARY, &pcount);
+            if (rc) break;
+
+            bin = (pcount != 0);
+
+            rc = ArgsOptionCount (args, OPTION_CHECK, &pcount);
+            if (rc) break;
+
+            check = (pcount != 0);
+
+            rc = ArgsParamCount (args, &pcount);
+            if (rc) break;
+
+            if (pcount == 0)
+            {
+                MiniUsage(args);
+            }
+            else
+            {
+                uint32_t i;
+
+                CRC32Init ();
+           
+                for ( i = 0; i < pcount; ++ i )
+                {
+
+                    int status;
+                    const char *fname;
+                    FILE *in;
+
+                    rc = ArgsParamValue (args, i, (const void **)&fname);
+
+                    in = fopen ( fname, bin ? "rb" : "r" );
+
+                    if ( in == NULL )
+                    {
+                        fprintf ( stderr, "failed to open file '%s'\n", fname );
+                        return -1;
+                    }
+
+                    status = check ?
+                        crc32sum_check ( in, fname ):
+                        crc32sum_gen ( in, fname, bin );
+
+                    fclose ( in );
+
+                    if ( status != 0 )
+                        return status;
+                }
+            }
+        } while (0);
+    }
+
+    return 0;
+}
diff --git a/tools/util/kdb-index.c b/tools/util/kdb-index.c
new file mode 100644
index 0000000..30996db
--- /dev/null
+++ b/tools/util/kdb-index.c
@@ -0,0 +1,257 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <kapp/main.h>
+#include <kdb/manager.h>
+#include <kdb/database.h>
+#include <kdb/table.h>
+#include <kdb/index.h>
+#include <klib/text.h>
+#include <klib/out.h>
+#include <klib/rc.h>
+
+#include <string.h>
+#include <stdio.h>
+
+static bool keys_only;
+static const char * app_name;
+
+static
+rc_t run_idx ( const KIndex * idx, const char * spec )
+{
+    rc_t rc = 0;
+    uint64_t span;
+    int64_t id, start_id;
+
+    for ( id = 1; ; id = start_id + span )
+    {
+        size_t ksize;
+        char key [ 256 ];
+
+        rc = KIndexProjectText ( idx, id, & start_id, & span, key, sizeof key, & ksize );
+        if ( rc != 0 )
+        {
+            if ( GetRCState ( rc ) == rcNotFound && GetRCObject ( rc ) == rcId )
+                rc = 0;
+            break;
+        }
+
+        if ( keys_only )
+            KOutMsg ( "%s\n", key );
+        else
+            KOutMsg ( "'%s': start = %'ld, span = %'lu\n", key, start_id, span );
+
+#if 0
+        /* just for the fun of it, now try to look up the key */
+        {
+            int64_t start2;
+            uint64_t count2;
+            rc_t rc2 = KIndexFindText ( idx, key, & start2, & count2, NULL, NULL );
+            if ( rc2 != 0 )
+                fprintf ( stderr, "failed to find key '%s' in index\n", key );
+            else
+                KOutMsg ( "  key lookup returned start = %'ld, span = %'lu\n", start2, count2 );
+        }
+#endif
+    }
+
+    return rc;
+}
+
+static
+rc_t run_tbl ( const KTable * tbl, const char * spec, const char * idx_spec )
+{
+    const KIndex * idx;
+    rc_t rc = KTableOpenIndexRead ( tbl, & idx, "%s", idx_spec );
+    if ( rc == 0 )
+    {
+        rc = run_idx ( idx, spec );
+        KIndexRelease ( idx );
+    }
+
+    return rc;
+}
+
+static
+rc_t run_db ( const KDatabase * db, const char * spec, const char * tbl_idx )
+{
+    rc_t rc = 0;
+    const KTable * tbl;
+
+    size_t tlen = string_size ( tbl_idx );
+    const char * idx = string_chr ( tbl_idx, tlen, ':' );
+    if ( idx != NULL )
+    {
+        tlen = idx - tbl_idx;
+        ++ idx;
+    }
+
+    rc = KDatabaseOpenTableRead ( db, & tbl, "%.*s", ( uint32_t ) tlen, tbl_idx );
+    if ( rc == 0 )
+    {
+        rc = run_tbl ( tbl, spec, idx ? idx : "ref_spec" );
+        KTableRelease ( tbl );
+    }
+
+    return rc;
+}
+
+static
+rc_t run ( const KDBManager * mgr, const char * spec )
+{
+    rc_t rc = 0;
+
+    const KTable * tbl;
+    const KDatabase * db;
+
+    size_t slen = string_size ( spec );
+    const char * tbl_idx = string_chr ( spec, slen, ':' );
+    if ( tbl_idx != NULL )
+    {
+        slen = tbl_idx - spec;
+        ++ tbl_idx;
+    }
+
+    switch ( KDBManagerPathType ( mgr, "%.*s", ( uint32_t ) slen, spec ) )
+    {
+    case kptDatabase:
+        rc = KDBManagerOpenDBRead ( mgr, & db, "%.*s", ( uint32_t ) slen, spec );
+        if ( rc == 0 )
+        {
+            rc = run_db ( db, spec, tbl_idx ? tbl_idx : "STATS:ref_spec" );
+            KDatabaseRelease ( db );
+        }
+        break;
+    case kptTable:
+        rc = KDBManagerOpenTableRead ( mgr, & tbl, "%.*s", ( uint32_t ) slen, spec );
+        if ( rc == 0 )
+        {
+            rc = run_tbl ( tbl, spec, tbl_idx ? tbl_idx : "ref_spec" );
+            KTableRelease ( tbl );
+        }
+        break;
+    default:
+        rc = RC ( rcApp, rcMgr, rcAccessing, rcPath, rcIncorrect );
+    }
+    return rc;
+}
+
+static
+void print_help ( void )
+{
+    size_t nlen = string_size ( app_name );
+    const char * short_name = string_rchr ( app_name, nlen, '/' );
+    if ( short_name ++ == NULL )
+        short_name = app_name;
+
+    KOutMsg ( "\n"
+              "Usage:\n"
+              "  %s [ options ] obj-spec [ obj-spec.. ]\n"
+              "\n"
+              "Object Specification:\n"
+              "  <db-path-or-accession> [ ':' <table-name> [ ':' <index-name> ] ]\n"
+              "  <tbl-path-or-accession> [ ':' <index-name> ]\n"
+              "\n"
+              "Options:\n"
+              "  -k|--keys-only                   only list keys\n"
+              "  -h|--help                        print this message\n"
+              "\n"
+              "%s : %V\n"
+              "\n"
+              , short_name
+              , app_name
+              , KAppVersion ()
+        );
+}
+
+rc_t CC Usage ( struct Args const * args )
+{
+    return 0;
+}
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    rc_t rc = 0;
+    int i, count = 0;
+    const KDBManager * mgr;
+
+    app_name = argv [ 0 ];
+
+    for ( i = 1; i < argc; ++ i )
+    {
+        const char * arg = argv [ i ];
+        if ( arg [ 0 ] != '-' )
+            argv [ ++ count ] = ( char * ) arg;
+        else do switch ( ( ++ arg ) [ 0 ] )
+        {
+        case 'k':
+            keys_only = true;
+            break;
+        case 'h':
+        case '?':
+            print_help ();
+            return 0;
+        case '-':
+            ++ arg;
+            if ( strcmp ( arg, "keys-only" ) == 0 )
+                keys_only = true;
+            else if ( strcmp ( arg, "help" ) == 0 )
+            {
+                print_help ();
+                return 0;
+            }
+            else
+            {
+                fprintf ( stderr, "%s: unrecognized switch: '--%s'\n", argv [ 0 ], arg );
+                return -1;
+            }
+            arg = "\0";
+            break;
+        default:
+            fprintf ( stderr, "%s: unrecognized switch: '-%c'\n", argv [ 0 ], arg [ 0 ] );
+            return -1;
+        }
+        while ( arg [ 1 ] != 0 );
+    }
+
+    if ( count == 0 )
+    {
+        fprintf ( stderr, "%s: at least one object spec is required\n", argv [ 0 ] );
+        return -1;
+    }
+
+    rc = KDBManagerMakeRead ( & mgr, NULL );
+    if ( rc == 0 )
+    {
+
+        for ( i = 1; rc == 0 && i <= count; ++ i )
+            rc = run ( mgr, argv [ i ] );
+
+        KDBManagerRelease ( mgr );
+    }
+
+    return rc;
+}
diff --git a/tools/util/kdbmeta.c b/tools/util/kdbmeta.c
new file mode 100644
index 0000000..f7b572f
--- /dev/null
+++ b/tools/util/kdbmeta.c
@@ -0,0 +1,1332 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+/*
+ * This program has a command line sytax that isn't suited to the 
+ * normally expected way of handling command line arguments.
+ *
+ * We'll use the normal Args processing for the standard options
+ * but a simple stepping throught the argv stored arguments
+ * for the "big loop"
+ */
+
+
+/* The original intention of this tool was to support updating nodes.
+   This was later removed with the thought that this functionality would
+   be better implemented by another tool.
+
+   Going to temporarily add it in...
+*/
+#define ALLOW_UPDATE 1
+
+#include <sra/srapath.h>
+#include <kdb/manager.h>
+#include <kdb/database.h>
+#include <kdb/table.h>
+#include <kdb/column.h>
+#include <kdb/meta.h>
+#include <kdb/namelist.h>
+#include <kdb/kdb-priv.h>
+#include <vfs/manager.h>
+#include <vfs/resolver.h>
+#include <vfs/path.h>
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <klib/vector.h>
+#include <klib/namelist.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/writer.h>
+#include <klib/rc.h>
+#include <sysalloc.h>
+#include <os-native.h>
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <ctype.h>
+
+/* use cpp define CONST */
+#undef CONST
+#if ALLOW_UPDATE
+#define CONST
+#else
+#define CONST const
+#endif
+
+typedef struct KDBMetaParms KDBMetaParms;
+struct KDBMetaParms
+{
+    CONST KDBManager *mgr;
+    CONST KMetadata *md;
+    const char *targ;
+    const Vector *q;
+    rc_t rc;
+};
+
+/* select reporting
+ */
+static bool xml_ish = true;
+static int indent_lvl;
+static int tabsz = 2;
+static const char *spaces = "                                ";
+static bool as_unsigned = false;
+static bool as_valid_xml = true;
+static const char *table_arg = NULL;
+static bool read_only_arg = true;
+
+static
+void indent ( void )
+{
+    if ( indent_lvl > 0 )
+    {
+        int total, num_spaces = indent_lvl * tabsz;
+        for ( total = 0; total < num_spaces; total += 32 )
+        {
+            int to_write = num_spaces - total;
+            if ( to_write > 32 )
+                to_write = 32;
+            OUTMSG (( & spaces [ 32 - to_write ] ));
+        }
+    }
+}
+
+static
+void node_open ( const char *path, size_t plen )
+{
+    if ( plen && path[plen - 1] == '/' ) {
+    /* do not use trailing slash */
+        --plen;
+    }
+    if ( xml_ish )
+    {
+        int size = plen;
+        /* find leaf name of node */
+        const char *slash = string_rchr ( path, plen, '/' );
+        if ( slash ) {
+            /* make sure not to print trailing slash */
+            size = plen - (slash - path) - 1;
+            if ( size < 0 ) {
+                size = 0;
+            }
+        }
+
+        indent ();
+        OUTMSG (( "<%.*s", size, ( slash != NULL ) ? slash + 1 : path ));
+    }
+}
+
+static
+void node_close ( const char *path, size_t plen,
+    size_t vsize, uint32_t num_children, bool close_indent )
+{
+    if ( plen && path[plen - 1] == '/' ) {
+        --plen;
+    }
+    if ( xml_ish )
+    {
+        if ( vsize == 0 && num_children == 0 )
+            OUTMSG (( "/>\n" ));
+        else
+        {
+            int size = plen;
+            const char *slash = string_rchr ( path, plen, '/' );
+            if ( slash ) {
+                size = plen - (slash - path) - 1;
+                if ( size < 0 ) {
+                    size = 0;
+                }
+            }
+            if ( close_indent )
+                indent ();
+            OUTMSG (( "</%.*s>\n", size, ( slash != NULL ) ? slash + 1 : path ));
+        }
+    }
+}
+
+static
+void attr_select ( const char *name, const char *value )
+{
+    if ( xml_ish )
+        OUTMSG (( " %s=\"%s\"", name, value ));
+}
+
+static void value_print(char value) {
+    const char *replacement = NULL;
+
+    switch (value) {
+        case '\"':
+            replacement = """;
+            break;   
+        case '&':
+            replacement = "&";
+            break;   
+        case '<':
+            replacement = "<";
+            break;   
+        case '>':
+            replacement = ">";
+            break;
+        default:
+            break;
+    }
+
+    if (replacement != NULL && as_valid_xml) {
+        OUTMSG(("%s", replacement));
+    }
+    else {
+        OUTMSG(("%c", value));
+    }
+}
+
+static
+void value_select ( const char *value, size_t vlen, uint32_t num_children, bool *close_indent )
+{
+    if ( xml_ish )
+    {
+        size_t i;
+        bool binary = false;
+
+        /* discover if text or apparently binary */
+        for ( i = 0; i < vlen && ! binary; ++ i )
+        {
+            if ( ! isprint ( value [ i ] ) )
+            {
+                switch ( value [ i ] )
+                {
+                case '\t':
+                case '\r':
+                case '\n':
+                    break;
+                default:
+                    binary = true;
+                }
+            }
+        }
+
+        /* if there are children, create special tag */
+        if ( num_children != 0 || ( binary && vlen > 16 ) || ( vlen > 64 ) )
+        {
+            OUTMSG (( ">\n" ));
+            ++ indent_lvl;
+            indent ();
+            if ( num_children != 0 )
+                OUTMSG (( "<%%>" ));
+        }
+        else
+        {
+            OUTMSG (( ">" ));
+        }
+
+        /* if binary, print as hex */
+        if ( binary )
+        {
+            bool as_hex = !as_unsigned;
+            if( as_unsigned ) {
+                switch(vlen) {
+                    case 1:
+                        OUTMSG (( "%hu", ( ( const uint8_t* ) value ) [ 0 ] ));
+                        break;
+                    case 2:
+                        OUTMSG (( "%u", ( ( const uint16_t* ) value ) [ 0 ] ));
+                        break;
+                    case 4:
+                        OUTMSG (( "%u", ( ( const uint32_t* ) value ) [ 0 ] ));
+                        break;
+                    case 8:
+                        OUTMSG (( "%lu", ( ( const uint64_t* ) value ) [ 0 ] ));
+                        break;
+                    default:
+                        as_hex = true;
+                        break;
+                }
+            }
+            if( as_hex ) {
+                for ( i = 0; i < vlen; ++ i )
+                {
+                    if ( i != 0 && ( i & 15 ) == 0 )
+                    {
+                        OUTMSG (( "\n" ));
+                        indent ();
+                    }
+                    OUTMSG (( "\\x%02X", ( ( const uint8_t* ) value ) [ i ] ));
+                }
+            }
+        }
+
+        /* text */
+        else
+        {
+            /* int tab_stop; */
+
+            OUTMSG (( "'" ));
+            for ( /* tab_stop = 0, */ i = 0; i < vlen; ++ i )
+            {
+                switch ( value [ i ] )
+                {
+                case '\t': /* OUTMSG (( "%.*s", 4 - ( tab_stop & 3 ), "    " )); */
+                    /* tab_stop = ( tab_stop + 4 ) & -4; */
+                    OUTMSG (( "\t" ));
+                    break;
+                case '\r': OUTMSG (( "\\r" ));
+                    break;
+                case '\n': OUTMSG (( "\n" ));
+                    indent ();
+                    if ( i + 1 < vlen )
+                        OUTMSG (( " " ));
+                    /* tab_stop = 0; */
+                    break;
+                default:
+                    value_print(value[i]);
+                }
+            }
+            OUTMSG (( "'" ));
+        }
+
+        /* if there are children, close special tag */
+        if ( num_children != 0 )
+        {
+            OUTMSG (( "</%%>\n" ));
+            -- indent_lvl;
+            * close_indent = true;
+        }
+        else if ( ( binary && vlen > 16 ) || ( vlen > 64 ) )
+        {
+            OUTMSG (( "\n" ));
+            -- indent_lvl;
+            * close_indent = true;
+        }
+    }
+}
+
+static
+void children_begin ( size_t vsize, uint32_t num_children )
+{
+    ++ indent_lvl;
+
+    if ( vsize == 0 && num_children != 0 )
+        OUTMSG (( ">\n" ));
+}
+
+static
+void children_end ( void )
+{
+    if ( indent_lvl > 0 )
+        -- indent_lvl;
+}
+
+
+/* select
+ */
+static
+rc_t md_select_expr ( const KMDataNode *node, char *path, size_t psize, int plen, const char *attr, bool wildcard )
+{
+    rc_t rc;
+    const char *name;
+    uint32_t i, num_children;
+    KNamelist *children;
+    bool close_indent = false;
+
+    size_t vsize = 0;
+    char value [ 1024 ];
+
+    /* list node children */
+    rc = KMDataNodeListChild ( node, & children );
+    if ( rc == 0 )
+        rc = KNamelistCount ( children, & num_children );
+    if ( rc != 0 )
+    {
+        PLOGERR ( klogErr,  (klogErr, rc, "failed to list child nodes of '$(path)'", "path=%s", path ));
+        return rc;
+    }
+
+    /* report on single node */
+    if ( ! wildcard )
+    {
+        if ( attr != NULL )
+        {
+            /* report only attribute */
+            rc = KMDataNodeReadAttr ( node, attr, value, sizeof value, & vsize );
+            if ( rc != 0 )
+            {
+                KNamelistRelease ( children );
+                if ( GetRCState ( rc ) == rcNotFound )
+                    return 0;
+
+                PLOGERR ( klogErr,  (klogErr, rc, "failed to read attribute '$(path)@$(attr)'", "path=%s,attr=%s", path, attr ));
+                return rc;
+            }
+
+            /* open node report */
+            node_open ( path, plen );
+
+            /* report attribute */
+            attr_select ( attr, value );
+
+            /* close it off */
+            node_close ( path, plen, 0, 0, false );
+
+            /* Exit here if an attribute was requested in query */
+            return 0;
+        }
+        else
+        {
+            uint32_t count;
+            size_t remaining;
+            char *vp = value;
+            KNamelist *attrs;
+
+            /* report entire node */
+            rc = KMDataNodeListAttr ( node, & attrs );
+            if ( rc == 0 )
+                rc = KNamelistCount ( attrs, & count );
+            if ( rc != 0 )
+            {
+                KNamelistRelease ( children );
+                PLOGERR ( klogErr,  (klogErr, rc, "failed to list attributes of '$(path)'", "path=%s", path ));
+                return rc;
+            }
+
+            /* open node report */
+            node_open ( path, plen );
+
+            /* report each attribute */
+            for ( i = 0; i < count; ++ i )
+            {
+                rc = KNamelistGet ( attrs, i, & name );
+                if ( rc != 0 )
+                    PLOGERR ( klogWarn,  (klogWarn, rc, "failed to read attribute name $(idx) of '$(path)'", "idx=%u,path=%s", i, path ));
+                else
+                {
+                    rc = KMDataNodeReadAttr ( node, name, value, sizeof value, & vsize );
+                    if ( rc != 0 )
+                    {
+                        KNamelistRelease ( children );
+                        KNamelistRelease ( attrs );
+                        PLOGERR ( klogErr,  (klogErr, rc, "failed to read attribute '$(path)@$(attr)'", "path=%s,attr=%s", path, name ));
+                        return rc;
+                    }
+
+                    /* report attribute */
+                    attr_select ( name, value );
+                }
+            }
+
+            /* done with header */
+            KNamelistRelease ( attrs );
+
+            /* read node value */
+            rc = KMDataNodeRead ( node, 0, value, sizeof value, & vsize, & remaining );
+            if ( rc != 0 )
+            {
+                KNamelistRelease ( children );
+                PLOGERR ( klogErr,  (klogErr, rc, "failed to read value of '$(path)'", "path=%s", path ));
+                return rc;
+            }
+
+            /* allocate a larger buffer if not complete */
+            if ( remaining != 0 )
+            {
+                size_t remaining_vsize;
+
+                vp = malloc ( vsize + remaining );
+                if ( vp == NULL )
+                {
+                    KNamelistRelease ( children );
+                    rc = RC ( rcExe, rcMetadata, rcAllocating, rcMemory, rcExhausted );
+                    PLOGERR ( klogInt,  (klogInt, rc, "failed to read value of '$(path)'", "path=%s", path ));
+                    return rc;
+                }
+                memcpy ( vp, value, vsize );
+                rc = KMDataNodeRead ( node, vsize, & vp [ vsize ], remaining, & remaining_vsize, & remaining );
+                if ( rc == 0 && remaining != 0 )
+                    rc = RC ( rcExe, rcMetadata, rcReading, rcTransfer, rcIncomplete );
+                if ( rc != 0 )
+                {
+                    free ( vp );
+                    KNamelistRelease ( children );
+                    PLOGERR ( klogErr,  (klogErr, rc, "failed to read value of '$(path)'", "path=%s", path ));
+                    return rc;
+                }
+
+                vsize += remaining_vsize;
+            }
+
+            /* report node value */
+            if ( vsize != 0 )
+                value_select ( vp, vsize, num_children, & close_indent );
+
+            /* whack allocation */
+            if ( vp != value )
+                free ( vp );
+        }
+    }
+
+    if ( ! wildcard )
+        children_begin ( vsize, num_children );
+
+    /* if there are children, list them now */
+    for ( i = 0; i < num_children; ++ i )
+    {
+        rc = KNamelistGet ( children, i, & name );
+        if ( rc != 0 )
+            PLOGERR ( klogWarn,  (klogWarn, rc, "failed to read child name $(idx) of '$(path)'", "idx=%u,path=%.*s", i, plen, path ));
+        else
+        {
+            size_t childlen;
+            rc = string_printf ( & path [ plen ], psize - plen, & childlen, "/%s", name );
+            if ( rc != 0 )
+                PLOGERR ( klogWarn,  (klogWarn, rc, "failed to select child $(name) of '$(path)'", "name=%s,path=%.*s", name, plen, path ));
+            else
+            {
+                const KMDataNode *child;
+                rc = KMDataNodeOpenNodeRead ( node, & child, "%s", name );
+                if ( rc != 0 )
+                {
+                    KNamelistRelease ( children );
+                    PLOGERR ( klogErr,  (klogErr, rc, "failed to open child '$(path)'", "path=%s", path ));
+                    return rc;
+                }
+
+                /* recurse on child */
+                rc = md_select_expr ( child, path, psize, plen + childlen, attr, false );
+                close_indent = true;
+
+                KMDataNodeRelease ( child );
+
+                if ( rc != 0 )
+                {
+                    KNamelistRelease ( children );
+                    return rc;
+                }
+            }
+        }
+    }
+
+    if ( ! wildcard )
+        children_end ();
+
+    KNamelistRelease ( children );
+
+    path [ plen ] = 0;
+
+    if ( ! wildcard )
+        node_close ( path, plen, vsize, num_children, close_indent );
+
+    return 0;
+}
+
+#if ALLOW_UPDATE
+static
+rc_t md_update_expr ( KMDataNode *node, const char *path, const char *attr, const char *expr )
+{
+    rc_t rc;
+
+    /* according to documentation, "expr" is allowed to be text
+       or text with escaped hex sequences. examine for escaped hex */
+    size_t len = string_size ( expr );
+    char *buff = malloc ( len + 1 );
+    if ( buff == NULL )
+        rc = RC ( rcExe, rcMetadata, rcUpdating, rcMemory, rcExhausted );
+    else
+    {
+        size_t i, j;
+        for ( i = j = 0; i < len; ++ i, ++ j )
+        {
+            if ( ( buff [ j ] = expr [ i ] ) == '\\' )
+            {
+                /* we know "expr" is NUL-terminated, so this is safe */
+                if ( tolower ( expr [ i + 1 ] ) == 'x' &&
+                     isxdigit ( expr [ i + 2 ] ) &&
+                     isxdigit ( expr [ i + 3 ] ) )
+                {
+                    int msn = toupper ( expr [ i + 2 ] ) - '0';
+                    int lsn = toupper ( expr [ i + 3 ] ) - '0';
+                    if ( msn >= 10 )
+                        msn += '0' - 'A' + 10;
+                    if ( lsn >= 10 )
+                        lsn += '0' - 'A' + 10;
+                    buff [ j ] = ( char ) ( ( msn << 4 ) | lsn );
+                    i += 3;
+                }
+            }
+        }
+
+        if ( attr != NULL )
+        {
+            /* set attribute value */
+            buff [ j ] = 0;
+            rc = KMDataNodeWriteAttr ( node, attr, buff );
+        }
+        else
+        {
+            /* now set the value of the node */
+            rc = KMDataNodeWrite ( node, buff, j );
+        }
+        free ( buff );
+    }
+
+    return rc;
+}
+#endif
+
+static
+bool CC md_select ( void *item, void *data )
+{
+    bool fail = true;
+    KDBMetaParms *pb = data;
+
+    CONST KMDataNode *node;
+#if ALLOW_UPDATE
+    bool read_only = true;
+    if ( ! read_only_arg ) {
+        pb -> rc = KMetadataOpenNodeUpdate ( pb -> md, & node, NULL );
+        if ( pb -> rc == 0 )
+            read_only = false;
+    }
+#endif
+    if ( read_only )
+        pb -> rc = KMetadataOpenNodeRead ( pb -> md, ( const KMDataNode** ) & node, NULL );
+    if ( pb -> rc != 0 )
+        PLOGERR ( klogErr,  (klogErr, pb -> rc, "failed to open root node for '$(path)'", "path=%s", pb -> targ ));
+    else
+    {
+        bool wildcard;
+        char *expr, *attr, path [ 4096 ];
+        size_t len = string_copy_measure ( path, sizeof path, item );
+
+        /* detect assignment */
+        expr = string_rchr ( path, len, '=' );
+        if ( expr != NULL )
+        {
+            len = expr - path;
+            * expr ++ = 0;
+        }
+        attr = string_rchr ( path, len, '@' );
+        if ( attr != NULL )
+        {
+            len = attr - path;
+            * attr ++ = 0;
+        }
+
+        if ( expr != NULL )
+        {
+#if ALLOW_UPDATE
+            if ( read_only )
+            {
+                PLOGMSG ( klogWarn, ( klogWarn, "node update expressions are not supported - "
+                                      "'$(path)' is read-only - "
+                                      "'$(expr)' treated as select."
+                                      , "path=%s,expr=%s", pb -> targ, item ) );
+                expr = NULL;
+            }
+#else
+            PLOGMSG ( klogWarn, ( klogWarn, "node update expressions are not supported - "
+                                  "'$(expr)' treated as select.", "expr=%s", item ) );
+            expr = NULL;
+#endif
+        }
+
+        wildcard = false;
+        if ( len >= 1 && path [ len - 1 ] == '*' )
+        {
+            if ( len == 1 )
+            {
+                path [ len = 0 ] = 0;
+                wildcard = true;
+            }
+            else if ( len >= 2 && path [ len - 2 ] == '/' )
+            {
+                path [ len -= 2 ] = 0;
+                wildcard = true;
+            }
+        }
+
+#if ALLOW_UPDATE
+        if ( expr != NULL )
+        {
+            KMDataNode *root = node;
+
+            if ( wildcard || len == 0 )
+            {
+                pb -> rc = RC ( rcExe, rcMetadata, rcUpdating, rcExpression, rcIncorrect );
+                PLOGERR ( klogErr, ( klogErr, pb -> rc, "node updates require explicit paths - "
+                                     "'$(expr)' cannot be evaluated", "expr=%s", item ) );
+                return true;
+            }
+
+            pb -> rc = KMDataNodeOpenNodeUpdate ( root, & node, "%s", path );
+            KMDataNodeRelease ( root );
+
+            if ( pb -> rc != 0 )
+            {
+                PLOGERR ( klogErr,  (klogErr, pb -> rc,
+                    "failed to open node '$(node)' for '$(path)'",
+                                     "node=%s,path=%s", path, pb -> targ ));
+            }
+            else
+            {
+                pb -> rc = md_update_expr ( node, path, attr, expr );
+            }
+        }
+        else
+#endif
+
+        if ( len == 0 )
+            pb -> rc = md_select_expr ( node, path, sizeof path, len, attr, wildcard );
+        else
+        {
+            const KMDataNode *root = node;
+            pb -> rc = KMDataNodeOpenNodeRead ( root, ( const KMDataNode** ) & node, "%s", path );
+            KMDataNodeRelease ( root );
+
+            if ( pb -> rc != 0 )
+            {
+                PLOGERR ( klogErr,  (klogErr, pb -> rc,
+                    "failed to open node '$(node)' for '$(path)'",
+                                     "node=%s,path=%s", path, pb -> targ ));
+            }
+            else
+            {
+                pb -> rc = md_select_expr ( node, path, sizeof path, len, attr, wildcard );
+            }
+        }
+
+        if ( pb -> rc == 0 )
+            fail = false;
+
+        KMDataNodeRelease ( node );
+    }
+
+    return fail;
+}
+
+static
+rc_t col_select ( KDBMetaParms * pb)
+{
+    CONST KColumn *col;
+    rc_t rc;
+
+    bool read_only = true;
+
+#if ALLOW_UPDATE
+    if ( ! read_only_arg ) {
+        read_only = false;
+
+        rc = KDBManagerOpenColumnUpdate ( pb -> mgr, & col, "%s", pb->targ );
+        if ( rc != 0 )
+            read_only = true;
+    }
+#endif
+    if ( read_only )
+        rc = KDBManagerOpenColumnRead ( pb -> mgr, ( const KColumn** ) & col, "%s", pb->targ );
+    if ( rc != 0 )
+        PLOGERR ( klogErr,  (klogErr, rc, "failed to open column '$(col)'", "col=%s", pb->targ ));
+    else
+    {
+#if ALLOW_UPDATE
+        if ( ! read_only_arg ) {
+            read_only = false;
+            rc = KColumnOpenMetadataUpdate ( col, & pb -> md );
+            if ( rc != 0 )
+                read_only = true;
+        }
+#endif
+        if ( read_only )
+            rc = KColumnOpenMetadataRead ( col, ( const KMetadata** ) & pb -> md );
+        if ( rc != 0 )
+            PLOGERR ( klogErr,  (klogErr, rc, "failed to open metadata for column '$(col)'", "col=%s", pb->targ ));
+        else
+        {
+            bool fail;
+
+            fail = VectorDoUntil ( pb -> q, false, md_select, pb );
+
+            if (fail)
+                rc = pb->rc;
+
+            KMetadataRelease ( pb -> md ), pb -> md = NULL;
+        }
+
+        KColumnRelease ( col );
+    }
+    return rc;
+}
+
+static
+rc_t tbl_select ( KDBMetaParms * pb)
+{
+    CONST KTable *tbl;
+    rc_t rc;
+
+    bool read_only = true;
+
+#if ALLOW_UPDATE
+    if ( ! read_only_arg ) {
+        read_only = false;
+
+        rc = KDBManagerOpenTableUpdate ( pb -> mgr, & tbl, "%s", pb->targ );
+        if ( rc != 0 )
+            read_only = true;
+    }
+#endif
+    if ( read_only )
+        rc = KDBManagerOpenTableRead ( pb -> mgr, ( const KTable** ) & tbl, "%s", pb->targ );
+    if ( rc != 0 )
+        PLOGERR ( klogErr,  (klogErr, rc, "failed to open table '$(tbl)'", "tbl=%s", pb->targ ));
+    else
+    {
+        read_only = true;
+#if ALLOW_UPDATE
+        if ( ! read_only_arg ) {
+            read_only = false;
+            rc = KTableOpenMetadataUpdate ( tbl, & pb -> md );
+            if ( rc != 0 )
+                read_only = true;
+        }
+#endif
+        if ( read_only )
+            rc = KTableOpenMetadataRead ( tbl, ( const KMetadata** ) & pb -> md );
+        if ( rc != 0 )
+            PLOGERR ( klogErr,  (klogErr, rc, "failed to open metadata for table '$(tbl)'", "tbl=%s", pb->targ ));
+        else
+        {
+            bool fail;
+
+            fail = VectorDoUntil ( pb -> q, false, md_select, pb );
+            if (fail)
+                rc = pb->rc;
+
+            KMetadataRelease ( pb -> md ), pb -> md = NULL;
+        }
+
+        KTableRelease ( tbl );
+    }
+
+    return rc;
+}
+
+static
+rc_t db_select (KDBMetaParms * pb)
+{
+    CONST KDatabase *db;
+    rc_t rc;
+
+    bool read_only = true;
+
+#if ALLOW_UPDATE
+    if ( ! read_only_arg ) {
+        read_only = false;
+
+        rc = KDBManagerOpenDBUpdate ( pb -> mgr, & db, "%s", pb->targ );
+        if ( rc != 0 )
+            read_only = true;
+    }
+#endif
+    if ( read_only )
+        rc = KDBManagerOpenDBRead ( pb -> mgr, ( const KDatabase** ) & db, "%s", pb->targ );
+    if ( rc != 0 ) {
+        PLOGERR ( klogErr,  (klogErr, rc, "failed to open db '$(db)'",
+            "db=%s", pb->targ ));
+    }
+    else {
+        CONST KTable* tbl = NULL;
+        if (table_arg) {
+            read_only = true;
+#if ALLOW_UPDATE
+            if ( ! read_only_arg ) {
+                read_only = false;
+                rc = KDatabaseOpenTableUpdate ( db, &tbl, "%s", table_arg );
+                if ( rc != 0 )
+                    read_only = true;
+            }
+#endif
+            if ( read_only )
+                rc = KDatabaseOpenTableRead ( db, ( const KTable** ) &tbl, "%s", table_arg );
+            if ( rc != 0 ) {
+                PLOGERR ( klogErr,  (klogErr, rc,
+                    "failed to open table '$(table)'", "table=%s", table_arg ));
+            }
+        }
+        if ( rc == 0) {
+            if (tbl) {
+                read_only = true;
+#if ALLOW_UPDATE
+                if ( ! read_only_arg ) {
+                    read_only = false;
+                    rc = KTableOpenMetadataUpdate ( tbl, & pb -> md );
+                    if ( rc != 0 )
+                        read_only = true;
+                }
+#endif
+                if ( read_only )
+                    rc = KTableOpenMetadataRead ( tbl, ( const KMetadata** ) & pb -> md );
+                if ( rc != 0 ) {
+                    PLOGERR ( klogErr,  (klogErr, rc,
+                        "failed to open metadata for table '$(table)'",
+                        "table=%s", table_arg ));
+                }
+            }
+            else {
+                read_only = true;
+#if ALLOW_UPDATE
+                if ( ! read_only_arg ) {
+                    read_only = false;
+                    rc = KDatabaseOpenMetadataUpdate ( db, & pb -> md );
+                    if ( rc != 0 )
+                        read_only = true;
+                }
+#endif
+                if ( read_only )
+                    rc = KDatabaseOpenMetadataRead ( db, ( const KMetadata** ) & pb -> md );
+                if ( rc != 0 ) {
+                    PLOGERR ( klogErr,  (klogErr, rc,
+                        "failed to open metadata for db '$(db)'",
+                        "db=%s", pb->targ ));
+                }
+            }
+            if ( rc == 0 ) {
+                bool fail;
+
+                fail = VectorDoUntil ( pb -> q, false, md_select, pb );
+                if(fail)
+                    rc = pb->rc;
+                KMetadataRelease ( pb -> md ), pb -> md = NULL;
+            }
+        }
+        KTableRelease ( tbl );
+        KDatabaseRelease ( db );
+    }
+
+    return rc;
+}
+
+static
+rc_t tool_select ( CONST KDBManager * mgr, uint32_t type, const char * targ, const Vector * q)
+{
+    KDBMetaParms pb;
+    rc_t rc;
+
+    pb.mgr = mgr;
+    pb.md = NULL;
+    pb.targ = targ;
+    pb.q = q;
+    pb.rc = 0;
+
+    switch (type)
+    {
+    default:
+        rc = RC (rcExe, rcNoTarg, rcAccessing, rcParam, rcInvalid);
+        break;
+
+    case kptDatabase:
+        rc = db_select (&pb);
+        break;
+
+    case kptPrereleaseTbl:
+    case kptTable:
+        rc = tbl_select (&pb);
+        break;
+
+    case kptColumn:
+        rc = col_select (&pb);
+        break;
+    }
+    return rc;
+}
+
+const char UsageDefaultName[] = "kdbmeta";
+
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s [Options] <target> [<query> ...]\n"
+                    "\n"
+                    "Summary:\n"
+                    "  Display the contents of one or more metadata stores.\n"
+#if ALLOW_UPDATE
+                    "  Update metadata.\n"
+#endif
+                  , progname);
+}
+
+static const char *const t1 [] = { "path-to-database", "access database metadata", NULL };
+static const char *const t2 [] = { "path-to-table",    "access table metadata", NULL };
+static const char *const t3 [] = { "path-to-column",   "access column metadata", NULL };
+static const char *const t4 [] = { "accession",        "sra global access id", NULL };
+
+static const char *const q1 [] = { "*","all nodes and attributes", NULL };
+static const char *const q2 [] = { "NAME","a named root node and children", NULL };
+static const char *const q3 [] = { "PATH/NAME","an internal node and children", NULL };
+static const char *const q4 [] = { "<node>@ATTR","a named attribute", NULL };
+#if ALLOW_UPDATE
+static const char *const q5 [] = { "<obj>=VALUE","a simple value assignment where",
+                                   "value string is text, and binary",
+                                   "values use hex escape codes", NULL };
+#endif
+
+#define ALIAS_READ_ONLY             "r"
+#define OPTION_READ_ONLY            "read-only"
+static const char* USAGE_READ_ONLY[] = { "operate in read-only mode", NULL };
+
+#define ALIAS_TABLE             "T"
+#define OPTION_TABLE            "table"
+static const char* USAGE_TABLE[] = { "table-name", NULL };
+
+#define ALIAS_UNSIGNED             "u"
+#define OPTION_UNSIGNED            "unsigned"
+static const char* USAGE_UNSIGNED[]
+                                 = { "print numeric values as unsigned", NULL };
+
+#define OPTION_OUT "output"
+#define ALIAS_OUT  "X"
+static const char* USAGE_OUT[] = { "Output type: one of (xml text): ",
+    "whether to generate well-formed XML. Default: xml (well-formed)", NULL };
+
+const OptDef opt[] = {
+  { OPTION_TABLE    , ALIAS_TABLE    , NULL, USAGE_TABLE    , 1, true , false }
+ ,{ OPTION_UNSIGNED , ALIAS_UNSIGNED , NULL, USAGE_UNSIGNED , 1, false, false }
+#if ALLOW_UPDATE
+ ,{ OPTION_READ_ONLY, ALIAS_READ_ONLY, NULL, USAGE_READ_ONLY, 1, false, false }
+#endif
+ ,{ OPTION_OUT      , ALIAS_OUT      , NULL, USAGE_OUT      , 1, true , false }
+};
+
+static const char * const * target_usage [] = { t1, t2, t3, t4 };
+static const char * const * query_usage []  =
+{
+    q1, q2, q3, q4
+#if ALLOW_UPDATE
+    , q5
+#endif
+};
+
+
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    unsigned idx;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+
+    UsageSummary (progname);
+
+    KOutMsg ("  The target metadata are described by one or more\n"
+             "  target specifications, giving the path to a database, a table\n"
+             "  or a column. the command and query are executed on each target.\n"
+             "\n"
+             "  queries name one or more objects, and '*' acts as a wildcard.\n"
+             "  query objects are nodes or attributes. nodes are named with a\n"
+             "  hierarchical path, like a file-system path. attributes are given\n"
+             "  as a node path followed by a '@' followed by the attribute name.\n"
+             "\n"
+             "target:\n");
+
+    for (idx = 0; idx < sizeof (target_usage) / sizeof target_usage[0]; ++idx)
+        HelpParamLine ( (target_usage[idx])[0], (target_usage[idx])+1 );
+
+    OUTMSG (("\n"
+             "query:\n"));
+
+    for (idx = 0; idx < sizeof (query_usage) / sizeof query_usage[0]; ++idx)
+        HelpParamLine ( (query_usage[idx])[0], (query_usage[idx])+1 );
+
+    OUTMSG (("\n"
+             "Options:\n"));
+
+    for(idx = 0; idx < sizeof(opt) / sizeof(opt[0]); ++idx) {
+        const char *param = NULL;
+        if (strcmp(opt[idx].aliases, ALIAS_TABLE) == 0) {
+            param = "table";
+        }
+        else if (strcmp(opt[idx].aliases, ALIAS_OUT) == 0) {
+            param = "value";
+        }
+        HelpOptionLine(opt[idx].aliases, opt[idx].name, param, opt[idx].help);
+    }
+
+    HelpOptionsStandard ();
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+
+/* KMain - EXTERN
+ *  executable entrypoint "main" is implemented by
+ *  an OS-specific wrapper that takes care of establishing
+ *  signal handlers, logging, etc.
+ *
+ *  in turn, OS-specific "main" will invoke "KMain" as
+ *  platform independent main entrypoint.
+ *
+ *  "argc" [ IN ] - the number of textual parameters in "argv"
+ *  should never be < 0, but has been left as a signed int
+ *  for reasons of tradition.
+ *
+ *  "argv" [ IN ] - array of NUL terminated strings expected
+ *  to be in the shell-native character set: ASCII or UTF-8
+ *  element 0 is expected to be executable identity or path.
+ */
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args * args = NULL;
+    rc_t rc;
+
+    rc = ArgsMakeAndHandle(&args, argc, argv, 1, opt, sizeof(opt) / sizeof(opt[0]));
+    if (rc == 0)
+    {
+        do 
+        {
+            const char * pc;
+            KDirectory *curwd;
+            uint32_t pcount;
+            int ix;
+
+#if ALLOW_UPDATE
+            read_only_arg = false;
+            rc = ArgsOptionCount (args, OPTION_READ_ONLY, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc,
+                    "Failure to get '" OPTION_READ_ONLY "' argument");
+                break;
+            }
+            read_only_arg = pcount > 0;
+#endif
+
+            rc = ArgsOptionCount (args, OPTION_UNSIGNED, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc,
+                    "Failure to get '" OPTION_UNSIGNED "' argument");
+                break;
+            }
+            as_unsigned = pcount > 0;
+
+            rc = ArgsOptionCount (args, OPTION_TABLE, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc,
+                    "Failure to get '" OPTION_TABLE "' argument");
+                break;
+            }
+            if (pcount) {
+                rc = ArgsOptionValue (args, OPTION_TABLE, 0, (const void **)&table_arg);
+                if (rc) {
+                    LOGERR(klogErr, rc,
+                        "Failure to get '" OPTION_TABLE "' argument");
+                    break;
+                }
+            }
+
+            rc = ArgsOptionCount (args, OPTION_OUT, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_OUT "' argument");
+                break;
+            }
+            if (pcount) {
+                const char* dummy = NULL;
+                rc = ArgsOptionValue (args, OPTION_OUT, 0, (const void **)&dummy);
+                if (rc) {
+                    LOGERR(klogErr, rc,
+                        "Failure to get '" OPTION_OUT "' argument");
+                    break;
+                }
+                else if (strcmp(dummy, "t") == 0) {
+                    as_valid_xml = false;
+                }
+            }
+
+            rc = ArgsParamCount (args, &pcount);
+            if (rc)
+                break;
+
+            if (pcount == 0)
+            {
+                OUTMSG (( "missing database target path and queries\n" ));
+                MiniUsage (args);
+                ArgsWhack(args);
+                exit(EXIT_FAILURE);
+            }
+
+            rc = KDirectoryNativeDir (&curwd);
+            if (rc)
+            {
+                LOGERR (klogInt, rc, "Unable to open the file system");
+            }
+            else
+            {
+                CONST KDBManager * mgr;
+#if ALLOW_UPDATE
+                rc = KDBManagerMakeUpdate (&mgr, curwd);
+#else
+                rc = KDBManagerMakeRead (&mgr, curwd);
+#endif
+                if (rc)
+                    LOGERR (klogInt, rc, "Unable to open the database system");
+                else
+                {
+                    /* get target */
+                    rc = ArgsParamValue (args, 0, (const void **)&pc);
+                    if (rc)
+                        LOGERR (klogInt, rc, "Unable to read target parameter");
+                    else
+                    {
+                        char objpath [ 4096 ];
+                        bool found;
+                        uint32_t type;
+
+                        found = false;
+
+                        {
+                            const VFSManager * vfs;
+                            rc = KDBManagerGetVFSManager ( mgr, ( VFSManager ** )&vfs );
+                            if ( rc == 0 )
+                            {
+                                VResolver * resolver;
+                                rc = VFSManagerGetResolver ( vfs, & resolver );
+                                if ( rc == 0 )
+                                {
+                                    VPath * query;
+                                    rc = VFSManagerMakePath ( vfs, & query, "%s", pc );
+                                    if ( rc == 0 )
+                                    {
+                                        const VPath * local;
+                                        rc = VResolverQuery ( resolver, 0, query, & local, NULL, NULL );
+                                        if ( rc == 0 )
+                                        {
+                                            rc = VPathReadPath ( local, objpath, sizeof objpath, NULL );
+                                            if ( rc == 0 )
+                                                found = true;
+
+                                            VPathRelease ( local );
+                                        }
+                                        else if ( GetRCState ( rc ) == rcNotFound )
+                                        {
+                                            rc = 0;
+                                        }
+
+                                        VPathRelease ( query );
+                                    }
+
+                                    VResolverRelease ( resolver );
+                                }
+
+                                VFSManagerRelease ( vfs );
+                            }
+                        }
+
+                        if ( ! found)
+                        {
+                            rc = KDirectoryResolvePath (curwd, true, objpath,
+                                                        sizeof objpath, "%s", pc);
+
+                            if (rc)
+                                LOGERR (klogFatal, rc,
+                                    "Unable to resolved target path");
+                        }
+
+                        type = KDBManagerPathType (mgr, "%s", objpath);
+                            
+                        switch (type)
+                        {
+                        case kptDatabase:
+                        case kptPrereleaseTbl:
+                        case kptTable:
+                        case kptColumn:
+                            break;
+
+                        case kptBadPath:
+                            rc = RC ( rcDB, rcMgr, rcAccessing, rcPath, rcInvalid );
+                            PLOGERR ( klogErr, (klogErr, rc, "'$(path)' -- bad path", "path=%s", pc ));
+                            break;
+                        default:
+                            rc = RC ( rcDB, rcMgr, rcAccessing, rcPath, rcIncorrect );
+                            PLOGERR ( klogErr, (klogErr, rc, "'$(path)' -- type unknown", "path=%s", pc ));
+                            break;
+
+                        case kptNotFound:
+                            rc = RC ( rcDB, rcMgr, rcAccessing, rcPath, rcNotFound );
+                            PLOGERR ( klogErr, ( klogErr, rc, "'$(path)' not found", "path=%s", pc ));
+                            break;
+                        }
+                        if (rc == 0)
+                        {
+                            Vector q;
+
+                            VectorInit (&q, 0, 8);
+
+                            if (pcount == 1)
+                            {
+                                const char *default_query = "*";
+                                rc = VectorAppend (&q, NULL, default_query);
+                            }
+                            else for (ix = 1; ix < pcount; ++ix)
+                            {
+                                rc = ArgsParamValue (args, ix, (const void **)&pc);
+                                if (rc)
+                                    break;
+
+                                rc = ArgsParamValue (args, ix, (const void **)&pc);
+                                if (rc)
+                                    break;
+                                    
+                                rc = VectorAppend ( &q, NULL, pc );
+                                if (rc)
+                                    break;
+                            }
+
+                            if (rc)
+                                LOGERR (klogErr, rc, "Unable to queue queries");
+                            else
+                            {
+                                rc = tool_select (mgr, type, objpath, &q);
+                                
+                                VectorWhack (&q, NULL, NULL);
+                            }
+                        }
+                    }
+                    KDBManagerRelease (mgr);
+                }
+                KDirectoryRelease (curwd);
+            }
+        } while (0);
+    }
+    
+    ArgsWhack(args);
+    args = NULL;
+
+    return rc;
+}
diff --git a/tools/util/mac/syspass.c b/tools/util/mac/syspass.c
new file mode 100644
index 0000000..550af53
--- /dev/null
+++ b/tools/util/mac/syspass.c
@@ -0,0 +1,48 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "syspass-priv.h" /* get_pass */
+
+#include <klib/rc.h>
+
+#include <readpassphrase.h>
+
+rc_t get_pass(const char *prompt, char *buf, size_t bufsiz) {
+    if (prompt == NULL || buf == NULL) {
+        return RC(rcExe, rcFunction, rcEvaluating, rcParam, rcNull);
+    }
+
+    if (bufsiz == 0)
+    {   return 0; }
+
+    buf[0] = '\0';
+
+    if (readpassphrase(prompt, buf, bufsiz, 0) == NULL) {
+        return RC(rcExe, rcFunction, rcEvaluating, rcParam, rcNull);
+    }
+
+    return 0;
+}
diff --git a/tools/util/md5cp.c b/tools/util/md5cp.c
new file mode 100644
index 0000000..549ab09
--- /dev/null
+++ b/tools/util/md5cp.c
@@ -0,0 +1,702 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <klib/rc.h>
+
+#include <klib/vector.h>
+#include <klib/impl.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/md5.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#define MD5EXTENSION "md5"
+#define DEFAULTMODE 0664
+#define DEFAULT_DIR_MODE 0775
+
+/*
+Trying to mimic cp behavior, with a few differences, 
+mainly, that if -f not specified and target exists,
+we do not clobber files, but instead print something about it on the
+output.
+
+cp -r dir1 dir2 makes dir2/dir1
+cp -r dir1 <nonexistent-name> just "renames" directory dir1 to name
+-r not specified and dir copied from, ignores that directory.
+
+If multiple things are specified (more than 2)
+then the last one should exist and be a directory.
+
+-i should still be available, to ask what to do about things that would be clobbered.
+
+Need to think what to do when inputs are relative and absolute
+
+This needs to work with backslashes as well (i.e. independent of
+target platform).
+
+Need to worry about copying from a directory to itself
+Definitely don't want to copy a file from itself to itself
+
+Need also to worry about loops in references (when walking trees)
+
+What to do about symbolic links
+
+DONE: Need to make mode of file copied
+
+Need to make return code of executable be useful to scripts
+
+TESTS:
+
+copy file to nonexistent name (should create, and .md5 as well)
+do it again, make sure missing -f works (doesn't clobber).
+do it again with -f to see it clobbers.
+
+Make sure copying a directory to a file causes an error.
+
+make a directory with 2 files, copy to new (non-existent) name
+  without -r switch (should ignore directory)
+add -r switch, see creates the new name dir
+do it again, should create a subdirectory
+
+Check that mode is preserved on copying directory to new (nonexistent) name
+Check that mode is preserved on new files (created files)
+
+On existing files, the mode will be preserved on the TARGET file,
+unless -p is specified, in which case (like -f) the source will clobber
+the target protections.
+
+ */
+
+int interacative = 0;
+int force = 0;
+int recurse = 0;
+int test = 0;
+int clobber_protections = 0;
+int followlinks = 1;
+
+rc_t CopyDirectoryToExistingDirectory( const KDirectory *top, const char *inname, KDirectory *targettop, const char *outname );
+rc_t CopyFileToFile( const KDirectory *top, const char *inname, KDirectory *targettop, const char *outname );
+
+#define BUFSIZE 8192
+
+char buffer[BUFSIZE];
+
+/*
+ * out is a pre-allocated buffer.
+ */
+void JustTheName(const char *in, char *out) 
+{
+  int len;
+  int end;
+  int begin;
+  int i;
+  
+  len = strlen(in);
+  end = len;
+  end--;
+  while (end > 0 && in[end] == '/') {
+    end--;
+  }
+  begin = end;
+  while (begin > 0 && in[begin-1] != '/') {
+    begin--;
+  }
+  for (i=begin; i<=end; i++) {
+    *out++ = in[i];
+  }
+  *out++ = '\0';
+}
+
+bool PathIsMD5File(const KDirectory *dir, const char *inname)
+{
+  int extlen;
+  int inlen;
+
+  inlen = strlen(inname);
+  extlen = strlen(MD5EXTENSION);
+  if (strlen(inname) > extlen+1 &&
+      inname[inlen - extlen - 1] == '.' &&
+      0 == strcmp(inname+inlen-extlen, MD5EXTENSION)) {
+    return true;
+  }
+  return false;
+}
+
+bool CC PathIsFile( const KDirectory *dir, const char *name, void *data ) 
+{
+  uint32_t pathtype;
+  pathtype = KDirectoryPathType( dir, "%s", name );
+  return ((pathtype & ~kptAlias) == kptFile);
+}
+
+
+bool CC PathIsDir(const KDirectory *dir, const char *name, void *data) 
+{
+  uint32_t pathtype;
+  pathtype = KDirectoryPathType( dir, "%s", name );
+  return ((pathtype & ~kptAlias) == kptDir);
+}
+
+rc_t CopyMode( const KDirectory *source, const char *sourcename,
+	       KDirectory *target, char *targetname )
+{
+  /* Make sure they both exist and are the same type */
+  uint32_t src_pathtype;
+  uint32_t dest_pathtype;
+  uint32_t mode;
+  rc_t rc;
+
+  src_pathtype = KDirectoryPathType( source, "%s", sourcename );
+  dest_pathtype = KDirectoryPathType( target, "%s", targetname );
+  if ((src_pathtype & ~kptAlias) != (dest_pathtype & ~kptAlias)) {
+    return -1;
+  }
+  rc = KDirectoryAccess( source, &mode, "%s", sourcename );
+  if (rc != 0)
+    {
+      LOGERR ( klogInt, rc, sourcename );
+      return rc;
+    }
+  KDirectorySetAccess( target, false, mode, 0777, "%s", targetname );
+  return 0;
+}
+
+
+rc_t CopyDirectoryFiles( const KDirectory *source, KDirectory *dest ) {
+  rc_t rc;
+  KNamelist *list;
+  const char *name;
+  int i;
+  uint32_t count;
+  char resolved[1024];
+
+  rc = KDirectoryList( source, &list, PathIsFile, NULL, ".");
+  if (rc != 0)
+    {
+      /* This doesn't do what I thought. */
+      KDirectoryResolvePath( source, false, resolved, 1024, ".");
+      LOGERR ( klogInt, rc, resolved );
+      return rc;
+    }
+  KNamelistCount(list, &count);
+  for (i=0; i<count; i++) {
+    KNamelistGet(list, i, &name);
+    if (test) {
+      fprintf(stderr, "Will copy %s\n", name);
+    } else {
+      CopyFileToFile( source, name, dest, (char *)name );
+    }
+  }
+  return 0;
+}
+
+rc_t CopyDirectoryDirectories( const KDirectory *source, KDirectory *dest ) {
+  rc_t rc;
+  KNamelist *list;
+  const char *name;
+  int i;
+  uint32_t count;
+  uint32_t mode;
+  uint32_t pathtype;
+
+  KDirectoryList( source, &list, PathIsDir, NULL, ".");
+  KNamelistCount(list, &count);
+  for (i=0; i<count; i++) {
+    KNamelistGet(list, i, &name);
+    /* fprintf(stderr, "Creating directory %s\n", name); */
+    mode = DEFAULT_DIR_MODE;
+    rc = KDirectoryAccess( source, &mode, "%s", name);
+    if (rc != 0)
+      {
+	LOGERR ( klogInt, rc, name );
+	return rc;
+      }
+    pathtype = KDirectoryPathType( dest, "%s", name );
+    if ((pathtype & ~kptAlias) == kptNotFound) {
+        rc = KDirectoryCreateDir( dest, mode, kcmOpen, "%s", name );
+      if (rc != 0)
+	{
+	  LOGERR ( klogInt, rc, name );
+	  return rc;
+	}
+    } else if ((pathtype & ~kptAlias) == kptDir) {
+      if (clobber_protections) {
+          KDirectorySetAccess( dest, false, mode, 0777, "%s", name);
+      }
+    }
+    CopyDirectoryToExistingDirectory( source, name, dest, (char *)name);
+  }
+  return 0;
+}
+
+
+
+
+rc_t CopyFileToFile( const KDirectory *top, const char *inname, KDirectory *targettop, const char *outname )
+{
+  const KFile *in = NULL;
+  KFile *out = NULL;
+  KFile *md5file = NULL;
+  KMD5File *md5out = NULL;
+  KMD5SumFmt *md5sumfmt = NULL;
+  char md5filename[1024];
+  rc_t rc = 0;
+  uint32_t mode = 0;
+  uint32_t pathtype = 0;
+  uint32_t failed = 0;
+
+  if (PathIsMD5File(top, inname)) {
+    /* Skip it */
+    return 0;
+  }
+  
+  rc = KDirectoryOpenFileRead( top, &in, "%s", inname );
+  if (rc != 0) {
+    failed = rc;
+    goto FAIL;
+  }
+  mode = DEFAULTMODE;
+  rc = KDirectoryAccess( top, &mode, inname);
+  if (rc != 0) {
+    failed = rc;
+    goto FAIL;
+  }
+
+  /*
+   * Not sure here -- does kcmInit re-initialize the file mode as we specify?
+   * Or does it preserve the existing mode (and do we want it to)?
+   */
+  if (clobber_protections) {
+      pathtype = KDirectoryPathType( targettop, "%s", outname );
+    if ((pathtype & ~kptAlias) == kptFile) {
+        rc = KDirectorySetAccess( targettop, false, mode, 0777, "%s", outname);
+      if (rc != 0) {
+	failed = rc;
+	goto FAIL;
+      }
+    }
+  }
+
+  rc = KDirectoryCreateFile( targettop, &out, false, mode, (force? kcmInit: kcmCreate), "%s", outname );
+  if (rc != 0) {
+    failed = rc;
+    goto FAIL;
+  }
+  sprintf(md5filename, "%s.md5", outname);
+  rc = KDirectoryCreateFile( targettop, &md5file, false, DEFAULTMODE, (force? kcmInit: kcmCreate), "%s", md5filename);
+  if (rc != 0) {
+    failed = rc;
+    goto FAIL;
+  }
+
+  rc = KMD5SumFmtMakeUpdate( &md5sumfmt, md5file);
+  if (rc != 0) {
+    failed = rc;
+    goto FAIL;
+  }
+
+  rc = KMD5FileMakeWrite( &md5out, out, md5sumfmt, outname );
+  if (rc != 0) {
+    failed = rc;
+    goto FAIL;
+  }
+    
+  {  
+    uint64_t rpos = 0;
+    uint64_t wpos = 0;
+      
+    size_t numread;
+
+    while (true) {
+      rc = KFileRead( in, rpos, buffer, BUFSIZE, &numread );
+      /* fprintf(stderr, "Read %d bytes.\n", numread); */
+      if (rc == 0 && numread == 0) 
+	break;
+      if (rc != 0) {
+	failed = rc;
+	goto FAIL;
+      }
+      rpos += numread;
+
+      {
+	size_t numwritten = 0;
+	int written = 0;
+	while (written < numread) {
+	  rc = KFileWrite( (KFile *)md5out, wpos, buffer+written, numread-written, &numwritten );
+	  if (rc != 0) {
+	    failed = rc;
+	    break;
+	  }
+	  if (numwritten == 0) {
+	    fprintf(stderr, "Didn't write anything.\n");
+	    failed = -1;
+	    goto FAIL;
+	  }
+	  wpos += numwritten;
+	  written += numwritten;
+	}
+      }
+    }
+  }
+
+  /* Success also, check the value of failed to see if failed */
+ FAIL:
+
+  if (NULL != md5out) {
+    KFileRelease((KFile *)md5out);
+    md5out = NULL;
+  }
+
+  /*KFileRelease(out); */
+  if (NULL != md5sumfmt) {
+    KMD5SumFmtRelease(md5sumfmt);
+    md5sumfmt = NULL;
+  }
+  /*  KFileRelease(md5file); */
+  if (NULL != in) {
+    KFileRelease(in);
+    in = NULL;
+  }
+  /* KDirectoryRelease(top); */
+
+  if (failed) {
+      KDirectoryRemove( targettop, false, "%s", md5filename );
+      KDirectoryRemove( targettop, false, "%s", outname);
+  }
+
+  return failed;
+
+}  
+
+/*
+ * copies top/inname (a directory) 
+ * to targettop/outname, i.e. creates outname as a copy of that directory.
+ */
+rc_t CopyDirectoryToExistingDirectory( const KDirectory *top, const char *inname, KDirectory *targettop, const char *outname )
+{
+  rc_t rc;
+  uint32_t mode;
+  const KDirectory *source;
+  KDirectory *dest;
+  rc = KDirectoryOpenDirRead(top, &source, true, "%s", (const char *)inname);
+  if (rc != 0)
+    {
+      LOGERR ( klogInt, rc, "can't open input directory" );
+      return rc;
+    }
+  mode = DEFAULT_DIR_MODE;
+  rc = KDirectoryAccess( top, &mode, "%s", inname);
+  if (rc != 0)
+    {
+      LOGERR ( klogInt, rc, inname );
+      return rc;
+    }
+  rc = KDirectoryCreateDir( targettop, mode, kcmOpen, "%s", outname );
+  if (rc != 0)
+    {
+      LOGERR ( klogInt, rc, "can't create output directory" );
+      return rc;
+    }
+  if (clobber_protections) {
+      KDirectorySetAccess( targettop, false, mode, 0777, "%s", outname);
+  }
+  rc = KDirectoryOpenDirUpdate(targettop, &dest, true, "%s", outname);
+  if (rc != 0)
+    {
+      LOGERR ( klogInt, rc, "can't open directory for write" );
+      return rc;
+    }
+  CopyDirectoryFiles(source, dest);
+  CopyDirectoryDirectories( source, dest );
+
+  KDirectoryRelease( dest );
+  KDirectoryRelease( source );
+  return 0;
+}  
+
+#define OPTION_FORCE    "force"
+#define OPTION_RECURSE  "recursive"
+#define OPTION_PRESERVE "preserve"
+#define OPTION_TEST     "test"
+#define ALIAS_FORCE     "f"
+#define ALIAS_RECURSE   "r"
+#define ALIAS_PRESERVE  "p"
+#define ALIAS_TEST      "t"
+
+static const char * force_usage[]    = { "overwrite existing columns", NULL };
+static const char * recurse_usage[]  = { "Recurses over source directories",
+                                         "(directories are ignored otherwise).", NULL };
+static const char * preserve_usage[] = { "force replacement of existing modes on files", " and directories", NULL };
+static const char * test_usage[]     = { "?", NULL };
+
+
+OptDef Options[] = 
+{
+    { OPTION_FORCE,    ALIAS_FORCE,    NULL, force_usage,    0, false, false },
+    { OPTION_RECURSE,  ALIAS_RECURSE,  NULL, recurse_usage,  0, false, false },
+    { OPTION_PRESERVE, ALIAS_PRESERVE, NULL, preserve_usage, 0, false, false },
+    { OPTION_TEST,     ALIAS_TEST,     NULL, test_usage,     0, false, false }
+};
+
+
+const char UsageDefaultName[] = "md5cp";
+
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s Options [file|directory ...] directory\n"
+                    "\n"
+                    "Summary:\n"
+                    "  Copies files and/or directories, creating an md5sum checksum\n"
+                    "  (named file.md5) for all copied files.\n",
+                    progname);
+}
+
+
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+
+    UsageSummary (progname);
+
+    KOutMsg ("\n"
+             "Option:\n");
+
+    HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, force_usage);
+    HelpOptionLine (ALIAS_PRESERVE, OPTION_PRESERVE, NULL, preserve_usage);
+    HelpOptionLine (ALIAS_RECURSE, OPTION_RECURSE, NULL, recurse_usage);
+    HelpOptionLine (ALIAS_TEST, OPTION_TEST, NULL, test_usage);
+
+    HelpOptionsStandard ();
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+
+rc_t run (Args * args)
+{
+    rc_t rc;
+
+    do 
+    {
+        const char * outname;
+        const char * source;
+        uint32_t pathtype;
+        KDirectory *top;
+        KDirectory *targettop;
+        uint32_t pcount;
+        uint32_t ix;
+        char sourcename [1024];
+
+        rc = KDirectoryNativeDir (&top);
+        if (rc)
+            break;
+        rc = ArgsParamCount (args, &pcount);
+        if (rc)
+            break;
+
+        if (pcount < 2)
+        {
+            MiniUsage (args);
+            rc = RC (rcExe, rcArgv, rcParsing, rcParam, rcInsufficient);
+            break;
+        }
+
+        rc = ArgsParamValue (args, 0, (const void **)&outname);
+        if (rc)
+            break;
+
+        pathtype = KDirectoryPathType (top, "%s", outname);
+        if ((pathtype & ~kptAlias) == kptDir)
+        {
+            /* 
+             * Copying things into an existing directory.
+             */
+            rc = KDirectoryOpenDirUpdate( top, &targettop, true, outname);
+            if (rc)
+            {
+                LOGERR (klogFatal, rc, outname);
+                break;
+            }
+
+            for (ix = 1; ix < pcount; ++ix)
+            {
+                
+                rc = ArgsParamValue (args, ix, (const void **)&source);
+                if (rc)
+                    break;
+
+                JustTheName (source, sourcename);
+                pathtype = KDirectoryPathType (top, "%s", sourcename);
+                if ((pathtype & ~kptAlias) == kptFile)
+                {
+                    CopyFileToFile (top, source, targettop, sourcename);
+                }
+                else if ((pathtype & ~kptAlias) == kptDir)
+                {
+                    if (!recurse)
+                    {
+                        STSMSG (0, ("Skipping directory %s\n", source));
+                        continue;
+                    }
+                    CopyDirectoryToExistingDirectory (top, source, targettop, sourcename);
+                }
+            }
+            if (rc)
+                break;
+
+            rc = KDirectoryRelease (targettop);
+/* this looks wrong */
+            if (rc)
+                LOGERR (klogInt, rc, outname);
+        }
+        else if ((pathtype * ~kptAlias) == kptFile)
+        {
+            if (!force)
+            {
+                STSMSG (0, ("File exists -- %s\n", outname));
+                break;
+            }
+            if (pcount > 2)
+            {
+                STSMSG (0, ("Target %s is a file. Too many parameters/\n", outname));
+                break;
+            }
+
+            rc = ArgsParamValue (args, 1, (const void **)&source);
+            if (rc)
+                break;
+
+            pathtype = KDirectoryPathType (top, "%s", source);
+
+            if ((pathtype & ~kptAlias) == kptDir)
+            {
+                STSMSG (0, ("Cannot overwrite file with directory %s\n", source));
+                break;
+            }
+            if ((pathtype & ~kptAlias) == kptFile)
+            {
+                CopyFileToFile (top, source, top, outname);
+            }
+        }
+        else if ((pathtype & ~kptAlias) == kptNotFound)
+        {
+            if (pcount > 2)
+            {
+                STSMSG (0, ("Directory %s does not exist.\n", outname));
+                break;
+            }
+
+            rc = ArgsParamValue (args, 1, (const void **)&source);
+            if (rc)
+                break;
+
+            pathtype = KDirectoryPathType (top, "%s", source);
+            if ((pathtype & ~kptAlias) == kptFile)
+            {
+                CopyFileToFile (top, source, top, outname);
+            }
+            else if ((pathtype & ~kptAlias) == kptDir)
+            {
+                if (!recurse)
+                {
+                    STSMSG (0, ("Skipping directory %s\n", source));
+                    break;
+                }
+                CopyDirectoryToExistingDirectory (top, source, top, outname);
+            }
+        }
+
+    } while (0);
+    return rc;
+}
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args * args;
+    rc_t rc;
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 1, 
+                            Options, sizeof (Options) / sizeof (OptDef));
+    if (rc == 0)
+    {
+        do
+        {
+            uint32_t pcount;
+
+            rc = ArgsOptionCount (args, OPTION_FORCE, &pcount);
+            if (rc)
+                break;
+
+            force = (pcount > 0);
+
+            rc = ArgsOptionCount (args, OPTION_RECURSE, &pcount);
+            if (rc)
+                break;
+
+            recurse = (pcount > 0);
+
+
+            rc = ArgsOptionCount (args, OPTION_TEST, &pcount);
+            if (rc)
+                break;
+
+            test = (pcount > 0);
+
+            rc = ArgsOptionCount (args, OPTION_PRESERVE, &pcount);
+            if (rc)
+                break;
+
+            clobber_protections = (pcount > 0);
+
+            rc  = run (args);
+
+        }while (0);
+
+        ArgsWhack (args);
+    }
+    return rc;
+}
+
diff --git a/tools/util/pacbio-correct.c b/tools/util/pacbio-correct.c
new file mode 100644
index 0000000..a9a49fe
--- /dev/null
+++ b/tools/util/pacbio-correct.c
@@ -0,0 +1,208 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data", the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties", express or implied", including
+*  warranties of performance", merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/out.h>
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include <kdb/database.h>
+#include <kdb/manager.h>
+
+#include <vdb/vdb-priv.h>
+#include <vdb/manager.h>
+#include <vdb/database.h>
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+
+#include <sysalloc.h>
+
+const char UsageDefaultName[] = "pacbio-correct";
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    OUTMSG ( ("\n"
+        "Usage:\n"
+        "  %s writable_object(s)\n"
+        "\n", progname) );
+    return 0;
+}
+
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if ( args == NULL )
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+        rc = ArgsProgram ( args, &fullpath, &progname );
+    if ( rc )
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary ( progname );
+
+    KOutMsg ( "Options:\n" );
+
+    HelpOptionsStandard ();
+    HelpVersion ( fullpath, KAppVersion() );
+    return rc;
+}
+
+const char CONSENSUS[] = "CONSENSUS";
+const char PULSE[] = "PULSE";
+const char SEQUENCE[] = "SEQUENCE";
+
+rc_t correct( const char * obj )
+{
+    KDirectory * dir;
+    rc_t rc = KDirectoryNativeDir( &dir );
+    if ( rc != 0 )
+    {
+        LOGERR( klogErr, rc, "creation of KDirectory failed" );
+    }
+    else
+    {
+        VDBManager * vdb_mgr;
+        rc = VDBManagerMakeUpdate ( &vdb_mgr, dir );
+        if ( rc != 0 )
+        {
+            LOGERR( klogErr, rc, "creation of VDBManager failed" );
+        }
+        else
+        {
+            VDatabase * vdb_db;
+            rc = VDBManagerOpenDBUpdate ( vdb_mgr, &vdb_db, NULL, "%s", obj );
+            if ( rc != 0 )
+            {
+                LOGERR( klogErr, rc, "vdb: open for update failed" );
+            }
+            else
+            {
+                KDatabase *kdb;
+                rc = VDatabaseOpenKDatabaseUpdate ( vdb_db, & kdb );
+                if ( rc != 0 )
+                {
+                    LOGERR( klogErr, rc, "kdb: open for update failed" );
+                }
+                else
+                {
+                    if ( KDatabaseExists ( kdb, kptTable, CONSENSUS ) )
+                    {
+                        if ( KDatabaseExists ( kdb, kptTable, PULSE ) )
+                        {
+                            OUTMSG(( "table >%s< does already exist in >%s<\n", PULSE, obj ));
+                        }
+                        else
+                        {
+                            if ( KDatabaseExists ( kdb, kptTable, SEQUENCE ) )
+                            {
+                                rc = KDatabaseRenameTable ( kdb, true, SEQUENCE, PULSE );
+                                if ( rc != 0 )
+                                {
+                                    LOGERR( klogErr, rc, "kdb: renaming table failed" );
+                                }
+                                else
+                                {
+                                    OUTMSG(( "table >%s< renamed to >%s< in >%s<\n", SEQUENCE, PULSE, obj ));
+                                }
+                                if ( rc == 0 )
+                                {
+                                    rc = KDatabaseAliasTable ( kdb, CONSENSUS, SEQUENCE );
+                                    if ( rc != 0 )
+                                    {
+                                        LOGERR( klogErr, rc, "kdb: creating table-alias failed" );
+                                    }
+                                    else
+                                    {
+                                        OUTMSG(( "alias >%s< created for >%s< in >%s<\n", SEQUENCE, CONSENSUS, obj ));
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    else
+                    {
+                        OUTMSG(( "table >%s< does not exist in >%s<\n", CONSENSUS, obj ));
+                    }
+                    KDatabaseRelease ( kdb );
+                }
+                VDatabaseRelease( vdb_db );
+            }
+            VDBManagerRelease( vdb_mgr );
+        }
+        KDirectoryRelease( dir );
+    }
+    return rc;
+}
+
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args * args;
+
+    rc_t rc = ArgsMakeAndHandle ( &args, argc, argv, 0 );
+
+    KLogHandlerSetStdErr();
+    if ( rc != 0 )
+    {
+        LOGERR( klogErr, rc, "error creating internal structure" );
+    }
+    else
+    {
+        uint32_t count;
+        rc = ArgsParamCount( args, &count );
+        if ( rc != 0 )
+            LOGERR( klogErr, rc, "ArgsParamCount failed" );
+        else
+        {
+            if ( count < 1 )
+            {
+                rc = RC( rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid );
+                LOGERR( klogErr, rc, "object(s) missing" );
+                Usage ( args );
+            }
+            else
+            {
+                uint32_t idx;
+                for ( idx = 0; idx < count && rc == 0; ++idx )
+                {
+                    const char *obj;
+                    rc = ArgsParamValue( args, idx, (const void **)&obj );
+                    if ( rc != 0 )
+                        LOGERR( klogErr, rc, "error reading commandline-parameter" );
+                    else
+                        rc = correct( obj ); /* ** <<<<<<<<<<<<<<<<<< ** */
+                }
+            }
+        }
+        ArgsWhack ( args );
+    }
+
+    return rc;
+}
diff --git a/tools/util/pseudo-aligner.cpp b/tools/util/pseudo-aligner.cpp
new file mode 100644
index 0000000..375955e
--- /dev/null
+++ b/tools/util/pseudo-aligner.cpp
@@ -0,0 +1,515 @@
+/* ===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <iostream>
+#include <string>
+#include <fstream>
+#include <sstream>
+#include <map>
+#include <stdexcept>
+#include <vector>
+#include <utility>
+#include <math.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <time.h>
+
+using namespace std;
+
+static unsigned stringtoui(string const &str, int base = 0)
+{
+    if (str.length() == 0)
+        throw length_error("empty");
+    
+    char const *const s = str.c_str();
+    char *endp = NULL;
+    unsigned long const value = strtoul(s, &endp, base);
+    
+    if (*endp != '\0')
+        throw invalid_argument("'" + str + "' is not convertible to an integer");
+    
+    if (value > unsigned(-1L))
+        throw range_error("'" + str + "' is too big");
+
+    return (unsigned)value;
+}
+
+struct Settings {
+    ostream *refSeqStream;
+    ostream *fastqStream;
+    
+    string refName;
+
+    int coverageTarget;
+    int lengthTarget;
+    int readLength;
+    int templateLength;
+    
+    Settings(map<string, string> &args)
+    : templateLength(600)
+    , readLength(150)
+    , coverageTarget(stringtoui(args["coverage"]))
+    , lengthTarget(stringtoui(args["length"]))
+    {
+        refName = args["refname"];
+        refSeqStream = new ofstream((refName + ".fasta").c_str());
+        fastqStream = new ofstream(args["fastq"].c_str());
+    }
+    ~Settings() {
+        delete refSeqStream;
+        delete fastqStream;
+    }
+    
+    static vector<string> const &paramNames() {
+        static char const *values[] = {
+            "refname", "fastq", "coverage", "length"
+        };
+        static vector<string> const value(values, values + 4);
+
+        return value;
+    }
+    static vector<string> const &paramTypes() {
+        static char const *values[] = {
+            "name", "file", "integer", "integer"
+        };
+        static vector<string> const value(values, values + 4);
+        
+        return value;
+    }
+};
+
+static Settings const *settings;
+
+static double frand()
+{
+    return double(random()) / double(1 << 30) - 1.0;
+}
+
+static pair<double, double> normalRandom()
+{
+    for ( ; ; ) {
+        double const x = frand();
+        double const y = frand();
+        double const r = x * x + y * y;
+        if (0.0 < r && r <= 1.0) {
+            double const scale = sqrt(-2.0 * log(r) / r);
+            return make_pair(x * scale, y * scale);
+        }
+    }
+}
+
+struct refbase {
+    uint8_t base, count;
+};
+typedef vector<refbase> ref_t;
+
+static void printReference(ref_t const &ref)
+{
+    ostream &out = *settings->refSeqStream;
+    
+    out << '>' << settings->refName << " A.randomus random sequence" << endl;
+    int j = 0;
+    for (ref_t::const_iterator i = ref.begin(); i != ref.end(); ++i) {
+        uint8_t const base = i->base;
+        out << "NACGT"[base == 0 ? (random() % 4 + 1) : base];
+        if (++j == 70) {
+            j = 0;
+            out << endl;
+        }
+    }
+    if (j)
+        out << endl;
+}
+
+static uint8_t complement(uint8_t const base)
+{
+    return (1 > base || base > 4) ? 0 : (5 - base);
+}
+
+static bool isOverCovered(ref_t const &ref, int pos)
+{
+    for (int i = 0; i < settings->readLength; ++i) {
+        int const coverage = ref[pos + i].count;
+        if (coverage > 2 * settings->coverageTarget)
+            return true;
+    }
+    return false;
+}
+
+static void covered(ref_t const &ref, int pos, int &left, int &right)
+{
+    left = 0;
+    right = settings->readLength;
+    while (ref[pos + left].count != 0) {
+        ++left;
+    }
+    while (ref[pos + right - 1].count != 0) {
+        --right;
+    }
+}
+
+static void fillReference(ref_t &ref, int pos)
+{
+    for (int i = 0; i < settings->readLength; ++i) {
+        int const check = ref[pos + i].count;
+        
+        if (check == 0) {
+            bool const GC = frand() > 0.2;
+            bool const AC = frand() > 0.0;
+            ref[pos + i].base = (GC ? AC ? 2 : 3 : AC ? 1 : 4);
+        }
+        int const count = int(check) + 1;
+        ref[pos + i].count = count < 0xFF ? count : 0xFF;
+    }
+}
+
+static void copyReference(ref_t &ref, int pos, vector<uint8_t> const &SEQ, bool reverse)
+{
+    for (int i = 0; i < settings->readLength; ++i) {
+        int const check = ref[pos + i].count;
+        
+        if (check == 0) {
+            bool const mutate = -10.0 * log10(frand()) > 15.0;
+            int const j = reverse ? (settings->readLength - 1 - i) : i;
+            uint8_t const value = mutate ? uint8_t(random() % 4 + 1) : SEQ[j];
+            uint8_t const base = reverse ? complement(value) : value;
+            ref[pos + i].base = base;
+        }
+        int const count = int(check) + 1;
+        ref[pos + i].count = count < 0xFF ? count : 0xFF;
+    }
+}
+
+static ostream &printSequence(ostream &out, vector<uint8_t> const &SEQ, bool reverse)
+{
+    for (int i = 0; i < settings->readLength; ++i) {
+        int const j = reverse ? (settings->readLength - 1 - i) : i;
+        uint8_t const value = SEQ[j];
+        char const base = "NACGT"[reverse ? complement(value) : value];
+        
+        out << base;
+    }
+    return out;
+}
+
+static ostream &printQuality(ostream &out, vector<uint8_t> const &QUAL, bool reverse)
+{
+    for (int i = 0; i < settings->readLength; ++i) {
+        int const j = reverse ? (settings->readLength - 1 - i) : i;
+        char const value = QUAL[j] + 33;
+        
+        out << value;
+    }
+    return out;
+}
+
+static void print1FastQ(uint64_t serialNo, int readNo, vector<uint8_t> const &SEQ, vector<uint8_t> const &QUAL)
+{
+    ostream &out = *settings->fastqStream;
+    
+    out << '@' << serialNo << '/' << readNo << endl;
+    printSequence(out, SEQ, false) << endl << '+' << endl;
+    printQuality(out, QUAL, false) << endl;
+}
+
+static void printFastQ(uint64_t serialNo, vector<uint8_t> const &SEQ1, vector<uint8_t> const &SEQ2, vector<uint8_t> const &QUAL1, vector<uint8_t> const &QUAL2)
+{
+    print1FastQ(serialNo, 1, SEQ1, QUAL1);
+    print1FastQ(serialNo, 2, SEQ2, QUAL2);
+}
+
+static int templateLength(int pos, int mpos, bool reversed)
+{
+    int const aleft = reversed ? pos + settings->readLength - 1 : pos;
+    int const aright = reversed ? pos - 1 : pos + settings->readLength;
+    int const bleft = !reversed ? mpos + settings->readLength - 1 : mpos;
+    int const bright = !reversed ? mpos - 1 : mpos + settings->readLength;
+    int const left = min(aleft, bleft);
+    int const right = max(aright, bright);
+    int const value = right - left;
+    if (aright == right)
+        return -value;
+    return value;
+}
+
+static void printSAM(ostream &out, uint64_t name, int readNo, bool reversed, bool secondary, int pos, int lclip, int rclip, bool hardClip, int mpos, vector<uint8_t> const &SEQ, vector<uint8_t> const &QUAL)
+{
+    int const FLAG = 0x1 | 0x2 | (reversed ? 0x10 : 0) | (reversed ? 0 : 0x20) | (readNo == 1 ? 0x40 : 0) | (readNo == 2 ? 0x80 : 0) | (secondary ? 0x100 : 0);
+    out << name << '\t' << FLAG << '\t' << settings->refName << '\t' << pos + 1 + lclip << '\t' << (secondary ? 3 : 30) << '\t';
+    if (lclip)
+        out << lclip << (hardClip ? 'H' : 'S');
+    out << settings->readLength - lclip - rclip << 'M';
+    if (rclip)
+        out << rclip << (hardClip ? 'H' : 'S');
+    out << "\t=\t" << mpos + 1 << '\t' << templateLength(pos, mpos, reversed) << '\t';
+    printSequence(out, SEQ, reversed) << '\t';
+    printQuality(out, QUAL, reversed) << endl;
+}
+
+static vector<uint8_t> randomQuality()
+{
+    vector<uint8_t> rslt(settings->readLength, 38);
+    
+    for (vector<uint8_t>::iterator i = rslt.begin(); i != rslt.end(); ++i) {
+        *i = max(10, min(40, int(*i + normalRandom().first * 5)));
+    }
+    return rslt;
+}
+
+static vector<uint8_t> readReference(ref_t const &ref, int pos, bool reverse)
+{
+    vector<uint8_t> rslt(settings->readLength);
+    for (int i = 0; i < settings->readLength; ++i) {
+        bool const mutate = -10.0 * log10(frand()) > 30.0;
+        uint8_t const base = mutate ? (random() % 4 + 1) : ref[pos + i].base;
+        if (reverse) {
+            rslt[settings->readLength - 1 - i] = complement(base);
+        }
+        else {
+            rslt[i] = base;
+        }
+    }
+    return rslt;
+}
+
+static uint64_t scramble(uint64_t const serialNo)
+{
+    static uint8_t scramble[256];
+    static uint8_t const *mixer = NULL;
+    
+    if (mixer == NULL) {
+        for (int i = 0; i < 256; ++i)
+            scramble[i] = i;
+        for (int k = 0; k < 256; ++k) {
+            for (int i = 0; i < 256; ++i) {
+                int const j = random() % 256;
+                int const xi = scramble[i];
+                int const xj = scramble[j];
+                
+                scramble[i] = xj;
+                scramble[j] = xi;
+            }
+        }
+        mixer = scramble;
+    }
+    uint64_t rslt = 0;
+    uint8_t carry = 0x55;
+    for (int i = 0; i < 8; ++i) {
+        uint8_t const j = serialNo >> (8 * i);
+        uint8_t const k = mixer[j ^ carry];
+        rslt = (uint64_t(k) << 56) | (rslt >> 8);
+        carry = k;
+    }
+    return rslt;
+}
+
+static pair<unsigned, unsigned> make_ipd_pair(void)
+{
+    for ( ; ; ) {
+        pair<double, double> const r2 = normalRandom();
+        int const ipd1 = int(r2.first * settings->templateLength / 10.0) + settings->templateLength;
+        int const ipd2 = int(r2.second * settings->templateLength / 100.0) + ipd1;
+        if (ipd1 > settings->readLength && ipd2 > settings->readLength)
+            return make_pair((unsigned)ipd1, (unsigned)ipd2);
+    }
+}
+
+static pair<unsigned, unsigned> make_read_pair(unsigned const ipd)
+{
+/*
+ *            |<-------ipd------->|                             |rrrrrrrrr|
+ *                                |fffffffff|-------------------|
+ *            |-------------------|fffffffff|
+ *  |rrrrrrrrr|
+ *  ^second                       ^first                        ^second
+ */
+    for ( ; ; ) {
+        double const r1 = frand();
+        bool const reversed = r1 < 0;
+        unsigned const pos1 = unsigned((reversed ? -r1 : r1) * settings->lengthTarget);
+        if (reversed && pos1 > settings->readLength + ipd) {
+            unsigned const pos2 = pos1 - settings->readLength - ipd;
+            return make_pair(pos1, pos2);
+        }
+        else {
+            unsigned const pos2 = pos1 + settings->readLength + ipd;
+            if (pos2 + settings->readLength <= settings->lengthTarget)
+                return make_pair(pos1, pos2);
+        }
+    }
+}
+
+static int run(void)
+{
+    ref_t ref(settings->lengthTarget);
+    uint64_t coverage = 0;
+    uint64_t serialNo = 0;
+    
+    for ( ; ; ) {
+        pair<unsigned, unsigned> const ipd = make_ipd_pair();
+        pair<unsigned, unsigned> const pos = make_read_pair(ipd.first);
+        bool const rev = pos.first > pos.second;
+
+        if (isOverCovered(ref, pos.first) || isOverCovered(ref, pos.second))
+            continue;
+        
+        fillReference(ref, pos.first);
+        fillReference(ref, pos.second);
+
+        vector<uint8_t> const SEQ1 = readReference(ref, pos.first, rev);
+        vector<uint8_t> const SEQ2 = readReference(ref, pos.second, !rev);
+        vector<uint8_t> const QUAL1 = randomQuality();
+        vector<uint8_t> const QUAL2 = randomQuality();
+        uint64_t const name = scramble(++serialNo);
+        
+        printFastQ(name, SEQ1, SEQ2, QUAL1, QUAL2);
+        printSAM(cout, name, 1, rev, false, pos.first, 0, 0, false, pos.second, SEQ1, QUAL1);
+        printSAM(cout, name, 2, !rev, false, pos.second, 0, 0, false, pos.first, SEQ2, QUAL2);
+        
+        coverage += 2 * settings->readLength;
+
+        for ( ; ; ) {
+            pair<unsigned, unsigned> const pos = make_read_pair(ipd.second);
+            bool const rev = pos.first > pos.second;
+
+            if (isOverCovered(ref, pos.first) || isOverCovered(ref, pos.second))
+                break;
+            
+            int left1, right1;
+            covered(ref, pos.first, left1, right1);
+            if (right1 <= left1 || (right1 - left1) * 2 < settings->readLength)
+                break;
+
+            int left2, right2;
+            covered(ref, pos.second, left2, right2);
+            if (right2 <= left2 || (right2 - left2) * 2 < settings->readLength)
+                break;
+            
+            copyReference(ref, pos.first, SEQ1, rev);
+            copyReference(ref, pos.second, SEQ2, !rev);
+
+            printSAM(cout, name, 1, rev, true, pos.first, left1, settings->readLength - right1, false, pos.second, SEQ1, QUAL1);
+            printSAM(cout, name, 2, !rev, true, pos.second, left2, settings->readLength - right2, false, pos.first, SEQ2, QUAL2);
+
+            coverage += 2 * settings->readLength;
+            break;
+        }
+
+        if (double(coverage)/double(ref.size()) > settings->coverageTarget)
+            break;
+    }
+
+    printReference(ref);
+    return 0;
+}
+
+static string getProgName(string const &argv0)
+{
+    string::size_type const sep = argv0.find_last_of('/');
+    if (sep == string::npos)
+        return argv0;
+    return argv0.substr(sep + 1);
+}
+
+static string command_line(string const &progname, int argc, char *argv[])
+{
+    ostringstream oss;
+    
+    oss << progname;
+    while (++argv, --argc) {
+        oss << ' ' << *argv;
+    }
+    return oss.str();
+}
+
+static void usage(string const &progname, bool error)
+{
+    cerr << "Usage: " << progname;
+    for (int i = 0; i < Settings::paramNames().size(); ++i) {
+        cout << " [" << Settings::paramNames()[i] << "=<" << Settings::paramTypes()[i] << ">]";
+    }
+    cout << endl;
+    exit(error ? EXIT_FAILURE : EXIT_SUCCESS);
+}
+
+static map<string, string> loadArgs(int argc, char *argv[], string const &progname)
+{
+    map<string, string> args;
+
+    while (++argv, --argc) {
+        string const arg(*argv);
+        bool found = false;
+        
+        if (arg == "--help" || arg == "-h" || arg == "-?")
+            usage(progname, false);
+        
+        for (vector<string>::const_iterator i = Settings::paramNames().begin(); i != Settings::paramNames().end(); ++i) {
+            if (arg.substr(0, i->length() + 1) == *i + "=") {
+                args[*i] = arg.substr(i->length() + 1);
+                found = true;
+                break;
+            }
+        }
+        if (!found) {
+            cerr << "Error: unknown parameter: '" << arg << "'" << endl;
+            usage(progname, true);
+        }
+    }
+    return args;
+}
+
+int main(int argc, char *argv[])
+{
+    string const progname = getProgName(argv[0]);
+    string const CL = command_line(progname, argc, argv);
+    map<string, string> args = loadArgs(argc, argv, progname);
+    
+    // set defaults
+    (void)args.insert(make_pair("refname", "R"));
+    (void)args.insert(make_pair("fastq", progname + ".fastq"));
+    (void)args.insert(make_pair("coverage", "30"));
+    (void)args.insert(make_pair("length", "500000"));
+    
+    try {
+        settings = new Settings(args);
+    }
+    catch (logic_error const &e) {
+        cerr << "Error: " << e.what() << endl;
+        usage(progname, true);
+    }
+
+    cout << "@HD\tVN:1.0\tSO:queryname" << endl;
+    cout << "@SQ\tSN:" << args["refname"] << "\tLN:" << args["length"] << "\tUR:" << args["refname"] << ".fasta" << endl;
+    cout << "@PG\tID:1\tPN:" << progname << "\tCL:" << CL << endl;
+    cout << "@CO\targuments: { ";
+    for (map<string, string>::const_iterator i = args.begin(); i != args.end(); ++i) {
+        cout << i->first << "=" << i->second << "; ";
+    }
+    cout << "}" << endl;
+    
+    srandom((unsigned long)(time(0)));
+    return run();
+}
diff --git a/tools/util/rcexplain.c b/tools/util/rcexplain.c
new file mode 100644
index 0000000..a96be94
--- /dev/null
+++ b/tools/util/rcexplain.c
@@ -0,0 +1,127 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <klib/rc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+
+
+/*--------------------------------------------------------------------------
+ * KMain
+ *  invoked by platform specific "main" entrypoint
+ */
+const char UsageDefaultName[] = "rcexplain";
+
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s [Options] rc [rc ...]\n"
+                    "\n"
+                    "Summary:\n"
+                    "  Prints out error string to stdout for one or more return codes.\n",
+                    progname);
+}
+
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+
+    UsageSummary (progname);
+
+    KOutMsg ("Options:\n");
+
+    HelpOptionsStandard();
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    rc_t rc = 0;
+    Args * args;
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 0);
+    if (rc == 0)
+    {
+        do
+        {
+            uint32_t pcount;
+
+            rc = ArgsParamCount (args, &pcount);
+            if (rc)
+                break;
+            
+            if (pcount == 0) {
+                MiniUsage(args);
+                rc = RC(rcExe, rcNoTarg, rcAllocating, rcParam, rcInvalid);
+            }
+            else
+            {
+                const char * pc;
+                rc_t exp;
+                uint32_t ix;
+
+                /* over rule any set log level */
+                rc = KLogLevelSet (klogInfo);
+
+                for (ix = 0; ix < pcount; ++ix)
+                {
+                    rc = ArgsParamValue (args, ix, (const void **)&pc);
+                    if (rc)
+                        break;
+
+                    exp = AsciiToU32 (pc, NULL, NULL);
+                    rc = LOGERR (klogInfo, exp, pc);
+                }
+            }
+
+        } while (0);
+
+        ArgsWhack (args);
+    }
+    return rc;
+}
diff --git a/tools/util/rowwritetest.c b/tools/util/rowwritetest.c
new file mode 100644
index 0000000..b791fa2
--- /dev/null
+++ b/tools/util/rowwritetest.c
@@ -0,0 +1,433 @@
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <klib/rc.h>
+#include <string.h> /* memset */
+#include <stdio.h>  /* printf */
+#include <stdlib.h> /* malloc */
+#include <assert.h>
+#include <os-native.h>
+
+#define OPTION_TABLE "table-path"
+#define OPTION_ROW   "row-count"
+#define ALIAS_TABLE  "t"
+#define ALIAS_ROW    "r"
+
+static char buff [81];
+static const char * table_usage[] = { "Table path.  Defaults to", buff, NULL };
+static const char * row_usage[]   = { buff, NULL };
+OptDef MyOptions[] =
+{
+    { OPTION_TABLE, ALIAS_TABLE, NULL, table_usage, 1, true, false },
+    { OPTION_ROW,   ALIAS_ROW,   NULL, row_usage,   1, true, false }
+};
+
+#define COLUMNS 5
+#define ROWLEN 64
+#define ROWS 0x400000
+
+
+char tablePath[512];
+
+
+const char UsageDefaultName[] = "rowwritetest";
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s [-t|--table-path <path>] [-r|--row-count <rows>]\n"
+                    "\n", progname);
+}
+
+
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+
+    UsageSummary (progname);
+
+    OUTMSG (("Options:\n"));
+
+    rc = string_printf (buff, sizeof buff, NULL, "%s", tablePath);
+
+    HelpOptionLine (ALIAS_TABLE, OPTION_TABLE, "path", table_usage);
+
+    rc = string_printf (buff, sizeof buff, NULL, "Number of Rows.  Defaults to %u", ROWS);
+
+    HelpOptionLine (ALIAS_ROW, OPTION_ROW, "row", row_usage);
+
+    HelpOptionsStandard ();
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+#define BUFFERS 3
+
+rc_t run (const char * table_path, uint64_t N )
+{
+    static const char *colInf[] = {
+        "C1: Same value, same length",
+        "C2: Var. value, same length",
+        "C3: Var. value, var. legnth",
+        "C4: Same value except I row",
+        "C5: Same value except L row" };
+    rc_t rc;
+    uint64_t row = 0;
+    VDBManager *mgr = NULL;
+    VSchema *schema = NULL;
+    VTable *table = NULL;
+    VCursor *cursor;
+    uint32_t idx[COLUMNS];
+    uint64_t total[COLUMNS];
+    int i = 0, j = 0, prev = 0;
+    char *buffer[BUFFERS];
+    
+
+
+
+    /* Initialize arrays */
+    memset(&idx, 0, sizeof idx);
+    memset(&total, 0, sizeof total);
+    for (i = 0; i < BUFFERS; ++i) {
+        char c;
+        size_t sz = ROWLEN + 1;
+        if (i == (BUFFERS - 1))
+            sz += ROWLEN;
+        buffer[i] = malloc(sz);
+        for (j = 0, c = 0; j < sz - 1; ++j, ++c) {
+            if (c >= ROWLEN)
+                c -= ROWLEN;
+            buffer[i][j] = '0' + c;
+        }
+        buffer[i][j] = '\0';
+    }
+    /* Create manager */
+    rc = VDBManagerMakeUpdate(&mgr, NULL);
+    if (rc != 0) {
+        LOGERR(klogInt, rc, "failed to open vdb library");
+    }
+    /* Initialize schema */
+    if (rc == 0) {
+        rc = VDBManagerMakeSchema(mgr, &schema);
+        if (rc != 0)
+            LOGERR(klogInt, rc, "failed to create empty schema");
+    }
+    if (rc == 0) {
+        char text[512] = "table Table #1 {\n";
+        char col [128];
+        for (i = 1; i <=  COLUMNS; ++i) {
+            sprintf(col,
+                "  column ascii C%d = .C%d; physical ascii .C%d = C%d;\n",
+                i, i, i, i);
+            strcat(text, col);
+        }
+        strcat(text, "};");
+        STSMSG(1,("Parsing schema:\n%s", text));
+        rc = VSchemaParseText(schema, "Schema", text, strlen(text));
+        if (rc != 0)
+            LOGERR(klogInt, rc, "failed to parse schema");
+    }
+    /* Create table */
+    if (rc == 0) {
+        STSMSG(1,("Creating %s", tablePath));
+        rc = VDBManagerCreateTable(mgr, &table, schema, "Table", kcmInit,
+            tablePath);
+        if (rc != 0)
+            LOGERR(klogInt, rc, "failed to create table");
+    }
+    /* Initialize cursor */
+    if (rc == 0) {
+        rc = VTableCreateCursorWrite(table, &cursor, kcmInsert);
+        if (rc != 0)
+            LOGERR(klogInt, rc, "failed to create cursor");
+    }
+    for (i = 0; rc == 0 && i < COLUMNS; ++i) {
+        char col[3];
+        sprintf(col, "C%d", i + 1);
+        STSMSG(2,("Adding column %s to cursor", col));
+        rc = VCursorAddColumn(cursor, &idx[i], "%s", col);
+        if (rc != 0)
+            PLOGERR(klogInt, (klogInt, rc,
+                              "failed to add $(c) to cursor", "c=%s", col));
+    }
+    if (rc == 0) {
+        rc = VCursorOpen(cursor);
+        if (rc != 0)
+            LOGERR(klogInt, rc, "failed to open cursor");
+    }
+    /* Write data */
+    for (row = 0; row < N && rc == 0; ++row) {
+        int max = 2 * ROWLEN - 1;
+        int sz = 0;
+        if ((row % 2) == 0) {
+            int min = 1;
+            sz = min + (int) (max * (rand() / (RAND_MAX + 1.0)));
+            prev = sz;
+            buffer[1][0] = '1';
+        }
+        else {
+            sz = max + 1 - prev;
+            buffer[1][0] = '2';
+        }
+        rc = Quitting();
+        if (rc == 0) {
+            KStsLevel lvl = 2;
+            if (row > 0 && ((row % ROWS) == 0)) {
+                lvl = 1;
+            }
+            STSMSG (lvl, ("Writing row %ji / %ji",
+                          row + 1, N));
+            rc = VCursorOpenRow(cursor);
+            if (rc != 0)
+                LOGERR(klogInt, rc, "failed to open row");
+        }
+        for (j = 0; j < COLUMNS && rc == 0; ++j) {
+            uint32_t count = 0;
+            int buf = j;
+            switch (j) {
+                case 0:
+                case 1:
+                    count = strlen(buffer[j]);
+                    break;
+                case 2:
+                    count = sz;
+                    break;
+                case 3:
+                    buf = 0;
+                    if (row == 0)
+                        buf = 1;
+                    count = strlen(buffer[buf]);
+                    break;
+                case 4:
+                    buf = 0;
+                    if (row == (N - 1))
+                        buf = 1;
+                    count = strlen(buffer[buf]);
+                    break;
+                default:
+                    assert(0);
+                    break;
+            }
+            STSMSG (3, ("Row %ji/Col.%d: %sd %.*s\n",
+                        row + 1, j + 1, count, count, buffer[buf]));
+            rc = VCursorWrite
+                (cursor, idx[j], 8, buffer[buf], 0, count);
+            if (rc != 0)
+                PLOGERR(klogInt, (klogInt, rc, "failed to write row[$i]", "i=%d", j + 1));
+            total[j] += count;
+        }
+        if (rc == 0) {
+            rc = VCursorCommitRow(cursor);
+            if (rc != 0)
+                LOGERR(klogInt, rc, "failed to commit row");
+        }
+        if (rc == 0) {
+            rc = VCursorCloseRow(cursor);
+            if (rc != 0)
+                LOGERR(klogInt, rc, "failed to close row");
+        }
+    }
+    if (rc == 0) {
+        STSMSG (1, ("Commiting cursor\n"));
+        rc = VCursorCommit(cursor);
+        if (rc != 0)
+            LOGERR(klogInt, rc, "failed to commit cursor");
+    }
+    /* Cleanup */
+    VCursorRelease(cursor);
+    VTableRelease(table);
+    VSchemaRelease(schema);
+    VDBManagerRelease(mgr);
+    for (i = 0; i < BUFFERS; ++i) {
+        free(buffer[i]);
+    }
+    /* Log */
+    if (rc == 0) {
+        PLOGMSG(klogInfo, (klogInfo, "$(t)", "t=%s", tablePath));
+        PLOGMSG(klogInfo,(klogInfo, 
+            "$(n)($(N)) rows written - $(b) bytes per row",
+                          PLOG_I64(n) "," PLOG_X64(N) ",b=%d", N, N, ROWLEN));
+        for (i = 0; i < COLUMNS; ++i) {
+            PLOGMSG(klogInfo,(klogInfo, 
+                              "$(i): $(n)($(N)) bytes",
+                              "i=%s," PLOG_I64(n) "," PLOG_X64(N),
+                              colInf[i], total[i], total[i]));
+        }
+    }
+    if (rc == 0) {
+        KDirectory *dir = NULL;
+        uint64_t sizes[COLUMNS];
+        memset(&sizes, 0, sizeof sizes);
+        rc = KDirectoryNativeDir(&dir);
+        if (rc != 0)
+            LOGERR(klogInt, rc, "failed to KDirectoryNativeDir");
+        else {
+            for (i = 1; i <= COLUMNS; ++i) {
+                uint64_t size = 0;
+#define  FORMAT    "%s/col/%s/data"
+#define KFORMAT "$(d)/col/$(n)/data", "d=%s,n=%s"
+#define  STATUS(action) (action FORMAT, tablePath, name)
+                char name[3];
+
+                sprintf(name, "C%d", i);
+                STSMSG (1, STATUS("checking "));
+                rc = KDirectoryFileSize(dir, &size, FORMAT, tablePath, "%s", name);
+                if (rc != 0) {
+                    if (GetRCState(rc) == rcNotFound) {
+                        STSMSG (2, STATUS("not found "));
+                        rc = 0;
+                    }
+                    else
+                        PLOGERR(klogInt, (klogInt, rc,
+                                          "failed to check " KFORMAT, tablePath, name));
+                }
+                else {
+                    STSMSG (2, STATUS("found "));
+                }
+                PLOGMSG(klogInfo, (klogInfo, "Size of $(d)/col/$(n)/data = $(s)",
+                                   "d=%s,n=%s," PLOG_I64(s), tablePath, name, size));
+                sizes[i - 1] = size;
+            }
+        }
+        KDirectoryRelease(dir);
+        if (rc == 0) {
+            puts("");
+            KOutMsg("%ld rows, %d bytes per row:\n", N, ROWLEN);
+            for (i = 0; i < COLUMNS; ++i) {
+                puts(colInf[i]);
+            }
+            puts("");
+            for (i = 0; i < COLUMNS; ++i) {
+                int64_t over = sizes[i] - total[i];
+                KOutMsg("C%d: %9ld bytes written; "
+                    "%9ld in 'data'", i + 1, total[i], sizes[i]);
+                if (over > 0) {
+                    double p = 100.0 * over / sizes[i];
+                    printf(": %7ld extra bytes (%.4f%%)\n", over, p);
+                }
+                else {
+                    puts("");
+                }
+            }
+        }
+    }
+
+    return rc;
+}
+
+
+
+
+rc_t CC KMain ( int argc, char *argv[] )
+{
+    rc_t rc = 0;
+    Args * args;
+
+    rc = ArgsMakeStandardOptions (&args);
+    if (rc == 0)
+    {
+        do
+        {
+            uint32_t pcount;
+
+            rc = ArgsAddOptionArray (args, MyOptions, sizeof MyOptions / sizeof (OptDef));
+            if (rc)
+                break;
+
+            rc = ArgsParse (args, argc, argv);
+            if (rc)
+                break;
+
+            /* quirky way default path is generated means this comes
+             * before standard argument handling */
+            rc = ArgsOptionCount (args, OPTION_TABLE, &pcount);
+            if (rc)
+                break;
+
+            if (pcount == 0)
+            {
+                static char * default_name = "RowWriteTestOutTable";
+                char * user;
+
+                user = getenv ("USER");
+
+                if (user)
+                    snprintf (tablePath, sizeof (tablePath),
+                              "/home/%s/%s", user, default_name);
+                else
+                    strncpy (tablePath, default_name, sizeof (tablePath));
+            }
+            else
+            {
+                const char * pc;
+
+                ArgsOptionValue (args, OPTION_TABLE, 0, (const void **)&pc);
+                strncpy (tablePath, pc, sizeof (tablePath));
+            }
+
+            rc = ArgsHandleStandardOptions (args);
+            if (rc)
+                break;
+
+            rc = ArgsParamCount (args, &pcount);
+            if (rc)
+                break;
+            
+            if (pcount)
+            {
+                const char * pc;
+
+                rc = ArgsArgvValue (args, 0, &pc);
+                if (rc)
+                    break;
+
+                rc = RC (rcExe, rcNoTarg, rcParsing, rcParam, rcExcessive);
+              
+                PLOGERR (klogFatal, (klogFatal, rc, "$(P) takes no parameters", PLOG_S(P), pc));
+                break;
+            }
+
+            rc = ArgsOptionCount (args, OPTION_ROW, &pcount);
+            if (rc == 0)
+            {
+                uint64_t row_count;
+
+                if (pcount)
+                {
+                    const char * pc;
+
+                    rc = ArgsOptionValue (args, OPTION_ROW, 0, (const void **)&pc);
+                    if (rc)
+                        break;
+
+                    row_count = AsciiToU32 (pc, NULL, NULL);
+                }
+                else
+                    row_count = ROWS;
+
+                rc = run (tablePath, row_count);
+            }
+        } while (0);
+
+        ArgsWhack (args);
+    }
+    return rc;
+}
diff --git a/tools/util/samview.c b/tools/util/samview.c
new file mode 100644
index 0000000..ffbd0dd
--- /dev/null
+++ b/tools/util/samview.c
@@ -0,0 +1,80 @@
+/* ===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <kapp/args.h>
+#include <kapp/main.h>
+#include <klib/log.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <align/bam.h>
+
+static
+void samview(char const file[])
+{
+    char buffer[64*1024];
+    BAMFile const *bam;
+    rc_t rc = BAMFileMake(&bam, file);
+
+    if (rc == 0) {
+        char const *header;
+        size_t hsize;
+        BAMAlignment const *rec;
+
+        BAMFileGetHeaderText(bam, &header, &hsize);
+        fwrite(header, 1, hsize, stdout);
+
+        while ((rc = BAMFileRead2(bam, &rec)) == 0) {
+            size_t actsize = 0;
+
+            if (BAMAlignmentFormatSAM(rec, &actsize, sizeof(buffer), buffer) != 0)
+	        break;
+            fwrite(buffer, 1, actsize, stdout);
+            BAMAlignmentRelease(rec);
+        }
+        BAMFileRelease(bam);
+    }
+    LOGERR(klogWarn, rc, "Final RC");
+}
+
+rc_t CC UsageSummary(char const *name)
+{
+    return 0;
+}
+
+rc_t CC Usage(Args const *args)
+{
+    return 0;
+}
+
+rc_t CC KMain(int argc, char *argv[])
+{
+    while (--argc) {
+        samview(*++argv);
+    }
+    return 0;
+}
diff --git a/tools/util/schema-replace.c b/tools/util/schema-replace.c
new file mode 100644
index 0000000..b2a7b73
--- /dev/null
+++ b/tools/util/schema-replace.c
@@ -0,0 +1,379 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/database.h>
+#include <vdb/vdb-priv.h>
+#include <kdb/manager.h>
+#include <kdb/database.h>
+#include <kdb/table.h>
+#include <kdb/meta.h>
+#include <kfs/directory.h>
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/out.h>
+#include <klib/text.h>
+#include <klib/rc.h>
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#define OPTION_SCHEMA         "schema"
+#define OPTION_DB_TYPE        "db_type"
+#define OPTION_TAB_TYPE       "tab_type"
+#define OPTION_TAB_NAME       "tab_name"
+
+#define ALIAS_SCHEMA          "s"
+#define ALIAS_DB_TYPE         "d"
+#define ALIAS_TAB_TYPE        "t"
+#define ALIAS_TAB_NAME        "n"
+
+static const char * schema_usage[] = { "path to file, that contains new schema", NULL };
+static const char * db_type_usage[] = { "string, specifies the type of the database", NULL };
+static const char * tab_type_usage[] = { "string, specifies the type of the selected table", NULL };
+static const char * tab_name_usage[] = { "string, specifies the name of the table to be processed", NULL };
+
+OptDef SchemaUpOptions[] =
+{
+    { OPTION_SCHEMA, ALIAS_SCHEMA, NULL, schema_usage, 1, true, true },
+    { OPTION_DB_TYPE, ALIAS_DB_TYPE, NULL, db_type_usage, 1, true, true },
+    { OPTION_TAB_TYPE, ALIAS_TAB_TYPE, NULL, tab_type_usage, 1, true, true },
+    { OPTION_TAB_NAME, ALIAS_TAB_NAME, NULL, tab_name_usage, 1, true, true }
+};
+
+const char UsageDefaultName[] = "schema-update";
+
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s <path> [options]\n"
+                    "\n", progname);
+}
+
+
+rc_t CC Usage( const Args * args  )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if ( args == NULL )
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+        rc = ArgsProgram( args, &fullpath, &progname );
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary( progname );
+
+    KOutMsg ("Options:\n");
+
+    HelpOptionLine ( ALIAS_SCHEMA, OPTION_SCHEMA, NULL, schema_usage );
+    HelpOptionLine ( ALIAS_DB_TYPE, OPTION_DB_TYPE, NULL, db_type_usage );
+    HelpOptionLine ( ALIAS_TAB_TYPE, OPTION_TAB_TYPE, NULL, tab_type_usage );
+    HelpOptionLine ( ALIAS_TAB_NAME, OPTION_TAB_NAME, NULL, tab_name_usage );
+
+    HelpOptionsStandard();
+
+    HelpVersion( fullpath, KAppVersion() );
+    return rc;
+}
+
+static const char* get_str_option( const Args *my_args,
+                                   const char *name )
+{
+    const char* res = NULL;
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( my_args, name, &count );
+    if ( ( rc == 0 )&&( count > 0 ) )
+    {
+        rc = ArgsOptionValue( my_args, name, 0, (const void **)&res );
+    }
+    return res;
+}
+
+
+typedef struct ctx
+{
+    VDBManager * vdb_mgr;
+    KDBManager * kdb_mgr;
+    VSchema *schema;
+
+    const char *db_type;
+    const char *tab_type;
+    const char *tab_name;
+
+    char * db_schema_buff;
+    size_t db_schema_len;
+    char * tab_schema_buff;
+    size_t tab_schema_len;
+} ctx;
+typedef ctx* p_ctx;
+
+
+static rc_t write_schema( KMetadata *meta, const char * schema_dump, size_t schema_len )
+{
+    KMDataNode *schema_node;
+    rc_t rc = KMetadataOpenNodeUpdate ( meta, &schema_node, "schema" );
+    if ( rc == 0 )
+    {
+        rc = KMDataNodeWrite ( schema_node, schema_dump, schema_len );
+        KMDataNodeRelease ( schema_node );
+    }
+    else
+        OUTMSG(( "error KMetadataOpenNodeUpdate: %R\n", rc ));
+    return rc;
+}
+
+
+static rc_t process_csra( p_ctx ctx, const char *csra )
+{
+    KDatabase *this_kdb;
+    rc_t rc = KDBManagerOpenDBUpdate ( ctx->kdb_mgr, &this_kdb, "%s", csra );
+    if ( rc == 0 )
+    {
+        /* do it for the whole database ... */
+        KMetadata *meta;
+        KTable *this_tab;
+
+        rc = KDatabaseOpenMetadataUpdate ( this_kdb, &meta );
+        if ( rc == 0 )
+        {
+            rc = write_schema( meta, ctx->db_schema_buff, ctx->db_schema_len );
+            KMetadataRelease ( meta );
+        }
+        else
+            OUTMSG(( "error KDatabaseOpenMetadataUpdate: %R\n", rc ));
+
+        /* do it for the selected table ... */
+        if ( rc == 0 )
+        {
+            rc = KDatabaseOpenTableUpdate ( this_kdb, &this_tab, "%s", ctx->tab_name );
+            if ( rc == 0 )
+            {
+                rc = KTableOpenMetadataUpdate ( this_tab, &meta );
+                if ( rc == 0 )
+                {
+                    rc = write_schema( meta, ctx->tab_schema_buff, ctx->tab_schema_len );
+                    KMetadataRelease ( meta );
+                }
+                else
+                    OUTMSG(( "error KTableOpenMetadataUpdate: %R\n", rc ));
+            }
+            else
+                OUTMSG(( "error KDatabaseOpenTableUpdate: %R\n", rc ));
+        }
+
+        KDatabaseRelease ( this_kdb );
+    }
+        else OUTMSG(( "error KDBManagerOpenDBUpdate: %R\n", rc ));
+    return rc;
+}
+
+
+static rc_t process_files( p_ctx ctx, Args * args )
+{
+    uint32_t count;
+    rc_t rc = ArgsParamCount( args, &count );
+    if ( rc == 0 )
+    {
+        uint32_t idx;
+        for ( idx = 0; idx < count && rc == 0; ++idx )
+        {
+            const char *csra = NULL;
+            rc = ArgsParamValue( args, idx, (const void **)&csra );
+            if ( rc == 0 )
+            {
+                OUTMSG(( "\nprocessing: %s\n", csra ));
+                rc = process_csra( ctx, csra );
+                if ( rc == 0 )
+                    OUTMSG(( "processed: %s\n", csra ));
+            }
+        }
+    }
+/*
+    if ( ctx->db_schema_buff != NULL )
+        OUTMSG(( "%s\n", ctx->db_schema_buff ));
+    if ( ctx->tab_schema_buff != NULL )
+        OUTMSG(( "%s\n", ctx->tab_schema_buff ));
+*/
+    return rc;
+}
+
+
+typedef struct dump_ctx
+{
+    char *buffer;
+    size_t len;
+    size_t size;
+} dump_ctx;
+typedef dump_ctx* p_dump_ctx;
+
+
+static rc_t CC schema_dump_flush( void *dst, const void *buffer, size_t bsize )
+{
+    rc_t rc = -1;
+    p_dump_ctx ctx = dst;
+    if ( ctx->buffer == NULL )
+    {
+        ctx->size = bsize + 1;
+        ctx->buffer = malloc( ctx->size );
+        if ( ctx->buffer != NULL )
+        {
+            memcpy ( ctx->buffer, buffer, bsize );
+            ctx->len = bsize;
+            rc = 0;
+        }
+    }
+    else
+    {
+        ctx->size += bsize;
+        ctx->buffer = realloc( ctx->buffer, ctx->size );
+        if ( ctx->buffer != NULL )
+        {
+            memcpy ( &(ctx->buffer[ctx->len]), buffer, bsize );
+            ctx->len += bsize;
+            rc = 0;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t predump_schema( VSchema *schema, const char * type,
+                            char **buffer, size_t *len )
+{
+    rc_t rc;
+    dump_ctx ctx;
+    ctx.buffer = NULL;
+    ctx.len = 0;
+    ctx.size = 0;
+
+    *buffer = NULL;
+    *len = 0;
+    rc = VSchemaDump( schema, sdmCompact, type, schema_dump_flush, &ctx );
+    if ( rc == 0 )
+    {
+        if ( ctx.buffer != NULL )
+        {
+            ctx.buffer[ ctx.len ] = 0;
+            *buffer = ctx.buffer;
+            *len = ctx.len;
+        }
+    }
+    else
+    {
+        if ( ctx.buffer != NULL )
+            free( ctx.buffer );
+    }
+    return rc;
+}
+
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args * args;
+
+    rc_t rc = ArgsMakeAndHandle ( &args, argc, argv, 1,
+            SchemaUpOptions, sizeof SchemaUpOptions / sizeof SchemaUpOptions [ 0 ] );
+    if ( rc == 0 )
+    {
+        ctx ctx;
+        const char * schema_name = get_str_option( args, OPTION_SCHEMA );
+        ctx.db_type = get_str_option( args, OPTION_DB_TYPE );
+        ctx.tab_type = get_str_option( args, OPTION_TAB_TYPE );
+        ctx.tab_name = get_str_option( args, OPTION_TAB_NAME );
+
+        if ( schema_name != NULL && ctx.db_type != NULL &&
+             ctx.tab_type != NULL && ctx.tab_name )
+        {
+            KDirectory * directory;
+            OUTMSG(( "schema   : %s\n", schema_name ));
+            OUTMSG(( "db-type  : %s\n", ctx.db_type ));
+            OUTMSG(( "tab-type : %s\n", ctx.tab_type ));
+            OUTMSG(( "tab-name : %s\n", ctx.tab_name ));
+
+            rc = KDirectoryNativeDir( &directory );
+            if ( rc == 0 )
+            {
+                rc = VDBManagerMakeUpdate ( &ctx.vdb_mgr, directory );
+                if ( rc == 0 )
+                {
+                    rc = VDBManagerOpenKDBManagerUpdate ( ctx.vdb_mgr, &ctx.kdb_mgr );
+                    if ( rc ==  0 )
+                    {
+                        rc = VDBManagerMakeSchema( ctx.vdb_mgr, &ctx.schema );
+                        if ( rc == 0 )
+                        {
+                            rc = VSchemaParseFile( ctx.schema, "%s", schema_name );
+                            if ( rc == 0 )
+                            {
+                                rc = predump_schema( ctx.schema, ctx.db_type, 
+                                        &ctx.db_schema_buff, &ctx.db_schema_len );
+                                if ( rc == 0 )
+                                {
+                                    rc = predump_schema( ctx.schema, ctx.tab_type, 
+                                        &ctx.tab_schema_buff, &ctx.tab_schema_len );
+                                    if ( rc == 0 )
+                                    {
+                                        rc = process_files( &ctx, args );
+                                        free( ctx.tab_schema_buff );
+                                    }
+                                    free( ctx.db_schema_buff );
+                                }
+                            }
+                            else
+                                OUTMSG(( "error VSchemaParseFile %R\n", rc ));
+                            VSchemaRelease( ctx.schema );
+                        }
+                        else
+                            OUTMSG(( "error VDBManagerMakeSchema %R\n", rc ));
+                     }
+                    else
+                        OUTMSG(( "error VDBManagerOpenKDBManagerUpdate %R\n", rc ));
+                    VDBManagerRelease( ctx.vdb_mgr );
+                }
+                else
+                    OUTMSG(( "error VDBManagerMakeUpdate %R\n", rc ));
+                KDirectoryRelease( directory );
+            }
+            else
+                OUTMSG(( "error KDirectoryNativeDir %R\n", rc ));
+        }
+        else
+            OUTMSG(( "error obtaining arguments\n" ));
+        ArgsWhack( args );
+    }
+    return rc;
+}
+
diff --git a/tools/util/sortreadtest.c b/tools/util/sortreadtest.c
new file mode 100644
index 0000000..4fa9569
--- /dev/null
+++ b/tools/util/sortreadtest.c
@@ -0,0 +1,351 @@
+#include <kapp/main.h>
+#include <kapp/args.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/mmap.h>
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <klib/rc.h>
+#include <klib/text.h>
+
+#include <assert.h>
+#include <os-native.h>
+
+
+/*
+
+  default file is "ncbi/seq.vschema"
+  default table-spec "NCBI:tbl:base_space#2"
+
+*/
+#define SCHEMASPEC "ncbi/seq.vschema"
+#define TYPESPEC "NCBI:tbl:base_space#2"
+
+const char UsageDefaultName[] = "sortreadtest";
+
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s [OPTIONS] file-path table-path [schema-path]\n"
+                    "\n"
+                    "Summary:\n"
+                    "  Write lines from file as rows to table using schema\n"
+                    "\n", progname);
+}
+
+
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+
+    UsageSummary (progname);
+
+    OUTMSG (("Options:\n"));
+
+    HelpOptionsStandard ();
+
+    return rc;
+}
+
+typedef struct param_block
+{
+    const char * file_path;
+    const char * table_path;
+    const char * schema_path;
+
+    KDirectory * pwd;
+    const KFile * file;
+    const KMMap * mmap;
+    VDBManager * mgr;
+    VSchema * schema;
+    VTable * table;
+    VCursor * cursor;
+
+    const char * seq;
+    const char * eof;
+    size_t seq_size;
+
+
+    uint32_t    idx; /* column idx in the cursor for READ (should be 0 */
+
+}  param_block;
+
+rc_t get_a_sequence (param_block * pb)
+{
+    char * eol;
+    rc_t rc = 0;
+    if (pb->seq == NULL)        /* first call */
+    {
+        const void * annoying;
+        uint64_t file_pos;
+        size_t map_size;
+        uint64_t file_size;
+
+        rc = KFileSize (pb->file, &file_size);
+        if (rc)
+            return rc;
+
+        rc = KMMapAddrRead (pb->mmap, &annoying);
+        if (rc)
+            return rc;
+
+        pb->seq = annoying;
+
+        if (pb->seq == NULL)
+            return 0;
+
+        rc = KMMapPosition (pb->mmap, &file_pos);
+        if (rc)
+            return rc;
+
+        if (file_pos != 0)
+        {
+            rc = RC (rcExe, rcMemMap, rcAccessing, rcOffset, rcInvalid);
+            return rc;
+        }
+
+        rc = KMMapSize (pb->mmap, &map_size);
+        if (rc)
+            return rc;
+
+        if (map_size != file_size)
+        {
+            rc = RC (rcExe, rcMemMap, rcAccessing, rcFile, rcInvalid);
+            return rc;
+        }
+        pb->eof = pb->seq + map_size;
+    }
+    else
+    {
+        pb->seq += pb->seq_size + 1;
+
+        if (pb->seq >= pb->eof)
+        {
+            pb->seq = NULL;
+            return 0;
+        }
+    }
+
+    eol = string_chr (pb->seq, pb->eof - pb->seq, '\n');
+    if (eol == NULL)
+        pb->seq_size = pb->eof - pb->seq;
+    else
+        pb->seq_size = eol - pb->seq;
+
+    return rc;
+}
+
+
+rc_t write_rows (param_block * pb)
+{
+    rc_t rc = 0;
+
+    pb->seq = NULL;
+
+    do
+    {
+        rc = get_a_sequence (pb);
+        if (rc)
+        {
+            LOGERR (klogFatal, rc, "Failed to read a sequence");
+        }
+        else
+        {
+            if (pb->seq == NULL)
+                break;
+            rc = VCursorOpenRow (pb->cursor);
+            if (rc)
+            {
+                LOGERR (klogFatal, rc, "Failed to open row");
+                break;
+            }
+            else
+            {
+                rc_t rc2;
+                rc = VCursorWrite (pb->cursor, pb->idx, 8, pb->seq, 0, pb->seq_size);
+                if (rc)
+                    LOGERR (klogFatal, rc, "Failed to write row");
+                else
+                    rc = VCursorCommitRow (pb->cursor);
+                rc2 = VCursorCloseRow (pb->cursor);
+                if (rc == 0)
+                    rc = rc2;
+            }
+        }
+    } while (rc == 0);
+    
+    return rc;
+}
+
+
+rc_t open (param_block * pb)
+{
+    rc_t rc;
+
+    rc = KDirectoryNativeDir (&pb->pwd);
+    if (rc)
+        LOGERR (klogFatal, rc, "Failed to open file system");
+    else
+    {
+        rc = KDirectoryOpenFileRead (pb->pwd, &pb->file, "%s", pb->file_path);
+        if (rc)
+            LOGERR (klogFatal, rc, "Failed to open input file");
+        else
+        {
+            rc = KMMapMakeRead (&pb->mmap, pb->file);
+            if (rc)
+                LOGERR (klogFatal, rc, "unable to map file");
+            else
+            {
+                rc = VDBManagerMakeUpdate (&pb->mgr, pb->pwd);
+                if (rc)
+                    LOGERR (klogFatal, rc, "Failed to open DB Manager");
+                else
+                {
+                    rc = VDBManagerMakeSchema (pb->mgr, &pb->schema);
+                    if (rc)
+                        LOGERR (klogFatal, rc, "Failed to create a schema object");
+                    else
+                    {
+                        VSchemaAddIncludePath (pb->schema, "interfaces");
+
+                        rc = VSchemaParseFile (pb->schema, "%s", pb->schema_path);
+                        if (rc)
+                            LOGERR (klogFatal, rc, "Failed to parse schema");
+                        else
+                        {
+                            rc = VDBManagerCreateTable (pb->mgr, &pb->table, pb->schema,
+                                                        TYPESPEC, kcmCreate, "%s", pb->table_path);
+                            if (rc)
+                                LOGERR (klogFatal, rc, "Failed to create table");
+                            else
+                            {
+                                rc = VTableCreateCursorWrite (pb->table, &pb->cursor, kcmCreate);
+                                if (rc)
+                                    LOGERR (klogFatal, rc, "Failed to create cursor");
+                                else
+                                {
+                                    rc = VCursorAddColumn (pb->cursor, &pb->idx, "READ");
+                                    if (rc)
+                                        LOGERR (klogFatal, rc, "Failed to add READ to cursor");
+                                    else
+                                    {
+                                        rc = VCursorOpen (pb->cursor);
+                                        if (rc)
+                                            LOGERR (klogFatal, rc, "Failed to open cursor");
+                                        else
+                                        {
+                                            rc = write_rows (pb);
+                                            if (rc == 0)
+                                                VCursorCommit (pb->cursor);
+                                        }
+                                    }
+                                    VCursorRelease (pb->cursor);
+                                }
+                                VTableRelease (pb->table);
+                            }
+                        }
+                        VSchemaRelease (pb->schema);
+                    }
+                    VDBManagerRelease (pb->mgr);
+                }
+                KMMapRelease (pb->mmap);
+            }
+            KFileRelease (pb->file);
+        }
+        KDirectoryRelease (pb->pwd);
+    }
+    return rc;
+}
+
+rc_t CC KMain ( int argc, char *argv[] )
+{
+    Args * args;
+    rc_t rc = 0;
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 0 /*1, Options, sizeof Options / sizeof (&Options[1])*/);
+    if (rc)
+    {
+        LOGERR (klogInt, rc, "Failed to parse parameters");
+        return rc;
+    }
+    else
+    {
+        do
+        {
+            param_block pb;
+            uint32_t pcount;
+
+            rc = ArgsParamCount (args, &pcount);
+            if (rc)
+            {
+                LOGERR (klogInt, rc, "Failed to get paramater count");
+                break;
+            }
+            switch (pcount)
+            {
+            default:
+                rc = MiniUsage (args);
+                goto bailout;
+                
+            case 2:
+                pb.schema_path = SCHEMASPEC;
+                break;
+
+            case 3:
+                pb.schema_path = NULL;
+                break;
+            }
+        
+            rc = ArgsParamValue (args, 0, (const void **)&pb.file_path);
+            if (rc)
+            {
+                LOGERR (klogInt,rc, "Failed to get file path");
+                break;
+            }
+
+            rc = ArgsParamValue (args, 1, (const void **)&pb.table_path);
+            if (rc)
+            {
+                LOGERR (klogInt,rc, "Failed to get table path");
+                break;
+            }
+            if (pb.schema_path == NULL)
+            {
+                rc = ArgsParamValue (args, 2, (const void **)&pb.schema_path);
+                if (rc)
+                {
+                    LOGERR (klogInt,rc, "Failed to get schema path");
+                    break;
+                }
+            }
+            rc = open (&pb);
+
+        } while (0);
+    bailout:
+        ArgsWhack (args);
+    }
+    if (rc)
+        LOGERR (klogFatal, rc, "Failed!");
+    else
+        KStsMsg("Exit success %R");
+
+
+    return rc;
+}
diff --git a/tools/util/syspass-priv.h b/tools/util/syspass-priv.h
new file mode 100644
index 0000000..6f8cb80
--- /dev/null
+++ b/tools/util/syspass-priv.h
@@ -0,0 +1,44 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_util_syspass_priv_
+#define _h_util_syspass_priv_
+
+#ifndef _h_klib_defs_
+#include <klib/defs.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+rc_t get_pass(const char *prompt, char *buf, size_t bufsiz);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_util_syspass_priv_ */
diff --git a/tools/util/test-sra-priv.h b/tools/util/test-sra-priv.h
new file mode 100644
index 0000000..924e5e2
--- /dev/null
+++ b/tools/util/test-sra-priv.h
@@ -0,0 +1,46 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_util_test_sra_priv_
+#define _h_util_test_sra_priv_
+
+#ifndef _h_klib_defs_
+#include <klib/defs.h> /* rc_t */
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+rc_t PrintOS(bool xml);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*  _h_util_test_sra_priv_ */
diff --git a/tools/util/test-sra.c b/tools/util/test-sra.c
new file mode 100644
index 0000000..1cc85c4
--- /dev/null
+++ b/tools/util/test-sra.c
@@ -0,0 +1,3380 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ==============================================================================
+*
+*/
+
+#include "test-sra-priv.h" /* PrintOS */
+
+#include <kapp/main.h> /* KMain */
+
+#include <kfg/config.h> /* KConfig */
+#include <kfg/kart.h> /* Kart */
+#include <kfg/repository.h> /* KRepositoryMgr */
+
+#include <kfs/dyload.h> /* KDyld */
+
+#include <klib/time.h> /* KTimeMsStamp */
+
+#include <kns/endpoint.h> /* KEndPoint */
+#include <kns/kns-mgr-priv.h> /* KNSManagerMakeReliableClientRequest */
+
+#include <vfs/manager.h> /* VFSManager */
+#include <vfs/path.h> /* VPath */
+#include <vfs/resolver.h> /* VResolver */
+
+#include <sra/sraschema.h> /* VDBManagerMakeSRASchema */
+
+#include <vdb/database.h> /* VDatabase */
+#include <vdb/dependencies.h> /* VDBDependencies */
+#include <vdb/manager.h> /* VDBManager */
+#include <vdb/report.h> /* ReportSetVDBManager */
+#include <vdb/schema.h> /* VSchemaRelease */
+#include <vdb/table.h> /* VDBManagerOpenTableRead */
+#include <vdb/vdb-priv.h> /* VDBManagerSetResolver */
+
+#include <kns/ascp.h> /* ascp_locate */
+#include <kns/http.h>
+#include <kns/manager.h>
+#include <kns/manager-ext.h> /* KNSManagerNewReleaseVersion */
+#include <kns/stream.h>
+
+#include <kdb/manager.h> /* kptDatabase */
+
+#include <kfs/directory.h> /* KDirectory */
+#include <kfs/file.h> /* KFile */
+
+#include <klib/data-buffer.h> /* KDataBuffer */
+#include <klib/debug.h> /* DBGMSG */
+#include <klib/log.h> /* KLogHandlerSet */
+#include <klib/out.h> /* KOutMsg */
+#include <klib/printf.h> /* string_vprintf */
+#include <klib/rc.h>
+#include <klib/report.h> /* ReportForceFinalize */
+#include <klib/sra-release-version.h>
+#include <klib/text.h> /* String */
+
+#include <sysalloc.h>
+
+#include <assert.h>
+#include <ctype.h> /* isprint */
+#include <stdlib.h> /* calloc */
+#include <string.h> /* memset */
+
+VFS_EXTERN rc_t CC VResolverProtocols ( VResolver * self,
+    VRemoteProtocols protocols );
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
+    if (rc2 != 0 && rc == 0) { rc = rc2; } obj = NULL; } while (false)
+
+typedef enum {
+    eCfg            = 1,
+    eResolve        = 2,
+    eDependMissing  = 4,
+    eDependAll      = 8,
+    eNetwork       = 16,
+    eVersion       = 32,
+    eNewVersion    = 64,
+    eOpenTable    = 128,
+    eOpenDB       = 256,
+    eType         = 512,
+    eNcbiReport  = 1024,
+    eOS          = 2048,
+    eAscp        = 4096,
+    eAscpVerbose = 8192,
+    eNgs        = 16384,
+    ePrintFile  = 32768,
+    eAll        = 65536,
+    eNoTestArg = 131072,
+} Type;
+typedef uint64_t TTest;
+static const char TESTS[] = "crdDwsSoOtnufFgpa";
+typedef struct {
+    KConfig *cfg;
+    KDirectory *dir;
+    KNSManager *knsMgr;
+
+    const VDBManager *mgr;
+    uint32_t projectId;
+
+    VFSManager *vMgr;
+    const KRepositoryMgr *repoMgr;
+    VResolver *resolver;
+    VSchema *schema;
+
+    TTest tests;
+    bool recursive;
+    bool noVDBManagerPathType;
+    bool noRfs;
+    bool full;
+    bool xml;
+    bool network;
+
+    size_t bytes;
+
+    bool allowCaching;
+    VResolverEnableState cacheState;
+} Main;
+
+const char UsageDefaultName[] = "test-sra";
+
+rc_t CC UsageSummary(const char *prog_name) {
+    return KOutMsg(
+        "Usage:\n"
+        "  quick check mode:\n"
+        "   %s -Q [ name... ]\n\n"
+        "  full test mode:\n"
+        "   %s [+crdDa] [-crdDa] [-R] [-N] [-C] [-X <type>] [options] "
+                                                   "name [ name... ]\n"
+        , prog_name, prog_name);
+}
+
+rc_t CC Usage(const Args *args) {
+    rc_t rc2 = 0;
+
+    const char *progname, *fullpath;
+    rc_t rc = ArgsProgram(args, &fullpath, &progname);
+    if (rc != 0) {
+        progname = fullpath = UsageDefaultName;
+    }
+
+    rc2 = UsageSummary(progname);
+    if (rc == 0 && rc2 != 0) {
+        rc = rc2;
+    }
+
+    rc2 = KOutMsg("\n"
+        "Test [SRA] object, resolve it, print dependencies, configuration\n\n"
+        "[+tests] - add tests\n"
+        "[-tests] - remove tests\n\n");
+    if (rc == 0 && rc2 != 0) {
+        rc = rc2;
+    }
+    rc2 = KOutMsg(
+        "Tests:\n"
+        "  s - print SRA software information\n"
+        "  S - print SRA software information and last SRA toolkit versions\n"
+        "  u - print operation system information\n"
+        "  c - print configuration\n"
+        "  n - print NCBI error report\n"
+        "  f - print ascp information\n"
+        "  F - print verbose ascp information\n"
+        "  t - print object types\n"
+        "  g - print NGS information\n"
+        "  p - print content of resolved remote HTTP file\n"
+        "  w - run network test\n"
+    );
+    if (rc == 0 && rc2 != 0) {
+        rc = rc2;
+    }
+    rc2 = KOutMsg(
+        "  r - call VResolver\n"
+        "  d - call ListDependencies(missing)\n"
+        "  D - call ListDependencies(all)\n"
+        "  o - call VDBManagerOpenTableRead(object)\n"
+        "  O - call VDBManagerOpenDBRead(object)\n"
+        "  a - all tests except VDBManagerOpen...Read and verbose ascp\n\n");
+    if (rc == 0 && rc2 != 0) {
+        rc = rc2;
+    }
+    rc2 = KOutMsg(
+        "In quick check mode - the base checks are run;\n"
+        "in full test mode (default) all the tests are available.\n\n"
+        "In full mode, if no tests were specified then all tests will be run.\n"
+        "\n"
+        "-X < xml | text > - whether to generate well-formed XML\n"
+        "-R - check objects recursively\n"
+        "-N - do not call VDBManagerPathType\n"
+        "-C - do not disable caching (default: from configuration)\n"
+        "-b --bytes=K - print the first K bytes of resolved remote HTTP file)\n"
+        "                                                      (default: 256)\n"
+        "\n"
+        "More options:\n");
+    if (rc == 0 && rc2 != 0) {
+        rc = rc2;
+    }
+
+    HelpOptionsStandard();
+
+    return rc;
+}
+
+static bool testArg(const char *arg, TTest *testOn, TTest *testOff) {
+    int j = 1;
+    TTest *res = NULL;
+
+    assert(arg && testOn && testOff);
+    if (arg[0] != '+' && arg[0] != '-') {
+        return false;
+    }
+
+    if (arg[0] == '-' &&
+        arg[1] != '\0' && strchr(TESTS, arg[1]) == NULL)
+    {
+        return false;
+    }
+
+    res = arg[0] == '-' ? testOff : testOn;
+
+    for (j = 1; arg[j] != '\0'; ++j) {
+        char *c = strchr(TESTS, arg[j]);
+        if (c != NULL) {
+            int64_t offset = c - TESTS;
+            *res |= 1 << offset;
+        }
+    }
+
+    return true;
+}
+
+static TTest Turn(TTest in, TTest tests, bool on) {
+    TTest c = 1;
+    for (c = 1; c < eAll; c <<= 1) {
+        if (tests & c) {
+            if (on) {
+                in |= c;
+            }
+            else {
+                in &= ~c;
+            }
+        }
+    }
+    return in;
+}
+
+static TTest processTests(TTest testsOn, TTest testsOff) {
+    TTest tests = 0;
+
+    bool allOn = false;
+    bool allOff = false;
+
+    if (testsOn & eAll && testsOff & eAll) {
+        testsOn &= ~eAll;
+        testsOff &= ~eAll;
+    }
+    else if (testsOn & eAll) {
+        allOn = true;
+    }
+    else if (testsOff & eAll) {
+        allOff = true;
+    }
+
+    if (allOn) {
+        tests = ~0;
+        tests = Turn(tests, testsOff, false);
+        tests = Turn(tests, eOpenTable  , testsOn & eOpenTable);
+        tests = Turn(tests, eOpenDB     , testsOn & eOpenDB);
+        tests = Turn(tests, eAscpVerbose, testsOn & eAscpVerbose);
+    }
+    else if (allOff) {
+        tests = Turn(tests, testsOn, true);
+    }
+    else if (testsOn != 0 || testsOff != 0) {
+        tests = Turn(tests, testsOff, false);
+        tests = Turn(tests, testsOn, true);
+    }
+    else /* no test argument provided */ {
+        tests = ~0;
+        tests = Turn(tests, eOpenTable, false);
+        tests = Turn(tests, eOpenDB, false);
+        tests = Turn(tests, eAscpVerbose, false);
+        tests = Turn(tests, ePrintFile, false);
+    }
+
+    if (tests & eAscpVerbose) {
+        tests = Turn(tests, eAscp, true);
+    }
+
+    if (tests & ePrintFile) {
+        tests = Turn(tests, eResolve, true);
+    }
+
+    if (tests & eNcbiReport) {
+        tests = Turn(tests, eCfg, false);
+    }
+
+    return tests;
+} 
+
+static void MainMakeQuick(Main *self) {
+    assert(self);
+#if 0
+    self->tests = eCurl;
+#endif
+}
+
+static void MainAddTest(Main *self, Type type) {
+    assert(self);
+    self->tests |= type;
+}
+
+static bool MainHasTest(const Main *self, Type type) {
+    return (self->tests & type) != 0;
+}
+
+static void MainPrint(const Main *self) {
+    return;
+
+    assert(self);
+
+    if (MainHasTest(self, eCfg)) {
+        KOutMsg("eCfg\n");
+    }
+
+    if (MainHasTest(self, eResolve)) {
+        KOutMsg("eResolve\n");
+    }
+
+    if (MainHasTest(self, eDependMissing)) {
+        KOutMsg("eDependMissing\n");
+    }
+
+    if (MainHasTest(self, eDependAll)) {
+        KOutMsg("eDependAll\n");
+    }
+
+#if 0
+    if (MainHasTest(self, eCurl)) {
+        KOutMsg("eCurl\n");
+    }
+#endif
+
+    if (MainHasTest(self, eVersion)) {
+        KOutMsg("eVersion\n");
+    }
+
+    if (MainHasTest(self, eNewVersion)) {
+        KOutMsg("eNewVersion\n");
+    }
+
+    if (MainHasTest(self, eOpenTable)) {
+        KOutMsg("eOpenTable\n");
+    }
+
+    if (MainHasTest(self, eOpenDB)) {
+        KOutMsg("eOpenDB\n");
+    }
+
+    if (MainHasTest(self, eType)) {
+        KOutMsg("eType\n");
+    }
+
+    if (MainHasTest(self, eNcbiReport)) {
+        KOutMsg("eNcbiReport\n");
+    }
+
+    if (MainHasTest(self, eAll)) {
+        KOutMsg("eAll\n");
+    }
+
+    if (MainHasTest(self, eNoTestArg)) {
+        KOutMsg("eNoTestArg\n");
+    }
+}
+
+static rc_t MainInitObjects(Main *self) {
+    rc_t rc = 0;
+
+    VResolver *resolver = NULL;
+
+    if (rc == 0) {
+        rc = KDirectoryNativeDir(&self->dir);
+    }
+
+    if (rc == 0) {
+        rc = VDBManagerMakeRead(&self->mgr, NULL);
+        ReportSetVDBManager(self->mgr);
+    }
+
+    if (rc == 0) {
+        rc = KConfigMake(&self->cfg, NULL);
+    }
+
+    if (rc == 0) {
+        rc = KConfigMakeRepositoryMgrRead(self->cfg, &self->repoMgr);
+        if (rc == 0) {
+             bool has_project_id = self->projectId != 0;
+             if (has_project_id) {
+                const KRepository *repository = NULL;
+                rc = KRepositoryMgrGetProtectedRepository(
+                    self->repoMgr, self->projectId, &repository);
+                if (rc == 0) {
+                    VResolver *resolver = NULL;
+                    rc = KRepositoryMakeResolver(
+                        repository, &resolver, self->cfg);
+                    if (rc == 0) {
+                         rc = VDBManagerSetResolver(self->mgr, resolver);
+                    }
+                    RELEASE(VResolver, resolver);
+                }
+                RELEASE(KRepository, repository);
+             }
+        }
+    }
+
+    if (rc == 0) {
+        rc = VFSManagerMake(&self->vMgr);
+    }
+
+    if (rc == 0) {
+        rc = VFSManagerGetResolver(self->vMgr, &resolver);
+    }
+
+    if (rc == 0) {
+        rc = VFSManagerGetKNSMgr(self->vMgr, &self->knsMgr);
+    }
+
+    if (rc == 0) {
+        if (!self->allowCaching) {
+            self->cacheState = VResolverCacheEnable(resolver, vrAlwaysDisable);
+        }
+    }
+
+    if (rc == 0) {
+        rc = VFSManagerMakeResolver(self->vMgr, &self->resolver, self->cfg);
+    }
+
+    if (rc == 0) {
+        rc = VDBManagerMakeSRASchema(self->mgr, &self->schema);
+        if (rc != 0) {
+            OUTMSG(("VDBManagerMakeSRASchema() = %R\n", rc));
+        }
+    }
+
+    RELEASE(VResolver, resolver);
+
+    return rc;
+}
+
+static
+void _MainInit(Main *self, int argc, char *argv[], int *argi, char **argv2)
+{
+    int i = 0;
+
+    bool hasTestArg = false;
+
+    TTest testsOn = 0;
+    TTest testsOff = 0;
+
+    assert(self && argv && argi && argv2);
+
+    *argi = 0;
+    argv2[(*argi)++] = argv[0];
+
+    for (i = 1; i < argc; ++i) {
+        if (!testArg(argv[i], &testsOn, &testsOff)) {
+            argv2[(*argi)++] = argv[i];
+        }
+        else {
+            hasTestArg = true;
+        }
+    }
+
+    self->tests = processTests(testsOn, testsOff);
+
+    if (hasTestArg) {
+        self->tests &= ~eNoTestArg;
+    }
+    else {
+        self->tests |= eNoTestArg;
+    }
+
+    MainPrint(self);
+}
+
+static char** MainInit(Main *self, int argc, char *argv[], int *argi) {
+    char **argv2 = calloc(argc, sizeof *argv2);
+
+    assert(self);
+
+    memset(self, 0, sizeof *self);
+
+    if (argv2 != NULL) {
+        _MainInit(self, argc, argv, argi, argv2);
+    }
+
+    return argv2;
+}
+
+static rc_t MainCallCgiImpl(const Main *self,
+    const KConfigNode *node, const char *acc)
+{
+    rc_t rc = 0;
+    String *url = NULL;
+    KHttpRequest *req = NULL;
+    KDataBuffer result;
+    memset(&result, 0, sizeof result);
+    assert(self && node && acc);
+    if (rc == 0) {
+        rc = KConfigNodeReadString(node, &url);
+        if (url == NULL) {
+            rc = RC(rcExe, rcNode, rcReading, rcString, rcNull);
+        }
+    }
+    if (rc == 0) {
+        rc = KNSManagerMakeRequest(self->knsMgr,
+            &req, 0x01000000, NULL, url->addr);
+    }
+    if (rc == 0) {
+        rc = KHttpRequestAddPostParam ( req, "acc=%s", acc );
+    }
+    if (rc == 0) {
+        KHttpResult *rslt;
+        rc = KHttpRequestPOST ( req, & rslt );
+        if ( rc == 0 )
+        {
+            uint32_t code;
+            size_t msg_size;
+            char msg_buff [ 256 ];
+            rc = KHttpResultStatus(rslt,
+                & code, msg_buff, sizeof msg_buff, & msg_size);
+            if ( rc == 0 && code == 200 )
+            {
+                KStream * response;
+                rc = KHttpResultGetInputStream ( rslt, & response );
+                if ( rc == 0 )
+                {
+                    size_t num_read;
+                    size_t total = 0;
+                    KDataBufferMakeBytes ( & result, 4096 );
+                    while ( 1 )
+                    {
+                        uint8_t *base;
+                        uint64_t avail = result . elem_count - total;
+                        if ( avail < 256 )
+                        {
+                            rc = KDataBufferResize
+                                (&result, result.elem_count + 4096);
+                            if ( rc != 0 )
+                                break;
+                        }
+
+                        base = result . base;
+                        rc = KStreamRead(response, &base[total],
+                            result.elem_count - total, &num_read);
+                        if ( rc != 0 )
+                        {
+                            if ( num_read > 0 )
+                                rc = 0;
+                            else
+                                break;
+                        }
+
+                        if ( num_read == 0 )
+                            break;
+
+                        total += num_read;
+                    }
+
+                    KStreamRelease ( response );
+                }
+            }
+
+            KHttpResultRelease ( rslt );
+        }
+    }
+    if (rc == 0) {
+        const char *start = (const void*)(result.base);
+        size_t size = KDataBufferBytes(&result);
+        if (*(start + size) != '\0') {
+            rc = RC(rcExe, rcString, rcParsing, rcString, rcUnexpected);
+        }
+        if (strstr(start, "200|ok") == NULL) {
+            rc = RC(rcExe, rcString, rcParsing, rcParam, rcIncorrect);
+        }
+    }
+    KDataBufferWhack(&result);
+    RELEASE(KHttpRequest, req);
+    free(url);
+    if (rc == 0) {
+        OUTMSG(("NCBI access: ok\n"));
+    }
+    else {
+        OUTMSG(("ERROR: cannot access NCBI Website\n"));
+    }
+    return rc;
+}
+
+static rc_t MainCallCgi(const Main *self,
+    const KConfigNode *node, const char *acc)
+{
+    rc_t rc = 0;
+    int i = 0, retryOnFailure = 2;
+    for (i = 0; i < retryOnFailure; ++i) {
+        rc = MainCallCgiImpl(self, node, acc);
+        if (rc == 0) {
+            break;
+        }
+        DBGMSG(DBG_KNS, DBG_FLAG(DBG_KNS_ERR), (
+            "@@@@@@@@2: MainCallCgi %d/%d = %R\n", i + 1, retryOnFailure, rc));
+    }
+    return rc;
+}
+
+#define rcResolver   rcTree
+static rc_t MainQuickResolveQuery(const Main *self, const char *acc) {
+    rc_t rc = 0;
+    VPath *query = NULL;
+    const VPath *remote = NULL;
+    const VPath *cache = NULL;
+    assert(self && acc);
+    rc = VFSManagerMakePath(self->vMgr, &query, "%s", acc);
+    if (rc == 0) {
+        if (!self->allowCaching) {
+            VResolverCacheEnable(self->resolver, self->cacheState);
+        }
+        rc = VResolverQuery(self->resolver, eProtocolHttp, query,
+            NULL, &remote, &cache);
+        if (!self->allowCaching) {
+            VResolverCacheEnable(self->resolver, vrAlwaysDisable);
+        }
+    }
+    if (rc == 0) {
+        if (remote != NULL) {
+            OUTMSG(("remote location: ok\n"));
+        }
+        else {
+            OUTMSG(("ERROR: cannot resolve remote location\n"));
+            rc = RC(rcExe, rcResolver, rcResolving, rcPath, rcNotFound);
+        }
+        if (cache != NULL) {
+            OUTMSG(("cache location: ok\n"));
+        }
+        else {
+            OUTMSG(("ERROR: cannot resolve cache location\n"));
+            rc = RC(rcExe, rcResolver, rcResolving, rcPath, rcNotFound);
+        }
+    }
+    else {
+        OUTMSG(("ERROR: cannot resolve public accession\n"));
+    }
+    RELEASE(VPath, cache);
+    RELEASE(VPath, remote);
+    RELEASE(VPath, query);
+    return rc;
+}
+
+static rc_t MainQuickCheck(const Main *self) {
+    rc_t rc = 0;
+    rc_t rc2 = 0;
+    const char acc[] = "SRR000001";
+    const char path[] = "/repository/remote/protected/CGI/resolver-cgi";
+    const KConfigNode *node = NULL;
+    assert(self);
+    rc = KConfigOpenNodeRead(self->cfg, &node, "%s", path);
+    if (rc == 0) {
+        OUTMSG(("configuration: found\n"));
+    }
+    else {
+        OUTMSG(("ERROR: configuration not found or incomplete\n"));
+    }
+    if (rc == 0) {
+        rc_t rc3 = MainCallCgi(self, node, acc);
+        if (rc3 != 0 && rc2 == 0) {
+            rc2 = rc3;
+        }
+
+        rc3 = MainQuickResolveQuery(self, acc);
+        if (rc3 != 0 && rc2 == 0) {
+            rc2 = rc3;
+        }
+    }
+    RELEASE(KConfigNode, node);
+    if (rc2 != 0 && rc == 0) {
+        rc = rc2;
+    }
+    return rc;
+}
+
+static rc_t MainPrintConfig(const Main *self) {
+    rc_t rc = 0;
+
+    assert(self);
+
+    if (rc == 0) {
+        rc = KConfigPrint(self->cfg, 0);
+        if (rc != 0) {
+            OUTMSG(("KConfigPrint() = %R", rc));
+        }
+        OUTMSG(("\n"));
+    }
+
+    return rc;
+}
+
+static
+rc_t _KDBPathTypePrint(const char *head, KPathType type, const char *tail)
+{
+    rc_t rc = 0;
+    rc_t rc2 = 0;
+    assert(head && tail);
+    {
+        rc_t rc2 = OUTMSG(("%s", head));
+        if (rc == 0 && rc2 != 0) {
+            rc = rc2;
+        }
+    }
+    switch (type) {
+        case kptNotFound:
+            rc2 = OUTMSG(("NotFound"));
+            break;
+        case kptBadPath:
+            rc2 = OUTMSG(("BadPath"));
+            break;
+        case kptFile:
+            rc2 = OUTMSG(("File"));
+            break;
+        case kptDir:
+            rc2 = OUTMSG(("Dir"));
+            break;
+        case kptCharDev:
+            rc2 = OUTMSG(("CharDev"));
+            break;
+        case kptBlockDev:
+            rc2 = OUTMSG(("BlockDev"));
+            break;
+        case kptFIFO:
+            rc2 = OUTMSG(("FIFO"));
+            break;
+        case kptZombieFile:
+            rc2 = OUTMSG(("ZombieFile"));
+            break;
+        case kptDataset:
+            rc2 = OUTMSG(("Dataset"));
+            break;
+        case kptDatatype:
+            rc2 = OUTMSG(("Datatype"));
+            break;
+        case kptDatabase:
+            rc2 = OUTMSG(("Database"));
+            break;
+        case kptTable:
+            rc2 = OUTMSG(("Table"));
+            break;
+        case kptIndex:
+            rc2 = OUTMSG(("Index"));
+            break;
+        case kptColumn:
+            rc2 = OUTMSG(("Column"));
+            break;
+        case kptMetadata:
+            rc2 = OUTMSG(("Metadata"));
+            break;
+        case kptPrereleaseTbl:
+            rc2 = OUTMSG(("PrereleaseTbl"));
+            break;
+        default:
+            rc2 = OUTMSG(("unexpectedFileType(%d)", type));
+            assert(0);
+            break;
+    }
+    if (rc == 0 && rc2 != 0) {
+        rc = rc2;
+    }
+    {
+        rc_t rc2 = OUTMSG(("%s", tail));
+        if (rc == 0 && rc2 != 0) {
+            rc = rc2;
+        }
+    }
+    return rc;
+}
+
+static bool isprintString(const unsigned char *s) {
+    assert(s);
+
+    while (*s) {
+        int c = *(s++);
+        if (!isprint(c)) {
+            return false;
+        }
+    }
+
+    return true;
+}
+
+static rc_t printString(const char *s) {
+    rc_t rc = 0;
+
+    const unsigned char *u = (unsigned char*)s;
+
+    assert(u);
+
+    if (isprintString(u)) {
+        return OUTMSG(("%s", u));
+    }
+
+    while (*u) {
+        rc_t rc2 = 0;
+        int c = *(u++);
+        if (isprint(c)) {
+            rc2 = OUTMSG(("%c", c));
+        }
+        else {
+            rc2 = OUTMSG(("\\%03o", c));
+        }
+        if (rc == 0 && rc2 != 0) {
+            rc = rc2;
+        }
+    }
+
+    return rc;
+}
+
+static rc_t _KDirectoryReport(const KDirectory *self,
+    const char *name, int64_t *size, KPathType *type, bool *alias)
+{
+    rc_t rc = 0;
+    const KFile *f = NULL;
+
+    bool dummyB = false;
+    int64_t dummy = 0;
+
+    KPathType dummyT = kptNotFound;;
+    if (type == NULL) {
+        type = &dummyT;
+    }
+
+    if (alias == NULL) {
+        alias = &dummyB;
+    }
+    if (size == NULL) {
+        size = &dummy;
+    }
+
+    *type = KDirectoryPathType(self, "%s", name);
+
+    if (*type & kptAlias) {
+        OUTMSG(("alias|"));
+        *type &= ~kptAlias;
+        *alias = true;
+    }
+
+    rc = _KDBPathTypePrint("", *type, " ");
+
+    if (*type == kptFile) {
+        rc = KDirectoryOpenFileRead(self, &f, "%s", name);
+        if (rc != 0) {
+            OUTMSG(("KDirectoryOpenFileRead("));
+            printString(name);
+            OUTMSG((")=%R ", rc));
+        }
+        else {
+            uint64_t sz = 0;
+            rc = KFileSize(f, &sz);
+            if (rc != 0) {
+                OUTMSG(("KFileSize(%s)=%R ", name, rc));
+            }
+            else {
+                OUTMSG(("%,lu ", sz));
+                *size = sz;
+            }
+        }
+    }
+    else {
+        OUTMSG(("- "));
+    }
+
+    RELEASE(KFile, f);
+
+    return rc;
+}
+
+static rc_t _VDBManagerReport(const VDBManager *self,
+    const char *name, KPathType *type)
+{
+    KPathType dummy = kptNotFound;;
+
+    if (type == NULL) {
+        type = &dummy;
+    }
+
+    *type = VDBManagerPathType(self, "%s", name);
+
+    *type &= ~kptAlias;
+
+    return _KDBPathTypePrint("", *type, " ");
+}
+
+static rc_t _VDBManagerReportRemote
+    (const VDBManager *self, const char *name, const VSchema *schema)
+{
+    bool notFound = false;
+    const VDatabase *db = NULL;
+    const VTable *tbl = NULL;
+    rc_t rc = VDBManagerOpenDBRead(self, &db, schema, name);
+    if (rc == 0) {
+        RELEASE(VDatabase, db);
+        return _KDBPathTypePrint("", kptDatabase, " ");
+    }
+    else if (GetRCState(rc) == rcNotFound) {
+        notFound = true;
+    }
+    rc = VDBManagerOpenTableRead(self,  &tbl, schema, name);
+    if (rc == 0) {
+        RELEASE(VTable, tbl);
+        return _KDBPathTypePrint("", kptTable, " ");
+    }
+    else if (GetRCState(rc) == rcNotFound) {
+        notFound = true;
+    }
+    if (notFound) {
+        return OUTMSG(("NotFound "));
+    }
+    else {
+        return OUTMSG(("Unknown "));
+    }
+}
+
+static
+rc_t _KDirectoryFileHeaderReport(const KDirectory *self, const char *path)
+{
+    rc_t rc = 0;
+    char hdr[8] = "";
+    const KFile *f = NULL;
+    size_t num_read = 0;
+    size_t i = 0;
+
+    assert(self && path);
+
+    rc = KDirectoryOpenFileRead(self, &f, "%s", path);
+    if (rc != 0) {
+        OUTMSG(("KDirectoryOpenFileRead(%s) = %R\n", path, rc));
+        return rc;
+    }
+
+    rc = KFileReadAll(f, 0, hdr, sizeof hdr, &num_read);
+    if (rc != 0) {
+        OUTMSG(("KFileReadAll(%s, 8) = %R\n", path, rc));
+    }
+
+    for (i = 0; i < num_read && rc == 0; ++i) {
+        if (isprint(hdr[i])) {
+            OUTMSG(("%c", hdr[i]));
+        }
+        else {
+            OUTMSG(("\\X%02X", hdr[i]));
+        }
+    }
+    OUTMSG((" "));
+
+    RELEASE(KFile, f);
+    return rc;
+}
+
+static rc_t MainReport(const Main *self,
+    const char *name, int64_t *size, KPathType *type, bool *alias)
+{
+    rc_t rc = 0;
+
+    assert(self);
+
+    rc = _KDirectoryReport(self->dir, name, size, type, alias);
+
+    if (!self->noVDBManagerPathType) {
+        _VDBManagerReport(self->mgr, name, type);
+    }
+
+    if (type != NULL && *type == kptFile) {
+        _KDirectoryFileHeaderReport(self->dir, name);
+    }
+
+    return rc;
+}
+
+static rc_t MainReportRemote(const Main *self, const char *name, int64_t size) {
+    rc_t rc = 0;
+
+    assert(self);
+
+    OUTMSG(("%,lu ", size));
+
+    if (!self->noVDBManagerPathType) {
+        _VDBManagerReportRemote(self->mgr, name, self->schema);
+    }
+
+    return rc;
+}
+
+static rc_t MainOpenAs(const Main *self, const char *name, bool isDb) {
+    rc_t rc = 0;
+    const VTable *tbl = NULL;
+    const VDatabase *db = NULL;
+
+    assert(self);
+
+    if (isDb) {
+        rc = VDBManagerOpenDBRead(self->mgr, &db, self->schema, "%s", name);
+        ReportResetDatabase(name, db);
+        OUTMSG(("VDBManagerOpenDBRead(%s) = ", name));
+    }
+    else {
+        rc = VDBManagerOpenTableRead(self->mgr, &tbl, self->schema, "%s", name);
+        ReportResetTable(name, tbl);
+        OUTMSG(("VDBManagerOpenTableRead(%s) = ", name));
+    }
+    if (rc == 0) {
+        OUTMSG(("OK\n"));
+    }
+    else {
+        OUTMSG(("%R\n", rc));
+    }
+    RELEASE(VDatabase, db);
+    RELEASE(VTable, tbl);
+    return rc;
+}
+
+#define rcResolver   rcTree
+static bool NotFoundByResolver(rc_t rc) {
+    if (GetRCModule(rc) == rcVFS) {
+        if (GetRCTarget(rc) == rcResolver) {
+            if (GetRCContext(rc) == rcResolving) {
+                if (GetRCState(rc) == rcNotFound) {
+                    return true;
+                }
+            }
+        }
+    }
+    return false;
+}
+
+typedef enum {
+      ePathLocal
+    , ePathRemote
+    , ePathCache
+} EPathType;
+static rc_t PrintContent(const KFile *f, uint64_t sz, size_t bytes)
+{
+    rc_t rc = 0;
+    size_t total = 0;
+    while (total < bytes) {
+        uint64_t pos = total;
+        unsigned char buffer[1024];
+        size_t num_read = 0;
+        rc = KFileRead(f, pos, buffer, sizeof buffer, &num_read);
+        if (rc == 0) {
+            size_t i = 0;
+            if (total == 0) {
+                OUTMSG(("\n", 0));
+            }
+            for (i = 0; i < num_read && total < bytes; ++i, ++total) {
+                if ((total % 16) == 0) {
+                    OUTMSG(("%04X:", total));
+                }
+                OUTMSG((" %02X", buffer[i]));
+                if ((total % 16) == 7) {
+                    OUTMSG((" |"));
+                }
+                if ((total % 16) == 15) {
+                    OUTMSG(("\n"));
+                }
+            }
+        } else {
+            break;
+        }
+    }
+    return rc;
+}
+static rc_t MainPathReport(const Main *self, rc_t rc, const VPath *path,
+    EPathType type, const char *name, const VPath* remote, int64_t *size,
+    bool fasp, const KFile *fRemote)
+{
+    const char *eol = "\n";
+    const char *bol = "";
+
+    assert(self);
+
+    if (self->xml) {
+        eol = "<br/>\n";
+        bol = "      ";
+    }
+
+    switch (type) {
+        case ePathLocal:
+            OUTMSG(("%sLocal:\t\t  ", bol));
+            break;
+        case ePathRemote:
+            OUTMSG(("%sRemote %s:\t  ", bol, fasp ? "FaspHttp" : "HttpFasp"));
+            break;
+        case ePathCache:
+            OUTMSG(("%sCache %s:\t  ", bol, fasp ? "FaspHttp" : "HttpFasp"));
+            if (remote == NULL) {
+                OUTMSG(("skipped%s", eol));
+                return rc;
+            }
+            break;
+    }
+    if (rc != 0) {
+        if (NotFoundByResolver(rc)) {
+            OUTMSG(("not found%s", eol));
+            rc = 0;
+        }
+        else {
+            switch (type) {
+                case ePathLocal:
+                    OUTMSG(("VResolverLocal(%s) = %R%s", name, rc, eol));
+                    break;
+                case ePathRemote:
+                    OUTMSG(("VResolverRemote(%s) = %R%s", name, rc, eol));
+                    break;
+                case ePathCache:
+                    OUTMSG(("VResolverCache(%s) = %R%s", name, rc, eol));
+                    break;
+            }
+        }
+    }
+    else {
+        const char ncbiFile[] = "ncbi-file:";
+        size_t sz = sizeof ncbiFile - 1;
+        const String *s = NULL;
+        char buffer[PATH_MAX] = "";
+        const char *fPath = buffer;
+        rc_t rc = VPathMakeString(path, &s);
+        if (rc != 0 || s == NULL || s->addr == NULL ||
+            string_cmp(s->addr, sz, ncbiFile, sz, (uint32_t)sz) == 0)
+        {
+            rc = VPathReadPath(path, buffer, sizeof buffer, NULL);
+        }
+        else {
+            fPath = s->addr;
+        }
+        if (rc == 0) {
+            OUTMSG(("%s ", fPath));
+            switch (type) {
+                case ePathLocal:
+                case ePathCache:
+                    rc = MainReport(self, fPath, size, NULL, NULL);
+                    break;
+                case ePathRemote: {
+                    uint64_t sz = 0;
+                    if (!fasp && fRemote != NULL) {
+                        rc = KFileSize(fRemote, &sz);
+                        if (rc != 0) {
+                            OUTMSG(("KFileSize(%s)=%R ", name, rc));
+                        }
+                        else {
+                            MainReportRemote(self, fPath, sz);
+                            *size = sz;
+                            if (MainHasTest(self, ePrintFile)) {
+                                if (self->xml) {
+                                    OUTMSG(("\n<bytes>"));
+                                }
+                                PrintContent(fRemote, sz, self->bytes);
+                                if (self->xml) {
+                                    OUTMSG(("</bytes>"));
+                                }
+                            }
+                        }
+                    }
+                    break;
+                }
+            }
+            OUTMSG(("%s", eol));
+        }
+        else {
+            const char *s = "";
+            switch (type) {
+                case ePathLocal:
+                    s = "Local";
+                    break;
+                case ePathCache:
+                    s = "Cache";
+                    break;
+                case ePathRemote:
+                    s = "Remote";
+                    break;
+                default:
+                    assert(0);
+                    break;
+            }
+            OUTMSG(("VPathMakeUri(VResolver%s(%s)) = %R%s", s, name, rc, eol));
+        }
+        if (type == ePathCache) {
+            char cachecache[PATH_MAX] = "";
+            if (rc == 0) {
+                rc = string_printf(cachecache,
+                    sizeof cachecache, NULL, "%s.cache", fPath);
+                if (rc != 0) {
+                    OUTMSG(("string_printf(%s) = %R%s", fPath, rc, eol));
+                }
+            }
+
+            if (rc == 0) {
+                OUTMSG((
+                    "%sCache.cache %s: ", bol, fasp ? "FaspHttp" : "HttpFasp"));
+                OUTMSG(("%s ", cachecache));
+                rc = MainReport(self, cachecache, NULL, NULL, NULL);
+                OUTMSG(("%s", eol));
+            }
+        }
+        free((void*)s);
+    }
+    return rc;
+}
+
+static rc_t MainResolveLocal(const Main *self, const VResolver *resolver,
+    const char *name, const VPath *acc, int64_t *size)
+{
+    rc_t rc = 0;
+
+    const VPath* local = NULL;
+
+    assert(self);
+
+    if (resolver == NULL) {
+        resolver = self->resolver;
+    }
+
+    rc = VResolverLocal(resolver, acc, &local);
+    rc = MainPathReport(self,
+        rc, local, ePathLocal, name, NULL, NULL, false, NULL);
+
+    RELEASE(VPath, local);
+
+    return rc;
+}
+
+static rc_t MainResolveRemote(const Main *self, VResolver *resolver,
+    const char *name, const VPath* acc, const VPath **remote, int64_t *size,
+    bool fasp)
+{
+    rc_t rc = 0;
+
+    const KFile* f = NULL;
+
+    assert(self && size && remote);
+
+    if (resolver == NULL) {
+        resolver = self->resolver;
+    }
+
+    rc = VResolverRemote(resolver,
+        fasp ? eProtocolFaspHttp : eProtocolHttp, acc, remote);
+
+    if (rc == 0) {
+        rc_t rc = 0;
+        String str;
+        memset(&str, 0, sizeof str);
+        rc = VPathGetScheme(*remote, &str);
+        if (rc != 0) {
+            OUTMSG(("VPathGetScheme(%S) = %R\n", *remote, rc));
+        }
+        else {
+            String fasp;
+            CONST_STRING(&fasp, "fasp");
+            if (StringCompare(&str, &fasp) != 0) {
+                char path_str[8192];
+                rc = VPathReadUri(*remote, path_str, sizeof path_str, NULL);
+                if (rc != 0) {
+                    OUTMSG(("VPathReadUri(%S) = %R\n", *remote, rc));
+                }
+                else {
+                    rc = KNSManagerMakeHttpFile
+                        (self->knsMgr, &f, NULL, 0x01010000, path_str);
+                }
+            }
+        }
+    }
+
+    rc = MainPathReport(self,
+        rc, *remote, ePathRemote, name, NULL, size, fasp, f);
+    RELEASE(KFile, f);
+
+    return rc;
+}
+
+static rc_t MainResolveCache(const Main *self, const VResolver *resolver,
+    const char *name, const VPath* remote, bool fasp)
+{
+    rc_t rc = 0;
+    const VPath* cache = NULL;
+
+    assert(self);
+    
+    if (remote == NULL) {
+        rc = MainPathReport(self,
+            rc, cache, ePathCache, name, remote, NULL, fasp, NULL);
+    }
+    else {
+        if (resolver == NULL) {
+            resolver = self->resolver;
+        }
+
+        if (!self->allowCaching) {
+            VResolverCacheEnable(resolver, self->cacheState);
+        }
+        rc = VResolverQuery(resolver, fasp ? eProtocolFasp : eProtocolHttp,
+            remote, NULL, NULL, &cache);
+        rc = MainPathReport(self,
+            rc, cache, ePathCache, name, remote, NULL, fasp, NULL);
+
+        RELEASE(VPath, cache);
+        if (!self->allowCaching) {
+            VResolverCacheEnable(resolver, vrAlwaysDisable);
+        }
+    }
+
+    return rc;
+}
+
+typedef enum {
+      eQueryAll
+    , eQueryLocal
+    , eQueryRemote
+} EQueryType ;
+static rc_t VResolverQueryByType(const Main *self, const VResolver *resolver,
+    const char *name, const VPath *query,
+    bool fasp, VRemoteProtocols protocols, EQueryType type)
+{
+    const char *eol = "\n";
+    const char *bol = "";
+
+    rc_t rc = 0;
+
+    const VPath *local = NULL;
+    const VPath *remote = NULL;
+    const VPath *cache = NULL;
+    const VPath **pLocal = NULL;
+    const VPath **pRemote = NULL;
+    const VPath **pCache = NULL;
+
+    assert(self);
+
+    if (self->xml) {
+        eol = "<br/>\n";
+        bol = "      ";
+    }
+
+    switch (type) {
+        case eQueryLocal:
+        case eQueryAll:
+            pLocal = &local;
+        default:
+            break;
+    }
+
+    switch (type) {
+        case eQueryRemote:
+        case eQueryAll:
+            pRemote = &remote;
+            pCache = &cache;
+        default:
+            break;
+    }
+
+    if (pCache != NULL && !self->allowCaching) {
+        VResolverCacheEnable(resolver, vrAlwaysEnable);
+    }
+
+    rc = VResolverQuery(resolver, protocols, query, pLocal, pRemote, pCache);
+    OUTMSG(("%sVResolverQuery(%s, %s, local%s, remote%s, cache%s)= %R%s",
+        bol, name, protocols == eProtocolHttp ? "Http" : "FaspHttp", 
+        pLocal == NULL ? "=NULL" : "", pRemote == NULL ? "=NULL" : "",
+        pCache == NULL ? "=NULL" : "", rc, eol));
+    if (rc == 0) {
+        if (local != NULL) {
+/*          rc2 =*/ MainPathReport(self,
+                rc, local, ePathLocal, name, NULL, NULL, false, NULL);
+        }
+        if (remote != NULL) {
+/*          rc2 =*/ MainPathReport(self,
+                rc, remote, ePathRemote, name, NULL, NULL, fasp, NULL);
+        }
+        if (cache != NULL) {
+            MainPathReport(self,
+                rc, cache, ePathCache, name, remote, NULL, fasp, NULL);
+        }
+    }
+
+    OUTMSG(("\n"));
+
+    RELEASE(VPath, local);
+    RELEASE(VPath, remote);
+    RELEASE(VPath, cache);
+
+    if (pCache != NULL && !self->allowCaching) {
+        VResolverCacheEnable(resolver, self->cacheState);
+    }
+
+    return rc;
+}
+
+static rc_t MainResolveQuery(const Main *self, const VResolver *resolver,
+    const char *name, const VPath *query, bool fasp)
+{
+    const char root[] = "Timer";
+    rc_t rc = 0;
+    rc_t rc2 = 0;
+    KTimeMs_t time = 0;
+    KTimeMs_t start_time = 0;
+
+    VRemoteProtocols protocols = eProtocolHttp;
+    if (fasp) {
+        protocols = eProtocolFaspHttp;
+    }
+    else {
+        protocols = eProtocolHttp;
+    }
+
+    if (resolver == NULL) {
+        resolver = self->resolver;
+    }
+
+    rc2 = VResolverQueryByType(self, resolver, name, query, fasp, protocols,
+        eQueryAll);
+    if (rc2 != 0 && rc == 0) {
+        rc = rc2;
+    }
+
+    if (self->xml) {
+        OUTMSG(("    <%s>\n", root));
+    }
+    else {
+        OUTMSG(("time started...\n"));
+    }
+    start_time = KTimeMsStamp();
+
+    rc2 = VResolverQueryByType(self, resolver, name, query, fasp, protocols,
+        eQueryLocal);
+    if (rc2 != 0 && rc == 0) {
+        rc = rc2;
+    }
+
+    rc2 = VResolverQueryByType(self, resolver, name, query, fasp, protocols,
+        eQueryRemote);
+    if (rc2 != 0 && rc == 0) {
+        rc = rc2;
+    }
+
+/* TODO check vdbcache */
+
+    time = KTimeMsStamp() - start_time;
+    if (self->xml) {
+        OUTMSG(("      <Time time=\"%d ms\"/>\n", time));
+        OUTMSG(("    </%s>\n", root));
+    }
+    else {
+        OUTMSG(("...elapsed time=\"%d ms\"\n\n", time));
+    }
+
+    return rc;
+}
+
+static rc_t _KartItemToVPath(const KartItem *self,
+    const VFSManager *vfs, VPath **path)
+{
+    uint64_t oid = 0;
+    rc_t rc = KartItemItemIdNumber(self, &oid);
+    if (rc == 0) {
+        rc = VFSManagerMakeOidPath(vfs, path, (uint32_t)oid);
+    }
+    else {
+        char path_str[PATH_MAX] = "";
+        const String *accession = NULL;
+        rc = KartItemAccession(self, &accession);
+        if (rc == 0) {
+            rc =
+                string_printf(path_str, sizeof path_str, NULL, "%S", accession);
+        }
+        if (rc == 0) {
+            rc = VFSManagerMakePath(vfs, path, path_str);
+        }
+    }
+    return rc;
+}
+
+static rc_t perform_read_test(void) { return 0; }
+
+static rc_t MainResolve(const Main *self, const KartItem *item,
+    const char *name, int64_t *localSz, int64_t *remoteSz, bool refseqCtx)
+{
+    const char root[] = "Resolve";
+    rc_t rc = 0;
+
+    VPath* acc = NULL;
+    VResolver* resolver = NULL;
+
+    assert(self);
+
+    if (self->xml) {
+        OUTMSG(("<%s>\n", root));
+    }
+
+    if (rc == 0) {
+        if (item == NULL) {
+            if (refseqCtx) {
+                rc = VFSManagerMakePath(self->vMgr, &acc,
+                    "ncbi-acc:%s?vdb-ctx=refseq", name);
+            }
+            else {
+                rc = VFSManagerMakePath(self->vMgr, &acc, "%s", name);
+            }
+            if (rc != 0) {
+                OUTMSG(("VFSManagerMakePath(%s) = %R\n", name, rc));
+            }
+        }
+        else {
+            const KRepository *p_protected = NULL;
+            uint64_t project = 0;
+            if (rc == 0) {
+                rc = KartItemProjIdNumber(item, &project);
+                if (rc != 0) {
+                    OUTMSG(("KartItemProjectIdNumber = %R\n", rc));
+                }
+            }
+            if (rc == 0) {
+                rc = _KartItemToVPath(item, self->vMgr, &acc);
+                if (rc != 0) {
+                    OUTMSG(("Invalid kart file row: %R\n", rc));
+                }
+            }
+            if (rc == 0) {
+                rc = KRepositoryMgrGetProtectedRepository(self->repoMgr, 
+                    (uint32_t)project, &p_protected);
+                if (rc != 0) {
+                    OUTMSG((
+                        "KRepositoryMgrGetProtectedRepository(%d) = %R\n",
+                        project, rc));
+                }
+            }
+            if (rc == 0) {
+                rc = KRepositoryMakeResolver(p_protected, &resolver,
+                    self->cfg);
+                if (rc != 0) {
+                    OUTMSG((
+                        "KRepositoryMakeResolver(%d) = %R\n", project, rc));
+                }
+            }
+            RELEASE(KRepository, p_protected);
+        }
+    }
+
+    if (rc == 0) {
+        const String *id = NULL;
+        const char root[] = "Query";
+        rc_t rc2 = 0;
+
+        const VPath* remote = NULL;
+
+        const char *attr = name;
+        if (attr == NULL) {
+            rc2 = KartItemItemId(item, &id);
+            if (rc2 != 0) {
+                OUTMSG(("KartItemItemId = %R\n", rc2));
+                rc2 = 0;
+                attr = "Accession";
+            }
+        }
+
+        if (self->xml) {
+            if (attr != NULL) {
+                OUTMSG(("  <%s name=\"%s\">\n", root, attr));
+            }
+            else {
+                OUTMSG(("  <%s name=\"%S\">\n", root, id));
+            }
+        }
+
+        rc = VDBManagerSetResolver(self->mgr, resolver);
+
+        rc2 = MainResolveLocal(self, resolver, name, acc, localSz);
+        if (rc2 != 0 && rc == 0) {
+            rc = rc2;
+        }
+
+        rc2 = MainResolveRemote(self, resolver, name, acc, &remote, remoteSz,
+            false);
+        if (rc2 != 0 && rc == 0) {
+            rc = rc2;
+        }
+
+        rc2 = MainResolveCache(self, resolver, name, remote, false);
+        if (rc2 != 0 && rc == 0) {
+            rc = rc2;
+        }
+
+        RELEASE(VPath, remote);
+
+        rc2 = MainResolveRemote(self, resolver, name, acc, &remote, remoteSz,
+            true);
+        if (rc2 != 0 && rc == 0) {
+            rc = rc2;
+        }
+
+        rc2 = MainResolveCache(self, resolver, name, remote, true);
+        if (rc2 != 0 && rc == 0) {
+            rc = rc2;
+        }
+
+        OUTMSG(("\n"));
+
+        rc2 = MainResolveQuery(self, resolver, name, acc, false);
+        if (rc2 != 0 && rc == 0) {
+            rc = rc2;
+        }
+
+        rc2 = MainResolveQuery(self, resolver, name, acc, true);
+        if (rc2 != 0 && rc == 0) {
+            rc = rc2;
+        }
+
+        RELEASE(VPath, remote);
+
+        if (MainHasTest(self, eNetwork)) {
+            perform_read_test();
+        }
+
+        if (self->xml) {
+            OUTMSG(("  </%s>\n", root));
+        }
+    }
+
+    RELEASE(VPath, acc); 
+    RELEASE(VResolver, resolver);
+
+    if (self->xml) {
+        OUTMSG(("</%s>\n", root));
+    }
+
+    return rc;
+}
+
+static
+rc_t MainDepend(const Main *self, const char *name, bool missing)
+{
+    const char root[] = "Dependencies";
+    const char *eol = "\n";
+    rc_t rc = 0;
+
+    const VDatabase *db = NULL;
+    const VDBDependencies* dep = NULL;
+    uint32_t count = 0;
+
+    assert(self);
+    eol = self->xml ? "<br/>\n" : "\n";
+
+    if (self->xml) {
+        OUTMSG(("<%s>\n", root));
+    }
+
+    if (rc == 0) {
+        rc = VDBManagerOpenDBRead(self->mgr, &db, self->schema, "%s", name);
+        if (rc != 0) {
+            if (rc == SILENT_RC(rcVFS,rcMgr,rcOpening,rcDirectory,rcNotFound)) {
+                return 0;
+            }
+            OUTMSG(("VDBManagerOpenDBRead(%s) = %R\n", name, rc));
+        }
+    }
+
+    if (rc == 0) {
+        if (!self->allowCaching) {
+            VResolverCacheEnable(self->resolver, self->cacheState);
+        }
+        rc = VDatabaseListDependenciesWithCaching(db,
+            &dep, missing, !self->allowCaching);
+        if (rc != 0) {
+            OUTMSG(("VDatabaseListDependencies(%s, %s) = %R%s",
+                name, missing ? "missing" : "all", rc, eol));
+        }
+        if (!self->allowCaching) {
+            VResolverCacheEnable(self->resolver, vrAlwaysDisable);
+        }
+    }
+
+    if (rc == 0) {
+        rc = VDBDependenciesCount(dep, &count);
+        if (rc != 0) {
+            OUTMSG(("VDBDependenciesCount(%s, %s) = %R\n",
+                name, missing ? "missing" : "all", rc));
+        }
+        else {
+            OUTMSG(("VDBDependenciesCount(%s)=%d\n",
+                missing ? "missing" : "all", count));
+        }
+    }
+
+    if (rc == 0) {
+        uint32_t i = 0;
+        rc_t rc2 = 0;
+        for (i = 0; i < count; ++i) {
+            const char root[] = "Dependency";
+            bool b = true;
+            const char *s = NULL;
+            const char *seqId = NULL;
+            KPathType type = kptNotFound;
+
+            if (self->xml) {
+                OUTMSG(("<%s>\n", root));
+            }
+
+            OUTMSG((" %6d\t", i + 1));
+
+            rc2 = VDBDependenciesSeqId(dep, &seqId, i);
+            if (rc2 == 0) {
+                OUTMSG(("seqId=%s,", seqId));
+            }
+            else {
+                OUTMSG(("VDBDependenciesSeqId(%s, %s, %i)=%R ",
+                    name, missing ? "missing" : "all", i, rc2));
+                if (rc == 0) {
+                    rc = rc2;
+                }
+            }
+
+            rc2 = VDBDependenciesName(dep, &s, i);
+            if (rc2 == 0) {
+                OUTMSG(("name=%s,", s));
+            }
+            else {
+                OUTMSG(("VDBDependenciesName(%s, %s, %i)=%R ",
+                    name, missing ? "missing" : "all", i, rc2));
+                if (rc == 0) {
+                    rc = rc2;
+                }
+            }
+
+            rc2 = VDBDependenciesCircular(dep, &b, i);
+            if (rc2 == 0) {
+                OUTMSG(("circular=%s,", b ? "true" : "false"));
+            }
+            else {
+                OUTMSG(("VDBDependenciesCircular(%s, %s, %i)=%R ",
+                    name, missing ? "missing" : "all", i, rc2));
+                if (rc == 0) {
+                    rc = rc2;
+                }
+            }
+
+            rc2 = VDBDependenciesType(dep, &type, i);
+            if (rc2 == 0) {
+                rc2 = _KDBPathTypePrint("type=", type, ",");
+                if (rc2 != 0 && rc == 0) {
+                    rc = rc2;
+                }
+            }
+            else {
+                OUTMSG(("VDBDependenciesType(%s, %s, %i)=%R ",
+                    name, missing ? "missing" : "all", i, rc2));
+                if (rc == 0) {
+                    rc = rc2;
+                }
+            }
+
+            rc2 = VDBDependenciesLocal(dep, &b, i);
+            if (rc2 == 0) {
+                OUTMSG(("local=%s,", b ? "local" : "remote"));
+            }
+            else {
+                OUTMSG(("VDBDependenciesLocal(%s, %s, %i)=%R ",
+                    name, missing ? "missing" : "all", i, rc2));
+                if (rc == 0) {
+                    rc = rc2;
+                }
+            }
+
+            rc2 = VDBDependenciesPath(dep, &s, i);
+            if (rc2 == 0) {
+                OUTMSG(("%s\tpathLocal=%s,", eol, s == NULL ? "notFound" : s));
+            }
+            else {
+                OUTMSG(("VDBDependenciesPath(%s, %s, %i)=%R ",
+                    name, missing ? "missing" : "all", i, rc2));
+                if (rc == 0) {
+                    rc = rc2;
+                }
+            }
+
+            rc2 = VDBDependenciesPathRemote(dep, &s, i);
+            if (rc2 == 0) {
+                if (s == NULL) {
+                    OUTMSG(("%s\tpathRemote: notFound ", eol));
+                }
+                else {
+                    OUTMSG(("%s\tpathRemote: %s ", eol, s));
+                    if (!self->noRfs) {
+                        const KFile *f = NULL;
+                        rc2 = KNSManagerMakeHttpFile ( self->knsMgr, & f, NULL, 0x01010000, s );
+                        if (rc2 != 0) {
+                            OUTMSG(("KNSManagerMakeHttpFile=%R", rc2));
+                            if (rc == 0) {
+                                rc = rc2;
+                            }
+                        }
+                        if (rc2 == 0) {
+                            uint64_t sz = 0;
+                            rc2 = KFileSize(f, &sz);
+                            if (rc2 != 0) {
+                                OUTMSG(("KFileSize=%R", rc2));
+                                if (rc == 0) {
+                                    rc = rc2;
+                                }
+                            }
+                            else {
+                                OUTMSG(("%,lu", sz));
+                            }
+                        }
+                        RELEASE(KFile, f);
+                    }
+                }
+            }
+            else {
+                OUTMSG(("VDBDependenciesPathRemote(%s, %s, %i)=%R ",
+                    name, missing ? "missing" : "all", i, rc2));
+                if (rc == 0) {
+                    rc = rc2;
+                }
+            }
+
+            rc2 = VDBDependenciesPathCache(dep, &s, i);
+            if (rc2 == 0) {
+                OUTMSG(("%s\tpathCache: %s ", eol, s == NULL ? "notFound" : s));
+                if (s != NULL) {
+                    char cachecache[PATH_MAX] = "";
+                    rc2 = MainReport(self, s, NULL, NULL, NULL);
+                    OUTMSG(("%s", eol));
+                    if (rc == 0) {
+                        rc = rc2;
+                    }
+                    if (rc2 == 0) {
+                        rc2 = string_printf(cachecache,
+                            sizeof cachecache, NULL, "%s.cache", s);
+                        if (rc2 != 0) {
+                            if (rc == 0) {
+                                rc = rc2;
+                            }
+                            OUTMSG(("string_printf(%s) = %R%s", s, rc2, eol));
+                        }
+                    }
+                    if (rc == 0) {
+                        OUTMSG(("\tpathCache.cache: "));
+                        OUTMSG(("%s ", cachecache));
+                        rc = MainReport(self, cachecache, NULL, NULL, NULL);
+                    }
+                }
+            }
+            else {
+                OUTMSG(("VDBDependenciesPathCache(%s, %s, %i)=%R ",
+                    name, missing ? "missing" : "all", i, rc2));
+                if (rc == 0) {
+                    rc = rc2;
+                }
+            }
+            if (MainHasTest(self, eResolve) && seqId != NULL) {
+                int64_t remoteSz = 0;
+                OUTMSG(("%s", eol));
+
+     /* ignore returned value :
+        resolver's errors are detected but not reported as test-sra's failure */
+                MainResolve(self, NULL, seqId, NULL, &remoteSz, true);
+            }
+
+            if (self->xml) {
+                OUTMSG(("</%s>\n", root));
+            }
+            else {
+                OUTMSG(("%s", eol));
+            }
+        }
+    }
+
+    RELEASE(VDBDependencies, dep);
+    RELEASE(VDatabase, db);
+
+    if (self->xml) {
+        OUTMSG(("</%s>\n", root));
+    }
+
+    return rc;
+}
+
+static rc_t MainPrintAscp(const Main *self) {
+    rc_t rc = 0;
+    bool status = false;
+    const char *b = self->xml ? "  <Ascp>\n"  : "";
+    const char *e = self->xml ? "  </Ascp>\n" : "\n";
+    const char *ascp_bin = NULL;
+    const char *private_file = NULL;
+    AscpOptions opt;
+    memset(&opt, 0, sizeof opt);
+    assert(self);
+    if (MainHasTest(self, eAscpVerbose)) {
+        status = true;
+    }
+    OUTMSG(("%s", b));
+    rc = ascp_locate(&ascp_bin, &private_file, true, status);
+    if (rc != 0) {
+        OUTMSG(("ascp_locate = %R\n", rc));
+    }
+    if (rc == 0) {
+        const char *b = self->xml ? "    <Ascp>"       : "ascp    : ";
+        const char *e = self->xml ? "</Ascp>\n" : "\n";
+        OUTMSG(("%s%s%s", b, ascp_bin == NULL ? "NotFound" : ascp_bin, e));
+    }
+    if (rc == 0) {
+        const char *b = self->xml ? "    <KeyFile>"    : "key file: ";
+        const char *e = self->xml ? "</KeyFile>\n" : "\n";
+        OUTMSG(("%s%s%s", b,
+            private_file == NULL ? "NotFound" : private_file, e));
+    }
+
+    rc = aspera_options(&opt);
+    if (rc != 0) {
+        OUTMSG(("%saspera_options = %R%s", b, rc, e));
+    }
+    if (rc == 0) {
+        const char *b = self->xml ? "    <MaxRate>"    : "max rate: ";
+        const char *e = self->xml ? "</MaxRate>\n" : "\n";
+        OUTMSG(("%s%s%s", b,
+            opt.target_rate == NULL ? "NotFound" : opt.target_rate, e));
+    }
+    if (rc == 0) {
+        const char *b = self->xml ? "    <Disabled>"    : "disabled: ";
+        const char *e = self->xml ? "</Disabled>\n" : "\n";
+        OUTMSG(("%s%s%s", b, opt.disabled ? "true" : "false", e));
+    }
+
+    if (ascp_bin != NULL) {
+        size_t num_writ = 0;
+        char command[PATH_MAX] = "";
+        const char *b = self->xml ? "<Version>\n"  : "";
+        const char *e = self->xml ? "</Version>\n" : "";
+        OUTMSG(("%s", b));
+        rc = string_printf(command, sizeof command, &num_writ,
+            "\"%s\" -A", ascp_bin);
+        if (rc != 0 || num_writ >= sizeof command) {
+            OUTMSG(("cannot generate ascp command: %R\n", rc));
+        }
+        else {
+            int s = system(command);
+            if (s != 0) {
+                OUTMSG(("system(%s) = %d\n", command, s));
+            }
+        }
+        OUTMSG(("%s", e));
+    }
+
+    free((void*)ascp_bin);
+    free((void*)private_file);
+
+    OUTMSG(("%s", e));
+    return 0;
+}
+
+#if 0
+static rc_t PrintCurl(bool full, bool xml) {
+    const char *b = xml ? "  <Curl>"  : "";
+    const char *e = xml ? "</Curl>" : "";
+
+    KNSManager *mgr = NULL;
+
+    rc_t rc = KNSManagerMake(&mgr);
+    if (rc != 0) {
+        OUTMSG(("%sKNSManagerMake = %R%s\n", b, rc, e));
+    }
+    else {
+        rc_t rc = KNSManagerAvail(mgr);
+        OUTMSG(("%s", b));
+
+        if (full) {
+            OUTMSG(("KNSManagerAvail = %R. ", rc));
+        }
+
+        if (rc == 0) {
+            const char *version_string = NULL;
+            rc = KNSManagerCurlVersion(mgr, &version_string);
+            if (rc == 0) {
+                if (full) {
+                    OUTMSG(("Curl Version = %s", version_string));
+                }
+            }
+            else {
+                OUTMSG(("KNSManagerCurlVersion = %R", rc));
+            }
+        }
+
+        if (rc == 0 && !full) {
+            OUTMSG(("libcurl: found"));
+        }
+        OUTMSG(("%s\n", e));
+    }
+
+    RELEASE(KNSManager, mgr);
+
+    return rc;
+}
+#endif
+
+#define kptKartITEM (kptAlias - 1)
+
+static rc_t _KartItemPrint(const KartItem *self, bool xml) {
+    const char root[] = "KartRow";
+    const String *elem = NULL;
+    if (xml) {
+        OUTMSG(("  <%s>\n", root));
+    }
+    {
+        const char root[] = "ProjId";
+        rc_t rc = KartItemProjId(self, &elem);
+        if (rc != 0) {
+            OUTMSG(("KartItem%s = %R\n", root, rc));
+        }
+        else if (xml) {
+            OUTMSG(("    <%s>%S</%s>\n", root, elem, root));
+        }
+        else {
+            OUTMSG(("%s: %S\n", root, elem));
+        }
+    }
+    {
+        const char root[] = "ItemId";
+        rc_t rc = KartItemItemId(self, &elem);
+        if (rc != 0) {
+            OUTMSG(("KartItem%s = %R\n", root, rc));
+        }
+        else if (xml) {
+            OUTMSG(("    <%s>%S</%s>\n", root, elem, root));
+        }
+        else {
+            OUTMSG(("%s: %S\n", root, elem));
+        }
+    }
+    {
+        const char root[] = "Accession";
+        rc_t rc = KartItemAccession(self, &elem);
+        if (rc != 0) {
+            OUTMSG(("KartItem%s = %R\n", root, rc));
+        }
+        else if (xml) {
+            OUTMSG(("    <%s>%S</%s>\n", root, elem, root));
+        }
+        else {
+            OUTMSG(("%s: %S\n", root, elem));
+        }
+    }
+    {
+        const char root[] = "Name";
+        rc_t rc = KartItemName(self, &elem);
+        if (rc != 0) {
+            OUTMSG(("KartItem%s = %R\n", root, rc));
+        }
+        else if (xml) {
+            OUTMSG(("    <%s>%S</%s>\n", root, elem, root));
+        }
+        else {
+            OUTMSG(("%s: %S\n", root, elem));
+        }
+    }
+    {
+        const char root[] = "ItemDesc";
+        rc_t rc = KartItemItemDesc(self, &elem);
+        if (rc != 0) {
+            OUTMSG(("KartItem%s = %R\n", root, rc));
+        }
+        else if (xml) {
+            OUTMSG(("    <%s>%S</%s>\n", root, elem, root));
+        }
+        else {
+            OUTMSG(("%s: %S\n", root, elem));
+        }
+    }
+    if (xml) {
+        OUTMSG(("  </%s>\n", root));
+    }
+    return 0;
+}
+
+/*static rc_t _KartPrint(const Kart *self, bool xml) {
+    const char root[] = "Kart";
+    if (xml) {
+        OUTMSG(("  <%s>\n", root));
+    }
+    rc_t rc = KartPrint(self);
+    if (rc != 0) {
+        OUTMSG(("KartPrint = %R\n", rc));
+    }
+    if (xml) {
+        OUTMSG(("  </%s>\n", root));
+    }
+    return 0;
+}
+static rc_t _KartPrintSized(const Kart *self, bool xml) {
+    return 0;
+}
+*/
+
+static rc_t _KartPrintNumbered(const Kart *self, bool xml) {
+    const char root[] = "Kart";
+    if (xml) {
+        OUTMSG(("  <%s numbered=\"true\">\n", root));
+    }
+    {
+        rc_t rc = KartPrintNumbered(self);
+        if (rc != 0) {
+            OUTMSG(("KartPrint = %R\n", rc));
+        }
+    }
+    if (xml) {
+        OUTMSG(("  </%s>\n", root));
+    }
+    return 0;
+}
+
+
+static rc_t ipv4_endpoint_to_string(char *buffer, size_t buflen, KEndPoint *ep)
+{
+	uint32_t b[4];
+	b[0] = ( ep->u.ipv4.addr & 0xFF000000 ) >> 24;
+	b[1] = ( ep->u.ipv4.addr & 0xFF0000 ) >> 16;
+	b[2] = ( ep->u.ipv4.addr & 0xFF00 ) >> 8;
+	b[3] = ( ep->u.ipv4.addr & 0xFF );
+	return string_printf( buffer, buflen, NULL, "ipv4: %d.%d.%d.%d : %d",
+						   b[0], b[1], b[2], b[3], ep->u.ipv4.port );
+}
+
+static rc_t ipv6_endpoint_to_string(char *buffer, size_t buflen, KEndPoint *ep)
+{
+	uint32_t b[8];
+	b[0] = ( ep->u.ipv6.addr[ 0  ] << 8 ) | ep->u.ipv6.addr[ 1  ];
+	b[1] = ( ep->u.ipv6.addr[ 2  ] << 8 ) | ep->u.ipv6.addr[ 3  ];
+	b[2] = ( ep->u.ipv6.addr[ 4  ] << 8 ) | ep->u.ipv6.addr[ 5  ];
+	b[3] = ( ep->u.ipv6.addr[ 6  ] << 8 ) | ep->u.ipv6.addr[ 7  ];
+	b[4] = ( ep->u.ipv6.addr[ 8  ] << 8 ) | ep->u.ipv6.addr[ 9  ];
+	b[5] = ( ep->u.ipv6.addr[ 10 ] << 8 ) | ep->u.ipv6.addr[ 11 ];
+	b[6] = ( ep->u.ipv6.addr[ 12 ] << 8 ) | ep->u.ipv6.addr[ 13 ];
+	b[7] = ( ep->u.ipv6.addr[ 14 ] << 8 ) | ep->u.ipv6.addr[ 15 ];
+	return string_printf( buffer, buflen, NULL,
+        "ipv6: %.04X:%.04X:%.04X:%.04X:%.04X:%.04X:%.04X:%.04X: :%d", 
+		b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], ep->u.ipv6.port );
+}
+
+static rc_t ipc_endpoint_to_string(char *buffer, size_t buflen, KEndPoint *ep)
+{
+	return string_printf( buffer, buflen, NULL, "ipc: %s", ep->u.ipc_name );
+}
+
+static rc_t endpoint_to_string( char * buffer, size_t buflen, KEndPoint * ep )
+{
+	rc_t rc;
+	switch( ep->type )
+	{
+		case epIPV4 : rc = ipv4_endpoint_to_string( buffer, buflen, ep ); break;
+		case epIPV6 : rc = ipv6_endpoint_to_string( buffer, buflen, ep ); break;
+		case epIPC  : rc = ipc_endpoint_to_string( buffer, buflen, ep ); break;
+		default     : rc = string_printf( buffer, buflen, NULL,
+                          "unknown endpoint-tyep %d", ep->type ); break;
+	}
+	return rc;
+}
+
+static rc_t perfrom_dns_test(const Main *self, const char *eol) {
+    rc_t rc = 0;
+    const char domain[] = "www.ncbi.nlm.nih.gov";
+    const uint16_t port = 80;
+	KEndPoint ep;
+    String s_domain;
+    KTimeMs_t time = 0;
+	KTimeMs_t start_time = KTimeMsStamp();
+    assert(self);
+    StringInitCString(&s_domain, domain);
+    rc = KNSManagerInitDNSEndpoint(self->knsMgr, &ep, &s_domain, port);
+    time = KTimeMsStamp() - start_time;
+    if (rc != 0) {
+        OUTMSG
+            (("KNSManagerInitDNSEndpoint(%s, %d)=%R%s", domain, port, rc, eol));
+    }
+    else {
+        const char root[] = "DnsEndpoint";/*"www.ncbi.nlm.nih.gov", 80*/
+        char s_endpoint[1024] = "";
+        rc = endpoint_to_string(s_endpoint, sizeof s_endpoint, &ep);
+        if (self->xml) {
+            OUTMSG(("  <%s "
+                "domain=\"%s\" port=\"%d\" address=\"%s\" time=\"%d ms\"/>\n",
+                root, domain, port, s_endpoint, time));
+        }
+        else {
+            OUTMSG((
+                "%s domain=\"%s\" port=\"%d\" address=\"%s\" time=\"%d ms\"\n",
+                root, domain, port, s_endpoint, time));
+        }
+    }
+    return rc;
+}
+
+static rc_t read_stream_into_databuffer(
+    KStream *stream, KDataBuffer *databuffer)
+{
+	rc_t rc;
+	
+	size_t total = 0;
+	KDataBufferMakeBytes( databuffer, 4096 );
+	while ( 1 )
+	{
+		size_t num_read;
+		uint8_t * base;
+		uint64_t avail = databuffer->elem_count - total;
+		if ( avail < 256 )
+		{
+			rc = KDataBufferResize( databuffer, databuffer->elem_count + 4096 );
+			if ( rc != 0 )
+			{
+				LogErr( klogErr, rc, "CGI: KDataBufferResize failed" );
+				break;
+			}
+		}
+		
+		base = databuffer->base;
+		rc = KStreamRead(stream, &base[total],
+            (size_t) databuffer->elem_count - total, &num_read);
+		if ( rc != 0 )
+		{
+			/* TBD - look more closely at rc */
+			if ( num_read > 0 )
+			{
+				LogErr( klogErr, rc, "CGI: KStreamRead failed" );
+				rc = 0;
+			}
+			else
+				break;
+		}
+
+		if ( num_read == 0 )
+			break;
+
+		total += num_read;
+	}
+
+	if ( rc == 0 )
+		databuffer->elem_count = total;
+	return rc;
+}
+
+static rc_t call_cgi(const Main *self, const char *cgi_url,
+    uint32_t ver_major, uint32_t ver_minor, const char *protocol,
+    const char *acc, KDataBuffer *databuffer, const char *eol)
+{
+	KHttpRequest *req = NULL;
+    rc_t rc = 0;
+    assert(self);
+    rc = KNSManagerMakeReliableClientRequest
+        (self->knsMgr, &req, 0x01000000, NULL, cgi_url);
+    if (rc != 0) {
+        OUTMSG(
+            ("KNSManagerMakeReliableClientRequest(%s)=%R%s", cgi_url, rc, eol));
+    }
+    if (rc == 0) {
+        const char param[] = "acc";
+		rc = KHttpRequestAddPostParam( req, "%s=%s", param, acc);
+        if (rc != 0) {
+            OUTMSG(("KHttpRequestAddPostParam(%s)=%R%s", param, rc, eol));
+        }
+    }
+    if (rc == 0) {
+        const char param[] = "accept-proto";
+		rc = KHttpRequestAddPostParam( req, "%s=%s", param, protocol);
+        if (rc != 0) {
+            OUTMSG(("KHttpRequestAddPostParam(%s)=%R%s", param, rc, eol));
+        }
+    }
+    if (rc == 0) {
+        const char param[] = "version";
+        rc = KHttpRequestAddPostParam
+            (req, "%s=%u.%u", param, ver_major, ver_minor);
+        if (rc != 0) {
+            OUTMSG(("KHttpRequestAddPostParam(%s)=%R%s", param, rc, eol));
+        }
+    }
+    if (rc == 0) {
+        KHttpResult *rslt = NULL;
+        rc = KHttpRequestPOST(req, &rslt);
+        if (rc != 0) {
+            OUTMSG(("KHttpRequestPOST(%s)=%R%s", cgi_url, rc, eol));
+        }
+        else {
+            const char root[] = "StatusCode";
+            uint32_t code = 0;
+            rc = KHttpResultStatus(rslt, &code, NULL, 0, NULL);
+            if (rc != 0) {
+                OUTMSG(("KHttpResultStatus(%s)=%R%s", cgi_url, rc, eol));
+            }
+            else if (code != 200) {
+                if (self->xml) {
+                    OUTMSG(("    <%s>%d</%s>\n", root, code, root));
+                }
+                else {
+                    OUTMSG(("%s=%d\n", root, code));
+                }
+                rc = RC(rcNS, rcFile, rcReading, rcFile, rcInvalid);
+            }
+            else {
+                KStream *response = NULL;
+                rc = KHttpResultGetInputStream(rslt, &response);
+                if (rc != 0) {
+                    OUTMSG(("KHttpResultGetInputStream(%s)=%R%s",
+                        cgi_url, rc, eol));
+                }
+                else {
+                    rc = read_stream_into_databuffer(response, databuffer);
+                }
+                RELEASE(KStream, response);
+            }
+        }
+
+        RELEASE(KHttpResult, rslt);
+    }
+    RELEASE(KHttpRequest, req);
+    return rc;
+}
+
+static rc_t perform_cgi_test(const Main *self, const char *eol, const char *acc)
+{
+    rc_t rc = 0;
+    const char root[] = "Cgi";
+    KDataBuffer databuffer;
+    KTimeMs_t start_time = KTimeMsStamp();
+    if (acc == NULL) {
+        return 0;
+    }
+    assert(self);
+    memset(&databuffer, 0, sizeof databuffer);
+    if (self->xml) {
+        OUTMSG(("  <%s>\n", root));
+    }
+    {
+        KTimeMs_t time = 0;
+        const char root[] = "Response";
+        rc = call_cgi(self, "http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi"
+            , 1, 1, "http", acc, &databuffer, eol);
+        time = KTimeMsStamp() - start_time;
+        if (rc == 0) {
+            const char *start = databuffer.base;
+            size_t size = KDataBufferBytes(&databuffer);
+            if (self->xml) {
+                OUTMSG(("    <%s time=\"%d ms\">%.*s</%s>\n",
+                    root, time, size, start, root));
+            }
+            else {
+                OUTMSG(("%s = \"%.*s\"  time=\"%d ms\"\n",
+                    root, size, start, time));
+            }
+        }
+        else {/*
+            if (self->xml) {
+                //OUTMSG(("    <%s/>\n", root, size, start, root));
+            }
+            else {
+                //OUTMSG(("%s = '%.*s'\n", root, size, start));
+            }*/
+        }
+    }
+    if (self->xml) {
+        OUTMSG(("  </%s>\n", root));
+    }
+    return rc;
+}
+
+static rc_t MainNetwotk(const Main *self, const char *arg, const char *eol)
+{
+    const char root[] = "Network";
+    assert(self);
+    if (self->xml) {
+        OUTMSG(("<%s>\n", root));
+    }
+    {
+        const char root[] = "HttpProxy";
+        bool enabled = KNSManagerGetHTTPProxyEnabled(self->knsMgr);
+        if (!enabled) {
+            if (self->xml) {
+                OUTMSG(("  <%s enabled=\"false\">\n", root));
+            }
+            else {
+                OUTMSG(("HTTPProxyEnabled=\"false\"\n", root));
+            }
+        }
+        else {
+            if (self->xml) {
+                OUTMSG(("  <%s enabled=\"true\">\n", root));
+            }
+            else {
+                OUTMSG(("HTTPProxyEnabled=\"true\"\n", root));
+            }
+        }
+        {
+            const String *proxy = NULL;
+            rc_t rc = KNSManagerGetHTTPProxyPath(self->knsMgr, &proxy);
+            if (rc != 0) {
+                OUTMSG(("KNSManagerGetHTTPProxyPath()=%R%s", rc, eol));
+            }
+            else {
+                const char root[] = "Path";
+                if (self->xml) {
+                    OUTMSG(("    <%s>%S</%s>\n", root, proxy, root));
+                }
+                else {
+                    OUTMSG(("HTTPProxyPath=\"%S\"\n", proxy));
+                }
+            }
+        }
+        if (self->xml) {
+            OUTMSG(("  </%s>\n", root));
+        }
+    }
+    {
+		const char *user_agent = NULL;
+        rc_t rc = KNSManagerGetUserAgent(&user_agent);
+        if (rc != 0) {
+            OUTMSG(("KNSManagerGetUserAgent()=%R%s", rc, eol));
+        }
+        else {
+            const char root[] = "UserAgent";
+            if (self->xml) {
+                OUTMSG(("  <%s>%s</%s>\n", root, user_agent, root));
+            }
+            else {
+                OUTMSG(("UserAgent=\"%s\"\n", user_agent));
+            }
+        }
+    }
+    perfrom_dns_test(self, eol);
+    perform_cgi_test(self, eol, arg);
+    if (self->xml) {
+        OUTMSG(("</%s>\n", root));
+    }
+    return 0;
+}
+
+static
+rc_t MainExec(const Main *self, const KartItem *item, const char *aArg, ...)
+{
+    const char root[] = "Object";
+
+    rc_t rc = 0;
+    rc_t rce = 0;
+
+    KPathType type = kptNotFound;
+    bool alias = false;
+    int64_t directSz = -1;
+    int64_t localSz = -1;
+    int64_t remoteSz = -1;
+    size_t num_writ = 0;
+    char arg[PATH_MAX] = "";
+
+    const char *eol = NULL;
+
+    va_list args;
+    va_start(args, aArg);
+
+    assert(self);
+
+    eol = self->xml ? "<br/>\n" : "\n";
+
+    if (self->xml) {
+        OUTMSG(("<%s>\n", root));
+    }
+
+    if (item != NULL) {
+        type = kptKartITEM;
+
+        _KartItemPrint(item, self->xml);
+    }
+
+    else {
+        rc = string_vprintf(arg, sizeof arg, &num_writ, aArg, args);
+        if (rc != 0) {
+            OUTMSG(("string_vprintf(%s)=%R%s", aArg, rc, eol));
+            return rc;
+        }
+        assert(num_writ < sizeof arg);
+
+        OUTMSG(("\n"));
+        rc = printString(arg);
+        if (rc != 0) {
+            OUTMSG(("printString=%R%s", rc, eol));
+            return rc;
+        }
+        if (MainHasTest(self, eType)) {
+            OUTMSG((" "));
+            rc = MainReport(self, arg, &directSz, &type, &alias);
+        }
+        else {
+            type = KDirectoryPathType(self->dir, "%s", arg);
+        }
+        OUTMSG(("%s", eol));
+
+        if (MainHasTest(self, eOpenTable)) {
+            MainOpenAs(self, arg, false);
+        }
+        if (MainHasTest(self, eOpenDB)) {
+            MainOpenAs(self, arg, true);
+        }
+    }
+
+    if (self->recursive && type == kptDir && !alias) {
+        uint32_t i = 0;
+        uint32_t count = 0;
+        KNamelist *list = NULL;
+        rc = KDirectoryList(self->dir, &list, NULL, NULL, "%s", arg);
+        if (rc != 0) {
+            OUTMSG(("KDirectoryList(%s)=%R ", arg, rc));
+        }
+        else {
+            rc = KNamelistCount(list, &count);
+            if (rc != 0) {
+                OUTMSG(("KNamelistCount(KDirectoryList(%s))=%R ", arg, rc));
+            }
+        }
+        for (i = 0; i < count && rc == 0; ++i) {
+            const char *name = NULL;
+            rc = Quitting();
+            if (rc != 0) {
+                break;
+            }
+            rc = KNamelistGet(list, i, &name);
+            if (rc != 0) {
+                OUTMSG(("KNamelistGet(KDirectoryList(%s), %d)=%R ",
+                    arg, i, rc));
+            }
+            else {
+                rc_t rc2 = MainExec(self, NULL, "%s/%s", arg, name);
+                if (rc2 != 0 && rce == 0) {
+                    rce = rc2;
+                }
+            }
+        }
+        RELEASE(KNamelist, list);
+    }
+    else {
+        bool isKart = false;
+        Kart *kart = NULL;
+        if (type == kptFile) {
+            rc_t rc = KartMake(self->dir, arg, &kart, &isKart);
+            if (rc != 0) {
+                OUTMSG(("KartMake = %R\n", rc));
+            }
+        }
+
+        if (isKart) {
+            const KartItem *item = NULL;
+            while (true) {
+                rc_t rc2 = 0;
+                RELEASE(KartItem, item);
+                rc2 = Quitting();
+                if (rc2 != 0) {
+                    if (rce == 0) {
+                        rce = rc2;
+                    }
+                    break;
+                }
+                rc2 = KartMakeNextItem(kart, &item);
+                if (rc2 != 0) {
+                    OUTMSG(("KartMakeNextItem = %R\n", rc2));
+                    if (rce == 0) {
+                        rce = rc2;
+                    }
+                    break;
+                }
+                if (item == NULL) {
+                    break;
+                }
+                rc2 = MainExec(self, item, NULL);
+                if (rc2 != 0 && rce == 0) {
+                    rce = rc2;
+                }
+            }
+            if (true) {
+                _KartPrintNumbered(kart, self->xml);
+            }
+            /*if (true) {
+                _KartPrint(kart, self->xml);
+            }
+            if (true) {
+                _KartPrintSized(kart, self->xml);
+            }*/
+            KartRelease(kart);
+            kart = NULL;
+        }
+        else {
+            if (MainHasTest(self, eResolve)) {
+     /* ignore returned value :
+        resolver's errors are detected but not reported as test-sra's failure */
+                MainResolve(self, item, arg, &localSz, &remoteSz, false);
+            }
+
+            if (MainHasTest(self, eNetwork)) {
+                MainNetwotk(self, arg, eol);
+            }
+
+            if (item == NULL) { /* TODO || kartitem & database */
+                if (type == kptDatabase || type == kptNotFound) {
+                    if (MainHasTest(self, eDependMissing)) {
+                        rc_t rc2 = MainDepend(self, arg, true);
+                        if (rc == 0 && rc2 != 0) {
+                            rc = rc2;
+                        }
+                    }
+
+                    if (MainHasTest(self, eDependAll)) {
+                        rc_t rc2 = MainDepend(self, arg, false);
+                        if (rc == 0 && rc2 != 0) {
+                            rc = rc2;
+                        }
+                    }
+                }
+            }
+
+            if (MainHasTest(self, eResolve) && (
+                (directSz != -1 && localSz != -1 && directSz != localSz) ||
+                (remoteSz != -1 && localSz != -1 && localSz != remoteSz))
+               )
+            {
+                OUTMSG(("FILE SIZES DO NOT MATCH: "));
+                if (directSz != -1 && localSz != -1 &&
+                    directSz != remoteSz)
+                {
+                    OUTMSG(("direct=%ld != remote=%ld. ", directSz, remoteSz));
+                }
+                if (remoteSz != -1 && localSz != -1 &&
+                    localSz != remoteSz)
+                {
+                    OUTMSG(("local=%ld != remote=%ld. ", localSz, remoteSz));
+                }
+                OUTMSG(("\n"));
+            }
+
+        }
+    }
+
+    if (rce != 0 && rc == 0) {
+        rc = rce;
+    }
+
+    if (self->xml) {
+        OUTMSG(("</%s>\n", root));
+    }
+
+    va_end(args);
+    return rc;
+}
+
+static
+rc_t _SraReleaseVersionPrint(const SraReleaseVersion *self, rc_t rc, bool xml,
+    const char *error, const char *msg)
+{
+    assert(self && error && msg);
+
+    if (rc != 0) {
+        OUTMSG(("ERROR: %s.", error));
+    }
+    else {
+        char version[256] = "";
+        const char *eol = xml ? "<br/>\n" : "\n";
+        rc = SraReleaseVersionPrint(self, version, sizeof version, NULL);
+        if (rc == 0) {
+            rc = OUTMSG(("%s: %s.%s", msg, version, eol));
+        }
+    }
+
+    return rc;
+}
+
+static rc_t _KDyldLoadLib(KDyld *self, char *name, size_t sz,
+    const char *path, bool xml, int indent)
+{
+    rc_t rc = 0;
+    KDylib *lib = NULL;
+    rc = KDyldLoadLib(self, &lib, "%.*s", sz, path);
+    if (rc == 0) {
+        rc = OUTMSG(("LOADED %.*s\n", sz, path));
+    }
+    else {
+        rc = OUTMSG(("NOT LOADED %.*s\n", sz, path));
+    }
+    RELEASE(KDylib, lib);
+    return rc;
+}
+
+static
+rc_t _KHttpRequestPOST(KHttpRequest *self, KDataBuffer *result, size_t *total) {
+    rc_t rc = 0;
+    KHttpResult *rslt = NULL;
+    assert(result && total);
+    memset(result, 0, sizeof *result);
+    *total = 0;
+    rc = KHttpRequestPOST(self, &rslt);
+    if (rc == 0) {
+        uint32_t code = 0;
+        size_t msg_size = 0;
+        char msg_buff[256] = "";
+        rc = KHttpResultStatus(rslt,
+            &code, msg_buff, sizeof msg_buff, &msg_size);
+        if (rc == 0 && code == 200) {
+            KStream *response = NULL;
+            rc = KHttpResultGetInputStream( rslt, &response);
+            if (rc == 0) {
+                size_t num_read = 0;
+                KDataBufferMakeBytes(result, 4096);
+                while (true) {
+                    uint8_t *base = NULL;
+                    uint64_t avail = result->elem_count - *total;
+                    if (avail < 256) {
+                        rc = KDataBufferResize
+                            (result, result->elem_count + 4096);
+                        if (rc != 0) {
+                            break;
+                        }
+                    }
+                    base = result->base;
+                    rc = KStreamRead(response, &base[*total],
+                        result->elem_count - *total, &num_read);
+                    if (rc != 0) {
+                        if (num_read > 0) {
+                            rc = 0;
+                        }
+                        else {
+                            break;
+                        }
+                    }
+                    if (num_read == 0) {
+                        break;
+                    }
+                    *total += num_read;
+                }
+                RELEASE(KStream, response);
+            }
+        }
+    }
+    RELEASE(KHttpResult, rslt);
+    return rc;
+}
+
+static
+rc_t _MainPost(const Main *self, const char *name, char *buffer, size_t sz)
+{
+    rc_t rc = 0;
+
+    KHttpRequest *req = NULL;
+    KDataBuffer result;
+
+    size_t total = 0;
+
+    assert(self && buffer && sz);
+
+    buffer[0] = '\0';
+
+    rc = KNSManagerMakeRequest(self->knsMgr, &req, 0x01000000, NULL,
+        "http://trace.ncbi.nlm.nih.gov/Traces/sratoolkit/sratoolkit.cgi");
+
+    if (rc == 0) {
+        rc = KHttpRequestAddPostParam(req, "cmd=vers");
+    }
+    if (rc == 0) {
+        rc = KHttpRequestAddPostParam(req, "libname=%s", name);
+    }
+    if (rc == 0) {
+        rc = _KHttpRequestPOST(req, &result, &total);
+    }
+
+    if (rc == 0) {
+        const char *start = (const void*)(result.base);
+        if (total > 0) {
+            if (*(start + total) != '\0') {
+                rc = RC(rcExe, rcString, rcParsing, rcString, rcUnexpected);
+            }
+            else if (*(start + total - 1) != '\n') {
+                rc = RC(rcExe, rcString, rcParsing, rcString, rcUnexpected);
+            }
+            else {
+                string_copy(buffer, sz, start, total - 1);
+            }
+        }
+    }
+
+    KDataBufferWhack(&result);
+    RELEASE(KHttpRequest, req);
+
+    return rc;
+}
+
+static rc_t _MainPrintNgsInfo(const Main* self) {
+    rc_t rc = 0;
+    const char root[] = "Ngs";
+    KDyld *l = NULL;
+    assert(self);
+    if (self->xml) {
+        OUTMSG(("  <%s>\n", root));
+    }
+    {
+        const char root[] = "Latest";
+        char v[512];
+        if (self->xml) {
+            OUTMSG(("    <%s>\n", root));
+        }
+        {
+            const char name[] = "ncbi-vdb";
+            _MainPost(self, name, v, sizeof v);
+            if (self->xml) {
+                OUTMSG(("      <%s version=\"%s\"/>\n", name, v));
+            }
+            else {
+                OUTMSG(("%s latest version=\"%s\"\n", name, v));
+            }
+        }
+        {
+            const char name[] = "ngs-sdk";
+            _MainPost(self, name, v, sizeof v);
+            if (self->xml) {
+                OUTMSG(("      <%s version=\"%s\"/>\n", name, v));
+            }
+            else {
+                OUTMSG(("%s latest version=\"%s\"\n", name, v));
+                OUTMSG(("\n"));
+            }
+        }
+        if (self->xml) {
+            OUTMSG(("    </%s>\n", root));
+        }
+    }
+    rc = KDyldMake(&l);
+    {
+        String *result = NULL;
+        rc = KConfigReadString(self->cfg, "NCBI_HOME", &result);
+        if (rc == 0) {
+            bool found = false;
+            const KFile *f = NULL;
+            char *buffer = NULL;
+            char *ps = NULL;
+            size_t ls = 0;
+            char *pv = NULL;
+            size_t lv = 0;
+            assert(result);
+            rc = KDirectoryOpenFileRead
+                (self->dir, &f, "%s/LibManager.properties", result->addr);
+            if (rc == 0) {
+                uint64_t size = 0;
+                rc = KFileSize(f, &size);
+                if (rc == 0) {
+                    buffer = malloc(size + 1);
+                    if (buffer == NULL) {
+                        rc = RC(rcExe, rcData, rcAllocating,
+                            rcMemory, rcExhausted);
+                    }
+                    else {
+                        size_t num_read = 0;
+                        rc = KFileRead(f, 0, buffer, size + 1, &num_read);
+                        if (rc == 0) {
+#if _ARCH_BITS == 32
+                            const char* sneed = "/dll/ngs-sdk/32/loaded/path=";
+                            const char* vneed = "/dll/ncbi-vdb/32/loaded/path=";
+#else
+                            const char* sneed = "/dll/ngs-sdk/64/loaded/path=";
+                            const char* vneed = "/dll/ncbi-vdb/64/loaded/path=";
+#endif
+
+                            assert(num_read <= size);
+                            buffer[num_read] = '\0';
+                            found = true;
+
+                            ps = strstr(buffer, sneed);
+                            if (ps != NULL) {
+                                ps += strlen(sneed);
+                            }
+                            if (ps != NULL) {
+                                const char *e = strchr(ps, '\n');
+                                if (e != NULL) {
+                                    ls = e - ps;
+                                }
+                            }
+
+                            pv = strstr(buffer, vneed);
+                            if (pv != NULL) {
+                                pv += strlen(vneed);
+                            }
+                            if (pv != NULL) {
+                                const char *e = strchr(pv, '\n');
+                                if (e != NULL) {
+                                    lv = e - pv;
+                                }
+                            }
+                        }
+                    }
+                }
+                RELEASE(KFile, f);
+            }
+            if (self->xml) {
+                if (found) {
+                    OUTMSG(("    <LibManager>\n"
+                            "      <Properties>\n%s"
+                            "      </Properties>\n", buffer));
+                    if (ls != 0) {
+                        OUTMSG(("      <ngs-sdk>\n"
+                                "        <Path>%.*s</Path>\n", ls, ps));
+                        _KDyldLoadLib(l, "ngs-sdk", ls, ps, self->xml, 8);
+                        OUTMSG(("      </ngs-sdk>\n"));
+                    }
+                    if (lv != 0) {
+                        OUTMSG(("      <ncbi-vdb>\n"
+                                "        <Path>%.*s</Path>\n", lv, pv));
+                        _KDyldLoadLib(l, "ncbi-vdb", ls, ps, self->xml, 8);
+                        OUTMSG(("      </ncbi-vdb>\n"));
+                    }
+                    OUTMSG(("    </LibManager>\n"));
+                }
+                else {
+                    OUTMSG(("    <LibManager.properties/>\n"));
+                }
+            }
+            else {
+                OUTMSG(("LibManager.properties=\n"));
+                if (found) {
+                    OUTMSG(("%s\n", buffer));
+                    if (ls != 0) {
+                        OUTMSG(("LibManager.ngs-sdk='%.*s'\n", ls, ps));
+                    }
+                    if (lv != 0) {
+                        OUTMSG(("LibManager.ngs-sdk='%.*s'\n", lv, pv));
+                    }
+                }
+            }
+            free(buffer);
+            buffer = NULL;
+            free(result);
+            result = NULL;
+        }
+    }
+    {
+        const char root[] = "ncbi-vdb";
+        if (self->xml) {
+            OUTMSG(("    <%s>\n", root));
+        }
+        if (self->xml) {
+            OUTMSG(("    </%s>\n", root));
+        }
+    }
+    {
+        const char root[] = "ngs-sdk";
+        if (self->xml) {
+            OUTMSG(("    <%s>\n", root));
+        }
+        if (self->xml) {
+            OUTMSG(("    </%s>\n", root));
+        }
+    }
+    if (self->xml) {
+        OUTMSG(("  </%s>\n", root));
+    }
+    RELEASE(KDyld, l);
+    return rc;
+}
+
+static rc_t MainPrintVersion(Main *self) {
+    const char root[] = "Version";
+
+    rc_t rc = 0;
+
+    SraReleaseVersion version;
+    SraReleaseVersion newVersion;
+
+    assert(self);
+
+    if (MainHasTest(self, eNewVersion)) {
+        MainAddTest(self, eVersion);
+    }
+
+    if (!MainHasTest(self, eVersion)) {
+        return 0;
+    }
+    memset(&version, 0, sizeof version);
+    memset(&newVersion, 0, sizeof newVersion);
+    if (self->xml) {
+        OUTMSG(("  <%s>\n", root));
+    }
+    rc = SraReleaseVersionGet(&version);
+    rc = _SraReleaseVersionPrint(&version, rc, self->xml,
+        "cannot get SRA Toolkit release version",
+        "NCBI SRA Toolkit release version");
+
+    if (MainHasTest(self, eNewVersion)) {
+        int32_t isNew = 0;
+        rc = KNSManagerNewReleaseVersion(self->knsMgr, &newVersion);
+        rc = _SraReleaseVersionPrint(&newVersion, rc, self->xml,
+            "cannot get latest available SRA Toolkit release version",
+            "Latest available NCBI SRA Toolkit release version");
+        if (rc == 0) {
+            rc = SraReleaseVersionCmp(&version, &newVersion, &isNew);
+        }
+        if (rc == 0) {
+            if (isNew > 0) {
+                OUTMSG((
+           "A new version of SRA Toolkit is available for download from\n"
+           "\"http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software\".\n"
+                ));
+            }
+            else if (isNew == 0) {
+                OUTMSG(("You already have the latest version of "
+                    "SRA Toolkit.\n"));
+            }
+            else {
+                OUTMSG(("Your version of "
+                    "SRA Toolkit is more recent than the latest available.\n"));
+            }
+        }
+    }
+
+    if (self->xml) {
+        OUTMSG(("  </%s>\n", root));
+    }
+    else if (self->full) {
+        OUTMSG(("\n"));
+    }
+
+    return rc;
+}
+
+static rc_t MainFini(Main *self) {
+    rc_t rc = 0;
+
+    assert(self);
+
+    RELEASE(VResolver, self->resolver);
+    RELEASE(KConfig, self->cfg);
+    RELEASE(KNSManager, self->knsMgr);
+    RELEASE(KRepositoryMgr, self->repoMgr);
+    RELEASE(VFSManager, self->vMgr);
+    RELEASE(VDBManager, self->mgr);
+    RELEASE(KDirectory, self->dir);
+    RELEASE(VSchema, self->schema);
+
+    return rc;
+}
+
+#define OPTION_CACHE "allow-caching"
+#define ALIAS_CACHE  "C"
+static const char* USAGE_CACHE[] = { "do not disable caching", NULL };
+
+#define OPTION_BYTES "bytes"
+#define ALIAS_BYTES  "b"
+static const char* USAGE_BYTES[]
+    = { "print the first <K> bytes of resolved remote HTTP file", NULL };
+
+#define OPTION_FULL "full"
+#define ALIAS_FULL  NULL
+static const char* USAGE_FULL[] = { "full test mode", NULL };
+
+#define OPTION_QUICK "quick"
+#define ALIAS_QUICK  "Q"
+static const char* USAGE_QUICK[] = { "quick test mode", NULL };
+
+#define OPTION_NO_RFS "no-rfs"
+static const char* USAGE_NO_RFS[]
+    = { "do not check remote file size for dependencies", NULL };
+
+#define OPTION_NO_VDB "no-vdb"
+#define ALIAS_NO_VDB  "N"
+static const char* USAGE_NO_VDB[] = { "do not call VDBManagerPathType", NULL };
+
+#define OPTION_PRJ "project-id"
+#define ALIAS_PRJ  "p"
+static const char* USAGE_PRJ[] = { "set project context", NULL };
+
+#define OPTION_REC "recursive"
+#define ALIAS_REC  "R"
+static const char* USAGE_REC[] = { "check object type recursively", NULL };
+
+#define OPTION_OUT "output"
+#define ALIAS_OUT  "X"
+static const char* USAGE_OUT[] = { "output type: one of (xml text)", NULL };
+
+OptDef Options[] = {                             /* needs_value, required */
+    { OPTION_BYTES , ALIAS_BYTES , NULL, USAGE_BYTES , 1, true, false },
+    { OPTION_CACHE , ALIAS_CACHE , NULL, USAGE_CACHE , 1, false, false },
+    { OPTION_FULL  , ALIAS_FULL  , NULL, USAGE_FULL  , 1, false, false },
+    { OPTION_NO_RFS, NULL        , NULL, USAGE_NO_RFS, 1, false, false },
+    { OPTION_NO_VDB, ALIAS_NO_VDB, NULL, USAGE_NO_VDB, 1, false, false },
+    { OPTION_OUT   , ALIAS_OUT   , NULL, USAGE_OUT   , 1, true , false },
+    { OPTION_PRJ   , ALIAS_PRJ   , NULL, USAGE_PRJ   , 1, true , false },
+    { OPTION_QUICK , ALIAS_QUICK , NULL, USAGE_QUICK , 1, false, false },
+    { OPTION_REC   , ALIAS_REC   , NULL, USAGE_REC   , 1, false, false },
+};
+
+rc_t CC KMain(int argc, char *argv[]) {
+    rc_t rc = 0;
+    uint32_t pcount = 0;
+    uint32_t i = 0;
+    Args *args = NULL;
+    rc_t rc3 = 0;
+    int argi = 0;
+
+    Main prms;
+    char **argv2 = MainInit(&prms, argc, argv, &argi);
+
+    if (rc == 0) {
+        rc = ArgsMakeAndHandle(&args, argi, argv2, 1,
+            Options, sizeof Options / sizeof Options[0]);
+    }
+
+    if (rc == 0) {
+        rc = ArgsOptionCount(args, OPTION_CACHE, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure to get '" OPTION_CACHE "' argument");
+        }
+        else {
+            if (pcount > 0) {
+                prms.allowCaching = true;
+            }
+        }
+    }
+
+    if (rc == 0) {
+        rc = ArgsOptionCount(args, OPTION_PRJ, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure to get '" OPTION_PRJ "' argument");
+        }
+        else {
+            if (pcount > 0) {
+                const char *dummy = NULL;
+                rc = ArgsOptionValue
+                    (args, OPTION_PRJ, 0, (const void **)&dummy);
+                if (rc != 0) {
+                    LOGERR(klogErr, rc,
+                        "Failure to get '" OPTION_PRJ "' argument");
+                }
+                else {
+                    prms.projectId = AsciiToU32(dummy, NULL, NULL);
+                }
+            }
+        }
+    }
+
+    prms.full = true;
+
+    if (rc == 0) {
+        rc = ArgsOptionCount(args, OPTION_QUICK, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure to get '" OPTION_QUICK "' argument");
+        }
+        else {
+            if (pcount > 0) {
+                prms.full = false;
+            }
+        }
+    }
+
+    if (rc == 0) {
+        rc = ArgsOptionCount(args, OPTION_FULL, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure to get '" OPTION_FULL "' argument");
+        }
+        else {
+            if (pcount > 0) {
+                prms.full = true;
+            }
+        }
+    }
+
+    if (rc == 0) {
+        prms.bytes = 256;
+        rc = ArgsOptionCount(args, OPTION_BYTES, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure to get '" OPTION_BYTES "' argument");
+        }
+        else {
+            if (pcount > 0) {
+                const char *val = NULL;
+                rc = ArgsOptionValue
+                    (args, OPTION_BYTES, 0, (const void **)&val);
+                if (rc == 0) {
+                    int bytes = atoi(val);
+                    if (bytes > 0) {
+                        prms.bytes = bytes;
+                        MainAddTest(&prms, ePrintFile);
+                        MainAddTest(&prms, eResolve);
+                    }
+                } else {
+                    LOGERR(klogErr, rc,
+                        "Failure to get '" OPTION_BYTES "' argument value");
+                }
+            }
+        }
+    }
+
+    if (!prms.full) {
+        MainMakeQuick(&prms);
+    }
+
+    if (rc == 0) {
+        rc = MainInitObjects(&prms);
+    }
+
+    if (rc == 0) {
+        const char root[] = "Test-sra";
+        rc = ArgsOptionCount(args, OPTION_OUT, &pcount);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure to get '" OPTION_OUT "' argument");
+        }
+        else {
+            if (pcount > 0) {
+                const char *dummy = NULL;
+                rc =
+                    ArgsOptionValue(args, OPTION_OUT, 0, (const void **)&dummy);
+                if (rc != 0) {
+                    LOGERR(klogErr, rc,
+                        "Failure to get '" OPTION_OUT "' argument");
+                }
+                else if (strcmp(dummy, "x") == 0 || strcmp(dummy, "X") == 0) {
+                    prms.xml = true;
+                }
+                else {
+                    prms.xml = false;
+                }
+            }
+            else {
+                prms.xml = MainHasTest(&prms, eCfg)
+                    || MainHasTest(&prms, eNcbiReport);
+            }
+        }
+
+        if (prms.xml) {
+            OUTMSG(("<%s>\n", root));
+        }
+
+        if (MainHasTest(&prms, eNgs)) {
+            _MainPrintNgsInfo(&prms);
+        }
+
+        MainPrintVersion(&prms);
+
+        if (MainHasTest(&prms, eCfg)) {
+            rc_t rc2 = MainPrintConfig(&prms);
+            if (rc == 0 && rc2 != 0) {
+                rc = rc2;
+            }
+        }
+
+        if (MainHasTest(&prms, eOS)) {
+            PrintOS(prms.xml);
+        }
+
+        if (MainHasTest(&prms, eAscp)) {
+            MainPrintAscp(&prms);
+        }
+
+        if (!prms.full) {
+            rc_t rc2 = MainQuickCheck(&prms);
+            if (rc == 0 && rc2 != 0) {
+                rc = rc2;
+            }
+        }
+
+        if (rc == 0) {
+            rc = ArgsOptionCount(args, OPTION_NO_RFS, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc,
+                    "Failure to get '" OPTION_NO_RFS "' argument");
+            }
+            else {
+                if (pcount > 0) {
+                    prms.noRfs = true;
+                }
+            }
+        }
+
+        if (rc == 0) {
+            rc = ArgsOptionCount(args, OPTION_NO_VDB, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc,
+                    "Failure to get '" OPTION_NO_VDB "' argument");
+            }
+            else {
+                if (pcount > 0) {
+                    prms.noVDBManagerPathType = true;
+                }
+            }
+        }
+
+        if (rc == 0) {
+            rc = ArgsOptionCount(args, OPTION_REC, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_REC "' argument");
+            }
+            else {
+                if (pcount > 0) {
+                    prms.recursive = true;
+                }
+            }
+        }
+
+        if (rc == 0) {
+            rc = ArgsParamCount(args, &pcount);
+        }
+/* TODO if pcount == 0 && there are no test type options use a small run as name[0]*/
+        for (i = 0; i < pcount; ++i) {
+            const char *name = NULL;
+            rc3 = ArgsParamValue(args, i, (const void **)&name);
+            if (rc3 == 0) {
+                rc_t rc2 = Quitting();
+                if (rc2 != 0) {
+                    if (rc == 0 && rc2 != 0) {
+                        rc = rc2;
+                    }
+                    break;
+                }
+                ReportResetObject(name);
+                rc2 = MainExec(&prms, NULL, name);
+                if (rc == 0 && rc2 != 0) {
+                    rc = rc2;
+                }
+            }
+        }
+        if (rc == 0 && rc3 != 0) {
+            rc = rc3;
+        }
+
+        if (MainHasTest(&prms, eNcbiReport)) {
+            ReportForceFinalize();
+        }
+
+        if (!prms.full) {
+            OUTMSG(("\nAdd -F option to try all the tests."));
+        }
+
+        if (prms.xml) {
+            OUTMSG(("</%s>\n", root));
+        }
+    }
+
+    RELEASE(Args, args);
+
+    {
+        rc_t rc2 = MainFini(&prms);
+        if (rc == 0 && rc2 != 0) {
+            rc = rc2;
+        }
+    }
+    free(argv2);
+
+    return rc;
+}
diff --git a/tools/util/testld.c b/tools/util/testld.c
new file mode 100644
index 0000000..58b31c5
--- /dev/null
+++ b/tools/util/testld.c
@@ -0,0 +1,249 @@
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/rc.h>
+
+#include <klib/vector.h>
+#include <kfs/directory.h>
+#include <kfs/dyload.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+
+/* update libpath
+ */
+static
+void testld_update_libpath ( KDyld *dl, const char *path )
+{
+    rc_t rc = 0;
+
+    const char *end;
+    for ( end = strchr ( path, ':' ); end != NULL; end = strchr ( path = end + 1, ':' ) )
+    {
+        if ( path < end )
+        {
+            rc = KDyldAddSearchPath ( dl, "%.*s",
+                                      ( int ) ( end - path ), path );
+            if ( rc != 0 )
+            {
+                PLOGERR ( klogWarn, ( klogWarn, rc, "failed to add library path '$(path)'",
+                                      "path=%.*s", ( int ) ( end - path ), path ));
+            }
+        }
+    }
+
+    if ( path [ 0 ] != 0 )
+    {
+        rc = KDyldAddSearchPath ( dl, path );
+        if ( rc != 0 )
+        {
+            PLOGERR ( klogWarn, ( klogWarn, rc, "failed to add library path '$(path)'", "path=s", path ));
+        }
+    }
+}
+
+
+/* load library
+ */
+static
+void testld_load_library ( KDyld *dl, KDlset *libs, const char *libname )
+{
+    KDylib *lib;
+    rc_t rc = KDyldLoadLib ( dl, & lib, libname );
+    if ( rc != 0 )
+    {
+        PLOGERR ( klogErr, ( klogErr, rc, "failed to load library '$(name)'",
+                             "name=%s", libname ));
+    }
+    else
+    {
+        printf ( "loaded library '%s'\n", libname);
+
+        rc = KDlsetAddLib ( libs, lib );
+        if ( rc != 0 )
+        {
+            PLOGERR ( klogInt, ( klogInt, rc, "failed to retain library '$(name)'",
+                                 "name=%s", libname ));
+        }
+
+        KDylibRelease ( lib );
+    }
+}
+
+/* KMain - EXTERN
+ *  executable entrypoint "main" is implemented by
+ *  an OS-specific wrapper that takes care of establishing
+ *  signal handlers, logging, etc.
+ *
+ *  in turn, OS-specific "main" will invoke "KMain" as
+ *  platform independent main entrypoint.
+ *
+ *  "argc" [ IN ] - the number of textual parameters in "argv"
+ *  should never be < 0, but has been left as a signed int
+ *  for reasons of tradition.
+ *
+ *  "argv" [ IN ] - array of NUL terminated strings expected
+ *  to be in the shell-native character set: ASCII or UTF-8
+ *  element 0 is expected to be executable identity or path.
+ */
+
+#define OPTION_LOAD "lib-path"
+#define ALIAS_LOAD  "l"
+
+static
+const char * load_usage [] = 
+	{ "Path(s) for loading dynamic libraries.", NULL };
+
+static
+OptDef MyOptions[] =
+{
+    { OPTION_LOAD, ALIAS_LOAD, NULL, load_usage, 0, true, false }
+};
+
+
+const char UsageDefaultName[] = "testld";
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s [Options]\n"
+                    "\n"
+                    "Summary:\n"
+                    "  Test for dynamic loading.\n"
+                    "\n", progname);
+}
+
+
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+
+    UsageSummary (progname);
+
+    OUTMSG (("Options\n"));
+
+    HelpOptionLine (ALIAS_LOAD, OPTION_LOAD, "Path", load_usage);
+
+    HelpOptionsStandard ();
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args * args;
+    rc_t rc;
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 1, MyOptions, sizeof MyOptions / sizeof (OptDef));
+    if (rc)
+        LOGERR (klogInt, rc, "failed to parse arguments");
+
+    else
+    {
+        do
+        {
+            KDyld *dl;
+            uint32_t num_libs;
+
+            rc = ArgsParamCount (args, &num_libs);
+            if (rc)
+            {
+                LOGERR ( klogInt, rc, "Failure to count parameters" );
+                break;
+            }
+
+            if (num_libs == 0)
+            {
+                rc = MiniUsage(args);
+                break;
+            }
+
+            /* create loader */
+            rc = KDyldMake (&dl);
+            if (rc)
+            {
+                LOGERR ( klogInt, rc, "failed to create dynamic loader" );
+                break;
+            }
+            else
+            {
+                do
+                {
+                    KDlset *libs;
+                    const char * path;
+                    uint32_t ix;
+                    uint32_t num_paths;
+
+                    rc = ArgsOptionCount (args, OPTION_LOAD, &num_paths);
+                    if (rc)
+                    {
+                        LOGERR (klogInt, rc, "failed to count paths");
+                        break;
+                    }
+
+                    for (ix = 0; ix < num_paths; ix++)
+                    {
+
+                        rc = ArgsOptionValue (args, OPTION_LOAD, ix, (const void **)&path);
+                        if (rc)
+                        {
+                            LOGERR (klogInt, rc, "failed to access a path option");
+                            break;
+                        }
+                        testld_update_libpath (dl, path);
+                    }
+                    if (rc)
+                        break;
+
+                    /* append contents of LD_LIBRARY_PATH */
+                    path = getenv ( "LD_LIBRARY_PATH" );
+
+                    if (path)
+                        testld_update_libpath (dl, path);
+
+                    /* create libset */
+                    rc = KDyldMakeSet (dl, & libs);
+                    if (rc)
+                    {
+                        LOGERR (klogInt, rc, "failed to create dl library set");
+                        break;
+                    }
+                    else
+                    {
+                        /* test it */
+                        for (ix = 0; ix < num_libs; ++ ix )
+                        {
+                            rc = ArgsParamValue (args, ix, (const void **)&path);
+                            if (rc)
+                                break;
+
+                            testld_load_library (dl, libs, path);
+                        }
+
+                        KDlsetRelease ( libs );
+                    }
+                } while (0);
+
+                KDyldRelease ( dl );
+            }
+
+        } while (0);
+
+        ArgsWhack (args);
+    }
+    return rc;
+}
diff --git a/tools/util/txt2kdb.c b/tools/util/txt2kdb.c
new file mode 100644
index 0000000..65a670c
--- /dev/null
+++ b/tools/util/txt2kdb.c
@@ -0,0 +1,579 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+#include <kapp/args.h>
+
+#include <klib/defs.h>
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kdb/manager.h>
+#include <kdb/column.h>
+#include <kapp/main.h>
+
+const char UsageDefaultName[] = "txt2kdb";
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s [Options] <File> <Column>\n"
+                    "\n"
+                    "Summary:\n"
+                    "  Create a physical database column from a text file.\n"
+                    "\n", progname);
+}
+
+#define OPTION_APPEND "append"
+#define OPTION_FORCE  "force"
+#define OPTION_BEGIN  "begin"
+#define OPTION_END    "end"
+#define ALIAS_APPEND  "a"
+#define ALIAS_FORCE   "f"
+#define ALIAS_BEGIN   "b"
+#define ALIAS_END     "e"
+
+static const char * append_usage[] =
+{
+    "(no parameter) this will cause to append the",
+    "text file to an existing KColumn.  If the",
+    "file does not already exist it will be",
+    "created.", 
+    NULL
+};
+static const char * force_usage [] =
+{
+    "(no parameter) this will cause to over-write",
+    "existing files.  Without this option the",
+    "program will fail if the KColumn already",
+    "exists and append mode is not selected",
+    NULL
+};
+static const char * begin_usage [] = 
+{
+    "Begin include only lines starting from this",
+    "line in the column.  The first line is line",
+    "1 (not 0).",
+    NULL
+};
+static const char * end_usage   [] =
+{
+    "Stop including lines after this line in the",
+    "column.  The first line is line 1 (not 0).",
+    NULL
+};
+
+
+OptDef Options[] = 
+{
+    { OPTION_APPEND, ALIAS_APPEND, NULL, append_usage, 0, false, false },
+    { OPTION_FORCE,  ALIAS_FORCE,  NULL, force_usage,  0, false, false },
+    { OPTION_BEGIN,  ALIAS_BEGIN,  NULL, begin_usage,  1, true,  false },
+    { OPTION_END,    ALIAS_END,    NULL, end_usage,    1, true,  false }
+};
+
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+
+    UsageSummary (progname);
+
+    OUTMSG (("File:\n"
+             "  The text file should be ASCII or UTF-8 using LF, CR or CR-LF\n"
+             "  line termination.  Each text line will be put into the\n"
+             "  KColumn as a separate Row.  Each Row will be in its own\n"
+             "  blob.\n"
+             "\n"
+             "Column:\n"
+             "  The KColumn is either an existing KColumn or a path to one\n"
+             "  that can be created.\n"
+                 "\n"
+             "  Both paths should be relative to the current directory or full\n"
+             "  from root \n"
+             "\n"
+             "Options:\n"));
+
+    HelpOptionLine (ALIAS_BEGIN, OPTION_BEGIN, "Start", begin_usage);
+
+    HelpOptionLine (ALIAS_END, OPTION_END, "Stop", end_usage);
+
+    HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, force_usage);
+
+    HelpOptionLine (ALIAS_APPEND, OPTION_APPEND, NULL, append_usage);
+
+    HelpOptionsStandard ();
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+
+struct txt2kdbglobals
+{
+    uint64_t     begin;
+    uint64_t     end;
+
+    KDirectory * dir;
+    const KFile * txt;
+    KDBManager * mgr;
+    KColumn * col;
+    const char * txtpath;
+    const char * colpath;
+
+    bool force;
+    bool append;
+    bool begin_seen;
+    bool end_seen;
+} G;
+
+void txt2kdb_release (void)
+{
+    KDirectoryRelease (G.dir);
+    KFileRelease (G.txt);
+    KDBManagerRelease (G.mgr);
+    KColumnRelease (G.col);
+}
+
+rc_t txt2kdb_kfs (void)
+{
+    rc_t rc;
+
+    G.dir = NULL;
+    G.txt = NULL;
+    G.mgr = NULL;
+    G.col = NULL;
+
+    /* -----
+     * Mount the native filesystem as root
+     */
+    rc = KDirectoryNativeDir (&G.dir);
+    if (rc != 0)
+    {
+        G.dir = NULL;
+	LOGMSG (klogFatal, "Failed to open native KDirectory");
+    }
+    else
+    {
+        rc = KDirectoryOpenFileRead (G.dir, &G.txt, "%s", G.txtpath);
+        if (rc != 0)
+        {
+            G.txt = NULL;
+            PLOGERR (klogFatal, (klogFatal, rc, "Unable to open file at $(F)", PLOG_S(F), G.txtpath));
+        }
+        else
+        {
+            rc = KDBManagerMakeUpdate (&G.mgr, G.dir);
+            if (rc)
+            {
+                G.mgr = NULL;
+                LOGERR (klogFatal, rc, "Unable to create a KDBManager at the current directory");
+            }
+            else
+            {
+                KCreateMode kcm;
+                KPathType kpt;
+                const char * err = "";
+
+                kpt = KDirectoryPathType (G.dir, "%s", G.colpath) & ~ kptAlias;
+                kcm = kcmCreate;
+/* Force means replace if exists */
+/* Append means open in append mode if it exists */
+                switch (kpt)
+                {
+                case kptNotFound:
+                    kcm = kcmCreate;
+                    break;
+
+                default:
+                    err = "Unknown";
+                    rc = RC (rcExe, rcNoTarg, rcAccessing, rcPath, rcInvalid);
+                    break;
+
+                case kptBadPath:
+                    err = "Bad Path";
+                    rc = RC (rcExe, rcNoTarg, rcAccessing, rcPath, rcInvalid);
+                    break;
+
+                case kptFile:
+                case kptCharDev:
+                case kptBlockDev:
+                case kptFIFO:
+                    err = "Must be a Directory";
+                    rc = RC (rcExe, rcNoTarg, rcAccessing, rcPath, rcInvalid);
+                    break;
+
+                case kptDir:
+                    kcm = kcmCreate;
+
+                    if (G.append)
+                    {
+                        kcm = kcmOpen;
+                    }
+                    else if (G.force)
+                    {
+                        kcm = kcmInit;
+                    }
+                    break;
+                }
+                if (rc == 0)
+                {
+                    rc = KDBManagerCreateColumn (G.mgr, &G.col, kcm, kcsNone, 0, "%s", G.colpath);
+                    if (rc)
+                        err = "Manager can not open column";
+                }
+                if (rc)
+                {
+                    PLOGERR (klogFatal, (klogFatal, rc, "Cannot open KColumn $(P) because $(R)", PLOG_2(PLOG_S(P),PLOG_S(R)),
+                                         G.colpath, err));
+                }                
+            }
+        }
+    }
+    return rc;
+}
+
+/* If the begin parameter was set check if the rowid is equal or above it */
+bool rowid_lower_range (uint64_t rowid)
+{
+    if (G.begin_seen && (rowid < G.begin))
+        return false;
+    return true;
+}
+
+/* If the end parameter was set check if the rowid is equal or below it */
+bool rowid_upper_range (uint64_t rowid)
+{
+    if (G.end_seen && (rowid > G.end))
+        return false;
+    return true;
+}
+rc_t txt2kdb_io()
+{
+    rc_t rc = 0;
+    uint64_t rowid = 1;
+    uint64_t tix = 0;
+    KColumnBlob * blob;
+    bool blobopen = false;
+
+    while (rc == 0)
+    {
+        size_t num_read;
+        uint8_t buffer  [4096];
+        uint8_t * limit;
+        uint8_t * append_start = buffer;
+        uint8_t * cursor = buffer;
+        bool eol = true;
+
+        /* quit if we are already past the end of the range */
+        if ( ! rowid_upper_range(rowid))
+            break;
+
+        /* read a buffer full.  It may straddle rows. */
+        rc = KFileRead (G.txt, tix, buffer, sizeof buffer, &num_read);
+        if (rc)
+        {
+            PLOGERR (klogFatal, (klogFatal, rc, "Read failed starting $(P)", PLOG_U64(P), tix));
+            break;
+        }
+        /* break at EOF */
+        if (num_read == 0)
+            break;
+
+        /* scan across the buffer looking for lines */
+        for (limit = buffer + num_read; cursor < limit; append_start = cursor)
+        {
+            /* if we are at the beginning of a line (end of previous line or start of first */
+            if (eol)
+            {
+                /* if we are within the pass thru range create a blob */
+                if (rowid_lower_range(rowid) && rowid_upper_range(rowid))
+                {
+                    rc = KColumnCreateBlob (G.col, &blob);
+                    if (rc)
+                    {
+                        PLOGERR (klogFatal, (klogFatal, rc, "Failed to create Blob for row $(R) at $(P)",
+                                             PLOG_2(PLOG_U64(R),PLOG_U64(P)), rowid, tix));
+                        continue;
+                    }
+                    blobopen = true;
+                }
+                /* clear the flag */
+                eol = false;
+            }
+
+            /* this blob append will go until end of buffer or end of line */
+            for ( ; cursor < limit; ++ cursor, ++tix)
+            {
+                /* if we hit a NewLine flag it and break for append */
+                if (*cursor == '\n')
+                {
+                    eol = true;
+                    ++cursor;
+                    ++tix;
+                    break;
+                }
+            }
+
+            /* if we are within the selected range append this to the open blob 
+             * ir might be the first append, a middle append, a last append or only append */
+            if (blobopen)
+            {
+                rc = KColumnBlobAppend (blob, append_start, cursor - append_start);
+                if (rc)
+                {
+                    PLOGERR (klogFatal, (klogFatal, rc, "Failed to append Blob for row $(R) at $(P)",
+                                         PLOG_2(PLOG_U64(R),PLOG_U64(P)), rowid, tix));
+
+                    break;
+                }
+            }
+            /* if we hit a NewLine and are within range we will close this blob */
+            if (eol)
+            {
+                if (blobopen)
+                {
+                    /* single row blobs */
+                    rc = KColumnBlobAssignRange (blob, rowid, 1);
+                    if (rc)
+                    {
+                        PLOGERR (klogFatal, (klogFatal, rc, "Failed to range assign blob for row $(R) at $(P)",
+                                             PLOG_2(PLOG_U64(R),PLOG_U64(P)), rowid, tix));
+                        break;
+                    }
+                    rc = KColumnBlobCommit (blob);
+                    if (rc)
+                    {
+                        PLOGERR (klogFatal, (klogFatal, rc, "Failed to commit blob for row $(R) at $(P)",
+                                             PLOG_2(PLOG_U64(R),PLOG_U64(P)), rowid, tix));
+                        break;
+                    }
+                    rc = KColumnBlobRelease (blob);
+                    if (rc)
+                    {
+                        PLOGERR (klogFatal, (klogFatal, rc, "Failed to release blob for row $(R) at $(P)",
+                                             PLOG_2(PLOG_U64(R),PLOG_U64(P)), rowid, tix));
+                        break;
+                    }
+                    blobopen = false;
+                }
+                ++rowid;
+                if ( ! rowid_upper_range (rowid))
+                    break;
+            }
+        }       
+    }
+    
+    /* if not in an error state and the last line was unterminated close the blob */
+    if ((rc == 0) && blobopen)
+    {
+        rc = KColumnBlobAssignRange (blob, rowid, 1);
+        if (rc)
+        {
+            PLOGERR (klogFatal, (klogFatal, rc, "Failed to range assign blob for row $(R) at $(P)",
+                                 PLOG_2(PLOG_U64(R),PLOG_U64(P)), rowid, tix));
+        }
+        else
+        {
+            rc = KColumnBlobCommit (blob);
+            if (rc)
+            {
+                PLOGERR (klogFatal, (klogFatal, rc, "Failed to commit blob for row $(R) at $(P)",
+                                     PLOG_2(PLOG_U64(R),PLOG_U64(P)), rowid, tix));
+            }
+        }
+        KColumnBlobRelease (blob);
+    }
+    return rc;
+}
+
+void CC ascii_to_u64_error_handler ( const char * arg, void * data )
+{
+    rc_t * prc = data;
+    rc_t rc = RC (rcExe, rcNoTarg, rcParsing, rcParam, rcIncorrect);
+
+
+    PLOGERR (klogFatal, (klogFatal, rc, "numeric range option unparsable $(S)", PLOG_S(S), arg));
+    *prc = rc;
+}
+
+rc_t CC NextLogLevelCommon ( const char * level_parameter );
+
+rc_t CC KMain (int argc, char *argv [])
+{
+    Args * args;
+    rc_t   rc;
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 1, Options, sizeof Options / sizeof (OptDef));
+    if (rc == 0)
+    {
+        do 
+        {
+            uint32_t pcount;
+
+            rc = ArgsParamCount (args, &pcount);
+            if (rc)
+                break;
+
+            switch (pcount)
+            {
+            case 0:
+                MiniUsage (args);
+                rc = 1;
+                break;
+
+            case 1:
+                rc = RC (rcExe, rcNoTarg, rcParsing, rcParam, rcNotFound);
+                LOGERR (klogFatal, rc, "Missing KColumn path");
+                MiniUsage (args);
+                break;
+
+            default:
+                rc = RC (rcExe, rcNoTarg, rcParsing, rcParam, rcExcessive);
+                LOGERR (klogFatal, rc, "Too many parameters");
+                MiniUsage (args);
+                break;
+
+            case 2:
+                break;
+            }
+            if (rc)
+            {
+                if (rc == 1)
+                    rc = 0;
+                break;
+            }
+
+            rc = ArgsParamValue (args, 0, (const void **)&G.txtpath);
+            if (rc)
+                break;
+
+            rc = ArgsParamValue (args, 1, (const void **)&G.colpath);
+            if (rc)
+                break;
+
+            rc = ArgsOptionCount (args, OPTION_BEGIN, &pcount);
+            if (rc)
+                break;
+
+            if (pcount != 1)
+                G.begin_seen = false;
+            else
+            {
+                const char * pc;
+
+                rc = ArgsOptionValue (args, OPTION_BEGIN, 0, (const void **)&pc);
+                if (rc)
+                    break;
+
+                G.begin = AsciiToU64 ( pc, ascii_to_u64_error_handler, &rc );
+
+                if (rc)
+                    break;
+                G.begin_seen = true;
+            }
+
+            rc = ArgsOptionCount (args, OPTION_END, &pcount);
+            if (rc)
+                break;
+
+            if (pcount != 1)
+                G.end_seen = false;
+            else
+            {
+                const char * pc;
+
+                rc = ArgsOptionValue (args, OPTION_END, 0, (const void **)&pc);
+                if (rc)
+                    break;
+
+                G.end = AsciiToU64 (pc, ascii_to_u64_error_handler, &rc);
+                if (rc)
+                    break;
+
+                G.end_seen = true;
+            }
+
+
+            if (G.begin_seen && G.end_seen && (G.end < G.begin))
+            {
+                rc = RC (rcExe, rcNoTarg, rcAccessing, rcParam, rcInvalid);
+                LOGERR (klogFatal, rc, "Conflicting options end before begin");
+                break;
+            }
+
+            rc = ArgsOptionCount (args, OPTION_FORCE, &pcount);
+            if (rc)
+                break;
+
+            G.force = (pcount != 0);
+
+            rc = ArgsOptionCount (args, OPTION_APPEND, &pcount);
+            if (rc)
+                break;
+
+            G.append = (pcount != 0);
+
+            if (G.force && G.append)
+            {
+                rc = RC (rcExe, rcNoTarg, rcAccessing, rcParam, rcInvalid);
+                LOGERR (klogFatal, rc, "Conflicting options force and append");
+                break;
+            }
+
+            /* handle the KFS interface */
+            rc = txt2kdb_kfs();
+
+            if (rc == 0)
+                rc = txt2kdb_io();
+
+            txt2kdb_release();
+
+
+        } while (0);
+        ArgsWhack (args);
+    }
+
+    STSMSG (1, ("exit txt2kdb %R\n", rc));
+    return rc;
+}
+
+
+/* end of file */
diff --git a/tools/util/unix/PrintOS.c b/tools/util/unix/PrintOS.c
new file mode 100644
index 0000000..019ca9c
--- /dev/null
+++ b/tools/util/unix/PrintOS.c
@@ -0,0 +1,66 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "test-sra-priv.h" /* PrintOS */
+
+#include <klib/debug.h> /* DBGMSG */
+#include <klib/out.h> /* OUTMSG */
+
+#include <errno.h>
+#include <string.h> /* memset */
+#include <stdio.h> /* perror */
+
+#include <sys/utsname.h> /* uname */
+
+rc_t PrintOS(bool xml) {
+    int ret = 1;
+
+    struct utsname unameData;
+    memset(&unameData, 0, sizeof unameData);
+
+    errno = 0;
+    ret = uname(&unameData);
+    if (ret != 0) {
+        if (xml) {
+            OUTMSG(("  <Os>"));
+            perror("uname returned : ");
+            OUTMSG(("</Os>\n"));
+        }
+        else {
+            perror("uname returned : ");
+        }
+
+        return 0;
+    }
+    else {
+        const char *b = xml ? "  <Os>"  : "Operating system: '";
+        const char *e = xml ? "</Os>" :                   "'\n";
+
+        return OUTMSG(("%s%s %s %s %s %s%s\n", b,
+            unameData.sysname, unameData.nodename, unameData.release,
+            unameData.version, unameData.machine, e));
+    }
+}
diff --git a/tools/util/unix/syspass.c b/tools/util/unix/syspass.c
new file mode 100644
index 0000000..b464f39
--- /dev/null
+++ b/tools/util/unix/syspass.c
@@ -0,0 +1,62 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#define __EXTENSIONS__ 1
+
+#include "syspass-priv.h" /* get_pass */
+
+#include <klib/rc.h>
+
+#include <string.h> /* strdup */
+
+#include <stdlib.h>
+#include <unistd.h> /* getpass */
+
+rc_t get_pass(const char *prompt, char *buf, size_t bufsiz) {
+    if (prompt == NULL || buf == NULL) {
+        return RC(rcExe, rcFunction, rcEvaluating, rcParam, rcNull);
+    }
+
+    if (bufsiz == 0)
+    {   return 0; }
+
+    buf[0] = '\0';
+
+    {
+        const char *p = getpass(prompt);
+
+        if (p == NULL) {
+            return RC(rcExe, rcString, rcReading, rcFunction, rcFailed);
+        }
+        else if ((strlen(p) + 1) > bufsiz) {
+            return RC(rcExe, rcString, rcReading, rcBuffer, rcInsufficient);
+        }
+
+        strcpy(buf, p);
+
+        return 0;
+    }
+}
diff --git a/tools/util/vdb-lock.c b/tools/util/vdb-lock.c
new file mode 100644
index 0000000..05aabd0
--- /dev/null
+++ b/tools/util/vdb-lock.c
@@ -0,0 +1,154 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <sra/srapath.h>
+#include <vdb/manager.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/rc.h>
+
+#include <assert.h>
+
+const char UsageDefaultName[] = "vdb-lock";
+
+rc_t CC UsageSummary ( const char *progname )
+{
+    return KOutMsg ( "\n"
+                     "Usage:\n"
+                     "  %s [Options] <target>\n"
+                     "\n"
+                     "Summary:\n"
+                     "  Lock a VDB database, table or column.\n"
+                     , progname
+        );
+}
+
+rc_t CC Usage ( const Args *args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary (progname);
+
+    KOutMsg ("Options:\n");
+
+    HelpOptionsStandard ();
+    HelpVersion ( fullpath, KAppVersion () );
+
+    return rc;
+}
+
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args *args;
+    rc_t rc = ArgsMakeAndHandle ( & args, argc, argv, 0 );
+    if ( rc != 0 )
+        LogErr ( klogErr, rc, "failed to parse arguments" );
+    else
+    {
+        uint32_t paramc;
+        rc = ArgsParamCount ( args, & paramc );
+        if ( rc != 0 )
+            LogErr ( klogInt, rc, "failed to obtain param count" );
+        else
+        {
+            if ( paramc == 0 )
+            {
+                rc = RC ( rcExe, rcArgv, rcParsing, rcParam, rcInsufficient );
+                LogErr ( klogErr, rc, "missing target object" );
+                MiniUsage ( args );
+            }
+            else if ( paramc > 1 )
+            {
+                rc = RC ( rcExe, rcArgv, rcParsing, rcParam, rcExcessive );
+                LogErr ( klogErr, rc, "expected single target object" );
+                MiniUsage ( args );
+            }
+            else
+            {
+                const char *target;
+                rc = ArgsParamValue ( args, 0, (const void **)& target );
+                if ( rc != 0 )
+                    LogErr ( klogInt, rc, "failed to obtain param value" );
+                else
+                {
+                    VDBManager *mgr;
+
+#if TOOLS_USE_SRAPATH != 0
+                    char full [ 4096 ];
+                    SRAPath *sra_path;
+                    rc = SRAPathMake ( & sra_path, NULL );
+                    if ( rc == 0 )
+                    {
+                        if ( ! SRAPathTest ( sra_path, target ) )
+                        {
+                            rc = SRAPathFind ( sra_path, target, full, sizeof full );
+                            if ( rc == 0 )
+                                target = full;
+                        }
+                        SRAPathRelease ( sra_path );
+                    }
+#endif
+
+                    rc = VDBManagerMakeUpdate ( & mgr, NULL );
+                    if ( rc != 0 )
+                        LogErr ( klogInt, rc, "failed to open VDB manager" );
+                    else
+                    {
+                        rc = VDBManagerLock ( mgr, "%s", target );
+                        if ( rc == 0 )
+                            pLogMsg ( klogInfo, "locked '$(target)'", "target=%s", target );
+                        else switch ( GetRCState ( rc ) )
+                        {
+                        case rcLocked:
+                            pLogMsg ( klogInfo, "'$(target)' was already locked", "target=%s", target );
+                            break;
+                        default:
+                            pLogErr ( klogErr, rc, "failed to lock '$(target)'", "target=%s", target );
+                        }
+
+                        VDBManagerRelease ( mgr );
+                    }
+                }
+            }
+        }
+
+        ArgsWhack ( args );
+    }
+
+    return rc;
+}
diff --git a/tools/util/vdb-passwd.c b/tools/util/vdb-passwd.c
new file mode 100644
index 0000000..353d21f
--- /dev/null
+++ b/tools/util/vdb-passwd.c
@@ -0,0 +1,307 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "syspass-priv.h" /* get_pass */
+
+#include <kapp/main.h> /* KMain */
+
+#include <vfs/manager.h> /* VFSManager */
+#include <klib/log.h> /* LOGERR */
+#include <klib/out.h> /* OUTMSG */
+#include <klib/rc.h>
+
+#include <string.h> /* strcmp */
+#include <assert.h>
+#include <limits.h> /* PATH_MAX */
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+#define DISP_RC(rc, msg) (void)((rc == 0) ? 0 : LOGERR(klogInt, rc, msg))
+
+#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
+    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
+#if 0
+/******************************************************************************/
+static
+rc_t SetPwd(const char *password, bool no_prompt)
+{
+    rc_t rc = 0;
+
+    VFSManager *mgr = NULL;
+
+    assert(password);
+
+    if (rc == 0) {
+        rc = VFSManagerMake(&mgr);
+        DISP_RC(rc, "while calling VFSManagerMake");
+    }
+
+    if (rc == 0) {
+        char pwd_dir[PATH_MAX] = "";
+        rc = VFSManagerUpdateKryptoPassword
+            (mgr, password, strlen(password), pwd_dir, sizeof pwd_dir);
+        if (rc) {
+            if (no_prompt) {
+                LOGERR(klogInt, rc, "while updating the password");
+            }
+            else if (rc == SILENT_RC(rcVFS, rcEncryptionKey, rcUpdating,
+                            rcDirectory, rcExcessive))
+            {
+                OUTMSG((
+                    "\nSecurity warning:\n"
+                    "Directory \"%s\" has excessive access permissions.\n"
+                    "Run \"chmod 700 %s\" to repair\n"
+                    "or ask your system administrator for assistance.\n",
+                    pwd_dir, pwd_dir));
+                rc = 0;
+            }
+            else if (rc == SILENT_RC(rcVFS, rcEncryptionKey, rcUpdating,
+                rcSize, rcExcessive))
+            {
+                OUTMSG((
+                    "\nError:\n"
+                    "Password is too long.\n"
+                    "Maximum password size is %ld.\n",
+                    VFS_KRYPTO_PASSWORD_MAX_SIZE));
+            }
+            else if (rc == SILENT_RC(rcVFS, rcEncryptionKey, rcUpdating,
+                rcEncryptionKey, rcInvalid))
+            {
+                OUTMSG((
+                    "\nError:\n"
+                    "Invalid character in password\n"
+                    "(CR/LF are not allowed)\n"));
+            }
+            else if (rc == SILENT_RC(rcVFS, rcEncryptionKey, rcUpdating,
+                rcPath, rcExcessive))
+            {
+                OUTMSG((
+                    "\nError:\n"
+                    "Cannot set the password.\n"
+                    "Path to password file is too long.\n"
+                    "Your configuration should be updated.\n"));
+            }
+            else if (rc == SILENT_RC(rcVFS, rcEncryptionKey, rcUpdating,
+                rcPath, rcIncorrect))
+            {
+                OUTMSG((
+                    "\nError:\n"
+                    "Cannot set the password.\n"
+                    "Existing path to password is not a file.\n"
+                    "Your configuration should be updated.\n"));
+            }
+            else if (rc == SILENT_RC(rcVFS, rcEncryptionKey, rcUpdating,
+                rcPath, rcCorrupt))
+            {
+                OUTMSG((
+                    "\nError:\n"
+                    "Cannot set the password.\n"
+                    "Unknown file type for configured path/file name.\n"
+                    "Your configuration should be updated.\n"));
+            }
+            else if (rc == SILENT_RC(rcVFS, rcEncryptionKey, rcWriting,
+                rcFile, rcInsufficient))
+            {
+                OUTMSG((
+                    "\nError:\n"
+                    "Incomplete writes to temporary password file.\n"
+                    "Cannot set the password.\n"));
+            }
+            else {
+                OUTMSG(("\nCannot set the password. Please consult\n"
+                 "configuration page at\n"
+                 "http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=toolkit_doc&f=std or\n"
+                 "https://github.com/ncbi/sra-tools/wiki/Toolkit-Configuration\n"));
+            }
+        }
+    }
+
+    RELEASE(VFSManager, mgr);
+
+    return rc;
+}
+
+#define PWD_SZ 1024
+
+static
+rc_t run(bool quiet)
+{
+    rc_t rc = 0;
+
+    char password[PWD_SZ] = "";
+
+    bool empty = false;
+
+    KWrtHandler handler;
+    handler.writer = KOutWriterGet();
+    handler.data = KOutDataGet();
+
+    KOutHandlerSetStdErr();
+    KLogLibHandlerSet(NULL, NULL);
+
+    OUTMSG(("Changing password\n"));
+
+#if 1
+    if (rc == 0) {
+        int i = 0;
+        for (i = 0; i < 3 && rc == 0; ++i) {
+            rc = get_pass("New password:", password, sizeof password);
+            DISP_RC(rc, "cannot read the password");
+            if (rc != 0) {
+                break;
+            }
+            if (password[0] == '\0') {
+                OUTMSG(("BAD PASSWORD: too short\n"));
+            }
+            else {
+                break;
+            }
+        }
+        if (rc == 0 && password[0] == '\0') {
+            rc = RC(rcExe, rcString, rcReading, rcString, rcIncorrect);
+            empty = true;
+         /* LOGERR(klogErr, rc, "failed to set password"); */
+        }
+    }
+
+    if (rc == 0) {
+        char repassword[PWD_SZ] = "";
+        rc = get_pass("Retype new password:", repassword, sizeof repassword);
+        DISP_RC(rc, "cannot read the password");
+        if (rc == 0) {
+            if (strcmp(password, repassword)) {
+                OUTMSG(("Sorry, passwords do not match.\n"));
+                rc = RC(rcExe, rcString, rcReading, rcString, rcInconsistent);
+             /* LOGERR(klogErr, rc, "failed to set password"); */
+            }
+        }
+    }
+
+#else
+    strcpy(password, "1n2");
+#endif
+
+    if (rc == 0) {
+        rc = SetPwd(password, quiet);
+    }
+
+    KOutHandlerSet(handler.writer, handler.data);
+
+    if (empty)
+    {   rc = 0; }
+
+    return rc;
+}
+#endif
+#define SL_OPTION "noprompt"
+#define SL_ALIAS "n"
+static const char *SL_USAGE[]
+    = { "Do not suggest consulting configuration page at http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=toolkit_doc&f=std or https://github.com/ncbi/sra-tools/wiki/Toolkit-Configuration", NULL };
+
+OptDef Options[] = { { SL_OPTION, SL_ALIAS, NULL, SL_USAGE, 1, false, false } };
+
+const char UsageDefaultName[] = "vdb-passwd";
+
+rc_t CC UsageSummary(const char *progname) {
+    KOutMsg("Update user's NCBI VDB crypto password\n"
+            "If not run with --quiet recommendations\n"
+            "are given if errors are detected.\n"
+            "\n");
+
+    return 0;
+}
+
+rc_t CC Usage(const Args *args) {
+    UsageSummary(UsageDefaultName);
+
+    KOutMsg("Options:\n");
+    HelpOptionsStandard ();
+
+    HelpVersion(UsageDefaultName, KAppVersion());
+
+    return 0;
+}
+
+#if 0
+rc_t CC KMain(int argc, char *argv[]) {
+    Args *args;
+    rc_t rc; /*, orc; */
+
+    rc = ArgsMakeAndHandle(&args, argc, argv, 0);
+    if (rc == 0)
+    {
+        uint32_t pcount;
+        rc_t orc;
+
+        /* non standard use of --quiet */
+        rc = ArgsOptionCount(args, OPTION_QUIET, &pcount);
+        if (rc)
+            LOGERR(klogErr, rc, "error check " OPTION_QUIET " option");
+
+        else
+            rc = run (pcount != 0);
+
+        orc = ArgsWhack(args);
+        if (rc == 0)
+            rc = orc;
+    }
+
+    return rc;
+}
+#endif
+rc_t CC KMain(int argc, char *argv[]) {
+    OUTMSG((
+"WARNING: vdb-passwd IS OBSOLETE AND SHOULD NOT BE USED.\n"
+"\n"
+"\n"
+"To access dbGaP data you need:\n"
+"\n"
+"- Make sure you have the latest version of SRA Toolkit installed:\n"
+"https://github.com/ncbi/sra-tools/wiki/Downloads\n"
+"\n"
+"- Have permission to access controlled-access data for a dbGaP project;\n"
+"\n"
+"- Get dbGaP repository key (ngc file);\n"
+"\n"
+"- Import the dbGaP repository key to SRA Toolkit.\n"
+"  It will set up the project's workspace directory.\n"
+"\n"
+"- Change directory to the project's workspace.\n"
+"\n"
+"N.B. MAKE SURE YOU DO NOT HAVE A VDB_PWFILE ENVIRONMENT VARIABLE SET !!!\n"
+"\n"
+"Now you should be able to work with encrypted data.\n"
+"The SRA Toolkit will work with encrypted SRA data files,\n"
+"there is no need to decrypt the read data.\n"
+"\n"
+"The complete instructions are:\n"
+"http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=toolkit_doc&f=dbgap_use\n"
+"\n"
+"Send questions/bug reports to sra-tools at ncbi.nlm.nih.gov\n"));
+    return RC(rcExe, rcProcess, rcExecuting, rcProcess, rcUnsupported);
+}
diff --git a/tools/util/vdb-unlock.c b/tools/util/vdb-unlock.c
new file mode 100644
index 0000000..7b3d336
--- /dev/null
+++ b/tools/util/vdb-unlock.c
@@ -0,0 +1,156 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <sra/srapath.h>
+#include <vdb/manager.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/rc.h>
+
+#include <assert.h>
+
+const char UsageDefaultName[] = "vdb-unlock";
+
+rc_t CC UsageSummary ( const char *progname )
+{
+    return KOutMsg ( "\n"
+                     "Usage:\n"
+                     "  %s [Options] <target>\n"
+                     "\n"
+                     "Summary:\n"
+                     "  Unlock a VDB database, table or column.\n"
+                     , progname
+        );
+}
+
+rc_t CC Usage ( const Args *args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary (progname);
+
+    KOutMsg ("Options:\n");
+
+    HelpOptionsStandard ();
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args *args;
+    rc_t rc = ArgsMakeAndHandle ( & args, argc, argv, 0 );
+    if ( rc != 0 )
+        LogErr ( klogErr, rc, "failed to parse arguments" );
+    else
+    {
+        uint32_t paramc;
+        rc = ArgsParamCount ( args, & paramc );
+        if ( rc != 0 )
+            LogErr ( klogInt, rc, "failed to obtain param count" );
+        else
+        {
+            if ( paramc == 0 )
+            {
+                rc = RC ( rcExe, rcArgv, rcParsing, rcParam, rcInsufficient );
+                LogErr ( klogErr, rc, "missing target object" );
+                MiniUsage ( args );
+            }
+            else if ( paramc > 1 )
+            {
+                rc = RC ( rcExe, rcArgv, rcParsing, rcParam, rcExcessive );
+                LogErr ( klogErr, rc, "expected single target object" );
+                MiniUsage ( args );
+            }
+            else
+            {
+                const char *target;
+                rc = ArgsParamValue ( args, 0, (const void **)& target );
+                if ( rc != 0 )
+                    LogErr ( klogInt, rc, "failed to obtain param value" );
+                else
+                {
+                    VDBManager *mgr;
+
+#if TOOLS_USE_SRAPATH != 0
+                    char full [ 4096 ];
+                    SRAPath *sra_path;
+                    rc = SRAPathMake ( & sra_path, NULL );
+                    if ( rc == 0 )
+                    {
+                        if ( ! SRAPathTest ( sra_path, target ) )
+                        {
+                            rc = SRAPathFind ( sra_path, target, full, sizeof full );
+                            if ( rc == 0 )
+                                target = full;
+                        }
+                        SRAPathRelease ( sra_path );
+                    }
+#endif
+
+                    rc = VDBManagerMakeUpdate ( & mgr, NULL );
+                    if ( rc != 0 )
+                        LogErr ( klogInt, rc, "failed to open VDB manager" );
+                    else
+                    {
+                        rc = VDBManagerUnlock ( mgr, "%s", target );
+                        if ( rc == 0 )
+                            pLogMsg ( klogInfo, "unlocked '$(target)'", "target=%s", target );
+                        else switch ( GetRCState ( rc ) )
+                        {
+                        case rcUnlocked:
+                            pLogMsg ( klogInfo, "'$(target)' was already unlocked", "target=%s", target );
+                            break;
+                        default:
+                            pLogErr ( klogErr, rc, "failed to unlock '$(target)'", "target=%s", target );
+                        }
+
+                        VDBManagerRelease ( mgr );
+                    }
+                }
+            }
+        }
+
+        ArgsWhack ( args );
+    }
+
+    return rc;
+}
diff --git a/tools/util/win/PrintOS.c b/tools/util/win/PrintOS.c
new file mode 100644
index 0000000..ca1d402
--- /dev/null
+++ b/tools/util/win/PrintOS.c
@@ -0,0 +1,60 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "../test-sra-priv.h" /* PrintOS */
+
+#include <klib/out.h> /* OUTMSG */
+
+#include <windows.h>
+
+rc_t PrintOS(bool xml) {
+    const char *b = xml ? "  <Os>"  : "Operating system: '";
+    const char *e = xml ? "</Os>" :                   "'\n";
+
+    OSVERSIONINFO osvi;
+    ZeroMemory(&osvi, sizeof osvi);
+    osvi.dwOSVersionInfoSize = sizeof osvi;
+
+    if (GetVersionEx(&osvi)) {
+        if (osvi.dwPlatformId == 2) {
+            return OUTMSG((
+                "%sMicrosoft Windows. Version %d.%d (Build %d: %s)%s\n", b,
+                osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.dwBuildNumber,
+                osvi.szCSDVersion, e));
+        }
+        else {
+            return OUTMSG((
+         "%sMicrosoft Windows. Version %d.%d (Build %d: %s). PlatformId %d%s\n",
+              b,
+                osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.dwBuildNumber,
+                osvi.szCSDVersion, osvi.dwPlatformId, e));
+        }
+    }
+    else {
+        return OUTMSG(("%sGetLastError(GetVersionEx()) = %d%s\n",
+            b, GetLastError(), e));
+    }
+}
diff --git a/tools/util/win/syspass.c b/tools/util/win/syspass.c
new file mode 100644
index 0000000..b6d943b
--- /dev/null
+++ b/tools/util/win/syspass.c
@@ -0,0 +1,53 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "../syspass-priv.h" /* get_pass */
+
+#include <klib/rc.h>
+
+#include <conio.h> /* _getch */
+#include <stdio.h>
+
+rc_t get_pass(const char *prompt, char *buf, size_t bufsiz) {
+    if (prompt == NULL || buf == NULL) {
+        return RC(rcExe, rcFunction, rcEvaluating, rcParam, rcNull);
+    }
+
+    fprintf(stderr, "%s", prompt);
+
+    {
+        size_t i = 0;
+        for (i = 0; i < bufsiz; ++i) {
+            buf[i] = _getch();
+            if (buf[i] == '\r') {
+                fprintf(stderr, "\r\n");
+                buf[i] = '\0';
+                return 0;
+            }
+        }
+        return RC(rcExe, rcString, rcReading, rcBuffer, rcInsufficient);
+    }
+}
diff --git a/tools/vcf-loader/.gitignore b/tools/vcf-loader/.gitignore
new file mode 100644
index 0000000..ec76f86
--- /dev/null
+++ b/tools/vcf-loader/.gitignore
@@ -0,0 +1 @@
+vcf-grammar.output
diff --git a/tools/vcf-loader/Makefile b/tools/vcf-loader/Makefile
new file mode 100644
index 0000000..3e02c52
--- /dev/null
+++ b/tools/vcf-loader/Makefile
@@ -0,0 +1,128 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/vcf-loader
+
+INT_LIBS = \
+	libvcfloader
+    
+ALL_LIBS = \
+	$(INT_LIBS) \
+	$(EXT_LIBS)
+
+EXT_TOOLS = \
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)    
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs 
+	@ $(MAKE_CMD) $(TARGDIR)/$@
+
+$(INT_LIBS): makedirs
+	@ $(MAKE_CMD) $(ILIBDIR)/$@
+
+$(EXT_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@    
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+.PHONY: all std $(ALL_LIBS) 
+
+#-------------------------------------------------------------------------------
+# std
+#
+$(TARGDIR)/std: \
+	$(addprefix $(ILIBDIR)/,$(INT_LIBS)) \
+	$(addprefix $(LIBDIR)/,$(EXT_LIBS)) \
+	$(addprefix $(BINDIR)/,$(EXT_TOOLS))
+
+.PHONY: $(TARGDIR)/std
+
+#-------------------------------------------------------------------------------
+# all
+#
+$(TARGDIR)/all: \
+	$(addprefix $(ILIBDIR)/,$(INT_LIBS)) \
+	$(addprefix $(LIBDIR)/,$(EXT_LIBS)) \
+	$(addprefix $(BINDIR)/,$(ALL_TOOLS))
+
+.PHONY: $(TARGDIR)/all
+
+#-------------------------------------------------------------------------------
+# clean
+#
+INTERM_SRC = \
+	$(SRCDIR)/vcf-lex.c \
+	$(SRCDIR)/vcf-grammar.c \
+	$(SRCDIR)/vcf-grammar.h 
+
+clean: stdclean
+
+.PHONY: clean
+
+.PRECIOUS: $(INTERM_SRC)
+
+#-------------------------------------------------------------------------------
+# libvcfloader
+#
+$(ILIBDIR)/libvcfloader: $(ILIBDIR)/libvcfloader.$(LIBX)
+
+LIBVCF_SRC = \
+	vcf-grammar \
+	vcf-lex \
+    vcf-reader \
+    vcf-database
+    
+# flex/bison should only be invoked manually in an environment ensures the correct versions:
+# bison 2.5, flex 2.5.35
+bison:
+	bison -o $(SRCDIR)/vcf-grammar.c --defines=$(SRCDIR)/vcf-grammar.h -v --no-lines $(SRCDIR)/vcf-grammar.y    
+
+flex:    
+	flex -t $(SRCDIR)/vcf-lex.l | grep -v '^#line' > $(SRCDIR)/vcf-lex.c
+    
+$(SRCDIR)/vcf-grammar.c $(SRCDIR)/vcf-grammar.h: $(SRCDIR)/vcf-grammar.y
+
+LIBVCF_OBJ = \
+	$(addsuffix .$(LOBX),$(LIBVCF_SRC))
+
+LIBVCF_LIB = \
+
+$(ILIBDIR)/libvcfloader.$(SHLX): $(INTERM_SRC) $(LIBVCF_OBJ)
+	$(LD) --dlib -o $@ $^ $(LIBVCF_LIB)
+
+$(ILIBDIR)/libvcfloader.$(LIBX): $(INTERM_SRC) $(LIBVCF_OBJ)
+	$(LD) --slib -o $@ $^ $(LIBVCF_LIB)
+
diff --git a/tools/vcf-loader/vcf-database.c b/tools/vcf-loader/vcf-database.c
new file mode 100644
index 0000000..ac18c74
--- /dev/null
+++ b/tools/vcf-loader/vcf-database.c
@@ -0,0 +1,168 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ * 
+ */
+
+#include "vcf-database.h"
+
+#include <vdb/manager.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+
+#include <align/writer-reference.h>
+
+#include "vcf-reader.h"
+
+static rc_t SaveVariants        ( const VcfReader* reader, const char configPath[], VDatabase* db, VDBManager* dbMgr );
+static rc_t SaveVariantPhases   ( const VcfReader* reader, VDatabase* db, VDBManager* dbMgr );
+static rc_t SaveAlignments      ( const VcfReader* reader, VDatabase* db, VDBManager* dbMgr );
+
+rc_t VcfDatabaseSave ( const struct VcfReader* reader, const char configPath[], VDatabase* db )
+{
+    VDBManager* dbMgr;
+    rc_t rc = VDatabaseOpenManagerUpdate(db, &dbMgr);
+    if (rc == 0)
+    {
+        rc_t rc2;
+        
+        rc = SaveVariants(reader, configPath, db, dbMgr);
+        if (rc == 0)
+            rc = SaveVariantPhases(reader, db, dbMgr);
+        if (rc == 0)
+            rc = SaveAlignments(reader, db, dbMgr);
+            
+        rc2 = VDBManagerRelease(dbMgr);
+        if (rc == 0)
+            rc = rc2;
+    }
+    return rc;
+}
+
+rc_t SaveVariants( const VcfReader* reader, const char configPath[], VDatabase* db, VDBManager* dbMgr )
+{
+    VTable* tbl;
+    rc_t rc = VDatabaseCreateTable(db, &tbl, "VARIANT", kcmCreate | kcmMD5, "VARIANT");
+    if (rc == 0)
+    {
+        rc_t rc2;
+        VCursor *cur;
+        rc = VTableCreateCursorWrite( tbl, &cur, kcmInsert );
+        if (rc == 0)
+        {
+            uint32_t ref_id_idx, position_idx, length_idx, sequence_idx;
+            rc = VCursorAddColumn( cur, &ref_id_idx, "ref_id" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &position_idx, "position" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &length_idx, "length" );
+            if (rc == 0) rc = VCursorAddColumn( cur, &sequence_idx, "sequence" );
+
+            if (rc == 0)
+            {
+                rc = VCursorOpen( cur );
+                if (rc == 0)
+                {
+                    uint32_t count;
+                    rc_t rc = VcfReaderGetDataLineCount(reader, &count);
+                    if (rc == 0)
+                    {   
+                        const ReferenceMgr* refMgr;
+                        rc = ReferenceMgr_Make(&refMgr, db, dbMgr, 0, configPath, NULL, 0, 0, 0);
+                        if (rc == 0)
+                        {
+                            uint32_t i;
+                            for (i = 0; i < count; ++i)
+                            {
+                                const VcfDataLine* line;
+                                rc = VcfReaderGetDataLine(reader, i, &line);            
+
+                                if (rc == 0)
+                                {
+                                    const ReferenceSeq* seq;
+                                    #define MAX_CHROMOSOME_NAME_LENGTH 1024
+                                    char chromName[MAX_CHROMOSOME_NAME_LENGTH];
+                                    bool shouldUnmap = false;
+                                    bool wasRenamed = false;
+                                    string_copy(chromName, sizeof(chromName), line->chromosome.addr, line->chromosome.size);
+                                    rc = (ReferenceMgr_GetSeq(refMgr, &seq, chromName, &shouldUnmap, true, &wasRenamed));
+                                    if (rc == 0)
+                                    {
+                                        int64_t ref_id;
+                                        INSDC_coord_zero ref_start;
+                                        assert(shouldUnmap == false);
+                                        rc = ReferenceSeq_TranslateOffset_int(seq, line->position, &ref_id, &ref_start, NULL);
+                                        if (rc == 0)
+                                        {
+                                            rc = VCursorOpenRow( cur );
+                                        
+                                            if (rc == 0) 
+                                                rc = VCursorWrite( cur, ref_id_idx,    sizeof(ref_id) * 8, &ref_id, 0, 1);
+                                            if (rc == 0) 
+                                                rc = VCursorWrite( cur, position_idx,  sizeof(ref_start) * 8, &ref_start, 0, 1);
+                                            if (rc == 0) 
+                                                rc = VCursorWrite( cur, length_idx,    sizeof(line->altBases.len) * 8,   &line->altBases.len,   0, 1);
+                                            if (rc == 0) 
+                                                rc = VCursorWrite( cur, sequence_idx,  line->altBases.len * 8,    line->altBases.addr,    0, 1);
+                                        }
+                                        rc2 = ReferenceSeq_Release(seq);
+                                        if (rc == 0)
+                                            rc = rc2;
+                                    }    
+                                    if (rc == 0) rc = VCursorCommitRow( cur );
+                                    if (rc == 0) rc = VCursorCloseRow( cur );
+                                }
+                                if (rc != 0)
+                                    break;
+                            }
+                            rc2 = ReferenceMgr_Release(refMgr, rc == 0, NULL, false, NULL);
+                            if (rc == 0)
+                                rc = rc2;
+                        }
+                    }
+                    if (rc == 0)
+                        rc = VCursorCommit( cur );
+                }
+            }
+            rc2 = VCursorRelease(cur);
+            if (rc == 0)
+                rc = rc2;
+        }
+        
+        rc2 = VTableRelease(tbl);
+        if (rc == 0)
+            rc = rc2;
+    }
+            
+    return rc;
+}
+
+rc_t SaveVariantPhases( const VcfReader* reader, VDatabase* db, VDBManager* dbMgr )
+{
+    return 0;
+}
+
+rc_t SaveAlignments( const VcfReader* reader, VDatabase* db, VDBManager* dbMgr )
+{
+    return 0;
+}
+
diff --git a/tools/vcf-loader/vcf-database.h b/tools/vcf-loader/vcf-database.h
new file mode 100644
index 0000000..fb3bb4c
--- /dev/null
+++ b/tools/vcf-loader/vcf-database.h
@@ -0,0 +1,40 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_vcf_database_
+#define _h_vcf_database_
+
+#include <klib/rc.h>
+
+struct VcfReader;
+struct VDatabase;
+
+/*
+ * Save into a database
+ */
+extern rc_t VcfDatabaseSave ( const struct VcfReader* reader, const char configPath[], struct VDatabase* db );
+
+#endif /* _h_vcf_database_ */
diff --git a/tools/vcf-loader/vcf-grammar.c b/tools/vcf-loader/vcf-grammar.c
new file mode 100644
index 0000000..16f6e3a
--- /dev/null
+++ b/tools/vcf-loader/vcf-grammar.c
@@ -0,0 +1,1686 @@
+/* A Bison parser, made by GNU Bison 2.5.  */
+
+/* Bison implementation for Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989-1990, 2000-2011 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 3 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, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+   
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.5"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 1
+
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+/* Substitute the variable and function names.  */
+#define yyparse         VCF_parse
+#define yylex           VCF_lex
+#define yyerror         VCF_error
+#define yylval          VCF_lval
+#define yychar          VCF_char
+#define yydebug         VCF_debug
+#define yynerrs         VCF_nerrs
+
+
+/* Copy the first part of user declarations.  */
+
+  
+    #include "vcf-parse.h"
+
+    #define YYSTYPE VCFToken
+    #define YYLEX_PARAM pb->scanner
+    #define YYDEBUG 1
+
+    #include "vcf-grammar.h"
+
+
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 1
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     vcfENDOFTEXT = 0,
+     vcfMETAKEY_FORMAT = 258,
+     vcfMETAKEY = 259,
+     vcfMETAVALUE = 260,
+     vcfHEADERITEM = 261,
+     vcfDATAITEM = 262,
+     vcfENDLINE = 263
+   };
+#endif
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+/* Copy the second part of user declarations.  */
+
+
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+    int yyi;
+#endif
+{
+  return yyi;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef EXIT_SUCCESS
+#      define EXIT_SUCCESS 0
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
+       && ! ((defined YYMALLOC || defined malloc) \
+	     && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef EXIT_SUCCESS
+#    define EXIT_SUCCESS 0
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+     && (! defined __cplusplus \
+	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
+    do									\
+      {									\
+	YYSIZE_T yynewbytes;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
+	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+	yyptr += yynewbytes / sizeof (*yyptr);				\
+      }									\
+    while (YYID (0))
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T yyi;				\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  6
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   28
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  13
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  14
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  23
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  41
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   263
+
+#define YYTRANSLATE(YYX)						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const yytype_uint8 yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,    12,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+      10,     9,    11,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5,     6,     7,     8
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const yytype_uint8 yyprhs[] =
+{
+       0,     0,     3,     9,    11,    12,    17,    19,    20,    22,
+      25,    30,    31,    39,    41,    45,    49,    52,    54,    57,
+      59,    62,    65,    67
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const yytype_int8 yyrhs[] =
+{
+      14,     0,    -1,    15,    16,    22,    24,     0,    -1,     1,
+      -1,    -1,     3,     9,     5,     8,    -1,    17,    -1,    -1,
+      18,    -1,    17,    18,    -1,     4,     9,     5,     8,    -1,
+      -1,     4,     9,    10,    19,    20,    11,     8,    -1,    21,
+      -1,    20,    12,    21,    -1,     4,     9,     5,    -1,    23,
+       8,    -1,     6,    -1,    23,     6,    -1,    25,    -1,    24,
+      25,    -1,    26,     8,    -1,     7,    -1,    26,     7,    -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const yytype_uint8 yyrline[] =
+{
+       0,    54,    54,    61,    63,    67,    71,    72,    76,    77,
+      81,    82,    82,    86,    87,    91,    95,    99,   100,   104,
+     105,   109,   113,   114
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yytname[] =
+{
+  "vcfENDOFTEXT", "error", "$undefined", "vcfMETAKEY_FORMAT",
+  "vcfMETAKEY", "vcfMETAVALUE", "vcfHEADERITEM", "vcfDATAITEM",
+  "vcfENDLINE", "'='", "'<'", "'>'", "','", "$accept", "vcfFile",
+  "fileFormatLine", "metaLinesOpt", "metaLines", "metaLine", "$@1",
+  "keyValuePairs", "keyValue", "headerLine", "headerItems", "dataLines",
+  "dataLine", "dataItems", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const yytype_uint16 yytoknum[] =
+{
+       0,   256,   257,   258,   259,   260,   261,   262,   263,    61,
+      60,    62,    44
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint8 yyr1[] =
+{
+       0,    13,    14,    14,    14,    15,    16,    16,    17,    17,
+      18,    19,    18,    20,    20,    21,    22,    23,    23,    24,
+      24,    25,    26,    26
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
+{
+       0,     2,     5,     1,     0,     4,     1,     0,     1,     2,
+       4,     0,     7,     1,     3,     3,     2,     1,     2,     1,
+       2,     2,     1,     2
+};
+
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+   Performed when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const yytype_uint8 yydefact[] =
+{
+       0,     3,     0,     0,     7,     0,     1,     0,     0,     6,
+       8,     0,     0,    17,     0,     0,     9,     5,     0,    11,
+      22,     0,    19,     0,    18,    16,    10,     0,     2,    20,
+      23,    21,     0,     0,    13,     0,     0,     0,    15,    12,
+      14
+};
+
+/* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int8 yydefgoto[] =
+{
+      -1,     3,     4,     8,     9,    10,    27,    33,    34,    14,
+      15,    21,    22,    23
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -14
+static const yytype_int8 yypact[] =
+{
+       2,   -14,    -5,     8,     6,     9,   -14,    10,    11,     6,
+     -14,    12,    -4,   -14,    14,     3,   -14,   -14,    15,   -14,
+     -14,     0,   -14,     5,   -14,   -14,   -14,    18,   -14,   -14,
+     -14,   -14,    16,     4,   -14,    13,    19,    18,   -14,   -14,
+     -14
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const yytype_int8 yypgoto[] =
+{
+     -14,   -14,   -14,   -14,   -14,    17,   -14,   -14,   -13,   -14,
+     -14,   -14,     7,   -14
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -5
+static const yytype_int8 yytable[] =
+{
+      28,    18,    -4,     1,     5,     2,    19,    20,     6,    24,
+       7,    25,    30,    31,    11,    36,    37,    13,    38,    12,
+      17,    20,    32,    26,    40,    35,    16,    39,    29
+};
+
+#define yypact_value_is_default(yystate) \
+  ((yystate) == (-14))
+
+#define yytable_value_is_error(yytable_value) \
+  YYID (0)
+
+static const yytype_uint8 yycheck[] =
+{
+       0,     5,     0,     1,     9,     3,    10,     7,     0,     6,
+       4,     8,     7,     8,     5,    11,    12,     6,     5,     9,
+       8,     7,     4,     8,    37,     9,     9,     8,    21
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const yytype_uint8 yystos[] =
+{
+       0,     1,     3,    14,    15,     9,     0,     4,    16,    17,
+      18,     5,     9,     6,    22,    23,    18,     8,     5,    10,
+       7,    24,    25,    26,     6,     8,     8,    19,     0,    25,
+       7,     8,     4,    20,    21,     9,    11,    12,     5,     8,
+      21
+};
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		(-2)
+#define YYEOF		0
+
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT		goto yyabortlab
+#define YYERROR		goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
+
+#define YYFAIL		goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
+
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    {								\
+      yychar = (Token);						\
+      yylval = (Value);						\
+      YYPOPSTACK (1);						\
+      goto yybackup;						\
+    }								\
+  else								\
+    {								\
+      yyerror (pb, YY_("syntax error: cannot back up")); \
+      YYERROR;							\
+    }								\
+while (YYID (0))
+
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (YYID (N))                                                    \
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (YYID (0))
+#endif
+
+
+/* This macro is provided for backward compatibility. */
+
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (&yylval, YYLEX_PARAM)
+#else
+# define YYLEX yylex (&yylval, pb)
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yydebug)					\
+    YYFPRINTF Args;				\
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
+do {									  \
+  if (yydebug)								  \
+    {									  \
+      YYFPRINTF (stderr, "%s ", Title);					  \
+      yy_symbol_print (stderr,						  \
+		  Type, Value, pb); \
+      YYFPRINTF (stderr, "\n");						  \
+    }									  \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, VCFParseBlock* pb)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep, pb)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+    VCFParseBlock* pb;
+#endif
+{
+  if (!yyvaluep)
+    return;
+  YYUSE (pb);
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+  YYUSE (yyoutput);
+# endif
+  switch (yytype)
+    {
+      default:
+	break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, VCFParseBlock* pb)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep, pb)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+    VCFParseBlock* pb;
+#endif
+{
+  if (yytype < YYNTOKENS)
+    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+  else
+    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep, pb);
+  YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+#else
+static void
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)				\
+do {								\
+  if (yydebug)							\
+    yy_stack_print ((Bottom), (Top));				\
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule, VCFParseBlock* pb)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule, pb)
+    YYSTYPE *yyvsp;
+    int yyrule;
+    VCFParseBlock* pb;
+#endif
+{
+  int yynrhs = yyr2[yyrule];
+  int yyi;
+  unsigned long int yylno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+	     yyrule - 1, yylno);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+		       &(yyvsp[(yyi + 1) - (yynrhs)])
+		       		       , pb);
+      YYFPRINTF (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (yydebug)				\
+    yy_reduce_print (yyvsp, Rule, pb); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+    const char *yystr;
+#endif
+{
+  YYSIZE_T yylen;
+  for (yylen = 0; yystr[yylen]; yylen++)
+    continue;
+  return yylen;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+    char *yydest;
+    const char *yysrc;
+#endif
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      YYSIZE_T yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+	switch (*++yyp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++yyp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (yyres)
+	      yyres[yyn] = *yyp;
+	    yyn++;
+	    break;
+
+	  case '"':
+	    if (yyres)
+	      yyres[yyn] = '\0';
+	    return yyn;
+	  }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+   about the unexpected token YYTOKEN for the state stack whose top is
+   YYSSP.
+
+   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
+   not large enough to hold the message.  In that case, also set
+   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
+   required number of bytes is too large to store.  */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+                yytype_int16 *yyssp, int yytoken)
+{
+  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+  YYSIZE_T yysize = yysize0;
+  YYSIZE_T yysize1;
+  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+  /* Internationalized format string. */
+  const char *yyformat = 0;
+  /* Arguments of yyformat. */
+  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+  /* Number of reported tokens (one for the "unexpected", one per
+     "expected"). */
+  int yycount = 0;
+
+  /* There are many possibilities here to consider:
+     - Assume YYFAIL is not used.  It's too flawed to consider.  See
+       <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+       for details.  YYERROR is fine as it does not invoke this
+       function.
+     - If this state is a consistent state with a default action, then
+       the only way this function was invoked is if the default action
+       is an error action.  In that case, don't check for expected
+       tokens because there are none.
+     - The only way there can be no lookahead present (in yychar) is if
+       this state is a consistent state with a default action.  Thus,
+       detecting the absence of a lookahead is sufficient to determine
+       that there is no unexpected or expected token to report.  In that
+       case, just report a simple "syntax error".
+     - Don't assume there isn't a lookahead just because this state is a
+       consistent state with a default action.  There might have been a
+       previous inconsistent state, consistent state with a non-default
+       action, or user semantic action that manipulated yychar.
+     - Of course, the expected token list depends on states to have
+       correct lookahead information, and it depends on the parser not
+       to perform extra reductions after fetching a lookahead from the
+       scanner and before detecting a syntax error.  Thus, state merging
+       (from LALR or IELR) and default reductions corrupt the expected
+       token list.  However, the list is correct for canonical LR with
+       one exception: it will still contain any token that will not be
+       accepted due to an error action in a later state.
+  */
+  if (yytoken != YYEMPTY)
+    {
+      int yyn = yypact[*yyssp];
+      yyarg[yycount++] = yytname[yytoken];
+      if (!yypact_value_is_default (yyn))
+        {
+          /* Start YYX at -YYN if negative to avoid negative indexes in
+             YYCHECK.  In other words, skip the first -YYN actions for
+             this state because they are default actions.  */
+          int yyxbegin = yyn < 0 ? -yyn : 0;
+          /* Stay within bounds of both yycheck and yytname.  */
+          int yychecklim = YYLAST - yyn + 1;
+          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+          int yyx;
+
+          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+                && !yytable_value_is_error (yytable[yyx + yyn]))
+              {
+                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+                  {
+                    yycount = 1;
+                    yysize = yysize0;
+                    break;
+                  }
+                yyarg[yycount++] = yytname[yyx];
+                yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+                if (! (yysize <= yysize1
+                       && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                  return 2;
+                yysize = yysize1;
+              }
+        }
+    }
+
+  switch (yycount)
+    {
+# define YYCASE_(N, S)                      \
+      case N:                               \
+        yyformat = S;                       \
+      break
+      YYCASE_(0, YY_("syntax error"));
+      YYCASE_(1, YY_("syntax error, unexpected %s"));
+      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+    }
+
+  yysize1 = yysize + yystrlen (yyformat);
+  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+    return 2;
+  yysize = yysize1;
+
+  if (*yymsg_alloc < yysize)
+    {
+      *yymsg_alloc = 2 * yysize;
+      if (! (yysize <= *yymsg_alloc
+             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+      return 1;
+    }
+
+  /* Avoid sprintf, as that infringes on the user's name space.
+     Don't have undefined behavior even if the translation
+     produced a string with the wrong number of "%s"s.  */
+  {
+    char *yyp = *yymsg;
+    int yyi = 0;
+    while ((*yyp = *yyformat) != '\0')
+      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+        {
+          yyp += yytnamerr (yyp, yyarg[yyi++]);
+          yyformat += 2;
+        }
+      else
+        {
+          yyp++;
+          yyformat++;
+        }
+  }
+  return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, VCFParseBlock* pb)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep, pb)
+    const char *yymsg;
+    int yytype;
+    YYSTYPE *yyvaluep;
+    VCFParseBlock* pb;
+#endif
+{
+  YYUSE (yyvaluep);
+  YYUSE (pb);
+
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+  switch (yytype)
+    {
+
+      default:
+	break;
+    }
+}
+
+
+/* Prevent warnings from -Wmissing-prototypes.  */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (VCFParseBlock* pb);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+/*----------.
+| yyparse.  |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+    void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (VCFParseBlock* pb)
+#else
+int
+yyparse (pb)
+    VCFParseBlock* pb;
+#endif
+#endif
+{
+/* The lookahead symbol.  */
+int yychar;
+
+/* The semantic value of the lookahead symbol.  */
+YYSTYPE yylval;
+
+    /* Number of syntax errors so far.  */
+    int yynerrs;
+
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.
+
+       Refer to the stacks thru separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
+
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
+
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
+
+    YYSIZE_T yystacksize;
+
+  int yyn;
+  int yyresult;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken;
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yylen = 0;
+
+  yytoken = 0;
+  yyss = yyssa;
+  yyvs = yyvsa;
+  yystacksize = YYINITDEPTH;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY; /* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+  yyssp = yyss;
+  yyvsp = yyvs;
+
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyss + yystacksize - 1 <= yyssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+	/* Give user a chance to reallocate the stack.  Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *yyvs1 = yyvs;
+	yytype_int16 *yyss1 = yyss;
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  This used to be a
+	   conditional around just the two extra args, but that might
+	   be undefined if yyoverflow is a macro.  */
+	yyoverflow (YY_("memory exhausted"),
+		    &yyss1, yysize * sizeof (*yyssp),
+		    &yyvs1, yysize * sizeof (*yyvsp),
+		    &yystacksize);
+
+	yyss = yyss1;
+	yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yystacksize)
+	goto yyexhaustedlab;
+      yystacksize *= 2;
+      if (YYMAXDEPTH < yystacksize)
+	yystacksize = YYMAXDEPTH;
+
+      {
+	yytype_int16 *yyss1 = yyss;
+	union yyalloc *yyptr =
+	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+	if (! yyptr)
+	  goto yyexhaustedlab;
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+#  undef YYSTACK_RELOCATE
+	if (yyss1 != yyssa)
+	  YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) yystacksize));
+
+      if (yyss + yystacksize - 1 <= yyssp)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
+  goto yybackup;
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     lookahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+  yyn = yypact[yystate];
+  if (yypact_value_is_default (yyn))
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = YYLEX;
+    }
+
+  if (yychar <= YYEOF)
+    {
+      yychar = yytoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yytoken = YYTRANSLATE (yychar);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+    goto yydefault;
+  yyn = yytable[yyn];
+  if (yyn <= 0)
+    {
+      if (yytable_value_is_error (yyn))
+        goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  /* Shift the lookahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
+
+  yystate = yyn;
+  *++yyvsp = yylval;
+
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
+    {
+        case 2:
+
+    { return 1; }
+    break;
+
+  case 3:
+
+    { return 0; }
+    break;
+
+  case 4:
+
+    { yyerror(pb, "no input found"); return 0; }
+    break;
+
+  case 5:
+
+    { pb->metaLine(pb, & (yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)])); }
+    break;
+
+  case 10:
+
+    { pb->metaLine(pb, & (yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)])); }
+    break;
+
+  case 11:
+
+    { pb->openMetaLine(pb, &(yyvsp[(1) - (3)])); }
+    break;
+
+  case 12:
+
+    { pb->closeMetaLine(pb); }
+    break;
+
+  case 15:
+
+    { pb->keyValue(pb, & (yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)])); }
+    break;
+
+  case 17:
+
+    { pb->headerItem(pb, & (yyvsp[(1) - (1)])); }
+    break;
+
+  case 18:
+
+    { pb->headerItem(pb, & (yyvsp[(2) - (2)])); }
+    break;
+
+  case 21:
+
+    { pb->closeDataLine(pb); }
+    break;
+
+  case 22:
+
+    { pb->openDataLine(pb); pb->dataItem(pb, & (yyvsp[(1) - (1)])); }
+    break;
+
+  case 23:
+
+    { pb->dataItem(pb, & (yyvsp[(2) - (2)])); }
+    break;
+
+
+
+      default: break;
+    }
+  /* User semantic actions sometimes alter yychar, and that requires
+     that yytoken be updated with the new translation.  We take the
+     approach of translating immediately before every use of yytoken.
+     One alternative is translating here after every semantic action,
+     but that translation would be missed if the semantic action invokes
+     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
+     incorrect destructor might then be invoked immediately.  In the
+     case of YYERROR or YYBACKUP, subsequent parser actions might lead
+     to an incorrect destructor call or verbose syntax error message
+     before the lookahead is translated.  */
+  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+
+  *++yyvsp = yyval;
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTOKENS];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* Make sure we have latest lookahead translation.  See comments at
+     user semantic actions for why this is necessary.  */
+  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+#if ! YYERROR_VERBOSE
+      yyerror (pb, YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+                                        yyssp, yytoken)
+      {
+        char const *yymsgp = YY_("syntax error");
+        int yysyntax_error_status;
+        yysyntax_error_status = YYSYNTAX_ERROR;
+        if (yysyntax_error_status == 0)
+          yymsgp = yymsg;
+        else if (yysyntax_error_status == 1)
+          {
+            if (yymsg != yymsgbuf)
+              YYSTACK_FREE (yymsg);
+            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+            if (!yymsg)
+              {
+                yymsg = yymsgbuf;
+                yymsg_alloc = sizeof yymsgbuf;
+                yysyntax_error_status = 2;
+              }
+            else
+              {
+                yysyntax_error_status = YYSYNTAX_ERROR;
+                yymsgp = yymsg;
+              }
+          }
+        yyerror (pb, yymsgp);
+        if (yysyntax_error_status == 2)
+          goto yyexhaustedlab;
+      }
+# undef YYSYNTAX_ERROR
+#endif
+    }
+
+
+
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse lookahead token after an
+	 error, discard it.  */
+
+      if (yychar <= YYEOF)
+	{
+	  /* Return failure if at end of input.  */
+	  if (yychar == YYEOF)
+	    YYABORT;
+	}
+      else
+	{
+	  yydestruct ("Error: discarding",
+		      yytoken, &yylval, pb);
+	  yychar = YYEMPTY;
+	}
+    }
+
+  /* Else will try to reuse lookahead token after shifting the error
+     token.  */
+  goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yyerrorlab;
+
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+  yystate = *yyssp;
+  goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (!yypact_value_is_default (yyn))
+	{
+	  yyn += YYTERROR;
+	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+	    {
+	      yyn = yytable[yyn];
+	      if (0 < yyn)
+		break;
+	    }
+	}
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+	YYABORT;
+
+
+      yydestruct ("Error: popping",
+		  yystos[yystate], yyvsp, pb);
+      YYPOPSTACK (1);
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
+    }
+
+  *++yyvsp = yylval;
+
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yyexhaustedlab:
+  yyerror (pb, YY_("memory exhausted"));
+  yyresult = 2;
+  /* Fall through.  */
+#endif
+
+yyreturn:
+  if (yychar != YYEMPTY)
+    {
+      /* Make sure we have latest lookahead translation.  See comments at
+         user semantic actions for why this is necessary.  */
+      yytoken = YYTRANSLATE (yychar);
+      yydestruct ("Cleanup: discarding lookahead",
+                  yytoken, &yylval, pb);
+    }
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yylen);
+  YY_STACK_PRINT (yyss, yyssp);
+  while (yyssp != yyss)
+    {
+      yydestruct ("Cleanup: popping",
+		  yystos[*yyssp], yyvsp, pb);
+      YYPOPSTACK (1);
+    }
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+  if (yymsg != yymsgbuf)
+    YYSTACK_FREE (yymsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (yyresult);
+}
+
+
+
+
+
+void VCF_error(struct VCFParseBlock* pb, const char* msg)
+{
+    if (pb && pb->error)
+        pb->error(pb, msg);
+}
+
diff --git a/tools/vcf-loader/vcf-grammar.h b/tools/vcf-loader/vcf-grammar.h
new file mode 100644
index 0000000..f64e939
--- /dev/null
+++ b/tools/vcf-loader/vcf-grammar.h
@@ -0,0 +1,61 @@
+/* A Bison parser, made by GNU Bison 2.5.  */
+
+/* Bison interface for Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989-1990, 2000-2011 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 3 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, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+   
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     vcfENDOFTEXT = 0,
+     vcfMETAKEY_FORMAT = 258,
+     vcfMETAKEY = 259,
+     vcfMETAVALUE = 260,
+     vcfHEADERITEM = 261,
+     vcfDATAITEM = 262,
+     vcfENDLINE = 263
+   };
+#endif
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+
+
diff --git a/tools/vcf-loader/vcf-grammar.y b/tools/vcf-loader/vcf-grammar.y
new file mode 100644
index 0000000..03d20b6
--- /dev/null
+++ b/tools/vcf-loader/vcf-grammar.y
@@ -0,0 +1,123 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+ 
+%{  
+    #include "vcf-parse.h"
+
+    #define YYSTYPE VCFToken
+    #define YYLEX_PARAM pb->scanner
+    #define YYDEBUG 1
+
+    #include "vcf-grammar.h"
+%}
+
+%pure-parser
+%parse-param {VCFParseBlock* pb }
+%lex-param {VCFParseBlock* pb }
+%error-verbose 
+%name-prefix="VCF_"
+
+%token vcfMETAKEY_FORMAT
+%token vcfMETAKEY
+%token vcfMETAVALUE
+%token vcfHEADERITEM
+%token vcfDATAITEM
+%token vcfENDLINE
+%token vcfENDOFTEXT 0
+
+%%
+
+vcfFile: 
+        fileFormatLine
+        metaLinesOpt           
+        headerLine
+        dataLines
+        vcfENDOFTEXT
+            { return 1; }  
+    |
+        error { return 0; } 
+    |
+        { yyerror(pb, "no input found"); return 0; }
+    ;
+
+fileFormatLine:
+        vcfMETAKEY_FORMAT '=' vcfMETAVALUE vcfENDLINE   { pb->metaLine(pb, & $1, &$3); }
+    ;
+    
+metaLinesOpt:
+    metaLines
+    |
+    ;
+
+metaLines:
+        metaLine
+    |   metaLines metaLine
+    ;
+    
+metaLine:
+        vcfMETAKEY '=' vcfMETAVALUE vcfENDLINE         { pb->metaLine(pb, & $1, &$3); }                          
+    |   vcfMETAKEY '=' '<' { pb->openMetaLine(pb, &$1); } keyValuePairs '>' vcfENDLINE { pb->closeMetaLine(pb); }         
+    ;
+
+keyValuePairs:
+        keyValue
+    |   keyValuePairs ',' keyValue
+    ;    
+    
+keyValue:
+    vcfMETAKEY '=' vcfMETAVALUE { pb->keyValue(pb, & $1, &$3); }                          
+    ;
+    
+headerLine:    
+    headerItems vcfENDLINE 
+    ;
+
+headerItems:    
+        vcfHEADERITEM               { pb->headerItem(pb, & $1); }  
+    |   headerItems vcfHEADERITEM   { pb->headerItem(pb, & $2); }  
+    ;    
+
+dataLines:
+        dataLine
+    |   dataLines dataLine  
+    ;
+    
+dataLine:
+    dataItems vcfENDLINE        { pb->closeDataLine(pb); }    
+    ;
+    
+dataItems:    
+        vcfDATAITEM             { pb->openDataLine(pb); pb->dataItem(pb, & $1); }  
+    |   dataItems vcfDATAITEM   { pb->dataItem(pb, & $2); }  
+    ;
+    
+%%
+
+void VCF_error(struct VCFParseBlock* pb, const char* msg)
+{
+    if (pb && pb->error)
+        pb->error(pb, msg);
+}
diff --git a/tools/vcf-loader/vcf-lex.c b/tools/vcf-loader/vcf-lex.c
new file mode 100644
index 0000000..356a517
--- /dev/null
+++ b/tools/vcf-loader/vcf-lex.c
@@ -0,0 +1,2528 @@
+
+
+#define  YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+/* %not-for-header */
+
+/* %if-c-only */
+/* %if-not-reentrant */
+/* %endif */
+/* %endif */
+/* %ok-for-header */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 35
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* %if-c++-only */
+/* %endif */
+
+/* %if-c-only */
+    
+/* %endif */
+
+/* %if-c-only */
+
+/* %endif */
+
+/* First, we deal with  platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+/* %if-c-only */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+/* %endif */
+
+/* %if-tables-serialization */
+/* %endif */
+/* end standard C headers. */
+
+/* %if-c-or-c++ */
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types. 
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t; 
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN               (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN              (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN              (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX               (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX              (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX              (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX              (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX             (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX             (4294967295U)
+#endif
+
+#endif /* ! FLEXINT_H */
+
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif	/* defined (__STDC__) */
+#endif	/* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+/* %not-for-header */
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+/* %ok-for-header */
+
+/* %not-for-header */
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+/* %ok-for-header */
+
+/* %if-reentrant */
+
+/* An opaque pointer. */
+#ifndef YY_TYPEDEF_YY_SCANNER_T
+#define YY_TYPEDEF_YY_SCANNER_T
+typedef void* yyscan_t;
+#endif
+
+/* For convenience, these vars (plus the bison vars far below)
+   are macros in the reentrant scanner. */
+#define yyin yyg->yyin_r
+#define yyout yyg->yyout_r
+#define yyextra yyg->yyextra_r
+#define yyleng yyg->yyleng_r
+#define yytext yyg->yytext_r
+#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
+#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
+#define yy_flex_debug yyg->yy_flex_debug_r
+
+/* %endif */
+
+/* %if-not-reentrant */
+/* %endif */
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yyg->yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yyg->yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE VCF_restart(yyin ,yyscanner )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+/* %if-not-reentrant */
+/* %endif */
+
+/* %if-c-only */
+/* %if-not-reentrant */
+/* %endif */
+/* %endif */
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+    /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
+     *       access to the local variable yy_act. Since yyless() is a macro, it would break
+     *       existing scanners that call yyless() from OUTSIDE VCF_lex. 
+     *       One obvious solution it to make yy_act a global. I tried that, and saw
+     *       a 5% performance hit in a non-yylineno scanner, because yy_act is
+     *       normally declared as a register variable-- so it is not worth it.
+     */
+    #define  YY_LESS_LINENO(n) \
+            do { \
+                int yyl;\
+                for ( yyl = n; yyl < yyleng; ++yyl )\
+                    if ( yytext[yyl] == '\n' )\
+                        --yylineno;\
+            }while(0)
+    
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+		*yy_cp = yyg->yy_hold_char; \
+		YY_RESTORE_YY_MORE_OFFSET \
+		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+	{
+/* %if-c-only */
+	FILE *yy_input_file;
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
+	char *yy_ch_buf;		/* input buffer */
+	char *yy_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	yy_size_t yy_buf_size;
+
+	/* Number of characters read into yy_ch_buf, not including EOB
+	 * characters.
+	 */
+	int yy_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_at_bol;
+
+    int yy_bs_lineno; /**< The line count. */
+    int yy_bs_column; /**< The column count. */
+    
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_fill_buffer;
+
+	int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via VCF_restart()), so that the user can continue scanning by
+	 * just pointing yyin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+
+	};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* %if-c-only Standard (non-C++) definition */
+/* %not-for-header */
+
+/* %if-not-reentrant */
+/* %endif */
+/* %ok-for-header */
+
+/* %endif */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
+                          ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
+                          : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
+
+/* %if-c-only Standard (non-C++) definition */
+
+/* %if-not-reentrant */
+/* %not-for-header */
+
+/* %ok-for-header */
+
+/* %endif */
+
+void VCF_restart (FILE *input_file ,yyscan_t yyscanner );
+void VCF__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
+YY_BUFFER_STATE VCF__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
+void VCF__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
+void VCF__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
+void VCF_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
+void VCF_pop_buffer_state (yyscan_t yyscanner );
+
+static void VCF_ensure_buffer_stack (yyscan_t yyscanner );
+static void VCF__load_buffer_state (yyscan_t yyscanner );
+static void VCF__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
+
+#define YY_FLUSH_BUFFER VCF__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
+
+YY_BUFFER_STATE VCF__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
+YY_BUFFER_STATE VCF__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
+YY_BUFFER_STATE VCF__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+
+/* %endif */
+
+void *VCF_alloc (yy_size_t ,yyscan_t yyscanner );
+void *VCF_realloc (void *,yy_size_t ,yyscan_t yyscanner );
+void VCF_free (void * ,yyscan_t yyscanner );
+
+#define yy_new_buffer VCF__create_buffer
+
+#define yy_set_interactive(is_interactive) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){ \
+        VCF_ensure_buffer_stack (yyscanner); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            VCF__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+	}
+
+#define yy_set_bol(at_bol) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){\
+        VCF_ensure_buffer_stack (yyscanner); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            VCF__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
+/* Begin user sect3 */
+
+#define VCF_wrap(n) 1
+#define YY_SKIP_YYWRAP
+
+#define FLEX_DEBUG
+
+typedef unsigned char YY_CHAR;
+
+typedef int yy_state_type;
+
+#define yytext_ptr yytext_r
+
+/* %if-c-only Standard (non-C++) definition */
+
+static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
+static int yy_get_next_buffer (yyscan_t yyscanner );
+static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
+
+/* %endif */
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	yyg->yytext_ptr = yy_bp; \
+/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
+	yyleng = (int) ((size_t) (yy_cp - yy_bp)); \
+	yyg->yy_hold_char = *yy_cp; \
+	*yy_cp = '\0'; \
+/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
+	yyg->yy_c_buf_p = yy_cp;
+
+/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
+#define YY_NUM_RULES 17
+#define YY_END_OF_BUFFER 18
+/* This struct is not used in this scanner,
+   but its presence is necessary. */
+struct yy_trans_info
+	{
+	flex_int32_t yy_verify;
+	flex_int32_t yy_nxt;
+	};
+static yyconst flex_int16_t yy_accept[57] =
+    {   0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,   18,   15,   11,   12,   15,    3,    3,    3,
+        3,    2,   15,    4,   15,   15,    8,    8,   10,   10,
+       10,   14,   13,    3,    3,    1,   16,    4,    0,    6,
+        0,    8,   10,   10,    9,    7,    0,    0,    0,    0,
+        0,    0,    0,    0,    5,    0
+    } ;
+
+static yyconst flex_int32_t yy_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    5,    1,    1,    1,    1,    1,
+        1,    1,    1,    6,    7,    1,    1,    7,    7,    7,
+        7,    7,    7,    7,    7,    7,    7,    1,    1,    8,
+        9,    6,    1,    1,    7,    7,    7,    7,    7,    7,
+        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
+        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
+        1,    1,    1,    1,    7,    1,   10,    7,    7,    7,
+
+       11,   12,    7,    7,   13,    7,    7,   14,   15,    7,
+       16,    7,    7,   17,    7,   18,    7,    7,    7,    7,
+        7,    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
+    } ;
+
+static yyconst flex_int32_t yy_meta[19] =
+    {   0,
+        1,    2,    3,    3,    1,    4,    5,    4,    6,    5,
+        5,    5,    5,    5,    5,    5,    5,    5
+    } ;
+
+static yyconst flex_int16_t yy_base[71] =
+    {   0,
+        0,    3,    7,   10,   13,   16,   20,    0,   37,   45,
+       54,    0,  148,  177,  177,  177,  134,    0,    0,    0,
+       71,  131,    0,    0,   88,   67,    0,    0,    0,    0,
+       80,  177,  177,    0,    0,  177,    0,    0,   87,   87,
+       36,    0,    0,   89,  177,  177,   33,   74,   68,   34,
+       78,   43,   70,   83,   70,  177,   98,  104,  110,  116,
+      122,  128,  134,  140,  146,  152,  154,  160,  165,  170
+    } ;
+
+static yyconst flex_int16_t yy_def[71] =
+    {   0,
+       57,   58,   59,   59,   60,   60,   56,    7,   61,   61,
+       56,   11,   56,   56,   56,   56,   62,   63,   63,   63,
+       64,   56,   65,   66,   67,   67,   68,   68,   69,   69,
+       70,   56,   56,   63,   63,   56,   65,   66,   67,   56,
+       67,   68,   69,   70,   56,   56,   67,   67,   67,   67,
+       67,   67,   67,   67,   56,    0,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56
+    } ;
+
+static yyconst flex_int16_t yy_nxt[196] =
+    {   0,
+       56,   15,   16,   17,   19,   20,   21,   22,   15,   16,
+       17,   15,   16,   17,   15,   16,   17,   15,   16,   17,
+       14,   15,   16,   17,   14,   14,   25,   14,   14,   25,
+       25,   26,   25,   25,   25,   25,   25,   25,   28,   16,
+       17,   40,   40,   48,   40,   14,   28,   16,   17,   47,
+       51,   40,   53,   14,   29,   30,   16,   17,   29,   14,
+       31,   14,   14,   31,   31,   31,   31,   31,   31,   31,
+       31,   31,   32,   33,   32,   40,   40,   46,   40,   41,
+       43,   43,   40,   50,   43,   49,   40,   54,   45,   43,
+       43,   55,   52,   43,   46,   40,   40,   45,   14,   14,
+
+       14,   14,   14,   14,   18,   18,   18,   18,   18,   18,
+       23,   23,   23,   23,   23,   23,   24,   24,   24,   24,
+       24,   24,   27,   27,   27,   27,   27,   27,   32,   32,
+       32,   32,   32,   32,   34,   36,   33,   34,   34,   34,
+       35,   35,   35,   35,   35,   35,   37,   56,   56,   37,
+       37,   37,   38,   56,   56,   38,   38,   38,   39,   39,
+       42,   42,   56,   42,   42,   43,   43,   56,   56,   43,
+       44,   44,   56,   56,   44,   44,   13,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56
+
+    } ;
+
+static yyconst flex_int16_t yy_chk[196] =
+    {   0,
+        0,    1,    1,    1,    2,    2,    2,    2,    3,    3,
+        3,    4,    4,    4,    5,    5,    5,    6,    6,    6,
+        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
+        7,    7,    7,    7,    7,    7,    7,    7,    9,    9,
+        9,   47,   50,   47,   41,    9,   10,   10,   10,   41,
+       50,   52,   52,   10,   11,   11,   11,   11,   11,   11,
+       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
+       11,   11,   21,   21,   21,   26,   49,   55,   53,   26,
+       31,   31,   48,   49,   31,   48,   51,   53,   31,   44,
+       44,   54,   51,   44,   40,   39,   25,   44,   57,   57,
+
+       57,   57,   57,   57,   58,   58,   58,   58,   58,   58,
+       59,   59,   59,   59,   59,   59,   60,   60,   60,   60,
+       60,   60,   61,   61,   61,   61,   61,   61,   62,   62,
+       62,   62,   62,   62,   63,   22,   17,   63,   63,   63,
+       64,   64,   64,   64,   64,   64,   65,   13,    0,   65,
+       65,   65,   66,    0,    0,   66,   66,   66,   67,   67,
+       68,   68,    0,   68,   68,   69,   69,    0,    0,   69,
+       70,   70,    0,    0,   70,   70,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56
+
+    } ;
+
+/* Table of booleans, true if rule could match eol. */
+static yyconst flex_int32_t yy_rule_can_match_eol[18] =
+    {   0,
+0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0,     };
+
+static yyconst flex_int16_t yy_rule_linenum[17] =
+    {   0,
+       73,   74,   76,   78,   80,   81,   82,   86,   90,   91,
+       96,   97,   98,   99,  100,  103
+    } ;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+	#include "vcf-parse.h"
+	#include "vcf-grammar.h"    
+
+    #define YYSTYPE VCFToken
+
+    /* code to populate token with internal values */
+    #define YY_USER_ACTION              \
+        yylval -> tokenText     = yytext; \
+        yylval -> tokenStart    = yyextra->offset; \
+        yylval -> tokenLength	= yyleng;	\
+        yylval -> line_no		= yylineno;	\
+        yylval -> column_no		= yyextra -> column; \
+        yyextra -> lastToken = yylval; \
+        yyextra -> offset += yyleng; \
+        yyextra -> column += yyleng; 
+
+    #define ENDLINE \
+        yyextra -> column=1; \
+        return vcfENDLINE;
+
+    #define YY_INPUT(buf, result, max_size) \
+        result = (int) yyextra->input(yyextra, buf, max_size)
+
+    #define ECHO
+
+    #define YY_NO_INPUT
+#define YY_NO_UNISTD_H 1
+
+
+
+
+
+
+#define INITIAL 0
+#define HEADER 1
+#define DATA 2
+#define META 3
+#define META_SIMPLE 4
+#define META_COMPOSITE 5
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+/* %if-c-only */
+#include <unistd.h>
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+#endif
+
+#define YY_EXTRA_TYPE VCFParseBlock*
+
+/* %if-c-only Reentrant structure and macros (non-C++). */
+/* %if-reentrant */
+
+/* Holds the entire state of the reentrant scanner. */
+struct yyguts_t
+    {
+
+    /* User-defined. Not touched by flex. */
+    YY_EXTRA_TYPE yyextra_r;
+
+    /* The rest are the same as the globals declared in the non-reentrant scanner. */
+    FILE *yyin_r, *yyout_r;
+    size_t yy_buffer_stack_top; /**< index of top of stack. */
+    size_t yy_buffer_stack_max; /**< capacity of stack. */
+    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
+    char yy_hold_char;
+    int yy_n_chars;
+    int yyleng_r;
+    char *yy_c_buf_p;
+    int yy_init;
+    int yy_start;
+    int yy_did_buffer_switch_on_eof;
+    int yy_start_stack_ptr;
+    int yy_start_stack_depth;
+    int *yy_start_stack;
+    yy_state_type yy_last_accepting_state;
+    char* yy_last_accepting_cpos;
+
+    int yylineno_r;
+    int yy_flex_debug_r;
+
+    char *yytext_r;
+    int yy_more_flag;
+    int yy_more_len;
+
+    YYSTYPE * yylval_r;
+
+    }; /* end struct yyguts_t */
+
+/* %if-c-only */
+
+static int yy_init_globals (yyscan_t yyscanner );
+
+/* %endif */
+
+/* %if-reentrant */
+
+    /* This must go here because YYSTYPE and YYLTYPE are included
+     * from bison output in section 1.*/
+    #    define yylval yyg->yylval_r
+    
+int VCF_lex_init (yyscan_t* scanner);
+
+int VCF_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+
+/* %endif */
+
+/* %endif End reentrant structures and macros. */
+
+/* Accessor methods to globals.
+   These are made visible to non-reentrant scanners for convenience. */
+
+int VCF_lex_destroy (yyscan_t yyscanner );
+
+int VCF_get_debug (yyscan_t yyscanner );
+
+void VCF_set_debug (int debug_flag ,yyscan_t yyscanner );
+
+YY_EXTRA_TYPE VCF_get_extra (yyscan_t yyscanner );
+
+void VCF_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+
+FILE *VCF_get_in (yyscan_t yyscanner );
+
+void VCF_set_in  (FILE * in_str ,yyscan_t yyscanner );
+
+FILE *VCF_get_out (yyscan_t yyscanner );
+
+void VCF_set_out  (FILE * out_str ,yyscan_t yyscanner );
+
+int VCF_get_leng (yyscan_t yyscanner );
+
+char *VCF_get_text (yyscan_t yyscanner );
+
+int VCF_get_lineno (yyscan_t yyscanner );
+
+void VCF_set_lineno (int line_number ,yyscan_t yyscanner );
+
+/* %if-bison-bridge */
+
+YYSTYPE * VCF_get_lval (yyscan_t yyscanner );
+
+void VCF_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
+
+/* %endif */
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int VCF_wrap (yyscan_t yyscanner );
+#else
+extern int VCF_wrap (yyscan_t yyscanner );
+#endif
+#endif
+
+/* %not-for-header */
+
+    static void yyunput (int c,char *buf_ptr  ,yyscan_t yyscanner);
+    
+/* %ok-for-header */
+
+/* %endif */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
+#endif
+
+#ifndef YY_NO_INPUT
+/* %if-c-only Standard (non-C++) definition */
+/* %not-for-header */
+
+#ifdef __cplusplus
+static int yyinput (yyscan_t yyscanner );
+#else
+static int input (yyscan_t yyscanner );
+#endif
+/* %ok-for-header */
+
+/* %endif */
+#endif
+
+/* %if-c-only */
+
+/* %endif */
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* %if-c-only Standard (non-C++) definition */
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO fwrite( yytext, yyleng, 1, yyout )
+/* %endif */
+/* %if-c++-only C++ definition */
+/* %endif */
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+		{ \
+		int c = '*'; \
+		int n; \
+		for ( n = 0; n < max_size && \
+			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+			buf[n] = (char) c; \
+		if ( c == '\n' ) \
+			buf[n++] = (char) c; \
+		if ( c == EOF && ferror( yyin ) ) \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+		result = n; \
+		} \
+	else \
+		{ \
+		errno=0; \
+		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+			{ \
+			if( errno != EINTR) \
+				{ \
+				YY_FATAL_ERROR( "input in flex scanner failed" ); \
+				break; \
+				} \
+			errno=0; \
+			clearerr(yyin); \
+			} \
+		}\
+\
+/* %if-c++-only C++ definition \ */\
+/* %endif */
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+/* %if-c-only */
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+#endif
+
+/* %if-tables-serialization structures and prototypes */
+/* %not-for-header */
+
+/* %ok-for-header */
+
+/* %not-for-header */
+
+/* %tables-yydmap generated elements */
+/* %endif */
+/* end tables serialization structures and prototypes */
+
+/* %ok-for-header */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+/* %if-c-only Standard (non-C++) definition */
+
+extern int VCF_lex \
+               (YYSTYPE * yylval_param ,yyscan_t yyscanner);
+
+#define YY_DECL int VCF_lex \
+               (YYSTYPE * yylval_param , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only C++ definition */
+/* %endif */
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+/* %% [6.0] YY_RULE_SETUP definition goes here */
+#define YY_RULE_SETUP \
+	if ( yyleng > 0 ) \
+		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
+				(yytext[yyleng - 1] == '\n'); \
+	YY_USER_ACTION
+
+/* %not-for-header */
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+	register yy_state_type yy_current_state;
+	register char *yy_cp, *yy_bp;
+	register int yy_act;
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+/* %% [7.0] user's declarations go here */
+
+
+
+    yylval = yylval_param;
+
+	if ( !yyg->yy_init )
+		{
+		yyg->yy_init = 1;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+		if ( ! yyg->yy_start )
+			yyg->yy_start = 1;	/* first start state */
+
+		if ( ! yyin )
+/* %if-c-only */
+			yyin = stdin;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+		if ( ! yyout )
+/* %if-c-only */
+			yyout = stdout;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+		if ( ! YY_CURRENT_BUFFER ) {
+			VCF_ensure_buffer_stack (yyscanner);
+			YY_CURRENT_BUFFER_LVALUE =
+				VCF__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+		}
+
+		VCF__load_buffer_state(yyscanner );
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+/* %% [8.0] yymore()-related code goes here */
+		yy_cp = yyg->yy_c_buf_p;
+
+		/* Support of yytext. */
+		*yy_cp = yyg->yy_hold_char;
+
+		/* yy_bp points to the position in yy_ch_buf of the start of
+		 * the current run.
+		 */
+		yy_bp = yy_cp;
+
+/* %% [9.0] code to set up and find next match goes here */
+		yy_current_state = yyg->yy_start;
+		yy_current_state += YY_AT_BOL();
+yy_match:
+		do
+			{
+			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+			if ( yy_accept[yy_current_state] )
+				{
+				yyg->yy_last_accepting_state = yy_current_state;
+				yyg->yy_last_accepting_cpos = yy_cp;
+				}
+			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+				{
+				yy_current_state = (int) yy_def[yy_current_state];
+				if ( yy_current_state >= 57 )
+					yy_c = yy_meta[(unsigned int) yy_c];
+				}
+			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+			++yy_cp;
+			}
+		while ( yy_current_state != 56 );
+		yy_cp = yyg->yy_last_accepting_cpos;
+		yy_current_state = yyg->yy_last_accepting_state;
+
+yy_find_action:
+/* %% [10.0] code to find the action number goes here */
+		yy_act = yy_accept[yy_current_state];
+
+		YY_DO_BEFORE_ACTION;
+
+/* %% [11.0] code for yylineno update goes here */
+
+		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
+			{
+			int yyl;
+			for ( yyl = 0; yyl < yyleng; ++yyl )
+				if ( yytext[yyl] == '\n' )
+					   
+    do{ yylineno++;
+        yycolumn=0;
+    }while(0)
+;
+			}
+
+do_action:	/* This label is used only to access EOF actions. */
+
+/* %% [12.0] debug code goes here */
+		if ( yy_flex_debug )
+			{
+			if ( yy_act == 0 )
+				fprintf( stderr, "--scanner backing up\n" );
+			else if ( yy_act < 17 )
+				fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
+				         (long)yy_rule_linenum[yy_act], yytext );
+			else if ( yy_act == 17 )
+				fprintf( stderr, "--accepting default rule (\"%s\")\n",
+				         yytext );
+			else if ( yy_act == 18 )
+				fprintf( stderr, "--(end of buffer or a NUL)\n" );
+			else
+				fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
+			}
+
+		switch ( yy_act )
+	{ /* beginning of action switch */
+/* %% [13.0] actions go here */
+			case 0: /* must back up */
+			/* undo the effects of YY_DO_BEFORE_ACTION */
+			*yy_cp = yyg->yy_hold_char;
+			yy_cp = yyg->yy_last_accepting_cpos;
+			yy_current_state = yyg->yy_last_accepting_state;
+			goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+{ BEGIN META; }
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+{ BEGIN HEADER; }
+	YY_BREAK
+case 3:
+/* rule 3 can match eol */
+YY_RULE_SETUP
+{ BEGIN DATA; return vcfDATAITEM; }
+	YY_BREAK
+case 4:
+YY_RULE_SETUP
+{ return vcfDATAITEM; }
+	YY_BREAK
+case 5:
+*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
+yyg->yy_c_buf_p = yy_cp = yy_bp + 10;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+{ BEGIN META_SIMPLE; return vcfMETAKEY_FORMAT; }
+	YY_BREAK
+case 6:
+*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
+yyg->yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+{ BEGIN META_SIMPLE; return vcfMETAKEY; }
+	YY_BREAK
+case 7:
+*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
+yyg->yy_c_buf_p = yy_cp -= 2;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+{ BEGIN META_COMPOSITE; return vcfMETAKEY; }
+	YY_BREAK
+
+
+case 8:
+YY_RULE_SETUP
+{ return vcfMETAVALUE; }
+	YY_BREAK
+
+
+
+case 9:
+*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
+yyg->yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+{ return vcfMETAKEY; }
+	YY_BREAK
+case 10:
+YY_RULE_SETUP
+{ return vcfMETAVALUE; }
+	YY_BREAK
+
+
+
+case 11:
+YY_RULE_SETUP
+
+	YY_BREAK
+case 12:
+/* rule 12 can match eol */
+YY_RULE_SETUP
+{ BEGIN 0; ENDLINE; }
+	YY_BREAK
+case 13:
+/* rule 13 can match eol */
+YY_RULE_SETUP
+{ BEGIN 0; ENDLINE; }
+	YY_BREAK
+case 14:
+*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
+yyg->yy_c_buf_p = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+{ BEGIN 0; ENDLINE; }
+	YY_BREAK
+case 15:
+YY_RULE_SETUP
+{ return yytext[0]; }
+	YY_BREAK
+
+case 16:
+YY_RULE_SETUP
+{ return vcfHEADERITEM; }
+	YY_BREAK
+case 17:
+YY_RULE_SETUP
+ECHO;
+	YY_BREAK
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(HEADER):
+case YY_STATE_EOF(DATA):
+case YY_STATE_EOF(META):
+case YY_STATE_EOF(META_SIMPLE):
+case YY_STATE_EOF(META_COMPOSITE):
+	yyterminate();
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*yy_cp = yyg->yy_hold_char;
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed yyin at a new source and called
+			 * VCF_lex().  If so, then we have to assure
+			 * consistency between YY_CURRENT_BUFFER and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for yy_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since yy_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
+			{ /* This was really a NUL. */
+			yy_state_type yy_next_state;
+
+			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
+
+			yy_current_state = yy_get_previous_state( yyscanner );
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * yy_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
+
+			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
+
+			if ( yy_next_state )
+				{
+				/* Consume the NUL. */
+				yy_cp = ++yyg->yy_c_buf_p;
+				yy_current_state = yy_next_state;
+				goto yy_match;
+				}
+
+			else
+				{
+/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
+				yy_cp = yyg->yy_last_accepting_cpos;
+				yy_current_state = yyg->yy_last_accepting_state;
+				goto yy_find_action;
+				}
+			}
+
+		else switch ( yy_get_next_buffer( yyscanner ) )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				yyg->yy_did_buffer_switch_on_eof = 0;
+
+				if ( VCF_wrap(yyscanner ) )
+					{
+					/* Note: because we've taken care in
+					 * yy_get_next_buffer() to have set up
+					 * yytext, we can now set up
+					 * yy_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
+
+					yy_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! yyg->yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				yyg->yy_c_buf_p =
+					yyg->yytext_ptr + yy_amount_of_matched_text;
+
+				yy_current_state = yy_get_previous_state( yyscanner );
+
+				yy_cp = yyg->yy_c_buf_p;
+				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
+				goto yy_match;
+
+			case EOB_ACT_LAST_MATCH:
+				yyg->yy_c_buf_p =
+				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
+
+				yy_current_state = yy_get_previous_state( yyscanner );
+
+				yy_cp = yyg->yy_c_buf_p;
+				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
+				goto yy_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+} /* end of VCF_lex */
+/* %ok-for-header */
+
+/* %if-c++-only */
+/* %not-for-header */
+
+/* %ok-for-header */
+
+/* %endif */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+/* %if-c-only */
+static int yy_get_next_buffer (yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+	register char *source = yyg->yytext_ptr;
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
+
+	else
+		{
+			int num_to_read =
+			   (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+
+			/* just a shorter name for the current buffer */
+			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+
+			int yy_c_buf_p_offset =
+				(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
+
+			if ( b->yy_is_our_buffer )
+				{
+				int new_size = (int) b->yy_buf_size * 2;
+
+				if ( new_size <= 0 )
+					b->yy_buf_size += b->yy_buf_size / 8;
+				else
+					b->yy_buf_size *= 2;
+
+				b->yy_ch_buf = (char *)
+					/* Include room in for 2 EOB chars. */
+					VCF_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
+				}
+			else
+				/* Can't grow it, we don't own it. */
+				b->yy_ch_buf = 0;
+
+			if ( ! b->yy_ch_buf )
+				YY_FATAL_ERROR(
+				"fatal error - scanner input buffer overflow" );
+
+			yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+			num_to_read = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+						number_to_move - 1;
+
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+			yyg->yy_n_chars, (size_t) num_to_read );
+
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
+		}
+
+	if ( yyg->yy_n_chars == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			VCF_restart(yyin  ,yyscanner);
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+		/* Extend the array by 50%, plus the number we really need. */
+		yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
+		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) VCF_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
+		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+	}
+
+	yyg->yy_n_chars += number_to_move;
+	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+	return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+/* %if-c-only */
+/* %not-for-header */
+
+    static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+	register yy_state_type yy_current_state;
+	register char *yy_cp;
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+/* %% [15.0] code to get the start state into yy_current_state goes here */
+	yy_current_state = yyg->yy_start;
+	yy_current_state += YY_AT_BOL();
+
+	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
+		{
+/* %% [16.0] code to find the next state goes here */
+		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+		if ( yy_accept[yy_current_state] )
+			{
+			yyg->yy_last_accepting_state = yy_current_state;
+			yyg->yy_last_accepting_cpos = yy_cp;
+			}
+		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+			{
+			yy_current_state = (int) yy_def[yy_current_state];
+			if ( yy_current_state >= 57 )
+				yy_c = yy_meta[(unsigned int) yy_c];
+			}
+		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+		}
+
+	return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = yy_try_NUL_trans( current_state );
+ */
+/* %if-c-only */
+    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+	register int yy_is_jam;
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
+/* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
+	register char *yy_cp = yyg->yy_c_buf_p;
+
+	register YY_CHAR yy_c = 1;
+	if ( yy_accept[yy_current_state] )
+		{
+		yyg->yy_last_accepting_state = yy_current_state;
+		yyg->yy_last_accepting_cpos = yy_cp;
+		}
+	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+		{
+		yy_current_state = (int) yy_def[yy_current_state];
+		if ( yy_current_state >= 57 )
+			yy_c = yy_meta[(unsigned int) yy_c];
+		}
+	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+	yy_is_jam = (yy_current_state == 56);
+
+	return yy_is_jam ? 0 : yy_current_state;
+}
+
+/* %if-c-only */
+
+    static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+	register char *yy_cp;
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+    yy_cp = yyg->yy_c_buf_p;
+
+	/* undo effects of setting up yytext */
+	*yy_cp = yyg->yy_hold_char;
+
+	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register int number_to_move = yyg->yy_n_chars + 2;
+		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+		register char *source =
+				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+
+		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+			*--dest = *--source;
+
+		yy_cp += (int) (dest - source);
+		yy_bp += (int) (dest - source);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+			yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+
+		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--yy_cp = (char) c;
+
+/* %% [18.0] update yylineno here */
+
+    if ( c == '\n' ){
+        --yylineno;
+    }
+
+	yyg->yytext_ptr = yy_bp;
+	yyg->yy_hold_char = *yy_cp;
+	yyg->yy_c_buf_p = yy_cp;
+}
+/* %if-c-only */
+
+/* %endif */
+
+/* %if-c-only */
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+    static int yyinput (yyscan_t yyscanner)
+#else
+    static int input  (yyscan_t yyscanner)
+#endif
+
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+	int c;
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+	*yyg->yy_c_buf_p = yyg->yy_hold_char;
+
+	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+		{
+		/* yy_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
+			/* This was really a NUL. */
+			*yyg->yy_c_buf_p = '\0';
+
+		else
+			{ /* need more input */
+			int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+			++yyg->yy_c_buf_p;
+
+			switch ( yy_get_next_buffer( yyscanner ) )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because yy_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					VCF_restart(yyin ,yyscanner);
+
+					/*FALLTHROUGH*/
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( VCF_wrap(yyscanner ) )
+						return EOF;
+
+					if ( ! yyg->yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return yyinput(yyscanner);
+#else
+					return input(yyscanner);
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
+	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
+	yyg->yy_hold_char = *++yyg->yy_c_buf_p;
+
+/* %% [19.0] update BOL and yylineno */
+	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
+		   
+    do{ yylineno++;
+        yycolumn=0;
+    }while(0)
+;
+
+	return c;
+}
+/* %if-c-only */
+#endif	/* ifndef YY_NO_INPUT */
+/* %endif */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ * @param yyscanner The scanner object.
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+/* %if-c-only */
+    void VCF_restart  (FILE * input_file , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+	if ( ! YY_CURRENT_BUFFER ){
+        VCF_ensure_buffer_stack (yyscanner);
+		YY_CURRENT_BUFFER_LVALUE =
+            VCF__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+	}
+
+	VCF__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
+	VCF__load_buffer_state(yyscanner );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ * @param yyscanner The scanner object.
+ */
+/* %if-c-only */
+    void VCF__switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+	/* TODO. We should be able to replace this entire function body
+	 * with
+	 *		VCF_pop_buffer_state();
+	 *		VCF_push_buffer_state(new_buffer);
+     */
+	VCF_ensure_buffer_stack (yyscanner);
+	if ( YY_CURRENT_BUFFER == new_buffer )
+		return;
+
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*yyg->yy_c_buf_p = yyg->yy_hold_char;
+		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
+		}
+
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+	VCF__load_buffer_state(yyscanner );
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (VCF_wrap()) processing, but the only time this flag
+	 * is looked at is after VCF_wrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	yyg->yy_did_buffer_switch_on_eof = 1;
+}
+
+/* %if-c-only */
+static void VCF__load_buffer_state  (yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+	yyg->yy_hold_char = *yyg->yy_c_buf_p;
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ * @param yyscanner The scanner object.
+ * @return the allocated buffer state.
+ */
+/* %if-c-only */
+    YY_BUFFER_STATE VCF__create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+	YY_BUFFER_STATE b;
+    
+	b = (YY_BUFFER_STATE) VCF_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in VCF__create_buffer()" );
+
+	b->yy_buf_size = size;
+
+	/* yy_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->yy_ch_buf = (char *) VCF_alloc(b->yy_buf_size + 2 ,yyscanner );
+	if ( ! b->yy_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in VCF__create_buffer()" );
+
+	b->yy_is_our_buffer = 1;
+
+	VCF__init_buffer(b,file ,yyscanner);
+
+	return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with VCF__create_buffer()
+ * @param yyscanner The scanner object.
+ */
+/* %if-c-only */
+    void VCF__delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+	if ( ! b )
+		return;
+
+	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+	if ( b->yy_is_our_buffer )
+		VCF_free((void *) b->yy_ch_buf ,yyscanner );
+
+	VCF_free((void *) b ,yyscanner );
+}
+
+/* %if-c-only */
+
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a VCF_restart() or at EOF.
+ */
+/* %if-c-only */
+    static void VCF__init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+{
+	int oerrno = errno;
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+	VCF__flush_buffer(b ,yyscanner);
+
+	b->yy_input_file = file;
+	b->yy_fill_buffer = 1;
+
+    /* If b is the current buffer, then VCF__init_buffer was _probably_
+     * called from VCF_restart() or through yy_get_next_buffer.
+     * In that case, we don't want to reset the lineno or column.
+     */
+    if (b != YY_CURRENT_BUFFER){
+        b->yy_bs_lineno = 1;
+        b->yy_bs_column = 0;
+    }
+
+/* %if-c-only */
+
+        b->yy_is_interactive = 0;
+    
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+	errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * @param yyscanner The scanner object.
+ */
+/* %if-c-only */
+    void VCF__flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+	if ( ! b )
+		return;
+
+	b->yy_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->yy_buf_pos = &b->yy_ch_buf[0];
+
+	b->yy_at_bol = 1;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == YY_CURRENT_BUFFER )
+		VCF__load_buffer_state(yyscanner );
+}
+
+/* %if-c-or-c++ */
+/** Pushes the new state onto the stack. The new state becomes
+ *  the current state. This function will allocate the stack
+ *  if necessary.
+ *  @param new_buffer The new state.
+ *  @param yyscanner The scanner object.
+ */
+/* %if-c-only */
+void VCF_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+	if (new_buffer == NULL)
+		return;
+
+	VCF_ensure_buffer_stack(yyscanner);
+
+	/* This block is copied from VCF__switch_to_buffer. */
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*yyg->yy_c_buf_p = yyg->yy_hold_char;
+		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
+		}
+
+	/* Only push if top exists. Otherwise, replace top. */
+	if (YY_CURRENT_BUFFER)
+		yyg->yy_buffer_stack_top++;
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+	/* copied from VCF__switch_to_buffer. */
+	VCF__load_buffer_state(yyscanner );
+	yyg->yy_did_buffer_switch_on_eof = 1;
+}
+/* %endif */
+
+/* %if-c-or-c++ */
+/** Removes and deletes the top of the stack, if present.
+ *  The next element becomes the new top.
+ *  @param yyscanner The scanner object.
+ */
+/* %if-c-only */
+void VCF_pop_buffer_state (yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+	if (!YY_CURRENT_BUFFER)
+		return;
+
+	VCF__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
+	YY_CURRENT_BUFFER_LVALUE = NULL;
+	if (yyg->yy_buffer_stack_top > 0)
+		--yyg->yy_buffer_stack_top;
+
+	if (YY_CURRENT_BUFFER) {
+		VCF__load_buffer_state(yyscanner );
+		yyg->yy_did_buffer_switch_on_eof = 1;
+	}
+}
+/* %endif */
+
+/* %if-c-or-c++ */
+/* Allocates the stack if it does not exist.
+ *  Guarantees space for at least one push.
+ */
+/* %if-c-only */
+static void VCF_ensure_buffer_stack (yyscan_t yyscanner)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+	size_t num_to_alloc;
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+	if (!yyg->yy_buffer_stack) {
+
+		/* First allocation is just for 2 elements, since we don't know if this
+		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
+		 * immediate realloc on the next call.
+         */
+		num_to_alloc = 1;
+		yyg->yy_buffer_stack = (struct yy_buffer_state**)VCF_alloc
+								(num_to_alloc * sizeof(struct yy_buffer_state*)
+								, yyscanner);
+		if ( ! yyg->yy_buffer_stack )
+			YY_FATAL_ERROR( "out of dynamic memory in VCF_ensure_buffer_stack()" );
+								  
+		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+				
+		yyg->yy_buffer_stack_max = num_to_alloc;
+		yyg->yy_buffer_stack_top = 0;
+		return;
+	}
+
+	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
+
+		/* Increase the buffer to prepare for a possible push. */
+		int grow_size = 8 /* arbitrary grow size */;
+
+		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
+		yyg->yy_buffer_stack = (struct yy_buffer_state**)VCF_realloc
+								(yyg->yy_buffer_stack,
+								num_to_alloc * sizeof(struct yy_buffer_state*)
+								, yyscanner);
+		if ( ! yyg->yy_buffer_stack )
+			YY_FATAL_ERROR( "out of dynamic memory in VCF_ensure_buffer_stack()" );
+
+		/* zero only the new slots.*/
+		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
+		yyg->yy_buffer_stack_max = num_to_alloc;
+	}
+}
+/* %endif */
+
+/* %if-c-only */
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ * @param yyscanner The scanner object.
+ * @return the newly allocated buffer state object. 
+ */
+YY_BUFFER_STATE VCF__scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
+{
+	YY_BUFFER_STATE b;
+    
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) VCF_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in VCF__scan_buffer()" );
+
+	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->yy_buf_pos = b->yy_ch_buf = base;
+	b->yy_is_our_buffer = 0;
+	b->yy_input_file = 0;
+	b->yy_n_chars = (int) b->yy_buf_size;
+	b->yy_is_interactive = 0;
+	b->yy_at_bol = 1;
+	b->yy_fill_buffer = 0;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	VCF__switch_to_buffer(b ,yyscanner );
+
+	return b;
+}
+/* %endif */
+
+/* %if-c-only */
+/** Setup the input buffer state to scan a string. The next call to VCF_lex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ * @param yyscanner The scanner object.
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ *       VCF__scan_bytes() instead.
+ */
+YY_BUFFER_STATE VCF__scan_string (yyconst char * yystr , yyscan_t yyscanner)
+{
+    
+	return VCF__scan_bytes(yystr, (int)strlen(yystr), yyscanner);
+}
+/* %endif */
+
+/* %if-c-only */
+/** Setup the input buffer state to scan the given bytes. The next call to VCF_lex() will
+ * scan from a @e copy of @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yyscanner The scanner object.
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE VCF__scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
+{
+	YY_BUFFER_STATE b;
+	char *buf;
+	yy_size_t n;
+	int i;
+    
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = _yybytes_len + 2;
+	buf = (char *) VCF_alloc(n ,yyscanner );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in VCF__scan_bytes()" );
+
+	for ( i = 0; i < _yybytes_len; ++i )
+		buf[i] = yybytes[i];
+
+	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = VCF__scan_buffer(buf,n ,yyscanner);
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in VCF__scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->yy_is_our_buffer = 1;
+
+	return b;
+}
+/* %endif */
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+/* %if-c-only */
+static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
+{
+    	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+}
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+		yytext[yyleng] = yyg->yy_hold_char; \
+		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
+		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
+		*yyg->yy_c_buf_p = '\0'; \
+		yyleng = yyless_macro_arg; \
+		} \
+	while ( 0 )
+
+/* Accessor  methods (get/set functions) to struct members. */
+
+/* %if-c-only */
+/* %if-reentrant */
+
+/** Get the user-defined data for this scanner.
+ * @param yyscanner The scanner object.
+ */
+YY_EXTRA_TYPE VCF_get_extra  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    return yyextra;
+}
+
+/* %endif */
+
+/** Get the current line number.
+ * @param yyscanner The scanner object.
+ */
+int VCF_get_lineno  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    
+        if (! YY_CURRENT_BUFFER)
+            return 0;
+    
+    return yylineno;
+}
+
+/** Get the current column number.
+ * @param yyscanner The scanner object.
+ */
+int VCF_get_column  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    
+        if (! YY_CURRENT_BUFFER)
+            return 0;
+    
+    return yycolumn;
+}
+
+/** Get the input stream.
+ * @param yyscanner The scanner object.
+ */
+FILE *VCF_get_in  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    return yyin;
+}
+
+/** Get the output stream.
+ * @param yyscanner The scanner object.
+ */
+FILE *VCF_get_out  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    return yyout;
+}
+
+/** Get the length of the current token.
+ * @param yyscanner The scanner object.
+ */
+int VCF_get_leng  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    return yyleng;
+}
+
+/** Get the current token.
+ * @param yyscanner The scanner object.
+ */
+
+char *VCF_get_text  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    return yytext;
+}
+
+/* %if-reentrant */
+
+/** Set the user-defined data. This data is never touched by the scanner.
+ * @param user_defined The data to be associated with this scanner.
+ * @param yyscanner The scanner object.
+ */
+void VCF_set_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    yyextra = user_defined ;
+}
+
+/* %endif */
+
+/** Set the current line number.
+ * @param line_number
+ * @param yyscanner The scanner object.
+ */
+void VCF_set_lineno (int  line_number , yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+        /* lineno is only valid if an input buffer exists. */
+        if (! YY_CURRENT_BUFFER )
+           yy_fatal_error( "VCF_set_lineno called with no buffer" , yyscanner); 
+    
+    yylineno = line_number;
+}
+
+/** Set the current column.
+ * @param line_number
+ * @param yyscanner The scanner object.
+ */
+void VCF_set_column (int  column_no , yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+        /* column is only valid if an input buffer exists. */
+        if (! YY_CURRENT_BUFFER )
+           yy_fatal_error( "VCF_set_column called with no buffer" , yyscanner); 
+    
+    yycolumn = column_no;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ * @param yyscanner The scanner object.
+ * @see VCF__switch_to_buffer
+ */
+void VCF_set_in (FILE *  in_str , yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    yyin = in_str ;
+}
+
+void VCF_set_out (FILE *  out_str , yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    yyout = out_str ;
+}
+
+int VCF_get_debug  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    return yy_flex_debug;
+}
+
+void VCF_set_debug (int  bdebug , yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    yy_flex_debug = bdebug ;
+}
+
+/* %endif */
+
+/* %if-reentrant */
+/* Accessor methods for yylval and yylloc */
+
+/* %if-bison-bridge */
+
+YYSTYPE * VCF_get_lval  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    return yylval;
+}
+
+void VCF_set_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    yylval = yylval_param;
+}
+
+/* %endif */
+
+/* User-visible API */
+
+/* VCF_lex_init is special because it creates the scanner itself, so it is
+ * the ONLY reentrant function that doesn't take the scanner as the last argument.
+ * That's why we explicitly handle the declaration, instead of using our macros.
+ */
+
+int VCF_lex_init(yyscan_t* ptr_yy_globals)
+
+{
+    if (ptr_yy_globals == NULL){
+        errno = EINVAL;
+        return 1;
+    }
+
+    *ptr_yy_globals = (yyscan_t) VCF_alloc ( sizeof( struct yyguts_t ), NULL );
+
+    if (*ptr_yy_globals == NULL){
+        errno = ENOMEM;
+        return 1;
+    }
+
+    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
+    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+
+    return yy_init_globals ( *ptr_yy_globals );
+}
+
+/* VCF_lex_init_extra has the same functionality as VCF_lex_init, but follows the
+ * convention of taking the scanner as the last argument. Note however, that
+ * this is a *pointer* to a scanner, as it will be allocated by this call (and
+ * is the reason, too, why this function also must handle its own declaration).
+ * The user defined value in the first argument will be available to VCF_alloc in
+ * the yyextra field.
+ */
+
+int VCF_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
+
+{
+    struct yyguts_t dummy_yyguts;
+
+    VCF_set_extra (yy_user_defined, &dummy_yyguts);
+
+    if (ptr_yy_globals == NULL){
+        errno = EINVAL;
+        return 1;
+    }
+	
+    *ptr_yy_globals = (yyscan_t) VCF_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
+	
+    if (*ptr_yy_globals == NULL){
+        errno = ENOMEM;
+        return 1;
+    }
+    
+    /* By setting to 0xAA, we expose bugs in
+    yy_init_globals. Leave at 0x00 for releases. */
+    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+    
+    VCF_set_extra (yy_user_defined, *ptr_yy_globals);
+    
+    return yy_init_globals ( *ptr_yy_globals );
+}
+
+/* %endif if-c-only */
+
+/* %if-c-only */
+static int yy_init_globals (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+    /* Initialization is the same as for the non-reentrant scanner.
+     * This function is called from VCF_lex_destroy(), so don't allocate here.
+     */
+
+    yyg->yy_buffer_stack = 0;
+    yyg->yy_buffer_stack_top = 0;
+    yyg->yy_buffer_stack_max = 0;
+    yyg->yy_c_buf_p = (char *) 0;
+    yyg->yy_init = 0;
+    yyg->yy_start = 0;
+
+    yyg->yy_start_stack_ptr = 0;
+    yyg->yy_start_stack_depth = 0;
+    yyg->yy_start_stack =  NULL;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+    yyin = stdin;
+    yyout = stdout;
+#else
+    yyin = (FILE *) 0;
+    yyout = (FILE *) 0;
+#endif
+
+    /* For future reference: Set errno on error, since we are called by
+     * VCF_lex_init()
+     */
+    return 0;
+}
+/* %endif */
+
+/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
+/* VCF_lex_destroy is for both reentrant and non-reentrant scanners. */
+int VCF_lex_destroy  (yyscan_t yyscanner)
+{
+    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+
+    /* Pop the buffer stack, destroying each element. */
+	while(YY_CURRENT_BUFFER){
+		VCF__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
+		YY_CURRENT_BUFFER_LVALUE = NULL;
+		VCF_pop_buffer_state(yyscanner);
+	}
+
+	/* Destroy the stack itself. */
+	VCF_free(yyg->yy_buffer_stack ,yyscanner);
+	yyg->yy_buffer_stack = NULL;
+
+    /* Destroy the start condition stack. */
+        VCF_free(yyg->yy_start_stack ,yyscanner );
+        yyg->yy_start_stack = NULL;
+
+    /* Reset the globals. This is important in a non-reentrant scanner so the next time
+     * VCF_lex() is called, initialization will occur. */
+    yy_init_globals( yyscanner);
+
+/* %if-reentrant */
+    /* Destroy the main struct (reentrant only). */
+    VCF_free ( yyscanner , yyscanner );
+    yyscanner = NULL;
+/* %endif */
+    return 0;
+}
+/* %endif */
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
+{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
+{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+}
+#endif
+
+void *VCF_alloc (yy_size_t  size , yyscan_t yyscanner)
+{
+	return (void *) malloc( size );
+}
+
+void *VCF_realloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
+{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+}
+
+void VCF_free (void * ptr , yyscan_t yyscanner)
+{
+	free( (char *) ptr );	/* see VCF_realloc() for (char *) cast */
+}
+
+/* %if-tables-serialization definitions */
+/* %define-yytables   The name for this specific scanner's tables. */
+#define YYTABLES_NAME "yytables"
+/* %endif */
+
+/* %ok-for-header */
+
+
+
+
+bool VCFScan_yylex_init(VCFParseBlock* sb, bool debug)
+{
+	if (VCF_lex_init_extra(sb,&sb->scanner) != 0)
+	{
+        return false;
+		/*return RC ( rcKFG, rcMgr, rcParsing, rcMemory, rcExhausted );*/
+	}		
+
+    sb->offset = 0;
+    
+    sb->lastToken = NULL;
+    sb->column = 1;
+    
+	VCF_set_debug(debug ? 1 : 0,sb->scanner);
+
+	return true;
+}
+
+void VCFScan_yylex_destroy(VCFParseBlock* sb)
+{
+	if (sb->scanner)
+	{
+		VCF_lex_destroy(sb->scanner);
+	}		
+	sb->scanner=0;
+}
+
diff --git a/tools/vcf-loader/vcf-lex.l b/tools/vcf-loader/vcf-lex.l
new file mode 100644
index 0000000..721fbc6
--- /dev/null
+++ b/tools/vcf-loader/vcf-lex.l
@@ -0,0 +1,132 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+ 
+%{ 
+	#include "vcf-parse.h"
+	#include "vcf-grammar.h"    
+
+    #define YYSTYPE VCFToken
+
+    /* code to populate token with internal values */
+    #define YY_USER_ACTION              \
+        yylval -> tokenText     = yytext; \
+        yylval -> tokenStart    = yyextra->offset; \
+        yylval -> tokenLength	= yyleng;	\
+        yylval -> line_no		= yylineno;	\
+        yylval -> column_no		= yyextra -> column; \
+        yyextra -> lastToken = yylval; \
+        yyextra -> offset += yyleng; \
+        yyextra -> column += yyleng; 
+
+    #define ENDLINE \
+        yyextra -> column=1; \
+        return vcfENDLINE;
+
+    #define YY_INPUT(buf, result, max_size) \
+        result = yyextra->input(yyextra, buf, max_size)
+
+    #define ECHO
+
+    #define YY_NO_INPUT
+%}
+
+%option never-interactive nounistd yylineno reentrant bison-bridge noyywrap
+
+%option prefix="VCF_"
+%option extra-type="VCFParseBlock*"
+
+%option debug
+
+alphanum    [A-Za-z0-9\-_]+
+
+%x HEADER
+%x DATA
+%x META
+%x META_SIMPLE
+%x META_COMPOSITE
+
+%%
+
+^##                     { BEGIN META; }
+^#                      { BEGIN HEADER; }
+
+^[^#][^\t\r\n]*         { BEGIN DATA; return vcfDATAITEM; }
+
+<DATA>[^\t\r\n]+        { return vcfDATAITEM; }
+
+<META>fileformat/=      { BEGIN META_SIMPLE; return vcfMETAKEY_FORMAT; }
+<META>{alphanum}/=      { BEGIN META_SIMPLE; return vcfMETAKEY; }
+<META>{alphanum}/=<     { BEGIN META_COMPOSITE; return vcfMETAKEY; }
+
+<META_SIMPLE>
+{
+    [^=\r\n]+       { return vcfMETAVALUE; }
+}
+<META_COMPOSITE>
+{
+    {alphanum}/=      { return vcfMETAKEY; }
+    [^=<,>\r\n]+      { return vcfMETAVALUE; }
+}
+
+<*>
+{
+    \t                          
+    \n          { BEGIN 0; ENDLINE; }
+    \r\n        { BEGIN 0; ENDLINE; }
+    \r/[^\n]    { BEGIN 0; ENDLINE; }
+    .           { return yytext[0]; }
+}
+
+<HEADER>[^\t\r\n]+      { return vcfHEADERITEM; }
+
+%%    
+
+bool VCFScan_yylex_init(VCFParseBlock* sb, bool debug)
+{
+	if (yylex_init_extra(sb, &sb->scanner) != 0)
+	{
+        return false;
+		/*return RC ( rcKFG, rcMgr, rcParsing, rcMemory, rcExhausted );*/
+	}		
+
+    sb->offset = 0;
+    
+    sb->lastToken = NULL;
+    sb->column = 1;
+    
+	yyset_debug(debug ? 1 : 0, sb->scanner);
+
+	return true;
+}
+
+void VCFScan_yylex_destroy(VCFParseBlock* sb)
+{
+	if (sb->scanner)
+	{
+		yylex_destroy(sb->scanner);
+	}		
+	sb->scanner=0;
+}
diff --git a/tools/vcf-loader/vcf-loader.c b/tools/vcf-loader/vcf-loader.c
new file mode 100644
index 0000000..03c20d8
--- /dev/null
+++ b/tools/vcf-loader/vcf-loader.c
@@ -0,0 +1,124 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ * 
+ */
+
+#include <string.h>
+#include <stdlib.h>
+#include <limits.h>
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <loader/common-writer.h>
+#include <klib/rc.h>
+#include <klib/out.h>
+#include <klib/log.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <kapp/log-xml.h>
+#include <align/writer-refseq.h>
+
+static char const option_input[] = "input";
+static char const option_output[] = "output";
+
+#define OPTION_INPUT option_input
+#define OPTION_OUTPUT option_output
+
+#define ALIAS_INPUT  "i"
+#define ALIAS_OUTPUT "o"
+
+static
+char const * output_usage[] = 
+{
+    "Path and Name of the output database.",
+    NULL
+};
+
+OptDef Options[] = 
+{
+    /* order here is same as in param array below!!! */               /* max#,  needs param, required */
+    { OPTION_OUTPUT,        ALIAS_OUTPUT,           NULL, output_usage,     1,  true,        true },
+};
+
+const char* OptHelpParam[] =
+{
+    /* order here is same as in OptDef array above!!! */
+    "path",
+};
+
+rc_t UsageSummary (char const * progname)
+{
+    return KOutMsg (
+        "Usage:\n"
+        "\t%s [options] <fastq-file> ...\n"
+        "\n"
+        "Summary:\n"
+        "\tLoad VCF formatted data files\n"
+        "\n"
+        "Example:\n"
+        "\t%s -o /tmp/SRZ123456 123456-1.vcf 123456-2.vcf\n"
+        "\n"
+        ,progname, progname);
+}
+
+char const UsageDefaultName[] = "vcf-load";
+
+rc_t CC Usage (const Args * args)
+{
+    rc_t rc;
+    int i;
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    const size_t argsQty = sizeof(Options) / sizeof(Options[0]);
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary (progname);
+
+    for(i = 0; i < argsQty; i++ ) {
+        if( Options[i].required && Options[i].help[0] != NULL ) {
+            HelpOptionLine(Options[i].aliases, Options[i].name, OptHelpParam[i], Options[i].help);
+        }
+    }
+    OUTMSG(("\nOptions:\n"));
+    for(i = 0; i < argsQty; i++ ) {
+        if( !Options[i].required && Options[i].help[0] != NULL ) {
+            HelpOptionLine(Options[i].aliases, Options[i].name, OptHelpParam[i], Options[i].help);
+        }
+    }
+    OUTMSG(("\n"));
+    HelpOptionsStandard ();
+    HelpVersion (fullpath, KAppVersion());
+    return rc;
+}
+
+rc_t CC KMain (int argc, char * argv[])
+{
+    return 0;
+}
diff --git a/tools/vcf-loader/vcf-parse.h b/tools/vcf-loader/vcf-parse.h
new file mode 100644
index 0000000..3798737
--- /dev/null
+++ b/tools/vcf-loader/vcf-parse.h
@@ -0,0 +1,89 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_vcf_parse_
+#define _h_vcf_parse_
+
+#include <stdbool.h>
+#include <stdlib.h>
+
+typedef struct VCFToken
+{ 
+    const char* tokenText; /* 0-terminated, short-lived */
+    size_t tokenStart;  /* 0-based offset from the start of input */
+    size_t tokenLength;
+    size_t line_no;
+    size_t column_no;
+} VCFToken;
+
+struct VcfRecord;
+struct VcfReader;
+
+typedef struct VCFParseBlock
+{
+    void* self; /* VcfReader object or a test double */
+    void* scanner; /* flex control block */
+    
+    size_t (*input)(struct VCFParseBlock* pb, char* buf, size_t max_size); /* read the next part of the input */
+    void (*error)(struct VCFParseBlock* pb, const char* message);
+    
+    void (*metaLine)(struct VCFParseBlock* pb, VCFToken* key, VCFToken* value); /* simple meta line: ##key=value */
+    
+    /* two-level meta line: ##key=<key=value,...> */
+    void (*openMetaLine)(struct VCFParseBlock* pb, VCFToken* key);              
+    void (*keyValue)(struct VCFParseBlock* pb, VCFToken* key, VCFToken* value);
+    void (*headerItem)(struct VCFParseBlock* pb, VCFToken* value);
+    void (*closeMetaLine)(struct VCFParseBlock* pb);
+    
+    /* data line */
+    void (*openDataLine)(struct VCFParseBlock* pb);
+    void (*dataItem)(struct VCFParseBlock* pb, VCFToken* value);
+    void (*closeDataLine)(struct VCFParseBlock* pb);
+
+    size_t offset;  /* 0-based offset from the start of input */
+    size_t column;  /* 1-based column, for error reporting */
+    
+   /* for error reporting, valid inside error() only: */
+    VCFToken* lastToken;
+  
+} VCFParseBlock;
+
+extern bool VCFScan_yylex_init(VCFParseBlock* context, bool debug); /* false - out of memory */
+extern void VCFScan_yylex_destroy(VCFParseBlock* context);
+
+extern void VCF_set_lineno (int line_number, void* scanner);
+
+extern int VCF_lex(VCFToken* pb, void * scanner);
+extern void VCF_unlex(VCFParseBlock* pb, VCFToken* token);
+
+extern int VCF_debug; /* set to 1 to print Bison trace */ 
+
+/* read 1 data line (possibly preceded by any number of meta/header lines) */
+extern int VCF_parse(VCFParseBlock* pb); /* 0 = end of input, 1 = success, a new record is in context->record, 2 - syntax error */
+
+extern void VCF_error(VCFParseBlock* pb, const char* msg);
+
+#endif /* _h_vcf_parse_ */
diff --git a/tools/vcf-loader/vcf-reader.c b/tools/vcf-loader/vcf-reader.c
new file mode 100644
index 0000000..d39df66
--- /dev/null
+++ b/tools/vcf-loader/vcf-reader.c
@@ -0,0 +1,438 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "vcf-reader.h"
+#include "vcf-parse.h"
+
+#include <klib/rc.h>
+
+#include <klib/text.h>
+#include <klib/namelist.h>
+#include <klib/vector.h>
+#include <klib/printf.h>
+
+#include <kfs/mmap.h>
+
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#define LINE_VECTOR_BLOCK_SIZE 1024
+#define GENOTYPE_LIST_BLOCK_SIZE 64
+#define MESSAGE_LIST_BLOCK_SIZE 64
+#define PARSE_ERROR RC ( rcAlign, rcFile, rcParsing, rcFormat, rcIncorrect )
+#define MANDATORY_DATA_FIELDS_NUMBER 8
+
+/*=============== VcfDataLine ================*/
+static
+rc_t VcfDataLineMake(VcfDataLine** pself)
+{
+    if ( pself == NULL )
+        return RC ( rcAlign, rcFile, rcReading, rcSelf, rcNull );
+    else
+    {
+        VcfDataLine* self;
+        rc_t rc = 0;
+        
+        *pself = NULL;
+        
+        self = malloc(sizeof(VcfDataLine));
+        if (self == NULL)
+            return RC ( rcAlign, rcFile, rcReading, rcMemory, rcExhausted );
+        
+        memset(self, 0, sizeof(VcfDataLine));
+        
+        rc = VNamelistMake( &self->genotypeFields, GENOTYPE_LIST_BLOCK_SIZE);
+        if (rc == 0)
+            *pself = self;
+        else
+            free(self);
+        return rc;
+    }
+}
+
+static
+rc_t VcfDataLineWhack(VcfDataLine* self)
+{
+    rc_t rc = 0;
+    
+    if (self != NULL)
+        rc = VNamelistRelease(self->genotypeFields);
+        
+    free(self);
+    
+    return rc;
+}
+
+/*=============== VcfReader ================*/
+
+struct VcfReader
+{
+    char* input;
+    size_t inputSize;
+    size_t curPos;
+    VCFParseBlock pb;
+    
+    Vector lines;  /* the element type is VcfDataLine* */
+    
+    VNamelist* messages;
+};
+
+/* bison helpers */
+static size_t Input(VCFParseBlock* pb, char* buf, size_t maxSize);
+static void Error(VCFParseBlock* pb, const char* message);
+static void AddMetaLine(VCFParseBlock* pb, VCFToken* key, VCFToken* value);
+static void OpenMetaLine(VCFParseBlock* pb, VCFToken* key);
+static void KeyValue(VCFParseBlock* pb, VCFToken* key, VCFToken* value);
+static void HeaderItem(VCFParseBlock* pb, VCFToken* value);
+static void CloseMetaLine(VCFParseBlock* pb);
+static void OpenDataLine(VCFParseBlock* pb);
+static void DataItem(VCFParseBlock* pb, VCFToken* value);
+static void CloseDataLine(VCFParseBlock* pb);
+
+static 
+rc_t VcfReaderInit(VcfReader* self)
+{
+    self->input = NULL;
+    
+    self->pb.self           = self;
+    self->pb.input          = Input;
+    self->pb.error          = Error;
+    
+    self->pb.metaLine       = AddMetaLine;
+    
+    self->pb.openMetaLine   = OpenMetaLine;
+    self->pb.keyValue       = KeyValue;
+    self->pb.headerItem     = HeaderItem;
+    self->pb.closeMetaLine  = CloseMetaLine;
+    
+    self->pb.openDataLine   = OpenDataLine;
+    self->pb.dataItem       = DataItem;
+    self->pb.closeDataLine  = CloseDataLine;
+    
+    VectorInit( &self->lines, 0, LINE_VECTOR_BLOCK_SIZE );
+    
+    return VNamelistMake( &self->messages, MESSAGE_LIST_BLOCK_SIZE);
+}
+
+static void CC WhackLineVectorElement( void *item, void *data )
+{
+    VcfDataLine* elem = (VcfDataLine*)item;
+    VcfDataLineWhack(elem);
+}
+
+rc_t VcfReaderWhack( struct VcfReader* self)
+{
+    rc_t rc = 0;
+
+    if ( self == NULL )
+        return RC ( rcAlign, rcFile, rcDestroying, rcSelf, rcNull );
+
+    VectorWhack( &self->lines, WhackLineVectorElement, NULL );
+
+    rc = VNamelistRelease( self->messages );
+    
+    free(self->input);
+    free(self);
+
+    return rc;
+}
+
+rc_t VcfReaderMake( const struct VcfReader **pself)
+{
+    if ( pself == NULL )
+        return RC ( rcAlign, rcFile, rcConstructing, rcSelf, rcNull );
+        
+    *pself = malloc(sizeof(VcfReader));
+    if ( *pself == NULL )
+        return RC ( rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted );
+
+    return VcfReaderInit((VcfReader*)*pself);
+}
+
+/*=============== callbacks for the bison parser ================*/
+static size_t Input(VCFParseBlock* pb, char* buf, size_t maxSize)
+{
+    VcfReader* self = (VcfReader*)(pb->self);
+    size_t ret = string_copy(buf, maxSize, self->input + self->curPos, self->inputSize - self->curPos);
+    
+    self->curPos += ret;
+    
+    return ret;
+}
+static void Error(VCFParseBlock* pb, const char* message)
+{
+    char buf[1024];
+    VcfReader* self = (VcfReader*)(pb->self);
+    string_printf(buf, sizeof(buf), NULL, 
+                  "line %d column %d: %s", 
+                  pb->lastToken->line_no, pb->lastToken->column_no, message);
+    VNamelistAppend(self->messages, buf);
+}
+
+static void AddMetaLine(VCFParseBlock* pb, VCFToken* key, VCFToken* value)
+{
+}
+static void OpenMetaLine(VCFParseBlock* pb, VCFToken* key)
+{
+}
+static void CloseMetaLine(VCFParseBlock* pb)
+{
+}
+static void KeyValue(VCFParseBlock* pb, VCFToken* key, VCFToken* value)
+{
+}
+static void HeaderItem(VCFParseBlock* pb, VCFToken* value)
+{
+}
+
+static void OpenDataLine(VCFParseBlock* pb)
+{
+    VcfReader* self;
+    VcfDataLine* line;
+    rc_t rc = 0;
+
+    assert(pb);
+
+    self = (VcfReader*)(pb->self);
+    assert(self);
+    
+    /* create new line object */
+    VcfDataLineMake( &line );
+    if (rc == 0)
+    {   /* append to the vector */
+        rc = VectorAppend( &self->lines, NULL, line );
+        if (rc != 0)
+        {
+            SET_RC_FILE_FUNC_LINE(rc);
+            Error(pb, "failed to append a line object");
+        }
+    }
+    else
+    {
+        SET_RC_FILE_FUNC_LINE(rc);
+        Error(pb, "failed to create a line object");
+    }
+}
+static void DataItem(VCFParseBlock* pb, VCFToken* value)
+{
+    VcfReader* self = (VcfReader*)(pb->self);
+    VcfDataLine* line;
+
+    assert(pb);
+    
+    self = (VcfReader*)(pb->self);
+    assert(self);
+    
+    line = (VcfDataLine*) VectorLast( & self->lines );
+    assert(line);
+    
+    #define SAVE_TOKEN(field) StringInit( field, self->input + value->tokenStart, value->tokenLength, (uint32_t)string_size(value->tokenText) )
+
+    switch (line->lastPopulated)
+    {
+    case 0: /*String      chromosome; */
+        SAVE_TOKEN(&line->chromosome);
+        break;
+        
+    case 1: /*uint32_t    position;  */
+        {   
+            char* endptr;
+            long val = strtol(value->tokenText, &endptr, 10);
+            if (*endptr || val < 0 || val > UINT32_MAX)
+                Error(pb, "invalid numeric value for 'position'");
+            else
+                line->position = (uint32_t)val;
+                
+            break;
+        }
+    case 2: /*String      id; */
+        SAVE_TOKEN(&line->id);
+        break;
+    case 3: /*String      refBases; */
+        SAVE_TOKEN(&line->refBases);
+        break;
+    case 4: /*String      altBases;  */
+        SAVE_TOKEN(&line->altBases);
+        break;
+    case 5: /*uint8_t     quality;  */
+        {   
+            char* endptr;
+            long val = strtol(value->tokenText, &endptr, 10);
+            if (*endptr || val < 0 || val > UINT8_MAX)
+                Error(pb, "invalid numeric value for 'quality'");
+            else
+                line->quality = (uint32_t)val;
+                
+            break;
+        }
+    case 6: /*String      filter; */
+        SAVE_TOKEN(&line->filter);
+        break;
+    case 7: /*String      info; */ 
+        SAVE_TOKEN(&line->info);
+        break;
+    default: /* add to the genotypeFields */
+        {
+            rc_t rc = 0;
+            String f;
+            SAVE_TOKEN(&f);
+            rc = VNamelistAppendString(line->genotypeFields, &f);
+            if (rc != 0)
+            {
+                SET_RC_FILE_FUNC_LINE(rc);
+                Error(pb, "failed to append a genotype field");
+            }
+            break;
+        }
+    }
+    
+    ++line->lastPopulated;
+}
+static void CloseDataLine(VCFParseBlock* pb)
+{   
+    /* check if the line had enough data fields */
+    VcfReader* self = (VcfReader*)(pb->self);
+    VcfDataLine* line;
+
+    assert(pb);
+    
+    self = (VcfReader*)(pb->self);
+    assert(self);
+    
+    line = (VcfDataLine*) VectorLast( & self->lines );
+    assert(line);
+    
+    if (line->lastPopulated < MANDATORY_DATA_FIELDS_NUMBER)
+    {
+        -- pb->lastToken->line_no; /* this happens after the EOL has been processed, */
+                                   /* and the line # reported by flex incremented; fix that for error reporting */
+        Error(pb, "one or more of the 8 mandatory columns are missing");
+    }
+}
+
+
+rc_t VcfReaderParse( struct VcfReader *self, struct KFile* inputFile, const struct VNamelist** messages)
+{
+    rc_t rc = 0;
+    uint32_t messageCount;
+    KMMap* mm;
+    
+    if ( self == NULL )
+        return RC ( rcAlign, rcFile, rcParsing, rcSelf, rcNull );
+        
+    if (inputFile == NULL)
+        return RC ( rcAlign, rcFile, rcParsing, rcParam, rcNull );
+        
+    VNameListCount ( self->messages, &messageCount );       
+    if (messageCount > 0)
+    {   /* blow away old mesages */
+        rc = VNamelistRelease( self->messages );
+        if (rc == 0)
+            rc = VNamelistMake( &self->messages, MESSAGE_LIST_BLOCK_SIZE);
+        if (rc != 0)
+            return rc;
+    }
+        
+    rc = KMMapMakeRead ( (const KMMap**)& mm, inputFile );
+    if ( rc == 0 )
+    {
+        rc_t rc2 = 0;
+        
+        const void * ptr;
+        rc = KMMapAddrRead ( mm, & ptr );
+        if ( rc == 0 )
+        {
+            rc = KMMapSize ( mm, & self->inputSize);
+            if ( rc == 0 )
+            {
+                /* make a 0-terminated copy for parsing */
+                self->input = malloc(self->inputSize+1);
+                if (self->input == 0)
+                    rc = RC ( rcAlign, rcFile, rcConstructing, rcMemory, rcExhausted );
+                else
+                {
+                    string_copy(self->input, self->inputSize+1, ptr, self->inputSize);
+                    self->curPos = 0;
+                    VCFScan_yylex_init(&self->pb, false);
+                    
+                    if (VCF_parse(&self->pb) == 0)
+                        rc = PARSE_ERROR;
+                    else
+                    {
+                        VNameListCount ( self->messages, &messageCount );       
+                        if (messageCount > 0)
+                            rc = PARSE_ERROR;
+                    }
+                                        
+                    *messages = (const struct VNamelist*)self->messages;
+                        
+                    VCFScan_yylex_destroy(&self->pb);
+                }
+            }
+        }
+        else if (rc == RC ( rcFS, rcMemMap, rcAccessing, rcMemMap, rcInvalid )) /* 0 size file */
+        {
+            VNamelistAppend(self->messages, "Empty file");
+            *messages = (const struct VNamelist*)self->messages;
+            rc = PARSE_ERROR;
+        }
+           
+        rc2 = KMMapRelease ( mm );
+        if (rc == 0)
+            rc = rc2;
+    }
+    
+    return rc;
+}
+
+rc_t VcfReaderGetDataLineCount( const VcfReader* self, uint32_t* count )
+{
+    if ( self == NULL )
+        return RC ( rcAlign, rcFile, rcAccessing, rcSelf, rcNull );
+        
+    if ( count == NULL )
+        return RC ( rcAlign, rcFile, rcAccessing, rcParam, rcNull );
+        
+    *count = VectorLength( & self->lines );
+    
+    return 0;
+}
+
+rc_t VcfReaderGetDataLine( const VcfReader* self, uint32_t index, const VcfDataLine** line )
+{
+    if ( self == NULL )
+        return RC ( rcAlign, rcFile, rcAccessing, rcSelf, rcNull );
+        
+    if ( line == NULL )
+        return RC ( rcAlign, rcFile, rcAccessing, rcParam, rcNull );
+        
+    *line = VectorGet( & self->lines, index );
+    
+    return 0;
+}
+
diff --git a/tools/vcf-loader/vcf-reader.h b/tools/vcf-loader/vcf-reader.h
new file mode 100644
index 0000000..8c309ad
--- /dev/null
+++ b/tools/vcf-loader/vcf-reader.h
@@ -0,0 +1,110 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _h_vcf_reader_
+#define _h_vcf_reader_
+
+#ifndef _h_klib_defs_
+#include <klib/defs.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <klib/text.h>
+
+/*--------------------------------------------------------------------------
+ * forwards
+ */
+struct KFile;
+struct VNamelist;
+
+typedef struct VcfReader VcfReader;
+
+typedef struct VcfDataLine
+{
+    /* Fixed fields, per spec v. 4.2:
+        http://www.1000genomes.org/wiki/analysis/variant-call-format/vcf-variant-call-format-version-42 
+    */
+    String      chromosome; /* An identifier from the reference genome or "<ID>" pointing to a contig in the assembly file */
+    uint32_t    position;   /* The reference position, with the 1st base having position 1 */
+    String      id;         /* semi-colon separated list of unique identifiers where available; "." if missing */
+    String      refBases;   /* reference base(s) */
+    String      altBases;   /* comma separated list of alternate non-reference alleles called on at least one of the samples; "." if missing */
+    uint8_t     quality;    /* phred-scaled quality score for the assertion made in ALT */
+    String      filter;     /* "PASS", or a semicolon-separated list of codes for filters that fail*/
+    String      info;       /* a semicolon-separated series of keys with optional values in the format: <key>[=<data>[,data]] */ 
+
+    /* Genotype fields, each represented as a String pointing into source */
+    struct VNamelist*  genotypeFields;
+    
+    uint16_t  lastPopulated; /* index of the last populated data item (parser's internal use) */
+} VcfDataLine;
+
+/*=============== VcfReaderMake ================*/
+
+/* Make
+ *  Creates a new instance of VcfReader
+ *
+ *  self [OUT] return parameter for the new reader object
+ *
+ */
+rc_t VcfReaderMake( const VcfReader** self );
+
+/* Parse
+ *  Parses a VCF file. Can be used repeatedly on the same object.
+ *
+ *  self [ IN ] the reader object
+ *
+ *  file [ IN ] a readable file object. The entire file will be parsed.
+ *
+ *  message [ OUT ] error messages generated by the parser. Set to NULL if no messages were generated.
+ *  the pointer is valid until the next call to Parse or VcfReaderWhack on the reader object 
+ */
+rc_t VcfReaderParse( VcfReader* self, struct KFile* file, const struct VNamelist** messages );
+
+/* Whack
+ *  releases object obtained from VcfReaderMake
+ */
+rc_t VcfReaderWhack( VcfReader* self );
+
+/*  GetDataLineCount
+ * Returns the number of data lines in the parsed file 
+ */
+rc_t VcfReaderGetDataLineCount( const VcfReader* self, uint32_t* count );
+
+/*  GetDataLine
+ * Returns the data line at the specified 0-based index, 
+ * The returned pointer is valid until the reader is whacked
+ */
+rc_t VcfReaderGetDataLine( const VcfReader* self, uint32_t index, const VcfDataLine** line );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _h_vcf_reader_ */
diff --git a/tools/vdb-config/Makefile b/tools/vdb-config/Makefile
new file mode 100644
index 0000000..7e06a87
--- /dev/null
+++ b/tools/vdb-config/Makefile
@@ -0,0 +1,82 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/vdb-config
+
+INT_TOOLS =
+
+EXT_TOOLS = \
+	vdb-config
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+	
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# vdb-config
+#
+VDB_CONFIG_SRC = \
+	configure \
+	util \
+	vdb-config \
+	interactive \
+	vdb-config-model \
+
+VDB_CONFIG_OBJ = \
+	$(addsuffix .$(OBJX),$(VDB_CONFIG_SRC))
+
+VDB_CONFIG_LIB = \
+	-stui_cpp    \
+	-stui        \
+	-skapp       \
+	-stk-version \
+	-sncbi-vdb   \
+	-sm
+
+$(BINDIR)/vdb-config: $(VDB_CONFIG_OBJ)
+	$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(VDB_CONFIG_LIB)
diff --git a/tools/vdb-config/configure.cpp b/tools/vdb-config/configure.cpp
new file mode 100644
index 0000000..b30a608
--- /dev/null
+++ b/tools/vdb-config/configure.cpp
@@ -0,0 +1,815 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "configure.h" /* configure */
+#include "interactive.h" /* run_interactive */
+#include "util.hpp" // CNoncopyable
+#include "vdb-config-model.hpp" // vdbconf_model
+
+#include <klib/rc.h> /* RC */
+#include <klib/vector.h> /* Vector */
+
+#include <sstream> // stringstream
+
+#include <climits> /* PATH_MAX */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+using std::string;
+
+////////////////////////////////////////////////////////////////////////////////
+class CConfigurator : CNoncopyable {
+    CKConfig m_Cfg;
+    CKDirectory m_Dir;
+    rc_t CheckNcbiHome(bool &updated, bool verbose) const {
+        if (verbose) {
+            OUTMSG(("checking NCBI home... "));
+        }
+
+        const CString ncbi(m_Cfg.ReadNcbiHome());
+
+        if (verbose) {
+            OUTMSG(("%S\n", ncbi.Get()));
+        }
+
+        rc_t rc = 0;
+        if (!ncbi.Empty()) {
+            rc = m_Dir.CreateNonExistingPrivateDir(ncbi, verbose);
+            if (rc == 0) {
+                rc = m_Dir.CheckPrivateAccess(ncbi, updated, verbose);
+            }
+            if (rc == 0) {
+                rc = m_Dir.CanWriteFile(ncbi, verbose);
+            }
+        }
+
+        return rc;
+    }
+    rc_t CheckRepositories(bool fix) {
+        {
+            const string name("/repository/user/default-path");
+            CString node(m_Cfg.ReadString(name.c_str()));
+            if (node.Empty()) {
+                CString home(m_Cfg.ReadString("HOME"));
+                if (!home.Empty()) {
+/* this rc is ignored */ m_Cfg.UpdateNode(name.c_str(),
+                    (home.GetString() + "/ncbi").c_str());
+                }
+                else {
+                    m_Cfg.UpdateNode(name.c_str(), "$(HOME)/ncbi");
+                }
+            }
+        }
+        rc_t rc = 0;
+        if (fix) {
+            const string name("/repository/site/disabled");
+            if (m_Cfg.NodeExists(name)) {
+                rc_t r2 = m_Cfg.UpdateNode(name.c_str(), "false");
+                if (r2 != 0 && rc == 0) {
+                    rc = r2;
+                }
+            }
+        }
+        const KRepositoryMgr *mgr = NULL;
+        rc = KConfigMakeRepositoryMgrRead(m_Cfg.Get(), &mgr);
+        KRepositoryVector repositories;
+        memset(&repositories, 0, sizeof repositories);
+        bool created = false;
+        if (rc == 0) {
+            rc = KRepositoryMgrRemoteRepositories(mgr, &repositories);
+            if (rc == 0) {
+                KRepositoryVectorWhack(&repositories);
+            }
+            else if
+                (rc == SILENT_RC(rcKFG, rcNode, rcOpening, rcPath, rcNotFound))
+            {
+                rc = m_Cfg.CreateRemoteRepositories();
+                created = true;
+            }
+        }
+        if (rc == 0 && fix && !created) {
+            rc = m_Cfg.CreateRemoteRepositories(fix);
+        }
+        if (rc == 0) {
+            bool noUser = false;
+            rc = KRepositoryMgrUserRepositories(mgr, &repositories);
+            if (rc == 0) {
+                uint32_t len = 0;
+                if (rc == 0) {
+                    len = VectorLength(&repositories);
+                }
+                if (len == 0) {
+                    noUser = true;
+                }
+                else {
+                    uint32_t i = 0;
+                    noUser = true;
+                    for (i = 0; i < len; ++i) {
+                        const KRepository *repo
+                            = static_cast<const KRepository*>
+                                (VectorGet(&repositories, i));
+                        if (repo != NULL) {
+                            char buffer[PATH_MAX] = "";
+                            size_t size = 0;
+                            rc = KRepositoryName(repo,
+                                buffer, sizeof buffer, &size);
+                            if (rc == 0) {
+                                const char p[] = "public";
+                                if (strcase_cmp(p, sizeof p - 1, buffer,
+                                    size, sizeof buffer) == 0)
+                                {
+                                    noUser = false;
+                                }
+                                if (fix) {
+                                    rc = m_Cfg.CreateUserRepository
+                                        (buffer, fix);
+                                }
+                            }
+                        }
+                    }
+                    rc = 0;
+                }
+                KRepositoryVectorWhack(&repositories);
+            }
+            else if
+                (rc == SILENT_RC(rcKFG, rcNode, rcOpening, rcPath, rcNotFound))
+            {
+                noUser = true;
+            }
+            if (noUser) {
+                rc = m_Cfg.CreateUserRepository();
+            }
+        }
+        RELEASE(KRepositoryMgr, mgr);
+        return rc;
+    }
+
+    rc_t CheckConfig(bool fix) {
+        rc_t rc = CheckRepositories(fix);
+        if (rc == 0) {
+            const string name("/tools/ascp/max_rate");
+            CString node(m_Cfg.ReadString(name.c_str()));
+            if (node.Empty()) {
+                rc = m_Cfg.UpdateNode(name.c_str(), "1000m");
+            }
+        }
+        if (rc == 0) {
+            CString config_default(m_Cfg.ReadDefaultConfig());
+            if (!config_default.Empty() && !config_default.Equals("false")) {
+                m_Cfg.UpdateNode("/config/default", "false");
+            }
+        }
+        if (rc == 0) {
+            m_Cfg.Commit();
+        }
+        return rc;
+    }
+
+protected:
+    vdbconf_model *m_Config;
+
+public:
+    CConfigurator(bool fix = false, bool verbose = false): m_Config(NULL) {
+#define TODO 1
+        bool updated = false;
+        rc_t rc = CheckNcbiHome(updated, verbose);
+        if (rc == 0 && updated) {
+            m_Cfg.Reload(verbose);
+        }
+        if (rc == 0) {
+            rc = CheckConfig(fix);
+            if (rc == 0) {
+                m_Cfg.Reload(verbose);
+            }
+        }
+        if (rc == 0) {
+            m_Config = new vdbconf_model(m_Cfg.Get());
+            if (m_Config == NULL) {
+                rc = TODO;
+            }
+        }
+        if (rc != 0) {
+            throw rc;
+        }
+    }
+    virtual ~CConfigurator(void) { delete m_Config; }
+    virtual rc_t Configure(void) {
+        OUTMSG(("Fixed default configuration\n"));
+        return 0;
+    }
+};
+struct SUserRepo {
+    bool cacheEnabled;
+//  bool enabled;
+    string root;
+    SUserRepo(const vdbconf_model *kfg, int32_t id = -1) { Reload (kfg, id); }
+    void Reload(const vdbconf_model *kfg, int32_t id = -1) {
+        assert(kfg);
+        if (id < 0) {
+            cacheEnabled = kfg->is_user_cache_enabled();
+//          enabled = kfg->is_user_enabled();
+            root = kfg->get_public_location();
+        }
+        else {
+            cacheEnabled = kfg->is_protected_repo_cached(id);
+//          enabled = kfg->is_protected_repo_enabled(id);
+            root = kfg->get_repo_location(id);
+        }
+    }
+};
+struct SProtectedRepo : SUserRepo {
+public:
+    const string name;
+    const string description;
+    SProtectedRepo(const vdbconf_model *kfg,
+            uint32_t id, const string &aName)
+        : SUserRepo(kfg, id)
+        , name(aName), description(kfg->get_repo_description(name))
+    {}
+    void Reload(const vdbconf_model *kfg,
+        uint32_t id, const string &aName)
+    {
+        assert(name == aName);
+        SUserRepo::Reload(kfg, id);
+    }
+};
+class CProtectedRepos : public std::map<const string, SProtectedRepo> {
+    typedef std::map<const string, SProtectedRepo>::iterator TI;
+public:
+    typedef std::map<const string, SProtectedRepo>::const_iterator TCI;
+    CProtectedRepos(const vdbconf_model *kfg) { Reload(kfg); }
+    void Reload(const vdbconf_model *kfg) {
+        assert(kfg);
+        uint32_t n = kfg->get_repo_count();
+        for (uint32_t i = 0; i < n; ++i) {
+            const string name(kfg->get_repo_name(i));
+            TI it = find(name);
+            if (it == end()) {
+                insert(std::pair<const string, SProtectedRepo>
+                    (name, SProtectedRepo(kfg, i, name)));
+            }
+            else {
+                (*it).second.Reload(kfg, i, name);
+            }
+        }
+    }
+    TCI Get(uint32_t id) const {
+        TCI it = begin();
+        for (uint32_t i = 0; it != end(); ++it, ++i) {
+            if (i == id) {
+                break;
+            }
+        }
+        return it;
+    }
+};
+struct SData {
+    bool done;
+    bool updated;
+    bool site;
+    struct SCrntData {
+    private:
+        const vdbconf_model *m_Kfg;
+    public:
+        bool site_enabled;
+        bool remote_enabled;
+        bool cache_disabled;
+        SUserRepo userR;
+        CProtectedRepos protectedR;
+        SCrntData(const vdbconf_model *kfg)
+            : m_Kfg(kfg), userR(kfg), protectedR(kfg)
+        {
+            Reload();
+        }
+        void Reload(void) {
+            assert(m_Kfg);
+            site_enabled = m_Kfg->is_site_enabled();
+            remote_enabled = m_Kfg->is_remote_enabled();
+            cache_disabled = ! m_Kfg->is_global_cache_enabled();
+            userR.Reload(m_Kfg);
+            protectedR.Reload(m_Kfg);
+        }
+    } crnt;
+    SData(const vdbconf_model *kfg)
+        : done(false)
+        , updated(false)
+        , site(kfg->does_site_repo_exist())
+        , crnt(kfg)
+    {}
+};
+struct STrinity {
+private:
+    string ToString(int i) { std::stringstream s; s << i; return s.str(); }
+public:
+//  const string enabled;
+    const string cached;
+    const string root;
+    STrinity(const string &src)
+//      : enabled(src.substr(0, 1))
+        : cached (src.substr(0, 1))
+        , root   (src.substr(1, 1))
+    {}
+    STrinity(int i)
+//      : enabled(ToString(i + 0))
+        : cached (ToString(i + 0))
+        , root   (ToString(i + 1))
+    {}
+    void Print(void) const
+    { OUTMSG(("%s %s\n", cached.c_str(), root.c_str())); }
+};
+class CTextualConfigurator : public CConfigurator {
+    CStdIn m_Stdin;
+    string Input(const string &prompt, const string &value) {
+        OUTMSG(("\n\n%s:\n%s\n\nEnter the new path and Press <Enter>\n"
+            "Press <Enter> to accept the path\n> ",
+            prompt.c_str(), value.c_str()));
+        char buffer[PATH_MAX] = "";
+        size_t num_read = 0;
+        rc_t rc = m_Stdin.Read(buffer, sizeof buffer, &num_read);
+        if (rc == 0 && num_read > 0) {
+            return string(buffer, num_read);
+        }
+        else {
+            return "";
+        }
+    }
+    
+    void ProcessCancel(SData &d) {
+        if (!d.updated) {
+            d.done = true;
+            return;
+        }
+        OUTMSG(("\nChanges in your configuration were not saved\n\n"));
+        while (true) {
+            OUTMSG((
+                "To save changes and exit  : Enter Y and Press <Enter>\n"
+                "To ignore changes and exit: Enter N and Press <Enter>\n"
+                "To cancel and continue    : Press <Enter>\n"
+                "\n"
+                "Your choice > "));
+            char answer = toupper(m_Stdin.Read1());
+            switch (answer) {
+                case '\0':
+                    return;
+                case  'Y':
+                    OUTMSG(("Saving...\n"));
+                    m_Config->commit();
+                //  no break;
+                case  'N':
+                    OUTMSG(("Exiting..."));
+                    d.done = true;
+                    return;
+                default:
+                    OUTMSG(("Unrecognized input\n"));
+            }
+        }
+    }
+    enum EChoice {
+        eCancel,
+        eExit,
+        eRemote,
+        eSite,
+        eUnknown,
+        eUserCacheEnable,
+        eGlobalCacheEnable,
+//      eUserEnable,
+        eUserRoot,
+    };
+    struct SChoice {
+        EChoice choice;
+        int32_t id;
+        SChoice(EChoice c, int32_t i = -1) : choice(c), id(i)
+        {}
+    };
+    class CSymGen {
+        static const string magic;
+    public:
+        static STrinity Id2Seq(uint32_t id) {
+            int d = id * 2 - (int)magic.size();
+            if (d < 0) {
+                return STrinity(magic.substr(id * 2, 2));
+            }
+            else {
+                return STrinity(d + 10);
+            }
+        }
+        static SChoice Seq2Choice(string /* copy */ s, uint32_t maxId) {
+            if (s.length() <= 0 || s.length() > 2) {
+                return SChoice(eUnknown);
+            }
+            else if (s.length() == 1) {
+                size_t p = magic.find(s[0]);
+                if (p == string::npos) {
+                    return SChoice(eUnknown);
+                }
+                else {
+                    EChoice c = eUnknown;
+                    switch (p % 2) {
+                        case 0: c = eUserCacheEnable; break;
+                        case 1: c = eUserRoot       ; break;
+                        default: assert(0); break;
+                    }
+                    return SChoice(c, (int)p / 2);
+                }
+            }
+            else {
+                assert(s.length() == 2);
+                if (!isdigit(s[0]) || !!isdigit(s[0]) || s[0] == '0') {
+                    return SChoice(eUnknown);
+                }
+                int id = (s[0] - '0') * 10 + s[1] - '0' + (int)magic.size();
+                EChoice c = eUnknown;
+                switch (id % 2) {
+                    case 0: c = eUserCacheEnable; break;
+                    case 1: c = eUserRoot       ; break;
+                    default: assert(0); break;
+                }
+                return SChoice(c, id / 2);
+            }
+        }
+        static void Ask(void) { OUTMSG(("magic.len = %d\n", magic.size())); }
+    };
+    SChoice Inquire(const SData &d) {
+        OUTMSG(("     vdb-config interactive\n\n  data source\n\n"));
+        OUTMSG(("   NCBI SRA: "));
+        if (d.crnt.remote_enabled) {
+            OUTMSG(("enabled (recommended) (1)\n\n"));
+        }
+        else {
+            OUTMSG(("disabled (not recommended) (1)\n\n"));
+        }
+        if (d.site) {
+        OUTMSG(("   site    : "));
+            if (d.crnt.site_enabled) {
+                OUTMSG(("enabled (recommended) (2)\n\n"));
+            }
+            else {
+                OUTMSG(("disabled (not recommended) (2)\n\n"));
+            }
+        }
+        OUTMSG(("\n  local workspaces: local file caching: "));
+        if (d.crnt.cache_disabled) {
+            OUTMSG(("disabled (not recommended) (6)\n"));
+        }
+        else {
+            OUTMSG(("enabled (recommended) (6)\n"));
+        }
+        OUTMSG(("\n  Open Access Data\n"));
+/*      if (d.crnt.userR.enabled) {
+            OUTMSG(("enabled (recommended) (6)\n"));
+        }
+        else {
+            OUTMSG(("disabled (not recommended) (6)\n"));
+        }*/
+        if (d.crnt.userR.cacheEnabled) {
+            OUTMSG(("cached (recommended) (3)\n"));
+        }
+        else {
+            OUTMSG(("not cached (not recommended) (3)\n"));
+        }
+        OUTMSG(("location: '%s' (4)\n", d.crnt.userR.root.c_str()));
+
+        uint32_t id = 0;
+        for (CProtectedRepos::TCI it = d.crnt.protectedR.begin();
+            it != d.crnt.protectedR.end(); ++it, ++id)
+        {
+            const SProtectedRepo r((*it).second);
+            OUTMSG(("\n   %s:\n", r.name.c_str()));
+            if (r.description.size() > 0) {
+                OUTMSG(("  ( %s )\n", r.description.c_str()));
+            }
+            STrinity t(CSymGen::Id2Seq(id));
+
+/*          OUTMSG(("%s) ", t.enabled.c_str()));
+            if (r.enabled) {
+                OUTMSG(("enabled (recommended)\n"));
+            }
+            else {
+                OUTMSG(("DISABLED (not recommended)\n"));
+            }*/
+
+            OUTMSG(("%s) ", t.cached.c_str()));
+            if (r.cacheEnabled) {
+                OUTMSG(("caching is enabled (recommended)\n"));
+            }
+            else {
+                OUTMSG(("CACHING IS DISABLED (not recommended)\n"));
+            }
+
+            OUTMSG(("%s) root: %s\n", t.root.c_str(), r.root.c_str()));
+        }
+
+//"To print help info      : Enter H and Press <Enter>\n"
+        OUTMSG(("\n\n"
+"To cancel and exit      : Press <Enter>\n"));
+        if (d.updated) {
+            OUTMSG(("To save changes and exit: Enter Y and Press <Enter>\n"));
+        }
+        OUTMSG((
+"To update and continue  : Enter corresponding symbol and Press <Enter>\n"));
+        OUTMSG(("\nYour choice > "));
+        char answer = toupper(m_Stdin.Read1());
+        switch (answer) {
+            case '\0': return SChoice(eCancel);
+            case  '1': return SChoice(eRemote);
+            case  'Y': return SChoice(eExit);
+            case  '2': //            case  'O':
+                return d.site ? SChoice(eSite) : SChoice(eUnknown);
+            case  '6': return SChoice(eGlobalCacheEnable);
+            case  '3': return SChoice(eUserCacheEnable);
+            case  '4': return SChoice(eUserRoot);
+            default  : return CSymGen::Seq2Choice(string(1, answer), id);
+        }
+    }
+    bool SetRoot(int32_t id, const string &old) {
+        const string name(id < 0 ? "Public" : "dbGaP");
+        const string prompt("Path to " + name + " Repository");
+        bool flushOld = false, reuseNew = false, ask = true;
+        string root;
+        while (true) {
+            if (ask) {
+                root = Input(prompt, old);
+                if (root.size() == 0) {
+                    OUTMSG(("\nRoot path to '%s' repository was not changed\n",
+                        name.c_str()));
+                    return false;
+                }
+                OUTMSG(("\nChanging root path to '%s' repository to '%s'\n",
+                    name.c_str(), root.c_str()));
+                ask = false;
+            }
+            ESetRootState s = m_Config->change_repo_location
+                (flushOld, root, reuseNew, id);
+            switch (s) {
+                case eSetRootState_OK:
+                    return true;
+                case eSetRootState_NewPathEmpty:
+                case eSetRootState_Error:
+                    assert(0);
+                    return false;
+                case eSetRootState_MkdirFail:
+                    OUTMSG(("Error: cannot make directory '%s'\n",
+                        root.c_str()));
+                    ask = true;
+                    break;
+                case eSetRootState_NotChanged:
+                    OUTMSG(("Keeping '%s' path unchanged\n", root.c_str()));
+                    return false;
+                case eSetRootState_NewNotDir:
+                    OUTMSG(("Error: '%s' exists and is not a directory\n",
+                        root.c_str()));
+                    ask = true;
+                    break;
+                case eSetRootState_NotUnique:
+                    OUTMSG(("Error: there is another repository in '%s'\n",
+                        root.c_str()));
+                    ask = true;
+                    break;
+                case eSetRootState_NewDirNotEmpty: {
+                    OUTMSG(("Warning: directory '%s' is not empty\n"
+                        "Would you like to use it? (y/N)? > ", root.c_str()));
+                    char answer = toupper(m_Stdin.Read1());
+                    if (answer == 'Y') {
+                        reuseNew = true;
+                    }
+                    else {
+                        ask = true;
+                    }
+                    break;
+                }
+                case eSetRootState_OldNotEmpty: {
+                    OUTMSG(("Warning: your repository '%s' is not empty\n"
+                        "Would you like to clear it? (y/N)? > ", old.c_str()));
+                    char answer = toupper(m_Stdin.Read1());
+                    if (answer == 'Y') {
+                        OUTMSG(("Clearing the old repository...\n"));
+                        flushOld = true;
+                    }
+                    else {
+                        ask = true;
+                    }
+                    break;
+                }
+            }
+        }
+    }
+    virtual rc_t Configure(void) {
+        assert(m_Config);
+        SData d(m_Config);
+        while (!d.done) {
+            d.crnt.Reload();
+            SChoice answer = Inquire(d);
+            OUTMSG(("\n"));
+            switch (answer.choice) {
+                case eSite:
+                    if (d.crnt.site_enabled) {
+                        OUTMSG(("WARNING: DISABLING SITE REPOSITORY!!!"));
+                    }
+                    else {
+                        OUTMSG(("Enabling site repository..."));
+                    }
+                    m_Config->set_site_enabled(!d.crnt.site_enabled);
+                    d.updated = true;
+                    break;
+                case eRemote:
+                    if (d.crnt.remote_enabled) {
+                        OUTMSG(("WARNING: DISABLING REMOTE REPOSITORY!!!"));
+                    }
+                    else {
+                        OUTMSG(("Enabling remote repository..."));
+                    }
+                    m_Config->set_remote_enabled(!d.crnt.remote_enabled);
+                    d.updated = true;
+                    break;
+                case eGlobalCacheEnable:
+                    if (d.crnt.cache_disabled) {
+                        OUTMSG(("Enabling local file caching..."));
+                    }
+                    else {
+                        OUTMSG(("WARNING: DISABLING LOCAL FILE CACHING!!!"));
+                    }
+                    m_Config->set_global_cache_enabled(d.crnt.cache_disabled);
+                    d.updated = true;
+                    break;
+                case eUserCacheEnable:
+                    if (answer.id < 0) {
+                        if (d.crnt.userR.cacheEnabled) {
+                            OUTMSG(("WARNING: "
+                                "DISABLING USER REPOSITORY CACHING!!!"));
+                        }
+                        else {
+                            OUTMSG(("Enabling user repository caching..."));
+                        }
+                        m_Config->set_user_cache_enabled
+                            (!d.crnt.userR.cacheEnabled);
+                        d.updated = true;
+                    }
+                    else {
+                        CProtectedRepos::TCI it
+                            (d.crnt.protectedR.Get(answer.id));
+                        if (it == d.crnt.protectedR.end()) {
+                            OUTMSG(("Unrecognized input. Continuing..."));
+                        }
+                        else {
+                            const SProtectedRepo r((*it).second);
+                            int32_t id = m_Config->get_repo_id(r.name);
+                            if (id < 0) {
+                                OUTMSG(("ERROR: CANNOT FIND '%s' REPOSITORY",
+                                    r.name.c_str()));
+                            }
+                            else {
+                                if (r.cacheEnabled) {
+                                    OUTMSG(("WARNING: DISABLING '%s' REPOSITORY"
+                                        " CACHING!!!", r.name.c_str()));
+                                }
+                                else {
+                                    OUTMSG(("Enabling '%s' repository "
+                                        "caching...", r.name.c_str()));
+                                }
+                                m_Config->set_protected_repo_cached
+                                    (id, !r.cacheEnabled);
+                                d.updated = true;
+                            }
+                        }
+                    }
+                    break;
+/*              case eUserEnable:
+                    if (answer.id < 0) {
+                        if (d.crnt.userR.enabled) {
+                            OUTMSG(("WARNING: DISABLING USER REPOSITORY!!!"));
+                        }
+                        else {
+                            OUTMSG(("Enabling user repository..."));
+                        }
+                        m_Config->set_user_enabled(!d.crnt.userR.enabled);
+                        d.updated = true;
+                    }
+                    else {
+                        CProtectedRepos::TCI it
+                            (d.crnt.protectedR.Get(answer.id));
+                        if (it == d.crnt.protectedR.end()) {
+                            OUTMSG(("Unrecognized input. Continuing..."));
+                        }
+                        else {
+                            const SProtectedRepo r((*it).second);
+                            int32_t id = m_Config->get_repo_id(r.name);
+                            if (id < 0) {
+                                OUTMSG(("ERROR: CANNOT FIND '%s' REPOSITORY",
+                                    r.name.c_str()));
+                            }
+                            else {
+                                if (r.enabled) {
+                                    OUTMSG(("WARNING: DISABLING '%s' "
+                                        "REPOSITORY!!!", r.name.c_str()));
+                                }
+                                else {
+                                    OUTMSG(("Enabling '%s' repository...",
+                                        r.name.c_str()));
+                                }
+                                m_Config->set_protected_repo_enabled
+                                    (id, !r.enabled);
+                                d.updated = true;
+                            }
+                        }
+                    }
+                    break;*/
+                case eUserRoot: {
+                    string root(d.crnt.userR.root);
+                    if (answer.id >= 0) {
+                        CProtectedRepos::TCI it
+                            (d.crnt.protectedR.Get(answer.id));
+                        if (it == d.crnt.protectedR.end()) {
+                            OUTMSG(("Unrecognized input. Continuing..."));
+                            break;
+                        }
+                        else {
+                            root = (*it).second.root;
+                        }
+                    }
+                    d.updated = SetRoot(answer.id, root);
+                    break;
+                }
+                case eExit:
+                    OUTMSG(("Saving..."));
+                    m_Config->commit();
+                    d.done = true;
+                    break;
+                case eCancel:
+                    OUTMSG(("Canceling...\n\n"));
+                    ProcessCancel(d);
+                    break;
+                default:
+                    OUTMSG(("Unrecognized input. Continuing..."));
+                    break;
+            }
+            OUTMSG(("\n\n\n"));
+        }
+        return 0;
+    }
+public:
+    CTextualConfigurator(void) {}
+};
+const string CTextualConfigurator::CSymGen::magic
+ ("56789ABCDEFGHIJKLMNOPQRSTUVWXZ");
+class CVisualConfigurator : public CConfigurator {
+    virtual rc_t Configure(void) {
+        if (m_Config == NULL) {
+            return TODO;
+        }
+        return run_interactive(*m_Config);
+    }
+};
+rc_t configure(EConfigMode mode) {
+    rc_t rc = 0;
+    CConfigurator *c = NULL;
+    try {
+        switch (mode) {
+            case eCfgModeDefault:
+                c = new CConfigurator(true);
+                break;
+            case eCfgModeTextual:
+                c = new CTextualConfigurator;
+                break;
+            default:
+                c = new CVisualConfigurator;
+                break;
+        }
+        rc = c->Configure();
+    }
+    catch (rc_t re) {
+        if (rc == 0) {
+            rc = re;
+        }
+    }
+    catch (...) {
+        if (rc == 0) {
+            rc = TODO;
+        }
+    }
+    delete c;
+    return rc;
+}
diff --git a/tools/vdb-config/configure.h b/tools/vdb-config/configure.h
new file mode 100644
index 0000000..fc9450f
--- /dev/null
+++ b/tools/vdb-config/configure.h
@@ -0,0 +1,49 @@
+#ifndef _h_tools_vdb_config_configure_
+#define _h_tools_vdb_config_configure_
+
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/defs.h> /* rc_t */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+    eCfgModeDefault,  /* default has to be graphical     */
+    eCfgModeTextual,  /* textual is the only alternative */
+    eCfgModeSemiVisual, /* remove this */
+    eCfgModeVisual,     /* redundant */
+} EConfigMode;
+
+rc_t configure(EConfigMode mode);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _h_tools_vdb_config_configure_ */
diff --git a/tools/vdb-config/interactive.cpp b/tools/vdb-config/interactive.cpp
new file mode 100644
index 0000000..126ba78
--- /dev/null
+++ b/tools/vdb-config/interactive.cpp
@@ -0,0 +1,1084 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+
+/*
+    a clean new config tool in c++ with interactive interface...
+*/
+
+#include <tui/tui.hpp>
+
+#include <klib/rc.h>
+
+#include <kfg/config.h>
+#include <kfg/properties.h>
+#include <kfg/repository.h>
+#include <kfg/ngc.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+#include <sstream>
+
+#include "vdb-config-model.hpp"
+
+using namespace tui;
+
+#define BOX_COLOR		KTUI_c_dark_blue
+#define STATUS_COLOR	KTUI_c_gray
+#define LABEL_BG		KTUI_c_light_gray
+#define LABEL_FG		KTUI_c_black
+#define CB_COLOR_FG		KTUI_c_black
+#define BTN_COLOR_FG	KTUI_c_black
+#define CB_COLOR_BG		KTUI_c_cyan
+#define BTN_COLOR_BG	KTUI_c_cyan
+
+#define TOP_H			9
+#define SRC_W		    36
+#define PROXY_EN_W		15
+#define SAVE_W		    14
+#define EXIT_W		    14
+#define WKSP_NAME_W		32
+#define WKSP_B_LOC_W	12
+
+#define CB_TXT_REMOTE	            "Enable Remote Access (1)"
+#define CB_TXT_CACHE   	            "Enable Local File Caching (2)"
+#define CB_TXT_SITE   	            "Use Site Installation (3)"
+#define CB_TXT_PROXY        		"Use Proxy"
+
+#define BTN_TXT_IMPORT_NGC 			"Import Repository Key (4)"
+#define BTN_TXT_DFLT_IMPORT_PATH	"Set Default Import Path (5)"
+#define B_SAVE_TXT                  "Save (6)"
+#define B_EXIT_TXT                  "Exit (7)"
+#define B_RELOAD_TXT                "Reload (8)"
+#define B_FACT_DFLT_TXT             "Standard Settings (9)"
+
+#define MAIN_CAPTION	            "vdb-config"
+#define L_TXT_PUBLIC                "Public"
+#define BTN_TXT_CHANGE	            "Change"
+#define HDR_WKSP_NAME_TXT           "Workspace Name"
+#define HDR_WKSP_LOC_TXT            "Location"
+#define L_TXT_NUMBER_EXPLAIN        "Press the number in (X) as a shortcut"
+
+#define FOCUS_TXT_CB_REMOTE         "Press SPACE | ENTER to enable/disable access to the servers at NCBI"
+#define FOCUS_TXT_CB_CACHED         "Press SPACE | ENTER to enable/disable caching"
+#define FOCUS_TXT_CB_SITE           "Press SPACE | ENTER to enable/disable access to site repositories"
+#define FOCUS_TXT_CB_PROXY          "Press SPACE | ENTER to enable/disable http proxy"
+#define FOCUS_TXT_B_PROXY			"Press SPACE | ENTER to edit proxy"
+#define FOCUS_TXT_B_PUBLIC_LOC      "Press SPACE | ENTER to change location of public data"
+#define FOCUS_TXT_B_IMPORT_NGC      "Press SPACE | ENTER to import a dbGaP project"
+#define FOCUS_TXT_B_USR_DFLT_PATH   "Press SPACE | ENTER to change default repository location"
+#define FOCUS_TXT_B_PROT_LOC        "Press SPACE | ENTER to change location for this dbGaP repository"
+#define FOCUS_TXT_B_SAVE            "Press SPACE | ENTER to save changes"
+#define FOCUS_TXT_B_EXIT            "Press SPACE | ENTER to exit vdb-config"
+#define FOCUS_TXT_B_RELOAD          "Press SPACE | ENTER to discard changes"
+#define FOCUS_TXT_B_FACT_DFLT       "Press SPACE | ENTER to set factory defaults"
+
+#define ID_BOX_TOP_LEFT             100
+#define ID_BOX_BOTTOM               101
+#define ID_BOX_TOP_RIGHT            102
+#define ID_BOX_STATUS               103
+
+#define ID_CB_REMOTE                104
+#define ID_CB_CACHED                105
+#define ID_CB_SITE                  106
+#define ID_CB_PROXY          		107
+#define ID_B_PROXY          		108
+#define ID_L_PROXY          		109
+
+#define ID_B_IMPORT_NGC             120
+#define ID_B_USR_DFLT_PATH          121
+
+#define ID_L_WKSP_NAME              122
+#define ID_L_WKSP_LOC               123
+
+#define ID_L_PUBLIC                 123
+#define ID_B_PUBLIC_LOC             124
+#define ID_L_PUBLIC_LOC             125
+
+#define ID_B_SAVE                   126
+#define ID_B_EXIT                   127
+#define ID_B_RELOAD                 128
+#define ID_B_FACT_DFLT              129
+
+#define ID_L_NUMBER_EXPLAIN         130
+
+#define ID_L_PROT                   200
+#define ID_L_PROT_LOC               300
+#define ID_B_PROT_LOC               400
+
+
+class vdbconf_view : public Dlg
+{
+    public :
+        vdbconf_view( vdbconf_model &model ) : Dlg(), priv_model( model ), repos_shown( 0 ), show_local_enable( false )
+        {
+            populate();
+        };
+
+        virtual bool Resize( Tui_Rect const &r )
+        {
+			populate( r, true );
+            return Dlg::Resize( r );
+        }
+
+        void populate( void );
+
+    private :
+        vdbconf_model & priv_model;
+        uint32_t repos_shown;
+        bool show_local_enable;
+
+        /* layout functions */
+		uint32_t half( Tui_Rect const &r, uint32_t margins ) const { return ( ( r.get_w() - margins ) / 2 ); }
+		Tui_Rect h1_rect( Tui_Rect const &r, int32_t dx, int32_t dy, int32_t dw ) const
+            { return Tui_Rect( r.get_x() + dx, r.get_y() + dy, r.get_w() + dw, 1 ); }
+		Tui_Rect h1_w_rect( Tui_Rect const &r, int32_t dx, int32_t dy, uint32_t w ) const
+            { return Tui_Rect( r.get_x() + dx, r.get_y() + dy, w, 1 ); }
+		
+		Tui_Rect top_left_rect( Tui_Rect const &r ) const
+            { return Tui_Rect( r.get_x() + 1, r.get_y() + 2, half( r, 3 ), TOP_H ); }
+
+		Tui_Rect top_right_rect( Tui_Rect const &r ) const
+            { return Tui_Rect( r.get_x() + half( r, 3 ) + 2, r.get_y() + 2, r.get_w() - half( r, 3 ) - 3, TOP_H ); }
+																				
+		Tui_Rect bottom_rect( Tui_Rect const &r ) const
+            { return Tui_Rect( r.get_x() + 1, r.get_y() + TOP_H + 3, r.get_w() - 2, r.get_h() - ( TOP_H + 5 ) ); }
+
+        Tui_Rect statust_rect( Tui_Rect const &r ) const { return h1_rect( r, 0, r.get_h() - 1, 0 ); }
+        Tui_Rect remote_cb_rect( Tui_Rect const &r ) const { return h1_w_rect( r, 1, 1, SRC_W ); }
+        Tui_Rect cache_cb_rect( Tui_Rect const &r ) const { return h1_w_rect( r, 1, 3, SRC_W ); }
+        Tui_Rect site_cb_rect( Tui_Rect const &r ) const { return h1_w_rect( r, 1, 5, SRC_W ); }
+        Tui_Rect proxy_cb_rect( Tui_Rect const &r ) const { return h1_w_rect( r, 1, 7, PROXY_EN_W ); }
+        Tui_Rect proxy_btn_rect( Tui_Rect const &r ) const { return h1_w_rect( r, PROXY_EN_W + 2, 7, WKSP_B_LOC_W ); }
+        Tui_Rect proxy_lb_rect( Tui_Rect const &r ) const
+		{ return h1_w_rect( r, PROXY_EN_W + 3 + WKSP_B_LOC_W, 7, r.get_w() - ( PROXY_EN_W + 4 + WKSP_B_LOC_W ) ); }
+		
+        Tui_Rect import_ngc_rect( Tui_Rect const &r ) const { return h1_w_rect( r, 1, 1, WKSP_NAME_W ); }
+        Tui_Rect usr_dflt_path_rect( Tui_Rect const &r ) const { return h1_w_rect( r, WKSP_NAME_W + 2, 1, WKSP_NAME_W + 3 ); }
+
+		Tui_Rect hdr_wksp_name_rect( Tui_Rect const &r ) const { return h1_w_rect( r, 1, 3, WKSP_NAME_W ); }
+		Tui_Rect hdr_wksp_loc_rect( Tui_Rect const &r ) const { return h1_rect( r, WKSP_NAME_W + 2, 3, -( WKSP_NAME_W + 3 ) ); }
+
+		Tui_Rect wksp_name_rect( Tui_Rect const &r, uint32_t n ) const { return h1_w_rect( r, 1, 5 + ( 2 * n ), WKSP_NAME_W ); }
+		Tui_Rect wksp_b_loc_rect( Tui_Rect const &r, uint32_t n ) const
+            { return h1_w_rect( r, WKSP_NAME_W + 2, 5 + ( 2 * n ), WKSP_B_LOC_W ); }
+		Tui_Rect wksp_loc_rect( Tui_Rect const &r, uint32_t n ) const
+            { return h1_rect( r, WKSP_NAME_W + WKSP_B_LOC_W + 3, 5 + ( 2 * n ), -( WKSP_NAME_W + WKSP_B_LOC_W + 4 ) ); }
+		
+        Tui_Rect save_rect( Tui_Rect const &r ) const { return h1_w_rect( r, 1, 1, SAVE_W ); }
+        Tui_Rect exit_rect( Tui_Rect const &r ) const { return h1_w_rect( r, SAVE_W + 2, 1, EXIT_W ); }
+        Tui_Rect reload_rect( Tui_Rect const &r ) const { return h1_w_rect( r, 1, 3, SAVE_W + EXIT_W + 1 ); }
+        Tui_Rect factdflt_rect( Tui_Rect const &r ) const { return h1_w_rect( r, 1, 5, SAVE_W + EXIT_W + 1 ); }
+        Tui_Rect num_explain_rect( Tui_Rect const &r ) const { return h1_rect( r, 1, r.get_h() - 2, -2 ); }
+
+		void setup_box( Tui_Rect const &r, bool resize, uint32_t id );
+		void setup_label( Tui_Rect const &r, bool resize, uint32_t id, const char * txt );
+		void setup_checkbox( Tui_Rect const &r, bool resize, uint32_t id, const char * txt, bool enabled );
+		void setup_button( Tui_Rect const &r, bool resize, uint32_t id, const char * txt );
+		
+		void populate_top_left( Tui_Rect const &r, bool resize );
+        void populate_protected( Tui_Rect const &r, bool resize );
+		void populate_bottom( Tui_Rect const &r, bool resize );
+		void populate_top_right( Tui_Rect const &r, bool resize );
+        void populate( Tui_Rect const &r, bool resize );
+};
+
+
+void vdbconf_view::setup_box( Tui_Rect const &r, bool resize, uint32_t id )
+{
+	if ( resize )
+		SetWidgetRect( id, r, false );
+	else if ( !HasWidget( id ) )
+	{
+		AddLabel( id, r, "" );
+		SetWidgetBackground( id, BOX_COLOR );
+	}
+}
+
+void vdbconf_view::setup_label( Tui_Rect const &r, bool resize, uint32_t id, const char * txt )
+{
+	if ( resize )
+		SetWidgetRect( id, r, false );
+	else if ( HasWidget( id ) )
+    {
+        SetWidgetCaption( id, ( txt == NULL ) ? "" : txt );
+    }
+    else
+	{
+		AddLabel( id, r, ( txt == NULL ) ? "" : txt );
+		SetWidgetBackground( id, LABEL_BG );
+		SetWidgetForeground( id, LABEL_FG );
+	}
+}
+
+
+void vdbconf_view::setup_checkbox( Tui_Rect const &r, bool resize, uint32_t id, const char * txt, bool value )
+{
+	if ( resize )
+		SetWidgetRect( id, r, false );
+	else if ( HasWidget( id ) )
+    {
+        SetWidgetCaption( id, ( txt == NULL ) ? "" : txt );
+        SetWidgetBoolValue( id, value );
+    }
+    else
+	{
+        AddCheckBox( id, r, ( txt == NULL ) ? "" : txt, value );
+		SetWidgetBackground( id, CB_COLOR_BG );
+		SetWidgetForeground( id, CB_COLOR_FG );
+	}
+}
+
+
+void vdbconf_view::setup_button( Tui_Rect const &r, bool resize, uint32_t id, const char * txt )
+{
+	if ( resize )
+		SetWidgetRect( id, r, false );
+	else if ( HasWidget( id ) )
+    {
+        SetWidgetCaption( id, ( txt == NULL ) ? "" : txt );
+    }
+    else
+	{
+		AddButton( id, r, ( txt == NULL ) ? "" : txt );
+		SetWidgetBackground( id, BTN_COLOR_BG );
+		SetWidgetForeground( id, BTN_COLOR_FG );
+	}
+}
+
+
+void vdbconf_view::populate_top_left( Tui_Rect const &r, bool resize )
+{
+	setup_box( r, resize, ID_BOX_TOP_LEFT );
+
+    /* the 3 checkboxes for remote, cached, site */
+	setup_checkbox( remote_cb_rect( r ), resize, ID_CB_REMOTE, CB_TXT_REMOTE, priv_model.is_remote_enabled() );
+	setup_checkbox( cache_cb_rect( r ), resize, ID_CB_CACHED, CB_TXT_CACHE, priv_model.is_global_cache_enabled() );
+	if ( priv_model.does_site_repo_exist() )
+		setup_checkbox( site_cb_rect( r ), resize, ID_CB_SITE, CB_TXT_SITE, priv_model.is_site_enabled() );
+	setup_checkbox( proxy_cb_rect( r ), resize, ID_CB_PROXY, CB_TXT_PROXY, priv_model.is_http_proxy_enabled() );
+	setup_button( proxy_btn_rect( r ), resize, ID_B_PROXY, BTN_TXT_CHANGE );
+	setup_label( proxy_lb_rect( r ), resize, ID_L_PROXY, priv_model.get_http_proxy_path().c_str() );
+}
+
+
+void vdbconf_view::populate_protected( Tui_Rect const &r, bool resize )
+{
+    uint32_t visible = ( ( r.get_h() - 9 ) / 2 );
+    uint32_t i, n = priv_model.get_repo_count();
+    for ( i = 0; i < n; ++i )
+    {
+        setup_label( wksp_name_rect( r, i + 1 ), resize, ID_L_PROT + i, priv_model.get_repo_name( i ).c_str() );
+        setup_button( wksp_b_loc_rect( r, i + 1 ), resize, ID_B_PROT_LOC + i, BTN_TXT_CHANGE );
+        setup_label( wksp_loc_rect( r, i + 1 ), resize, ID_L_PROT_LOC + i, priv_model.get_repo_location( i ).c_str() );
+
+        SetWidgetVisible( ID_L_PROT + i, ( i < visible ) );
+        SetWidgetVisible( ID_B_PROT_LOC + i, ( i < visible ) );
+        SetWidgetVisible( ID_L_PROT_LOC + i, ( i < visible ) );
+    }
+}
+
+void vdbconf_view::populate_bottom( Tui_Rect const &r, bool resize )
+{
+	setup_box( r, resize, ID_BOX_BOTTOM );
+	
+    /* the import-ngc and the set-dflt-path buttons */
+	setup_button( import_ngc_rect( r ), resize, ID_B_IMPORT_NGC, BTN_TXT_IMPORT_NGC );
+	setup_button( usr_dflt_path_rect( r ), resize, ID_B_USR_DFLT_PATH, BTN_TXT_DFLT_IMPORT_PATH );
+
+    /* the header of the workspace list */	
+	setup_label( hdr_wksp_name_rect( r ), resize, ID_L_WKSP_NAME, HDR_WKSP_NAME_TXT );
+	setup_label( hdr_wksp_loc_rect( r ), resize, ID_L_WKSP_LOC, HDR_WKSP_LOC_TXT );
+
+    /* the public workspace: */
+    setup_label( wksp_name_rect( r, 0 ), resize, ID_L_PUBLIC, L_TXT_PUBLIC );
+	setup_button( wksp_b_loc_rect( r, 0 ), resize, ID_B_PUBLIC_LOC, BTN_TXT_CHANGE );
+    setup_label( wksp_loc_rect( r, 0 ), resize, ID_L_PUBLIC_LOC, priv_model.get_public_location().c_str() );
+
+    /* the protected workspaces: */
+    populate_protected( r, resize );
+
+    setup_label( num_explain_rect( r ), resize, ID_L_NUMBER_EXPLAIN, L_TXT_NUMBER_EXPLAIN );
+}
+
+
+void vdbconf_view::populate_top_right( Tui_Rect const &r, bool resize )
+{
+	setup_box( r, resize, ID_BOX_TOP_RIGHT );
+
+	setup_button( save_rect( r ), resize, ID_B_SAVE, B_SAVE_TXT );
+	setup_button( exit_rect( r ), resize, ID_B_EXIT, B_EXIT_TXT );
+	setup_button( reload_rect( r ), resize, ID_B_RELOAD, B_RELOAD_TXT );
+	setup_button( factdflt_rect( r ), resize, ID_B_FACT_DFLT, B_FACT_DFLT_TXT );
+}
+
+
+void vdbconf_view::populate( Tui_Rect const &r, bool resize )
+{
+    if ( !resize ) SetCaption( MAIN_CAPTION );
+    
+    populate_top_left( top_left_rect( r ), resize );
+    populate_bottom( bottom_rect( r ), resize );
+    populate_top_right( top_right_rect( r ), resize );
+    
+    setup_label( statust_rect( r ), resize, ID_BOX_STATUS, NULL );
+}
+
+
+void vdbconf_view::populate( void )
+{
+    Tui_Rect r;
+    GetRect( r );
+    populate( r, false );
+}
+
+/* ------------------------------------------------------------------------------------------------------------------------------------- */
+
+
+static void vdbconf_msg( Dlg &dlg, Tui_Rect r, const char * msg )
+{
+    Std_Dlg_Info_Line d;
+    d.set_parent( &dlg );
+    dlg.center( r );
+    d.set_location( r );
+    d.set_text( msg );
+    d.execute();
+}
+
+
+static bool vdbconf_question( Dlg &dlg, Tui_Rect r, const char * msg )
+{
+    Std_Dlg_Question q;
+    q.set_parent( &dlg );
+    dlg.center( r );
+    q.set_location( r );
+    q.set_text( msg );
+    return ( q.execute() );
+}
+
+
+static bool vdbconf_input( Dlg &dlg, Tui_Rect r, const char * caption, std::string & txt )
+{
+    bool res;
+    Std_Dlg_Input q;
+    q.set_parent( &dlg );
+    dlg.center( r );
+    q.set_location( r );
+    q.set_caption( caption );
+    q.set_text2( txt );
+    res = q.execute();
+    if ( res )
+        txt = q.get_text2();
+    return res;
+}
+
+
+static std::string vdbconf_pick_file( Dlg &dlg, Tui_Rect r, const char * path, const char *ext )
+{
+    std::string res = "";
+    Std_Dlg_File_Pick pick;
+    pick.set_parent( &dlg );
+    dlg.center( r );
+    pick.set_location( r );
+    pick.set_ext( ext );
+    pick.set_dir_h( ( r.get_h() - 7 ) / 2 );
+    pick.set_text( path );
+    if ( pick.execute() )
+        res.assign( pick.get_text() );
+    return res;
+}
+
+
+bool vdbconf_pick_dir( Dlg &dlg, Tui_Rect r, std::string &path )
+{
+    bool res = false;
+    Std_Dlg_Dir_Pick pick;
+
+    pick.set_parent( &dlg );
+    dlg.center( r );
+    pick.set_location( r );
+    pick.set_text( path.c_str() );
+    pick.allow_dir_create();
+
+    res = pick.execute();
+    if ( res )
+        path.assign( pick.get_text() );
+
+    return res;
+}
+
+
+static bool make_ngc_obj( const KNgcObj ** ngc, std::string &path )
+{
+    KDirectory * dir;
+    rc_t rc = KDirectoryNativeDir( &dir );
+    if ( rc == 0 )
+    {
+        const KFile * src;
+        rc = KDirectoryOpenFileRead ( dir, &src, "%s", path.c_str() );
+        if ( rc == 0 )
+        {
+            rc = KNgcObjMakeFromFile ( ngc, src );
+            KFileRelease( src );
+        }
+        KDirectoryRelease( dir );
+    }
+    return ( rc == 0 );
+}
+
+
+std::string public_location_start_dir( vdbconf_model &model )
+{
+    std::string res = model.get_public_location();
+
+    if ( !model.does_path_exist( res ) )
+        res = model.get_user_default_dir();
+
+    if ( !model.does_path_exist( res ) )
+        res = model.get_home_dir() + "/ncbi";
+
+    if ( !model.does_path_exist( res ) )
+        res = model.get_home_dir();
+
+    if ( !model.does_path_exist( res ) )
+        res = model.get_current_dir();
+
+    return res;
+}
+
+
+std::string protected_location_start_dir( vdbconf_model &model, uint32_t id )
+{
+    std::string res = model.get_repo_location( id );
+
+    if ( !model.does_path_exist( res ) )
+        res = model.get_user_default_dir();
+
+    if ( !model.does_path_exist( res ) )
+        res = model.get_home_dir() + "/ncbi";
+
+    if ( !model.does_path_exist( res ) )
+        res = model.get_home_dir();
+
+    if ( !model.does_path_exist( res ) )
+        res = model.get_current_dir();
+
+    return res;
+}
+
+/* ------------------------------------------------------------------------------------------------------------------------------------- */
+
+
+class vdbconf_controller : public Dlg_Runner
+{
+    private :
+        vdbconf_model &priv_model;
+
+    public :
+        vdbconf_controller( Dlg &dlg, vdbconf_model &model ) : Dlg_Runner( dlg, &model ), priv_model( model ) 
+        { dlg.SetFocus( ID_CB_REMOTE ); };
+
+        virtual bool on_kb_alpha( Dlg &dlg, void * data, int code ); /* close the dialog with the 'q' character too */
+        virtual bool on_select( Dlg &dlg, void * data, Tui_Dlg_Event &dev ); /* react to buttons pressed */
+        virtual bool on_focus( Dlg &dlg, void * data, Tui_Dlg_Event &dev ) /* react to getting the focus */
+        { return on_focused( dlg, dev.get_widget_id() ); };
+
+        void update_view( Dlg &dlg );
+        bool on_exit( Dlg &dlg );
+        bool on_save( Dlg &dlg );
+        bool on_reload( Dlg &dlg );
+        bool on_fact_dflt( Dlg &dlg );
+
+        std::string get_import_ngc_start_dir( vdbconf_model &model );
+        bool import_this_ngc_into_this_location( Dlg &dlg, vdbconf_model &m, std::string &location, const KNgcObj * ngc );
+        bool import_this_ngc( Dlg &dlg, vdbconf_model &m, const KNgcObj * ngc );
+        bool on_import_ngc( Dlg &dlg );
+
+        std::string change_dflt_import_path_start_dir( vdbconf_model &model );
+        bool on_change_dflt_import_path( Dlg &dlg );
+
+        bool toggle_checkbox( Dlg &dlg, uint32_t id );
+        bool toggle_remote( Dlg &dlg );
+        bool toggle_site( Dlg &dlg );
+        bool toggle_cached( Dlg &dlg );
+
+		bool change_proxy( Dlg &dlg );
+		
+        bool on_set_location_error( Dlg &dlg, ESetRootState s );
+        bool on_pick_public_location( Dlg &dlg );
+
+        std::string change_protected_location_start_dir( vdbconf_model &model, uint32_t id );
+        bool on_pick_protected_location( Dlg &dlg, uint32_t id );
+        bool on_protected_repo( Dlg &dlg, Tui_Dlg_Event &dev );
+
+        void status_txt( Dlg &dlg, const char * s ) { dlg.SetWidgetCaption( ID_BOX_STATUS, s ); }
+        void on_focused_protected_repo( Dlg &dlg, uint32_t widget_id );
+        bool on_focused( Dlg &dlg, uint32_t widget_id );
+};
+
+
+void vdbconf_controller::update_view( Dlg &dlg )
+{
+    vdbconf_view &view = dynamic_cast<vdbconf_view &>( dlg );
+    view.populate();
+}
+
+
+bool vdbconf_controller::on_exit( Dlg &dlg )
+{
+    if ( priv_model.get_config_changed() )
+    {
+        if ( vdbconf_question( dlg, Tui_Rect( 5, 5, 120, 6 ), "save changes ?" ) )
+        {
+            if ( priv_model.commit() )
+                vdbconf_msg( dlg, Tui_Rect( 5, 5, 120, 6 ), "changes successfully saved" );
+            else
+                vdbconf_msg( dlg, Tui_Rect( 5, 5, 120, 6 ), "error saving changes" );
+        }
+    }
+    dlg.SetDone( true );
+    return true;
+}
+
+
+bool vdbconf_controller::on_save( Dlg &dlg )
+{
+    if ( priv_model.get_config_changed() )
+    {
+        if ( priv_model.commit() )
+            vdbconf_msg( dlg, Tui_Rect( 5, 5, 120, 6 ), "changes successfully saved" );
+        else
+            vdbconf_msg( dlg, Tui_Rect( 5, 5, 120, 6 ), "error saving changes" );
+    }
+    else
+        vdbconf_msg( dlg, Tui_Rect( 5, 5, 120, 6 ), "no changes to be saved" );
+    return true;
+}
+
+
+bool vdbconf_controller::on_reload( Dlg &dlg )
+{
+    priv_model.reload();
+    update_view( dlg );
+    return true;
+}
+
+
+bool vdbconf_controller::on_fact_dflt( Dlg &dlg )
+{
+    priv_model.set_remote_enabled( true );
+    priv_model.set_global_cache_enabled( true );
+    priv_model.set_site_enabled( true );
+    update_view( dlg );
+    return true;
+}
+
+
+bool vdbconf_controller::toggle_checkbox( Dlg &dlg, uint32_t id )
+{
+    bool value = !dlg.GetWidgetBoolValue( id );
+    dlg.SetWidgetBoolValue( id, value );
+    return value;
+}
+
+
+bool vdbconf_controller::toggle_remote( Dlg &dlg )
+{
+    priv_model.set_remote_enabled( toggle_checkbox( dlg, ID_CB_REMOTE ) );
+    return true;
+}
+
+bool vdbconf_controller::toggle_cached( Dlg &dlg )
+{
+    priv_model.set_global_cache_enabled( toggle_checkbox( dlg, ID_CB_CACHED ) );
+    return true;
+}
+
+bool vdbconf_controller::toggle_site( Dlg &dlg )
+{
+	if ( priv_model.does_site_repo_exist() )
+        priv_model.set_site_enabled( toggle_checkbox( dlg, ID_CB_SITE ) );
+    return true;
+}
+
+
+bool vdbconf_controller::on_kb_alpha( Dlg &dlg, void * data, int code )
+{
+    bool res = false;
+    switch( code )
+    {
+        case '1' : res = toggle_remote( dlg ); break;
+        case '2' : res = toggle_cached( dlg ); break;
+        case '3' : res = toggle_site( dlg ); break;
+
+        case '4' : res = on_import_ngc( dlg ); break;
+        case '5' : res = on_change_dflt_import_path( dlg ); break;
+
+        case '6' : res = on_save( dlg ); break;
+
+        case '7' :
+        case 'Q' :
+        case 'q' : res = on_exit( dlg ); break;
+
+        case '8' : res = on_reload( dlg ); break;
+        case '9' : res = on_fact_dflt( dlg ); break;
+
+        default  : res = false;
+
+    }
+    return res;
+};
+
+
+bool vdbconf_controller::import_this_ngc_into_this_location( Dlg &dlg,
+    vdbconf_model &m, std::string &location, const KNgcObj * ngc )
+{
+    uint32_t result_flags = 0;
+    bool res = m.import_ngc( location, ngc, INP_CREATE_REPOSITORY, &result_flags );
+    if ( res )
+    {
+        /* we have it imported or it exists and no changes made */
+        bool modified = false;
+        if ( result_flags & INP_CREATE_REPOSITORY )
+        {
+            /* success is the most common outcome, the repository was created */
+            vdbconf_msg( dlg, Tui_Rect( 5, 5, 120, 6 ), "project successfully imported" );
+            update_view( dlg );
+            modified = true;
+        }
+        else
+        {
+            /* repository did exist and is completely identical to the given ngc-obj */
+            vdbconf_msg( dlg, Tui_Rect( 5, 5, 120, 6 ), "this project exists already, no changes made" );
+        }
+
+        std::ostringstream question; 
+        question << "do you want to change the location?";
+        if ( vdbconf_question( dlg, Tui_Rect( 5, 5, 120, 6 ), question.str().c_str() ) )
+        {
+            uint32_t id;
+            if ( m.get_id_of_ngc_obj( ngc, &id ) )
+                modified |= on_pick_protected_location( dlg, id );
+            else
+                vdbconf_msg( dlg, Tui_Rect( 5, 5, 120, 6 ), "cannot find the imported repostiory" );
+        }
+
+        if ( modified )
+        {
+            m.commit();
+            update_view( dlg );
+            m.mkdir(ngc);
+        }
+    }
+    else if ( result_flags == 0 )
+    {
+        /* we are here if there was an error executing one of the internal functions */
+        vdbconf_msg( dlg, Tui_Rect( 5, 5, 120, 6 ), "there was an internal error importing the ngc-object" );
+    }
+    else
+    {
+        bool permitted = true;
+
+        vdbconf_msg( dlg, Tui_Rect( 5, 5, 120, 6 ), "the repository does already exist!" );
+        if ( result_flags & INP_UPDATE_ENC_KEY )
+        {
+            std::ostringstream question; 
+            question << "encryption-key would change, continue ?";
+            permitted = ( vdbconf_question( dlg, Tui_Rect( 5, 5, 120, 6 ), question.str().c_str() ) );
+        }
+
+        if ( permitted && ( result_flags & INP_UPDATE_DNLD_TICKET ) )
+        {
+            std::ostringstream question; 
+            question << "download-ticket would change, continue ?";
+            permitted = ( vdbconf_question( dlg, Tui_Rect( 5, 5, 120, 6 ), question.str().c_str() ) );
+        }
+
+        if ( permitted && ( result_flags & INP_UPDATE_DESC ) )
+        {
+            std::ostringstream question; 
+            question << "description would change, continue ?";
+            permitted = ( vdbconf_question( dlg, Tui_Rect( 5, 5, 120, 6 ), question.str().c_str() ) );
+        }
+
+        if ( permitted )
+        {
+            uint32_t result_flags2 = 0;
+            res = m.import_ngc( location, ngc, result_flags, &result_flags2 );
+            if ( res )
+            {
+                vdbconf_msg( dlg, Tui_Rect( 5, 5, 120, 6 ), "project successfully updated" );
+                
+                std::ostringstream question; 
+                question << "do you want to change the location?";
+                if ( vdbconf_question( dlg, Tui_Rect( 5, 5, 120, 6 ), question.str().c_str() ) )
+                {
+                    uint32_t id; /* we have to find out the id of the imported/existing repository */
+                    if ( m.get_id_of_ngc_obj( ngc, &id ) )            
+                        on_pick_protected_location( dlg, id );
+                    else
+                        vdbconf_msg( dlg, Tui_Rect( 5, 5, 120, 6 ), "cannot find the imported repostiory" );
+                }
+                m.commit();
+                update_view( dlg );
+            }
+            else
+                vdbconf_msg( dlg, Tui_Rect( 5, 5, 120, 6 ), "there was an internal error importing the ngc-object" );
+        }
+        else
+            vdbconf_msg( dlg, Tui_Rect( 5, 5, 120, 6 ), "the import was canceled" );
+    }
+    return res;
+}
+
+
+bool vdbconf_controller::import_this_ngc( Dlg &dlg, vdbconf_model &m, const KNgcObj * ngc )
+{
+    bool res = false;
+
+    std::string location_base = m.get_user_default_dir();
+    std::string location = m.get_ngc_root( location_base, ngc );
+    ESetRootState es = m.prepare_repo_directory( location );
+    switch ( es )
+    {
+        case eSetRootState_OK               :  res = import_this_ngc_into_this_location( dlg, m, location, ngc );
+                                                break;
+
+        case eSetRootState_OldNotEmpty      :  if ( vdbconf_question( dlg, Tui_Rect( 5, 5, 120, 6 ),
+                                                                       "repository location is not empty, use it?" ) )
+                                                {
+                                                    es = m.prepare_repo_directory( location, true );
+                                                    if ( es == eSetRootState_OK )
+                                                        res = import_this_ngc_into_this_location( dlg, m, location, ngc );
+                                                    else
+                                                        res = on_set_location_error( dlg, es );
+                                                }
+                                                break;
+
+        default : res = on_set_location_error( dlg, es ); break;
+    }
+    return res;
+}
+
+
+std::string vdbconf_controller::get_import_ngc_start_dir( vdbconf_model &model )
+{
+    std::string res = model.get_home_dir();
+    if ( !model.does_path_exist( res ) )
+        res = model.get_current_dir();
+    return res;
+}
+
+
+bool vdbconf_controller::on_import_ngc( Dlg &dlg )
+{
+    bool res = false;
+    std::string start_dir = get_import_ngc_start_dir( priv_model );
+    /* ( 1 ) pick a ngc-file */
+    std::string picked = vdbconf_pick_file( dlg, dlg.center( 5, 5 ), start_dir.c_str(), "ngc" );
+    if ( picked.length() > 0 )
+    {
+        std::ostringstream question;
+        question << "do you want to import '" << picked << "' ?";
+        /* ( 2 ) confirm the choice */
+        if ( vdbconf_question( dlg, Tui_Rect( 5, 5, 120, 6 ), question.str().c_str() ) )
+        {
+            const KNgcObj * ngc;
+            if ( make_ngc_obj( &ngc, picked ) )
+            {
+                res = import_this_ngc( dlg, priv_model, ngc );
+                KNgcObjRelease( ngc );
+            }
+        }
+    }
+    return res;
+}
+
+
+std::string vdbconf_controller::change_dflt_import_path_start_dir( vdbconf_model &model )
+{
+    std::string res = model.get_user_default_dir();
+    if ( !model.does_path_exist( res ) )
+        res = model.get_home_dir();
+    if ( !model.does_path_exist( res ) )
+        res = model.get_current_dir();
+    return res;
+}
+
+
+bool vdbconf_controller::on_change_dflt_import_path( Dlg &dlg )
+{
+    bool res = false;
+
+    std::string path = change_dflt_import_path_start_dir( priv_model );
+
+    if ( priv_model.does_path_exist( path ) )
+        res = vdbconf_pick_dir( dlg, dlg.center( 5, 5 ), path );
+    else
+        res = vdbconf_input( dlg, Tui_Rect( 5, 5, 100, 6 ), "change default import path", path );
+
+    if ( res )
+    {
+        priv_model.set_user_default_dir( path.c_str() );
+        vdbconf_msg( dlg, Tui_Rect( 5, 5, 100, 6 ), "default import path changed" );
+    }
+    return res;
+}
+
+
+bool vdbconf_controller::change_proxy( Dlg &dlg )
+{
+	std::string proxy = priv_model.get_http_proxy_path();
+	bool res = vdbconf_input( dlg, Tui_Rect( 5, 5, 100, 6 ), "change proxy", proxy );
+	if ( res )
+	{
+		priv_model.set_http_proxy_path( proxy.c_str() );
+		dlg.SetWidgetCaption( ID_L_PROXY, proxy );
+	}
+	return res;
+}
+
+bool vdbconf_controller::on_set_location_error( Dlg &dlg, ESetRootState s )
+{
+    bool result = false;
+    Tui_Rect r( 5, 5, 100, 6 );
+    switch ( s )
+    {
+        case eSetRootState_NotChanged       : result = true; break;
+        case eSetRootState_NotUnique        : vdbconf_msg( dlg, r, "location not unique, select a different one" ); break;
+        case eSetRootState_MkdirFail        : vdbconf_msg( dlg, r, "could not created directory, maybe permisson problem" ); break;
+        case eSetRootState_NewPathEmpty     : vdbconf_msg( dlg, r, "you gave me an empty path" ); break;
+        case eSetRootState_NewDirNotEmpty   : vdbconf_msg( dlg, r, "the given location is not empty" ); break;
+        case eSetRootState_NewNotDir        : vdbconf_msg( dlg, r, "new location is not a directory" ); break;
+        case eSetRootState_Error            : vdbconf_msg( dlg, r, "error changing location" ); break;
+        default                             : vdbconf_msg( dlg, r, "unknow enum" ); break;
+    }
+    return result;
+}
+
+
+bool vdbconf_controller::on_pick_public_location( Dlg &dlg )
+{
+    bool res = false;
+	std::string path = public_location_start_dir( priv_model );
+	
+	if ( priv_model.does_path_exist( path ) )
+		res = vdbconf_pick_dir( dlg, dlg.center( 5, 5 ), path );
+	else
+		res = vdbconf_input( dlg, Tui_Rect( 5, 5, 100, 6 ), "location of public cache", path );
+	
+    if ( res && path.length() > 0 )
+    {
+        std::ostringstream question;
+        question << "do you want to change the location to '" << path << "' ?";
+        if ( vdbconf_question( dlg, Tui_Rect( 5, 5, 120, 6 ), question.str().c_str() ) )
+        {
+            bool flushOld = false;
+            bool reuseNew = false;
+            ESetRootState s = priv_model.set_public_location( flushOld, path, reuseNew );
+            switch ( s )
+            {
+                case eSetRootState_OK               :  dlg.SetWidgetCaption( ID_L_PUBLIC_LOC, path );
+                                                        res = true;
+                                                        break;
+
+                case eSetRootState_OldNotEmpty      : if ( vdbconf_question( dlg, Tui_Rect( 5, 5, 120, 6 ),
+                                                                        "prev. location is not empty, flush it?" ) )
+                                                        {
+                                                            flushOld = true;
+                                                            s = priv_model.set_public_location( flushOld, path, reuseNew );
+                                                            res = ( s == eSetRootState_OK );
+                                                            if ( res )
+                                                                dlg.SetWidgetCaption( ID_L_PUBLIC_LOC, path );
+                                                            else
+                                                                res = on_set_location_error( dlg, s );
+                                                        }
+                                                        break;
+
+                default : res = on_set_location_error( dlg, s ); break;
+            }
+        }
+    }
+    return res;
+}
+
+
+bool vdbconf_controller::on_pick_protected_location( Dlg &dlg, uint32_t id )
+{
+    bool res = false;
+	std::string path = protected_location_start_dir( priv_model, id );
+
+	if ( priv_model.does_path_exist( path ) )
+		res = vdbconf_pick_dir( dlg, dlg.center( 5, 5 ), path );
+	else
+		res = vdbconf_input( dlg, Tui_Rect( 5, 5, 100, 6 ), "location of dbGaP project", path );
+
+    if ( res && path.length() > 0 )
+    {
+        std::ostringstream question;
+        question << "do you want to change the loction of '" << priv_model.get_repo_name( id ) <<"' to '" << path << "' ?";
+        if ( vdbconf_question( dlg, Tui_Rect( 5, 5, 120, 6 ), question.str().c_str() ) )
+        {
+            bool flushOld = false;
+            bool reuseNew = false;
+            ESetRootState s = priv_model.set_repo_location( id, flushOld, path, reuseNew );
+            switch ( s )
+            {
+                case eSetRootState_OK               :  dlg.SetWidgetCaption( ID_L_PROT_LOC + id, path );
+                                                        res = true;
+                                                        break;
+
+                case eSetRootState_OldNotEmpty      :  if ( vdbconf_question( dlg, Tui_Rect( 5, 5, 120, 6 ),
+                                                                        "prev. location is not empty, flush it?" ) )
+                                                        {
+                                                            flushOld = true;
+                                                            s = priv_model.set_repo_location( id, flushOld, path, reuseNew );
+                                                            res = ( s == eSetRootState_OK );
+                                                            if ( res )
+                                                                dlg.SetWidgetCaption( ID_L_PROT_LOC + id, path );
+                                                            else
+                                                                res = on_set_location_error( dlg, s );
+                                                        }
+                                                        break;
+
+                default : res = on_set_location_error( dlg, s ); break;
+            }
+        }
+    }
+    return res;
+}
+
+
+bool vdbconf_controller::on_protected_repo( Dlg &dlg, Tui_Dlg_Event &dev )
+{
+    bool res = false;
+    uint32_t id = dev.get_widget_id();
+    if ( id >= ID_B_PROT_LOC && id < ( ID_B_PROT_LOC + 100 ) )
+    {
+        vdbconf_model &m( priv_model );
+        uint32_t repo_id = ( id - ID_B_PROT_LOC );
+        if ( repo_id < m.get_repo_count() )
+            res = on_pick_protected_location( dlg, repo_id );
+    }
+    return res;
+}
+
+
+bool vdbconf_controller::on_select( Dlg &dlg, void * data, Tui_Dlg_Event &dev )
+{
+    bool res = false;
+    vdbconf_model &m( vdbconf_controller::priv_model );
+    switch( dev.get_widget_id() )
+    {
+        case ID_B_SAVE          : res = on_save( dlg ); break;    
+        case ID_B_EXIT          : res = on_exit( dlg ); break;    
+        case ID_B_RELOAD        : res = on_reload( dlg ); break;    
+        case ID_B_FACT_DFLT     : res = on_fact_dflt( dlg ); break;    
+
+        case ID_CB_REMOTE : m.set_remote_enabled( dev.get_value_1() == 1 ); res = true; break;
+        case ID_CB_CACHED : m.set_global_cache_enabled( dev.get_value_1() == 1 ); res = true; break;
+
+        case ID_CB_SITE   : if ( priv_model.does_site_repo_exist() )
+                                m.set_site_enabled( dev.get_value_1() == 1 );
+                             res = true;
+                             break;
+
+		case ID_CB_PROXY  : m.set_http_proxy_enabled( dev.get_value_1() == 1 ); res = true; break;
+		case ID_B_PROXY   : res = change_proxy( dlg ); break;
+		
+        case ID_B_PUBLIC_LOC : res = on_pick_public_location( dlg ); break;
+
+        case ID_B_IMPORT_NGC : res = on_import_ngc( dlg ); break;
+        case ID_B_USR_DFLT_PATH : res = on_change_dflt_import_path( dlg ); break;
+
+        default : res = on_protected_repo( dlg, dev ); break;
+    }
+    return res;
+};
+
+
+void vdbconf_controller::on_focused_protected_repo( Dlg &dlg, uint32_t widget_id )
+{
+    if ( widget_id >= ID_B_PROT_LOC && widget_id < ( ID_B_PROT_LOC + 100 ) )
+        status_txt( dlg, FOCUS_TXT_B_PROT_LOC );
+    else
+        status_txt( dlg, "???" );
+}
+
+
+bool vdbconf_controller::on_focused( Dlg &dlg, uint32_t widget_id )
+{
+    if ( widget_id > 1000 ) return false;
+
+    switch( widget_id )
+    {
+        case ID_B_SAVE          : status_txt( dlg, FOCUS_TXT_B_SAVE ); break;    
+        case ID_B_EXIT          : status_txt( dlg, FOCUS_TXT_B_EXIT ); break;    
+        case ID_B_RELOAD        : status_txt( dlg, FOCUS_TXT_B_RELOAD ); break;    
+        case ID_B_FACT_DFLT     : status_txt( dlg, FOCUS_TXT_B_FACT_DFLT ); break;    
+
+        case ID_CB_REMOTE       : status_txt( dlg, FOCUS_TXT_CB_REMOTE ); break;
+        case ID_CB_CACHED       : status_txt( dlg, FOCUS_TXT_CB_CACHED ); break;
+        case ID_CB_SITE         : status_txt( dlg, FOCUS_TXT_CB_SITE ); break;
+		case ID_CB_PROXY        : status_txt( dlg, FOCUS_TXT_CB_PROXY ); break;
+		case ID_B_PROXY         : status_txt( dlg, FOCUS_TXT_B_PROXY ); break;
+		
+        case ID_B_PUBLIC_LOC    : status_txt( dlg, FOCUS_TXT_B_PUBLIC_LOC ); break;
+        case ID_B_IMPORT_NGC    : status_txt( dlg, FOCUS_TXT_B_IMPORT_NGC ); break;
+        case ID_B_USR_DFLT_PATH : status_txt( dlg, FOCUS_TXT_B_USR_DFLT_PATH ); break;
+
+        default : on_focused_protected_repo( dlg, widget_id ); break;
+    }
+    return false;
+}
+
+/* ------------------------------------------------------------------------------------------------------------------------------------- */
+
+extern "C"
+{
+    rc_t run_interactive ( vdbconf_model & model )
+    {
+        try
+        {
+            /* (2) ... create derived view, the view creates the widgets in its constructor... */
+            vdbconf_view view( model );
+        
+            /* (3) ... create derived controller, hand it the view and the model*/
+            vdbconf_controller controller( view, model );
+
+            /* (4) ... let the controller handle the events */
+            controller.run();
+
+            /* (5) call this before leaving main() to terminate the low-level driver... */
+            Tui::clean_up();
+        }
+        catch ( ... )
+        {
+            return RC( rcExe, rcNoTarg, rcExecuting, rcNoObj, rcUnknown );
+        }
+        return 0;
+    }
+}
diff --git a/tools/vdb-config/interactive.h b/tools/vdb-config/interactive.h
new file mode 100644
index 0000000..da16088
--- /dev/null
+++ b/tools/vdb-config/interactive.h
@@ -0,0 +1,50 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_interacive_
+#define _h_interacive_
+
+#include "vdb-config-model.hpp" // vdbconf_model
+
+#ifndef _h_kfc_defs_
+#include <kfc/defs.h>
+#endif
+
+#ifndef _h_vdb_config_model_
+#include "vdb-config-model.hpp"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    rc_t run_interactive ( vdbconf_model & model );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _h_interacive_ */
diff --git a/tools/vdb-config/util.cpp b/tools/vdb-config/util.cpp
new file mode 100644
index 0000000..47336ab
--- /dev/null
+++ b/tools/vdb-config/util.cpp
@@ -0,0 +1,1125 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "util.hpp" // CStdIn
+#include <klib/printf.h> /* string_printf */
+
+#include <sstream> // ostringstream
+
+#include <climits> /* PATH_MAX */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+using std::string;
+
+rc_t CStdIn::Read(char *buffer, size_t bsize, size_t *num_read) {
+    size_t dummy = 0;
+    if (num_read == NULL) {
+if (DEBUG) OUTMSG(("<<< Read: num_read == NULL\n"));
+        num_read = &dummy;
+    }
+
+    if (bsize == 0) {
+        *num_read = 0;
+        return 0;
+    }
+
+    rc_t rc = KFileRead(m_Self, m_Pos, buffer, bsize, num_read);
+    if (rc == 0) {
+        m_Pos += *num_read;
+        size_t last = *num_read;
+        if (*num_read >= bsize) {
+            last = bsize - 1;
+        }
+
+        while (true) {
+            buffer[last] = '\0';
+            if (last == 0) {
+                break;
+            }
+            --last;
+            if (buffer[last] != '\n' && buffer[last] != '\r') {
+                break;
+            }
+            --*num_read;
+        }
+    }
+
+if (DEBUG) OUTMSG(("<<< Read: num_read = %d\n", *num_read));
+
+return rc;
+}
+
+rc_t CKDirectory::CanWriteFile(const CString &dir, bool verbose) const {
+    bool ok = true;
+    rc_t rc = 0;
+    char path[PATH_MAX] = "";
+    if (verbose) {
+        OUTMSG(("checking whether %S is writable... ", dir.Get()));
+    }
+    for (int i = 0; i < 10000 && rc == 0; ++i) {
+        size_t path_len = 0;
+        rc = string_printf(path, sizeof path, &path_len,
+            "%S/.tmp%d.tmp", dir.Get(), i);
+        if (rc != 0) {
+            break;
+        }
+        assert(path_len <= sizeof path);
+        if (Exists(path)) {
+            KDirectoryRemove(m_Self, false, path);
+        }
+        else {
+            KFile *f = NULL;
+            rc = KDirectoryCreateFile(m_Self,
+                &f, false, m_PrivateAccess, kcmCreate, path);
+            if (rc == 0) {
+                rc = KFileWrite(f, 0, path, path_len, NULL);
+            }
+            RELEASE(KFile, f);
+            const KFile *cf = NULL;
+            if (rc == 0) {
+                rc = KDirectoryOpenFileRead(m_Self, &cf, path);
+            }
+            char buffer[PATH_MAX] = "";
+            size_t num_read = 0;
+            if (rc == 0) {
+                rc = KFileRead(cf, 0, buffer, sizeof buffer, &num_read);
+            }
+            if (rc == 0) {
+                if (path_len != num_read || string_cmp(path,
+                    path_len, buffer, num_read, sizeof buffer) != 0)
+                {
+                    if (verbose) {
+                        OUTMSG(("no\n"));
+                    }
+                    OUTMSG(("Warning: "
+                        "NCBI Home directory is not writable"));
+                    ok = false;
+                }
+            }
+            RELEASE(KFile, cf);
+            if (rc == 0) {
+                KDirectoryRemove(m_Self, false, path);
+            }
+            break;
+        }
+    }
+    if (verbose && ok) {
+        if (rc == 0) {
+            OUTMSG(("yes\n"));
+        }
+        else {
+            OUTMSG(("failed\n"));
+        }
+    }
+    return rc;
+}
+
+rc_t CKDirectory::CheckAccess(const CString &path,
+    bool &updated, bool isPrivate, bool verbose) const
+{
+    updated = false;
+    const String *str = path.Get();
+    if (str == NULL) {
+        return 0;
+    }
+    uint32_t access = 0;
+    if (verbose) {
+        OUTMSG(("checking %S file mode... ", path.Get()));
+    }
+    rc_t rc = KDirectoryAccess(m_Self, &access, str->addr);
+    if (rc != 0) {
+        OUTMSG(("failed\n"));
+    }
+    else {
+        if (verbose) {
+            OUTMSG(("%o\n", access));
+        }
+        if (isPrivate) {
+            if (access != m_PrivateAccess) {
+                uint32_t access = 0777;
+                if (verbose) {
+                    OUTMSG(("updating %S to %o... ", str, access));
+                }
+                rc = KDirectorySetAccess(m_Self, false,
+                    m_PrivateAccess, access, str->addr);
+                if (rc == 0) {
+                    OUTMSG(("ok\n"));
+                    updated = true;
+                }
+                else {
+                    OUTMSG(("failed\n"));
+                }
+            }
+        }
+        else {
+            if ((access & m_PrivateAccess) != m_PrivateAccess) {
+                uint32_t access = 0700;
+                if (verbose) {
+                    OUTMSG(("updating %S to %o... ", str, access));
+                }
+                rc = KDirectorySetAccess(m_Self, false,
+                    m_PrivateAccess, access, str->addr);
+                if (rc == 0) {
+                    OUTMSG(("ok\n"));
+                    updated = true;
+                }
+                else {
+                    OUTMSG(("failed\n"));
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t CKDirectory::CreateNonExistingDir(bool verbose,
+    uint32_t access, const char *path, va_list args) const
+{
+    char str[PATH_MAX] = "";
+    rc_t rc = string_vprintf(str, sizeof str, NULL, path, args);
+    if (rc != 0) {
+        OUTMSG(("error: cannot generate path string\n"));
+        return rc;
+    }
+
+    return CreateNonExistingDir(str, access, verbose, true);
+}
+
+rc_t CKDirectory::CreateNonExistingDir(const string &path,
+    uint32_t access, bool verbose, bool checkExistance) const
+{
+    const char *str = path.c_str();
+
+    if (checkExistance) {
+        if (verbose) {
+            OUTMSG(("checking whether %s exists... ", str));
+        }
+        if (Exists(str)) {
+            if (verbose) {
+                OUTMSG(("found\n"));
+            }
+            return 0;
+        }
+    }
+
+    if (verbose) {
+        OUTMSG(("creating... "));
+    }
+
+    rc_t rc = KDirectoryCreateDir(m_Self, access,
+        (kcmCreate | kcmParents), str);
+    if (verbose) {
+        if (rc == 0) {
+            OUTMSG(("ok\n"));
+        }
+        else {
+            OUTMSG(("failed\n"));
+        }
+    }
+
+    return rc;
+}
+
+rc_t CKDirectory::CreateNonExistingDir(const CString &path,
+    uint32_t access, bool verbose) const
+{
+    const String *str = path.Get();
+    if (str == NULL) {
+        return 0;
+    }
+
+    if (verbose) {
+        OUTMSG(("checking whether %S exists... ", str));
+    }
+
+    if (Exists(str->addr)) {
+        if (verbose) {
+            OUTMSG(("found\n"));
+        }
+        return 0;
+    }
+
+    if (verbose) {
+        OUTMSG(("creating... "));
+    }
+
+    rc_t rc = KDirectoryCreateDir(m_Self, access,
+        (kcmCreate | kcmParents), str->addr);
+    if (verbose) {
+        if (rc == 0) {
+            OUTMSG(("ok\n"));
+        }
+        else {
+            OUTMSG(("failed\n"));
+        }
+    }
+
+    return rc;
+}
+
+rc_t CKConfig::Commit(void) const {
+    if (!m_Updated) {
+        return 0;
+    }
+
+    return KConfigCommit(m_Self);
+}
+
+rc_t CKConfig::CreateRemoteRepositories(bool fix) {
+    rc_t rc = UpdateNode("/repository/remote/main/CGI/resolver-cgi",
+        "http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi");
+
+    if (fix) {
+        const string name("/repository/remote/main/CGI/disabled");
+        if (NodeExists(name)) {
+            rc_t r2 = UpdateNode(name.c_str(), "false");
+            if (r2 != 0 && rc == 0) {
+                rc = r2;
+            }
+        }
+    }
+
+    rc_t r2 = UpdateNode("/repository/remote/aux/NCBI/root",
+        "http://sra-download.ncbi.nlm.nih.gov");
+    if (r2 != 0 && rc == 0) {
+        rc = r2;
+    }
+
+    r2 = UpdateNode(
+        "/repository/remote/aux/NCBI/apps/nakmer/volumes/fuseNAKMER",
+        "sadb");
+    if (r2 != 0 && rc == 0) {
+        rc = r2;
+    }
+
+    r2 = UpdateNode(
+        "/repository/remote/aux/NCBI/apps/nannot/volumes/fuseNANNOT",
+        "sadb");
+    if (r2 != 0 && rc == 0) {
+        rc = r2;
+    }
+
+    r2 = UpdateNode("/repository/remote/aux/NCBI/apps/refseq/volumes/refseq",
+        "refseq");
+    if (r2 != 0 && rc == 0) {
+        rc = r2;
+    }
+
+    r2 = UpdateNode("/repository/remote/aux/NCBI/apps/sra/volumes/flat",
+        "srapub");
+    if (r2 != 0 && rc == 0) {
+        rc = r2;
+    }
+
+    r2 = UpdateNode("/repository/remote/aux/NCBI/apps/wgs/volumes/fuseWGS",
+        "wgs");
+    if (r2 != 0 && rc == 0) {
+        rc = r2;
+    }
+
+    if (fix) {
+        const string name("/repository/remote/aux/NCBI/disabled");
+        if (NodeExists(name)) {
+            rc_t r2 = UpdateNode(name.c_str(), "false");
+            if (r2 != 0 && rc == 0) {
+                rc = r2;
+            }
+        }
+    }
+
+    r2 = UpdateNode("/repository/remote/protected/CGI/resolver-cgi",
+        "http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi");
+    if (r2 != 0 && rc == 0) {
+        rc = r2;
+    }
+
+    if (fix) {
+        const string name("/repository/remote/disabled");
+        if (NodeExists(name)) {
+            rc_t r2 = UpdateNode(name.c_str(), "false");
+            if (r2 != 0 && rc == 0) {
+                rc = r2;
+            }
+        }
+    }
+
+    return rc;
+}
+
+rc_t CKConfig::CreateUserRepository(string repoName, bool fix) {
+    if (repoName.size() == 0) {
+        repoName = "public";
+    }
+    CString cRoot(ReadString("/repository/user/default-path"));
+    string root;
+    if (cRoot.Empty()) {
+        root = "$(HOME)/ncbi";
+    }
+    else {
+        root = cRoot.GetString();
+    }
+
+    std::ostringstream s;
+    s << "/repository/user/" << (repoName == "public" ? "main" : "protected")
+        << "/" << repoName;
+    string repoNode(s.str());
+    string name(repoNode + "/root");
+    bool toFix = true;
+    if (fix) {
+        toFix = !NodeExists(name);
+    }
+    rc_t rc = 0;
+    if (toFix) {
+        rc = UpdateNode(name, (root + "/public").c_str());
+    }
+
+    rc_t r2 = UpdateNode(repoNode + "/apps/file/volumes/flat", "files");
+    if (r2 != 0 && rc == 0) {
+        rc = r2;
+    }
+
+    r2 = UpdateNode(repoNode + "/apps/sra/volumes/sraFlat", "sra");
+    if (r2 != 0 && rc == 0) {
+        rc = r2;
+    }
+
+    if (repoName == "public") {
+        r2 = UpdateNode(repoNode + "/apps/nakmer/volumes/nakmerFlat", "nannot");
+        if (r2 != 0 && rc == 0) {
+            rc = r2;
+        }
+
+        r2 = UpdateNode(repoNode + "/apps/nannot/volumes/nannotFlat", "nannot");
+        if (r2 != 0 && rc == 0) {
+            rc = r2;
+        }
+
+        r2 = UpdateNode(repoNode + "/apps/refseq/volumes/refseq", "refseq");
+        if (r2 != 0 && rc == 0) {
+            rc = r2;
+        }
+
+        r2 = UpdateNode(repoNode + "/apps/wgs/volumes/wgsFlat", "wgs");
+        if (r2 != 0 && rc == 0) {
+            rc = r2;
+        }
+    }
+
+    r2 = UpdateNode(repoNode + "/cache-enabled", "true");
+    if (r2 != 0 && rc == 0) {
+        rc = r2;
+    }
+
+    return rc;
+}
+
+rc_t CKConfig::DisableRemoteRepository(bool disable) {
+    const char *value = disable ? "true" : "false";
+    rc_t rc = UpdateNode(m_RepositoryRemoteMainDisabled, value);
+
+    rc_t r2 = UpdateNode(m_RepositoryRemoteAuxDisabled, value);
+    if (r2 != 0 && rc == 0) {
+        rc = r2;
+    }
+
+    return rc;
+}
+
+bool CKConfig::IsRemoteRepositoryDisabled(void) const {
+    const CString disabled(ReadString(m_RepositoryRemoteMainDisabled));
+
+    if (disabled.Equals("true")) {
+        const CString disabled(ReadString(m_RepositoryRemoteAuxDisabled));
+        return disabled.Equals("true");
+    }
+
+    return false;
+}
+
+bool CKConfig::NodeExists(const string &path) const {
+    const KConfigNode *n = OpenNodeRead(path.c_str());
+    if (n == NULL) {
+        return false;
+    }
+    KConfigNodeRelease(n);
+    return true;
+}
+
+const KConfigNode* CKConfig::OpenNodeRead(const char *path, ...) const {
+    va_list args;
+    va_start(args, path);
+
+    const KConfigNode *node = NULL;
+    rc_t rc = KConfigVOpenNodeRead(m_Self, &node, path, args);
+
+    va_end(args);
+
+    if (rc != 0) {
+        return NULL;
+    }
+
+    return node;
+}
+
+const String* CKConfig::ReadString(const char *path) const {
+    String *result = NULL;
+    rc_t rc = KConfigReadString(m_Self, path, &result);
+
+    if (rc != 0) {
+        return NULL;
+    }
+    return result;
+}
+
+void CKConfig::Reload(bool verbose) {
+    if (verbose) {
+        OUTMSG(("reloading configuration... "));
+    }
+
+    rc_t rc = KConfigRelease(m_Self);
+    m_Self = NULL;
+
+    if (rc == 0) {
+        rc = KConfigMake(&m_Self, NULL);
+    }
+
+    if (rc == 0) {
+        if (verbose) {
+            OUTMSG(("ok\n"));
+        }
+    }
+    else {
+        if (verbose) {
+            OUTMSG(("failed\n"));
+        }
+        throw rc;
+    }
+}
+
+rc_t CKConfig::UpdateNode(const char *path,
+    const char *buffer, bool verbose, size_t size)
+{
+    if (DEBUG) {
+        OUTMSG(("CKConfig::UpdateNode(%s, %s, %d)\n", path, buffer, size));
+    }
+
+    if (verbose) {
+        OUTMSG(("%s = ... ", path));
+    }
+
+    if (size == (size_t)~0) {
+        size = string_size(buffer);
+    }
+
+    KConfigNode *node = NULL;
+    rc_t rc = KConfigOpenNodeUpdate(m_Self, &node, path);
+// TODO do not write empty node if node itself is empty
+    if (rc == 0) {
+        rc = KConfigNodeWrite(node, buffer, size);
+    }
+    if (rc == 0) {
+        m_Updated = true;
+    }
+    RELEASE(KConfigNode, node);
+
+    if (rc == 0) {
+        if (verbose) {
+            OUTMSG(("\"%s\"\n", buffer));
+        }
+    }
+    else {
+        if (verbose) {
+            OUTMSG(("failed: %R\n", buffer, rc));
+        }
+        else {
+            OUTMSG(("%s = ... failed: %R\n", path, rc));
+        }
+    }
+
+    return rc;
+}
+
+rc_t CKConfig::UpdateUserRepositoryRootPath(const CString &path) {
+    const String *str = path.Get();
+
+    if (str == NULL) {
+        return 0;
+    }
+    return UpdateUserRepositoryRootPath(str->addr, str->size);
+}
+
+rc_t StringRelease(const String *self) {
+    free((void*)self);
+    return 0;
+}
+
+rc_t CSplitter::Test(void) {
+    String s;
+    {   StringInit(&s, NULL, 0, 0);
+        CSplitter p(&s);
+        assert(!p.HasNext());
+    }
+    {   CONST_STRING(&s, "");
+        CSplitter p(&s);
+        assert(!p.HasNext());
+    }
+    {
+        CONST_STRING(&s, "a");
+        CSplitter p(&s);
+        assert(p.HasNext());
+        assert(p.Next() == "a");
+        assert(!p.HasNext());
+    }
+    {
+        CONST_STRING(&s, "a:");
+        CSplitter p(&s);
+        assert(p.HasNext());
+        assert(p.Next() == "a");
+        assert(!p.HasNext());
+    }
+    {
+        CONST_STRING(&s, "a::");
+        CSplitter p(&s);
+        assert(p.HasNext());
+        assert(p.Next() == "a");
+        assert(!p.HasNext());
+    }
+    {
+        CONST_STRING(&s, "::a::");
+        CSplitter p(&s);
+        assert(p.HasNext());
+        assert(p.Next() == "a");
+        assert(!p.HasNext());
+    }
+    {
+        CONST_STRING(&s, "aa:bbb");
+        CSplitter p(&s);
+        assert(p.HasNext());
+        assert(p.Next() == "aa");
+        assert(p.HasNext());
+        assert(p.Next() == "bbb");
+        assert(!p.HasNext());
+    }   return 0;
+}
+
+CUserConfigData::CUserConfigData(const CUserRepositories &repos,
+        const CString &dflt)
+    : m_DefaultRoot(dflt.GetString())
+    , m_CurrentRoot(repos.GetMainPublicRoot())
+    , m_CacheEnabled(repos.IsMainPublicCacheEnabled())
+{}
+
+rc_t CKDirectory::CreateNonExistingPublicDir(bool verbose,
+    const char *path, ...) const
+{
+    va_list args;
+    va_start(args, path);
+
+    rc_t rc = CreateNonExistingDir(verbose, m_PublicAccess, path, args);
+
+    va_end(args);
+
+    return rc;
+}
+
+bool CKDirectory::IsDirectory(const char *path, ...) const {
+    va_list args;
+    va_start(args, path);
+
+    KPathType type = KDirectoryVPathType(m_Self, path, args);
+
+    va_end(args);
+
+    return type == kptDir;
+}
+
+bool CKDirectory::Exists(const CString &path) const {
+    const String *str = path.Get();
+
+    if (str == NULL) {
+        return false;
+    }
+    return Exists(str->addr);
+}
+
+rc_t CKDirectory::CheckPublicAccess(const CString &path, bool verbose) const {
+    bool updated = false;
+    return CheckAccess(path, updated, false, verbose);
+}
+
+rc_t CKConfig::UpdateNode(bool verbose,
+    const char *value, const char *name, ...)
+{
+    va_list args;
+    va_start(args, name);
+
+    char dst[4096] = "";
+    size_t num_writ = 0;
+    rc_t rc = string_vprintf(dst, sizeof dst, &num_writ, name, args);
+    if (rc == 0) {
+        rc = UpdateNode(dst, value, verbose);
+    }
+
+    va_end(args);
+
+    return rc;
+}
+
+CApp::CApp(const CKDirectory &dir, const CKConfigNode &rep,
+        const string &root, const string &name)
+    : m_HasVolume(false)
+    , m_AppVolPath("apps/" + name + "/volumes")
+{
+    const KConfigNode *vols = rep.OpenNodeRead(m_AppVolPath);
+    KNamelist *typeNames = NULL;
+    rc_t rc = KConfigNodeListChildren(vols, &typeNames);
+    if (rc != 0) {
+        return;
+    }
+    uint32_t count = 0;
+    rc = KNamelistCount(typeNames, &count);
+    if (rc == 0) {
+        for (uint32_t idx = 0; idx < count; ++idx) {
+            const char *typeName = NULL;
+            rc = KNamelistGet(typeNames, idx, &typeName);
+            if (rc != 0) {
+                continue;
+            }
+            const KConfigNode *alg = NULL;
+            rc = KConfigNodeOpenNodeRead(vols, &alg, typeName);
+            if (rc != 0) {
+                continue;
+            }
+            String *volList = NULL;
+            rc = KConfigNodeReadString(alg, &volList);
+            if (rc == 0) {
+                if (volList != NULL && volList->addr != NULL) {
+                    m_Volumes[typeName]
+                        = CAppVolume(typeName, volList->addr);
+                }
+                CSplitter volArray(volList);
+                while (volArray.HasNext()) {
+                    const string vol(volArray.Next());
+                    if (dir.IsDirectory("%s/%s", root.c_str(), vol.c_str()))
+                    {
+                        m_HasVolume = true;
+                        break;
+                    }
+                }
+            }
+            RELEASE(String, volList);
+            RELEASE(KConfigNode, alg);
+        }
+    }
+    RELEASE(KNamelist, typeNames);
+    RELEASE(KConfigNode, vols);
+}
+
+rc_t CRepository::Update(CKConfig &kfg, string &node, bool verbose) {
+    char root[4096] = "";
+    rc_t rc = string_printf(root, sizeof root, NULL, "/repository/%s/%s/%s",
+        m_Category.c_str(), m_SubCategory.c_str(), m_Name.c_str());
+    if (rc != 0) {
+        OUTMSG(("ERROR\n"));
+        return rc;
+    }
+
+    if (DEBUG) {
+        OUTMSG(("CRepository::Update: root = %s\n", root));
+    }
+
+    node.assign(root);
+
+    for (CApps::TCI it = m_Apps.begin(); it != m_Apps.end(); ++it) {
+        rc_t r2 = (*it).second->Update(kfg, root, verbose);
+        if (r2 != 0 && rc == 0) {
+            rc = r2;
+        }
+    }
+
+    rc_t r2 = kfg.UpdateNode(verbose, m_Root.c_str(), "%s/root", root);
+    if (r2 != 0 && rc == 0) {
+        rc = r2;
+    }
+
+    return rc;
+}
+
+CRepository::CRepository(const string &category, const string &type,
+        const string &name, const string &root)
+    : m_Disabled(false)
+    , m_Category(category)
+    , m_SubCategory(type)
+    , m_Name(name)
+    , m_Root(root)
+{}
+
+CRepository::CRepository(const CKDirectory &dir, const CKConfigNode &repo,
+        const string &category, const string &subCategory,
+        const string &name)
+    : m_Disabled(false)
+    , m_Category(category)
+    , m_SubCategory(subCategory)
+    , m_Name(name)
+    , m_Root(repo.ReadString("root"))
+{
+    m_Apps.Update(dir, repo, m_Root, "sra");
+    m_Apps.Update(dir, repo, m_Root, "refseq");
+    string disabled(repo.ReadString("disabled"));
+    if (disabled == "true") {
+        m_Disabled = true;
+    }
+}
+
+string CRepository::Dump(void) const {
+    char node[4096] = "";
+    rc_t rc = string_printf(node, sizeof node, NULL,
+        "/repository/%s/%s/%s", m_Category.c_str(),
+        m_SubCategory.c_str(), m_Name.c_str(), m_Root.c_str());
+    if (rc != 0) {
+        OUTMSG(("ERROR\n"));
+        return "";
+    }
+
+    for (CApps::TCI it = m_Apps.begin(); it != m_Apps.end(); ++it) {
+        (*it).second->Dump(node);
+    }
+
+    if (m_Root.size() > 0) {
+        OUTMSG(("%s/root = \"%s\"\n", node, m_Root.c_str()));
+    }
+
+    return node;
+}
+
+bool CRepository::Is(const string &subCategory, const string &name)
+    const
+{
+    if (name.size() <= 0) {
+        return m_SubCategory == subCategory;
+    }
+
+    return m_SubCategory == subCategory && m_Name == name;
+}
+
+string CRemoteRepository::GetRoot(const string &stack, char needle)
+{
+    if (EndsWith(stack, needle)) {
+        return "";
+    }
+    else {
+        return stack;
+    }
+}
+
+string CRemoteRepository::GetCgi(const string &stack, char needle)
+{
+    if (EndsWith(stack, needle)) {
+        return stack;
+    }
+    else {
+        return "";
+    }
+}
+
+bool CRemoteRepository::EndsWith(const string &stack, char needle) {
+    if (stack.size() <= 0) {
+        return false;
+    }
+    return stack[stack.size() - 1] == needle;
+}
+
+rc_t CRemoteRepository::Fix(CKConfig &kfg, bool disable, bool verbose) {
+    if (verbose) {
+        OUTMSG(("checking %s %s remote repository\n",
+            GetCategory().c_str(), GetSubCategory().c_str()));
+    }
+
+    Disable(disable);
+
+    if (Is("main")) {
+        m_ResolverCgi
+            = "http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi";
+        ClearApps();
+    }
+    else {
+        m_ResolverCgi = "";
+        FixApps();
+        SetRoot("http://ftp-trace.ncbi.nlm.nih.gov/sra");
+    }
+
+    return Update(kfg);
+}
+
+rc_t CUserRepository::Fix(CKConfig &kfg,
+    const CUserConfigData *data, const string *root)
+{
+    Disable(false);
+
+    if (DEBUG) {
+        OUTMSG((__FILE__ " CUserRepository::Fix: data = %d\n", data));
+    }
+
+    if (data != NULL) {
+        m_CacheEnabled = data->GetCacheEnabled();
+        const string root(data->GetCurrentRoot());
+        if (root.size() > 0) {
+            if (DEBUG) {
+                OUTMSG((__FILE__ " CUserRepository::Fix: SetRoot to %s\n",
+                    root.c_str()));
+            }
+            SetRoot(root);
+        }
+    }
+    else {
+        m_CacheEnabled = true;
+        assert(root);
+        SetRoot(*root);
+    }
+
+    FixApps();
+
+    return Update(kfg, DEBUG);
+}
+
+rc_t CUserRepositories::Load(const CKConfig &kfg, const CKDirectory &dir) {
+    const string category("main");
+
+    OUTMSG(("loading %s user repository... ", category.c_str()));
+    const KConfigNode *userNode = kfg.OpenNodeRead
+        ("/repository/user/%s", category.c_str());
+    if (userNode == NULL) {
+        OUTMSG(("not found\n"));
+        return 0;
+    }
+    const CKConfigNode user(userNode);
+    KNamelist *userNames = NULL;
+    rc_t rc  = KConfigNodeListChildren(userNode, &userNames);
+    if (rc != 0) {
+        OUTMSG(("failed\n"));
+    }
+    uint32_t count = 0;
+    if (rc == 0) {
+        rc = KNamelistCount(userNames, &count);
+    }
+    if (rc != 0) {
+        OUTMSG(("failed\n"));
+    }
+    for (uint32_t idx = 0; idx < count && rc == 0; ++idx) {
+        const char *userName = NULL;
+        rc = KNamelistGet(userNames, idx, &userName);
+        if (rc != 0) {
+            rc = 0;
+            continue;
+        }
+        OUTMSG(("%s ", userName));
+        const KConfigNode *userRepo = user.OpenNodeRead(userName);
+        if (userRepo == NULL) {
+            continue;
+        }
+        CKConfigNode node(userRepo);
+        push_back(new CUserRepository(dir, node, category, userName));
+    }
+    RELEASE(KNamelist, userNames);
+
+    if (rc == 0) {
+        OUTMSG(("ok\n"));
+    }
+    else {
+        OUTMSG(("failed\n"));
+    }
+
+    return rc;
+}
+
+const CUserRepository *CUserRepositories::FindMainPublic(void) const {
+    for (TCI it = begin(); it != end(); ++it) {
+        CUserRepository *r = *it;
+        assert(r);
+        if (DEBUG) {
+            OUTMSG(("MainPublic not found\n"));
+        }
+        if (r->Is("main", "public")) {
+            return r;
+        }
+    }
+
+    return NULL;
+}
+
+rc_t CUserRepositories::MkAppVolumes(const CKDirectory &dir, bool verbose)
+    const
+{
+    rc_t rc = 0;
+
+    for (TCI it = begin(); it != end(); ++it) {
+        CUserRepository *r = *it;
+        assert(r);
+        const string root(r->GetRoot());
+        if (root.size() <= 0) {
+            continue;
+        }
+
+        for (CApps::TCI it = r->AppsBegin(); it != r->AppsEnd(); ++it) {
+            const CApp *a = (*it).second;
+            assert(a);
+            //a->Dump("a->Dump");
+            for (CApp::TCAppVolumesCI it = a->VolumesBegin();
+                it != a->VolumesEnd(); ++it)
+            {
+                const CAppVolume &v((*it).second);
+                const string path(v.GetPath());
+                if (path.size() <= 0) {
+                    continue;
+                }
+                CSplitter s(path);
+                while (s.HasNext()) {
+                    rc_t r2 = dir.CreateNonExistingPublicDir
+                        (verbose, "%s/%s", root.c_str(), s.Next().c_str());
+                    if (r2 != 0 && rc == 0) {
+                        rc = r2;
+                    }
+                }
+            }
+        }
+    }
+
+    return rc;
+}
+
+rc_t CRemoteRepositories::Load(const CKConfig &kfg, const CKDirectory &dir) {
+    rc_t rc = 0;
+    for (int i = 0; i < 2; ++i) {
+        string category;
+        switch (i) {
+            case 0:
+                category = "main";
+                break;
+            case 1:
+                category = "aux";
+                break;
+            default:
+                assert(0);
+                break;
+        }
+        OUTMSG(("loading %s remote repository... ", category.c_str()));
+        const KConfigNode *remoteNode = kfg.OpenNodeRead
+            ("/repository/remote/%s", category.c_str());
+        if (remoteNode == NULL) {
+            OUTMSG(("not found\n"));
+            continue;
+        }
+        const CKConfigNode remote(remoteNode);
+        KNamelist *remoteNames = NULL;
+        rc  = KConfigNodeListChildren(remoteNode, &remoteNames);
+        if (rc != 0) {
+            OUTMSG(("failed\n"));
+        }
+        uint32_t count = 0;
+        if (rc == 0) {
+            rc = KNamelistCount(remoteNames, &count);
+        }
+        if (rc != 0) {
+            OUTMSG(("failed\n"));
+        }
+        for (uint32_t idx = 0; idx < count && rc == 0; ++idx) {
+            const char *remoteName = NULL;
+            rc = KNamelistGet(remoteNames, idx, &remoteName);
+            if (rc != 0) {
+                rc = 0;
+                continue;
+            }
+            OUTMSG(("%s ", remoteName));
+            const KConfigNode *remoteRepo = remote.OpenNodeRead(remoteName);
+            if (remoteRepo == NULL) {
+                continue;
+            }
+            CKConfigNode node(remoteRepo);
+            push_back(new CRemoteRepository(dir,
+                node, category, remoteName));
+        }
+        RELEASE(KNamelist, remoteNames);
+        if (rc == 0) {
+            OUTMSG(("ok\n"));
+        }
+        else {
+            OUTMSG(("failed\n"));
+        }
+    }
+    return rc;
+}
+
+void CRemoteRepositories::Fix(CKConfig &kfg, bool disable, bool verbose) {
+    CRemoteRepository *main = NULL;
+    CRemoteRepository *aux = NULL;
+    CRemoteRepository *protectd = NULL;
+
+    for (TCI it = begin(); it != end(); ++it) {
+        CRemoteRepository *r = *it;
+        assert(r);
+        bool toDisable = disable;
+        const string category(r->GetCategory());
+        if (category == "aux") {
+            aux = r;
+        }
+        else if (category == "main") {
+            main = r;
+        }
+        else if (category == "protected") {
+            protectd = r;
+            toDisable = false;
+        }
+        r->Fix(kfg, toDisable, verbose);
+    }
+
+    const string cgi
+        ("http://www.ncbi.nlm.nih.gov/Traces/names/names.cgi");
+    if (main == NULL) {
+        main = new CRemoteRepository("main", "CGI", cgi);
+        main->Fix(kfg, disable);
+        push_back(main);
+    }
+
+    if (aux == NULL) {
+        aux = new CRemoteRepository("aux", "NCBI",
+            "http://ftp-trace.ncbi.nlm.nih.gov/sra");
+        aux->Fix(kfg, disable);
+        push_back(aux);
+    }
+
+    if (protectd == NULL) {
+        protectd = new CRemoteRepository("protected", "CGI", cgi);
+        if (verbose) {
+            OUTMSG(("creating %s %s remote repository\n",
+                protectd->GetSubCategory().c_str(),
+                protectd->GetName().c_str()));
+        }
+        protectd->Fix(kfg, false);
+        push_back(protectd);
+    }
+}
diff --git a/tools/vdb-config/util.hpp b/tools/vdb-config/util.hpp
new file mode 100644
index 0000000..f21cae5
--- /dev/null
+++ b/tools/vdb-config/util.hpp
@@ -0,0 +1,702 @@
+#ifndef _hpp_tools_vdb_config_util_
+#define _hpp_tools_vdb_config_util_
+
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/out.h> /* OUTMSG */
+#include <klib/printf.h> /* string_printf */
+#include <klib/text.h> /* String */
+
+#include <kfg/config.h> /* KConfig */
+#include <kfs/directory.h> /* KDirectory */
+
+#include <kfs/file.h> /* KFile */
+
+#include <map>
+#include <string>
+#include <vector>
+
+#include <cstring>
+
+static const bool DEBUG(false);
+
+#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
+    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
+
+
+class CNoncopyable {
+public:
+    CNoncopyable(void) {}
+protected:
+    ~CNoncopyable(void) {}
+private:
+    // Prohibit copy constructor and assignment operator
+    CNoncopyable(const CNoncopyable&);
+    const CNoncopyable& operator=(const CNoncopyable&);
+};
+
+rc_t StringRelease(const String *self);
+
+class CString : CNoncopyable {
+    const String *m_Self;
+
+public:
+    CString(const String *self) : m_Self(self) {}
+
+    ~CString() { free((void*)m_Self); }
+
+    const String* Get(void) const { return m_Self; }
+    std::string GetString(void) const {
+        const char *s = GetCString();
+        if (s == NULL)
+            return "";
+        return s;
+    }
+    const char* GetCString(void) const {
+        if (Empty())
+            return NULL;
+        return m_Self->addr;
+    }
+
+    bool Empty(void) const {
+        return
+            m_Self == NULL || m_Self->addr == NULL || m_Self->addr[0] == '\0';
+    }
+
+    bool Equals(const CString &aString) const {
+        const String *string = aString.Get();
+
+        if (m_Self == NULL && string == NULL)
+            return true;
+        return StringEqual(m_Self, string);
+    }
+
+    bool Equals(const char *buffer, size_t bsize = ~0) const {
+        if (bsize == (size_t)~0) {
+            bsize = string_size(buffer);
+        }
+
+        if (m_Self == NULL) {
+            return buffer == NULL || bsize == 0;
+        }
+
+        String s;
+        StringInit(&s, buffer, bsize, (uint32_t)bsize + 1);
+
+        return StringEqual(m_Self, &s);
+    }
+};
+
+class CStdIn : CNoncopyable {
+    const KFile *m_Self;
+    uint64_t m_Pos;
+
+public:
+    CStdIn(void) : m_Self(NULL), m_Pos(0) {
+        rc_t rc = KFileMakeStdIn(&m_Self);
+        if (rc != 0) {
+            throw rc;
+        }
+    }
+
+    ~CStdIn(void) { KFileRelease(m_Self); }
+
+    char Read1(void) {
+        char buf[9] = "";
+        rc_t rc = Read(buf, sizeof buf);
+        if (rc != 0) {
+            return -1;
+        }
+        return buf[0];
+    }
+
+    rc_t Read(char *buffer, size_t bsize, size_t *num_read = NULL);
+};
+
+class CKDirectory : CNoncopyable {
+    KDirectory *m_Self;
+    const uint32_t m_PrivateAccess;
+    const uint32_t m_PublicAccess;
+public:
+    CKDirectory(void)
+        : m_Self(NULL), m_PrivateAccess(0700), m_PublicAccess(0775)
+    {
+        rc_t rc  = KDirectoryNativeDir(&m_Self);
+        if (rc != 0)
+            throw rc;
+    }
+    ~CKDirectory() { KDirectoryRelease(m_Self); }
+    rc_t CheckPrivateAccess(const CString &path, bool &updated, bool verbose)
+        const
+    {   return CheckAccess(path, updated, true, verbose); }
+    rc_t CheckPublicAccess(const CString &path, bool verbose = false) const;
+    rc_t CreateNonExistingPrivateDir(const CString &path, bool verbose = false)
+        const
+    {   return CreateNonExistingDir(path, m_PrivateAccess, verbose); }
+    rc_t CreateNonExistingPublicDir(bool verbose, const char *path, ...) const;
+    rc_t CreateNonExistingPublicDir(const std::string &path,
+        bool verbose = false) const
+    {   return CreateNonExistingDir(path, m_PublicAccess, verbose, true); }
+    rc_t CreateNonExistingPublicDir(const CString &path, bool verbose = false)
+        const
+    {   return CreateNonExistingDir(path, m_PublicAccess, verbose); }
+    rc_t CreatePublicDir(const std::string &path, bool verbose = false) {
+        return CreateNonExistingDir(path, m_PublicAccess, verbose, false);
+    }
+    rc_t CanWriteFile(const CString &dir, bool verbose = false) const;
+    bool Exists(const std::string &path) const { return Exists(path.c_str()); }
+    bool Exists(const CString &path) const;
+    bool IsDirectory(const std::string &path) const {
+        return IsDirectory(path.c_str());
+    }
+    bool IsDirectory(const char *path, ...) const;
+private:
+    bool Exists(const char *path) const
+    {   return KDirectoryPathType(m_Self, path) != kptNotFound; }
+    rc_t CreateNonExistingDir(const CString &path,
+        uint32_t access, bool verbose) const;
+    rc_t CreateNonExistingDir(const std::string &path,
+        uint32_t access, bool verbose, bool chekExistance) const;
+    rc_t CreateNonExistingDir(bool verbose,
+        uint32_t access, const char *path, va_list args) const;
+    rc_t CheckAccess(const CString &path, bool &updated, bool isPrivate,
+        bool verbose = false) const;
+};
+
+class CKConfigNode : CNoncopyable {
+    const KConfigNode *m_Self;
+
+public:
+    CKConfigNode(const KConfigNode *self)
+        : m_Self(self)
+    {}
+
+    ~CKConfigNode(void) {
+        KConfigNodeRelease(m_Self);
+    }
+
+    const KConfigNode* OpenNodeRead(const std::string &path) const {
+        const KConfigNode *node = NULL;
+        rc_t rc = KConfigNodeOpenNodeRead(m_Self, &node, path.c_str());
+        if (rc != 0) {
+            return NULL;
+        }
+        return node;
+    }
+
+    bool ReadBool(const std::string &path) const {
+        return ReadString(path) == "true";
+    }
+
+    std::string ReadString(const std::string &path) const {
+        const KConfigNode *node = NULL;
+        rc_t rc = KConfigNodeOpenNodeRead(m_Self, &node, path.c_str());
+        if (rc != 0) {
+            return "";
+        }
+
+        String *result = NULL;
+        rc = KConfigNodeReadString(node, &result);
+        std::string r;
+        if (rc == 0) {
+            assert(result);
+            r = result->addr;
+        }
+
+        RELEASE(String, result);
+        RELEASE(KConfigNode, node);
+
+        return r;
+    }
+};
+
+class CKConfig : CNoncopyable {
+    KConfig *m_Self;
+    bool m_Updated;
+    const char *m_RepositoryRemoteAuxDisabled;
+    const char *m_RepositoryRemoteMainDisabled;
+    const char *m_RepositoryUserRoot;
+public:
+    CKConfig(bool verbose = false)
+        : m_Self(NULL), m_Updated(false)
+        , m_RepositoryRemoteAuxDisabled ("repository/remote/aux/NCBI/disabled")
+        , m_RepositoryRemoteMainDisabled("repository/remote/main/CGI/disabled")
+        , m_RepositoryUserRoot          ("repository/user/main/public/root")
+    {
+        if (verbose)
+            OUTMSG(("loading configuration... "));
+        rc_t rc = KConfigMake(&m_Self, NULL);
+        if (rc == 0) {
+            if (verbose)
+                OUTMSG(("ok\n"));
+        }
+        else {
+            if (verbose)
+                OUTMSG(("failed\n"));
+            throw rc;
+        }
+    }
+    ~CKConfig(void)
+    { KConfigRelease(m_Self); }
+    KConfig* Get(void) const { return m_Self; }
+    void Reload(bool verbose = false);
+    rc_t Commit(void) const;
+    const KConfigNode* OpenNodeRead(const char *path, ...) const;
+    bool IsRemoteRepositoryDisabled(void) const;
+    const String* ReadDefaultConfig(void) const
+    {   return ReadString("/config/default"); }
+    const String* ReadHome(void) const { return ReadString("HOME"); }
+    const String* ReadNcbiHome(void) const { return ReadString("NCBI_HOME"); }
+    const String* ReadUserRepositoryRootPath(void) const
+    {   return ReadString(m_RepositoryUserRoot); }
+    rc_t DisableRemoteRepository(bool disable);
+    rc_t UpdateUserRepositoryRootPath(const CString &path);
+    rc_t UpdateUserRepositoryRootPath(const char *buffer, size_t size) {
+        return UpdateNode(m_RepositoryUserRoot, buffer, false, size);
+    }
+    bool NodeExists(const std::string &path) const;
+    rc_t UpdateNode(bool verbose, const char *value, const char *name, ...);
+    rc_t UpdateNode(const char *path, const char *buffer,
+        bool verbose = false, size_t size = ~0);
+    rc_t UpdateNode(const std::string &path, const char *buffer) {
+        return UpdateNode(path.c_str(), buffer);
+    }
+    rc_t CreateRemoteRepositories(bool fix = false);
+    rc_t CreateUserRepository(std::string name = "", bool fix = false);
+    const String* ReadString(const char *path) const;
+};
+
+class CSplitter : CNoncopyable {
+    const char *m_Start;
+    size_t m_Size;
+
+public:
+    CSplitter(const std::string &s) : m_Start(s.c_str()), m_Size(s.size()) {}
+    CSplitter(const String *s) : m_Start(NULL), m_Size(0) {
+        if (s == NULL) {
+            return;
+        }
+        m_Start = s->addr;
+        m_Size = s->len;
+        SkipEmpties();
+    }
+    bool HasNext(void) const { return m_Size != 0; }
+    const std::string Next(void) {
+        if (!HasNext()) {
+            return "";
+        }
+        const char *s = m_Start;
+        const char *end = string_chr(m_Start, m_Size, ':');
+        size_t n = m_Size;
+        if (end != NULL) {
+            n = end - m_Start;
+            m_Start = end + 1;
+            if (m_Size >= n + 1) {
+               m_Size -= n + 1;
+            }
+            else {
+               m_Size = 0;
+            }
+        }
+        else {
+            m_Start = NULL;
+            m_Size = 0;
+        }
+        SkipEmpties();
+        return std::string(s, n);
+    }
+    static rc_t Test(void);
+
+private:
+    void SkipEmpties(void) {
+        while (m_Size > 0 && m_Start != NULL && *m_Start == ':') {
+            --m_Size;
+            ++m_Start;
+        }
+    }
+};
+
+class CAppVolume {
+    std::string m_Type;
+    std::string m_Path;
+
+public:
+    CAppVolume(const std::string &type = "", const std::string &path = "")
+        : m_Type(type)
+        , m_Path(path)
+    {}
+
+    std::string GetPath(void) const { return m_Path; }
+
+    rc_t Update(CKConfig &kfg, const char *node,
+        const std::string &appVolPath, bool verbose = false) const
+    {
+        if (DEBUG) {
+            OUTMSG(("CAppVolume::Update(%s, %s)\n", node, appVolPath.c_str()));
+        }
+
+        return kfg.UpdateNode(verbose, m_Path.c_str(),
+            "%s/%s/%s", node, appVolPath.c_str(), m_Type.c_str());
+    }
+
+    void Dump(const char *node, const std::string &appVolPath) const {
+        OUTMSG(("%s/%s/%s = \"%s\"\n", node, appVolPath.c_str(),
+            m_Type.c_str(), m_Path.c_str()));
+    }
+};
+
+class CApp : CNoncopyable {
+    bool m_HasVolume;
+    const std::string m_AppVolPath;
+    typedef std::map<const std::string, CAppVolume> TCAppVolumes;
+    TCAppVolumes m_Volumes;
+
+public:
+    typedef TCAppVolumes::const_iterator TCAppVolumesCI;
+
+    CApp(const std::string &root, const std::string &name,
+            const std::string &type, const std::string &path)
+        : m_HasVolume(false), m_AppVolPath("apps/" + name + "/volumes")
+    {
+        Update(root, name, type, path);
+    }
+    CApp(const CKDirectory &dir, const CKConfigNode &rep,
+            const std::string &root, const std::string &name);
+
+    void Update(const std::string &root, const std::string &name,
+        const std::string &type, const std::string &path)
+    {
+        m_Volumes[type] = CAppVolume(type, path);
+    }
+    void Update(const CKDirectory &dir, const CKConfigNode &rep,
+        const std::string &root, const std::string &name) const
+    {
+        assert(0);
+    }
+    rc_t Update(CKConfig &kfg, const char *node, bool verbose = false) const {
+        rc_t rc = 0;
+        for (TCAppVolumesCI it = m_Volumes.begin(); it != m_Volumes.end(); ++it)
+        {
+            rc_t r2 = (*it).second.Update(kfg, node, m_AppVolPath, verbose);
+            if (r2 != 0 && rc == 0) {
+                rc = r2;
+            }
+        }
+        return rc;
+    }
+    void Dump(const char *node) const {
+        for (TCAppVolumesCI it = m_Volumes.begin(); it != m_Volumes.end(); ++it)
+        {
+            (*it).second.Dump(node, m_AppVolPath);
+        }
+    }
+
+    TCAppVolumesCI VolumesBegin(void) const { return m_Volumes.begin(); }
+    TCAppVolumesCI VolumesEnd(void) const { return m_Volumes.end(); }
+};
+
+class CApps : public std::map<const std::string, CApp*> {
+public:
+    typedef std::map<const std::string, CApp*>::const_iterator TCI;
+    typedef std::map<const std::string, CApp*>::iterator TI;
+
+    ~CApps(void) {
+        for (TCI it = begin(); it != end(); ++it) {
+            delete((*it).second);
+        }
+    }
+
+    void Update(const CKDirectory &dir, const CKConfigNode &rep,
+        const std::string &root, const std::string &name)
+    {
+        TCI it = find(name);
+        if (it == end()) {
+            insert(std::pair<const std::string, CApp*>
+                (name, new CApp(dir, rep, root, name)));
+        }
+        else {
+            (*it).second->Update(dir, rep, root, name);
+        }
+    }
+
+    void Update(const std::string &root, const std::string &name,
+        const std::string &type, const std::string &path)
+    {
+        if (DEBUG) {
+            OUTMSG(("CApps.Update(%s)\n", name.c_str()));
+        }
+
+        TI it = find(name);
+        if (it == end()) {
+            if (DEBUG) {
+                OUTMSG(("CApps.Update(not found)\n"));
+            }
+            insert(std::pair<const std::string, CApp*>
+                (name, new CApp(root, name, type, path)));
+        }
+        else {
+            if (DEBUG) {
+                OUTMSG(("CApps.Update(found)\n"));
+            }
+            (*it).second->Update(root, name, type, path);
+        }
+    }
+};
+
+class CRepository : CNoncopyable {
+    bool m_Disabled;
+    const std::string m_Category;    // user/site/remote
+    const std::string m_SubCategory; // main/aux/protected
+    const std::string m_Name;
+    std::string m_Root;
+    CApps m_Apps;
+
+    bool RootExists(void) const { return m_Root.size() > 0; }
+
+protected:
+    CRepository(const std::string &category, const std::string &type,
+            const std::string &name, const std::string &root);
+    CRepository(const CKDirectory &dir, const CKConfigNode &repo,
+            const std::string &category, const std::string &subCategory,
+            const std::string &name);
+
+    void SetRoot(const std::string &root) { m_Root = root; }
+    void FixFileVolume(void)
+    {   m_Apps.Update(m_Root, "file", "flat", "files"); }
+    void FixNakmerVolume(const std::string &name,
+        const std::string &path)
+    {   m_Apps.Update(m_Root, "nakmer", name, path); }
+    void FixNannotVolume(const std::string &name,
+        const std::string &path)
+    {   m_Apps.Update(m_Root, "nannot", name, path); }
+    void FixRefseqVolume(void)
+    {   m_Apps.Update(m_Root, "refseq", "refseq", "refseq"); }
+    void FixRefseqVolume(const std::string &name,
+        const std::string &path)
+    {   m_Apps.Update(m_Root, "sra", name, path); }
+    void FixWgsVolume(const std::string &name)
+    {   m_Apps.Update(m_Root, "wgs", name, "wgs"); }
+    rc_t Update(CKConfig &kfg, std::string &node, bool verbose = false);
+
+public:
+    void ClearApps(void) { m_Apps.clear(); }
+    virtual std::string Dump(void) const;
+    bool Is(const std::string &subCategory, const std::string &name = "")
+        const;
+    std::string GetCategory(void) const { return m_Category; }
+    std::string GetSubCategory(void) const { return m_SubCategory; }
+    std::string GetName(void) const { return m_Name; }
+    std::string GetRoot(void) const { return m_Root; }
+    void Disable(bool disable) { m_Disabled = disable; }
+
+    CApps::TCI AppsBegin(void) const { return m_Apps.begin(); }
+    CApps::TCI AppsEnd(void) const { return m_Apps.end(); }
+};
+
+class CRemoteRepository : public CRepository {
+    std::string m_ResolverCgi;
+
+    static bool EndsWith(const std::string &stack, char needle);
+    static std::string GetCgi(const std::string &stack, char needle);
+    static std::string GetRoot(const std::string &stack, char needle);
+    void FixApps(void) {
+        FixNakmerVolume("fuseNAKMER", "sadb");
+        FixNannotVolume("fuseNANNOT", "sadb");
+        FixRefseqVolume();
+        FixRefseqVolume("fuse1000", "sra-instant/reads/ByRun/sra");
+        FixWgsVolume("fuseWGS");
+    }
+    rc_t Update(CKConfig &kfg, bool verbose = false) {
+        std::string node;
+        rc_t rc = CRepository::Update(kfg, node, verbose);
+        if (rc != 0) {
+            return rc;
+        }
+        return kfg.UpdateNode(verbose,
+            m_ResolverCgi.c_str(), "%s/resolver-cgi", node.c_str());
+    }
+
+public:
+    CRemoteRepository(const CKDirectory &dir, const CKConfigNode &repo,
+            const std::string &type, const std::string &name)
+        : CRepository(dir, repo, "remote", type, name)
+        , m_ResolverCgi(repo.ReadString("resolver-cgi"))
+    {}
+    CRemoteRepository(const std::string &category,
+            const std::string &name, const std::string &root)
+        : CRepository("remote", category, name, GetRoot(root, 'i'))
+        , m_ResolverCgi(GetCgi(root, 'i'))
+    {
+        if (m_ResolverCgi.size() == 0) {
+            FixApps();
+        }
+    }
+
+    virtual std::string Dump(void) const {
+        std::string node(CRepository::Dump());
+        if (m_ResolverCgi.size() > 0) {
+            OUTMSG(("%s/resolver-cgi = \"%s\"\n",
+                node.c_str(), m_ResolverCgi.c_str()));
+        }
+        return node;
+    }
+    rc_t Fix(CKConfig &kfg, bool disable, bool verbose = false);
+};
+
+class CUserRepositories;
+class CUserConfigData :  CNoncopyable {
+    std::string m_DefaultRoot;
+    std::string m_CurrentRoot;
+    bool m_CacheEnabled;
+
+public:
+    CUserConfigData(const CUserRepositories &repos, const CString &dflt);
+
+    std::string GetCurrentRoot(void) const { return m_CurrentRoot; }
+    std::string GetDefaultRoot(void) const { return m_DefaultRoot; }
+    bool GetCacheEnabled(void) const { return m_CacheEnabled; }
+
+    void SetCurrentRoot(const std::string &path) { m_CurrentRoot = path; }
+    void SetCacheEnabled(bool enabled) { m_CacheEnabled = enabled; }
+};
+
+class CUserRepository : public CRepository {
+    bool m_CacheEnabled;
+
+    void FixApps(void) {
+        FixFileVolume();
+        FixNakmerVolume("nakmerFlat", "nannot");
+        FixNannotVolume("nannotFlat", "nannot");
+        FixRefseqVolume();
+        FixRefseqVolume("sraFlat", "sra");
+        FixWgsVolume("wgsFlat");
+    }
+    rc_t Fix(CKConfig &kfg,
+        const CUserConfigData *data, const std::string *root);
+    rc_t Update(CKConfig &kfg, bool verbose = false) {
+        std::string node;
+        rc_t rc = CRepository::Update(kfg, node, verbose);
+        if (rc != 0) {
+            return rc;
+        }
+        return kfg.UpdateNode(verbose, m_CacheEnabled ? "true" : "false",
+            "%s/cache-enabled", node.c_str());
+    }
+
+public:
+    CUserRepository(const CKDirectory &dir, const CKConfigNode &repo,
+            const std::string &type, const std::string &name)
+        : CRepository(dir, repo, "user", type, name)
+        , m_CacheEnabled(repo.ReadBool("cache-enabled"))
+    {}
+    CUserRepository(const std::string &category,
+            const std::string &name, const std::string &root)
+        : CRepository("user", category, name, root), m_CacheEnabled(true)
+    {
+        FixApps();
+    }
+
+    virtual std::string Dump(void) const {
+        const std::string node(CRepository::Dump());
+        OUTMSG(("%s/cache-enabled = \"%s\"\n", node.c_str(),
+            m_CacheEnabled ? "true" : "false"));
+        return node;
+    }
+
+    bool IsCacheEnabled(void) const { return m_CacheEnabled; }
+    void Fix(CKConfig &kfg, const std::string &root) { Fix(kfg, NULL, &root); }
+    void Fix(CKConfig &kfg, const CUserConfigData *data) {
+        Fix(kfg, data, NULL);
+    }
+};
+
+class CUserRepositories : std::vector<CUserRepository*> {
+    typedef std::vector<CUserRepository*>::const_iterator TCI;
+    typedef std::vector<CUserRepository*>::iterator TI;
+    const CUserRepository *FindMainPublic(void) const;
+
+public:
+    ~CUserRepositories(void) {
+        for (TCI it = begin(); it != end(); ++it) {
+            free(*it);
+        }
+    }
+
+    rc_t Load(const CKConfig &kfg, const CKDirectory &dir);
+    std::string GetMainPublicRoot(void) const {
+        const CUserRepository *r = FindMainPublic();
+        if (r == NULL) {
+            return "";
+        }
+        return r->GetRoot();
+    }
+    bool IsMainPublicCacheEnabled(void) const {
+        const CUserRepository *r = FindMainPublic();
+        if (r == NULL) {
+            return true;
+        }
+        return r->IsCacheEnabled();
+    }
+    void Fix(CKConfig &kfg, const CUserConfigData &data) {
+        bool publicMainFound = false;
+        for (TI it = begin(); it != end(); ++it) {
+            CUserRepository *r = *it;
+            assert(r);
+            if (r->Is("main", "public")) {
+                r->Fix(kfg, &data);
+                publicMainFound = true;
+            }
+            else {
+                r->Fix(kfg, data.GetDefaultRoot());
+            }
+        }
+        if (!publicMainFound) {
+            CUserRepository *r = new CUserRepository("main", "public", "");
+            r->Fix(kfg, &data);
+            push_back(r);
+        }
+    }
+    rc_t MkAppVolumes(const CKDirectory &dir, bool verbose = false)
+        const;
+};
+
+class CRemoteRepositories : std::vector<CRemoteRepository*> {
+    typedef std::vector<CRemoteRepository*>::const_iterator TCI;
+
+public:
+    ~CRemoteRepositories(void) {
+        for (TCI it = begin(); it != end(); ++it) { free(*it); }
+    }
+
+    rc_t Load(const CKConfig &kfg, const CKDirectory &dir);
+
+    bool IsDisabled(void) const { return false; }
+    void Fix(CKConfig &kfg, bool disable, bool verbose = false);
+};
+
+
+#endif // _hpp_tools_vdb_config_util_
diff --git a/tools/vdb-config/vdb-config-model.cpp b/tools/vdb-config/vdb-config-model.cpp
new file mode 100644
index 0000000..38694db
--- /dev/null
+++ b/tools/vdb-config/vdb-config-model.cpp
@@ -0,0 +1,440 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "vdb-config-model.hpp" // vdbconf_model
+
+#include <klib/vector.h> /* Vector */
+
+#include <cstring> // memset
+
+#include <climits> /* PATH_MAX */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+using std::string;
+
+const int32_t vdbconf_model::kPublicRepoId = -1;
+const int32_t vdbconf_model::kInvalidRepoId = -2;
+
+
+std::string vdbconf_model::native_to_internal( const std::string &s ) const
+{
+    std::string res = "";
+    VPath * temp_v_path;
+    rc_t rc = VFSManagerMakeSysPath ( _vfs_mgr, &temp_v_path, s.c_str() );
+    if ( rc == 0 )
+    {
+        size_t written;
+        char buffer[ PATH_MAX ];
+        rc = VPathReadPath ( temp_v_path, buffer, sizeof buffer, &written );
+        if ( rc == 0 )
+            res.assign( buffer, written );
+        VPathRelease ( temp_v_path );
+    }
+    return res;
+}
+
+std::string vdbconf_model::internal_to_native( const std::string &s ) const
+{
+    std::string res = "";
+    VPath * temp_v_path;
+    rc_t rc = VFSManagerMakePath ( _vfs_mgr, &temp_v_path, "%s", s.c_str() );
+    if ( rc == 0 )
+    {
+        size_t written;
+        char buffer[ PATH_MAX ];
+        rc = VPathReadSysPath ( temp_v_path, buffer, sizeof buffer, &written );
+        if ( rc == 0 )
+            res.assign( buffer, written );
+        VPathRelease ( temp_v_path );
+    }
+    return res;
+}
+
+
+std::string vdbconf_model::get_http_proxy_path( void ) const {
+    char buffer[ PATH_MAX ] = "";
+    rc_t rc = KConfig_Get_Http_Proxy_Path(_config, buffer, sizeof buffer, NULL);
+    if (rc == 0) {
+        return buffer;
+    }
+    else {
+        return "";
+    }
+}
+
+
+bool vdbconf_model::does_site_repo_exist( void ) const
+{
+    KRepositoryVector repositories;
+    memset( &repositories, 0, sizeof repositories );
+    rc_t rc = KRepositoryMgrSiteRepositories( _mgr, &repositories );
+    bool res = ( ( rc == 0 ) && ( VectorLength( &repositories ) > 0 ) );
+    KRepositoryVectorWhack( &repositories );
+    return res;
+}
+
+
+int32_t vdbconf_model::get_repo_id( const string & repo_name ) const
+{
+    if ( repo_name == "public" )
+        return kPublicRepoId;
+
+    uint32_t id = 0;
+    rc_t rc = KConfigGetProtectedRepositoryIdByName( _config, repo_name.c_str(), &id );
+    if ( rc != 0 )
+        return kInvalidRepoId;
+    else
+        return id;
+}
+
+
+std::string vdbconf_model::get_repo_name( uint32_t id ) const
+{
+    std::string res = "";
+    if ( _config_valid )
+    {
+        size_t written;
+        char buffer[ 1024 ];
+        rc_t rc = KConfigGetProtectedRepositoryName( _config, id, buffer, sizeof buffer, &written );
+        if ( rc == 0 )
+            res.assign( buffer, written );
+    }
+    return res;
+}
+
+
+std::string vdbconf_model::get_repo_description(const string &repo_name) const
+{
+    size_t written = 0;
+    char buffer[ 1024 ];
+    rc_t rc = KConfigGetProtectedRepositoryDescriptionByName( _config,
+        repo_name.c_str(), buffer, sizeof buffer, &written );
+    if ( rc == 0 )
+        return string( buffer, written );
+    else
+        return "";
+}
+
+std::string vdbconf_model::get_repo_location( uint32_t id ) const
+{
+    std::string res = "";
+    if ( _config_valid )
+    {
+        size_t written;
+        char buffer[ PATH_MAX ];
+        rc_t rc = KConfigGetProtectedRepositoryPathById( _config, id, buffer, sizeof buffer, &written );
+        if ( rc == 0 )
+        {
+            res.assign( buffer, written );
+            res = internal_to_native( res );
+        }
+    }
+    return res;
+}
+
+
+std::string vdbconf_model::get_public_location( void ) const
+{
+    std::string res = "";
+    if ( _config_valid )
+    {
+        size_t written;
+        char buffer[ PATH_MAX ];
+        rc_t rc = KConfig_Get_User_Public_Cache_Location( _config, buffer, sizeof buffer, &written );
+        if ( rc == 0 )
+        {
+            res.assign( buffer, written );
+            res = internal_to_native( res );
+        }
+    }
+    return res;
+}
+
+
+std::string vdbconf_model::get_current_dir( void ) const
+{
+    std::string res = "./";
+    char buffer[ PATH_MAX ];
+    rc_t rc = KDirectoryResolvePath ( _dir, true, buffer, sizeof buffer, "./" );
+    if ( rc == 0 )
+    {
+        res.assign( buffer );
+        res = internal_to_native( res );
+    }
+    return res;
+}
+
+
+std::string vdbconf_model::get_home_dir( void ) const
+{
+    std::string res = "";
+    if ( _config_valid )
+    {
+        size_t written;
+        char buffer[ PATH_MAX ];
+        rc_t rc = KConfig_Get_Home( _config, buffer, sizeof buffer, &written );
+        if ( rc == 0 )
+        {
+            res.assign( buffer, written );
+            res = internal_to_native( res );
+        }
+    }
+    return res;
+}
+
+
+std::string vdbconf_model::get_user_default_dir( void ) const
+{
+    std::string res = "";
+    if ( _config_valid )
+    {
+        size_t written;
+        char buffer[ PATH_MAX ];
+        rc_t rc = KConfig_Get_Default_User_Path( _config, buffer, sizeof buffer, &written );
+        if ( rc == 0 )
+        {
+            res.assign( buffer, written );
+            res = internal_to_native( res );
+        }
+    }
+    return res;
+}
+
+
+std::string vdbconf_model::get_ngc_root( std::string &base, const KNgcObj * ngc ) const
+{
+    std::string res = "";
+    size_t written;
+    char buffer[ PATH_MAX ];
+    rc_t rc = KNgcObjGetProjectName ( ngc, buffer, sizeof buffer, &written );
+    if ( rc == 0 )
+    {
+        res = native_to_internal( base ) + '/' + buffer;
+        res = internal_to_native( res );
+    }
+    return res;
+}
+
+
+static rc_t CC s_IsEmpty( const KDirectory * dir, uint32_t type, const char * name, void * data )
+{
+    if ( ( type & ~kptAlias) != kptDir )
+        return 1;
+    else
+        return 0;
+}
+
+// repoId == kPublicRepoId is for the public repository
+ESetRootState vdbconf_model::x_ChangeRepoLocation( const string &native_newPath,
+    bool reuseNew, int32_t repoId, bool flushOld )
+{
+/*rc_t CC KDirectoryResolvePath_v1 ( const KDirectory_v1 *self, bool absolute,
+    char *resolved, size_t rsize, const char *path, ... )
+    resolve ~
+    and ~user */
+    // old root path
+
+    if ( native_newPath.size() == 0 )
+        return eSetRootState_NewPathEmpty;
+
+    std::string newPath = native_to_internal( native_newPath );
+
+    string oldPath;
+
+    if ( repoId != kInvalidRepoId )
+    {
+        if ( repoId == kPublicRepoId )
+            oldPath = get_public_location();
+        else if ( repoId >= 0 )
+            oldPath = get_repo_location( repoId );
+        else
+            return eSetRootState_Error;
+
+        if ( oldPath.size() == newPath.size() )
+        {
+            // make sure new path is different from the old one
+            if ( oldPath == newPath )
+                return eSetRootState_NotChanged;
+        }
+
+        // old root path should not be empty - just ignore it now
+        if ( oldPath.size() > 0 )
+        {
+            KPathType type = KDirectoryPathType( _dir, oldPath.c_str() );
+            if ( ( type & ~kptAlias ) == kptDir )
+            {
+                rc_t rc = KDirectoryVisit ( _dir, true, s_IsEmpty, NULL, oldPath.c_str() );
+                if ( rc != 0 && !flushOld )
+                {
+                    // warn if the old repo is not empty and flush was not asked
+                    return eSetRootState_OldNotEmpty;
+                }
+            }
+        }
+    }
+
+    KPathType type = KDirectoryPathType( _dir, newPath.c_str() );
+    uint32_t access = 0775;
+    switch ( type & ~kptAlias )
+    {
+        case kptNotFound :
+            {
+                // create non existing new repository directory
+                rc_t rc = KDirectoryCreateDir( _dir, access, (kcmCreate | kcmParents), newPath.c_str() );
+                if ( rc != 0 )
+                    return eSetRootState_MkdirFail;
+            }
+            break;
+
+        case kptDir :
+            {
+                rc_t rc = KDirectoryVisit( _dir, true, s_IsEmpty, NULL, newPath.c_str() );
+                if ( rc != 0 && !reuseNew )
+                    // warn if the new repo is not empty and resuse was not asked
+                    return eSetRootState_NewDirNotEmpty;
+            }
+            break;
+
+        // error: new repository exists and it is not a directory
+        default : return eSetRootState_NewNotDir;
+    }
+
+    // create apps subdirectories
+    const char *apps[] = { "files", "nannot", "refseq", "sra", "wgs", NULL };
+    for ( const char **p = apps; *p; ++p )
+    {
+        KPathType type = KDirectoryPathType( _dir, "%s/%s", newPath.c_str(), *p );
+        switch ( type & ~kptAlias )
+        {
+            case kptNotFound : KDirectoryCreateDir( _dir, access, kcmCreate, "%s/%s", newPath.c_str(), *p );
+            case kptDir : break;
+            default : return eSetRootState_Error;
+        }
+    }
+
+    // update repository root configiration
+    if ( repoId == kPublicRepoId )
+        KConfig_Set_User_Public_Cache_Location( _config, newPath.c_str() );
+    else if ( repoId >= 0 )
+        KConfigSetProtectedRepositoryPathById( _config, repoId, newPath.c_str() );
+
+    if ( repoId != kInvalidRepoId )
+    {
+        // flush the old repository
+        for ( const char **p = apps; *p; ++p )
+        {
+            // completely remove all old apps subdirectories
+            KDirectoryRemove( _dir, true, "%s/%s", oldPath.c_str(), *p );
+        }
+        // remove all old repository directory if it is empty now
+        KDirectoryRemove( _dir, false, oldPath.c_str() );
+    }
+
+    return eSetRootState_OK;
+}
+
+ESetRootState vdbconf_model::set_repo_location(uint32_t id,
+    bool flushOld, const string &path, bool reuseNew)
+{
+    ESetRootState res = x_ChangeRepoLocation( path, reuseNew, id, flushOld );
+    _config_changed = true;
+    return res;
+}
+
+ESetRootState vdbconf_model::set_public_location(
+    bool flushOld, string &path, bool reuseNew)
+{
+    ESetRootState res = x_ChangeRepoLocation( path, reuseNew, kPublicRepoId, flushOld );
+    _config_changed = true;
+    return res;
+}
+
+ESetRootState vdbconf_model::change_repo_location(bool flushOld,
+    const string &newPath, bool reuseNew, int32_t repoId)
+{
+    ESetRootState res = x_ChangeRepoLocation( newPath, reuseNew, repoId, flushOld );
+    _config_changed = true;
+    return res;
+}
+
+ESetRootState vdbconf_model::prepare_repo_directory
+    (const string &newPath, bool reuseNew)
+{
+    ESetRootState res = x_ChangeRepoLocation( newPath, reuseNew, kInvalidRepoId );
+    _config_changed = true;
+    return res;
+}
+
+#if TDB
+bool check_locations_unique(KRepositoryVector *nonUniqueRepos,
+    const string &newRootPath)
+{
+    assert(nonUniqueRepos);
+    KRepositoryVectorWhack(nonUniqueRepos);
+
+    KRepositoryVector repositories;
+    memset(&repositories, 0, sizeof repositories);
+    rc_t rc = KRepositoryMgrUserRepositories(_mgr, &repositories);
+    uint32_t len = 0;
+    if (rc == 0) {
+        len = VectorLength(&repositories);
+    }
+    std::map<const string, const KRepository*> roots;
+    typedef std::map<const string, const KRepository*>::const_iterator TCI;
+    if (len > 0) {
+        for (uint32_t i = 0; i < len; ++i) {
+            const KRepository *repo = static_cast<const KRepository*>
+                (VectorGet(&repositories, i));
+            if (repo != NULL) {
+                char buffer[PATH_MAX] = "";
+                size_t size = 0;
+                rc = KRepositoryRoot(repo, buffer, sizeof buffer, &size);
+                if (rc == 0) {
+                    const string root(buffer);
+                    TI it = find(root);
+                    if (it == end()) {
+                        insert(std::pair<const string, const KRepository*>
+                            (root, repo));
+                    }
+                    else {
+                        if (VectorLength(nonUniqueRepos) == 0) {
+                            const KRepository *r = KRepositoryAddRef(repo);
+                            if (r != NULL) {
+              /*ignored rc = */ VectorAppend(repositories, NULL, r);
+                            }
+                        }
+                        const KRepository *found = (*it);
+                        const KRepository *r = KRepositoryAddRef(found);
+                    }
+                }
+            }
+        }
+    }
+    KRepositoryVectorWhack( &repositories );
+}
+#endif
diff --git a/tools/vdb-config/vdb-config-model.hpp b/tools/vdb-config/vdb-config-model.hpp
new file mode 100644
index 0000000..460fc83
--- /dev/null
+++ b/tools/vdb-config/vdb-config-model.hpp
@@ -0,0 +1,482 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_config_model_
+#define _h_vdb_config_model_
+
+#include <kfg/config.h>
+#include <kfg/properties.h>
+#include <kfg/repository.h>
+#include <kfg/ngc.h>
+#include <kfs/directory.h>
+#include <vfs/manager.h>
+#include <vfs/path.h>
+
+#include <string>
+
+enum ESetRootState {
+    eSetRootState_OK,            // successfully changed repository root
+    eSetRootState_NotChanged,    // the new path is the same as the old one
+    eSetRootState_NotUnique,   // there is another repository with the same root
+    eSetRootState_MkdirFail,     // failed to make new repository directory
+    eSetRootState_NewPathEmpty,  // new repository directory path is not empty
+    eSetRootState_NewDirNotEmpty,// new repository directory is not empty
+    eSetRootState_NewNotDir,     // new repository exists and is not a directory
+    eSetRootState_OldNotEmpty,   // old repository is not empty
+    eSetRootState_Error,         // some unusual error happened
+};
+
+/*
+    a c++ class the encapsulates the connection to 
+*/
+
+class vdbconf_model
+{
+    public :
+        static const int32_t kPublicRepoId;
+        static const int32_t kInvalidRepoId;
+
+        vdbconf_model( KConfig * config )
+            : _config( config )
+            , _config_valid( _config != NULL )
+            , _config_changed( false )
+            , _dir( NULL )
+            , _mgr( NULL )
+            , _vfs_mgr( NULL )
+        {
+            if ( KConfigAddRef( config ) != 0 )
+            {
+                _config = NULL;
+                _config_valid = false;
+            }
+
+            assert(_config && _config_valid);
+
+            rc_t rc = KDirectoryNativeDir(&_dir);
+            if ( rc != 0 ) throw rc;
+
+            rc = KConfigMakeRepositoryMgrRead( _config, &_mgr );
+            if ( rc != 0 ) throw rc;
+
+            rc = VFSManagerMake ( &_vfs_mgr );
+        }
+
+        ~vdbconf_model( void )
+        {
+            if ( _config_valid ) {
+                KConfigRelease ( _config );
+                _config = NULL;
+            }
+
+            KRepositoryMgrRelease(_mgr);
+            _mgr = NULL;
+
+            KDirectoryRelease(_dir);
+            _dir = NULL;
+
+            VFSManagerRelease ( _vfs_mgr );
+            _vfs_mgr = NULL;
+        }
+
+        // ----------------------------------------------------------------
+        std::string native_to_internal( const std::string &s ) const;
+        std::string internal_to_native( const std::string &s ) const;
+
+        bool get_config_changed( void ) const { return _config_changed; }
+
+        // ----------------------------------------------------------------
+
+        bool is_http_proxy_enabled( void ) const {
+            bool enabled = true;
+            KConfig_Get_Http_Proxy_Enabled(_config, &enabled, true);
+			if ( enabled )
+			{
+				std::string path = get_http_proxy_path();
+				if ( path.empty() ) enabled = false;
+			}
+            return enabled;
+        }
+
+        void set_http_proxy_enabled( bool enabled ) {
+            KConfig_Set_Http_Proxy_Enabled(_config, enabled);
+			_config_changed = true;
+        }
+
+        std::string get_http_proxy_path( void ) const;
+
+        void set_http_proxy_path(const std::string &path) {
+            KConfig_Set_Http_Proxy_Path(_config, path.c_str());
+			_config_changed = true;
+        }
+
+        // ----------------------------------------------------------------
+        bool is_remote_enabled( void ) const
+        {
+            bool res = false;
+
+            rc_t rc = KConfig_Get_Remote_Access_Enabled( _config, &res );
+            if (rc == 0) {
+                return res;
+            }
+
+            KConfig_Get_Remote_Main_Cgi_Access_Enabled( _config, &res );
+            if (!res) {
+                return res;
+            }
+
+            KConfig_Get_Remote_Aux_Ncbi_Access_Enabled( _config, &res );
+
+            return res;
+        }
+
+        void set_remote_enabled( bool enabled )
+        {
+            if ( _config_valid )
+            {
+                KConfig_Set_Remote_Access_Enabled( _config, enabled );
+                _config_changed = true;
+            }
+        }
+
+        // ----------------------------------------------------------------
+        bool does_site_repo_exist( void ) const;
+
+        bool is_site_enabled( void ) const
+        {
+            bool res = false;
+            if ( _config_valid ) KConfig_Get_Site_Access_Enabled( _config, &res ); 
+            return res;
+        }
+        void set_site_enabled( bool enabled )
+        {
+            if ( does_site_repo_exist() && _config_valid )
+            {
+                KConfig_Set_Site_Access_Enabled( _config, enabled );
+                _config_changed = true;
+            }
+        }
+
+        // ----------------------------------------------------------------
+        /* THIS IS NEW AND NOT YET IMPLEMENTED IN CONFIG: global cache on/off !!! */
+        bool is_global_cache_enabled( void ) const
+        {
+            bool res = true;
+            if ( _config_valid )
+            {
+                bool is_disabled;
+                rc_t rc = KConfigReadBool ( _config, "/repository/user/cache-disabled", &is_disabled );
+                if ( rc == 0 )
+                    res = !is_disabled;
+            }
+            return res;
+        }
+
+        void set_global_cache_enabled( bool enabled )
+        {
+            if ( _config_valid )
+            {
+                KConfigWriteBool( _config, "/repository/user/cache-disabled", !enabled );
+                _config_changed = true;
+            }
+        }
+
+  // ----------------------------- //
+  // ADD DEFINE IF YOU NEED IT !!! //
+  // ----------------------------- //
+        bool is_user_enabled( void ) const
+        {
+            bool res = true;
+#ifdef ALLOW_USER_REPOSITORY_DISABLING
+            if ( _config_valid ) KConfig_Get_User_Access_Enabled( _config, &res ); 
+#endif
+            return res;
+        }
+        void set_user_enabled( bool enabled )
+        {
+#ifdef ALLOW_USER_REPOSITORY_DISABLING
+            if ( _config_valid ) KConfig_Set_User_Access_Enabled( _config, enabled );
+#endif
+        }
+
+        // ----------------------------------------------------------------
+        bool is_user_cache_enabled( void ) const
+        {
+            bool res = false;
+            if ( _config_valid ) KConfig_Get_User_Public_Cached( _config, &res ); 
+            return res;
+        }
+        void set_user_cache_enabled( bool enabled )
+        {
+            if ( _config_valid )
+            {
+                KConfig_Set_User_Public_Cached( _config, enabled );
+                _config_changed = true;
+            }
+        }
+
+        // ----------------------------------------------------------------
+        uint32_t get_repo_count( void ) const
+        {
+            uint32_t res = 0;
+            if ( _config_valid ) KConfigGetProtectedRepositoryCount( _config, &res );
+            return res;
+        }
+
+
+        /* Returns:
+         *  kInvalidRepoId if not found,
+         *  kPublicRepoId for the user public repository
+         *  protected repository id otherwise
+         */
+        int32_t get_repo_id( const std::string & repo_name ) const;
+
+        std::string get_repo_name( uint32_t id ) const;
+        std::string get_repo_description( const std::string & repo_name ) const;
+
+        bool is_protected_repo_enabled( uint32_t id ) const
+        {
+            bool res = true;
+#ifdef ALLOW_USER_REPOSITORY_DISABLING
+            if ( _config_valid ) KConfigGetProtectedRepositoryEnabledById( _config, id, &res ); 
+#endif
+            return res;
+        }
+        void set_protected_repo_enabled( uint32_t id, bool enabled )
+        {
+#ifdef ALLOW_USER_REPOSITORY_DISABLING
+            if ( _config_valid ) KConfigSetProtectedRepositoryEnabledById( _config, id, enabled ); 
+#endif
+        }
+
+        bool is_protected_repo_cached( uint32_t id ) const
+        {
+            bool res = true;
+            if ( _config_valid )
+                KConfigGetProtectedRepositoryCachedById( _config, id, &res );
+            return res;
+        }
+
+        void set_protected_repo_cached( uint32_t id, bool enabled )
+        {
+            if ( _config_valid )
+            {
+                KConfigSetProtectedRepositoryCachedById( _config, id, enabled );
+                _config_changed = true;
+            }
+        }
+
+        bool does_repo_exist( const char * repo_name )
+        {
+            bool res = false;
+            if ( _config_valid ) KConfigDoesProtectedRepositoryExist( _config, repo_name, &res );
+            return res;
+        }
+
+        std::string get_repo_location( uint32_t id ) const;
+
+        ESetRootState set_repo_location( uint32_t id,
+            bool flushOld, const std::string &path, bool reuseNew );
+
+/* ----------------------------------------------------------------
+ * flushOld repository
+ * reuseNew repository: whether to refuse to change location on existing newPath
+ */
+        ESetRootState change_repo_location(bool flushOld,
+            const std::string &newPath, bool reuseNew, int32_t repoId);
+
+        ESetRootState prepare_repo_directory(const std::string &newPath,
+            bool reuseNew = false);
+
+        // ----------------------------------------------------------------
+
+        std::string get_public_location( void ) const;
+
+        ESetRootState set_public_location( bool flushOld, std::string &path, bool reuseNew );
+
+        bool is_user_public_enabled( void ) const
+        {
+            bool res = true;
+            if ( _config_valid ) KConfig_Get_User_Public_Enabled( _config, &res ); 
+            return res;
+        }
+        void set_user_public_enabled( bool enabled )
+        {
+            if ( _config_valid )
+            {
+                KConfig_Set_User_Public_Enabled( _config, enabled ); 
+                _config_changed = true;
+            }
+        }
+
+        bool is_user_public_cached( void ) const
+        {
+            bool res = true;
+            if ( _config_valid ) KConfig_Get_User_Public_Cached( _config, &res ); 
+            return res;
+        }
+
+        void set_user_public_cached( bool enabled )
+        {
+            if ( _config_valid )
+            {
+                KConfig_Set_User_Public_Cached( _config, enabled ); 
+                _config_changed = true;
+            }
+        }
+
+        // ----------------------------------------------------------------
+        std::string get_current_dir( void ) const;
+        std::string get_home_dir( void ) const;
+
+        std::string get_user_default_dir( void ) const;
+        std::string get_ngc_root( std::string &base, const KNgcObj * ngc ) const;
+
+        void set_user_default_dir( const char * new_default_dir )
+        {
+            if ( _config_valid )
+            {
+                std::string tmp( new_default_dir );
+                tmp = native_to_internal( tmp );
+                KConfig_Set_Default_User_Path( _config, tmp.c_str() );
+                _config_changed = true;
+            }
+        }
+
+        // ----------------------------------------------------------------
+        bool commit( void )
+        {
+            bool res = false;
+            if ( _config_valid )
+            {
+                res = ( KConfigCommit ( _config ) == 0 );
+                if ( res ) _config_changed = false;
+            }
+            return res;
+        }
+
+        // ----------------------------------------------------------------
+        bool import_ngc( const std::string &native_location,
+            const KNgcObj *ngc, uint32_t permissions, uint32_t * result_flags )
+        {
+            bool res = false;
+
+            if ( _config_valid )
+            {
+                KRepositoryMgr * repo_mgr;
+                rc_t rc = KConfigMakeRepositoryMgrUpdate ( _config, &repo_mgr );
+                if ( rc == 0 )
+                {
+                    std::string location = native_to_internal( native_location);
+
+                    rc = KRepositoryMgrImportNgcObj( repo_mgr, ngc,
+                        location.c_str(), permissions, result_flags );
+                    res = ( rc == 0 );
+                    KRepositoryMgrRelease( repo_mgr );
+                }
+            }
+
+            return res;
+        }
+
+        bool get_id_of_ngc_obj( const KNgcObj *ngc, uint32_t * id )
+        {
+            bool res = false;
+            if ( _config_valid )
+            {
+                size_t written;
+                char proj_id[ 512 ];
+                rc_t rc = KNgcObjGetProjectName( ngc, proj_id, sizeof proj_id, &written );
+                if ( rc == 0 )
+                {
+                    rc = KConfigGetProtectedRepositoryIdByName( _config, proj_id, id );
+                    res = ( rc == 0 );
+                }
+            }
+            return res;
+        }
+
+        bool mkdir(const KNgcObj *ngc) {
+            uint32_t id = 0;
+            if (!get_id_of_ngc_obj(ngc, &id)) {
+                return false;
+            }
+
+            const std::string root(get_repo_location(id));
+            if (root.size() == 0) {
+                return false;
+            }
+
+            if (KDirectoryPathType(_dir, root.c_str()) != kptNotFound) {
+                return false;
+            }
+
+            return KDirectoryCreateDir(_dir, 0775,
+                kcmCreate | kcmParents, root.c_str()) == 0;
+        }
+
+        bool does_path_exist( std::string &path )
+        {
+            bool res = false;
+            if ( _dir != NULL )
+            {
+                KPathType type = KDirectoryPathType( _dir, path.c_str() );
+                res = ( ( type & ~kptAlias ) == kptDir );
+            }
+            return res;
+        }
+
+        bool reload( void )
+        {
+            if ( _config_valid )
+            {
+                KRepositoryMgrRelease ( _mgr );
+                _mgr = NULL;
+
+                KConfigRelease ( _config );
+                _config_valid = ( KConfigMake ( &_config, NULL ) == 0 );
+
+                if ( _config_valid )
+                    KConfigMakeRepositoryMgrRead( _config, &_mgr );
+
+                _config_changed = false;
+            }
+            return _config_valid;
+        }
+
+    private :
+        KConfig * _config;
+        bool _config_valid;
+        bool _config_changed;
+
+        KDirectory * _dir;
+        const KRepositoryMgr *_mgr;
+        VFSManager *_vfs_mgr;
+
+        ESetRootState x_ChangeRepoLocation(const std::string &native_newPath,
+            bool reuseNew, int32_t repoId, bool flushOld = false);
+};
+
+#endif
diff --git a/tools/vdb-config/vdb-config.c b/tools/vdb-config/vdb-config.c
new file mode 100644
index 0000000..ac426be
--- /dev/null
+++ b/tools/vdb-config/vdb-config.c
@@ -0,0 +1,1740 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "configure.h"
+
+#include <kapp/main.h>
+#include <kapp/args-conv.h>
+
+#include <vdb/vdb-priv.h> /* VDBManagerListExternalSchemaModules */
+#include <vdb/manager.h> /* VDBManager */
+
+#include <kfg/kfg-priv.h> /* KConfig */
+#include <kfg/ngc.h> /* KNgcObjMakeFromFile */
+#include <kfg/properties.h> /* KConfig_Get_Default_User_Path */
+#include <kfg/repository.h> /* KConfigImportNgc */
+
+#include <vfs/manager.h> /* VFSManagerMake */
+#include <vfs/path-priv.h> /* KPathGetCWD */
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/impl.h> /* KDirectoryGetSysDir */
+#include <kfs/kfs-priv.h> /* KSysDirOSPath */
+
+#include <klib/log.h> /* LOGERR */
+#include <klib/misc.h> /* is_iser_an_admin */
+#include <klib/namelist.h>
+#include <klib/out.h> /* OUTMSG */
+#include <klib/printf.h> /* string_printf */
+#include <klib/rc.h> /* RC */
+#include <klib/text.h> /* strcase_cmp */
+
+#include <sysalloc.h> /* redefine malloc etc calls */
+#include <os-native.h> /* SHLX */
+
+#include <assert.h>
+#include <ctype.h> /* tolower */
+#include <errno.h>
+#include <stdio.h> /* scanf */
+#include <stdlib.h> /* getenv */
+#include <string.h> /* memset */
+
+#include <limits.h> /* PATH_MAX */
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+#define DISP_RC(rc, msg) (void)((rc == 0) ? 0 : LOGERR(klogInt, rc, msg))
+#define DISP_RC2(rc, name, msg) (void)((rc == 0) ? 0 : \
+    PLOGERR(klogInt, (klogInt, rc, \
+        "$(name): $(msg)", "name=%s,msg=%s", name, msg)))
+#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
+    if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
+
+#define ALIAS_ALL    "a"
+#define OPTION_ALL   "all"
+static const char* USAGE_ALL[] = { "print all information [default]", NULL };
+
+#define ALIAS_CFG    "i"
+#define OPTION_CFG   "interactive"
+static const char* USAGE_CFG[] = {
+    "create/update configuration",
+    NULL };
+
+#define ALIAS_CFM    NULL
+#define OPTION_CFM   "interactive-mode"
+static const char* USAGE_CFM[] = {
+    "interactive mode: 'textual' or 'graphical' (default)",
+    NULL };
+
+#define ALIAS_DIR    "d"
+#define OPTION_DIR   "load-path"
+static const char* USAGE_DIR[] = { "print load path", NULL };
+
+#define ALIAS_ENV    "e"
+#define OPTION_ENV   "env"
+static const char* USAGE_ENV[] = { "print shell variables", NULL };
+
+#define ALIAS_FIL    "f"
+#define OPTION_FIL   "files"
+static const char* USAGE_FIL[] = { "print loaded files", NULL };
+
+#define ALIAS_FIX    NULL
+#define OPTION_FIX   "restore-defaults"
+static const char* USAGE_FIX[] =
+{ "create default or update existing user configuration", NULL };
+
+#define ALIAS_IMP    NULL
+#define OPTION_IMP   "import"
+static const char* USAGE_IMP[] = { "import ngc file", NULL };
+
+#define ALIAS_MOD    "m"
+#define OPTION_MOD   "modules"
+static const char* USAGE_MOD[] = { "print external modules", NULL };
+
+#define ALIAS_OUT    "o"
+#define OPTION_OUT   "output"
+static const char* USAGE_OUT[] = { "output type: one of (x n), "
+    "where 'x' is xml (default), 'n' is native", NULL };
+
+#define ALIAS_PCF    "p"
+#define OPTION_PCF   "cfg"
+static const char* USAGE_PCF[] = { "print current configuration", NULL };
+
+#define ALIAS_CDR    NULL
+#define OPTION_CDR   "cfg-dir"
+static const char* USAGE_CDR[]
+    = { "set directory to load configuration", NULL };
+
+#define ALIAS_PRD    NULL
+#define OPTION_PRD   "proxy-disable"
+static const char* USAGE_PRD[] = { "enable/disable using HTTP proxy", NULL };
+
+#define ALIAS_PRX    NULL
+#define OPTION_PRX   "proxy"
+static const char* USAGE_PRX[]
+    = { "set HTTP proxy server configuration", NULL };
+
+#define ALIAS_ROOT   NULL
+#define OPTION_ROOT  "root"
+static const char* USAGE_ROOT[] =
+    { "enforce configuration update while being run by superuser", NULL };
+
+#define ALIAS_SET    "s"
+#define OPTION_SET   "set"
+static const char* USAGE_SET[] = { "set configuration node value", NULL };
+
+rc_t WorkspaceDirPathConv(const Args * args, uint32_t arg_index, const char * arg, size_t arg_len, void ** result, WhackParamFnP * whack)
+{
+    rc_t rc;
+    uint32_t imp_count;
+    
+    rc = ArgsOptionCount(args, OPTION_IMP, &imp_count);
+    if (rc != 0)
+        return rc;
+    
+    // first parameter is a directory only if OPTION_IMP is present; otherwise it is a query
+    if (imp_count > 0)
+    {
+        return ArgsConvFilepath(args, arg_index, arg, arg_len, result, whack);
+    }
+    
+    return ArgsConvDefault(args, arg_index, arg, arg_len, result, whack);
+}
+
+OptDef Options[] =
+{                                         /* needs_value, required, converter */
+      { OPTION_ALL, ALIAS_ALL, NULL, USAGE_ALL, 1, false, false, NULL }
+    , { OPTION_CDR, ALIAS_CDR, NULL, USAGE_CDR, 1, true , false, NULL }
+    , { OPTION_CFG, ALIAS_CFG, NULL, USAGE_CFG, 1, false, false, NULL }
+    , { OPTION_CFM, ALIAS_CFM, NULL, USAGE_CFM, 1, true , false, NULL }
+    , { OPTION_DIR, ALIAS_DIR, NULL, USAGE_DIR, 1, false, false, NULL }
+    , { OPTION_ENV, ALIAS_ENV, NULL, USAGE_ENV, 1, false, false, NULL }
+    , { OPTION_FIL, ALIAS_FIL, NULL, USAGE_FIL, 1, false, false, NULL }
+    , { OPTION_FIX, ALIAS_FIX, NULL, USAGE_FIX, 1, false, false, NULL }
+    , { OPTION_IMP, ALIAS_IMP, NULL, USAGE_IMP, 1, true , false, ArgsConvFilepath }
+    , { OPTION_MOD, ALIAS_MOD, NULL, USAGE_MOD, 1, false, false, NULL }
+    , { OPTION_OUT, ALIAS_OUT, NULL, USAGE_OUT, 1, true , false, NULL }
+    , { OPTION_PCF, ALIAS_PCF, NULL, USAGE_PCF, 1, false, false, NULL }
+    , { OPTION_PRD, ALIAS_PRD, NULL, USAGE_PRD, 1, true , false, NULL }
+    , { OPTION_PRX, ALIAS_PRX, NULL, USAGE_PRX, 1, true , false, NULL }
+    , { OPTION_SET, ALIAS_SET, NULL, USAGE_SET, 1, true , false, NULL }
+    , { OPTION_ROOT,ALIAS_ROOT,NULL, USAGE_ROOT,1, false, false, NULL }
+};
+
+ParamDef Parameters[] =
+{
+    { WorkspaceDirPathConv }
+};
+
+rc_t CC UsageSummary (const char * progname) {
+    return KOutMsg (
+        "Usage:\n"
+        "  %s [options] [<query> ...]\n\n"
+        "  %s [options] --import <ngc-file> [<workspace directory path>]\n"
+        "\n"
+        "Summary:\n"
+        "  Manage VDB configuration\n"
+        , progname, progname);
+}
+
+rc_t CC Usage(const Args* args) { 
+    rc_t rc = 0;
+
+    const char* progname = UsageDefaultName;
+    const char* fullpath = UsageDefaultName;
+
+    if (args == NULL) {
+        rc = RC(rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
+    }
+    else {
+        rc = ArgsProgram(args, &fullpath, &progname);
+    }
+
+    UsageSummary(progname);
+
+    KOutMsg ("\nOptions:\n");
+
+    HelpOptionLine (ALIAS_ALL, OPTION_ALL, NULL, USAGE_ALL);
+    HelpOptionLine (ALIAS_PCF, OPTION_PCF, NULL, USAGE_PCF);
+    HelpOptionLine (ALIAS_FIL, OPTION_FIL, NULL, USAGE_FIL);
+    HelpOptionLine (ALIAS_DIR, OPTION_DIR, NULL, USAGE_DIR);
+    HelpOptionLine (ALIAS_ENV, OPTION_ENV, NULL, USAGE_ENV);
+    HelpOptionLine (ALIAS_MOD, OPTION_MOD, NULL, USAGE_MOD);
+    KOutMsg ("\n");
+    HelpOptionLine (ALIAS_SET, OPTION_SET, "name=value", USAGE_SET);
+    KOutMsg ("\n");
+    HelpOptionLine (ALIAS_CFG, OPTION_CFG, NULL, USAGE_CFG);
+    HelpOptionLine (ALIAS_CFM, OPTION_CFM, "mode", USAGE_CFM);
+    KOutMsg ("\n");
+    HelpOptionLine (ALIAS_FIX, OPTION_FIX, NULL, USAGE_FIX);
+    KOutMsg ("\n");
+    HelpOptionLine (ALIAS_OUT, OPTION_OUT, "x | n", USAGE_OUT);
+    KOutMsg ("\n");
+    HelpOptionLine (ALIAS_PRX, OPTION_PRX, "uri[:port]", USAGE_PRX);
+    HelpOptionLine (ALIAS_PRD, OPTION_PRD, "yes | no", USAGE_PRD);
+    KOutMsg ("\n");
+    HelpOptionLine (ALIAS_CDR, OPTION_CDR, "path", USAGE_CDR);
+    KOutMsg ("\n");
+    HelpOptionLine (ALIAS_ROOT,OPTION_ROOT,NULL, USAGE_ROOT);
+
+    KOutMsg ("\n");
+
+    HelpOptionsStandard ();
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+const char UsageDefaultName[] = "vdb-config";
+
+static void Indent(bool xml, int n) {
+    if (!xml)
+    {   return; }
+    while (n--)
+    {   OUTMSG(("  ")); }
+}
+
+static rc_t KConfigNodeReadData(const KConfigNode* self,
+    char* buf, size_t blen, size_t* num_read)
+{
+    rc_t rc = 0;
+    size_t remaining = 0;
+    assert(buf && blen && num_read);
+    rc = KConfigNodeRead(self, 0, buf, blen, num_read, &remaining);
+    assert(remaining == 0); /* TODO overflow check */
+    assert(*num_read <= blen);
+    return rc;
+}
+
+static
+rc_t _printNodeData(const char *name, const char *data, size_t dlen)
+{
+    bool secret = false;
+    {
+        const char d1[] = "download-ticket";
+        size_t l1 = sizeof d1 - 1;
+
+        const char d2[] = "aws_access_key_id";
+        size_t l2 = sizeof d2 - 1;
+
+        const char d3[] = "aws_secret_access_key";
+        size_t l3 = sizeof d3 - 1;
+
+        if ((string_cmp(name,
+                string_measure(name, NULL), d1, l1, (uint32_t)l1) == 0) || 
+            (string_cmp(name,
+                string_measure(name, NULL), d2, l2, (uint32_t)l2) == 0) || 
+            (string_cmp(name,
+                string_measure(name, NULL), d3, l3, (uint32_t)l3) == 0))
+        {
+            secret = true;
+        }
+    }
+
+    if (secret) {
+        const char *ellipsis = "";
+        const char replace[] =
+"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
+        if (dlen > 70) {
+            dlen = 70;
+            ellipsis = "...";
+        }
+        return OUTMSG(("%.*s%s", (uint32_t)dlen, replace, ellipsis));
+    }
+    else {
+        return OUTMSG(("%.*s", dlen, data));
+    }
+}
+
+#define VDB_CONGIG_OUTMSG(args) do { if (xml) { OUTMSG(args); } } while (false)
+static rc_t KConfigNodePrintChildNames(bool xml, const KConfigNode* self,
+    const char* name, int indent, const char* aFullpath)
+{
+    rc_t rc = 0;
+    uint32_t count = 0;
+    int i = 0;
+    char buffer[512] = "";
+    size_t num_read = 0;
+    bool hasChildren = false;
+    bool hasData = false;
+    const KConfigNode* node = NULL;
+    KNamelist* names = NULL;
+    bool beginsWithNumberinXml = false;
+    assert(self && name);
+
+    if (rc == 0)
+    {   rc = KConfigNodeOpenNodeRead(self, &node, "%s", name);  }
+    if (rc == 0) {
+        rc = KConfigNodeReadData(node, buffer, sizeof buffer, &num_read);
+        hasData = num_read > 0;
+        if (hasData) {
+ /* VDB_CONGIG_OUTMSG(("\n%s = \"%.*s\"\n\n", aFullpath, num_read, buffer)); */
+        }
+    }
+    if (rc == 0) {
+        rc = KConfigNodeListChild(node, &names);
+    }
+    if (rc == 0) {
+        rc = KNamelistCount(names, &count);
+        hasChildren = count;
+    }
+
+    Indent(xml, indent);
+    if (xml) {
+        beginsWithNumberinXml = isdigit(name[0]);
+        if (! beginsWithNumberinXml) {
+            VDB_CONGIG_OUTMSG(("<%s", name));
+        }
+        else {
+            /* XML node names cannot start with a number */
+            VDB_CONGIG_OUTMSG(("<_%s", name));
+        }
+    }
+    if (!hasChildren && !hasData) {
+        VDB_CONGIG_OUTMSG(("/>\n"));
+    }
+    else {   VDB_CONGIG_OUTMSG((">"));
+    }
+    if (hasData) {
+        if (xml) {
+            _printNodeData(name, buffer, num_read);
+        }
+        else {
+            OUTMSG(("%s = \"", aFullpath));
+            _printNodeData(name, buffer, num_read);
+            OUTMSG(("\"\n"));
+        }
+    }
+    if (hasChildren)
+    {   VDB_CONGIG_OUTMSG(("\n"));}
+
+    if (hasChildren) {
+        for (i = 0; i < (int)count && rc == 0; ++i) {
+            char* fullpath = NULL;
+            const char* name = NULL;
+            rc = KNamelistGet(names, i, &name);
+            if (rc == 0) {
+                size_t bsize = strlen(aFullpath) + 1 + strlen(name) + 1;
+                fullpath = malloc(bsize + 1);
+                if (fullpath == NULL) {
+                    rc = RC
+                        (rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+                }
+                else {
+                    string_printf(fullpath, bsize, NULL,
+                        "%s/%s", aFullpath, name);
+                }
+            }
+            if (rc == 0) {
+                rc = KConfigNodePrintChildNames
+                    (xml, node, name, indent + 1, fullpath);
+            }
+            free(fullpath);
+        }
+    }
+
+    if (hasChildren)
+    {   Indent(xml, indent); }
+    if (hasChildren || hasData)
+    {
+        if (! beginsWithNumberinXml) {
+            VDB_CONGIG_OUTMSG(("</%s>\n",name));
+        }
+        else {
+            VDB_CONGIG_OUTMSG(("</_%s>\n",name));
+        }
+    }
+
+    RELEASE(KNamelist, names);
+    RELEASE(KConfigNode, node);
+    return rc;
+}
+
+typedef struct Params {
+    Args* args;
+    uint32_t argsParamIdx;
+    uint32_t argsParamCnt;
+
+    const char *cfg_dir;
+
+    bool xml;
+
+    const char *setValue;
+
+    const char *ngc;
+
+    bool modeSetNode;
+    bool modeConfigure;
+    EConfigMode configureMode;
+    bool modeCreate;
+    bool modeShowCfg;
+    bool modeShowEnv;
+    bool modeShowFiles;
+    bool modeShowLoadPath;
+    bool modeShowModules;
+    bool modeRoot;
+
+    bool showMultiple;
+
+    enum {
+        eUndefined,
+        eNo,
+        eYes
+    } proxyDisabled;
+    const char *proxy;
+} Params;
+static rc_t ParamsConstruct(int argc, char* argv[], Params* prm) {
+    rc_t rc = 0;
+    Args* args = NULL;
+    int count = 0;
+    assert(argc && argv && prm);
+    memset(prm, 0, sizeof *prm);
+    args = prm->args;
+    do {
+        uint32_t pcount = 0;
+        rc = ArgsMakeAndHandle2(&args, argc, argv, Parameters, sizeof Parameters / sizeof Parameters[0], 1, Options, sizeof Options / sizeof Options[0]);
+        if (rc) {
+            LOGERR(klogErr, rc, "While calling ArgsMakeAndHandle2");
+            break;
+        }
+
+        prm->args = args;
+        rc = ArgsParamCount(args, &prm->argsParamCnt);
+        if (rc) {
+            LOGERR(klogErr, rc, "Failure to get query parameter[s]");
+            break;
+        }
+        if (prm->argsParamCnt > 0) {
+            prm->modeShowCfg = true;
+            ++count;
+        }
+
+        {   // OPTION_OUT
+            prm->xml = true;
+            rc = ArgsOptionCount(args, OPTION_OUT, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_OUT "' argument");
+                break;
+            }
+            if (pcount) {
+                const char* dummy = NULL;
+                rc = ArgsOptionValue(args, OPTION_OUT, 0, (const void **)&dummy);
+                if (rc) {
+                    LOGERR(klogErr, rc, "Failure to get '" OPTION_OUT "' argument");
+                    break;
+                }
+                if (!strcmp(dummy, "n")) {
+                    prm->xml = false;
+                }
+                else if (strcmp(dummy, "x")) {
+                    rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInvalid);
+                    LOGERR(klogErr, rc, "Bad " OPTION_OUT " value");
+                    break;
+                }
+            }
+        }
+        {   // OPTION_ENV
+            rc = ArgsOptionCount(args, OPTION_ENV, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_ENV "' argument");
+                break;
+            }
+            if (pcount) {
+                prm->modeShowEnv = true;
+                ++count;
+            }
+        }
+        {   // OPTION_CDR
+            rc = ArgsOptionCount(args, OPTION_CDR, &pcount);
+            if (rc != 0) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_CDR "' argument");
+                break;
+            }
+            if (pcount > 0) {
+                rc = ArgsOptionValue
+                    (args, OPTION_CDR, 0, (const void **)&prm->cfg_dir);
+                if (rc) {
+                    LOGERR(klogErr, rc,
+                        "Failure to get '" OPTION_CDR "' argument");
+                    break;
+                }
+            }
+        }
+        {   // OPTION_FIL
+            rc = ArgsOptionCount(args, OPTION_FIL, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_FIL "' argument");
+                break;
+            }
+            if (pcount > 0) {
+                prm->modeShowFiles = true;
+                ++count;
+            }
+        }
+        {   // OPTION_IMP
+            rc = ArgsOptionCount(args, OPTION_IMP, &pcount);
+            if (rc != 0) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_IMP "' argument");
+                break;
+            }
+            if (pcount > 0) {
+                rc = ArgsOptionValue(args, OPTION_IMP, 0, (const void **)&prm->ngc);
+                if (rc != 0) {
+                    LOGERR(klogErr, rc, "Failure to get '" OPTION_IMP "' argument");
+                    break;
+                }
+                else {
+                     prm->modeShowCfg = false;
+                }
+            }
+        }
+        {   // OPTION_MOD
+            rc = ArgsOptionCount(args, OPTION_MOD, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_MOD "' argument");
+                break;
+            }
+            if (pcount) {
+                prm->modeShowModules = true;
+                ++count;
+            }
+        }
+#if 0
+        {   // OPTION_NEW
+            rc = ArgsOptionCount(args, OPTION_NEW, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_NEW "' argument");
+                break;
+            }
+            if (pcount) {
+                prm->modeCreate = true;
+                ++count;
+            }
+        }
+#endif
+        {   // OPTION_PCF
+            rc = ArgsOptionCount(args, OPTION_PCF, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_PCF "' argument");
+                break;
+            }
+            if (pcount) {
+                if (!prm->modeShowCfg) {
+                    prm->modeShowCfg = true;
+                    ++count;
+                }
+            }
+        }
+        {   // OPTION_PRD
+            rc = ArgsOptionCount(args, OPTION_PRD, &pcount);
+            if (rc != 0) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_PRD "' argument");
+                break;
+            }
+            if (pcount > 0) {
+                const char *dummy = NULL;
+                rc = ArgsOptionValue(args, OPTION_PRD, 0, (const void **)&dummy);
+                if (rc) {
+                    LOGERR(klogErr, rc, "Failure to get '" OPTION_PRD "' argument");
+                    break;
+                }
+                if (tolower(dummy[0]) == 'y') {
+                    prm->proxyDisabled = eYes;
+                }
+                else if (tolower(dummy[0]) == 'n') {
+                    prm->proxyDisabled = eNo;
+                }
+            }
+        }
+        {   // OPTION_PRX
+            rc = ArgsOptionCount(args, OPTION_PRX, &pcount);
+            if (rc != 0) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_PRX "' argument");
+                break;
+            }
+            if (pcount > 0) {
+                rc = ArgsOptionValue(args, OPTION_PRX, 0, (const void **)&prm->proxy);
+                if (rc) {
+                    LOGERR(klogErr, rc, "Failure to get '" OPTION_PRX "' argument");
+                    break;
+                }
+            }
+        }
+        {   // OPTION_DIR
+            rc = ArgsOptionCount(args, OPTION_DIR, &pcount);
+            if (rc != 0) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_DIR "' argument");
+                break;
+            }
+            if (pcount) {
+                prm->modeShowLoadPath = true;
+                ++count;
+            }
+        }
+        {   // OPTION_ROOT
+            rc = ArgsOptionCount(args, OPTION_ROOT, &pcount);
+            if (rc != 0) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_ROOT "' argument");
+                break;
+            }
+            if (pcount) {
+                prm->modeRoot = true;
+            }
+        }
+        {   // OPTION_SET
+            rc = ArgsOptionCount(args, OPTION_SET, &pcount);
+            if (rc != 0) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_SET "' argument");
+                break;
+            }
+            if (pcount) {
+                rc = ArgsOptionValue(args, OPTION_SET, 0, (const void **)&prm->setValue);
+                if (rc == 0) {
+                    const char* p = strchr(prm->setValue, '=');
+                    if (p == NULL || *(p + 1) == '\0') {
+                        rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInvalid);
+                        LOGERR(klogErr, rc, "Bad " OPTION_SET " value");
+                        break;
+                    }
+                    prm->modeSetNode = true;
+                    prm->modeCreate = prm->modeShowCfg = prm->modeShowEnv
+                        = prm->modeShowFiles = prm->modeShowLoadPath
+                        = prm->modeShowModules = false;
+                    count = 1;
+                }
+            }
+        }
+        {   // OPTION_FIX
+            rc = ArgsOptionCount(args, OPTION_FIX, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_FIX "' argument");
+                break;
+            }
+            if (pcount) {
+                prm->modeConfigure = true;
+                prm->modeShowCfg = false;
+                count = 1;
+                prm->configureMode = eCfgModeDefault;
+            }
+        }
+        {   // OPTION_CFG
+            rc = ArgsOptionCount(args, OPTION_CFG, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_CFG "' argument");
+                break;
+            }
+            if (pcount) {
+#if 1
+                prm->modeConfigure = true;
+                prm->modeShowCfg = false;
+                count = 1;
+                prm->configureMode = eCfgModeVisual;
+
+#else
+                const char* dummy = NULL;
+                rc = ArgsOptionValue(args, OPTION_CFG, 0, (const void **)&dummy);
+                if (rc) {
+                    LOGERR(klogErr, rc, "Failure to get '" OPTION_CFG "' argument");
+                    break;
+                }
+                prm->modeConfigure = true;
+                prm->modeShowCfg = false;
+                count = 1;
+                switch (dummy[0]) {
+                    case 't':
+                        prm->configureMode = eCfgModeTextual;
+                        break;
+                    default:
+                        prm->configureMode = eCfgModeDefault;
+                        break;
+                }
+#endif
+            }
+        }
+        {   // OPTION_CFM
+            rc = ArgsOptionCount(args, OPTION_CFM, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_CFM "' argument");
+                break;
+            }
+            if (pcount) {
+                const char* dummy = NULL;
+                size_t dummy_len;
+                rc = ArgsOptionValue(args, OPTION_CFM, 0, (const void **)&dummy);
+                if (rc) {
+                    LOGERR(klogErr, rc, "Failure to get '" OPTION_OUT "' argument");
+                    break;
+                }
+                prm->modeShowCfg = false;
+                count = 1;
+                prm->modeConfigure = true;
+
+                dummy_len = strlen( dummy );
+                if ( dummy_len == 0 )
+                    dummy_len = 1;
+
+                if ( strncmp( dummy, "textual", dummy_len ) == 0 )
+                    prm->configureMode = eCfgModeTextual;
+                else if ( strncmp( dummy, "graphical", dummy_len ) == 0 )
+                    prm->configureMode = eCfgModeVisual;
+                else
+                {
+                    rc = RC( rcExe, rcArgv, rcEvaluating, rcParam, rcInvalid );
+                    LOGERR(klogErr, rc, "Unrecognized '" OPTION_CFM "' argument");
+                    break;
+                }
+            }
+        }
+        {   // OPTION_ALL
+            rc = ArgsOptionCount(args, OPTION_ALL, &pcount);
+            if (rc) {
+                LOGERR(klogErr, rc, "Failure to get '" OPTION_ALL "' argument");
+                break;
+            }
+            if (pcount
+                || ( !prm->modeConfigure
+                  && !prm->modeShowCfg && ! prm->modeShowLoadPath
+                  && !prm->modeShowEnv && !prm->modeShowFiles
+                  && !prm->modeShowModules && !prm->modeCreate
+                  && !prm->modeSetNode && prm->ngc == NULL
+                  && prm->proxy == NULL && prm->proxyDisabled == eUndefined))
+                /* show all by default */
+            {
+                prm->modeShowCfg = prm->modeShowEnv = prm->modeShowFiles = true;
+                count += 2;
+            }
+        }
+
+        if (count > 1)  {
+            prm->showMultiple = true;
+        }
+    } while (false);
+
+    return rc;
+}
+
+static rc_t ParamsGetNextParam(Params* prm, const char** param) {
+    rc_t rc = 0;
+    assert(prm && param);
+    *param = NULL;
+    if (prm->argsParamIdx < prm->argsParamCnt) {
+        rc = ArgsParamValue(prm->args, prm->argsParamIdx++, (const void **)param);
+        if (rc)
+        {   LOGERR(klogErr, rc, "Failure retrieving query"); }
+    }
+    return rc;
+}
+
+static rc_t ParamsDestruct(Params* prm) {
+    rc_t rc = 0;
+    assert(prm);
+    RELEASE(Args, prm->args);
+    return rc;
+}
+
+static
+rc_t privReadStdinLine(char* buf, size_t bsize, bool destroy)
+{
+    rc_t rc = 0;
+    static const KFile* std_in = NULL;
+    static uint64_t pos = 0;
+    size_t num_read = 0;
+    if (destroy) {
+        RELEASE(KFile, std_in);
+        pos = 0;
+        return rc;
+    }
+    if (std_in == NULL) {
+        rc = KFileMakeStdIn(&std_in);
+        if (rc != 0) {
+            DISP_RC(rc, "KFileMakeStdIn");
+            return rc;
+        }
+    }
+    rc = KFileRead(std_in, pos, buf, bsize, &num_read);
+    DISP_RC(rc, "KFileRead");
+    pos += num_read;
+    if (num_read) {
+        bool done = false;
+        buf[num_read] = '\0';
+        while (num_read > 0 && !done) {
+            switch (buf[num_read - 1]) {
+                case '\n':
+                case '\r':
+                    buf[--num_read] = '\0';
+                    break;
+                default:
+                    done = true;
+                    break;
+            }
+        }
+    }
+    return rc;
+}
+
+static rc_t ReadStdinLine(char* buf, size_t bsize) {
+    return privReadStdinLine(buf, bsize, false);
+}
+
+static rc_t DestroyStdin(void)
+{   return privReadStdinLine(NULL, 0, true); }
+
+static rc_t In(const char* prompt, const char* def, char** read) {
+    rc_t rc = 0;
+    char buf[PATH_MAX + 1];
+    assert(prompt && read);
+    *read = NULL;
+    while (rc == 0 && (*read == NULL || read[0] == '\0')) {
+        OUTMSG(("%s", prompt));
+        if (def)
+        {   OUTMSG((" [%s]", def)); }
+        OUTMSG((": "));
+        rc = ReadStdinLine(buf, sizeof buf);
+        if (rc == 0) {
+            while (strlen(buf) > 0) {
+                char c = buf[strlen(buf) - 1];
+                if (c == '\n' || c == '\r')
+                {   buf[strlen(buf) - 1] = '\0'; }
+                else
+                {   break; }
+            }
+            if (buf[0] == '\0' && def != NULL) {
+                string_copy_measure(buf, sizeof buf, def);
+            }
+            if (buf[0]) {
+                *read = strdup(buf);
+                if (*read == NULL) {
+                    rc = RC
+                        (rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted);
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+static rc_t CC scan_config_dir(const KDirectory* dir,
+    uint32_t type, const char* name, void* data)
+{
+    rc_t rc = 0;
+    assert(data);
+    switch (type) {
+        case kptFile:
+        case kptFile | kptAlias: {
+            size_t sz = strlen(name);
+            if (sz >= 5 && strcase_cmp(&name[sz - 4], 4, ".kfg", 4, 4) == 0) {
+                string_copy_measure(data, PATH_MAX + 1, name);
+                                  /* from CreateConfig..KDirectoryVVisit call */
+                rc = RC(rcExe, rcDirectory, rcListing, rcFile, rcExists);
+            }
+            break;
+        }
+    }
+    return rc;
+}
+
+static rc_t CreateConfig(char* argv0) {
+    const KFile* std_in = NULL;
+    KDirectory* native = NULL;
+    KDirectory* dir = NULL;
+    rc_t rc = 0;
+    char* location = NULL;
+    char* mod = NULL;
+    char* wmod = NULL;
+    char* refseq = NULL;
+    if (rc == 0) {
+        rc = KDirectoryNativeDir(&native);
+    }
+    if (rc == 0) {
+        const char* def = NULL;
+        char cwd[PATH_MAX + 1] = "";
+        const char* home = getenv("HOME");
+        if (home)
+        {   def = home; }
+        else {
+            rc = KDirectoryResolvePath ( native, true, cwd, sizeof cwd, "." );
+            if (rc == 0 && cwd[0])
+            {   def = cwd; }
+            else
+            {   def = "."; }
+        }
+        while (rc == 0) {
+            char buffer[PATH_MAX + 1];
+            rc = In("Specify configuration files directory", def, &location);
+            if (rc == 0) {
+                rc = KDirectoryOpenDirUpdate(native, &dir, false, "%s", location);
+                if (rc == 0) {
+                    rc = KDirectoryVisit
+                        (dir, false, scan_config_dir, buffer, ".");
+                    if (rc != 0) {
+                        if (rc ==
+                             RC(rcExe, rcDirectory, rcListing, rcFile, rcExists)
+                            && buffer[0])
+                        {
+                            PLOGERR(klogErr, (klogErr, rc,
+                                "Configuration file found: $(dir)/$(name)",
+                                "dir=%s,name=%s", location, buffer));
+                            rc = 0;
+                            buffer[0] = '\0';
+                            continue;
+                        }
+                        else {
+                            PLOGERR(klogErr, (klogErr, rc, "$(dir)/$(name)",
+                                "dir=%s,name=%s", location, buffer));
+                        }
+                    }
+                    break;
+                }
+                else if (GetRCObject(rc) == (enum RCObject)rcPath &&
+                    (GetRCState(rc) == rcIncorrect || GetRCState(rc) == rcNotFound))
+                {
+                    PLOGERR(klogErr,
+                        (klogErr, rc, "$(path)", "path=%s", location));
+                    rc = 0;
+                }
+                else { DISP_RC(rc, location); }
+            }
+        }
+    }
+    while (rc == 0) {
+        const KDirectory* dir = NULL;
+        rc = In("Specify refseq installation directory", NULL, &refseq);
+        if (rc != 0)
+        {   break; }
+        rc = KDirectoryOpenDirRead(native, &dir, false, "%s", refseq);
+        if (rc == 0) {
+            RELEASE(KDirectory, dir);
+            break;
+        }
+        else if (GetRCObject(rc) == (enum RCObject)rcPath
+              && GetRCState(rc) == rcIncorrect)
+        {
+            PLOGERR(klogErr,
+                (klogErr, rc, "$(path)", "path=%s", refseq));
+            rc = 0;
+        }
+        DISP_RC(rc, refseq);
+    }
+    if (rc == 0) {
+        char buffer[512];
+        const char path[] = "vdb-config.kfg";
+        uint64_t pos = 0;
+        KFile* f = NULL;
+        rc = KDirectoryCreateFile(dir, &f, false, 0664, kcmCreate, "%s", path);
+        DISP_RC(rc, path);
+        if (rc == 0) {
+            int n = snprintf(buffer, sizeof buffer,
+                "refseq/servers = \"%s\"\n", refseq);
+            if (n >= sizeof buffer) {
+                rc = RC(rcExe, rcFile, rcWriting, rcBuffer, rcInsufficient);
+            }
+            else {
+                size_t num_writ = 0;
+                rc = KFileWrite(f, pos, buffer, strlen(buffer), &num_writ);
+                pos += num_writ;
+            }
+        }
+        if (rc == 0) {
+            const char buffer[] = "refseq/volumes = \".\"\n";
+            size_t num_writ = 0;
+            rc = KFileWrite(f, pos, buffer, strlen(buffer), &num_writ);
+            pos += num_writ;
+        }
+        if (rc == 0 && mod && mod[0]) {
+            int n = snprintf(buffer, sizeof buffer,
+                "vdb/module/paths = \"%s\"\n", mod);
+            if (n >= sizeof buffer) {
+                rc = RC(rcExe, rcFile, rcWriting, rcBuffer, rcInsufficient);
+            }
+            else {
+                size_t num_writ = 0;
+                rc = KFileWrite(f, pos, buffer, strlen(buffer), &num_writ);
+                pos += num_writ;
+            }
+        }
+        if (rc == 0 && wmod && wmod[0]) {
+            int n = snprintf(buffer, sizeof buffer,
+                "vdb/wmodule/paths = \"%s\"\n", wmod);
+            if (n >= sizeof buffer) {
+                rc = RC(rcExe, rcFile, rcWriting, rcBuffer, rcInsufficient);
+            }
+            else {
+                size_t num_writ = 0;
+                rc = KFileWrite(f, pos, buffer, strlen(buffer), &num_writ);
+                pos += num_writ;
+            }
+        }
+        RELEASE(KFile, f);
+    }
+    free(mod);
+    free(wmod);
+    free(refseq);
+    free(location);
+    RELEASE(KDirectory, dir);
+    RELEASE(KDirectory, native);
+    RELEASE(KFile, std_in);
+    DestroyStdin();
+    return rc;
+}
+
+#if 0
+static rc_t ShowModules(const KConfig* cfg, const Params* prm) {
+    rc_t rc = 0;
+#ifdef _STATIC
+    OUTMSG(("<!-- Modules are not used in static build -->\n"));
+#else
+    const VDBManager* mgr = NULL;
+    KNamelist* list = NULL;
+    OUTMSG(("<!-- Modules -->\n"));
+    rc = VDBManagerMakeRead(&mgr, NULL);
+    DISP_RC(rc, "while calling VDBManagerMakeRead");
+    if (rc == 0) {
+        rc = VDBManagerListExternalSchemaModules(mgr, &list);
+        DISP_RC(rc, "while calling VDBManagerListExternalSchemaModules");
+    }
+    if (rc == 0) {
+        uint32_t count = 0;
+        rc = KNamelistCount(list, &count);
+        DISP_RC(rc, "while calling KNamelistCount "
+            "on VDBManagerListExternalSchemaModules result");
+        if (rc == 0) {
+            int64_t i = 0;
+            for (i = 0; i < count && rc == 0; ++i) {
+                const char* name = NULL;
+                rc = KNamelistGet(list, i, &name);
+                DISP_RC(rc, "while calling KNamelistGet "
+                    "on VDBManagerListExternalSchemaModules result");
+                if (rc == 0) {
+                    OUTMSG(("%s\n", name));
+                }
+            }
+        }
+    }
+    OUTMSG(("\n"));
+    RELEASE(KNamelist, list);
+    RELEASE(VDBManager, mgr);
+#endif
+    return rc;
+}
+#endif
+
+static rc_t SetNode(KConfig* cfg, const Params* prm) {
+    rc_t rc = 0;
+
+    KConfigNode* node = NULL;
+    char* name = NULL;
+    char* val  = NULL;
+
+    assert(cfg && prm && prm->setValue);
+
+    if (is_iser_an_admin() && !prm->modeRoot) {
+        rc = RC(rcExe, rcNode, rcUpdating, rcCondition, rcViolated);
+        LOGERR(klogErr, rc, "Warning: "
+            "normally this application should not be run as root/superuser");
+    }
+
+    name = strdup(prm->setValue);
+    if (name == NULL)
+    {   return RC(rcExe, rcStorage, rcAllocating, rcMemory, rcExhausted); }
+
+    val = strchr(name, '=');
+    if (val == NULL || *(val + 1) == '\0') {
+        rc_t rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInvalid);
+        LOGERR(klogErr, rc, "Bad " OPTION_SET " value");
+    }
+
+    if (rc == 0) {
+        *(val++) = '\0';
+
+        rc = KConfigOpenNodeUpdate(cfg, &node, "%s", name);
+        if (rc != 0) {
+            PLOGERR(klogErr, (klogErr, rc,
+                "Cannot open node '$(name)' for update", "name=%s", name));
+        }
+    }
+
+    if (rc == 0) {
+        assert(val);
+        rc = KConfigNodeWrite(node, val, strlen(val));
+        if (rc != 0) {
+            PLOGERR(klogErr, (klogErr, rc,
+                "Cannot write value '$(val) to node '$(name)'",
+                "val=%s,name=%s", val, name));
+        }
+    }
+
+    if (rc == 0) {
+        rc = KConfigCommit(cfg);
+        DISP_RC(rc, "while calling KConfigCommit");
+    }
+
+    free(name);
+    name = NULL;
+
+    RELEASE(KConfigNode, node);
+    return rc;
+}
+
+static rc_t SetProxy(KConfig *cfg, const Params *prm) {
+    rc_t rc = 0;
+
+    bool disabled = false;
+    bool set = false;
+    bool disableSet = false;
+
+    assert(prm);
+
+    switch (prm->proxyDisabled) {
+        case eNo:
+            disabled = false;
+            break;
+        case eYes:
+            disabled = true;
+            break;
+        default:
+            break;
+    }
+
+    if (prm->proxy != NULL) {
+        rc = KConfig_Set_Http_Proxy_Path(cfg, prm->proxy);
+        set = true;
+
+        if (rc == 0 && prm->proxyDisabled == eUndefined) {
+            rc = KConfig_Set_Http_Proxy_Enabled(cfg, true);
+        }
+    }
+
+    if (prm->proxyDisabled != eUndefined) {
+        rc_t r2 = KConfig_Set_Http_Proxy_Enabled(cfg, ! disabled);
+        disableSet = true;
+        if (r2 != 0 && rc == 0) {
+            rc = r2;
+        }
+    }
+
+    if (rc == 0) {
+        rc = KConfigCommit(cfg);
+        DISP_RC(rc, "while calling KConfigCommit");
+    }
+    if (rc == 0) {
+        if (set) {
+            OUTMSG(("Use HTTP proxy server configuration '%s'\n", prm->proxy));
+        }
+        if (disableSet) {
+            OUTMSG(("HTTP proxy was %s\n", disabled ? "disabled" : "enabled"));
+        }
+    }
+    else {
+        LOGERR(klogErr, rc, "Failed to update HTTP proxy configuration");
+    }
+
+    return rc;
+}
+
+static rc_t ShowConfig(const KConfig* cfg, Params* prm) {
+    rc_t rc = 0;
+    bool hasAny = false;
+    bool hasQuery = false;
+    bool xml = true;
+    assert(cfg && prm);
+    xml = prm->xml;
+    while (rc == 0) {
+        KNamelist* names = NULL;
+        const KConfigNode* node = NULL;
+        uint32_t count = 0;
+        uint32_t i = 0;
+        int indent = 0;
+        const char* root = NULL;
+        const char* nodeName = NULL;
+        size_t nodeNameL = 1;
+        rc = ParamsGetNextParam(prm, &root);
+        if (rc == 0) {
+            if (root == NULL) {
+                if (hasQuery)
+                {   break; }
+                else
+                {   root = "/"; }
+            }
+            else { hasQuery = true; }
+            assert(root);
+        }
+        if (rc == 0) {
+            int64_t len = strlen(root);
+            assert(len > 0);
+            while (len > 0) {
+                if (root[len - 1] == '/')
+                {   --len; }
+                else { break; }
+            }
+            assert(len >= 0);
+            if (len == 0) {
+                root += strlen(root) - 1;
+                nodeName = root;
+            }
+            else {
+                char *c = memrchr(root, '/', len);
+                if (c != NULL) {
+                    nodeName = c + 1;
+                }
+                else {
+                    nodeName = root;
+                }
+            }
+            assert(nodeName && nodeName[0]);
+            nodeNameL = strlen(nodeName);
+            while (nodeNameL > 1 && nodeName[nodeNameL - 1] == '/')
+            {   --nodeNameL; }
+        }
+
+        if (rc == 0) {
+            rc = KConfigOpenNodeRead(cfg, &node, "%s", root);
+            DISP_RC(rc, root);
+        }
+        if (rc == 0) {
+            rc = KConfigNodeListChild(node, &names);
+        }
+        if (rc == 0) {
+            rc = KNamelistCount(names, &count);
+        }
+        if (rc == 0 && count == 0) {
+            char buf[512] = "";
+            size_t num_read = 0;
+            rc = KConfigNodeReadData(node, buf, sizeof buf, &num_read);
+            if (rc == 0 && num_read > 0) {
+                if (prm->showMultiple)
+                {   OUTMSG(("<!-- Configuration node %s -->\n", root)); }
+                if (xml) {
+                    VDB_CONGIG_OUTMSG(("<%.*s>", nodeNameL, nodeName));
+                    VDB_CONGIG_OUTMSG(("%.*s", (int)num_read, buf));
+                    VDB_CONGIG_OUTMSG(("</%.*s>\n", nodeNameL, nodeName));
+                }
+                else {
+                    OUTMSG(("%.*s = \"%.*s\"\n",
+                        nodeNameL, nodeName, (int)num_read, buf));
+                }
+                hasAny = true;
+            }
+        }
+        else {
+            if (rc == 0) {
+                if (nodeName[0] != '/') {
+                    if (prm->showMultiple)
+                    {   OUTMSG(("<!-- Configuration node %s -->\n", root)); }
+                    VDB_CONGIG_OUTMSG(("<%.*s>\n", nodeNameL, nodeName));
+                } else {
+                    if (prm->showMultiple)
+                    {   OUTMSG(("<!-- Current configuration -->\n")); }
+                    VDB_CONGIG_OUTMSG(("<Config>\n"));
+                }
+                hasAny = true;
+                ++indent;
+            }
+            for (i = 0; i < count && rc == 0; ++i) {
+                const char* name = NULL;
+                if (rc == 0)
+                {   rc = KNamelistGet(names, i, &name); }
+                if (rc == 0) {
+                    char* fullname = NULL;
+                    if (strcmp(root, "/") == 0) {
+                        size_t bsize = strlen(name) + 2;
+                        fullname = malloc(bsize);
+                        if (fullname == NULL) {
+                            rc = RC(rcExe,
+                                rcStorage, rcAllocating, rcMemory, rcExhausted);
+                        }
+                        string_printf(fullname, bsize, NULL, "/%s", name);
+                    }
+                    else {
+                        size_t sz = strlen(root) + 2 + strlen(name);
+                        size_t num_writ = 0;
+                        fullname = malloc(sz);
+                        if (fullname == NULL) {
+                            rc = RC(rcExe,
+                                rcStorage, rcAllocating, rcMemory, rcExhausted);
+                        }
+                        rc = string_printf(fullname, sz, &num_writ,
+                            "%s/%s", root, name);
+                        assert(num_writ + 1 == sz);
+                    }
+                    if (rc == 0) {
+                        rc = KConfigNodePrintChildNames
+                            (xml, node, name, indent, fullname);
+                        hasAny = true;
+                    }
+                    free(fullname);
+                    fullname = NULL;
+                }
+            }
+            if (rc == 0) {
+                if (nodeName[0] != '/') {
+                    VDB_CONGIG_OUTMSG(("</%.*s>\n", nodeNameL, nodeName));
+                }
+                else {
+                    VDB_CONGIG_OUTMSG(("</Config>\n"));
+                }
+            }
+        }
+
+        RELEASE(KConfigNode, node);
+        RELEASE(KNamelist, names);
+
+        if (rc == 0) {
+            if (hasAny) {
+                OUTMSG(("\n"));
+            }
+            else if (nodeNameL > 0 && nodeName != NULL) {
+                VDB_CONGIG_OUTMSG(("<%.*s/>\n", nodeNameL, nodeName));
+            }
+        }
+
+        if (!hasQuery)
+        {   break; }
+    }
+
+    return rc;
+}
+
+static rc_t ShowFiles(const KConfig* cfg, const Params* prm) {
+    rc_t rc = 0;
+    bool hasAny = false;
+    uint32_t count = 0;
+    KNamelist* names = NULL;
+    rc = KConfigListIncluded(cfg, &names);
+    if (rc == 0) {
+        rc = KNamelistCount(names, &count);
+    }
+    if (rc == 0) {
+        uint32_t i = 0;
+
+        if (prm->showMultiple) {
+            if (prm->xml) {
+                OUTMSG(("<ConfigurationFiles>\n"));
+            }
+            else {
+                OUTMSG(("<!-- Configuration files -->\n"));
+            }
+            hasAny = true;
+        }
+
+        for (i = 0; i < count && rc == 0; ++i) {
+            const char* name = NULL;
+            if (rc == 0) {
+                rc = KNamelistGet(names, i, &name);
+            }
+            if (rc == 0) {
+                OUTMSG(("%s\n", name));
+                hasAny = true;
+            }
+        }
+    }
+    if (prm->showMultiple && prm->xml) {
+        OUTMSG(("</ConfigurationFiles>"));
+    }
+
+    if (rc == 0 && hasAny) {
+        OUTMSG(("\n"));
+    }
+
+    RELEASE(KNamelist, names);
+
+    return rc;
+}
+
+static void ShowEnv(const Params* prm) {
+    bool hasAny = false;
+    const char * env_list [] = {
+        "KLIB_CONFIG",
+        "LD_LIBRARY_PATH",
+        "NCBI_HOME",
+        "NCBI_SETTINGS",
+        "NCBI_VDB_CONFIG",
+        "VDBCONFIG",
+        "VDB_CONFIG",
+    };
+    int i = 0;
+
+    if (prm->showMultiple) {
+        if (prm->xml) {
+            OUTMSG(("<Environment>\n"));
+        }
+        else {
+            OUTMSG(("<!-- Environment -->\n"));
+        }
+        hasAny = true;
+    }
+
+    for (i = 0; i < sizeof env_list / sizeof env_list [ 0 ]; ++ i ) {
+        const char *eval = getenv ( env_list [ i ] );
+        if (eval) {
+            OUTMSG(("%s=%s\n", env_list [ i ], eval));
+            hasAny = true;
+        }
+    }
+    if (prm->showMultiple && prm->xml) {
+        OUTMSG(("</Environment>"));
+    }
+    if (hasAny) {
+        OUTMSG(("\n"));
+    }
+    else {
+        OUTMSG(("Environment variables are not found\n"));
+    }
+}
+
+static rc_t _VFSManagerSystem2PosixPath(const VFSManager *self,
+    const char *system, char posix[PATH_MAX])
+{
+    VPath *path = NULL;
+    rc_t rc = VFSManagerMakeSysPath(self, &path, system);
+    if (rc == 0) {
+        size_t written;
+        rc = VPathReadPath(path, posix, PATH_MAX, &written);
+    }
+    RELEASE(VPath, path);
+    return rc;
+}
+
+static rc_t DefaultPepoLocation(const KConfig *cfg,
+    uint32_t id, char *buffer, size_t bsize)
+{
+    rc_t rc = 0;
+    char home[PATH_MAX] = "";
+    size_t written = 0;
+    assert(buffer && bsize);
+    rc = KConfig_Get_Default_User_Path(cfg, home, sizeof home, &written);
+    if (rc == 0 && written > 0) {
+        rc = string_printf(buffer, bsize, &written, "%s/dbGaP-%u", home, id);
+        if (rc == 0) {
+            return rc;
+        }
+    }
+
+    rc = KConfig_Get_Home(cfg, home, sizeof home, &written);
+    if (rc == 0 && written > 0) {
+        rc = string_printf(buffer, bsize, &written,
+            "%s/ncbi/dbGaP-%u", home, id);
+        if (rc == 0) {
+            return rc;
+        }
+    }
+
+    {
+        VFSManager *vmgr = NULL;
+        rc = VFSManagerMake(&vmgr);
+        if (rc == 0) {
+            const char *home = getenv("HOME");
+            if (home == NULL) {
+                home = getenv("USERPROFILE");
+            }
+            if (home == NULL) {
+#define TODO 1
+                rc = TODO;
+            }
+            else {
+                size_t num_writ = 0;
+                char posix[PATH_MAX] = "";
+                rc = _VFSManagerSystem2PosixPath(vmgr, home, posix);
+                if (rc == 0) {
+                    rc = string_printf(buffer, bsize, &num_writ,
+                        "%s/ncbi/dbGaP-%u", posix, id);
+                    if (rc == 0) {
+                        return rc;
+                    }
+                }
+            }
+        }
+        RELEASE(VFSManager, vmgr);
+    }
+
+    return rc;
+}
+
+static rc_t DoImportNgc(KConfig *cfg, Params *prm,
+    const char **newRepoParentPath, uint32_t *result_flags)
+{
+    rc_t rc = 0;
+    KDirectory *dir = NULL;
+    const KFile *src = NULL;
+    const KNgcObj *ngc = NULL;
+    static char buffer[PATH_MAX] = "";
+    const char *root = NULL;
+    KRepositoryMgr *rmgr = NULL;
+
+    assert(prm);
+    if (rc == 0) {
+        rc = KDirectoryNativeDir(&dir);
+    }
+    if (rc == 0) {
+        rc = KDirectoryOpenFileRead(dir, &src, "%s", prm->ngc);
+    }
+    if (rc == 0) {
+        rc = KNgcObjMakeFromFile(&ngc, src);
+    }
+    RELEASE(KFile, src);
+
+    if (rc == 0) {
+        uint32_t id = 0;
+        rc = KNgcObjGetProjectId(ngc, &id);
+        if (rc == 0) {
+            const char *p = NULL;
+            rc = ParamsGetNextParam(prm, &p);
+            if (rc == 0 && p != NULL) {
+                rc = KDirectoryResolvePath(dir, true, buffer, sizeof buffer, p);
+                if (rc == 0) {
+                    root = buffer;
+                }
+            }
+            else {
+                rc = DefaultPepoLocation(cfg, id, buffer, sizeof buffer);
+                if (rc == 0) {
+                    root = buffer;
+                }
+            }
+        }
+    }
+    RELEASE(KDirectory, dir);
+    if (rc == 0) {
+        rc = KConfigMakeRepositoryMgrUpdate(cfg, &rmgr);
+    }
+    if (rc == 0) {
+        assert(root);
+        rc = KRepositoryMgrImportNgcObj(rmgr, ngc, root,
+            INP_CREATE_REPOSITORY | INP_UPDATE_DNLD_TICKET | INP_UPDATE_ROOT,
+            result_flags);
+    }
+
+    *newRepoParentPath = root;
+    RELEASE(KNgcObj, ngc);
+    RELEASE(KRepositoryMgr, rmgr);
+    return rc;
+}
+
+static rc_t ImportNgc(KConfig *cfg, Params *prm) {
+    const char *newRepoParentPath = NULL;
+    uint32_t result_flags = 0;
+    rc_t rc = 0;
+    assert(prm);
+    rc = DoImportNgc(cfg, prm, &newRepoParentPath, &result_flags);
+    DISP_RC2(rc, "cannot import ngc file", prm->ngc);
+    if (rc == 0 && result_flags != 0) {
+        rc = KConfigCommit(cfg);
+    }
+    if (rc == 0) {
+#if WINDOWS
+        char ngcPath[PATH_MAX] = "";
+        char system[MAX_PATH] = "";
+#endif          
+        KDirectory *wd = NULL;
+        const char *ngc = prm->ngc;
+        rc_t rc = KDirectoryNativeDir(&wd);
+#if WINDOWS
+        if (rc == 0) {
+            rc = KDirectoryPosixStringToSystemString(wd,
+                system, sizeof system, "%s", newRepoParentPath);
+            if (rc == 0) {
+                newRepoParentPath = system;
+            }
+            rc = KDirectoryPosixStringToSystemString(wd,
+                ngcPath, sizeof ngcPath, "%s", ngc);
+            if (rc == 0) {
+                ngc = ngcPath;
+            }
+        }
+#endif          
+        if (wd) {
+            if (KDirectoryPathType(wd, newRepoParentPath)
+                == kptNotFound)
+            {
+                KDirectoryCreateDir(wd, 0775,
+                    kcmCreate | kcmParents, newRepoParentPath);
+            }
+        }
+
+        if (result_flags == 0) {
+            OUTMSG((
+                "%s was already imported.\nProtected repository is: '%s'.\n",
+                ngc, newRepoParentPath));
+        }
+        else {
+            if (result_flags & INP_CREATE_REPOSITORY) {
+                OUTMSG((
+                    "%s was imported.\nNew protected repository was created.\n"
+                    "Repository directory is: '%s'.\n",
+                    ngc, newRepoParentPath));
+            }
+            else {
+                OUTMSG((
+                    "%s was imported.\nProtected repository was updated.\n"
+                    "Repository directory is: '%s'.\n",
+                    ngc, newRepoParentPath));
+            }
+        }
+
+        RELEASE(KDirectory, wd);
+    }
+    return rc;
+}
+
+rc_t CC KMain(int argc, char* argv[]) {
+    rc_t rc = 0;
+
+    Params prm;
+    KConfig* cfg = NULL;
+
+    if (rc == 0) {
+        rc = ParamsConstruct(argc, argv, &prm);
+    }
+
+    if (rc == 0) {
+        const KDirectory *d = NULL;
+        if (prm.cfg_dir != NULL) {
+            KDirectory *n = NULL;
+            rc = KDirectoryNativeDir(&n);
+            if (rc == 0) {
+                rc = KDirectoryOpenDirRead(n, &d, false, prm.cfg_dir);
+                DISP_RC2(rc, "while opening", prm.cfg_dir);
+            }
+            RELEASE(KDirectory, n);
+        }
+        if (rc == 0) {
+            rc = KConfigMake(&cfg, d);
+            DISP_RC(rc, "while calling KConfigMake");
+        }
+        RELEASE(KDirectory, d);
+    }
+
+    if (rc == 0 && prm.showMultiple && prm.xml) {
+        OUTMSG(("<VdbConfig>\n"));
+    }
+
+    if (rc == 0) {
+        if (prm.modeConfigure) {
+            rc = configure(prm.configureMode);
+        }
+        else if (prm.ngc) {
+            rc = ImportNgc(cfg, &prm);
+        }
+        else if (prm.modeSetNode) {
+            rc_t rc3 = SetNode(cfg, &prm);
+            if (rc3 != 0 && rc == 0) {
+                rc = rc3;
+            }
+        }
+        if (prm.proxy != NULL || prm.proxyDisabled != eUndefined) {
+            rc_t rc3 = SetProxy(cfg, &prm);
+            if (rc3 != 0 && rc == 0) {
+                rc = rc3;
+            }
+        }
+        if (prm.modeShowCfg) {
+            rc_t rc3 = ShowConfig(cfg, &prm);
+            if (rc3 != 0 && rc == 0) {
+                rc = rc3;
+            }
+        }
+        if (prm.modeShowFiles) {
+            rc_t rc3 = ShowFiles(cfg, &prm);
+            if (rc3 != 0 && rc == 0) {
+                rc = rc3;
+            }
+        }
+        if (prm.modeShowLoadPath) {
+            const char* path = NULL;
+            rc_t rc3 = KConfigGetLoadPath(cfg, &path);
+            if (rc3 == 0) {
+                if (path != NULL && path[0]) {
+                    OUTMSG(("%s\n", path));
+                }
+            }
+            else if (rc == 0) {
+                rc = rc3;
+            }
+        }
+    }
+
+    if (prm.modeShowEnv) {
+        ShowEnv(&prm);
+    }
+
+    if (rc == 0 && prm.showMultiple && prm.xml) {
+        OUTMSG(("</VdbConfig>\n"));
+    }
+
+    RELEASE(KConfig, cfg);
+
+    if (rc == 0 && prm.modeCreate) {
+        rc = CreateConfig(argv[0]);
+    }
+
+    ParamsDestruct(&prm);
+    return rc;
+}
+
+/************************************* EOF ************************************/
diff --git a/tools/vdb-config/vdb-config2.cpp b/tools/vdb-config/vdb-config2.cpp
new file mode 100644
index 0000000..e8787b4
--- /dev/null
+++ b/tools/vdb-config/vdb-config2.cpp
@@ -0,0 +1,30 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+
+/*
+    code is now in interactive.cpp
+*/
diff --git a/tools/vdb-config/vdb-config2.h b/tools/vdb-config/vdb-config2.h
new file mode 100644
index 0000000..fc0eda6
--- /dev/null
+++ b/tools/vdb-config/vdb-config2.h
@@ -0,0 +1,29 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+/*
+    code is now in interactive.h
+*/
diff --git a/tools/vdb-copy/.gitignore b/tools/vdb-copy/.gitignore
new file mode 100644
index 0000000..fc8361c
--- /dev/null
+++ b/tools/vdb-copy/.gitignore
@@ -0,0 +1,17 @@
+*.txt
+*.sh
+*.dump
+*.kar
+*.tar
+*.vdb
+454_FASTQ_1
+newtab
+with_rev
+temp1
+temp2
+temp4
+t1
+t2
+t3
+t5
+t6
diff --git a/tools/vdb-copy/Makefile b/tools/vdb-copy/Makefile
new file mode 100644
index 0000000..c0a6494
--- /dev/null
+++ b/tools/vdb-copy/Makefile
@@ -0,0 +1,91 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/vdb-copy
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+	vdb-copy
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# vdb-copy
+#  vdb copy tool
+#
+$(BINDIR)/vdb-copy: $(NCBIDIR)/vdb-copy.kfg 
+
+$(NCBIDIR)/vdb-copy.kfg: $(SRCDIR)/vdb-copy.kfg
+	cp $^ $@
+
+VDB_COPY_SRC = \
+	context \
+	helper \
+	coldefs \
+	get_platform \
+	namelist_tools \
+	copy_meta \
+	type_matcher \
+	redactval \
+	config_values \
+	vdb-copy
+
+VDB_COPY_OBJ = \
+	$(addsuffix .$(OBJX),$(VDB_COPY_SRC))
+
+VDB_COPY_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-wvdb \
+	-lm
+
+$(BINDIR)/vdb-copy: $(VDB_COPY_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(VDB_COPY_LIB)
diff --git a/tools/vdb-copy/coldefs.c b/tools/vdb-copy/coldefs.c
new file mode 100644
index 0000000..ff116fb
--- /dev/null
+++ b/tools/vdb-copy/coldefs.c
@@ -0,0 +1,775 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "coldefs.h"
+#include "helper.h"
+#include "definitions.h"
+
+#include <klib/text.h>
+#include <klib/printf.h>
+
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+
+/* allocate a column-definition */
+static p_col_def col_defs_init_col( const char* name )
+{
+    p_col_def res = NULL;
+    if ( name == NULL ) return res;
+    if ( name[0] == 0 ) return res;
+    res = calloc( 1, sizeof( col_def ) );
+    /* because of calloc all members are zero! */
+    if ( res != NULL )
+        res->name = string_dup_measure ( name, NULL );
+    return res;
+}
+
+
+/*
+ * helper-function for: col_defs_destroy
+ * - free's everything a node owns
+ * - free's the node
+*/
+static void CC col_defs_destroy_node( void* node, void* data )
+{
+    p_col_def p_node = (p_col_def)node;
+    if ( p_node != NULL )
+    {
+        if ( p_node->name != NULL )
+            free( p_node->name );
+        if ( p_node->src_cast )
+            free( p_node->src_cast );
+        if ( p_node->dst_cast )
+            free( p_node->dst_cast );
+        free( p_node );
+    }
+}
+
+
+/*
+ * initializes a column-definitions-list
+*/
+rc_t col_defs_init( col_defs** defs )
+{
+    if ( defs == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcSelf, rcNull );
+    (*defs) = calloc( 1, sizeof( col_defs ) );
+    if ( *defs == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+    VectorInit( &((*defs)->cols), 0, 5 );
+    (*defs)->filter_idx = -1;
+    return 0;
+}
+
+
+/*
+ * destroys the column-definitions-list
+*/
+rc_t col_defs_destroy( col_defs* defs )
+{
+    if ( defs == NULL )
+        return RC( rcVDB, rcNoTarg, rcDestroying, rcSelf, rcNull );
+    VectorWhack( &(defs->cols), col_defs_destroy_node, NULL );
+    free( defs );
+    return 0;
+}
+
+
+/*
+ * helper-function for: col_defs_parse_string / col_defs_extract_from_table
+ * - creates a column-definition by the column-name
+ * - adds the definition to the column-definition-vector
+*/
+static rc_t col_defs_append_col( col_defs* defs, const char* name )
+{
+    rc_t rc;
+    p_col_def new_col = col_defs_init_col( name );
+    if ( new_col == NULL )
+        rc = RC( rcVDB, rcNoTarg, rcParsing, rcMemory, rcExhausted );
+    else
+        rc = VectorAppend( &(defs->cols), NULL, new_col );
+    return rc;
+}
+
+
+/*
+ * calls VTableListReadableColumns to get a list of all column-names of the table
+ * creates a temporary read-cursor to test and get the column-type
+ * walks the KNamelist with the available column-names
+ * tries to add every one of them to the temp. cursor
+ * if the column can be added to the cursor, it is appended
+ * to the column-definition list
+*/
+rc_t col_defs_extract_from_table( col_defs* defs, const VTable *table )
+{
+    KNamelist *names;
+    rc_t rc;
+
+    if ( defs == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    if ( table == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+
+    rc = VTableListReadableColumns( table, &names );
+    DISP_RC( rc, "col_defs_extract_from_table:VTableListReadableColumns() failed" );
+    if ( rc == 0 )
+    {
+        const VCursor *cursor;
+        rc = VTableCreateCursorRead( table, &cursor );
+        DISP_RC( rc, "col_defs_extract_from_table:VTableCreateCursorRead() failed" );
+        if ( rc == 0 )
+        {
+            uint32_t count;
+            rc = KNamelistCount( names, &count );
+            DISP_RC( rc, "col_defs_extract_from_table:KNamelistCount() failed" );
+            if ( rc == 0 )
+            {
+                uint32_t idx;
+                for ( idx = 0; idx < count && rc == 0; ++idx )
+                {
+                    const char *name;
+                    rc = KNamelistGet( names, idx, &name );
+                    DISP_RC( rc, "col_defs_extract_from_table:KNamelistGet() failed" );
+                    if ( rc == 0 )
+                    {
+                        uint32_t temp_idx;
+                        rc_t rc1 = VCursorAddColumn( cursor, &temp_idx, "%s", name );
+                        DISP_RC( rc1, "col_defs_extract_from_table:VCursorAddColumn() failed" );
+                        if ( rc1 == 0 )
+                        {
+                            rc = col_defs_append_col( defs, name );
+                            DISP_RC( rc, "col_defs_extract_from_table:col_defs_append_col() failed" );
+                        }
+                    }
+                }
+            }
+            rc = VCursorRelease( cursor );
+            DISP_RC( rc, "col_defs_extract_from_table:VCursorRelease() failed" );
+        }
+        rc = KNamelistRelease( names );
+        DISP_RC( rc, "col_defs_extract_from_table:KNamelistRelease() failed" );
+    }
+    return rc;
+}
+
+
+rc_t col_defs_clear_to_copy( col_defs* defs )
+{
+    rc_t rc = 0;
+    uint32_t idx, len;
+
+    if ( defs == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    len = VectorLength( &(defs->cols) );
+    for ( idx = 0;  idx < len && rc == 0; ++idx )
+    {
+        p_col_def item = (p_col_def) VectorGet ( &(defs->cols), idx );
+        if ( item != NULL )
+            item->to_copy = false;
+    }
+    return rc;
+}
+
+
+/*
+ * walks the list of column-definitions and tries to add all off them
+ * to the given cursor, it stops if one of them fails to be added
+ * for every column it detects type_decl and type_desc
+ * if both calls are successful the column-def is marked as valid
+*/
+rc_t col_defs_add_to_rd_cursor( col_defs* defs, const VCursor *cursor, bool show )
+{
+    rc_t rc = 0;
+    uint32_t idx, len;
+    
+    if ( defs == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    if ( cursor == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+
+    len = VectorLength( &(defs->cols) );
+    for ( idx = 0;  idx < len && rc == 0; ++idx )
+    {
+        p_col_def col = (p_col_def) VectorGet ( &(defs->cols), idx );
+        if ( col != NULL )
+        {
+            if ( col->src_cast != NULL )
+            {
+                rc = VCursorAddColumn( cursor, &(col->src_idx), "%s", col->src_cast );
+                DISP_RC( rc, "col_defs_add_to_cursor:VCursorAddColumn() failed" );
+                if ( rc == 0 )
+                {
+                    rc = VCursorDatatype( cursor, col->src_idx,
+                              &(col->type_decl), &(col->type_desc) );
+                    DISP_RC( rc, "col_defs_add_to_cursor:VCursorDatatype() failed" );
+                    col->src_valid = ( rc == 0 );
+                    if ( show && col->src_valid )
+                        KOutMsg( "added to rd-cursor: >%s<\n", col->name );
+                }
+
+            }
+        }
+    }
+    return rc;
+}
+
+
+/*
+ * retrieves a pointer to a column-definition
+ * name defines the name of the wanted column-definition
+*/
+p_col_def col_defs_find( col_defs* defs, const char * name )
+{
+    p_col_def res = NULL;
+    uint32_t idx, len;
+    if ( defs == NULL || name == NULL || name[0] == 0 )
+        return res;
+
+    len = VectorLength( &(defs->cols) );
+    for ( idx = 0;  idx < len && res == NULL; ++idx )
+    {
+        p_col_def item = (p_col_def) VectorGet ( &(defs->cols), idx );
+        if ( nlt_strcmp( item->name, name ) == 0 )
+            res = item;
+    }
+    return res;
+}
+
+
+/*
+ * retrieves the index of a column-definition
+ * name defines the name of the wanted column-definition
+*/
+int32_t col_defs_find_idx( col_defs* defs, const char * name )
+{
+    int32_t res = -1;
+    uint32_t idx, len;
+    if ( defs == NULL || name == NULL || name[0] == 0 )
+        return res;
+
+    len = VectorLength( &(defs->cols) );
+    for ( idx = 0;  idx < len && res == -1; ++idx )
+    {
+        p_col_def item = (p_col_def) VectorGet ( &(defs->cols), idx );
+        if ( nlt_strcmp( item->name, name ) == 0 )
+            res = (int32_t)idx;
+    }
+    return res;
+}
+
+
+/*
+ * retrieves a pointer to a column-definition
+ * idx defines the Vector-Index of the wanted column-definition
+ * !!! not the read or write cursor index !!!
+*/
+p_col_def col_defs_get( col_defs* defs, const uint32_t idx )
+{
+    p_col_def res = NULL;
+    if ( defs != NULL )
+        res = (p_col_def) VectorGet ( &(defs->cols), idx );
+    return res;
+}
+
+
+/*
+ * adds all columns marked with to_copy == true to the cursor
+*/
+rc_t col_defs_add_to_wr_cursor( col_defs* defs, const VCursor* cursor, bool show )
+{
+    uint32_t idx, len;
+
+    if ( defs == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    if ( cursor == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+
+    len = VectorLength( &(defs->cols) );
+    for ( idx = 0;  idx < len; ++idx )
+    {
+        p_col_def col = (p_col_def) VectorGet ( &(defs->cols), idx );
+        if ( col != NULL )
+            if ( col->to_copy && col->dst_cast != NULL )
+            {
+                rc_t rc = VCursorAddColumn( cursor, &(col->dst_idx), "%s", col->dst_cast );
+                col->to_copy = ( rc == 0 );
+                if ( show )
+                {
+                    if ( col->to_copy )
+                        KOutMsg( "added to wr-cursor: >%s<\n", col->name );
+                    else
+                        KOutMsg( "cannot add >%s<\n", col->name );
+                }
+            }
+    }
+    return 0;
+}
+
+
+/*
+ * searches in the column-vector for a successful string-comparison
+ * with the hardcoded name of the filter-column
+ * stores it's vector-idx in defs->filter_idx
+ * does not require an open cursor.
+*/
+rc_t col_defs_detect_filter_col( col_defs* defs, const char *name )
+{
+    if ( defs == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    if ( name == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+
+    defs->filter_idx = col_defs_find_idx( defs, name );
+    if ( defs->filter_idx < 0 )
+        return RC( rcExe, rcNoTarg, rcResolving, rcItem, rcNotFound );
+    return 0;
+}
+
+
+/*
+ * walks through the column-names and marks every column thats
+ * name is in "redactable_cols" as redactable
+ * sets the redact-value to zero
+ * if the default-type of the column is in the list of dna-types
+ * (a hardcoded list) it sets the redact-value to 'N'
+ * does not require an open cursor. 
+*/
+rc_t col_defs_detect_redactable_cols_by_name( col_defs* defs,
+                                const char * redactable_cols )
+{
+    const KNamelist *r_columns;
+    rc_t rc;
+    
+    if ( defs == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    if ( defs == NULL || redactable_cols == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+
+    rc = nlt_make_namelist_from_string( &r_columns, redactable_cols );
+    if ( rc == 0 )
+    {
+        uint32_t idx, len = VectorLength( &(defs->cols) );
+        for ( idx = 0;  idx < len && rc == 0; ++idx )
+        {
+            p_col_def col = (p_col_def) VectorGet ( &(defs->cols), idx );
+            if ( col != NULL )
+                if ( !(col->redactable) )
+                    col->redactable = nlt_is_name_in_namelist( r_columns, col->name );
+        }
+        KNamelistRelease( r_columns );
+    }
+    return rc;
+}
+
+
+static rc_t redactable_types_2_type_id_vector( const VSchema * s,
+                                               const char * redactable_types,
+                                               Vector * id_vector )
+{
+    const KNamelist *r_types;
+    rc_t rc;
+    if ( redactable_types == NULL || s == NULL || id_vector == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+
+    rc = nlt_make_namelist_from_string( &r_types, redactable_types );
+    if ( rc == 0 )
+    {
+        uint32_t count, idx;
+
+        rc = KNamelistCount( r_types, &count );
+        if ( rc == 0 && count > 0 )
+            for ( idx = 0; idx < count && rc == 0; ++idx )
+            {
+                const char *name;
+                rc = KNamelistGet( r_types, idx, &name );
+                if ( rc == 0 )
+                {
+                    VTypedecl td;
+                    rc = VSchemaResolveTypedecl ( s, &td, "%s", name );
+                    if ( rc == 0 )
+                    {
+                        uint32_t *id = malloc( sizeof *id );
+                        if ( id != NULL )
+                        {
+                            *id = td.type_id;
+                            rc = VectorAppend ( id_vector, NULL, id );
+                        }
+                        else
+                            rc = RC( rcExe, rcNoTarg, rcResolving, rcMemory, rcExhausted );
+                    }
+                }
+            }
+        KNamelistRelease( r_types );
+    }
+    return rc;
+}
+
+
+static void CC type_id_ptr_whack ( void *item, void *data )
+{
+    free( item );
+}
+
+
+/*
+ * walks through the columns and checks every column against
+ * a list of types, if one of the src-types of the column
+ * is in the list it is marked as redactable
+*/
+rc_t col_defs_detect_redactable_cols_by_type( col_defs* defs,
+                        const VSchema * s, const matcher * m,
+                        const char * redactable_types )
+{
+    Vector id_vector;
+    rc_t rc;
+    
+    if ( defs == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    if ( redactable_types == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+    
+    VectorInit ( &id_vector, 0, 20 );
+    rc = redactable_types_2_type_id_vector( s, redactable_types, &id_vector );
+    if ( rc == 0 )
+    {
+        uint32_t idx, len = VectorLength( &(defs->cols) );
+        for ( idx = 0;  idx < len; ++idx )
+        {
+            p_col_def col = (p_col_def) VectorGet ( &(defs->cols), idx );
+            if ( col != NULL )
+                if ( ! col->redactable )
+                    col->redactable = matcher_src_has_type( m, s, col->name, &id_vector );
+        }
+        VectorWhack ( &id_vector, type_id_ptr_whack, NULL );
+    }
+
+/*
+    rc = nlt_make_namelist_from_string( &r_types, redactable_types );
+    if ( rc == 0 )
+    {
+        uint32_t idx, len = VectorLength( &(defs->cols) );
+        for ( idx = 0;  idx < len; ++idx )
+        {
+            p_col_def col = (p_col_def) VectorGet ( &(defs->cols), idx );
+            if ( col != NULL )
+                if ( ! col->redactable )
+                    col->redactable = matcher_src_has_type( m, col->name, r_types );
+        }
+        KNamelistRelease( r_types );
+    }
+*/
+    return rc;
+}
+
+
+rc_t col_defs_unmark_do_not_redact_columns(  col_defs* defs,
+                    const char * do_not_redact_cols )
+{
+    const KNamelist *names;
+    rc_t rc;
+    
+    if ( defs == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    if ( do_not_redact_cols == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+
+    rc = nlt_make_namelist_from_string( &names, do_not_redact_cols );
+    if ( rc == 0 )
+    {
+        uint32_t idx, len = VectorLength( &(defs->cols) );
+        for ( idx = 0;  idx < len; ++idx )
+        {
+            p_col_def col = (p_col_def) VectorGet ( &(defs->cols), idx );
+            if ( col != NULL )
+                if ( col->redactable )
+                    if ( nlt_is_name_in_namelist( names, col->name ) )
+                        col->redactable = false;
+        }
+        KNamelistRelease( names );
+    }
+    return rc;
+}
+
+/*
+ * walks through the column-definitions and counts how
+ * many of them have the to-copy-flag
+ * does not require an open cursor. 
+*/
+uint32_t col_defs_count_copy_cols( col_defs* defs )
+{
+    uint32_t res = 0;
+    if ( defs != NULL )
+    {
+        uint32_t idx, len = VectorLength( &(defs->cols) );
+        for ( idx = 0;  idx < len; ++idx )
+        {
+            p_col_def item = (p_col_def) VectorGet ( &(defs->cols), idx );
+            if ( item != NULL )
+                if ( item->to_copy )
+                    res++;
+        }
+    }
+    return res;
+}
+
+
+/*
+ * walks through the column-definitions and if a column
+ * has the to_copy-flag set, and it's name is in the
+ * given list of column-names the to copy-flag is cleared
+ * does not require an open cursor.
+*/
+rc_t col_defs_exclude_these_columns( col_defs* defs, const char * prefix, const char * column_names )
+{
+    rc_t rc = 0;
+    const KNamelist *names;
+
+    if ( defs == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    /* it is OK if we have not column-names to exclude */
+    if ( column_names == NULL )
+        return 0;
+    if ( column_names[0] == 0 )
+        return 0;
+
+    rc = nlt_make_namelist_from_string( &names, column_names );
+    DISP_RC( rc, "col_defs_parse_string:nlt_make_namelist_from_string() failed" );
+    if ( rc == 0 )
+    {
+        uint32_t idx, len = VectorLength( &(defs->cols) );
+        size_t prefix_len = 0;
+        if ( prefix != 0 )
+            prefix_len = string_size( prefix ) + 2;
+        for ( idx = 0;  idx < len; ++idx )
+        {
+            p_col_def col = (p_col_def) VectorGet ( &(defs->cols), idx );
+            if ( col != NULL )
+            {
+                if ( col->requested )
+                {
+                    if ( nlt_is_name_in_namelist( names, col->name ) )
+                        col->requested = false;
+                    else
+                    {
+                        if ( prefix != NULL )
+                        {
+                            size_t len1 = string_size ( col->name ) + prefix_len;
+                            char * s = malloc( len1 );
+                            if ( s != NULL )
+                            {
+                                size_t num_writ;
+                                rc_t rc1 = string_printf ( s, len1, &num_writ, "%s:%s", prefix, col->name );
+                                if ( rc1 == 0 )
+                                {
+                                    if ( nlt_is_name_in_namelist( names, s ) )
+                                        col->requested = false;
+                                }
+                                free( s );
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        KNamelistRelease( names );
+    }
+    return rc;
+}
+
+
+rc_t col_defs_as_string( col_defs* defs, char ** dst, bool only_requested )
+{
+    uint32_t idx, count, total = 0, dst_idx = 0;
+
+    if ( defs == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    if ( dst == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+    *dst = NULL;
+    count = VectorLength( &(defs->cols) );
+    for ( idx = 0;  idx < count; ++idx )
+    {
+        p_col_def col = (p_col_def) VectorGet ( &(defs->cols), idx );
+        if ( col != NULL )
+        {
+            bool use_this = ( only_requested ) ? col->requested : true;
+            if ( use_this )
+                total += ( string_measure ( col->name, NULL ) + 1 );
+        }
+    }
+    *dst = malloc( total + 1 );
+    if ( *dst == NULL )
+        return RC( rcVDB, rcNoTarg, rcResolving, rcMemory, rcExhausted );
+    *dst[0] = 0;
+    for ( idx = 0;  idx < count; ++idx )
+    {
+        p_col_def col = (p_col_def) VectorGet ( &(defs->cols), idx );
+        if ( col != NULL )
+        {
+            bool use_this = ( only_requested ) ? col->requested : true;
+            if ( use_this )
+            {
+                dst_idx += string_copy_measure ( &((*dst)[dst_idx]), total-dst_idx, col->name );
+                (*dst)[dst_idx++] = ',';
+            }
+        }
+    }
+    if ( dst_idx > 0 )
+        (*dst)[dst_idx-1] = 0;
+    return 0;
+}
+
+
+rc_t col_defs_apply_casts( col_defs* defs, const matcher * m )
+{
+    rc_t rc = 0;
+    uint32_t idx, count;
+
+    if ( defs == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+
+    count = VectorLength( &(defs->cols) );
+    for ( idx = 0;  idx < count && rc == 0; ++idx )
+    {
+        p_col_def col = (p_col_def) VectorGet ( &(defs->cols), idx );
+        if ( col != NULL )
+        {
+            if ( m == NULL )
+            {
+                col->src_cast = string_dup_measure ( col->name, NULL );
+                col->dst_cast = string_dup_measure ( col->name, NULL );
+            }
+            else
+            {
+                rc = matcher_src_cast( m, col->name, &(col->src_cast) );
+                if ( rc == 0 )
+                    rc = matcher_dst_cast( m, col->name, &(col->dst_cast) );
+            }
+        }
+    }
+    return rc;
+}
+
+
+rc_t col_defs_find_redact_vals( col_defs* defs, 
+                                const redact_vals * rvals )
+{
+    uint32_t idx, count;
+
+    if ( defs == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    if ( rvals == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+
+    count = VectorLength( &(defs->cols) );
+    for ( idx = 0;  idx < count; ++idx )
+    {
+        p_col_def col = (p_col_def) VectorGet ( &(defs->cols), idx );
+        if ( col != NULL )
+            if ( col->to_copy )
+                col->r_val = redact_vals_get_by_cast( rvals, col->dst_cast );
+    }
+    return 0;
+}
+
+
+rc_t col_defs_mark_writable_columns( col_defs* defs, VTable *tab, bool show )
+{
+    KNamelist *writables;
+    rc_t rc;
+
+    if ( defs == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    if ( tab == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+
+    rc = VTableListWritableColumns ( tab, &writables );
+    if ( rc == 0 )
+    {
+        uint32_t idx, count = VectorLength( &(defs->cols) );
+        for ( idx = 0;  idx < count; ++idx )
+        {
+            p_col_def col = (p_col_def) VectorGet ( &(defs->cols), idx );
+            if ( col != NULL )
+                if ( col->requested )
+                    if ( nlt_is_name_in_namelist( writables, col->name ) )
+                    {
+                        if ( show )
+                            KOutMsg( "writable column: >%s<\n", col->name );
+                        col->to_copy = true;
+                    }
+        }
+        KNamelistRelease( writables );
+    }
+    return rc;
+}
+
+
+rc_t col_defs_mark_requested_columns( col_defs* defs, const char * columns )
+{
+    const KNamelist *requested;
+    rc_t rc;
+    uint32_t idx, len;
+
+    if ( defs == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+
+    if ( columns == NULL )
+    {
+        /* no specific columns are provided --> mark all of them */
+        len = VectorLength( &(defs->cols) );
+        for ( idx = 0;  idx < len; ++idx )
+        {
+            p_col_def col = (p_col_def) VectorGet ( &(defs->cols), idx );
+            if ( col != NULL )
+                col->requested = true;
+        }
+        rc = 0;
+    }
+    else
+    {
+        /* specific columns are provided --> mark all of these */
+        rc = nlt_make_namelist_from_string( &requested, columns );
+        DISP_RC( rc, "col_defs_mark_requested_columns:nlt_make_namelist_from_string() failed" );
+        if ( rc == 0 )
+        {
+            uint32_t idx, len = VectorLength( &(defs->cols) );
+            for ( idx = 0;  idx < len; ++idx )
+            {
+                p_col_def col = (p_col_def) VectorGet ( &(defs->cols), idx );
+                if ( col != NULL )
+                    col->requested = nlt_is_name_in_namelist( requested, col->name );
+            }
+            KNamelistRelease( requested );
+        }
+    }
+    return rc;
+}
diff --git a/tools/vdb-copy/coldefs.h b/tools/vdb-copy/coldefs.h
new file mode 100644
index 0000000..5313f18
--- /dev/null
+++ b/tools/vdb-copy/coldefs.h
@@ -0,0 +1,250 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_coldefs_
+#define _h_vdb_coldefs_
+
+#ifndef _h_vdb_copy_includes_
+#include "vdb-copy-includes.h"
+#endif
+
+#ifndef _h_type_matcher_
+#include "type_matcher.h"
+#endif
+
+#ifndef _h_vdb_redactval_
+#include "redactval.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/********************************************************************
+col-def is the definition of a single column: name/index/type
+********************************************************************/
+typedef struct col_def
+{
+    char *name;
+    uint32_t src_idx;       /* index of this column relative to the
+                               read-cursor */
+
+    uint32_t dst_idx;       /* index of this column relative to the
+                               write-cursor */
+
+    bool src_valid;         /* this column was successfully addes to
+                               the read-cursor */
+
+    bool requested;         /* in case of no columns given to the commandline
+                               all existing columns are marked as requested
+                               ( even if not all of them can be copied,
+                                 they are filtered out later... )
+                               if columns are given at the commandline
+                               only these are marked as requested */
+
+    bool to_copy;           /* this column has a correspondig column 
+                               in the list of writable columns of the
+                               destination-schema with writable types */
+
+    bool redactable;        /* this column is in the list of redactable
+                               columns */
+
+    VTypedecl type_decl;    /* type-decl of this column via read-schema */
+    VTypedesc type_desc;    /* type-desc of this column via read-schema */
+
+    char * src_cast;        /* typecast to be used by the source */
+    char * dst_cast;        /* typecast to be used by the destination */
+
+    p_redact_val r_val;     /* pointer to a redact-value entry if exists*/
+} col_def;
+typedef col_def* p_col_def;
+
+/********************************************************************
+the col-defs are a vector of single column-definitions
+********************************************************************/
+typedef struct col_defs
+{
+    Vector cols;
+    int32_t filter_idx; /* index of READ_FILTER-column (-1 not in set...)*/
+} col_defs;
+typedef col_defs* p_col_defs;
+
+
+/*
+ * initializes a column-definitions-list
+*/
+rc_t col_defs_init( col_defs** defs );
+
+
+/*
+ * destroys the column-definitions-list
+*/
+rc_t col_defs_destroy( col_defs* defs );
+
+
+/*
+ * calls VTableListCol to get a list of all column-names of the table
+ * creates a temporary read-cursor to test and get the column-type
+ * walks the KNamelist with the available column-names
+ * tries to add every one of them to the temp. cursor
+ * if the column can be added to the cursor, it is appended
+ * to the column-definition list, the type of the column is detected
+*/
+rc_t col_defs_extract_from_table( col_defs* defs, const VTable *table );
+
+
+/*
+ * walks the list of column-definitions and calls
+ * VTableColumnDatatypes() for every column, fills the types
+ * into the src-types-Vector of every column
+*/
+rc_t col_defs_read_src_types( col_defs* defs, const VTable *table,
+                              const VSchema *schema );
+
+
+/*
+ * walks the list of column-definitions and calls
+ * VTableListWritableColumnTypes() for every column
+ * if the returned namelist is not empty, it marks the column as
+ * to be copied, and fills it's types into the dst-types-Vector 
+ * of every column
+*/
+rc_t col_defs_read_dst_columns( col_defs* defs, const VTable *table,
+                                const VSchema *schema );
+
+
+rc_t col_defs_clear_to_copy( col_defs* defs );
+
+
+/*
+ * walks the list of column-definitions and reports on every one
+*/
+rc_t col_defs_report( const col_defs* defs, const bool only_copy_columns );
+
+
+/*
+ * walks the list of column-definitions and tries to add all off them
+ * to the given cursor, it stops if one of them fails to be added
+ * for every column it detects type_decl and type_desc
+ * if both calls are successful the column-def is marked as valid
+*/
+rc_t col_defs_add_to_rd_cursor( col_defs* defs, const VCursor *cursor, bool show );
+
+
+/*
+ * retrieves a pointer to a column-definition
+ * name defines the name of the wanted column-definition
+*/
+p_col_def col_defs_find( col_defs* defs, const char * name );
+
+
+/*
+ * retrieves the index of a column-definition
+ * name defines the name of the wanted column-definition
+*/
+int32_t col_defs_find_idx( col_defs* defs, const char * name );
+
+
+/*
+ * retrieves a pointer to a column-definition
+ * idx defines the Vector-Index of the wanted column-definition
+ * !!! not the read or write cursor index !!!
+*/
+p_col_def col_defs_get( col_defs* defs, const uint32_t idx );
+
+
+/*
+ * adds all columns marked with to_copy == true to the cursor
+*/
+rc_t col_defs_add_to_wr_cursor( col_defs* defs, const VCursor* cursor, bool show );
+
+
+/*
+ * searches in the column-vector for a successful string-comparison
+ * with the hardcoded name of the filter-column
+ * stores it's vector-idx in defs->filter_idx
+ * does not require an open cursor.
+*/
+rc_t col_defs_detect_filter_col( col_defs* defs, const char *col_name );
+
+
+/*
+ * walks through the column-names and marks every column thats
+ * name is in "redactable_cols"  as redactable
+ * sets the redact-value to zero
+ * if the default-type of the column is in the list of dna-types
+ * (a hardcoded list) it sets the redact-value to 'N'
+ * does not require an open cursor. 
+*/
+rc_t col_defs_detect_redactable_cols_by_name( col_defs* defs,
+                    const char * redactable_cols );
+
+rc_t col_defs_detect_redactable_cols_by_type( col_defs* defs,
+                        const VSchema * s, const matcher * m,
+                        const char * redactable_types );
+
+
+/*
+ * walks through the column-names and clear the redactable-flag 
+ * for every column thats name is in "do_not_redact_cols"
+ * does not require an open cursor. 
+*/
+rc_t col_defs_unmark_do_not_redact_columns(  col_defs* defs,
+                    const char * do_not_redact_cols );
+
+
+/*
+ * walks through the column-definitions and counts how
+ * many of them have the to-copy-flag
+ * does not require an open cursor. 
+*/
+uint32_t col_defs_count_copy_cols( col_defs* defs );
+
+
+/*
+ * walks through the column-definitions and if a column
+ * has the to_copy-flag set, and it's name is in the
+ * given list of column-names the to copy-flag is cleared
+ * does not require an open cursor.
+*/
+rc_t col_defs_exclude_these_columns( col_defs* defs,
+                const char * prefix, const char * column_names );
+
+rc_t col_defs_as_string( col_defs* defs, char ** dst, bool only_requested );
+
+rc_t col_defs_apply_casts( col_defs* defs, const matcher * m );
+
+rc_t col_defs_find_redact_vals( col_defs* defs, const redact_vals * rvals );
+
+rc_t col_defs_mark_writable_columns( col_defs* defs, VTable *tab, bool show );
+
+rc_t col_defs_mark_requested_columns( col_defs* defs, const char * columns );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-copy/column_match.c b/tools/vdb-copy/column_match.c
new file mode 100644
index 0000000..0e1d507
--- /dev/null
+++ b/tools/vdb-copy/column_match.c
@@ -0,0 +1,31 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include "column_match.h"
+
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <string.h>
diff --git a/tools/vdb-copy/column_match.h b/tools/vdb-copy/column_match.h
new file mode 100644
index 0000000..1b4eb8b
--- /dev/null
+++ b/tools/vdb-copy/column_match.h
@@ -0,0 +1,42 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_column_match_
+#define _h_column_match_
+
+#ifndef _h_vdb_copy_includes_
+#include "vdb-copy-includes.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-copy/config_values.c b/tools/vdb-copy/config_values.c
new file mode 100644
index 0000000..cd68a95
--- /dev/null
+++ b/tools/vdb-copy/config_values.c
@@ -0,0 +1,54 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include "config_values.h"
+
+#include <sysalloc.h>
+#include <string.h>
+#include <stdlib.h>
+
+static void config_values_destroy_str( char **s )
+{
+    if ( *s != NULL )
+    {
+        free( *s );
+        *s = NULL;
+    }
+}
+
+
+void config_values_init( p_config_values cv )
+{
+    memset( cv, 0, sizeof cv[0] );
+}
+
+
+void config_values_destroy( p_config_values cv )
+{
+    config_values_destroy_str( &cv->filter_col_name );
+    config_values_destroy_str( &cv->meta_ignore_nodes );
+    config_values_destroy_str( &cv->redactable_types );
+    config_values_destroy_str( &cv->do_not_redact_columns );
+}
diff --git a/tools/vdb-copy/config_values.h b/tools/vdb-copy/config_values.h
new file mode 100644
index 0000000..4d7a503
--- /dev/null
+++ b/tools/vdb-copy/config_values.h
@@ -0,0 +1,49 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_config_values_
+#define _h_config_values_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct config_values
+{
+    char * filter_col_name;
+    char * meta_ignore_nodes;
+    char * redactable_types;
+    char * do_not_redact_columns;
+} config_values;
+typedef config_values* p_config_values;
+
+void config_values_init( p_config_values cv );
+void config_values_destroy( p_config_values cv );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-copy/context.c b/tools/vdb-copy/context.c
new file mode 100644
index 0000000..992bb41
--- /dev/null
+++ b/tools/vdb-copy/context.c
@@ -0,0 +1,473 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "context.h"
+#include <sysalloc.h>
+#include <stdlib.h>
+
+
+/*
+ * helper-function to set a string inside the context
+ * ( makes a copy ) with error detection
+*/
+static rc_t context_set_str( char **dst, const char *src )
+{
+    size_t len;
+    if ( dst == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+
+    if ( *dst != NULL )
+    {
+        free( *dst );
+        *dst = NULL;
+    }
+    if ( src == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+
+    *dst = string_dup_measure ( src, &len );
+ 
+    if ( len == 0 )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcItem, rcEmpty );
+    if ( *dst == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcMemory, rcExhausted );
+    return 0;
+}
+
+
+/*
+ * helper-function to initialize the values of the context
+*/
+static void context_init_values( p_context ctx )
+{
+    ctx->src_path = NULL;
+    ctx->dst_path = NULL;
+    ctx->kfg_path = NULL;
+    ctx->table = NULL;
+    ctx->columns = NULL;
+    ctx->excluded_columns = NULL;
+    ctx->platform_id = 0;
+    ctx->src_schema_list = NULL;
+
+    ctx->usage_requested = false;
+    ctx->ignore_reject = false;
+    ctx->ignore_redact = false;
+    ctx->dont_check_accession = false;
+    ctx->reindex = false;
+    ctx->show_redact = false;
+    ctx->show_meta = false;
+    ctx->md5_mode = MD5_MODE_AUTO;
+    ctx->force_kcmInit = false;
+    ctx->force_unlock = false;
+
+    ctx->dont_remove_target = false;
+    config_values_init( &(ctx->config) );
+    redact_vals_init( &(ctx->rvals) );
+    ctx->dst_schema_tabname = NULL;
+    ctx->legacy_schema_file = NULL;
+    ctx->legacy_dont_copy = NULL;
+}
+
+
+/*
+ * generates a new context, initializes values
+*/
+rc_t context_init( context **ctx )
+{
+    rc_t rc;
+
+    if ( ctx == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    (*ctx) = (p_context)calloc( 1, sizeof( context ) );
+    if ( *ctx == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+
+    context_init_values( *ctx );
+    rc = num_gen_make( &((*ctx)->row_generator) );
+    DISP_RC( rc, "num_gen_make() failed" );
+    return rc;
+}
+
+
+/*
+ * destroys a context, frees all pointers the context owns
+*/
+rc_t context_destroy( p_context ctx )
+{
+    if ( ctx == NULL )
+        return RC( rcVDB, rcNoTarg, rcDestroying, rcParam, rcNull );
+
+    if ( ctx->src_path != NULL )
+    {
+        free( (void*)ctx->src_path );
+        ctx->src_path = NULL;
+    }
+    if ( ctx->dst_path != NULL )
+    {
+        free( (void*)ctx->dst_path );
+        ctx->dst_path = NULL;
+    }
+    if ( ctx->kfg_path != NULL )
+    {
+        free( (void*)ctx->kfg_path );
+        ctx->kfg_path = NULL;
+    }
+    if ( ctx->src_schema_list != NULL )
+    {
+        KNamelistRelease( ctx->src_schema_list );
+        ctx->src_schema_list = NULL;
+    }
+    if ( ctx->table != NULL )
+    {
+        free( (void*)ctx->table );
+        ctx->table = NULL;
+    }
+    if ( ctx->columns != NULL )
+    {
+        free( (void*)ctx->columns );
+        ctx->columns = NULL;
+    }
+    if ( ctx->excluded_columns != NULL )
+    {
+        free( (void*)ctx->excluded_columns );
+        ctx->excluded_columns = NULL;
+    }
+
+    num_gen_destroy( ctx->row_generator );
+    config_values_destroy( &( ctx->config ) );
+    redact_vals_destroy( ctx->rvals );
+
+    if ( ctx->dst_schema_tabname != NULL )
+    {
+        free( (void*)ctx->dst_schema_tabname );
+        ctx->dst_schema_tabname = NULL;
+    }
+    if ( ctx->legacy_schema_file != NULL )
+    {
+        free( (void*)ctx->legacy_schema_file );
+        ctx->legacy_schema_file = NULL;
+    }
+    if ( ctx->legacy_dont_copy != NULL )
+    {
+        free( (void*)ctx->legacy_dont_copy );
+        ctx->legacy_dont_copy = NULL;
+    }
+
+    free( ctx );
+    return 0;
+}
+
+
+/*
+ * clear's the number-generator and sets the given intervall
+*/
+rc_t context_set_range( p_context ctx, 
+                        const int64_t first, const uint64_t count )
+{
+    rc_t rc = num_gen_clear( ctx->row_generator );
+    if ( rc == 0 )
+        rc = num_gen_add( ctx->row_generator, first, count );
+    return rc;
+}
+
+
+/*
+ * performs the range check to trim the internal number
+ * generator to the given range
+*/
+rc_t context_range_check( p_context ctx, 
+                          const int64_t first, const uint64_t count )
+{
+    return num_gen_range_check( ctx->row_generator, first, count );
+}
+
+
+/*
+ * helper-function to set the source-path
+*/
+static rc_t context_set_src_path( p_context ctx, const char *src )
+{
+    return context_set_str( (char**)&(ctx->src_path), src );
+}
+
+
+/*
+ * helper-function to set the destination-path
+*/
+static rc_t context_set_dst_path( p_context ctx, const char *src )
+{
+    return context_set_str( (char**)&(ctx->dst_path), src );
+}
+
+
+/*
+ * helper-function to set the path for additional kfg-files
+*/
+static rc_t context_set_kfg_path( p_context ctx, const char *src )
+{
+    rc_t rc = context_set_str( (char**)&(ctx->kfg_path), src );
+    if ( ctx->kfg_path == NULL )
+        context_set_kfg_path( ctx, "." );
+    return rc;
+}
+
+
+/*
+ * helper-function to set the name of the source-table
+*/
+static rc_t context_set_table( p_context ctx, const char *src )
+{
+    rc_t rc;
+    if ( ctx == NULL || src == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    rc = context_set_str( (char**)&(ctx->table), src );
+    DISP_RC( rc, "context_set_table:context_set_str() failed" );
+    return rc;
+}
+
+#if ALLOW_COLUMN_SPEC
+static rc_t context_set_columns( p_context ctx, const char *src )
+{
+    rc_t rc;
+    if ( ctx == NULL || src == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    rc = context_set_str( (char**)&(ctx->columns), src );
+    DISP_RC( rc, "context_set_columns:dump_context_set_str() failed" );
+    return rc;
+}
+#endif
+
+static rc_t context_set_excluded_columns( p_context ctx, const char *src )
+{
+    rc_t rc;
+    if ( ctx == NULL || src == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    rc = context_set_str( (char**)&(ctx->excluded_columns), src );
+    DISP_RC( rc, "context_set_excluded_columns:dump_context_set_str() failed" );
+    return rc;
+}
+
+
+static rc_t context_set_md5_mode( p_context ctx, const char *src )
+{
+    if ( ctx == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    ctx->md5_mode = MD5_MODE_AUTO;
+    if ( src == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    switch( src[ 0 ] )
+    {
+    case 'O' :
+    case '1' :
+    case 'o' : ctx->md5_mode = MD5_MODE_ON; break;
+
+    case '0' :
+    case 'x' :
+    case 'X' : ctx->md5_mode = MD5_MODE_OFF; break;
+    }
+    return 0;
+}
+
+
+static rc_t context_set_blob_checksum( p_context ctx, const char *src )
+{
+    if ( ctx == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    ctx->blob_checksum = BLOB_CHECKSUM_AUTO;
+    if ( src == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    switch( src[ 0 ] )
+    {
+    case 'O' :
+    case '1' :
+    case 'o' : ctx->blob_checksum = BLOB_CHECKSUM_CRC32; break;
+
+    case '5' :
+    case 'M' :
+    case 'm' : ctx->blob_checksum = BLOB_CHECKSUM_MD5; break;
+
+    case '0' :
+    case 'x' :
+    case 'X' : ctx->blob_checksum = BLOB_CHECKSUM_OFF; break;
+    }
+    return 0;
+}
+
+
+static rc_t context_set_row_range( p_context ctx, const char *src )
+{
+    rc_t rc;
+    if ( ( ctx == NULL )||( src == NULL ) )
+        rc = RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    else
+        rc = num_gen_parse( ctx->row_generator, src );
+    return rc;
+}
+
+
+static bool context_check_if_usage_necessary( p_context ctx )
+{
+    if ( ctx == NULL ) return false;
+    if ( ctx->src_path == NULL || ctx->dst_path == NULL )
+        ctx->usage_requested = true;
+    return ctx->usage_requested;
+}
+
+
+static rc_t context_evaluate_arguments( const Args *my_args, p_context ctx )
+{
+    uint32_t count, idx;
+    
+    rc_t rc = ArgsParamCount( my_args, &count );
+    DISP_RC( rc, "ArgsParamCount() failed" );
+    if ( rc != 0 ) return rc;
+
+    for ( idx = 0; idx < count && rc == 0; ++idx )
+    {
+        const char *value = NULL;
+        rc = ArgsParamValue( my_args, idx, (const void **)&value );
+        DISP_RC( rc, "ArgsParamValue() failed" );
+        if ( rc == 0 )
+        {
+            switch( idx )
+            {
+            case 0 : rc = context_set_src_path( ctx, value );
+                     DISP_RC( rc, "context_set_src_path() failed" );
+                     break;
+
+            case 1 : rc = context_set_dst_path( ctx, value );
+                     DISP_RC( rc, "context_set_dst_path() failed" );
+                     break;
+
+            }
+        }
+    }
+    return rc;
+}
+
+
+static bool context_get_bool_option( const Args *my_args,
+                                     const char *name,
+                                     const bool def )
+{
+    bool res = def;
+    uint32_t count = 0;
+    rc_t rc = ArgsOptionCount( my_args, name, &count );
+    if ( rc == 0 && count > 0 )
+        res = true;
+    return res;
+}
+
+
+static const char* context_get_str_option( const Args *my_args,
+                                           const char *name )
+{
+    const char* res = NULL;
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( my_args, name, &count );
+    if ( ( rc == 0 )&&( count > 0 ) )
+    {
+        rc = ArgsOptionValue( my_args, name, 0, (const void **)&res );
+    }
+    return res;
+}
+
+
+/*
+ * returns the number of schema's given on the commandline
+*/
+uint32_t context_schema_count( p_context ctx )
+{
+    uint32_t res = 0;
+    if ( ctx != NULL )
+        if ( ctx->src_schema_list != 0 )
+        {
+            uint32_t count;
+            if ( KNamelistCount( ctx->src_schema_list, &count ) == 0 )
+                res = count;
+        }
+    return res;
+}
+
+
+static void context_evaluate_options( const Args *my_args, p_context ctx )
+{
+    if ( my_args == NULL ) return;
+    if ( ctx == NULL ) return;
+
+    ctx->dont_check_accession = context_get_bool_option( my_args, OPTION_WITHOUT_ACCESSION, false );
+    ctx->ignore_reject = context_get_bool_option( my_args, OPTION_IGNORE_REJECT, true );
+    ctx->ignore_redact = context_get_bool_option( my_args, OPTION_IGNORE_REDACT, false );
+    ctx->show_matching = context_get_bool_option( my_args, OPTION_SHOW_MATCHING, false );
+    ctx->show_progress = context_get_bool_option( my_args, OPTION_SHOW_PROGRESS, false );
+    ctx->ignore_incomp = context_get_bool_option( my_args, OPTION_IGNORE_INCOMP, false );
+    ctx->reindex       = context_get_bool_option( my_args, OPTION_REINDEX, true );
+    ctx->show_redact   = context_get_bool_option( my_args, OPTION_SHOW_REDACT, false );
+    ctx->show_meta     = context_get_bool_option( my_args, OPTION_SHOW_META, false );
+    ctx->force_kcmInit = context_get_bool_option( my_args, OPTION_FORCE, false );
+    ctx->force_unlock  = context_get_bool_option( my_args, OPTION_UNLOCK, false );
+
+    context_set_md5_mode( ctx, context_get_str_option( my_args, OPTION_MD5_MODE ) );
+    context_set_blob_checksum( ctx, context_get_str_option( my_args, OPTION_BLOB_CHECKSUM ) );
+
+#if ALLOW_EXTERNAL_CONFIG
+    context_set_kfg_path( ctx, context_get_str_option( my_args, OPTION_KFG_PATH ) );
+#endif
+
+    context_set_table( ctx, context_get_str_option( my_args, OPTION_TABLE ) );
+#if ALLOW_COLUMN_SPEC
+    context_set_columns( ctx, context_get_str_option( my_args, OPTION_COLUMNS ) );
+#endif
+    context_set_excluded_columns( ctx, context_get_str_option( my_args, OPTION_EXCLUDED_COLUMNS ) );
+
+    {
+        const char * row_range = context_get_str_option( my_args, OPTION_ROWS );
+        context_set_row_range( ctx, row_range );
+    }
+    nlt_make_namelist_from_string( &(ctx->src_schema_list), 
+                                   context_get_str_option( my_args, OPTION_SCHEMA ) );
+}
+
+
+/*
+ * reads all arguments and options, fills the context
+ * with copies (if strings) of this data
+*/
+rc_t context_capture_arguments_and_options( const Args * args, p_context ctx )
+{
+    rc_t rc;
+
+    rc = context_evaluate_arguments( args, ctx );
+    DISP_RC( rc, "evaluate_arguments() failed" );
+    if ( rc == 0 )
+    {
+        context_evaluate_options( args, ctx );
+        context_check_if_usage_necessary( ctx );
+
+        rc = ArgsHandleLogLevel( args );
+        DISP_RC( rc, "ArgsHandleLogLevel() failed" );
+    }
+    return rc;
+}
diff --git a/tools/vdb-copy/context.h b/tools/vdb-copy/context.h
new file mode 100644
index 0000000..2ca14ea
--- /dev/null
+++ b/tools/vdb-copy/context.h
@@ -0,0 +1,183 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_context_
+#define _h_context_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_vdb_copy_includes_
+#include "vdb-copy-includes.h"
+#endif
+
+#ifndef _h_config_values_
+#include "config_values.h"
+#endif
+
+#ifndef _h_vdb_redactval_
+#include "redactval.h"
+#endif
+
+#include <klib/num-gen.h>
+
+#include <kapp/args.h>
+#include "definitions.h"
+
+#define OPTION_TABLE             "table"
+#define OPTION_ROWS              "rows"
+#define OPTION_COLUMNS           "columns"
+#define OPTION_SCHEMA            "schema"
+#define OPTION_WITHOUT_ACCESSION "without_accession"
+#define OPTION_IGNORE_REJECT     "ignore_reject"
+#define OPTION_IGNORE_REDACT     "ignore_redact"
+
+#if ALLOW_EXTERNAL_CONFIG
+#define OPTION_KFG_PATH          "kfg_path"
+#endif
+
+#define OPTION_SHOW_MATCHING     "show_matching"
+#define OPTION_SHOW_PROGRESS     "show_progress"
+#define OPTION_IGNORE_INCOMP     "ignore_incompatible_columns"
+#define OPTION_REINDEX           "reindex"
+#define OPTION_SHOW_REDACT       "show_redact"
+#define OPTION_EXCLUDED_COLUMNS  "exclude_columns"
+#define OPTION_SHOW_META         "show_meta"
+#define OPTION_MD5_MODE          "md5mode"
+#define OPTION_FORCE             "force"
+#define OPTION_UNLOCK            "unlock"
+#define OPTION_BLOB_CHECKSUM     "blob_checksum"
+
+
+#define ALIAS_TABLE             "T"
+#define ALIAS_ROWS              "R"
+#define ALIAS_COLUMNS           "C"
+#define ALIAS_SCHEMA            "S"
+#define ALIAS_WITHOUT_ACCESSION "a"
+#define ALIAS_IGNORE_REJECT     "r"
+#define ALIAS_IGNORE_REDACT     "e"
+
+#if ALLOW_EXTERNAL_CONFIG
+#define ALIAS_KFG_PATH          "k"
+#endif
+
+#define ALIAS_SHOW_MATCHING     "m"
+#define ALIAS_SHOW_PROGRESS     "p"
+#define ALIAS_IGNORE_INCOMP     "i"
+#define ALIAS_REINDEX           "n"
+#define ALIAS_SHOW_REDACT       "w"
+#define ALIAS_EXCLUDED_COLUMNS  "x"
+#define ALIAS_SHOW_META         "t"
+#define ALIAS_MD5_MODE          "d"
+#define ALIAS_FORCE             "f"
+#define ALIAS_UNLOCK            "u"
+#define ALIAS_BLOB_CHECKSUM     "b"
+
+
+/* *******************************************************************
+the dump context contains all informations needed to execute the dump
+******************************************************************* */
+typedef struct context
+{
+    /* read from commandline */
+    char *src_path;
+    char *dst_path;
+    const char *kfg_path;    
+    const KNamelist *src_schema_list;
+    const char *table;
+    const char *columns;
+    const char *excluded_columns;
+    struct num_gen * row_generator;
+    bool usage_requested;
+    bool dont_check_accession;
+    uint64_t platform_id;
+    bool ignore_reject;
+    bool ignore_redact;
+    bool show_matching;
+    bool show_progress;
+    bool ignore_incomp;
+    bool reindex;
+    bool show_redact;
+    bool show_meta;
+    uint8_t md5_mode;
+    uint8_t blob_checksum;
+    bool force_kcmInit;
+    bool force_unlock;
+
+    /* set by application */
+    bool dont_remove_target;
+    config_values config;
+    redact_vals * rvals;
+    /* for the destination table*/
+    char * dst_schema_tabname;
+    /* legacy related parameters */
+    char * legacy_schema_file;
+    char * legacy_dont_copy;
+} context;
+typedef context* p_context;
+
+
+/*
+ * generates a new context, initializes values
+*/
+rc_t context_init( context **ctx );
+
+
+/*
+ * destroys a context, frees all pointers the context owns
+*/
+rc_t context_destroy( p_context ctx );
+
+
+/*
+ * performs the range check to trim the internal number
+ * generator to the given range
+*/
+rc_t context_range_check( p_context ctx, 
+                          const int64_t first, const uint64_t count );
+
+
+rc_t context_set_range( p_context ctx, 
+                        const int64_t first, const uint64_t count );
+
+/*
+ * returns the number of schema's given on the commandline
+*/
+uint32_t context_schema_count( p_context ctx );
+
+
+/*
+ * reads all arguments and options, fills the context
+ * with copies (if strings) of this data
+*/
+rc_t context_capture_arguments_and_options( const Args * args, p_context ctx );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-copy/copy_context.c b/tools/vdb-copy/copy_context.c
new file mode 100644
index 0000000..992d514
--- /dev/null
+++ b/tools/vdb-copy/copy_context.c
@@ -0,0 +1,47 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include "copy_context.h"
+
+#include <sysalloc.h>
+#include <string.h>
+#include <stdlib.h>
+
+
+rc_t cctx_init( p_copy_ctx cctx )
+{
+    return 0;
+}
+
+
+void cctx_destroy( p_copy_ctx cctx )
+{
+    /* ********** destination stuff in reverse order... */
+    /*
+    cctx_destroy_str( &cctx->legacy_dont_copy );
+    cctx_destroy_str( &cctx->legacy_schema_file );
+    cctx_destroy_str( &cctx->dst_schema_tabname );
+    */
+}
diff --git a/tools/vdb-copy/copy_context.h b/tools/vdb-copy/copy_context.h
new file mode 100644
index 0000000..71e491a
--- /dev/null
+++ b/tools/vdb-copy/copy_context.h
@@ -0,0 +1,58 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_copy_context_
+#define _h_vdb_copy_context_
+
+#ifndef _h_vdb_copy_includes_
+#include "vdb-copy-includes.h"
+#endif
+
+#ifndef _h_definitions_
+#include "definitions.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* ----------------------------------------------------------------------------------- */
+typedef struct copy_ctx
+{
+    char * ptr;
+} copy_ctx;
+typedef copy_ctx* p_copy_ctx;
+
+
+rc_t cctx_init( p_copy_ctx cctx );
+void cctx_destroy( p_copy_ctx cctx );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-copy/copy_meta.c b/tools/vdb-copy/copy_meta.c
new file mode 100644
index 0000000..7fd42eb
--- /dev/null
+++ b/tools/vdb-copy/copy_meta.c
@@ -0,0 +1,517 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "vdb-copy-includes.h"
+#include "definitions.h"
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <klib/time.h>
+#include <kdb/meta.h>
+#include <kdb/namelist.h>
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <assert.h>
+
+static rc_t copy_metadata_data ( const KMDataNode *snode, KMDataNode *dnode )
+{
+    char buffer [ 1024 ];
+    size_t total, bytes, remaining;
+    /* copy node data unless already set */
+    rc_t rc = KMDataNodeRead ( dnode, 0, buffer, 0, & bytes, & total );
+    DISP_RC( rc, "copy_metadata_child:KMDataNodeRead(dst) failed" );
+    if ( rc == 0 && total == 0 )
+    do
+    {
+        rc = KMDataNodeRead ( snode, total, buffer, sizeof buffer, & bytes, & remaining );
+        DISP_RC( rc, "copy_metadata_child:KMDataNodeRead(src) failed" );
+        if ( rc == 0 )
+        {
+            rc = KMDataNodeAppend ( dnode, buffer, bytes );
+            DISP_RC( rc, "copy_metadata_child:KMDataNodeAppend(dst) failed" );
+            if ( rc != 0 ) break;
+        }
+        total += bytes;
+     } while ( remaining != 0 );
+    return rc;
+}
+
+
+static rc_t copy_metadata_attribs ( const KMDataNode *snode, KMDataNode *dnode,
+                                    const char *node_path, const bool show_meta )
+{
+    KNamelist *attrs;
+    uint32_t i, count;
+    rc_t rc = KMDataNodeListAttr ( snode, & attrs );
+    DISP_RC( rc, "copy_metadata_child:KMDataNodeListAttr(src) failed" );
+    if ( rc != 0 ) return rc;
+    rc = KNamelistCount ( attrs, & count );
+    for ( i = 0; rc == 0 && i < count; ++ i )
+    {
+        const char *attr;
+        rc = KNamelistGet ( attrs, i, & attr );
+        if ( rc == 0 )
+        {
+            char buffer [ 1024 ];
+            size_t bytes;
+            /* test for attr existence */
+            rc = KMDataNodeReadAttr ( dnode, attr, buffer, sizeof buffer, & bytes );
+            if ( rc != 0 )
+            {
+                rc = KMDataNodeReadAttr ( snode, attr, buffer, sizeof buffer, & bytes );
+                if ( rc == 0 )
+                {
+                    if ( show_meta )
+                        KOutMsg( "copy atr %s : %s\n", node_path, attr );
+                    rc = KMDataNodeWriteAttr ( dnode, attr, buffer );
+                }
+            }
+        }
+        DISP_RC( rc, "copy_metadata_child:failed to copy attribute" );
+    }
+    KNamelistRelease ( attrs );
+    return rc;
+}
+
+
+static rc_t copy_metadata_child ( const KMDataNode *src_root, KMDataNode *dst_root,
+                                  const char *node_path, const bool show_meta )
+{
+    const KMDataNode *snode;
+    KMDataNode *dnode;
+    KNamelist *names;
+
+    rc_t rc = KMDataNodeOpenNodeRead ( src_root, & snode, "%s", node_path );
+    DISP_RC( rc, "copy_metadata_child:KMDataNodeOpenNodeRead(src) failed" );
+    if ( rc != 0 ) return rc;
+
+    if ( show_meta )
+        KOutMsg( "copy child-node: %s\n", node_path );
+
+    rc = KMDataNodeOpenNodeUpdate ( dst_root, & dnode, "%s", node_path );
+    DISP_RC( rc, "copy_metadata_child:KMDataNodeOpenNodeUpdate(dst) failed" );
+    if ( rc == 0 )
+    {
+        rc = copy_metadata_data ( snode, dnode );
+        if ( rc == 0 )
+            rc = copy_metadata_attribs ( snode, dnode, node_path, show_meta );
+        KMDataNodeRelease ( dnode );
+    }
+    else
+    {
+        PLOGMSG( klogInfo, ( klogInfo, 
+                 "cannot open child-node(dst): $(node)", "node=%s", node_path ));
+    }
+
+    if ( rc == 0 || ( GetRCState( rc ) == rcBusy ) )
+    {
+        rc = KMDataNodeListChild ( snode, & names );
+        DISP_RC( rc, "copy_metadata_child:KMDataNodeListChild(src) failed" );
+        if ( rc == 0 )
+        {
+            uint32_t i, count;
+            char temp_path[ 1024 ];
+            size_t temp_len;
+
+            string_copy ( temp_path, ( sizeof temp_path ) - 1, node_path, string_size( node_path ) );
+            temp_len = string_size( temp_path );
+            temp_path[ temp_len++ ] = '/';
+            temp_path[ temp_len ] = 0;
+            rc = KNamelistCount ( names, & count );
+            for ( i = 0; rc == 0 && i < count; ++ i )
+            {
+                const char *child_name;
+                rc = KNamelistGet ( names, i, & child_name );
+                if ( rc == 0 )
+                {
+                    string_copy( temp_path + temp_len, ( sizeof temp_path ) - temp_len, child_name, string_size( child_name ) );
+                    rc = copy_metadata_child ( src_root, dst_root, temp_path, show_meta );
+                    temp_path[ temp_len ] = 0;
+                }
+            }
+            KNamelistRelease ( names );
+        }
+    }
+
+    KMDataNodeRelease ( snode );
+    return rc;
+}
+
+
+static rc_t copy_metadata_root ( const KMDataNode *src_root, KMDataNode *dst_root,
+                                 const char * excluded_nodes,
+                                 const bool show_meta )
+{
+    KNamelist *names;
+    const KNamelist *excluded_names = NULL;
+    uint32_t i, count;
+
+    rc_t rc = KMDataNodeListChild ( src_root, & names );
+    DISP_RC( rc, "copy_metadata_root:KMDataNodeListChild() failed" );
+    if ( rc != 0 ) return rc;
+    
+    if ( excluded_nodes != NULL )
+    {
+        rc = nlt_make_namelist_from_string( &excluded_names, excluded_nodes );
+        DISP_RC( rc, "copy_metadata_root:nlt_make_namelist_from_string() failed" );
+        if ( rc != 0 ) return rc;
+    }
+
+    rc = KNamelistCount ( names, & count );
+    for ( i = 0; rc == 0 && i < count; ++ i )
+    {
+        const char *node_path;
+        rc = KNamelistGet ( names, i, & node_path );
+        DISP_RC( rc, "copy_metadata_root:KNamelistGet() failed" );
+        if ( rc == 0 )
+        {
+            bool is_excluded = false;
+            if ( excluded_names != NULL )
+                is_excluded = nlt_is_name_in_namelist( excluded_names, node_path );
+            if ( !is_excluded )
+                rc = copy_metadata_child ( src_root, dst_root, node_path, show_meta );
+        }
+    }
+
+    if ( excluded_names != NULL )
+        KNamelistRelease( excluded_names );
+    KNamelistRelease ( names );
+    return rc;
+}
+
+
+static rc_t copy_stray_metadata ( const KMetadata *src_meta, KMetadata *dst_meta,
+                                  const char * excluded_nodes,
+                                  const bool show_meta )
+{
+    /* open root node */
+    const KMDataNode *src_root;
+    rc_t rc = KMetadataOpenNodeRead ( src_meta, & src_root, NULL );
+    DISP_RC( rc, "copy_stray_metadata:KMetadataOpenNodeRead() failed" );
+    if ( rc == 0 )
+    {
+        KMDataNode *dst_root;
+        rc = KMetadataOpenNodeUpdate ( dst_meta, & dst_root, NULL );
+        DISP_RC( rc, "copy_stray_metadata:KMetadataOpenNodeUpdate() failed" );
+        if ( rc == 0 )
+        {
+            /* treat the root node in a special way */
+            rc = copy_metadata_root ( src_root, dst_root, excluded_nodes, show_meta );
+            KMDataNodeRelease ( dst_root );
+        }
+        KMDataNodeRelease ( src_root );
+    }
+    return rc;
+}
+
+#if 0
+static rc_t drop_all( KMetadata *dst_meta )
+{
+    KMDataNode *dst_node;
+    rc_t rc = KMetadataOpenNodeUpdate ( dst_meta, & dst_node, NULL );
+    DISP_RC( rc, "drop_all:KMetadataOpenNodeUpdate() failed" );
+    if ( rc == 0 )
+    {
+        rc = KMDataNodeDropAll ( dst_node );
+        DISP_RC( rc, "drop_all:KMetadataDropAll() failed" );
+        KMDataNodeRelease ( dst_node );
+    }
+    return rc;
+}
+#endif
+
+static rc_t copy_back_revisions ( const KMetadata *src_meta, VTable *dst_table,
+                                  const bool show_meta )
+{
+    uint32_t max_revision, revision;
+
+    rc_t rc = KMetadataMaxRevision ( src_meta, &max_revision );
+    DISP_RC( rc, "copy_back_revisions:KMetadataMaxRevision() failed" );
+    if ( rc != 0 ) return rc;
+    if ( max_revision == 0 ) return rc;
+    for ( revision = 1; revision <= max_revision && rc == 0; ++revision )
+    {
+        const KMetadata *src_rev_meta;
+
+        if ( show_meta )
+            KOutMsg( "+++copy metadata rev. #%u:\n", revision );
+        rc = KMetadataOpenRevision ( src_meta, &src_rev_meta, revision );
+        DISP_RC( rc, "copy_back_revisions:KMetadataOpenRevision() failed" );
+        if ( rc == 0 )
+        {
+            KMetadata *dst_meta;
+            rc = VTableOpenMetadataUpdate ( dst_table, & dst_meta );
+            DISP_RC( rc, "copy_table_meta:VTableOpenMetadataUpdate() failed" );
+            if ( rc == 0 )
+            {
+                rc = copy_stray_metadata ( src_rev_meta, dst_meta, NULL, show_meta );
+                if ( rc == 0 )
+                {
+                    rc = KMetadataCommit ( dst_meta );
+                    DISP_RC( rc, "copy_back_revisions:KMetadataCommit() failed" );
+                    if ( rc == 0 )
+                    {
+                        rc = KMetadataFreeze ( dst_meta );
+                        DISP_RC( rc, "copy_back_revisions:KMetadataFreeze() failed" );
+                    }
+                }
+                KMetadataRelease ( dst_meta );
+            }
+
+            KMetadataRelease ( src_rev_meta );
+        }
+    }
+    return rc;
+}
+
+static rc_t fill_timestring( char * s, size_t size )
+{
+    KTime tr;
+    rc_t rc;
+    
+    KTimeLocal ( &tr, KTimeStamp() );
+/*
+    rc = string_printf ( s, size, NULL, 
+                         "%.04u-%.02u-%.02u %.02u:%.02u:%.02u",
+                         tr.year, tr.month + 1, tr.day, tr.hour, tr.minute, tr.second );
+*/
+    rc = string_printf ( s, size, NULL, "%lT", &tr );
+
+    DISP_RC( rc, "fill_timestring:string_printf( date/time ) failed" );
+    return rc;
+}
+
+static rc_t enter_time( KMDataNode *node, const char * key )
+{
+    char timestring[ 160 ];
+    rc_t rc = fill_timestring( timestring, sizeof timestring );
+    if ( rc == 0 )
+    {
+        rc = KMDataNodeWriteAttr ( node, key, timestring );
+        DISP_RC( rc, "enter_time:KMDataNodeWriteAttr( timestring ) failed" );
+    }
+    return rc;
+}
+
+
+static rc_t enter_version( KMDataNode *node, const char * key )
+{
+    char buff[ 32 ];
+    rc_t rc;
+
+    rc = string_printf ( buff, sizeof( buff ), NULL, "%.3V", KAppVersion() );
+    assert ( rc == 0 );
+    rc = KMDataNodeWriteAttr ( node, key, buff );
+    DISP_RC( rc, "enter_version:KMDataNodeWriteAttr() failed" );
+    return rc;
+}
+
+
+static rc_t enter_date_name_vers( KMDataNode *node )
+{
+    rc_t rc = enter_time( node, "run" );
+    DISP_RC( rc, "enter_date_name_vers:enter_time() failed" );
+    if ( rc == 0 )
+    {
+        rc = KMDataNodeWriteAttr ( node, "tool", "vdb-copy" );
+        DISP_RC( rc, "enter_date_name_vers:KMDataNodeWriteAttr(tool=vdb-copy) failed" );
+        if ( rc == 0 )
+        {
+            rc = enter_version ( node, "vers" );
+            DISP_RC( rc, "enter_date_name_vers:enter_version() failed" );
+            if ( rc == 0 )
+            {
+                rc = KMDataNodeWriteAttr ( node, "build", __DATE__ );
+                DISP_RC( rc, "enter_date_name_vers:KMDataNodeWriteAttr(build=_DATE_) failed" );
+            }
+        }
+    }
+    return rc;
+}
+
+static rc_t enter_schema_update( KMetadata *dst_meta, const bool show_meta )
+{
+    rc_t rc;
+    KMDataNode *sw_node;
+
+    if ( show_meta )
+        KOutMsg( "--- entering schema-update\n" );
+
+    rc = KMetadataOpenNodeUpdate ( dst_meta, &sw_node, "SOFTWARE" );
+    DISP_RC( rc, "enter_schema_update:KMetadataOpenNodeUpdate('SOFTWARE') failed" );
+    if ( rc == 0 )
+    {
+        KMDataNode *update_node;
+        rc = KMDataNodeOpenNodeUpdate ( sw_node, &update_node, "update" );
+        DISP_RC( rc, "enter_schema_update:KMDataNodeOpenNodeUpdate('update') failed" );
+        if ( rc == 0 )
+        {
+            rc = enter_date_name_vers( update_node );
+            KMDataNodeRelease ( update_node );
+        }
+        KMDataNodeRelease ( sw_node );
+    }
+    return rc;
+}
+
+
+static uint32_t get_child_count( KMDataNode *node )
+{
+    uint32_t res = 0;
+    KNamelist *names;
+    rc_t rc = KMDataNodeListChild ( node, &names );
+    DISP_RC( rc, "get_child_count:KMDataNodeListChild() failed" );
+    if ( rc == 0 )
+    {
+        rc = KNamelistCount ( names, &res );
+        DISP_RC( rc, "get_child_count:KNamelistCount() failed" );
+        KNamelistRelease ( names );
+    }
+    return res;
+}
+
+
+static rc_t enter_vdbcopy_node( KMetadata *dst_meta, const bool show_meta )
+{
+    rc_t rc;
+    KMDataNode *hist_node;
+
+    if ( show_meta )
+        KOutMsg( "--- entering Copy entry...\n" );
+
+    rc = KMetadataOpenNodeUpdate ( dst_meta, &hist_node, "HISTORY" );
+    DISP_RC( rc, "enter_vdbcopy_node:KMetadataOpenNodeUpdate('HISTORY') failed" );
+    if ( rc == 0 )
+    {
+        char event_name[ 32 ];
+        uint32_t index = get_child_count( hist_node ) + 1;
+        rc = string_printf ( event_name, sizeof( event_name ), NULL, "EVENT_%u", index );
+        DISP_RC( rc, "enter_vdbcopy_node:string_printf(EVENT_NR) failed" );
+        if ( rc == 0 )
+        {
+            KMDataNode *event_node;
+            rc = KMDataNodeOpenNodeUpdate ( hist_node, &event_node, "%s", event_name );
+            DISP_RC( rc, "enter_vdbcopy_node:KMDataNodeOpenNodeUpdate('EVENT_NR') failed" );
+            if ( rc == 0 )
+            {
+                rc = enter_date_name_vers( event_node );
+                KMDataNodeRelease ( event_node );
+            }
+        }
+        KMDataNodeRelease ( hist_node );
+    }
+    return rc;
+}
+
+
+rc_t copy_table_meta ( const VTable *src_table, VTable *dst_table,
+                       const char * excluded_nodes,
+                       const bool show_meta, const bool schema_updated )
+{
+    const KMetadata *src_meta;
+    rc_t rc;
+
+    if ( src_table == NULL || dst_table == NULL )
+        return RC( rcExe, rcNoTarg, rcCopying, rcParam, rcNull );
+    /* it is OK if excluded_nodes is NULL */
+    
+    rc = VTableOpenMetadataRead ( src_table, & src_meta );
+    DISP_RC( rc, "copy_table_meta:VTableOpenMetadataRead() failed" );
+    if ( rc == 0 )
+    {
+        rc = copy_back_revisions ( src_meta, dst_table, show_meta );
+        if ( rc == 0 )
+        {
+            KMetadata *dst_meta;
+            rc = VTableOpenMetadataUpdate ( dst_table, & dst_meta );
+            DISP_RC( rc, "copy_table_meta:VTableOpenMetadataUpdate() failed" );
+            if ( rc == 0 )
+            {
+                if ( show_meta )
+                    KOutMsg( "+++copy current metadata\n" );
+
+                rc = copy_stray_metadata ( src_meta, dst_meta, excluded_nodes,
+                                           show_meta );
+                if ( show_meta )
+                    KOutMsg( "+++end of copy current metadata\n" );
+
+                /* enter a attribute "vdb-copy" under '/SOFTWARE/update'
+                   *if the schema was updated ! */
+                if ( rc == 0 && schema_updated )
+                    rc = enter_schema_update( dst_meta, show_meta );
+
+                /* enter a unconditional node under '/SOFTWARE/Copy'
+                    <%TIMESTAMP%>
+                        <Application date="%DATE%" name="vdb-copy" vers="%VERSION%"/>
+                    </%TIMESTAMP%>
+                */
+                if ( rc == 0 )
+                    rc = enter_vdbcopy_node( dst_meta, show_meta );
+
+                KMetadataRelease ( dst_meta );
+            }
+        }
+        KMetadataRelease ( src_meta );
+    }
+    return rc;
+}
+
+
+rc_t copy_database_meta ( const VDatabase *src_db, VDatabase *dst_db,
+                          const char * excluded_nodes,
+                          const bool show_meta )
+{
+    const KMetadata *src_meta;
+    rc_t rc;
+
+    if ( src_db == NULL || dst_db == NULL )
+        return RC( rcExe, rcNoTarg, rcCopying, rcParam, rcNull );
+    /* it is OK if excluded_nodes is NULL */
+
+    rc = VDatabaseOpenMetadataRead ( src_db, & src_meta );
+    DISP_RC( rc, "copy_database_meta:VDatabaseOpenMetadataRead() failed" );
+    if ( rc == 0 )
+    {
+        KMetadata *dst_meta;
+        rc = VDatabaseOpenMetadataUpdate ( dst_db, & dst_meta );
+        DISP_RC( rc, "copy_database_meta:VDatabaseOpenMetadataUpdate() failed" );
+        if ( rc == 0 )
+        {
+            if ( show_meta )
+                KOutMsg( "+++copy current db-metadata\n" );
+
+            rc = copy_stray_metadata ( src_meta, dst_meta, excluded_nodes,
+                                       show_meta );
+            if ( show_meta )
+                KOutMsg( "+++end of copy db-current metadata\n" );
+
+            KMetadataRelease ( dst_meta );
+        }
+       KMetadataRelease ( src_meta );
+    }
+    return rc;
+}
diff --git a/tools/vdb-copy/copy_meta.h b/tools/vdb-copy/copy_meta.h
new file mode 100644
index 0000000..0248c20
--- /dev/null
+++ b/tools/vdb-copy/copy_meta.h
@@ -0,0 +1,46 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_copy_meta_
+#define _h_copy_meta_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+rc_t copy_table_meta ( const VTable *src_table, VTable *dst_table,
+                       const char * excluded_nodes,
+                       const bool show_meta, const bool schema_updated );
+
+rc_t copy_database_meta ( const VDatabase *src_db, VDatabase *dst_db,
+                          const char * excluded_nodes,
+                          const bool show_meta );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-copy/definitions.h b/tools/vdb-copy/definitions.h
new file mode 100644
index 0000000..de539df
--- /dev/null
+++ b/tools/vdb-copy/definitions.h
@@ -0,0 +1,112 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_definitions_
+#define _h_definitions_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_defs_
+#include <klib/defs.h>
+#endif
+
+#ifndef _h_klib_out_
+#include <klib/out.h>
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_klib_num_gen_
+#include <klib/num-gen.h>
+#endif
+
+#define DISP_RC(rc,err) (void)((rc == 0) ? 0 : LogErr( klogInt, rc, err ))
+
+#define DISP_RC2(rc,err,succ) \
+    (void)((rc != 0)? 0 : (succ) ? LOGMSG( klogInfo, succ ) : LogErr( klogInt, rc, err ))
+
+#define DB_COPY_ENABLED 1
+
+#define ALLOW_EXTERNAL_CONFIG 1
+
+#define SRA_PF_UNDEF 0
+#define SRA_PF_454 1
+#define SRA_PF_ILLUMINA 2
+#define SRA_PF_ABSOLID 3
+#define SRA_PF_COMPLETE_GENOMICS 4
+#define SRA_PF_HELICOS 5
+#define SRA_PF_UNKNOWN 6
+
+#define SRA_READ_FILTER_PASS 0
+#define SRA_READ_FILTER_REJECT 1
+#define SRA_READ_FILTER_CRITERIA 2
+#define SRA_READ_FILTER_REDACTED 3
+
+#define MD5_MODE_OFF 1
+#define MD5_MODE_ON 2
+#define MD5_MODE_AUTO 3
+
+#define BLOB_CHECKSUM_OFF 1
+#define BLOB_CHECKSUM_CRC32 2
+#define BLOB_CHECKSUM_MD5 3
+#define BLOB_CHECKSUM_AUTO 4
+
+#define TYPESPEC_BUF_LEN 128
+
+#define VDB_COPY_PREFIX "/VDBCOPY/"
+
+#define READ_FILTER_COL_NAME_KEY "/VDBCOPY/READ_FILTER_COL_NAME"
+#define READ_FILTER_COL_NAME "READ_FILTER"
+
+#define REDACTABLE_LIST_KEY "/VDBCOPY/REDACTVALUE/TYPES"
+
+#define REDACTABLE_TYPES_KEY "/VDBCOPY/REDACTABLE_TYPES"
+#define REDACTABLE_TYPES "INSDC:dna:text,INSDC:4na:bin,INSDC:4na:packed,INSDC:2na:bin,INSDC:x2na:bin,INSDC:2na:packed,INSDC:color:text,INSDC:2cs:bin,INSDC:x2cs:bin,INSDC:2cs:packed,INSDC:quality:phred,INSDC:quality:log_odds,INSDC:quality:text:phred_33,INSDC:quality:text:phred_64,INSDC:quality:text:log_odds_64,INSDC:position:zero,INSDC:position:one,NCBI:isamp1,NCBI:fsamp1,NCBI:fsamp4,NCBI:SRA:pos16,NCBI:SRA:encoded_qual4"
+
+#define DO_NOT_REDACT_KEY "/VDBCOPY/DO_NOT_REDACT"
+
+#define META_IGNORE_NODES_KEY "/VDBCOPY/META/IGNORE"
+#define META_IGNROE_NODES_DFLT "col,.seq,STATS"
+
+#define TYPE_SCORE_PREFIX "/VDBCOPY/SCORE/"
+
+#define LEGACY_SCHEMA_KEY "/schema"
+#define LEGACY_TAB_KEY "/tab"
+#define LEGACY_EXCLUDE_KEY "/dont_use"
+
+#define REDACTVALUE_PREFIX "/VDBCOPY/REDACTVALUE/"
+#define REDACTVALUE_VALUE_POSTFIX "/VALUE"
+#define REDACTVALUE_LEN_POSTFIX "/LEN"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-copy/get_platform.c b/tools/vdb-copy/get_platform.c
new file mode 100644
index 0000000..7da1e43
--- /dev/null
+++ b/tools/vdb-copy/get_platform.c
@@ -0,0 +1,168 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include "get_platform.h"
+#include <sysalloc.h>
+#include <stdlib.h> /* for malloc */
+#include <string.h> /* for memcpy */
+
+#define PLATFORM_COL "(ascii)PLATFORM"
+
+static rc_t get_platform_from_table( const VTable *my_table, char ** dst, 
+                                     const char pre_and_postfix )
+{
+    const VCursor *my_cursor;
+    rc_t rc = VTableCreateCursorRead( my_table, &my_cursor );
+    if ( rc == 0 )
+    {
+        rc = VCursorOpen( my_cursor );
+        if ( rc == 0 )
+        {
+            uint32_t col_idx;
+            rc = VCursorAddColumn( my_cursor, &col_idx, PLATFORM_COL );
+            if ( rc == 0 )
+            {
+                rc = VCursorSetRowId( my_cursor, 1 );
+                if ( rc == 0 )
+                {
+                    rc = VCursorOpenRow( my_cursor );
+                    if ( rc == 0 )
+                    {
+                        const void *src_buffer;
+                        uint32_t offset_in_bits;
+                        uint32_t element_count;
+                    
+                        rc = VCursorCellData( my_cursor, col_idx, NULL,
+                            &src_buffer, &offset_in_bits, &element_count );
+                        if ( rc == 0 )
+                        {
+                            char *src_ptr = (char*)src_buffer + ( offset_in_bits >> 3 );
+                            if ( pre_and_postfix != 0 )
+                                *dst = malloc( element_count + 3 );
+                            else
+                                *dst = malloc( element_count + 1 );
+                            if ( *dst != NULL )
+                            {
+                                if ( pre_and_postfix != 0 )
+                                {
+                                    (*dst)[ 0 ] = pre_and_postfix;
+                                    memcpy( &(*dst)[1], src_ptr, element_count );
+                                    (*dst)[ element_count + 1 ] = pre_and_postfix;
+                                    (*dst)[ element_count + 2 ] = 0;
+                                }
+                                else
+                                {
+                                    memcpy( *dst, src_ptr, element_count );
+                                    (*dst)[ element_count ] = 0;
+                                }
+                            }
+                            else
+                                rc = RC( rcExe, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                        }
+                        VCursorCloseRow( my_cursor );
+                    }
+                }
+            }
+        }
+        VCursorRelease( my_cursor );
+    }
+    return rc;
+}
+
+rc_t get_table_platform( const char * table_path, char ** dst, 
+                         const char pre_and_postfix )
+{
+    rc_t rc;
+    KDirectory *my_directory;
+    
+    if ( table_path == NULL || dst == 0 )
+        return RC( rcExe, rcNoTarg, rcConstructing, rcParam, rcNull );
+    rc = KDirectoryNativeDir( &my_directory );
+    if ( rc == 0 )
+    {
+        VDBManager *my_manager;
+        rc = VDBManagerMakeUpdate ( &my_manager, my_directory );
+        if ( rc == 0 )
+        {
+            VSchema *my_schema;
+            rc = VDBManagerMakeSRASchema( my_manager, &my_schema );
+            if ( rc == 0 )
+            {
+                const VTable *my_table;
+                rc = VDBManagerOpenTableRead( my_manager, &my_table, my_schema, "%s", table_path );
+                if ( rc == 0 )
+                {
+                    rc = get_platform_from_table( my_table, dst, pre_and_postfix );
+                    VTableRelease( my_table );
+                }
+                VSchemaRelease( my_schema );
+            }
+            VDBManagerRelease( my_manager );
+        }
+        KDirectoryRelease( my_directory );
+    }
+    return rc;
+}
+
+rc_t get_db_platform( const char * db_path, const char * tab_name, 
+                      char ** dst, const char pre_and_postfix )
+{
+    rc_t rc;
+    KDirectory *my_directory;
+    
+    if ( db_path == NULL || tab_name == 0 || dst == 0 )
+        return RC( rcExe, rcNoTarg, rcConstructing, rcParam, rcNull );
+    rc = KDirectoryNativeDir( &my_directory );
+    if ( rc == 0 )
+    {
+        VDBManager *my_manager;
+        rc = VDBManagerMakeUpdate ( &my_manager, my_directory );
+        if ( rc == 0 )
+        {
+            VSchema *my_schema;
+            rc = VDBManagerMakeSRASchema( my_manager, &my_schema );
+            if ( rc == 0 )
+            {
+                const VDatabase *my_database;
+                rc = VDBManagerOpenDBRead( my_manager, &my_database, my_schema, "%s", db_path );
+                if ( rc == 0 )
+                {
+                    const VTable *my_table;
+                    rc = VDatabaseOpenTableRead( my_database, &my_table, "%s", tab_name );
+                    if ( rc == 0 )
+                    {
+                        rc = get_platform_from_table( my_table, dst, pre_and_postfix );
+                        VTableRelease( my_table );
+                    }
+                    VDatabaseRelease( my_database );
+                }
+                VSchemaRelease( my_schema );
+            }
+            VDBManagerRelease( my_manager );
+        }
+        KDirectoryRelease( my_directory );
+    }
+    return rc;
+}
diff --git a/tools/vdb-copy/get_platform.h b/tools/vdb-copy/get_platform.h
new file mode 100644
index 0000000..17f46bf
--- /dev/null
+++ b/tools/vdb-copy/get_platform.h
@@ -0,0 +1,46 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_get_platform_
+#define _h_get_platform_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_vdb_copy_includes_
+#include "vdb-copy-includes.h"
+#endif
+
+rc_t get_table_platform( const char * table_path, char ** dst,
+                         const char pre_and_postfix );
+rc_t get_db_platform( const char * db_path, const char * tab_name, 
+                      char ** dst, const char pre_and_postfix );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-copy/helper.c b/tools/vdb-copy/helper.c
new file mode 100644
index 0000000..782b3ff
--- /dev/null
+++ b/tools/vdb-copy/helper.c
@@ -0,0 +1,919 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "helper.h"
+#include "definitions.h"
+#include <os-native.h>
+
+/* this is here to detect the md5-mode of the src-table */
+#include <kdb/kdb-priv.h>
+#include <kdb/table.h>
+
+#include <sysalloc.h>
+
+#include <bitstr.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <ctype.h>
+
+int64_t strtoi64( const char* str, char** endp, uint32_t base )
+{
+    int i = 0;
+    int64_t ret_value = 0;
+
+    if ( str != NULL && base != 1 && base <= 36 )
+    {
+        bool negate = false;
+
+        for ( ; isspace( str [ i ] ); ++ i )
+            ( void ) 0;
+
+        switch ( str [ i ] )
+        {
+        case '-':
+            negate = true;
+        case '+':
+            ++ i;
+            break;
+        }
+
+        if ( base == 0 )
+        {
+            if ( str [ i ] != '0' )
+                base = 10;
+            else if ( tolower ( str [ i + 1 ] == 'x' ) )
+            {
+                base = 16;
+                i += 2;
+            }
+            else
+            {
+                base = 8;
+                i += 1;
+            }
+        }
+
+        if ( base <= 10 )
+        {
+            for ( ; isdigit ( str [ i ] ); ++ i )
+            {
+                uint32_t digit = str [ i ] - '0';
+                if ( digit >= base )
+                    break;
+                ret_value *= base;
+                ret_value += digit;
+            }
+        }
+        else
+        {
+            for ( ; ; ++ i )
+            {
+                if ( isdigit ( str [ i ] ) )
+                {
+                    ret_value *= base;
+                    ret_value += str [ i ] - '0';
+                }
+                else if ( ! isalpha ( str [ i ] ) )
+                    break;
+                else
+                {
+                    uint32_t digit = toupper ( str [ i ] ) - 'A' + 10;
+                    if ( digit >= base )
+                        break;
+                    ret_value *= base;
+                    ret_value += digit;
+                }
+            }
+        }
+
+        if ( negate )
+            ret_value = - ret_value;
+    }
+
+    if ( endp != NULL )
+        * endp = (char *)str + i;
+
+    return ret_value;
+}
+
+
+uint64_t strtou64( const char* str, char** endp, uint32_t base )
+{
+    return strtoi64( str, endp, base );
+}
+
+
+/*
+ * calls the given manager to create a new SRA-schema
+ * takes the list of user-supplied schema's (which can be empty)
+ * and let the created schema parse all of them
+*/
+rc_t helper_parse_schema( const VDBManager *my_manager,
+                          VSchema **new_schema,
+                          const KNamelist *schema_list )
+{
+    rc_t rc;
+    if ( my_manager == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    if ( new_schema == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+
+    rc = VDBManagerMakeSRASchema( my_manager, new_schema );
+    DISP_RC( rc, "VDBManagerMakeSRASchema() failed" );
+
+    if ( ( rc == 0 )&&( schema_list != NULL ) )
+    {
+        uint32_t count;
+        if ( KNamelistCount( schema_list, &count ) == 0 )
+        {
+            uint32_t idx;
+            for ( idx = 0; idx < count && rc == 0; ++idx )
+            {
+                const char *s;
+                if ( KNamelistGet( schema_list, idx, &s ) == 0 )
+                {
+                    rc = VSchemaParseFile( *new_schema, "%s", s );
+                    DISP_RC( rc, "VSchemaParseFile() failed" );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+#if TOOLS_USE_SRAPATH != 0
+static char *translate_accession( SRAPath *my_sra_path,
+                           const char *accession,
+                           const size_t bufsize )
+{
+    rc_t rc;
+    char * res = calloc( 1, bufsize );
+    if ( res == NULL ) return NULL;
+
+    rc = SRAPathFind( my_sra_path, accession, res, bufsize );
+    if ( GetRCState( rc ) == rcNotFound )
+    {
+        free( res );
+        return NULL;
+    }
+    else if ( GetRCState( rc ) == rcInsufficient )
+    {
+        free( res );
+        return translate_accession( my_sra_path, accession, bufsize * 2 );
+    }
+    else if ( rc != 0 )
+    {
+        free( res );
+        return NULL;
+    }
+    return res;
+}
+#endif
+
+
+#if TOOLS_USE_SRAPATH != 0
+rc_t helper_resolve_accession( const KDirectory *my_dir, char ** path )
+{
+    SRAPath *my_sra_path;
+    rc_t rc = 0;
+
+    if ( strchr ( *path, '/' ) != NULL )
+        return 0;
+
+    rc = SRAPathMake( &my_sra_path, my_dir );
+    if ( rc != 0 )
+    {
+        if ( GetRCState ( rc ) != rcNotFound || GetRCTarget ( rc ) != rcDylib )
+            DISP_RC( rc, "SRAPathMake() failed" );
+        else
+            rc = 0;
+    }
+    else
+    {
+        if ( !SRAPathTest( my_sra_path, *path ) )
+        {
+            char *buf = translate_accession( my_sra_path, *path, 64 );
+            if ( buf != NULL )
+            {
+                free( (char*)(*path) );
+                *path = buf;
+            }
+        }
+        SRAPathRelease( my_sra_path );
+    }
+    return rc;
+}
+#endif
+
+
+/*
+ * calls VTableTypespec to discover the table-name out of the schema
+ * the given table has to be opened!
+*/
+#define MAX_SCHEMA_TABNAME_LENGHT 80
+rc_t helper_get_schema_tab_name( const VTable *my_table, char ** name )
+{
+    rc_t rc;
+    char *s;
+    
+    if ( my_table == NULL || name == NULL )
+        return RC( rcExe, rcNoTarg, rcConstructing, rcParam, rcNull );
+
+    *name = NULL;
+    s = malloc( MAX_SCHEMA_TABNAME_LENGHT + 1 );
+    if ( s == NULL )
+        return RC( rcExe, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+
+    rc = VTableTypespec ( my_table, s, MAX_SCHEMA_TABNAME_LENGHT );
+    if ( rc == 0 )
+        *name = s;
+    else
+        free( s );
+
+    return rc;
+}
+
+
+/*
+ * reads a string out of a vdb-table:
+ * needs a open cursor, a row-idx and the index of the column
+ * it opens the row, requests a pointer via VCursorCellData()
+ * malloc's the dst-pointer and copies the string into it
+ * a 0-termination get's attached
+ * finally it closes the row
+*/
+rc_t helper_read_vdb_string( const VCursor* src_cursor,
+                             const uint64_t row_idx,
+                             const uint32_t col_idx,
+                             char ** dst )
+{
+    rc_t rc;
+
+    if ( dst == NULL )
+        return RC( rcExe, rcNoTarg, rcConstructing, rcParam, rcNull );
+
+    *dst = NULL;
+    rc = VCursorSetRowId( src_cursor, row_idx );
+    DISP_RC( rc, "helper_read_string:VCursorSetRowId() failed" );
+    if ( rc == 0 )
+    {
+        rc = VCursorOpenRow( src_cursor );
+        DISP_RC( rc, "helper_read_string:VCursorOpenRow() failed" );
+        if ( rc == 0 )
+        {
+            const void *src_buffer;
+            uint32_t offset_in_bits;
+            uint32_t element_bits;
+            uint32_t element_count;
+
+            rc = VCursorCellData( src_cursor, col_idx, &element_bits,
+                  &src_buffer, &offset_in_bits, &element_count );
+            DISP_RC( rc, "helper_read_string:VCursorCellData() failed" );
+            if ( rc == 0 )
+            {
+                char *src_ptr = (char*)src_buffer + ( offset_in_bits >> 3 );
+                *dst = malloc( element_count + 1 );
+                if ( *dst != NULL )
+                {
+                    memcpy( *dst, src_ptr, element_count );
+                    (*dst)[ element_count ] = 0;
+                }
+                else
+                    rc = RC( rcExe, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            }
+            VCursorCloseRow( src_cursor );
+            DISP_RC( rc, "helper_read_string:VCursorClose() failed" );
+        }
+    }
+    return rc;
+}
+
+uint8_t BitLength2Bytes[65] =
+{
+         /* 0  1  2  3  4  5  6  7  8  9*/
+   /* 0 */  0, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+   /* 1 */  2, 2, 2, 2, 2, 2, 2, 3, 3, 3,
+   /* 2 */  3, 3, 3, 3, 3, 4, 4, 4, 4, 4,
+   /* 3 */  4, 4, 4, 5, 5, 5, 5, 5, 5, 5,
+   /* 4 */  5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
+   /* 5 */  7, 7, 7, 7, 7, 7, 7, 8, 8, 8,
+   /* 6 */  8, 8, 8, 8, 8
+};
+
+/*************************************************************************************
+n_bits   [IN] ... number of bits
+
+calculates the number of bytes that have to be copied to contain the given
+number of bits
+*************************************************************************************/
+static uint16_t bitlength_2_bytes( const size_t n_bits )
+{
+    if ( n_bits > 64 )
+        return 8;
+    else
+        return BitLength2Bytes[ n_bits ];
+}
+
+
+/*
+ * reads a int64 out of a vdb-table:
+ * needs a open cursor, row-id already set, row opened
+ * it copies the data via memmove where to the dst-pointer
+ * points to / the size in the vdb-table can be smaller
+*/
+rc_t helper_read_vdb_int_row_open( const VCursor* src_cursor,
+                          const uint32_t col_idx, uint64_t * dst )
+{
+    const void *src_buffer;
+    uint32_t offset_in_bits;
+    uint32_t element_bits;
+    uint32_t element_count;
+
+    rc_t rc = VCursorCellData( src_cursor, col_idx, &element_bits,
+                  &src_buffer, &offset_in_bits, &element_count );
+    DISP_RC( rc, "helper_read_int_intern:VCursorCellData() failed" );
+    if ( rc == 0 )
+    {
+        uint64_t value = 0;
+        char *src_ptr = (char*)src_buffer + ( offset_in_bits >> 3 );
+        if ( ( offset_in_bits & 7 ) == 0 )
+            memmove( &value, src_ptr, bitlength_2_bytes( element_bits ) );
+        else
+            bitcpy ( &value, 0, src_ptr, offset_in_bits, element_bits );
+        *dst = value;
+    }
+    return rc;
+}
+
+
+/*
+ * reads a int64 out of a vdb-table:
+ * needs a open cursor, it opens the row,
+ * calls helper_read_vdb_int_row_open()
+ * finally it closes the row
+*/
+rc_t helper_read_vdb_int( const VCursor* src_cursor,
+                          const uint64_t row_idx,
+                          const uint32_t col_idx,
+                          uint64_t * dst )
+{
+    rc_t rc;
+
+    if ( src_cursor == NULL || dst == NULL )
+        return RC( rcExe, rcNoTarg, rcConstructing, rcParam, rcNull );
+
+    *dst = 0;
+    rc = VCursorSetRowId( src_cursor, row_idx );
+    DISP_RC( rc, "helper_read_int:VCursorSetRowId() failed" );
+    if ( rc == 0 )
+    {
+        rc = VCursorOpenRow( src_cursor );
+        DISP_RC( rc, "helper_read_int:VCursorOpenRow() failed" );
+        if ( rc == 0 )
+        {
+            rc = helper_read_vdb_int_row_open( src_cursor, col_idx, dst );
+            VCursorCloseRow( src_cursor );
+            DISP_RC( rc, "helper_read_int:VCursorClose() failed" );
+        }
+    }
+    return rc;
+}
+
+
+/*
+ * reads a string out of a KConfig-object:
+ * needs a cfg-object, and the full name of the key(node)
+ * it opens the node, discovers the size, malloc's the string,
+ * reads the string and closes the node
+*/
+rc_t helper_read_cfg_str( const KConfig *cfg, const char * key,
+                          char ** value )
+{
+    const KConfigNode *node;
+    rc_t rc;
+    
+    if ( value == NULL )
+        return RC( rcExe, rcNoTarg, rcConstructing, rcParam, rcNull );
+ 
+    *value = NULL;
+    rc = KConfigOpenNodeRead ( cfg, &node, "%s", key );
+    /* it is OK if we do not find it, so no DISP_RC here */
+    if ( rc == 0 )
+    {
+        size_t num_read, remaining;
+        /* first we ask about the size to be read */
+        rc = KConfigNodeRead ( node, 0, NULL, 0, &num_read, &remaining );
+        DISP_RC( rc, "helper_read_config_str:KConfigNodeRead(1) failed" );
+        if ( rc == 0 )
+        {
+            *value = malloc( remaining + 1 );
+            if ( *value )
+            {
+                size_t to_read = remaining;
+                rc = KConfigNodeRead ( node, 0, *value, to_read, &num_read, &remaining );
+                DISP_RC( rc, "helper_read_config_str:KConfigNodeRead(2) failed" );
+                if ( rc == 0 )
+                    (*value)[ num_read ] = 0;
+            }
+            else
+                rc = RC( rcExe, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        }
+        KConfigNodeRelease( node );
+    }
+    return rc;
+}
+
+
+/*
+ * reads a uint64 out of a KConfig-object:
+ * needs a cfg-object, and the full name of the key(node)
+ * it calls helper_read_cfg_str() to read the node as string
+ * and converts it via strtou64() into a uint64
+*/
+rc_t helper_read_cfg_int( const KConfig *cfg, const char * key,
+                          uint64_t * value )
+{
+    char *str_value;
+    rc_t rc;
+
+    if ( value == NULL )
+        return RC( rcExe, rcNoTarg, rcConstructing, rcParam, rcNull );
+    *value = 0;
+    
+    rc = helper_read_cfg_str( cfg, key, &str_value );
+    DISP_RC( rc, "helper_read_config_int:helper_read_config_str() failed" );
+    if ( rc == 0 )
+    {
+        *value = strtou64( str_value, NULL, 0 );
+        free( str_value );
+    }
+    return rc;
+}
+
+
+/*
+ * tries to detect if the given name of a schema-table is
+ * a schema-legacy-table, it needs the vdb-manager to
+ * open a sra-schema and request this schema to list all
+ * legacy tables, then it searches in that list for the
+ * given table-name
+*/
+rc_t helper_is_tablename_legacy( const VDBManager *my_manager,
+            const char * tabname, bool * flag )
+{
+    VSchema *schema;
+    rc_t rc;
+
+    if ( flag == NULL )
+        return RC( rcExe, rcNoTarg, rcConstructing, rcParam, rcNull );
+    *flag = false;
+
+    rc = VDBManagerMakeSRASchema ( my_manager, &schema );
+    DISP_RC( rc, "helper_is_tablename_legacy:VDBManagerMakeSRASchema() failed" );
+    if ( rc == 0 )
+    {
+        KNamelist *list;
+        rc = VSchemaListLegacyTables ( schema, &list );
+        DISP_RC( rc, "helper_is_tablename_legacy:VSchemaListLegacyTables() failed" );
+        if ( rc == 0 )
+        {
+            uint32_t count;
+            rc = KNamelistCount ( list, &count );
+            DISP_RC( rc, "helper_is_tablename_legacy:KNamelistCoun() failed" );
+            if ( rc == 0 )
+            {
+                uint32_t idx = 0;
+                size_t tabname_len = string_size ( tabname );
+                while( idx < count && rc == 0 && *flag == false )
+                {
+                    const char * name;
+                    rc = KNamelistGet ( list, idx, &name );
+                    if ( rc == 0 )
+                    {
+                        size_t len = string_size ( name );
+                        if ( string_cmp ( name, len, tabname, tabname_len,
+                             ( len < tabname_len ) ? len : tabname_len ) == 0 )
+                            *flag = true;
+                    }
+                    idx++;
+                }
+            }
+            KNamelistRelease( list );
+        }
+        VSchemaRelease( schema );
+    }
+    return rc;
+}
+
+
+/*
+ * helper-function to replace all ':' and '#' chars
+ * with '_' chars
+*/
+static void helper_process_c_str( char * s )
+{
+    size_t idx, len = string_measure ( s, NULL );
+    for ( idx = 0; idx < len; ++idx )
+    {
+        if ( s[ idx ] == ':' || s[ idx ] == '#' )
+            s[ idx ] = '_';
+    }
+}
+
+
+/*
+ * helper-function to replace all ':' and '#' chars
+ * with '_' chars
+*/
+static void helper_process_cfg_key( String *s )
+{
+    uint32_t idx;
+    for ( idx = 0; idx < s->len; ++idx )
+    {
+        if ( s->addr[ idx ] == ':' || s->addr[ idx ] == '#' )
+            ( (char *)(s->addr) )[ idx ] = '_';
+    }
+}
+
+
+/*
+ * helper-function to read the value of cfg-node
+ * if key_sel = xxx and s_sub = yyy
+ * the node-name is formed like that "/VDBCOPY/xxx/yyy"
+ * to read the value helper_read_cfg_str() is called
+*/
+static rc_t helper_get_legacy_node( KConfig *cfg,
+        String *key_sel, const char * s_sub, char ** dst )
+{
+    String key_prefix, key_sub;
+    const String *temp;
+    const String *key;
+    rc_t rc;
+
+    StringInitCString( &key_prefix, VDB_COPY_PREFIX );
+    rc = StringConcat ( &temp, &key_prefix, key_sel );
+    if ( rc != 0 ) return rc;
+    
+    StringInitCString( &key_sub, s_sub );
+    rc = StringConcat ( &key, temp, &key_sub );
+    StringWhack ( temp );
+    if ( rc != 0 ) return rc;
+    
+    rc = helper_read_cfg_str( cfg, key->addr, dst );
+    StringWhack ( key );
+    return rc;
+}
+
+
+/*
+ * helper-function to read the value of a cfg-node
+ * if pf = "_454_", schema = "NCBI_SRA__454__tbl_v0_1"
+ * and postfix = "tab" it first tries to read:
+ *      "/VDBCOPY/NCBI_SRA__454__tbl_v0_1/tab"
+ * if this node is not found it tries to read:
+ *      "/VDBCOPY/_454_/tab"
+ * if this node is not found it is a error
+*/
+static rc_t helper_get_legacy_value( KConfig *cfg,
+        String *pf, String *schema, const char * postfix, char ** dst )
+{
+    /* first try to find the value under the src-schema-key */
+    rc_t rc = helper_get_legacy_node( cfg, schema, postfix, dst );
+    /* if this fails try to find it mapped to the platform */
+    if ( rc != 0 )
+        rc = helper_get_legacy_node( cfg, pf, postfix, dst );
+    return rc;
+}
+
+
+/*
+ * this function tries to read 3 strings out of cfg-nodes
+ * (1) the name of the schema-file to be used to copy to
+ * (2) the name of the table to be used inside the schema
+ * (3) a list of columns that should not be copied
+ * if (3) cannot be found it is not a error
+ * it needs as input the cfg-object, the name of the 
+ * (src)legacy-platform and the name of the
+ * (src)schema-table
+*/
+rc_t helper_get_legacy_write_schema_from_config( KConfig *cfg,
+    const char * platform,
+    const char * src_schema,
+    char ** legacy_schema_file, char ** legacy_schema_tab,
+    char ** legacy_dont_copy )
+{
+    rc_t rc;
+    String key_pf, key_schema;
+
+    StringInitCString( &key_pf, platform );
+    helper_process_cfg_key( &key_pf );
+    StringInitCString( &key_schema, src_schema );
+    helper_process_cfg_key( &key_pf );
+
+    rc = helper_get_legacy_value( cfg, &key_pf, &key_schema, 
+                LEGACY_SCHEMA_KEY, legacy_schema_file );
+    if ( rc != 0 ) return rc;
+    
+    rc = helper_get_legacy_value( cfg, &key_pf, &key_schema,
+                LEGACY_TAB_KEY, legacy_schema_tab );
+    if ( rc != 0 ) return rc;
+
+    /* dont_use is optional, no error if not found! */
+    helper_get_legacy_value( cfg, &key_pf, &key_schema,
+                LEGACY_EXCLUDE_KEY, legacy_dont_copy );
+    return 0;
+}
+
+
+/*
+ * this function creates a config-manager, by passing in
+ * a KDirectory-object representing the given path
+ * this will include the the given path into the search
+ * for *.kfg - files
+*/
+rc_t helper_make_config_mgr( KConfig **config_mgr, const char * path )
+{
+#if ALLOW_EXTERNAL_CONFIG
+    KDirectory *directory;
+    const KDirectory *config_sub_dir;
+
+    rc_t rc = KDirectoryNativeDir( &directory );
+    if ( rc != 0 ) return rc;
+    rc = KDirectoryOpenDirRead ( directory, &config_sub_dir, false, "%s", path );
+    if ( rc == 0 )
+    {
+        rc = KConfigMake ( config_mgr, config_sub_dir );
+        KDirectoryRelease( config_sub_dir );
+    }
+    KDirectoryRelease( directory );
+#else
+    rc_t rc = KConfigMake ( config_mgr, NULL );
+#endif
+    return rc;
+}
+
+
+/*
+ * this function tries to read the lossynes-score of a vdb-type
+ * out of a config-object
+ * it constructs a node-name-string like this:
+ *      "/VDBCOPY/SCORE/INSDC_2na_bin"
+ * INSDC/2na/bin is the name of the type with ":" replaced by "_"
+ * it reads the value by calling helper_read_cfg_str()
+*/
+uint32_t helper_rd_type_score( const KConfig *cfg, 
+                               const char *type_name )
+{
+    uint32_t res = 0;
+    if ( cfg != NULL && type_name != NULL && type_name[0] != 0 )
+    {
+        uint32_t prefix_len = string_measure ( TYPE_SCORE_PREFIX, NULL ) + 1;
+        uint32_t len = string_measure ( type_name, NULL ) + prefix_len;
+        char *s = malloc( len );
+        if ( s != NULL )
+        {
+            char *value;
+            size_t n = string_copy_measure ( s, len, TYPE_SCORE_PREFIX );
+            string_copy_measure( &(s[n]), len, type_name );
+            helper_process_c_str( s );
+            if ( helper_read_cfg_str( cfg, s, &value ) == 0 )
+            {
+                if ( value != NULL )
+                {
+                    res = strtol( value, NULL, 0 );
+                    free( value );
+                }
+            }
+            free( s );
+        }
+    }
+    return res;
+}
+
+
+/* remove the target-table if something went wrong */
+rc_t helper_remove_path( KDirectory * directory, const char * path )
+{
+    rc_t rc;
+
+    PLOGMSG( klogInfo, ( klogInfo, "removing '$(path)'", "path=%s", path ));
+    rc = KDirectoryRemove ( directory, true, "%s", path );
+    DISP_RC( rc, "vdb_copy_remove_table:KDirectoryRemove() failed" );
+    return rc;
+}
+
+
+bool helper_is_this_a_filesystem_path( const char * path )
+{
+    bool res = false;
+    size_t i, n = string_size ( path );
+    for ( i = 0; i < n && !res; ++i )
+    {
+        char c = path[ i ];
+        res = ( c == '.' || c == '/' || c == '\\' );
+    }
+    return res;
+}
+
+
+static void helper_read_redact_value( KConfig * config_mgr, redact_vals * rvals,
+                               const char * type_name )
+{
+    rc_t rc;
+    String key_prefix, key_type, key_postfix;
+    const String * p1;
+
+    StringInitCString( &key_prefix, REDACTVALUE_PREFIX );
+    StringInitCString( &key_type, type_name );
+    StringInitCString( &key_postfix, REDACTVALUE_VALUE_POSTFIX );
+    rc = StringConcat ( &p1, &key_prefix, &key_type );
+    if ( rc == 0 )
+    {
+        const String * key;
+        rc = StringConcat ( &key, p1, &key_postfix );
+        if ( rc == 0 )
+        {
+            char * value_str;
+            rc = helper_read_cfg_str( config_mgr, key->addr, &value_str );
+            StringWhack ( key );
+            if ( rc == 0 )
+            {
+                StringInitCString( &key_postfix, REDACTVALUE_LEN_POSTFIX );
+                rc = StringConcat ( &key, p1, &key_postfix );
+                if ( rc == 0 )
+                {
+                    uint32_t idx, l, len = 1;
+                    char * endp, * len_str, * real_type;
+
+                    rc = helper_read_cfg_str( config_mgr, key->addr, &len_str );
+                    StringWhack ( key );
+                    if ( rc == 0 )
+                    {
+                        len = strtol( len_str, &endp, 0 );
+                        free( len_str );
+                    }
+
+                    real_type = string_dup_measure ( type_name, NULL );
+                    l = string_size ( real_type );
+                        
+                    /* transform the typename back into '_' ---> ':' real typename */
+                    for ( idx = 0; idx < l; ++idx )
+                        if ( real_type[idx] == '_' )
+                            real_type[idx] = ':';
+
+                    /* finally insert the redact-value-pair into the list */
+                    redact_vals_add( rvals, real_type, len, value_str );
+                    free( real_type );
+                }
+                free( value_str );
+            }
+        }
+        StringWhack ( p1 );
+    }
+}
+
+
+void helper_read_redact_values( KConfig * config_mgr, redact_vals * rvals )
+{
+    rc_t rc;
+    char * type_list_str;
+    const KNamelist *type_list;
+
+    /* first we read the list of redactable types */
+    helper_read_cfg_str( config_mgr, 
+            REDACTABLE_LIST_KEY, &type_list_str );
+    if ( type_list_str == NULL ) return;
+    rc = nlt_make_namelist_from_string( &type_list, type_list_str );
+    if ( rc == 0 && type_list != NULL )
+    {
+        uint32_t idx, count;
+        rc = KNamelistCount( type_list, &count );
+        if ( rc == 0 && count > 0 )
+            for ( idx = 0; idx < count; ++idx )
+            {
+                const char *type_name;
+                rc = KNamelistGet( type_list, idx, &type_name );
+                if ( rc == 0 )
+                    helper_read_redact_value( config_mgr, rvals, type_name );
+            }
+        KNamelistRelease( type_list );
+    }
+    free( type_list_str );
+}
+
+
+void helper_read_config_values( KConfig * config_mgr, p_config_values config )
+{
+    /* key's and default-values in definitions.h */
+
+    /* look for the name of the filter-column */
+    helper_read_cfg_str( config_mgr, 
+            READ_FILTER_COL_NAME_KEY, &(config->filter_col_name) );
+    if ( config->filter_col_name == NULL )
+        config->filter_col_name = string_dup_measure ( READ_FILTER_COL_NAME, NULL );
+
+    /* look for the comma-separated list of meta-nodes to be ignored */
+    helper_read_cfg_str( config_mgr, 
+            META_IGNORE_NODES_KEY, &(config->meta_ignore_nodes) );
+    if ( config->meta_ignore_nodes == NULL )
+        config->meta_ignore_nodes = string_dup_measure ( META_IGNROE_NODES_DFLT, NULL );
+
+    /* look for the comma-separated list of redactable types */
+    helper_read_cfg_str( config_mgr, 
+            REDACTABLE_TYPES_KEY, &(config->redactable_types) );
+    if ( config->redactable_types == NULL )
+        config->redactable_types = string_dup_measure ( REDACTABLE_TYPES, NULL );
+
+    /* look for the comma-separated list of columns which are protected from redaction */
+    helper_read_cfg_str( config_mgr, 
+            DO_NOT_REDACT_KEY, &(config->do_not_redact_columns) );
+}
+
+
+bool helper_detect_src_md5( const VTable * src_tab )
+{
+    rc_t rc;
+    const struct KTable * ktab;
+    bool res = false;
+
+    rc = VTableOpenKTableRead ( src_tab, &ktab );
+    if ( rc == 0 )
+    {
+        const struct KDirectory *dir;
+        rc = KTableOpenDirectoryRead ( ktab, &dir );
+        if ( rc == 0 )
+        {
+            /* ask for pathtype of "md5" */
+            uint32_t pt = KDirectoryPathType ( dir, "md5" );
+            if ( ( pt == kptFile )||( pt == ( kptFile | kptAlias ) ) )
+                res = true;
+            KDirectoryRelease( dir );
+        }
+        KTableRelease( ktab );
+    }
+    return res;
+}
+
+
+KCreateMode helper_assemble_CreateMode( const VTable * src_tab, 
+                                        bool force_init, uint8_t md5_mode )
+{
+    KCreateMode res = kcmParents;
+ 
+    if ( md5_mode == MD5_MODE_AUTO )
+    {
+        bool src_md5_mode = helper_detect_src_md5( src_tab );
+        md5_mode = ( src_md5_mode ? MD5_MODE_ON : MD5_MODE_OFF );
+    }
+
+    if ( force_init )
+        res |= kcmInit;
+    else
+        res |= kcmCreate;
+
+    switch( md5_mode )
+    {
+    case MD5_MODE_ON :
+    case MD5_MODE_AUTO : res |= kcmMD5; break;
+    }
+    return res;
+}
+
+
+KChecksum helper_assemble_ChecksumMode( uint8_t ctx_blob_checksum )
+{
+    KChecksum res = kcsCRC32; /* from interfaces/kdb/column.h */
+    switch( ctx_blob_checksum )
+    {
+        case BLOB_CHECKSUM_OFF   : res = kcsNone; break;
+        case BLOB_CHECKSUM_CRC32 : res = kcsCRC32; break;
+        case BLOB_CHECKSUM_MD5   : res = kcsMD5; break;
+        case BLOB_CHECKSUM_AUTO  : res = kcsCRC32; break;
+    }
+    return res;
+}
diff --git a/tools/vdb-copy/helper.h b/tools/vdb-copy/helper.h
new file mode 100644
index 0000000..998961e
--- /dev/null
+++ b/tools/vdb-copy/helper.h
@@ -0,0 +1,225 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_helper_
+#define _h_helper_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_vdb_copy_includes_
+#include "vdb-copy-includes.h"
+#endif
+
+#ifndef _h_vdb_redactval_
+#include "redactval.h"
+#endif
+
+#ifndef _h_config_values_
+#include "config_values.h"
+#endif
+
+int64_t strtoi64( const char* str, char** endp, uint32_t base );
+uint64_t strtou64( const char* str, char** endp, uint32_t base );
+
+/*
+ * calls the given manager to create a new SRA-schema
+ * takes the list of user-supplied schema's (which can be empty)
+ * and let the created schema parse all of them
+*/
+rc_t helper_parse_schema( const VDBManager *my_manager,
+                          VSchema **new_schema,
+                          const KNamelist *schema_list );
+
+/*
+ * tries to interpret the given string in path as a accession
+ * and returns the path of the found accession back in path
+ * if it is possible, if not the original value of path remains unchanged
+ * rc = 0 if the given path is a file-system-path or we are not
+ * (weakly) linked against the sra-path-library
+rc_t helper_resolve_accession( const KDirectory *my_dir,
+                               char ** path );
+*/
+
+/*
+ * calls VTableTypespec to discover the table-name out of the schema
+ * the given table has to be opened!
+*/
+rc_t helper_get_schema_tab_name( const VTable *my_table, char ** name ) ;
+
+
+/*
+ * reads a string out of a vdb-table:
+ * needs a open cursor, a row-idx and the index of the column
+ * it opens the row, requests a pointer via VCursorCellData()
+ * malloc's the dst-pointer and copies the string into it
+ * a 0-termination get's attached
+ * finally it closes the row
+*/
+rc_t helper_read_vdb_string( const VCursor* src_cursor,
+                             const uint64_t row_idx,
+                             const uint32_t col_idx,
+                             char ** dst );
+
+
+/*
+ * reads a int64 out of a vdb-table:
+ * needs a open cursor, row-id already set, row opened
+ * it copies the data via memmove where to the dst-pointer
+ * points to / the size in the vdb-table can be smaller
+*/
+rc_t helper_read_vdb_int_row_open( const VCursor* src_cursor,
+                          const uint32_t col_idx, uint64_t * dst );
+
+
+/*
+ * reads a int64 out of a vdb-table:
+ * needs a open cursor, it opens the row,
+ * calls helper_read_vdb_int_row_open()
+ * finally it closes the row
+*/
+rc_t helper_read_vdb_int( const VCursor* src_cursor,
+                          const uint64_t row_idx,
+                          const uint32_t col_idx,
+                          uint64_t * dst );
+
+
+/*
+ * reads a string out of a KConfig-object:
+ * needs a cfg-object, and the full name of the key(node)
+ * it opens the node, discovers the size, malloc's the string,
+ * reads the string and closes the node
+*/
+rc_t helper_read_cfg_str( const KConfig *cfg,
+                          const char * key,
+                          char ** value );
+
+
+/*
+ * reads a uint64 out of a KConfig-object:
+ * needs a cfg-object, and the full name of the key(node)
+ * it calls helper_read_cfg_str() to read the node as string
+ * and converts it via strtoll() into a uint64
+*/
+rc_t helper_read_cfg_int( const KConfig *cfg,
+                          const char * key,
+                          uint64_t * value );
+
+
+/*
+ * tries to detect if the given name of a schema-table is
+ * a schema-legacy-table, it needs the vdb-manager to
+ * open a sra-schema and request this schema to list all
+ * legacy tables, then it searches in that list for the
+ * given table-name
+*/
+rc_t helper_is_tablename_legacy( const VDBManager *my_manager,
+            const char * tabname, bool * flag );
+
+
+/*
+ * this function tries to read 3 strings out of cfg-nodes
+ * (1) the name of the schema-file to be used to copy to
+ * (2) the name of the table to be used inside the schema
+ * (3) a list of columns that should not be copied
+ * if (3) cannot be found it is not a error
+ * it needs as input the cfg-object, the name of the 
+ * (src)legacy-platform and the name of the
+ * (src)schema-table
+*/
+rc_t helper_get_legacy_write_schema_from_config( KConfig *cfg,
+    const char * platform,
+    const char * src_schema,
+    char ** legacy_schema_file, char ** legacy_schema_tab,
+    char ** legacy_dont_copy );
+
+
+/*
+ * this function creates a config-manager, by passing in
+ * a KDirectory-object representing the given path
+ * this will include the the given path into the search
+ * for *.kfg - files
+*/
+rc_t helper_make_config_mgr( KConfig **config_mgr, const char * path );
+
+
+/*
+ * this function tries to read the lossynes-score of a vdb-type
+ * out of a config-object
+ * it constructs a node-name-string like this:
+ *      "/VDBCOPY/SCORE/INSDC/2na/bin"
+ * INSDC/2na/bin is the name of the type with ":" replaced by "/"
+ * it reads the value by calling helper_read_cfg_str()
+*/
+uint32_t helper_rd_type_score( const KConfig *cfg,
+                               const char *type_name );
+
+
+/*
+ * this function tries to remove the given path
+*/
+rc_t helper_remove_path( KDirectory * directory, const char * path );
+
+
+/*
+ * looks into the path for chars like '/', '\\' or '.'
+ * to detect that it is rather a path and not and accession
+*/
+bool helper_is_this_a_filesystem_path( const char * path );
+
+
+/*
+ * reads global config-values, from the config-manager
+*/
+void helper_read_redact_values( KConfig * config_mgr,
+                                redact_vals * rvals );
+
+/*
+ * reads global config-values, if not found via config-manager
+ * use the defines from definition.h
+*/
+void helper_read_config_values( KConfig * config_mgr,
+                                p_config_values config );
+
+
+/*
+ * detects if the given table uses md5-checksum's
+*/
+bool helper_detect_src_md5( const VTable * src_tab );
+
+
+KCreateMode helper_assemble_CreateMode( const VTable * src_tab, 
+                                        bool force_init, uint8_t md5_mode );
+
+
+KChecksum helper_assemble_ChecksumMode( uint8_t ctx_blob_checksum );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-copy/matcher_input.h b/tools/vdb-copy/matcher_input.h
new file mode 100644
index 0000000..1a5434a
--- /dev/null
+++ b/tools/vdb-copy/matcher_input.h
@@ -0,0 +1,55 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_matcher_input_
+#define _h_matcher_input_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* structure with all the matcher-inputs */
+typedef struct matcher_input
+{
+    VDBManager * manager;
+    const KNamelist * add_schemas;
+    KConfig * cfg;
+    KDirectory * dir;
+    const char * columns;
+    const char * src_path;
+    const char * dst_path;
+    const char * legacy_schema;
+    const char * dst_tabname;
+    const char * excluded_columns;
+    bool force_kcmInit;
+    bool force_unlock;
+} matcher_input;
+typedef matcher_input* p_matcher_input;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-copy/namelist_tools.c b/tools/vdb-copy/namelist_tools.c
new file mode 100644
index 0000000..270449b
--- /dev/null
+++ b/tools/vdb-copy/namelist_tools.c
@@ -0,0 +1,187 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include "namelist_tools.h"
+
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+
+int nlt_strcmp( const char* s1, const char* s2 )
+{
+    size_t n1 = string_size ( s1 );
+    size_t n2 = string_size ( s2 );
+    return string_cmp ( s1, n1, s2, n2, ( n1 < n2 ) ? n2 : n1 );
+}
+
+
+rc_t nlt_make_namelist_from_string( const KNamelist **list, const char * src )
+{
+    VNamelist *v_names;
+    rc_t rc = VNamelistMake ( &v_names, 5 );
+    if ( rc == 0 )
+    {
+        char * s = string_dup_measure ( src, NULL );
+        if ( s )
+        {
+            uint32_t str_begin = 0;
+            uint32_t str_end = 0;
+            char c;
+            do
+            {
+                c = s[ str_end ];
+                if ( c == ',' || c == 0 )
+                {
+                    if ( str_begin < str_end )
+                    {
+                        char c_temp = c;
+                        s[ str_end ] = 0;
+                        rc = VNamelistAppend ( v_names, &(s[str_begin]) );
+                        s[ str_end ] = c_temp;
+                    }
+                    str_begin = str_end + 1;
+                }
+                str_end++;
+            } while ( c != 0 && rc == 0 );
+            free( s );
+        }
+        rc = VNamelistToConstNamelist ( v_names, list );
+        VNamelistRelease( v_names );
+    }
+    return rc;
+}
+
+bool nlt_is_name_in_namelist( const KNamelist *list,
+                             const char *name_to_find )
+{
+    uint32_t count, idx;
+    bool res = false;
+    if ( list == NULL || name_to_find == NULL )
+        return res;
+    if ( KNamelistCount( list, &count ) == 0 )
+    {
+        for ( idx = 0; idx < count && res == false; ++idx )
+        {
+            const char *item_name;
+            if ( KNamelistGet( list, idx, &item_name ) == 0 )
+            {
+                if ( nlt_strcmp( item_name, name_to_find ) == 0 )
+                    res = true;
+            }
+        }
+    }
+    return res;
+}
+
+/*
+    - list1 and list2 containts strings
+    - if one of the strings in list2 is contained ( partial match, strstr() )
+      in one of the strings in list1 the function returns true...
+*/
+bool nlt_namelist_intersect( const KNamelist *list1, const KNamelist *list2 )
+{
+    uint32_t count1;
+    bool res = false;
+    if ( list1 == NULL || list2 == NULL )
+        return res;
+    if ( KNamelistCount( list1, &count1 ) == 0 )
+    {
+        uint32_t idx1;
+        for ( idx1 = 0; idx1 < count1 && res == false; ++idx1 )
+        {
+            const char *string1;
+            if ( KNamelistGet( list1, idx1, &string1 ) == 0 )
+            {
+                uint32_t count2;
+                if ( KNamelistCount( list2, &count2 ) == 0 )
+                {
+                    uint32_t idx2;
+                    for ( idx2 = 0; idx2 < count2 && res == false; ++idx2 )
+                    {
+                        const char *string2;
+                        if ( KNamelistGet( list2, idx2, &string2 ) == 0 )
+                        {
+                            if ( strstr( string1, string2 ) != NULL )
+                                res = true;
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return res;
+}
+
+rc_t nlt_remove_names_from_namelist( const KNamelist *source,
+            const KNamelist **dest, const KNamelist *to_remove )
+{
+    rc_t rc = 0;
+    uint32_t count;
+    
+    if ( source == NULL || dest == NULL || to_remove == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    *dest = NULL;
+    rc = KNamelistCount( source, &count );
+    if ( rc == 0 && count > 0 )
+    {
+        VNamelist *cleaned;
+        rc = VNamelistMake ( &cleaned, count );
+        if ( rc == 0 )
+        {
+            uint32_t idx;
+            for ( idx = 0; idx < count && rc == 0; ++idx )
+            {
+                const char *s;
+                rc = KNamelistGet( source, idx, &s );
+                if ( rc == 0 )
+                {
+                    if ( !nlt_is_name_in_namelist( to_remove, s ) )
+                        rc = VNamelistAppend ( cleaned, s );
+                }
+                rc = VNamelistToConstNamelist ( cleaned, dest );
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t nlt_remove_strings_from_namelist( const KNamelist *source,
+            const KNamelist **dest, const char *items_to_remove )
+{
+    rc_t rc = 0;
+    const KNamelist *to_remove;
+    
+    if ( source == NULL || dest == NULL || items_to_remove == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    rc = nlt_make_namelist_from_string( &to_remove, items_to_remove );
+    if ( rc == 0 )
+    {
+        rc = nlt_remove_names_from_namelist( source, dest, to_remove );
+        KNamelistRelease( to_remove );
+    }
+    return rc;
+}
diff --git a/tools/vdb-copy/namelist_tools.h b/tools/vdb-copy/namelist_tools.h
new file mode 100644
index 0000000..3cefbf9
--- /dev/null
+++ b/tools/vdb-copy/namelist_tools.h
@@ -0,0 +1,52 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_namelist_tools_
+#define _h_namelist_tools_
+
+#ifndef _h_vdb_copy_includes_
+#include "vdb-copy-includes.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int nlt_strcmp( const char* s1, const char* s2 );
+rc_t nlt_make_namelist_from_string( const KNamelist **list, const char * src );
+bool nlt_is_name_in_namelist( const KNamelist *list, const char *name_to_find );
+bool nlt_namelist_intersect( const KNamelist *list1, const KNamelist *list2 );
+
+rc_t nlt_remove_names_from_namelist( const KNamelist *source,
+            const KNamelist **dest, const KNamelist *to_remove );
+
+rc_t nlt_remove_strings_from_namelist( const KNamelist *source,
+            const KNamelist **dest, const char *items_to_remove );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-copy/num-gen.c b/tools/vdb-copy/num-gen.c
new file mode 100644
index 0000000..e3c1607
--- /dev/null
+++ b/tools/vdb-copy/num-gen.c
@@ -0,0 +1,848 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "num-gen.h"
+#include <klib/printf.h>
+
+#include <sysalloc.h>
+#include <strtol.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+typedef struct num_gen_node
+{
+    uint64_t start;
+    uint64_t end;
+    uint64_t count; /* 0 ... skip, >0 ... valid */
+} num_gen_node;
+typedef struct num_gen_node * p_num_gen_node;
+
+/* **************************************************************************
+{ start:5,count: 0 } ---> [ ]
+{ start:5,count: 1 } ---> [ 5 ]
+{ start:5,count: 2 } ---> [ 5, 6 ]
+ ************************************************************************** */
+
+struct num_gen
+{
+    Vector nodes;
+};
+
+
+struct num_gen_iter
+{
+    Vector nodes;
+    uint32_t curr_node;
+    uint32_t curr_node_sub_pos;
+    uint64_t total;
+    uint64_t progress;
+};
+
+/* forward decl. for fixing-function */
+static rc_t num_gen_fix_overlaps( num_gen* self, uint32_t *count );
+
+
+/* helper function to destroy a node*/
+static void CC num_gen_node_destroy( void *item, void *data )
+{
+    free( item );
+}
+
+
+/* helper function to create a node from start/count */
+static p_num_gen_node num_gen_make_node( const uint64_t start, const uint64_t count )
+{
+    p_num_gen_node p = ( p_num_gen_node )malloc( sizeof( num_gen_node ) );
+    if ( p )
+    {
+        p->start = start;
+        p->end = start + count - 1;
+        p->count = count;
+    }
+    return p;
+}
+
+
+/* helper callback to compare 2 nodes, lets VectorInsert create a sorted vector */
+static int64_t CC num_gen_insert_helper( const void* item1, const void* item2 )
+{
+    const p_num_gen_node node1 = ( p_num_gen_node )item1;
+    const p_num_gen_node node2 = ( p_num_gen_node )item2;
+    int64_t res = 0;
+    if ( node1->start == node2->start )
+    {
+        if ( node1->count < node2->count )
+            res = -1;
+        else if ( node1->count > node2->count )
+            res = 1;
+    }
+    else if ( node1->start < node2->start )
+        res = -1;
+    else
+        res = 1;
+    return res;
+}
+
+
+/* helper callback to create a deep and conditional copy of a node-vector */
+static void CC num_gen_copy_cb( void *item, void *data )
+{
+    p_num_gen_node node = ( p_num_gen_node )item;
+    if ( node->count > 0 )
+    {
+        Vector * dst = ( Vector *)data;
+        p_num_gen_node new_node = num_gen_make_node( node->start, node->count );
+        if ( new_node != NULL )
+            VectorInsert( dst, new_node, NULL, num_gen_insert_helper );
+    }
+}
+
+
+/* helper function that creates a deep and conditional copy of a node-vector */
+static void num_gen_copy_vector( const Vector * src, Vector * dst )
+{
+    if ( src == NULL || dst == NULL )
+        return;
+    VectorForEach ( src, false, num_gen_copy_cb, dst );    
+}
+
+
+/* helper callback to add up all count values in the vector*/
+static void CC num_gen_total_count_cb( void *item, void *data )
+{
+    p_num_gen_node node = ( p_num_gen_node )item;
+    if ( node != NULL )
+    {
+        uint64_t * total = ( uint64_t *)data;
+        if ( total != NULL )
+            *total += node->count;
+    }
+}
+
+
+/* helper function that adds up all count values in the vector*/
+static uint64_t num_gen_total_count( const Vector * src )
+{
+    uint64_t res = 0;
+    if ( src != NULL )
+        VectorForEach ( src, false, num_gen_total_count_cb, &res );
+    return res;
+}
+
+
+/* helper function for the parse-function */
+static rc_t num_gen_add_node( num_gen* self, const uint64_t from,
+                              const uint64_t to )
+{
+    p_num_gen_node node = NULL;
+    int64_t count = ( to - from );
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcInserting, rcSelf, rcNull );
+
+    if ( count >= 0 )
+        node = num_gen_make_node( from, count + 1 );
+    else
+        node = num_gen_make_node( to, -( count + 1 ) );
+    if ( node == NULL )
+        return RC( rcVDB, rcNoTarg, rcInserting, rcMemory, rcExhausted );
+    return VectorInsert( &(self->nodes), node, NULL, num_gen_insert_helper );
+}
+
+
+#define MAX_NUM_STR 12
+/* helper-structure for num_gen_parse() */
+typedef struct num_gen_parse_ctx
+{
+    uint32_t num_str_idx;
+    bool this_is_the_first_number;
+    uint64_t num1;
+    uint64_t num2;
+    char num_str[ MAX_NUM_STR + 1 ];
+} num_gen_parse_ctx;
+typedef num_gen_parse_ctx* p_num_gen_parse_ctx;
+
+
+/* helper for num_gen_parse() */
+static void num_gen_convert_ctx( p_num_gen_parse_ctx ctx )
+{
+    char *endp;
+    
+    ctx->num_str[ ctx->num_str_idx ] = 0;
+    ctx->num1 = strtou64( ctx->num_str, &endp, 10 );
+    ctx->this_is_the_first_number = false;
+    ctx->num_str_idx = 0;
+}
+
+
+/* helper for num_gen_parse() */
+static rc_t num_gen_convert_and_add_ctx( num_gen* self, p_num_gen_parse_ctx ctx )
+{
+    char *endp;
+    
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcInserting, rcSelf, rcNull );
+    if ( ctx == NULL )
+        return RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcNull );
+    if ( ctx->num_str_idx == 0 )
+        return RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcEmpty );
+
+    /* terminate the source-string */
+    ctx->num_str[ ctx->num_str_idx ] = 0;
+    /* convert the string into a uint64_t */
+    if ( ctx->this_is_the_first_number )
+        {
+        ctx->num1 = strtou64( ctx->num_str, &endp, 10 );
+        ctx->num2 = ctx->num1;
+        }
+    else
+        ctx->num2 = strtou64( ctx->num_str, &endp, 10 );
+    /* empty the source-string to be reused */
+    ctx->num_str_idx = 0;
+    
+    ctx->this_is_the_first_number = true;
+    return num_gen_add_node( self, ctx->num1, ctx->num2 );
+}
+
+
+/* parse the given string and insert the found ranges 
+   into the number-generator, fixes eventual overlaps */
+rc_t num_gen_parse( num_gen* self, const char* src )
+{
+    size_t i, n;
+    num_gen_parse_ctx ctx;
+    rc_t rc = 0;
+
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcParsing, rcSelf, rcNull );
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcParsing, rcParam, rcNull );
+
+    n = string_measure ( src, NULL );
+    if ( n == 0 )
+        return RC( rcVDB, rcNoTarg, rcParsing, rcParam, rcEmpty );
+
+    ctx.num_str_idx = 0;
+    ctx.this_is_the_first_number = true;
+    for ( i = 0; i < n && rc == 0; ++i )
+    {
+        switch ( src[ i ] )
+        {
+        /* a dash switches from N1-mode into N2-mode */
+        case '-' :
+            num_gen_convert_ctx( &ctx );
+            break;
+
+        /* a comma ends a single number or a range */
+        case ',' :
+            rc = num_gen_convert_and_add_ctx( self, &ctx );
+            break;
+
+        /* in both mode add the char to the temp string */
+        default:
+            if ( ( src[i]>='0' )&&( src[i]<='9' )&&( ctx.num_str_idx < MAX_NUM_STR ) )
+                ctx.num_str[ ctx.num_str_idx++ ] = src[ i ];
+            break;
+        }
+    }
+    /* dont forget to add what is left in ctx.num_str ... */
+    if ( ctx.num_str_idx > 0 )
+        rc = num_gen_convert_and_add_ctx( self, &ctx );
+    if ( rc == 0 )
+        rc = num_gen_fix_overlaps( self, NULL );
+    return rc;
+}
+
+
+/* inserts the given ranges into the number-generator,
+   fixes eventual overlaps */
+rc_t num_gen_add( num_gen* self, const uint64_t first, const uint64_t count )
+{
+    rc_t rc;
+    uint64_t num_1 = first;
+    uint64_t num_2 = first;
+
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcInserting, rcSelf, rcNull );
+
+    /* this is necessary because virtual columns which have a
+       infinite row-range, get reported with first=1,count=0 */
+    if ( count > 0 )
+        num_2 = ( first + count - 1 );
+    rc = num_gen_add_node( self, num_1, num_2 );
+    if ( rc == 0 )
+        rc = num_gen_fix_overlaps( self, NULL );
+    return rc;
+}
+
+
+/* helper function for range-check */
+static bool CC num_gen_check_range_start( p_num_gen_node the_node, 
+                                          const uint64_t range_start )
+{
+    bool res = true;
+    uint64_t last_node_row = ( the_node->start + the_node->count - 1 );
+    
+    if ( the_node->start < range_start )
+    {
+        the_node->start = range_start;
+        if ( the_node->start <= last_node_row )
+        {
+            the_node->count = ( last_node_row - the_node->start ) + 1;
+        }
+        else
+        {
+            /* the node becomes invalid ... */
+            the_node->start = 0;
+            the_node->count = 0;
+            res = false;
+        }
+    }
+    return res;
+}
+
+
+/* helper function for range-check */
+static void CC num_gen_check_range_end( p_num_gen_node the_node, 
+                             const uint64_t last_tab_row )
+{
+    uint64_t last_node_row = ( the_node->start + the_node->count - 1 );
+
+    if ( last_node_row > last_tab_row )
+    {
+        last_node_row = last_tab_row;
+        if ( the_node->start <= last_node_row )
+        {
+            the_node->count = ( last_node_row - the_node->start ) + 1;
+        }
+        else
+        {
+            /* the node becomes invalid ... */
+            the_node->start = 0;
+            the_node->count = 0;
+        }
+    }
+}
+
+
+/* helper function for range-check */
+static void CC num_gen_check_range_callback( void *item, void *data )
+{
+    p_num_gen_node the_node = ( p_num_gen_node )item;
+    p_num_gen_node the_range = ( p_num_gen_node )data;
+    uint64_t last_tab_row = ( the_range->start + the_range->count - 1 );
+
+    /* ignore invalid nodes... */
+    if ( the_node->start == 0 || the_node->count == 0 )
+        return;
+        
+    /* check if the start value is not out of range... */
+    if ( num_gen_check_range_start( the_node, the_range->start ) )
+        num_gen_check_range_end( the_node, last_tab_row );
+}
+
+
+/* helper function for range-check */
+static void CC num_gen_count_invalid_nodes( void *item, void *data )
+{
+    p_num_gen_node the_node = ( p_num_gen_node )item;
+    uint32_t *invalid_count = ( uint32_t * )data;
+    
+    if ( ( the_node->start == 0 )&&( the_node->count == 0 ) )
+        ( *invalid_count )++;
+}
+
+
+/* helper function for range-check */
+static void CC num_gen_copy_valid_nodes( void *item, void *data )
+{
+    p_num_gen_node node = ( p_num_gen_node )item;
+    Vector *dest = ( Vector * )data;
+    
+    if ( ( node->start != 0 )&&( node->count != 0 ) )
+        VectorInsert ( dest, node, NULL, num_gen_insert_helper );
+    else
+        free ( node );
+}
+
+
+/* helper function for range-check */
+static void num_gen_remove_invalid_nodes( num_gen* self )
+{
+    Vector temp_nodes;
+    uint32_t count = VectorLength( &(self->nodes) );
+    
+    if ( count < 1 )
+        return;
+    /* create a temp. vector */
+    VectorInit( &temp_nodes, 0, count );
+
+    /* copy all valid nodes into the temp. vector */
+    VectorForEach ( &(self->nodes), false,
+                    num_gen_copy_valid_nodes, &temp_nodes );
+
+    /* clear all nodes so far...,
+       DO NOT PASS num_gen_node_destroy into it */
+    VectorWhack( &(self->nodes), NULL, NULL );
+
+    /* initialize and copy (shallow) the valid nodes back
+       into the generator */
+    VectorCopy ( &temp_nodes, &(self->nodes) );
+
+    /* destroy the temp-vector,
+       DO NOT PASS num_gen_node_destroy into it */
+    VectorWhack ( &temp_nodes, NULL, NULL );
+}
+
+
+/* helper function for trim */
+rc_t num_gen_trim( num_gen* self, const int64_t first, const uint64_t count )
+{
+    num_gen_node trim_range;
+    uint32_t invalid_nodes = 0;
+
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcValidating, rcSelf, rcNull );
+    if ( count == 0 )
+        return RC( rcVDB, rcNoTarg, rcValidating, rcParam, rcNull );
+
+    /* walk all nodes to check for boundaries... */
+    trim_range.start = first;
+    trim_range.count = count;
+
+    VectorForEach ( &(self->nodes), false,
+                    num_gen_check_range_callback, &trim_range );
+
+    VectorForEach ( &(self->nodes), false,
+                    num_gen_count_invalid_nodes, &invalid_nodes );
+    if ( invalid_nodes > 0 )
+        num_gen_remove_invalid_nodes( self );
+ 
+    return 0;
+}
+
+
+rc_t num_gen_make( num_gen** self )
+{
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcSelf, rcNull );
+
+    *self = calloc( 1, sizeof( num_gen ) );
+    if ( *self == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+
+    VectorInit( &((*self)->nodes ), 0, 5 );
+    return 0;
+}
+
+
+rc_t num_gen_make_from_str( num_gen** self, const char *src )
+{
+    rc_t rc = num_gen_make( self );
+    if ( rc == 0 )
+    {
+        rc = num_gen_parse( *self, src );
+        if ( rc == 0 )
+            rc = num_gen_fix_overlaps( *self, NULL );
+     }
+     return rc;
+}
+
+
+rc_t num_gen_make_from_range( num_gen** self, 
+                              const int64_t first, const uint64_t count )
+{
+    rc_t rc = num_gen_make( self );
+    if ( rc != 0 )
+        return rc;
+    return num_gen_add( *self, first, count );
+}
+
+
+rc_t num_gen_clear( num_gen* self )
+{
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcClearing, rcSelf, rcNull );
+
+    if ( VectorLength( &(self->nodes) ) > 0 )
+    {
+        /* clear all nodes so far... */
+        VectorWhack( &(self->nodes), num_gen_node_destroy, NULL );
+
+        /* re-init the vector */
+        VectorInit( &(self->nodes ), 0, 5 );
+    }
+    return 0;
+}
+
+
+rc_t num_gen_destroy( num_gen* self )
+{
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcDestroying, rcSelf, rcNull );
+
+    VectorWhack( &(self->nodes), num_gen_node_destroy, NULL );
+    free( self );
+    return 0;
+}
+
+
+bool num_gen_empty( const num_gen* self )
+{
+    if ( self == NULL )
+        return true;
+    return ( VectorLength( &(self->nodes) ) < 1 );
+}
+
+
+typedef struct overlap_ctx
+{
+    p_num_gen_node prev;
+    uint32_t overlaps;
+} overlap_ctx;
+typedef overlap_ctx* p_overlap_ctx;
+
+
+/* static bool CC num_gen_overlap_fix_cb( void *item, void *data ) */
+static bool CC num_gen_overlap_fix_cb( void *item, void *data )
+{
+    p_num_gen_node node = ( p_num_gen_node )item;
+    p_overlap_ctx ctx = ( p_overlap_ctx )data;
+
+    /* skip invalid nodes */
+    if ( node->count ==0 || node->start == 0 || node->end == 0 )
+        return false;
+    /* if we do not have a previous node, take this one... */
+    if ( ctx->prev == NULL )
+        {
+        ctx->prev = node;
+        return false;
+        }
+    /* if we do not have an overlap,
+       take this node as prev-node and continue */
+    if ( ctx->prev->end < node->start )
+        {
+        ctx->prev = node;
+        return false;
+        }
+    /* we have a overlap, the end of the prev-node is inside
+       the current-node, we fix it by expanding the prev-node
+       to the end of this node, and later declaring this
+       node as invalid */
+    if ( ctx->prev->end < node->end )
+    {
+        ctx->prev->end = node->end;
+        ctx->prev->count = ( ctx->prev->end - ctx->prev->start ) + 1;
+    }
+    /* if the prev-node ends after this node, all we have to
+       do is declaring this node as invalid */
+    node->count = 0;
+    node->start = 0;
+    node->end = 0;
+    return true;
+}
+
+
+static rc_t num_gen_fix_overlaps( num_gen* self, uint32_t *count )
+{
+    overlap_ctx ctx;
+    bool fix_executed = false;
+    
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
+    
+    ctx.overlaps = 0;
+    do
+    {
+        ctx.prev = NULL;
+        fix_executed = VectorDoUntil ( &(self->nodes), false, 
+                                       num_gen_overlap_fix_cb, &ctx );
+    } while ( fix_executed );
+
+    if ( count )
+        *count = ctx.overlaps;
+    return 0;
+}
+
+
+typedef struct string_ctx
+{
+    char *s;
+    uint32_t len;
+} string_ctx;
+typedef string_ctx* p_string_ctx;
+
+
+static void string_ctx_add( p_string_ctx ctx, char *s )
+{
+    uint32_t len = string_measure ( s, NULL );
+    if ( len > 0 )
+    {
+        if ( ctx->len == 0 )
+            ctx->s = malloc( len + 1 );
+        else
+            ctx->s = realloc( ctx->s, ctx->len + len );
+        memcpy( &(ctx->s[ctx->len]), s, len );
+        ctx->len += len;
+    }
+}
+
+
+static void CC num_gen_as_string_cb( void *item, void *data )
+{
+    char temp[40];
+    p_num_gen_node node = ( p_num_gen_node )item;
+    long unsigned int start = node->start;
+    long unsigned int end = ( start + node->count - 1 );
+    switch( node->count )
+    {
+    case 0 : temp[ 0 ] = 0;
+             break;
+    case 1 : string_printf ( temp, sizeof temp, NULL, "%lu,", start );
+             break;
+    default: string_printf ( temp, sizeof temp, NULL, "%lu-%lu,", start, end );
+             break;
+    }
+    string_ctx_add( ( p_string_ctx )data, temp );
+}
+
+
+rc_t num_gen_as_string( const num_gen* self, char **s )
+{
+    string_ctx ctx;
+    
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
+    if ( s == NULL )
+        return RC( rcVDB, rcNoTarg, rcReading, rcParam, rcNull );
+
+    ctx.s = NULL;
+    ctx.len = 0;
+    VectorForEach ( &(self->nodes), false, num_gen_as_string_cb, &ctx );
+    if ( ctx.len == 0 )
+    {
+        *s = NULL;
+        return RC( rcVDB, rcNoTarg, rcReading, rcData, rcEmpty );
+    }
+    ctx.s[ ctx.len ] = 0;
+    *s = ctx.s;
+    return 0;
+}
+
+
+static void CC num_gen_debug_cb( void *item, void *data )
+{
+    char temp[40];
+    p_num_gen_node node = ( p_num_gen_node )item;
+    long unsigned int start = node->start;
+    long unsigned int count = node->count;
+    string_printf ( temp, sizeof temp, NULL, "[s:%lu c:%lu]", start, count );
+    string_ctx_add( ( p_string_ctx )data, temp );
+}
+
+
+rc_t num_gen_debug( const num_gen* self, char **s )
+{
+    string_ctx ctx;
+    
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
+    if ( s == NULL )
+        return RC( rcVDB, rcNoTarg, rcReading, rcParam, rcNull );
+
+    ctx.s = NULL;
+    ctx.len = 0;
+    VectorForEach ( &(self->nodes), false, num_gen_debug_cb, &ctx );
+    if ( ctx.len == 0 )
+    {
+        *s = NULL;
+        return RC( rcVDB, rcNoTarg, rcReading, rcData, rcEmpty );
+    }
+    ctx.s[ ctx.len ] = 0;
+    *s = ctx.s;
+    return 0;
+}
+
+
+static bool CC num_gen_contains_cb( void *item, void *data )
+{
+    bool res = false;
+    p_num_gen_node node = ( p_num_gen_node )item;
+    if ( node->count > 0 )
+    {
+        uint64_t *value = ( uint64_t * )data;
+        uint64_t end = node->start + node->count - 1;
+        res = ( node->start <= *value && *value <= end );
+    }
+    return res;
+}
+
+
+rc_t num_gen_contains_value( const num_gen* self, const uint64_t value )
+{
+    uint64_t temp = value;
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
+    if ( VectorDoUntil ( &(self->nodes), false, 
+                         num_gen_contains_cb, &temp ) )
+        return 0;
+    else
+        return RC( rcVDB, rcNoTarg, rcReading, rcData, rcEmpty );
+}
+
+
+rc_t num_gen_range_check( num_gen* self, 
+                          const int64_t first, const uint64_t count )
+{
+    /* if the user did not specify a row-range, take all rows */
+    if ( num_gen_empty( self ) )
+        return num_gen_add( self, first, count );
+    /* if the user did specify a row-range, check the boundaries */
+    else
+        return num_gen_trim( self, first, count );
+}
+
+
+rc_t num_gen_iterator_make( const num_gen* self, const num_gen_iter **iter )
+{
+    uint32_t count;
+    
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
+    if ( iter == NULL )
+        return RC( rcVDB, rcNoTarg, rcReading, rcParam, rcNull );
+
+    *iter = NULL;
+    count = VectorLength( &(self->nodes) );
+    if ( count < 1 )
+        return RC( rcVDB, rcNoTarg, rcReading, rcParam, rcNull );
+    else
+    {
+        num_gen_iter *temp = calloc( 1, sizeof( num_gen_iter ) );
+        if ( temp == NULL )
+            return RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        VectorInit( &(temp->nodes), 0, count );
+        num_gen_copy_vector( &(self->nodes), &(temp->nodes ) );
+        temp->total = num_gen_total_count( &(temp->nodes ) );
+        *iter = temp;
+    }
+    return 0;
+}
+
+rc_t num_gen_iterator_destroy( const num_gen_iter *self )
+{
+    num_gen_iter *temp;
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcDestroying, rcSelf, rcNull );
+
+    temp = (num_gen_iter *)self;
+    VectorWhack( &(temp->nodes), num_gen_node_destroy, NULL );
+    free( temp );
+    return 0;
+}
+
+rc_t num_gen_iterator_next( const num_gen_iter* self, uint64_t* value )
+{
+    num_gen_iter* temp;
+    p_num_gen_node node;
+    
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
+    if ( value == NULL )
+        return RC( rcVDB, rcNoTarg, rcReading, rcParam, rcNull );
+    if ( self->curr_node >= VectorLength( &(self->nodes) ) )
+        return RC( rcVDB, rcNoTarg, rcReading, rcId, rcInvalid );
+
+    temp = ( num_gen_iter *)self;
+    *value = 0;
+    node = (p_num_gen_node)VectorGet( &(temp->nodes), temp->curr_node );
+    if ( node == NULL )
+        return RC( rcVDB, rcNoTarg, rcReading, rcItem, rcInvalid );
+
+    *value = node->start;
+    if ( node->count < 2 )
+        /* the node is a single-number-node, next node for next time */
+        temp->curr_node++;
+    else
+    {
+        /* the node is a number range, add the sub-position */
+        *value += temp->curr_node_sub_pos++;
+        /* if the sub-positions are use up, switch to next node */
+        if ( temp->curr_node_sub_pos >= node->count )
+        {
+            temp->curr_node++;
+            temp->curr_node_sub_pos = 0;
+        }
+    }
+    (temp->progress)++;
+    return 0;
+}
+
+
+rc_t num_gen_iterator_count( const num_gen_iter* self, uint64_t* count )
+{
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
+    if ( count == NULL )
+        return RC( rcVDB, rcNoTarg, rcReading, rcParam, rcNull );
+    *count = self->total;
+    return 0;
+}
+
+
+rc_t num_gen_iterator_percent( const num_gen_iter* self, 
+                               const uint8_t fract_digits,
+                               uint32_t* value )
+{
+    uint32_t factor = 100;
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcReading, rcSelf, rcNull );
+    if ( value == NULL )
+        return RC( rcVDB, rcNoTarg, rcReading, rcParam, rcNull );
+    if ( fract_digits > 0 )
+    {
+        if ( fract_digits > 1 )
+            factor = 10000;
+        else
+            factor = 1000;
+    }
+        
+    if ( self->total > 0 )
+    {
+        if ( self->progress >= self->total )
+            *value = factor;
+        else
+        {
+            uint64_t temp = self->progress;
+            temp *= factor;
+            temp /= self->total;
+            *value = (uint16_t) temp;
+        }
+    }
+    else
+        *value = 0;
+    return 0;
+}
diff --git a/tools/vdb-copy/num-gen.h b/tools/vdb-copy/num-gen.h
new file mode 100644
index 0000000..5b0324f
--- /dev/null
+++ b/tools/vdb-copy/num-gen.h
@@ -0,0 +1,225 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_num_gen_
+#define _h_num_gen_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_vector_
+#include <klib/vector.h>
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_klib_text_
+#include <klib/text.h>
+#endif
+
+
+/*--------------------------------------------------------------------------
+ * A NUMBER GENERATOR
+ * 
+ *  input : string, for instance "3,6,8,12,44-49"
+ *  ouptut: sequence of integers, for instance 3,6,8,12,44,45,46,47,48,49
+ */
+
+
+/*--------------------------------------------------------------------------
+ * opaque number-generator and it's iterator
+ */
+typedef struct num_gen num_gen;
+typedef struct num_gen_iter num_gen_iter;
+
+
+/*--------------------------------------------------------------------------
+ * num_gen_make
+ *
+ *  creates a empty number-generator
+ *  or creates a number-generator and parses the string
+ *  or creates and presets it with a range
+ */
+rc_t num_gen_make( num_gen** self );
+rc_t num_gen_make_from_str( num_gen** self, const char *src );
+rc_t num_gen_make_from_range( num_gen** self, 
+                              const int64_t first, const uint64_t count );
+
+
+/*--------------------------------------------------------------------------
+ * num_gen_destroy
+ *
+ *  destroys a number-generator
+ */
+rc_t num_gen_destroy( num_gen* self );
+
+
+/*--------------------------------------------------------------------------
+ * num_gen_clear
+ *
+ *  resets a number-generator, to be empty just like after num_gen_make()
+ */
+rc_t num_gen_clear( num_gen* self );
+
+
+/*--------------------------------------------------------------------------
+ * num_gen_parse
+ *
+ *  parses a given string in this form: "3,6,8,12,44-49"
+ *  does not clear the number-generator before parsing
+ *  eventual overlaps with the previous content are consolidated
+ */
+rc_t num_gen_parse( num_gen* self, const char* src );
+
+
+/*--------------------------------------------------------------------------
+ * num_gen_add
+ *
+ *  inserts the given interval into the number-generator
+ *
+ *  num_gen_add( *g, 10, 30 )
+ *  is equivalent to:
+ *  num_gen_parse( *g, "10-39" );
+ *
+ *  eventual overlaps with the previous content are consolidated 
+ */
+rc_t num_gen_add( num_gen* self, const uint64_t first, const uint64_t count );
+
+
+/*--------------------------------------------------------------------------
+ * num_gen_trim
+ *
+ *  checks if the content of the number-generator is inside the given interval
+ *  removes or shortens internal nodes if necessary
+ */
+rc_t num_gen_trim( num_gen* self, const int64_t first, const uint64_t count );
+
+
+/*--------------------------------------------------------------------------
+ * num_gen_empty
+ *
+ *  checks if the generator has no ranges defined
+ */
+bool num_gen_empty( const num_gen* self );
+
+
+/*--------------------------------------------------------------------------
+ * num_gen_as_string
+ *
+ *  allocates a string that contains the generator as text
+ *  *s = "1-5,20,24-25"
+ *  caller has to free the string
+ */
+rc_t num_gen_as_string( const num_gen* self, char **s );
+
+
+/*--------------------------------------------------------------------------
+ * num_gen_debug
+ *
+ *  allocates a string that contains the internal intervals as text
+ *  *s = "[s:1 c:5][s:20 c:1][s:24 c:2]"
+ *  [s...start-value c:count]
+ *  caller has to free the string 
+ */
+rc_t num_gen_debug( const num_gen* self, char **s );
+
+
+/*--------------------------------------------------------------------------
+ * num_gen_contains_value
+ *
+ *  checks if the generator contains the given value
+ */
+rc_t num_gen_contains_value( const num_gen* self, const uint64_t value );
+
+
+/*--------------------------------------------------------------------------
+ * num_gen_range_check
+ *
+ *  if the generator is empty --> set it to the given range
+ *  if it is not empty ---------> trim it to the given range
+ */
+rc_t num_gen_range_check( num_gen* self, 
+                          const int64_t first, const uint64_t count );
+
+/*--------------------------------------------------------------------------
+ * num_gen_iterator_make
+ *
+ *  creates a iterator from the number-generator
+ *  the iterator contains a constant copy of the number-ranges
+ *  after this call it is safe to destroy or change the number-generator
+ *  returns an error-code if the number-generator was empty,
+ *  and *iter will be NULL
+ */
+rc_t num_gen_iterator_make( const num_gen* self, const num_gen_iter **iter );
+
+
+/*--------------------------------------------------------------------------
+ * num_gen_iterator_destroy
+ *
+ *  destroys the iterator
+ */
+rc_t num_gen_iterator_destroy( const num_gen_iter *self );
+
+
+/*--------------------------------------------------------------------------
+ * num_gen_iterator_count
+ *
+ *  returns how many values the iterator contains
+ */
+rc_t num_gen_iterator_count( const num_gen_iter* self, uint64_t* count );
+
+
+/*--------------------------------------------------------------------------
+ * num_gen_iterator_next
+ *
+ *  pulls the next value out of the iterator...
+ *  returns an error-code if the iterator has no more values
+ */
+rc_t num_gen_iterator_next( const num_gen_iter* self, uint64_t* value );
+
+
+/*--------------------------------------------------------------------------
+ * num_gen_iterator_percent
+ *
+ *  return in value the percentage of the iterator...
+ *  depending on fract-digits the percentage will be:
+ *      fract_digits = 0 ... full percent's
+ *      fract_digits = 1 ... 1/10-th of a percent
+ *      fract_digits = 2 ... 1/100-th of a percent
+ */
+rc_t num_gen_iterator_percent( const num_gen_iter* self,
+                               const uint8_t fract_digits,
+                               uint32_t* value );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-copy/redactval.c b/tools/vdb-copy/redactval.c
new file mode 100644
index 0000000..a8c0538
--- /dev/null
+++ b/tools/vdb-copy/redactval.c
@@ -0,0 +1,230 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "redactval.h"
+
+#include "helper.h"
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+
+void redact_buf_init( redact_buffer * rbuf )
+{
+    rbuf->buffer = NULL;
+    rbuf->buffer_len = 0;
+}
+
+
+void redact_buf_free( redact_buffer * rbuf )
+{
+    if ( rbuf->buffer != NULL )
+    {
+        
+        free( rbuf->buffer );
+        rbuf->buffer = NULL;
+        rbuf->buffer_len = 0;
+    }
+}
+
+
+rc_t redact_buf_resize( redact_buffer * rbuf, const size_t new_size )
+{
+    rc_t rc = 0;
+    if ( rbuf->buffer_len < new_size || rbuf->buffer == NULL )
+    {
+        /* allocate or re-allocate the buffer */
+        if ( rbuf->buffer_len == 0 )
+            rbuf->buffer = malloc( new_size );
+        else
+            rbuf->buffer = realloc( rbuf->buffer, new_size );
+
+        /* exit */
+        if ( rbuf->buffer == NULL )
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        else
+            rbuf->buffer_len = new_size;
+    }
+    return rc;
+}
+
+
+/* allocate a redact-value */
+static p_redact_val redact_val_init( const char* name, 
+                                     const uint32_t len,
+                                     const char* value )
+{
+    p_redact_val res = NULL;
+    if ( name == NULL ) return res;
+    if ( name[0] == 0 ) return res;
+    res = calloc( 1, sizeof( redact_val ) );
+    if ( res == NULL ) return res;
+    res->name = string_dup_measure ( name, NULL );
+    res->len = len;
+    res->value = NULL;
+    if ( value != NULL )
+    {
+        if ( value[0] == '\'' && value[2] == '\'' )
+        {
+            res->value = malloc( sizeof value[0] );
+            if ( res->value )
+            {
+                res->len = 1;
+                *( ( char * )res->value ) = value[1];
+            }
+        }
+        else
+        {
+            char *endptr;
+            uint64_t x = strtou64( value, &endptr, 0 );
+            if ( res->len > sizeof x )
+                res->len = sizeof x;
+            res->value = malloc( len );
+            if ( res->value )
+                memcpy( res->value, &x, res->len );
+        }
+    }
+    return res;
+}
+
+
+void redact_val_fill_buffer( const p_redact_val r_val,
+                             redact_buffer * rbuf,
+                             const size_t buffsize )
+{
+    size_t idx;
+    char * dst = rbuf->buffer;
+    for ( idx = 0; idx < buffsize; idx += r_val->len )
+    {
+        size_t l = r_val->len;
+        if ( ( idx + l ) > buffsize ) l = ( buffsize - idx );
+        memcpy( dst, r_val->value, l );
+        dst += l;
+    }
+}
+
+
+static void CC redact_val_destroy_node( void* node, void* data )
+{
+    p_redact_val r_val = (p_redact_val)node;
+    if ( r_val != NULL )
+    {
+        if ( r_val->name != NULL )
+            free( r_val->name );
+        if ( r_val->value != NULL )
+            free( r_val->value );
+        free( r_val );
+    }
+}
+
+
+/*
+ * initializes a redact-val-list
+*/
+rc_t redact_vals_init( redact_vals** vals )
+{
+    if ( vals == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcSelf, rcNull );
+    (*vals) = calloc( 1, sizeof( redact_vals ) );
+    if ( *vals == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+    VectorInit( &((*vals)->vals), 0, 5 );
+    return 0;
+}
+
+
+/*
+ * destroys the redact-val-list
+*/
+rc_t redact_vals_destroy( redact_vals* vals )
+{
+    if ( vals == NULL )
+        return RC( rcVDB, rcNoTarg, rcDestroying, rcSelf, rcNull );
+    VectorWhack( &(vals->vals), redact_val_destroy_node, NULL );
+    free( vals );
+    return 0;
+}
+
+
+/*
+ * adds a entry into the redact-val-list
+*/
+rc_t redact_vals_add( redact_vals* vals, const char* name, 
+                      const uint32_t len, const char* value )
+{
+    rc_t rc;
+    p_redact_val new_val = redact_val_init( name, len, value );
+    if ( new_val == NULL )
+        rc = RC( rcVDB, rcNoTarg, rcParsing, rcMemory, rcExhausted );
+    else
+        rc = VectorAppend( &(vals->vals), NULL, new_val );
+    return rc;
+}
+
+
+/*
+ * returns a pointer to a redact-value by type-name
+*/
+p_redact_val redact_vals_get_by_name( const redact_vals* vals,
+                                      const char * name )
+{
+    p_redact_val res = NULL;
+    uint32_t idx, len;
+    if ( vals == NULL || name == NULL || name[0] == 0 )
+        return res;
+
+    len = VectorLength( &(vals->vals) );
+    for ( idx = 0;  idx < len && res == NULL; ++idx )
+    {
+        p_redact_val item = (p_redact_val) VectorGet ( &(vals->vals), idx );
+        if ( nlt_strcmp( item->name, name ) == 0 )
+            res = item;
+    }
+    return res;
+}
+
+/*
+ * returns a pointer to a redact-value by type-cast
+*/
+p_redact_val redact_vals_get_by_cast( const redact_vals* vals,
+                                      const char * cast )
+{
+    uint32_t idx;
+    p_redact_val res = NULL;
+    char * name;
+    if ( vals == NULL || cast == NULL || cast[0] == 0 )
+        return res;
+
+    name = string_dup_measure ( cast, NULL );
+    for ( idx = 0; name[idx] != 0; ++idx )
+        if ( name[idx] == ')' ) name[idx] = 0;
+    res = redact_vals_get_by_name( vals, &(name[1]) );
+    free( name );
+    return res;
+}
diff --git a/tools/vdb-copy/redactval.h b/tools/vdb-copy/redactval.h
new file mode 100644
index 0000000..b3e4360
--- /dev/null
+++ b/tools/vdb-copy/redactval.h
@@ -0,0 +1,120 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_redactval_
+#define _h_vdb_redactval_
+
+#ifndef _h_vdb_copy_includes_
+#include "vdb-copy-includes.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/********************************************************************
+    redact_buffer is a pointer and a size...
+********************************************************************/
+typedef struct redact_buffer
+{
+    void *   buffer;
+    uint32_t buffer_len;
+} redact_buffer;
+typedef redact_buffer* p_redact_buffer;
+
+
+void redact_buf_init( redact_buffer * rbuf );
+void redact_buf_free( redact_buffer * rbuf );
+rc_t redact_buf_resize( redact_buffer * rbuf, const size_t new_size );
+
+/********************************************************************
+    redact_val is a mapping of typename to its redaction-value
+********************************************************************/
+typedef struct redact_val
+{
+    char *name;             /* the name of the type */
+    uint32_t len;           /* the length of the value */
+    void * value;           /* pointer to the value of length len */
+} redact_val;
+typedef redact_val* p_redact_val;
+
+
+/********************************************************************
+    vector of redact-values
+********************************************************************/
+typedef struct redact_vals
+{
+    Vector vals;
+} redact_vals;
+typedef redact_vals* p_redact_vals;
+
+
+/*
+ * fills a buffer with the value found in a redact-val-struct
+*/
+void redact_val_fill_buffer( const p_redact_val r_val,
+                             redact_buffer * rbuf,
+                             const size_t buffsize );
+
+
+/*
+ * initializes a redact-val-list
+*/
+rc_t redact_vals_init( redact_vals** vals );
+
+
+/*
+ * destroys the redact-val-list
+*/
+rc_t redact_vals_destroy( redact_vals* vals );
+
+
+/*
+ * adds a entry into the redact-val-list
+*/
+rc_t redact_vals_add( redact_vals* vals, const char* name, 
+                      const uint32_t len, const char* value );
+
+
+/*
+ * returns a pointer to a redact-value by name
+*/
+p_redact_val redact_vals_get_by_name( const redact_vals* vals,
+                                      const char * name );
+
+
+/*
+ * returns a pointer to a redact-value by type-cast
+*/
+p_redact_val redact_vals_get_by_cast( const redact_vals* vals,
+                                      const char * cast );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-copy/type_matcher.c b/tools/vdb-copy/type_matcher.c
new file mode 100644
index 0000000..743fda0
--- /dev/null
+++ b/tools/vdb-copy/type_matcher.c
@@ -0,0 +1,850 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include "vdb-copy-includes.h"
+#include "matcher_input.h"
+#include "helper.h"
+
+#include <sysalloc.h>
+#include <stdlib.h>
+
+/* internal definition of a type to be matched */
+typedef struct mtype
+{
+    char *name;
+    uint32_t dflt; /* 0=yes, 1=no (this way for re-ordering) */
+    uint32_t order;
+    uint32_t lossy_score;
+    VTypedecl type_decl;
+    VTypedesc type_desc;
+} mtype;
+typedef mtype* p_mtype;
+
+
+/* internal definition of a pair of source- and dest-type */
+typedef struct mpair
+{
+    p_mtype src;
+    p_mtype dst;
+    uint32_t compatible; /* 0=yes, 1=no (this way for re-ordering) */
+    uint32_t distance;
+} mpair;
+typedef mpair* p_mpair;
+
+
+/* internal definition of a column */
+typedef struct mcol
+{
+    char *name;
+    uint32_t src_idx;       /* index of this column relative to the
+                               read-cursor */
+
+    uint32_t dst_idx;       /* index of this column relative to the
+                               write-cursor */
+
+    bool excluded;          /* for excludes via config-file */
+
+    bool to_copy;           /* this column has a correspondig column 
+                               in the list of writable columns of the
+                               destination-schema with writable types */
+
+    VTypedecl type_decl;    /* type-decl of this column via read-schema */
+    VTypedesc type_desc;    /* type-desc of this column via read-schema */
+
+    Vector src_types;       /* list of src-types */
+    Vector dst_types;       /* list of dst-types */
+    Vector pairs;           /* list of (src->dst)-pairs... */
+
+    /* the src->dst type-pair, that won the type-matching-procedure */
+    p_mpair type_cast;
+} mcol;
+typedef mcol* p_mcol;
+
+
+/* internal definition of the matcher */
+typedef struct matcher
+{
+    Vector mcols;
+} matcher;
+typedef matcher* p_matcher;
+
+
+/* allocate a type-pair */
+static p_mpair matcher_init_pair( const p_mtype src, 
+                                  const p_mtype dst )
+{
+    p_mpair res = NULL;
+    if ( src == NULL ) return res;
+    if ( dst == NULL ) return res;
+    res = calloc( 1, sizeof( mpair ) );
+    if ( res != NULL )
+    {
+        res->src = src;
+        res->dst = dst;
+    }
+    return res;
+}
+
+
+/* destroys a type-pair */
+static void CC matcher_destroy_pair( void* node, void* data )
+{
+    p_mpair pair = (p_mpair)node;
+    if ( pair != NULL )
+        free( pair );
+}
+
+
+/* allocate a m-type definition */
+static p_mtype matcher_init_type( const char* name, 
+                                  const bool dflt,
+                                  const uint32_t order )
+{
+    p_mtype res = NULL;
+    if ( name == NULL ) return res;
+    if ( name[0] == 0 ) return res;
+    res = calloc( 1, sizeof( mtype ) );
+    if ( res != NULL )
+    {
+        res->name = string_dup_measure ( name, NULL );
+        res->dflt = ( dflt ? 0 : 1 );
+        res->order = order;
+    }
+    return res;
+}
+
+
+/* destroys a m-type definition */
+static void CC matcher_destroy_type( void* node, void* data )
+{
+    p_mtype type = (p_mtype)node;
+    if ( type != NULL )
+    {
+        if ( type->name != NULL )
+            free( type->name );
+        free( type );
+    }
+}
+
+
+/* allocate a matcher-column */
+static p_mcol matcher_make_col( const char* name )
+{
+    p_mcol res = NULL;
+    if ( name == NULL ) return res;
+    if ( name[0] == 0 ) return res;
+    res = calloc( 1, sizeof( mcol ) );
+    /* because of calloc all members are zero! */
+    if ( res != NULL )
+    {
+        res->name = string_dup_measure ( name, NULL );
+        VectorInit( &(res->src_types), 0, 3 );
+        VectorInit( &(res->dst_types), 0, 3 );
+        VectorInit( &(res->pairs), 0, 6 );
+        res->type_cast = NULL;
+    }
+    return res;
+}
+
+
+/* destroys a matcher-column */
+static void CC matcher_destroy_col( void* node, void* data )
+{
+    p_mcol col = (p_mcol)node;
+    if ( col == NULL ) return;
+    if ( col->name != NULL )
+        free( col->name );
+    VectorWhack( &(col->src_types), matcher_destroy_type, NULL );
+    VectorWhack( &(col->dst_types), matcher_destroy_type, NULL );
+    VectorWhack( &(col->pairs), matcher_destroy_pair, NULL );
+    free( col );
+}
+
+
+/* initializes the matcher */
+rc_t matcher_init( matcher** self )
+{
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcSelf, rcNull );
+    (*self) = calloc( 1, sizeof( matcher ) );
+    if ( *self == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+    VectorInit( &((*self)->mcols), 0, 5 );
+    return 0;
+}
+
+
+/* destroys the matcher */
+rc_t matcher_destroy( matcher* self )
+{
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcDestroying, rcSelf, rcNull );
+    VectorWhack( &(self->mcols), matcher_destroy_col, NULL );
+    free( self );
+    return 0;
+}
+
+
+static p_mcol matcher_find_col( const matcher* self, const char *name )
+{
+    p_mcol res = NULL;
+    uint32_t idx, count;
+    count =  VectorLength( &(self->mcols) );
+    for ( idx = 0; idx < count && res == NULL; ++idx )
+    {
+        p_mcol col = (p_mcol) VectorGet ( &(self->mcols), idx );
+        if ( col != NULL )
+            if ( nlt_strcmp( col->name, name ) == 0 )
+                res = col;
+    }
+    return res;
+}
+
+
+static char * matcher_get_col_cast( const p_mcol col, const char *s_type )
+{
+    char * res;
+    size_t idx;
+    uint32_t len = string_measure ( col->name, NULL ) + 4;
+    len += string_measure ( s_type, NULL );
+    res = malloc( len );
+    if ( res == NULL ) return res;
+    res[ 0 ] = '(';
+    idx = string_copy_measure ( &(res[ 1 ]), len-1, s_type );
+    res[ idx + 1 ] = ')';
+    string_copy_measure ( &(res[ idx + 2 ]), len-(idx+2), col->name );
+    return res;
+}
+
+
+/* makes a typecast-string for the src/dest-table by column-name */
+static rc_t matcher_get_cast( const matcher* self, const char *name, 
+                              const bool src, char **cast )
+{
+    p_mcol col;
+    if ( self == NULL )
+        return RC( rcVDB, rcNoTarg, rcSearching, rcSelf, rcNull );
+    if ( cast == NULL || name == NULL )
+        return RC( rcVDB, rcNoTarg, rcSearching, rcParam, rcNull );
+    *cast = NULL;
+    col = matcher_find_col( self, name );
+    if ( col == NULL ) return 0;
+
+    if ( col->type_cast == NULL )
+    {
+        /* if the column has no match, just use the undecorated column-name*/
+        if ( src )
+            *cast = string_dup_measure ( col->name, NULL );
+        else
+        {
+            if ( col->to_copy && !col->excluded )
+                *cast = string_dup_measure ( col->name, NULL );
+        }
+    }
+    else
+    {
+        /* if the column has a match, construct the type-cast*/
+        if ( src )
+            *cast = matcher_get_col_cast( col, col->type_cast->src->name );
+        else
+        {
+            if ( col->to_copy && !col->excluded )
+                *cast = matcher_get_col_cast( col, col->type_cast->dst->name );
+        }
+    }
+    return 0;
+}
+
+
+/* makes a typecast-string for the source-table by column-name */
+rc_t matcher_src_cast( const matcher* self, const char *name, char **cast )
+{
+    return matcher_get_cast( self, name, true, cast );
+}
+
+
+/* makes a typecast-string for the destination-table by column-name */
+rc_t matcher_dst_cast( const matcher* self, const char *name, char **cast )
+{
+    return matcher_get_cast( self, name, false, cast );
+}
+
+
+static bool match_type_with_id_vector( const VSchema * s,
+                const VTypedecl * td, const Vector * id_vector )
+{
+    bool res = false;
+    uint32_t idx, len;
+
+    len = VectorLength( id_vector );
+    for ( idx = 0;  idx < len && !res; ++idx )
+    {
+        uint32_t *id = (uint32_t *) VectorGet ( id_vector, idx );
+        if ( id != NULL )
+        {
+            VTypedecl cast;
+            uint32_t distance;
+            res = VTypedeclToType ( td, s, *id, &cast, &distance );
+        }
+    }
+    return res;
+}
+
+/* checks if a column with the given name has at least one type
+   that is also in the given typelist... */
+bool matcher_src_has_type( const matcher* self, const VSchema * s,
+                           const char *name, const Vector *id_vector )
+{
+    bool res = false;
+    p_mcol col;
+    VTypedecl td;
+
+    if ( self == NULL || s == NULL || name == NULL || id_vector == NULL )
+        return res;
+    col = matcher_find_col( self, name );
+    if ( col == NULL ) return res; /* column not found */
+    if ( col->type_cast == NULL ) return res; /* column has no typecast */ 
+
+    /* we use the destination-type-cast */
+    if ( VSchemaResolveTypedecl ( s, &td, "%s", col->type_cast->dst->name ) == 0 )
+        res = match_type_with_id_vector( s, &td, id_vector );
+/*
+    if ( res )
+        KOutMsg( "redact-type found on (%s)%s\n", col->type_cast->dst->name, name );
+*/
+    return res;
+}
+
+static void matcher_report_types( const char * s, const Vector *v )
+{
+    uint32_t idx, len;
+    len = VectorLength( v );
+    if ( len > 0 )
+    {
+        KOutMsg( "%s: ", s );
+        for ( idx = 0;  idx < len; ++idx )
+        {
+            p_mtype item = (p_mtype) VectorGet ( v, idx );
+            if ( item != NULL )
+                KOutMsg( "[ %s ] ", item->name );
+        }
+        KOutMsg( "\n" );
+    }
+}
+
+
+static void matcher_report_pair( const p_mpair pair )
+{
+    if ( pair->src == NULL || pair->dst == NULL )
+        return;
+    if ( pair->compatible == 0 )
+        KOutMsg( "[%s](l=%u/o=%u/d=%u) --> [%s] (c) dist=%u\n", 
+                  pair->src->name, 
+                  pair->src->lossy_score, pair->src->order, pair->src->dflt,
+                  pair->dst->name, pair->distance );
+    else
+        KOutMsg( "[%s](l=%u/o=%u/d=%u) --> [%s] dist=%u\n",
+                  pair->src->name,
+                  pair->src->lossy_score, pair->src->order, pair->src->dflt,
+                  pair->dst->name, pair->distance );
+}
+
+
+static void matcher_report_pairs( const Vector *v )
+{
+    uint32_t idx, len;
+    len = VectorLength( v );
+    for ( idx = 0;  idx < len; ++idx )
+       matcher_report_pair( (p_mpair) VectorGet ( v, idx ) );
+}
+
+
+static void matcher_report_col( const p_mcol item )
+{
+    KOutMsg( "----------------------------------\n" );
+    if ( item->to_copy )
+        KOutMsg( "col: %s (c)\n", item->name );
+    else
+        KOutMsg( "col: %s\n", item->name );
+    matcher_report_types( " src", &(item->src_types ) );
+    matcher_report_types( " dst", &(item->dst_types ) );
+    matcher_report_pairs( &(item->pairs ) );
+    KOutMsg( "\n" );
+}
+
+
+rc_t matcher_report( matcher* self, const bool only_copy_columns )
+{
+    uint32_t idx, len;
+
+    if ( self == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    len = VectorLength( &(self->mcols) );
+    for ( idx = 0; idx < len; ++idx )
+    {
+        p_mcol item = (p_mcol) VectorGet ( &(self->mcols), idx );
+        if ( item != NULL )
+        {
+            if ( only_copy_columns )
+            {
+                if ( item->to_copy )
+                    matcher_report_col( item );
+            }
+            else
+                matcher_report_col( item );
+        }
+    }
+    return 0;
+}
+
+
+static rc_t matcher_append_type( const char *name, const bool dflt,
+                                 const uint32_t order,
+                                 const VSchema *schema, Vector *v )
+{
+    rc_t rc = 0;
+    p_mtype t = matcher_init_type( name, dflt, order );
+    if ( t == NULL )
+        rc = RC( rcExe, rcNoTarg, rcResolving, rcMemory, rcExhausted );
+    if ( rc == 0 )
+    {
+        rc = VectorAppend( v, NULL, t );
+        if ( rc == 0 )
+        {
+            rc = VSchemaResolveTypedecl( schema, &(t->type_decl), "%s", name );
+            if ( rc == 0 )
+            {
+                rc = VSchemaDescribeTypedecl( schema, &(t->type_desc), &(t->type_decl) );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t matcher_read_col_src_types( p_mcol col, 
+        const KNamelist *names, const uint32_t dflt_idx, const VSchema *schema )
+{
+    uint32_t count;
+    rc_t rc = KNamelistCount( names, &count );
+    if ( rc == 0 )
+    {
+        uint32_t idx;
+        for ( idx = 0; idx < count && rc == 0; ++idx )
+        {
+            const char *name;
+            rc = KNamelistGet( names, idx, &name );
+            if ( rc == 0 )
+                rc = matcher_append_type( name, ( idx == dflt_idx ), idx,
+                                          schema, &(col->src_types) );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t matcher_read_src_types( matcher* self, const VTable *table,
+                                    const VSchema *schema )
+{
+    rc_t rc = 0;
+    uint32_t idx, len;
+
+    if ( self == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    if ( table == NULL || schema == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+    len = VectorLength( &(self->mcols) );
+    for ( idx = 0;  idx < len && rc == 0; ++idx )
+    {
+        p_mcol item = (p_mcol) VectorGet ( &(self->mcols), idx );
+        if ( item != NULL )
+        {
+            uint32_t dflt_idx;
+            KNamelist *names;
+            rc = VTableListReadableDatatypes( table, item->name, &dflt_idx, &names );
+            if ( rc == 0 )
+            {
+                rc = matcher_read_col_src_types( item, names, dflt_idx, schema );
+                KNamelistRelease( names );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t matcher_read_dst_types( matcher* self, const VTable *table,
+                             const VSchema *schema )
+{
+    rc_t rc = 0;
+    uint32_t idx, len;
+
+    if ( self == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    if ( table == NULL || schema == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+    len = VectorLength( &(self->mcols) );
+    for ( idx = 0;  idx < len && rc == 0; ++idx )
+    {
+        p_mcol item = (p_mcol) VectorGet ( &(self->mcols), idx );
+        if ( item != NULL )
+        {
+            KNamelist *names;
+            rc = VTableListWritableDatatypes ( (VTable*)table, item->name, &names );
+            if ( rc == 0 )
+            {
+                uint32_t type_count;
+                rc = KNamelistCount( names, &type_count );
+                if ( rc == 0 && type_count > 0 )
+                {
+                    uint32_t type_idx;
+                    item->to_copy = true; /* !!! this column has to be copied */
+                    for ( type_idx = 0; type_idx < type_count && rc == 0; ++type_idx )
+                    {
+                        const char *name;
+                        rc = KNamelistGet( names, type_idx, &name );
+                        if ( rc == 0 )
+                            rc = matcher_append_type( name, false, idx,
+                                                      schema, &(item->dst_types) );
+                    }
+                }
+                KNamelistRelease( names );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t matcher_make_column_matrix( p_mcol col )
+{
+    rc_t rc = 0;
+    uint32_t src_idx, src_len;
+
+    src_len = VectorLength( &(col->src_types) );
+    for ( src_idx = 0;  src_idx < src_len && rc == 0; ++src_idx )
+    {
+        p_mtype src_type = (p_mtype) VectorGet ( &(col->src_types), src_idx );
+        if ( src_type )
+        {
+            uint32_t dst_idx, dst_len;
+            dst_len = VectorLength( &(col->dst_types) );
+            for ( dst_idx = 0;  dst_idx < dst_len && rc == 0; ++dst_idx )
+            {
+                p_mtype dst_type = (p_mtype) VectorGet ( &(col->dst_types), dst_idx );
+                if ( dst_type )
+                {
+                    p_mpair pair = matcher_init_pair( src_type, dst_type );
+                    if ( pair != NULL )
+                        rc = VectorAppend( &(col->pairs), NULL, pair );
+                    else
+                        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t matcher_make_type_matrix( matcher* self )
+{
+    rc_t rc = 0;
+    uint32_t idx, len;
+    
+    if ( self == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    len = VectorLength( &(self->mcols) );
+    for ( idx = 0;  idx < len && rc == 0; ++idx )
+    {
+        p_mcol col = (p_mcol) VectorGet ( &(self->mcols), idx );
+        if ( col != NULL )
+            if ( col->to_copy )
+                rc = matcher_make_column_matrix( col );
+    }
+    return rc;
+}
+
+
+static int64_t CC matcher_match_cb( const void ** p1, const void ** p2, void *data )
+{
+    int64_t res = 0;
+    const p_mpair pair_1 = (p_mpair)(*p1);
+    const p_mpair pair_2 = (p_mpair)(*p2);
+    if ( pair_1 == NULL || pair_2 == NULL )
+        return res;
+    /* first we order by compatibility */
+    res = (int64_t)( pair_1->compatible ) - (int64_t)( pair_2->compatible );
+    if ( res == 0 )
+    {
+        /* second we order by lossy-ness, lowest value first */
+        res = ( pair_1->src->lossy_score ) - ( pair_2->src->lossy_score );
+        if ( res == 0 )
+        {
+            /* if the lossy-ness is the same, we order by distance */
+            res = (int64_t)( pair_1->distance ) - (int64_t)( pair_2->distance );
+            if ( res == 0 )
+            {
+                /* if the distance is the same, we order by default-value */
+                res = (int64_t)( pair_1->src->dflt ) - (int64_t)( pair_2->src->dflt );
+                if ( res == 0 )
+                    /* if there is not default-value, we use the org. order */
+                    res = (int64_t)( pair_1->src->order ) - (int64_t)( pair_2->src->order );
+            }
+        }
+    }
+    return res;
+}
+
+
+static void CC matcher_enter_type_score_cb( void * item, void * data )
+{
+    p_mtype type = (p_mtype)item;
+    const KConfig *cfg = (const KConfig *)data;
+    if ( type != NULL && cfg != NULL )
+        type->lossy_score = helper_rd_type_score( cfg, type->name );
+}
+
+
+static void CC matcher_measure_dist_cb( void * item, void * data )
+{
+    p_mpair pair = (p_mpair)item;
+    const VSchema *schema = (const VSchema *)data;
+    if ( pair != NULL && schema != NULL )
+    {
+        bool compatible = VTypedeclCommonAncestor ( &(pair->src->type_decl),
+                schema, &(pair->dst->type_decl), NULL, &(pair->distance) );
+        pair->compatible = ( compatible ? 0 : 1 );
+    }
+}
+
+
+static void matcher_match_column( p_mcol col,
+        const VSchema *schema, const KConfig *cfg )
+{
+    uint32_t pair_count = VectorLength( &(col->pairs) );
+
+    col->type_cast = NULL;
+    if ( col->excluded ) return;
+
+    /* call VTypedeclCommonAncestor for every type-pair */
+    VectorForEach ( &(col->pairs), false,
+            matcher_measure_dist_cb, (void*)schema );
+    /* if we have more than one pair left... */
+    if ( pair_count > 1 )
+    {
+        /* enter the lossy-ness into the src-types... */
+        VectorForEach ( &(col->src_types), false,
+            matcher_enter_type_score_cb, (void*)cfg );
+    
+        /* reorder the remaining pair's by:
+           compatibility, lossy-ness, distance, default, order */
+        VectorReorder ( &(col->pairs), matcher_match_cb, NULL );
+    }
+    
+    /* pick the winner = first item in the vector */
+    if ( pair_count > 0 )
+    {
+        col->type_cast = (p_mpair)VectorFirst ( &(col->pairs) );
+        /* if the winner is not a compatible pair, we have no cast ! */
+        if ( col->type_cast->compatible != 0 )
+            col->type_cast = NULL;
+    }
+}
+
+
+static rc_t matcher_match_matrix( matcher* self,
+        const VSchema *schema, const KConfig *cfg )
+{
+    rc_t rc = 0;
+    uint32_t idx, len;
+    
+    if ( self == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    if ( schema == NULL || cfg == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+    len = VectorLength( &(self->mcols) );
+    for ( idx = 0;  idx < len; ++idx )
+    {
+        p_mcol col = (p_mcol) VectorGet ( &(self->mcols), idx );
+        if ( col != NULL )
+            if ( col->to_copy )
+                matcher_match_column( col, schema, cfg );
+    }
+    return rc;
+}
+
+
+static rc_t matcher_build_column_vector( matcher* self, const char * columns )
+{
+    const KNamelist *list;
+    uint32_t count, idx;
+    rc_t rc = nlt_make_namelist_from_string( &list, columns );
+    if ( rc != 0 ) return rc;
+    rc = KNamelistCount( list, &count );
+    if ( rc == 0 )
+        for ( idx = 0; idx < count && rc == 0; ++idx )
+        {
+            const char *s;
+            rc = KNamelistGet( list, idx, &s );
+            if ( rc == 0 )
+            {
+                p_mcol new_col = matcher_make_col( s );
+                if ( new_col == NULL )
+                    rc = RC( rcExe, rcNoTarg, rcResolving, rcMemory, rcExhausted );
+                if ( rc == 0 )
+                    rc = VectorAppend( &(self->mcols), NULL, new_col );
+            }
+        }
+    KNamelistRelease( list );
+    return rc;
+}
+
+
+static rc_t matcher_exclude_columns( matcher* self, const char * columns )
+{
+    const KNamelist *list;
+    uint32_t len, idx;
+    rc_t rc;
+
+    if ( columns == NULL ) return 0;
+    rc = nlt_make_namelist_from_string( &list, columns );
+    len = VectorLength( &(self->mcols) );
+    for ( idx = 0;  idx < len; ++idx )
+    {
+        p_mcol col = (p_mcol) VectorGet ( &(self->mcols), idx );
+        if ( col != NULL )
+            col->excluded = nlt_is_name_in_namelist( list, col->name );
+    }
+    KNamelistRelease( list );
+    return rc;
+}
+
+
+rc_t matcher_execute( matcher* self, const p_matcher_input in )
+{
+    VSchema * dflt_schema;
+    const VTable * src_table;
+    rc_t rc;
+
+    if ( self == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    if ( in->manager == NULL || in->add_schemas == NULL || 
+         in->cfg == NULL || in->columns == NULL || 
+         in->src_path == NULL || in->dst_path == NULL ||
+         in->dst_tabname == NULL )
+        return RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+
+    rc = matcher_build_column_vector( self, in->columns );
+    if ( rc != 0 ) return rc;
+
+    rc = matcher_exclude_columns( self, in->excluded_columns );
+    if ( rc != 0 ) return rc;
+
+    rc = helper_parse_schema( in->manager, &dflt_schema, in->add_schemas );
+    if ( rc != 0 ) return rc;
+
+    rc = VDBManagerOpenTableRead( in->manager, &src_table, dflt_schema, "%s", in->src_path );
+    if ( rc == 0 )
+    {
+        const VSchema * src_schema;
+        rc = VTableOpenSchema ( src_table, &src_schema );
+        if ( rc == 0 )
+        {
+            rc = matcher_read_src_types( self, src_table, src_schema );
+            if ( rc == 0 )
+            {
+                if ( in->legacy_schema != NULL )
+                    rc = VSchemaParseFile ( dflt_schema, "%s", in->legacy_schema );
+                if ( rc == 0 )
+                {
+                    VTable * dst_table;
+                    KCreateMode cmode = kcmParents;
+                    const VSchema * dst_schema = src_schema;
+
+                    if ( in->legacy_schema != NULL )
+                        dst_schema = dflt_schema;
+
+                    if ( in->force_unlock )
+                        VDBManagerUnlock ( in->manager, "%s", in->dst_path );
+
+                    if ( in->force_kcmInit )
+                        cmode |= kcmInit;
+                    else
+                        cmode |= kcmCreate;
+
+                    rc = VDBManagerCreateTable( in->manager, &dst_table, 
+                                                dst_schema, in->dst_tabname, cmode, "%s", in->dst_path );
+
+                    if ( rc == 0 )
+                    {
+                        rc = matcher_read_dst_types( self, dst_table, dst_schema );
+                        if ( rc == 0 )
+                        {
+                            rc = matcher_make_type_matrix( self );
+                            if ( rc == 0 )
+                                rc = matcher_match_matrix( self, src_schema, in->cfg );
+                        }
+                        VTableRelease( dst_table );
+                        if ( !(in->force_kcmInit) )
+                            KDirectoryRemove ( in->dir, true, "%s", in->dst_path );
+                    }
+                }
+            }
+            VSchemaRelease( src_schema );
+        }
+        VTableRelease( src_table );
+    }
+    VSchemaRelease( dflt_schema );
+    return rc;
+}
+
+
+rc_t matcher_db_execute( matcher* self, const VTable * src_tab, VTable * dst_tab,
+                         const VSchema * schema, const char * columns, 
+                         const char * kfg_path )
+{
+    KConfig * cfg;
+    rc_t rc = helper_make_config_mgr( &cfg, kfg_path );
+    if ( rc == 0 )
+    {
+        rc = matcher_build_column_vector( self, columns );
+        if ( rc != 0 ) return rc;
+
+        rc = matcher_read_src_types( self, src_tab, schema );
+        if ( rc == 0 )
+        {
+            rc = matcher_read_dst_types( self, dst_tab, schema );
+            if ( rc == 0 )
+            {
+                rc = matcher_make_type_matrix( self );
+                if ( rc == 0 )
+                    rc = matcher_match_matrix( self, schema, cfg );
+            }
+        }
+        KConfigRelease( cfg );
+    }
+    return rc;
+}
diff --git a/tools/vdb-copy/type_matcher.h b/tools/vdb-copy/type_matcher.h
new file mode 100644
index 0000000..bf64ea5
--- /dev/null
+++ b/tools/vdb-copy/type_matcher.h
@@ -0,0 +1,71 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_type_matcher_
+#define _h_type_matcher_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_matcher_input_
+#include "matcher_input.h"
+#endif
+
+typedef struct matcher matcher;
+
+/* initializes the matcher */
+rc_t matcher_init( matcher** self );
+
+/* destroys the matcher */
+rc_t matcher_destroy( matcher* self );
+
+/* shows the matching-matrix */
+rc_t matcher_report( matcher* self, const bool only_copy_columns );
+
+/* makes a typecast-string for the source-table by column-name */
+rc_t matcher_src_cast( const matcher* self, const char *name, char **cast );
+
+/* checks if a column with the given name has at least one type
+   that is also in the given typelist... */
+bool matcher_src_has_type( const matcher* self, const VSchema * s,
+                           const char *name, const Vector *id_vector );
+
+/* makes a typecast-string for the destination-table by column-name */
+rc_t matcher_dst_cast( const matcher* self, const char *name, char **cast );
+
+/* performs a type-match between src/dst with the given in_struct */
+rc_t matcher_execute( matcher* self, const p_matcher_input in );
+
+
+rc_t matcher_db_execute( matcher* self, const VTable * src_tab, VTable * dst_tab,
+                         const VSchema * schema, const char * columns, 
+                         const char * kfg_path );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-copy/vdb-copy-includes.h b/tools/vdb-copy/vdb-copy-includes.h
new file mode 100644
index 0000000..f274df6
--- /dev/null
+++ b/tools/vdb-copy/vdb-copy-includes.h
@@ -0,0 +1,121 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_vdb_copy_includes_
+#define _h_vdb_copy_includes_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_defs_
+#include <klib/defs.h>
+#endif
+
+#ifndef _h_klib_out_
+#include <klib/out.h>
+#endif
+
+#ifndef _h_klib_log_
+#include <klib/log.h>
+#endif
+
+#ifndef _h_klib_rc_
+#include <klib/rc.h>
+#endif
+
+#ifndef _h_klib_debug_
+#include <klib/debug.h>
+#endif
+
+#ifndef _h_klib_vector_
+#include <klib/vector.h>
+#endif
+
+#ifndef _h_klib_text_
+#include <klib/text.h>
+#endif
+
+#ifndef _h_klib_args_
+#include <kapp/args.h>
+#endif
+
+#ifndef _h_kfs_directory_
+#include <kfs/directory.h>
+#endif
+
+#ifndef _h_kfs_file_
+#include <kfs/file.h>
+#endif
+
+#ifndef _h_kfg_config_
+#include <kfg/config.h>
+#endif
+
+#ifndef _h_vdb_manager_
+#include <vdb/manager.h>
+#endif
+
+#ifndef _h_vdb_table_
+#include <vdb/table.h>
+#endif
+
+#ifndef _h_vdb_cursor_
+#include <vdb/cursor.h>
+#endif
+
+#ifndef _h_vdb_database_
+#include <vdb/database.h>
+#endif
+
+#ifndef _h_vdb_schema_
+#include <vdb/schema.h>
+#endif
+
+#ifndef _h_vdb_vdb_priv_
+#include <vdb/vdb-priv.h>
+#endif
+
+#ifndef _h_sra_sraschema_
+#include <sra/sraschema.h>
+#endif
+
+/*
+#ifndef _h_sra_srapath_
+#include <sra/srapath.h>
+#endif
+*/
+
+#ifndef _h_namelist_tools_
+#include "namelist_tools.h"
+#endif
+
+#include <os-native.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-copy/vdb-copy.c b/tools/vdb-copy/vdb-copy.c
new file mode 100644
index 0000000..527011c
--- /dev/null
+++ b/tools/vdb-copy/vdb-copy.c
@@ -0,0 +1,1456 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "vdb-copy-includes.h"
+#include "definitions.h"
+#include "context.h"
+#include "helper.h"
+#include "coldefs.h"
+#include "get_platform.h"
+#include "copy_meta.h"
+#include "type_matcher.h"
+#include "redactval.h"
+
+#include <kapp/main.h>
+#include <klib/progressbar.h>
+#include <sysalloc.h>
+
+/*
+#if _DEBUGGING
+#define _CRTDBG_MAP_ALLOC 1
+#include <crtdbg.h>
+#endif
+*/
+
+#include <stdlib.h>
+#include <string.h>
+
+static const char * table_usage[] = { "table-name", NULL };
+static const char * rows_usage[] = { "set of rows to be copied(default = all)", NULL };
+#if ALLOW_COLUMN_SPEC
+static const char * columns_usage[] = { "set of columns to be copied(default = all)", NULL };
+#endif
+static const char * schema_usage[] = { "schema-name", NULL };
+static const char * without_accession_usage[] = { "without accession-test", NULL };
+static const char * ignore_reject_usage[] = { "ignore SRA_FILTER_REJECT values", NULL };
+static const char * ignore_redact_usage[] = { "ignore SRA_FILTER_REDACTED values", NULL };
+#if ALLOW_EXTERNAL_CONFIG
+static const char * kfg_path_usage[] = { "use this path to find the file vdb-copy.kfg", NULL };
+#endif
+static const char * show_matching_usage[] = { "show type-matching results", NULL };
+static const char * show_progress_usage[] = { "show progress in percent while copying", NULL };
+static const char * ignore_incomp_usage[] = { "ignore incompatible columns", NULL };
+static const char * reindex_usage[] = { "reindex columns after copy", NULL };
+static const char * show_redact_usage[] = { "show redaction-process", NULL };
+static const char * excluded_columns_usage[] = { "exclude these columns from copy", NULL };
+static const char * show_meta_usage[] = { "show metadata-copy-process", NULL };
+static const char * md5mode_usage[] = { "MD5-mode def.: auto, '1'...forced ON, '0'...forced OFF)", NULL };
+static const char * blcmode_usage[] = { "Blob-checksum def.: auto, '1'...CRC32, 'M'...MD5, '0'...OFF)", NULL };
+static const char * force_usage[] = { "forces an existing target to be overwritten", NULL };
+static const char * unlock_usage[] = { "forces a locked target to be unlocked", NULL };
+
+OptDef MyOptions[] =
+{
+    { OPTION_TABLE, ALIAS_TABLE, NULL, table_usage, 1, true, false },
+    { OPTION_ROWS, ALIAS_ROWS, NULL, rows_usage, 1, true, false },
+#if ALLOW_COLUMN_SPEC
+    { OPTION_COLUMNS, ALIAS_COLUMNS, NULL, columns_usage, 1, true, false },
+#endif
+    { OPTION_SCHEMA, ALIAS_SCHEMA, NULL, schema_usage, 5, true, false },
+    { OPTION_WITHOUT_ACCESSION, ALIAS_WITHOUT_ACCESSION, NULL, without_accession_usage, 1, false, false },
+    { OPTION_IGNORE_REJECT, ALIAS_IGNORE_REJECT, NULL, ignore_reject_usage, 1, false, false },
+    { OPTION_IGNORE_REDACT, ALIAS_IGNORE_REDACT, NULL, ignore_redact_usage, 1, false, false },
+#if ALLOW_EXTERNAL_CONFIG
+    { OPTION_KFG_PATH, ALIAS_KFG_PATH, NULL, kfg_path_usage, 1, true, false },
+#endif
+    { OPTION_SHOW_MATCHING, ALIAS_SHOW_MATCHING, NULL, show_matching_usage, 1, false, false },
+    { OPTION_SHOW_PROGRESS, ALIAS_SHOW_PROGRESS, NULL, show_progress_usage, 1, false, false },
+    { OPTION_IGNORE_INCOMP, ALIAS_IGNORE_INCOMP, NULL, ignore_incomp_usage, 1, false, false },
+    { OPTION_REINDEX, ALIAS_REINDEX, NULL, reindex_usage, 1, false, false },
+    { OPTION_SHOW_REDACT, ALIAS_SHOW_REDACT, NULL, show_redact_usage, 1, false, false },
+    { OPTION_EXCLUDED_COLUMNS, ALIAS_EXCLUDED_COLUMNS, NULL, excluded_columns_usage, 1, true, false },
+    { OPTION_SHOW_META, ALIAS_SHOW_META, NULL, show_meta_usage, 1, false, false },
+    { OPTION_MD5_MODE, ALIAS_MD5_MODE, NULL, md5mode_usage, 1, true, false },
+    { OPTION_BLOB_CHECKSUM, ALIAS_BLOB_CHECKSUM, NULL, blcmode_usage, 1, true, false },
+    { OPTION_FORCE, ALIAS_FORCE, NULL, force_usage, 1, false, false },
+    { OPTION_UNLOCK, ALIAS_UNLOCK, NULL, unlock_usage, 1, false, false }
+};
+
+
+const char UsageDefaultName[] = "vdb-copy";
+
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    return KOutMsg (
+        "\n"
+        "Usage:\n"
+        "  %s <src_path> <dst_path> [options]\n"
+        "\n", progname );
+}
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary (progname);
+
+    KOutMsg ("Options:\n");
+
+    HelpOptionLine ( ALIAS_TABLE, OPTION_TABLE, "table", table_usage );
+    HelpOptionLine ( ALIAS_ROWS, OPTION_ROWS, "rows", rows_usage );
+#if ALLOW_COLUMN_SPEC
+    HelpOptionLine ( ALIAS_COLUMNS, OPTION_COLUMNS, "columns", columns_usage );
+#endif
+    HelpOptionLine ( ALIAS_SCHEMA, OPTION_SCHEMA, "schema", schema_usage );
+    HelpOptionLine ( ALIAS_WITHOUT_ACCESSION, OPTION_WITHOUT_ACCESSION, NULL, without_accession_usage );
+    HelpOptionLine ( ALIAS_IGNORE_REJECT, OPTION_IGNORE_REJECT, NULL, ignore_reject_usage );
+    HelpOptionLine ( ALIAS_IGNORE_REDACT, OPTION_IGNORE_REDACT, NULL, ignore_redact_usage );
+#if ALLOW_EXTERNAL_CONFIG
+    HelpOptionLine ( ALIAS_KFG_PATH, OPTION_KFG_PATH, NULL, kfg_path_usage );
+#endif
+    HelpOptionLine ( ALIAS_SHOW_MATCHING, OPTION_SHOW_MATCHING, NULL, show_matching_usage );
+    HelpOptionLine ( ALIAS_SHOW_PROGRESS, OPTION_SHOW_PROGRESS, NULL, show_progress_usage );
+    HelpOptionLine ( ALIAS_IGNORE_INCOMP, OPTION_IGNORE_INCOMP, NULL, ignore_incomp_usage );
+    HelpOptionLine ( ALIAS_REINDEX, OPTION_REINDEX, NULL, reindex_usage );
+    HelpOptionLine ( ALIAS_SHOW_REDACT, OPTION_SHOW_REDACT, NULL, show_redact_usage );
+    HelpOptionLine ( ALIAS_EXCLUDED_COLUMNS, OPTION_EXCLUDED_COLUMNS, NULL, excluded_columns_usage );
+    HelpOptionLine ( ALIAS_SHOW_META, OPTION_SHOW_META, NULL, show_meta_usage );
+    HelpOptionLine ( ALIAS_FORCE, OPTION_FORCE, NULL, force_usage );
+    HelpOptionLine ( ALIAS_UNLOCK, OPTION_UNLOCK, NULL, unlock_usage );
+    HelpOptionLine ( ALIAS_MD5_MODE, OPTION_MD5_MODE, NULL, md5mode_usage );
+    HelpOptionLine ( ALIAS_BLOB_CHECKSUM, OPTION_BLOB_CHECKSUM, NULL, blcmode_usage );
+
+    HelpOptionsStandard ();
+
+    HelpVersion ( fullpath, KAppVersion() );
+
+    return rc;
+}
+
+/* ----------------------------------------------------------------------------------- */
+static rc_t vdb_copy_redact_cell( const VCursor * src_cursor, VCursor * dst_cursor,
+                                  const p_col_def col, uint64_t row_id,
+                                  redact_buffer * rbuf,
+                                  const bool show_redact )
+{
+    rc_t rc;
+    const void * src_buffer;
+    uint32_t offset_in_bits;
+    uint32_t n_elements;
+    uint32_t elem_bits;
+
+    /* we read the original cell-data to detect how big the data is before redacting */
+    rc = VCursorCellData( src_cursor, col->src_idx, &elem_bits,
+                          &src_buffer, &offset_in_bits, &n_elements );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogInt,
+                 (klogInt,
+                 rc,
+                 "VCursorCellData( col:$(col_name) at row #$(row_nr) ) failed",
+                 "col_name=%s,row_nr=%lu",
+                  col->name, row_id ));
+    }
+
+    DISP_RC( rc, "vdb_copy_redact_cell:VCursorCellData(src) failed" );
+    if ( rc == 0 )
+    {
+        size_t new_size = ( ( elem_bits * n_elements ) + 8 ) >> 3;
+        rc = redact_buf_resize( rbuf, new_size );
+        DISP_RC( rc, "vdb_copy_redact_cell:redact_buf_resize() failed" );
+        if ( rc == 0 )
+        {
+            if ( col->r_val != NULL )
+            {
+                if ( show_redact )
+                {
+                    char * c = ( char * )col->r_val->value;
+                    KOutMsg( "redacting #%lu %s -> 0x%.02x\n", row_id, col->dst_cast, *c );
+                }
+                redact_val_fill_buffer( col->r_val, rbuf, new_size );
+            }
+            else
+            {
+                if ( show_redact )
+                    KOutMsg( "redacting #%lu %s -> 0\n", row_id, col->dst_cast );
+                memset( rbuf->buffer, 0, new_size );
+            }
+
+            rc = VCursorWrite( dst_cursor, col->dst_idx, elem_bits,
+                               rbuf->buffer, 0, n_elements );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogInt,
+                         (klogInt,
+                         rc,
+                         "VCursorWrite( col:$(col_name) at row #$(row_nr) ) failed",
+                         "col_name=%s,row_nr=%lu",
+                          col->name, row_id ));
+            }
+        }
+    }
+    return rc;
+}
+
+
+/* ----------------------------------------------------------------------------------- */
+static rc_t vdb_copy_cell( const VCursor * src_cursor, VCursor * dst_cursor,
+                           const p_col_def col, uint64_t row_id )
+{
+    rc_t rc;
+
+    const void *buffer;
+    uint32_t offset_in_bits;
+    uint32_t number_of_elements;
+    uint32_t elem_bits;
+
+    /*
+    KOutMsg( " - copy cell %s ( src_idx=%u / dst_idx=%u )\n", 
+              col->name, col->src_idx, col->dst_idx );
+    */
+    rc = VCursorCellData( src_cursor, col->src_idx, &elem_bits,
+                          &buffer, &offset_in_bits, &number_of_elements );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogInt,
+                 (klogInt,
+                 rc,
+                 "VCursorCellData( col:$(col_name) at row #$(row_nr) ) failed",
+                 "col_name=%s,row_nr=%lu",
+                  col->name, row_id ));
+    }
+    if ( rc != 0 ) return rc;
+
+    /*
+    KOutMsg( "bit-offset = %u / elements = %u / element-bits = %u\n", 
+       offset_in_bits, number_of_elements, elem_bits );
+    */
+    rc = VCursorWrite( dst_cursor, col->dst_idx, elem_bits,
+                       buffer, offset_in_bits, number_of_elements );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogInt,
+                 (klogInt,
+                 rc,
+                 "VCursorWrite( col:$(col_name) at row #$(row_nr) ) failed",
+                 "col_name=%s,row_nr=%lu",
+                  col->name, row_id ));
+    }
+    return rc;
+}
+
+
+/* ----------------------------------------------------------------------------------- */
+static rc_t vdb_copy_row( const VCursor * src_cursor,
+                          VCursor * dst_cursor,
+                          col_defs * columns,
+                          uint64_t row_id,
+                          redact_buffer * rbuf,
+                          const bool redact,
+                          const bool show_redact )
+{
+    uint32_t len, idx = 0;
+    rc_t rc = VCursorOpenRow( dst_cursor );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogInt,
+                 (klogInt,
+                 rc,
+                 "VCursorOpenRow(dst) row #$(row_nr) failed",
+                 "row_nr=%lu",
+                 row_id ));
+        return rc;
+    }
+
+    len = VectorLength( &(columns->cols) );
+    /* loop through the columns and copy them if they have to be copied */
+    while ( idx < len && rc == 0 )
+    {
+        p_col_def col = (p_col_def) VectorGet ( &(columns->cols), idx++ );
+        if ( col != NULL )
+        {
+            if ( col->to_copy )
+            {
+                if ( redact && col->redactable )
+                    rc = vdb_copy_redact_cell( src_cursor, dst_cursor,
+                                               col, row_id, rbuf, show_redact );
+                else
+                    rc = vdb_copy_cell( src_cursor, dst_cursor, col, row_id );
+            }
+        }
+    }
+    if ( rc == 0 )
+    {
+        rc = VCursorCommitRow( dst_cursor );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogInt,
+                     (klogInt,
+                     rc,
+                     "VCursorCommitRow(dst) row #$(row_nr) failed",
+                     "row_nr=%lu",
+                     row_id ));
+        }
+
+        rc = VCursorCloseRow( dst_cursor );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogInt,
+                     (klogInt,
+                     rc,
+                     "VCursorCloseRow(dst) row #$(row_nr) failed",
+                     "row_nr=%lu",
+                     row_id ));
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdb_copy_read_row_flags( const p_context ctx,
+                                     const VCursor *cursor,
+                                     const uint32_t src_idx,
+                                     bool *pass,
+                                     bool *redact )
+{
+    uint64_t filter;
+    /* read the filter-value from the filter-column */
+    rc_t rc = helper_read_vdb_int_row_open( cursor, src_idx, &filter );
+    if ( rc != 0 ) return rc;
+
+    switch( filter )
+    {
+    case SRA_READ_FILTER_REJECT   : 
+        if ( ctx->ignore_reject == false ) *pass = false;
+        break;
+
+    case SRA_READ_FILTER_REDACTED : 
+        if ( ctx->ignore_redact == false ) *redact = true;
+        break;
+    }
+    return rc;
+}
+
+
+static rc_t vdb_copy_row_loop( const p_context ctx,
+                               const VCursor * src_cursor,
+                               VCursor * dst_cursor,
+                               col_defs * columns,
+                               redact_vals * rvals )
+{
+    rc_t rc;
+    const struct num_gen_iter * iter;
+    int64_t row_id;
+    uint64_t count;
+    uint32_t percent;
+    p_col_def filter_col_def = NULL;
+    redact_buffer rbuf;
+    struct progressbar * progress = NULL;
+
+    if ( columns->filter_idx != -1 )
+        filter_col_def = col_defs_get( columns, columns->filter_idx );
+
+    rc = num_gen_iterator_make( ctx->row_generator, &iter );
+    if ( rc != 0 ) return rc;
+
+    rc = make_progressbar( &progress, 2 );
+    DISP_RC( rc, "vdb_copy_row_loop:make_progressbar() failed" );
+    if ( rc != 0 ) return rc;
+
+    redact_buf_init( &rbuf );
+    col_defs_find_redact_vals( columns, rvals );
+	
+    count = 0;
+    while ( rc == 0 && num_gen_iterator_next( iter, &row_id, &rc ) )
+    {
+        if ( rc == 0 )
+            rc = Quitting();    /* to be able to cancel the loop by signal */
+        if ( rc == 0 )
+        {
+            rc = VCursorSetRowId( src_cursor, row_id );
+            if ( rc != 0 )
+                PLOGERR( klogInt, (klogInt, rc,
+                         "VCursorSetRowId(src) row #$(row_nr) failed",
+                         "row_nr=%lu", row_id ));
+
+            if ( rc == 0 )
+            {
+                rc = VCursorOpenRow( src_cursor );
+                if ( rc != 0 )
+                    PLOGERR( klogInt, (klogInt, rc,
+                             "VCursorOpenRow(src) row #$(row_nr) failed",
+                             "row_nr=%lu", row_id ));
+                else
+                {
+                    bool pass_flag = true;
+                    bool redact_flag = false;
+
+                    if ( filter_col_def != NULL )
+                        vdb_copy_read_row_flags( ctx, src_cursor,
+                                    filter_col_def->src_idx, &pass_flag, &redact_flag );
+                    if ( pass_flag )
+                        rc = vdb_copy_row( src_cursor, dst_cursor,
+                                           columns, row_id,
+                                           &rbuf, redact_flag, ctx->show_redact );
+
+                    if ( rc == 0 )
+                    {
+                        count++;
+                        rc = VCursorCloseRow( src_cursor );
+                        if ( rc != 0 )
+                            PLOGERR( klogInt, ( klogInt, rc,
+                                     "VCursorCloseRow(src) row #$(row_nr) failed",
+                                     "row_nr=%lu", row_id ) );
+                    }
+                }
+
+                if ( ctx->show_progress )
+                {
+                    if ( num_gen_iterator_percent( iter, 2, &percent ) == 0 )
+                        update_progressbar( progress, percent );
+                }
+            }
+        }
+    }
+
+    /* set rc to zero for num_gen_iterator_next() reached last id */
+    if ( GetRCModule( rc ) == rcVDB && 
+         GetRCTarget( rc ) == rcNoTarg && 
+         GetRCContext( rc ) == rcReading &&
+         GetRCObject( rc ) == rcId &&
+         GetRCState( rc ) == rcInvalid )
+        rc = 0;
+
+    if ( ctx->show_progress )
+        KOutMsg( "\n" );
+    destroy_progressbar( progress );
+
+    PLOGMSG( klogInfo, ( klogInfo, "\n $(row_cnt) rows copied", "row_cnt=%lu", count ));
+
+    if ( rc == 0 )
+    {
+        rc = VCursorCommit( dst_cursor );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "VCursorCommit( dst ) after processing all rows failed" );
+        }
+    }
+    num_gen_iterator_destroy( iter );
+    redact_buf_free( &rbuf );
+
+    return rc;
+}
+
+
+static rc_t vdb_copy_make_dst_table( const p_context ctx,
+                                     VDBManager * vdb_mgr, 
+                                     const VSchema * src_schema,
+                                     VSchema **dst_schema,
+                                     KCreateMode cmode,
+                                     VTable **dst_table,
+                                     bool is_legacy )
+{
+    rc_t rc = 0;
+
+    /* different ways to make the schema for the dest-table */
+    if ( is_legacy )
+    {
+        /* load it from a file */
+        /*
+        KOutMsg( "we are using '%s'\n", cctx->legacy_schema_file );
+        */
+        if ( *dst_schema == NULL )
+        {
+            rc = VDBManagerMakeSRASchema( vdb_mgr, dst_schema );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogInt,
+                         (klogInt,
+                         rc, "VDBManagerMakeSRASchema(dst) failed", "" ));
+            }
+        }
+        rc = VSchemaParseFile ( *dst_schema, "%s", ctx->legacy_schema_file );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogInt,
+                     (klogInt,
+                     rc, "VSchemaParseFile() failed", "" ));
+        }
+    }
+    else
+    {
+        /* in case of a non-legacy-table, do nothing,
+           keep using the src-schema-object */
+        *dst_schema = (VSchema *)src_schema;
+        VSchemaAddRef( src_schema );
+    }
+    if ( rc == 0 )
+    {
+        rc = VDBManagerCreateTable( vdb_mgr, dst_table,
+                             *dst_schema, ctx->dst_schema_tabname,
+                                    cmode, "%s", ctx->dst_path );
+        DISP_RC( rc, "vdb_copy_make_dst_table:VDBManagerCreateTable() failed" );
+        if ( rc == 0 )
+        {
+            KChecksum cs_mode = helper_assemble_ChecksumMode( ctx->blob_checksum );
+            rc = VTableColumnCreateParams ( *dst_table, cmode, cs_mode, 0 );
+            DISP_RC( rc, "vdb_copy_make_dst_table:VTableColumnCreateParams() failed" );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdb_copy_open_dest_table( const p_context ctx,
+                                      const VTable * src_table,
+                                      VTable * dst_table,
+                                      VCursor ** dst_cursor,
+                                      col_defs * columns,
+                                      bool is_legacy )
+{
+    rc_t rc;
+
+    /* copy the metadata */
+    rc = copy_table_meta( src_table, dst_table, 
+                          ctx->config.meta_ignore_nodes, 
+                          ctx->show_meta, is_legacy );
+    if ( rc != 0 ) return rc;
+
+    /* mark all columns which are to be found writable as to_copy */
+    rc = col_defs_mark_writable_columns( columns, dst_table, false );
+    DISP_RC( rc, "vdb_copy_open_dest_table:col_defs_mark_writable_columns() failed" );
+    if ( rc != 0 ) return rc;
+
+    /* make a writable cursor */
+    rc = VTableCreateCursorWrite( dst_table, dst_cursor, kcmInsert );
+    DISP_RC( rc, "vdb_copy_open_dest_table:VTableCreateCursorWrite(dst) failed" );
+    if ( rc != 0 ) return rc;
+
+    /* add all marked ( as to copy ) columns to the writable cursor */
+    rc = col_defs_add_to_wr_cursor( columns, *dst_cursor, false );
+    DISP_RC( rc, "vdb_copy_open_dest_table:col_defs_add_to_wr_cursor(dst) failed" );
+    if ( rc != 0 ) return rc;
+
+    /* opens the dst cursor */
+    rc = VCursorOpen( *dst_cursor );
+    DISP_RC( rc, "vdb_copy_open_dest_table:VCursorOpen(dst) failed" );
+
+    return rc;
+}
+
+
+/* detect the row-range of the source-table
+   check if the requested row-range is within this range
+   otherwise correct the requested row-range
+*/
+static rc_t vdb_copy_check_range( const p_context ctx,
+                                  const VCursor * a_cursor )
+{
+    int64_t  first;
+    uint64_t count;
+    rc_t rc = VCursorIdRange( a_cursor, 0, &first, &count );
+    DISP_RC( rc, "vdb_copy_check_range:VCursorIdRange() failed" );
+    if ( rc == 0 )
+    {
+        rc = context_range_check( ctx, first, count );
+        DISP_RC( rc, "vdb_copy_check_range:context_range_check() failed" );
+    }
+    return rc;
+}
+
+
+/* detect the row-range of the source-table
+   set's the range of the number-generator to the discovered values
+*/
+static rc_t vdb_copy_set_range( const p_context ctx,
+                                const VCursor * a_cursor )
+{
+    int64_t  first;
+    uint64_t count;
+    rc_t rc = VCursorIdRange( a_cursor, 0, &first, &count );
+    DISP_RC( rc, "vdb_copy_set_range:VCursorIdRange() failed" );
+    if ( rc == 0 )
+    {
+        rc = context_set_range( ctx, first, count );
+        DISP_RC( rc, "vdb_copy_set_range:context_set_range() failed" );
+    }
+    return rc;
+}
+
+
+static rc_t vdb_copy_prepare_legacy_tab( const p_context ctx,
+                                         const char * src_schema_tabname )
+{
+    KConfig * config_mgr;
+    char * src_platform;
+
+    rc_t rc = get_table_platform( ctx->src_path, &src_platform, '_' );
+    DISP_RC( rc, "vdb_copy_prepare_legacy_tab:get_table_platform() failed" );
+    if ( rc != 0 ) return rc;
+
+    rc = helper_make_config_mgr( &config_mgr, ctx->kfg_path );
+    DISP_RC( rc, "vdb_copy_prepare_legacy_tab:helper_make_config_mgr() failed" );
+    if ( rc != 0 ) return rc;
+
+    PLOGMSG( klogInfo, ( klogInfo, "legacy-platform: $(platform)", "platform=%s",
+                                   src_platform ));
+
+    rc = helper_get_legacy_write_schema_from_config( config_mgr,
+                src_platform,
+                src_schema_tabname,
+                &(ctx->legacy_schema_file),
+                &(ctx->dst_schema_tabname),
+                &(ctx->legacy_dont_copy) );
+    DISP_RC( rc, "vdb_copy_prepare_legacy_tab:helper_get_legacy_write_schema_from_config() failed" );
+    KConfigRelease( config_mgr );
+    if ( rc != 0 ) return rc;
+
+    if ( ctx->show_matching )
+    {
+        PLOGMSG( klogInfo, ( klogInfo, "-file: $(file)", "file=%s", ctx->legacy_schema_file ));
+        PLOGMSG( klogInfo, ( klogInfo, "-tab : $(tab)",  "tab=%s",  ctx->dst_schema_tabname ));
+        PLOGMSG( klogInfo, ( klogInfo, "-dont: $(dont)", "dont=%s", ctx->legacy_dont_copy ));
+    }
+    return rc;
+}
+
+
+static rc_t vdb_copy_find_out_what_columns_to_use( const VTable * src_table,
+                                                   const char * tablename,
+                                                   col_defs * columns, 
+                                                   const char * requested,
+                                                   const char * excluded )
+{
+    bool cols_requested = ( ( requested != NULL ) &&
+                            ( nlt_strcmp( requested, "*" ) != 0 ) );
+    /* no matter if specific columns are requested, we first discover all of them
+       to later mark the columns which are requested */
+    rc_t rc = col_defs_extract_from_table( columns, src_table );
+    DISP_RC( rc, "vdb_copy_find_out_what_columns_to_use:col_defs_extract_from_table() failed" );
+    if ( rc == 0 )
+    {
+        if ( cols_requested )
+            /* the user requested a specific subset of columns... */
+            rc = col_defs_mark_requested_columns( columns, requested );
+        else
+            /* no specific subset of columns is requested --> copy what we can... */
+            rc = col_defs_mark_requested_columns( columns, NULL );
+        DISP_RC( rc, "vdb_copy_find_out_what_columns_to_use:col_defs_mark_requested_columns() failed" );
+        if ( rc == 0 && excluded != NULL )
+        {
+            rc = col_defs_exclude_these_columns( columns, tablename, excluded );
+            DISP_RC( rc, "vdb_copy_find_out_what_columns_to_use:col_defs_unmark_writable_columns() failed" );
+        }
+    }
+    return rc;
+}
+
+
+/* find the filter-column and redactable columns */
+static void vdb_copy_find_filter_and_redact_columns( const VSchema * src_schema,
+                                                     col_defs * columns,
+                                                     config_values * config,
+                                                     matcher * type_matcher )
+{
+    /* it is ok to not find a filter-column: no error in this case */
+    col_defs_detect_filter_col( columns, config->filter_col_name );
+
+    /* it is ok to not find redactable types: no error in this case */
+    col_defs_detect_redactable_cols_by_type( columns,
+             src_schema, type_matcher, config->redactable_types );
+
+    /* it is ok to not find columns excluded from redacting: no error in this case */
+    col_defs_unmark_do_not_redact_columns( columns,
+                    config->do_not_redact_columns );
+}
+
+
+static rc_t vdb_copy_detect_legacy( const p_context ctx,
+                                    VDBManager * vdb_mgr,
+                                    const VTable * src_table,
+                                    bool * is_legacy )
+{
+    char * src_schema_tabname;
+    /* detects the name of the schema-table used by the source-table */
+    rc_t rc = helper_get_schema_tab_name( src_table, &src_schema_tabname );
+    DISP_RC( rc, "vdb_copy_prepare_columns:helper_get_schema_tab_name() failed" );
+    if ( rc == 0 )
+    {
+        rc = helper_is_tablename_legacy( vdb_mgr, src_schema_tabname, is_legacy );
+        if ( rc == 0 )
+        {
+            if ( *is_legacy )
+            {
+                PLOGMSG( klogInfo, ( klogInfo, "used legacy schema: $(schema)", "schema=%s", 
+                                     src_schema_tabname ));
+                rc = vdb_copy_prepare_legacy_tab( ctx, src_schema_tabname );
+            }
+            else
+            {
+                PLOGMSG( klogInfo, ( klogInfo, "used schema: $(schema)", "schema=%s", 
+                                     src_schema_tabname ));
+                ctx->dst_schema_tabname = string_dup_measure ( src_schema_tabname, NULL );
+            }
+        }
+        free( src_schema_tabname );
+    }
+    return rc;
+}
+
+
+/* we have the src-columns collected (incl. there types):
+   no columns have been added to a cursor (rd and wr),
+   now we can find the columns which have to be copied
+   including the right type-casts for every one of these columns */
+static rc_t vdb_copy_match_columns( const p_context ctx,
+                                    VDBManager * vdb_mgr, 
+                                    col_defs * columns,
+                                    matcher * type_matcher )
+{
+    rc_t rc;
+    matcher_input mi;
+
+    rc = KDirectoryNativeDir( &( mi.dir ) );
+    DISP_RC( rc, "vdb_copy_match_columns:KDirectoryNativeDir() failed" );
+    if ( rc == 0 )
+    {
+        rc = helper_make_config_mgr( &(mi.cfg), ctx->kfg_path );
+        DISP_RC( rc, "vdb_copy_match_columns:helper_make_config_mgr() failed" );
+        if ( rc == 0 )
+        {
+            mi.manager = vdb_mgr;
+            mi.add_schemas = ctx->src_schema_list;
+
+            rc = col_defs_as_string( columns, (char**)&mi.columns, true );
+            if ( rc == 0 )
+            {
+                mi.src_path         = ctx->src_path;
+                mi.dst_path         = ctx->dst_path;
+                mi.legacy_schema    = ctx->legacy_schema_file;
+                mi.dst_tabname      = ctx->dst_schema_tabname;
+                mi.excluded_columns = ctx->legacy_dont_copy;
+                mi.force_kcmInit    = ctx->force_kcmInit;
+                mi.force_unlock     = ctx->force_unlock;
+
+                rc = matcher_execute( type_matcher, &mi );
+                if ( rc != 0 )
+                {
+                    if ( GetRCState( rc ) == rcExists )
+                    {
+                        LOGMSG( klogInfo, "vdb-copy cannot create the target-table, because it already exists!" );
+                        LOGMSG( klogInfo, "try to use the force-option (-f)" );
+                        ctx->dont_remove_target = true;
+                    }
+                    else
+                        DISP_RC( rc, "vdb_copy_match_columns:matcher_execute() failed" );
+                }
+                if ( rc == 0 )
+                {
+                    if ( ctx->show_matching )
+                        matcher_report( type_matcher, true );
+                    rc = col_defs_apply_casts( columns, type_matcher );
+                    DISP_RC( rc, "vdb_copy_match_columns:col_defs_apply_casts() failed" );
+                }
+
+                free( ( void * )mi.columns );
+            }
+            KConfigRelease( mi.cfg );
+        }
+        KDirectoryRelease( mi.dir );
+    }
+    return rc;
+}
+
+
+/* this is the common entry-point for the copy-operation in both cases
+   "given path is database" OR "given path is table" */
+static rc_t vdb_copy_open_source_table( const p_context ctx,
+                                        VDBManager * vdb_mgr,
+                                        const VSchema * src_schema,
+                                        VSchema **dst_schema,
+                                        const VTable * src_table,
+                                        const VCursor * src_cursor,
+                                        KCreateMode cmode,
+                                        VTable **dst_table,
+                                        col_defs * columns,
+                                        bool * is_legacy,
+                                        matcher * type_matcher ) 
+{
+    /* everything what has to be done before adding the columns
+       to the source-cursor and opening the source-cursor */
+    rc_t rc = vdb_copy_detect_legacy( ctx, vdb_mgr, src_table, is_legacy );
+    if ( rc != 0 ) return rc;
+
+    /* type-match between src <---> dst columns, find best typecast */
+    rc = vdb_copy_match_columns( ctx, vdb_mgr, columns, type_matcher );
+    if ( rc != 0 ) return rc;
+
+    /* in case of legacy table make new schema - parse matched schema
+       in case on non-legacy use the src-schema as dst-schema */
+    rc = vdb_copy_make_dst_table( ctx, vdb_mgr, src_schema, dst_schema, cmode, 
+                                  dst_table, *is_legacy );
+    if ( rc != 0 ) return rc;
+
+    /* the prepared and eventually shortened src-column-list is used */
+    rc = col_defs_add_to_rd_cursor( columns, src_cursor, false );
+    if ( rc != 0 ) return rc;
+
+    rc = VCursorOpen( src_cursor );
+    DISP_RC( rc, "vdb_copy_open_source_table:VCursorOpen() failed" );
+    if ( rc != 0 ) return rc;
+
+    /* range check requires an open cursor */
+    rc = vdb_copy_check_range( ctx, src_cursor );
+    return rc;
+}
+
+
+static rc_t vdb_copy_table2( const p_context ctx,
+                             VDBManager * vdb_mgr,
+                             const VTable * src_table,
+                             const VCursor * src_cursor,
+                             const VSchema * src_schema,
+                             col_defs * columns,
+                             matcher * type_matcher )
+{
+    VSchema * dst_schema = NULL;
+    VTable * dst_table;
+    bool is_legacy;
+
+    KCreateMode cmode = helper_assemble_CreateMode( src_table, 
+                              ctx->force_kcmInit, ctx->md5_mode );
+    rc_t rc = vdb_copy_open_source_table( ctx, vdb_mgr, src_schema, &dst_schema,
+                                     src_table, src_cursor, cmode, &dst_table, columns,
+                                     &is_legacy, type_matcher );
+    if ( rc == 0 )
+    {
+        VCursor * dst_cursor;
+        rc = vdb_copy_open_dest_table( ctx, src_table, dst_table, &dst_cursor, columns, 
+                                       is_legacy );
+        if ( rc == 0 )
+        {
+            /* this function does not fail, because it is ok to not find
+               filter-column, redactable types and excluded columns */
+            vdb_copy_find_filter_and_redact_columns( src_schema,
+                                   columns, &(ctx->config), type_matcher );
+
+            rc = vdb_copy_row_loop( ctx, src_cursor, dst_cursor,
+                                    columns, ctx->rvals );
+
+            VCursorRelease( dst_cursor );
+            if ( rc == 0 )
+            {
+                if ( ctx->reindex )
+                {
+                    /* releasing the cursor is necessary for reindex */
+                    rc = VTableReindex( dst_table );
+                    DISP_RC( rc, "vdb_copy_table2:VTableReindex() failed" );
+                }
+            }
+        }
+        VSchemaRelease( dst_schema );
+        VTableRelease( dst_table );
+    }
+    return rc;
+}
+
+
+static rc_t vdb_copy_table( const p_context ctx,
+                            VDBManager * vdb_mgr,
+                            const VTable * src_table,
+                            const char * tablename )
+{
+    const VSchema * src_schema;
+    rc_t rc = VTableOpenSchema ( src_table, &src_schema );
+    DISP_RC( rc, "vdb_copy_main:VTableOpenSchema( src_schema ) failed" );
+    if ( rc == 0 )
+    {
+        col_defs * columns;
+        rc = col_defs_init( &columns );
+        DISP_RC( rc, "vdb_copy_table:col_defs_init() failed" );
+        if ( rc == 0 )
+        {
+            rc = vdb_copy_find_out_what_columns_to_use( src_table, tablename, columns,
+                                                        ctx->columns, ctx->excluded_columns );
+            if ( rc == 0 )
+            {
+                const VCursor * src_cursor;
+                rc = VTableCreateCursorRead( src_table, &src_cursor );
+                DISP_RC( rc, "vdb_copy_table:VTableCreateCursorRead() failed" );
+                if ( rc == 0 )
+                {
+                    matcher * type_matcher;
+
+                    rc = matcher_init( &type_matcher );
+                    DISP_RC( rc, "vdb_copy_table:matcher_init() failed" );
+                    if ( rc == 0 )
+                    {
+                        /*****************************************************/
+                        rc = vdb_copy_table2( ctx, vdb_mgr, src_table, src_cursor,
+                                              src_schema, columns, type_matcher );
+                        /*****************************************************/
+                        matcher_destroy( type_matcher );
+                    }
+                }
+                VCursorRelease( src_cursor );
+            }
+            col_defs_destroy( columns );
+        }
+        VSchemaRelease( src_schema );
+    }
+    return rc;
+}
+
+
+/*-----------------------------------------------------------------------------*/
+static rc_t vdb_copy_cur_2_cur( const p_context ctx,
+                                const VCursor * src_cursor,
+                                VCursor * dst_cursor,
+                                const VSchema * schema,
+                                col_defs * columns,
+                                matcher * type_matcher,
+                                const char * tab_name )
+{
+    rc_t rc = col_defs_apply_casts( columns, type_matcher );
+    DISP_RC( rc, "vdb_copy_cur_2_cur:col_defs_apply_casts() failed" );
+    if ( rc == 0 )
+    {
+        rc = col_defs_add_to_wr_cursor( columns, dst_cursor, false );
+        DISP_RC( rc, "vdb_copy_cur_2_cur:col_defs_add_to_wr_cursor(dst) failed" );
+        if ( rc == 0 )
+        {
+            rc = VCursorOpen( dst_cursor );
+            DISP_RC( rc, "vdb_copy_cur_2_cur:VCursorOpen(dst) failed" );
+            if ( rc == 0 )
+            {
+                rc = col_defs_add_to_rd_cursor( columns, src_cursor, false );
+                DISP_RC( rc, "vdb_copy_cur_2_cur:col_defs_add_to_rd_cursor() failed" );
+                if ( rc == 0 )
+                {
+                    rc = VCursorOpen( src_cursor );
+                    DISP_RC( rc, "vdb_copy_cur_2_cur:VCursorOpen(src) failed" );
+                    if ( rc == 0 )
+                    {
+                        /* set the row-range in ctx to cover the whole table */
+                        rc = vdb_copy_set_range( ctx, src_cursor );
+                        DISP_RC( rc, "vdb_copy_cur_2_cur:vdb_copy_check_range(src) failed" );
+                        if ( rc == 0 )
+                        {
+                            /* it is ok to not find a filter-column: no error in this case */
+                            col_defs_detect_filter_col( columns,
+                                                        ctx->config.filter_col_name );
+
+                            /* it is ok to not find columns excluded from redacting: no error in this case */
+                            col_defs_unmark_do_not_redact_columns( columns,
+                                            ctx->config.do_not_redact_columns );
+
+                            if ( ctx->show_progress )
+                                KOutMsg( "copy of >%s<\n", tab_name );
+
+                            vdb_copy_find_filter_and_redact_columns( schema,
+                                                   columns, &(ctx->config), type_matcher );
+
+                            /**************************************************/
+                            rc = vdb_copy_row_loop( ctx, src_cursor, dst_cursor,
+                                                    columns, ctx->rvals );
+                            /**************************************************/
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+static rc_t vdb_copy_tab_2_tab( const p_context ctx,
+                                const VTable * src_tab,
+                                VTable * dst_tab,
+                                const char * tab_name )
+{
+    const VSchema * schema;
+    rc_t rc = VTableOpenSchema ( src_tab, &schema );
+    DISP_RC( rc, "vdb_copy_tab_2_tab:VTableOpenSchema( src_schema ) failed" );
+    if ( rc == 0 )
+    {
+        col_defs * columns;
+        rc = col_defs_init( &columns );
+        DISP_RC( rc, "vdb_copy_tab_2_tab:col_defs_init() failed" );
+        if ( rc == 0 )
+        {
+            rc = vdb_copy_find_out_what_columns_to_use( src_tab, tab_name, columns, 
+                                                        NULL, ctx->excluded_columns );
+            if ( rc == 0 )
+            {
+                matcher * type_matcher;
+                rc = matcher_init( &type_matcher );
+                if ( rc == 0 )
+                {
+                    char * column_names;
+                    rc = col_defs_as_string( columns, (char**)&column_names, true );
+                    if ( rc == 0 )
+                    {
+                        rc = matcher_db_execute( type_matcher, src_tab, dst_tab, schema,
+                                                 column_names, ctx->kfg_path );
+                        if ( rc == 0 )
+                        {
+                            const VCursor * src_cursor;
+                            if ( ctx->show_matching )
+                                matcher_report( type_matcher, false );
+                            rc = VTableCreateCursorRead( src_tab, &src_cursor );
+                            DISP_RC( rc, "vdb_copy_tab_2_tab:VTableCreateCursorRead(src) failed" );
+                            if ( rc == 0 )
+                            {
+                                rc = col_defs_mark_writable_columns( columns, dst_tab, false );
+                                DISP_RC( rc, "vdb_copy_tab_2_tab:col_defs_mark_writable_columns() failed" );
+                                if ( rc == 0 )
+                                {
+                                    VCursor * dst_cursor;
+                                    rc = VTableCreateCursorWrite( dst_tab, &dst_cursor, kcmInsert );
+                                    DISP_RC( rc, "vdb_copy_tab_2_tab:VTableCreateCursorWrite(dst) failed" );
+                                    if ( rc == 0 )
+                                    {
+                                        /*****************************************************/
+                                        rc = vdb_copy_cur_2_cur( ctx, src_cursor, dst_cursor,
+                                                                 schema, columns, type_matcher,
+                                                                 tab_name );
+                                        /*****************************************************/
+                                    }
+                                    VCursorRelease( dst_cursor );
+                                }
+                                VCursorRelease( src_cursor );
+                            }
+                        }
+                        free( column_names );
+                    }
+                    matcher_destroy( type_matcher );
+                }
+            }
+            col_defs_destroy( columns );
+        }
+        VSchemaRelease( schema );
+    }
+    return rc;
+}
+
+
+static rc_t vdb_copy_db_tab( const p_context ctx,
+                             const VDatabase * src_db,
+                             VDatabase * dst_db,
+                             const char *tab_name )
+{
+    const VTable * src_tab;
+    rc_t rc = VDatabaseOpenTableRead( src_db, &src_tab, "%s", tab_name );
+    DISP_RC( rc, "vdb_copy_db_tab:VDatabaseOpenTableRead(src) failed" );
+    if ( rc == 0 )
+    {
+        VTable * dst_tab;
+        KCreateMode cmode = helper_assemble_CreateMode( src_tab, 
+                            ctx->force_kcmInit, ctx->md5_mode );
+
+        rc = VDatabaseCreateTable ( dst_db, &dst_tab, tab_name, 
+                                    cmode, "%s", tab_name );
+        DISP_RC( rc, "vdb_copy_db_tab:VDatabaseCreateTable(dst) failed" );
+        if ( rc == 0 )
+        {
+            KChecksum cs_mode = helper_assemble_ChecksumMode( ctx->blob_checksum );
+            rc = VTableColumnCreateParams ( dst_tab, cmode, cs_mode, 0 );
+            DISP_RC( rc, "vdb_copy_db_tab:VTableColumnCreateParams failed" );
+            if ( rc == 0 )
+            {
+                rc = copy_table_meta( src_tab, dst_tab, 
+                                      ctx->config.meta_ignore_nodes, 
+                                      ctx->show_meta, false );
+                DISP_RC( rc, "vdb_copy_db_tab:copy_table_meta failed" );
+                if ( rc == 0 )
+                {
+                    /********************************************************/
+                    rc = vdb_copy_tab_2_tab( ctx, src_tab, dst_tab, tab_name );
+                    /********************************************************/
+                }
+            }
+            VTableRelease( dst_tab );
+        }
+        VTableRelease( src_tab );
+    }
+    return rc;
+}
+
+
+static rc_t vdb_copy_db_sub_tables( const p_context ctx,
+                                    const VDatabase * src_db,
+                                    VDatabase * dst_db )
+{
+    KNamelist *names;
+
+    rc_t rc = VDatabaseListTbl( src_db, &names );
+    if ( rc == 0 )
+    {
+        uint32_t idx, count;
+        rc = KNamelistCount( names, &count );
+        DISP_RC( rc, "vdb_copy_db_sub_tables:KNamelistCount failed" );
+        if ( rc == 0 )
+            for ( idx = 0; idx < count && rc == 0; ++idx )
+            {
+                const char *a_name;
+                rc = KNamelistGet( names, idx, &a_name );
+                DISP_RC( rc, "vdb_copy_db_sub_tables:KNamelistGet() failed" );
+                if ( rc == 0 )
+                {
+                    /**************************************************/
+                    rc = vdb_copy_db_tab( ctx, src_db, dst_db, a_name );
+                    /**************************************************/
+                }
+            }
+        KNamelistRelease( names );
+    }
+    else
+        rc = 0;
+    return rc;
+}
+
+
+/* forward decl. to make recursive copy of sub-databases possible */
+static rc_t vdb_copy_db_2_db( const p_context ctx,
+                              const VDatabase * src_db,
+                              VDatabase * dst_db );
+
+static rc_t vdb_copy_sub_dbs( const p_context ctx,
+                              const VDatabase * src_db,
+                              VDatabase * dst_db )
+{
+    KNamelist *names;
+
+    rc_t rc = VDatabaseListDB( src_db, &names );
+    if ( rc == 0 )
+    {
+        uint32_t idx, count;
+        rc = KNamelistCount( names, &count );
+        DISP_RC( rc, "vdb_copy_sub_dbs:KNamelistCount failed" );
+        if ( rc == 0 )
+        {
+            for ( idx = 0; idx < count && rc == 0; ++idx )
+            {
+                const char *a_name;
+                rc = KNamelistGet( names, idx, &a_name );
+                DISP_RC( rc, "vdb_copy_sub_dbs:KNamelistGet() failed" );
+                if ( rc == 0 )
+                {
+                    const VDatabase * src_sub_db;
+                    /* try to open the sub-database */
+                    rc = VDatabaseOpenDBRead ( src_db, &src_sub_db, "%s", a_name );
+                    DISP_RC( rc, "vdb_copy_sub_dbs:VDatabaseOpenDBRead() failed" );
+                    if ( rc == 0 )
+                    {
+                        char typespec[ TYPESPEC_BUF_LEN ];
+                        rc = VDatabaseTypespec ( src_sub_db, typespec, sizeof typespec );
+                        DISP_RC( rc, "vdb_copy_sub_dbs:VDatabaseTypespec( src ) failed" );
+                        if ( rc == 0 )
+                        {
+                            VDatabase * dst_sub_db;
+                            KCreateMode cmode = kcmInit | kcmParents;
+                            if ( ctx->md5_mode == MD5_MODE_ON )
+                                cmode |= kcmMD5;
+                            rc = VDatabaseCreateDB ( dst_db, &dst_sub_db,
+                                                     typespec, cmode, "%s", a_name );
+                            DISP_RC( rc, "vdb_copy_sub_dbs:VDBManagerCreateDB( dst ) failed" );
+                            if ( rc == 0 )
+                            {
+                                KChecksum cs_mode = helper_assemble_ChecksumMode( ctx->blob_checksum );
+                                rc = VDatabaseColumnCreateParams ( dst_db, cmode, cs_mode, 0 );
+                                DISP_RC( rc, "vdb_copy_sub_dbs:VDatabaseColumnCreateParams failed" );
+                                if ( rc == 0 )
+                                {
+                                    /**************************************************/
+                                    rc = vdb_copy_db_2_db( ctx, src_sub_db, dst_sub_db );
+                                    /**************************************************/
+                                }
+                                VDatabaseRelease( dst_sub_db );
+                            }
+                        }
+                        VDatabaseRelease( src_sub_db );
+                    }
+                }
+            }
+        }
+        KNamelistRelease( names );
+    }
+    else
+        rc = 0;
+
+    return rc;
+}
+
+
+static rc_t vdb_copy_db_2_db( const p_context ctx,
+                              const VDatabase * src_db,
+                              VDatabase * dst_db )
+{
+    rc_t rc = copy_database_meta ( src_db, dst_db, NULL, ctx->show_meta );
+    if ( rc == 0 )
+    {
+        if ( ctx->table == NULL )
+        {
+            /* the user did not specify a particular table: copy all of them */
+            /*************************************************/
+            rc = vdb_copy_db_sub_tables( ctx, src_db, dst_db );
+            /*************************************************/
+            if ( rc == 0 )
+            {
+                /* if the database has sub-databases: copy them too */
+                rc = vdb_copy_sub_dbs( ctx, src_db, dst_db );
+            }
+        }
+        else
+        {
+            /* copy only this table... */
+            rc = vdb_copy_db_tab( ctx, src_db, dst_db, ctx->table );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdb_copy_database( const p_context ctx,
+                               VDBManager * vdb_mgr,
+                               const VDatabase * src_db )
+{
+    char typespec[ TYPESPEC_BUF_LEN ];
+    rc_t rc = VDatabaseTypespec ( src_db, typespec, sizeof typespec );
+    DISP_RC( rc, "vdb_copy_database:VDatabaseTypespec( src ) failed" );
+    if ( rc == 0 )
+    {
+        const VSchema * schema;
+        rc = VDatabaseOpenSchema ( src_db, &schema );
+        DISP_RC( rc, "vdb_copy_database:VDatabaseOpenSchema( src ) failed" );
+        if ( rc == 0 )
+        {
+            VDatabase * dst_db;
+            KCreateMode cmode = kcmInit | kcmParents;
+            if ( ctx->md5_mode == MD5_MODE_ON )
+                cmode |= kcmMD5;
+            rc = VDBManagerCreateDB ( vdb_mgr, &dst_db, schema,
+                                      typespec, cmode, "%s", ctx->dst_path );
+            DISP_RC( rc, "vdb_copy_database:VDBManagerCreateDB( dst ) failed" );
+            if ( rc == 0 )
+            {
+                KChecksum cs_mode = helper_assemble_ChecksumMode( ctx->blob_checksum );
+                rc = VDatabaseColumnCreateParams ( dst_db, cmode, cs_mode, 0 );
+                DISP_RC( rc, "vdb_copy_sub_dbs:VDatabaseColumnCreateParams failed" );
+                if ( rc == 0 )
+                {
+                    /*******************************************/
+                    rc = vdb_copy_db_2_db( ctx, src_db, dst_db );
+                    /*******************************************/
+                }
+                VDatabaseRelease( dst_db );
+            }
+            VSchemaRelease( schema );
+        }
+    }
+    return rc;
+}
+
+
+/***************************************************************************
+    vdb_copy_perform:
+    * called by "vdb_copy_main()"
+    * makes the "default-schema"
+    * tests if the given source path is a database/table/none-of-that
+
+ctx        [IN] ... contains path, tablename, columns, row-range etc.
+vdb_mgr    [IN] ... contains the vdb-manger to create src/dst-objects
+***************************************************************************/
+static rc_t vdb_copy_perform( const p_context ctx,
+                              VDBManager * vdb_mgr )
+{
+    VSchema * dflt_schema;
+    rc_t rc = helper_parse_schema( vdb_mgr, &dflt_schema, ctx->src_schema_list );
+    DISP_RC( rc, "vdb_copy_main:helper_parse_schema(dflt) failed" );
+    if ( rc == 0 )
+    {
+        const VDatabase * src_db;
+        /* try to open it as a database */
+        rc = VDBManagerOpenDBRead ( vdb_mgr, &src_db, dflt_schema, "%s", ctx->src_path );
+        if ( rc == 0 )
+        {
+            /* if it succeeds it is a database, continue to copy it */
+            if ( DB_COPY_ENABLED == 1 )
+            {
+                /*********************************************/
+                rc = vdb_copy_database( ctx, vdb_mgr, src_db );
+                /*********************************************/
+                DISP_RC( rc, "vdb_copy_perform:vdb_copy_database() failed" );
+            }
+            else
+                LOGMSG( klogInfo, "a copy of a database is not implemented yet..." );
+            VDatabaseRelease( src_db );
+        }
+        else
+        {
+            const VTable * src_table;
+            /* try to open it as a table */
+            rc = VDBManagerOpenTableRead( vdb_mgr, &src_table,
+                                          dflt_schema, "%s", ctx->src_path );
+            /* if it succeeds it is a table, continue to copy it */
+            if ( rc == 0 )
+            {
+                /*********************************************/
+                rc = vdb_copy_table( ctx, vdb_mgr, src_table, NULL );
+                /*********************************************/
+                DISP_RC( rc, "vdb_copy_perform:vdb_copy_table() failed" );
+                VTableRelease( src_table );
+            }
+            else
+            {
+                rc = RC( rcVDB, rcNoTarg, rcCopying, rcItem, rcNotFound );
+                PLOGERR( klogInt, ( klogInt, rc,
+                         "\nthe path '$(path)' cannot be opened as vdb-database or vdb-table",
+                         "path=%s", ctx->src_path ));
+            }
+        }
+        VSchemaRelease( dflt_schema );
+    }
+    return rc;
+}
+
+
+/***************************************************************************
+    vdb_copy_main:
+    * called by "KMain()"
+    * make the "native directory"
+    * make a vdb-manager for write
+      all subsequent copy-functions will use this manager...
+    * check if the given path is database-path ( by trying to open it )
+      if it is one: continue wit copy_database()
+    * check if the given path is table-path ( by trying to open it )
+      if it is one: continue wit copy_table()
+    * release manager and directory
+
+ctx        [IN] ... contains path, tablename, columns, row-range etc.
+***************************************************************************/
+static rc_t vdb_copy_main( const p_context ctx )
+{
+    KDirectory * directory;
+    rc_t rc = KDirectoryNativeDir( &directory );
+    DISP_RC( rc, "vdb_copy_main:KDirectoryNativeDir() failed" );
+    if ( rc == 0 )
+    {
+        KConfig * config_mgr;
+
+#if TOOLS_USE_SRAPATH != 0
+        if ( !ctx->dont_check_accession )
+            ctx->dont_check_accession = helper_is_this_a_filesystem_path( ctx->src_path );
+        if ( !ctx->dont_check_accession )
+        {
+            rc_t rc1 = helper_resolve_accession( directory, (char**)&( ctx->src_path ) );
+            DISP_RC( rc1, "vdb_copy_main:helper_check_accession() failed" );
+        }
+#endif
+
+        rc = helper_make_config_mgr( &config_mgr, ctx->kfg_path );
+        DISP_RC( rc, "vdb_copy_main:helper_make_config_mgr() failed" );
+        if ( rc == 0 )
+        {
+            VDBManager * vdb_mgr;
+
+            helper_read_config_values( config_mgr, &(ctx->config) );
+            helper_read_redact_values( config_mgr, ctx->rvals );
+            KConfigRelease( config_mgr );
+
+            rc = VDBManagerMakeUpdate ( &vdb_mgr, directory );
+            DISP_RC( rc, "vdb_copy_main:VDBManagerMakeRead() failed" );
+            if ( rc == 0 )
+            {
+                /************************************/
+                rc = vdb_copy_perform( ctx, vdb_mgr );
+                /************************************/
+                VDBManagerRelease( vdb_mgr );
+            }
+        }
+        /* after that we can remove the output-path if necessary */
+        if ( rc != 0 && !ctx->dont_remove_target )
+            rc = helper_remove_path( directory, ctx->dst_path );
+
+        /* now we can release the directory */
+        KDirectoryRelease( directory );
+    }
+    return rc;
+}
+
+
+/***************************************************************************
+    Main:
+    * create the copy-context
+    * parse the commandline for arguments and options
+    * react to help/usage - requests ( no dump in this case )
+      these functions are in vdb-copy-context.c
+    * call copy_main() to execute the copy-operation
+    * destroy the copy-context
+***************************************************************************/
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args * args;
+    rc_t rc = ArgsMakeAndHandle ( &args, argc, argv, 1,
+                             MyOptions, sizeof MyOptions / sizeof ( OptDef ) );
+    DISP_RC( rc, "KMain:ArgsMakeAndHandle() failed" );
+    if ( rc == 0 )
+    {
+        context *ctx;
+        KLogHandlerSetStdErr();
+        rc = context_init( &ctx );
+        DISP_RC( rc, "KMain:copy_context_init() failed" );
+        if ( rc == 0 )
+        {
+            rc = context_capture_arguments_and_options( args, ctx );
+            DISP_RC( rc, "KMain:context_capture_arguments_and_options() failed" );
+            if ( rc == 0 )
+            {
+                if ( ctx->usage_requested ) {
+                    MiniUsage( args );
+                    rc = RC(rcApp, rcArgv, rcParsing, rcParam, rcInsufficient);
+                }
+                else
+                    /************************/
+                    rc = vdb_copy_main( ctx );
+                    /************************/
+            }
+            context_destroy ( ctx );
+        }
+        ArgsWhack ( args );
+    }
+    return rc;
+}
diff --git a/tools/vdb-copy/vdb-copy.kfg b/tools/vdb-copy/vdb-copy.kfg
new file mode 100644
index 0000000..e2a18fb
--- /dev/null
+++ b/tools/vdb-copy/vdb-copy.kfg
@@ -0,0 +1,94 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+# matching legacy-tables with schema's to write to for vdb-copy
+
+# ILLUMINA
+/VDBCOPY/NCBI_SRA_Illumina_tbl_v0a_1/schema = "sra/illumina.vschema"
+#/VDBCOPY/NCBI_SRA_Illumina_tbl_v0a_1/tab = "NCBI:SRA:Illumina:tbl:q4:v2"
+#/VDBCOPY/NCBI_SRA_Illumina_tbl_v0a_1/tab = "NCBI:SRA:Illumina:tbl:q1:v2"
+/VDBCOPY/NCBI_SRA_Illumina_tbl_v0a_1/tab = "NCBI:SRA:Illumina:tbl:phred:v2"
+/VDBCOPY/_ILLUMINA_/schema = "sra/illumina.vschema"
+/VDBCOPY/_ILLUMINA_/tab = "NCBI:SRA:Illumina:tbl:phred:v2"
+
+
+# _454_
+/VDBCOPY/NCBI_SRA__454__tbl_v0_1/schema = "sra/454.vschema"
+/VDBCOPY/NCBI_SRA__454__tbl_v0_1/tab = "NCBI:SRA:_454_:tbl:v2"
+/VDBCOPY/_454_/schema = "sra/454.vschema"
+/VDBCOPY/_454_/tab = "NCBI:SRA:_454_:tbl:v2"
+
+
+# ABSOLID
+/VDBCOPY/NCBI_SRA_ABI_tbl_v1_1/schema = "sra/abi.vschema"
+/VDBCOPY/NCBI_SRA_ABI_tbl_v1_1/tab = "NCBI:SRA:ABI:tbl:v2"
+/VDBCOPY/_ABSOLID_/schema = "sra/abi.vschema"
+/VDBCOPY/_ABSOLID_/tab = "NCBI:SRA:ABI:tbl:v2"
+
+
+# scoring of different schema-types for lossy-ness
+/VDBCOPY/SCORE/INSDC_2na_bin = "2"
+/VDBCOPY/SCORE/INSDC_x2na_bin = "1"
+/VDBCOPY/SCORE/INSDC_2na_packed = "2"
+/VDBCOPY/SCORE/INSDC_2cs_bin = "2"
+/VDBCOPY/SCORE/INSDC_x2cs_bin = "1"
+/VDBCOPY/SCORE/INSDC_2cs_packed = "2"
+/VDBCOPY/SCORE/INSDC_quality_phred = "1"
+/VDBCOPY/SCORE/INSDC_quality_log_odds = "1"
+/VDBCOPY/SCORE/INSDC_SRA_read_type = "1"
+
+# global vdb-copy-settings for filtering and redacting
+
+/VDBCOPY/READ_FILTER_COL_NAME = "READ_FILTER"
+
+# first redactable columns are detected by their type
+/VDBCOPY/REDACTABLE_TYPES = "INSDC:color:text,INSDC:x2cs:bin,INSDC:2cs:bin,INSDC:2cs:packed,INSDC:dna:text,INSDC:4na:bin,INSDC:4na:packed,INSDC:x2na:bin,INSDC:2na:bin,INSDC:2na:packed,NCBI:SRA:pos16,INSDC:quality:phred,INSDC:quality:log_odds,NCBI:qual4,INSDC:position:one,INSDC:position:zero,NCBI:fsamp4,NCBI:isamp1"
+
+# (1) specify a list of all types with redact-values other than zero
+#     key = "/VDBCOPY/REDACTVALUE/TYPES" ( ":" replaced by "_" )
+#
+# (2) specify for each type from (1) a redact-value
+#     key = /VDBCOPY/REDACTVALUE/xxxxxx/VALUE
+#     ( replace xxxxxx with one of the types from (1) )
+#     per default the value is one byte ( len = 1 )
+#     the format can be  - "'N'" for the ASCII-value of 'N'
+#                        OR
+#                        - "1" for the binary value of 1
+#                        OR
+#                        - "0x3A" for the binary value of 0x3A (58d)
+#
+# (2) specify for each type from (1) a redact-len (if it differs from 1 byte)
+#     key = /VDBCOPY/REDACTVALUE/xxxxxx/LEN
+#     ( replace xxxxxx with one of the types from (1) )
+#
+
+/VDBCOPY/REDACTVALUE/TYPES = "INSDC_color_text,INSDC_dna_text,NCBI_qual4"
+/VDBCOPY/REDACTVALUE/INSDC_color_text/VALUE = "'.'"
+/VDBCOPY/REDACTVALUE/INSDC_dna_text/VALUE = "'N'"
+/VDBCOPY/REDACTVALUE/NCBI_qual4/VALUE = "-6"
+
+/VDBCOPY/DO_NOT_REDACT = "CS_KEY,FLOW_CHARS,KEY_SEQUENCE,LINKER_SEQUENCE"
+
+# what root-nodes not to copy while copying metadata
+/VDBCOPY/META/IGNORE = "col,.seq,STATS,BASE_COUNT,HUFFMAN_TREE_POS,HUFFMAN_TREE_POS_SIZE,HUFFMAN_TREE_PRB,HUFFMAN_TREE_PRB_SIZE,HUFFMAN_TREE_SIG,HUFFMAN_TREE_SIG_SIZE,MSC454_CLIP_QUALITY_LEFT,MSC454_CLIP_QUALITY_RIGHT,MSC454_FLOW_CHARS,MSC454_KEY_SEQUENCE,NREADS,NUMBER_POS_CHANNELS,NUMBER_PRB_CHANNELS_1,NUMBER_PRB_COLUMNS,NUMBER_SIG_CHANNELS,PLATFORM,READ_0,READ_1,SPOT_COUNT"
diff --git a/tools/vdb-decrypt/Makefile b/tools/vdb-decrypt/Makefile
new file mode 100644
index 0000000..7651897
--- /dev/null
+++ b/tools/vdb-decrypt/Makefile
@@ -0,0 +1,102 @@
+# ==============================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+USE_GCC_IF_ICC = 1
+
+TOP ?= $(abspath ../..)
+MODULE = tools/vdb-decrypt
+
+INT_TOOLS =
+
+EXT_TOOLS = \
+	vdb-decrypt \
+	vdb-encrypt
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# vdb-decrypt
+#  Copy files from one directory to another while cataloging the contents.
+#  XML files can be redirected as well.
+#
+VDB_DECRYPT_SRC = \
+	vdb-decrypt \
+	shared
+
+VDB_DECRYPT_OBJ = \
+	$(addsuffix .$(OBJX),$(VDB_DECRYPT_SRC))
+
+VDB_DECRYPT_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb
+
+$(BINDIR)/vdb-decrypt: $(VDB_DECRYPT_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(VDB_DECRYPT_LIB)
+
+#-------------------------------------------------------------------------------
+# vdb-encrypt
+#  Copy files from one directory to another while cataloging the contents.
+#  XML files can be redirected as well.
+#
+VDB_ENCRYPT_SRC = \
+	vdb-encrypt \
+	shared
+
+VDB_ENCRYPT_OBJ = \
+	$(addsuffix .$(OBJX),$(VDB_ENCRYPT_SRC))
+
+VDB_ENCRYPT_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb
+
+$(BINDIR)/vdb-encrypt: $(VDB_ENCRYPT_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(VDB_ENCRYPT_LIB)
+
diff --git a/tools/vdb-decrypt/shared.c b/tools/vdb-decrypt/shared.c
new file mode 100644
index 0000000..01545dd
--- /dev/null
+++ b/tools/vdb-decrypt/shared.c
@@ -0,0 +1,1271 @@
+/*==============================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include "shared.h"
+
+#include <klib/defs.h>
+#include <klib/callconv.h>
+
+#include <klib/rc.h>
+#include <klib/out.h>
+#include <klib/status.h>
+#include <klib/log.h>
+#include <klib/debug.h> /* DBGMSG */
+#include <klib/status.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <klib/namelist.h>
+
+#include <kfs/defs.h>
+#include <kfs/file.h>
+#include <kfs/directory.h>
+#include <kfs/sra.h>
+#include <kfs/lockfile.h>
+#include <kfs/cacheteefile.h>
+#include <kfs/buffile.h>
+#include <vfs/manager.h>
+
+#include <krypto/key.h>
+#include <krypto/encfile.h>
+#include <krypto/wgaencrypt.h>
+
+#include <kapp/args.h>
+#include <kapp/main.h>
+
+#include <assert.h>
+#include <string.h>
+#include <stdint.h>
+
+#ifndef RIGOROUS_SRA_CHECK
+#define RIGOROUS_SRA_CHECK 0
+#endif
+
+#define OPTION_FORCE   "force"
+#define OPTION_SRA     "decrypt-sra-files"
+#define ALIAS_FORCE    "f"
+#define ALIAS_SRA      NULL
+
+#define MY_MAX_PATH        4096
+
+
+bool ForceFlag = false;
+bool TmpFoundFlag = false;
+bool UseStdin = false;
+bool UseStdout = false;
+bool IsArchive = false;
+
+/* for wga decrypt */
+char Password [4096 + 2];
+size_t PasswordSize;
+
+/* for encfile encrypt/decrypt */
+KKey Key;
+
+const char * ForceUsage[] = 
+{ "Force overwrite of existing files", NULL };
+
+/*
+ * option  control flags
+ */
+
+const char EncExt[] = ".ncbi_enc";
+static const char TmpExt[] = ".vdb-decrypt-tmp";
+static const char TmpLockExt[] = ".vdb-decrypt-tmp.lock";
+static const char CacheExt[] = ".cache";
+static const char CacheLockExt[] = ".cache.lock";
+
+/* Usage
+ */
+rc_t CC UsageSummary (const char * progname)
+{
+    rc_t rc;
+    {
+        rc = KOutMsg (
+            /*345679012345678901234567890123456789012345678901234567890123456789012345678*/
+            "\n"
+            "Usage:\n"
+            "  %s [options] <source-file>\n"
+            "  %s [options] <source-file> <destination-file>\n"
+            "  %s [options] <source-file> <destination-directory>\n"
+            "  %s [options] <directory>\n",
+            progname, progname, progname, progname);
+    }
+#if DIRECTORY_TO_DIRECTORY_SUPPORTED
+    if (rc == 0)
+        rc = KOutMsg (
+            "  %s [options] <source-directory> <destination-directory>\n",
+            progname);
+#endif
+        if (rc == 0)
+    {
+        rc = KOutMsg (
+            "\n"
+            "Summary:\n"
+            "  %scrypt a file or all the files (recursively) in a directory\n\n",
+            De);
+    }
+    return rc;
+}
+
+rc_t CC Usage (const Args * args)
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    const char * pline[] = {
+        "file to encrypt", NULL,
+        "name of resulting file", NULL,
+        "directory of resulting file", NULL,
+        "directory to encrypt", NULL
+    };
+
+    rc_t rc, orc;
+
+    /* super-fragilistic molti-hacki-docious
+       let's find a better way to reuse things. */
+    if ( de [ 0 ] == 'd' )
+    {
+        pline [ 0 ] = "file to decrypt";
+        pline [ 6 ] = "directory to decrypt";
+    }
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+
+    orc = UsageSummary (progname);
+    if (rc == 0)
+        rc = orc;
+
+    KOutMsg ("Parameters:\n");
+    HelpParamLine ("source-file"          , pline);
+    HelpParamLine ("destination-file"     , pline + 2);
+    HelpParamLine ("destination-directory", pline + 4);
+    HelpParamLine ("directory"            , pline + 6);
+    KOutMsg ("\nOptions:\n");
+    HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, ForceUsage);
+    CryptOptionLines ();
+    HelpOptionsStandard ();
+
+    /* forcing editor alignment */
+    /*   12345678901234567890123456789012345678901234567890123456789012345678901234567890*/
+    KOutMsg (
+        "\n"
+        "Details:\n"
+        "  All %scryptions are non-destructive until successful. No files are deleted or\n"
+        "  replaced until the %scryptions are complete.\n"
+        "\n", de, de);
+
+    KOutMsg (
+        "  The extension '.ncbi_enc' will be %s when a file is %scrypted.\n"
+        "\n", Decrypting ? "removed" : "added", de);
+
+    if (Decrypting) KOutMsg (
+        "  NCBI Archive files that contain NCBI database objects will not be decrypted\n"
+        "  unless the %s option is used. As these objects can be used without\n"
+        "  decryption it is recommended they remain encrypted.\n"
+        "\n", OPTION_SRA);
+    else KOutMsg (
+        "  NCBI Archive files that contain NCBI database objects will not have the\n"
+        "  .ncbi_enc extension added.\n\n");
+
+
+    KOutMsg (
+        "  If the only parameter is a file name then it will be replaced by a file that\n"
+        "  is %scrypted with a possible changed extension.\n"
+        "  \n", de);
+
+    KOutMsg (
+        "  If the only parameter is a directory, all files in that directory including\n"
+        "  all files in subdirectories will be replaced with a possible change\n"
+        "  in the extension.\n"
+        "\n");
+
+    KOutMsg (
+        "  If there are two parameters  a copy is made but the copy will be %scrypted.\n"
+        "  If the second parameter is a directory the new file might have a different\n"
+        "  extension. If it is not a directory, the extension will be as given in the\n"
+        "  the parameter.\n"
+        "\n", de);
+
+    KOutMsg (
+        "  Missing directories in the destination path will be created.\n"
+        "\n");
+
+    KOutMsg (
+        "  Already existing destination files will cause the program to end with\n"
+        "  an error and will be left unchanged unless the --%s option is used to\n"
+        "  force the files to be overwritten.\n"
+        "\n", OPTION_FORCE);
+
+    KOutMsg (
+        "Encryption key (file password):\n"
+        "  The encryption key or file password is handled by configuration. If not yet\n"
+        "  set, this program will fail.\n\n"
+        "  Please consult configuration page at\n"
+        "  http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=toolkit_doc&f=std or\n"
+        "  https://github.com/ncbi/sra-tools/wiki/Toolkit-Configuration\n"        
+        );
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+
+
+
+
+/*
+ * determine the archive type for KFile f with pathname name
+ *
+ * This could be extended to handle tar files with a larger head size and
+ * and some less simple checks for a tar header block at the start of
+ * the file.
+ */
+ArcScheme ArchiveTypeCheck (const KFile * f)
+{
+    size_t num_read;
+    rc_t rc;
+    char head [128];
+
+    IsArchive = false;
+    rc = KFileReadAll (f, 0, head, sizeof head, &num_read);
+    if (rc)
+    {
+        LOGERR (klogErr, rc, "Unable to read head of decrypted file");
+        return arcError;
+    }
+
+    rc = KFileIsSRA (head, num_read);
+    if (rc == 0)
+    {
+
+/*         OUTMSG (("+++++ ARCHIVE\n")); */
+
+
+        /* a hack... */
+
+        IsArchive = true;
+        return arcSRAFile;
+    }
+/*     OUTMSG (("----- not an archive\n")); */
+    return arcNone;
+}
+
+
+/*
+ * Copy a file from a const KFile * to a KFile * with the paths for the two
+ * for logging purposes
+ *
+ * return rc_t = 0 for success
+ * return rc_t != 0 for failure
+ */
+rc_t CopyKFile (const KFile * src, KFile * dst, const char * source, const char * dest)
+{
+    rc_t rc;
+    uint8_t	buff	[256 * 1024];
+    size_t	num_read;
+    size_t      num_writ;
+    uint64_t	pos;
+
+    for (pos = 0; ; pos += num_read)
+    {
+        rc = Quitting ();
+        if (rc)
+        {
+            LOGMSG (klogFatal, "Received quit");
+            break;
+        }
+
+        rc = KFileReadAll (src, pos, buff, sizeof (buff), &num_read);
+        if (rc)
+        {
+            PLOGERR (klogErr,
+                     (klogErr, rc,
+                      "Failed to read from file $(F) at $(P)",
+                      "F=%s,P=%lu", source, pos));
+            break;
+        }
+        
+        if (num_read == 0)
+            break;
+
+        rc = KFileWriteAll (dst, pos, buff, num_read, &num_writ);
+        if (rc)
+        {
+            PLOGERR (klogErr,
+                     (klogErr, rc,
+                      "Failed to write to file $(F) at $(P)",
+                      "F=%s,P=%lu", dest, pos));
+            break;
+        }
+        
+        if (num_writ != num_read)
+        {
+            rc = RC (rcExe, rcFile, rcWriting, rcFile, rcInsufficient);
+            PLOGERR (klogErr,
+                     (klogErr, rc,
+                      "Failed to write all to file $(F) at $(P)",
+                      "F=%s,P=%lu", dest, pos));
+            break;
+        }
+    }
+    return rc;
+}
+
+
+/*
+ * determine the encryption type for KFile f with pathname name
+ */
+rc_t EncryptionTypeCheck (const KFile * f, const char * name, EncScheme * scheme)
+{
+    size_t num_read;
+    rc_t rc;
+    char head [128];
+
+    assert (f != NULL);
+    assert (name != NULL);
+
+    rc = KFileReadAll (f, 0, head, sizeof head, &num_read);
+    if (rc)
+    {
+        PLOGERR (klogErr, (klogErr, rc, "Unable to read head of "
+                           "'$(F)'", "F=%s", name));
+        *scheme = encError;
+        return rc;
+    }
+    
+    /* looks for files with NCBInenc or NCBIsenc signatures */
+    rc = KFileIsEnc (head, num_read);
+    if (rc == 0)
+    {
+            /* looks for files with just NCBIsenc signatures */
+        rc = KFileIsSraEnc (head, num_read);
+
+        *scheme = (rc == 0) ? encSraEncFile : encEncFile;
+    }
+    else
+    {
+        rc = KFileIsWGAEnc (head, num_read);
+        if (rc == 0)
+            *scheme = encWGAEncFile;
+        else
+            *scheme = encNone;
+    }
+    return 0;
+}
+
+
+/*
+ * Check a file path name for ending in the extension used by this program
+ *
+ * return true if it ends with the extension and false if it does not
+ */
+static
+bool IsTmpFile (const char * path)
+{
+    const char * pc;
+
+    pc = strrchr (path, '.');
+    if (pc == NULL)
+        return false;
+
+    if (strcmp (pc, TmpExt) == 0)
+        return true;
+
+    pc = string_chr (path, pc - path, '.');
+    if (pc == NULL)
+        return false;
+
+    return (strcmp (pc, TmpLockExt) == 0);
+}
+
+#if 0
+static
+bool IsCacheFile (const char * path)
+{
+    const char * pc;
+
+    pc = strrchr (path, '.');
+    if (pc == NULL)
+        return false;
+
+    if (strcmp (pc, CacheExt) == 0)
+        return true;
+
+    pc = string_chr (path, pc - path, '.');
+    if (pc == NULL)
+        return false;
+
+    return (strcmp (pc, CacheLockExt) == 0);
+}
+#endif
+
+static
+rc_t FileInPlace (KDirectory * cwd, const char * leaf, bool try_rename)
+{
+    rc_t rc;
+    bool is_tmp;
+
+    STSMSG (1, ("%scrypting file in place %s",De,leaf));
+
+    rc = 0;
+    is_tmp = IsTmpFile (leaf);
+    if (is_tmp)
+    {
+        STSMSG (1, ("%s is a vdb-decrypt/vdb-encrypt temporary file and will "
+                    "be ignored", leaf));
+        TmpFoundFlag = true;
+        if (ForceFlag)
+            ; /* LOG OVERWRITE */
+        else
+            ; /* LOG TMP */
+    }
+    if (!is_tmp || ForceFlag)
+    {
+        char temp [MY_MAX_PATH];
+
+
+        rc = KDirectoryResolvePath (cwd, false, temp, sizeof temp, ".%s%s",
+                                    leaf, TmpExt);
+
+        if (rc)
+            PLOGERR (klogErr, (klogErr, rc, "unable to resolve '.$(S)$(E)'",
+                               "S=%s,E=%s",leaf,TmpExt));
+        else
+        {
+            KPathType kpt;
+            uint32_t kcm;
+
+            kcm = kcmCreate|kcmParents;
+            kpt = KDirectoryPathType (cwd, "%s", temp);
+            if (kpt != kptNotFound)
+            {
+                /* log busy */
+                if (ForceFlag)
+                {
+                    kcm = kcmInit|kcmParents;
+                    /* log force */
+                    kpt = kptNotFound;
+                }
+            }
+
+            if (kpt == kptNotFound)
+            {
+                const KFile * infile;
+
+                rc = KDirectoryOpenFileRead (cwd, &infile, "%s", leaf);
+                if (rc)
+                    PLOGERR (klogErr, (klogErr, rc, "Unable to resolve '$(F)'",
+                                       "F=%s",leaf));
+                else
+                {
+                    uint64_t fz;
+                    size_t z;
+                    rc_t irc;
+                    uint64_t ignored;
+
+                    rc = KFileSize (infile, &fz);
+                    /* ignore rc for now? yes hack */
+                    z = string_size (leaf);
+
+                    /* vdb-decrypt and vdb-encrypt both ignore repository cache files. */
+                    irc = GetCacheTruncatedSize (infile, &ignored);
+                    if (irc == 0)
+                        STSMSG (1, ("skipping cache download file %s", leaf));
+                    else if ((fz == 0) &&
+                             (string_cmp (leaf + (z - (sizeof (".lock")-1)), sizeof (".lock"),
+                                          ".lock", sizeof (".lock") , sizeof (".lock")) == 0))
+                        STSMSG (1, ("skipping cache lock download file %s", leaf));
+                    else
+                    {
+                        EncScheme scheme;
+
+                        rc = EncryptionTypeCheck (infile, leaf, &scheme);
+                        if (rc == 0)
+                        {
+                            ArcScheme ascheme;
+                            bool changed;
+                            bool do_this_file;
+                            char new_name [MY_MAX_PATH + sizeof EncExt];
+
+                            do_this_file = DoThisFile (infile, scheme, &ascheme);
+                            strcpy (new_name, leaf);
+                            if (try_rename && do_this_file)
+                                changed = NameFixUp (new_name);
+                            else
+                                changed = false;
+/*                         KOutMsg ("### %d \n", changed); */
+
+                            if (!do_this_file)
+                            {
+                                if (changed)
+                                {
+                                    STSMSG (1, ("renaming %s to %s", leaf, new_name));
+                                    rc = KDirectoryRename (cwd, false, leaf, new_name);
+                                }
+                                else
+                                    STSMSG (1, ("skipping %s",leaf));
+                            }
+                            else
+                            {
+                                KFile * outfile;
+
+                                rc = KDirectoryCreateExclusiveAccessFile (cwd, &outfile,
+                                                                          false, 0600, kcm,
+                                                                          "%s", temp);
+                                if (rc == 0)
+                                {
+                                    const KFile * Infile;
+                                    KFile * Outfile;
+
+                                    rc = CryptFile (infile, &Infile, outfile, &Outfile, scheme);
+
+                                    if (rc == 0)
+                                    {
+                                        STSMSG (1, ("copying %s to %s", leaf, temp));
+
+                                        rc = CopyKFile (Infile, Outfile, leaf, temp);
+
+                                        if (rc == 0)
+                                        {
+                                            uint32_t access;
+                                            KTime_t date;
+
+                                            rc = KDirectoryAccess (cwd, &access, "%s", leaf);
+                                            if (rc == 0)
+                                                rc = KDirectoryDate (cwd, &date, "%s", leaf);
+
+                                            KFileRelease (infile);
+                                            KFileRelease (outfile);
+                                            KFileRelease (Infile);
+                                            KFileRelease (Outfile);
+
+                                            if (rc == 0)
+                                            {
+                                                STSMSG (1, ("renaming %s to %s", temp, new_name));
+
+                                                rc = KDirectoryRename (cwd, true, temp, new_name);
+                                                if (rc)
+                                                    LOGERR (klogErr, rc, "error renaming");
+                                                else
+                                                {
+                                                    if (changed)
+                                                        KDirectoryRemove (cwd, false, "%s", leaf);
+
+                                                    /*rc =*/
+                                                    KDirectorySetAccess (cwd, false, access,
+                                                                         0777, "%s", new_name);
+                                                    KDirectorySetDate (cwd, false, date, "%s", new_name);
+                                                    /* gonna ignore an error here I think */
+                                                    return rc;
+                                                }
+                                            }
+                                        }
+                                    }
+                                    KFileRelease (outfile);
+                                }
+                            }
+                        }
+                    }
+                    KFileRelease (infile);
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static
+rc_t FileToFile (const KDirectory * sd, const char * source, 
+                 KDirectory *dd, const char * dest_, bool try_rename,
+                 char * base)
+{
+    const KFile * infile;
+    rc_t rc;
+    uint32_t access;
+    KTime_t date;
+    bool is_tmp;
+    char dest [MY_MAX_PATH + sizeof EncExt];
+
+    strcpy (dest, dest_);
+    if (try_rename)
+        NameFixUp (dest);
+
+    if ((sd == dd) && (strcmp (source, dest) == 0))
+        return FileInPlace (dd, dest, try_rename);
+
+    if (base == NULL)
+        STSMSG (1, ("%scrypting file %s to %s", De, source, dest));
+    else
+        STSMSG (1, ("%scrypting file %s to %s/%s", De, source, base, dest));
+
+    /*
+     * A Hack to make stdin/stout work within KFS
+     */
+    if (UseStdin)
+    {
+        const KFile * iinfile;
+        rc = KFileMakeStdIn (&iinfile);
+        if (rc == 0)
+        {
+            rc = KBufReadFileMakeRead (&infile, iinfile, 64 * 1024);
+            KFileRelease (iinfile);
+            if (rc == 0)
+            {
+                access = 0640;
+                date = 0;
+                goto stdin_shortcut;
+            }
+            LOGERR (klogErr, rc, "error wrapping stdin");
+            return rc;
+        }
+    }
+    rc = 0;
+    is_tmp = IsTmpFile (source);
+
+    if (is_tmp)
+    {
+        TmpFoundFlag = true;
+        if (ForceFlag)
+            ; /* LOG OVERWRITE */
+        else
+                ; /* LOG TMP */
+    }
+    if (!is_tmp || ForceFlag)
+    {
+        rc = KDirectoryAccess (sd, &access, "%s", source);
+        if (rc)
+            LOGERR (klogErr, rc, "Error check permission of source");
+
+        else
+        {
+            rc = KDirectoryDate (sd, &date, "%s", source);
+            if (rc)
+                LOGERR (klogErr, rc, "Error check date of source");
+
+            else
+            {
+                rc = KDirectoryOpenFileRead (sd, &infile, "%s", source);
+                if (rc)
+                    PLOGERR (klogErr, (klogErr, rc,
+                                       "Error opening source file '$(S)'",
+                                       "S=%s", source));
+                else
+                {
+                    EncScheme scheme;
+
+                stdin_shortcut:
+                    rc = EncryptionTypeCheck (infile, source, &scheme);
+                    if (rc == 0)
+                    {
+                        KFile * outfile;
+                        uint32_t kcm;
+
+                        /*
+                         * Hack to support stdout before VFS is complete enough to use here
+                         */
+                        if (UseStdout)
+                        {
+                            rc = KFileMakeStdOut (&outfile);
+                            if (rc)
+                                LOGERR (klogErr, rc, "error wrapping stdout");
+                        }
+                        else
+                        {
+                            kcm = ForceFlag ? kcmInit|kcmParents : kcmCreate|kcmParents;
+
+                            rc = KDirectoryCreateFile (dd, &outfile, false, 0600, kcm, "%s", dest);
+                            if (rc)
+                                PLOGERR (klogErr,(klogErr, rc, "error opening output '$(O)'",
+                                                  "O=%s", dest));
+                        }
+                        if (rc == 0)
+                        {
+                            const KFile * Infile;
+                            KFile * Outfile;
+
+                            rc = CryptFile (infile, &Infile, outfile, &Outfile, scheme);
+                            if (rc == 0)
+                            {
+                                rc = CopyKFile (Infile, Outfile, source, dest);
+                                if (rc == 0)
+                                {
+                                    if (UseStdin || UseStdout)
+                                        ;
+                                    else
+                                    {
+                                        rc = KDirectorySetAccess (dd, false, access, 0777,
+                                                                  "%s", dest);
+
+                                        if (rc == 0 && date != 0)
+                                            rc = KDirectorySetDate (dd, false, date, "%s", dest);
+                                    }
+                                }
+                                KFileRelease (Infile);
+                                KFileRelease (Outfile);
+                            }
+                            KFileRelease (outfile);
+                        }
+                    }
+                    KFileRelease (infile);
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static
+rc_t DoDir (const KDirectory * sd, KDirectory * dd)
+{
+    KNamelist * names;
+    rc_t rc;
+
+    rc = KDirectoryList (sd, &names, NULL, NULL, ".");
+    if (rc)
+        ;
+    else
+    {
+        uint32_t count;
+
+        rc = KNamelistCount (names, &count);
+        if (rc)
+            ;
+        else
+        {
+            uint32_t idx;
+
+            for (idx = 0; idx < count; ++idx)
+            {
+                const char * name;
+
+                rc = KNamelistGet (names, idx, &name);
+                if (rc)
+                    ;
+                else
+                {
+                    const KDirectory * nsd;
+                    KDirectory * ndd;
+                    KPathType kpt;
+
+                    kpt = KDirectoryPathType (sd, "%s", name);
+
+                    switch (kpt)
+                    {
+                    default:
+                        break;
+
+                    case kptFile:
+                        if (sd == dd)
+                            rc = FileInPlace (dd, name, true);
+                        else
+                            rc = FileToFile (sd, name, dd, name, true, NULL);
+                        break;
+
+                    case kptDir:
+                        if (sd == dd)
+                        {
+                            rc = KDirectoryOpenDirUpdate (dd, &ndd, false, "%s", name);
+                            if (rc)
+                                ;
+                            else
+                            {
+                                /* RECURSION */
+                                STSMSG (1, ("%scrypting directory %s", De, name));
+                                rc = DoDir (ndd, ndd);
+                                STSMSG (1, ("done with directory %s", name));
+                                KDirectoryRelease (ndd);
+                            }
+                        }
+                        else
+                        {
+                            rc = KDirectoryOpenDirRead (sd, &nsd, false, "%s", name);
+                            if (rc)
+                                ;
+                            else
+                            {
+                                rc = KDirectoryCreateDir (dd, 0600, kcmOpen, "%s", name);
+                                if (rc)
+                                    ;
+                                else
+                                {                                    
+                                    rc = KDirectoryOpenDirUpdate (dd, &ndd, false, "%s", name);
+                                    if (rc)
+                                        ;
+                                    else
+                                    {
+                                        /* RECURSION */
+                                        STSMSG (1, ("%scrypting directory %s", De, name));
+                                        rc = DoDir (nsd, ndd);
+                                        STSMSG (1, ("done with directory %s", name));
+
+                                        KDirectoryRelease (ndd);
+                                    }
+                                }
+                                KDirectoryRelease (nsd);
+                            }
+                        }
+                        break;
+                    }
+                }
+            }
+        }
+        KNamelistRelease (names);
+    }
+    return rc;
+}
+
+
+static
+rc_t Start (KDirectory * cwd, const char * src, const char * dst)
+{
+    KPathType dtype;
+    KPathType stype;
+    char dpath [MY_MAX_PATH];
+    char spath [MY_MAX_PATH];
+    rc_t rc;
+    bool using_stdin, using_stdout, try_rename;
+
+    /* limited anti oops checks */
+    try_rename = (dst == NULL);
+    if (!try_rename)
+    {
+        /* try to prevent file to file clash */
+        if (strcmp (src,dst) == 0)
+            dst = NULL;
+
+        /* try to prevent file to dir clash */
+        else
+        {
+            size_t s,d;
+
+            s = string_size (src);
+            d = string_size (dst);
+
+            if (s > d)
+            {
+                if (string_cmp (src, s, dst, d, d) == 0)
+                {
+                    if ((strchr (src+d+1, '/') == NULL) &&
+                        ((src[d] == '/') ||
+                         (src[d-1] == '/')))
+                    {
+                        try_rename = true;
+                        dst = NULL;
+                    }
+                }
+            }
+        }
+    }
+
+    /*
+     * This is a quick fix "hack"
+     * A fully built out VFS should replace the KFS in use and eliminate this
+     */
+    using_stdin = (strcmp (src, "/dev/stdin") == 0);
+
+    if (using_stdin)
+    {
+        if (dst == NULL)
+        {
+            rc = RC (rcExe, rcArgv, rcParsing, rcParam, rcNull);
+            LOGERR (klogErr, rc, "Unable to handle stdin in place");
+            return rc;
+        }
+        stype = kptFile;
+        strcpy (spath, src);
+        UseStdin = true;
+        STSMSG (1, ("reading console / stdin as input"));
+        goto stdin_shortcut;
+    }
+
+    rc = KDirectoryResolvePath (cwd, false, spath, sizeof spath, "%s", src);
+    if (rc)
+    {
+        LOGERR (klogErr, rc, "can't resolve source");
+        return rc;
+    }
+
+    stype = KDirectoryPathType (cwd, "%s", spath) & ~ kptAlias;
+
+    switch (stype)
+    {
+    case kptNotFound:
+        rc = RC (rcExe, rcArgv, rcResolving, rcPath, rcNotFound);
+        break;
+
+    default:
+    case kptBadPath:
+        rc = RC (rcExe, rcArgv, rcResolving, rcPath, rcInvalid);
+        break;
+
+    case kptCharDev:
+    case kptBlockDev:
+    case kptFIFO:
+    case kptZombieFile:
+    case kptDataset:
+    case kptDatatype:
+        rc = RC (rcExe, rcArgv, rcResolving, rcPath, rcIncorrect);
+        break;
+
+    case kptFile:
+    case kptDir:
+        break;
+    }
+    if (rc)
+    {
+        PLOGERR (klogErr, (klogErr, rc, "can not use source '$(S)'", "S=%s", src));
+        return rc;
+    }
+
+    /*
+     * In Place Operation
+     */
+    if (dst == NULL)
+    {
+
+        /*
+         * Input is a file
+         */
+        if (stype == kptFile)
+        {
+            KDirectory * ndir;
+            char * pc;
+
+            pc = strrchr (spath, '/');
+            if (pc == NULL)
+            {
+                pc = spath;
+                ndir = cwd;
+                rc = KDirectoryAddRef (cwd);
+            }
+            else if (pc == spath)
+            {
+                ++pc;
+                ndir = cwd;
+                rc = KDirectoryAddRef (cwd);
+            }
+            else
+            {
+                *pc++ = '\0';
+                rc = KDirectoryOpenDirUpdate (cwd, &ndir, false, "%s", spath);
+            }
+
+            if (rc == 0)
+            {
+                rc = FileInPlace (ndir, pc, try_rename);
+                KDirectoryRelease (ndir);
+            }
+        }
+        /*
+         * Input is a directory
+         */
+        else
+        {
+            KDirectory * ndir;
+
+            rc = KDirectoryOpenDirUpdate (cwd, &ndir, false, "%s", spath);
+            if (rc)
+                ;
+            else
+            {
+                STSMSG (1, ("%scrypting directory %s", De, spath));
+                rc = DoDir (ndir, ndir);
+                STSMSG (1, ("done with directory %s", spath));
+                KDirectoryRelease (ndir);
+            }
+        }
+    }
+
+    /*
+     * 'Copy' Operation
+     */
+    else
+    {
+    stdin_shortcut:
+        using_stdout = (strcmp (dst, "/dev/stdout") == 0);
+        if (using_stdout == true)
+        {
+            dtype = kptFile;
+            strcpy (dpath, dst);
+            UseStdout = true;
+            STSMSG (1, ("writing console / stdout as output"));
+            goto do_file;
+        }
+        rc = KDirectoryResolvePath (cwd, false, dpath, sizeof dpath, "%s", dst);
+        if (rc)
+        {
+            LOGERR (klogErr, rc, "can't resolve destination");
+            return rc;
+        }
+        dtype = KDirectoryPathType (cwd, "%s", dpath) & ~ kptAlias;
+        switch (dtype)
+        {
+        default:
+        case kptBadPath:
+            rc = RC (rcExe, rcArgv, rcResolving, rcPath, rcInvalid);
+            PLOGERR (klogErr, (klogErr, rc, "can not use destination  '$(S)'", "S=%s", dst));
+            break;
+
+        case kptCharDev:
+        case kptBlockDev:
+        case kptFIFO:
+        case kptZombieFile:
+        case kptDataset:
+        case kptDatatype:
+            rc = RC (rcExe, rcArgv, rcResolving, rcPath, rcIncorrect);
+            PLOGERR (klogErr, (klogErr, rc, "can not use destination parameter '$(S)'", "S=%s", dst));
+            break;
+
+        case kptNotFound:
+        {
+            size_t z;
+
+            z = strlen (dst) - 1;
+            if ((dst[z] == '/') || (stype == kptDir))
+                goto do_dir;
+            else
+                goto do_file;
+        }
+
+        case kptFile:
+            if (!ForceFlag)
+            {
+                rc = RC (rcExe, rcArgv, rcParsing, rcFile, rcExists);
+                PLOGERR (klogErr, (klogErr, rc, "can not over-write '$(F)' without --force",
+                                   "F=%s", dpath));
+                break;
+            }
+        do_file:
+            if (stype == kptFile)
+            {
+                rc = FileToFile (cwd, spath, cwd, dpath, try_rename, NULL);
+            }
+            else
+            {
+                rc = RC (rcExe, rcArgv, rcResolving, rcPath, rcIncorrect);
+                LOGERR (klogErr, rc, "Can't do directory to file");
+            }
+            break;
+
+        do_dir:
+        case kptDir:
+            /*
+             * Input is a directory
+             */
+            if (stype == kptDir)
+            {
+#if DIRECTORY_TO_DIRECTORY_SUPPORTED
+                const KDirectory * sdir;
+                KDirectory * ddir;
+
+                rc = KDirectoryOpenDirRead (cwd, &sdir, false, "%s", spath);
+                if (rc)
+                    ;
+                else
+                {
+                    if (dtype == kptNotFound)
+                    {
+                        STSMSG (1, ("creating output directory %s", dpath));
+                        rc = KDirectoryCreateDir (cwd, 0775, kcmCreate|kcmParents,
+                                                  "%s", dpath);
+                    }
+                    if (rc == 0)
+                    {
+                        rc = KDirectoryOpenDirUpdate (cwd, &ddir, false, "%s", dpath);
+                        if (rc)
+                            ;
+                        else
+                        {
+                            STSMSG (1, ("%scrypting directory %s to %s", De, spath, dpath));
+                            rc = DoDir (sdir, ddir);
+                            STSMSG (1, ("done with directory %s to %s", spath, dpath));
+                            KDirectoryRelease (ddir);
+                        }
+                    }
+                    KDirectoryRelease (sdir);
+                }
+#else
+                rc = RC (rcExe, rcArgv, rcResolving, rcPath, rcIncorrect);
+                LOGERR (klogErr, rc, "Can't do directory to directory");
+#endif
+            }
+            /*
+             * Input is a file
+             */
+            else
+            {
+                KDirectory * ndir;
+                const char * pc;
+
+                if (dtype == kptNotFound)
+                {
+                    STSMSG (1, ("creating output directory %s", dpath));
+                    rc = KDirectoryCreateDir (cwd, 0775, kcmCreate|kcmParents,
+                                              "%s", dpath);
+                }
+                if (rc == 0)
+                {
+
+                    STSMSG (1, ("opening output directory %s", dpath));
+                    rc = KDirectoryOpenDirUpdate (cwd, &ndir, false, "%s", dpath);
+                    if (rc)
+                        ;
+                    else
+                    {
+                        pc = strrchr (spath, '/');
+                        if (pc == NULL)
+                            pc = spath;
+                        else
+                            ++pc;
+
+                        rc = FileToFile (cwd, spath, ndir, pc, true, dpath);
+
+                        KDirectoryRelease (ndir);
+                    }
+                }
+            }
+            break;
+        }
+    }
+    return rc;
+}
+
+
+static
+rc_t StartFileSystem (const char * src, const char * dst)
+{
+    VFSManager * vmanager;
+    rc_t rc;
+ 
+    rc = VFSManagerMake (&vmanager);
+    if (rc)
+        LOGERR (klogErr, rc, "Failed to open file system");
+
+    else
+    {
+        rc = VFSManagerGetKryptoPassword (vmanager, Password, sizeof Password,
+                                          &PasswordSize);
+        if (rc != 0)
+            LOGERR (klogErr, rc, "unable to obtain a password");
+
+        else
+        {
+            rc = KKeyInitRead (&Key, kkeyAES128, Password, PasswordSize);
+            if (rc)
+                LOGERR (klogErr, rc, "Unable to make encryption/decryption key");
+
+            else
+            {
+                KDirectory * cwd;
+
+                rc = VFSManagerGetCWD (vmanager, &cwd);
+                if (rc)
+                    LOGERR (klogInt, rc, "unable to access current directory");
+
+                else
+                {
+                    rc = Start (cwd, src, dst);
+
+                    KDirectoryRelease (cwd);
+                }
+            }
+        }
+        VFSManagerRelease (vmanager);
+    }
+    return rc;
+}
+
+
+rc_t CommonMain (Args * args)
+{
+    rc_t rc;
+    uint32_t ocount; /* we take the address of ocount but not pcount. */
+    uint32_t pcount; /* does that help the compiler optimize? */
+
+    rc = ArgsParamCount (args, &ocount);
+    if (rc)
+        LOGERR (klogInt, rc, "failed to count parameters");
+
+    else if ((pcount = ocount) == 0)
+        MiniUsage (args);
+
+    else if (pcount > 2)
+    {
+        LOGERR (klogErr, rc, "too many parameters");
+        MiniUsage(args);
+    }
+            
+    else
+    {
+        const char * dst; /* we only take the address of one of these */
+        const char * src;
+
+        rc = ArgsOptionCount (args, OPTION_FORCE, &ocount);
+        if (rc)
+            LOGERR (klogInt, rc, "failed to examine force option");
+
+        else
+        {
+            ForceFlag = (ocount > 0);
+
+            /* -----
+             * letting comp put src in register
+             * only if it wants
+             */
+            rc = ArgsParamValue (args, 0, (const void **)&dst);
+            if (rc)
+                LOGERR (klogInt, rc, "Failure to fetch "
+                        "source parameter");
+
+            else
+            {
+                src = dst;
+
+                if (pcount == 1)
+                    dst = NULL;
+
+                else
+                {
+                    rc = ArgsParamValue (args, 1, (const void **)&dst);
+                    if (rc)
+                        LOGERR (klogInt, rc, "Failure to fetch "
+                                "destination parameter");
+                }
+
+                if (rc == 0)
+                    rc = StartFileSystem (src, dst);
+            }
+        }
+    }
+    return rc;
+}
+
+/* EOF */
diff --git a/tools/vdb-decrypt/shared.h b/tools/vdb-decrypt/shared.h
new file mode 100644
index 0000000..37998bd
--- /dev/null
+++ b/tools/vdb-decrypt/shared.h
@@ -0,0 +1,93 @@
+/*==============================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#ifndef _tools_vdb_decrypt_shared_h_
+#define _tools_vdb_decrypt_shared_h_
+
+#define DIRECTORY_TO_DIRECTORY_SUPPORTED 0
+
+#include <klib/defs.h>
+#include <krypto/key.h>
+#include <kapp/args.h>
+
+#define OPTION_FORCE   "force"
+#define OPTION_DEC_SRA "decrypt-sra-files"
+#define ALIAS_FORCE    "f"
+#define ALIAS_DEC_SRA  NULL
+
+extern const bool Decrypting;
+
+extern char Password [];
+extern size_t PasswordSize;
+
+extern const char De [];
+extern const char de [];
+extern const char SraOption[];
+
+extern const char EncExt[];
+bool NameFixUp (char * name);
+extern const char * ForceUsage[];
+
+/* for encfile encrypt/decrypt */
+extern KKey Key;
+
+
+typedef enum ArcScheme
+{
+    arcError,
+    arcNone,
+    arcSRAFile
+} ArcScheme;
+
+extern bool IsArchive; /* this approach makes threading fail */
+
+struct KFile;
+
+ArcScheme ArchiveTypeCheck (const struct KFile * f);
+
+typedef enum EncScheme
+{
+    encError,
+    encNone,
+    encEncFile,
+    encSraEncFile,
+    encWGAEncFile
+} EncScheme;
+
+void CryptOptionLines ();
+
+bool DoThisFile (const struct KFile * infile, EncScheme enc, ArcScheme * arc);
+
+struct Args;
+rc_t CommonMain (struct Args * args);
+
+rc_t CryptFile (const struct KFile * in, const struct KFile ** new_in,
+                struct KFile * out, struct KFile ** new_out, EncScheme scheme);
+
+
+#endif
+
+/* EOF */
diff --git a/tools/vdb-decrypt/vdb-decrypt.c b/tools/vdb-decrypt/vdb-decrypt.c
new file mode 100644
index 0000000..b01f136
--- /dev/null
+++ b/tools/vdb-decrypt/vdb-decrypt.c
@@ -0,0 +1,269 @@
+/*==============================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+
+#include "shared.h"
+
+#include <krypto/wgaencrypt.h>
+#include <krypto/encfile.h>
+#include <kfs/file.h>
+#include <kfs/cacheteefile.h>
+#include <klib/rc.h>
+#include <klib/defs.h>
+#include <klib/log.h>
+#include <klib/status.h>
+
+#include <string.h>
+#include <assert.h>
+
+/* Usage
+ */
+const char UsageDefaultName [] = "vdb-decrypt";
+const char * UsageSra []       = { "decrypt sra archives - [NOT RECOMMENDED]",
+                                   NULL };
+const char De[]             = "De";
+const char de[]             = "de";
+const char OptionSra[] = OPTION_DEC_SRA;
+
+
+static
+OptDef Options[] = 
+{
+    /* name            alias max times oparam required fmtfunc help text loc */
+    { OPTION_DEC_SRA, ALIAS_DEC_SRA, NULL, UsageSra,      0, false, false },
+    { OPTION_FORCE,   ALIAS_FORCE,   NULL, ForceUsage,   0, false, false }
+};
+
+
+static 
+bool DecryptSraFlag = false;
+
+
+const bool Decrypting = true;
+
+void CryptOptionLines ()
+{
+    HelpOptionLine (ALIAS_DEC_SRA, OPTION_DEC_SRA, NULL, UsageSra);
+}
+
+bool DoThisFile (const KFile * infile, EncScheme enc, ArcScheme * parc)
+{
+    const KFile * Infile;
+    ArcScheme arc;
+    rc_t rc;
+
+    *parc = arcNone;
+
+    switch (enc)
+    {
+    default:
+        STSMSG (1, ("not encrypted"));
+        return false;
+
+    case encEncFile:
+        /*
+         * this will apply to KEncFiles versions 1 and 2, maybe not 3
+         * but will hopefully become obsolete eventually.
+         */
+        rc = KEncFileMakeRead (&Infile, infile, &Key); /* replace with VFSManagerOpenFileReadDirectoryRelativeInt */
+        if (rc)
+            return false;
+        break;
+
+    case encSraEncFile:
+        /* these are NCBIsenc instead of NCBInenc */
+        goto sra_enc_file;
+
+    case encWGAEncFile:
+        rc = KFileMakeWGAEncRead (&Infile, infile, Password, PasswordSize);
+        if (rc)
+            return false;
+        break;
+    }
+    arc = ArchiveTypeCheck (Infile);
+    KFileRelease (Infile);
+    switch (arc)
+    {
+    default:
+        return false;
+    case arcNone:
+        return true;
+    case arcSRAFile:
+        break;
+    }
+sra_enc_file:
+    *parc = arcSRAFile;
+    STSMSG (1, ("encrypted sra archive\ndecryption%s requested",
+                DecryptSraFlag ? "" : " not"));
+    return DecryptSraFlag;
+}
+
+bool NameFixUp (char * name)
+{
+    char * pc = strrchr (name, '.');
+    if (pc != NULL)
+    {
+        if (strcmp (pc, EncExt) == 0)
+        {
+            pc[0] = '\0';
+            return true;
+        }
+    }
+    return false;
+}
+
+rc_t CryptFile (const KFile * in, const KFile ** new_in,
+                KFile * out, KFile ** new_out, EncScheme scheme)
+{
+    const KFile * dec;
+    rc_t rc;
+
+    assert (in);
+    assert (out);
+    assert (new_in);
+    assert (new_out);
+
+
+    rc = KFileAddRef (out);
+    if (rc)
+        return rc;
+
+    switch (scheme)
+    {
+    default:
+    case encError:
+        rc = RC (rcExe, rcFile, rcClassifying, rcFile, rcInvalid);
+        break;
+        
+    case encNone:
+    copy:
+        rc = KFileAddRef (in);
+        if (rc)
+            goto fail;
+        *new_in = in;
+        *new_out = out;
+        STSMSG (1, ("not encrypted just copying"));
+        return 0;
+
+    case encEncFile:
+        rc = KEncFileMakeRead (&dec, in, &Key);
+    made_enc:
+        if (rc)
+            goto fail;
+
+        switch (ArchiveTypeCheck (dec))
+        {
+        default:
+        case arcError:
+            rc = RC (rcExe, rcFile, rcClassifying, rcFile, rcInvalid);
+            break;
+
+        case arcSRAFile:
+            if (!DecryptSraFlag)
+            {
+                rc = KFileRelease (dec);
+                if (rc)
+                {
+                    KFileRelease (dec);
+                    KFileRelease (in);
+                    goto fail;
+                }
+                goto copy;
+            }
+            /* fall through */
+        case arcNone:
+            *new_out = out;
+            *new_in = dec;
+            return 0;
+        }
+        break;
+
+    case encWGAEncFile:
+        rc = KFileMakeWGAEncRead (&dec, in, Password, PasswordSize);
+        goto made_enc;
+        break;
+    }
+    fail:
+        KFileRelease (out);
+        *new_in = *new_out = NULL;
+        return rc;
+}
+
+
+/* KMain - EXTERN
+ *  executable entrypoint "main" is implemented by
+ *  an OS-specific wrapper that takes care of establishing
+ *  signal handlers, logging, etc.
+ *
+ *  in turn, OS-specific "main" will invoke "KMain" as
+ *  platform independent main entrypoint.
+ *
+ *  "argc" [ IN ] - the number of textual parameters in "argv"
+ *  should never be < 0, but has been left as a signed int
+ *  for reasons of tradition.
+ *
+ *  "argv" [ IN ] - array of NUL terminated strings expected
+ *  to be in the shell-native character set: ASCII or UTF-8
+ *  element 0 is expected to be executable identity or path.
+ */
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args * args;
+    rc_t rc;
+
+    KStsLevelSet (1);
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 1, Options,
+                            sizeof (Options) / sizeof (Options[0]));
+    if (rc)
+        LOGERR (klogInt, rc, "failed to parse command line parameters");
+
+    else
+    {
+        uint32_t ocount;
+
+        rc = ArgsOptionCount (args, OPTION_DEC_SRA, &ocount);
+        if (rc)
+            LOGERR (klogInt, rc, "failed to examine decrypt "
+                    "sra option");
+        else
+        {
+            DecryptSraFlag = (ocount > 0);
+
+            rc = CommonMain (args);
+        }
+        ArgsWhack (args);
+    }
+
+    if (rc)
+        STSMSG (1, ("exiting: %R (%u)", rc, rc));
+    else
+        STSMSG (1, ("exiting: success"));
+    return rc;
+}
+
+
+/* EOF */
diff --git a/tools/vdb-decrypt/vdb-encrypt.c b/tools/vdb-decrypt/vdb-encrypt.c
new file mode 100644
index 0000000..17c842e
--- /dev/null
+++ b/tools/vdb-decrypt/vdb-encrypt.c
@@ -0,0 +1,215 @@
+/*==============================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+
+#include "shared.h"
+
+#include <krypto/wgaencrypt.h>
+#include <krypto/encfile.h>
+#include <kfs/file.h>
+#include <klib/rc.h>
+#include <klib/defs.h>
+#include <klib/log.h>
+#include <klib/status.h>
+
+#include <assert.h>
+#include <string.h>
+
+/* Usage
+ */
+const char UsageDefaultName [] = "vdb-encrypt";
+const char De[]             = "En";
+const char de[]             = "en";
+
+
+static
+OptDef Options[] = 
+{
+    /* name            alias max times oparam required fmtfunc help text loc */
+    { OPTION_FORCE,   ALIAS_FORCE,   NULL, ForceUsage,   0, false, false }
+};
+
+/* static bool DecryptSraFlag = false; */
+
+const bool Decrypting = false;
+
+void CryptOptionLines () {}
+
+bool DoThisFile (const KFile * infile, EncScheme enc, ArcScheme * parc)
+{
+    const KFile * Infile;
+    ArcScheme arc;
+    rc_t rc;
+    bool do_enc;
+
+    *parc = arcNone;
+
+    switch (enc)
+    {
+    default:
+        STSMSG (1, ("error checking encrypted"));
+        return false;
+
+    case encNone:
+        do_enc = true;
+        rc = KFileAddRef (infile);
+        if (rc)
+            return false;
+        Infile = infile;
+        break;
+
+    case encEncFile:
+        do_enc = false;
+        rc = KEncFileMakeRead (&Infile, infile, &Key);
+        if (rc)
+            return false;
+        break;
+
+    case encWGAEncFile:
+        do_enc = false;
+        rc = KFileMakeWGAEncRead (&Infile, infile, Password, PasswordSize);
+        if (rc)
+            return false;
+        break;
+    }
+    arc = ArchiveTypeCheck (Infile);
+    KFileRelease (Infile);
+    if (arc == arcSRAFile)
+    {
+        STSMSG (1, ("%sencrypted sra archive", do_enc ? "un" : ""));
+        *parc = arcSRAFile;
+    }
+    return do_enc;
+}
+
+bool NameFixUp (char * name)
+{
+    char * pc = strrchr (name, '.');
+
+    if (((pc != NULL) &&
+         (strcmp (pc, EncExt) == 0)) ||
+        IsArchive )
+        return false;
+
+    strcat (name, EncExt);
+
+    return true;
+}
+
+rc_t CryptFile (const KFile * in, const KFile ** new_in,
+                KFile * out, KFile ** new_out, EncScheme scheme)
+{
+    rc_t rc;
+
+    assert (in);
+    assert (out);
+    assert (new_in);
+    assert (new_out);
+
+    *new_in = *new_out = NULL;
+
+    rc = KFileAddRef (in);
+    if (rc)
+        return rc;
+
+    switch (scheme)
+    {
+    default:
+    case encError:
+        KFileRelease (in);
+        return RC (rcExe, rcEncryption, rcParsing, rcFile, rcInvalid);
+
+    case encNone:
+        rc = KEncFileMakeWrite (new_out, out, &Key);
+        if (rc)
+        {
+            KFileRelease (in);
+            return rc;
+        }
+        break;
+
+    case encEncFile:
+    case encWGAEncFile:
+        rc = KFileAddRef (out);
+        if (rc)
+        {
+            KFileRelease (in);
+            return rc;
+        }
+        *new_out = out;
+        STSMSG (1, ("already encrypted just copying"));
+        break;
+    }
+    *new_in = in;
+    return 0;
+}
+
+
+/* KMain - EXTERN
+ *  executable entrypoint "main" is implemented by
+ *  an OS-specific wrapper that takes care of establishing
+ *  signal handlers, logging, etc.
+ *
+ *  in turn, OS-specific "main" will invoke "KMain" as
+ *  platform independent main entrypoint.
+ *
+ *  "argc" [ IN ] - the number of textual parameters in "argv"
+ *  should never be < 0, but has been left as a signed int
+ *  for reasons of tradition.
+ *
+ *  "argv" [ IN ] - array of NUL terminated strings expected
+ *  to be in the shell-native character set: ASCII or UTF-8
+ *  element 0 is expected to be executable identity or path.
+ */
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args * args;
+    rc_t rc;
+
+    KStsLevelSet (1);
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 1, Options,
+                            sizeof (Options) / sizeof (Options[0]));
+    if (rc)
+        LOGERR (klogInt, rc, "failed to parse command line parameters");
+
+    else
+    {
+        rc = CommonMain (args);
+
+        ArgsWhack (args);
+    }
+
+    if (rc)
+        STSMSG (1, ("exiting: %R (%u)", rc, rc));
+    else
+        STSMSG (1, ("exiting: success"));
+
+    return rc;
+}
+
+
+/* EOF */
diff --git a/tools/vdb-diff/Makefile b/tools/vdb-diff/Makefile
new file mode 100644
index 0000000..c3e5b18
--- /dev/null
+++ b/tools/vdb-diff/Makefile
@@ -0,0 +1,79 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/vdb-diff
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+	vdb-diff
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+	
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# vdb-diff
+#
+
+VDB_DIFF_SRC = \
+	namelist_tools \
+	coldefs \
+	vdb-diff
+
+VDB_DIFF_OBJ = \
+	$(addsuffix .$(OBJX),$(VDB_DIFF_SRC))
+
+VDB_DIFF_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lm
+
+$(BINDIR)/vdb-diff: $(VDB_DIFF_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(VDB_DIFF_LIB)
diff --git a/tools/vdb-diff/coldefs.c b/tools/vdb-diff/coldefs.c
new file mode 100644
index 0000000..d067d8f
--- /dev/null
+++ b/tools/vdb-diff/coldefs.c
@@ -0,0 +1,211 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "coldefs.h"
+#include <klib/text.h>
+#include <klib/out.h>
+
+#include <vdb/table.h>
+
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+
+/*
+ * helper-function for: col_defs_destroy
+ * - free's everything a node owns
+ * - free's the node
+*/
+static void CC col_defs_destroy_pair( void * node, void * data )
+{
+    col_pair * pair = node;
+    if ( pair != NULL )
+    {
+	
+        if ( pair -> name != NULL )
+		{
+			free( pair -> name );
+			pair -> name = NULL;
+		}
+	
+        free( pair );
+    }
+}
+
+
+/*
+ * initializes a column-definitions-list
+*/
+rc_t col_defs_init( col_defs ** defs )
+{
+	rc_t rc = 0;
+	
+    if ( defs == NULL )
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcSelf, rcNull );
+	else
+	{
+		col_defs * tmp = calloc( 1, sizeof( * tmp ) );
+		if ( tmp == NULL )
+			rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+		else
+		{
+			VectorInit( &( tmp ->cols ), 0, 5 );
+			*defs = tmp;
+		}
+	}
+    return rc;
+}
+
+
+/*
+ * destroys the column-definitions-list
+*/
+rc_t col_defs_destroy( col_defs * defs )
+{
+	rc_t rc = 0;
+    if ( defs == NULL )
+        rc = RC( rcVDB, rcNoTarg, rcDestroying, rcSelf, rcNull );
+	else
+	{
+		VectorWhack( &( defs -> cols ), col_defs_destroy_pair, NULL );
+		free( defs );
+	}
+    return rc;
+}
+
+
+/*
+ * helper-function for: col_defs_parse_string / col_defs_extract_from_table
+ * - creates a column-definition by the column-name
+ * - adds the definition to the column-definition-vector
+*/
+static rc_t col_defs_append_col_pair( col_defs * defs, const char * name )
+{
+    rc_t rc = 0;
+	
+	if ( name == NULL )
+		rc = RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+	else if ( name[ 0 ] == 0 )
+		rc = RC( rcExe, rcNoTarg, rcResolving, rcParam, rcEmpty );
+	else
+	{
+		col_pair * new_pair = calloc( 1, sizeof( * new_pair ) );
+		if ( new_pair == NULL )
+			rc = RC( rcVDB, rcNoTarg, rcParsing, rcMemory, rcExhausted );
+		else
+		{
+			new_pair -> name = string_dup_measure ( name, NULL );
+			rc = VectorAppend( &( defs -> cols ), NULL, new_pair );
+			if ( rc != 0 )
+				col_defs_destroy_pair( new_pair, NULL );
+		}
+	}
+    return rc;
+}
+
+
+/*
+*/
+rc_t col_defs_fill( col_defs * defs, const KNamelist * list )
+{
+    rc_t rc = 0;
+
+    if ( defs == NULL )
+        rc = RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    else if ( list == NULL )
+        rc = RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+	else
+	{
+		uint32_t count;
+		rc = KNamelistCount( list, &count );
+		if ( rc != 0 )
+			KOutMsg( "col_defs_extract_from_table:KNamelistCount() failed %R\n", rc );
+		else
+		{
+			uint32_t idx;
+			for ( idx = 0; idx < count && rc == 0; ++idx )
+			{
+				const char * name;
+				rc = KNamelistGet( list, idx, &name );
+				if ( rc != 0 )
+					KOutMsg( "col_defs_extract_from_table:KNamelistGet() failed %R\n", rc );
+				else
+					rc = col_defs_append_col_pair( defs, name );
+			}
+		}
+	}
+    return rc;
+}
+
+
+/*
+ * how many columns do we have in here?
+*/
+rc_t col_defs_count( const col_defs * defs, uint32_t * count )
+{
+	rc_t rc = 0;
+    if ( defs == NULL )
+        rc = RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    else if ( count == NULL )
+        rc = RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+	else
+	{
+		*count = VectorLength( &( defs -> cols ) );
+	}
+	return rc;
+}
+
+
+/*
+ * add the pairs in defs to the given cursor
+*/
+rc_t col_defs_add_to_cursor( col_defs * defs, const VCursor * cur, int idx )
+{
+    rc_t rc = 0;
+
+    if ( defs == NULL )
+        rc = RC( rcExe, rcNoTarg, rcResolving, rcSelf, rcNull );
+    else if ( cur == NULL )
+        rc = RC( rcExe, rcNoTarg, rcResolving, rcParam, rcNull );
+    else if ( idx < 0 || idx > 1 )
+        rc = RC( rcExe, rcNoTarg, rcResolving, rcParam, rcInvalid );
+	else
+	{
+		uint32_t i;
+		uint32_t count = VectorLength( &( defs -> cols ) );
+		for ( i = 0; i < count && rc == 0; ++i )
+		{
+			col_pair * pair = VectorGet( &( defs -> cols ), i );
+			if ( pair != NULL )
+				rc = VCursorAddColumn( cur, &( pair -> pair[ idx ].idx ), "%s", pair -> name );
+		}
+	}
+	return rc;
+}
diff --git a/tools/vdb-diff/coldefs.h b/tools/vdb-diff/coldefs.h
new file mode 100644
index 0000000..e964568
--- /dev/null
+++ b/tools/vdb-diff/coldefs.h
@@ -0,0 +1,105 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_coldefs_
+#define _h_vdb_coldefs_
+
+#include <klib/defs.h>
+#include <klib/rc.h>
+#include <klib/vector.h>
+#include <klib/namelist.h>
+
+#include <vdb/schema.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/********************************************************************
+col-def is the definition of a single column: index/type
+********************************************************************/
+typedef struct col_def
+{
+    uint32_t idx;       	/* index of this column in curosr */
+} col_def;
+
+
+/********************************************************************
+col-pair is the definition of pair of columns with same name
+********************************************************************/
+typedef struct col_pair
+{
+    char * name;
+	col_def	pair[ 2 ];		/* a pair of sub-col-defs */
+} col_pair;
+
+
+/********************************************************************
+the col-defs are a vector of single column-pairs
+********************************************************************/
+typedef struct col_defs
+{
+    Vector cols;
+} col_defs;
+
+
+/*
+ * initializes a column-definitions-list
+*/
+rc_t col_defs_init( col_defs ** defs );
+
+
+/*
+ * destroys the column-definitions-list
+*/
+rc_t col_defs_destroy( col_defs * defs );
+
+
+/*
+ * setup the list with pairs made from the given list
+*/
+rc_t col_defs_fill( col_defs * defs, const KNamelist * list );
+
+
+/*
+ * how many columns do we have in here?
+*/
+rc_t col_defs_count( const col_defs * defs, uint32_t * count );
+
+
+/*
+ * add the pairs in defs to the given cursor
+*/
+rc_t col_defs_add_to_cursor( col_defs * defs, const VCursor * cur, int idx );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-diff/namelist_tools.c b/tools/vdb-diff/namelist_tools.c
new file mode 100644
index 0000000..1871512
--- /dev/null
+++ b/tools/vdb-diff/namelist_tools.c
@@ -0,0 +1,299 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#include "namelist_tools.h"
+
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+rc_t nlt_make_namelist_from_string( const KNamelist **list, const char * src )
+{
+    VNamelist *v_names;
+    rc_t rc = VNamelistMake ( &v_names, 5 );
+    if ( rc == 0 )
+    {
+        char * s = string_dup_measure ( src, NULL );
+        if ( s )
+        {
+            uint32_t str_begin = 0;
+            uint32_t str_end = 0;
+            char c;
+            do
+            {
+                c = s[ str_end ];
+                if ( c == ',' || c == 0 )
+                {
+                    if ( str_begin < str_end )
+                    {
+                        char c_temp = c;
+                        s[ str_end ] = 0;
+                        rc = VNamelistAppend ( v_names, &(s[str_begin]) );
+                        s[ str_end ] = c_temp;
+                    }
+                    str_begin = str_end + 1;
+                }
+                str_end++;
+            } while ( c != 0 && rc == 0 );
+            free( s );
+        }
+		if ( rc == 0 )
+			rc = VNamelistToConstNamelist ( v_names, list );
+        VNamelistRelease( v_names );
+    }
+    return rc;
+}
+
+
+int nlt_strcmp( const char* s1, const char* s2 )
+{
+    size_t n1 = string_size ( s1 );
+    size_t n2 = string_size ( s2 );
+    return string_cmp
+        ( s1, n1, s2, n2, ( n1 < n2 ) ? ( uint32_t ) n2 : ( uint32_t ) n1 );
+}
+
+
+bool nlt_is_name_in_namelist( const KNamelist *list, const char *name_to_find )
+{
+    uint32_t count, idx;
+    bool res = false;
+    if ( list == NULL || name_to_find == NULL )
+        return res;
+    if ( KNamelistCount( list, &count ) == 0 )
+    {
+        for ( idx = 0; idx < count && res == false; ++idx )
+        {
+            const char *item_name;
+            if ( KNamelistGet( list, idx, &item_name ) == 0 )
+            {
+                if ( nlt_strcmp( item_name, name_to_find ) == 0 )
+                    res = true;
+            }
+        }
+    }
+    return res;
+}
+
+/*
+    - list1 and list2 containts strings
+    - if one of the strings in list2 is contained ( partial match, strstr() )
+      in one of the strings in list1 the function returns true...
+*/
+bool nlt_namelist_intersect( const KNamelist *list1, const KNamelist *list2 )
+{
+    uint32_t count1;
+    bool res = false;
+    if ( list1 == NULL || list2 == NULL )
+        return res;
+    if ( KNamelistCount( list1, &count1 ) == 0 )
+    {
+        uint32_t idx1;
+        for ( idx1 = 0; idx1 < count1 && res == false; ++idx1 )
+        {
+            const char *string1;
+            if ( KNamelistGet( list1, idx1, &string1 ) == 0 )
+            {
+                uint32_t count2;
+                if ( KNamelistCount( list2, &count2 ) == 0 )
+                {
+                    uint32_t idx2;
+                    for ( idx2 = 0; idx2 < count2 && res == false; ++idx2 )
+                    {
+                        const char *string2;
+                        if ( KNamelistGet( list2, idx2, &string2 ) == 0 )
+                        {
+                            if ( strstr( string1, string2 ) != NULL )
+                                res = true;
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return res;
+}
+
+rc_t nlt_remove_names_from_namelist( const KNamelist *source,
+            const KNamelist **dest, const KNamelist *to_remove )
+{
+    rc_t rc = 0;
+    uint32_t count;
+    
+    if ( source == NULL || dest == NULL || to_remove == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    *dest = NULL;
+    rc = KNamelistCount( source, &count );
+    if ( rc == 0 && count > 0 )
+    {
+        VNamelist *cleaned;
+        rc = VNamelistMake ( &cleaned, count );
+        if ( rc == 0 )
+        {
+            uint32_t idx;
+            for ( idx = 0; idx < count && rc == 0; ++idx )
+            {
+                const char *s;
+                rc = KNamelistGet( source, idx, &s );
+                if ( rc == 0 )
+                {
+                    if ( !nlt_is_name_in_namelist( to_remove, s ) )
+                        rc = VNamelistAppend ( cleaned, s );
+                }
+                rc = VNamelistToConstNamelist ( cleaned, dest );
+            }
+        }
+    }
+    return rc;
+}
+
+rc_t nlt_remove_strings_from_namelist( const KNamelist *source,
+            const KNamelist **dest, const char *items_to_remove )
+{
+    rc_t rc = 0;
+    const KNamelist *to_remove;
+    
+    if ( source == NULL || dest == NULL || items_to_remove == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    rc = nlt_make_namelist_from_string( &to_remove, items_to_remove );
+    if ( rc == 0 )
+    {
+        rc = nlt_remove_names_from_namelist( source, dest, to_remove );
+        KNamelistRelease( to_remove );
+    }
+    return rc;
+}
+
+
+bool nlt_compare_namelists( const KNamelist *nl1, const KNamelist *nl2, uint32_t * found )
+{
+	bool res = false;
+    if ( nl1 != NULL && nl2 != NULL )
+	{
+		uint32_t count_1;
+		rc_t rc = KNamelistCount( nl1, &count_1 );
+		if ( rc == 0 )
+		{
+			uint32_t count_2;
+			rc = KNamelistCount( nl2, &count_2 );
+			if ( rc == 0 && count_1 == count_2 )
+			{
+				uint32_t idx;
+				uint32_t in_nl2 = 0;
+				for ( idx = 0; idx < count_1 && rc == 0; ++idx )
+				{
+					const char *s;
+					rc = KNamelistGet( nl1, idx, &s );
+					if ( rc == 0 && s != NULL && nlt_is_name_in_namelist( nl2, s ) )
+						in_nl2++;
+				}
+				res = ( rc == 0 && in_nl2 == count_1 );
+				if ( found != NULL ) *found = in_nl2;
+			}
+		}
+	}
+	return res;
+}
+
+
+rc_t nlt_copy_namelist( const KNamelist *src, const KNamelist ** dst )
+{
+    VNamelist *v_names;
+    rc_t rc = VNamelistMake ( &v_names, 5 );
+	if ( rc == 0 )
+	{
+		uint32_t count;
+		rc = KNamelistCount( src, &count );
+		if ( rc == 0 )
+		{
+            uint32_t idx;
+            for ( idx = 0; idx < count && rc == 0; ++idx )
+            {
+                const char *s;
+                rc = KNamelistGet( src, idx, &s );
+				if ( rc == 0 && s != NULL )
+					rc = VNamelistAppend ( v_names, s );
+			}
+		}
+		if ( rc == 0 )
+			rc = VNamelistToConstNamelist ( v_names, dst );
+        VNamelistRelease( v_names );
+	}
+	return rc;
+}
+
+
+rc_t nlt_build_intersect( const KNamelist *nl1, const KNamelist *nl2, const KNamelist ** dst )
+{
+    VNamelist *v_names;
+    rc_t rc = VNamelistMake ( &v_names, 5 );
+	if ( rc == 0 )
+	{
+		/* loop through nl1: if a entry is found in nl2 -> add it to dst */
+		uint32_t count;
+		rc = KNamelistCount( nl1, &count );
+		if ( rc == 0 )
+		{
+            uint32_t idx;
+            for ( idx = 0; idx < count && rc == 0; ++idx )
+            {
+                const char *s;
+                rc = KNamelistGet( nl1, idx, &s );
+				if ( rc == 0 && s != NULL )
+				{
+					if ( nlt_is_name_in_namelist( nl2, s ) )
+						rc = VNamelistAppend ( v_names, s );
+				}
+			}
+		}
+		if ( rc == 0 )
+			rc = VNamelistToConstNamelist ( v_names, dst );
+        VNamelistRelease( v_names );
+
+	}
+	return rc;	
+}
+
+bool nlt_namelist_is_sub_set_in_full_set( const KNamelist * sub_set, const KNamelist * full_set )
+{
+	bool res = false;
+	uint32_t count;
+	rc_t rc = KNamelistCount( sub_set, &count );
+	if ( rc == 0 )
+	{
+		uint32_t idx;
+		uint32_t found = 0;
+		for ( idx = 0; idx < count && rc == 0; ++idx )
+		{
+			const char *s;
+			rc = KNamelistGet( sub_set, idx, &s );
+			if ( rc == 0 && s != NULL && nlt_is_name_in_namelist( full_set, s ) )
+				found++;
+		}
+		res = ( rc == 0 && count == found );
+	}
+	return res;
+}
diff --git a/tools/vdb-diff/namelist_tools.h b/tools/vdb-diff/namelist_tools.h
new file mode 100644
index 0000000..6819960
--- /dev/null
+++ b/tools/vdb-diff/namelist_tools.h
@@ -0,0 +1,59 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_namelist_tools_
+#define _h_namelist_tools_
+
+#include <klib/rc.h>
+#include <klib/namelist.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int nlt_strcmp( const char* s1, const char* s2 );
+rc_t nlt_make_namelist_from_string( const KNamelist **list, const char * src );
+bool nlt_is_name_in_namelist( const KNamelist *list, const char *name_to_find );
+bool nlt_namelist_intersect( const KNamelist *list1, const KNamelist *list2 );
+
+rc_t nlt_remove_names_from_namelist( const KNamelist *source,
+            const KNamelist **dest, const KNamelist *to_remove );
+
+rc_t nlt_remove_strings_from_namelist( const KNamelist *source,
+            const KNamelist **dest, const char *items_to_remove );
+
+bool nlt_compare_namelists( const KNamelist *nl1, const KNamelist *nl2, uint32_t * found );
+
+rc_t nlt_copy_namelist( const KNamelist *src, const KNamelist ** dst );
+
+rc_t nlt_build_intersect( const KNamelist *nl1, const KNamelist *nl2, const KNamelist ** dst );
+
+bool nlt_namelist_is_sub_set_in_full_set( const KNamelist * sub_set, const KNamelist * full_set );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-diff/vdb-diff.c b/tools/vdb-diff/vdb-diff.c
new file mode 100644
index 0000000..4e78b7f
--- /dev/null
+++ b/tools/vdb-diff/vdb-diff.c
@@ -0,0 +1,1002 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <kapp/main.h>
+
+#include <klib/rc.h>
+#include <klib/out.h>
+#include <klib/log.h>
+#include <klib/num-gen.h>
+#include <klib/progressbar.h>
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <vdb/database.h>
+
+#include <sra/sraschema.h>
+
+#include "coldefs.h"
+#include "namelist_tools.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+
+#define OPTION_ROWS         "rows"
+#define ALIAS_ROWS          "R"
+
+#define OPTION_COLUMNS      "columns"
+#define ALIAS_COLUMNS       "C"
+
+#define OPTION_TABLE        "table"
+#define ALIAS_TABLE         "T"
+
+#define OPTION_PROGRESS     "progress"
+#define ALIAS_PROGRESS      "p"
+
+#define OPTION_MAXERR       "maxerr"
+#define ALIAS_MAXERR        "e"
+
+#define OPTION_INTERSECT    "intersect"
+#define ALIAS_INTERSECT     "i"
+
+#define OPTION_EXCLUDE      "exclude"
+#define ALIAS_EXCLUDE       "x"
+
+static const char * rows_usage[] = { "set of rows to be comparend (default = all)", NULL };
+static const char * columns_usage[] = { "set of columns to be compared (default = all)", NULL };
+static const char * table_usage[] = { "name of table (in case of database ) to be compared", NULL };
+static const char * progress_usage[] = { "show progress in percent", NULL };
+static const char * maxerr_usage[] = { "max errors im comparing (default = 1)", NULL };
+static const char * intersect_usage[] = { "intersect column-set from both runs", NULL };
+static const char * exclude_usage[] = { "exclude these columns from comapring", NULL };
+
+OptDef MyOptions[] =
+{
+    { OPTION_ROWS, 			ALIAS_ROWS, 		NULL, 	rows_usage, 		1, 	true, 	false },
+	{ OPTION_COLUMNS, 		ALIAS_COLUMNS, 		NULL, 	columns_usage, 		1, 	true, 	false },
+	{ OPTION_TABLE, 		ALIAS_TABLE, 		NULL, 	table_usage, 		1, 	true, 	false },
+	{ OPTION_PROGRESS, 		ALIAS_PROGRESS,		NULL, 	progress_usage,		1, 	false, 	false },
+	{ OPTION_MAXERR, 		ALIAS_MAXERR,		NULL, 	maxerr_usage,		1, 	true, 	false },
+	{ OPTION_INTERSECT,		ALIAS_INTERSECT,	NULL, 	intersect_usage,	1, 	false, 	false },
+	{ OPTION_EXCLUDE,		ALIAS_EXCLUDE,		NULL, 	exclude_usage,		1, 	true, 	false }		
+};
+
+
+const char UsageDefaultName[] = "vdb-diff";
+
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    return KOutMsg (
+        "\n"
+        "Usage:\n"
+        "  %s <src_path> <dst_path> [options]\n"
+        "\n", progname );
+}
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if ( args == NULL )
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+        rc = ArgsProgram ( args, &fullpath, &progname );
+
+    if ( rc != 0 )
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary ( progname );
+
+    KOutMsg ( "Options:\n" );
+    HelpOptionLine ( ALIAS_ROWS, 		OPTION_ROWS, 		"row-range",	rows_usage );
+    HelpOptionLine ( ALIAS_COLUMNS, 	OPTION_COLUMNS, 	"column-set",	columns_usage );
+	HelpOptionLine ( ALIAS_TABLE, 		OPTION_TABLE, 		"table-name",	table_usage );
+	HelpOptionLine ( ALIAS_PROGRESS, 	OPTION_PROGRESS,	NULL,			progress_usage );
+	HelpOptionLine ( ALIAS_MAXERR, 		OPTION_MAXERR,	    "max value",	maxerr_usage );
+	HelpOptionLine ( ALIAS_INTERSECT, 	OPTION_INTERSECT,   NULL,			intersect_usage );
+	HelpOptionLine ( ALIAS_EXCLUDE, 	OPTION_EXCLUDE,   	"column-set",	exclude_usage );
+	
+    HelpOptionsStandard ();
+    HelpVersion ( fullpath, KAppVersion() );
+
+    return rc;
+}
+
+struct diff_ctx
+{
+    const char * src1;
+    const char * src2;
+	const char * columns;
+	const char * excluded;
+	const char * table;
+	
+    struct num_gen * rows;
+	uint32_t max_err;
+	bool show_progress;
+	bool intersect;
+};
+
+
+static void init_diff_ctx( struct diff_ctx * dctx )
+{
+    dctx -> src1 = NULL;
+    dctx -> src2 = NULL;
+	dctx -> columns = NULL;
+	dctx -> excluded = NULL;	
+	dctx -> table = NULL;
+	
+    dctx -> rows = NULL;
+	dctx -> show_progress = false;
+	dctx -> intersect = false;
+}
+
+
+static void release_diff_ctx( struct diff_ctx * dctx )
+{
+	/* do not release the src1,src2,columns,table pointers! they are owned by the Args-obj. */
+	if ( dctx -> rows != 0 )
+	{
+		num_gen_destroy( dctx -> rows );
+	}
+}
+
+
+static const char * get_str_option( const Args *args, const char * option_name )
+{
+    const char * res = NULL;
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, option_name, &count );
+	if ( rc != 0 )
+	{
+		LOGERR ( klogInt, rc, "ArgsOptionCount() failed" );
+	}
+	else if ( count > 0 )
+	{
+		rc = ArgsOptionValue( args, option_name, 0, (const void **)&res );
+		if ( rc != 0 )
+		{
+			LOGERR ( klogInt, rc, "ArgsOptionValue( 0 ) failed" );
+		}
+	}
+    return res;
+}
+
+
+static bool get_bool_option( const Args *args, const char * option_name, bool dflt )
+{
+    bool res = dflt;
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( args, option_name, &count );
+	if ( rc != 0 )
+	{
+		LOGERR ( klogInt, rc, "ArgsOptionCount() failed" );
+	}
+	else if ( count > 0 )
+	{
+		res = true;
+	}
+    return res;
+}
+
+
+static uint32_t get_uint32t_option( const Args *args, const char * option_name, uint32_t dflt )
+{
+    uint32_t res = dflt;
+	const char * s = get_str_option( args, option_name );
+	if ( s != NULL ) res = atoi( s );
+    return res;
+}
+
+
+static rc_t gather_diff_ctx( struct diff_ctx * dctx, Args * args )
+{
+    uint32_t count;
+    rc_t rc = ArgsParamCount( args, &count );
+    if ( rc != 0 )
+	{
+		LOGERR ( klogInt, rc, "ArgsParamCount() failed" );
+	}
+    else if ( count < 2 )
+    {
+        rc = RC( rcExe, rcNoTarg, rcReading, rcParam, rcIncorrect );
+		LOGERR ( klogInt, rc, "This tool needs 2 arguments: source1 and source2" );
+    }
+    else
+    {
+        rc = ArgsParamValue( args, 0, (const void **)&dctx->src1 );
+        if ( rc != 0 )
+		{
+			LOGERR ( klogInt, rc, "ArgsParamValue( 1 ) failed" );
+		}
+        else
+        {
+            rc = ArgsParamValue( args, 1, (const void **)&dctx->src2 );
+            if ( rc != 0 )
+			{
+				LOGERR ( klogInt, rc, "ArgsParamValue( 2 ) failed" );
+			}
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        const char * s = get_str_option( args, OPTION_ROWS );
+        if ( s != NULL )
+		{
+            rc = num_gen_make_from_str( &dctx->rows, s );
+			if ( rc != 0 )
+			{
+				LOGERR ( klogInt, rc, "num_gen_make_from_str() failed" );
+			}
+		}
+	}
+	
+	if ( rc == 0 )
+	{
+		dctx -> columns = get_str_option( args, OPTION_COLUMNS );
+		dctx -> excluded = get_str_option( args, OPTION_EXCLUDE );		
+		dctx -> show_progress = get_bool_option( args, OPTION_PROGRESS, false );
+		dctx -> intersect = get_bool_option( args, OPTION_INTERSECT, false );
+		dctx -> max_err = get_uint32t_option( args, OPTION_MAXERR, 1 );
+    }
+
+    return rc;
+}
+
+
+static rc_t report_diff_ctx( struct diff_ctx * dctx )
+{
+    rc_t rc = KOutMsg( "src[ 1 ] : %s\n", dctx -> src1 );
+	if ( rc == 0 )
+		rc = KOutMsg( "src[ 2 ] : %s\n", dctx -> src2 );
+
+	if ( rc == 0 )
+	{
+		if ( dctx -> rows != NULL )
+		{
+			char buffer[ 4096 ];
+			rc = num_gen_as_string( dctx -> rows, buffer, sizeof buffer, NULL, false );
+			if ( rc == 0 )
+				rc = KOutMsg( "- rows : %s\n", buffer );
+		}
+		else
+			rc = KOutMsg( "- rows : all\n" );
+	}
+		
+	if ( rc == 0 && dctx -> columns != NULL )
+		rc = KOutMsg( "- columns : %s\n", dctx -> columns );
+	if ( rc == 0 && dctx -> excluded != NULL )
+		rc = KOutMsg( "- exclude : %s\n", dctx -> excluded );
+	if ( rc == 0 && dctx -> table != NULL )
+		rc = KOutMsg( "- table : %s\n", dctx -> table );
+	if ( rc == 0 )
+		rc = KOutMsg( "- progress : %s\n", dctx -> show_progress ? "show" : "hide" );
+	if ( rc == 0 )
+		rc = KOutMsg( "- intersect: %s\n", dctx -> intersect ? "yes" : "no" );
+	if ( rc == 0 )
+		rc = KOutMsg( "- max err : %u\n", dctx -> max_err );
+
+	if ( rc == 0 )
+		rc = KOutMsg( "\n" );
+	return rc;
+}
+
+
+static rc_t diff_columns_iter( col_defs * defs, const VCursor * cur_1, const VCursor * cur_2,
+							   struct diff_ctx * dctx, const struct num_gen_iter * iter )
+{
+	uint32_t column_count;
+	rc_t rc = col_defs_count( defs, &column_count );
+	if ( rc != 0 )
+	{
+		LOGERR ( klogInt, rc, "col_defs_count() failed" );
+	}
+	else
+	{
+		struct progressbar * progress = NULL;
+		int64_t row_id;
+		uint64_t rows_checked = 0;
+		uint64_t rows_different = 0;
+		
+		if ( dctx -> show_progress )
+			make_progressbar( &progress, 2 );
+	
+		while ( rc == 0 && num_gen_iterator_next( iter, &row_id, &rc ) )
+		{
+			if ( rc == 0 ) rc = Quitting();    /* to be able to cancel the loop by signal */
+			if ( rc == 0 )
+			{
+				bool row_equal = true;
+				
+				uint32_t col_id;
+				for ( col_id = 0; col_id < column_count && rc == 0; ++col_id )
+				{
+					col_pair * pair = VectorGet( &( defs -> cols ), col_id );
+					if ( pair != NULL )
+					{
+						uint32_t elem_bits_1, boff_1, row_len_1;
+						const void * base_1;
+						rc = VCursorCellDataDirect ( cur_1, row_id, pair->pair[ 0 ].idx, 
+													 &elem_bits_1, &base_1, &boff_1, &row_len_1 );
+						if ( rc != 0 )
+						{
+							PLOGERR( klogInt, ( klogInt, rc, 
+									 "VCursorCellDataDirect( #1 [$(col)].$(row) ) failed",
+									 "col=%s,row=%ld", pair->name, row_id ) );
+						}
+						else
+						{
+							uint32_t elem_bits_2, boff_2, row_len_2;
+							const void * base_2;
+							rc = VCursorCellDataDirect ( cur_2, row_id, pair->pair[ 1 ].idx, 
+														 &elem_bits_2, &base_2, &boff_2, &row_len_2 );
+							if ( rc != 0 )
+							{
+								PLOGERR( klogInt, ( klogInt, rc, 
+										 "VCursorCellDataDirect( #2 [$(col)].$(row) ) failed",
+										 "col=%s,row=%ld", pair->name, row_id ) );
+							}
+							else
+							{
+								bool bin_diff = true;
+								
+								if ( elem_bits_1 != elem_bits_2 )
+								{
+									bin_diff = row_equal = false;
+									rc = KOutMsg( "%s[ %ld ].elem_bits %u != %u\n", pair->name, row_id, elem_bits_1, elem_bits_2 );
+								}
+
+								if ( row_len_1 != row_len_2 )
+								{
+									bin_diff = row_equal = false;
+									if ( rc == 0 )
+									{
+										rc = KOutMsg( "%s[ %ld ].row_len %u != %u\n", pair->name, row_id, row_len_1, row_len_2 );
+									}
+								}
+
+								if ( boff_1 != 0 || boff_2 != 0 )
+								{
+									bin_diff = row_equal = false;
+									if ( rc == 0 )
+									{
+										rc = KOutMsg( "%s[ %ld ].bit_offset: %u, %u\n", pair->name, row_id, boff_1, boff_2 );
+									}
+								}
+								
+								if ( bin_diff )
+								{
+									size_t num_bits = ( row_len_1 * elem_bits_1 );
+									if ( num_bits & 0x07 )
+									{
+										if ( rc == 0 )
+										{
+											rc = KOutMsg( "%s[ %ld ].bits_total %% 8 = %u\n", pair->name, row_id, ( num_bits % 8 ) );
+										}
+									}
+									else
+									{
+										size_t num_bytes = ( num_bits >> 3 );
+										int cmp = memcmp ( base_1, base_2, num_bytes );
+										if ( cmp != 0 )
+										{
+											if ( rc == 0 )
+											{
+												rc = KOutMsg( "%s[ %ld ] differ\n", pair->name, row_id );
+											}
+											row_equal = false;
+										}
+									}
+								}
+							}
+						}
+					}
+				} /* for ( col_id ... ) */
+				
+				if ( !row_equal )
+				{
+					if ( rc == 0 )	rc = KOutMsg( "\n" );
+					rows_different ++;
+					if ( rows_different >= dctx -> max_err )
+						rc = RC( rcExe, rcNoTarg, rcComparing, rcRow, rcInconsistent );		
+				}
+				rows_checked ++;
+				
+				if ( progress != NULL )
+				{
+					uint32_t progress_value;
+					if ( num_gen_iterator_percent( iter, 2, &progress_value ) == 0 )
+						update_progressbar( progress, progress_value );
+				}
+				
+			} /* if (!Quitting) */
+		} /* while ( num_gen_iterator_next() ) */
+
+		if ( rc == 0 )
+			rc = KOutMsg( "\n%,lu rows checked ( %d columns each ), %,lu rows differ\n",
+				rows_checked, column_count, rows_different );
+
+		if ( rows_different > 0 )
+			rc = RC( rcExe, rcNoTarg, rcComparing, rcRow, rcInconsistent );
+		
+		if ( progress != NULL )
+			destroy_progressbar( progress );
+			
+	} /* if ( col_defs_count == 0 )*/
+	
+	return rc;
+}
+
+
+static rc_t diff_columns_cursor( col_defs * defs, const VCursor * cur_1, const VCursor * cur_2, struct diff_ctx * dctx )
+{
+    int64_t  first_1;
+    uint64_t count_1;
+    rc_t rc = VCursorIdRange( cur_1, 0, &first_1, &count_1 );
+	if ( rc != 0 )
+	{
+		LOGERR ( klogInt, rc, "VCursorIdRange( acc #1 ) failed" );
+	}
+	else
+	{
+		int64_t  first_2;
+		uint64_t count_2;
+		rc = VCursorIdRange( cur_2, 0, &first_2, &count_2 );
+		if ( rc != 0 )
+		{
+			LOGERR ( klogInt, rc, "VCursorIdRange( acc #2 ) failed" );
+		}
+		else
+		{
+			struct num_gen * rows_to_diff = NULL;
+			if ( dctx -> rows != NULL )
+			{
+				num_gen_copy( dctx -> rows, &rows_to_diff );
+			}
+
+			if ( rows_to_diff == NULL )
+			{
+				/* no row-range given create the number generator from the discovered range, if it is the same */
+				if ( first_1 != first_2 || count_1 != count_2 )
+				{
+					rc = RC( rcExe, rcNoTarg, rcResolving, rcParam, rcInvalid );
+					PLOGERR( klogInt, ( klogInt, rc, "row-ranges differ: $(first1).$(count1) != $(first2).$(count2)",
+							 "first1=%ld,count1=%lu,first2=%ld,count2=%lu",
+							 first_1, count_1, first_2, count_2 ) );
+				}
+				else
+				{
+					rc = num_gen_make_from_range( &rows_to_diff, first_1, count_1 );
+					if ( rc != 0 )
+					{
+						LOGERR ( klogInt, rc, "num_gen_make_from_range() failed" );
+					}
+				}
+			}
+			else
+			{
+				/* row-range given, clip the rows be the 2 ranges ( even if they are not the same ) */
+				rc = num_gen_trim( rows_to_diff, first_1, count_1 );
+				if ( rc != 0 )
+				{
+					LOGERR ( klogInt, rc, "num_gen_trim( acc #1 ) failed" );
+				}
+				else if ( first_1 != first_2 || count_1 != count_2 )
+				{
+					rc = num_gen_trim( rows_to_diff, first_2, count_2 );
+					if ( rc != 0 )
+					{
+						LOGERR ( klogInt, rc, "num_gen_trim( acc #2 ) failed" );
+					}
+				}
+			}
+			
+			if ( rc == 0 )
+			{
+				const struct num_gen_iter * iter;
+				rc = num_gen_iterator_make( rows_to_diff, &iter );
+				if ( rc != 0 )
+				{
+					LOGERR ( klogInt, rc, "num_gen_iterator_make() failed" );
+				}
+				else
+				{
+					/* *************************************************************** */
+					rc = diff_columns_iter( defs, cur_1, cur_2, dctx, iter );
+					/* *************************************************************** */
+					num_gen_iterator_destroy( iter );
+				}
+			}
+			
+			if ( rows_to_diff != NULL )
+				num_gen_destroy( rows_to_diff );
+		}
+	}
+	return rc;
+}
+
+
+static rc_t diff_columns( col_defs * defs, const VTable * tab_1, const VTable * tab_2, struct diff_ctx * dctx )
+{
+	const VCursor * cur_1;
+	rc_t rc = VTableCreateCursorRead( tab_1, &cur_1 );
+	if ( rc != 0 )
+	{
+		LOGERR ( klogInt, rc, "VTableCreateCursorRead( acc #1 ) failed" );
+	}
+	else
+	{
+		const VCursor * cur_2;
+		rc = VTableCreateCursorRead( tab_2, &cur_2 );	
+		if ( rc != 0 )
+		{
+			LOGERR ( klogInt, rc, "VTableCreateCursorRead( acc #2 ) failed" );
+		}
+		else
+		{
+			rc = col_defs_add_to_cursor( defs, cur_1, 0 );
+			if ( rc != 0 )
+			{
+				LOGERR ( klogInt, rc, "failed to add all requested columns to cursor of 1st accession" );
+			}
+			else
+			{
+				rc = col_defs_add_to_cursor( defs, cur_2, 1 );
+				if ( rc != 0 )
+				{
+					LOGERR ( klogInt, rc, "failed to add all requested columns to cursor of 2nd accession" );
+				}
+				else
+				{
+					rc = VCursorOpen( cur_1 );
+					if ( rc != 0 )
+					{
+						LOGERR ( klogInt, rc, "VCursorOpen( acc #1 ) failed" );
+					}
+					else
+					{
+						rc = VCursorOpen( cur_2 );
+						if ( rc != 0 )
+						{
+							LOGERR ( klogInt, rc, "VCursorOpen( acc #2 ) failed" );
+						}
+						else
+						{
+							/* ************************************************** */
+							rc = diff_columns_cursor( defs, cur_1, cur_2, dctx );
+							/* ************************************************** */
+						}
+					}
+				}
+			}
+			VCursorRelease( cur_2 );
+		}
+		VCursorRelease( cur_1 );
+	}
+	return 0;
+}
+
+
+static rc_t compare_2_namelists( const KNamelist * cols_1, const KNamelist * cols_2, const KNamelist ** cols_to_diff, bool intersect )
+{
+	uint32_t count_1;
+	rc_t rc = KNamelistCount( cols_1, &count_1 );
+	if ( rc != 0 )
+	{
+		LOGERR ( klogInt, rc, "KNamelistCount() failed" );
+	}
+	else
+	{
+		uint32_t count_2;
+		rc = KNamelistCount( cols_2, &count_2 );
+		if ( rc != 0 )
+		{
+			LOGERR ( klogInt, rc, "KNamelistCount() failed" );
+		}
+		else if ( count_1 != count_2 )
+		{
+			if ( intersect )
+			{
+				rc = nlt_build_intersect( cols_1, cols_2, cols_to_diff );
+				if ( rc != 0 )
+				{
+					LOGERR ( klogInt, rc, "nlt_build_intersect() failed" );	
+				}
+			}
+			else
+			{
+				rc = RC( rcExe, rcNoTarg, rcResolving, rcParam, rcInvalid );
+				PLOGERR( klogInt, ( klogInt, rc,
+						 "the accessions have not the same number of columns! ( $(count1) != $(count2) )\n",
+						 "count1=%u,count2=%u", count_1, count_2 ) );
+				*cols_to_diff = NULL;
+			}
+		}
+		else
+		{
+			uint32_t found_in_both;
+			bool equal = nlt_compare_namelists( cols_1, cols_2, &found_in_both );
+			if ( equal )
+			{
+				rc = nlt_copy_namelist( cols_1, cols_to_diff );
+				if ( rc != 0 )
+				{
+					LOGERR ( klogInt, rc, "nlt_copy_namelist() failed" );
+				}
+			}
+			else
+			{
+				if ( intersect )
+				{
+					rc = nlt_build_intersect( cols_1, cols_2, cols_to_diff );
+					if ( rc != 0 )
+					{
+						LOGERR ( klogInt, rc, "nlt_build_intersect() failed" );	
+					}
+				}
+				else
+				{
+					rc = RC( rcExe, rcNoTarg, rcResolving, rcParam, rcInvalid );
+					KOutMsg( "the 2 accessions have not the same set of columns! ( %u found in both )\n", found_in_both );
+				}
+			}
+		}
+	}
+	return rc;
+}
+
+
+static rc_t extract_columns_from_2_namelists( const KNamelist * cols_1, const KNamelist * cols_2, const char * sub_set,
+											  const KNamelist ** cols_to_diff )
+{
+	rc_t rc = nlt_make_namelist_from_string( cols_to_diff, sub_set );
+	if ( rc != 0 )
+	{
+		LOGERR ( klogInt, rc, "cannot parse set of requested columns" );
+	}
+	else
+	{
+		if ( nlt_namelist_is_sub_set_in_full_set( *cols_to_diff, cols_1 ) )
+		{
+			if ( nlt_namelist_is_sub_set_in_full_set( *cols_to_diff, cols_2 ) )
+			{
+				rc = 0;
+			}
+			else
+			{
+				rc = RC( rcExe, rcNoTarg, rcResolving, rcParam, rcInvalid );
+				LOGERR ( klogInt, rc, "accession #2 is missing some of the requested columns" );
+			}
+		}
+		else
+		{
+			rc = RC( rcExe, rcNoTarg, rcResolving, rcParam, rcInvalid );
+			LOGERR ( klogInt, rc, "accession #1 is missing some of the requested columns" );
+		}
+	}
+	return rc;
+}
+
+
+static rc_t perform_table_diff( const VTable * tab_1, const VTable * tab_2, struct diff_ctx * dctx )
+{
+	col_defs * defs;
+	rc_t rc = col_defs_init( &defs );
+	if ( rc != 0 )
+	{
+		LOGERR ( klogInt, rc, "col_defs_init() failed" );
+	}
+	else
+	{
+		KNamelist * cols_1;
+		rc_t rc = VTableListReadableColumns( tab_1, &cols_1 );
+		if ( rc != 0 )
+		{
+			LOGERR ( klogInt, rc, "VTableListReadableColumns( acc #1 ) failed" );
+		}
+		else
+		{
+			KNamelist * cols_2;
+			rc = VTableListReadableColumns( tab_2, &cols_2 );
+			if ( rc != 0 )
+			{
+				LOGERR ( klogInt, rc, "VTableListReadableColumns( acc #2 ) failed" );
+			}
+			else
+			{
+				const KNamelist * cols_to_diff;
+				
+				if ( dctx -> columns == NULL )
+					rc = compare_2_namelists( cols_1, cols_2, &cols_to_diff, dctx -> intersect );
+				else
+					rc = extract_columns_from_2_namelists( cols_1, cols_2, dctx -> columns, &cols_to_diff );
+
+				if ( rc == 0 && dctx -> excluded != NULL )
+				{
+					const KNamelist * temp;
+					rc = nlt_remove_strings_from_namelist( cols_to_diff, &temp, dctx -> excluded );
+					KNamelistRelease( cols_to_diff );
+					cols_to_diff = temp;
+				}
+				
+				if ( rc == 0 )
+				{
+					rc = col_defs_fill( defs, cols_to_diff );
+					if ( rc == 0 )
+					{
+						/* ******************************************* */
+						rc = diff_columns( defs, tab_1, tab_2, dctx );
+						/* ******************************************* */
+					}
+					KNamelistRelease( cols_to_diff );
+				}
+				
+				KNamelistRelease( cols_2 );
+			}
+			KNamelistRelease( cols_1 );
+		}
+		col_defs_destroy( defs );
+	}
+	return 0;
+}
+
+
+static rc_t perform_database_diff_on_this_table( const VDatabase * db_1, const VDatabase * db_2,
+												 struct diff_ctx * dctx, const char * table_name )
+{
+	/* we want to compare only the table wich name was given at the commandline */
+	const VTable * tab_1;
+	rc_t rc = VDatabaseOpenTableRead ( db_1, &tab_1, "%s", table_name );
+	if ( rc != 0 )
+	{
+		PLOGERR( klogInt, ( klogInt, rc, 
+				 "VDatabaseOpenTableRead( [$(acc)].$(tab) ) failed",
+				 "acc=%s,tab=%s", dctx -> src1, table_name ) );
+	}
+	else
+	{
+		const VTable * tab_2;
+		rc = VDatabaseOpenTableRead ( db_2, &tab_2, "%s", table_name );
+		if ( rc != 0 )
+		{
+			PLOGERR( klogInt, ( klogInt, rc, 
+					 "VDatabaseOpenTableRead( [$(acc)].$(tab) ) failed",
+					 "acc=%s,tab=%s", dctx -> src2, table_name ) );
+		}
+		else
+		{
+			/* ******************************************* */
+			rc = perform_table_diff( tab_1, tab_2, dctx );
+			/* ******************************************* */
+			VTableRelease( tab_2 );
+		}
+		VTableRelease( tab_1 );
+	}
+	return rc;
+}
+
+
+static rc_t perform_database_diff( const VDatabase * db_1, const VDatabase * db_2, struct diff_ctx * dctx )
+{
+	rc_t rc = 0;
+	if ( dctx -> table != NULL )
+	{
+		/* we want to compare only the table wich name was given at the commandline */
+		/* ************************************************************************** */
+		rc = perform_database_diff_on_this_table( db_1, db_2, dctx, dctx -> table );
+		/* ************************************************************************** */
+	}
+	else
+	{
+		/* we want to compare all tables of the 2 accession, if they have the same set of tables */
+		KNamelist * table_set_1;
+		rc = VDatabaseListTbl ( db_1, &table_set_1 );
+		if ( rc != 0 )
+		{
+			LOGERR ( klogInt, rc, "VDatabaseListTbl( acc #1 ) failed" );
+		}
+		else
+		{
+			KNamelist * table_set_2;
+			rc = VDatabaseListTbl ( db_2, &table_set_2 );
+			if ( rc != 0 )
+			{
+				LOGERR ( klogInt, rc, "VDatabaseListTbl( acc #2 ) failed" );
+			}
+			else
+			{
+				if ( nlt_compare_namelists( table_set_1, table_set_2, NULL ) )
+				{
+					/* the set of tables match, walk the first set, and perform a diff on each table */
+					uint32_t count;
+					rc = KNamelistCount( table_set_1, &count );
+					if ( rc != 0  )
+					{
+						LOGERR ( klogInt, rc, "KNamelistCount() failed" );
+					}
+					else
+					{
+						uint32_t idx;
+						for ( idx = 0; idx < count && rc == 0; ++idx )
+						{
+							const char * table_name;
+							rc = KNamelistGet( table_set_1, idx, &table_name );
+							if ( rc != 0 )
+							{
+								LOGERR ( klogInt, rc, "KNamelistGet() failed" );
+							}
+							else
+							{
+								rc = KOutMsg( "\ncomparing table: %s\n", table_name );
+								if ( rc == 0 )
+								{
+									/* ********************************************************************* */
+									rc = perform_database_diff_on_this_table( db_1, db_2, dctx, table_name );
+									/* ********************************************************************* */									
+								}
+							}
+						}
+					}
+				}
+				else
+				{
+					LOGERR ( klogInt, rc, "the 2 databases have not the same set of tables" );
+				}
+				KNamelistRelease( table_set_2 );
+			}
+			KNamelistRelease( table_set_1 );
+		}
+	}
+	return rc;
+}
+
+
+/***************************************************************************
+    perform the actual diffing
+***************************************************************************/
+static rc_t perform_diff( struct diff_ctx * dctx )
+{
+    KDirectory * dir;
+    rc_t rc = KDirectoryNativeDir( &dir );
+	if ( rc != 0 )
+	{
+		LOGERR ( klogInt, rc, "KDirectoryNativeDir() failed" );
+	}
+	else
+    {
+		const VDBManager * vdb_mgr;
+		rc = VDBManagerMakeRead ( &vdb_mgr, dir );
+		if ( rc != 0 )
+		{
+			LOGERR ( klogInt, rc, "VDBManagerMakeRead() failed" );
+		}
+		else
+		{
+			VSchema * vdb_schema = NULL;
+			rc = VDBManagerMakeSRASchema( vdb_mgr, &vdb_schema );
+			if ( rc != 0 )
+			{
+				LOGERR ( klogInt, rc, "VDBManagerMakeSRASchema() failed" );
+			}
+			else
+			{
+				const VDatabase * db_1;
+				/* try to open it as a database */
+				rc = VDBManagerOpenDBRead ( vdb_mgr, &db_1, vdb_schema, "%s", dctx -> src1 );
+				if ( rc == 0 )
+				{
+					const VDatabase * db_2;
+					rc = VDBManagerOpenDBRead ( vdb_mgr, &db_2, vdb_schema, "%s", dctx -> src2 );
+					if ( rc == 0 )
+					{
+						/* ******************************************** */
+						rc = perform_database_diff( db_1, db_2, dctx );
+						/* ******************************************** */
+						VDatabaseRelease( db_2 );
+					}
+					else
+					{
+						LOGERR ( klogInt, rc, "accession #1 opened as database, but accession #2 cannot be opened as database" );
+					}
+					VDatabaseRelease( db_1 );
+				}
+				else
+				{
+					const VTable * tab_1;
+					rc = VDBManagerOpenTableRead( vdb_mgr, &tab_1, vdb_schema, "%s", dctx -> src1 );
+					if ( rc == 0 )
+					{
+						const VTable * tab_2;
+						rc = VDBManagerOpenTableRead( vdb_mgr, &tab_2, vdb_schema, "%s", dctx -> src2 );
+						if ( rc == 0 )
+						{
+							/* ******************************************** */
+							rc = perform_table_diff( tab_1, tab_2, dctx );
+							/* ******************************************** */
+							VTableRelease( tab_2 );
+						}
+						else
+						{
+							LOGERR ( klogInt, rc, "accession #1 opened as table, but accession #2 cannot be opened as table" );
+						}
+						VTableRelease( tab_1 );
+					}
+					else
+					{
+						LOGERR ( klogInt, rc, "accession #1 cannot be opened as table or database" );
+					}
+				}
+				VSchemaRelease( vdb_schema );
+			}
+			VDBManagerRelease( vdb_mgr );
+		}
+		KDirectoryRelease( dir );
+	}
+	return rc;
+}
+
+
+/***************************************************************************
+    Main:
+***************************************************************************/
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args * args;
+    rc_t rc = ArgsMakeAndHandle ( &args, argc, argv, 1,
+                                  MyOptions, sizeof MyOptions / sizeof ( OptDef ) );
+    if ( rc != 0 )
+	{
+		LOGERR ( klogInt, rc, "ArgsMakeAndHandle failed()" );
+	}
+    else
+    {
+        struct diff_ctx dctx;
+
+        KLogHandlerSetStdErr();
+        init_diff_ctx( &dctx );
+        rc = gather_diff_ctx( &dctx, args );
+        if ( rc == 0 )
+        {
+            rc = report_diff_ctx( &dctx );
+			if ( rc == 0 )
+			{
+				/* ***************************** */
+				rc = perform_diff( &dctx );
+				/* ***************************** */				
+			}
+        }
+        release_diff_ctx( &dctx );
+
+        ArgsWhack ( args );
+    }
+    return rc;
+}
diff --git a/tools/vdb-dump/.gitignore b/tools/vdb-dump/.gitignore
new file mode 100644
index 0000000..1ec835e
--- /dev/null
+++ b/tools/vdb-dump/.gitignore
@@ -0,0 +1,2 @@
+test3
+vdbdump
diff --git a/tools/vdb-dump/Makefile b/tools/vdb-dump/Makefile
new file mode 100644
index 0000000..b47f869
--- /dev/null
+++ b/tools/vdb-dump/Makefile
@@ -0,0 +1,92 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/vdb-dump
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+	vdb-dump
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#-------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# vdb-dump
+#  vdb dump tool
+#
+VDB_DUMP_SRC = \
+	vdb-dump-context \
+	vdb-dump-coldefs \
+	vdb-dump-tools \
+	vdb-dump-str \
+	vdb-dump-helper \
+	vdb-dump-filter \
+	vdb-dump-formats \
+	vdb-dump-redir \
+	vdb-dump-fastq \
+	vdb-dump-bin \
+	vdb-dump-interact \
+	vdb-dump-repo \
+	vdb-dump-print \
+	vdb_info \
+	vdb-dump
+
+VDB_DUMP_OBJ = \
+	$(addsuffix .$(OBJX),$(VDB_DUMP_SRC))
+
+VDB_DUMP_LIB = \
+	-skapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lm
+
+$(BINDIR)/vdb-dump: $(VDB_DUMP_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(VDB_DUMP_LIB)
+
diff --git a/tools/vdb-dump/help.txt b/tools/vdb-dump/help.txt
new file mode 100644
index 0000000..d3d6f7e
--- /dev/null
+++ b/tools/vdb-dump/help.txt
@@ -0,0 +1,352 @@
+vdb-dump extended help
+
+(1) dumping a vdb-table:
+
+    the only mandatory option to vdb-dump is the name of the object to dump:
+
+    vdb-dump OBJECT
+
+    the OBJECT can be:
+
+        a) absolute or relative path to a vdb-table (a directory)
+
+            on linux:   vdb-dump /panfs/traces/sra0/SRR/000000/SRR000001
+
+
+            on windows: vdb-dump \\panfs\traces\sra0\SRR\000000\SRR000001
+                        vdb-dump Y:\sra0\SRR\000000\SRR000001
+                        ( if "\\panfs\traces" is mapped to the driveletter Y on your windows-pc )
+
+        b) absolute or relative path to a file containing a vdb-table
+
+            on linux/windows:   vdb-dump SRR044989.sra
+
+        c) an accession
+
+            on linux/windows:   vdb-dump SRR000001
+            
+            outside NCBI you need internet access to reach accessions stored at NCBI and you need
+            remote access enabled in your configuration
+
+       If you specify only the object, vdb-dump will dump all columns for all rows to the standard-output.
+
+
+The --table / -T option:
+========================
+vdb-dump is designed to operate on a vdb-database. A vdb-database can contain more then one table.
+If you do not specify the table-name, vdb-dump will first try to interpret the given object as a vdb-database
+( and try to dump the table "SEQUENCE", if that table does not exist: the first table it finds in this database ).
+If this try (silently) fails, because the given object is not a database, vdb-dump will try to interpret
+the given object as a table. If the object is not a vdb-database or vdb-table, the tool will fail.
+
+
+The --rows / -R option:
+=======================
+With this option you can restrict which rows will be dumped.
+vdb-dump file.sra -R 5      ... will dump only row number 5
+vdb-dump file.sra -R 5-20   ... will dump rows number 5 to number 20 (15 rows)
+The ranges can be mixed:
+vdb-dump file.sra -R 5,7-20,200-201,300,305  ... will dump these rows/ranges
+If you omit the range, vdb-dump will output all rows.
+
+
+The --columns -C option:
+========================
+With this option you can restrict which columns per row will be dumped.
+vdb-dump file.sra -C NAME,READ ... will dump only the columns NAME and READ per row
+
+
+the --exclude -x option:
+========================
+If you want to dump all columns, except some specific ones.
+vdb-dump file.sra -x READ,RD_FILTER ... will dump all columns but the READ-column
+and the RD_FILTER-column.
+
+
+The --row_id_on -I option:
+==========================
+vdb-dump does not output the row-id per default, it has to be switched on with this option:
+
+vdb-dump SRR000001 -R1 -CNAME,SPOT_LEN
+    NAME: EM7LVYS01C1LWG
+SPOT_LEN: 255
+
+vdb-dump SRR000001 -R1 -CNAME,SPOT_LEN -I
+ROW-ID = 1
+    NAME: EM7LVYS01C1LWG
+SPOT_LEN: 255
+
+
+The --line_feed -l option:
+==========================
+vdb-dump separates the rows by one empty line (line-feed) per default:
+
+vdb-dump SRR000001 -R1-3 -CNAME,SPOT_LEN   
+    NAME: EM7LVYS01C1LWG
+SPOT_LEN: 255
+
+    NAME: EM7LVYS01B2EMP
+SPOT_LEN: 248
+
+    NAME: EM7LVYS01C2YO0
+SPOT_LEN: 307
+
+with this option you can change that:
+
+vdb-dump SRR000001 -R1-3 -CNAME,SPOT_LEN -l2
+    NAME: EM7LVYS01C1LWG
+SPOT_LEN: 255
+
+
+    NAME: EM7LVYS01B2EMP
+SPOT_LEN: 248
+
+
+    NAME: EM7LVYS01C2YO0
+SPOT_LEN: 307
+
+
+The --colname_off -N option:
+============================
+vdb-dump prints the name of every column in front of the it's data:
+
+vdb-dump SRR000001 -R1-2 -CNAME,SPOT_LEN
+    NAME: EM7LVYS01C1LWG
+SPOT_LEN: 255
+
+    NAME: EM7LVYS01B2EMP
+SPOT_LEN: 248
+
+With this option it prints only the data:
+
+vdb-dump SRR000001 -R1-2 -CNAME,SPOT_LEN -N 
+EM7LVYS01C1LWG
+255
+
+EM7LVYS01B2EMP
+248
+
+
+The --in_hex -X option:
+=======================
+With this option all numeric outputs are printed as hexadecimal numbers:
+
+$vdb-dump SRR000001 -R1-2 -CNAME,SPOT_LEN -X
+    NAME: EM7LVYS01C1LWG
+SPOT_LEN: 0xFF
+
+    NAME: EM7LVYS01B2EMP
+SPOT_LEN: 0xF8
+
+
+The --dna_baese -D option:
+==========================
+With this option you can force columns into printed as DNA-base "ACGT",
+but only if the column has a datatype with more than one dimension.
+If a column has a datatype with a dimension of 2, each dimension 1 bit,
+it is automatically printed as DNA-base.
+
+
+The --max_length -M option:
+===========================
+With this options you can truncate the output of columns longer than this limit.
+
+vdb-dump SRR000001 -R1-2 -CREAD
+READ: TCAGGGGGGAGCTTAAATTTGAAACTAGAAAAATTTTGAACAAAATAATCATAATTGTTAGCTGATGAAAAACTAGAAAAGATTTTCTGAGTGTTGGAACCGAAAGGGTTTGAATTCAAACCCTTTCGGTTCCAACGGTATCCCGTAGTGTGCATTCATCCCTGCTCTGGATACAGTCAGCTCCCAAATTCCATAAACAACTCCTTTGTAAGTAACCTCCTTTTGACAGGGGGTACTGAGCGGGCTGGCAAGGCN
+
+READ: TCAGGGGGGGGTTACACGTGCAGATTTGTTACACGGGTGTACTGTGAGGTTTGGGGTACGAATGATCCCGTTACCTAGATAGTGAGCATGGAACCCGTTGGAACCGAAAGGGTTTGAATTCAAACCCTTTCGGTTCCAACAATGTGCAGGGCTCAGGTCAGCATTAGGGTCAGGTTCTTAGGAAAAGAAAGAGCAAAAACAATGAAACACAATACAAAGTAAAGAACACTGAGCGGGCTGGCAAGGCN
+
+vdb-dump SRR000001 -R1-2 -CREAD -M40
+READ: TCAGGGGGGAGCTTAAATTTGAAACTAGAA ...
+
+READ: TCAGGGGGGGGTTACACGTGCAGATTTGTT ...
+
+
+The --indent_with -i option:
+============================
+With this option you can limit the length of the output-line and force a left-edge
+indenting.
+
+vdb-dump $vdb-dump SRR000001 -R1-2 -CREAD -i80
+READ: TCAGGGGGGAGCTTAAATTTGAAACTAGAAAAATTTTGAACAAAATAATCATAATTGTTAGCTGATGAAAAACT
+      AGAAAAGATTTTCTGAGTGTTGGAACCGAAAGGGTTTGAATTCAAACCCTTTCGGTTCCAACGGTATCCCGTAG
+      TGTGCATTCATCCCTGCTCTGGATACAGTCAGCTCCCAAATTCCATAAACAACTCCTTTGTAAGTAACCTCCTT
+      TTGACAGGGGGTACTGAGCGGGCTGGCAAGGCN
+
+READ: TCAGGGGGGGGTTACACGTGCAGATTTGTTACACGGGTGTACTGTGAGGTTTGGGGTACGAATGATCCCGTTAC
+      CTAGATAGTGAGCATGGAACCCGTTGGAACCGAAAGGGTTTGAATTCAAACCCTTTCGGTTCCAACAATGTGCA
+      GGGCTCAGGTCAGCATTAGGGTCAGGTTCTTAGGAAAAGAAAGAGCAAAAACAATGAAACACAATACAAAGTAA
+      AGAACACTGAGCGGGCTGGCAAGGCN
+
+
+The --format -f option:
+=======================
+This selects other than the default-output formating:
+
+csv = comma-separated on one line
+---------------------------------
+vdb-dump SRR000001 -R1-2 -CNAME,SPOT_LEN -fcsv
+EM7LVYS01C1LWG,255
+EM7LVYS01B2EMP,248
+
+xml = xml-section
+-----------------
+vdb-dump $vdb-dump SRR000001 -R1-2 -CNAME,SPOT_LEN -fxml
+<row_1>
+ <NAME>
+EM7LVYS01C1LWG
+ </NAME>
+ <SPOT_LEN>
+255
+ </SPOT_LEN>
+</row_1>
+
+<row_2>
+ <NAME>
+EM7LVYS01B2EMP
+ </NAME>
+ <SPOT_LEN>
+248
+ </SPOT_LEN>
+</row_2>
+
+json = json format
+------------------
+vdb-dump $vdb-dump SRR000001 -R1-2 -CNAME,SPOT_LEN -fjson
+{
+"row_id": 1,
+"NAME":"EM7LVYS01C1LWG",
+"SPOT_LEN":255
+},
+
+{
+"row_id": 2,
+"NAME":"EM7LVYS01B2EMP",
+"SPOT_LEN":248
+},
+
+piped = format friendly to beeing piped into other processes
+------------------------------------------------------------
+vdb-dump $vdb-dump SRR000001 -R1-2 -CNAME,SPOT_LEN -fpiped
+1, NAME: "EM7LVYS02FOYNU"
+1, SPOT_LEN: 284
+
+2, NAME: "EM7LVYS02GCAPL"
+2, SPOT_LEN: 262
+
+sra-dump = simulates the output of a deprecated tool
+------------------------------------------------------------
+vdb-dump $vdb-dump SRR000001 -R1-2 -CNAME,SPOT_LEN -fsra-dump
+1, NAME: EM7LVYS02FOYNU
+1, SPOT_LEN: 284
+
+2, NAME: EM7LVYS02GCAPL
+2, SPOT_LEN: 262
+
+fastq = produces fastq-output
+( the table needs to have a READ- and a QUALITY column, no splitting supported )
+-------------------------------------------------------
+vdb-dump $vdb-dump SRR000001 -R1 -ffastq
+ at SRR000001.1 EM7LVYS02FOYNU length=284
+TCAGATTCTCCTAGCCTACATCCGTACGAGTTAGCGTGGGATTACGAGGTGCACACCATTTCATTCCGTACGGGTAAATTTTTGTATTTTTAGCAGACGGCAGGGTTTCACCATGGTTGACCAACGTACTAATCTTGAACTCCTGACCTCAAGTGATTTGCCTGCCTTCAGCCTCCCAAAGTGACTGGGTATTACAGATGTGAGCGAGTTTGTGCCCAAGCCTTATAAGTAAATTTATAAATTTACATAATTTAAATGACTTATGCTTAGCGAAATAGGGTAAG
++SRR000001.1 EM7LVYS02FOYNU length=284
+=<8<85)9=9/3-8?68<7=8<3657747==49==+;FB2;A;5:'*>69<:74)9.;C?+;<B<B;(<';FA/;C>*GC8/%9<=GC8.#=2:5:16D==<EA2EA.;5=44<;2C=5;@73&<<2;5;6+9<?776+:24'26:7,<9A;=:;0C>*6?7<<C=D=<52?:9CA2CA23<2<;3CA12:A<9414<7<<6;99<2/=9#<;9B at 27.;=6>:77>:1<A>+CA138?<)C at 2166:A<B?->:%<<9<;33<;6?9;<;4=:%<$CA1+1%1
+
+fasta = produces fasta-output
+( the table needs to have a READ column )
+-------------------------------------------------------
+vdb-dump SRR000001 -R1 -f fasta
+>SRR000001.1 EM7LVYS02FOYNU length=284
+TCAGATTCTCCTAGCCTACATCCGTACGAGTTAGCGTGGGATTACGAGGTGCACACCATTTCATTCCGTA
+CGGGTAAATTTTTGTATTTTTAGCAGACGGCAGGGTTTCACCATGGTTGACCAACGTACTAATCTTGAAC
+TCCTGACCTCAAGTGATTTGCCTGCCTTCAGCCTCCCAAAGTGACTGGGTATTACAGATGTGAGCGAGTT
+TGTGCCCAAGCCTTATAAGTAAATTTATAAATTTACATAATTTAAATGACTTATGCTTAGCGAAATAGGG
+TAAG
+
+
+The --without_sra -n option:
+============================
+With this option you can switch off the special treatment (translation) of certain column-types
+
+vdb-dump SRR000001 -R1 -C SPOT_DESC,PLATFORM
+SPOT_DESC: spot_len=255, fixed_len=0, signal_len=400, clip_qual_right=235, num_reads=4
+ PLATFORM: SRA_PLATFORM_454
+
+vdb-dump SRR000001 -R1 -C SPOT_DESC,PLATFORM -n
+SPOT_DESC: [255, 0, 0, 0, 144, 1, 235, 0, 4, 0, 0, 0, 0, 0, 0, 0]
+ PLATFORM: 1
+
+
+The --table_enum -E option:
+===========================
+If the object is a vdb-database, enumerate the tables it contains.
+
+
+The --version -V option:
+========================
+Print the version of the vdb-manager used by vdb-dump.
+
+vdb-dump -V
+vdb-dump: 2.5.1
+
+
+The column_enum_short -o option:
+================================
+Enumerates the columns and the default type of each column
+vdb-dump SRR000001 -o
+
+BASE_COUNT (U64)
+BIO_BASE_COUNT (U64)
+CLIP_ADAPTER_LEFT (INSDC:coord:one)
+etc.
+
+
+The column_enum -O option:
+==========================
+Enumerates the columns and all available type of each column
+
+vdb-dump SRR000001 -O
+SRR000001.01 : (032 bits [01],      Int)  CLIP_QUALITY_LEFT
+      (INSDC:coord:one)
+   CLIP_QUALITY_LEFT.type[0] = INSDC:coord:one (dflt)
+   CLIP_QUALITY_LEFT.type[1] = U16
+   CLIP_QUALITY_LEFT.type[2] = INSDC:coord:zero
+
+SRR000001.02 : (032 bits [01],      Int)  CLIP_QUALITY_RIGHT
+      (INSDC:coord:one)
+  CLIP_QUALITY_RIGHT.type[0] = INSDC:coord:one (dflt)
+  CLIP_QUALITY_RIGHT.type[1] = U16
+  CLIP_QUALITY_RIGHT.type[2] = INSDC:coord:zero
+
+SRR000001.03 : (008 bits [01],     Uint)  COLOR_MATRIX
+      (U8)
+        COLOR_MATRIX.type[0] = U8 (dflt)
+
+etc.
+
+The --id_range -r option:
+=========================
+Print the row-range that a table contains.
+
+vdb-dump SRR000001 -r
+id-range: first-row = 1, row-count = 470985
+
+
+The --info option:
+==================
+prints a summary of meta-data about the accession
+
+vdb-dump SRR000001 --info
+acc    : SRR000001
+path   : /somepath/SRR/000000/SRR000001
+size   : 312,527,083
+type   : Table
+platf  : SRA_PLATFORM_454
+SEQ    : 470,985
+SCHEMA : NCBI:SRA:_454_:tbl:v2#1.0.7
+TIME   : 0x0000000055248a41 (04/07/2015 21:54)
+FMT    : SFF
+FMTVER : 2.4.5
+LDR    : sff-load.2.4.5
+LDRVER : 2.4.5
+LDRDATE: Feb 25 2015 (2/25/2015 0:0)
diff --git a/tools/vdb-dump/vdb-boot.c b/tools/vdb-dump/vdb-boot.c
new file mode 100644
index 0000000..9f86e42
--- /dev/null
+++ b/tools/vdb-dump/vdb-boot.c
@@ -0,0 +1,448 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <vdb/database.h>
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <klib/container.h>
+#include <klib/vector.h>
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <fmtdef.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#define WITH_DNA
+
+/********************************************************************
+write procedure:
+(1)....KDirectoryNativeDir           ... make a root directory
+(2)....KDirectoryOpenDirUpdate       ... chroot to specific directory
+(3)....VDBManagerMakeUpdate          ... make manager for update
+(4)....VDBManagerMakeSchema          ... make schema
+(5)....VSchemaParseFile              ... load a schema from file
+(6)....VDBManagerCreateDB            ... let the manager create a DB
+(7)....VDatabaseCreateTable          ... create a Table for the DB
+(8)....VTableCreateCursorWrite       ... create a writable cursor
+(9)....VCursorAddColumn              ... add the column to write
+(10)...VCursorOpen                   ... open the cursor
+-----LOOP-----
+ (11)....VCursorOpenRow              ... open the row
+ (12)....VCursorWrite                ... write the data
+ (13)....VCursorCommitRow            ... commit the row
+ (14)....VCursorCloseRow             ... close the row
+-----END LOOP-----
+(15)...VCursorCommit                 ... commit the cursor
+(16)...VCursorRelease                ... destroy the cursor
+(17)...VTableRelease                 ... destroy the table
+(18)...VDatabaseRelease              ... destroy the database
+(19)...VSchemaRelease                ... destroy the schema
+(20)...VDBManagerRelease             ... destroy the manager
+(21)...KDirectoryRelease             ... destroy the chroot'ed dir
+(22)...KDirectoryRelease             ... destroy the root dir
+********************************************************************/
+
+
+/********************************************************************
+helper function needed by schema-dump
+********************************************************************/
+static
+rc_t CC flush ( void *dst, const void *buffer, size_t bsize )
+{
+    FILE *f = dst;
+    fwrite ( buffer, 1, bsize, f );
+    return 0;
+}
+
+/********************************************************************
+helper function to display failure or success message
+********************************************************************/
+static
+void display_rescode( const rc_t res, const char* failure, const char* success )
+{
+    if ( res != 0 )
+    {
+        if ( failure )
+            LOGERR( klogInt, res, failure );
+    }
+    else
+    {
+        if ( success )
+            LOGMSG( klogInfo, success );
+    }
+}
+
+/********************************************************************
+helper function to display the manager version
+********************************************************************/
+static
+rc_t show_manager_version( VDBManager *my_manager )
+{
+    uint32_t version;
+    rc_t res = VDBManagerVersion( my_manager, &version );
+    if ( res != 0 )
+    {
+        LOGERR ( klogInt, res, "failed to determine vdb mgr version" );
+    }
+    else
+    {
+        PLOGMSG ( klogInfo, ( klogInfo, "manager-version = $(maj).$(min).$(rel)",
+                  "vers=0x%X,maj=%u,min=%u,rel=%u"
+                              , version
+                              , version >> 24
+                              , ( version >> 16 ) & 0xFF
+                              , version & 0xFFFF ));
+    }
+    return res;
+}
+
+/* write context */
+typedef struct write_ctx
+{
+    uint32_t idx_line;
+    uint32_t idx_line_nr;
+    uint32_t idx_dna;
+    uint32_t idx_quality;
+    uint32_t line_nr;
+    void *buffer;
+    uint32_t count;
+} write_ctx;
+typedef write_ctx* p_write_ctx;
+
+p_write_ctx make_write_ctx( void )
+{
+    return calloc( 1, sizeof( write_ctx ) );
+}
+
+/********************************************************************
+helper function to write one data-cunk into one new row
+********************************************************************/
+static
+rc_t write_data_row( VCursor *my_cursor, p_write_ctx ctx )
+{
+    rc_t res = VCursorOpenRow( my_cursor );
+    /* display_rescode( res, "failed to open row", "row opened" ); */
+    if ( res == 0 )
+    {
+        /* write the ascii-line*/
+        res = VCursorWrite( my_cursor, ctx->idx_line, 8, ctx->buffer, 0, ctx->count );
+        display_rescode( res, "failed to write ascii-line", NULL );
+
+        /* write the line-number (zero-based) */
+        res = VCursorWrite( my_cursor, ctx->idx_line_nr, 32, &(ctx->line_nr), 0, 1 );
+        display_rescode( res, "failed to write line-nr", NULL );
+
+#ifdef WITH_DNA
+        /* write the ascii-line interpreted as dna-data */
+        res = VCursorWrite( my_cursor, ctx->idx_dna, 2, ctx->buffer, 0, ctx->count << 2 );
+        display_rescode( res, "failed to write dna-data", NULL );
+#endif
+
+        /* write the ascii-line interpreted as quality (array of 4 byte) */
+        res = VCursorWrite( my_cursor, ctx->idx_quality, 32, ctx->buffer, 0, ctx->count >> 2 );
+        display_rescode( res, "failed to write quality", NULL );
+        
+        res = VCursorCommitRow( my_cursor );
+        display_rescode( res, "failed to commit row", NULL );
+
+        res = VCursorCloseRow( my_cursor );
+    }
+    return res;
+}
+
+#define BUFLEN 120
+
+/********************************************************************
+reads the data-src-file in chunks and writes it with "write_data_chunk"
+********************************************************************/
+static
+rc_t write_data_loop( VCursor *my_cursor, p_write_ctx ctx, const KFile *data_src )
+{
+    char buf[ BUFLEN ];
+    char* read_dest = buf;
+    uint64_t file_pos = 0;
+    size_t num_to_read = BUFLEN - 1;
+    size_t num_read;
+    size_t chars_in_buf = 0;
+    size_t written = 0;
+    rc_t res;
+
+    ctx->line_nr = 0;
+    ctx->buffer = buf;
+    do {
+        res = KFileRead( data_src, file_pos, read_dest, num_to_read, &num_read );
+        if ( res != 0 )
+        {
+            LOGERR ( klogInt, res, "failed to read form KFile" );
+            num_read = 0;
+        }
+        else
+        {
+            if ( num_read > 0 )
+            {
+                char* lf;
+                chars_in_buf+=num_read;
+                file_pos+=num_read;
+                do {
+                    buf[chars_in_buf] = 0;
+                    lf = strchr( buf, 0x0A );
+                    if ( lf != NULL )
+                    {
+                        ctx->count = ( lf - buf );
+                        res = write_data_row( my_cursor, ctx );
+                        if ( res == 0 )
+                        {
+                            ctx->line_nr++;
+                            written += ctx->count;
+                            chars_in_buf -= ( ctx->count + 1 );
+                            memmove( buf, ++lf, chars_in_buf );
+                        }
+                        else
+                        {
+                            num_read = 0; /* terminates the outer do-loop */
+                        }
+                    }
+                } while ( ( lf != NULL )&&( num_read > 0 ) );
+                read_dest = buf + chars_in_buf;
+                num_to_read = BUFLEN - ( chars_in_buf + 1 );
+            }
+        }
+    } while ( num_read > 0 );
+
+    PLOGMSG ( klogInfo, ( klogInfo, "written $(n_lines) lines = $(n_bytes) bytes",
+                          "n_lines=%lu,n_bytes=%lu", ctx->line_nr, written ));
+    if ( ctx->line_nr > 0 )
+    {
+        res = VCursorCommit( my_cursor );
+        display_rescode( res, "failed to commit cursor", NULL );
+    }
+    return res;
+}
+
+
+/********************************************************************
+creates a writable cursor, adds 1 column, opens cursor and calls the write-loop
+********************************************************************/
+static
+rc_t create_cursor_and_write( VTable *my_table, const KFile *data_src  )
+{
+    VCursor *my_cursor;
+    p_write_ctx ctx = make_write_ctx();
+    uint32_t open_cols = 0, should_open = 0;
+    
+    rc_t res = VTableCreateCursorWrite( my_table, &my_cursor, kcmInsert );
+    display_rescode( res, "failed to create write-cursor", NULL );
+    if ( res == 0 )
+    {
+        res = VCursorAddColumn( my_cursor, &ctx->idx_line, "LINE" );
+        display_rescode( res, "failed to add LINE-column", NULL );
+        if ( res == 0 ) open_cols++;
+        should_open++;
+        
+        res = VCursorAddColumn( my_cursor, &ctx->idx_line_nr, "LINE_NR" );
+        display_rescode( res, "failed to add LINE_NR-column", NULL );
+        if ( res == 0 ) open_cols++;
+        should_open++;
+        
+#ifdef WITH_DNA
+        res = VCursorAddColumn( my_cursor, &ctx->idx_dna, "READ" );
+        display_rescode( res, "failed to add READ-column", NULL );
+        if ( res == 0 ) open_cols++;
+        should_open++;        
+#endif
+
+        res = VCursorAddColumn( my_cursor, &ctx->idx_quality, "QUALITY" );
+        display_rescode( res, "failed to add QUALITY-column", NULL );
+        if ( res == 0 ) open_cols++;        
+        should_open++;
+
+        if ( open_cols == should_open )
+        {
+            res = VCursorOpen( my_cursor );
+            display_rescode( res, "failed to open cursor", NULL );
+            if ( res == 0 )
+            {
+                res = write_data_loop( my_cursor, ctx, data_src );
+            }
+        }
+        res = VCursorRelease( my_cursor );
+    }
+    free( ctx );
+    return res;
+}
+
+/********************************************************************
+let the manager create a database with a schema, calls cursor-creation and write
+********************************************************************/
+static
+rc_t create_dababase_from_schema( VDBManager *my_manager, VSchema *my_schema, 
+                                  const char* db_path, const KFile *data_src  )
+{
+    VDatabase *my_database;
+    VTable *my_table;
+    rc_t res = VDBManagerCreateDB( my_manager, &my_database, my_schema, 
+                                   "DATA2DUMP:MyDatabase", kcmInit | kcmParents, "%s", db_path );
+    display_rescode( res, "failed to create database", "database created" );
+    if ( res == 0 )
+    {
+        res = VDatabaseCreateTable( my_database, &my_table, "test", kcmInit | kcmParents, "Tab1" );
+        display_rescode( res, "failed to create table", "table created" );
+        if ( res == 0 )
+        {
+            create_cursor_and_write( my_table, data_src );
+            res = VTableRelease( my_table );
+            display_rescode( res, "failed to release table", "table released" );
+        }
+        res = VDatabaseRelease( my_database );
+        display_rescode( res, "failed to release database", "database released" );
+    }
+    return res;
+} 
+
+/********************************************************************
+let the manager create a schema, calls dababase-creation etc.
+********************************************************************/
+static
+rc_t create_schema( VDBManager *my_manager, const char *schema_path, 
+                    const char *db_path, const KFile *data_src  )
+{
+    VSchema *schema;
+    /* empty schema, unless $VDB_ROOT tells it
+       where to find include files */
+    rc_t res = VDBManagerMakeSchema ( my_manager, & schema );
+    display_rescode( res, "failed to create schema", "schema created" );
+    if ( res == 0 )
+    {
+        /* load the schema from text */
+        res = VSchemaParseFile ( schema, "%s", schema_path );
+        if ( res != 0 )
+        {
+            PLOGERR ( klogInt,  (klogInt, res, "failed to load schema file '$(path)'",
+                                 "path=%s", schema_path ));
+        }
+        else
+        {
+            res = VSchemaDump ( schema, sdmPrint, "DATA2DUMP:MyDatabase", flush, stdout );
+            if ( res != 0 )
+                LOGERR ( klogInt, res, "failed to dump schema" );
+            else
+            {
+                res = create_dababase_from_schema( my_manager, schema, db_path, data_src );
+            }
+        }
+        res = VSchemaRelease ( schema );
+        display_rescode( res, "failed to release schema", "schema release" );
+    }
+    return res;
+}
+
+static
+rc_t build_test_db ( const char *schema_path, const char *db_path, const char *src_file )
+{
+    KDirectory *wd;
+    rc_t res = KDirectoryNativeDir ( & wd );
+    if ( res != 0 )
+        LOGERR ( klogSys, res, "failed to determine wd" );
+    else
+    {
+        KDirectory *root;
+
+#if 1 /* SHOULD WORK WHEN DISABLED
+         ENABLED FOR NOW AS A WORKAROUND */
+        root = wd;
+        KDirectoryAddRef ( root );
+#else
+        res = KDirectoryOpenDirUpdate ( wd, & root, true, "." );
+#endif
+        if ( res != 0 )
+            LOGERR ( klogSys, res, "failed to chroot to wd" );
+        else
+        {
+            VDBManager *my_manager;
+            res = VDBManagerMakeUpdate ( & my_manager, root );
+            if ( res != 0 )
+                LOGERR ( klogInt, res, "failed to open vdb manager" );
+            else
+            {
+                const KFile *data_src;
+                res = KDirectoryOpenFileRead ( wd, &data_src, "%s", src_file );
+                display_rescode( res, "failed to open src-file", "src-file opened" );
+                if ( res == 0 )
+                {
+                    show_manager_version( my_manager );
+                    res = create_schema( my_manager, schema_path, db_path, data_src );
+                    VDBManagerRelease ( my_manager );
+                    KFileRelease( data_src );
+                }
+            }
+            KDirectoryRelease ( root );
+        }
+        KDirectoryRelease ( wd );
+    }
+    return res;
+}
+
+
+ver_t CC KAppVersion ( void )
+{
+    return 0;
+}
+
+rc_t CC Usage (const Args * args)
+{
+    return 0;
+}
+
+rc_t CC Version ( const Args * args )
+{
+    return 0;
+}
+
+/****************************************************************************************
+
+                    argv[1]            argv[2]    argv[3]
+usage  : vdb-boot   shema              db_path    source-file
+example: vdb-boot   vdb-boot.vschema   test       vdb-boot.c
+
+ ***************************************************************************************/
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    if ( argc != 4 )
+    {
+        LOGMSG ( klogFatal, "aaaah!" );
+        return -1;
+    }
+    return build_test_db ( argv[1], argv[2], argv[3] );
+}
diff --git a/tools/vdb-dump/vdb-boot.vschema b/tools/vdb-dump/vdb-boot.vschema
new file mode 100644
index 0000000..7542a56
--- /dev/null
+++ b/tools/vdb-dump/vdb-boot.vschema
@@ -0,0 +1,52 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+version 1;
+
+include 'vdb/built-in.vschema';
+include 'insdc/insdc.vschema';
+
+/* it was INSDC:dna:2na */
+
+table DATA2DUMP : MyTable #1.0
+{
+    extern column ascii LINE = .LINE;
+    physical column ascii .LINE = LINE;
+
+    extern column U32 LINE_NR = .LINE_NR;
+    physical column U32 .LINE_NR = LINE_NR;
+
+    extern column INSDC:dna:2na READ = .READ;
+    physical column INSDC:dna:2na .READ = READ;
+
+    extern column I8[4] QUALITY = .QUALITY;
+    physical column I8[4] .QUALITY = QUALITY;
+};
+
+database DATA2DUMP : MyDatabase #1.0
+{
+    table DATA2DUMP : MyTable #1 test;
+};
diff --git a/tools/vdb-dump/vdb-dump-bin.c b/tools/vdb-dump/vdb-dump-bin.c
new file mode 100644
index 0000000..ea8cf85
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-bin.c
@@ -0,0 +1,1496 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <kapp/args.h>
+
+#include <insdc/insdc.h>
+
+#include <kdb/manager.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/buffile.h>
+
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <klib/num-gen.h>
+
+#include "vdb-dump-context.h"
+#include "vdb-dump-coldefs.h"
+
+#include <os-native.h>
+#include <sysalloc.h>
+#include <stdlib.h>
+#include <string.h>
+
+rc_t Quitting( void );
+
+static rc_t write_to_file( KFile * f, uint64_t * pos, const void * src, uint32_t len, const char * name )
+{
+    size_t num_writ;
+    size_t num_to_write = len;
+    rc_t rc = KFileWriteAll( f, *pos, src, num_to_write, &num_writ );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogInt, ( klogInt, rc,
+                 "failed to write to column $(col_name) at #%(pos)", "col_name=%s,pos=%ld", name, *pos ) );
+    }
+    else
+        *pos += num_writ;
+    return rc;
+}
+
+
+static rc_t read_from_file( const KFile * f, uint64_t pos, const uint8_t * dst,
+                            size_t dst_size, size_t * num_read, const char * name )
+{
+    rc_t rc = KFileReadAll ( f, pos, ( void * )dst, dst_size, num_read );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogInt, ( klogInt, rc,
+                 "failed to read from column $(col_name) at #%(pos)", "col_name=%s,pos=%ld", name, pos ) );
+    }
+    return rc;
+}
+
+
+typedef struct wr_bin_idx
+{
+    /* the file-handles */
+    KFile * bin;
+    KFile * idx;
+    const char name[ 256 ];
+    uint64_t bin_pos;
+    uint64_t idx_pos;
+    uint32_t first_len;
+    bool multi_value;
+} wr_bin_idx;
+
+
+static void release_wr_bin_idx( wr_bin_idx * c )
+{
+    if ( c != NULL )
+    {
+        if ( c->bin != NULL )
+            KFileRelease( c->bin );
+        if ( c->idx != NULL )
+            KFileRelease( c->idx );
+    }
+}
+
+
+static rc_t create_wr_bin_idx( KDirectory * dir, const char * col_name, wr_bin_idx * c )
+{
+    rc_t rc;
+
+    c->bin = NULL;
+    c->idx = NULL;
+    rc = KDirectoryCreateFile ( dir, &c->bin, false, 0664, kcmInit, "COL_%s.bin", col_name );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogInt, ( klogInt, rc,
+                 "failed to create bin-file for column $(col_name)",
+                 "col_name=%s", col_name ) );
+    }
+    else
+    {
+        rc = KDirectoryCreateFile ( dir, &c->idx, false, 0664, kcmInit, "COL_%s.idx", col_name );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogInt, ( klogInt, rc,
+                     "failed to create index-file for column $(col_name)",
+                     "col_name=%s", col_name ) );
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        KFile * f = c->bin;
+        rc = KBufWriteFileMakeWrite ( &c->bin, f, 1024 * 1024 * 16 );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogInt, ( klogInt, rc,
+                     "failed to create buffer for bin-file for column $(col_name)",
+                     "col_name=%s", col_name ) );
+        }
+    }
+
+    if ( rc == 0 )
+    {
+        string_copy( ( char * )c->name, sizeof c->name,
+                     col_name, string_len( col_name, string_size( col_name ) ) );
+        c->bin_pos = 0;
+        c->idx_pos = 0;
+        c->first_len = 0xFFFFFFFF;
+        c->multi_value = false;
+    }
+
+    if ( rc != 0 )
+        release_wr_bin_idx( c );
+
+    return rc;
+}
+
+
+static rc_t write_bin_idx( wr_bin_idx * c, const void * data, uint32_t len )
+{
+    /* first write to index-file the position where the data will be written to */
+    rc_t rc = write_to_file( c->idx, &c->idx_pos, &c->bin_pos, sizeof c->bin_pos, c->name );
+
+    /* the write the length, it can be zero! */
+    if ( rc == 0 )
+        rc = write_to_file( c->idx, &c->idx_pos, &len, sizeof len, c->name );
+
+    /* the write the data, only if we have data! */
+    if ( rc == 0 && len > 0 )
+        rc = write_to_file( c->bin, &c->bin_pos, data, len, c->name );
+
+    if ( rc == 0 )
+    {
+        if ( c->first_len == 0xFFFFFFFF )
+            c->first_len = len;
+        else if( c->first_len != len )
+            c->multi_value = true;
+    }
+
+    return rc;
+}
+
+/*
+static rc_t set_bin_filesize( wr_bin_idx * c, uint64_t new_size )
+{
+    rc_t rc = KFileSetSize( c->bin, new_size );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogInt, ( klogInt, rc,
+                 "failed to set size of file to >%(fsize) for column $(col_name)", "fsize=%ld,col_name=%s", new_size, c->name ) );
+    }
+    return rc;
+}
+
+static rc_t write_bin_at( wr_bin_idx * c, uint64_t pos, const void * data, uint32_t len )
+{
+    uint64_t pos1 = pos;
+    rc_t rc = write_to_file( c->bin, &pos1, data, len, c->name );
+
+    if ( rc == 0 && c->first_len == 0xFFFFFFFF )
+        c->first_len = len;
+
+    return rc;
+}
+*/
+
+static rc_t truncate_idx( wr_bin_idx * c )
+{
+    uint64_t pos = 0;
+    rc_t rc = write_to_file( c->idx, &pos, &c->first_len, sizeof c->first_len, c->name );
+    if ( rc == 0 )
+    {
+        rc = KFileSetSize ( c->idx, pos );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogInt, ( klogInt, rc,
+                     "failed to truncate the index-file for column $(col_name)",
+                     "col_name=%s", c->name ) );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdi_create_dir( const char * path, KDirectory ** dir )
+{
+    rc_t rc = KDirectoryNativeDir ( dir );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "KDirectoryNativeDir() failed" );
+    }
+    else
+    {
+        if ( path != NULL )
+        {
+            rc = KDirectoryCreateDir ( *dir, 0775, kcmOpen, "%s", path );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogInt, ( klogInt, rc,
+                         "failed to create directory $(dir_name)", "dir_name=%s", path ) );
+                KDirectoryRelease ( *dir );
+            }
+            else
+            {
+                KDirectory * tmp = *dir;
+                rc = KDirectoryOpenDirUpdate ( tmp, dir, false, "%s", path );
+                if ( rc != 0 )
+                {
+                    PLOGERR( klogInt, ( klogInt, rc,
+                             "failed to open directory $(dir_name)", "dir_name=%s", path ) );
+                }
+                KDirectoryRelease( tmp );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdi_dump_column_rows( const char * path, const VCursor *cur, p_col_def col, struct num_gen * rows )
+{
+    KDirectory * dir;
+
+    rc_t rc = vdi_create_dir( path, &dir );
+    if ( rc == 0 )
+    {
+        wr_bin_idx wr;
+
+        rc = create_wr_bin_idx( dir, col->name, &wr );
+        if ( rc == 0 )
+        {
+            const struct num_gen_iter * iter;
+            rc = num_gen_iterator_make( rows, &iter );
+            if ( rc != 0 )
+                LOGERR( klogInt, rc, "VCursorIdRange() failed" );
+            else
+            {
+                int64_t row_id;
+                while ( rc == 0 && num_gen_iterator_next( iter, &row_id, &rc ) )
+                {
+                    rc = Quitting();
+                    if ( rc == 0 )
+                    {
+                        const void * base;
+                        uint32_t elem_bits, boff, row_len;
+                        rc = VCursorCellDataDirect ( cur, row_id, col->idx,
+                                                     &elem_bits, &base, &boff, &row_len );
+                        if ( rc != 0 )
+                        {
+                            PLOGERR( klogInt, ( klogInt, rc,
+                                     "VCursorCellData( col:$(col_name) at row #$(row_nr) ) failed",
+                                     "col_name=%s,row_nr=%ld", col->name, row_id ) );
+                        }
+                        else
+                        {
+                            uint32_t len = ( elem_bits >> 3 ) * row_len;
+                            rc = write_bin_idx( &wr, base, len );
+                        }
+                    }
+                }
+                num_gen_iterator_destroy( iter );
+            }
+
+            if ( rc == 0 && !wr.multi_value )
+                rc = truncate_idx( &wr );
+
+            release_wr_bin_idx( &wr );
+        }
+        KDirectoryRelease ( dir );
+    }
+    return rc;
+}
+
+
+static rc_t vdi_dump_column( const p_dump_context ctx, const VCursor *cur, p_col_def col )
+{
+    int64_t  first;
+    uint64_t count;
+
+    rc_t rc = VCursorIdRange( cur, col->idx, &first, &count );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "VCursorIdRange() failed" );
+    }
+    else if ( count > 0 )
+    {
+        struct num_gen * rows = NULL;
+
+
+        if ( ctx->row_range == NULL )
+        {
+            /* the user did not give us a row-range, we take all rows of this column... */
+            rc = num_gen_make_from_range( &rows, first, count );
+            if ( rc != 0 )
+                LOGERR( klogInt, rc, "num_gen_make_from_range() failed" );
+        }
+        else
+        {
+            /* the gave us a row-range, we parse that string and check agains the real row-count... */
+            rc = num_gen_make_from_str( &rows, ctx->row_range );
+            if ( rc != 0 )
+                LOGERR( klogInt, rc, "num_gen_make_from_str() failed" );
+            else
+            {
+                rc = num_gen_trim( rows, first, count );
+                if ( rc != 0 )
+                    LOGERR( klogInt, rc, "num_gen_trim() failed" );
+            }
+        }
+
+        if ( rc == 0 )
+        {
+            if ( num_gen_empty( rows ) )
+            {
+                rc = RC( rcExe, rcDatabase, rcReading, rcRange, rcEmpty );
+                LOGERR( klogInt, rc, "no row-range(s) defined" );
+            }
+            else
+            {
+                rc = vdi_dump_column_rows( ctx->output_path, cur, col, rows ); /* <---- */
+            }
+        }
+
+        if ( rows != NULL )
+            num_gen_destroy( rows );
+    }
+    return rc;
+}
+
+
+static rc_t vdi_dump_columns( const p_dump_context ctx, const VCursor *cur, p_col_defs col_defs )
+{
+    rc_t rc = 0;
+    const Vector * v = &( col_defs->cols );
+    uint32_t start = VectorStart( v );
+    uint32_t end = start + VectorLength( v );
+    uint32_t i;
+
+    for ( i = start; rc == 0 && i < end; ++i )
+    {
+        p_col_def col = VectorGet ( v, i );
+        if ( col != NULL )
+            rc = vdi_dump_column( ctx, cur, col ); /* <---- */
+    }
+    return rc;
+}
+
+
+static uint32_t vdi_extract_or_parse_columns( const VTable * tab,
+                                              p_col_defs col_defs,
+                                              const char * columns,
+                                              const char * excluded_columns )
+{
+    uint32_t count = 0;
+    if ( col_defs != NULL )
+    {
+        bool cols_unknown = ( ( columns == NULL ) || ( string_cmp( columns, 1, "*", 1, 1 ) == 0 ) );
+        if ( cols_unknown )
+            /* the user does not know the column-names or wants all of them */
+            count = vdcd_extract_from_table( col_defs, tab );
+        else
+            /* the user knows the names of the wanted columns... */
+            count = vdcd_parse_string( col_defs, columns, tab );
+
+        if ( excluded_columns != NULL )
+            vdcd_exclude_these_columns( col_defs, excluded_columns );
+    }
+    return count;
+}
+
+
+rc_t vdi_dump_opened_table( const p_dump_context ctx, const VTable * tab )
+{
+    rc_t rc = 0;
+
+    col_defs * col_defs;
+
+    if ( !vdcd_init( &col_defs, ctx->max_line_len ) )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        LOGERR( klogInt, rc, "col_defs_init() failed" );
+    }
+    else
+    {
+        uint32_t n = vdi_extract_or_parse_columns( tab, col_defs, ctx->columns, ctx->excluded_columns );
+        if ( n < 1 )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+            LOGERR( klogInt, rc, "vdm_extract_or_parse_columns() failed" );
+        }
+        else
+        {
+            const VCursor * cur;
+
+            rc = VTableCreateCachedCursorRead( tab, &cur, ctx->cur_cache_size );
+            if ( rc != 0 )
+            {
+                LOGERR( klogInt, rc, "VTableCreateCachedCursorRead() failed" );
+            }
+            else
+            {
+                n = vdcd_add_to_cursor( col_defs, cur );
+                if ( n < 1 )
+                {
+                    rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+                    LOGERR( klogInt, rc, "vdcd_add_to_cursor() failed" );
+                }
+                else
+                {
+                    rc = VCursorOpen( cur );
+                    if ( rc != 0 )
+                    {
+                        LOGERR( klogInt, rc, "VCursorOpen() failed" );
+                    }
+                    else
+                        rc = vdi_dump_columns( ctx, cur, col_defs );    /* <---- */
+                }
+            }
+            VCursorRelease( cur );
+        }
+        vdcd_destroy( col_defs );
+    }
+
+    return rc;
+}
+
+
+typedef struct rd_bin_idx
+{
+    /* the file-handles */
+    const KFile * bin;
+    const KFile * idx;
+    const char name[ 256 ];
+    uint64_t bin_file_size;
+    uint64_t idx_file_size;
+    uint64_t row_count;
+    uint32_t common_len;
+} rd_bin_idx;
+
+
+static void release_rd_bin_idx( rd_bin_idx * c )
+{
+    if ( c != NULL )
+    {
+        if ( c->bin != NULL )
+            KFileRelease( c->bin );
+        if ( c->idx != NULL )
+            KFileRelease( c->idx );
+    }
+}
+
+
+static rc_t create_rd_bin_idx( const KDirectory * dir, const char * col_name, rd_bin_idx * c )
+{
+    rc_t rc;
+
+    rc = KDirectoryOpenFileRead( dir, &c->bin, "COL_%s.bin", col_name );
+    if ( rc != 0 )
+    {
+        PLOGERR( klogInt, ( klogInt, rc,
+                 "failed to open bin-file for column $(col_name)", "col_name=%s", col_name ) );
+    }
+    else
+    {
+        rc = KDirectoryOpenFileRead( dir, &c->idx, "COL_%s.idx", col_name );
+        if ( rc != 0 )
+        {
+            PLOGERR( klogInt, ( klogInt, rc,
+                     "failed to open idx-file for column $(col_name)", "col_name=%s", col_name ) );
+        }
+        else
+        {
+            string_copy( ( char * )c->name, sizeof c->name,
+                         col_name, string_len( col_name, string_size( col_name ) ) );
+            c->bin_file_size = 0;
+            c->idx_file_size = 0;
+            c->row_count = 0;
+            c->common_len = 0;
+
+            rc = KFileSize ( c->bin, &c->bin_file_size );
+            if ( rc != 0 )
+            {
+                PLOGERR( klogInt, ( klogInt, rc,
+                         "failed to get filesize of bin-file for $(col_name)", "col_name=%s", col_name ) );
+            }
+            else
+            {
+                rc = KFileSize ( c->idx, &c->idx_file_size );
+                if ( rc != 0 )
+                {
+                    PLOGERR( klogInt, ( klogInt, rc,
+                             "failed to get filesize of idx-file for $(col_name)", "col_name=%s", col_name ) );
+                }
+                else
+                {
+                    /* calculate row-count */
+                    if ( c->idx_file_size == sizeof c->common_len )
+                    {
+                        size_t num_read;
+                        /* read the common length out of index-file at pos 0, divide bin_file_size by common length */
+                        rc = read_from_file( c->idx, 0, (void *)&c->common_len, sizeof c->common_len, &num_read, col_name );
+                        if ( rc == 0 && c->common_len > 0 )
+                            c->row_count = ( c->bin_file_size / c->common_len );
+                    }
+                    else
+                    {
+                        /* divide the idx_file_size by 12 ( 8 bytes offset + 4 bytes length per row ) */
+                        c->row_count = ( c->idx_file_size / 12 );
+                    }
+                }
+            }
+        }
+
+        if ( rc != 0 )
+            release_rd_bin_idx( c );
+    }
+    return rc;
+}
+
+
+static rc_t rd_bin_idx_row_len( rd_bin_idx * c, uint64_t row_id, uint32_t * row_len )
+{
+    rc_t rc = 0;
+    size_t num_read;
+
+    if ( c->common_len > 0 )
+        *row_len = c->common_len;
+    else
+        rc = read_from_file( c->idx, ( row_id * 12 ) + 8, (void *)row_len, sizeof *row_len, &num_read, c->name );
+
+    return rc;
+}
+
+
+static rc_t rd_bin_idx_row_pos( rd_bin_idx * c, uint64_t row_id, uint64_t * row_pos )
+{
+    rc_t rc = 0;
+    size_t num_read;
+
+    if ( c->common_len > 0 )
+        *row_pos = ( c->common_len * row_id );
+    else
+        rc = read_from_file( c->idx, row_id * 12, (void *)row_pos, sizeof *row_pos, &num_read, c->name );
+
+    return rc;
+}
+
+
+static rc_t rd_bin_idx_64( rd_bin_idx * c, uint64_t row_id, uint64_t * values, uint32_t value_count )
+{
+    uint64_t pos;
+    size_t num_read;
+
+    rc_t rc = rd_bin_idx_row_pos( c, row_id, &pos );
+    if ( rc == 0 )
+        rc = read_from_file( c->bin, pos, (void *)values,
+                             ( sizeof *values ) * value_count, &num_read, c->name );
+
+    return rc;
+}
+
+
+static rc_t rd_bin_idx_32( rd_bin_idx * c, uint64_t row_id, uint32_t * values, uint32_t value_count )
+{
+    uint64_t pos;
+    size_t num_read;
+
+    rc_t rc = rd_bin_idx_row_pos( c, row_id, &pos );
+    if ( rc == 0 )
+        rc = read_from_file( c->bin, pos, (void *)values,
+                             ( sizeof *values ) * value_count, &num_read, c->name );
+
+    return rc;
+}
+
+
+static rc_t rd_bin_idx_8( rd_bin_idx * c, uint64_t row_id, uint8_t * values, uint32_t value_count )
+{
+    uint64_t pos;
+    size_t num_read;
+
+    rc_t rc = rd_bin_idx_row_pos( c, row_id, &pos );
+    if ( rc == 0 )
+        rc = read_from_file( c->bin, pos, (void *)values,
+                             ( sizeof *values ) * value_count, &num_read, c->name );
+
+    return rc;
+}
+
+
+static rc_t rd_bin_idx_char( rd_bin_idx * c, uint64_t row_id, uint32_t offset, uint32_t len,
+                             char * dst, size_t dst_size, size_t * num_read )
+{
+    uint64_t pos;
+    uint32_t row_len;
+
+    rc_t rc = rd_bin_idx_row_pos( c, row_id, &pos );
+
+    if ( rc == 0 )
+    {
+        pos += offset;
+        if ( len > 0 )
+            row_len = len;
+        else
+            rc = rd_bin_idx_row_len( c, row_id, &row_len );
+    }
+
+    if ( rc == 0 )
+    {
+        if ( row_len >= dst_size )
+            row_len = dst_size - 1;
+        rc = read_from_file( c->bin, pos, (void *)dst, row_len, num_read, c->name );
+    }
+    return rc;
+}
+
+
+/* -----------------------------------------------------------------------------------------------------------
+ phase 1
+
+ input:     COL_PRIMARY_ALIGNMENT_ID.[bin] from SEQUENCE
+            COL_REF_POS.[bin] from PRIMARY_ALIGNMENT
+            COL_REF_ID.[bin] from PRIMARY_ALIGNMENT
+            COL_REF_ORIENTATION.[bin] from PRIMARY_ALIGNMENT
+            COL_SEQ_READ_ID.[bin] from PRIMARY_ALIGNMENT
+
+ output:    TMP_MATE_REF_POS.[bin] ... the reference position of the mate
+            TMP_MATE_REF_ID.[bin]  ... the reference id ( idx to name ) of the mate
+            TMP_MATE_REF_ORIENTATION.[bin] ... the orientation of the mate
+
+ */
+typedef struct p1_ctx
+{
+    /* the input files */
+
+    /* originated from PRIMARY_ALIGNMENT-table */
+    rd_bin_idx SEQ_SPOT_ID;
+    rd_bin_idx MAPQ;
+    rd_bin_idx REF_POS;
+    rd_bin_idx REF_LEN;
+    rd_bin_idx CIGAR;
+    rd_bin_idx READ;
+    rd_bin_idx REF_ID;
+    rd_bin_idx REF_ORIENTATION;
+
+    /* originated from SEQUENCE-table */
+    rd_bin_idx PRIMARY_ALIGNMENT_ID;
+    rd_bin_idx QUALITY;
+    rd_bin_idx READ_LEN;
+    rd_bin_idx READ_START;
+    rd_bin_idx READ_FILTER;
+
+    /* originated from REFERENCE-table */
+    rd_bin_idx NAME;
+} p1_ctx;
+
+
+static void release_p1_ctx( p1_ctx * p1_ctx )
+{
+    release_rd_bin_idx( &p1_ctx->SEQ_SPOT_ID );
+    release_rd_bin_idx( &p1_ctx->MAPQ );
+    release_rd_bin_idx( &p1_ctx->REF_POS );
+    release_rd_bin_idx( &p1_ctx->REF_LEN );
+    release_rd_bin_idx( &p1_ctx->CIGAR );
+    release_rd_bin_idx( &p1_ctx->READ );
+    release_rd_bin_idx( &p1_ctx->REF_ID );
+    release_rd_bin_idx( &p1_ctx->REF_ORIENTATION );
+
+    release_rd_bin_idx( &p1_ctx->PRIMARY_ALIGNMENT_ID );
+    release_rd_bin_idx( &p1_ctx->QUALITY );
+    release_rd_bin_idx( &p1_ctx->READ_LEN );
+    release_rd_bin_idx( &p1_ctx->READ_START );
+    release_rd_bin_idx( &p1_ctx->READ_FILTER );
+
+    release_rd_bin_idx( &p1_ctx->NAME );
+}
+
+
+static rc_t init_p1_ctx( KDirectory * dir, p1_ctx * p1_ctx )
+{
+    rc_t rc;
+
+    memset( p1_ctx, 0, sizeof * p1_ctx );
+
+    rc = create_rd_bin_idx( dir, "SEQ_SPOT_ID", &p1_ctx->SEQ_SPOT_ID );
+    if ( rc == 0 )
+        rc = create_rd_bin_idx( dir, "MAPQ", &p1_ctx->MAPQ );
+    if ( rc == 0 )
+        rc = create_rd_bin_idx( dir, "REF_POS", &p1_ctx->REF_POS );
+    if ( rc == 0 )
+        rc = create_rd_bin_idx( dir, "REF_LEN", &p1_ctx->REF_LEN );
+    if ( rc == 0 )
+        rc = create_rd_bin_idx( dir, "CIGAR_SHORT", &p1_ctx->CIGAR );
+    if ( rc == 0 )
+        rc = create_rd_bin_idx( dir, "READ", &p1_ctx->READ );
+    if ( rc == 0 )
+        rc = create_rd_bin_idx( dir, "REF_ID", &p1_ctx->REF_ID );
+    if ( rc == 0 )
+        rc = create_rd_bin_idx( dir, "REF_ORIENTATION", &p1_ctx->REF_ORIENTATION );
+
+    if ( rc == 0 )
+        rc = create_rd_bin_idx( dir, "PRIMARY_ALIGNMENT_ID", &p1_ctx->PRIMARY_ALIGNMENT_ID );
+    if ( rc == 0 )
+        rc = create_rd_bin_idx( dir, "QUALITY", &p1_ctx->QUALITY );
+    if ( rc == 0 )
+        rc = create_rd_bin_idx( dir, "READ_LEN", &p1_ctx->READ_LEN );
+    if ( rc == 0 )
+        rc = create_rd_bin_idx( dir, "READ_START", &p1_ctx->READ_START );
+    if ( rc == 0 )
+        rc = create_rd_bin_idx( dir, "READ_FILTER", &p1_ctx->READ_FILTER );
+
+    if ( rc == 0 )
+        rc = create_rd_bin_idx( dir, "NAME", &p1_ctx->NAME );
+
+
+    if ( rc != 0 )
+        release_p1_ctx( p1_ctx );
+    return rc;
+}
+
+
+static uint32_t vdi_calc_flag( bool each_fragment_aligned,
+                               bool this_fragment_not_aligned,
+                               bool mate_not_aligned,
+                               bool this_fragment_reversed,
+                               bool mate_reversed,
+                               bool this_fragment_is_first,
+                               bool this_fragment_is_last,
+                               bool this_fragment_is_secondary,
+                               bool this_fragment_not_passing_quality_control,
+                               bool this_fragment_is_pcr_or_duplicate )
+{
+    uint32_t res = 0x001;
+    if ( each_fragment_aligned ) res |= 0x002;
+    if ( this_fragment_not_aligned ) res |= 0x004;
+    if ( mate_not_aligned ) res |= 0x008;
+    if ( this_fragment_reversed ) res |= 0x010;
+    if ( mate_reversed ) res |= 0x020;
+    if ( this_fragment_is_first ) res |= 0x040;
+    if ( this_fragment_is_last ) res |= 0x080;
+    if ( this_fragment_is_secondary ) res |= 0x100;
+    if ( this_fragment_not_passing_quality_control ) res |= 0x200;
+    if ( this_fragment_is_pcr_or_duplicate ) res |= 0x400;
+    return res;
+}
+
+
+static int32_t vdi_calc_tlen( const uint32_t self_ref_pos,
+                              const uint32_t mate_ref_pos,
+                              const uint32_t self_ref_len,
+                              const uint32_t mate_ref_len,
+                              const bool on_same_ref,
+                              const bool first_read )
+{
+    int32_t res = 0;
+    if ( on_same_ref && ( self_ref_pos > 0 ) && ( mate_ref_pos > 0 ) )
+    {
+        const uint32_t self_right = self_ref_pos + self_ref_len;
+        const uint32_t mate_right = mate_ref_pos + mate_ref_len;
+        const uint32_t leftmost   = ( self_ref_pos < mate_ref_pos ) ? self_ref_pos : mate_ref_pos;
+        const uint32_t rightmost  = ( self_right > mate_right ) ? self_right : mate_right;
+        const uint32_t tlen = rightmost - leftmost;
+
+        /* The standard says, "The leftmost segment has a plus sign and the rightmost has a minus sign." */
+        if ( ( self_ref_pos <= mate_ref_pos && self_right >= mate_right ) || /* mate fully contained within self or */
+             ( mate_ref_pos <= self_ref_pos && mate_right >= self_right ) )  /* self fully contained within mate; */
+        {
+            if ( self_ref_pos < mate_ref_pos || ( first_read && self_ref_pos == mate_ref_pos ) )
+                res = tlen;
+            else
+                res = -( ( int32_t )tlen );
+        }
+        else if ( ( self_right == mate_right && mate_ref_pos == leftmost ) || /* both are rightmost, but mate is leftmost */
+                   ( self_right == rightmost ) )
+        {
+            res = -( ( int32_t )tlen );
+        }
+        else
+            res = tlen;
+    }
+    return res;
+}
+
+
+static rc_t vdi_get_SEQ_SPOT_ID( p1_ctx * p1_ctx, uint64_t alignment_id, uint64_t * dst )
+{
+    rc_t rc = rd_bin_idx_64( &p1_ctx->SEQ_SPOT_ID, alignment_id, dst, 1 );
+    return rc;
+}
+
+
+static rc_t vdi_get_MATE_ID( p1_ctx * p1_ctx, uint64_t seq_spot_id_1_based, uint64_t alignment_id_1_based,
+                            uint64_t * dst, bool * first )
+{
+    uint64_t AL_IDS[ 2 ];
+    rc_t rc = rd_bin_idx_64( &p1_ctx->PRIMARY_ALIGNMENT_ID, seq_spot_id_1_based - 1, AL_IDS, 2 );
+    if ( rc == 0 )
+    {
+        if ( AL_IDS[ 0 ] == alignment_id_1_based )
+        {
+            *dst = AL_IDS[ 1 ];
+            *first = true;
+        }
+        else if ( AL_IDS[ 1 ] == alignment_id_1_based )
+        {
+            *dst = AL_IDS[ 0 ];
+            *first = false;
+        }
+        else
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+            PLOGERR( klogInt, ( klogInt, rc,
+                     "given ALIGNMENT_ID #$(al_id) not found in SEQUENCE-ID #$(seq_id)",
+                     "al_id=%lu,seq_id=%lu", alignment_id_1_based, seq_spot_id_1_based ) );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdi_get_REF_ID( p1_ctx * p1_ctx, uint64_t alignment_id_zero_based, uint64_t * dst )
+{
+    rc_t rc = rd_bin_idx_64( &p1_ctx->REF_ID, alignment_id_zero_based, dst, 1 );
+    return rc;
+}
+
+
+static rc_t vdi_get_REF_POS( p1_ctx * p1_ctx, uint64_t alignment_id, uint32_t * dst )
+{
+    rc_t rc = rd_bin_idx_32( &p1_ctx->REF_POS, alignment_id, dst, 1 );
+    if ( rc == 0 ) *dst += 1;
+    return rc;
+}
+
+
+static rc_t vdi_get_REF_LEN( p1_ctx * p1_ctx, uint64_t alignment_id, uint32_t * dst )
+{
+    rc_t rc = rd_bin_idx_32( &p1_ctx->REF_LEN, alignment_id, dst, 1 );
+    return rc;
+}
+
+
+static rc_t vdi_get_REF_ORIENTATION( p1_ctx * p1_ctx, uint64_t alignment_id, bool * dst )
+{
+    uint8_t orientation;
+    rc_t rc = rd_bin_idx_8( &p1_ctx->REF_ORIENTATION, alignment_id, &orientation, 1 );
+    if ( rc == 0 ) *dst = ( orientation != 0 );
+    return rc;
+}
+
+
+static rc_t vdi_generate_QNAME( p1_ctx * p1_ctx, uint64_t id, char * dst, size_t dst_size )
+{
+    rc_t rc = string_printf ( dst, dst_size, NULL, "%lu", id );
+    return rc;
+}
+
+
+static rc_t vdi_generate_RNAME( p1_ctx * p1_ctx, uint64_t ref_id_1_based, char * dst, size_t dst_size )
+{
+    size_t num_read;
+    rc_t rc = rd_bin_idx_char( &p1_ctx->NAME, ref_id_1_based - 1, 0, 0, dst, dst_size, &num_read );
+    if ( rc == 0 && num_read < dst_size )
+        dst[ num_read ] = 0;
+    return rc;
+}
+
+
+static rc_t vdi_generate_MAPQ( p1_ctx * p1_ctx, uint64_t alignment_id, uint32_t * dst )
+{
+    rc_t rc = rd_bin_idx_32( &p1_ctx->MAPQ, alignment_id, dst, 1 );
+    return rc;
+}
+
+
+static rc_t vdi_generate_CIGAR( p1_ctx * p1_ctx, uint64_t alignment_id, char * dst, size_t dst_size )
+{
+    size_t num_read;
+    rc_t rc = rd_bin_idx_char( &p1_ctx->CIGAR, alignment_id, 0, 0, dst, dst_size, &num_read );
+    if ( rc == 0 && num_read < dst_size )
+        dst[ num_read ] = 0;
+    return rc;
+}
+
+
+static rc_t vdi_generate_SEQ( p1_ctx * p1_ctx, uint64_t alignment_id, char * dst, size_t dst_size )
+{
+    size_t num_read;
+    rc_t rc = rd_bin_idx_char( &p1_ctx->READ, alignment_id, 0, 0, dst, dst_size, &num_read );
+    if ( rc == 0 && num_read < dst_size )
+        dst[ num_read ] = 0;
+    return rc;
+}
+
+
+static rc_t vdi_generate_FRAG( p1_ctx * p1_ctx, uint64_t seq_spot_id_1_based, bool first,
+                               uint32_t * frag_start, uint32_t * frag_len, uint8_t * filter )
+{
+    uint32_t rd_start[ 2 ];
+    rc_t rc = rd_bin_idx_32( &p1_ctx->READ_START, seq_spot_id_1_based - 1, rd_start, 2 );
+    if ( rc == 0 )
+    {
+        uint32_t rd_len[ 2 ];
+        rc = rd_bin_idx_32( &p1_ctx->READ_LEN, seq_spot_id_1_based - 1, rd_len, 2 );
+        if ( rc == 0 )
+        {
+            uint8_t rd_filter[ 2 ];
+            rc = rd_bin_idx_8( &p1_ctx->READ_FILTER, seq_spot_id_1_based - 1, rd_filter, 2 );
+            if ( rc == 0 )
+            {
+                uint32_t idx = first ? 0 : 1;
+                *frag_start = rd_start[ idx ];
+                *frag_len = rd_len[ idx ];
+                *filter = rd_filter[ idx ];
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdi_generate_QUAL( p1_ctx * p1_ctx, uint64_t seq_spot_id_1_based,
+                               uint32_t start, uint32_t len, char * dst, size_t dst_size )
+{
+    /* how many entries in READ_START and READ_LEN do we have? ( size is 32 bit ) */
+    size_t num_read;
+    rc_t rc = rd_bin_idx_char( &p1_ctx->QUALITY, seq_spot_id_1_based - 1, start, len, dst, dst_size, &num_read );
+    if ( rc == 0 && num_read < dst_size )
+    {
+        uint32_t i;
+        for ( i = 0; i < num_read; ++i )
+            dst[ i ] += 33; 
+        dst[ num_read ] = 0;
+    }
+    return rc;
+}
+
+
+static void reverse_buffer( char * dst, const char * src, size_t len )
+{
+    size_t i, j;
+    for ( i = 0, j = len - 1; i < len; ++i, --j )
+        dst[ i ] = src[ j ];
+}
+
+
+typedef struct alignment
+{
+    char REF_NAME[ 256 ];
+    uint64_t id_one_based;
+    uint64_t ref_id_one_based;
+    uint32_t REF_POS_one_based;
+    uint32_t REF_LEN;
+    bool aligned;
+    bool first;
+    bool reversed;
+} alignment;
+
+
+/* ----------------------------------------------------------------------------------------------------------- */
+static rc_t vdi_bin_phase_1_row( const p_dump_context ctx, p1_ctx * p1_ctx, int64_t row_id )
+{
+    rc_t rc;
+
+    alignment self, mate;
+
+    char QNAME[ 256 ];
+    char CIGAR[ 512 ];
+    char SEQ[ 2048 ];
+    char QUAL[ 2048 ];
+    char QUALR[ 2048 ];
+
+    uint64_t SEQ_SPOT_ID_1_based;
+    uint32_t FLAG, MAPQ;
+    int32_t TLEN;
+    uint32_t frag_start, frag_len;
+    uint8_t filter;
+    bool on_same_reference = false;
+
+    /* first we have to collect a lot of helper values... */
+    memset( &self, 0, sizeof self );
+    memset( &mate, 0, sizeof mate );
+
+    /* -------------------------------------------------------------------------------------------------------- */
+    self.id_one_based = (  row_id + 1 );
+    self.aligned = true;
+
+    /* get the row-id (1-based) of the sequence this alignment belongs to */
+    rc = vdi_get_SEQ_SPOT_ID( p1_ctx, row_id, &SEQ_SPOT_ID_1_based );
+    
+    /* get the row-id (1-based) of the mate of this alignment ( 0...not mated )*/
+    if ( rc == 0 )
+        rc = vdi_get_MATE_ID( p1_ctx, SEQ_SPOT_ID_1_based, self.id_one_based, &mate.id_one_based, &self.first );
+    if ( rc == 0 )
+    {
+        mate.first = !self.first;
+        mate.aligned = ( mate.id_one_based > 0 );
+    }
+
+    /* get the row-id of the Reference this alignment belongs to */
+    if ( rc == 0 )
+        rc = vdi_get_REF_ID( p1_ctx, row_id, &self.ref_id_one_based );
+
+    /* get the row-id of the Reference the mate belongs to */
+    if ( rc == 0 && mate.aligned )
+        rc = vdi_get_REF_ID( p1_ctx, mate.id_one_based - 1, &mate.ref_id_one_based );
+
+    if ( rc == 0 && mate.aligned )
+        on_same_reference = ( self.ref_id_one_based == mate.ref_id_one_based );
+
+    /* get the position on the reference ( 0 based ) of this alignment */
+    if ( rc == 0 )
+        rc = vdi_get_REF_POS( p1_ctx, row_id, &self.REF_POS_one_based );
+
+    /* get the position on the reference ( 0 based ) of the mate */
+    if ( rc == 0 && mate.aligned )
+        rc = vdi_get_REF_POS( p1_ctx, mate.id_one_based - 1, &mate.REF_POS_one_based );
+
+    /* get the length of the alignment on the reference */
+    if ( rc == 0 )
+        rc = vdi_get_REF_LEN( p1_ctx, self.id_one_based - 1, &self.REF_LEN );
+
+    /* get the length of the mate on the reference */
+    if ( rc == 0 && mate.aligned )
+        rc = vdi_get_REF_LEN( p1_ctx, mate.id_one_based - 1, &mate.REF_LEN );
+
+    /* get the reference-name of this alignment */
+    if ( rc == 0 )
+        rc = vdi_generate_RNAME( p1_ctx, self.ref_id_one_based, self.REF_NAME, sizeof self.REF_NAME );
+    
+    /* get the reference-name of the mate */
+    if ( rc == 0 && mate.aligned && !on_same_reference )
+        rc = vdi_generate_RNAME( p1_ctx, mate.ref_id_one_based, mate.REF_NAME, sizeof mate.REF_NAME );
+
+    if ( rc == 0 )
+        rc = vdi_get_REF_ORIENTATION( p1_ctx, self.id_one_based - 1, &self.reversed );
+
+    if ( rc == 0 && mate.aligned )
+        rc = vdi_get_REF_ORIENTATION( p1_ctx, mate.id_one_based - 1, &mate.reversed );
+
+    /* if the mate is aligned and the ref-ids dont match, compare the strings to find out if they are
+       on the same reference */
+    if ( rc == 0 && mate.aligned && !on_same_reference )
+    {
+        size_t l1 = string_size( self.REF_NAME );
+        size_t l2 = string_size( mate.REF_NAME );
+        if ( l1 == l2 )
+        {
+            int diff = string_cmp ( self.REF_NAME, l1, mate.REF_NAME, l2, l1 );
+            on_same_reference = ( diff == 0 );
+        }
+    }
+
+    TLEN = vdi_calc_tlen( self.REF_POS_one_based, mate.REF_POS_one_based,
+                          self.REF_LEN, mate.REF_LEN, on_same_reference, self.first );
+
+    /* -------------------------------------------------------------------------------------------------------- */
+    if ( rc == 0 )
+        rc = vdi_generate_QNAME( p1_ctx, SEQ_SPOT_ID_1_based, QNAME, sizeof QNAME );
+
+    if ( rc == 0 )
+        rc = vdi_generate_MAPQ( p1_ctx, row_id, &MAPQ );
+
+    if ( rc == 0 )
+        rc = vdi_generate_CIGAR( p1_ctx, row_id, CIGAR, sizeof CIGAR );
+
+    if ( rc == 0 )
+        rc = vdi_generate_SEQ( p1_ctx, row_id, SEQ, sizeof SEQ );
+
+    if ( rc == 0 )
+        rc = vdi_generate_FRAG( p1_ctx, SEQ_SPOT_ID_1_based, self.first,
+                                &frag_start, &frag_len, &filter );
+
+    if ( rc == 0 )
+        rc = vdi_generate_QUAL( p1_ctx, SEQ_SPOT_ID_1_based, frag_start, frag_len, QUAL, sizeof QUAL );
+
+    if ( rc == 0 && self.reversed )
+        reverse_buffer( QUALR, QUAL, string_size( QUAL ) );
+        
+    if ( rc == 0 )
+    {
+        bool each_fragment_aligned = ( self.aligned && mate.aligned );
+        bool this_fragment_not_aligned = false;
+        bool mate_not_aligned = !mate.aligned;
+        bool this_fragment_reversed = self.reversed;
+        bool mate_reversed = mate.reversed;
+        bool this_fragment_is_first = self.first;
+        bool this_fragment_is_last = !self.first;
+        bool this_fragment_is_secondary = false;
+        bool this_fragment_not_passing_quality_control = ( ( filter & READ_FILTER_REJECT ) > 0 );
+        bool this_fragment_is_pcr_or_duplicate = ( ( filter & READ_FILTER_CRITERIA ) > 0 );
+
+        FLAG = vdi_calc_flag( each_fragment_aligned,
+                              this_fragment_not_aligned,
+                              mate_not_aligned,
+                              this_fragment_reversed,
+                              mate_reversed,
+                              this_fragment_is_first,
+                              this_fragment_is_last,
+                              this_fragment_is_secondary,
+                              this_fragment_not_passing_quality_control,
+                              this_fragment_is_pcr_or_duplicate );
+    }
+
+    if ( rc == 0 )
+        rc = KOutMsg( "%s\t%u\t%s\t%u\t%d\t%s\t",
+                      QNAME, FLAG, self.REF_NAME, self.REF_POS_one_based, MAPQ, CIGAR );
+
+    if ( rc == 0 )
+    {
+        if ( mate.aligned )
+        {
+            if ( on_same_reference )
+                rc = KOutMsg( "=\t%u\t%d\t", mate.REF_POS_one_based, TLEN );
+            else
+                rc = KOutMsg( "%s\t%u\t%d\t", mate.REF_NAME, mate.REF_POS_one_based, TLEN );
+        }
+        else
+            rc = KOutMsg( "*\t0\t0\t" );
+    }
+
+    if ( rc == 0 )
+    {
+        if ( self.reversed )
+            rc = KOutMsg( "%s\t%s\n", SEQ, QUALR );
+        else
+            rc = KOutMsg( "%s\t%s\n", SEQ, QUAL );
+    }
+    return rc;
+}
+
+static rc_t vdi_bin_phase_1( KDirectory * dir, const p_dump_context ctx )
+{
+    p1_ctx p1_ctx;
+    rc_t rc = init_p1_ctx( dir, &p1_ctx );
+    if ( rc == 0 )
+    {
+        struct num_gen * rows = NULL;
+        uint64_t row_count = p1_ctx.REF_POS.row_count;
+
+        if ( ctx->row_range == NULL )
+        {
+            /* the user did not give us a row-range, we take all rows of this column... */
+            rc = num_gen_make_from_range( &rows, 0, row_count );
+            if ( rc != 0 )
+                LOGERR( klogInt, rc, "num_gen_make_from_range() failed" );
+        }
+        else
+        {
+            /* the gave us a row-range, we parse that string and check agains the real row-count... */
+            rc = num_gen_make_from_str( &rows, ctx->row_range );
+            if ( rc != 0 )
+                LOGERR( klogInt, rc, "num_gen_make_from_str() failed" );
+            else
+            {
+                rc = num_gen_trim( rows, 0, row_count );
+                if ( rc != 0 )
+                    LOGERR( klogInt, rc, "num_gen_trim() failed" );
+            }
+        }
+
+        if ( rc == 0 && num_gen_empty( rows ) )
+        {
+            rc = RC( rcExe, rcDatabase, rcReading, rcRange, rcEmpty );
+            LOGERR( klogInt, rc, "no row-range(s) defined" );
+        }
+
+        if ( rc == 0 )
+        {
+            const struct num_gen_iter * iter;
+            rc = num_gen_iterator_make( rows, &iter );
+            if ( rc != 0 )
+                LOGERR( klogInt, rc, "num_gen_iterator_make() failed" );
+            else
+            {
+                int64_t row_id;
+                while ( rc == 0 && num_gen_iterator_next( iter, &row_id, &rc ) )
+                {
+                    rc = Quitting();
+                    if ( rc == 0 )
+                        rc = vdi_bin_phase_1_row( ctx, &p1_ctx, row_id );
+                }
+                num_gen_iterator_destroy( iter );
+            }
+        }
+
+        if ( rows != NULL )
+            num_gen_destroy( rows );
+
+        release_p1_ctx( &p1_ctx );
+    }
+    return rc;
+}
+
+
+/* ----------------------------------------------------------------------------------------------------------- */
+
+rc_t vdi_bin_phase( const p_dump_context ctx, Args * args )
+{
+    uint32_t count;
+    rc_t rc = ArgsParamCount( args, &count );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "ArgsParamCount() failed" );
+    }
+    else if ( count < 1 )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+        LOGERR( klogInt, rc, "parameter missing ( path to bin-files )" );
+    }
+    else
+    {
+        const char *bin_path = NULL;
+        rc = ArgsParamValue( args, 0, (const void**)&bin_path );
+        if ( rc != 0 )
+        {
+            LOGERR( klogInt, rc, "ArgsParamValue() failed" );
+        }
+        else
+        {
+            KDirectory *dir;
+            rc = vdi_create_dir( bin_path, &dir );
+            if ( rc == 0 )
+            {
+                switch( ctx->phase )
+                {
+                    case 1  : vdi_bin_phase_1( dir, ctx ); break;
+                    default : KOutMsg( "phase %d unknown\n", ctx->phase );
+                }
+                KDirectoryRelease( dir );
+            }
+        }
+    }
+    return rc;
+}
+
+
+/* ----------------------------------------------------------------------------------------------------------- */
+#define SLICE_COL_CG_LOW    0
+#define SLICE_COL_CG_HIGH   1
+#define SLICE_COL_SEQ_ID    2
+#define SLICE_COL_SEQ_START 3
+#define SLICE_COL_SEQ_LEN   4
+
+static rc_t get_seq_id( const VCursor * ref_cur, int64_t row, uint32_t *col_idx, char * buffer, size_t buflen )
+{
+	const char * value;
+	uint32_t len;
+	rc_t rc = VCursorCellDataDirect ( ref_cur, row, col_idx[ SLICE_COL_SEQ_ID ], NULL, ( const void ** )&value, NULL, &len );
+	if ( rc == 0 )
+	{
+		if ( len == 0 )
+			buffer[ 0 ] = 0;
+		else
+			string_copy( buffer, buflen, value, len );
+	}
+	return rc;
+}
+
+static INSDC_coord_one get_seq_start( const VCursor * ref_cur, int64_t row, uint32_t *col_idx )
+{
+	INSDC_coord_one * value;
+	uint32_t len;
+	rc_t rc = VCursorCellDataDirect ( ref_cur, row, col_idx[ SLICE_COL_SEQ_START ], NULL, ( const void ** )&value, NULL, &len );
+	if ( rc == 0 && len > 0 )
+		return *value;
+	return 0;
+}
+
+
+static INSDC_coord_len get_seq_len( const VCursor * ref_cur, int64_t row, uint32_t *col_idx )
+{
+	INSDC_coord_len * value;
+	uint32_t len;
+	rc_t rc = VCursorCellDataDirect ( ref_cur, row, col_idx[ SLICE_COL_SEQ_LEN ], NULL, ( const void ** )&value, NULL, &len );
+	if ( rc == 0 && len > 0 )
+		return *value;
+	return 0;
+}
+
+
+static rc_t find_slice_in_ref( const p_dump_context ctx, const VTable * ref_tab, const VTable * prim_tab  )
+{
+	const VCursor * ref_cur;
+	rc_t rc = VTableCreateCachedCursorRead( ref_tab, &ref_cur, ctx->cur_cache_size );
+	if ( rc != 0 )
+	{
+		LOGERR( klogInt, rc, "VTableCreateCachedCursorRead( REFERENCE ) failed" );
+	}
+	else
+	{
+		uint32_t col_idx[ 5 ];
+		char seq_id[ 512 ];
+		uint32_t cgraph_len;
+		int64_t first = 0, row = 0;
+		uint64_t count = 0;
+		const uint8_t * cgraph_value;
+		bool done = false;
+		
+		rc = VCursorAddColumn( ref_cur, &col_idx[ SLICE_COL_CG_LOW ], "CGRAPH_LOW" );
+		if ( rc == 0 )
+			rc = VCursorAddColumn( ref_cur, &col_idx[ SLICE_COL_CG_HIGH ], "CGRAPH_HIGH" );
+		if ( rc == 0 )
+			rc = VCursorAddColumn( ref_cur, &col_idx[ SLICE_COL_SEQ_ID ], "SEQ_ID" );
+		if ( rc == 0 )
+			rc = VCursorAddColumn( ref_cur, &col_idx[ SLICE_COL_SEQ_START ], "SEQ_START" );
+		if ( rc == 0 )
+			rc = VCursorAddColumn( ref_cur, &col_idx[ SLICE_COL_SEQ_LEN ], "SEQ_LEN" );
+		if ( rc == 0 )
+			rc = VCursorOpen( ref_cur );
+		if ( rc == 0 )
+			rc = VCursorIdRange( ref_cur, col_idx[ SLICE_COL_CG_LOW ], &first, &count );
+
+		for ( row = first; rc == 0 && !done && ( row < ( first + count ) ); ++row )
+		{
+			rc = VCursorCellDataDirect ( ref_cur, row, col_idx[ SLICE_COL_CG_LOW ], NULL, ( const void ** )&cgraph_value, NULL, &cgraph_len );
+			if ( rc == 0 && cgraph_len > 0 )
+			{
+				if ( *cgraph_value >= ctx->slice_depth )
+				{
+					
+					rc = get_seq_id( ref_cur, row, col_idx, seq_id, sizeof seq_id );
+					if ( rc == 0 )
+					{
+						INSDC_coord_one seq_start = get_seq_start( ref_cur, row, col_idx );
+						INSDC_coord_len seq_len = get_seq_len( ref_cur, row, col_idx );
+						if ( ctx->indented_line_len > 0 && ctx->indented_line_len < seq_len )
+							rc = KOutMsg( "%s:%d-%d\n", seq_id, seq_start, seq_start + ctx->indented_line_len );
+						else
+							rc = KOutMsg( "%s:%d-%d\n", seq_id, seq_start, seq_start + seq_len - 1 );
+					}
+					done = true;
+				}
+			}
+		}
+
+		for ( row = first; rc == 0 && !done && ( row < ( first + count ) ); ++row )
+		{
+			rc = VCursorCellDataDirect ( ref_cur, row, col_idx[ SLICE_COL_CG_HIGH ], NULL, ( const void ** )&cgraph_value, NULL, &cgraph_len );
+			if ( rc == 0 && cgraph_len > 0 )
+			{
+				if ( *cgraph_value >= ctx->slice_depth )
+				{
+					
+					rc = get_seq_id( ref_cur, row, col_idx, seq_id, sizeof seq_id );
+					if ( rc == 0 )
+					{
+						INSDC_coord_one seq_start = get_seq_start( ref_cur, row, col_idx );
+						INSDC_coord_len seq_len = get_seq_len( ref_cur, row, col_idx );
+						rc = KOutMsg( "%s:%d-%d\n", seq_id, seq_start, seq_start + seq_len - 1 );
+					}
+					done = true;
+				}
+			}
+		}
+	
+	
+		if ( !done || rc != 0 )
+			KOutMsg( "none\n" );
+		
+		VCursorRelease( ref_cur );
+	}
+	return rc;
+}
+
+
+static rc_t find_slice_in( const p_dump_context ctx, const VDBManager *mgr, const char * acc )
+{
+    rc_t rc;
+    int path_type = ( VDBManagerPathType ( mgr, "%s", acc ) & ~ kptAlias );
+    /* types defined in <kdb/manager.h> */
+    if ( path_type == kptDatabase )
+	{
+		const VDatabase * db;
+		rc = VDBManagerOpenDBRead( mgr, &db, NULL, "%s", acc );
+		if ( rc != 0 )
+		{
+			LOGERR( klogInt, rc, "VDBManagerOpenDBRead() failed" );
+		}
+		else
+		{
+			const VTable * ref_tab;
+			rc = VDatabaseOpenTableRead( db, & ref_tab, "REFERENCE" );
+			if ( rc == 0 )
+			{
+				const VTable * prim_tab;
+				rc = VDatabaseOpenTableRead( db, & prim_tab, "PRIMARY_ALIGNMENT" );	
+				if ( rc == 0 )
+				{
+					rc = find_slice_in_ref( ctx, ref_tab, prim_tab );
+					VTableRelease ( prim_tab );
+				}
+				VTableRelease ( ref_tab );
+			}
+			VDatabaseRelease( db );
+		}
+		if ( rc != 0 )
+			rc = KOutMsg( "none\n" );
+	}
+	else
+		rc = KOutMsg( "none\n" );
+	return rc;
+}
+
+
+rc_t find_slice( const p_dump_context ctx, Args * args )
+{
+    uint32_t count;
+    rc_t rc = ArgsParamCount( args, &count );
+    if ( rc != 0 )
+    {
+        LOGERR( klogInt, rc, "ArgsParamCount() failed" );
+    }
+    else if ( count < 1 )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+        LOGERR( klogInt, rc, "parameter missing ( accession to find slice in )" );
+    }
+	else
+	{
+		KDirectory * dir;
+		rc = KDirectoryNativeDir( &dir );
+		if ( rc != 0 )
+		{
+			LOGERR( klogInt, rc, "KDirectoryNativeDir() failed" );
+		}
+		else
+		{
+			const VDBManager *mgr;
+			rc = VDBManagerMakeRead ( &mgr, dir );
+			if ( rc != 0 )
+			{
+				LOGERR( klogInt, rc, "VDBManagerMakeRead() failed" );
+			}
+			else
+			{
+				uint32_t idx;
+				for ( idx = 0; idx < count && rc == 0; ++idx )
+				{
+					const char *acc = NULL;
+					rc = ArgsParamValue( args, 0, (const void**)&acc );
+					if ( rc != 0 )
+					{
+						LOGERR( klogInt, rc, "ArgsParamValue() failed" );
+					}
+					else
+						rc = find_slice_in( ctx, mgr, acc );
+				}
+				VDBManagerRelease( mgr );
+			}
+			KDirectoryRelease( dir );
+		}
+	}
+	return rc;
+}
diff --git a/tools/vdb-dump/vdb-dump-bin.h b/tools/vdb-dump/vdb-dump-bin.h
new file mode 100644
index 0000000..0af510f
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-bin.h
@@ -0,0 +1,46 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_dump_bin_
+#define _h_vdb_dump_bin_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+rc_t vdi_dump_opened_table( const p_dump_context ctx, const VTable *my_table );
+rc_t vdi_bin_phase( const p_dump_context ctx, Args * args );
+
+rc_t find_slice( const p_dump_context ctx, Args * args );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-dump/vdb-dump-coldefs.c b/tools/vdb-dump/vdb-dump-coldefs.c
new file mode 100644
index 0000000..af22165
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-coldefs.c
@@ -0,0 +1,846 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "vdb-dump-helper.h"
+
+#include "vdb-dump-coldefs.h"
+
+#include <klib/vector.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <klib/log.h>
+#include <klib/rc.h>
+
+#include <vdb/vdb-priv.h>
+
+#include <sra/sradb.h>
+#include <sra/pacbio.h>
+#include <os-native.h>
+#include <sysalloc.h>
+
+/* for platforms */
+#include <insdc/sra.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <math.h>
+
+rc_t Quitting();
+
+/* once we get used to having moved the read descriptor
+   out of SRA, we should begin using those names.
+   if anyone has an investment in the old names, we may
+   want to provide a switch for using them... */
+#if USE_OLD_SRA_NAME || 1
+#define SRA_NAME( name ) \
+    "SRA_" #name
+#define SRA_NAMES( name1, name2 ) \
+    "SRA_" #name1 "|SRA_" #name2
+#else
+#define SRA_NAME( name ) \
+    # name
+#define SRA_NAMES( name1, name2 ) \
+    #name1 "|" #name2
+#endif
+
+/* implementation of the value-translation-functions */
+
+const char SRA_PB_HS_0[] = { "SRA_PACBIO_HOLE_SEQUENCING" };
+const char SRA_PB_HS_1[] = { "SRA_PACBIO_HOLE_ANTIHOLE" };
+const char SRA_PB_HS_2[] = { "SRA_PACBIO_HOLE_FIDUCIAL" };
+const char SRA_PB_HS_3[] = { "SRA_PACBIO_HOLE_SUSPECT" };
+const char SRA_PB_HS_4[] = { "SRA_PACBIO_HOLE_ANTIMIRROR" };
+const char SRA_PB_HS_5[] = { "SRA_PACBIO_HOLE_FDZMW" };
+const char SRA_PB_HS_6[] = { "SRA_PACBIO_HOLE_FBZMW" };
+const char SRA_PB_HS_7[] = { "SRA_PACBIO_HOLE_ANTIBEAMLET" };
+const char SRA_PB_HS_8[] = { "SRA_PACBIO_HOLE_OUTSIDEFOV" };
+const char SRA_PB_HS_9[] = { "unknown hole-status" };
+
+const char *vdcd_get_hole_status_txt( const uint32_t id )
+{
+    switch( id )
+    {
+        case SRA_PACBIO_HOLE_SEQUENCING     : return( SRA_PB_HS_0 ); break;
+        case SRA_PACBIO_HOLE_ANTIHOLE       : return( SRA_PB_HS_1 ); break;
+        case SRA_PACBIO_HOLE_FIDUCIAL       : return( SRA_PB_HS_2 ); break;
+        case SRA_PACBIO_HOLE_SUSPECT        : return( SRA_PB_HS_3 ); break;
+        case SRA_PACBIO_HOLE_ANTIMIRROR     : return( SRA_PB_HS_4 ); break;
+        case SRA_PACBIO_HOLE_FDZMW          : return( SRA_PB_HS_5 ); break;
+        case SRA_PACBIO_HOLE_FBZMW          : return( SRA_PB_HS_6 ); break;
+        case SRA_PACBIO_HOLE_ANTIBEAMLET    : return( SRA_PB_HS_7 ); break;
+        case SRA_PACBIO_HOLE_OUTSIDEFOV     : return( SRA_PB_HS_8 ); break;
+    }
+    return( SRA_PB_HS_9 );
+}
+
+const char *vdcd_get_platform_txt( const uint32_t id )
+{
+#define CASE( id ) \
+    case id : return # id; break
+
+    switch( id )
+    {
+        CASE ( SRA_PLATFORM_UNDEFINED );
+        CASE ( SRA_PLATFORM_454 );
+        CASE ( SRA_PLATFORM_ILLUMINA );
+        CASE ( SRA_PLATFORM_ABSOLID );
+        CASE ( SRA_PLATFORM_COMPLETE_GENOMICS );
+        CASE ( SRA_PLATFORM_HELICOS );
+        CASE ( SRA_PLATFORM_PACBIO_SMRT );
+        CASE ( SRA_PLATFORM_ION_TORRENT );
+        CASE ( SRA_PLATFORM_CAPILLARY );
+        CASE ( SRA_PLATFORM_OXFORD_NANOPORE );
+    }
+#undef CASE
+
+    return "unknown platform";
+}
+
+const char SRA_RT_0[] = { SRA_NAME  ( READ_TYPE_TECHNICAL ) };
+const char SRA_RT_1[] = { SRA_NAME  ( READ_TYPE_BIOLOGICAL ) };
+const char SRA_RT_2[] = { SRA_NAMES ( READ_TYPE_TECHNICAL, READ_TYPE_FORWARD ) };
+const char SRA_RT_3[] = { SRA_NAMES ( READ_TYPE_BIOLOGICAL, READ_TYPE_FORWARD ) };
+const char SRA_RT_4[] = { SRA_NAMES ( READ_TYPE_TECHNICAL, READ_TYPE_REVERSE ) };
+const char SRA_RT_5[] = { SRA_NAMES ( READ_TYPE_BIOLOGICAL, READ_TYPE_REVERSE ) };
+const char SRA_RT_6[] = { "unknown read-type" };
+
+const char *vdcd_get_read_type_txt( const uint32_t id )
+{
+    switch( id )
+    {
+        case 0 : return( SRA_RT_0 ); break;
+        case 1 : return( SRA_RT_1 ); break;
+        case 2 : return( SRA_RT_2 ); break;
+        case 3 : return( SRA_RT_3 ); break;
+        case 4 : return( SRA_RT_4 ); break;
+        case 5 : return( SRA_RT_5 ); break;
+    }
+    return( SRA_RT_6 );
+}
+
+const char SRA_FT_0[] = { SRA_NAME ( READ_FILTER_PASS ) };
+const char SRA_FT_1[] = { SRA_NAME ( READ_FILTER_REJECT ) };
+const char SRA_FT_2[] = { SRA_NAME ( READ_FILTER_CRITERIA ) };
+const char SRA_FT_3[] = { SRA_NAME ( READ_FILTER_REDACTED ) };
+const char SRA_FT_4[] = { "unknown read-filter" };
+
+const char *vdcd_get_read_filter_txt( const uint32_t id )
+{
+    switch( id )
+    {
+        case 0 : return( SRA_FT_0 ); break;
+        case 1 : return( SRA_FT_1 ); break;
+        case 2 : return( SRA_FT_2 ); break;
+        case 3 : return( SRA_FT_3 ); break;
+    }
+    return( SRA_FT_4 );
+}
+
+/* hardcoded values taken from asm-trace/interface/sra/sradb.h */
+#define SRA_KEY_PLATFORM_ID "INSDC:SRA:platform_id"
+#define SRA_KEY_XREAD_TYPE "INSDC:SRA:xread_type"
+#define SRA_KEY_READ_TYPE "INSDC:SRA:read_type"
+#define SRA_KEY_READ_FILTER "INSDC:SRA:read_filter"
+#define SRA_PACBIO_HOLE_STATUS "PacBio:hole:status"
+
+
+static bool vdcd_type_cmp( const VSchema *my_schema, VTypedecl * typedecl, const char * to_check )
+{
+    VTypedecl type_to_check;
+    rc_t rc = VSchemaResolveTypedecl ( my_schema, &type_to_check, "%s", to_check );
+    if ( rc == 0 )
+    {
+        return VTypedeclToTypedecl ( typedecl, my_schema, &type_to_check, NULL, NULL );
+    }
+    return false;
+}
+
+
+static value_trans_fct_t vdcd_get_value_trans_fct( const VSchema *my_schema, VTypedecl * typedecl )
+{
+    value_trans_fct_t res = NULL;
+
+    if ( my_schema == NULL ) return res;
+    if ( typedecl == NULL ) return res;
+
+    if ( vdcd_type_cmp( my_schema, typedecl, SRA_KEY_PLATFORM_ID ) )
+    {
+        res = vdcd_get_platform_txt;
+    }
+    else if ( vdcd_type_cmp( my_schema, typedecl, SRA_KEY_XREAD_TYPE ) )
+    {
+        res = vdcd_get_read_type_txt;
+    }
+    else if ( vdcd_type_cmp( my_schema, typedecl, SRA_KEY_READ_TYPE ) )
+    {
+        res = vdcd_get_read_type_txt;
+    }
+    else if ( vdcd_type_cmp( my_schema, typedecl, SRA_KEY_READ_FILTER ) )
+    {
+        res = vdcd_get_read_filter_txt;
+    }
+    else if ( vdcd_type_cmp( my_schema, typedecl, SRA_PACBIO_HOLE_STATUS ) )
+    {
+        res = vdcd_get_hole_status_txt;
+    }
+
+    return res;
+}
+
+
+/* implementation of the dimension-translation-functions */
+static char *vdcd_get_read_desc_txt( const uint8_t * src )
+{
+    char *res = calloc( 1, 120 );
+    SRAReadDesc desc;
+    memmove( &desc, src, sizeof( desc ) );
+    string_printf ( res, 119, NULL,
+              "seg.start=%u, seg.len=%u, type=%u, cs_key=%u, label=%s",
+              desc.seg.start, desc.seg.len, desc.type,
+              desc.cs_key, desc.label );
+    return res;
+}
+
+static char *vdcd_get_spot_desc_txt( const uint8_t *src )
+{
+    char *res = calloc( 1, 120 );
+    SRASpotDesc desc;
+    memmove( &desc, src, sizeof( desc ) );
+    string_printf ( res, 119, NULL,
+              "spot_len=%u, fixed_len=%u, signal_len=%u, clip_qual_right=%u, num_reads=%u",
+              desc.spot_len, desc.fixed_len, desc.signal_len,
+              desc.clip_qual_right, desc.num_reads );
+    return res;
+}
+
+/* hardcoded values taken from asm-trace/interface/sra/sradb.h */
+#define SRA_KEY_READ_DESC "NCBI:SRA:ReadDesc"
+#define SRA_KEY_SPOT_DESC "NCBI:SRA:SpotDesc"
+
+static dim_trans_fct_t vdcd_get_dim_trans_fct( const VSchema *my_schema, VTypedecl * typedecl )
+{
+    dim_trans_fct_t res = NULL;
+
+    if ( my_schema == NULL ) return res;
+    if ( typedecl == NULL ) return res;
+
+    if ( vdcd_type_cmp( my_schema, typedecl, SRA_KEY_READ_DESC ) )
+    {
+        res = vdcd_get_read_desc_txt;
+    }
+    else if ( vdcd_type_cmp( my_schema, typedecl, SRA_KEY_SPOT_DESC ) )
+    {
+        res = vdcd_get_spot_desc_txt;
+    }
+/*
+    if ( strcmp( name, SRA_KEY_READ_DESC ) == 0 )
+    {
+        res = vdcd_get_read_desc_txt;
+    }
+    else if ( strcmp( name, SRA_KEY_SPOT_DESC ) == 0 )
+    {
+        res = vdcd_get_spot_desc_txt;
+    }
+*/
+    return res;
+}
+
+
+const char * const_s_Ascii = "Ascii";
+const char * const_s_Unicode = "Unicode";
+const char * const_s_Uint = "Uint";
+const char * const_s_Int = "Int";
+const char * const_s_Float = "Float";
+const char * const_s_Bool = "Bool";
+const char * const_s_Unknown = "unknown";
+
+char *vdcd_make_domain_txt( const uint32_t domain )
+{
+    char* res= NULL;
+    switch( domain )
+    {
+        case vtdAscii   : res = string_dup_measure( const_s_Ascii, NULL ); break;
+        case vtdUnicode : res = string_dup_measure( const_s_Unicode, NULL ); break;
+        case vtdUint    : res = string_dup_measure( const_s_Uint, NULL ); break;
+        case vtdInt     : res = string_dup_measure( const_s_Int, NULL ); break;
+        case vtdFloat   : res = string_dup_measure( const_s_Float, NULL ); break;
+        case vtdBool    : res = string_dup_measure( const_s_Bool, NULL ); break;
+        default : res = string_dup_measure( const_s_Unknown, NULL ); break;
+    }
+    return res;
+}
+
+/* a single column-definition */
+p_col_def vdcd_init_col( const char* name, const size_t str_limit )
+{
+    p_col_def res = NULL;
+    if ( name == NULL ) return res;
+    if ( name[0] == 0 ) return res;
+    res = ( p_col_def )calloc( 1, sizeof( col_def ) );
+    if ( res != NULL )
+    {
+        res->name = string_dup_measure ( name, NULL );
+        vds_make( &( res->content ), str_limit, DUMP_STR_INC );
+    }
+    return res;
+}
+
+void vdcd_destroy_col( p_col_def col_def )
+{
+    if ( col_def == NULL ) return;
+    if ( col_def->name ) free( col_def->name );
+    vds_free( &( col_def->content ) );
+    free( col_def );
+}
+
+/* a vector of column-definitions */
+bool vdcd_init( col_defs** defs, const size_t str_limit )
+{
+    bool res = false;
+    if ( defs == NULL ) return res;
+    (*defs) = calloc( 1, sizeof( col_defs ) );
+    if ( *defs )
+    {
+        VectorInit( &((*defs)->cols), 0, 5 );
+        (*defs)->max_colname_chars = 0;
+        res = true;
+    }
+    ( *defs )->str_limit = str_limit;
+    return res;
+}
+
+static void CC vdcd_destroy_node( void* node, void* data )
+{
+    vdcd_destroy_col( (p_col_def)node );
+}
+
+void vdcd_destroy( col_defs* defs )
+{
+    if ( defs == NULL ) return;
+    VectorWhack( &(defs->cols), vdcd_destroy_node, NULL );
+    free( defs );
+}
+
+static p_col_def vdcd_append_col( col_defs* defs, const char* name )
+{
+    p_col_def new_col = vdcd_init_col( name, defs->str_limit );
+    if ( new_col != NULL )
+    {
+        if ( VectorAppend( &(defs->cols), NULL, new_col ) == 0 )
+        {
+            int len = string_size( name );
+            if ( len > defs->max_colname_chars )
+                defs->max_colname_chars = len;
+        }
+    }
+    return new_col;
+}
+
+
+uint32_t vdcd_parse_string( col_defs* defs, const char* src, const VTable *my_table )
+{
+    uint32_t count, found = 0;
+    char colname[MAX_COL_NAME_LEN+1];
+    size_t i_dest = 0;
+    if ( defs == NULL ) return false;
+    if ( src == NULL ) return false;
+    while ( *src )
+    {
+        if ( *src == ',' )
+        {
+            if ( i_dest > 0 )
+            {
+                colname[i_dest]=0;
+                vdcd_append_col( defs, colname );
+            }
+            i_dest = 0;
+        }
+        else
+        {
+            if ( i_dest < MAX_COL_NAME_LEN ) colname[i_dest++]=*src;
+        }
+        src++;
+    }
+    if ( i_dest > 0 )
+    {
+        colname[i_dest]=0;
+        vdcd_append_col( defs, colname );
+    }
+    count = VectorLength( &defs->cols );
+    if ( count > 0 && my_table != NULL )
+    {
+        const VCursor *my_cursor;
+        rc_t rc = VTableCreateCursorRead( my_table, &my_cursor );
+        DISP_RC( rc, "VTableCreateCursorRead() failed" );
+        if ( rc == 0 )
+        {
+            uint32_t idx;
+            for ( idx = 0; idx < count; ++idx )
+            {
+                col_def *col = ( col_def * )VectorGet( &(defs->cols), idx );
+                if ( col != NULL )
+                {
+                    rc = VCursorAddColumn( my_cursor, &(col->idx), "%s", col->name );
+                    DISP_RC( rc, "VCursorAddColumn() failed" );
+                    if ( rc == 0 )
+                    {
+                        rc = VCursorDatatype( my_cursor, col->idx,
+                                  &(col->type_decl), &(col->type_desc) );
+                        DISP_RC( rc, "VCursorDatatype() failed" );
+                        if ( rc == 0 )
+                            found++;
+                    }
+                }
+            }
+            rc = VCursorRelease( my_cursor );
+            DISP_RC( rc, "VCursorRelease() failed" );
+        }
+    }
+    return found;
+}
+
+
+bool vdcd_table_has_column( const VTable *my_table, const char * to_find )
+{
+	bool res = false;
+	if ( my_table != NULL && to_find != NULL )
+	{
+		size_t to_find_len = string_size( to_find );
+		if ( to_find_len > 0 )
+		{
+			KNamelist * names;
+			rc_t rc = VTableListCol( my_table, &names );
+			DISP_RC( rc, "VTableListCol() failed" );
+			if ( rc == 0 )
+			{
+				uint32_t n;
+				rc = KNamelistCount( names, &n );
+				DISP_RC( rc, "KNamelistCount() failed" );
+				if ( rc == 0 )
+				{
+					uint32_t i;
+					for ( i = 0; i < n && rc == 0 && !res; ++i )
+					{
+						const char * col_name;
+						rc = KNamelistGet( names, i, &col_name );
+						DISP_RC( rc, "KNamelistGet() failed" );
+						if ( rc == 0 )
+						{
+							size_t col_name_len = string_size( col_name );
+							if ( col_name_len == to_find_len )
+								res = ( string_cmp( to_find, to_find_len, col_name, col_name_len, col_name_len ) == 0 );
+						}
+					}
+				}
+				KNamelistRelease( names );
+			}
+		}
+	}
+	return res;
+}
+
+uint32_t vdcd_extract_from_table( col_defs* defs, const VTable *my_table )
+{
+    uint32_t found = 0;
+    KNamelist *names;
+    rc_t rc = VTableListCol( my_table, &names );
+    DISP_RC( rc, "VTableListCol() failed" );
+    if ( rc == 0 )
+    {
+        const VCursor *my_cursor;
+        rc = VTableCreateCursorRead( my_table, &my_cursor );
+        DISP_RC( rc, "VTableCreateCursorRead() failed" );
+        if ( rc == 0 )
+        {
+            uint32_t n;
+            rc = KNamelistCount( names, &n );
+            DISP_RC( rc, "KNamelistCount() failed" );
+            if ( rc == 0 )
+            {
+                uint32_t i;
+                for ( i = 0; i < n && rc == 0; ++i )
+                {
+                    const char *col_name;
+                    rc = KNamelistGet( names, i, &col_name );
+                    DISP_RC( rc, "KNamelistGet() failed" );
+                    if ( rc == 0 )
+                    {
+                        p_col_def def = vdcd_append_col( defs, col_name );
+                        rc = VCursorAddColumn( my_cursor, &(def->idx), "%s", def->name );
+                        DISP_RC( rc, "VCursorAddColumn() failed" );
+                        if ( rc == 0 )
+                        {
+                            rc = VCursorDatatype( my_cursor, def->idx,
+                                      &(def->type_decl), &(def->type_desc) );
+                            DISP_RC( rc, "VCursorDatatype() failed" );
+                            if ( rc == 0 )
+                            {
+                                found++;
+                            }
+                        }
+                    }
+                }
+            }
+            rc = VCursorRelease( my_cursor );
+            DISP_RC( rc, "VCursorRelease() failed" );
+        }
+        rc = KNamelistRelease( names );
+        DISP_RC( rc, "KNamelistRelease() failed" );
+    }
+    return found;
+}
+
+
+bool vdcd_extract_from_phys_table( col_defs* defs, const VTable *my_table )
+{
+    bool col_defs_found = false;
+    KNamelist *names;
+    rc_t rc = VTableListPhysColumns( my_table, &names );
+    DISP_RC( rc, "VTableListPhysColumns() failed" );
+    if ( rc == 0 )
+    {
+        uint32_t n;
+        uint32_t found = 0;
+        rc = KNamelistCount( names, &n );
+        DISP_RC( rc, "KNamelistCount() failed" );
+        if ( rc == 0 )
+        {
+            uint32_t i;
+            for ( i = 0; i < n && rc == 0; ++i )
+            {
+                const char *col_name;
+                rc = KNamelistGet( names, i, &col_name );
+                DISP_RC( rc, "KNamelistGet() failed" );
+                if ( rc == 0 )
+                {
+                    vdcd_append_col( defs, col_name );
+                    found++;
+                }
+            }
+            col_defs_found = ( found > 0 );
+        }
+        rc = KNamelistRelease( names );
+        DISP_RC( rc, "KNamelistRelease() failed" );
+    }
+    return col_defs_found;
+}
+
+typedef struct add_2_cur_context
+{
+    const VCursor *my_cursor;
+    uint32_t count;
+} add_2_cur_context;
+typedef add_2_cur_context* p_add_2_cur_context;
+
+
+static void CC vdcd_add_1_to_cursor( void *item, void *data )
+{
+    rc_t rc;
+    p_col_def my_col_def = (p_col_def)item;
+    p_add_2_cur_context ctx = (p_add_2_cur_context)data;
+
+    if ( my_col_def == NULL ) return;
+    if ( ctx == NULL ) return;
+    if ( ctx->my_cursor == NULL ) return;
+    rc = VCursorAddColumn( ctx->my_cursor, &(my_col_def->idx), "%s", my_col_def->name );
+    DISP_RC( rc, "VCursorAddColumn() failed" );
+
+    /***************************************************************************
+    !!! extract type information !!!
+    **************************************************************************/
+    if ( rc == 0 )
+    {
+        rc = VCursorDatatype( ctx->my_cursor, my_col_def->idx,
+                              &(my_col_def->type_decl), &(my_col_def->type_desc) );
+        DISP_RC( rc, "VCursorDatatype() failed" );
+        if ( rc == 0 )
+        {
+            ctx->count++;
+            my_col_def->valid = true;
+        }
+    }
+}
+
+
+uint32_t vdcd_add_to_cursor( col_defs* defs, const VCursor *my_cursor )
+{
+    add_2_cur_context ctx;
+    ctx.count = 0;
+    ctx.my_cursor = my_cursor;
+    VectorForEach( &(defs->cols), false, vdcd_add_1_to_cursor, &ctx );
+    return ctx.count;
+}
+
+
+static void CC vdcd_reset_1_content( void *item, void *data )
+{
+    rc_t rc;
+    p_col_def my_col_def = (p_col_def)item;
+    if ( my_col_def == NULL ) return;
+    rc = vds_clear( &(my_col_def->content) );
+    DISP_RC( rc, "dump_str_clear() failed" );
+}
+
+void vdcd_reset_content( col_defs* defs )
+{
+    VectorForEach( &(defs->cols), false,
+                   vdcd_reset_1_content, NULL );
+}
+
+static void CC vdcd_ins_1_trans_fkt( void *item, void *data )
+{
+    p_col_def my_col_def = ( p_col_def )item;
+    const VSchema *my_schema = ( const VSchema * )data;
+
+    if ( my_col_def == NULL ) return;
+    if ( my_schema == NULL ) return;
+
+    /* resolves special sra-types and retrieves the addr of
+       a function that later can translate the values into plain-text
+       --- is defined in this file! */
+    my_col_def->value_trans_fct = vdcd_get_value_trans_fct( my_schema, &(my_col_def->type_decl) );
+    my_col_def->dim_trans_fct = vdcd_get_dim_trans_fct( my_schema, &(my_col_def->type_decl) );
+}
+
+void vdcd_ins_trans_fkt( col_defs* defs, const VSchema *my_schema )
+{
+    if ( defs == NULL ) return;
+    if ( my_schema == NULL ) return;
+    VectorForEach( &(defs->cols), false,
+                   vdcd_ins_1_trans_fkt, (void*)my_schema );
+}
+
+
+static void CC vdcd_exclude_column_cb( void *item, void *data )
+{
+    const char * s = (const char *)data;
+    p_col_def my_col_def = (p_col_def)item;
+    if ( s == NULL || my_col_def == NULL ) return;
+    if ( strcmp( my_col_def->name, s ) == 0 )
+        my_col_def->excluded = true;
+}
+
+
+void vdcd_exclude_this_column( col_defs* defs, const char* column_name )
+{
+    VectorForEach( &(defs->cols), false, vdcd_exclude_column_cb, (void*)column_name );
+}
+
+
+void vdcd_exclude_these_columns( col_defs* defs, const char* column_names )
+{
+    char colname[MAX_COL_NAME_LEN+1];
+    size_t i_dest = 0;
+    if ( defs == NULL || column_names == NULL ) return;
+    while ( *column_names )
+    {
+        if ( *column_names == ',' )
+        {
+            if ( i_dest > 0 )
+            {
+                colname[i_dest]=0;
+                vdcd_exclude_this_column( defs, colname );
+            }
+            i_dest = 0;
+        }
+        else
+        {
+            if ( i_dest < MAX_COL_NAME_LEN ) colname[i_dest++]=*column_names;
+        }
+        column_names++;
+    }
+    if ( i_dest > 0 )
+    {
+        colname[i_dest]=0;
+        vdcd_exclude_this_column( defs, colname );
+    }
+}
+
+
+bool vdcd_get_first_none_static_column_idx( col_defs* defs, const VCursor * cur, uint32_t * idx )
+{
+    bool res = false;
+    if ( defs != NULL && cur !=NULL && idx != NULL )
+    {
+        uint32_t len = VectorLength( &(defs->cols) );
+        if ( len > 0 )
+        {
+            uint32_t start = VectorStart( &(defs->cols) );
+            uint32_t run_idx = start;
+            while ( ( run_idx < ( start + len ) ) && !res )
+            {
+                col_def * cd = VectorGet( &(defs->cols), run_idx );
+                if ( cd != NULL )
+                {
+                    int64_t  first;
+                    uint64_t count;
+
+                    rc_t rc = VCursorIdRange( cur, cd->idx, &first, &count );
+                    if ( rc == 0 && count > 0 )
+                    {
+                        *idx = cd->idx;
+                        res = true;
+                    }
+                }
+                run_idx++;
+            }
+        }
+    }
+    return res;
+}
+
+/* ******************************************************************************************************** */
+typedef struct spread
+{
+	uint64_t count;
+	double sum, sum_sq;
+	int64_t min, max;
+} spread;
+
+
+/*
+	s ... spread * s
+	b ... const void * base
+	l ... uint32_t row_len
+	t ... type ( int64_t, uint64_t ... )
+*/
+#define COUNTVALUES( S, b, l, t )							\
+	{														\
+		const t * values = base;							\
+		uint32_t i;											\
+		for ( i = 0; i < l; ++i )							\
+		{													\
+			t value = values[ i ];							\
+			if ( value != 0 )								\
+			{												\
+				double value_d = value;						\
+				if ( value < (S)->min ) (S)->min = value;	\
+				if ( value > (S)->max ) (S)->max = value;	\
+				(S)->sum += value_d;						\
+				(S)->sum_sq += ( value_d * value_d );		\
+				(S)->count++;								\
+			}												\
+		}													\
+	}														\
+
+static uint64_t round_to_uint64_t( double value )
+{
+	double floor_value = floor( value );
+	double x = ( value - floor_value ) > 0.5 ? ceil( value ) : floor_value;
+	return ( uint64_t )x;
+}
+
+static rc_t vdcd_collect_spread_col( const struct num_gen * row_set, col_def * cd, const VCursor * cursor )
+{
+	const struct num_gen_iter * iter;
+	rc_t rc = num_gen_iterator_make( row_set, &iter );
+	if ( rc == 0 )
+	{
+		const void * base;
+		uint32_t row_len, elem_bits;
+		int64_t row_id;
+		spread s;
+		spread * sp = &s;
+		
+		s.max = s.sum = s.sum_sq = s.count = 0;
+		s.min = INT64_MAX;
+		
+		while ( ( rc == 0 ) && num_gen_iterator_next( iter, &row_id, &rc ) )
+		{
+			if ( rc == 0 )	rc = Quitting();
+			if ( rc != 0 )	break;
+			rc = VCursorCellDataDirect( cursor, row_id, cd->idx, &elem_bits, &base, NULL, &row_len );
+			if ( rc == 0 )
+			{
+				if ( cd->type_desc.domain == vtdUint )
+				{
+					/* unsigned int's */
+					switch( elem_bits )
+					{
+						case 64 : COUNTVALUES( sp, base, row_len, uint64_t ) break;
+						case 32 : COUNTVALUES( sp, base, row_len, uint32_t ) break;
+						case 16 : COUNTVALUES( sp, base, row_len, uint16_t ) break;
+						case 8  : COUNTVALUES( sp, base, row_len, uint8_t )  break;
+					}
+				}
+				else
+				{
+					/* signed int's */
+					switch( elem_bits )
+					{
+						case 64 : COUNTVALUES( sp, base, row_len, int64_t ) break;
+						case 32 : COUNTVALUES( sp, base, row_len, int32_t ) break;
+						case 16 : COUNTVALUES( sp, base, row_len, int16_t ) break;
+						case 8  : COUNTVALUES( sp, base, row_len, int8_t )  break;
+					}
+				}
+			}
+		}
+
+		if ( s.count > 0 )
+		{
+			rc = KOutMsg( "\n[%s]\n", cd->name );
+			if ( rc == 0 )
+				rc = KOutMsg( "min    = %,ld\n", s.min );
+			if ( rc == 0 )
+				rc = KOutMsg( "max    = %,ld\n", s.max );
+			if ( rc == 0 )
+				rc = KOutMsg( "count  = %,ld\n", s.count );
+			if ( rc == 0 )
+			{
+				double median = ( s.sum / s.count );
+				rc = KOutMsg( "median = %,ld\n", round_to_uint64_t( median ) );
+				if ( rc == 0 )
+				{
+					double stdev = sqrt( ( ( s.sum_sq - ( s.sum * s.sum ) / s.count ) ) / ( s.count - 1 ) );
+					rc = KOutMsg( "stdev  = %,ld\n", round_to_uint64_t( stdev ) );	
+				}
+			}
+		}
+		
+		num_gen_iterator_destroy( iter );
+	}
+	return rc;
+}
+#undef COUNTVALUES
+
+rc_t vdcd_collect_spread( const struct num_gen * row_set, col_defs * cols, const VCursor * cursor )
+{
+	rc_t rc = 0;
+	uint32_t i, n = VectorLength( &cols->cols );
+	for ( i = 0; i < n && rc == 0; ++i )
+	{
+		col_def * cd = VectorGet( &cols->cols, i );
+		if ( cd != NULL )
+		{
+			if ( cd->type_desc.domain == vtdUint || cd->type_desc.domain == vtdInt )
+				rc = vdcd_collect_spread_col( row_set, cd, cursor );
+		}
+	}
+	return rc;
+}
diff --git a/tools/vdb-dump/vdb-dump-coldefs.h b/tools/vdb-dump/vdb-dump-coldefs.h
new file mode 100644
index 0000000..fb81d04
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-coldefs.h
@@ -0,0 +1,110 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_dump_coldefs_
+#define _h_vdb_dump_coldefs_
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <vdb/database.h>
+
+#include <klib/vector.h>
+#include <klib/text.h>
+#include <klib/num-gen.h>
+
+#include "vdb-dump-str.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+const char *get_platform_txt( const uint32_t id );
+const char *get_read_type_txt( const uint32_t id );
+const char *get_read_filter_txt( const uint32_t id );
+*/
+
+typedef const char* (*value_trans_fct_t)( const uint32_t id );
+typedef char* (*dim_trans_fct_t)( const uint8_t *src );
+
+/********************************************************************
+col-def is the definition of a single column: name/index/type
+********************************************************************/
+typedef struct col_def
+{
+    char *name;
+    uint32_t idx;
+    uint64_t elementsum;
+    bool valid;
+    bool excluded;
+    VTypedecl type_decl;
+    VTypedesc type_desc;
+    dump_str content;
+    value_trans_fct_t value_trans_fct;
+    dim_trans_fct_t dim_trans_fct;
+} col_def;
+typedef col_def* p_col_def;
+
+/********************************************************************
+the col-defs are a vector of single column-definitions
+********************************************************************/
+typedef struct col_defs
+{
+    Vector cols;
+    uint16_t max_colname_chars;
+    size_t str_limit;
+} col_defs;
+typedef col_defs* p_col_defs;
+
+#define MAX_COL_NAME_LEN 64
+
+const char *vdcd_get_platform_txt( const uint32_t id );
+
+char *vdcd_make_domain_txt( const uint32_t domain );
+
+bool vdcd_init( col_defs** defs, const size_t str_limit );
+void vdcd_destroy( col_defs* defs );
+
+uint32_t vdcd_parse_string( col_defs* defs, const char* src, const VTable *my_table );
+uint32_t vdcd_extract_from_table( col_defs* defs, const VTable *my_table );
+bool vdcd_table_has_column( const VTable *my_table, const char * to_find );
+bool vdcd_extract_from_phys_table( col_defs* defs, const VTable *my_table );
+uint32_t vdcd_add_to_cursor( col_defs* defs, const VCursor *my_cursor );
+void vdcd_reset_content( col_defs* defs );
+void vdcd_ins_trans_fkt( col_defs* defs, const VSchema *my_schema );
+void vdcd_exclude_these_columns( col_defs* defs, const char* column_names );
+bool vdcd_get_first_none_static_column_idx( col_defs* defs, const VCursor * cur, uint32_t * idx );
+
+rc_t vdcd_collect_spread( const struct num_gen * row_set, col_defs * cols, const VCursor * cursor );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-dump/vdb-dump-context.c b/tools/vdb-dump/vdb-dump-context.c
new file mode 100644
index 0000000..e3ac2d7
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-context.c
@@ -0,0 +1,649 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "vdb-dump-context.h"
+#include "vdb-dump-helper.h"
+
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <klib/status.h>
+#include <klib/text.h>
+#include <klib/num-gen.h>
+#include <kapp/args.h>
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <strtol.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+/********************************************************************
+the dump context contains all informations needed to execute the dump
+********************************************************************/
+
+static rc_t vdco_set_str( char **dst, const char *src )
+{
+    size_t len;
+    if ( dst == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    if ( *dst != NULL )
+    {
+        free( *dst );
+        *dst = NULL;
+    }
+    if ( src == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+
+    len = string_size( src );
+    if ( len == 0 )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcItem, rcEmpty );
+
+    *dst = (char*)malloc( len + 1 );
+    if ( *dst == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcMemory, rcExhausted );
+
+    string_copy( *dst, len + 1, src, len );
+    return 0;
+}
+
+
+static rc_t vdco_set_String( char **dst, const String *src )
+{
+    if ( dst == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    if ( *dst != NULL )
+    {
+        free( *dst );
+        *dst = NULL;
+    }
+    if ( src == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+
+    if ( src->len == 0 )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcItem, rcEmpty );
+
+    *dst = (char*)malloc( src->size + 1 );
+    if ( *dst == NULL )
+        return RC( rcVDB, rcNoTarg, rcWriting, rcMemory, rcExhausted );
+
+    string_copy( *dst, src->len + 1, src->addr, src->len );
+    return 0;
+}
+
+static void vdco_init_values( p_dump_context ctx )
+{
+    ctx->path = NULL;
+    ctx->table = NULL;
+    ctx->columns = NULL;
+    ctx->excluded_columns = NULL;
+    ctx->filter = NULL;
+    ctx->idx_range = NULL;
+    ctx->output_file = NULL;
+    ctx->output_path = NULL;
+    ctx->rows = NULL;
+
+    ctx->print_row_id = true;
+    ctx->print_in_hex = false;
+    ctx->lf_after_row = 1;
+    ctx->print_column_names = true;
+    ctx->print_dna_bases = false;
+    ctx->max_line_len = 0;
+    ctx->indented_line_len = 0;
+    ctx->phase = 0;
+    ctx->slice_depth = 0;
+
+    ctx->help_requested = false;
+    ctx->usage_requested = false;
+    ctx->schema_dump_requested = false;
+    ctx->table_enum_requested = false;
+    ctx->version_requested = false;
+    ctx->column_enum_requested = false;
+    ctx->column_enum_short = false;
+    ctx->id_range_requested = false;
+    ctx->without_sra_types = false;
+    ctx->print_num_elem = false;
+    ctx->objver_requested = false;
+    ctx->objts_requested = false;
+    ctx->objtype_requested = false;
+    ctx->idx_enum_requested = false;
+    ctx->idx_range_requested = false;
+    ctx->disable_multithreading = false;
+    ctx->table_defined = false;
+    ctx->diff = false;
+    ctx->show_spotgroups = false;
+    ctx->show_spread = false;
+    ctx->interactive = false;    
+}
+
+rc_t vdco_init( dump_context **ctx )
+{
+    rc_t rc = 0;
+    if ( ctx == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    }
+    if ( rc == 0 )
+    {
+        (*ctx) = (p_dump_context)calloc( 1, sizeof **ctx );
+        if ( *ctx == NULL )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        }
+        if ( rc == 0 )
+        {
+            VectorInit( &((*ctx)->schema_list), 0, 5 );
+            vdco_init_values( *ctx );
+        }
+    }
+    return rc;
+}
+
+static void CC vdco_schema_list_entry_whack( void *item, void *data )
+{
+    free( item );
+}
+
+rc_t vdco_destroy( p_dump_context ctx )
+{
+    rc_t rc = 0;
+    if ( ctx == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcDestroying, rcParam, rcNull );
+    }
+    if ( rc == 0 )
+    {
+        VectorWhack( &(ctx->schema_list),
+                     vdco_schema_list_entry_whack, NULL );
+
+        if ( ctx->table != NULL )
+        {
+            free( (void*)ctx->table );
+            ctx->table = NULL;
+        }
+
+        if ( ctx->columns != NULL )
+        {
+            free( (void*)ctx->columns );
+            ctx->columns = NULL;
+        }
+
+        if ( ctx->excluded_columns != NULL )
+        {
+            free( (void*)ctx->excluded_columns );
+            ctx->excluded_columns = NULL;
+        }
+
+        if ( ctx->row_range != NULL )
+        {
+            free( (void*)ctx->row_range );
+            ctx->row_range = NULL;
+        }
+
+
+        if ( ctx->output_path != NULL )
+        {
+            free( (void*)ctx->output_path );
+            ctx->output_path = NULL;
+        }
+
+        if ( ctx->output_file != NULL )
+        {
+            free( (void*)ctx->output_file );
+            ctx->output_file = NULL;
+        }
+
+        if ( ctx->rows != NULL )
+        {
+            num_gen_destroy( ctx->rows );
+            ctx->rows = NULL;
+        }
+        free( ctx );
+    }
+    return rc;
+}
+
+
+static rc_t vdco_add_schema( p_dump_context ctx, const char *src )
+{
+    rc_t rc = 0;
+    if ( ( ctx == NULL )||( src == NULL ) )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    }
+    if ( rc == 0 )
+    {
+        char *s = string_dup_measure ( src, NULL );
+        if ( s != NULL )
+        {
+            rc = VectorAppend( &(ctx->schema_list), NULL, s );
+            DISP_RC( rc, "VectorAppend() failed" );
+            if ( rc != 0 )
+            {
+                free( s );
+            }
+        }
+        else
+            rc = RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    }
+    return rc;
+}
+
+static rc_t vdco_set_filter( p_dump_context ctx, const char *src )
+{
+    rc_t rc = 0;
+    if ( ( ctx == NULL )||( src == NULL ) )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    }
+    if ( rc == 0 )
+    {
+        rc = vdco_set_str( (char**)&(ctx->filter), src );
+        DISP_RC( rc, "vdco_set_str() failed" );
+    }
+    return rc;
+}
+
+/* not static because can be called directly from vdb-dump.c */
+rc_t vdco_set_table( p_dump_context ctx, const char * src )
+{
+    rc_t rc;
+    if ( ( ctx == NULL )||( src == NULL ) )
+        rc = RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    else
+    {
+        rc = vdco_set_str( (char**)&(ctx->table), src );
+        DISP_RC( rc, "vdco_set_str() failed" );
+    }
+    return rc;
+}
+
+
+rc_t vdco_set_table_String( p_dump_context ctx, const String * src )
+{
+    rc_t rc;
+    if ( ( ctx == NULL )||( src == NULL ) )
+        rc = RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    else
+    {
+        rc = vdco_set_String( (char**)&(ctx->table), src );
+        DISP_RC( rc, "vdco_set_str() failed" );
+    }
+    return rc;
+}
+
+
+static rc_t vdco_set_columns( p_dump_context ctx, const char *src )
+{
+    rc_t rc = 0;
+    if ( ( ctx == NULL )||( src == NULL ) )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    }
+    if ( rc == 0 )
+    {
+        rc = vdco_set_str( (char**)&(ctx->columns), src );
+        DISP_RC( rc, "vdco_set_str() failed" );
+    }
+    return rc;
+}
+
+static rc_t vdco_set_excluded_columns( p_dump_context ctx, const char *src )
+{
+    rc_t rc = 0;
+    if ( ( ctx == NULL )||( src == NULL ) )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    }
+    if ( rc == 0 )
+    {
+        rc = vdco_set_str( (char**)&(ctx->excluded_columns), src );
+        DISP_RC( rc, "vdco_set_str() failed" );
+    }
+    return rc;
+}
+
+static rc_t vdco_set_row_range( p_dump_context ctx, const char *src )
+{
+    rc_t rc = 0;
+    if ( ( ctx == NULL )||( src == NULL ) )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    }
+    if ( rc == 0 )
+    {
+        rc = vdco_set_str( (char**)&(ctx->row_range), src );
+        DISP_RC( rc, "vdco_set_str() failed" );
+        if ( rc == 0 )
+        {
+            if ( ctx->rows != NULL )
+            {
+                num_gen_destroy( ctx->rows );
+                ctx->rows = NULL;
+            }
+            rc = num_gen_make_from_str_sorted( &ctx->rows, src, ctx->merge_ranges );
+            DISP_RC( rc, "num_gen_make_from_str() failed" );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdco_set_idx_range( p_dump_context ctx, const char *src )
+{
+    rc_t rc = 0;
+    if ( ( ctx == NULL )||( src == NULL ) )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    }
+    if ( rc == 0 )
+    {
+        rc = vdco_set_str( (char**)&(ctx->idx_range), src );
+        DISP_RC( rc, "vdco_set_str() failed" );
+    }
+    return rc;
+}
+
+
+static rc_t vdco_set_output_file( p_dump_context ctx, const char *src )
+{
+    rc_t rc = 0;
+    if ( ( ctx == NULL )||( src == NULL ) )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    }
+    if ( rc == 0 )
+    {
+        rc = vdco_set_str( (char**)&(ctx->output_file), src );
+        DISP_RC( rc, "vdco_set_str() failed" );
+    }
+    return rc;
+}
+
+
+static rc_t vdco_set_output_path( p_dump_context ctx, const char *src )
+{
+    rc_t rc = 0;
+    if ( ( ctx == NULL )||( src == NULL ) )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcWriting, rcParam, rcNull );
+    }
+    if ( rc == 0 )
+    {
+        rc = vdco_set_str( (char**)&(ctx->output_path), src );
+        DISP_RC( rc, "vdco_set_str() failed" );
+    }
+    return rc;
+}
+
+
+static bool vdco_set_format( p_dump_context ctx, const char *src )
+{
+    if ( ctx == NULL ) return false;
+    if ( src == NULL ) return false;
+    if ( strcmp( src, "csv" ) == 0 )
+        ctx->format = df_csv;
+    else if ( strcmp( src, "xml" ) == 0 )
+        ctx->format = df_xml;
+    else if ( strcmp( src, "json" ) == 0 )
+        ctx->format = df_json;
+    else if ( strcmp( src, "piped" ) == 0 )
+        ctx->format = df_piped;
+    else if ( strcmp( src, "sra-dump" ) == 0 )
+        ctx->format = df_sra_dump;
+    else if ( strcmp( src, "tab" ) == 0 )
+        ctx->format = df_tab;
+    else if ( strcmp( src, "fastq" ) == 0 )
+        ctx->format = df_fastq;
+    else if ( strcmp( src, "fastq1" ) == 0 )
+        ctx->format = df_fastq1;
+    else if ( strcmp( src, "fasta" ) == 0 )
+        ctx->format = df_fasta;
+    else if ( strcmp( src, "fasta1" ) == 0 )
+        ctx->format = df_fasta1;
+    else if ( strcmp( src, "fasta2" ) == 0 )
+        ctx->format = df_fasta2;
+    else if ( strcmp( src, "qual" ) == 0 )
+        ctx->format = df_qual;
+    else if ( strcmp( src, "qual1" ) == 0 )
+        ctx->format = df_qual1;
+    else if ( strcmp( src, "bin" ) == 0 )
+        ctx->format = df_bin;
+    else if ( strcmp( src, "sql" ) == 0 )
+        ctx->format = df_sql;
+    else ctx->format = df_default;
+    return true;
+}
+
+
+static bool vdco_set_boolean_char( dump_context *ctx, const char * src )
+{
+    ctx->c_boolean = 0;
+    if ( ctx == NULL ) return false;
+    if ( src == NULL ) return false;
+    if ( strcmp( src, "T" ) == 0 )
+        ctx->c_boolean = 'T';
+    else if ( strcmp( src, "1" ) == 0 )
+        ctx->c_boolean = '1';
+    return true;
+}
+
+
+static bool vdco_get_bool_option( const Args *my_args,
+                                  const char *name,
+                                  const bool def )
+{
+    bool res = def;
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( my_args, name, &count );
+    DISP_RC( rc, "ArgsOptionCount() failed" );
+    if ( rc == 0 )
+        res = ( count > 0 );
+    return res;
+}
+
+static bool vdco_get_bool_neg_option( const Args *my_args,
+                                      const char *name,
+                                      const bool def )
+{
+    bool res = def;
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( my_args, name, &count );
+    DISP_RC( rc, "ArgsOptionCount() failed" );
+    if ( rc == 0 )
+        res = ( count == 0 );
+    return res;
+}
+
+static uint16_t vdco_get_uint16_option( const Args *my_args,
+                                        const char *name,
+                                        const uint16_t def )
+{
+    uint16_t res = def;
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( my_args, name, &count );
+    DISP_RC( rc, "ArgsOptionCount() failed" );
+    if ( ( rc == 0 )&&( count > 0 ) )
+    {
+        const char *s;
+        rc = ArgsOptionValue( my_args, name, 0, (const void **)&s );
+        DISP_RC( rc, "ArgsOptionValue() failed" );
+        if ( rc == 0 ) res = atoi( s );
+    }
+    return res;
+}
+
+
+static size_t vdco_get_size_t_option( const Args *my_args,
+                                      const char *name,
+                                      const size_t def )
+{
+    size_t res = def;
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( my_args, name, &count );
+    DISP_RC( rc, "ArgsOptionCount() failed" );
+    if ( ( rc == 0 )&&( count > 0 ) )
+    {
+        const char *s;
+        rc = ArgsOptionValue( my_args, name, 0, (const void **)&s );
+        DISP_RC( rc, "ArgsOptionValue() failed" );
+        if ( rc == 0 )
+        {
+            char *endp;
+            res = strtou64( s, &endp, 10 );
+        }
+    }
+    return res;
+}
+
+
+static const char* vdco_get_str_option( const Args *my_args,
+                                        const char *name )
+{
+    const char* res = NULL;
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( my_args, name, &count );
+    DISP_RC( rc, "ArgsOptionCount() failed" );
+    if ( ( rc == 0 )&&( count > 0 ) )
+    {
+        rc = ArgsOptionValue( my_args, name, 0, (const void**)&res );
+        DISP_RC( rc, "ArgsOptionValue() failed" );
+    }
+    return res;
+}
+
+void vdco_set_schemas( const Args *my_args, p_dump_context ctx )
+{
+    uint32_t count;
+    rc_t rc = ArgsOptionCount( my_args, OPTION_SCHEMA, &count );
+    DISP_RC( rc, "ArgsOptionCount() failed" );
+    if ( ( rc == 0 )&&( count > 0 ) )
+    {
+        uint32_t i;
+        for ( i=0; i<count; ++i )
+        {
+            const char* txt = NULL;
+            rc = ArgsOptionValue( my_args, OPTION_SCHEMA, i, (const void**)&txt );
+            DISP_RC( rc, "ArgsOptionValue() failed" );
+            if ( ( rc == 0 )&&( txt != NULL ) )
+            {
+                rc = vdco_add_schema( ctx, txt );
+                DISP_RC( rc, "dump_context_add_schema() failed" );
+            }
+        }
+    }
+}
+
+
+size_t vdco_schema_count( p_dump_context ctx )
+{
+    if ( ctx == NULL ) return 0;
+    return VectorLength( &(ctx->schema_list ) );
+}
+
+static void vdco_evaluate_options( const Args *my_args,
+                                   dump_context *ctx )
+{
+    if ( my_args == NULL ) return;
+    if ( ctx == NULL ) return;
+
+    ctx->help_requested = vdco_get_bool_option( my_args, OPTION_HELP, false );
+    ctx->print_row_id = vdco_get_bool_option( my_args, OPTION_ROW_ID_ON, false );
+    ctx->lf_after_row = vdco_get_uint16_option( my_args, OPTION_LINE_FEED, 1 );
+    ctx->phase = vdco_get_uint16_option( my_args, OPTION_PHASE, 0 );
+    ctx->print_column_names = vdco_get_bool_neg_option( my_args, OPTION_COLNAME_OFF, true );
+    ctx->print_in_hex = vdco_get_bool_option( my_args, OPTION_IN_HEX, false );
+    ctx->schema_dump_requested = vdco_get_bool_option( my_args, OPTION_SCHEMA_DUMP, false );
+    ctx->table_enum_requested = vdco_get_bool_option( my_args, OPTION_TABLE_ENUM, false );
+    ctx->version_requested = vdco_get_bool_option( my_args, OPTION_VERSION, false );
+    ctx->column_enum_requested = vdco_get_bool_option( my_args, OPTION_COLUMN_ENUM, false );
+    ctx->column_enum_short = vdco_get_bool_option( my_args, OPTION_COLUMN_SHORT, false );
+    ctx->print_dna_bases = vdco_get_bool_option( my_args, OPTION_DNA_BASES, false );
+    ctx->objver_requested = vdco_get_bool_option( my_args, OPTION_OBJVER, false );
+    ctx->objts_requested = vdco_get_bool_option( my_args, OPTION_OBJTS, false );
+    ctx->objtype_requested = vdco_get_bool_option( my_args, OPTION_OBJTYPE, false );
+    ctx->max_line_len = vdco_get_uint16_option( my_args, OPTION_MAX_LINE_LEN, 0 );
+    ctx->indented_line_len = vdco_get_uint16_option( my_args, OPTION_LINE_INDENT, 0 );
+    ctx->id_range_requested = vdco_get_bool_option( my_args, OPTION_ID_RANGE, false );
+    vdco_set_format( ctx, vdco_get_str_option( my_args, OPTION_FORMAT ) );
+    ctx->without_sra_types = vdco_get_bool_option( my_args, OPTION_WITHOUT_SRA, false );
+    ctx->print_num_elem = vdco_get_bool_option( my_args, OPTION_NUMELEM, false );
+    ctx->sum_num_elem = vdco_get_bool_option( my_args, OPTION_NUMELEMSUM, false );
+    ctx->show_blobbing = vdco_get_bool_option( my_args, OPTION_SHOW_BLOBBING, false );
+    ctx->enum_phys = vdco_get_bool_option( my_args, OPTION_ENUM_PHYS, false );
+    ctx->enum_readable = vdco_get_bool_option( my_args, OPTION_ENUM_READABLE, false );
+    ctx->idx_enum_requested = vdco_get_bool_option( my_args, OPTION_IDX_ENUM, false );
+    ctx->disable_multithreading = vdco_get_bool_option( my_args, OPTION_NO_MULTITHREAD, false );
+    ctx->print_info = vdco_get_bool_option( my_args, OPTION_INFO, false );
+    ctx->diff = vdco_get_bool_option( my_args, OPTION_DIFF, false );
+    ctx->show_spotgroups = vdco_get_bool_option( my_args, OPTION_SPOTGROUPS, false );
+    /*ctx->force_sra_schema = vdco_get_bool_option( my_args, OPTION_SRASCHEMA, false );*/
+    ctx->merge_ranges = vdco_get_bool_option( my_args, OPTION_MERGE_RANGES, false );
+    ctx->show_spread = vdco_get_bool_option( my_args, OPTION_SPREAD, false );
+    ctx->interactive = vdco_get_bool_option( my_args, OPTION_INTERACTIVE, false );
+    ctx->slice_depth = vdco_get_uint16_option( my_args, OPTION_SLICE, 0 );
+    
+    ctx->cur_cache_size = vdco_get_size_t_option( my_args, OPTION_CUR_CACHE, CURSOR_CACHE_SIZE );
+    ctx->output_buffer_size = vdco_get_size_t_option( my_args, OPTION_OUT_BUF_SIZE, DEF_OPTION_OUT_BUF_SIZE );
+    
+    if ( vdco_get_bool_option( my_args, OPTION_GZIP, false ) )
+        ctx->compress_mode = orm_gzip;
+    else if ( vdco_get_bool_option( my_args, OPTION_BZIP2, false ) )
+        ctx->compress_mode = orm_bzip2;
+    else
+        ctx->compress_mode = orm_uncompressed;
+    
+    vdco_set_table( ctx, vdco_get_str_option( my_args, OPTION_TABLE ) );
+    ctx->table_defined = ( ctx->table != NULL );
+    
+    vdco_set_columns( ctx, vdco_get_str_option( my_args, OPTION_COLUMNS ) );
+    vdco_set_excluded_columns( ctx, vdco_get_str_option( my_args, OPTION_EXCLUDED_COLUMNS ) );
+    vdco_set_row_range( ctx, vdco_get_str_option( my_args, OPTION_ROWS ) );
+    vdco_set_idx_range( ctx, vdco_get_str_option( my_args, OPTION_IDX_RANGE ) );
+    vdco_set_output_file( ctx, vdco_get_str_option( my_args, OPTION_OUT_FILE ) );
+    vdco_set_output_path( ctx, vdco_get_str_option( my_args, OPTION_OUT_PATH ) );
+
+    ctx->idx_range_requested = ( ctx->idx_range != NULL );
+    vdco_set_schemas( my_args, ctx );
+    vdco_set_filter( ctx, vdco_get_str_option( my_args, OPTION_FILTER ) );
+    vdco_set_boolean_char( ctx, vdco_get_str_option( my_args, OPTION_BOOLEAN ) );
+
+    if ( ctx->format == df_sra_dump )
+        ctx->without_sra_types = true;
+}
+
+rc_t vdco_capture_arguments_and_options( const Args * args, dump_context *ctx)
+{
+    rc_t rc;
+
+    vdco_evaluate_options( args, ctx );
+
+    rc = ArgsHandleLogLevel( args );
+    DISP_RC( rc, "ArgsHandleLogLevel() failed" );
+    return rc;
+}
diff --git a/tools/vdb-dump/vdb-dump-context.h b/tools/vdb-dump/vdb-dump-context.h
new file mode 100644
index 0000000..2bd5d54
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-context.h
@@ -0,0 +1,220 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_dump_context_
+#define _h_vdb_dump_context_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include <kapp/args.h>
+#include <klib/vector.h>
+#include <klib/num-gen.h>
+#include "vdb-dump-redir.h"
+
+#define OPTION_ROW_ID_ON         "row_id_on"
+#define OPTION_LINE_FEED         "line_feed"
+#define OPTION_COLNAME_OFF       "colname_off"
+#define OPTION_IN_HEX            "in_hex"
+#define OPTION_TABLE             "table"
+#define OPTION_ROWS              "rows"
+#define OPTION_COLUMNS           "columns"
+#define OPTION_SCHEMA            "schema"
+#define OPTION_SCHEMA_DUMP       "schema_dump"
+#define OPTION_TABLE_ENUM        "table_enum"
+#define OPTION_COLUMN_ENUM       "column_enum"
+#define OPTION_COLUMN_SHORT      "column_enum_short"
+#define OPTION_DNA_BASES         "dna_bases"
+#define OPTION_MAX_LINE_LEN      "max_length"
+#define OPTION_LINE_INDENT       "indent_width"
+#define OPTION_FILTER            "filter"
+#define OPTION_FORMAT            "format"
+#define OPTION_ID_RANGE          "id_range"
+#define OPTION_WITHOUT_SRA       "without_sra"
+#define OPTION_EXCLUDED_COLUMNS  "exclude"
+#define OPTION_BOOLEAN           "boolean"
+#define OPTION_OBJVER            "obj_version"
+#define OPTION_OBJTS             "obj_timestamp"
+#define OPTION_OBJTYPE           "obj_type"
+#define OPTION_NUMELEM           "numelem"
+#define OPTION_NUMELEMSUM        "numelemsum"
+#define OPTION_SHOW_BLOBBING     "blobbing"
+#define OPTION_ENUM_PHYS         "phys"
+#define OPTION_ENUM_READABLE     "readable"
+#define OPTION_IDX_ENUM          "idx-report"
+#define OPTION_IDX_RANGE         "idx-range"
+#define OPTION_CUR_CACHE         "cur-cache"
+#define OPTION_OUT_FILE          "output-file"
+#define OPTION_OUT_PATH          "output-path"
+#define OPTION_PHASE             "phase"
+#define OPTION_GZIP              "gzip"
+#define OPTION_BZIP2             "bzip2"
+#define OPTION_OUT_BUF_SIZE      "output-buffer-size"
+#define OPTION_NO_MULTITHREAD    "disable-multithreading"
+#define OPTION_INFO              "info"
+#define OPTION_DIFF              "diff"
+#define OPTION_SPOTGROUPS        "spotgroups"
+/*#define OPTION_SRASCHEMA         "sraschema"*/
+#define OPTION_MERGE_RANGES      "merge-ranges"
+#define OPTION_SPREAD            "spread"
+#define OPTION_SLICE             "slice"
+#define OPTION_INTERACTIVE       "interactive"
+
+#define ALIAS_ROW_ID_ON         "I"
+#define ALIAS_LINE_FEED         "l"
+#define ALIAS_COLNAME_OFF       "N"
+#define ALIAS_IN_HEX            "X"
+#define ALIAS_TABLE             "T"
+#define ALIAS_ROWS              "R"
+#define ALIAS_COLUMNS           "C"
+#define ALIAS_SCHEMA            "S"
+#define ALIAS_SCHEMA_DUMP       "A"
+#define ALIAS_TABLE_ENUM        "E"
+#define ALIAS_COLUMN_ENUM       "O"
+#define ALIAS_COLUMN_SHORT      "o"
+#define ALIAS_DNA_BASES         "D"
+#define ALIAS_MAX_LINE_LEN      "M"
+#define ALIAS_LINE_INDENT       "i"
+#define ALIAS_FILTER            "F"
+#define ALIAS_FORMAT            "f"
+#define ALIAS_ID_RANGE          "r"
+#define ALIAS_WITHOUT_SRA       "n"
+#define ALIAS_EXCLUDED_COLUMNS  "x"
+#define ALIAS_BOOLEAN           "b"
+#define ALIAS_OBJVER            "j"
+#define ALIAS_OBJTYPE           "y"
+#define ALIAS_NUMELEM           "u"
+#define ALIAS_NUMELEMSUM        "U"
+
+#define USE_PATHTYPE_TO_DETECT_DB_OR_TAB 1
+#define CURSOR_CACHE_SIZE 256*1024*1024
+#define DEF_OPTION_OUT_BUF_SIZE 1024*1024
+
+typedef enum dump_format_t
+{
+    df_default,
+    df_csv,
+    df_xml,
+    df_json,
+    df_piped,
+    df_sra_dump,
+    df_tab,
+    df_fastq,
+    df_fastq1,
+    df_fasta,
+    df_fasta1,
+    df_fasta2,
+    df_qual,
+    df_qual1,
+    df_bin,
+    df_sql
+} dump_format_t;
+
+/********************************************************************
+the dump context contains all informations needed to execute the dump
+********************************************************************/
+typedef struct dump_context
+{
+    const char *path;
+    Vector schema_list;
+    const char *table;
+    const char *columns;
+    const char *excluded_columns;
+    const char *filter;
+    const char *idx_range;
+    const char *row_range;
+    const char *output_file;
+    const char *output_path;
+    struct num_gen * rows;
+    bool print_row_id;
+    uint16_t lf_after_row;
+    uint16_t max_line_len;
+    uint16_t indented_line_len;
+    uint16_t phase;
+    uint32_t generic_idx;
+    uint32_t slice_depth;
+    size_t cur_cache_size;
+    size_t output_buffer_size;
+    dump_format_t format;
+    out_redir_mode_t compress_mode;
+    char c_boolean;
+
+    bool print_column_names;
+    bool print_in_hex;
+    bool print_dna_bases;
+    bool help_requested;
+    bool usage_requested;
+    bool schema_dump_requested;
+    bool table_enum_requested;
+    bool version_requested;
+    bool column_enum_requested;
+    bool column_enum_short;
+    bool id_range_requested;
+    bool without_sra_types;
+    bool objver_requested;
+    bool objts_requested;
+    bool objtype_requested;
+    bool print_num_elem;
+    bool sum_num_elem;
+    bool show_blobbing;
+    bool enum_phys;
+    bool enum_readable;
+    bool idx_enum_requested;
+    bool idx_range_requested;
+    bool disable_multithreading;
+    bool print_info;
+    bool table_defined;
+    bool diff;
+    bool show_spotgroups;
+    bool merge_ranges;
+    bool show_spread;
+    bool interactive;
+} dump_context;
+typedef dump_context* p_dump_context;
+
+
+rc_t vdco_init( dump_context **ctx );
+rc_t vdco_destroy( p_dump_context ctx );
+
+size_t vdco_schema_count( p_dump_context ctx );
+
+void vdco_show_usage( p_dump_context ctx );
+void vdco_show_help( p_dump_context ctx );
+
+rc_t vdco_set_table( p_dump_context ctx, const char *src );
+rc_t vdco_set_table_String( p_dump_context ctx, const String * src );
+
+rc_t vdco_capture_arguments_and_options( const Args * args, dump_context *ctx );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-dump/vdb-dump-fastq.c b/tools/vdb-dump/vdb-dump-fastq.c
new file mode 100644
index 0000000..d02fef3
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-fastq.c
@@ -0,0 +1,1132 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "vdb-dump-fastq.h"
+#include "vdb-dump-helper.h"
+
+#include <stdlib.h>
+
+#include <kdb/manager.h>
+#include <vdb/vdb-priv.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/printf.h>
+#include <klib/num-gen.h>
+
+#include <insdc/sra.h> /* for filter/types */
+
+
+rc_t CC Quitting ( void );
+
+#define INVALID_COLUMN 0xFFFFFFFF
+#define DEF_FASTA_LEN 70
+
+typedef struct fastq_ctx
+{
+    const char * run_name;
+    const VTable * tbl;
+    const VCursor * cursor;
+    const struct num_gen_iter * row_iter;
+    dump_format_t format;
+    size_t cur_cache_size;
+    uint32_t max_line_len;
+    uint32_t idx_read;
+    uint32_t idx_qual;
+    uint32_t idx_name;
+    uint32_t idx_read_start;
+    uint32_t idx_read_len;
+    uint32_t idx_read_type;
+} fastq_ctx;
+
+
+static char * vdb_fastq_extract_run_name( const char * acc_or_path )
+{
+    char * delim = string_rchr ( acc_or_path, string_size( acc_or_path ), '/' );
+    if ( delim == NULL )
+        return string_dup_measure ( acc_or_path, NULL );
+    else
+        return string_dup_measure ( delim + 1, NULL );    
+}
+
+
+static void init_fastq_ctx( const p_dump_context ctx, fastq_ctx * fctx, const char * acc_or_path )
+{
+    fctx->run_name = vdb_fastq_extract_run_name( acc_or_path );
+    fctx->tbl      = NULL;    
+    fctx->cursor   = NULL;
+    fctx->row_iter = NULL;
+    fctx->max_line_len = ctx->max_line_len;
+    fctx->format   = ctx->format;
+    fctx->cur_cache_size = ctx->cur_cache_size;
+    fctx->idx_read = INVALID_COLUMN;
+    fctx->idx_qual = INVALID_COLUMN;
+    fctx->idx_name = INVALID_COLUMN;
+    fctx->idx_read_start  = INVALID_COLUMN;
+    fctx->idx_read_len    = INVALID_COLUMN;
+    fctx->idx_read_type   = INVALID_COLUMN;
+}
+
+
+static void vdb_fastq_row_error( const char * fmt, rc_t rc, int64_t row_id )
+{
+    PLOGERR( klogInt, ( klogInt, rc, fmt, "row_nr=%li", row_id ) );
+}
+
+
+static bool is_name_in_list( KNamelist * col_names, const char * to_find )
+{
+    bool res = false;
+    uint32_t count;
+    rc_t rc = KNamelistCount( col_names, &count );
+    DISP_RC( rc, "KNamelistCount() failed" );
+    if ( rc == 0 )
+    {
+        uint32_t i;
+        size_t to_find_len = string_size( to_find );
+        for ( i = 0; i < count && rc == 0 && !res; ++i )
+        {
+            const char * col_name;
+            rc = KNamelistGet( col_names, i, &col_name );
+            DISP_RC( rc, "KNamelistGet() failed" );
+            if ( rc == 0 )
+            {
+                size_t col_name_len = string_size( col_name );
+                if ( col_name_len == to_find_len )
+                    res = ( string_cmp( to_find, to_find_len, col_name, col_name_len, col_name_len ) == 0 );
+            }
+        }
+    }
+    return res;
+}
+
+
+static rc_t prepare_column( fastq_ctx * fctx, KNamelist * col_names, uint32_t * col_idx,
+                            const char * to_find, const char * col_spec )
+{
+    rc_t rc = 0;
+    if ( is_name_in_list( col_names, to_find ) )
+    {
+        rc = VCursorAddColumn( fctx->cursor, col_idx, col_spec );
+        if ( rc != 0 )
+        {
+            *col_idx = INVALID_COLUMN;
+            PLOGERR( klogInt, ( klogInt, rc, "VCurosrAddColumn( '$(col)' ) failed", "col=%s", col_spec ) );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdb_prepare_cursor( fastq_ctx * fctx )
+{
+    KNamelist * col_names;
+    rc_t rc = VTableListCol( fctx->tbl, &col_names );
+    DISP_RC( rc, "VTableListCol() failed" );
+    if ( rc == 0 )
+    {
+        rc = VTableCreateCachedCursorRead( fctx->tbl, &fctx->cursor, fctx->cur_cache_size );
+        DISP_RC( rc, "VTableCreateCursorRead( fasta/fastq ) failed" );
+        if ( rc == 0 )
+            rc = prepare_column( fctx, col_names, &fctx->idx_read, "READ", "(INSDC:dna:text)READ" );
+    
+        if ( rc == 0 && ( fctx->format == df_fastq || fctx->format == df_fastq1 ) )
+            rc = prepare_column( fctx, col_names, &fctx->idx_qual, "QUALITY", "(INSDC:quality:text:phred_33)QUALITY" );
+
+        if ( rc == 0 && ( fctx->format == df_qual || fctx->format == df_qual1 ) )
+            rc = prepare_column( fctx, col_names, &fctx->idx_qual, "QUALITY", "(INSDC:quality:phred)QUALITY" );
+            
+        if ( rc == 0 )
+        {
+            if ( fctx->format == df_fasta2 )
+                rc = prepare_column( fctx, col_names, &fctx->idx_name, "SEQ_ID", "(ascii)SEQ_ID" );
+            if ( rc == 0 && fctx->idx_name == INVALID_COLUMN )
+                rc = prepare_column( fctx, col_names, &fctx->idx_name, "NAME", "(ascii)NAME" );
+        }
+
+        if ( rc == 0 )
+            rc = prepare_column( fctx, col_names, &fctx->idx_read_start, "READ_START", "(INSDC:coord:zero)READ_START" );
+
+        if ( rc == 0 )
+            rc = prepare_column( fctx, col_names, &fctx->idx_read_len, "READ_LEN", "(INSDC:coord:len)READ_LEN" );
+
+        if ( rc == 0 )
+            rc = prepare_column( fctx, col_names, &fctx->idx_read_type, "READ_TYPE", "(INSDC:SRA:xread_type)READ_TYPE" );
+
+        if ( rc == 0 )
+        {
+            rc = VCursorOpen ( fctx->cursor );
+            DISP_RC( rc, "VCursorOpen( fasta/fastq ) failed" );
+        }
+        KNamelistRelease( col_names );
+    }
+    return rc;
+}
+
+
+typedef struct fastq_spot
+{
+    const char * name;
+    const char * bases;
+    const char * qual;
+    const uint32_t * rd_start;
+    const uint32_t * rd_len;
+    const uint8_t * rd_type;
+    uint32_t name_len;
+    uint32_t num_bases;
+    uint32_t num_qual;
+    uint32_t num_rd_start;
+    uint32_t num_rd_len;
+    uint32_t num_rd_type;
+} fastq_spot;
+
+
+static rc_t read_spot( const fastq_ctx * fctx, int64_t row_id, fastq_spot * spot )
+{
+    rc_t rc = 0;
+    uint32_t elem_bits, boff;
+    if ( fctx->idx_name != INVALID_COLUMN )
+    {
+        rc = VCursorCellDataDirect( fctx->cursor, row_id, fctx->idx_name, &elem_bits,
+                                    (const void**)&spot->name, &boff, &spot->name_len );
+        if ( rc != 0 )
+            vdb_fastq_row_error( "VCursorCellDataDirect( row#$(row_nr), NAME ) failed", rc, row_id );
+    }
+
+    if ( rc == 0 && fctx->idx_read != INVALID_COLUMN )
+    {
+        rc = VCursorCellDataDirect( fctx->cursor, row_id, fctx->idx_read, &elem_bits,
+                                    (const void**)&spot->bases, &boff, &spot->num_bases );
+        if ( rc != 0 )
+            vdb_fastq_row_error( "VCursorCellDataDirect( row#$(row_nr), READ ) failed", rc, row_id );
+    }
+    
+    if ( rc == 0 && fctx->idx_qual != INVALID_COLUMN )
+    {
+        rc = VCursorCellDataDirect( fctx->cursor, row_id, fctx->idx_qual, &elem_bits,
+                                    (const void**)&spot->qual, &boff, &spot->num_qual );
+        if ( rc != 0 )
+            vdb_fastq_row_error( "VCursorCellDataDirect( row#$(row_nr), QUALITY ) failed", rc, row_id );
+    }
+
+    if ( rc == 0 && fctx->idx_read_start != INVALID_COLUMN )
+    {
+        rc = VCursorCellDataDirect( fctx->cursor, row_id, fctx->idx_read_start, &elem_bits,
+                                    (const void**)&spot->rd_start, &boff, &spot->num_rd_start );
+        if ( rc != 0 )
+            vdb_fastq_row_error( "VCursorCellDataDirect( row#$(row_nr), READ_START ) failed", rc, row_id );
+    }
+    
+    if ( rc == 0 && fctx->idx_read_len != INVALID_COLUMN )
+    {
+        rc = VCursorCellDataDirect( fctx->cursor, row_id, fctx->idx_read_len, &elem_bits,
+                                    (const void**)&spot->rd_len, &boff, &spot->num_rd_len );
+        if ( rc != 0 )
+            vdb_fastq_row_error( "VCursorCellDataDirect( row#$(row_nr), READ_LEN ) failed", rc, row_id );
+    }
+
+    if ( rc == 0 && fctx->idx_read_type != INVALID_COLUMN )
+    {
+        rc = VCursorCellDataDirect( fctx->cursor, row_id, fctx->idx_read_type, &elem_bits,
+                                    (const void**)&spot->rd_type, &boff, &spot->num_rd_type );
+        if ( rc != 0 )
+            vdb_fastq_row_error( "VCursorCellDataDirect( row#$(row_nr), READ_TYPE ) failed", rc, row_id );
+    }
+    
+    return rc;
+}
+
+
+static rc_t vdb_fastq1_frag_type_checked( fastq_spot * spot, int64_t row_id, const fastq_ctx * fctx )
+{
+    rc_t rc = 0;
+    if ( spot->num_bases != spot->num_qual )
+    {
+        rc = RC( rcExe, rcNoTarg, rcConstructing, rcNoObj, rcInvalid );
+        PLOGERR( klogInt,
+                 ( klogInt, rc, "invalid spot #$(row): bases.len( $(n_bases) ) != qual.len( $(n_qual)",
+                    "row=%li,n_bases=%d,n_qual=%d", row_id, spot->num_bases, spot->num_qual ) );
+    }
+    else if ( spot->num_rd_start != spot->num_rd_len ||
+               spot->num_rd_start != spot->num_rd_type )
+    {
+        rc = RC( rcExe, rcNoTarg, rcConstructing, rcNoObj, rcInvalid );
+        PLOGERR( klogInt,
+                 ( klogInt, rc, 
+                   "invalid spot #$(row): #READ_START=$(rd_start), #READ_LEN=$(rd_len), #READ_TYPE=$(rd_type)",
+                   "row=%li,rd_start=%d,rd_len=%d,rd_type=%d",
+                   row_id, spot->num_rd_start, spot->num_rd_len, spot->num_rd_type ) );
+    }
+    else
+    {
+        uint32_t idx, frag, ofs;
+        for ( idx = 0, frag = 1, ofs = 0; rc == 0 && idx < spot->num_rd_start; ++idx )
+        {
+            if ( ( ( spot->rd_type[ idx ] & READ_TYPE_BIOLOGICAL ) == READ_TYPE_BIOLOGICAL ) &&
+                 spot->rd_len[ idx ] > 0 )
+            {
+                rc = KOutMsg( "@%s.%li.%d %.*s length=%u\n%.*s\n+%s.%li.%d %.*s length=%u\n%.*s\n",
+                              fctx->run_name, row_id, frag, spot->name_len, spot->name, spot->rd_len[ idx ],
+                              spot->rd_len[ idx ], &( spot->bases[ ofs ] ),
+                              fctx->run_name, row_id, frag, spot->name_len, spot->name, spot->rd_len[ idx ],
+                              spot->rd_len[ idx ], &( spot->qual[ ofs ] )
+                              );
+                frag++;
+            }
+            ofs += spot->rd_len[ idx ];
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdb_fastq1_frag_not_type_checked( fastq_spot * spot, int64_t row_id, const fastq_ctx * fctx )
+{
+    rc_t rc = 0;
+    if ( spot->num_bases != spot->num_qual )
+    {
+        rc = RC( rcExe, rcNoTarg, rcConstructing, rcNoObj, rcInvalid );
+        PLOGERR( klogInt,
+                 ( klogInt, rc, "invalid spot #$(row): bases.len( $(n_bases) ) != qual.len( $(n_qual)",
+                    "row=%li,n_bases=%d,n_qual=%d", row_id, spot->num_bases, spot->num_qual ) );
+    }
+    else if ( spot->num_rd_start != spot->num_rd_len )
+    {
+        rc = RC( rcExe, rcNoTarg, rcConstructing, rcNoObj, rcInvalid );
+        PLOGERR( klogInt,
+                 ( klogInt, rc, 
+                   "invalid spot #$(row): #READ_START=$(rd_start), #READ_LEN=$(rd_len)",
+                   "row=%li,rd_start=%d,rd_len=%d",
+                   row_id, spot->num_rd_start, spot->num_rd_len ) );
+    }
+    else
+    {
+        uint32_t idx, frag, ofs;
+        for ( idx = 0, frag = 1, ofs = 0; rc == 0 && idx < spot->num_rd_start; ++idx )
+        {
+            if ( spot->rd_len[ idx ] > 0 )
+            {
+                rc = KOutMsg( "@%s.%li.%d %.*s length=%u\n%.*s\n+%s.%li.%d %.*s length=%u\n%.*s\n",
+                              fctx->run_name, row_id, frag, spot->name_len, spot->name, spot->rd_len[ idx ],
+                              spot->rd_len[ idx ], &( spot->bases[ ofs ] ),
+                              fctx->run_name, row_id, frag, spot->name_len, spot->name, spot->rd_len[ idx ],
+                              spot->rd_len[ idx ], &( spot->qual[ ofs ] )
+                              );
+                frag++;
+            }
+            ofs += spot->rd_len[ idx ];
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdb_fastq1_loop( const fastq_ctx * fctx )
+{
+    rc_t rc = 0;
+    if ( fctx->idx_read == INVALID_COLUMN || fctx->idx_name == INVALID_COLUMN ||
+         fctx->idx_qual == INVALID_COLUMN || fctx->idx_read_start == INVALID_COLUMN ||
+         fctx->idx_read_len == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcConstructing, rcNoObj, rcInvalid );
+        DISP_RC( rc, "cannot generate fasta-format, at least one of these columns not found: READ, NAME, QUALITY, READ_START, READ_LEN" );
+    }
+    else
+    {
+        bool has_type = ( fctx->idx_read_type == INVALID_COLUMN );
+        int64_t row_id;
+        while ( rc == 0 && num_gen_iterator_next( fctx->row_iter, &row_id, &rc ) )
+        {
+            if ( rc == 0 )
+                rc = Quitting();
+            if ( rc == 0 )
+            {
+                fastq_spot spot;
+                rc = read_spot( fctx, row_id, &spot );
+                if ( rc == 0 )
+                {
+                    if ( has_type )
+                        rc = vdb_fastq1_frag_type_checked( &spot, row_id, fctx );
+                    else
+                        rc = vdb_fastq1_frag_not_type_checked( &spot, row_id, fctx );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdb_fastq_loop( const fastq_ctx * fctx )
+{
+    rc_t rc = 0;
+    if ( fctx->idx_read == INVALID_COLUMN || fctx->idx_qual == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcConstructing, rcNoObj, rcInvalid );
+        DISP_RC( rc, "cannot generate fasta-format: READ and/or QUALITY column not found" );
+    }
+    else
+    {
+        bool has_name = ( fctx->idx_name != INVALID_COLUMN );
+        int64_t row_id;
+        while ( rc == 0 && num_gen_iterator_next( fctx->row_iter, &row_id, &rc ) )
+        {
+            if ( rc == 0 )
+                rc = Quitting();
+            if ( rc == 0 )
+            {
+                fastq_spot spot;
+                rc = read_spot( fctx, row_id, &spot );
+                if ( rc == 0 )
+                {
+                    if ( has_name )
+                        rc = KOutMsg( "@%s.%li %.*s length=%u\n%.*s\n+%s.%li %.*s length=%u\n%.*s\n",
+                                    fctx->run_name, row_id, spot.name_len, spot.name, spot.num_bases,
+                                    spot.num_bases, spot.bases,
+                                    fctx->run_name, row_id, spot.name_len, spot.name, spot.num_qual,
+                                    spot.num_qual, spot.qual );
+                    else
+                    
+                        rc = KOutMsg( "@%s.%li %li length=%u\n%.*s\n+%s.%li %li length=%u\n%.*s\n",
+                                    fctx->run_name, row_id, row_id, spot.num_bases,
+                                    spot.num_bases, spot.bases,
+                                    fctx->run_name, row_id, row_id, spot.num_bases,
+                                    spot.num_qual, spot.qual );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t print_bases( const char * bases, uint32_t num_bases, uint32_t max_line_len )
+{
+    rc_t rc;
+    if ( max_line_len == 0 )
+        rc = KOutMsg( "%.*s\n", num_bases, bases );
+    else
+    {
+        uint32_t idx = 0, to_print = num_bases;
+        rc = 0;
+        while ( rc == 0 && idx < num_bases )
+        {
+            if ( to_print > max_line_len )
+                to_print = max_line_len;
+
+            rc = KOutMsg( "%.*s\n", to_print, &bases[ idx ] );
+            if ( rc == 0 )
+            {
+                idx += to_print;
+                to_print = ( num_bases - idx );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t print_qual( const char * qual, uint32_t count, uint32_t max_line_len )
+{
+    rc_t rc = 0;
+    uint32_t i = 0, on_line = 0;
+    while ( rc == 0 && i < count )
+    {
+        char buffer[ 16 ];
+        size_t num_writ;
+        rc = string_printf( buffer, sizeof buffer, &num_writ, "%d", qual[ i ] );
+        if ( rc == 0 )
+        {
+            if ( on_line == 0 )
+            {
+                rc = KOutMsg( "%s", buffer );
+                on_line = num_writ;
+            }
+            if ( ( on_line + num_writ + 1 ) < max_line_len )
+            {
+                rc = KOutMsg( " %s", buffer );
+                on_line += ( num_writ + 1 );
+            }
+            else
+            {
+                rc = KOutMsg( "\n%s", buffer );
+                on_line = num_writ;
+            }
+            i++;
+        }
+    }
+    rc = KOutMsg( "\n" );
+    return rc;
+}
+
+
+static rc_t vdb_fasta_frag_type_checked_loop( const fastq_ctx * fctx )
+{
+    rc_t rc = 0;
+    bool has_name = ( fctx->idx_name != INVALID_COLUMN );
+    int64_t row_id;
+    while ( rc == 0 && num_gen_iterator_next( fctx->row_iter, &row_id, &rc ) )
+    {
+        if ( rc == 0 )
+            rc = Quitting();
+        if ( rc == 0 )
+        {
+            fastq_spot spot;
+            rc = read_spot( fctx, row_id, &spot );
+            if ( rc == 0 )
+            {
+                uint32_t idx, frag, ofs;
+                for ( idx = 0, frag = 1, ofs = 0; rc == 0 && idx < spot.num_rd_start; ++idx )
+                {
+                    uint32_t frag_len = spot.rd_len[ idx ];
+                    if ( frag_len > 0 &&
+                         ( ( spot.rd_type[ idx ] & READ_TYPE_BIOLOGICAL ) == READ_TYPE_BIOLOGICAL ) )
+                    {
+                        if ( has_name )
+                            rc = KOutMsg( ">%s.%li.%d %.*s length=%u\n",
+                                    fctx->run_name, row_id, frag, spot.name_len, spot.name, frag_len );
+                        else
+                            rc = KOutMsg( ">%s.%li.%d %li length=%u\n",
+                                    fctx->run_name, row_id, frag, row_id, frag_len );
+                    
+                        if ( rc == 0 )
+                            rc = print_bases( &( spot.bases[ ofs ] ), frag_len, fctx->max_line_len );
+
+                        frag++;
+                    }
+                    ofs += frag_len;
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdb_fasta_frag_no_type_check_loop( const fastq_ctx * fctx )
+{
+    rc_t rc = 0;
+    bool has_name = ( fctx->idx_name != INVALID_COLUMN );
+    int64_t row_id;
+    while ( rc == 0 && num_gen_iterator_next( fctx->row_iter, &row_id, &rc ) )
+    {
+        if ( rc == 0 )
+            rc = Quitting();
+        if ( rc == 0 )
+        {
+            fastq_spot spot;
+            rc = read_spot( fctx, row_id, &spot );
+            if ( rc == 0 )
+            {
+                uint32_t idx, frag, ofs;
+                for ( idx = 0, frag = 1, ofs = 0; rc == 0 && idx < spot.num_rd_start; ++idx )
+                {
+                    uint32_t frag_len = spot.rd_len[ idx ];
+                    if ( frag_len > 0 )
+                    {
+                        if ( has_name )
+                            rc = KOutMsg( ">%s.%li.%d %.*s length=%u\n",
+                                    fctx->run_name, row_id, frag, spot.name_len, spot.name, frag_len );
+                        else
+                            rc = KOutMsg( ">%s.%li.%d %li length=%u\n",
+                                    fctx->run_name, row_id, frag, row_id, frag_len );
+                    
+                        if ( rc == 0 )
+                            rc = print_bases( &( spot.bases[ ofs ] ), frag_len, fctx->max_line_len );
+
+                        frag++;
+                    }
+                    ofs += frag_len;
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdb_fasta_spot_loop( const fastq_ctx * fctx )
+{
+    rc_t rc = 0;
+    bool has_name = ( fctx->idx_name != INVALID_COLUMN );
+    int64_t row_id;
+    while ( rc == 0 && num_gen_iterator_next( fctx->row_iter, &row_id, &rc ) )
+    {
+        if ( rc == 0 )
+            rc = Quitting();
+        if ( rc == 0 )
+        {
+            fastq_spot spot;
+            rc = read_spot( fctx, row_id, &spot );
+            if ( rc == 0 )
+            {
+                if ( has_name )
+                    rc = KOutMsg( ">%s.%li %.*s length=%u\n",
+                            fctx->run_name, row_id, spot.name_len, spot.name, spot.num_bases );
+                else
+                    rc = KOutMsg( ">%s.%li %li length=%u\n", fctx->run_name, row_id, row_id, spot.num_bases );
+                    
+                if ( rc == 0 )
+                    rc = print_bases( spot.bases, spot.num_bases, fctx->max_line_len );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdb_fasta_loop( const fastq_ctx * fctx )
+{
+    rc_t rc = 0;
+    if ( fctx->idx_read == INVALID_COLUMN )
+    {
+        /* we actually only need a READ-column, everything else name/splitting etc. is optional... */
+        rc = RC( rcExe, rcNoTarg, rcConstructing, rcNoObj, rcInvalid );
+        DISP_RC( rc, "cannot generate fasta-format: READ column not found" );
+    }
+    else
+    {
+        bool can_split = ( fctx->idx_read_start != INVALID_COLUMN && fctx->idx_read_len != INVALID_COLUMN );
+        if ( can_split )
+        {
+            bool has_type = ( fctx->idx_read_type != INVALID_COLUMN );
+            if ( has_type )
+                rc = vdb_fasta_frag_type_checked_loop( fctx );
+            else
+                rc = vdb_fasta_frag_no_type_check_loop( fctx );
+        }
+        else
+            rc = vdb_fasta_spot_loop( fctx );
+    }
+    return rc;
+}
+
+
+/* -------------------------------------------------------------------------------------------------------------- */
+
+static rc_t vdb_qual_frag_type_checked_loop( const fastq_ctx * fctx )
+{
+    rc_t rc = 0;
+    bool has_name = ( fctx->idx_name != INVALID_COLUMN );
+    int64_t row_id;
+    while ( rc == 0 && num_gen_iterator_next( fctx->row_iter, &row_id, &rc ) )
+    {
+        if ( rc == 0 )
+            rc = Quitting();
+        if ( rc == 0 )
+        {
+            fastq_spot spot;
+            rc = read_spot( fctx, row_id, &spot );
+            if ( rc == 0 )
+            {
+                uint32_t idx, frag, ofs;
+                for ( idx = 0, frag = 1, ofs = 0; rc == 0 && idx < spot.num_rd_start; ++idx )
+                {
+                    uint32_t frag_len = spot.rd_len[ idx ];
+                    if ( frag_len > 0 &&
+                         ( ( spot.rd_type[ idx ] & READ_TYPE_BIOLOGICAL ) == READ_TYPE_BIOLOGICAL ) )
+                    {
+                        if ( has_name )
+                            rc = KOutMsg( ">%s.%li.%d %.*s length=%u\n",
+                                    fctx->run_name, row_id, frag, spot.name_len, spot.name, frag_len );
+                        else
+                            rc = KOutMsg( ">%s.%li.%d %li length=%u\n",
+                                    fctx->run_name, row_id, frag, row_id, frag_len );
+                    
+                        if ( rc == 0 )
+                            rc = print_qual( &( spot.qual[ ofs ] ), frag_len, fctx->max_line_len );
+
+                        frag++;
+                    }
+                    ofs += frag_len;
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdb_qual_frag_no_type_check_loop( const fastq_ctx * fctx )
+{
+    rc_t rc = 0;
+    bool has_name = ( fctx->idx_name != INVALID_COLUMN );
+    int64_t row_id;
+    while ( rc == 0 && num_gen_iterator_next( fctx->row_iter, &row_id, &rc ) )
+    {
+        if ( rc == 0 )
+            rc = Quitting();
+        if ( rc == 0 )
+        {
+            fastq_spot spot;
+            rc = read_spot( fctx, row_id, &spot );
+            if ( rc == 0 )
+            {
+                uint32_t idx, frag, ofs;
+                for ( idx = 0, frag = 1, ofs = 0; rc == 0 && idx < spot.num_rd_start; ++idx )
+                {
+                    uint32_t frag_len = spot.rd_len[ idx ];
+                    if ( frag_len > 0 )
+                    {
+                        if ( has_name )
+                            rc = KOutMsg( ">%s.%li.%d %.*s length=%u\n",
+                                    fctx->run_name, row_id, frag, spot.name_len, spot.name, frag_len );
+                        else
+                            rc = KOutMsg( ">%s.%li.%d %li length=%u\n",
+                                    fctx->run_name, row_id, frag, row_id, frag_len );
+                    
+                        if ( rc == 0 )
+                            rc = print_qual( &( spot.qual[ ofs ] ), frag_len, fctx->max_line_len );
+
+                        frag++;
+                    }
+                    ofs += frag_len;
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdb_qual_spot_loop( const fastq_ctx * fctx )
+{
+    rc_t rc = 0;
+    bool has_name = ( fctx->idx_name != INVALID_COLUMN );
+    int64_t row_id;
+    while ( rc == 0 && num_gen_iterator_next( fctx->row_iter, &row_id, &rc ) )
+    {
+        if ( rc == 0 )
+            rc = Quitting();
+        if ( rc == 0 )
+        {
+            fastq_spot spot;
+            rc = read_spot( fctx, row_id, &spot );
+            if ( rc == 0 )
+            {
+                if ( has_name )
+                    rc = KOutMsg( ">%s.%li %.*s length=%u\n",
+                            fctx->run_name, row_id, spot.name_len, spot.name, spot.num_qual );
+                else
+                    rc = KOutMsg( ">%s.%li %li length=%u\n", fctx->run_name, row_id, row_id, spot.num_qual );
+                    
+                if ( rc == 0 )
+                    rc = print_qual( spot.qual, spot.num_qual, fctx->max_line_len );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdb_qual_loop( const fastq_ctx * fctx )
+{
+    rc_t rc = 0;
+    if ( fctx->idx_qual == INVALID_COLUMN )
+    {
+        /* we actually only need a QUAL-column, everything else name/splitting etc. is optional... */
+        rc = RC( rcExe, rcNoTarg, rcConstructing, rcNoObj, rcInvalid );
+        DISP_RC( rc, "cannot generate fasta-format: READ column not found" );
+    }
+    else
+    {
+        bool can_split = ( fctx->idx_read_start != INVALID_COLUMN && fctx->idx_read_len != INVALID_COLUMN );
+        if ( can_split )
+        {
+            bool has_type = ( fctx->idx_read_type != INVALID_COLUMN );
+            if ( has_type )
+                rc = vdb_qual_frag_type_checked_loop( fctx );
+            else
+                rc = vdb_qual_frag_no_type_check_loop( fctx );
+        }
+        else
+            rc = vdb_qual_spot_loop( fctx );
+    }
+    return rc;
+}
+
+
+/* -------------------------------------------------------------------------------------------------------------- */
+
+static rc_t vdb_fasta_accumulated( const char * bases, uint32_t num_bases, 
+                                   int32_t * chars_left_on_line, uint32_t max_line_len )
+{
+    rc_t rc = 0;
+    if ( num_bases < ( *chars_left_on_line ) )
+    {
+        rc = KOutMsg( "%.*s", num_bases, bases );
+        ( *chars_left_on_line ) -= num_bases;
+    }
+    else if ( num_bases == ( *chars_left_on_line ) )
+    {
+        rc = KOutMsg( "%.*s\n", num_bases, bases );
+        ( *chars_left_on_line ) = max_line_len;
+    }
+    else
+    {
+        uint32_t ofs = 0;
+        int32_t remaining = num_bases;
+        while( rc == 0 && ofs < num_bases )
+        {
+            if ( remaining >= ( *chars_left_on_line ) )
+            {
+                rc = KOutMsg( "%.*s\n", ( *chars_left_on_line ), &bases[ ofs ] );
+                ofs += ( *chars_left_on_line );
+                remaining -= ( *chars_left_on_line );
+                ( *chars_left_on_line ) = max_line_len;
+            }
+            else
+            {
+                rc = KOutMsg( "%.*s", remaining, &bases[ ofs ] );
+                ofs += remaining;
+                ( *chars_left_on_line ) -= remaining;
+                remaining = 0;
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdb_fasta1_loop( const fastq_ctx * fctx )
+{
+    rc_t rc;
+    if ( fctx->idx_read == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcConstructing, rcNoObj, rcInvalid );
+        DISP_RC( rc, "cannot generate fasta1-format: READ column not found" );
+    }
+    else
+    {
+        int64_t row_id;
+        int32_t chars_left_on_line = fctx->max_line_len;
+        
+        rc = KOutMsg( ">%s\n", fctx->run_name );
+        while ( rc == 0 && num_gen_iterator_next( fctx->row_iter, &row_id, &rc ) )
+        {
+            if ( rc == 0 )
+                rc = Quitting();
+            if ( rc == 0 )
+            {
+                fastq_spot spot;
+                rc = read_spot( fctx, row_id, &spot );
+                if ( rc == 0 )
+                    rc = vdb_fasta_accumulated( spot.bases, spot.num_bases, &chars_left_on_line, fctx->max_line_len );
+            }
+        }
+        rc = KOutMsg( "\n" );
+    }
+    return rc;
+}
+
+
+static rc_t vdb_fasta2_loop( const fastq_ctx * fctx )
+{
+    rc_t rc = 0;
+    if ( fctx->idx_name == INVALID_COLUMN || fctx->idx_read == INVALID_COLUMN )
+    {
+        rc = RC( rcExe, rcNoTarg, rcConstructing, rcNoObj, rcInvalid );
+        DISP_RC( rc, "cannot generate fasta2-format: READ and/or NAME column not found" );
+    }
+    else
+    {
+        char last_name[ 1024 ];
+        size_t last_name_len = 0;
+        int64_t row_id;
+        int32_t chars_left_on_line = fctx->max_line_len;
+        
+        while ( rc == 0 && num_gen_iterator_next( fctx->row_iter, &row_id, &rc ) )
+        {
+            if ( rc == 0 )
+                rc = Quitting();
+            if ( rc == 0 )
+            {
+                fastq_spot spot;
+                rc = read_spot( fctx, row_id, &spot );
+                if ( rc == 0 )
+                {
+                    bool print_ref_name = ( last_name_len == 0 );
+                    if ( !print_ref_name )
+                    {
+                        print_ref_name = ( last_name_len != spot.name_len );
+                        if ( !print_ref_name )
+                            print_ref_name = ( string_cmp( last_name, last_name_len, spot.name, spot.name_len, spot.name_len ) != 0 );
+                    }
+                    
+                    if ( print_ref_name )
+                    {
+                        if ( chars_left_on_line == fctx->max_line_len )
+                            rc = KOutMsg( ">%.*s\n", spot.name_len, spot.name );
+                        else
+                        {
+                            rc = KOutMsg( "\n>%.*s\n", spot.name_len, spot.name );
+                            chars_left_on_line = fctx->max_line_len;
+                        }
+                        last_name_len = string_copy ( last_name, sizeof last_name, spot.name, spot.name_len );
+                    }
+                    
+                    if ( rc == 0 )
+                        rc = vdb_fasta_accumulated( spot.bases, spot.num_bases, &chars_left_on_line, fctx->max_line_len );
+                }
+            }
+        }
+        rc = KOutMsg( "\n" );
+    }
+    return rc;
+}
+
+
+static rc_t vdb_fastq_tbl( const p_dump_context ctx, fastq_ctx * fctx )
+{
+    rc_t rc = vdb_prepare_cursor( fctx );
+    DISP_RC( rc, "the table lacks READ and/or QUALITY column" );
+    if ( rc == 0 )
+    {
+        int64_t  first;
+        uint64_t count;
+        /* READ is the colum we have in all cases... */
+        rc = VCursorIdRange( fctx->cursor, fctx->idx_read, &first, &count );
+        DISP_RC( rc, "VCursorIdRange() failed" );
+        if ( rc == 0 )
+        {
+            if ( count == 0 )
+            {
+                KOutMsg( "this table is empty\n" );
+            }
+            else
+            {
+                /* if the user did not specify a row-range, take all rows */
+                if ( ctx->rows == NULL )
+                {
+                    rc = num_gen_make_from_range( &ctx->rows, first, count );
+                    DISP_RC( rc, "num_gen_make_from_range() failed" );
+                }
+                /* if the user did specify a row-range, check the boundaries */
+                else
+                {
+                    rc = num_gen_trim( ctx->rows, first, count );
+                    DISP_RC( rc, "num_gen_trim() failed" );
+                }
+
+                if ( rc == 0 && !num_gen_empty( ctx->rows ) )
+                {
+                    rc = num_gen_iterator_make( ctx->rows, &fctx->row_iter );
+                    DISP_RC( rc, "num_gen_iterator_make() failed" );
+                    if ( rc == 0 )
+                    {
+                        if ( fctx->max_line_len == 0 )
+                            fctx->max_line_len = DEF_FASTA_LEN;
+                            
+                        switch( fctx->format )
+                        {
+                            /* one FASTQ-record ( 4 liner ) per READ/SPOT */
+                            case df_fastq : rc = vdb_fastq_loop( fctx ); /* <--- */
+                                             break;
+
+                            /* one FASTQ-record ( 4 liner ) per FRAGMENT/ALIGNMENT */
+                            case df_fastq1 : rc = vdb_fastq1_loop( fctx ); /* <--- */
+                                              break;
+
+                            /* one FASTA-record ( 2 liner ) per READ/SPOT */
+                            case df_fasta :  rc = vdb_fasta_loop( fctx ); /* <--- */
+                                             break;
+
+                             /* one FASTA-record ( many lines ) for the whole accession ( REFSEQ-accession )  */
+                            case df_fasta1 : rc = vdb_fasta1_loop( fctx ); /* <--- */
+                                             break;
+
+                             /* one FASTA-record ( many lines ) for each REFERENCE used in a cSRA-database  */
+                            case df_fasta2 : rc = vdb_fasta2_loop( fctx ); /* <--- */
+                                             break;
+
+                            /* one QUAL-record ( 2 liner ) per whole READ/SPOT */
+                            case df_qual :  rc = vdb_qual_spot_loop( fctx ); /* <--- */
+                                             break;
+
+                            /* one QUAL-record ( 2 liner ) per FRAGMENT/ALIGNMENTT */
+                            case df_qual1 :  rc = vdb_qual_loop( fctx ); /* <--- */
+                                             break;
+
+                            default : break;
+                        }
+                        num_gen_iterator_destroy( fctx->row_iter );
+                    }
+                }
+                else
+                    rc = RC( rcExe, rcDatabase, rcReading, rcRange, rcEmpty );
+            }
+        }
+        VCursorRelease( fctx->cursor );
+    }
+    return rc;
+}
+
+
+static rc_t vdb_fastq_table( const p_dump_context ctx,
+                             const VDBManager *mgr,
+                             fastq_ctx * fctx )
+{
+     VSchema * schema = NULL;
+    rc_t rc;
+
+    vdh_parse_schema( mgr, &schema, &(ctx->schema_list), true /* ctx->force_sra_schema */ );
+
+    rc = VDBManagerOpenTableRead( mgr, &fctx->tbl, schema, "%s", ctx->path );
+    DISP_RC( rc, "VDBManagerOpenTableRead() failed" );
+    if ( rc == 0 )
+    {
+        rc = vdb_fastq_tbl( ctx, fctx );
+        VTableRelease( fctx->tbl );
+    }
+    
+    if ( schema != NULL )
+        VSchemaRelease( schema );
+
+    return rc;
+}
+
+
+static rc_t vdb_fastq_database( const p_dump_context ctx,
+                                const VDBManager *mgr,
+                                fastq_ctx * fctx )
+{
+    const VDatabase * db;
+    VSchema *schema = NULL;
+    rc_t rc;
+
+    vdh_parse_schema( mgr, &schema, &(ctx->schema_list), true /* ctx->force_sra_schema */ );
+
+    rc = VDBManagerOpenDBRead( mgr, &db, schema, "%s", ctx->path );
+    DISP_RC( rc, "VDBManagerOpenDBRead() failed" );
+    if ( rc == 0 )
+    {
+        bool table_defined = ( ctx->table != NULL );
+        if ( !table_defined )
+            table_defined = vdh_take_this_table_from_db( ctx, db, "SEQUENCE" );
+
+        if ( table_defined )
+        {
+            rc = VDatabaseOpenTableRead( db, &fctx->tbl, "%s", ctx->table );
+            DISP_RC( rc, "VDatabaseOpenTableRead() failed" );
+            if ( rc == 0 )
+            {
+                rc = vdb_fastq_tbl( ctx, fctx );
+                VTableRelease( fctx->tbl );
+            }
+        }
+        else
+        {
+            LOGMSG( klogInfo, "opened as vdb-database, but no table found/defined" );
+            ctx->usage_requested = true;
+        }
+        VDatabaseRelease( db );
+    }
+
+    if ( schema != NULL )
+        VSchemaRelease( schema );
+    return rc;
+}
+
+
+static rc_t vdb_fastq_by_pathtype( const p_dump_context ctx,
+                                   const VDBManager *mgr,
+                                   fastq_ctx * fctx )                                   
+{
+    rc_t rc;
+    int path_type = ( VDBManagerPathType ( mgr, "%s", ctx->path ) & ~ kptAlias );
+    /* types defined in <kdb/manager.h> */
+    switch ( path_type )
+    {
+    case kptDatabase    :  rc = vdb_fastq_database( ctx, mgr, fctx );
+                            DISP_RC( rc, "dump_database() failed" );
+                            break;
+
+    case kptPrereleaseTbl:
+    case kptTable       :  rc = vdb_fastq_table( ctx, mgr, fctx );
+                            DISP_RC( rc, "dump_table() failed" );
+                            break;
+
+    default             :  rc = RC( rcVDB, rcNoTarg, rcConstructing, rcItem, rcNotFound );
+                            PLOGERR( klogInt, ( klogInt, rc,
+                                "the path '$(p)' cannot be opened as vdb-database or vdb-table",
+                                "p=%s", ctx->path ) );
+                            if ( vdco_schema_count( ctx ) == 0 )
+                            {
+                            LOGERR( klogInt, rc, "Maybe it is a legacy table. If so, specify a schema with the -S option" );
+                            }
+                            break;
+    }
+    return rc;
+}
+
+
+static rc_t vdb_fastq_by_probing( const p_dump_context ctx,
+                                  const VDBManager *mgr,
+                                  fastq_ctx * fctx )
+{
+    rc_t rc;
+    if ( vdh_is_path_database( mgr, ctx->path, &(ctx->schema_list) ) )
+    {
+        rc = vdb_fastq_database( ctx, mgr, fctx );
+        DISP_RC( rc, "dump_database() failed" );
+    }
+    else if ( vdh_is_path_table( mgr, ctx->path, &(ctx->schema_list) ) )
+    {
+        rc = vdb_fastq_table( ctx, mgr, fctx );
+        DISP_RC( rc, "dump_table() failed" );
+    }
+    else
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcItem, rcNotFound );
+        PLOGERR( klogInt, ( klogInt, rc,
+                 "the path '$(p)' cannot be opened as vdb-database or vdb-table",
+                 "p=%s", ctx->path ) );
+        if ( vdco_schema_count( ctx ) == 0 )
+        {
+            LOGERR( klogInt, rc, "Maybe it is a legacy table. If so, specify a schema with the -S option" );
+        }
+    }
+    return rc;
+}
+
+
+rc_t vdf_main( const p_dump_context ctx, const VDBManager * mgr, const char * acc_or_path )
+{
+    rc_t rc = 0;
+    fastq_ctx fctx;
+    init_fastq_ctx( ctx, &fctx, acc_or_path );
+    ctx->path = string_dup_measure ( acc_or_path, NULL );
+    
+    if ( USE_PATHTYPE_TO_DETECT_DB_OR_TAB ) /* in vdb-dump-context.h */
+        rc = vdb_fastq_by_pathtype( ctx, mgr, &fctx );
+    else
+        rc = vdb_fastq_by_probing( ctx, mgr, &fctx );
+
+    free( ( char* )ctx->path );
+    free( ( void* )fctx.run_name );
+    ctx->path = NULL;
+
+    return rc;
+}
diff --git a/tools/vdb-dump/vdb-dump-fastq.h b/tools/vdb-dump/vdb-dump-fastq.h
new file mode 100644
index 0000000..652718c
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-fastq.h
@@ -0,0 +1,47 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_dump_fastq_
+#define _h_vdb_dump_fastq_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include "vdb-dump-context.h"
+#include <vdb/manager.h>
+#include <kfs/directory.h>
+
+rc_t vdf_main( const p_dump_context ctx, const VDBManager * mgr, const char * acc_or_path );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-dump/vdb-dump-filter.c b/tools/vdb-dump/vdb-dump-filter.c
new file mode 100644
index 0000000..962f0e7
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-filter.c
@@ -0,0 +1,116 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "vdb-dump-filter.h"
+#include <klib/text.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <os-native.h>
+#include <sysalloc.h>
+
+bool vdfi_make_filter( filter **flt, const char *expression )
+{
+    bool res = false;
+    if ( flt == NULL ) return res;
+    (*flt) = malloc( sizeof( flt ) );
+    if ( *flt )
+    {
+        (*flt)->expression = string_dup_measure( expression, NULL );
+        (*flt)->filter_type = filter_unknown;
+        res = true;
+    }
+    return res;
+}
+
+void vdfi_destroy_filter( p_filter flt )
+{
+    if ( flt == NULL ) return;
+    free( flt->expression );
+    free( flt );
+}
+
+bool vdfi_make( filters **flts )
+{
+    bool res = false;
+    if ( flts == NULL ) return res;
+    (*flts) = malloc( sizeof( filters ) );
+    if ( *flts )
+    {
+        VectorInit( &( (*flts)->filters ), 0, 5 );
+        (*flts)->match = false;
+        (*flts)->count = 0;
+        res = true;
+    }
+    return res;
+}
+
+static void CC vdfi_destroy_filter_1( void* node, void* data )
+{
+    vdfi_destroy_filter( (p_filter)node );
+}
+
+void vdfi_destroy( p_filters flts )
+{
+    if ( flts == NULL ) return;
+    VectorWhack( &(flts->filters), vdfi_destroy_filter_1, NULL );
+    free( flts );
+}
+
+bool vdfi_new_filter( p_filters flts, const char *expression )
+{
+    bool res = false;
+    filter *new_filter;
+    if ( flts == NULL ) return res;
+    if ( expression == NULL ) return res;
+    if ( expression[0] == 0 ) return res;
+    if ( vdfi_make_filter( &new_filter, expression ) )
+    {
+        res = ( VectorAppend( &(flts->filters), NULL, new_filter ) == 0 );
+        if ( res ) flts->count++;
+    }
+    return res;
+}
+
+void vdfi_reset( p_filters flts )
+{
+    if ( flts == NULL ) return;
+    flts->match = false;
+}
+
+bool vdfi_match( p_filters flts )
+{
+    if ( flts == NULL ) return false;
+    return flts->match;
+}
+
+uint16_t vdfi_count( p_filters flts )
+{
+    if ( flts == NULL ) return 0;
+    return flts->count;
+}
diff --git a/tools/vdb-dump/vdb-dump-filter.h b/tools/vdb-dump/vdb-dump-filter.h
new file mode 100644
index 0000000..47909fe
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-filter.h
@@ -0,0 +1,82 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_dump_filter_
+#define _h_vdb_dump_filter_
+
+#include <klib/vector.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum filter_t
+{
+    filter_unknown,
+    filter_bool,
+    filter_integer,
+    filter_float,
+    filter_text
+} filter_t;
+
+/********************************************************************
+the dump_filter contains a filter expression for a column
+********************************************************************/
+typedef struct filter
+{
+    filter_t filter_type;
+    char *expression;
+} filter;
+typedef filter* p_filter;
+
+void filter_dosomething( p_filter flt );
+
+bool filter_make( filter **flt, const char *expression );
+void filter_destroy( p_filter flt );
+
+/********************************************************************
+the dump_filters is a vector of column_filters...
+********************************************************************/
+typedef struct filters
+{
+    Vector filters;
+    uint16_t count;
+    bool match;
+} filters;
+typedef filters* p_filters;
+
+bool vdfi_make( filters **flts );
+void vdfi_destroy( p_filters flts );
+bool vdfi_new_filter( p_filters flts, const char *expression );
+void vdfi_reset( p_filters flts );
+bool vdfi_match( p_filters flts );
+uint16_t vdfi_count( p_filters flts );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-dump/vdb-dump-formats.c b/tools/vdb-dump/vdb-dump-formats.c
new file mode 100644
index 0000000..5364a87
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-formats.c
@@ -0,0 +1,383 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "vdb-dump-formats.h"
+#include <sysalloc.h>
+
+#include <klib/rc.h>
+#include <klib/log.h>
+#define DISP_RC(rc,err) if( rc != 0 ) LOGERR( klogInt, rc, err );
+
+/*************************************************************************************
+    default ( with line-length-limitation and pretty print )
+*************************************************************************************/
+static void CC vdfo_print_col_default( void *item, void *data )
+{
+    p_col_def my_col_def = (p_col_def)item;
+    p_row_context r_ctx = (p_row_context)data;
+    rc_t rc;
+
+    if ( my_col_def->valid == false ) return;
+    if ( my_col_def->excluded == true ) return;
+
+    rc = vds_clear( &(r_ctx->s_col) );
+    DISP_RC( rc, "dump_str_clear() failed" )
+    if ( rc != 0 ) return;
+
+    if ( r_ctx->ctx->print_column_names )
+    {
+        rc = vds_append_fmt( &(r_ctx->s_col),
+                             r_ctx->col_defs->max_colname_chars,
+                             "%*s: ",
+                             r_ctx->col_defs->max_colname_chars,
+                             my_col_def->name );
+        DISP_RC( rc, "dump_str_append_fmt() failed" )
+    }
+
+    /* append the cell-content */
+    rc = vds_append_str( &(r_ctx->s_col), my_col_def->content.buf );
+    DISP_RC( rc, "dump_str_append_str() failed" )
+    if ( rc == 0 )
+    {
+
+        /* indent the cell-line, if requested */
+        if ( r_ctx->ctx->indented_line_len > 0 )
+        {
+            rc = vds_indent( &(r_ctx->s_col),
+                             r_ctx->ctx->indented_line_len,
+                             r_ctx->col_defs->max_colname_chars + 2 );
+            DISP_RC( rc, "dump_str_indent() failed" )
+        }
+
+        /* print a truncate-hint at the end of the line if truncated */
+        if ( vds_truncated( &(r_ctx->s_col) ) )
+        {
+            rc = vds_rinsert( &(r_ctx->s_col), " ..." );
+            DISP_RC( rc, "dump_str_rinsert() failed" )
+        }
+    }
+
+    /* FINALLY we print the content of a column... */
+    KOutMsg( "%s\n", r_ctx->s_col.buf );
+}
+
+static rc_t vdfo_print_row_default( const p_row_context r_ctx )
+{
+    rc_t rc = 0;
+    if ( r_ctx->ctx->print_row_id )
+        rc = KOutMsg( "ROW-ID = %u\n", r_ctx->row_id );
+
+    if ( rc == 0 )
+        VectorForEach( &(r_ctx->col_defs->cols), false, vdfo_print_col_default, r_ctx );
+
+    if ( rc == 0 && r_ctx->ctx->lf_after_row > 0 )
+    {
+        uint16_t i=0;
+        while ( i++ < r_ctx->ctx->lf_after_row && rc == 0 )
+            rc = KOutMsg( "\n" );
+    }
+    return 0;
+}
+
+/*************************************************************************************
+    CSV
+*************************************************************************************/
+static void CC vdfo_print_col_csv( void *item, void *data )
+{
+    rc_t rc = 0;
+    p_col_def my_col_def = (p_col_def)item;
+    p_row_context r_ctx = (p_row_context)data;
+
+    if ( my_col_def->valid == false ) return;
+    if ( my_col_def->excluded == true ) return;
+
+    if ( r_ctx->col_nr > 0 || r_ctx->ctx->print_row_id )
+    {
+        rc = vds_append_str( &(r_ctx->s_col), "," );
+        DISP_RC( rc, "dump_str_append_str() failed" )
+    }
+    if ( rc == 0 )
+    {
+        rc = vds_2_csv( &(my_col_def->content) );
+        DISP_RC( rc, "dump_str_2_csv() failed" )
+        if ( rc == 0 )
+        {
+            rc = vds_append_str( &(r_ctx->s_col), my_col_def->content.buf );
+            DISP_RC( rc, "dump_str_append_str() failed" )
+            r_ctx->col_nr++;
+        }
+    }
+}
+
+static rc_t vdfo_print_row_csv( const p_row_context r_ctx )
+{
+    rc_t rc = vds_clear( &(r_ctx->s_col) );
+    DISP_RC( rc, "dump_str_clear() failed" )
+    if ( rc == 0 && r_ctx->ctx->print_row_id )
+        rc = KOutMsg( "%u", r_ctx->row_id );
+    
+    if ( rc == 0 )
+    {
+        r_ctx->col_nr = 0;
+        VectorForEach( &(r_ctx->col_defs->cols), false, vdfo_print_col_csv, r_ctx );
+        rc = KOutMsg( "%s\n", r_ctx->s_col.buf );
+    }
+    return rc;
+}
+
+/*************************************************************************************
+    XML
+*************************************************************************************/
+static void CC vdfo_print_col_xml( void *item, void *data )
+{
+    p_col_def my_col_def = (p_col_def)item;
+    if ( my_col_def->valid == false ) return;
+    if ( my_col_def->excluded == true ) return;
+
+    KOutMsg( " <%s>\n", my_col_def->name );
+    KOutMsg( "%s", my_col_def->content.buf );
+    KOutMsg( " </%s>\n", my_col_def->name );
+}
+
+static rc_t vdfo_print_row_xml( const p_row_context r_ctx )
+{
+    rc_t rc = vds_clear( &(r_ctx->s_col) );
+    DISP_RC( rc, "dump_str_clear() failed" )
+    if ( rc == 0 )
+    {
+        rc = KOutMsg( "<row>\n" );
+        if ( rc  == 0 )
+        {
+            VectorForEach( &(r_ctx->col_defs->cols), false, vdfo_print_col_xml, r_ctx );
+            rc = KOutMsg( "</row>\n");
+        }
+    }
+    return rc;
+}
+
+
+/*************************************************************************************
+    JSON
+*************************************************************************************/
+static void CC vdfo_print_col_json( void *item, void *data )
+{
+    rc_t rc = 0;
+    p_col_def my_col_def = (p_col_def)item;
+
+    if ( my_col_def->valid == false ) return;
+    if ( my_col_def->excluded == true ) return;
+
+    if ( ( my_col_def->type_desc.domain == vtdAscii )||
+         ( my_col_def->type_desc.domain == vtdUnicode ) )
+    {
+        rc = vds_escape( &(my_col_def->content), '"', '\\' );
+        DISP_RC( rc, "dump_str_escape() failed" )
+        if ( rc == 0 )
+        {
+            rc = vds_enclose_string( &(my_col_def->content), '"', '"' );
+            DISP_RC( rc, "dump_str_enclose_string() failed" )
+        }
+    }
+    else
+    {
+        if ( my_col_def->type_desc.intrinsic_dim > 1 )
+        {
+            rc = vds_enclose_string( &(my_col_def->content), '[', ']' );
+            DISP_RC( rc, "dump_str_enclose_string() failed" )
+        }
+    }
+
+    if ( rc == 0 )
+        KOutMsg( ",\n\"%s\":%s", my_col_def->name, my_col_def->content.buf );
+}
+
+static rc_t vdfo_print_row_json( const p_row_context r_ctx )
+{
+    rc_t rc = vds_clear( &(r_ctx->s_col) );
+    DISP_RC( rc, "dump_str_clear() failed" )
+    if ( rc == 0 )
+    {
+        rc = KOutMsg( "{\n" );
+        if ( rc == 0 )
+        {
+            rc = KOutMsg( "\"row_id\": %lu", r_ctx->row_id );
+            if ( rc == 0 )
+            {
+                VectorForEach( &(r_ctx->col_defs->cols), false, vdfo_print_col_json, r_ctx );
+                rc = KOutMsg( "\n},\n\n" );
+            }
+        }
+    }
+    return rc;
+}
+
+
+/*************************************************************************************
+    PIPED
+*************************************************************************************/
+static void CC vdfo_print_col_piped( void *item, void *data )
+{
+    rc_t rc = 0;
+    p_col_def my_col_def = (p_col_def)item;
+    p_row_context r_ctx = (p_row_context)data;
+
+    if ( my_col_def->valid == false ) return;
+    if ( my_col_def->excluded == true ) return;
+
+    /* first we print the row_id and the column-name for every column! */
+    KOutMsg( "%lu, %s: ", r_ctx->row_id, my_col_def->name );
+
+    if ( ( my_col_def->type_desc.domain == vtdAscii )||
+         ( my_col_def->type_desc.domain == vtdUnicode ) )
+    {
+        rc = vds_escape( &(my_col_def->content), '"', '\\' );
+        DISP_RC( rc, "dump_str_escape() failed" )
+        if ( rc == 0 )
+        {
+            rc = vds_enclose_string( &(my_col_def->content), '"', '"' );
+            DISP_RC( rc, "dump_str_enclose_string() failed" )
+        }
+    }
+    else
+    {
+        if ( my_col_def->type_desc.intrinsic_dim > 1 )
+        {
+            rc = vds_enclose_string( &(my_col_def->content), '[', ']' );
+            DISP_RC( rc, "dump_str_enclose_string() failed" )
+        }
+    }
+
+    if ( rc == 0 )
+        KOutMsg( "%s\n", my_col_def->content.buf );
+}
+
+
+/*************************************************************************************
+    like legacy sra-dump
+*************************************************************************************/
+static void CC vdfo_print_col_sra_dump( void *item, void *data )
+{
+    rc_t rc = 0;
+    p_col_def my_col_def = (p_col_def)item;
+    p_row_context r_ctx = (p_row_context)data;
+
+    if ( my_col_def->valid == false ) return;
+    if ( my_col_def->excluded == true ) return;
+
+    /* first we print the row_id and the column-name for every column! */
+    KOutMsg( "%lu. %s: ", r_ctx->row_id, my_col_def->name );
+
+    if ( rc == 0 )
+        KOutMsg( "%s\n", my_col_def->content.buf );
+}
+
+
+/*************************************************************************************
+    TAB-delimited
+*************************************************************************************/
+static void CC vdfo_print_col_tab( void *item, void *data )
+{
+    rc_t rc = 0;
+    p_col_def my_col_def = (p_col_def)item;
+    p_row_context r_ctx = (p_row_context)data;
+
+    if ( my_col_def->valid == false ) return;
+    if ( my_col_def->excluded == true ) return;
+
+    if ( r_ctx->col_nr > 0 || r_ctx->ctx->print_row_id )
+    {
+        rc = vds_append_str( &(r_ctx->s_col), "\t" );
+        DISP_RC( rc, "dump_str_append_str() failed" )
+    }
+    if ( rc == 0 )
+    {
+        rc = vds_append_str( &(r_ctx->s_col), my_col_def->content.buf );
+        DISP_RC( rc, "dump_str_append_str() failed" )
+        r_ctx->col_nr++;
+    }
+}
+
+
+static rc_t vdfo_print_row_piped( const p_row_context r_ctx )
+{
+    rc_t rc = vds_clear( &(r_ctx->s_col) );
+    DISP_RC( rc, "dump_str_clear() failed" )
+    if ( rc == 0 )
+    {
+        VectorForEach( &(r_ctx->col_defs->cols), false, vdfo_print_col_piped, r_ctx );
+        rc = KOutMsg( "\n" );
+    }
+    return rc;
+}
+
+
+static rc_t vdfo_print_row_sra_dump( const p_row_context r_ctx )
+{
+    rc_t rc = vds_clear( &(r_ctx->s_col) );
+    DISP_RC( rc, "dump_str_clear() failed" )
+    if ( rc == 0 )
+    {
+        VectorForEach( &(r_ctx->col_defs->cols), false, vdfo_print_col_sra_dump, r_ctx );
+        rc = KOutMsg( "\n" );
+    }
+    return rc;
+}
+
+static rc_t vdfo_print_row_tab( const p_row_context r_ctx )
+{
+    rc_t rc = vds_clear( &(r_ctx->s_col) );
+    DISP_RC( rc, "dump_str_clear() failed" )
+    if ( rc == 0 && r_ctx->ctx->print_row_id )
+        rc = KOutMsg( "%u", r_ctx->row_id );
+    
+    if ( rc == 0 )
+    {
+        r_ctx->col_nr = 0;
+        VectorForEach( &(r_ctx->col_defs->cols), false, vdfo_print_col_tab, r_ctx );
+        rc = KOutMsg( "%s\n", r_ctx->s_col.buf );
+    }
+    return rc;
+}
+
+/*************************************************************************************
+    print-format-switch
+*************************************************************************************/
+rc_t vdfo_print_row( const p_row_context r_ctx )
+{
+    rc_t rc = 0;
+    switch( r_ctx->ctx->format )
+    {
+    case df_default     : rc = vdfo_print_row_default( r_ctx ); break;
+    case df_csv         : rc = vdfo_print_row_csv( r_ctx ); break;
+    case df_xml         : rc = vdfo_print_row_xml( r_ctx ); break;
+    case df_json        : rc = vdfo_print_row_json( r_ctx ); break;
+    case df_piped       : rc = vdfo_print_row_piped( r_ctx ); break;
+    case df_sra_dump    : rc = vdfo_print_row_sra_dump( r_ctx ); break;
+    case df_tab         : rc = vdfo_print_row_tab( r_ctx ); break;
+    default            : rc = vdfo_print_row_default( r_ctx ); break;
+    }
+    return rc;
+}
diff --git a/tools/vdb-dump/vdb-dump-formats.h b/tools/vdb-dump/vdb-dump-formats.h
new file mode 100644
index 0000000..34e12e5
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-formats.h
@@ -0,0 +1,51 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_dump_formats_
+#define _h_vdb_dump_formats_
+
+#include <stdio.h>
+
+#include <klib/vector.h>
+#include <klib/rc.h>
+#include <klib/out.h>
+
+#include "vdb-dump-coldefs.h"
+#include "vdb-dump-context.h"
+#include "vdb-dump-row-context.h"
+#include "vdb-dump-str.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+rc_t vdfo_print_row( const p_row_context r_ctx );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-dump/vdb-dump-helper.c b/tools/vdb-dump/vdb-dump-helper.c
new file mode 100644
index 0000000..5200dc6
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-helper.c
@@ -0,0 +1,772 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+#include <kfs/cacheteefile.h>
+
+#include <vdb/manager.h>
+#include <vdb/database.h>
+#include <vdb/schema.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+#include "vdb-dump-helper.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <stdarg.h>
+
+rc_t ErrMsg( const char * fmt, ... )
+{
+    rc_t rc;
+    char buffer[ 4096 ];
+    size_t num_writ;
+
+    va_list list;
+    va_start( list, fmt );
+    rc = string_vprintf( buffer, sizeof buffer, &num_writ, fmt, list );
+    if ( rc == 0 )
+        rc = pLogMsg( klogErr, "$(E)", "E=%s", buffer );
+    va_end( list );
+    return rc;
+} 
+
+/********************************************************************
+helper function to display the version of the vdb-manager
+********************************************************************/
+rc_t vdh_show_manager_version( const VDBManager *my_manager )
+{
+    uint32_t version;
+    rc_t rc = VDBManagerVersion( my_manager, &version );
+    if ( rc != 0 )
+        ErrMsg( "VDBManagerVersion() -> %R", rc );
+    else
+    {
+        PLOGMSG ( klogInfo, ( klogInfo, "manager-version = $(maj).$(min).$(rel)",
+                              "vers=0x%X,maj=%u,min=%u,rel=%u",
+                              version,
+                              version >> 24,
+                              ( version >> 16 ) & 0xFF,
+                              version & 0xFFFF ));
+    }
+    return rc;
+}
+
+static void CC vdh_parse_1_schema( void *item, void *data )
+{
+    char *s = (char*)item;
+    VSchema *my_schema = (VSchema*)data;
+    if ( ( item != NULL )&&( my_schema != NULL ) )
+    {
+        rc_t rc = VSchemaParseFile( my_schema, "%s", s );
+        if ( rc != 0 )
+            ErrMsg( "VSchemaParseFile() -> %R", rc );
+    }
+}
+
+rc_t vdh_parse_schema( const VDBManager *my_manager,
+                       VSchema **new_schema,
+                       Vector *schema_list,
+                       bool with_sra_schema )
+{
+    rc_t rc = 0;
+
+    if ( my_manager == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+
+    if ( new_schema == NULL )
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+
+    *new_schema = NULL;
+    
+    if ( with_sra_schema )
+    {
+        rc = VDBManagerMakeSRASchema( my_manager, new_schema );
+        if ( rc != 0 )
+            ErrMsg( "VDBManagerMakeSRASchema() -> %R", rc );
+    }
+    
+    if ( ( rc == 0 )&&( schema_list != NULL ) )
+    {
+        if ( *new_schema == NULL )
+        {
+            rc = VDBManagerMakeSchema( my_manager, new_schema );
+            if ( rc != 0 )
+                ErrMsg( "VDBManagerMakeSchema() -> %R", rc );
+        }
+        if ( rc == 0 )
+            VectorForEach( schema_list, false, vdh_parse_1_schema, *new_schema );
+    }
+    return rc;
+}
+
+/********************************************************************
+helper function to test if a given path is a vdb-table
+********************************************************************/
+bool vdh_is_path_table( const VDBManager *my_manager, const char *path,
+                        Vector *schema_list )
+{
+    bool res = false;
+    const VTable *my_table;
+    VSchema *my_schema = NULL;
+    rc_t rc;
+    
+    vdh_parse_schema( my_manager, &my_schema, schema_list, false );
+
+    rc = VDBManagerOpenTableRead( my_manager, &my_table, my_schema, "%s", path );
+    if ( rc == 0 )
+    {
+        res = true; /* yes we are able to open the table ---> path is a table */
+        VTableRelease( my_table );
+    }
+
+    if ( my_schema != NULL )
+    {
+        rc = VSchemaRelease( my_schema );
+        if ( rc != 0 )
+            ErrMsg( "VSchemaRelease() -> %R", rc );
+    }
+    return res;
+}
+
+
+const char * backback = "/../..";
+
+/********************************************************************
+helper function to test if a given path is a vdb-column
+by testing if the parent/parent dir is a vdb-table
+********************************************************************/
+bool vdh_is_path_column( const VDBManager *my_manager, const char *path,
+                         Vector *schema_list )
+{
+    bool res = false;
+    size_t path_len = string_size( path );
+    char *pp_path = malloc( path_len + 20 );
+    if ( pp_path )
+    {
+        char *resolved = malloc( 1024 );
+        if ( resolved )
+        {
+            KDirectory *my_directory;
+            rc_t rc = KDirectoryNativeDir( &my_directory );
+            if ( rc != 0 )
+                ErrMsg( "KDirectoryNativeDir() -> %R", rc );
+            else
+            {
+                string_copy( pp_path, path_len + 20, path, path_len );
+                string_copy( &pp_path[ path_len ], 20, backback, string_size( backback ) );
+                rc = KDirectoryResolvePath( my_directory, true, resolved, 1023, "%s", pp_path );
+                if ( rc == 0 )
+                    res = vdh_is_path_table( my_manager, resolved, schema_list );
+            }
+            free( resolved );
+        }
+        free( pp_path );
+    }
+    return res;
+}
+
+/********************************************************************
+helper function to test if a given path is a vdb-database
+********************************************************************/
+bool vdh_is_path_database( const VDBManager *my_manager, const char *path,
+                           Vector *schema_list )
+{
+    bool res = false;
+    const VDatabase *my_database;
+    VSchema *my_schema = NULL;
+    rc_t rc;
+
+    vdh_parse_schema( my_manager, &my_schema, schema_list, false );
+
+    rc = VDBManagerOpenDBRead( my_manager, &my_database, my_schema, "%s", path );
+    if ( rc == 0 )
+    {
+        res = true; /* yes we are able to open the database ---> path is a database */
+        rc = VDatabaseRelease( my_database );
+        if ( rc != 0 )
+            ErrMsg( "VDatabaseRelease() -> %R", rc );
+    }
+
+    if ( my_schema != NULL )
+    {
+        rc = VSchemaRelease( my_schema );
+        if ( rc != 0 )
+            ErrMsg( "VSchemaRelease() -> %R", rc );
+    }
+    return res;
+}
+
+
+/*************************************************************************************
+helper-function to extract the name of the first table of a database
+and put it into the dump-context
+*************************************************************************************/
+bool vdh_take_1st_table_from_db( dump_context *ctx, const KNamelist * tbl_names )
+{
+    bool we_found_a_table = false;
+    uint32_t count;
+    rc_t rc = KNamelistCount( tbl_names, &count );
+    if ( rc != 0 )
+        ErrMsg( "KNamelistCount() -> %R", rc );
+    else if ( count > 0 )
+    {
+        const char *tbl_name;
+        rc = KNamelistGet( tbl_names, 0, &tbl_name );
+        if ( rc != 0 )
+            ErrMsg( "KNamelistGet( 0 ) -> %R", rc );
+        else
+        {
+            vdco_set_table( ctx, tbl_name );
+            we_found_a_table = true;
+        }
+    }
+    return we_found_a_table;
+}
+
+/*
+static int vdh_str_cmp( const char *a, const char *b )
+{
+    size_t asize = string_size ( a );
+    size_t bsize = string_size ( b );
+    return strcase_cmp ( a, asize, b, bsize, ( asize > bsize ) ? asize : bsize );
+}
+*/
+
+static bool vdh_str_starts_with( const char *a, const char *b )
+{
+    bool res = false;
+    size_t asize = string_size ( a );
+    size_t bsize = string_size ( b );
+    if ( asize >= bsize )
+    {
+        int cmp = strcase_cmp ( a, bsize, b, bsize, bsize );
+        res = ( cmp == 0 );
+    }
+    return res;
+}
+
+
+bool list_contains_value( const KNamelist * list, const String * value )
+{
+    bool found = false;
+    uint32_t count;
+    rc_t rc = KNamelistCount( list, &count );
+    if ( rc != 0 )
+        ErrMsg( "KNamelistCount() -> %R", rc );
+    else if ( count > 0 )
+    {
+        uint32_t i;
+        for ( i = 0; i < count && rc == 0 && !found; ++i )
+        {
+            const char *s;
+            rc = KNamelistGet( list, i, &s );
+            if ( rc != 0 )
+                ErrMsg( "KNamelistGet( %d ) -> %R", i, rc );
+            else
+            {
+                String item;
+                StringInitCString( &item, s );
+                found = ( StringCompare ( &item, value ) == 0 );
+            }
+        }
+    }
+    return found;
+}
+
+
+static bool list_contains_value_starting_with( const KNamelist * list, const String * value, String * found )
+{
+    bool res = false;
+    uint32_t count;
+    rc_t rc = KNamelistCount( list, &count );
+    if ( rc != 0 )
+        ErrMsg( "KNamelistCount() -> %R", rc );
+    else if ( count > 0 )
+    {
+        uint32_t i;
+        for ( i = 0; i < count && rc == 0 && !res; ++i )
+        {
+            const char *s;
+            rc = KNamelistGet( list, i, &s );
+            if ( rc != 0 )
+                ErrMsg( "KNamelistGet( %d ) -> %R", i, rc );
+            else
+            {
+                String item;
+                StringInitCString( &item, s );
+                if ( value->len <= item.len )
+                {
+                    item.len = value->len;
+                    item.size = value->size;
+                    res = ( StringCompare ( &item, value ) == 0 );
+                    if ( res )
+                        StringInitCString( found, s );
+                }
+            }
+        }
+    }
+    return res;
+}
+
+/*************************************************************************************
+helper-function to check if a given table is in the list of tables
+if found put that name into the dump-context
+*************************************************************************************/
+bool vdh_take_this_table_from_list( dump_context *ctx, const KNamelist * tbl_names,
+                                    const char * table_to_find )
+{
+    bool res = false;
+    String to_find;
+
+    StringInitCString( &to_find, table_to_find );
+    res = list_contains_value( tbl_names, &to_find );
+    if ( res )
+        vdco_set_table_String( ctx, &to_find );
+    else
+    {
+        String found;
+        res = list_contains_value_starting_with( tbl_names, &to_find, &found );
+        if ( res )
+            vdco_set_table_String( ctx, &found );
+    }
+    return res;
+}
+
+
+bool vdh_take_this_table_from_db( dump_context *ctx, const VDatabase * db,
+                                  const char * table_to_find )
+{
+    bool we_found_the_table = false;
+    KNamelist *tbl_names;
+    rc_t rc = VDatabaseListTbl( db, &tbl_names );
+    if ( rc != 0 )
+        ErrMsg( "VDatabaseListTbl() -> %R", rc );
+    else
+    {
+        we_found_the_table = vdh_take_this_table_from_list( ctx, tbl_names, table_to_find );
+        rc = KNamelistRelease( tbl_names );
+        if ( rc != 0 )
+            ErrMsg( "KNamelistRelease() -> %R", rc );
+    }
+    return we_found_the_table;
+}
+
+
+const char * s_unknown_tab = "unknown table";
+
+static rc_t vdh_print_full_col_info( dump_context *ctx,
+                                     const p_col_def col_def,
+                                     const VSchema *my_schema )
+{
+    rc_t rc = 0;
+    char * s_domain = vdcd_make_domain_txt( col_def->type_desc.domain );
+    if ( s_domain != NULL )
+    {
+        if ( ctx->table == NULL )
+        {
+            ctx->table = string_dup_measure( s_unknown_tab, NULL ); /* will be free'd when ctx get free'd */
+        }
+
+        if ( ( ctx->table != NULL )&&( col_def->name != NULL ) )
+        {
+            rc = KOutMsg( "%s.%.02d : (%.3d bits [%.02d], %8s)  %s",
+                    ctx->table,
+                    ctx->generic_idx++,
+                    col_def->type_desc.intrinsic_bits,
+                    col_def->type_desc.intrinsic_dim,
+                    s_domain,
+                    col_def->name );
+            if ( rc == 0 && my_schema )
+            {
+                char buf[64];
+                rc = VTypedeclToText( &(col_def->type_decl), my_schema, buf, sizeof( buf ) );
+                if ( rc != 0 )
+                    ErrMsg( "VTypedeclToText() -> %R", rc );
+                else
+                    rc = KOutMsg( "\n      (%s)", buf );
+            }
+            if ( rc == 0 )
+                rc = KOutMsg( "\n" );
+        }
+        else
+        {
+            if ( ctx->table == NULL )
+                rc = KOutMsg( "error: no table-name in print_column_info()" );
+
+            if ( col_def->name == NULL )
+                rc = KOutMsg( "error: no column-name in print_column_info()" );
+
+        }
+        free( s_domain );
+    }
+    else
+        rc = KOutMsg( "error: making domain-text in print_column_info()" );
+
+    return rc;
+}
+
+
+static rc_t vdh_print_short_col_info( const p_col_def col_def,
+                                      const VSchema *my_schema )
+{
+    rc_t rc = 0;
+    if ( col_def->name != NULL )
+    {
+        rc = KOutMsg( "%s", col_def->name );
+        if ( rc == 0 && my_schema != NULL )
+        {
+            char buf[ 64 ];
+            rc = VTypedeclToText( &(col_def->type_decl), my_schema,
+                                  buf, sizeof(buf) );
+            if ( rc != 0 )
+                ErrMsg( "VTypedeclToText() -> %R", rc );
+            else
+                rc = KOutMsg( " (%s)", buf );
+        }
+        if ( rc == 0 )
+            rc = KOutMsg( "\n" );
+    }
+    return rc;
+}
+
+
+rc_t vdh_print_col_info( dump_context *ctx,
+                         const p_col_def col_def,
+                         const VSchema *my_schema )
+{
+    rc_t rc = 0;
+    if ( ctx != NULL && col_def != NULL )
+    {
+        if ( ctx->column_enum_requested )
+            rc = vdh_print_full_col_info( ctx, col_def, my_schema );
+        else
+            rc = vdh_print_short_col_info( col_def, my_schema );
+    }
+    return rc;
+}
+
+rc_t resolve_remote_accession( const char * accession, char * dst, size_t dst_size )
+{
+    VFSManager * vfs_mgr;
+    rc_t rc = VFSManagerMake( &vfs_mgr );
+    dst[ 0 ] = 0;
+    if ( rc != 0 )
+        ErrMsg( "VFSManagerMake() -> %R", rc );
+    else
+    {
+        VResolver * resolver;
+        rc = VFSManagerGetResolver( vfs_mgr, &resolver );
+        if ( rc != 0 )
+            ErrMsg( "VFSManagerGetResolver() -> %R", rc );
+        else
+        {
+            VPath * vpath;
+            rc = VFSManagerMakePath( vfs_mgr, &vpath, "ncbi-acc:%s", accession );
+            if ( rc != 0 )
+                ErrMsg( "VFSManagerMakePath( %s ) -> %R", accession, rc );
+            else
+            {
+                const VPath * remote = NULL;
+                VResolverRemoteEnable( resolver, vrAlwaysEnable );
+                rc = VResolverQuery ( resolver, eProtocolHttp, vpath, NULL, &remote, NULL );
+                if ( rc == 0 &&  remote != NULL )
+                {
+                    const String * path;
+                    rc = VPathMakeString( remote, &path );
+
+                    if ( rc == 0 && path != NULL )
+                    {
+                        string_copy ( dst, dst_size, path->addr, path->size );
+                        dst[ path->size ] = 0;
+                        StringWhack ( path );
+                    }
+                    if ( remote != NULL )
+                        VPathRelease ( remote );
+                }
+                VPathRelease ( vpath );
+            }
+            VResolverRelease( resolver );
+        }
+        VFSManagerRelease ( vfs_mgr );
+    }
+
+    if ( rc == 0 && vdh_str_starts_with( dst, "ncbi-acc:" ) )
+    {
+        size_t l = string_size ( dst );
+        memmove( dst, &( dst[ 9 ] ), l - 9 );
+        dst[ l - 9 ] = 0;
+    }
+    return rc;
+}
+
+rc_t resolve_accession( const char * accession, char * dst, size_t dst_size, bool remotely )
+{
+    VFSManager * vfs_mgr;
+    rc_t rc = VFSManagerMake( &vfs_mgr );
+    dst[ 0 ] = 0;
+    if ( rc != 0 )
+        ErrMsg( "VFSManagerMake() -> %R", rc );
+    else
+    {
+        VResolver * resolver;
+        rc = VFSManagerGetResolver( vfs_mgr, &resolver );
+        if ( rc != 0 )
+            ErrMsg( "VFSManagerGetResolver() -> %R", rc );
+        else
+        {
+            VPath * vpath;
+            rc = VFSManagerMakePath( vfs_mgr, &vpath, "ncbi-acc:%s", accession );
+            if ( rc != 0 )
+                ErrMsg( "VFSManagerMakePath( %s ) -> %R", accession, rc );
+            else
+            {
+                const VPath * local = NULL;
+                const VPath * remote = NULL;
+                if ( remotely )
+                    rc = VResolverQuery ( resolver, eProtocolHttp, vpath, &local, &remote, NULL );
+                else
+                    rc = VResolverQuery ( resolver, eProtocolHttp, vpath, &local, NULL, NULL );
+                if ( rc == 0 && ( local != NULL || remote != NULL ) )
+                {
+                    const String * path;
+                    if ( local != NULL )
+                        rc = VPathMakeString( local, &path );
+                    else
+                        rc = VPathMakeString( remote, &path );
+
+                    if ( rc == 0 && path != NULL )
+                    {
+                        string_copy ( dst, dst_size, path->addr, path->size );
+                        dst[ path->size ] = 0;
+                        StringWhack ( path );
+                    }
+
+                    if ( local != NULL )
+                        VPathRelease ( local );
+                    if ( remote != NULL )
+                        VPathRelease ( remote );
+                }
+                VPathRelease ( vpath );
+            }
+            VResolverRelease( resolver );
+        }
+        VFSManagerRelease ( vfs_mgr );
+    }
+
+    if ( rc == 0 && vdh_str_starts_with( dst, "ncbi-acc:" ) )
+    {
+        size_t l = string_size ( dst );
+        memmove( dst, &( dst[ 9 ] ), l - 9 );
+        dst[ l - 9 ] = 0;
+    }
+    return rc;
+}
+
+
+rc_t resolve_cache( const char * accession, char * dst, size_t dst_size )
+{
+    VFSManager * vfs_mgr;
+    rc_t rc = VFSManagerMake( &vfs_mgr );
+    dst[ 0 ] = 0;
+    if ( rc != 0 )
+        ErrMsg( "VFSManagerMake() -> %R", rc );
+    else
+    {
+        VResolver * resolver;
+        rc = VFSManagerGetResolver( vfs_mgr, &resolver );
+        if ( rc != 0 )
+            ErrMsg( "VFSManagerGetResolver() -> %R", rc );
+        else
+        {
+            VPath * vpath;
+            rc = VFSManagerMakePath( vfs_mgr, &vpath, "ncbi-acc:%s", accession );
+            if ( rc != 0 )
+                ErrMsg( "VFSManagerMakePath( %s ) -> %R", accession, rc );
+            else
+            {
+                const VPath * local = NULL;
+                const VPath * remote = NULL;
+                const VPath * cache = NULL;
+                rc = VResolverQuery ( resolver, eProtocolHttp, vpath, &local, &remote, &cache );
+                if ( rc == 0 && cache != NULL )
+                {
+                    const String * path;
+                    rc = VPathMakeString( cache, &path );
+
+                    if ( rc == 0 && path != NULL )
+                    {
+                        string_copy ( dst, dst_size, path->addr, path->size );
+                        dst[ path->size ] = 0;
+                        StringWhack ( path );
+                    }
+
+                    if ( local != NULL )
+                        VPathRelease ( local );
+                    if ( remote != NULL )
+                        VPathRelease ( remote );
+                    if ( remote != NULL )
+                        VPathRelease ( cache );
+                }
+                VPathRelease ( vpath );
+            }
+            VResolverRelease( resolver );
+        }
+        VFSManagerRelease ( vfs_mgr );
+    }
+    return rc;
+}
+
+
+rc_t check_cache_comleteness( const char * path, float * percent, uint64_t * bytes_in_cache )
+{
+    rc_t rc = 0;
+    if ( percent != NULL )    { ( * percent ) = 0.0; }
+    if ( bytes_in_cache != NULL ) { ( * bytes_in_cache ) = 0; }
+    if ( path != NULL && path[ 0 ] != 0 )
+    {
+        KDirectory * dir;
+        rc_t rc = KDirectoryNativeDir( &dir );
+        if ( rc != 0 )
+            ErrMsg( "KDirectoryNativeDir() -> %R", rc);
+        else
+        {
+            const KFile * f = NULL;
+            rc = KDirectoryOpenFileRead( dir, &f, "%s.cache", path );
+            if ( rc == 0 )
+                rc = GetCacheCompleteness( f, percent, bytes_in_cache );
+            else
+            {
+                rc = KDirectoryOpenFileRead( dir, &f, "%s", path );
+                if ( rc == 0 )
+                {
+                    if ( percent != NULL )    ( * percent ) = 100.0;
+                    if ( bytes_in_cache != NULL ) rc = KFileSize ( f, bytes_in_cache );
+                }
+            }
+            if ( f != NULL ) KFileRelease( f );
+            KDirectoryRelease( dir );
+        }
+    }
+    return rc;
+}
+
+
+static bool matches( const String * cmd, const String * pattern )
+{
+    char buffer[ 256 ];
+    String match;
+    uint32_t matching;
+    
+    StringInit( &match, buffer, sizeof buffer, 0 );
+    matching = StringMatch( &match, cmd, pattern );
+    return ( matching == pattern->len && matching == cmd->len );
+}
+
+
+int32_t index_of_match( const String * word, uint32_t num, ... )
+{
+    int32_t res = -1;
+    if ( word != NULL )
+    {
+        uint32_t idx;
+        va_list args;
+        
+        va_start ( args, num );
+        for ( idx = 0; idx < num && res < 0; ++idx )
+        {
+            const char * arg = va_arg ( args, const char * );
+            if ( arg != NULL )
+            {
+                String S;
+                StringInitCString( &S, arg );
+                if ( matches( word, &S ) ) res = idx;
+            }
+        }
+        va_end ( args );
+    }
+    return res;
+}
+
+
+static void CC destroy_String( void * item, void * data ) { free( item ); }
+void destroy_String_vector( Vector * v ) { VectorWhack( v, destroy_String, NULL ); }
+
+uint32_t copy_String_2_vector( Vector * v, const String * S )
+{
+    uint32_t res = 0;
+    if ( S->len > 0 && S->addr != NULL )
+    {
+        String * S1 = malloc( sizeof * S1 );
+        if ( S1 != NULL )
+        {
+            rc_t rc;
+            StringInit( S1, S->addr, S->size, S->len );
+            rc = VectorAppend( v, NULL, S1 );
+            if ( rc == 0 ) res++; else free( S1 );
+        }
+    }
+    return res;
+}
+
+
+uint32_t split_buffer( Vector * v, const String * S, const char * delim )
+{
+    uint32_t i, res = 0;
+    size_t delim_len = string_size( delim );
+    String temp;
+    
+    StringInit( &temp, NULL, 0, 0 );
+    VectorInit( v, 0, 10 );
+    for( i = 0; i < S->len; ++i )
+    {
+        if ( string_chr( delim, delim_len, S->addr[ i ] ) != NULL )
+        {
+            /* delimiter found */
+            res += copy_String_2_vector( v, &temp );
+            StringInit( &temp, NULL, 0, 0 );
+        }
+        else
+        {
+            /* normal char in line */
+            if ( temp.addr == NULL ) temp.addr = &( S->addr[ i ] );
+            temp.size++;
+            temp.len++;
+        }
+    }
+    res += copy_String_2_vector( v, &temp );
+    return res;
+}
diff --git a/tools/vdb-dump/vdb-dump-helper.h b/tools/vdb-dump/vdb-dump-helper.h
new file mode 100644
index 0000000..da456b0
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-helper.h
@@ -0,0 +1,107 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_dump_helper_
+#define _h_vdb_dump_helper_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_defs_
+#include <klib/defs.h>
+#endif
+
+#include <klib/out.h>
+#include <klib/rc.h>
+#include <klib/vector.h>
+#include <klib/text.h>
+
+#include <vfs/manager.h>
+#include <vfs/path.h>
+#include <vfs/resolver.h>
+
+#include <vdb/manager.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <vdb/database.h>
+#include <vdb/schema.h>
+
+#include <sra/sraschema.h>
+
+#include "vdb-dump-context.h"
+#include "vdb-dump-coldefs.h"
+
+#define DISP_RC(rc,err) (void)((rc == 0) ? 0 : LOGERR( klogInt, rc, err ))
+
+#define DISP_RC2(rc,err,succ) \
+    (void)((rc != 0)? 0 : (succ) ? LOGMSG( klogInfo, succ ) : LOGERR( klogInt, rc, err ))
+
+rc_t ErrMsg( const char * fmt, ... );
+
+rc_t vdh_show_manager_version( const VDBManager *my_manager );
+
+rc_t vdh_parse_schema( const VDBManager *my_manager,
+                       VSchema **new_schema,
+                       Vector *schema_list,
+                       bool with_sra_schema );
+
+bool vdh_is_path_table( const VDBManager *my_manager, const char *path,
+                        Vector *schema_list );
+bool vdh_is_path_column( const VDBManager *my_manager, const char *path,
+                         Vector *schema_list );
+bool vdh_is_path_database( const VDBManager *my_manager, const char *path,
+                           Vector *schema_list );
+
+bool list_contains_value( const KNamelist * list, const String * value );
+
+bool vdh_take_1st_table_from_db( dump_context *ctx, const KNamelist *tbl_names );
+
+bool vdh_take_this_table_from_list( dump_context *ctx, const KNamelist *tbl_names,
+                                    const char * table_to_find );
+
+bool vdh_take_this_table_from_db( dump_context *ctx, const VDatabase *db,
+                                  const char * table_to_find );
+
+rc_t vdh_print_col_info( dump_context *ctx,
+                         const p_col_def col_def,
+                         const VSchema *my_schema );
+
+rc_t resolve_remote_accession( const char * accession, char * dst, size_t dst_size );
+rc_t resolve_accession( const char * accession, char * dst, size_t dst_size, bool remotely );
+rc_t resolve_cache( const char * accession, char * dst, size_t dst_size );
+rc_t check_cache_comleteness( const char * path, float * percent, uint64_t * bytes_in_cache );
+
+int32_t index_of_match( const String * word, uint32_t num, ... );
+void destroy_String_vector( Vector * v );
+uint32_t copy_String_2_vector( Vector * v, const String * S );
+uint32_t split_buffer( Vector * v, const String * S, const char * delim );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-dump/vdb-dump-interact.c b/tools/vdb-dump/vdb-dump-interact.c
new file mode 100644
index 0000000..f2be0c0
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-interact.c
@@ -0,0 +1,265 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "vdb-dump-interact.h"
+#include "vdb-dump-repo.h"
+#include "vdb-dump-helper.h"
+#include "vdb-dump-print.h"
+
+#include <klib/vector.h>
+#include <klib/text.h>
+#include <kfs/file.h>
+#include <kfs/filetools.h>
+
+rc_t Quitting();
+
+#define INPUTLINE_SIZE 4096
+
+typedef struct ictx
+{
+    const dump_context * ctx;
+    const Args * args;
+    const KFile * std_in;
+    struct vdp_src_context * vsctx;
+    Vector history;
+    char inputline[ INPUTLINE_SIZE ];
+    String PROMPT;
+    String SInputLine;
+    
+    bool interactive, done;
+} ictx;
+
+
+static rc_t init_ictx( struct ictx * ictx, const dump_context * ctx, const Args * args )
+{
+    rc_t rc = KFileMakeStdIn ( &( ictx->std_in ) );
+    DISP_RC( rc, "KFileMakeStdIn() failed" );
+    if ( rc == 0 )
+    {
+        ictx->ctx = ctx;
+        ictx->args = args;
+        VectorInit( &ictx->history, 0, 10 );
+        ictx->interactive = ( KFileType ( ictx->std_in ) == kfdCharDev );
+        ictx->done = false;
+        
+        CONST_STRING( &(ictx->PROMPT), "\nvdb $" );
+        StringInit( &(ictx->SInputLine), &( ictx->inputline[0] ), sizeof( ictx->inputline ), 0 );
+        
+        rc = vdp_init_ctx( &ictx->vsctx, args );
+    }
+    return rc;
+}
+
+
+static void release_ictx( ictx * ctx )
+{
+    destroy_String_vector( &ctx->history );
+    KFileRelease( ctx->std_in );
+    vdp_release_ctx( ctx->vsctx );
+}
+
+
+static rc_t vdi_test( const Vector * v )
+{
+    rc_t rc = 0;
+    uint32_t start = VectorStart( v );
+    uint32_t len = VectorLength( v );
+    uint32_t idx;
+    for ( idx = start; rc == 0 && idx < ( start + len ); ++idx )
+        rc = KOutMsg( "{%S} ", VectorGet( v, idx ) );
+    return rc;
+}
+
+
+static rc_t vdi_top_help()
+{
+    rc_t rc = KOutMsg( "help:\n" );
+    if ( rc == 0 )
+        rc = KOutMsg( "quit / exit : terminate program\n" );
+    if ( rc == 0 )
+        rc = KOutMsg( "help [cmd]  : print help [ for this topic ]\n" );
+    if ( rc == 0 )
+        rc = KOutMsg( "repo        : manage repositories\n" );
+    return rc;
+}
+
+
+static rc_t vdi_help_on_help()
+{
+    rc_t rc = KOutMsg( "help: [help]\n" );
+    return rc;
+}
+
+static rc_t vdi_help_on_repo()
+{
+    rc_t rc = KOutMsg( "help: [repo]\n" );
+    return rc;
+}
+
+static rc_t vdi_help_on_print()
+{
+    rc_t rc = KOutMsg( "help: [print]\n" );
+    return rc;
+}
+
+static rc_t vdi_help( const Vector * v )
+{
+    rc_t rc = 0;
+    if ( VectorLength( v ) < 2 )
+        rc = vdi_top_help();
+    else
+    {
+        int32_t cmd_idx = index_of_match( VectorGet( v, 1 ), 2,
+            "help", "repo", "print" );
+        switch( cmd_idx )
+        {
+            case 0 : rc = vdi_help_on_help(); break;
+            case 1 : rc = vdi_help_on_repo(); break;
+            case 2 : rc = vdi_help_on_print(); break;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdi_on_newline( ictx * ctx, const String * Line )
+{
+    rc_t rc = 0;
+    Vector v;
+    uint32_t args = split_buffer( &v, Line, " \t" ); /* from vdb-dump-helper.c */
+    if ( args > 0 )
+    {
+        const String * S = VectorGet( &v, 0 );
+        if ( S != NULL )
+        {
+            int32_t cmd_idx = index_of_match( S, 6,
+                "quit", "exit", "help", "repo", "test", "print" );
+                
+            ctx->done = ( cmd_idx == 0 || cmd_idx == 1 );
+            if ( !ctx->done )
+            {
+                switch( cmd_idx )
+                {
+                    case 2  : rc = vdi_help( &v ); break; /* above */
+                    case 3  : rc = vdi_repo( &v ); break; /* in vdb-dump-repo */
+                    case 4  : rc = vdi_test( &v ); break;
+                    case 5  : rc = vdp_print_interactive( &v, ctx->vsctx ); break; /* in vdb-dump-print */
+                    default : rc = KOutMsg( "??? {%S}", S ); break;
+                }
+                if ( rc == 0 )
+                {
+                    if ( ctx->interactive )
+                        rc = KOutMsg( "%S", &( ctx->PROMPT ) );
+                    else
+                        rc = KOutMsg( "\n" );
+                }
+            }
+        }
+    }
+    destroy_String_vector( &v ); /* from vdb-dump-helper.c */
+    return rc;
+}
+
+
+static rc_t vdi_on_char( ictx * ctx, const char c )
+{
+    rc_t rc = 0;
+    if ( ctx->SInputLine.len < ( ( ctx->SInputLine.size ) - 1 ) )
+    {
+        ctx->inputline[ ctx->SInputLine.len++ ] = c;
+    }
+    else
+    {
+        rc = KOutMsg( "\ntoo long!%s", &( ctx->PROMPT ) );
+        ctx->SInputLine.len = 0;
+    }
+    return rc;
+}
+
+
+static rc_t vdi_interactive_newline( ictx * ctx )
+{
+    rc_t rc = vdi_on_newline( ctx, &(ctx->SInputLine) );
+    copy_String_2_vector( &(ctx->history), &(ctx->SInputLine) );
+    ctx->SInputLine.len = 0;
+    return rc;
+}
+
+
+static rc_t vdi_interactive_loop( ictx * ctx )
+{
+    char cc[ 4 ];
+    uint64_t pos = 0;
+    rc_t rc = KOutMsg( "%S", &( ctx->PROMPT ) );    
+
+    while ( rc == 0 && !ctx->done && ( 0 == Quitting() ) )
+    {
+        size_t num_read;
+        rc = KFileRead( ctx->std_in, pos, cc, 1, &num_read );
+        if ( rc != 0 )
+            LOGERR ( klogErr, rc, "failed to read stdin" );
+        else if ( num_read > 0 )
+        {
+            pos += num_read;
+            switch( cc[ 0 ] )
+            {
+                case '\n' : rc = vdi_interactive_newline( ctx ); break;
+                default   : rc = vdi_on_char( ctx, cc[ 0 ] ); break;
+            }
+        }
+    }
+    if ( rc == 0 ) rc = KOutMsg( "\n" );
+    return rc;
+}
+
+
+static rc_t on_line( const String * line, void * data )
+{
+    rc_t rc = Quitting();
+    if ( rc == 0 )
+    {
+        ictx * ctx = data;
+        rc = vdi_on_newline( ctx, line );
+    }
+    return rc;
+}
+
+
+rc_t vdi_main( const dump_context * ctx, const Args * args )
+{
+    ictx ictx;
+    rc_t rc = init_ictx( &ictx, ctx, args );
+    if ( rc == 0 )
+    {
+         if ( ictx.interactive )
+            rc = vdi_interactive_loop( &ictx );
+        else
+            rc = ProcessFileLineByLine( ictx.std_in, on_line, &ictx ); /* from kfs/filetools.h */
+        
+         release_ictx( &ictx );
+    }
+    return rc;
+}
\ No newline at end of file
diff --git a/tools/vdb-dump/vdb-dump-interact.h b/tools/vdb-dump/vdb-dump-interact.h
new file mode 100644
index 0000000..88f777b
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-interact.h
@@ -0,0 +1,50 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_dump_interact_
+#define _h_vdb_dump_interact_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+
+#include <kapp/args.h>
+#include <klib/rc.h>
+#include <klib/text.h>
+
+#include "vdb-dump-context.h"
+
+rc_t vdi_main( const dump_context * ctx, const Args * args );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-dump/vdb-dump-print.c b/tools/vdb-dump/vdb-dump-print.c
new file mode 100644
index 0000000..0288dae
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-print.c
@@ -0,0 +1,1349 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "vdb-dump-print.h"
+#include "vdb-dump-helper.h"
+
+#include <klib/rc.h>
+#include <klib/printf.h>
+#include <klib/out.h>
+#include <klib/pack.h>
+#include <klib/num-gen.h>
+
+#include <kfs/directory.h>
+
+#include <kdb/manager.h>
+
+#include <vdb/cursor.h>
+#include <vdb/table.h>
+#include <vdb/database.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <bitstr.h>
+
+typedef struct vdp_context
+{
+    const void * base;
+    const VTypedesc * type_desc;
+    vdp_opts * opts;
+    char * buf;
+    size_t buf_size;
+    size_t printed_so_far;
+    bool buf_filled;
+
+    uint32_t elem_idx;
+    uint32_t elem_bits;
+    uint32_t boff;
+    uint32_t row_len;
+    int32_t selection;
+    uint64_t offset_in_bits;
+    bool print_dna_bases;
+} vdp_context;
+
+
+static rc_t vdp_print( vdp_context * vdp_ctx, const char * fmt, ... )
+{
+    rc_t rc = 0;
+    if ( vdp_ctx->buf_size > vdp_ctx->printed_so_far )
+    {
+        va_list args;
+        size_t num_writ;
+        size_t available = ( vdp_ctx->buf_size - vdp_ctx->printed_so_far );
+
+        va_start ( args, fmt );
+        rc = string_vprintf( &( vdp_ctx->buf[ vdp_ctx->printed_so_far ]), available, &num_writ, fmt, args );
+        vdp_ctx->printed_so_far += num_writ;
+        va_end ( args );
+    }
+
+    if ( vdp_ctx->buf_size <= vdp_ctx->printed_so_far )
+        vdp_ctx->buf_filled = true;
+    return rc;
+}
+
+
+static rc_t vdp_print_string( vdp_context * vdp_ctx, const char * s )
+{
+    rc_t rc = 0;
+    if ( vdp_ctx->buf == NULL )
+    {
+        rc = KOutMsg( s );
+    }
+    else
+    {
+        if ( vdp_ctx->buf_size > vdp_ctx->printed_so_far )
+        {
+            size_t num_writ;
+            size_t available = ( vdp_ctx->buf_size - vdp_ctx->printed_so_far );
+
+            rc = string_printf ( &( vdp_ctx->buf[ vdp_ctx->printed_so_far ] ), available, &num_writ, s );
+            vdp_ctx->printed_so_far += num_writ;
+        }
+
+        if ( vdp_ctx->buf_size <= vdp_ctx->printed_so_far )
+            vdp_ctx->buf_filled = true;
+    }
+    return rc;
+}
+
+typedef rc_t( * vdp_fkt )( vdp_context * vdp_ctx );
+
+
+#define BYTE_OFFSET(VALUE)  ( (VALUE) >> 3 )
+#define BIT_OFFSET(VALUE)   ( (VALUE) & 0x7 )
+
+
+static uint8_t BitLength2Bytes[65] =
+{
+         /* 0  1  2  3  4  5  6  7  8  9*/
+   /* 0 */  0, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+   /* 1 */  2, 2, 2, 2, 2, 2, 2, 3, 3, 3,
+   /* 2 */  3, 3, 3, 3, 3, 4, 4, 4, 4, 4,
+   /* 3 */  4, 4, 4, 5, 5, 5, 5, 5, 5, 5,
+   /* 4 */  5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
+   /* 5 */  7, 7, 7, 7, 7, 7, 7, 8, 8, 8,
+   /* 6 */  8, 8, 8, 8, 8
+};
+
+/*************************************************************************************
+n_bits   [IN] ... number of bits
+
+calculates the number of bytes that have to be copied to contain the given
+number of bits
+*************************************************************************************/
+static uint16_t vdp_bitlength_2_bytes( const size_t n_bits )
+{
+    if ( n_bits > 64 )
+        return 8;
+    else
+        return BitLength2Bytes[ n_bits ];
+}
+
+
+static uint64_t BitLength2Mask[33] =
+{
+   /* 0 */ 0x00,
+   /* 1 ..  4 */  0x1,                0x3,                0x7,                0xF,
+   /* 5 ..  8 */  0x1F,               0x3F,               0x7F,               0xFF,
+   /* 9 .. 12 */  0x1FF,              0x3FF,              0x7FF,              0xFFF,
+   /*13 .. 16 */  0x1FFF,             0x3FFF,             0x7FFF,             0xFFFF,
+   /*17 .. 20 */  0x1FFFF,            0x3FFFF,            0x7FFFF,            0xFFFFF,
+   /*21 .. 24 */  0x1FFFFF,           0x3FFFFF,           0x7FFFFF,           0xFFFFFF,
+   /*25 .. 28 */  0x1FFFFFF,          0x3FFFFFF,          0x7FFFFFF,          0xFFFFFFF,
+   /*29 .. 32 */  0x1FFFFFFF,         0x3FFFFFFF,         0x7FFFFFFF,         0xFFFFFFFF
+ };
+
+
+/*************************************************************************************
+n_bits   [IN] ... number of bits
+
+creates a bitmask to mask exactly the given number of bits from a longer value
+*************************************************************************************/
+static uint64_t vdp_bitlength_2_mask( const size_t n_bits )
+{
+    uint64_t res;
+    if ( n_bits < 33 )
+        res = BitLength2Mask[ n_bits ];
+    else
+    {
+        if ( n_bits < 65 )
+            res = BitLength2Mask[ n_bits-32 ];
+        else
+            res = 0xFFFFFFFF;
+        res <<= 32;
+        res |= 0xFFFFFFFF;
+    }
+    return res;
+}
+
+
+static void vdp_move_to_value( void* dst, vdp_context * vdp_ctx, const uint32_t n_bits )
+{
+    uint8_t *src_ptr = ( uint8_t * )vdp_ctx->base + BYTE_OFFSET( vdp_ctx->offset_in_bits );
+    if ( BIT_OFFSET( vdp_ctx->offset_in_bits ) == 0 )
+    {
+        memmove( dst, src_ptr, vdp_bitlength_2_bytes( n_bits ) );
+    }
+    else
+    {
+        bitcpy ( dst, 0, src_ptr, BIT_OFFSET( vdp_ctx->offset_in_bits ), n_bits );
+    }
+}
+
+
+static uint64_t vdp_move_to_uint64( vdp_context * vdp_ctx )
+{
+    uint64_t value = 0;
+    uint32_t n_bits = vdp_ctx->type_desc->intrinsic_bits;
+    vdp_move_to_value( &value, vdp_ctx, n_bits );
+    if ( n_bits & 7 )
+    {
+        size_t unpacked = 0;
+        Unpack( n_bits, sizeof( value ), &value, 0, n_bits, NULL, &value, sizeof( value ), &unpacked );
+    }
+    value &= vdp_bitlength_2_mask( n_bits );
+    vdp_ctx->offset_in_bits += n_bits;
+    return value;
+}
+
+static rc_t vdp_boolean( vdp_context * vdp_ctx )
+{
+    rc_t rc;
+    uint64_t value = vdp_move_to_uint64( vdp_ctx );
+    switch( vdp_ctx->opts->c_boolean )
+    {
+    case '1' :  if ( value == 0 )
+                    rc = vdp_print_string( vdp_ctx, "0" );
+                else
+                    rc = vdp_print_string( vdp_ctx, "1" );
+                break;
+    case 'T' :  if ( value == 0 )
+                    rc = vdp_print_string( vdp_ctx, "F" );
+                else
+                    rc = vdp_print_string( vdp_ctx, "T" );
+                break;
+
+    default  :  if ( value == 0 )
+                    rc = vdp_print_string( vdp_ctx, "false" );
+                else
+                    rc = vdp_print_string( vdp_ctx, "true" );
+                break;
+    }
+    return rc;
+}
+
+
+static const char * uint_hex_fmt = "0x%lX";
+static const char * uint_dec_fmt = "%lu";
+static const char * int_dec_fmt = "%ld";
+
+
+static rc_t vdp_print_uint64( vdp_context * vdp_ctx, const char * fmt, uint64_t value )
+{
+    if ( vdp_ctx->buf == NULL )
+        return KOutMsg( fmt, value );
+    else
+        return vdp_print( vdp_ctx, fmt, value );
+}
+
+static rc_t vdp_print_int64( vdp_context * vdp_ctx, const char * fmt, int64_t value )
+{
+    if ( vdp_ctx->buf == NULL )
+        return KOutMsg( fmt, value );
+    else
+        return vdp_print( vdp_ctx, fmt, value );
+}
+
+static rc_t vdp_uint( vdp_context * vdp_ctx )
+{
+    rc_t rc = 0;
+    uint64_t value = vdp_move_to_uint64( vdp_ctx );
+    if ( ( vdp_ctx->opts->translate_sra_types )/*&&( def->value_trans_fct != NULL )*/ )
+    {
+/*
+        const char *txt = def->value_trans_fct( (uint32_t)value );
+        rc = vds_append_str( s, txt );
+*/
+    }
+    else
+    {
+        rc = vdp_print_uint64( vdp_ctx,
+                               vdp_ctx->opts->in_hex ? uint_hex_fmt : uint_dec_fmt,
+                               value ) ;
+    }
+    return rc;
+}
+
+
+static rc_t vdp_int( vdp_context * vdp_ctx )
+{
+    rc_t rc = 0;
+    int64_t value = (int64_t)vdp_move_to_uint64( vdp_ctx );
+    if ( ( vdp_ctx->opts->translate_sra_types )/*&&( def->value_trans_fct != NULL )*/ )
+    {
+/*
+        const char *txt = def->value_trans_fct( (uint32_t)value );
+        rc = vds_append_str( s, txt );
+*/
+    }
+    else
+    {
+        switch ( vdp_ctx->type_desc->intrinsic_bits )
+        {
+            case  8 : { int8_t temp = (int8_t)value;
+                        value = temp; }
+                      break;
+            case 16 : { int16_t temp = (int16_t)value;
+                        value = temp; }
+                      break;
+            case 32 : { int32_t temp = (int32_t)value;
+                        value = temp; }
+                      break;
+        }
+        rc = vdp_print_int64( vdp_ctx,
+                              vdp_ctx->opts->in_hex ? uint_hex_fmt : int_dec_fmt,
+                              value ) ;
+    }
+    return rc;
+}
+
+
+#define BITSIZE_OF_FLOAT ( sizeof(float) * 8 )
+#define BITSIZE_OF_DOUBLE ( sizeof(double) * 8 )
+static const char * float_fmt = "%e";
+static const char * unknown_float_fmt = "unknown float-type";
+
+static rc_t vdp_float( vdp_context * vdp_ctx )
+{
+    rc_t rc;
+    if ( vdp_ctx->opts->in_hex )
+        rc = vdp_int( vdp_ctx );
+    else
+    {
+        uint32_t n_bits = vdp_ctx->type_desc->intrinsic_bits;
+        if ( n_bits == BITSIZE_OF_FLOAT )
+        {
+            float value;
+            vdp_move_to_value( &value, vdp_ctx, n_bits );
+            if ( vdp_ctx->buf == NULL )
+                rc = KOutMsg( float_fmt, value );
+            else
+                rc = vdp_print( vdp_ctx, float_fmt, value );
+        }
+        else if ( n_bits == BITSIZE_OF_DOUBLE )
+        {
+            double value;
+            vdp_move_to_value( &value, vdp_ctx, n_bits );
+            if ( vdp_ctx->buf == NULL )
+                rc = KOutMsg( float_fmt, value );
+            else
+                rc = vdp_print( vdp_ctx, float_fmt, value );
+        }
+        else
+            rc = vdp_print_string( vdp_ctx, unknown_float_fmt );
+
+        vdp_ctx->offset_in_bits += n_bits;
+    }
+    return rc;
+}
+
+
+static const char * txt_fmt = "%.*s";
+
+static rc_t vdp_txt_ascii( vdp_context * vdp_ctx )
+{
+    rc_t rc;
+    char *src_ptr = (char*)vdp_ctx->base + BYTE_OFFSET( vdp_ctx->offset_in_bits );
+    if ( vdp_ctx->buf == NULL )
+        rc = KOutMsg( txt_fmt, vdp_ctx->row_len, src_ptr );
+    else
+        rc = vdp_print( vdp_ctx, txt_fmt, vdp_ctx->row_len, src_ptr );
+    return rc;
+}
+
+
+static rc_t vdp_hex_char( char * temp, uint32_t * idx, const uint8_t c )
+{
+    char s[ 8 ];
+    size_t num_writ;
+    rc_t rc = string_printf ( s, sizeof s, &num_writ, "%X ", c );
+    if ( rc == 0 )
+    {
+        size_t i;
+        for ( i = 0; i < num_writ; ++i )
+            temp[ (*idx)++ ] = s[ i ];
+    }
+    return rc;
+}
+
+
+static rc_t vdp_hex_ascii( vdp_context * vdp_ctx )
+{
+    rc_t rc = 0;
+    char *src_ptr = (char*)vdp_ctx->base + BYTE_OFFSET( vdp_ctx->offset_in_bits );
+    char *tmp = malloc( ( vdp_ctx->row_len + 1 ) * 4 );
+    if ( tmp != NULL )
+    {
+        uint32_t i, dst_idx = 0;
+        for ( i = 0; i < vdp_ctx->row_len && rc == 0; ++i )
+            rc = vdp_hex_char( tmp, &dst_idx, src_ptr[ i ] );
+        tmp[ dst_idx ] = 0;
+        if ( rc == 0 )
+        {
+            if ( vdp_ctx->buf == NULL )
+                rc = KOutMsg( txt_fmt, dst_idx, tmp );
+            else
+                rc = vdp_print( vdp_ctx, txt_fmt, dst_idx, tmp );
+        }
+        free( tmp );
+    }
+    else
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+    return rc;
+}
+
+
+static rc_t vdp_ascii( vdp_context * vdp_ctx )
+{
+    rc_t rc;
+
+    if ( vdp_ctx->opts->in_hex )
+        rc = vdp_hex_ascii( vdp_ctx );
+    else
+        rc = vdp_txt_ascii( vdp_ctx );
+
+    if ( rc == 0 )
+    {
+        vdp_ctx->elem_idx += vdp_ctx->row_len;
+        vdp_ctx->offset_in_bits += ( vdp_ctx->type_desc->intrinsic_bits * vdp_ctx->row_len );
+    }
+    return rc;
+}
+
+
+static rc_t vdp_unicode( vdp_context * vdp_ctx )
+{
+    return vdp_ascii( vdp_ctx );
+}
+
+
+/* !!!!!!!! this depends on how domains are defined in "schema.h" */
+vdp_fkt vdp_dispatch[] =
+{
+    vdp_boolean,
+    vdp_uint,
+    vdp_int,
+    vdp_float,
+    vdp_ascii,
+    vdp_unicode
+};
+
+static rc_t vdp_print_dim( vdp_context * vdp_ctx, uint32_t dimension, uint32_t selection )
+{
+    rc_t rc = 0;
+    int i = 0;
+    bool print_comma = true;
+
+    if ( selection == 0 ) /* cell-type == boolean */
+    {
+        /* if long form "false" or "true" separate elements by comma */
+        print_comma = ( vdp_ctx->opts->c_boolean == 0 );
+    }
+
+    while ( ( i < dimension )&&( rc == 0 ) )
+    {
+        /* selection 0 ... boolean */
+        if ( print_comma && ( i > 0 ) )
+            rc = vdp_print( vdp_ctx, ", " );
+
+        if ( rc == 0 )
+            rc = vdp_dispatch[ selection ]( vdp_ctx );
+
+        i++;
+    }
+    return rc;
+}
+
+
+static char dna_chars[ 4 ] = { 'A', 'C', 'G', 'T' };
+
+/* special function to translate dim=2,bits=1 into a DNA-base */
+static rc_t vdp_print_1_base( vdp_context * vdp_ctx )
+{
+    uint64_t value;
+    vdp_move_to_value( &value, vdp_ctx, 2 ); /* move 2 bits into value */
+    value &= 3;
+    if ( vdp_ctx->buf == NULL )
+        return KOutMsg( "%c", dna_chars[ value ] );
+    else
+        return vdp_print( vdp_ctx, "%c", dna_chars[ value ] );
+}
+
+static rc_t vdp_print_elem( vdp_context * vdp_ctx )
+{
+    rc_t rc = 0;
+
+    uint32_t dimension   = vdp_ctx->type_desc->intrinsic_dim;
+    uint32_t selection   = vdp_ctx->type_desc->domain - 1;
+    
+    if ( dimension == 1 )
+    {
+        /* we have only 1 dimension ---> just print this value */
+        if ( selection < 6 )
+            rc = vdp_dispatch[ selection ]( vdp_ctx );
+    }
+    else
+    {
+        /* we have more than 1 dimension ---> repeat printing value's */
+        if ( vdp_ctx->print_dna_bases )
+            rc = vdp_print_1_base( vdp_ctx );
+        else
+        {
+            /*
+            bool trans = ( ( vdp_ctx->opts->without_sra_types == false )&&
+                           ( def->dim_trans_fct ) );
+            bool paren = ( ( src->number_of_elements > 1 )||( !trans ) );                           
+            */
+            bool paren = ( vdp_ctx->row_len > 1 );
+
+            if ( paren )
+                rc = vdp_print( vdp_ctx, "[" );
+            /* rc = vds_append_str( &(def->content), bracket ? "[" : "{" ); */
+
+            if ( rc == 0 )
+            {
+                /*
+                if ( trans )
+                    rc = vdt_dump_dim_trans( src, def, dimension );
+                else
+                */
+                rc = vdp_print_dim( vdp_ctx, dimension, selection );
+            }
+
+            if ( paren && ( rc == 0 ) )
+                rc = vdp_print( vdp_ctx, "]" );
+        }
+    }
+    return rc;
+}
+
+
+rc_t vdp_print_cell_cmn( char * buf, size_t buf_size, size_t *num_written,
+                         const uint32_t elem_bits, const void * base, uint32_t boff, uint32_t row_len,
+                         const VTypedesc * type_desc, vdp_opts * opts )
+{
+    rc_t rc = 0;
+    vdp_context vdp_ctx;
+    vdp_ctx.selection = ( type_desc->domain - 1 );
+    if ( vdp_ctx.selection < 0 || 
+         vdp_ctx.selection > ( sizeof vdp_dispatch / sizeof vdp_dispatch[ 0 ] ) )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcVisiting, rcOffset, rcInvalid );
+    }
+    else
+    {
+        vdp_ctx.base = base;
+        vdp_ctx.opts = opts;
+        vdp_ctx.type_desc = type_desc;
+        vdp_ctx.elem_bits = elem_bits;
+        vdp_ctx.boff = boff;
+        vdp_ctx.row_len = row_len;
+        vdp_ctx.elem_idx = 0;
+
+        vdp_ctx.buf = buf;
+        vdp_ctx.buf_size = buf_size;
+        vdp_ctx.printed_so_far = 0;
+        vdp_ctx.buf_filled = false;
+        vdp_ctx.offset_in_bits = 0;
+
+        if ( ( type_desc->domain < vtdBool ) || ( type_desc->domain > vtdUnicode ) )
+            rc = vdp_print_string( &vdp_ctx, "unknown data-type" );
+        else
+        {
+            bool print_comma = true;
+
+            /* hardcoded printing of dna-bases if the column-type fits */
+            vdp_ctx.print_dna_bases = ( opts->print_dna_bases &
+                        ( type_desc->intrinsic_dim == 2 ) &
+                        ( type_desc->intrinsic_bits == 1 ) );
+
+            if ( ( type_desc->domain == vtdBool ) && opts->c_boolean )
+                print_comma = false;
+
+            while( ( vdp_ctx.elem_idx < row_len ) && ( rc == 0 ) && ( !vdp_ctx.buf_filled ) )
+            {
+                uint32_t eidx = vdp_ctx.elem_idx;
+
+                if ( ( eidx > 0 ) && ( vdp_ctx.print_dna_bases == false ) && print_comma )
+                    rc = vdp_print_string( &vdp_ctx, ", " );
+
+                /* dumps the basic data-types, implementation above
+                   >>> that means it appends or prints to stdout the element-string
+                   inc the vdb_ctx.element_idx by: 1...bool/int/uint/float
+                                                   n...string/unicode-string */
+                rc = vdp_print_elem( &vdp_ctx );
+
+                /* insurance against endless loop */
+                if ( eidx == vdp_ctx.elem_idx )
+                    vdp_ctx.elem_idx++;
+            }
+        }
+    }
+    return rc;
+}
+
+
+rc_t vdp_print_cell_2_buffer( char * buffer, size_t bufsize, size_t *num_written,
+                              const uint32_t elem_bits, const void * base, uint32_t boff, uint32_t row_len,
+                              const VTypedesc * type_desc, vdp_opts * opts )
+{
+    rc_t rc = 0;
+
+    if ( base == NULL || type_desc == NULL || buffer == NULL || opts == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcVisiting, rcParam, rcNull );
+    }
+    else
+    {
+        rc = vdp_print_cell_cmn( buffer, bufsize, num_written, elem_bits, base, boff, row_len, type_desc, opts );
+    }
+    return rc;
+}
+
+
+rc_t vdp_print_cell( const uint32_t elem_bits, const void * base, uint32_t boff, uint32_t row_len,
+                     const VTypedesc * type_desc, vdp_opts * opts )
+{
+    rc_t rc = 0;
+
+    if ( base == NULL || type_desc == NULL || opts == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcVisiting, rcParam, rcNull );
+        KOutMsg( "base/type_desc/otps is NULL\n" );
+    }
+    else
+        rc = vdp_print_cell_cmn( NULL, 0, NULL, elem_bits, base, boff, row_len, type_desc, opts );
+    return rc;
+}
+
+/* -----------------------------------------------------------------------------------------------*/
+
+
+/* -----------------------------------------------------------------------------------------------*/
+
+typedef struct vdp_src_context
+{
+    KDirectory *dir;
+    const VDBManager *mgr;
+    VSchema *schema;
+    Vector sources;
+    bool print_info;
+    vdp_opts opts;
+} vdp_src_context;
+
+
+typedef struct vdp_database
+{
+    const String * name;
+    const VDatabase *database;
+    Vector sub_databases;
+    Vector sub_tables;
+    vdp_opts * opts;
+} vdp_database;
+
+typedef struct vdp_table
+{
+    const String * name;
+    const VTable *table;
+    const VCursor *cursor;
+    vdp_opts * opts;
+    Vector columns;
+    uint32_t max_col_name_len;
+} vdp_table;
+
+
+typedef struct vdp_column
+{
+    const String * name;
+    uint32_t id;
+    vdp_table * tab;
+    struct VTypedecl type;
+    struct VTypedesc desc;
+} vdp_column;
+
+
+typedef struct vdp_source
+{
+    const String * path;
+    int path_type;
+    vdp_table * tbl;
+    vdp_database * db;
+    vdp_opts * opts;
+} vdp_source;
+
+
+/* -----------------------------------------------------------------------------------------------*/
+
+static void CC release_column( void *item, void * data )
+{
+    vdp_column * c = ( vdp_column * )item;
+    if ( c != NULL )
+        StringWhack ( c->name );
+    free( item );
+}
+
+static rc_t vdp_add_column( vdp_table * tbl, const String * name, bool print_info )
+{
+    rc_t rc = 0;
+    vdp_column * col = malloc( sizeof * col );
+    if ( col == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        KOutMsg( "vdp_add_column( '%S' ) -> %R\n", name, rc );
+    }
+    else
+    {
+        rc = StringCopy( &col->name, name );
+        if ( rc != 0 )
+        {
+            free( ( void * ) col );
+            KOutMsg( "StringCopy( '%S' ) -> %R\n", name, rc );
+        }
+        else
+        {
+            col->tab = tbl;
+            if ( name->len > tbl->max_col_name_len ) tbl->max_col_name_len = name->len;
+            rc = VCursorAddColumn( tbl->cursor, &col->id, "%s", name->addr );
+            if ( rc != 0 )
+                KOutMsg( "VCursorAddColumn( '%S.%S' ) -> %R\n", tbl->name, name, rc );
+            else
+                rc = VectorAppend( &tbl->columns, NULL, col );
+
+            if ( rc != 0 )
+                release_column( col, NULL );
+            else if ( print_info )
+                KOutMsg( "column: '%S.%S' added\n", tbl->name, name );
+        }
+    }
+    return rc;
+}
+
+static rc_t vdp_get_column_type( vdp_table * tbl, vdp_column * col )
+{
+    rc_t rc = VCursorDatatype( tbl->cursor, col->id, &col->type, &col->desc );
+    if ( rc != 0 )
+        KOutMsg( "VCursorDatatype( '%S.%S' ) -> %R\n", tbl->name, col->name, rc );
+    return rc;
+}
+
+/* -----------------------------------------------------------------------------------------------*/
+
+static void CC release_table( void *item, void * data )
+{
+    vdp_table * tbl = ( vdp_table * ) item;
+    if ( tbl != NULL )
+    {
+        VectorWhack( &tbl->columns, release_column, NULL );
+        StringWhack ( tbl->name );
+        VCursorRelease( tbl->cursor );
+        VTableRelease ( tbl->table );
+        free( item );
+    }
+}
+
+/* we can open a table from an accession or from a database... */
+static rc_t vdp_open_table( vdp_src_context * vctx,
+                            vdp_source * acc, vdp_database * parent_db, const String * name )
+{
+    rc_t rc = 0;
+    vdp_table * tbl = malloc( sizeof * tbl );
+    if ( tbl == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        KOutMsg( "vdp_open_table( '%S' ) -> %R\n", name, rc );
+    }
+    else
+    {
+        rc = StringCopy( &tbl->name, name );
+        if ( rc != 0 )
+        {
+            free( ( void * ) tbl );
+            KOutMsg( "StringCopy( '%S' ) -> %R\n", name, rc );
+        }
+        else
+        {
+            tbl->opts = &vctx->opts;
+            VectorInit( &tbl->columns, 0, 20 );
+            tbl->max_col_name_len = 0;
+            
+            /* open the table: either from manager or from database */
+            if ( acc != NULL )
+                rc = VDBManagerOpenTableRead( vctx->mgr, &tbl->table, vctx->schema, "%s", name->addr );
+            else
+                rc = VDatabaseOpenTableRead( parent_db->database, &tbl->table, "%s", name->addr );
+            
+            /* enumerate columns, create cursor, add columns */
+            if ( rc == 0 )
+            {
+                rc = VTableCreateCursorRead( tbl->table, &tbl->cursor );
+                if ( rc == 0 )
+                {
+                    KNamelist * column_names;
+                    rc = VTableListCol( tbl->table, &column_names );
+                    if ( rc == 0 )
+                    {
+                        uint32_t count, idx;
+                        rc = KNamelistCount( column_names, &count );
+                        for ( idx = 0; rc == 0 && idx < count; ++idx )
+                        {
+                            const char * column_name;
+                            rc = KNamelistGet( column_names, idx, &column_name );
+                            if ( rc == 0 && column_name != NULL )
+                            {
+                                String temp_str;
+                                StringInitCString( &temp_str, column_name );
+                                rc = vdp_add_column( tbl, &temp_str, vctx->print_info );
+                            }
+                        }
+                        KNamelistRelease( column_names );
+                    }
+                    rc = VCursorOpen( tbl->cursor );
+                }
+            }
+            
+            if ( rc == 0 )
+            {
+                /* update the type for each column */
+                uint32_t start = VectorStart( &tbl->columns );
+                uint32_t count = VectorLength( &tbl->columns );
+                uint32_t id = start;
+                while ( id < start + count - 1 && rc == 0 )
+                {
+                    vdp_column * column = VectorGet( &tbl->columns, id );
+                    if ( column != NULL )
+                        rc = vdp_get_column_type( tbl, column );
+                    id++;
+                }
+            }
+            
+            if ( rc == 0 )
+            {
+                /* enter the new object: either into source-struct or parent-db */
+                if ( acc != NULL )
+                    acc->tbl = tbl;
+                else
+                    rc = VectorAppend( &parent_db->sub_tables, NULL, tbl );
+            }
+
+            if ( rc != 0 )
+                release_table( tbl, NULL );
+            else if ( vctx->print_info )
+                KOutMsg( "table: '%S' opened\n", name );
+                
+        }
+    }
+    return rc;
+}
+
+static rc_t vdp_table_adjust_ranges( vdp_table * tbl, struct num_gen * ranges )
+{
+    rc_t rc = 0;
+    if ( tbl == NULL || ranges == NULL )
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    else
+    {
+        int64_t first;
+        uint64_t count;
+        rc = VCursorIdRange( tbl->cursor, 0, &first, &count );
+        if ( rc != 0 )
+            KOutMsg( "VCursorIdRange( %S ) -> %R\n", tbl->name, rc );
+        else
+        {
+            if ( num_gen_empty( ranges ) )
+            {
+                rc = num_gen_add( ranges, first, count );
+                if ( rc != 0 )
+                    KOutMsg( "tbl '%S' : num_gen_add( %d, %d ) -> %R\n", tbl->name, first, count, rc );
+            }
+            else
+            {
+                rc = num_gen_trim( ranges, first, count );
+                if ( rc != 0 )
+                    KOutMsg( "tbl '%S' : num_gen_trim( %d, %d ) -> %R\n", tbl->name, first, count, rc );
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdp_print_table_row( vdp_table * tbl, int64_t row_id )
+{
+    rc_t rc = 0;
+    uint32_t start = VectorStart( &tbl->columns );
+    uint32_t count = VectorLength( &tbl->columns );
+    uint32_t id = start;
+    
+    /* rc = KOutMsg( "row#%ld:\n", row_id ); */
+    while ( id < start + count - 1 && rc == 0 )
+    {
+        vdp_column * column = VectorGet( &tbl->columns, id );
+        if ( column != NULL )
+        {
+            uint32_t w = tbl->max_col_name_len + 1 - column->name->len;
+            rc = KOutMsg( "%S:%*s", column->name, w, " " );
+            if ( rc == 0 )
+            {
+                uint32_t elem_bits, boff, row_len;
+                const void * base;
+                rc = VCursorCellDataDirect( tbl->cursor, row_id, column->id,
+                    &elem_bits, &base, &boff, &row_len );
+                if ( rc != 0 )
+                    KOutMsg( "VCursorCellDataDirect( tbl: '%s', row: %ld, col: '%s' ) -> %R\n",
+                        tbl->name, row_id, column->name, rc );
+                else
+                {
+                    if ( rc == 0 && base != NULL )
+                    {
+                        rc = vdp_print_cell( elem_bits, base, boff, row_len, &column->desc, tbl->opts );
+                    }
+                    /*
+                    KOutMsg( "elem_bits=%d, base=%p boff=%d, row_len=%d, desc=%p, opts=%p\n",
+                        elem_bits, base, boff, row_len, &column->desc, tbl->opts );
+                    */
+                }
+            }
+            if ( rc == 0 )
+                rc = KOutMsg( "\n" );
+        }
+        id++;
+    }
+    return rc;
+}
+
+static rc_t vdp_print_table( vdp_table * tbl, struct num_gen * ranges )
+{
+    const struct num_gen_iter * iter;
+    rc_t rc = num_gen_iterator_make( ranges, &iter );
+    if ( rc != 0 )
+        KOutMsg( "num_gen_iterator_make() -> %R", rc );
+    else
+    {
+        int64_t row_id;
+        while ( num_gen_iterator_next( iter, &row_id, &rc ) && rc == 0 )
+            rc = vdp_print_table_row( tbl, row_id );
+            
+        num_gen_iterator_destroy( iter );
+    }
+    return rc;
+}
+
+/* -----------------------------------------------------------------------------------------------*/
+
+static void CC release_database( void *item, void * data )
+{
+    vdp_database * db = ( vdp_database * ) item;
+    if ( db != NULL )
+    {
+        StringWhack( db->name );
+        VectorWhack( &db->sub_tables, release_table, NULL );
+        VectorWhack( &db->sub_databases, release_database, NULL ); /* !! recursion */
+        VDatabaseRelease( db->database );
+        free( item );
+    }
+}
+
+/* we can open a database from an accession or from a database... */
+static rc_t vdp_open_database( vdp_src_context * vctx,
+                               vdp_source * acc, vdp_database * parent_db, const String * name )
+{
+    rc_t rc = 0;
+    vdp_database * db = malloc( sizeof * db );
+    if ( db == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        KOutMsg( "vdp_open_database( '%S' ) -> %R\n", name, rc );
+    }
+    else
+    {
+        rc = StringCopy( &db->name, name );
+        if ( rc != 0 )
+        {
+            free( ( void * ) db );
+            KOutMsg( "string_dup_measure( '%S' ) -> %R\n", name, rc );
+        }
+        else
+        {
+            VectorInit( &db->sub_databases, 0, 5 );
+            VectorInit( &db->sub_tables, 0, 5 );
+            db->opts = &vctx->opts;
+            
+            /* open the table: either from manager or from database */
+            if ( acc != NULL )
+                rc = VDBManagerOpenDBRead( vctx->mgr, &db->database, vctx->schema, "%s", name->addr );
+            else
+                rc = VDatabaseOpenDBRead( parent_db->database, &db->database, "%s", name->addr );
+
+            /* enumerate tables, open tables */
+            if ( rc == 0 )
+            {
+                KNamelist * table_names;
+                rc_t rc1 = VDatabaseListTbl( db->database, &table_names );
+                if ( rc1 == 0 )
+                {
+                    uint32_t count, idx;
+                    rc = KNamelistCount( table_names, &count );
+                    for ( idx = 0; rc == 0 && idx < count; ++idx )
+                    {
+                        const char * table_name;
+                        rc = KNamelistGet( table_names, idx, &table_name );
+                        if ( rc == 0 && table_name != NULL )
+                        {
+                            String temp_str;
+                            StringInitCString( &temp_str, table_name );
+                            rc = vdp_open_table( vctx, NULL, db, &temp_str );
+                        }
+                    }
+                    KNamelistRelease( table_names );
+                }
+            }
+            
+            /* enumerate sub-db's, open sub-db's */
+            if ( rc == 0 )    
+            {
+                KNamelist * sub_db_names;
+                rc_t rc1 = VDatabaseListDB( db->database, &sub_db_names );
+                if ( rc1 == 0 )
+                {
+                    uint32_t count, idx;
+                    rc = KNamelistCount( sub_db_names, &count );
+                    for ( idx = 0; rc == 0 && idx < count; ++idx )
+                    {
+                        const char * sub_db_name;
+                        rc = KNamelistGet( sub_db_names, idx, &sub_db_name );
+                        if ( rc == 0 && sub_db_name != NULL )
+                        {
+                            String temp_str;
+                            StringInitCString( &temp_str, sub_db_name );
+                            rc = vdp_open_database( vctx, NULL, db, &temp_str ); /* !! recursion !! */
+                        }
+                    }
+                    KNamelistRelease( sub_db_names );
+                }
+            }
+        
+            if ( rc == 0 )
+            {
+                /* enter the new object: either into source-struct or parent-db */
+                if ( acc != NULL )
+                    acc->db = db;
+                else
+                    rc = VectorAppend( &parent_db->sub_databases, NULL, db );
+            }
+            
+            if ( rc != 0 )
+                release_database( db, NULL );
+            else if ( vctx->print_info )
+                KOutMsg( "database: '%S' opened\n", name );
+        }
+    }
+    return rc;
+}
+
+/*
+KLIB_EXTERN void* CC VectorFind ( const Vector *self, const void *key, uint32_t *idx,
+    int64_t ( CC * cmp ) ( const void *key, const void *n ) );
+*/
+static int64_t CC vdp_db_find_table( const void *key, const void * n )
+{
+    const String * to_find = key;
+    const vdp_table * tbl = n;
+    return StringCompare( to_find, tbl->name );
+}
+
+static const char * DFLT_TABLE = "SEQUENCE";
+
+static vdp_table * vdp_db_get_table( vdp_database * db, const String * path )
+{
+    vdp_table * res = NULL;
+    if ( db != NULL )
+    {
+        if ( path == NULL || path->len == 0 )
+        {
+            String tmp;
+            tmp.addr = DFLT_TABLE;
+            tmp.size = tmp.len = sizeof DFLT_TABLE;
+            res = vdp_db_get_table( db, &tmp ); /* recursion */
+            if ( res == NULL )
+                res = VectorGet( &db->sub_tables, 0 );
+        }
+        else
+        {
+            uint32_t found;
+            res = VectorFind( &db->sub_tables, path, &found, vdp_db_find_table );
+        }
+    }
+    return res;
+}
+
+/* -----------------------------------------------------------------------------------------------*/
+
+static void CC release_source( void *item, void * data )
+{
+    vdp_source * vsrc = ( vdp_source * )item;
+    if ( vsrc != NULL )
+    {
+        if ( vsrc->tbl != NULL ) release_table( vsrc->tbl, NULL );
+        if ( vsrc->db != NULL ) release_database( vsrc->db, NULL );
+        StringWhack ( vsrc->path );
+        free( ( void * ) item );
+    }
+}
+
+static rc_t vdp_init_source( vdp_src_context * vctx, const String * path )
+{
+    rc_t rc = 0;
+    vdp_source * vsrc = malloc( sizeof * vsrc );
+    if ( vsrc == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+        KOutMsg( "vdp_init_source( '%S' ) -> %R\n", path, rc );
+    }
+    else
+    {
+        rc = StringCopy ( &vsrc->path, path );
+        if ( rc != 0 )
+        {
+            free( ( void * ) vsrc );
+            KOutMsg( "StringCopy( '%S' ) -> %R\n", path, rc );
+        }
+        else
+        {
+            vsrc->path_type = ( VDBManagerPathType ( vctx->mgr, "%s", vsrc->path->addr ) & ~ kptAlias );
+            vsrc->tbl = NULL;
+            vsrc->db = NULL;
+            vsrc->opts = &vctx->opts;
+            /* types defined in <kdb/manager.h> */
+            switch ( vsrc->path_type )
+            {
+                case kptDatabase    :   rc = vdp_open_database( vctx, vsrc, NULL, vsrc->path ); break;
+                case kptPrereleaseTbl:
+                case kptTable       :   rc = vdp_open_table( vctx, vsrc, NULL, vsrc->path ); break;
+                default : rc = RC( rcVDB, rcNoTarg, rcConstructing, rcFormat, rcUnknown ); break;
+            }
+
+            if ( rc != 0 )
+                KOutMsg( "cannot open source '%S' -> %R\n", path, rc );
+            else
+                rc = VectorAppend( &vctx->sources, NULL, vsrc );
+            
+            if ( rc == 0 && vctx->print_info )
+                KOutMsg( "source '%S' opened\n", path );
+        }
+    }
+    return rc;
+}
+
+/* -----------------------------------------------------------------------------------------------*/
+
+rc_t vdp_release_ctx( vdp_src_context * vctx )
+{
+    rc_t rc = 0;
+    if ( vctx != NULL )
+    {
+        /* release all sources */
+        VectorWhack( &vctx->sources, release_source, NULL );
+        if ( vctx->dir != NULL )
+            rc = KDirectoryRelease( vctx->dir );
+        if ( rc == 0 && vctx->mgr != NULL )
+            rc = VDBManagerRelease( vctx->mgr );
+        if ( rc == 0 && vctx->schema != NULL )
+            rc = VSchemaRelease( vctx->schema );
+    }
+    return rc;
+}
+
+rc_t vdp_init_ctx( vdp_src_context ** vctx, const Args * args )
+{
+    rc_t rc = 0;
+    if ( vctx == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+        KOutMsg( "vdp_init_ctx() -> %R\n", rc );
+    
+    }
+    else
+    {
+        vdp_src_context * o = malloc( sizeof *o );
+        if ( o == NULL )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            KOutMsg( "vdp_init_ctx() -> %R\n", rc );
+        }
+        else
+        {
+            VectorInit( &o->sources, 0, 5 );
+            o->schema = NULL;
+            o->print_info = false;
+            o->opts.print_dna_bases = false;
+            o->opts.in_hex = false;
+            o->opts.translate_sra_types = false;
+            o->opts.c_boolean = '1';
+
+            rc = KDirectoryNativeDir( &o->dir );
+            if ( rc != 0 )
+            {
+                KOutMsg( "KDirectoryNativeDir() -> %R\n", rc );
+                o->dir = NULL;
+            }
+            else
+            {
+                rc = VDBManagerMakeRead ( &o->mgr, o->dir );
+                if ( rc != 0 )
+                {
+                    KOutMsg( "VDBManagerMakeRead() -> %R\n", rc );
+                    o->mgr = NULL;
+                }
+                else
+                {
+                    uint32_t count, idx;
+                    vdh_parse_schema( o->mgr, &o->schema, NULL, true /*ctx->force_sra_schema*/ );
+                    rc = ArgsParamCount( args, &count );
+                    if ( rc != 0 )
+                        KOutMsg( "ArgsParamCount() -> %R\n", rc );
+                    else for ( idx = 0; rc == 0 && idx < count; ++idx )
+                    {
+                        const char *arg = NULL;
+                        rc = ArgsParamValue( args, idx, (const void **)&arg );
+                        if ( rc != 0 )
+                            KOutMsg( "ArgsParamValue() -> %R\n", rc );
+                        else if ( arg != NULL && arg[ 0 ] != 0 )
+                        {
+                            String temp_str;
+                            StringInitCString( &temp_str, arg );
+                            rc = vdp_init_source( o, &temp_str );
+                        }
+                    }
+                }
+            }
+            if ( rc == 0 )
+                *vctx = o;
+            else
+                vdp_release_ctx( o );
+        }
+    }
+    return rc;
+}
+
+
+static vdp_table * vdp_get_table( vdp_src_context * vctx, uint32_t src_id, String * path )
+{
+    vdp_table * res = NULL;
+    if ( vctx != NULL )
+    {
+        vdp_source * src = VectorGet( &vctx->sources, src_id );
+        if ( src != NULL )
+        {
+            if ( src->tbl != NULL )
+                res = src->tbl; /* source has only this table */
+            else if ( src->db != NULL )
+                res = vdp_db_get_table( src->db, path ); /* source is a database */
+        }
+    }
+    return res;
+}
+
+/* -----------------------------------------------------------------------------------------------*/
+static rc_t vdb_print_parse_range( struct num_gen * ranges, const String * range )
+{
+    rc_t rc = num_gen_parse_S( ranges, range );
+    if ( rc != 0 )
+        KOutMsg( "num_gen_parse_S( %S ) -> %R\n", range, rc );
+    return rc;
+}
+
+static rc_t vdb_print_get_src_and_ranges( const String * S,
+                struct num_gen * ranges, uint32_t * src_id )
+{
+    rc_t rc = 0;
+    if ( S != NULL )
+    {
+        char * dot = string_chr( S->addr, S->len, '.' );
+        if ( dot == NULL )
+            rc = vdb_print_parse_range( ranges, S );
+        else
+        {
+            String Sub;
+            uint32_t dot_idx = ( dot - S->addr );
+            if ( dot_idx < S->len )
+            {
+                String * tmp = StringSubstr( S, &Sub, dot_idx + 1, S->len - dot_idx );
+                if ( tmp != NULL )
+                    rc = vdb_print_parse_range( ranges, tmp );
+            }
+            if ( rc == 0 && dot_idx > 0 )
+            {
+                String * tmp = StringSubstr( S, &Sub, 0, dot_idx );
+                if ( tmp != NULL )
+                {
+                    rc_t rc1;
+                    uint64_t v = StringToU64( tmp, &rc1 );
+                    if ( rc1 != 0 || v > 0xFFFF ) v = 0;
+                    *src_id = ( v & 0xFFFF );
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdp_print_show_src_and_ranges( struct num_gen * ranges, uint32_t src_id )
+{
+    rc_t rc;
+    char buffer[ 1024 ];
+    buffer[ 0 ] = 0;
+    rc = num_gen_as_string( ranges, buffer, sizeof buffer, NULL, true );
+    if ( rc == 0 )
+        rc = KOutMsg( "src-id = %d, ranges = %s\n", src_id, buffer );
+    return rc;
+}
+
+
+/* called from vdb-dump-interact.c, v is a vector of String-objects */
+rc_t vdp_print_interactive( const Vector * v, vdp_src_context * vctx )
+{
+    struct num_gen * ranges;
+    uint32_t src_id = 0;    /* per default use the first ( mostly only ) source */
+    rc_t rc = num_gen_make_sorted( &ranges, true );
+    if ( rc != 0 )
+        KOutMsg( "num_gen_make_sorted() -> %R\n", rc );
+    else
+    {
+        rc = vdb_print_get_src_and_ranges( VectorGet ( v, 1 ), ranges, &src_id );
+        if ( rc == 0 )
+        {
+            vdp_table * tbl = vdp_get_table( vctx, src_id, NULL );
+            if ( tbl == NULL )
+                KOutMsg( "invalid source #%d\n", src_id );
+            else
+            {
+                rc = vdp_table_adjust_ranges( tbl, ranges );
+                
+                if ( rc == 0 )
+                    rc = KOutMsg( "tbl: %S\n", tbl->name );
+                /* if ( rc == 0 )
+                    rc = vdp_print_show_src_and_ranges( ranges, src_id ); */
+                    
+                if ( rc == 0 )
+                    rc = vdp_print_table( tbl, ranges );
+            }
+        }
+        num_gen_destroy( ranges );
+    }
+    return rc;
+}
diff --git a/tools/vdb-dump/vdb-dump-print.h b/tools/vdb-dump/vdb-dump-print.h
new file mode 100644
index 0000000..af8f0e1
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-print.h
@@ -0,0 +1,86 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+
+#ifndef _h_vdb_dump_print_
+#define _h_vdb_dump_print_
+
+#include <vdb/schema.h> /* for VTypedesc */
+#include <vdb/manager.h>
+
+#include <klib/vector.h>
+#include <kapp/args.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct vdp_opts
+{
+    bool print_dna_bases;
+    bool in_hex;
+    bool translate_sra_types;
+    char c_boolean; /* how boolean is printed '1' ... 0/1, 'T' ... T/F, /0 ... true/false */
+} vdp_opts;
+
+
+struct vdp_src_context;
+
+
+/* vdp_print_cell
+ *  prints the content of a cursor-cell to stdout
+ *
+ *
+ *  "elem_bits" [ IN ] - element size in bits
+ *
+ *  "base" [ IN ] - pointer to cell starting bit
+ *
+ *  "boff" [ IN ] - bit offset in BITS of first bit to be printed
+ *
+ *  "row_len" [ IN ] - the number of elements in cell
+ *
+ *  "type_desc" [ IN ] - type description of the cell ( from schema )
+ */
+
+rc_t vdp_print_cell_2_buffer( char * buf, size_t buf_size, size_t *num_written,
+                              const uint32_t elem_bits, const void * base, uint32_t boff, uint32_t row_len,
+                              const VTypedesc * type_desc, vdp_opts * opts );
+
+rc_t vdp_print_cell( const uint32_t elem_bits, const void * base, uint32_t boff, uint32_t row_len,
+                     const VTypedesc * type_desc, vdp_opts * opts );
+
+
+rc_t vdp_init_ctx( struct vdp_src_context ** vctx, const Args * args );
+rc_t vdp_release_ctx( struct vdp_src_context * vctx );
+
+/* v is a vector of String objects... */
+rc_t vdp_print_interactive( const Vector * v, struct vdp_src_context * vctx );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
\ No newline at end of file
diff --git a/tools/vdb-dump/vdb-dump-redir.c b/tools/vdb-dump/vdb-dump-redir.c
new file mode 100644
index 0000000..83bd1b3
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-redir.c
@@ -0,0 +1,120 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "vdb-dump-redir.h"
+
+#include <kfs/directory.h>
+#include <kfs/buffile.h>
+#include <kfs/bzip.h>
+#include <kfs/gzip.h>
+#include <sysalloc.h>
+
+static rc_t CC out_redir_callback( void * self, const char * buffer, size_t bufsize, size_t * num_writ )
+{
+    out_redir * redir = ( out_redir * )self;
+    rc_t rc = KFileWriteAll( redir->kfile, redir->pos, buffer, bufsize, num_writ );
+    if ( rc == 0 )
+        redir->pos += *num_writ;
+    return rc;
+}
+
+
+rc_t init_out_redir( out_redir * self, out_redir_mode_t mode, const char * filename, size_t bufsize )
+{
+    rc_t rc;
+    KFile *output_file;
+
+    if ( filename != NULL )
+    {
+        KDirectory *dir;
+        rc = KDirectoryNativeDir( &dir );
+        if ( rc != 0 )
+            LOGERR( klogInt, rc, "KDirectoryNativeDir() failed" );
+        else
+        {
+            rc = KDirectoryCreateFile ( dir, &output_file, false, 0664, kcmInit, "%s", filename );
+            KDirectoryRelease( dir );
+        }
+    }
+    else
+        rc = KFileMakeStdOut ( &output_file );
+
+    if ( rc == 0 )
+    {
+        KFile *temp_file;
+
+        /* wrap the output-file in compression, if requested */
+        switch ( mode )
+        {
+            case orm_gzip  : rc = KFileMakeGzipForWrite( &temp_file, output_file ); break;
+            case orm_bzip2 : rc = KFileMakeBzip2ForWrite( &temp_file, output_file ); break;
+            case orm_uncompressed : break;
+        }
+        if ( rc == 0 )
+        {
+            if ( mode != orm_uncompressed )
+            {
+                KFileRelease( output_file );
+                output_file = temp_file;
+            }
+
+            /* wrap the output/compressed-file in buffering, if requested */
+            if ( bufsize != 0 )
+            {
+                rc = KBufFileMakeWrite( &temp_file, output_file, false, bufsize );
+                if ( rc == 0 )
+                {
+                    KFileRelease( output_file );
+                    output_file = temp_file;
+                }
+            }
+
+            if ( rc == 0 )
+            {
+                self->kfile = output_file;
+                self->org_writer = KOutWriterGet();
+                self->org_data = KOutDataGet();
+                self->pos = 0;
+                rc = KOutHandlerSet( out_redir_callback, self );
+                if ( rc != 0 )
+                    LOGERR( klogInt, rc, "KOutHandlerSet() failed" );
+            }
+        }
+    }
+    return rc;
+}
+
+
+void release_out_redir( out_redir * self )
+{
+    KFileRelease( self->kfile );
+    if( self->org_writer != NULL )
+    {
+        KOutHandlerSet( self->org_writer, self->org_data );
+    }
+    self->org_writer = NULL;
+}
+
diff --git a/tools/vdb-dump/vdb-dump-redir.h b/tools/vdb-dump/vdb-dump-redir.h
new file mode 100644
index 0000000..ceb198f
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-redir.h
@@ -0,0 +1,64 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+#ifndef _h_out_redir_
+#define _h_out_redir_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include <klib/out.h>
+#include <klib/rc.h>
+#include <klib/log.h>
+
+#include <kfs/file.h>
+
+typedef enum out_redir_mode
+{
+    orm_uncompressed = 0,
+    orm_gzip,
+    orm_bzip2
+} out_redir_mode_t;
+
+
+/* GLOBAL VARIABLES */
+typedef struct out_redir
+{
+    KWrtWriter org_writer;
+    void* org_data;
+    KFile* kfile;
+    uint64_t pos;
+} out_redir;
+
+
+rc_t init_out_redir( out_redir * self, out_redir_mode_t mode, const char * filename, size_t bufsize );
+
+void release_out_redir( out_redir * self );
+
+#endif
diff --git a/tools/vdb-dump/vdb-dump-repo.c b/tools/vdb-dump/vdb-dump-repo.c
new file mode 100644
index 0000000..66baca6
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-repo.c
@@ -0,0 +1,281 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "vdb-dump-repo.h"
+#include "vdb-dump-helper.h"
+
+#include <klib/text.h>
+#include <klib/out.h>
+#include <kfg/config.h>
+#include <kfg/repository.h>
+
+/* ------------------------------------------------------------------------------------------------- */
+
+static const KRepCategory id_to_repo_cat[ 4 ] = { krepUserCategory, krepSiteCategory, krepRemoteCategory, krepBadCategory };
+
+static const char * s_BadCategory       = "BadCategory";
+static const char * s_UserCategory      = "UserCategory";
+static const char * s_SiteCategory      = "SiteCategory";
+static const char * s_RemoteCategory    = "RemoteCategory";
+static const char * s_UnknownCategory   = "unknow category";
+
+static const char * KRepCategory_to_str( const KRepCategory c )
+{
+    switch( c )
+    {
+        case krepBadCategory        : return s_BadCategory; break;
+        case krepUserCategory       : return s_UserCategory; break;
+        case krepSiteCategory       : return s_SiteCategory; break;
+        case krepRemoteCategory     : return s_RemoteCategory; break;
+    };
+    return s_UnknownCategory;
+}
+
+static const char * s_Prefix_bad        = "bad";
+static const char * s_Prefix_user       = "user";
+static const char * s_Prefix_site       = "site";
+static const char * s_Prefix_remote     = "remote";
+static const char * s_Prefix_unknown    = "unknow";
+
+static const char * KRepCategory_to_prefix( const KRepCategory c )
+{
+    switch( c )
+    {
+        case krepBadCategory        : return s_Prefix_bad; break;
+        case krepUserCategory       : return s_Prefix_user; break;
+        case krepSiteCategory       : return s_Prefix_site; break;
+        case krepRemoteCategory     : return s_Prefix_remote; break;
+    };
+    return s_Prefix_unknown;
+}
+
+
+static const char * s_BadSubCategory            = "BadSubCategory";
+static const char * s_MainSubCategory           = "MainSubCategory";
+static const char * s_AuxSubCategory            = "AuxSubCategory";
+static const char * s_ProtectedSubCategory      = "ProtectedSubCategory";
+
+static const char * KRepSubCategory_to_str( const KRepSubCategory c )
+{
+    switch( c )
+    {
+        case krepBadSubCategory         : return s_BadSubCategory; break;
+        case krepMainSubCategory        : return s_MainSubCategory; break;
+        case krepAuxSubCategory         : return s_AuxSubCategory; break;
+        case krepProtectedSubCategory   : return s_ProtectedSubCategory; break;
+    }
+    return s_UnknownCategory;
+}
+
+static const char * s_yes = "yes";
+static const char * s_no  = "no";
+
+static const char * yes_or_no( const bool flag )
+{
+    return flag ? s_yes : s_no;
+}
+
+typedef rc_t ( CC * repofunc )( const KRepository *self, char *buffer, size_t bsize, size_t * size );
+
+static rc_t vdi_report_repo_str( const KRepository * repo, const char * elem_name, repofunc f )
+{
+    if ( f != NULL )
+    {
+        char buffer[ 4096 ];
+        rc_t rc = f( repo, buffer, sizeof buffer, NULL );
+        if ( rc == 0 ) return KOutMsg( "     - %s : %s\n", elem_name, buffer );
+    }
+    return 0;
+}
+
+static rc_t vdi_report_repository( const KRepository * repo, const char * prefix, int idx, bool full )
+{
+    KRepCategory cat = KRepositoryCategory( repo );
+    KRepSubCategory subcat = KRepositorySubCategory( repo );
+
+    rc_t rc = KOutMsg( "  repo.%s #%d:\n", prefix, idx );
+    if ( rc == 0 )
+        rc = KOutMsg( "     - category : %s.%s\n", KRepCategory_to_str( cat ), KRepSubCategory_to_str( subcat ) );
+    if ( rc == 0 )
+        rc = vdi_report_repo_str( repo, "name", KRepositoryName );
+    if ( rc == 0 )
+        rc = KOutMsg( "     - disabled : %s\n", yes_or_no( KRepositoryDisabled( repo ) ) );
+    
+    if ( full )
+    {
+        if ( rc == 0 ) rc = vdi_report_repo_str( repo, "displayname", KRepositoryDisplayName );
+        if ( rc == 0 ) rc = vdi_report_repo_str( repo, "root", KRepositoryRoot );
+        if ( rc == 0 ) rc = vdi_report_repo_str( repo, "resolver", KRepositoryResolver );
+        
+        if ( rc == 0 )
+            rc = KOutMsg( "     - cached : %s\n", yes_or_no( KRepositoryCacheEnabled( repo ) ) );
+            
+        if ( rc == 0 ) rc = vdi_report_repo_str( repo, "ticket", KRepositoryDownloadTicket );
+        if ( rc == 0 ) rc = vdi_report_repo_str( repo, "key", KRepositoryEncryptionKey );
+        if ( rc == 0 ) rc = vdi_report_repo_str( repo, "keyfile", KRepositoryEncryptionKeyFile );
+        if ( rc == 0 ) rc = vdi_report_repo_str( repo, "desc", KRepositoryDescription );    
+        
+        if ( rc == 0 )
+        {
+            uint32_t prj_id;
+            rc_t rc1 = KRepositoryProjectId( repo, &prj_id );
+            if ( rc1 == 0 ) rc = KOutMsg( "     - prj-id : %d\n", prj_id );
+        }
+    }
+    
+    if ( rc == 0 ) rc = KOutMsg( "\n" );
+    return rc;
+}
+
+typedef rc_t ( CC * catfunc )( const KRepositoryMgr *self, KRepositoryVector *user_repositories );
+
+static catfunc vdi_get_catfunc( const KRepCategory cat )
+{
+    switch( cat )
+    {
+        case krepUserCategory       : return KRepositoryMgrUserRepositories; break;
+        case krepSiteCategory       : return KRepositoryMgrSiteRepositories; break;
+        case krepRemoteCategory     : return KRepositoryMgrRemoteRepositories; break;
+    };
+    return NULL;
+}
+
+static rc_t vdi_report_repo_vector( const KRepositoryMgr * repomgr, const KRepCategory cat,
+                    int32_t select, bool full )
+                                    
+{
+    rc_t rc = 0;
+    catfunc f = vdi_get_catfunc( cat );
+    if ( f != NULL )
+    {
+        KRepositoryVector v;
+        rc = f( repomgr, &v );
+        if ( rc == 0 )
+        {
+            const char * prefix = KRepCategory_to_prefix( cat );
+            uint32_t idx, len = VectorLength( &v );
+            bool disabled = KRepositoryMgrCategoryDisabled( repomgr, cat );
+            rc = KOutMsg( "repo.%s --> disabled: %s, %d subrepositories )\n", prefix, yes_or_no( disabled ), len );
+            for ( idx = 0; rc == 0 && idx < len; ++idx )
+            {
+                if ( select == idx || !full )
+                    rc = vdi_report_repository( VectorGet( &v, idx ), prefix, idx, full );
+            }
+            
+            KRepositoryVectorWhack( &v );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdi_repo_all( const KRepositoryMgr * repomgr, bool full )
+{
+    rc_t rc = vdi_report_repo_vector( repomgr, krepUserCategory, -1, full );
+    if ( rc == 0 )
+        rc = vdi_report_repo_vector( repomgr, krepSiteCategory, -1, full );
+    if ( rc == 0 )
+        rc = vdi_report_repo_vector( repomgr, krepRemoteCategory, -1, full );
+    return rc;
+}
+
+
+static rc_t vdi_repo_switch( const KRepositoryMgr * repomgr, const KRepCategory cat, bool disabled )
+{
+    const char * s_cat = KRepCategory_to_prefix( cat );
+    rc_t rc = KRepositoryMgrCategorySetDisabled( repomgr, cat, disabled );
+    if ( rc == 0 )
+        rc = KOutMsg( "repository '%s' successfully %s", s_cat, ( disabled ? "disabled" : "enabled" ) );
+    else
+        rc = KOutMsg( "repository '%s' not %s: '%R'", s_cat, ( disabled ? "disabled" : "enabled" ), rc );
+    return rc;
+}
+
+
+static rc_t vdi_sub_repo( const KRepositoryMgr * repomgr, const Vector * v, const String * which_repo, int32_t repo_id )
+{
+    rc_t rc = 0;
+    const KRepCategory cat = id_to_repo_cat[ repo_id ];
+    
+    if ( VectorLength( v ) > 2 )
+    {
+        const String * which_sub = VectorGet( v, 2 );
+        int32_t repo_func = index_of_match( which_sub, 2, "on", "off" );
+        switch( repo_func )
+        {
+            case 0 : rc = vdi_repo_switch( repomgr, cat, false ); break;
+            case 1 : rc = vdi_repo_switch( repomgr, cat, true ); break;
+            case -1 :  {
+                            int32_t select = ( int32_t )string_to_I64( which_sub->addr, which_sub->len, NULL );
+                            rc = vdi_report_repo_vector( repomgr, cat, select, true );
+                        }
+                        break; 
+        }
+    }
+    else
+    {
+        if ( repo_id < 3 )
+            rc = vdi_report_repo_vector( repomgr, cat, -1, false );
+        else
+            rc = vdi_repo_all( repomgr, false );
+    }
+    
+    return rc;
+}
+
+
+rc_t vdi_repo( const Vector * v )
+{
+    KConfig * cfg;
+    rc_t rc = KConfigMake( &cfg, NULL );
+    if ( rc == 0 )
+    {
+        const KRepositoryMgr * repomgr;
+        rc = KConfigMakeRepositoryMgrRead( cfg, &repomgr );
+        {
+            if ( VectorLength( v ) < 2 )
+            {
+                rc = vdi_repo_all( repomgr, true );
+            }
+            else
+            {
+                const String * which_repo = VectorGet( v, 1 );
+                if ( which_repo != NULL )
+                {
+                    int32_t repo_id = index_of_match( which_repo, 4, "user", "site", "remote", "all" );
+                    if ( repo_id < 0 || repo_id > 3 )
+                        rc = KOutMsg( "unknow repository '%S'", which_repo );
+                    else
+                        rc = vdi_sub_repo( repomgr, v, which_repo, repo_id );
+                }
+            }
+            
+            KRepositoryMgrRelease( repomgr );
+        }
+        KConfigRelease ( cfg );
+    }
+    return rc;
+}
diff --git a/tools/vdb-dump/vdb-dump-repo.h b/tools/vdb-dump/vdb-dump-repo.h
new file mode 100644
index 0000000..d2a2e64
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-repo.h
@@ -0,0 +1,46 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_dump_repo_
+#define _h_vdb_dump_repo_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include <klib/rc.h>
+#include <klib/vector.h>
+
+rc_t vdi_repo( const Vector * v );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-dump/vdb-dump-row-context.h b/tools/vdb-dump/vdb-dump-row-context.h
new file mode 100644
index 0000000..de282f1
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-row-context.h
@@ -0,0 +1,71 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_dump_row_context_
+#define _h_vdb_dump_row_context_
+
+#include <vdb/cursor.h>
+#include <klib/vector.h>
+
+#include "vdb-dump-context.h"
+#include "vdb-dump-coldefs.h"
+#include "vdb-dump-str.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*************************************************************************************
+    binds together everything to dump one row:
+        - a pointer to the cursor to read the data-cells
+        - a pointer to the column-definitions (Vector of column-definition's)
+        - a pointer to the dump-context ( parameters and options for cmd-line )
+        - a dump-string (structure not pointer!) to be reused to assemble output
+        - a Vector containing p_col_data - pointers
+        - a return-type to stop if reading data failed ( neccessary to stop after
+          last row if no row-range is given at command-line )
+
+    needed as a (one and only) parameter to VectorForEach
+*************************************************************************************/
+typedef struct row_context
+{
+    const VTable* table;
+    const VCursor* cursor;
+    p_col_defs col_defs;
+    p_dump_context ctx;
+    dump_str s_col;
+    int64_t row_id;
+    uint32_t col_nr;
+    rc_t rc;
+} row_context;
+typedef row_context* p_row_context;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-dump/vdb-dump-str.c b/tools/vdb-dump/vdb-dump-str.c
new file mode 100644
index 0000000..8dac7e7
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-str.c
@@ -0,0 +1,540 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "vdb-dump-str.h"
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <klib/out.h>
+#include <klib/namelist.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <stdarg.h>
+
+rc_t vds_make( p_dump_str s, const size_t limit, const size_t inc )
+{
+    if ( s == NULL )
+    {
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcNull );
+    }
+    s->str_limit = limit;
+    s->buf_inc = inc;
+    s->buf_size = ( ( limit == 0 ) ? inc : limit+1 );
+    s->buf = malloc( s->buf_size );
+    if ( s->buf == NULL )
+    {
+        return RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+    }
+    s->str_len = 0;
+    s->buf[0] = 0;
+    s->truncated = false;
+    return 0;
+}
+
+rc_t vds_free( p_dump_str s )
+{
+    if ( s == NULL )
+    {
+        return RC( rcVDB, rcNoTarg, rcDestroying, rcParam, rcNull );
+    }
+    free( s->buf );
+    return 0;
+}
+
+rc_t vds_clear( p_dump_str s )
+{
+    if ( s == NULL )
+    {
+        return RC( rcVDB, rcNoTarg, rcDestroying, rcParam, rcNull );
+    }
+    s->buf[0]=0;
+    s->str_len = 0;
+    s->truncated = false;
+    return 0;
+}
+
+bool vds_truncated( p_dump_str s )
+{
+    if ( s == NULL ) return false;
+    return s->truncated;
+}
+
+char *vds_ptr( p_dump_str s )
+{
+    if ( s == NULL ) return NULL;
+    return s->buf;
+}
+
+
+static rc_t vds_inc_buffer( p_dump_str s, const size_t by_len )
+{
+    rc_t rc = 0;
+    if ( s == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcAllocating, rcParam, rcNull );
+    }
+    else
+    {
+        size_t needed = ( s->str_len + by_len + 1 );
+        if ( needed >= s->buf_size )
+        {
+            char * tmp;
+            size_t new_size = s->buf_size * 2;
+            
+            if ( new_size < needed ) new_size = needed + s->buf_inc;
+            tmp = realloc( s->buf, new_size );
+            if ( tmp == NULL )
+            {
+                rc = RC( rcVDB, rcNoTarg, rcAllocating, rcMemory, rcExhausted );
+            }
+            else
+            {
+                s->buf = tmp;
+                s->buf_size = new_size;
+            }
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vds_truncate( p_dump_str s, const size_t appended )
+{
+    if ( s == NULL || s->buf == NULL )
+    {
+        return RC( rcVDB, rcNoTarg, rcResizing, rcParam, rcNull );
+    }
+    s->str_len += appended;
+    if ( ( s->str_limit > 0 )&&( s->str_len > s->str_limit ) )
+    {
+        s->buf[ s->str_limit ] = 0;
+        s->str_len = s->str_limit;
+        s->truncated = true;
+    }
+    return 0;
+}
+
+
+rc_t vds_append_fmt( p_dump_str s, const size_t aprox_len, const char *fmt, ... )
+{
+    rc_t rc = 0;
+    if ( s == NULL || fmt == NULL )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcNull );
+    }
+    else if ( fmt[ 0 ] == 0 )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcEmpty );
+    }
+    else if ( ( s->str_limit > 0 )&&( s->str_len >= s->str_limit ) )
+    {
+        s->truncated = true;
+    }
+    else
+    {
+        rc = vds_inc_buffer( s, aprox_len );
+        if ( rc == 0 )
+        {
+            va_list argp;
+            size_t num_writ;
+            
+            va_start( argp, fmt );
+            rc = string_vprintf( s->buf + s->str_len, s->buf_size - 1, &num_writ, fmt, argp );
+            va_end( argp );
+            
+            if ( rc == 0 )
+                rc = vds_truncate( s, num_writ ); /* adjusts str_len */
+        }
+    }
+    return rc;
+}
+
+
+rc_t vds_append_str( p_dump_str s, const char *s1 )
+{
+    rc_t rc = 0;
+
+    if ( ( s == NULL )||( s1 == NULL ) )
+    {
+        rc = RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcNull );
+    }
+    else
+    {
+        size_t append_len = string_size( s1 );
+        if ( append_len > 0 )
+        {
+            if ( ( s->str_limit > 0 )&&( s->str_len >= s->str_limit ) )
+            {
+                s->truncated = true;
+            }
+            else
+            {
+                rc = vds_inc_buffer( s, append_len );
+                if ( rc == 0 )
+                {
+                    size_t l = s->str_len;
+                    size_t appended = string_copy( s->buf + l, s->buf_size - l, s1, append_len );
+                    rc = vds_truncate( s, appended ); /* adjusts str_len */
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+
+rc_t vds_append_str_no_limit_check( p_dump_str s, const char *s1 )
+{
+    rc_t rc;
+    size_t append_len;
+    if ( ( s == NULL )||( s1 == NULL ) )
+    {
+        return RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcNull );
+    }
+    append_len = string_size( s1 );
+    if ( append_len == 0 )
+    {
+        return RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcEmpty );
+    }
+    rc = vds_inc_buffer( s, append_len );
+    if ( rc == 0 )
+    {
+        size_t l = string_size( s->buf );
+        size_t appended = string_copy( s->buf + l, s->buf_size - l, s1, append_len );
+        s->str_len += appended;
+    }
+    return rc;
+}
+
+
+rc_t vds_rinsert( p_dump_str s, const char *s1 )
+{
+    size_t len;
+    if ( ( s == NULL )||( s1 == NULL ) )
+    {
+        return RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcNull );
+    }
+    len = string_size( s1 );
+    if ( len == 0 )
+    {
+        return RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcEmpty );
+    }
+    if ( s->str_len <= len ) return 0;
+    len = s->str_len - len;
+    string_copy( s->buf + len, sizeof( s->buf ) - len, s1, string_size( s1 ) );
+    /* s->str_len does not change */
+    return 0;
+}
+
+
+rc_t vds_indent( p_dump_str s, const size_t limit, const size_t indent )
+{
+    size_t remaining_chars, lines, indent_block, line_idx;
+    char *src, *dst;
+    rc_t rc;
+
+    if ( s == NULL )
+    {
+        return RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcNull );
+    }
+    if ( s->str_len < limit ) return 0;
+    remaining_chars = s->str_len - limit;
+    indent_block = limit - indent;
+    lines = ( remaining_chars / indent_block ) + 1;
+    /* increase the buffer by ( lines * ( indent + 1 ) ) bytes */
+    rc = vds_inc_buffer( s, lines * ( indent + 1 ) );
+    if ( rc == 0 )
+    {
+        src = s->buf + limit;
+        line_idx = 0;
+        while ( line_idx < lines )
+        {
+            dst = src + ( indent + 1 );
+            memmove( dst, src, remaining_chars );
+            *src = '\n';
+            memset( src+1, ' ', indent );
+            remaining_chars -= indent_block;
+            src += ( limit+1 );
+            line_idx++;
+        }
+        s->str_len += ( lines * ( indent + 1 ) );
+        s->buf[ s->str_len ] = 0;
+    }
+    return rc;
+}
+
+uint16_t vds_count_char( p_dump_str s, const char c )
+{
+    uint16_t res = 0;
+    char *temp = s->buf;
+    while(  *temp )
+    {
+        if ( *temp == c ) res++;
+        temp++;
+    }
+    return res;
+}
+
+void vds_escape_quotes_loop( p_dump_str s, const char to_escape,
+                             const char escape_char )
+{
+    char *temp = s->buf;
+    while(  *temp )
+    {
+        if ( *temp == to_escape )
+        {
+        size_t to_move = string_size( temp ) + 1;
+        memmove( temp+1, temp, to_move );
+        (*temp) = escape_char;
+        temp++;
+        }
+        temp++;
+    }
+    s->str_len = string_size( s->buf );
+}
+
+rc_t vds_escape( p_dump_str s, const char to_escape, const char escape_char )
+{
+    uint16_t n;
+    rc_t rc;
+
+    if ( s == NULL )
+    {
+        return RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcNull );
+    }
+    n = vds_count_char( s, to_escape );
+    rc = vds_inc_buffer( s, n + 1 );
+    if ( rc == 0 )
+    {
+        vds_escape_quotes_loop( s, to_escape, escape_char );
+    }
+    return rc;
+}
+
+rc_t vds_enclose_string( p_dump_str s, const char c_left, const char c_right )
+{
+    size_t to_move;
+    rc_t rc;
+
+    if ( s == NULL )
+    {
+        return RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcNull );
+    }
+    to_move = s->str_len + 1;
+    rc = vds_inc_buffer( s, 2 );
+    if ( rc == 0 )
+    {
+        memmove( s->buf + 1, s->buf, to_move );
+        s->buf[ 0 ] = c_left;
+        s->buf[ to_move ] = c_right;
+        s->buf[ to_move + 1 ] = 0;
+        s->str_len += 2;
+    }
+    return rc;
+}
+
+rc_t vds_2_csv( p_dump_str s )
+{
+    rc_t rc = 0;
+    bool has_comma, has_quotes;
+
+    if ( s == NULL )
+    {
+        return RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcNull );
+    }
+    has_comma = (strchr( s->buf, ',' ) != NULL );
+    has_quotes = (strchr( s->buf, '"' ) != NULL );
+    if ( has_quotes )
+    {
+        rc = vds_escape( s, '"', '"' );
+    }
+    if ( (rc == 0 )&&( ( has_quotes )||( has_comma ) ) )
+    {
+        rc = vds_enclose_string( s, '"', '"' );
+    }
+    return rc;
+}
+
+
+/* ========================================================================================= */
+static rc_t vds_add_to_sections( const char * path, uint32_t start, uint32_t len, VNamelist * sections )
+{
+    String S;
+    StringInit( &S, &( path[ start ] ), len, len );
+    return VNamelistAppendString ( sections, &S );
+}
+
+rc_t vds_path_to_sections( const char * path, char delim, VNamelist ** sections )
+{
+    rc_t rc = 0;
+    if ( path == NULL || sections == NULL )
+        rc = RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcNull );
+    else
+    {
+        rc = VNamelistMake ( sections, 5 );
+        if ( rc == 0 )
+        {
+            uint32_t idx = 0, start = 0, len = 0;
+            while( rc== 0 && path[ idx ] != 0 )
+            {
+                if ( path[ idx ] == delim )
+                {
+                    if ( len > 0 )
+                        rc = vds_add_to_sections( path, start, len, *sections );
+                    start = idx + 1;
+                    len = 0;
+                }
+                else
+                {
+                    len++;
+                }
+                idx++;
+            }
+            if ( rc == 0 && len > 0 )
+                rc = vds_add_to_sections( path, start, len, *sections );
+        }
+    }
+    return rc;
+}
+
+/* ========================================================================================= */
+
+static void clear_recorded_errors( void )
+{
+	rc_t rc;
+	const char * filename;
+	const char * funcname;
+	uint32_t line_nr;
+	while ( GetUnreadRCInfo ( &rc, &filename, &funcname, &line_nr ) )
+	{
+	}
+}
+
+static rc_t vds_read_line( const KFile * f, uint64_t * pos, size_t * len, char * buffer, size_t buflen )
+{
+	size_t num_read;
+	rc_t rc = KFileRead( f, *pos, buffer, buflen, &num_read );
+	if ( rc == 0 && num_read > 0 )
+	{
+		char * nl = string_chr ( buffer, num_read, '\n' );
+		char * cr = string_chr ( buffer, num_read, '\r' );
+		if ( nl != NULL )
+		{
+			if ( cr != NULL )
+			{
+				if ( nl < cr )
+					*len = ( nl - buffer );
+				else
+					*len = ( cr - buffer );	
+			}
+			else
+				*len = ( nl - buffer );
+		}
+		else if ( cr != NULL )
+		{
+			*len = ( cr - buffer );
+		}
+		else 
+			*len = 0;
+		*pos += ( *len + 1 );
+	}
+	return rc;
+}
+
+static rc_t vds_print_diff( const char * buffer1, const char * buffer2, size_t len1, size_t len2 )
+{
+	rc_t rc;
+	String S1, S2;
+	
+	StringInit( &S1, buffer1, len1, len1 );
+	StringInit( &S2, buffer2, len2, len2 );
+	rc = KOutMsg( "\n[A] %S\n", &S1 );
+	if ( rc == 0 )
+		rc = KOutMsg( "[B] %S\n", &S2 );
+	return rc;
+}
+
+static rc_t vds_diff_files( const KFile * f1, const KFile * f2 )
+{
+	rc_t rc;
+	char buffer1[ 2048 ];
+	char buffer2[ 2048 ];
+	uint64_t pos1 = 0;
+	uint64_t pos2 = 0;
+	size_t len1, len2;
+
+	do
+	{
+		len1 = len2 = 0;
+		rc = vds_read_line( f1, &pos1, &len1, buffer1, sizeof buffer1 );
+		if ( rc == 0 )
+			rc = vds_read_line( f2, &pos2, &len2, buffer2, sizeof buffer2 );
+		if ( rc == 0 && ( len1 > 0 || len2 > 0 ) )
+			rc = vds_print_diff( buffer1, buffer2, len1, len2 );
+		
+	} while( rc == 0 && ( len1 > 0 || len2 > 0 ) );
+	return rc;
+}
+
+
+rc_t vds_diff( const char * f1, const char * f2 )
+{
+    KDirectory * dir;
+    rc_t rc = KDirectoryNativeDir( &dir );
+    if ( rc != 0 )
+		KOutMsg( "KDirectoryNativeDir() failed\n" );
+    else
+    {
+		const KFile * kf1;
+		rc = KDirectoryOpenFileRead ( dir, &kf1, "%s", f1 );
+		if ( rc != 0 )
+			KOutMsg( "cannot open file '%s'\n", f1 );
+		else
+		{
+			const KFile * kf2;
+			rc = KDirectoryOpenFileRead ( dir, &kf2, "%s", f2 );
+			if ( rc != 0 )
+				KOutMsg( "cannot open file '%s'\n", f2 );
+			else
+			{
+				rc = vds_diff_files( kf1, kf2 );
+				KFileRelease( kf2 );
+			}
+			KFileRelease( kf1 );
+		}
+		KDirectoryRelease( dir );
+	}
+	clear_recorded_errors();
+	
+	return rc;
+}
\ No newline at end of file
diff --git a/tools/vdb-dump/vdb-dump-str.h b/tools/vdb-dump/vdb-dump-str.h
new file mode 100644
index 0000000..b157204
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-str.h
@@ -0,0 +1,100 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_dump_str_
+#define _h_vdb_dump_str_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_defs_
+#include <klib/defs.h>
+#endif
+
+#include <klib/rc.h>
+#include <klib/namelist.h>
+
+typedef struct dump_str
+{
+    char *buf;
+    size_t buf_size;
+	size_t str_len;
+	size_t str_limit;
+	size_t buf_inc;
+	bool truncated;
+} dump_str;
+typedef dump_str* p_dump_str;
+
+#define DUMP_STR_INC 512
+
+/* initializes the dump-string with limit and buffer-increment */
+rc_t vds_make( p_dump_str s, const size_t limit, const size_t inc );
+
+/* free's the dump-string's internal buffer */
+rc_t vds_free( p_dump_str s );
+
+/* the internal buffer stay's allocated, but the internal string-len
+   and the truncated-state is cleared */
+rc_t vds_clear( p_dump_str s );
+
+/* returns if the dump-string was trancated */
+bool vds_truncated( p_dump_str s );
+
+/* returns if assembled dump-string */
+char *vds_ptr( p_dump_str s );
+
+/* appends the formated string with parameters, truncates to the limit */
+rc_t vds_append_fmt( p_dump_str s, const size_t aprox_len, const char *fmt, ... );
+
+/* appends the string, truncates to the limit */
+rc_t vds_append_str( p_dump_str s, const char *s1 );
+
+/* appends the string, does not truncate */
+rc_t vds_append_str_no_limit_check( p_dump_str s, const char *s1 );
+
+/* right-inserts the string at the end of the ev. limited string */
+rc_t vds_rinsert( p_dump_str s, const char *s1 );
+
+/* indents the content of a dump-string */
+rc_t vds_indent( p_dump_str s, const size_t limit, const size_t indent );
+
+/* converts the dump-string into csv-style (quotes at begin and end if the
+   string contains a comma or other quotes, escapes quotes with quotes ) */
+rc_t vds_2_csv( p_dump_str s );
+
+rc_t vds_enclose_string( p_dump_str s, const char c_left, const char c_right );
+rc_t vds_escape( p_dump_str s, const char to_escape, const char escape_char );
+
+rc_t vds_path_to_sections( const char * path, char delim, VNamelist ** sections );
+
+rc_t vds_diff( const char * f1, const char * f2 );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-dump/vdb-dump-tools.c b/tools/vdb-dump/vdb-dump-tools.c
new file mode 100644
index 0000000..bbcee5c
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-tools.c
@@ -0,0 +1,528 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include "vdb-dump-tools.h"
+#include "vdb-dump-str.h"
+
+#include <vdb/schema.h>
+#include <klib/printf.h>
+#include <klib/rc.h>
+#include <klib/pack.h>
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <bitstr.h>
+
+#include <klib/rc.h>
+#include <klib/log.h>
+#define DISP_RC(rc,err) if( rc != 0 ) LOGERR( klogInt, rc, err );
+
+#define BYTE_OFFSET(VALUE)  ( (VALUE) >> 3 )
+#define BIT_OFFSET(VALUE)   ( (VALUE) & 0x7 )
+
+uint8_t BitLength2Bytes[65] =
+{
+         /* 0  1  2  3  4  5  6  7  8  9*/
+   /* 0 */  0, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+   /* 1 */  2, 2, 2, 2, 2, 2, 2, 3, 3, 3,
+   /* 2 */  3, 3, 3, 3, 3, 4, 4, 4, 4, 4,
+   /* 3 */  4, 4, 4, 5, 5, 5, 5, 5, 5, 5,
+   /* 4 */  5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
+   /* 5 */  7, 7, 7, 7, 7, 7, 7, 8, 8, 8,
+   /* 6 */  8, 8, 8, 8, 8
+};
+
+/*************************************************************************************
+n_bits   [IN] ... number of bits
+
+calculates the number of bytes that have to be copied to contain the given
+number of bits
+*************************************************************************************/
+static uint16_t vdt_bitlength_2_bytes( const size_t n_bits )
+{
+    if ( n_bits > 64 )
+        return 8;
+    else
+        return BitLength2Bytes[ n_bits ];
+}
+
+uint64_t BitLength2Mask[33] =
+{
+   /* 0 */ 0x00,
+   /* 1 ..  4 */  0x1,                0x3,                0x7,                0xF,
+   /* 5 ..  8 */  0x1F,               0x3F,               0x7F,               0xFF,
+   /* 9 .. 12 */  0x1FF,              0x3FF,              0x7FF,              0xFFF,
+   /*13 .. 16 */  0x1FFF,             0x3FFF,             0x7FFF,             0xFFFF,
+   /*17 .. 20 */  0x1FFFF,            0x3FFFF,            0x7FFFF,            0xFFFFF,
+   /*21 .. 24 */  0x1FFFFF,           0x3FFFFF,           0x7FFFFF,           0xFFFFFF,
+   /*25 .. 28 */  0x1FFFFFF,          0x3FFFFFF,          0x7FFFFFF,          0xFFFFFFF,
+   /*29 .. 32 */  0x1FFFFFFF,         0x3FFFFFFF,         0x7FFFFFFF,         0xFFFFFFFF
+ };
+
+/*************************************************************************************
+n_bits   [IN] ... number of bits
+
+creates a bitmask to mask exactly the given number of bits from a longer value
+*************************************************************************************/
+static uint64_t vdt_bitlength_2_mask( const size_t n_bits )
+{
+    uint64_t res;
+    if ( n_bits < 33 )
+        res = BitLength2Mask[ n_bits ];
+    else
+    {
+        if ( n_bits < 65 )
+            res = BitLength2Mask[ n_bits-32 ];
+        else
+            res = 0xFFFFFFFF;
+        res <<= 32;
+        res |= 0xFFFFFFFF;
+    }
+    return res;
+}
+
+
+static rc_t vdb_dump_txt_ascii( p_dump_str s, const p_dump_src src,
+                                const p_col_def def )
+{
+    char *src_ptr = (char*)src->buf + BYTE_OFFSET( src->offset_in_bits );
+    return vds_append_fmt( s, src->number_of_elements,
+                           "%.*s", src->number_of_elements, src_ptr );
+
+}
+
+
+static rc_t vdb_dump_hex_char( char * temp, uint32_t * idx, const uint8_t c )
+{
+    char s[ 8 ];
+    size_t num_writ;
+    rc_t rc = string_printf ( s, sizeof s, &num_writ, "%X ", c );
+    if ( rc == 0 )
+    {
+        size_t i;
+        for ( i = 0; i < num_writ; ++i )
+            temp[ (*idx)++ ] = s[ i ];
+    }
+    return rc;
+}
+
+
+static rc_t vdb_dump_hex_ascii( p_dump_str s, const p_dump_src src,
+                                const p_col_def def )
+{
+    rc_t rc = 0;
+    char *src_ptr = (char*)src->buf + BYTE_OFFSET( src->offset_in_bits );
+    char *tmp = malloc( src->number_of_elements * 4 );
+    if ( tmp != NULL )
+    {
+        uint32_t i, dst = 0;
+        for ( i = 0; i < src->number_of_elements && rc == 0; ++i )
+            rc = vdb_dump_hex_char( tmp, &dst, src_ptr[ i ] );
+        src_ptr[ dst ] = 0;
+        if ( rc == 0 )
+            rc = vds_append_fmt( s, dst, "%.*s", dst, tmp );
+        free( tmp );
+    }
+    else
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+    return rc;
+}
+
+/*************************************************************************************
+src         [IN] ... buffer containing the data
+dpo         [IN] ... pointer to buffer-offset (bit-offset-part will be ignored)
+
+dumps an ascii-string
+*************************************************************************************/
+static rc_t vdt_dump_ascii( p_dump_str s, const p_dump_src src,
+                            const p_col_def def )
+{
+    rc_t rc;
+    if ( src->in_hex )
+        rc = vdb_dump_hex_ascii( s, src, def );
+    else
+        rc = vdb_dump_txt_ascii( s, src, def );
+    DISP_RC( rc, "dump_str_append_fmt() failed" )
+    if ( rc == 0 )
+    {
+        src->element_idx+=src->number_of_elements;
+        src->offset_in_bits += ( def->type_desc.intrinsic_bits * src->number_of_elements );
+    }
+    return rc;
+}
+
+/*************************************************************************************
+src         [IN] ... buffer containing the data
+dpo         [IN] ... pointer to buffer-offset (bit-offset-part will be ignored)
+
+dumps an ascii-string
+*************************************************************************************/
+static rc_t vdt_dump_unicode( p_dump_str s, const p_dump_src src,
+                              const p_col_def def )
+{
+    rc_t rc;
+    if ( src->in_hex )
+        rc = vdb_dump_hex_ascii( s, src, def );
+    else
+        rc = vdb_dump_txt_ascii( s, src, def );
+    DISP_RC( rc, "dump_str_append_fmt() failed" )
+    if ( rc == 0 )
+    {
+        src->element_idx+=src->number_of_elements;
+        src->offset_in_bits += ( def->type_desc.intrinsic_bits * src->number_of_elements );
+    }
+    return rc;
+}
+
+void vdt_move_to_value( void* dst, const p_dump_src src, const uint32_t n_bits )
+{
+    char *src_ptr = (char*)src->buf + BYTE_OFFSET(src->offset_in_bits);
+    if ( BIT_OFFSET(src->offset_in_bits) == 0 )
+    {
+        memmove( dst, src_ptr, vdt_bitlength_2_bytes( n_bits ) );
+    }
+    else
+    {
+        bitcpy ( dst, 0, src_ptr, BIT_OFFSET(src->offset_in_bits), n_bits );
+    }
+}
+
+static uint64_t vdt_move_to_uint64( const p_dump_src src, const uint32_t n_bits )
+{
+    uint64_t value = 0;
+    vdt_move_to_value( &value, src, n_bits );
+    if ( n_bits & 7 )
+    {
+        size_t unpacked = 0;
+        Unpack( n_bits, sizeof( value ), &value, 0, n_bits,
+                NULL, &value, sizeof(value), &unpacked );
+    }
+    value &= vdt_bitlength_2_mask( n_bits );
+    src->offset_in_bits += n_bits;
+    return value;
+}
+
+/*************************************************************************************
+src         [IN] ... buffer containing the data
+my_col_def  [IN] ... the definition of the column to be dumped
+
+dumps boolean values (up to 64 bits)
+*************************************************************************************/
+static rc_t vdt_dump_boolean_element( p_dump_str s, const p_dump_src src,
+                                      const p_col_def def )
+{
+    rc_t rc;
+    uint64_t value = vdt_move_to_uint64( src, def->type_desc.intrinsic_bits );
+    switch( src->c_boolean )
+    {
+    case '1' :  if ( value == 0 )
+                    rc = vds_append_str( s, "0" );
+                else
+                    rc = vds_append_str( s, "1" );
+                break;
+    case 'T' :  if ( value == 0 )
+                    rc = vds_append_str( s, "F" );
+                else
+                    rc = vds_append_str( s, "T" );
+                break;
+
+    default  :  if ( value == 0 )
+                    rc = vds_append_str( s, "false" );
+                else
+                    rc = vds_append_str( s, "true" );
+                break;
+    }
+    DISP_RC( rc, "dump_str_append_str() failed" )
+    return rc;
+}
+
+#define MAX_CHARS_FOR_HEX_UINT64 20
+#define MAX_CHARS_FOR_DEC_UINT64 22
+
+/*************************************************************************************
+src         [IN] ... buffer containing the data
+my_col_def  [IN] ... the definition of the column to be dumped
+
+unsigned int's up to a length of 64 bit are supported
+unused bits are masked out
+*************************************************************************************/
+static rc_t vdt_dump_uint_element( p_dump_str s, const p_dump_src src,
+                                   const p_col_def def )
+{
+    rc_t rc = 0;
+    uint64_t value = vdt_move_to_uint64( src, def->type_desc.intrinsic_bits );
+    if ( ( src->without_sra_types == false )&&( def->value_trans_fct != NULL ) )
+    {
+        const char *txt = def->value_trans_fct( (uint32_t)value );
+        rc = vds_append_str( s, txt );
+        DISP_RC( rc, "dump_str_append_str() failed" )
+    }
+    else
+    {
+        if ( src->in_hex )
+            rc = vds_append_fmt( s, MAX_CHARS_FOR_HEX_UINT64, "0x%lX", value );
+        else
+            rc = vds_append_fmt( s, MAX_CHARS_FOR_DEC_UINT64, "%lu", value );
+        DISP_RC( rc, "dump_str_append_fmt() failed" )
+    }
+    return rc;
+}
+
+/*************************************************************************************
+src         [IN] ... buffer containing the data
+my_col_def  [IN] ... the definition of the column to be dumped
+
+signed int's up to a length of 64 bit are supported
+unused bits are masked out
+*************************************************************************************/
+static rc_t vdt_dump_int_element( p_dump_str s, const p_dump_src src,
+                                  const p_col_def def )
+{
+    rc_t rc = 0;
+    int64_t value = (int64_t)vdt_move_to_uint64( src, def->type_desc.intrinsic_bits );
+    if ( ( src->without_sra_types == false )&&( def->value_trans_fct != NULL ) )
+    {
+        const char *txt = def->value_trans_fct( (uint32_t)value );
+        rc = vds_append_str( s, txt );
+        DISP_RC( rc, "dump_str_append_str() failed" )
+    }
+    else
+    {
+        switch ( def->type_desc.intrinsic_bits )
+        {
+            case  8 : { int8_t temp = (int8_t)value;
+                        value = temp; }
+                      break;
+            case 16 : { int16_t temp = (int16_t)value;
+                        value = temp; }
+                      break;
+            case 32 : { int32_t temp = (int32_t)value;
+                        value = temp; }
+                      break;
+        }
+
+        if ( src->in_hex )
+            rc = vds_append_fmt( s, MAX_CHARS_FOR_HEX_UINT64, "0x%lX", value );
+        else
+            rc = vds_append_fmt( s, MAX_CHARS_FOR_DEC_UINT64, "%ld", value );
+        DISP_RC( rc, "dump_str_append_fmt() failed" )
+    }
+    return rc;
+}
+
+#define MAX_CHARS_FOR_DOUBLE 26
+#define BITSIZE_OF_FLOAT ( sizeof(float) * 8 )
+#define BITSIZE_OF_DOUBLE ( sizeof(double) * 8 )
+
+/*************************************************************************************
+src         [IN] ... buffer containing the data
+my_col_def  [IN] ... the definition of the column to be dumped
+
+only 2 float-types: "float"(32 bit) and "double"(64 bit) are supported
+*************************************************************************************/
+static rc_t vdt_dump_float_element( p_dump_str s, const p_dump_src src,
+                                    const p_col_def def )
+{
+    rc_t rc;
+    if ( src->in_hex )
+        rc = vdt_dump_int_element( s, src, def );
+    else
+    {
+        if ( def->type_desc.intrinsic_bits == BITSIZE_OF_FLOAT )
+        {
+            float value;
+            vdt_move_to_value( &value, src, def->type_desc.intrinsic_bits );
+            rc = vds_append_fmt( s, MAX_CHARS_FOR_DOUBLE, "%e", value );
+            DISP_RC( rc, "dump_str_append_fmt() failed" )
+        }
+        else if ( def->type_desc.intrinsic_bits == BITSIZE_OF_DOUBLE )
+        {
+            double value;
+            vdt_move_to_value( &value, src, def->type_desc.intrinsic_bits );
+            rc = vds_append_fmt( s, MAX_CHARS_FOR_DOUBLE, "%e", value );
+            DISP_RC( rc, "dump_str_append_fmt() failed" )
+        }
+        else
+        {
+            rc = vds_append_str( s, "unknown float-type" );
+            DISP_RC( rc, "dump_str_append_str() failed" )
+        }
+        src->offset_in_bits += def->type_desc.intrinsic_bits;
+    }
+    return rc;
+}
+
+
+char dna_chars[4] = { 'A', 'C', 'G', 'T' };
+
+/* special function to translate dim=2,bits=1 into a DNA-base */
+static rc_t vdt_dump_base_element( p_dump_str s,
+                                   const p_dump_src src,
+                                   const p_col_def def )
+{
+    /* do not replace this with value2=value1, because move_to_uint64
+       increments the src-bit-counter !*/
+    uint64_t value1 = vdt_move_to_uint64( src, def->type_desc.intrinsic_bits );
+    uint64_t value2 = vdt_move_to_uint64( src, def->type_desc.intrinsic_bits );
+    rc_t rc;
+    value1 <<= 1;
+    value1 |= value2;
+    rc = vds_append_fmt( s, 1, "%c", dna_chars[ value1 & 0x03 ] );
+    DISP_RC( rc, "dump_str_append_fmt() failed" )
+    return rc;
+}
+
+
+typedef rc_t(*vdt_dump_fkt_t)( p_dump_str s,
+                               const p_dump_src src,
+                               const p_col_def def );
+
+/* !!!!!!!! this depends on how domains are defined in "schema.h" */
+vdt_dump_fkt_t vdt_DomainDispatch[] =
+{
+    vdt_dump_boolean_element,
+    vdt_dump_uint_element,
+    vdt_dump_int_element,
+    vdt_dump_float_element,
+    vdt_dump_ascii,
+    vdt_dump_unicode
+};
+
+rc_t vdt_dump_dim_trans( const p_dump_src src, const p_col_def def,
+                         const int dimension )
+{
+    rc_t rc = 0;
+    char *s;
+    uint8_t *sbuf = (uint8_t *)src->buf;
+    sbuf+=( src->offset_in_bits >> 3 );
+    s = def->dim_trans_fct( sbuf );
+    src->offset_in_bits += ( def->type_desc.intrinsic_bits * dimension );
+    rc = vds_append_str( &(def->content), s );
+    DISP_RC( rc, "dump_str_append_str() failed" )
+    /* we have to free, because dim_trans_fct()
+       makes the string dynamically */
+    free( s );
+    return rc;
+}
+
+rc_t vdt_dump_dim( const p_dump_src src, const p_col_def def,
+                   const int dimension, const int selection )
+{
+    rc_t rc = 0;
+    int i = 0;
+    bool print_comma = true;
+
+    if ( selection == 0 ) /* cell-type == boolean */
+    {
+        /* if long form "false" or "true" separate elements by comma */
+        print_comma = ( src->c_boolean == 0 );
+    }
+
+    while ( ( i < dimension )&&( rc == 0 ) )
+    {
+        /* selection 0 ... boolean */
+        if ( print_comma && ( i > 0 ) )
+        {
+            rc = vds_append_str( &(def->content), ", " );
+            DISP_RC( rc, "dump_str_append_str() failed" )
+        }
+        if ( rc == 0 )
+        {
+            rc = vdt_DomainDispatch[ selection ]( &(def->content), src, def );
+            DISP_RC( rc, "DomainDispatch[]() failed" )
+        }
+        i++;
+    }
+    return rc;
+}
+
+/*************************************************************************************
+src         [IN] ... buffer containing the data
+my_col_def  [IN] ... the definition of the column to be dumped
+
+dumps one data-element (or a vector of it)
+*************************************************************************************/
+rc_t vdt_dump_element( const p_dump_src src, const p_col_def def, bool bracket )
+{
+    int dimension, selection;
+    rc_t rc = 0;
+
+    if ( ( src == NULL )||( def == NULL ) )
+    {
+        return RC( rcVDB, rcNoTarg, rcInserting, rcParam, rcNull );
+    }
+    dimension   = def->type_desc.intrinsic_dim;
+    selection   = def->type_desc.domain - 1;
+
+    if ( dimension == 1 )
+    {
+        /* we have only 1 dimension ---> just print this value */
+        rc = vdt_DomainDispatch[ selection ]( &(def->content), src, def );
+        DISP_RC( rc, "DomainDispatch[]() failed" )
+    }
+    else
+    {
+        /* we have more than 1 dimension ---> repeat printing value's */
+        if ( src->print_dna_bases )
+        {
+            rc = vdt_dump_base_element( &(def->content), src, def );
+        }
+        else
+        {
+            bool trans = ( ( src->without_sra_types == false )&&
+                           ( def->dim_trans_fct ) );
+            bool paren = ( ( src->number_of_elements > 1 )||( !trans ) );
+
+            if ( paren )
+            {
+                rc = vds_append_str( &(def->content), bracket ? "[" : "{" );
+                
+                DISP_RC( rc, "dump_str_append_str() failed" )
+            }
+
+            if ( rc == 0 )
+            {
+                if ( trans )
+                    rc = vdt_dump_dim_trans( src, def, dimension );
+                else
+                {
+                    rc = vdt_dump_dim( src, def, dimension, selection );
+                }
+            }
+
+            if ( paren && ( rc == 0 ) )
+            {
+                rc = vds_append_str( &(def->content), bracket ? "]" : "}" );
+                DISP_RC( rc, "dump_str_append_str() failed" )
+            }
+        }
+    }
+    src->element_idx++;
+    return rc;
+}
diff --git a/tools/vdb-dump/vdb-dump-tools.h b/tools/vdb-dump/vdb-dump-tools.h
new file mode 100644
index 0000000..d8b7ac7
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump-tools.h
@@ -0,0 +1,60 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_dump_tools_
+#define _h_vdb_dump_tools_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _h_klib_defs_
+#include <klib/defs.h>
+#endif
+
+#include "vdb-dump-coldefs.h"
+#include "vdb-dump-str.h"
+
+typedef struct dump_src
+{
+    const void *buf;
+    uint32_t offset_in_bits;
+    uint32_t element_idx;
+    uint32_t number_of_elements;
+    bool in_hex;
+    bool print_dna_bases;
+    bool without_sra_types;
+    char c_boolean;
+} dump_src;
+typedef dump_src* p_dump_src;
+
+rc_t vdt_dump_element( const p_dump_src src, const p_col_def def, bool bracket );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-dump/vdb-dump.c b/tools/vdb-dump/vdb-dump.c
new file mode 100644
index 0000000..8324c38
--- /dev/null
+++ b/tools/vdb-dump/vdb-dump.c
@@ -0,0 +1,2335 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <vdb/database.h>
+#include <vdb/dependencies.h>
+#include <vdb/vdb-priv.h>
+
+#include <kdb/table.h>
+#include <kdb/column.h>
+#include <kdb/manager.h>
+#include <kdb/namelist.h>
+#include <kdb/meta.h>
+
+#include <kfs/directory.h>
+#include <kns/manager.h>
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <kapp/args-conv.h>
+
+#include <klib/container.h>
+#include <klib/vector.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/debug.h>
+#include <klib/status.h>
+#include <klib/text.h>
+#include <klib/printf.h>
+#include <klib/rc.h>
+#include <klib/namelist.h>
+#include <klib/time.h>
+#include <klib/num-gen.h>
+
+#include <os-native.h>
+#include <sysalloc.h>
+
+#include <stdlib.h>
+#include <bitstr.h>
+
+#include "vdb-dump-context.h"
+#include "vdb-dump-coldefs.h"
+#include "vdb-dump-tools.h"
+#include "vdb-dump-helper.h"
+#include "vdb-dump-row-context.h"
+#include "vdb-dump-formats.h"
+#include "vdb-dump-fastq.h"
+#include "vdb-dump-redir.h"
+#include "vdb-dump-bin.h"
+#include "vdb-dump-interact.h"
+#include "vdb_info.h"
+
+static const char * row_id_on_usage[]           = { "print row id",                                 NULL };
+static const char * line_feed_usage[]           = { "line-feed's inbetween rows",                   NULL };
+static const char * colname_off_usage[]         = { "do not print column-names",                    NULL };
+static const char * in_hex_usage[]              = { "print numbers in hex",                         NULL };
+static const char * table_usage[]               = { "table-name",                                   NULL };
+static const char * rows_usage[]                = { "rows (default = all)",                         NULL };
+static const char * columns_usage[]             = { "columns (default = all)",                      NULL };
+static const char * schema_usage[]              = { "schema-name",                                  NULL };
+static const char * schema_dump_usage[]         = { "dumps the schema",                             NULL };
+static const char * table_enum_usage[]          = { "enumerates tables",                            NULL };
+static const char * column_enum_usage[]         = { "enumerates columns in extended form",          NULL };
+static const char * column_short_usage[]        = { "enumerates columns in short form",             NULL };
+static const char * dna_bases_usage[]           = { "print dna-bases",                              NULL };
+static const char * max_line_len_usage[]        = { "limits line length",                           NULL };
+static const char * line_indent_usage[]         = { "indents the line",                             NULL };
+static const char * filter_usage[]              = { "filters lines",                                NULL };
+static const char * format_usage[]              = { "output format:",                               NULL };
+static const char * id_range_usage[]            = { "prints id-range",                              NULL };
+static const char * without_sra_usage[]         = { "without sra-type-translation",                 NULL };
+static const char * excluded_columns_usage[]    = { "exclude these columns",                        NULL };
+static const char * boolean_usage[]             = { "defines how boolean's are printed (1,T)",      NULL };
+static const char * objver_usage[]              = { "request vdb-version",                          NULL };
+static const char * objts_usage[]               = { "request object modification date",             NULL };
+static const char * numelem_usage[]             = { "print only element-count",                     NULL };
+static const char * numelemsum_usage[]          = { "sum element-count",                            NULL };
+static const char * show_blobbing_usage[]       = { "show blobbing",                                NULL };
+static const char * enum_phys_usage[]           = { "enumerate physical columns",                   NULL };
+static const char * enum_readable_usage[]       = { "enumerate readable columns",                   NULL };
+static const char * objtype_usage[]             = { "report type of object",                        NULL };
+static const char * idx_enum_usage[]            = { "enumerate all available index",                NULL };
+static const char * idx_range_usage[]           = { "enumerate values and row-ranges of one index", NULL };
+static const char * cur_cache_usage[]           = { "size of cursor cache",                         NULL };
+static const char * out_file_usage[]            = { "write output to this file",                    NULL };
+static const char * out_path_usage[]            = { "write output to this directory",               NULL };
+static const char * gzip_usage[]                = { "compress output using gzip",                   NULL };
+static const char * bzip2_usage[]               = { "compress output using bzip2",                  NULL };
+static const char * outbuf_size_usage[]         = { "size of output-buffer, 0...none",              NULL };
+static const char * disable_mt_usage[]          = { "disable multithreading",                       NULL };
+static const char * info_usage[]                = { "print info about run",                         NULL };
+static const char * spotgroup_usage[]           = { "show spotgroups",                              NULL };
+static const char * merge_ranges_usage[]        = { "merge and sort row-ranges",                    NULL };
+static const char * spread_usage[]              = { "show spread of integer values",                NULL };
+static const char * slice_usage[]               = { "find a slice of given depth",                  NULL };
+static const char * interactive_usage[]         = { "interactive mode",                             NULL };
+
+OptDef DumpOptions[] =
+{
+    { OPTION_ROW_ID_ON,             ALIAS_ROW_ID_ON,          NULL, row_id_on_usage,         1, false,  false },
+    { OPTION_LINE_FEED,             ALIAS_LINE_FEED,          NULL, line_feed_usage,         1, true,   false },
+    { OPTION_COLNAME_OFF,           ALIAS_COLNAME_OFF,        NULL, colname_off_usage,       1, false,  false },
+    { OPTION_IN_HEX,                ALIAS_IN_HEX,             NULL, in_hex_usage,            1, false,  false },
+    { OPTION_TABLE,                 ALIAS_TABLE,              NULL, table_usage,             1, true,   false },
+    { OPTION_ROWS,                  ALIAS_ROWS,               NULL, rows_usage,              1, true,   false },
+    { OPTION_COLUMNS,               ALIAS_COLUMNS,            NULL, columns_usage,           1, true,   false },
+    { OPTION_SCHEMA,                ALIAS_SCHEMA,             NULL, schema_usage,            5, true,   false },
+    { OPTION_SCHEMA_DUMP,           ALIAS_SCHEMA_DUMP,        NULL, schema_dump_usage,       1, false,  false },
+    { OPTION_TABLE_ENUM,            ALIAS_TABLE_ENUM,         NULL, table_enum_usage,        1, false,  false },
+    { OPTION_COLUMN_ENUM,           ALIAS_COLUMN_ENUM,        NULL, column_enum_usage,       1, false,  false },
+    { OPTION_COLUMN_SHORT,          ALIAS_COLUMN_SHORT,       NULL, column_short_usage,      1, false,  false },
+    { OPTION_DNA_BASES,             ALIAS_DNA_BASES,          NULL, dna_bases_usage,         1, false,  false },
+    { OPTION_MAX_LINE_LEN,          ALIAS_MAX_LINE_LEN,       NULL, max_line_len_usage,      1, true,   false },
+    { OPTION_LINE_INDENT,           ALIAS_LINE_INDENT,        NULL, line_indent_usage,       1, true,   false },
+    { OPTION_FILTER,                ALIAS_FILTER,             NULL, filter_usage,            1, true,   false },
+    { OPTION_FORMAT,                ALIAS_FORMAT,             NULL, format_usage,            1, true,   false },
+    { OPTION_ID_RANGE,              ALIAS_ID_RANGE,           NULL, id_range_usage,          1, false,  false },
+    { OPTION_WITHOUT_SRA,           ALIAS_WITHOUT_SRA,        NULL, without_sra_usage,       1, false,  false },
+    { OPTION_EXCLUDED_COLUMNS,      ALIAS_EXCLUDED_COLUMNS,   NULL, excluded_columns_usage,  1, true,   false },
+    { OPTION_BOOLEAN,               ALIAS_BOOLEAN,            NULL, boolean_usage,           1, true,   false },
+    { OPTION_NUMELEM,               ALIAS_NUMELEM,            NULL, numelem_usage,           1, false,  false },
+    { OPTION_NUMELEMSUM,            ALIAS_NUMELEMSUM,         NULL, numelemsum_usage,        1, false,  false },
+    { OPTION_SHOW_BLOBBING,         NULL,                     NULL, show_blobbing_usage,     1, false,  false },
+    { OPTION_ENUM_PHYS,             NULL,                     NULL, enum_phys_usage,         1, false,  false },
+    { OPTION_ENUM_READABLE,         NULL,                     NULL, enum_readable_usage,     1, false,  false },
+    { OPTION_OBJVER,                ALIAS_OBJVER,             NULL, objver_usage,            1, false,  false },
+    { OPTION_OBJTS,                 NULL,                     NULL, objts_usage,             1, false,  false },
+    { OPTION_OBJTYPE,               ALIAS_OBJTYPE,            NULL, objtype_usage,           1, false,  false },
+    { OPTION_IDX_ENUM,              NULL,                     NULL, idx_enum_usage,          1, false,  false },
+    { OPTION_IDX_RANGE,             NULL,                     NULL, idx_range_usage,         1, true,   false },
+    { OPTION_CUR_CACHE,             NULL,                     NULL, cur_cache_usage,         1, true,   false },
+    { OPTION_OUT_FILE,              NULL,                     NULL, out_file_usage,          1, true,   false },
+    { OPTION_OUT_PATH,              NULL,                     NULL, out_path_usage,          1, true,   false },
+    { OPTION_PHASE,                 NULL,                     NULL, NULL,                   1, true,   false },
+    { OPTION_GZIP,                  NULL,                     NULL, gzip_usage,              1, false,  false },
+    { OPTION_BZIP2,                 NULL,                     NULL, bzip2_usage,             1, false,  false },
+    { OPTION_OUT_BUF_SIZE,          NULL,                     NULL, outbuf_size_usage,       1, true,   false },
+    { OPTION_NO_MULTITHREAD,        NULL,                     NULL, disable_mt_usage,        1, false,  false },
+    { OPTION_INFO,                  NULL,                     NULL, info_usage,              1, false,  false },
+    { OPTION_DIFF,                  NULL,                     NULL, NULL,                   1, false,  false },
+    { OPTION_SPOTGROUPS,            NULL,                     NULL, spotgroup_usage,         1, false,  false },
+    { OPTION_MERGE_RANGES,          NULL,                     NULL, merge_ranges_usage,      1, false,  false },
+    { OPTION_SPREAD,                NULL,                     NULL, spread_usage,            1, false,  false },
+    { OPTION_INTERACTIVE,           NULL,                     NULL, interactive_usage,       1, false,  false },    
+    { OPTION_SLICE,                 NULL,                     NULL, slice_usage,             1, true,   false }
+};
+
+const char UsageDefaultName[] = "vdb-dump";
+
+
+rc_t CC UsageSummary ( const char * progname )
+{
+    return KOutMsg ("\n"
+                    "Usage:\n"
+                    "  %s <path> [<path> ...] [options]\n"
+                    "\n", progname);
+}
+
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if ( args == NULL )
+        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
+    else
+        rc = ArgsProgram ( args, &fullpath, &progname );
+
+    if ( rc )
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary ( progname );
+
+    KOutMsg ( "Options:\n" );
+
+    HelpOptionLine ( ALIAS_ROW_ID_ON,           OPTION_ROW_ID_ON,       NULL,           row_id_on_usage );
+    HelpOptionLine ( ALIAS_LINE_FEED,           OPTION_LINE_FEED,       "line_feed",    line_feed_usage );
+    HelpOptionLine ( ALIAS_COLNAME_OFF,         OPTION_COLNAME_OFF,     NULL,           colname_off_usage );
+    HelpOptionLine ( ALIAS_IN_HEX,              OPTION_IN_HEX,          NULL,           in_hex_usage );
+    HelpOptionLine ( ALIAS_TABLE,               OPTION_TABLE,           "table",        table_usage );
+    HelpOptionLine ( ALIAS_ROWS,                OPTION_ROWS,            "rows",         rows_usage );
+    HelpOptionLine ( ALIAS_COLUMNS,             OPTION_COLUMNS,         "columns",      columns_usage );
+    HelpOptionLine ( ALIAS_SCHEMA,              OPTION_SCHEMA,          "schema",       schema_usage );
+    HelpOptionLine ( ALIAS_SCHEMA_DUMP,         OPTION_SCHEMA_DUMP,     NULL,           schema_dump_usage );
+    HelpOptionLine ( ALIAS_TABLE_ENUM,          OPTION_TABLE_ENUM,      NULL,           table_enum_usage );
+    HelpOptionLine ( ALIAS_COLUMN_ENUM,         OPTION_COLUMN_ENUM,     NULL,           column_enum_usage );
+    HelpOptionLine ( ALIAS_COLUMN_SHORT,        OPTION_COLUMN_SHORT,    NULL,           column_short_usage );
+    HelpOptionLine ( ALIAS_DNA_BASES,           OPTION_DNA_BASES,       "dna_bases",    dna_bases_usage );
+    HelpOptionLine ( ALIAS_MAX_LINE_LEN,        OPTION_MAX_LINE_LEN,    "max_length",   max_line_len_usage );
+    HelpOptionLine ( ALIAS_LINE_INDENT,         OPTION_LINE_INDENT,     "indent_width", line_indent_usage );
+    HelpOptionLine ( ALIAS_FORMAT,              OPTION_FORMAT,          "format",       format_usage );
+    
+    KOutMsg( "      csv ..... comma separated values on one line\n" );
+    KOutMsg( "      xml ..... xml-style without complete xml-frame\n" );
+    KOutMsg( "      json .... json-style\n" );
+    KOutMsg( "      piped ... 1 line per cell: row-id, column-name: value\n" );
+    KOutMsg( "      tab ..... 1 line per row: tab-separated values only\n" );
+    KOutMsg( "      fastq ... FASTQ( 4 lines ) for each row\n" );
+    KOutMsg( "      fastq1 .. FASTQ( 4 lines ) for each fragment\n" );    
+    KOutMsg( "      fasta ... FASTA( 2 lines ) for each fragment if possible\n" );
+    KOutMsg( "      fasta1 .. one FASTA-record for the whole accession (REFSEQ)\n" );
+    KOutMsg( "      fasta2 .. one FASTA-record for each REFERENCE in cSRA\n" );
+    KOutMsg( "      qual .... QUAL( 2 lines ) for each row\n" );    
+    KOutMsg( "      qual1 ... QUAL( 2 lines ) for each fragment if possible\n\n" );
+    
+    HelpOptionLine ( ALIAS_ID_RANGE,            OPTION_ID_RANGE,        NULL,           id_range_usage );
+    HelpOptionLine ( ALIAS_WITHOUT_SRA,         OPTION_WITHOUT_SRA,     NULL,           without_sra_usage );
+    HelpOptionLine ( ALIAS_EXCLUDED_COLUMNS,    OPTION_EXCLUDED_COLUMNS,NULL,           excluded_columns_usage );
+    HelpOptionLine ( ALIAS_BOOLEAN,             OPTION_BOOLEAN,         NULL,           boolean_usage );
+    HelpOptionLine ( ALIAS_OBJVER,              OPTION_OBJVER,          NULL,           objver_usage );
+    HelpOptionLine ( NULL,                      OPTION_OBJTS,           NULL,           objts_usage );
+    HelpOptionLine ( ALIAS_OBJTYPE,             OPTION_OBJTYPE,         NULL,           objtype_usage );
+    HelpOptionLine ( ALIAS_NUMELEM,             OPTION_NUMELEM,         NULL,           numelem_usage );
+    HelpOptionLine ( ALIAS_NUMELEMSUM,          OPTION_NUMELEMSUM,      NULL,           numelemsum_usage );
+    HelpOptionLine ( NULL,                      OPTION_SHOW_BLOBBING,   NULL,           show_blobbing_usage );
+    HelpOptionLine ( NULL,                      OPTION_ENUM_PHYS,       NULL,           enum_phys_usage );
+    HelpOptionLine ( NULL,                      OPTION_ENUM_READABLE,   NULL,           enum_readable_usage );
+    HelpOptionLine ( NULL,                      OPTION_IDX_ENUM,        NULL,           idx_enum_usage );    
+    HelpOptionLine ( NULL,                      OPTION_IDX_RANGE,       NULL,           idx_range_usage );    
+    HelpOptionLine ( NULL,                      OPTION_CUR_CACHE,       NULL,           cur_cache_usage );    
+    HelpOptionLine ( NULL,                      OPTION_OUT_FILE,        NULL,           out_file_usage );
+    HelpOptionLine ( NULL,                      OPTION_OUT_PATH,        NULL,           out_path_usage );
+    HelpOptionLine ( NULL,                      OPTION_GZIP,            NULL,           gzip_usage );
+    HelpOptionLine ( NULL,                      OPTION_BZIP2,           NULL,           bzip2_usage );
+    HelpOptionLine ( NULL,                      OPTION_OUT_BUF_SIZE,    NULL,           outbuf_size_usage );
+    HelpOptionLine ( NULL,                      OPTION_NO_MULTITHREAD,  NULL,           disable_mt_usage );
+    HelpOptionLine ( NULL,                      OPTION_INFO,            NULL,           info_usage );
+    HelpOptionLine ( NULL,                      OPTION_SPOTGROUPS,      NULL,           spotgroup_usage );
+    HelpOptionLine ( NULL,                      OPTION_MERGE_RANGES,    NULL,           merge_ranges_usage );
+    HelpOptionLine ( NULL,                      OPTION_SPREAD,          NULL,           spread_usage );
+    
+    HelpOptionsStandard ();
+
+    HelpVersion ( fullpath, KAppVersion() );
+
+    return rc;
+}
+
+/*************************************************************************************
+    read_cell_data_and_dump:
+    * called by "dump_rows()" via VectorForEach() for every column in a row
+    * extracts the column-definition from the item, the row-context from the data-ptr
+    * clears the column-text-buffer (part of the column-data-struct)
+    * reads the cell-data from the cursor
+    * eventually detects a unknown data-type
+    * detects if this column has a dna-format ( special treatment for printing )
+    * loops throuh the elements of a cell
+        - calls "dump_element()" for every element (from vdb-dump-tools.c)
+
+item    [IN] ... pointer to col-data ( definition and buffer )
+data    [IN] ... pointer to row-context( cursor, dump_context, col_defs ... )
+*************************************************************************************/
+static void CC vdm_read_cell_data( void *item, void *data )
+{
+    dump_src src; /* defined in vdb-dump-tools.h */
+    p_col_def my_col_def = (p_col_def)item;
+    p_row_context r_ctx = (p_row_context)data;
+
+    if ( r_ctx->rc != 0 ) return; /* important to stop if the last read was not successful */
+    vds_clear( &(my_col_def->content) ); /* clear the destination-dump-string */
+    if ( my_col_def->valid == false ) return;
+    if ( my_col_def->excluded == true ) return;
+
+    /* read the data of a cursor-cell: buffer-addr, offset and element-count
+       is stored in the dump_src-struct */
+    r_ctx->rc = VCursorCellData( r_ctx->cursor, my_col_def->idx, NULL, &src.buf,
+                                 &src.offset_in_bits, &src.number_of_elements );
+    if ( r_ctx->rc != 0 )
+    {
+        if( UIError(r_ctx->rc, NULL, r_ctx->table) ) {
+            UITableLOGError(r_ctx->rc, r_ctx->table, true);
+        } else {
+            PLOGERR( klogInt,
+                     (klogInt,
+                     r_ctx->rc,
+                     "VCursorCellData( col:$(col_name) at row #$(row_nr) ) failed",
+                     "col_name=%s,row_nr=%lu",
+                      my_col_def->name, r_ctx->row_id ));
+            /* be forgiving and continue if a cell cannot be read */
+        }
+        r_ctx->rc = 0;
+    }
+
+    /* check the type-domain */
+    if ( ( my_col_def->type_desc.domain < vtdBool )||
+         ( my_col_def->type_desc.domain > vtdUnicode ) )
+    {
+        vds_append_str( &(my_col_def->content), "unknown data-type" );
+    }
+    else
+    {
+        bool print_comma = true;
+        bool sra_dump_format;
+
+        /* initialize the element-idx ( for dimension > 1 ) */
+        src.element_idx = 0;
+
+        /* transfer context-flags (hex-print, no sra-types) */
+        src.in_hex = r_ctx->ctx->print_in_hex;
+        src.without_sra_types = r_ctx->ctx->without_sra_types;
+
+        /* special treatment to suppress spaces between values */
+        sra_dump_format = ( r_ctx->ctx->format == df_sra_dump );
+
+        /* hardcoded printing of dna-bases if the column-type fits */
+        src.print_dna_bases = ( r_ctx->ctx->print_dna_bases &
+                    ( my_col_def->type_desc.intrinsic_dim == 2 ) &
+                    ( my_col_def->type_desc.intrinsic_bits == 1 ) );
+
+        /* how a boolean is displayed */
+        src.c_boolean = r_ctx->ctx->c_boolean;
+
+        if ( my_col_def->type_desc.domain == vtdBool && src.c_boolean != 0 )
+        {
+            print_comma = false;
+        }
+
+        if ( r_ctx->ctx->print_num_elem )
+        {
+            char temp[ 16 ];
+            size_t num_writ;
+
+            r_ctx->rc = string_printf ( temp, sizeof temp, &num_writ, "%u", src.number_of_elements ); 
+            if ( r_ctx->rc == 0 )
+                vds_append_str( &(my_col_def->content), temp );
+        }
+        else if ( r_ctx->ctx->sum_num_elem )
+        {
+            my_col_def->elementsum += src.number_of_elements;
+        }
+        else
+        {
+            /* loop through the elements(dimension's) of a cell */
+            while( ( src.element_idx < src.number_of_elements )&&( r_ctx->rc == 0 ) )
+            {
+                uint32_t eidx = src.element_idx;
+                if ( ( eidx > 0 )&& ( src.print_dna_bases == false ) && print_comma )
+                {
+                    if ( sra_dump_format )
+                        vds_append_str( &(my_col_def->content), "," );
+                    else
+                        vds_append_str( &(my_col_def->content), ", " );
+                }
+
+                /* dumps the basic data-types, implementation in vdb-dump-tools.c
+                   >>> that means it appends the element-string to
+                       my_col_def->content <<<
+                   the formated output is only collected, to be printed later
+                   dump_element is also responsible for incrementing
+                   the src.element_idx by: 1...bool/int/uint/float
+                                           n...string/unicode-string */
+                r_ctx->rc = vdt_dump_element( &src, my_col_def, !sra_dump_format );
+
+                /* insurance against endless loop */
+                if ( eidx == src.element_idx )
+                {
+                    src.element_idx++;
+                }
+            }
+        }
+    }
+}
+
+
+
+static void CC vdm_print_elem_sum( void *item, void *data )
+{
+    char temp[ 16 ];
+    size_t num_writ;
+    p_col_def my_col_def = (p_col_def)item;
+    p_row_context r_ctx = (p_row_context)data;
+
+    if ( r_ctx->rc != 0 ) return; /* important to stop if the last read was not successful */
+    vds_clear( &(my_col_def->content) ); /* clear the destination-dump-string */
+
+    r_ctx->rc = string_printf ( temp, sizeof temp, &num_writ, "%u", my_col_def->elementsum ); 
+    if ( r_ctx->rc == 0 )
+        vds_append_str( &(my_col_def->content), temp );
+}
+
+
+static void vdm_row_error( const char * fmt, rc_t rc, uint64_t row_id )
+{
+    PLOGERR( klogInt, ( klogInt, rc, fmt, "row_nr=%lu", row_id ) );
+
+}
+
+/*************************************************************************************
+    dump_rows:
+    * is the main loop to dump all rows or all selected rows ( -R1-10 )
+    * creates a dump-string ( parameterizes it with the wanted max. line-len )
+    * starts the number-generator
+    * as long as the number-generator has a number and the result-code is ok
+      do for every row-id:
+        - set the row-id into the cursor and open the cursor-row
+        - loop throuh the columns
+        - close the row
+        - call print_row (vdb-dump-formats.c) which actually prints the row
+    * the collection of the text's for the columns "read_cell_data_and_dump()"
+      is separated from the actual printing "print_row()" !
+
+r_ctx   [IN] ... row-context ( cursor, dump_context, col_defs ... )
+*************************************************************************************/
+static rc_t vdm_dump_rows( p_row_context r_ctx )
+{
+    /* the important row_id is a member of r_ctx ! */
+    r_ctx->rc = vds_make( &(r_ctx->s_col), r_ctx->ctx->max_line_len, 512 );
+    if ( r_ctx->rc != 0 )
+        vdm_row_error( "dump_str_make( row#$(row_nr) ) failed", r_ctx->rc, r_ctx->row_id );
+    else
+    {
+        const struct num_gen_iter * iter;
+
+        r_ctx->rc = num_gen_iterator_make( r_ctx->ctx->rows, &iter );
+        if ( r_ctx->rc != 0 )
+            vdm_row_error( "num_gen_iterator_make( row#$(row_nr) ) failed", r_ctx->rc, r_ctx->row_id );
+        else
+        {
+            while ( ( r_ctx->rc == 0 ) && num_gen_iterator_next( iter, &(r_ctx->row_id), &(r_ctx->rc) ) )
+            {
+                if ( r_ctx-> rc == 0 )
+                    r_ctx-> rc = Quitting();
+                if ( r_ctx->rc != 0 )
+                    break;
+                r_ctx->rc = VCursorSetRowId( r_ctx->cursor, r_ctx->row_id );
+                if ( r_ctx->rc != 0 )
+                {
+                    vdm_row_error( "VCursorSetRowId( row#$(row_nr) ) failed", 
+                                   r_ctx->rc, r_ctx->row_id );
+                }
+                else
+                {
+                    r_ctx->rc = VCursorOpenRow( r_ctx->cursor );
+                    if ( r_ctx->rc != 0 )
+                    {
+                        vdm_row_error( "VCursorOpenRow( row#$(row_nr) ) failed", 
+                                       r_ctx->rc, r_ctx->row_id );
+                    }
+                    else
+                    {
+                        /* first reset the string and valid-flag for every column */
+                        vdcd_reset_content( r_ctx->col_defs );
+
+                        /* read the data of every column and create a string for it */
+                        VectorForEach( &(r_ctx->col_defs->cols),
+                                       false, vdm_read_cell_data, r_ctx );
+
+                        if ( r_ctx->rc == 0 )
+                        {
+                            /* prints the collected strings, in vdb-dump-formats.c */
+                            if ( !r_ctx->ctx->sum_num_elem )
+                            {
+                                r_ctx->rc = vdfo_print_row( r_ctx );
+                                if ( r_ctx->rc != 0 )
+                                    vdm_row_error( "vdfo_print_row( row#$(row_nr) ) failed", 
+                                           r_ctx->rc, r_ctx->row_id );
+                            }
+                        }
+                        r_ctx->rc = VCursorCloseRow( r_ctx->cursor );
+                        if ( r_ctx->rc != 0 )
+                            vdm_row_error( "VCursorCloseRow( row#$(row_nr) ) failed", 
+                                           r_ctx->rc, r_ctx->row_id );
+                    }
+                }
+            }
+        }
+        num_gen_iterator_destroy( iter );
+
+        if ( r_ctx->rc == 0 && r_ctx->ctx->sum_num_elem )
+        {
+            VectorForEach( &( r_ctx->col_defs->cols ), false, vdm_print_elem_sum, r_ctx );
+            if ( r_ctx->rc == 0 )
+            {
+                r_ctx->rc = vdfo_print_row( r_ctx );
+                DISP_RC( r_ctx->rc, "VTableOpenSchema() failed" );
+            }
+        }
+
+        vds_free( &(r_ctx->s_col) );
+    }
+    return r_ctx->rc;
+}
+
+
+static uint32_t vdm_extract_or_parse_columns( const p_dump_context ctx,
+                                          const VTable *my_table,
+                                          p_col_defs my_col_defs )
+{
+    uint32_t count = 0;
+    if ( ctx != NULL && my_col_defs != NULL )
+    {
+        bool cols_unknown = ( ( ctx->columns == NULL ) || ( string_cmp( ctx->columns, 1, "*", 1, 1 ) == 0 ) );
+        if ( cols_unknown )
+            /* the user does not know the column-names or wants all of them */
+            count = vdcd_extract_from_table( my_col_defs, my_table );
+        else
+            /* the user knows the names of the wanted columns... */
+            count = vdcd_parse_string( my_col_defs, ctx->columns, my_table );
+
+        if ( ctx->excluded_columns != NULL )
+            vdcd_exclude_these_columns( my_col_defs, ctx->excluded_columns );
+    }
+
+    return count;
+}
+
+
+static bool vdm_extract_or_parse_phys_columns( const p_dump_context ctx,
+                                               const VTable *my_table,
+                                               p_col_defs my_col_defs )
+{
+    bool res = false;
+    if ( ctx != NULL && my_col_defs != NULL )
+    {
+        bool cols_unknown = ( ( ctx->columns == NULL ) || ( string_cmp( ctx->columns, 1, "*", 1, 1 ) == 0 ) );
+        if ( cols_unknown )
+            /* the user does not know the column-names or wants all of them */
+            res = vdcd_extract_from_phys_table( my_col_defs, my_table );
+        else
+            /* the user knows the names of the wanted columns... */
+            res = vdcd_parse_string( my_col_defs, ctx->columns, my_table );
+
+        if ( ctx->excluded_columns != NULL )
+            vdcd_exclude_these_columns( my_col_defs, ctx->excluded_columns );
+    }
+
+    return res;
+}
+
+/*************************************************************************************
+    dump_tab_table:
+    * called by "dump_db_table()" and "dump_tab()" as a fkt-pointer
+    * opens a cursor to read
+    * checks if the user did not specify columns, or wants all columns ( "*" )
+        no columns specified ---> calls "col_defs_extract_from_table()"
+        columns specified ---> calls "col_defs_parse_string()"
+    * we end up with a list of column-definitions (name,type) in my_col_defs
+    * calls "col_defs_add_to_cursor()" to add them to the cursor
+    * opens the cursor
+    * calls "dump_rows()" to execute the dump
+    * destroys the my_col_defs - structure
+    * releases the cursor
+
+ctx       [IN] ... contains path, tablename, columns, row-range etc.
+my_table  [IN] ... open table needed for vdb-calls
+*************************************************************************************/
+static rc_t vdm_dump_opened_table( const p_dump_context ctx, const VTable *my_table )
+{
+    rc_t rc;
+
+    if ( ctx->format == df_bin )
+    {
+        rc = vdi_dump_opened_table( ctx, my_table ); /* from vdb-dump-bin.c */
+    }
+    else
+    {
+        row_context r_ctx;
+
+        rc = VTableCreateCachedCursorRead( my_table, &(r_ctx.cursor), ctx->cur_cache_size );
+        DISP_RC( rc, "VTableCreateCursorRead() failed" );
+        if ( rc == 0 )
+        {
+            r_ctx.table = my_table;
+            if ( !vdcd_init( &(r_ctx.col_defs), ctx->max_line_len ) )
+            {
+                rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+                DISP_RC( rc, "col_defs_init() failed" );
+            }
+
+            if ( rc == 0 )
+            {
+                uint32_t n = vdm_extract_or_parse_columns( ctx, my_table, r_ctx.col_defs );
+                if ( n < 1 )
+                    rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+                else
+                {
+                    n = vdcd_add_to_cursor( r_ctx.col_defs, r_ctx.cursor );
+                    if ( n < 1 )
+                        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+                    else
+                    {
+                        const VSchema *my_schema;
+                        rc = VTableOpenSchema( my_table, &my_schema );
+                        DISP_RC( rc, "VTableOpenSchema() failed" );
+                        if ( rc == 0 )
+                        {
+                            /* translate in special columns to numeric values to strings */
+                            vdcd_ins_trans_fkt( r_ctx.col_defs, my_schema );
+                            VSchemaRelease( my_schema );
+                        }
+
+                        rc = VCursorOpen( r_ctx.cursor );
+                        DISP_RC( rc, "VCursorOpen() failed" );
+                        if ( rc == 0 )
+                        {
+                            int64_t  first;
+                            uint64_t count;
+                            rc = VCursorIdRange( r_ctx.cursor, 0, &first, &count );
+                            DISP_RC( rc, "VCursorIdRange() failed" );
+                            if ( rc == 0 )
+                            {
+                                if ( ctx->rows == NULL )
+                                {
+                                    /* if the user did not specify a row-range, take all rows */
+                                    rc = num_gen_make_from_range( &ctx->rows, first, count );
+                                    DISP_RC( rc, "num_gen_make_from_range() failed" );
+                                }
+                                else
+                                {
+                                    /* if the user did specify a row-range, check the boundaries */
+                                    if ( count > 0 )
+                                    {
+                                        /* trim only if the row-range is not zero, otherwise
+                                           we will not get data if the user specified only static columns
+                                           because they report a row-range of zero! */
+                                        rc = num_gen_trim( ctx->rows, first, count );
+                                        DISP_RC( rc, "num_gen_trim() failed" );
+                                    }
+                                }
+
+                                if ( rc == 0 )
+                                {
+                                    if ( num_gen_empty( ctx->rows ) )
+                                    {
+                                        rc = RC( rcExe, rcDatabase, rcReading, rcRange, rcEmpty );
+                                    }
+                                    else
+                                    {
+                                        r_ctx.ctx = ctx;
+                                        rc = vdm_dump_rows( &r_ctx ); /* <--- */
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+                vdcd_destroy( r_ctx.col_defs );
+            }
+            VCursorRelease( r_ctx.cursor );
+        }
+    }
+    return rc;
+}
+
+/*************************************************************************************
+    dump_db_table:
+    * called by "dump_database()" as a fkt-pointer
+    * opens a table to read
+    * calls "dump_tab_table()" to do the dump
+    * releases the table
+
+ctx         [IN] ... contains path, tablename, columns, row-range etc.
+my_database [IN] ... open database needed for vdb-calls
+*************************************************************************************/
+static rc_t vdm_walk_sections( const VDatabase * base_db, const VDatabase ** sub_db,
+                               const VNamelist * sections, uint32_t count )
+{
+    rc_t rc = 0;
+    const VDatabase * parent_db = base_db;
+    if ( count == 0 )
+    {
+        rc = VDatabaseAddRef ( parent_db );
+        DISP_RC( rc, "VDatabaseAddRef() failed" );
+    }
+    else
+    {
+        uint32_t idx;
+        for ( idx = 0; rc == 0 && idx < count; ++idx )
+        {
+            const char * dbname;
+            rc = VNameListGet ( sections, idx, &dbname );
+            DISP_RC( rc, "VNameListGet() failed" );
+            if ( rc == 0 )
+            {
+                const VDatabase * temp;
+                rc = VDatabaseOpenDBRead ( parent_db, &temp, "%s", dbname );
+                DISP_RC( rc, "VDatabaseOpenDBRead() failed" );
+                if ( rc == 0 && idx > 0 )
+                {
+                    rc = VDatabaseRelease ( parent_db );
+                    DISP_RC( rc, "VDatabaseRelease() failed" );
+                }
+                if ( rc == 0 )
+                    parent_db = temp;
+            }
+        }
+    }
+    
+    if ( rc == 0 ) *sub_db = parent_db;
+    return rc;
+}
+
+
+static void vdm_clear_recorded_errors( void )
+{
+    rc_t rc;
+    const char * filename;
+    const char * funcname;
+    uint32_t line_nr;
+    while ( GetUnreadRCInfo ( &rc, &filename, &funcname, &line_nr ) )
+    {
+    }
+}
+
+
+static rc_t vdm_check_table_empty( const VTable * tab )
+{
+    bool empty;
+    rc_t rc = VTableIsEmpty( tab, &empty );
+    DISP_RC( rc, "VTableIsEmpty() failed" );
+    if ( rc == 0 && empty )
+    {
+        vdm_clear_recorded_errors();
+        KOutMsg( "the requested table is empty!\n" );
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcTable, rcEmpty );
+    }
+    return rc;
+}
+
+static rc_t vdm_open_table_by_path( const VDatabase * db, const char * path, const VTable ** tab )
+{
+    VNamelist * sections;
+    rc_t rc = vds_path_to_sections( path, '.', &sections );
+    DISP_RC( rc, "vds_path_to_sections() failed" );
+    if ( rc == 0 )
+    {
+        uint32_t count;
+        rc = VNameListCount ( sections, &count );
+        DISP_RC( rc, "VNameListCount() failed" );
+        if ( rc == 0 && count > 0 )
+        {
+            const VDatabase * sub_db;
+            rc = vdm_walk_sections( db, &sub_db, sections, count - 1 );
+            if ( rc == 0 )
+            {
+                const char * tabname;
+                rc = VNameListGet ( sections, count - 1, &tabname );
+                DISP_RC( rc, "VNameListGet() failed" );
+                if ( rc == 0 )
+                {
+                    rc = VDatabaseOpenTableRead( sub_db, tab, "%s", tabname );
+                    DISP_RC( rc, "VDatabaseOpenTableRead() failed" );
+                    if ( rc == 0 )
+                    {
+                        rc = vdm_check_table_empty( *tab );
+                        if ( rc != 0 )
+                        {
+                            VTableRelease( *tab );
+                            tab = NULL;
+                        }
+                    }
+                }
+                VDatabaseRelease ( sub_db );
+            }
+        }
+        VNamelistRelease ( sections );
+    }
+    return rc;
+}
+
+static rc_t vdm_dump_opened_database( const p_dump_context ctx,
+                                      const VDatabase *my_database )
+{
+    const VTable *my_table;
+    rc_t rc = vdm_open_table_by_path( my_database, ctx->table, &my_table );
+    if ( rc == 0 )
+    {
+        rc = vdm_dump_opened_table( ctx, my_table );
+        VTableRelease( my_table );
+    }
+    return rc;
+}
+
+/* ********************************************************************** */
+
+static rc_t vdm_show_tab_spread( const p_dump_context ctx,
+                                 const VTable *my_table )
+{
+    const VCursor * cursor;
+    rc_t rc = VTableCreateCachedCursorRead( my_table, &cursor, ctx->cur_cache_size );
+    DISP_RC( rc, "VTableCreateCursorRead() failed" );
+    if ( rc == 0 )
+    {
+        col_defs * cols;
+        if ( !vdcd_init( &cols, ctx->max_line_len ) )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            DISP_RC( rc, "col_defs_init() failed" );
+        }
+        if ( rc == 0 )
+        {
+            uint32_t n = vdm_extract_or_parse_columns( ctx, my_table, cols );
+            if ( n < 1 )
+                rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+            else
+            {
+                n = vdcd_add_to_cursor( cols, cursor );
+                if ( n < 1 )
+                    rc = RC( rcVDB, rcNoTarg, rcConstructing, rcParam, rcInvalid );
+                else
+                {
+                    rc = VCursorOpen( cursor );
+                    DISP_RC( rc, "VCursorOpen() failed" );
+                    if ( rc == 0 )
+                    {
+                        int64_t  first;
+                        uint64_t count;
+                        rc = VCursorIdRange( cursor, 0, &first, &count );
+                        DISP_RC( rc, "VCursorIdRange( spread ) failed" );
+                        if ( rc == 0 )
+                        {
+                            if ( ctx->rows == NULL )
+                            {
+                                rc = num_gen_make_from_range( &ctx->rows, first, count );
+                                DISP_RC( rc, "num_gen_make_from_range() failed" );
+                            }
+                            else
+                            {
+                                if ( count > 0 )
+                                {
+                                    rc = num_gen_trim( ctx->rows, first, count );
+                                    DISP_RC( rc, "num_gen_trim() failed" );
+                                }
+                            }
+                            
+                            if ( rc == 0 )
+                            {
+                                if ( num_gen_empty( ctx->rows ) )
+                                    rc = RC( rcExe, rcDatabase, rcReading, rcRange, rcEmpty );
+                                else
+                                    rc = vdcd_collect_spread( ctx->rows, cols, cursor ); /* is in vdb-dump-coldefs.c */
+                            }
+                        }
+                    }
+                }
+            }
+            vdcd_destroy( cols );
+        }
+        VCursorRelease( cursor );
+    }
+    return rc;
+}
+
+static rc_t vdm_show_db_spread( const p_dump_context ctx,
+                                const VDatabase *my_database )
+{
+    const VTable *my_table;
+    rc_t rc = vdm_open_table_by_path( my_database, ctx->table, &my_table );
+    if ( rc == 0 )
+    {
+        rc = vdm_show_tab_spread( ctx, my_table );
+        VTableRelease( my_table );
+    }
+    return rc;
+}
+/* ********************************************************************** */
+
+/********************************************************************
+helper function, needed by "VSchemaDump()"
+********************************************************************/
+static rc_t CC vdm_schema_dump_flush( void *dst, const void *buffer, size_t bsize )
+{
+    FILE *f = dst;
+    fwrite( buffer, 1, bsize, f );
+    return 0;
+}
+
+/*************************************************************************************
+    dump_the_tab_schema:
+    * called by "dump_the_db_schema()" and "dump_table()" as a function pointer
+    * opens the schema of a table
+    * calls "VSchemaDump()" to dump this schema
+    * releases the schema
+
+ctx         [IN] ... contains path, tablename, columns, row-range etc.
+my_database [IN] ... open database needed for vdb-calls
+*************************************************************************************/
+static rc_t vdm_dump_tab_schema( const p_dump_context ctx,
+                                 const VTable *my_table )
+{
+    const VSchema * my_schema;
+    rc_t rc = VTableOpenSchema( my_table, &my_schema );
+    DISP_RC( rc, "VTableOpenSchema() failed" );
+    if ( rc == 0 )
+    {
+        if ( ctx->columns == NULL )
+        {
+            /* the user did not ask to inspect a specific object, we look for
+               the Typespec of the table... */
+            char buffer[ 4096 ];
+            rc = VTableTypespec ( my_table, buffer, sizeof buffer );
+            DISP_RC( rc, "VTableTypespec() failed" );
+            if ( rc == 0 )
+                rc = VSchemaDump( my_schema, sdmPrint, buffer,
+                                  vdm_schema_dump_flush, stdout );
+        
+        }
+        else
+        {
+            /* the user did ask to inspect a specific object */
+            rc = VSchemaDump( my_schema, sdmPrint, ctx->columns,
+                              vdm_schema_dump_flush, stdout );
+        }
+        DISP_RC( rc, "VSchemaDump() failed" );
+        VSchemaRelease( my_schema );
+    }
+    return rc;
+}
+
+/*************************************************************************************
+    dump_the_db_schema:
+    * called by "dump_database()" as a function pointer
+    * opens a table to read
+    * calls "dump_the_tab_schema()" to dump the schema of this table
+    * releases the table
+
+ctx         [IN] ... contains path, tablename, columns, row-range etc.
+my_database [IN] ... open database needed for vdb-calls
+*************************************************************************************/
+static rc_t vdm_dump_db_schema( const p_dump_context ctx,
+                                const VDatabase *my_database )
+{
+    rc_t rc = 0;
+    if ( ctx->table_defined )
+    {
+        /* the user has given a database as object, but asks to inspect a given table */
+        const VTable *my_table;
+        rc = vdm_open_table_by_path( my_database, ctx->table, &my_table );
+        if ( rc == 0 )
+        {
+            rc = vdm_dump_tab_schema( ctx, my_table );
+            VTableRelease( my_table );
+        }
+    }
+    else
+    {
+        /* the user has given a database as object, but did not ask for a specific table */
+        const VSchema * my_schema;
+        rc = VDatabaseOpenSchema( my_database, &my_schema );
+        DISP_RC( rc, "VDatabaseOpenSchema() failed" );
+        if ( rc == 0 )
+        {
+            if ( ctx->columns == NULL )
+            {
+                /* the used did not ask to inspect a specifiy object, we look for
+                   the Typespec of the database... */
+                char buffer[ 4096 ];
+                rc = VDatabaseTypespec ( my_database, buffer, sizeof buffer );
+                DISP_RC( rc, "VDatabaseTypespec() failed" );
+                if ( rc == 0 )
+                    rc = VSchemaDump( my_schema, sdmPrint, buffer,
+                                      vdm_schema_dump_flush, stdout );
+            }
+            else
+            {
+                /* the user did ask to inspect a specific object */
+                rc = VSchemaDump( my_schema, sdmPrint, ctx->columns,
+                                  vdm_schema_dump_flush, stdout );
+            }
+            DISP_RC( rc, "VSchemaDump() failed" );
+            VSchemaRelease( my_schema );
+        }
+    }
+    return rc;
+}
+
+/*************************************************************************************
+    enum_tables:
+    * called by "dump_database()" as a function pointer
+    * calls VDatabaseListTbl() to get a list of Tables
+    * loops through this list to print the names
+
+ctx         [IN] ... contains path, tablename, columns, row-range etc.
+my_database [IN] ... open database needed for vdb-calls
+*************************************************************************************/
+static rc_t vdm_enum_sub_dbs_and_tabs( const VDatabase * db, uint32_t indent );
+
+static rc_t vdm_report_tab_or_db( const VDatabase * db, const KNamelist * list,
+                                  const char * prefix, uint32_t indent )
+{
+    uint32_t n;
+    rc_t rc = KNamelistCount( list, &n );
+    DISP_RC( rc, "KNamelistCount() failed" );
+    if ( rc == 0 )
+    {
+        uint32_t i;
+        for ( i = 0; i < n && rc == 0; ++i )
+        {
+            const char * entry;
+            rc = KNamelistGet( list, i, &entry );
+            DISP_RC( rc, "KNamelistGet() failed" );
+            if ( rc == 0 )
+            {
+                rc = KOutMsg( "%*s : %s\n", indent + 3, prefix, entry );
+                if ( rc == 0 && db != NULL )
+                {
+                    const VDatabase * sub_db;
+                    rc = VDatabaseOpenDBRead ( db, &sub_db, entry );
+                    DISP_RC( rc, "VDatabaseOpenDBRead() failed" );
+                    if ( rc == 0 )
+                    {
+                        rc = vdm_enum_sub_dbs_and_tabs( sub_db, indent + 3 ); /* recursion here... */
+                        VDatabaseRelease( sub_db );
+                    }
+                }
+            }
+        }
+    }
+    return rc;
+}
+
+static rc_t vdm_enum_tabs_of_db( const VDatabase * db, uint32_t indent )
+{
+    KNamelist *tbl_names;
+    rc_t rc = VDatabaseListTbl( db, &tbl_names );
+    if ( rc == 0 )
+    {
+        rc = vdm_report_tab_or_db( NULL, tbl_names, "tbl", indent );
+        KNamelistRelease( tbl_names );
+    }
+    else
+    {
+        rc = 0;
+    }
+    return rc;
+}
+
+static rc_t vdm_enum_sub_dbs_of_db( const VDatabase * db, uint32_t indent )
+{
+    KNamelist *db_names;
+    rc_t rc = VDatabaseListDB( db, &db_names );
+    if ( rc == 0 )
+    {
+        rc = vdm_report_tab_or_db( db, db_names, "db ", indent );
+        KNamelistRelease( db_names );
+    }
+    else
+    {
+        rc = 0;
+    }
+    return rc;
+}
+
+static rc_t vdm_enum_sub_dbs_and_tabs( const VDatabase * db, uint32_t indent )
+{
+    rc_t rc = vdm_enum_sub_dbs_of_db( db, indent );
+    if ( rc == 0 )
+        rc = vdm_enum_tabs_of_db( db, indent );
+    return rc;
+}
+
+static rc_t vdm_enum_tables( const p_dump_context ctx, const VDatabase * db )
+{
+    rc_t rc = KOutMsg( "enumerating the tables of database '%s'\n", ctx->path );
+    if ( rc == 0 )
+        rc = vdm_enum_sub_dbs_and_tabs( db, 0 );
+    return rc;
+}
+
+
+typedef struct col_info_context
+{
+    p_dump_context ctx;
+    const VSchema *my_schema;
+    const VTable *my_table;
+    const KTable *my_ktable;
+} col_info_context;
+typedef struct col_info_context* p_col_info_context;
+
+static rc_t vdm_print_column_datatypes( const p_col_def col_def,
+                                        const p_col_info_context ci )
+{
+    KNamelist *names;
+    uint32_t dflt_idx;
+
+    rc_t rc = VTableColumnDatatypes( ci->my_table, col_def->name, &dflt_idx, &names );
+    DISP_RC( rc, "VTableColumnDatatypes() failed" );
+    if ( rc == 0 )
+    {
+        uint32_t n;
+        rc = KNamelistCount( names, &n );
+        DISP_RC( rc, "KNamelistCount() failed" );
+        if ( rc == 0 )
+        {
+            uint32_t i;
+            for ( i = 0; i < n && rc == 0; ++i )
+            {
+                const char *type_name;
+                rc = KNamelistGet( names, i, &type_name );
+                DISP_RC( rc, "KNamelistGet() failed" );
+                if ( rc == 0 )
+                {
+                    if ( dflt_idx == i )
+                        rc = KOutMsg( "%20s.type[%d] = %s (dflt)\n", col_def->name, i, type_name );
+                    else
+                        rc = KOutMsg( "%20s.type[%d] = %s\n", col_def->name, i, type_name );
+                }
+            }
+        }
+        rc = KNamelistRelease( names );
+        DISP_RC( rc, "KNamelistRelease() failed" );
+    }
+    if ( rc == 0 )
+        rc = KOutMsg( "\n" );
+    return rc;
+}
+
+
+static rc_t vdm_show_row_blobbing( const p_col_def col_def,
+                                   const p_col_info_context ci )
+{
+    const KColumn * kcol;
+    rc_t rc = KTableOpenColumnRead( ci->my_ktable, &kcol, "%s", col_def->name );
+    if ( rc != 0 )
+        return KOutMsg( "'%s' is not a physical column\n", col_def->name );
+    else
+        rc = KOutMsg( "\nCOLUMN '%s':\n", col_def->name );
+
+    if ( rc == 0 )
+    {
+        int64_t first;
+        uint64_t count;
+        rc = KColumnIdRange( kcol, &first, &count );
+        DISP_RC( rc, "KColumnIdRange() failed" );
+        if ( rc == 0 )
+        {
+            int64_t last = first + count - 1;
+            rc = KOutMsg( "range: %,ld ... %,ld\n", first, last );
+            if ( rc == 0 )
+            {
+                int64_t id = first;
+                while ( id < last && rc == 0 )
+                {
+                    const KColumnBlob *blob;
+                    rc = KColumnOpenBlobRead( kcol, &blob, id );
+                    DISP_RC( rc, "KColumnOpenBlobRead() failed" );
+                    if ( rc == 0 )
+                    {
+                        int64_t first_id_in_blob;
+                        uint32_t ids_in_blob;
+                        rc = KColumnBlobIdRange( blob, &first_id_in_blob, &ids_in_blob );
+                        DISP_RC( rc, "KColumnBlobIdRange() failed" );
+                        if ( rc == 0 )
+                        {
+                            int64_t last_id_in_blob = first_id_in_blob + ids_in_blob - 1;
+                            char buffer[ 8 ];
+                            size_t num_read, remaining;
+                            rc = KColumnBlobRead ( blob, 0, &buffer, 0, &num_read, &remaining );
+                            DISP_RC( rc, "KColumnBlobRead() failed" );
+                            if ( rc == 0 )
+                            {
+                                rc = KOutMsg( "blob[ %,ld ... %,ld] size = %,zu\n", first_id_in_blob, last_id_in_blob, remaining + num_read );
+                            }
+                            id = last_id_in_blob + 1;
+                        }
+                        KColumnBlobRelease( blob );
+                    }
+                }
+            }
+        }
+        KColumnRelease( kcol );
+    }
+    return rc;
+}
+
+/*************************************************************************************
+    print_column_info:
+    * get's called from "enum_tab_columns()" via VectorForEach
+    * prints: table-name, col-idx, bits, dimension, domain and name
+      for every column
+
+item  [IN] ... pointer to a column-definition-struct ( from "vdb-dump-coldefs.h" )
+data  [IN] ... pointer to dump-context ( in this case to have a line-idx )
+*************************************************************************************/
+static rc_t vdm_print_column_info( const p_col_def col_def, p_col_info_context ci_ctx )
+{
+    rc_t rc = 0;
+
+    if ( ci_ctx->ctx->show_blobbing )
+        rc = vdm_show_row_blobbing( col_def, ci_ctx );
+    else
+    {
+        /* print_col_info is in vdb-dump-helper.c */
+        rc = vdh_print_col_info( ci_ctx->ctx , col_def, ci_ctx->my_schema );
+
+        /* to test VTableColumnDatatypes() */
+        if ( rc == 0  && ci_ctx->ctx->column_enum_requested )
+            rc = vdm_print_column_datatypes( col_def, ci_ctx );
+    }
+    return rc;
+}
+
+
+static rc_t vdm_enum_phys_columns( const VTable *my_table )
+{
+    rc_t rc = KOutMsg( "physical columns:\n" );
+    if ( rc == 0 )
+    {
+        KNamelist *phys;
+        rc = VTableListPhysColumns( my_table, &phys );
+        DISP_RC( rc, "VTableListPhysColumns() failed" );
+        if ( rc == 0 )
+        {
+            uint32_t count;
+            rc = KNamelistCount( phys, &count );
+            DISP_RC( rc, "KNamelistCount( physical columns ) failed" );
+            if ( rc == 0 )
+            {
+                if ( count > 0 )
+                {
+                    uint32_t idx;
+                    for ( idx = 0; idx < count && rc == 0; ++idx )
+                    {
+                        const char * name;
+                        rc = KNamelistGet( phys, idx, &name );
+                        DISP_RC( rc, "KNamelistGet( physical columns ) failed" );
+                        if ( rc == 0 )
+                            rc = KOutMsg( "[%.02d] = %s\n", idx, name );
+                    }
+                }
+                else
+                {
+                    rc = KOutMsg( "... list is empty!\n" );
+                }
+            }
+            KNamelistRelease( phys );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdm_enum_readable_columns( const VTable *my_table )
+{
+    rc_t rc = KOutMsg( "readable columns:\n" );
+    if ( rc == 0 )
+    {
+        KNamelist *readable;
+        rc = VTableListReadableColumns( my_table, &readable );
+        DISP_RC( rc, "VTableListReadableColumns() failed" );
+        if ( rc == 0 )
+        {
+            uint32_t count;
+            rc = KNamelistCount( readable, &count );
+            DISP_RC( rc, "KNamelistCount( readable columns ) failed" );
+            if ( rc == 0 )
+            {
+                if ( count > 0 )
+                {
+                    uint32_t idx;
+                    for ( idx = 0; idx < count && rc == 0; ++idx )
+                    {
+                        const char * name;
+                        rc = KNamelistGet( readable, idx, &name );
+                        DISP_RC( rc, "KNamelistGet( readable columns ) failed" );
+                        if ( rc == 0 )
+                            rc = KOutMsg( "[%.02d] = %s\n", idx, name );
+                    }
+                }
+                else
+                {
+                    rc = KOutMsg( "... list is empty!\n" );
+                }
+            }
+            KNamelistRelease( readable );
+        }
+    }
+    return rc;
+}
+
+/*************************************************************************************
+    enum_tab_columns:
+    * called by "enum_db_columns()" and "dump_table()" as fkt-pointer
+    * initializes a column-definitions-structure
+    * calls col_defs_extract_from_table() to enumerate all columns in the table
+    ( both functions are in "vdb-dump-coldefs.h" )
+    * loops through the columns and prints it's information
+    * releases the column-definitions-structure
+
+ctx         [IN] ... contains path, tablename, columns, row-range etc.
+my_database [IN] ... open database needed for vdb-calls
+*************************************************************************************/
+static rc_t vdm_enum_tab_columns( const p_dump_context ctx, const VTable *my_table )
+{
+    rc_t rc = 0;
+    if ( ctx->enum_phys )
+    {
+        rc = vdm_enum_phys_columns( my_table );
+    }
+    else if ( ctx->enum_readable )
+    {
+        rc = vdm_enum_readable_columns( my_table );
+    }
+    else
+    {
+        col_defs *my_col_defs;
+        if ( !vdcd_init( &my_col_defs, ctx->max_line_len ) )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            DISP_RC( rc, "col_defs_init() failed" );
+        }
+
+        if ( rc == 0 )
+        {
+            col_info_context ci_ctx;
+            bool extracted;
+
+            ci_ctx.ctx = ctx;
+            ci_ctx.my_table = my_table;
+            if ( ctx->show_blobbing )
+            {
+                extracted = vdm_extract_or_parse_phys_columns( ctx, my_table, my_col_defs );
+                rc = VTableOpenKTableRead( my_table, &ci_ctx.my_ktable );
+                DISP_RC( rc, "VTableOpenKTableRead() failed" );
+            }
+            else
+            {
+                extracted = vdm_extract_or_parse_columns( ctx, my_table, my_col_defs );
+                ci_ctx.my_ktable = NULL;
+            }
+
+            if ( extracted && rc == 0 )
+            {
+                rc = VTableOpenSchema( my_table, &(ci_ctx.my_schema) );
+                DISP_RC( rc, "VTableOpenSchema() failed" );
+                if ( rc == 0 )
+                {
+                    uint32_t idx, count;
+
+                    ctx->generic_idx = 1;
+                    count = VectorLength( &(my_col_defs->cols) );
+                    for ( idx = 0; idx < count && rc == 0; ++idx )
+                    {
+                        col_def *col = ( col_def * )VectorGet( &(my_col_defs->cols), idx );
+                        if ( col != 0 )
+                        {
+                            rc = vdm_print_column_info( col, &ci_ctx );
+                        }
+                    }
+                    VSchemaRelease( ci_ctx.my_schema );
+                }
+                if ( ci_ctx.my_ktable != NULL )
+                    KTableRelease( ci_ctx.my_ktable );
+            }
+            else
+            {
+                rc = KOutMsg( "error in col_defs_extract_from_table\n" );
+            }
+            vdcd_destroy( my_col_defs );
+        }
+    }
+    return rc;
+}
+
+/*************************************************************************************
+    enum_db_columns:
+    * called by "dump_database()" as fkt-pointer
+    * opens the table
+    * calls enum_tab_columns()
+    * releases table
+
+ctx         [IN] ... contains path, tablename, columns, row-range etc.
+my_database [IN] ... open database needed for vdb-calls
+*************************************************************************************/
+static rc_t vdm_enum_db_columns( const p_dump_context ctx, const VDatabase *my_database )
+{
+    const VTable *my_table;
+    rc_t rc = vdm_open_table_by_path( my_database, ctx->table, &my_table );    
+    if ( rc == 0 )
+    {
+        rc = vdm_enum_tab_columns( ctx, my_table );
+        VTableRelease( my_table );
+    }
+    return rc;
+}
+
+
+static rc_t vdm_print_tab_id_range( const p_dump_context ctx, const VTable *my_table )
+{
+    const VCursor *my_cursor;
+    rc_t rc = VTableCreateCursorRead( my_table, &my_cursor );
+    DISP_RC( rc, "VTableCreateCursorRead() failed" );
+    if ( rc == 0 )
+    {
+        col_defs *my_col_defs;
+
+        if ( !vdcd_init( &my_col_defs, ctx->max_line_len ) )
+        {
+            rc = RC( rcVDB, rcNoTarg, rcConstructing, rcMemory, rcExhausted );
+            DISP_RC( rc, "col_defs_init() failed" );
+        }
+
+        if ( rc == 0 )
+        {
+            if ( vdm_extract_or_parse_columns( ctx, my_table, my_col_defs ) )
+            {
+                if ( vdcd_add_to_cursor( my_col_defs, my_cursor ) )
+                {
+                    rc = VCursorOpen( my_cursor );
+                    DISP_RC( rc, "VCursorOpen() failed" );
+                    if ( rc == 0 )
+                    {
+                        int64_t  first;
+                        uint64_t count;
+
+                        uint32_t idx = 0;
+                        
+                        /* calling with idx = 0 means: let the cursor find out the min/max values of
+                           all open columns...
+                           
+                        vdcd_get_first_none_static_column_idx( my_col_defs, my_cursor, &idx );
+                        */
+                        
+                        rc = VCursorIdRange( my_cursor, idx, &first, &count );
+                        DISP_RC( rc, "VCursorIdRange() failed" );
+                        if ( rc == 0 )
+                            rc = KOutMsg( "id-range: first-row = %,ld, row-count = %,ld\n", first, count );
+                    }
+                }
+            }
+            vdcd_destroy( my_col_defs );
+        }
+        VCursorRelease( my_cursor );
+    }
+    return rc;
+}
+
+/*************************************************************************************
+    print_db_id_range:
+    * called by "dump_database()" as fkt-pointer
+    * opens the table
+    * calls print_tab_id_range()
+    * releases table
+
+ctx         [IN] ... contains path, tablename, columns, row-range etc.
+my_database [IN] ... open database needed for vdb-calls
+*************************************************************************************/
+static rc_t vdm_print_db_id_range( const p_dump_context ctx, const VDatabase *my_database )
+{
+    const VTable *my_table;
+    rc_t rc = vdm_open_table_by_path( my_database, ctx->table, &my_table );
+    if ( rc == 0 )
+    {
+        rc = vdm_print_tab_id_range( ctx, my_table );
+        VTableRelease( my_table );
+    }
+    return rc;
+}
+
+
+
+/* ************************************************************************************ */
+
+static rc_t vdm_enum_index( const KTable * my_ktable, uint32_t idx_nr, const char * idx_name )
+{
+    rc_t rc = KOutMsg( "idx #%u: %s", idx_nr + 1, idx_name );
+    if ( rc == 0 )
+    {
+        const KIndex * my_idx;
+        rc = KTableOpenIndexRead ( my_ktable, &my_idx, "%s", idx_name );
+        if ( rc != 0 )
+            rc = KOutMsg( " (cannot open)" );
+        else
+        {
+            uint32_t idx_version;
+            rc = KIndexVersion ( my_idx, &idx_version );
+            if ( rc != 0 )
+                rc = KOutMsg( " V?.?.?" );
+            else
+                rc = KOutMsg( " V%V", idx_version );
+
+            if ( rc == 0 )
+            {
+                KIdxType idx_type;
+                rc = KIndexType ( my_idx, &idx_type );
+                if ( rc != 0 )
+                    rc = KOutMsg( " type = ?" );
+                else
+                {
+                    switch ( idx_type &~ kitProj )
+                    {
+                        case kitText : rc = KOutMsg( " type = Text" ); break;
+                        case kitU64  : rc = KOutMsg( " type = U64" ); break;
+                        default       : rc = KOutMsg( " type = unknown" ); break;
+                    }
+                    if ( rc == 0 && ( ( idx_type & kitProj ) == kitProj ) )
+                        rc = KOutMsg( " reverse" );
+                }
+            }
+            
+            if ( rc == 0 )
+            {
+                bool locked = KIndexLocked ( my_idx );
+                if ( locked )
+                    rc = KOutMsg( " locked" );
+            }
+            KIndexRelease( my_idx );
+        }
+    }
+    if ( rc == 0 )
+        rc = KOutMsg( "\n" );
+    return rc;
+}
+
+
+static rc_t vdm_enum_tab_index( const p_dump_context ctx, const VTable *my_table )
+{
+    const KTable * my_ktable;
+    rc_t rc = VTableOpenKTableRead( my_table, &my_ktable );
+    DISP_RC( rc, "VTableOpenKTableRead() failed" );
+    if ( rc == 0 )
+    {
+        KNamelist *idx_names;
+        rc = KTableListIdx ( my_ktable, &idx_names );
+        if ( rc == 0 )
+        {
+            uint32_t count;
+            rc = KNamelistCount( idx_names, &count );
+            if ( rc == 0 )
+            {
+                uint32_t i;
+                for ( i = 0; i < count && rc == 0; ++i )
+                {
+                    const char * idx_name = NULL;
+                    rc = KNamelistGet( idx_names, i, &idx_name );
+                    if ( rc == 0 && idx_name != NULL )
+                        rc = vdm_enum_index( my_ktable, i, idx_name );
+                }
+            }
+            KNamelistRelease( idx_names );
+        }
+        else
+            rc = KOutMsg( "no index available\n" );
+        KTableRelease( my_ktable );
+    }
+    return rc;
+}
+
+static rc_t vdm_enum_db_index( const p_dump_context ctx, const VDatabase *my_database )
+{
+    const VTable *my_table;
+    rc_t rc = vdm_open_table_by_path( my_database, ctx->table, &my_table );
+    if ( rc == 0 )
+    {
+        rc = vdm_enum_tab_index( ctx, my_table );
+        VTableRelease( my_table );
+    }
+    return rc;
+}
+
+
+/* ************************************************************************************ */
+
+static rc_t vdm_range_tab_index( const p_dump_context ctx, const VTable *my_table )
+{
+    const KTable * my_ktable;
+    rc_t rc = VTableOpenKTableRead( my_table, &my_ktable );
+    if ( rc != 0 )
+        ErrMsg( "VTableOpenKTableRead() -> %R", rc );
+    else
+    {
+        const KIndex * my_kindex;
+        rc = KTableOpenIndexRead ( my_ktable, &my_kindex, "%s", ctx->idx_range );
+        if ( rc != 0 )
+            ErrMsg( "KTableOpenIndexRead() -> %R", rc );
+        else
+        {
+            int64_t start;
+            uint64_t count;
+            rc_t rc2 = 0;
+            for ( start = 1; rc2 == 0 && rc == 0; start += count )
+            {
+                size_t key_size;
+                char key [ 4096 ];
+                rc2 = KIndexProjectText ( my_kindex, start, &start, &count,
+                                         key, sizeof key, &key_size );
+                if ( rc2 == 0 )
+                    rc = KOutMsg( "%.*s : %lu ... %lu\n", ( int )key_size, key, start, start + count - 1 );
+            }
+            KIndexRelease( my_kindex );
+        }
+        KTableRelease( my_ktable );
+    }
+    return rc;
+}
+
+
+static rc_t vdm_range_db_index( const p_dump_context ctx, const VDatabase *my_database )
+{
+    const VTable *my_table;
+    rc_t rc = vdm_open_table_by_path( my_database, ctx->table, &my_table );
+    if ( rc == 0 )
+    {
+        rc = vdm_range_tab_index( ctx, my_table );
+        VTableRelease( my_table );
+    }
+    return rc;
+}
+
+
+/* ************************************************************************************ */
+
+static rc_t vdm_show_tab_spotgroups( const p_dump_context ctx, const VTable *my_table )
+{
+    const KMetadata * meta = NULL;
+    rc_t rc = VTableOpenMetadataRead( my_table, &meta );
+    if ( rc != 0 )
+        ErrMsg( "VTableOpenMetadataRead() -> %R", rc );
+    else
+    {
+        const KMDataNode * spot_groups_node;
+        rc = KMetadataOpenNodeRead( meta, &spot_groups_node, "STATS/SPOT_GROUP" );
+        if ( rc != 0 )
+            ErrMsg( "KMetadataOpenNodeRead( STATS/SPOT_GROUP ) -> %R", rc );
+        else
+        {
+            KNamelist * spot_groups;
+            rc = KMDataNodeListChildren( spot_groups_node, &spot_groups );
+            if ( rc != 0 )
+                ErrMsg( "KMDataNodeListChildren() -> %R", rc );
+            else
+            {
+                uint32_t count;
+                rc = KNamelistCount( spot_groups, &count );
+                if ( rc != 0 )
+                    ErrMsg( "KNamelistCount() -> %R", rc );
+                else if ( count > 0 )
+                {
+                    uint32_t i;
+                    for ( i = 0; i < count && rc == 0; ++i )
+                    {
+                        const char * name = NULL;
+                        rc = KNamelistGet( spot_groups, i, &name );
+                        if ( rc != 0 )
+                            ErrMsg( "KNamelistCount( %d) -> %R", i, rc );
+                        else if ( name != NULL )
+                        {
+                            const KMDataNode * spot_count_node;
+                            rc = KMDataNodeOpenNodeRead( spot_groups_node, &spot_count_node, "%s/SPOT_COUNT", name );
+                            if ( rc != 0 )
+                                ErrMsg( "KMDataNodeOpenNodeRead() -> %R", rc );
+                            else
+                            {
+                                uint64_t spot_count = 0;
+                                rc = KMDataNodeReadAsU64( spot_count_node, &spot_count );
+                                if ( rc != 0 )
+                                {
+                                    ErrMsg( "KMDataNodeReadAsU64() -> %R", rc );
+                                    vdm_clear_recorded_errors();
+                                }
+                                else
+                                {
+                                    if ( spot_count > 0 )
+                                    {
+                                        const KMDataNode * spot_group_node;
+                                        rc = KMDataNodeOpenNodeRead( spot_groups_node, &spot_group_node, name );
+                                        if ( rc != 0 )
+                                            ErrMsg( "KMDataNodeOpenNodeRead( '%s' ) -> %R", name, rc );
+                                        else
+                                        {
+                                            char name_attr[ 2048 ];
+                                            size_t num_writ;
+                                            rc = KMDataNodeReadAttr( spot_group_node, "name", name_attr, sizeof name_attr, &num_writ );
+                                            rc = KOutMsg( "%s\t%,lu\n", rc == 0 ? name_attr : name, spot_count );
+                                            KMDataNodeRelease( spot_group_node );                
+                                        }
+
+                                    }
+                                }
+                                KMDataNodeRelease( spot_count_node );
+                            }
+                        }
+                    }
+                }
+                KNamelistRelease( spot_groups );
+            }
+            KMDataNodeRelease( spot_groups_node );
+        }
+        KMetadataRelease ( meta );
+    }
+    return rc;
+}
+
+static rc_t vdm_show_db_spotgroups( const p_dump_context ctx, const VDatabase *my_database )
+{
+    const VTable *my_table;
+    rc_t rc = vdm_open_table_by_path( my_database, ctx->table, &my_table );
+    if ( rc == 0 )
+    {
+        rc = vdm_show_tab_spotgroups( ctx, my_table );
+        VTableRelease( my_table );
+    }
+    return rc;
+}
+
+
+typedef rc_t (*db_tab_t)( const p_dump_context ctx, const VTable *a_tab );
+
+/*************************************************************************************
+    dump_tab_fkt:
+    * called by "dump_table()"
+    * if the user has provided the name of a schema-file:
+        - make a schema from manager
+        - parse the schema-file
+        - use this schema to open the database
+    * if we do not have a schema-file, use NULL ( that means the internal tab-schema )
+    * open the table for read
+    * call the function-pointer, with context and table
+    * release table and schema
+
+ctx    [IN] ... contains source-path, tablename, columns and row-range as ascii-text
+db_fkt [IN] ... function to be called if directory, manager and database are open
+*************************************************************************************/
+static rc_t vdm_dump_tab_fkt( const p_dump_context ctx,
+                              const VDBManager *my_manager,
+                              const db_tab_t tab_fkt )
+{
+    const VTable *my_table;
+    VSchema *my_schema = NULL;
+    rc_t rc;
+
+    vdh_parse_schema( my_manager, &my_schema, &(ctx->schema_list), true /*ctx->force_sra_schema*/ );
+
+    rc = VDBManagerOpenTableRead( my_manager, &my_table, my_schema, "%s", ctx->path );
+    if ( rc != 0 )
+        ErrMsg( "VDBManagerOpenTableRead( '%R' ) -> %R", ctx->path, rc );
+    else
+    {
+        rc = vdm_check_table_empty( my_table );
+        if ( rc == 0 )
+            rc = tab_fkt( ctx, my_table ); /* fkt-pointer is called */
+        VTableRelease( my_table );
+    }
+
+    if ( my_schema != NULL )
+    {
+        rc = VSchemaRelease( my_schema );
+        if ( rc != 0 )
+            ErrMsg( "VSchemaRelease() -> %R", rc );
+    }
+    return rc;
+}
+
+
+static bool enum_col_request( const p_dump_context ctx )
+{
+    return ( ctx->column_enum_requested || ctx->column_enum_short || 
+             ctx->show_blobbing || ctx->enum_phys || ctx->enum_readable );
+}
+
+/***************************************************************************
+    dump_table:
+    * called by "dump_main()" to handle a table
+    * calls the dump_tab_fkt with 3 different fkt-pointers as argument
+      depending on what was selected at the commandline
+
+ctx        [IN] ... contains path, tablename, columns, row-range etc.
+my_manager [IN] ... open manager needed for vdb-calls
+***************************************************************************/
+static rc_t vdm_dump_table( const p_dump_context ctx, const VDBManager *my_manager )
+{
+    rc_t rc;
+
+    /* take ctx->path as table ( if ctx->table is empty ) */
+    if ( ctx->table == NULL )
+    {
+        ctx->table = string_dup_measure ( ctx->path, NULL );
+    }
+    if ( ctx->schema_dump_requested )
+    {
+        rc = vdm_dump_tab_fkt( ctx, my_manager, vdm_dump_tab_schema );
+    }
+    else if ( ctx->table_enum_requested )
+    {
+        KOutMsg( "cannot enum tables of a table-object\n" );
+        vdm_clear_recorded_errors();
+        rc = 0;
+    }
+    else if ( enum_col_request( ctx ) )
+    {
+        rc = vdm_dump_tab_fkt( ctx, my_manager, vdm_enum_tab_columns );
+    }
+    else if ( ctx->id_range_requested )
+    {
+        rc = vdm_dump_tab_fkt( ctx, my_manager, vdm_print_tab_id_range );
+    }
+    else if ( ctx->idx_enum_requested )
+    {
+        rc = vdm_dump_tab_fkt( ctx, my_manager, vdm_enum_tab_index );
+    }
+    else if ( ctx->idx_range_requested )
+    {
+        rc = vdm_dump_tab_fkt( ctx, my_manager, vdm_range_tab_index );
+    }
+    else if ( ctx->show_spotgroups )
+    {
+        rc = vdm_dump_tab_fkt( ctx, my_manager, vdm_show_tab_spotgroups );
+    }
+    else if ( ctx->show_spread )
+    {
+        rc = vdm_dump_tab_fkt( ctx, my_manager, vdm_show_tab_spread );
+    }
+    else
+    {
+        rc = vdm_dump_tab_fkt( ctx, my_manager, vdm_dump_opened_table );
+    }
+    return rc;
+}
+
+typedef rc_t (*db_fkt_t)( const p_dump_context ctx, const VDatabase *a_db );
+
+/*************************************************************************************
+    dump_db_fkt:
+    * called by "dump_database()" to handle a database
+    * if the user has provided the name of a schema-file:
+        - make a schema from manager
+        - parse the schema-file
+        - use this schema to open the database
+    * if we do not have a schema-file, use NULL ( that means the internal db-schema )
+    * open the database for read
+    * if the user has not given a table-name to dump:
+        - take the first table found in the database
+    * if we now have a table-name
+        - call the function-pointer, with context and database
+    * if we do not have a table-name
+        - request display of the usage-message
+    * release database and schema
+
+ctx    [IN] ... contains source-path, tablename, columns and row-range as ascii-text
+db_fkt [IN] ... function to be called if directory, manager and database are open
+*************************************************************************************/
+static rc_t vdm_dump_db_fkt( const p_dump_context ctx,
+                             const VDBManager * mgr,
+                             const db_fkt_t db_fkt )
+{
+    const VDatabase *db;
+    VSchema *schema = NULL;
+    rc_t rc;
+
+    vdh_parse_schema( mgr, &schema, &(ctx->schema_list), true /* ctx->force_sra_schema */ );
+
+    rc = VDBManagerOpenDBRead( mgr, &db, schema, "%s", ctx->path );
+    if ( rc != 0 )
+        ErrMsg( "VDBManagerOpenDBRead( '%s' ) -> %R", ctx->path, rc );
+    else
+    {
+        KNamelist *tbl_names;
+        rc = VDatabaseListTbl( db, &tbl_names );
+        if ( rc != 0 )
+            ErrMsg( "VDatabaseListTbl( '%s' ) -> %R", ctx->path, rc );
+        else
+        {
+            if ( ctx->table == NULL )
+            {
+                /* the user DID NOT not specify a table: by default assume the SEQUENCE-table */
+                bool table_found = vdh_take_this_table_from_list( ctx, tbl_names, "SEQUENCE" );
+                /* if there is no SEQUENCE-table, just pick the first table available... */
+                if ( !table_found )
+                    vdh_take_1st_table_from_db( ctx, tbl_names );
+            }
+            else
+            {
+                /* the user DID specify a table: check if the database has a table with this name,
+                   if not try with a sub-string */
+                String value;
+                StringInitCString( &value, ctx->table );
+                if ( !list_contains_value( tbl_names, &value ) )
+                    vdh_take_this_table_from_list( ctx, tbl_names, ctx->table );
+            }
+            
+            if ( ctx->table != NULL || ctx->table_enum_requested )
+            {
+                rc = db_fkt( ctx, db ); /* fkt-pointer is called */
+            }
+            else
+            {
+                LOGMSG( klogInfo, "opened as vdb-database, but no table found" );
+                ctx->usage_requested = true;
+            }
+            rc = KNamelistRelease( tbl_names );
+            if ( rc != 0 )
+                ErrMsg( "KNamelistRelease() -> %R", rc );
+        }
+        rc = VDatabaseRelease( db );
+        if ( rc != 0 )
+            ErrMsg( "VDatabaseRelease() -> %R", rc );
+    }
+
+    if ( schema != NULL )
+    {
+        rc = VSchemaRelease( schema );
+        if ( rc != 0 )
+            ErrMsg( "VSchemaRelease() -> %R", rc );
+    }
+    
+    return rc;
+}
+
+
+/***************************************************************************
+    dump_database:
+    * called by "dump_main()"
+    * calls the dump_db_fkt with 4 different fkt-pointers as argument
+      depending on what was selected at the commandline
+
+ctx        [IN] ... contains path, tablename, columns, row-range etc.
+my_manager [IN] ... open manager needed for vdb-calls
+***************************************************************************/
+static rc_t vdm_dump_database( const p_dump_context ctx, const VDBManager *my_manager )
+{
+    rc_t rc;
+
+    if ( ctx->schema_dump_requested )
+    {
+        rc = vdm_dump_db_fkt( ctx, my_manager, vdm_dump_db_schema );
+    }
+    else if ( ctx->table_enum_requested )
+    {
+        rc = vdm_dump_db_fkt( ctx, my_manager, vdm_enum_tables );
+    }
+    else if ( enum_col_request( ctx ) )
+    {
+        rc = vdm_dump_db_fkt( ctx, my_manager, vdm_enum_db_columns );
+    }
+    else if ( ctx->id_range_requested )
+    {
+        rc = vdm_dump_db_fkt( ctx, my_manager, vdm_print_db_id_range );
+    }
+    else if ( ctx->idx_enum_requested )
+    {
+        rc = vdm_dump_db_fkt( ctx, my_manager, vdm_enum_db_index );
+    }
+    else if ( ctx->idx_range_requested )
+    {
+        rc = vdm_dump_db_fkt( ctx, my_manager, vdm_range_db_index );
+    }
+    else if ( ctx->show_spotgroups )
+    {
+        rc = vdm_dump_db_fkt( ctx, my_manager, vdm_show_db_spotgroups );
+    }
+    else if ( ctx->show_spread )
+    {
+        rc = vdm_dump_db_fkt( ctx, my_manager, vdm_show_db_spread );
+    }
+    else
+    {
+        rc = vdm_dump_db_fkt( ctx, my_manager, vdm_dump_opened_database );
+    }
+
+    return rc;
+}
+
+
+static rc_t vdm_print_objver( const p_dump_context ctx, const VDBManager *mgr )
+{
+    ver_t version;
+    rc_t rc = VDBManagerGetObjVersion ( mgr, &version, ctx->path );
+    if ( rc != 0 )
+        ErrMsg( "VDBManagerGetObjVersion( '%s' ) -> %R", ctx->path, rc );
+    else
+        rc = KOutMsg( "%V\n", version );
+    return rc;
+}
+
+static rc_t vdm_print_objts ( const p_dump_context ctx, const VDBManager *mgr )
+{
+    KTime_t timestamp;
+    rc_t rc = VDBManagerGetObjModDate ( mgr, &timestamp, ctx->path );
+    if ( rc != 0 )
+        ErrMsg( "VDBManagerGetObjModDate( '%s' ) -> %R", ctx->path, rc  );
+    if ( rc == 0 )
+    {
+        KTime kt;
+        KTimeGlobal ( & kt, timestamp );
+        rc = KOutMsg ( "%04u-%02u-%02uT"
+                       "%02u:%02u:%02uZ"
+                       "\n",
+                       kt . year,
+                       kt . month,
+                       kt . day,
+                       kt . hour,
+                       kt . minute,
+                       kt . second
+            );
+    }
+    return rc;
+}
+
+static void vdm_print_objtype( const VDBManager *mgr, const char * acc_or_path )
+{
+    int path_type = ( VDBManagerPathType ( mgr, "%s", acc_or_path ) & ~ kptAlias );
+    /* types defined in <kdb/manager.h> */
+    switch ( path_type )
+    {
+    case kptDatabase      :   KOutMsg( "Database\n" ); break;
+    case kptTable         :   KOutMsg( "Table\n" ); break;
+    case kptPrereleaseTbl :   KOutMsg( "Prerelease Table\n" ); break;
+    case kptColumn        :   KOutMsg( "Column\n" ); break;
+    case kptIndex         :   KOutMsg( "Index\n" ); break;
+    case kptNotFound      :   KOutMsg( "not found\n" ); break;
+    case kptBadPath       :   KOutMsg( "bad path\n" ); break;
+    case kptFile          :   KOutMsg( "File\n" ); break;
+    case kptDir           :   KOutMsg( "Dir\n" ); break;
+    case kptCharDev       :   KOutMsg( "CharDev\n" ); break;
+    case kptBlockDev      :   KOutMsg( "BlockDev\n" ); break;
+    case kptFIFO          :   KOutMsg( "FIFO\n" ); break;
+    case kptZombieFile    :   KOutMsg( "ZombieFile\n" ); break;
+    case kptDataset       :   KOutMsg( "Dataset\n" ); break;
+    case kptDatatype      :   KOutMsg( "Datatype\n" ); break;
+    default               :   KOutMsg( "value = '%i'\n", path_type ); break;
+    }
+}
+
+
+static rc_t vdb_main_one_obj_by_pathtype( const p_dump_context ctx,
+                                          const VDBManager *mgr )
+{
+    rc_t rc;
+    int path_type = ( VDBManagerPathType ( mgr, "%s", ctx->path ) & ~ kptAlias );
+    /* types defined in <kdb/manager.h> */
+    switch ( path_type )
+    {
+    case kptDatabase    :   rc = vdm_dump_database( ctx, mgr ); break;
+
+    case kptPrereleaseTbl:
+    case kptTable       :   rc = vdm_dump_table( ctx, mgr ); break;
+
+    default             :   rc = RC( rcVDB, rcNoTarg, rcConstructing, rcItem, rcNotFound );
+                            PLOGERR( klogInt, ( klogInt, rc,
+                                "the path '$(p)' cannot be opened as vdb-database or vdb-table",
+                                "p=%s", ctx->path ) );
+                            if ( vdco_schema_count( ctx ) == 0 )
+                            {
+                                LOGERR( klogInt, rc, "Maybe it is a legacy table. If so, specify a schema with the -S option" );
+                            }
+                            break;
+    }
+    return rc;
+}
+
+
+static rc_t vdb_main_one_obj_by_probing( const p_dump_context ctx,
+                                         const VDBManager *mgr )
+{
+    rc_t rc;
+    if ( vdh_is_path_database( mgr, ctx->path, &(ctx->schema_list) ) )
+    {
+        rc = vdm_dump_database( ctx, mgr );
+    }
+    else if ( vdh_is_path_table( mgr, ctx->path, &(ctx->schema_list) ) )
+    {
+        rc = vdm_dump_table( ctx, mgr );
+    }
+    else
+    {
+        rc = RC( rcVDB, rcNoTarg, rcConstructing, rcItem, rcNotFound );
+        PLOGERR( klogInt, ( klogInt, rc,
+                 "the path '$(p)' cannot be opened as vdb-database or vdb-table",
+                 "p=%s", ctx->path ) );
+        if ( vdco_schema_count( ctx ) == 0 )
+        {
+            LOGERR( klogInt, rc, "Maybe it is a legacy table. If so, specify a schema with the -S option" );
+        }
+    }
+    return rc;
+}
+
+
+static rc_t vdm_main_one_obj( const p_dump_context ctx,
+                        const VDBManager *mgr,
+                        const char * acc_or_path )
+{
+    rc_t rc = 0;
+
+    ctx->path = string_dup_measure ( acc_or_path, NULL );
+
+    if ( ctx->objver_requested )
+    {
+        rc = vdm_print_objver( ctx, mgr );
+    }
+    else if ( ctx->objts_requested )
+    {
+        rc = vdm_print_objts ( ctx, mgr );
+    }
+    else if ( ctx->objtype_requested )
+    {
+        vdm_print_objtype( mgr, acc_or_path );
+    }
+    else
+    {
+        if ( USE_PATHTYPE_TO_DETECT_DB_OR_TAB ) /* in vdb-dump-context.h */
+        {
+            rc = vdb_main_one_obj_by_pathtype( ctx, mgr );
+        }
+        else
+        {
+            rc = vdb_main_one_obj_by_probing( ctx, mgr );
+        }
+    }
+
+    free( (char*)ctx->path );
+    ctx->path = NULL;
+
+    return rc;
+}
+
+
+/***************************************************************************
+    dump_main:
+    * called by "KMain()"
+    * make the "native directory"
+    * make a vdb-manager for read
+      all subsequent dump-functions will use this manager...
+    * show the manager-version, if it was requested from the command-line
+    * check if the given path is database-path ( by trying to open it )
+      if it is one: continue wit dump_database()
+    * check if the given path is table-path ( by trying to open it )
+      if it is one: continue wit dump_table()
+    * release manager and directory
+
+ctx        [IN] ... contains path, tablename, columns, row-range etc.
+***************************************************************************/
+static rc_t vdm_main( const p_dump_context ctx, Args * args )
+{
+    KDirectory *dir;
+    rc_t rc1, rc = KDirectoryNativeDir( &dir );
+    if ( rc != 0 )
+        ErrMsg( "KDirectoryNativeDir() -> %R", rc );
+    else
+    {
+        const VDBManager *mgr;
+        rc = VDBManagerMakeRead( &mgr, dir );
+        if ( rc != 0 )
+            ErrMsg( "VDBManagerMakeRead() -> %R", rc );
+        else
+        {
+            if ( ctx->disable_multithreading )
+            {
+                rc = VDBManagerDisablePagemapThread( mgr );
+                if ( rc != 0 )
+                {
+                    ErrMsg( "VDBManagerDisablePagemapThread() -> %R", rc );
+                    rc = 0;
+                }
+            }
+            
+            /* show manager is independend form db or tab */
+            if ( ctx->version_requested )
+                rc = vdh_show_manager_version( mgr );
+            else
+            {
+                uint32_t count;
+                rc = ArgsParamCount( args, &count );
+                if ( rc != 0 )
+                    ErrMsg( "ArgsParamCount() -> %R", rc );
+                else
+                {
+                    if ( count > 0 )
+                    {
+                        uint32_t idx;
+                        for ( idx = 0; idx < count && rc == 0; ++idx )
+                        {
+                            const char *value = NULL;
+                            rc = ArgsParamValue( args, idx, (const void **)&value );
+                            if ( rc != 0 )
+                                ErrMsg( "ArgsParamValue() -> %R", rc );
+                            else
+                            {
+                                if ( ctx->print_info )
+                                    rc = vdb_info( &(ctx->schema_list), ctx->format, mgr,
+                                                   value, ctx->rows );   /* in vdb_info.c */
+                                else switch( ctx->format )
+                                {
+                                    case df_fastq  : ;
+                                    case df_fastq1 : ;                                    
+                                    case df_fasta  : ;
+                                    case df_fasta1 : ;
+                                    case df_fasta2 : ;
+                                    case df_qual   : ;                                    
+                                    case df_qual1  : vdf_main( ctx, mgr, value ); break; /* in vdb-dump-fastq.c */
+                                    default : rc = vdm_main_one_obj( ctx, mgr, value ); break;
+                                }
+                            }
+                        }
+                    }
+                    else
+                    {
+                        UsageSummary ( UsageDefaultName );
+                        rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInsufficient);
+                    }
+                }
+            }
+            rc1 = VDBManagerRelease( mgr );
+            if ( rc1 != 0 )
+                ErrMsg( "VDBManagerRelease() -> %R", rc );
+        }
+        rc1 = KDirectoryRelease( dir );
+        if ( rc != 0 )
+            ErrMsg( "KDirectoryRelease() -> %R", rc );
+    }
+    return rc;
+}
+
+
+static rc_t diff_files( Args * args )
+{
+    uint32_t count;
+    rc_t rc = ArgsParamCount( args, &count );
+    if ( rc != 0 )
+        ErrMsg( "ArgsParamCount() -> %R", rc );
+    else
+    {
+        if ( count != 2 )
+            KOutMsg( "this function needs exactly 2 files to diff\n" );
+        else
+        {
+            const char * f1;
+            rc = ArgsParamValue( args, 0, (const void **)&f1 );
+            if ( rc != 0 )
+                ErrMsg( "ArgsParamValue( 0 ) -> %R", rc );
+            else
+            {
+                const char * f2;
+                rc = ArgsParamValue( args, 1, (const void **)&f2 );
+                if ( rc != 0 )
+                    ErrMsg( "ArgsParamValue( 1 ) -> %R", rc );
+                else
+                    rc = vds_diff( f1, f2 ); /* in vdb-dump-str.c */
+            }
+        }
+    }
+    return rc;
+}
+
+
+/***************************************************************************
+    Main:
+    * create the dump-context
+    * parse the commandline for arguments and options
+    * react to help/usage - requests ( no dump in this case )
+      these functions are in vdb-dump-context.c
+    * call dump_main() to execute the dump
+    * destroy the dump-context
+***************************************************************************/
+static
+rc_t CC write_to_FILE ( void *f, const char *buffer, size_t bytes, size_t *num_writ )
+{
+    * num_writ = fwrite ( buffer, 1, bytes, f );
+    if ( * num_writ != bytes )
+        return RC ( rcExe, rcFile, rcWriting, rcTransfer, rcIncomplete );
+    return 0;
+}
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    Args * args;
+    rc_t rc = KOutHandlerSet( write_to_FILE, stdout );
+    if ( rc != 0 )
+        ErrMsg( "KOutHandlerSet() -> %R", rc );
+    else
+    {
+        rc = ArgsMakeAndHandle( &args, argc, argv,
+            1, DumpOptions, sizeof DumpOptions / sizeof DumpOptions [ 0 ] );
+        if ( rc != 0 )
+            ErrMsg( "ArgsMakeAndHandle() -> %R", rc );
+        else
+        {
+            dump_context *ctx;
+
+            rc = vdco_init( &ctx );
+            if ( rc == 0 )
+            {
+                rc = vdco_capture_arguments_and_options( args, ctx );
+                if ( rc == 0 )
+                {
+                    out_redir redir; /* vdb-dump-redir.h */
+                    
+                    KLogHandlerSetStdErr();
+                    rc = init_out_redir( &redir,
+                                     ctx->compress_mode,
+                                     ctx->output_file,
+                                     ctx->interactive ? 0 : ctx->output_buffer_size ); /* vdb-dump-redir.c */
+                    
+                    if ( rc == 0 )
+                    {
+                        if ( ctx->phase > 0 )
+                            rc = vdi_bin_phase( ctx, args ); /* vdb-dump-bin.c */
+                        else if ( ctx->diff )
+                            rc = diff_files( args ); /* above calls into vdb-dump-str.c */
+                        else if ( ctx->interactive )
+                            rc = vdi_main( ctx, args ); /* vdb-dump-interact.c */
+                        else if ( ctx->slice_depth > 0 )
+                            rc = find_slice( ctx, args ); /* vdb-dump-str.c */
+                        else
+                            rc = vdm_main( ctx, args );
+                    
+                        release_out_redir( &redir ); /* vdb-dump-redir.c */
+                    }
+                }
+                vdco_destroy( ctx );
+            }
+            ArgsWhack( args );
+        }
+    }
+    return rc;
+}
+
diff --git a/tools/vdb-dump/vdb_info.c b/tools/vdb-dump/vdb_info.c
new file mode 100644
index 0000000..d8a5318
--- /dev/null
+++ b/tools/vdb-dump/vdb_info.c
@@ -0,0 +1,1528 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/rc.h>
+#include <klib/out.h>
+#include <klib/time.h>
+#include <klib/printf.h>
+#include <klib/num-gen.h>
+#include <klib/text.h>
+
+#include <kfs/directory.h>
+#include <kfs/file.h>
+
+#include <kns/manager.h>
+#include <kns/http.h>
+
+#include <kdb/manager.h>
+#include <kdb/meta.h>
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <vdb/database.h>
+#include <vdb/vdb-priv.h>
+
+#include "vdb-dump-context.h"
+#include "vdb-dump-helper.h"
+#include "vdb-dump-coldefs.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+static const char * PT_DATABASE = "Database";
+static const char * PT_TABLE    = "Table";
+static const char * PT_NONE     = "None";
+
+typedef struct vdb_info_vers
+{
+    char s_vers[ 16 ];
+    uint8_t major, minor, release;
+} vdb_info_vers;
+
+
+typedef struct vdb_info_date
+{
+    char date[ 32 ];
+    uint64_t timestamp;
+
+    uint16_t year;
+    uint8_t month;
+    uint8_t day;
+    uint8_t hour;
+    uint8_t minute;
+} vdb_info_date;
+
+typedef struct vdb_info_event
+{
+    char name[ 32 ];
+    vdb_info_vers vers;
+    vdb_info_date tool_date;
+    vdb_info_date run_date;
+} vdb_info_event;
+
+typedef struct vdb_info_bam_hdr
+{
+    bool present;
+    size_t hdr_bytes;
+    uint32_t total_lines;
+    uint32_t HD_lines;
+    uint32_t SQ_lines;
+    uint32_t RG_lines;
+    uint32_t PG_lines;
+} vdb_info_bam_hdr;
+
+typedef struct vdb_info_data
+{
+    const char * acc;
+    const char * s_path_type;
+    const char * s_platform;
+
+    char path[ 4096 ];
+    char remote_path[ 4096 ];
+    char cache[ 1024 ];
+    char schema_name[ 1024 ];
+    char species[ 1024 ];
+    
+    vdb_info_event formatter;
+    vdb_info_event loader;
+    vdb_info_event update;
+
+    vdb_info_date ts;
+
+    vdb_info_bam_hdr bam_hdr;
+    
+    float cache_percent;
+    uint64_t bytes_in_cache;
+
+    uint64_t seq_rows;
+    uint64_t ref_rows;
+    uint64_t prim_rows;
+    uint64_t sec_rows;
+    uint64_t ev_rows;
+    uint64_t ev_int_rows;
+    uint64_t consensus_rows;
+    uint64_t passes_rows;
+    uint64_t metrics_rows;
+
+    uint64_t file_size;
+} vdb_info_data;
+
+
+/* ----------------------------------------------------------------------------- */
+
+typedef struct split_vers_ctx
+{
+    char tmp[ 32 ];
+    uint32_t dst;
+    uint32_t sel;
+} split_vers_ctx;
+
+static void store_vers( vdb_info_vers * vers, split_vers_ctx * ctx )
+{
+    ctx->tmp[ ctx->dst ] = 0;
+    switch ( ctx->sel )
+    {
+        case 0 : vers->major = atoi( ctx->tmp ); break;
+        case 1 : vers->minor = atoi( ctx->tmp ); break;
+        case 2 : vers->release = atoi( ctx->tmp ); break;
+    }
+    ctx->sel++;
+    ctx->dst = 0;
+}
+
+static void split_vers( vdb_info_vers * vers )
+{
+    uint32_t i, l = string_measure ( vers->s_vers, NULL );
+    split_vers_ctx ctx;
+    memset( &ctx, 0, sizeof ctx );
+    for ( i = 0; i < l; ++i )
+    {
+        char c = vers->s_vers[ i ];
+        if ( c >= '0' && c <= '9' )
+            ctx.tmp[ ctx.dst++ ] = c;
+        else if ( c == '.' )
+            store_vers( vers, &ctx );
+    }
+    if ( ctx.dst > 0 )
+        store_vers( vers, &ctx );
+}
+
+/* ----------------------------------------------------------------------------- */
+
+typedef struct split_date_ctx
+{
+    char tmp[ 32 ];
+    uint32_t dst;
+} split_date_ctx;
+
+
+static uint8_t str_to_month_num( const char * s )
+{
+    uint8_t res = 0;
+    switch( s[ 0 ] )
+    {
+        case 'A' : ;
+        case 'a' : switch ( s[ 1 ] )
+                    {
+                        case 'P' : ;
+                        case 'p' : switch ( s[ 2 ] )
+                                    {
+                                        case 'R' :  ;
+                                        case 'r' :  res = 4; break;
+                                    }
+                                    break;
+                        case 'U' : ;
+                        case 'u' : switch ( s[ 2 ] )
+                                    {
+                                        case 'G' :  ;
+                                        case 'g' :  res = 8; break;
+                                    }
+                                    break;
+                    }
+                    break;
+
+        case 'F' : ;
+        case 'f' : switch ( s[ 1 ] )
+                    {
+                        case 'E' : ;
+                        case 'e' : switch ( s[ 2 ] )
+                                    {
+                                        case 'B' :  ;
+                                        case 'b' :  res = 2; break;
+                                    }
+                                    break;
+                    }
+                    break;
+
+        case 'J' : ;
+        case 'j' : switch ( s[ 1 ] )
+                    {
+                        case 'A' : ;
+                        case 'a' : switch ( s[ 2 ] )
+                                    {
+                                        case 'N' :  ;
+                                        case 'n' :  res = 1; break;
+                                    }
+                                    break;
+                        case 'U' : ;
+                        case 'u' : switch ( s[ 2 ] )
+                                    {
+                                        case 'N' :  ;
+                                        case 'n' :  res = 6; break;
+                                        case 'L' :  ;
+                                        case 'l' :  res = 7; break;
+                                    }
+                                    break;
+                    }
+                    break;
+
+        case 'M' : ;
+        case 'm' : switch ( s[ 1 ] )
+                    {
+                        case 'A' : ;
+                        case 'a' : switch ( s[ 2 ] )
+                                    {
+                                        case 'R' :  ;
+                                        case 'r' :  res = 3; break;
+                                        case 'Y' :  ;
+                                        case 'y' :  res = 5; break;
+                                    }
+                                    break;
+                    }
+                    break;
+
+        case 'S' : ;
+        case 's' : switch ( s[ 1 ] )
+                    {
+                        case 'E' : ;
+                        case 'e' : switch ( s[ 2 ] )
+                                    {
+                                        case 'P' :  ;
+                                        case 'p' :  res = 9; break;
+                                    }
+                                    break;
+                    }
+                    break;
+
+        case 'O' : ;
+        case 'o' : switch ( s[ 1 ] )
+                    {
+                        case 'C' : ;
+                        case 'c' : switch ( s[ 2 ] )
+                                    {
+                                        case 'T' :  ;
+                                        case 't' :  res = 10; break;
+                                    }
+                                    break;
+                    }
+                    break;
+
+        case 'N' : ;
+        case 'n' : switch ( s[ 1 ] )
+                    {
+                        case 'O' : ;
+                        case 'o' : switch ( s[ 2 ] )
+                                    {
+                                        case 'V' :  ;
+                                        case 'v' :  res = 11; break;
+                                    }
+                                    break;
+                    }
+                    break;
+
+        case 'D' : ;
+        case 'd' : switch ( s[ 1 ] )
+                    {
+                        case 'E' : ;
+                        case 'e' : switch ( s[ 2 ] )
+                                    {
+                                        case 'C' :  ;
+                                        case 'c' :  res = 12; break;
+                                    }
+                                    break;
+                    }
+                    break;
+    }
+    return res;
+}
+
+static void store_date( vdb_info_date * d, split_date_ctx * ctx )
+{
+    uint32_t l, value;
+
+    ctx->tmp[ ctx->dst ] = 0;
+    l = string_measure ( ctx->tmp, NULL );
+    value = atoi( ctx->tmp );
+    if ( l == 4 )
+        d->year = value;
+    else if ( ( l == 8 ) && ( ctx->tmp[ 2 ] == ':' ) && ( ctx->tmp[ 5 ] == ':' ) )
+    {
+        ctx->tmp[ 2 ] = 0;
+        d->hour = atoi( ctx->tmp );
+        ctx->tmp[ 5 ] = 0;
+        d->minute = atoi( &( ctx->tmp[ 3 ] ) );
+    }
+    else if ( l == 3 )
+    {
+        d->month = str_to_month_num( ctx->tmp );
+    }
+    else
+    {
+        d->day = value;
+    }
+    ctx->dst = 0;
+}
+
+static void split_date( vdb_info_date * d )
+{
+    uint32_t i, l = string_measure ( d->date, NULL );
+    split_date_ctx ctx;
+    memset( &ctx, 0, sizeof ctx );
+    for ( i = 0; i < l; ++i )
+    {
+        char c = d->date[ i ];
+        if ( c == ' ' )
+            store_date( d, &ctx );
+        else
+            ctx.tmp[ ctx.dst++ ] = c;
+    }
+    if ( ctx.dst > 0 )
+        store_date( d, &ctx );
+}
+
+/* ----------------------------------------------------------------------------- */
+static bool has_col( const VTable * tab, const char * colname )
+{
+    bool res = false;
+    struct KNamelist * columns;
+    rc_t rc = VTableListReadableColumns( tab, &columns );
+    if ( rc == 0 )
+    {
+        uint32_t count;
+        rc = KNamelistCount( columns, &count );
+        if ( rc == 0 && count > 0 )
+        {
+            uint32_t idx;
+            size_t colname_size = string_size( colname );
+            for ( idx = 0; idx < count && rc == 0 && !res; ++idx )
+            {
+                const char * a_name;
+                rc = KNamelistGet ( columns, idx, &a_name );
+                if ( rc == 0 )
+                {
+                    int cmp;
+                    size_t a_name_size = string_size( a_name );
+                    uint32_t max_chars = ( uint32_t )colname_size;
+                    if ( a_name_size > max_chars ) max_chars = ( uint32_t )a_name_size;
+                    cmp = strcase_cmp ( colname, colname_size,
+                                        a_name, a_name_size,
+                                        max_chars );
+                    res = ( cmp == 0 );
+                }
+            }
+        }
+        KNamelistRelease( columns );
+    }
+    return res;
+}
+
+static const char * get_platform( const VTable * tab )
+{
+    const char * res = PT_NONE;
+    if ( has_col( tab, "PLATFORM" ) )
+    {
+        const VCursor * cur;
+        rc_t rc = VTableCreateCursorRead( tab, &cur );
+        if ( rc == 0 )
+        {
+            uint32_t idx;
+            rc = VCursorAddColumn( cur, &idx, "PLATFORM" );
+            if ( rc == 0 )
+            {
+                rc = VCursorOpen( cur );
+                if ( rc == 0 )
+                {
+                    const uint8_t * pf;
+                    rc = VCursorCellDataDirect( cur, 1, idx, NULL, (const void**)&pf, NULL, NULL );
+                    if ( rc == 0 )
+                    {
+                        res = vdcd_get_platform_txt( *pf );
+                    }
+                }
+            }
+            VCursorRelease( cur );
+        }
+    }
+    return res;
+}
+
+
+static void get_string_cell( char * buffer, size_t buffer_size, const VTable * tab, int64_t row, const char * column )
+{
+    if ( has_col( tab, column ) )
+    {
+        const VCursor * cur;
+        rc_t rc = VTableCreateCursorRead( tab, &cur );
+        if ( rc == 0 )
+        {
+            uint32_t idx;
+            rc = VCursorAddColumn( cur, &idx, column );
+            if ( rc == 0 )
+            {
+                rc = VCursorOpen( cur );
+                if ( rc == 0 )
+                {
+                    const char * src;
+                    uint32_t row_len;
+                    rc = VCursorCellDataDirect( cur, row, idx, NULL, (const void**)&src, NULL, &row_len );
+                    if ( rc == 0 )
+                    {
+                        size_t num_writ;
+                        string_printf( buffer, buffer_size, &num_writ, "%.*s", row_len, src );
+                    }
+                }
+            }
+            VCursorRelease( cur );
+        }
+    }
+}
+
+
+static uint64_t get_rowcount( const VTable * tab )
+{
+    uint64_t res = 0;
+    col_defs *my_col_defs;
+    if ( vdcd_init( &my_col_defs, 1024 ) )
+    {
+        if ( vdcd_extract_from_table( my_col_defs, tab ) > 0 )
+        {
+            const VCursor * cur;
+            rc_t rc = VTableCreateCursorRead( tab, &cur );
+            if ( rc == 0 )
+            {
+                if ( vdcd_add_to_cursor( my_col_defs, cur ) )
+                {
+                    rc = VCursorOpen( cur );
+                    if ( rc == 0 )
+                    {
+                        uint32_t idx;
+                        if ( vdcd_get_first_none_static_column_idx( my_col_defs, cur, &idx ) )
+                        {
+                            int64_t first;
+                            rc = VCursorIdRange( cur, idx, &first, &res );
+                        }
+                    }
+                }
+                VCursorRelease( cur );
+            }
+        }
+        vdcd_destroy( my_col_defs );
+    }
+    return res;
+}
+
+
+/* ----------------------------------------------------------------------------- */
+
+
+static void get_meta_attr( const KMDataNode * node, const char * key, char * dst, size_t dst_size )
+{
+    size_t size;
+    rc_t rc = KMDataNodeReadAttr ( node, key, dst, dst_size, &size );
+    if ( rc == 0 )
+        dst[ size ] = 0;
+}
+
+
+static void get_meta_event( const KMetadata * meta, const char * node_path, vdb_info_event * event )
+{
+    const KMDataNode * node;
+    rc_t rc = KMetadataOpenNodeRead ( meta, &node, node_path );
+    if ( rc == 0 )
+    {
+        get_meta_attr( node, "name", event->name, sizeof event->name );
+        if ( event->name[ 0 ] == 0 )
+            get_meta_attr( node, "tool", event->name, sizeof event->name );
+
+        get_meta_attr( node, "vers", event->vers.s_vers, sizeof event->vers.s_vers );
+        split_vers( &event->vers );
+
+        get_meta_attr( node, "run", event->run_date.date, sizeof event->run_date.date );
+        split_date( &event->run_date );
+
+        get_meta_attr( node, "date", event->tool_date.date, sizeof event->tool_date.date );
+        if ( event->tool_date.date[ 0 ] == 0 )
+            get_meta_attr( node, "build", event->tool_date.date, sizeof event->tool_date.date );
+        split_date( &event->tool_date );
+
+        KMDataNodeRelease ( node );
+    }
+}
+
+static size_t get_node_size( const KMDataNode * node )
+{
+    char buffer[ 10 ];
+    size_t num_read, remaining, res = 0;
+    rc_t rc = KMDataNodeRead( node, 0, buffer, sizeof( buffer ), &num_read, &remaining );
+    if ( rc == 0 ) res = num_read + remaining;
+    return res;
+}
+
+static bool is_newline( const char c ) { return ( c == 0x0A || c == 0x0D ); }
+
+static void inspect_line( vdb_info_bam_hdr * bam_hdr, char * line, size_t len )
+{
+    bam_hdr->total_lines++;
+    if ( len > 3 && line[ 0 ] == '@' )
+    {
+        switch( line[ 1 ] )
+        {
+            case 'H'    : if ( line[ 2 ] == 'D' ) bam_hdr->HD_lines++; break;
+            case 'S'    : if ( line[ 2 ] == 'Q' ) bam_hdr->SQ_lines++; break;
+            case 'R'    : if ( line[ 2 ] == 'G' ) bam_hdr->RG_lines++; break;
+            case 'P'    : if ( line[ 2 ] == 'G' ) bam_hdr->PG_lines++; break;
+        }
+    }
+}
+
+static void parse_buffer( vdb_info_bam_hdr * bam_hdr, char * buffer, size_t len )
+{
+    char * line;
+    size_t idx, line_len, state = 0;
+    for ( idx = 0; idx < len; ++idx )
+    {
+        switch( state )
+        {
+            case 0 :    if ( is_newline( buffer[ idx ] ) ) /* init */
+                            state = 2;
+                        else
+                        {
+                            line = &( buffer[ idx ] );
+                            line_len = 1;
+                            state = 1;
+                        }
+                        break;
+                      
+            case 1 :    if ( is_newline( buffer[ idx ] ) ) /* content */
+                        {
+                            inspect_line( bam_hdr, line, line_len );
+                            state = 2;
+                        }
+                        else
+                            line_len++;
+                        break;
+
+            case 2 :   if ( !is_newline( buffer[ idx ] ) ) /* newline */
+                        {
+                            line = &( buffer[ idx ] );
+                            line_len = 1;
+                            state = 1;
+                        }
+                        break;
+        }
+    }
+}
+
+static void get_meta_bam_hdr( vdb_info_bam_hdr * bam_hdr, const KMetadata * meta )
+{
+    const KMDataNode * node;
+    rc_t rc = KMetadataOpenNodeRead ( meta, &node, "BAM_HEADER" );
+    bam_hdr -> present = ( rc == 0 );
+    if ( bam_hdr -> present )
+    {
+        bam_hdr->hdr_bytes = get_node_size( node );
+        if ( bam_hdr->hdr_bytes > 0 )
+        {
+            char * buffer = malloc( bam_hdr->hdr_bytes );
+            if ( buffer != NULL )
+            {
+                size_t num_read, remaining;
+                rc = KMDataNodeRead( node, 0, buffer, bam_hdr->hdr_bytes, &num_read, &remaining );
+                if ( rc == 0 )
+                {
+                    parse_buffer( bam_hdr, buffer, bam_hdr->hdr_bytes );
+                }
+                free( buffer );
+            }
+        }
+        KMDataNodeRelease ( node );
+    }
+}
+
+static void get_meta_info( vdb_info_data * data, const KMetadata * meta )
+{
+    const KMDataNode * node;
+    rc_t rc = KMetadataOpenNodeRead ( meta, &node, "schema" );
+    if ( rc == 0 )
+    {
+        size_t size;
+        rc = KMDataNodeReadAttr ( node, "name", data->schema_name, sizeof data->schema_name, &size );
+        if ( rc == 0 )
+            data->schema_name[ size ] = 0;
+        KMDataNodeRelease ( node );
+    }
+
+    rc = KMetadataOpenNodeRead ( meta, &node, "LOAD/timestamp" );
+    if ( rc == 0 )
+    {
+        rc = KMDataNodeReadAsU64 ( node, &data->ts.timestamp );
+        if ( rc == 0 )
+        {
+            KTime time_rec;
+            KTimeLocal ( &time_rec, data->ts.timestamp );
+            data->ts.year  = time_rec.year;
+            data->ts.month = time_rec.month + 1;
+            data->ts.day   = time_rec.day + 1;
+            data->ts.hour  = time_rec.hour;
+            data->ts.minute= time_rec.minute;
+        }
+        KMDataNodeRelease ( node );
+    }
+
+    get_meta_event( meta, "SOFTWARE/formatter", &data->formatter );
+    get_meta_event( meta, "SOFTWARE/loader", &data->loader );
+    get_meta_event( meta, "SOFTWARE/update", &data->update );
+    get_meta_bam_hdr( &data->bam_hdr, meta );
+}
+
+
+/* ----------------------------------------------------------------------------- */
+
+
+static const char * get_path_type( const VDBManager *mgr, const char * acc_or_path )
+{
+    const char * res = PT_NONE;
+    int path_type = ( VDBManagerPathType ( mgr, "%s", acc_or_path ) & ~ kptAlias );
+    switch ( path_type ) /* types defined in <kdb/manager.h> */
+    {
+        case kptDatabase      : res = PT_DATABASE; break;
+
+        case kptPrereleaseTbl :
+        case kptTable         : res = PT_TABLE; break;
+    }
+    return res;
+}
+
+
+static rc_t make_remote_file( const KFile ** f, const char * url )
+{
+    KNSManager * kns_mgr;
+    rc_t rc = KNSManagerMake ( & kns_mgr );
+    *f = NULL;    
+    if ( rc == 0 )
+    {
+        rc = KNSManagerMakeHttpFile ( kns_mgr, f, NULL, 0x01010000, "%s", url );
+        KNSManagerRelease ( kns_mgr );
+    }
+    return rc;
+}
+
+
+static rc_t make_local_file( const KFile ** f, const char * path )
+{
+    KDirectory * dir;
+    rc_t rc = KDirectoryNativeDir( &dir );
+    *f = NULL;
+    if ( rc == 0 )
+    {
+        rc = KDirectoryOpenFileRead( dir, f, "%s", path );
+        KDirectoryRelease( dir );
+    }
+    return rc;
+}
+
+
+static uint64_t get_file_size( const char * path, bool remotely )
+{
+    uint64_t res = 0;
+    const KFile * f;
+    rc_t rc = ( remotely ) ? make_remote_file( &f, path ) : make_local_file( &f, path );
+    if ( rc == 0 )
+    {
+        KFileSize ( f, &res );
+        KFileRelease( f );
+    }
+    return res;
+}
+
+
+static rc_t vdb_info_tab( vdb_info_data * data, VSchema * schema, const VDBManager *mgr )
+{
+    const VTable * tab;
+    rc_t rc = VDBManagerOpenTableRead( mgr, &tab, schema, "%s", data->acc );
+    if ( rc == 0 )
+    {
+        const KMetadata * meta = NULL;
+
+        data->s_platform = get_platform( tab );
+        data->seq_rows = get_rowcount( tab );
+        get_string_cell( data->species, sizeof data->species, tab, 1, "DEF_LINE" );
+
+        rc = VTableOpenMetadataRead ( tab, &meta );
+        if ( rc == 0 )
+        {
+            get_meta_info( data, meta );
+            KMetadataRelease ( meta );
+        }
+
+        VTableRelease( tab );
+    }
+    return rc;
+}
+
+
+static uint64_t get_tab_row_count( const VDatabase * db, const char * table_name )
+{
+    uint64_t res = 0;
+    const VTable * tab;
+    rc_t rc = VDatabaseOpenTableRead( db, &tab, table_name );
+    if ( rc == 0 )
+    {
+        res = get_rowcount( tab );
+        VTableRelease( tab );
+    }
+    return res;
+}
+
+
+static void get_species( char * buffer, size_t buffer_size, const VDatabase * db, const VDBManager *mgr )
+{
+    const VTable * tab;
+    rc_t rc = VDatabaseOpenTableRead( db, &tab, "REFERENCE" );
+    if ( rc == 0 )
+    {
+        char seq_id[ 1024 ];
+        
+        seq_id[ 0 ] = 0;
+        get_string_cell( seq_id, sizeof seq_id, tab, 1, "SEQ_ID" );
+        VTableRelease( tab );
+        if ( seq_id[ 0 ] != 0 )
+        {
+            rc = VDBManagerOpenTableRead( mgr, &tab, NULL, "%s", seq_id );
+            if ( rc == 0 )
+            {
+                get_string_cell( buffer, buffer_size, tab, 1, "DEF_LINE" );
+                VTableRelease( tab );    
+            }
+        }
+    }
+}
+
+static rc_t vdb_info_db( vdb_info_data * data, VSchema * schema, const VDBManager *mgr )
+{
+    const VDatabase * db;
+    rc_t rc = VDBManagerOpenDBRead( mgr, &db, schema, "%s", data->acc );
+    if ( rc == 0 )
+    {
+        const VTable * tab;
+        const KMetadata * meta = NULL;
+
+        rc_t rc1 = VDatabaseOpenTableRead( db, &tab, "SEQUENCE" );
+        if ( rc1 == 0 )
+        {
+            data->s_platform = get_platform( tab );
+            data->seq_rows = get_rowcount( tab );
+            VTableRelease( tab );
+        }
+
+        data->ref_rows          = get_tab_row_count( db, "REFERENCE" );
+        data->prim_rows         = get_tab_row_count( db, "PRIMARY_ALIGNMENT" );
+        data->sec_rows          = get_tab_row_count( db, "SECONDARY_ALIGNMENT" );
+        data->ev_rows           = get_tab_row_count( db, "EVIDENCE_ALIGNMENT" );
+        data->ev_int_rows       = get_tab_row_count( db, "EVIDENCE_INTERVAL" );
+        data->consensus_rows    = get_tab_row_count( db, "CONSENSUS" );
+        data->passes_rows       = get_tab_row_count( db, "PASSES" );
+        data->metrics_rows      = get_tab_row_count( db, "ZMW_METRICS" );
+
+        if ( data->ref_rows > 0 )
+            get_species( data->species, sizeof data->species, db, mgr );
+        
+        rc = VDatabaseOpenMetadataRead ( db, &meta );
+        if ( rc == 0 )
+        {
+            get_meta_info( data, meta );
+            KMetadataRelease ( meta );
+        }
+
+        VDatabaseRelease( db );
+    }
+    return rc;
+
+}
+
+
+/* ----------------------------------------------------------------------------- */
+
+
+static rc_t vdb_info_print_xml_s( const char * tag, const char * value )
+{
+    if ( value[ 0 ] != 0 )
+        return KOutMsg( "<%s>%s</%s>\n", tag, value, tag );
+    else
+        return 0;
+}
+
+static rc_t vdb_info_print_xml_uint64( const char * tag, const uint64_t value )
+{
+    if ( value != 0 )
+        return KOutMsg( "<%s>%lu<%s>\n", tag, value, tag );
+    else
+        return 0;
+}
+
+
+static rc_t vdb_info_print_xml_event( const char * tag, vdb_info_event * event )
+{
+    rc_t rc = 0;
+    if ( event->name[ 0 ] != 0 )
+    {
+        rc = KOutMsg( "<%s>\n", tag );
+        if ( rc == 0 )
+            rc = vdb_info_print_xml_s( "NAME", event->name );
+        if ( rc == 0 )
+            rc = vdb_info_print_xml_s( "VERS", event->vers.s_vers );
+        if ( rc == 0 )
+            rc = vdb_info_print_xml_s( "TOOLDATE", event->tool_date.date );
+        if ( rc == 0 )
+            rc = vdb_info_print_xml_s( "RUNDATE", event->run_date.date );
+        if ( rc == 0 )
+            rc = KOutMsg( "</%s>\n", tag );
+    }
+    return rc;
+}
+
+
+static rc_t vdb_info_print_xml( vdb_info_data * data )
+{
+    rc_t rc = KOutMsg( "<info>\n" );
+
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_s( "acc", data->acc );
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_s( "path", data->path );
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_uint64( "size", data->file_size );
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_s( "type", data->s_path_type );
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_s( "platf", data->s_platform );
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_uint64( "SEQ", data->seq_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_uint64( "REF", data->ref_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_uint64( "PRIM", data->prim_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_uint64( "SEC", data->sec_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_uint64( "EVID", data->ev_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_uint64( "EVINT", data->ev_int_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_uint64( "CONS", data->consensus_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_uint64( "PASS", data->passes_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_uint64( "METR", data->metrics_rows );
+
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_s( "SCHEMA", data->schema_name );
+
+    if ( rc == 0 && data->ts.timestamp != 0 )
+    {
+        rc = KOutMsg( "<TIMESTAMP>0x%.016x</TIMESTAMP>\n", data->ts.timestamp );
+        if ( rc == 0 )
+            rc = KOutMsg( "<MONTH>%.02d</MONTH>\n", data->ts.month );
+        if ( rc == 0 )
+            rc = KOutMsg( "<DAY>%.02d</DAY>\n", data->ts.day );
+        if ( rc == 0 )
+            rc = KOutMsg( "<YEAR>%.02d</YEAR>\n", data->ts.year );
+        if ( rc == 0 )
+            rc = KOutMsg( "<HOUR>%.02d</HOUR>\n", data->ts.hour );
+        if ( rc == 0 )
+            rc = KOutMsg( "<MINUTE>%.02d</MINUTE>\n", data->ts.minute );
+    }
+
+    if ( rc == 0 && data->species[ 0 ] != 0 )
+        rc = vdb_info_print_xml_s( "SPECIES", data->species );
+    
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_event( "FORMATTER", &data->formatter );
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_event( "LOADER", &data->loader );
+    if ( rc == 0 )
+        rc = vdb_info_print_xml_event( "UPDATE", &data->update );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "</info>\n" );
+    return rc;
+}
+
+
+/* ----------------------------------------------------------------------------- */
+
+
+static rc_t vdb_info_print_json_s( const char * tag, const char * value )
+{
+    if ( value[ 0 ] != 0 )
+        return KOutMsg( "\"%s\":\"%s\",\n", tag, value );
+    else
+        return 0;
+}
+
+static rc_t vdb_info_print_json_uint64( const char * tag, const uint64_t value )
+{
+    if ( value != 0 )
+        return KOutMsg( "\"%s\":%lu,\n", tag, value );
+    else
+        return 0;
+}
+
+static rc_t vdb_info_print_json_event( const char * tag, vdb_info_event * event )
+{
+    rc_t rc = 0;
+    if ( event->name[ 0 ] != 0 )
+    {
+        rc = KOutMsg( "\"%s\":{\n", tag );
+        if ( rc == 0 )
+            rc = vdb_info_print_json_s( "NAME", event->name );
+        if ( rc == 0 )
+            rc = vdb_info_print_json_s( "VERS", event->vers.s_vers );
+        if ( rc == 0 )
+            rc = vdb_info_print_json_s( "TOOLDATE", event->tool_date.date );
+        if ( rc == 0 )
+            rc = vdb_info_print_json_s( "RUNDATE", event->run_date.date );
+        if ( rc == 0 )
+            rc = KOutMsg( "},\n", tag );
+    }
+    return rc;
+}
+
+
+static rc_t vdb_info_print_json( vdb_info_data * data )
+{
+    rc_t rc = KOutMsg( "{\n" );
+
+    if ( rc == 0 )
+        rc = vdb_info_print_json_s( "acc", data->acc );
+    if ( rc == 0 )
+        rc = vdb_info_print_json_s( "path", data->path );
+    if ( rc == 0 )
+        rc = vdb_info_print_json_uint64( "size", data->file_size );
+    if ( rc == 0 )
+        rc = vdb_info_print_json_s( "type", data->s_path_type );
+    if ( rc == 0 )
+        rc = vdb_info_print_json_s( "platf", data->s_platform );
+    if ( rc == 0 )
+        rc = vdb_info_print_json_uint64( "SEQ", data->seq_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_json_uint64( "REF", data->ref_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_json_uint64( "PRIM", data->prim_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_json_uint64( "SEC", data->sec_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_json_uint64( "EVID", data->ev_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_json_uint64( "EVINT", data->ev_int_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_json_uint64( "CONS", data->consensus_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_json_uint64( "PASS", data->passes_rows );
+    if ( rc == 0 )
+        rc = vdb_info_print_json_uint64( "METR", data->metrics_rows );
+
+    if ( rc == 0 )
+        rc = vdb_info_print_json_s( "SCHEMA", data->schema_name );
+
+    if ( rc == 0 && data->ts.timestamp != 0 )
+    {
+        rc = vdb_info_print_json_uint64( "TIMESTAMP", data->ts.timestamp );
+        if ( rc == 0 )
+            rc = KOutMsg( "\"MONTH\":%d,\n", data->ts.month );
+        if ( rc == 0 )
+            rc = KOutMsg( "\"DAY\":%d,\n", data->ts.day );
+        if ( rc == 0 )
+            rc = KOutMsg( "\"YEAR\":%d,\n", data->ts.year );
+        if ( rc == 0 )
+            rc = KOutMsg( "\"HOUR\":%d,\n", data->ts.hour );
+        if ( rc == 0 )
+            rc = KOutMsg( "\"MINUTE\":%d,\n", data->ts.minute );
+    }
+
+    if ( rc == 0 && data->species[ 0 ] != 0 )
+        rc = vdb_info_print_json_s( "SPECIES", data->species );
+    
+    if ( rc == 0 )
+        rc = vdb_info_print_json_event( "FORMATTER", &data->formatter );
+    if ( rc == 0 )
+        rc = vdb_info_print_json_event( "LOADER", &data->loader );
+    if ( rc == 0 )
+        rc = vdb_info_print_json_event( "UPDATE", &data->update );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "};\n" );
+    return rc;
+
+}
+
+
+/* ----------------------------------------------------------------------------- */
+
+static const char dflt_event_name[] = "-";
+
+static rc_t vdb_info_print_sep_event( vdb_info_event * event, const char sep, bool last )
+{
+    rc_t rc;
+    const char * ev_name = event->name;
+    if ( ev_name == NULL || ev_name[ 0 ] == 0 )
+        ev_name = dflt_event_name;
+    
+    if ( last )
+    {
+        rc = KOutMsg( "'%s'%c%d%c%d%c%d%c%d%c%d%c%d%c%d%c%d%c%d",
+                      ev_name, sep,
+                      event->vers.major, sep, event->vers.minor, sep, event->vers.release, sep,
+                      event->tool_date.month, sep, event->tool_date.day, sep, event->tool_date.year, sep,
+                      event->run_date.month, sep, event->run_date.day, sep, event->run_date.year );
+    }
+    else
+    {
+        rc = KOutMsg( "'%s'%c%d%c%d%c%d%c%d%c%d%c%d%c%d%c%d%c%d%c",
+                      ev_name, sep,
+                      event->vers.major, sep, event->vers.minor, sep, event->vers.release, sep,
+                      event->tool_date.month, sep, event->tool_date.day, sep, event->tool_date.year, sep,
+                      event->run_date.month, sep, event->run_date.day, sep, event->run_date.year, sep );
+    }
+    return rc;
+}
+
+
+static rc_t vdb_info_print_sep( vdb_info_data * data, const char sep )
+{
+    rc_t rc = KOutMsg( "'%s'%c%lu%c%c%c'%s'%c",
+                       data->acc, sep, data->file_size, sep,
+                       data->s_path_type[0], sep, &(data->s_platform[13]), sep );
+    if ( rc == 0 )
+        rc = KOutMsg( "%lu%c%lu%c%lu%c%lu%c%lu%c%lu%c%lu%c%lu%c%lu%c",
+                      data->seq_rows, sep, data->ref_rows, sep,
+                      data->prim_rows, sep, data->sec_rows, sep, data->ev_rows, sep,
+                      data->ev_int_rows, sep, data->consensus_rows, sep,
+                      data->passes_rows, sep, data->metrics_rows, sep );
+    if ( rc == 0 )
+        rc = KOutMsg( "'%s'%c%d%c%d%c%d%c%d%c%d%c",
+                      data->schema_name, sep,
+                      data->ts.month, sep, data->ts.day, sep, data->ts.year, sep,
+                      data->ts.hour, sep, data->ts.minute, sep );
+
+    if ( rc == 0 )
+    {
+        if ( data->species[ 0 ] != 0 )
+            rc = KOutMsg( "'%s'%c", data->species, sep );
+        else
+            rc = KOutMsg( "-%c", sep );
+    }
+        
+    if ( rc == 0 )
+        rc = vdb_info_print_sep_event( &data->formatter, sep, false );
+    if ( rc == 0 )
+        rc = vdb_info_print_sep_event( &data->loader, sep, false );
+    if ( rc == 0 )
+        rc = vdb_info_print_sep_event( &data->update, sep, true );
+        
+    if ( rc == 0 )
+        rc = KOutMsg( "\n" );
+
+    return rc;
+}
+
+
+/* ----------------------------------------------------------------------------- */
+
+
+static rc_t vdb_info_print_dflt_date( vdb_info_date * d, const char *prefix0, const char *prefix1 )
+{
+    rc_t rc = 0;
+
+    if ( d->date[ 0 ] != 0 )
+        rc = KOutMsg( "%s%s: %s (%d/%d/%d %d:%d)\n", prefix0, prefix1,
+                      d->date, d->month, d->day, d->year, d->hour, d->minute );
+
+    return rc;
+}
+
+static rc_t vdb_info_print_dflt_event( vdb_info_event * event, const char *prefix )
+{
+    rc_t rc = 0;
+    if ( event->name[ 0 ] != 0 )
+        rc = KOutMsg( "%s    : %s\n", prefix, event->name );
+    if ( rc == 0 && event->vers.s_vers[ 0 ] != 0 )
+        rc = KOutMsg( "%sVER : %s\n", prefix, event->vers.s_vers );
+    if ( rc == 0 )
+        rc = vdb_info_print_dflt_date( &event->tool_date, prefix, "DATE" );
+    if ( rc == 0 )
+        rc = vdb_info_print_dflt_date( &event->run_date,  prefix, "RUN " );
+    return rc;
+}
+
+
+static rc_t vdb_info_print_dflt( vdb_info_data * data )
+{
+    rc_t rc= KOutMsg( "acc    : %s\n", data->acc );
+
+    if ( rc == 0 && data->path[ 0 ] != 0 )
+        rc = KOutMsg( "path   : %s\n", data->path );
+
+    if ( rc == 0 && data->remote_path[ 0 ] != 0 )
+        rc = KOutMsg( "remote : %s\n", data->remote_path );
+
+    if ( rc == 0 && data->file_size != 0 )
+        rc = KOutMsg( "size   : %,lu\n", data->file_size );
+
+    if ( rc == 0 && data->cache[ 0 ] != 0 )
+    {
+        rc = KOutMsg( "cache  : %s\n", data->cache );
+        if ( rc == 0 )
+            rc = KOutMsg( "percent: %f\n", data->cache_percent );
+        if ( rc == 0 )
+            rc = KOutMsg( "bytes  : %,lu\n", data->bytes_in_cache );
+    }
+    
+    if ( rc == 0 && data->s_path_type[ 0 ] != 0 )    
+        rc = KOutMsg( "type   : %s\n", data->s_path_type );
+
+    if ( rc == 0 && data->s_platform[ 0 ] != 0 )
+        rc = KOutMsg( "platf  : %s\n", data->s_platform );
+
+    if ( rc == 0 && data->seq_rows != 0 )
+        rc = KOutMsg( "SEQ    : %,lu\n", data->seq_rows );
+
+    if ( rc == 0 && data->ref_rows != 0 )
+        rc = KOutMsg( "REF    : %,lu\n", data->ref_rows );
+
+    if ( rc == 0 && data->prim_rows != 0 )
+        rc = KOutMsg( "PRIM   : %,lu\n", data->prim_rows );
+
+    if ( rc == 0 && data->sec_rows != 0 )
+        rc = KOutMsg( "SEC    : %,lu\n", data->sec_rows );
+
+    if ( rc == 0 && data->ev_rows != 0 )
+        rc = KOutMsg( "EVID   : %,lu\n", data->ev_rows );
+
+    if ( rc == 0 && data->ev_int_rows != 0 )
+        rc = KOutMsg( "EVINT  : %,lu\n", data->ev_int_rows );
+
+    if ( rc == 0 && data->consensus_rows != 0 )
+        rc = KOutMsg( "CONS   : %,lu\n", data->consensus_rows );
+
+    if ( rc == 0 && data->passes_rows != 0 )
+        rc = KOutMsg( "PASS   : %,lu\n", data->passes_rows );
+
+    if ( rc == 0 && data->metrics_rows != 0 )
+        rc = KOutMsg( "METR   : %,lu\n", data->metrics_rows );
+
+    if ( rc == 0 && data->schema_name[ 0 ] != 0 )
+        rc = KOutMsg( "SCHEMA : %s\n", data->schema_name );
+
+    if ( rc == 0 && data->ts.timestamp != 0 )
+        rc = KOutMsg( "TIME   : 0x%.016x (%.02d/%.02d/%d %.02d:%.02d)\n",
+                      data->ts.timestamp, data->ts.month, data->ts.day, data->ts.year,
+                      data->ts.hour, data->ts.minute );
+
+    if ( rc == 0 && data->species[ 0 ] != 0 )
+        rc = KOutMsg( "SPECIES: %s\n", data->species );
+        
+    if ( rc == 0 )
+        vdb_info_print_dflt_event( &data->formatter, "FMT" );
+    if ( rc == 0 )
+        vdb_info_print_dflt_event( &data->loader, "LDR" );
+    if ( rc == 0 )
+        vdb_info_print_dflt_event( &data->update, "UPD" );
+
+    if ( rc == 0 && data->bam_hdr.present )
+    {
+        rc = KOutMsg( "BAMHDR : %d bytes / %d lines\n", data->bam_hdr.hdr_bytes, data->bam_hdr.total_lines );
+        if ( rc == 0 && data->bam_hdr.HD_lines > 0 )
+            rc = KOutMsg( "BAMHDR : %d HD-lines\n", data->bam_hdr.HD_lines );
+        if ( rc == 0 && data->bam_hdr.SQ_lines > 0 )
+            rc = KOutMsg( "BAMHDR : %d SQ-lines\n", data->bam_hdr.SQ_lines );
+        if ( rc == 0 && data->bam_hdr.RG_lines > 0 )
+            rc = KOutMsg( "BAMHDR : %d RG-lines\n", data->bam_hdr.RG_lines );
+        if ( rc == 0 && data->bam_hdr.PG_lines > 0 )
+            rc = KOutMsg( "BAMHDR : %d PG-lines\n", data->bam_hdr.PG_lines );
+    }
+    
+    return rc;
+}
+
+
+/* ----------------------------------------------------------------------------- */
+
+static rc_t vdb_info_print_sql_event( const char * prefix, bool last )
+{
+    rc_t rc = KOutMsg( "%s_NAME VARCHAR, ", prefix );
+    if ( rc == 0 )
+        rc = KOutMsg( "%s_VER_MAJOR INTEGER, ", prefix );
+    if ( rc == 0 )
+        rc = KOutMsg( "%s_VER_MINOR INTEGER, ", prefix );
+    if ( rc == 0 )
+        rc = KOutMsg( "%s_VER_RELEASE INTEGER, ", prefix );
+    if ( rc == 0 )
+        rc = KOutMsg( "%s_TOOL_MONTH INTEGER, ", prefix );
+    if ( rc == 0 )
+        rc = KOutMsg( "%s_TOOL_DAY INTEGER, ", prefix );
+    if ( rc == 0 )
+        rc = KOutMsg( "%s_TOOL_YEAR INTEGER, ", prefix );
+    if ( rc == 0 )
+        rc = KOutMsg( "%s_RUN_MONTH INTEGER, ", prefix );
+    if ( rc == 0 )
+        rc = KOutMsg( "%s_RUN_DAY INTEGER, ", prefix );
+
+    if ( rc == 0 )
+    {
+        if ( last )
+            rc = KOutMsg( "%s_RUN_YEAR INTEGER ", prefix );
+        else
+            rc = KOutMsg( "%s_RUN_YEAR INTEGER, ", prefix );
+    }
+    return rc;
+}
+
+static rc_t vdb_info_print_sql_header( const char * table_name )
+{
+    rc_t rc = KOutMsg( "CREATE TABLE %s ( ", table_name );
+    if ( rc == 0 )
+        rc = KOutMsg( "ACC VARCHAR(12) PRIMARY KEY, " );
+    if ( rc == 0 )
+        rc = KOutMsg( "FILESIZE INTEGER, " );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "TAB_OR_DB VARCHAR(1), " );
+    if ( rc == 0 )
+        rc = KOutMsg( "PLATFORM VARCHAR(16), " );
+    if ( rc == 0 )
+        rc = KOutMsg( "SEQ_ROWS INTEGER, " );
+    if ( rc == 0 )
+        rc = KOutMsg( "REF_ROWS INTEGER, " );
+    if ( rc == 0 )
+        rc = KOutMsg( "PRIM_ROWS INTEGER, " );
+    if ( rc == 0 )
+        rc = KOutMsg( "SEC_ROWS INTEGER, " );
+    if ( rc == 0 )
+        rc = KOutMsg( "EV_ROWS INTEGER, " );
+    if ( rc == 0 )
+        rc = KOutMsg( "EV_INT_ROWS INTEGER, " );
+    if ( rc == 0 )
+        rc = KOutMsg( "CONS_ROWS INTEGER, " );
+    if ( rc == 0 )
+        rc = KOutMsg( "PASS_ROWS INTEGER, " );
+    if ( rc == 0 )
+        rc = KOutMsg( "METR_ROWS INTEGER, " );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "SCHEMA VARCHAR, " );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "TS_MONTH INTEGER, " );
+    if ( rc == 0 )
+        rc = KOutMsg( "TS_DAY INTEGER, " );
+    if ( rc == 0 )
+        rc = KOutMsg( "TS_YEAR INTEGER, " );
+    if ( rc == 0 )
+        rc = KOutMsg( "TS_HOUR INTEGER, " );
+    if ( rc == 0 )
+        rc = KOutMsg( "TS_MINUTE INTEGER, " );
+
+    if ( rc == 0 )
+        vdb_info_print_sql_event( "FMT", false );
+    if ( rc == 0 )
+        vdb_info_print_sql_event( "LD", false );
+    if ( rc == 0 )
+        vdb_info_print_sql_event( "UPD", true );
+
+    if ( rc == 0 )
+        rc = KOutMsg( ");\n" );
+
+    return rc;
+}
+
+
+static rc_t vdb_info_print_ev_sql( vdb_info_event * event, bool last )
+{
+    rc_t rc;
+    if ( last )
+    {
+        rc = KOutMsg( "\'%s\', %d, %d, %d, %d, %d, %d, %d, %d, %d ",
+                    event->name, event->vers.major, event->vers.minor, event->vers.release,
+                    event->tool_date.month, event->tool_date.day, event->tool_date.year,
+                    event->run_date.month, event->run_date.day, event->run_date.year );
+    }
+    else
+    {
+        rc = KOutMsg( "\'%s\', %d, %d, %d, %d, %d, %d, %d, %d, %d, ",
+                    event->name, event->vers.major, event->vers.minor, event->vers.release,
+                    event->tool_date.month, event->tool_date.day, event->tool_date.year,
+                    event->run_date.month, event->run_date.day, event->run_date.year );
+    }
+    return rc;
+}
+
+
+static rc_t vdb_info_print_sql( const char * table_name, vdb_info_data * data )
+{
+    rc_t rc = KOutMsg( "INSERT INTO %s VALUES ( ", table_name );
+
+    if ( rc == 0 )
+        rc= KOutMsg( "\'%s\', ", data->acc );
+    if ( rc == 0 )
+        rc = KOutMsg( "%lu, ", data->file_size );
+    if ( rc == 0 )
+        rc = KOutMsg( "\'%c\', ", data->s_path_type[0] );
+    if ( rc == 0 )
+        rc = KOutMsg( "\'%s\', ", &( data->s_platform[13] ) );
+    if ( rc == 0 )
+        rc = KOutMsg( "%lu, ", data->seq_rows );
+    if ( rc == 0 )
+        rc = KOutMsg( "%lu, ", data->ref_rows );
+    if ( rc == 0 )
+        rc = KOutMsg( "%lu, ", data->prim_rows );
+    if ( rc == 0 )
+        rc = KOutMsg( "%lu, ", data->sec_rows );
+    if ( rc == 0 )
+        rc = KOutMsg( "%lu, ", data->ev_rows );
+    if ( rc == 0 )
+        rc = KOutMsg( "%lu, ", data->ev_int_rows );
+    if ( rc == 0 )
+        rc = KOutMsg( "%lu, ", data->consensus_rows );
+    if ( rc == 0 )
+        rc = KOutMsg( "%lu, ", data->passes_rows );
+    if ( rc == 0 )
+        rc = KOutMsg( "%lu, ", data->metrics_rows );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "\'%s\', ", data->schema_name );
+
+    if ( rc == 0 )
+        rc = KOutMsg( "%d, %d, %d, %d, %d, ",
+                      data->ts.month, data->ts.day, data->ts.year, data->ts.hour, data->ts.minute );
+
+    if ( rc == 0 )
+        rc = vdb_info_print_ev_sql( &data->formatter, false );
+    if ( rc == 0 )
+        rc = vdb_info_print_ev_sql( &data->loader, false );
+    if ( rc == 0 )
+        rc = vdb_info_print_ev_sql( &data->update, true );
+
+    if ( rc == 0 )
+        rc = KOutMsg( ");\n" );
+
+    return rc;
+}
+
+
+/* ----------------------------------------------------------------------------- */
+
+
+static uint8_t digits_of( uint64_t value )
+{
+    uint8_t res = 0;
+          if ( value > 99999999999 ) res = 12;
+    else if ( value > 9999999999 ) res = 11;
+    else if ( value > 999999999 ) res = 10;
+    else if ( value > 99999999 ) res = 9;
+    else if ( value > 9999999 ) res = 8;
+    else if ( value > 999999 ) res = 7;
+    else if ( value > 99999 ) res = 6;
+    else if ( value > 9999 ) res = 5;
+    else if ( value > 999 ) res = 4;
+    else if ( value > 99 ) res = 3;
+    else if ( value > 9 ) res = 2;
+    else res = 1;
+    return res;
+}
+
+static rc_t vdb_info_1( VSchema * schema, dump_format_t format, const VDBManager *mgr,
+                        const char * acc_or_path, const char * table_name )
+{
+    rc_t rc = 0;
+    vdb_info_data data;
+
+    memset( &data, 0, sizeof data );
+    data.s_platform = PT_NONE;
+    data.acc = acc_or_path;
+
+    /* #1 get path-type */
+    data.s_path_type = get_path_type( mgr, acc_or_path );
+
+    if ( data.s_path_type[ 0 ] == 'D' || data.s_path_type[ 0 ] == 'T' )
+    {
+        rc_t rc1;
+
+        /* #2 fork by table or database */
+        switch ( data.s_path_type[ 0 ] )
+        {
+            case 'D' : vdb_info_db( &data, schema, mgr ); break;
+            case 'T' : vdb_info_tab( &data, schema, mgr ); break;
+        }
+
+        /* try to resolve the path locally */
+        rc1 = resolve_accession( acc_or_path, data.path, sizeof data.path, false ); /* vdb-dump-helper.c */
+        if ( rc1 == 0 )
+        {
+            data.file_size = get_file_size( data.path, false );
+            resolve_remote_accession( acc_or_path, data.remote_path, sizeof data.remote_path ); /* vdb-dump-helper.c */
+        }
+        else
+        {
+            /* try to resolve the path remotely */
+            rc1 = resolve_accession( acc_or_path, data.path, sizeof data.path, true ); /* vdb-dump-helper.c */
+            if ( rc1 == 0 )
+            {
+                data.file_size = get_file_size( data.path, true );
+                /* try to find out the cache-file */
+                rc1 = resolve_cache( acc_or_path, data.cache, sizeof data.cache ); /* vdb-dump-helper.c */
+                if ( rc1 == 0 )
+                {
+                    /* try to find out cache completeness */
+                    check_cache_comleteness( data.cache, &data.cache_percent, &data.bytes_in_cache );
+                }
+            }
+        }
+        
+        switch ( format )
+        {
+            case df_xml  : rc = vdb_info_print_xml( &data ); break;
+            case df_json : rc = vdb_info_print_json( &data ); break;
+            case df_csv  : rc = vdb_info_print_sep( &data, ',' ); break;
+            case df_tab  : rc = vdb_info_print_sep( &data, '\t' ); break;
+            case df_sql  : rc = vdb_info_print_sql( table_name, &data ); break;
+            default     : rc = vdb_info_print_dflt( &data ); break;
+        }
+    }
+
+    return rc;
+}
+
+
+rc_t vdb_info( Vector * schema_list, dump_format_t format, const VDBManager *mgr,
+               const char * acc_or_path, struct num_gen * rows )
+{
+    rc_t rc = 0;
+    VSchema * schema = NULL;
+
+    vdh_parse_schema( mgr, &schema, schema_list, false );
+
+    if ( format == df_sql )
+        rc = vdb_info_print_sql_header( acc_or_path );
+
+    if ( rows != NULL && !num_gen_empty( rows ) )
+    {
+        const struct num_gen_iter * iter;
+        rc = num_gen_iterator_make( rows, &iter );
+        if ( rc == 0 )
+        {
+            int64_t max_row;
+            rc = num_gen_iterator_max( iter, &max_row );
+            if ( rc == 0 )
+            {
+                int64_t id;
+                uint8_t digits = digits_of( max_row );
+
+                while ( rc == 0 && num_gen_iterator_next( iter, &id, &rc ) )
+                {
+                    char acc[ 64 ];
+                    size_t num_writ;
+                    rc_t rc1 = -1;
+                    switch ( digits )
+                    {
+                        case 1 : rc1 = string_printf ( acc, sizeof acc, &num_writ, "%s%ld", acc_or_path, id ); break;
+                        case 2 : rc1 = string_printf ( acc, sizeof acc, &num_writ, "%s%.02ld", acc_or_path, id ); break;
+                        case 3 : rc1 = string_printf ( acc, sizeof acc, &num_writ, "%s%.03ld", acc_or_path, id ); break;
+                        case 4 : rc1 = string_printf ( acc, sizeof acc, &num_writ, "%s%.04ld", acc_or_path, id ); break;
+                        case 5 : rc1 = string_printf ( acc, sizeof acc, &num_writ, "%s%.05ld", acc_or_path, id ); break;
+                        case 6 : rc1 = string_printf ( acc, sizeof acc, &num_writ, "%s%.06ld", acc_or_path, id ); break;
+                        case 7 : rc1 = string_printf ( acc, sizeof acc, &num_writ, "%s%.07ld", acc_or_path, id ); break;
+                        case 8 : rc1 = string_printf ( acc, sizeof acc, &num_writ, "%s%.08ld", acc_or_path, id ); break;
+                        case 9 : rc1 = string_printf ( acc, sizeof acc, &num_writ, "%s%.09ld", acc_or_path, id ); break;
+                    }
+
+                    if ( rc1 == 0 )
+                        rc = vdb_info_1( schema, format, mgr, acc, acc_or_path );
+                }
+            }
+            num_gen_iterator_destroy( iter );
+        }
+    }
+    else
+        rc = vdb_info_1( schema, format, mgr, acc_or_path, acc_or_path );
+
+    if ( schema != NULL )
+        VSchemaRelease( schema );
+
+    return rc;
+}
diff --git a/tools/vdb-dump/vdb_info.h b/tools/vdb-dump/vdb_info.h
new file mode 100644
index 0000000..b83dfcd
--- /dev/null
+++ b/tools/vdb-dump/vdb_info.h
@@ -0,0 +1,47 @@
+/*===========================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#ifndef _h_vdb_info_
+#define _h_vdb_info_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+#include <klib/rc.h>
+#include <vdb/manager.h>
+
+rc_t vdb_info( Vector * schema_list, dump_format_t format, const VDBManager *mgr,
+               const char * acc_or_path, struct num_gen * rows );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/tools/vdb-validate/Makefile b/tools/vdb-validate/Makefile
new file mode 100644
index 0000000..b1d77f4
--- /dev/null
+++ b/tools/vdb-validate/Makefile
@@ -0,0 +1,96 @@
+# ===========================================================================
+#
+#                            PUBLIC DOMAIN NOTICE
+#               National Center for Biotechnology Information
+#
+#  This software/database is a "United States Government Work" under the
+#  terms of the United States Copyright Act.  It was written as part of
+#  the author's official duties as a United States Government employee and
+#  thus cannot be copyrighted.  This software/database is freely available
+#  to the public for use. The National Library of Medicine and the U.S.
+#  Government have not placed any restriction on its use or reproduction.
+#
+#  Although all reasonable efforts have been taken to ensure the accuracy
+#  and reliability of the software and data, the NLM and the U.S.
+#  Government do not and cannot warrant the performance or results that
+#  may be obtained by using this software or data. The NLM and the U.S.
+#  Government disclaim all warranties, express or implied, including
+#  warranties of performance, merchantability or fitness for any particular
+#  purpose.
+#
+#  Please cite the author in any work or product based on this material.
+#
+# ===========================================================================
+
+
+default: std
+
+TOP ?= $(abspath ../..)
+MODULE = tools/vdb-validate
+
+INT_TOOLS = \
+
+EXT_TOOLS = \
+	vdb-validate \
+	check-corrupt
+
+ALL_TOOLS = \
+	$(INT_TOOLS) \
+	$(EXT_TOOLS)
+
+include $(TOP)/build/Makefile.env
+
+#------------------------------------------------------------------------------
+# outer targets
+#
+all std: makedirs
+	@ $(MAKE_CMD) $(TARGDIR)/$@-cmn
+
+$(ALL_TOOLS): makedirs
+	@ $(MAKE_CMD) $(BINDIR)/$@
+
+.PHONY: all std $(ALL_TOOLS)
+
+#-------------------------------------------------------------------------------
+# clean
+#
+clean: stdclean
+
+.PHONY: clean
+
+#-------------------------------------------------------------------------------
+# vdb-validate
+#
+VDB_VALIDATE_SRC = \
+	vdb-validate
+
+VDB_VALIDATE_OBJ = \
+	$(addsuffix .$(OBJX),$(VDB_VALIDATE_SRC))
+
+VDB_VALIDATE_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lm
+
+$(BINDIR)/vdb-validate: $(VDB_VALIDATE_OBJ)
+	$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(VDB_VALIDATE_LIB)
+
+
+#-------------------------------------------------------------------------------
+# check-corrupt
+#
+CHECK_CORRUPT_SRC = \
+	check-corrupt
+
+CHECK_CORRUPT_OBJ = \
+	$(addsuffix .$(OBJX),$(CHECK_CORRUPT_SRC))
+
+CHECK_CORRUPT_LIB = \
+	-lkapp \
+	-stk-version \
+	-sncbi-vdb \
+	-lm
+
+$(BINDIR)/check-corrupt: $(CHECK_CORRUPT_OBJ)
+	$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(CHECK_CORRUPT_LIB)
\ No newline at end of file
diff --git a/tools/vdb-validate/check-corrupt.cpp b/tools/vdb-validate/check-corrupt.cpp
new file mode 100644
index 0000000..92c056b
--- /dev/null
+++ b/tools/vdb-validate/check-corrupt.cpp
@@ -0,0 +1,764 @@
+/*==============================================================================
+*
+*                            PUBLIC DOMAIN NOTICE
+*               National Center for Biotechnology Information
+*
+*  This software/database is a "United States Government Work" under the
+*  terms of the United States Copyright Act.  It was written as part of
+*  the author's official duties as a United States Government employee and
+*  thus cannot be copyrighted.  This software/database is freely available
+*  to the public for use. The National Library of Medicine and the U.S.
+*  Government have not placed any restriction on its use or reproduction.
+*
+*  Although all reasonable efforts have been taken to ensure the accuracy
+*  and reliability of the software and data, the NLM and the U.S.
+*  Government do not and cannot warrant the performance or results that
+*  may be obtained by using this software or data. The NLM and the U.S.
+*  Government disclaim all warranties, express or implied, including
+*  warranties of performance, merchantability or fitness for any particular
+*  purpose.
+*
+*  Please cite the author in any work or product based on this material.
+*
+* ===========================================================================
+*
+*/
+
+#include <klib/rc.h>
+#include <klib/log.h>
+#include <klib/out.h>
+#include <klib/writer.h>
+#include <kfs/directory.h>
+#include <vdb/manager.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <vdb/vdb-priv.h>
+#include <kdb/manager.h>
+
+#include <sstream>
+
+#include <cmath>
+
+#define SA_TABLE_LOOKUP_LIMIT 100000
+#define SEQ_TABLE_LOOKUP_LIMIT 100000
+#define PA_LONGER_SA_LIMIT 0.01
+
+typedef struct CheckCorruptConfig
+{
+    double sa_cutoff_percent; // negative when not used
+    uint64_t sa_cutoff_number; // only used when sa_cutoff_percent is negative
+
+    double seq_cutoff_percent; // negative when not used
+    uint64_t seq_cutoff_number; // only used when seq_cutoff_percent is negative
+
+    double pa_len_threshold_percent; // negative when not used
+    uint64_t pa_len_threshold_number; // only used when pa_len_threshold_percent is negative
+} CheckCorruptConfig;
+
+struct VDB_ERROR
+{
+    VDB_ERROR (const char * _msg, rc_t _rc)
+        : msg (_msg), rc (_rc)
+    {}
+
+    const char * msg;
+    rc_t rc;
+};
+
+struct VDB_ROW_ERROR
+{
+    VDB_ROW_ERROR (const char * _msg, int64_t _row_id, rc_t _rc)
+        : row_id ( _row_id ), msg (_msg), rc (_rc)
+    {}
+
+    int64_t row_id;
+    const char * msg;
+    rc_t rc;
+};
+
+struct DATA_ERROR
+{
+    DATA_ERROR (const std::string & _msg)
+        : msg(_msg)
+    {}
+
+    std::string msg;
+};
+
+/**
+ * returns true if checks are passed
+ */
+void runChecks ( const char * accession, const CheckCorruptConfig * config, const VCursor * pa_cursor, const VCursor * sa_cursor, const VCursor * seq_cursor )
+{
+    rc_t rc;
+    uint32_t pa_has_ref_offset_idx;
+    uint32_t sa_has_ref_offset_idx;
+    uint32_t sa_seq_spot_id_idx;
+    uint32_t sa_seq_read_id_idx;
+    uint32_t sa_pa_id_idx;
+    uint32_t sa_tmp_mismatch_idx;
+    uint32_t seq_pa_id_idx;
+    uint32_t seq_read_len_idx;
+    uint32_t seq_cmp_read_idx;
+    bool has_tmp_mismatch;
+
+    /* add columns to cursor */
+#define add_column(tbl_name, cursor, idx, col_spec) \
+    rc = VCursorAddColumn( cursor, &idx, col_spec ); \
+    if ( rc != 0 ) \
+        throw VDB_ERROR("VCursorAddColumn() failed for " tbl_name " table, " col_spec " column", rc);
+
+    add_column( "PRIMARY_ALIGNMENT", pa_cursor, pa_has_ref_offset_idx, "(bool)HAS_REF_OFFSET" );
+    add_column( "SECONDARY_ALIGNMENT", sa_cursor, sa_has_ref_offset_idx, "(bool)HAS_REF_OFFSET" );
+    add_column( "SECONDARY_ALIGNMENT", sa_cursor, sa_seq_spot_id_idx, "SEQ_SPOT_ID" );
+    add_column( "SECONDARY_ALIGNMENT", sa_cursor, sa_seq_read_id_idx, "SEQ_READ_ID" );
+    add_column( "SECONDARY_ALIGNMENT", sa_cursor, sa_pa_id_idx, "PRIMARY_ALIGNMENT_ID" );
+    add_column( "SEQUENCE", seq_cursor, seq_pa_id_idx, "PRIMARY_ALIGNMENT_ID" );
+    add_column( "SEQUENCE", seq_cursor, seq_read_len_idx, "READ_LEN" );
+    add_column( "SEQUENCE", seq_cursor, seq_cmp_read_idx, "CMP_READ" );
+
+    // optional columns
+    rc = VCursorAddColumn( sa_cursor, &sa_tmp_mismatch_idx, "TMP_MISMATCH" );
+    if ( rc == 0 )
+        has_tmp_mismatch = true;
+    else
+    {
+        has_tmp_mismatch = false;
+        rc = 0;
+    }
+
+
+#undef add_column
+
+    rc = VCursorOpen( pa_cursor );
+    if (rc != 0)
+        throw VDB_ERROR("VCursorOpen() failed for PRIMARY_ALIGNMENT table", rc);
+    rc = VCursorOpen( sa_cursor );
+    if (rc != 0)
+        throw VDB_ERROR("VCursorOpen() failed for SECONDARY_ALIGNMENT table", rc);
+    rc = VCursorOpen( seq_cursor );
+    if (rc != 0)
+        throw VDB_ERROR("VCursorOpen() failed for SEQUENCE table", rc);
+
+    int64_t sa_id_first;
+    uint64_t sa_row_count;
+
+    rc = VCursorIdRange( sa_cursor, sa_pa_id_idx, &sa_id_first, &sa_row_count );
+    if (rc != 0)
+        throw VDB_ERROR("VCursorIdRange() failed for SECONDARY_ALIGNMENT table, PRIMARY_ALIGNMENT_ID column", rc);
+
+    bool reported_about_no_pa = false;
+    uint64_t pa_longer_sa_rows = 0;
+    uint64_t pa_longer_sa_limit;
+    if (config->pa_len_threshold_percent > 0)
+        pa_longer_sa_limit = ceil( config->pa_len_threshold_percent * sa_row_count );
+    else if (config->pa_len_threshold_number == 0 || config->pa_len_threshold_number > sa_row_count)
+        pa_longer_sa_limit = sa_row_count;
+    else
+        pa_longer_sa_limit = config->pa_len_threshold_number;
+
+    uint64_t sa_row_limit;
+    if (config->sa_cutoff_percent > 0)
+        sa_row_limit = ceil( config->sa_cutoff_percent * sa_row_count );
+    else if (config->sa_cutoff_number == 0 || config->sa_cutoff_number > sa_row_count)
+        sa_row_limit = sa_row_count;
+    else
+        sa_row_limit = config->sa_cutoff_number;
+
+    for ( uint64_t i = 0; i < sa_row_count && i < sa_row_limit; ++i )
+    {
+        int64_t sa_row_id = i + sa_id_first;
+        const void * data_ptr = NULL;
+        uint32_t data_len;
+        uint32_t pa_row_len;
+        uint32_t sa_row_len;
+        uint32_t seq_read_len_len;
+
+        // SA:HAS_REF_OFFSET
+        rc = VCursorCellDataDirect ( sa_cursor, sa_row_id, sa_has_ref_offset_idx, NULL, (const void**)&data_ptr, NULL, &sa_row_len );
+        if ( rc != 0 )
+            throw VDB_ROW_ERROR("VCursorCellDataDirect() failed on SECONDARY_ALIGNMENT table, HAS_REF_OFFSET column", sa_row_id, rc);
+
+        const int64_t * p_seq_spot_id;
+        uint32_t seq_spot_id_len;
+        // SA:SEQ_SPOT_ID
+        rc = VCursorCellDataDirect ( sa_cursor, sa_row_id, sa_seq_spot_id_idx, NULL, (const void**)&p_seq_spot_id, NULL, &seq_spot_id_len );
+        if ( rc != 0 || p_seq_spot_id == NULL || seq_spot_id_len != 1 )
+            throw VDB_ROW_ERROR("VCursorCellDataDirect() failed on SECONDARY_ALIGNMENT table, SEQ_SPOT_ID column", sa_row_id, rc);
+
+        int64_t seq_spot_id = *p_seq_spot_id;
+        if (seq_spot_id == 0)
+        {
+            std::stringstream ss;
+            ss << "SECONDARY_ALIGNMENT:" << sa_row_id << " has SEQ_SPOT_ID = " << seq_spot_id;
+
+            throw DATA_ERROR(ss.str());
+        }
+
+        if ( has_tmp_mismatch )
+        {
+            const char * p_sa_tmp_mismatch;
+            // SA:TMP_MISMATCH
+            rc = VCursorCellDataDirect ( sa_cursor, sa_row_id, sa_tmp_mismatch_idx, NULL, (const void**)&p_sa_tmp_mismatch, NULL, &data_len );
+            if ( rc != 0 || p_sa_tmp_mismatch == NULL )
+                throw VDB_ROW_ERROR("VCursorCellDataDirect() failed on SECONDARY_ALIGNMENT table, TMP_MISMATCH column", sa_row_id, rc);
+
+            for ( uint32_t j = 0; j < data_len; ++j )
+            {
+                if ( p_sa_tmp_mismatch[j] == '=' )
+                {
+                    std::stringstream ss;
+                    ss << "SECONDARY_ALIGNMENT:" << sa_row_id << " TMP_MISMATCH contains '='";
+
+                    throw DATA_ERROR(ss.str());
+                }
+            }
+        }
+
+        const int64_t * p_pa_row_id;
+        // SA:PRIMARY_ALIGNMENT_ID
+        rc = VCursorCellDataDirect ( sa_cursor, sa_row_id, sa_pa_id_idx, NULL, (const void**)&p_pa_row_id, NULL, &data_len );
+        if ( rc != 0 || p_pa_row_id == NULL || data_len != 1 )
+            throw VDB_ROW_ERROR("VCursorCellDataDirect() failed on SECONDARY_ALIGNMENT table, PRIMARY_ALIGNMENT_ID column", sa_row_id, rc);
+
+        int64_t pa_row_id = *p_pa_row_id;
+        if (pa_row_id == 0)
+        {
+            if (!reported_about_no_pa)
+            {
+                PLOGMSG (klogInfo, (klogInfo, "$(ACC) has secondary alignments without primary", "ACC=%s", accession));
+                reported_about_no_pa = true;
+            }
+            continue;
+        }
+
+        // PA:HAS_REF_OFFSET
+        rc = VCursorCellDataDirect ( pa_cursor, pa_row_id, pa_has_ref_offset_idx, NULL, &data_ptr, NULL, &pa_row_len );
+        if ( rc != 0 )
+            throw VDB_ROW_ERROR("VCursorCellDataDirect() failed on PRIMARY_ALIGNMENT table, HAS_REF_OFFSET column", pa_row_id, rc);
+
+        // move on when PA.len equal to SA.len
+        if (pa_row_len == sa_row_len)
+            continue;
+
+        if (pa_row_len < sa_row_len)
+        {
+            std::stringstream ss;
+            ss << "PRIMARY_ALIGNMENT:" << pa_row_id << " HAS_REF_OFFSET length (" << pa_row_len << ") less than SECONDARY_ALIGNMENT:" << sa_row_id << " HAS_REF_OFFSET length (" << sa_row_len << ")";
+
+            throw DATA_ERROR(ss.str());
+        }
+
+        // we already know that pa_row_len > sa_row_len
+        ++pa_longer_sa_rows;
+
+        const int32_t * p_seq_read_id;
+        // SA:SEQ_READ_ID
+        rc = VCursorCellDataDirect ( sa_cursor, sa_row_id, sa_seq_read_id_idx, NULL, (const void**)&p_seq_read_id, NULL, &data_len );
+        if ( rc != 0 || p_seq_read_id == NULL || data_len != 1 )
+            throw VDB_ROW_ERROR("VCursorCellDataDirect() failed on SECONDARY_ALIGNMENT table, SEQ_READ_ID column", sa_row_id, rc);
+
+        // one-based read index
+        int32_t seq_read_id = *p_seq_read_id;
+
+        const uint32_t * p_seq_read_len;
+        // SEQ:READ_LEN
+        rc = VCursorCellDataDirect ( seq_cursor, seq_spot_id, seq_read_len_idx, NULL, (const void**)&p_seq_read_len, NULL, &seq_read_len_len );
+        if ( rc != 0 || p_seq_read_len == NULL )
+            throw VDB_ROW_ERROR("VCursorCellDataDirect() failed on SEQUENCE table, READ_LEN column", seq_spot_id, rc);
+
+        if ( seq_read_id < 1 || (uint32_t)seq_read_id > seq_read_len_len )
+        {
+            std::stringstream ss;
+            ss << "SECONDARY:" << sa_row_id << " SEQ_READ_ID value (" << seq_read_id << ") - 1 based, is out of SEQUENCE:" << seq_spot_id << " READ_LEN range (" << seq_read_len_len << ")";
+
+            throw DATA_ERROR(ss.str());
+        }
+
+        if (pa_row_len != p_seq_read_len[seq_read_id - 1])
+        {
+            std::stringstream ss;
+            ss << "PRIMARY_ALIGNMENT:" << pa_row_id << " HAS_REF_OFFSET length (" << pa_row_len << ") does not match its SEQUENCE:" << seq_spot_id << " READ_LEN[" << seq_read_id - 1 << "] value (" << p_seq_read_len[seq_read_id - 1] << ")";
+
+            throw DATA_ERROR(ss.str());
+        }
+
+        if (pa_longer_sa_rows >= pa_longer_sa_limit)
+        {
+            std::stringstream ss;
+            ss << "Limit violation (pa_longer_sa): there are at least " << pa_longer_sa_rows << " alignments where HAS_REF_OFFSET column is longer in PRIMARY_ALIGNMENT than in SECONDARY_ALIGNMENT";
+
+            throw DATA_ERROR(ss.str());
+        }
+    }
+
+    int64_t seq_id_first;
+    uint64_t seq_row_count;
+
+    rc = VCursorIdRange( seq_cursor, seq_pa_id_idx, &seq_id_first, &seq_row_count );
+    if (rc != 0)
+        throw VDB_ERROR("VCursorIdRange() failed for SEQUENCE table, PRIMARY_ALIGNMENT_ID column", rc);
+
+    uint64_t seq_row_limit;
+    if (config->seq_cutoff_percent > 0)
+        seq_row_limit = ceil( config->seq_cutoff_percent * seq_row_count );
+    else if (config->seq_cutoff_number == 0 || config->seq_cutoff_number > seq_row_count)
+        seq_row_limit = seq_row_count;
+    else
+        seq_row_limit = config->seq_cutoff_number;
+
+    for ( uint64_t i = 0; i < seq_row_count && i < seq_row_limit; ++i )
+    {
+        int64_t seq_row_id = i + seq_id_first;
+        const void * data_ptr = NULL;
+        uint32_t data_len;
+
+        const int64_t * p_seq_pa_id;
+        uint32_t seq_pa_id_len;
+        // SEQ:PRIMARY_ALIGNMENT_ID
+        rc = VCursorCellDataDirect ( seq_cursor, seq_row_id, seq_pa_id_idx, NULL, (const void**)&p_seq_pa_id, NULL, &seq_pa_id_len );
+        if ( rc != 0 || p_seq_pa_id == NULL )
+            throw VDB_ROW_ERROR("VCursorCellDataDirect() failed on SEQUENCE table, PRIMARY_ALIGNMENT_ID column", seq_row_id, rc);
+
+        const uint32_t * p_seq_read_len;
+        // SEQ:READ_LEN
+        rc = VCursorCellDataDirect ( seq_cursor, seq_row_id, seq_read_len_idx, NULL, (const void**)&p_seq_read_len, NULL, &data_len );
+        if ( rc != 0 || p_seq_read_len == NULL )
+            throw VDB_ROW_ERROR("VCursorCellDataDirect() failed on SEQUENCE table, READ_LEN column", seq_row_id, rc);
+        if ( seq_pa_id_len != data_len )
+        {
+            std::stringstream ss;
+            ss << "SEQUENCE:" << seq_row_id << " PRIMARY_ALIGNMENT_ID length (" << seq_pa_id_len << ") does not match SEQUENCE:" << seq_row_id << " READ_LEN length (" << data_len << ")";
+
+            throw DATA_ERROR(ss.str());
+        }
+
+        uint64_t sum_unaligned_read_len = 0;
+        for ( uint32_t j = 0; j < seq_pa_id_len; ++j )
+        {
+            if ( p_seq_pa_id[j] == 0 )
+            {
+                sum_unaligned_read_len += p_seq_read_len[j];
+            }
+        }
+
+        // SEQ:CMP_READ
+        rc = VCursorCellDataDirect ( seq_cursor, seq_row_id, seq_cmp_read_idx, NULL, (const void**)&data_ptr, NULL, &data_len );
+        if ( rc != 0 || data_ptr == NULL )
+            throw VDB_ROW_ERROR("VCursorCellDataDirect() failed on SEQUENCE table, SEQ:CMP_READ column", seq_row_id, rc);
+
+        if ( sum_unaligned_read_len != data_len )
+        {
+            std::stringstream ss;
+            ss << "SEQUENCE:" << seq_row_id << " CMP_READ length (" << data_len << ") does not match sum of unaligned READ_LEN values (" << sum_unaligned_read_len << ")";
+
+            throw DATA_ERROR(ss.str());
+        }
+    }
+
+    if (sa_row_limit < sa_row_count || seq_row_limit < seq_row_count)
+        PLOGMSG (klogInfo, (klogInfo, "$(ACC) looks good (based on first $(SA_CUTOFF) of SECONDARY_ALIGNMENT and $(SEQ_CUTOFF) SEQUENCE rows)", "ACC=%s,SA_CUTOFF=%lu,SEQ_CUTOFF=%lu", accession, sa_row_limit, seq_row_limit));
+    else
+        PLOGMSG (klogInfo, (klogInfo, "$(ACC) looks good", "ACC=%s", accession));
+}
+
+/**
+ * returns true if accession is good
+ */
+bool checkAccession ( const char * accession, const CheckCorruptConfig * config )
+{
+    rc_t rc;
+    KDirectory * cur_dir;
+    const VDBManager * manager;
+    const VDatabase * database;
+    const VTable * pa_table;
+    const VTable * sa_table;
+    const VTable * seq_table;
+
+    const VCursor * pa_cursor;
+    const VCursor * sa_cursor;
+    const VCursor * seq_cursor;
+
+    rc = KDirectoryNativeDir( &cur_dir );
+    if ( rc != 0 )
+        PLOGERR( klogInt, (klogInt, rc, "$(ACC) KDirectoryNativeDir() failed", "ACC=%s", accession));
+    else
+    {
+        rc = VDBManagerMakeRead ( &manager, cur_dir );
+        if ( rc != 0 )
+            PLOGERR( klogInt, (klogInt, rc, "$(ACC) VDBManagerMakeRead() failed", "ACC=%s", accession));
+        else
+        {
+            int type = VDBManagerPathType ( manager, "%s", accession );
+            if ( ( type & ~ kptAlias ) != kptDatabase )
+                PLOGMSG (klogInfo, (klogInfo, "$(ACC) SKIPPING - can't be opened as a database", "ACC=%s", accession));
+            else
+            {
+                rc = VDBManagerOpenDBRead( manager, &database, NULL, "%s", accession );
+                if (rc != 0)
+                    PLOGERR( klogInt, (klogInt, rc, "$(ACC) VDBManagerOpenDBRead() failed", "ACC=%s", accession));
+                else
+                {
+                    rc = VDatabaseOpenTableRead( database, &pa_table, "%s", "PRIMARY_ALIGNMENT" );
+                    if ( rc != 0 )
+                    {
+                        PLOGMSG (klogInfo, (klogInfo, "$(ACC) SKIPPING - failed to open PRIMARY_ALIGNMENT table", "ACC=%s", accession));
+                        rc = 0;
+                    }
+                    else
+                    {
+                        rc = VTableCreateCursorRead( pa_table, &pa_cursor );
+                        if ( rc != 0 )
+                            PLOGERR( klogInt, (klogInt, rc, "$(ACC) VTableCreateCursorRead() failed for PRIMARY_ALIGNMENT cursor", "ACC=%s", accession));
+                        else
+                        {
+                            rc = VDatabaseOpenTableRead( database, &sa_table, "%s", "SECONDARY_ALIGNMENT" );
+                            if ( rc != 0 )
+                            {
+                                PLOGMSG (klogInfo, (klogInfo, "$(ACC) SKIPPING - failed to open SECONDARY_ALIGNMENT table", "ACC=%s", accession));
+                                rc = 0;
+                            }
+                            else
+                            {
+                                rc = VTableCreateCursorRead( sa_table, &sa_cursor );
+                                if ( rc != 0 )
+                                    PLOGERR( klogInt, (klogInt, rc, "$(ACC) VTableCreateCursorRead() failed for SECONDARY_ALIGNMENT cursor", "ACC=%s", accession));
+                                else
+                                {
+                                    rc = VDatabaseOpenTableRead( database, &seq_table, "%s", "SEQUENCE" );
+                                    if ( rc != 0 )
+                                    {
+                                        PLOGMSG (klogInfo, (klogInfo, "$(ACC) SKIPPING - failed to open SEQUENCE table", "ACC=%s", accession));
+                                        rc = 0;
+                                    }
+                                    else
+                                    {
+                                        rc = VTableCreateCursorRead( seq_table, &seq_cursor );
+                                        if ( rc != 0 )
+                                            PLOGERR( klogInt, (klogInt, rc, "VTableCreateCursorRead() failed for SEQUENCE cursor", "ACC=%s", accession));
+                                        else
+                                        {
+                                            try {
+                                                runChecks( accession, config, pa_cursor, sa_cursor, seq_cursor );
+                                            } catch ( VDB_ERROR & x ) {
+                                                PLOGERR (klogErr, (klogInfo, x.rc, "$(ACC) VDB error: $(MSG)", "ACC=%s,MSG=%s", accession, x.msg));
+                                                rc = 1;
+                                            } catch ( VDB_ROW_ERROR & x ) {
+                                                PLOGERR (klogErr, (klogInfo, x.rc, "$(ACC) VDB error: $(MSG) row_id: $(ROW_ID)", "ACC=%s,MSG=%s,ROW_ID=%ld", accession, x.msg, x.row_id));
+                                                rc = 1;
+                                            } catch ( DATA_ERROR & x ) {
+                                                KOutMsg("%s\n", accession);
+                                                PLOGMSG (klogInfo, (klogInfo, "$(ACC) Invalid data: $(MSG) ", "ACC=%s,MSG=%s", accession, x.msg.c_str()));
+                                                rc = 1;
+                                            }
+                                            VCursorRelease( seq_cursor );
+                                        }
+                                        VTableRelease( seq_table );
+                                    }
+                                    VCursorRelease( sa_cursor );
+                                }
+                                VTableRelease( sa_table );
+                            }
+                            VCursorRelease( pa_cursor );
+                        }
+                        VTableRelease( pa_table );
+                    }
+                    VDatabaseRelease( database );
+                }
+            }
+            VDBManagerRelease( manager );
+        }
+        KDirectoryRelease( cur_dir );
+    }
+    return rc == 0;
+}
+
+//////////////////////////////////////////// Main
+extern "C"
+{
+
+#include <kapp/args.h>
+#include <kapp/main.h>
+#include <kapp/log-xml.h>
+
+const char UsageDefaultName[] = "test-general-loader";
+
+#define ALIAS_SA_CUTOFF    NULL
+#define OPTION_SA_CUTOFF   "sa-cutoff"
+
+static const char * sa_cutoff_usage[] = { "specify maximum amount of secondary alignment rows to look at before saying accession is good, default 100000.",
+        "Specifying '0' will iterate the whole table. Can be in percent (e.g. 5%)",
+        NULL };
+
+#define ALIAS_SEQ_CUTOFF    NULL
+#define OPTION_SEQ_CUTOFF   "seq-cutoff"
+
+static const char * seq_cutoff_usage[] = { "specify maximum amount of sequence table rows to look at before saying accession is good, default 100000.",
+        "Specifying '0' will iterate the whole table. Can be in percent (e.g. 5%)",
+        NULL };
+
+#define ALIAS_SA_SHORT_THRESHOLD NULL
+#define OPTION_SA_SHORT_THRESHOLD "sa-short-threshold"
+static const char * sa_short_threshold_usage[] = { "specify amount of secondary alignment which are shorter (hard-clipped) than corresponding primaries, default 1%.",
+        NULL };
+
+OptDef Options[] = {
+      { OPTION_SA_CUTOFF          , ALIAS_SA_CUTOFF          , NULL, sa_cutoff_usage            , 1, true , false },
+      { OPTION_SEQ_CUTOFF         , ALIAS_SEQ_CUTOFF         , NULL, seq_cutoff_usage           , 1, true , false },
+      { OPTION_SA_SHORT_THRESHOLD , ALIAS_SA_SHORT_THRESHOLD , NULL, sa_short_threshold_usage   , 1, true , false }
+};
+
+rc_t CC UsageSummary (const char * progname)
+{
+    return KOutMsg (
+        "\n"
+        "Usage:\n"
+        "  %s [options] path [path ...]\n"
+        "\n"
+        "Summary:\n"
+        "  Validate a list of runs for corrupted data\n"
+        "\n", progname);
+    return 0;
+}
+
+rc_t CC Usage ( const Args * args )
+{
+    const char * progname = UsageDefaultName;
+    const char * fullpath = UsageDefaultName;
+    rc_t rc;
+
+    if (args == NULL)
+        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
+    else
+        rc = ArgsProgram (args, &fullpath, &progname);
+    if (rc)
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary (progname);
+
+    KOutMsg ("Options:\n");
+
+    HelpOptionLine(ALIAS_SA_CUTOFF          , OPTION_SA_CUTOFF           , "cutoff"    , sa_cutoff_usage);
+    HelpOptionLine(ALIAS_SEQ_CUTOFF         , OPTION_SEQ_CUTOFF          , "cutoff"    , seq_cutoff_usage);
+    HelpOptionLine(ALIAS_SA_SHORT_THRESHOLD , OPTION_SA_SHORT_THRESHOLD  , "threshold" , sa_short_threshold_usage);
+    XMLLogger_Usage();
+
+    KOutMsg ("\n");
+
+    HelpOptionsStandard ();
+
+    HelpVersion (fullpath, KAppVersion());
+
+    return rc;
+}
+
+rc_t parseArgs ( Args * args, CheckCorruptConfig * config )
+{
+    rc_t rc;
+    uint32_t opt_count;
+    rc = ArgsOptionCount ( args, OPTION_SA_CUTOFF, &opt_count );
+    if (rc)
+    {
+        LOGERR (klogInt, rc, "ArgsOptionCount() failed for " OPTION_SA_CUTOFF);
+        return rc;
+    }
+
+    if (opt_count > 0)
+    {
+        const char * value;
+        size_t value_size;
+        rc = ArgsOptionValue ( args, OPTION_SA_CUTOFF, 0, (const void **) &value );
+        if (rc)
+        {
+            LOGERR (klogInt, rc, "ArgsOptionValue() failed for " OPTION_SA_CUTOFF);
+            return rc;
+        }
+
+        value_size = string_size ( value );
+        if ( value_size >= 1 && value[value_size - 1] == '%' )
+        {
+            config->sa_cutoff_percent = string_to_U64 ( value, value_size - 1, &rc );
+            if (rc)
+            {
+                LOGERR (klogInt, rc, "string_to_U64() failed for " OPTION_SA_CUTOFF);
+                return rc;
+            }
+            else if (config->sa_cutoff_percent == 0 || config->sa_cutoff_percent > 100)
+            {
+                LOGERR (klogInt, rc, OPTION_SA_CUTOFF " has illegal percentage value (has to be 1-100%)" );
+                return 1;
+            }
+            config->sa_cutoff_percent /= 100;
+        }
+        else
+        {
+            config->sa_cutoff_percent = -1;
+            config->sa_cutoff_number = string_to_U64 ( value, value_size, &rc );
+            if (rc)
+            {
+                LOGERR (klogInt, rc, "string_to_U64() failed for " OPTION_SA_CUTOFF);
+                return rc;
+            }
+        }
+    }
+
+    rc = ArgsOptionCount ( args, OPTION_SEQ_CUTOFF, &opt_count );
+    if (rc)
+    {
+        LOGERR (klogInt, rc, "ArgsOptionCount() failed for " OPTION_SEQ_CUTOFF);
+        return rc;
+    }
+
+    if (opt_count > 0)
+    {
+        const char * value;
+        size_t value_size;
+        rc = ArgsOptionValue ( args, OPTION_SEQ_CUTOFF, 0, (const void **) &value );
+        if (rc)
+        {
+            LOGERR (klogInt, rc, "ArgsOptionValue() failed for " OPTION_SEQ_CUTOFF);
+            return rc;
+        }
+
+        value_size = string_size ( value );
+        if ( value_size >= 1 && value[value_size - 1] == '%' )
+        {
+            config->seq_cutoff_percent = string_to_U64 ( value, value_size - 1, &rc );
+            if (rc)
+            {
+                LOGERR (klogInt, rc, "string_to_U64() failed for " OPTION_SEQ_CUTOFF);
+                return rc;
+            }
+            else if (config->seq_cutoff_percent == 0 || config->seq_cutoff_percent > 100)
+            {
+                LOGERR (klogInt, rc, OPTION_SEQ_CUTOFF " has illegal percentage value (has to be 1-100%)" );
+                return 1;
+            }
+            config->seq_cutoff_percent /= 100;
+        }
+        else
+        {
+            config->seq_cutoff_percent = -1;
+            config->seq_cutoff_number = string_to_U64 ( value, value_size, &rc );
+            if (rc)
+            {
+                LOGERR (klogInt, rc, "string_to_U64() failed for " OPTION_SEQ_CUTOFF);
+                return rc;
+            }
+        }
+    }
+
+    rc = ArgsOptionCount ( args, OPTION_SA_SHORT_THRESHOLD, &opt_count );
+    if (rc)
+    {
+        LOGERR (klogInt, rc, "ArgsOptionCount() failed for " OPTION_SA_SHORT_THRESHOLD);
+        return rc;
+    }
+
+    if (opt_count > 0)
+    {
+        const char * value;
+        size_t value_size;
+        rc = ArgsOptionValue ( args, OPTION_SA_SHORT_THRESHOLD, 0, (const void **) &value );
+        if (rc)
+        {
+            LOGERR (klogInt, rc, "ArgsOptionValue() failed for " OPTION_SA_SHORT_THRESHOLD);
+            return rc;
+        }
+
+        value_size = string_size ( value );
+        if ( value_size >= 1 && value[value_size - 1] == '%' )
+        {
+            config->pa_len_threshold_percent = string_to_U64 ( value, value_size - 1, &rc );
+            if (rc)
+            {
+                LOGERR (klogInt, rc, "string_to_U64() failed for " OPTION_SA_SHORT_THRESHOLD);
+                return rc;
+            }
+            else if (config->pa_len_threshold_percent == 0 || config->pa_len_threshold_percent > 100)
+            {
+                LOGERR (klogInt, rc, OPTION_SA_SHORT_THRESHOLD " has illegal percentage value (has to be 1-100%)" );
+                return 1;
+            }
+            config->pa_len_threshold_percent /= 100;
+        }
+        else
+        {
+            config->pa_len_threshold_percent = -1;
+            config->pa_len_threshold_number = string_to_U64 ( value, value_size, &rc );
+            if (rc)
+            {
+                LOGERR (klogInt, rc, "string_to_U64() failed for " OPTION_SA_SHORT_THRESHOLD);
+                return rc;
+            }
+        }
+    }
+
+    return 0;
+}
+
+rc_t CC KMain ( int argc, char *argv [] )
+{
+    XMLLogger const *xlogger = NULL;
+    Args * args;
+    rc_t rc;
+    bool any_failed = false;
+    CheckCorruptConfig config = { -1.0, SA_TABLE_LOOKUP_LIMIT, -1.0, SEQ_TABLE_LOOKUP_LIMIT, PA_LONGER_SA_LIMIT, 0 };
+
+    KLogLevelSet(klogInfo);
+
+    rc = ArgsMakeAndHandle (&args, argc, argv, 2, Options,
+                            sizeof (Options) / sizeof (Options[0]),
+                            XMLLogger_Args, XMLLogger_ArgsQty);
+    if (rc)
+        LOGERR (klogInt, rc, "failed to parse command line parameters");
+    else
+    {
+        rc = XMLLogger_Make(&xlogger, NULL, args);
+        if (rc)
+            LOGERR (klogInt, rc, "failed to make xml logger");
+        else
+        {
+            rc = parseArgs ( args, &config );
+            if (rc == 0)
+            {
+                uint32_t pcount;
+                rc = ArgsParamCount ( args, &pcount );
+                if (rc)
+                    LOGERR (klogInt, rc, "ArgsParamCount() failed");
+                else
+                {
+                    if ( pcount == 0 )
+                        LOGMSG (klogErr, "no accessions were passed in");
+                    else
+                    {
+                        for ( uint32_t i = 0; i < pcount; ++i )
+                        {
+                            const char * accession;
+                            rc = ArgsParamValue ( args, i, (const void **)&accession );
+                            if (rc)
+                            {
+                                PLOGERR (klogInt, (klogInt, rc, "failed to get $(PARAM_I) accession from command line", "PARAM_I=%d", i));
+                                any_failed = true;
+                            }
+                            else
+                            {
+                                if (!checkAccession ( accession, &config ))
+                                    any_failed = true;
+                            }
+                        }
+
+                        if (!any_failed)
+                            LOGMSG (klogInfo, "All accessions are good!");
+                    }
+                }
+            }
+            XMLLogger_Release(xlogger);
+        }
+        ArgsWhack ( args );
+    }
+    return rc != 0 || any_failed ? 1 : 0;
+}
+
+}
diff --git a/tools/vdb-validate/vdb-validate.c b/tools/vdb-validate/vdb-validate.c
new file mode 100644
index 0000000..1e3bd2f
--- /dev/null
+++ b/tools/vdb-validate/vdb-validate.c
@@ -0,0 +1,3351 @@
+/*===========================================================================
+ *
+ *                            PUBLIC DOMAIN NOTICE
+ *               National Center for Biotechnology Information
+ *
+ *  This software/database is a "United States Government Work" under the
+ *  terms of the United States Copyright Act.  It was written as part of
+ *  the author's official duties as a United States Government employee and
+ *  thus cannot be copyrighted.  This software/database is freely available
+ *  to the public for use. The National Library of Medicine and the U.S.
+ *  Government have not placed any restriction on its use or reproduction.
+ *
+ *  Although all reasonable efforts have been taken to ensure the accuracy
+ *  and reliability of the software and data, the NLM and the U.S.
+ *  Government do not and cannot warrant the performance or results that
+ *  may be obtained by using this software or data. The NLM and the U.S.
+ *  Government disclaim all warranties, express or implied, including
+ *  warranties of performance, merchantability or fitness for any particular
+ *  purpose.
+ *
+ *  Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ */
+
+#include <vfs/manager-priv.h> /* VFSManagerOpenFileReadDecrypt */
+#include <vfs/manager.h> /* VFSManagerMake */
+#include <vfs/resolver.h> /* VResolver */
+#include <vfs/path.h> /* VPathMake */
+
+#include <kapp/main.h>
+#include <kapp/args.h>
+#include <kapp/log-xml.h>
+
+#include <kdb/manager.h>
+#include <kdb/database.h>
+#include <kdb/table.h>
+#include <kdb/meta.h>
+#include <kdb/namelist.h>
+#include <kdb/consistency-check.h>
+#include <kdb/kdb-priv.h> /* KTableOpenDirectoryRead */
+
+#include <vdb/manager.h>
+#include <vdb/schema.h>
+#include <vdb/database.h>
+#include <vdb/table.h>
+#include <vdb/cursor.h>
+#include <vdb/dependencies.h> /* UIError */
+#include <vdb/vdb-priv.h> /* VTableOpenKTableRead */
+
+#include <krypto/encfile.h> /* KEncFileValidate */
+#include <krypto/wgaencrypt.h> /* KEncFileValidate */
+
+#include <kfs/kfs-priv.h>
+#include <kfs/sra.h>
+#include <kfs/tar.h>
+#include <kfs/file.h> /* KFileRelease */
+
+#include <insdc/insdc.h>
+#include <insdc/sra.h>
+#include <sra/srapath.h>
+#include <sra/sradb.h>
+#include <sra/sraschema.h>
+
+#include <klib/out.h>
+#include <klib/log.h>
+#include <klib/rc.h>
+#include <klib/namelist.h>
+#include <klib/container.h>
+#include <klib/text.h> /* String */
+#include <klib/status.h> /* STSMSG */
+#include <klib/debug.h>
+#include <klib/data-buffer.h>
+#include <klib/sort.h>
+
+#include <sysalloc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+#include <math.h>
+
+#ifndef MIN
+#define MIN(a,b)    (((a) < (b)) ? (a) : (b))
+#endif
+
+#ifndef MAX
+#define MAX(a,b)    (((a) > (b)) ? (a) : (b))
+#endif
+
+#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
+    if (rc2 != 0 && rc == 0) { rc = rc2; } obj = NULL; } while (false)
+
+#define SDC_ROW_CHUNK_MAX 8ull*1024ull*1024ull
+
+#if 0
+#define DBG_MSG(args) KOutMsg args
+#else
+#define DBG_MSG(args)
+#endif
+
+static bool exhaustive;
+static bool md5_required;
+static bool ref_int_check;
+static bool s_IndexOnly;
+static size_t memory_suggestion = (2ull * 1024ull * 1024ull * 1024ull);
+
+typedef struct node_s {
+    int parent;
+    int prvSibl;
+    int nxtSibl;
+    int firstChild;
+    unsigned depth;
+    unsigned name;
+    uint32_t objType;
+} node_t;
+typedef struct cc_context_s {
+    node_t *nodes;
+    char *names;
+    rc_t rc;
+    unsigned num_columns;
+    unsigned nextNode;
+    unsigned nextName;
+} cc_context_t;
+static
+rc_t report_rtn ( rc_t rc )
+{
+    return exhaustive ? 0 : rc;
+}
+
+static rc_t report_index(CCReportInfoBlock const *what, cc_context_t *ctx)
+{
+    switch (what->type) {
+    case ccrpt_Done:
+        if (what->info.done.rc) {
+            (void)PLOGERR(klogErr, (klogErr, what->info.done.rc,
+                "Index '$(index)': $(mesg)",
+                "index=%s,mesg=%s", what->objName, what->info.done.mesg));
+            if (ctx->rc == 0)
+                ctx->rc = what->info.done.rc;
+        }
+        return report_rtn (what->info.done.rc);
+    case ccrpt_Index:
+        return 0; /* continue with check */
+    case ccrpt_MD5:
+        if (what->info.MD5.rc) {
+            (void)PLOGERR(klogErr, (klogErr, what->info.MD5.rc,
+                "File '$(file)' of index '$(index)' failed MD5 check",
+                "file=%s,index=%s", what->info.MD5.file, what->objName));
+            if (ctx->rc == 0)
+                ctx->rc = what->info.MD5.rc;
+        }
+        return report_rtn (what->info.MD5.rc);
+    default:
+        return RC(rcExe, rcTable, rcVisiting, rcParam, rcUnexpected);
+    }
+}
+
+static rc_t report_column(CCReportInfoBlock const *what, cc_context_t *ctx)
+{
+    switch (what->type) {
+    case ccrpt_Done:
+        if (what->info.done.rc) {
+            (void)PLOGERR(klogErr, (klogErr, what->info.done.rc,
+                "Column '$(column)': $(mesg)",
+                "column=%s,mesg=%s", what->objName, what->info.done.mesg));
+            if (ctx->rc == 0)
+                ctx->rc = what->info.done.rc;
+        }
+        else {
+            (void)PLOGMSG(klogInfo, (klogInfo, "Column '$(column)': $(mesg)",
+                "column=%s,mesg=%s", what->objName,
+                what->info.done.mesg ? what->info.done.mesg : "checked"));
+            ++ctx->num_columns;
+        }
+        return report_rtn (what->info.done.rc);
+    case ccrpt_Blob:
+        return 0; /* continue with check */
+    case ccrpt_MD5:
+        if (what->info.MD5.rc) {
+            (void)PLOGERR(klogErr, (klogErr, what->info.MD5.rc,
+                "File '$(file)' of column '$(column)' failed MD5 check",
+                "file=%s,column=%s", what->info.MD5.file, what->objName));
+            if (ctx->rc == 0)
+                ctx->rc = what->info.MD5.rc;
+        }
+        return report_rtn (what->info.MD5.rc);
+    default:
+        return RC(rcExe, rcTable, rcVisiting, rcParam, rcUnexpected);
+    }
+}
+
+static rc_t report_table(CCReportInfoBlock const *what, cc_context_t *ctx)
+{
+    switch (what->type) {
+    case ccrpt_Done:
+        if (what->info.done.rc) {
+            (void)PLOGERR(klogErr, (klogErr, what->info.done.rc,
+                "Table '$(table)': $(mesg)",
+                "table=%s,mesg=%s", what->objName, what->info.done.mesg));
+            if (ctx->rc == 0)
+                ctx->rc = what->info.done.rc;
+        }
+        else if (what->info.done.mesg) {
+            if (strcmp(what->info.done.mesg, "missing md5 file") == 0
+                && md5_required)
+            {
+                rc_t rc = RC(0, rcTable, rcValidating, rcChecksum, rcNotFound);
+                (void)PLOGERR(klogErr, (klogErr, rc,
+                    "Table '$(table)': is missing required md5 files",
+                    "table=%s", what->objName));
+                return rc;
+            }
+            else if (strncmp("unexpected object ",
+                what->info.done.mesg, 18) == 0)
+            {
+                (void)PLOGMSG(klogWarn, (klogWarn,
+                    "Table '$(tbl)': $(mesg)", "tbl=%s,mesg=%s",
+                    what->objName, what->info.done.mesg));
+            }
+            else {
+                (void)PLOGMSG(klogInfo, (klogInfo,
+                    "Table '$(tbl)' metadata: $(mesg)",
+                    "tbl=%s,mesg=%s", what->objName, what->info.done.mesg));
+            }
+        }
+        return report_rtn (what->info.done.rc);
+    case ccrpt_MD5:
+        if (what->info.MD5.rc) {
+            (void)PLOGERR(klogErr, (klogErr, what->info.MD5.rc,
+                "File '$(file)' of table '$(table)' failed MD5 check",
+                "file=%s,table=%s", what->info.MD5.file, what->objName));
+            if (ctx->rc == 0)
+                ctx->rc = what->info.MD5.rc;
+        }
+        return report_rtn (what->info.MD5.rc);
+    default:
+        return RC(rcExe, rcTable, rcVisiting, rcParam, rcUnexpected);
+    }
+}
+
+static rc_t report_database(CCReportInfoBlock const *what, cc_context_t *ctx)
+{
+    switch (what->type) {
+    case ccrpt_Done:
+        if (what->info.done.rc) {
+            (void)PLOGERR(klogErr, (klogErr, what->info.done.rc,
+                "Database '$(db)': $(mesg)",
+                "db=%s,mesg=%s", what->objName, what->info.done.mesg));
+            if (ctx->rc == 0)
+                ctx->rc = what->info.done.rc;
+        }
+        else if (what->info.done.mesg) {
+            if (strcmp(what->info.done.mesg, "missing md5 file") == 0
+                && md5_required)
+            {
+                rc_t rc
+                    = RC(rcExe, rcTable, rcValidating, rcChecksum, rcNotFound);
+                (void)PLOGERR(klogErr, (klogErr, rc,
+                    "Database '$(table)': is missing required md5 files",
+                    "table=%s", what->objName));
+                return rc;
+            }
+            else {
+                (void)PLOGMSG(klogInfo, (klogInfo,
+                    "Database '$(db)' metadata: $(mesg)",
+                    "db=%s,mesg=%s", what->objName, what->info.done.mesg));
+            }
+        }
+        return report_rtn (what->info.done.rc);
+    case ccrpt_MD5:
+        if (what->info.MD5.rc) {
+            (void)PLOGERR(klogErr, (klogErr, what->info.MD5.rc,
+                "File '$(file)' of database '$(db)' failed MD5 check",
+                "file=%s,db=%s", what->info.MD5.file, what->objName));
+            if (ctx->rc == 0)
+                ctx->rc = what->info.MD5.rc;
+        }
+        return report_rtn (what->info.MD5.rc);
+    default:
+        return RC(rcExe, rcTable, rcVisiting, rcParam, rcUnexpected);
+    }
+}
+
+static rc_t visiting(CCReportInfoBlock const *what, cc_context_t *ctx)
+{
+    unsigned const nn = ctx->nextNode++;
+    node_t *const nxt = &ctx->nodes[nn];
+    node_t *const cur = nxt - 1;
+
+    nxt->parent = nxt->prvSibl = nxt->nxtSibl = nxt->firstChild = -1;
+    nxt->depth = what->info.visit.depth;
+    nxt->objType = what->objType;
+    nxt->name = ctx->nextName;
+    ctx->nextName += (unsigned)strlen(what->objName) + 1;
+    strcpy(&ctx->names[nxt->name], what->objName);
+
+    if (nn) {
+        if (cur->depth == nxt->depth) {
+            nxt->parent = cur->parent;
+            nxt->prvSibl = nn - 1;
+            cur->nxtSibl = nn;
+        }
+        else if (cur->depth < nxt->depth) {
+            nxt->parent = nn - 1;
+            cur->firstChild = nn;
+        }
+        else {
+            unsigned sibling = cur->parent;
+
+            while (ctx->nodes[sibling].depth > nxt->depth)
+                sibling = ctx->nodes[sibling].parent;
+            nxt->parent = ctx->nodes[sibling].parent;
+            nxt->prvSibl = sibling;
+            ctx->nodes[sibling].nxtSibl = nn;
+        }
+    }
+    return 0;
+}
+
+static rc_t CC report(CCReportInfoBlock const *what, void *Ctx)
+{
+    cc_context_t *ctx = Ctx;
+    rc_t rc = Quitting();
+
+    if (rc)
+        return rc;
+
+    if (what->type == ccrpt_Visit)
+        return visiting(what, ctx);
+
+    switch (what->objType) {
+    case kptDatabase:
+        return report_database(what, ctx);
+    case kptTable:
+        return report_table(what, ctx);
+    case kptColumn:
+        return report_column(what, ctx);
+    case kptIndex:
+        return report_index(what, ctx);
+    default:
+        return RC(rcExe, rcTable, rcVisiting, rcParam, rcUnexpected);
+    }
+}
+
+static
+rc_t kdbcc ( const KDBManager *mgr, char const name[], uint32_t mode,
+    KPathType *pathType, bool is_file, node_t nodes[], char names[],
+    INSDC_SRA_platform_id platform )
+{
+    rc_t rc = 0;
+    cc_context_t ctx;
+    char const *objtype;
+
+    uint32_t level = ( mode & 4 ) ? 3 : ( mode & 2 ) ? 1 : 0;
+    if (s_IndexOnly)
+        level |= CC_INDEX_ONLY;
+
+
+    memset(&ctx, 0, sizeof(ctx));
+    ctx.nodes = &nodes[0];
+    ctx.names = &names[0];
+
+    if (KDBManagerExists(mgr, kptDatabase, "%s", name))
+        *pathType = kptDatabase;
+    else if (KDBManagerExists(mgr, kptTable, "%s", name))
+        *pathType = kptTable;
+    else if (*pathType == kptDatabase || *pathType == kptTable)
+        /* is known already: may be encrypted */ ( void) 0;
+    else
+    {
+        rc = RC(rcExe, rcPath, rcValidating, rcType, rcUnknown);
+        (void)PLOGERR(klogErr, (klogErr, rc, "Object '$(table)' "
+            "has unknown type", "table=%s", name));
+        return rc;
+    }
+
+    if (*pathType == kptDatabase)
+    {
+        const KDatabase *db;
+
+        objtype = "database";
+        rc = KDBManagerOpenDBRead ( mgr, & db, "%s", name );
+        if ( rc == 0 )
+        {
+            rc = KDatabaseConsistencyCheck ( db, 0, level, report, & ctx );
+            if ( rc == 0 )
+            {
+                rc = ctx.rc;
+                if ( s_IndexOnly )
+                    (void)LOGMSG(klogInfo, "Indices: checked");
+            }
+
+            KDatabaseRelease ( db );
+        }
+    }
+    else
+    {
+        const KTable *tbl;
+
+        objtype = "table";
+        rc = KDBManagerOpenTableRead ( mgr, & tbl, "%s", name );
+        if ( rc == 0 )
+        {
+            rc = KTableConsistencyCheck ( tbl, 0, level, report, & ctx, platform );
+            if ( rc == 0 )
+                rc = ctx.rc;
+
+            if ( rc == 0 && s_IndexOnly )
+                (void)LOGMSG(klogInfo, "Index: checked");
+
+            KTableRelease ( tbl );
+        }
+    }
+
+    if (rc == 0 && ctx.num_columns == 0 && !s_IndexOnly)
+    {
+        if (is_file)
+        {
+            (void)PLOGMSG(klogWarn, (klogWarn, "Nothing to validate; "
+                                     "the file '$(file)' has no checksums or is truncated.",
+                                     "file=%s", name));
+        }
+        else
+        {
+            (void)PLOGMSG(klogWarn, (klogWarn, "Nothing to validate; "
+                                     "the $(type) '$(file)' has no checksums or is empty.",
+                                     "type=%s,file=%s", objtype, name));
+        }
+    }
+
+    return rc;
+}
+
+static
+rc_t vdbcc ( const VDBManager *mgr, char const name[], uint32_t mode,
+    KPathType *pathType, bool is_file)
+{
+#if 0
+    if ( ( mode & 8) != 0 )
+    {
+        const VTable *tbl;
+        rc_t rc = VDBManagerOpenTableRead(mgr, &tbl, NULL, "%s", name);
+        if (rc == 0)
+            rc = VTableConsistencyCheck(tbl, 2);
+        return rc;
+    }
+#endif
+    return 0;
+}
+
+typedef struct ColumnInfo_s {
+    char const *name;
+    union {
+        void     const *vp;
+        char     const *string;
+        bool     const *tf;
+        int8_t   const *i8;
+        uint8_t  const *u8;
+        int16_t  const *i16;
+        uint16_t const *u16;
+        int32_t  const *i32;
+        uint32_t const *u32;
+        int64_t  const *i64;
+        uint64_t const *u64;
+        float    const *f32;
+        double   const *f64;
+    } value;
+    uint32_t idx;
+    uint32_t elem_bits;
+    uint32_t elem_count;
+} ColumnInfo;
+
+static rc_t CC get_sizes_cb(const KDirectory *dir,
+    uint32_t type, const char *name, void *data)
+{
+    struct {
+        unsigned count;
+        size_t size;
+    } *pb = data;
+
+    ++pb->count;
+    pb->size += strlen(name) + 1;
+
+    return 0;
+}
+
+static rc_t get_sizes(KDirectory const *dir, unsigned *nobj, size_t *namesz)
+{
+    rc_t rc;
+    struct {
+        unsigned count;
+        size_t size;
+    } pb;
+
+    memset(&pb, 0, sizeof(pb));
+    rc = KDirectoryVVisit(dir, true, get_sizes_cb, &pb, NULL, NULL);
+    if (rc)
+        memset(&pb, 0, sizeof(pb));
+    *nobj = pb.count;
+    *namesz = pb.size;
+    return rc;
+}
+
+static rc_t EncFileReadAll(const char *name,
+    char *buffer, size_t bsize, size_t *num_read)
+{
+    rc_t rc = 0;
+
+    VFSManager *mgr = NULL;
+    VPath *path = NULL;
+    const KFile *f = NULL;
+
+    rc = VFSManagerMake(&mgr);
+    if (rc != 0) {
+        LOGERR(klogErr, rc, "Failed to VFSManagerMake()");
+    }
+
+    if (rc == 0) {
+        rc = VFSManagerMakePath (mgr, &path, "%s", name);
+        if (rc != 0) {
+            (void)PLOGERR(klogErr, (klogErr, rc,
+                "Failed to VPathMake($(name))", "name=%s", name));
+        }
+    }
+
+    if (rc == 0) {
+        rc = VFSManagerOpenFileReadDecrypt(mgr, &f, path);
+        if (rc != 0) {
+            (void)PLOGERR(klogErr, (klogErr, rc,
+                "Failed to VFSManagerOpenFileReadDecrypt($(name))",
+                "name=%s", name));
+        }
+    }
+
+    if (rc == 0) {
+        rc = KFileReadAll(f, 0, buffer, bsize, num_read);
+        if (rc != 0) {
+            (void)PLOGERR(klogErr, (klogErr, rc,
+                "Failed to KFileReadAll($(name))", "name=%s", name));
+        }
+    }
+
+    KFileRelease(f);
+    VPathRelease(path);
+    VFSManagerRelease(mgr);
+
+    return rc;
+}
+
+
+#if 0
+static rc_t verify_encryption(const KDirectory *dir, const char *name,
+    bool *enc, bool *sra)
+{
+    rc_t rc = 0;
+    const KFile *f = NULL;
+    char buffer[24];
+    size_t num_read = ~0;
+
+    assert(enc && sra);
+    *enc = false;
+    *sra = true;
+
+    rc = KDirectoryOpenFileRead(dir, &f, "%s", name);
+    if (rc == 0) {
+        rc = KFileReadAll(f, 0, &buffer, sizeof buffer, &num_read);
+    }
+
+    if (rc == 0) {
+        size_t sz = num_read < 8 ? num_read : 8;
+        assert(num_read <= sizeof buffer);
+        rc = KFileIsEnc(buffer, sz);
+        if (rc == 0)
+        {
+            (void)PLOGMSG(klogInfo, (klogInfo, "File '$(f)' is encrypted",
+                "f=%s", name));
+            *enc = true;
+            rc = KEncFileValidate(f);
+            if (rc != 0) {
+                (void)PLOGERR(klogErr, (klogErr, rc, "Failure of encryption "
+                    "validation of file '$(name)'", "name=%s", name));
+            }
+            else {
+                (void)PLOGMSG(klogInfo, (klogInfo, "File '$(f)': encryption OK",
+                    "f=%s", name));
+                rc = EncFileReadAll(name, buffer, sizeof buffer, &num_read);
+            }
+        }
+        else {
+            rc = 0;
+            (void)PLOGMSG(klogInfo, (klogInfo, "File '$(f)' is not encrypted",
+                "f=%s", name));
+        }
+    }
+
+    if (rc == 0) {
+        rc = KFileIsSRA(buffer, num_read);
+        if (rc == 0) {
+            *sra = true;
+        }
+        else if (rc
+            == SILENT_RC(rcFS, rcFile, rcIdentifying, rcBuffer, rcWrongType))
+        {
+            rc = 0;
+            *sra = false;
+        }
+        else {
+            (void)PLOGERR(klogErr, (klogErr, rc,
+                "Failed to KFileIsSRA($(name))", "name=%s", name));
+        }
+    }
+
+    KFileRelease(f);
+
+    return rc;
+}
+#endif
+
+static rc_t init_dbcc(KDirectory const *dir, char const name[], bool is_file,
+    node_t **nodes, char **names, KPathType *pathType)
+{
+    KDirectory const *obj;
+    unsigned nobj;
+    size_t namesz;
+    rc_t rc = 0;
+
+    assert(pathType);
+
+    if (is_file) {
+        rc = KDirectoryOpenSraArchiveRead_silent(dir, &obj, false, "%s", name);
+        if (rc != 0)
+        {   rc = KDirectoryOpenTarArchiveRead_silent(dir, &obj, false, "%s", name); }
+        if (rc != 0) {
+            const VDBManager *mgr = NULL;
+            const VTable *tbl = NULL;
+            VSchema *sra_schema = NULL;
+            rc = VDBManagerMakeRead(&mgr, dir);
+            if (rc != 0)
+            {   return rc; }
+            for ( ; rc == 0; ) {
+                rc = VDBManagerOpenTableRead(mgr, &tbl, sra_schema, "%s", name);
+                VSchemaRelease(sra_schema);
+                if (rc == 0) {
+                    const KTable *ktbl = NULL;
+                    rc = VTableOpenKTableRead(tbl, &ktbl);
+                    if (rc == 0)
+                    {   rc = KTableOpenDirectoryRead(ktbl, &obj); }
+                    KTableRelease(ktbl);
+                    *pathType = kptTable;
+                    break;
+                }
+                else if (GetRCState(rc) == rcNotFound
+                    && GetRCObject(rc) == (enum RCObject)rcSchema && sra_schema == NULL)
+                {
+                     rc = VDBManagerMakeSRASchema(mgr, &sra_schema);
+                }
+                else {
+                    const VDatabase *db = NULL;
+                    const KDatabase *kdb = NULL;
+                    rc = VDBManagerOpenDBRead(mgr, &db, NULL, "%s", name);
+                    if (rc == 0)
+                    {   rc = VDatabaseOpenKDatabaseRead(db, &kdb); }
+                    if (rc == 0)
+                    {   rc = KDatabaseOpenDirectoryRead(kdb, &obj); }
+                    if (rc == 0)
+                    {   *pathType = kptDatabase; }
+                    KDatabaseRelease(kdb);
+                    VDatabaseRelease(db);
+                    break;
+                }
+            }
+            VTableRelease(tbl);
+            VDBManagerRelease(mgr);
+        }
+    }
+    else {
+        rc = KDirectoryOpenDirRead(dir, &obj, false, "%s", name);
+    }
+    if (rc)
+        return rc;
+    rc = get_sizes(obj, &nobj, &namesz);
+    KDirectoryRelease(obj);
+    if (rc) {
+        *nodes = NULL;
+        *names = NULL;
+    }
+    else {
+        *nodes = calloc(1, nobj * sizeof(**nodes) + namesz);
+        if (nodes)
+            *names = (char *)&(*nodes)[nobj];
+        else
+            rc = RC(rcExe, rcSelf, rcConstructing, rcMemory, rcExhausted);
+    }
+    return rc;
+}
+
+static rc_t get_schema_info(KMetadata const *meta, char buffer[], size_t bsz,
+    char **vers)
+{
+    KMDataNode const *node;
+    rc_t rc = KMetadataOpenNodeRead(meta, &node, "schema");
+
+    if (rc == 0) {
+        size_t sz;
+
+        rc = KMDataNodeReadAttr(node, "name", buffer, bsz, &sz);
+        if (rc == 0) {
+            buffer[sz] = '\0';
+            *vers = &buffer[sz];
+            while (sz) {
+                --sz;
+                if (buffer[sz] == '#') {
+                    buffer[sz] = '\0';
+                    *vers = &buffer[sz + 1];
+                    break;
+                }
+            }
+        }
+        KMDataNodeRelease(node);
+    }
+    return rc;
+}
+
+static rc_t get_tbl_schema_info(VTable const *tbl, char buffer[], size_t bsz,
+    char **vers)
+{
+    KMetadata const *meta;
+    rc_t rc = VTableOpenMetadataRead(tbl, &meta);
+
+    *(*vers = &buffer[0]) = '\0';
+    if (rc == 0) rc = get_schema_info(meta, buffer, bsz, vers);
+    return 0;
+}
+
+static rc_t get_db_schema_info(VDatabase const *db, char buffer[], size_t bsz,
+    char **vers)
+{
+    KMetadata const *meta;
+    rc_t rc = VDatabaseOpenMetadataRead(db, &meta);
+
+    *(*vers = &buffer[0]) = '\0';
+    if (rc == 0)
+    {
+        rc = get_schema_info(meta, buffer, bsz, vers);
+        KMetadataRelease(meta);
+    }
+
+    return rc;
+}
+
+static rc_t sra_dbcc_454(VTable const *tbl, char const name[])
+{
+    /* TODO: complete this */
+    return 0;
+}
+
+typedef struct vdb_validate_params vdb_validate_params;
+struct vdb_validate_params
+{
+    const KDirectory *wd;
+    const KDBManager *kmgr;
+    const VDBManager *vmgr;
+
+    bool md5_chk;
+    bool md5_chk_explicit;
+    bool blob_crc;
+    bool index_chk;
+    bool consist_check;
+    bool exhaustive;
+
+    // data integrity checks parameters
+    bool sdc_enabled;
+    bool sdc_sec_rows_in_percent;
+    union
+    {
+        double percent;
+        uint64_t number;
+    } sdc_sec_rows;
+
+    bool sdc_seq_rows_in_percent;
+    union
+    {
+        double percent;
+        uint64_t number;
+    } sdc_seq_rows;
+
+    bool sdc_pa_len_thold_in_percent;
+    union
+    {
+        double percent;
+        uint64_t number;
+    } sdc_pa_len_thold;
+};
+
+static rc_t tableConsistCheck(const vdb_validate_params *pb, const VTable *tbl)
+{
+    rc_t rce = 0;
+
+    const VCursor *curs = NULL;
+
+    int64_t firstREAD_LEN = 0;
+    uint64_t countREAD_LEN = 0;
+
+    uint64_t i = 0;
+
+    ColumnInfo readLen;
+    ColumnInfo spotLen;
+
+    memset(&readLen, 0, sizeof readLen);
+    memset(&spotLen, 0, sizeof spotLen);
+
+    assert(pb);
+
+    if (!pb->consist_check) {
+        return 0;
+    }
+
+    rce = VTableCreateCursorRead(tbl, &curs);
+    if (rce != 0) {
+        return rce;
+    }
+    if (rce == 0) {
+        readLen.name = "READ_LEN";
+        rce = VCursorAddColumn(curs, &readLen.idx, "%s", readLen.name);
+    }
+    if (rce == 0) {
+        spotLen.name = "SPOT_LEN";
+        rce = VCursorAddColumn(curs, &spotLen.idx, "%s", spotLen.name);
+    }
+
+    if (rce == 0) {
+        assert(readLen.idx && spotLen.idx);
+        if (readLen.idx == 0) {
+            rce = RC(rcExe, rcTable, rcValidating, rcColumn, rcNotFound);
+            LOGERR(klogErr, rce, "Cannot find 'READ_LEN' column");
+        }
+        else if (spotLen.idx == 0) {
+            rce = RC(rcExe, rcTable, rcValidating, rcColumn, rcNotFound);
+            LOGERR(klogErr, rce, "Cannot find 'SPOT_LEN' column");
+        }
+    }
+
+    if (rce == 0) {
+        rce = VCursorOpen(curs);
+    }
+    if (rce == 0) {
+        rce =
+            VCursorIdRange(curs, readLen.idx, &firstREAD_LEN, &countREAD_LEN);
+    }
+    if (rce == 0) {
+        int64_t firstSPOT_LEN = 0;
+        uint64_t countSPOT_LEN = 0;
+        rce =
+            VCursorIdRange(curs, spotLen.idx, &firstSPOT_LEN, &countSPOT_LEN);
+        if (rce == 0) {
+            if (firstREAD_LEN != firstSPOT_LEN) {
+                rce = RC(rcExe, rcTable, rcValidating, rcColumn, rcInvalid);
+                LOGERR(klogErr, rce, "The first ID-s "
+                    "in READ_LEN and SPOT_LEN columns do not match");
+            }
+            else if (countREAD_LEN != countSPOT_LEN) {
+                rce = RC(rcExe, rcTable, rcValidating, rcColumn, rcInvalid);
+                LOGERR(klogErr, rce, "ID ranges "
+                    "in READ_LEN and SPOT_LEN columns do not match");
+            }
+        }
+    }
+
+    for (i = 0; i < countREAD_LEN; ++i) {
+        uint32_t n = 0;
+        uint32_t j = 0;
+        rc_t rc = VCursorCellDataDirect(curs, firstREAD_LEN + i,
+            readLen.idx, &readLen.elem_bits,
+            &readLen.value.vp, NULL, &readLen.elem_count);
+        if (rc != 0) {
+            PLOGERR(klogErr, (klogErr, rc,
+                "Cannot read 'READ_LEN' column at row $(row)",
+                "row=%ld", firstREAD_LEN + i));
+            if (rce == 0) {
+                rce = rc;
+            }
+            if (!pb->exhaustive) {
+                break;
+            }
+        }
+        rc = VCursorCellDataDirect(curs, firstREAD_LEN + i,
+            spotLen.idx, &spotLen.elem_bits,
+            &spotLen.value.vp, NULL, &spotLen.elem_count);
+        if (rc != 0) {
+            PLOGERR(klogErr, (klogErr, rc,
+                "Cannot read 'SPOT_LEN' column at row $(row)",
+                "row=%ld", firstREAD_LEN + i));
+            if (rce == 0) {
+                rce = rc;
+            }
+            if (!pb->exhaustive) {
+                break;
+            }
+        }
+
+        if (readLen.value.vp == NULL || spotLen.value.vp == NULL) {
+            rc = RC(rcExe, rcTable, rcValidating, rcData, rcNull);
+            PLOGERR(klogErr, (klogErr, rc,
+                "Invalid 'READ_LEN' or 'SPOT_LEN' value at row $(row)",
+                "row=%ld", firstREAD_LEN + i));
+            if (rce == 0) {
+                rce = rc;
+            }
+            if (!pb->exhaustive) {
+                break;
+            }
+        }
+        for (j = 0; j < readLen.elem_count; ++j) {
+            n += readLen.value.u32[j];
+        }
+        if (n != *(spotLen.value.u32)) {
+            rc = RC(rcExe, rcTable, rcValidating, rcData, rcCorrupt);
+            PLOGERR(klogErr, (klogErr, rc,
+                "Sum(READ_LEN) != SPOT_LEN in row $(row)",
+                "row=%ld", firstREAD_LEN + i));
+            if (rce == 0) {
+                rce = rc;
+            }
+            if (!pb->exhaustive) {
+                break;
+            }
+        }
+    }
+
+    if (rce == 0) {
+        LOGMSG(klogInfo, "Columns 'READ_LEN' and 'SPOT_LEN' are consistent");
+    }
+
+    VCursorRelease(curs);
+
+    return rce;
+}
+
+static rc_t sra_dbcc_fastq(const vdb_validate_params *pb,
+    const VTable *tbl, char const name[])
+{
+    static char const *const cn_FastQ[] = {
+        "READ", "QUALITY", "SPOT_LEN", "READ_START", "READ_LEN", "READ_TYPE"
+    };
+
+    VCursor const *curs;
+    rc_t rc = VTableCreateCursorRead(tbl, &curs);
+
+    if (rc == 0) {
+        unsigned const n = sizeof(cn_FastQ)/sizeof(cn_FastQ[0]);
+        ColumnInfo cols[sizeof(cn_FastQ)/sizeof(cn_FastQ[0])];
+        unsigned i;
+
+        memset(cols, 0, sizeof(cols));
+        for (i = 0; i < n; ++i) {
+            cols[i].name = cn_FastQ[i];
+            VCursorAddColumn(curs, &cols[i].idx, "%s", cols[i].name);
+        }
+        rc = VCursorOpen(curs);
+        if (rc == 0) {
+            rc = VCursorOpenRow(curs);
+            for (i = 0; i < n && rc == 0; ++i) {
+                VCursorCellData(curs, cols[i].idx, &cols[i].elem_bits,
+                    &cols[i].value.vp, NULL, &cols[i].elem_count);
+            }
+            if (   cols[0].idx == 0 || cols[0].elem_bits == 0
+                                                    || cols[0].value.vp == NULL
+                || cols[1].idx == 0 || cols[1].elem_bits == 0
+                                                    || cols[1].value.vp == NULL)
+            {
+                rc = RC(rcExe, rcTable, rcValidating, rcColumn, rcNotFound);
+            }
+            else if (cols[2].idx == 0 || cols[2].elem_bits == 0
+                                                    || cols[2].value.vp == NULL)
+            {
+                (void)PLOGERR(klogWarn, (klogWarn,
+                    RC(rcExe, rcTable, rcValidating, rcColumn, rcNotFound),
+                    "Table '$(name)' is usable for fasta only; no quality data",
+                    "name=%s", name));
+            }
+        }
+        VCursorRelease(curs);
+    }
+
+    if (rc == 0) {
+        rc = tableConsistCheck(pb, tbl);
+    }
+
+    if (rc) {
+        (void)PLOGERR(klogErr, (klogErr, rc,
+            "Table '$(name)' is damaged beyond any use", "name=%s", name));
+    }
+
+    return rc;
+}
+
+static rc_t VTable_get_platform(VTable const *tbl,
+    INSDC_SRA_platform_id *rslt)
+{
+    rc_t rc;
+    VCursor const *curs;
+    INSDC_SRA_platform_id platform = -1;
+
+    rc = VTableCreateCursorRead(tbl, &curs);
+    if (rc == 0) {
+        uint32_t cid;
+
+        rc = VCursorAddColumn(curs, &cid, "("sra_platform_id_t")PLATFORM");
+        if (rc == 0) {
+            rc = VCursorOpen(curs);
+            if (rc == 0) {
+                uint32_t ebits;
+                void const *data;
+                uint32_t boff;
+                uint32_t ecnt;
+
+                rc = VCursorCellDataDirect(curs, 1, cid,
+                    &ebits, &data, &boff, &ecnt);
+                if (rc == 0) {
+                    if (ebits == sizeof(platform) * 8 && boff == 0 && ecnt == 1)
+                        platform = ((INSDC_SRA_platform_id *)data)[0];
+                    else
+                        rc =
+                            RC(rcExe, rcTable, rcReading, rcType, rcUnexpected);
+                }
+            }
+        }
+        else
+            rc = 0;
+        VCursorRelease(curs);
+    }
+    rslt[0] = platform;
+    return rc;
+}
+
+static rc_t verify_table(const vdb_validate_params *pb,
+    const VTable *tbl, char const name[])
+{
+    char schemaName[1024];
+    char *schemaVers = NULL;
+    rc_t rc = 0;
+
+    get_tbl_schema_info(tbl, schemaName, sizeof(schemaName), &schemaVers);
+
+    if (schemaName[0] == '\0' || strncmp(schemaName, "NCBI:SRA:", 9) == 0) {
+        /* SRA or legacy SRA */
+        INSDC_SRA_platform_id platform;
+
+        rc = VTable_get_platform(tbl, &platform);
+        if (rc == 0) {
+            if (platform == (INSDC_SRA_platform_id)-1) {
+                (void)PLOGMSG(klogWarn, (klogWarn, "Couldn't determine "
+                    "SRA Platform; type of table '$(name)' is indeterminate.",
+                    "name=%s", name));
+            }
+            rc = sra_dbcc_fastq(pb, tbl, name);
+            if (rc == 0 && platform == SRA_PLATFORM_454) {
+                rc = sra_dbcc_454(tbl, name);
+            }
+        }
+        else {
+            (void)PLOGERR(klogErr, (klogErr, rc,
+                "Failed to read table '$(name)'", "name=%s", name));
+        }
+    }
+    return rc;
+}
+
+static rc_t verify_mgr_table(const vdb_validate_params *pb, char const name[])
+{
+    rc_t rc = 0;
+
+    const VTable *tbl = NULL;
+    VSchema *sra_schema = NULL;
+
+    const VDBManager *mgr = NULL;
+
+    assert(pb);
+
+    mgr = pb->vmgr;
+
+    for ( ; ; ) {
+        rc = VDBManagerOpenTableRead(mgr, &tbl, sra_schema, "%s", name);
+        VSchemaRelease(sra_schema);
+        if (rc == 0) {
+            rc = verify_table(pb, tbl, name);
+            break;
+        }
+        else if (GetRCState(rc) == rcNotFound && GetRCObject(rc) == (enum RCObject)rcSchema
+            && sra_schema == NULL)
+        {
+            rc = VDBManagerMakeSRASchema(mgr, &sra_schema);
+            if (rc) {
+                (void)PLOGERR(klogErr, (klogErr, rc,
+                    "Failed to open table '$(name)'", "name=%s", name));
+                break;
+            }
+        }
+        else {
+            (void)PLOGERR(klogErr, (klogErr, rc,
+                "Failed to open table '$(name)'", "name=%s", name));
+            break;
+        }
+    }
+
+    RELEASE(VSchema, sra_schema);
+    RELEASE(VTable, tbl);
+
+    return rc;
+}
+
+#if 0
+static rc_t verify_db_table(VDatabase const *db, char const name[])
+{
+    VTable const *tbl;
+    rc_t rc = VDatabaseOpenTableRead(db, &tbl, "%s", name);
+
+    if (rc == 0) {
+        rc = verify_table(tbl, name);
+        VTableRelease(tbl);
+    }
+    else {
+        (void)PLOGERR(klogErr, (klogErr, rc,
+            "Failed to open table '$(name)'", "name=%s", name));
+    }
+    return rc;
+}
+
+static rc_t align_dbcc_primary_alignment(VTable const *tbl, char const name[])
+{
+    VCursor const *curs;
+    rc_t rc = VTableCreateCursorRead(tbl, &curs);
+
+    if (rc == 0) {
+        static char const *const cn_SAM[] = {
+            "SEQ_NAME",
+            "SAM_FLAGS",
+            "REF_NAME",
+            "REF_POS",
+            "MAPQ",
+            "HAS_MISMATCH",
+            "HAS_REF_OFFSET",
+            "REF_OFFSET",
+            "MATE_REF_NAME",
+            "MATE_REF_POS",
+            "TEMPLATE_LEN",
+            "READ",
+            "QUALITY"
+        };
+        unsigned const n = sizeof(cn_SAM)/sizeof(cn_SAM[0]);
+        ColumnInfo cols[sizeof(cn_SAM)/sizeof(cn_SAM[0])];
+        unsigned i;
+
+        memset(cols, 0, sizeof(cols));
+        for (i = 0; i < n; ++i) {
+            cols[i].name = cn_SAM[i];
+            VCursorAddColumn(curs, &cols[i].idx, "%s", cols[i].name);
+        }
+        rc = VCursorOpen(curs);
+        if (rc == 0) {
+            rc = VCursorOpenRow(curs);
+            for (i = 0; i < n && rc == 0; ++i) {
+                VCursorCellData(curs, cols[i].idx, &cols[i].elem_bits,
+                    &cols[i].value.vp, NULL, &cols[i].elem_count);
+            }
+            for (i = 0; i < n && rc == 0; ++i) {
+                if (cols[i].idx == 0 || cols[i].elem_bits == 0) {
+                    (void)PLOGMSG(klogInfo, (klogInfo, "Database '$(name)' "
+                        "could not be used to generate SAM", "name=%s", name));
+                    break;
+                }
+            }
+        }
+        VCursorRelease(curs);
+    }
+    if (rc) {
+        (void)PLOGERR(klogErr, (klogErr, rc,
+            "Database '$(name)' is damaged beyond any use", "name=%s", name));
+    }
+    return rc;
+}
+#endif
+
+typedef struct id_pair_s {
+    int64_t first;
+    int64_t second;
+} id_pair_t;
+
+static size_t work_chunk(uint64_t const count)
+{
+    size_t const max = memory_suggestion / (sizeof(id_pair_t));
+    size_t chunk = (size_t)count;
+
+#if 1
+    /* do as many as possible at once */
+    if (chunk > max)
+        chunk = max;
+#else
+    /* break it up into chunks of about equal size */
+    while (chunk > max)
+        chunk /= 2;
+#endif
+    return chunk;
+}
+
+static void sort_key_pairs(size_t const N, id_pair_t array[/* N */])
+{
+    id_pair_t a;
+    id_pair_t b;
+    
+#define GET(P, V) ((void)(V = ((id_pair_t const *)(P))[0]))
+#define SET(P, V) ((void)((((id_pair_t *)(P))[0]) = V))
+#define CMP(A, B) (((GET(A, a)),(GET(B, b))), (a.first  < b.first  ? -1 :      \
+                                               b.first  < a.first  ?  1 :      \
+                                               a.second < b.second ? -1 :      \
+                                               b.second < a.second ?  1 : 0))
+#define SWAP(A, B, C, D) do{GET(A, a); GET(B, b); SET(A, b); SET(B, a);}while(0)
+    KSORT(array, N, sizeof(array[0]), 0, 0);
+#undef SWAP
+#undef CMP
+#undef SET
+#undef GET
+}
+
+static void sort_keys(size_t const N, int64_t array[/* N */])
+{
+#define INDEXOF(A) (((int64_t const *)(A)) - ((int64_t const *)(&array[0])))
+#define CMP(A, B) (array[INDEXOF(A)] - array[INDEXOF(B)])
+#define SWAP(A, B, C, D) do {                                                  \
+    int64_t const a = array[INDEXOF(A)];                                       \
+    int64_t const b = array[INDEXOF(B)];                                       \
+    array[INDEXOF(A)] = b;                                                     \
+    array[INDEXOF(B)] = a; } while(0)
+    KSORT(array, N, sizeof(array[0]), 0, 0);
+#undef SWAP
+#undef CMP
+#undef INDEXOF
+}
+
+#define CHECK_QUITTING do { rc_t const rc = Quitting(); if (rc) return rc; } while(0);
+
+static size_t load_key_pairs(int64_t const startId,
+                             int64_t const endId,
+                             size_t const pairs,
+                             id_pair_t pair[/* pairs */],
+                             VCursor const *const acurs,
+                             ColumnInfo *const aci,
+                             int64_t plast[],
+                             rc_t Rc[])
+{
+    int64_t last_fkey = INT64_MIN;
+    int64_t row = startId;
+    size_t j = 0;
+    bool ordered = true;
+    
+    while (row < endId) {
+        int64_t first;
+        int64_t maybe_last;
+        rc_t const rc1 = VCursorPageIdRange(acurs, aci->idx, row, &first, &maybe_last);
+        int64_t const last = maybe_last < endId ? maybe_last : endId - 1;
+        size_t const count = (last + 1) - first;
+
+        if (rc1) {
+            Rc[0] = rc1;
+            return 0;
+        }
+        CHECK_QUITTING;
+        
+        if (first < row)
+            first = row;
+        if (row != startId && pairs < count + j)
+            break;
+        plast[0] = last;
+        
+        for ( ; j < pairs && row <= last; ++row) {
+            rc_t const rc = VCursorCellDataDirect(acurs, row, aci->idx,
+                                                  &aci->elem_bits, &aci->value.vp,
+                                                  NULL, &aci->elem_count);
+            if (rc == 0) {
+                if (aci->elem_count == 1) {
+                    int64_t const fkey = aci->value.i64[0];
+                    
+                    ordered &= (last_fkey <= fkey);
+                    pair[j].second = row;
+                    pair[j].first = fkey;
+                    last_fkey = fkey;
+                    ++j;
+                }
+                else {
+                    Rc[0] = RC(rcExe, rcDatabase, rcValidating, rcData, rcUnexpected);
+                    return 0;
+                }
+            }
+            else if (!(GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound)) {
+                Rc[0] = rc;
+                return 0;
+            }
+            /* row not found might be an error but that won't be decided here */
+        }
+    }
+    if (!ordered)
+        sort_key_pairs(j, pair);
+    
+    Rc[0] = 0;
+    return j;
+}
+
+static bool is_sorted(uint32_t const N, int64_t const key[/* N */])
+{
+    uint32_t i = 0;
+    int64_t last = key[i];
+    
+    for (i = 1; i < N; ++i) {
+        int64_t const cur = key[i];
+        
+        if (cur < last)
+            return false;
+
+        last = cur;
+    }
+    return true;
+}
+
+static rc_t ric_align_generic(int64_t const startId,
+                              uint64_t const count,
+                              size_t const pairs,
+                              id_pair_t pair[/* pairs */],
+                              void *scratch[],
+                              VCursor const *const acurs,
+                              ColumnInfo *const aci,
+                              VCursor const *const bcurs,
+                              ColumnInfo *const bci
+                              )
+{
+    int64_t chunk;
+    int64_t const endId = startId + count;
+    size_t scratch_size = 0;
+
+    for (chunk = startId; chunk < endId; ) {
+        rc_t rc = 0;
+        int64_t last;
+        size_t const n = load_key_pairs(chunk, endId, pairs, pair, acurs, aci, &last, &rc);
+        size_t i;
+        int64_t cur_fkey = 0;
+        uint32_t elem_count = 0;
+        uint32_t current = 0;
+        int64_t const *id = 0;
+
+        if (rc) return rc;
+        if (chunk == last)
+            break;
+        if (chunk != startId) {
+            (void)PLOGMSG(klogInfo, (klogInfo, "Referential Integrity: "
+                                     "$(aname) <-> $(bname)"
+                                     " $(pct)% complete",
+                                     "aname=%s,bname=%s,pct=%5.1f",
+                                     aci->name, bci->name,
+                                     (100.0 * (chunk - startId)) / count));
+        }
+        chunk = last;
+        for (i = 0; i < n; ++i) {
+            int64_t const fkey = pair[i].first;
+            int64_t const row = pair[i].second;
+            
+            if (cur_fkey != fkey) {
+                uint32_t dummy;
+                
+                CHECK_QUITTING;
+                
+                rc = VCursorCellDataDirect(bcurs, fkey, bci->idx,
+                                           &dummy, (void const **)&id,
+                                           NULL, &elem_count);
+
+                if (GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound){
+					(void)PLOGMSG(klogWarn, (klogWarn, "Referential Integrity: "
+                                     "$(aname) <-> $(bname)"
+                                     " failed to retrieve pair $(first) -> $(second)",
+                                     "aname=%s,bname=%s,first=%ld,second=%ld",
+                                     aci->name, bci->name,
+                                     pair[i].first,pair[i].second));
+
+                    return RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                } else if (rc) 
+                    return rc;
+                
+                if (!is_sorted(elem_count, id)) {
+                    if (scratch_size < elem_count) {
+                        void *const temp = realloc(scratch[0], elem_count * sizeof(id[0]));
+                        
+                        if (temp == NULL)
+                            return RC(rcExe, rcDatabase, rcValidating, rcMemory, rcExhausted);
+                        
+                        scratch[0] = temp;
+                        scratch_size = elem_count;
+                    }
+                    memcpy(scratch[0], id, elem_count * sizeof(id[0]));
+                    sort_keys(elem_count, scratch[0]);
+                    id = scratch[0];
+                }
+                current = 0;
+                cur_fkey = fkey;
+                while (current < elem_count && id[current] < row) {
+                    ++current;
+                }
+            }
+            if (current >= elem_count || id[current] != row){
+				  (void)PLOGMSG(klogWarn, (klogWarn, "Referential Integrity: "
+                                     "$(aname) <-> $(bname)"
+                                     " inconsistens pair $(first) -> $(second)",
+                                     "aname=%s,bname=%s,first=%ld,second=%ld",
+                                     aci->name, bci->name,
+                                     pair[i].first,pair[i].second));
+
+                return RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+			}
+            ++current;
+        }
+    }
+    return 0;
+}
+
+static rc_t ric_align_ref_and_align(char const dbname[],
+                                    VTable const *ref,
+                                    VTable const *align,
+                                    int which)
+{
+    char const *const id_col_name = which == 0 ? "PRIMARY_ALIGNMENT_IDS"
+                                  : which == 1 ? "SECONDARY_ALIGNMENT_IDS"
+                                  : which == 2 ? "EVIDENCE_ALIGNMENT_IDS"
+                                  : NULL;
+    rc_t rc;
+    VCursor const *acurs = NULL;
+    VCursor const *bcurs = NULL;
+    ColumnInfo aci;
+    ColumnInfo bci;
+    int64_t startId;
+    uint64_t count;
+
+    aci.name = "REF_ID";
+    bci.name = id_col_name;
+    
+    rc = VTableCreateCursorRead(align, &acurs);
+    if (rc == 0) {
+        rc = VCursorAddColumn(acurs, &aci.idx, "%s", aci.name);
+        if (rc == 0)
+            rc = VCursorOpen(acurs);
+        if (rc == 0)
+            rc = VCursorIdRange(acurs, aci.idx, &startId, &count);
+    }
+    if (rc)
+        (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+            "alignment table can not be read", "name=%s", dbname));
+    else {
+        rc = VTableCreateCursorRead(ref, &bcurs);
+        if (rc == 0)
+            rc = VCursorAddColumn(bcurs, &bci.idx, "%s", bci.name);
+        if (rc == 0)
+            rc = VCursorOpen(bcurs);
+        if (rc)
+            (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                "reference table can not be read", "name=%s", dbname));
+    }
+    if (rc == 0) {
+        size_t const chunk = work_chunk(count);
+        id_pair_t *const pair = malloc(sizeof(id_pair_t) * chunk);
+
+        if (pair) {
+            void *scratch = NULL;
+            
+            rc = ric_align_generic(startId, count, chunk, pair, &scratch,
+                                   acurs, &aci, bcurs, &bci);
+            if (scratch)
+                free(scratch);
+
+            if (GetRCObject(rc) == (enum RCObject)rcData && GetRCState(rc) == rcUnexpected)
+                (void)PLOGERR(klogErr, (klogErr, rc,
+                    "Database '$(name)': failed referential "
+                    "integrity check", "name=%s", dbname));
+            else if (GetRCObject(rc) == (enum RCObject)rcData &&
+                     GetRCState(rc) == rcInconsistent)
+                (void)PLOGERR(klogErr, (klogErr, rc,
+ "Database '$(name)': column '$(idcol)' failed referential integrity check",
+ "name=%s,idcol=%s", dbname, id_col_name));
+            else if (GetRCObject(rc) == (enum RCObject)rcData &&
+                     GetRCState(rc) == rcTooBig)
+                (void)PLOGERR(klogWarn, (klogWarn, rc = 0, "Database '$(name)':"
+                         " referential integrity could not be checked, skipped",
+                         "name=%s", dbname));
+            else if (rc)
+                (void)PLOGERR(klogErr, (klogErr, rc,
+"Database '$(name)': reference table can not be read", "name=%s", dbname));
+
+            free(pair);
+        }
+        else
+            rc = RC(rcExe, rcDatabase, rcValidating, rcMemory, rcExhausted);
+        
+        if (GetRCObject(rc) == rcMemory && GetRCState(rc) == rcExhausted) {
+            rc = 0;
+            (void)PLOGERR(klogWarn, (klogWarn, rc, "Database '$(name)':"
+                " referential integrity could not be checked, skipped",
+                "name=%s", dbname));
+        }
+    }
+    VCursorRelease(acurs);
+    VCursorRelease(bcurs);
+    return rc;
+}
+
+static rc_t ric_align_seq_and_pri(char const dbname[],
+                                  VTable const *seq,
+                                  VTable const *pri)
+{
+    rc_t rc;
+    VCursor const *acurs = NULL;
+    VCursor const *bcurs = NULL;
+    ColumnInfo aci;
+    ColumnInfo bci;
+    int64_t startId;
+    uint64_t count;
+
+    aci.name = "SEQ_SPOT_ID";
+    bci.name = "PRIMARY_ALIGNMENT_ID";
+    
+    rc = VTableCreateCursorRead(pri, &acurs);
+    if (rc == 0)
+        rc = VCursorAddColumn(acurs, &aci.idx, "%s", aci.name);
+    if (rc == 0)
+        rc = VCursorOpen(acurs);
+    if (rc == 0)
+        rc = VCursorIdRange(acurs, aci.idx, &startId, &count);
+    if (rc)
+        (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+            "alignment table can not be read", "name=%s", dbname));
+    else {
+        rc = VTableCreateCursorRead(seq, &bcurs);
+        if (rc == 0)
+            rc = VCursorAddColumn(bcurs, &bci.idx, "%s", bci.name);
+        if (rc == 0)
+            rc = VCursorOpen(bcurs);
+        if (rc)
+            (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                "sequence table can not be read", "name=%s", dbname));
+    }
+    if (rc == 0) {
+        size_t const chunk = work_chunk(count);
+        id_pair_t *const pair = malloc((sizeof(id_pair_t)+sizeof(int64_t)) * chunk);
+
+        if (pair) {
+            void *scratch = NULL;
+            
+            rc = ric_align_generic(startId, count, chunk, pair, &scratch,
+                                   acurs, &aci, bcurs, &bci);
+            if (scratch)
+                free(scratch);
+            
+            if (GetRCObject(rc) == (enum RCObject)rcData && GetRCState(rc) == rcUnexpected)
+                (void)PLOGERR(klogErr, (klogErr, rc,
+                    "Database '$(name)': failed referential "
+                    "integrity check", "name=%s", dbname));
+            else if (GetRCObject(rc) == (enum RCObject)rcData &&
+                     GetRCState(rc) == rcInconsistent)
+                (void)PLOGERR(klogErr, (klogErr, rc,
+"Database '$(name)': column 'SEQ_SPOT_ID' failed referential integrity check",
+"name=%s", dbname));
+            else if (GetRCObject(rc) == (enum RCObject)rcData &&
+                     GetRCState(rc) == rcTooBig)
+                (void)PLOGERR(klogWarn, (klogWarn, rc = 0, "Database '$(name)':"
+                         " referential integrity could not be checked, skipped",
+                         "name=%s", dbname));
+            else if (rc)
+                (void)PLOGERR(klogErr, (klogErr, rc,
+"Database '$(name)': sequence table can not be read", "name=%s", dbname));
+
+            free(pair);
+        }
+        else
+            (void)PLOGERR(klogWarn, (klogWarn, rc = 0, "Database '$(name)':"
+                         " referential integrity could not be checked, skipped",
+                         "name=%s", dbname));
+    }
+    VCursorRelease(acurs);
+    VCursorRelease(bcurs);
+    return rc;
+}
+
+/* referential integrity and data checks for sequence, primary and secondary alignment tables */
+static rc_t ridc_align_seq_pri_sec(const vdb_validate_params *pb,
+                          char const dbname[],
+                          VTable const *seq,
+                          VTable const *pri,
+                          VTable const *sec)
+{
+    rc_t rc = 0, rc2;
+    VCursor const *seq_cursor = NULL;
+    VCursor const *pri_cursor = NULL;
+    VCursor const *sec_cursor = NULL;
+    VCursor const *sec_cursor2 = NULL;
+
+    uint32_t seq_read_len_idx;
+    uint32_t seq_cmp_read_idx;
+    uint32_t seq_pa_id_idx;
+    uint32_t pri_has_ref_offset_idx;
+    uint32_t sec_has_ref_offset_idx;
+    uint32_t sec_seq_spot_id_idx;
+    uint32_t sec_seq_read_id_idx;
+    uint32_t sec_tmp_mismatch_idx;
+    bool has_tmp_mismatch;
+
+    int64_t sec_id_first;
+    int64_t seq_id_first;
+    uint64_t sec_row_count;
+    uint64_t seq_row_count;
+
+    size_t chunk_size;
+    id_pair_t *pri_id_pairs = NULL;
+    id_pair_t * pri_len_pairs = NULL;
+    id_pair_t *seq_spot_id_pairs = NULL;
+    id_pair_t *seq_spot_read_id_pairs = NULL;
+    uint32_t *seq_read_lens = NULL;
+
+    // SEQUENCE cursor
+    if (rc == 0)
+    {
+        rc2 = VTableCreateCursorRead(seq, &seq_cursor);
+        if (rc2 == 0)
+            rc2 = VCursorAddColumn(seq_cursor, &seq_read_len_idx, "%s", "READ_LEN");
+        if (rc2 == 0)
+            rc2 = VCursorAddColumn(seq_cursor, &seq_cmp_read_idx, "%s", "CMP_READ");
+        if (rc2 == 0)
+            rc2 = VCursorAddColumn(seq_cursor, &seq_pa_id_idx, "%s", "PRIMARY_ALIGNMENT_ID");
+        if (rc2 == 0)
+            rc2 = VCursorOpen(seq_cursor);
+        if (rc2 != 0)
+        {
+            rc = rc2;
+            (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                        "alignment table SEQUENCE can not be read", "name=%s", dbname));
+        }
+    }
+
+    // PRIMARY_ALIGNMENT cursor
+    if (rc == 0)
+    {
+        if (rc2 == 0)
+            rc2 = VTableCreateCursorRead(pri, &pri_cursor);
+        if (rc2 == 0)
+            rc2 = VCursorAddColumn(pri_cursor, &pri_has_ref_offset_idx, "%s", "(bool)HAS_REF_OFFSET");
+        if (rc2 == 0)
+            rc2 = VCursorOpen(pri_cursor);
+        if (rc2 != 0)
+        {
+            rc = rc2;
+            (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                        "alignment table PRIMARY_ALIGNMENT can not be read", "name=%s", dbname));
+        }
+    }
+
+    // SECONDARY_ALIGNMENT cursor
+    if (rc == 0)
+    {
+        if (rc2 == 0)
+            rc2 = VTableCreateCursorRead(sec, &sec_cursor);
+        if (rc2 == 0)
+            rc2 = VCursorAddColumn(sec_cursor, &sec_has_ref_offset_idx, "%s", "(bool)HAS_REF_OFFSET");
+        if (rc2 == 0)
+        {
+            rc2 = VCursorAddColumn(sec_cursor, &sec_tmp_mismatch_idx, "%s", "TMP_MISMATCH");
+            if (rc2 == 0)
+                has_tmp_mismatch = true;
+            else
+            {
+                has_tmp_mismatch = false;
+                rc2 = 0;
+            }
+        }
+        if (rc2 == 0)
+            rc2 = VCursorOpen(sec_cursor);
+        if (rc2 != 0)
+        {
+            rc = rc2;
+            (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                        "alignment table SECONDARY_ALIGNMENT can not be read", "name=%s", dbname));
+        }
+    }
+    if (rc == 0)
+    {
+        if (rc2 == 0)
+            rc2 = VTableCreateCursorRead(sec, &sec_cursor2);
+        if (rc2 == 0)
+            rc2 = VCursorAddColumn(sec_cursor2, &sec_seq_spot_id_idx, "%s", "SEQ_SPOT_ID");
+        if (rc2 == 0)
+            rc2 = VCursorAddColumn(sec_cursor2, &sec_seq_read_id_idx, "%s", "SEQ_READ_ID");
+        if (rc2 == 0)
+            rc2 = VCursorOpen(sec_cursor2);
+        if (rc2 != 0)
+        {
+            rc = rc2;
+            (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                        "alignment table SECONDARY_ALIGNMENT can not be read", "name=%s", dbname));
+        }
+    }
+
+    // SECONDARY_ALIGNMENT row range
+    if (rc == 0)
+        rc = VCursorIdRange(sec_cursor, sec_has_ref_offset_idx, &sec_id_first, &sec_row_count);
+    if (rc != 0)
+        (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+            "secondary alignment table can not be read", "name=%s", dbname));
+
+    // SEQUENCE row range
+    if (rc == 0)
+        rc = VCursorIdRange(seq_cursor, seq_pa_id_idx, &seq_id_first, &seq_row_count);
+    if (rc != 0)
+        (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+            "sequence table can not be read", "name=%s", dbname));
+
+    if (rc == 0)
+    {
+        chunk_size = sec_row_count > SDC_ROW_CHUNK_MAX ? SDC_ROW_CHUNK_MAX : sec_row_count;
+
+        pri_id_pairs = malloc(sizeof(*pri_id_pairs) * chunk_size);
+        pri_len_pairs = malloc(sizeof(*pri_len_pairs) * chunk_size);
+        seq_spot_id_pairs = malloc(sizeof(*seq_spot_id_pairs) * chunk_size);
+        seq_spot_read_id_pairs = malloc(sizeof(*seq_spot_read_id_pairs) * chunk_size);
+        seq_read_lens = malloc(sizeof(*seq_read_lens) * chunk_size);
+
+        if (seq_spot_id_pairs == NULL)
+        {
+            rc = RC(rcExe, rcDatabase, rcValidating, rcMemory, rcExhausted);
+        }
+    }
+
+    if (rc == 0)
+    {
+        bool reported_about_no_pa = false;
+        uint64_t pa_longer_sa_rows = 0;
+        uint64_t pa_longer_sa_limit;
+        uint64_t sec_row_lmit;
+
+        int64_t sec_row_id_start = sec_id_first;
+        int64_t sec_row_id_end;
+
+        int64_t chunk;
+
+        // set limits from params
+        if (pb->sdc_pa_len_thold_in_percent)
+            pa_longer_sa_limit = ceil( pb->sdc_pa_len_thold.percent * sec_row_count );
+        else if (pb->sdc_pa_len_thold.number == 0 || pb->sdc_pa_len_thold.number > sec_row_count)
+            pa_longer_sa_limit = sec_row_count;
+        else
+            pa_longer_sa_limit = pb->sdc_pa_len_thold.number;
+
+        if (pb->sdc_sec_rows_in_percent)
+            sec_row_lmit = ceil( pb->sdc_sec_rows.percent * sec_row_count );
+        else if (pb->sdc_sec_rows.number == 0 || pb->sdc_sec_rows.number > sec_row_count)
+            sec_row_lmit = sec_row_count;
+        else
+            sec_row_lmit = pb->sdc_sec_rows.number;
+
+        sec_row_id_end = sec_id_first + MIN(sec_row_count, sec_row_lmit);
+
+        for ( chunk = sec_row_id_start; chunk < sec_row_id_end; chunk += chunk_size )
+        {
+            int64_t i;
+            int64_t i_count = MIN(chunk_size, sec_row_id_end - chunk);
+            const void * data_ptr = NULL;
+            uint32_t data_len;
+            int64_t last_seq_spot_id = INT64_MIN;
+            int64_t last_pri_row_id = INT64_MIN;
+            bool ordered = true;
+
+            // Load chunk of SEQ_SPOT_ID and sort ids for faster data retrieval
+            for ( i = 0; i < i_count; ++i )
+            {
+                int64_t seq_spot_id;
+                int64_t sec_row_id = i + chunk;
+
+                // SECONDARY_ALIGNMENT:SEQ_SPOT_ID
+                rc = VCursorCellDataDirect ( sec_cursor2, sec_row_id, sec_seq_spot_id_idx, NULL, (const void**)&data_ptr, NULL, &data_len );
+                if ( rc != 0 || data_ptr == NULL || data_len != 1 )
+                {
+                    if (rc == 0)
+                        rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                    (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                            "VCursorCellDataDirect() failed on SECONDARY_ALIGNMENT table, SEQ_SPOT_ID column, row_id: $(ROW_ID)",
+                                            "name=%s,ROW_ID=%ld", dbname, sec_row_id));
+                    break;
+                }
+
+                seq_spot_id = *(const int64_t *)data_ptr;
+                DBG_MSG(("SECONDARY_ALIGNMENT:%ld SEQ_SPOT_ID column = %ld\n", sec_row_id, seq_spot_id));
+                if (seq_spot_id == 0)
+                {
+                    rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                    (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                "SECONDARY_ALIGNMENT:$(ROW_ID) has SEQ_SPOT_ID = 0", "name=%s,ROW_ID=%ld", dbname, sec_row_id));
+                    break;
+                }
+
+                ordered &= last_seq_spot_id <= seq_spot_id;
+                last_seq_spot_id = seq_spot_id;
+
+                seq_spot_id_pairs[i].first = seq_spot_id;
+                seq_spot_id_pairs[i].second = sec_row_id;
+
+                // SECONDARY_ALIGNMENT:SEQ_READ_ID
+                rc = VCursorCellDataDirect ( sec_cursor2, sec_row_id, sec_seq_read_id_idx, NULL, (const void**)&data_ptr, NULL, &data_len );
+                if ( rc != 0 || data_ptr == NULL || data_len != 1 )
+                {
+                    if (rc == 0)
+                        rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                    (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                "VCursorCellDataDirect() failed on SECONDARY_ALIGNMENT table, SEQ_READ_ID column, row_id: $(ROW_ID)",
+                                "name=%s,ROW_ID=%ld", dbname, sec_row_id));
+                    break;
+                }
+                DBG_MSG(("SECONDARY_ALIGNMENT:%ld SEQ_READ_ID column = %d\n", sec_row_id, *(const int32_t *)data_ptr));
+
+                // one-based read index
+                seq_spot_read_id_pairs[i].first = seq_spot_id;
+                seq_spot_read_id_pairs[i].second = *(const int32_t *)data_ptr;
+            }
+            if (rc != 0)
+                break;
+
+            if (!ordered)
+            {
+                sort_key_pairs(i_count, seq_spot_id_pairs);
+            }
+
+            // Load chunk of PRIMARY_ALIGNMENT_ID (and some other fields) and sort ids for faster data retrieval
+            ordered = true;
+            for ( i = 0; i < i_count; ++i )
+            {
+                int64_t pri_row_id;
+                int64_t sec_row_id = seq_spot_id_pairs[i].second;
+                int64_t seq_spot_id = seq_spot_id_pairs[i].first;
+                int32_t seq_read_id = seq_spot_read_id_pairs[sec_row_id - chunk].second;
+
+                // SEQUENCE:PRIMARY_ALIGNMENT_ID
+                rc = VCursorCellDataDirect ( seq_cursor, seq_spot_id, seq_pa_id_idx, NULL, (const void**)&data_ptr, NULL, &data_len );
+                if ( rc != 0 || data_ptr == NULL )
+                {
+                    if (rc == 0)
+                        rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                    (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                            "VCursorCellDataDirect() failed on SEQUENCE table, PRIMARY_ALIGNMENT_ID column, spot_id: $(SPOT_ID)",
+                                            "name=%s,SPOT_ID=%ld", dbname, seq_spot_id));
+                    break;
+                }
+
+                if ( seq_read_id < 1 || (uint32_t)seq_read_id > data_len )
+                {
+                    rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                    (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                "SECONDARY_ALIGNMENT:$(SEC_ROW_ID) SEQ_READ_ID value ($(SEQ_READ_ID)) - 1 based, is out of SEQUENCE:$(SEQ_SPOT_ID) PRIMARY_ALIGNMENT range ($(PRIMARY_ALIGNMENT_LEN))",
+                                "name=%s,SEC_ROW_ID=%ld,SEQ_READ_ID=%d,SEQ_SPOT_ID=%ld,PRIMARY_ALIGNMENT_LEN=%u", dbname, sec_row_id, seq_read_id, seq_spot_id, data_len));
+                    break;
+                }
+
+                pri_row_id = ((const int64_t *)data_ptr)[seq_read_id - 1];
+                DBG_MSG(("SEQUENCE:%ld PRIMARY_ALIGNMENT_ID column = %ld\n", seq_spot_id, pri_row_id));
+                if (pri_row_id == 0)
+                {
+                    if (!reported_about_no_pa)
+                    {
+                        PLOGMSG (klogWarn, (klogWarn, "Database '$(name)' has secondary alignments without primary", "name=%s", dbname));
+                        reported_about_no_pa = true;
+                    }
+                }
+
+                ordered &= last_pri_row_id <= pri_row_id;
+                last_pri_row_id = pri_row_id;
+
+                pri_id_pairs[i].first = pri_row_id;
+                pri_id_pairs[i].second = sec_row_id;
+
+                // SEQUENCE:READ_LEN
+                rc = VCursorCellDataDirect ( seq_cursor, seq_spot_id, seq_read_len_idx, NULL, (const void**)&data_ptr, NULL, &data_len );
+                if ( rc != 0 || data_ptr == NULL )
+                {
+                    if (rc == 0)
+                        rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                    (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                "VCursorCellDataDirect() failed on SEQUENCE table, READ_LEN column, row_id: $(ROW_ID)",
+                                "name=%s,ROW_ID=%ld", dbname, seq_spot_id));
+                    break;
+                }
+
+                if ( seq_read_id < 1 || (uint32_t)seq_read_id > data_len )
+                {
+                    rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                    (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                "SECONDARY_ALIGNMENT:$(SEC_ROW_ID) SEQ_READ_ID value ($(SEQ_READ_ID)) - 1 based, is out of SEQUENCE:$(SEQ_SPOT_ID) READ_LEN range ($(SEQ_READ_LEN_LEN))",
+                                "name=%s,SEC_ROW_ID=%ld,SEQ_READ_ID=%d,SEQ_SPOT_ID=%ld,SEQ_READ_LEN_LEN=%u", dbname, sec_row_id, seq_read_id, seq_spot_id, data_len));
+                    break;
+                }
+
+                seq_read_lens[sec_row_id - chunk] = ((const uint32_t *)data_ptr)[seq_read_id - 1];
+                DBG_MSG(("SEQUENCE:%ld READ_LEN column = %u\n", seq_spot_id, seq_read_lens[sec_row_id - chunk]));
+            }
+
+            if (rc != 0)
+                break;
+
+            if (!ordered)
+            {
+                sort_key_pairs(i_count, pri_id_pairs);
+            }
+
+            for ( i = 0; i < i_count; ++i )
+            {
+                uint32_t pri_len;
+                int sec_i_orig = pri_id_pairs[i].second - chunk;
+                pri_len_pairs[sec_i_orig].first = pri_id_pairs[i].first;
+                if (pri_id_pairs[i].first == 0)
+                {
+                    pri_len_pairs[sec_i_orig].second = -1;
+                    continue;
+                }
+
+                // PRIMARY_ALIGNMENT:HAS_REF_OFFSET
+                rc = VCursorCellDataDirect ( pri_cursor, pri_len_pairs[sec_i_orig].first, pri_has_ref_offset_idx, NULL, &data_ptr, NULL, &pri_len );
+                if ( rc != 0 )
+                {
+                    (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                            "VCursorCellDataDirect() failed on PRIMARY_ALIGNMENT table, HAS_REF_OFFSET column, row_id: $(ROW_ID)",
+                                            "name=%s,ROW_ID=%ld", dbname, pri_len_pairs[sec_i_orig].first));
+                    break;
+                }
+                pri_len_pairs[sec_i_orig].second = pri_len;
+                DBG_MSG(("PRIMARY_ALIGNMENT:%ld HAS_REF_OFFSET column len = %u\n", pri_len_pairs[sec_i_orig].first, pri_len_pairs[sec_i_orig].second));
+            }
+            if (rc != 0)
+                break;
+
+            // Iterate over SECONDARY_ALIGNMENT chunk, having data from other table chunks already loaded
+            for ( i = 0; i < i_count; ++i )
+            {
+                int64_t pri_row_id = pri_len_pairs[i].first;
+                int64_t sec_row_id = i + chunk;
+
+                int64_t seq_spot_id = seq_spot_read_id_pairs[i].first;
+                int32_t seq_read_id = seq_spot_read_id_pairs[i].second;
+
+                uint32_t seq_read_len = seq_read_lens[i];
+
+                uint32_t pri_row_len = pri_len_pairs[i].second;
+                uint32_t sec_row_len;
+
+                // SECONDARY_ALIGNMENT:HAS_REF_OFFSET
+                rc = VCursorCellDataDirect ( sec_cursor, sec_row_id, sec_has_ref_offset_idx, NULL, (const void**)&data_ptr, NULL, &sec_row_len );
+
+                if ( rc != 0 )
+                {
+                    (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                            "VCursorCellDataDirect() failed on SECONDARY_ALIGNMENT table, HAS_REF_OFFSET column, row_id: $(ROW_ID)",
+                                            "name=%s,ROW_ID=%ld", dbname, sec_row_id));
+                    break;
+                }
+                DBG_MSG(("SECONDARY_ALIGNMENT:%ld HAS_REF_OFFSET column len = %u\n", sec_row_id, sec_row_len));
+
+                if ( has_tmp_mismatch )
+                {
+                    const char * p_sa_tmp_mismatch;
+                    // SECONDARY_ALIGNMENT:TMP_MISMATCH
+                    rc = VCursorCellDataDirect ( sec_cursor, sec_row_id, sec_tmp_mismatch_idx, NULL, (const void**)&p_sa_tmp_mismatch, NULL, &data_len );
+                    if ( rc != 0 || p_sa_tmp_mismatch == NULL )
+                    {
+                        if (rc == 0)
+                            rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                        (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                                "VCursorCellDataDirect() failed on SECONDARY_ALIGNMENT table, TMP_MISMATCH column, row_id: $(ROW_ID)",
+                                                "name=%s,ROW_ID=%ld", dbname, sec_row_id));
+                        break;
+                    }
+
+                    if (string_chr(p_sa_tmp_mismatch, data_len, '=') != NULL)
+                    {
+                        rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                        (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                    "SECONDARY_ALIGNMENT:$(ROW_ID) TMP_MISMATCH column contains '='",
+                                    "name=%s,ROW_ID=%ld", dbname, sec_row_id));
+                        break;
+                    }
+                }
+
+                DBG_MSG(("Performing length check SA:%ld len = %u\t PA:%ld len = %u\t SEQ:%ld len = %u\n", sec_row_id, sec_row_len, pri_row_id, pri_row_len, seq_spot_id, seq_read_len));
+                // move on when there is no primary or PRIMARY_ALIGNMENT.len equal to SECONDARY_ALIGNMENT.len
+                if (pri_row_id == 0 || pri_row_len == sec_row_len)
+                    continue;
+
+                if (pri_row_len < sec_row_len)
+                {
+                    rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                    (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                "PRIMARY_ALIGNMENT:$(PRI_ROW_ID) HAS_REF_OFFSET length ($(PRI_LEN)) less than SECONDARY_ALIGNMENT:$(SEC_ROW_ID) HAS_REF_OFFSET length ($(SEC_LEN))",
+                                "name=%s,PRI_ROW_ID=%ld,SEC_ROW_ID=%ld,PRI_LEN=%u,SEC_LEN=%u", dbname, pri_row_id, sec_row_id, pri_row_len, sec_row_len));
+                    break;
+                }
+
+                // we already know that pri_row_len > sec_row_len
+                ++pa_longer_sa_rows;
+
+                if (pri_row_len != seq_read_len)
+                {
+                    rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                    (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                "PRIMARY_ALIGNMENT:$(PRI_ROW_ID) HAS_REF_OFFSET length ($(PRI_LEN)) does not match its SEQUENCE:$(SEQ_SPOT_ID) READ_LEN[$(SEQ_READ_ID)] value ($(SEQ_READ_LEN))",
+                                "name=%s,PRI_ROW_ID=%ld,PRI_LEN=%u,SEQ_SPOT_ID=%ld,SEQ_READ_ID=%d,SEQ_READ_LEN=%u", dbname, pri_row_id, pri_row_len, seq_spot_id, seq_read_id, seq_read_len));
+                    break;
+                }
+
+                if (pa_longer_sa_rows >= pa_longer_sa_limit)
+                {
+                    rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                    (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                "Limit violation (pa_longer_sa): there are at least $(PA_LONGER_SA_ROWS) alignments where HAS_REF_OFFSET column is longer in PRIMARY_ALIGNMENT than in SECONDARY_ALIGNMENT",
+                                "name=%s,PA_LONGER_SA_ROWS=%lu", dbname, pa_longer_sa_rows));
+                    break;
+                }
+            }
+        }
+    }
+
+    free(pri_id_pairs);
+    free(pri_len_pairs);
+    free(seq_spot_id_pairs);
+    free(seq_spot_read_id_pairs);
+    free(seq_read_lens);
+
+    if ( rc == 0 )
+    {
+        int64_t i;
+        int64_t i_count;
+        uint64_t seq_row_lmit;
+        // set limits from params
+        if (pb->sdc_seq_rows_in_percent)
+            seq_row_lmit = ceil( pb->sdc_seq_rows.percent * sec_row_count );
+        else if (pb->sdc_seq_rows.number == 0 || pb->sdc_seq_rows.number > sec_row_count)
+            seq_row_lmit = sec_row_count;
+        else
+            seq_row_lmit = pb->sdc_seq_rows.number;
+
+        i_count = MIN(seq_row_lmit, seq_row_count);
+
+        for ( i = 0; i < i_count; ++i )
+        {
+            int64_t seq_row_id = i + seq_id_first;
+
+            const void * data_ptr = NULL;
+            uint32_t data_len;
+            const int64_t * p_seq_pa_id;
+            const uint32_t * p_seq_read_len;
+            uint32_t seq_pa_id_len;
+
+            uint64_t sum_unaligned_read_len;
+            uint32_t j;
+
+            // SEQUENCE:PRIMARY_ALIGNMENT_ID
+            rc = VCursorCellDataDirect ( seq_cursor, seq_row_id, seq_pa_id_idx, NULL, (const void**)&p_seq_pa_id, NULL, &seq_pa_id_len );
+            if ( rc != 0 || p_seq_pa_id == NULL )
+            {
+                if (rc == 0)
+                    rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                        "VCursorCellDataDirect() failed on SEQUENCE table, PRIMARY_ALIGNMENT_ID column, spot_id: $(SPOT_ID)",
+                                        "name=%s,SPOT_ID=%ld", dbname, seq_row_id));
+                break;
+            }
+
+            // SEQUENCE:READ_LEN
+            rc = VCursorCellDataDirect ( seq_cursor, seq_row_id, seq_read_len_idx, NULL, (const void**)&p_seq_read_len, NULL, &data_len );
+            if ( rc != 0 || p_seq_read_len == NULL )
+            {
+                if (rc == 0)
+                    rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                        "VCursorCellDataDirect() failed on SEQUENCE table, READ_LEN column, spot_id: $(SPOT_ID)",
+                                        "name=%s,SPOT_ID=%ld", dbname, seq_row_id));
+                break;
+            }
+            if ( seq_pa_id_len != data_len )
+            {
+                rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                            "SEQUENCE:$(SEQ_SPOT_ID) PRIMARY_ALIGNMENT_ID length ($(SEQ_PA_LEN)) does not match SEQUENCE:$(SEQ_SPOT_ID) READ_LEN length ($(SEQ_READ_LEN_LEN))",
+                            "name=%s,SEQ_SPOT_ID=%ld,SEQ_PA_LEN=%u,SEQ_READ_LEN_LEN=%u", dbname, seq_row_id, seq_pa_id_len, data_len));
+                break;
+            }
+
+            sum_unaligned_read_len = 0;
+            for ( j = 0; j < seq_pa_id_len; ++j )
+            {
+                if ( p_seq_pa_id[j] == 0 )
+                {
+                    sum_unaligned_read_len += p_seq_read_len[j];
+                }
+            }
+
+            // SEQUENCE:CMP_READ
+            rc = VCursorCellDataDirect ( seq_cursor, seq_row_id, seq_cmp_read_idx, NULL, (const void**)&data_ptr, NULL, &data_len );
+            if ( rc != 0 || data_ptr == NULL )
+            {
+                if (rc == 0)
+                    rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                                        "VCursorCellDataDirect() failed on SEQUENCE table, CMP_READ column, spot_id: $(SPOT_ID)",
+                                        "name=%s,SPOT_ID=%ld", dbname, seq_row_id));
+                break;
+            }
+
+            if ( sum_unaligned_read_len != data_len )
+            {
+                rc = RC(rcExe, rcDatabase, rcValidating, rcData, rcInconsistent);
+                (void)PLOGERR(klogErr, (klogErr, rc, "Database '$(name)': "
+                            "SEQUENCE:$(SEQ_SPOT_ID) CMP_READ length ($(CMD_READ_LEN)) does not match sum of unaligned READ_LEN values ($(SUM_UNALIGNED_READ_LEN))",
+                            "name=%s,SEQ_SPOT_ID=%ld,CMD_READ_LEN=%u,SUM_UNALIGNED_READ_LEN=%lu", dbname, seq_row_id, data_len, sum_unaligned_read_len));
+                break;
+            }
+        }
+    }
+
+    VCursorRelease(sec_cursor2);
+    VCursorRelease(sec_cursor);
+    VCursorRelease(pri_cursor);
+    VCursorRelease(seq_cursor);
+    return rc;
+
+}
+
+/* database referential integrity check for alignment database */
+static rc_t dbric_align(const vdb_validate_params *pb,
+                        char const dbname[],
+                        VTable const *pri,
+                        VTable const *sec,
+                        VTable const *seq,
+                        VTable const *ref)
+{
+    rc_t rc = 0;
+
+    if ((rc == 0 || exhaustive) && (pri != NULL && seq != NULL)) {
+        rc_t rc2 = ric_align_seq_and_pri(dbname, seq, pri);
+
+        if (rc2 == 0) {
+            (void)PLOGMSG(klogInfo, (klogInfo, "Database '$(dbname)': "
+               "SEQUENCE.PRIMARY_ALIGNMENT_ID <-> PRIMARY_ALIGNMENT.SEQ_SPOT_ID"
+               " referential integrity ok", "dbname=%s", dbname));
+        }
+        if (rc == 0) {
+            rc = rc2;
+        }
+    }
+    if ((rc == 0 || exhaustive) && (pri != NULL && ref != NULL)) {
+        rc_t rc2 = ric_align_ref_and_align(dbname, ref, pri, 0);
+
+        if (rc2 == 0) {
+            (void)PLOGMSG(klogInfo, (klogInfo, "Database '$(dbname)': "
+                "REFERENCE.PRIMARY_ALIGNMENT_IDS <-> PRIMARY_ALIGNMENT.REF_ID "
+                "referential integrity ok", "dbname=%s", dbname));
+        }
+        if (rc == 0) {
+            rc = rc2;
+        }
+    }
+    if (pb->sdc_enabled && (rc == 0 || exhaustive) && (pri != NULL && sec != NULL && seq != NULL)) {
+        rc_t rc2 = ridc_align_seq_pri_sec(pb, dbname, seq, pri, sec);
+        if (rc2 == 0) {
+            (void)PLOGMSG(klogInfo, (klogInfo, "Database '$(dbname)': "
+                "SEQUENCE and SECONDARY_ALIGNMENT tables data integrity checks ok", "dbname=%s", dbname));
+        }
+        if (rc == 0) {
+            rc = rc2;
+        }
+    }
+    return rc;
+}
+
+
+static rc_t verify_database_align(const vdb_validate_params *pb, VDatabase const *db,
+    char const name[], node_t const nodes[], char const names[])
+{
+    rc_t rc = 0;
+    unsigned tables = 0;
+    node_t const *tbl = &nodes[nodes[0].firstChild];
+    enum table_bits {
+        tbEvidenceInterval   = ( 1u << 0 ),
+        tbEvidenceAlignment  = ( 1u << 1 ),
+        tbPrimaryAlignment   = ( 1u << 2 ),
+        tbReference          = ( 1u << 3 ),
+        tbSequence           = ( 1u << 4 ),
+        tbSecondaryAlignment = ( 1u << 5 )
+    };
+
+    if (nodes[0].firstChild) {
+        for ( ; ; ) {
+            char const *tname = &names[tbl->name];
+            unsigned this_table = 0;
+
+            if (tbl->objType == kptTable) {
+                switch (tname[0]) {
+                case 'E':
+                    if (strcmp(tname, "EVIDENCE_INTERVAL") == 0)
+                        this_table |= tbEvidenceInterval;
+                    else if (strcmp(tname, "EVIDENCE_ALIGNMENT") == 0)
+                        this_table |= tbEvidenceAlignment;
+                    break;
+                case 'P':
+                    if (strcmp(tname, "PRIMARY_ALIGNMENT") == 0)
+                        this_table |= tbPrimaryAlignment;
+                    break;
+                case 'R':
+                    if (strcmp(tname, "REFERENCE") == 0)
+                        this_table |= tbReference;
+                    break;
+                case 'S':
+                    if (strcmp(tname, "SEQUENCE") == 0)
+                        this_table |= tbSequence;
+                    else if (strcmp(tname, "SECONDARY_ALIGNMENT") == 0)
+                        this_table |= tbSecondaryAlignment;
+                    break;
+                }
+                if (this_table == 0) {
+                    (void)PLOGERR(klogWarn, (klogWarn, RC(
+                        rcExe, rcDatabase, rcValidating, rcTable, rcUnexpected),
+                      "Database '$(name)' contains unexpected table '$(table)'",
+                      "name=%s,table=%s", name, tname));
+                }
+                tables |= this_table;
+            }
+            else {
+                (void)PLOGERR(klogWarn, (klogWarn, RC(
+                    rcExe, rcDatabase, rcValidating, rcType, rcUnexpected),
+                    "Database '$(name)' contains unexpected object '$(obj)'",
+                    "name=%s,obj=%s", name, tname));
+            }
+            if (tbl->nxtSibl > 0)
+                tbl = &nodes[tbl->nxtSibl];
+            else
+                break;
+        }
+    }
+    if (tables == tbSequence) {
+        /* sequence data only */
+        (void)PLOGMSG(klogInfo, (klogInfo, "Database '$(name)' "
+            "contains only unaligned reads", "name=%s", name));
+    }
+    else if (   (tables & tbReference) == 0
+             || (tables & tbPrimaryAlignment) == 0)
+    {
+        /* missing reference or primary alignment */
+        rc = RC(rcExe, rcDatabase, rcValidating, rcDatabase, rcIncomplete);
+        (void)PLOGERR(klogWarn, (klogWarn, rc,
+            "Database '$(name)' does not contain all required tables",
+            "name=%s", name));
+    }
+    else if (   ((tables & tbEvidenceAlignment) != 0)
+             != ((tables & tbEvidenceInterval ) != 0))
+    {
+        /* both must be present or both must be absent */
+        rc = RC(rcExe, rcDatabase, rcValidating, rcDatabase, rcIncomplete);
+        (void)PLOGERR(klogWarn, (klogWarn, rc,
+            "Database '$(name)' does not contain all required tables",
+            "name=%s", name));
+    }
+    while (ref_int_check) {
+        VTable const *pri = NULL;
+        VTable const *sec = NULL;
+        VTable const *seq = NULL;
+        VTable const *ref = NULL;
+
+        if ((tables & tbPrimaryAlignment) != 0) {
+            rc = VDatabaseOpenTableRead(db, &pri, "PRIMARY_ALIGNMENT");
+            if (rc) break;
+        }
+        if ((tables & tbSecondaryAlignment) != 0) {
+            rc = VDatabaseOpenTableRead(db, &sec, "SECONDARY_ALIGNMENT");
+            if (rc) break;
+        }
+        if ((tables & tbSequence) != 0) {
+            rc = VDatabaseOpenTableRead(db, &seq, "SEQUENCE");
+            if (rc) break;
+        }
+        if ((tables & tbReference) != 0) {
+            rc = VDatabaseOpenTableRead(db, &ref, "REFERENCE");
+            if (rc) break;
+        }
+        rc = dbric_align(pb, name, pri, sec, seq, ref);
+
+        RELEASE(VTable, ref);
+        RELEASE(VTable, seq);
+        RELEASE(VTable, sec);
+        RELEASE(VTable, pri);
+
+        break;
+    }
+
+    return rc;
+}
+
+static rc_t verify_database(const vdb_validate_params *pb, VDatabase const *db,
+    char const name[], node_t const nodes[], char const names[])
+{
+    char schemaName[1024];
+    char *schemaVers = NULL;
+    rc_t rc;
+
+    rc = get_db_schema_info(db, schemaName, sizeof(schemaName), &schemaVers);
+    if (rc) {
+        (void)PLOGERR(klogErr, (klogErr, rc,
+            "Failed to find database schema for '$(name)'", "name=%s", name));
+    }
+    else if (strncmp(schemaName, "NCBI:var:db:", 12) == 0) {
+        /* TODO: verify NCBI:var:db:* */
+    }
+    else if (strncmp(schemaName, "NCBI:WGS:db:", 12) == 0) {
+        /* TODO: verify NCBI:WGS:db:* */
+    }
+    else if (strncmp(schemaName, "NCBI:align:db:", 14) == 0) {
+        rc = verify_database_align(pb, db, name, nodes, names);
+    }
+    else if (strcmp(schemaName, "NCBI:SRA:PacBio:smrt:db") == 0) {
+        /* TODO: verify NCBI:SRA:PacBio:smrt:db */
+    }
+    else {
+        (void)PLOGERR(klogWarn, (klogWarn,
+            RC(rcExe, rcDatabase, rcValidating, rcType, rcUnrecognized),
+            "Database '$(name)' has unrecognized type '$(type)'",
+            "name=%s,type=%s", name, schemaName));
+    }
+    return rc;
+}
+
+static rc_t verify_mgr_database(const vdb_validate_params *pb,
+    char const name[], node_t const nodes[], char const names[])
+{
+    rc_t rc = 0;
+    VDatabase const *child;
+    const VDBManager *mgr = NULL;
+    
+    assert(pb);
+
+    mgr = pb->vmgr;
+
+    rc = VDBManagerOpenDBRead(mgr, &child, NULL, "%s", name);
+
+    if (rc == 0) {
+        rc = verify_database(pb, child, name, nodes, names);
+        VDatabaseRelease(child);
+    }
+
+    return rc;
+}
+
+static rc_t sra_dbcc(const vdb_validate_params *pb,
+    char const name[], node_t const nodes[], char const names[])
+{
+    rc_t rc = 0;
+
+    if (nodes[0].objType == kptDatabase)
+        rc = verify_mgr_database(pb, name, nodes, names);
+    else
+        rc = verify_mgr_table(pb, name);
+
+    return rc;
+}
+
+static
+rc_t get_platform(const VDBManager *mgr,
+    const VTable *aTbl, char const name[],
+    INSDC_SRA_platform_id *platform)
+{
+    rc_t rc = 0;
+    const VTable *tbl = aTbl;
+    assert(name && platform);
+    if (tbl == NULL) {
+        VSchema *sra_schema = NULL;
+        for ( ; rc == 0; ) {
+            rc = VDBManagerOpenTableRead(mgr, &tbl, sra_schema, "%s", name);
+            VSchemaRelease(sra_schema);
+            if (rc == 0) {
+                rc = VTable_get_platform(tbl, platform);
+                break;
+            }
+            else if (GetRCState(rc) == rcNotFound && GetRCObject(rc) == (enum RCObject)rcSchema
+                && sra_schema == NULL)
+            {
+                rc = VDBManagerMakeSRASchema(mgr, &sra_schema);
+            }
+        }
+    }
+
+    if (aTbl == NULL)
+        VTableRelease(tbl);
+
+    return rc;
+}
+
+static
+rc_t dbcc ( const vdb_validate_params *pb, const char *path, bool is_file )
+{
+    char *names;
+    KPathType pathType = kptNotFound;
+    node_t *nodes = NULL;
+    const char *obj_type, *obj_name;
+
+    rc_t rc = init_dbcc ( pb -> wd, path, is_file, & nodes, & names, & pathType );
+    if ( rc == 0 )
+    {
+        /* construct mode */
+        uint32_t mode = ( pb -> md5_chk ? 1 : 0 )
+                      | ( pb -> blob_crc ? 2 : 0 )
+                      | ( pb -> index_chk ? 4 : 0 )
+                      ;
+
+        INSDC_SRA_platform_id platform = SRA_PLATFORM_UNDEFINED;
+        get_platform ( pb -> vmgr, NULL, path, & platform );
+
+        /* check as kdb object */
+        rc = kdbcc ( pb -> kmgr, path, mode, & pathType, is_file, nodes, names, platform );
+        if ( rc == 0 )
+            rc = vdbcc ( pb -> vmgr, path, mode, & pathType, is_file );
+        if ( rc == 0 )
+            rc = sra_dbcc(pb, path, nodes, names);
+    }
+
+    obj_type = ( pathType == kptDatabase ) ? "Database" : "Table";
+    obj_name = strrchr ( path, '/' );
+    if ( obj_name ++ == NULL )
+        obj_name = path;
+
+    if ( rc != 0 )
+    {
+        PLOGERR ( klogErr, ( klogErr, rc,
+                             "$(objType) '$(objName)' check failed"
+                             , "objType=%s,objName=%s"
+                             , obj_type, obj_name ) );
+    }
+    else
+    {
+        PLOGMSG ( klogInfo, ( klogInfo,
+                              "$(objType) '$(objName)' is consistent"
+                             , "objType=%s,objName=%s"
+                             , obj_type, obj_name ) );
+    }
+
+    free ( nodes );
+    return rc;
+}
+
+static
+const char *generate_relpath ( const vdb_validate_params *pb, const KDirectory *dir,
+    char *buffer, size_t bsize, const char *path )
+{
+    if ( dir != pb -> wd )
+    {
+        char full [ 4096 ];
+        rc_t rc = KDirectoryResolvePath ( dir, true, full, sizeof full, "%s", path );
+        if ( rc == 0 )
+        {
+            rc = KDirectoryResolvePath ( pb -> wd, false, buffer, bsize, "%s", full );
+            if ( rc == 0 )
+                path = buffer;
+        }
+    }
+
+    return path;
+}
+
+static
+rc_t vdb_validate_file ( const vdb_validate_params *pb, const KDirectory *dir, const char *path )
+{
+    char buffer [ 4096 ];
+    const char *relpath = generate_relpath ( pb, dir, buffer, sizeof buffer, path );
+
+    const KFile *f;
+    rc_t rc = KDirectoryOpenFileRead ( dir, & f, "%s", path );
+    if ( rc != 0 )
+        PLOGERR ( klogErr, ( klogErr, rc, "File '$(fname)' could not be opened", "fname=%s", relpath ) );
+    else
+    {
+        bool is_sra = false;
+        enum EEncrypted {
+            eNo,
+            eEncrypted,
+            eWGA
+        } encrypted = eNo;
+
+        size_t num_read;
+        char buffer [ 4096 ];
+        rc = KFileReadAll ( f, 0, buffer, sizeof buffer, & num_read );
+        if ( rc != 0 )
+            PLOGERR ( klogErr, ( klogErr, rc, "File '$(fname)' could not be read", "fname=%s", relpath ) );
+        else {
+            /* special kludge to prevent code from looking too far at header */
+            size_t hdr_bytes = num_read;
+            if ( num_read > 8 )
+                hdr_bytes = 8;
+
+            /* check for encrypted file */
+            if ( KFileIsEnc ( buffer, hdr_bytes ) == 0 ) {
+                encrypted = eEncrypted;
+            }
+            else if ( KFileIsWGAEnc ( buffer, hdr_bytes ) == 0 ) {
+                encrypted = eWGA;
+            }
+
+            if (encrypted != eNo) {
+                PLOGMSG ( klogInfo, ( klogInfo,
+                    "Validating $(type)encrypted file '$(fname)'...",
+                    "type=%s,fname=%s",
+                    encrypted == eWGA ? "WGA " : " ", relpath ) );
+                switch (encrypted) {
+                    case eEncrypted:
+                        rc = KEncFileValidate(f);
+                        break;
+                    case eWGA: {
+                        VFSManager *mgr = NULL;
+                        rc = VFSManagerMake(&mgr);
+                        if (rc != 0) {
+                            LOGERR(klogInt, rc, "Cannot VFSManagerMake");
+                        }
+                        else {
+                            rc = VFSManagerWGAValidateHack(mgr, f, relpath);
+                        }
+                        VFSManagerRelease(mgr);
+                        break;
+                    }
+                    default:
+                        assert(0);
+                }
+                if ( rc != 0 ) {
+                    PLOGERR ( klogErr, ( klogErr, rc,
+                        "Encrypted file '$(fname)' could not be validated",
+                        "fname=%s", relpath ) );
+                }
+                else {
+                    PLOGMSG ( klogInfo, ( klogInfo,
+                        "Encrypted file '$(fname)' appears valid",
+                        "fname=%s", relpath ) );
+
+                    rc = EncFileReadAll ( relpath, buffer, sizeof buffer,
+                        & num_read );
+                    if ( rc == 0 && KFileIsSRA ( buffer, num_read ) == 0 )
+                        is_sra = true;
+                }
+            }
+            else if ( KFileIsSRA ( buffer, num_read ) == 0 ) {
+                is_sra = true;
+            }
+        }
+
+        KFileRelease ( f );
+
+        if ( rc == 0 && is_sra )
+            rc = dbcc ( pb, relpath, true );
+    }
+
+    return rc;
+}
+
+static
+rc_t vdb_validate_database ( const vdb_validate_params *pb, const KDirectory *dir, const char *path )
+{
+    char buffer [ 4096 ];
+    const char *relpath = generate_relpath ( pb, dir, buffer, sizeof buffer, path );
+    return dbcc ( pb, relpath, false );
+}
+
+static
+rc_t vdb_validate_table ( const vdb_validate_params *pb, const KDirectory *dir, const char *path )
+{
+    char buffer [ 4096 ];
+    const char *relpath = generate_relpath ( pb, dir, buffer, sizeof buffer, path );
+    return dbcc ( pb, relpath, false );
+}
+
+static
+KPathType vdb_subdir_type ( const vdb_validate_params *pb, const KDirectory *dir, const char *name )
+{
+    char full [ 4096 ];
+    rc_t rc = KDirectoryResolvePath ( dir, true, full, sizeof full, "%s", name );
+    if ( rc == 0 )
+    {
+        switch ( KDBManagerPathType ( pb -> kmgr, "%s", full ) )
+        {
+        case kptDatabase:
+            return kptDatabase;
+        case kptTable:
+            return kptTable;
+        }
+    }
+    return kptDir;
+}
+
+static
+rc_t CC vdb_validate_dir ( const KDirectory *dir, uint32_t type, const char *name, void *data )
+{
+    switch ( type & ~ kptAlias )
+    {
+    case kptFile:
+        return vdb_validate_file ( data, dir, name );
+    case kptDir:
+        switch ( vdb_subdir_type ( data, dir, name ) )
+        {
+        case kptDatabase:
+            return vdb_validate_database ( data, dir, name );
+        case kptTable:
+            return vdb_validate_table ( data, dir, name );
+        default:
+            return KDirectoryVisit ( dir, false, vdb_validate_dir, data, "%s", name );
+        }
+    }
+
+    return 0;
+}
+
+#define rcResolver   rcTree
+static bool NotFoundByResolver(rc_t rc) {
+    if (GetRCModule(rc) == rcVFS) {
+        if (GetRCTarget(rc) == rcResolver) {
+            if (GetRCContext(rc) == rcResolving) {
+                if (GetRCState(rc) == rcNotFound) {
+                    return true;
+                }
+            }
+        }
+    }
+    return false;
+}
+
+static rc_t vdb_validate(const vdb_validate_params *pb, const char *aPath) {
+    bool bad = false;
+    const String *local = NULL;
+    VFSManager *mgr = NULL;
+    VResolver *resolver = NULL;
+    const char *path = aPath;
+    KPathType pt = kptNotFound;
+
+    rc_t rc = VFSManagerMake(&mgr);
+    if (rc != 0) {
+        LOGERR(klogInt, rc, "Cannot VFSManagerMake");
+        return rc;
+    }
+
+    rc = VFSManagerGetResolver(mgr, &resolver);
+    if (rc != 0) {
+        LOGERR(klogInt, rc, "Cannot VFSManagerGetResolver");
+    }
+    else {
+        VResolverRemoteEnable(resolver, vrAlwaysDisable);
+    }
+
+    /* what type of thing is this path? */
+    pt = KDirectoryPathType(pb->wd, "%s", path);
+
+    if ((pt & ~kptAlias) == kptNotFound) {
+        const VPath *pLocal = NULL;
+        VPath *acc = NULL;
+        bad = true;
+        rc = VFSManagerMakePath (mgr, &acc, "%s", path);
+        if (rc != 0) {
+            PLOGERR(klogErr, (klogErr, rc,
+                "VPathMake($(path)) failed", PLOG_S(path), path));
+        }
+        else {
+            rc = VResolverLocal(resolver, acc, &pLocal);
+            if (rc != 0 && NotFoundByResolver(rc)) {
+                bad = false;
+                PLOGMSG(klogInfo, (klogInfo,
+                    "'$(fname)' could not be found", "fname=%s", path));
+            }
+        }
+
+        if (rc == 0) {
+            rc = VPathMakeString(pLocal, &local);
+            if (rc != 0) {
+                PLOGERR(klogErr, (klogErr, rc,
+                    "VPathMake(local $(path)) failed", PLOG_S(path), path));
+            }
+        }
+
+        if (rc == 0) {
+            path = local->addr;
+            PLOGMSG(klogInfo, (klogInfo,
+                "Validating '$(path)'...", PLOG_S(path), path));
+            pt = KDirectoryPathType(pb -> wd, "%s", path);
+            bad = false;
+        }
+
+        RELEASE(VPath, acc);
+        RELEASE(VPath, pLocal);
+    }
+    RELEASE(VFSManager, mgr);
+    RELEASE(VResolver, resolver);
+
+    if (rc == 0) {
+        switch (pt & ~kptAlias) {
+            case kptNotFound:
+                rc = RC(rcExe, rcPath, rcValidating, rcPath, rcNotFound);
+                bad = true;
+                break;
+            case kptBadPath:
+                rc = RC(rcExe, rcPath, rcValidating, rcPath, rcInvalid);
+                bad = true;
+                break;
+            case kptFile:
+                rc = vdb_validate_file(pb, pb->wd, path);
+                break;
+            case kptDir:
+                switch(KDBManagerPathType (pb->kmgr, "%s", path)) {
+                    case kptDatabase:
+                        rc = vdb_validate_database(pb, pb->wd, path);
+                        break;
+                    case kptTable:
+                    case kptPrereleaseTbl:
+                        rc = vdb_validate_table(pb, pb->wd, path);
+                        break;
+                    case kptIndex:
+                    case kptColumn:
+                        rc = RC(rcExe, rcPath, rcValidating,
+                            rcType, rcUnsupported);
+                        bad = true;
+                        break;
+                    default:
+                        rc = KDirectoryVisit(pb -> wd, false,
+                                             vdb_validate_dir, (void*)pb, "%s", path);
+                        break;
+                }
+                break;
+            default:
+                break;
+        }
+    }
+
+    free((void*)local);
+
+    if (bad) {
+        PLOGMSG ( klogWarn, ( klogWarn,
+            "Path '$(fname)' could not be validated", "fname=%s", path ) );
+    }
+
+    return rc;
+}
+
+/*static char const* const defaultLogLevel =
+#if _DEBUGGING
+"debug5";
+#else
+"info";
+#endif*/
+
+/******************************************************************************
+ * Usage
+ ******************************************************************************/
+const char UsageDefaultName[] = "vdb-validate";
+
+rc_t CC UsageSummary(const char *prog_name)
+{
+    return KOutMsg ( "Usage: %s [options] path [ path... ]\n"
+                     "\n"
+                     , prog_name );
+}
+
+/*static char const *help_text[] =
+{
+    "Check components md5s if present, "
+            "fail unless other checks are requested (default: yes)", NULL,
+    "Check blobs CRC32 (default: no)", NULL,
+    "Check 'skey' index (default: no)", NULL,
+    "Continue checking object for all possible errors (default: no)", NULL,
+    "Check data referential integrity for databases (default: no)", NULL,
+    "Check index-only with blobs CRC32 (default: no)", NULL
+};*/
+
+#define ALIAS_md5  "5"
+#define OPTION_md5 "md5"
+static const char *USAGE_MD5[] = { "Check components md5s if present, "
+    "fail unless other checks are requested (default: yes)", NULL };
+/*
+#define ALIAS_MD5  "M"
+#define OPTION_MD5 "MD5"
+*/
+#define ALIAS_blob_crc  "b"
+#define OPTION_blob_crc "blob-crc"
+static const char *USAGE_BLOB_CRC[] =
+{ "Check blobs CRC32 (default: yes)", NULL };
+
+#define ALIAS_BLOB_CRC  "B"
+#define OPTION_BLOB_CRC "BLOB-CRC"
+
+#define ALIAS_CNS_CHK  "C"
+#define OPTION_CNS_CHK "CONSISTENCY-CHECK"
+static const char *USAGE_CNS_CHK[] =
+{ "Deeply check data consistency for tables (default: no)", NULL };
+
+#if CHECK_INDEX
+#define ALIAS_INDEX  "i"
+#define OPTION_INDEX "index"
+static const char *USAGE_INDEX[] = { "Check 'skey' index (default: no)", NULL };
+#endif
+
+#define ALIAS_EXHAUSTIVE  "x"
+#define OPTION_EXHAUSTIVE "exhaustive"
+static const char *USAGE_EXHAUSTIVE[] =
+{ "Continue checking object for all possible errors (default: false)", NULL };
+
+#define ALIAS_ref_int  "d"
+#define OPTION_ref_int "referential-integrity"
+static const char *USAGE_REF_INT[] =
+{ "Check data referential integrity for databases (default: yes)", NULL };
+
+#define ALIAS_REF_INT  "I"
+#define OPTION_REF_INT "REFERENTIAL-INTEGRITY"
+
+#define OPTION_SDC_SEC_ROWS "sdc:rows"
+static const char *USAGE_SDC_SEC_ROWS[] =
+{ "Specify maximum amount of secondary alignment table rows to look at before saying accession is good, default 100000.",
+  "Specifying 0 will iterate the whole table. Can be in percent (e.g. 5%)",
+  NULL };
+
+#define OPTION_SDC_SEQ_ROWS "sdc:seq-rows"
+static const char *USAGE_SDC_SEQ_ROWS[] =
+{ "Specify maximum amount of sequence table rows to look at before saying accession is good, default 100000.",
+  "Specifying 0 will iterate the whole table. Can be in percent (e.g. 5%)",
+  NULL };
+
+#define OPTION_SDC_PLEN_THOLD "sdc:plen_thold"
+static const char *USAGE_SDC_PLEN_THOLD[] =
+{ "Specify a threshold for amount of secondary alignment which are shorter (hard-clipped) than corresponding primaries, default 1%.", NULL };
+
+
+static const char *USAGE_DRI[] =
+{ "Do not check data referential integrity for databases", NULL };
+
+static const char *USAGE_IND_ONLY[] =
+{ "Check index-only with blobs CRC32 (default: no)", NULL };
+
+static OptDef options [] =
+{                                                    /* needs_value, required */
+/*  { OPTION_MD5     , ALIAS_MD5     , NULL, USAGE_MD5     , 1, true , false }*/
+    { OPTION_BLOB_CRC, ALIAS_BLOB_CRC, NULL, USAGE_BLOB_CRC, 1, true , false }
+#if CHECK_INDEX
+  , { OPTION_INDEX   , ALIAS_INDEX   , NULL, USAGE_INDEX   , 1, false, false }
+#endif
+  , { OPTION_EXHAUSTIVE,
+                   ALIAS_EXHAUSTIVE, NULL, USAGE_EXHAUSTIVE, 1, false, false }
+  , { OPTION_REF_INT , ALIAS_REF_INT , NULL, USAGE_REF_INT , 1, true , false }
+  , { OPTION_CNS_CHK , ALIAS_CNS_CHK , NULL, USAGE_CNS_CHK , 1, true , false }
+
+    /* secondary alignment table data check options */
+  , { OPTION_SDC_SEC_ROWS, NULL      , NULL, USAGE_SDC_SEC_ROWS, 1, true , false }
+  , { OPTION_SDC_SEQ_ROWS, NULL      , NULL, USAGE_SDC_SEQ_ROWS, 1, true , false }
+  , { OPTION_SDC_PLEN_THOLD, NULL    , NULL, USAGE_SDC_PLEN_THOLD, 1, true , false }
+
+    /* not printed by --help */
+  , { "dri"          , NULL          , NULL, USAGE_DRI     , 1, false, false }
+  , { "index-only"   ,NULL           , NULL, USAGE_IND_ONLY, 1, false, false }
+
+    /* obsolete options for backward compatibility */
+  , { OPTION_md5     , ALIAS_md5     , NULL, USAGE_MD5     , 1, true , false }
+  , { OPTION_blob_crc, ALIAS_blob_crc, NULL, USAGE_BLOB_CRC, 1, false, false }
+  , { OPTION_ref_int , ALIAS_ref_int , NULL, USAGE_REF_INT , 1, false, false }
+};
+
+/*
+#define NUM_SILENT_TRAILING_OPTIONS 5
+
+static const char *option_params [] =
+{
+    NULL
+  , NULL
+#if CHECK_INDEX
+  , NULL
+#endif
+  , NULL
+  , NULL
+  , NULL
+  , NULL
+};
+*/
+rc_t CC Usage ( const Args * args )
+{
+/*  uint32_t i; */
+    const char *progname, *fullpath;
+    rc_t rc = ArgsProgram ( args, & fullpath, & progname );
+    if ( rc != 0 )
+        progname = fullpath = UsageDefaultName;
+
+    UsageSummary ( progname );
+
+    KOutMsg ( "  Examine directories, files and VDB objects,\n"
+              "  reporting any problems that can be detected.\n"
+              "\n"
+              "Components md5s are always checked if present.\n"
+              "\n"
+              "Options:\n"
+        );
+
+/*  HelpOptionLine(ALIAS_MD5     , OPTION_MD5     , "yes | no", USAGE_MD5); */
+    HelpOptionLine(ALIAS_BLOB_CRC, OPTION_BLOB_CRC, "yes | no", USAGE_BLOB_CRC);
+#if CHECK_INDEX
+    HelpOptionLine(ALIAS_INDEX   , OPTION_INDEX   , "yes | no", USAGE_INDEX);
+#endif
+    HelpOptionLine(ALIAS_REF_INT , OPTION_REF_INT , "yes | no", USAGE_REF_INT);
+    HelpOptionLine(ALIAS_CNS_CHK , OPTION_CNS_CHK , "yes | no", USAGE_CNS_CHK);
+    HelpOptionLine(ALIAS_EXHAUSTIVE, OPTION_EXHAUSTIVE, NULL, USAGE_EXHAUSTIVE);
+    HelpOptionLine(NULL          , OPTION_SDC_SEC_ROWS, "rows"    , USAGE_SDC_SEC_ROWS);
+    HelpOptionLine(NULL          , OPTION_SDC_SEQ_ROWS, "rows"    , USAGE_SDC_SEQ_ROWS);
+    HelpOptionLine(NULL          , OPTION_SDC_PLEN_THOLD, "threshold", USAGE_SDC_PLEN_THOLD);
+
+/*
+#define NUM_LISTABLE_OPTIONS \
+    ( sizeof options / sizeof options [ 0 ] - NUM_SILENT_TRAILING_OPTIONS )
+
+    for ( i = 0; i < NUM_LISTABLE_OPTIONS; ++i )
+    {
+        HelpOptionLine ( options [ i ] . aliases, options [ i ] . name,
+            option_params [ i ], options [ i ] . help );
+    }
+*/
+    HelpOptionsStandard ();
+
+    HelpVersion ( fullpath, KAppVersion () );
+
+    return 0;
+}
+
+static
+rc_t parse_args ( vdb_validate_params *pb, Args *args )
+{
+    const char *dummy = NULL;
+    rc_t rc;
+    uint32_t cnt;
+
+    pb -> md5_chk = true;
+    pb->consist_check = false;
+    ref_int_check = pb -> blob_crc
+        = pb -> md5_chk_explicit = md5_required = true;
+    pb -> sdc_sec_rows_in_percent = false;
+    pb -> sdc_sec_rows.number = 100000;
+    pb -> sdc_seq_rows_in_percent = false;
+    pb -> sdc_seq_rows.number = 100000;
+    pb -> sdc_pa_len_thold_in_percent = true;
+    pb -> sdc_pa_len_thold.percent = 0.01;
+
+  {
+    rc = ArgsOptionCount(args, OPTION_CNS_CHK, &cnt);
+    if (rc != 0) {
+        LOGERR(klogErr, rc, "Failure to get '" OPTION_CNS_CHK "' argument");
+        return rc;
+    }
+    if (cnt != 0) {
+        rc = ArgsOptionValue(args, OPTION_CNS_CHK, 0, (const void **)&dummy);
+        if (rc != 0) {
+            LOGERR(klogErr, rc,
+                "Failure to get '" OPTION_CNS_CHK "' argument");
+            return rc;
+        }
+        assert(dummy && dummy[0]);
+        if (dummy[0] == 'y') {
+            pb->consist_check = true;
+        }
+    }
+  }
+  {
+    rc = ArgsOptionCount ( args, "exhaustive", & cnt );
+    if ( rc != 0 )
+        return rc;
+    exhaustive = cnt != 0;
+  }
+  {
+    rc = ArgsOptionCount(args, OPTION_REF_INT, &cnt);
+    if (rc != 0) {
+        LOGERR(klogErr, rc, "Failure to get '" OPTION_REF_INT "' argument");
+        return rc;
+    }
+    if (cnt != 0) {
+        rc = ArgsOptionValue(args, OPTION_REF_INT, 0, (const void **)&dummy);
+        if (rc != 0) {
+            LOGERR(klogErr, rc,
+                "Failure to get '" OPTION_REF_INT "' argument");
+            return rc;
+        }
+        assert(dummy && dummy[0]);
+        if (dummy[0] == 'n') {
+            ref_int_check = false;
+        }
+    }
+  }
+  {
+    rc = ArgsOptionCount ( args, "dri", & cnt );
+    if ( rc != 0 )
+        return rc;
+    if (cnt != 0) {
+        ref_int_check = false;
+    }
+  }
+#if CHECK_INDEX
+  {
+    rc = ArgsOptionCount ( args, "index", & cnt );
+    if ( rc != 0 )
+        return rc;
+    pb -> index_chk = cnt != 0;
+  }
+#endif
+  {
+    rc = ArgsOptionCount ( args, "index-only", & cnt );
+    if ( rc != 0 )
+        return rc;
+    if ( cnt != 0 )
+        s_IndexOnly = pb -> blob_crc = true;
+  }
+  {
+    rc = ArgsOptionCount( args, OPTION_BLOB_CRC, &cnt);
+    if (rc != 0) {
+        LOGERR(klogErr, rc, "Failure to get '" OPTION_BLOB_CRC "' argument");
+        return rc;
+    }
+    if (cnt != 0) {
+        rc = ArgsOptionValue(args, OPTION_BLOB_CRC, 0, (const void **)&dummy);
+        if (rc != 0) {
+            LOGERR(klogErr, rc,
+                "Failure to get '" OPTION_BLOB_CRC "' argument");
+            return rc;
+        }
+        assert(dummy && dummy[0]);
+        if (dummy[0] == 'n') {
+            pb -> blob_crc = false;
+        }
+    }
+  }
+  {
+    rc = ArgsOptionCount(args, OPTION_md5, &cnt);
+    if (rc != 0) {
+        LOGERR(klogErr, rc, "Failure to get '" OPTION_md5 "' argument");
+        return rc;
+    }
+    if (cnt != 0) {
+        rc = ArgsOptionValue(args, OPTION_md5, 0, (const void **)&dummy);
+        if (rc != 0) {
+            LOGERR(klogErr, rc, "Failure to get '" OPTION_md5 "' argument");
+            return rc;
+        }
+        assert(dummy && dummy[0]);
+        if (dummy[0] == 'n') {
+            pb -> md5_chk = pb -> md5_chk_explicit = md5_required = false;
+        }
+    }
+  }
+  {
+      rc = ArgsOptionCount ( args, OPTION_SDC_SEC_ROWS, &cnt );
+      if (rc)
+      {
+          LOGERR (klogInt, rc, "ArgsOptionCount() failed for " OPTION_SDC_SEC_ROWS);
+          return rc;
+      }
+
+      if (cnt > 0)
+      {
+          uint64_t value;
+          size_t value_size;
+          rc = ArgsOptionValue ( args, OPTION_SDC_SEC_ROWS, 0, (const void **) &dummy );
+          if (rc)
+          {
+              LOGERR (klogInt, rc, "ArgsOptionValue() failed for " OPTION_SDC_SEC_ROWS);
+              return rc;
+          }
+
+          pb->sdc_enabled = true;
+
+          value_size = string_size ( dummy );
+          if ( value_size >= 1 && dummy[value_size - 1] == '%' )
+          {
+              value = string_to_U64 ( dummy, value_size - 1, &rc );
+              if (rc)
+              {
+                  LOGERR (klogInt, rc, "string_to_U64() failed for " OPTION_SDC_SEC_ROWS);
+                  return rc;
+              }
+              else if (value == 0 || value > 100)
+              {
+                  rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInvalid);
+                  LOGERR (klogInt, rc, OPTION_SDC_SEC_ROWS " has illegal percentage value (has to be 1-100%)" );
+                  return rc;
+              }
+
+              pb->sdc_sec_rows_in_percent = true;
+              pb->sdc_sec_rows.percent = (double)value / 100;
+          }
+          else
+          {
+              value = string_to_U64 ( dummy, value_size, &rc );
+              if (rc)
+              {
+                  LOGERR (klogInt, rc, "string_to_U64() failed for " OPTION_SDC_SEC_ROWS);
+                  return rc;
+              }
+              pb->sdc_sec_rows_in_percent = false;
+              pb->sdc_sec_rows.number = value;
+          }
+      }
+  }
+  {
+        rc = ArgsOptionCount ( args, OPTION_SDC_SEQ_ROWS, &cnt );
+        if (rc)
+        {
+            LOGERR (klogInt, rc, "ArgsOptionCount() failed for " OPTION_SDC_SEQ_ROWS);
+            return rc;
+        }
+
+        if (cnt > 0)
+        {
+            uint64_t value;
+            size_t value_size;
+            rc = ArgsOptionValue ( args, OPTION_SDC_SEQ_ROWS, 0, (const void **) &dummy );
+            if (rc)
+            {
+                LOGERR (klogInt, rc, "ArgsOptionValue() failed for " OPTION_SDC_SEQ_ROWS);
+                return rc;
+            }
+
+            pb->sdc_enabled = true;
+
+            value_size = string_size ( dummy );
+            if ( value_size >= 1 && dummy[value_size - 1] == '%' )
+            {
+                value = string_to_U64 ( dummy, value_size - 1, &rc );
+                if (rc)
+                {
+                    LOGERR (klogInt, rc, "string_to_U64() failed for " OPTION_SDC_SEQ_ROWS);
+                    return rc;
+                }
+                else if (value == 0 || value > 100)
+                {
+                    rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInvalid);
+                    LOGERR (klogInt, rc, OPTION_SDC_SEQ_ROWS " has illegal percentage value (has to be 1-100%)" );
+                    return rc;
+                }
+
+                pb->sdc_seq_rows_in_percent = true;
+                pb->sdc_seq_rows.percent = (double)value / 100;
+            }
+            else
+            {
+                value = string_to_U64 ( dummy, value_size, &rc );
+                if (rc)
+                {
+                    LOGERR (klogInt, rc, "string_to_U64() failed for " OPTION_SDC_SEQ_ROWS);
+                    return rc;
+                }
+                pb->sdc_seq_rows_in_percent = false;
+                pb->sdc_seq_rows.number = value;
+            }
+        }
+    }
+    {
+        rc = ArgsOptionCount ( args, OPTION_SDC_PLEN_THOLD, &cnt );
+        if (rc)
+        {
+            LOGERR (klogInt, rc, "ArgsOptionCount() failed for " OPTION_SDC_PLEN_THOLD);
+            return rc;
+        }
+
+        if (cnt > 0)
+        {
+            uint64_t value;
+            size_t value_size;
+            rc = ArgsOptionValue ( args, OPTION_SDC_PLEN_THOLD, 0, (const void **) &dummy );
+            if (rc)
+            {
+                LOGERR (klogInt, rc, "ArgsOptionValue() failed for " OPTION_SDC_PLEN_THOLD);
+                return rc;
+            }
+
+            pb->sdc_enabled = true;
+
+            value_size = string_size ( dummy );
+            if ( value_size >= 1 && dummy[value_size - 1] == '%' )
+            {
+                value = string_to_U64 ( dummy, value_size - 1, &rc );
+                if (rc)
+                {
+                    LOGERR (klogInt, rc, "string_to_U64() failed for " OPTION_SDC_PLEN_THOLD);
+                    return rc;
+                }
+                else if (value == 0 || value > 100)
+                {
+                    rc = RC(rcExe, rcArgv, rcParsing, rcParam, rcInvalid);
+                    LOGERR (klogInt, rc, OPTION_SDC_PLEN_THOLD " has illegal percentage value (has to be 1-100%)" );
+                    return rc;
+                }
+
+                pb->sdc_pa_len_thold_in_percent = true;
+                pb->sdc_pa_len_thold.percent = (double)value / 100;
+            }
+            else
+            {
+                value = string_to_U64 ( dummy, value_size, &rc );
+                if (rc)
+                {
+                    LOGERR (klogInt, rc, "string_to_U64() failed for " OPTION_SDC_PLEN_THOLD);
+                    return rc;
+                }
+                pb->sdc_pa_len_thold_in_percent = false;
+                pb->sdc_pa_len_thold.number = value;
+            }
+        }
+    }
+
+    if ( pb -> blob_crc || pb -> index_chk )
+        pb -> md5_chk = pb -> md5_chk_explicit;
+
+    pb->exhaustive = exhaustive;
+
+    return 0;
+}
+
+static
+void vdb_validate_params_whack ( vdb_validate_params *pb )
+{
+    VDBManagerRelease ( pb -> vmgr );
+    KDBManagerRelease ( pb -> kmgr );
+    KDirectoryRelease ( pb -> wd );
+    memset ( pb, 0, sizeof * pb );
+}
+
+static
+rc_t vdb_validate_params_init ( vdb_validate_params *pb )
+{
+    rc_t rc;
+    KDirectory *wd;
+
+    memset ( pb, 0, sizeof * pb );
+
+    rc = KDirectoryNativeDir ( & wd );
+    if ( rc == 0 )
+    {
+        pb -> wd = wd;
+        rc = VDBManagerMakeRead ( & pb -> vmgr, wd );
+        if ( rc == 0 )
+        {
+            rc = VDBManagerOpenKDBManagerRead ( pb -> vmgr, & pb -> kmgr );
+            if ( rc == 0 )
+                return 0;
+        }
+    }
+
+    vdb_validate_params_whack ( pb );
+    return rc;
+}
+
+static rc_t main_with_args(Args *const args)
+{
+    XMLLogger const *xlogger = NULL;
+    rc_t rc = XMLLogger_Make(&xlogger, NULL, args);
+
+    if (rc) {
+        LOGERR(klogErr, rc, "Failed to make XML logger");
+    }
+    else {
+        uint32_t pcount;
+        rc = ArgsParamCount ( args, & pcount );
+        if ( rc != 0 )
+            LOGERR ( klogErr, rc, "Failed to count command line parameters" );
+        else if ( pcount == 0 )
+        {
+            rc = RC ( rcExe, rcPath, rcValidating, rcParam, rcInsufficient );
+            LOGERR ( klogErr, rc, "No paths to validate" );
+            MiniUsage ( args );
+        }
+        else
+        {
+            vdb_validate_params pb;
+            rc = vdb_validate_params_init ( & pb );
+            if ( rc != 0 )
+                LOGERR ( klogErr, rc, "Failed to initialize internal managers" );
+            else
+            {
+                rc = parse_args ( & pb, args );
+                if ( rc != 0 )
+                    LOGERR ( klogErr, rc, "Failed to extract command line options" );
+                else
+                {
+                    rc = KLogLevelSet ( klogInfo );
+                    if ( rc != 0 )
+                        LOGERR ( klogErr, rc, "Failed to set log level" );
+                    else
+                    {
+                        uint32_t i;
+
+                        md5_required = false;
+
+                        STSMSG(2, ("exhaustive = %d", exhaustive));
+                        STSMSG(2, ("ref_int_check = %d", ref_int_check));
+                        STSMSG(2, ("md5_required = %d", md5_required));
+                        STSMSG(2, ("P {"));
+                        STSMSG(2, ("\tmd5_chk = %d", pb.md5_chk));
+                        STSMSG(2, ("\tmd5_chk_explicit = %d",
+                            pb.md5_chk_explicit));
+                        STSMSG(2, ("\tblob_crc = %d", pb.blob_crc));
+                        STSMSG(2, ("\tconsist_check = %d", pb.consist_check));
+                        STSMSG(2, ("}"));
+                        for ( i = 0; i < pcount; ++ i )
+                        {
+                            rc_t rc2;
+                            const char *path;
+                            rc = ArgsParamValue ( args, i, (const void **)& path );
+                            if ( rc != 0 )
+                            {
+                                LOGERR ( klogErr, rc, "Failed to extract command line options" );
+                                break;
+                            }
+
+                            rc2 = vdb_validate ( & pb, path );
+                            if ( rc == 0 )
+                                rc = rc2;
+                        }
+                    }
+                }
+
+                vdb_validate_params_whack ( & pb );
+            }
+        }
+        XMLLogger_Release(xlogger);
+    }
+    return rc;
+}
+
+rc_t CC KMain(int argc, char *argv[])
+{
+    Args *args = NULL;
+    rc_t rc = ArgsMakeAndHandle(&args, argc, argv, 2,
+                                options, sizeof(options)/sizeof(options[0]),
+                                XMLLogger_Args, XMLLogger_ArgsQty);
+
+    if ( rc != 0 )
+        LOGERR ( klogErr, rc, "Failed to parse command line" );
+    else
+    {
+        rc = main_with_args(args);
+        ArgsWhack ( args );
+    }
+
+    return rc;
+}
diff --git a/vdb3/itf/kfc/array.hpp b/vdb3/itf/kfc/array.hpp
deleted file mode 100644
index 6c14354..0000000
--- a/vdb3/itf/kfc/array.hpp
+++ /dev/null
@@ -1,127 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_array_
-#define _hpp_vdb3_kfc_array_
-
-#ifndef _hpp_vdb3_kfc_memory_
-#include <kfc/memory.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_except_
-#include <kfc/except.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards
-     */
-
-
-    /*------------------------------------------------------------------
-     * OpaqueArray
-     *  represents a container addressable by ordinal
-     */
-    class OpaqueArray
-    {
-    public:
-
-        // the number of elements actively stored
-        count_t length () const;
-
-    protected:
-
-        // the storage capacity
-        bytes_t size () const;
-
-        // implement read or r/w access to object
-        void * access ( index_t offset, const bytes_t & elem_size );
-        const void * access ( index_t offset, const bytes_t & elem_size ) const;
-
-        // assignment
-        void assign ( const OpaqueArray & r );
-
-        // C++
-        OpaqueArray ();
-        OpaqueArray ( const OpaqueArray & r );
-        OpaqueArray ( const OpaqueArray & r, caps_t reduce );
-        ~ OpaqueArray ();
-
-        // factory
-        OpaqueArray ( Mem & m, const bytes_t & elem_size );
-        OpaqueArray ( const Mem & m, const bytes_t & elem_size );
-
-    private:
-
-        Mem m;
-        count_t cnt;
-    };
-
-
-
-    /*------------------------------------------------------------------
-     * Array < T >
-     *  represents a container addressable by ordinal index
-     */
-    template < class T >
-    class Array : public OpaqueArray
-    {
-    public:
-
-        // element size
-        bytes_t elem_size () const
-        { return bytes_t (  sizeof ( T ) ); }
-
-        // array capacity
-        count_t capacity () const
-        { return OpaqueArray :: size () / sizeof ( T ); }
-
-        // access
-        T & operator [] ( index_t idx )
-        { return * ( T * ) access ( idx * sizeof ( T ), sizeof ( T ) ); }
-        const T & operator [] ( index_t idx ) const
-        { return * ( const T * ) access ( idx * sizeof ( T ), sizeof ( T ) ); }
-
-        // C++
-        Array () {}
-        Array ( const Array < T > & a )
-            : OpaqueArray ( a ) {}
-        void operator = ( const Array < T > & a )
-            { OpaqueArray :: assign ( a ); }
-        Array ( const Array < T > & a, caps_t reduce )
-            : OpaqueArray ( a, reduce ) {}
-
-        // creation from a memory block
-        Array ( Mem & m )
-            : OpaqueArray ( m, sizeof ( T ) ) {}
-        Array ( const Mem & m )
-            : OpaqueArray ( m, sizeof ( T ) ) {}
-    };
-}
-
-#endif // _hpp_vdb3_kfc_array_
diff --git a/vdb3/itf/kfc/atomic-ia32.hpp b/vdb3/itf/kfc/atomic-ia32.hpp
deleted file mode 100644
index 88b54e2..0000000
--- a/vdb3/itf/kfc/atomic-ia32.hpp
+++ /dev/null
@@ -1,500 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_atomic_ia32_
-#define _hpp_vdb3_kfc_atomic_ia32_
-
-#ifndef _hpp_vdb3_kfc_atomic_
-#error "do not include this file directly"
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * atomic_t < I32 >
-     * atomic_t < U32 >
-     *  universal to all Intel/AMD architectures
-     *  particular to either 32-bit ( inc and dec )
-     *  or to sign ( compared read_and_add )
-     */
-
-    /* inc
-     *  requires "incl" rather than "incq"
-     */
-    template <> inline
-    void atomic_t < I32 > :: inc ()
-    {
-        __asm__ __volatile__
-        (
-        "lock;"
-            "incl %0"
-            : "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-    }
-
-    template <> inline
-    void atomic_t < U32 > :: inc ()
-    {
-        __asm__ __volatile__
-        (
-        "lock;"
-            "incl %0"
-            : "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-    }
-
-    /* dec
-     *  requires "decl" rather than "decq"
-     */
-    template <> inline
-    void atomic_t < I32 > :: dec ()
-    {
-        __asm__ __volatile__
-        (
-        "lock;"
-            "decl %0"
-            : "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-    }
-
-    template <> inline
-    void atomic_t < U32 > :: dec ()
-    {
-        __asm__ __volatile__
-        (
-        "lock;"
-            "decl %0"
-            : "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-    }
-
-    /* inc_and_test
-     *  "incl" vs "incq"
-     */
-    template <> inline
-    bool atomic_t < I32 > :: inc_and_test ()
-    {
-        bool rtn;
-        __asm__ __volatile__
-        (
-        "lock;"
-            "incl %1;"
-            "sete %0"
-            : "=r" ( rtn ), "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-        return rtn;
-    }
-
-    template <> inline
-    bool atomic_t < U32 > :: inc_and_test ()
-    {
-        bool rtn;
-        __asm__ __volatile__
-        (
-        "lock;"
-            "incl %1;"
-            "sete %0"
-            : "=r" ( rtn ), "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-        return rtn;
-    }
-
-    /* dec_and_test
-     *  "decl" vs "decq"
-     */
-    template <> inline
-    bool atomic_t < I32 > :: dec_and_test ()
-    {
-        bool rtn;
-        __asm__ __volatile__
-        (
-        "lock;"
-            "decl %1;"
-            "sete %0"
-            : "=r" ( rtn ), "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-        return rtn;
-    }
-
-    template <> inline
-    bool atomic_t < U32 > :: dec_and_test ()
-    {
-        bool rtn;
-        __asm__ __volatile__
-        (
-        "lock;"
-            "decl %1;"
-            "sete %0"
-            : "=r" ( rtn ), "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-        return rtn;
-    }
-
-    /* read_and_add_cc
-     *  these are universal for size,
-     *  but need differentiation based upon sign
-     *  since sign cannot be specified apart from size,
-     *  generate 2 specializations of each
-     */
-    template <> inline
-    I32 atomic_t < I32 > :: read_and_add_lt ( I32 cmp, I32 val )
-    {
-        I32 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"       // rtn - cmp
-            "mov %4, %1;"
-            "jge 2f;"           // skip if rtn >= cmp signed
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template <> inline
-    U32 atomic_t < U32 > :: read_and_add_lt ( U32 cmp, U32 val )
-    {
-        U32 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"       // rtn - cmp
-            "mov %4, %1;"
-            "jae 2f;"           // skip if rtn >= cmp unsigned
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template <> inline
-    I32 atomic_t < I32 > :: read_and_add_le ( I32 cmp, I32 val )
-    {
-        I32 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"       // rtn - cmp
-            "mov %4, %1;"
-            "jg 2f;"            // skip if rtn > cmp signed
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template <> inline
-    U32 atomic_t < U32 > :: read_and_add_le ( U32 cmp, U32 val )
-    {
-        U32 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"       // rtn - cmp
-            "mov %4, %1;"
-            "ja 2f;"            // skip if rtn > cmp unsigned
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template <> inline
-    I32 atomic_t < I32 > :: read_and_add_ge ( I32 cmp, I32 val )
-    {
-        I32 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"       // rtn - cmp
-            "mov %4, %1;"
-            "jl 2f;"            // skip if rtn < cmp signed
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template <> inline
-    U32 atomic_t < U32 > :: read_and_add_ge ( U32 cmp, U32 val )
-    {
-        U32 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"       // rtn - cmp
-            "mov %4, %1;"
-            "jb 2f;"            // skip if rtn < cmp unsigned
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template <> inline
-    I32 atomic_t < I32 > :: read_and_add_gt ( I32 cmp, I32 val )
-    {
-        I32 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"       // rtn - cmp
-            "mov %4, %1;"
-            "jle 2f;"           // skip if rtn <= cmp signed
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template <> inline
-    U32 atomic_t < U32 > :: read_and_add_gt ( U32 cmp, U32 val )
-    {
-        U32 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"       // rtn - cmp
-            "mov %4, %1;"
-            "jbe 2f;"           // skip if rtn <= cmp unsigned
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    /*------------------------------------------------------------------
-     * atomic_t < T >
-     *  universal to all Intel/AMD architectures
-     */
-
-    template < class T > inline
-    T atomic_t < T > :: read () const
-    {
-        // on Intel/AMD, the read is already atomic
-        return counter;
-    }
-
-    template < class T > inline
-    void atomic_t < T > :: set ( T val )
-    {
-        // on Intel/AMD, the write here is already atomic
-        counter = val;
-    }
-
-    template < class T > inline
-    T atomic_t < T > :: read_and_add ( T val )
-    {
-        T rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "mov %3, %1;"
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template < class T > inline
-    T atomic_t < T > :: add_and_read ( T val )
-    {
-        T rtn, cmp;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "mov %3, %1;"
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b"
-            : "=&a" ( cmp ), "=&r" ( rtn )
-            : "r" ( & this -> counter ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template < class T > inline
-    void atomic_t < T > :: add ( T val )
-    {
-        // Intel/AMD architecture favors read_and_add
-        // because of the way cmpxchg works
-        read_and_add ( val );
-    }
-
-    template < class T > inline
-    bool atomic_t < T > :: test_and_inc ()
-    {
-        // Intel/AMD architecture does not do pretest and inc
-        // but it does do pre-read and add
-        return read_and_add ( 1 ) == 0;
-    }
-
-
-    template < class T > inline
-    T atomic_t < T > :: test_and_set ( T cmp, T val )
-    {
-        T rtn;
-        __asm__ __volatile__
-        (
-        "lock;"
-            "cmpxchg %3, (%1)"
-            : "=a" ( rtn )
-            : "r" ( & this -> counter ), "a" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template < class T > inline
-    T atomic_t < T > :: read_and_add_eq ( T cmp, T val )
-    {
-        T rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"
-            "mov %4, %1;"
-            "jne 2f;"
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template < class T > inline
-    T atomic_t < T > :: read_and_add_ne ( T cmp, T val )
-    {
-        T rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"
-            "mov %4, %1;"
-            "je 2f;"
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template < class T > inline
-    atomic_t < T > :: atomic_t ( const atomic_t < T > & a )
-        : counter ( a . read () )
-    {
-    }
-
-    template < class T > inline
-    void atomic_t < T > :: operator = ( const atomic_t < T > & a )
-    {
-        set ( a . read () );
-    }
-}
-
-#endif // _hpp_vdb3_kfc_atomic_ia32_
diff --git a/vdb3/itf/kfc/atomic-x86_64.hpp b/vdb3/itf/kfc/atomic-x86_64.hpp
deleted file mode 100644
index 72f7d40..0000000
--- a/vdb3/itf/kfc/atomic-x86_64.hpp
+++ /dev/null
@@ -1,356 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_atomic_x86_64_
-#define _hpp_vdb3_kfc_atomic_x86_64_
-
-#ifndef _hpp_vdb3_kfc_atomic_
-#error "do not include this file directly"
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * atomic_t < I64 >
-     * atomic_t < U64 >
-     *  universal to all Intel/AMD architectures
-     *  particular to either 64-bit ( inc and dec )
-     *  or to sign ( compared read_and_add )
-     */
-
-    /* inc
-     *  requires "incq" rather than "incl"
-     */
-    template <> inline
-    void atomic_t < I64 > :: inc ()
-    {
-        __asm__ __volatile__
-        (
-        "lock;"
-            "incq %0"
-            : "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-    }
-
-    template <> inline
-    void atomic_t < U64 > :: inc ()
-    {
-        __asm__ __volatile__
-        (
-        "lock;"
-            "incq %0"
-            : "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-    }
-
-    /* dec
-     *  requires "decq" rather than "decl"
-     */
-    template <> inline
-    void atomic_t < I64 > :: dec ()
-    {
-        __asm__ __volatile__
-        (
-        "lock;"
-            "decq %0"
-            : "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-    }
-
-    template <> inline
-    void atomic_t < U64 > :: dec ()
-    {
-        __asm__ __volatile__
-        (
-        "lock;"
-            "decq %0"
-            : "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-    }
-
-    /* inc_and_test
-     *  "incq" vs "incl"
-     */
-    template <> inline
-    bool atomic_t < I64 > :: inc_and_test ()
-    {
-        bool rtn;
-        __asm__ __volatile__
-        (
-        "lock;"
-            "incq %1;"
-            "sete %0"
-            : "=r" ( rtn ), "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-        return rtn;
-    }
-
-    template <> inline
-    bool atomic_t < U64 > :: inc_and_test ()
-    {
-        bool rtn;
-        __asm__ __volatile__
-        (
-        "lock;"
-            "incq %1;"
-            "sete %0"
-            : "=r" ( rtn ), "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-        return rtn;
-    }
-
-    /* dec_and_test
-     *  "decq" vs "decl"
-     */
-    template <> inline
-    bool atomic_t < I64 > :: dec_and_test ()
-    {
-        bool rtn;
-        __asm__ __volatile__
-        (
-        "lock;"
-            "decq %1;"
-            "sete %0"
-            : "=r" ( rtn ), "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-        return rtn;
-    }
-
-    template <> inline
-    bool atomic_t < U64 > :: dec_and_test ()
-    {
-        bool rtn;
-        __asm__ __volatile__
-        (
-        "lock;"
-            "decq %1;"
-            "sete %0"
-            : "=r" ( rtn ), "=m" ( this -> counter )
-            : "m" ( this -> counter )
-
-        );
-        return rtn;
-    }
-
-    /* read_and_add_cc
-     *  these are universal for size,
-     *  but need differentiation based upon sign
-     *  since sign cannot be specified apart from size,
-     *  generate 2 specializations of each
-     */
-    template <> inline
-    I64 atomic_t < I64 > :: read_and_add_lt ( I64 cmp, I64 val )
-    {
-        I64 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"       // rtn - cmp
-            "mov %4, %1;"
-            "jge 2f;"           // skip if rtn >= cmp signed
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template <> inline
-    U64 atomic_t < U64 > :: read_and_add_lt ( U64 cmp, U64 val )
-    {
-        U64 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"       // rtn - cmp
-            "mov %4, %1;"
-            "jnc 2f;"           // skip if rtn >= cmp unsigned
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template <> inline
-    I64 atomic_t < I64 > :: read_and_add_le ( I64 cmp, I64 val )
-    {
-        I64 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"       // rtn - cmp
-            "mov %4, %1;"
-            "jg 2f;"            // skip if rtn > cmp signed
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template <> inline
-    U64 atomic_t < U64 > :: read_and_add_le ( U64 cmp, U64 val )
-    {
-        U64 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %0, %3;"       // cmp - rtn ( NB! )
-            "mov %4, %1;"
-            "jc 2f;"            // skip if cmp < rtn unsigned
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template <> inline
-    I64 atomic_t < I64 > :: read_and_add_ge ( I64 cmp, I64 val )
-    {
-        I64 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"       // rtn - cmp
-            "mov %4, %1;"
-            "jl 2f;"            // skip if rtn < cmp signed
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template <> inline
-    U64 atomic_t < U64 > :: read_and_add_ge ( U64 cmp, U64 val )
-    {
-        U64 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"       // rtn - cmp
-            "mov %4, %1;"
-            "jc 2f;"            // skip if rtn < cmp unsigned
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template <> inline
-    I64 atomic_t < I64 > :: read_and_add_gt ( I64 cmp, I64 val )
-    {
-        I64 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %3, %0;"       // rtn - cmp
-            "mov %4, %1;"
-            "jle 2f;"           // skip if rtn <= cmp signed
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-
-    template <> inline
-    U64 atomic_t < U64 > :: read_and_add_gt ( U64 cmp, U64 val )
-    {
-        U64 rtn, sum;
-        __asm__ __volatile__
-        (
-            "mov (%2), %0;"
-        "1:"
-            "cmp %0, %3;"       // cmp - rtn ( NB! )
-            "mov %4, %1;"
-            "jnc 2f;"           // skip if cmp >= rtn unsigned
-            "add %0, %1;"
-        "lock;"
-            "cmpxchg %1, (%2);"
-            "jne 1b;"
-        "2:"
-            : "=&a" ( rtn ), "=&r" ( sum )
-            : "r" ( & this -> counter ), "r" ( cmp ), "r" ( val )
-        );
-        return rtn;
-    }
-}
-
-#endif // _hpp_vdb3_kfc_atomic_x86_64_
diff --git a/vdb3/itf/kfc/atomic.hpp b/vdb3/itf/kfc/atomic.hpp
deleted file mode 100644
index 76d7ee2..0000000
--- a/vdb3/itf/kfc/atomic.hpp
+++ /dev/null
@@ -1,133 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_atomic_
-#define _hpp_vdb3_kfc_atomic_
-
-#ifndef _hpp_vdb3_kfc_defs_
-#include <kfc/defs.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * atomic_t < T >
-     *  an atomicly accessed/modified integer
-     */
-    template < class T >
-    class atomic_t
-    {
-    public:
-
-        // return counter;
-        T read () const;
-        // counter = val;
-        void set ( T val );
-
-        // counter += 1;
-        void inc ();
-        // counter -= 1;
-        void dec ();
-        // return ++ counter == 0;
-        bool inc_and_test ();
-        // return -- counter == 0;
-        bool dec_and_test ();
-        // return counter ++ = 0;
-        bool test_and_inc ();
-
-        // ret = counter; if ( counter == cmp ) counter = val; return ret;
-        T test_and_set ( T cmp, T val );
-
-        // counter += val;
-        void add ( T val );
-        // ret = counter; counter += val; return ret;
-        T read_and_add ( T val );
-        // return counter += val;
-        T add_and_read ( T val );
-
-        // ret = counter; if ( counter < cmp ) counter =+ val; return ret;
-        T read_and_add_lt ( T cmp, T val );
-        // ret = counter; if ( counter <= cmp ) counter = val; return ret;
-        T read_and_add_le ( T cmp, T val );
-        // ret = counter; if ( counter == cmp ) counter = val; return ret;
-        T read_and_add_eq ( T cmp, T val );
-        // ret = counter; if ( counter != cmp ) counter = val; return ret;
-        T read_and_add_ne ( T cmp, T val );
-        // ret = counter; if ( counter >= cmp ) counter = val; return ret;
-        T read_and_add_ge ( T cmp, T val );
-        // ret = counter; if ( counter > cmp ) counter = val; return ret;
-        T read_and_add_gt ( T cmp, T val );
-
-        // subtraction versions
-        inline void sub ( T val ) { add ( - val ); }
-        inline T read_and_sub ( T val )
-        { return read_and_add ( - val ); }
-        inline T sub_and_read ( T val )
-        { return add_and_read ( - val ); }
-        inline T read_and_sub_lt ( T cmp, T val )
-        { return read_and_add_lt ( cmp, - val ); }
-        inline T read_and_sub_le ( T cmp, T val )
-        { return read_and_add_le ( cmp, - val ); }
-        inline T read_and_sub_eq ( T cmp, T val )
-        { return read_and_add_eq ( cmp, - val ); }
-        inline T read_and_sub_ne ( T cmp, T val )
-        { return read_and_add_ne ( cmp, - val ); }
-        inline T read_and_sub_ge ( T cmp, T val )
-        { return read_and_add_ge ( cmp, - val ); }
-        inline T read_and_sub_gt ( T cmp, T val )
-        { return read_and_add_gt ( cmp, - val ); }
-
-        // C++ operator overloads
-        inline void operator ++ () { inc (); }
-        inline void operator -- () { dec (); }
-        inline void operator = ( T val ) { set ( val ); }
-        inline void operator += ( T val ) { add ( val ); }
-        inline void operator -= ( T val ) { add ( - val ); }
-        inline operator T () const { return read (); }
-
-        atomic_t ( T val )
-            : counter ( val ) {}
-
-        atomic_t ( const atomic_t < T > & a );
-        void operator = ( const atomic_t < T > & a );
-
-    private:
-
-        volatile T counter;
-    };
-}
-
-#if defined x86_64
-#include <kfc/atomic-x86_64.hpp>
-#include <kfc/atomic-ia32.hpp>
-#elif defined i686 || defined i386
-#include <kfc/atomic-ia32.hpp>
-#else
-#error "no implementation exists for the target architecture"
-#endif
-
-#endif // _hpp_vdb3_kfc_atomic_
diff --git a/vdb3/itf/kfc/callstk.hpp b/vdb3/itf/kfc/callstk.hpp
deleted file mode 100644
index a5d395c..0000000
--- a/vdb3/itf/kfc/callstk.hpp
+++ /dev/null
@@ -1,117 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_callstk_
-#define _hpp_vdb3_kfc_callstk_
-
-#ifndef _hpp_vdb3_kfc_defs_
-#include <kfc/defs.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards and externs
-     */
-
-    class CallStk;
-    extern __thread CallStk const * callstk;
-
-
-    /*------------------------------------------------------------------
-     * SrcLoc
-     *  a structure to identify source file
-     */
-    struct SrcLoc
-    {
-        const char * mod;
-        const char * file;
-        const char * ext;
-    };
-
-    // an automatic mechanism for
-    // creating a single static object per source
-#ifndef SRC_LOC_DEFINED
-#define SRC_LOC_DEFINED
-    static SrcLoc s_src_loc = { __mod__, __file__, __fext__ };
-#endif
-
-
-    /*------------------------------------------------------------------
-     * CallStk
-     *  identifies location of current frame
-     *  chained to caller
-     */
-    class CallStk
-    {
-    public:
-
-        // when caller == 0, represents top frame of stack
-        const CallStk * caller;
-
-        // stack depth
-        // declared "volatile" to keep optimizer from pruning
-        count_t depth;
-
-        // function location
-        const SrcLoc & src;
-        const char volatile * func;
-
-        // stacking constructor/destructor
-        CallStk ( const SrcLoc & sloc, const char * fname )
-            : caller ( callstk )
-            , depth ( callstk -> depth + 1 )
-            , src ( sloc )
-            , func ( fname )
-        {
-            callstk = this;
-        }
-
-        ~ CallStk ()
-        {
-            callstk = caller;
-        }
-
-
-    protected:
-
-        // special per-thread constructor
-        CallStk ( const SrcLoc & sloc );
-
-    };
-
-
-    /*------------------------------------------------------------------
-     * FUNC_ENTRY
-     *  macro to create stack frame linked with caller
-     *  uses GCC __PRETTY_FUNCTION__ to produce function signature
-     */
-#define FUNC_ENTRY()                                                                  \
-    vdb3 :: CallStk local_stack_frame ( vdb3 :: s_src_loc, __PRETTY_FUNCTION__ )
-}
-
-#endif // _hpp_vdb3_kfc_callstk_
diff --git a/vdb3/itf/kfc/caps.hpp b/vdb3/itf/kfc/caps.hpp
deleted file mode 100644
index e0d168b..0000000
--- a/vdb3/itf/kfc/caps.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_caps_
-#define _hpp_vdb3_kfc_caps_
-
-#ifndef _hpp_vdb3_kfc_defs_
-#include <kfc/defs.hpp>
-#endif
-
-namespace vdb3
-{
-    // access object data
-    const caps_t CAP_READ           = ( 1 <<  0 );
-    const caps_t CAP_WRITE          = ( 1 <<  1 );
-    const caps_t CAP_RDWR           = CAP_READ | CAP_WRITE;
-
-    // access a property
-    const caps_t CAP_PROP_READ      = ( 1 <<  2 );
-    const caps_t CAP_PROP_WRITE     = ( 1 <<  3 );
-    const caps_t CAP_PROP_RDWR      = CAP_PROP_READ | CAP_PROP_WRITE;
-
-    // resize memory
-    const caps_t CAP_RESIZE         = ( 1 <<  4 );
-
-    // subrange memory
-    const caps_t CAP_SUBRANGE       = ( 1 <<  5 );
-
-    // specific rights
-    const caps_t CAP_CAST           = ( 1 <<  6 );
-    const caps_t CAP_ALLOC          = ( 1 <<  7 );
-    const caps_t CAP_EXECUTE        = ( 1 <<  8 );
-    const caps_t CAP_SUSPEND        = ( 1 <<  9 );
-}
-
-#endif // _hpp_vdb3_kfc_caps_
diff --git a/vdb3/itf/kfc/defs.hpp b/vdb3/itf/kfc/defs.hpp
deleted file mode 100644
index 2ce995b..0000000
--- a/vdb3/itf/kfc/defs.hpp
+++ /dev/null
@@ -1,113 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_defs_
-#define _hpp_vdb3_kfc_defs_
-
-#include <stddef.h>
-#include <stdint.h>
-#include <stdarg.h>
-#include <assert.h>
-
-namespace vdb3
-{
-
-    // raw integer number types
-    typedef int8_t I8;
-    typedef int16_t I16;
-    typedef int32_t I32;
-    typedef int64_t I64;
-
-    // raw natural number types
-    typedef uint8_t U8;
-    typedef uint16_t U16;
-    typedef uint32_t U32;
-    typedef uint64_t U64;
-
-    // raw real number types
-    typedef float F32;
-    typedef double F64;
-
-    // raw character types
-    typedef char ascii, UTF8;
-    typedef U32 UTF32;
-
-    // raw capabilities
-    typedef U64 caps_t;
-    typedef U64 rcaps_t;
-
-    // an item count
-    typedef U64 count_t;
-
-    // an ordinal index
-    typedef I64 index_t;
-
-    // size of an item in bits
-    class bitsz_t;
-
-    // size of an item in bytes
-    class bytes_t;
-
-    // a timeout
-    class timeout_t;
-
-    // a data type
-    class type_t;
-
-    // a multi-part version number
-    class vers_t;
-
-    // even though I generally hate this kind of thing,
-    // it will make some portions of the code more readable
-    // look for interface declarations and implementations
-#undef interface
-#define interface struct
-#undef implements
-#define implements public
-}
-
-// turn the value of a pp-symbol into a string
-#define stringize( tok ) tok_to_string ( tok )
-#define tok_to_string( tok ) # tok
-
-// generate string values for SrcLoc
-#if ! defined __mod__ && defined __mod_path__
-#define __mod__ stringize ( __mod_path__ )
-#endif
-
-#if ! defined __file__ && defined __file_name__
-#define __file__ stringize ( __file_name__ )
-#endif
-
-#if ! defined __fext__ && defined __file_ext__
-#define __fext__ stringize ( __file_ext__ )
-#endif
-
-#ifndef _hpp_vdb3_kfc_integer_
-#include "integer.hpp"
-#endif
-
-#endif // _hpp_vdb3_kfc_defs_
diff --git a/vdb3/itf/kfc/except.hpp b/vdb3/itf/kfc/except.hpp
deleted file mode 100644
index d43d54b..0000000
--- a/vdb3/itf/kfc/except.hpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_except_
-#define _hpp_vdb3_kfc_except_
-
-#ifndef _hpp_vdb3_kfc_defs_
-#include <kfc/defs.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_string_
-#include <kfc/string.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * exception
-     *  captures the type of exception and a description
-     */
-    class exception
-    {
-    public:
-
-#ifndef _hpp_vdb3_kfc_string_
-        const char * what () const
-        { return msg; }
-#else
-        // report basically what went wrong into a string
-        const String & what () const
-        { return msg; }
-
-        // report where the exception occurred
-        // assembles module, file, line and function
-        String where () const;
-
-        // report entire stack trace
-        String stack_trace () const;
-
-        // return the constant module name
-        String module () const;
-
-        // return the constant file name
-        String file () const;
-
-        // return the constant file extension
-        String ext () const;
-
-        // return the constant function name
-        String func () const;
-#endif
-
-        // return the line number where exception was thrown
-        U32 line () const
-        { return lineno; }
-
-        // public destructor
-        ~ exception ();
-
-    protected:
-
-#ifdef _hpp_vdb3_kfc_string_
-        exception ( U32 lineno, const String & msg );
-#else
-        exception ( U32 lineno, const char * msg );
-#endif
-
-#ifdef _hpp_vdb3_kfc_string_
-        String msg;
-#else
-        const char * msg;
-#endif
-#ifdef _hpp_vdb3_kfc_memory_
-        Mem stk;
-#endif
-        U32 lineno;
-    };
-
-
-    /*------------------------------------------------------------------
-     * XC_DECLARE
-     *  provides a simple means of declaring a new exception type
-     */
-#ifdef _hpp_vdb3_kfc_string_
-#define XC_DECLARE( new_xc, parent_xc )                            \
-    struct new_xc : parent_xc                                      \
-    { new_xc ( vdb3 :: U32 lineno, const vdb3 :: String & msg )    \
-          : parent_xc ( lineno, msg ) {} }
-#else
-#define XC_DECLARE( new_xc, parent_xc )                            \
-    struct new_xc : parent_xc                                      \
-    { new_xc ( vdb3 :: U32 lineno, const char * msg )              \
-          : parent_xc ( lineno, msg ) {} }
-#endif
-
-    XC_DECLARE ( logic_err, exception );
-    XC_DECLARE ( runtime_err, exception );
-    XC_DECLARE ( usage_err, exception );
-    XC_DECLARE ( abuse_err, exception );
-    XC_DECLARE ( xc_internal_err, logic_err );
-    XC_DECLARE ( xc_unimplemented_err, xc_internal_err );
-    XC_DECLARE ( xc_bounds_err, logic_err );
-    XC_DECLARE ( xc_div_zero_err, logic_err );
-    XC_DECLARE ( xc_caps_violation_err, logic_err );
-    XC_DECLARE ( xc_caps_over_extended_err, xc_internal_err );
-    XC_DECLARE ( xc_rcaps_violation_err, logic_err );
-    XC_DECLARE ( xc_program_state_violation, xc_internal_err );
-    XC_DECLARE ( xc_bad_fmt_err, logic_err );
-    XC_DECLARE ( xc_param_err, logic_err );
-    XC_DECLARE ( xc_null_param_err, xc_param_err );
-    XC_DECLARE ( xc_null_self_err, logic_err );
-    XC_DECLARE ( xc_unsupported_interface_err, logic_err );
-    XC_DECLARE ( xc_references_exhausted_err, runtime_err );
-    XC_DECLARE ( xc_zombie_object_err, logic_err );
-    XC_DECLARE ( xc_elem_size_err, logic_err );
-    XC_DECLARE ( xc_no_mem, runtime_err );
-    XC_DECLARE ( xc_mem_quota, xc_no_mem );
-
-
-    /*------------------------------------------------------------------
-     * THROW
-     *  throws an exception of the given type
-     *  allocates a string to copy data
-     *  provides line number for xc_loc_t
-     */
-#ifdef _hpp_vdb3_kfc_string_
-#define THROW( xc, ... )                                     \
-    throw xc ( __LINE__,                                     \
-        vdb3 :: StringBuffer ( __VA_ARGS__ ) . to_str () )
-#else
-#define THROW( xc, fmt, ... )                                \
-    throw xc ( __LINE__, fmt )
-#endif
-
-    /*------------------------------------------------------------------
-     * CONST_THROW
-     *  throws an exception of the given type
-     *  embeds a string constant with no allocation
-     *  provides line number for xc_loc_t
-     */
-#ifdef _hpp_vdb3_kfc_string_
-#define CONST_THROW( xc, msg )                  \
-    throw xc ( __LINE__, CONST_STRING ( msg ) )
-#else
-#define CONST_THROW( xc, msg )                  \
-    throw xc ( __LINE__, msg )
-#endif
-}
-
-#endif // _hpp_vdb3_kfc_except_
diff --git a/vdb3/itf/kfc/fd.hpp b/vdb3/itf/kfc/fd.hpp
deleted file mode 100644
index 96c4ba0..0000000
--- a/vdb3/itf/kfc/fd.hpp
+++ /dev/null
@@ -1,102 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_fd_
-#define _hpp_vdb3_kfc_fd_
-
-#ifndef _hpp_vdb3_kfc_refcount_
-#include <kfc/refcount.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_stream_
-#include <kfc/stream.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards
-     */
-
-
-    /*------------------------------------------------------------------
-     * exceptions
-     */
-
-
-    /*------------------------------------------------------------------
-     * FileDescImpl
-     *  a Unix file-descriptor
-     */
-    class FileDescImpl : public Refcount
-        , implements StreamItf
-    {
-    public:
-
-        // StreamItf
-        virtual bytes_t read ( const bytes_t & num_bytes,
-            Mem & dst, const bytes_t & start );
-        virtual bytes_t write ( const bytes_t & num_bytes,
-            const Mem & src, const bytes_t & start );
-        virtual bytes_t get_mtu () const;
-
-        // C++
-        ~ FileDescImpl ();
-
-    private:
-
-        FileDescImpl ( int fd, bool owned );
-
-        int fd;
-        bool owned;
-
-        friend class PrimordFDMgr;
-    };
-
-
-    /*------------------------------------------------------------------
-     * FileDesc
-     *  a reference to a Unix file-descriptor
-     */
-    class FileDesc : public Ref < FileDescImpl >
-    {
-    public:
-
-        FileDesc ();
-        FileDesc ( const FileDesc & r );
-        void operator = ( const FileDesc & r );
-        FileDesc ( const FileDesc & r, caps_t reduce );
-
-    private:
-
-        FileDesc ( FileDescImpl * obj, caps_t caps );
-
-        friend interface FDMgrItf;
-    };
-}
-
-#endif // _hpp_vdb3_kfc_fd_
diff --git a/vdb3/itf/kfc/fdmgr.hpp b/vdb3/itf/kfc/fdmgr.hpp
deleted file mode 100644
index ad29cdb..0000000
--- a/vdb3/itf/kfc/fdmgr.hpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_fdmgr_
-#define _hpp_vdb3_kfc_fdmgr_
-
-#ifndef _hpp_vdb3_kfc_ref_
-#include <kfc/ref.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards
-     */
-    class FileDesc;
-    class FDMgr;
-    class FileDescImpl;
-
-
-    /*------------------------------------------------------------------
-     * exceptions
-     */
-
-
-    /*------------------------------------------------------------------
-     * FDMgrItf
-     *  file descriptor manager
-     *  an inverted bit of logic that tries to control the number
-     *  of Unix file descriptors in use
-     */
-    interface FDMgrItf
-    {
-
-        // make from an open file descriptor
-        virtual FileDesc make ( int fd, caps_t caps, bool owned ) = 0;
-
-    protected:
-
-        static FileDesc make_fd_ref ( FileDescImpl * obj, caps_t caps );
-        FDMgr make_fdmgr_ref ( Refcount * obj, caps_t caps );
-    };
-
-
-    /*------------------------------------------------------------------
-     * FDMgr
-     *  file descriptor manager reference
-     */
-    class FDMgr : public Ref < FDMgrItf >
-    {
-    public:
-
-        // make from an open file descriptor
-        FileDesc make ( int fd, caps_t caps, bool owned = false ) const;
-
-        // C++
-        FDMgr ();
-        FDMgr ( const FDMgr & r );
-        void operator = ( const FDMgr & r );
-        FDMgr ( const FDMgr & r, caps_t reduce );
-
-    private:
-
-        // factory
-        FDMgr ( Refcount * obj, FDMgrItf * itf, caps_t caps );
-
-        friend interface FDMgrItf;
-    };
-}
-
-#endif // _hpp_vdb3_kfc_fdmgr_
diff --git a/vdb3/itf/kfc/integer.hpp b/vdb3/itf/kfc/integer.hpp
deleted file mode 100644
index 0a44fab..0000000
--- a/vdb3/itf/kfc/integer.hpp
+++ /dev/null
@@ -1,191 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_integer_
-#define _hpp_vdb3_kfc_integer_
-
-#ifndef _hpp_vdb3_kfc_defs_
-#include <kfc/defs.hpp>
-#endif
-
-#ifndef ALLOW_RAW_CONSTANTS
-#define ALLOW_RAW_CONSTANTS 1
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards
-     */
-    class bitsz_t;
-
-
-    /*------------------------------------------------------------------
-     * integer_t
-     *  a semantically typed integer
-     *  generally capable of most things
-     *  that can be done with an integer
-     */
-    template < class IT, class VT >
-    class integer_t
-    {
-    public:
-
-        // conversion to raw number
-        operator VT () const
-        { return val; }
-        VT value () const
-        { return val; }
-
-        // arithmetic
-        IT operator + ( const IT & i ) const
-        { return IT ( val + i . val ); }
-        IT operator - ( const IT & i ) const
-        { return IT ( val - i . val ); }
-        IT operator * ( const IT & i ) const
-        { return IT ( val * i . val ); }
-        IT operator / ( const IT & i ) const;
-        IT operator % ( const IT & i ) const;
-
-        // updating arithmetic
-        IT & operator += ( const IT & i )
-        { val += i . val; return * ( IT * ) this; }
-        IT & operator -= ( const IT & i )
-        { val -= i . val; return * ( IT * ) this; }
-        IT & operator *= ( const IT & i )
-        { val *= i . val; return * ( IT * ) this; }
-        IT & operator /= ( const IT & i );
-        IT & operator %= ( const IT & i );
-
-        IT & operator ++ ()
-        { ++ val; return * ( IT * ) this; }
-        IT & operator -- ()
-        { -- val; return * ( IT * ) this; }
-
-        // equality and relational operators
-        bool operator == ( const IT & i ) const
-        { return val == i . val; }
-        bool operator != ( const IT & i ) const
-        { return val != i . val; }
-        bool operator <= ( const IT & i ) const
-        { return val <= i . val; }
-        bool operator >= ( const IT & i ) const
-        { return val >= i . val; }
-        bool operator < ( const IT & i ) const
-        { return val < i . val; }
-        bool operator > ( const IT & i ) const
-        { return val > i . val; }
-
-#if ALLOW_RAW_CONSTANTS
-        IT operator + ( VT i ) const
-        { return IT ( val + i ); }
-        IT operator - ( VT i ) const
-        { return IT ( val - i ); }
-        IT operator * ( VT i ) const
-        { return IT ( val * i ); }
-        IT operator / ( VT i ) const;
-        IT operator % ( VT i ) const;
-        IT & operator += ( VT i )
-        { val += i; return * ( IT * ) this; }
-        IT & operator -= ( VT i )
-        { val -= i; return * ( IT * ) this; }
-        IT & operator *= ( VT i )
-        { val *= i; return * ( IT * ) this; }
-        IT & operator /= ( VT i );
-        IT & operator %= ( VT i );
-        bool operator == ( VT i ) const
-        { return val == i; }
-        bool operator != ( VT i ) const
-        { return val != i; }
-        bool operator <= ( VT i ) const
-        { return val <= i; }
-        bool operator >= ( VT i ) const
-        { return val >= i; }
-        bool operator < ( VT i ) const
-        { return val < i; }
-        bool operator > ( VT i ) const
-        { return val > i; }
-
-        IT & operator = ( VT i )
-        { val = i; return * ( IT * ) this; }
-#endif
-
-        integer_t ()
-            : val ( 0 ) {}
-        ~ integer_t ()
-            { val = 0; }
-
-        integer_t ( VT i )
-            : val ( i ) {}
-        integer_t ( IT & i )
-            : val ( i . val ) {}
-        IT & operator = ( IT & i )
-            { val = i . val; return * ( IT * ) this; }
-
-    private:
-
-        VT val;
-    };
-
-    /*------------------------------------------------------------------
-     * bytes_t
-     *  a semantically typed integer
-     *  represents the size of some entity in bytes
-     */
-    class bytes_t : public integer_t < bytes_t, U64 >
-    {
-    public:
-
-        bytes_t () {}
-        bytes_t ( U64 bytes )
-            : integer_t < bytes_t, U64 > ( bytes ) {}
-        explicit bytes_t ( const bytes_t & bytes )
-            : integer_t < bytes_t, U64 > ( bytes ) {}
-        explicit bytes_t ( const bitsz_t & bits );
-    };
-
-
-    /*------------------------------------------------------------------
-     * bitsz_t
-     *  a semantically typed integer
-     *  represents the size of some entity in bits
-     */
-    class bitsz_t : public integer_t < bitsz_t, U64 >
-    {
-    public:
-
-        bitsz_t () {}
-        bitsz_t ( U64 bits )
-            : integer_t < bitsz_t, U64 > ( bits ) {}
-        explicit bitsz_t ( const bitsz_t & bits )
-            : integer_t < bitsz_t, U64 > ( bits ) {}
-        explicit bitsz_t ( const bytes_t & bytes );
-    };
-
-}
-
-#endif // _hpp_vdb3_kfc_integer_
diff --git a/vdb3/itf/kfc/log.hpp b/vdb3/itf/kfc/log.hpp
deleted file mode 100644
index b3f46f5..0000000
--- a/vdb3/itf/kfc/log.hpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_log_
-#define _hpp_vdb3_kfc_log_
-
-#ifndef _hpp_vdb3_kfc_ref_
-#include <kfc/ref.hpp>
-#endif
-
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards
-     */
-    class Log;
-    class Refcount;
-    interface LoggerItf;
-
-
-    /*------------------------------------------------------------------
-     * LogLevel
-     *  mimic unix syslog
-     */
-    enum LogLevel
-    {
-        log_emerg = 1,
-        log_alert,
-        log_crit,
-        log_err,
-        log_warning,
-        log_notice,
-        log_info
-    };
-
-    /*------------------------------------------------------------------
-     * LoggerItf
-     */
-    interface LoggerItf
-    {
-        // perform the formatting of the message
-        // transfer it to the task log stream
-        virtual void msg ( LogLevel priority, const char * fmt, va_list args ) = 0;
-
-    protected:
-
-        Log make_ref ( Refcount * obj, caps_t caps );
-
-    private:
-
-        static void * cast ( Refcount * obj );
-
-        friend class Log;
-    };
-
-    /*------------------------------------------------------------------
-     * Log
-     *  logging formatter
-     *  handles output to the log stream
-     */
-    class Log : public Ref < LoggerItf >
-    {
-    public:
-
-        // log level
-        LogLevel get_level () const
-        { return lvl; }
-        void set_level ( LogLevel level );
-
-        // log message
-        void msg ( LogLevel priority, const char * fmt, ... ) const;
-        void vmsg ( LogLevel priority, const char * fmt, va_list args ) const;
-
-        // C++
-        Log ();
-        Log ( const Log & r );
-        void operator = ( const Log & r );
-        Log ( const Log & r, caps_t reduce );
-        ~ Log ();
-
-    private:
-
-        // factory
-        Log ( Refcount * obj, LoggerItf * itf, caps_t caps );
-
-        LogLevel lvl;
-
-        friend interface LoggerItf;
-    };
-
-}
-
-#endif // _hpp_vdb3_kfc_log_
diff --git a/vdb3/itf/kfc/memmgr.hpp b/vdb3/itf/kfc/memmgr.hpp
deleted file mode 100644
index 8f4ae7b..0000000
--- a/vdb3/itf/kfc/memmgr.hpp
+++ /dev/null
@@ -1,133 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_memmgr_
-#define _hpp_vdb3_kfc_memmgr_
-
-#ifndef _hpp_vdb3_kfc_except_
-#include <kfc/except.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_refcount_
-#include <kfc/refcount.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_ref_
-#include <kfc/ref.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards
-     */
-    class Mem;
-    class MemMgr;
-    class Memory;
-    class Refcount;
-    interface MemoryItf;
-
-
-    /*------------------------------------------------------------------
-     * exceptions
-     */
-
-
-    /*------------------------------------------------------------------
-     * MemMgrItf
-     *  memory manager interface
-     */
-    interface MemMgrItf : public Refcount
-    {
-        // allocate memory
-        virtual Mem alloc ( const bytes_t & size, bool clear ) = 0;
-
-        // make a block of constant memory
-        virtual Mem make_const ( const void * ptr, const bytes_t & size ) = 0;
-
-        // support for C++ new and delete
-        void * _new ( size_t bytes );
-        static void _delete ( void * ptr );
-
-    protected:
-
-        // allocate raw memory
-        virtual void * _alloc ( const bytes_t & size, bool clear ) = 0;
-
-        // resize or reallocate raw memory
-        virtual void * _resize ( void * ptr, const bytes_t & old_size,
-            const bytes_t & new_size, bool clear ) = 0;
-
-        // free raw memory
-        virtual void _free ( void * ptr, const bytes_t & size ) = 0;
-
-        // create MemMgr reference using friend status
-        MemMgr make_mmgr_ref ( Refcount * obj, caps_t caps );
-
-        // create Mem reference using friend status
-        static Mem make_mem_ref ( Refcount * obj, MemoryItf * itf, caps_t caps );
-
-        friend class Memory;
-    };
-
-
-    /*------------------------------------------------------------------
-     * MemMgr
-     *  memory manager reference
-     */
-    class MemMgr : public Ref < MemMgrItf >
-    {
-    public:
-
-        // allocate memory 
-        Mem alloc ( const bytes_t & size, bool clear ) const;
-
-        // make a block of constant memory
-        Mem make_const ( const void * ptr, const bytes_t & size ) const;
-
-        // C++
-        MemMgr ();
-        MemMgr ( const MemMgr & r );
-        void operator = ( const MemMgr & r );
-        MemMgr ( const MemMgr & r, caps_t reduce );
-
-    private:
-
-        // support for "new" and "delete" operators
-        void * _new ( size_t bytes ) const;
-        void _delete ( void * ptr ) const;
-
-        // initialization by memmgr_t
-        MemMgr ( Refcount * obj, MemMgrItf * itf, caps_t caps );
-
-        friend interface MemMgrItf;
-        friend class Refcount;
-    };
-
-}
-
-#endif // _hpp_vdb3_kfc_memmgr_
diff --git a/vdb3/itf/kfc/memory.hpp b/vdb3/itf/kfc/memory.hpp
deleted file mode 100644
index e1a6760..0000000
--- a/vdb3/itf/kfc/memory.hpp
+++ /dev/null
@@ -1,149 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_memory_
-#define _hpp_vdb3_kfc_memory_
-
-#ifndef _hpp_vdb3_kfc_refcount_
-#include <kfc/refcount.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_ref_
-#include <kfc/ref.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards
-     */
-    interface MemMgrItf;
-    struct CopyUntilRslt;
-
-
-    /*------------------------------------------------------------------
-     * MemoryItf
-     *  an interface representing a block of storage
-     */
-    interface MemoryItf : public Refcount
-    {
-
-        // change the size of the memory allocation
-        virtual void resize ( const bytes_t & new_size, bool clear ) = 0;
-
-    protected:
-
-        // TEMPORARY - this allows us to access mapped memory
-        // it will not necessarily work for all memory types,
-        // and specifically may require having Mem work with
-        // offsets and sizes rather than pointers.
-        virtual void * get_mapped_memory ( bytes_t * size ) const = 0;
-
-        MemMgrItf * get_mmgr () const;
-
-        static void * cast ( Refcount * obj );
-
-        friend class Mem;
-    };
-
-
-    /*------------------------------------------------------------------
-     * Mem
-     *  an object representing a range of address space
-     */
-    class Mem : public Ref < MemoryItf >
-    {
-    public:
-
-        // size of allocation
-        bytes_t size () const;
-
-        // search for a byte
-        index_t find_first ( U8 byte ) const;
-        index_t find_first ( U8 byte, index_t offset ) const;
-        index_t find_first ( U8 byte, index_t offset, const bytes_t & size ) const;
-
-        // return a subrange of memory
-        Mem subrange ( index_t offset ) const;
-        Mem subrange ( index_t offset, const bytes_t & size ) const;
-
-        // alter memory size
-        void resize ( const bytes_t & size, bool clear );
-
-        // transfer data between memory ranges
-        bytes_t copy ( const bytes_t & amount, index_t dst_offset,
-            const Mem & src, index_t src_offset );
-        CopyUntilRslt copy_until ( const bytes_t & amount, U8 stop_byte,
-            index_t dst_offset, const Mem & src, index_t src_offset );
-
-        // fill memory with repeats of single byte
-        bytes_t fill ( count_t repeat, index_t offset, U8 byte );
-
-        // comparison
-        bool operator == ( const Mem & m ) const;
-        bool operator != ( const Mem & m ) const;
-
-        // C++
-        Mem ();
-        ~ Mem ();
-        Mem ( const Mem & r );
-        void operator = ( const Mem & r );
-        Mem ( const Mem & r, caps_t reduce );
-
-        // dynamic
-        Mem ( const OpaqueRef & r );
-
-    private:
-
-        // factory
-        Mem ( Refcount * obj, MemoryItf * itf, caps_t caps );
-#if 0
-        Mem ( const void * ptr, const bytes_t & size );
-#endif
-        void * ptr;
-        bytes_t bytes;
-
-        friend interface MemMgrItf;
-
-        friend class ConstString;
-        friend class OpaquePtr;
-        friend class OpaqueArray;
-    };
-
-    struct CopyUntilRslt
-    {
-        bytes_t num_copied;
-        bool stop_byte_found;
-
-        CopyUntilRslt () {}
-        CopyUntilRslt ( const bytes_t & b, bool f )
-            : num_copied ( b ), stop_byte_found ( f ) {}
-    };
-
-}
-
-#endif // _hpp_vdb3_kfc_memory_
diff --git a/vdb3/itf/kfc/ptr.hpp b/vdb3/itf/kfc/ptr.hpp
deleted file mode 100644
index 70f6338..0000000
--- a/vdb3/itf/kfc/ptr.hpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_ptr_
-#define _hpp_vdb3_kfc_ptr_
-
-#ifndef _hpp_vdb3_kfc_memory_
-#include <kfc/memory.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_except_
-#include <kfc/except.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * exceptions
-     */
-    XC_DECLARE ( xc_ptr_space_err, logic_err );
-    XC_DECLARE ( xc_ptr_size_err, xc_elem_size_err );
-
-
-    /*------------------------------------------------------------------
-     * OpaquePtr
-     *  type-opaque pointer
-     *  does all the actual work
-     */
-    class OpaquePtr
-    {
-    protected:
-
-        // implement read or r/w access to object
-        void * access ( const bytes_t & elem_size );
-        const void * access ( const bytes_t & elem_size ) const;
-        void * access ( index_t offset, const bytes_t & elem_size );
-        const void * access ( index_t offset, const bytes_t & elem_size ) const;
-
-        // increment and decrement
-        void increment ( index_t offset );
-        void decrement ( index_t offset );
-
-        // arithmetic - defined for two pointers on same mem
-        index_t difference ( const OpaquePtr & p, const bytes_t & elem_size ) const;
-
-        // comparison
-        bool equal ( const OpaquePtr & p ) const;
-        bool above ( const OpaquePtr & p ) const;
-        bool below ( const OpaquePtr & p ) const;
-
-        // assignment
-        void assign ( const OpaquePtr & p );
-
-        // construct from raw memory and element size
-        OpaquePtr ( Mem & m, const bytes_t & elem_size );
-        OpaquePtr ( const Mem & m, const bytes_t & elem_size );
-
-        // C++
-        OpaquePtr ( const OpaquePtr & p );
-        OpaquePtr ( const OpaquePtr & p, caps_t reduce );
-        ~ OpaquePtr ();
-
-    private:
-
-        Mem m;
-        index_t adj;
-    };
-
-
-    /*------------------------------------------------------------------
-     * Ptr < T >
-     *  a typed pointer
-     *  obtains all of its actual behavior from OpaquePtr
-     */
-    template < class T >
-    class Ptr : OpaquePtr
-    {
-    public:
-
-        // access
-        T & operator * ()
-        { return * ( T * ) access ( sizeof ( T ) ); }
-        const T & operator * () const
-        { return * ( const T * ) access ( sizeof ( T ) ); }
-        T & operator [] ( index_t idx )
-        { return * ( T * ) access ( idx * sizeof ( T ), sizeof ( T ) ); }
-        const T & operator [] ( index_t idx ) const
-        { return * ( const T * ) access ( idx * sizeof ( T ), sizeof ( T ) ); }
-
-        // increment/decrement - NOT returning ref, no postfix
-        void operator ++ ()
-        { increment ( sizeof ( T ) ); }
-        void operator -- ()
-        { decrement ( sizeof ( T ) ); }
-
-        // arithmetic - again not returning ref
-        void operator += ( index_t offset )
-        { increment ( offset * sizeof ( T ) ); }
-        void operator -= ( index_t offset )
-        { decrement ( offset * sizeof ( T ) ); }
-
-        // more arithmetic
-        Ptr < T > operator + ( index_t offset ) const
-        {
-            Ptr < T > p ( * this );
-            p += offset;
-            return p;
-        }
-        Ptr < T > operator - ( index_t offset ) const
-        {
-            Ptr < T > p ( * this );
-            p -= offset;
-            return p;
-        }
-
-        // difference - defined for two pointers on same mem
-        index_t operator - ( const Ptr < T > & p ) const
-        { return difference ( p, sizeof ( T ) ); }
-
-        // equality and relational operators
-        bool operator == ( const Ptr < T > & p ) const
-        { return equal ( p ); }
-        bool operator != ( const Ptr < T > & p ) const
-        { return ! equal ( p ); }
-        bool operator <= ( const Ptr < T > & p ) const
-        { return ! above ( p ); }
-        bool operator >= ( const Ptr < T > & p ) const
-        { return ! below ( p ); }
-        bool operator < ( const Ptr < T > & p ) const
-        { return below ( p ); }
-        bool operator > ( const Ptr < T > & p ) const
-        { return above ( p ); }
-
-        // C++
-        Ptr ( const Ptr < T > & p )
-            : OpaquePtr ( p ) {}
-        void operator = ( const Ptr < T > & p )
-            { OpaquePtr :: assign ( p ); }
-        Ptr ( const Ptr < T > & p, caps_t reduce )
-            : OpaquePtr ( p, reduce ) {}
-
-        // creation from a memory block
-        Ptr ( Mem & m )
-            : OpaquePtr ( m, sizeof ( T ) ) {}
-        Ptr ( const Mem & m )
-            : OpaquePtr ( m, sizeof ( T ) ) {}
-    };
-}
-
-#endif // _hpp_vdb3_kfc_ptr_
diff --git a/vdb3/itf/kfc/ref.hpp b/vdb3/itf/kfc/ref.hpp
deleted file mode 100644
index 744e4b7..0000000
--- a/vdb3/itf/kfc/ref.hpp
+++ /dev/null
@@ -1,155 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_ref_
-#define _hpp_vdb3_kfc_ref_
-
-#ifndef _hpp_vdb3_kfc_defs_
-#include <kfc/defs.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards
-     */
-    class Refcount;
-
-
-    /*------------------------------------------------------------------
-     * OpaqueRef
-     *  type-opaque reference
-     *  does all the actual work
-     */
-    class OpaqueRef
-    {
-    protected:
-
-        // ensure at least the required caps
-        // throws an exception otherwise
-        void test_caps ( caps_t required ) const;
-
-        // dynamic casting support
-        static void * cast ( const OpaqueRef & from,
-            void * ( * cast_func ) ( Refcount * obj ) );
-
-        // throws an exception describing the cast
-        static void bad_cast ( const OpaqueRef & from, const char * func, U32 lineno );
-
-        // create a null reference
-        // can only be repaired by assignment
-        OpaqueRef ();
-
-        // release the object
-        ~ OpaqueRef ();
-
-        // standard initialization and assignment
-        OpaqueRef ( const OpaqueRef & r );
-        void operator = ( const OpaqueRef & r );
-
-        // reduced capability initialization
-        OpaqueRef ( const OpaqueRef & r, caps_t reduce );
-        
-        // factory initialization
-        OpaqueRef ( Refcount * obj, caps_t caps );
-
-    private:
-
-        // the object is reference-counted
-        Refcount * obj;
-
-        // we store object capabilities
-        caps_t caps;
-
-    };
-
-
-    /*------------------------------------------------------------------
-     * Ref < T >
-     *  a typed reference
-     *  obtains all of its actual behavior from OpaqueRef
-     */
-    template < class T >
-    class Ref : public OpaqueRef
-    {
-    public:
-
-        // test for null
-        bool null_ref () const
-        { return itf == 0; }
-        bool operator ! () const
-        { return itf == 0; }
-
-    protected:
-
-        T * get_itf ( caps_t required ) const
-        {
-            test_caps ( required );
-            return itf;
-        }
-
-        Ref ()
-            : itf ( 0 ) {}
-        ~ Ref ()
-        { itf = 0; }
-
-        Ref ( const Ref < T > & r )
-            : OpaqueRef ( r )
-            , itf ( r . itf ) {}
-        Ref ( const Ref < T > & r, caps_t reduce )
-            : OpaqueRef ( r, reduce )
-            , itf ( r . itf ) {}
-        Ref ( T * obj, caps_t caps )
-            : OpaqueRef ( obj, caps )
-            , itf ( obj ) {}
-        Ref ( Refcount * obj, T * _itf, caps_t caps )
-            : OpaqueRef ( obj, caps )
-            , itf ( _itf ) {}
-
-        void operator = ( const Ref < T > & r )
-        {
-            OpaqueRef :: operator = ( r );
-            itf = r . itf;
-        }
-
-        // dynamic casting
-        Ref ( const OpaqueRef & r, void * ( * cast_func ) ( Refcount * obj ) )
-            : OpaqueRef ( r )
-            , itf ( ( T * ) OpaqueRef :: cast ( r, cast_func ) )
-        {
-            if ( itf == 0 )
-                OpaqueRef :: bad_cast ( r, __PRETTY_FUNCTION__, __LINE__ );
-        }
-
-    private:
-
-        T * itf;
-    };
-
-}
-
-#endif // _hpp_vdb3_kfc_ref_
diff --git a/vdb3/itf/kfc/refcount.hpp b/vdb3/itf/kfc/refcount.hpp
deleted file mode 100644
index c04bc65..0000000
--- a/vdb3/itf/kfc/refcount.hpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_refcount_
-#define _hpp_vdb3_kfc_refcount_
-
-#ifndef _hpp_vdb3_kfc_atomic_
-#include <kfc/atomic.hpp>
-#endif
-
-#include <new>
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards
-     */
-    interface MemMgrItf;
-
-
-    /*------------------------------------------------------------------
-     * Refcount
-     *  base for reference-counted objects
-     */
-    class Refcount
-    {
-    public:
-
-        // interface to current MemMgr
-        void * operator new ( std :: size_t bytes );
-
-        // return the count at any given moment
-        // if the object can be shared between threads,
-        // only a count of 1 is meaningful
-        count_t getCount () const
-        { return count_t ( ( U64 ) count ); }
-
-    protected:
-
-        // interface to embedded MemMgr
-        void operator delete ( void * ptr );
-
-        Refcount ();
-        virtual ~ Refcount ();
-
-    private:
-
-        // reference count manipulation
-        // null-safe
-        Refcount * duplicate ();
-        void release ();
-
-        // memory manager that made this object
-        MemMgrItf * mmgr;
-
-        // object size
-        size_t obj_size;
-
-        // reference count
-        atomic_t < U64 > count;
-
-        friend class PrimordMemMgr;
-        friend class OpaqueRef;
-        friend interface MemoryItf;
-        friend interface MemMgrItf;
-    };
-    
-}
-
-#endif // _hpp_vdb3_kfc_refcount_
diff --git a/vdb3/itf/kfc/rsrc.hpp b/vdb3/itf/kfc/rsrc.hpp
deleted file mode 100644
index 8396378..0000000
--- a/vdb3/itf/kfc/rsrc.hpp
+++ /dev/null
@@ -1,150 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_rsrc_
-#define _hpp_vdb3_kfc_rsrc_
-
-#ifndef _hpp_vdb3_kfc_memmgr_
-#include <kfc/memmgr.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_timemgr_
-#include <kfc/timemgr.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_fdmgr_
-#include <kfc/fdmgr.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_log_
-#include <kfc/log.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_stream_
-#include <kfc/stream.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards and externs
-     */
-
-    class Rsrc;
-    extern __thread Rsrc const * rsrc;
-
-
-    /*------------------------------------------------------------------
-     * rcaps_t
-     *  resource manager capabilities
-     */
-    const rcaps_t RCAP_MMGR    = ( 1 <<  0 );
-    const rcaps_t RCAP_TMMGR   = ( 1 <<  1 );
-    const rcaps_t RCAP_FDMGR   = ( 1 <<  2 );
-    const rcaps_t RCAP_LOG     = ( 1 <<  3 );
-    const rcaps_t RCAP_ERR     = ( 1 <<  4 );
-    const rcaps_t RCAP_ALL     = ( 1 <<  5 ) - 1;
-
-
-    /*------------------------------------------------------------------
-     * RsrcBase
-     *  implements a destructor
-     */
-    class RsrcBase
-    {
-    public:
-
-        ~ RsrcBase ();
-    };
-
-
-    /*------------------------------------------------------------------
-     * Rsrc
-     *  block of resource manager references
-     */
-    class Rsrc : public RsrcBase
-    {
-    public:
-
-        /* RESOURCE MANAGERS
-         */
-
-        // memory manager is required for nearly everything
-        MemMgr mmgr;
-
-        // time manager is fundamental
-        TimeMgr tmmgr;
-
-        // file descriptors
-        FDMgr fdmgr;
-
-
-        /* ENVIRONMENT
-         */
-
-        // logging formatter
-        Log log;
-
-        // streams
-        Stream err;
-
-        /* C++
-         */
-
-        // clone current resources with potential reduction
-        Rsrc ( rcaps_t mgrs );
-
-        // cloning is allowed at any time
-        Rsrc ( const Rsrc & rsrc );
-        void operator = ( const Rsrc & rsrc );
-
-        ~ Rsrc ();
-
-    protected:
-
-        // one-shot
-        // allowed once per process
-        Rsrc ( const MemMgr & pmmgr, const char * ident );
-
-    };
-
-
-    /*------------------------------------------------------------------
-     * TopRsrc
-     *  block of resource manager references
-     */
-    class TopRsrc : public Rsrc
-    {
-    public:
-
-        // create and stack process resources
-        TopRsrc ( const char * ident );
-
-    };
-}
-
-#endif // _hpp_vdb3_kfc_rsrc_
diff --git a/vdb3/itf/kfc/stream.hpp b/vdb3/itf/kfc/stream.hpp
deleted file mode 100644
index 58d36a1..0000000
--- a/vdb3/itf/kfc/stream.hpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_stream_
-#define _hpp_vdb3_kfc_stream_
-
-#ifndef _hpp_vdb3_kfc_ref_
-#include <kfc/ref.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_except_
-#include <kfc/except.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards
-     */
-    class Mem;
-    class Stream;
-    class Refcount;
-
-
-    /*------------------------------------------------------------------
-     * exceptions
-     */
-    XC_DECLARE ( xc_transfer_incomplete_err, runtime_err );
-
-
-    /*------------------------------------------------------------------
-     * StreamItf
-     *  an interface representing a stream of bytes ( bits? )
-     */
-    interface StreamItf
-    {
-
-        // traditional writing operation
-        virtual bytes_t read ( const bytes_t & amount,
-            Mem & dst, const bytes_t & dst_offset );
-        virtual bytes_t write ( const bytes_t & amount,
-            const Mem & src, const bytes_t & src_offset );
-
-        // indicate the preferred chunk size
-        virtual bytes_t get_mtu () const = 0;
-
-    protected:
-
-        Stream make_ref ( Refcount * obj, caps_t caps );
-
-    private:
-
-        static void * cast ( Refcount * obj );
-
-        friend class Stream;
-    };
-
-
-    /*------------------------------------------------------------------
-     * Stream
-     *  an object representing a stream of bytes ( bits? )
-     */
-    class Stream : public Ref < StreamItf >
-    {
-    public:
-
-        // copy from source
-        // return the number of bytes actually copied
-        bytes_t copy ( const Stream & src ) const;
-        bytes_t copy ( const bytes_t & amount,
-            const Stream & src ) const;
-        bytes_t copy_all ( const Stream & src ) const;
-        bytes_t copy_all ( const bytes_t & amount,
-            const Stream & src ) const;
-
-        // read data into a memory buffer
-        bytes_t read ( Mem & dst, index_t dst_offset = 0 ) const;
-        bytes_t read ( const bytes_t & amount,
-            Mem & dst, index_t dst_offset ) const;
-        bytes_t read_all ( Mem & dst, index_t dst_offset = 0 ) const;
-        bytes_t read_all ( const bytes_t & amount,
-            Mem & dst, index_t dst_offset ) const;
-
-        // write data from memory buffer
-        bytes_t write ( const Mem & src, index_t src_offset = 0 ) const;
-        bytes_t write ( const bytes_t & amount,
-            const Mem & src, index_t src_offset ) const;
-        bytes_t write_all ( const Mem & src, index_t src_offset = 0 ) const;
-        bytes_t write_all ( const bytes_t & amount,
-            const Mem & src, index_t src_offset ) const;
-
-        // C++
-        Stream ();
-        Stream ( const Stream & r );
-        void operator = ( const Stream & r );
-        Stream ( const Stream & r, caps_t reduce );
-
-        // dynamic
-        Stream ( const OpaqueRef & r );
-
-    private:
-
-        // factory
-        Stream ( Refcount * obj, StreamItf * itf, caps_t caps );
-
-        friend interface StreamItf;
-    };
-
-}
-
-#endif // _hpp_vdb3_kfc_stream_
diff --git a/vdb3/itf/kfc/string.hpp b/vdb3/itf/kfc/string.hpp
deleted file mode 100644
index ef108ff..0000000
--- a/vdb3/itf/kfc/string.hpp
+++ /dev/null
@@ -1,252 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_string_
-#define _hpp_vdb3_kfc_string_
-
-#ifndef _hpp_vdb3_kfc_memory_
-#include <kfc/memory.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards
-     */
-    class StreamBuffer;
-    class StringPair;
-    class StringBuffer;
-
-
-    /*------------------------------------------------------------------
-     * String
-     *  an immutable string object
-     */
-    class String
-    {
-    public:
-
-        // length in characters
-        count_t length () const
-        { return len; }
-
-        // size in bytes
-        bytes_t size () const
-        { return mem . size (); }
-
-        // access underlying mem
-        const Mem & to_mem () const
-        { return mem; }
-
-        // search for a character
-        index_t find_first ( UTF32 ch ) const;
-        index_t find_first ( UTF32 ch, index_t offset ) const;
-        index_t find_first ( UTF32 ch, index_t offset, count_t len ) const;
-
-        // create substring
-        String substr ( index_t offset ) const;
-        String substr ( index_t offset, count_t length ) const;
-
-        // split string at separator point
-        // removes separator if width is given
-        StringPair split ( index_t offset ) const;
-        StringPair split ( index_t offset, count_t sep_width ) const;
-
-        // convert to upper-case
-        String toupper () const;
-
-        // trim white-space at both ends
-        String trim () const;
-
-        // comparison
-        bool operator == ( const String & s ) const;
-        bool operator != ( const String & s ) const;
-
-        // C++
-        String ();
-        String ( const String & s );
-        void operator = ( const String & s );
-        String ( const String & s, caps_t reduce );
-        ~ String ();
-
-    protected:
-
-        // create from ConstString or StringBuffer
-        String ( const Mem & m, const bytes_t & ascii_size, count_t len );
-
-    private:
-
-        // the string memory is stored here
-        Mem mem;
-
-        // the number of bytes containing ascii-only characters
-        // when ascii_size == size (), string is 100% ascii
-        bytes_t ascii_size;
-
-        // the number of characters in string
-        // when ascii_size == len, string is 100% ascii
-        count_t len;
-
-        friend class StringBuffer;
-        friend class NULTermString;
-    };
-
-
-    /*------------------------------------------------------------------
-     * StringPair
-     */
-    struct StringPair
-    {
-        String left, right;
-
-        StringPair () {}
-        StringPair ( const String & l, const String r )
-            : left ( l ), right ( r ) {}
-    };
-
-
-    /*------------------------------------------------------------------
-     * ConstString
-     *  create a String from constant data
-     */
-    class ConstString : public String
-    {
-    public:
-
-        ConstString ( const char * text, size_t bytes );
-    };
-
-#define CONST_STRING( str )                      \
-    vdb3 :: ConstString ( str, sizeof str - 1 )
-
-
-    /*------------------------------------------------------------------
-     * NULTermString
-     *  create a string that is NUL-terminated,
-     *  and sports a cast to const char *
-     *  for use with native OS
-     */
-    class NULTermString : public String
-    {
-    public:
-
-        // supports nasty cast to NUL-terminated string
-        operator const char * () const;
-
-        NULTermString ( const String & str );
-        void operator = ( const String & str );
-    };
-
-
-    /*------------------------------------------------------------------
-     * StringBuffer
-     *  an editible string object
-     */
-    class StringBuffer
-    {
-    public:
-
-        count_t length () const
-        { return len; }
-
-        bytes_t size () const
-        { return bytes; }
-
-        bytes_t capacity () const
-        { return buffer . size (); }
-
-        String to_str () const;
-
-        // forward search
-        // returns < 0 if not found
-        // returns 0..length()-1 if found
-        index_t find_first ( UTF32 ch ) const;
-        index_t find_first ( UTF32 ch, index_t starting_pos ) const;
-
-        // replace existing contents with new value
-        StringBuffer & assign ( const String & s );
-        StringBuffer & assign ( const StringBuffer & s );
-        StringBuffer & assign ( const char * fmt, ... );
-        StringBuffer & vassign ( const char * fmt, va_list args );
-
-        // append text to buffer
-        StringBuffer & append ( const String & s );
-        StringBuffer & append ( const StringBuffer & s );
-        StringBuffer & append ( const char * fmt, ... );
-        StringBuffer & vappend ( const char * fmt, va_list args );
-
-        // append repeated character
-        StringBuffer & append ( UTF32 ch );
-        StringBuffer & append ( UTF32 ch, count_t repeat );
-
-        // contents from a buffer
-        bool assign_until ( const bytes_t & limit, UTF32 stop_ch, StreamBuffer & src );
-        bool append_until ( const bytes_t & limit, UTF32 stop_ch, StreamBuffer & src );
-
-        // truncate to empty content
-        void reset ();
-
-        // trim white-space at both ends
-        void trim ();
-
-        // trim end-of-line, if any
-        // returns true if found ( and therefore trimmed )
-        bool trim_eoln ();
-
-        // convert to upper case
-        void toupper ();
-
-        // operators
-        StringBuffer & operator  = ( const String & s )        { return assign ( s ); }
-        StringBuffer & operator  = ( const StringBuffer & s ) { return assign ( s ); }
-        StringBuffer & operator += ( const String & s )        { return append ( s ); }
-        StringBuffer & operator += ( const StringBuffer & s ) { return append ( s ); }
-
-        StringBuffer ();
-        ~ StringBuffer ();
-
-        StringBuffer ( const Mem & buffer );
-
-        StringBuffer ( const char * fmt, ... );
-        StringBuffer ( const char * fmt, va_list args );
-
-    private:
-
-        size_t fappend_simple ( const char * fmt, va_list args, size_t idx );
-        size_t fappend_long ( const char * fmt, va_list args, size_t idx );
-        void resize ( const bytes_t & size );
-
-        StringBuffer ( const StringBuffer & s );
-
-        Mem buffer;
-        bytes_t bytes;
-        bytes_t ascii_size;
-        count_t len;
-    };
-}
-
-#endif // _hpp_vdb3_kfc_str_
diff --git a/vdb3/itf/kfc/syserr.hpp b/vdb3/itf/kfc/syserr.hpp
deleted file mode 100644
index 47d704a..0000000
--- a/vdb3/itf/kfc/syserr.hpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_syserr_
-#define _hpp_vdb3_kfc_syserr_
-
-#ifndef _hpp_vdb3_kfc_string_
-#include <kfc/string.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards
-     */
-
-
-    /*------------------------------------------------------------------
-     * functions
-     */
-
-    // returns a system error string
-    String SysErr( int errno );
-
-    // throws a runtime error
-    void ThrowOSErr( U32 lineno, const String & func_name, int err_code )
-        __attribute__ ( ( noreturn ) );
-
-#define THROW_OSERR( func_name, err_code ) \
-    ThrowOSErr( __LINE__, CONST_STRING ( # func_name ), err_code )
-}
-
-#endif // _hpp_vdb3_kfc_syserr_
diff --git a/vdb3/itf/kfc/task-impl.hpp b/vdb3/itf/kfc/task-impl.hpp
deleted file mode 100644
index 5adb01c..0000000
--- a/vdb3/itf/kfc/task-impl.hpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_task_impl_
-#define _hpp_vdb3_kfc_task_impl_
-
-#ifndef _hpp_vdb3_kfc_except_
-#include <kfc/except.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_refcount_
-#include <kfc/refcount.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_task_
-#include <kfc/task.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_rsrc_
-#include <kfc/rsrc.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_atomic_
-#include <kfc/atomic.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards and externs
-     */
-
-
-    /*------------------------------------------------------------------
-     * exceptions
-     */
-
-
-    /*------------------------------------------------------------------
-     * TaskImpl
-     */
-    class TaskImpl : public Refcount
-        , implements TaskItf
-    {
-    public:
-
-        // gives task time to run on a thread
-        // returns true if task is or has completed
-        virtual bool run ();
-
-        // ask task to cooperatively suspend its execution
-        virtual void suspend ();
-
-        // checkpointing and restoration
-        // TBD - these have to be given an object for saving state
-        virtual void checkpoint ();
-        virtual void restart ();
-
-        ~ TaskImpl ();
-
-    protected:
-
-        // called to perform any initialization
-        // in preparation for first run
-        // returns true if successful
-        virtual bool prepare ();
-
-        // run the task until suspended or complete
-        // return true upon completion
-        virtual bool execute () = 0;
-
-        // resume the task until suspended again or complete
-        // return true upon completion
-        virtual bool resume ();
-
-        // checkpointing operations
-        virtual void save ();
-        virtual void restore ();
-
-
-        // construction
-        TaskImpl ();
-        TaskImpl ( rcaps_t caps );
-
-        // resetting resource managers
-        void set_rsrc ( const Rsrc & rsrc );
-
-        // allow task to set state to complete
-        void set_complete ();
-
-    private:
-
-        enum task_state_t
-        {
-            ts_unprepared,
-            ts_updating,
-            ts_preparing,
-            ts_presuspend,
-            ts_initial,
-            ts_ready,
-            ts_suspended,
-            ts_running,
-            ts_suspending,
-            ts_complete,
-
-            // force enum to be 32 bits
-            ts_invalid = 0xFFFFFFFF
-        };
-
-        Rsrc task_rsrc;
-        atomic_t < task_state_t > state;
-    };
-}
-
-#endif // _hpp_vdb3_kfc_task_impl_
diff --git a/vdb3/itf/kfc/task.hpp b/vdb3/itf/kfc/task.hpp
deleted file mode 100644
index c82db3d..0000000
--- a/vdb3/itf/kfc/task.hpp
+++ /dev/null
@@ -1,124 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_task_
-#define _hpp_vdb3_kfc_task_
-
-#ifndef _hpp_vdb3_kfc_exceot_
-#include <kfc/except.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_ref_
-#include <kfc/ref.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards and externs
-     */
-    class Task;
-    class Refcount;
-
-
-    /*------------------------------------------------------------------
-     * exceptions
-     */
-    XC_DECLARE ( xc_task_busy_err, runtime_err );
-    XC_DECLARE ( xc_task_invalid_err, xc_internal_err );
-
-
-    /*------------------------------------------------------------------
-     * TaskItf
-     */
-    interface TaskItf
-    {
-
-        // gives task time to run on a thread
-        // returns true if task is or has completed
-        virtual bool run () = 0;
-
-        // ask task to cooperatively suspend its execution
-        virtual void suspend () = 0;
-
-        // checkpointing and restoration
-        // TBD - these have to be given an object for saving state
-        virtual void checkpoint () = 0;
-        virtual void restart () = 0;
-
-    protected:
-
-        // creating a Task object
-        Task make_ref ( Refcount * obj, caps_t caps );
-
-    private:
-
-        static void * cast ( Refcount * obj );
-
-        friend class Task;
-    };
-
-
-    /*------------------------------------------------------------------
-     * Task
-     */
-    class Task : Ref < TaskItf >
-    {
-    public:
-
-        // gives task time to run on a thread
-        // returns true if the task is or has completed
-        bool run ();
-
-        // ask task to cooperatively suspend its execution
-        void suspend ();
-
-        // checkpointing and restoration
-        // TBD - these have to be given an object for saving state
-        void checkpoint ();
-        void restart ();
-
-        // C++
-        Task ();
-        Task ( const Task & r );
-        void operator = ( const Task & r );
-        Task ( const Task & r, caps_t reduce );
-
-        // dynamic
-        Task ( const OpaqueRef & r );
-
-    private:
-
-        // construct a task reference
-        Task ( Refcount * obj, TaskItf * itf, caps_t caps );
-
-        friend class TaskItf;
-
-    };
-}
-
-#endif // _hpp_vdb3_kfc_task_
diff --git a/vdb3/itf/kfc/time.hpp b/vdb3/itf/kfc/time.hpp
deleted file mode 100644
index 5adecf9..0000000
--- a/vdb3/itf/kfc/time.hpp
+++ /dev/null
@@ -1,299 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_time_
-#define _hpp_vdb3_kfc_time_
-
-#ifndef _hpp_vdb3_kfc_atomic_
-#include <kfc/atomic.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards
-     */
-    class nS_t;
-    class uS_t;
-    class mS_t;
-    class seconds_t;
-
-
-    /*------------------------------------------------------------------
-     * tm_base_t
-     *  basic inline operations for time quantities
-     */
-    template < class T >
-    class tm_base_t
-    {
-    public:
-
-        // conversion to raw number
-        operator I64 () const
-        { return val; }
-
-        // arithmetic
-        T operator + ( const T & tm ) const
-        { return T ( val + tm . val ); }
-        T operator - ( const T & tm ) const
-        { return T ( val - tm . val ); }
-        T operator * ( I64 m ) const
-        { return T ( val * m ); }
-        T operator / ( I64 d ) const;
-        T operator % ( I64 d ) const;
-
-        // updating arithmetic
-        T & operator += ( const T & tm )
-        { val += tm . val; return * ( T * ) this; }
-        T & operator -= ( const T & tm )
-        { val -= tm . val; return * ( T * ) this; }
-        T & operator *= ( I64 m )
-        { val *= m; return * ( T * ) this; }
-        T & operator /= ( I64 d );
-        T & operator %= ( I64 d );
-
-        // equality and relational operators
-        bool operator == ( const T & tm ) const
-        { return val == tm . val; }
-        bool operator != ( const T & tm ) const
-        { return val != tm . val; }
-        bool operator <= ( const T & tm ) const
-        { return val <= tm . val; }
-        bool operator >= ( const T & tm ) const
-        { return val >= tm . val; }
-        bool operator < ( const T & tm ) const
-        { return val < tm . val; }
-        bool operator > ( const T & tm ) const
-        { return val > tm . val; }
-
-    protected:
-
-        // constructors
-        tm_base_t ( I64 v )
-            : val ( v ) {}
-
-        // for good measure
-        ~ tm_base_t ()
-        { val = 0; }
-
-        I64 val;
-        
-    };
-
-
-    /*------------------------------------------------------------------
-     * nS_t
-     *  represents nano-seconds
-     */
-    class nS_t : public tm_base_t < nS_t >
-    {
-    public:
-
-
-        // declare uninitialized
-        nS_t () : tm_base_t < nS_t > ( 0 ) {}
-
-        // create from raw integer
-        nS_t ( I64 tm ) : tm_base_t < nS_t > ( tm ) {}
-        void operator = ( I64 tm ) { val = tm; }
-
-        // create from another nS_t
-        nS_t ( const nS_t & tm ) : tm_base_t < nS_t > ( tm . val ) {}
-        void operator = ( const nS_t & tm ) { val = tm . val; }
-
-        // create from uS_t
-        nS_t ( const uS_t & tm );
-        void operator = ( const uS_t & tm );
-
-        // create from mS_t
-        nS_t ( const mS_t & tm );
-        void operator = ( const mS_t & tm );
-
-        // create from seconds
-        nS_t ( const seconds_t & tm );
-        void operator = ( const seconds_t & tm );
-    };
-
-
-    /*------------------------------------------------------------------
-     * uS_t
-     *  represents micro-seconds
-     */
-    class uS_t : public tm_base_t < uS_t >
-    {
-    public:
-
-
-        // declare uninitialized
-        uS_t () : tm_base_t < uS_t > ( 0 ) {}
-
-        // create from raw integer
-        uS_t ( I64 tm ) : tm_base_t < uS_t > ( tm ) {}
-        void operator = ( I64 tm ) { val = tm; }
-
-        // create from another uS_t
-        uS_t ( const uS_t & tm ) : tm_base_t < uS_t > ( tm . val ) {}
-        void operator = ( const uS_t & tm ) { val = tm . val; }
-
-        // create from nS_t
-        uS_t ( const nS_t & tm );
-        void operator = ( const nS_t & tm );
-
-        // create from mS_t
-        uS_t ( const mS_t & tm );
-        void operator = ( const mS_t & tm );
-
-        // create from seconds
-        uS_t ( const seconds_t & tm );
-        void operator = ( const seconds_t & tm );
-    };
-
-
-    /*------------------------------------------------------------------
-     * mS_t
-     *  represents milli-seconds
-     */
-    class mS_t : public tm_base_t < mS_t >
-    {
-    public:
-
-
-        // declare uninitialized
-        mS_t () : tm_base_t < mS_t > ( 0 ) {}
-
-        // create from raw integer
-        mS_t ( I64 tm ) : tm_base_t < mS_t > ( tm ) {}
-        void operator = ( I64 tm ) { val = tm; }
-
-        // create from another mS_t
-        mS_t ( const mS_t & tm ) : tm_base_t < mS_t > ( tm . val ) {}
-        void operator = ( const mS_t & tm ) { val = tm . val; }
-
-        // create from nS_t
-        mS_t ( const nS_t & tm );
-        void operator = ( const nS_t & tm );
-
-        // create from uS_t
-        mS_t ( const uS_t & tm );
-        void operator = ( const uS_t & tm );
-
-        // create from seconds
-        mS_t ( const seconds_t & tm );
-        void operator = ( const seconds_t & tm );
-    };
-
-
-    /*------------------------------------------------------------------
-     * seconds_t
-     *  represents whole seconds
-     */
-    class seconds_t : public tm_base_t < seconds_t >
-    {
-    public:
-
-
-        // declare uninitialized
-        seconds_t () : tm_base_t < seconds_t > ( 0 ) {}
-
-        // create from raw integer
-        seconds_t ( I64 tm ) : tm_base_t < seconds_t > ( tm ) {}
-        void operator = ( I64 tm ) { val = tm; }
-
-        // create from another seconds_t
-        seconds_t ( const seconds_t & tm ) : tm_base_t < seconds_t > ( tm . val ) {}
-        void operator = ( const seconds_t & tm ) { val = tm . val; }
-
-        // create from nS_t
-        seconds_t ( const nS_t & tm );
-        void operator = ( const nS_t & tm );
-
-        // create from uS_t
-        seconds_t ( const uS_t & tm );
-        void operator = ( const uS_t & tm );
-
-        // create from mS_t
-        seconds_t ( const mS_t & tm );
-        void operator = ( const mS_t & tm );
-    };
-
-
-    /*------------------------------------------------------------------
-     * timestamp_t
-     *  
-     */
-    class timestamp_t : public nS_t
-    {
-    public:
-
-        timestamp_t () {}
-        timestamp_t ( const timestamp_t & tm )
-            : nS_t ( tm ) {}
-        void operator = ( const timestamp_t & tm )
-        { nS_t :: operator = ( tm ); }
-
-    private:
-
-        timestamp_t ( const nS_t & tm ) : nS_t ( tm ) {}
-
-        friend interface TimeMgrItf;
-    };
-
-
-    /*------------------------------------------------------------------
-     * timeout_t
-     *  represents a time period in mS for triggering events
-     *  NB - this class has OS manifest dependencies
-     */
-    class timeout_t
-    {
-    public:
-
-        // constructor to capture timeout delay
-        timeout_t ( const nS_t & delay );
-
-        // public destructor
-        ~ timeout_t ();
-
-        // initialization and copy
-        timeout_t ( const timeout_t & tm );
-        void operator = ( const timeout_t & tm );
-
-    private:
-
-        // called to prepare "to" for POSIX
-        void prepare () const;
-
-        nS_t delay;
-#if UNIX
-        mutable timestamp_t to;
-        mutable atomic_t < U32 > prepared;
-#endif
-        friend interface TimeMgrItf;
-    };
-}
-
-#endif // _hpp_vdb3_kfc_time_
diff --git a/vdb3/itf/kfc/timemgr.hpp b/vdb3/itf/kfc/timemgr.hpp
deleted file mode 100644
index 2180923..0000000
--- a/vdb3/itf/kfc/timemgr.hpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_timemgr_
-#define _hpp_vdb3_kfc_timemgr_
-
-#ifndef _hpp_vdb3_kfc_ref_
-#include <kfc/ref.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards
-     */
-    class nS_t;
-    class TimeMgr;
-    class timeout_t;
-    class Refcount;
-    class timestamp_t;
-
-
-    /*------------------------------------------------------------------
-     * TimeMgrItf
-     *  time manager
-     */
-    interface TimeMgrItf
-    {
-
-        virtual timestamp_t cur_time () const = 0;
-        void prepare_timeout ( const timeout_t & tm ) const;
-
-    protected:
-
-        static timestamp_t make_timestamp ( const nS_t & nS );
-        TimeMgr make_tmmgr_ref ( Refcount * obj, caps_t caps );
-    };
-
-
-    /*------------------------------------------------------------------
-     * TimeMgr
-     *  time manager reference
-     */
-    class TimeMgr : public Ref < TimeMgrItf >
-    {
-    public:
-
-        // return the current time
-        timestamp_t cur_time () const;
-
-        // given a timeout, prepare it for use with OS
-        // under POSIX, this may convert a time delay to absolute time
-        void prepare_timeout ( const timeout_t & tm ) const;
-
-        // C++
-        TimeMgr ();
-        TimeMgr ( const TimeMgr & r );
-        void operator = ( const TimeMgr & r );
-        TimeMgr ( const TimeMgr & r, caps_t reduce );
-
-    private:
-
-        // factory
-        TimeMgr ( Refcount * obj, TimeMgrItf * itf, caps_t caps );
-
-        friend interface TimeMgrItf;
-    };
-}
-
-#endif // _hpp_vdb3_kfc_timemgr_
diff --git a/vdb3/itf/kfc/vers.hpp b/vdb3/itf/kfc/vers.hpp
deleted file mode 100644
index a10d420..0000000
--- a/vdb3/itf/kfc/vers.hpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_vers_
-#define _hpp_vdb3_kfc_vers_
-
-#ifndef _hpp_vdb3_kfc_defs_
-#include <kfc/defs.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards and externs
-     */
-
-
-    /*------------------------------------------------------------------
-     * vers_t
-     */
-    class vers_t
-    {
-    public:
-
-        U32 maj () const
-            { return ( U8 ) ( val >> 24 ); }
-
-        U32 min () const
-        { return ( U8 ) ( val >> 16 ); }
-
-        U32 rel () const
-        { return ( U8 ) ( val >> 8 ); }
-
-        U32 post () const
-        { return ( U8 ) ( val >> 0 ); }
-
-        U32 maj_min () const
-        { return ( U16 ) ( val >> 16 ); }
-
-        U32 maj_min_rel () const
-        { return ( val >> 8 ); }
-
-        U32 full () const
-        { return val; }
-
-        bool operator == ( const vers_t & v ) const
-        { return val == v . val; }
-        bool operator != ( const vers_t & v ) const
-        { return val != v . val; }
-        bool operator <  ( const vers_t & v ) const
-        { return val < v . val; }
-        bool operator <= ( const vers_t & v ) const
-        { return val <= v . val; }
-        bool operator >= ( const vers_t & v ) const
-        { return val >= v . val; }
-        bool operator >  ( const vers_t & v ) const
-        { return val > v . val; }
-
-        vers_t ();
-        vers_t ( U32 maj );
-        vers_t ( U32 maj, U32 min );
-        vers_t ( U32 maj, U32 min, U32 rel );
-        vers_t ( U32 maj, U32 min, U32 rel, U32 post );
-
-        vers_t ( const vers_t & vers )
-            : val ( vers . val ) {}
-        void operator = ( const vers_t & vers )
-            { val = vers . val; }
-
-    private:
-
-        U32 val;
-
-    };
-}
-
-#endif // _hpp_vdb3_kfc_rsrc_
diff --git a/vdb3/src/kfc/Makefile b/vdb3/src/kfc/Makefile
deleted file mode 100644
index 44b80b7..0000000
--- a/vdb3/src/kfc/Makefile
+++ /dev/null
@@ -1,88 +0,0 @@
-# ===========================================================================
-#
-#                            PUBLIC DOMAIN NOTICE
-#               National Center for Biotechnology Information
-#
-#  This software/database is a "United States Government Work" under the
-#  terms of the United States Copyright Act.  It was written as part of
-#  the author's official duties as a United States Government employee and
-#  thus cannot be copyrighted.  This software/database is freely available
-#  to the public for use. The National Library of Medicine and the U.S.
-#  Government have not placed any restriction on its use or reproduction.
-#
-#  Although all reasonable efforts have been taken to ensure the accuracy
-#  and reliability of the software and data, the NLM and the U.S.
-#  Government do not and cannot warrant the performance or results that
-#  may be obtained by using this software or data. The NLM and the U.S.
-#  Government disclaim all warranties, express or implied, including
-#  warranties of performance, merchantability or fitness for any particular
-#  purpose.
-#
-#  Please cite the author in any work or product based on this material.
-#
-# ===========================================================================
-
-
-default: std
-
-TOP ?= $(abspath ../../..)
-include $(TOP)/build/Makefile.config
-
-# repairs to Makefile.config
-INCDIRS = -I. -I$(TOP)/vdb3/itf
-
-OBJFILES = \
-	$(KFC_OBJ)
-
-INTLIBS = \
-	vdb3-kfc
-
-EXTLIBS =   \
-
-TARGETS =      \
-	$(INTLIBS) \
-	$(EXTLIBS)
-
-# kernel-like facilities
-KFC_SRC =    \
-	rsrc     \
-	pfdmgr   \
-	fdmgr    \
-	fd       \
-	stream   \
-	plogger  \
-	log      \
-	ptimemgr \
-	pmemmgr  \
-	syserr   \
-	string   \
-	timemgr  \
-	time     \
-	ptr      \
-	array    \
-	memmgr   \
-	memory   \
-	ref      \
-	refcount \
-	integer  \
-	except   \
-	callstk
-
-# object files
-KFC_OBJ = \
-	$(addprefix $(OBJDIR)/,$(addsuffix .$(LOBX),$(KFC_SRC)))
-
-all std: $(TARGETS)
-
-compile: $(OBJDIR) $(OBJFILES)
-
-clean:
-	rm -rf $(ILIBDIR)/$(LPFX)ngs-disp* $(OBJDIR)
-
-.PHONY: default all std $(TARGETS)
-
-vdb3-kfc: $(ILIBDIR) $(OBJDIR) $(ILIBDIR)/$(LPFX)vdb3-kfc.$(LIBX)
-
-# rule to produce the static library
-$(ILIBDIR)/$(LPFX)vdb3-kfc.$(LIBX): $(KFC_OBJ)
-	$(AR) $@ $^
diff --git a/vdb3/src/kfc/array.cpp b/vdb3/src/kfc/array.cpp
deleted file mode 100644
index 5fe2f52..0000000
--- a/vdb3/src/kfc/array.cpp
+++ /dev/null
@@ -1,152 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/array.hpp>
-#include <kfc/memmgr.hpp>
-#include <kfc/caps.hpp>
-#include <kfc/except.hpp>
-#include <kfc/callstk.hpp>
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * OpaqueArray
-     *  represents a container addressable by ordinal
-     */
-
-    count_t OpaqueArray :: length () const
-    {
-        return cnt;
-    }
-
-    bytes_t OpaqueArray :: size () const
-    {
-        return m . bytes;
-    }
-
-    void * OpaqueArray :: access ( index_t offset, const bytes_t & elem_size )
-    {
-        if ( offset < 0 || ( U64 ) offset + elem_size > m . bytes )
-        {
-            FUNC_ENTRY ();
-
-            bool okay = false;
-            if ( offset >= 0 )
-            {
-                // try to resize the storage
-            }
-
-            if ( ! okay )
-            {
-                THROW ( xc_bounds_err, "memory read/write access of %lu bytes at index %ld"
-                        , ( U64 ) elem_size
-                        , offset / elem_size
-                    );
-            }
-        }
-
-        return ( void* ) ( ( char* ) m . ptr + offset );
-    }
-
-    const void * OpaqueArray :: access ( index_t offset, const bytes_t & elem_size ) const
-    {
-        if ( offset < 0 || ( U64 ) offset + elem_size > m . bytes )
-        {
-            FUNC_ENTRY ();
-            THROW ( xc_bounds_err, "memory read access of %lu bytes at index %ld"
-                    , ( U64 ) elem_size
-                    , offset / elem_size
-                );
-        }
-
-        return ( const void* ) ( ( const char* ) m . ptr + offset );
-    }
-
-    void OpaqueArray :: assign ( const OpaqueArray & r )
-    {
-        FUNC_ENTRY ();
-        m = r . m;
-        cnt = r . cnt;
-    }
-
-    OpaqueArray :: OpaqueArray ()
-        : cnt ( 0 )
-    {
-    }
-
-    OpaqueArray :: OpaqueArray ( const OpaqueArray & r )
-        : m ( r . m )
-        , cnt ( r . cnt )
-    {
-    }
-
-    OpaqueArray :: OpaqueArray ( const OpaqueArray & r, caps_t reduce )
-        : m ( r . m )
-        , cnt ( r . cnt )
-    {
-    }
-
-    OpaqueArray :: ~ OpaqueArray ()
-    {
-        cnt = 0;
-    }
-
-    OpaqueArray :: OpaqueArray ( Mem & _m, const bytes_t & elem_size )
-        : m ( _m )
-        , cnt ( 0 )
-    {
-        FUNC_ENTRY ();
-        m . get_itf ( CAP_RDWR );
-
-        if ( elem_size == ( U64 ) 0 )
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        if ( elem_size != ( U64 ) 1 )
-        {
-            if ( ( U64 ) m . bytes % elem_size != ( U64 ) 0 )
-                CONST_THROW ( xc_elem_size_err, "memory block is not an integral multiple of array element size" );
-        }
-    }
-
-    OpaqueArray :: OpaqueArray ( const Mem & _m, const bytes_t & elem_size )
-        : m ( _m )
-        , cnt ( 0 )
-    {
-        FUNC_ENTRY ();
-        m . get_itf ( CAP_READ );
-
-        if ( elem_size == ( U64 ) 0 )
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        cnt = ( U64 ) _m . bytes;
-        if ( elem_size != ( U64 ) 1 )
-        {
-            if ( ( U64 ) m . bytes % elem_size != ( U64 ) 0 )
-                CONST_THROW ( xc_elem_size_err, "memory block is not an integral multiple of array element size" );
-            cnt /= ( U64 ) elem_size;
-        }
-    }
-
-}
diff --git a/vdb3/src/kfc/callstk.cpp b/vdb3/src/kfc/callstk.cpp
deleted file mode 100644
index a644462..0000000
--- a/vdb3/src/kfc/callstk.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/callstk.hpp>
-#include <kfc/except.hpp>
-#include <kfc/rsrc.hpp>
-
-#ifndef _hpp_vdb3_kfc_except_
-#define THROW( xc, fmt, ... ) \
-    throw fmt
-#define CONST_THROW( xc, msg ) \
-    throw msg
-#endif
-
-namespace vdb3
-{
-
-    __thread CallStk const * callstk;
-
-    CallStk :: CallStk ( const SrcLoc & sloc )
-        : caller ( callstk )
-        , depth ( 0 )
-        , src ( sloc )
-        , func ( "" )
-    {
-        if ( callstk != 0 )
-        {
-#ifdef _hpp_vdb3_kfc_rsrc_
-            assert ( rsrc != 0 );
-            FUNC_ENTRY ();
-#endif
-            CONST_THROW ( xc_program_state_violation, "not at top of call stack" );
-        }
-
-        callstk = this;
-    }
-}
diff --git a/vdb3/src/kfc/except.cpp b/vdb3/src/kfc/except.cpp
deleted file mode 100644
index 91d7c3e..0000000
--- a/vdb3/src/kfc/except.cpp
+++ /dev/null
@@ -1,222 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#define SRC_LOC_DEFINED
-#include <kfc/except.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/rsrc.hpp>
-#include <kfc/array.hpp>
-#include <kfc/ptr.hpp>
-
-#include <string.h>
-#include <ctype.h>
-
-namespace vdb3
-{
-    struct func_loc_t : SrcLoc
-    {
-        const char * mod;
-        const char * file;
-        const char * ext;
-        const char * func;
-
-        void operator = ( const CallStk & stkfrm )
-        {
-            mod = stkfrm . src . mod;
-            file = stkfrm . src . file;
-            ext = stkfrm . src . ext;
-            func = ( const char * ) stkfrm . func;
-        }
-    };
-
-#ifdef _hpp_vdb3_kfc_string_
-    static
-    String extract_method_name ( const char * pretty_func )
-    {
-        U64 i;
-        for ( i = 0; pretty_func [ i ] != 0; ++ i )
-        {
-            int ch = pretty_func [ i ];
-            if ( isalpha ( ch ) || ch == '_' )
-            {
-                U64 start = i;
-                for ( ++ i; pretty_func [ i ] != 0; ++ i )
-                {
-                    ch = pretty_func [ i ];
-                    if ( ! isalnum ( ch ) && ch != '_' )
-                    {
-                        if ( ch != ':' || pretty_func [ i + 1 ] != ':' )
-                            break;
-                        if ( isdigit ( pretty_func [ i + 2 ] ) )
-                            break;
-                        ++ i;
-                    }
-                }
-
-                if ( ch == '(' )
-                    return ConstString ( & pretty_func [ start ], i - start );
-                if ( ch == 0 )
-                    -- i;
-            }
-        }
-        return ConstString ( pretty_func, i );
-    }
-
-    String exception :: where () const
-    {
-        if ( stk . size () == ( U64 ) 0 )
-            return CONST_STRING ( "<no-stack>" );
-
-        if ( rsrc == 0 )
-            return CONST_STRING ( "<no-mem>" );
-
-        const Array < func_loc_t > a = stk;
-        const func_loc_t & loc = a [ 0 ];
-
-        ConstString m ( loc . mod, strlen ( loc . mod ) );
-        ConstString f ( loc . file, strlen ( loc . file ) );
-        ConstString x ( loc . ext, strlen ( loc . ext ) );
-        String fn ( extract_method_name ( loc . func ) );
-        //const_str_t fn ( loc . func, strlen ( loc . func ) );
-
-        StringBuffer sb ( "%s/%s.%s:%u %s", & m, & f, & x, lineno, & fn );
-        return sb . to_str ();
-    }
-
-    String exception :: stack_trace () const
-    {
-        count_t depth = stk . size () / sizeof ( func_loc_t );
-
-        if ( stk . size () == ( U64 ) 0 )
-            return CONST_STRING ( "<no-stack>" );
-
-        if ( rsrc == 0 )
-            return CONST_STRING ( "<no-mem>" );
-
-        StringBuffer sb;
-        Array < const func_loc_t > a = stk;
-
-        for ( count_t i = 0; i < depth; ++ i )
-        {
-            const func_loc_t & loc = a [ i ];
-
-            ConstString m ( loc . mod, strlen ( loc . mod ) );
-            ConstString f ( loc . file, strlen ( loc . file ) );
-            ConstString x ( loc . ext, strlen ( loc . ext ) );
-            String fn ( extract_method_name ( loc . func ) );
-            //const_str_t fn ( loc . func, strlen ( loc . func ) );
-
-            if ( i == 0 )
-                sb . append ( "  %s/%s.%s:%u %s\n", & m, & f, & x, lineno, & fn );
-            else
-                sb . append ( "  %s/%s.%s %s\n", & m, & f, & x, & fn );
-        }
-
-        // this is optional...
-        sb . trim_eoln ();
-
-        return sb . to_str ();
-    }
-
-    String exception :: module () const
-    {
-        if ( stk . size () == ( U64 ) 0 )
-            return CONST_STRING ( "<no-stack>" );
-
-        const Array < func_loc_t > a = stk;
-        const char * text = a [ 0 ] . mod;
-
-        return ConstString ( text, strlen ( text ) );
-    }
-
-    String exception :: file () const
-    {
-        if ( stk . size () == ( U64 ) 0 )
-            return CONST_STRING ( "<no-stack>" );
-
-        const Array < func_loc_t > a = stk;
-        const char * text = a [ 0 ] . file;
-
-        return ConstString ( text, strlen ( text ) );
-    }
-
-    String exception :: ext () const
-    {
-        if ( stk . size () == ( U64 ) 0 )
-            return CONST_STRING ( "<no-stack>" );
-
-        const Array < func_loc_t > a = stk;
-        const char * text = a [ 0 ] . ext;
-
-        return ConstString ( text, strlen ( text ) );
-    }
-
-    String exception :: func () const
-    {
-        if ( stk . size () == ( U64 ) 0 )
-            return CONST_STRING ( "<no-stack>" );
-
-        const Array < func_loc_t > a = stk;
-        const char * text = a [ 0 ] . func;
-
-        return ConstString ( text, strlen ( text ) );
-    }
-#endif
-
-    exception :: ~ exception ()
-    {
-    }
-
-#ifndef _hpp_vdb3_kfc_string_
-    exception :: exception ( U32 line, const char * m )
-        : msg ( m )
-        , lineno ( line )
-    {
-    }
-#else
-    exception :: exception ( U32 line, const String & m )
-        : msg ( m )
-        , lineno ( line )
-    {
-        if ( rsrc != 0 && callstk != 0 )
-        {
-            size_t frm_bytes = callstk -> depth * sizeof ( func_loc_t );
-            if ( callstk -> depth != 0 ) try
-            {
-                Mem stk_tmp = rsrc -> mmgr . alloc ( frm_bytes, true );
-                Ptr < func_loc_t > p = stk_tmp;
-                for ( const CallStk * s = callstk; s -> depth != 0; ++ p, s = s -> caller )
-                    * p = * s;
-                stk = stk_tmp;
-            }
-            catch ( ... )
-            {
-            }
-        }
-    }
-#endif
-
-}
diff --git a/vdb3/src/kfc/fd.cpp b/vdb3/src/kfc/fd.cpp
deleted file mode 100644
index f9b3bf0..0000000
--- a/vdb3/src/kfc/fd.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/fd.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/rsrc.hpp>
-#include <kfc/caps.hpp>
-#include <kfc/except.hpp>
-#include <kfc/syserr.hpp>
-#include <kfc/array.hpp>
-
-#if UNIX
-#include <unistd.h>
-#include <stdlib.h>
-#include <errno.h>
-#else
-#error "unsupported target platform"
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * FileDescImpl
-     *  a Unix file-descriptor
-     */
-
-    // StreamItf
-    bytes_t FileDescImpl :: read ( const bytes_t & num_bytes,
-        Mem & dst, const bytes_t & start )
-    {
-        FUNC_ENTRY ();
-
-        // parameters have already been checked
-        assert ( start < dst . size () );
-        assert ( start + num_bytes <= dst . size () );
-
-        // interfacing with native OS requires exceptional access
-        Array < U8 > a = dst;
-        void * addr = & a [ start ];
-
-#if UNIX
-        ssize_t num_read = 0;
-        while ( 1 )
-        {
-            num_read = :: read ( fd, addr, ( size_t ) ( U64 ) num_bytes );
-            if ( num_read >= 0 )
-                break;
-
-            int _fd = fd;
-            int status = errno;
-            switch ( status )
-            {
-            case EINTR:
-                break;
-            case EBADF:
-                fd = -1;
-                owned = false;
-                THROW ( xc_param_err, "bad fd: %d", _fd );
-            case EFAULT:
-                // super-internal error, wow.
-                THROW ( xc_internal_err, "bad address from meory: 0x016X", ( U64 ) addr );
-            case EAGAIN:
-                // this is essentially a timeout error
-            case EINVAL:
-            case EIO:
-            case EISDIR:
-            default:
-                THROW_OSERR ( read, status );
-            }
-        }
-
-        return bytes_t ( num_read );
-#endif
-    }
-
-    bytes_t FileDescImpl :: write ( const bytes_t & num_bytes,
-        const Mem & src, const bytes_t & start )
-    {
-        FUNC_ENTRY ();
-
-        // parameters have already been checked
-        assert ( start < src . size () );
-        assert ( start + num_bytes <= src . size () );
-
-        // interfacing with native OS requires exceptional access
-        const Array < U8 > a = src;
-        const void * addr = & a [ start ];
-
-#if UNIX
-        ssize_t num_writ = 0;
-        while ( 1 )
-        {
-            num_writ = :: write ( fd, addr, ( size_t ) ( U64 ) num_bytes );
-            if ( num_writ >= 0 )
-                break;
-
-            int _fd = fd;
-            int status = errno;
-            switch ( status )
-            {
-            case EINTR:
-                break;
-            case ENOSPC:
-                THROW ( xc_no_mem, "attempt to write %lu bytes exceeds volume limits", ( U64 ) num_bytes );
-            case EFBIG:
-                THROW ( xc_bounds_err, "attempt to write %lu bytes exceeds limit", ( U64 ) num_bytes );
-            case EBADF:
-                fd = -1;
-                owned = false;
-                THROW ( xc_param_err, "bad fd: %d", _fd );
-            case EFAULT:
-                // super-internal error, wow.
-                THROW ( xc_internal_err, "bad address from meory: 0x016X", ( U64 ) addr );
-            case EAGAIN:
-                // this is essentially a timeout error
-            case EINVAL:
-            case EIO:
-            case EISDIR:
-            default:
-                THROW_OSERR ( write, status );
-            }
-        }
-
-        return bytes_t ( num_writ );
-#endif
-    }
-
-    bytes_t FileDescImpl :: get_mtu () const
-    {
-        FUNC_ENTRY ();
-
-        // TBD - determine proper MTU for device
-        return bytes_t ( 4096 );
-    }
-
-    // C++
-    FileDescImpl :: FileDescImpl ( int _fd, bool _owned )
-        : fd ( _fd )
-        , owned ( _owned )
-    {
-        assert ( _fd >= 0 );
-    }
-
-    FileDescImpl :: ~ FileDescImpl ()
-    {
-        if ( owned )
-            close ( fd );
-    }
-
-
-    /*------------------------------------------------------------------
-     * FileDesc
-     *  a reference to a Unix file-descriptor
-     */
-
-    FileDesc :: FileDesc ()
-    {
-    }
-
-    FileDesc :: FileDesc ( const FileDesc & r )
-        : Ref < FileDescImpl > ( r )
-    {
-    }
-
-    void FileDesc :: operator = ( const FileDesc & r )
-    {
-        Ref < FileDescImpl > :: operator = ( r );
-    }
-
-    FileDesc :: FileDesc ( const FileDesc & r, caps_t reduce )
-        : Ref < FileDescImpl > ( r, reduce )
-    {
-    }
-
-    FileDesc :: FileDesc ( FileDescImpl * obj, caps_t caps )
-        : Ref < FileDescImpl > ( obj, caps )
-    {
-    }
-
-}
diff --git a/vdb3/src/kfc/fdmgr.cpp b/vdb3/src/kfc/fdmgr.cpp
deleted file mode 100644
index d981f22..0000000
--- a/vdb3/src/kfc/fdmgr.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/fdmgr.hpp>
-#include <kfc/fd.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/rsrc.hpp>
-#include <kfc/except.hpp>
-#include <kfc/caps.hpp>
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * FDMgrItf
-     *  file descriptor manager
-     *  an inverted bit of logic that tries to control the number
-     *  of Unix file descriptors in use
-     */
-
-    FileDesc FDMgrItf :: make_fd_ref ( FileDescImpl * obj, caps_t caps )
-    {
-        return FileDesc ( obj, caps );
-    }
-
-    FDMgr FDMgrItf :: make_fdmgr_ref ( Refcount * obj, caps_t caps )
-    {
-        return FDMgr ( obj, this, caps );
-    }
-
-
-    /*------------------------------------------------------------------
-     * FDMgr
-     *  file descriptor manager reference
-     */
-
-
-    FileDesc FDMgr :: make ( int fd, caps_t caps, bool owned ) const
-    {
-        FUNC_ENTRY ();
-
-        // should examine the fd to be open, etc.
-        if ( fd < 0 )
-            THROW ( xc_param_err, "bad fd: %d", fd );
-
-        // limit caps
-        caps &= CAP_PROP_READ | CAP_PROP_WRITE | CAP_RDWR | CAP_RESIZE;
-
-        // ask manager to create one
-        FDMgrItf * itf = get_itf ( CAP_ALLOC );
-        return itf -> make ( fd, caps, owned );
-    }
-
-    FDMgr :: FDMgr ()
-    {
-    }
-
-    FDMgr :: FDMgr ( const FDMgr & r )
-        : Ref < FDMgrItf > ( r )
-    {
-    }
-
-    void FDMgr :: operator = ( const FDMgr & r )
-    {
-        Ref < FDMgrItf > :: operator = ( r );
-    }
-
-    FDMgr :: FDMgr ( const FDMgr & r, caps_t reduce )
-        : Ref < FDMgrItf > ( r, reduce )
-    {
-    }
-
-    FDMgr :: FDMgr ( Refcount * obj, FDMgrItf * itf, caps_t caps )
-        : Ref < FDMgrItf > ( obj, itf, caps )
-    {
-    }
-
-}
diff --git a/vdb3/src/kfc/integer.cpp b/vdb3/src/kfc/integer.cpp
deleted file mode 100644
index 61f8315..0000000
--- a/vdb3/src/kfc/integer.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/defs.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/except.hpp>
-
-namespace vdb3
-{
-
-    template < class IT, class VT >
-    IT integer_t < IT, VT > :: operator / ( const IT & i ) const
-    {
-        if ( i . val == 0 )
-        {
-            FUNC_ENTRY ();
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        }
-        return IT ( val / i . val );
-    }
-
-    template < class IT, class VT >
-    IT integer_t < IT, VT > :: operator % ( const IT & i ) const
-    {
-        if ( i . val == 0 )
-        {
-            FUNC_ENTRY ();
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        }
-        return IT ( val % i . val );
-    }
-
-    template < class IT, class VT >
-    IT & integer_t < IT, VT > :: operator /= ( const IT & i )
-    {
-        if ( i . val == 0 )
-        {
-            FUNC_ENTRY ();
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        }
-
-        val /= i . val;
-        return * ( IT * ) this;
-    }
-
-    template < class IT, class VT >
-    IT & integer_t < IT, VT > :: operator %= ( const IT & i )
-    {
-        if ( i . val == 0 )
-        {
-            FUNC_ENTRY ();
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        }
-
-        val %= i . val;
-        return * ( IT * ) this;
-    }
-
-#if ALLOW_RAW_CONSTANTS
-
-    template < class IT, class VT >
-    IT integer_t < IT, VT > :: operator / ( VT i ) const
-    {
-        if ( i == 0 )
-        {
-            FUNC_ENTRY ();
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        }
-        return IT ( val / i );
-    }
-
-    template < class IT, class VT >
-    IT integer_t < IT, VT > :: operator % ( VT i ) const
-    {
-        if ( i == 0 )
-        {
-            FUNC_ENTRY ();
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        }
-        return IT ( val % i );
-    }
-
-    template < class IT, class VT >
-    IT & integer_t < IT, VT > :: operator /= ( VT i )
-    {
-        if ( i == 0 )
-        {
-            FUNC_ENTRY ();
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        }
-
-        val /= i;
-        return * ( IT * ) this;
-    }
-
-    template < class IT, class VT >
-    IT & integer_t < IT, VT > :: operator %= ( VT i )
-    {
-        if ( i == 0 )
-        {
-            FUNC_ENTRY ();
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        }
-
-        val %= i;
-        return * ( IT * ) this;
-    }
-
-#endif
-
-    template class integer_t < bytes_t, U64 >;
-    template class integer_t < bitsz_t, U64 >;
-    
-}
diff --git a/vdb3/src/kfc/log.cpp b/vdb3/src/kfc/log.cpp
deleted file mode 100644
index cffed96..0000000
--- a/vdb3/src/kfc/log.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/log.hpp>
-#include <kfc/refcount.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/caps.hpp>
-
-namespace vdb3
-{
-
-    // not valid for setting level, used internally
-    const LogLevel log_disabled = ( LogLevel ) 0;
-    const LogLevel dflt_log_level = log_info;
-
-    /*------------------------------------------------------------------
-     * LoggerItf
-     */
-
-    Log LoggerItf :: make_ref ( Refcount * obj, caps_t caps )
-    {
-        return Log ( obj, this, caps );
-    }
-
-    void * LoggerItf :: cast ( Refcount * obj )
-    {
-        return ( void * )  dynamic_cast < LoggerItf * > ( obj );
-    }
-
-
-    /*------------------------------------------------------------------
-     * Log
-     *  logging formatter
-     *  handles output to the log stream
-     */
-
-    void Log :: set_level ( LogLevel level )
-    {
-        FUNC_ENTRY ();
-        test_caps ( CAP_PROP_WRITE );
-
-        if ( level >= log_emerg && level <= log_info )
-            lvl = level;
-    }
-
-    // log message
-    void Log :: msg ( LogLevel priority, const char * fmt, ... ) const
-    {
-        if ( priority <= lvl )
-        {
-            FUNC_ENTRY ();
-
-            va_list args;
-            va_start ( args, fmt );
-
-            try
-            {
-                LoggerItf * logger = get_itf ( CAP_WRITE );
-                logger -> msg ( priority, fmt, args );
-            }
-            catch ( ... )
-            {
-                va_end ( args );
-                throw;
-            }
-
-            va_end ( args );
-        }
-    }
-
-    void Log :: vmsg ( LogLevel priority, const char * fmt, va_list args ) const
-    {
-        if ( priority <= lvl )
-        {
-            FUNC_ENTRY ();
-
-            LoggerItf * logger = get_itf ( CAP_WRITE );
-            logger -> msg ( priority, fmt, args );
-        }
-    }
-
-    // C++
-    Log :: Log ()
-        : lvl ( log_disabled )
-    {
-    }
-
-    Log :: Log ( const Log & r )
-        : Ref < LoggerItf > ( r )
-        , lvl ( r . lvl )
-    {
-    }
-
-    void Log :: operator = ( const Log & r )
-    {
-        FUNC_ENTRY ();
-        Ref < LoggerItf > :: operator = ( r );
-        lvl = r . lvl;
-    }
-
-    Log :: Log ( const Log & r, caps_t reduce )
-        : Ref < LoggerItf > ( r, reduce )
-        , lvl ( r . lvl )
-    {
-    }
-
-    // factory
-    Log :: Log ( Refcount * obj, LoggerItf * itf, caps_t caps )
-        : Ref < LoggerItf > ( obj, itf, caps )
-        , lvl ( dflt_log_level )
-    {
-    }
-
-    Log :: ~ Log ()
-    {
-        lvl = log_disabled;
-    }
-
-}
diff --git a/vdb3/src/kfc/memmgr.cpp b/vdb3/src/kfc/memmgr.cpp
deleted file mode 100644
index 4a625ff..0000000
--- a/vdb3/src/kfc/memmgr.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/memmgr.hpp>
-#include <kfc/memory.hpp>
-#include <kfc/rsrc.hpp>
-#include <kfc/caps.hpp>
-#include <kfc/callstk.hpp>
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * MemMgrItf
-     *  memory manager interface
-     */
-
-    // support for C++ new and delete
-    void * MemMgrItf :: _new ( size_t bytes )
-    {
-        FUNC_ENTRY ();
-
-        // allocate new object plus header size
-        Refcount * obj = ( Refcount * ) _alloc ( bytes, true );
-        obj -> mmgr = ( MemMgrItf * ) duplicate ();
-        obj -> obj_size = bytes;
-
-        // return allocation
-        return ( void * ) obj;
-    }
-
-    void MemMgrItf :: _delete ( void * ptr )
-    {
-        Refcount * obj;
-
-        if ( ( size_t ) ptr >= sizeof * obj )
-        {
-            FUNC_ENTRY ();
-
-            // convert pointer back to Refcount
-            obj = ( Refcount * ) ptr;
-
-            // recover the original memory manager interface
-            MemMgrItf * self = obj -> mmgr;
-            assert ( self != 0 );
-
-            // free the memory
-            self -> _free ( ( void * ) obj, obj -> obj_size );
-
-            // detach from memmgr
-            self -> release ();
-        }
-    }
-
-    MemMgr MemMgrItf :: make_mmgr_ref ( Refcount * obj, caps_t caps )
-    {
-        // TBD - can set max capabilities here
-        return MemMgr ( obj, this, caps );
-    }
-
-    Mem MemMgrItf :: make_mem_ref ( Refcount * obj, MemoryItf * itf, caps_t caps )
-    {
-        // TBD - can set max capabilities here
-        return Mem ( obj, itf, caps );
-    }
-
-
-    /*------------------------------------------------------------------
-     * MemMgr
-     *  memory manager reference
-     */
-
-    // allocate memory 
-    Mem MemMgr :: alloc ( const bytes_t & size, bool clear ) const
-    {
-        FUNC_ENTRY ();
-        MemMgrItf * itf = get_itf ( CAP_ALLOC );
-        return itf -> alloc ( size, clear );
-    }
-
-
-    // make a block of constant memory
-    Mem MemMgr :: make_const ( const void * ptr, const bytes_t & size ) const
-    {
-        FUNC_ENTRY ();
-
-        if ( ptr == 0 && size != ( U64 ) 0 )
-        {
-            if ( rsrc == 0 )
-                throw "null const memory block";
-            THROW ( xc_null_param_err, "null pointer with size %lu", ( U64 ) size );
-        }
-
-        MemMgrItf * itf = get_itf ( CAP_ALLOC );
-        return itf -> make_const ( ptr, size );
-    }
-
-    // C++
-    MemMgr :: MemMgr ()
-    {
-    }
-
-    MemMgr :: MemMgr ( const MemMgr & r )
-        : Ref < MemMgrItf > ( r )
-    {
-    }
-
-    void MemMgr :: operator = ( const MemMgr & r )
-    {
-        Ref < MemMgrItf > :: operator = ( r );
-    }
-
-    MemMgr :: MemMgr ( const MemMgr & r, caps_t reduce )
-        : Ref < MemMgrItf > ( r, reduce )
-    {
-    }
-
-    // support for "new" and "delete" operators
-    void * MemMgr :: _new ( size_t bytes ) const
-    {
-        FUNC_ENTRY ();
-        MemMgrItf * itf = get_itf ( CAP_ALLOC );
-        return itf -> _new ( bytes );
-    }
-
-    void MemMgr :: _delete ( void * ptr ) const
-    {
-        FUNC_ENTRY ();
-        return MemMgrItf :: _delete ( ptr );
-    }
-
-    // initialization by MemMgrItf
-    MemMgr :: MemMgr ( Refcount * obj, MemMgrItf * itf, caps_t caps )
-        : Ref < MemMgrItf > ( obj, itf, caps )
-    {
-    }
-
-
-}
diff --git a/vdb3/src/kfc/memory.cpp b/vdb3/src/kfc/memory.cpp
deleted file mode 100644
index a1ca852..0000000
--- a/vdb3/src/kfc/memory.cpp
+++ /dev/null
@@ -1,392 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/memory.hpp>
-#include <kfc/memmgr.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/except.hpp>
-#include <kfc/rsrc.hpp>
-#include <kfc/caps.hpp>
-
-#include <string.h>
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * MemoryItf
-     *  an interface representing a block of storage
-     */
-
-    MemMgrItf * MemoryItf :: get_mmgr () const
-    {
-        return mmgr;
-    }
-
-    void * MemoryItf :: cast ( Refcount * obj )
-    {
-        return ( void * ) dynamic_cast < MemoryItf * > ( obj );
-    }
-
-
-    /*------------------------------------------------------------------
-     * Mem
-     *  an object representing a range of address space
-     */
-
-    bytes_t Mem :: size () const
-    {
-        FUNC_ENTRY ();
-        test_caps ( CAP_PROP_READ );
-        return bytes;
-    }
-
-    index_t Mem :: find_first ( U8 byte ) const
-    {
-        FUNC_ENTRY ();
-        test_caps ( CAP_READ );
-
-        void * loc = memchr ( ptr, byte, bytes );
-        if ( loc != 0 )
-            return ( char * ) loc - ( char * ) ptr;
-
-        return ( I64 ) -1;
-    }
-
-    index_t Mem :: find_first ( U8 byte, index_t offset ) const
-    {
-        FUNC_ENTRY ();
-        test_caps ( CAP_READ );
-
-        if ( offset < ( I64 ) 0 || ( U64 ) offset >= bytes )
-            return -1;
-
-        const char * p = ( const char * ) ptr;
-        void * loc = memchr ( & p [ offset ], byte, bytes - ( U64 ) offset );
-        if ( loc != 0 )
-            return ( const char * ) loc - p;
-
-        return ( I64 ) -1;
-    }
-
-    index_t Mem :: find_first ( U8 byte, index_t offset, const bytes_t & _sz ) const
-    {
-        FUNC_ENTRY ();
-        test_caps ( CAP_READ );
-
-        size_t sz = _sz;
-
-        if ( offset < ( I64 ) 0 || ( U64 ) offset >= bytes )
-            return -1;
-
-        if ( sz + offset > bytes )
-            sz = bytes - ( U64 ) offset;
-
-        const char * p = ( const char * ) ptr;
-        void * loc = memchr ( & p [ offset ], byte, sz );
-        if ( loc != 0 )
-            return ( const char * ) loc - p;
-
-        return ( I64 ) -1;
-    }
-
-    Mem Mem :: subrange ( index_t offset ) const
-    {
-        FUNC_ENTRY ();
-        test_caps ( CAP_SUBRANGE );
-
-        Mem m ( * this );
-        if ( offset < ( I64 ) 0 || ( U64 ) offset >= bytes )
-        {
-            m . ptr = ( void* ) & ( ( char* ) ptr ) [ bytes ];
-            m . bytes = ( U64 ) 0;
-        }
-        else
-        {
-            m . ptr = ( void* ) & ( ( char* ) ptr ) [ offset ];
-            m . bytes = ( U64 ) bytes - ( U64 ) offset;
-        }
-
-        return m;
-    }
-
-    Mem Mem :: subrange ( index_t offset, const bytes_t & _sz ) const
-    {
-        FUNC_ENTRY ();
-        test_caps ( CAP_SUBRANGE );
-
-        U64 sz = _sz;
-
-        Mem m ( * this );
-
-        if ( offset < ( I64 ) 0 || ( U64 ) offset >= bytes )
-        {
-            m . ptr = ( void* ) & ( ( char* ) ptr ) [ bytes ];
-            m . bytes = ( U64 ) 0;
-        }
-        else
-        {
-            U64 b = ( U64 ) bytes - ( U64 ) offset;
-            if ( sz > b )
-                sz = b;
-
-            m . ptr = ( void* ) & ( ( char* ) ptr ) [ offset ];
-            m . bytes = sz;
-        }
-
-        return m;
-    }
-
-    void Mem :: resize ( const bytes_t & sz, bool clear )
-    {
-        FUNC_ENTRY ();
-        test_caps ( CAP_RESIZE );
-
-        // early cheap detection of noop
-        if ( sz == bytes )
-            return;
-
-        // a null ref can be resized to allocate
-        if ( ptr == 0 )
-        {
-            assert ( bytes == ( U64 ) 0 );
-#ifdef _hpp_vdb3_rsrc_
-            * this = rsrc -> mmgr . alloc ( sz, clear );
-#else
-            CONST_THROW ( xc_unimplemented_err, "unimplemented" );
-#endif
-        }
-        else
-        {
-            assert ( bytes != ( U64 ) 0 );
-
-            MemoryItf * itf = get_itf ( CAP_RESIZE );
-
-            // there are cases when the obj can be null
-            if ( itf == 0 )
-            {
-#ifdef _hpp_vdb3_rsrc_
-                // ref represents constant data, not heap data
-                Mem tmp = rsrc -> mmgr . alloc ( sz, false );
-
-                // copy in data from self
-                bytes_t num_writ = tmp . copy ( bytes, 0, * this, 0 );
-                if ( bytes >= sz )
-                    assert ( num_writ == sz );
-                else
-                {
-                    assert ( num_writ == bytes );
-                    if ( clear )
-                    {
-                        bytes_t num_zeroed = tmp . fill ( ( U64 ) sz - bytes, ( I64 ) ( U64 ) num_writ, 0 );
-                        assert ( num_writ + num_zeroed == sz );
-                    }
-                }
-
-                * this = tmp;
-#else
-                CONST_THROW ( xc_unimplemented_err, "unimplemented" );
-#endif
-            }
-            else
-            {
-                // normal case
-                itf -> resize ( sz, clear );
-                ptr = itf -> get_mapped_memory ( & bytes );
-            }
-        }
-    }
-
-    bytes_t Mem :: copy ( const bytes_t & _amount,
-        index_t dst_offset, const Mem & src, index_t src_offset )
-    {
-        FUNC_ENTRY ();
-        test_caps ( CAP_WRITE );
-        src . test_caps ( CAP_READ );
-
-        U64 amount = _amount;
-
-        if ( dst_offset < 0 || ( U64 ) dst_offset >= bytes ||
-             src_offset < 0 || ( U64 ) src_offset >= src . bytes )
-            return bytes_t ( 0 );
-
-        if ( amount + dst_offset > bytes )
-            amount = ( U64 ) bytes - dst_offset;
-        if ( amount + src_offset > src . bytes )
-            amount = ( U64 ) src . bytes - src_offset;
-
-        if ( amount != 0 )
-        {
-            char * dp = ( char * ) ptr;
-            const char * sp = ( const char * ) src . ptr;
-            memcpy ( & dp [ dst_offset ], & sp [ src_offset ], ( size_t ) amount );
-        }
-
-        return bytes_t ( amount );
-    }
-
-    CopyUntilRslt Mem :: copy_until ( const bytes_t & _amount,
-        U8 stop_byte, index_t dst_offset, const Mem & src, index_t src_offset )
-    {
-        FUNC_ENTRY ();
-        test_caps ( CAP_WRITE );
-        src . test_caps ( CAP_READ );
-
-        U64 amount = _amount;
-        bool found = false;
-
-        if ( dst_offset < 0 || ( U64 ) dst_offset >= bytes ||
-             src_offset < 0 || ( U64 ) src_offset >= src . bytes )
-            return CopyUntilRslt ( 0, false );
-
-        if ( amount + dst_offset > bytes )
-            amount = ( U64 ) bytes - dst_offset;
-        if ( amount + src_offset > src . bytes )
-            amount = ( U64 ) src . bytes - src_offset;
-
-        if ( amount != 0 )
-        {
-            U8 * dp = ( U8 * ) ptr + dst_offset;
-            const U8 * sp = ( const U8 * ) src . ptr + src_offset;
-            for ( U64 i = 0; i < amount; ++ i )
-            {
-                if ( ( dp [ i ] = sp [ i ] ) == stop_byte )
-                {
-                    amount = i + 1;
-                    found = true;
-                    break;
-                }
-            }
-        }
-
-        return CopyUntilRslt ( amount, found );
-    }
-
-    bytes_t Mem :: fill ( count_t repeat, index_t offset, U8 byte )
-    {
-        FUNC_ENTRY ();
-        test_caps ( CAP_WRITE );
-
-        if ( offset < 0 || ( U64 ) offset >= bytes )
-            return bytes_t ( 0 );
-
-        if ( repeat + offset > bytes )
-            repeat = ( U64 ) bytes - offset;
-
-        if ( repeat != 0 )
-        {
-            char * p = ( char * ) ptr;
-            memset ( & p [ offset ], byte, ( size_t ) repeat );
-        }
-
-        return bytes_t ( repeat );
-    }
-
-    bool Mem :: operator == ( const Mem & m ) const
-    {
-        FUNC_ENTRY ();
-        test_caps ( CAP_READ );
-        m . test_caps ( CAP_READ );
-
-        if ( bytes == m . bytes )
-        {
-            if ( ptr == m . ptr )
-                return true;
-            return memcmp ( ptr, m . ptr, bytes ) == 0;
-        }
-
-        return false;
-    }
-
-    bool Mem :: operator != ( const Mem & m ) const
-    {
-        FUNC_ENTRY ();
-        test_caps ( CAP_READ );
-        m . test_caps ( CAP_READ );
-
-        if ( bytes == m . bytes )
-        {
-            if ( ptr == m . ptr )
-                return false;
-            return memcmp ( ptr, m . ptr, bytes ) != 0;
-        }
-
-        return true;
-    }
-
-    Mem :: Mem ()
-        : ptr ( 0 )
-        , bytes ( 0 )
-    {
-    }
-
-    Mem :: ~ Mem ()
-    {
-        ptr = 0;
-        bytes = 0;
-    }
-
-    Mem :: Mem ( const Mem & r )
-        : Ref < MemoryItf > ( r )
-        , ptr ( r . ptr )
-        , bytes ( r . bytes )
-    {
-    }
-
-    void Mem :: operator = ( const Mem & r )
-    {
-        Ref < MemoryItf > :: operator = ( r );
-        ptr = r . ptr;
-        bytes = r . bytes;
-    }
-
-    Mem :: Mem ( const Mem & r, caps_t reduce )
-        : Ref < MemoryItf > ( r, reduce )
-        , ptr ( r . ptr )
-        , bytes ( r . bytes )
-    {
-    }
-
-    Mem :: Mem ( Refcount * obj, MemoryItf * itf, caps_t caps )
-        : Ref < MemoryItf > ( obj, itf, caps )
-        , ptr ( 0 )
-        , bytes ( 0 )
-    {
-        if ( itf != 0 )
-            ptr = itf -> get_mapped_memory ( & bytes );
-    }
-
-#if 0
-    Mem :: Mem ( const void * _ptr, const bytes_t & sz )
-        : Ref < MemoryItf > ( 0, CAP_READ | CAP_PROP_READ | CAP_CAST )
-        , ptr ( ( void * ) _ptr )
-        , bytes ( sz )
-    {
-        if ( _ptr == 0 )
-            bytes = ( U64 ) 0;
-    }
-#endif
-}
diff --git a/vdb3/src/kfc/pfdmgr.cpp b/vdb3/src/kfc/pfdmgr.cpp
deleted file mode 100644
index 9fb794d..0000000
--- a/vdb3/src/kfc/pfdmgr.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "pfdmgr.hpp"
-#include <kfc/fd.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/rsrc.hpp>
-#include <kfc/except.hpp>
-#include <kfc/caps.hpp>
-
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * PrimordFDMgr
-     */
-
-    FDMgr PrimordFDMgr :: make_primordial ()
-    {
-        FUNC_ENTRY ();
-        PrimordFDMgr * obj = new PrimordFDMgr;
-        return obj -> make_fdmgr_ref ( obj, CAP_ALLOC );
-    }
-
-    FileDesc PrimordFDMgr :: make ( int fd, caps_t caps, bool owned )
-    {
-        FUNC_ENTRY ();
-        FileDescImpl * obj = new FileDescImpl ( fd, owned );
-        return FDMgrItf :: make_fd_ref ( obj, caps );
-    }
-
-    PrimordFDMgr :: PrimordFDMgr ()
-    {
-    }
-
-    PrimordFDMgr :: ~ PrimordFDMgr ()
-    {
-    }
-
-}
diff --git a/vdb3/src/kfc/pfdmgr.hpp b/vdb3/src/kfc/pfdmgr.hpp
deleted file mode 100644
index f787e60..0000000
--- a/vdb3/src/kfc/pfdmgr.hpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_pfdmgr_
-#define _hpp_vdb3_kfc_pfdmgr_
-
-#ifndef _hpp_vdb3_kfc_refcount_
-#include <kfc/refcount.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_fdmgr_
-#include <kfc/fdmgr.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * forwards
-     */
-
-
-    /*------------------------------------------------------------------
-     * exceptions
-     */
-
-
-    /*------------------------------------------------------------------
-     * PrimordFDMgr
-     */
-    class PrimordFDMgr : public Refcount
-         , implements FDMgrItf
-    {
-    public:
-
-        static FDMgr make_primordial ();
-
-        virtual FileDesc make ( int fd, caps_t caps, bool owned );
-
-        PrimordFDMgr ();
-        ~ PrimordFDMgr ();
-    };
-}
-
-#endif // _hpp_vdb3_kfc_pfdmgr_
diff --git a/vdb3/src/kfc/plogger.cpp b/vdb3/src/kfc/plogger.cpp
deleted file mode 100644
index 3f38463..0000000
--- a/vdb3/src/kfc/plogger.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "plogger.hpp"
-#include <kfc/callstk.hpp>
-#include <kfc/rsrc.hpp>
-#include <kfc/string.hpp>
-#include <kfc/caps.hpp>
-
-#if UNIX
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-#else
-#error "unsupported target platform"
-#endif
-
-namespace vdb3
-{
-    Log plogger_t :: make ( const char * ident )
-    {
-        FUNC_ENTRY ();
-
-        // going to record a "hostname procname[pid]"
-        StringBuffer hostproc;
-
-        // create a newline
-        ConstString newline ( "\n", 1 );
-#if UNIX
-        // hostname
-        char namebuf [ 512 ];
-        int status = gethostname ( namebuf, sizeof namebuf );
-        if ( status != 0 )
-        {
-            strncpy ( namebuf, "<HOST-UNKNOWN>", sizeof namebuf );
-            status = 0;
-        }
-        ConstString hostname ( namebuf, strlen ( namebuf ) );
-
-        // process id
-        pid_t pid = getpid ();
-
-        // process name
-        if ( ident == 0 || ident [ 0 ] == 0 )
-            hostproc . append ( "%s[%d]", & hostname, pid );
-        else
-        {
-            const char * leaf = strrchr ( ident, '/' );
-            if ( leaf ++ == 0 )
-                leaf = ident;
-            ConstString procname ( leaf, strlen ( leaf ) );
-
-            hostproc . append ( "%s %s[%d]", & hostname, & procname, pid );
-        }
-#endif
-
-        plogger_t * obj = new plogger_t ( hostproc . to_str (), newline );
-        return obj ->  make_ref ( obj, CAP_WRITE );
-    }
-
-    void plogger_t :: msg ( LogLevel priority, const char * fmt, va_list args )
-    {
-        // guard against /dev/null
-        if ( ! rsrc -> err )
-            return;
-
-        FUNC_ENTRY ();
-
-        static const char * months [ 12 ] =
-        {
-            "Jan", "Feb", "Mar", "Apr", "May", "Jun",
-            "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-        };
-
-#if UNIX
-        // timestamp
-        // TBD - this should be entirely through timemgr
-#warning "timestamp should be via TimeMgrItf"
-        time_t secs = time ( 0 );
-        struct tm tm = * localtime ( & secs );
-
-        // create month string
-        assert ( tm . tm_mon >= 0 && tm . tm_mon < 12 );
-        ConstString month ( months [ tm . tm_mon ], 3 );
-
-        // timestamp: 'Sep 25 10:49:18'
-        // print timestamp, host&process[pid]
-        StringBuffer buffer ( "%s %2d %02d:%02d:%02d %s: "
-                              , & month
-                              , tm . tm_mday
-                              , tm . tm_hour
-                              , tm . tm_min
-                              , tm . tm_sec
-                              , & hostproc
-            );
-#endif
-    
-        // print message
-        if ( fmt != 0 && fmt [ 0 ] != 0 )
-            buffer . vappend ( fmt, args );
-
-        // trim off trailing white-space
-        buffer . trim ();
-
-        // end with newline
-        buffer += newline;
-
-        // extract memory from string
-        String str = buffer . to_str ();
-
-        // copy to log stream
-        rsrc -> err . write_all ( str . to_mem () );
-    }
-
-    plogger_t :: plogger_t ( const String & ident, const String & nl )
-        : hostproc ( ident )
-        , newline ( nl )
-    {
-    }
-
-    plogger_t :: ~ plogger_t ()
-    {
-    }
-}
diff --git a/vdb3/src/kfc/plogger.hpp b/vdb3/src/kfc/plogger.hpp
deleted file mode 100644
index c52564c..0000000
--- a/vdb3/src/kfc/plogger.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_plogger_
-#define _hpp_vdb3_kfc_plogger_
-
-#ifndef _hpp_vdb3_kfc_refcount_
-#include <kfc/refcount.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_log_
-#include <kfc/log.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_string_
-#include <kfc/string.hpp>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * plogger_t
-     *  simulates syslog-style output
-     */
-    class plogger_t : public Refcount
-        , implements LoggerItf
-    {
-    public:
-
-        // make the primoridal logger with argv[0]
-        static Log make ( const char * ident );
-
-        // format the output a la syslog
-        virtual void msg ( LogLevel priority, const char * fmt, va_list args );
-
-        ~ plogger_t ();
-
-    private:
-
-        plogger_t ( const String & hostproc, const String & newline );
-
-        String hostproc;
-        String newline;
-    };
-
-}
-
-#endif // _hpp_vdb3_kfc_plogger_
diff --git a/vdb3/src/kfc/pmemmgr.cpp b/vdb3/src/kfc/pmemmgr.cpp
deleted file mode 100644
index c4d53d8..0000000
--- a/vdb3/src/kfc/pmemmgr.cpp
+++ /dev/null
@@ -1,315 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "pmemmgr.hpp"
-#include <kfc/memory.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/caps.hpp>
-#include <kfc/rsrc.hpp>
-
-#include <stdlib.h>
-#include <string.h>
-
-#if UNIX
-#include <sys/resource.h>
-#endif
-
-namespace vdb3
-{
-
-    const caps_t CONST_MEM_CAPS
-        = CAP_PROP_READ
-        | CAP_READ
-        | CAP_SUBRANGE
-        | CAP_CAST
-        ;
-
-    const caps_t NEW_MEM_CAPS
-        = CONST_MEM_CAPS
-        | CAP_WRITE
-        | CAP_RESIZE
-        ;
-
-
-    /*------------------------------------------------------------------
-     * const_memory_t
-     *  an object representing a range of address space
-     */
-    class const_memory_t : implements MemoryItf
-    {
-    public:
-
-        virtual void resize ( const bytes_t & new_size, bool clear );
-        const_memory_t ( const void * ptr, const bytes_t & size );
-        ~ const_memory_t ();
-
-    protected:
-
-        virtual void * get_mapped_memory ( bytes_t * size ) const;
-
-        const void * ptr;
-        bytes_t size;
-    };
-
-    void const_memory_t :: resize ( const bytes_t & new_size, bool clear )
-    {
-        FUNC_ENTRY ();
-        CONST_THROW ( xc_internal_err, "should never be called" );
-    }
-
-    const_memory_t :: const_memory_t ( const void * _ptr, const bytes_t & _size )
-        : ptr ( _ptr )
-        , size ( _size )
-    {
-    }
-
-    const_memory_t :: ~ const_memory_t ()
-    {
-        ptr = 0;
-        size = ( U64 ) 0;
-    }
-
-    void * const_memory_t :: get_mapped_memory ( bytes_t * _size ) const
-    {
-        if ( _size != 0 )
-            * _size = size;
-        return ( void * ) ptr;
-    }
-
-
-    /*------------------------------------------------------------------
-     * Memory
-     *  an object representing a range of address space
-     */
-    class Memory : public const_memory_t
-    {
-    public:
-
-        virtual void resize ( const bytes_t & new_size, bool clear );
-        Memory ( void * ptr, const bytes_t & size );
-        ~ Memory ();
-    };
-
-    void Memory :: resize ( const bytes_t & new_size, bool clear )
-    {
-        FUNC_ENTRY ();
-
-        MemMgrItf * mmgr = get_mmgr ();
-        assert ( mmgr != 0 );
-
-        assert ( ptr != 0 );
-        assert ( new_size != size );
-
-        ptr = mmgr -> _resize ( ( void * ) ptr, size, new_size, clear );
-        size = new_size;
-    }
-
-    Memory :: Memory ( void * _ptr, const bytes_t & _size )
-        : const_memory_t ( _ptr, _size )
-    {
-    }
-
-    Memory :: ~ Memory ()
-    {
-        FUNC_ENTRY ();
-
-        MemMgrItf * mmgr = get_mmgr ();
-        assert ( mmgr != 0 );
-
-        mmgr -> _free ( ( void * ) ptr, size );
-    }
-
-
-    /*------------------------------------------------------------------
-     * PrimordMemMgr
-     */
-
-    MemMgr PrimordMemMgr :: make_primordial ()
-    {
-        assert ( callstk != 0 );
-        FUNC_ENTRY ();
-
-        // allow for the very first call
-        static atomic_t < I32 > latch = 0;
-        if ( latch . test_and_set ( 0, 1 ) != 0 )
-        {
-            const char msg [] = "primordial memory manager exists";
-            if ( rsrc == 0 )
-                throw msg;
-            CONST_THROW ( xc_program_state_violation, msg );
-        }
-
-        // determine system memory quota
-        size_t quota = ~ ( size_t ) 0;
-#if UNIX
-        struct rlimit rlim;
-        int status = getrlimit ( RLIMIT_AS, & rlim );
-        if ( status == 0 )
-            quota = rlim . rlim_cur;
-#endif
-
-        // allocate the object memory
-        PrimordMemMgr * obj;
-        obj = ( PrimordMemMgr * ) calloc ( 1, sizeof * obj );
-        if ( obj == 0 )
-            throw "out of memory allocating primordial memory manager";
-
-        // construct the primordial mmgr
-        new ( obj ) PrimordMemMgr ( quota, quota - sizeof * obj );
-
-        // embed self into object
-        // DO NOT STORE DUPLICATE
-        // as this would introduce a cycle
-        obj -> mmgr = obj;
-        obj -> obj_size = sizeof * obj;
-
-        // create the reference
-        return obj -> make_mmgr_ref ( obj, CAP_RDWR | CAP_ALLOC );
-    }
-
-
-    /* alloc
-     */
-    Mem PrimordMemMgr :: alloc ( const bytes_t & size, bool clear )
-    {
-        FUNC_ENTRY ();
-
-        // allocate a raw block
-        void * block = ( size == ( U64 ) 0 ) ? 0 : _alloc ( size, clear );
-
-        // create the memory object
-        Memory * obj = new Memory ( block, size );
-
-        // create the reference
-        return make_mem_ref ( obj, obj, NEW_MEM_CAPS );
-    }
-
-    Mem PrimordMemMgr :: make_const ( const void * ptr, const bytes_t & size )
-    {
-        FUNC_ENTRY ();
-
-        // create the const memory object
-        const_memory_t * obj = new const_memory_t ( ptr, size );
-
-        // create the reference
-        return make_mem_ref ( obj, obj, CONST_MEM_CAPS );
-    }
-
-    void * PrimordMemMgr :: _alloc ( const bytes_t & size, bool clear )
-    {
-        FUNC_ENTRY ();
-
-        size_t bytes = size;
-
-        // allocate from quota
-        if ( avail . read_and_sub_ge ( size, size ) < size )
-            THROW ( xc_mem_quota, "memory quota exhausted allocating %lu bytes", ( U64 ) size );
-
-        // allocate using process memory manager
-        void * ptr = clear ? calloc ( 1, bytes ) : malloc ( bytes );
-        if ( ptr == 0 )
-        {
-            // return bytes to quota
-            avail += bytes;
-
-            // failure
-            THROW ( xc_no_mem, "process memory exhausted allocating %zu bytes", bytes );
-        }
-
-       return ptr;
-
-    }
-
-    void * PrimordMemMgr :: _resize ( void * old_ptr, const bytes_t & old_size, const bytes_t & new_size, bool clear )
-    {
-        FUNC_ENTRY ();
-
-        // nothing to do if there is no size change
-        if ( old_size == new_size )
-            return old_ptr;
-
-        // check for quota
-        if ( ( avail + old_size ) < new_size )
-            THROW ( xc_mem_quota, "memory quota exhausted reallocating %lu to %lu bytes", ( U64 ) old_size, ( U64 ) new_size );
-
-        size_t new_bytes = new_size;
-
-        // not supposed to be called with bad values
-        assert ( old_ptr != 0 || old_size == ( U64 ) 0 );
-
-        // reallocate using process memory manager
-        // alternatively, we could always allocate and copy, destroying old
-        void * new_ptr = realloc ( old_ptr, new_bytes );
-        if ( new_ptr == 0 )
-            THROW ( xc_no_mem, "process memory exhausted reallocating %lu to %lu bytes", ( U64 ) old_size, ( U64 ) new_size );
-
-        // update bytes remaining
-        if ( old_size > new_size )
-            avail += old_size - new_size;
-        else
-        {
-            avail -= new_size - old_size;
-
-            // clear extended area
-            if ( clear )
-                memset ( & ( ( char* ) new_ptr ) [ old_size ], 0, new_size - old_size );
-        }
-
-        return new_ptr;
-    }
-
-    void PrimordMemMgr :: _free ( void * ptr, const bytes_t & size )
-    {
-        // not supposed to be called with bad values
-        assert ( ptr != 0 || size == ( U64 ) 0 );
-
-        // return to the process memory manager
-        // alternatively, could clear before free
-        free ( ptr );
-
-        // update bytes remaining
-        if ( ( void * ) this != ptr )
-            avail += size;
-    }
-
-    PrimordMemMgr :: PrimordMemMgr ( const bytes_t & q, const bytes_t & a )
-        : quota ( q )
-        , avail ( a )
-    {
-    }
-
-    PrimordMemMgr :: ~ PrimordMemMgr ()
-    {
-        // TBD - can test if avail != quota
-        quota = 0;
-        avail = 0;
-    }
-
-    void PrimordMemMgr :: operator delete ( void * ptr )
-    {
-        free ( ptr );
-    }
-}
diff --git a/vdb3/src/kfc/pmemmgr.hpp b/vdb3/src/kfc/pmemmgr.hpp
deleted file mode 100644
index 23b654a..0000000
--- a/vdb3/src/kfc/pmemmgr.hpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_pmemmgr_
-#define _hpp_vdb3_kfc_pmemmgr_
-
-#ifndef _hpp_vdb3_kfc_memmgr_
-#include <kfc/memmgr.hpp>
-#endif
-
-#include <new>
-
-namespace vdb3
-{
-
-
-    /*------------------------------------------------------------------
-     * PrimordMemMgr
-     *  primordial memory manager
-     */
-    class PrimordMemMgr : implements MemMgrItf
-    {
-    public:
-
-        static MemMgr make_primordial ();
-
-        virtual Mem alloc ( const bytes_t & size, bool clear );
-        virtual Mem make_const ( const void * ptr, const bytes_t & size );
-
-    protected:
-
-        virtual void * _alloc ( const bytes_t & size, bool clear );
-        virtual void * _resize ( void * ptr, const bytes_t & old_size,
-            const bytes_t & new_size, bool clear );
-        virtual void _free ( void * ptr, const bytes_t & size );
-
-        PrimordMemMgr ( const bytes_t & quota, const bytes_t & avail );
-        ~ PrimordMemMgr ();
-
-    private:
-
-        void * operator new ( std :: size_t bytes, void * ptr )
-        { return ptr; }
-        void operator delete ( void * ptr );
-
-        bytes_t quota;
-        atomic_t < U64 > avail;
-    };
-
-}
-
-#endif // _hpp_vdb3_kfc_pmemmgr_
diff --git a/vdb3/src/kfc/ptimemgr.cpp b/vdb3/src/kfc/ptimemgr.cpp
deleted file mode 100644
index 3ee8eea..0000000
--- a/vdb3/src/kfc/ptimemgr.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include "ptimemgr.hpp"
-#include <kfc/time.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/rsrc.hpp>
-#include <kfc/caps.hpp>
-#include <kfc/syserr.hpp>
-
-#if UNIX
-#include <sys/time.h>
-#include <errno.h>
-#else
-#error "unsupported target platform"
-#endif
-
-namespace vdb3
-{
-
-
-    /*------------------------------------------------------------------
-     * ptimemgr_t
-     *  primordial time manager
-     */
-
-    TimeMgr PrimordTimeMgr :: make_primordial ()
-    {
-        FUNC_ENTRY ();
-        PrimordTimeMgr * obj = new PrimordTimeMgr;
-        return obj -> make_tmmgr_ref ( obj, CAP_READ );
-    }
-
-    timestamp_t PrimordTimeMgr :: cur_time () const
-    {
-        FUNC_ENTRY ();
-
-#if UNIX
-        struct timeval tv;
-        int status =  gettimeofday ( & tv, 0 );
-        if ( status != 0 )
-            THROW_OSERR ( gettimeofday, errno );
-
-        seconds_t sec = tv . tv_sec;
-        uS_t uS = tv . tv_usec;
-        uS += sec;
-
-        return make_timestamp ( uS );
-#else
-#error no implementation for cur_time on this platform
-#endif
-    }
-
-    PrimordTimeMgr :: PrimordTimeMgr ()
-    {
-    }
-
-}
diff --git a/vdb3/src/kfc/ptimemgr.hpp b/vdb3/src/kfc/ptimemgr.hpp
deleted file mode 100644
index 65befb2..0000000
--- a/vdb3/src/kfc/ptimemgr.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#ifndef _hpp_vdb3_kfc_ptimemgr_
-#define _hpp_vdb3_kfc_ptimemgr_
-
-#ifndef _hpp_vdb3_kfc_refcount_
-#include <kfc/refcount.hpp>
-#endif
-
-#ifndef _hpp_vdb3_kfc_timemgr_
-#include <kfc/timemgr.hpp>
-#endif
-
-#include <new>
-
-namespace vdb3
-{
-
-
-    /*------------------------------------------------------------------
-     * PrimordTimeMgr
-     *  primordial time manager
-     */
-    class PrimordTimeMgr : public Refcount
-        , implements TimeMgrItf
-    {
-    public:
-
-        static TimeMgr make_primordial ();
-
-        virtual timestamp_t cur_time () const;
-
-    private:
-
-        PrimordTimeMgr ();
-    };
-
-}
-
-#endif // _hpp_vdb3_kfc_ptimemgr_
diff --git a/vdb3/src/kfc/ptr.cpp b/vdb3/src/kfc/ptr.cpp
deleted file mode 100644
index 2279d35..0000000
--- a/vdb3/src/kfc/ptr.cpp
+++ /dev/null
@@ -1,206 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/ptr.hpp>
-#include <kfc/memmgr.hpp>
-#include <kfc/caps.hpp>
-#include <kfc/except.hpp>
-#include <kfc/callstk.hpp>
-
-namespace vdb3
-{
-
-    // implement read or r/w access to object
-    void * OpaquePtr :: access ( const bytes_t & elem_size )
-    {
-        if ( adj < ( I64 ) 0 || elem_size + ( U64 ) adj > m . bytes )
-        {
-            FUNC_ENTRY ();
-            THROW ( xc_bounds_err, "read/write memory access of %lu bytes", ( U64 ) elem_size );
-        }
-
-        return ( void* ) ( ( char* ) m . ptr + adj );
-    }
-
-    const void * OpaquePtr :: access ( const bytes_t & elem_size ) const
-    {
-        if ( adj < ( I64 ) 0 || elem_size + ( U64 ) adj > m . bytes )
-        {
-            FUNC_ENTRY ();
-            THROW ( xc_bounds_err, "read memory access of %lu bytes", ( U64 ) elem_size );
-        }
-
-        return ( const void* ) ( ( const char* ) m . ptr + adj );
-    }
-
-    void * OpaquePtr :: access ( index_t offset, const bytes_t & elem_size )
-    {
-        index_t new_adj ( adj + offset );
-        if ( new_adj < ( I64 ) 0 || elem_size + ( U64 ) new_adj > m . bytes )
-        {
-            FUNC_ENTRY ();
-            THROW ( xc_bounds_err, "read/write memory access of %lu bytes", ( U64 ) elem_size );
-        }
-
-        return ( void* ) ( ( char* ) m . ptr + new_adj );
-    }
-
-    const void * OpaquePtr :: access ( index_t offset, const bytes_t & elem_size ) const
-    {
-        index_t new_adj ( adj + offset );
-        if ( new_adj < ( I64 ) 0 || elem_size + ( U64 ) new_adj > m . bytes )
-        {
-            FUNC_ENTRY ();
-            THROW ( xc_bounds_err, "read memory access of %lu bytes", ( U64 ) elem_size );
-        }
-
-        return ( const void* ) ( ( const char* ) m . ptr + new_adj );
-    }
-
-    // increment and decrement
-    void OpaquePtr :: increment ( index_t offset )
-    {
-        adj += offset;
-    }
-
-    void OpaquePtr :: decrement ( index_t offset )
-    {
-        adj -= offset;
-    }
-
-    // difference - defined for two pointers on same mem
-    index_t OpaquePtr :: difference ( const OpaquePtr & p, const bytes_t & elem_size ) const
-    {
-        FUNC_ENTRY ();
-
-        // test if both mem blocks are identical
-        if ( m . ptr == p . m . ptr &&
-             m . bytes == p . m . bytes )
-        {
-            if ( elem_size == ( U64 ) 0 )
-                CONST_THROW ( xc_div_zero_err, "divide by zero" );
-            return index_t ( ( ( I64 ) adj - p . adj ) / ( U64 ) elem_size );
-        }
-
-        // have to derive overlap, and both pointers must be within
-        const char * l1 = ( const char* ) m . ptr;
-        const char * l2 = ( const char* ) p . m . ptr;
-        const char * r1 = l1 + m . bytes;
-        const char * r2 = l2 + p . m . bytes;
-        const char * p1 = l1 + adj;
-        const char * p2 = l2 + p . adj;
-
-        const char * left = ( l1 >= l2 ) ? l1 : l2;
-        const char * right = ( r1 <= r2 ) ? r1 : r2;
-        if ( left >= right )
-            CONST_THROW ( xc_ptr_space_err, "pointer difference between disjoint memory spaces" );
-
-        if ( p1 < left || p1 > right ||
-             p2 < left || p2 > right )
-            CONST_THROW ( xc_ptr_space_err, "pointer difference between disjoint memory spaces" );
-
-        // now, the pointers can be compared
-        if ( elem_size == ( U64 ) 0 )
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        return index_t ( ( p1 - p2 ) / ( U64 ) elem_size );
-    }
-
-    // comparison
-    bool OpaquePtr :: equal ( const OpaquePtr & p ) const
-    {
-        FUNC_ENTRY ();
-        return difference ( p, 1 ) == ( I64 ) 0;
-    }
-
-    bool OpaquePtr :: above ( const OpaquePtr & p ) const
-    {
-        FUNC_ENTRY ();
-        return difference ( p, 1 ) > ( I64 ) 0;
-    }
-
-    bool OpaquePtr :: below ( const OpaquePtr & p ) const
-    {
-        FUNC_ENTRY ();
-        return difference ( p, 1 ) < ( I64 ) 0;
-    }
-
-    // assignment
-    void OpaquePtr :: assign ( const OpaquePtr & p )
-    {
-        m = p . m;
-        adj = p . adj;
-    }
-
-    OpaquePtr :: OpaquePtr ( Mem & _m, const bytes_t & elem_size )
-        : m ( _m )
-        , adj ( 0 )
-    {
-        FUNC_ENTRY ();
-        m . get_itf ( CAP_RDWR );
-
-        if ( elem_size == ( U64 ) 0 )
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        if ( elem_size != ( U64 ) 1 )
-        {
-            if ( ( U64 ) m . bytes % elem_size != ( U64 ) 0 )
-                CONST_THROW ( xc_ptr_size_err, "memory block is not an integral multiple of pointer element size" );
-        }
-    }
-
-    OpaquePtr :: OpaquePtr ( const Mem & _m, const bytes_t & elem_size )
-        : m ( _m )
-        , adj ( 0 )
-    {
-        FUNC_ENTRY ();
-        m . get_itf ( CAP_READ );
-
-        if ( elem_size == ( U64 ) 0 )
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        if ( elem_size != ( U64 ) 1 )
-        {
-            if ( ( U64 ) m . bytes % elem_size != ( U64 ) 0 )
-                CONST_THROW ( xc_ptr_size_err, "memory block is not an integral multiple of pointer element size" );
-        }
-    }
-
-    OpaquePtr :: OpaquePtr ( const OpaquePtr & p )
-        : m ( p . m )
-        , adj ( p . adj )
-    {
-    }
-
-    OpaquePtr :: OpaquePtr ( const OpaquePtr & p, caps_t reduce )
-        : m ( p . m, reduce )
-        , adj ( p . adj )
-    {
-    }
-
-    OpaquePtr :: ~ OpaquePtr ()
-    {
-        adj = 0;
-    }
-
-}
diff --git a/vdb3/src/kfc/ref.cpp b/vdb3/src/kfc/ref.cpp
deleted file mode 100644
index be7f170..0000000
--- a/vdb3/src/kfc/ref.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/ref.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/except.hpp>
-#include <kfc/refcount.hpp>
-
-#include <typeinfo>
-#include <string.h>
-
-namespace vdb3
-{
-
-    // construct a src_loc for hpp
-    static SrcLoc hpp_src_loc =
-    {
-        __mod__, __file__, "hpp"
-    };
-
-    static inline
-    size_t safe_strlen ( const char * str )
-    {
-        if ( str != 0 )
-            return strlen ( str );
-        return 0;
-    }
-
-    /*------------------------------------------------------------------
-     * OpaqueRef
-     *  type-opaque reference
-     *  does all the actual work
-     */
-
-    void OpaqueRef :: test_caps ( caps_t required ) const
-    {
-        // test caps against required
-        if ( ( caps & required ) != required )
-        {
-            FUNC_ENTRY ();
-            CONST_THROW ( xc_caps_violation_err, "insufficient capabilities for this operation" );
-        }
-    }
-
-    void * OpaqueRef :: cast ( const OpaqueRef & from,
-        void * ( * cast_func ) ( Refcount * obj ) )
-    {
-        FUNC_ENTRY ();
-        assert ( cast_func != 0 );
-        return ( * cast_func ) ( from . obj );
-    }
-
-    // throws an exception describing the cast
-    void OpaqueRef :: bad_cast ( const OpaqueRef & from, const char * func, U32 lineno )
-    {
-        if ( from . obj != 0 )
-        {
-            // push hpp onto call stack
-            CallStk hpp ( hpp_src_loc, func );
-            ConstString func_str ( func, safe_strlen ( func ) );
-
-            // get actual type of object
-            const char * obj_class = typeid ( * from . obj ) . name ();
-            ConstString obj_class_str ( obj_class, safe_strlen ( obj_class ) );
-
-            // create the message string
-            StringBuffer msg ( "constructor '%s' failed to cast "
-                               "from implementation type '%s'",
-                               & func_str, & obj_class_str );
-
-            // now throw the exception
-            throw xc_unsupported_interface_err ( lineno, msg . to_str () );
-        }
-    }
-
-    OpaqueRef :: OpaqueRef ()
-        : obj ( 0 )
-        , caps ( 0 )
-    {
-    }
-
-    OpaqueRef :: ~ OpaqueRef ()
-    {
-        obj -> release ();
-        obj = 0;
-        caps = 0;
-    }
-
-    OpaqueRef :: OpaqueRef ( const OpaqueRef & r )
-        : obj ( r . obj -> duplicate () )
-        , caps ( r . caps )
-    {
-    }
-
-    void OpaqueRef :: operator = ( const OpaqueRef & r )
-    {
-        if ( obj != r . obj )
-        {
-            Refcount * dup = r . obj -> duplicate ();
-            obj -> release ();
-            obj = dup;
-        }
-        caps = r . caps;
-    }
-
-    OpaqueRef :: OpaqueRef ( const OpaqueRef & r, caps_t reduce )
-        : obj ( r . obj -> duplicate () )
-        , caps ( r . caps & ~ reduce )
-    {
-    }
-
-    OpaqueRef :: OpaqueRef ( Refcount * o, caps_t c )
-        : obj ( o -> duplicate () )
-        , caps ( c )
-    {
-    }
-}
diff --git a/vdb3/src/kfc/refcount.cpp b/vdb3/src/kfc/refcount.cpp
deleted file mode 100644
index c17224f..0000000
--- a/vdb3/src/kfc/refcount.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/refcount.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/atomic.hpp>
-#include <kfc/except.hpp>
-#include <kfc/memory.hpp>
-#include <kfc/memmgr.hpp>
-#include <kfc/rsrc.hpp>
-
-#ifndef _hpp_vdb3_kfc_memmgr_
-#include <stdlib.h>
-#endif
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * Refcount
-     *  base for reference-counted objects
-     */
-
-    void * Refcount :: operator new ( size_t bytes )
-    {
-        FUNC_ENTRY ();
-#if ! defined _hpp_vdb3_kfc_rsrc_ || ! defined _hpp_vdb3_kfc_memmgr_
-        return calloc ( 1, bytes );
-#else
-        assert ( rsrc != 0 );
-        return rsrc -> mmgr . _new ( bytes );
-#endif
-    }
-
-    void Refcount :: operator delete ( void * ptr )
-    {
-#ifndef _hpp_vdb3_kfc_memmgr_
-        free ( ptr );
-#else
-        assert ( rsrc != 0 );
-        return rsrc -> mmgr . _delete ( ptr );
-#endif
-    }
-
-    Refcount :: Refcount ()
-        : count ( 0 )
-    {
-    }
-
-    Refcount :: ~ Refcount ()
-    {
-        count = 0;
-    }
-
-    Refcount * Refcount :: duplicate ()
-    {
-        if ( this != 0 )
-        {
-            if ( count . inc_and_test () )
-            {
-                -- count;
-                FUNC_ENTRY ();
-                CONST_THROW ( xc_references_exhausted_err, "all available references to this object have been exhausted" );
-            }
-        }
-        return this;
-    }
-
-    void Refcount :: release ()
-    {
-        if ( this != 0 )
-        {
-            // if ( count >= 1 ) count -= 1;
-            switch ( count . read_and_sub_ge ( 1, 1 ) )
-            {
-            case 1:
-            {
-                FUNC_ENTRY ();
-                delete this;
-                break;
-            }
-            case 0:
-            {
-                FUNC_ENTRY ();
-                CONST_THROW ( xc_zombie_object_err, "attempt to release a zombie object" );
-            }}
-        }
-    }
-
-}
diff --git a/vdb3/src/kfc/rsrc.cpp b/vdb3/src/kfc/rsrc.cpp
deleted file mode 100644
index 08ae36e..0000000
--- a/vdb3/src/kfc/rsrc.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/rsrc.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/except.hpp>
-#include <kfc/caps.hpp>
-#include <kfc/array.hpp>
-#include "pmemmgr.hpp"
-#include "ptimemgr.hpp"
-#include "pfdmgr.hpp"
-#include "plogger.hpp"
-
-#if UNIX
-#include <kfc/fd.hpp>
-#else
-#error "unsupported target platform"
-#endif
-
-#include <stdio.h>
-
-namespace vdb3
-{
-
-    __thread Rsrc const * rsrc;
-
-    RsrcBase :: ~ RsrcBase ()
-    {
-        if ( rsrc == ( const Rsrc * ) this )
-            rsrc = 0;
-    }
-
-    Rsrc :: Rsrc ( rcaps_t mgrs )
-    {
-        if ( rsrc == 0 )
-        {
-            FUNC_ENTRY ();
-            CONST_THROW ( xc_program_state_violation, "at top of call stack" );
-        }
-
-        mmgr = rsrc -> mmgr;
-
-        if ( ( mgrs & RCAP_TMMGR ) != 0 )
-            tmmgr = rsrc -> tmmgr;
-
-        if ( ( mgrs & RCAP_FDMGR ) != 0 )
-            fdmgr = rsrc -> fdmgr;
-
-        if ( ( mgrs & RCAP_LOG ) != 0 )
-            log = rsrc -> log;
-
-        if ( ( mgrs & RCAP_ERR ) != 0 )
-            err = rsrc -> err;
-    }
-
-
-    Rsrc :: Rsrc ( const Rsrc & rsrc )
-        : mmgr ( rsrc . mmgr )
-        , tmmgr ( rsrc . tmmgr )
-        , fdmgr ( rsrc . fdmgr )
-        , log ( rsrc . log )
-        , err ( rsrc . err )
-    {
-    }
-
-    void Rsrc :: operator = ( const Rsrc & rsrc )
-    {
-        mmgr = rsrc . mmgr;
-        tmmgr = rsrc . tmmgr;
-        fdmgr = rsrc . fdmgr;
-        log = rsrc . log;
-        err = rsrc . err;
-    }
-
-    Rsrc :: ~ Rsrc ()
-    {
-    }
-
-    Rsrc :: Rsrc ( const MemMgr & pmmgr, const char * ident )
-        : mmgr ( pmmgr )
-    {
-        // one-shot latch
-        if ( rsrc != 0 )
-        {
-            assert ( callstk != 0 );
-            FUNC_ENTRY ();
-            CONST_THROW ( xc_program_state_violation, "not at top of call stack" );
-        }
-        rsrc = this;
-
-        try
-        {
-            // create obligatory resources
-            tmmgr = PrimordTimeMgr :: make_primordial ();
-            fdmgr = PrimordFDMgr :: make_primordial ();
-            log = plogger_t :: make ( ident );
-#if UNIX
-            FileDesc fd2 = fdmgr . make ( 2, CAP_WRITE );
-            err = Stream ( fd2 );
-#endif
-        }
-        catch ( exception & x )
-        {
-            NULTermString what = x . what ();
-            fprintf ( stderr, "ERROR: %s:\n", ( const char * ) what );
-#if _DEBUGGING
-            NULTermString stk = x . stack_trace ();
-            fprintf ( stderr, "%s\n", ( const char * ) stk );
-#endif
-        }
-    }
-
-    TopRsrc :: TopRsrc ( const char * ident )
-        : Rsrc ( PrimordMemMgr :: make_primordial (), ident )
-    {
-    }
-
-}
diff --git a/vdb3/src/kfc/stream.cpp b/vdb3/src/kfc/stream.cpp
deleted file mode 100644
index 07c9603..0000000
--- a/vdb3/src/kfc/stream.cpp
+++ /dev/null
@@ -1,395 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/stream.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/except.hpp>
-#include <kfc/caps.hpp>
-#include <kfc/rsrc.hpp>
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * StreamItf
-     *  an interface representing a stream of bytes ( bits? )
-     */
-
-    bytes_t StreamItf :: read ( const bytes_t & num_bytes,
-        Mem & dst, const bytes_t & start )
-    {
-        // should never have had the capabilities to issue message
-        // so this is an unsupported capability
-        // that should not have been granted
-        CONST_THROW ( xc_caps_over_extended_err, "unsupported read message" );
-    }
-
-    bytes_t StreamItf :: write ( const bytes_t & num_bytes,
-        const Mem & src, const bytes_t & start )
-    {
-        // should never have had the capabilities to issue message
-        // so this is an unsupported capability
-        // that should not have been granted
-        CONST_THROW ( xc_caps_over_extended_err, "unsupported write message" );
-    }
-
-    Stream StreamItf :: make_ref ( Refcount * obj, caps_t caps )
-    {
-        return Stream ( obj, this, caps );
-    }
-
-    void * StreamItf :: cast ( Refcount * obj )
-    {
-        return ( void * ) dynamic_cast < StreamItf * > ( obj );
-    }
-
-
-    /*------------------------------------------------------------------
-     * Stream
-     *  an object representing a stream of bytes ( bits? )
-     */
-
-    const U64 dflt_mtu = 128 * 1024;
-
-    // copy from source
-    // return the number of bytes actually copied
-    bytes_t Stream :: copy ( const Stream & src ) const
-    {
-        FUNC_ENTRY ();
-
-        // a null ref should act like nothing was there
-        // the behavior of /dev/null is a different concept
-        if ( null_ref () )
-            return bytes_t ( 0 );
-
-        // access stream
-        StreamItf * itf = get_itf ( CAP_PROP_READ | CAP_WRITE );
-
-        // allocate buffer
-        bytes_t mtu = itf -> get_mtu ();
-        Mem buffer = rsrc -> mmgr . alloc ( mtu, false );
-
-        // read from source
-        bytes_t num_read = src . read ( mtu, buffer, 0 );
-        if ( num_read == ( U64 ) 0 )
-            return num_read;
-
-        // write everything read
-        return write_all ( num_read, buffer, 0 );
-
-    }
-
-    bytes_t Stream :: copy ( const bytes_t & num_bytes, const Stream & src ) const
-    {
-        FUNC_ENTRY ();
-
-        // a null ref should act like nothing was there
-        // the behavior of /dev/null is a different concept
-        if ( null_ref () )
-            return bytes_t ( 0 );
-
-        // access stream
-        StreamItf * itf = get_itf ( CAP_PROP_READ | CAP_WRITE );
-
-        // allocate buffer
-        bytes_t mtu = itf -> get_mtu ();
-        if ( num_bytes < mtu )
-            mtu = num_bytes;
-        Mem buffer = rsrc -> mmgr . alloc ( mtu, false );
-
-        // read from source
-        bytes_t num_read = src . read ( mtu, buffer, 0 );
-        if ( num_read == ( U64 ) 0 )
-            return num_read;
-
-        // write everything read
-        return write_all ( num_read, buffer, 0 );
-    }
-
-    bytes_t Stream :: copy_all ( const Stream & src ) const
-    {
-        FUNC_ENTRY ();
-
-        // a null ref should act like nothing was there
-        // the behavior of /dev/null is a different concept
-        if ( null_ref () )
-            return bytes_t ( 0 );
-
-        // access stream
-        StreamItf * itf = get_itf ( CAP_PROP_READ | CAP_WRITE );
-
-        // allocate buffer
-        bytes_t mtu = itf -> get_mtu ();
-        Mem buffer = rsrc -> mmgr . alloc ( mtu, false );
-
-        // read from source
-        bytes_t num_read = src . read ( mtu, buffer, 0 );
-        if ( num_read == ( U64 ) 0 )
-            return num_read;
-
-        // write everything read
-        bytes_t total = write_all ( num_read, buffer, 0 );
-        assert ( total == num_read );
-
-        // enter loop to copy until end of stream
-        while ( 1 )
-        {
-            num_read = src . read ( mtu, buffer, 0 );
-            if ( num_read == ( U64 ) 0 )
-                break;
-
-            bytes_t num_writ = write_all ( num_read, buffer, 0 );
-            assert ( num_writ == num_read );
-            total += num_writ;
-        }
-
-        return total;
-    }
-
-    bytes_t Stream :: copy_all ( const bytes_t & num_bytes, const Stream & src ) const
-    {
-        FUNC_ENTRY ();
-
-        // a null ref should act like nothing was there
-        // the behavior of /dev/null is a different concept
-        if ( null_ref () )
-            return bytes_t ( 0 );
-
-        // access stream
-        StreamItf * itf = get_itf ( CAP_PROP_READ | CAP_WRITE );
-
-        // allocate buffer
-        bytes_t mtu = itf -> get_mtu ();
-        if ( num_bytes < mtu )
-            mtu = num_bytes;
-        Mem buffer = rsrc -> mmgr . alloc ( mtu, false );
-
-        // read from source
-        bytes_t num_read = src . read ( mtu, buffer, 0 );
-        if ( num_read == ( U64 ) 0 )
-            return num_read;
-
-        // write everything read
-        bytes_t total = write_all ( num_read, buffer, 0 );
-        assert ( total == num_read );
-
-        // enter loop to copy until end of stream
-        while ( 1 )
-        {
-            // TBD - must read with non-blocking timeout
-            num_read = src . read ( mtu, buffer, 0 );
-            if ( num_read == ( U64 ) 0 )
-                break;
-
-            bytes_t num_writ = write_all ( num_read, buffer, 0 );
-            assert ( num_writ == num_read );
-            total += num_writ;
-        }
-
-        return total;
-    }
-
-    bytes_t Stream :: read ( Mem & dst, index_t start ) const
-    {
-        FUNC_ENTRY ();
-
-        if ( start < 0 )
-            THROW ( xc_param_err, "bad start index: %ld", start );
-
-        bytes_t size = dst . size ();
-        if ( ( U64 ) start >= size )
-            return bytes_t ( 0 );
-
-        bytes_t to_read = size - ( U64 ) start;
-
-        if ( null_ref () )
-            return bytes_t ( 0 );
-
-        StreamItf * itf = get_itf ( CAP_PROP_READ | CAP_READ );
-
-        bytes_t mtu = itf -> get_mtu ();
-        if ( mtu < to_read )
-            to_read = mtu;
-
-        return itf -> read ( to_read, dst, start );
-    }
-
-    bytes_t Stream :: read ( const bytes_t & num_bytes, Mem & dst, index_t start ) const
-    {
-        FUNC_ENTRY ();
-
-        if ( start < 0 )
-            THROW ( xc_param_err, "bad start index: %ld", start );
-
-        bytes_t size = dst . size ();
-        if ( ( U64 ) start >= size )
-            return bytes_t ( 0 );
-
-        bytes_t to_read = size - ( U64 ) start;
-        if ( to_read > num_bytes )
-            to_read = num_bytes;
-
-        if ( null_ref () )
-            return bytes_t ( 0 );
-
-        StreamItf * itf = get_itf ( CAP_PROP_READ | CAP_READ );
-
-        bytes_t mtu = itf -> get_mtu ();
-        if ( mtu < to_read )
-            to_read = mtu;
-
-        return itf -> read ( to_read, dst, start );
-    }
-
-    bytes_t Stream :: write ( const Mem & src, index_t start ) const
-    {
-        FUNC_ENTRY ();
-
-        if ( start < 0 )
-            THROW ( xc_param_err, "bad start index: %ld", start );
-
-        bytes_t size = src . size ();
-        if ( ( U64 ) start >= size )
-            return bytes_t ( 0 );
-
-        bytes_t to_write = size - ( U64 ) start;
-
-        if ( null_ref () )
-            return bytes_t ( 0 );
-
-        StreamItf * itf = get_itf ( CAP_WRITE );
-
-        bytes_t mtu = itf -> get_mtu ();
-        if ( mtu < to_write )
-            to_write = mtu;
-
-        return itf -> write ( to_write, src, start );
-    }
-
-    bytes_t Stream :: write_all ( const Mem & src, index_t start ) const
-    {
-        FUNC_ENTRY ();
-
-        if ( start < 0 )
-            THROW ( xc_param_err, "bad start index: %ld", start );
-
-        bytes_t size = src . size ();
-        if ( ( U64 ) start >= size )
-            return bytes_t ( 0 );
-
-        bytes_t all_bytes = size - ( U64 ) start;
-
-        if ( null_ref () )
-            THROW ( xc_null_self_err, "wrote 0 of %lu bytes", ( U64 ) all_bytes );
-
-        StreamItf * itf = get_itf ( CAP_WRITE );
-
-        bytes_t mtu = itf -> get_mtu ();
-        bytes_t to_write = ( mtu < all_bytes ) ? mtu : all_bytes;
-
-        bytes_t total = itf -> write ( to_write, src, start );
-        while ( total < all_bytes )
-        {
-            to_write = all_bytes - total;
-            if ( mtu < to_write )
-                to_write = mtu;
-            bytes_t num_writ = itf -> write ( to_write, src, start + ( U64 ) total );
-            if ( num_writ == ( U64 ) 0 )
-                THROW ( xc_transfer_incomplete_err, "wrote %lu of %lu bytes", ( U64 ) total, ( U64 ) all_bytes );
-            total += num_writ;
-        }
-
-        return total;
-    }
-
-    bytes_t Stream :: write_all ( const bytes_t & num_bytes, const Mem & src, index_t start ) const
-    {
-        FUNC_ENTRY ();
-
-        if ( start < 0 )
-            THROW ( xc_param_err, "bad start index: %ld", start );
-
-        bytes_t size = src . size ();
-        if ( ( U64 ) start >= size )
-            return bytes_t ( 0 );
-
-        bytes_t all_bytes = size - ( U64 ) start;
-        if ( all_bytes > num_bytes )
-            all_bytes = num_bytes;
-
-        if ( null_ref () )
-            THROW ( xc_null_self_err, "wrote 0 of %lu bytes", ( U64 ) all_bytes );
-
-        StreamItf * itf = get_itf ( CAP_WRITE );
-
-        bytes_t mtu = itf -> get_mtu ();
-        bytes_t to_write = ( mtu < all_bytes ) ? mtu : all_bytes;
-
-        bytes_t total = itf -> write ( to_write, src, start );
-        while ( total < all_bytes )
-        {
-            to_write = all_bytes - total;
-            if ( mtu < to_write )
-                to_write = mtu;
-            bytes_t num_writ = itf -> write ( to_write, src, start + ( U64 ) total );
-            if ( num_writ == ( U64 ) 0 )
-                THROW ( xc_transfer_incomplete_err, "wrote %lu of %lu bytes", ( U64 ) total, ( U64 ) all_bytes );
-            total += num_writ;
-        }
-
-        return total;
-    }
-
-    Stream :: Stream ()
-    {
-    }
-
-    Stream :: Stream ( const Stream & r )
-        : Ref < StreamItf > ( r )
-    {
-    }
-
-    void Stream :: operator = ( const Stream & r )
-    {
-        Ref < StreamItf > :: operator = ( r );
-    }
-
-    Stream :: Stream ( const Stream & r, caps_t reduce )
-        : Ref < StreamItf > ( r, reduce )
-    {
-    }
-
-    Stream :: Stream ( const OpaqueRef & r )
-        : Ref < StreamItf > ( r, StreamItf :: cast )
-    {
-    }
-
-    Stream :: Stream ( Refcount * obj, StreamItf * itf, caps_t caps )
-        : Ref < StreamItf > ( obj, itf, caps )
-    {
-    }
-    
-}
diff --git a/vdb3/src/kfc/string.cpp b/vdb3/src/kfc/string.cpp
deleted file mode 100644
index 26a2b3e..0000000
--- a/vdb3/src/kfc/string.cpp
+++ /dev/null
@@ -1,1324 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/string.hpp>
-#include <kfc/caps.hpp>
-#include <kfc/memmgr.hpp>
-#include <kfc/except.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/rsrc.hpp>
-#include <kfc/array.hpp>
-#include <kfc/ptr.hpp>
-
-#include <string.h>
-#include <ctype.h>
-
-// TEMPORARY
-#include <stdio.h>
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * String
-     *  an immutable string object
-     */
-
-
-    // search for a character
-    index_t String :: find_first ( UTF32 ch ) const
-    {
-        FUNC_ENTRY ();
-
-        // if character and we are both ascii
-        if ( ch < 128 && mem . size () == ascii_size )
-            return mem . find_first ( ( U8 ) ch );
-
-        // UTF-8 operation
-        CONST_THROW ( xc_unimplemented_err, "UTF8" );
-    }
-
-    index_t String :: find_first ( UTF32 ch, index_t offset ) const
-    {
-        FUNC_ENTRY ();
-
-        // if index is invalid
-        if ( offset < 0 || ( count_t ) offset >= len )
-            return -1;
-
-        // if character and we are both ascii
-        if ( ch < 128 && mem . size () == ascii_size )
-            return mem . find_first ( ( U8 ) ch, offset );
-
-        // UTF-8 operation
-        CONST_THROW ( xc_unimplemented_err, "UTF8" );
-    }
-
-    index_t String :: find_first ( UTF32 ch, index_t offset, count_t _length ) const
-    {
-        FUNC_ENTRY ();
-
-        // if index is invalid
-        if ( offset < 0 || ( count_t ) offset >= len )
-            return -1;
-
-        // limit length
-        if ( _length + offset > len )
-            _length = len - offset;
-
-        // if character and we are both ascii
-        if ( ch < 128 && mem . size () == ascii_size )
-            return mem . find_first ( ( U8 ) ch, offset, _length );
-
-        // UTF-8 operation
-        CONST_THROW ( xc_unimplemented_err, "UTF8" );
-    }
-
-    String String :: substr ( index_t offset ) const
-    {
-        FUNC_ENTRY ();
-
-        // if index is invalid
-        if ( offset < 0 || ( count_t ) offset >= len )
-            return String ();
-
-        // new length
-        count_t _length = len - offset;
-
-        // detect all-ASCII characters
-        if ( mem . size () == ascii_size )
-        {
-            // can treat index as a byte offset
-            Mem m = mem . subrange ( offset, _length );
-            return String ( m, _length, _length );
-        }
-
-        // UTF-8 operation
-        // TBD - may need to have friend access
-        CONST_THROW ( xc_unimplemented_err, "UTF8" );
-    }
-
-    String String :: substr ( index_t offset, count_t _length ) const
-    {
-        FUNC_ENTRY ();
-
-        // if index is invalid
-        if ( offset < 0 || ( count_t ) offset >= len )
-            return String ();
-
-        // limit length
-        if ( _length + offset > len )
-            _length = len - offset;
-
-        // detect all-ASCII characters
-        if ( _length + offset <= ascii_size )
-        {
-            // can treat index as a byte offset
-            Mem m = mem . subrange ( offset, _length );
-            return String ( m, _length, _length );
-        }
-
-        // UTF-8 operation
-        // TBD - may need to have friend access
-        CONST_THROW ( xc_unimplemented_err, "UTF8" );
-    }
-
-    // split string at separator point
-    // removes separator if width is given
-    StringPair String :: split ( index_t offset ) const
-    {
-        FUNC_ENTRY ();
-
-        if ( offset < 0 )
-            return StringPair ( * this, String () );
-
-        String left = substr ( 0, offset );
-        String right = substr ( offset );
-
-        return StringPair ( left, right );
-    }
-
-    StringPair String :: split ( index_t offset, count_t sep_width ) const
-    {
-        FUNC_ENTRY ();
-
-        if ( offset < 0 )
-            return StringPair ( * this, String () );
-
-        String left = substr ( 0, offset );
-        String right = substr ( offset + sep_width );
-        return StringPair ( left, right );
-    }
-
-    String String :: toupper () const
-    {
-        FUNC_ENTRY ();
-
-        if ( mem . size () == ascii_size )
-        {
-            StringBuffer copy ( rsrc -> mmgr . alloc ( ascii_size, false ) );
-            copy . append ( * this );
-            copy . toupper ();
-            return copy . to_str ();
-        }
-
-        // UTF-8 operation
-        // TBD - may need to have friend access
-        CONST_THROW ( xc_unimplemented_err, "UTF8" );
-    }
-
-    String String :: trim () const
-    {
-        FUNC_ENTRY ();
-
-        String trimmed = * this;
-
-        if ( len == 0 )
-            return trimmed;
-
-        // access the character data
-        Ptr < ascii > start = mem;
-        Ptr < ascii > p = start;
-
-        // trim from end
-        bytes_t bytes = trimmed . mem . size ();
-        for ( p += ( I64 ) ( U64 ) bytes - 1; isspace ( * p ); -- p )
-        {
-            -- trimmed . len;
-            if ( trimmed . ascii_size == bytes )
-                -- trimmed . ascii_size;
-            if ( -- bytes == ( U64 ) 0 )
-                return String ();
-        }
-
-        // trim from start
-        for ( p = start; isspace ( * p ); ++ p )
-        {
-            -- trimmed . len;
-            if ( trimmed . ascii_size != ( U64 ) 0 )
-                -- trimmed . ascii_size;
-            if ( -- bytes == ( U64 ) 0 )
-                return String ();
-        }
-
-        index_t offset = p - start;
-        Mem m = trimmed . mem . subrange ( offset, bytes );
-        trimmed . mem = m;
-
-        return trimmed;
-    }
-
-    bool String :: operator == ( const String & s ) const
-    {
-        FUNC_ENTRY ();
-
-        if ( len == s . len && ascii_size == s . ascii_size )
-            return mem == s . mem;
-
-        return false;
-    }
-
-    bool String :: operator != ( const String & s ) const
-    {
-        FUNC_ENTRY ();
-
-        if ( len == s . len && ascii_size == s . ascii_size )
-            return mem != s . mem;
-
-        return true;
-    }
-
-    String :: String ()
-        : ascii_size ( 0 )
-        , len ( 0 )
-    {
-    }
-
-    String :: ~ String ()
-    {
-        ascii_size = 0;
-        len = 0;
-    }
-
-    String :: String ( const String & s )
-        : mem ( s . mem )
-        , ascii_size ( s . ascii_size )
-        , len ( s . len )
-    {
-    }
-
-    void String :: operator = ( const String & s )
-    {
-        mem = s . mem;
-        ascii_size = s . ascii_size;
-        len = s . len;
-    }
-
-    String :: String ( const String & s, caps_t reduce )
-        : mem ( s . mem, reduce )
-        , ascii_size ( s . ascii_size )
-        , len ( s . len )
-    {
-    }
-
-    String :: String ( const Mem & m, const bytes_t & ascii_sz, count_t _len )
-        : mem ( m, CAP_WRITE | CAP_RESIZE )
-        , ascii_size ( ascii_sz )
-        , len ( _len )
-    {
-        // ascii_sz <= _len <= sz
-        assert ( ( ascii_sz <= _len ) && ( _len <= m . size () ) );
-        // ascii_sz == m . size () || ( ascii_sz < _len < m . size () )
-        assert ( ( ascii_sz == m . size () ) || ( ascii_sz < _len && _len < m . size () ) );
-    }
-
-
-    /*------------------------------------------------------------------
-     * ConstString
-     *  create a String from constant data
-     */
-
-    ConstString :: ConstString ( const char * text, size_t bytes )
-        : String ( rsrc -> mmgr . make_const ( ( const void * ) text, bytes ), bytes, bytes )
-    {
-    }
-
-
-    /*------------------------------------------------------------------
-     * StringBuffer
-     *  an editible string object
-     */
-
-    String StringBuffer :: to_str () const
-    {
-        FUNC_ENTRY ();
-
-        Mem m = buffer . subrange ( 0, bytes );
-        return String ( m, ascii_size, len );
-    }
-
-    index_t StringBuffer :: find_first ( UTF32 ch ) const
-    {
-        FUNC_ENTRY ();
-
-        // if finding an ascii character ( i.e. byte )
-        if ( ch < 128 )
-        {
-            // if string is 100% ascii, then byte offsets == char idx
-            if ( ascii_size == bytes )
-                return buffer . find_first ( ( U8 ) ch );
-        }
-
-        // UTF-8 operation
-        // TBD - may need to have friend access
-        CONST_THROW ( xc_unimplemented_err, "UTF8" );
-    }
-
-    index_t StringBuffer :: find_first ( UTF32 ch, index_t starting_pos ) const
-    {
-        FUNC_ENTRY ();
-
-        // if finding an ascii character ( i.e. byte )
-        if ( ch < 128 )
-        {
-            // if string is 100% ascii, then byte offsets == char idx
-            if ( ascii_size == bytes )
-                return buffer . find_first ( ( U8 ) ch, starting_pos );
-        }
-
-        // UTF-8 operation
-        // TBD - may need to have friend access
-        CONST_THROW ( xc_unimplemented_err, "UTF8" );
-    }
-
-    StringBuffer & StringBuffer :: assign ( const String & s )
-    {
-        FUNC_ENTRY ();
-
-        // become empty
-        bytes = 0;
-        ascii_size = 0;
-        len = 0;
-
-        // append
-        return append ( s );
-    }
-
-    StringBuffer & StringBuffer :: assign ( const StringBuffer & s )
-    {
-        FUNC_ENTRY ();
-
-        // become empty
-        bytes = 0;
-        ascii_size = 0;
-        len = 0;
-
-        // append
-        return append ( s );
-    }
-
-    StringBuffer & StringBuffer :: assign ( const char * fmt, ... )
-    {
-        FUNC_ENTRY ();
-
-        // become empty
-        bytes = 0;
-        ascii_size = 0;
-        len = 0;
-
-        // append
-        va_list args;
-        va_start ( args, fmt );
-        vappend ( fmt, args );
-        va_end ( args );
-
-        return * this;
-    }
-
-    StringBuffer & StringBuffer :: vassign ( const char * fmt, va_list args )
-    {
-        FUNC_ENTRY ();
-
-        // become empty
-        bytes = 0;
-        ascii_size = 0;
-        len = 0;
-
-        // append
-        return vappend ( fmt, args );
-    }
-
-    StringBuffer & StringBuffer :: append ( const String & s )
-    {
-        FUNC_ENTRY ();
-
-        bytes_t amount = s . size ();
-        resize ( bytes + amount );
-
-        bytes += buffer . copy ( amount, bytes, s . mem, 0 );
-        if ( ascii_size == len )
-            ascii_size += s . ascii_size;
-        len += s . len;
-
-        return * this;
-    }
-
-    StringBuffer & StringBuffer :: append ( const StringBuffer & s )
-    {
-        FUNC_ENTRY ();
-
-        size_t amount = s . size ();
-        resize ( bytes + amount );
-
-        bytes += buffer . copy ( amount, bytes, s . buffer, 0 );
-        if ( ascii_size == len )
-            ascii_size += s . ascii_size;
-        len += s . len;
-
-        return * this;
-    }
-
-    StringBuffer & StringBuffer :: append ( const char * fmt, ... )
-    {
-        FUNC_ENTRY ();
-
-        va_list args;
-        va_start ( args, fmt );
-        vappend ( fmt, args );
-        va_end ( args );
-
-        return * this;
-    }
-
-    StringBuffer & StringBuffer :: vappend ( const char * fmt, va_list args )
-    {
-        // no harm, no foul
-        if ( fmt == 0 )
-            return * this;
-
-        FUNC_ENTRY ();
-
-        // loop over format
-        for ( size_t i = 0;; ++ i )
-        {
-            // search for '%'
-            size_t start;
-            bool end = true;
-            for ( start = i; fmt [ i ] != 0; ++ i )
-            {
-                if ( fmt [ i ] == '%' )
-                {
-                    end = false;
-                    break;
-                }
-            }
-
-            // append whatever literal string was given
-            if ( start < i )
-            {
-                ConstString s ( & fmt [ start ], i - start );
-                append ( s );
-            }
-
-            // detect end of fmt string
-            if ( end )
-                break;
-
-            // handle escaped percent sign
-            if ( fmt [ ++ i ] == '%' )
-            {
-                append ( '%' );
-            }
-            else if ( isalpha ( fmt [ i ] ) )
-            {
-                // handle simple substitution printf item
-                i = fappend_simple ( fmt, args, i );
-            }
-            else
-            {
-                // handle longer format printf item
-                i = fappend_long ( fmt, args, i );
-            }
-        }
-
-        return * this;
-    }
-
-    StringBuffer & StringBuffer :: append ( UTF32 ch )
-    {
-        return append ( ch, 1 );
-    }
-
-    StringBuffer & StringBuffer :: append ( UTF32 ch, count_t repeat )
-    {
-        FUNC_ENTRY ();
-
-        if ( ch >= 128 )
-        {
-            // UTF-8 operation
-            // TBD - may need to have friend access
-            CONST_THROW ( xc_unimplemented_err, "UTF8" );
-        }
-        else if ( ch != 0 )
-        {
-            resize ( bytes + repeat );
-            bytes += buffer . fill ( repeat, ( I64 ) ( U64 ) bytes, ( U8 ) ch );
-            if ( ascii_size == len )
-                ascii_size += repeat;
-            len += repeat;
-        }
-
-        return * this;
-    }
-
-    void StringBuffer :: reset ()
-    {
-        bytes = 0;
-        ascii_size = 0;
-        len = 0;
-    }
-
-    void StringBuffer :: trim ()
-    {
-        if ( bytes == ( U64 ) 0 )
-            return;
-
-        FUNC_ENTRY ();
-
-        // access the character data
-        Ptr < ascii > start = buffer;
-        Ptr < ascii > p = start;
-
-        // trim from end
-        for ( p += ( I64 ) ( U64 ) bytes - 1; isspace ( * p ); -- p )
-        {
-            -- len;
-            if ( ascii_size == bytes )
-                -- ascii_size;
-            if ( -- bytes == ( U64 ) 0 )
-                return;
-        }
-
-        // trim from start
-        for ( p = start; isspace ( * p ); ++ p )
-        {
-            -- len;
-            if ( ascii_size != ( U64 ) 0 )
-                -- ascii_size;
-            if ( -- bytes == ( U64 ) 0 )
-                return;
-        }
-
-        // if start was moved
-        index_t offset = p - start;
-        if ( offset > ( I64 ) 0 )
-        {
-            {
-                // create offset to start
-                Mem m = buffer . subrange ( offset );
-                buffer = m;
-            }
-
-            // resize to force discard
-            buffer . resize ( ( ( U64 ) bytes + 4095 ) & ~ ( U64 ) 4095, true );
-        }
-    }
-
-    bool StringBuffer :: trim_eoln ()
-    {
-        FUNC_ENTRY ();
-
-        bool trimmed = false;
-
-        if ( bytes != ( U64 ) 0 )
-        {
-            // access character data
-            Ptr < ascii > p = buffer;
-
-            // must end with '\n'
-            if ( p [ ( U64 ) bytes - 1 ] == '\n' )
-            {
-                // going to trim
-                trimmed = true;
-
-                // detect CRLF
-                if ( ( U64 ) bytes >= 2 && p [ ( U64 ) bytes - 2 ] == '\r' )
-                {
-                    len -= ( U64 ) 2;
-                    if ( ascii_size == bytes )
-                        ascii_size -= ( U64 ) 2;
-                    bytes -= ( U64 ) 2;
-                }
-                else
-                {
-                    len -= ( U64 ) 1;
-                    if ( ascii_size == bytes )
-                        ascii_size -= ( U64 ) 1;
-                    bytes -= ( U64 ) 1;
-                }
-            }
-        }
-
-        return trimmed;
-    }
-
-    void StringBuffer :: toupper ()
-    {
-        FUNC_ENTRY ();
-
-        // UTF-8 operation
-        if ( bytes != ascii_size )
-            CONST_THROW ( xc_unimplemented_err, "UTF8" );
-
-        Array < char > a = buffer;
-        for ( count_t i = 0; i < len; ++ i )
-        {
-            char ch = a [ i ];
-            a [ i ] = :: toupper ( ch );
-        }
-    }
-
-    StringBuffer :: StringBuffer ()
-        : buffer ( rsrc -> mmgr . alloc ( 0, false ) )
-        , bytes ( 0 )
-        , ascii_size ( 0 )
-        , len ( 0 )
-    {
-    }
-
-    StringBuffer :: ~ StringBuffer ()
-    {
-        reset ();
-    }
-
-    StringBuffer :: StringBuffer ( const Mem & m )
-        : buffer ( m )
-        , bytes ( 0 )
-        , ascii_size ( 0 )
-        , len ( 0 )
-    {
-    }
-
-    StringBuffer :: StringBuffer ( const char * fmt, ... )
-        : buffer ( rsrc -> mmgr . alloc ( 0, false ) )
-        , bytes ( 0 )
-        , ascii_size ( 0 )
-        , len ( 0 )
-    {
-        FUNC_ENTRY ();
-
-        va_list args;
-        va_start ( args, fmt );
-        vappend ( fmt, args );
-        va_end ( args );
-    }
-
-    StringBuffer :: StringBuffer ( const char * fmt, va_list args )
-        : buffer ( rsrc -> mmgr . alloc ( 0, false ) )
-        , bytes ( 0 )
-        , ascii_size ( 0 )
-        , len ( 0 )
-    {
-        FUNC_ENTRY ();
-
-        vappend ( fmt, args );
-    }
-
-    size_t StringBuffer :: fappend_simple ( const char * fmt, va_list args, size_t i )
-    {
-        FUNC_ENTRY ();
-
-        I64 i64;
-        U64 u64;
-        //F64 f64;
-        UTF32 ch;
-        U32 j, base;
-        bool neg = false;
-        const String * str;
-        ascii num [ 256 ];
-
-        const ascii * chmap = "0123456789abcdefghijklmnopqrstuvwxyz";
-
-        // simple argument, no formatting
-        switch ( fmt [ i ] )
-        {
-        case 'u':
-            u64 = va_arg ( args, U32 );
-
-        cvt_decimal_int:
-            base = 10;
-
-        cvt_integer:
-            j = sizeof num;
-            if ( u64 == 0 )
-                num [ -- j ] = '0';
-            else do
-            {
-                num [ -- j ] = chmap [ u64 % base ];
-                u64 /= base;
-            }
-            while ( u64 != 0 );
-
-            if ( neg )
-                num [ -- j ] = '-';
-
-            {
-                ConstString nstr ( & num [ j ], sizeof num - j );
-                append ( nstr );
-            }
-            break;
-
-        case 'l':
-            switch ( fmt [ ++ i ] )
-            {
-            case 'u':
-                u64 = va_arg ( args, U64 );
-                goto cvt_decimal_int;
-                
-            case 'd':
-            case 'i':
-                i64 = va_arg ( args, I64 );
-                if ( i64 >= 0 )
-                {
-                    u64 = i64;
-                    goto cvt_decimal_int;
-                }
-                u64 = -i64;
-                neg = true;
-                goto cvt_decimal_int;
-
-            case 'X':
-                chmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-            case 'x':
-                u64 = va_arg ( args, U64 );
-                base = 16;
-                goto cvt_integer;
-
-            case 'o':
-                u64 = va_arg ( args, U64 );
-                base = 8;
-                goto cvt_integer;
-
-            case 'b':
-                u64 = va_arg ( args, U64 );
-                base = 2;
-                goto cvt_integer;
-
-            default:
-                THROW ( xc_bad_fmt_err, "expected one of [udiXxob] after length modifier 'l' but found '%c'", fmt [ i ] );
-            }
-            break;
-
-        case 'z':
-            switch ( fmt [ ++ i ] )
-            {
-            case 'u':
-                u64 = va_arg ( args, size_t );
-                goto cvt_decimal_int;
-
-            case 'X':
-                chmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-            case 'x':
-                u64 = va_arg ( args, size_t );
-                base = 16;
-                goto cvt_integer;
-
-            case 'o':
-                u64 = va_arg ( args, size_t );
-                base = 8;
-                goto cvt_integer;
-
-            case 'b':
-                u64 = va_arg ( args, size_t );
-                base = 2;
-                goto cvt_integer;
-
-            default:
-                THROW ( xc_bad_fmt_err, "expected one of [uXxob] after length modifier 'z' but found '%c'", fmt [ i ] );
-            }
-            break;
-
-        case 'd':
-        case 'i':
-            i64 = va_arg ( args, I32 );
-            if ( i64 >= 0 )
-            {
-                u64 = i64;
-                goto cvt_decimal_int;
-            }
-            u64 = -i64;
-            neg = true;
-            goto cvt_decimal_int;
-
-        case 'X':
-            chmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-        case 'x':
-            u64 = va_arg ( args, U32 );
-            base = 16;
-            goto cvt_integer;
-
-        case 'o':
-            u64 = va_arg ( args, U32 );
-            base = 8;
-            goto cvt_integer;
-            
-        case 'b':
-            u64 = va_arg ( args, U32 );
-            base = 2;
-            goto cvt_integer;
-
-        case 's':
-            str = va_arg ( args, const String * );
-            if ( str == 0 )
-                append ( CONST_STRING ( "(null)" ) );
-            else
-                append ( * str );
-            break;
-
-        case 'c':
-            ch = va_arg ( args, UTF32 );
-            append ( ch );
-            break;
-
-        case 'f':
-        case 'e':
-        case 'g':
-        {
-            // TBD
-            char fmt2 [ 2 ];
-            fmt2 [ 0 ] = fmt [ i ];
-            fmt2 [ 1 ] = 0;
-            j = vsnprintf ( num, sizeof num, fmt2, args );
-            ConstString fstr ( num, j );
-            append ( fstr );
-            break;
-        }
-
-        case 'h':
-            switch ( fmt [ ++ i ] )
-            {
-            case 'u':
-                u64 = ( U16 ) va_arg ( args, U32 );
-                goto cvt_decimal_int;
-
-            case 'd':
-            case 'i':
-                i64 = ( I16 ) va_arg ( args, I32 );
-                if ( i64 >= 0 )
-                {
-                    u64 = i64;
-                    goto cvt_decimal_int;
-                }
-                u64 = -i64;
-                neg = true;
-                goto cvt_decimal_int;
-                
-            case 'X':
-                chmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-            case 'x':
-                u64 = ( U16 ) va_arg ( args, U32 );
-                base = 16;
-                goto cvt_integer;
-
-            case 'o':
-                u64 = ( U16 ) va_arg ( args, U32 );
-                base = 8;
-                goto cvt_integer;
-
-            case 'b':
-                u64 = ( U16 ) va_arg ( args, U32 );
-                base = 2;
-                goto cvt_integer;
-
-            default:
-                THROW ( xc_bad_fmt_err, "expected one of [udiXxob] after length modifier 'h' but found '%c'", fmt [ i ] );
-            }
-            break;
-
-        case 't':
-            switch ( fmt [ ++ i ] )
-            {
-            case 'u':
-                u64 = ( U8 ) va_arg ( args, U32 );
-                goto cvt_decimal_int;
-                
-            case 'd':
-            case 'i':
-                i64 = ( I8 ) va_arg ( args, I32 );
-                if ( i64 >= 0 )
-                {
-                    u64 = i64;
-                    goto cvt_decimal_int;
-                }
-                u64 = -i64;
-                neg = true;
-                goto cvt_decimal_int;
-
-            case 'X':
-                chmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-            case 'x':
-                u64 = ( U8 ) va_arg ( args, U32 );
-                base = 16;
-                goto cvt_integer;
-
-            case 'o':
-                u64 = ( U8 ) va_arg ( args, U32 );
-                base = 8;
-                goto cvt_integer;
-
-            case 'b':
-                u64 = ( U8 ) va_arg ( args, U32 );
-                base = 2;
-                goto cvt_integer;
-                
-            default:
-                THROW ( xc_bad_fmt_err, "expected one of [udiXxob] after length modifier 't' but found '%c'", fmt [ i ] );
-            }
-            break;
-        }
-
-        return i;
-    }
-
-    size_t StringBuffer :: fappend_long ( const char * fmt, va_list args, size_t i )
-    {
-        FUNC_ENTRY ();
-
-        I64 i64;
-        U64 u64;
-        F64 f64;
-        UTF32 ch;
-        U32 j, k, base;
-        const String * str;
-        ascii num [ 256 ];
-
-        const ascii * chmap = "0123456789abcdefghijklmnopqrstuvwxyz";
-
-        // perform a full format
-        ascii use_sign = 0;
-        ascii padding = ' ';
-        U64 digits = 0;
-        bool left_align = false;
-        bool comma_separate = false;
-        bool alternate = false;
-
-        // FLAGS
-        while ( 1 )
-        {
-            switch ( fmt [ i ] )
-            {
-            case '-':
-                left_align = true;
-                padding = ' ';
-                ++ i;
-                continue;
-            case '+':
-                use_sign = '+';
-                ++ i;
-                continue;
-            case ' ':
-                if ( use_sign != '+' )
-                    use_sign = ' ';
-                ++ i;
-                continue;
-            case '0':
-                if ( ! left_align )
-                    padding = '0';
-                ++ i;
-                continue;
-            case ',':
-            case '\'':
-                comma_separate = true;
-                ++ i;
-                continue;
-            case '#':
-                alternate = true;
-                ++ i;
-                continue;
-            }
-
-            break;
-        }
-
-        // zero padding is weird if comma-separating
-        if ( comma_separate )
-            padding = ' ';
-
-        // FIELD WIDTH
-        U64 min_field_width = 0;
-        if ( fmt [ i ] == '*' )
-        {
-            min_field_width = va_arg ( args, size_t );
-            ++ i;
-        }
-        else for ( ; isdigit ( fmt [ i ] ); ++ i )
-        {
-            min_field_width *= 10;
-            min_field_width += fmt [ i ] - '0';
-        }
-
-        // PRECISION
-        U64 precision = 0;
-        bool have_precision = false;
-        if ( fmt [ i ] == '.' )
-        {
-            padding = ' ';
-            have_precision = true;
-            if ( fmt [ i ] == '*' )
-            {
-                precision = va_arg ( args, size_t );
-                ++ i;
-            }
-            else for ( ; isdigit ( fmt [ i ] ); ++ i )
-            {
-                precision *= 10;
-                precision += fmt [ i ] - '0';
-            }
-        }
-
-        // STORAGE SIZE
-        U8 arg_size = sizeof ( U32 );
-        bool date_time_zone = false;
-        switch ( fmt [ i ] )
-        {
-        case 't':
-            arg_size = sizeof ( U8 );
-            ++ i;
-            break;
-        case 'h':
-            arg_size = sizeof ( U16 );
-            ++ i;
-            break;
-        case 'l':
-            arg_size = sizeof ( U64 );
-            ++ i;
-            break;
-        case 'z':
-            date_time_zone = true;
-            arg_size = sizeof ( size_t );
-            ++ i;
-            break;
-        }
-
-        // ARGUMENT
-        switch ( fmt [ i ] )
-        {
-        case 'u':
-        case 'X':
-        case 'x':
-        case 'o':
-        case 'b':
-            use_sign = 0;
-            switch ( arg_size )
-            {
-            case 1:
-                u64 = ( U8 ) va_arg ( args, U32 );
-                break;
-            case 2:
-                u64 = ( U16 ) va_arg ( args, U32 );
-                break;
-            case 4:
-                u64 = va_arg ( args, U32 );
-                break;
-            case 8:
-                u64 = va_arg ( args, U64 );
-                break;
-            }
-            break;
-
-        case 'd':
-        case 'i':
-            switch ( arg_size )
-            {
-            case 1:
-                i64 = ( I8 ) va_arg ( args, I32 );
-                break;
-            case 2:
-                i64 = ( I16 ) va_arg ( args, I32 );
-                break;
-            case 4:
-                i64 = va_arg ( args, I32 );
-                break;
-            case 8:
-                i64 = va_arg ( args, I64 );
-                break;
-            }
-
-            if ( i64 < 0 )
-            {
-                u64 = - i64;
-                use_sign = '-';
-            }
-            else
-            {
-                if ( i64 == 0 )
-                    use_sign = 0;
-                u64 = i64;
-            }
-            break;
-        }
-
-        // FORMAT
-        U32 comma_mag = 3;
-        ascii comma = ',';
-        //bool floating_comma = false;
-        U64 field_width, total_field_width;
-        switch ( fmt [ i ] )
-        {
-        case 'u':
-        case 'd':
-        case 'i':
-            base = 10;
-
-        l_cvt_integer:
-
-            j = sizeof num;
-            if ( u64 == 0 )
-            {
-                num [ -- j ] = '0';
-                digits = 1;
-            }
-            else if ( comma_separate )
-            {
-                for ( k = 0, digits = 0; u64 != 0; ++ digits, ++ k )
-                {
-                    if ( k == comma_mag )
-                    {
-                        num [ -- j ] = comma;
-                        k = 0;
-                    }
-                    num [ -- j ] = chmap [ u64 % base ];
-                    u64 /= base;
-                }
-                for ( ; digits < precision && j != 0; ++ digits, ++ k )
-                {
-                    if ( k == comma_mag )
-                    {
-                        num [ -- j ] = comma;
-                        k = 0;
-                        if ( j == 0 )
-                            break;
-                    }
-                    num [ -- j ] = 0;
-                }
-            }
-            else for ( digits = 0; u64 != 0; ++ digits )
-            {
-                num [ -- j ] = chmap [ u64 % base ];
-                u64 /= base;
-            }
-
-            field_width = sizeof num - j;
-
-        insert_num:
-
-            total_field_width = field_width + ( use_sign != 0 );
-
-            if ( left_align )
-            {
-                if ( use_sign != 0 )
-                    append ( use_sign );
-
-                append ( ConstString ( & num [ j ], field_width ) );
- 
-                if ( total_field_width < min_field_width )
-                    append ( ' ', min_field_width - total_field_width );
-            }
-            else
-            {
-                // check sign and padding
-                if ( use_sign != 0 && padding == '0' )
-                {
-                    append ( use_sign );
-                    use_sign = 0;
-                }
-
-                // apply padding
-                if ( total_field_width < min_field_width )
-                    append ( padding, min_field_width - total_field_width );
-
-                // sign again
-                if ( use_sign != 0 )
-                    append ( use_sign );
-
-                // now the numeral
-                append ( ConstString ( & num [ j ], field_width ) );
-            }
-
-            break;
-
-
-        case 'X':
-            chmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-        case 'x':
-            base = 16;
-            comma_mag = 4;
-            goto l_cvt_integer;
-        case 'o':
-            base = 8;
-            goto l_cvt_integer;
-        case 'b':
-            base = 2;
-            comma_mag = 8;
-            goto l_cvt_integer;
-
-        case 's':
-        {
-            String null_str = CONST_STRING ( "(null)" );
-            str = va_arg ( args, const String * );
-            if ( str == 0 )
-                str = & null_str;
-
-            field_width = str -> length ();
-            if ( field_width >= min_field_width )
-            {
-                append ( * str );
-            }
-            else if ( left_align )
-            {
-                append ( * str );
-                append ( ' ', min_field_width - field_width );
-            }
-            else
-            {
-                append ( ' ', min_field_width - field_width );
-                append ( * str );
-            }
-
-            break;
-        }
-
-        case 'c':
-            ch = va_arg ( args, UTF32 );
-
-            field_width = 1;
-            if ( field_width >= min_field_width )
-            {
-                append ( ch );
-            }
-            else if ( left_align )
-            {
-                append ( ch );
-                append ( ' ', min_field_width - field_width );
-            }
-            else
-            {
-                append ( ' ', min_field_width - field_width );
-                append ( ch );
-            }
-            break;
-
-        case 'f':
-        case 'e':
-        case 'g':
-        {
-            f64 = va_arg ( args, F64 );
-            if ( f64 < 0 )
-            {
-                use_sign = '-';
-                f64 = - f64;
-            }
-
-            char fmt2 [ 16 ];
-            j = 0;
-            if ( alternate )
-                fmt2 [ j ++ ] = '#';
-            if ( min_field_width != 0 )
-                j += snprintf ( & fmt2 [ j ], sizeof fmt2 - j, "%u", ( U32 ) min_field_width );
-            if ( have_precision )
-            {
-                fmt2 [ j ++ ] = '.';
-                if ( precision != 0 )
-                    j += snprintf ( & fmt2 [ j ], sizeof fmt2 - j, "%u", ( U32 ) precision );
-            }
-            fmt2 [ j ++ ] = fmt [ i ];
-            fmt2 [ j ] = 0;
-
-            field_width = snprintf ( num, sizeof num, fmt2, f64 );
-            j = 0;
-            goto insert_num;
-        }
-
-        default:
-            // TBD - extract UTF32 character
-            THROW ( xc_bad_fmt_err, "expected one of [udiXxobscfeg] but found '%c'", fmt [ i ] );
-        }
-
-        return i;
-    }
-
-    void StringBuffer :: resize ( const bytes_t & new_size )
-    {
-        if ( new_size > buffer . size () )
-        {
-            FUNC_ENTRY ();
-
-            U64 rounded_size = ( ( U64 ) new_size + 4095 ) & ~ ( U64 ) 4095;
-            buffer . resize ( rounded_size, true );
-        }
-    }
-    
-}
diff --git a/vdb3/src/kfc/syserr.cpp b/vdb3/src/kfc/syserr.cpp
deleted file mode 100644
index f240386..0000000
--- a/vdb3/src/kfc/syserr.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/syserr.hpp>
-#include <kfc/rsrc.hpp>
-#include <kfc/except.hpp>
-
-#if UNIX
-#include <string.h>
-#else
-#error "unsupported target platform"
-#endif
-
-namespace vdb3
-{
-
-    static
-    String tmp_syserr ( int err_code, char * buffer, size_t bsize )
-    {
-#if UNIX
-        // get the error string from libc
-        strerror_r ( err_code, buffer, bsize );
-
-        // turn it into a temporary ConstString
-        return ConstString ( buffer, strlen ( buffer ) );
-#endif
-    }
-
-    // returns a system error string
-    String SysErr( int err_code )
-    {
-        // get SysErras a tmp ConstString
-        char buffer [ 4096 ];
-        String str = tmp_syserr ( err_code, buffer, sizeof buffer );
-
-        // allocate memory for a copy
-        Mem m = rsrc -> mmgr . alloc ( str . size (), false );
-
-        // create a string buffer
-        StringBuffer sb ( m );
-
-        // copy in the string
-        sb . append ( str );
-
-        // now return the safe string
-        return sb . to_str ();
-    }
-
-    // throws a runtime error
-    void ThrowOSErr( U32 lineno, const String & func_name, int err_code )
-    {
-        String msg;
-
-        try
-        {
-            // get SysErras a tmp ConstString
-            char buffer [ 4096 ];
-            String str = tmp_syserr ( err_code, buffer, sizeof buffer );
-
-            // create a string buffer
-            StringBuffer sb ( "%s() returned %d: '%s'", & func_name, err_code, & str );
-
-            msg = sb . to_str ();
-        }
-        catch ( ... )
-        {
-            msg = CONST_STRING ( "<error creating SysErrstring>" );
-        }
-
-        // throw exception
-        throw runtime_err ( lineno, msg );
-    }
-
-}
diff --git a/vdb3/src/kfc/task-impl.cpp b/vdb3/src/kfc/task-impl.cpp
deleted file mode 100644
index e07b3ac..0000000
--- a/vdb3/src/kfc/task-impl.cpp
+++ /dev/null
@@ -1,352 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb3/task-impl.hpp>
-#include <vdb3/callstk.hpp>
-#include <vdb3/except.hpp>
-#include <vdb3/caps.hpp>
-
-#include <string.h>
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * rsrc_stk_t
-     *  a class of general utility, but for now private to task
-     */
-    class rsrc_stk_t
-    {
-    public:
-
-        rsrc_stk_t ( const Rsrc * new_rsrc )
-            : old_rsrc ( rsrc )
-        { rsrc = new_rsrc; }
-
-        ~ rsrc_stk_t ()
-        { rsrc = old_rsrc; }
-
-    private:
-
-        const Rsrc * volatile old_rsrc;
-    };
-
-    /*------------------------------------------------------------------
-     * TaskImpl
-     */
-
-    bool TaskImpl :: run ()
-    {
-        FUNC_ENTRY ();
-
-        for ( task_state_t cur = state . read (); cur != ts_complete; )
-        {
-            // hold this value for comparison of our assumption
-            task_state_t cmp = cur;
-            task_state_t trans = ts_invalid;
-
-            switch ( cur )
-            {
-            case ts_unprepared:
-
-                // going to enter preparation state
-                trans = ts_preparing;
-                cur = state . test_and_set ( cmp, trans );
-                if ( cur == cmp )
-                {
-                    // this thread now has exclusive ability to prepare task
-                    cur = cmp = trans;
-                    {
-                        rsrc_stk_t stk ( & task_rsrc );
-                        prepare ();
-                    }
-
-                    // preparation completed
-                    // transition to initial run state
-                    trans = ts_initial;
-
-                    cur = state . test_and_set ( cmp, trans );
-                    if ( cur == ts_presuspend )
-                        cur = state . test_and_set ( cmp = cur, trans );
-
-                }
-                break;
-
-            case ts_updating:
-                CONST_THROW ( xc_task_busy_err, "task is currently being updated" );
-
-            case ts_preparing:
-            case ts_presuspend:
-                CONST_THROW ( xc_task_busy_err, "task is currently preparing" );
-
-            case ts_initial:
-            case ts_ready:
-            case ts_suspended:
-
-                // going to enter running state
-                trans = ts_running;
-                cur = state . test_and_set ( cmp, trans );
-                if ( cur == cmp )
-                {
-                    cur = trans;
-
-                    // this thread now has exclusive ability to run task
-                    bool done = false;
-                    {
-                        // push task resources onto stack
-                        rsrc_stk_t stk ( & task_rsrc );
-
-                        // run/resume the task
-                        done = ( cmp == ts_suspended ) ? resume () : execute ();
-                    }
-
-                    // the run completed
-                    // transition based upon indication of done
-                    trans = done ? ts_complete : ts_ready;
-
-                    // clean up state
-                    cur = state . test_and_set ( cmp = cur, trans );
-                    if ( cur == ts_suspending )
-                        cur = state . test_and_set ( cmp = cur, trans );
-
-                    // execution was successful, regardless of final state
-                    return done;
-                }
-                break;
-
-            case ts_running:
-            case ts_suspending:
-                CONST_THROW ( xc_task_busy_err, "task is currently executing" );
-
-            default:
-                assert ( cur != ts_complete );
-                THROW ( xc_task_invalid_err, "task is in an invalid state: ( 0x%X )", state . read () );
-            }
-
-            if ( cur == cmp )
-                cur = trans;
-        }
-
-        return true;
-    }
-
-    void TaskImpl :: suspend ()
-    {
-        FUNC_ENTRY ();
-
-        for ( task_state_t cur = state . read (); cur != ts_complete; )
-        {
-            task_state_t cmp = cur;
-            task_state_t trans = ts_invalid;
-
-            switch ( cur )
-            {
-            case ts_unprepared:
-                return;
-
-            case ts_updating:
-                CONST_THROW ( xc_task_busy_err, "task is currently being updated" );
-
-            case ts_preparing:
-                trans = ts_presuspend;
-                cur = state . test_and_set ( cmp, trans );
-                break;
-
-            case ts_presuspend:
-            case ts_initial:
-                return;
-
-            case ts_ready:
-                trans = ts_suspended;
-                cur = state . test_and_set ( cmp, trans );
-                break;
-
-            case ts_suspended:
-                return;
-
-            case ts_running:
-                trans = ts_suspending;
-                cur = state . test_and_set ( cmp, trans );
-                break;
-
-            case ts_suspending:
-                return;
-
-            default:
-                assert ( cur != ts_complete );
-                THROW ( xc_task_invalid_err, "task is in an invalid state: ( 0x%X )", cur );
-            }
-
-            if ( cur == cmp )
-                cur = trans;
-        }
-    }
-
-    void TaskImpl :: checkpoint ()
-    {
-        FUNC_ENTRY ();
-
-        // the task must be in initial or suspended state
-
-        CONST_THROW ( xc_unimplemented_err, "unimplemented" );
-    }
-
-    void TaskImpl :: restart ()
-    {
-        FUNC_ENTRY ();
-
-        // the task must be in initial or suspended state
-
-        CONST_THROW ( xc_unimplemented_err, "unimplemented" );
-    }
-
-    TaskImpl :: ~ TaskImpl ()
-    {
-    }
-
-    bool TaskImpl :: prepare ()
-    {
-        // nothing to do
-        return true;
-    }
-
-    bool TaskImpl :: resume ()
-    {
-        FUNC_ENTRY ();
-
-        // nothing special about this resume
-        // just run the task
-        return execute ();
-    }
-
-    void TaskImpl :: save ()
-    {
-        // no state to save
-    }
-
-    void TaskImpl :: restore ()
-    {
-        // no state to be restored
-    }
-
-    TaskImpl :: TaskImpl ()
-        : task_rsrc ( RCAP_ALL )
-        , state ( ts_unprepared )
-    {
-    }
-
-    TaskImpl :: TaskImpl ( rcaps_t caps )
-        : task_rsrc ( caps )
-        , state ( ts_unprepared )
-    {
-    }
-
-    void TaskImpl :: set_rsrc ( const Rsrc & rsrc )
-    {
-        FUNC_ENTRY ();
-
-        for ( task_state_t cur = state . read (); cur != ts_complete; )
-        {
-            task_state_t cmp = cur;
-            task_state_t trans = ts_invalid;
-
-            switch ( cur )
-            {
-            case ts_preparing:
-            case ts_presuspend:
-            case ts_running:
-            case ts_suspending:
-
-                trans = ts_updating;
-                cur = state . test_and_set ( cmp, trans );
-                if ( cur == cmp )
-                {
-                    cur = trans;
-                    try
-                    {
-                        task_rsrc = rsrc;
-                    }
-                    catch ( ... )
-                    {
-                        state = cmp;
-                        throw;
-                    }
-
-                    state = cmp;
-                    return;
-                }
-                break;
-
-            case ts_unprepared:
-            case ts_updating:
-            case ts_initial:
-            case ts_ready:
-            case ts_suspended:
-                CONST_THROW ( xc_program_state_violation, "cannot set task resources in current state" );
-
-            default:
-                THROW ( xc_task_invalid_err, "task is in an invalid state: ( 0x%X )", cur );
-            }
-
-            if ( cur == cmp )
-                cur = trans;
-        }
-    }
-
-    void TaskImpl :: set_complete ()
-    {
-        FUNC_ENTRY ();
-
-        for ( task_state_t cur = state . read (); cur != ts_complete; )
-        {
-            task_state_t cmp = cur;
-            task_state_t trans = ts_invalid;
-
-            switch ( cur )
-            {
-            case ts_preparing:
-            case ts_presuspend:
-            case ts_running:
-            case ts_suspending:
-                trans = ts_complete;
-                cur = state . test_and_set ( cur, trans );
-                break;
-
-            case ts_unprepared:
-            case ts_initial:
-            case ts_ready:
-            case ts_suspended:
-                CONST_THROW ( xc_program_state_violation, "cannot set task resources in current state" );
-
-            default:
-                THROW ( xc_task_invalid_err, "task is in an invalid state: ( 0x%X )", cur );
-            }
-
-            if ( cur == cmp )
-                cur = trans;
-        }
-    }
-}
diff --git a/vdb3/src/kfc/task.cpp b/vdb3/src/kfc/task.cpp
deleted file mode 100644
index b195176..0000000
--- a/vdb3/src/kfc/task.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <vdb3/task.hpp>
-#include <vdb3/caps.hpp>
-#include <vdb3/callstk.hpp>
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * TaskItf
-     */
-
-    Task TaskItf :: make_ref ( Refcount * obj, caps_t caps )
-    {
-        return Task ( obj, this, caps );
-    }
-
-    void * TaskItf :: cast ( Refcount * obj )
-    {
-        return ( void * ) dynamic_cast < TaskItf * > ( obj );
-    }
-
-    /*------------------------------------------------------------------
-     * Task
-     */
-
-    bool Task :: run ()
-    {
-        FUNC_ENTRY ();
-        TaskItf * itf = get_itf ( CAP_EXECUTE );
-        return itf -> run ();
-    }
-
-    void Task :: suspend ()
-    {
-        FUNC_ENTRY ();
-        TaskItf * itf = get_itf ( CAP_SUSPEND );
-        itf -> suspend ();
-    }
-
-    void Task :: checkpoint ()
-    {
-        FUNC_ENTRY ();
-        TaskItf * itf = get_itf ( CAP_READ );
-        itf -> checkpoint ();
-    }
-
-    void Task :: restart ()
-    {
-        FUNC_ENTRY ();
-        TaskItf * itf = get_itf ( CAP_WRITE );
-        itf -> restart ();
-    }
-
-    Task :: Task ()
-    {
-    }
-
-    Task :: Task ( const Task & r )
-        : Ref < TaskItf > ( r )
-    {
-    }
-
-    void Task :: operator = ( const Task & r )
-    {
-        Ref < TaskItf > :: operator = ( r );
-    }
-
-    Task :: Task ( const Task & r, caps_t reduce )
-        : Ref < TaskItf > ( r, reduce )
-    {
-    }
-
-    Task :: Task ( const OpaqueRef & r )
-        : Ref < TaskItf > ( r, TaskItf :: cast )
-    {
-    }
-
-    Task :: Task ( Refcount * obj, TaskItf * itf, caps_t caps )
-        : Ref < TaskItf > ( obj, itf, caps )
-    {
-    }
-
-}
diff --git a/vdb3/src/kfc/time.cpp b/vdb3/src/kfc/time.cpp
deleted file mode 100644
index 8f0a5b4..0000000
--- a/vdb3/src/kfc/time.cpp
+++ /dev/null
@@ -1,290 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/time.hpp>
-#include <kfc/timemgr.hpp>
-#include <kfc/rsrc.hpp>
-#include <kfc/callstk.hpp>
-
-namespace vdb3
-{
-
-    template < class T >
-    I64 round ( const T & tm, I64 d )
-    {
-        I64 val = tm;
-        if ( val >= 0 )
-            return ( val + ( d / 2 ) ) / d;
-        return ( val - ( d / 2 ) ) / d;
-    }
-
-
-    /*------------------------------------------------------------------
-     * tm_base_t
-     */
-
-    template < class T >
-    T tm_base_t < T > :: operator / ( I64 d ) const
-    {
-        if ( d == 0 )
-        {
-            FUNC_ENTRY ();
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        }
-        return T ( val / d );
-    }
-
-    template < class T >
-    T tm_base_t < T > :: operator % ( I64 d ) const
-    {
-        if ( d == 0 )
-        {
-            FUNC_ENTRY ();
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        }
-        return T ( val % d );
-    }
-
-    template < class T >
-    T & tm_base_t < T > :: operator /= ( I64 d )
-    {
-        if ( d == 0 )
-        {
-            FUNC_ENTRY ();
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        }
-        val /= d;
-        return * ( T * ) this;
-    }
-
-    template < class T >
-    T & tm_base_t < T > :: operator %= ( I64 d )
-    {
-        if ( d == 0 )
-        {
-            FUNC_ENTRY ();
-            CONST_THROW ( xc_div_zero_err, "divide by zero" );
-        }
-        val %= d;
-        return * ( T * ) this;
-    }
-
-
-    /*------------------------------------------------------------------
-     * nS_t
-     *  represents nano-seconds
-     */
-
-    nS_t :: nS_t ( const uS_t & tm )
-        : tm_base_t < nS_t > ( ( I64 ) tm * 1000 )
-    {
-    }
-
-    void nS_t :: operator = ( const uS_t & tm )
-    {
-        val = ( I64 ) tm * 1000;
-    }
-
-    nS_t :: nS_t ( const mS_t & tm )
-        : tm_base_t < nS_t > ( ( I64 ) tm * 1000000 )
-    {
-    }
-
-    void nS_t :: operator = ( const mS_t & tm )
-    {
-        val = ( I64 ) tm * 1000000;
-    }
-
-    nS_t :: nS_t ( const seconds_t & tm )
-        : tm_base_t < nS_t > ( ( I64 ) tm * 1000000000 )
-    {
-    }
-
-    void nS_t :: operator = ( const seconds_t & tm )
-    {
-        val = ( I64 ) tm * 1000000000;
-    }
-
-
-
-    /*------------------------------------------------------------------
-     * uS_t
-     *  represents micro-seconds
-     */
-
-    uS_t :: uS_t ( const nS_t & tm )
-        : tm_base_t < uS_t > ( round ( tm, 1000 ) )
-    {
-    }
-
-    void uS_t :: operator = ( const nS_t & tm )
-    {
-        val = round ( tm, 1000 );
-    }
-
-    uS_t :: uS_t ( const mS_t & tm )
-        : tm_base_t < uS_t > ( ( I64 ) tm * 1000 )
-    {
-    }
-
-    void uS_t :: operator = ( const mS_t & tm )
-    {
-        val = ( I64 ) tm * 1000;
-    }
-
-    uS_t :: uS_t ( const seconds_t & tm )
-        : tm_base_t < uS_t > ( ( I64 ) tm * 1000000 )
-    {
-    }
-
-    void uS_t :: operator = ( const seconds_t & tm )
-    {
-        val = ( I64 ) tm * 1000000;
-    }
-
-
-
-    /*------------------------------------------------------------------
-     * mS_t
-     *  represents milli-seconds
-     */
-    mS_t :: mS_t ( const nS_t & tm )
-        : tm_base_t < mS_t > ( round ( tm, 1000000 ) )
-    {
-    }
-
-    void mS_t :: operator = ( const nS_t & tm )
-    {
-        val = round ( tm, 1000000 );
-    }
-
-    mS_t :: mS_t ( const uS_t & tm )
-        : tm_base_t < mS_t > ( round ( tm, 1000 ) )
-    {
-    }
-
-    void mS_t :: operator = ( const uS_t & tm )
-    {
-        val = round ( tm, 1000 );
-    }
-
-    mS_t :: mS_t ( const seconds_t & tm )
-        : tm_base_t < mS_t > ( ( I64 ) tm * 1000 )
-    {
-    }
-
-    void mS_t :: operator = ( const seconds_t & tm )
-    {
-        val = ( I64 ) tm * 1000;
-    }
-
-
-
-    /*------------------------------------------------------------------
-     * seconds_t
-     *  represents whole seconds
-     */
-    seconds_t :: seconds_t ( const nS_t & tm )
-        : tm_base_t < seconds_t > ( round ( tm, 1000000000 ) )
-    {
-    }
-
-    void seconds_t :: operator = ( const nS_t & tm )
-    {
-        val = round ( tm, 1000000000 );
-    }
-
-    seconds_t :: seconds_t ( const uS_t & tm )
-        : tm_base_t < seconds_t > ( round ( tm, 1000000 ) )
-    {
-    }
-
-    void seconds_t :: operator = ( const uS_t & tm )
-    {
-        val = round ( tm, 1000000 );
-    }
-
-    seconds_t :: seconds_t ( const mS_t & tm )
-        : tm_base_t < seconds_t > ( round ( tm, 1000 ) )
-    {
-    }
-
-    void seconds_t :: operator = ( const mS_t & tm )
-    {
-        val = round ( tm, 1000 );
-    }
-
-
-    /*------------------------------------------------------------------
-     * timeout_t
-     *  represents a time period in mS for triggering events
-     *  NB - this class has OS manifest dependencies
-     */
-
-    timeout_t :: timeout_t ( const nS_t & _delay )
-        : delay ( _delay )
-#if UNIX
-        , prepared ( 0 )
-#endif
-    {
-    }
-
-    timeout_t :: ~ timeout_t ()
-    {
-#if UNIX
-        prepared = 0;
-#endif
-    }
-
-    timeout_t :: timeout_t ( const timeout_t & tm )
-        : delay ( tm . delay )
-#if UNIX
-        , to ( tm . to )
-        , prepared ( tm . prepared )
-#endif
-    {
-    }
-
-    void timeout_t :: operator = ( const timeout_t & tm )
-    {
-        delay = tm . delay;
-#if UNIX
-        to = tm . to;
-        prepared = tm . prepared;
-#endif
-    }
-
-    void timeout_t :: prepare () const
-    {
-#if UNIX
-        // only POSIX timeouts need preparation
-        if ( prepared . test_and_set ( 0, 1 ) == 0 )
-        {
-            rsrc -> tmmgr . prepare_timeout ( * this );
-        }
-#endif
-    }
-}
diff --git a/vdb3/src/kfc/timemgr.cpp b/vdb3/src/kfc/timemgr.cpp
deleted file mode 100644
index b17e91a..0000000
--- a/vdb3/src/kfc/timemgr.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/timemgr.hpp>
-#include <kfc/time.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/rsrc.hpp>
-#include <kfc/caps.hpp>
-
-
-namespace vdb3
-{
-
-
-    /*------------------------------------------------------------------
-     * TimeMgrItf
-     *  time manager
-     */
-
-    void TimeMgrItf :: prepare_timeout ( const timeout_t & tm ) const
-    {
-#if UNIX
-        FUNC_ENTRY ();
-
-        // POSIX needs to add the delay to current time
-        // to produce an absolute timeout
-        timestamp_t cur = cur_time ();
-
-        // as funny as this looks, we have mutable members
-        tm . to = tm . delay + cur;
-#endif
-    }
-
-    timestamp_t TimeMgrItf :: make_timestamp ( const nS_t & nS )
-    {
-        return timestamp_t ( nS );
-    }
-
-    TimeMgr TimeMgrItf :: make_tmmgr_ref ( Refcount * obj, caps_t caps )
-    {
-        return TimeMgr ( obj, this, caps );
-    }
-
-
-    /*------------------------------------------------------------------
-     * TimeMgr
-     *  time manager reference
-     */
-
-    timestamp_t TimeMgr :: cur_time () const
-    {
-        FUNC_ENTRY ();
-        TimeMgrItf * itf = get_itf ( CAP_READ );
-        return itf -> cur_time ();
-    }
-
-    void TimeMgr :: prepare_timeout ( const timeout_t & tm ) const
-    {
-        FUNC_ENTRY ();
-        TimeMgrItf * itf = get_itf ( CAP_READ );
-        itf -> prepare_timeout ( tm );
-    }
-
-    TimeMgr :: TimeMgr ()
-    {
-    }
-
-    TimeMgr :: TimeMgr ( const TimeMgr & r )
-        : Ref < TimeMgrItf > ( r )
-    {
-    }
-
-    void TimeMgr :: operator = ( const TimeMgr & r )
-    {
-        Ref < TimeMgrItf > :: operator = ( r );
-    }
-
-    TimeMgr :: TimeMgr ( Refcount * obj, TimeMgrItf * itf, caps_t caps )
-        : Ref < TimeMgrItf > ( obj, itf, caps )
-    {
-    }
-}
diff --git a/vdb3/src/kfc/vers.cpp b/vdb3/src/kfc/vers.cpp
deleted file mode 100644
index 32ba2af..0000000
--- a/vdb3/src/kfc/vers.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/*===========================================================================
-*
-*                            PUBLIC DOMAIN NOTICE
-*               National Center for Biotechnology Information
-*
-*  This software/database is a "United States Government Work" under the
-*  terms of the United States Copyright Act.  It was written as part of
-*  the author's official duties as a United States Government employee and
-*  thus cannot be copyrighted.  This software/database is freely available
-*  to the public for use. The National Library of Medicine and the U.S.
-*  Government have not placed any restriction on its use or reproduction.
-*
-*  Although all reasonable efforts have been taken to ensure the accuracy
-*  and reliability of the software and data, the NLM and the U.S.
-*  Government do not and cannot warrant the performance or results that
-*  may be obtained by using this software or data. The NLM and the U.S.
-*  Government disclaim all warranties, express or implied, including
-*  warranties of performance, merchantability or fitness for any particular
-*  purpose.
-*
-*  Please cite the author in any work or product based on this material.
-*
-* ===========================================================================
-*
-*/
-
-#include <kfc/vers.hpp>
-#include <kfc/callstk.hpp>
-#include <kfc/except.hpp>
-
-namespace vdb3
-{
-
-    /*------------------------------------------------------------------
-     * vers_t
-     */
-    vers_t :: vers_t ()
-        : val ( 0 )
-    {
-    }
-
-    vers_t :: vers_t ( U32 maj )
-        : val ( maj << 24 )
-    {
-        FUNC_ENTRY ();
-        if ( maj > 255 )
-            THROW ( xc_bounds_err, "major version = %u", maj );
-    }
-
-    vers_t :: vers_t ( U32 maj, U32 min )
-        : val ( ( maj << 24 ) | ( min << 16 ) )
-    {
-        FUNC_ENTRY ();
-        if ( maj > 255 )
-            THROW ( xc_bounds_err, "major version = %u", maj );
-        if ( min > 255 )
-            THROW ( xc_bounds_err, "minor version = %u", min );
-    }
-
-    vers_t :: vers_t ( U32 maj, U32 min, U32 rel )
-        : val ( ( maj << 24 ) | ( min << 16 ) | ( rel << 8 ) )
-    {
-        FUNC_ENTRY ();
-        if ( maj > 255 )
-            THROW ( xc_bounds_err, "major version = %u", maj );
-        if ( min > 255 )
-            THROW ( xc_bounds_err, "minor version = %u", min );
-        if ( rel > 255 )
-            THROW ( xc_bounds_err, "release component = %u", rel );
-    }
-
-    vers_t :: vers_t ( U32 maj, U32 min, U32 rel, U32 post )
-        : val ( ( maj << 24 ) | ( min << 16 ) | ( rel << 8 ) | post )
-    {
-        FUNC_ENTRY ();
-        if ( maj > 255 )
-            THROW ( xc_bounds_err, "major version = %u", maj );
-        if ( min > 255 )
-            THROW ( xc_bounds_err, "minor version = %u", min );
-        if ( rel > 255 )
-            THROW ( xc_bounds_err, "release component = %u", rel );
-        if ( post > 255 )
-            THROW ( xc_bounds_err, "post-release component = %u", post );
-    }
-}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/sra-sdk.git



More information about the debian-med-commit mailing list